diff --git a/11_training_deep_neural_networks.ipynb b/11_training_deep_neural_networks.ipynb index 26ab2d5fc..470e5dc4f 100644 --- a/11_training_deep_neural_networks.ipynb +++ b/11_training_deep_neural_networks.ipynb @@ -1,4830 +1,5843 @@ { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "**11장 – 심층 신경망 훈련하기**" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "_이 노트북은 11장에 있는 모든 샘플 코드와 연습문제 해답을 가지고 있습니다._" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n", - " \n", - "
\n", - " 구글 코랩에서 실행하기\n", - "
" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# 설정" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "먼저 몇 개의 모듈을 임포트합니다. 맷플롯립 그래프를 인라인으로 출력하도록 만들고 그림을 저장하는 함수를 준비합니다. 또한 파이썬 버전이 3.5 이상인지 확인합니다(파이썬 2.x에서도 동작하지만 곧 지원이 중단되므로 파이썬 3을 사용하는 것이 좋습니다). 사이킷런 버전이 0.20 이상인지와 텐서플로 버전이 2.0 이상인지 확인합니다." - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "# 파이썬 ≥3.5 필수\n", - "import sys\n", - "assert sys.version_info >= (3, 5)\n", - "\n", - "# 사이킷런 ≥0.20 필수\n", - "import sklearn\n", - "assert sklearn.__version__ >= \"0.20\"\n", - "\n", - "# 텐서플로 ≥2.0 필수\n", - "import tensorflow as tf\n", - "from tensorflow import keras\n", - "assert tf.__version__ >= \"2.0\"\n", - "\n", - "%load_ext tensorboard\n", - "\n", - "# 공통 모듈 임포트\n", - "import numpy as np\n", - "import os\n", - "\n", - "# 노트북 실행 결과를 동일하게 유지하기 위해\n", - "np.random.seed(42)\n", - "\n", - "# 깔끔한 그래프 출력을 위해\n", - "%matplotlib inline\n", - "import matplotlib as mpl\n", - "import matplotlib.pyplot as plt\n", - "mpl.rc('axes', labelsize=14)\n", - "mpl.rc('xtick', labelsize=12)\n", - "mpl.rc('ytick', labelsize=12)\n", - "\n", - "# 그림을 저장할 위치\n", - "PROJECT_ROOT_DIR = \".\"\n", - "CHAPTER_ID = \"deep\"\n", - "IMAGES_PATH = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID)\n", - "os.makedirs(IMAGES_PATH, exist_ok=True)\n", - "\n", - "def save_fig(fig_id, tight_layout=True, fig_extension=\"png\", resolution=300):\n", - " path = os.path.join(IMAGES_PATH, fig_id + \".\" + fig_extension)\n", - " print(\"그림 저장:\", fig_id)\n", - " if tight_layout:\n", - " plt.tight_layout()\n", - " plt.savefig(path, format=fig_extension, dpi=resolution)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# 그레이디언트 소실과 폭주 문제" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], - "source": [ - "def logit(z):\n", - " return 1 / (1 + np.exp(-z))" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "그림 저장: sigmoid_saturation_plot\n" - ] - }, - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAagAAAEYCAYAAAAJeGK1AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nOzdd3wUxfvA8c8kl54AoYVelBqqFKUIiRSRonQVKUFQpNgoIoIgiIqgtK9Y8CcYiiBdKYKgEEBAIWAChBJFqoQSIEBC+s3vjz1iygUCXHIpz/v12ldyu3M7z20u99zszs4orTVCCCFEbuNg7wCEEEIIayRBCSGEyJUkQQkhhMiVJEEJIYTIlSRBCSGEyJUkQQkhhMiV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IJcA/Ar81s4EhxhQlDeta3g38q5kNDTekSNJ21DoptX9SgkoiM/tboBRYE3YsUeXuJ939x+7+qbvXuvsfgD3AdWHHFrYGdS3nuvsJd98I1Ne1lAa0HV24VNw/KUEliZnlAE8Bj4YdSyoxs3yCeo7nvbE7jZyvrqWOoFqg7ah5qbp/UoJKnvnAYlXGSJyZZQLLgCXu/uew44mAttS1TFvajhKSkvsnJagEtFSP0MyGA+OAfwk71rAlULuxvl+MoNrIaeD7oQUcLa2qa5nOtB21LJX3T8masLBDS6Ae4d8BA4F9dZP/9QAyzOwqd//6RQ8wQlpaV3BmmpXFBAMBbnH3qosdV4rYxQXWtUxn2o4SVkiK7p9USSIJzKwb5/7l+/cEG8Qsdz8USlARZmYLCWZeHlc3yaXUMbPlgAMPEqyj/wa+eZ7ZqdOatqPEpPL+SUdQSeDu5UB5/XMzOwGcivp/fhjM7MvATIJajAcbTDc/092XhRZYdHyXoK7lXwnqWs5ScmpM21HiUnn/pCMoERGJJA2SEBGRSFKCEhGRSFKCEhGRSFKCEhGRSFKCEhGRSFKCEhGRSFKCEhGRSFKCEhGRSPp/Ift7wiHFVloAAAAASUVORK5CYII=\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "z = np.linspace(-5, 5, 200)\n", - "\n", - "plt.plot([-5, 5], [0, 0], 'k-')\n", - "plt.plot([-5, 5], [1, 1], 'k--')\n", - "plt.plot([0, 0], [-0.2, 1.2], 'k-')\n", - "plt.plot([-5, 5], [-3/4, 7/4], 'g--')\n", - "plt.plot(z, logit(z), \"b-\", linewidth=2)\n", - "props = dict(facecolor='black', shrink=0.1)\n", - "plt.annotate('Saturating', xytext=(3.5, 0.7), xy=(5, 1), arrowprops=props, fontsize=14, ha=\"center\")\n", - "plt.annotate('Saturating', xytext=(-3.5, 0.3), xy=(-5, 0), arrowprops=props, fontsize=14, ha=\"center\")\n", - "plt.annotate('Linear', xytext=(2, 0.2), xy=(0, 0.5), arrowprops=props, fontsize=14, ha=\"center\")\n", - "plt.grid(True)\n", - "plt.title(\"Sigmoid activation function\", fontsize=14)\n", - "plt.axis([-5, 5, -0.2, 1.2])\n", - "\n", - "save_fig(\"sigmoid_saturation_plot\")\n", - "plt.show()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Xavier 초기화와 He 초기화" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "['Constant',\n", - " 'GlorotNormal',\n", - " 'GlorotUniform',\n", - " 'HeNormal',\n", - " 'HeUniform',\n", - " 'Identity',\n", - " 'Initializer',\n", - " 'LecunNormal',\n", - " 'LecunUniform',\n", - " 'Ones',\n", - " 'Orthogonal',\n", - " 'RandomNormal',\n", - " 'RandomUniform',\n", - " 'TruncatedNormal',\n", - " 'VarianceScaling',\n", - " 'Zeros',\n", - " 'constant',\n", - " 'deserialize',\n", - " 'get',\n", - " 'glorot_normal',\n", - " 'glorot_uniform',\n", - " 'he_normal',\n", - " 'he_uniform',\n", - " 'identity',\n", - " 'lecun_normal',\n", - " 'lecun_uniform',\n", - " 'ones',\n", - " 'orthogonal',\n", - " 'random_normal',\n", - " 'random_uniform',\n", - " 'serialize',\n", - " 'truncated_normal',\n", - " 'variance_scaling',\n", - " 'zeros']" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "[name for name in dir(keras.initializers) if not name.startswith(\"_\")]" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "keras.layers.Dense(10, activation=\"relu\", kernel_initializer=\"he_normal\")" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 6, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "init = keras.initializers.VarianceScaling(scale=2., mode='fan_avg',\n", - " distribution='uniform')\n", - "keras.layers.Dense(10, activation=\"relu\", kernel_initializer=init)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## 수렴하지 않는 활성화 함수" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### LeakyReLU" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": {}, - "outputs": [], - "source": [ - "def leaky_relu(z, alpha=0.01):\n", - " return np.maximum(alpha*z, z)" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "그림 저장: leaky_relu_plot\n" - ] - }, - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAagAAAEYCAYAAAAJeGK1AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3de3hU1b3/8fcXAkIICXDQeKGIqIgg5SJaLxXjpd6vgBalKkUN6g+1PYqKWkXxwqnoKYqKIIpFKiAgKKhVqVFRW42KR2lBC4JCBVFIIIYQSNbvjzXgEHKZmWSy5/J5Pc882TOzM/szOzvznb332muZcw4REZFE0yToACIiItVRgRIRkYSkAiUiIglJBUpERBKSCpSIiCQkFSgREUlIKlBSJzMrMLPxQedIBWaWZ2bOzNo3wrJWmtmNjbCcrmb2vpmVmdnKeC8vgjzOzAYGnUPqTwUqyZnZFDObH3SOaIWKngvdys1suZndb2Z7RPk6Q8yspI7l7FZc6/q9hlBDgXgP2Af4oQGXM8rMPq/mqSOAxxpqObW4BygFuoaW2Shq2fb3AV5qrBwSPxlBB5C09jRwK9Ac/8H2dOjxkYElijPnXDmwtpGWtb4xlgMcBMxzzq1spOXVyjnXKOtX4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uB+6vUMHmDULmjcPOpVIzVSgRNLE44/Dk09Cixa+14jc3KATidROBUokDbz1Flx/vZ+ePBkOPzzYPCKRUIESSXGrVsHAgbB9u+8l4uKLg04kEhkVKJEUVloK550H338Pp57q+9kTSRYqUCIpyjkYOhQWL4aDDoLnnoOmTYNOJRI5FSiRFPU//wMzZkBWFsybB23bBp1IJDoqUCIpaMECuPVWPz1tGnTrFmwekVioQDWSvLw8hg8fHnQMSQPLlvmGEM75EXLPOSfoRCKxUYEKGTJkCGeddVbQMUTqpbjYj+20aZPvMeK224JOJBI7FSiRFFFRAYMH+z2oHj1gyhQwCzqVSOxUoCJQXFxMfn4+e+21F61bt+b444+nsLBw5/M//PADF110ER06dKBly5Z0796dp59+utbXXLhwIW3atGHChAnxji9p4g9/8Oee2rXzjSKysoJOJFI/KlB1cM5x5plnsmbNGubPn88nn3xCv379OPHEE/n2228BKCsro0+fPsyfP58lS5Zw/fXXM2zYMBYuXFjta86aNYvzzz+fiRMncpW6kpYGMGOGv8apaVOYORMOOCDoRCL116Aj6qaiN998k8WLF7N+/XpatmwJwOjRo3nppZeYOnUqN910E/vttx8jRozY+Tv5+fn87W9/47nnnuOkk07a5fUmTpzIiBEjmDVrFqecckqjvhdJTYsXw29/66cfegiqbHIiSUsFqg4fffQRpaWl7Lnnnrs8XlZWxvLlywGoqKhgzJgxzJgxgzVr1rB161bKy8t3G2J57ty5PPHEE7z99tscffTRjfUWJIWtX+8bRWzZAkOGwLXXBp1IpOGoQNWhsrKS3Nxc3nnnnd2ey87OBmDs2LE8+OCDjBs3jh49epCVlcWtt97Kd999t8v8PXv25LPPPmPy5MkcddRRmM5gSz1s2wYXXABffw2/+IXvrVyblKQSFag69OnTh3Xr1tGkSRM6d+5c7TyLFi3i7LPP5pJLLgH8easvvviCNm3a7DLfAQccwCOPPEJeXh75+flMnDhRRUpi9vvf+17K99kH5szxw2iIpBI1kgizadMmFi9evMvtoIMO4thjj+Xcc8/llVde4auvvuL999/nzjvv3LlX1aVL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hIQlKBEhGRhJSuBWpi0AGSnNZf7LTuYqd1F7ukXHdpeQ5KREQSX7ruQYmISIJTgRIRkYSkAiUiIglJBQows4PNrMzMng06SzIwsz3MbLKZrTKzzWa22MxODzpXIjOzdmb2gpn9GFpvFwedKRloW2sYyfoZpwLlPQp8GHSIJJIBfAMcD+QAtwMzzaxTgJkS3aNAOZALDAYeN7PuwUZKCtrWGkZSfsalfYEys0FAEbAw6CzJwjn3o3NulHNupXOu0jk3H/gKODzobInIzFoBA4A/OOdKnHOLgBeBS4JNlvi0rdVfMn/GpXWBMrNs4G7gv4POkszMLBfoAiwJOkuC6gJsd859EfbYp4D2oKKkbS06yf4Zl9YFChgNTHbOrQ46SLIys2bANOAZ59zSoPMkqCxgU5XHioHWAWRJWtrWYpLUn3EpW6DMrMDMXA23RWbWCzgZ+N+gsyaautZd2HxNgKn4cyvDAwuc+EqA7CqPZQObA8iSlLStRS8VPuMygg4QL865vNqeN7PfAZ2Ar80M/LfcpmbWzTnXJ+4BE1hd6w7A/EqbjD/pf4Zzblu8cyWxL4AMMzvYOfdl6LGe6DBVRLStxSyPJP+MS9uujswsk12/1d6I/2Ne7ZxbH0ioJGJmE4BewMnOuZKg8yQ6M5sOOOAK/Hp7GTjGOaciVQdta7FJhc+4lN2DqotzrhQo3XHfzEqAsmT5wwXJzPYHhgFbgbWhb2cAw5xz0wILltiuAZ4CvgN+wH9IqDjVQdta7FLhMy5t96BERCSxpWwjCRERSW4qUCIikpBUoEREJCGpQImISEJSgRIRkYSkAiUiIglJBUpERBKSCpSIiCSk/w8RWbwVZP5A1QAAAABJRU5ErkJggg==\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "plt.plot(z, leaky_relu(z, 0.05), \"b-\", linewidth=2)\n", - "plt.plot([-5, 5], [0, 0], 'k-')\n", - "plt.plot([0, 0], [-0.5, 4.2], 'k-')\n", - "plt.grid(True)\n", - "props = dict(facecolor='black', shrink=0.1)\n", - "plt.annotate('Leak', xytext=(-3.5, 0.5), xy=(-5, -0.2), arrowprops=props, fontsize=14, ha=\"center\")\n", - "plt.title(\"Leaky ReLU activation function\", fontsize=14)\n", - "plt.axis([-5, 5, -0.5, 4.2])\n", - "\n", - "save_fig(\"leaky_relu_plot\")\n", - "plt.show()" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "['deserialize',\n", - " 'elu',\n", - " 'exponential',\n", - " 'get',\n", - " 'hard_sigmoid',\n", - " 'linear',\n", - " 'relu',\n", - " 'selu',\n", - " 'serialize',\n", - " 'sigmoid',\n", - " 'softmax',\n", - " 'softplus',\n", - " 'softsign',\n", - " 'swish',\n", - " 'tanh']" - ] - }, - "execution_count": 9, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "[m for m in dir(keras.activations) if not m.startswith(\"_\")]" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "['LeakyReLU', 'PReLU', 'ReLU', 'ThresholdedReLU']" - ] - }, - "execution_count": 10, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "[m for m in dir(keras.layers) if \"relu\" in m.lower()]" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "LeakyReLU를 사용해 패션 MNIST에서 신경망을 훈련해 보죠:" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [], - "source": [ - "(X_train_full, y_train_full), (X_test, y_test) = keras.datasets.fashion_mnist.load_data()\n", - "X_train_full = X_train_full / 255.0\n", - "X_test = X_test / 255.0\n", - "X_valid, X_train = X_train_full[:5000], X_train_full[5000:]\n", - "y_valid, y_train = y_train_full[:5000], y_train_full[5000:]" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [], - "source": [ - "tf.random.set_seed(42)\n", - "np.random.seed(42)\n", - "\n", - "model = keras.models.Sequential([\n", - " keras.layers.Flatten(input_shape=[28, 28]),\n", - " keras.layers.Dense(300, kernel_initializer=\"he_normal\"),\n", - " keras.layers.LeakyReLU(),\n", - " keras.layers.Dense(100, kernel_initializer=\"he_normal\"),\n", - " keras.layers.LeakyReLU(),\n", - " keras.layers.Dense(10, activation=\"softmax\")\n", - "])" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": {}, - "outputs": [], - "source": [ - "model.compile(loss=\"sparse_categorical_crossentropy\",\n", - " optimizer=keras.optimizers.SGD(lr=1e-3),\n", - " metrics=[\"accuracy\"])" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Epoch 1/10\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 1.2819 - accuracy: 0.6229 - val_loss: 0.8886 - val_accuracy: 0.7160\n", - "Epoch 2/10\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.7955 - accuracy: 0.7361 - val_loss: 0.7130 - val_accuracy: 0.7656\n", - "Epoch 3/10\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.6816 - accuracy: 0.7721 - val_loss: 0.6427 - val_accuracy: 0.7898\n", - "Epoch 4/10\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.6217 - accuracy: 0.7943 - val_loss: 0.5900 - val_accuracy: 0.8066\n", - "Epoch 5/10\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.5832 - accuracy: 0.8075 - val_loss: 0.5582 - val_accuracy: 0.8202\n", - "Epoch 6/10\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.5553 - accuracy: 0.8157 - val_loss: 0.5350 - val_accuracy: 0.8238\n", - "Epoch 7/10\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.5338 - accuracy: 0.8224 - val_loss: 0.5157 - val_accuracy: 0.8304\n", - "Epoch 8/10\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.5172 - accuracy: 0.8273 - val_loss: 0.5079 - val_accuracy: 0.8282\n", - "Epoch 9/10\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.5040 - accuracy: 0.8289 - val_loss: 0.4895 - val_accuracy: 0.8386\n", - "Epoch 10/10\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.4924 - accuracy: 0.8321 - val_loss: 0.4817 - val_accuracy: 0.8396\n" - ] - } - ], - "source": [ - "history = model.fit(X_train, y_train, epochs=10,\n", - " validation_data=(X_valid, y_valid))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "PReLU를 테스트해 보죠:" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "tf.random.set_seed(42)\n", - "np.random.seed(42)\n", - "\n", - "model = keras.models.Sequential([\n", - " keras.layers.Flatten(input_shape=[28, 28]),\n", - " keras.layers.Dense(300, kernel_initializer=\"he_normal\"),\n", - " keras.layers.PReLU(),\n", - " keras.layers.Dense(100, kernel_initializer=\"he_normal\"),\n", - " keras.layers.PReLU(),\n", - " keras.layers.Dense(10, activation=\"softmax\")\n", - "])" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [], - "source": [ - "model.compile(loss=\"sparse_categorical_crossentropy\",\n", - " optimizer=keras.optimizers.SGD(lr=1e-3),\n", - " metrics=[\"accuracy\"])" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Epoch 1/10\n", - "1719/1719 [==============================] - 6s 3ms/step - loss: 1.3461 - accuracy: 0.6209 - val_loss: 0.9255 - val_accuracy: 0.7184\n", - "Epoch 2/10\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.8197 - accuracy: 0.7355 - val_loss: 0.7305 - val_accuracy: 0.7628\n", - "Epoch 3/10\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.6966 - accuracy: 0.7694 - val_loss: 0.6565 - val_accuracy: 0.7880\n", - "Epoch 4/10\n", - "1719/1719 [==============================] - 6s 3ms/step - loss: 0.6331 - accuracy: 0.7909 - val_loss: 0.6003 - val_accuracy: 0.8048\n", - "Epoch 5/10\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.5917 - accuracy: 0.8057 - val_loss: 0.5656 - val_accuracy: 0.8184\n", - "Epoch 6/10\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.5618 - accuracy: 0.8134 - val_loss: 0.5406 - val_accuracy: 0.8238\n", - "Epoch 7/10\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.5390 - accuracy: 0.8206 - val_loss: 0.5196 - val_accuracy: 0.8312\n", - "Epoch 8/10\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.5213 - accuracy: 0.8257 - val_loss: 0.5113 - val_accuracy: 0.8320\n", - "Epoch 9/10\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.5070 - accuracy: 0.8288 - val_loss: 0.4916 - val_accuracy: 0.8380\n", - "Epoch 10/10\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.4945 - accuracy: 0.8315 - val_loss: 0.4826 - val_accuracy: 0.8396\n" - ] - } - ], - "source": [ - "history = model.fit(X_train, y_train, epochs=10,\n", - " validation_data=(X_valid, y_valid))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### ELU" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [], - "source": [ - "def elu(z, alpha=1):\n", - " return np.where(z < 0, alpha * (np.exp(z) - 1), z)" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "그림 저장: elu_plot\n" - ] - }, - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAagAAAEYCAYAAAAJeGK1AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+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VORK5CYII=\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "plt.plot(z, elu(z), \"b-\", linewidth=2)\n", - "plt.plot([-5, 5], [0, 0], 'k-')\n", - "plt.plot([-5, 5], [-1, -1], 'k--')\n", - "plt.plot([0, 0], [-2.2, 3.2], 'k-')\n", - "plt.grid(True)\n", - "plt.title(r\"ELU activation function ($\\alpha=1$)\", fontsize=14)\n", - "plt.axis([-5, 5, -2.2, 3.2])\n", - "\n", - "save_fig(\"elu_plot\")\n", - "plt.show()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "텐서플로에서 쉽게 ELU를 적용할 수 있습니다. 층을 만들 때 활성화 함수로 지정하면 됩니다:" - ] - }, - { - "cell_type": "code", - "execution_count": 20, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 20, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "keras.layers.Dense(10, activation=\"elu\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### SELU" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Günter Klambauer, Thomas Unterthiner, Andreas Mayr는 2017년 한 [훌륭한 논문](https://arxiv.org/pdf/1706.02515.pdf)에서 SELU 활성화 함수를 소개했습니다. 훈련하는 동안 완전 연결 층만 쌓아서 신경망을 만들고 SELU 활성화 함수와 LeCun 초기화를 사용한다면 자기 정규화됩니다. 각 층의 출력이 평균과\n", - "표준편차를 보존하는 경향이 있습니다. 이는 그레이디언트 소실과 폭주 문제를 막아줍니다. 그 결과로 SELU 활성화 함수는 이런 종류의 네트워크(특히 아주 깊은 네트워크)에서 다른 활성화 함수보다 뛰어난 성능을 종종 냅니다. 따라서 꼭 시도해 봐야 합니다. 하지만 SELU 활성화 함수의 자기 정규화 특징은 쉽게 깨집니다. ℓ1나 ℓ2 정규화, 드롭아웃, 맥스 노름, 스킵 연결이나 시퀀셜하지 않은 다른 토폴로지를 사용할 수 없습니다(즉 순환 신경망은 자기 정규화되지 않습니다). 하지만 실전에서 시퀀셜 CNN과 잘 동작합니다. 자기 정규화가 깨지면 SELU가 다른 활성화 함수보다 더 나은 성능을 내지 않을 것입니다." - ] - }, - { - "cell_type": "code", - "execution_count": 21, - "metadata": {}, - "outputs": [], - "source": [ - "from scipy.special import erfc\n", - "\n", - "# alpha와 scale은 평균 0과 표준 편차 1로 자기 정규화합니다\n", - "# (논문에 있는 식 14 참조):\n", - "alpha_0_1 = -np.sqrt(2 / np.pi) / (erfc(1/np.sqrt(2)) * np.exp(1/2) - 1)\n", - "scale_0_1 = (1 - erfc(1 / np.sqrt(2)) * np.sqrt(np.e)) * np.sqrt(2 * np.pi) * (2 * erfc(np.sqrt(2))*np.e**2 + np.pi*erfc(1/np.sqrt(2))**2*np.e - 2*(2+np.pi)*erfc(1/np.sqrt(2))*np.sqrt(np.e)+np.pi+2)**(-1/2)" - ] - }, - { - "cell_type": "code", - "execution_count": 22, - "metadata": {}, - "outputs": [], - "source": [ - "def selu(z, scale=scale_0_1, alpha=alpha_0_1):\n", - " return scale * elu(z, alpha)" - ] - }, - { - "cell_type": "code", - "execution_count": 23, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "그림 저장: selu_plot\n" - ] - }, - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAagAAAEYCAYAAAAJeGK1AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3deXwV5b3H8c+PEJBNooCpCMp1QcUNMdde1NZYuS4ISsWKigu1CsVixV0pKApCpdSiVRAUSwVUUNxY1KptvFrUCjXFooILILgSJEBYAkme+8dzUsIhCTnJJDPnnO/79ZoXhzOTmd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hIJCmgREQkkkIfUdfM1gKrQi2icm2BgrCLSELab4nTPkuc9lniorzPDnLOtYt/M/SAiiozW1TZg2NSPe23xGmfJU77LHHJuM90iU9ERCJJASUiIpGkgKralLALSFLab4nTPkuc9lnikm6f6R6UiIhEks6gREQkkhRQIiISSQooERGJJAVUDZnZYWa2zcxmhF1LlJlZUzObamarzGyTmeWb2dlh1xVFZravmT1nZptj++uSsGuKMh1bdZOM32EKqJp7CHgv7CKSQGNgNXAq0BoYDsw2s04h1hRVD+EH+MwG+gOTzOyocEuKNB1bdZN032EKqBows4uAQuD1sGuJOufcZufcSOfcSudcmXNuHrACOCHs2qLEzFoAfYERzrki59xbwIvAZeFWFl06tmovWb/DFFB7YGZ7A3cDN4RdSzIys2ygM7A07FoipjNQ4pxbXuG9fwE6g6ohHVs1k8zfYQqoPRsFTHXOrQm7kGRjZpnATODPzrmPw64nYloCG+Pe2wC0CqGWpKNjKyFJ+x2W1gFlZnlm5qqY3jKzrkAP4A9h1xoVe9pnFZZrBEzH32MZElrB0VUE7B333t7AphBqSSo6tmou2b/D6jyibjJzzuVWN9/MhgKdgC/MDPxvvRlm1sU5163eC4ygPe0zAPM7ayr+5n9P59yO+q4rCS0HGpvZYc65T2LvHYcuV1VLx1bCckni7zB1dVQNM2vOrr/l3oT/xx7snFsbSlFJwMweBroCPZxzRWHXE1Vm9hTggKvw+2sBcJJzTiFVBR1biUn277C0PoPaE+fcFmBL+d/NrAjYlgz/sGExs4OAQUAx8E3stzaAQc65maEVFk3XAI8B3wHr8F8aCqcq6NhKXLJ/h+kMSkREIimtG0mIiEh0KaBERCSSFFAiIhJJCigREYkkBZSIiESSAkpERCJJASUiIpGkgBIRkUj6f7rWE9hQoFkdAAAAAElFTkSuQmCC\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "plt.plot(z, selu(z), \"b-\", linewidth=2)\n", - "plt.plot([-5, 5], [0, 0], 'k-')\n", - "plt.plot([-5, 5], [-1.758, -1.758], 'k--')\n", - "plt.plot([0, 0], [-2.2, 3.2], 'k-')\n", - "plt.grid(True)\n", - "plt.title(\"SELU activation function\", fontsize=14)\n", - "plt.axis([-5, 5, -2.2, 3.2])\n", - "\n", - "save_fig(\"selu_plot\")\n", - "plt.show()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "기본적으로 SELU 하이퍼파라미터(`scale`과 `alpha`)는 각 뉴런의 평균 출력이 0에 가깝고 표준 편차는 1에 가깝도록 조정됩니다(입력은 평균이 0이고 표준 편차 1로 표준화되었다고 가정합니다). 이 활성화 함수를 사용하면 1,000개의 층이 있는 심층 신경망도 모든 층에 걸쳐 거의 평균이 0이고 표준 편차를 1로 유지합니다. 이를 통해 그레이디언트 폭주와 소실 문제를 피할 수 있습니다:" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Layer 0: mean -0.00, std deviation 1.00\n", - "Layer 100: mean 0.02, std deviation 0.96\n", - "Layer 200: mean 0.01, std deviation 0.90\n", - "Layer 300: mean -0.02, std deviation 0.92\n", - "Layer 400: mean 0.05, std deviation 0.89\n", - "Layer 500: mean 0.01, std deviation 0.93\n", - "Layer 600: mean 0.02, std deviation 0.92\n", - "Layer 700: mean -0.02, std deviation 0.90\n", - "Layer 800: mean 0.05, std deviation 0.83\n", - "Layer 900: mean 0.02, std deviation 1.00\n" - ] - } - ], - "source": [ - "np.random.seed(42)\n", - "Z = np.random.normal(size=(500, 100)) # 표준화된 입력\n", - "for layer in range(1000):\n", - " W = np.random.normal(size=(100, 100), scale=np.sqrt(1 / 100)) # LeCun 초기화\n", - " Z = selu(np.dot(Z, W))\n", - " means = np.mean(Z, axis=0).mean()\n", - " stds = np.std(Z, axis=0).mean()\n", - " if layer % 100 == 0:\n", - " print(\"Layer {}: mean {:.2f}, std deviation {:.2f}\".format(layer, means, stds))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "쉽게 SELU를 사용할 수 있습니다:" - ] - }, - { - "cell_type": "code", - "execution_count": 25, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 25, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "keras.layers.Dense(10, activation=\"selu\",\n", - " kernel_initializer=\"lecun_normal\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "100개의 은닉층과 SELU 활성화 함수를 사용한 패션 MNIST를 위한 신경망을 만들어 보죠:" - ] - }, - { - "cell_type": "code", - "execution_count": 26, - "metadata": {}, - "outputs": [], - "source": [ - "np.random.seed(42)\n", - "tf.random.set_seed(42)" - ] - }, - { - "cell_type": "code", - "execution_count": 27, - "metadata": {}, - "outputs": [], - "source": [ - "model = keras.models.Sequential()\n", - "model.add(keras.layers.Flatten(input_shape=[28, 28]))\n", - "model.add(keras.layers.Dense(300, activation=\"selu\",\n", - " kernel_initializer=\"lecun_normal\"))\n", - "for layer in range(99):\n", - " model.add(keras.layers.Dense(100, activation=\"selu\",\n", - " kernel_initializer=\"lecun_normal\"))\n", - "model.add(keras.layers.Dense(10, activation=\"softmax\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 28, - "metadata": {}, - "outputs": [], - "source": [ - "model.compile(loss=\"sparse_categorical_crossentropy\",\n", - " optimizer=keras.optimizers.SGD(lr=1e-3),\n", - " metrics=[\"accuracy\"])" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "이제 훈련해 보죠. 입력을 평균 0과 표준 편차 1로 바꾸어야 한다는 것을 잊지 마세요:" - ] - }, - { - "cell_type": "code", - "execution_count": 29, - "metadata": {}, - "outputs": [], - "source": [ - "pixel_means = X_train.mean(axis=0, keepdims=True)\n", - "pixel_stds = X_train.std(axis=0, keepdims=True)\n", - "X_train_scaled = (X_train - pixel_means) / pixel_stds\n", - "X_valid_scaled = (X_valid - pixel_means) / pixel_stds\n", - "X_test_scaled = (X_test - pixel_means) / pixel_stds" - ] - }, - { - "cell_type": "code", - "execution_count": 30, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Epoch 1/5\n", - "1719/1719 [==============================] - 32s 19ms/step - loss: 1.4254 - accuracy: 0.4457 - val_loss: 0.9036 - val_accuracy: 0.6758\n", - "Epoch 2/5\n", - "1719/1719 [==============================] - 32s 19ms/step - loss: 0.8673 - accuracy: 0.6903 - val_loss: 0.7675 - val_accuracy: 0.7316\n", - "Epoch 3/5\n", - "1719/1719 [==============================] - 32s 18ms/step - loss: 0.6920 - accuracy: 0.7525 - val_loss: 0.6481 - val_accuracy: 0.7694\n", - "Epoch 4/5\n", - "1719/1719 [==============================] - 32s 18ms/step - loss: 0.6801 - accuracy: 0.7533 - val_loss: 0.6137 - val_accuracy: 0.7852\n", - "Epoch 5/5\n", - "1719/1719 [==============================] - 32s 18ms/step - loss: 0.5883 - accuracy: 0.7845 - val_loss: 0.5503 - val_accuracy: 0.8036\n" - ] - } - ], - "source": [ - "history = model.fit(X_train_scaled, y_train, epochs=5,\n", - " validation_data=(X_valid_scaled, y_valid))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "대신 ReLU 활성화 함수를 사용하면 어떤 일이 일어나는지 확인해 보죠:" - ] - }, - { - "cell_type": "code", - "execution_count": 31, - "metadata": {}, - "outputs": [], - "source": [ - "np.random.seed(42)\n", - "tf.random.set_seed(42)" - ] - }, - { - "cell_type": "code", - "execution_count": 32, - "metadata": {}, - "outputs": [], - "source": [ - "model = keras.models.Sequential()\n", - "model.add(keras.layers.Flatten(input_shape=[28, 28]))\n", - "model.add(keras.layers.Dense(300, activation=\"relu\", kernel_initializer=\"he_normal\"))\n", - "for layer in range(99):\n", - " model.add(keras.layers.Dense(100, activation=\"relu\", kernel_initializer=\"he_normal\"))\n", - "model.add(keras.layers.Dense(10, activation=\"softmax\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 33, - "metadata": {}, - "outputs": [], - "source": [ - "model.compile(loss=\"sparse_categorical_crossentropy\",\n", - " optimizer=keras.optimizers.SGD(lr=1e-3),\n", - " metrics=[\"accuracy\"])" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Epoch 1/5\n", - "1719/1719 [==============================] - 33s 19ms/step - loss: 1.8139 - accuracy: 0.2607 - val_loss: 1.4307 - val_accuracy: 0.3734\n", - "Epoch 2/5\n", - "1719/1719 [==============================] - 32s 19ms/step - loss: 1.1872 - accuracy: 0.4937 - val_loss: 1.0023 - val_accuracy: 0.5844\n", - "Epoch 3/5\n", - "1719/1719 [==============================] - 32s 19ms/step - loss: 0.9595 - accuracy: 0.6029 - val_loss: 0.8268 - val_accuracy: 0.6698\n", - "Epoch 4/5\n", - "1719/1719 [==============================] - 32s 19ms/step - loss: 0.9046 - accuracy: 0.6324 - val_loss: 0.8080 - val_accuracy: 0.6908\n", - "Epoch 5/5\n", - "1719/1719 [==============================] - 32s 19ms/step - loss: 0.8454 - accuracy: 0.6642 - val_loss: 0.7522 - val_accuracy: 0.7180\n" - ] - } - ], - "source": [ - "history = model.fit(X_train_scaled, y_train, epochs=5,\n", - " validation_data=(X_valid_scaled, y_valid))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "좋지 않군요. 그레이디언트 폭주나 소실 문제가 발생한 것입니다." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# 배치 정규화" - ] - }, - { - "cell_type": "code", - "execution_count": 35, - "metadata": {}, - "outputs": [], - "source": [ - "model = keras.models.Sequential([\n", - " keras.layers.Flatten(input_shape=[28, 28]),\n", - " keras.layers.BatchNormalization(),\n", - " keras.layers.Dense(300, activation=\"relu\"),\n", - " keras.layers.BatchNormalization(),\n", - " keras.layers.Dense(100, activation=\"relu\"),\n", - " keras.layers.BatchNormalization(),\n", - " keras.layers.Dense(10, activation=\"softmax\")\n", - "])" - ] - }, - { - "cell_type": "code", - "execution_count": 36, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Model: \"sequential_4\"\n", - "_________________________________________________________________\n", - "Layer (type) Output Shape Param # \n", - "=================================================================\n", - "flatten_4 (Flatten) (None, 784) 0 \n", - "_________________________________________________________________\n", - "batch_normalization (BatchNo (None, 784) 3136 \n", - "_________________________________________________________________\n", - "dense_212 (Dense) (None, 300) 235500 \n", - "_________________________________________________________________\n", - "batch_normalization_1 (Batch (None, 300) 1200 \n", - "_________________________________________________________________\n", - "dense_213 (Dense) (None, 100) 30100 \n", - "_________________________________________________________________\n", - "batch_normalization_2 (Batch (None, 100) 400 \n", - "_________________________________________________________________\n", - "dense_214 (Dense) (None, 10) 1010 \n", - "=================================================================\n", - "Total params: 271,346\n", - "Trainable params: 268,978\n", - "Non-trainable params: 2,368\n", - "_________________________________________________________________\n" - ] - } - ], - "source": [ - "model.summary()" - ] - }, - { - "cell_type": "code", - "execution_count": 37, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "[('batch_normalization/gamma:0', True),\n", - " ('batch_normalization/beta:0', True),\n", - " ('batch_normalization/moving_mean:0', False),\n", - " ('batch_normalization/moving_variance:0', False)]" - ] - }, - "execution_count": 37, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "bn1 = model.layers[1]\n", - "[(var.name, var.trainable) for var in bn1.variables]" - ] - }, - { - "cell_type": "code", - "execution_count": 38, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:From :1: Layer.updates (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version.\n", - "Instructions for updating:\n", - "This property should not be used in TensorFlow 2.0, as updates are applied automatically.\n" - ] - }, - { - "data": { - "text/plain": [ - "[]" - ] - }, - "execution_count": 38, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "bn1.updates" - ] - }, - { - "cell_type": "code", - "execution_count": 39, - "metadata": {}, - "outputs": [], - "source": [ - "model.compile(loss=\"sparse_categorical_crossentropy\",\n", - " optimizer=keras.optimizers.SGD(lr=1e-3),\n", - " metrics=[\"accuracy\"])" - ] - }, - { - "cell_type": "code", - "execution_count": 40, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Epoch 1/10\n", - "1719/1719 [==============================] - 8s 5ms/step - loss: 0.8750 - accuracy: 0.7123 - val_loss: 0.5525 - val_accuracy: 0.8228\n", - "Epoch 2/10\n", - "1719/1719 [==============================] - 8s 5ms/step - loss: 0.5753 - accuracy: 0.8031 - val_loss: 0.4724 - val_accuracy: 0.8476\n", - "Epoch 3/10\n", - "1719/1719 [==============================] - 8s 5ms/step - loss: 0.5189 - accuracy: 0.8205 - val_loss: 0.4375 - val_accuracy: 0.8546\n", - "Epoch 4/10\n", - "1719/1719 [==============================] - 8s 5ms/step - loss: 0.4827 - accuracy: 0.8322 - val_loss: 0.4152 - val_accuracy: 0.8594\n", - "Epoch 5/10\n", - "1719/1719 [==============================] - 8s 5ms/step - loss: 0.4565 - accuracy: 0.8408 - val_loss: 0.3997 - val_accuracy: 0.8636\n", - "Epoch 6/10\n", - "1719/1719 [==============================] - 8s 5ms/step - loss: 0.4398 - accuracy: 0.8472 - val_loss: 0.3867 - val_accuracy: 0.8700\n", - "Epoch 7/10\n", - "1719/1719 [==============================] - 8s 5ms/step - loss: 0.4242 - accuracy: 0.8511 - val_loss: 0.3762 - val_accuracy: 0.8706\n", - "Epoch 8/10\n", - "1719/1719 [==============================] - 8s 5ms/step - loss: 0.4144 - accuracy: 0.8541 - val_loss: 0.3710 - val_accuracy: 0.8736\n", - "Epoch 9/10\n", - "1719/1719 [==============================] - 8s 5ms/step - loss: 0.4024 - accuracy: 0.8581 - val_loss: 0.3630 - val_accuracy: 0.8756\n", - "Epoch 10/10\n", - "1719/1719 [==============================] - 8s 5ms/step - loss: 0.3915 - accuracy: 0.8623 - val_loss: 0.3572 - val_accuracy: 0.8754\n" - ] - } - ], - "source": [ - "history = model.fit(X_train, y_train, epochs=10,\n", - " validation_data=(X_valid, y_valid))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "이따금 활성화 함수전에 BN을 적용해도 잘 동작합니다(여기에는 논란의 여지가 있습니다). 또한 `BatchNormalization` 층 이전의 층은 편향을 위한 항이 필요 없습니다. `BatchNormalization` 층이 이를 무효화하기 때문입니다. 따라서 필요 없는 파라미터이므로 `use_bias=False`를 지정하여 층을 만들 수 있습니다:" - ] - }, - { - "cell_type": "code", - "execution_count": 41, - "metadata": {}, - "outputs": [], - "source": [ - "model = keras.models.Sequential([\n", - " keras.layers.Flatten(input_shape=[28, 28]),\n", - " keras.layers.BatchNormalization(),\n", - " keras.layers.Dense(300, use_bias=False),\n", - " keras.layers.BatchNormalization(),\n", - " keras.layers.Activation(\"relu\"),\n", - " keras.layers.Dense(100, use_bias=False),\n", - " keras.layers.BatchNormalization(),\n", - " keras.layers.Activation(\"relu\"),\n", - " keras.layers.Dense(10, activation=\"softmax\")\n", - "])" - ] - }, - { - "cell_type": "code", - "execution_count": 42, - "metadata": {}, - "outputs": [], - "source": [ - "model.compile(loss=\"sparse_categorical_crossentropy\",\n", - " optimizer=keras.optimizers.SGD(lr=1e-3),\n", - " metrics=[\"accuracy\"])" - ] - }, - { - "cell_type": "code", - "execution_count": 43, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Epoch 1/10\n", - "1719/1719 [==============================] - 8s 5ms/step - loss: 1.0317 - accuracy: 0.6757 - val_loss: 0.6767 - val_accuracy: 0.7816\n", - "Epoch 2/10\n", - "1719/1719 [==============================] - 8s 5ms/step - loss: 0.6790 - accuracy: 0.7792 - val_loss: 0.5566 - val_accuracy: 0.8180\n", - "Epoch 3/10\n", - "1719/1719 [==============================] - 8s 5ms/step - loss: 0.5960 - accuracy: 0.8037 - val_loss: 0.5007 - val_accuracy: 0.8360\n", - "Epoch 4/10\n", - "1719/1719 [==============================] - 8s 5ms/step - loss: 0.5447 - accuracy: 0.8192 - val_loss: 0.4666 - val_accuracy: 0.8448\n", - "Epoch 5/10\n", - "1719/1719 [==============================] - 8s 5ms/step - loss: 0.5109 - accuracy: 0.8279 - val_loss: 0.4434 - val_accuracy: 0.8534\n", - "Epoch 6/10\n", - "1719/1719 [==============================] - 8s 5ms/step - loss: 0.4898 - accuracy: 0.8336 - val_loss: 0.4263 - val_accuracy: 0.8550\n", - "Epoch 7/10\n", - "1719/1719 [==============================] - 8s 5ms/step - loss: 0.4712 - accuracy: 0.8397 - val_loss: 0.4130 - val_accuracy: 0.8572\n", - "Epoch 8/10\n", - "1719/1719 [==============================] - 8s 5ms/step - loss: 0.4560 - accuracy: 0.8441 - val_loss: 0.4035 - val_accuracy: 0.8606\n", - "Epoch 9/10\n", - "1719/1719 [==============================] - 8s 5ms/step - loss: 0.4441 - accuracy: 0.8473 - val_loss: 0.3943 - val_accuracy: 0.8642\n", - "Epoch 10/10\n", - "1719/1719 [==============================] - 8s 5ms/step - loss: 0.4332 - accuracy: 0.8505 - val_loss: 0.3874 - val_accuracy: 0.8662\n" - ] - } - ], - "source": [ - "history = model.fit(X_train, y_train, epochs=10,\n", - " validation_data=(X_valid, y_valid))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## 그레이디언트 클리핑" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "모든 케라스 옵티마이저는 `clipnorm`이나 `clipvalue` 매개변수를 지원합니다:" - ] - }, - { - "cell_type": "code", - "execution_count": 44, - "metadata": {}, - "outputs": [], - "source": [ - "optimizer = keras.optimizers.SGD(clipvalue=1.0)" - ] - }, - { - "cell_type": "code", - "execution_count": 45, - "metadata": {}, - "outputs": [], - "source": [ - "optimizer = keras.optimizers.SGD(clipnorm=1.0)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## 사전 훈련된 층 재사용하기" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### 케라스 모델 재사용하기" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "패션 MNIST 훈련 세트를 두 개로 나누어 보죠:\n", - "* `X_train_A`: 샌달과 셔츠(클래스 5와 6)을 제외한 모든 이미지\n", - "* `X_train_B`: 샌달과 셔츠 이미지 중 처음 200개만 가진 작은 훈련 세트\n", - "\n", - "검증 세트와 테스트 세트도 이렇게 나눕니다. 하지만 이미지 개수는 제한하지 않습니다.\n", - "\n", - "A 세트(8개의 클래스를 가진 분류 문제)에서 모델을 훈련하고 이를 재사용하여 B 세트(이진 분류)를 해결해 보겠습니다. A 작업에서 B 작업으로 약간의 지식이 전달되기를 기대합니다. 왜냐하면 A 세트의 클래스(스니커즈, 앵클 부츠, 코트, 티셔츠 등)가 B 세트에 있는 클래스(샌달과 셔츠)와 조금 비슷하기 때문입니다. 하지만 `Dense` 층을 사용하기 때문에 동일한 위치에 나타난 패턴만 재사용할 수 있습니다(반대로 합성곱 층은 훨씬 많은 정보를 전송합니다. 학습한 패턴을 이미지의 어느 위치에서나 감지할 수 있기 때문입니다. CNN 장에서 자세히 알아 보겠습니다)." - ] - }, - { - "cell_type": "code", - "execution_count": 46, - "metadata": {}, - "outputs": [], - "source": [ - "def split_dataset(X, y):\n", - " y_5_or_6 = (y == 5) | (y == 6) # sandals or shirts\n", - " y_A = y[~y_5_or_6]\n", - " y_A[y_A > 6] -= 2 # class indices 7, 8, 9 should be moved to 5, 6, 7\n", - " y_B = (y[y_5_or_6] == 6).astype(np.float32) # binary classification task: is it a shirt (class 6)?\n", - " return ((X[~y_5_or_6], y_A),\n", - " (X[y_5_or_6], y_B))\n", - "\n", - "(X_train_A, y_train_A), (X_train_B, y_train_B) = split_dataset(X_train, y_train)\n", - "(X_valid_A, y_valid_A), (X_valid_B, y_valid_B) = split_dataset(X_valid, y_valid)\n", - "(X_test_A, y_test_A), (X_test_B, y_test_B) = split_dataset(X_test, y_test)\n", - "X_train_B = X_train_B[:200]\n", - "y_train_B = y_train_B[:200]" - ] - }, - { - "cell_type": "code", - "execution_count": 47, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "(43986, 28, 28)" - ] - }, - "execution_count": 47, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "X_train_A.shape" - ] - }, - { - "cell_type": "code", - "execution_count": 48, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "(200, 28, 28)" - ] - }, - "execution_count": 48, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "X_train_B.shape" - ] - }, - { - "cell_type": "code", - "execution_count": 49, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "array([4, 0, 5, 7, 7, 7, 4, 4, 3, 4, 0, 1, 6, 3, 4, 3, 2, 6, 5, 3, 4, 5,\n", - " 1, 3, 4, 2, 0, 6, 7, 1], dtype=uint8)" - ] - }, - "execution_count": 49, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "y_train_A[:30]" - ] - }, - { - "cell_type": "code", - "execution_count": 50, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "array([1., 1., 0., 0., 0., 0., 1., 1., 1., 0., 0., 1., 1., 0., 0., 0., 0.,\n", - " 0., 0., 1., 1., 0., 0., 1., 1., 0., 1., 1., 1., 1.], dtype=float32)" - ] - }, - "execution_count": 50, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "y_train_B[:30]" - ] - }, - { - "cell_type": "code", - "execution_count": 51, - "metadata": {}, - "outputs": [], - "source": [ - "tf.random.set_seed(42)\n", - "np.random.seed(42)" - ] - }, - { - "cell_type": "code", - "execution_count": 52, - "metadata": {}, - "outputs": [], - "source": [ - "model_A = keras.models.Sequential()\n", - "model_A.add(keras.layers.Flatten(input_shape=[28, 28]))\n", - "for n_hidden in (300, 100, 50, 50, 50):\n", - " model_A.add(keras.layers.Dense(n_hidden, activation=\"selu\"))\n", - "model_A.add(keras.layers.Dense(8, activation=\"softmax\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 53, - "metadata": {}, - "outputs": [], - "source": [ - "model_A.compile(loss=\"sparse_categorical_crossentropy\",\n", - " optimizer=keras.optimizers.SGD(lr=1e-3),\n", - " metrics=[\"accuracy\"])" - ] - }, - { - "cell_type": "code", - "execution_count": 54, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Epoch 1/20\n", - "1375/1375 [==============================] - 5s 3ms/step - loss: 0.5927 - accuracy: 0.8103 - val_loss: 0.3894 - val_accuracy: 0.8662\n", - "Epoch 2/20\n", - "1375/1375 [==============================] - 4s 3ms/step - loss: 0.3523 - accuracy: 0.8785 - val_loss: 0.3286 - val_accuracy: 0.8834\n", - "Epoch 3/20\n", - "1375/1375 [==============================] - 4s 3ms/step - loss: 0.3170 - accuracy: 0.8896 - val_loss: 0.3011 - val_accuracy: 0.8984\n", - "Epoch 4/20\n", - "1375/1375 [==============================] - 4s 3ms/step - loss: 0.2974 - accuracy: 0.8975 - val_loss: 0.2895 - val_accuracy: 0.9018\n", - "Epoch 5/20\n", - "1375/1375 [==============================] - 4s 3ms/step - loss: 0.2835 - accuracy: 0.9020 - val_loss: 0.2774 - val_accuracy: 0.9071\n", - "Epoch 6/20\n", - "1375/1375 [==============================] - 5s 3ms/step - loss: 0.2730 - accuracy: 0.9063 - val_loss: 0.2736 - val_accuracy: 0.9061\n", - "Epoch 7/20\n", - "1375/1375 [==============================] - 4s 3ms/step - loss: 0.2642 - accuracy: 0.9092 - val_loss: 0.2717 - val_accuracy: 0.9083\n", - "Epoch 8/20\n", - "1375/1375 [==============================] - 4s 3ms/step - loss: 0.2573 - accuracy: 0.9126 - val_loss: 0.2590 - val_accuracy: 0.9141\n", - "Epoch 9/20\n", - "1375/1375 [==============================] - 4s 3ms/step - loss: 0.2519 - accuracy: 0.9137 - val_loss: 0.2562 - val_accuracy: 0.9145\n", - "Epoch 10/20\n", - "1375/1375 [==============================] - 4s 3ms/step - loss: 0.2469 - accuracy: 0.9155 - val_loss: 0.2542 - val_accuracy: 0.9155\n", - "Epoch 11/20\n", - "1375/1375 [==============================] - 4s 3ms/step - loss: 0.2423 - accuracy: 0.9178 - val_loss: 0.2494 - val_accuracy: 0.9163\n", - "Epoch 12/20\n", - "1375/1375 [==============================] - 4s 3ms/step - loss: 0.2383 - accuracy: 0.9188 - val_loss: 0.2512 - val_accuracy: 0.9128\n", - "Epoch 13/20\n", - "1375/1375 [==============================] - 4s 3ms/step - loss: 0.2351 - accuracy: 0.9198 - val_loss: 0.2448 - val_accuracy: 0.9158\n", - "Epoch 14/20\n", - "1375/1375 [==============================] - 4s 3ms/step - loss: 0.2316 - accuracy: 0.9210 - val_loss: 0.2416 - val_accuracy: 0.9175\n", - "Epoch 15/20\n", - "1375/1375 [==============================] - 4s 3ms/step - loss: 0.2288 - accuracy: 0.9213 - val_loss: 0.2451 - val_accuracy: 0.9200\n", - "Epoch 16/20\n", - "1375/1375 [==============================] - 4s 3ms/step - loss: 0.2255 - accuracy: 0.9223 - val_loss: 0.2386 - val_accuracy: 0.9200\n", - "Epoch 17/20\n", - "1375/1375 [==============================] - 4s 3ms/step - loss: 0.2231 - accuracy: 0.9232 - val_loss: 0.2411 - val_accuracy: 0.9178\n", - "Epoch 18/20\n", - "1375/1375 [==============================] - 4s 3ms/step - loss: 0.2201 - accuracy: 0.9245 - val_loss: 0.2428 - val_accuracy: 0.9150\n", - "Epoch 19/20\n", - "1375/1375 [==============================] - 4s 3ms/step - loss: 0.2178 - accuracy: 0.9249 - val_loss: 0.2329 - val_accuracy: 0.9205\n", - "Epoch 20/20\n", - "1375/1375 [==============================] - 4s 3ms/step - loss: 0.2156 - accuracy: 0.9261 - val_loss: 0.2331 - val_accuracy: 0.9208\n" - ] - } - ], - "source": [ - "history = model_A.fit(X_train_A, y_train_A, epochs=20,\n", - " validation_data=(X_valid_A, y_valid_A))" - ] - }, - { - "cell_type": "code", - "execution_count": 55, - "metadata": {}, - "outputs": [], - "source": [ - "model_A.save(\"my_model_A.h5\")" - ] - }, - { - "cell_type": "code", - "execution_count": 56, - "metadata": {}, - "outputs": [], - "source": [ - "model_B = keras.models.Sequential()\n", - "model_B.add(keras.layers.Flatten(input_shape=[28, 28]))\n", - "for n_hidden in (300, 100, 50, 50, 50):\n", - " model_B.add(keras.layers.Dense(n_hidden, activation=\"selu\"))\n", - "model_B.add(keras.layers.Dense(1, activation=\"sigmoid\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 57, - "metadata": {}, - "outputs": [], - "source": [ - "model_B.compile(loss=\"binary_crossentropy\",\n", - " optimizer=keras.optimizers.SGD(lr=1e-3),\n", - " metrics=[\"accuracy\"])" - ] - }, - { - "cell_type": "code", - "execution_count": 58, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Epoch 1/20\n", - "7/7 [==============================] - 0s 42ms/step - loss: 0.9573 - accuracy: 0.4650 - val_loss: 0.6314 - val_accuracy: 0.6004\n", - "Epoch 2/20\n", - "7/7 [==============================] - 0s 16ms/step - loss: 0.5692 - accuracy: 0.7450 - val_loss: 0.4784 - val_accuracy: 0.8529\n", - "Epoch 3/20\n", - "7/7 [==============================] - 0s 16ms/step - loss: 0.4503 - accuracy: 0.8650 - val_loss: 0.4102 - val_accuracy: 0.8945\n", - "Epoch 4/20\n", - "7/7 [==============================] - 0s 16ms/step - loss: 0.3879 - accuracy: 0.8950 - val_loss: 0.3647 - val_accuracy: 0.9178\n", - "Epoch 5/20\n", - "7/7 [==============================] - 0s 17ms/step - loss: 0.3435 - accuracy: 0.9250 - val_loss: 0.3300 - val_accuracy: 0.9320\n", - "Epoch 6/20\n", - "7/7 [==============================] - 0s 16ms/step - loss: 0.3081 - accuracy: 0.9300 - val_loss: 0.3019 - val_accuracy: 0.9402\n", - "Epoch 7/20\n", - "7/7 [==============================] - 0s 15ms/step - loss: 0.2800 - accuracy: 0.9350 - val_loss: 0.2804 - val_accuracy: 0.9422\n", - "Epoch 8/20\n", - "7/7 [==============================] - 0s 16ms/step - loss: 0.2564 - accuracy: 0.9450 - val_loss: 0.2606 - val_accuracy: 0.9473\n", - "Epoch 9/20\n", - "7/7 [==============================] - 0s 17ms/step - loss: 0.2362 - accuracy: 0.9550 - val_loss: 0.2428 - val_accuracy: 0.9523\n", - "Epoch 10/20\n", - "7/7 [==============================] - 0s 16ms/step - loss: 0.2188 - accuracy: 0.9600 - val_loss: 0.2281 - val_accuracy: 0.9544\n", - "Epoch 11/20\n", - "7/7 [==============================] - 0s 18ms/step - loss: 0.2036 - accuracy: 0.9700 - val_loss: 0.2150 - val_accuracy: 0.9584\n", - "Epoch 12/20\n", - "7/7 [==============================] - 0s 16ms/step - loss: 0.1898 - accuracy: 0.9700 - val_loss: 0.2036 - val_accuracy: 0.9584\n", - "Epoch 13/20\n", - "7/7 [==============================] - 0s 17ms/step - loss: 0.1773 - accuracy: 0.9750 - val_loss: 0.1931 - val_accuracy: 0.9615\n", - "Epoch 14/20\n", - "7/7 [==============================] - 0s 16ms/step - loss: 0.1668 - accuracy: 0.9800 - val_loss: 0.1838 - val_accuracy: 0.9635\n", - "Epoch 15/20\n", - "7/7 [==============================] - 0s 16ms/step - loss: 0.1570 - accuracy: 0.9900 - val_loss: 0.1746 - val_accuracy: 0.9686\n", - "Epoch 16/20\n", - "7/7 [==============================] - 0s 16ms/step - loss: 0.1481 - accuracy: 0.9900 - val_loss: 0.1674 - val_accuracy: 0.9686\n", - "Epoch 17/20\n", - "7/7 [==============================] - 0s 16ms/step - loss: 0.1406 - accuracy: 0.9900 - val_loss: 0.1604 - val_accuracy: 0.9706\n", - "Epoch 18/20\n", - "7/7 [==============================] - 0s 16ms/step - loss: 0.1334 - accuracy: 0.9900 - val_loss: 0.1539 - val_accuracy: 0.9706\n", - "Epoch 19/20\n", - "7/7 [==============================] - 0s 18ms/step - loss: 0.1268 - accuracy: 0.9900 - val_loss: 0.1482 - val_accuracy: 0.9716\n", - "Epoch 20/20\n", - "7/7 [==============================] - 0s 16ms/step - loss: 0.1208 - accuracy: 0.9900 - val_loss: 0.1431 - val_accuracy: 0.9716\n" - ] - } - ], - "source": [ - "history = model_B.fit(X_train_B, y_train_B, epochs=20,\n", - " validation_data=(X_valid_B, y_valid_B))" - ] - }, - { - "cell_type": "code", - "execution_count": 59, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Model: \"sequential_5\"\n", - "_________________________________________________________________\n", - "Layer (type) Output Shape Param # \n", - "=================================================================\n", - "flatten_5 (Flatten) (None, 784) 0 \n", - "_________________________________________________________________\n", - "batch_normalization_3 (Batch (None, 784) 3136 \n", - "_________________________________________________________________\n", - "dense_215 (Dense) (None, 300) 235200 \n", - "_________________________________________________________________\n", - "batch_normalization_4 (Batch (None, 300) 1200 \n", - "_________________________________________________________________\n", - "activation (Activation) (None, 300) 0 \n", - "_________________________________________________________________\n", - "dense_216 (Dense) (None, 100) 30000 \n", - "_________________________________________________________________\n", - "batch_normalization_5 (Batch (None, 100) 400 \n", - "_________________________________________________________________\n", - "activation_1 (Activation) (None, 100) 0 \n", - "_________________________________________________________________\n", - "dense_217 (Dense) (None, 10) 1010 \n", - "=================================================================\n", - "Total params: 270,946\n", - "Trainable params: 268,578\n", - "Non-trainable params: 2,368\n", - "_________________________________________________________________\n" - ] - } - ], - "source": [ - "model.summary()" - ] - }, - { - "cell_type": "code", - "execution_count": 60, - "metadata": {}, - "outputs": [], - "source": [ - "model_A = keras.models.load_model(\"my_model_A.h5\")\n", - "model_B_on_A = keras.models.Sequential(model_A.layers[:-1])\n", - "model_B_on_A.add(keras.layers.Dense(1, activation=\"sigmoid\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 61, - "metadata": {}, - "outputs": [], - "source": [ - "model_A_clone = keras.models.clone_model(model_A)\n", - "model_A_clone.set_weights(model_A.get_weights())" - ] - }, - { - "cell_type": "code", - "execution_count": 62, - "metadata": {}, - "outputs": [], - "source": [ - "for layer in model_B_on_A.layers[:-1]:\n", - " layer.trainable = False\n", - "\n", - "model_B_on_A.compile(loss=\"binary_crossentropy\",\n", - " optimizer=keras.optimizers.SGD(lr=1e-3),\n", - " metrics=[\"accuracy\"])" - ] - }, - { - "cell_type": "code", - "execution_count": 63, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Epoch 1/4\n", - "7/7 [==============================] - 0s 39ms/step - loss: 0.5803 - accuracy: 0.6500 - val_loss: 0.5842 - val_accuracy: 0.6329\n", - "Epoch 2/4\n", - "7/7 [==============================] - 0s 16ms/step - loss: 0.5436 - accuracy: 0.6800 - val_loss: 0.5466 - val_accuracy: 0.6724\n", - "Epoch 3/4\n", - "7/7 [==============================] - 0s 16ms/step - loss: 0.5066 - accuracy: 0.7300 - val_loss: 0.5144 - val_accuracy: 0.7099\n", - "Epoch 4/4\n", - "7/7 [==============================] - 0s 16ms/step - loss: 0.4749 - accuracy: 0.7500 - val_loss: 0.4855 - val_accuracy: 0.7312\n", - "Epoch 1/16\n", - "7/7 [==============================] - 0s 41ms/step - loss: 0.3964 - accuracy: 0.8100 - val_loss: 0.3461 - val_accuracy: 0.8631\n", - "Epoch 2/16\n", - "7/7 [==============================] - 0s 15ms/step - loss: 0.2799 - accuracy: 0.9350 - val_loss: 0.2603 - val_accuracy: 0.9260\n", - "Epoch 3/16\n", - "7/7 [==============================] - 0s 16ms/step - loss: 0.2083 - accuracy: 0.9650 - val_loss: 0.2110 - val_accuracy: 0.9544\n", - "Epoch 4/16\n", - "7/7 [==============================] - 0s 16ms/step - loss: 0.1670 - accuracy: 0.9800 - val_loss: 0.1790 - val_accuracy: 0.9696\n", - "Epoch 5/16\n", - "7/7 [==============================] - 0s 18ms/step - loss: 0.1397 - accuracy: 0.9800 - val_loss: 0.1562 - val_accuracy: 0.9757\n", - "Epoch 6/16\n", - "7/7 [==============================] - 0s 16ms/step - loss: 0.1198 - accuracy: 0.9950 - val_loss: 0.1394 - val_accuracy: 0.9807\n", - "Epoch 7/16\n", - "7/7 [==============================] - 0s 16ms/step - loss: 0.1051 - accuracy: 0.9950 - val_loss: 0.1267 - val_accuracy: 0.9838\n", - "Epoch 8/16\n", - "7/7 [==============================] - 0s 16ms/step - loss: 0.0938 - accuracy: 0.9950 - val_loss: 0.1164 - val_accuracy: 0.9858\n", - "Epoch 9/16\n", - "7/7 [==============================] - 0s 15ms/step - loss: 0.0848 - accuracy: 1.0000 - val_loss: 0.1067 - val_accuracy: 0.9888\n", - "Epoch 10/16\n", - "7/7 [==============================] - 0s 16ms/step - loss: 0.0763 - accuracy: 1.0000 - val_loss: 0.1001 - val_accuracy: 0.9899\n", - "Epoch 11/16\n", - "7/7 [==============================] - 0s 15ms/step - loss: 0.0705 - accuracy: 1.0000 - val_loss: 0.0941 - val_accuracy: 0.9899\n", - "Epoch 12/16\n", - "7/7 [==============================] - 0s 15ms/step - loss: 0.0650 - accuracy: 1.0000 - val_loss: 0.0889 - val_accuracy: 0.9899\n", - "Epoch 13/16\n", - "7/7 [==============================] - 0s 17ms/step - loss: 0.0603 - accuracy: 1.0000 - val_loss: 0.0840 - val_accuracy: 0.9899\n", - "Epoch 14/16\n", - "7/7 [==============================] - 0s 18ms/step - loss: 0.0560 - accuracy: 1.0000 - val_loss: 0.0804 - val_accuracy: 0.9899\n", - "Epoch 15/16\n", - "7/7 [==============================] - 0s 18ms/step - loss: 0.0526 - accuracy: 1.0000 - val_loss: 0.0770 - val_accuracy: 0.9899\n", - "Epoch 16/16\n", - "7/7 [==============================] - 0s 18ms/step - loss: 0.0497 - accuracy: 1.0000 - val_loss: 0.0740 - val_accuracy: 0.9899\n" - ] - } - ], - "source": [ - "history = model_B_on_A.fit(X_train_B, y_train_B, epochs=4,\n", - " validation_data=(X_valid_B, y_valid_B))\n", - "\n", - "for layer in model_B_on_A.layers[:-1]:\n", - " layer.trainable = True\n", - "\n", - "model_B_on_A.compile(loss=\"binary_crossentropy\",\n", - " optimizer=keras.optimizers.SGD(lr=1e-3),\n", - " metrics=[\"accuracy\"])\n", - "history = model_B_on_A.fit(X_train_B, y_train_B, epochs=16,\n", - " validation_data=(X_valid_B, y_valid_B))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "마지막 점수는 어떤가요?" - ] - }, - { - "cell_type": "code", - "execution_count": 64, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "63/63 [==============================] - 0s 2ms/step - loss: 0.1408 - accuracy: 0.9705\n" - ] - }, - { - "data": { - "text/plain": [ - "[0.1408407837152481, 0.9704999923706055]" - ] - }, - "execution_count": 64, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "model_B.evaluate(X_test_B, y_test_B)" - ] - }, - { - "cell_type": "code", - "execution_count": 65, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "63/63 [==============================] - 0s 2ms/step - loss: 0.0683 - accuracy: 0.9930\n" - ] - }, - { - "data": { - "text/plain": [ - "[0.0683005154132843, 0.9929999709129333]" - ] - }, - "execution_count": 65, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "model_B_on_A.evaluate(X_test_B, y_test_B)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "훌륭하네요! 꽤 많은 정보를 전달했습니다: 오차율이 4배나 줄었네요!" - ] - }, - { - "cell_type": "code", - "execution_count": 66, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "4.066666666666663" - ] - }, - "execution_count": 66, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "(100 - 96.95) / (100 - 99.25)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# 고속 옵티마이저" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## 모멘텀 옵티마이저" - ] - }, - { - "cell_type": "code", - "execution_count": 67, - "metadata": {}, - "outputs": [], - "source": [ - "optimizer = keras.optimizers.SGD(lr=0.001, momentum=0.9)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## 네스테로프 가속 경사" - ] - }, - { - "cell_type": "code", - "execution_count": 68, - "metadata": {}, - "outputs": [], - "source": [ - "optimizer = keras.optimizers.SGD(lr=0.001, momentum=0.9, nesterov=True)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## AdaGrad" - ] - }, - { - "cell_type": "code", - "execution_count": 69, - "metadata": {}, - "outputs": [], - "source": [ - "optimizer = keras.optimizers.Adagrad(lr=0.001)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## RMSProp" - ] - }, - { - "cell_type": "code", - "execution_count": 70, - "metadata": {}, - "outputs": [], - "source": [ - "optimizer = keras.optimizers.RMSprop(lr=0.001, rho=0.9)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Adam 옵티마이저" - ] - }, - { - "cell_type": "code", - "execution_count": 71, - "metadata": {}, - "outputs": [], - "source": [ - "optimizer = keras.optimizers.Adam(lr=0.001, beta_1=0.9, beta_2=0.999)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Adamax 옵티마이저" - ] - }, - { - "cell_type": "code", - "execution_count": 72, - "metadata": {}, - "outputs": [], - "source": [ - "optimizer = keras.optimizers.Adamax(lr=0.001, beta_1=0.9, beta_2=0.999)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Nadam 옵티마이저" - ] - }, - { - "cell_type": "code", - "execution_count": 73, - "metadata": {}, - "outputs": [], - "source": [ - "optimizer = keras.optimizers.Nadam(lr=0.001, beta_1=0.9, beta_2=0.999)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## 학습률 스케줄링" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### 거듭제곱 스케줄링" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "```lr = lr0 / (1 + steps / s)**c```\n", - "* 케라스는 `c=1`과 `s = 1 / decay`을 사용합니다" - ] - }, - { - "cell_type": "code", - "execution_count": 74, - "metadata": {}, - "outputs": [], - "source": [ - "optimizer = keras.optimizers.SGD(lr=0.01, decay=1e-4)" - ] - }, - { - "cell_type": "code", - "execution_count": 75, - "metadata": {}, - "outputs": [], - "source": [ - "model = keras.models.Sequential([\n", - " keras.layers.Flatten(input_shape=[28, 28]),\n", - " keras.layers.Dense(300, activation=\"selu\", kernel_initializer=\"lecun_normal\"),\n", - " keras.layers.Dense(100, activation=\"selu\", kernel_initializer=\"lecun_normal\"),\n", - " keras.layers.Dense(10, activation=\"softmax\")\n", - "])\n", - "model.compile(loss=\"sparse_categorical_crossentropy\", optimizer=optimizer, metrics=[\"accuracy\"])" - ] - }, - { - "cell_type": "code", - "execution_count": 76, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Epoch 1/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.4855 - accuracy: 0.8303 - val_loss: 0.4029 - val_accuracy: 0.8604\n", - "Epoch 2/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.3781 - accuracy: 0.8658 - val_loss: 0.3716 - val_accuracy: 0.8720\n", - "Epoch 3/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.3457 - accuracy: 0.8770 - val_loss: 0.3749 - val_accuracy: 0.8742\n", - "Epoch 4/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.3250 - accuracy: 0.8830 - val_loss: 0.3501 - val_accuracy: 0.8800\n", - "Epoch 5/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.3101 - accuracy: 0.8892 - val_loss: 0.3447 - val_accuracy: 0.8794\n", - "Epoch 6/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2966 - accuracy: 0.8935 - val_loss: 0.3412 - val_accuracy: 0.8828\n", - "Epoch 7/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2867 - accuracy: 0.8974 - val_loss: 0.3355 - val_accuracy: 0.8864\n", - "Epoch 8/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2777 - accuracy: 0.9010 - val_loss: 0.3408 - val_accuracy: 0.8834\n", - "Epoch 9/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2698 - accuracy: 0.9020 - val_loss: 0.3289 - val_accuracy: 0.8880\n", - "Epoch 10/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2628 - accuracy: 0.9048 - val_loss: 0.3259 - val_accuracy: 0.8880\n", - "Epoch 11/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2571 - accuracy: 0.9080 - val_loss: 0.3265 - val_accuracy: 0.8876\n", - "Epoch 12/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2512 - accuracy: 0.9098 - val_loss: 0.3331 - val_accuracy: 0.8830\n", - "Epoch 13/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2461 - accuracy: 0.9127 - val_loss: 0.3253 - val_accuracy: 0.8892\n", - "Epoch 14/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2422 - accuracy: 0.9135 - val_loss: 0.3286 - val_accuracy: 0.8900\n", - "Epoch 15/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2374 - accuracy: 0.9152 - val_loss: 0.3241 - val_accuracy: 0.8880\n", - "Epoch 16/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2335 - accuracy: 0.9170 - val_loss: 0.3202 - val_accuracy: 0.8904\n", - "Epoch 17/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2299 - accuracy: 0.9181 - val_loss: 0.3233 - val_accuracy: 0.8912\n", - "Epoch 18/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2262 - accuracy: 0.9200 - val_loss: 0.3188 - val_accuracy: 0.8932\n", - "Epoch 19/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2232 - accuracy: 0.9210 - val_loss: 0.3227 - val_accuracy: 0.8902\n", - "Epoch 20/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2199 - accuracy: 0.9221 - val_loss: 0.3207 - val_accuracy: 0.8912\n", - "Epoch 21/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2168 - accuracy: 0.9236 - val_loss: 0.3206 - val_accuracy: 0.8918\n", - "Epoch 22/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2142 - accuracy: 0.9245 - val_loss: 0.3179 - val_accuracy: 0.8942\n", - "Epoch 23/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2116 - accuracy: 0.9250 - val_loss: 0.3193 - val_accuracy: 0.8908\n", - "Epoch 24/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2088 - accuracy: 0.9266 - val_loss: 0.3212 - val_accuracy: 0.8886\n", - "Epoch 25/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2068 - accuracy: 0.9266 - val_loss: 0.3211 - val_accuracy: 0.8926\n" - ] - } - ], - "source": [ - "n_epochs = 25\n", - "history = model.fit(X_train_scaled, y_train, epochs=n_epochs,\n", - " validation_data=(X_valid_scaled, y_valid))" - ] - }, - { - "cell_type": "code", - "execution_count": 77, - "metadata": {}, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZgAAAEeCAYAAAC30gOQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3deXxU1f3/8dcnCxACYZclsqnIKou4glbqbr8uqNV+W9e6YO3Xr/1p1arf2qKttVZtra1r1eJasRVERaUqpgoqoiKbyKIsEjYBWQJJCOHz++Pe4DDMJBPIzCSZ9/PxmEfm3nPunc9cYz6ce849x9wdERGRupaV7gBERKRxUoIREZGkUIIREZGkUIIREZGkUIIREZGkUIIREZGkUIIRaUDMbImZXZeE837fzGr1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JJCCUZERJJCCUakkQrXZvl+uuOQzKUEI5IEZjYm/AMf/fog3bGJpEpGrwcjkmRvEqwtFGlbOgIRSQe1YESSp9zdV0W91sPO21dXmdnEcAndpWZ2fuTBZnaQmb1pZqVmtj5sFbWKqnORmc0Oly9ebWZPRMXQ1sz+GS4J/mX0Z4gkkxKMSPrcCrwEDCZYc+fJcJXIqtl2JxHMZXUYcCYwjIhlis3sCuBh4O/AQILlFOZEfcavgAkEM/mOBR43s27J+0oi39JcZCJJYGZjgPMJJj6MdL+7/8LMHHjU3S+POOZNYJW7n29mlwN3A/u6++awfATwNtDL3ReZ2XLgaXePubx3+Bm/d/ebwu0cggX2Rrn703X4dUViUh+MSPK8A4yK2rch4v37UWXvA/8Vvu9LMJ175IJU7wE7gH5mtolgtdG3aohhVtUbd99uZl8D+yQWvsjeUYIRSZ6t7r4oCeetzW2HiqhtR7fGJUX0iyaSPkfE2J4Xvp8HHBS13PAwgv9n57n7GqAYOC7pUYrsIbVgRJKnqZl1itpX6e5fh+/PMrPpBItPfZ8gWRwelj1DMAjgSTP7FdCGoEN/XESr6HbgT2a2GpgINAeOc/d7kvWFRGpDCUYkeY4nWNkxUjGwb/h+NHA2wdLCXwM/dvfpAO6+1cxOAu4FPiQYLDAB+FnVidz9QTPbBvwcuBNYD7yarC8jUlsaRSaSBuEIr3Pc/V/pjkUkWdQHIyIiSaEEIyIiSaFbZCIikhRqwYiISFIowYiISFIowYiISFIowYiISFIowYiISFL8f0AK1QjupA5nAAAAAElFTkSuQmCC\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "learning_rate = 0.01\n", - "decay = 1e-4\n", - "batch_size = 32\n", - "n_steps_per_epoch = len(X_train) // batch_size\n", - "epochs = np.arange(n_epochs)\n", - "lrs = learning_rate / (1 + decay * epochs * n_steps_per_epoch)\n", - "\n", - "plt.plot(epochs, lrs, \"o-\")\n", - "plt.axis([0, n_epochs - 1, 0, 0.01])\n", - "plt.xlabel(\"Epoch\")\n", - "plt.ylabel(\"Learning Rate\")\n", - "plt.title(\"Power Scheduling\", fontsize=14)\n", - "plt.grid(True)\n", - "plt.show()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### 지수 기반 스케줄링" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "```lr = lr0 * 0.1**(epoch / s)```" - ] - }, - { - "cell_type": "code", - "execution_count": 78, - "metadata": {}, - "outputs": [], - "source": [ - "def exponential_decay_fn(epoch):\n", - " return 0.01 * 0.1**(epoch / 20)" - ] - }, - { - "cell_type": "code", - "execution_count": 79, - "metadata": {}, - "outputs": [], - "source": [ - "def exponential_decay(lr0, s):\n", - " def exponential_decay_fn(epoch):\n", - " return lr0 * 0.1**(epoch / s)\n", - " return exponential_decay_fn\n", - "\n", - "exponential_decay_fn = exponential_decay(lr0=0.01, s=20)" - ] - }, - { - "cell_type": "code", - "execution_count": 80, - "metadata": {}, - "outputs": [], - "source": [ - "model = keras.models.Sequential([\n", - " keras.layers.Flatten(input_shape=[28, 28]),\n", - " keras.layers.Dense(300, activation=\"selu\", kernel_initializer=\"lecun_normal\"),\n", - " keras.layers.Dense(100, activation=\"selu\", kernel_initializer=\"lecun_normal\"),\n", - " keras.layers.Dense(10, activation=\"softmax\")\n", - "])\n", - "model.compile(loss=\"sparse_categorical_crossentropy\", optimizer=\"nadam\", metrics=[\"accuracy\"])\n", - "n_epochs = 25" - ] - }, - { - "cell_type": "code", - "execution_count": 81, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Epoch 1/25\n", - "1719/1719 [==============================] - 8s 4ms/step - loss: 0.8717 - accuracy: 0.7511 - val_loss: 0.9296 - val_accuracy: 0.7502\n", - "Epoch 2/25\n", - "1719/1719 [==============================] - 7s 4ms/step - loss: 0.7778 - accuracy: 0.7756 - val_loss: 0.6632 - val_accuracy: 0.8124\n", - "Epoch 3/25\n", - "1719/1719 [==============================] - 8s 4ms/step - loss: 0.6531 - accuracy: 0.8051 - val_loss: 0.7064 - val_accuracy: 0.7834\n", - "Epoch 4/25\n", - "1719/1719 [==============================] - 7s 4ms/step - loss: 0.5903 - accuracy: 0.8228 - val_loss: 0.5971 - val_accuracy: 0.8258\n", - "Epoch 5/25\n", - "1719/1719 [==============================] - 7s 4ms/step - loss: 0.5431 - accuracy: 0.8379 - val_loss: 0.5389 - val_accuracy: 0.8488\n", - "Epoch 6/25\n", - "1719/1719 [==============================] - 7s 4ms/step - loss: 0.5012 - accuracy: 0.8489 - val_loss: 0.5297 - val_accuracy: 0.8562\n", - "Epoch 7/25\n", - "1719/1719 [==============================] - 7s 4ms/step - loss: 0.4695 - accuracy: 0.8578 - val_loss: 0.5339 - val_accuracy: 0.8446\n", - "Epoch 8/25\n", - "1719/1719 [==============================] - 7s 4ms/step - loss: 0.4328 - accuracy: 0.8667 - val_loss: 0.7335 - val_accuracy: 0.8280\n", - "Epoch 9/25\n", - "1719/1719 [==============================] - 7s 4ms/step - loss: 0.4036 - accuracy: 0.8750 - val_loss: 0.5740 - val_accuracy: 0.8618\n", - "Epoch 10/25\n", - "1719/1719 [==============================] - 7s 4ms/step - loss: 0.3857 - accuracy: 0.8807 - val_loss: 0.4759 - val_accuracy: 0.8672\n", - "Epoch 11/25\n", - "1719/1719 [==============================] - 7s 4ms/step - loss: 0.3601 - accuracy: 0.8864 - val_loss: 0.4779 - val_accuracy: 0.8630\n", - "Epoch 12/25\n", - "1719/1719 [==============================] - 7s 4ms/step - loss: 0.3322 - accuracy: 0.8924 - val_loss: 0.4897 - val_accuracy: 0.8636\n", - "Epoch 13/25\n", - "1719/1719 [==============================] - 7s 4ms/step - loss: 0.3204 - accuracy: 0.8987 - val_loss: 0.4892 - val_accuracy: 0.8690\n", - "Epoch 14/25\n", - "1719/1719 [==============================] - 7s 4ms/step - loss: 0.2968 - accuracy: 0.9039 - val_loss: 0.4638 - val_accuracy: 0.8734\n", - "Epoch 15/25\n", - "1719/1719 [==============================] - 7s 4ms/step - loss: 0.2779 - accuracy: 0.9104 - val_loss: 0.5087 - val_accuracy: 0.8758\n", - "Epoch 16/25\n", - "1719/1719 [==============================] - 7s 4ms/step - loss: 0.2632 - accuracy: 0.9150 - val_loss: 0.4718 - val_accuracy: 0.8770\n", - "Epoch 17/25\n", - "1719/1719 [==============================] - 7s 4ms/step - loss: 0.2479 - accuracy: 0.9191 - val_loss: 0.5167 - val_accuracy: 0.8774\n", - "Epoch 18/25\n", - "1719/1719 [==============================] - 7s 4ms/step - loss: 0.2369 - accuracy: 0.9243 - val_loss: 0.4961 - val_accuracy: 0.8786\n", - "Epoch 19/25\n", - "1719/1719 [==============================] - 7s 4ms/step - loss: 0.2202 - accuracy: 0.9292 - val_loss: 0.5280 - val_accuracy: 0.8834\n", - "Epoch 20/25\n", - "1719/1719 [==============================] - 7s 4ms/step - loss: 0.2113 - accuracy: 0.9312 - val_loss: 0.5491 - val_accuracy: 0.8758\n", - "Epoch 21/25\n", - "1719/1719 [==============================] - 7s 4ms/step - loss: 0.1985 - accuracy: 0.9363 - val_loss: 0.5469 - val_accuracy: 0.8790\n", - "Epoch 22/25\n", - "1719/1719 [==============================] - 7s 4ms/step - loss: 0.1878 - accuracy: 0.9393 - val_loss: 0.5512 - val_accuracy: 0.8822\n", - "Epoch 23/25\n", - "1719/1719 [==============================] - 7s 4ms/step - loss: 0.1781 - accuracy: 0.9425 - val_loss: 0.5817 - val_accuracy: 0.8848\n", - "Epoch 24/25\n", - "1719/1719 [==============================] - 8s 4ms/step - loss: 0.1709 - accuracy: 0.9450 - val_loss: 0.5742 - val_accuracy: 0.8818\n", - "Epoch 25/25\n", - "1719/1719 [==============================] - 7s 4ms/step - loss: 0.1638 - accuracy: 0.9484 - val_loss: 0.6042 - val_accuracy: 0.8842\n" - ] - } - ], - "source": [ - "lr_scheduler = keras.callbacks.LearningRateScheduler(exponential_decay_fn)\n", - "history = model.fit(X_train_scaled, y_train, epochs=n_epochs,\n", - " validation_data=(X_valid_scaled, y_valid),\n", - " callbacks=[lr_scheduler])" - ] - }, - { - "cell_type": "code", - "execution_count": 82, - "metadata": {}, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZgAAAEeCAYAAAC30gOQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3deXxU1f3/8dcnJIFAgBBAkCCbIsqOiDuKW7GtVhRrq9alrWJt/dnWrVq1VVurSGnValW+7kvrCqKioBajoKKyKIsILoissgcCgbB8fn/cGxyGmWSCmZkk834+HveRmXvOvfO5lzCf3HvOPcfcHRERkZqWle4ARESkflKCERGRpFCCERGRpFCCERGRpFCCERGRpFCCERGRpFCCEUkBM7vAzEqruU2xmd2drJjCz/jKzK5Mwn7PMLNqPQMRfY725JxJ7aIEI0llZo+YmcdYpqQ7tmQJj++MqNVPA12S8FkXmtkMMys1sxIzm2lmf63pz0mTpJwzSZ3sdAcgGeEN4NyodeXpCCRd3L0MKKvJfZrZL4C7gN8D/wNygJ7A4TX5OemSjHMmqaUrGEmFLe6+PGpZA2Bmx5jZVjMbVFHZzC42s/Vm1iV8X2xm95nZnWa2NlxGmFlWxDYtzOzRsKzMzN4wsx4R5ReEf+Ufb2azzWyjmb1pZp0jAzWzU8xsmpltNrMFZnaLmeVGlH9lZteb2f1hjIvN7KrI8vDls+GVzFeRnx9Rb18zG2tmy8NYppvZydU8rz8CRrv7/e7+ubvPdfdn3f3yqGP6gZm9H56X1Wb2kpk1iqjSKN7xhNs3N7NRZrbCzDaY2VtmdnBUnfPMbKGZbTKzl4E2UeU3mtnsqHWV3gKLcc5uDP/tfmpmX4SxvGBmrSLqZJvZPyN+T/5pZveaWXHVp1NqmhKMpJW7vwWMAB4Pk8QBwD+A/+fuX0ZUPYfg9/Vw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Rn+GSDIpwYikz03Ai0Bfgjl3HgtniawYbXcCwVhWhwCnAUcQMU2xmV0M3A88DPQmmE5hdtRn/AkYSzCS79PAQ2bWIXmHJPItjUUmkgRm9gjwM4KBDyPd4+5/MDMHHnD3iyK2eQNY7u4/M7OLgL8D7d19Q1g+CHgT6Orun5vZYuAJd485vXf4Gbe5+7Xh+2yCCfaGufsTNXi4IjGpDUYked4GhkWtWxfx+r2osveAH4avDyQYzj1yQqp3gR1AdzNbTzDb6P+qiGFmxQt332ZmK4G9Egtf5LtRghFJnk3u/nkS9lud2w5bo947ujUuKaJfNJH0OSzG+7nh67lAr6jpho8g+D87191XAEuA45Mepcge0hWMSPI0NLO2Ueu2u/vK8PXpZvYhweRTZxAki0PDsicJOgE8ZmZ/AloQNOiPjrgqugX4p5l9A4wDGgPHu/vIZB2QSHUowYgkzwkEMztGWgK0D1/fCAwlmFp4JfBzd/8QwN03mdlg4A7gA4LOAmOB31bsyN3vNbNy4ApgOLAGeCVZByNSXepFJpIGYQ+vH7v7c+mORSRZ1AYjIiJJoQQjIiJJoVtkIiKSFLqCERGRpFCCERGRpFCCERGRpFCCERGRpFCCERGRpPj/9dcHvsIyO2UAAAAASUVORK5CYII=\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "plt.plot(history.epoch, history.history[\"lr\"], \"o-\")\n", - "plt.axis([0, n_epochs - 1, 0, 0.011])\n", - "plt.xlabel(\"Epoch\")\n", - "plt.ylabel(\"Learning Rate\")\n", - "plt.title(\"Exponential Scheduling\", fontsize=14)\n", - "plt.grid(True)\n", - "plt.show()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "이 스케줄 함수는 두 번째 매개변수로 현재 학습률을 받을 수 있습니다:" - ] - }, - { - "cell_type": "code", - "execution_count": 83, - "metadata": {}, - "outputs": [], - "source": [ - "def exponential_decay_fn(epoch, lr):\n", - " return lr * 0.1**(1 / 20)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "에포크가 아니라 반복마다 학습률을 업데이트하려면 사용자 정의 콜백 클래스를 작성해야 합니다:" - ] - }, - { - "cell_type": "code", - "execution_count": 84, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Epoch 1/25\n", - "1719/1719 [==============================] - 9s 5ms/step - loss: 0.7848 - accuracy: 0.7711 - val_loss: 0.8494 - val_accuracy: 0.7580\n", - "Epoch 2/25\n", - "1719/1719 [==============================] - 9s 5ms/step - loss: 0.6253 - accuracy: 0.8057 - val_loss: 0.7549 - val_accuracy: 0.7640\n", - "Epoch 3/25\n", - "1719/1719 [==============================] - 9s 5ms/step - loss: 0.5786 - accuracy: 0.8196 - val_loss: 0.6209 - val_accuracy: 0.8128\n", - "Epoch 4/25\n", - "1719/1719 [==============================] - 9s 5ms/step - loss: 0.5178 - accuracy: 0.8388 - val_loss: 0.5581 - val_accuracy: 0.8470\n", - "Epoch 5/25\n", - "1719/1719 [==============================] - 9s 5ms/step - loss: 0.4988 - accuracy: 0.8480 - val_loss: 0.5315 - val_accuracy: 0.8428\n", - "Epoch 6/25\n", - "1719/1719 [==============================] - 9s 5ms/step - loss: 0.4408 - accuracy: 0.8641 - val_loss: 0.4676 - val_accuracy: 0.8598\n", - "Epoch 7/25\n", - "1719/1719 [==============================] - 9s 5ms/step - loss: 0.4063 - accuracy: 0.8689 - val_loss: 0.6225 - val_accuracy: 0.8402\n", - "Epoch 8/25\n", - "1719/1719 [==============================] - 9s 5ms/step - loss: 0.3650 - accuracy: 0.8791 - val_loss: 0.4607 - val_accuracy: 0.8638\n", - "Epoch 9/25\n", - "1719/1719 [==============================] - 9s 5ms/step - loss: 0.3442 - accuracy: 0.8854 - val_loss: 0.4588 - val_accuracy: 0.8570\n", - "Epoch 10/25\n", - "1719/1719 [==============================] - 9s 5ms/step - loss: 0.3196 - accuracy: 0.8927 - val_loss: 0.4427 - val_accuracy: 0.8814\n", - "Epoch 11/25\n", - "1719/1719 [==============================] - 9s 5ms/step - loss: 0.2950 - accuracy: 0.8996 - val_loss: 0.4303 - val_accuracy: 0.8810\n", - "Epoch 12/25\n", - "1719/1719 [==============================] - 9s 5ms/step - loss: 0.2699 - accuracy: 0.9077 - val_loss: 0.4377 - val_accuracy: 0.8674\n", - "Epoch 13/25\n", - "1719/1719 [==============================] - 9s 5ms/step - loss: 0.2528 - accuracy: 0.9119 - val_loss: 0.4323 - val_accuracy: 0.8862\n", - "Epoch 14/25\n", - "1719/1719 [==============================] - 9s 5ms/step - loss: 0.2340 - accuracy: 0.9187 - val_loss: 0.4424 - val_accuracy: 0.8794\n", - "Epoch 15/25\n", - "1719/1719 [==============================] - 9s 5ms/step - loss: 0.2159 - accuracy: 0.9236 - val_loss: 0.4204 - val_accuracy: 0.8878\n", - "Epoch 16/25\n", - "1719/1719 [==============================] - 9s 5ms/step - loss: 0.2008 - accuracy: 0.9302 - val_loss: 0.4568 - val_accuracy: 0.8928\n", - "Epoch 17/25\n", - "1719/1719 [==============================] - 9s 5ms/step - loss: 0.1866 - accuracy: 0.9343 - val_loss: 0.4430 - val_accuracy: 0.8920\n", - "Epoch 18/25\n", - "1719/1719 [==============================] - 9s 5ms/step - loss: 0.1738 - accuracy: 0.9395 - val_loss: 0.4850 - val_accuracy: 0.8928\n", - "Epoch 19/25\n", - "1719/1719 [==============================] - 9s 5ms/step - loss: 0.1589 - accuracy: 0.9454 - val_loss: 0.4853 - val_accuracy: 0.8948\n", - "Epoch 20/25\n", - "1719/1719 [==============================] - 9s 5ms/step - loss: 0.1488 - accuracy: 0.9493 - val_loss: 0.4679 - val_accuracy: 0.8890\n", - "Epoch 21/25\n", - "1719/1719 [==============================] - 9s 5ms/step - loss: 0.1392 - accuracy: 0.9526 - val_loss: 0.5147 - val_accuracy: 0.8906\n", - "Epoch 22/25\n", - "1719/1719 [==============================] - 9s 5ms/step - loss: 0.1298 - accuracy: 0.9567 - val_loss: 0.5229 - val_accuracy: 0.8906\n", - "Epoch 23/25\n", - "1719/1719 [==============================] - 9s 5ms/step - loss: 0.1223 - accuracy: 0.9599 - val_loss: 0.5352 - val_accuracy: 0.8884\n", - "Epoch 24/25\n", - "1719/1719 [==============================] - 9s 5ms/step - loss: 0.1117 - accuracy: 0.9631 - val_loss: 0.5800 - val_accuracy: 0.8884\n", - "Epoch 25/25\n", - "1719/1719 [==============================] - 9s 5ms/step - loss: 0.1068 - accuracy: 0.9648 - val_loss: 0.5695 - val_accuracy: 0.8898\n" - ] - } - ], - "source": [ - "K = keras.backend\n", - "\n", - "class ExponentialDecay(keras.callbacks.Callback):\n", - " def __init__(self, s=40000):\n", - " super().__init__()\n", - " self.s = s\n", - "\n", - " def on_batch_begin(self, batch, logs=None):\n", - " # 노트: 에포크마다 `batch` 매개변수가 재설정됩니다\n", - " lr = K.get_value(self.model.optimizer.lr)\n", - " K.set_value(self.model.optimizer.lr, lr * 0.1**(1 / s))\n", - "\n", - " def on_epoch_end(self, epoch, logs=None):\n", - " logs = logs or {}\n", - " logs['lr'] = K.get_value(self.model.optimizer.lr)\n", - "\n", - "model = keras.models.Sequential([\n", - " keras.layers.Flatten(input_shape=[28, 28]),\n", - " keras.layers.Dense(300, activation=\"selu\", kernel_initializer=\"lecun_normal\"),\n", - " keras.layers.Dense(100, activation=\"selu\", kernel_initializer=\"lecun_normal\"),\n", - " keras.layers.Dense(10, activation=\"softmax\")\n", - "])\n", - "lr0 = 0.01\n", - "optimizer = keras.optimizers.Nadam(lr=lr0)\n", - "model.compile(loss=\"sparse_categorical_crossentropy\", optimizer=optimizer, metrics=[\"accuracy\"])\n", - "n_epochs = 25\n", - "\n", - "s = 20 * len(X_train) // 32 # 20 에포크 동안 스텝 횟수 (배치 크기 = 32)\n", - "exp_decay = ExponentialDecay(s)\n", - "history = model.fit(X_train_scaled, y_train, epochs=n_epochs,\n", - " validation_data=(X_valid_scaled, y_valid),\n", - " callbacks=[exp_decay])" - ] - }, - { - "cell_type": "code", - "execution_count": 85, - "metadata": {}, - "outputs": [], - "source": [ - "n_steps = n_epochs * len(X_train) // 32\n", - "steps = np.arange(n_steps)\n", - "lrs = lr0 * 0.1**(steps / s)" - ] - }, - { - "cell_type": "code", - "execution_count": 86, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZgAAAEeCAYAAAC30gOQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nOzdd3wUdfrA8c+T3gNJ6B3pvSkqIGBDPT2xn3gqoof1/Imi53l6tlMPFespYjmxnmJBFPVQDwKCioBIL9JD6AkkJCQEwvP7Yya4LptkE7K7Kc/79ZpXsvP9znefmWzm2Zn5zndEVTHGGGOqWlioAzDGGFM7WYIxxhgTEJZgjDHGBIQlGGOMMQFhCcYYY0xAWIIxxhgTEJZgTI0nIiNFJK+Cy6SLyL8CFZP7HhtFZGwA2r1YRCp0f4H3NqrMNjsWInK/iPw7WO/n4/1VRC4OwfuWu51F5GYR+SxYMQWTJZgaTEQmuf843tMPoY4tUErZUbwPtA3Ae10nIotEJE9EckRkiYj8o6rfJ0QCss18EZGGwB1Ajd52IvKAiCwLQNOvAn1FZFAA2g6piFAHYI7ZN8CVXvOKQhFIqKhqAVBQlW2KyCjgOWAM8D8gEugGnFSV7xMqgdhmZbgO+FFV1wf6jUQkUlUPBvp9qpKqHhCRd4FbgW9DHU9VsiOYmu+Aqm73mrIBRGSwiBwUkSEllUXkehHJFZG27ut0EXlJRJ4VkT3u9ISIhHksU19E3nDLCkTkGxHp6lE+0v2Wf5qILBORfBGZKSJtPAMVkfNEZKGIFIrIBhF5RESiPMo3isi9IjLRjXGLiNzpWe7++oF7JLPR8/096h0nIlNFZLsby08icm4Ft+vvgY9VdaKqrlXVlar6gare7rVO54jIPHe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xRcTuJSCyAiPxTRFaLSIGIbBSRx0Ukxi0bCdyP8/yQkqOgkW5ZsohMEOcxv4UislJELvN8Y3Ee17vMfeztTBFpE8wVNyYi1AEYU1e4Q7xfBixV1QJ3dj4wCsgEuuAMVnkAuA9nYMVuOI8+HuLWz3FHTP4CZ5DEa3BGv+2IM6BiiWjgr27bhcAbbtvDArN2xhzNEowxgXWWxwX3eCAD5/k/AKjqwx51N4rIozhDst+nqgXusodUdXtJJRE5AzgJZ3Tble7s9V7vGwHcrKqr3WWeBP4tIqI2AKEJEjtFZkxgzQZ6udMJwP+Ar0SkBYCIXCwic0Rku5tMngZaltNmb2CbR3Lx5UBJcnFtBaJwjnqMCQpLMMYE1n5VXetO84HrcJ4OOFpETsR57sZ04DycxHEvEFkF73vI6/WRB2VVQdvG+MVOkRkTXAoc/v/27hCngTAIw/A7CgEIHARRg8GSVGFBcABEwym4ABfAwEGaNKluUkMIigSDxRAEEodgEINo1oCZUPE+asX+YtWX+WeTjyqSOgZeV6/JImI0eP+TKsFa9QjsRcThL1OM9K8MGKnXRkTs/jzvUJ3uW8Ac2Ab2I+ICuKcW8JPB+RdgFBFHVPHTB3XN9gBMI+KSWvIfAJuZOev9HOnvHJelXidUE+IbK/Y+XwAAAF5JREFUFQpj4Dwzl5k5B66BG+AJOAWuBuen1B9jC+AdmGTmF3AG3FFVt8/ALbVjkdaGjZaSpBZOMJKkFgaMJKmFASNJamHASJJaGDCSpBYGjCSphQEjSWphwEiSWnwDRp26Epo0p18AAAAASUVORK5CYII=\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "plt.plot(steps, lrs, \"-\", linewidth=2)\n", - "plt.axis([0, n_steps - 1, 0, lr0 * 1.1])\n", - "plt.xlabel(\"Batch\")\n", - "plt.ylabel(\"Learning Rate\")\n", - "plt.title(\"Exponential Scheduling (per batch)\", fontsize=14)\n", - "plt.grid(True)\n", - "plt.show()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### 기간별 고정 스케줄링" - ] - }, - { - "cell_type": "code", - "execution_count": 87, - "metadata": {}, - "outputs": [], - "source": [ - "def piecewise_constant_fn(epoch):\n", - " if epoch < 5:\n", - " return 0.01\n", - " elif epoch < 15:\n", - " return 0.005\n", - " else:\n", - " return 0.001" - ] - }, - { - "cell_type": "code", - "execution_count": 88, - "metadata": {}, - "outputs": [], - "source": [ - "def piecewise_constant(boundaries, values):\n", - " boundaries = np.array([0] + boundaries)\n", - " values = np.array(values)\n", - " def piecewise_constant_fn(epoch):\n", - " return values[np.argmax(boundaries > epoch) - 1]\n", - " return piecewise_constant_fn\n", - "\n", - "piecewise_constant_fn = piecewise_constant([5, 15], [0.01, 0.005, 0.001])" - ] - }, - { - "cell_type": "code", - "execution_count": 89, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Epoch 1/25\n", - "1719/1719 [==============================] - 8s 5ms/step - loss: 0.8830 - accuracy: 0.7497 - val_loss: 1.0209 - val_accuracy: 0.7004\n", - "Epoch 2/25\n", - "1719/1719 [==============================] - 8s 4ms/step - loss: 0.9927 - accuracy: 0.6931 - val_loss: 0.8880 - val_accuracy: 0.7178\n", - "Epoch 3/25\n", - "1719/1719 [==============================] - 8s 4ms/step - loss: 0.8996 - accuracy: 0.7185 - val_loss: 1.0695 - val_accuracy: 0.6856\n", - "Epoch 4/25\n", - "1719/1719 [==============================] - 8s 4ms/step - loss: 0.9428 - accuracy: 0.7076 - val_loss: 0.9724 - val_accuracy: 0.7206\n", - "Epoch 5/25\n", - "1719/1719 [==============================] - 8s 4ms/step - loss: 0.9195 - accuracy: 0.7078 - val_loss: 1.2058 - val_accuracy: 0.7076\n", - "Epoch 6/25\n", - "1719/1719 [==============================] - 8s 4ms/step - loss: 0.6494 - accuracy: 0.7722 - val_loss: 0.6743 - val_accuracy: 0.7360\n", - "Epoch 7/25\n", - "1719/1719 [==============================] - 8s 4ms/step - loss: 0.6002 - accuracy: 0.7929 - val_loss: 0.7192 - val_accuracy: 0.7718\n", - "Epoch 8/25\n", - "1719/1719 [==============================] - 8s 4ms/step - loss: 0.5850 - accuracy: 0.7999 - val_loss: 0.6331 - val_accuracy: 0.7328\n", - "Epoch 9/25\n", - "1719/1719 [==============================] - 8s 4ms/step - loss: 0.5570 - accuracy: 0.8213 - val_loss: 0.6222 - val_accuracy: 0.7668\n", - "Epoch 10/25\n", - "1719/1719 [==============================] - 8s 4ms/step - loss: 0.5511 - accuracy: 0.8165 - val_loss: 0.6102 - val_accuracy: 0.8204\n", - "Epoch 11/25\n", - "1719/1719 [==============================] - 8s 4ms/step - loss: 0.5360 - accuracy: 0.8182 - val_loss: 0.6345 - val_accuracy: 0.8292\n", - "Epoch 12/25\n", - "1719/1719 [==============================] - 7s 4ms/step - loss: 0.5291 - accuracy: 0.8363 - val_loss: 0.6106 - val_accuracy: 0.8334\n", - "Epoch 13/25\n", - "1719/1719 [==============================] - 8s 4ms/step - loss: 0.5104 - accuracy: 0.8400 - val_loss: 0.6339 - val_accuracy: 0.8244\n", - "Epoch 14/25\n", - "1719/1719 [==============================] - 8s 4ms/step - loss: 0.4812 - accuracy: 0.8557 - val_loss: 0.6163 - val_accuracy: 0.7798\n", - "Epoch 15/25\n", - "1719/1719 [==============================] - 8s 4ms/step - loss: 0.4852 - accuracy: 0.8543 - val_loss: 0.8202 - val_accuracy: 0.8402\n", - "Epoch 16/25\n", - "1719/1719 [==============================] - 8s 4ms/step - loss: 0.3420 - accuracy: 0.8901 - val_loss: 0.5218 - val_accuracy: 0.8708\n", - "Epoch 17/25\n", - "1719/1719 [==============================] - 8s 4ms/step - loss: 0.3108 - accuracy: 0.9007 - val_loss: 0.5677 - val_accuracy: 0.8652\n", - "Epoch 18/25\n", - "1719/1719 [==============================] - 8s 4ms/step - loss: 0.2922 - accuracy: 0.9061 - val_loss: 0.6053 - val_accuracy: 0.8768\n", - "Epoch 19/25\n", - "1719/1719 [==============================] - 8s 4ms/step - loss: 0.2756 - accuracy: 0.9134 - val_loss: 0.5898 - val_accuracy: 0.8774\n", - "Epoch 20/25\n", - "1719/1719 [==============================] - 8s 4ms/step - loss: 0.2668 - accuracy: 0.9170 - val_loss: 0.5603 - val_accuracy: 0.8854\n", - "Epoch 21/25\n", - "1719/1719 [==============================] - 8s 4ms/step - loss: 0.2574 - accuracy: 0.9201 - val_loss: 0.5782 - val_accuracy: 0.8792\n", - "Epoch 22/25\n", - "1719/1719 [==============================] - 8s 4ms/step - loss: 0.2518 - accuracy: 0.9230 - val_loss: 0.5958 - val_accuracy: 0.8758\n", - "Epoch 23/25\n", - "1719/1719 [==============================] - 8s 4ms/step - loss: 0.2396 - accuracy: 0.9254 - val_loss: 0.6070 - val_accuracy: 0.8762\n", - "Epoch 24/25\n", - "1719/1719 [==============================] - 8s 4ms/step - loss: 0.2405 - accuracy: 0.9264 - val_loss: 0.6612 - val_accuracy: 0.8788\n", - "Epoch 25/25\n", - "1719/1719 [==============================] - 8s 4ms/step - loss: 0.2244 - accuracy: 0.9291 - val_loss: 0.6447 - val_accuracy: 0.8786\n" - ] - } - ], - "source": [ - "lr_scheduler = keras.callbacks.LearningRateScheduler(piecewise_constant_fn)\n", - "\n", - "model = keras.models.Sequential([\n", - " keras.layers.Flatten(input_shape=[28, 28]),\n", - " keras.layers.Dense(300, activation=\"selu\", kernel_initializer=\"lecun_normal\"),\n", - " keras.layers.Dense(100, activation=\"selu\", kernel_initializer=\"lecun_normal\"),\n", - " keras.layers.Dense(10, activation=\"softmax\")\n", - "])\n", - "model.compile(loss=\"sparse_categorical_crossentropy\", optimizer=\"nadam\", metrics=[\"accuracy\"])\n", - "n_epochs = 25\n", - "history = model.fit(X_train_scaled, y_train, epochs=n_epochs,\n", - " validation_data=(X_valid_scaled, y_valid),\n", - " callbacks=[lr_scheduler])" - ] - }, - { - "cell_type": "code", - "execution_count": 90, - "metadata": {}, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZg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9ngJtl2+OlfSHXkJ3cWSPli6s6TXS7pb0jpJL+VW0Z5lec6QND8vX/y8pBvKyrC3pP/IS4I/Wf4eZrXkAGPWOJ8FbgOmkdbcuTGvEtk92+5dpLms3gy8F3gbJcsUSzoHuB74BnA4aTmFR8ve49PAXNJMvt8Bvi7p1bU7JbNXeC4ysxqQNAf4IGniw1LXRsRfSwrgaxHxkZJ97gaei4gPSvoIcCWwf0SszukzgB8DB0fEbyUtAW6KiIrLe+f3+EJEXJJfDyMtsHd2RNzUj6drVpH7YMxq5yfA2WXbVpY8v7cs7V7gj/Pzw0jTuZcuSPVzYCvwWkkvk1Yb/VEvZXik+0lEbJb0IrBPseKb7RoHGLPaWRsRv63Bcfty2WFT2evAl8atTvyHZtY4f1Dh9WP5+WPA68uWG34b6X/2sYh4AVgKHFfzUprtJLdgzGpnpKRJZdu2RMSL+fnJku4jLT71PlKweEtO+xZpEMCNkj4N7EXq0L+5pFX0eeAfJT0P3AGMAo6LiKtqdUJmfeEAY1Y77ySt7FhqKbB/fn4ZcAppaeEXgT+PiPsAImKtpBOALwO/Ig0WmAt8vPtAEXGdpI3ABcAs4CXgh7U6GbO+8igyswbII7z+T0R8r9FlMasV98GYmVlNOMCYmVlN+BKZmZnVhFswZmZWEw4wZmZWEw4wZmZWEw4wZmZWEw4wZmZWE/8/2PX1htKmypUAAAAASUVORK5CYII=\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "plt.plot(history.epoch, [piecewise_constant_fn(epoch) for epoch in history.epoch], \"o-\")\n", - "plt.axis([0, n_epochs - 1, 0, 0.011])\n", - "plt.xlabel(\"Epoch\")\n", - "plt.ylabel(\"Learning Rate\")\n", - "plt.title(\"Piecewise Constant Scheduling\", fontsize=14)\n", - "plt.grid(True)\n", - "plt.show()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### 성능 기반 스케줄링" - ] - }, - { - "cell_type": "code", - "execution_count": 91, - "metadata": {}, - "outputs": [], - "source": [ - "tf.random.set_seed(42)\n", - "np.random.seed(42)" - ] - }, - { - "cell_type": "code", - "execution_count": 92, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Epoch 1/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.5882 - accuracy: 0.8079 - val_loss: 0.4696 - val_accuracy: 0.8538\n", - "Epoch 2/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.4975 - accuracy: 0.8391 - val_loss: 0.5668 - val_accuracy: 0.8406\n", - "Epoch 3/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.5165 - accuracy: 0.8419 - val_loss: 0.5295 - val_accuracy: 0.8496\n", - "Epoch 4/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.5144 - accuracy: 0.8454 - val_loss: 0.5411 - val_accuracy: 0.8480\n", - "Epoch 5/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.5096 - accuracy: 0.8496 - val_loss: 0.4733 - val_accuracy: 0.8490\n", - "Epoch 6/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.5276 - accuracy: 0.8515 - val_loss: 0.7935 - val_accuracy: 0.8416\n", - "Epoch 7/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.3111 - accuracy: 0.8925 - val_loss: 0.4018 - val_accuracy: 0.8694\n", - "Epoch 8/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2627 - accuracy: 0.9045 - val_loss: 0.4398 - val_accuracy: 0.8712\n", - "Epoch 9/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2391 - accuracy: 0.9116 - val_loss: 0.3970 - val_accuracy: 0.8890\n", - "Epoch 10/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2252 - accuracy: 0.9175 - val_loss: 0.4090 - val_accuracy: 0.8892\n", - "Epoch 11/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2109 - accuracy: 0.9216 - val_loss: 0.4515 - val_accuracy: 0.8844\n", - "Epoch 12/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2034 - accuracy: 0.9247 - val_loss: 0.4781 - val_accuracy: 0.8808\n", - "Epoch 13/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.1892 - accuracy: 0.9294 - val_loss: 0.4578 - val_accuracy: 0.8904\n", - "Epoch 14/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.1850 - accuracy: 0.9307 - val_loss: 0.4853 - val_accuracy: 0.8808\n", - "Epoch 15/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.1252 - accuracy: 0.9504 - val_loss: 0.4423 - val_accuracy: 0.8902\n", - "Epoch 16/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.1088 - accuracy: 0.9579 - val_loss: 0.4663 - val_accuracy: 0.8946\n", - "Epoch 17/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.0992 - accuracy: 0.9620 - val_loss: 0.4872 - val_accuracy: 0.8932\n", - "Epoch 18/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.0938 - accuracy: 0.9641 - val_loss: 0.5198 - val_accuracy: 0.8862\n", - "Epoch 19/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.0883 - accuracy: 0.9660 - val_loss: 0.5091 - val_accuracy: 0.8922\n", - "Epoch 20/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.0668 - accuracy: 0.9752 - val_loss: 0.5149 - val_accuracy: 0.8946\n", - "Epoch 21/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.0608 - accuracy: 0.9779 - val_loss: 0.5289 - val_accuracy: 0.8946\n", - "Epoch 22/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.0575 - accuracy: 0.9786 - val_loss: 0.5383 - val_accuracy: 0.8928\n", - "Epoch 23/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.0538 - accuracy: 0.9801 - val_loss: 0.5474 - val_accuracy: 0.8928\n", - "Epoch 24/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.0506 - accuracy: 0.9818 - val_loss: 0.5690 - val_accuracy: 0.8908\n", - "Epoch 25/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.0425 - accuracy: 0.9858 - val_loss: 0.5667 - val_accuracy: 0.8904\n" - ] - } - ], - "source": [ - "lr_scheduler = keras.callbacks.ReduceLROnPlateau(factor=0.5, patience=5)\n", - "\n", - "model = keras.models.Sequential([\n", - " keras.layers.Flatten(input_shape=[28, 28]),\n", - " keras.layers.Dense(300, activation=\"selu\", kernel_initializer=\"lecun_normal\"),\n", - " keras.layers.Dense(100, activation=\"selu\", kernel_initializer=\"lecun_normal\"),\n", - " keras.layers.Dense(10, activation=\"softmax\")\n", - "])\n", - "optimizer = keras.optimizers.SGD(lr=0.02, momentum=0.9)\n", - "model.compile(loss=\"sparse_categorical_crossentropy\", optimizer=optimizer, metrics=[\"accuracy\"])\n", - "n_epochs = 25\n", - "history = model.fit(X_train_scaled, y_train, epochs=n_epochs,\n", - " validation_data=(X_valid_scaled, y_valid),\n", - " callbacks=[lr_scheduler])" - ] - }, - { - "cell_type": "code", - "execution_count": 93, - "metadata": {}, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAdMAAAEeCAYAAADRiP/HAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nOydeXyU1dXHvz92CKKyiEUFpIWqtIqKK6KocX1fq1ZrrdSlVWnRVuvaWrXuVXy1rbijrStaWpWqFawLRMW1bqi44AYuYMKOAQRCzvvHfYY8mcxknsk6Sc7387mfzHO3586TZM6cc889R2aG4ziO4z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6XAz9IkY6B4741eB/QEin3v2Q63+yUzMEf3hmEYhpEkZpkahmEYRpKYMjUMwzCMJDFlahiGYRhJYsrUMAzDMJLElKlhGIZhJIkpU8MwDMNIElOmhpGFeHFFf5JuOQwjUzBlahgBIyJPecosNL2XbtkMw0gMi2dqGOnhdVxcXD9l6RDEMIzkMcvUMNJDqaoWh6TdcHQKdryIvCoiB0Rks4hc5W8sIqeLyOsiclBEdnvW7jEhda4WkXUiUioiX4jI0yEytBGRv4jIfhH5LLQPwzBix5SpYdRP7gFexvlynQvMF5Fz4GhUkb/jQnf1Bi4F+gFPVjYWkeuAOcAfgTNw4fHWh/RxN/ASLmLJ88CTItKp7i7JMDIX881rGAEjIk/hHMAfCil6XFUni4gC81R1tK/N60Cxql4lIqOB/wE6quo+r/w8YCnQXVU3icg2oEBVb4sggwK/VtXbvePGwF5gjKoWpPByDSMrsDVTw0gPbwFjQvK+8X1+N6TsXeAi7/MpuBBd/uDR7wAVwKkishfoAPxfLTKsrfygqkdEZCdwbGziG4bhx5SpYaSHA6q6qQ7OG89U0+GQY8WWfgwjIeyLYxj1k75hjj/0Pn8InC4iLX3l/XDf5w9V9UtgO/D9OpfSMAzALFPDSBf5InJcSF65Fyga4DIRWQUUAj/BKcY+XtkzuA1K80XkbuBbuM1GC33W7n3AIyLyBfAq0Az4vqo+XFcXZBjZjClTw0gPFwBFIXnbgY7e56nAMGAmsBO4RlVXAajqARH5AfAosBK3keklYELliVR1toiUAbcADwK7gdfq6mIMI9ux3byGUc/wdtperqp/TbcshmHEhq2ZGoZhGEaSmDI1DMMwjCSxaV7DMAzDSBKzTA3DMAwjSUyZGoZhGEaSmDI1DMMwjCQxZWoYhmEYSWLK1DAMwzCS5P8B9/rHGpmRn3sAAAAASUVORK5CYII=\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "plt.plot(history.epoch, history.history[\"lr\"], \"bo-\")\n", - "plt.xlabel(\"Epoch\")\n", - "plt.ylabel(\"Learning Rate\", color='b')\n", - "plt.tick_params('y', colors='b')\n", - "plt.gca().set_xlim(0, n_epochs - 1)\n", - "plt.grid(True)\n", - "\n", - "ax2 = plt.gca().twinx()\n", - "ax2.plot(history.epoch, history.history[\"val_loss\"], \"r^-\")\n", - "ax2.set_ylabel('Validation Loss', color='r')\n", - "ax2.tick_params('y', colors='r')\n", - "\n", - "plt.title(\"Reduce LR on Plateau\", fontsize=14)\n", - "plt.show()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### tf.keras 스케줄러" - ] - }, - { - "cell_type": "code", - "execution_count": 94, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Epoch 1/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.4894 - accuracy: 0.8277 - val_loss: 0.4096 - val_accuracy: 0.8592\n", - "Epoch 2/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.3820 - accuracy: 0.8650 - val_loss: 0.3742 - val_accuracy: 0.8700\n", - "Epoch 3/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.3487 - accuracy: 0.8767 - val_loss: 0.3736 - val_accuracy: 0.8686\n", - "Epoch 4/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.3265 - accuracy: 0.8838 - val_loss: 0.3496 - val_accuracy: 0.8798\n", - "Epoch 5/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.3105 - accuracy: 0.8899 - val_loss: 0.3434 - val_accuracy: 0.8800\n", - "Epoch 6/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2959 - accuracy: 0.8950 - val_loss: 0.3415 - val_accuracy: 0.8808\n", - "Epoch 7/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2855 - accuracy: 0.8987 - val_loss: 0.3354 - val_accuracy: 0.8818\n", - "Epoch 8/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2761 - accuracy: 0.9016 - val_loss: 0.3366 - val_accuracy: 0.8810\n", - "Epoch 9/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2678 - accuracy: 0.9053 - val_loss: 0.3265 - val_accuracy: 0.8852\n", - "Epoch 10/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2608 - accuracy: 0.9069 - val_loss: 0.3240 - val_accuracy: 0.8848\n", - "Epoch 11/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2551 - accuracy: 0.9088 - val_loss: 0.3251 - val_accuracy: 0.8868\n", - "Epoch 12/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2497 - accuracy: 0.9126 - val_loss: 0.3302 - val_accuracy: 0.8810\n", - "Epoch 13/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2449 - accuracy: 0.9136 - val_loss: 0.3218 - val_accuracy: 0.8872\n", - "Epoch 14/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2415 - accuracy: 0.9147 - val_loss: 0.3222 - val_accuracy: 0.8860\n", - "Epoch 15/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2375 - accuracy: 0.9167 - val_loss: 0.3208 - val_accuracy: 0.8876\n", - "Epoch 16/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2343 - accuracy: 0.9179 - val_loss: 0.3185 - val_accuracy: 0.8882\n", - "Epoch 17/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2317 - accuracy: 0.9186 - val_loss: 0.3198 - val_accuracy: 0.8890\n", - "Epoch 18/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2291 - accuracy: 0.9199 - val_loss: 0.3169 - val_accuracy: 0.8904\n", - "Epoch 19/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2269 - accuracy: 0.9206 - val_loss: 0.3197 - val_accuracy: 0.8888\n", - "Epoch 20/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2250 - accuracy: 0.9220 - val_loss: 0.3169 - val_accuracy: 0.8902\n", - "Epoch 21/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2229 - accuracy: 0.9224 - val_loss: 0.3180 - val_accuracy: 0.8904\n", - "Epoch 22/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2216 - accuracy: 0.9225 - val_loss: 0.3163 - val_accuracy: 0.8912\n", - "Epoch 23/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2201 - accuracy: 0.9233 - val_loss: 0.3171 - val_accuracy: 0.8906\n", - "Epoch 24/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2188 - accuracy: 0.9243 - val_loss: 0.3166 - val_accuracy: 0.8908\n", - "Epoch 25/25\n", - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2179 - accuracy: 0.9243 - val_loss: 0.3165 - val_accuracy: 0.8904\n" - ] - } - ], - "source": [ - "model = keras.models.Sequential([\n", - " keras.layers.Flatten(input_shape=[28, 28]),\n", - " keras.layers.Dense(300, activation=\"selu\", kernel_initializer=\"lecun_normal\"),\n", - " keras.layers.Dense(100, activation=\"selu\", kernel_initializer=\"lecun_normal\"),\n", - " keras.layers.Dense(10, activation=\"softmax\")\n", - "])\n", - "s = 20 * len(X_train) // 32 # number of steps in 20 epochs (batch size = 32)\n", - "learning_rate = keras.optimizers.schedules.ExponentialDecay(0.01, s, 0.1)\n", - "optimizer = keras.optimizers.SGD(learning_rate)\n", - "model.compile(loss=\"sparse_categorical_crossentropy\", optimizer=optimizer, metrics=[\"accuracy\"])\n", - "n_epochs = 25\n", - "history = model.fit(X_train_scaled, y_train, epochs=n_epochs,\n", - " validation_data=(X_valid_scaled, y_valid))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "구간별 고정 스케줄링은 다음을 사용하세요:" - ] - }, - { - "cell_type": "code", - "execution_count": 95, - "metadata": {}, - "outputs": [], - "source": [ - "learning_rate = keras.optimizers.schedules.PiecewiseConstantDecay(\n", - " boundaries=[5. * n_steps_per_epoch, 15. * n_steps_per_epoch],\n", - " values=[0.01, 0.005, 0.001])" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### 1사이클 스케줄링" - ] - }, - { - "cell_type": "code", - "execution_count": 96, - "metadata": {}, - "outputs": [], - "source": [ - "K = keras.backend\n", - "\n", - "class ExponentialLearningRate(keras.callbacks.Callback):\n", - " def __init__(self, factor):\n", - " self.factor = factor\n", - " self.rates = []\n", - " self.losses = []\n", - " def on_batch_end(self, batch, logs):\n", - " self.rates.append(K.get_value(self.model.optimizer.lr))\n", - " self.losses.append(logs[\"loss\"])\n", - " K.set_value(self.model.optimizer.lr, self.model.optimizer.lr * self.factor)\n", - "\n", - "def find_learning_rate(model, X, y, epochs=1, batch_size=32, min_rate=10**-5, max_rate=10):\n", - " init_weights = model.get_weights()\n", - " iterations = len(X) // batch_size * epochs\n", - " factor = np.exp(np.log(max_rate / min_rate) / iterations)\n", - " init_lr = K.get_value(model.optimizer.lr)\n", - " K.set_value(model.optimizer.lr, min_rate)\n", - " exp_lr = ExponentialLearningRate(factor)\n", - " history = model.fit(X, y, epochs=epochs, batch_size=batch_size,\n", - " callbacks=[exp_lr])\n", - " K.set_value(model.optimizer.lr, init_lr)\n", - " model.set_weights(init_weights)\n", - " return exp_lr.rates, exp_lr.losses\n", - "\n", - "def plot_lr_vs_loss(rates, losses):\n", - " plt.plot(rates, losses)\n", - " plt.gca().set_xscale('log')\n", - " plt.hlines(min(losses), min(rates), max(rates))\n", - " plt.axis([min(rates), max(rates), min(losses), (losses[0] + min(losses)) / 2])\n", - " plt.xlabel(\"Learning rate\")\n", - " plt.ylabel(\"Loss\")" - ] - }, - { - "cell_type": "code", - "execution_count": 97, - "metadata": {}, - "outputs": [], - "source": [ - "tf.random.set_seed(42)\n", - "np.random.seed(42)\n", - "\n", - "model = keras.models.Sequential([\n", - " keras.layers.Flatten(input_shape=[28, 28]),\n", - " keras.layers.Dense(300, activation=\"selu\", kernel_initializer=\"lecun_normal\"),\n", - " keras.layers.Dense(100, activation=\"selu\", kernel_initializer=\"lecun_normal\"),\n", - " keras.layers.Dense(10, activation=\"softmax\")\n", - "])\n", - "model.compile(loss=\"sparse_categorical_crossentropy\",\n", - " optimizer=keras.optimizers.SGD(lr=1e-3),\n", - " metrics=[\"accuracy\"])" - ] - }, - { - "cell_type": "code", - "execution_count": 98, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "430/430 [==============================] - 2s 4ms/step - loss: nan - accuracy: 0.3859 \n" - ] - }, - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZQAAAERCAYAAABcuFHLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3deXyV9Zn38c+VhQRI2CSQEAgBEZRFEHCpG7UuFDo6U+mi1S46T7XP1Ol02umM07Et3abT2nbmcXY7WtRal1alU3et1q24RAQFBa3sewDZAoQk53r+OCcQQ0hykvuc+5eT7/v1Oi/Puc997ly/3Hiu/HZzd0RERLorL+4AREQkNyihiIhIJJRQREQkEkooIiISCSUUERGJhBKKiIhEoiDuAKI0dOhQr66ujjsMyTHvbNtHvhljy/rHHYq0YdnG3QwtLaJ8QHHcofRYr7766nZ3L+vudXIqoVRXV1NTUxN3GJJjfvL4Sv796T/y5DcuZFC/PnGHI62M+/rDXDtrLF+bfWLcofRYZrY2iuuoyUukAx86cRgJh9+vrI07FGmDpmaHQwlFpANTRw6irLSIx5ZviTsUOQbD4g5BUEIR6VBenjFncjlPrdhGXX1j3OGIBEsJRaQT5kyuoL4xwbNvq9krNFqPMBxKKCKdMLN6MKXFBepHCZSpxSsISiginVCYn8e5J5Tx9Mpt+os4MLob4VBCEemk808axra99by2flfcoUgrqqCE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GmBm01o9qoEnSY7I+o2ZzTGzMWb2ATP7tpk1//X9NnC+mZ1tZicC/waMiaUUSf8FHJ8aUTbBzC4Frk29l+4OeG8DlWZ2hZmNNbP/C1ze6pw1wGgzm25mQ82siM793kTapYQiPdU5wGutHj92dwfmAk8BPyM5muleYAJH+i6+B7wMPEJyJFMdqSG3cXD3tcA8kk1TS0k2VX079fbBNK/1W+BG4F9I9ttcSHJUWkv3AQ8DvwNqgcs7+XsTaZe2ABYJkJn9FfAdYJDrf1LpIdSHIhIAM/siyZFetcAZwDeABUom0pMooYiEYRzJuSfHARtI9qt8J9aIRNKkJi8REYmEOuVFRCQSSigiIhIJJRQREYmEEoqIiERCCUVERCKhhCIiIpH4/0+N9mtrT0HfAAAAAElFTkSuQmCC\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "batch_size = 128\n", - "rates, losses = find_learning_rate(model, X_train_scaled, y_train, epochs=1, batch_size=batch_size)\n", - "plot_lr_vs_loss(rates, losses)" - ] - }, - { - "cell_type": "code", - "execution_count": 99, - "metadata": {}, - "outputs": [], - "source": [ - "class OneCycleScheduler(keras.callbacks.Callback):\n", - " def __init__(self, iterations, max_rate, start_rate=None,\n", - " last_iterations=None, last_rate=None):\n", - " self.iterations = iterations\n", - " self.max_rate = max_rate\n", - " self.start_rate = start_rate or max_rate / 10\n", - " self.last_iterations = last_iterations or iterations // 10 + 1\n", - " self.half_iteration = (iterations - self.last_iterations) // 2\n", - " self.last_rate = last_rate or self.start_rate / 1000\n", - " self.iteration = 0\n", - " def _interpolate(self, iter1, iter2, rate1, rate2):\n", - " return ((rate2 - rate1) * (self.iteration - iter1)\n", - " / (iter2 - iter1) + rate1)\n", - " def on_batch_begin(self, batch, logs):\n", - " if self.iteration < self.half_iteration:\n", - " rate = self._interpolate(0, self.half_iteration, self.start_rate, self.max_rate)\n", - " elif self.iteration < 2 * self.half_iteration:\n", - " rate = self._interpolate(self.half_iteration, 2 * self.half_iteration,\n", - " self.max_rate, self.start_rate)\n", - " else:\n", - " rate = self._interpolate(2 * self.half_iteration, self.iterations,\n", - " self.start_rate, self.last_rate)\n", - " rate = max(rate, self.last_rate)\n", - " self.iteration += 1\n", - " K.set_value(self.model.optimizer.lr, rate)" - ] - }, - { - "cell_type": "code", - "execution_count": 100, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Epoch 1/25\n", - "430/430 [==============================] - 2s 4ms/step - loss: 0.6572 - accuracy: 0.7740 - val_loss: 0.4872 - val_accuracy: 0.8338\n", - "Epoch 2/25\n", - "430/430 [==============================] - 1s 3ms/step - loss: 0.4581 - accuracy: 0.8397 - val_loss: 0.4274 - val_accuracy: 0.8524\n", - "Epoch 3/25\n", - "430/430 [==============================] - 1s 3ms/step - loss: 0.4121 - accuracy: 0.8545 - val_loss: 0.4116 - val_accuracy: 0.8588\n", - "Epoch 4/25\n", - "430/430 [==============================] - 1s 3ms/step - loss: 0.3837 - accuracy: 0.8641 - val_loss: 0.3870 - val_accuracy: 0.8686\n", - "Epoch 5/25\n", - "430/430 [==============================] - 1s 3ms/step - loss: 0.3639 - accuracy: 0.8717 - val_loss: 0.3765 - val_accuracy: 0.8676\n", - "Epoch 6/25\n", - "430/430 [==============================] - 1s 3ms/step - loss: 0.3457 - accuracy: 0.8774 - val_loss: 0.3742 - val_accuracy: 0.8708\n", - "Epoch 7/25\n", - "430/430 [==============================] - 1s 3ms/step - loss: 0.3330 - accuracy: 0.8811 - val_loss: 0.3634 - val_accuracy: 0.8704\n", - "Epoch 8/25\n", - "430/430 [==============================] - 1s 3ms/step - loss: 0.3185 - accuracy: 0.8862 - val_loss: 0.3958 - val_accuracy: 0.8608\n", - "Epoch 9/25\n", - "430/430 [==============================] - 1s 3ms/step - loss: 0.3065 - accuracy: 0.8893 - val_loss: 0.3483 - val_accuracy: 0.8762\n", - "Epoch 10/25\n", - "430/430 [==============================] - 1s 3ms/step - loss: 0.2945 - accuracy: 0.8924 - val_loss: 0.3396 - val_accuracy: 0.8812\n", - "Epoch 11/25\n", - "430/430 [==============================] - 2s 4ms/step - loss: 0.2838 - accuracy: 0.8963 - val_loss: 0.3460 - val_accuracy: 0.8796\n", - "Epoch 12/25\n", - "430/430 [==============================] - 1s 3ms/step - loss: 0.2709 - accuracy: 0.9023 - val_loss: 0.3644 - val_accuracy: 0.8696\n", - "Epoch 13/25\n", - "430/430 [==============================] - 1s 3ms/step - loss: 0.2536 - accuracy: 0.9081 - val_loss: 0.3350 - val_accuracy: 0.8838\n", - "Epoch 14/25\n", - "430/430 [==============================] - 1s 3ms/step - loss: 0.2405 - accuracy: 0.9134 - val_loss: 0.3466 - val_accuracy: 0.8812\n", - "Epoch 15/25\n", - "430/430 [==============================] - 1s 3ms/step - loss: 0.2280 - accuracy: 0.9183 - val_loss: 0.3260 - val_accuracy: 0.8840\n", - "Epoch 16/25\n", - "430/430 [==============================] - 1s 3ms/step - loss: 0.2160 - accuracy: 0.9234 - val_loss: 0.3292 - val_accuracy: 0.8834\n", - "Epoch 17/25\n", - "430/430 [==============================] - 1s 3ms/step - loss: 0.2062 - accuracy: 0.9264 - val_loss: 0.3354 - val_accuracy: 0.8862\n", - "Epoch 18/25\n", - "430/430 [==============================] - 1s 3ms/step - loss: 0.1978 - accuracy: 0.9305 - val_loss: 0.3236 - val_accuracy: 0.8906\n", - "Epoch 19/25\n", - "430/430 [==============================] - 1s 3ms/step - loss: 0.1892 - accuracy: 0.9337 - val_loss: 0.3233 - val_accuracy: 0.8904\n", - "Epoch 20/25\n", - "430/430 [==============================] - 2s 4ms/step - loss: 0.1821 - accuracy: 0.9369 - val_loss: 0.3221 - val_accuracy: 0.8926\n", - "Epoch 21/25\n", - "430/430 [==============================] - 1s 3ms/step - loss: 0.1752 - accuracy: 0.9401 - val_loss: 0.3215 - val_accuracy: 0.8904\n", - "Epoch 22/25\n", - "430/430 [==============================] - 1s 3ms/step - loss: 0.1701 - accuracy: 0.9418 - val_loss: 0.3180 - val_accuracy: 0.8956\n", - "Epoch 23/25\n", - "430/430 [==============================] - 1s 3ms/step - loss: 0.1655 - accuracy: 0.9438 - val_loss: 0.3186 - val_accuracy: 0.8942\n", - "Epoch 24/25\n", - "430/430 [==============================] - 2s 4ms/step - loss: 0.1628 - accuracy: 0.9458 - val_loss: 0.3176 - val_accuracy: 0.8924\n", - "Epoch 25/25\n", - "430/430 [==============================] - 1s 3ms/step - loss: 0.1611 - accuracy: 0.9460 - val_loss: 0.3169 - val_accuracy: 0.8930\n" - ] - } - ], - "source": [ - "n_epochs = 25\n", - "onecycle = OneCycleScheduler(len(X_train) // batch_size * n_epochs, max_rate=0.05)\n", - "history = model.fit(X_train_scaled, y_train, epochs=n_epochs, batch_size=batch_size,\n", - " validation_data=(X_valid_scaled, y_valid),\n", - " callbacks=[onecycle])" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# 규제를 사용해 과대적합 피하기" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## $\\ell_1$과 $\\ell_2$ 규제" - ] - }, - { - "cell_type": "code", - "execution_count": 101, - "metadata": {}, - "outputs": [], - "source": [ - "layer = keras.layers.Dense(100, activation=\"elu\",\n", - " kernel_initializer=\"he_normal\",\n", - " kernel_regularizer=keras.regularizers.l2(0.01))\n", - "# or l1(0.1) for ℓ1 regularization with a factor or 0.1\n", - "# or l1_l2(0.1, 0.01) for both ℓ1 and ℓ2 regularization, with factors 0.1 and 0.01 respectively" - ] - }, - { - "cell_type": "code", - "execution_count": 102, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Epoch 1/2\n", - "1719/1719 [==============================] - 8s 5ms/step - loss: 1.5956 - accuracy: 0.8124 - val_loss: 0.7169 - val_accuracy: 0.8340\n", - "Epoch 2/2\n", - "1719/1719 [==============================] - 8s 5ms/step - loss: 0.7197 - accuracy: 0.8274 - val_loss: 0.6850 - val_accuracy: 0.8376\n" - ] - } - ], - "source": [ - "model = keras.models.Sequential([\n", - " keras.layers.Flatten(input_shape=[28, 28]),\n", - " keras.layers.Dense(300, activation=\"elu\",\n", - " kernel_initializer=\"he_normal\",\n", - " kernel_regularizer=keras.regularizers.l2(0.01)),\n", - " keras.layers.Dense(100, activation=\"elu\",\n", - " kernel_initializer=\"he_normal\",\n", - " kernel_regularizer=keras.regularizers.l2(0.01)),\n", - " keras.layers.Dense(10, activation=\"softmax\",\n", - " kernel_regularizer=keras.regularizers.l2(0.01))\n", - "])\n", - "model.compile(loss=\"sparse_categorical_crossentropy\", optimizer=\"nadam\", metrics=[\"accuracy\"])\n", - "n_epochs = 2\n", - "history = model.fit(X_train_scaled, y_train, epochs=n_epochs,\n", - " validation_data=(X_valid_scaled, y_valid))" - ] - }, - { - "cell_type": "code", - "execution_count": 103, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Epoch 1/2\n", - "1719/1719 [==============================] - 8s 5ms/step - loss: 1.6313 - accuracy: 0.8113 - val_loss: 0.7218 - val_accuracy: 0.8310\n", - "Epoch 2/2\n", - "1719/1719 [==============================] - 8s 5ms/step - loss: 0.7187 - accuracy: 0.8273 - val_loss: 0.6826 - val_accuracy: 0.8382\n" - ] - } - ], - "source": [ - "from functools import partial\n", - "\n", - "RegularizedDense = partial(keras.layers.Dense,\n", - " activation=\"elu\",\n", - " kernel_initializer=\"he_normal\",\n", - " kernel_regularizer=keras.regularizers.l2(0.01))\n", - "\n", - "model = keras.models.Sequential([\n", - " keras.layers.Flatten(input_shape=[28, 28]),\n", - " RegularizedDense(300),\n", - " RegularizedDense(100),\n", - " RegularizedDense(10, activation=\"softmax\")\n", - "])\n", - "model.compile(loss=\"sparse_categorical_crossentropy\", optimizer=\"nadam\", metrics=[\"accuracy\"])\n", - "n_epochs = 2\n", - "history = model.fit(X_train_scaled, y_train, epochs=n_epochs,\n", - " validation_data=(X_valid_scaled, y_valid))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## 드롭아웃" - ] - }, - { - "cell_type": "code", - "execution_count": 104, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Epoch 1/2\n", - "1719/1719 [==============================] - 8s 5ms/step - loss: 0.5838 - accuracy: 0.7998 - val_loss: 0.3730 - val_accuracy: 0.8644\n", - "Epoch 2/2\n", - "1719/1719 [==============================] - 8s 5ms/step - loss: 0.4209 - accuracy: 0.8443 - val_loss: 0.3406 - val_accuracy: 0.8724\n" - ] - } - ], - "source": [ - "model = keras.models.Sequential([\n", - " keras.layers.Flatten(input_shape=[28, 28]),\n", - " keras.layers.Dropout(rate=0.2),\n", - " keras.layers.Dense(300, activation=\"elu\", kernel_initializer=\"he_normal\"),\n", - " keras.layers.Dropout(rate=0.2),\n", - " keras.layers.Dense(100, activation=\"elu\", kernel_initializer=\"he_normal\"),\n", - " keras.layers.Dropout(rate=0.2),\n", - " keras.layers.Dense(10, activation=\"softmax\")\n", - "])\n", - "model.compile(loss=\"sparse_categorical_crossentropy\", optimizer=\"nadam\", metrics=[\"accuracy\"])\n", - "n_epochs = 2\n", - "history = model.fit(X_train_scaled, y_train, epochs=n_epochs,\n", - " validation_data=(X_valid_scaled, y_valid))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## 알파 드롭아웃" - ] - }, - { - "cell_type": "code", - "execution_count": 105, - "metadata": {}, - "outputs": [], - "source": [ - "tf.random.set_seed(42)\n", - "np.random.seed(42)" - ] - }, - { - "cell_type": "code", - "execution_count": 106, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Epoch 1/20\n", - "1719/1719 [==============================] - 6s 3ms/step - loss: 0.6654 - accuracy: 0.7595 - val_loss: 0.5929 - val_accuracy: 0.8406\n", - "Epoch 2/20\n", - "1719/1719 [==============================] - 6s 3ms/step - loss: 0.5605 - accuracy: 0.7933 - val_loss: 0.5605 - val_accuracy: 0.8400\n", - "Epoch 3/20\n", - "1719/1719 [==============================] - 6s 3ms/step - loss: 0.5283 - accuracy: 0.8050 - val_loss: 0.4858 - val_accuracy: 0.8596\n", - "Epoch 4/20\n", - "1719/1719 [==============================] - 6s 3ms/step - loss: 0.5072 - accuracy: 0.8125 - val_loss: 0.4629 - val_accuracy: 0.8582\n", - "Epoch 5/20\n", - "1719/1719 [==============================] - 6s 3ms/step - loss: 0.4915 - accuracy: 0.8186 - val_loss: 0.4698 - val_accuracy: 0.8552\n", - "Epoch 6/20\n", - "1719/1719 [==============================] - 6s 3ms/step - loss: 0.4866 - accuracy: 0.8186 - val_loss: 0.4810 - val_accuracy: 0.8612\n", - "Epoch 7/20\n", - "1719/1719 [==============================] - 6s 3ms/step - loss: 0.4724 - accuracy: 0.8251 - val_loss: 0.4792 - val_accuracy: 0.8650\n", - "Epoch 8/20\n", - "1719/1719 [==============================] - 6s 3ms/step - loss: 0.4634 - accuracy: 0.8287 - val_loss: 0.4587 - val_accuracy: 0.8628\n", - "Epoch 9/20\n", - "1719/1719 [==============================] - 6s 3ms/step - loss: 0.4578 - accuracy: 0.8307 - val_loss: 0.4105 - val_accuracy: 0.8718\n", - "Epoch 10/20\n", - "1719/1719 [==============================] - 6s 3ms/step - loss: 0.4531 - accuracy: 0.8333 - val_loss: 0.4714 - val_accuracy: 0.8648\n", - "Epoch 11/20\n", - "1719/1719 [==============================] - 6s 3ms/step - loss: 0.4484 - accuracy: 0.8326 - val_loss: 0.4181 - val_accuracy: 0.8674\n", - "Epoch 12/20\n", - "1719/1719 [==============================] - 6s 3ms/step - loss: 0.4468 - accuracy: 0.8330 - val_loss: 0.5498 - val_accuracy: 0.8500\n", - "Epoch 13/20\n", - "1719/1719 [==============================] - 6s 3ms/step - loss: 0.4421 - accuracy: 0.8363 - val_loss: 0.4546 - val_accuracy: 0.8630\n", - "Epoch 14/20\n", - "1719/1719 [==============================] - 6s 3ms/step - loss: 0.4314 - accuracy: 0.8396 - val_loss: 0.4554 - val_accuracy: 0.8676\n", - "Epoch 15/20\n", - "1719/1719 [==============================] - 6s 3ms/step - loss: 0.4341 - accuracy: 0.8367 - val_loss: 0.4458 - val_accuracy: 0.8662\n", - "Epoch 16/20\n", - "1719/1719 [==============================] - 6s 3ms/step - loss: 0.4312 - accuracy: 0.8412 - val_loss: 0.4325 - val_accuracy: 0.8750\n", - "Epoch 17/20\n", - "1719/1719 [==============================] - 6s 3ms/step - loss: 0.4261 - accuracy: 0.8419 - val_loss: 0.5457 - val_accuracy: 0.8554\n", - "Epoch 18/20\n", - "1719/1719 [==============================] - 6s 3ms/step - loss: 0.4258 - accuracy: 0.8417 - val_loss: 0.5050 - val_accuracy: 0.8700\n", - "Epoch 19/20\n", - "1719/1719 [==============================] - 6s 3ms/step - loss: 0.4208 - accuracy: 0.8437 - val_loss: 0.4899 - val_accuracy: 0.8696\n", - "Epoch 20/20\n", - "1719/1719 [==============================] - 6s 3ms/step - loss: 0.4234 - accuracy: 0.8414 - val_loss: 0.4014 - val_accuracy: 0.8782\n" - ] - } - ], - "source": [ - "model = keras.models.Sequential([\n", - " keras.layers.Flatten(input_shape=[28, 28]),\n", - " keras.layers.AlphaDropout(rate=0.2),\n", - " keras.layers.Dense(300, activation=\"selu\", kernel_initializer=\"lecun_normal\"),\n", - " keras.layers.AlphaDropout(rate=0.2),\n", - " keras.layers.Dense(100, activation=\"selu\", kernel_initializer=\"lecun_normal\"),\n", - " keras.layers.AlphaDropout(rate=0.2),\n", - " keras.layers.Dense(10, activation=\"softmax\")\n", - "])\n", - "optimizer = keras.optimizers.SGD(lr=0.01, momentum=0.9, nesterov=True)\n", - "model.compile(loss=\"sparse_categorical_crossentropy\", optimizer=optimizer, metrics=[\"accuracy\"])\n", - "n_epochs = 20\n", - "history = model.fit(X_train_scaled, y_train, epochs=n_epochs,\n", - " validation_data=(X_valid_scaled, y_valid))" - ] - }, - { - "cell_type": "code", - "execution_count": 107, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "313/313 [==============================] - 1s 2ms/step - loss: 0.4338 - accuracy: 0.8697\n" - ] - }, - { - "data": { - "text/plain": [ - "[0.4337695240974426, 0.869700014591217]" - ] - }, - "execution_count": 107, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "model.evaluate(X_test_scaled, y_test)" - ] - }, - { - "cell_type": "code", - "execution_count": 108, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "1719/1719 [==============================] - 4s 2ms/step - loss: 0.3243 - accuracy: 0.8887\n" - ] - }, - { - "data": { - "text/plain": [ - "[0.32432350516319275, 0.8887272477149963]" - ] - }, - "execution_count": 108, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "model.evaluate(X_train_scaled, y_train)" - ] - }, - { - "cell_type": "code", - "execution_count": 109, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "1719/1719 [==============================] - 5s 3ms/step - loss: 0.4167 - accuracy: 0.8463\n" - ] - } - ], - "source": [ - "history = model.fit(X_train_scaled, y_train)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## MC 드롭아웃" - ] - }, - { - "cell_type": "code", - "execution_count": 110, - "metadata": {}, - "outputs": [], - "source": [ - "tf.random.set_seed(42)\n", - "np.random.seed(42)" - ] - }, - { - "cell_type": "code", - "execution_count": 111, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "y_probas = np.stack([model(X_test_scaled, training=True)\n", - " for sample in range(100)])\n", - "y_proba = y_probas.mean(axis=0)\n", - "y_std = y_probas.std(axis=0)" - ] - }, - { - "cell_type": "code", - "execution_count": 112, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 1.]], dtype=float32)" - ] - }, - "execution_count": 112, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "np.round(model.predict(X_test_scaled[:1]), 2)" - ] - }, - { - "cell_type": "code", - "execution_count": 113, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "array([[[0. , 0. , 0. , 0. , 0. , 0.43, 0. , 0.18, 0. , 0.39]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.75, 0. , 0.25]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.42, 0. , 0. , 0. , 0.58]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.26, 0. , 0.72]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.12, 0. , 0.07, 0. , 0.8 ]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0.3 , 0. , 0.7 ]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.36, 0. , 0.13, 0. , 0.51]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0.34, 0. , 0.66]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.75, 0. , 0.02, 0. , 0.23]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.02, 0. , 0.04, 0. , 0.94]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.02, 0. , 0.03, 0. , 0.95]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.64, 0. , 0. , 0. , 0.36]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.68, 0. , 0.05, 0. , 0.28]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.31, 0. , 0.04, 0. , 0.65]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.05, 0. , 0.02, 0. , 0.93]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.42, 0. , 0.02, 0. , 0.57]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.02, 0. , 0. , 0. , 0.98]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.03, 0. , 0.96]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0.52, 0. , 0.48]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.28, 0. , 0.12, 0. , 0.6 ]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.42, 0. , 0.01, 0. , 0.56]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.96, 0. , 0.01, 0. , 0.03]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 1. ]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0.04, 0. , 0.96]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0. , 0. , 0.99]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.75, 0. , 0.11, 0. , 0.14]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.21, 0. , 0.18, 0. , 0.61]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.44, 0. , 0.08, 0. , 0.48]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.63, 0. , 0.01, 0. , 0.36]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.23, 0. , 0.55, 0. , 0.22]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.31, 0. , 0.01, 0. , 0.68]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.06, 0. , 0.01, 0. , 0.93]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.3 , 0. , 0.02, 0. , 0.68]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.91, 0. , 0.04, 0. , 0.05]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.06, 0. , 0.02, 0. , 0.93]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.33, 0. , 0.36, 0. , 0.31]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.99]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.6 , 0. , 0.03, 0. , 0.37]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.14, 0. , 0.08, 0. , 0.77]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.66, 0. , 0. , 0. , 0.34]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.11, 0. , 0.01, 0. , 0.88]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0. , 0. , 0.99]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.47, 0. , 0.08, 0. , 0.44]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.99]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.01, 0. , 0.98]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 1. ]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.12, 0. , 0.11, 0. , 0.77]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.21, 0. , 0.78]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0.08, 0. , 0.92]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.2 , 0. , 0.79]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.49, 0. , 0.11, 0. , 0.41]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.69, 0. , 0.06, 0. , 0.25]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 1. ]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.31, 0. , 0.01, 0. , 0.68]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.03, 0. , 0.01, 0. , 0.97]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.05, 0. , 0.25, 0. , 0.71]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.02, 0. , 0.47, 0. , 0.51]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.07, 0. , 0.72, 0. , 0.21]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.49, 0. , 0.5 ]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.06, 0. , 0.02, 0. , 0.92]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.6 , 0. , 0.02, 0. , 0.38]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.08, 0. , 0.02, 0. , 0.9 ]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.14, 0. , 0.02, 0. , 0.84]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.02, 0. , 0.97]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.44, 0. , 0.02, 0. , 0.54]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.18, 0. , 0.08, 0. , 0.74]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.49, 0. , 0.04, 0. , 0.47]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.99]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.11, 0. , 0.08, 0. , 0.81]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.07, 0. , 0.09, 0. , 0.84]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0. , 0. , 0.98]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.03, 0. , 0.04, 0. , 0.93]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.38, 0. , 0.03, 0. , 0.59]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.01, 0. , 0.98]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.1 , 0. , 0.02, 0. , 0.88]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.98]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.02, 0. , 0.01, 0. , 0.98]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.49, 0. , 0.22, 0. , 0.29]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.03, 0. , 0.96]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.03, 0. , 0.96]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.3 , 0. , 0.69]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.28, 0. , 0. , 0. , 0.72]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 1. ]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.03, 0. , 0.03, 0. , 0.94]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.04, 0. , 0.09, 0. , 0.87]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.12, 0. , 0.03, 0. , 0.85]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.98, 0. , 0. , 0. , 0.02]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.17, 0. , 0. , 0. , 0.83]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.05, 0. , 0.01, 0. , 0.94]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 1. ]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.02, 0. , 0. , 0. , 0.98]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.04, 0. , 0.13, 0. , 0.83]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.93, 0. , 0.03, 0. , 0.04]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.86, 0. , 0.01, 0. , 0.13]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.59, 0. , 0.02, 0. , 0.38]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.02, 0. , 0.01, 0. , 0.97]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.11, 0. , 0.01, 0. , 0.88]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.01, 0. , 0.98]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.78, 0. , 0.01, 0. , 0.21]],\n", - "\n", - " [[0. , 0. , 0. , 0. , 0. , 0.48, 0. , 0.01, 0. , 0.51]]],\n", - " dtype=float32)" - ] - }, - "execution_count": 113, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "np.round(y_probas[:, :1], 2)" - ] - }, - { - "cell_type": "code", - "execution_count": 114, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "array([[0. , 0. , 0. , 0. , 0. , 0.23, 0. , 0.09, 0. , 0.68]],\n", - " dtype=float32)" - ] - }, - "execution_count": 114, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "np.round(y_proba[:1], 2)" - ] - }, - { - "cell_type": "code", - "execution_count": 115, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "array([[0. , 0. , 0. , 0. , 0. , 0.28, 0. , 0.15, 0. , 0.29]],\n", - " dtype=float32)" - ] - }, - "execution_count": 115, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "y_std = y_probas.std(axis=0)\n", - "np.round(y_std[:1], 2)" - ] - }, - { - "cell_type": "code", - "execution_count": 116, - "metadata": {}, - "outputs": [], - "source": [ - "y_pred = np.argmax(y_proba, axis=1)" - ] - }, - { - "cell_type": "code", - "execution_count": 117, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "0.8666" - ] - }, - "execution_count": 117, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "accuracy = np.sum(y_pred == y_test) / len(y_test)\n", - "accuracy" - ] - }, - { - "cell_type": "code", - "execution_count": 118, - "metadata": {}, - "outputs": [], - "source": [ - "class MCDropout(keras.layers.Dropout):\n", - " def call(self, inputs):\n", - " return super().call(inputs, training=True)\n", - "\n", - "class MCAlphaDropout(keras.layers.AlphaDropout):\n", - " def call(self, inputs):\n", - " return super().call(inputs, training=True)" - ] - }, - { - "cell_type": "code", - "execution_count": 119, - "metadata": {}, - "outputs": [], - "source": [ - "tf.random.set_seed(42)\n", - "np.random.seed(42)" - ] - }, - { - "cell_type": "code", - "execution_count": 120, - "metadata": {}, - "outputs": [], - "source": [ - "mc_model = keras.models.Sequential([\n", - " MCAlphaDropout(layer.rate) if isinstance(layer, keras.layers.AlphaDropout) else layer\n", - " for layer in model.layers\n", - "])" - ] - }, - { - "cell_type": "code", - "execution_count": 121, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Model: \"sequential_20\"\n", - "_________________________________________________________________\n", - "Layer (type) Output Shape Param # \n", - "=================================================================\n", - "flatten_18 (Flatten) (None, 784) 0 \n", - "_________________________________________________________________\n", - "mc_alpha_dropout (MCAlphaDro (None, 784) 0 \n", - "_________________________________________________________________\n", - "dense_262 (Dense) (None, 300) 235500 \n", - "_________________________________________________________________\n", - "mc_alpha_dropout_1 (MCAlphaD (None, 300) 0 \n", - "_________________________________________________________________\n", - "dense_263 (Dense) (None, 100) 30100 \n", - "_________________________________________________________________\n", - "mc_alpha_dropout_2 (MCAlphaD (None, 100) 0 \n", - "_________________________________________________________________\n", - "dense_264 (Dense) (None, 10) 1010 \n", - "=================================================================\n", - "Total params: 266,610\n", - "Trainable params: 266,610\n", - "Non-trainable params: 0\n", - "_________________________________________________________________\n" - ] - } - ], - "source": [ - "mc_model.summary()" - ] - }, - { - "cell_type": "code", - "execution_count": 122, - "metadata": {}, - "outputs": [], - "source": [ - "optimizer = keras.optimizers.SGD(lr=0.01, momentum=0.9, nesterov=True)\n", - "mc_model.compile(loss=\"sparse_categorical_crossentropy\", optimizer=optimizer, metrics=[\"accuracy\"])" - ] - }, - { - "cell_type": "code", - "execution_count": 123, - "metadata": {}, - "outputs": [], - "source": [ - "mc_model.set_weights(model.get_weights())" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "이제 MC 드롭아웃을 모델에 사용할 수 있습니다:" - ] - }, - { - "cell_type": "code", - "execution_count": 124, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "array([[0. , 0. , 0. , 0. , 0. , 0.22, 0. , 0.15, 0. , 0.63]],\n", - " dtype=float32)" - ] - }, - "execution_count": 124, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "np.round(np.mean([mc_model.predict(X_test_scaled[:1]) for sample in range(100)], axis=0), 2)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## 맥스 노름" - ] - }, - { - "cell_type": "code", - "execution_count": 125, - "metadata": {}, - "outputs": [], - "source": [ - "layer = keras.layers.Dense(100, activation=\"selu\", kernel_initializer=\"lecun_normal\",\n", - " kernel_constraint=keras.constraints.max_norm(1.))" - ] - }, - { - "cell_type": "code", - "execution_count": 126, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Epoch 1/2\n", - "1719/1719 [==============================] - 8s 5ms/step - loss: 0.4749 - accuracy: 0.8337 - val_loss: 0.3665 - val_accuracy: 0.8676\n", - "Epoch 2/2\n", - "1719/1719 [==============================] - 8s 5ms/step - loss: 0.3539 - accuracy: 0.8703 - val_loss: 0.3700 - val_accuracy: 0.8672\n" - ] - } - ], - "source": [ - "MaxNormDense = partial(keras.layers.Dense,\n", - " activation=\"selu\", kernel_initializer=\"lecun_normal\",\n", - " kernel_constraint=keras.constraints.max_norm(1.))\n", - "\n", - "model = keras.models.Sequential([\n", - " keras.layers.Flatten(input_shape=[28, 28]),\n", - " MaxNormDense(300),\n", - " MaxNormDense(100),\n", - " keras.layers.Dense(10, activation=\"softmax\")\n", - "])\n", - "model.compile(loss=\"sparse_categorical_crossentropy\", optimizer=\"nadam\", metrics=[\"accuracy\"])\n", - "n_epochs = 2\n", - "history = model.fit(X_train_scaled, y_train, epochs=n_epochs,\n", - " validation_data=(X_valid_scaled, y_valid))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# 연습문제 해답" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## 1. to 7." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "부록 A 참조." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## 8. CIFAR10에서 딥러닝" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### a.\n", - "*문제: 100개의 뉴런을 가진 은닉층 20개로 심층 신경망을 만들어보세요(너무 많은 것 같지만 이 연습문제의 핵심입니다). He 초기화와 ELU 활성화 함수를 사용하세요.*" - ] - }, - { - "cell_type": "code", - "execution_count": 127, - "metadata": {}, - "outputs": [], - "source": [ - "keras.backend.clear_session()\n", - "tf.random.set_seed(42)\n", - "np.random.seed(42)\n", - "\n", - "model = keras.models.Sequential()\n", - "model.add(keras.layers.Flatten(input_shape=[32, 32, 3]))\n", - "for _ in range(20):\n", - " model.add(keras.layers.Dense(100,\n", - " activation=\"elu\",\n", - " kernel_initializer=\"he_normal\"))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### b.\n", - "*문제: Nadam 옵티마이저와 조기 종료를 사용하여 CIFAR10 데이터셋에 이 네트워크를 훈련하세요. `keras.datasets.cifar10.load_ data()`를 사용하여 데이터를 적재할 수 있습니다. 이 데이터셋은 10개의 클래스와 32×32 크기의 컬러 이미지 60,000개로 구성됩니다(50,000개는 훈련, 10,000개는 테스트). 따라서 10개의 뉴런과 소프트맥스 활성화 함수를 사용하는 출력층이 필요합니다. 모델 구조와 하이퍼파라미터를 바꿀 때마다 적절한 학습률을 찾아야 한다는 것을 기억하세요.*" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "모델에 출력층을 추가합니다:" - ] - }, - { - "cell_type": "code", - "execution_count": 128, - "metadata": {}, - "outputs": [], - "source": [ - "model.add(keras.layers.Dense(10, activation=\"softmax\"))" - ] + "nbformat": 4, + "nbformat_minor": 0, + "metadata": { + "kernelspec": { + "display_name": "TensorFlow 2.3 on Python 3.6 (CUDA 10.1)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.6.9" + }, + "nav_menu": { + "height": "360px", + "width": "416px" + }, + "toc": { + "navigate_menu": true, + "number_sections": true, + "sideBar": true, + "threshold": 6, + "toc_cell": false, + "toc_section_display": "block", + "toc_window_display": false + }, + "colab": { + "name": "11_training_deep_neural_networks.ipynb", + "provenance": [] + }, + "accelerator": "GPU" }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "학습률 5e-5인 Nadam 옵티마이저를 사용해 보죠. 학습률 1e-5, 3e-5, 1e-4, 3e-4, 1e-3, 3e-3, 1e-2를 테스트하고 10번의 에포크 동안 (아래 텐서보드 콜백으로) 학습 곡선을 비교해 보았습니다. 학습률 3e-5와 1e-4가 꽤 좋았기 때문에 5e-5를 시도해 보았고 조금 더 나은 결과를 냈습니다." - ] - }, - { - "cell_type": "code", - "execution_count": 129, - "metadata": {}, - "outputs": [], - "source": [ - "optimizer = keras.optimizers.Nadam(lr=5e-5)\n", - "model.compile(loss=\"sparse_categorical_crossentropy\",\n", - " optimizer=optimizer,\n", - " metrics=[\"accuracy\"])" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "CIFAR10 데이터셋을 로드하죠. 조기 종료를 사용하기 때문에 검증 세트가 필요합니다. 원본 훈련 세트에서 처음 5,000개를 검증 세트로 사용하겠습니다:" - ] - }, - { - "cell_type": "code", - "execution_count": 130, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Downloading data from https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz\n", - "170500096/170498071 [==============================] - 18s 0us/step\n" - ] - } - ], - "source": [ - "(X_train_full, y_train_full), (X_test, y_test) = keras.datasets.cifar10.load_data()\n", - "\n", - "X_train = X_train_full[5000:]\n", - "y_train = y_train_full[5000:]\n", - "X_valid = X_train_full[:5000]\n", - "y_valid = y_train_full[:5000]" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "이제 콜백을 만들고 모델을 훈련합니다:" - ] - }, - { - "cell_type": "code", - "execution_count": 131, - "metadata": {}, - "outputs": [], - "source": [ - "early_stopping_cb = keras.callbacks.EarlyStopping(patience=20)\n", - "model_checkpoint_cb = keras.callbacks.ModelCheckpoint(\"my_cifar10_model.h5\", save_best_only=True)\n", - "run_index = 1 # 모델을 훈련할 때마다 증가시킴\n", - "run_logdir = os.path.join(os.curdir, \"my_cifar10_logs\", \"run_{:03d}\".format(run_index))\n", - "tensorboard_cb = keras.callbacks.TensorBoard(run_logdir)\n", - "callbacks = [early_stopping_cb, model_checkpoint_cb, tensorboard_cb]" - ] - }, - { - "cell_type": "code", - "execution_count": 132, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "ERROR: Failed to launch TensorBoard (exited with 255).\n", - "Contents of stderr:\n", - "E0809 03:11:42.951561 139734898673472 program.py:312] TensorBoard could not bind to port 6006, it was already in use\n", - "ERROR: TensorBoard could not bind to port 6006, it was already in use" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%tensorboard --logdir=./my_cifar10_logs --port=6006" - ] - }, - { - "cell_type": "code", - "execution_count": 133, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Epoch 1/100\n", - " 1/1407 [..............................] - ETA: 0s - loss: 165.9660 - accuracy: 0.0625WARNING:tensorflow:From /home/work/.local/lib/python3.6/site-packages/tensorflow/python/ops/summary_ops_v2.py:1277: stop (from tensorflow.python.eager.profiler) is deprecated and will be removed after 2020-07-01.\n", - "Instructions for updating:\n", - "use `tf.profiler.experimental.stop` instead.\n", - " 2/1407 [..............................] - ETA: 1:52 - loss: 133.4792 - accuracy: 0.1250WARNING:tensorflow:Callbacks method `on_train_batch_end` is slow compared to the batch time (batch time: 0.0164s vs `on_train_batch_end` time: 0.1398s). Check your callbacks.\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 4.0015 - accuracy: 0.1711 - val_loss: 2.0790 - val_accuracy: 0.2354\n", - "Epoch 2/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 2.0265 - accuracy: 0.2568 - val_loss: 2.0408 - val_accuracy: 0.2488\n", - "Epoch 3/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.9195 - accuracy: 0.2983 - val_loss: 1.9150 - val_accuracy: 0.2916\n", - "Epoch 4/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.8406 - accuracy: 0.3284 - val_loss: 1.9163 - val_accuracy: 0.3050\n", - "Epoch 5/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.7846 - accuracy: 0.3525 - val_loss: 1.7578 - val_accuracy: 0.3592\n", - "Epoch 6/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.7352 - accuracy: 0.3698 - val_loss: 1.7461 - val_accuracy: 0.3570\n", - "Epoch 7/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.6930 - accuracy: 0.3869 - val_loss: 1.7101 - val_accuracy: 0.3752\n", - "Epoch 8/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.6576 - accuracy: 0.4002 - val_loss: 1.6530 - val_accuracy: 0.3962\n", - "Epoch 9/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.6233 - accuracy: 0.4169 - val_loss: 1.6236 - val_accuracy: 0.4070\n", - "Epoch 10/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.5965 - accuracy: 0.4248 - val_loss: 1.6644 - val_accuracy: 0.4026\n", - "Epoch 11/100\n", - "1407/1407 [==============================] - 21s 15ms/step - loss: 1.5763 - accuracy: 0.4328 - val_loss: 1.6739 - val_accuracy: 0.3946\n", - "Epoch 12/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.5534 - accuracy: 0.4420 - val_loss: 1.6191 - val_accuracy: 0.4186\n", - "Epoch 13/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.5332 - accuracy: 0.4468 - val_loss: 1.6050 - val_accuracy: 0.4168\n", - "Epoch 14/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.5181 - accuracy: 0.4531 - val_loss: 1.6009 - val_accuracy: 0.4312\n", - "Epoch 15/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.4995 - accuracy: 0.4616 - val_loss: 1.5658 - val_accuracy: 0.4366\n", - "Epoch 16/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.4827 - accuracy: 0.4652 - val_loss: 1.5856 - val_accuracy: 0.4376\n", - "Epoch 17/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.4717 - accuracy: 0.4713 - val_loss: 1.5381 - val_accuracy: 0.4478\n", - "Epoch 18/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.4565 - accuracy: 0.4756 - val_loss: 1.5496 - val_accuracy: 0.4478\n", - "Epoch 19/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.4422 - accuracy: 0.4797 - val_loss: 1.5506 - val_accuracy: 0.4478\n", - "Epoch 20/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.4327 - accuracy: 0.4816 - val_loss: 1.5574 - val_accuracy: 0.4528\n", - "Epoch 21/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.4213 - accuracy: 0.4875 - val_loss: 1.5716 - val_accuracy: 0.4410\n", - "Epoch 22/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.4108 - accuracy: 0.4903 - val_loss: 1.5377 - val_accuracy: 0.4544\n", - "Epoch 23/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.3972 - accuracy: 0.4968 - val_loss: 1.5215 - val_accuracy: 0.4526\n", - "Epoch 24/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.3865 - accuracy: 0.4998 - val_loss: 1.5374 - val_accuracy: 0.4470\n", - "Epoch 25/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.3781 - accuracy: 0.5056 - val_loss: 1.5694 - val_accuracy: 0.4466\n", - "Epoch 26/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.3672 - accuracy: 0.5104 - val_loss: 1.5405 - val_accuracy: 0.4542\n", - "Epoch 27/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.3583 - accuracy: 0.5110 - val_loss: 1.5103 - val_accuracy: 0.4690\n", - "Epoch 28/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.3481 - accuracy: 0.5161 - val_loss: 1.5282 - val_accuracy: 0.4572\n", - "Epoch 29/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.3387 - accuracy: 0.5186 - val_loss: 1.5302 - val_accuracy: 0.4540\n", - "Epoch 30/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.3307 - accuracy: 0.5206 - val_loss: 1.5451 - val_accuracy: 0.4666\n", - "Epoch 31/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.3235 - accuracy: 0.5245 - val_loss: 1.5553 - val_accuracy: 0.4604\n", - "Epoch 32/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.3138 - accuracy: 0.5274 - val_loss: 1.5263 - val_accuracy: 0.4604\n", - "Epoch 33/100\n", - "1407/1407 [==============================] - 21s 15ms/step - loss: 1.3025 - accuracy: 0.5323 - val_loss: 1.5133 - val_accuracy: 0.4736\n", - "Epoch 34/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.2956 - accuracy: 0.5340 - val_loss: 1.5021 - val_accuracy: 0.4748\n", - "Epoch 35/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.2876 - accuracy: 0.5345 - val_loss: 1.5427 - val_accuracy: 0.4606\n", - "Epoch 36/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.2794 - accuracy: 0.5408 - val_loss: 1.5662 - val_accuracy: 0.4586\n", - "Epoch 37/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.2706 - accuracy: 0.5423 - val_loss: 1.5014 - val_accuracy: 0.4778\n", - "Epoch 38/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.2615 - accuracy: 0.5464 - val_loss: 1.5048 - val_accuracy: 0.4736\n", - "Epoch 39/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.2541 - accuracy: 0.5483 - val_loss: 1.5195 - val_accuracy: 0.4656\n", - "Epoch 40/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.2448 - accuracy: 0.5542 - val_loss: 1.5167 - val_accuracy: 0.4790\n", - "Epoch 41/100\n", - "1407/1407 [==============================] - 21s 15ms/step - loss: 1.2387 - accuracy: 0.5545 - val_loss: 1.5400 - val_accuracy: 0.4660\n", - "Epoch 42/100\n", - "1407/1407 [==============================] - 21s 15ms/step - loss: 1.2335 - accuracy: 0.5566 - val_loss: 1.5325 - val_accuracy: 0.4680\n", - "Epoch 43/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.2257 - accuracy: 0.5580 - val_loss: 1.5342 - val_accuracy: 0.4722\n", - "Epoch 44/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.2173 - accuracy: 0.5606 - val_loss: 1.5537 - val_accuracy: 0.4580\n", - "Epoch 45/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.2082 - accuracy: 0.5643 - val_loss: 1.5200 - val_accuracy: 0.4770\n", - "Epoch 46/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.2037 - accuracy: 0.5666 - val_loss: 1.5349 - val_accuracy: 0.4716\n", - "Epoch 47/100\n", - "1407/1407 [==============================] - 21s 15ms/step - loss: 1.1935 - accuracy: 0.5673 - val_loss: 1.5299 - val_accuracy: 0.4774\n", - "Epoch 48/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.1884 - accuracy: 0.5720 - val_loss: 1.5361 - val_accuracy: 0.4724\n", - "Epoch 49/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.1769 - accuracy: 0.5766 - val_loss: 1.5410 - val_accuracy: 0.4720\n", - "Epoch 50/100\n", - "1407/1407 [==============================] - 21s 15ms/step - loss: 1.1782 - accuracy: 0.5752 - val_loss: 1.5620 - val_accuracy: 0.4714\n", - "Epoch 51/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.1649 - accuracy: 0.5804 - val_loss: 1.5364 - val_accuracy: 0.4710\n", - "Epoch 52/100\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.1599 - accuracy: 0.5818 - val_loss: 1.5514 - val_accuracy: 0.4658\n", - "Epoch 53/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.1511 - accuracy: 0.5853 - val_loss: 1.5512 - val_accuracy: 0.4798\n", - "Epoch 54/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.1485 - accuracy: 0.5887 - val_loss: 1.5754 - val_accuracy: 0.4648\n", - "Epoch 55/100\n", - "1407/1407 [==============================] - 21s 15ms/step - loss: 1.1398 - accuracy: 0.5905 - val_loss: 1.5335 - val_accuracy: 0.4806\n", - "Epoch 56/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.1352 - accuracy: 0.5909 - val_loss: 1.5603 - val_accuracy: 0.4732\n", - "Epoch 57/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.1285 - accuracy: 0.5933 - val_loss: 1.5535 - val_accuracy: 0.4824\n" - ] - }, - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 133, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "model.fit(X_train, y_train, epochs=100,\n", - " validation_data=(X_valid, y_valid),\n", - " callbacks=callbacks)" - ] - }, - { - "cell_type": "code", - "execution_count": 134, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "157/157 [==============================] - 0s 3ms/step - loss: 1.5014 - accuracy: 0.0882\n" - ] - }, - { - "data": { - "text/plain": [ - "[1.5013599395751953, 0.08820000290870667]" - ] - }, - "execution_count": 134, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "model = keras.models.load_model(\"my_cifar10_model.h5\")\n", - "model.evaluate(X_valid, y_valid)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "가장 낮은 검증 손실을 내는 모델은 검증 세트에서 약 47% 정확도를 얻었습니다. 이 검증 점수에 도달하는데 39번의 에포크가 걸렸습니다. (GPU가 없는) 제 노트북에서 에포크당 약 10초 정도 걸렸습니다. 배치 정규화를 사용해 성능을 올릴 수 있는지 확인해 보죠." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### c.\n", - "*문제: 배치 정규화를 추가하고 학습 곡선을 비교해보세요. 이전보다 빠르게 수렴하나요? 더 좋은 모델이 만들어지나요? 훈련 속도에는 어떤 영향을 미치나요?*" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "다음 코드는 위의 코드와 배우 비슷합니다. 몇 가지 다른 점은 아래와 같습니다:\n", - "\n", - "* 출력층을 제외하고 모든 `Dense` 층 다음에 (활성화 함수 전에) BN 층을 추가했습니다. 처음 은닉층 전에도 BN 층을 추가했습니다.\n", - "* 학습률을 5e-4로 바꾸었습니다. 1e-5, 3e-5, 5e-5, 1e-4, 3e-4, 5e-4, 1e-3, 3e-3를 시도해 보고 20번 에포크 후에 검증 세트 성능이 가장 좋은 것을 선택했습니다.\n", - "* run_logdir를 run_bn_* 으로 이름을 바꾸고 모델 파일 이름을 my_cifar10_bn_model.h5로 변경했습니다." - ] - }, - { - "cell_type": "code", - "execution_count": 135, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Epoch 1/100\n", - " 2/1407 [..............................] - ETA: 9:29 - loss: 2.8693 - accuracy: 0.1094WARNING:tensorflow:Callbacks method `on_train_batch_end` is slow compared to the batch time (batch time: 0.0364s vs `on_train_batch_end` time: 0.7737s). Check your callbacks.\n", - "1407/1407 [==============================] - 51s 36ms/step - loss: 1.8431 - accuracy: 0.3390 - val_loss: 1.7148 - val_accuracy: 0.3886\n", - "Epoch 2/100\n", - "1407/1407 [==============================] - 49s 35ms/step - loss: 1.6690 - accuracy: 0.4046 - val_loss: 1.6174 - val_accuracy: 0.4144\n", - "Epoch 3/100\n", - "1407/1407 [==============================] - 49s 35ms/step - loss: 1.5972 - accuracy: 0.4320 - val_loss: 1.5171 - val_accuracy: 0.4478\n", - "Epoch 4/100\n", - "1407/1407 [==============================] - 50s 35ms/step - loss: 1.5463 - accuracy: 0.4495 - val_loss: 1.4883 - val_accuracy: 0.4688\n", - "Epoch 5/100\n", - "1407/1407 [==============================] - 50s 35ms/step - loss: 1.5051 - accuracy: 0.4641 - val_loss: 1.4369 - val_accuracy: 0.4892\n", - "Epoch 6/100\n", - "1407/1407 [==============================] - 49s 35ms/step - loss: 1.4684 - accuracy: 0.4793 - val_loss: 1.4056 - val_accuracy: 0.5018\n", - "Epoch 7/100\n", - "1407/1407 [==============================] - 49s 35ms/step - loss: 1.4350 - accuracy: 0.4895 - val_loss: 1.4292 - val_accuracy: 0.4888\n", - "Epoch 8/100\n", - "1407/1407 [==============================] - 49s 35ms/step - loss: 1.4087 - accuracy: 0.5006 - val_loss: 1.4021 - val_accuracy: 0.5088\n", - "Epoch 9/100\n", - "1407/1407 [==============================] - 49s 35ms/step - loss: 1.3834 - accuracy: 0.5095 - val_loss: 1.3738 - val_accuracy: 0.5110\n", - "Epoch 10/100\n", - "1407/1407 [==============================] - 49s 35ms/step - loss: 1.3645 - accuracy: 0.5167 - val_loss: 1.3432 - val_accuracy: 0.5252\n", - "Epoch 11/100\n", - "1407/1407 [==============================] - 49s 35ms/step - loss: 1.3428 - accuracy: 0.5258 - val_loss: 1.3583 - val_accuracy: 0.5132\n", - "Epoch 12/100\n", - "1407/1407 [==============================] - 49s 35ms/step - loss: 1.3227 - accuracy: 0.5316 - val_loss: 1.3820 - val_accuracy: 0.5052\n", - "Epoch 13/100\n", - "1407/1407 [==============================] - 48s 34ms/step - loss: 1.3010 - accuracy: 0.5371 - val_loss: 1.3794 - val_accuracy: 0.5094\n", - "Epoch 14/100\n", - "1407/1407 [==============================] - 49s 35ms/step - loss: 1.2838 - accuracy: 0.5446 - val_loss: 1.3531 - val_accuracy: 0.5260\n", - "Epoch 15/100\n", - "1407/1407 [==============================] - 49s 35ms/step - loss: 1.2621 - accuracy: 0.5548 - val_loss: 1.3641 - val_accuracy: 0.5256\n", - "Epoch 16/100\n", - "1407/1407 [==============================] - 49s 35ms/step - loss: 1.2535 - accuracy: 0.5572 - val_loss: 1.3720 - val_accuracy: 0.5276\n", - "Epoch 17/100\n", - "1407/1407 [==============================] - 49s 35ms/step - loss: 1.2355 - accuracy: 0.5609 - val_loss: 1.3184 - val_accuracy: 0.5348\n", - "Epoch 18/100\n", - "1407/1407 [==============================] - 49s 35ms/step - loss: 1.2164 - accuracy: 0.5685 - val_loss: 1.3487 - val_accuracy: 0.5296\n", - "Epoch 19/100\n", - "1407/1407 [==============================] - 49s 35ms/step - loss: 1.2037 - accuracy: 0.5770 - val_loss: 1.3278 - val_accuracy: 0.5366\n", - "Epoch 20/100\n", - "1407/1407 [==============================] - 49s 35ms/step - loss: 1.1916 - accuracy: 0.5789 - val_loss: 1.3592 - val_accuracy: 0.5260\n", - "Epoch 21/100\n", - "1407/1407 [==============================] - 49s 35ms/step - loss: 1.1782 - accuracy: 0.5848 - val_loss: 1.3478 - val_accuracy: 0.5302\n", - "Epoch 22/100\n", - "1407/1407 [==============================] - 49s 35ms/step - loss: 1.1587 - accuracy: 0.5913 - val_loss: 1.3477 - val_accuracy: 0.5308\n", - "Epoch 23/100\n", - "1407/1407 [==============================] - 49s 35ms/step - loss: 1.1481 - accuracy: 0.5933 - val_loss: 1.3285 - val_accuracy: 0.5378\n", - "Epoch 24/100\n", - "1407/1407 [==============================] - 49s 35ms/step - loss: 1.1395 - accuracy: 0.5989 - val_loss: 1.3393 - val_accuracy: 0.5388\n", - "Epoch 25/100\n", - "1407/1407 [==============================] - 49s 35ms/step - loss: 1.1285 - accuracy: 0.6044 - val_loss: 1.3436 - val_accuracy: 0.5354\n", - "Epoch 26/100\n", - "1407/1407 [==============================] - 49s 35ms/step - loss: 1.1080 - accuracy: 0.6085 - val_loss: 1.3496 - val_accuracy: 0.5258\n", - "Epoch 27/100\n", - "1407/1407 [==============================] - 49s 35ms/step - loss: 1.0971 - accuracy: 0.6143 - val_loss: 1.3484 - val_accuracy: 0.5350\n", - "Epoch 28/100\n", - "1407/1407 [==============================] - 49s 35ms/step - loss: 1.0978 - accuracy: 0.6121 - val_loss: 1.3698 - val_accuracy: 0.5274\n", - "Epoch 29/100\n", - "1407/1407 [==============================] - 49s 35ms/step - loss: 1.0825 - accuracy: 0.6198 - val_loss: 1.3416 - val_accuracy: 0.5348\n", - "Epoch 30/100\n", - "1407/1407 [==============================] - 49s 35ms/step - loss: 1.0698 - accuracy: 0.6219 - val_loss: 1.3363 - val_accuracy: 0.5366\n", - "Epoch 31/100\n", - "1407/1407 [==============================] - 49s 35ms/step - loss: 1.0569 - accuracy: 0.6262 - val_loss: 1.3536 - val_accuracy: 0.5356\n", - "Epoch 32/100\n", - "1407/1407 [==============================] - 49s 35ms/step - loss: 1.0489 - accuracy: 0.6306 - val_loss: 1.3822 - val_accuracy: 0.5220\n", - "Epoch 33/100\n", - "1407/1407 [==============================] - 49s 35ms/step - loss: 1.0387 - accuracy: 0.6338 - val_loss: 1.3633 - val_accuracy: 0.5404\n", - "Epoch 34/100\n", - "1407/1407 [==============================] - 49s 35ms/step - loss: 1.0342 - accuracy: 0.6344 - val_loss: 1.3611 - val_accuracy: 0.5364\n", - "Epoch 35/100\n", - "1407/1407 [==============================] - 49s 35ms/step - loss: 1.0163 - accuracy: 0.6422 - val_loss: 1.3904 - val_accuracy: 0.5356\n", - "Epoch 36/100\n", - "1407/1407 [==============================] - 49s 35ms/step - loss: 1.0137 - accuracy: 0.6421 - val_loss: 1.3795 - val_accuracy: 0.5408\n", - "Epoch 37/100\n", - "1407/1407 [==============================] - 49s 35ms/step - loss: 0.9991 - accuracy: 0.6491 - val_loss: 1.3334 - val_accuracy: 0.5444\n", - "157/157 [==============================] - 1s 5ms/step - loss: 1.3184 - accuracy: 0.1154\n" - ] - }, - { - "data": { - "text/plain": [ - "[1.3183687925338745, 0.11540000140666962]" - ] - }, - "execution_count": 135, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "keras.backend.clear_session()\n", - "tf.random.set_seed(42)\n", - "np.random.seed(42)\n", - "\n", - "model = keras.models.Sequential()\n", - "model.add(keras.layers.Flatten(input_shape=[32, 32, 3]))\n", - "model.add(keras.layers.BatchNormalization())\n", - "for _ in range(20):\n", - " model.add(keras.layers.Dense(100, kernel_initializer=\"he_normal\"))\n", - " model.add(keras.layers.BatchNormalization())\n", - " model.add(keras.layers.Activation(\"elu\"))\n", - "model.add(keras.layers.Dense(10, activation=\"softmax\"))\n", - "\n", - "optimizer = keras.optimizers.Nadam(lr=5e-4)\n", - "model.compile(loss=\"sparse_categorical_crossentropy\",\n", - " optimizer=optimizer,\n", - " metrics=[\"accuracy\"])\n", - "\n", - "early_stopping_cb = keras.callbacks.EarlyStopping(patience=20)\n", - "model_checkpoint_cb = keras.callbacks.ModelCheckpoint(\"my_cifar10_bn_model.h5\", save_best_only=True)\n", - "run_index = 1 # 모델을 훈련할 때마다 증가시킴\n", - "run_logdir = os.path.join(os.curdir, \"my_cifar10_logs\", \"run_bn_{:03d}\".format(run_index))\n", - "tensorboard_cb = keras.callbacks.TensorBoard(run_logdir)\n", - "callbacks = [early_stopping_cb, model_checkpoint_cb, tensorboard_cb]\n", - "\n", - "model.fit(X_train, y_train, epochs=100,\n", - " validation_data=(X_valid, y_valid),\n", - " callbacks=callbacks)\n", - "\n", - "model = keras.models.load_model(\"my_cifar10_bn_model.h5\")\n", - "model.evaluate(X_valid, y_valid)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "* *이전보다 빠르게 수렴하나요?* 훨씬 빠릅니다! 이전 모델은 가장 낮은 검증 손실에 도달하기 위해 39 에포크가 걸렸지만 BN을 사용한 새 모델은 18 에포크가 걸렸습니다. 이전 모델보다 두 배 이상 빠릅니다. BN 층은 훈련을 안정적으로 수행하고 더 큰 학습률을 사용할 수 있기 때문에 수렴이 빨라졌습니다.\n", - "* *BN이 더 좋은 모델을 만드나요?* 네! 최종 모델의 성능이 47%가 아니라 55% 정확도로 더 좋습니다. 이는 아주 좋은 모델이 아니지만 적어도 이전보다는 낫습니다(합성곱 신경망이 더 낫겠지만 이는 다른 주제입니다. 14장을 참고하세요).\n", - "* *BN이 훈련 속도에 영향을 미치나요?* 모델이 두 배나 빠르게 수렴했지만 각 에포크는 10초가 아니라 16초가 걸렸습니다. BN 층에서 추가된 계산 때문입니다. 따라서 전체적으로 에포크 횟수가 50% 정도 줄었지만 훈련 시간(탁상 시계 시간)은 30% 정도 줄었습니다. 결국 크게 향상되었습니다!" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### d.\n", - "*문제: 배치 정규화를 SELU로 바꾸어보세요. 네트워크가 자기 정규화하기 위해 필요한 변경 사항을 적용해보세요(즉, 입력 특성 표준화, 르쿤 정규분포 초기화, 완전 연결 층만 순차적으로 쌓은 심층 신경망 등).*" - ] - }, - { - "cell_type": "code", - "execution_count": 136, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Epoch 1/100\n", - " 2/1407 [..............................] - ETA: 5:52 - loss: 3.0440 - accuracy: 0.1094WARNING:tensorflow:Callbacks method `on_train_batch_end` is slow compared to the batch time (batch time: 0.0169s vs `on_train_batch_end` time: 0.4852s). Check your callbacks.\n", - "1407/1407 [==============================] - 23s 16ms/step - loss: 1.9306 - accuracy: 0.3076 - val_loss: 1.8329 - val_accuracy: 0.3406\n", - "Epoch 2/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.7066 - accuracy: 0.3947 - val_loss: 1.7136 - val_accuracy: 0.3778\n", - "Epoch 3/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.6115 - accuracy: 0.4309 - val_loss: 1.6743 - val_accuracy: 0.3992\n", - "Epoch 4/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.5459 - accuracy: 0.4578 - val_loss: 1.6328 - val_accuracy: 0.4376\n", - "Epoch 5/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.4916 - accuracy: 0.4795 - val_loss: 1.6314 - val_accuracy: 0.4330\n", - "Epoch 6/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.4437 - accuracy: 0.4977 - val_loss: 1.5327 - val_accuracy: 0.4724\n", - "Epoch 7/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.4014 - accuracy: 0.5092 - val_loss: 1.5317 - val_accuracy: 0.4680\n", - "Epoch 8/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.3726 - accuracy: 0.5226 - val_loss: 1.4981 - val_accuracy: 0.4874\n", - "Epoch 9/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.3349 - accuracy: 0.5344 - val_loss: 1.5136 - val_accuracy: 0.4734\n", - "Epoch 10/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.2971 - accuracy: 0.5486 - val_loss: 1.5214 - val_accuracy: 0.4786\n", - "Epoch 11/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.2706 - accuracy: 0.5600 - val_loss: 1.5285 - val_accuracy: 0.4838\n", - "Epoch 12/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.2470 - accuracy: 0.5695 - val_loss: 1.4795 - val_accuracy: 0.4980\n", - "Epoch 13/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.2192 - accuracy: 0.5766 - val_loss: 1.4753 - val_accuracy: 0.4980\n", - "Epoch 14/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.1908 - accuracy: 0.5918 - val_loss: 1.4862 - val_accuracy: 0.4942\n", - "Epoch 15/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.1665 - accuracy: 0.5987 - val_loss: 1.5071 - val_accuracy: 0.5012\n", - "Epoch 16/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.1519 - accuracy: 0.6057 - val_loss: 1.5167 - val_accuracy: 0.5024\n", - "Epoch 17/100\n", - "1407/1407 [==============================] - 21s 15ms/step - loss: 1.1274 - accuracy: 0.6107 - val_loss: 1.5477 - val_accuracy: 0.4968\n", - "Epoch 18/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.1049 - accuracy: 0.6254 - val_loss: 1.5362 - val_accuracy: 0.5068\n", - "Epoch 19/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.0837 - accuracy: 0.6309 - val_loss: 1.5754 - val_accuracy: 0.5022\n", - "Epoch 20/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.0680 - accuracy: 0.6372 - val_loss: 1.5238 - val_accuracy: 0.5052\n", - "Epoch 21/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.0469 - accuracy: 0.6425 - val_loss: 1.5312 - val_accuracy: 0.5156\n", - "Epoch 22/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.0303 - accuracy: 0.6500 - val_loss: 1.5359 - val_accuracy: 0.5084\n", - "Epoch 23/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.0084 - accuracy: 0.6583 - val_loss: 1.5369 - val_accuracy: 0.5042\n", - "Epoch 24/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 0.9944 - accuracy: 0.6624 - val_loss: 1.6013 - val_accuracy: 0.5006\n", - "Epoch 25/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 0.9793 - accuracy: 0.6706 - val_loss: 1.5512 - val_accuracy: 0.5174\n", - "Epoch 26/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 0.9579 - accuracy: 0.6772 - val_loss: 1.6008 - val_accuracy: 0.4988\n", - "Epoch 27/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 0.9484 - accuracy: 0.6799 - val_loss: 1.5746 - val_accuracy: 0.5110\n", - "Epoch 28/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 48.1621 - accuracy: 0.6212 - val_loss: 1.6674 - val_accuracy: 0.4208\n", - "Epoch 29/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.2912 - accuracy: 0.5517 - val_loss: 1.5598 - val_accuracy: 0.4728\n", - "Epoch 30/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.2315 - accuracy: 0.5735 - val_loss: 1.5738 - val_accuracy: 0.4764\n", - "Epoch 31/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.1684 - accuracy: 0.5940 - val_loss: 1.5514 - val_accuracy: 0.4878\n", - "Epoch 32/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.1293 - accuracy: 0.6084 - val_loss: 1.5258 - val_accuracy: 0.4978\n", - "Epoch 33/100\n", - "1407/1407 [==============================] - 22s 15ms/step - loss: 1.1000 - accuracy: 0.6188 - val_loss: 1.5369 - val_accuracy: 0.4970\n", - "157/157 [==============================] - 1s 3ms/step - loss: 1.4753 - accuracy: 0.1256\n" - ] - }, - { - "data": { - "text/plain": [ - "[1.475338339805603, 0.12559999525547028]" - ] - }, - "execution_count": 136, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "keras.backend.clear_session()\n", - "tf.random.set_seed(42)\n", - "np.random.seed(42)\n", - "\n", - "model = keras.models.Sequential()\n", - "model.add(keras.layers.Flatten(input_shape=[32, 32, 3]))\n", - "for _ in range(20):\n", - " model.add(keras.layers.Dense(100,\n", - " kernel_initializer=\"lecun_normal\",\n", - " activation=\"selu\"))\n", - "model.add(keras.layers.Dense(10, activation=\"softmax\"))\n", - "\n", - "optimizer = keras.optimizers.Nadam(lr=7e-4)\n", - "model.compile(loss=\"sparse_categorical_crossentropy\",\n", - " optimizer=optimizer,\n", - " metrics=[\"accuracy\"])\n", - "\n", - "early_stopping_cb = keras.callbacks.EarlyStopping(patience=20)\n", - "model_checkpoint_cb = keras.callbacks.ModelCheckpoint(\"my_cifar10_selu_model.h5\", save_best_only=True)\n", - "run_index = 1 # 모델을 훈련할 때마다 증가시킴\n", - "run_logdir = os.path.join(os.curdir, \"my_cifar10_logs\", \"run_selu_{:03d}\".format(run_index))\n", - "tensorboard_cb = keras.callbacks.TensorBoard(run_logdir)\n", - "callbacks = [early_stopping_cb, model_checkpoint_cb, tensorboard_cb]\n", - "\n", - "X_means = X_train.mean(axis=0)\n", - "X_stds = X_train.std(axis=0)\n", - "X_train_scaled = (X_train - X_means) / X_stds\n", - "X_valid_scaled = (X_valid - X_means) / X_stds\n", - "X_test_scaled = (X_test - X_means) / X_stds\n", - "\n", - "model.fit(X_train_scaled, y_train, epochs=100,\n", - " validation_data=(X_valid_scaled, y_valid),\n", - " callbacks=callbacks)\n", - "\n", - "model = keras.models.load_model(\"my_cifar10_selu_model.h5\")\n", - "model.evaluate(X_valid_scaled, y_valid)" - ] - }, - { - "cell_type": "code", - "execution_count": 137, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "157/157 [==============================] - 1s 3ms/step - loss: 1.4753 - accuracy: 0.1256\n" - ] - }, - { - "data": { - "text/plain": [ - "[1.475338339805603, 0.12559999525547028]" - ] - }, - "execution_count": 137, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "model = keras.models.load_model(\"my_cifar10_selu_model.h5\")\n", - "model.evaluate(X_valid_scaled, y_valid)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "51.4% 정확도를 얻었습니다. 원래 모델보다 더 좋습니다. 하지만 배치 정규화를 사용한 모델만큼 좋지는 않습니다. 최고의 모델에 도달하는데 13 에포크가 걸렸습니다. 이는 원본 모델이나 BN 모델보다 더 빠른 것입니다. 각 에포크는 원본 모델처럼 10초만 걸렸습니다. 따라서 이 모델이 지금까지 가장 빠른 모델입니다(에포크와 탁상 시계 기준으로)." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### e.\n", - "*문제: 알파 드롭아웃으로 모델에 규제를 적용해보세요. 그다음 모델을 다시 훈련하지 않고 MC 드롭아웃으로 더 높은 정확도를 얻을 수 있는지 확인해보세요.*" - ] - }, - { - "cell_type": "code", - "execution_count": 138, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Epoch 1/100\n", - " 2/1407 [..............................] - ETA: 4:07 - loss: 2.9857 - accuracy: 0.0938WARNING:tensorflow:Callbacks method `on_train_batch_end` is slow compared to the batch time (batch time: 0.0168s vs `on_train_batch_end` time: 0.3359s). Check your callbacks.\n", - "1407/1407 [==============================] - 23s 17ms/step - loss: 1.8896 - accuracy: 0.3275 - val_loss: 1.7313 - val_accuracy: 0.3970\n", - "Epoch 2/100\n", - "1407/1407 [==============================] - 23s 16ms/step - loss: 1.6589 - accuracy: 0.4157 - val_loss: 1.7183 - val_accuracy: 0.3916\n", - "Epoch 3/100\n", - "1407/1407 [==============================] - 23s 16ms/step - loss: 1.5727 - accuracy: 0.4479 - val_loss: 1.6073 - val_accuracy: 0.4364\n", - "Epoch 4/100\n", - "1407/1407 [==============================] - 23s 16ms/step - loss: 1.5085 - accuracy: 0.4734 - val_loss: 1.5741 - val_accuracy: 0.4524\n", - "Epoch 5/100\n", - "1407/1407 [==============================] - 23s 16ms/step - loss: 1.4525 - accuracy: 0.4946 - val_loss: 1.5663 - val_accuracy: 0.4592\n", - "Epoch 6/100\n", - "1407/1407 [==============================] - 23s 16ms/step - loss: 1.4032 - accuracy: 0.5124 - val_loss: 1.5255 - val_accuracy: 0.4644\n", - "Epoch 7/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.3581 - accuracy: 0.5255 - val_loss: 1.6598 - val_accuracy: 0.4662\n", - "Epoch 8/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.3209 - accuracy: 0.5400 - val_loss: 1.5027 - val_accuracy: 0.5002\n", - "Epoch 9/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.2845 - accuracy: 0.5562 - val_loss: 1.5246 - val_accuracy: 0.4896\n", - "Epoch 10/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.2526 - accuracy: 0.5659 - val_loss: 1.5510 - val_accuracy: 0.4956\n", - "Epoch 11/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.2160 - accuracy: 0.5808 - val_loss: 1.5559 - val_accuracy: 0.5002\n", - "Epoch 12/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.1902 - accuracy: 0.5900 - val_loss: 1.5478 - val_accuracy: 0.4968\n", - "Epoch 13/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.1602 - accuracy: 0.6021 - val_loss: 1.5727 - val_accuracy: 0.5124\n", - "Epoch 14/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.1392 - accuracy: 0.6102 - val_loss: 1.5654 - val_accuracy: 0.4944\n", - "Epoch 15/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.1086 - accuracy: 0.6210 - val_loss: 1.5868 - val_accuracy: 0.5064\n", - "Epoch 16/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.0856 - accuracy: 0.6289 - val_loss: 1.6016 - val_accuracy: 0.5042\n", - "Epoch 17/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.0620 - accuracy: 0.6397 - val_loss: 1.6458 - val_accuracy: 0.4968\n", - "Epoch 18/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.0511 - accuracy: 0.6405 - val_loss: 1.6276 - val_accuracy: 0.5096\n", - "Epoch 19/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.0203 - accuracy: 0.6514 - val_loss: 1.7246 - val_accuracy: 0.5062\n", - "Epoch 20/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 1.0024 - accuracy: 0.6598 - val_loss: 1.6570 - val_accuracy: 0.5064\n", - "Epoch 21/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 0.9845 - accuracy: 0.6662 - val_loss: 1.6697 - val_accuracy: 0.4990\n", - "Epoch 22/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 0.9641 - accuracy: 0.6738 - val_loss: 1.7560 - val_accuracy: 0.5010\n", - "Epoch 23/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 0.9387 - accuracy: 0.6797 - val_loss: 1.7716 - val_accuracy: 0.5008\n", - "Epoch 24/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 0.9290 - accuracy: 0.6852 - val_loss: 1.7688 - val_accuracy: 0.5026\n", - "Epoch 25/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 0.9176 - accuracy: 0.6899 - val_loss: 1.8131 - val_accuracy: 0.5042\n", - "Epoch 26/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 0.8925 - accuracy: 0.6986 - val_loss: 1.8228 - val_accuracy: 0.4904\n", - "Epoch 27/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 0.8680 - accuracy: 0.7060 - val_loss: 1.8546 - val_accuracy: 0.5048\n", - "Epoch 28/100\n", - "1407/1407 [==============================] - 22s 16ms/step - loss: 0.8638 - accuracy: 0.7091 - val_loss: 1.8004 - val_accuracy: 0.4954\n", - "157/157 [==============================] - 1s 3ms/step - loss: 1.5027 - accuracy: 0.0914\n" - ] - }, - { - "data": { - "text/plain": [ - "[1.5026599168777466, 0.09139999747276306]" - ] - }, - "execution_count": 138, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "keras.backend.clear_session()\n", - "tf.random.set_seed(42)\n", - "np.random.seed(42)\n", - "\n", - "model = keras.models.Sequential()\n", - "model.add(keras.layers.Flatten(input_shape=[32, 32, 3]))\n", - "for _ in range(20):\n", - " model.add(keras.layers.Dense(100,\n", - " kernel_initializer=\"lecun_normal\",\n", - " activation=\"selu\"))\n", - "\n", - "model.add(keras.layers.AlphaDropout(rate=0.1))\n", - "model.add(keras.layers.Dense(10, activation=\"softmax\"))\n", - "\n", - "optimizer = keras.optimizers.Nadam(lr=5e-4)\n", - "model.compile(loss=\"sparse_categorical_crossentropy\",\n", - " optimizer=optimizer,\n", - " metrics=[\"accuracy\"])\n", - "\n", - "early_stopping_cb = keras.callbacks.EarlyStopping(patience=20)\n", - "model_checkpoint_cb = keras.callbacks.ModelCheckpoint(\"my_cifar10_alpha_dropout_model.h5\", save_best_only=True)\n", - "run_index = 1 # 모델을 훈련할 때마다 증가시킴\n", - "run_logdir = os.path.join(os.curdir, \"my_cifar10_logs\", \"run_alpha_dropout_{:03d}\".format(run_index))\n", - "tensorboard_cb = keras.callbacks.TensorBoard(run_logdir)\n", - "callbacks = [early_stopping_cb, model_checkpoint_cb, tensorboard_cb]\n", - "\n", - "X_means = X_train.mean(axis=0)\n", - "X_stds = X_train.std(axis=0)\n", - "X_train_scaled = (X_train - X_means) / X_stds\n", - "X_valid_scaled = (X_valid - X_means) / X_stds\n", - "X_test_scaled = (X_test - X_means) / X_stds\n", - "\n", - "model.fit(X_train_scaled, y_train, epochs=100,\n", - " validation_data=(X_valid_scaled, y_valid),\n", - " callbacks=callbacks)\n", - "\n", - "model = keras.models.load_model(\"my_cifar10_alpha_dropout_model.h5\")\n", - "model.evaluate(X_valid_scaled, y_valid)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "이 모델은 검증 세트에서 50.8% 정확도에 도달합니다. 드롭아웃이 없을 때보다(51.4%) 조금 더 나쁩니다. 하이퍼파라미터 탐색을 좀 많이 수행해 보면 더 나아 질 수 있습니다(드롭아웃 비율 5%, 10%, 20%, 40%과 학습률 1e-4, 3e-4, 5e-4, 1e-3을 시도했습니다). 하지만 이 경우에는 크지 않을 것 같습니다." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "이제 MC 드롭아웃을 사용해 보죠. 앞서 사용한 `MCAlphaDropout` 클래스를 복사해 사용하겠습니다:" - ] - }, - { - "cell_type": "code", - "execution_count": 139, - "metadata": {}, - "outputs": [], - "source": [ - "class MCAlphaDropout(keras.layers.AlphaDropout):\n", - " def call(self, inputs):\n", - " return super().call(inputs, training=True)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "방금 훈련했던 모델과 (같은 가중치를 가진) 동일한 새로운 모델을 만들어 보죠. 하지만 `AlphaDropout` 층 대신 `MCAlphaDropout` 드롭아웃 층을 사용합니다:" - ] - }, - { - "cell_type": "code", - "execution_count": 140, - "metadata": {}, - "outputs": [], - "source": [ - "mc_model = keras.models.Sequential([\n", - " MCAlphaDropout(layer.rate) if isinstance(layer, keras.layers.AlphaDropout) else layer\n", - " for layer in model.layers\n", - "])" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "그다음 몇 가지 유틸리티 함수를 추가합니다. 첫 번째 함수는 모델을 여러 번 실행합니다(기본적으로 10번). 그다음 평균한 예측 클래스 확률을 반환합니다. 두 번째 함수는 이 평균 확률을 사용해 각 샘플의 클래스를 예측합니다:" - ] - }, - { - "cell_type": "code", - "execution_count": 141, - "metadata": {}, - "outputs": [], - "source": [ - "def mc_dropout_predict_probas(mc_model, X, n_samples=10):\n", - " Y_probas = [mc_model.predict(X) for sample in range(n_samples)]\n", - " return np.mean(Y_probas, axis=0)\n", - "\n", - "def mc_dropout_predict_classes(mc_model, X, n_samples=10):\n", - " Y_probas = mc_dropout_predict_probas(mc_model, X, n_samples)\n", - " return np.argmax(Y_probas, axis=1)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "이제 검증 세트의 모든 샘플에 대해 예측을 만들고 정확도를 계산해 보죠:" - ] - }, - { - "cell_type": "code", - "execution_count": 142, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "0.497" - ] - }, - "execution_count": 142, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "keras.backend.clear_session()\n", - "tf.random.set_seed(42)\n", - "np.random.seed(42)\n", - "\n", - "y_pred = mc_dropout_predict_classes(mc_model, X_valid_scaled)\n", - "accuracy = np.mean(y_pred == y_valid[:, 0])\n", - "accuracy" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "이 경우에는 실제적인 정확도 향상이 없습니다(50.8%에서 50.9%).\n", - "\n", - "따라서 이 연습문에서 얻은 최상의 모델은 배치 정규화 모델입니다." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### f.\n", - "*문제: 1사이클 스케줄링으로 모델을 다시 훈련하고 훈련 속도와 모델 정확도가 향상되는지 확인해보세요.*" - ] - }, - { - "cell_type": "code", - "execution_count": 143, - "metadata": {}, - "outputs": [], - "source": [ - "keras.backend.clear_session()\n", - "tf.random.set_seed(42)\n", - "np.random.seed(42)\n", - "\n", - "model = keras.models.Sequential()\n", - "model.add(keras.layers.Flatten(input_shape=[32, 32, 3]))\n", - "for _ in range(20):\n", - " model.add(keras.layers.Dense(100,\n", - " kernel_initializer=\"lecun_normal\",\n", - " activation=\"selu\"))\n", - "\n", - "model.add(keras.layers.AlphaDropout(rate=0.1))\n", - "model.add(keras.layers.Dense(10, activation=\"softmax\"))\n", - "\n", - "optimizer = keras.optimizers.SGD(lr=1e-3)\n", - "model.compile(loss=\"sparse_categorical_crossentropy\",\n", - " optimizer=optimizer,\n", - " metrics=[\"accuracy\"])" - ] - }, - { - "cell_type": "code", - "execution_count": 144, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "352/352 [==============================] - 2s 7ms/step - loss: nan - accuracy: 0.1399\n" - ] - }, - { - "data": { - "text/plain": [ - "[1e-05, 9.999868, 2.6130447387695312, 4.006446089063372]" - ] - }, - "execution_count": 144, - "metadata": {}, - "output_type": "execute_result" - }, - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYkAAAEVCAYAAAAVeRmFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3deXwV5dn/8c+VPZCENQlbIOxrASUIKIiAglartm7YqrVqaV1a7aJP2+dpa9VfrRa72D5qaevjghbrUvddBMUFDAgoKIgsIbJF2Q2EkFy/P86JxpiBBJIzycn3/XrNyzMzdybXneD5Zu57zoy5OyIiIrVJCLsAERFpuhQSIiISSCEhIiKBFBIiIhJIISEiIoEUEiIiEkghISIigUIJCTPra2Z7zWxmwH4zs5vM7JPocpOZWazrFBFp6ZJC+r7/C7x1gP3TgNOBYYADLwBrgDsavzQREakS8zMJM5sKbAdeOkCzbwO3uHuxu38E3AJcGIPyRESkmpieSZhZFnAdMBG45ABNBwNLqq0viW47oI4dO3p+fv7hlCgiTciOPeUUbS2lb04macmaQm0sCxcu/Njds2vbF+vhpuuBf7p78UGmGDKAHdXWdwAZZmZe42ZTZjaNyPAU3bt3p7CwsIFLFpGwPLV0I5ffv4hHfnQs/XIzwy4nbpnZuqB9MYtmMxsOHA/8sQ7NdwNZ1dazgN01AwLA3We4e4G7F2Rn1xqEIiJyiGJ5JnEckA8URc8iMoBEMxvk7kfWaLuMyKT1guj6sO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pNqHO48wIBxwAXVtv8KeIzIbaMfAO40s+4HKe3/AbdGv+YtYJaZZURr7k7kbqNPRfffCtxcxy7/GHgfKCDyCE2I3IzuImAgcBmRZ5//d3TfA8AtwAoiw2KdgQfq+HOTlijsOwxq0VLfhcgzkp8M2DeRyMNi0mtsXwxcc4BjzgL+UW19DrC0lnYO3FhtPQkoBc6r0ebM6Ov86Pr3qu3vGt02Nrp+I/Beje/zi2ib/APUvBZ4og4/r+8Dq6qtXwu82xA/Ny3xvzTXx5eKBBkBtAJKIn8cfyYN6A1gZonAz4BziLxhpwIpRIKhuoUB32Np1Qt33x8djso5SF1Lq73eEP1v1dcMIHJ2Ud38gxyvSmHNDdGhrquAPkQewZkYXQ7koD83aZkUEhJvEoDNRIaIaqp6XvFPgZ8AVwLvEPkL+rd8+Y3+04DvUV5j3Tn40O1nX+PuHn0jbojh3i/UaGajiZwV/Qb4EbAdOBWYfpDj1OXnJi2QQkLizSIgF6h099UBbcYSGaa5Fz6bx+hH5A01DO8TeeJZdUcd4rGOAT5y9+urNphZjxpt9vHlM4u6/NykBdLEtTRXWWY2vMaSD7xI5Eqkx8zsJDPraWZjzOw3Zlb1V/JKYJKZjTWzAcBfgZ6h9CLiDqB39Eqq/mb2DeB70X31fSrYSqCrmX3LzHqZ2aXAuTXarAV6mNmRZtbRzFKp289NWiCFhDRX44C3ayzT3d2BrwKzgb8TuYrn30B/Pp8LuAFYADxD5AqeT4lePhoGd18HnEFkWGgJkWGi30R3763nsZ4Afg/8icg8yAlErsaq7mHgaeAloAQ4t44/N2mB9PhSkSbIzK4ErgPauv4nlRBpTkKkCTCzy4lc4VQCjAZ+CdylgJCwKSREmoY+RD4b0QEoJjJPcV2oFYmg4SYRETkATVyLiEgghYSIiARSSIiISCCFhIiIBFJIiIhIIIWEiIgE+v9q42mZ4//yRgAAAABJRU5ErkJggg==\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "batch_size = 128\n", - "rates, losses = find_learning_rate(model, X_train_scaled, y_train, epochs=1, batch_size=batch_size)\n", - "plot_lr_vs_loss(rates, losses)\n", - "plt.axis([min(rates), max(rates), min(losses), (losses[0] + min(losses)) / 1.4])" - ] - }, - { - "cell_type": "code", - "execution_count": 145, - "metadata": {}, - "outputs": [], - "source": [ - "keras.backend.clear_session()\n", - "tf.random.set_seed(42)\n", - "np.random.seed(42)\n", - "\n", - "model = keras.models.Sequential()\n", - "model.add(keras.layers.Flatten(input_shape=[32, 32, 3]))\n", - "for _ in range(20):\n", - " model.add(keras.layers.Dense(100,\n", - " kernel_initializer=\"lecun_normal\",\n", - " activation=\"selu\"))\n", - "\n", - "model.add(keras.layers.AlphaDropout(rate=0.1))\n", - "model.add(keras.layers.Dense(10, activation=\"softmax\"))\n", - "\n", - "optimizer = keras.optimizers.SGD(lr=1e-2)\n", - "model.compile(loss=\"sparse_categorical_crossentropy\",\n", - " optimizer=optimizer,\n", - " metrics=[\"accuracy\"])" - ] - }, - { - "cell_type": "code", - "execution_count": 146, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Epoch 1/15\n", - "352/352 [==============================] - 3s 9ms/step - loss: 2.0537 - accuracy: 0.2843 - val_loss: 1.7811 - val_accuracy: 0.3744\n", - "Epoch 2/15\n", - "352/352 [==============================] - 3s 7ms/step - loss: 1.7635 - accuracy: 0.3765 - val_loss: 1.6431 - val_accuracy: 0.4252\n", - "Epoch 3/15\n", - "352/352 [==============================] - 3s 7ms/step - loss: 1.6241 - accuracy: 0.4217 - val_loss: 1.6001 - val_accuracy: 0.4368\n", - "Epoch 4/15\n", - "352/352 [==============================] - 3s 7ms/step - loss: 1.5434 - accuracy: 0.4520 - val_loss: 1.6114 - val_accuracy: 0.4310\n", - "Epoch 5/15\n", - "352/352 [==============================] - 3s 7ms/step - loss: 1.4914 - accuracy: 0.4710 - val_loss: 1.5895 - val_accuracy: 0.4434\n", - "Epoch 6/15\n", - "352/352 [==============================] - 3s 7ms/step - loss: 1.4510 - accuracy: 0.4818 - val_loss: 1.5678 - val_accuracy: 0.4506\n", - "Epoch 7/15\n", - "352/352 [==============================] - 3s 7ms/step - loss: 1.4143 - accuracy: 0.4979 - val_loss: 1.6717 - val_accuracy: 0.4294\n", - "Epoch 8/15\n", - "352/352 [==============================] - 3s 7ms/step - loss: 1.3462 - accuracy: 0.5199 - val_loss: 1.4928 - val_accuracy: 0.4956\n", - "Epoch 9/15\n", - "352/352 [==============================] - 3s 7ms/step - loss: 1.2691 - accuracy: 0.5481 - val_loss: 1.5294 - val_accuracy: 0.4818\n", - "Epoch 10/15\n", - "352/352 [==============================] - 3s 7ms/step - loss: 1.1994 - accuracy: 0.5713 - val_loss: 1.5165 - val_accuracy: 0.4978\n", - "Epoch 11/15\n", - "352/352 [==============================] - 3s 7ms/step - loss: 1.1308 - accuracy: 0.5980 - val_loss: 1.5070 - val_accuracy: 0.5100\n", - "Epoch 12/15\n", - "352/352 [==============================] - 3s 7ms/step - loss: 1.0632 - accuracy: 0.6184 - val_loss: 1.4833 - val_accuracy: 0.5244\n", - "Epoch 13/15\n", - "352/352 [==============================] - 3s 7ms/step - loss: 0.9932 - accuracy: 0.6447 - val_loss: 1.5314 - val_accuracy: 0.5292\n", - "Epoch 14/15\n", - "352/352 [==============================] - 3s 7ms/step - loss: 0.9279 - accuracy: 0.6671 - val_loss: 1.5495 - val_accuracy: 0.5248\n", - "Epoch 15/15\n", - "352/352 [==============================] - 3s 7ms/step - loss: 0.8880 - accuracy: 0.6845 - val_loss: 1.5840 - val_accuracy: 0.5288\n" - ] + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "YT0En5VzLOo4" + }, + "source": [ + "**11장 – 심층 신경망 훈련하기**" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "fmWAAqyeLOo9" + }, + "source": [ + "_이 노트북은 11장에 있는 모든 샘플 코드와 연습문제 해답을 가지고 있습니다._" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "mYZM1mKhLOo9" + }, + "source": [ + "\n", + " \n", + "
\n", + " 구글 코랩에서 실행하기\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "4mgMAdZzLOo-" + }, + "source": [ + "# 설정" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "EnYYn3E9LOo-" + }, + "source": [ + "먼저 몇 개의 모듈을 임포트합니다. 맷플롯립 그래프를 인라인으로 출력하도록 만들고 그림을 저장하는 함수를 준비합니다. 또한 파이썬 버전이 3.5 이상인지 확인합니다(파이썬 2.x에서도 동작하지만 곧 지원이 중단되므로 파이썬 3을 사용하는 것이 좋습니다). 사이킷런 버전이 0.20 이상인지와 텐서플로 버전이 2.0 이상인지 확인합니다." + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "M1cwJnMALOo-" + }, + "source": [ + "# 파이썬 ≥3.5 필수\n", + "import sys\n", + "assert sys.version_info >= (3, 5)\n", + "\n", + "# 사이킷런 ≥0.20 필수\n", + "import sklearn\n", + "assert sklearn.__version__ >= \"0.20\"\n", + "\n", + "# 텐서플로 ≥2.0 필수\n", + "import tensorflow as tf\n", + "from tensorflow import keras\n", + "assert tf.__version__ >= \"2.0\"\n", + "\n", + "%load_ext tensorboard\n", + "\n", + "# 공통 모듈 임포트\n", + "import numpy as np\n", + "import os\n", + "\n", + "# 노트북 실행 결과를 동일하게 유지하기 위해\n", + "np.random.seed(42)\n", + "\n", + "# 깔끔한 그래프 출력을 위해\n", + "%matplotlib inline\n", + "import matplotlib as mpl\n", + "import matplotlib.pyplot as plt\n", + "mpl.rc('axes', labelsize=14)\n", + "mpl.rc('xtick', labelsize=12)\n", + "mpl.rc('ytick', labelsize=12)\n", + "\n", + "# 그림을 저장할 위치\n", + "PROJECT_ROOT_DIR = \".\"\n", + "CHAPTER_ID = \"deep\"\n", + "IMAGES_PATH = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID)\n", + "os.makedirs(IMAGES_PATH, exist_ok=True)\n", + "\n", + "def save_fig(fig_id, tight_layout=True, fig_extension=\"png\", resolution=300):\n", + " path = os.path.join(IMAGES_PATH, fig_id + \".\" + fig_extension)\n", + " print(\"그림 저장:\", fig_id)\n", + " if tight_layout:\n", + " plt.tight_layout()\n", + " plt.savefig(path, format=fig_extension, dpi=resolution)" + ], + "execution_count": 1, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "Uts4Q0qDLOpA" + }, + "source": [ + "# 그레이디언트 소실과 폭주 문제" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "C27geIKhLOpA" + }, + "source": [ + "def logit(z):\n", + " return 1 / (1 + np.exp(-z))" + ], + "execution_count": 2, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "YnIN46vHLOpA", + "outputId": "58f5e1b1-9ff7-46fd-9779-c7eb28f29c1c", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 315 + } + }, + "source": [ + "z = np.linspace(-5, 5, 200)\n", + "\n", + "plt.plot([-5, 5], [0, 0], 'k-')\n", + "plt.plot([-5, 5], [1, 1], 'k--')\n", + "plt.plot([0, 0], [-0.2, 1.2], 'k-')\n", + "plt.plot([-5, 5], [-3/4, 7/4], 'g--')\n", + "plt.plot(z, logit(z), \"b-\", linewidth=2)\n", + "props = dict(facecolor='black', shrink=0.1)\n", + "plt.annotate('Saturating', xytext=(3.5, 0.7), xy=(5, 1), arrowprops=props, fontsize=14, ha=\"center\")\n", + "plt.annotate('Saturating', xytext=(-3.5, 0.3), xy=(-5, 0), arrowprops=props, fontsize=14, ha=\"center\")\n", + "plt.annotate('Linear', xytext=(2, 0.2), xy=(0, 0.5), arrowprops=props, fontsize=14, ha=\"center\")\n", + "plt.grid(True)\n", + "plt.title(\"Sigmoid activation function\", fontsize=14)\n", + "plt.axis([-5, 5, -0.2, 1.2])\n", + "\n", + "save_fig(\"sigmoid_saturation_plot\")\n", + "plt.show()" + ], + "execution_count": 3, + "outputs": [ + { + "output_type": "stream", + "text": [ + "그림 저장: sigmoid_saturation_plot\n" + ], + "name": "stdout" + }, + { + "output_type": "display_data", + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAagAAAEYCAYAAAAJeGK1AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nOzdd3wUxfvA8c8kl54AoYVelBqqFKUIiRSRonQVKUFQpNgoIoIgiIqgtK9Y8CcYiiBdKYKgEEBAIWAChBJFqoQSIEBC+s3vjz1iygUCXHIpz/v12ldyu3M7z20u99zszs4orTVCCCFEbuNg7wCEEEIIayRBCSGEyJUkQQkhhMiVJEEJIYTIlSRBCSGEyJUkQQkhhMiVJEGJB6KUClJKzbF3HJC1WJRSh5VSE3MopNT1Biql1udAPf5KKa2UKp4DdQ1SSp1RSpntcUzTxdJfKRVtzxiE7Sm5D0pkRilVApgEdABKA1HAYeBjrfUWS5miQKLW+qbdArXISixKqcPASq31xGyKwR/YBpTQWkemWl8Y4/8tyoZ1nQLmaK0/TbXOGSgKXNTZ+M+tlPIGLgEjgJXATa11jiQIpZQGemqtV6Za5wZ4aa0v5UQMImeY7B2AyNVWAe7AQOBvoCTgBxS7XUBrfdU+oWWUm2JJT2t9PYfqSQAu5EBVFTE+P9ZrrSNyoL470lrHArH2jkPYmNZaFlkyLEARQANt7lIuCONb/O3HPsBajA+L08CLGK2uianKaGAI8CNwCwgHngDKAT8DMUAI0CBdXd2AQ0A8cBYYh+UsQCaxlLTUcTuWAeljsfJ6HrY854IljgNAp3RlnIGPLPuMB/4BXgcqWV5b6iXQ8pxAjA9zgEHARcAx3X6XAGuzEofltaapy7Le3/K4+D0ct1PAu8Bc4AZwDnjrDseov5XXWQmYCBy2UjY61eOJlr/B88AJ4CbwQ+p4LeUCUsV8EViQKtbU9Z6yVo9l3SsYX6wSLD9fTrddW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UVORK5CYII=\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "tags": [], + "needs_background": "light" + } + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "z9my8UBcLOpB" + }, + "source": [ + "## Xavier 초기화와 He 초기화" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "P0IEVGXYLOpC", + "outputId": "d9bbf038-78f4-43bc-8b80-0e352849cea5", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "[name for name in dir(keras.initializers) if not name.startswith(\"_\")]" + ], + "execution_count": 4, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "['Constant',\n", + " 'GlorotNormal',\n", + " 'GlorotUniform',\n", + " 'HeNormal',\n", + " 'HeUniform',\n", + " 'Identity',\n", + " 'Initializer',\n", + " 'LecunNormal',\n", + " 'LecunUniform',\n", + " 'Ones',\n", + " 'Orthogonal',\n", + " 'RandomNormal',\n", + " 'RandomUniform',\n", + " 'TruncatedNormal',\n", + " 'VarianceScaling',\n", + " 'Zeros',\n", + " 'constant',\n", + " 'deserialize',\n", + " 'get',\n", + " 'glorot_normal',\n", + " 'glorot_uniform',\n", + " 'he_normal',\n", + " 'he_uniform',\n", + " 'identity',\n", + " 'lecun_normal',\n", + " 'lecun_uniform',\n", + " 'ones',\n", + " 'orthogonal',\n", + " 'random_normal',\n", + " 'random_uniform',\n", + " 'serialize',\n", + " 'truncated_normal',\n", + " 'variance_scaling',\n", + " 'zeros']" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 4 + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "kBczZ42qLOpC", + "outputId": "72b19158-02f2-4689-b333-3cad5f5ec4bb", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "keras.layers.Dense(10, activation=\"relu\", kernel_initializer=\"he_normal\")" + ], + "execution_count": 5, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 5 + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "iSo-rN5kLOpC", + "outputId": "7fb5008f-e89b-48b9-d6f9-5f7bb5f76f8d", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "init = keras.initializers.VarianceScaling(scale=2., mode='fan_avg',\n", + " distribution='uniform')\n", + "keras.layers.Dense(10, activation=\"relu\", kernel_initializer=init)" + ], + "execution_count": 6, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 6 + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "ehWhAiMGLOpC" + }, + "source": [ + "## 수렴하지 않는 활성화 함수" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "Xm1OvmTKLOpD" + }, + "source": [ + "### LeakyReLU" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "WPfFeM26LOpD" + }, + "source": [ + "def leaky_relu(z, alpha=0.01):\n", + " return np.maximum(alpha*z, z)" + ], + "execution_count": 7, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "mmZMEcRNLOpD", + "outputId": "f26e717a-01f4-436f-d839-57520655d516", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 315 + } + }, + "source": [ + "plt.plot(z, leaky_relu(z, 0.05), \"b-\", linewidth=2)\n", + "plt.plot([-5, 5], [0, 0], 'k-')\n", + "plt.plot([0, 0], [-0.5, 4.2], 'k-')\n", + "plt.grid(True)\n", + "props = dict(facecolor='black', shrink=0.1)\n", + "plt.annotate('Leak', xytext=(-3.5, 0.5), xy=(-5, -0.2), arrowprops=props, fontsize=14, ha=\"center\")\n", + "plt.title(\"Leaky ReLU activation function\", fontsize=14)\n", + "plt.axis([-5, 5, -0.5, 4.2])\n", + "\n", + "save_fig(\"leaky_relu_plot\")\n", + "plt.show()" + ], + "execution_count": 8, + "outputs": [ + { + "output_type": "stream", + "text": [ + "그림 저장: leaky_relu_plot\n" + ], + "name": "st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iibz33nv7XOc999xDbm4uf//73+MdX9LELbf4a0+dOvlGEVlZQScSaRwVqAZs3LiRk08+mT59+vD++++zaNEiSkpKOOuss6ip8SOP7ty5k4suuoh33nmH999/n379+nHGGWfw9ddf77U+5xwTJkxg6tSpvPXWWxx33HHN/ZQkBc2Z43/j1LIlzJ0L//VfQScSabwmHVE3FT322GP07duXe+6559t5zzzzDJ06daKwsJD+/fvzs5/9bI+/mTp1KvPnz+cvf/kLF1544bfzq6urueSSS1iyZAlLliyhe/fuzfY8JHUtXw4XX+ynH3gABgwINo9IU1GBasAHH3zA22+/TVYd50vWrFlD//792bJlC7fccgt/+9vf2Lx5M9XV1ZSVlfH555/vsfyECRPIyMhg6dKldO7cubmegqSwrVt9o4iyMhg9GsaNCzqRSNNRgWpATU0NAwcOZMqUKXs91iXUHfSoUaPYvHkzDz74ID169GC//fZjwIABVFZW7rH8z3/+c5577jlee+01Ro8e3RzxJYXt2gXDhsHnn8OPfuR7K1ejCEklKlANOProo5k7dy7du3enVatWdS6zePFiHn74YQYOHAjA5s2b2bhx417LnXHGGZxzzjkMGzYMM2PUqFFxzS6p7Ve/8r2UH3ggLFjgh9EQSSVqJBFmx44dLF++fI/bwIEDKS4u5rzzzmPp0qV89tlnLFq0iLFjx7Jz504AevbsyaxZs1i5ciXLli1j+PDhtK5nJLhBgwbxwgsvcMUVV/DMM88059OTFPLUU/CHP/gBBxcsgK5dg04k0vR0BBXmnXfe4aijjtpj3pAhQ1iyZAkTJ07k9NNPp7y8nG7dunHqqaey3377ATBjxgzGjh3LMcccQ9euXZk0aRJbt26tdzuDBg1i7ty5nHvuuQCMHDkyfk9KUs6778JVV/npadNADUElValAhcycOZOZM2fW+/i+uinq27cvS5cu3WPeRRddtMd959we988880zKysqiDyppbf16OOccf/3pmmu+a70nkop0ik8kSZSVweDBsHkz/OxnUEe7HZGUogIlkgScg8svh8JC6NHD/zC3njY7IilDBUokCfz+9/Dss5CZ6bsxys0NOpFI/KV8gVq1ahUzZswIOoZ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AAZOB6c659UEHSVZm1gqYDTztnPtX0HkSVBawo9a8YqB9AFmSlt5rMUnqz7iULVBmVmBmrp7bYjPrB5wCPBh01kTT0L4LW64F8Cz+2srVgQVOfCVAdq152cDOALIkJb3XopcKn3EZQQeIF+dc/r4eN7NrgR7A52YG/ltuSzPr5Zw7Ou4BE1hD+w7A/E6bjr/of4Zzble8cyWx1UCGmR3mnPt3aF5fdJoqInqvxSyfJP+MS9uujswskz2/1U7Av5hXOue2BhIqiZjZNKAfcIpzriToPInOzJ4HHHAZfr+9BvzYOaci1QC912KTCp9xKXsE1RDnXClQuvu+mZUA5cnywgXJzLoDlwMVwKbQtzOAy51zswMLltiuAmYAW4Cv8R8SKk4N0HstdqnwGZe2R1AiIpLYUraRhIiIJDcVKBERSUgqUCIikpBUoEREJCGpQImISEJSgRIRkYSkAiUiIglJBUpERBLS/wNeW/JBHnKHvAAAAABJRU5ErkJggg==\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "tags": [], + "needs_background": "light" + } + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "c34zBGD7LOpD", + "outputId": "f4b860b4-3a2d-4a12-e458-de2efaa93051", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "[m for m in dir(keras.activations) if not m.startswith(\"_\")]" + ], + "execution_count": 9, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "['deserialize',\n", + " 'elu',\n", + " 'exponential',\n", + " 'gelu',\n", + " 'get',\n", + " 'hard_sigmoid',\n", + " 'linear',\n", + " 'relu',\n", + " 'selu',\n", + " 'serialize',\n", + " 'sigmoid',\n", + " 'softmax',\n", + " 'softplus',\n", + " 'softsign',\n", + " 'swish',\n", + " 'tanh']" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 9 + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "eD78rel6LOpD", + "outputId": "777d81bf-2701-4898-96c1-e9f18627cf82", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "[m for m in dir(keras.layers) if \"relu\" in m.lower()]" + ], + "execution_count": 10, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "['LeakyReLU', 'PReLU', 'ReLU', 'ThresholdedReLU']" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 10 + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "zT5BPUCELOpE" + }, + "source": [ + "LeakyReLU를 사용해 패션 MNIST에서 신경망을 훈련해 보죠:" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "aW_rOsgrLOpE", + "outputId": "43769acc-8742-4108-fe80-83acde336789", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "(X_train_full, y_train_full), (X_test, y_test) = keras.datasets.fashion_mnist.load_data()\n", + "X_train_full = X_train_full / 255.0\n", + "X_test = X_test / 255.0\n", + "X_valid, X_train = X_train_full[:5000], X_train_full[5000:]\n", + "y_valid, y_train = y_train_full[:5000], y_train_full[5000:]" + ], + "execution_count": 11, + "outputs": [ + { + "output_type": "stream", + "text": [ + "Downloading data from https://storage.googleapis.com/tensorflow/tf-keras-datasets/train-labels-idx1-ubyte.gz\n", + "32768/29515 [=================================] - 0s 0us/step\n", + "Downloading data from https://storage.googleapis.com/tensorflow/tf-keras-datasets/train-images-idx3-ubyte.gz\n", + "26427392/26421880 [==============================] - 0s 0us/step\n", + "Downloading data from https://storage.googleapis.com/tensorflow/tf-keras-datasets/t10k-labels-idx1-ubyte.gz\n", + "8192/5148 [===============================================] - 0s 0us/step\n", + "Downloading data from https://storage.googleapis.com/tensorflow/tf-keras-datasets/t10k-images-idx3-ubyte.gz\n", + "4423680/4422102 [==============================] - 0s 0us/step\n" + ], + "name": "stdout" + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "zvSaZ4qGLOpE" + }, + "source": [ + "tf.random.set_seed(42)\n", + "np.random.seed(42)\n", + "\n", + "model = keras.models.Sequential([\n", + " keras.layers.Flatten(input_shape=[28, 28]),\n", + " keras.layers.Dense(300, kernel_initializer=\"he_normal\"),\n", + " keras.layers.LeakyReLU(),\n", + " keras.layers.Dense(100, kernel_initializer=\"he_normal\"),\n", + " keras.layers.LeakyReLU(),\n", + " keras.layers.Dense(10, activation=\"softmax\")\n", + "])" + ], + "execution_count": 12, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "8iTzAFZ5LOpE" + }, + "source": [ + "model.compile(loss=\"sparse_categorical_crossentropy\",\n", + " optimizer=keras.optimizers.SGD(lr=1e-3),\n", + " metrics=[\"accuracy\"])" + ], + "execution_count": 13, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "scrolled": true, + "id": "JqVTPhfHLOpE", + "outputId": "9efa9999-4ff7-44b9-94b0-9e5bbd8c1a61", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "history = model.fit(X_train, y_train, epochs=10,\n", + " validation_data=(X_valid, y_valid))" + ], + "execution_count": 14, + "outputs": [ + { + "output_type": "stream", + "text": [ + "Epoch 1/10\n", + "1719/1719 [==============================] - 5s 2ms/step - loss: 1.6314 - accuracy: 0.5054 - val_loss: 0.8886 - val_accuracy: 0.7160\n", + "Epoch 2/10\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.8416 - accuracy: 0.7247 - val_loss: 0.7130 - val_accuracy: 0.7656\n", + "Epoch 3/10\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.7053 - accuracy: 0.7637 - val_loss: 0.6427 - val_accuracy: 0.7898\n", + "Epoch 4/10\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.6325 - accuracy: 0.7908 - val_loss: 0.5900 - val_accuracy: 0.8066\n", + "Epoch 5/10\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.5992 - accuracy: 0.8021 - val_loss: 0.5582 - val_accuracy: 0.8198\n", + "Epoch 6/10\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.5624 - accuracy: 0.8142 - val_loss: 0.5350 - val_accuracy: 0.8238\n", + "Epoch 7/10\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.5379 - accuracy: 0.8217 - val_loss: 0.5156 - val_accuracy: 0.8304\n", + "Epoch 8/10\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.5152 - accuracy: 0.8296 - val_loss: 0.5079 - val_accuracy: 0.8284\n", + "Epoch 9/10\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.5100 - accuracy: 0.8270 - val_loss: 0.4895 - val_accuracy: 0.8388\n", + "Epoch 10/10\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.4918 - accuracy: 0.8339 - val_loss: 0.4817 - val_accuracy: 0.8398\n" + ], + "name": "stdout" + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "O4AS1dmTLOpE" + }, + "source": [ + "PReLU를 테스트해 보죠:" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "eLqcJVxfLOpF" + }, + "source": [ + "tf.random.set_seed(42)\n", + "np.random.seed(42)\n", + "\n", + "model = keras.models.Sequential([\n", + " keras.layers.Flatten(input_shape=[28, 28]),\n", + " keras.layers.Dense(300, kernel_initializer=\"he_normal\"),\n", + " keras.layers.PReLU(),\n", + " keras.layers.Dense(100, kernel_initializer=\"he_normal\"),\n", + " keras.layers.PReLU(),\n", + " keras.layers.Dense(10, activation=\"softmax\")\n", + "])" + ], + "execution_count": 15, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "BMKER0vWLOpF" + }, + "source": [ + "model.compile(loss=\"sparse_categorical_crossentropy\",\n", + " optimizer=keras.optimizers.SGD(lr=1e-3),\n", + " metrics=[\"accuracy\"])" + ], + "execution_count": 16, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "eb_t9z8gLOpF", + "outputId": "20f6177f-04fa-4de4-905d-ab7e94014b71", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "history = model.fit(X_train, y_train, epochs=10,\n", + " validation_data=(X_valid, y_valid))" + ], + "execution_count": 17, + "outputs": [ + { + "output_type": "stream", + "text": [ + "Epoch 1/10\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 1.6969 - accuracy: 0.4974 - val_loss: 0.9255 - val_accuracy: 0.7186\n", + "Epoch 2/10\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.8706 - accuracy: 0.7246 - val_loss: 0.7305 - val_accuracy: 0.7630\n", + "Epoch 3/10\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.7211 - accuracy: 0.7621 - val_loss: 0.6565 - val_accuracy: 0.7882\n", + "Epoch 4/10\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.6448 - accuracy: 0.7880 - val_loss: 0.6003 - val_accuracy: 0.8046\n", + "Epoch 5/10\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.6078 - accuracy: 0.8003 - val_loss: 0.5656 - val_accuracy: 0.8184\n", + "Epoch 6/10\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.5693 - accuracy: 0.8119 - val_loss: 0.5406 - val_accuracy: 0.8238\n", + "Epoch 7/10\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.5428 - accuracy: 0.8193 - val_loss: 0.5196 - val_accuracy: 0.8314\n", + "Epoch 8/10\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.5193 - accuracy: 0.8283 - val_loss: 0.5113 - val_accuracy: 0.8318\n", + "Epoch 9/10\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.5129 - accuracy: 0.8273 - val_loss: 0.4917 - val_accuracy: 0.8380\n", + "Epoch 10/10\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.4941 - accuracy: 0.8313 - val_loss: 0.4826 - val_accuracy: 0.8396\n" + ], + "name": "stdout" + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "Vkr7NgOmLOpF" + }, + "source": [ + "### ELU" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "6znM2r0RLOpF" + }, + "source": [ + "def elu(z, alpha=1):\n", + " return np.where(z < 0, alpha * (np.exp(z) - 1), z)" + ], + "execution_count": 18, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "WpZo3sG7LOpF", + "outputId": "8f1f0b6e-6585-4c53-d651-159fe61b98e4", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 315 + } + }, + "source": [ + "plt.plot(z, elu(z), \"b-\", linewidth=2)\n", + "plt.plot([-5, 5], [0, 0], 'k-')\n", + "plt.plot([-5, 5], [-1, -1], 'k--')\n", + "plt.plot([0, 0], [-2.2, 3.2], 'k-')\n", + "plt.grid(True)\n", + "plt.title(r\"ELU activation function ($\\alpha=1$)\", fontsize=14)\n", + "plt.axis([-5, 5, -2.2, 3.2])\n", + "\n", + "save_fig(\"elu_plot\")\n", + "plt.show()" + ], + "execution_count": 19, + "outputs": [ + { + "output_type": "stream", + "text": [ + "그림 저장: elu_plot\n" + ], + "name": "stdout" + }, + { + "output_type": "display_data", + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAagAAAEYCAYAAAAJeGK1AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3deZgU1dn38e8Ng+wgiI4LIkYFNURImOSJGnViiALBYNTgHtEYCIRXiZqovOjja3g0GkwwKigGHyLggrgEkcUltogSFXEIEAFBZFX2BoZtmJnz/nF6cOhZm6mZqp7+fa6rrump013n7jM1fXedOnXKnHOIiIhETYOwAxARESmPEpSIiESSEpSIiESSEpSIiESSEpSIiESSEpSIiESSEpSIiESSEpSIiESSEpSkHTMbb2bT6lE9DczsCTPbYmbOzHJru85KYqmT95yoq42ZbTCzk+qivlSZ2QtmdmvYcWQy00wS9ZuZjQeuK6foA+fc9xPl7ZxzfSp4fQxY5JwbkrS+P/Coc65FoAFXr+7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rBzK4A4sBbYccSdc65Xc65e5xzXzjnip1z04CVQPewY4sSM2sOXArc5ZzLd87NAaYC14YbWXRp3zp06foZpgRVBTNrBdwL3BJ2LOnIzLKBTsDisGOJmE5AoXNuWal1CwAdQVWT9q3qSefPMCWoqv0BGOecWxt2IOnGzBoBk4C/O+eWhB1PxLQAdiSt2w60DCGWtKN9KyVp+xmW0QnKzGJm5ipY5phZN6AH8JewY42Kqtqs1PMaABPw51iGhBZwdOUDrZLWtQJ2hhBLWtG+VX3p/hlW4zvqpjPnXG5l5WY2FOgIrDYz8N96G5rZ6c6579R6gBFUVZsBmG+scfiT/72dc/trO640tAzIMrNTnHOfJdZ1Rd1VldK+lbJc0vgzTFMdVcLMmnHwt9zb8H/sQc65TaEElQbM7HGgG9DDOZcfdjxRZWbPAQ64Ed9e04GznHNKUhXQvpWadP8My+gjqKo453YDu0t+N7N8YG86/GHDYmYnAAOBfcBXiW9tAAOdc5NCCyyaBgNPARuBLfgPDSWnCmjfSl26f4bpCEpERCIpowdJiIhIdClBiYhIJClBiYhIJClBiYhIJClBiYhIJClBiYhIJClBiYhIJClBiYhIJP1/WSNimRllS14AAAAASUVORK5CYII=\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "tags": [], + "needs_background": "light" + } + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "CFEUCydjLOpF" + }, + "source": [ + "텐서플로에서 쉽게 ELU를 적용할 수 있습니다. 층을 만들 때 활성화 함수로 지정하면 됩니다:" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "zFuLenUVLOpG", + "outputId": "e03fe963-ee36-47a5-faf8-243a0968f03e", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "keras.layers.Dense(10, activation=\"elu\")" + ], + "execution_count": 20, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 20 + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "mkd4JNYELOpG" + }, + "source": [ + "### SELU" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "mzoAhWWhLOpG" + }, + "source": [ + "Günter Klambauer, Thomas Unterthiner, Andreas Mayr는 2017년 한 [훌륭한 논문](https://arxiv.org/pdf/1706.02515.pdf)에서 SELU 활성화 함수를 소개했습니다. 훈련하는 동안 완전 연결 층만 쌓아서 신경망을 만들고 SELU 활성화 함수와 LeCun 초기화를 사용한다면 자기 정규화됩니다. 각 층의 출력이 평균과\n", + "표준편차를 보존하는 경향이 있습니다. 이는 그레이디언트 소실과 폭주 문제를 막아줍니다. 그 결과로 SELU 활성화 함수는 이런 종류의 네트워크(특히 아주 깊은 네트워크)에서 다른 활성화 함수보다 뛰어난 성능을 종종 냅니다. 따라서 꼭 시도해 봐야 합니다. 하지만 SELU 활성화 함수의 자기 정규화 특징은 쉽게 깨집니다. ℓ1나 ℓ2 정규화, 드롭아웃, 맥스 노름, 스킵 연결이나 시퀀셜하지 않은 다른 토폴로지를 사용할 수 없습니다(즉 순환 신경망은 자기 정규화되지 않습니다). 하지만 실전에서 시퀀셜 CNN과 잘 동작합니다. 자기 정규화가 깨지면 SELU가 다른 활성화 함수보다 더 나은 성능을 내지 않을 것입니다." + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "NYXUfjHCLOpG" + }, + "source": [ + "from scipy.special import erfc\n", + "\n", + "# alpha와 scale은 평균 0과 표준 편차 1로 자기 정규화합니다\n", + "# (논문에 있는 식 14 참조):\n", + "alpha_0_1 = -np.sqrt(2 / np.pi) / (erfc(1/np.sqrt(2)) * np.exp(1/2) - 1)\n", + "scale_0_1 = (1 - erfc(1 / np.sqrt(2)) * np.sqrt(np.e)) * np.sqrt(2 * np.pi) * (2 * erfc(np.sqrt(2))*np.e**2 + np.pi*erfc(1/np.sqrt(2))**2*np.e - 2*(2+np.pi)*erfc(1/np.sqrt(2))*np.sqrt(np.e)+np.pi+2)**(-1/2)" + ], + "execution_count": 21, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "fyup_FSkLOpG" + }, + "source": [ + "def selu(z, scale=scale_0_1, alpha=alpha_0_1):\n", + " return scale * elu(z, alpha)" + ], + "execution_count": 22, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "cNpfVGctLOpH", + "outputId": "d29c5855-b472-4dac-d118-465af3c5b7ae", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 315 + } + }, + "source": [ + "plt.plot(z, selu(z), \"b-\", linewidth=2)\n", + "plt.plot([-5, 5], [0, 0], 'k-')\n", + "plt.plot([-5, 5], [-1.758, -1.758], 'k--')\n", + "plt.plot([0, 0], [-2.2, 3.2], 'k-')\n", + "plt.grid(True)\n", + "plt.title(\"SELU activation function\", fontsize=14)\n", + "plt.axis([-5, 5, -2.2, 3.2])\n", + "\n", + "save_fig(\"selu_plot\")\n", + "plt.show()" + ], + "execution_count": 23, + "outputs": [ + { + "output_type": "stream", + "text": [ + "그림 저장: selu_plot\n" + ], + "name": "stdout" + }, + { + "output_type": "display_data", + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAagAAAEYCAYAAAAJeGK1AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3deXwV1f3/8deHsMgmUcBUReVrFZW6IOZni7Y1FuqCICrWDVRqFdRqxYobglJBUUSLVkGwWBRQQXED1H7VNn61WitUqkUFNxBcQQkQ9iTn98e5kXATQm4yyZl77/v5eMyDm5mbmU8mw31nZs6cY845RERE4qZR6AJERESqooASEZFYUkCJiEgsKaBERCSWFFAiIhJLCigREYklBZTIDpjZFDOb0wDbKTAzZ2btGmBbA83sMzMrM7MR9b29HdQywMyKQ9Yg8aSAkpSYWXszG29mS8xsk5l9bWYvm9kvK7ynMPFBmzw9VuE9zsxOr2L9HRP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aaAqgEzOwsoAl4OXUvcOefWOedGOOeWOOfKnHNzgE+BI0LXFidm1hLoCwx3zhU7514DngXODVtZfOnYqr10/QxTQO2Ame0M3Az8PnQt6cjM8oBOwMLQtcRMJ6DEObe4wrz/ADqDqiEdWzWTzp9hCqgdGwlMds4tD11IujGzJsB04CHn3Aeh64mZVsCapHmrgdYBakk7OrZSkrafYVkdUGZWaGZuO9NrZtYF6AH8MXStcbGjfVbhfY2Aqfh7LJcFKzi+ioGdk+btDKwNUEta0bFVc+n+GVbnEXXTmXOuoLrlZjYY6Ah8Zmbg/+rNMbPOzrmu9V5gDO1onwGY31mT8Tf/ezrnttR3XWloMdDYzPZ3zn2YmHcYulxVLR1bKSsgjT/D1NVRNcysBdv+lTsE/8u+xDm3IkhRacDM7ge6AD2cc8Wh64krM3sMcMCF+P31HHCUc04htR06tlKT7p9hWX0GtSPOufXA+vKvzawY2JgOv9hQzGwfYBCwCfgq8VcbwCDn3PRghcXTpcCDwDfAt/gPDYXTdujYSl26f4bpDEpERGIpqxtJiIhIfCmgREQklhRQIiISSwooERGJJQWUiIjEkgJKRERiSQElIiKxpIASEZFY+v/1DCMFXRXZxAAAAABJRU5ErkJggg==\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "tags": [], + "needs_background": "light" + } + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "ZFaak_jnLOpH" + }, + "source": [ + "기본적으로 SELU 하이퍼파라미터(`scale`과 `alpha`)는 각 뉴런의 평균 출력이 0에 가깝고 표준 편차는 1에 가깝도록 조정됩니다(입력은 평균이 0이고 표준 편차 1로 표준화되었다고 가정합니다). 이 활성화 함수를 사용하면 1,000개의 층이 있는 심층 신경망도 모든 층에 걸쳐 거의 평균이 0이고 표준 편차를 1로 유지합니다. 이를 통해 그레이디언트 폭주와 소실 문제를 피할 수 있습니다:" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "qWawJStoLOpH", + "outputId": "38cfdca8-2c4e-4f69-ce42-366f34c49ee6", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "np.random.seed(42)\n", + "Z = np.random.normal(size=(500, 100)) # 표준화된 입력\n", + "for layer in range(1000):\n", + " W = np.random.normal(size=(100, 100), scale=np.sqrt(1 / 100)) # LeCun 초기화\n", + " Z = selu(np.dot(Z, W))\n", + " means = np.mean(Z, axis=0).mean()\n", + " stds = np.std(Z, axis=0).mean()\n", + " if layer % 100 == 0:\n", + " print(\"Layer {}: mean {:.2f}, std deviation {:.2f}\".format(layer, means, stds))" + ], + "execution_count": 24, + "outputs": [ + { + "output_type": "stream", + "text": [ + "Layer 0: mean -0.00, std deviation 1.00\n", + "Layer 100: mean 0.02, std deviation 0.96\n", + "Layer 200: mean 0.01, std deviation 0.90\n", + "Layer 300: mean -0.02, std deviation 0.92\n", + "Layer 400: mean 0.05, std deviation 0.89\n", + "Layer 500: mean 0.01, std deviation 0.93\n", + "Layer 600: mean 0.02, std deviation 0.92\n", + "Layer 700: mean -0.02, std deviation 0.90\n", + "Layer 800: mean 0.05, std deviation 0.83\n", + "Layer 900: mean 0.02, std deviation 1.00\n" + ], + "name": "stdout" + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "j5dAdmg4LOpI" + }, + "source": [ + "쉽게 SELU를 사용할 수 있습니다:" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "qFGwIMj2LOpI", + "outputId": "f9d69899-51cc-4c31-ecdf-429787846e20", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "keras.layers.Dense(10, activation=\"selu\",\n", + " kernel_initializer=\"lecun_normal\")" + ], + "execution_count": 25, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 25 + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "1D-HvWzgLOpI" + }, + "source": [ + "100개의 은닉층과 SELU 활성화 함수를 사용한 패션 MNIST를 위한 신경망을 만들어 보죠:" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "YS-krPA1LOpI" + }, + "source": [ + "np.random.seed(42)\n", + "tf.random.set_seed(42)" + ], + "execution_count": 26, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "fXLkoFMELOpI" + }, + "source": [ + "model = keras.models.Sequential()\n", + "model.add(keras.layers.Flatten(input_shape=[28, 28]))\n", + "model.add(keras.layers.Dense(300, activation=\"selu\",\n", + " kernel_initializer=\"lecun_normal\"))\n", + "for layer in range(99):\n", + " model.add(keras.layers.Dense(100, activation=\"selu\",\n", + " kernel_initializer=\"lecun_normal\"))\n", + "model.add(keras.layers.Dense(10, activation=\"softmax\"))" + ], + "execution_count": 27, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "hxrqewr6LOpI" + }, + "source": [ + "model.compile(loss=\"sparse_categorical_crossentropy\",\n", + " optimizer=keras.optimizers.SGD(lr=1e-3),\n", + " metrics=[\"accuracy\"])" + ], + "execution_count": 28, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "s2oGm-VSLOpJ" + }, + "source": [ + "이제 훈련해 보죠. 입력을 평균 0과 표준 편차 1로 바꾸어야 한다는 것을 잊지 마세요:" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "FBS7ewjeLOpJ" + }, + "source": [ + "pixel_means = X_train.mean(axis=0, keepdims=True)\n", + "pixel_stds = X_train.std(axis=0, keepdims=True)\n", + "X_train_scaled = (X_train - pixel_means) / pixel_stds\n", + "X_valid_scaled = (X_valid - pixel_means) / pixel_stds\n", + "X_test_scaled = (X_test - pixel_means) / pixel_stds" + ], + "execution_count": 29, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "DVONLiENLOpJ", + "outputId": "fa5c2881-0f6e-41e1-dbb4-b628f3e84538", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "history = model.fit(X_train_scaled, y_train, epochs=5,\n", + " validation_data=(X_valid_scaled, y_valid))" + ], + "execution_count": 30, + "outputs": [ + { + "output_type": "stream", + "text": [ + "Epoch 1/5\n", + "1719/1719 [==============================] - 17s 8ms/step - loss: 1.5863 - accuracy: 0.3956 - val_loss: 0.9179 - val_accuracy: 0.6592\n", + "Epoch 2/5\n", + "1719/1719 [==============================] - 14s 8ms/step - loss: 0.8182 - accuracy: 0.6961 - val_loss: 0.6438 - val_accuracy: 0.7696\n", + "Epoch 3/5\n", + "1719/1719 [==============================] - 14s 8ms/step - loss: 0.6735 - accuracy: 0.7521 - val_loss: 0.6299 - val_accuracy: 0.7524\n", + "Epoch 4/5\n", + "1719/1719 [==============================] - 14s 8ms/step - loss: 0.5877 - accuracy: 0.7837 - val_loss: 0.5827 - val_accuracy: 0.7988\n", + "Epoch 5/5\n", + "1719/1719 [==============================] - 14s 8ms/step - loss: 0.5487 - accuracy: 0.8016 - val_loss: 0.5130 - val_accuracy: 0.8224\n" + ], + "name": "stdout" + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "5k-Ud-OSLOpJ" + }, + "source": [ + "대신 ReLU 활성화 함수를 사용하면 어떤 일이 일어나는지 확인해 보죠:" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "EFFeHw5pLOpK" + }, + "source": [ + "np.random.seed(42)\n", + "tf.random.set_seed(42)" + ], + "execution_count": 31, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "EIUDPcNJLOpK" + }, + "source": [ + "model = keras.models.Sequential()\n", + "model.add(keras.layers.Flatten(input_shape=[28, 28]))\n", + "model.add(keras.layers.Dense(300, activation=\"relu\", kernel_initializer=\"he_normal\"))\n", + "for layer in range(99):\n", + " model.add(keras.layers.Dense(100, activation=\"relu\", kernel_initializer=\"he_normal\"))\n", + "model.add(keras.layers.Dense(10, activation=\"softmax\"))" + ], + "execution_count": 32, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "xZxJ2w38LOpK" + }, + "source": [ + "model.compile(loss=\"sparse_categorical_crossentropy\",\n", + " optimizer=keras.optimizers.SGD(lr=1e-3),\n", + " metrics=[\"accuracy\"])" + ], + "execution_count": 33, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "R94X2ls5LOpL", + "outputId": "3e1ad881-0171-4bd1-9ff5-7d969926d285", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "history = model.fit(X_train_scaled, y_train, epochs=5,\n", + " validation_data=(X_valid_scaled, y_valid))" + ], + "execution_count": 34, + "outputs": [ + { + "output_type": "stream", + "text": [ + "Epoch 1/5\n", + "1719/1719 [==============================] - 17s 8ms/step - loss: 2.0576 - accuracy: 0.2020 - val_loss: 1.3588 - val_accuracy: 0.3958\n", + "Epoch 2/5\n", + "1719/1719 [==============================] - 14s 8ms/step - loss: 1.2621 - accuracy: 0.4541 - val_loss: 0.9904 - val_accuracy: 0.5662\n", + "Epoch 3/5\n", + "1719/1719 [==============================] - 14s 8ms/step - loss: 0.9950 - accuracy: 0.5893 - val_loss: 0.8148 - val_accuracy: 0.6720\n", + "Epoch 4/5\n", + "1719/1719 [==============================] - 14s 8ms/step - loss: 0.8142 - accuracy: 0.6783 - val_loss: 0.7579 - val_accuracy: 0.7082\n", + "Epoch 5/5\n", + "1719/1719 [==============================] - 14s 8ms/step - loss: 0.8113 - accuracy: 0.6770 - val_loss: 0.8736 - val_accuracy: 0.6720\n" + ], + "name": "stdout" + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "pBPfwJ4WLOpL" + }, + "source": [ + "좋지 않군요. 그레이디언트 폭주나 소실 문제가 발생한 것입니다." + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "PVu2Q063LOpL" + }, + "source": [ + "# 배치 정규화" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "RLBH8PjPLOpL" + }, + "source": [ + "model = keras.models.Sequential([\n", + " keras.layers.Flatten(input_shape=[28, 28]),\n", + " keras.layers.BatchNormalization(),\n", + " keras.layers.Dense(300, activation=\"relu\"),\n", + " keras.layers.BatchNormalization(),\n", + " keras.layers.Dense(100, activation=\"relu\"),\n", + " keras.layers.BatchNormalization(),\n", + " keras.layers.Dense(10, activation=\"softmax\")\n", + "])" + ], + "execution_count": 35, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "d5L_RucvLOpL", + "outputId": "b4b0c837-c48a-4ac0-da2d-a946764b8d58", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "model.summary()" + ], + "execution_count": 36, + "outputs": [ + { + "output_type": "stream", + "text": [ + "Model: \"sequential_4\"\n", + "_________________________________________________________________\n", + "Layer (type) Output Shape Param # \n", + "=================================================================\n", + "flatten_4 (Flatten) (None, 784) 0 \n", + "_________________________________________________________________\n", + "batch_normalization (BatchNo (None, 784) 3136 \n", + "_________________________________________________________________\n", + "dense_212 (Dense) (None, 300) 235500 \n", + "_________________________________________________________________\n", + "batch_normalization_1 (Batch (None, 300) 1200 \n", + "_________________________________________________________________\n", + "dense_213 (Dense) (None, 100) 30100 \n", + "_________________________________________________________________\n", + "batch_normalization_2 (Batch (None, 100) 400 \n", + "_________________________________________________________________\n", + "dense_214 (Dense) (None, 10) 1010 \n", + "=================================================================\n", + "Total params: 271,346\n", + "Trainable params: 268,978\n", + "Non-trainable params: 2,368\n", + "_________________________________________________________________\n" + ], + "name": "stdout" + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "S4YmgIVtLOpL", + "outputId": "1830a1e3-5a00-4dab-b6c1-df4a11b7c0b4", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "bn1 = model.layers[1]\n", + "[(var.name, var.trainable) for var in bn1.variables]" + ], + "execution_count": 37, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "[('batch_normalization/gamma:0', True),\n", + " ('batch_normalization/beta:0', True),\n", + " ('batch_normalization/moving_mean:0', False),\n", + " ('batch_normalization/moving_variance:0', False)]" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 37 + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "ya2gRrxPLOpM", + "outputId": "90f2b7c4-9fd7-4aa1-b182-9508cc95ddd1", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "bn1.updates" + ], + "execution_count": 38, + "outputs": [ + { + "output_type": "stream", + "text": [ + "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/base_layer.py:1402: UserWarning: `layer.updates` will be removed in a future version. This property should not be used in TensorFlow 2.0, as `updates` are applied automatically.\n", + " warnings.warn('`layer.updates` will be removed in a future version. '\n" + ], + "name": "stderr" + }, + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "[]" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 38 + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "TqJdxp-vLOpN" + }, + "source": [ + "model.compile(loss=\"sparse_categorical_crossentropy\",\n", + " optimizer=keras.optimizers.SGD(lr=1e-3),\n", + " metrics=[\"accuracy\"])" + ], + "execution_count": 39, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "yNutyZRELOpN", + "outputId": "ef471abc-7bc4-44be-cc40-5068a8b7b2c9", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "history = model.fit(X_train, y_train, epochs=10,\n", + " validation_data=(X_valid, y_valid))" + ], + "execution_count": 40, + "outputs": [ + { + "output_type": "stream", + "text": [ + "Epoch 1/10\n", + "1719/1719 [==============================] - 6s 3ms/step - loss: 1.2287 - accuracy: 0.5994 - val_loss: 0.5525 - val_accuracy: 0.8230\n", + "Epoch 2/10\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.5995 - accuracy: 0.7958 - val_loss: 0.4725 - val_accuracy: 0.8470\n", + "Epoch 3/10\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.5312 - accuracy: 0.8172 - val_loss: 0.4375 - val_accuracy: 0.8550\n", + "Epoch 4/10\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.4885 - accuracy: 0.8294 - val_loss: 0.4152 - val_accuracy: 0.8604\n", + "Epoch 5/10\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.4718 - accuracy: 0.8349 - val_loss: 0.3997 - val_accuracy: 0.8644\n", + "Epoch 6/10\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.4420 - accuracy: 0.8461 - val_loss: 0.3867 - val_accuracy: 0.8690\n", + "Epoch 7/10\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.4286 - accuracy: 0.8495 - val_loss: 0.3763 - val_accuracy: 0.8702\n", + "Epoch 8/10\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.4087 - accuracy: 0.8551 - val_loss: 0.3713 - val_accuracy: 0.8740\n", + "Epoch 9/10\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.4080 - accuracy: 0.8564 - val_loss: 0.3631 - val_accuracy: 0.8750\n", + "Epoch 10/10\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.3903 - accuracy: 0.8616 - val_loss: 0.3571 - val_accuracy: 0.8754\n" + ], + "name": "stdout" + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "IeYDw1BwLOpN" + }, + "source": [ + "이따금 활성화 함수전에 BN을 적용해도 잘 동작합니다(여기에는 논란의 여지가 있습니다). 또한 `BatchNormalization` 층 이전의 층은 편향을 위한 항이 필요 없습니다. `BatchNormalization` 층이 이를 무효화하기 때문입니다. 따라서 필요 없는 파라미터이므로 `use_bias=False`를 지정하여 층을 만들 수 있습니다:" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "-QU5Mn0fLOpN" + }, + "source": [ + "model = keras.models.Sequential([\n", + " keras.layers.Flatten(input_shape=[28, 28]),\n", + " keras.layers.BatchNormalization(),\n", + " keras.layers.Dense(300, use_bias=False),\n", + " keras.layers.BatchNormalization(),\n", + " keras.layers.Activation(\"relu\"),\n", + " keras.layers.Dense(100, use_bias=False),\n", + " keras.layers.BatchNormalization(),\n", + " keras.layers.Activation(\"relu\"),\n", + " keras.layers.Dense(10, activation=\"softmax\")\n", + "])" + ], + "execution_count": 41, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "1Y-7t8DsLOpN" + }, + "source": [ + "model.compile(loss=\"sparse_categorical_crossentropy\",\n", + " optimizer=keras.optimizers.SGD(lr=1e-3),\n", + " metrics=[\"accuracy\"])" + ], + "execution_count": 42, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "fhatQCD6LOpN", + "outputId": "804ad977-910d-4ed8-a241-8e914ed0ac0c", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "history = model.fit(X_train, y_train, epochs=10,\n", + " validation_data=(X_valid, y_valid))" + ], + "execution_count": 43, + "outputs": [ + { + "output_type": "stream", + "text": [ + "Epoch 1/10\n", + "1719/1719 [==============================] - 6s 3ms/step - loss: 1.3677 - accuracy: 0.5605 - val_loss: 0.6767 - val_accuracy: 0.7812\n", + "Epoch 2/10\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.7136 - accuracy: 0.7702 - val_loss: 0.5566 - val_accuracy: 0.8182\n", + "Epoch 3/10\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.6123 - accuracy: 0.7990 - val_loss: 0.5007 - val_accuracy: 0.8362\n", + "Epoch 4/10\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.5547 - accuracy: 0.8148 - val_loss: 0.4666 - val_accuracy: 0.8448\n", + "Epoch 5/10\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.5254 - accuracy: 0.8232 - val_loss: 0.4433 - val_accuracy: 0.8532\n", + "Epoch 6/10\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.4947 - accuracy: 0.8326 - val_loss: 0.4262 - val_accuracy: 0.8550\n", + "Epoch 7/10\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.4736 - accuracy: 0.8388 - val_loss: 0.4130 - val_accuracy: 0.8564\n", + "Epoch 8/10\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.4550 - accuracy: 0.8443 - val_loss: 0.4034 - val_accuracy: 0.8612\n", + "Epoch 9/10\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.4495 - accuracy: 0.8439 - val_loss: 0.3943 - val_accuracy: 0.8638\n", + "Epoch 10/10\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.4333 - accuracy: 0.8495 - val_loss: 0.3874 - val_accuracy: 0.8660\n" + ], + "name": "stdout" + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "CWhcWzXCLOpO" + }, + "source": [ + "## 그레이디언트 클리핑" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "L73OupHpLOpO" + }, + "source": [ + "모든 케라스 옵티마이저는 `clipnorm`이나 `clipvalue` 매개변수를 지원합니다:" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "PN-aVXL-LOpO" + }, + "source": [ + "optimizer = keras.optimizers.SGD(clipvalue=1.0)" + ], + "execution_count": 44, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "g9Wj01r7LOpO" + }, + "source": [ + "optimizer = keras.optimizers.SGD(clipnorm=1.0)" + ], + "execution_count": 45, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "rxEJ6pNyLOpO" + }, + "source": [ + "## 사전 훈련된 층 재사용하기" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "u-g_PGcmLOpO" + }, + "source": [ + "### 케라스 모델 재사용하기" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "rdiVjfkOLOpO" + }, + "source": [ + "패션 MNIST 훈련 세트를 두 개로 나누어 보죠:\n", + "* `X_train_A`: 샌달과 셔츠(클래스 5와 6)을 제외한 모든 이미지\n", + "* `X_train_B`: 샌달과 셔츠 이미지 중 처음 200개만 가진 작은 훈련 세트\n", + "\n", + "검증 세트와 테스트 세트도 이렇게 나눕니다. 하지만 이미지 개수는 제한하지 않습니다.\n", + "\n", + "A 세트(8개의 클래스를 가진 분류 문제)에서 모델을 훈련하고 이를 재사용하여 B 세트(이진 분류)를 해결해 보겠습니다. A 작업에서 B 작업으로 약간의 지식이 전달되기를 기대합니다. 왜냐하면 A 세트의 클래스(스니커즈, 앵클 부츠, 코트, 티셔츠 등)가 B 세트에 있는 클래스(샌달과 셔츠)와 조금 비슷하기 때문입니다. 하지만 `Dense` 층을 사용하기 때문에 동일한 위치에 나타난 패턴만 재사용할 수 있습니다(반대로 합성곱 층은 훨씬 많은 정보를 전송합니다. 학습한 패턴을 이미지의 어느 위치에서나 감지할 수 있기 때문입니다. CNN 장에서 자세히 알아 보겠습니다)." + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "QKHsibRsLOpO" + }, + "source": [ + "def split_dataset(X, y):\n", + " y_5_or_6 = (y == 5) | (y == 6) # sandals or shirts\n", + " y_A = y[~y_5_or_6]\n", + " y_A[y_A > 6] -= 2 # class indices 7, 8, 9 should be moved to 5, 6, 7\n", + " y_B = (y[y_5_or_6] == 6).astype(np.float32) # binary classification task: is it a shirt (class 6)?\n", + " return ((X[~y_5_or_6], y_A),\n", + " (X[y_5_or_6], y_B))\n", + "\n", + "(X_train_A, y_train_A), (X_train_B, y_train_B) = split_dataset(X_train, y_train)\n", + "(X_valid_A, y_valid_A), (X_valid_B, y_valid_B) = split_dataset(X_valid, y_valid)\n", + "(X_test_A, y_test_A), (X_test_B, y_test_B) = split_dataset(X_test, y_test)\n", + "X_train_B = X_train_B[:200]\n", + "y_train_B = y_train_B[:200]" + ], + "execution_count": 46, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "2s04GUdELOpO", + "outputId": "e7e01e53-fa88-485a-b086-c2269d7e2c61", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "X_train_A.shape" + ], + "execution_count": 47, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "(43986, 28, 28)" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 47 + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "kcEEehIGLOpP", + "outputId": "65d1002c-3fba-49fb-cd77-bea76dddc1c6", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "X_train_B.shape" + ], + "execution_count": 48, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "(200, 28, 28)" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 48 + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "smwubTT0LOpP", + "outputId": "c801b7f2-5397-483e-e840-d3141878d4ae", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "y_train_A[:30]" + ], + "execution_count": 49, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "array([4, 0, 5, 7, 7, 7, 4, 4, 3, 4, 0, 1, 6, 3, 4, 3, 2, 6, 5, 3, 4, 5,\n", + " 1, 3, 4, 2, 0, 6, 7, 1], dtype=uint8)" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 49 + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "hNJqisASLOpP", + "outputId": "9551ff38-fe97-4a93-94d2-f84b19ab4efb", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "y_train_B[:30]" + ], + "execution_count": 50, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "array([1., 1., 0., 0., 0., 0., 1., 1., 1., 0., 0., 1., 1., 0., 0., 0., 0.,\n", + " 0., 0., 1., 1., 0., 0., 1., 1., 0., 1., 1., 1., 1.], dtype=float32)" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 50 + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "2qkd71BzLOpP" + }, + "source": [ + "tf.random.set_seed(42)\n", + "np.random.seed(42)" + ], + "execution_count": 51, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "_dou1YzGLOpP" + }, + "source": [ + "model_A = keras.models.Sequential()\n", + "model_A.add(keras.layers.Flatten(input_shape=[28, 28]))\n", + "for n_hidden in (300, 100, 50, 50, 50):\n", + " model_A.add(keras.layers.Dense(n_hidden, activation=\"selu\"))\n", + "model_A.add(keras.layers.Dense(8, activation=\"softmax\"))" + ], + "execution_count": 52, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "C6TIeUe-LOpQ" + }, + "source": [ + "model_A.compile(loss=\"sparse_categorical_crossentropy\",\n", + " optimizer=keras.optimizers.SGD(lr=1e-3),\n", + " metrics=[\"accuracy\"])" + ], + "execution_count": 53, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "4xR6ixj8LOpQ", + "outputId": "ec8f3003-4b1d-4c68-f8fc-b154cc26a402", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "history = model_A.fit(X_train_A, y_train_A, epochs=20,\n", + " validation_data=(X_valid_A, y_valid_A))" + ], + "execution_count": 54, + "outputs": [ + { + "output_type": "stream", + "text": [ + "Epoch 1/20\n", + "1375/1375 [==============================] - 4s 2ms/step - loss: 0.9248 - accuracy: 0.6994 - val_loss: 0.3894 - val_accuracy: 0.8665\n", + "Epoch 2/20\n", + "1375/1375 [==============================] - 3s 2ms/step - loss: 0.3651 - accuracy: 0.8748 - val_loss: 0.3288 - val_accuracy: 0.8829\n", + "Epoch 3/20\n", + "1375/1375 [==============================] - 3s 2ms/step - loss: 0.3182 - accuracy: 0.8894 - val_loss: 0.3012 - val_accuracy: 0.8996\n", + "Epoch 4/20\n", + "1375/1375 [==============================] - 3s 2ms/step - loss: 0.3049 - accuracy: 0.8955 - val_loss: 0.2895 - val_accuracy: 0.9013\n", + "Epoch 5/20\n", + "1375/1375 [==============================] - 3s 2ms/step - loss: 0.2804 - accuracy: 0.9027 - val_loss: 0.2774 - val_accuracy: 0.9063\n", + "Epoch 6/20\n", + "1375/1375 [==============================] - 3s 2ms/step - loss: 0.2702 - accuracy: 0.9079 - val_loss: 0.2734 - val_accuracy: 0.9066\n", + "Epoch 7/20\n", + "1375/1375 [==============================] - 3s 2ms/step - loss: 0.2626 - accuracy: 0.9088 - val_loss: 0.2720 - val_accuracy: 0.9083\n", + "Epoch 8/20\n", + "1375/1375 [==============================] - 3s 2ms/step - loss: 0.2609 - accuracy: 0.9119 - val_loss: 0.2591 - val_accuracy: 0.9138\n", + "Epoch 9/20\n", + "1375/1375 [==============================] - 3s 2ms/step - loss: 0.2558 - accuracy: 0.9110 - val_loss: 0.2563 - val_accuracy: 0.9143\n", + "Epoch 10/20\n", + "1375/1375 [==============================] - 3s 2ms/step - loss: 0.2511 - accuracy: 0.9139 - val_loss: 0.2543 - val_accuracy: 0.9158\n", + "Epoch 11/20\n", + "1375/1375 [==============================] - 3s 2ms/step - loss: 0.2431 - accuracy: 0.9173 - val_loss: 0.2496 - val_accuracy: 0.9153\n", + "Epoch 12/20\n", + "1375/1375 [==============================] - 3s 2ms/step - loss: 0.2422 - accuracy: 0.9170 - val_loss: 0.2512 - val_accuracy: 0.9126\n", + "Epoch 13/20\n", + "1375/1375 [==============================] - 3s 2ms/step - loss: 0.2360 - accuracy: 0.9179 - val_loss: 0.2446 - val_accuracy: 0.9158\n", + "Epoch 14/20\n", + "1375/1375 [==============================] - 3s 2ms/step - loss: 0.2267 - accuracy: 0.9230 - val_loss: 0.2416 - val_accuracy: 0.9175\n", + "Epoch 15/20\n", + "1375/1375 [==============================] - 3s 2ms/step - loss: 0.2225 - accuracy: 0.9241 - val_loss: 0.2450 - val_accuracy: 0.9188\n", + "Epoch 16/20\n", + "1375/1375 [==============================] - 3s 2ms/step - loss: 0.2262 - accuracy: 0.9214 - val_loss: 0.2386 - val_accuracy: 0.9193\n", + "Epoch 17/20\n", + "1375/1375 [==============================] - 3s 2ms/step - loss: 0.2191 - accuracy: 0.9252 - val_loss: 0.2405 - val_accuracy: 0.9178\n", + "Epoch 18/20\n", + "1375/1375 [==============================] - 3s 2ms/step - loss: 0.2172 - accuracy: 0.9253 - val_loss: 0.2426 - val_accuracy: 0.9158\n", + "Epoch 19/20\n", + "1375/1375 [==============================] - 3s 2ms/step - loss: 0.2181 - accuracy: 0.9246 - val_loss: 0.2331 - val_accuracy: 0.9213\n", + "Epoch 20/20\n", + "1375/1375 [==============================] - 3s 2ms/step - loss: 0.2113 - accuracy: 0.9271 - val_loss: 0.2332 - val_accuracy: 0.9203\n" + ], + "name": "stdout" + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "8UMBGi07LOpQ" + }, + "source": [ + "model_A.save(\"my_model_A.h5\")" + ], + "execution_count": 55, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "qb4XQRc2LOpQ" + }, + "source": [ + "model_B = keras.models.Sequential()\n", + "model_B.add(keras.layers.Flatten(input_shape=[28, 28]))\n", + "for n_hidden in (300, 100, 50, 50, 50):\n", + " model_B.add(keras.layers.Dense(n_hidden, activation=\"selu\"))\n", + "model_B.add(keras.layers.Dense(1, activation=\"sigmoid\"))" + ], + "execution_count": 56, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "bTfx9aSGLOpQ" + }, + "source": [ + "model_B.compile(loss=\"binary_crossentropy\",\n", + " optimizer=keras.optimizers.SGD(lr=1e-3),\n", + " metrics=[\"accuracy\"])" + ], + "execution_count": 57, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "dd6o7rDmLOpQ", + "outputId": "b1022791-e04c-438b-db1d-7da924db831c", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "history = model_B.fit(X_train_B, y_train_B, epochs=20,\n", + " validation_data=(X_valid_B, y_valid_B))" + ], + "execution_count": 58, + "outputs": [ + { + "output_type": "stream", + "text": [ + "Epoch 1/20\n", + "7/7 [==============================] - 1s 35ms/step - loss: 1.0360 - accuracy: 0.4975 - val_loss: 0.6314 - val_accuracy: 0.6004\n", + "Epoch 2/20\n", + "7/7 [==============================] - 0s 16ms/step - loss: 0.5883 - accuracy: 0.6971 - val_loss: 0.4784 - val_accuracy: 0.8529\n", + "Epoch 3/20\n", + "7/7 [==============================] - 0s 14ms/step - loss: 0.4380 - accuracy: 0.8854 - val_loss: 0.4102 - val_accuracy: 0.8945\n", + "Epoch 4/20\n", + "7/7 [==============================] - 0s 13ms/step - loss: 0.4021 - accuracy: 0.8712 - val_loss: 0.3647 - val_accuracy: 0.9178\n", + "Epoch 5/20\n", + "7/7 [==============================] - 0s 14ms/step - loss: 0.3361 - accuracy: 0.9348 - val_loss: 0.3300 - val_accuracy: 0.9320\n", + "Epoch 6/20\n", + "7/7 [==============================] - 0s 14ms/step - loss: 0.3113 - accuracy: 0.9233 - val_loss: 0.3019 - val_accuracy: 0.9402\n", + "Epoch 7/20\n", + "7/7 [==============================] - 0s 14ms/step - loss: 0.2817 - accuracy: 0.9299 - val_loss: 0.2804 - val_accuracy: 0.9422\n", + "Epoch 8/20\n", + "7/7 [==============================] - 0s 14ms/step - loss: 0.2632 - accuracy: 0.9379 - val_loss: 0.2606 - val_accuracy: 0.9473\n", + "Epoch 9/20\n", + "7/7 [==============================] - 0s 16ms/step - loss: 0.2373 - accuracy: 0.9481 - val_loss: 0.2428 - val_accuracy: 0.9523\n", + "Epoch 10/20\n", + "7/7 [==============================] - 0s 14ms/step - loss: 0.2229 - accuracy: 0.9657 - val_loss: 0.2281 - val_accuracy: 0.9544\n", + "Epoch 11/20\n", + "7/7 [==============================] - 0s 14ms/step - loss: 0.2155 - accuracy: 0.9590 - val_loss: 0.2150 - val_accuracy: 0.9584\n", + "Epoch 12/20\n", + "7/7 [==============================] - 0s 14ms/step - loss: 0.1834 - accuracy: 0.9738 - val_loss: 0.2036 - val_accuracy: 0.9584\n", + "Epoch 13/20\n", + "7/7 [==============================] - 0s 14ms/step - loss: 0.1671 - accuracy: 0.9828 - val_loss: 0.1931 - val_accuracy: 0.9615\n", + "Epoch 14/20\n", + "7/7 [==============================] - 0s 14ms/step - loss: 0.1527 - accuracy: 0.9915 - val_loss: 0.1838 - val_accuracy: 0.9635\n", + "Epoch 15/20\n", + "7/7 [==============================] - 0s 14ms/step - loss: 0.1595 - accuracy: 0.9904 - val_loss: 0.1746 - val_accuracy: 0.9686\n", + "Epoch 16/20\n", + "7/7 [==============================] - 0s 14ms/step - loss: 0.1473 - accuracy: 0.9937 - val_loss: 0.1674 - val_accuracy: 0.9686\n", + "Epoch 17/20\n", + "7/7 [==============================] - 0s 14ms/step - loss: 0.1412 - accuracy: 0.9944 - val_loss: 0.1604 - val_accuracy: 0.9706\n", + "Epoch 18/20\n", + "7/7 [==============================] - 0s 14ms/step - loss: 0.1242 - accuracy: 0.9931 - val_loss: 0.1539 - val_accuracy: 0.9706\n", + "Epoch 19/20\n", + "7/7 [==============================] - 0s 14ms/step - loss: 0.1224 - accuracy: 0.9931 - val_loss: 0.1482 - val_accuracy: 0.9716\n", + "Epoch 20/20\n", + "7/7 [==============================] - 0s 15ms/step - loss: 0.1096 - accuracy: 0.9912 - val_loss: 0.1431 - val_accuracy: 0.9716\n" + ], + "name": "stdout" + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "Bh48HMITLOpQ", + "outputId": "8996eafe-9ad5-4013-8f80-733cd9f94a78", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "model.summary()" + ], + "execution_count": 59, + "outputs": [ + { + "output_type": "stream", + "text": [ + "Model: \"sequential_5\"\n", + "_________________________________________________________________\n", + "Layer (type) Output Shape Param # \n", + "=================================================================\n", + "flatten_5 (Flatten) (None, 784) 0 \n", + "_________________________________________________________________\n", + "batch_normalization_3 (Batch (None, 784) 3136 \n", + "_________________________________________________________________\n", + "dense_215 (Dense) (None, 300) 235200 \n", + "_________________________________________________________________\n", + "batch_normalization_4 (Batch (None, 300) 1200 \n", + "_________________________________________________________________\n", + "activation (Activation) (None, 300) 0 \n", + "_________________________________________________________________\n", + "dense_216 (Dense) (None, 100) 30000 \n", + "_________________________________________________________________\n", + "batch_normalization_5 (Batch (None, 100) 400 \n", + "_________________________________________________________________\n", + "activation_1 (Activation) (None, 100) 0 \n", + "_________________________________________________________________\n", + "dense_217 (Dense) (None, 10) 1010 \n", + "=================================================================\n", + "Total params: 270,946\n", + "Trainable params: 268,578\n", + "Non-trainable params: 2,368\n", + "_________________________________________________________________\n" + ], + "name": "stdout" + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "xpurR4NDLOpQ" + }, + "source": [ + "model_A = keras.models.load_model(\"my_model_A.h5\")\n", + "model_B_on_A = keras.models.Sequential(model_A.layers[:-1])\n", + "model_B_on_A.add(keras.layers.Dense(1, activation=\"sigmoid\"))" + ], + "execution_count": 60, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "XPRZk6DqLOpR" + }, + "source": [ + "model_A_clone = keras.models.clone_model(model_A)\n", + "model_A_clone.set_weights(model_A.get_weights())" + ], + "execution_count": 61, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "kNxjby1PLOpR" + }, + "source": [ + "for layer in model_B_on_A.layers[:-1]:\n", + " layer.trainable = False\n", + "\n", + "model_B_on_A.compile(loss=\"binary_crossentropy\",\n", + " optimizer=keras.optimizers.SGD(lr=1e-3),\n", + " metrics=[\"accuracy\"])" + ], + "execution_count": 62, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "yvlj3S1jLOpR", + "outputId": "0a930150-7ddf-4eff-bd36-ac3bd55bb243", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "history = model_B_on_A.fit(X_train_B, y_train_B, epochs=4,\n", + " validation_data=(X_valid_B, y_valid_B))\n", + "\n", + "for layer in model_B_on_A.layers[:-1]:\n", + " layer.trainable = True\n", + "\n", + "model_B_on_A.compile(loss=\"binary_crossentropy\",\n", + " optimizer=keras.optimizers.SGD(lr=1e-3),\n", + " metrics=[\"accuracy\"])\n", + "history = model_B_on_A.fit(X_train_B, y_train_B, epochs=16,\n", + " validation_data=(X_valid_B, y_valid_B))" + ], + "execution_count": 63, + "outputs": [ + { + "output_type": "stream", + "text": [ + "Epoch 1/4\n", + "7/7 [==============================] - 1s 56ms/step - loss: 0.6098 - accuracy: 0.6233 - val_loss: 0.5795 - val_accuracy: 0.6389\n", + "Epoch 2/4\n", + "7/7 [==============================] - 0s 16ms/step - loss: 0.5498 - accuracy: 0.6707 - val_loss: 0.5424 - val_accuracy: 0.6815\n", + "Epoch 3/4\n", + "7/7 [==============================] - 0s 14ms/step - loss: 0.4847 - accuracy: 0.7509 - val_loss: 0.5107 - val_accuracy: 0.7110\n", + "Epoch 4/4\n", + "7/7 [==============================] - 0s 14ms/step - loss: 0.4849 - accuracy: 0.7405 - val_loss: 0.4823 - val_accuracy: 0.7343\n", + "Epoch 1/16\n", + "7/7 [==============================] - 1s 36ms/step - loss: 0.4345 - accuracy: 0.7823 - val_loss: 0.3440 - val_accuracy: 0.8671\n", + "Epoch 2/16\n", + "7/7 [==============================] - 0s 14ms/step - loss: 0.2951 - accuracy: 0.9143 - val_loss: 0.2593 - val_accuracy: 0.9290\n", + "Epoch 3/16\n", + "7/7 [==============================] - 0s 14ms/step - loss: 0.2023 - accuracy: 0.9777 - val_loss: 0.2104 - val_accuracy: 0.9554\n", + "Epoch 4/16\n", + "7/7 [==============================] - 0s 15ms/step - loss: 0.1745 - accuracy: 0.9789 - val_loss: 0.1786 - val_accuracy: 0.9696\n", + "Epoch 5/16\n", + "7/7 [==============================] - 0s 14ms/step - loss: 0.1341 - accuracy: 0.9809 - val_loss: 0.1559 - val_accuracy: 0.9767\n", + "Epoch 6/16\n", + "7/7 [==============================] - 0s 14ms/step - loss: 0.1169 - accuracy: 0.9973 - val_loss: 0.1391 - val_accuracy: 0.9807\n", + "Epoch 7/16\n", + "7/7 [==============================] - 0s 14ms/step - loss: 0.1134 - accuracy: 0.9931 - val_loss: 0.1266 - val_accuracy: 0.9838\n", + "Epoch 8/16\n", + "7/7 [==============================] - 0s 14ms/step - loss: 0.0998 - accuracy: 0.9931 - val_loss: 0.1163 - val_accuracy: 0.9858\n", + "Epoch 9/16\n", + "7/7 [==============================] - 0s 14ms/step - loss: 0.0832 - accuracy: 1.0000 - val_loss: 0.1066 - val_accuracy: 0.9888\n", + "Epoch 10/16\n", + "7/7 [==============================] - 0s 14ms/step - loss: 0.0774 - accuracy: 1.0000 - val_loss: 0.1000 - val_accuracy: 0.9899\n", + "Epoch 11/16\n", + "7/7 [==============================] - 0s 15ms/step - loss: 0.0689 - accuracy: 1.0000 - val_loss: 0.0940 - val_accuracy: 0.9899\n", + "Epoch 12/16\n", + "7/7 [==============================] - 0s 14ms/step - loss: 0.0719 - accuracy: 1.0000 - val_loss: 0.0889 - val_accuracy: 0.9899\n", + "Epoch 13/16\n", + "7/7 [==============================] - 0s 14ms/step - loss: 0.0566 - accuracy: 1.0000 - val_loss: 0.0840 - val_accuracy: 0.9899\n", + "Epoch 14/16\n", + "7/7 [==============================] - 0s 14ms/step - loss: 0.0494 - accuracy: 1.0000 - val_loss: 0.0803 - val_accuracy: 0.9899\n", + "Epoch 15/16\n", + "7/7 [==============================] - 0s 15ms/step - loss: 0.0545 - accuracy: 1.0000 - val_loss: 0.0770 - val_accuracy: 0.9899\n", + "Epoch 16/16\n", + "7/7 [==============================] - 0s 14ms/step - loss: 0.0472 - accuracy: 1.0000 - val_loss: 0.0740 - val_accuracy: 0.9899\n" + ], + "name": "stdout" + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "ceskFW97LOpR" + }, + "source": [ + "마지막 점수는 어떤가요?" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "fmdxUJ9FLOpR", + "outputId": "6d812b28-28b8-46e3-eebc-84aa1f6bbb7f", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "model_B.evaluate(X_test_B, y_test_B)" + ], + "execution_count": 64, + "outputs": [ + { + "output_type": "stream", + "text": [ + "63/63 [==============================] - 0s 2ms/step - loss: 0.1408 - accuracy: 0.9705\n" + ], + "name": "stdout" + }, + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "[0.1408407986164093, 0.9704999923706055]" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 64 + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "804aagCRLOpR", + "outputId": "bfa379e0-7c67-45bd-ff9c-177f0ceb1645", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "model_B_on_A.evaluate(X_test_B, y_test_B)" + ], + "execution_count": 65, + "outputs": [ + { + "output_type": "stream", + "text": [ + "63/63 [==============================] - 0s 2ms/step - loss: 0.0682 - accuracy: 0.9935\n" + ], + "name": "stdout" + }, + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "[0.06819812208414078, 0.9934999942779541]" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 65 + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "eoEbJs2sLOpR" + }, + "source": [ + "훌륭하네요! 꽤 많은 정보를 전달했습니다: 오차율이 4배나 줄었네요!" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "2Oge57HRLOpS", + "outputId": "213f9022-8f47-46c8-bb2f-e3d375e8b215", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "(100 - 96.95) / (100 - 99.25)" + ], + "execution_count": 66, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "4.066666666666663" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 66 + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "t1Y9NJBjLOpS" + }, + "source": [ + "# 고속 옵티마이저" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "Ie9qzCm6LOpS" + }, + "source": [ + "## 모멘텀 옵티마이저" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "-T_eBS6iLOpS" + }, + "source": [ + "optimizer = keras.optimizers.SGD(lr=0.001, momentum=0.9)" + ], + "execution_count": 67, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "gvoYzuDRLOpT" + }, + "source": [ + "## 네스테로프 가속 경사" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "DbUw8WL2LOpT" + }, + "source": [ + "optimizer = keras.optimizers.SGD(lr=0.001, momentum=0.9, nesterov=True)" + ], + "execution_count": 68, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "MzY29JPMLOpT" + }, + "source": [ + "## AdaGrad" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "dR9NgMEoLOpT" + }, + "source": [ + "optimizer = keras.optimizers.Adagrad(lr=0.001)" + ], + "execution_count": 69, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "RdzjwRZOLOpT" + }, + "source": [ + "## RMSProp" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "TkjnInhCLOpT" + }, + "source": [ + "optimizer = keras.optimizers.RMSprop(lr=0.001, rho=0.9)" + ], + "execution_count": 70, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "Aqd3XjSlLOpT" + }, + "source": [ + "## Adam 옵티마이저" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "ibdJe_cILOpU" + }, + "source": [ + "optimizer = keras.optimizers.Adam(lr=0.001, beta_1=0.9, beta_2=0.999)" + ], + "execution_count": 71, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "vOuhwhjQLOpU" + }, + "source": [ + "## Adamax 옵티마이저" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "_pwlFvReLOpU" + }, + "source": [ + "optimizer = keras.optimizers.Adamax(lr=0.001, beta_1=0.9, beta_2=0.999)" + ], + "execution_count": 72, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "-UL-CtdMLOpU" + }, + "source": [ + "## Nadam 옵티마이저" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "L2jGWQ8vLOpU" + }, + "source": [ + "optimizer = keras.optimizers.Nadam(lr=0.001, beta_1=0.9, beta_2=0.999)" + ], + "execution_count": 73, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "Ow2z1pbiLOpU" + }, + "source": [ + "## 학습률 스케줄링" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "DziEJzDxLOpU" + }, + "source": [ + "### 거듭제곱 스케줄링" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "_QKqYIBSLOpU" + }, + "source": [ + "```lr = lr0 / (1 + steps / s)**c```\n", + "* 케라스는 `c=1`과 `s = 1 / decay`을 사용합니다" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "mEhuxik_LOpU" + }, + "source": [ + "optimizer = keras.optimizers.SGD(lr=0.01, decay=1e-4)" + ], + "execution_count": 74, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "3ZRa8D0PLOpV" + }, + "source": [ + "model = keras.models.Sequential([\n", + " keras.layers.Flatten(input_shape=[28, 28]),\n", + " keras.layers.Dense(300, activation=\"selu\", kernel_initializer=\"lecun_normal\"),\n", + " keras.layers.Dense(100, activation=\"selu\", kernel_initializer=\"lecun_normal\"),\n", + " keras.layers.Dense(10, activation=\"softmax\")\n", + "])\n", + "model.compile(loss=\"sparse_categorical_crossentropy\", optimizer=optimizer, metrics=[\"accuracy\"])" + ], + "execution_count": 75, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "VpPb6h-cLOpV", + "outputId": "4ef44500-2026-4c95-a8d1-e5ad2bcc4757", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "n_epochs = 25\n", + "history = model.fit(X_train_scaled, y_train, epochs=n_epochs,\n", + " validation_data=(X_valid_scaled, y_valid))" + ], + "execution_count": 76, + "outputs": [ + { + "output_type": "stream", + "text": [ + "Epoch 1/25\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.5980 - accuracy: 0.7933 - val_loss: 0.4029 - val_accuracy: 0.8604\n", + "Epoch 2/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.3830 - accuracy: 0.8637 - val_loss: 0.3716 - val_accuracy: 0.8720\n", + "Epoch 3/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.3492 - accuracy: 0.8773 - val_loss: 0.3749 - val_accuracy: 0.8732\n", + "Epoch 4/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.3276 - accuracy: 0.8812 - val_loss: 0.3499 - val_accuracy: 0.8800\n", + "Epoch 5/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.3172 - accuracy: 0.8858 - val_loss: 0.3448 - val_accuracy: 0.8788\n", + "Epoch 6/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2923 - accuracy: 0.8938 - val_loss: 0.3410 - val_accuracy: 0.8832\n", + "Epoch 7/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2870 - accuracy: 0.8972 - val_loss: 0.3354 - val_accuracy: 0.8870\n", + "Epoch 8/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2721 - accuracy: 0.9032 - val_loss: 0.3405 - val_accuracy: 0.8836\n", + "Epoch 9/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2729 - accuracy: 0.9004 - val_loss: 0.3288 - val_accuracy: 0.8888\n", + "Epoch 10/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2584 - accuracy: 0.9071 - val_loss: 0.3258 - val_accuracy: 0.8884\n", + "Epoch 11/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2529 - accuracy: 0.9096 - val_loss: 0.3265 - val_accuracy: 0.8880\n", + "Epoch 12/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2484 - accuracy: 0.9100 - val_loss: 0.3331 - val_accuracy: 0.8826\n", + "Epoch 13/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2420 - accuracy: 0.9145 - val_loss: 0.3252 - val_accuracy: 0.8892\n", + "Epoch 14/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2371 - accuracy: 0.9147 - val_loss: 0.3286 - val_accuracy: 0.8898\n", + "Epoch 15/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2363 - accuracy: 0.9158 - val_loss: 0.3240 - val_accuracy: 0.8876\n", + "Epoch 16/25\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.2311 - accuracy: 0.9176 - val_loss: 0.3201 - val_accuracy: 0.8900\n", + "Epoch 17/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2234 - accuracy: 0.9207 - val_loss: 0.3233 - val_accuracy: 0.8906\n", + "Epoch 18/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2248 - accuracy: 0.9194 - val_loss: 0.3187 - val_accuracy: 0.8938\n", + "Epoch 19/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2236 - accuracy: 0.9213 - val_loss: 0.3227 - val_accuracy: 0.8904\n", + "Epoch 20/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2229 - accuracy: 0.9221 - val_loss: 0.3208 - val_accuracy: 0.8916\n", + "Epoch 21/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2194 - accuracy: 0.9233 - val_loss: 0.3204 - val_accuracy: 0.8914\n", + "Epoch 22/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2163 - accuracy: 0.9231 - val_loss: 0.3177 - val_accuracy: 0.8942\n", + "Epoch 23/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2129 - accuracy: 0.9243 - val_loss: 0.3192 - val_accuracy: 0.8902\n", + "Epoch 24/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2077 - accuracy: 0.9276 - val_loss: 0.3210 - val_accuracy: 0.8894\n", + "Epoch 25/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2102 - accuracy: 0.9257 - val_loss: 0.3210 - val_accuracy: 0.8926\n" + ], + "name": "stdout" + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "We15bby8LOpV", + "outputId": "9c836093-b473-4b24-8eab-49e38af1f30e", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 303 + } + }, + "source": [ + "learning_rate = 0.01\n", + "decay = 1e-4\n", + "batch_size = 32\n", + "n_steps_per_epoch = len(X_train) // batch_size\n", + "epochs = np.arange(n_epochs)\n", + "lrs = learning_rate / (1 + decay * epochs * n_steps_per_epoch)\n", + "\n", + "plt.plot(epochs, lrs, \"o-\")\n", + "plt.axis([0, n_epochs - 1, 0, 0.01])\n", + "plt.xlabel(\"Epoch\")\n", + "plt.ylabel(\"Learning Rate\")\n", + "plt.title(\"Power Scheduling\", fontsize=14)\n", + "plt.grid(True)\n", + "plt.show()" + ], + "execution_count": 77, + "outputs": [ + { + "output_type": "display_data", + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZgAAAEeCAYAAAC30gOQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3deXxU5fn//9eVBQiBsBsgsqksArKIogWtVKpoqxW1tr/W3bZYbT/tV62KtrZWba1baxfrUrW4tmoFUVGpilRBRVAEZBVZlH0zQEISQrh+f5wTHCYzyQQzM1nez8djHpm5z33OueYYc3Gf+z73be6OiIhIXctIdwAiItI4KcGIiEhSKMGIiEhSKMGIiEhSKMGIiEhSKMGIiEhSKMGINBBmdpGZFSXp2B+Z2Y213GeVmf0i3mcRJRhpUMxsgpl5+Co3sxVmdqeZ5aY7tpqYWS8ze9zM1phZmZmtM7MpZjY03bHVkaOBv6c7CKk/stIdgMgBeA04H8gGjgceBHKBy9IZVCUzy3b38ugy4FXgE+A7wFqgK3Ay0D7lQSaBu29OdwxSv6gFIw1RmbtvcPfP3P1J4AlgLICZNTezu81so5mVmtm7ZnZc5Y7h5/ERnx8PW0Odw88tw9bFceFnM7NrzOwTMysxswVmdl7E/j3D/b9nZtPMrAS4NEbMA4BDgZ+4+9vuvtrd33H337r76xHHa2Nm95rZ+jD+xWb23cgDmdno8JZWsZm9YWa9orafbmbvh/uvNLPfmVmziO0Hmd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QT/zy52903AWmB00qMUOUBqwYgkT3Mz6xxVVuHum8P3Z5nZbILFp75NkCyOCbc9QTAI4FEz+zXQjqBDf2JEq+h3wJ/MbCMwBWgJjHb3u5L1hURqQwlGJHm+TrCyY6S1wMHh+xuBswmWFt4MXOzuswHcfZeZjQHuBt4jGCwwGfh55YHc/V4z2w1cBdwGbANeStaXEaktjSITSYNwhNc57v6fdMcikizqgxERkaRQghERkaTQLTIREUkKtWBERCQplGBERCQplGBERCQplGBERCQplGBERCQp/n8M9qwIio552wAAAABJRU5ErkJggg==\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "tags": [], + "needs_background": "light" + } + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "txkhYc0BLOpV" + }, + "source": [ + "### 지수 기반 스케줄링" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "m1fGE70_LOpV" + }, + "source": [ + "```lr = lr0 * 0.1**(epoch / s)```" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "MR9yQ-PhLOpV" + }, + "source": [ + "def exponential_decay_fn(epoch):\n", + " return 0.01 * 0.1**(epoch / 20)" + ], + "execution_count": 78, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "rkHd1gawLOpW" + }, + "source": [ + "def exponential_decay(lr0, s):\n", + " def exponential_decay_fn(epoch):\n", + " return lr0 * 0.1**(epoch / s)\n", + " return exponential_decay_fn\n", + "\n", + "exponential_decay_fn = exponential_decay(lr0=0.01, s=20)" + ], + "execution_count": 79, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "ZpgT0jO3LOpW" + }, + "source": [ + "model = keras.models.Sequential([\n", + " keras.layers.Flatten(input_shape=[28, 28]),\n", + " keras.layers.Dense(300, activation=\"selu\", kernel_initializer=\"lecun_normal\"),\n", + " keras.layers.Dense(100, activation=\"selu\", kernel_initializer=\"lecun_normal\"),\n", + " keras.layers.Dense(10, activation=\"softmax\")\n", + "])\n", + "model.compile(loss=\"sparse_categorical_crossentropy\", optimizer=\"nadam\", metrics=[\"accuracy\"])\n", + "n_epochs = 25" + ], + "execution_count": 80, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "cQu05HxbLOpW", + "outputId": "2145961f-e67b-4e92-b9b3-1a28482bccf3", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "lr_scheduler = keras.callbacks.LearningRateScheduler(exponential_decay_fn)\n", + "history = model.fit(X_train_scaled, y_train, epochs=n_epochs,\n", + " validation_data=(X_valid_scaled, y_valid),\n", + " callbacks=[lr_scheduler])" + ], + "execution_count": 81, + "outputs": [ + { + "output_type": "stream", + "text": [ + "Epoch 1/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 1.1106 - accuracy: 0.7344 - val_loss: 0.8633 - val_accuracy: 0.7328\n", + "Epoch 2/25\n", + "1719/1719 [==============================] - 4s 3ms/step - loss: 0.7067 - accuracy: 0.7824 - val_loss: 0.7695 - val_accuracy: 0.7576\n", + "Epoch 3/25\n", + "1719/1719 [==============================] - 4s 3ms/step - loss: 0.6652 - accuracy: 0.8040 - val_loss: 0.6658 - val_accuracy: 0.8108\n", + "Epoch 4/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.5463 - accuracy: 0.8319 - val_loss: 0.5714 - val_accuracy: 0.8504\n", + "Epoch 5/25\n", + "1719/1719 [==============================] - 4s 3ms/step - loss: 0.5098 - accuracy: 0.8400 - val_loss: 0.5460 - val_accuracy: 0.8506\n", + "Epoch 6/25\n", + "1719/1719 [==============================] - 4s 3ms/step - loss: 0.4484 - accuracy: 0.8567 - val_loss: 0.5718 - val_accuracy: 0.8620\n", + "Epoch 7/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.4328 - accuracy: 0.8703 - val_loss: 0.4861 - val_accuracy: 0.8628\n", + "Epoch 8/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.3765 - accuracy: 0.8795 - val_loss: 0.5380 - val_accuracy: 0.8580\n", + "Epoch 9/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.3632 - accuracy: 0.8844 - val_loss: 0.4584 - val_accuracy: 0.8704\n", + "Epoch 10/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.3122 - accuracy: 0.8944 - val_loss: 0.4571 - val_accuracy: 0.8796\n", + "Epoch 11/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2846 - accuracy: 0.9025 - val_loss: 0.4326 - val_accuracy: 0.8786\n", + "Epoch 12/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2725 - accuracy: 0.9079 - val_loss: 0.4818 - val_accuracy: 0.8758\n", + "Epoch 13/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2495 - accuracy: 0.9137 - val_loss: 0.4428 - val_accuracy: 0.8822\n", + "Epoch 14/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2275 - accuracy: 0.9207 - val_loss: 0.4235 - val_accuracy: 0.8786\n", + "Epoch 15/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2211 - accuracy: 0.9237 - val_loss: 0.4484 - val_accuracy: 0.8858\n", + "Epoch 16/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2007 - accuracy: 0.9297 - val_loss: 0.4862 - val_accuracy: 0.8778\n", + "Epoch 17/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.1796 - accuracy: 0.9362 - val_loss: 0.4971 - val_accuracy: 0.8846\n", + "Epoch 18/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.1682 - accuracy: 0.9414 - val_loss: 0.5270 - val_accuracy: 0.8832\n", + "Epoch 19/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.1587 - accuracy: 0.9450 - val_loss: 0.5135 - val_accuracy: 0.8902\n", + "Epoch 20/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.1439 - accuracy: 0.9486 - val_loss: 0.4861 - val_accuracy: 0.8860\n", + "Epoch 21/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.1377 - accuracy: 0.9510 - val_loss: 0.5442 - val_accuracy: 0.8870\n", + "Epoch 22/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.1350 - accuracy: 0.9546 - val_loss: 0.5270 - val_accuracy: 0.8890\n", + "Epoch 23/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.1185 - accuracy: 0.9589 - val_loss: 0.5708 - val_accuracy: 0.8870\n", + "Epoch 24/25\n", + "1719/1719 [==============================] - 4s 3ms/step - loss: 0.1078 - accuracy: 0.9637 - val_loss: 0.6175 - val_accuracy: 0.8864\n", + "Epoch 25/25\n", + "1719/1719 [==============================] - 4s 3ms/step - loss: 0.1110 - accuracy: 0.9623 - val_loss: 0.6164 - val_accuracy: 0.8856\n" + ], + "name": "stdout" + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "o06AUsZjLOpW", + "outputId": "d9bf73fb-2b6d-4c02-eabd-61d2384be458", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 303 + } + }, + "source": [ + "plt.plot(history.epoch, history.history[\"lr\"], \"o-\")\n", + "plt.axis([0, n_epochs - 1, 0, 0.011])\n", + "plt.xlabel(\"Epoch\")\n", + "plt.ylabel(\"Learning Rate\")\n", + "plt.title(\"Exponential Scheduling\", fontsize=14)\n", + "plt.grid(True)\n", + "plt.show()" + ], + "execution_count": 82, + "outputs": [ + { + "output_type": "display_data", + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZgAAAEeCAYAAAC30gOQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3deXxU1f3/8dcnGwkECAEECbIpouyIuBZFrVWrfkWxtWpd2rrU1p9ttW5VW6ttFa2ttVqVutW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3wEwf/Z2e6+AigDjkt6lCJ7SD0YkeRpZmYdo8q2u/vK8PszzOwjgs2nziRIFoeGdU8RTAJ43Mx+DbQhGNAfHdEr+j3wZzNbDowFmgPHuftdyfpAInWhBCOSPN8k2NkxUhnQOfz+ZmAEwdbCK4EfuPtHAO6+ycxOAO4GPiSYLDAG+Fn1gdz9fjOrAq4CRgJrgFeS9WFE6kqzyETSIJzh9R13/3e6YxFJFo3BiIhIUijBiIhIUugSmYiIJIV6MCIikhRKMCIikhRKMCIikhRKMCIikhRKMCIikhT/H/aOCTsD3y3zAAAAAElFTkSuQmCC\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "tags": [], + "needs_background": "light" + } + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "y4leAQjZLOpW" + }, + "source": [ + "이 스케줄 함수는 두 번째 매개변수로 현재 학습률을 받을 수 있습니다:" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "S5QPkNZmLOpW" + }, + "source": [ + "def exponential_decay_fn(epoch, lr):\n", + " return lr * 0.1**(1 / 20)" + ], + "execution_count": 83, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "2MB6gpmtLOpX" + }, + "source": [ + "에포크가 아니라 반복마다 학습률을 업데이트하려면 사용자 정의 콜백 클래스를 작성해야 합니다:" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "qpWM_UXaLOpX", + "outputId": "332f517a-6770-4ead-e4f8-ac358bcb3adc", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "K = keras.backend\n", + "\n", + "class ExponentialDecay(keras.callbacks.Callback):\n", + " def __init__(self, s=40000):\n", + " super().__init__()\n", + " self.s = s\n", + "\n", + " def on_batch_begin(self, batch, logs=None):\n", + " # 노트: 에포크마다 `batch` 매개변수가 재설정됩니다\n", + " lr = K.get_value(self.model.optimizer.lr)\n", + " K.set_value(self.model.optimizer.lr, lr * 0.1**(1 / s))\n", + "\n", + " def on_epoch_end(self, epoch, logs=None):\n", + " logs = logs or {}\n", + " logs['lr'] = K.get_value(self.model.optimizer.lr)\n", + "\n", + "model = keras.models.Sequential([\n", + " keras.layers.Flatten(input_shape=[28, 28]),\n", + " keras.layers.Dense(300, activation=\"selu\", kernel_initializer=\"lecun_normal\"),\n", + " keras.layers.Dense(100, activation=\"selu\", kernel_initializer=\"lecun_normal\"),\n", + " keras.layers.Dense(10, activation=\"softmax\")\n", + "])\n", + "lr0 = 0.01\n", + "optimizer = keras.optimizers.Nadam(lr=lr0)\n", + "model.compile(loss=\"sparse_categorical_crossentropy\", optimizer=optimizer, metrics=[\"accuracy\"])\n", + "n_epochs = 25\n", + "\n", + "s = 20 * len(X_train) // 32 # 20 에포크 동안 스텝 횟수 (배치 크기 = 32)\n", + "exp_decay = ExponentialDecay(s)\n", + "history = model.fit(X_train_scaled, y_train, epochs=n_epochs,\n", + " validation_data=(X_valid_scaled, y_valid),\n", + " callbacks=[exp_decay])" + ], + "execution_count": 84, + "outputs": [ + { + "output_type": "stream", + "text": [ + "Epoch 1/25\n", + "1719/1719 [==============================] - 6s 3ms/step - loss: 1.1115 - accuracy: 0.7381 - val_loss: 0.7662 - val_accuracy: 0.7760\n", + "Epoch 2/25\n", + "1719/1719 [==============================] - 6s 3ms/step - loss: 0.6374 - accuracy: 0.7985 - val_loss: 0.5625 - val_accuracy: 0.8226\n", + "Epoch 3/25\n", + "1719/1719 [==============================] - 6s 3ms/step - loss: 0.5862 - accuracy: 0.8178 - val_loss: 0.8932 - val_accuracy: 0.7694\n", + "Epoch 4/25\n", + "1719/1719 [==============================] - 6s 3ms/step - loss: 0.5377 - accuracy: 0.8325 - val_loss: 0.4869 - val_accuracy: 0.8520\n", + "Epoch 5/25\n", + "1719/1719 [==============================] - 6s 3ms/step - loss: 0.4675 - accuracy: 0.8487 - val_loss: 0.4377 - val_accuracy: 0.8692\n", + "Epoch 6/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.4113 - accuracy: 0.8651 - val_loss: 0.4454 - val_accuracy: 0.8648\n", + "Epoch 7/25\n", + "1719/1719 [==============================] - 6s 3ms/step - loss: 0.3786 - accuracy: 0.8751 - val_loss: 0.5048 - val_accuracy: 0.8596\n", + "Epoch 8/25\n", + "1719/1719 [==============================] - 6s 3ms/step - loss: 0.3625 - accuracy: 0.8837 - val_loss: 0.4919 - val_accuracy: 0.8526\n", + "Epoch 9/25\n", + "1719/1719 [==============================] - 6s 3ms/step - loss: 0.3259 - accuracy: 0.8895 - val_loss: 0.4738 - val_accuracy: 0.8604\n", + "Epoch 10/25\n", + "1719/1719 [==============================] - 6s 3ms/step - loss: 0.3111 - accuracy: 0.8963 - val_loss: 0.4203 - val_accuracy: 0.8876\n", + "Epoch 11/25\n", + "1719/1719 [==============================] - 6s 3ms/step - loss: 0.2740 - accuracy: 0.9079 - val_loss: 0.4345 - val_accuracy: 0.8852\n", + "Epoch 12/25\n", + "1719/1719 [==============================] - 6s 3ms/step - loss: 0.2592 - accuracy: 0.9117 - val_loss: 0.4351 - val_accuracy: 0.8820\n", + "Epoch 13/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2383 - accuracy: 0.9200 - val_loss: 0.4287 - val_accuracy: 0.8882\n", + "Epoch 14/25\n", + "1719/1719 [==============================] - 6s 3ms/step - loss: 0.2309 - accuracy: 0.9236 - val_loss: 0.4414 - val_accuracy: 0.8838\n", + "Epoch 15/25\n", + "1719/1719 [==============================] - 6s 3ms/step - loss: 0.2098 - accuracy: 0.9290 - val_loss: 0.4232 - val_accuracy: 0.8916\n", + "Epoch 16/25\n", + "1719/1719 [==============================] - 6s 3ms/step - loss: 0.1936 - accuracy: 0.9342 - val_loss: 0.4336 - val_accuracy: 0.8896\n", + "Epoch 17/25\n", + "1719/1719 [==============================] - 6s 3ms/step - loss: 0.1782 - accuracy: 0.9392 - val_loss: 0.4625 - val_accuracy: 0.8890\n", + "Epoch 18/25\n", + "1719/1719 [==============================] - 6s 3ms/step - loss: 0.1644 - accuracy: 0.9456 - val_loss: 0.4693 - val_accuracy: 0.8904\n", + "Epoch 19/25\n", + "1719/1719 [==============================] - 6s 3ms/step - loss: 0.1554 - accuracy: 0.9496 - val_loss: 0.4725 - val_accuracy: 0.8982\n", + "Epoch 20/25\n", + "1719/1719 [==============================] - 6s 3ms/step - loss: 0.1481 - accuracy: 0.9515 - val_loss: 0.5076 - val_accuracy: 0.8902\n", + "Epoch 21/25\n", + "1719/1719 [==============================] - 6s 3ms/step - loss: 0.1368 - accuracy: 0.9555 - val_loss: 0.5094 - val_accuracy: 0.8940\n", + "Epoch 22/25\n", + "1719/1719 [==============================] - 6s 3ms/step - loss: 0.1278 - accuracy: 0.9575 - val_loss: 0.5544 - val_accuracy: 0.8934\n", + "Epoch 23/25\n", + "1719/1719 [==============================] - 6s 3ms/step - loss: 0.1194 - accuracy: 0.9619 - val_loss: 0.5734 - val_accuracy: 0.8902\n", + "Epoch 24/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.1135 - accuracy: 0.9647 - val_loss: 0.5960 - val_accuracy: 0.8928\n", + "Epoch 25/25\n", + "1719/1719 [==============================] - 6s 3ms/step - loss: 0.1080 - accuracy: 0.9659 - val_loss: 0.6002 - val_accuracy: 0.8896\n" + ], + "name": "stdout" + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "xsajfS10LOpX" + }, + "source": [ + "n_steps = n_epochs * len(X_train) // 32\n", + "steps = np.arange(n_steps)\n", + "lrs = lr0 * 0.1**(steps / s)" + ], + "execution_count": 85, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "scrolled": true, + "id": "nn7VunvILOpX", + "outputId": "a0f14eed-c080-434a-9f35-20e29c6d8745", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 303 + } + }, + "source": [ + "plt.plot(steps, lrs, \"-\", linewidth=2)\n", + "plt.axis([0, n_steps - 1, 0, lr0 * 1.1])\n", + "plt.xlabel(\"Batch\")\n", + "plt.ylabel(\"Learning Rate\")\n", + "plt.title(\"Exponential Scheduling (per batch)\", fontsize=14)\n", + "plt.grid(True)\n", + "plt.show()" + ], + "execution_count": 86, + "outputs": [ + { + "output_type": "display_data", + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZgAAAEeCAYAAAC30gOQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nOzdeXwU9fnA8c+T+05Iwn0jl9yXJyDghVoP1LZWrIpo8aytR/lZj9Ziq6KlXlUEL1S8sIK3RakEBBUBUQin3CHcCYQkJATC8/tjJrgsm2QTsrs5nvfrNa9k5/ud2Wcmm3l25vud74iqYowxxtS0sFAHYIwxpn6yBGOMMSYgLMEYY4wJCEswxhhjAsISjDHGmICwBGOMMSYgLMGYOk9ERolIQRWXyRCRfwcqJvc9NorI3QFY7y9FpEr3F3jvo+rss+MhIn8VkZeD9X4+3l9F5JcheN9K97OI3CoiHwUrpmCyBFOHicgU9x/He/o21LEFSjkHineADgF4rxtEZImIFIhInogsFZG/1/T7hEhA9pkvItIEuAuo0/tORB4UkcwArPpFoL+IDA7AukMqItQBmOM2C7jaa15JKAIJFVUtAopqcp0iMhp4GrgD+B8QCfQATqvJ9wmVQOyzCtwAfKeq6wP9RiISqaoHA/0+NUlVD4jIm8DtwFehjqcm2RlM3XdAVbd7TbkAIjJERA6KyNCyyiJyo4jsE5EO7usMEXleRJ4SkT3u9LiIhHks00hEXnXLikRkloh09ygf5X7LP0tEMkWkUERmi0h7z0BF5CIRWSwixSKyQUT+ISJRHuUbReR+EZnkxrhFRP7kWe7++q57JrPR8/096p0gIh+IyHY3lu9F5MIq7teLgemqOklV16rqSlV9V1Xv9NqmC0RkgbtfckTkIxGJ8agSU972uMsni8hkEdkpIvkiMkdEBnjVuUZENonIfhH5GGjqVX7MN+vKLs342GcPun+734jIOjeW90Uk3aNOhI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LRWSliFzh+cbiPK43033s7WwRaR/MDTcmItQBGNNQuEO8XwEsU9Uid3YhMBrIBrrhDFZ5AHgAZ2DFHjiPPh7q1s9zR0z+FGeQxOtwRr/tgjOgYplo4M/uuouBV911Dw/M1hlzLEswxgTWeR4N7vFAFs7zfwBQ1Yc86m4UkYdxhmR/QFWL3GUPqer2skoicg5wGs7otivd2eu93jcCuFVVV7vL/BN4WUREbQBCEyR2icyYwJoL9HGnk4H/AZ+LSGsAEfmliMwTke1uMnkCaFPJOvsC2zySiy8HypLL/7d3hywRBGEYx/9vUIMabIrhisUqCIJVg8FoOKxit4tfwKIf5EC4ZBAsImIQLBaDRQ1GwSByY3gPObZ44eY0/H+wsAs7u2x6mJmFp+8FmCRnPdJYGDBSXR+llMf+cQvske2A+xGxRvZunAPbZHAcAhMjeO9X4/qnKGsEz5aG4hKZNF4F6JFFUuvA8+AyWUS0Gvd/kiVYg+6AhYhY/mUWI/0pA0aqayoi5vvnc2Sn0cZBbgAAAJhJREFU+wzQBWaBxYjYBa7JDfh2Y/wT0IqIFbL46Z1cZrsBOhFxQG7yLwHTpZSzup8jDc/pslTXBtmE+EqGwiqwU0q5LKV0gWPgBLgHNoGjxvgO+cfYBfAGtEspPWALuCKrbh+AU3KPRfo3bLSUJFXhDEaSVIUBI0mqwoCRJFVhwEiSqjBgJElVGDCSpCoMGElSFQaMJKmKb6db+rC4NtrYAAAAAElFTkSuQmCC\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "tags": [], + "needs_background": "light" + } + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "t_Zq20ztLOpX" + }, + "source": [ + "### 기간별 고정 스케줄링" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "up9WMAqWLOpX" + }, + "source": [ + "def piecewise_constant_fn(epoch):\n", + " if epoch < 5:\n", + " return 0.01\n", + " elif epoch < 15:\n", + " return 0.005\n", + " else:\n", + " return 0.001" + ], + "execution_count": 87, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "8isT8EI0LOpY" + }, + "source": [ + "def piecewise_constant(boundaries, values):\n", + " boundaries = np.array([0] + boundaries)\n", + " values = np.array(values)\n", + " def piecewise_constant_fn(epoch):\n", + " return values[np.argmax(boundaries > epoch) - 1]\n", + " return piecewise_constant_fn\n", + "\n", + "piecewise_constant_fn = piecewise_constant([5, 15], [0.01, 0.005, 0.001])" + ], + "execution_count": 88, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "-1w63apOLOpY", + "outputId": "d2623190-28dd-4400-a52d-4ad907c3d199", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "lr_scheduler = keras.callbacks.LearningRateScheduler(piecewise_constant_fn)\n", + "\n", + "model = keras.models.Sequential([\n", + " keras.layers.Flatten(input_shape=[28, 28]),\n", + " keras.layers.Dense(300, activation=\"selu\", kernel_initializer=\"lecun_normal\"),\n", + " keras.layers.Dense(100, activation=\"selu\", kernel_initializer=\"lecun_normal\"),\n", + " keras.layers.Dense(10, activation=\"softmax\")\n", + "])\n", + "model.compile(loss=\"sparse_categorical_crossentropy\", optimizer=\"nadam\", metrics=[\"accuracy\"])\n", + "n_epochs = 25\n", + "history = model.fit(X_train_scaled, y_train, epochs=n_epochs,\n", + " validation_data=(X_valid_scaled, y_valid),\n", + " callbacks=[lr_scheduler])" + ], + "execution_count": 89, + "outputs": [ + { + "output_type": "stream", + "text": [ + "Epoch 1/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 1.2318 - accuracy: 0.7142 - val_loss: 0.9157 - val_accuracy: 0.7232\n", + "Epoch 2/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.7203 - accuracy: 0.7776 - val_loss: 0.6123 - val_accuracy: 0.8198\n", + "Epoch 3/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.8270 - accuracy: 0.7619 - val_loss: 1.4205 - val_accuracy: 0.6206\n", + "Epoch 4/25\n", + "1719/1719 [==============================] - 4s 3ms/step - loss: 0.8446 - accuracy: 0.7524 - val_loss: 0.9360 - val_accuracy: 0.7016\n", + "Epoch 5/25\n", + "1719/1719 [==============================] - 4s 3ms/step - loss: 0.8689 - accuracy: 0.7226 - val_loss: 0.8600 - val_accuracy: 0.7660\n", + "Epoch 6/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.6233 - accuracy: 0.7984 - val_loss: 0.6819 - val_accuracy: 0.8138\n", + "Epoch 7/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.5443 - accuracy: 0.8315 - val_loss: 0.5935 - val_accuracy: 0.8408\n", + "Epoch 8/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.5136 - accuracy: 0.8388 - val_loss: 0.7235 - val_accuracy: 0.7882\n", + "Epoch 9/25\n", + "1719/1719 [==============================] - 4s 3ms/step - loss: 0.5320 - accuracy: 0.8341 - val_loss: 0.6815 - val_accuracy: 0.7836\n", + "Epoch 10/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.4771 - accuracy: 0.8513 - val_loss: 0.6984 - val_accuracy: 0.8196\n", + "Epoch 11/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.4934 - accuracy: 0.8493 - val_loss: 0.6040 - val_accuracy: 0.8466\n", + "Epoch 12/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.4599 - accuracy: 0.8600 - val_loss: 0.6230 - val_accuracy: 0.8420\n", + "Epoch 13/25\n", + "1719/1719 [==============================] - 4s 3ms/step - loss: 0.4432 - accuracy: 0.8611 - val_loss: 0.5845 - val_accuracy: 0.8510\n", + "Epoch 14/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.4706 - accuracy: 0.8597 - val_loss: 0.6285 - val_accuracy: 0.8418\n", + "Epoch 15/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.4539 - accuracy: 0.8629 - val_loss: 0.6618 - val_accuracy: 0.8432\n", + "Epoch 16/25\n", + "1719/1719 [==============================] - 4s 3ms/step - loss: 0.3486 - accuracy: 0.8865 - val_loss: 0.4722 - val_accuracy: 0.8680\n", + "Epoch 17/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2977 - accuracy: 0.9014 - val_loss: 0.4846 - val_accuracy: 0.8630\n", + "Epoch 18/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2881 - accuracy: 0.9052 - val_loss: 0.5084 - val_accuracy: 0.8698\n", + "Epoch 19/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2758 - accuracy: 0.9102 - val_loss: 0.4696 - val_accuracy: 0.8700\n", + "Epoch 20/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2721 - accuracy: 0.9082 - val_loss: 0.4798 - val_accuracy: 0.8736\n", + "Epoch 21/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2666 - accuracy: 0.9129 - val_loss: 0.5165 - val_accuracy: 0.8674\n", + "Epoch 22/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2562 - accuracy: 0.9160 - val_loss: 0.5196 - val_accuracy: 0.8728\n", + "Epoch 23/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2504 - accuracy: 0.9179 - val_loss: 0.5501 - val_accuracy: 0.8680\n", + "Epoch 24/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2419 - accuracy: 0.9202 - val_loss: 0.6129 - val_accuracy: 0.8692\n", + "Epoch 25/25\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.2459 - accuracy: 0.9209 - val_loss: 0.5537 - val_accuracy: 0.8682\n" + ], + "name": "stdout" + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "iP46umHULOpY", + "outputId": "039e04fb-2e51-4fc0-c056-db18aa65606b", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 303 + } + }, + "source": [ + "plt.plot(history.epoch, [piecewise_constant_fn(epoch) for epoch in history.epoch], \"o-\")\n", + "plt.axis([0, n_epochs - 1, 0, 0.011])\n", + "plt.xlabel(\"Epoch\")\n", + "plt.ylabel(\"Learning Rate\")\n", + "plt.title(\"Piecewise Constant Scheduling\", fontsize=14)\n", + "plt.grid(True)\n", + "plt.show()" + ], + "execution_count": 90, + "outputs": [ + { + "output_type": "display_data", + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZgAAAEeCAYAAAC30gOQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3de5hcVZ3v//cn907nRjqBQNA0CjYSgSCKowySERFnPP6M4pwzAyLIKF6G4wUEYUYUUQfDyAziIJIzIqDoT50DBMQBB6FHUbyASEIgiXIJkHBJAgnppHP/nj/WrrBTqere3emqSnd9Xs9TT7r2WmvX2qsr9e2116q1FBGYmZkNtGGNroCZmQ1NDjBmZlYTDjBmZlYTDjBmZlYTDjBmZlYTDjBmZlYTDjC2C0mnSepqdD16IikkvbfR9bBiJF0j6cc1OO+U7L0wuw9l2rMyr6v03AaOA0wTyv6zR/bYIulRSV+V1Jpl+QHwikbWsYB9gVtq+QKSxkv6oqSHJHVLelZSp6S/lVSX/zu1/PDry7klHSvpZ5JWSdog6RFJ10uaMND1aoAnSe+nPzS6IkPNiEZXwBrmDuAUYCRwDPDvQCvw0YjoBrobWLdeRcQztTy/pEnA3cBewGeB3wKbgT8HLgDuAR6vZR32FJIOAW4Dvgl8ElgPvBJ4NzC6gVUbEBGxDajp+6lpRYQfTfYArgF+XHbs/wBPZz+fBnSVpb8TuA/YCDwGfBkYlUsfBfwTsAzYBDwKfDyXfghwK7AOeA74PjAtSzsYiNzzsdk5bsuV/yDwp9zzAN6be/653Gs/A1yXSxNwLvAIKXAuBN7XSxt9g/RBun+FtDHAmOznvYBrgReyc98BzMzlPQ3oAo4DHszOeRdwQC7Py4D5w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haZikNuByoDMiym8NDWVXAq8G3hkR3bnjzfmeiYimfpCmDN4ErAeeAE5qdJ0a/QCmAr8jdd/XAL8Gjm90vRrQDheS/grPPy7M0t4KLAa6SQuwtje6vo1uF+Bvgcey/0tPkxaendbo+taxXWZkbbGRdEus9Di5Wd8zXovMzMxqoqlvkZmZWe04wJiZWU04wJiZWU04wJiZWU04wJiZWU04wJiZWU04wJgNUdneLO9tdD2seTnAmNWApGuyD/jyx68bXTezemnq/WDMauwO0t5CeZsbURGzRnAPxqx2NkXEM2WP52HH7aszJd2abaG7TNL78oUlHSrpDkndkp7PekUTy/KcKmlhtn3xs5KuLavDZEk/yrYEf7T8NcxqyQHGrHG+ANwMzCLtuXNdtktkabXd20lrWR0FvBt4E7ltiiV9GLgK+DZwGGk7hQfLXuNzwHzSSr4/AK6W9PLaXZLZS7wWmVkNSLoGeB9p4cO8KyLiM5IC+PeI+FCuzB3AMxHxPkkfAr4K7B8R67L02cBdwEER8SdJTwHfjYiK23tnr/GViDg/ez6CtMHeGRHx3QG8XLOKPAZjVjs/B84oO7Ym9/M9ZWn3AO/Ifn41aTn3/IZUvwK2A4dIepG02+jPeqnDgtIPEbFV0kpg72LVN9s9DjBmtbMhIv5Ug/P25bbDlrLngW+NW534jWbWOH9W4fnD2c8PA4eWbTf8JtL/2Ycj4jlgOXBczWtp1k/uwZjVzmhJ08qObYuIldnP75H0O9LmU+8lBYs3ZGnXkyYBXCfpc8BepAH9G3K9oi8D/yrpWeBWYCxwXERcWqsLMusLBxiz2nkraWfHvOXA/tnPFwInkrYWXgl8ICJ+BxARGySdAFwG/JY0WWA+8InSiSLiSkmbgbOBucDzwE9qdTFmfeVZZGYNkM3w+uuI+I9G18WsVjwGY2ZmNeEAY2ZmNeFbZGZmVhPuwZiZWU04wJiZWU04wJiZWU04wJiZWU04wJiZWU38PxmRO1uiXyieAAAAAElFTkSuQmCC\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "tags": [], + "needs_background": "light" + } + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "PcBjd75fLOpY" + }, + "source": [ + "### 성능 기반 스케줄링" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "JBL86sCNLOpY" + }, + "source": [ + "tf.random.set_seed(42)\n", + "np.random.seed(42)" + ], + "execution_count": 91, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "e_Bc-HBcLOpY", + "outputId": "2867d0a7-dc95-4878-e655-7e0934e01bc7", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "lr_scheduler = keras.callbacks.ReduceLROnPlateau(factor=0.5, patience=5)\n", + "\n", + "model = keras.models.Sequential([\n", + " keras.layers.Flatten(input_shape=[28, 28]),\n", + " keras.layers.Dense(300, activation=\"selu\", kernel_initializer=\"lecun_normal\"),\n", + " keras.layers.Dense(100, activation=\"selu\", kernel_initializer=\"lecun_normal\"),\n", + " keras.layers.Dense(10, activation=\"softmax\")\n", + "])\n", + "optimizer = keras.optimizers.SGD(lr=0.02, momentum=0.9)\n", + "model.compile(loss=\"sparse_categorical_crossentropy\", optimizer=optimizer, metrics=[\"accuracy\"])\n", + "n_epochs = 25\n", + "history = model.fit(X_train_scaled, y_train, epochs=n_epochs,\n", + " validation_data=(X_valid_scaled, y_valid),\n", + " callbacks=[lr_scheduler])" + ], + "execution_count": 92, + "outputs": [ + { + "output_type": "stream", + "text": [ + "Epoch 1/25\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.7100 - accuracy: 0.7765 - val_loss: 0.4821 - val_accuracy: 0.8490\n", + "Epoch 2/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.4904 - accuracy: 0.8387 - val_loss: 0.5661 - val_accuracy: 0.8390\n", + "Epoch 3/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.4964 - accuracy: 0.8431 - val_loss: 0.5486 - val_accuracy: 0.8502\n", + "Epoch 4/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.5018 - accuracy: 0.8470 - val_loss: 0.4818 - val_accuracy: 0.8566\n", + "Epoch 5/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.5284 - accuracy: 0.8433 - val_loss: 0.5047 - val_accuracy: 0.8502\n", + "Epoch 6/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.5061 - accuracy: 0.8549 - val_loss: 0.5721 - val_accuracy: 0.8520\n", + "Epoch 7/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.5315 - accuracy: 0.8530 - val_loss: 0.5131 - val_accuracy: 0.8626\n", + "Epoch 8/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.5037 - accuracy: 0.8578 - val_loss: 0.6451 - val_accuracy: 0.8064\n", + "Epoch 9/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.4976 - accuracy: 0.8588 - val_loss: 0.5515 - val_accuracy: 0.8620\n", + "Epoch 10/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.3127 - accuracy: 0.8938 - val_loss: 0.4293 - val_accuracy: 0.8776\n", + "Epoch 11/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2376 - accuracy: 0.9126 - val_loss: 0.4315 - val_accuracy: 0.8856\n", + "Epoch 12/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2253 - accuracy: 0.9182 - val_loss: 0.4620 - val_accuracy: 0.8760\n", + "Epoch 13/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2032 - accuracy: 0.9240 - val_loss: 0.4370 - val_accuracy: 0.8890\n", + "Epoch 14/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.1862 - accuracy: 0.9286 - val_loss: 0.5031 - val_accuracy: 0.8702\n", + "Epoch 15/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.1882 - accuracy: 0.9294 - val_loss: 0.4409 - val_accuracy: 0.8862\n", + "Epoch 16/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.1423 - accuracy: 0.9449 - val_loss: 0.4379 - val_accuracy: 0.8930\n", + "Epoch 17/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.1136 - accuracy: 0.9557 - val_loss: 0.4688 - val_accuracy: 0.8924\n", + "Epoch 18/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.1068 - accuracy: 0.9582 - val_loss: 0.4734 - val_accuracy: 0.8876\n", + "Epoch 19/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.1023 - accuracy: 0.9604 - val_loss: 0.4930 - val_accuracy: 0.8938\n", + "Epoch 20/25\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.0986 - accuracy: 0.9611 - val_loss: 0.5015 - val_accuracy: 0.8932\n", + "Epoch 21/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.0803 - accuracy: 0.9684 - val_loss: 0.5080 - val_accuracy: 0.8966\n", + "Epoch 22/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.0751 - accuracy: 0.9712 - val_loss: 0.5266 - val_accuracy: 0.8964\n", + "Epoch 23/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.0700 - accuracy: 0.9742 - val_loss: 0.5284 - val_accuracy: 0.8946\n", + "Epoch 24/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.0654 - accuracy: 0.9759 - val_loss: 0.5423 - val_accuracy: 0.8932\n", + "Epoch 25/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.0632 - accuracy: 0.9770 - val_loss: 0.5530 - val_accuracy: 0.8970\n" + ], + "name": "stdout" + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "8pgrsYWWLOpZ", + "outputId": "011acd77-c574-43e2-f8a3-bfa865f7f146", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 303 + } + }, + "source": [ + "plt.plot(history.epoch, history.history[\"lr\"], \"bo-\")\n", + "plt.xlabel(\"Epoch\")\n", + "plt.ylabel(\"Learning Rate\", color='b')\n", + "plt.tick_params('y', colors='b')\n", + "plt.gca().set_xlim(0, n_epochs - 1)\n", + "plt.grid(True)\n", + "\n", + "ax2 = plt.gca().twinx()\n", + "ax2.plot(history.epoch, history.history[\"val_loss\"], \"r^-\")\n", + "ax2.set_ylabel('Validation Loss', color='r')\n", + "ax2.tick_params('y', colors='r')\n", + "\n", + "plt.title(\"Reduce LR on Plateau\", fontsize=14)\n", + "plt.show()" + ], + "execution_count": 93, + "outputs": [ + { + "output_type": "display_data", + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAdMAAAEeCAYAAADRiP/HAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nOydeZhUxdW43wMMu4iAUQGdkQiyGEXEDWQRE6N+Ma753H5GYqJxiUs2jTFEI5qIUb/EuOK+EKNxNxo1ChOWwR0ZBAVFYVgGZRMYtmHg/P449zp3em53316nZ7re56lnuqvqVlXfmelz69RZRFVxOBwOh8ORPq2aegEOh8PhcDR3nDB1OBwOhyNDnDB1OBwOhyNDnDB1OBwOhyNDnDB1OBwOhyNDnDB1OBwOhyNDnDB1FB0iUiMiY5t6HS0NEVkkIr9q6nU4HE2BE6aOgkREHhIR9UqdiFSJyF0isktTry0biMho77P1iNN+beDz7xCR5SIySUT2zPdavfWMDaxHRaRaRJ4Ukb0zHLMmm+t0OJoKJ0wdhczrwB5AGfAT4HjgzqZcUJ6Zj33+3sBpwLeAJ5twPZu89fQEzgQGAy+ISOsmXJPDURA4YeooZLaq6gpVXaqqrwFPAEcHO4jIj0RknohsEZEFIvJzEWkVaN9HRMq99vki8r2Y68u8ndbQmHoVkVMD73t6O8PVIrJJRD4QkSMD7ceLyHvePJ+LyA0i0jbDz1/nff7lqjoNuBc4TES6JLpIRE4WkTkislVElojI1SIigfZ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pDK2wvGAAAAAElFTkSuQmCC\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "tags": [], + "needs_background": "light" + } + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "HezOhTgrLOpZ" + }, + "source": [ + "### tf.keras 스케줄러" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "mM6gXVz4LOpZ", + "outputId": "4af8e052-d12e-464a-9c5a-922ae9842c13", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "model = keras.models.Sequential([\n", + " keras.layers.Flatten(input_shape=[28, 28]),\n", + " keras.layers.Dense(300, activation=\"selu\", kernel_initializer=\"lecun_normal\"),\n", + " keras.layers.Dense(100, activation=\"selu\", kernel_initializer=\"lecun_normal\"),\n", + " keras.layers.Dense(10, activation=\"softmax\")\n", + "])\n", + "s = 20 * len(X_train) // 32 # number of steps in 20 epochs (batch size = 32)\n", + "learning_rate = keras.optimizers.schedules.ExponentialDecay(0.01, s, 0.1)\n", + "optimizer = keras.optimizers.SGD(learning_rate)\n", + "model.compile(loss=\"sparse_categorical_crossentropy\", optimizer=optimizer, metrics=[\"accuracy\"])\n", + "n_epochs = 25\n", + "history = model.fit(X_train_scaled, y_train, epochs=n_epochs,\n", + " validation_data=(X_valid_scaled, y_valid))" + ], + "execution_count": 94, + "outputs": [ + { + "output_type": "stream", + "text": [ + "Epoch 1/25\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.5995 - accuracy: 0.7923 - val_loss: 0.4092 - val_accuracy: 0.8604\n", + "Epoch 2/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.3890 - accuracy: 0.8613 - val_loss: 0.3737 - val_accuracy: 0.8694\n", + "Epoch 3/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.3531 - accuracy: 0.8774 - val_loss: 0.3731 - val_accuracy: 0.8692\n", + "Epoch 4/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.3296 - accuracy: 0.8813 - val_loss: 0.3492 - val_accuracy: 0.8800\n", + "Epoch 5/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.3176 - accuracy: 0.8866 - val_loss: 0.3430 - val_accuracy: 0.8792\n", + "Epoch 6/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2928 - accuracy: 0.8954 - val_loss: 0.3414 - val_accuracy: 0.8812\n", + "Epoch 7/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2852 - accuracy: 0.8985 - val_loss: 0.3356 - val_accuracy: 0.8816\n", + "Epoch 8/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2713 - accuracy: 0.9039 - val_loss: 0.3365 - val_accuracy: 0.8814\n", + "Epoch 9/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2713 - accuracy: 0.9044 - val_loss: 0.3266 - val_accuracy: 0.8860\n", + "Epoch 10/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2569 - accuracy: 0.9084 - val_loss: 0.3240 - val_accuracy: 0.8848\n", + "Epoch 11/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2500 - accuracy: 0.9115 - val_loss: 0.3252 - val_accuracy: 0.8866\n", + "Epoch 12/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2452 - accuracy: 0.9147 - val_loss: 0.3302 - val_accuracy: 0.8812\n", + "Epoch 13/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2408 - accuracy: 0.9155 - val_loss: 0.3219 - val_accuracy: 0.8858\n", + "Epoch 14/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2377 - accuracy: 0.9159 - val_loss: 0.3223 - val_accuracy: 0.8864\n", + "Epoch 15/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2377 - accuracy: 0.9171 - val_loss: 0.3209 - val_accuracy: 0.8878\n", + "Epoch 16/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2316 - accuracy: 0.9192 - val_loss: 0.3185 - val_accuracy: 0.8896\n", + "Epoch 17/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2264 - accuracy: 0.9213 - val_loss: 0.3198 - val_accuracy: 0.8886\n", + "Epoch 18/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2283 - accuracy: 0.9188 - val_loss: 0.3169 - val_accuracy: 0.8902\n", + "Epoch 19/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2283 - accuracy: 0.9203 - val_loss: 0.3198 - val_accuracy: 0.8894\n", + "Epoch 20/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2287 - accuracy: 0.9218 - val_loss: 0.3170 - val_accuracy: 0.8902\n", + "Epoch 21/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2264 - accuracy: 0.9209 - val_loss: 0.3180 - val_accuracy: 0.8904\n", + "Epoch 22/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2256 - accuracy: 0.9200 - val_loss: 0.3164 - val_accuracy: 0.8914\n", + "Epoch 23/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2222 - accuracy: 0.9233 - val_loss: 0.3171 - val_accuracy: 0.8902\n", + "Epoch 24/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2180 - accuracy: 0.9241 - val_loss: 0.3166 - val_accuracy: 0.8898\n", + "Epoch 25/25\n", + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.2221 - accuracy: 0.9234 - val_loss: 0.3165 - val_accuracy: 0.8914\n" + ], + "name": "stdout" + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "e7s1E4aILOpZ" + }, + "source": [ + "구간별 고정 스케줄링은 다음을 사용하세요:" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "mB1XJs34LOpa" + }, + "source": [ + "learning_rate = keras.optimizers.schedules.PiecewiseConstantDecay(\n", + " boundaries=[5. * n_steps_per_epoch, 15. * n_steps_per_epoch],\n", + " values=[0.01, 0.005, 0.001])" + ], + "execution_count": 95, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "-QgJ_wlTLOpa" + }, + "source": [ + "### 1사이클 스케줄링" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "v2ZxFRyHLOpa" + }, + "source": [ + "K = keras.backend\n", + "\n", + "class ExponentialLearningRate(keras.callbacks.Callback):\n", + " def __init__(self, factor):\n", + " self.factor = factor\n", + " self.rates = []\n", + " self.losses = []\n", + " def on_batch_end(self, batch, logs):\n", + " self.rates.append(K.get_value(self.model.optimizer.lr))\n", + " self.losses.append(logs[\"loss\"])\n", + " K.set_value(self.model.optimizer.lr, self.model.optimizer.lr * self.factor)\n", + "\n", + "def find_learning_rate(model, X, y, epochs=1, batch_size=32, min_rate=10**-5, max_rate=10):\n", + " init_weights = model.get_weights()\n", + " iterations = len(X) // batch_size * epochs\n", + " factor = np.exp(np.log(max_rate / min_rate) / iterations)\n", + " init_lr = K.get_value(model.optimizer.lr)\n", + " K.set_value(model.optimizer.lr, min_rate)\n", + " exp_lr = ExponentialLearningRate(factor)\n", + " history = model.fit(X, y, epochs=epochs, batch_size=batch_size,\n", + " callbacks=[exp_lr])\n", + " K.set_value(model.optimizer.lr, init_lr)\n", + " model.set_weights(init_weights)\n", + " return exp_lr.rates, exp_lr.losses\n", + "\n", + "def plot_lr_vs_loss(rates, losses):\n", + " plt.plot(rates, losses)\n", + " plt.gca().set_xscale('log')\n", + " plt.hlines(min(losses), min(rates), max(rates))\n", + " plt.axis([min(rates), max(rates), min(losses), (losses[0] + min(losses)) / 2])\n", + " plt.xlabel(\"Learning rate\")\n", + " plt.ylabel(\"Loss\")" + ], + "execution_count": 96, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "tmWjq-nILOpa" + }, + "source": [ + "tf.random.set_seed(42)\n", + "np.random.seed(42)\n", + "\n", + "model = keras.models.Sequential([\n", + " keras.layers.Flatten(input_shape=[28, 28]),\n", + " keras.layers.Dense(300, activation=\"selu\", kernel_initializer=\"lecun_normal\"),\n", + " keras.layers.Dense(100, activation=\"selu\", kernel_initializer=\"lecun_normal\"),\n", + " keras.layers.Dense(10, activation=\"softmax\")\n", + "])\n", + "model.compile(loss=\"sparse_categorical_crossentropy\",\n", + " optimizer=keras.optimizers.SGD(lr=1e-3),\n", + " metrics=[\"accuracy\"])" + ], + "execution_count": 97, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "N7dpX40rLOpa", + "outputId": "fcea5e32-513b-4269-960e-939e0f398353", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 345 + } + }, + "source": [ + "batch_size = 128\n", + "rates, losses = find_learning_rate(model, X_train_scaled, y_train, epochs=1, batch_size=batch_size)\n", + "plot_lr_vs_loss(rates, losses)" + ], + "execution_count": 98, + "outputs": [ + { + "output_type": "stream", + "text": [ + " 1/430 [..............................] - ETA: 1:35 - loss: 2.6624 - accuracy: 0.1406WARNING:tensorflow:Callback method `on_train_batch_end` is slow compared to the batch time (batch time: 0.0016s vs `on_train_batch_end` time: 0.0017s). Check your callbacks.\n", + "430/430 [==============================] - 1s 3ms/step - loss: nan - accuracy: 0.3135\n" + ], + "name": "stdout" + }, + { + "output_type": "display_data", + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZQAAAERCAYAAABcuFHLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3deXjV5Z338fc3GyFAWGMCgYCgKAREAQV36wJ1nVawrdatdartVa3T6UxrO3aKU6fz6DztXE+fzjOtjg5udcWlKiqjY1HrgqAiiyvKImvYCUnI9n3+OAeIMXt+59wn53xe15WrJ+f8cvjeHson9/K7b3N3REREuisrdAEiIpIeFCgiIhIJBYqIiERCgSIiIpFQoIiISCQUKCIiEomc0AVEaci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/t1PWycCEeC37f/b6Jq//Gjg1/vzpxLYQP7kDzc0Hfg5cA4wH1nSgbcfG//c7wND935vZTOA+4HfETuz7NjAb+FUH6hCJCb0Tpr701dkvYmdcP9XKa/8EvNDsuYHEdlg9rpWfMWAjcGmT5xz4v82umwPUAP2bPPcPwMfNrlnerNZ1QHaT524Hno8/7kusd/GNJq/3AXbQ5PzvFmq+Ml7jlHb+W7XWttnNrnsJ+Hmz575C7BAmC/2Z66tnfKmHIulmCnBKfDio0swqif2DDjAGwMwOMbM/mNmHZraL2Al1hwBlzd5rcQvvv8bddzX5fkP8Z9uy0t0bWvmZMUAusGj/ix47p6IjK8XqifVADuhE25qbAvxDs/9ufyQWbiVt/6hITE89U16kNVnA08DftfDa5vj/3gUUAz8EVgP7gBeA5vMFe1t4j7pm3zvtDx135Wc6Yl+zoIKOt625LOAm4OEWXqvoXpmSKRQokm7eAr5GrCfR/B/y/U4CfuDuTwOYWTGx+YQQVhELnGOBT+L1FBCbc1nVhffrSNvqiJ3e19RbwJHu/nEX/kwRQIEiPVehmR3d7LmdxCbPvwM8aGa3EPvtejSxkPmRu+8hdpb2pWb2BrEhnVuJzWMknbtXmtmdwC1mtpXYfMeNxHoMXblJrCNtWw2cYWYLifVydhCbe3rKzNYADxEbTptAbN7px12oQzKQ5lCkpzoZeLvZ1/929w3AiUAj8CywgljI7It/QWwFU19gCfAAcCexf2RD+TvgZeBPwIvAu8Tmb2q68F4daduPgC8Rm1t6G8DdnwPOjT+/KP51A7FjYUU6RHfKi6QYM+tFbAnwv7r7r0PXI9JRGvISCczMjgHGEesV9AN+Ev/fB0PWJdJZChSR1PC3wBEcXAp8irt/FrYkkc7RkJeIiERCk/IiIhIJBYqIiERCgSIiIpFQoIiISCQUKCIiEgkFioiIROL/A/Wb0jPKXBbCAAAAAElFTkSuQmCC\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "tags": [], + "needs_background": "light" + } + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "20u-WHSyLOpc" + }, + "source": [ + "class OneCycleScheduler(keras.callbacks.Callback):\n", + " def __init__(self, iterations, max_rate, start_rate=None,\n", + " last_iterations=None, last_rate=None):\n", + " self.iterations = iterations\n", + " self.max_rate = max_rate\n", + " self.start_rate = start_rate or max_rate / 10\n", + " self.last_iterations = last_iterations or iterations // 10 + 1\n", + " self.half_iteration = (iterations - self.last_iterations) // 2\n", + " self.last_rate = last_rate or self.start_rate / 1000\n", + " self.iteration = 0\n", + " def _interpolate(self, iter1, iter2, rate1, rate2):\n", + " return ((rate2 - rate1) * (self.iteration - iter1)\n", + " / (iter2 - iter1) + rate1)\n", + " def on_batch_begin(self, batch, logs):\n", + " if self.iteration < self.half_iteration:\n", + " rate = self._interpolate(0, self.half_iteration, self.start_rate, self.max_rate)\n", + " elif self.iteration < 2 * self.half_iteration:\n", + " rate = self._interpolate(self.half_iteration, 2 * self.half_iteration,\n", + " self.max_rate, self.start_rate)\n", + " else:\n", + " rate = self._interpolate(2 * self.half_iteration, self.iterations,\n", + " self.start_rate, self.last_rate)\n", + " rate = max(rate, self.last_rate)\n", + " self.iteration += 1\n", + " K.set_value(self.model.optimizer.lr, rate)" + ], + "execution_count": 99, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "3T9DaJx8LOpc", + "outputId": "8bc95003-5f2e-43bc-f8f0-3b729625f0a0", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "n_epochs = 25\n", + "onecycle = OneCycleScheduler(len(X_train) // batch_size * n_epochs, max_rate=0.05)\n", + "history = model.fit(X_train_scaled, y_train, epochs=n_epochs, batch_size=batch_size,\n", + " validation_data=(X_valid_scaled, y_valid),\n", + " callbacks=[onecycle])" + ], + "execution_count": 100, + "outputs": [ + { + "output_type": "stream", + "text": [ + "Epoch 1/25\n", + "430/430 [==============================] - 1s 3ms/step - loss: 0.6572 - accuracy: 0.7739 - val_loss: 0.4871 - val_accuracy: 0.8336\n", + "Epoch 2/25\n", + "430/430 [==============================] - 1s 3ms/step - loss: 0.4581 - accuracy: 0.8396 - val_loss: 0.4274 - val_accuracy: 0.8526\n", + "Epoch 3/25\n", + "430/430 [==============================] - 1s 2ms/step - loss: 0.4121 - accuracy: 0.8546 - val_loss: 0.4114 - val_accuracy: 0.8584\n", + "Epoch 4/25\n", + "430/430 [==============================] - 1s 3ms/step - loss: 0.3837 - accuracy: 0.8641 - val_loss: 0.3871 - val_accuracy: 0.8688\n", + "Epoch 5/25\n", + "430/430 [==============================] - 1s 3ms/step - loss: 0.3639 - accuracy: 0.8717 - val_loss: 0.3765 - val_accuracy: 0.8680\n", + "Epoch 6/25\n", + "430/430 [==============================] - 1s 2ms/step - loss: 0.3456 - accuracy: 0.8774 - val_loss: 0.3744 - val_accuracy: 0.8706\n", + "Epoch 7/25\n", + "430/430 [==============================] - 1s 3ms/step - loss: 0.3329 - accuracy: 0.8809 - val_loss: 0.3634 - val_accuracy: 0.8706\n", + "Epoch 8/25\n", + "430/430 [==============================] - 1s 3ms/step - loss: 0.3184 - accuracy: 0.8858 - val_loss: 0.3949 - val_accuracy: 0.8612\n", + "Epoch 9/25\n", + "430/430 [==============================] - 1s 3ms/step - loss: 0.3065 - accuracy: 0.8891 - val_loss: 0.3487 - val_accuracy: 0.8772\n", + "Epoch 10/25\n", + "430/430 [==============================] - 1s 2ms/step - loss: 0.2944 - accuracy: 0.8922 - val_loss: 0.3398 - val_accuracy: 0.8808\n", + "Epoch 11/25\n", + "430/430 [==============================] - 1s 3ms/step - loss: 0.2839 - accuracy: 0.8960 - val_loss: 0.3456 - val_accuracy: 0.8820\n", + "Epoch 12/25\n", + "430/430 [==============================] - 1s 3ms/step - loss: 0.2707 - accuracy: 0.9026 - val_loss: 0.3652 - val_accuracy: 0.8694\n", + "Epoch 13/25\n", + "430/430 [==============================] - 1s 2ms/step - loss: 0.2537 - accuracy: 0.9081 - val_loss: 0.3364 - val_accuracy: 0.8830\n", + "Epoch 14/25\n", + "430/430 [==============================] - 1s 2ms/step - loss: 0.2403 - accuracy: 0.9137 - val_loss: 0.3464 - val_accuracy: 0.8808\n", + "Epoch 15/25\n", + "430/430 [==============================] - 1s 3ms/step - loss: 0.2279 - accuracy: 0.9181 - val_loss: 0.3261 - val_accuracy: 0.8848\n", + "Epoch 16/25\n", + "430/430 [==============================] - 1s 3ms/step - loss: 0.2160 - accuracy: 0.9232 - val_loss: 0.3297 - val_accuracy: 0.8844\n", + "Epoch 17/25\n", + "430/430 [==============================] - 1s 3ms/step - loss: 0.2062 - accuracy: 0.9269 - val_loss: 0.3357 - val_accuracy: 0.8862\n", + "Epoch 18/25\n", + "430/430 [==============================] - 1s 2ms/step - loss: 0.1979 - accuracy: 0.9306 - val_loss: 0.3251 - val_accuracy: 0.8894\n", + "Epoch 19/25\n", + "430/430 [==============================] - 1s 3ms/step - loss: 0.1893 - accuracy: 0.9340 - val_loss: 0.3234 - val_accuracy: 0.8908\n", + "Epoch 20/25\n", + "430/430 [==============================] - 1s 3ms/step - loss: 0.1821 - accuracy: 0.9365 - val_loss: 0.3227 - val_accuracy: 0.8932\n", + "Epoch 21/25\n", + "430/430 [==============================] - 1s 3ms/step - loss: 0.1753 - accuracy: 0.9403 - val_loss: 0.3223 - val_accuracy: 0.8918\n", + "Epoch 22/25\n", + "430/430 [==============================] - 1s 3ms/step - loss: 0.1701 - accuracy: 0.9417 - val_loss: 0.3187 - val_accuracy: 0.8946\n", + "Epoch 23/25\n", + "430/430 [==============================] - 1s 3ms/step - loss: 0.1656 - accuracy: 0.9438 - val_loss: 0.3191 - val_accuracy: 0.8940\n", + "Epoch 24/25\n", + "430/430 [==============================] - 1s 3ms/step - loss: 0.1628 - accuracy: 0.9457 - val_loss: 0.3181 - val_accuracy: 0.8934\n", + "Epoch 25/25\n", + "430/430 [==============================] - 1s 3ms/step - loss: 0.1611 - accuracy: 0.9461 - val_loss: 0.3174 - val_accuracy: 0.8942\n" + ], + "name": "stdout" + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "i8jPCyOvLOpc" + }, + "source": [ + "# 규제를 사용해 과대적합 피하기" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "bNDKKZZxLOpc" + }, + "source": [ + "## $\\ell_1$과 $\\ell_2$ 규제" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "58lwkbU-LOpc" + }, + "source": [ + "layer = keras.layers.Dense(100, activation=\"elu\",\n", + " kernel_initializer=\"he_normal\",\n", + " kernel_regularizer=keras.regularizers.l2(0.01))\n", + "# or l1(0.1) for ℓ1 regularization with a factor or 0.1\n", + "# or l1_l2(0.1, 0.01) for both ℓ1 and ℓ2 regularization, with factors 0.1 and 0.01 respectively" + ], + "execution_count": 101, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "vcZsRVXwLOpd", + "outputId": "acd092e5-9485-48bc-824d-dac90b171290", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "model = keras.models.Sequential([\n", + " keras.layers.Flatten(input_shape=[28, 28]),\n", + " keras.layers.Dense(300, activation=\"elu\",\n", + " kernel_initializer=\"he_normal\",\n", + " kernel_regularizer=keras.regularizers.l2(0.01)),\n", + " keras.layers.Dense(100, activation=\"elu\",\n", + " kernel_initializer=\"he_normal\",\n", + " kernel_regularizer=keras.regularizers.l2(0.01)),\n", + " keras.layers.Dense(10, activation=\"softmax\",\n", + " kernel_regularizer=keras.regularizers.l2(0.01))\n", + "])\n", + "model.compile(loss=\"sparse_categorical_crossentropy\", optimizer=\"nadam\", metrics=[\"accuracy\"])\n", + "n_epochs = 2\n", + "history = model.fit(X_train_scaled, y_train, epochs=n_epochs,\n", + " validation_data=(X_valid_scaled, y_valid))" + ], + "execution_count": 102, + "outputs": [ + { + "output_type": "stream", + "text": [ + "Epoch 1/2\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 3.2189 - accuracy: 0.7967 - val_loss: 0.7169 - val_accuracy: 0.8340\n", + "Epoch 2/2\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.7280 - accuracy: 0.8247 - val_loss: 0.6850 - val_accuracy: 0.8376\n" + ], + "name": "stdout" + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "XuNxc8x3LOpd", + "outputId": "baae0e04-7717-402f-eb20-9c6bc906d8a7", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "from functools import partial\n", + "\n", + "RegularizedDense = partial(keras.layers.Dense,\n", + " activation=\"elu\",\n", + " kernel_initializer=\"he_normal\",\n", + " kernel_regularizer=keras.regularizers.l2(0.01))\n", + "\n", + "model = keras.models.Sequential([\n", + " keras.layers.Flatten(input_shape=[28, 28]),\n", + " RegularizedDense(300),\n", + " RegularizedDense(100),\n", + " RegularizedDense(10, activation=\"softmax\")\n", + "])\n", + "model.compile(loss=\"sparse_categorical_crossentropy\", optimizer=\"nadam\", metrics=[\"accuracy\"])\n", + "n_epochs = 2\n", + "history = model.fit(X_train_scaled, y_train, epochs=n_epochs,\n", + " validation_data=(X_valid_scaled, y_valid))" + ], + "execution_count": 103, + "outputs": [ + { + "output_type": "stream", + "text": [ + "Epoch 1/2\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 3.2911 - accuracy: 0.7924 - val_loss: 0.7218 - val_accuracy: 0.8310\n", + "Epoch 2/2\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.7282 - accuracy: 0.8245 - val_loss: 0.6826 - val_accuracy: 0.8382\n" + ], + "name": "stdout" + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "xdTO1zZbLOpd" + }, + "source": [ + "## 드롭아웃" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "ppZX7nrcLOpd", + "outputId": "78c2ea5f-c378-48ab-d877-9bad958ec21b", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "model = keras.models.Sequential([\n", + " keras.layers.Flatten(input_shape=[28, 28]),\n", + " keras.layers.Dropout(rate=0.2),\n", + " keras.layers.Dense(300, activation=\"elu\", kernel_initializer=\"he_normal\"),\n", + " keras.layers.Dropout(rate=0.2),\n", + " keras.layers.Dense(100, activation=\"elu\", kernel_initializer=\"he_normal\"),\n", + " keras.layers.Dropout(rate=0.2),\n", + " keras.layers.Dense(10, activation=\"softmax\")\n", + "])\n", + "model.compile(loss=\"sparse_categorical_crossentropy\", optimizer=\"nadam\", metrics=[\"accuracy\"])\n", + "n_epochs = 2\n", + "history = model.fit(X_train_scaled, y_train, epochs=n_epochs,\n", + " validation_data=(X_valid_scaled, y_valid))" + ], + "execution_count": 104, + "outputs": [ + { + "output_type": "stream", + "text": [ + "Epoch 1/2\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.7611 - accuracy: 0.7576 - val_loss: 0.3730 - val_accuracy: 0.8644\n", + "Epoch 2/2\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.4306 - accuracy: 0.8403 - val_loss: 0.3408 - val_accuracy: 0.8726\n" + ], + "name": "stdout" + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "FT_W0H3rLOpd" + }, + "source": [ + "## 알파 드롭아웃" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "BPvHOOYcLOpd" + }, + "source": [ + "tf.random.set_seed(42)\n", + "np.random.seed(42)" + ], + "execution_count": 105, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "CB_Oe24YLOpe", + "outputId": "15e5a530-ca81-4bca-ac0a-cc2184ea6bd3", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "model = keras.models.Sequential([\n", + " keras.layers.Flatten(input_shape=[28, 28]),\n", + " keras.layers.AlphaDropout(rate=0.2),\n", + " keras.layers.Dense(300, activation=\"selu\", kernel_initializer=\"lecun_normal\"),\n", + " keras.layers.AlphaDropout(rate=0.2),\n", + " keras.layers.Dense(100, activation=\"selu\", kernel_initializer=\"lecun_normal\"),\n", + " keras.layers.AlphaDropout(rate=0.2),\n", + " keras.layers.Dense(10, activation=\"softmax\")\n", + "])\n", + "optimizer = keras.optimizers.SGD(lr=0.01, momentum=0.9, nesterov=True)\n", + "model.compile(loss=\"sparse_categorical_crossentropy\", optimizer=optimizer, metrics=[\"accuracy\"])\n", + "n_epochs = 20\n", + "history = model.fit(X_train_scaled, y_train, epochs=n_epochs,\n", + " validation_data=(X_valid_scaled, y_valid))" + ], + "execution_count": 106, + "outputs": [ + { + "output_type": "stream", + "text": [ + "Epoch 1/20\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.8023 - accuracy: 0.7146 - val_loss: 0.5778 - val_accuracy: 0.8446\n", + "Epoch 2/20\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.5662 - accuracy: 0.7904 - val_loss: 0.5146 - val_accuracy: 0.8536\n", + "Epoch 3/20\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.5259 - accuracy: 0.8057 - val_loss: 0.4904 - val_accuracy: 0.8598\n", + "Epoch 4/20\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.5127 - accuracy: 0.8093 - val_loss: 0.4837 - val_accuracy: 0.8596\n", + "Epoch 5/20\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.5074 - accuracy: 0.8123 - val_loss: 0.4244 - val_accuracy: 0.8692\n", + "Epoch 6/20\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.4787 - accuracy: 0.8205 - val_loss: 0.4594 - val_accuracy: 0.8640\n", + "Epoch 7/20\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.4721 - accuracy: 0.8267 - val_loss: 0.4696 - val_accuracy: 0.8608\n", + "Epoch 8/20\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.4575 - accuracy: 0.8306 - val_loss: 0.4156 - val_accuracy: 0.8708\n", + "Epoch 9/20\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.4626 - accuracy: 0.8275 - val_loss: 0.4342 - val_accuracy: 0.8734\n", + "Epoch 10/20\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.4550 - accuracy: 0.8323 - val_loss: 0.4300 - val_accuracy: 0.8656\n", + "Epoch 11/20\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.4453 - accuracy: 0.8340 - val_loss: 0.4266 - val_accuracy: 0.8746\n", + "Epoch 12/20\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.4420 - accuracy: 0.8349 - val_loss: 0.5200 - val_accuracy: 0.8574\n", + "Epoch 13/20\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.4344 - accuracy: 0.8393 - val_loss: 0.4301 - val_accuracy: 0.8740\n", + "Epoch 14/20\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.4307 - accuracy: 0.8389 - val_loss: 0.4462 - val_accuracy: 0.8656\n", + "Epoch 15/20\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.4313 - accuracy: 0.8374 - val_loss: 0.4415 - val_accuracy: 0.8658\n", + "Epoch 16/20\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.4270 - accuracy: 0.8391 - val_loss: 0.4181 - val_accuracy: 0.8776\n", + "Epoch 17/20\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.4207 - accuracy: 0.8426 - val_loss: 0.5417 - val_accuracy: 0.8564\n", + "Epoch 18/20\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.4362 - accuracy: 0.8378 - val_loss: 0.4669 - val_accuracy: 0.8718\n", + "Epoch 19/20\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.4271 - accuracy: 0.8418 - val_loss: 0.4745 - val_accuracy: 0.8700\n", + "Epoch 20/20\n", + "1719/1719 [==============================] - 4s 2ms/step - loss: 0.4188 - accuracy: 0.8415 - val_loss: 0.4486 - val_accuracy: 0.8714\n" + ], + "name": "stdout" + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "fisM8Wc8LOpe", + "outputId": "8783b0b2-0a9c-427d-a745-517443a53217", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "model.evaluate(X_test_scaled, y_test)" + ], + "execution_count": 107, + "outputs": [ + { + "output_type": "stream", + "text": [ + "313/313 [==============================] - 0s 2ms/step - loss: 0.4861 - accuracy: 0.8584\n" + ], + "name": "stdout" + }, + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "[0.48614442348480225, 0.8583999872207642]" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 107 + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "C3UO369ULOpe", + "outputId": "bb158abb-93c6-4eef-acee-b55d70e8419e", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "model.evaluate(X_train_scaled, y_train)" + ], + "execution_count": 108, + "outputs": [ + { + "output_type": "stream", + "text": [ + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.3614 - accuracy: 0.8815\n" + ], + "name": "stdout" + }, + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "[0.3614204227924347, 0.8815454840660095]" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 108 + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "TLppurUFLOpe", + "outputId": "4cf53ffb-1221-410a-9652-833b0a85e6c6", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "history = model.fit(X_train_scaled, y_train)" + ], + "execution_count": 109, + "outputs": [ + { + "output_type": "stream", + "text": [ + "1719/1719 [==============================] - 3s 2ms/step - loss: 0.4217 - accuracy: 0.8434\n" + ], + "name": "stdout" + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "TP8X2xCnLOpe" + }, + "source": [ + "## MC 드롭아웃" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "Uy_uwuIRLOpe" + }, + "source": [ + "tf.random.set_seed(42)\n", + "np.random.seed(42)" + ], + "execution_count": 110, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "scrolled": true, + "id": "GPDfhAMBLOpf" + }, + "source": [ + "y_probas = np.stack([model(X_test_scaled, training=True)\n", + " for sample in range(100)])\n", + "y_proba = y_probas.mean(axis=0)\n", + "y_std = y_probas.std(axis=0)" + ], + "execution_count": 111, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "nzrxJDyrLOpf", + "outputId": "3b272a1c-75a1-4d81-cfbb-e53079e2bc12", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "np.round(model.predict(X_test_scaled[:1]), 2)" + ], + "execution_count": 112, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "array([[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0.02, 0. , 0.98]],\n", + " dtype=float32)" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 112 + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "08HJBSaVLOpf", + "outputId": "12a1a91f-04da-42bd-8b09-8c7713f29918", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "np.round(y_probas[:, :1], 2)" + ], + "execution_count": 113, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "array([[[0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.73, 0. , 0.26]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.05, 0. , 0.92, 0. , 0.04]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.03, 0. , 0. , 0. , 0.97]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.1 , 0. , 0.89]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0.53, 0. , 0.46]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0.71, 0. , 0.29]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.09, 0. , 0.47, 0. , 0.44]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.18, 0. , 0.26, 0. , 0.56]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.55, 0. , 0.07, 0. , 0.37]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.99]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.02, 0. , 0.14, 0. , 0.84]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.21, 0. , 0.22, 0. , 0.57]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.3 , 0. , 0.68]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.29, 0. , 0.28, 0. , 0.44]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.04, 0. , 0.14, 0. , 0.82]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.21, 0. , 0.12, 0. , 0.68]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0. , 0. , 0.99]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.02, 0. , 0.77, 0. , 0.21]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.34, 0. , 0.65]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.02, 0. , 0.02, 0. , 0.96]],\n", + "\n", + " [[0.01, 0. , 0. , 0. , 0. , 0.86, 0.02, 0.01, 0. , 0.1 ]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.12, 0. , 0.07, 0. , 0.81]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 1. ]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0.11, 0. , 0.88]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.08, 0. , 0.06, 0. , 0.86]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.04, 0. , 0.72, 0. , 0.23]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.03, 0. , 0.2 , 0. , 0.78]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.19, 0. , 0.31, 0. , 0.5 ]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.03, 0. , 0.05, 0. , 0.92]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.2 , 0. , 0.64, 0. , 0.16]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0.99]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 1. ]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.68, 0. , 0.02, 0. , 0.3 ]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.15, 0. , 0.74, 0. , 0.11]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.02, 0. , 0.19, 0. , 0.79]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.09, 0. , 0.63, 0. , 0.29]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0.04, 0. , 0.95]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.02, 0. , 0.09, 0. , 0.89]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.07, 0. , 0.38, 0. , 0.56]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.78, 0. , 0.02, 0. , 0.2 ]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.16, 0. , 0.82]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.99]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.33, 0. , 0.37, 0. , 0.3 ]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.99]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.01, 0. , 0.98]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.99]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.17, 0. , 0.12, 0. , 0.71]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0.03, 0. , 0.96]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0.29, 0. , 0.71]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.2 , 0. , 0.79]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.27, 0. , 0.29, 0. , 0.45]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.89, 0. , 0.1 ]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.99]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.2 , 0. , 0.04, 0. , 0.76]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.13, 0. , 0.02, 0. , 0.85]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.1 , 0. , 0.89]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0.16, 0. , 0.84]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.04, 0. , 0.16, 0. , 0.8 ]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.07, 0. , 0.25, 0. , 0.68]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.14, 0. , 0.2 , 0. , 0.66]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.22, 0. , 0.03, 0. , 0.75]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0.13, 0. , 0.87]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.04, 0. , 0.05, 0. , 0.91]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.04, 0. , 0.35, 0. , 0.61]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.49, 0. , 0.46, 0. , 0.05]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.51, 0. , 0.45, 0. , 0.04]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.1 , 0. , 0.47, 0. , 0.43]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0.05, 0. , 0.95]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.05, 0. , 0.37, 0. , 0.57]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.15, 0. , 0.61, 0.02, 0.22]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.99]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.08, 0. , 0.28, 0. , 0.64]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.02, 0. , 0.1 , 0. , 0.88]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.02, 0. , 0.37, 0. , 0.61]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.1 , 0. , 0.52, 0. , 0.37]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.12, 0. , 0.03, 0. , 0.85]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.05, 0. , 0.15, 0. , 0.8 ]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.38, 0. , 0.61]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.39, 0. , 0.6 ]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.02, 0. , 0.24, 0. , 0.74]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0.06, 0. , 0.94]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.01, 0. , 0.98]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 1. ]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.02, 0. , 0.97]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.04, 0. , 0.09, 0. , 0.87]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.03, 0. , 0.55, 0. , 0.41]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.92, 0. , 0.04, 0. , 0.04]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.4 , 0. , 0.02, 0. , 0.58]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0.02, 0. , 0.98]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0.03, 0. , 0.97]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.02, 0. , 0.04, 0. , 0.93]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.03, 0. , 0.12, 0. , 0.84]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.28, 0. , 0.38, 0. , 0.35]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.39, 0. , 0.17, 0. , 0.44]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.02, 0. , 0.16, 0. , 0.82]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.01, 0. , 0.98]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.02, 0. , 0.35, 0. , 0.64]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.01, 0. , 0.04, 0. , 0.96]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.2 , 0. , 0.33, 0. , 0.47]],\n", + "\n", + " [[0. , 0. , 0. , 0. , 0. , 0.11, 0. , 0.11, 0. , 0.78]]],\n", + " dtype=float32)" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 113 + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "XMqmf4UmLOpf", + "outputId": "69d29b09-945c-441e-c2f7-9c3b8e3c564c", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "np.round(y_proba[:1], 2)" + ], + "execution_count": 114, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "array([[0. , 0. , 0. , 0. , 0. , 0.11, 0. , 0.22, 0. , 0.67]],\n", + " dtype=float32)" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 114 + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "lISHnMdnLOpf", + "outputId": "9d1137d4-bbd6-4f9e-a527-66cf9daef495", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "y_std = y_probas.std(axis=0)\n", + "np.round(y_std[:1], 2)" + ], + "execution_count": 115, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "array([[0. , 0. , 0. , 0. , 0. , 0.19, 0. , 0.23, 0. , 0.29]],\n", + " dtype=float32)" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 115 + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "iW-062pHLOpf" + }, + "source": [ + "y_pred = np.argmax(y_proba, axis=1)" + ], + "execution_count": 116, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "DL6bPgKCLOpg", + "outputId": "cf362713-825c-4238-c802-cac884209a40", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "accuracy = np.sum(y_pred == y_test) / len(y_test)\n", + "accuracy" + ], + "execution_count": 117, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "0.8656" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 117 + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "yxvL3LWZLOpg" + }, + "source": [ + "class MCDropout(keras.layers.Dropout):\n", + " def call(self, inputs):\n", + " return super().call(inputs, training=True)\n", + "\n", + "class MCAlphaDropout(keras.layers.AlphaDropout):\n", + " def call(self, inputs):\n", + " return super().call(inputs, training=True)" + ], + "execution_count": 118, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "Zzd5DCm7LOpg" + }, + "source": [ + "tf.random.set_seed(42)\n", + "np.random.seed(42)" + ], + "execution_count": 119, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "WvapJbsLLOpg" + }, + "source": [ + "mc_model = keras.models.Sequential([\n", + " MCAlphaDropout(layer.rate) if isinstance(layer, keras.layers.AlphaDropout) else layer\n", + " for layer in model.layers\n", + "])" + ], + "execution_count": 120, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "tkkDpmTaLOpg", + "outputId": "7378308e-f78f-446b-83fe-bb6e9a998a62", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "mc_model.summary()" + ], + "execution_count": 121, + "outputs": [ + { + "output_type": "stream", + "text": [ + "Model: \"sequential_20\"\n", + "_________________________________________________________________\n", + "Layer (type) Output Shape Param # \n", + "=================================================================\n", + "flatten_18 (Flatten) (None, 784) 0 \n", + "_________________________________________________________________\n", + "mc_alpha_dropout (MCAlphaDro (None, 784) 0 \n", + "_________________________________________________________________\n", + "dense_262 (Dense) (None, 300) 235500 \n", + "_________________________________________________________________\n", + "mc_alpha_dropout_1 (MCAlphaD (None, 300) 0 \n", + "_________________________________________________________________\n", + "dense_263 (Dense) (None, 100) 30100 \n", + "_________________________________________________________________\n", + "mc_alpha_dropout_2 (MCAlphaD (None, 100) 0 \n", + "_________________________________________________________________\n", + "dense_264 (Dense) (None, 10) 1010 \n", + "=================================================================\n", + "Total params: 266,610\n", + "Trainable params: 266,610\n", + "Non-trainable params: 0\n", + "_________________________________________________________________\n" + ], + "name": "stdout" + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "dXbWp13vLOpg" + }, + "source": [ + "optimizer = keras.optimizers.SGD(lr=0.01, momentum=0.9, nesterov=True)\n", + "mc_model.compile(loss=\"sparse_categorical_crossentropy\", optimizer=optimizer, metrics=[\"accuracy\"])" + ], + "execution_count": 122, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "9ywhSDViLOpg" + }, + "source": [ + "mc_model.set_weights(model.get_weights())" + ], + "execution_count": 123, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "JZd8UdsALOph" + }, + "source": [ + "이제 MC 드롭아웃을 모델에 사용할 수 있습니다:" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "IVSdXF7TLOph", + "outputId": "a580e136-de40-46e7-e200-c730000cff26", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "np.round(np.mean([mc_model.predict(X_test_scaled[:1]) for sample in range(100)], axis=0), 2)" + ], + "execution_count": 124, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "array([[0. , 0. , 0. , 0. , 0. , 0.14, 0. , 0.25, 0. , 0.61]],\n", + " dtype=float32)" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 124 + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "MafcuHfYLOph" + }, + "source": [ + "## 맥스 노름" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "Rm22pePYLOph" + }, + "source": [ + "layer = keras.layers.Dense(100, activation=\"selu\", kernel_initializer=\"lecun_normal\",\n", + " kernel_constraint=keras.constraints.max_norm(1.))" + ], + "execution_count": 125, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "gWqSW1bvLOpi", + "outputId": "d2224c69-2eb1-4a62-e14d-34dfb1360660", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "MaxNormDense = partial(keras.layers.Dense,\n", + " activation=\"selu\", kernel_initializer=\"lecun_normal\",\n", + " kernel_constraint=keras.constraints.max_norm(1.))\n", + "\n", + "model = keras.models.Sequential([\n", + " keras.layers.Flatten(input_shape=[28, 28]),\n", + " MaxNormDense(300),\n", + " MaxNormDense(100),\n", + " keras.layers.Dense(10, activation=\"softmax\")\n", + "])\n", + "model.compile(loss=\"sparse_categorical_crossentropy\", optimizer=\"nadam\", metrics=[\"accuracy\"])\n", + "n_epochs = 2\n", + "history = model.fit(X_train_scaled, y_train, epochs=n_epochs,\n", + " validation_data=(X_valid_scaled, y_valid))" + ], + "execution_count": 126, + "outputs": [ + { + "output_type": "stream", + "text": [ + "Epoch 1/2\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.5766 - accuracy: 0.8018 - val_loss: 0.3723 - val_accuracy: 0.8638\n", + "Epoch 2/2\n", + "1719/1719 [==============================] - 5s 3ms/step - loss: 0.3530 - accuracy: 0.8692 - val_loss: 0.3769 - val_accuracy: 0.8684\n" + ], + "name": "stdout" + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "A53qrK-PLOpi" + }, + "source": [ + "# 연습문제 해답" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "IOsQc6lpLOpi" + }, + "source": [ + "## 1. to 7." + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "ebf2enC_LOpi" + }, + "source": [ + "부록 A 참조." + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "h1PVxctOLOpi" + }, + "source": [ + "## 8. CIFAR10에서 딥러닝" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "qGwtSO0fLOpi" + }, + "source": [ + "### a.\n", + "*문제: 100개의 뉴런을 가진 은닉층 20개로 심층 신경망을 만들어보세요(너무 많은 것 같지만 이 연습문제의 핵심입니다). He 초기화와 ELU 활성화 함수를 사용하세요.*" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "p1Mix75VLOpj" + }, + "source": [ + "keras.backend.clear_session()\n", + "tf.random.set_seed(42)\n", + "np.random.seed(42)\n", + "\n", + "model = keras.models.Sequential()\n", + "model.add(keras.layers.Flatten(input_shape=[32, 32, 3]))\n", + "for _ in range(20):\n", + " model.add(keras.layers.Dense(100,\n", + " activation=\"elu\",\n", + " kernel_initializer=\"he_normal\"))" + ], + "execution_count": 127, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "2glrTwRcLOpj" + }, + "source": [ + "### b.\n", + "*문제: Nadam 옵티마이저와 조기 종료를 사용하여 CIFAR10 데이터셋에 이 네트워크를 훈련하세요. `keras.datasets.cifar10.load_ data()`를 사용하여 데이터를 적재할 수 있습니다. 이 데이터셋은 10개의 클래스와 32×32 크기의 컬러 이미지 60,000개로 구성됩니다(50,000개는 훈련, 10,000개는 테스트). 따라서 10개의 뉴런과 소프트맥스 활성화 함수를 사용하는 출력층이 필요합니다. 모델 구조와 하이퍼파라미터를 바꿀 때마다 적절한 학습률을 찾아야 한다는 것을 기억하세요.*" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "8fkKGlD0LOpj" + }, + "source": [ + "모델에 출력층을 추가합니다:" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "pvTdbgiCLOpj" + }, + "source": [ + "model.add(keras.layers.Dense(10, activation=\"softmax\"))" + ], + "execution_count": 128, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "ux0ROP0tLOpk" + }, + "source": [ + "학습률 5e-5인 Nadam 옵티마이저를 사용해 보죠. 학습률 1e-5, 3e-5, 1e-4, 3e-4, 1e-3, 3e-3, 1e-2를 테스트하고 10번의 에포크 동안 (아래 텐서보드 콜백으로) 학습 곡선을 비교해 보았습니다. 학습률 3e-5와 1e-4가 꽤 좋았기 때문에 5e-5를 시도해 보았고 조금 더 나은 결과를 냈습니다." + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "1oReiGeCLOpk" + }, + "source": [ + "optimizer = keras.optimizers.Nadam(lr=5e-5)\n", + "model.compile(loss=\"sparse_categorical_crossentropy\",\n", + " optimizer=optimizer,\n", + " metrics=[\"accuracy\"])" + ], + "execution_count": 129, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "24PcKfxeLOpk" + }, + "source": [ + "CIFAR10 데이터셋을 로드하죠. 조기 종료를 사용하기 때문에 검증 세트가 필요합니다. 원본 훈련 세트에서 처음 5,000개를 검증 세트로 사용하겠습니다:" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "cLWnS6RKLOpk", + "outputId": "8b69d659-ad10-4a5d-a6be-6484e343b258", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "(X_train_full, y_train_full), (X_test, y_test) = keras.datasets.cifar10.load_data()\n", + "\n", + "X_train = X_train_full[5000:]\n", + "y_train = y_train_full[5000:]\n", + "X_valid = X_train_full[:5000]\n", + "y_valid = y_train_full[:5000]" + ], + "execution_count": 130, + "outputs": [ + { + "output_type": "stream", + "text": [ + "Downloading data from https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz\n", + "170500096/170498071 [==============================] - 3s 0us/step\n" + ], + "name": "stdout" + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "H76ZTjNxLOpk" + }, + "source": [ + "이제 콜백을 만들고 모델을 훈련합니다:" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "FuQ8FelNLOpk" + }, + "source": [ + "early_stopping_cb = keras.callbacks.EarlyStopping(patience=20)\n", + "model_checkpoint_cb = keras.callbacks.ModelCheckpoint(\"my_cifar10_model.h5\", save_best_only=True)\n", + "run_index = 1 # 모델을 훈련할 때마다 증가시킴\n", + "run_logdir = os.path.join(os.curdir, \"my_cifar10_logs\", \"run_{:03d}\".format(run_index))\n", + "tensorboard_cb = keras.callbacks.TensorBoard(run_logdir)\n", + "callbacks = [early_stopping_cb, model_checkpoint_cb, tensorboard_cb]" + ], + "execution_count": 131, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "7VuUEbNacg7v" + }, + "source": [ + "코랩에서 아래 셀에 있는 `%tensorboard` 명령을 실행하면 다음과 같은 텐서보드 화면을 볼 수 있습니다." + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "x_NtuiwVcQiV" + }, + "source": [ + "![스크린샷 2021-02-17 오후 11.42.41.png](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAACQwAAAb+CAYAAAAWsu9KAAAK12lDQ1BJQ0MgUHJvZmlsZQAASImVlwdUU1kax+976SGhBSIgJdTQpRNASuihCNJBVEISSCgxJAQVsS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iAw7gpDBIYScDXYJAIIIIAAAgikhACBoZS4zJwkAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIIJC0AgSGkvbScGAIIIAAAgggMF0FCAxN1yvLeSGAAAIIIIAAAggggAACCCCAAAIIIIAAAggggAACU0OAwNDUuE4cJQIIIIAAAghMIwECQ9PoYnIqCCCAAAIIIIAAAggggMD/s3ceYFJUWRs+rgi6gCL6g4IiKC5pF0HBgAFzTgRzds1iRDEgYsCIgXXNIoI550UUE2IkGBABA6ASFFcFRUGMP+/dPb13iuqe7pkemPCd55mp7gq3br1Vfavqnu+eIwIiIAIiIAIiIAIiIAIiIAIiUAUJSDBUBU+aqiwCIiACIiACIlC1CUgwVLXPn2ovAiIgAiIgAiIgAiIgAiIgAiIgAiIgAiIgAiIgAiIgAiIgAlWdgARDVf0Mqv4iIAIiIAIiIAJVjoAEQ1XulKnCIiACIiACIiACIiACIiACIiACIiACIiACIiACIiACIiACIlCtCEgwVK1Opw5GBERABERABESgKhCQYKgqnCXVUQREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQASqLwEJhqrvudWRiYAIiIAIiIAIVFICEgxV0hOjaomACIiACIiACIiACIiACIiACIiACIiACIiACIiACIiACIhADSEgwVANOdE6TBEQAREQAREQgcpDQIKhynMuVBMREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAERqIkEJBiqiWddxywCIiACIiACIrBMCUgwtEzxa+ciIAIiIAIiIAIiIAIiIAIiIAIiIAIiIAIiIAIiIAIiIAIiUOMJSDBU4y8BARABERABERABEVjaBCQYWtrEtT8REAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREIGYgARDMQ19FgEREAEREAEREIGlQECCoaUAWbsQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQARGoNgR+/PFHGz16tG222Wa2yiqrZI7rhx9+sFdffdW23357q1WrVmZ+rg+LFi2yd99912bPnm0dOnSwFi1a5Fq92i6TYKjanlodmAiIgAiIgAiIQGUlIMFQZT0zqpcIiIAIiIAIiIAIiIAIiIAIiIAIiIAIiIAIiIAIiIAIiEBlJPD555/b3//+d9t6662tb9++mSpOnz7djjnmGHviiScsH//LrFmz7KSTTrL111/fGjdubG+//ba1adPGzj33XFtuueUy5daEDxIM1YSzrGMUAREQAREQARGoVATyeWCtVBVWZURABERABERABERABERABERABERABERABERABERABERABERgGRJwwdDyyy9v559/vnXp0iXUJptg6LfffrPff//dVlhhhUytf/311yAu6tq1qx122GFhPpGLTjjhBNtjjz2sZ8+emXX5QCSi2rVrV1shkQRDJU63voiACIiACIiACIhAxROQYKjiGWsPIiACIiACIiACIiACIiACIiACIiACIiACIiACIiACIiAC1YeAC4YOOOAAe/bZZ+3222+3evXqWVIw9Msvv9jVV19tb731lvG5U6dO1rt3b6tfv75NnTrVjjvuOBs2bJg1adIkA+fGG2+0jz/+2K699lobNWqU3XfffbbaaquFtGUIlI499ljbbbfdMutXlw8SDFWXM6njEAEREAEREAERqDIEJBiqMqdKFRUBERABERABERABERABERABERABERABERABERABERABEagEBFww9OCDD9oFF1xgzZo1C0KgpGAIsdDs2bPDMqo9aNAgW2WVVUIas2eeecbuv//+IBiKD+mNN96wyy67LKQ1e/nll+2qq66yAQMGWLt27cI8BEaPPvpoiDYUb1fVP0swVNXPoOovAiIgAiIgAiJQ5QhIMFTlTpkqLAIiIAIiIAIiIAIiIAIiIAIiIAIiIAIiIAIiIAIiIAIisAwJuGDo4Ycftu+++86OP/54u+iii6xhw4YhzdgTTzxhK620ku29995BLLTVVluF2o4ZM8bOO+88e+qpp4Loh+9EEopt2rRpIYoQ6yAeuuuuu2zIkCGZVfbbbz/r06ePbbTRRpl51eGDBEPV4SzqGERABERABERABKoUAQmGqtTpUmVFQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQASWMYFYMETEINKGDR8+3M455xw75ZRTQiSg+fPn28EHHxyWrb766qHG33//vfXo0cOGDh0a0pddccUV9thjj1mtWrUyR0TkIURC9957r7300ktLCIb69u1rbdu2tYMOOiizTXX4IMFQdTiLOgYREAEREAEREIEqRUCCoSp1ulRZERABERABERABERABERABERABERABERABERABERABERCBZUwgKRj67bffrFevXla3bl177733gmBohRVWsN13390uvPBC23TTTUONiSjEdyIQzZ071w488EAjbVn79u0zR3TJJZfYokWLQsSiNMHQvvvua2eeeaZ17tw5s011+CDBUHU4izoGERABERABERCBKkVAgqEqdbpUWREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQgWVMICkYojqffPJJEA0hHkIQhP/l0ksvDSnLevfubcstt5xdc801QVREWjJs0KBB9tlnn9m5555rRCF66623bODAgTZgwABr06ZNiDDENvy1bNnSRowYYddff31IZ1anTp1QRnX5J8FQdTmTOg4REAEREAEREIEqQ0CCoSpzqlRRERABERABERABERABERABERABERABERABERABERABERCBSkAgTTBEtYYMGRJSkLlgiBRkV111lY0fP96IONShQwc7++yzbcUVVwxHgbjoxhtvtFdffdV+/PFHa9asWUg1tvnmm4flRBi6+eabrWnTpvbpp5/azz//bMcee6ztscceYXl1+ifBUHU6mzoWERABERABERCBKkFAgqEqcZpUSREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQgSpKgBRjRBiqXbt26hH88ccftnDhwhCVKF4hTkn2ww8/BKFRrVq14lWqzWcJhqrNqdSBiIAIiIAIiIAIVBUCEgxVlTOleoqACIiACIiACIiACIiACIiACIiACIiACIiACIiACIiACNQkArFgqLoftwRD1f0M6/hEQAREQAREQAQqHQEJhirdKVGFREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAERMAmTpxoL7/8svXq1ava05BgqNqfYh2gCIiACIiACIhAZSMgwVBlOyOqjwiIgAiIgAiIgAiIgAiIgAiIgAiIgAiIgAiIgAiIgAiIgAjULAISDNWs862jFQEREAEREAERqAQEJBiqBCdBVRABERABERABERABERABERABERABERABERABERABERABERCBGkxAgqEafPJ16CIgAiIgAiIgAsuGgARDy4a79lp1CYwdO9batWtnyd/Oxx9/bHXr1rUmTZoslYMbNWqUde3adYl9TZo0yf7v//4v/C2xsAJmzJk93ebMnmaNm6y7+K9F2MOEcS+EaftO24Vpch3/zkJfx7fxclgH8zLDF/0TAREQAREQAREQAREQAREQAREQAREQAREQAREQgSpA4Jtvvgm1/Oijj0rU1ufHM1dbbbXMV//M1D9nFlbzDxIMVfMTrMMTAREQAREQARGofASSoofKV0PVqKYQOOyww2z77be3Qw45pEyHfP/994d8zgMGDCjT9mz05ptv2plnnhlyQi+//PKp5fz1r3+1hx56yNq0aVNiOTmkERLVq1fPJkyYYAMHDswsnz59ejguck3XqlUrMz/bh3yO5U9/+pP9/vvvSxSx33772T777GM9e/ZcYpnPWLBggfXt29eee+45a9q0qR177LHWo0cPX5zXFEFPnd9m2uRJE8L6DVetbw0b1Ldv5823b+fOD/NatviPeOqT6bNLfPd1fBsWJtfh+9RPZ1v7jbbNiIpCIfonAiIgAiIgAiIgAiIgAiIgAiIgAiIgAiIgAiIgApWQAGIgFwilCYPKUuW//OUvYTOflqWMqrKNBENV5UypniIgAiIgAiIgAtWGgARD1eZUVukD+eyzz2zLLbe0xo0bGxF8ymKIYBYuXFiuURdHHnlkENHccssttttuu6VWozTBENu1b9/evvzyS1txxRVDGZdeeql98sknNmTIkNQykzPzOZbyCIYQFNWvX98uuOACe++996xPnz52ww032LbbbpusSup3xEIjnxpsO23TKXV5sWYiLKq7Wmtba72Ni1WkyhEBERABERABERABERABERABERABERABERABERCBohJAJORCobhgjxCUnMbr+OdYYMTn+Luvg2ioOguHJBjyM62pCIiACIiACIiACCwlAhIMLSXQ2k1OAhdeeGFI8fXoo4/arbfean/729/C+kTm6devn02ZMiWk37rsssusdu3adtNNN9k999xjq6yyivXu3TsIXYj6M3XqVDv77LODWOfoo4+2f//733bMMcfYXXfdZS+99JIxr0WLFvbII49Yo0aN7PLLL7cNNtgg7OuHH36wtm3b2vXXX2/Dhg0L67Dg119/Dft48cUXrVu3bqGs4cOHhwhDgwcPtmuuuca22GILmzVrlu2+++52/PHH23bbbWcnnniide/ePZSNgOif//xnOIabb77Z7rjjjnC8rLvvvvva+PHjQzmrr756EDwRvciPZfTo0XbeeefZTz/9ZLvuuqv1798/lIlgiLJuu+22ECWIurB9HGEIIdZpp50WeBx66KHh+L/66qvA4Ntvv82kVbv66qttzJgx9sADD4R1YPL0008HARf7Xn/99cM+/R+CoWnvDzePIOTzK2KKYOjPq5WM5lQR+1GZIiACIiACIiACIiACIiACIiACIiACIiACIiACIlAIgTShEOIgF/W4UKiQMuN1XYTkU19W2YVDLnYq9PglGPIzrKkIiIAIiIAIiIAILCUCEgwtJdDaTVYCf/zxh7Vs2dJeeeUVe+KJJ+zjjz+2a6+9NqxPmrKuXbuGdF4IcHbaaacg8Nljjz3snXfeCaM2mM+2iGc++OCDIPg566yzbP78+SEt2OOPP26nnHKKff3117bNNtuE6D9XXnllWP/dd98N4h12hojnrbfeCpF21l13XRs3bpz93//9n40YMcJIc/bggw/a3LlzbfPNN7fXX3/d1lprLWvdurU99dRTtt5664V0akQoOuGEE+zOO+8Mghu2oU4IiaZNm2YzZswIAqaHH3441K9z58724Ycfhn0hLkKIhFiHuvixIBKivjAiAtBVV11lXbp0seWWW84QWO2www7h+BBCIe6JBUMIlRBj7bjjjiFNGVwQRiFyeuGFFzLnBJZsx4snjGB+7rnnBpbPPvus8Ze0eTNG2y8Lv07OLvr3z+f8bBttuV/Ry1WBIiACIiACIiACIiACIiACIiACIiACIiACIiACIlBWArFYyEVChQpkCtl3vD+2y1c0NGnSpNDPTV93RRkCIeq32WabhV288cYbIUJSvnX0ekkw5CQ0FQEREAEREAEREIGlRECCoaUEWrvJSgDhCpF+Ro4cGV4iELl8+umntsIKK9gll1wSBDmIgvbcc88QUYioQZtsskmIzEN0ng033DCUTdQhF9kQoei+++4z0ocRSYcXExcMIaDZaqutbOLEiXbQQQeFlFwUQEo06oEgiKhFCIKIztOrV68QeQghEOYpydgXgiD+MNZr165diDD0448/hig+iISuuOIKIxoQ+8WoP9GOJkyYEKIDPf/886GOLCeKERYfC+nJXnvtNeMlC3ESkYJOOumkUObvv/8e1ieN2+mnn25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HQdPXVVw8DSkeMGGFjx44tcWjsn7+KOGYJhkqg1hcREAEREAEREAERqHgCaSKCit+r9iACFUuAkRFE/9lpp53s3XffDRF5EJrISifggqGtttqq9JUXrzFh3AthvfadtgtT/964ybpB6EP6sjmzp6Wu49v4Or4NKzMPQyyE8TJOKjgiOzEaRiYCIiACIiACIiACIiACIiACIiACIiACIiACIiACS5vA999/b08++aT98MMPIVI++4+FOxVVH0Q6RBZiipEOjEGfsc2YMcMeeuihEGXo0EMPDanG0gRDhxxyiHXr1i1E74+3J9I/acsaNGgQZjPo9cADD4xXCZ9Jh8YxKyXZEmg0QwREQAREQAREQASqFgEJhqrW+VJt8yfw9ddf27Rp04zczKQzk+VHgJC0jD4h9VtlM6Ukq2xnRPURAREQAREQAREQAREQAREQAREQAREQAREQgZpD4JlnnrHnn38+pPr66aefQjSf7t27ZwB41B2fZhaU8YOLg2KhEEWliYUGDBhgLVq0sIMOOiikJjvvvPNs9OjRliYYIho/f6Qmmz9/fkizNnLkSDvnnHOsadOm1rt3byNq/bhx4yzbwFLqRj28jsUQDynCUBkvFG0mAiIgAiIgAiIgAmUlIMFQWclpOxEQgWVFAOEQptRky+oMaL8iIAIiIAIiIAIiIAIiIAIiIAIiIAIiIAIiUPMIEFUIQc7nn39uRN9BLLT33nsbUYe+/PLLJYC4cMjFND5dYsXFM1x4wzIEQlg8j++kDjviiCNSI/uw7IADDrAVV1yRVe3CCy+0HXfcMVUwhNgJQdErr7xi8+bNC5+JSMRx9e3b1z788ENjnf79+1uPHj1Cedn+UUePOOTH6/X379m2Tc6XYChJRN9FQAREQAREQAREoIIJSDBUwYBVvAiIQFEJeGoyxEJKM1dUtCpMBERABERABERABERABERABERABERABERABEQgDwILFy4MgqE//elPmbUnT55sv//+u02fPj0zrxgfEBlRbuvWrYNQ6L333rPDDz+8RNH0k1577bVhHqKmevXqlVie7cuiRYtshRVWsPg4WJfjW2mllbJtlnM+AiIXOkkwlBOVFoqACIiACIiACIjAsicgwdCyPweqgQiIQGEEPvjgA0M4JMFQYdy0tgiIgAiIgAiIgAiIgAiIgAiIgAiIgAiIgAiIwNIh4FF2YgFNPnv2KEQutvHv+Wxb1ddRhKGqfgZVfxEQAREQAREQgSpHQIKhKnfKVGEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREIEqSMCj78RVr0mioPi4k58lGEoS0XcREAEREAEREAERqGACEgxVMGAVXyUIjB071tq1a2fJ38PHH39sdevWtSZNmiyV4xg1apR17dp1iX1NmjTJSMHFX2WxObOnW8MG9W3kU4Pt23nzrU3b9uGP+a+9/lqoZveeB4fpy88/EdbZevu9wjaTJ00w/tZo0sK6dNk8rPPow3eHqa/DNrX/vLr9baPtrPHi9dKMKENEG1KkoTQ6micCIiACIiACIiACIiACIiACIiACIiACIiACIiACVYeABENV51yppiIgAiIgAiIgAtWEQFIgUU0OS4dRCQgsWLAgiF/uvPNOa9OmTZlqdMopp9hOO+1ku+66a5m2Z6N//vOfhvDnuuuuy1rGX//6V3vooYeWqGevXr2CkIj805tvvrntt99+mTIefPBBe+WVV+z666/PzMv1IZ9jIVc0+aiTxn732Wcf69mzZ3JR5ju8+/bta88995w1bdrUjj32WOvRo0dmeSEf3n77bRs6dOgSxxyXcfctfa1zx1ZBABTPL+bnT6bPtrqrtbb2nbZLLfbll1/OpCZDTPXrr7/a888/b1tssUVqnu5//etfNn78eDv//PNTyyvrzDfffNPWWGMNa968eVmLWGK7L774wsaMGWNt27a19ddff4nloyqknAAAQABJREFUmiECIiACIiACIiACIiACIiACIiACIiACIiACIiAC1YmABEPV6WzqWERABERABERABKoEAQmGqsRpqpKVRCh07rnn2gEHHGADBw4s0zF89dVXtsoqq1idOnXKtP0ff/wRREALFy60d955xxo2bJhaTmmCofr16xvHgxjHbccdd7SDDz7YDj30UJ+Vc5rPsZRHMISgiHpecMEF9t5771mfPn3shhtusG233TZnvZIL+/XrF0Q13333nR100EF2wgknJFexCeNesJlTxwbB0BILizwDwdCfV8suOEM05BGG5s+fb927d7fBgwfbOuu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7LJJrbbbruVtagqud1vv/2Ws96EjEsLBZdzIy0UAREQgUpIQIKhSnhSVKWlToAc0kSmSf4ePv744xD+tUmTJkulTuSu7tq16xL7IrUWUXKWZaScJSr13xkTxr1gX30x3Vq3bW+N11zX5nwxzaZMmhCWdt1u7zCdPOm9Euv490ZrtrA2bTcI64x64fEw9XK+nTff5syeZu07bRfmF/rPU5UxRUzkkYfI1w3HrbfeutAiS6zP+xohdmUiIAIiIAIiIAIiIAIiIAIiIAIiIAIiIAIiIAIiIALlJ1CjBUM///yzvfHGG/bWW28ZeemSRu67Vq1a2aabbmprrbVWcrG+ZyEgwVAWMHnMrsmCIdJGXHXVVTkpkb+yQYMG4Y/IVe3bt7d11lkn5zZaKAIiIAKVkUBSIFEZ66g6VU0C5FNG/HLnnXdamzZtynQQp5xyiu2000626667lml7NuJ5EOHPddddl7UMROUISZL17NWrVxCaTJ482TbffHPbb7/9MmU8+OCD9sorr9j111+fmZfrQz7HgiD5999/X6IY9rvPPvtYz549l1jmM+Ddt29fe+6556xp06Z27LHHWo8ePXxx3tOZM2faoEGD7MUXX7SOHTvaueeea+utt94S248f/YA1a1zbPpk+OyxruGp9a9igviH0+Xbu/DCvZYv/CK18Hf/u6/g2rJxch+9zF5e11nqdCxYNJaMNcW5jy0cwhCAII/+2m8/z78mpC4h8+pe//CW5ir6LgAiIgAiIgAiIgAiIgAiIgAiIgAiIgAiIgAiIgAikEKixgqH333/fnnnmmVShUJITEU0222wz23777U0Rh5J0lvwuwdCSTPKdI8FQbsFQGsf111/fdthhB1tjjTXSFmueCIiACFRKAhIMVcrTUi0qhVAIsckBBxxgAwcOLNMxffXVV7bKKqsY4vmy2B9//BFEQAsXLrR33nkna3ra0gRD9evXD8InxDhuO+64ox188MF26KGH+qyc03yOpTyCIQRF1POCCy6w9957z/r06WM33HCDbbvttjnrlVx49NFHB5EUYimEQxMmTAjHHq83Z/Z0G/nUYNtpm07x7Ar5XHe11vbn1QoXnL388suhPkQSylcwhCDIBUKliYMK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aHiDAqFn1vn1TRfftqyeEND4cdL5McEhhJ5dOgbAggkpIDeyPz4449t2bJltm/fvlx9rF69ukuM6j+OcuXK5VrHg/QQIDCUHuNc2KsMD0gU9njsj4AX2Llzpwu/jB071lq2bOkXx3V75ZVX2oABA+zkk0+Oa7/gxvpZqP8v77333uDiXPfbtGljqlIT3s8xY8a4INHixYutZ8+edsYZZ4T2e+GFF+zdd9+1++67L7QsrzuxXEvZsmVD1QGDx9J5VT3n9NNPDy7OdV/eN9xwg02ZMsUOO+wwu/jii2348OG5tonnwY4dO5z7//3f/9lJJ5100K7PPHyDde3YPNfymtWruMebtmx3t9Eea2V+22j9shXfWOdeZ1i9nGCRmgJDCk35qci0TOOmZQoRxdOoLhSPFtsigAACCCCAAAIIIIAAAggggAACCCCQ3gITJ050ACUZFgqKf/jhhy40RGAoqPLTff1xnIYAAgiks4AqDm3evNm2b99ulStXttq1a9shhxySziRce46AnhOawk6tSpUqhZqSTtPbbdq0yR1L32rWrGl6Y5uW/AIEhpJ/DBP1ChQU+v3vf28jRoywf/zjHwXq5nfffWfVqlUr8M+vAwcOuBDQrl27XOlV/eyK1PILDOlnqK5HYRzfTjzxRDv77LNt1KhRflGet7FcS2ECQwoUqZ9/+tOf7LPPPrPrrrvO7r//fuvbt2+e/Yq2UgEnTYH60EMP2Zlnnplrs/mz33YVggb06ZJreXE8yKjVwv5frciBs4JWFyIsVBwjxTERQAABBBBAAAEEEEAAAQQQQAABBBBITQFV91FgR23w4MGlcpG+D7Vq1XJTk5VKJ4r5pFQYKmZgDo8AAggggAACCIQLEBgKF+FxUQn06dPHBYYuvPBC++qrr6x8+fLu0O+8844LEP3www921lln2a9//Wu3/MEHH7Rnn33WBYSuueYaF3S5/vrrrX///m7KKP1CdsUVV1j9+vVdNZl169bZP//5T9PxmzRp4qbq1DSct956q7Vv394dU1N83X777dauXTs3rdjll1/ulqsqn86hvgwbNsyefvppe+ONN1y46LHHHrM777zTjjvuOPv666/dL4CjR492VXuWLl1qOofCP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EECgNAcJCpaHOORFAAAEEEEAAAQQQQAABBBBAAAEEEEAAgcQUSMvAUPba923fR7clX1Ao/DmUExwq3/16K9uoZ/gaHiOAAAIIIIBAAgsQGErgwaFrCKSwAFORpfDgcmkIIIAAAggggAACCCCAAAIIIIAAAggggECcAmkXGDqwd4ftfW1E8oeF/EDnhIYOOWWclTkkwy/hFgEEEEAAAQQSXIDAUIIPEN1DIAUFqC6UgoPKJSGAAAIIIIAAAggggAACCCCAAAIIIIAAAoUQSLvA0P6lL9r+uQ8Ugizxdi3f4zor22RA4nWMHiGAAAIIIIBARAECQxFZWIgAAsUkQFiomGA5LAIIIIAAAggggAACCCCAAAIIIIAAAgggkMQC6RcYWviU7V8wNveQ1WiaNBV6VCHJNi/L1f9ybUdZuTajcy3jAQIIIIAAAggkrgCBocQdG3qGQCoKMBVZKo4q14QAAggggAACCCCAAAIIIIAAAggggAACCBROgMBQjl/5vndY2XodCidZQntnr59n+965JtfZCAzl4uABAggggAACCS9AYCjhh4gOIlBogfXr19vnn39uffv2jXisf/zjH9akSRM7/fTTI64v6MKJEyda7969rXLlyu4QVBcqqCT7IYAAAggggAACCCCAAAIIIIAAAggggAACqS1AYChnfAkMpfaTnKtDAAEEEEAg0QQIDCXaiNAfBIpe4L333rO7777bJkyYEPHgN910kx111FF2zjnnRFwf68I777zThg0b5sJH+/bts9/97nd2+eWX25FHHmnTp0+3adOm2ejRoy0zMzPWQ7IdAggggAACCCCAAAIIIIAAAggggAACCCCAQBoIEBjKGWQCQ2nwTOcSEUAAAQQQSCABAkMJNBh0BYFiEogWGNq1a5dVqlTJIgWGDhw4YHv27LFDDz00Yq9279590Lrhw4fb73//e+vcufNB+9x33302e/Zsu+uuu6xGjRoHrWcBAggggAACCCCAAAIIIIAAAggggAACCCCAQPoKEBjKGXsCQ6nxD0BvrqhVqFAhNS6oAFexd+9e27Ztm3sjKSMjw8qUKVOAo7ALAggggEBxCxAYKm5hjo9A6QuEB4YWLFhgf/vb32zLli3WuHFjUzioZ8+eoQpD48ePd9WIduzYYa1atXIhoOrVq9u//vUv2759u3377bf21VdfWdOmTW3MmDHuNe+1117rXvspgDR06FA7//zzbdCgQXbPPffYk08+aXPnzrX9+/dblSpV7OabbzZtP3bsWKtdu7YDuuiii+yUU06xwYMHlz4YPUAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBAoUQECQznckQJDe9/5TVwDUa7TZVa2etO49inIxtnr59m+d67JtWu5tqOsXJvRuZYl04MNGzZEnaohr+vIyspy0zhom9WrV9tLL73kNtebJU2aNMlr15Rat379evvggw9s3bp1pjeYfCtbtqx7M6pt27Z29NFH+8XcIoAAAggkgACBoQQYBLqAQDELhAeGLrnkEmvXrp2de+65Lvxz3XXXuZCPpiTTtGGPPvqo3XrrrVazZk277bbbrHXr1nbmmWe68M/MmTPt9ttvt0aNGpmmIDvkkEPsmmv+9ztBeIWhE0880e6//35btWqVLVmyxIWMNDWa2oUXXmgnn3yym8Js7dq1dsEFF9jzzz9vCibREEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBNJLgMBQznhHCgztGdcvrmdCpGPEdYAYN07FwJA+Lf3000/HKPDzZvokdMuWLd2CGTNm2Mcff+zuazqGvn37/rxhzr19+/aZgklq+gR2Qd8U0SfCNY2EWt26da1cuXLufml806fFJ02aZIsXL8739F27drXevXvnux0bIIAAAgiUjACBoZJx5iwIlKZAMDCk16Fnn322qYpQ1apVXbeCU5L98Y9/dK8tTz/9dLfu008/tTfffNNNJaZqQWpXXnmlu1V4SOEiVQpSixQY0hRlev2r0JAqG/nAkMJBH374oXv8wgsvmM7z97//3R2HbwgggAACCCCAAAIIIIAAAggggAACCCCAAALpJUBgKGe8I4V9CAyV3D+EYGCoVq1abgqGWM5+1FFHmbZX27hxo73xxhtuaoeTTjrJ6tWrl+sQmzZtsscff9wt06e19cnqgrSJEyeGAjqawqFatWoFOUyR7KM3kebPn++OpWnYOnbsaA0aNLDKlSu7SkPff/+9zZkzJ1R1qEWLFu66SzPkVCQXzkEQQACBF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b948plOUK1fOTj75ZLdtMDCk6dD8G2j5HUhVjzS1mRqBofy0WI8AAiUpQGCoJLU5FwKJJaDqksFwj39do1CPv1/QHvvgkL/1x/HHLuzx/fG4RQABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEh+AQJDOWNIYKh0n8ipFBgKBmjatWtnAwYMyBN32rRprgKQNjr99NMPmmot0s4bNmywjRs3ulWamqt69eqRNsu1TIGhVatWuWUXX3yxVa1a1d1/4IEHbMeOHaYQzrnnnptrn1geBK83rynJXn/9dVuyZIk75JgxY6xSpUqxHD60zaZNm+zxxx93jzt16mT9+h08fV9o4yh3CAxFgWExAgiUigCBoVJh56QIlLpAMCyk8I4P8hRXx1TFSF++HXPMMYUOJfljcYsAAggggAACCCCAAAIIIIAAAggggAACCCCQ3AIEhnLGj8BQ6T6JUykwpCo+d955p2VnZ1vDhg1t5MiReeI+//zzpgpAaqr8owpA+bW5c+fa22+/7TZTBSNVMsqvvfXWWzZv3jy3maYe0xRkauPGjbO1a9eapv+64oorTBWAorWtW7e6VYceeqhVrFjR3Y81MPT+++/bBx984PY544wz7Igjjoh2mojL5XnXXXc510aNGtmIESMibpfXQgJDeemwDgEESlqAwFBJi3M+BEpfIBjeKengTjCoVNLnLn15eoAAAggggAACCCCAAAIIIIAAAggggAACCCAQSYDAUI4KgaFIT42SW5ZKgSGpBUNAZ511lh122GERMb/77jt76qmn3Lr69evbOeecE3G78IXffPONPfvss26xKgONGjXKypYtG75Zrsc+GKSFF154YagqUbDC0eDBg61ly5a59vMPgucMTrUWa2Doq6++spdfftkdLr/pzxS6UkBIU5IFm6xkpnb22WebqitFa/v27bPy5cvnWk1gKBcHDxBAoJQFCAyV8gBwegRKQWDixInurKoqpK+Sbj40RGCopOU5HwIIIIAAAggggAACCCCAAAIIIIAAAgggkJgCBIZyxoXAUOk+OUsiMLRr1y6777773IXGUvknmsjUqVPt008/dat/8YtfWOPGjQ/adP369TZ27Fi3XKEWbaeqPMG2Z88ee+mll2zNmjVu8cCBA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kFId92+vRpU5nnxIkTZlOdOnXkhhtu8N3Nu6zTh3311VdSuXJlM8Wcd4PjTaCBoa+//tqcSw/Vyjxaocdf0wo+M2bMkJ07d3o333333ZIzZ07vsr554403vNWt2rVrl+T0Zrt27ZLp06eLhoy0pabC0KuvvipqqK1Lly5SpkwZ854/EEAAgVgUIDAUi6NKn9JLIKnAkF6vfPny5iu9rs15EUAAgbQQIDCUFoqcAwEEEEAAAQQQQAABBBBAAAEEEEAgrQUIDKW1aCrOp2GOJ554Qu677z4pXLhwkmfSqaduu+0273adCk2noaIFJhBIYEingouPj5fFixeLTkdm29///ne5+eab7WKiV60INXv2bLM+U6ZM0rBhQ2nQoIHoe2fTgI1WLdLpurRi0U033eT3l12BBoZ+/vlnEwSy12jRooVolStnO3nypJm27Ndff3Wulv79+0u+fPkSrHNWDSpYsKD06NFDcuTIkWCfAwcOiN6fDfnoxtQEhiZMmCBapUubTvem077REEAAgVgVIDAUqyNLv9JaQKdKXb16dbKnJTSULA8bEUAgAgQIDEXAIHALCCCAAAIIIIAAAggggAACCCCAAAKJBAgMJSIJ3woNbmgAo3Tp0vLBBx+Yach872bNmjXStWtXE2bRbX369JHXXnvNdzeWkxFwBob0F7bOqd60opCGVk6dOpXoDLVr15YmTZpI5syZE21zrpg6dars2LHDu6pYsWImDFSkSBFTtUer8uh2W4lIpy/r2bNnoinO9ASBBoZ0+jrdV6evs61kyZJSqlQp0W0aEnJus/voa69evaRo0aLOVbJnzx559913vevy5s0rV111lblH9dEwlb5qlSRnS01gSINWGrjSpiGqihUrmiCchq18w0/Oa/IeAQQQiEYBAkPROGrcczgEnIGhAgUKiC77BoR0nW6jIYAAApEqQGAoUkeG+0IAAQQQQAABBBBAAAEEEEAAAQTcLUBgKELGX4Mq7du3ly+//NLckU4RVb9+fVOdpnr16vLbb7+JhoWmTZtmAiC6k049pZ+41jAHLXABZ2AokKMKFSokjRo1Eq0uFEjT6kFLly5N8dPwei795ZZWLEqqolSggSE916FDh2TSpEmilYSSat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0c8//1y+r2bNmrb33ntbmzZtQtNgJ9finK5du1q/fv1ixtMBERABERABERCB0iEgwVDp3GuVNPcEvJUhuSXL/b1QDkSgVAlIMFSqd17lFgEREAEREAEREAEREAEREAEREAEREIH8JlBygiFuxxNPPGEzZsywdddd1w4//PCYd2jx4sX2+uuv25dffmm///57ebwaNWo4i0O4IVtrrbXK90ev/PTTT3b//fe73QcffHCoa7Poc7QtAiIgAiIgAiJQ/AQkGCr+e6wS5hcBDdbn1/1QbkSg1AjoHVRqd1zlFQEREAEREAEREAEREAEREAEREAEREIHCIFCSgqGvvvrKRo8e7e7Q4MGDrXHjxnHvFm7IEA8tWbLEWRlq0KCBc08W96TIQToFJ0+ebE2aNLGjjjoqUXQdFwEREAEREAERKBECEgyVyI1WMfOGgHdLJitDeXNLlBERKCkCEgyV1O1WYUVABERABERABERABERABERABERABESgYAiUpGCIu/PII4/YnDlzbKuttrKddtop4zcMcdG9997rLBPtu+++1q5du4xfQwmKgAiIgAiIgAgUJgEJX6otlwAAQABJREFUhgrzvinXhUvAuyVjogCiIQUREAERqAoCuDhfuHChffjhh26ikt4/VUFd1xABERABERABERABERABERABERABERABEUiWQMkKhubNm2cjRoywatWq2WGHHWZNmzZNlllS8caNG+c6Bdu2bWv77bdfUucokgiIgAiIgAiIQGkQkGCoNO6zSplfBLyVod69e+dXxpQbERCBoiWAYGj48OG2wQYbSDBUtHdZBRMBERABERABERABERABERABERABERCBwiVQsoIhbtmkSZPsrbfesmbNmtnAgQOtZs2aGbmTn332mT377LNWt25dJ0bChZmCCIiACIiACIiACHgCEgx5ElqKQNUR8FaG5Jas6pjrSiJQ6gSWL19u99xzj82fP9/1NzRs2NBOOOGEUsei8ouACIiACIiACIiACIiACIiACIiACIiACOQJgZIWDHEPxowZY19++aWtv/76huuwGjVqVOrWzJgxw5566ilbY4017MADD7RWrVpVKj2dLAIiIAIiIAIiUHwEJBgqvnuqEhUGgZdffllWPgrjVimXIlA0BHBJ9sQTTxjffiwby8pZ0dxaFUQEREAEREAEREAEREAEREAEREAEREAECp5AyQuGVqxYYS+++KJ98cUXbqZfnTp1KnVTX331Vfv4449t9913N9yRKYiACIiACIiACIhANAEJhqKJaFsEqoaAd0smK0NVw1tXEYFSJ/DHH3/Y0KFDDQtnHTp0sMWLF9uQIUNKHYvKLwIiIAIiIAIiIAIiIAIiIAIiIAIiIAIikCcESl4w5O/DN99846wM+e10l3QEVq9e3eSGLF2COk8EREAEREAEip+ABEPFf49Vwvwk4N2SNW7c2BANKYiACIhANgksW7bMxo4da0uWLLHWrVvbjz/+6CwRV6tWLZuXVdoiIAIiIAIiIAIiIAIiIAIiIAIiIAIiIAIikBQBCYaSwqRIIiACIiACIiACIpA5AhIMZY6lUhKBVAjMmTPHuSP+/fffbfPNNzcsDvXt2zeVJBRXBERABFIigCvEX375xb766ivbaKONbNddd03pfEUWAREQAREQAREQAREQAREQAREQAREQAREQgWwRkGAoW2SVrgiIgAiIgAiIgAjEICDBUAww2i0CWSaAtY8bb7zREAy1aNHCevXqZe3bt8/yVZW8CIhAKRJYuXKl/fnnn67oEyZMsEaNGtkWW2xhNWvWLEUcKrMIiIAIiIAIiIAIiIAIiIAIiIAIiIAIiEAeEpBgKA9virIkAiIgAiIgAiJQ3AQkGCru+6vS5TeByZMn23fffWc8h/Pnz3euhBEOKYiACIhAJgmMGTPGvv/+e5fkvHnzrFatWoY7xCFDhmTyMkorAwT8ffrkk08ykJqSyAWBdddd112WpV/PRT50TREQAREQAREQAREQAREQAREQAREoNAISDBXaHVN+RUAEREAEREAECp6ABEMFfwtVgAInMHToUJs2bZrts88+hpuyPffc02rXrl3gpVL2RUAE8pXA008/bQ0bNrS2bdva+uuvn6/ZLKl8IRJCIOTFQiVV+BIorBcOdenSpQRKqyKKgAiIgAiIgAiIgAiIgAiIgAiIQPoEJBhKn53OFAEREAEREAEREIG0CEgwlBY2nSQCGSPwwAMPWN26dZ1rMpbdu3e31q1bZyx9JSQCIiACnsC9995rM2fOtGbNmhluEc8991x/SMscEUAoFG1NqEmTJi43WIFSKEwCCxYscJYDg7lHMCTRUJCI1kVABERABERABERABERABERABESgIgEJhiry0JYIiIAIiIAIiIAIZJ2ABENZR6wLiEBcAqNHj3YD97/99pu1adPGevbsGTe+DoqACIhAOgR+/vlne/XVV23u3LnWqVMn++GHH2zAgAFWrVq1dJLTOZUkEG1VCJFQ+/btzYuFKpm8Ts8TArgb5W/69OnlOZJwqByFVkRABERABERABERABERABERABESgAgEJhirg0IYIiIAIiIAIiIAIZJ+ABEPZZ6wriEAiAt988419/vnnVqdOHWdpYuDAgSbLEomo6bgIiECqBLBohjuyL7/80tZZZx0bPHhwqkkofoYITJgwodwFGUKhDh06ZChlJZOPBHA9GhQN7bzzzoarMgUREAEREAEREAEREAEREAEREAEREIG/CUgw9DcLrYmACIiACIiACIhAlRCQYKhKMOsiIhCTAFYmJk6caB999JF17NjR9t13X5s9e7ZtuOGGMc/RAREQARFIh8Aff/xhL774ojVo0MC6detmtWrVSicZnVNJAkE3ZNwHWRWqJNACOv3dd991FocQCyEaUhABERABERABERABERABERABERABEfibgARDf7PQmgiIgAiIgAiIgAhUCQEJhqoEsy4iAqEEvvvuO3v55Zdtu+22s3nz5tnbb79ty5cvt7p169qJJ55oa6yxRuh52ikCIiAC6RAYNmyYrb322s6CGRZPZGEoHYqVOycoFpJlocqxLMSzcU+GaIgg12SFeAeVZxEQAREQAREQAREQAREQAREQgWwSkGAom3SVtgiIgAiIgAiIgAiEEJBgKASKdolADgiMGDHClixZYi1atHCDiD/99JNts802OciJLikCIlCMBJYtW2Zjx461Ro0aOcEQ7pH2228/q1atWjEWN2/L9J///MflTWKhvL1FWc9Y0D2ZXJNlHbcuIAIiIAIiIAIiIAIiIAIiIAIiUEAEJBgqoJulrIqACIiACIiACBQHAQmGiuM+qhSFT+DJJ590lj8mT55s1atXt969e9vGG29c+AVTCURABPKGwKhRo2zGjBlWp04d69q1q/Xp0ydv8lYKGcEF5YQJE1xR+/XrVwpFVhljEPCuyWRlKAYg7RYBERABERABERABERABERABEShJAhIMleRtV6FFQAREQAREQARySUCCoVzS17VF4G8CS5cutdGjR9u6665rW2yxhf3www/WqVMnuSX7G5HWREAEMkAAK0ONGzeWBbMMsEw1Ce+OrEmTJtatW7dUT1f8IiLgBUN887EypCACIiACIiACIiACIiACIiACIiACImAmwZB+BSIgAiIgAiIgAiJQxQQkGKpi4LqcCMQh8Oeff9p9991nm2++ua1cudLmzJlj++yzT5wzdEgEREAEkicwfPhwa9CggU2ZMsVwiXXIIYckf7JiVpqAFwzJHVmlURZ8AvPnzzdEQxIMFfytVAFEQAREQAREQAREQAREQAREQAQySECCoQzCVFIiIAIiIAIiIAIikAwBCYaSoaQ4IlA1BObOnWsvvviitW7d2rbccksbN26cHXDAAVVzcV1FBESgqAksW7bMxo8fb9999521bNnS2B4wYIDVqFGjqMudT4XDHRluySQYyqe7kpu8eMEQVz/ooINykwldVQREQAREQAREQAREQAREQAREQATyjIAEQ3l2Q5QdERABERABERCB4icgwVDx32OVsHAI/Prrr3bPPfdYvXr1bMGCBdazZ0/baqutCqcAyqkIiEBeE3j44Ydt2rRp1qNHD5s1a5YNHjw4r/NbbJn7z3/+44qEOzLckimUNgEEwgRckmFpSEEEREAEREAEREAEREAEREAEREAESp2ABEOl/gtQ+UVABERABERABKqcgARDVY5cFxSBuAQWLVrkrAzVrl3bOnXq5OJutNFGcc/RQREQARFIlsDLL7/s3JIhWlljjTWSPU3xMkBAgqEMQCyiJCQYKqKbqaKIgAiIgAiIgAiIgAiIgAiIgAhkhIAEQxnBqEREQAREQAREQAREIHkCEgwlz0oxRaCqCHzwwQc2e/ZsZwlkww03tE022cTatm1bVZfXdURABIqYAIKhxo0bO7eHRVzMvCyaBEN5eVtylikJhnKGXhcWAREQAREQAREQAREQAREQARHIUwISDOXpjVG28oPAn3/+mR8ZUS5EQAREoMgIlPrsegmGiuwHreIUBYFRo0bZ2muvbVOnTrVdd93VysrKnHuyoiicCiECIpBTAhIM5Q6/BEO5Y5+PV5ZgKB/v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Pbbb859JIIg3Eh6YRBLv06RguuFUEQJhgrhLimPIrCKwIwZM4w/uSXTL0IERCBdAhIMpUuu8udJMFR5hsWUggRDxXQ3VRYREIFMEnj77bftrLPOsldffdX1vaSTNiKe0aNH27rrrpvO6e6cww8/3Hr37m2HHnpoaBo//vijbbLJJjZv3rwKx/3+srIy69mzpw0fPryChdizzz7bnUf6yYREZXnttdfskksusQkTJlRI7rPPPrP999/fPvnkkwr7ozdeeOEFu+2221w7k/xeddVV1qhRo+hoMbcR86z45Udbv1ktmzazzMXr0LalW/rtJo3rW5NG9W3+wiU2f8GS0Dj+HB/Hn0Nk0pk+q8wOOeYKd67+iYAIiIAIiIAIFC8BCYaK996WZMmCAiEAsO3/cEWGaIi/evXqOWsVJQlJhRYBERCBAiHAe3vp0qWuswqxUDwrQxIMFchNVTZFoAAJeLdkjRs3lpWhArx/yrII5AMBCYZydxckGMod+3y8sgRD+XhXlCcREIF8IHDkkUfaSy+9ZHfffbfttttuaWVp9uzZ1rp167TO5aSvv/7att9+e2vWrJmzIhSWkBcGxRIMsX/w4MFOLPTvf//bJYH16ubNm9uHH35obdq0CUt2tX2JylIZwdB7771nAwcOtCuvvNJ69OhhV199tSE04htFv1cy4eVnhlm9WsvNC36SOSedOAiJOnU/LJ1TdY4IiIAIiIAIiEABEZBgqIBulrIan4AXCxHLr4eJhRAMNWzYMH5iOioCIiACIpAXBDDzjFjI/wVFQ2QwKBQKrudF5uNkQhaG4sDRIRHIQwK4JUM4JCtDeXhzlCURKAACEgzl7iZJMJQ79vl4ZQmG8vGuKE8iIAK5JvDzzz9b586d7fbbb3eWeZ544onyLN1111328MMPu770M844w3beeWebOXOmXXDBBfb555/bjjvu6KzjYM2/V69exrlYyrn33nvtpptucsfXWmst14466KCDbJtttrFdd93VHn30Uee2izjesg4We+grefLJJ+2ee+6xTTfd1OXDi4C+//5722effezGG290FoZi7Z84caKdcMIJNmXKFHc+6WHN55VXXjGEQKeccoqz7IPbMCz7rL322jZkyBDr1KmTUW8g3t57711elqFDh9oDDzzg8nbcccfZAQccYAiGTj/9dCeuIv2+ffvaddddZ19++WUFC0Ncd+TIkdalSxc788wzHedjjjnGWWG67LLLXP4YqyAPb731lm288ca23Xbb2SGHHOLuRZ8+fdx1PCN/Y7AwVPuPOc6CkN+XrWXTDQdkK2mlKwIiIAIiIAIikCcEJBjKkxuhbFSegBcJkZIXCvll0LoQLm6aNGlS+QsqBREQAREQgawTmD9/vnMhGSYYQiAUFAkF17OesUpeQIKhSgLU6SJQxQS8laF27dpVMG1fxdnQ5URABAqUgARDubtxEgzljn0+XlmCoXy8K8qTCIhArgkghvnf//5nd9xxh2vrYAGnadOmNm3aNNtjjz1s8uTJTgiDCOf111+3I444wgmBcBvGvn79+tm+++7rLAN9+umnhngI8c0zzzxjHTp0cC7GOOfEE090fTh8mwcMGOBEMVgzwk0YffjEJf0xY8bYV1995QRHsDnnnHMMUdO1115rTz31lJ122mmGeCjWfp8W10cIhYswrkMezj//fNtwww2dyzMEPAh1sES00047ubgXXnihE/NgkYiyLFu2zI4++mh7/PHHbcmSJU7k9MUXXxiM9ttvP3vjjTesbt26TsiE+In0vEsyhES33nqryzPWjS699FInRkKohOgJa0o+7LXXXnbggQfawQcf7BiNGzfOXQuBEsKpc88910d1yxXLfrSFsydW2JeNDSwMLa/Wyrpu1SsbyStNERABERABERCBPCEgwVCe3Ahlo/IEaAz44IVCfolgaOXKle7vt99+c40eH1dLERABERCB/CXwww8/uM6mGjVqGH9BC0MSDOXvfVPORKAYCWBliICVIQUREAERSIWABEOp0MpsXAmGMsuz0FOTYKjQ76DyLwIikA0CCFdwi4V7LKwI4VYMUQ79Mf/3f//nLOpgVWeLLbZwl7/iiiucGAix0J577lluyR9XYohssL4zatQoJ7LhhJNPPtmJdBAM0adDPz0Bi0YIg2655RYbP368ywNCmZ9++sm6du1qs2bNchPIsM7z2GOPOUFP0CVZrP2kffHFFxuWe84++2wngsIqEpaOuDbtOvL49ttvO6ESVpEQDGHhaIcdduD0cvHT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ZZbZNvxNCk0MwxG+radOmrrxEuuOOO9zk3QsuuCD0nL322ssuu+yySk244bp33323/fvf/7Zq1ao53kOHDrWrr77abfN7WnvttW2nnXYKzUOindxv8ti2bVuXzuuvv26nnHJK2uklup6Oi4AIiIAIiEA+EJBgKIOCoSuuuMLmzZvn7uuVV15pa621llGhoHPwww8/tM8//9xVNLbccktXiWI2crzwf//3f+UV0fvuu88OOuigeNFd5WjYsGFO/czARZ06dWyzzTZzf1SQYim7YyU6adIkw80TIgtcBxGolCPKOProo61Dhw6xTl1tPw2LN99809555x3HCIsi5O2AAw5w6UkwtBoy7UiSwNNPP+2sB2G9hoYfVoXCArNS7rzzTvvtt9+cBSIaq4RYgiHi00BjBkGyjeo///zTsDjAuTQIg67PwvIU3FeZcykTeV1zzTWtbt26wWTjrvvzGjRoYDVr1owbN9bBXAqGMpH/WOXS/vwhIMFQ/twL5UQERMDc93bfffe1Sy+91FnWo65MPf+xxx5zf6nMPPzll18qfLexFhKrHiP2IiACFQn89NNPbgdLBgT4y3RggIv6tQ/xnlHq8gh6wurUnEe/QJMmTYy+gOjw66+/urZ79P7obQbLGAzp3bu3GzzafvvtJRiKhhSyLcFQCJQS3iXBUAnffBVdBEqQwJFHHukEMogrmGCZTpg9e7a1bt06nVPdOQiFEHYMHDjQrrvuutB0EgmGGG8ZPHiwG5cgLQL1p+bNm7u2WJs2bdy+eP+oq1GXatWqVcxolREMYd2eMjImhHV7xCsIT/juIGpJNmDBdptttrFevXo50RD91mHh5WeGWb2IdaFsC4a4dtMNB4Rlwe1DxI6YDNEQIUwwxCRf+spp64YJhqhD04ceq/89ug7OuNeQIUPs+eefD500TFud3yy//3TCv/71L2ch/9RTT3WnP/nkk/bKK684MVg66ekcERABERABESgEAhIMZVAwtMUWW5S7PUJgM3LkSLvpppuMCmlYYEbgtddeG1qxIX6ygiEqTaicH374YWdlJexaVExR3VOpjlX58uchPDjuuOPsqaee8rtWW9IRSsWMSnBYp6g/gYEQRBxU/MNCvXr1HKO33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Ya0I+s/W265pZ/o1cOGREAS+fz0009eCPXNN9+4Fi1auP3339+7K9M5cgV2zz33uBkzZngx0GmnnbaMW7BMLsnyEQzJYtHNN9/spk+f7jp06OD22muvxDUnT57s7rvvPidrT7m6QFN/CBCAAAQgAIFsCCAYyoYSZYxAqsndbbfd1g4TQwACECgIAblqliXZl156yQ0ePNj985//dE8//bR/qePFF190F154obe6e9xxx3mLrGZh6KyzznJnn32200sZspB78cUXu9dff90pX1Z7d9xxR3fuuecu08Ynn3zS54WiICsUiol69OjhXZ9JLCSRkMRCBAgUisALL7ywTFUmIFKMYGgZPFWdgWCoqoefzkOgYgmkep60ziAYMhLEEIAABCAAAQhAoHoJIBhKM/alFu5YM0p93WwEQxILyXWXJokVZAlos8028+lQMDRo0CDXu3dvnx/+kcuwt956y1shOv30030cHpdlH7kf0wSzJoN322238LC3HLRw4cKUAp58BENyofbyyy/7twdPOumkZawIjRs3zj388MNewHTGGWcs094ajWMHAhCAAAQgkAcBBEN5QKvSU8zCkBYtJbTWpoBgqEo/EHQbAkUk8Mwzz3hR0MiRI/1vzeabb+7kgrpBgwauT58+/nlQlmX79u3r3UxPnTo14ZIs2cKQREJ6xltvvfXcNtts46688soaz4qhIGjgwIEpe2WCIj0v/v7777ggS0mJzLoS0P9VLaSmC3qZSFvTpk1dt27d0hUjv0oIIBiqkoGmmxCIEQH7HydhkIKeL5MDz5bJRNiHAAQgAAEIQAAC1UUAwVCa8S61cMeaUerrmmBIE78777yzNcPHesNULrs+++wzN3PmTJ/XpUsXd8ABByTKmWBIrsL+/ve/J/ItoTouuOACb2WoX79+/k1UOxbGegP1iSee8FaKZFFo+eWXTxwutIUhMdbk9oABA9zWW2+duI4lNCF9zjnneDdoRxxxhLO3C+04MQQgAAEIQKCuBBAM1ZVgdZwfioVMMKQJX6W5P6mOzwC9hEApCRxzzDFelGPWdc0l2fjx47176T//+c++ObLIet555/nfoSFDhngLLMmCIQks3nzzTTd27Fj/nCcrs8cee2yiOyYYkiuyXr16J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buww8/dOutt56bNWuW30/+rTErQVgOKgR56oAABOJM4IUXXihI96JmZQjBUEGGlUogEDsCd911l1+n6NWrl3dJ1r17d7fGGmvErp90CAIQgAAEIAABCECgdARiLRgygZBwWjqdUEjiHxMGSRyUvJk4SAt89evXd6ussopbeeWV/aKSxD4KKvPLL784vS36008/ucWLF/tY11QZTQKn2nQs3CQK0r5iEwhZrOuEae0TIAABCEAAAhCoLAIIhqI3XrbY1LlzZ/f888+7vn37uja8qRm9gaJFEIg4gUWLFvlnz0aNGrl3333XjR8/3u936NDBff/9904WhDbccEP3xRdfuAULFvjnvm7dujmVN3GQiYUi3lWaBwEIQCASBPRbK3FNGGRlxyy2hfmZ0vrtjZKVIQRDmUaLYxCoXgKTJ0/2LslWXXVVt9FGG/n7yuqlQc8hAAEIQAACEIAABApBILaCIRMICZKlTfSjONX266+/Om0mFrK0bsAbN27smjRpkjNzXXvhwoV+k3sLCYZWXHHFhHBIaW2hYChM64LaVwiFQmHaH+QPBCAAAQhAAAIVQwDBULSGSgtK2nDhEK1xoTUQiDoBCX7mzJnjZs+e7bp06eK0gCPLQRIGtW7d2n3wwQduiy228C+VvPfee35R5/PPP/eCRL18omfMJUuW+N+f/v37R727tA8CEIBAJAnYfVzYuG233daLiCQmyiXovKgEBENRGQnaAYHoEHjttdfc+++/7y0KyarQVlttFZ3G0RIIQAACEIAABCAAgYolEEvBkAmENCqWVqwtFAqZm7FQICQLQSYUatCggWvWrJkr1KLejz/+6ObPn+/01qkJh+T2IhQQSRykY6FoSOIgEwhZrL6Fae0TIAABCEAAAhCoDAKFureojN5Gu5W2yIRYKNrjROsgUAoC3333nZs0aZLr3bt34nIPPfSQ69mzp1trrbX84rOskek5bOutt3ZDhw51PXr0cF999ZV/uUSWZufOnetWW20116JFC/fxxx97cZCsC912223ulFNOcddff7079thjvchIdTVs2ND169fP6SUVAgQgAAEI5E4gWVgT3tPZfV62tUbJLVlyv7LtQ9j/bM+hHAQgUBkE7rnnHi84nzZtmn/ZRdZ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CjsUKEFQ6q7d+/ermPHjuFlSpLORzA0bNgwN2/ePN++/fff37Vu3do9/vjjbty4ce799993DRo0cCojIVQY9BlRmY8++shJNPL555+7Ro0aeYGZ+r7vvvu6hg0bhqdkTE+fPt2NGDHCffzxx05u5vT51MSN3H4NHjw4J/dfmiQaNWqUk5WEuXPnujZt2vjxWH/99d2AAQP8ZyFjYzIc/PTTT704TUW0uHPsscfWKP3DDz+4oUOH+rxVVlnFnXLKKT49ceJEN2bMGKf4s88+c82aNfN92mGHHdyWW25Zo45w5+mnn3bvvPOOz9p9991d586d3dSpU93zzz/vWak9GqMNNtjAbbjhhm6nnXby34GwjjB95ZVXuh9//NFn7bfffq5t27bh4Rppje9zzz3n81RO5RXCNn377bfOJhH1fdttt918Gf3p37+/69GjR2I/TGicH3roId+Xr7/+2q288sr+s6fr7LHHHn7MwvKkIQCB6iaAYKg04491odJw5irxIhCKgcJ0ql6aMEhxmE5VljwIQAACEIBAuQmYpY5s2oFgKBtKlIEABIpJgOfZYtKlbghAAAIQgAAEIAABIxALwVDojkyiDLkhM3dksipkloUkCJHgoRzCFwOeS/zPf/7TTZ482QsPQsGQhEISMphgSHWGIqEwncv1MpVt3LhxDeFEprKFPJaPYEgu1PRApXDTTTe5Z555xj322GM1mvXUU095IZBlSrBy4oknet6Wlxw3adLESykRagAAQABJREFUlwkFJMlltK/P3iWXXOIFPvo8pgoaP4lVjjrqKJdp0Xj+/PleoPPWW2+lqsbnScBy2WWXecFO2kIZDkgcc8IJJ/gSrVq1cqNHj65RWm3o27evz5M7P4l9br/9dnfttdd6EVSNwv/d2WWXXdx5552XUuhzwQUXeCGVikoUp/6fe+65CdFPcn1du3Z111xzTWIRKvm4xEkS+SjcdtttrmfPnslFEvt33323u+KKK/y+yqm8wt///veEaMpnpPlz6qmnOonQwrBw4UJ30UUXeW6h1bOwjMZb4qiTTz4543iH55CGAATiTSDTb3+8e1663jG5WjrWXKlyCZggyO6dbT+5R6EYKEwnl2MfAhCAAAQgEGUCu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skbRILmWUhCQ4kHgmtC0k8ZCFMW15d4969e7uOHTvWtZqczy+mYEiNkespuaBSWHfddZ0s0DRp0sTv648+UxILnXrqqV6AZgfkyuziiy+23UR8yimnuNGjR/t98bruuutcy5YtE8eV0Gfw5JNP9lZmtL/pppu6e+65R8lE+Prrr52sFJmYSW+W/P3vf3eNGjVKlLGE3Gpdc801fveoo45y2nIJ5RQMqZ2bbLKJ+8c//uFWWWWVGs3+/PPPvWu22bNn+/yNN97Yi4tqFFq6E1oN0vdEln/at29fo5iYH3jgge7jjz9O5KcTDH333XdOn3cLalu4b/nz5s1zsrql3xMFuaSTFapk0ZB+m+TO7pFHHvHlJABTGwkQgEB1E0AwVLfxtzcvu3bt6kVDdauNsyuFQCgGCtPp2h+KgcJ0uvLkQwACEIAABCAQfwKaA8km6N5B95rlCrmIm8I2IjYIaZCGQOUQsGdcvsOVM2a0FAIQgAAEIAABCMSFQKwEQ1qYN7GQxWZhSIv6ZmVIloa0aC+rIFEMckl19dVXJ4RCJhYyC0MmFrJYfQhFQmG6EP1r3rx5wl1WIerLpY5iC4aee+45bznI2iRLN7L8I9drEpeMGzfOLVy40A4n4r59+7obb7wxsW+JGTNmuMGDB3tRkPIkPtppp51c586dvRWdyZMnuwceeMBJbKKw9tpru5tvvtm1adPG74d/lH/DDTcksuQuTa7KVJc+6++8845799133ZdffunLSKhy0003pRS3JCpJkSi3YEhN0nexV69erlu3bl6kNXHiRPfkk096N4I6rs+0eKSyACUxkMbMmMpyz6677uoFYLLsIytFEoXp+x+GdIIhlenXr58zoZIskmkMxb9t27auT58+iWrkLu7SSy/1bVamHuo1/q1atXLff/+9t04kC0XffPONP0f90Hcb08IJhCQgULUEEAzlP/RMpObPrlLODMVAYTpd+00MpP/DFizP9omjRWDRokVePK97uFThiiuu8Pddu+++e6rDafN0XywroLrfzid88skn7rLLLnN33XWXq62N+dTPORCAQHYEZA1Yz6lbbLFFWmu02dQky75yB62Xg9q1a7fMKV988YXTVtfrLFMxGZEmgGAo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QhIcJtsLaLypBsBL8yjXoiFEBFJNJRuraz6iIAIiIAIiIAIiED+CWSsYKhLly42YcKECMHLL7/cbrvttqhWOd59913r2rWrrVixwsXfd9997c0337SyZctGzk+3lUwUDK1fv9769+9viIY6d+5siMcU0pfAq6++aosXLzbu5zZt2uS7oqtXr3auDUno4osvttyIAb777jsbM2aMKwPPpvyYBf7111+dYIjllVdeaTVr1sx33ZSACIhA4gnk5hmR+NyVogiIgAiIQKIJaNAz0USVngiIgAiIQLoT8IJb3CPxpyACIpBYAkErQ02bNjV/z5GLrHsllrVSEwEREAEREAEREIFUJpCRgqEFCxZYs2bNIm7IHnjgAWvfvn227Yiw4PTTT7dNmza5eNddd53dfPPN2Z6TygczTTCEe7oHH3zQWZXCutApp5yyXfN9++23Nm7cONt///2tZcuW2x3XjtQiMHLkSPvggw/swAMPdILA/JYe0U+/fv1cMj179rTKlSvHneTXX39tAwcOdPFvv/1222uvveI+N1rEVatW2YABA5xrvRtuuMEqVKgQLZr2iYAIFCEBCYaKEL6yFgEREIECIOAHYDT4UgBwlaQIiIAIiEDaEvAWUPT+TNsmVsWKmEBY1O5/s1IsifWKuHGUvQiIgAiIgAiIgAgkCYGMFAxhTWTGjBmuCerVq2cTJ06MqznuueceJyohMlY7Zs6cGdd5qRgp0wRDfDy9/PLLdvjhh1unTp2iNpkXdWQXJ+qJ2pmUBNJZMATwt99+28aOHZswQVRSNqIKJQIpTECCoRRuPBVdBERABGIQCA/IxIim3SIgAiIgAiIgAv8S8BZQ5CZJl4QIFAwBRHncX0ErXtx3CIdYSjRUMNyVqgiIgAiIgAiIgAikEoGMEwxhXejkk0+OtNHw4cOd5aDIjmxWFi5caE2aNInEeP/9961q1aqRbVZefPFFw4UZgXywZDRr1iybPHmyzZkzx37//Xfr06ePYQY0HDhv3rx5Nn/+fPfH8erVqzuLNh07dszywz58Luc888wzbneDBg3s7LPPNlxsPf/880ad+du8ebNzs3XEEUfYWWedla3LpGiCoQ0bNjhRzccff2z84fII6yx16t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9kdApCACIiACIiACIiACIpA8BCQYSp62yFdJJBjKFz538ubNm23gwIH2/fffO4ssWGZR+IeABEOpcyXgF7x3795ulvp1112XK0tlqVNLlVQEUp+ABEOp34aqgQiIgAjklQCzrefPn28MojRs2NBZHcJltIIIiIAIiIAIiED2BHh/IrStVauWvf/++4bLo3r16mV/ko6KgAgUGYERI0YYE3Xpr2SJezLEfvvss4+VLFmyyMqljEVABERABERABERABP4jIMHQfyxSek2CocQ0Hx8sY8aMscaNG5tmJ/3HdOPGjbZo0SK3o3bt2vqg+w9N0q1t3brVHn30UWfmt0KFCklXPhVIBETgHwISDOlKEAEREIHMJYCr6OHDh1u5cuWM325YHapSpYrtvPPOmQtFNRcBERABERCBOAisXLnSZs6caY0aNXLCoZ9++slwTbbHHnvEcbaiiIAIFDaBL774wlnZ/Ouvv6xSpUpWpkwZt92hQwdjgurBBx9c2EVSfiIgAiIgAiIgAiIgAiECEgyFgKTqpgRDqdpyKrcIiIAIiEAmEpBgKBNbXXUWAREQgf8IMFHh3XfftQ0bNhjvhI8//tjOOeccK1++/H+RtCYCIiACIiACIrAdgRUrVtiWLVucSOijjz5yS0RDCiIgAslJYO3atYZgfv369fbcc8/Z+eef7yyE4Z6XCbtY3FQQAREQAREQAREQAREoOgISDBUd+4TmLMFQQnEqMREQAREQAREoUAISDBUoXiUuAiIgAilBYMKECYZb5P3339+5Zfj666/tuOOOS4myq5AiIAIiIAIikAwEvvnmG+Nvv/32c3/JUCaVQQREYHsCWBgaMmSIHX744TZv3jzDOliXLl1s2rRpduqpp8pK2PbItEcEREAEREAEREAECo2ABEOFhrpgM5JgqGD5KnUREAEREAERSCQBCYYSSVNpiYAIiEBqEnjrrbfcTOu///7bVq1aZaeddprtu+++qVkZlVoEREAEREAEiogAVobkmqyI4CtbEYiTwPPPP281atSwI444wh544AG3vnTpUitVqpSzMPTll1864bzcC8YJVNFEQAREQAREQAREIIEEJBhKIMyiTOq3336z1atXuyIUL17cKleuXJTFUd4iIAIiIAIiIALZEJBgKBs4OiQCIiACGUKAmdavvfaaLV682OrWrevEQnzXHX300RlCQNUUAREQAREQgfwTQCwk12T556gURKAgCaxbt87KlSvnsliwYIHNmjXLSpYs6X7/VqhQwSpVqmSTJ0+29u3bF2QxlLYIiIAIiIAIiIAIiEAUAhIMRYGiXSIgAiIgAiIgAiJQkAQkGCpIukpbBERABFKLwKeffurcqSxbtszq169vO+ywg1umVi1UWhEQAREQAREoOgJyTVZ07JWzCOSFABY2CYMHD7YDDzzQuRScPn26derUyf0WzkuaOkcEREAEREAEREAERCBvBCQYyhs3nSUCIiACIiACIiACeSYgwVCe0elEERABEUg7ApMmTbJNmzbZihUr7MILL7Rp06bZeeedl3b1VIVEQAREQAREoCAJeNdkTZs2LchslLYIiEACCeCqjP6RefPmOQtEuOjF0lC1atXshBNOSGBOSkoEREAEREAEREAERCAWAQmGYpHRfhEQAREQAREQAREoIAISDBUQWCUrAiIgAilIYPny5YZoaNWqVda5c2crVaqU7bHHHilYExVZBERABERABIqOgFyTFR175SwCeSXw+++/29y5c+2PP/5wSWBxE4tDWNzk93CdOnXymrTOEwEREAEREAEREAERiJOABENxglI0ERABERABERABEUgUAQmGEkVS6YiACIhAehD4+eefbfbs2VaxYkU78sgj06NSqoUIiIAIiIAIFDIBb2WId6nEt4UMX9mJQD4JjB8/3ooVK2a4623WrJntueeetv/+++czVZ0uAiIgAiIgAiIgAiKQEwEJhnIipOMiIAIiIAIiIAIikGACEgwlGKiSEwEREIE0IPDNN98YfxrkTIPGVBVEQAREQASKjMDUqVOdWEgC3CJrAmUsAnkisHTpUnv77beNZd26de2QQw6x/fbbL09p6SQREAEREAEREAEREIH4CUgwFD8rxRQBERABERABERCBhBCQYCghGJWICIiACKQdAQ1ypl2TqkIiIAIiIAKFTMALcBEaSGxQyPCVnQjkkwCuBTds2GCrV6821nUf5xOoThcBERABERABERCBOAhIMBQHJEURAREQAREQAREQgUQSkGAokTSVlgiIgAikDwE/yCkrQ+nTpqqJCIiACIhA4ROQa7L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Z3dxZthpk6dOhnO1bDQiy++aAI8XthGZ4fRWWV0q1y5svTu3dvMhhNeUAMlGpJo3LixCSPpZw2x6G+dCUg3rU9DHRpA0QDJkCFDzH4NYGjYqUCBAqaM7tTQk9al28svvywaiNBra7u1Tm8LDwx98sknon9008CE/iP2hg0bQqElXapNA02ZZ6mxCQxpuOT5558XDWjopsES7a/u1827drQZhqZOnSqTJk0y52pQR2dhWr9+vQmqaF3du3fPEIr566+/RIMfumm45o8//jABK50hSC016KFb9erVpW/fvkfNMKWz5qijBq9002CTXkd99JheX5+dKlWqmOP6Y8aMGTJhwgRzTOudN2+euab2U2ex8bamTZsaV+/7/2/vTqClqM61j7/MMzKECyIyCShi9HOIQnBAwVmcUQTFKFFjiHARDQ7xIqAJKjghKmqcSeJFjQgGxxgvRkRBVAQEIwhGREFmkJmPZ+vu1OlTfU53nam7+l9ryenuql21928XpDrnWe/WT51TQa/Zs2e7j+UQ7Kv30c6wwJDuafnq3lGITMcrZOaDWQoqnX/++e7c/o9M70HfTj91D+pe8vOpvtaqVcv5qA+yuvLKK23fffd1zfw9Kcebb77ZfRb8Q+NW1S9tqvCj0FpxW5Q50jk1T3/9618T94DmUk4Krem1//sVFhhS8GzSpEmhbVUNSn8n5X7iiScWCkZFmaPiDML23zPxXntz1pvWrkU7G/2bO8IO4bMKFtDfTzYEEEAgHwTi+kU6H+aOMSKAAAIIIIAAAtkkEPW5Mmq7bBo7fUEAAQQQQAABBBCoeIG4PlcSGKr4e4seVJDAzJkz7fHHH3dXVyBH1XyibAql3H333S6Qo2o+qgjklxJTJZFHH33UBYfatGljV199dWLJI13LhzX0WiEkVSJq3bq1Cyuogsmf//xnFyJRZZiLL75YhyW24pYk8+EMNVAA4rjjjnPXUN+0jJfCKMElwM4880w79thjXUBJIYxp06bZc889564ftgxblMDQk08+ae+99567hoIrnTt3duEKhXdUVeef//ynG19YYEgVbDRfqijUp0+fRDBK1WVUlUj7FVYZMWJEYomzYGBI51QlIQV1dJwCVAofqbqSt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ayZcsCx3711Vd21113uc90nTfeeMNmzpzpgjbdu3e3s846K3H8li1b7OWXXzadXwEebVoebb/99rPzzjvP6tWrlzhWL9566y2bPHmyNW3a1K655hrX9t133y3Qr6OOOsp69uyZGE+BE+x+895777mxfP3114ldCg0df/zxprapglCZ+CZOXMSLTMfuT/XNN9/YX/7yFxce27Ztm+vv3nvvbb1797a///3v9v7771uHDh1s4MCBvkni50cffeTukeXLl5uCSjVr1nTHXnDBBfbss8/a3LlzTXMUVsGqtMef6FTgxfpN6+2iEf3cJ8P6D7OD2/+/wF5eIoBAaQsQGCptUc6HAALZKhDXL9LZ6k2/EEAAAQQQQACBuApEfa6M2i6ujowLAQQQQAABBBBAIJpAXJ8rCQxFux9yqlVxy5KFDSZfgkPpBoZ89RhVDhoxYkQBss8++8zGjRtn27dvtxo1arigkMI9qgakTUGY888/P9Fm2LBh7tiNGze6n6pEpKCOtiOOOMJOP/30xLGvvvqqvfjii+69AjwKLCm0orCKKtv07du3QCDp3//+t40aNcod37Zt20SASR8EA0MKKo0fP96FVLRP1W50vm+//daFmHSdX//617bXXntpt9sUiHn++eddH1q1amUff/yxC0bVrVvXVczxxx1++OHWr98PwRP/mX6+88479qc//cl9pNCTgkdr165NtFVQSdWbkqvuZOobvGbY6yhj13nUD/0PQTBcpYCT5lF2mp/Vq1eHBoZef/11mzRpkgsK6Vzy1f2heVRgSqEx3TMnnniiC1zpGL+V9vj9eZN/vjHr7zZ24lgXgpow7GmrVSN/Ko0lW/AegfIQIDBUHspcAwEEskEgrl+ks8GWPiCAAAIIIIAAAvkkEPW5Mmq7fLJlrAgggAACCCCAAALFC8T1uZLAUPFzn/NHVN6wyGr866HI49jR+FDb1rSH7aqe+XJVkS9aTg3TCQwpIKLjFG458MAD7fLLf1i2SV1UeGfMmDEu/NGjRw8X9lD4QxVkFLD561//6kYyaNAga9++fYFRFbck2axZs+zxxx931Xq0ZNlhhx3m2qs6joI32q+gkQJMPnAUDAzp4EMPPdQOPvhgV5FIYSZfNU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PAjcJEChVpK6mvO0nSH1HHPn36dJswYYIzu/HGG61Zs2YFzrxp0ya74447bMWKFQUqDOkgVaFStSDdP7pfqlYtWMln6dKlLlClJdNOPPFE69mzpzt3WYy/QKd5gwACFSpAYKhC+bk4AggggAACCCCAAAIIIIAAAggggAACCCCAAAIIIJD3AgSGYn4LVF860aqsmhU6ynwOCnmQdAJDS5YscWEQtTn11FPt5JNP9s3tww8/tEceecS979y5s5133nmJQJGqykydOtUUtGnVqpVdc801iWCPGhQVGNJ+hXoUcFHA5PTTT7djjz020X7VqlVuma/PPvvMunfvbmeddZaauOXTRo0a5V6nWpJMIaTbb7/dHVu/fn27+OKLbd9993VttAzb4sWL7dFHH7W1a9faFVdcYQcccIDbFzUwpMY+EFS5cmU7++yzrVu3bu6cCsXMmTPH/vKXv5hCN6eccor7z+3c/UdJfP05gj+jjl3tFHpauXKlNWrUyLn4ilIKCSkU9Pnnn7tLBZck0wfaP3LkSNM5tO/SSy+1unXrmrd++OGHbf369a5tMDCkD0p7/O4iP/6xdfs2e2PmG1a3dl076sAjg7t4jQAC5SBAYKgckLkEAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIIIBASgECQylpcn9Hpa2rrea82woNhKDQf0jSCQzp6D/+8Y82e/Zst1SWqgwpaOO3559/3t58800XAKlWrZq1aNHCtm7d6ir0KBSiYwcMGFBoybLiAkObN2+2hx56yFU30rVq167tzvHdd9+ZAkPa2rZta1deeaXVqvVDZah0KgypnSoY6dw6lzaFYFTdR+0V3NF29NFHu2pAvnpRSQJDclCoZsaMGe7cCszsueee9uWXX5rGqU2BqwsuuKDQ8mtRfd1JQ/6IMnadRlWmZOb727BhQ3f21atXm4JQTZo0sW+++aZQhSEd5JeY02t5Kiiwbt06t1SZ5k7VonTPJAeGdHxpj1/n1PbGrL/b2Ilj3es7B46xts3butf8gQAC5SNAYKh8nLkKAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIIIBAuACBoXCXWHxa418PWeUNixJj2VW9gW1rdrztaHR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OYIIIBAcQIKBT311FP2ySef2M6dOwsc3rJlS+vdu7fpJxsCCOSPAIGh/JlrRooAAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIZKMAgaFsnBX6hAACsRTYunWrLVmyxC1BVr9+fWvWrJmrNqQKQ2wIIJBfAgSG8mu+GS0CCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAgggkG0CBIaybUboDwIIIIAAAgjEXoDAUOynmAEigAACCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAlktQGAoq6eHziGAAAIIIIBAHAUIDMVxVhkTAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIIJA7AgSGcmeu6CkCCCCAAAIIxESAwFBMJpJhIIAAAggggAACCCCAAAIIIIAAAggggAACCCCAAAI5KkBgKEcnjm4jgAACCCCAQO4KEBjK3bmj5wgggAACCCCAAAIIIIAAAggggAACCCCAAAIIIIBAHAQIDMVhFhkDAggggAACCOSUAIGhnJouOosAAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIxE6AwFDsppQBIYAAAggggEC2CxAYyvYZon8IIIAAAggggAACCCCAAAIIIIAAAggggAACCCCAQLwFCAzFe34ZHQIIIIAAAghkoQCBoSycFLqEAAIIIIAAAggggAACCCCAAAIIIIAAAggggAACCOSRAIGhPJpshooAAggggAAC2SFAYCg75oFeIIAAAggggAACCCCAAAIIIIAAAggggAACCCCAAAL5KkBgKF9nnnEjgAACCCCAQIUJEBiqMHoujAACCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAgggsFuAwBC3AQIIIIAAAgggUM4CBIbKGZzLIYAAAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIFBAgMFSAgzcIIIAAAggggEDZCxAYKntjroAAAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIIJBagMBQahv2IIAAAggggAACZSJAYKhMWDkpAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIIIBAmgIEhtKE4jAEEEAAAQQQQKC0BAgMlZYk50EAAQQQQAABBBBAAAEEEEAAAQQQQAABBBB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QQQQAABBBBAAAEE8luAwFB+zz+jRwABBBBAAIEKECAwVAHoXBIBBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQCAhQGAoQcELBBBAAAEEEECgfAQIDJWPM1dBAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBAIFyAwFO7CpwgggAACCCCAQJkJEBgqM1pOjAACCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAgggkIYAgaE0kDgEAQQQQAABBBAoTQECQ6WpybkQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQyFSAwlKkYxyOAAAIIIIAAAiUUIDBUQkCaI4AAAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIlEiAwFCJ+GiMAAIIIIAAAghkLkBgKHMzWiCAAAIIIIAAAggggAACCCCAAAIIIIAAAggggAACCJSeAIGh0rPkTAgggAACCCCAQFoCBIbSYuIgBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQACBMhIgMFRGsJwWAQQQQAABBBBIJUBgKJUMnyOAAAIIIIAAAggggAACCCCAAAIIIIAAAggggAACCJSHAIGh8lDmGggggAACCCCAQECAwFAAg5cIIIAAAggggAACCCCAAAIIIIAAAggggAACCCCAAALlLkBgqNzJuSACCCCAAAII5LsAgaF8vwMYPwIIIIAAAggggAACCCCAAAIIIIAAAggggAACCCBQsQIEhirWn6sjgAACCCCAQB4KEBjKw0lnyAgggAACCCCAAAIIIIAAAggggAACCCCAAAIIIIBAFgkQGMqiyaArCCCAAAIIIJAfAgSG8mOeGSUCCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAgggkK0CkQND2Tog+oUAAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAggggAACCCCAAAKpBQgMpbZhDwIIIIAAAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAggggAACsRMgMBS7KWVACCCAAAIIIIAAAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAgikFiAwlNqGPQgggAACCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIxE6AwFDsppQBIYAAAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAggggAACCCCQWoDAUGob9iCAAAIIIIAAAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAgggEDsBAkOxm1IGhAACCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIIIBAagECQ6lt2IMAAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAggggAACCCCAQOwECAzFbkoZEAIIIIAAAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAggggAACqQUIDKW2YQ8CCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIIIAAArETIDAUuyllQAgggAACCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIpBYgMJTahj0IIIAAAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAggggAACCMROgMBQ7KaUASGAAAIIIIAAAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAgggkFqAwFBqG/YggAACCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIIBA7AQJDsZtSBoQAAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAggggAACCCCAQGoBAkOpbdiDAAIIIIAAAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAggggEDsBP4/oInSneD1PzUAAAAASUVORK5CYII=)" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "GAv7c6NtLOpl", + "outputId": "94e3f040-b384-4fb9-a530-d86e2ee4e664", + "colab": { + "resources": { + "https://localhost:6006/?tensorboardColab=true": { + "data": "PCFkb2N0eXBlIGh0bWw+PG1ldGEgbmFtZT0idGItcmVsYXRpdmUtcm9vdCIgY29udGVudD0iLi8iPjwhZG9jdHlwZSBodG1sPjwhLS0KQGxpY2Vuc2UKQ29weXJpZ2h0IDIwMTkgVGhlIFRlbnNvckZsb3cgQXV0aG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zL2RldGFpbD9pZD04NTg4NjEKICAgICAqIFszXTogaHR0cHM6Ly9kZXZlbG9wZXIubW96aWxsYS5vcmcvZW4tVVMvZG9jcy9XZWIvQ1NTL2ZvbnQtc21vb3RoCiAgICAgKgogICAgICovCgogICAgLXdlYmtpdC1mb250LXNtb290aGluZzogYW50aWFsaWFzZWQ7CiAgfQo8L3N0eWxlPgoKPC9oZWFkPjxib2R5Pjx0Yi13ZWJhcHA+PC90Yi13ZWJhcHA+PHNjcmlwdCBzcmM9ImluZGV4LmpzIj48L3NjcmlwdD48L2JvZHk+PC9odG1sPg==", + "ok": true, + "headers": [ + [ + "content-type", + "text/html; charset=utf-8" + ] + ], + "status": 200, + "status_text": "" + }, + "https://localhost:6006/index.js": { + "data": "dmFyIENMT1NVUkVfTk9fREVQUyA9IHRydWU7Ci8vIENvcHlyaWdodCAyMDA2IFRoZSBDbG9zdXJlIExpYnJhcnkgQXV0aG9ycy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4KLy8KLy8gTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlICJMaWNlbnNlIik7Ci8vIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4KLy8gWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZSBMaWNlbnNlIGF0Ci8vCi8vICAgICAgaHR0cDovL3d3dy5hcGFjaGUub3JnL2xpY2Vuc2VzL0xJQ0VOU0UtMi4wCi8vCi8vIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3JlZWQgdG8gaW4gd3JpdGluZywgc29mdHdhcmUKLy8gZGlzdHJpYnV0ZWQgdW5kZXIgdGhlIExpY2Vuc2UgaXMgZGlzdHJpYnV0ZWQgb24gYW4gIkFTLUlTIiBCQVNJUywKLy8gV0lUSE9VVCBXQVJSQ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9uKCkgewogICAgdmFyIGxvYWRlciA9IHRoaXM7CiAgICB2YXIgcGF1c2VkID0gdGhpcy5wYXVzZWRfOwoKICAgIHdoaWxlICh0aGlzLmRlcHNUb0xvYWRfLmxlbmd0aCAmJiAhcGF1c2VkKSB7CiAgICAgIChmdW5jdGlvbigpIHsKICAgICAgICB2YXIgbG9hZENhbGxEb25lID0gZmFsc2U7CiAgICAgICAgdmFyIGRlcCA9IGxvYWRlci5kZXBzVG9Mb2FkXy5zaGlmdCgpOwoKICAgICAgICB2YXIgbG9hZGVkID0gZmFsc2U7CiAgICAgICAgbG9hZGVyLmxvYWRpbmdfKGRlcCk7CgogICAgICAgIHZhciBjb250cm9sbGVyID0gewogICAgICAgICAgcGF1c2U6IGZ1bmN0aW9uKCkgewogICAgICAgICAgICBpZiAobG9hZENhbGxEb25lKSB7CiAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdDYW5ub3QgY2FsbCBwYXVzZSBhZnRlciB0aGUgY2FsbCB0byBsb2FkLicpOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgIHBhdXNlZCA9IHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0sCiAgICAgICAgICByZXN1bWU6IGZ1bmN0aW9uKCkgewogICAgICAgICAgICBpZiAobG9hZENhbGxEb25lKSB7CiAgICAgICAgICAgICAgbG9hZGVyLnJlc3VtZV8oKTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAvLyBTb21lIGRlcCBjYWxsZWQgcGF1c2UgYW5kIHRoZW4gcmVzdW1lIGluIHRoZSBzYW1lIGxvYWQgY2FsbC4KICAgICAgICAgICAgICAvLyBKdXN0IGtlZXAgcnVubmluZyB0aGlzIHNhbWUgbG9vcC4KICAgICAgICAgICAgICBwYXVzZWQgPSBmYWxzZTsKICAgICAgICAgICAgfQogICAgICAgICAgfSwKICAgICAgICAgIGxvYWRlZDogZnVuY3Rpb24oKSB7CiAgICAgICAgICAgIGlmIChsb2FkZWQpIHsKICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0RvdWJsZSBjYWxsIHRvIGxvYWRlZC4nKTsKICAgICAgICAgICAgfQoKICAgICAgICAgICAgbG9hZGVkID0gdHJ1ZTsKICAgICAgICAgICAgbG9hZGVyLmxvYWRlZF8oZGVwKTsKICAgICAgICAgIH0sCiAgICAgICAgICBwZW5kaW5nOiBmdW5jdGlvbigpIHsKICAgICAgICAgICAgLy8gRGVmZW5zaXZlIGNvcHkuCiAgICAgICAgICAgIHZhciBwZW5kaW5nID0gW107CiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbG9hZGVyLmxvYWRpbmdEZXBzXy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgIHBlbmRpbmcucHVzaChsb2FkZXIubG9hZGluZ0RlcHNfW2ldKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gcGVuZGluZzsKICAgICAgICAgIH0sCiAgICAgICAgICAvKioKICAgICAgICAgICAqIEBwYXJhbSB7Z29vZy5Nb2R1bGVUeXBlfSB0eXBlCiAgICAgICAgICAgKi8KICAgICAgICAgIHNldE1vZHVsZVN0YXRlOiBmdW5jdGlvbih0eXBlKSB7CiAgICAgICAgICAgIGdvb2cubW9kdWxlTG9hZGVyU3RhdGVfID0gewogICAgICAgICAgICAgIHR5cGU6IHR5cGUsCiAgICAgICAgICAgICAgbW9kdWxlTmFtZTogJycsCiAgICAgICAgICAgICAgZGVjbGFyZUxlZ2FjeU5hbWVzcGFjZTogZmFsc2UKICAgICAgICAgICAgfTsKICAgICAgICAgIH0sCiAgICAgICAgICAvKiogQHR5cGUge2Z1bmN0aW9uKHN0cmluZywgc3RyaW5nLCBzdHJpbmc9KX0gKi8KICAgICAgICAgIHJlZ2lzdGVyRXM2TW9kdWxlRXhwb3J0czogZnVuY3Rpb24oCiAgICAgICAgICAgICAgcGF0aCwgZXhwb3J0cywgb3B0X2Nsb3N1cmVOYW1lc3BhY2UpIHsKICAgICAgICAgICAgaWYgKG9wdF9jbG9zdXJlTmFtZXNwYWNlKSB7CiAgICAgICAgICAgICAgZ29vZy5sb2FkZWRNb2R1bGVzX1tvcHRfY2xvc3VyZU5hbWVzcGFjZV0gPSB7CiAgICAgICAgICAgICAgICBleHBvcnRzOiBleHBvcnRzLAogICAgICAgICAgICAgICAgdHlwZTogZ29vZy5Nb2R1bGVUeXBlLkVTNiwKICAgICAgICAgICAgICAgIG1vZHVsZUlkOiBvcHRfY2xvc3VyZU5hbWVzcGFjZSB8fCAnJwogICAgICAgICAgICAgIH07CiAgICAgICAgICAgIH0KICAgICAgICAgIH0sCiAgICAgICAgICAvKiogQHR5cGUge2Z1bmN0aW9uKHN0cmluZywgPyl9ICovCiAgICAgICAgICByZWdpc3Rlckdvb2dNb2R1bGVFeHBvcnRzOiBmdW5jdGlvbihtb2R1bGVJZCwgZXhwb3J0cykgewogICAgICAgICAgICBnb29nLmxvYWRlZE1vZHVsZXNfW21vZHVsZUlkXSA9IHsKICAgICAgICAgICAgICBleHBvcnRzOiBleHBvcnRzLAogICAgICAgICAgICAgIHR5cGU6IGdvb2cuTW9kdWxlVHlwZS5HT09HLAogICAgICAgICAgICAgIG1vZHVsZUlkOiBtb2R1bGVJZAogICAgICAgICAgICB9OwogICAgICAgICAgfSwKICAgICAgICAgIGNsZWFyTW9kdWxlU3RhdGU6IGZ1bmN0aW9uKCkgewogICAgICAgICAgICBnb29nLm1vZHVsZUxvYWRlclN0YXRlXyA9IG51bGw7CiAgICAgICAgICB9LAogICAgICAgICAgZGVmZXI6IGZ1bmN0aW9uKGNhbGxiYWNrKSB7CiAgICAgICAgICAgIGlmIChsb2FkQ2FsbERvbmUpIHsKICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoCiAgICAgICAgICAgICAgICAgICdDYW5ub3QgcmVnaXN0ZXIgd2l0aCBkZWZlciBhZnRlciB0aGUgY2FsbCB0byBsb2FkLicpOwogICAgICAgICAgICB9CiAgICAgICA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mICh0aGlzLmNvbnRlbnRzXyAmJgogICAgICAgICAgZ29vZy5nbG9iYWwuQ0xPU1VSRV9JTVBPUlRfU0NSSVBUKCcnLCB0aGlzLmNvbnRlbnRzXykpIHsKICAgICAgICB0aGlzLmNvbnRlbnRzXyA9IG51bGw7CiAgICAgICAgY29udHJvbGxlci5sb2FkZWQoKTsKICAgICAgfSBlbHNlIHsKICAgICAgICBjb250cm9sbGVyLnBhdXNlKCk7CiAgICAgIH0KICAgICAgcmV0dXJuOwogICAgfQoKCiAgICB2YXIgaXNFczYgPSB0aGlzLmxvYWRGbGFnc1snbW9kdWxlJ10gPT0gZ29vZy5Nb2R1bGVUeXBlLkVTNjsKCiAgICBpZiAoIXRoaXMubGF6eUZldGNoXykgewogICAgICBmZXRjaCgpOwogICAgfQoKICAgIGZ1bmN0aW9uIGxvYWQoKSB7CiAgICAgIGlmIChkZXAubGF6eUZldGNoXykgewogICAgICAgIGZldGNoKCk7CiAgICAgIH0KCiAgICAgIGlmICghZGVwLmNvbnRlbnRzXykgewogICAgICAgIC8vIGxvYWRGaWxlU3luY18gb3IgdHJhbnNmb3JtIGFyZSByZXNwb25zaWJsZS4gQXNzdW1lIHRoZXkgbG9nZ2VkIGFuCiAgICAgICAgLy8gZXJyb3IuCiAgICAgICAgcmV0dXJuOwogICAgICB9CgogICAgICBpZiAoaXNFczYpIHsKICAgICAgICBjb250cm9sbGVyLnNldE1vZHVsZVN0YXRlKGdvb2cuTW9kdWxlVHlwZS5FUzYpOwogICAgICB9CgogICAgICB2YXIgbmFtZXNwYWNlOwoKICAgICAgdHJ5IHsKICAgICAgICB2YXIgY29udGVudHMgPSBkZXAuY29udGVudHNfOwogICAgICAgIGRlcC5jb250ZW50c18gPSBudWxsOwogICAgICAgIGdvb2cuZ2xvYmFsRXZhbChjb250ZW50cyk7CiAgICAgICAgaWYgKGlzRXM2KSB7CiAgICAgICAgICBuYW1lc3BhY2UgPSBnb29nLm1vZHVsZUxvYWRlclN0YXRlXy5tb2R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250ZW50cykgewogICAgaWYgKHRoaXMubmVlZHNUcmFuc3BpbGVfKSB7CiAgICAgIGNvbnRlbnRzID0gdGhpcy50cmFuc3BpbGVyXy50cmFuc3BpbGUoY29udGVudHMsIHRoaXMuZ2V0UGF0aE5hbWUoKSk7CiAgICB9CgogICAgaWYgKCFnb29nLkxPQURfTU9EVUxFX1VTSU5HX0VWQUwgfHwgZ29vZy5nbG9iYWwuSlNPTiA9PT0gdW5kZWZpbmVkKSB7CiAgICAgIHJldHVybiAnJyArCiAgICAgICAgICAnZ29vZy5sb2FkTW9kdWxlKGZ1bmN0aW9uKGV4cG9ydHMpIHsnICsKICAgICAgICAgICcidXNlIHN0cmljdCI7JyArIGNvbnRlbnRzICsKICAgICAgICAgICdcbicgKyAgLy8gdGVybWluYXRlIGFueSB0cmFpbGluZyBzaW5nbGUgbGluZSBjb21tZW50LgogICAgICAgICAgJztyZXR1cm4gZXhwb3J0cycgKwogICAgICAgICAgJ30pOycgKwogICAgICAgICAgJ1xuLy8jIHNvdXJjZVVSTD0nICsgdGhpcy5wYXRoICsgJ1xuJzsKICAgIH0gZWxzZSB7CiAgICAgIHJldHVybiAnJyArCiAgICAgICAgICAnZ29vZy5sb2FkTW9kdWxlKCcgKwogICAgICAgICAgZ29vZy5nbG9iYWwuSlNPTi5zdHJpbmdpZnkoCiAgICAgICAgICAgICAgY29udGVudHMgKyAnXG4vLyMgc291cmNlVVJMPScgKyB0aGlzLnBhdGggKyAnXG4nKSArCiAgICAgICAgICAnKTsnOwogICAgfQogIH07CgoKICAvKioKICAgKiBXaGV0aGVyIHRoZSBicm93c2VyIGlzIElFOSBvciBlYXJsaWVyLCB3aGljaCBuZWVkcyBzcGVjaWFsIGhhbmRsaW5nCiAgICogZm9yIGRlZmVycmVkIG1vZHVsZXMuCiAgICogQGNvbnN0IEBwcml2YXRlIHtib29sZWFufQogICAqLwogIGdvb2cuRGVidWdMb2FkZXJfLklTX09MRF9JRV8gPSAhISgKICAgICAgIWdvb2cuZ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t9LAogICAgICAgIGdsb2JhbERlZlF1ZXVlID0gW10sCiAgICAgICAgdXNlSW50ZXJhY3RpdmUgPSBmYWxzZTsKCiAgICAvL0NvdWxkIG1hdGNoIHNvbWV0aGluZyBsaWtlICcpLy9jb21tZW50JywgZG8gbm90IGxvc2UgdGhlIHByZWZpeCB0byBjb21tZW50LgogICAgZnVuY3Rpb24gY29tbWVudFJlcGxhY2UobWF0Y2gsIHNpbmdsZVByZWZpeCkgewogICAgICAgIHJldHVybiBzaW5nbGVQcmVmaXggfHwgJyc7CiAgICB9CgogICAgZnVuY3Rpb24gaXNGdW5jdGlvbihpdCkgewogICAgICAgIHJldHVybiBvc3RyaW5nLmNhbGwoaXQpID09PSAnW29iamVjdCBGdW5jdGlvbl0nOwogICAgfQoKICAgIGZ1bmN0aW9uIGlzQXJyYXkoaXQpIHsKICAgICAgICByZXR1cm4gb3N0cmluZy5jYWxsKGl0KSA9PT0gJ1tvYmplY3QgQXJyYXldJzsKICAgIH0KCiAgICAvKioKICAgICAqIEhlbHBlciBmdW5jdGlvbiBmb3IgaXRlcmF0aW5nIG92ZXIgYW4gYXJyYXkuIElmIHRoZSBmdW5jIHJldHVybnMKICAgICAqIGEgdHJ1ZSB2YWx1ZSwgaXQgd2lsbCBicmVhayBvdXQgb2YgdGhlIGxvb3AuCiAgICAgKi8KICAgIGZ1bmN0aW9uIGVhY2goYXJ5LCBmdW5jKSB7CiAgICAgICAgaWYgKGFyeSkgewogICAgICAgICAgICB2YXIgaTsKICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IGFyeS5sZW5ndGg7IGkgKz0gMSkgewogICAgICAgICAgICAgICAgaWYgKGFyeVtpXSAmJiBmdW5jKGFyeVtpXSwgaSwgYXJ5KSkgewogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQoKICAgIC8qKgogICAgICogSGVscGVyIGZ1bmN0aW9uIGZvciBpdGVyYX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gcHJvcCkpIHsKICAgICAgICAgICAgICAgIGlmIChmdW5jKG9ialtwcm9wXSwgcHJvcCkpIHsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KCiAgICAvKioKICAgICAqIFNpbXBsZSBmdW5jdGlvbiB0byBtaXggaW4gcHJvcGVydGllcyBmcm9tIHNvdXJjZSBpbnRvIHRhcmdldCwKICAgICAqIGJ1dCBvbmx5IGlmIHRhcmdldCBkb2VzIG5vdCBhbHJlYWR5IGhhdmUgYSBwcm9wZXJ0eSBvZiB0aGUgc2FtZSBuYW1lLgogICAgICovCiAgICBmdW5jdGlvbiBtaXhpbih0YXJnZXQsIHNvdXJjZSwgZm9yY2UsIGRlZXBTdHJpbmdNaXhpbikgewogICAgICAgIGlmIChzb3VyY2UpIHsKICAgICAgICAgICAgZWFjaFByb3Aoc291cmNlLCBmdW5jdGlvbiAodmFsdWUsIHByb3ApIHsKICAgICAgICAgICAgICAgIGlmIChmb3JjZSB8fCAhaGFzUHJvcCh0YXJnZXQsIHByb3ApKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKGRlZXBTdHJpbmdNaXhpbiAmJiB0eXBlb2YgdmFsdWUgPT09ICdvYmplY3QnICYmIHZhbHVlICYmCiAgICAgICAgICAgICAgICAgICAgICAgICFpc0FycmF5KHZhbHVlKSAmJiAhaXNGdW5jdGlvbih2YWx1ZSkgJiYKICAgICAgICAgICAgICAgICAgICAgICAgISh2YWx1ZSBpbnN0YW5jZW9mIFJlZ0V4cCkpIHsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghdGFyZ2V0W3Byb3BdKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YXJnZXRbcHJvcF0gPSB7fTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBtaXhpbih0YXJnZXRbcHJvcF0sIHZhbHVlLCBmb3JjZSwgZGVlcFN0cmluZ01peGluKTsKICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICB0YXJnZXRbcHJvcF0gPSB2YWx1ZTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICByZXR1cm4gdGFyZ2V0OwogICAgfQoKICAgIC8vU2ltaWxhciB0byBGdW5jdGlvbi5wcm90b3R5cGUuYmluZCwgYnV0IHRoZSAndGhpcycgb2JqZWN0IGlzIHNwZWNpZmllZAogICAgLy9maXJzdCwgc2luY2UgaXQgaXMgZWFzaWVyIHRvIHJlYWQvZmlndXJlIG91dCB3aGF0ICd0aGlzJyB3aWxsIGJlLgogICAgZnVuY3Rpb24gYmluZChvYmosIGZuKSB7CiAgICAgICAgcmV0dXJuIGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgcmV0dXJuIGZuLmFwcGx5KG9iaiwgYXJndW1lbnRzKTsKICAgICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIHNjcmlwdHMoKSB7CiAgICAgICAgcmV0dXJuIGRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKCdzY3JpcHQnKTsKICAgIH0KCiAgICBmdW5jdGlvbiBkZWZhdWx0T25FcnJvcihlcnIpIHsKICAgICAgICB0aHJvdyBlcnI7CiAgICB9CgogICAgLy9BbGxvdyBnZXR0aW5nIGEgZ2xvYmFsIHRoYXQgaXMgZXhwcmVzc2VkIGluCiAgICAvL2RvdCBub3RhdGlvbiwgbGlrZSAnYS5iLmMnLgogICAgZnVuY3Rpb24gZ2V0R2xvYmFsKHZhbHVlKSB7CiAgICAgICAgaWYgKCF2YWx1ZSkgewogICAgICAgICAgICByZXR1cm4gdmFsdWU7CiAgICAgICAgfQogICAgICAgIHZhciBnID0gZ2xvYmFsOwogICAgICAgIGVhY2godmFsdWUuc3BsaXQoJy4nKSwgZnVuY3Rpb24gKHBhcnQ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CiAgICB9CgogICAgaWYgKHR5cGVvZiByZXF1aXJlanMgIT09ICd1bmRlZmluZWQnKSB7CiAgICAgICAgaWYgKGlzRnVuY3Rpb24ocmVxdWlyZWpzKSkgewogICAgICAgICAgICAvL0RvIG5vdCBvdmVyd3JpdGUgYW4gZXhpc3RpbmcgcmVxdWlyZWpzIGluc3RhbmNlLgogICAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIGNmZyA9IHJlcXVpcmVqczsKICAgICAgICByZXF1aXJlanMgPSB1bmRlZmluZWQ7CiAgICB9CgogICAgLy9BbGxvdyBmb3IgYSByZXF1aXJlIGNvbmZpZyBvYmplY3QKICAgIGlmICh0eXBlb2YgcmVxdWlyZSAhPT0gJ3VuZGVmaW5lZCcgJiYgIWlzRnVuY3Rpb24ocmVxdWlyZSkpIHsKICAgICAgICAvL2Fzc3VtZSBpdCBpcyBhIGNvbmZpZyBvYmplY3QuCiAgICAgICAgY2ZnID0gcmVxdWlyZTsKICAgICAgICByZXF1aXJlID0gdW5kZWZpbmVkOwogICAgfQoKICAgIGZ1bmN0aW9uIG5ld0NvbnRleHQoY29udGV4dE5hbWUpIHsKICAgICAgICB2YXIgaW5DaGVja0xvYWRlZCwgTW9kdWxlLCBjb250ZXh0LCBoYW5kbGVycywKICAgICAgICAgICAgY2hlY2tMb2FkZWRUaW1lb3V0SWQsCiAgICAgICAgICAgIGNvbmZpZyA9IHsKICAgICAgICAgICAgICAgIC8vRGVmYXVsdHMuIERvIG5vdCBzZXQgYSBkZWZhdWx0IGZvciBtYXAKICAgICAgICAgICAgICAgIC8vY29uZmlnIHRvIHNwZWVkIHVwIG5vcm1hbGl6ZSgpLCB3aGljaAogICAgICAgICAgICAgICAgLy93aWxsIHJ1biBmYXN0ZXIgaWYgdGhlcmUgaXMgbm8gZGVmYXVsdC4KICAgICAgICAgICAgICAgIHdhaXRTZWNvbmRzOiA3LAogICAgICAgICAgICAgICAgYmFzZVVybDogJy4vJywKICAgICAgICAgICAgICAgIHBhdGhzOiB7fSwKICAgICAgICAgICAgICAgIGJ1bmRsZXM6IHt9LAogICAgICAgICAgICAgICAgcGtnczoge30sCiAgICAgICAgICAgICAgICBzaGltOiB7fSwKICAgICAgICAgICAgICAgIGNvbmZpZzoge30KICAgICAgICAgICAgfSwKICAgICAgICAgICAgcmVnaXN0cnkgPSB7fSwKICAgICAgICAgICAgLy9yZWdpc3RyeSBvZiBqdXN0IGVuYWJsZWQgbW9kdWxlcywgdG8gc3BlZWQKICAgICAgICAgICAgLy9jeWNsZSBicmVha2luZyBjb2RlIHdoZW4gbG90cyBvZiBtb2R1bGVzCiAgICAgICAgICAgIC8vYXJlIHJlZ2lzdGVyZWQsIGJ1dCBub3QgYWN0aXZhdGVkLgogICAgICAgICAgICBlbmFibGVkUmVnaXN0cnkgPSB7fSwKICAgICAgICAgICAgdW5kZWZFdmVudHMgPSB7fSwKICAgICAgICAgICAgZGVmUXVldWUgPSBbXSwKICAgICAgICAgICAgZGVmaW5lZCA9IHt9LAogICAgICAgICAgICB1cmxGZXRjaGVkID0ge30sCiAgICAgICAgICAgIGJ1bmRsZXNNYXAgPSB7fSwKICAgICAgICAgICAgcmVxdWlyZUNvdW50ZXIgPSAxLAogICAgICAgICAgICB1bm5vcm1hbGl6ZWRDb3VudGVyID0gMTsKCiAgICAgICAgLyoqCiAgICAgICAgICogVHJpbXMgdGhlIC4gYW5kIC4uIGZyb20gYW4gYXJyYXkgb2YgcGF0aCBzZWdtZW50cy4KICAgICAgICAgKiBJdCB3aWxsIGtlZXAgYSBsZWFkaW5nIHBhdGggc2VnbWVudCBpZiBhIC4uIHdpbGwgYmVjb21lCiAgICAgICAgICogdGhlIGZpcnN0IHBhdGggc2VnbWVudCwgdG8gaGVscCB3aXRoIG1vZHVsZSBuYW1lIGxvb2t1cHMsCiAgICAgICAgICogd2hpY2ggYWN0IGxpa2UgcGF0aHMsIGJ1dCBjYW4gYmUgcmVtYXBwZWQuIEJ1dCB0aGUgZW5kIHJlc3VsdCwKICAgICAgICAgKiBhbGwgcGF0aHMgdGhhdCB1c2UgdGhpcyBmdW5jdGlvbiBzaG91bGQgbG9vayBub3JtYWxpemVkLgogICAgICAgICAqIE5PVEU6IHRoaXMgbWV0aG9kIE1PRElGSUVTIHRoZSBpbnB1dCBhcnJheS4KICAgICAgICAgKiBAcGFyYW0ge0FycmF5fSBhcnkgdGhlIGFycmF5IG9mIHBhdGggc2VnbWVudHMuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gdHJpbURvdHMoYXJ5KSB7CiAgICAgICAgICAgIHZhciBpLCBwYXJ0OwogICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgYXJ5Lmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICBwYXJ0ID0gYXJ5W2ldOwogICAgICAgICAgICAgICAgaWYgKHBhcnQgPT09ICcuJykgewogICAgICAgICAgICAgICAgICAgIGFyeS5zcGxpY2UoaSwgMSk7CiAgICAgICAgICAgICAgICAgICAgaSAtPSAxOwogICAgICAgICAgICAgICAgfSBlbHNlIGlmIChwYXJ0ID09PSAnLi4nKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gSWYgYXQgdGhlIHN0YXJ0LCBvciBwcmV2aW91cyB2YWx1ZSBpcyBzdGlsbCAuLiwKICAgICAgICAgICAgICAgICAgICAvLyBrZWVwIHRoZW0gc28gdGhhdCB3aGVuIGNvbnZlcnRlZCB0byBhIHBhdGggaXQgbWF5CiAgICAgICAgICAgICAgICAgICAgLy8gc3RpbGwgd29yayB3aGVuIGNvbnZlcnRlZCB0byBhIHBhdGgsIGV2ZW4gdGhvdWdoCiAgICAgICAgICAgICAgICAgICAgLy8gYXMgYW4gSUQgaXQgaXMgbGVzcyB0aGFuIGlkZWFsLiBJbiBsYXJnZXIgcG9pbnQKICAgICAgICAgICAgICAgICAgICAvLyByZWxlYXNlcywgbWF5IGJlIGJldHRlciB0byBqdXN0IGtpY2sgb3V0IGFuIGVycm9yLgogICAgICAgICAgICAgICAgICAgIGlmIChpID09PSAwIHx8IChpID09PSAxICYmIGFyeVsyXSA9PT0gJy4uJykgfHwgYXJ5W2kgLSAxXSA9PT0gJy4uJykgewogICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsKICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGkgPiAwKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGFyeS5zcGxpY2UoaSAtIDEsIDIpOwogICAgICAgICAgICAgICAgICAgICAgICBpIC09IDI7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBHaXZlbiBhIHJlbGF0aXZlIG1vZHVsZSBuYW1lLCBsaWtlIC4vc29tZXRoaW5nLCBub3JtYWxpemUgaXQgdG8KICAgICAgICAgKiBhIHJlYWwgbmFtZSB0aGF0IGNhbiBiZSBtYXBwZWQgdG8gYSBwYXRoLgogICAgICAgICAqIEBwYXJhbSB7U3RyaW5nfSBuYW1lIHRoZSByZWxhdGl2ZSBuYW1lCiAgICAgICAgICogQHBhcmFtIHtTdHJpbmd9IGJhc2VOYW1lIGEgcmVhbCBuYW1lIHRoYXQgdGhlIG5hbWUgYXJnIGlzIHJlbGF0aXZlCiAgICAgICAgICogdG8uCiAgICAgICAgICogQHBhcmFtIHtCb29sZWFufSBhcHBseU1hcCBhcHBseSB0aGUgbWFwIGNvbmZpZyB0byB0aGUgdmFsdWUuIFNob3VsZAogICAgICAgICAqIG9ubHkgYmUgZG9uZSBpZiB0aGlzIG5vcm1hbGl6YXRpb24gaXMgZm9yIGEgZGVwZW5kZW5jeSBJRC4KICAgICAgICAgKiBAcmV0dXJucyB7U3RyaW5nfSBub3JtYWxpemVkIG5hbWUKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBub3JtYWxpemUobmFtZSwgYmFzZU5hbWUsIGFwcGx5TWFwKSB7CiAgICAgICAgICAgIHZhciBwa2dNYWluLCBtYXBWYWx1ZSwgbmFtZVBhcnRzLCBpLCBqLCBuYW1lU2VnbWVudCwgbGFzdEluZGV4LAogICAgICAgICAgICAgICAgZm91bmRNYXAsIGZvdW5kSSwgZm91bmRTdGFyTWFwLCBzdGFySSwgbm9ybWFsaXplZEJhc2VQYXJ0cywKICAgICAgICAgICAgICAgIGJhc2VQYXJ0cyA9IChiYXNlTmFtZSAmJiBiYXNlTmFtZS5zcGxpdCgnLycpKSwKICAgICAgICAgICAgICAgIG1hcCA9IGNvbmZpZy5tYXAsCiAgICAgICAgICAgICAgICBzdGFyTWFwID0gbWFwICYmIG1hcFsnKiddOwoKICAgICAgICAgICAgLy9BZGp1c3QgYW55IHJlbGF0aXZlIHBhdGhzLgogICAgICAgICAgICBpZiAobmFtZSkgewogICAgICAgICAgICAgICAgbmFtZSA9IG5hbWUuc3BsaXQoJy8nKTsKICAgICAgICAgICAgICAgIGxhc3RJbmRleCA9IG5hbWUubGVuZ3RoIC0gMTsKCiAgICAgICAgICAgICAgICAvLyBJZiB3YW50aW5nIG5vZGUgSUQgY29tcGF0aWJpbGl0eSwgc3RyaXAgLmpzIGZyb20gZW5kCiAgICAgICAgICAgICAgICAvLyBvZiBJRHMuIEhhdmUgdG8gZG8gdGhpcyBoZXJlLCBhbmQgbm90IGluIG5hbWVUb1VybAogICAgICAgICAgICAgICAgLy8gYmVjYXVzZSBub2RlIGFsbG93cyBlaXRoZXIgLmpzIG9yIG5vbiAuanMgdG8gbWFwCiAgICAgICAgICAgICAgICAvLyB0byBzYW1lIGZpbGUuCiAgICAgICAgICAgICAgICBpZiAoY29uZmlnLm5vZGVJZENvbXBhdCAmJiBqc1N1ZmZpeFJlZ0V4cC50ZXN0KG5hbWVbbGFzdEluZGV4XSkpIHsKICAgICAgICAgICAgICAgICAgICBuYW1lW2xhc3RJbmRleF0gPSBuYW1lW2xhc3RJbmRleF0ucmVwbGFjZShqc1N1ZmZpeFJlZ0V4cCwgJycpOwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIC8vIFN0YXJ0cyB3aXRoIGEgJy4nIHNvIG5lZWQgdGhlIGJhc2VOYW1lCiAgICAgICAgICAgICAgICBpZiAobmFtZVswXS5jaGFyQXQoMCkgPT09ICcuJyAmJiBiYXNlUGFydHMpIHsKICAgICAgICAgICAgICAgICAgICAvL0NvbnZlcnQgYmFzZU5hbWUgdG8gYXJyYXksIGFuZCBsb3Agb2ZmIHRoZSBsYXN0IHBhcnQsCiAgICAgICAgICAgICAgICAgICAgLy9zbyB0aGF0IC4gbWF0Y2hlcyB0aGF0ICdkaXJlY3RvcnknIGFuZCBub3QgbmFtZSBvZiB0aGUgYmFzZU5hbWUncwogICAgICAgICAgICAgICAgICAgIC8vbW9kdWxlLiBGb3IgaW5zdGFuY2UsIGJhc2VOYW1lIG9mICdvbmUvdHdvL3RocmVlJywgbWFwcyB0bwogICAgICAgICAgICAgICAgICAgIC8vJ29uZS90d28vdGhyZWUuanMnLCBidXQgd2Ugd2FudCB0aGUgZGlyZWN0b3J5LCAnb25lL3R3bycgZm9yCiAgICAgICAgICAgICAgICAgICAgLy90aGlzIG5vcm1hbGl6YXRpb24uCiAgICAgICAgICAgICAgICAgICAgbm9ybWFsaXplZEJhc2VQYXJ0cyA9IGJhc2VQYXJ0cy5zbGljZSgwLCBiYXNlUGFydHMubGVuZ3RoIC0gMSk7CiAgICAgICAgICAgICAgICAgICAgbmFtZSA9IG5vcm1hbGl6ZWRCYXNlUGFydHMuY29uY2F0KG5hbWUpOwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIHRyaW1Eb3RzKG5hbWUpOwogICAgICAgICAgICAgICAgbmFtZSA9IG5hbWUuam9pbignLycpOwogICAgICAgICAgICB9CgogICAgICAgICAgICAvL0FwcGx5IG1hcCBjb25maWcgaWYgYXZhaWxhYmxlLgogICAgICAgICAgICBpZiAoYXBwbHlNYXAgJiYgbWFwICYmIChiYXNlUGFydHMgfHwgc3Rhck1hcCkpIHsKICAgICAgICAgICAgICAgIG5hbWVQYXJ0cyA9IG5hbWUuc3BsaXQoJy8nKTsKCiAgICAgICAgICAgICAgICBvdXRlckxvb3A6IGZvciAoaSA9IG5hbWVQYXJ0cy5sZW5ndGg7IGkgPiAwOyBpIC09IDEpIHsKICAgICAgICAgICAgICAgICAgICBuYW1lU2VnbWVudCA9IG5hbWVQYXJ0cy5zbGljZSgwLCBpKS5qb2luKCcvJyk7CgogICAgICAgICAgICAgICAgICAgIGlmIChiYXNlUGFydHMpIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy9GaW5kIHRoZSBsb25nZXN0IGJhc2VOYW1lIHNlZ21lbnQgbWF0Y2ggaW4gdGhlIGNvbmZpZy4KICAgICAgICAgICAgICAgICAgICAgICAgLy9TbywgZG8gam9pbnMgb24gdGhlIGJpZ2dlc3QgdG8gc21hbGxlc3QgbGVuZ3RocyBvZiBiYXNlUGFydHMuCiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoaiA9IGJhc2VQYXJ0cy5sZW5ndGg7IGogPiAwOyBqIC09IDEpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcFZhbHVlID0gZ2V0T3duKG1hcCwgYmFzZVBhcnRzLnNsaWNlKDAsIGopLmpvaW4oJy8nKSk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9iYXNlTmFtZSBzZWdtZW50IGhhcyBjb25maWcsIGZpbmQgaWYgaXQgaGFzIG9uZSBmb3IKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vdGhpcyBuYW1lLgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG1hcFZhbHVlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFwVmFsdWUgPSBnZXRPd24obWFwVmFsdWUsIG5hbWVTZWdtZW50KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobWFwVmFsdWUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9NYXRjaCwgdXBkYXRlIG5hbWUgdG8gdGhlIG5ldyB2YWx1ZS4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm91bmRNYXAgPSBtYXBWYWx1ZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm91bmRJID0gaTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWsgb3V0ZXJMb29wOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgLy9DaGVjayBmb3IgYSBzdGFyIG1hcCBtYXRjaCwgYnV0IGp1c3QgaG9sZCBvbiB0byBpdCwKICAgICAgICAgICAgICAgICAgICAvL2lmIHRoZXJlIGlzIGEgc2hvcnRlciBzZWdtZW50IG1hdGNoIGxhdGVyIGluIGEgbWF0Y2hpbmcKICAgICAgICAgICAgICAgICAgICAvL2NvbmZpZywgdGhlbiBmYXZvciBvdmVyIHRoaXMgc3RhciBtYXAuCiAgICAgICAgICAgICAgICAgICAgaWYgKCFmb3VuZFN0YXJNYXAgJiYgc3Rhck1hcCAmJiBnZXRPd24oc3Rhck1hcCwgbmFtZVNlZ21lbnQpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGZvdW5kU3Rhck1hcCA9IGdldE93bihzdGFyTWFwLCBuYW1lU2VnbWVudCk7CiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXJJID0gaTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgaWYgKCFmb3VuZE1hcCAmJiBmb3VuZFN0YXJNYXApIHsKICAgICAgICAgICAgICAgICAgICBmb3VuZE1hcCA9IGZvdW5kU3Rhck1hcDsKICAgICAgICAgICAgICAgICAgICBmb3VuZEkgPSBzdGFySTsKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBpZiAoZm91bmRNYXApIHsKICAgICAgICAgICAgICAgICAgICBuYW1lUGFydHMuc3BsaWNlKDAsIGZvdW5kSSwgZm91bmRNYXApOwogICAgICAgICAgICAgICAgICAgIG5hbWUgPSBuYW1lUGFydHMuam9pbignLycpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CgogICAgICAgICAgICAvLyBJZiB0aGUgbmFtZSBwb2ludHMgdG8gYSBwYWNrYWdlJ3MgbmFtZSwgdXNlCiAgICAgICAgICAgIC8vIHRoZSBwYWNrYWdlIG1haW4gaW5zdGVhZC4KICAgICAgICAgICAgcGtnTWFpbiA9IGdldE93bihjb25maWcucGtncywgbmFtZSk7CgogICAgICAgICAgICByZXR1cm4gcGtnTWFpbiA/IHBrZ01haW4gOiBuYW1lOwogICAgICAgIH0KCiAgICAgICAgZnVuY3Rpb24gcmVtb3ZlU2NyaXB0KG5hbWUpIHsKICAgICAgICAgICAgaWYgKGlzQnJvd3NlcikgewogICAgICAgICAgICAgICAgZWFjaChzY3JpcHRzKCksIGZ1bmN0aW9uIChzY3JpcHROb2RlKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKHNjcmlwdE5vZGUuZ2V0QXR0cmlidXRlKCdkYXRhLXJlcXVpcmVtb2R1bGUnKSA9PT0gbmFtZSAmJgogICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NyaXB0Tm9kZS5nZXRBdHRyaWJ1dGUoJ2RhdGEtcmVxdWlyZWNvbnRleHQnKSA9PT0gY29udGV4dC5jb250ZXh0TmFtZSkgewogICAgICAgICAgICAgICAgICAgICAgICBzY3JpcHROb2RlLnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQoc2NyaXB0Tm9kZSk7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICBmdW5jdGlvbiBoYXNQYXRoRmFsbGJhY2soaWQpIHsKICAgICAgICAgICAgdmFyIHBhdGhDb25maWcgPSBnZXRPd24oY29uZmlnLnBhdGhzLCBpZCk7CiAgICAgICAgICAgIGlmIChwYXRoQ29uZmlnICYmIGlzQXJyYXkocGF0aENvbmZpZykgJiYgcGF0aENvbmZpZy5sZW5ndGggPiAxKSB7CiAgICAgICAgICAgICAgICAvL1BvcCBvZmYgdGhlIGZpcnN0IGFycmF5IHZhbHVlLCBzaW5jZSBpdCBmYWlsZWQsIGFuZAogICAgICAgICAgICAgICAgLy9yZXRyeQogICAgICAgICAgICAgICAgcGF0aENvbmZpZy5zaGlmdCgpOwogICAgICAgICAgICAgICAgY29udGV4dC5yZXF1aXJlLnVuZGVmKGlkKTsKCiAgICAgICAgICAgICAgICAvL0N1c3RvbSByZXF1aXJlIHRoYXQgZG9lcyBub3QgZG8gbWFwIHRyYW5zbGF0aW9uLCBzaW5jZQogICAgICAgICAgICAgICAgLy9JRCBpcyAiYWJzb2x1dGUiLCBhbHJlYWR5IG1hcHBlZC9yZXNvbHZlZC4KICAgICAgICAgICAgICAgIGNvbnRleHQubWFrZVJlcXVpcmUobnVsbCwgewogICAgICAgICAgICAgICAgICAgIHNraXBNYXA6IHRydWUKICAgICAgICAgICAgICAgIH0pKFtpZF0pOwoKICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICAvL1R1cm5zIGEgcGx1Z2luIXJlc291cmNlIHRvIFtwbHVnaW4sIHJlc291cmNlXQogICAgICAgIC8vd2l0aCB0aGUgcGx1Z2luIGJlaW5nIHVuZGVmaW5lZCBpZiB0aGUgbmFtZQogICAgICAgIC8vZGlkIG5vdCBoYXZlIGEgcGx1Z2luIHByZWZpeC4KICAgICAgICBmdW5jdGlvbiBzcGxpdFByZWZpeChuYW1lKSB7CiAgICAgICAgICAgIHZhciBwcmVmaXgsCiAgICAgICAgICAgICAgICBpbmRleCA9IG5hbW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GUgSUQuCiAgICAgICAgICogU2hvdWxkIG9ubHkgYmUgdHJ1ZSBpZiB0aGlzIG1hcCBpcyBmb3IgYSBkZXBlbmRlbmN5LgogICAgICAgICAqCiAgICAgICAgICogQHJldHVybnMge09iamVjdH0KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBtYWtlTW9kdWxlTWFwKG5hbWUsIHBhcmVudE1vZHVsZU1hcCwgaXNOb3JtYWxpemVkLCBhcHBseU1hcCkgewogICAgICAgICAgICB2YXIgdXJsLCBwbHVnaW5Nb2R1bGUsIHN1ZmZpeCwgbmFtZVBhcnRzLAogICAgICAgICAgICAgICAgcHJlZml4ID0gbnVsbCwKICAgICAgICAgICAgICAgIHBhcmVudE5hbWUgPSBwYXJlbnRNb2R1bGVNYXAgPyBwYXJlbnRNb2R1bGVNYXAubmFtZSA6IG51bGwsCiAgICAgICAgICAgICAgICBvcmlnaW5hbE5hbWUgPSBuYW1lLAogICAgICAgICAgICAgICAgaXNEZWZpbmUgPSB0cnVlLAogICAgICAgICAgICAgICAgbm9ybWFsaXplZE5hbWUgPSAnJzsKCiAgICAgICAgICAgIC8vSWYgbm8gbmFtZSwgdGhlbiBpdCBtZWFucyBpdCBpcyBhIHJlcXVpcmUgY2FsbCwgZ2VuZXJhdGUgYW4KICAgICAgICAgICAgLy9pbnRlcm5hbCBuYW1lLgogICAgICAgICAgICBpZiAoIW5hbWUpIHsKICAgICAgICAgICAgICAgIGlzRGVmaW5lID0gZmFsc2U7CiAgICAgICAgICAgICAgICBuYW1lID0gJ19AcicgKyAocmVxdWlyZUNvdW50ZXIgKz0gMSk7CiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIG5hbWVQYXJ0cyA9IHNwbGl0UHJlZml4KG5hbWUpOwogICAgICAgICAgICBwcmVmaXggPSBuYW1lUGFydHNbMF07CiAgICAgICAgICAgIG5hbWUgPSBuYW1lUGFydHNbMV07CgogICAgICAgICAgICBpZiAocHJlZml4KSB7CiAgICAgICAgICAgICAgICBwcmVmaXggPSBub3JtYWxpemUocHJlZml4LCBwYXJlbnROYW1lLCBhcHBseU1hcCk7CiAgICAgICAgICAgICAgICBwbHVnaW5Nb2R1bGUgPSBnZXRPd24oZGVmaW5lZCwgcHJlZml4KTsKICAgICAgICAgICAgfQoKICAgICAgICAgICAgLy9BY2NvdW50IGZvciByZWxhdGl2ZSBwYXRocyBpZiB0aGVyZSBpcyBhIGJhc2UgbmFtZS4KICAgICAgICAgICAgaWYgKG5hbWUpIHsKICAgICAgICAgICAgICAgIGlmIChwcmVmaXgpIHsKICAgICAgICAgICAgICAgICAgICBpZiAoaXNOb3JtYWxpemVkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG5vcm1hbGl6ZWROYW1lID0gbmFtZTsKICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHBsdWdpbk1vZHVsZSAmJiBwbHVnaW5Nb2R1bGUubm9ybWFsaXplKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vUGx1Z2luIGlzIGxvYWRlZCwgdXNlIGl0cyBub3JtYWxpemUgbWV0aG9kLgogICAgICAgICAgICAgICAgICAgICAgICBub3JtYWxpemVkTmFtZSA9IHBsdWdpbk1vZHVsZS5ub3JtYWxpemUobmFtZSwgZnVuY3Rpb24gKG5hbWUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBub3JtYWxpemUobmFtZSwgcGFyZW50TmFtZSwgYXBwbHlNYXApOwogICAgICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAvLyBJZiBuZXN0ZWQgcGx1Z2luIHJlZmVyZW5jZXMsIHRoZW4gZG8gbm90IHRyeSB0bwogICAgICAgICAgICAgICAgICAgICAgICAvLyBub3JtYWxpemUsIGFzIGl0IHdpbGwgbm90IG5vcm1hbGl6ZSBjb3JyZWN0bHkuIFRoaXMKICAgICAgICAgICAgICAgICAgICAgICAgLy8gcGxhY2VzIGEgcmVzdHJpY3Rpb24gb24gcmVzb3VyY2VJZHMsIGFuZCB0aGUgbG9uZ2VyCiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHRlcm0gc29sdXRpb24gaXMgbm90IHRvIG5vcm1hbGl6ZSB1bnRpbCBwbHVnaW5zIGFyZQogICAgICAgICAgICAgICAgICAgICAgICAvLyBsb2FkZWQgYW5kIGFsbCBub3JtYWxpemF0aW9ucyB0byBhbGxvdyBmb3IgYXN5bmMKICAgICAgICAgICAgICAgICAgICAgICAgLy8gbG9hZGluZyBvZiBhIGxvYWRlciBwbHVnaW4uIEJ1dCBmb3Igbm93LCBmaXhlcyB0aGUKICAgICAgICAgICAgICAgICAgICAgICAgLy8gY29tbW9uIHVzZXMuIERldGFpbHMgaW4gIzExMzEKICAgICAgICAgICAgICAgICAgICAgICAgbm9ybWFsaXplZE5hbWUgPSBuYW1lLmluZGV4T2YoJyEnKSA9PT0gLTEgPwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vcm1hbGl6ZShuYW1lLCBwYXJlbnROYW1lLCBhcHBseU1hcCkgOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAvL0EgcmVndWxhciBtb2R1bGUuCiAgICAgICAgICAgICAgICAgICAgbm9ybWFsaXplZE5hbWUgPSBub3JtYWxpemUobmFtZSwgcGFyZW50TmFtZSwgYXBwbHlNYXApOwoKICAgICAgICAgICAgICAgICAgICAvL05vcm1hbGl6ZWQgbmFtZSBtYXkgYmUgYSBwbHVnaW4gSUQgZHVlIHRvIG1hcCBjb25maWcKICAgICAgICAgICAgICAgICAgICAvL2FwcGxpY2F0aW9uIGluIG5vcm1hbGl6ZS4gVGhlIG1hcCBjb25maWcgdmFsdWVzIG11c3QKICAgICAgICAgICAgICAgICAgICAvL2FscmVhZHkgYmUgbm9ybWFsaXplZCwgc28gZG8gbm90IG5lZWQgdG8gcmVkbyB0aGF0IHBhcnQuCiAgICAgICAgICAgICAgICAgICAgbmFtZVBhcnRzID0gc3BsaXRQcmVmaXgobm9ybWFsaXplZE5hbWUpOwogICAgICAgICAgICAgICAgICAgIHByZWZpeCA9IG5hbWVQYXJ0c1swXTsKICAgICAgICAgICAgICAgICAgICBub3JtYWxpemVkTmFtZSA9IG5hbWVQYXJ0c1sxXTsKICAgICAgICAgICAgICAgICAgICBpc05vcm1hbGl6ZWQgPSB0cnVlOwoKICAgICAgICAgICAgICAgICAgICB1cmwgPSBjb250ZXh0Lm5hbWVUb1VybChub3JtYWxpemVkTmFtZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIC8vSWYgdGhlIGlkIGlzIGEgcGx1Z2luIGlkIHRoYXQgY2Fubm90IGJlIGRldGVybWluZWQgaWYgaXQgbmVlZHMKICAgICAgICAgICAgLy9ub3JtYWxpemF0aW9uLCBzdGFtcCBpdCB3aXRoIGEgdW5pcXVlIElEIHNvIHR3byBtYXRjaGluZyByZWxhdGl2ZQogICAgICAgICAgICAvL2lkcyB0aGF0IG1heSBjb25mbGljdCBjYW4gYmUgc2VwYXJhdGUuCiAgICAgICAgICAgIHN1ZmZpeCA9IHByZWZpeCAmJiAhcGx1Z2luTW9kdWxlICYmICFpc05vcm1hbGl6ZWQgPwogICAgICAgICAgICAgICAgICAgICAnX3Vubm9ybWFsaXplZCcgKyAodW5ub3JtYWxpemVkQ291bnRlciArPSAxKSA6CiAgICAgICAgICAgICAgICAgICAgICcnOwoKICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIHByZWZpeDogcHJlZml4LAogICAgICAgICAgICAgICAgbmFtZTogbm9ybWFsaXplZE5hbWUsCiAgICAgICAgICAgICAgICBwYXJlbnRNYXA6IHBhcmVudE1vZHVsZU1hcCwKICAgICAgICAgICAgICAgIHVubm9ybWFsaXplZDogISFzdWZmaXgsCiAgICAgICAgICAgICAgICB1cmw6IHVybCwKICAgICAgICAgICAgICAgIG9yaWdpbmFsTmFtZTogb3JpZ2luYWxOYW1lLAogICAgICAgICAgICAgICAgaXNEZWZpbmU6IGlzRGVmaW5lLAogICAgICAgICAgICAgICAgaWQ6IChwcmVmaXggPwogICAgICAgICAgICAgICAgICAgICAgICBwcmVmaXggKyAnIScgKyBub3JtYWxpemVkTmFtZSA6CiAgICAgICAgICAgICAgICAgICAgICAgIG5vcm1hbGl6ZWROYW1lKSArIHN1ZmZpeAogICAgICAgICAgICB9OwogICAgICAgIH0KCiAgICAgICAgZnVuY3Rpb24gZ2V0TW9kdWxlKGRlcE1hcCkgewogICAgICAgICAgICB2YXIgaWQgPSBkZXBNYXAuaWQsCiAgICAgICAgICAgICAgICBtb2QgPSBnZXRPd24ocmVnaXN0cnksIGlkKTsKCiAgICAgICAgICAgIGlmICghbW9kKSB7CiAgICAgICAgICAgICAgICBtb2QgPSByZWdpc3RyeVtpZF0gPSBuZXcgY29udGV4dC5Nb2R1bGUoZGVwTWFwKTsKICAgICAgICAgICAgfQoKICAgICAgICAgICAgcmV0dXJuIG1vZDsKICAgICAgICB9CgogICAgICAgIGZ1bmN0aW9uIG9uKGRlcE1hcCwgbmFtZSwgZm4pIHsKICAgICAgICAgICAgdmFyIGlkID0gZGVwTWFwLmlkLAogICAgICAgICAgICAgICAgbW9kID0gZ2V0T3duKHJlZ2lzdHJ5LCBpZCk7CgogICAgICAgICAgICBpZiAoaGFzUHJvcChkZWZpbmVkLCBpZCkgJiYKICAgICAgICAgICAgICAgICAgICAoIW1vZCB8fCBtb2QuZGVmaW5lRW1pdENvbXBsZXRlKSkgewogICAgICAgICAgICAgICAgaWYgKG5hbWUgPT09ICdkZWZpbmVkJykgewogICAgICAgICAgICAgICAgICAgIGZuKGRlZmluZWRbaWRdKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIG1vZCA9IGdldE1vZHVsZShkZXBNYXApOwogICAgICAgICAgICAgICAgaWYgKG1vZC5lcnJvciAmJiBuYW1lID09PSAnZXJyb3InKSB7CiAgICAgICAgICAgICAgICAgICAgZm4obW9kLmVycm9yKTsKICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgbW9kLm9uKG5hbWUsIGZuKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgZnVuY3Rpb24gb25FcnJvcihlcnIsIGVycmJhY2spIHsKICAgICAgICAgICAgdmFyIGlkcyA9IGVyci5yZXF1aXJlTW9kdWxlcywKICAgICAgICAgICAgICAgIG5vdGlmaWVkID0gZmFsc2U7CgogICAgICAgICAgICBpZiAoZXJyYmFjaykgewogICAgICAgICAgICAgICAgZXJyYmFjayhlcnIpOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgZWFjaChpZHMsIGZ1bmN0aW9uIChpZCkgewogICAgICAgICAgICAgICAgICAgIHZhciBtb2QgPSBnZXRPd24ocmVnaXN0cnksIGlkKTsKICAgICAgICAgICAgICAgICAgICBpZiAobW9kKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vU2V0IGVycm9yIG9uIG1vZHVsZSwgc28gaXQgc2tpcHMgdGltZW91dCBjaGVja3MuCiAgICAgICAgICAgICAgICAgICAgICAgIG1vZC5lcnJvciA9IGVycjsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG1vZC5ldmVudHMuZXJyb3IpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vdGlmaWVkID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1vZC5lbWl0KCdlcnJvcicsIGVycik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KTsKCiAgICAgICAgICAgICAgICBpZiAoIW5vdGlmaWVkKSB7CiAgICAgICAgICAgICAgICAgICAgcmVxLm9uRXJyb3IoZXJyKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogSW50ZXJuYWwgbWV0aG9kIHRvIHRyYW5zZmVyIGdsb2JhbFF1ZXVlIGl0ZW1zIHRvIHRoaXMgY29udGV4dCdzCiAgICAgICAgICogZGVmUXVldWUuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gdGFrZUdsb2JhbFF1ZXVlKCkgewogICAgICAgICAgICAvL1B1c2ggYWxsIHRoZSBnbG9iYWxEZWZRdWV1ZSBpdGVtcyBpbnRvIHRoZSBjb250ZXh0J3MgZGVmUXVldWUKICAgICAgICAgICAgaWYgKGdsb2JhbERlZlF1ZXVlLmxlbmd0aCkgewogICAgICAgICAgICAgICAgZWFjaChnbG9iYWxEZWZRdWV1ZSwgZnVuY3Rpb24ocXVldWVJdGVtKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIGlkID0gcXVldWVJdGVtWzBdOwogICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgaWQgPT09ICdzdHJpbmcnKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRleHQuZGVmUXVldWVNYXBbaWRdID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZGVmUXVldWUucHVzaChxdWV1ZUl0ZW0pOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBnbG9iYWxEZWZRdWV1ZSA9IFtdOwogICAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICBoYW5kbGVycyA9IHsKICAgICAgICAgICAgJ3JlcXVpcmUnOiBmdW5jdGlvbiAobW9kKSB7CiAgICAgICAgICAgICAgICBpZiAobW9kLnJlcXVpcmUpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gbW9kLnJlcXVpcmU7CiAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgIHJldHVybiAobW9kLnJlcXVpcmUgPSBjb250ZXh0Lm1ha2VSZXF1aXJlKG1vZC5tYXApKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSwKICAgICAgICAgICAgJ2V4cG9ydHMnOiBmdW5jdGlvbiAobW9kKSB7CiAgICAgICAgICAgICAgICBtb2QudXNpbmdFeHBvcnRzID0gdHJ1ZTsKICAgICAgICAgICAgICAgIGlmIChtb2QubWFwLmlzRGVmaW5lKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKG1vZC5leHBvcnRzKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAoZGVmaW5lZFttb2QubWFwLmlkXSA9IG1vZC5leHBvcnRzKTsKICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gKG1vZC5leHBvcnRzID0gZGVmaW5lZFttb2QubWFwLmlkXSA9IHt9KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0sCiAgICAgICAgICAgICdtb2R1bGUnOiBmdW5jdGlvbiAobW9kKSB7CiAgICAgICAgICAgICAgICBpZiAobW9kLm1vZHVsZSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBtb2QubW9kdWxlOwogICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gKG1vZC5tb2R1bGUgPSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBtb2QubWFwLmlkLAogICAgICAgICAgICAgICAgICAgICAgICB1cmk6IG1vZC5tYXAudXJsLAogICAgICAgICAgICAgICAgICAgICAgICBjb25maWc6IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBnZXRPd24oY29uZmlnLmNvbmZpZywgbW9kLm1hcC5pZCkgfHwge307CiAgICAgICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgICAgIGV4cG9ydHM6IG1vZC5leHBvcnRzIHx8IChtb2QuZXhwb3J0cyA9IHt9KQogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfTsKCiAgICAgICAgZnVuY3Rpb24gY2xlYW5SZWdpc3RyeShpZCkgewogICAgICAgICAgICAvL0NsZWFuIHVwIG1hY2hpbmVyeSB1c2VkIGZvciB3YWl0aW5nIG1vZHVsZXMuCiAgICAgICAgICAgIGRlbGV0ZSByZWdpc3RyeVtpZF07CiAgICAgICAgICAgIGRlbGV0ZSBlbmFibGVkUmVnaXN0cnlbaWRdOwogICAgICAgIH0KCiAgICAgICAgZnVuY3Rpb24gYnJlYWtDeWNsZShtb2QsIHRyYWNlZCwgcHJvY2Vzc2VkKSB7CiAgICAgICAgICAgIHZhciBpZCA9IG1vZC5tYXAuaWQ7CgogICAgICAgICAgICBpZiAobW9kLmVycm9yKSB7CiAgICAgICAgICAgICAgICBtb2QuZW1pdCgnZXJyb3InLCBtb2QuZXJyb3IpOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgdHJhY2VkW2lkXSA9IHRydWU7CiAgICAgICAgICAgICAgICBlYWNoKG1vZC5kZXBNYXBzLCBmdW5jdGlvbiAoZGVwTWFwLCBpKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIGRlcElkID0gZGVwTWFwLmlkLAogICAgICAgICAgICAgICAgICAgICAgICBkZXAgPSBnZXRPd24ocmVnaXN0cnksIGRlcElkKTsKCiAgICAgICAgICAgICAgICAgICAgLy9Pbmx5IGZvcmNlIHRoaW5ncyB0aGF0IGhhdmUgbm90IGNvbXBsZXRlZAogICAgICAgICAgICAgICAgICAgIC8vYmVpbmcgZGVmaW5lZCwgc28gc3RpbGwgaW4gdGhlIHJlZ2lzdHJ5LAogICAgICAgICAgICAgICAgICAgIC8vYW5kIG9ubHkgaWYgaXQgaGFzIG5vdCBiZWVuIG1hdGNoZWQgdXAKICAgICAgICAgICAgICAgICAgICAvL2luIHRoZSBtb2R1bGUgYWxyZWFkeS4KICAgICAgICAgICAgICAgICAgICBpZiAoZGVwICYmICFtb2QuZGVwTWF0Y2hlZFtpXSAmJiAhcHJvY2Vzc2VkW2RlcElkXSkgewogICAgICAgICAgICAgICAgICAgICAgICBpZiAoZ2V0T3duKHRyYWNlZCwgZGVwSWQpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtb2QuZGVmaW5lRGVwKGksIGRlZmluZWRbZGVwSWRdKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1vZC5jaGVjaygpOyAvL3Bhc3MgZmFsc2U/CiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVha0N5Y2xlKGRlcCwgdHJhY2VkLCBwcm9jZXNzZWQpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBwcm9jZXNzZWRbaWRdID0gdHJ1ZTsKICAgICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgZnVuY3Rpb24gY2hlY2tMb2FkZWQoKSB7CiAgICAgICAgICAgIHZhciBlcnIsIHVzaW5nUGF0aEZhbGxiYWNrLAogICAgICAgICAgICAgICAgd2FpdEludGVydmFsID0gY29uZmlnLndhaXRTZWNvbmRzICogMTAwMCwKICAgICAgICAgICAgICAgIC8vSXQgaXMgcG9zc2libGUgdG8gZGlzYWJsZSB0aGUgd2FpdCBpbnRlcnZhbCBieSB1c2luZyB3YWl0U2Vjb25kcyBvZiAwLgogICAgICAgICAgICAgICAgZXhwaXJlZCA9IHdhaXRJbnRlcnZhbCAmJiAoY29udGV4dC5zdGFydFRpbWUgKyB3YWl0SW50ZXJ2YWwpIDwgbmV3IERhdGUoKS5nZXRUaW1lKCksCiAgICAgICAgICAgICAgICBub0xvYWRzID0gW10sCiAgICAgICAgICAgICAgICByZXFDYWxscyA9IFtdLAogICAgICAgICAgICAgICAgc3RpbGxMb2FkaW5nID0gZmFsc2UsCiAgICAgICAgICAgICAgICBuZWVkQ3ljbGVDaGVjayA9IHRydWU7CgogICAgICAgICAgICAvL0RvIG5vdCBib3RoZXIgaWYgdGhpcyBjYWxsIHdhcyBhIHJlc3VsdCBvZiBhIGN5Y2xlIGJyZWFrLgogICAgICAgICAgICBpZiAoaW5DaGVja0xvYWRlZCkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CgogICAgICAgICAgICBpbkNoZWNrTG9hZGVkID0gdHJ1ZTsKCiAgICAgICAgICAgIC8vRmlndXJlIG91dCB0aGUgc3RhdGUgb2YgYWxsIHRoZSBtb2R1bGVzLgogICAgICAgICAgICBlYWNoUHJvcChlbmFibGVkUmVnaXN0cnksIGZ1bmN0aW9uIChtb2QpIHsKICAgICAgICAgICAgICAgIHZhciBtYXAgPSBtb2QubWFwLAogICAgICAgICAgICAgICAgICAgIG1vZElkID0gbWFwLmlkOwoKICAgICAgICAgICAgICAgIC8vU2tpcCB0aGluZ3MgdGhhdCBhcmUgbm90IGVuYWJsZWQgb3IgaW4gZXJyb3Igc3RhdGUuCiAgICAgICAgICAgICAgICBpZiAoIW1vZC5lbmFibGVkKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIGlmICghbWFwLmlzRGVmaW5lKSB7CiAgICAgICAgICAgICAgICAgICAgcmVxQ2FsbHMucHVzaChtb2QpOwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIGlmICghbW9kLmVycm9yKSB7CiAgICAgICAgICAgICAgICAgICAgLy9JZiB0aGUgbW9kdWxlIHNob3VsZCBiZSBleGVjdXRlZCwgYW5kIGl0IGhhcyBub3QKICAgICAgICAgICAgICAgICAgICAvL2JlZW4gaW5pdGVkIGFuZCB0aW1lIGlzIHVwLCByZW1lbWJlciBpdC4KICAgICAgICAgICAgICAgICAgICBpZiAoIW1vZC5pbml0ZWQgJiYgZXhwaXJlZCkgewogICAgICAgICAgICAgICAgICAgICAgICBpZiAoaGFzUGF0aEZhbGxiYWNrKG1vZElkKSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdXNpbmdQYXRoRmFsbGJhY2sgPSB0cnVlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RpbGxMb2FkaW5nID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vTG9hZHMucHVzaChtb2RJZCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZW1vdmVTY3JpcHQobW9kSWQpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICghbW9kLmluaXRlZCAmJiBtb2QuZmV0Y2hlZCAmJiBtYXAuaXNEZWZpbmUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgc3RpbGxMb2FkaW5nID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFtYXAucHJlZml4KSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL05vIHJlYXNvbiB0byBrZWVwIGxvb2tpbmcgZm9yIHVuZmluaXNoZWQKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vbG9hZGluZy4gSWYgdGhlIG9ubHkgc3RpbGxMb2FkaW5nIGlzIGEKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vcGx1Z2luIHJlc291cmNlIHRob3VnaCwga2VlcCBnb2luZywKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vYmVjYXVzZSBpdCBtYXkgYmUgdGhhdCBhIHBsdWdpbiByZXNvdXJjZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9pcyB3YWl0aW5nIG9uIGEgbm9uLXBsdWdpbiBjeWNsZS4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAobmVlZEN5Y2xlQ2hlY2sgPSBmYWxzZSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwoKICAgICAgICAgICAgaWYgKGV4cGlyZWQgJiYgbm9Mb2Fkcy5sZW5ndGgpIHsKICAgICAgICAgICAgICAgIC8vSWYgd2FpdCB0aW1lIGV4cGlyZWQsIHRocm93IGVycm9yIG9mIHVubG9hZGVkIG1vZHVsZXMuCiAgICAgICAgICAgICAgICBlcnIgPSBtYWtlRXJyb3IoJ3RpbWVvdXQnLCAnTG9hZCB0aW1lb3V0IGZvciBtb2R1bGVzOiAnICsgbm9Mb2FkcywgbnVsbCwgbm9Mb2Fkcyk7CiAgICAgICAgICAgICAgICBlcnIuY29udGV4dE5hbWUgPSBjb250ZXh0LmNvbnRleHROYW1lOwogICAgICAgICAgICAgICAgcmV0dXJuIG9uRXJyb3IoZXJyKTsKICAgICAgICAgICAgfQoKICAgICAgICAgICAgLy9Ob3QgZXhwaXJlZCwgY2hlY2sgZm9yIGEgY3ljbGUuCiAgICAgICAgICAgIGlmIChuZWVkQ3ljbGVDaGVjaykgewogICAgICAgICAgICAgICAgZWFjaChyZXFDYWxscywgZnVuY3Rpb24gKG1vZCkgewogICAgICAgICAgICAgICAgICAgIGJyZWFrQ3ljbGUobW9kLCB7fSwge30pOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIC8vSWYgc3RpbGwgd2FpdGluZyBvbiBsb2FkcywgYW5kIHRoZSB3YWl0aW5nIGxvYWQgaXMgc29tZXRoaW5nCiAgICAgICAgICAgIC8vb3RoZXIgdGhhbiBhIHBsdWdpbiByZXNvdXJjZSwgb3IgdGhlcmUgYXJlIHN0aWxsIG91dHN0YW5kaW5nCiAgICAgICAgICAgIC8vc2NyaXB0cywgdGhlbiBqdXN0IHRyeSBiYWNrIGxhdGVyLgogICAgICAgICAgICBpZiAoKCFleHBpcmVkIHx8IHVzaW5nUGF0aEZhbGxiYWNrKSAmJiBzdGlsbExvYWRpbmcpIHsKICAgICAgICAgICAgICAgIC8vU29tZXRoaW5nIGlzIHN0aWxsIHdhaXRpbmcgdG8gbG9hZC4gV2FpdCBmb3IgaXQsIGJ1dCBvbmx5CiAgICAgICAgICAgICAgICAvL2lmIGEgdGltZW91dCBpcyBub3QgYWxyZWFkeSBpbiBlZmZlY3QuCiAgICAgICAgICAgICAgICBpZiAoKGlzQnJvd3NlciB8fCBpc1dlYldvcmtlcikgJiYgIWNoZWNrTG9hZGVkVGltZW91dElkKSB7CiAgICAgICAgICAgICAgICAgICAgY2hlY2tMb2FkZWRUaW1lb3V0SWQgPSBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgICAgICAgICAgY2hlY2tMb2FkZWRUaW1lb3V0SWQgPSAwOwogICAgICAgICAgICAgICAgICAgICAgICBjaGVja0xvYWRlZCgpOwogICAgICAgICAgICAgICAgICAgIH0sIDUwKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQoKICAgICAgICAgICAgaW5DaGVja0xvYWRlZCA9IGZhbHNlOwogICAgICAgIH0KCiAgICAgICAgTW9kdWxlID0gZnVuY3Rpb24gKG1hcCkgewogICAgICAgICAgICB0aGlzLmV2ZW50cyA9IGdldE93bih1bmRlZkV2ZW50cywgbWFwLmlkKSB8fCB7fTsKICAgICAgICAgICAgdGhpcy5tYXAgPSBtYXA7CiAgICAgICAgICAgIHRoaXMuc2hpbSA9IGdldE93bihjb25maWcuc2hpbSwgbWFwLmlkKTsKICAgICAgICAgICAgdGhpcy5kZXBFeHBvcnRzID0gW107CiAgICAgICAgICAgIHRoaXMuZGVwTWFwcyA9IFtdOwogICAgICAgICAgICB0aGlzLmRlcE1hdGNoZWQgPSBbXTsKICAgICAgICAgICAgdGhpcy5wbHVnaW5NYXBzID0ge307CiAgICAgICAgICAgIHRoaXMuZGVwQ291bnQgPSAwOwoKICAgICAgICAgICAgLyogdGhpcy5leHBvcnRzIHRoaXMuZmFjdG9yeQogICAgICAgICAgICAgICB0aGlzLmRlcE1hcHMgPSBbXSwKICAgICAgICAgICAgICAgdGhpcy5lbmFibGVkLCB0aGlzLmZldGNoZWQKICAgICAgICAgICAgKi8KICAgICAgICB9OwoKICAgICAgICBNb2R1bGUucHJvdG90eXBlID0gewogICAgICAgICAgICBpbml0OiBmdW5jdGlvbiAoZGVwTWFwcywgZmFjdG9yeSwgZXJyYmFjaywgb3B0aW9ucykgewogICAgICAgICAgICAgICAgb3B0aW9ucyA9IG9wdGlvbnMgfHwge307CgogICAgICAgICAgICAgICAgLy9EbyBub3QgZG8gbW9yZSBpbml0cyBpZiBhbHJlYWR5IGRvbmUuIENhbiBoYXBwZW4gaWYgdGhlcmUKICAgICAgICAgICAgICAgIC8vYXJlIG11bHRpcGxlIGRlZmluZSBjYWxscyBmb3IgdGhlIHNhbWUgbW9kdWxlLiBUaGF0IGlzIG5vdAogICAgICAgICAgICAgICAgLy9hIG5vcm1hbCwgY29tbW9uIGNhc2UsIGJ1dCBpdCBpcyBhbHNvIG5vdCB1bmV4cGVjdGVkLgogICAgICAgICAgICAgICAgaWYgKHRoaXMuaW5pdGVkKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIHRoaXMuZmFjdG9yeSA9IGZhY3Rvcnk7CgogICAgICAgICAgICAgICAgaWYgKGVycmJhY2spIHsKICAgICAgICAgICAgICAgICAgICAvL1JlZ2lzdGVyIGZvciBlcnJvcnMgb24gdGhpcyBtb2R1bGUuCiAgICAgICAgICAgICAgICAgICAgdGhpcy5vbignZXJyb3InLCBlcnJiYWNrKTsKICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodGhpcy5ldmVudHMuZXJyb3IpIHsKICAgICAgICAgICAgICAgICAgICAvL0lmIG5vIGVycmJhY2sgYWxyZWFkeSwgYnV0IHRoZXJlIGFyZSBlcnJvciBsaXN0ZW5lcnMKICAgICAgICAgICAgICAgICAgICAvL29uIHRoaXMgbW9kdWxlLCBzZXQgdXAgYW4gZXJyYmFjayB0byBwYXNzIHRvIHRoZSBkZXBzLgogICAgICAgICAgICAgICAgICAgIGVycmJhY2sgPSBiaW5kKHRoaXMsIGZ1bmN0aW9uIChlcnIpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5lbWl0KCdlcnJvcicsIGVycik7CiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgLy9EbyBhIGNvcHkgb2YgdGhlIGRlcGVuZGVuY3kgYXJyYXksIHNvIHRoYXQKICAgICAgICAgICAgICAgIC8vc291cmNlIGlucHV0cyBhcmUgbm90IG1vZGlmaWVkLiBGb3IgZXhhbXBsZQogICAgICAgICAgICAgICAgLy8ic2hpbSIgZGVwcyBhcmUgcGFzc2VkIGluIGhlcmUgZGlyZWN0bHksIGFuZAogICAgICAgICAgICAgICAgLy9kb2luZyBhIGRpcmVjdCBtb2RpZmljYXRpb24gb2YgdGhlIGRlcE1hcHMgYXJyYXkKICAgICAgICAgICAgICAgIC8vd291bGQgYWZmZWN0IHRoYXQgY29uZmlnLgogICAgICAgICAgICAgICAgdGhpcy5kZXBNYXBzID0gZGVwTWFwcyAmJiBkZXBNYXBzLnNsaWNlKDApOwoKICAgICAgICAgICAgICAgIHRoaXMuZXJyYmFjayA9IGVycmJhY2s7CgogICAgICAgICAgICAgICAgLy9JbmRpY2F0ZSB0aGlzIG1vZHVsZSBoYXMgYmUgaW5pdGlhbGl6ZWQKICAgICAgICAgICAgICAgIHRoaXMuaW5pdGVkID0gdHJ1ZTsKCiAgICAgICAgICAgICAgICB0aGlzLmlnbm9yZSA9IG9wdGlvbnMuaWdub3JlOwoKICAgICAgICAgICAgICAgIC8vQ291bGQgaGF2ZSBvcHRpb24gdG8gaW5pdCB0aGlzIG1vZHVsZSBpbiBlbmFibGVkIG1vZGUsCiAgICAgICAgICAgICAgICAvL29yIGNvdWxkIGhhdmUgYmVlbiBwcmV2aW91c2x5IG1hcmtlZCBhcyBlbmFibGVkLiBIb3dldmVyLAogICAgICAgICAgICAgICAgLy90aGUgZGVwZW5kZW5jaWVzIGFyZSBub3Qga25vd24gdW50aWwgaW5pdCBpcyBjYWxsZWQuIFNvCiAgICAgICAgICAgICAgICAvL2lmIGVuYWJsZWQgcHJldmlvdXNseSwgbm93IHRyaWdnZXIgZGVwZW5kZW5jaWVzIGFzIGVuYWJsZWQuCiAgICAgICAgICAgICAgICBpZiAob3B0aW9ucy5lbmFibGVkIHx8IHRoaXMuZW5hYmxlZCkgewogICAgICAgICAgICAgICAgICAgIC8vRW5hYmxlIHRoaXMgbW9kdWxlIGFuZCBkZXBlbmRlbmNpZXMuCiAgICAgICAgICAgICAgICAgICAgLy9XaWxsIGNhbGwgdGhpcy5jaGVjaygpCiAgICAgICAgICAgICAgICAgICAgdGhpcy5lbmFibGUoKTsKICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5jaGVjaygpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9LAoKICAgICAgICAgICAgZGVmaW5lRGVwOiBmdW5jdGlvbiAoaSwgZGVwRXhwb3J0cykgewogICAgICAgICAgICAgICAgLy9CZWNhdXNlIG9mIGN5Y2xlcywgZGVmaW5lZCBjYWxsYmFjayBmb3IgYSBnaXZlbgogICAgICAgICAgICAgICAgLy9leHBvcnQgY2FuIGJlIGNhbGxlZCBtb3JlIHRoYW4gb25jZS4KICAgICAgICAgICAgICAgIGlmICghdGhpcy5kZXBNYXRjaGVkW2ldKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5kZXBNYXRjaGVkW2ldID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICB0aGlzLmRlcENvdW50IC09IDE7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5kZXBFeHBvcnRzW2ldID0gZGVwRXhwb3J0czsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSwKCiAgICAgICAgICAgIGZldGNoOiBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5mZXRjaGVkKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdGhpcy5mZXRjaGVkID0gdHJ1ZTsKCiAgICAgICAgICAgICAgICBjb250ZXh0LnN0YXJ0VGltZSA9IChuZXcgRGF0ZSgpKS5nZXRUaW1lKCk7CgogICAgICAgICAgICAgICAgdmFyIG1hcCA9IHRoaXMubWFwOwoKICAgICAgICAgICAgICAgIC8vSWYgdGhlIG1hbmFnZXIgaXMgZm9yIGEgcGx1Z2luIG1hbmFnZWQgcmVzb3VyY2UsCiAgICAgICAgICAgICAgICAvL2FzayB0aGUgcGx1Z2luIHRvIGxvYWQgaXQgbm93LgogICAgICAgICAgICAgICAgaWYgKHRoaXMuc2hpbSkgewogICAgICAgICAgICAgICAgICAgIGNvbnRleHQubWFrZVJlcXVpcmUodGhpcy5tYXAsIHsKICAgICAgICAgICAgICAgICAgICAgICAgZW5hYmxlQnVpbGRDYWxsYmFjazogdHJ1ZQogICAgICAgICAgICAgICAgICAgIH0pKHRoaXMuc2hpbS5kZXBzIHx8IFtdLCBiaW5kKHRoaXMsIGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG1hcC5wcmVmaXggPyB0aGlzLmNhbGxQbHVnaW4oKSA6IHRoaXMubG9hZCgpOwogICAgICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgLy9SZWd1bGFyIGRlcGVuZGVuY3kuCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG1hcC5wcmVmaXggPyB0aGlzLmNhbGxQbHVnaW4oKSA6IHRoaXMubG9hZCgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9LAoKICAgICAgICAgICAgbG9hZDogZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgdmFyIHVybCA9IHRoaXMubWFwLnVybDsKCiAgICAgICAgICAgICAgICAvL1JlZ3VsYXIgZGVwZW5kZW5jeS4KICAgICAgICAgICAgICAgIGlmICghdXJsRmV0Y2hlZFt1cmxdKSB7CiAgICAgICAgICAgICAgICAgICAgdXJsRmV0Y2hlZFt1cmxdID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICBjb250ZXh0LmxvYWQodGhpcy5tYXAuaWQsIHVybCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0sCgogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQ2hlY2tzIGlmIHRoZSBtb2R1bGUgaXMgcmVhZHkgdG8gZGVmaW5lIGl0c2VsZiwgYW5kIGlmIHNvLAogICAgICAgICAgICAgKiBkZWZpbmUgaXQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICBjaGVjazogZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgaWYgKCF0aGlzLmVuYWJsZWQgfHwgdGhpcy5lbmFibGluZykgewogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICB2YXIgZXJyLCBjanNNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgaWQgPSB0aGlzLm1hcC5pZCwKICAgICAgICAgICAgICAgICAgICBkZXBFeHBvcnRzID0gdGhpcy5kZXBFeHBvcnRzLAogICAgICAgICAgICAgICAgICAgIGV4cG9ydHMgPSB0aGlzLmV4cG9ydHMsCiAgICAgICAgICAgICAgICAgICAgZmFjdG9yeSA9IHRoaXMuZmFjdG9yeTsKCiAgICAgICAgICAgICAgICBpZiAoIXRoaXMuaW5pdGVkKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gT25seSBmZXRjaCBpZiBub3QgYWxyZWFkeSBpbiB0aGUgZGVmUXVldWUuCiAgICAgICAgICAgICAgICAgICAgaWYgKCFoYXNQcm9wKGNvbnRleHQuZGVmUXVldWVNYXAsIGlkKSkgewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmZldGNoKCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLmVycm9yKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5lbWl0KCdlcnJvcicsIHRoaXMuZXJyb3IpOwogICAgICAgICAgICAgICAgfSBlbHNlIGlmICghdGhpcy5kZWZpbmluZykgewogICAgICAgICAgICAgICAgICAgIC8vVGhlIGZhY3RvcnkgY291bGQgdHJpZ2dlciBhbm90aGVyIHJlcXVpcmUgY2FsbAogICAgICAgICAgICAgICAgICAgIC8vdGhhdCB3b3VsZCByZXN1bHQgaW4gY2hlY2tpbmcgdGhpcyBtb2R1bGUgdG8KICAgICAgICAgICAgICAgICAgICAvL2RlZmluZSBpdHNlbGYgYWdhaW4uIElmIGFscmVhZHkgaW4gdGhlIHByb2Nlc3MKICAgICAgICAgICAgICAgICAgICAvL29mIGRvaW5nIHRoYXQsIHNraXAgdGhpcyB3b3JrLgogICAgICAgICAgICAgICAgICAgIHRoaXMuZGVmaW5pbmcgPSB0cnVlOwoKICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5kZXBDb3VudCA8IDEgJiYgIXRoaXMuZGVmaW5lZCkgewogICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXNGdW5jdGlvbihmYWN0b3J5KSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9JZiB0aGVyZSBpcyBhbiBlcnJvciBsaXN0ZW5lciwgZmF2b3IgcGFzc2luZwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy90byB0aGF0IGluc3RlYWQgb2YgdGhyb3dpbmcgYW4gZXJyb3IuIEhvd2V2ZXIsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL29ubHkgZG8gaXQgZm9yIGRlZmluZSgpJ2QgIG1vZHVsZXMuIHJlcXVpcmUKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vZXJyYmFja3Mgc2hvdWxkIG5vdCBiZSBjYWxsZWQgZm9yIGZhaWx1cmVzIGluCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL3RoZWlyIGNhbGxiYWNrcyAoIzY5OSkuIEhvd2V2ZXIgaWYgYSBnbG9iYWwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vb25FcnJvciBpcyBzZXQsIHVzZSB0aGF0LgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCh0aGlzLmV2ZW50cy5lcnJvciAmJiB0aGlzLm1hcC5pc0RlZmluZSkgfHwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXEub25FcnJvciAhPT0gZGVmYXVsdE9uRXJyb3IpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHBvcnRzID0gY29udGV4dC5leGVjQ2IoaWQsIGZhY3RvcnksIGRlcEV4cG9ydHMsIGV4cG9ydHMpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyID0gZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4cG9ydHMgPSBjb250ZXh0LmV4ZWNDYihpZCwgZmFjdG9yeSwgZGVwRXhwb3J0cywgZXhwb3J0cyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gRmF2b3IgcmV0dXJuIHZhbHVlIG92ZXIgZXhwb3J0cy4gSWYgbm9kZS9janMgaW4gcGxheSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHRoZW4gd2lsbCBub3QgaGF2ZSBhIHJldHVybiB2YWx1ZSBhbnl3YXkuIEZhdm9yCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBtb2R1bGUuZXhwb3J0cyBhc3NpZ25tZW50IG92ZXIgZXhwb3J0cyBvYmplY3QuCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5tYXAuaXNEZWZpbmUgJiYgZXhwb3J0cyA9PT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2pzTW9kdWxlID0gdGhpcy5tb2R1bGU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNqc01vZHVsZSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHBvcnRzID0gY2pzTW9kdWxlLmV4cG9ydHM7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLnVzaW5nRXhwb3J0cykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2V4cG9ydHMgYWxyZWFkeSBzZXQgdGhlIGRlZmluZWQgdmFsdWUuCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4cG9ydHMgPSB0aGlzLmV4cG9ydHM7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlcnIpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlcnIucmVxdWlyZU1hcCA9IHRoaXMubWFwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVyci5yZXF1aXJlTW9kdWxlcyA9IHRoaXMubWFwLmlzRGVmaW5lID8gW3RoaXMubWFwLmlkXSA6IG51bGw7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyLnJlcXVpcmVUeXBlID0gdGhpcy5tYXAuaXNEZWZpbmUgPyAnZGVmaW5lJyA6ICdyZXF1aXJlJzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gb25FcnJvcigodGhpcy5lcnJvciA9IGVycikpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vSnVzdCBhIGxpdGVyYWwgdmFsdWUKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4cG9ydHMgPSBmYWN0b3J5OwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmV4cG9ydHMgPSBleHBvcnRzOwoKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMubWFwLmlzRGVmaW5lICYmICF0aGlzLmlnbm9yZSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmaW5lZFtpZF0gPSBleHBvcnRzOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXEub25SZXNvdXJjZUxvYWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcmVzTG9hZE1hcHMgPSBbXTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlYWNoKHRoaXMuZGVwTWFwcywgZnVuY3Rpb24gKGRlcE1hcCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNMb2FkTWFwcy5wdXNoKGRlcE1hcC5ub3JtYWxpemVkTWFwIHx8IGRlcE1hcCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVxLm9uUmVzb3VyY2VMb2FkKGNvbnRleHQsIHRoaXMubWFwLCByZXNMb2FkTWFwcyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIC8vQ2xlYW4gdXAKICAgICAgICAgICAgICAgICAgICAgICAgY2xlYW5SZWdpc3RyeShpZCk7CgogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmRlZmluZWQgPSB0cnVlOwogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgLy9GaW5pc2hlZCB0aGUgZGVmaW5lIHN0YWdlLiBBbGxvdyBjYWxsaW5nIGNoZWNrIGFnYWluCiAgICAgICAgICAgICAgICAgICAgLy90byBhbGxvdyBkZWZpbmUgbm90aWZpY2F0aW9ucyBiZWxvdyBpbiB0aGUgY2FzZSBvZiBhCiAgICAgICAgICAgICAgICAgICAgLy9jeWNsZS4KICAgICAgICAgICAgICAgICAgICB0aGlzLmRlZmluaW5nID0gZmFsc2U7CgogICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmRlZmluZWQgJiYgIXRoaXMuZGVmaW5lRW1pdHRlZCkgewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmRlZmluZUVtaXR0ZWQgPSB0cnVlOwogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmVtaXQoJ2RlZmluZWQnLCB0aGlzLmV4cG9ydHMpOwogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmRlZmluZUVtaXRDb21wbGV0ZSA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSwKCiAgICAgICAgICAgIGNhbGxQbHVnaW46IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgIHZhciBtYXAgPSB0aGlzLm1hcCwKICAgICAgICAgICAgICAgICAgICBpZCA9IG1hcC5pZCwKICAgICAgICAgICAgICAgICAgICAvL01hcCBhbHJlYWR5IG5vcm1hbGl6ZWQgdGhlIHByZWZpeC4KICAgICAgICAgICAgICAgICAgICBwbHVnaW5NYXAgPSBtYWtlTW9kdWxlTWFwKG1hcC5wcmVmaXgpOwoKICAgICAgICAgICAgICAgIC8vTWFyayB0aGlzIGFzIGEgZGVwZW5kZW5jeSBmb3IgdGhpcyBwbHVnaW4sIHNvIGl0CiAgICAgICAgICAgICAgICAvL2NhbiBiZSB0cmFjZWQgZm9yIGN5Y2xlcy4KICAgICAgICAgICAgICAgIHRoaXMuZGVwTWFwcy5wdXNoKHBsdWdpbk1hcCk7CgogICAgICAgICAgICAgICAgb24ocGx1Z2luTWFwLCAnZGVmaW5lZCcsIGJpbmQodGhpcywgZnVuY3Rpb24gKHBsdWdpbikgewogICAgICAgICAgICAgICAgICAgIHZhciBsb2FkLCBub3JtYWxpemVkTWFwLCBub3JtYWxpemVkTW9kLAogICAgICAgICAgICAgICAgICAgICAgICBidW5kbGVJZCA9IGdldE93bihidW5kbGVzTWFwLCB0aGlzLm1hcC5pZCksCiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWUgPSB0aGlzLm1hcC5uYW1lLAogICAgICAgICAgICAgICAgICAgICAgICBwYXJlbnROYW1lID0gdGhpcy5tYXAucGFyZW50TWFwID8gdGhpcy5tYXAucGFyZW50TWFwLm5hbWUgOiBudWxsLAogICAgICAgICAgICAgICAgICAgICAgICBsb2NhbFJlcXVpcmUgPSBjb250ZXh0Lm1ha2VSZXF1aXJlKG1hcC5wYXJlbnRNYXAsIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVuYWJsZUJ1aWxkQ2FsbGJhY2s6IHRydWUKICAgICAgICAgICAgICAgICAgICAgICAgfSk7CgogICAgICAgICAgICAgICAgICAgIC8vSWYgY3VycmVudCBtYXAgaXMgbm90IG5vcm1hbGl6ZWQsIHdhaXQgZm9yIHRoYXQKICAgICAgICAgICAgICAgICAgICAvL25vcm1hbGl6ZWQgbmFtZSB0byBsb2FkIGluc3RlYWQgb2YgY29udGludWluZy4KICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5tYXAudW5ub3JtYWxpemVkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vTm9ybWFsaXplIHRoZSBJRCBpZiB0aGUgcGx1Z2luIGFsbG93cyBpdC4KICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBsdWdpbi5ub3JtYWxpemUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWUgPSBwbHVnaW4ubm9ybWFsaXplKG5hbWUsIGZ1bmN0aW9uIChuYW1lKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5vcm1hbGl6ZShuYW1lLCBwYXJlbnROYW1lLCB0cnVlKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pIHx8ICcnOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAvL3ByZWZpeCBhbmQgbmFtZSBzaG91bGQgYWxyZWFkeSBiZSBub3JtYWxpemVkLCBubyBuZWVkCiAgICAgICAgICAgICAgICAgICAgICAgIC8vZm9yIGFwcGx5aW5nIG1hcCBjb25maWcgYWdhaW4gZWl0aGVyLgogICAgICAgICAgICAgICAgICAgICAgICBub3JtYWxpemVkTWFwID0gbWFrZU1vZHVsZU1hcChtYXAucHJlZml4ICsgJyEnICsgbmFtZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5tYXAucGFyZW50TWFwLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cnVlKTsKICAgICAgICAgICAgICAgICAgICAgICAgb24obm9ybWFsaXplZE1hcCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkZWZpbmVkJywgYmluZCh0aGlzLCBmdW5jdGlvbiAodmFsdWUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm1hcC5ub3JtYWxpemVkTWFwID0gbm9ybWFsaXplZE1hcDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmluaXQoW10sIGZ1bmN0aW9uICgpIHsgcmV0dXJuIHZhbHVlOyB9LCBudWxsLCB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVuYWJsZWQ6IHRydWUsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlnbm9yZTogdHJ1ZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkpOwoKICAgICAgICAgICAgICAgICAgICAgICAgbm9ybWFsaXplZE1vZCA9IGdldE93bihyZWdpc3RyeSwgbm9ybWFsaXplZE1hcC5pZCk7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChub3JtYWxpemVkTW9kKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL01hcmsgdGhpcyBhcyBhIGRlcGVuZGVuY3kgZm9yIHRoaXMgcGx1Z2luLCBzbyBpdAogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9jYW4gYmUgdHJhY2VkIGZvciBjeWNsZXMuCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmRlcE1hcHMucHVzaChub3JtYWxpemVkTWFwKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5ldmVudHMuZXJyb3IpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBub3JtYWxpemVkTW9kLm9uKCdlcnJvcicsIGJpbmQodGhpcywgZnVuY3Rpb24gKGVycikgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmVtaXQoJ2Vycm9yJywgZXJyKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBub3JtYWxpemVkTW9kLmVuYWJsZSgpOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAvL0lmIGEgcGF0aHMgY29uZmlnLCB0aGVuIGp1c3QgbG9hZCB0aGF0IGZpbGUgaW5zdGVhZCB0bwogICAgICAgICAgICAgICAgICAgIC8vcmVzb2x2ZSB0aGUgcGx1Z2luLCBhcyBpdCBpcyBidWlsdCBpbnRvIHRoYXQgcGF0aHMgbGF5ZXIuCiAgICAgICAgICAgICAgICAgICAgaWYgKGJ1bmRsZUlkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubWFwLnVybCA9IGNvbnRleHQubmFtZVRvVXJsKGJ1bmRsZUlkKTsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5sb2FkKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIGxvYWQgPSBiaW5kKHRoaXMsIGZ1bmN0aW9uICh2YWx1ZSkgewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmluaXQoW10sIGZ1bmN0aW9uICgpIHsgcmV0dXJuIHZhbHVlOyB9LCBudWxsLCB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbmFibGVkOiB0cnVlCiAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgIH0pOwoKICAgICAgICAgICAgICAgICAgICBsb2FkLmVycm9yID0gYmluZCh0aGlzLCBmdW5jdGlvbiAoZXJyKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuaW5pdGVkID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5lcnJvciA9IGVycjsKICAgICAgICAgICAgICAgICAgICAgICAgZXJyLnJlcXVpcmVNb2R1bGVzID0gW2lkXTsKCiAgICAgICAgICAgICAgICAgICAgICAgIC8vUmVtb3ZlIHRlbXAgdW5ub3JtYWxpemVkIG1vZHVsZXMgZm9yIHRoaXMgbW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICAvL3NpbmNlIHRoZXkgd2lsbCBuZXZlciBiZSByZXNvbHZlZCBvdGhlcndpc2Ugbm93LgogICAgICAgICAgICAgICAgICAgICAgICBlYWNoUHJvcChyZWdpc3RyeSwgZnVuY3Rpb24gKG1vZCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG1vZC5tYXAuaWQuaW5kZXhPZihpZCArICdfdW5ub3JtYWxpemVkJykgPT09IDApIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhblJlZ2lzdHJ5KG1vZC5tYXAuaWQpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB9KTsKCiAgICAgICAgICAgICAgICAgICAgICAgIG9uRXJyb3IoZXJyKTsKICAgICAgICAgICAgICAgICAgICB9KTsKCiAgICAgICAgICAgICAgICAgICAgLy9BbGxvdyBwbHVnaW5zIHRvIGxvYWQgb3RoZXIgY29kZSB3aXRob3V0IGhhdmluZyB0byBrbm93IHRoZQogICAgICAgICAgICAgICAgICAgIC8vY29udGV4dCBvciBob3cgdG8gJ2NvbXBsZXRlJyB0aGUgbG9hZC4KICAgICAgICAgICAgICAgICAgICBsb2FkLmZyb21UZXh0ID0gYmluZCh0aGlzLCBmdW5jdGlvbiAodGV4dCwgdGV4dEFsdCkgewogICAgICAgICAgICAgICAgICAgICAgICAvKmpzbGludCBldmlsOiB0cnVlICovCiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBtb2R1bGVOYW1lID0gbWFwLm5hbWUsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtb2R1bGVNYXAgPSBtYWtlTW9kdWxlTWFwKG1vZHVsZU5hbWUpLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaGFzSW50ZXJhY3RpdmUgPSB1c2VJbnRlcmFjdGl2ZTsKCiAgICAgICAgICAgICAgICAgICAgICAgIC8vQXMgb2YgMi4xLjAsIHN1cHBvcnQganVzdCBwYXNzaW5nIHRoZSB0ZXh0LCB0byByZWluZm9yY2UKICAgICAgICAgICAgICAgICAgICAgICAgLy9mcm9tVGV4dCBvbmx5IGJlaW5nIGNhbGxlZCBvbmNlIHBlciByZXNvdXJjZS4gU3RpbGwKICAgICAgICAgICAgICAgICAgICAgICAgLy9zdXBwb3J0IG9sZCBzdHlsZSBvZiBwYXNzaW5nIG1vZHVsZU5hbWUgYnV0IGRpc2NhcmQKICAgICAgICAgICAgICAgICAgICAgICAgLy90aGF0IG1vZHVsZU5hbWUgaW4gZmF2b3Igb2YgdGhlIGludGVybmFsIHJlZi4KICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRleHRBbHQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRleHQgPSB0ZXh0QWx0OwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAvL1R1cm4gb2ZmIGludGVyYWN0aXZlIHNjcmlwdCBtYXRjaGluZyBmb3IgSUUgZm9yIGFueSBkZWZpbmUKICAgICAgICAgICAgICAgICAgICAgICAgLy9jYWxscyBpbiB0aGUgdGV4dCwgdGhlbiB0dXJuIGl0IGJhY2sgb24gYXQgdGhlIGVuZC4KICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGhhc0ludGVyYWN0aXZlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1c2VJbnRlcmFjdGl2ZSA9IGZhbHNlOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAvL1ByaW1lIHRoZSBzeXN0ZW0gYnkgY3JlYXRpbmcgYSBtb2R1bGUgaW5zdGFuY2UgZm9yCiAgICAgICAgICAgICAgICAgICAgICAgIC8vaXQuCiAgICAgICAgICAgICAgICAgICAgICAgIGdldE1vZHVsZShtb2R1bGVNYXApOwoKICAgICAgICAgICAgICAgICAgICAgICAgLy9UcmFuc2ZlciBhbnkgY29uZmlnIHRvIHRoaXMgb3RoZXIgbW9kdWxlLgogICAgICAgICAgICAgICAgICAgICAgICBpZiAoaGFzUHJvcChjb25maWcuY29uZmlnLCBpZCkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5jb25maWdbbW9kdWxlTmFtZV0gPSBjb25maWcuY29uZmlnW2lkXTsKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcS5leGVjKHRleHQpOwogICAgICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gb25FcnJvcihtYWtlRXJyb3IoJ2Zyb210ZXh0ZXZhbCcsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdmcm9tVGV4dCBldmFsIGZvciAnICsgaWQgKwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcgZmFpbGVkOiAnICsgZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW2lkXSkpOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICBpZiAoaGFzSW50ZXJhY3RpdmUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVzZUludGVyYWN0aXZlID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgLy9NYXJrIHRoaXMgYXMgYSBkZXBlbmRlbmN5IGZvciB0aGUgcGx1Z2luCiAgICAgICAgICAgICAgICAgICAgICAgIC8vcmVzb3VyY2UKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5kZXBNYXBzLnB1c2gobW9kdWxlTWFwKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIC8vU3VwcG9ydCBhbm9ueW1vdXMgbW9kdWxlcy4KICAgICAgICAgICAgICAgICAgICAgICAgY29udGV4dC5jb21wbGV0ZUxvYWQobW9kdWxlTmFtZSk7CgogICAgICAgICAgICAgICAgICAgICAgICAvL0JpbmQgdGhlIHZhbHVlIG9mIHRoYXQgbW9kdWxlIHRvIHRoZSB2YWx1ZSBmb3IgdGhpcwogICAgICAgICAgICAgICAgICAgICAgICAvL3Jlc291cmNlIElELgogICAgICAgICAgICAgICAgICAgICAgICBsb2NhbFJlcXVpcmUoW21vZHVsZU5hbWVdLCBsb2FkKTsKICAgICAgICAgICAgICAgICAgICB9KTsKCiAgICAgICAgICAgICAgICAgICAgLy9Vc2UgcGFyZW50TmFtZSBoZXJlIHNpbmNlIHRoZSBwbHVnaW4ncyBuYW1lIGlzIG5vdCByZWxpYWJsZSwKICAgICAgICAgICAgICAgICAgICAvL2NvdWxkIGJlIHNvbWUgd2VpcmQgc3RyaW5nIHdpdGggbm8gcGF0aCB0aGF0IGFjdHVhbGx5IHdhbnRzIHRvCiAgICAgICAgICAgICAgICAgICAgLy9yZWZlcmVuY2UgdGhlIHBhcmVudE5hbWUncyBwYXRoLgogICAgICAgICAgICAgICAgICAgIHBsdWdpbi5sb2FkKG1hcC5uYW1lLCBsb2NhbFJlcXVpcmUsIGxvYWQsIGNvbmZpZyk7CiAgICAgICAgICAgICAgICB9KSk7CgogICAgICAgICAgICAgICAgY29udGV4dC5lbmFibGUocGx1Z2luTWFwLCB0aGlzKTsKICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luTWFwc1twbHVnaW5NYXAuaWRdID0gcGx1Z2luTWFwOwogICAgICAgICAgICB9LAoKICAgICAgICAgICAgZW5hYmxlOiBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICBlbmFibGVkUmVnaXN0cnlbdGhpcy5tYXAuaWRdID0gdGhpczsKICAgICAgICAgICAgICAgIHRoaXMuZW5hYmxlZCA9IHRydWU7CgogICAgICAgICAgICAgICAgLy9TZXQgZmxhZyBtZW50aW9uaW5nIHRoYXQgdGhlIG1vZHVsZSBpcyBlbmFibGluZywKICAgICAgICAgICAgICAgIC8vc28gdGhhdCBpbW1lZGlhdGUgY2FsbHMgdG8gdGhlIGRlZmluZWQgY2FsbGJhY2tzCiAgICAgICAgICAgICAgICAvL2ZvciBkZXBlbmRlbmNpZXMgZG8gbm90IHRyaWdnZXIgaW5hZHZlcnRlbnQgbG9hZAogICAgICAgICAgICAgICAgLy93aXRoIHRoZSBkZXBDb3VudCBzdGlsbCBiZWluZyB6ZXJvLgogICAgICAgICAgICAgICAgdGhpcy5lbmFibGluZyA9IHRydWU7CgogICAgICAgICAgICAgICAgLy9FbmFibGUgZWFjaCBkZXBlbmRlbmN5CiAgICAgICAgICAgICAgICBlYWNoKHRoaXMuZGVwTWFwcywgYmluZCh0aGlzLCBmdW5jdGlvbiAoZGVwTWFwLCBpKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIGlkLCBtb2QsIGhhbmRsZXI7CgogICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgZGVwTWFwID09PSAnc3RyaW5nJykgewogICAgICAgICAgICAgICAgICAgICAgICAvL0RlcGVuZGVuY3kgbmVlZHMgdG8gYmUgY29udmVydGVkIHRvIGEgZGVwTWFwCiAgICAgICAgICAgICAgICAgICAgICAgIC8vYW5kIHdpcmVkIHVwIHRvIHRoaXMgbW9kdWxlLgogICAgICAgICAgICAgICAgICAgICAgICBkZXBNYXAgPSBtYWtlTW9kdWxlTWFwKGRlcE1hcCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodGhpcy5tYXAuaXNEZWZpbmUgPyB0aGlzLm1hcCA6IHRoaXMubWFwLnBhcmVudE1hcCksCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmFsc2UsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIXRoaXMuc2tpcE1hcCk7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZGVwTWFwc1tpXSA9IGRlcE1hcDsKCiAgICAgICAgICAgICAgICAgICAgICAgIGhhbmRsZXIgPSBnZXRPd24oaGFuZGxlcnMsIGRlcE1hcC5pZCk7CgogICAgICAgICAgICAgICAgICAgICAgICBpZiAoaGFuZGxlcikgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5kZXBFeHBvcnRzW2ldID0gaGFuZGxlcih0aGlzKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5kZXBDb3VudCArPSAxOwoKICAgICAgICAgICAgICAgICAgICAgICAgb24oZGVwTWFwLCAnZGVmaW5lZCcsIGJpbmQodGhpcywgZnVuY3Rpb24gKGRlcEV4cG9ydHMpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLnVuZGVmZWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmRlZmluZURlcChpLCBkZXBFeHBvcnRzKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuY2hlY2soKTsKICAgICAgICAgICAgICAgICAgICAgICAgfSkpOwoKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuZXJyYmFjaykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgb24oZGVwTWFwLCAnZXJyb3InLCBiaW5kKHRoaXMsIHRoaXMuZXJyYmFjaykpOwogICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMuZXZlbnRzLmVycm9yKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBObyBkaXJlY3QgZXJyYmFjayBvbiB0aGlzIG1vZHVsZSwgYnV0IHNvbWV0aGluZwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gZWxzZSBpcyBsaXN0ZW5pbmcgZm9yIGVycm9ycywgc28gYmUgc3VyZSB0bwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gcHJvcGFnYXRlIHRoZSBlcnJvciBjb3JyZWN0bHkuCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbihkZXBNYXAsICdlcnJvcicsIGJpbmQodGhpcywgZnVuY3Rpb24oZXJyKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5lbWl0KCdlcnJvcicsIGVycik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIGlkID0gZGVwTWFwLmlkOwogICAgICAgICAgICAgICAgICAgIG1vZCA9IHJlZ2lzdHJ5W2lkXTsKCiAgICAgICAgICAgICAgICAgICAgLy9Ta2lwIHNwZWNpYWwgbW9kdWxlcyBsaWtlICdyZXF1aXJlJywgJ2V4cG9ydHMnLCAnbW9kdWxlJwogICAgICAgICAgICAgICAgICAgIC8vQWxzbywgZG9uJ3QgY2FsbCBlbmFibGUgaWYgaXQgaXMgYWxyZWFkeSBlbmFibGVkLAogICAgICAgICAgICAgICAgICAgIC8vaW1wb3J0YW50IGluIGNpcmN1bGFyIGRlcGVuZGVuY3kgY2FzZXMuCiAgICAgICAgICAgICAgICAgICAgaWYgKCFoYXNQcm9wKGhhbmRsZXJzLCBpZCkgJiYgbW9kICYmICFtb2QuZW5hYmxlZCkgewogICAgICAgICAgICAgICAgICAgICAgICBjb250ZXh0LmVuYWJsZShkZXBNYXAsIHRoaXMpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pKTsKCiAgICAgICAgICAgICAgICAvL0VuYWJsZSBlYWNoIHBsdWdpbiB0aGF0IGlzIHVzZWQgaW4KICAgICAgICAgICAgICAgIC8vYSBkZXBlbmRlbmN5CiAgICAgICAgICAgICAgICBlYWNoUHJvcCh0aGlzLnBsdWdpbk1hcHMsIGJpbmQodGhpcywgZnVuY3Rpb24gKHBsdWdpbk1hcCkgewogICAgICAgICAgICAgICAgICAgIHZhciBtb2QgPSBnZXRPd24ocmVnaXN0cnksIHBsdWdpbk1hcC5pZCk7CiAgICAgICAgICAgICAgICAgICAgaWYgKG1vZCAmJiAhbW9kLmVuYWJsZWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgY29udGV4dC5lbmFibGUocGx1Z2luTWFwLCB0aGlzKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KSk7CgogICAgICAgICAgICAgICAgdGhpcy5lbmFibGluZyA9IGZhbHNlOwoKICAgICAgICAgICAgICAgIHRoaXMuY2hlY2soKTsKICAgICAgICAgICAgfSwKCiAgICAgICAgICAgIG9uOiBmdW5jdGlvbiAobmFtZSwgY2IpIHsKICAgICAgICAgICAgICAgIHZhciBjYnMgPSB0aGlzLmV2ZW50c1tuYW1lXTsKICAgICAgICAgICAgICAgIGlmICghY2JzKSB7CiAgICAgICAgICAgICAgICAgICAgY2JzID0gdGhpcy5ldmVudHNbbmFtZV0gPSBbXTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGNicy5wdXNoKGNiKTsKICAgICAgICAgICAgfSwKCiAgICAgICAgICAgIGVtaXQ6IGZ1bmN0aW9uIChuYW1lLCBldnQpIHsKICAgICAgICAgICAgICAgIGVhY2godGhpcy5ldmVudHNbbmFtZV0sIGZ1bmN0aW9uIChjYikgewogICAgICAgICAgICAgICAgICAgIGNiKGV2dCk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIGlmIChuYW1lID09PSAnZXJyb3InKSB7CiAgICAgICAgICAgICAgICAgICAgLy9Ob3cgdGhhdCB0aGUgZXJyb3IgaGFuZGxlciB3YXMgdHJpZ2dlcmVkLCByZW1vdmUKICAgICAgICAgICAgICAgICAgICAvL3RoZSBsaXN0ZW5lcnMsIHNpbmNlIHRoaXMgYnJva2VuIE1vZHVsZSBpbnN0YW5jZQogICAgICAgICAgICAgICAgICAgIC8vY2FuIHN0YXkgYXJvdW5kIGZvciBhIHdoaWxlIGluIHRoZSByZWdpc3RyeS4KICAgICAgICAgICAgICAgICAgICBkZWxldGUgdGhpcy5ldmVudHNbbmFtZV07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9OwoKICAgICAgICBmdW5jdGlvbiBjYWxsR2V0TW9kdWxlKGFyZ3MpIHsKICAgICAgICAgICAgLy9Ta2lwIG1vZHVsZXMgYWxyZWFkeSBkZWZpbmVkLgogICAgICAgICAgICBpZiAoIWhhc1Byb3AoZGVmaW5lZCwgYXJnc1swXSkpIHsKICAgICAgICAgICAgICAgIGdldE1vZHVsZShtYWtlTW9kdWxlTWFwKGFyZ3NbMF0sIG51bGwsIHRydWUpKS5pbml0KGFyZ3NbMV0sIGFyZ3NbMl0pOwogICAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICBmdW5jdGlvbiByZW1vdmVMaXN0ZW5lcihub2RlLCBmdW5jLCBuYW1lLCBpZU5hbWUpIHsKICAgICAgICAgICAgLy9GYXZvciBkZXRhY2hFdmVudCBiZWNhdXNlIG9mIElFOQogICAgICAgICAgICAvL2lzc3VlLCBzZWUgYXR0YWNoRXZlbnQvYWRkRXZlbnRMaXN0ZW5lciBjb21tZW50IGVsc2V3aGVyZQogICAgICAgICAgICAvL2luIHRoaXMgZmlsZS4KICAgICAgICAgICAgaWYgKG5vZGUuZGV0YWNoRXZlbnQgJiYgIWlzT3BlcmEpIHsKICAgICAgICAgICAgICAgIC8vUHJvYmFibHkgSUUuIElmIG5vdCBpdCB3aWxsIHRocm93IGFuIGVycm9yLCB3aGljaCB3aWxsIGJlCiAgICAgICAgICAgICAgICAvL3VzZWZ1bCB0byBrbm93LgogICAgICAgICAgICAg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ZHlzdGF0ZWNoYW5nZScpOwogICAgICAgICAgICByZW1vdmVMaXN0ZW5lcihub2RlLCBjb250ZXh0Lm9uU2NyaXB0RXJyb3IsICdlcnJvcicpOwoKICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIG5vZGU6IG5vZGUsCiAgICAgICAgICAgICAgICBpZDogbm9kZSAmJiBub2RlLmdldEF0dHJpYnV0ZSgnZGF0YS1yZXF1aXJlbW9kdWxlJykKICAgICAgICAgICAgfTsKICAgICAgICB9CgogICAgICAgIGZ1bmN0aW9uIGludGFrZURlZmluZXMoKSB7CiAgICAgICAgICAgIHZhciBhcmdzOwoKICAgICAgICAgICAgLy9BbnkgZGVmaW5lZCBtb2R1bGVzIGluIHRoZSBnbG9iYWwgcXVldWUsIGludGFrZSB0aGVtIG5vdy4KICAgICAgICAgICAgdGFrZUdsb2JhbFF1ZXVlKCk7CgogICAgICAgICAgICAvL01ha2Ugc3VyZSBhbnkgcmVtYWluaW5nIGRlZlF1ZXVlIGl0ZW1zIGdldCBwcm9wZXJseSBwcm9jZXNzZWQuCiAgICAgICAgICAgIHdoaWxlIChkZWZRdWV1ZS5sZW5ndGgpIHsKICAgICAgICAgICAgICAgIGFyZ3MgPSBkZWZRdWV1ZS5zaGlmdCgpOwogICAgICAgICAgICAgICAgaWYgKGFyZ3NbMF0gPT09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gb25FcnJvcihtYWtlRXJyb3IoJ21pc21hdGNoJywgJ01pc21hdGNoZWQgYW5vbnltb3VzIGRlZmluZSgpIG1vZHVsZTogJyArCiAgICAgICAgICAgICAgICAgICAgICAgIGFyZ3NbYXJncy5sZW5ndGggLSAxXSkpOwogICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAvL2FyZ3MgYXJlIGlkLCBkZXBzLCBmYWN0b3J5LiBTaG91bGQgYmUgbm9ybWFsaXplZCBieSB0aGUKICAgICAgICAgICAgICAgICAgICAvL2RlZmluZSgpIGZ1bmN0aW9uLgogICAgICAgICAgICAgICAgICAgIGNhbGxHZXRNb2R1bGUoYXJncyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY29udGV4dC5kZWZRdWV1ZU1hcCA9IHt9OwogICAgICAgIH0KCiAgICAgICAgY29udGV4dCA9IHsKICAgICAgICAgICAgY29uZmlnOiBjb25maWcsCiAgICAgICAgICAgIGNvbnRleHROYW1lOiBjb250ZXh0TmFtZSwKICAgICAgICAgICAgcmVnaXN0cnk6IHJlZ2lzdHJ5LAogICAgICAgICAgICBkZWZpbmVkOiBkZWZpbmVkLAogICAgICAgICAgICB1cmxGZXRjaGVkOiB1cmxGZXRjaGVkLAogICAgICAgICAgICBkZWZRdWV1ZTogZGVmUXVldWUsCiAgICAgICAgICAgIGRlZlF1ZXVlTWFwOiB7fSwKICAgICAgICAgICAgTW9kdWxlOiBNb2R1bGUsCiAgICAgICAgICAgIG1ha2VNb2R1bGVNYXA6IG1ha2VNb2R1bGVNYXAsCiAgICAgICAgICAgIG5leHRUaWNrOiByZXEubmV4dFRpY2ssCiAgICAgICAgICAgIG9uRXJyb3I6IG9uRXJyb3IsCgogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogU2V0IGEgY29uZmlndXJhdGlvbiBmb3IgdGhlIGNvbnRleHQuCiAgICAgICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBjZmcgY29uZmlnIG9iamVjdCB0byBpbnRlZ3JhdGUuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICBjb25maWd1cmU6IGZ1bmN0aW9uIChjZmcpIHsKICAgICAgICAgICAgICAgIC8vTWFrZSBzdXJlIHRoZSBiYXNlVXJsIGVuZHMgaW4gYSBzbGFzaC4KICAgICAgICAgICAgICAgIGlmIChjZmcuYmFzZVVybCkgewogICAgICAgICAgICAgICAgICAgIGlmIChjZmcuYmFzZVVybC5jaGFyQXQoY2ZnLmJhc2VVcmwubGVuZ3RoIC0gMSkgIT09ICcvJykgewogICAgICAgICAgICAgICAgICAgICAgICBjZmcuYmFzZVVybCArPSAnLyc7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIC8vIENvbnZlcnQgb2xkIHN0eWxlIHVybEFyZ3Mgc3RyaW5nIHRvIGEgZnVuY3Rpb24uCiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGNmZy51cmxBcmdzID09PSAnc3RyaW5nJykgewogICAgICAgICAgICAgICAgICAgIHZhciB1cmxBcmdzID0gY2ZnLnVybEFyZ3M7CiAgICAgICAgICAgICAgICAgICAgY2ZnLnVybEFyZ3MgPSBmdW5jdGlvbihpZCwgdXJsKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAodXJsLmluZGV4T2YoJz8nKSA9PT0gLTEgPyAnPycgOiAnJicpICsgdXJsQXJnczsKICAgICAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIC8vU2F2ZSBvZmYgdGhlIHBhdGhzIHNpbmNlIHRoZXkgcmVxdWlyZSBzcGVjaWFsIHByb2Nlc3NpbmcsCiAgICAgICAgICAgICAgICAvL3RoZXkgYXJlIGFkZGl0aXZlLgogICAgICAgICAgICAgICAgdmFyIHNoaW0gPSBjb25maWcuc2hpbSwKICAgICAgICAgICAgICAgICAgICBvYmpzID0gewogICAgICAgICAgICAgICAgICAgICAgICBwYXRoczogdHJ1ZSwKICAgICAgICAgICAgICAgICAgICAgICAgYnVuZGxlczogdHJ1ZSwKICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnOiB0cnVlLAogICAgICAgICAgICAgICAgICAgICAgICBtYXA6IHRydWUKICAgICAgICAgICAgICAgICAgICB9OwoKICAgICAgICAgICAgICAgIGVhY2hQcm9wKGNmZywgZnVuY3Rpb24gKHZhbHVlLCBwcm9wKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKG9ianNbcHJvcF0pIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFjb25maWdbcHJvcF0pIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZ1twcm9wXSA9IHt9OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIG1peGluKGNvbmZpZ1twcm9wXSwgdmFsdWUsIHRydWUsIHRydWUpOwogICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZ1twcm9wXSA9IHZhbHVlOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pOwoKICAgICAgICAgICAgICAgIC8vUmV2ZXJzZSBtYXAgdGhlIGJ1bmRsZXMKICAgICAgICAgICAgICAgIGlmIChjZmcuYnVuZGxlcykgewogICAgICAgICAgICAgICAgICAgIGVhY2hQcm9wKGNmZy5idW5kbGVzLCBmdW5jdGlvbiAodmFsdWUsIHByb3ApIHsKICAgICAgICAgICAgICAgICAgICAgICAgZWFjaCh2YWx1ZSwgZnVuY3Rpb24gKHYpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2ICE9PSBwcm9wKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnVuZGxlc01hcFt2XSA9IHByb3A7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIC8vTWVyZ2Ugc2hpbQogICAgICAgICAgICAgICAgaWYgKGNmZy5zaGltKSB7CiAgICAgICAgICAgICAgICAgICAgZWFjaFByb3AoY2ZnLnNoaW0sIGZ1bmN0aW9uICh2YWx1ZSwgaWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy9Ob3JtYWxpemUgdGhlIHN0cnVjdHVyZQogICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXNBcnJheSh2YWx1ZSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlID0gewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlcHM6IHZhbHVlCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgodmFsdWUuZXhwb3J0cyB8fCB2YWx1ZS5pbml0KSAmJiAhdmFsdWUuZXhwb3J0c0ZuKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZS5leHBvcnRzRm4gPSBjb250ZXh0Lm1ha2VTaGltRXhwb3J0cyh2YWx1ZSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgc2hpbVtpZF0gPSB2YWx1ZTsKICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgICAgICBjb25maWcuc2hpbSA9IHNoaW07CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgLy9BZGp1c3QgcGFja2FnZXMgaWYgbmVjZXNzYXJ5LgogICAgICAgICAgICAgICAgaWYgKGNmZy5wYWNrYWdlcykgewogICAgICAgICAgICAgICAgICAgIGVhY2goY2ZnLnBhY2thZ2VzLCBmdW5jdGlvbiAocGtnT2JqKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBsb2NhdGlvbiwgbmFtZTsKCiAgICAgICAgICAgICAgICAgICAgICAgIHBrZ09iaiA9IHR5cGVvZiBwa2dPYmogPT09ICdzdHJpbmcnID8ge25hbWU6IHBrZ09ian0gOiBwa2dPYmo7CgogICAgICAgICAgICAgICAgICAgICAgICBuYW1lID0gcGtnT2JqLm5hbWU7CiAgICAgICAgICAgICAgICAgICAgICAgIGxvY2F0aW9uID0gcGtnT2JqLmxvY2F0aW9uOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAobG9jYXRpb24pIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5wYXRoc1tuYW1lXSA9IHBrZ09iai5sb2NhdGlvbjsKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgLy9TYXZlIHBvaW50ZXIgdG8gbWFpbiBtb2R1bGUgSUQgZm9yIHBrZyBuYW1lLgogICAgICAgICAgICAgICAgICAgICAgICAvL1JlbW92ZSBsZWFkaW5nIGRvdCBpbiBtYWluLCBzbyBtYWluIHBhdGhzIGFyZSBub3JtYWxpemVkLAogICAgICAgICAgICAgICAgICAgICAgICAvL2FuZCByZW1vdmUgYW55IHRyYWlsaW5nIC5qcywgc2luY2UgZGlmZmVyZW50IHBhY2thZ2UKICAgICAgICAgICAgICAgICAgICAgICAgLy9lbnZzIGhhdmUgZGlmZmVyZW50IGNvbnZlbnRpb25zOiBzb21lIHVzZSBhIG1vZHVsZSBuYW1lLAogICAgICAgICAgICAgICAgICAgICAgICAvL3NvbWUgdXNlIGEgZmlsZSBuYW1lLgogICAgICAgICAgICAgICAgICAgICAgICBjb25maWcucGtnc1tuYW1lXSA9IHBrZ09iai5uYW1lICsgJy8nICsgKHBrZ09iai5tYWluIHx8ICdtYWluJykKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5yZXBsYWNlKGN1cnJEaXJSZWdFeHAsICcnKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnJlcGxhY2UoanNTdWZmaXhSZWdFeHAsICcnKTsKICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAvL0lmIHRoZXJlIGFyZSBhbnkgIndhaXRpbmcgdG8gZXhlY3V0ZSIgbW9kdWxlcyBpbiB0aGUgcmVnaXN0cnksCiAgICAgICAgICAgICAgICAvL3VwZGF0ZSB0aGUgbWFwcyBmb3IgdGhlbSwgc2luY2UgdGhlaXIgaW5mbywgbGlrZSBVUkxzIHRvIGxvYWQsCiAgICAgICAgICAgICAgICAvL21heSBoYXZlIGNoYW5nZWQuCiAgICAgICAgICAgICAgICBlYWNoUHJvcChyZWdpc3RyeSwgZnVuY3Rpb24gKG1vZCwgaWQpIHsKICAgICAgICAgICAgICAgICAgICAvL0lmIG1vZHVsZSBhbHJlYWR5IGhhcyBpbml0IGNhbGxlZCwgc2luY2UgaXQgaXMgdG9vCiAgICAgICAgICAgICAgICAgICAgLy9sYXRlIHRvIG1vZGlmeSB0aGVtLCBhbmQgaWdub3JlIHVubm9ybWFsaXplZCBvbmVzCiAgICAgICAgICAgICAgICAgICAgLy9zaW5jZSB0aGV5IGFyZSB0cmFuc2llbnQuCiAgICAgICAgICAgICAgICAgICAgaWYgKCFtb2QuaW5pdGVkICYmICFtb2QubWFwLnVubm9ybWFsaXplZCkgewogICAgICAgICAgICAgICAgICAgICAgICBtb2QubWFwID0gbWFrZU1vZHVsZU1hcChpZCwgbnVsbCwgdHJ1ZSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSk7CgogICAgICAgICAgICAgICAgLy9JZiBhIGRlcHMgYXJyYXkgb3IgYSBjb25maWcgY2FsbGJhY2sgaXMgc3BlY2lmaWVkLCB0aGVuIGNhbGwKICAgICAgICAgICAgICAgIC8vcmVxdWlyZSB3aXRoIHRob3NlIGFyZ3MuIFRoaXMgaXMgdXNlZnVsIHdoZW4gcmVxdWlyZSBpcyBkZWZpbmVkIGFzIGEKICAgICAgICAgICAgICAgIC8vY29uZmlnIG9iamVjdCBiZWZvcmUgcmVxdWlyZS5qcyBpcyBsb2FkZWQuCiAgICAgICAgICAgICAgICBpZiAoY2ZnLmRlcHMgfHwgY2ZnLmNhbGxiYWNrKSB7CiAgICAgICAgICAgICAgICAgICAgY29udGV4dC5yZXF1aXJlKGNmZy5kZXBzIHx8IFtdLCBjZmcuY2FsbGJhY2spOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9LAoKICAgICAgICAgICAgbWFrZVNoaW1FeHBvcnRzOiBmdW5jdGlvbiAodmFsdWUpIHsKICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGZuKCkgewogICAgICAgICAgICAgICAgICAgIHZhciByZXQ7CiAgICAgICAgICAgICAgICAgICAgaWYgKHZhbHVlLmluaXQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0ID0gdmFsdWUuaW5pdC5hcHBseShnbG9iYWwsIGFyZ3VtZW50cyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHJldHVybiByZXQgfHwgKHZhbHVlLmV4cG9ydHMgJiYgZ2V0R2xvYmFsKHZhbHVlLmV4cG9ydHMpKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiBmbjsKICAgICAgICAgICAgfSwKCiAgICAgICAgICAgIG1ha2VSZXF1aXJlOiBmdW5jdGlvbiAocmVsTWFwLCBvcHRpb25zKSB7CiAgICAgICAgICAgICAgICBvcHRpb25zID0gb3B0aW9ucyB8fCB7fTsKCiAgICAgICAgICAgICAgICBmdW5jdGlvbiBsb2NhbFJlcXVpcmUoZGVwcywgY2FsbGJhY2ssIGVycmJhY2spIHsKICAgICAgICAgICAgICAgICAgICB2YXIgaWQsIG1hcCwgcmVxdWlyZU1vZDsKCiAgICAgICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMuZW5hYmxlQnVpbGRDYWxsYmFjayAmJiBjYWxsYmFjayAmJiBpc0Z1bmN0aW9uKGNhbGxiYWNrKSkgewogICAgICAgICAgICAgICAgICAgICAgICBjYWxsYmFjay5fX3JlcXVpcmVKc0J1aWxkID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgZGVwcyA9PT0gJ3N0cmluZycpIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlzRnVuY3Rpb24oY2FsbGJhY2spKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL0ludmFsaWQgY2FsbAogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9uRXJyb3IobWFrZUVycm9yKCdyZXF1aXJlYXJncycsICdJbnZhbGlkIHJlcXVpcmUgY2FsbCcpLCBlcnJiYWNrKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgLy9JZiByZXF1aXJlfGV4cG9ydHN8bW9kdWxlIGFyZSByZXF1ZXN0ZWQsIGdldCB0aGUKICAgICAgICAgICAgICAgICAgICAgICAgLy92YWx1ZSBmb3IgdGhlbSBmcm9tIHRoZSBzcGVjaWFsIGhhbmRsZXJzLiBDYXZlYXQ6CiAgICAgICAgICAgICAgICAgICAgICAgIC8vdGhpcyBvbmx5IHdvcmtzIHdoaWxlIG1vZHVsZSBpcyBiZWluZyBkZWZpbmVkLgogICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVsTWFwICYmIGhhc1Byb3AoaGFuZGxlcnMsIGRlcHMpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlcnNbZGVwc10ocmVnaXN0cnlbcmVsTWFwLmlkXSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIC8vU3luY2hyb25vdXMgYWNjZXNzIHRvIG9uZSBtb2R1bGUuIElmIHJlcXVpcmUuZ2V0IGlzCiAgICAgICAgICAgICAgICAgICAgICAgIC8vYXZhaWxhYmxlIChhcyBpbiB0aGUgTm9kZSBhZGFwdGVyKSwgcHJlZmVyIHRoYXQuCiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXEuZ2V0KSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVxLmdldChjb250ZXh0LCBkZXBzLCByZWxNYXAsIGxvY2FsUmVxdWlyZSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIC8vTm9ybWFsaXplIG1vZHVsZSBuYW1lLCBpZiBpdCBjb250YWlucyAuIG9yIC4uCiAgICAgICAgICAgICAgICAgICAgICAgIG1hcCA9IG1ha2VNb2R1bGVNYXAoZGVwcywgcmVsTWFwLCBmYWxzZSwgdHJ1ZSk7CiAgICAgICAgICAgICAgICAgICAgICAgIGlkID0gbWFwLmlkOwoKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFoYXNQcm9wKGRlZmluZWQsIGlkKSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9uRXJyb3IobWFrZUVycm9yKCdub3Rsb2FkZWQnLCAnTW9kdWxlIG5hbWUgIicgKwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQgKwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJyIgaGFzIG5vdCBiZWVuIGxvYWRlZCB5ZXQgZm9yIGNvbnRleHQ6ICcgKwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGV4dE5hbWUgKwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHJlbE1hcCA/ICcnIDogJy4gVXNlIHJlcXVpcmUoW10pJykpKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGVmaW5lZFtpZF07CiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAvL0dyYWIgZGVmaW5lcyB3YWl0aW5nIGluIHRoZSBnbG9iYWwgcXVldWUuCiAgICAgICAgICAgICAgICAgICAgaW50YWtlRGVmaW5lcygpOwoKICAgICAgICAgICAgICAgICAgICAvL01hcmsgYWxsIHRoZSBkZXBlbmRlbmNpZXMgYXMgbmVlZGluZyB0byBiZSBsb2FkZWQuCiAgICAgICAgICAgICAgICAgICAgY29udGV4dC5uZXh0VGljayhmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vU29tZSBkZWZpbmVzIGNvdWxkIGhhdmUgYmVlbiBhZGRlZCBzaW5jZSB0aGUKICAgICAgICAgICAgICAgICAgICAgICAgLy9yZXF1aXJlIGNhbGwsIGNvbGxlY3QgdGhlbS4KICAgICAgICAgICAgICAgICAgICAgICAgaW50YWtlRGVmaW5lcygpOwoKICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWlyZU1vZCA9IGdldE1vZHVsZShtYWtlTW9kdWxlTWFwKG51bGwsIHJlbE1hcCkpOwoKICAgICAgICAgICAgICAgICAgICAgICAgLy9TdG9yZSBpZiBtYXAgY29uZmlnIHNob3VsZCBiZSBhcHBsaWVkIHRvIHRoaXMgcmVxdWlyZQogICAgICAgICAgICAgICAgICAgICAgICAvL2NhbGwgZm9yIGRlcGVuZGVuY2llcy4KICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWlyZU1vZC5za2lwTWFwID0gb3B0aW9ucy5za2lwTWFwOwoKICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWlyZU1vZC5pbml0KGRlcHMsIGNhbGxiYWNrLCBlcnJiYWNrLCB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbmFibGVkOiB0cnVlCiAgICAgICAgICAgICAgICAgICAgICAgIH0pOwoKICAgICAgICAgICAgICAgICAgICAgICAgY2hlY2tMb2FkZWQoKTsKICAgICAgICAgICAgICAgICAgICB9KTsKCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGxvY2FsUmVxdWlyZTsKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBtaXhpbihsb2NhbFJlcXVpcmUsIHsKICAgICAgICAgICAgICAgICAgICBpc0Jyb3dzZXI6IGlzQnJvd3NlciwKCiAgICAgICAgICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAgICAgICAgICogQ29udmVydHMgYSBtb2R1bGUgbmFtZSArIC5leHRlbnNpb24gaW50byBhbiBVUkwgcGF0aC4KICAgICAgICAgICAgICAgICAgICAgKiAqUmVxdWlyZXMqIHRoZSB1c2Ugb2YgYSBtb2R1bGUgbmFtZS4gSXQgZG9lcyBub3Qgc3VwcG9ydCB1c2luZwogICAgICAgICAgICAgICAgICAgICAqIHBsYWluIFVSTHMgbGlrZSBuYW1lVG9VcmwuCiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgdG9Vcmw6IGZ1bmN0aW9uIChtb2R1bGVOYW1lUGx1c0V4dCkgewogICAgICAgICAgICAgICAgICAgICAgICB2YXIgZXh0LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXggPSBtb2R1bGVOYW1lUGx1c0V4dC5sYXN0SW5kZXhPZignLicpLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VnbWVudCA9IG1vZHVsZU5hbWVQbHVzRXh0LnNwbGl0KCcvJylbMF0sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpc1JlbGF0aXZlID0gc2VnbWVudCA9PT0gJy4nIHx8IHNlZ21lbnQgPT09ICcuLic7CgogICAgICAgICAgICAgICAgICAgICAgICAvL0hhdmUgYSBmaWxlIGV4dGVuc2lvbiBhbGlhcywgYW5kIGl0IGlzIG5vdCB0aGUKICAgICAgICAgICAgICAgICAgICAgICAgLy9kb3RzIGZyb20gYSByZWxhdGl2ZSBwYXRoLgogICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5kZXggIT09IC0xICYmICghaXNSZWxhdGl2ZSB8fCBpbmRleCA+IDEpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHQgPSBtb2R1bGVOYW1lUGx1c0V4dC5zdWJzdHJpbmcoaW5kZXgsIG1vZHVsZU5hbWVQbHVzRXh0Lmxlbmd0aCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtb2R1bGVOYW1lUGx1c0V4dCA9IG1vZHVsZU5hbWVQbHVzRXh0LnN1YnN0cmluZygwLCBpbmRleCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjb250ZXh0Lm5hbWVUb1VybChub3JtYWxpemUobW9kdWxlTmFtZVBsdXNFeHQsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlbE1hcCAmJiByZWxNYXAuaWQsIHRydWUpLCBleHQsICB0cnVlKTsKICAgICAgICAgICAgICAgICAgICB9LAoKICAgICAgICAgICAgICAgICAgICBkZWZpbmVkOiBmdW5jdGlvbiAoaWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGhhc1Byb3AoZGVmaW5lZCwgbWFrZU1vZHVsZU1hcChpZCwgcmVsTWFwLCBmYWxzZSwgdHJ1ZSkuaWQpOwogICAgICAgICAgICAgICAgICAgIH0sCgogICAgICAgICAgICAgICAgICAgIHNwZWNpZmllZDogZnVuY3Rpb24gKGlkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlkID0gbWFrZU1vZHVsZU1hcChpZCwgcmVsTWFwLCBmYWxzZSwgdHJ1ZSkuaWQ7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBoYXNQcm9wKGRlZmluZWQsIGlkKSB8fCBoYXNQcm9wKHJlZ2lzdHJ5LCBpZCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSk7CgogICAgICAgICAgICAgICAgLy9Pbmx5IGFsbG93IHVuZGVmIG9uIHRvcCBsZXZlbCByZXF1aXJlIGNhbGxzCiAgICAgICAgICAgICAgICBpZiAoIXJlbE1hcCkgewogICAgICAgICAgICAgICAgICAgIGxvY2FsUmVxdWlyZS51bmRlZiA9IGZ1bmN0aW9uIChpZCkgewogICAgICAgICAgICAgICAgICAgICAgICAvL0JpbmQgYW55IHdhaXRpbmcgZGVmaW5lKCkgY2FsbHMgdG8gdGhpcyBjb250ZXh0LAogICAgICAgICAgICAgICAgICAgICAgICAvL2ZpeCBmb3IgIzQwOAogICAgICAgICAgICAgICAgICAgICAgICB0YWtlR2xvYmFsUXVldWUoKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBtYXAgPSBtYWtlTW9kdWxlTWFwKGlkLCByZWxNYXAsIHRydWUpLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbW9kID0gZ2V0T3duKHJlZ2lzdHJ5LCBpZCk7CgogICAgICAgICAgICAgICAgICAgICAgICBtb2QudW5kZWZlZCA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgICAgIHJlbW92ZVNjcmlwdChpZCk7CgogICAgICAgICAgICAgICAgICAgICAgICBkZWxldGUgZGVmaW5lZFtpZF07CiAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZSB1cmxGZXRjaGVkW21hcC51cmxdOwogICAgICAgICAgICAgICAgICAgICAgICBkZWxldGUgdW5kZWZFdmVudHNbaWRdOwoKICAgICAgICAgICAgICAgICAgICAgICAgLy9DbGVhbiBxdWV1ZWQgZGVmaW5lcyB0b28uIEdvIGJhY2t3YXJkcwogICAgICAgICAgICAgICAgICAgICAgICAvL2luIGFycmF5IHNvIHRoYXQgdGhlIHNwbGljZXMgZG8gbm90CiAgICAgICAgICAgICAgICAgICAgICAgIC8vbWVzcyB1cCB0aGUgaXRlcmF0aW9uLgogICAgICAgICAgICAgICAgICAgICAgICBlYWNoUmV2ZXJzZShkZWZRdWV1ZSwgZnVuY3Rpb24oYXJncywgaSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGFyZ3NbMF0gPT09IGlkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmUXVldWUuc3BsaWNlKGksIDEpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgICAgICAgICAgZGVsZXRlIGNvbnRleHQuZGVmUXVldWVNYXBbaWRdOwoKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG1vZCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9Ib2xkIG9uIHRvIGxpc3RlbmVycyBpbiBjYXNlIHRoZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9tb2R1bGUgd2lsbCBiZSBhdHRlbXB0ZWQgdG8gYmUgcmVsb2FkZWQKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vdXNpbmcgYSBkaWZmZXJlbnQgY29uZmlnLgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG1vZC5ldmVudHMuZGVmaW5lZCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuZGVmRXZlbnRzW2lkXSA9IG1vZC5ldmVudHM7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYW5SZWdpc3RyeShpZCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIHJldHVybiBsb2NhbFJlcXVpcmU7CiAgICAgICAgICAgIH0sCgogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQ2FsbGVkIHRvIGVuYWJsZSBhIG1vZHVsZSBpZiBpdCBpcyBzdGlsbCBpbiB0aGUgcmVnaXN0cnkKICAgICAgICAgICAgICogYXdhaXRpbmcgZW5hYmxlbWVudC4gQSBzZWNvbmQgYXJnLCBwYXJlbnQsIHRoZSBwYXJlbnQgbW9kdWxlLAogICAgICAgICAgICAgKiBpcyBwYXNzZWQgaW4gZm9yIGNvbnRleHQsIHdoZW4gdGhpcyBtZXRob2QgaXMgb3ZlcnJpZGRlbiBieQogICAgICAgICAgICAgKiB0aGUgb3B0aW1pemVyLiBOb3Qgc2hvd24gaGVyZSB0byBrZWVwIGNvZGUgY29tcGFjdC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGVuYWJsZTogZnVuY3Rpb24gKGRlcE1hcCkgewogICAgICAgICAgICAgICAgdmFyIG1vZCA9IGdldE93bihyZWdpc3RyeSwgZGVwTWFwLmlkKTsKICAgICAgICAgICAgICAgIGlmIChtb2QpIHsKICAgICAgICAgICAgICAgICAgICBnZXRNb2R1bGUoZGVwTWFwKS5lbmFibGUoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSwKCiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBJbnRlcm5hbCBtZXRob2QgdXNlZCBieSBlbnZpcm9ubWVudCBhZGFwdGVycyB0byBjb21wbGV0ZSBhIGxvYWQgZXZlbnQuCiAgICAgICAgICAgICAqIEEgbG9hZCBldmVudCBjb3VsZCBiZSBhIHNjcmlwdCBsb2FkIG9yIGp1c3QgYSBsb2FkIHBhc3MgZnJvbSBhIHN5bmNocm9ub3VzCiAgICAgICAgICAgICAqIGxvYWQgY2FsbC4KICAgICAgICAgICAgICogQHBhcmFtIHtTdHJpbmd9IG1vZHVsZU5hbWUgdGhlIG5hbWUgb2YgdGhlIG1vZHVsZSB0byBwb3RlbnRpYWxseSBjb21wbGV0ZS4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGNvbXBsZXRlTG9hZDogZnVuY3Rpb24gKG1vZHVsZU5hbWUpIHsKICAgICAgICAgICAgICAgIHZhciBmb3VuZCwgYXJncywgbW9kLAogICAgICAgICAgICAgICAgICAgIHNoaW0gPSBnZXRPd24oY29uZmlnLnNoaW0sIG1vZHVsZU5hbWUpIHx8IHt9LAogICAgICAgICAgICAgICAgICAgIHNoRXhwb3J0cyA9IHNoaW0uZXhwb3J0czsKCiAgICAgICAgICAgICAgICB0YWtlR2xvYmFsUXVldWUoKTsKCiAgICAgICAgICAgICAgICB3aGlsZSAoZGVmUXVldWUubGVuZ3RoKSB7CiAgICAgICAgICAgICAgICAgICAgYXJncyA9IGRlZlF1ZXVlLnNoaWZ0KCk7CiAgICAgICAgICAgICAgICAgICAgaWYgKGFyZ3NbMF0gPT09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICAgICAgYXJnc1swXSA9IG1vZHVsZU5hbWU7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vSWYgYWxyZWFkeSBmb3VuZCBhbiBhbm9ueW1vdXMgbW9kdWxlIGFuZCBib3VuZCBpdAogICAgICAgICAgICAgICAgICAgICAgICAvL3RvIHRoaXMgbmFtZSwgdGhlbiB0aGlzIGlzIHNvbWUgb3RoZXIgYW5vbiBtb2R1bGUKICAgICAgICAgICAgICAgICAgICAgICAgLy93YWl0aW5nIGZvciBpdHMgY29tcGxldGVMb2FkIHRvIGZpcmUuCiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmb3VuZCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgZm91bmQgPSB0cnVlOwogICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoYXJnc1swXSA9PT0gbW9kdWxlTmFtZSkgewogICAgICAgICAgICAgICAgICAgICAgICAvL0ZvdW5kIG1hdGNoaW5nIGRlZmluZSBjYWxsIGZvciB0aGlzIHNjcmlwdCEKICAgICAgICAgICAgICAgICAgICAgICAgZm91bmQgPSB0cnVlOwogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgY2FsbEdldE1vZHVsZShhcmdzKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGNvbnRleHQuZGVmUXVldWVNYXAgPSB7fTsKCiAgICAgICAgICAgICAgICAvL0RvIHRoaXMgYWZ0ZXIgdGhlIGN5Y2xlIG9mIGNhbGxHZXRNb2R1bGUgaW4gY2FzZSB0aGUgcmVzdWx0CiAgICAgICAgICAgICAgICAvL29mIHRob3NlIGNhbGxzL2luaXQgY2FsbHMgY2hhbmdlcyB0aGUgcmVnaXN0cnkuCiAgICAgICAgICAgICAgICBtb2QgPSBnZXRPd24ocmVnaXN0cnksIG1vZHVsZU5hbWUpOwoKICAgICAgICAgICAgICAgIGlmICghZm91bmQgJiYgIWhhc1Byb3AoZGVmaW5lZCwgbW9kdWxlTmFtZSkgJiYgbW9kICYmICFtb2QuaW5pdGVkKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5lbmZvcmNlRGVmaW5lICYmICghc2hFeHBvcnRzIHx8ICFnZXRHbG9iYWwoc2hFeHBvcnRzKSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGhhc1BhdGhGYWxsYmFjayhtb2R1bGVOYW1lKSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9uRXJyb3IobWFrZUVycm9yKCdub2RlZmluZScsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdObyBkZWZpbmUgY2FsbCBmb3IgJyArIG1vZHVsZU5hbWUsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG51bGwsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFttb2R1bGVOYW1lXSkpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy9BIHNjcmlwdCB0aGF0IGRvZXMgbm90IGNhbGwgZGVmaW5lKCksIHNvIGp1c3Qgc2ltdWxhdGUKICAgICAgICAgICAgICAgICAgICAgICAgLy90aGUgY2FsbCBmb3IgaXQuCiAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxHZXRNb2R1bGUoW21vZHVsZU5hbWUsIChzaGltLmRlcHMgfHwgW10pLCBzaGltLmV4cG9ydHNGbl0pOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBjaGVja0xvYWRlZCgpOwogICAgICAgICAgICB9LAoKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIENvbnZlcnRzIGEgbW9kdWxlIG5hbWUgdG8gYSBmaWxlIHBhdGguIFN1cHBvcnRzIGNhc2VzIHdoZXJlCiAgICAgICAgICAgICAqIG1vZHVsZU5hbWUgbWF5IGFjdHVhbGx5IGJlIGp1c3QgYW4gVVJMLgogICAgICAgICAgICAgKiBOb3RlIHRoYXQgaXQgKipkb2VzIG5vdCoqIGNhbGwgbm9ybWFsaXplIG9uIHRoZSBtb2R1bGVOYW1lLAogICAgICAgICAgICAgKiBpdCBpcyBhc3N1bWVkIHRvIGhhdmUgYWxyZWFkeSBiZWVuIG5vcm1hbGl6ZWQuIFRoaXMgaXMgYW4KICAgICAgICAgICAgICogaW50ZXJuYWwgQVBJLCBub3QgYSBwdWJsaWMgb25lLiBVc2UgdG9VcmwgZm9yIHRoZSBwdWJsaWMgQVBJLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgbmFtZVRvVXJsOiBmdW5jdGlvbiAobW9kdWxlTmFtZSwgZXh0LCBza2lwRXh0KSB7CiAgICAgICAgICAgICAgICB2YXIgcGF0aHMsIHN5bXMsIGksIHBhcmVudE1vZHVsZSwgdXJsLAogICAgICAgICAgICAgICAgICAgIHBhcmVudFBhdGgsIGJ1bmRsZUlkLAogICAgICAgICAgICAgICAgICAgIHBrZ01haW4gPSBnZXRPd24oY29uZmlnLnBrZ3MsIG1vZHVsZU5hbWUpOwoKICAgICAgICAgICAgICAgIGlmIChwa2dNYWluKSB7CiAgICAgICAgICAgICAgICAgICAgbW9kdWxlTmFtZSA9IHBrZ01haW47CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgYnVuZGxlSWQgPSBnZXRPd24oYnVuZGxlc01hcCwgbW9kdWxlTmFtZSk7CgogICAgICAgICAgICAgICAgaWYgKGJ1bmRsZUlkKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNvbnRleHQubmFtZVRvVXJsKGJ1bmRsZUlkLCBleHQsIHNraXBFeHQpOwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIC8vSWYg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GF0aHMgPSBjb25maWcucGF0aHM7CgogICAgICAgICAgICAgICAgICAgIHN5bXMgPSBtb2R1bGVOYW1lLnNwbGl0KCcvJyk7CiAgICAgICAgICAgICAgICAgICAgLy9Gb3IgZWFjaCBtb2R1bGUgbmFtZSBzZWdtZW50LCBzZWUgaWYgdGhlcmUgaXMgYSBwYXRoCiAgICAgICAgICAgICAgICAgICAgLy9yZWdpc3RlcmVkIGZvciBpdC4gU3RhcnQgd2l0aCBtb3N0IHNwZWNpZmljIG5hbWUKICAgICAgICAgICAgICAgICAgICAvL2FuZCB3b3JrIHVwIGZyb20gaXQuCiAgICAgICAgICAgICAgICAgICAgZm9yIChpID0gc3ltcy5sZW5ndGg7IGkgPiAwOyBpIC09IDEpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcGFyZW50TW9kdWxlID0gc3ltcy5zbGljZSgwLCBpKS5qb2luKCcvJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBwYXJlbnRQYXRoID0gZ2V0T3duKHBhdGhzLCBwYXJlbnRNb2R1bGUpOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAocGFyZW50UGF0aCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9JZiBhbiBhcnJheSwgaXQgbWVhbnMgdGhlcmUgYXJlIGEgZmV3IGNob2ljZXMsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL0Nob29zZSB0aGUgb25lIHRoYXQgaXMgZGVzaXJlZAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlzQXJyYXkocGFyZW50UGF0aCkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJlbnRQYXRoID0gcGFyZW50UGF0aFswXTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN5bXMuc3BsaWNlKDAsIGksIHBhcmVudFBhdGgpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIC8vSm9pbiB0aGUgcGF0aCBwYXJ0cyB0b2dldGhlciwgdGhlbiBmaWd1cmUgb3V0IGlmIGJhc2VVcmwgaXMgbmVlZGVkLgogICAgICAgICAgICAgICAgICAgIHVybCA9IHN5bXMuam9pbignLycpOwogICAgICAgICAgICAgICAgICAgIHVybCArPSAoZXh0IHx8ICgvXmRhdGFcOnxeYmxvYlw6fFw/Ly50ZXN0KHVybCkgfHwgc2tpcEV4dCA/ICcnIDogJy5qcycpKTsKICAgICAgICAgICAgICAgICAgICB1cmwgPSAodXJsLmNoYXJBdCgwKSA9PT0gJy8nIHx8IHVybC5tYXRjaCgvXltcd1wrXC5cLV0rOi8pID8gJycgOiBjb25maWcuYmFzZVVybCkgKyB1cmw7CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgcmV0dXJuIGNvbmZpZy51cmxBcmdzICYmICEvXmJsb2JcOi8udGVzdCh1cmwpID8KICAgICAgICAgICAgICAgICAgICAgICB1cmwgKyBjb25maWcudXJsQXJncyhtb2R1bGVOYW1lLCB1cmwpIDogdXJsOwogICAgICAgICAgICB9LAoKICAgICAgICAgICAgLy9EZWxlZ2F0ZXMgdG8gcmVxLmxvYWQuIEJyb2tlbiBvdXQgYXMgYSBzZXBhcmF0ZSBmdW5jdGlvbiB0bwogICAgICAgICAgICAvL2FsbG93IG92ZXJyaWRpbmcgaW4gdGhlIG9wdGltaXplci4KICAgICAgICAgICAgbG9hZDogZnVuY3Rpb24gKGlkLCB1cmwpIHsKICAgICAgICAgICAgICAgIHJlcS5sb2FkKGNvbnRleHQsIGlkLCB1cmwpOwogICAgICAgICAgICB9LAoKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEV4ZWN1dGVzIGEgbW9kdWxlIGNhbGxiYWNrIGZ1bmN0aW9uLiBCcm9rZW4gb3V0IGFzIGEgc2VwYXJhdGUgZnVuY3Rpb24KICAgICAgICAgICAgICogc29sZWx5IHRvIGFsbG93IHRoZSBidWlsZCBzeXN0ZW0gdG8gc2VxdWVuY2UgdGhlIGZpbGVzIGluIHRoZSBidWlsdAogICAgICAgICAgICAgKiBsYXllciBpbiB0aGUgcmlnaHQgc2VxdWVuY2UuCiAgICAgICAgICAgICAqCiAgICAgICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICAgICAqLwogICAgICAgICAgICBleGVjQ2I6IGZ1bmN0aW9uIChuYW1lLCBjYWxsYmFjaywgYXJncywgZXhwb3J0cykgewogICAgICAgICAgICAgICAgcmV0dXJuIGNhbGxiYWNrLmFwcGx5KGV4cG9ydHMsIGFyZ3MpOwogICAgICAgICAgICB9LAoKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIGNhbGxiYWNrIGZvciBzY3JpcHQgbG9hZHMsIHVzZWQgdG8gY2hlY2sgc3RhdHVzIG9mIGxvYWRpbmcuCiAgICAgICAgICAgICAqCiAgICAgICAgICAgICAqIEBwYXJhbSB7RXZlbnR9IGV2dCB0aGUgZXZlbnQgZnJvbSB0aGUgYnJvd3NlciBmb3IgdGhlIHNjcmlwdAogICAgICAgICAgICAgKiB0aGF0IHdhcyBsb2FkZWQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICBvblNjcmlwdExvYWQ6IGZ1bmN0aW9uIChldnQpIHsKICAgICAgICAgICAgICAgIC8vVXNpbmcgY3VycmVudFRhcmdldCBpbnN0ZWFkIG9mIHRhcmdldCBmb3IgRmlyZWZveCAyLjAncyBzYWtlLiBOb3QKICAgICAgICAgICAgICAgIC8vYWxsIG9sZCBicm93c2VycyB3aWxsIGJlIHN1cHBvcnRlZCwgYnV0IHRoaXMgb25lIHdhcyBlYXN5IGVub3VnaAogICAgICAgICAgICAgICAgLy90byBzdXBwb3J0IGFuZCBzdGlsbCBtYWtlcyBzZW5zZS4KICAgICAgICAgICAgICAgIGlmIChldnQudHlwZSA9PT0gJ2xvYWQnIHx8CiAgICAgICAgICAgICAgICAgICAgICAgIChyZWFkeVJlZ0V4cC50ZXN0KChldnQuY3VycmVudFRhcmdldCB8fCBldnQuc3JjRWxlbWVudCkucmVhZHlTdGF0ZSkpKSB7CiAgICAgICAgICAgICAgICAgICAgLy9SZXNldCBpbnRlcmFjdGl2ZSBzY3JpcHQgc28gYSBzY3JpcHQgbm9kZSBpcyBub3QgaGVsZCBvbnRvIGZvcgogICAgICAgICAgICAgICAgICAgIC8vdG8gbG9uZy4KICAgICAgICAgICAgICAgICAgICBpbnRlcmFjdGl2ZVNjcmlwdCA9IG51bGw7CgogICAgICAgICAgICAgICAgICAgIC8vUHVsbCBvdXQgdGhlIG5hbWUgb2YgdGhlIG1vZHVsZSBhbmQgdGhlIGNvbnRleHQuCiAgICAgICAgICAgICAgICAgICAgdmFyIGRhdGEgPSBnZXRTY3JpcHREYXRhKGV2dCk7CiAgICAgICAgICAgICAgICAgICAgY29udGV4dC5jb21wbGV0ZUxvYWQoZGF0YS5pZCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0sCgogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQ2FsbGJhY2sgZm9yIHNjcmlwdCBlcnJvcnMuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICBvblNjcmlwdEVycm9yOiBmdW5jdGlvbiAoZXZ0KSB7CiAgICAgICAgICAgICAgICB2YXIgZGF0YSA9IGdldFNjcmlwdERhdGEoZXZ0KTsKICAgICAgICAgICAgICAgIGlmICghaGFzUGF0aEZhbGxiYWNrKGRhdGEuaWQpKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIHBhcmVudHMgPSBbXTsKICAgICAgICAgICAgICAgICAgICBlYWNoUHJvcChyZWdpc3RyeSwgZnVuY3Rpb24odmFsdWUsIGtleSkgewogICAgICAgICAgICAgICAgICAgICAgICBpZiAoa2V5LmluZGV4T2YoJ19AcicpICE9PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlYWNoKHZhbHVlLmRlcE1hcHMsIGZ1bmN0aW9uKGRlcE1hcCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkZXBNYXAuaWQgPT09IGRhdGEuaWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyZW50cy5wdXNoKGtleSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9uRXJyb3IobWFrZUVycm9yKCdzY3JpcHRlcnJvcicsICdTY3JpcHQgZXJyb3IgZm9yICInICsgZGF0YS5pZCArCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChwYXJlbnRzLmxlbmd0aCA/CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICciLCBuZWVkZWQgYnk6ICcgKyBwYXJlbnRzLmpvaW4oJywgJykgOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnIicpLCBldnQsIFtkYXRhLmlkXSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfTsKCiAgICAgICAgY29udGV4dC5yZXF1aXJlID0gY29udGV4dC5tYWtlUmVxdWlyZSgpOwogICAgICAgIHJldHVybiBjb250ZXh0OwogICAgfQoKICAgIC8qKgogICAgICogTWFpbiBlbnRyeSBwb2ludC4KICAgICAqCiAgICAgKiBJZiB0aGUgb25seSBhcmd1bWVudCB0byByZXF1aXJlIGlzIGEgc3RyaW5nLCB0aGVuIHRoZSBtb2R1bGUgdGhhdAogICAgICogaXMgcmVwcmVzZW50ZWQgYnkgdGhhdCBzdHJpbmcgaXMgZmV0Y2hlZCBmb3Igd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AgIGNvbmZpZyA9IGRlcHM7CiAgICAgICAgICAgIGlmIChpc0FycmF5KGNhbGxiYWNrKSkgewogICAgICAgICAgICAgICAgLy8gQWRqdXN0IGFyZ3MgaWYgdGhlcmUgYXJlIGRlcGVuZGVuY2llcwogICAgICAgICAgICAgICAgZGVwcyA9IGNhbGxiYWNrOwogICAgICAgICAgICAgICAgY2FsbGJhY2sgPSBlcnJiYWNrOwogICAgICAgICAgICAgICAgZXJyYmFjayA9IG9wdGlvbmFsOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgZGVwcyA9IFtdOwogICAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICBpZiAoY29uZmlnICYmIGNvbmZpZy5jb250ZXh0KSB7CiAgICAgICAgICAgIGNvbnRleHROYW1lID0gY29uZmlnLmNvbnRleHQ7CiAgICAgICAgfQoKICAgICAgICBjb250ZXh0ID0gZ2V0T3duKGNvbnRleHRzLCBjb250ZXh0TmFtZSk7CiAgICAgICAgaWYgKCFjb250ZXh0KSB7CiAgICAgICAgICAgIGNvbnRleHQgPSBjb250ZXh0c1tjb250ZXh0TmFtZV0gPSByZXEucy5uZXdDb250ZXh0KGNvbnRleHROYW1lKTsKICAgICAgICB9CgogICAgICAgIGlmIChjb25maWcpIHsKICAgICAgICAgICAgY29udGV4dC5jb25maWd1cmUoY29uZmlnKTsKICAgICAgICB9CgogICAgICAgIHJldHVybiBjb250ZXh0LnJlcXVpcmUoZGVwcywgY2FsbGJhY2ssIGVycmJhY2spOwogICAgfTsKCiAgICAvKioKICAgICAqIFN1cHBvcnQgcmVxdWlyZS5jb25maWcoKSB0byBtYWtlIGl0IGVhc2llciB0byBjb29wZXJhdGUgd2l0aCBvdGhlcgogICAgICogQU1EIGxvYWRlcnMgb24gZ2xvYmFsbHkgYWdyZWVkIG5hbWVzLgogICAgICovCiAgICByZXEuY29uZmlnID0gZnVuY3Rpb24gKGNvbmZpZykgewogICAgICAgIHJldHVybiByZXEoY29uZmlnKTs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GdldHMgZ2FyYmFnZS1jb2xsZWN0ZWQgYWZ0ZXIgY2FsbGluZwogICAgICAgICAgICAgICAgLy8gaW1wb3J0U2NyaXB0cygpOiBodHRwczovL3dlYmtpdC5vcmcvYi8xNTMzMTcKICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKSB7fSwgMCk7CiAgICAgICAgICAgICAgICBpbXBvcnRTY3JpcHRzKHVybCk7CgogICAgICAgICAgICAgICAgLy9BY2NvdW50IGZvciBhbm9ueW1vdXMgbW9kdWxlcwogICAgICAgICAgICAgICAgY29udGV4dC5jb21wbGV0ZUxvYWQobW9kdWxlTmFtZSk7CiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHsKICAgICAgICAgICAgICAgIGNvbnRleHQub25FcnJvcihtYWtlRXJyb3IoJ2ltcG9ydHNjcmlwdHMnLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdpbXBvcnRTY3JpcHRzIGZhaWxlZCBmb3IgJyArCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgKyAnIGF0ICcgKyB1cmwsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbbW9kdWxlTmFtZV0pKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH07CgogICAgZnVuY3Rpb24gZ2V0SW50ZXJhY3RpdmVTY3JpcHQoKSB7CiAgICAgICAgaWYgKGludGVyYWN0aXZlU2NyaXB0ICYmIGludGVyYWN0aXZlU2NyaXB0LnJlYWR5U3RhdGUgPT09ICdpbnRlcmFjdGl2ZScpIHsKICAgICAgICAgICAgcmV0dXJuIGludGVyYWN0aXZlU2NyaXB0OwogICAgICAgIH0KCiAgICAgICAgZWFjaFJldmVyc2Uoc2NyaXB0cygpLCBmdW5jdGlvbiAoc2NyaXB0KSB7CiAgICAgICAgICAgIGlmIChzY3JpcHQucmVhZHlTdGF0ZS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CiAgICAgICAgICAgIGlmIChkYXRhTWFpbikgewogICAgICAgICAgICAgICAgLy9QcmVzZXJ2ZSBkYXRhTWFpbiBpbiBjYXNlIGl0IGlzIGEgcGF0aCAoaS5lLiBjb250YWlucyAnPycpCiAgICAgICAgICAgICAgICBtYWluU2NyaXB0ID0gZGF0YU1haW47CgogICAgICAgICAgICAgICAgLy9TZXQgZmluYWwgYmFzZVVybCBpZiB0aGVyZSBpcyBub3QgYWxyZWFkeSBhbiBleHBsaWNpdCBvbmUsCiAgICAgICAgICAgICAgICAvL2J1dCBvbmx5IGRvIHNvIGlmIHRoZSBkYXRhLW1haW4gdmFsdWUgaXMgbm90IGEgbG9hZGVyIHBsdWdpbgogICAgICAgICAgICAgICAgLy9tb2R1bGUgSUQuCiAgICAgICAgICAgICAgICBpZiAoIWNmZy5iYXNlVXJsICYmIG1haW5TY3JpcHQuaW5kZXhPZignIScpID09PSAtMSkgewogICAgICAgICAgICAgICAgICAgIC8vUHVsbCBvZmYgdGhlIGRpcmVjdG9yeSBvZiBkYXRhLW1haW4gZm9yIHVzZSBhcyB0aGUKICAgICAgICAgICAgICAgICAgICAvL2Jhc2VVcmwuCiAgICAgICAgICAgICAgICAgICAgc3JjID0gbWFpblNjcmlwdC5zcGxpdCgnLycpOwogICAgICAgICAgICAgICAgICAgIG1haW5TY3JpcHQgPSBzcmMucG9wKCk7CiAgICAgICAgICAgICAgICAgICAgc3ViUGF0aCA9IHNyYy5sZW5ndGggPyBzcmMuam9pbignLycpICArICcvJyA6ICcuLyc7CgogICAgICAgICAgICAgICAgICAgIGNmZy5iYXNlVXJsID0gc3ViUGF0aDsKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAvL1N0cmlwIG9mZiBhbnkgdHJhaWxpbmcgLmpzIHNpbmNlIG1haW5TY3JpcHQgaXMgbm93CiAgICAgICAgICAgICAgICAvL2xpa2UgYSBtb2R1bGUgbmFtZS4KICAgICAgICAgICAgICAgIG1haW5TY3JpcHQgPSB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CgogICAgICAgIC8vQWxsb3cgZm9yIGFub255bW91cyBtb2R1bGVzCiAgICAgICAgaWYgKHR5cGVvZiBuYW1lICE9PSAnc3RyaW5nJykgewogICAgICAgICAgICAvL0FkanVzdCBhcmdzIGFwcHJvcHJpYXRlbHkKICAgICAgICAgICAgY2FsbGJhY2sgPSBkZXBzOwogICAgICAgICAgICBkZXBzID0gbmFtZTsKICAgICAgICAgICAgbmFtZSA9IG51bGw7CiAgICAgICAgfQoKICAgICAgICAvL1RoaXMgbW9kdWxlIG1heSBub3QgaGF2ZSBkZXBlbmRlbmNpZXMKICAgICAgICBpZiAoIWlzQXJyYXkoZGVwcykpIHsKICAgICAgICAgICAgY2FsbGJhY2sgPSBkZXBzOwogICAgICAgICAgICBkZXBzID0gbnVsbDsKICAgICAgICB9CgogICAgICAgIC8vSWYgbm8gbmFtZSwgYW5kIGNhbGxiYWNrIGlzIGEgZnVuY3Rpb24sIHRoZW4gZmlndXJlIG91dCBpZiBpdCBhCiAgICAgICAgLy9Db21tb25KUyB0aGluZyB3aXRoIGRlcGVuZGVuY2llcy4KICAgICAgICBpZiAoIWRlcHMgJiYgaXNGdW5jdGlvbihjYWxsYmFjaykpIHsKICAgICAgICAgICAgZGVwcyA9IFtdOwogICAgICAgICAgICAvL1JlbW92ZSBjb21tZW50cyBmcm9tIHRoZSBjYWxsYmFjayBzdHJpbmcsCiAgICAgICAgICAgIC8vbG9vayBmb3IgcmVxdWlyZSBjYWxscywgYW5kIHB1bGwgdGhlbSBpbnRvIHRoZSBkZXBlbmRlbmNpZXMsCiAgICAgICAgICAgIC8vYnV0IG9ubHkgaWYgdGhlcmUgYXJlIGZ1bmN0aW9uIGFyZ3MuCiAgICAgICAgICAgIGlmIChjYWxsYmFjay5sZW5ndGgpIHsKICAgICAgICAgICAgICAgIGNhbGxiYWNrCiAgICAgICAgICAgICAgICAgICAgLnRvU3RyaW5nKCkKICAgICAgICAgICAgICAgICAgICAucmVwbGFjZShjb21tZW50UmVnRXhwLCBjb21tZW50UmVwbGFjZSkKICAgICAgICAgICAgICAgICAgICAucmVwbGFjZShjanNSZXF1aXJlUmVnRXhwLCBmdW5jdGlvbiAobWF0Y2gsIGRlcCkgewogICAgICAgICAgICAgICAgICAgICAgICBkZXBzLnB1c2goZGVwKTsKICAgICAgICAgICAgICAgICAgICB9KTsKCiAgICAgICAgICAgICAgICAvL01heSBiZSBhIENvbW1vbkpTIHRoaW5nIGV2ZW4gd2l0aG91dCByZXF1aXJlIGNhbGxzLCBidXQgc3RpbGwKICAgICAgICAgICAgICAgIC8vY291bGQgdXNlIGV4cG9ydHMsIGFuZCBtb2R1bGUuIEF2b2lkIGRvaW5nIGV4cG9ydHMgYW5kIG1vZHVsZQogICAgICAgICAgICAgICAgLy93b3JrIHRob3VnaCBpZiBpdCBqdXN0IG5lZWRzIHJlcXVpcmUuCiAgICAgICAgICAgICAgICAvL1JFUVVJUkVTIHRoZSBmdW5jdGlvbiB0byBleHBlY3QgdGhlIENvbW1vbkpTIHZhcmlhYmxlcyBpbiB0aGUKICAgICAgICAgICAgICAgIC8vb3JkZXIgbGlzdGVkIGJlbG93LgogICAgICAgICAgICAgICAgZGVwcyA9IChjYWxsYmFjay5sZW5ndGggPT09IDEgPyBbJ3JlcXVpcmUnXSA6IFsncmVxdWlyZScsICdleHBvcnRzJywgJ21vZHVsZSddKS5jb25jYXQoZGVwcyk7CiAgICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIC8vSWYgaW4gSUUgNi04IGFuZCBoaXQgYW4gYW5vbnltb3VzIGRlZmluZSgpIGNhbGwsIGRvIHRoZSBpbnRlcmFjdGl2ZQogICAgICAgIC8vd29yay4KICAgICAgICBpZiAodXNlSW50ZXJhY3RpdmUpIHsKICAgICAgICAgICAgbm9kZSA9IGN1cnJlbnRseUFkZGluZ1NjcmlwdCB8fCBnZXRJbnRlcmFjdGl2ZVNjcmlwdCgpOwogICAgICAgICAgICBpZiAobm9kZSkgewogICAgICAgICAgICAgICAgaWYgKCFu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kgaXMgbm90IGFuIG93bi1wcm9wZXJ0eSBvZiB0aGUgY2xhc3MpLCBhbiBleGNlcHRpb24gaXMgdGhyb3duLgogICAgICovCiAgICBmdW5jdGlvbiBjdXN0b21FbGVtZW50KHRhZ25hbWUpIHsKICAgICAgICByZXR1cm4gKGNsYXNzXykgPT4gewogICAgICAgICAgICBpZiAodGFnbmFtZSkgewogICAgICAgICAgICAgICAgLy8gT25seSBjaGVjayB0aGF0IHRhZyBuYW1lcyBtYXRjaCB3aGVuIGBpc2AgaXMgb3VyIG93biBwcm9wZXJ0eS4gSXQgbWlnaHQKICAgICAgICAgICAgICAgIC8vIGJlIGluaGVyaXRlZCBmcm9tIGEgc3VwZXJjbGFzcywgaW4gd2hpY2ggY2FzZSBpdCdzIG9rIGlmIHRoZXkncmUKICAgICAgICAgICAgICAgIC8vIGRpZmZlcmVudCwgYW5kIHdlJ2xsIG92ZXJyaWRlIGl0IHdpdGggb3VyIG93biBwcm9wZXJ0eSBiZWxvdy4KICAgICAgICAgICAgICAgIGlmIChjbGFzc18uaGFzT3duUHJvcGVydHkoJ2lzJykpIHsKICAgICAgICAgICAgICAgICAgICBpZiAodGFnbmFtZSAhPT0gY2xhc3NfLmlzKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgY3VzdG9tIGVsZW1lbnQgdGFnIG5hbWVzIGRvIG5vdCBtYXRjaDogYCArCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBgKCR7dGFnbmFtZX0gIT09ICR7Y2xhc3NfLmlzfSlgKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoY2xhc3NfLCAnaXMnLCB7IHZhbHVlOiB0YWduYW1lIH0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIFRocm93cyBpZiB0YWcgbmFtZSBpcyBtaXNzaW5nIG9yIGludmFsaWQuCiAgICAgICAgICAgIHdpbmRvdy5jdXN0b21FbGVtZW50cy5kZWZpbmUoY2xhc3NfLmlzLCBjbGFzc18pOwogICAgICAgIH07CiAgICB9CiAgICBmdW5jdGlvbiBjcmVhdGVQcm9wZXJ0eShwcm90bywgbmFtZSwgb3B0aW9ucykgewogICAgICAgIGlmICghcHJvdG8uY29uc3RydWN0b3IuaGFzT3duUHJvcGVydHkoJ3Byb3BlcnRpZXMnKSkgewogICAgICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkocHJvdG8uY29uc3RydWN0b3IsICdwcm9wZXJ0aWVzJywgeyB2YWx1ZToge30gfSk7CiAgICAgICAgfQogICAgICAgIHByb3RvLmNvbnN0cnVjdG9yLnByb3BlcnRpZXNbbmFtZV0gPSBPYmplY3QuYXNzaWduKHt9LCBwcm90by5jb25zdHJ1Y3Rvci5wcm9wZXJ0aWVzW25hbWVdLCBvcHRpb25zKTsKICAgIH0KICAgIC8qKgogICAgICogQSBUeXBlU2NyaXB0IHByb3BlcnR5IGRlY29yYXRvciBmYWN0b3J5IHRoYXQgZGVmaW5lcyB0aGlzIGFzIGEgUG9seW1lcgogICAgICogcHJvcGVydHkuCiAgICAgKgogICAgICogVGhpcyBmdW5jdGlvbiBtdXN0IGJlIGludm9rZWQgdG8gcmV0dXJuIGEgZGVjb3JhdG9yLgogICAgICoKICAgICAqIEBFeHBvcnREZWNvcmF0ZWRJdGVtcwogICAgICovCiAgICBmdW5jdGlvbiBwcm9wZXJ0eShvcHRpb25zKSB7CiAgICAgICAgcmV0dXJuIChwcm90bywgcHJvcE5hbWUpID0+IHsKICAgICAgICAgICAgY3JlYXRlUHJvcGVydHkocHJvdG8sIHByb3BOYW1lLCBvcHRpb25zKTsKICAgICAgICB9OwogICAgfQogICAgLyoqCiAgICAgKiBBIFR5cGVTY3JpcHQgcHJvcGVydHkgZGVjb3JhdG9yIGZhY3RvcnkgdGhhdCB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mFzZSA9PT0gcGF0aCkgfHwKICAgICAgICAgICAgIGlzQW5jZXN0b3IoYmFzZSwgcGF0aCkgfHwKICAgICAgICAgICAgIGlzRGVzY2VuZGFudChiYXNlLCBwYXRoKTsKICAgIH0KCiAgICAvKioKICAgICAqIENvbnZlcnRzIGFycmF5LWJhc2VkIHBhdGhzIHRvIGZsYXR0ZW5lZCBwYXRoLiAgU3RyaW5nLWJhc2VkIHBhdGhzCiAgICAgKiBhcmUgcmV0dXJuZWQgYXMtaXMuCiAgICAgKgogICAgICogRXhhbXBsZToKICAgICAqCiAgICAgKiBgYGAKICAgICAqIG5vcm1hbGl6ZShbJ2Zvby5iYXInLCAwLCAnYmF6J10pICAvLyAnZm9vLmJhci4wLmJheicKICAgICAqIG5vcm1hbGl6ZSgnZm9vLmJhci4wLmJheicpICAgICAgICAvLyAnZm9vLmJhci4wLmJheicKICAgICAqIGBgYAogICAgICoKICAgICAqIEBwYXJhbSB7c3RyaW5nIHwgIUFycmF5PHN0cmluZ3xudW1iZXI+fSBwYXRoIElucHV0IHBhdGgKICAgICAqIEByZXR1cm4ge3N0cmluZ30gRmxhdHRlbmVkIHBhdGgKICAgICAqLwogICAgZnVuY3Rpb24gbm9ybWFsaXplKHBhdGgpIHsKICAgICAgaWYgKEFycmF5LmlzQXJyYXkocGF0aCkpIHsKICAgICAgICBsZXQgcGFydHMgPSBbXTsKICAgICAgICBmb3IgKGxldCBpPTA7IGk8cGF0aC5sZW5ndGg7IGkrKykgewogICAgICAgICAgbGV0IGFyZ3MgPSBwYXRoW2ldLnRvU3RyaW5nKCkuc3BsaXQoJy4nKTsKICAgICAgICAgIGZvciAobGV0IGo9MDsgajxhcmdzLmxlbmd0aDsgaisrKSB7CiAgICAgICAgICAgIHBhcnRzLnB1c2goYXJnc1tqXSk7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiBwYXJ0cy5qb2luKCcuJyk7CiAgICAgIH0gZWxzZSB7CiAgICAgICAgcmV0dXJuIHBhdGg7CiAgICAgIH0KICAgIH0KCiAgICAvKioKICAgICAqIFNwbGl0cyBhIHBhdGggaW50byBhbiBhcnJheSBvZiBwcm9wZXJ0eSBuYW1lcy4gQWNjZXB0cyBlaXRoZXIgYXJyYXlzCiAgICAgKiBvZiBwYXRoIHBhcnRzIG9yIHN0cmluZ3MuCiAgICAgKgogICAgICogRXhhbXBsZToKICAgICAqCiAgICAgKiBgYGAKICAgICAqIHNwbGl0KFsnZm9vLmJhcicsIDAsICdiYXonXSkgIC8vIFsnZm9vJywgJ2JhcicsICcwJywgJ2JheiddCiAgICAgKiBzcGxpdCgnZm9vLmJhci4wLmJheicpICAgICAgICAvLyBbJ2ZvbycsICdiYXInLCAnMCcsICdiYXonXQogICAgICogYGBgCiAgICAgKgogICAgICogQHBhcmFtIHtzdHJpbmcgfCAhQXJyYXk8c3RyaW5nfG51bWJlcj59IHBhdGggSW5wdXQgcGF0aAogICAgICogQHJldHVybiB7IUFycmF5PHN0cmluZz59IEFycmF5IG9mIHBhdGggcGFydHMKICAgICAqIEBzdXBwcmVzcyB7Y2hlY2tUeXBlc30KICAgICAqLwogICAgZnVuY3Rpb24gc3BsaXQocGF0aCkgewogICAgICBpZiAoQXJyYXkuaXNBcnJheShwYXRoKSkgewogICAgICAgIHJldHVybiBub3JtYWxpemUocGF0aCkuc3BsaXQoJy4nKTsKICAgICAgfQogICAgICByZXR1cm4gcGF0aC50b1N0cmluZygpLnNwbGl0KCcuJyk7CiAgICB9CgogICAgLyoqCiAgICAgKiBSZWFkcyBhIHZhbHVlIGZyb20gYSBwYXRoLiAgSWYgYW55IHN1Yi1wcm9wZXJ0eSBpbiB0aGUgcGF0aCBpcyBgdW5kZWZpbmVkYCwKICAgICAqIHRoaXMgbWV0aG9kIHJldHVybnMgYHVuZGVmaW5lZGAgKHdpbGwgbmV2ZXIgdGhyb3cuCiAgICAgKgogICAgICogQHBhcmFtIHtPYmplY3R9IHJvb3QgT2JqZWN0IGZyb20gd2hpY2ggdG8g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ICAgICAqIEBwYXJhbSB7bnVtYmVyPX0gZGVsYXkgVGltZSB0byB3YWl0IGJlZm9yZSBjYWxsaW5nIGNhbGxiYWNrcyBpbiBtcwogICAgICAgKiBAcmV0dXJuIHshQXN5bmNJbnRlcmZhY2V9IEFuIGFzeW5jIHRpbWVvdXQgaW50ZXJmYWNlCiAgICAgICAqLwogICAgICBhZnRlcihkZWxheSkgewogICAgICAgIHJldHVybiB7CiAgICAgICAgICBydW4oZm4pIHsgcmV0dXJuIHdpbmRvdy5zZXRUaW1lb3V0KGZuLCBkZWxheSk7IH0sCiAgICAgICAgICBjYW5jZWwoaGFuZGxlKSB7CiAgICAgICAgICAgIHdpbmRvdy5jbGVhclRpbWVvdXQoaGFuZGxlKTsKICAgICAgICAgIH0KICAgICAgICB9OwogICAgICB9LAogICAgICAvKioKICAgICAgICogRW5xdWV1ZXMgYSBmdW5jdGlvbiBjYWxsZWQgaW4gdGhlIG5leHQgdGFzay4KICAgICAgICoKICAgICAgICogQG1lbWJlcm9mIHRpbWVPdXQKICAgICAgICogQHBhcmFtIHshRnVuY3Rpb259IGZuIENhbGxiYWNrIHRvIHJ1bgogICAgICAgKiBAcGFyYW0ge251bWJlcj19IGRlbGF5IERlbGF5IGluIG1pbGxpc2Vjb25kcwogICAgICAgKiBAcmV0dXJuIHtudW1iZXJ9IEhhbmRsZSB1c2VkIGZvciBjYW5jZWxpbmcgdGFzawogICAgICAgKi8KICAgICAgcnVuKGZuLCBkZWxheSkgewogICAgICAgIHJldHVybiB3aW5kb3cuc2V0VGltZW91dChmbiwgZGVsYXkpOwogICAgICB9LAogICAgICAvKioKICAgICAgICogQ2FuY2VscyBhIHByZXZpb3VzbHkgZW5xdWV1ZWQgYHRpbWVPdXRgIGNhbGxiYWNrLgogICAgICAgKgogICAgICAgKiBAbWVtYmVyb2YgdGltZU91dAogICAgICAgKiBAcGFyYW0ge251bWJlcn0gaGFuZGxlIEhhbmRsZSByZXR1cm5lZCBmcm9tIGBydW5gIG9mIG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GFjayBtaWNyb3Rhc2sgZ3VhcmFudGVlcy4KICAgICAqCiAgICAgKiBAbmFtZXNwYWNlCiAgICAgKiBAc3VtbWFyeSBBc3luYyBpbnRlcmZhY2UgZm9yIGVucXVldWluZyBjYWxsYmFja3MgdGhhdCBydW4gYXQgbWljcm90YXNrCiAgICAgKiAgIHRpbWluZy4KICAgICAqLwogICAgY29uc3QgbWljcm9UYXNrID0gewoKICAgICAgLyoqCiAgICAgICAqIEVucXVldWVzIGEgZnVuY3Rpb24gY2FsbGVkIGF0IG1pY3JvdGFzayB0aW1pbmcuCiAgICAgICAqCiAgICAgICAqIEBtZW1iZXJvZiBtaWNyb1Rhc2sKICAgICAgICogQHBhcmFtIHshRnVuY3Rpb249fSBjYWxsYmFjayBDYWxsYmFjayB0byBydW4KICAgICAgICogQHJldHVybiB7bnVtYmVyfSBIYW5kbGUgdXNlZCBmb3IgY2FuY2VsaW5nIHRhc2sKICAgICAgICovCiAgICAgIHJ1bihjYWxsYmFjaykgewogICAgICAgIGlmICghbWljcm90YXNrU2NoZWR1bGVkKSB7CiAgICAgICAgICBtaWNyb3Rhc2tTY2hlZHVsZWQgPSB0cnVlOwogICAgICAgICAgbWljcm90YXNrTm9kZS50ZXh0Q29udGVudCA9IG1pY3JvdGFza05vZGVDb250ZW50Kys7CiAgICAgICAgfQogICAgICAgIG1pY3JvdGFza0NhbGxiYWNrcy5wdXNoKGNhbGxiYWNrKTsKICAgICAgICByZXR1cm4gbWljcm90YXNrQ3VyckhhbmRsZSsrOwogICAgICB9LAoKICAgICAgLyoqCiAgICAgICAqIENhbmNlbHMgYSBwcmV2aW91c2x5IGVucXVldWVkIGBtaWNyb1Rhc2tgIGNhbGxiYWNrLgogICAgICAgKgogICAgICAgKiBAbWVtYmVyb2YgbWljcm9UYXNrCiAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBoYW5kbGUgSGFuZGxlIHJldHVybmVkIGZyb20gYHJ1bmAgb2YgY2FsbGJhY2sgdG8gY2FuY2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zb3JzIGZvciB0aGUgZ2l2ZW4gcHJvcGVydHkgbmFtZXMuCiAgICAgICAgICogQHBhcmFtIHshT2JqZWN0fSBwcm9wcyBPYmplY3Qgd2hvc2Uga2V5cyBhcmUgbmFtZXMgb2YgYWNjZXNzb3JzLgogICAgICAgICAqIEByZXR1cm4ge3ZvaWR9CiAgICAgICAgICogQHByb3RlY3RlZAogICAgICAgICAqIEBub2NvbGxhcHNlCiAgICAgICAgICovCiAgICAgICAgc3RhdGljIGNyZWF0ZVByb3BlcnRpZXMocHJvcHMpIHsKICAgICAgICAgIGNvbnN0IHByb3RvID0gdGhpcy5wcm90b3R5cGU7CiAgICAgICAgICBmb3IgKGxldCBwcm9wIGluIHByb3BzKSB7CiAgICAgICAgICAgIC8vIGRvbid0IHN0b21wIGFuIGV4aXN0aW5nIGFjY2Vzc29yCiAgICAgICAgICAgIGlmICghKHByb3AgaW4gcHJvdG8pKSB7CiAgICAgICAgICAgICAgcHJvdG8uX2NyZWF0ZVByb3BlcnR5QWNjZXNzb3IocHJvcCk7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgYW4gYXR0cmlidXRlIG5hbWUgdGhhdCBjb3JyZXNwb25kcyB0byB0aGUgZ2l2ZW4gcHJvcGVydHkuCiAgICAgICAgICogVGhlIGF0dHJpYnV0ZSBuYW1lIGlzIHRoZSBsb3dlcmNhc2VkIHByb3BlcnR5IG5hbWUuIE92ZXJyaWRlIHRvCiAgICAgICAgICogY3VzdG9taXplIHRoaXMgbWFwcGluZy4KICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gcHJvcGVydHkgUHJvcGVydHkgdG8gY29udmVydAogICAgICAgICAqIEByZXR1cm4ge3N0cmluZ30gQXR0cmlidXRlIG5hbWUgY29ycmVzcG9uZGluZyB0byB0aGUgZ2l2ZW4gcHJvcGVydHkuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJvdGVjdGVkC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ZWN0LmRlZmluZVByb3BlcnR5KHRoaXMsIHByb3BlcnR5LCB7CiAgICAgICAgICAgIC8qIGVzbGludC1kaXNhYmxlIHZhbGlkLWpzZG9jICovCiAgICAgICAgICAgIC8qKiBAdGhpcyB7UHJvcGVydGllc0NoYW5nZWR9ICovCiAgICAgICAgICAgIGdldCgpIHsKICAgICAgICAgICAgICAvLyBJbmxpbmUgZm9yIHBlcmYgaW5zdGVhZCBvZiB1c2luZyBgX2dldFByb3BlcnR5YAogICAgICAgICAgICAgIHJldHVybiB0aGlzLl9fZGF0YVtwcm9wZXJ0eV07CiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIC8qKiBAdGhpcyB7UHJvcGVydGllc0NoYW5nZWR9ICovCiAgICAgICAgICAgIHNldDogcmVhZE9ubHkgPyBmdW5jdGlvbiAoKSB7fSA6IGZ1bmN0aW9uICh2YWx1ZSkgewogICAgICAgICAgICAgIC8vIElubGluZSBmb3IgcGVyZiBpbnN0ZWFkIG9mIHVzaW5nIGBfc2V0UHJvcGVydHlgCiAgICAgICAgICAgICAgaWYgKHRoaXMuX3NldFBlbmRpbmdQcm9wZXJ0eShwcm9wZXJ0eSwgdmFsdWUsIHRydWUpKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9pbnZhbGlkYXRlUHJvcGVydGllcygpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICAvKiBlc2xpbnQtZW5hYmxlICovCiAgICAgICAgICB9KTsKICAgICAgICB9CgogICAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgICAgc3VwZXIoKTsKICAgICAgICAgIC8qKiBAdHlwZSB7Ym9vbGVhbn0gKi8KICAgICAgICAgIHRoaXMuX19kYXRhRW5hYmxlZCA9IGZhbHNlOwogICAgICAgICAgdGhpcy5fX2RhdGFSZWFkeSA9IGZhbHNlOwogICAgICAgICAgdGhpcy5fX2RhdGFJbnZhbGlkID0gZmFsc2U7CiAgICAgICAgICB0aGlzLl9fZGF0YS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GVkIHRvIGVuc3VyZSB0aGUgZGF0YSBzeXN0ZW0KICAgICAgICAgKiBiZWNvbWVzIGVuYWJsZWQuCiAgICAgICAgICoKICAgICAgICAgKiBAcmV0dXJuIHt2b2lkfQogICAgICAgICAqIEBwdWJsaWMKICAgICAgICAgKiBAb3ZlcnJpZGUKICAgICAgICAgKi8KICAgICAgICByZWFkeSgpIHsKICAgICAgICAgIHRoaXMuX19kYXRhUmVhZHkgPSB0cnVlOwogICAgICAgICAgdGhpcy5fZmx1c2hQcm9wZXJ0aWVzKCk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBJbml0aWFsaXplcyB0aGUgbG9jYWwgc3RvcmFnZSBmb3IgcHJvcGVydHkgYWNjZXNzb3JzLgogICAgICAgICAqCiAgICAgICAgICogUHJvdmlkZWQgYXMgYW4gb3ZlcnJpZGUgcG9pbnQgZm9yIHBlcmZvcm1pbmcgYW55IHNldHVwIHdvcmsgcHJpb3IKICAgICAgICAgKiB0byBpbml0aWFsaXppbmcgdGhlIHByb3BlcnR5IGFjY2Vzc29yIHN5c3RlbS4KICAgICAgICAgKgogICAgICAgICAqIEByZXR1cm4ge3ZvaWR9CiAgICAgICAgICogQHByb3RlY3RlZAogICAgICAgICAqIEBvdmVycmlkZQogICAgICAgICAqLwogICAgICAgIF9pbml0aWFsaXplUHJvcGVydGllcygpIHsKICAgICAgICAgIC8vIENhcHR1cmUgaW5zdGFuY2UgcHJvcGVydGllczsgdGhlc2Ugd2lsbCBiZSBzZXQgaW50byBhY2Nlc3NvcnMKICAgICAgICAgIC8vIGR1cmluZyBmaXJzdCBmbHVzaC4gRG9uJ3Qgc2V0IHRoZW0gaGVyZSwgc2luY2Ugd2Ugd2FudAogICAgICAgICAgLy8gdGhlc2UgdG8gb3ZlcndyaXRlIGRlZmF1bHRzL2NvbnN0cnVjdG9yIGFzc2lnbm1lbnRzCiAgICAgICAgICBmb3IgKGxldCBwIGluIHRoaXMuX19kYXRhSGFzQWNjZXNzb3IpIHsKICAgICAgICAgICAgaWYgKHRoaXMuaGFzT3duUHJvcGVydHkocCkpIHsKICAgICAgICAgICAgICB0aGlzLl9fZGF0YUluc3RhbmNlUHJvcHMgPSB0aGlzLl9fZGF0YUluc3RhbmNlUHJvcHMgfHwge307CiAgICAgICAgICAgICAgdGhpcy5fX2RhdGFJbnN0YW5jZVByb3BzW3BdID0gdGhpc1twXTsKICAgICAgICAgICAgICBkZWxldGUgdGhpc1twXTsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ2FsbGVkIGF0IHJlYWR5IHRpbWUgd2l0aCBiYWcgb2YgaW5zdGFuY2UgcHJvcGVydGllcyB0aGF0IG92ZXJ3cm90ZQogICAgICAgICAqIGFjY2Vzc29ycyB3aGVuIHRoZSBlbGVtZW50IHVwZ3JhZGVkLgogICAgICAgICAqCiAgICAgICAgICogVGhlIGRlZmF1bHQgaW1wbGVtZW50YXRpb24gc2V0cyB0aGVzZSBwcm9wZXJ0aWVzIGJhY2sgaW50byB0aGUKICAgICAgICAgKiBzZXR0ZXIgYXQgcmVhZHkgdGltZS4gIFRoaXMgbWV0aG9kIGlzIHByb3ZpZGVkIGFzIGFuIG92ZXJyaWRlCiAgICAgICAgICogcG9pbnQgZm9yIGN1c3RvbWl6aW5nIG9yIHByb3ZpZGluZyBtb3JlIGVmZmljaWVudCBpbml0aWFsaXphdGlvbi4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBwcm9wcyBCYWcgb2YgcHJvcGVydHkgdmFsdWVzIHRoYXQgd2VyZSBvdmVyd3JpdHRlbgogICAgICAgICAqICAgd2hlbiBjcmVhdGluZyBwcm9wZXJ0eSBhY2Nlc3NvcnMuCiAgICAgICAgICogQHJldHVybiB7dm9pZH0KICAgICAgICAgKiBAcHJvdGVjdGVkCiAgICAgICAgICogQG92ZXJyaWRlCiAgICAgICAgICovCiAgICAgICAgX2luaXRpYWxp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hbmdlKHByb3BlcnR5LCB2YWx1ZSwgb2xkKTsKICAgICAgICAgIGlmIChjaGFuZ2VkKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5fX2RhdGFQZW5kaW5nKSB7CiAgICAgICAgICAgICAgdGhpcy5fX2RhdGFQZW5kaW5nID0ge307CiAgICAgICAgICAgICAgdGhpcy5fX2RhdGFPbGQgPSB7fTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBFbnN1cmUgb2xkIGlzIGNhcHR1cmVkIGZyb20gdGhlIGxhc3QgdHVybgogICAgICAgICAgICBpZiAodGhpcy5fX2RhdGFPbGQgJiYgIShwcm9wZXJ0eSBpbiB0aGlzLl9fZGF0YU9sZCkpIHsKICAgICAgICAgICAgICB0aGlzLl9fZGF0YU9sZFtwcm9wZXJ0eV0gPSBvbGQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fX2RhdGFbcHJvcGVydHldID0gdmFsdWU7CiAgICAgICAgICAgIHRoaXMuX19kYXRhUGVuZGluZ1twcm9wZXJ0eV0gPSB2YWx1ZTsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiBjaGFuZ2VkOwogICAgICAgIH0KICAgICAgICAvKiBlc2xpbnQtZW5hYmxlICovCgogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBwcm9wZXJ0eSBOYW1lIG9mIHRoZSBwcm9wZXJ0eQogICAgICAgICAqIEByZXR1cm4ge2Jvb2xlYW59IFJldHVybnMgdHJ1ZSBpZiB0aGUgcHJvcGVydHkgaXMgcGVuZGluZy4KICAgICAgICAgKi8KICAgICAgICBfaXNQcm9wZXJ0eVBlbmRpbmcocHJvcGVydHkpIHsKICAgICAgICAgIHJldHVybiAhISh0aGlzLl9fZGF0YVBlbmRpbmcgJiYgdGhpcy5fX2RhdGFQZW5kaW5nLmhhc093blByb3BlcnR5KHByb3BlcnR5KSk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBNYXJrcyB0aGUgcHJvcGVydGllcyBhcyBpbnZhbGlkLCBhbmQgZW5xdWV1ZXMgYW4gYXN5bmMKICAgICAgICAgKiBgX3Byb3BlcnRpZXNDaGFuZ2VkYCBjYWxsYmFjay4KICAgICAgICAgKgogICAgICAgICAqIEByZXR1cm4ge3ZvaWR9CiAgICAgICAgICogQHByb3RlY3RlZAogICAgICAgICAqIEBvdmVycmlkZQogICAgICAgICAqLwogICAgICAgIF9pbnZhbGlkYXRlUHJvcGVydGllcygpIHsKICAgICAgICAgIGlmICghdGhpcy5fX2RhdGFJbnZhbGlkICYmIHRoaXMuX19kYXRhUmVhZHkpIHsKICAgICAgICAgICAgdGhpcy5fX2RhdGFJbnZhbGlkID0gdHJ1ZTsKICAgICAgICAgICAgbWljcm90YXNrLnJ1bigoKSA9PiB7CiAgICAgICAgICAgICAgaWYgKHRoaXMuX19kYXRhSW52YWxpZCkgewogICAgICAgICAgICAgICAgdGhpcy5fX2RhdGFJbnZhbGlkID0gZmFsc2U7CiAgICAgICAgICAgICAgICB0aGlzLl9mbHVzaFByb3BlcnRpZXMoKTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ2FsbCB0byBlbmFibGUgcHJvcGVydHkgYWNjZXNzb3IgcHJvY2Vzc2luZy4gQmVmb3JlIHRoaXMgbWV0aG9kIGlzCiAgICAgICAgICogY2FsbGVkIGFjY2Vzc29yIHZhbHVlcyB3aWxsIGJlIHNldCBidXQgc2lkZSBlZmZlY3RzIGFyZQogICAgICAgICAqIHF1ZXVlZC4gV2hlbiBjYWxsZWQsIGFueSBwZW5kaW5nIHNpZGUgZWZmZWN0cyBvY2N1ciBpbW1lZGlhdGVseS4KICAgICAgICAgKiBGb3IgZWxlbWVudHMsIGdlbmVyYWxseSBgY29ubmVjdGVkQ2FsbGJhY2tgIGlzIGEgbm9ybWFsIHNwb3QgdG8gZG8gc28uCiAgICAgICAgICogSXQgaXMgc2FmZSB0byBjYWxsIHRoaXMgbWV0aG9kIG11bHRpcGxlIHRpbWVzIGFzIGl0IG9ubHkgdHVybnMgb24KICAgICAgICAgKiBwcm9wZXJ0eSBhY2Nlc3NvcnMgb25jZS4KICAgICAgICAgKgogICAgICAgICAqIEByZXR1cm4ge3ZvaWR9CiAgICAgICAgICogQHByb3RlY3RlZAogICAgICAgICAqIEBvdmVycmlkZQogICAgICAgICAqLwogICAgICAgIF9lbmFibGVQcm9wZXJ0aWVzKCkgewogICAgICAgICAgaWYgKCF0aGlzLl9fZGF0YUVuYWJsZWQpIHsKICAgICAgICAgICAgdGhpcy5fX2RhdGFFbmFibGVkID0gdHJ1ZTsKICAgICAgICAgICAgaWYgKHRoaXMuX19kYXRhSW5zdGFuY2VQcm9wcykgewogICAgICAgICAgICAgIHRoaXMuX2luaXRpYWxpemVJbnN0YW5jZVByb3BlcnRpZXModGhpcy5fX2RhdGFJbnN0YW5jZVByb3BzKTsKICAgICAgICAgICAgICB0aGlzLl9fZGF0YUluc3RhbmNlUHJvcHMgPSBudWxsOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMucmVhZHkoKTsKICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENhbGxzIHRoZSBgX3Byb3BlcnRpZXNDaGFuZ2VkYCBjYWxsYmFjayB3aXRoIHRoZSBjdXJyZW50IHNldCBvZgogICAgICAgICAqIHBlbmRpbmcgY2hhbmdlcyAoYW5kIG9sZCB2YWx1ZXMgcmVjb3JkZWQgd2hlbiBwZW5kaW5nIGNoYW5nZXMgd2VyZQogICAgICAgICAqIHNldCksIGFuZCByZXNldHMgdGhlIHBlbmRpbmcgc2V0IG9mIGNoYW5nZXMuIEdlbmVyYWxseSwgdGhpcyBtZXRob2QKICAgICAgICAgKiBzaG91bGQgbm90IGJlIGNhbGxlZCBpbiB1c2VyIGNvZGUuCiAgICAgICAgICoKICAgICAgICAgKiBAcmV0d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VgIHRvCiAgICAgICAgICogYGNhbWVsQ2FzZWAgY29udmVudGlvbgogICAgICAgICAqCiAgICAgICAgICogQHJldHVybiB7dm9pZH0KICAgICAgICAgKiBAbm9jb2xsYXBzZQogICAgICAgICAqLwogICAgICAgIHN0YXRpYyBjcmVhdGVQcm9wZXJ0aWVzRm9yQXR0cmlidXRlcygpIHsKICAgICAgICAgIGxldCBhJCA9ICAvKiogQHR5cGUgez99ICovICh0aGlzKS5vYnNlcnZlZEF0dHJpYnV0ZXM7CiAgICAgICAgICBmb3IgKGxldCBpPTA7IGkgPCBhJC5sZW5ndGg7IGkrKykgewogICAgICAgICAgICB0aGlzLnByb3RvdHlwZS5fY3JlYXRlUHJvcGVydHlBY2Nlc3NvcihkYXNoVG9DYW1lbENhc2UoYSRbaV0pKTsKICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgYW4gYXR0cmlidXRlIG5hbWUgdGhhdCBjb3JyZXNwb25kcyB0byB0aGUgZ2l2ZW4gcHJvcGVydHkuCiAgICAgICAgICogQnkgZGVmYXVsdCwgY29udmVydHMgY2FtZWwgdG8gZGFzaCBjYXNlLCBlLmcuIGBmb29CYXJgIHRvIGBmb28tYmFyYC4KICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gcHJvcGVydHkgUHJvcGVydHkgdG8gY29udmVydAogICAgICAgICAqIEByZXR1cm4ge3N0cmluZ30gQXR0cmlidXRlIG5hbWUgY29ycmVzcG9uZGluZyB0byB0aGUgZ2l2ZW4gcHJvcGVydHkuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJvdGVjdGVkCiAgICAgICAgICogQG5vY29sbGFwc2UKICAgICAgICAgKi8KICAgICAgICBzdGF0aWMgYXR0cmlidXRlTmFtZUZvclByb3BlcnR5KHByb3BlcnR5KSB7CiAgICAgICAgICByZXR1cm4gY2FtZWxUb0Rhc2hDYXNlKHByb3BlcnR5KTsKICAgICAgICB9CgogICAgICAgIC8qKg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yIGN1c3RvbWl6aW5nIG9yIHByb3ZpZGluZyBtb3JlIGVmZmljaWVudCBpbml0aWFsaXphdGlvbi4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBwcm9wcyBCYWcgb2YgcHJvcGVydHkgdmFsdWVzIHRoYXQgd2VyZSBvdmVyd3JpdHRlbgogICAgICAgICAqICAgd2hlbiBjcmVhdGluZyBwcm9wZXJ0eSBhY2Nlc3NvcnMuCiAgICAgICAgICogQHJldHVybiB7dm9pZH0KICAgICAgICAgKiBAcHJvdGVjdGVkCiAgICAgICAgICogQG92ZXJyaWRlCiAgICAgICAgICovCiAgICAgICAgX2luaXRpYWxpemVQcm90b1Byb3BlcnRpZXMocHJvcHMpIHsKICAgICAgICAgIGZvciAobGV0IHAgaW4gcHJvcHMpIHsKICAgICAgICAgICAgdGhpcy5fc2V0UHJvcGVydHkocCwgcHJvcHNbcF0pOwogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogRW5zdXJlcyB0aGUgZWxlbWVudCBoYXMgdGhlIGdpdmVuIGF0dHJpYnV0ZS4gSWYgaXQgZG9lcyBub3QsCiAgICAgICAgICogYXNzaWducyB0aGUgZ2l2ZW4gdmFsdWUgdG8gdGhlIGF0dHJpYnV0ZS4KICAgICAgICAgKgogICAgICAgICAqIEBzdXBwcmVzcyB7aW52YWxpZENhc3RzfSBDbG9zdXJlIGNhbid0IGZpZ3VyZSBvdXQgYHRoaXNgIGlzIGluZmFjdCBhbgogICAgICAgICAqICAgICBlbGVtZW50CiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gYXR0cmlidXRlIE5hbWUgb2YgYXR0cmlidXRlIHRvIGVuc3VyZSBpcyBzZXQuCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IHZhbHVlIG9mIHRoZSBhdHRyaWJ1dGUuCiAgICAgICAgICogQHJldHVybiB7dm9pZH0KICAgICAgICAgKiBAb3ZlcnJpZGUKICAgICAgICAgKi8KICAgICAgICBfZW5zdXJlQXR0cmlidXRlKGF0dHJpYnV0ZSwgdmFsdWUpIHsKICAgICAgICAgIGNvbnN0IGVsID0gLyoqIEB0eXBlIHshSFRNTEVsZW1lbnR9ICovKHRoaXMpOwogICAgICAgICAgaWYgKCFlbC5oYXNBdHRyaWJ1dGUoYXR0cmlidXRlKSkgewogICAgICAgICAgICB0aGlzLl92YWx1ZVRvTm9kZUF0dHJpYnV0ZShlbCwgdmFsdWUsIGF0dHJpYnV0ZSk7CiAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBPdmVycmlkZXMgUHJvcGVydGllc0NoYW5nZWQgaW1wbGVtZW50aW9uIHRvIHNlcmlhbGl6ZSBvYmplY3RzIGFzIEpTT04uCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFByb3BlcnR5IHZhbHVlIHRvIHNlcmlhbGl6ZS4KICAgICAgICAgKiBAcmV0dXJuIHtzdHJpbmcgfCB1bmRlZmluZWR9IFN0cmluZyBzZXJpYWxpemVkIGZyb20gdGhlIHByb3ZpZGVkIHByb3BlcnR5CiAgICAgICAgICogICAgIHZhbHVlLgogICAgICAgICAqIEBvdmVycmlkZQogICAgICAgICAqLwogICAgICAgIF9zZXJpYWxpemVWYWx1ZSh2YWx1ZSkgewogICAgICAgICAgLyogZXNsaW50LWRpc2FibGUgbm8tZmFsbHRocm91Z2ggKi8KICAgICAgICAgIHN3aXRjaCAodHlwZW9mIHZhbHVlKSB7CiAgICAgICAgICAgIGNhc2UgJ29iamVjdCc6CiAgICAgICAgICAgICAgaWYgKHZhbHVlIGluc3RhbmNlb2YgRGF0ZSkgewogICAgICAgICAgICAgICAgcmV0dXJuIHZhbHVlLnRvU3RyaW5nKCk7CiAgICAgICAgICAgICAgfSBlbHNlIGlmICh2YWx1ZSkgewogICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgcmV0d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bGl6ZS4KICAgICAgICAgKiBAcGFyYW0geyo9fSB0eXBlIFR5cGUgdG8gZGVzZXJpYWxpemUgdGhlIHN0cmluZyB0by4KICAgICAgICAgKiBAcmV0dXJuIHsqfSBUeXBlZCB2YWx1ZSBkZXNlcmlhbGl6ZWQgZnJvbSB0aGUgcHJvdmlkZWQgc3RyaW5nLgogICAgICAgICAqIEBvdmVycmlkZQogICAgICAgICAqLwogICAgICAgIF9kZXNlcmlhbGl6ZVZhbHVlKHZhbHVlLCB0eXBlKSB7CiAgICAgICAgICAvKioKICAgICAgICAgICAqIEB0eXBlIHsqfQogICAgICAgICAgICovCiAgICAgICAgICBsZXQgb3V0VmFsdWU7CiAgICAgICAgICBzd2l0Y2ggKHR5cGUpIHsKICAgICAgICAgICAgY2FzZSBPYmplY3Q6CiAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgIG91dFZhbHVlID0gSlNPTi5wYXJzZSgvKiogQHR5cGUge3N0cmluZ30gKi8odmFsdWUpKTsKICAgICAgICAgICAgICB9IGNhdGNoKHgpIHsKICAgICAgICAgICAgICAgIC8vIGFsbG93IG5vbi1KU09OIGxpdGVyYWxzIGxpa2UgU3RyaW5ncyBhbmQgTnVtYmVycwogICAgICAgICAgICAgICAgb3V0VmFsdWUgPSB2YWx1ZTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGNhc2UgQXJyYXk6CiAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgIG91dFZhbHVlID0gSlNPTi5wYXJzZSgvKiogQHR5cGUge3N0cmluZ30gKi8odmFsdWUpKTsKICAgICAgICAgICAgICB9IGNhdGNoKHgpIHsKICAgICAgICAgICAgICAgIG91dFZhbHVlID0gbnVsbDsKICAgICAgICAgICAgICAgIGNvbnNvbGUud2FybihgUG9seW1lcjo6QXR0cmlidXRlczogY291bGRuJ3QgZGVjb2RlIEFycmF5IGFzIEpTT046ICR7dmFsdWV9YCk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlIERhdGU6CiAgICAgICAgICAgICAgb3V0VmFsdWUgPSBpc05hTih2YWx1ZSkgPyBTdHJpbmcodmFsdWUpIDogTnVtYmVyKHZhbHVlKTsKICAgICAgICAgICAgICBvdXRWYWx1ZSA9IG5ldyBEYXRlKG91dFZhbHVlKTsKICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgICBvdXRWYWx1ZSA9IHN1cGVyLl9kZXNlcmlhbGl6ZVZhbHVlKHZhbHVlLCB0eXBlKTsKICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiBvdXRWYWx1ZTsKICAgICAgICB9CiAgICAgICAgLyogZXNsaW50LWVuYWJsZSBuby1mYWxsdGhyb3VnaCAqLwoKICAgICAgICAvKioKICAgICAgICAgKiBPdmVycmlkZXMgUHJvcGVydGllc0NoYW5nZWQgaW1wbGVtZW50YXRpb24gdG8gc2F2ZSBleGlzdGluZyBwcm90b3R5cGUKICAgICAgICAgKiBwcm9wZXJ0eSB2YWx1ZSBzbyB0aGF0IGl0IGNhbiBiZSByZXNldC4KICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gcHJvcGVydHkgTmFtZSBvZiB0aGUgcHJvcGVydHkKICAgICAgICAgKiBAcGFyYW0ge2Jvb2xlYW49fSByZWFkT25seSBXaGVuIHRydWUsIG5vIHNldHRlciBpcyBjcmVhdGVkCiAgICAgICAgICoKICAgICAgICAgKiBXaGVuIGNhbGxpbmcgb24gYSBwcm90b3R5cGUsIGFueSBvdmVyd3JpdHRlbiB2YWx1ZXMgYXJlIHNhdmVkIGluCiAgICAgICAgICogYF9fZGF0YVByb3RvYCwgYW5kIGl0IGlzIHVwIHRvIHRoZSBzdWJjbGFzc2VyIHRvIGRlY2lkZSBob3cvd2hlbgogICAgICAgICAqIHRvIHNldCB0aG9zZS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b25hbGx5CiAgICAgICAgICogYHBhcmVudGAsIHdoaWNoIHBvaW50cyB0byBub2RlIGluZm8gb2YgaXRzIHBhcmVudCAoaW5jbHVkaW5nIGl0cyBpbmRleCkuCiAgICAgICAgICoKICAgICAgICAgKiBUaGUgdGVtcGxhdGUgbWV0YWRhdGEgb2JqZWN0IHJldHVybmVkIGZyb20gdGhpcyBtZXRob2QgaGFzIHRoZSBmb2xsb3dpbmcKICAgICAgICAgKiBzdHJ1Y3R1cmUgKG1hbnkgZmllbGRzIG9wdGlvbmFsKToKICAgICAgICAgKgogICAgICAgICAqIGBgYGpzCiAgICAgICAgICogICB7CiAgICAgICAgICogICAgIC8vIEZsYXR0ZW5lZCBsaXN0IG9mIG5vZGUgbWV0YWRhdGEgKGZvciBub2RlcyB0aGF0IGdlbmVyYXRlZCBtZXRhZGF0YSkKICAgICAgICAgKiAgICAgbm9kZUluZm9MaXN0OiBbCiAgICAgICAgICogICAgICAgewogICAgICAgICAqICAgICAgICAgLy8gYGlkYCBhdHRyaWJ1dGUgZm9yIGFueSBub2RlcyB3aXRoIGlkJ3MgZm9yIGdlbmVyYXRpbmcgYCRgIG1hcAogICAgICAgICAqICAgICAgICAgaWQ6IHtzdHJpbmd9LAogICAgICAgICAqICAgICAgICAgLy8gYG9uLWV2ZW50PSJoYW5kbGVyImAgbWV0YWRhdGEKICAgICAgICAgKiAgICAgICAgIGV2ZW50czogWwogICAgICAgICAqICAgICAgICAgICB7CiAgICAgICAgICogICAgICAgICAgICAgbmFtZToge3N0cmluZ30sICAgLy8gZXZlbnQgbmFtZQogICAgICAgICAqICAgICAgICAgICAgIHZhbHVlOiB7c3RyaW5nfSwgIC8vIGhhbmRsZXIgbWV0aG9kIG5hbWUKICAgICAgICAgKiAgICAgICAgICAgfSwgLi4uCiAgICAgICAgICogICAgICAgICBdLAogICAgICAgICAqICAgICAgICAgLy8gTm90ZXMgd2hlbiB0aGUgdGVtcGxhdGUgY29udGFpbmVkIGEgYDxzbG90PmAgZm9yIHNoYWR5IERPTQogICAgICAgICAqICAgICAgICAgLy8gb3B0aW1pemF0aW9uIHB1cnBvc2VzCiAgICAgICAgICogICAgICAgICBoYXNJbnNlcnRpb25Qb2ludDoge2Jvb2xlYW59LAogICAgICAgICAqICAgICAgICAgLy8gRm9yIG5lc3RlZCBgPHRlbXBsYXRlPmBgIG5vZGVzLCBuZXN0ZWQgdGVtcGxhdGUgbWV0YWRhdGEKICAgICAgICAgKiAgICAgICAgIHRlbXBsYXRlSW5mbzoge29iamVjdH0sIC8vIG5lc3RlZCB0ZW1wbGF0ZSBtZXRhZGF0YQogICAgICAgICAqICAgICAgICAgLy8gTWV0YWRhdGEgdG8gYWxsb3cgZWZmaWNpZW50IHJldHJpZXZhbCBvZiBpbnN0YW5jZWQgbm9kZQogICAgICAgICAqICAgICAgICAgLy8gY29ycmVzcG9uZGluZyB0byB0aGlzIG1ldGFkYXRhCiAgICAgICAgICogICAgICAgICBwYXJlbnRJbmZvOiB7bnVtYmVyfSwgICAvLyByZWZlcmVuY2UgdG8gcGFyZW50IG5vZGVJbmZvPgogICAgICAgICAqICAgICAgICAgcGFyZW50SW5kZXg6IHtudW1iZXJ9LCAgLy8gaW5kZXggaW4gcGFyZW50J3MgYGNoaWxkTm9kZXNgIGNvbGxlY3Rpb24KICAgICAgICAgKiAgICAgICAgIGluZm9JbmRleDoge251bWJlcn0sICAgIC8vIGluZGV4IG9mIHRoaXMgYG5vZGVJbmZvYCBpbiBgdGVtcGxhdGVJbmZvLm5vZGVJbmZvTGlzdGAKICAgICAgICAgKiAgICAgICB9LAogICAgICAgICAqICAgICAgIC4uLgogICAgICAgICAqICAgICBdLAogICAgICAgICAqICAgICAvLyBXaGVuIHRydWUsIHRoZSB0ZW1wbGF0ZSBoYWQgdGhlIGBzdHJpcC13aGl0ZXNwYWNlYCBhdHRyaWJ1dGUKICAgICAgICAgKiAgICAgLy8gb3Igd2FzIG5lc3RlZCBpbiBhIHRlbXBsYXRlIHdpdGggdGhhdCBzZXR0aW5nCiAgICAgICAgICogICAgIHN0cmlwV2hpdGVzcGFjZToge2Jvb2xlYW59LAogICAgICAgICAqICAgICAvLyBGb3IgbmVzdGVkIHRlbXBsYXRlcywgbmVzdGVkIHRlbXBsYXRlIGNvbnRlbnQgaXMgbW92ZWQgaW50bwogICAgICAgICAqICAgICAvLyBhIGRvY3VtZW50IGZyYWdtZW50IHN0b3JlZCBoZXJlOyB0aGlzIGlzIGFuIG9wdGltaXphdGlvbiB0bwogICAgICAgICAqICAgICAvLyBhdm9pZCB0aGUgY29zdCBvZiBuZXN0ZWQgdGVtcGxhdGUgY2xvbmluZwogICAgICAgICAqICAgICBjb250ZW50OiB7RG9jdW1lbnRGcmFnbWVudH0KICAgICAgICAgKiAgIH0KICAgICAgICAgKiBgYGAKICAgICAgICAgKgogICAgICAgICAqIFRoaXMgbWV0aG9kIGtpY2tzIG9mZiBhIHJlY3Vyc2l2ZSB0cmVld2FsayBhcyBmb2xsb3dzOgogICAgICAgICAqCiAgICAgICAgICogYGBgCiAgICAgICAgICogICAgX3BhcnNlVGVtcGxhdGUgPC0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKICAgICAgICAgKiAgICAgIF9wYXJzZVRlbXBsYXRlQ29udGVudCAgICAgICAgICAgICAgfAogICAgICAgICAqICAgICAgICBfcGFyc2VUZW1wbGF0ZU5vZGUgIDwtLS0tLS0tLS0tLS18LS0rCiAgICAgICAgICogICAgICAgICAgX3BhcnNlVGVtcGxhdGVOZXN0ZWRUZW1wbGF0ZSAtLSsgIHwKICAgICAgICAgKiAgICAgICAgICBfcGFyc2VUZW1wbGF0ZUNoaWxkTm9kZXMgLS0tLS0tLS0tKwogICAgICAgICAqICAgICAgICAgIF9wYXJzZVRlbXBsYXRlTm9kZUF0dHJpYnV0ZXMKICAgICAgICAgKiAgICAgICAgICAgIF9wYXJzZVRlbXBsYXRlTm9kZUF0dHJpYnV0ZQogICAgICAgICAqCiAgICAgICAgICogYGBgCiAgICAgICAgICoKICAgICA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hvdWxkIHdvcmsgYnV0IGRvZXMgbm90IHNvIHdlIGRvIHRoaXMKICAgICAgICAgICAgLy8gbWFudWFsbHkuCiAgICAgICAgICAgIG5leHQgPSBub2RlLm5leHRTaWJsaW5nOwogICAgICAgICAgICBpZiAobm9kZS5ub2RlVHlwZSA9PT0gTm9kZS5URVhUX05PREUpIHsKICAgICAgICAgICAgICBsZXQgLyoqIE5vZGUgKi8gbiA9IG5leHQ7CiAgICAgICAgICAgICAgd2hpbGUgKG4gJiYgKG4ubm9kZVR5cGUgPT09IE5vZGUuVEVYVF9OT0RFKSkgewogICAgICAgICAgICAgICAgbm9kZS50ZXh0Q29udGVudCArPSBuLnRleHRDb250ZW50OwogICAgICAgICAgICAgICAgbmV4dCA9IG4ubmV4dFNpYmxpbmc7CiAgICAgICAgICAgICAgICByb290LnJlbW92ZUNoaWxkKG4pOwogICAgICAgICAgICAgICAgbiA9IG5leHQ7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIC8vIG9wdGlvbmFsbHkgc3RyaXAgd2hpdGVzcGFjZQogICAgICAgICAgICAgIGlmICh0ZW1wbGF0ZUluZm8uc3RyaXBXaGl0ZVNwYWNlICYmICFub2RlLnRleHRDb250ZW50LnRyaW0oKSkgewogICAgICAgICAgICAgICAgcm9vdC5yZW1vdmVDaGlsZChub2RlKTsKICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBsZXQgY2hpbGRJbmZvID0KICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7IU5vZGVJbmZvfSAqLyAoe3BhcmVudEluZGV4LCBwYXJlbnRJbmZvOiBub2RlSW5mb30pOwogICAgICAgICAgICBpZiAodGhpcy5fcGFyc2VUZW1wbGF0ZU5vZGUobm9kZSwgdGVtcGxhdGVJbmZvLCBjaGlsZEluZm8pKSB7CiAgICAgICAgICAgICAgY2hpbGRJbmZvLmluZm9JbmRleCA9IHRlbXBsYXRlSW5m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JpYnV0ZSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4ge2Jvb2xlYW59IGB0cnVlYCBpZiB0aGUgdmlzaXRlZCBub2RlIGFkZGVkIG5vZGUtc3BlY2lmaWMKICAgICAgICAgKiAgIG1ldGFkYXRhIHRvIGBub2RlSW5mb2AKICAgICAgICAgKiBAbm9jb2xsYXBzZQogICAgICAgICAqLwogICAgICAgIHN0YXRpYyBfcGFyc2VUZW1wbGF0ZU5vZGVBdHRyaWJ1dGUobm9kZSwgdGVtcGxhdGVJbmZvLCBub2RlSW5mbywgbmFtZSwgdmFsdWUpIHsKICAgICAgICAgIC8vIGV2ZW50cyAob24tKikKICAgICAgICAgIGlmIChuYW1lLnNsaWNlKDAsIDMpID09PSAnb24tJykgewogICAgICAgICAgICBub2RlLnJlbW92ZUF0dHJpYnV0ZShuYW1lKTsKICAgICAgICAgICAgbm9kZUluZm8uZXZlbnRzID0gbm9kZUluZm8uZXZlbnRzIHx8IFtdOwogICAgICAgICAgICBub2RlSW5mby5ldmVudHMucHVzaCh7CiAgICAgICAgICAgICAgbmFtZTogbmFtZS5zbGljZSgzKSwKICAgICAgICAgICAgICB2YWx1ZQogICAgICAgICAgICB9KTsKICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICB9CiAgICAgICAgICAvLyBzdGF0aWMgaWQKICAgICAgICAgIGVsc2UgaWYgKG5hbWUgPT09ICdpZCcpIHsKICAgICAgICAgICAgbm9kZUluZm8uaWQgPSB2YWx1ZTsKICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBSZXR1cm5zIHRoZSBgY29udGVudGAgZG9jdW1lbnQgZnJhZ21lbnQgZm9yIGEgZ2l2ZW4gdGVtcGxhdGUuCiAgICAgICAgICoKICAgICAgICAgKiBGb3IgbmVzdGVkIHRlbXBsYXRlcywgUG9seW1lciBwZXJ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AgICAgICAgICAgYXBwbHlFdmVudExpc3RlbmVyKHRoaXMsIG5vZGUsIGluZm8pOwogICAgICAgICAgfQogICAgICAgICAgZG9tID0gLyoqIEB0eXBlIHshU3RhbXBlZFRlbXBsYXRlfSAqLyhkb20pOyAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIG5vLXNlbGYtYXNzaWduCiAgICAgICAgICByZXR1cm4gZG9tOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQWRkcyBhbiBldmVudCBsaXN0ZW5lciBieSBtZXRob2QgbmFtZSBmb3IgdGhlIGV2ZW50IHByb3ZpZGVkLgogICAgICAgICAqCiAgICAgICAgICogVGhpcyBtZXRob2QgZ2VuZXJhdGVzIGEgaGFuZGxlciBmdW5jdGlvbiB0aGF0IGxvb2tzIHVwIHRoZSBtZXRob2QKICAgICAgICAgKiBuYW1lIGF0IGhhbmRsaW5nIHRpbWUuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0geyFFdmVudFRhcmdldH0gbm9kZSBOb2RlIHRvIGFkZCBsaXN0ZW5lciBvbgogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBldmVudE5hbWUgTmFtZSBvZiBldmVudAogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBtZXRob2ROYW1lIE5hbWUgb2YgbWV0aG9kCiAgICAgICAgICogQHBhcmFtIHsqPX0gY29udGV4dCBDb250ZXh0IHRoZSBtZXRob2Qgd2lsbCBiZSBjYWxsZWQgb24gKGRlZmF1bHRzCiAgICAgICAgICogICB0byBgbm9kZWApCiAgICAgICAgICogQHJldHVybiB7RnVuY3Rpb259IEdlbmVyYXRlZCBoYW5kbGVyIGZ1bmN0aW9uCiAgICAgICAgICogQG92ZXJyaWRlCiAgICAgICAgICovCiAgICAgICAgX2FkZE1ldGhvZEV2ZW50TGlzdGVuZXJUb05vZGUobm9kZSwgZXZlbnROYW1lLCBtZXRob2ROYW1lLCBjb250ZXh0KSB7CiAgICAgICAgICBj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FueSBhcnJheXMgYXNzaWduZWQgdG8gdGhlIG1hcCB3aGVuCiAgICAgKiAgIGV4dGVuZGluZyBhIHN1cGVyY2xhc3MgbWFwIG9udG8gdGhpcyBzdWJjbGFzcwogICAgICogQHJldHVybiB7T2JqZWN0fSBUaGUgb3duLXByb3BlcnR5IG1hcCBvZiBlZmZlY3RzIGZvciB0aGUgZ2l2ZW4gdHlwZQogICAgICogQHByaXZhdGUKICAgICAqLwogICAgZnVuY3Rpb24gZW5zdXJlT3duRWZmZWN0TWFwKG1vZGVsLCB0eXBlLCBjbG9uZUFycmF5cykgewogICAgICBsZXQgZWZmZWN0cyA9IG1vZGVsW3R5cGVdOwogICAgICBpZiAoIWVmZmVjdHMpIHsKICAgICAgICBlZmZlY3RzID0gbW9kZWxbdHlwZV0gPSB7fTsKICAgICAgfSBlbHNlIGlmICghbW9kZWwuaGFzT3duUHJvcGVydHkodHlwZSkpIHsKICAgICAgICBlZmZlY3RzID0gbW9kZWxbdHlwZV0gPSBPYmplY3QuY3JlYXRlKG1vZGVsW3R5cGVdKTsKICAgICAgICBpZiAoY2xvbmVBcnJheXMpIHsKICAgICAgICAgIGZvciAobGV0IHAgaW4gZWZmZWN0cykgewogICAgICAgICAgICBsZXQgcHJvdG9GeCA9IGVmZmVjdHNbcF07CiAgICAgICAgICAgIC8vIFBlcmYgb3B0aW1pemF0aW9uIG92ZXIgQXJyYXkuc2xpY2UKICAgICAgICAgICAgbGV0IGluc3RGeCA9IGVmZmVjdHNbcF0gPSBBcnJheShwcm90b0Z4Lmxlbmd0aCk7CiAgICAgICAgICAgIGZvciAobGV0IGk9MDsgaTxwcm90b0Z4Lmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgaW5zdEZ4W2ldID0gcHJvdG9GeFtpXTsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgICByZXR1cm4gZWZmZWN0czsKICAgIH0KCiAgICAvLyAtLSBlZmZlY3RzIC0tLS0tL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hbiA9IGZhbHNlOwogICAgICAgIGNvbnN0IGlkID0gZGVkdXBlSWQkMSsrOwogICAgICAgIGZvciAobGV0IHByb3AgaW4gcHJvcHMpIHsKICAgICAgICAgIC8vIElubGluZSBgcnVuRWZmZWN0c0ZvclByb3BlcnR5YCBmb3IgcGVyZi4KICAgICAgICAgIGxldCByb290UHJvcGVydHkgPSBoYXNQYXRocyA/IHJvb3QocHJvcCkgOiBwcm9wOwogICAgICAgICAgbGV0IGZ4cyA9IGVmZmVjdHNbcm9vdFByb3BlcnR5XTsKICAgICAgICAgIGlmIChmeHMpIHsKICAgICAgICAgICAgZm9yIChsZXQgaT0wLCBsPWZ4cy5sZW5ndGgsIGZ4OyAoaTxsKSAmJiAoZng9ZnhzW2ldKTsgaSsrKSB7CiAgICAgICAgICAgICAgaWYgKCghZnguaW5mbyB8fCBmeC5pbmZvLmxhc3RSdW4gIT09IGlkKSAmJgogICAgICAgICAgICAgICAgICAoIWhhc1BhdGhzIHx8IHBhdGhNYXRjaGVzVHJpZ2dlcihwcm9wLCBmeC50cmlnZ2VyKSkpIHsKICAgICAgICAgICAgICAgIGlmIChmeC5pbmZvKSB7CiAgICAgICAgICAgICAgICAgIGZ4LmluZm8ubGFzdFJ1biA9IGlkOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnguZm4oaW5zdCwgcHJvcCwgcHJvcHMsIG9sZFByb3BzLCBmeC5pbmZvLCBoYXNQYXRocywgZXh0cmFBcmdzKTsKICAgICAgICAgICAgICAgIHJhbiA9IHRydWU7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiByYW47CiAgICAgIH0KICAgICAgcmV0dXJuIGZhbHNlOwogICAgfQoKICAgIC8qKgogICAgICogUnVucyBhIGxpc3Qgb2YgZWZmZWN0cyBmb3IgYSBnaXZlbiBwcm9wZXJ0eS4KICAgICAqCiAgICAgKiBAcGFyYW0geyFQb2x5bWVyX1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3JkZXJlZCkgewogICAgICAgIG9yZGVyZWQgPSBuZXcgTWFwKCk7CiAgICAgICAgY29uc3QgZWZmZWN0cyA9IGluc3RbVFlQRVMuQ09NUFVURV07CiAgICAgICAgbGV0IHtjb3VudHMsIHJlYWR5LCB0b3RhbH0gPSBkZXBlbmRlbmN5Q291bnRzKGluc3QpOwogICAgICAgIGxldCBjdXJyOwogICAgICAgIHdoaWxlICgoY3VyciA9IHJlYWR5LnNoaWZ0KCkpKSB7CiAgICAgICAgICBvcmRlcmVkLnNldChjdXJyLCBvcmRlcmVkLnNpemUpOwogICAgICAgICAgY29uc3QgY29tcHV0ZWRCeUN1cnIgPSBlZmZlY3RzW2N1cnJdOwogICAgICAgICAgaWYgKGNvbXB1dGVkQnlDdXJyKSB7CiAgICAgICAgICAgIGNvbXB1dGVkQnlDdXJyLmZvckVhY2goZnggPT4gewogICAgICAgICAgICAgIC8vIE5vdGUgYG1ldGhvZEluZm9gIGlzIHdoZXJlIHRoZSBjb21wdXRlZCBwcm9wZXJ0eSBuYW1lIGlzIHN0b3JlZAogICAgICAgICAgICAgIGNvbnN0IGNvbXB1dGVkUHJvcCA9IGZ4LmluZm8ubWV0aG9kSW5mbzsKICAgICAgICAgICAgICAtLXRvdGFsOwogICAgICAgICAgICAgIGlmICgtLWNvdW50c1tjb21wdXRlZFByb3BdID09PSAwKSB7CiAgICAgICAgICAgICAgICByZWFkeS5wdXNoKGNvbXB1dGVkUHJvcCk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaWYgKHRvdGFsICE9PSAwKSB7CiAgICAgICAgICBjb25zdCBlbCA9IC8qKiBAdHlwZSB7SFRNTEVsZW1lbnR9ICovIChpbnN0KTsKICAgICAgICAgIGNvbnNvbGUud2FybihgQ29tcHV0ZWQgZ3JhcGggZm9yICR7ZWwubG9jYWxOYW1lfSBpbmNvbXBsZXRlOyBjaXJjdWxhcj9gKTsKICAgICAgICB9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ZXJlbmNlcyBvbnRvIHRoZSBib3VuZCBub2RlTGlzdC4KICAgICAqCiAgICAgKiBAcGFyYW0geyFQb2x5bWVyX1Byb3BlcnR5RWZmZWN0c30gaW5zdCBJbnN0YW5jZSB0aGF0IGJhcyBiZWVuIHByZXZpb3VzbHkKICAgICAqICAgICBib3VuZAogICAgICogQHBhcmFtIHtUZW1wbGF0ZUluZm99IHRlbXBsYXRlSW5mbyBUZW1wbGF0ZSBtZXRhZGF0YQogICAgICogQHJldHVybiB7dm9pZH0KICAgICAqIEBwcml2YXRlCiAgICAgKi8KICAgIGZ1bmN0aW9uIHNldHVwQmluZGluZ3MoaW5zdCwgdGVtcGxhdGVJbmZvKSB7CiAgICAgIC8vIFNldHVwIGNvbXBvdW5kIHN0b3JhZ2UsIGRhdGFIb3N0LCBhbmQgbm90aWZ5IGxpc3RlbmVycwogICAgICBsZXQge25vZGVMaXN0LCBub2RlSW5mb0xpc3R9ID0gdGVtcGxhdGVJbmZvOwogICAgICBpZiAobm9kZUluZm9MaXN0Lmxlbmd0aCkgewogICAgICAgIGZvciAobGV0IGk9MDsgaSA8IG5vZGVJbmZvTGlzdC5sZW5ndGg7IGkrKykgewogICAgICAgICAgbGV0IGluZm8gPSBub2RlSW5mb0xpc3RbaV07CiAgICAgICAgICBsZXQgbm9kZSA9IG5vZGVMaXN0W2ldOwogICAgICAgICAgbGV0IGJpbmRpbmdzID0gaW5mby5iaW5kaW5nczsKICAgICAgICAgIGlmIChiaW5kaW5ncykgewogICAgICAgICAgICBmb3IgKGxldCBpPTA7IGk8YmluZGluZ3MubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICBsZXQgYmluZGluZyA9IGJpbmRpbmdzW2ldOwogICAgICAgICAgICAgIHNldHVwQ29tcG91bmRTdG9yYWdlKG5vZGUsIGJpbmRpbmcpOwogICAgICAgICAgICAgIGFkZE5vdGlmeUxpc3RlbmVyKG5vZGUsIGluc3QsIGJpbmRpbmcpOwogICAgICAgICAgICB9CiAgIC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pZiAoYmluZGluZy5pc0NvbXBvdW5kKSB7CiAgICAgICAgLy8gQ3JlYXRlIGNvbXBvdW5kIHN0b3JhZ2UgbWFwCiAgICAgICAgbGV0IHN0b3JhZ2UgPSBub2RlLl9fZGF0YUNvbXBvdW5kU3RvcmFnZSB8fAogICAgICAgICAgKG5vZGUuX19kYXRhQ29tcG91bmRTdG9yYWdlID0ge30pOwogICAgICAgIGxldCBwYXJ0cyA9IGJpbmRpbmcucGFydHM7CiAgICAgICAgLy8gQ29weSBsaXRlcmFscyBmcm9tIHBhcnRzIGludG8gc3RvcmFnZSBmb3IgdGhpcyBiaW5kaW5nCiAgICAgICAgbGV0IGxpdGVyYWxzID0gbmV3IEFycmF5KHBhcnRzLmxlbmd0aCk7CiAgICAgICAgZm9yIChsZXQgaj0wOyBqPHBhcnRzLmxlbmd0aDsgaisrKSB7CiAgICAgICAgICBsaXRlcmFsc1tqXSA9IHBhcnRzW2pdLmxpdGVyYWw7CiAgICAgICAgfQogICAgICAgIGxldCB0YXJnZXQgPSBiaW5kaW5nLnRhcmdldDsKICAgICAgICBzdG9yYWdlW3RhcmdldF0gPSBsaXRlcmFsczsKICAgICAgICAvLyBDb25maWd1cmUgcHJvcGVydGllcyB3aXRoIHRoZWlyIGxpdGVyYWwgcGFydHMKICAgICAgICBpZiAoYmluZGluZy5saXRlcmFsICYmIGJpbmRpbmcua2luZCA9PSAncHJvcGVydHknKSB7CiAgICAgICAgICAvLyBOb3RlLCBjbGFzc05hbWUgbmVlZHMgc3R5bGUgc2NvcGluZyBzbyB0aGlzIG5lZWRzIHdyYXBwaW5nLgogICAgICAgICAgLy8gV2UgbWF5IGFsc28gd2FudCB0byBjb25zaWRlciBkb2luZyB0aGlzIGZvciBgdGV4dENvbnRlbnRgIGFuZAogICAgICAgICAgLy8gYGlubmVySFRNTGAuCiAgICAgICAgICBpZiAodGFyZ2V0ID09PSAnY2xhc3NOYW1lJykgewogICAgICAgICAgICBub2RlID0gd3JhcChub2RlKTsKICAg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EUVVPVEVfU1RSSU5HICsgJyknOwogICAgY29uc3QgQVJHVU1FTlQgPSAnKD86KCcgKyBJREVOVCArICd8JyArIE5VTUJFUiArICd8JyArICBTVFJJTkcgKyAnKVxccyonICsgJyknOwogICAgY29uc3QgQVJHVU1FTlRTID0gJyg/OicgKyBBUkdVTUVOVCArICcoPzosXFxzKicgKyBBUkdVTUVOVCArICcpKicgKyAnKSc7CiAgICBjb25zdCBBUkdVTUVOVF9MSVNUID0gJyg/OicgKyAnXFwoXFxzKicgKwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJyg/OicgKyBBUkdVTUVOVFMgKyAnPycgKyAnKScgKwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdcXClcXHMqJyArICcpJzsKICAgIGNvbnN0IEJJTkRJTkcgPSAnKCcgKyBJREVOVCArICdcXHMqJyArIEFSR1VNRU5UX0xJU1QgKyAnPycgKyAnKSc7IC8vIEdyb3VwIDMKICAgIGNvbnN0IE9QRU5fQlJBQ0tFVCA9ICcoXFxbXFxbfHt7KScgKyAnXFxzKic7CiAgICBjb25zdCBDTE9TRV9CUkFDS0VUID0gJyg/Ol1dfH19KSc7CiAgICBjb25zdCBORUdBVEUgPSAnKD86KCEpXFxzKik/JzsgLy8gR3JvdXAgMgogICAgY29uc3QgRVhQUkVTU0lPTiA9IE9QRU5fQlJBQ0tFVCArIE5FR0FURSArIEJJTkRJTkcgKyBDTE9TRV9CUkFDS0VUOwogICAgY29uc3QgYmluZGluZ1JlZ2V4ID0gbmV3IFJlZ0V4cChFWFBSRVNTSU9OLCAiZyIpOwoKICAgIC8qKgogICAgICogQ3JlYXRlIGEgc3RyaW5nIGZyb20gYmluZGluZyBwYXJ0cyBvZiBhbGwgdGhlIGxpdGVyYWwgcGFydHMKICAgICAqCiAgICAgKiBAcGFyYW0geyFBcnJheTxCaW5kaW5nUGFydD59IHBhcnRzIEFsbCBwYXJ0cyB0byBzdHJpbmdpZnkKICAgICAqIEByZXR1cm4ge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ICAgICAqIEByZXR1cm4geyFNZXRob2RBcmd9IEFyZ3VtZW50IG1ldGFkYXRhIG9iamVjdAogICAgICogQHByaXZhdGUKICAgICAqLwogICAgZnVuY3Rpb24gcGFyc2VBcmcocmF3QXJnKSB7CiAgICAgIC8vIGNsZWFuIHVwIHdoaXRlc3BhY2UKICAgICAgbGV0IGFyZyA9IHJhd0FyZy50cmltKCkKICAgICAgICAvLyByZXBsYWNlIGNvbW1hIGVudGl0eSB3aXRoIGNvbW1hCiAgICAgICAgLnJlcGxhY2UoLyZjb21tYTsvZywgJywnKQogICAgICAgIC8vIHJlcGFpciBleHRyYSBlc2NhcGUgc2VxdWVuY2VzOyBub3RlIG9ubHkgY29tbWFzIHN0cmljdGx5IG5lZWQKICAgICAgICAvLyBlc2NhcGluZywgYnV0IHdlIGFsbG93IGFueSBvdGhlciBjaGFyIHRvIGJlIGVzY2FwZWQgc2luY2UgaXRzCiAgICAgICAgLy8gbGlrZWx5IHVzZXJzIHdpbGwgZG8gdGhpcwogICAgICAgIC5yZXBsYWNlKC9cXCguKS9nLCAnXCQxJykKICAgICAgICA7CiAgICAgIC8vIGJhc2ljIGFyZ3VtZW50IGRlc2NyaXB0b3IKICAgICAgbGV0IGEgPSB7CiAgICAgICAgbmFtZTogYXJnLAogICAgICAgIHZhbHVlOiAnJywKICAgICAgICBsaXRlcmFsOiBmYWxzZQogICAgICB9OwogICAgICAvLyBkZXRlY3QgbGl0ZXJhbCB2YWx1ZSAobXVzdCBiZSBTdHJpbmcgb3IgTnVtYmVyKQogICAgICBsZXQgZmMgPSBhcmdbMF07CiAgICAgIGlmIChmYyA9PT0gJy0nKSB7CiAgICAgICAgZmMgPSBhcmdbMV07CiAgICAgIH0KICAgICAgaWYgKGZjID49ICcwJyAmJiBmYyA8PSAnOScpIHsKICAgICAgICBmYyA9ICcjJzsKICAgICAgfQogICAgICBzd2l0Y2goZmMpIHsKICAgICAgICBjYXNlICInIjoKICAgICAgICBjYXNlICciJzoKICAgICAgICAg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dH0gKi8KICAgICAgICAgIHRoaXMuX19kYXRhVG9Ob3RpZnk7CiAgICAgICAgICAvKiogQHR5cGUge09iamVjdH0gKi8KICAgICAgICAgIHRoaXMuX19kYXRhTGlua2VkUGF0aHM7CiAgICAgICAgICAvKiogQHR5cGUge2Jvb2xlYW59ICovCiAgICAgICAgICB0aGlzLl9fZGF0YUhhc1BhdGhzOwogICAgICAgICAgLyoqIEB0eXBlIHtPYmplY3R9ICovCiAgICAgICAgICB0aGlzLl9fZGF0YUNvbXBvdW5kU3RvcmFnZTsKICAgICAgICAgIC8qKiBAdHlwZSB7UG9seW1lcl9Qcm9wZXJ0eUVmZmVjdHN9ICovCiAgICAgICAgICB0aGlzLl9fZGF0YUhvc3Q7CiAgICAgICAgICAvKiogQHR5cGUgeyFPYmplY3R9ICovCiAgICAgICAgICB0aGlzLl9fZGF0YVRlbXA7CiAgICAgICAgICAvKiogQHR5cGUge2Jvb2xlYW59ICovCiAgICAgICAgICB0aGlzLl9fZGF0YUNsaWVudHNJbml0aWFsaXplZDsKICAgICAgICAgIC8qKiBAdHlwZSB7IU9iamVjdH0gKi8KICAgICAgICAgIHRoaXMuX19kYXRhOwogICAgICAgICAgLyoqIEB0eXBlIHshT2JqZWN0fG51bGx9ICovCiAgICAgICAgICB0aGlzLl9fZGF0YVBlbmRpbmc7CiAgICAgICAgICAvKiogQHR5cGUgeyFPYmplY3R9ICovCiAgICAgICAgICB0aGlzLl9fZGF0YU9sZDsKICAgICAgICAgIC8qKiBAdHlwZSB7T2JqZWN0fSAqLwogICAgICAgICAgdGhpcy5fX2NvbXB1dGVFZmZlY3RzOwogICAgICAgICAgLyoqIEB0eXBlIHtPYmplY3R9ICovCiAgICAgICAgICB0aGlzLl9fY29tcHV0ZUluZm87CiAgICAgICAgICAvKiogQHR5cGUge09iamVjdH0gKi8KICAgICAgICAgIHRoaXMuX19yZWZsZWN0RWZmZWN0czsKICAgICAgICAgIC8qKiBAdHlwZSB7T2JqZWN0fSAqLwogICAgICAgICAgdGhpcy5fX25vdGlmeUVmZmVjdHM7CiAgICAgICAgICAvKiogQHR5cGUge09iamVjdH0gKi8KICAgICAgICAgIHRoaXMuX19wcm9wYWdhdGVFZmZlY3RzOwogICAgICAgICAgLyoqIEB0eXBlIHtPYmplY3R9ICovCiAgICAgICAgICB0aGlzLl9fb2JzZXJ2ZUVmZmVjdHM7CiAgICAgICAgICAvKiogQHR5cGUge09iamVjdH0gKi8KICAgICAgICAgIHRoaXMuX19yZWFkT25seTsKICAgICAgICAgIC8qKiBAdHlwZSB7IVRlbXBsYXRlSW5mb30gKi8KICAgICAgICAgIHRoaXMuX190ZW1wbGF0ZUluZm87CiAgICAgICAgICAvKiogQHR5cGUge2Jvb2xlYW59ICovCiAgICAgICAgICB0aGlzLl9vdmVycmlkZUxlZ2FjeVVuZGVmaW5lZDsKICAgICAgICB9CgogICAgICAgIGdldCBQUk9QRVJUWV9FRkZFQ1RfVFlQRVMoKSB7CiAgICAgICAgICByZXR1cm4gVFlQRVM7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBAb3ZlcnJpZGUKICAgICAgICAgKiBAcmV0dXJuIHt2b2lkfQogICAgICAgICAqLwogICAgICAgIF9pbml0aWFsaXplUHJvcGVydGllcygpIHsKICAgICAgICAgIHN1cGVyLl9pbml0aWFsaXplUHJvcGVydGllcygpOwogICAgICAgICAgdGhpcy5fcmVnaXN0ZXJIb3N0KCk7CiAgICAgICAgICB0aGlzLl9fZGF0YUNsaWVudHNSZWFkeSA9IGZhbHNlOwogICAgICAgICAgdGhpcy5fX2RhdGFQZW5kaW5nQ2xpZW50cyA9IG51bGw7CiAgICAgICAgICB0aGlzLl9fZGF0YVRvTm90aWZ5ID0gbnVsbDsKICAgICAgICAgIHRoaXMuX19kYXRhTGlua2VkUGF0aHMgPSBudWxsOwogICAgICAgICAgdGhpcy5fX2RhdGFIYXNQYXRocyA9IGZhbHNlOwogICAgICAgICAgLy8gTWF5IGJlIHNldCBvbiBpbnN0Y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GllcyB0byBpbml0aWFsaXplIG9uIHRoZSBwcm90b3R5cGUKICAgICAgICAgKiBAcmV0dXJuIHt2b2lkfQogICAgICAgICAqLwogICAgICAgIF9pbml0aWFsaXplUHJvdG9Qcm9wZXJ0aWVzKHByb3BzKSB7CiAgICAgICAgICB0aGlzLl9fZGF0YSA9IE9iamVjdC5jcmVhdGUocHJvcHMpOwogICAgICAgICAgdGhpcy5fX2RhdGFQZW5kaW5nID0gT2JqZWN0LmNyZWF0ZShwcm9wcyk7CiAgICAgICAgICB0aGlzLl9fZGF0YU9sZCA9IHt9OwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogT3ZlcnJpZGVzIGBQcm9wZXJ0eUFjY2Vzc29yc2AgaW1wbGVtZW50YXRpb24gdG8gYXZvaWQgc2V0dGluZwogICAgICAgICAqIGBfc2V0UHJvcGVydHlgJ3MgYHNob3VsZE5vdGlmeTogdHJ1ZWAuCiAgICAgICAgICoKICAgICAgICAgKiBAb3ZlcnJpZGUKICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gcHJvcHMgUHJvcGVydGllcyB0byBpbml0aWFsaXplIG9uIHRoZSBpbnN0YW5jZQogICAgICAgICAqIEByZXR1cm4ge3ZvaWR9CiAgICAgICAgICovCiAgICAgICAgX2luaXRpYWxpemVJbnN0YW5jZVByb3BlcnRpZXMocHJvcHMpIHsKICAgICAgICAgIGxldCByZWFkT25seSA9IHRoaXNbVFlQRVMuUkVBRF9PTkxZXTsKICAgICAgICAgIGZvciAobGV0IHByb3AgaW4gcHJvcHMpIHsKICAgICAgICAgICAgaWYgKCFyZWFkT25seSB8fCAhcmVhZE9ubHlbcHJvcF0pIHsKICAgICAgICAgICAgICB0aGlzLl9fZGF0YVBlbmRpbmcgPSB0aGlzLl9fZGF0YVBlbmRpbmcgfHwge307CiAgICAgICAgICAgICAgdGhpcy5fX2RhdGFPbGQgPSB0aGlzLl9fZGF0YU9sZCB8fCB7fTsKICAgICAgICAgICAgICB0aGlzL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N0IG9mIHRoaXMKICAgICAgICAgKiAgICAgdHlwZQogICAgICAgICAqIEBwcm90ZWN0ZWQKICAgICAgICAgKi8KICAgICAgICBfaGFzUmVhZE9ubHlFZmZlY3QocHJvcGVydHkpIHsKICAgICAgICAgIHJldHVybiB0aGlzLl9oYXNQcm9wZXJ0eUVmZmVjdChwcm9wZXJ0eSwgVFlQRVMuUkVBRF9PTkxZKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgd2hldGhlciB0aGUgY3VycmVudCBwcm90b3R5cGUvaW5zdGFuY2UgaGFzIGEgIm5vdGlmeSIKICAgICAgICAgKiBwcm9wZXJ0eSBlZmZlY3QgZm9yIHRoZSBnaXZlbiBwcm9wZXJ0eS4KICAgICAgICAgKgogICAgICAgICAqIEBvdmVycmlkZQogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBwcm9wZXJ0eSBQcm9wZXJ0eSBuYW1lCiAgICAgICAgICogQHJldHVybiB7Ym9vbGVhbn0gVHJ1ZSBpZiB0aGUgcHJvdG90eXBlL2luc3RhbmNlIGhhcyBhbiBlZmZlY3Qgb2YgdGhpcwogICAgICAgICAqICAgICB0eXBlCiAgICAgICAgICogQHByb3RlY3RlZAogICAgICAgICAqLwogICAgICAgIF9oYXNOb3RpZnlFZmZlY3QocHJvcGVydHkpIHsKICAgICAgICAgIHJldHVybiB0aGlzLl9oYXNQcm9wZXJ0eUVmZmVjdChwcm9wZXJ0eSwgVFlQRVMuTk9USUZZKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgd2hldGhlciB0aGUgY3VycmVudCBwcm90b3R5cGUvaW5zdGFuY2UgaGFzIGEgInJlZmxlY3QgdG8KICAgICAgICAgKiBhdHRyaWJ1dGUiIHByb3BlcnR5IGVmZmVjdCBmb3IgdGhlIGdpdmVuIHByb3BlcnR5LgogICAgICAgICAqCiAgICAgICAgICogQG92ZXJyaWRlCiAgICAgICAgICogQHBhcmFt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AgICBwYXRoID0gLyoqIEB0eXBlIHtzdHJpbmd9ICovIChzZXQodGhpcywgcGF0aCwgdmFsdWUpKTsKICAgICAgICAgICAgICAvLyBVc2UgcHJvcGVydHktYWNjZXNzb3IncyBzaW1wbGVyIGRpcnR5IGNoZWNrCiAgICAgICAgICAgICAgaWYgKCFwYXRoIHx8ICFzdXBlci5fc2hvdWxkUHJvcGVydHlDaGFuZ2UocGF0aCwgdmFsdWUsIG9sZCkpIHsKICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fX2RhdGFIYXNQYXRocyA9IHRydWU7CiAgICAgICAgICAgIGlmICh0aGlzLl9zZXRQZW5kaW5nUHJvcGVydHkoLyoqQHR5cGV7c3RyaW5nfSovKHBhdGgpLCB2YWx1ZSwgc2hvdWxkTm90aWZ5KSkgewogICAgICAgICAgICAgIGNvbXB1dGVMaW5rZWRQYXRocyh0aGlzLCAvKipAdHlwZXtzdHJpbmd9Ki8gKHBhdGgpLCB2YWx1ZSk7CiAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9fZGF0YUhhc0FjY2Vzc29yICYmIHRoaXMuX19kYXRhSGFzQWNjZXNzb3JbcGF0aF0pIHsKICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fc2V0UGVuZGluZ1Byb3BlcnR5KC8qKkB0eXBle3N0cmluZ30qLyhwYXRoKSwgdmFsdWUsIHNob3VsZE5vdGlmeSk7CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgdGhpc1twYXRoXSA9IHZhbHVlOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBBcHBsaWVzIGEgdmFsdWUgdG8gY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lbmRpbmcpIHsKICAgICAgICAgICAgICB0aGlzLl9fZGF0YVBlbmRpbmcgPSB7fTsKICAgICAgICAgICAgICB0aGlzLl9fZGF0YU9sZCA9IHt9OwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIEVuc3VyZSBvbGQgaXMgY2FwdHVyZWQgZnJvbSB0aGUgbGFzdCB0dXJuCiAgICAgICAgICAgIGlmICghKHByb3BlcnR5IGluIHRoaXMuX19kYXRhT2xkKSkgewogICAgICAgICAgICAgIHRoaXMuX19kYXRhT2xkW3Byb3BlcnR5XSA9IHRoaXMuX19kYXRhW3Byb3BlcnR5XTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBQYXRocyBhcmUgc3RvcmVkIGluIHRlbXBvcmFyeSBjYWNoZSAoY2xlYXJlZCBhdCBlbmQgb2YgdHVybiksCiAgICAgICAgICAgIC8vIHdoaWNoIGlzIHVzZWQgZm9yIGRpcnR5LWNoZWNraW5nLCBhbGwgb3RoZXJzIHN0b3JlZCBpbiBfX2RhdGEKICAgICAgICAgICAgaWYgKHByb3BJc1BhdGgpIHsKICAgICAgICAgICAgICB0aGlzLl9fZGF0YVRlbXBbcHJvcGVydHldID0gdmFsdWU7CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgdGhpcy5fX2RhdGFbcHJvcGVydHldID0gdmFsdWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gQWxsIGNoYW5nZXMgZ28gaW50byBwZW5kaW5nIHByb3BlcnR5IGJhZywgcGFzc2VkIHRvIF9wcm9wZXJ0aWVzQ2hhbmdlZAogICAgICAgICAgICB0aGlzLl9fZGF0YVBlbmRpbmdbcHJvcGVydHldID0gdmFsdWU7CiAgICAgICAgICAgIC8vIFRyYWNrIHByb3BlcnRpZXMgdGhhdCBzaG91bGQgbm90aWZ5IHNlcGFyYXRlbHkKICAgICAgICAgICAgaWYgKHByb3BJc1BhdGggfHwgKHRoaXNbVFlQRVMuTk9USUZZXSAmJiB0aGlzW1RZUEVTLk5PVElGWV1bcHJvcGVydHldKSkgewogICAgICAgICAgICAgIHRoaXMuX19kYXRhVG9Ob3RpZnkgPSB0aGlzLl9fZGF0YVRvTm90aWZ5IHx8IHt9OwogICAgICAgICAgICAgIHRoaXMuX19kYXRhVG9Ob3RpZnlbcHJvcGVydHldID0gc2hvdWxkTm90aWZ5OwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogT3ZlcnJpZGVzIGJhc2UgaW1wbGVtZW50YXRpb24gdG8gZW5zdXJlIGFsbCBhY2Nlc3NvcnMgc2V0IGBzaG91bGROb3RpZnlgCiAgICAgICAgICogdG8gdHJ1ZSwgZm9yIHBlci1wcm9wZXJ0eSBub3RpZmljYXRpb24gdHJhY2tpbmcuCiAgICAgICAgICoKICAgICAgICAgKiBAb3ZlcnJpZGUKICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gcHJvcGVydHkgTmFtZSBvZiB0aGUgcHJvcGVydHkKICAgICAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFZhbHVlIHRvIHNldAogICAgICAgICAqIEByZXR1cm4ge3ZvaWR9CiAgICAgICAgICovCiAgICAgICAgX3NldFByb3BlcnR5KHByb3BlcnR5LCB2YWx1ZSkgewogICAgICAgICAgaWYgKHRoaXMuX3NldFBlbmRpbmdQcm9wZXJ0eShwcm9wZXJ0eSwgdmFsdWUsIHRydWUpKSB7CiAgICAgICAgICAgIHRoaXMuX2ludmFsaWRhdGVQcm9wZXJ0aWVzKCk7CiAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBPdmVycmlkZXMgYFByb3BlcnR5QWNjZXNzb3JgJ3MgZGVmYXVsdCBhc3luYyBxdWV1aW5nIG9mCiAgICAgICAgICogYF9wcm9wZXJ0aWVzQ2hhbmdlZGA6IGlmIGBfX2RhdGFSZWFkeWAgaXMgZmFsc2UgKGhhcyBub3QgeWV0IGJlZW4KICAgICAgICAgKiBtYW51YWxseSBmbHVzaGVkKSwgdGhlIGZ1bmN0aW9uIG5vLW9wczsgb3RoZXJ3aXNlIGZsdXNoZXMKICAgICAgICAgKiBgX3Byb3BlcnRpZXNDaGFuZ2VkYCBzeW5jaHJvbm91c2x5LgogICAgICAgICAqCiAgICAgICAgICogQG92ZXJyaWRlCiAgICAgICAgICogQHJldHVybiB7dm9pZH0KICAgICAgICAgKi8KICAgICAgICBfaW52YWxpZGF0ZVByb3BlcnRpZXMoKSB7CiAgICAgICAgICBpZiAodGhpcy5fX2RhdGFSZWFkeSkgewogICAgICAgICAgICB0aGlzLl9mbHVzaFByb3BlcnRpZXMoKTsKICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIEVucXVldWVzIHRoZSBnaXZlbiBjbGllbnQgb24gYSBsaXN0IG9mIHBlbmRpbmcgY2xpZW50cywgd2hvc2UKICAgICAgICAgKiBwZW5kaW5nIHByb3BlcnR5IGNoYW5nZXMgY2FuIGxhdGVyIGJlIGZsdXNoZWQgdmlhIGEgY2FsbCB0bwogICAgICAgICAqIGBfZmx1c2hDbGllbnRzYC4KICAgICAgICAgKgogICAgICAgICAqIEBvdmVycmlkZQogICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBjbGllbnQgUHJvcGVydHlFZmZlY3RzIGNsaWVudCB0byBlbnF1ZXVlCiAgICAgICAgICogQHJldHVybiB7dm9pZH0KICAgICAgICAgKiBAcHJvdGVjdGVkCiAgICAgICAgICovCiAgICAgICAgX2VucXVldWVDbGllbnQoY2xpZW50KSB7CiAgICAgICAgICB0aGlzLl9fZGF0YVBlbmRpbmdDbGllbnRzID0gdGhpcy5fX2RhdGFQZW5kaW5nQ2xpZW50cyB8fCBbXTsKICAgICAgICAgIGlmIChjbGllbnQgIT09IHRoaXMpIHsKICAgICAgICAgICAgdGh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bnRzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgbGV0IGNsaWVudCA9IGNsaWVudHNbaV07CiAgICAgICAgICAgICAgaWYgKCFjbGllbnQuX19kYXRhRW5hYmxlZCkgewogICAgICAgICAgICAgICAgY2xpZW50Ll9lbmFibGVQcm9wZXJ0aWVzKCk7CiAgICAgICAgICAgICAgfSBlbHNlIGlmIChjbGllbnQuX19kYXRhUGVuZGluZykgewogICAgICAgICAgICAgICAgY2xpZW50Ll9mbHVzaFByb3BlcnRpZXMoKTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFBlcmZvcm0gYW55IGluaXRpYWwgc2V0dXAgb24gY2xpZW50IGRvbS4gQ2FsbGVkIGJlZm9yZSB0aGUgZmlyc3QKICAgICAgICAgKiBgX2ZsdXNoUHJvcGVydGllc2AgY2FsbCBvbiBjbGllbnQgZG9tIGFuZCBiZWZvcmUgYW55IGVsZW1lbnQKICAgICAgICAgKiBvYnNlcnZlcnMgYXJlIGNhbGxlZC4KICAgICAgICAgKgogICAgICAgICAqIEBvdmVycmlkZQogICAgICAgICAqIEByZXR1cm4ge3ZvaWR9CiAgICAgICAgICogQHByb3RlY3RlZAogICAgICAgICAqLwogICAgICAgIF9yZWFkeUNsaWVudHMoKSB7CiAgICAgICAgICB0aGlzLl9fZW5hYmxlT3JGbHVzaENsaWVudHMoKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgYSBiYWcgb2YgcHJvcGVydHkgY2hhbmdlcyB0byB0aGlzIGluc3RhbmNlLCBhbmQKICAgICAgICAgKiBzeW5jaHJvbm91c2x5IHByb2Nlc3NlcyBhbGwgZWZmZWN0cyBvZiB0aGUgcHJvcGVydGllcyBhcyBhIGJhdGNoLgogICAgICAgICAqCiAgICAgICAgICogUHJvcGVydHkgbmFtZXMgbXVzdCBiZSBzaW1wbGUgcHJvcGVydG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ZmZWN0c0ZvclRlbXBsYXRlKGluZm8sIGNoYW5nZWRQcm9wcywgb2xkUHJvcHMsIGhhc1BhdGhzKTsKICAgICAgICAgICAgfQogICAgICAgICAgfTsKICAgICAgICAgIGlmICh0ZW1wbGF0ZUluZm8ucnVuRWZmZWN0cykgewogICAgICAgICAgICB0ZW1wbGF0ZUluZm8ucnVuRWZmZWN0cyhiYXNlUnVuRWZmZWN0cywgY2hhbmdlZFByb3BzLCBoYXNQYXRocyk7CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICBiYXNlUnVuRWZmZWN0cyhjaGFuZ2VkUHJvcHMsIGhhc1BhdGhzKTsKICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIEFsaWFzZXMgb25lIGRhdGEgcGF0aCBhcyBhbm90aGVyLCBzdWNoIHRoYXQgcGF0aCBub3RpZmljYXRpb25zIGZyb20gb25lCiAgICAgICAgICogYXJlIHJvdXRlZCB0byB0aGUgb3RoZXIuCiAgICAgICAgICoKICAgICAgICAgKiBAb3ZlcnJpZGUKICAgICAgICAgKiBAcGFyYW0ge3N0cmluZyB8ICFBcnJheTxzdHJpbmd8bnVtYmVyPn0gdG8gVGFyZ2V0IHBhdGggdG8gbGluay4KICAgICAgICAgKiBAcGFyYW0ge3N0cmluZyB8ICFBcnJheTxzdHJpbmd8bnVtYmVyPn0gZnJvbSBTb3VyY2UgcGF0aCB0byBsaW5rLgogICAgICAgICAqIEByZXR1cm4ge3ZvaWR9CiAgICAgICAgICogQHB1YmxpYwogICAgICAgICAqLwogICAgICAgIGxpbmtQYXRocyh0bywgZnJvbSkgewogICAgICAgICAgdG8gPSBub3JtYWxpemUodG8pOwogICAgICAgICAgZnJvbSA9IG5vcm1hbGl6ZShmcm9tKTsKICAgICAgICAgIHRoaXMuX19kYXRhTGlua2VkUGF0aHMgPSB0aGlzLl9fZGF0YUxpbmtlZFBhdGhzIHx8IHt9OwogICAgICAgICAgdGhpcy5fX2RhdGFMaW5rZWRQYXRoc1t0b10gPSBmcm9tOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogUmVtb3ZlcyBhIGRhdGEgcGF0aCBhbGlhcyBwcmV2aW91c2x5IGVzdGFibGlzaGVkIHdpdGggYF9saW5rUGF0aHNgLgogICAgICAgICAqCiAgICAgICAgICogTm90ZSwgdGhlIHBhdGggdG8gdW5saW5rIHNob3VsZCBiZSB0aGUgdGFyZ2V0IChgdG9gKSB1c2VkIHdoZW4KICAgICAgICAgKiBsaW5raW5nIHRoZSBwYXRocy4KICAgICAgICAgKgogICAgICAgICAqIEBvdmVycmlkZQogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nIHwgIUFycmF5PHN0cmluZ3xudW1iZXI+fSBwYXRoIFRhcmdldCBwYXRoIHRvIHVubGluay4KICAgICAgICAgKiBAcmV0dXJuIHt2b2lkfQogICAgICAgICAqIEBwdWJsaWMKICAgICAgICAgKi8KICAgICAgICB1bmxpbmtQYXRocyhwYXRoKSB7CiAgICAgICAgICBwYXRoID0gbm9ybWFsaXplKHBhdGgpOwogICAgICAgICAgaWYgKHRoaXMuX19kYXRhTGlua2VkUGF0aHMpIHsKICAgICAgICAgICAgZGVsZXRlIHRoaXMuX19kYXRhTGlua2VkUGF0aHNbcGF0aF07CiAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBOb3RpZnkgdGhhdCBhbiBhcnJheSBoYXMgY2hhbmdlZC4KICAgICAgICAgKgogICAgICAgICAqIEV4YW1wbGU6CiAgICAgICAgICoKICAgICAgICAgKiAgICAgdGhpcy5pdGVtcyA9IFsge25hbWU6ICdKaW0nfSwge25hbWU6ICdUb2RkJ30sIHtuYW1lOiAnQmlsbCd9IF07CiAgICAgICAgICogICAgIC4uLgogICAgICAgICAqICAgICB0aGlzLml0ZW1zLnNwbGljZSgxLCAxLCB7bmFtZTogJ1NhbSd9KTsKICAgICAgICAgKiAgICAgdGhpcy5pdGVtcy5wdXNo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ICAgICAgICAgKgogICAgICAgICAqIEBvdmVycmlkZQogICAgICAgICAqIEBwYXJhbSB7KHN0cmluZ3whQXJyYXk8KHN0cmluZ3xudW1iZXIpPil9IHBhdGggUGF0aCB0byB0aGUgdmFsdWUKICAgICAgICAgKiAgIHRvIHJlYWQuICBUaGUgcGF0aCBtYXkgYmUgc3BlY2lmaWVkIGFzIGEgc3RyaW5nIChlLmcuIGBmb28uYmFyLmJhemApCiAgICAgICAgICogICBvciBhbiBhcnJheSBvZiBwYXRoIHBhcnRzIChlLmcuIGBbJ2Zvby5iYXInLCAnYmF6J11gKS4gIE5vdGUgdGhhdAogICAgICAgICAqICAgYnJhY2tldGVkIGV4cHJlc3Npb25zIGFyZSBub3Qgc3VwcG9ydGVkOyBzdHJpbmctYmFzZWQgcGF0aCBwYXJ0cwogICAgICAgICAqICAgKm11c3QqIGJlIHNlcGFyYXRlZCBieSBkb3RzLiAgTm90ZSB0aGF0IHdoZW4gZGVyZWZlcmVuY2luZyBhcnJheQogICAgICAgICAqICAgaW5kaWNlcywgdGhlIGluZGV4IG1heSBiZSB1c2VkIGFzIGEgZG90dGVkIHBhcnQgZGlyZWN0bHkKICAgICAgICAgKiAgIChlLmcuIGB1c2Vycy4xMi5uYW1lYCBvciBgWyd1c2VycycsIDEyLCAnbmFtZSddYCkuCiAgICAgICAgICogQHBhcmFtIHtPYmplY3Q9fSByb290IFJvb3Qgb2JqZWN0IGZyb20gd2hpY2ggdGhlIHBhdGggaXMgZXZhbHVhdGVkLgogICAgICAgICAqIEByZXR1cm4geyp9IFZhbHVlIGF0IHRoZSBwYXRoLCBvciBgdW5kZWZpbmVkYCBpZiBhbnkgcGFydCBvZiB0aGUgcGF0aAogICAgICAgICAqICAgaXMgdW5kZWZpbmVkLgogICAgICAgICAqIEBwdWJsaWMKICAgICAgICAgKi8KICAgICAgICBnZXQocGF0aCwgcm9vdCkgewogICAgICAgICAgcmV0dXJuIGdldChyb290IHx8IHRoaXMsIHBhdGgpOwogICAgICA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ICAgICAgKiAgIChlLmcuIGAndXNlcnMuMTIubmFtZSdgIG9yIGBbJ3VzZXJzJywgMTIsICduYW1lJ11gKS4KICAgICAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFZhbHVlIHRvIHNldCBhdCB0aGUgc3BlY2lmaWVkIHBhdGguCiAgICAgICAgICogQHBhcmFtIHtPYmplY3Q9fSByb290IFJvb3Qgb2JqZWN0IGZyb20gd2hpY2ggdGhlIHBhdGggaXMgZXZhbHVhdGVkLgogICAgICAgICAqICAgV2hlbiBzcGVjaWZpZWQsIG5vIG5vdGlmaWNhdGlvbiB3aWxsIG9jY3VyLgogICAgICAgICAqIEByZXR1cm4ge3ZvaWR9CiAgICAgICAgICogQHB1YmxpYwogICAgICAgICAqLwogICAgICAgIHNldChwYXRoLCB2YWx1ZSwgcm9vdCkgewogICAgICAgICAgaWYgKHJvb3QpIHsKICAgICAgICAgICAgc2V0KHJvb3QsIHBhdGgsIHZhbHVlKTsKICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIGlmICghdGhpc1tUWVBFUy5SRUFEX09OTFldIHx8ICF0aGlzW1RZUEVTLlJFQURfT05MWV1bLyoqIEB0eXBlIHtzdHJpbmd9ICovKHBhdGgpXSkgewogICAgICAgICAgICAgIGlmICh0aGlzLl9zZXRQZW5kaW5nUHJvcGVydHlPclBhdGgocGF0aCwgdmFsdWUsIHRydWUpKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9pbnZhbGlkYXRlUHJvcGVydGllcygpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQWRkcyBpdGVtcyBvbnRvIHRoZSBlbmQgb2YgdGhlIGFycmF5IGF0IHRoZSBwYXRoIHNwZWNpZmllZC4KICAgICAgICAgKgogICAgICAgICAqIFRoZSBhcmd1bWVudHMgYWZ0ZXIgYHBhdGhgIGFuZCByZXR1cm4gdmFsdWUgbWF0Y2ggdGhhdCBvZgogICAgICAgICAqIGBBcnJheS5wcm90b3R5cGUucHVzaGAuCiAgICAgICAgICoKICAgICAgICAgKiBUaGlzIG1ldGhvZCBub3RpZmllcyBvdGhlciBwYXRocyB0byB0aGUgc2FtZSBhcnJheSB0aGF0IGEKICAgICAgICAgKiBzcGxpY2Ugb2NjdXJyZWQgdG8gdGhlIGFycmF5LgogICAgICAgICAqCiAgICAgICAgICogQG92ZXJyaWRlCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmcgfCAhQXJyYXk8c3RyaW5nfG51bWJlcj59IHBhdGggUGF0aCB0byBhcnJheS4KICAgICAgICAgKiBAcGFyYW0gey4uLip9IGl0ZW1zIEl0ZW1zIHRvIHB1c2ggb250byBhcnJheQogICAgICAgICAqIEByZXR1cm4ge251bWJlcn0gTmV3IGxlbmd0aCBvZiB0aGUgYXJyYXkuCiAgICAgICAgICogQHB1YmxpYwogICAgICAgICAqLwogICAgICAgIHB1c2gocGF0aCwgLi4uaXRlbXMpIHsKICAgICAgICAgIGxldCBpbmZvID0ge3BhdGg6ICcnfTsKICAgICAgICAgIGxldCBhcnJheSA9IC8qKiBAdHlwZSB7QXJyYXl9Ki8oZ2V0KHRoaXMsIHBhdGgsIGluZm8pKTsKICAgICAgICAgIGxldCBsZW4gPSBhcnJheS5sZW5ndGg7CiAgICAgICAgICBsZXQgcmV0ID0gYXJyYXkucHVzaCguLi5pdGVtcyk7CiAgICAgICAgICBpZiAoaXRlbXMubGVuZ3RoKSB7CiAgICAgICAgICAgIG5vdGlmeVNwbGljZSh0aGlzLCBhcnJheSwgaW5mby5wYXRoLCBsZW4sIGl0ZW1zLmxlbmd0aCwgW10pOwogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIHJldDsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFJlbW92ZXMgYW4gaXRlbSBmcm9tIHRoZSBlbmQgb2YgYXJyYXkgYXQgdGhlIHBhdGggc3BlY2lmaWVkLgogICAgICAgICAqCiAgICAgICAgICogVGhlIGFyZ3VtZW50cyBhZnRlciBgcGF0aGAgYW5kIHJldHVybiB2YWx1ZSBtYXRjaCB0aGF0IG9mCiAgICAgICAgICogYEFycmF5LnByb3RvdHlwZS5wb3BgLgogICAgICAgICAqCiAgICAgICAgICogVGhpcyBtZXRob2Qgbm90aWZpZXMgb3RoZXIgcGF0aHMgdG8gdGhlIHNhbWUgYXJyYXkgdGhhdCBhCiAgICAgICAgICogc3BsaWNlIG9jY3VycmVkIHRvIHRoZSBhcnJheS4KICAgICAgICAgKgogICAgICAgICAqIEBvdmVycmlkZQogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nIHwgIUFycmF5PHN0cmluZ3xudW1iZXI+fSBwYXRoIFBhdGggdG8gYXJyYXkuCiAgICAgICAgICogQHJldHVybiB7Kn0gSXRlbSB0aGF0IHdhcyByZW1vdmVkLgogICAgICAgICAqIEBwdWJsaWMKICAgICAgICAgKi8KICAgICAgICBwb3AocGF0aCkgewogICAgICAgICAgbGV0IGluZm8gPSB7cGF0aDogJyd9OwogICAgICAgICAgbGV0IGFycmF5ID0gLyoqIEB0eXBlIHtBcnJheX0gKi8oZ2V0KHRoaXMsIHBhdGgsIGluZm8pKTsKICAgICAgICAgIGxldCBoYWRMZW5ndGggPSBCb29sZWFuKGFycmF5Lmxlbmd0aCk7CiAgICAgICAgICBsZXQgcmV0ID0gYXJyYXkucG9wKCk7CiAgICAgICAgICBpZiAoaGFkTGVuZ3RoKSB7CiAgICAgICAgICAgIG5vdGlmeVNwbGljZSh0aGlzLCBhcnJheSwgaW5mby5wYXRoLCBhcnJheS5sZW5ndGgsIDAsIFtyZXRdKTsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiByZXQ7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBTdGFydGluZyBmcm9tIHRoZSBzdGFydCBpbmRleCBzcGVjaWZpZWQsIHJlbW92ZXMgMCBvciBtb3JlIGl0ZW1zCiAgICAgICAgICogZnJvbS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IHsKICAgICAgICAgICAgbm90aWZ5U3BsaWNlKHRoaXMsIGFycmF5LCBpbmZvLnBhdGgsIHN0YXJ0LCBpdGVtcy5sZW5ndGgsIHJldCk7CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gcmV0OwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogUmVtb3ZlcyBhbiBpdGVtIGZyb20gdGhlIGJlZ2lubmluZyBvZiBhcnJheSBhdCB0aGUgcGF0aCBzcGVjaWZpZWQuCiAgICAgICAgICoKICAgICAgICAgKiBUaGUgYXJndW1lbnRzIGFmdGVyIGBwYXRoYCBhbmQgcmV0dXJuIHZhbHVlIG1hdGNoIHRoYXQgb2YKICAgICAgICAgKiBgQXJyYXkucHJvdG90eXBlLnBvcGAuCiAgICAgICAgICoKICAgICAgICAgKiBUaGlzIG1ldGhvZCBub3RpZmllcyBvdGhlciBwYXRocyB0byB0aGUgc2FtZSBhcnJheSB0aGF0IGEKICAgICAgICAgKiBzcGxpY2Ugb2NjdXJyZWQgdG8gdGhlIGFycmF5LgogICAgICAgICAqCiAgICAgICAgICogQG92ZXJyaWRlCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmcgfCAhQXJyYXk8c3RyaW5nfG51bWJlcj59IHBhdGggUGF0aCB0byBhcnJheS4KICAgICAgICAgKiBAcmV0dXJuIHsqfSBJdGVtIHRoYXQgd2FzIHJlbW92ZWQuCiAgICAgICAgICogQHB1YmxpYwogICAgICAgICAqLwogICAgICAgIHNoaWZ0KHBhdGgpIHsKICAgICAgICAgIGxldCBpbmZvID0ge3BhdGg6ICcnfTsKICAgICAgICAgIGxldCBhcnJheSA9IC8qKiBAdHlwZSB7QXJyYXl9ICovKGdldCh0aGlzLCBwYXRoLCBpbmZvKSk7CiAgICAgICAgICBsZXQgaGFkTGVuZ3RoID0gQm9vbGVhbihhcnJheS5sZW5ndGgpOwogICAgICAgICAgbGV0IHJldCA9IGFycmF5LnNoaWZ0KCk7CiAgICAgICAgICBpZiAoaGFkTGVuZ3RoKSB7CiAgICAgICAgICAgIG5vdGlmeVNwbGljZSh0aGlzLCBhcnJheSwgaW5mby5wYXRoLCAwLCAwLCBbcmV0XSk7CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gcmV0OwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQWRkcyBpdGVtcyBvbnRvIHRoZSBiZWdpbm5pbmcgb2YgdGhlIGFycmF5IGF0IHRoZSBwYXRoIHNwZWNpZmllZC4KICAgICAgICAgKgogICAgICAgICAqIFRoZSBhcmd1bWVudHMgYWZ0ZXIgYHBhdGhgIGFuZCByZXR1cm4gdmFsdWUgbWF0Y2ggdGhhdCBvZgogICAgICAgICAqIGBBcnJheS5wcm90b3R5cGUucHVzaGAuCiAgICAgICAgICoKICAgICAgICAgKiBUaGlzIG1ldGhvZCBub3RpZmllcyBvdGhlciBwYXRocyB0byB0aGUgc2FtZSBhcnJheSB0aGF0IGEKICAgICAgICAgKiBzcGxpY2Ugb2NjdXJyZWQgdG8gdGhlIGFycmF5LgogICAgICAgICAqCiAgICAgICAgICogQG92ZXJyaWRlCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmcgfCAhQXJyYXk8c3RyaW5nfG51bWJlcj59IHBhdGggUGF0aCB0byBhcnJheS4KICAgICAgICAgKiBAcGFyYW0gey4uLip9IGl0ZW1zIEl0ZW1zIHRvIGluc2VydCBpbmZvIGFycmF5CiAgICAgICAgICogQHJldHVybiB7bnVtYmVyfSBOZXcgbGVuZ3RoIG9mIHRoZSBhcnJheS4KICAgICAgICAgKiBAcHVibGljCiAgICAgICAgICovCiAgICAgICAgdW5zaGlmdChwYXRoLCAuLi5pdGVtcykgewogICAgICAgICAgbGV0IGluZm8gPSB7cGF0aDogJyd9OwogICAgICAgICAgbGV0IGFycmF5ID0gLyoqIEB0eXBlIHtBcnJheX0gKi8oZ2V0KHRoaXMsIHBhdGgsIGluZm8pKTsKICAgICAgICAgIGxldCByZXQgPSBhcnJheS51bnNoaWZ0KC4uLml0ZW1zKTsKICAgICAgICAgIGlmIChpdGVtcy5sZW5ndGgpIHsKICAgICAgICAgICAgbm90aWZ5U3BsaWNlKHRoaXMsIGFycmF5LCBpbmZvLnBhdGgsIDAsIGl0ZW1zLmxlbmd0aCwgW10pOwogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIHJldDsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIE5vdGlmeSB0aGF0IGEgcGF0aCBoYXMgY2hhbmdlZC4KICAgICAgICAgKgogICAgICAgICAqIEV4YW1wbGU6CiAgICAgICAgICoKICAgICAgICAgKiAgICAgdGhpcy5pdGVtLnVzZXIubmFtZSA9ICdCb2InOwogICAgICAgICAqICAgICB0aGlzLm5vdGlmeVBhdGgoJ2l0ZW0udXNlci5uYW1lJyk7CiAgICAgICAgICoKICAgICAgICAgKiBAb3ZlcnJpZGUKICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gcGF0aCBQYXRoIHRoYXQgc2hvdWxkIGJlIG5vdGlmaWVkLgogICAgICAgICAqIEBwYXJhbSB7Kj19IHZhbHVlIFZhbHVlIGF0IHRoZSBwYXRoIChvcHRpb25hbCkuCiAgICAgICAgICogQHJldHVybiB7dm9pZH0KICAgICAgICAgKiBAcHVibGljCiAgICAgICAgICovCiAgICAgICAgbm90aWZ5UGF0aChwYXRoLCB2YWx1ZSkgewogICAgICAgICAgLyoqIEB0eXBlIHtzdHJpbmd9ICovCiAgICAgICAgICBsZXQgcHJvcFBhdGg7CiAgICAgICAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA9PSAxKSB7CiAgICAgICAgICAgIC8vIEdldCB2YWx1ZSBpZiBub3Qgc3VwcGxpZWQKICAgICAgICAgICAgbGV0IGluZm8gPSB7cGF0aDogJyd9OwogICAgICAgICAgICB2YWx1ZSA9IGdldCh0aGlzLCBwYXRoLCBpbmZvKTsKICAgICAgICAgICAgcHJvcFBhdGggPSBpbmZvLnBhdGg7CiAgICAgICAgICB9IGVsc2UgaWYgKEFycmF5LmlzQXJyYXkocGF0aCkpIHsKICAgICAgICAgICAgLy8gTm9ybWFsaXplIHBhdGggaWYgbmVlZGVkCiAgICAgICAgICAgIHByb3BQYXRoID0gbm9ybWFsaXplKHBhdGgpOwogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgcHJvcFBhdGggPSAvKiogQHR5cGV7c3RyaW5nfSAqLyhwYXRoKTsKICAgICAgICAgIH0KICAgICAgICAgIGlmICh0aGlzLl9zZXRQZW5kaW5nUHJvcGVydHlPclBhdGgocHJvcFBhdGgsIHZhbHVlLCB0cnVlLCB0cnVlKSkgewogICAgICAgICAgICB0aGlzLl9pbnZhbGlkYXRlUHJvcGVydGllcygpOwogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogRXF1aXZhbGVudCB0byBzdGF0aWMgYGNyZWF0ZVJlYWRPbmx5UHJvcGVydHlgIEFQSSBidXQgY2FuIGJlIGNhbGxlZCBvbgogICAgICAgICAqIGFuIGluc3RhbmNlIHRvIGFkZCBlZmZlY3RzIGF0IHJ1bnRpbWUuICBTZWUgdGhhdCBtZXRob2QgZm9yCiAgICAgICAgICogZnVsbCBBUEkgZG9jcy4KICAgICAgICAgKgogICAgICAgICAqIEBvdmVycmlkZQogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBwcm9wZXJ0eSBQcm9wZXJ0eSBuYW1lCiAgICAgICAgICogQHBhcmFtIHtib29sZWFuPX0gcHJvdGVjdGVkU2V0dGVyIENyZWF0ZXMgYSBjdXN0b20gcHJvdGVjdGVkIHNldHRlcgogICAgICAgICAqICAgd2hlbiBgdHJ1ZWAuCiAgICAgICAgICogQHJldHVybiB7dm9pZH0KICAgICAgICAgKiBAcHJvdGVjdGVkCiAgICAgICAgICovCiAgICAgICAgX2NyZWF0ZVJlYWRPbmx5UHJvcGVydHkocHJvcGVydHksIHByb3RlY3RlZFNldHRlcikgewogICAgICAgICAgdGhpcy5fYWRkUHJvcGVydHlFZmZlY3QocHJvcGVydHksIFRZUEVTLlJFQURfT05MWSk7CiAgICAgICAgICBpZiAocHJvdGVjdGVkU2V0dGVyKSB7CiAgICAgICAgICAgIHRoaXNbJ19zZXQnICsgdXBwZXIocHJvcGVydHkpXSA9IC8qKiBAdGhpcyB7UHJvcGVydHlFZmZlY3RzfSAqL2Z1bmN0aW9uKHZhbHVlKSB7CiAgICAgICAgICAgICAgdGhpcy5fc2V0UHJvcGVydHkocHJvcGVydHksIHZhbHVlKTsKICAgICAgICAgICAgfTsKICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIEVxdWl2YWxlbnQgdG8gc3RhdGljIGBjcmVhdGVQcm9wZXJ0eU9ic2VydmVyYCBBUEkgYnV0IGNhbiBiZSBjYWxsZWQgb24KICAgICAgICAgKiBhbiBpbnN0YW5jZSB0byBhZGQgZWZmZWN0cyBhdCBydW50aW1lLiAgU2VlIHRoYXQgbWV0aG9kIGZvcgogICAgICAgICAqIGZ1bGwgQVBJIGRvY3MuCiAgICAgICAgICoKICAgICAgICAgKiBAb3ZlcnJpZGUKICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gcHJvcGVydHkgUHJvcGVydHkgbmFtZQogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfGZ1bmN0aW9uKCosKil9IG1ldGhvZCBGdW5jdGlvbiBvciBuYW1lIG9mIG9ic2VydmVyIG1ldGhvZAogICAgICAgICAqICAgICB0byBjYWxsCiAgICAgICAgICogQHBhcmFtIHtib29sZWFuPX0gZHluYW1pY0ZuIFdoZXRoZXIgdGhlIG1ldGhvZCBuYW1lIHNob3VsZCBiZSBpbmNsdWRlZCBhcwogICAgICAgICAqICAgYSBkZXBlbmRlbmN5IHRvIHRoZSBlZmZlY3QuCiAgICAgICAgICogQHJldHVybiB7dm9pZH0KICAgICAgICAgKiBAcHJvdGVjdGVkCiAgICAgICAgICovCiAgICAgICAgX2NyZWF0ZVByb3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eSkgewogICAgICAgICAgdGhpcy5fYWRkUHJvcGVydHlFZmZlY3QocHJvcGVydHksIFRZUEVTLk5PVElGWSwgewogICAgICAgICAgICBmbjogcnVuTm90aWZ5RWZmZWN0LAogICAgICAgICAgICBpbmZvOiB7CiAgICAgICAgICAgICAgZXZlbnROYW1lOiBjYW1lbFRvRGFzaENhc2UocHJvcGVydHkpICsgJy1jaGFuZ2VkJywKICAgICAgICAgICAgICBwcm9wZXJ0eTogcHJvcGVydHkKICAgICAgICAgICAgfQogICAgICAgICAgfSk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBFcXVpdmFsZW50IHRvIHN0YXRpYyBgY3JlYXRlUmVmbGVjdGVkUHJvcGVydHlgIEFQSSBidXQgY2FuIGJlIGNhbGxlZCBvbgogICAgICAgICAqIGFuIGluc3RhbmNlIHRvIGFkZCBlZmZlY3RzIGF0IHJ1bnRpbWUuICBTZWUgdGhhdCBtZXRob2QgZm9yCiAgICAgICAgICogZnVsbCBBUEkgZG9jcy4KICAgICAgICAgKgogICAgICAgICAqIEBvdmVycmlkZQogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBwcm9wZXJ0eSBQcm9wZXJ0eSBuYW1lCiAgICAgICAgICogQHJldHVybiB7dm9pZH0KICAgICAgICAgKiBAcHJvdGVjdGVkCiAgICAgICAgICogQHN1cHByZXNzIHttaXNzaW5nUHJvcGVydGllc30gZ28vbWlzc2luZ2ZucHJvcHMKICAgICAgICAgKi8KICAgICAgICBfY3JlYXRlUmVmbGVjdGVkUHJvcGVydHkocHJvcGVydHkpIHsKICAgICAgICAgIGxldCBhdHRyID0gdGhpcy5jb25zdHJ1Y3Rvci5hdHRyaWJ1dGVOYW1lRm9yUHJvcGVydHkocHJvcGVydHkpOwogICAgICAgICAgaWYgKGF0dHJbMF0gPT09ICctJykgewogICAgICAgICAgICBjb25zb2xlLndhcm4oJ1Byb3BlcnR5ICcgKyBwcm9wZXJ0eSArICcgY2Fubm90IGJlIH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gICAgICoKICAgICAgICAgKiBUaGUgYHBhdGhgIGFuZCBgdmFsdWVgIGFyZ3VtZW50cyBhcmUgdXNlZCB0byBmaWxsIGluIHdpbGRjYXJkIGRlc2NyaXB0b3IKICAgICAgICAgKiB3aGVuIHRoZSBtZXRob2QgaXMgYmVpbmcgY2FsbGVkIGFzIGEgcmVzdWx0IG9mIGEgcGF0aCBub3RpZmljYXRpb24uCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0geyFBcnJheTwhTWV0aG9kQXJnPn0gYXJncyBBcnJheSBvZiBhcmd1bWVudCBtZXRhZGF0YQogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBwYXRoIFByb3BlcnR5L3BhdGggbmFtZSB0aGF0IHRyaWdnZXJlZCB0aGUgbWV0aG9kIGVmZmVjdAogICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBwcm9wcyBCYWcgb2YgY3VycmVudCBwcm9wZXJ0eSBjaGFuZ2VzCiAgICAgICAgICogQHJldHVybiB7IUFycmF5PCo+fSBBcnJheSBvZiBhcmd1bWVudCB2YWx1ZXMKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqLwogICAgICAgIF9tYXJzaGFsQXJncyhhcmdzLCBwYXRoLCBwcm9wcykgewogICAgICAgICAgY29uc3QgZGF0YSA9IHRoaXMuX19kYXRhOwogICAgICAgICAgY29uc3QgdmFsdWVzID0gW107CiAgICAgICAgICBmb3IgKGxldCBpPTAsIGw9YXJncy5sZW5ndGg7IGk8bDsgaSsrKSB7CiAgICAgICAgICAgIGxldCB7bmFtZSwgc3RydWN0dXJlZCwgd2lsZGNhcmQsIHZhbHVlLCBsaXRlcmFsfSA9IGFyZ3NbaV07CiAgICAgICAgICAgIGlmICghbGl0ZXJhbCkgewogICAgICAgICAgICAgIGlmICh3aWxkY2FyZCkgewogICAgICAgICAgICAgICAgY29uc3QgbWF0Y2hlcyA9IGlzRGVzY2VuZGFudChuYW1lLCBwYXRoKTsKICAgICAgICAgIC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XMgYmVpbmcgYm91bmQsIHNpbmNlIGEgdGVtcGxhdGUgbWF5IG9yIG1heSBub3QgZXZlciBiZQogICAgICAgICAgICAgIC8vIHN0YW1wZWQsIGFuZCBtYXkgYmUgc3RhbXBlZCBtb3JlIHRoYW4gb25jZSAoaW4gd2hpY2ggY2FzZSBpbnN0YW5jZXMKICAgICAgICAgICAgICAvLyBvZiB0aGUgdGVtcGxhdGUgaW5mbyB3aWxsIGJlIGluIHRoZSB0cmVlIHVuZGVyIGl0cyBwYXJlbnQgbW9yZSB0aGFuCiAgICAgICAgICAgICAgLy8gb25jZSkuCiAgICAgICAgICAgICAgY29uc3QgcGFyZW50ID0gdGVtcGxhdGUuX3BhcmVudFRlbXBsYXRlSW5mbyB8fCB0aGlzLl9fdGVtcGxhdGVJbmZvOwogICAgICAgICAgICAgIGNvbnN0IHByZXZpb3VzID0gcGFyZW50Lmxhc3RDaGlsZDsKICAgICAgICAgICAgICB0ZW1wbGF0ZUluZm8ucGFyZW50ID0gcGFyZW50OwogICAgICAgICAgICAgIHBhcmVudC5sYXN0Q2hpbGQgPSB0ZW1wbGF0ZUluZm87CiAgICAgICAgICAgICAgdGVtcGxhdGVJbmZvLnByZXZpb3VzU2libGluZyA9IHByZXZpb3VzOwogICAgICAgICAgICAgIGlmIChwcmV2aW91cykgewogICAgICAgICAgICAgICAgcHJldmlvdXMubmV4dFNpYmxpbmcgPSB0ZW1wbGF0ZUluZm87CiAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIHBhcmVudC5maXJzdENoaWxkID0gdGVtcGxhdGVJbmZvOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgdGhpcy5fX3ByZUJvdW5kVGVtcGxhdGVJbmZvID0gdGVtcGxhdGVJbmZvOwogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIHRlbXBsYXRlSW5mbzsKICAgICAgICB9CgogICAgICAgIC8qKgogICAg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SW5mbzsKICAgICAgICAgIGNvbnN0IHtwcmV2aW91c1NpYmxpbmcsIG5leHRTaWJsaW5nLCBwYXJlbnR9ID0gdGVtcGxhdGVJbmZvOwogICAgICAgICAgaWYgKHByZXZpb3VzU2libGluZykgewogICAgICAgICAgICBwcmV2aW91c1NpYmxpbmcubmV4dFNpYmxpbmcgPSBuZXh0U2libGluZzsKICAgICAgICAgIH0gZWxzZSBpZiAocGFyZW50KSB7CiAgICAgICAgICAgIHBhcmVudC5maXJzdENoaWxkID0gbmV4dFNpYmxpbmc7CiAgICAgICAgICB9CiAgICAgICAgICBpZiAobmV4dFNpYmxpbmcpIHsKICAgICAgICAgICAgbmV4dFNpYmxpbmcucHJldmlvdXNTaWJsaW5nID0gcHJldmlvdXNTaWJsaW5nOwogICAgICAgICAgfSBlbHNlIGlmIChwYXJlbnQpIHsKICAgICAgICAgICAgcGFyZW50Lmxhc3RDaGlsZCA9IHByZXZpb3VzU2libGluZzsKICAgICAgICAgIH0KICAgICAgICAgIHRlbXBsYXRlSW5mby5uZXh0U2libGluZyA9IHRlbXBsYXRlSW5mby5wcmV2aW91c1NpYmxpbmcgPSBudWxsOwogICAgICAgICAgLy8gUmVtb3ZlIHN0YW1wZWQgbm9kZXMKICAgICAgICAgIGxldCBub2RlcyA9IHRlbXBsYXRlSW5mby5jaGlsZE5vZGVzOwogICAgICAgICAgZm9yIChsZXQgaT0wOyBpPG5vZGVzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgIGxldCBub2RlID0gbm9kZXNbaV07CiAgICAgICAgICAgIHdyYXAod3JhcChub2RlKS5wYXJlbnROb2RlKS5yZW1vdmVDaGlsZChub2RlKTsKICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIE92ZXJyaWRlcyBkZWZhdWx0IGBUZW1wbGF0ZVN0YW1wYCBpbXBsZW1lbnRhdGlvbiB0byBhZGQgc3VwcG9ydCBmb3IKICAgICAgICAgKiBwYXJzaW5nIGJp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W1lIHRlbXBsYXRlIHN0YW1waW5nOyBub3RlIHRoaXMKICAgICAgICAgICAgICAvLyB3YXMgYWxyZWFkeSBlbnN1cmVkIGFib3ZlIGluIHRoZSBgcmVtb3ZlTmVzdGVkVGVtcGxhdGVzYCBjYXNlCiAgICAgICAgICAgICAgaWYgKCFyZW1vdmVOZXN0ZWRUZW1wbGF0ZXMpIHsKICAgICAgICAgICAgICAgIG5vZGVJbmZvLnBhcmVudEluZm8ubm90ZWQgPSB0cnVlOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgbGV0IG1vZGUgPSAneyc7CiAgICAgICAgICAgIGZvciAobGV0IHNvdXJjZSBpbiBob3N0UHJvcHMpIHsKICAgICAgICAgICAgICBsZXQgcGFydHMgPSBbeyBtb2RlLCBzb3VyY2UsIGRlcGVuZGVuY2llczogW3NvdXJjZV0sIGhvc3RQcm9wOiB0cnVlIH1dOwogICAgICAgICAgICAgIGFkZEJpbmRpbmcodGhpcywgdGVtcGxhdGVJbmZvLCBub2RlSW5mbywgJ3Byb3BlcnR5JywgJ19ob3N0XycgKyBzb3VyY2UsIHBhcnRzKTsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIG5vdGVkOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ2FsbGVkIHRvIHBhcnNlIHRleHQgaW4gYSB0ZW1wbGF0ZSAoZWl0aGVyIGF0dHJpYnV0ZSB2YWx1ZXMgb3IKICAgICAgICAgKiB0ZXh0Q29udGVudCkgaW50byBiaW5kaW5nIG1ldGFkYXRhLgogICAgICAgICAqCiAgICAgICAgICogQW55IG92ZXJyaWRlcyBvZiB0aGlzIG1ldGhvZCBzaG91bGQgcmV0dXJuIGFuIGFycmF5IG9mIGJpbmRpbmcgcGFydAogICAgICAgICAqIG1ldGFkYXRhICByZXByZXNlbnRpbmcgb25lIG9yIG1vcmUgYmluZGluZ3Mg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OgogICAgICAgICAgLy8gICAgICAgIEl0ZXJhdGlvbiAxOiAgSXRlcmF0aW9uIDI6CiAgICAgICAgICAvLyBtWzFdOiAne3snICAgICAgICAgICdbWycKICAgICAgICAgIC8vIG1bMl06ICcnICAgICAgICAgICAgJyEnCiAgICAgICAgICAvLyBtWzNdOiAncHJvcCcgICAgICAgICdjb21wdXRlKGZvbyxiYXIpJwogICAgICAgICAgd2hpbGUgKChtID0gYmluZGluZ1JlZ2V4LmV4ZWModGV4dCkpICE9PSBudWxsKSB7CiAgICAgICAgICAgIC8vIEFkZCBsaXRlcmFsIHBhcnQKICAgICAgICAgICAgaWYgKG0uaW5kZXggPiBsYXN0SW5kZXgpIHsKICAgICAgICAgICAgICBwYXJ0cy5wdXNoKHtsaXRlcmFsOiB0ZXh0LnNsaWNlKGxhc3RJbmRleCwgbS5pbmRleCl9KTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBBZGQgYmluZGluZyBwYXJ0CiAgICAgICAgICAgIGxldCBtb2RlID0gbVsxXVswXTsKICAgICAgICAgICAgbGV0IG5lZ2F0ZSA9IEJvb2xlYW4obVsyXSk7CiAgICAgICAgICAgIGxldCBzb3VyY2UgPSBtWzNdLnRyaW0oKTsKICAgICAgICAgICAgbGV0IGN1c3RvbUV2ZW50ID0gZmFsc2UsIG5vdGlmeUV2ZW50ID0gJycsIGNvbG9uID0gLTE7CiAgICAgICAgICAgIGlmIChtb2RlID09ICd7JyAmJiAoY29sb24gPSBzb3VyY2UuaW5kZXhPZignOjonKSkgPiAwKSB7CiAgICAgICAgICAgICAgbm90aWZ5RXZlbnQgPSBzb3VyY2Uuc3Vic3RyaW5nKGNvbG9uICsgMik7CiAgICAgICAgICAgICAgc291cmNlID0gc291cmNlLnN1YnN0cmluZygwLCBjb2xvbik7CiAgICAgICAgICAgICAgY3VzdG9tRXZlbnQgPSB0cnVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGxldCBzaWduYXR1cmUgPSBwYXJzZU1ldGhvZChzb3VyY2UpOwogICAgICAgICAgICBsZXQgZGVwZW5kZW5jaWVzID0gW107CiAgICAgICAgICAgIGlmIChzaWduYXR1cmUpIHsKICAgICAgICAgICAgICAvLyBJbmxpbmUgY29tcHV0ZWQgZnVuY3Rpb24KICAgICAgICAgICAgICBsZXQge2FyZ3MsIG1ldGhvZE5hbWV9ID0gc2lnbmF0dXJlOwogICAgICAgICAgICAgIGZvciAobGV0IGk9MDsgaTxhcmdzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICBsZXQgYXJnID0gYXJnc1tpXTsKICAgICAgICAgICAgICAgIGlmICghYXJnLmxpdGVyYWwpIHsKICAgICAgICAgICAgICAgICAgZGVwZW5kZW5jaWVzLnB1c2goYXJnKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgbGV0IGR5bmFtaWNGbnMgPSB0ZW1wbGF0ZUluZm8uZHluYW1pY0ZuczsKICAgICAgICAgICAgICBpZiAoZHluYW1pY0ZucyAmJiBkeW5hbWljRm5zW21ldGhvZE5hbWVdIHx8IHNpZ25hdHVyZS5zdGF0aWMpIHsKICAgICAgICAgICAgICAgIGRlcGVuZGVuY2llcy5wdXNoKG1ldGhvZE5hbWUpOwogICAgICAgICAgICAgICAgc2lnbmF0dXJlLmR5bmFtaWNGbiA9IHRydWU7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgIC8vIFByb3BlcnR5IG9yIHBhdGgKICAgICAgICAgICAgICBkZXBlbmRlbmNpZXMucHVzaChzb3VyY2UpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHBhcnRzLnB1c2goewogICAgICAgICAgICAgIHNvdXJjZSwgbW9kZSwgbmVnYXRlLCBjdXN0b21FdmVudCwgc2lnbmF0dXJlLCBkZXBlbmRlbmNpZXMsCiAgICAgICAgICAgICAgZXZlbnQ6IG5vdGlmeUV2ZW50CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBsYXN0SW5kZXggPSBiaW5kaW5nUmVnZXgubGFzdEluZGV4OwogICAgICAgICAgfQogICAgICAgICAgLy8gQWRkIGEgZmluYWwgbGl0ZXJhbCBwYXJ0CiAgICAgICAgICBpZiAobGFzdEluZGV4ICYmIGxhc3RJbmRleCA8IHRleHQubGVuZ3RoKSB7CiAgICAgICAgICAgIGxldCBsaXRlcmFsID0gdGV4dC5zdWJzdHJpbmcobGFzdEluZGV4KTsKICAgICAgICAgICAgaWYgKGxpdGVyYWwpIHsKICAgICAgICAgICAgICBwYXJ0cy5wdXNoKHsKICAgICAgICAgICAgICAgIGxpdGVyYWw6IGxpdGVyYWwKICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgICAgaWYgKHBhcnRzLmxlbmd0aCkgewogICAgICAgICAgICByZXR1cm4gcGFydHM7CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENhbGxlZCB0byBldmFsdWF0ZSBhIHByZXZpb3VzbHkgcGFyc2VkIGJpbmRpbmcgcGFydCBiYXNlZCBvbiBhIHNldCBvZgogICAgICAgICAqIG9uZSBvciBtb3JlIGNoYW5nZWQgZGVwZW5kZW5jaWVzLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHshUG9seW1lcl9Qcm9wZXJ0eUVmZmVjdHN9IGluc3QgRWxlbWVudCB0aGF0IHNob3VsZCBiZSB1c2VkIGFzCiAgICAgICAgICogICAgIHNjb3BlIGZvciBiaW5kaW5nIGRlcGVuZGVuY2llcwogICAgICAgICAqIEBwYXJhbSB7QmluZGluZ1BhcnR9IHBhcnQgQmluZGluZyBwYXJ0IG1ldGFkYXRhCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IHBhdGggUHJvcGVydHkvcGF0aCB0aGF0IHRyaWdnZXJlZCB0aGlzIGVmZmVjdAogICAg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cnR5KCdfX293blByb3BlcnRpZXMnLCBjb25zdHJ1Y3RvcikpKSB7CiAgICAgICAgIGxldCBwcm9wcyA9IG51bGw7CgogICAgICAgICBpZiAoY29uc3RydWN0b3IuaGFzT3duUHJvcGVydHkoSlNDb21waWxlcl9yZW5hbWVQcm9wZXJ0eSgncHJvcGVydGllcycsIGNvbnN0cnVjdG9yKSkpIHsKICAgICAgICAgICBjb25zdCBwcm9wZXJ0aWVzID0gY29uc3RydWN0b3IucHJvcGVydGllczsKCiAgICAgICAgICAgaWYgKHByb3BlcnRpZXMpIHsKICAgICAgICAgICAgcHJvcHMgPSBub3JtYWxpemVQcm9wZXJ0aWVzKHByb3BlcnRpZXMpOwogICAgICAgICAgIH0KICAgICAgICAgfQoKICAgICAgICAgY29uc3RydWN0b3IuX19vd25Qcm9wZXJ0aWVzID0gcHJvcHM7CiAgICAgICB9CiAgICAgICByZXR1cm4gY29uc3RydWN0b3IuX19vd25Qcm9wZXJ0aWVzOwogICAgIH0KCiAgICAgLyoqCiAgICAgICogQHBvbHltZXIKICAgICAgKiBAbWl4aW5DbGFzcwogICAgICAqIEBleHRlbmRzIHtiYXNlfQogICAgICAqIEBpbXBsZW1lbnRzIHtQb2x5bWVyX1Byb3BlcnRpZXNNaXhpbn0KICAgICAgKiBAdW5yZXN0cmljdGVkCiAgICAgICovCiAgICAgY2xhc3MgUHJvcGVydGllc01peGluIGV4dGVuZHMgYmFzZSB7CgogICAgICAgLyoqCiAgICAgICAgKiBJbXBsZW1lbnRzIHN0YW5kYXJkIGN1c3RvbSBlbGVtZW50cyBnZXR0ZXIgdG8gb2JzZXJ2ZXMgdGhlIGF0dHJpYnV0ZXMKICAgICAgICAqIGxpc3RlZCBpbiBgcHJvcGVydGllc2AuCiAgICAgICAgKiBAc3VwcHJlc3Mge21pc3NpbmdQcm9wZXJ0aWVzfSBJbnRlcmZhY2VzIGluIGNsb3N1cmUgZG8gbm90IGluaGVyaXQgc3RhdGljcywgYnV0IGNsYXNzZXMg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KICAgICAgIC8qKgogICAgICAgICogUmV0dXJucyBhIG1lbW9pemVkIHZlcnNpb24gb2YgYWxsIHByb3BlcnRpZXMsIGluY2x1ZGluZyB0aG9zZSBpbmhlcml0ZWQKICAgICAgICAqIGZyb20gc3VwZXIgY2xhc3Nlcy4gUHJvcGVydGllcyBub3QgaW4gb2JqZWN0IGZvcm1hdCBhcmUgY29udmVydGVkIHRvCiAgICAgICAgKiBhdCBsZWFzdCB7dHlwZX0uCiAgICAgICAgKgogICAgICAgICogQHJldHVybiB7T2JqZWN0fSBPYmplY3QgY29udGFpbmluZyBwcm9wZXJ0aWVzIGZvciB0aGlzIGNsYXNzCiAgICAgICAgKiBAcHJvdGVjdGVkCiAgICAgICAgKiBAbm9jb2xsYXBzZQogICAgICAgICovCiAgICAgICBzdGF0aWMgZ2V0IF9wcm9wZXJ0aWVzKCkgewogICAgICAgICBpZiAoIXRoaXMuaGFzT3duUHJvcGVydHkoCiAgICAgICAgICAgSlNDb21waWxlcl9yZW5hbWVQcm9wZXJ0eSgnX19wcm9wZXJ0aWVzJywgdGhpcykpKSB7CiAgICAgICAgICAgY29uc3Qgc3VwZXJDdG9yID0gc3VwZXJQcm9wZXJ0aWVzQ2xhc3MoLyoqIEB0eXBlIHshUHJvcGVydGllc01peGluQ29uc3RydWN0b3J9ICovKHRoaXMpKTsKICAgICAgICAgICB0aGlzLl9fcHJvcGVydGllcyA9IE9iamVjdC5hc3NpZ24oe30sCiAgICAgICAgICAgICBzdXBlckN0b3IgJiYgc3VwZXJDdG9yLl9wcm9wZXJ0aWVzLAogICAgICAgICAgICAgb3duUHJvcGVydGllcygvKiogQHR5cGUge1Byb3BlcnRpZXNNaXhpbkNvbnN0cnVjdG9yfSAqLyh0aGlzKSkpOwogICAgICAgICB9CiAgICAgICAgIHJldHVybiB0aGlzLl9fcHJvcGVydGllczsKICAgICAgIH0KCiAgICAgICAvKioKICAgICAgICAqIE92ZXJyaWRlcyBgUHJvcGVydGllc0NoYW5nZWRgIG1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7CiAgICAgICAgICBjb25zdHJ1Y3Rvci5fX3Byb3BlcnR5RGVmYXVsdHMgPSBudWxsOwogICAgICAgICAgbGV0IHByb3BzID0gY29uc3RydWN0b3IuX3Byb3BlcnRpZXM7CiAgICAgICAgICBmb3IgKGxldCBwIGluIHByb3BzKSB7CiAgICAgICAgICAgIGxldCBpbmZvID0gcHJvcHNbcF07CiAgICAgICAgICAgIGlmICgndmFsdWUnIGluIGluZm8pIHsKICAgICAgICAgICAgICBjb25zdHJ1Y3Rvci5fX3Byb3BlcnR5RGVmYXVsdHMgPSBjb25zdHJ1Y3Rvci5fX3Byb3BlcnR5RGVmYXVsdHMgfHwge307CiAgICAgICAgICAgICAgY29uc3RydWN0b3IuX19wcm9wZXJ0eURlZmF1bHRzW3BdID0gaW5mbzsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gY29uc3RydWN0b3IuX19wcm9wZXJ0eURlZmF1bHRzOwogICAgICB9CgogICAgICAvKioKICAgICAgICogUmV0dXJucyBhIG1lbW9pemVkIHZlcnNpb24gb2YgdGhlIGBvYnNlcnZlcnNgIGFycmF5LgogICAgICAgKiBAcGFyYW0ge1BvbHltZXJFbGVtZW50Q29uc3RydWN0b3J9IGNvbnN0cnVjdG9yIEVsZW1lbnQgY2xhc3MKICAgICAgICogQHJldHVybiB7QXJyYXl9IEFycmF5IGNvbnRhaW5pbmcgb3duIG9ic2VydmVycyBmb3IgdGhlIGdpdmVuIGNsYXNzCiAgICAgICAqIEBwcm90ZWN0ZWQKICAgICAgICovCiAgICAgIGZ1bmN0aW9uIG93bk9ic2VydmVycyhjb25zdHJ1Y3RvcikgewogICAgICAgIGlmICghY29uc3RydWN0b3IuaGFzT3duUHJvcGVydHkoCiAgICAgICAgICBKU0NvbXBpbGVyX3JlbmFtZVByb3BlcnR5KCdfX293bk9ic2VydmVycycsIGNvbnN0cnVjdG9yKSkpIHsKICAgICAgICAgIGNvbnN0cnVjdG9yLl9fb3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JiYKICAgICAgICAgICAgc3VwcG9ydHNBZG9wdGluZ1N0eWxlU2hlZXRzKSB7CiAgICAgICAgICAvLyBSZW1vdmUgc3R5bGVzIGluIHRlbXBsYXRlIGFuZCBtYWtlIGEgc2hhcmVhYmxlIHN0eWxlc2hlZXQKICAgICAgICAgIGNvbnN0IHN0eWxlcyA9IHRlbXBsYXRlLmNvbnRlbnQucXVlcnlTZWxlY3RvckFsbCgnc3R5bGUnKTsKICAgICAgICAgIGlmIChzdHlsZXMpIHsKICAgICAgICAgICAgbGV0IGNzcyA9ICcnOwogICAgICAgICAgICBBcnJheS5mcm9tKHN0eWxlcykuZm9yRWFjaChzID0+IHsKICAgICAgICAgICAgICBjc3MgKz0gcy50ZXh0Q29udGVudDsKICAgICAgICAgICAgICBzLnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQocyk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBrbGFzcy5fc3R5bGVTaGVldCA9IG5ldyBDU1NTdHlsZVNoZWV0KCk7CiAgICAgICAgICAgIGtsYXNzLl9zdHlsZVNoZWV0LnJlcGxhY2VTeW5jKGNzcyk7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CgogICAgICAvKioKICAgICAgICogTG9vayB1cCB0ZW1wbGF0ZSBmcm9tIGRvbS1tb2R1bGUgZm9yIGVsZW1lbnQKICAgICAgICoKICAgICAgICogQHBhcmFtIHtzdHJpbmd9IGlzIEVsZW1lbnQgbmFtZSB0byBsb29rIHVwCiAgICAgICAqIEByZXR1cm4gez9IVE1MVGVtcGxhdGVFbGVtZW50fHVuZGVmaW5lZH0gVGVtcGxhdGUgZm91bmQgaW4gZG9tIG1vZHVsZSwgb3IKICAgICAgICogICB1bmRlZmluZWQgaWYgbm90IGZvdW5kCiAgICAgICAqIEBwcm90ZWN0ZWQKICAgICAgICovCiAgICAgIGZ1bmN0aW9uIGdldFRlbXBsYXRlRnJvbURvbU1vZHVsZShpcykgewogICAgICAgIGxldCB0ZW1wbGF0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UG9seW1lckVsZW1lbnQgZXh0ZW5kcyBwb2x5bWVyRWxlbWVudEJhc2UgewoKICAgICAgICAvKioKICAgICAgICAgKiBDdXJyZW50IFBvbHltZXIgdmVyc2lvbiBpbiBTZW12ZXIgbm90YXRpb24uCiAgICAgICAgICogQHR5cGUge3N0cmluZ30gU2VtdmVyIG5vdGF0aW9uIG9mIHRoZSBjdXJyZW50IHZlcnNpb24gb2YgUG9seW1lci4KICAgICAgICAgKiBAbm9jb2xsYXBzZQogICAgICAgICAqLwogICAgICAgIHN0YXRpYyBnZXQgcG9seW1lckVsZW1lbnRWZXJzaW9uKCkgewogICAgICAgICAgcmV0dXJuIHZlcnNpb247CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBPdmVycmlkZSBvZiBQcm9wZXJ0aWVzTWl4aW4gX2ZpbmFsaXplQ2xhc3MgdG8gY3JlYXRlIG9ic2VydmVycyBhbmQKICAgICAgICAgKiBmaW5kIHRoZSB0ZW1wbGF0ZS4KICAgICAgICAgKiBAcmV0dXJuIHt2b2lkfQogICAgICAgICAqIEBwcm90ZWN0ZWQKICAgICAgICAgKiBAc3VwcHJlc3Mge21pc3NpbmdQcm9wZXJ0aWVzfSBJbnRlcmZhY2VzIGluIGNsb3N1cmUgZG8gbm90IGluaGVyaXQgc3RhdGljcywgYnV0IGNsYXNzZXMgZG8KICAgICAgICAgKiBAbm9jb2xsYXBzZQogICAgICAgICAqLwogICAgICAgIHN0YXRpYyBfZmluYWxpemVDbGFzcygpIHsKICAgICAgICAgIC8vIFRPRE8oaHR0cHM6Ly9naXRodWIuY29tL2dvb2dsZS9jbG9zdXJlLWNvbXBpbGVyL2lzc3Vlcy8zMjQwKToKICAgICAgICAgIC8vICAgICBDaGFuZ2UgYmFjayB0byBqdXN0IHN1cGVyLm1ldGhvZENhbGwoKQogICAgICAgICAgcG9seW1lckVsZW1lbnRCYXNlLl9maW5hbGl6ZUNsYXNzLmNhbGwodGhpcyk7CiAgICAgICAgICBjb25z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dGVyIGRvZXMgZXhwZW5zaXZlCiAgICAgICAgICogd29yayBzdWNoIGFzIGNsb25pbmcvbW9kaWZ5aW5nIGEgdGVtcGxhdGUsIGl0IHNob3VsZCBtZW1vaXplIHRoZQogICAgICAgICAqIHRlbXBsYXRlIGZvciBtYXhpbXVtIHBlcmZvcm1hbmNlOgogICAgICAgICAqCiAgICAgICAgICogICBsZXQgbWVtb2l6ZWRUZW1wbGF0ZTsKICAgICAgICAgKiAgIGNsYXNzIE15U3ViQ2xhc3MgZXh0ZW5kcyBNeVN1cGVyQ2xhc3MgewogICAgICAgICAqICAgICBzdGF0aWMgZ2V0IHRlbXBsYXRlKCkgewogICAgICAgICAqICAgICAgIGlmICghbWVtb2l6ZWRUZW1wbGF0ZSkgewogICAgICAgICAqICAgICAgICAgbWVtb2l6ZWRUZW1wbGF0ZSA9IHN1cGVyLnRlbXBsYXRlLmNsb25lTm9kZSh0cnVlKTsKICAgICAgICAgKiAgICAgICAgIGxldCBzdWJDb250ZW50ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnZGl2Jyk7CiAgICAgICAgICogICAgICAgICBzdWJDb250ZW50LnRleHRDb250ZW50ID0gJ1RoaXMgY2FtZSBmcm9tIE15U3ViQ2xhc3MnOwogICAgICAgICAqICAgICAgICAgbWVtb2l6ZWRUZW1wbGF0ZS5jb250ZW50LmFwcGVuZENoaWxkKHN1YkNvbnRlbnQpOwogICAgICAgICAqICAgICAgIH0KICAgICAgICAgKiAgICAgICByZXR1cm4gbWVtb2l6ZWRUZW1wbGF0ZTsKICAgICAgICAgKiAgICAgfQogICAgICAgICAqICAgfQogICAgICAgICAqCiAgICAgICAgICogQHJldHVybiB7IUhUTUxUZW1wbGF0ZUVsZW1lbnR8c3RyaW5nfSBUZW1wbGF0ZSB0byBiZSBzdGFtcGVkCiAgICAgICAgICogQG5vY29sbGFwc2UKICAgICAgICAgKi8KICAgICAgICBzdGF0aWMgZ2V0IHRlbXBsYXRlKCkgewogICAgICAgICA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gICAqIGVsZW1lbnQncyBzdGF0aWMgYGlzYCBwcm9wZXJ0eS4KICAgICAgICAgKgogICAgICAgICAqIE5vdGUsIHRoaXMgcGF0aCBzaG91bGQgY29udGFpbiBhIHRyYWlsaW5nIGAvYC4KICAgICAgICAgKgogICAgICAgICAqIEByZXR1cm4ge3N0cmluZ30gVGhlIGltcG9ydCBwYXRoIGZvciB0aGlzIGVsZW1lbnQgY2xhc3MKICAgICAgICAgKiBAc3VwcHJlc3Mge21pc3NpbmdQcm9wZXJ0aWVzfQogICAgICAgICAqIEBub2NvbGxhcHNlCiAgICAgICAgICovCiAgICAgICAgc3RhdGljIGdldCBpbXBvcnRQYXRoKCkgewogICAgICAgICAgaWYgKCF0aGlzLmhhc093blByb3BlcnR5KEpTQ29tcGlsZXJfcmVuYW1lUHJvcGVydHkoJ19pbXBvcnRQYXRoJywgdGhpcykpKSB7CiAgICAgICAgICAgIGNvbnN0IG1ldGEgPSB0aGlzLmltcG9ydE1ldGE7CiAgICAgICAgICAgIGlmIChtZXRhKSB7CiAgICAgICAgICAgICAgdGhpcy5faW1wb3J0UGF0aCA9IHBhdGhGcm9tVXJsKG1ldGEudXJsKTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICBjb25zdCBtb2R1bGUgPSBEb21Nb2R1bGUuaW1wb3J0KC8qKiBAdHlwZSB7UG9seW1lckVsZW1lbnRDb25zdHJ1Y3Rvcn0gKi8gKHRoaXMpLmlzKTsKICAgICAgICAgICAgICB0aGlzLl9pbXBvcnRQYXRoID0gKG1vZHVsZSAmJiBtb2R1bGUuYXNzZXRwYXRoKSB8fAogICAgICAgICAgICAgICAgT2JqZWN0LmdldFByb3RvdHlwZU9mKC8qKiBAdHlwZSB7UG9seW1lckVsZW1lbnRDb25zdHJ1Y3Rvcn0qLyAodGhpcykucHJvdG90eXBlKS5jb25zdHJ1Y3Rvci5pbXBvcnRQYXRoOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gdGhpcy5faW1wb3J0UGF0aDsKICAgICAgICB9CgogICAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgICAgc3VwZXIoKTsKICAgICAgICAgIC8qKiBAdHlwZSB7SFRNTFRlbXBsYXRlRWxlbWVudH0gKi8KICAgICAgICAgIHRoaXMuX3RlbXBsYXRlOwogICAgICAgICAgLyoqIEB0eXBlIHtzdHJpbmd9ICovCiAgICAgICAgICB0aGlzLl9pbXBvcnRQYXRoOwogICAgICAgICAgLyoqIEB0eXBlIHtzdHJpbmd9ICovCiAgICAgICAgICB0aGlzLnJvb3RQYXRoOwogICAgICAgICAgLyoqIEB0eXBlIHtzdHJpbmd9ICovCiAgICAgICAgICB0aGlzLmltcG9ydFBhdGg7CiAgICAgICAgICAvKiogQHR5cGUge1N0YW1wZWRUZW1wbGF0ZSB8IEhUTUxFbGVtZW50IHwgU2hhZG93Um9vdH0gKi8KICAgICAgICAgIHRoaXMucm9vdDsKICAgICAgICAgIC8qKiBAdHlwZSB7IU9iamVjdDxzdHJpbmcsICFFbGVtZW50Pn0gKi8KICAgICAgICAgIHRoaXMuJDsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIE92ZXJyaWRlcyB0aGUgZGVmYXVsdCBgUHJvcGVydHlBY2Nlc3NvcnNgIHRvIGVuc3VyZSBjbGFzcwogICAgICAgICAqIG1ldGFwcm9ncmFtbWluZyByZWxhdGVkIHRvIHByb3BlcnR5IGFjY2Vzc29ycyBhbmQgZWZmZWN0cyBoYXMKICAgICAgICAgKiBjb21wbGV0ZWQgKGNhbGxzIGBmaW5hbGl6ZWApLgogICAgICAgICAqCiAgICAgICAgICogSXQgYWxzbyBpbml0aWFsaXplcyBhbnkgcHJvcGVydHkgZGVmYXVsdHMgcHJvdmlkZWQgdmlhIGB2YWx1ZWAgaW4KICAgICAgICAgKiBgcHJvcGVydGllc2AgbWV0YWRhdGEuCiAgICAgICAgICoKICAgICAgICAgKiBAcmV0dXJuIHt2b2lkfQogICAgICAgICAqIEBvdmVycmlkZQogICAgICAgICAqIEBzdXBwcmVzcyB7aW52YWxpZENhc3RzLG1pc3NpbmdQcm9wZXJ0aWVzfSBnby9taXNzaW5nZm5wcm9wcwogICAgICAgICAqLwogICAgICAgIF9pbml0aWFsaXplUHJvcGVydGllcygpIHsKICAgICAgICAgIHRoaXMuY29uc3RydWN0b3IuZmluYWxpemUoKTsKICAgICAgICAgIC8vIG5vdGU6IGZpbmFsaXplIHRlbXBsYXRlIHdoZW4gd2UgaGF2ZSBhY2Nlc3MgdG8gYGxvY2FsTmFtZWAgdG8KICAgICAgICAgIC8vIGF2b2lkIGRlcGVuZGVuY2Ugb24gYGlzYCBmb3IgcG9seWZpbGxpbmcgc3R5bGluZy4KICAgICAgICAgIHRoaXMuY29uc3RydWN0b3IuX2ZpbmFsaXplVGVtcGxhdGUoLyoqIEB0eXBlIHshSFRNTEVsZW1lbnR9ICovKHRoaXMpLmxvY2FsTmFtZSk7CiAgICAgICAgICBzdXBlci5faW5pdGlhbGl6ZVByb3BlcnRpZXMoKTsKICAgICAgICAgIC8vIHNldCBwYXRoIGRlZmF1bHRzCiAgICAgICAgICB0aGlzLnJvb3RQYXRoID0gcm9vdFBhdGg7CiAgICAgICAgICB0aGlzLmltcG9ydFBhdGggPSB0aGlzLmNvbnN0cnVjdG9yLmltcG9ydFBhdGg7CiAgICAgICAgICAvLyBhcHBseSBwcm9wZXJ0eSBkZWZhdWx0cy4uLgogICAgICAgICAgbGV0IHAkID0gcHJvcGVydHlEZWZhdWx0cyh0aGlzLmNvbnN0cnVjdG9yKTsKICAgICAgICAgIGlmICghcCQpIHsKICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgfQogICAgICAgICAgZm9yIChsZXQgcCBpbiBwJCkgewogICAgICAgICAgICBsZXQgaW5mbyA9IHAkW3BdOwogICAgICAgICAgICBpZiAodGhpcy5fY2FuQXBwbHlQcm9wZXJ0eURlZmF1bHQocCkpIHsKICAgICAgICAgICAgICBsZXQgdmFsdWUgPSB0eXBlb2YgaW5mby52YWx1ZSA9PSAnZnVuY3Rpb24nID8KICAgICAgICAgICAgICAgIGluZm8udmFsdWUuY2FsbCh0aGlzKSA6CiAgICAgICAgICAgICAgICBpbmZvLnZhbHVlOwogICAgICAgICAgICAgIC8vIFNldCB2aWEgYF9zZXRQcm9wZXJ0eWAgaWYgdGhlcmUgaXMgYW4gYWNjZXNzb3IsIHRvIGVuYWJsZQogICAgICAgICAgICAgIC8vIGluaXRpYWxpemluZyByZWFkT25seSBwcm9wZXJ0eSBkZWZhdWx0cwogICAgICAgICAgICAgIGlmICh0aGlzLl9oYXNBY2Nlc3NvcihwKSkgewogICAgICAgICAgICAgICAgdGhpcy5fc2V0UGVuZGluZ1Byb3BlcnR5KHAsIHZhbHVlLCB0cnVlKTsKICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgdGhpc1twXSA9IHZhbHVlOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogRGV0ZXJtaW5lcyBpZiBhIHByb3BlcnR5IGRmZWF1bHQgY2FuIGJlIGFwcGxpZWQuIEZvciBleGFtcGxlLCB0aGlzCiAgICAgICAgICogcHJldmVudHMgYSBkZWZhdWx0IGZyb20gYmVpbmcgYXBwbGllZCB3aGVuIGEgcHJvcGVydHkgdGhhdCBoYXMgbm8KICAgICAgICAgKiBhY2Nlc3NvciBpcyBvdmVycmlkZGVuIGJ5IGl0cyBob3N0IGJlZm9yZSB1cGdyYWRlIChlLmcuIHZpYSBhIGJpbmRpbmcpLgogICAgICAgICAqIEBvdmVycmlkZQogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBwcm9wZXJ0eSBOYW1lIG9mIHRoZSBwcm9wZXJ0eQogICAgICAgICAqIEByZXR1cm4ge2Jvb2xlYW59IFJldHVybnMgdHJ1ZSBpZiB0aGUgcHJvcGVydHkgZGVmYXVsdCBj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bnRhdGlvbiBlbmFibGVzIHRoZSBwcm9wZXJ0eSBlZmZlY3RzIHN5c3RlbSBhbmQKICAgICAgICAgKiBmbHVzaGVzIGFueSBwZW5kaW5nIHByb3BlcnRpZXMsIGFuZCB1cGRhdGVzIHNoaW1tZWQgQ1NTIHByb3BlcnRpZXMKICAgICAgICAgKiB3aGVuIHVzaW5nIHRoZSBTaGFkeUNTUyBzY29waW5nL2N1c3RvbSBwcm9wZXJ0aWVzIHBvbHlmaWxsLgogICAgICAgICAqCiAgICAgICAgICogQG92ZXJyaWRlCiAgICAgICAgICogQHN1cHByZXNzIHttaXNzaW5nUHJvcGVydGllcywgaW52YWxpZENhc3RzfSBTdXBlciBtYXkgb3IgbWF5IG5vdAogICAgICAgICAqICAgICBpbXBsZW1lbnQgdGhlIGNhbGxiYWNrCiAgICAgICAgICogQHJldHVybiB7dm9pZH0KICAgICAgICAgKi8KICAgICAgICBjb25uZWN0ZWRDYWxsYmFjaygpIHsKICAgICAgICAgIGlmICh3aW5kb3cuU2hhZHlDU1MgJiYgdGhpcy5fdGVtcGxhdGUpIHsKICAgICAgICAgICAgd2luZG93LlNoYWR5Q1NTLnN0eWxlRWxlbWVudCgvKiogQHR5cGUgeyFIVE1MRWxlbWVudH0gKi8odGhpcykpOwogICAgICAgICAgfQogICAgICAgICAgc3VwZXIuY29ubmVjdGVkQ2FsbGJhY2soKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFN0YW1wcyB0aGUgZWxlbWVudCB0ZW1wbGF0ZS4KICAgICAgICAgKgogICAgICAgICAqIEByZXR1cm4ge3ZvaWR9CiAgICAgICAgICogQG92ZXJyaWRlCiAgICAgICAgICovCiAgICAgICAgcmVhZHkoKSB7CiAgICAgICAgICBpZiAodGhpcy5fdGVtcGxhdGUpIHsKICAgICAgICAgICAgdGhpcy5yb290ID0gdGhpcy5fc3RhbXBUZW1wbGF0ZSh0aGlzLl90ZW1wbGF0ZSk7CiAgICAgICAgICAgIHRoaXMu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0aW9ucyBmaXJlZAogICAgICAgICAgLy8gZHVyaW5nIHRoaXMgcHJvY2VzcyBmcm9tIGJlaW5nIGhhbmRsZWQgYmVmb3JlIGNsaWVudHMgYXJlIHJlYWR5LgogICAgICAgICAgc3VwZXIuX3JlYWR5Q2xpZW50cygpOwogICAgICAgIH0KCgogICAgICAgIC8qKgogICAgICAgICAqIEF0dGFjaGVzIGFuIGVsZW1lbnQncyBzdGFtcGVkIGRvbSB0byBpdHNlbGYuIEJ5IGRlZmF1bHQsCiAgICAgICAgICogdGhpcyBtZXRob2QgY3JlYXRlcyBhIGBzaGFkb3dSb290YCBhbmQgYWRkcyB0aGUgZG9tIHRvIGl0LgogICAgICAgICAqIEhvd2V2ZXIsIHRoaXMgbWV0aG9kIG1heSBiZSBvdmVycmlkZGVuIHRvIGFsbG93IGFuIGVsZW1lbnQKICAgICAgICAgKiB0byBwdXQgaXRzIGRvbSBpbiBhbm90aGVyIGxvY2F0aW9uLgogICAgICAgICAqCiAgICAgICAgICogQG92ZXJyaWRlCiAgICAgICAgICogQHRocm93cyB7RXJyb3J9CiAgICAgICAgICogQHN1cHByZXNzIHttaXNzaW5nUmV0dXJufQogICAgICAgICAqIEBwYXJhbSB7U3RhbXBlZFRlbXBsYXRlfSBkb20gdG8gYXR0YWNoIHRvIHRoZSBlbGVtZW50LgogICAgICAgICAqIEByZXR1cm4ge1NoYWRvd1Jvb3R9IG5vZGUgdG8gd2hpY2ggdGhlIGRvbSBoYXMgYmVlbiBhdHRhY2hlZC4KICAgICAgICAgKi8KICAgICAgICBfYXR0YWNoRG9tKGRvbSkgewogICAgICAgICAgY29uc3QgbiA9IHdyYXAodGhpcyk7CiAgICAgICAgICBpZiAobi5hdHRhY2hTaGFkb3cpIHsKICAgICAgICAgICAgaWYgKGRvbSkgewogICAgICAgICAgICAgIGlmICghbi5zaGFkb3dSb290KSB7CiAgICAgICAgICAgICAgICBuLmF0dGFjaFNoYWRvdyh7bW9kZTogJ29wZW4nLCBzaGFkeVVwZ3JhZGVGcmFnbWVudDogZG9tfSk7CiAgICAgICAgICAgICAgICBuLnNoYWRvd1Jvb3QuYXBwZW5kQ2hpbGQoZG9tKTsKICAgICAgICAgICAgICAgIC8vIFdoZW4gYGFkb3B0ZWRTdHlsZVNoZWV0c2AgaXMgc3VwcG9ydGVkIGEgc3R5bGVzaGVldCBpcyBtYWRlCiAgICAgICAgICAgICAgICAvLyBhdmFpbGFibGUgb24gdGhlIGVsZW1lbnQgY29uc3RydWN0b3IuCiAgICAgICAgICAgICAgICBpZiAodGhpcy5jb25zdHJ1Y3Rvci5fc3R5bGVTaGVldCkgewogICAgICAgICAgICAgICAgICBuLnNoYWRvd1Jvb3QuYWRvcHRlZFN0eWxlU2hlZXRzID0gW3RoaXMuY29uc3RydWN0b3IuX3N0eWxlU2hlZXRdOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBpZiAoc3luY0luaXRpYWxSZW5kZXIgJiYgd2luZG93LlNoYWR5RE9NKSB7CiAgICAgICAgICAgICAgICB3aW5kb3cuU2hhZHlET00uZmx1c2hJbml0aWFsKG4uc2hhZG93Um9vdCk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIHJldHVybiBuLnNoYWRvd1Jvb3Q7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ1NoYWRvd0RPTSBub3QgYXZhaWxhYmxlLiAnICsKICAgICAgICAgICAgICAvLyBUT0RPKHNvcnZlbGwpOiBtb3ZlIHRvIGNvbXBpbGUtdGltZSBjb25kaXRpb25hbCB3aGVuIHN1cHBvcnRlZAogICAgICAgICAgICAnUG9seW1lckVsZW1lbnQgY2FuIGNyZWF0ZSBkb20gYXMgY2hpbGRyZW4gaW5zdGVhZCBvZiBpbiAnICsKICAgICAgICAgICAgJ1NoYWRvd0RPTSBieSBzZXR0aW5nIGB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UdIVF9GTEFHXSwKICAgICAgICBbJ3JlYXJnJywgV1JBUF9SRUFSR19GTEFHXQogICAgICBdOwoKICAgICAgLyoqIGBPYmplY3QjdG9TdHJpbmdgIHJlc3VsdCByZWZlcmVuY2VzLiAqLwogICAgICB2YXIgYXJnc1RhZyA9ICdbb2JqZWN0IEFyZ3VtZW50c10nLAogICAgICAgICAgYXJyYXlUYWcgPSAnW29iamVjdCBBcnJheV0nLAogICAgICAgICAgYXN5bmNUYWcgPSAnW29iamVjdCBBc3luY0Z1bmN0aW9uXScsCiAgICAgICAgICBib29sVGFnID0gJ1tvYmplY3QgQm9vbGVhbl0nLAogICAgICAgICAgZGF0ZVRhZyA9ICdbb2JqZWN0IERhdGVdJywKICAgICAgICAgIGRvbUV4Y1RhZyA9ICdbb2JqZWN0IERPTUV4Y2VwdGlvbl0nLAogICAgICAgICAgZXJyb3JUYWcgPSAnW29iamVjdCBFcnJvcl0nLAogICAgICAgICAgZnVuY1RhZyA9ICdbb2JqZWN0IEZ1bmN0aW9uXScsCiAgICAgICAgICBnZW5UYWcgPSAnW29iamVjdCBHZW5lcmF0b3JGdW5jdGlvbl0nLAogICAgICAgICAgbWFwVGFnID0gJ1tvYmplY3QgTWFwXScsCiAgICAgICAgICBudW1iZXJUYWcgPSAnW29iamVjdCBOdW1iZXJdJywKICAgICAgICAgIG51bGxUYWcgPSAnW29iamVjdCBOdWxsXScsCiAgICAgICAgICBvYmplY3RUYWcgPSAnW29iamVjdCBPYmplY3RdJywKICAgICAgICAgIHByb21pc2VUYWcgPSAnW29iamVjdCBQcm9taXNlXScsCiAgICAgICAgICBwcm94eVRhZyA9ICdbb2JqZWN0IFByb3h5XScsCiAgICAgICAgICByZWdleHBUYWcgPSAnW29iamVjdCBSZWdFeHBdJywKICAgICAgICAgIHNldFRhZyA9ICdbb2JqZWN0IFNldF0nLAogICAgICAgICAgc3RyaW5nVGFnID0gJ1tvYmplY3QgU3RyaW5nXScsCiAgICAgICAgICBzeW1ib2xUYWcgPSAnW29iamVjdCBTeW1ib2xdJywKICAgICAgICAgIHVuZGVmaW5lZFRhZyA9ICdbb2JqZWN0IFVuZGVmaW5lZF0nLAogICAgICAgICAgd2Vha01hcFRhZyA9ICdbb2JqZWN0IFdlYWtNYXBdJywKICAgICAgICAgIHdlYWtTZXRUYWcgPSAnW29iamVjdCBXZWFrU2V0XSc7CgogICAgICB2YXIgYXJyYXlCdWZmZXJUYWcgPSAnW29iamVjdCBBcnJheUJ1ZmZlcl0nLAogICAgICAgICAgZGF0YVZpZXdUYWcgPSAnW29iamVjdCBEYXRhVmlld10nLAogICAgICAgICAgZmxvYXQzMlRhZyA9ICdbb2JqZWN0IEZsb2F0MzJBcnJheV0nLAogICAgICAgICAgZmxvYXQ2NFRhZyA9ICdbb2JqZWN0IEZsb2F0NjRBcnJheV0nLAogICAgICAgICAgaW50OFRhZyA9ICdbb2JqZWN0IEludDhBcnJheV0nLAogICAgICAgICAgaW50MTZUYWcgPSAnW29iamVjdCBJbnQxNkFycmF5XScsCiAgICAgICAgICBpbnQzMlRhZyA9ICdbb2JqZWN0IEludDMyQXJyYXldJywKICAgICAgICAgIHVpbnQ4VGFnID0gJ1tvYmplY3QgVWludDhBcnJheV0nLAogICAgICAgICAgdWludDhDbGFtcGVkVGFnID0gJ1tvYmplY3QgVWludDhDbGFtcGVkQXJyYXldJywKICAgICAgICAgIHVpbnQxNlRhZyA9ICdbb2JqZWN0IFVpbnQxNkFycmF5XScsCiAgICAgICAgICB1aW50MzJUYWcgPSAnW29iamVjdCBVaW50MzJBcnJheV0nOwoKICAgICAgLyoqIFVzZWQgdG8gbWF0Y2ggZW1wdHkgc3RyaW5nIGxpdGVyYWxzIGluIGNvbXBpbGVkIHRlbXBsYXRlIHNvdXJjZS4gKi8KICAgICAgdmFyIHJlRW1wdHlTdHJpbmdMZWFkaW5nID0gL1xiX19wIFwrPSAnJzsvZywKICAgICAgICAgIHJlRW1wdHlTdHJpbmdNaWRkbGUgPSAvXGIoX19wIFwrPS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0gJ1xcZCsnLAogICAgICAgICAgcnNEaW5nYmF0ID0gJ1snICsgcnNEaW5nYmF0UmFuZ2UgKyAnXScsCiAgICAgICAgICByc0xvd2VyID0gJ1snICsgcnNMb3dlclJhbmdlICsgJ10nLAogICAgICAgICAgcnNNaXNjID0gJ1teJyArIHJzQXN0cmFsUmFuZ2UgKyByc0JyZWFrUmFuZ2UgKyByc0RpZ2l0cyArIHJzRGluZ2JhdFJhbmdlICsgcnNMb3dlclJhbmdlICsgcnNVcHBlclJhbmdlICsgJ10nLAogICAgICAgICAgcnNGaXR6ID0gJ1xcdWQ4M2NbXFx1ZGZmYi1cXHVkZmZmXScsCiAgICAgICAgICByc01vZGlmaWVyID0gJyg/OicgKyByc0NvbWJvICsgJ3wnICsgcnNGaXR6ICsgJyknLAogICAgICAgICAgcnNOb25Bc3RyYWwgPSAnW14nICsgcnNBc3RyYWxSYW5nZSArICddJywKICAgICAgICAgIHJzUmVnaW9uYWwgPSAnKD86XFx1ZDgzY1tcXHVkZGU2LVxcdWRkZmZdKXsyfScsCiAgICAgICAgICByc1N1cnJQYWlyID0gJ1tcXHVkODAwLVxcdWRiZmZdW1xcdWRjMDAtXFx1ZGZmZl0nLAogICAgICAgICAgcnNVcHBlciA9ICdbJyArIHJzVXBwZXJSYW5nZSArICddJywKICAgICAgICAgIHJzWldKID0gJ1xcdTIwMGQnOwoKICAgICAgLyoqIFVzZWQgdG8gY29tcG9zZSB1bmljb2RlIHJlZ2V4ZXMuICovCiAgICAgIHZhciByc01pc2NMb3dlciA9ICcoPzonICsgcnNMb3dlciArICd8JyArIHJzTWlzYyArICcpJywKICAgICAgICAgIHJzTWlzY1VwcGVyID0gJyg/OicgKyByc1VwcGVyICsgJ3wnICsgcnNNaXNjICsgJyknLAogICAgICAgICAgcnNPcHRDb250ckxvd2VyID0gJyg/OicgKyByc0Fwb3MgKyAnKD86ZHxsbHxtfHJlfHN8dHx2ZSkpPycsCiAgICAgICAgICByc09wdENvbnRyVXBwZXIgPSAnKD86JyArIHJzQXBvcyArICcoPzpEfExMfE18UkV8U3xUfFZFKSk/JywKICAgICAgICAgIHJlT3B0TW9kID0gcnNNb2RpZmllciArICc/JywKICAgICAgICAgIHJzT3B0VmFyID0gJ1snICsgcnNWYXJSYW5nZSArICddPycsCiAgICAgICAgICByc09wdEpvaW4gPSAnKD86JyArIHJzWldKICsgJyg/OicgKyBbcnNOb25Bc3RyYWwsIHJzUmVnaW9uYWwsIHJzU3VyclBhaXJdLmpvaW4oJ3wnKSArICcpJyArIHJzT3B0VmFyICsgcmVPcHRNb2QgKyAnKSonLAogICAgICAgICAgcnNPcmRMb3dlciA9ICdcXGQqKD86MXN0fDJuZHwzcmR8KD8hWzEyM10pXFxkdGgpKD89XFxifFtBLVpfXSknLAogICAgICAgICAgcnNPcmRVcHBlciA9ICdcXGQqKD86MVNUfDJORHwzUkR8KD8hWzEyM10pXFxkVEgpKD89XFxifFthLXpfXSknLAogICAgICAgICAgcnNTZXEgPSByc09wdFZhciArIHJlT3B0TW9kICsgcnNPcHRKb2luLAogICAgICAgICAgcnNFbW9qaSA9ICcoPzonICsgW3JzRGluZ2JhdCwgcnNSZWdpb25hbCwgcnNTdXJyUGFpcl0uam9pbignfCcpICsgJyknICsgcnNTZXEsCiAgICAgICAgICByc1N5bWJvbCA9ICcoPzonICsgW3JzTm9uQXN0cmFsICsgcnNDb21ibyArICc/JywgcnNDb21ibywgcnNSZWdpb25hbCwgcnNTdXJyUGFpciwgcnNBc3RyYWxdLmpvaW4oJ3wnKSArICcpJzsKCiAgICAgIC8qKiBVc2VkIHRvIG1hdGNoIGFwb3N0cm9waGVzLiAqLwogICAgICB2YXIgcmVBcG9zID0gUmVnRXhwKHJzQXBvcywgJ2cnKTsKCiAgICAgIC8qKgogICAgICAgKiBVc2VkIHRvIG1hdGNoIFtjb21iaW5pbmcgZGlhY3JpdGljYWwgbWFya3NdKGh0dHBzOi8vZW4ud2lraXBlZGlhLm9yZy93aWtpL0NvbWJpbmluZ19EaWFjcml0aWNhbF9NYXJrcykgYW5kCiAgICAgICAqIFtjb21iaW5pbmcgZGlhY3JpdGljYWwgbWFya3MgZm9yIHN5bWJvbHNdKGh0dHBzOi8vZW4ud2lraXBlZGlhLm9yZy93aWtpL0NvbWJpbmluZ19EaWFjcml0aWNhbF9NYXJrc19mb3JfU3ltYm9scykuCiAgICAgICAqLwogICAgICB2YXIgcmVDb21ib01hcmsgPSBSZWdFeHAocnNDb21ibywgJ2cnKTsKCiAgICAgIC8qKiBVc2VkIHRvIG1hdGNoIFtzdHJpbmcgc3ltYm9sc10oaHR0cHM6Ly9tYXRoaWFzYnluZW5zLmJlL25vdGVzL2phdmFzY3JpcHQtdW5pY29kZSkuICovCiAgICAgIHZhciByZVVuaWNvZGUgPSBSZWdFeHAocnNGaXR6ICsgJyg/PScgKyByc0ZpdHogKyAnKXwnICsgcnNTeW1ib2wgKyByc1NlcSwgJ2cnKTsKCiAgICAgIC8qKiBVc2VkIHRvIG1hdGNoIGNvbXBsZXggb3IgY29tcG91bmQgd29yZHMuICovCiAgICAgIHZhciByZVVuaWNvZGVXb3JkID0gUmVnRXhwKFsKICAgICAgICByc1VwcGVyICsgJz8nICsgcnNMb3dlciArICcrJyArIHJzT3B0Q29udHJMb3dlciArICcoPz0nICsgW3JzQnJlYWssIHJzVXBwZXIsICckJ10uam9pbignfCcpICsgJyknLAogICAgICAgIHJzTWlzY1VwcGVyICsgJysnICsgcnNPcHRDb250clVwcGVyICsgJyg/PScgKyBbcnNCcmVhaywgcnNVcHBlciArIHJzTWlzY0xvd2VyLCAnJCddLmpvaW4oJ3wnKSArICcpJywKICAgICAgICByc1VwcGVyICsgJz8nICsgcnNNaXNjTG93ZXIgKyAnKycgKyByc09wdENvbnRyTG93ZXIsCiAgICAgICAgcnNVcHBlciArICcrJyArIHJzT3B0Q29udHJVcHBlciwKICAgICAgICByc09yZFVwcGVyLAogICAgICAgIHJzT3JkTG93ZXIsCiAgICAgICAgcnNEaWdpdHMsCiAgICAgICAgc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AndScsICdcdTAxNzEnOiAndScsICdcdTAxNzMnOiAndScsCiAgICAgICAgJ1x1MDE3NCc6ICdXJywgICdcdTAxNzUnOiAndycsCiAgICAgICAgJ1x1MDE3Nic6ICdZJywgICdcdTAxNzcnOiAneScsICdcdTAxNzgnOiAnWScsCiAgICAgICAgJ1x1MDE3OSc6ICdaJywgICdcdTAxN2InOiAnWicsICdcdTAxN2QnOiAnWicsCiAgICAgICAgJ1x1MDE3YSc6ICd6JywgICdcdTAxN2MnOiAneicsICdcdTAxN2UnOiAneicsCiAgICAgICAgJ1x1MDEzMic6ICdJSicsICdcdTAxMzMnOiAnaWonLAogICAgICAgICdcdTAxNTInOiAnT2UnLCAnXHUwMTUzJzogJ29lJywKICAgICAgICAnXHUwMTQ5JzogIiduIiwgJ1x1MDE3Zic6ICdzJwogICAgICB9OwoKICAgICAgLyoqIFVzZWQgdG8gbWFwIGNoYXJhY3RlcnMgdG8gSFRNTCBlbnRpdGllcy4gKi8KICAgICAgdmFyIGh0bWxFc2NhcGVzID0gewogICAgICAgICcmJzogJyZhbXA7JywKICAgICAgICAnPCc6ICcmbHQ7JywKICAgICAgICAnPic6ICcmZ3Q7JywKICAgICAgICAnIic6ICcmcXVvdDsnLAogICAgICAgICInIjogJyYjMzk7JwogICAgICB9OwoKICAgICAgLyoqIFVzZWQgdG8gbWFwIEhUTUwgZW50aXRpZXMgdG8gY2hhcmFjdGVycy4gKi8KICAgICAgdmFyIGh0bWxVbmVzY2FwZXMgPSB7CiAgICAgICAgJyZhbXA7JzogJyYnLAogICAgICAgICcmbHQ7JzogJzwnLAogICAgICAgICcmZ3Q7JzogJz4nLAogICAgICAgICcmcXVvdDsnOiAnIicsCiAgICAgICAgJyYjMzk7JzogIiciCiAgICAgIH07CgogICAgICAvKiogVXNlZCB0byBlc2NhcGUgY2hhcmFjdGVycyBmb3IgaW5jbHVzaW9uIGluIGNvbXBpbGVkIHN0cmluZyBsaXRlcmFscy4gKi8KICAgICAgdmFyIHN0cmluZ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AgIGZ1bmN0aW9uIGFycmF5RWFjaChhcnJheSwgaXRlcmF0ZWUpIHsKICAgICAgICB2YXIgaW5kZXggPSAtMSwKICAgICAgICAgICAgbGVuZ3RoID0gYXJyYXkgPT0gbnVsbCA/IDAgOiBhcnJheS5sZW5ndGg7CgogICAgICAgIHdoaWxlICgrK2luZGV4IDwgbGVuZ3RoKSB7CiAgICAgICAgICBpZiAoaXRlcmF0ZWUoYXJyYXlbaW5kZXhdLCBpbmRleCwgYXJyYXkpID09PSBmYWxzZSkgewogICAgICAgICAgICBicmVhazsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIGFycmF5OwogICAgICB9CgogICAgICAvKioKICAgICAgICogQSBzcGVjaWFsaXplZCB2ZXJzaW9uIG9mIGBfLmZvckVhY2hSaWdodGAgZm9yIGFycmF5cyB3aXRob3V0IHN1cHBvcnQgZm9yCiAgICAgICAqIGl0ZXJhdGVlIHNob3J0aGFuZHMuCiAgICAgICAqCiAgICAgICAqIEBwcml2YXRlCiAgICAgICAqIEBwYXJhbSB7QXJyYXl9IFthcnJheV0gVGhlIGFycmF5IHRvIGl0ZXJhdGUgb3Zlci4KICAgICAgICogQHBhcmFtIHtGdW5jdGlvbn0gaXRlcmF0ZWUgVGhlIGZ1bmN0aW9uIGludm9rZWQgcGVyIGl0ZXJhdGlvbi4KICAgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIGBhcnJheWAuCiAgICAgICAqLwogICAgICBmdW5jdGlvbiBhcnJheUVhY2hSaWdodChhcnJheSwgaXRlcmF0ZWUpIHsKICAgICAgICB2YXIgbGVuZ3RoID0gYXJyYXkgPT0gbnVsbCA/IDAgOiBhcnJheS5sZW5ndGg7CgogICAgICAgIHdoaWxlIChsZW5ndGgtLSkgewogICAgICAgICAgaWYgKGl0ZXJhdGVlKGFycmF5W2xlbmd0aF0sIGxlbmd0aCwgYXJyYXkpID09PSBmYWxzZSkgewogICAgICAgICAgICBicmVhazsKICAgICAgIC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ydGhhbmRzLgogICAgICAgKgogICAgICAgKiBAcHJpdmF0ZQogICAgICAgKiBAcGFyYW0ge0FycmF5fSBbYXJyYXldIFRoZSBhcnJheSB0byBpdGVyYXRlIG92ZXIuCiAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IHByZWRpY2F0ZSBUaGUgZnVuY3Rpb24gaW52b2tlZCBwZXIgaXRlcmF0aW9uLgogICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIG5ldyBmaWx0ZXJlZCBhcnJheS4KICAgICAgICovCiAgICAgIGZ1bmN0aW9uIGFycmF5RmlsdGVyKGFycmF5LCBwcmVkaWNhdGUpIHsKICAgICAgICB2YXIgaW5kZXggPSAtMSwKICAgICAgICAgICAgbGVuZ3RoID0gYXJyYXkgPT0gbnVsbCA/IDAgOiBhcnJheS5sZW5ndGgsCiAgICAgICAgICAgIHJlc0luZGV4ID0gMCwKICAgICAgICAgICAgcmVzdWx0ID0gW107CgogICAgICAgIHdoaWxlICgrK2luZGV4IDwgbGVuZ3RoKSB7CiAgICAgICAgICB2YXIgdmFsdWUgPSBhcnJheVtpbmRleF07CiAgICAgICAgICBpZiAocHJlZGljYXRlKHZhbHVlLCBpbmRleCwgYXJyYXkpKSB7CiAgICAgICAgICAgIHJlc3VsdFtyZXNJbmRleCsrXSA9IHZhbHVlOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICB9CgogICAgICAvKioKICAgICAgICogQSBzcGVjaWFsaXplZCB2ZXJzaW9uIG9mIGBfLmluY2x1ZGVzYCBmb3IgYXJyYXlzIHdpdGhvdXQgc3VwcG9ydCBmb3IKICAgICAgICogc3BlY2lmeWluZyBhbiBpbmRleCB0byBzZWFyY2ggZnJvbS4KICAgICAgICoKICAgICAgICogQHByaXZhdGUKICAgICAgICogQHBhcmFtIHtBcnJheX0gW2FycmF5XSBUaGUgYXJyYXkgdG8gaW5zcGVjdC4KICAgICAgICogQHBhc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XJyYXkubGVuZ3RoOwoKICAgICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkgewogICAgICAgICAgaWYgKGNvbXBhcmF0b3IodmFsdWUsIGFycmF5W2luZGV4XSkpIHsKICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgfQoKICAgICAgLyoqCiAgICAgICAqIEEgc3BlY2lhbGl6ZWQgdmVyc2lvbiBvZiBgXy5tYXBgIGZvciBhcnJheXMgd2l0aG91dCBzdXBwb3J0IGZvciBpdGVyYXRlZQogICAgICAgKiBzaG9ydGhhbmRzLgogICAgICAgKgogICAgICAgKiBAcHJpdmF0ZQogICAgICAgKiBAcGFyYW0ge0FycmF5fSBbYXJyYXldIFRoZSBhcnJheSB0byBpdGVyYXRlIG92ZXIuCiAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IGl0ZXJhdGVlIFRoZSBmdW5jdGlvbiBpbnZva2VkIHBlciBpdGVyYXRpb24uCiAgICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyB0aGUgbmV3IG1hcHBlZCBhcnJheS4KICAgICAgICovCiAgICAgIGZ1bmN0aW9uIGFycmF5TWFwKGFycmF5LCBpdGVyYXRlZSkgewogICAgICAgIHZhciBpbmRleCA9IC0xLAogICAgICAgICAgICBsZW5ndGggPSBhcnJheSA9PSBudWxsID8gMCA6IGFycmF5Lmxlbmd0aCwKICAgICAgICAgICAgcmVzdWx0ID0gQXJyYXkobGVuZ3RoKTsKCiAgICAgICAgd2hpbGUgKCsraW5kZXggPCBsZW5ndGgpIHsKICAgICAgICAgIHJlc3VsdFtpbmRleF0gPSBpdGVyYXRlZShhcnJheVtpbmRleF0sIGluZGV4LCBhcnJheSk7CiAgICAgICAgfQogICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgIH0KCiAgICAgIC8qKgogICAgICAgKiBBcHBlbmRzIHRoZSBlbGVtZW50cyB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VkIHBlciBpdGVyYXRpb24uCiAgICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiBhbnkgZWxlbWVudCBwYXNzZXMgdGhlIHByZWRpY2F0ZSBjaGVjaywKICAgICAgICogIGVsc2UgYGZhbHNlYC4KICAgICAgICovCiAgICAgIGZ1bmN0aW9uIGFycmF5U29tZShhcnJheSwgcHJlZGljYXRlKSB7CiAgICAgICAgdmFyIGluZGV4ID0gLTEsCiAgICAgICAgICAgIGxlbmd0aCA9IGFycmF5ID09IG51bGwgPyAwIDogYXJyYXkubGVuZ3RoOwoKICAgICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkgewogICAgICAgICAgaWYgKHByZWRpY2F0ZShhcnJheVtpbmRleF0sIGluZGV4LCBhcnJheSkpIHsKICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgfQoKICAgICAgLyoqCiAgICAgICAqIEdldHMgdGhlIHNpemUgb2YgYW4gQVNDSUkgYHN0cmluZ2AuCiAgICAgICAqCiAgICAgICAqIEBwcml2YXRlCiAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBzdHJpbmcgVGhlIHN0cmluZyBpbnNwZWN0LgogICAgICAgKiBAcmV0dXJucyB7bnVtYmVyfSBSZXR1cm5zIHRoZSBzdHJpbmcgc2l6ZS4KICAgICAgICovCiAgICAgIHZhciBhc2NpaVNpemUgPSBiYXNlUHJvcGVydHkoJ2xlbmd0aCcpOwoKICAgICAgLyoqCiAgICAgICAqIENvbnZlcnRzIGFuIEFTQ0lJIGBzdHJpbmdgIHRvIGFuIGFycmF5LgogICAgICAgKgogICAgICAgKiBAcHJpdmF0ZQogICAgICAgKiBAcGFyYW0ge3N0cmluZ30gc3RyaW5nIFRoZSBzdHJpbmcgdG8gY29udmVydC4KICAgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBj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pdGVyYXRlIG92ZXIgYGNvbGxlY3Rpb25gLgogICAgICAgKiBAcmV0dXJucyB7Kn0gUmV0dXJucyB0aGUgZm91bmQgZWxlbWVudCBvciBpdHMga2V5LCBlbHNlIGB1bmRlZmluZWRgLgogICAgICAgKi8KICAgICAgZnVuY3Rpb24gYmFzZUZpbmRLZXkoY29sbGVjdGlvbiwgcHJlZGljYXRlLCBlYWNoRnVuYykgewogICAgICAgIHZhciByZXN1bHQ7CiAgICAgICAgZWFjaEZ1bmMoY29sbGVjdGlvbiwgZnVuY3Rpb24odmFsdWUsIGtleSwgY29sbGVjdGlvbikgewogICAgICAgICAgaWYgKHByZWRpY2F0ZSh2YWx1ZSwga2V5LCBjb2xsZWN0aW9uKSkgewogICAgICAgICAgICByZXN1bHQgPSBrZXk7CiAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgIH0KICAgICAgICB9KTsKICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICB9CgogICAgICAvKioKICAgICAgICogVGhlIGJhc2UgaW1wbGVtZW50YXRpb24gb2YgYF8uZmluZEluZGV4YCBhbmQgYF8uZmluZExhc3RJbmRleGAgd2l0aG91dAogICAgICAgKiBzdXBwb3J0IGZvciBpdGVyYXRlZSBzaG9ydGhhbmRzLgogICAgICAgKgogICAgICAgKiBAcHJpdmF0ZQogICAgICAgKiBAcGFyYW0ge0FycmF5fSBhcnJheSBUaGUgYXJyYXkgdG8gaW5zcGVjdC4KICAgICAgICogQHBhcmFtIHtGdW5jdGlvbn0gcHJlZGljYXRlIFRoZSBmdW5jdGlvbiBpbnZva2VkIHBlciBpdGVyYXRpb24uCiAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBmcm9tSW5kZXggVGhlIGluZGV4IHRvIHNlYXJjaCBmcm9tLgogICAgICAgKiBAcGFyYW0ge2Jvb2xlYW59IFtmcm9tUmlnaHRdIFNwZWNpZnkgaXRlcmF0aW5nIGZyb20gcmlnaHQgdG8gbGVmdC4KICAgICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgaW5kZXggb2YgdGhlIG1hdGNoZWQgdmFsdWUsIGVsc2UgYC0xYC4KICAgICAgICovCiAgICAgIGZ1bmN0aW9uIGJhc2VGaW5kSW5kZXgoYXJyYXksIHByZWRpY2F0ZSwgZnJvbUluZGV4LCBmcm9tUmlnaHQpIHsKICAgICAgICB2YXIgbGVuZ3RoID0gYXJyYXkubGVuZ3RoLAogICAgICAgICAgICBpbmRleCA9IGZyb21JbmRleCArIChmcm9tUmlnaHQgPyAxIDogLTEpOwoKICAgICAgICB3aGlsZSAoKGZyb21SaWdodCA/IGluZGV4LS0gOiArK2luZGV4IDwgbGVuZ3RoKSkgewogICAgICAgICAgaWYgKHByZWRpY2F0ZShhcnJheVtpbmRleF0sIGluZGV4LCBhcnJheSkpIHsKICAgICAgICAgICAgcmV0dXJuIGluZGV4OwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gLTE7CiAgICAgIH0KCiAgICAgIC8qKgogICAgICAgKiBUaGUgYmFzZSBpbXBsZW1lbnRhdGlvbiBvZiBgXy5pbmRleE9mYCB3aXRob3V0IGBmcm9tSW5kZXhgIGJvdW5kcyBjaGVja3MuCiAgICAgICAqCiAgICAgICAqIEBwcml2YXRlCiAgICAgICAqIEBwYXJhbSB7QXJyYXl9IGFycmF5IFRoZSBhcnJheSB0byBpbnNwZWN0LgogICAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBzZWFyY2ggZm9yLgogICAgICAgKiBAcGFyYW0ge251bWJlcn0gZnJvbUluZGV4IFRoZSBpbmRleCB0byBzZWFyY2ggZnJvbS4KICAgICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgaW5kZXggb2YgdGhlIG1hdGNoZWQgdmFsdWUsIGVsc2UgYC0xYC4KICAgICAgICovCiAgICAgIGZ1bmN0aW9uIGJhc2VJbmRleE9mKGFycmF5LCB2YWx1ZSwgZnJvb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lbmd0aCA/IChiYXNlU3VtKGFycmF5LCBpdGVyYXRlZSkgLyBsZW5ndGgpIDogTkFOOwogICAgICB9CgogICAgICAvKioKICAgICAgICogVGhlIGJhc2UgaW1wbGVtZW50YXRpb24gb2YgYF8ucHJvcGVydHlgIHdpdGhvdXQgc3VwcG9ydCBmb3IgZGVlcCBwYXRocy4KICAgICAgICoKICAgICAgICogQHByaXZhdGUKICAgICAgICogQHBhcmFtIHtzdHJpbmd9IGtleSBUaGUga2V5IG9mIHRoZSBwcm9wZXJ0eSB0byBnZXQuCiAgICAgICAqIEByZXR1cm5zIHtGdW5jdGlvbn0gUmV0dXJucyB0aGUgbmV3IGFjY2Vzc29yIGZ1bmN0aW9uLgogICAgICAgKi8KICAgICAgZnVuY3Rpb24gYmFzZVByb3BlcnR5KGtleSkgewogICAgICAgIHJldHVybiBmdW5jdGlvbihvYmplY3QpIHsKICAgICAgICAgIHJldHVybiBvYmplY3QgPT0gbnVsbCA/IHVuZGVmaW5lZCQxIDogb2JqZWN0W2tleV07CiAgICAgICAgfTsKICAgICAgfQoKICAgICAgLyoqCiAgICAgICAqIFRoZSBiYXNlIGltcGxlbWVudGF0aW9uIG9mIGBfLnByb3BlcnR5T2ZgIHdpdGhvdXQgc3VwcG9ydCBmb3IgZGVlcCBwYXRocy4KICAgICAgICoKICAgICAgICogQHByaXZhdGUKICAgICAgICogQHBhcmFtIHtPYmplY3R9IG9iamVjdCBUaGUgb2JqZWN0IHRvIHF1ZXJ5LgogICAgICAgKiBAcmV0dXJucyB7RnVuY3Rpb259IFJldHVybnMgdGhlIG5ldyBhY2Nlc3NvciBmdW5jdGlvbi4KICAgICAgICovCiAgICAgIGZ1bmN0aW9uIGJhc2VQcm9wZXJ0eU9mKG9iamVjdCkgewogICAgICAgIHJldHVybiBmdW5jdGlvbihrZXkpIHsKICAgICAgICAgIHJldHVybiBvYmplY3QgPT0gbnVsbCA/IHVuZGVmaW5lZCQxIDogb2JqZWN0W2tleV07CiAgICAgICAgfT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KICAgICAgICogVGhlIGJhc2UgaW1wbGVtZW50YXRpb24gb2YgYF8uc3VtYCBhbmQgYF8uc3VtQnlgIHdpdGhvdXQgc3VwcG9ydCBmb3IKICAgICAgICogaXRlcmF0ZWUgc2hvcnRoYW5kcy4KICAgICAgICoKICAgICAgICogQHByaXZhdGUKICAgICAgICogQHBhcmFtIHtBcnJheX0gYXJyYXkgVGhlIGFycmF5IHRvIGl0ZXJhdGUgb3Zlci4KICAgICAgICogQHBhcmFtIHtGdW5jdGlvbn0gaXRlcmF0ZWUgVGhlIGZ1bmN0aW9uIGludm9rZWQgcGVyIGl0ZXJhdGlvbi4KICAgICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgc3VtLgogICAgICAgKi8KICAgICAgZnVuY3Rpb24gYmFzZVN1bShhcnJheSwgaXRlcmF0ZWUpIHsKICAgICAgICB2YXIgcmVzdWx0LAogICAgICAgICAgICBpbmRleCA9IC0xLAogICAgICAgICAgICBsZW5ndGggPSBhcnJheS5sZW5ndGg7CgogICAgICAgIHdoaWxlICgrK2luZGV4IDwgbGVuZ3RoKSB7CiAgICAgICAgICB2YXIgY3VycmVudCA9IGl0ZXJhdGVlKGFycmF5W2luZGV4XSk7CiAgICAgICAgICBpZiAoY3VycmVudCAhPT0gdW5kZWZpbmVkJDEpIHsKICAgICAgICAgICAgcmVzdWx0ID0gcmVzdWx0ID09PSB1bmRlZmluZWQkMSA/IGN1cnJlbnQgOiAocmVzdWx0ICsgY3VycmVudCk7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgIH0KCiAgICAgIC8qKgogICAgICAgKiBUaGUgYmFzZSBpbXBsZW1lbnRhdGlvbiBvZiBgXy50aW1lc2Agd2l0aG91dCBzdXBwb3J0IGZvciBpdGVyYXRlZSBzaG9ydGhhbmRzCiAgICAgICAqIG9yIG1heCBhcnJheSBsZW5ndGggY2hlY2tzLgogICAgICAgKgogICAgICAgKiBAcHJpd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gdmFsdWVzIGZvci4KICAgICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyB0aGUgYXJyYXkgb2YgcHJvcGVydHkgdmFsdWVzLgogICAgICAgKi8KICAgICAgZnVuY3Rpb24gYmFzZVZhbHVlcyhvYmplY3QsIHByb3BzKSB7CiAgICAgICAgcmV0dXJuIGFycmF5TWFwKHByb3BzLCBmdW5jdGlvbihrZXkpIHsKICAgICAgICAgIHJldHVybiBvYmplY3Rba2V5XTsKICAgICAgICB9KTsKICAgICAgfQoKICAgICAgLyoqCiAgICAgICAqIENoZWNrcyBpZiBhIGBjYWNoZWAgdmFsdWUgZm9yIGBrZXlgIGV4aXN0cy4KICAgICAgICoKICAgICAgICogQHByaXZhdGUKICAgICAgICogQHBhcmFtIHtPYmplY3R9IGNhY2hlIFRoZSBjYWNoZSB0byBxdWVyeS4KICAgICAgICogQHBhcmFtIHtzdHJpbmd9IGtleSBUaGUga2V5IG9mIHRoZSBlbnRyeSB0byBjaGVjay4KICAgICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIGFuIGVudHJ5IGZvciBga2V5YCBleGlzdHMsIGVsc2UgYGZhbHNlYC4KICAgICAgICovCiAgICAgIGZ1bmN0aW9uIGNhY2hlSGFzKGNhY2hlLCBrZXkpIHsKICAgICAgICByZXR1cm4gY2FjaGUuaGFzKGtleSk7CiAgICAgIH0KCiAgICAgIC8qKgogICAgICAgKiBVc2VkIGJ5IGBfLnRyaW1gIGFuZCBgXy50cmltU3RhcnRgIHRvIGdldCB0aGUgaW5kZXggb2YgdGhlIGZpcnN0IHN0cmluZyBzeW1ib2wKICAgICAgICogdGhhdCBpcyBub3QgZm91bmQgaW4gdGhlIGNoYXJhY3RlciBzeW1ib2xzLgogICAgICAgKgogICAgICAgKiBAcHJpdmF0ZQogICAgICAgKiBAcGFyYW0ge0FycmF5fSBzdHJTeW1ib2xzIFRoZSBzdHJpbmcgc3ltYm9scyB0byBpbnNwZWN0LgogICAgICAgKiBAcGFyYW0ge0FycmF5fSBjaHJTeW1ib2xzIFRoZSBjaGFyYWN0ZXIgc3ltYm9scyB0byBmaW5kLgogICAgICAgKiBAcmV0dXJucyB7bnVtYmVyfSBSZXR1cm5zIHRoZSBpbmRleCBvZiB0aGUgZmlyc3QgdW5tYXRjaGVkIHN0cmluZyBzeW1ib2wuCiAgICAgICAqLwogICAgICBmdW5jdGlvbiBjaGFyc1N0YXJ0SW5kZXgoc3RyU3ltYm9scywgY2hyU3ltYm9scykgewogICAgICAgIHZhciBpbmRleCA9IC0xLAogICAgICAgICAgICBsZW5ndGggPSBzdHJTeW1ib2xzLmxlbmd0aDsKCiAgICAgICAgd2hpbGUgKCsraW5kZXggPCBsZW5ndGggJiYgYmFzZUluZGV4T2YoY2hyU3ltYm9scywgc3RyU3ltYm9sc1tpbmRleF0sIDApID4gLTEpIHt9CiAgICAgICAgcmV0dXJuIGluZGV4OwogICAgICB9CgogICAgICAvKioKICAgICAgICogVXNlZCBieSBgXy50cmltYCBhbmQgYF8udHJpbUVuZGAgdG8gZ2V0IHRoZSBpbmRleCBvZiB0aGUgbGFzdCBzdHJpbmcgc3ltYm9sCiAgICAgICAqIHRoYXQgaXMgbm90IGZvdW5kIGluIHRoZSBjaGFyYWN0ZXIgc3ltYm9scy4KICAgICAgICoKICAgICAgICogQHByaXZhdGUKICAgICAgICogQHBhcmFtIHtBcnJheX0gc3RyU3ltYm9scyBUaGUgc3RyaW5nIHN5bWJvbHMgdG8gaW5zcGVjdC4KICAgICAgICogQHBhcmFtIHtBcnJheX0gY2hyU3ltYm9scyBUaGUgY2hhcmFjdGVyIHN5bWJvbHMgdG8gZmluZC4KICAgICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgaW5kZXggb2YgdGhlIGxhc3QgdW5tYXRjaGVkIHN0cmluZyBzeW1ib2wuCiAgICAgICAqLwogICAgICBmdW5jdGlvbiBjaGFyc0VuZEluZGV4KHN0clN5bWJvbHMsIGNoclN5bWJvbHMpIHsKICAgICAgICB2YXIgaW5kZXggPSBzdHJTeW1ib2xzLmxlbmd0aDsKCiAgICAgICAgd2hpbGUgKGluZGV4LS0gJiYgYmFzZUluZGV4T2YoY2hyU3ltYm9scywgc3RyU3ltYm9sc1tpbmRleF0sIDApID4gLTEpIHt9CiAgICAgICAgcmV0dXJuIGluZGV4OwogICAgICB9CgogICAgICAvKioKICAgICAgICogR2V0cyB0aGUgbnVtYmVyIG9mIGBwbGFjZWhvbGRlcmAgb2NjdXJyZW5jZXMgaW4gYGFycmF5YC4KICAgICAgICoKICAgICAgICogQHByaXZhdGUKICAgICAgICogQHBhcmFtIHtBcnJheX0gYXJyYXkgVGhlIGFycmF5IHRvIGluc3BlY3QuCiAgICAgICAqIEBwYXJhbSB7Kn0gcGxhY2Vob2xkZXIgVGhlIHBsYWNlaG9sZGVyIHRvIHNlYXJjaCBmb3IuCiAgICAgICAqIEByZXR1cm5zIHtudW1iZXJ9IFJldHVybnMgdGhlIHBsYWNlaG9sZGVyIGNvdW50LgogICAgICAgKi8KICAgICAgZnVuY3Rpb24gY291bnRIb2xkZXJzKGFycmF5LCBwbGFjZWhvbGRlcikgewogICAgICAgIHZhciBsZW5ndGggPSBhcnJheS5sZW5ndGgsCiAgICAgICAgICAgIHJlc3VsdCA9IDA7CgogICAgICAgIHdoaWxlIChsZW5ndGgtLSkgewogICAgICAgICAgaWYgKGFycmF5W2xlbmd0aF0gPT09IHBsYWNlaG9sZGVyKSB7CiAgICAgICAgICAgICsrcmVzdWx0OwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICB9CgogICAgICAvKioKICAgICAgICogVXNlZCBieSBgXy5kZWJ1cnJgIHRvIGNvbnZlcnQgTGF0aW4tMSBTdXBwbGVtZW50IGFuZCBMYXRpbiBFeHRlbmRlZC1BCiAgICAgICAqIGxldHRlcnMgdG8gYmFzaWMgTGF0aW4gbGV0dGVycy4KICAgICAgICoKICAgICAgICogQHByaX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gogICAgICAvKioKICAgICAgICogR2V0cyB0aGUgdmFsdWUgYXQgYGtleWAgb2YgYG9iamVjdGAuCiAgICAgICAqCiAgICAgICAqIEBwcml2YXRlCiAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBbb2JqZWN0XSBUaGUgb2JqZWN0IHRvIHF1ZXJ5LgogICAgICAgKiBAcGFyYW0ge3N0cmluZ30ga2V5IFRoZSBrZXkgb2YgdGhlIHByb3BlcnR5IHRvIGdldC4KICAgICAgICogQHJldHVybnMgeyp9IFJldHVybnMgdGhlIHByb3BlcnR5IHZhbHVlLgogICAgICAgKi8KICAgICAgZnVuY3Rpb24gZ2V0VmFsdWUob2JqZWN0LCBrZXkpIHsKICAgICAgICByZXR1cm4gb2JqZWN0ID09IG51bGwgPyB1bmRlZmluZWQkMSA6IG9iamVjdFtrZXldOwogICAgICB9CgogICAgICAvKioKICAgICAgICogQ2hlY2tzIGlmIGBzdHJpbmdgIGNvbnRhaW5zIFVuaWNvZGUgc3ltYm9scy4KICAgICAgICoKICAgICAgICogQHByaXZhdGUKICAgICAgICogQHBhcmFtIHtzdHJpbmd9IHN0cmluZyBUaGUgc3RyaW5nIHRvIGluc3BlY3QuCiAgICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiBhIHN5bWJvbCBpcyBmb3VuZCwgZWxzZSBgZmFsc2VgLgogICAgICAgKi8KICAgICAgZnVuY3Rpb24gaGFzVW5pY29kZShzdHJpbmcpIHsKICAgICAgICByZXR1cm4gcmVIYXNVbmljb2RlLnRlc3Qoc3RyaW5nKTsKICAgICAgfQoKICAgICAgLyoqCiAgICAgICAqIENoZWNrcyBpZiBgc3RyaW5nYCBjb250YWlucyBhIHdvcmQgY29tcG9zZWQgb2YgVW5pY29kZSBzeW1ib2xzLgogICAgICAgKgogICAgICAgKiBAcHJpdmF0ZQogICAgICAgKiBAcGFyYW0ge3N0cmluZ30gc3RyaW5nIFRoZSBzdHJpbmcgdG8gaW5zcGVjdC4KICAgICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIGEgd29yZCBpcyBmb3VuZCwgZWxzZSBgZmFsc2VgLgogICAgICAgKi8KICAgICAgZnVuY3Rpb24gaGFzVW5pY29kZVdvcmQoc3RyaW5nKSB7CiAgICAgICAgcmV0dXJuIHJlSGFzVW5pY29kZVdvcmQudGVzdChzdHJpbmcpOwogICAgICB9CgogICAgICAvKioKICAgICAgICogQ29udmVydHMgYGl0ZXJhdG9yYCB0byBhbiBhcnJheS4KICAgICAgICoKICAgICAgICogQHByaXZhdGUKICAgICAgICogQHBhcmFtIHtPYmplY3R9IGl0ZXJhdG9yIFRoZSBpdGVyYXRvciB0byBjb252ZXJ0LgogICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIGNvbnZlcnRlZCBhcnJheS4KICAgICAgICovCiAgICAgIGZ1bmN0aW9uIGl0ZXJhdG9yVG9BcnJheShpdGVyYXRvcikgewogICAgICAgIHZhciBkYXRhLAogICAgICAgICAgICByZXN1bHQgPSBbXTsKCiAgICAgICAgd2hpbGUgKCEoZGF0YSA9IGl0ZXJhdG9yLm5leHQoKSkuZG9uZSkgewogICAgICAgICAgcmVzdWx0LnB1c2goZGF0YS52YWx1ZSk7CiAgICAgICAgfQogICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgIH0KCiAgICAgIC8qKgogICAgICAgKiBDb252ZXJ0cyBgbWFwYCB0byBpdHMga2V5LXZhbHVlIHBhaXJzLgogICAgICAgKgogICAgICAgKiBAcHJpdmF0ZQogICAgICAgKiBAcGFyYW0ge09iamVjdH0gbWFwIFRoZSBtYXAgdG8gY29udmVydC4KICAgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBrZXktdmFsdWUgcGFpcnMuCiAgICAgICAqLwogICAgICBmdW5jdGlvbiBtYXBUb0FycmF5KG1hcCkgewogICAgICAgIHZhciBpbmRleCA9IC0xLAogICAgICAgIC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jZWhvbGRlciBUaGUgcGxhY2Vob2xkZXIgdG8gcmVwbGFjZS4KICAgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBuZXcgYXJyYXkgb2YgcGxhY2Vob2xkZXIgaW5kZXhlcy4KICAgICAgICovCiAgICAgIGZ1bmN0aW9uIHJlcGxhY2VIb2xkZXJzKGFycmF5LCBwbGFjZWhvbGRlcikgewogICAgICAgIHZhciBpbmRleCA9IC0xLAogICAgICAgICAgICBsZW5ndGggPSBhcnJheS5sZW5ndGgsCiAgICAgICAgICAgIHJlc0luZGV4ID0gMCwKICAgICAgICAgICAgcmVzdWx0ID0gW107CgogICAgICAgIHdoaWxlICgrK2luZGV4IDwgbGVuZ3RoKSB7CiAgICAgICAgICB2YXIgdmFsdWUgPSBhcnJheVtpbmRleF07CiAgICAgICAgICBpZiAodmFsdWUgPT09IHBsYWNlaG9sZGVyIHx8IHZhbHVlID09PSBQTEFDRUhPTERFUikgewogICAgICAgICAgICBhcnJheVtpbmRleF0gPSBQTEFDRUhPTERFUjsKICAgICAgICAgICAgcmVzdWx0W3Jlc0luZGV4KytdID0gaW5kZXg7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgIH0KCiAgICAgIC8qKgogICAgICAgKiBDb252ZXJ0cyBgc2V0YCB0byBhbiBhcnJheSBvZiBpdHMgdmFsdWVzLgogICAgICAgKgogICAgICAgKiBAcHJpdmF0ZQogICAgICAgKiBAcGFyYW0ge09iamVjdH0gc2V0IFRoZSBzZXQgdG8gY29udmVydC4KICAgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSB2YWx1ZXMuCiAgICAgICAqLwogICAgICBmdW5jdGlvbiBzZXRUb0FycmF5KHNldCkgewogICAgICAgIHZhciBpbmRleCA9IC0xLAogICAgICAgICAgICByZXN1bHQgPSBBcnJheShzZXQuc2l6ZSk7CgogICAgICAgIHNldC5mb3JFYWNoKGZ1bmN0aW9uKHZhbHVlKSB7CiAgICAgICAgICByZXN1bHRbKytpbmRleF0gPSB2YWx1ZTsKICAgICAgICB9KTsKICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICB9CgogICAgICAvKioKICAgICAgICogQ29udmVydHMgYHNldGAgdG8gaXRzIHZhbHVlLXZhbHVlIHBhaXJzLgogICAgICAgKgogICAgICAgKiBAcHJpdmF0ZQogICAgICAgKiBAcGFyYW0ge09iamVjdH0gc2V0IFRoZSBzZXQgdG8gY29udmVydC4KICAgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSB2YWx1ZS12YWx1ZSBwYWlycy4KICAgICAgICovCiAgICAgIGZ1bmN0aW9uIHNldFRvUGFpcnMoc2V0KSB7CiAgICAgICAgdmFyIGluZGV4ID0gLTEsCiAgICAgICAgICAgIHJlc3VsdCA9IEFycmF5KHNldC5zaXplKTsKCiAgICAgICAgc2V0LmZvckVhY2goZnVuY3Rpb24odmFsdWUpIHsKICAgICAgICAgIHJlc3VsdFsrK2luZGV4XSA9IFt2YWx1ZSwgdmFsdWVdOwogICAgICAgIH0pOwogICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgIH0KCiAgICAgIC8qKgogICAgICAgKiBBIHNwZWNpYWxpemVkIHZlcnNpb24gb2YgYF8uaW5kZXhPZmAgd2hpY2ggcGVyZm9ybXMgc3RyaWN0IGVxdWFsaXR5CiAgICAgICAqIGNvbXBhcmlzb25zIG9mIHZhbHVlcywgaS5lLiBgPT09YC4KICAgICAgICoKICAgICAgICogQHByaXZhdGUKICAgICAgICogQHBhcmFtIHtBcnJheX0gYXJyYXkgVGhlIGFycmF5IHRvIGluc3BlY3QuCiAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIHNlYXJjaCBmb3IuCiAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBmcm9tSW5kZXggVGhlIGluZGV4IHRvIHNlYXJjaCBmcm9tLgogICAgICAgKiBAcmV0dXJucyB7bnVtYmVyfSBSZXR1cm5zIHRoZSBpbmRleCBvZiB0aGUgbWF0Y2hlZCB2YWx1ZSwgZWxzZSBgLTFgLgogICAgICAgKi8KICAgICAgZnVuY3Rpb24gc3RyaWN0SW5kZXhPZihhcnJheSwgdmFsdWUsIGZyb21JbmRleCkgewogICAgICAgIHZhciBpbmRleCA9IGZyb21JbmRleCAtIDEsCiAgICAgICAgICAgIGxlbmd0aCA9IGFycmF5Lmxlbmd0aDsKCiAgICAgICAgd2hpbGUgKCsraW5kZXggPCBsZW5ndGgpIHsKICAgICAgICAgIGlmIChhcnJheVtpbmRleF0gPT09IHZhbHVlKSB7CiAgICAgICAgICAgIHJldHVybiBpbmRleDsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIC0xOwogICAgICB9CgogICAgICAvKioKICAgICAgICogQSBzcGVjaWFsaXplZCB2ZXJzaW9uIG9mIGBfLmxhc3RJbmRleE9mYCB3aGljaCBwZXJmb3JtcyBzdHJpY3QgZXF1YWxpdHkKICAgICAgICogY29tcGFyaXNvbnMgb2YgdmFsdWVzLCBpLmUuIGA9PT1gLgogICAgICAgKgogICAgICAgKiBAcHJpdmF0ZQogICAgICAgKiBAcGFyYW0ge0FycmF5fSBhcnJheSBUaGUgYXJyYXkgdG8gaW5zcGVjdC4KICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gc2VhcmNoIGZvci4KICAgICAgICogQHBhcmFtIHtudW1iZXJ9IGZyb21JbmRleCBUaGUgaW5kZXggdG8gc2VhcmNoIGZyb20uCiAgICAgICAqIEByZXR1cm5zIHtudW1iZXJ9IFJldHVybnMgdGhlIGluZGV4IG9mIHRoZSBtYXRjaGVkIHZhbHVlLCBlbHNlIGAtMWAuCiAgICAgICAqLwogICAgICBmdW5jdGlvbiBzdHJpY3RMYXN0SW5kZXhPZihhcnJheSwgdmFsdWUsIGZyb21JbmRleCkgewogICAgICAgIHZhciBpbmRleCA9IGZyb21JbmRleCArIDE7CiAgICAgICAgd2hpbGUgKGluZGV4LS0pIHsKICAgICAgICAgIGlmIChhcnJheVtpbmRleF0gPT09IHZhbHVlKSB7CiAgICAgICAgICAgIHJldHVybiBpbmRleDsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIGluZGV4OwogICAgICB9CgogICAgICAvKioKICAgICAgICogR2V0cyB0aGUgbnVtYmVyIG9mIHN5bWJvbHMgaW4gYHN0cmluZ2AuCiAgICAgICAqCiAgICAgICAqIEBwcml2YXRlCiAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBzdHJpbmcgVGhlIHN0cmluZyB0byBpbnNwZWN0LgogICAgICAgKiBAcmV0dXJucyB7bnVtYmVyfSBSZXR1cm5zIHRoZSBzdHJpbmcgc2l6ZS4KICAgICAgICovCiAgICAgIGZ1bmN0aW9uIHN0cmluZ1NpemUoc3RyaW5nKSB7CiAgICAgICAgcmV0dXJuIGhhc1VuaWNvZGUoc3RyaW5nKQogICAgICAgICAgPyB1bmljb2RlU2l6ZShzdHJpbmcpCiAgICAgICAgICA6IGFzY2lpU2l6ZShzdHJpbmcpOwogICAgICB9CgogICAgICAvKioKICAgICAgICogQ29udmVydHMgYHN0cmluZ2AgdG8gYW4gYXJyYXkuCiAgICAgICAqCiAgICAgICAqIEBwcml2YXRlCiAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBzdHJpbmcgVGhlIHN0cmluZyB0byBjb252ZXJ0LgogICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIGNvbnZlcnRlZCBhcnJheS4KICAgICAgICovCiAgICAgIGZ1bmN0aW9uIHN0cmluZ1RvQXJyYXkoc3RyaW5nKSB7CiAgICAgICAgcmV0dXJuIGhhc1VuaWNvZGUoc3RyaW5nKQogICAgICAgICAgPyB1bmljb2RlVG9BcnJheShzdHJpbmcpCiAgICAgICAgICA6IGFzY2lpVG9BcnJheShzdHJpbmcpOwogICAgICB9CgogICAgICAvKioKICAgICAgICogVXNlZCBieSBgXy51bmVzY2FwZWAgdG8gY29udmVydCBIVE1MIGVudGl0aWVzIHRvIGNoYXJhY3RlcnMuCiAgICAgICAqCiAgICAgICAqIEBwcml2YXRlCiAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBjaHIgVGhlIG1hdGNoZWQgY2hhcmFjdGVyIHRvIHVuZXNjYXBlLgogICAgICAgKiBAcmV0dXJucyB7c3RyaW5nfSBSZXR1cm5zIHRoZSB1bmVzY2FwZWQgY2hhcmFjdGVyLgogICAgICAgKi8KICAgICAgdmFyIHVuZXNjYXBlSHRtbENoYXIgPSBiYXNlUHJvcGVydHlPZihodG1sVW5lc2NhcGVzKTsKCiAgICAgIC8qKgogICAgICAgKiBHZXRzIHRoZSBzaXplIG9mIGEgVW5pY29kZSBgc3RyaW5nYC4KICAgICAgICoKICAgICAgICogQHByaXZhdGUKICAgICAgICogQHBhcmFtIHtzdHJpbmd9IHN0cmluZyBUaGUgc3RyaW5nIGluc3BlY3QuCiAgICAgICAqIEByZXR1cm5zIHtudW1iZXJ9IFJldHVybnMgdGhlIHN0cmluZyBzaXplLgogICAgICAgKi8KICAgICAgZnVuY3Rpb24gdW5pY29kZVNpemUoc3RyaW5nKSB7CiAgICAgICAgdmFyIHJlc3VsdCA9IHJlVW5pY29kZS5sYXN0SW5kZXggPSAwOwogICAgICAgIHdoaWxlIChyZVVuaWNvZGUudGVzdChzdHJpbmcpKSB7CiAgICAgICAgICArK3Jlc3VsdDsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIHJlc3VsdDsKICAgICAgfQoKICAgICAgLyoqCiAgICAgICAqIENvbnZlcnRzIGEgVW5pY29kZSBgc3RyaW5nYCB0byBhbiBhcnJheS4KICAgICAgICoKICAgICAgICogQHByaXZhdGUKICAgICAgICogQHBhcmFtIHtzdHJpbmd9IHN0cmluZyBUaGUgc3RyaW5nIHRvIGNvbnZlcnQuCiAgICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dX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1wbGUKICAgICAgICoKICAgICAgICogXy5taXhpbih7ICdmb28nOiBfLmNvbnN0YW50KCdmb28nKSB9KTsKICAgICAgICoKICAgICAgICogdmFyIGxvZGFzaCA9IF8ucnVuSW5Db250ZXh0KCk7CiAgICAgICAqIGxvZGFzaC5taXhpbih7ICdiYXInOiBsb2Rhc2guY29uc3RhbnQoJ2JhcicpIH0pOwogICAgICAgKgogICAgICAgKiBfLmlzRnVuY3Rpb24oXy5mb28pOwogICAgICAgKiAvLyA9PiB0cnVlCiAgICAgICAqIF8uaXNGdW5jdGlvbihfLmJhcik7CiAgICAgICAqIC8vID0+IGZhbHNlCiAgICAgICAqCiAgICAgICAqIGxvZGFzaC5pc0Z1bmN0aW9uKGxvZGFzaC5mb28pOwogICAgICAgKiAvLyA9PiBmYWxzZQogICAgICAgKiBsb2Rhc2guaXNGdW5jdGlvbihsb2Rhc2guYmFyKTsKICAgICAgICogLy8gPT4gdHJ1ZQogICAgICAgKgogICAgICAgKiAvLyBDcmVhdGUgYSBzdXBlZC11cCBgZGVmZXJgIGluIE5vZGUuanMuCiAgICAgICAqIHZhciBkZWZlciA9IF8ucnVuSW5Db250ZXh0KHsgJ3NldFRpbWVvdXQnOiBzZXRJbW1lZGlhdGUgfSkuZGVmZXI7CiAgICAgICAqLwogICAgICB2YXIgcnVuSW5Db250ZXh0ID0gKGZ1bmN0aW9uIHJ1bkluQ29udGV4dChjb250ZXh0KSB7CiAgICAgICAgY29udGV4dCA9IGNvbnRleHQgPT0gbnVsbCA/IHJvb3QgOiBfLmRlZmF1bHRzKHJvb3QuT2JqZWN0KCksIGNvbnRleHQsIF8ucGljayhyb290LCBjb250ZXh0UHJvcHMpKTsKCiAgICAgICAgLyoqIEJ1aWx0LWluIGNvbnN0cnVjdG9yIHJlZmVyZW5jZXMuICovCiAgICAgICAgdmFyIEFycmF5ID0gY29udGV4dC5BcnJheSwKICAgICAgICAgICAgRGF0ZSA9IGNvbnRleHQuRGF0ZSwKICAgICAgICAgICAgR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XIgPSAwOwoKICAgICAgICAvKiogVXNlZCB0byBkZXRlY3QgbWV0aG9kcyBtYXNxdWVyYWRpbmcgYXMgbmF0aXZlLiAqLwogICAgICAgIHZhciBtYXNrU3JjS2V5ID0gKGZ1bmN0aW9uKCkgewogICAgICAgICAgdmFyIHVpZCA9IC9bXi5dKyQvLmV4ZWMoY29yZUpzRGF0YSAmJiBjb3JlSnNEYXRhLmtleXMgJiYgY29yZUpzRGF0YS5rZXlzLklFX1BST1RPIHx8ICcnKTsKICAgICAgICAgIHJldHVybiB1aWQgPyAoJ1N5bWJvbChzcmMpXzEuJyArIHVpZCkgOiAnJzsKICAgICAgICB9KCkpOwoKICAgICAgICAvKioKICAgICAgICAgKiBVc2VkIHRvIHJlc29sdmUgdGhlCiAgICAgICAgICogW2B0b1N0cmluZ1RhZ2BdKGh0dHA6Ly9lY21hLWludGVybmF0aW9uYWwub3JnL2VjbWEtMjYyLzcuMC8jc2VjLW9iamVjdC5wcm90b3R5cGUudG9zdHJpbmcpCiAgICAgICAgICogb2YgdmFsdWVzLgogICAgICAgICAqLwogICAgICAgIHZhciBuYXRpdmVPYmplY3RUb1N0cmluZyA9IG9iamVjdFByb3RvLnRvU3RyaW5nOwoKICAgICAgICAvKiogVXNlZCB0byBpbmZlciB0aGUgYE9iamVjdGAgY29uc3RydWN0b3IuICovCiAgICAgICAgdmFyIG9iamVjdEN0b3JTdHJpbmcgPSBmdW5jVG9TdHJpbmcuY2FsbChPYmplY3QpOwoKICAgICAgICAvKiogVXNlZCB0byByZXN0b3JlIHRoZSBvcmlnaW5hbCBgX2AgcmVmZXJlbmNlIGluIGBfLm5vQ29uZmxpY3RgLiAqLwogICAgICAgIHZhciBvbGREYXNoID0gcm9vdC5fOwoKICAgICAgICAvKiogVXNlZCB0byBkZXRlY3QgaWYgYSBtZXRob2QgaXMgbmF0aXZlLiAqLwogICAgICAgIHZhciByZUlzTmF0aXZlID0gUmVnRXhwKCdeJyArCiAgICAgICAgICBmdW5jVG9TdH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AgICAgKgogICAgICAgICAqIHZhciB3cmFwcGVkID0gXyhbMSwgMiwgM10pOwogICAgICAgICAqCiAgICAgICAgICogLy8gUmV0dXJucyBhbiB1bndyYXBwZWQgdmFsdWUuCiAgICAgICAgICogd3JhcHBlZC5yZWR1Y2UoXy5hZGQpOwogICAgICAgICAqIC8vID0+IDYKICAgICAgICAgKgogICAgICAgICAqIC8vIFJldHVybnMgYSB3cmFwcGVkIHZhbHVlLgogICAgICAgICAqIHZhciBzcXVhcmVzID0gd3JhcHBlZC5tYXAoc3F1YXJlKTsKICAgICAgICAgKgogICAgICAgICAqIF8uaXNBcnJheShzcXVhcmVzKTsKICAgICAgICAgKiAvLyA9PiBmYWxzZQogICAgICAgICAqCiAgICAgICAgICogXy5pc0FycmF5KHNxdWFyZXMudmFsdWUoKSk7CiAgICAgICAgICogLy8gPT4gdHJ1ZQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGxvZGFzaCh2YWx1ZSkgewogICAgICAgICAgaWYgKGlzT2JqZWN0TGlrZSh2YWx1ZSkgJiYgIWlzQXJyYXkodmFsdWUpICYmICEodmFsdWUgaW5zdGFuY2VvZiBMYXp5V3JhcHBlcikpIHsKICAgICAgICAgICAgaWYgKHZhbHVlIGluc3RhbmNlb2YgTG9kYXNoV3JhcHBlcikgewogICAgICAgICAgICAgIHJldHVybiB2YWx1ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoaGFzT3duUHJvcGVydHkuY2FsbCh2YWx1ZSwgJ19fd3JhcHBlZF9fJykpIHsKICAgICAgICAgICAgICByZXR1cm4gd3JhcHBlckNsb25lKHZhbHVlKTsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIG5ldyBMb2Rhc2hXcmFwcGVyKHZhbHVlKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBiYXNlIGltcGxlbWVudGF0aW9uIG9mIGBfLmNyZWF0ZWAgd2l0aG91dCBzdXBwb3J0IGZvciBhc3NpZ25pbmcKICAgICAgICAgKiBwcm9wZXJ0aWVzIHRvIHRoZSBjcmVhdGVkIG9iamVjdC4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IHByb3RvIFRoZSBvYmplY3QgdG8gaW5oZXJpdCBmcm9tLgogICAgICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgdGhlIG5ldyBvYmplY3QuCiAgICAgICAgICovCiAgICAgICAgdmFyIGJhc2VDcmVhdGUgPSAoZnVuY3Rpb24oKSB7CiAgICAgICAgICBmdW5jdGlvbiBvYmplY3QoKSB7fQogICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uKHByb3RvKSB7CiAgICAgICAgICAgIGlmICghaXNPYmplY3QocHJvdG8pKSB7CiAgICAgICAgICAgICAgcmV0dXJuIHt9OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChvYmplY3RDcmVhdGUpIHsKICAgICAgICAgICAgICByZXR1cm4gb2JqZWN0Q3JlYXRlKHByb3RvKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBvYmplY3QucHJvdG90eXBlID0gcHJvdG87CiAgICAgICAgICAgIHZhciByZXN1bHQgPSBuZXcgb2JqZWN0OwogICAgICAgICAgICBvYmplY3QucHJvdG90eXBlID0gdW5kZWZpbmVkJDE7CiAgICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgICB9OwogICAgICAgIH0oKSk7CgogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBmdW5jdGlvbiB3aG9zZSBwcm90b3R5cGUgY2hhaW4gc2VxdWVuY2Ugd3JhcHBlcnMgaW5oZXJpdCBmcm9tLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBiYXNlTG9kYXNoKCkgewogICAgICAgICAgLy8gTm8gb3BlcmF0aW9uIHBlcmZvcm1lZC4KICAgICAgIC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gudGVtcGxhdGVTZXR0aW5ncyA9IHsKCiAgICAgICAgICAvKioKICAgICAgICAgICAqIFVzZWQgdG8gZGV0ZWN0IGBkYXRhYCBwcm9wZXJ0eSB2YWx1ZXMgdG8gYmUgSFRNTC1lc2NhcGVkLgogICAgICAgICAgICoKICAgICAgICAgICAqIEBtZW1iZXJPZiBfLnRlbXBsYXRlU2V0dGluZ3MKICAgICAgICAgICAqIEB0eXBlIHtSZWdFeHB9CiAgICAgICAgICAgKi8KICAgICAgICAgICdlc2NhcGUnOiByZUVzY2FwZSwKCiAgICAgICAgICAvKioKICAgICAgICAgICAqIFVzZWQgdG8gZGV0ZWN0IGNvZGUgdG8gYmUgZXZhbHVhdGVkLgogICAgICAgICAgICoKICAgICAgICAgICAqIEBtZW1iZXJPZiBfLnRlbXBsYXRlU2V0dGluZ3MKICAgICAgICAgICAqIEB0eXBlIHtSZWdFeHB9CiAgICAgICAgICAgKi8KICAgICAgICAgICdldmFsdWF0ZSc6IHJlRXZhbHVhdGUsCgogICAgICAgICAgLyoqCiAgICAgICAgICAgKiBVc2VkIHRvIGRldGVjdCBgZGF0YWAgcHJvcGVydHkgdmFsdWVzIHRvIGluamVjdC4KICAgICAgICAgICAqCiAgICAgICAgICAgKiBAbWVtYmVyT2YgXy50ZW1wbGF0ZVNldHRpbmdzCiAgICAgICAgICAgKiBAdHlwZSB7UmVnRXhwfQogICAgICAgICAgICovCiAgICAgICAgICAnaW50ZXJwb2xhdGUnOiByZUludGVycG9sYXRlLAoKICAgICAgICAgIC8qKgogICAgICAgICAgICogVXNlZCB0byByZWZlcmVuY2UgdGhlIGRhdGEgb2JqZWN0IGluIHRoZSB0ZW1wbGF0ZSB0ZXh0LgogICAgICAgICAgICoKICAgICAgICAgICAqIEBtZW1iZXJPZiBfLnRlbXBsYXRlU2V0dGluZ3MKICAgICAgICAgICAqIEB0eXBlIHtzdHJpbmd9CiAgICAgICAgICAgKi8KICAgICAgICAgICd2YXJpYWJsZSc6ICcnLAoKICAgICAgICAgIC8qKgogICAgICAgICAgICogVXNlZCB0byBpbXBvcnQgdmFyaWFibGVzIGludG8gdGhlIGNvbXBpbGVkIHRlbXBsYXRlLgogICAgICAgICAgICoKICAgICAgICAgICAqIEBtZW1iZXJPZiBfLnRlbXBsYXRlU2V0dGluZ3MKICAgICAgICAgICAqIEB0eXBlIHtPYmplY3R9CiAgICAgICAgICAgKi8KICAgICAgICAgICdpbXBvcnRzJzogewoKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEEgcmVmZXJlbmNlIHRvIHRoZSBgbG9kYXNoYCBmdW5jdGlvbi4KICAgICAgICAgICAgICoKICAgICAgICAgICAgICogQG1lbWJlck9mIF8udGVtcGxhdGVTZXR0aW5ncy5pbXBvcnRzCiAgICAgICAgICAgICAqIEB0eXBlIHtGdW5jdGlvbn0KICAgICAgICAgICAgICovCiAgICAgICAgICAgICdfJzogbG9kYXNoCiAgICAgICAgICB9CiAgICAgICAgfTsKCiAgICAgICAgLy8gRW5zdXJlIHdyYXBwZXJzIGFyZSBpbnN0YW5jZXMgb2YgYGJhc2VMb2Rhc2hgLgogICAgICAgIGxvZGFzaC5wcm90b3R5cGUgPSBiYXNlTG9kYXNoLnByb3RvdHlwZTsKICAgICAgICBsb2Rhc2gucHJvdG90eXBlLmNvbnN0cnVjdG9yID0gbG9kYXNoOwoKICAgICAgICBMb2Rhc2hXcmFwcGVyLnByb3RvdHlwZSA9IGJhc2VDcmVhdGUoYmFzZUxvZGFzaC5wcm90b3R5cGUpOwogICAgICAgIExvZGFzaFdyYXBwZXIucHJvdG90eXBlLmNvbnN0cnVjdG9yID0gTG9kYXNoV3JhcHBlcjsKCiAgICAgICAgLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLwoKICAgICAgICAvKioKICAgICAgICAgKiBDcmVhdGVzIGEgbGF6eSB3cmFwcGVyIG9iamVjdCB3aGljaCB3cmFwcyBgdmFsdWVgIHRvIGVuYWJsZSBsYXp5IGV2YWx1YXRpb24uCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBjb25zdHJ1Y3RvcgogICAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIHdyYXAuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gTGF6eVdyYXBwZXIodmFsdWUpIHsKICAgICAgICAgIHRoaXMuX193cmFwcGVkX18gPSB2YWx1ZTsKICAgICAgICAgIHRoaXMuX19hY3Rpb25zX18gPSBbXTsKICAgICAgICAgIHRoaXMuX19kaXJfXyA9IDE7CiAgICAgICAgICB0aGlzLl9fZmlsdGVyZWRfXyA9IGZhbHNlOwogICAgICAgICAgdGhpcy5fX2l0ZXJhdGVlc19fID0gW107CiAgICAgICAgICB0aGlzLl9fdGFrZUNvdW50X18gPSBNQVhfQVJSQVlfTEVOR1RIOwogICAgICAgICAgdGhpcy5fX3ZpZXdzX18gPSBbXTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYSBjbG9uZSBvZiB0aGUgbGF6eSB3cmFwcGVyIG9iamVjdC4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQG5hbWUgY2xvbmUKICAgICAgICAgKiBAbWVtYmVyT2YgTGF6eVdyYXBwZXIKICAgICAgICAgKiBAcmV0dXJucyB7T2JqZWN0fSBSZXR1cm5zIHRoZSBjbG9uZWQgYExhenlXcmFwcGVyYCBvYmplY3QuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gbGF6eUNsb25lKCkgewogICAgICAgICAgdmFyIHJlc3VsdCA9IG5ldyBMYXp5V3JhcHBlcih0aGlzLl9fd3JhcHBlZF9fKTsKICAgICAgICAgIHJlc3VsdC5fX2FjdGlvbnNfXyA9IGNvcHlBcnJheSh0aGlzLl9fYWN0aW9uc19fKTsKICAgICAgICAgIHJlc3VsdC5fX2Rpcl9fID0gdGhpcy5fX2Rpcl9fOwogICAgICAgICAgcmVzdWx0Ll9fZmlsdGVyZWRfXyA9IHRoaXMuX19maWx0ZXJlZF9fOwogICAgICAgICAgcmVzdWx0Ll9faXRlcmF0ZWVzX18gPSBjb3B5QXJyYXkodGhpcy5fX2l0ZXJhdGVlc19fKTsKICAgICAgICAgIHJlc3VsdC5fX3Rha2VDb3VudF9fID0gdGhpcy5fX3Rha2VDb3VudF9fOwogICAgICAgICAgcmVzdWx0Ll9fdmlld3NfXyA9IGNvcHlBcnJheSh0aGlzLl9fdmlld3NfXyk7CiAgICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogUmV2ZXJzZXMgdGhlIGRpcmVjdGlvbiBvZiBsYXp5IGl0ZXJhdGlvbi4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQG5hbWUgcmV2ZXJzZQogICAgICAgICAqIEBtZW1iZXJPZiBMYXp5V3JhcHBlcgogICAgICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgdGhlIG5ldyByZXZlcnNlZCBgTGF6eVdyYXBwZXJgIG9iamVjdC4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBsYXp5UmV2ZXJzZSgpIHsKICAgICAgICAgIGlmICh0aGlzLl9fZmlsdGVyZWRfXykgewogICAgICAgICAgICB2YXIgcmVzdWx0ID0gbmV3IExhenlXcmFwcGVyKHRoaXMpOwogICAgICAgICAgICByZXN1bHQuX19kaXJfXyA9IC0xOwogICAgICAgICAgICByZXN1bHQuX19maWx0ZXJlZF9fID0gdHJ1ZTsKICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIHJlc3VsdCA9IHRoaXMuY2xvbmUoKTsKICAgICAgICAgICAgcmVzdWx0Ll9fZGlyX18gKj0gLTE7CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogRXh0cmFjdHMgdGhlIHVud3JhcHBlZCB2YWx1ZSBmcm9tIGl0cyBsYXp5IHdyYXBwZXIuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBuYW1lIHZhbHVlCiAgICAgICAgICogQG1lbWJlck9mIExhenlXcmFwcGVyCiAgICAgICAgICogQHJldHVybnMgeyp9IFJldHVybnMgdGhlIHVud3JhcHBlZCB2YWx1ZS4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBsYXp5VmFsdWUoKSB7CiAgICAgICAgICB2YXIgYXJyYXkgPSB0aGlzLl9fd3JhcHBlZF9fLnZhbHVlKCksCiAgICAgICAgICAgICAgZGlyID0gdGhpcy5fX2Rpcl9fLAogICAgICAgICAgICAgIGlzQXJyID0gaXNBcnJheShhcnJheSksCiAgICAgICAgICAgICAgaXNSaWdodCA9IGRpciA8IDAsCiAgICAgICAgICAgICAgYXJyTGVuZ3RoID0gaXNBcnIgPyBhcnJheS5sZW5ndGggOiAwLAogICAgICAgICAgICAgIHZpZXcgPSBnZXRWaWV3KDAsIGFyckxlbmd0aCwgdGhpcy5fX3ZpZXdzX18pLAogICAgICAgICAgICAgIHN0YXJ0ID0gdmlldy5zdGFydCwKICAgICAgICAgICAgICBlbmQgPSB2aWV3LmVuZCwKICAgICAgICAgICAgICBsZW5ndGggPSBlbmQgLSBzdGFydCwKICAgICAgICAgICAgICBpbmRleCA9IGlzUmlnaHQgPyBlbmQgOiAoc3RhcnQgLSAxKSwKICAgICAgICAgICAgICBpdGVyYXRlZXMgPSB0aGlzLl9faXRlcmF0ZWVzX18sCiAgICAgICAgICAgICAgaXRlckxlbmd0aCA9IGl0ZXJhdGVlcy5sZW5ndGgsCiAgICAgICAgICAgICAgcmVzSW5kZXggPSAwLAogICAgICAgICAgICAgIHRha2VDb3VudCA9IG5hdGl2ZU1pbihsZW5ndGgsIHRoaXMuX190YWtlQ291bnRfXyk7CgogICAgICAgICAgaWYgKCFpc0FyciB8fCAoIWlzUmlnaHQgJiYgYXJyTGVuZ3RoID09IGxlbmd0aCAmJiB0YWtlQ291bnQgPT0gbGVuZ3RoKSkgewogICAgICAgICAgICByZXR1cm4gYmFzZVdyYXBwZXJWYWx1ZShhcnJheSwgdGhpcy5fX2FjdGlvbnNfXyk7CiAgICAgICAgICB9CiAgICAgICAgICB2YXIgcmVzdWx0ID0gW107CgogICAgICAgICAgb3V0ZXI6CiAgICAgICAgICB3aGlsZSAobGVuZ3RoLS0gJiYgcmVzSW5kZXggPCB0YWtlQ291bnQpIHsKICAgICAgICAgICAgaW5kZXggKz0gZGlyOwoKICAgICAgICAgICAgdmFyIGl0ZXJJbmRleCA9IC0xLAogICAgICAgICAgICAgICAgdmFsdWUgPSBhcnJheVtpbmRleF07CgogICAgICAgICAgICB3aGlsZSAoKytpdGVySW5kZXggPCBpdGVyTGVuZ3RoKSB7CiAgICAgICAgICAgICAgdmFyIGRhdGEgPSBpdGVyYXRlZXNbaXRlckluZGV4XSwKICAgICAgICAgICAgICAgICAgaXRlcmF0ZWUgPSBkYXRhLml0ZXJhdGVlLAogICAgICAgICAgICAgICAgICB0eXBlID0gZGF0YS50eXBlLAogICAgICAgICAgICAgICAgICBjb21wdXRlZCA9IGl0ZXJhdGVlKHZhbHVlKTsKCiAgICAgICAgICAgICAgaWYgKHR5cGUgPT0gTEFaWV9NQVBfRkxBRykgewogICAgICAgICAgICAgICAgdmFsdWUgPSBjb21wdXRlZDsKICAgICAgICAgICAgICB9IGVsc2UgaWYgKCFjb21wdXRlZCkgewogICAgICAgICAgICAgICAgaWYgKHR5cGUgPT0gTEFaWV9GSUxURVJfRkxBRykgewogICAgICAgICAgICAgICAgICBjb250aW51ZSBvdXRlcjsKICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgIGJyZWFrIG91dGVyOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXN1bHRbcmVzSW5kZXgrK10gPSB2YWx1ZTsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgfQoKICAgICAgICAvLyBFbnN1cmUgYExhenlXcmFwcGVyYCBpcyBhbiBpbnN0YW5jZSBvZiBgYmFzZUxvZGFzaGAuCiAgICAgICAgTGF6eVdyYXBwZXIucHJvdG90eXBlID0gYmFzZUNyZWF0ZShiYXNlTG9kYXNoLnByb3RvdHlwZSk7CiAgICAgICAgTGF6eVdyYXBwZXIucHJvdG90eXBlLmNvbnN0cnVjdG9yID0gTGF6eVdyYXBwZXI7CgogICAgICAgIC8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KCiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhIGhhc2ggb2JqZWN0LgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAY29uc3RydWN0b3IKICAgICAgICAgKiBAcGFyYW0ge0FycmF5fSBbZW50cmllc10gVGhlIGtleS12YWx1ZSBwYWlycyB0byBjYWNoZS4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBIYXNoKGVudHJpZXMpIHsKICAgICAgICAgIHZhciBpbmRleCA9IC0xLAogICAgICAgICAgICAgIGxlbmd0aCA9IGVudHJpZXMgPT0gbnVsbCA/IDAgOiBlbnRyaWVzLmxlbmd0aDsKCiAgICAgICAgICB0aGlzLmNsZWFyKCk7CiAgICAgICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkgewogICAgICAgICAgICB2YXIgZW50cnkgPSBlbnRyaWVzW2luZGV4XTsKICAgICAgICAgICAgdGhpcy5zZXQoZW50cnlbMF0sIGVudHJ5WzFdKTsKICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFJlbW92ZXMgYWxsIGtleS12YWx1ZSBlbnRyaWVzIGZyb20gdGhlIGhhc2guCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBuYW1lIGNsZWFyCiAgICAgICAgICogQG1lbWJlck9mIEhhc2gKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBoYXNoQ2xlYXIoKSB7CiAgICAgICAgICB0aGlzLl9fZGF0YV9fID0gbmF0aXZlQ3JlYXRlID8gbmF0aXZlQ3JlYXRlKG51bGwpIDoge307CiAgICAgICAgICB0aGlzLnNpemUgPSAwOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogUmVtb3ZlcyBga2V5YCBhbmQgaXRzIHZhbHVlIGZyb20gdGhlIGhhc2guCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBuYW1lIGRlbGV0ZQogICAgICAgICAqIEBtZW1iZXJPZiBIYXNoCiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IGhhc2ggVGhlIGhhc2ggdG8gbW9kaWZ5LgogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBrZXkgVGhlIGtleSBvZiB0aGUgdmFsdWUgdG8gcmVtb3ZlLgogICAgICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiB0aGUgZW50cnkgd2FzIHJlbW92ZWQsIGVsc2UgYGZhbHNlYC4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBoYXNoRGVsZXRlKGtleSkgewogICAgICAgICAgdmFyIHJlc3VsdCA9IHRoaXMuaGFzKGtleSkgJiYgZGVsZXRlIHRoaXMuX19kYXRhX19ba2V5XTsKICAgICAgICAgIHRoaXMuc2l6ZSAtPSByZXN1bHQgPyAxIDogMDsKICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIHRoZSBoYXNoIHZhbHVlIGZvciBga2V5YC4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQG5hbWUgZ2V0CiAgICAgICAgICogQG1lbWJlck9mIEhhc2gKICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30ga2V5IFRoZSBrZXkgb2YgdGhlIHZhbHVlIHRvIGdldC4KICAgICAgICAgKiBAcmV0dXJucyB7Kn0gUmV0dXJucyB0aGUgZW50cnkgdmFsdWUuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gaGFzaEdldChrZXkpIHsKICAgICAgICAgIHZhciBkYXRhID0gdGhpcy5fX2RhdGFfXzsKICAgICAgICAgIGlmIChuYXRpdmVDcmVhdGUpIHsKICAgICAgICAgICAgdmFyIHJlc3VsdCA9IGRhdGFba2V5XTsKICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCA9PT0gSEFTSF9VTkRFRklORUQgPyB1bmRlZmluZWQkMSA6IHJlc3VsdDsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiBoYXNPd25Qcm9wZXJ0eS5jYWxsKGRhdGEsIGtleSkgPyBkYXRhW2tleV0gOiB1bmRlZmluZWQkMTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENoZWNrcyBpZiBhIGhhc2ggdmFsdWUgZm9yIGBrZXlgIGV4aXN0cy4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQG5hbWUgaGFzCiAgICAgICAgICogQG1lbWJlck9mIEhhc2gKICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30ga2V5IFRoZSBrZXkgb2YgdGhlIGVudHJ5IHRvIGNoZWNrLgogICAgICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiBhbiBlbnRyeSBmb3IgYGtleWAgZXhpc3RzLCBlbHNlIGBmYWxzZWAuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gaGFzaEhhcyhrZXkpIHsKICAgICAgICAgIHZhciBkYXRhID0gdGhpcy5fX2RhdGFfXzsKICAgICAgICAgIHJldHVybiBuYXRpdmVDcmVhdGUgPyAoZGF0YVtrZXldICE9PSB1bmRlZmluZWQkMSkgOiBoYXNPd25Qcm9wZXJ0eS5jYWxsKGRhdGEsIGtleSk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIHRoZSBoYXNoIGBrZXlgIHRvIGB2YWx1ZWAuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBuYW1lIHNldAogICAgICAgICAqIEBtZW1iZXJPZiBIYXNoCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IGtleSBUaGUga2V5IG9mIHRoZSB2YWx1ZSB0byBzZXQuCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gc2V0LgogICAgICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgdGhlIGhhc2ggaW5zdGFuY2UuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gaGFzaFNldChrZXksIHZhbHVlKSB7CiAgICAgICAgICB2YXIgZGF0YSA9IHRoaXMuX19kYXRhX187CiAgICAgICAgICB0aGlzLnNpemUgKz0gdGhpcy5oYXMoa2V5KSA/IDAgOiAxOwogICAgICAgICAgZGF0YVtrZXldID0gKG5hdGl2ZUNyZWF0ZSAmJiB2YWx1ZSA9PT0gdW5kZWZpbmVkJDEpID8gSEFTSF9VTkRFRklORUQgOiB2YWx1ZTsKICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH0KCiAgICAgICAgLy8gQWRkIG1ldGhvZHMgdG8gYEhhc2hgLgogICAgICAgIEhhc2gucHJvdG90eXBlLmNsZWFyID0gaGFzaENsZWFyOwogICAgICAgIEhhc2gucHJvdG90eXBlWydkZWxldGUnXSA9IGhhc2hEZWxldGU7CiAgICAgICAgSGFzaC5wcm90b3R5cGUuZ2V0ID0gaGFzaEdldDsKICAgICAgICBIYXNoLnByb3RvdHlwZS5oYXMgPSBoYXNoSGFzOwogICAgICAgIEhhc2gucHJvdG90eXBlLnNldCA9IGhhc2hTZXQ7CgogICAgICAgIC8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KCiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhbiBsaXN0IGNhY2hlIG9iamVjdC4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQGNvbnN0cnVjdG9yCiAgICAgICAgICogQHBhcmFtIHtBcnJheX0gW2VudHJpZXNdIFRoZSBrZXktdmFsdWUgcGFpcnMgdG8gY2FjaGUuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gTGlzdENhY2hlKGVudHJpZXMpIHsKICAgICAgICAgIHZhciBpbmRleCA9IC0xLAogICAgICAgICAgICAgIGxlbmd0aCA9IGVudHJpZXMgPT0gbnVsbCA/IDAgOiBlbnRyaWVzLmxlbmd0aDsKCiAgICAgICAgICB0aGlzLmNsZWFyKCk7CiAgICAgICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkgewogICAgICAgICAgICB2YXIgZW50cnkgPSBlbnRyaWVzW2luZGV4XTsKICAgICAgICAgICAgdGhpcy5zZXQoZW50cnlbMF0sIGVudHJ5WzFdKTsKICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFJlbW92ZXMgYWxsIGtleS12YWx1ZSBlbnRyaWVzIGZyb20gdGhlIGxpc3QgY2FjaGUuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBuYW1lIGNsZWFyCiAgICAgICAgICogQG1lbWJlck9mIExpc3RDYWNoZQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGxpc3RDYWNoZUNsZWFyKCkgewogICAgICAgICAgdGhpcy5fX2RhdGFfXyA9IFtdOwogICAgICAgICAgdGhpcy5zaXplID0gMDsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFJlbW92ZXMgYGtleWAgYW5kIGl0cyB2YWx1ZSBmcm9tIHRoZSBsaXN0IGNhY2hlLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAbmFtZSBkZWxldGUKICAgICAgICAgKiBAbWVtYmVyT2YgTGlzdENhY2hlCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IGtleSBUaGUga2V5IG9mIHRoZSB2YWx1ZSB0byByZW1vdmUuCiAgICAgICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIHRoZSBlbnRyeSB3YXMgcmVtb3ZlZCwgZWxzZSBgZmFsc2VgLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGxpc3RDYWNoZURlbGV0ZShrZXkpIHsKICAgICAgICAgIHZhciBkYXRhID0gdGhpcy5fX2RhdGFfXywKICAgICAgICAgICAgICBpbmRleCA9IGFzc29jSW5kZXhPZihkYXRhLCBrZXkpOwoKICAgICAgICAgIGlmIChpbmRleCA8IDApIHsKICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgfQogICAgICAgICAgdmFyIGxhc3RJbmRleCA9IGRhdGEubGVuZ3RoIC0gMTsKICAgICAgICAgIGlmIChpbmRleCA9PSBsYXN0SW5kZXgpIHsKICAgICAgICAgICAgZGF0YS5wb3AoKTsKICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIHNwbGljZS5jYWxsKGRhdGEsIGluZGV4LCAxKTsKICAgICAgICAgIH0KICAgICAgICAgIC0tdGhpcy5zaXplOwogICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIHRoZSBsaXN0IGNhY2hlIHZhbHVlIGZvciBga2V5YC4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQG5hbWUgZ2V0CiAgICAgICAgICogQG1lbWJlck9mIExpc3RDYWNoZQogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBrZXkgVGhlIGtleSBvZiB0aGUgdmFsdWUgdG8gZ2V0LgogICAgICAgICAqIEByZXR1cm5zIHsqfSBSZXR1cm5zIHRoZSBlbnRyeSB2YWx1ZS4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBsaXN0Q2FjaGVHZXQoa2V5KSB7CiAgICAgICAgICB2YXIgZGF0YSA9IHRoaXMuX19kYXRhX18sCiAgICAgICAgICAgICAgaW5kZXggPSBhc3NvY0luZGV4T2YoZGF0YSwga2V5KTsKCiAgICAgICAgICByZXR1cm4gaW5kZXggPCAwID8gdW5kZWZpbmVkJDEgOiBkYXRhW2luZGV4XVsxXTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENoZWNrcyBpZiBhIGxpc3QgY2FjaGUgdmFsdWUgZm9yIGBrZXlgIGV4aXN0cy4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQG5hbWUgaGFzCiAgICAgICAgICogQG1lbWJlck9mIExpc3RDYWNoZQogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBrZXkgVGhlIGtleSBvZiB0aGUgZW50cnkgdG8gY2hlY2suCiAgICAgICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIGFuIGVudHJ5IGZvciBga2V5YCBleGlzdHMsIGVsc2UgYGZhbHNlYC4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBsaXN0Q2FjaGVIYXMoa2V5KSB7CiAgICAgICAgICByZXR1cm4gYXNzb2NJbmRleE9mKHRoaXMuX19kYXRhX18sIGtleSkgPiAtMTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgdGhlIGxpc3QgY2FjaGUgYGtleWAgdG8gYHZhbHVlYC4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQG5hbWUgc2V0CiAgICAgICAgICogQG1lbWJlck9mIExpc3RDYWNoZQogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBrZXkgVGhlIGtleSBvZiB0aGUgdmFsdWUgdG8gc2V0LgogICAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIHNldC4KICAgICAgICAgKiBAcmV0dXJucyB7T2JqZWN0fSBSZXR1cm5zIHRoZSBsaXN0IGNhY2hlIGluc3RhbmNlLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGxpc3RDYWNoZVNldChrZXksIHZhbHVlKSB7CiAgICAgICAgICB2YXIgZGF0YSA9IHRoaXMuX19kYXRhX18sCiAgICAgICAgICAgICAgaW5kZXggPSBhc3NvY0luZGV4T2YoZGF0YSwga2V5KTsKCiAgICAgICAgICBpZiAoaW5kZXggPCAwKSB7CiAgICAgICAgICAgICsrdGhpcy5zaXplOwogICAgICAgICAgICBkYXRhLnB1c2goW2tleSwgdmFsdWVdKTsKICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIGRhdGFbaW5kZXhdWzFdID0gdmFsdWU7CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9CgogICAgICAgIC8vIEFkZCBtZXRob2RzIHRvIGBMaXN0Q2FjaGVgLgogICAgICAgIExpc3RDYWNoZS5wcm90b3R5cGUuY2xlYXIgPSBsaXN0Q2FjaGVDbGVhcjsKICAgICAgICBMaXN0Q2FjaGUucHJvdG90eXBlWydkZWxldGUnXSA9IGxpc3RDYWNoZURlbGV0ZTsKICAgICAgICBMaXN0Q2FjaGUucHJvdG90eXBlLmdldCA9IGxpc3RDYWNoZUdldDsKICAgICAgICBMaXN0Q2FjaGUucHJvdG90eXBlLmhhcyA9IGxpc3RDYWNoZUhhczsKICAgICAgICBMaXN0Q2FjaGUucHJvdG90eXBlLnNldCA9IGxpc3RDYWNoZVNldDsKCiAgICAgICAgLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLwoKICAgICAgICAvKioKICAgICAgICAgKiBDcmVhdGVzIGEgbWFwIGNhY2hlIG9iamVjdCB0byBzdG9yZSBrZXktdmFsdWUgcGFpcnMuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBjb25zdHJ1Y3RvcgogICAgICAgICAqIEBwYXJhbSB7QXJyYXl9IFtlbnRyaWVzXSBUaGUga2V5LXZhbHVlIHBhaXJzIHRvIGNhY2hlLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIE1hcENhY2hlKGVudHJpZXMpIHsKICAgICAgICAgIHZhciBpbmRleCA9IC0xLAogICAgICAgICAgICAgIGxlbmd0aCA9IGVudHJpZXMgPT0gbnVsbCA/IDAgOiBlbnRyaWVzLmxlbmd0aDsKCiAgICAgICAgICB0aGlzLmNsZWFyKCk7CiAgICAgICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkgewogICAgICAgICAgICB2YXIgZW50cnkgPSBlbnRyaWVzW2luZGV4XTsKICAgICAgICAgICAgdGhpcy5zZXQoZW50cnlbMF0sIGVudHJ5WzFdKTsKICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFJlbW92ZXMgYWxsIGtleS12YWx1ZSBlbnRyaWVzIGZyb20gdGhlIG1hcC4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQG5hbWUgY2xlYXIKICAgICAgICAgKiBAbWVtYmVyT2YgTWFwQ2FjaGUKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBtYXBDYWNoZUNsZWFyKCkgewogICAgICAgICAgdGhpcy5zaXplID0gMDsKICAgICAgICAgIHRoaXMuX19kYXRhX18gPSB7CiAgICAgICAgICAgICdoYXNoJzogbmV3IEhhc2gsCiAgICAgICAgICAgICdtYXAnOiBuZXcgKE1hcCB8fCBMaXN0Q2FjaGUpLAogICAgICAgICAgICAnc3RyaW5nJzogbmV3IEhhc2gKICAgICAgICAgIH07CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBSZW1vdmVzIGBrZXlgIGFuZCBpdHMgdmFsdWUgZnJvbSB0aGUgbWFwLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAbmFtZSBkZWxldGUKICAgICAgICAgKiBAbWVtYmVyT2YgTWFwQ2FjaGUKICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30ga2V5IFRoZSBrZXkgb2YgdGhlIHZhbHVlIHRvIHJlbW92ZS4KICAgICAgICAgKiBAcmV0dXJucyB7Ym9vbGVhbn0gUmV0dXJucyBgdHJ1ZWAgaWYgdGhlIGVudHJ5IHdhcyByZW1vdmVkLCBlbHNlIGBmYWxzZWAuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gbWFwQ2FjaGVEZWxldGUoa2V5KSB7CiAgICAgICAgICB2YXIgcmVzdWx0ID0gZ2V0TWFwRGF0YSh0aGlzLCBrZXkpWydkZWxldGUnXShrZXkpOwogICAgICAgICAgdGhpcy5zaXplIC09IHJlc3VsdCA/IDEgOiAwOwogICAgICAgICAgcmV0dXJuIHJlc3VsdDsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIEdldHMgdGhlIG1hcCB2YWx1ZSBmb3IgYGtleWAuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBuYW1lIGdldAogICAgICAgICAqIEBtZW1iZXJPZiBNYXBDYWNoZQogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBrZXkgVGhlIGtleSBvZiB0aGUgdmFsdWUgdG8gZ2V0LgogICAgICAgICAqIEByZXR1cm5zIHsqfSBSZXR1cm5zIHRoZSBlbnRyeSB2YWx1ZS4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBtYXBDYWNoZUdldChrZXkpIHsKICAgICAgICAgIHJldHVybiBnZXRNYXBEYXRhKHRoaXMsIGtleSkuZ2V0KGtleSk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDaGVja3MgaWYgYSBtYXAgdmFsdWUgZm9yIGBrZXlgIGV4aXN0cy4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQG5hbWUgaGFzCiAgICAgICAgICogQG1lbWJlck9mIE1hcENhY2hlCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IGtleSBUaGUga2V5IG9mIHRoZSBlbnRyeSB0byBjaGVjay4KICAgICAgICAgKiBAcmV0dXJucyB7Ym9vbGVhbn0gUmV0dXJucyBgdHJ1ZWAgaWYgYW4gZW50cnkgZm9yIGBrZXlgIGV4aXN0cywgZWxzZSBgZmFsc2VgLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIG1hcENhY2hlSGFzKGtleSkgewogICAgICAgICAgcmV0dXJuIGdldE1hcERhdGEodGhpcywga2V5KS5oYXMoa2V5KTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgdGhlIG1hcCBga2V5YCB0byBgdmFsdWVgLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAbmFtZSBzZXQKICAgICAgICAgKiBAbWVtYmVyT2YgTWFwQ2FjaGUKICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30ga2V5IFRoZSBrZXkgb2YgdGhlIHZhbHVlIHRvIHNldC4KICAgICAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBzZXQuCiAgICAgICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyB0aGUgbWFwIGNhY2hlIGluc3RhbmNlLgogICAgICA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Rpb24gU2V0Q2FjaGUodmFsdWVzKSB7CiAgICAgICAgICB2YXIgaW5kZXggPSAtMSwKICAgICAgICAgICAgICBsZW5ndGggPSB2YWx1ZXMgPT0gbnVsbCA/IDAgOiB2YWx1ZXMubGVuZ3RoOwoKICAgICAgICAgIHRoaXMuX19kYXRhX18gPSBuZXcgTWFwQ2FjaGU7CiAgICAgICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkgewogICAgICAgICAgICB0aGlzLmFkZCh2YWx1ZXNbaW5kZXhdKTsKICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIEFkZHMgYHZhbHVlYCB0byB0aGUgYXJyYXkgY2FjaGUuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBuYW1lIGFkZAogICAgICAgICAqIEBtZW1iZXJPZiBTZXRDYWNoZQogICAgICAgICAqIEBhbGlhcyBwdXNoCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gY2FjaGUuCiAgICAgICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyB0aGUgY2FjaGUgaW5zdGFuY2UuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gc2V0Q2FjaGVBZGQodmFsdWUpIHsKICAgICAgICAgIHRoaXMuX19kYXRhX18uc2V0KHZhbHVlLCBIQVNIX1VOREVGSU5FRCk7CiAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENoZWNrcyBpZiBgdmFsdWVgIGlzIGluIHRoZSBhcnJheSBjYWNoZS4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQG5hbWUgaGFzCiAgICAgICAgICogQG1lbWJlck9mIFNldENhY2hlCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gc2VhcmNoIGZvci4KICAgICAgICAgKiBA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CiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAbmFtZSBjbGVhcgogICAgICAgICAqIEBtZW1iZXJPZiBTdGFjawogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHN0YWNrQ2xlYXIoKSB7CiAgICAgICAgICB0aGlzLl9fZGF0YV9fID0gbmV3IExpc3RDYWNoZTsKICAgICAgICAgIHRoaXMuc2l6ZSA9IDA7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBSZW1vdmVzIGBrZXlgIGFuZCBpdHMgdmFsdWUgZnJvbSB0aGUgc3RhY2suCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBuYW1lIGRlbGV0ZQogICAgICAgICAqIEBtZW1iZXJPZiBTdGFjawogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBrZXkgVGhlIGtleSBvZiB0aGUgdmFsdWUgdG8gcmVtb3ZlLgogICAgICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiB0aGUgZW50cnkgd2FzIHJlbW92ZWQsIGVsc2UgYGZhbHNlYC4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBzdGFja0RlbGV0ZShrZXkpIHsKICAgICAgICAgIHZhciBkYXRhID0gdGhpcy5fX2RhdGFfXywKICAgICAgICAgICAgICByZXN1bHQgPSBkYXRhWydkZWxldGUnXShrZXkpOwoKICAgICAgICAgIHRoaXMuc2l6ZSA9IGRhdGEuc2l6ZTsKICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIHRoZSBzdGFjayB2YWx1ZSBmb3IgYGtleWAuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBuYW1lIGdldAogICAgICAgICAqIEBtZW1iZXJPZiBTdGFjawogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBrZXkgVGhlIGtleSBvZiB0aGUgdmFsdWUgdG8gZ2V0LgogICAgICAgICAqIEByZXR1cm5zIHsqfSBSZXR1cm5zIHRoZSBlbnRyeSB2YWx1ZS4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBzdGFja0dldChrZXkpIHsKICAgICAgICAgIHJldHVybiB0aGlzLl9fZGF0YV9fLmdldChrZXkpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ2hlY2tzIGlmIGEgc3RhY2sgdmFsdWUgZm9yIGBrZXlgIGV4aXN0cy4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQG5hbWUgaGFzCiAgICAgICAgICogQG1lbWJlck9mIFN0YWNrCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IGtleSBUaGUga2V5IG9mIHRoZSBlbnRyeSB0byBjaGVjay4KICAgICAgICAgKiBAcmV0dXJucyB7Ym9vbGVhbn0gUmV0dXJucyBgdHJ1ZWAgaWYgYW4gZW50cnkgZm9yIGBrZXlgIGV4aXN0cywgZWxzZSBgZmFsc2VgLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHN0YWNrSGFzKGtleSkgewogICAgICAgICAgcmV0dXJuIHRoaXMuX19kYXRhX18uaGFzKGtleSk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIHRoZSBzdGFjayBga2V5YCB0byBgdmFsdWVgLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAbmFtZSBzZXQKICAgICAgICAgKiBAbWVtYmVyT2YgU3RhY2sKICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30ga2V5IFRoZSBrZXkgb2YgdGhlIHZhbHVlIHRvIHNldC4KICAgICAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBzZXQuCiAgICAgICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyB0aGUgc3RhY2sgY2FjaGUg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iB2YWx1ZSkgewogICAgICAgICAgICBpZiAoKGluaGVyaXRlZCB8fCBoYXNPd25Qcm9wZXJ0eS5jYWxsKHZhbHVlLCBrZXkpKSAmJgogICAgICAgICAgICAgICAgIShza2lwSW5kZXhlcyAmJiAoCiAgICAgICAgICAgICAgICAgICAvLyBTYWZhcmkgOSBoYXMgZW51bWVyYWJsZSBgYXJndW1lbnRzLmxlbmd0aGAgaW4gc3RyaWN0IG1vZGUuCiAgICAgICAgICAgICAgICAgICBrZXkgPT0gJ2xlbmd0aCcgfHwKICAgICAgICAgICAgICAgICAgIC8vIE5vZGUuanMgMC4xMCBoYXMgZW51bWVyYWJsZSBub24taW5kZXggcHJvcGVydGllcyBvbiBidWZmZXJzLgogICAgICAgICAgICAgICAgICAgKGlzQnVmZiAmJiAoa2V5ID09ICdvZmZzZXQnIHx8IGtleSA9PSAncGFyZW50JykpIHx8CiAgICAgICAgICAgICAgICAgICAvLyBQaGFudG9tSlMgMiBoYXMgZW51bWVyYWJsZSBub24taW5kZXggcHJvcGVydGllcyBvbiB0eXBlZCBhcnJheXMuCiAgICAgICAgICAgICAgICAgICAoaXNUeXBlICYmIChrZXkgPT0gJ2J1ZmZlcicgfHwga2V5ID09ICdieXRlTGVuZ3RoJyB8fCBrZXkgPT0gJ2J5dGVPZmZzZXQnKSkgfHwKICAgICAgICAgICAgICAgICAgIC8vIFNraXAgaW5kZXggcHJvcGVydGllcy4KICAgICAgICAgICAgICAgICAgIGlzSW5kZXgoa2V5LCBsZW5ndGgpCiAgICAgICAgICAgICAgICApKSkgewogICAgICAgICAgICAgIHJlc3VsdC5wdXNoKGtleSk7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBBIHNwZWNpYWxpemVkIHZlcnNpb24gb2YgYF8uc2FtcGxlYCBmb3IgYXJyYXlzLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge0FycmF5fSBhcnJheSBUaGUgYXJyYXkgdG8gc2FtcGxlLgogICAgICAgICAqIEByZXR1cm5zIHsqfSBSZXR1cm5zIHRoZSByYW5kb20gZWxlbWVudC4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBhcnJheVNhbXBsZShhcnJheSkgewogICAgICAgICAgdmFyIGxlbmd0aCA9IGFycmF5Lmxlbmd0aDsKICAgICAgICAgIHJldHVybiBsZW5ndGggPyBhcnJheVtiYXNlUmFuZG9tKDAsIGxlbmd0aCAtIDEpXSA6IHVuZGVmaW5lZCQxOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQSBzcGVjaWFsaXplZCB2ZXJzaW9uIG9mIGBfLnNhbXBsZVNpemVgIGZvciBhcnJheXMuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7QXJyYXl9IGFycmF5IFRoZSBhcnJheSB0byBzYW1wbGUuCiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IG4gVGhlIG51bWJlciBvZiBlbGVtZW50cyB0byBzYW1wbGUuCiAgICAgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSByYW5kb20gZWxlbWVudHMuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gYXJyYXlTYW1wbGVTaXplKGFycmF5LCBuKSB7CiAgICAgICAgICByZXR1cm4gc2h1ZmZsZVNlbGYoY29weUFycmF5KGFycmF5KSwgYmFzZUNsYW1wKG4sIDAsIGFycmF5Lmxlbmd0aCkpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQSBzcGVjaWFsaXplZCB2ZXJzaW9uIG9mIGBfLnNodWZmbGVgIGZvciBhcnJheXMuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7QXJyYXl9IGFycmF5IFRoZSBhcnJheSB0byBzaHVmZmxlLgogICAgICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyB0aGUgbmV3IHNodWZmbGVkIGFycmF5LgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGFycmF5U2h1ZmZsZShhcnJheSkgewogICAgICAgICAgcmV0dXJuIHNodWZmbGVTZWxmKGNvcHlBcnJheShhcnJheSkpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogVGhpcyBmdW5jdGlvbiBpcyBsaWtlIGBhc3NpZ25WYWx1ZWAgZXhjZXB0IHRoYXQgaXQgZG9lc24ndCBhc3NpZ24KICAgICAgICAgKiBgdW5kZWZpbmVkYCB2YWx1ZXMuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvYmplY3QgVGhlIG9iamVjdCB0byBtb2RpZnkuCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IGtleSBUaGUga2V5IG9mIHRoZSBwcm9wZXJ0eSB0byBhc3NpZ24uCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gYXNzaWduLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGFzc2lnbk1lcmdlVmFsdWUob2JqZWN0LCBrZXksIHZhbHVlKSB7CiAgICAgICAgICBpZiAoKHZhbHVlICE9PSB1bmRlZmluZWQkMSAmJiAhZXEob2JqZWN0W2tleV0sIHZhbHVlKSkgfHwKICAgICAgICAgICAgICAodmFsdWUgPT09IHVuZGVmaW5lZCQxICYmICEoa2V5IGluIG9iamVjdCkpKSB7CiAgICAgICAgICAgIGJhc2VBc3NpZ25WYWx1ZShvYmplY3QsIGtleSwgdmFsdWUpOwogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQXNzaWducyBgdmFsdWVgIHRvIGBrZXlgIG9mIGBvYmplY3RgIGlmIHRoZSBleGlzdGluZyB2YWx1ZSBpcyBub3QgZXF1aXZhbGVudAogICAgICAgICAqIHVzaW5nIFtgU2FtZVZhbHVlWmVyb2BdKGh0dHA6Ly9lY21hLWludGVybmF0aW9uYWwub3JnL2VjbWEtMjYyLzcuMC8jc2VjLXNhbWV2YWx1ZXplcm8pCiAgICAgICAgICogZm9yIGVxdWFsaXR5IGNvbXBhcmlzb25zLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBvYmplY3QgdG8gbW9kaWZ5LgogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBrZXkgVGhlIGtleSBvZiB0aGUgcHJvcGVydHkgdG8gYXNzaWduLgogICAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIGFzc2lnbi4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBhc3NpZ25WYWx1ZShvYmplY3QsIGtleSwgdmFsdWUpIHsKICAgICAgICAgIHZhciBvYmpWYWx1ZSA9IG9iamVjdFtrZXldOwogICAgICAgICAgaWYgKCEoaGFzT3duUHJvcGVydHkuY2FsbChvYmplY3QsIGtleSkgJiYgZXEob2JqVmFsdWUsIHZhbHVlKSkgfHwKICAgICAgICAgICAgICAodmFsdWUgPT09IHVuZGVmaW5lZCQxICYmICEoa2V5IGluIG9iamVjdCkpKSB7CiAgICAgICAgICAgIGJhc2VBc3NpZ25WYWx1ZShvYmplY3QsIGtleSwgdmFsdWUpOwogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogR2V0cyB0aGUgaW5kZXggYXQgd2hpY2ggdGhlIGBrZXlgIGlzIGZvdW5kIGluIGBhcnJheWAgb2Yga2V5LXZhbHVlIHBhaXJzLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge0FycmF5fSBhcnJheSBUaGUgYXJyYXkgdG8gaW5zcGVjdC4KICAgICAgICAgKiBAcGFyYW0geyp9IGtleSBUaGUga2V5IHRvIHNlYXJjaCBmb3IuCiAgICAgICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgaW5kZXggb2YgdGhlIG1hdGNoZWQgdmFsdWUsIGVsc2UgYC0xYC4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBhc3NvY0luZGV4T2YoYXJyYXksIGtleSkgewogICAgICAgICAgdmFyIGxlbmd0aCA9IGFycmF5Lmxlbmd0aDsKICAgICAgICAgIHdoaWxlIChsZW5ndGgtLSkgewogICAgICAgICAgICBpZiAoZXEoYXJyYXlbbGVuZ3RoXVswXSwga2V5KSkgewogICAgICAgICAgICAgIHJldHVybiBsZW5ndGg7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiAtMTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIEFnZ3JlZ2F0ZXMgZWxlbWVudHMgb2YgYGNvbGxlY3Rpb25gIG9uIGBhY2N1bXVsYXRvcmAgd2l0aCBrZXlzIHRyYW5zZm9ybWVkCiAgICAgICAgICogYnkgYGl0ZXJhdGVlYCBhbmQgdmFsdWVzIHNldCBieSBgc2V0dGVyYC4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHtBcnJheXxPYmplY3R9IGNvbGxlY3Rpb24gVGhlIGNvbGxlY3Rpb24gdG8gaXRlcmF0ZSBvdmVyLgogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IHNldHRlciBUaGUgZnVuY3Rpb24gdG8gc2V0IGBhY2N1bXVsYXRvcmAgdmFsdWVzLgogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IGl0ZXJhdGVlIFRoZSBpdGVyYXRlZSB0byB0cmFuc2Zvcm0ga2V5cy4KICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gYWNjdW11bGF0b3IgVGhlIGluaXRpYWwgYWdncmVnYXRlZCBvYmplY3QuCiAgICAgICAgICogQHJldHVybnMge0Z1bmN0aW9ufSBSZXR1cm5zIGBhY2N1bXVsYXRvcmAuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gYmFzZUFnZ3JlZ2F0b3IoY29sbGVjdGlvbiwgc2V0dGVyLCBpdGVyYXRlZSwgYWNjdW11bGF0b3IpIHsKICAgICAgICAgIGJhc2VFYWNoKGNvbGxlY3Rpb24sIGZ1bmN0aW9uKHZhbHVlLCBrZXksIGNvbGxlY3Rpb24pIHsKICAgICAgICAgICAgc2V0dGVyKGFjY3VtdWxhdG9yLCB2YWx1ZSwgaXRlcmF0ZWUodmFsdWUpLCBjb2xsZWN0aW9uKTsKICAgICAgICAgIH0pOwogICAgICAgICAgcmV0dXJuIGFjY3VtdWxhdG9yOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIGJhc2UgaW1wbGVtZW50YXRpb24gb2YgYF8uYXNzaWduYCB3aXRob3V0IHN1cHBvcnQgZm9yIG11bHRpcGxlIHNvdXJjZXMKICAgICAgICAgKiBvciBgY3VzdG9taXplcmAgZnVuY3Rpb25zLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBkZXN0aW5hdGlvbiBvYmplY3QuCiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IHNvdXJjZSBUaGUgc291cmNlIG9iamVjdC4KICAgICAgICAgKiBAcmV0dXJucyB7T2JqZWN0fSBSZXR1cm5zIGBvYmplY3RgLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGJhc2VBc3NpZ24ob2JqZWN0LCBzb3VyY2UpIHsKICAgICAgICAgIHJldHVybiBvYmplY3QgJiYgY29weU9iamVjdChzb3VyY2UsIGtleXMoc291cmNlKSwgb2JqZWN0KTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBiYXNlIGltcGxlbWVudGF0aW9uIG9mIGBfLmFzc2lnbkluYCB3aXRob3V0IHN1cHBvcnQgZm9yIG11bHRpcGxlIHNvdXJjZXMKICAgICAgICAgKiBvciBgY3VzdG9taXplcmAgZnVuY3Rpb25zLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBkZXN0aW5hdGlvbiBvYmplY3QuCiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IHNvdXJjZSBUaGUgc291cmNlIG9iamVjdC4KICAgICAgICAgKiBAcmV0dXJucyB7T2JqZWN0fSBSZXR1cm5zIGBvYmplY3RgLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGJhc2VBc3NpZ25JbihvYmplY3QsIHNvdXJjZSkgewogICAgICAgICAgcmV0dXJuIG9iamVjdCAmJiBjb3B5T2JqZWN0KHNvdXJjZSwga2V5c0luKHNvdXJjZSksIG9iamVjdCk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBUaGUgYmFzZSBpbXBsZW1lbnRhdGlvbiBvZiBgYXNzaWduVmFsdWVgIGFuZCBgYXNzaWduTWVyZ2VWYWx1ZWAgd2l0aG91dAogICAgICAgICAqIHZhbHVlIGNoZWNrcy4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IG9iamVjdCBUaGUgb2JqZWN0IHRvIG1vZGlmeS4KICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30ga2V5IFRoZSBrZXkgb2YgdGhlIHByb3BlcnR5IHRvIGFzc2lnbi4KICAgICAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBhc3NpZ24uCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gYmFzZUFzc2lnblZhbHVlKG9iamVjdCwga2V5LCB2YWx1ZSkgewogICAgICAgICAgaWYgKGtleSA9PSAnX19wcm90b19fJyAmJiBkZWZpbmVQcm9wZXJ0eSkgewogICAgICAgICAgICBkZWZpbmVQcm9wZXJ0eShvYmplY3QsIGtleSwgewogICAgICAgICAgICAgICdjb25maWd1cmFibGUnOiB0cnVlLAogICAgICAgICAgICAgICdlbnVtZXJhYmxlJzogdHJ1ZSwKICAgICAgICAgICAgICAndmFsdWUnOiB2YWx1ZSwKICAgICAgICAgICAgICAnd3JpdGFibGUnOiB0cnVlCiAgICAgICAgICAgIH0pOwogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgb2JqZWN0W2tleV0gPSB2YWx1ZTsKICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBiYXNlIGltcGxlbWVudGF0aW9uIG9mIGBfLmF0YCB3aXRob3V0IHN1cHBvcnQgZm9yIGluZGl2aWR1YWwgcGF0aHMuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvYmplY3QgVGhlIG9iamVjdCB0byBpdGVyYXRlIG92ZXIuCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmdbXX0gcGF0aHMgVGhlIHByb3BlcnR5IHBhdGhzIHRvIHBpY2suCiAgICAgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBwaWNrZWQgZWxlbWVudHMuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gYmFzZUF0KG9iamVjdCwgcGF0aHMpIHsKICAgICAgICAgIHZhciBpbmRleCA9IC0xLAogICAgICAgICAgICAgIGxlbmd0aCA9IHBhdGhzLmxlbmd0aCwKICAgICAgICAgICAgICByZXN1bHQgPSBBcnJheShsZW5ndGgpLAogICAgICAgICAgICAgIHNraXAgPSBvYmplY3QgPT0gbnVsbDsKCiAgICAgICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkgewogICAgICAgICAgICByZXN1bHRbaW5kZXhdID0gc2tpcCA/IHVuZGVmaW5lZCQxIDogZ2V0KG9iamVjdCwgcGF0aHNbaW5kZXhdKTsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBUaGUgYmFzZSBpbXBsZW1lbnRhdGlvbiBvZiBgXy5jbGFtcGAgd2hpY2ggZG9lc24ndCBjb2VyY2UgYXJndW1lbnRzLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gbnVtYmVyIFRoZSBudW1iZXIgdG8gY2xhbXAuCiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IFtsb3dlcl0gVGhlIGxvd2VyIGJvdW5kLgogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSB1cHBlciBUaGUgdXBwZXIgYm91bmQuCiAgICAgICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgY2xhbXBlZCBudW1iZXIuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gYmFzZUNsYW1wKG51bWJlciwgbG93ZXIsIHVwcGVyKSB7CiAgICAgICAgICBpZiAobnVtYmVyID09PSBudW1iZXIpIHsKICAgICAgICAgICAgaWYgKHVwcGVyICE9PSB1bmRlZmluZWQkMSkgewogICAgICAgICAgICAgIG51bWJlciA9IG51bWJlciA8PSB1cHBlciA/IG51bWJlciA6IHVwcGVyOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChsb3dlciAhPT0gdW5kZWZpbmVkJDEpIHsKICAgICAgICAgICAgICBudW1iZXIgPSBudW1iZXIgPj0gbG93ZXIgPyBudW1iZXIgOiBsb3dlcjsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIG51bWJlcjsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBiYXNlIGltcGxlbWVudGF0aW9uIG9mIGBfLmNsb25lYCBhbmQgYF8uY2xvbmVEZWVwYCB3aGljaCB0cmFja3MKICAgICAgICAgKiB0cmF2ZXJzZWQgb2JqZWN0cy4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gY2xvbmUuCiAgICAgICAgICogQHBhcmFtIHtib29sZWFufSBiaXRtYXNrIFRoZSBiaXRtYXNrIGZsYWdzLgogICAgICAgICAqICAxIC0gRGVlcCBjbG9uZQogICAgICAgICAqICAyIC0gRmxhdHRlbiBpbmhlcml0ZWQgcHJvcGVydGllcwogICAgICAgICAqICA0IC0gQ2xvbmUgc3ltYm9scwogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IFtjdXN0b21pemVyXSBUaGUgZnVuY3Rpb24gdG8gY3VzdG9taXplIGNsb25pbmcuCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IFtrZXldIFRoZSBrZXkgb2YgYHZhbHVlYC4KICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gW29iamVjdF0gVGhlIHBhcmVudCBvYmplY3Qgb2YgYHZhbHVlYC4KICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gW3N0YWNrXSBUcmFja3MgdHJhdmVyc2VkIG9iamVjdHMgYW5kIHRoZWlyIGNsb25lIGNvdW50ZXJwYXJ0cy4KICAgICAgICAgKiBAcmV0dXJucyB7Kn0gUmV0dXJucyB0aGUgY2xvbmVkIHZhbHVlLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGJhc2VDbG9uZSh2YWx1ZSwgYml0bWFzaywgY3VzdG9taXplciwga2V5LCBvYmplY3QsIHN0YWNrKSB7CiAgICAgICAgICB2YXIgcmVzdWx0LAogICAgICAgICAgICAgIGlzRGVlcCA9IGJpdG1hc2sgJiBDTE9ORV9ERUVQX0ZMQUcsCiAgICAgICAgICAgICAgaXNGbGF0ID0gYml0bWFzayAmIENMT05FX0ZMQVRfRkxBRywKICAgICAgICAgICAgICBpc0Z1bGwgPSBiaXRtYXNrICYgQ0xPTkVfU1lNQk9MU19GTEFHOwoKICAgICAgICAgIGlmIChjdXN0b21pemVyKSB7CiAgICAgICAgICAgIHJlc3VsdCA9IG9iamVjdCA/IGN1c3RvbWl6ZXIodmFsdWUsIGtleSwgb2JqZWN0LCBzdGFjaykgOiBjdXN0b21pemVyKHZhbHVlKTsKICAgICAgICAgIH0KICAgICAgICAgIGlmIChyZXN1bHQgIT09IHVuZGVmaW5lZCQxKSB7CiAgICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgICB9CiAgICAgICAgICBpZiAoIWlzT2JqZWN0KHZhbHVlKSkgewogICAgICAgICAgICByZXR1cm4gdmFsdWU7CiAgICAgICAgICB9CiAgICAgICAgICB2YXIgaXNBcnIgPSBpc0FycmF5KHZhbHVlKTsKICAgICAgICAgIGlmIChpc0FycikgewogICAgICAgICAgICByZXN1bHQgPSBpbml0Q2xvbmVBcnJheSh2YWx1ZSk7CiAgICAgICAgICAgIGlmICghaXNEZWVwKSB7CiAgICAgICAgICAgICAgcmV0dXJuIGNvcHlBcnJheSh2YWx1ZSwgcmVzdWx0KTsKICAgICAgICAgICAgfQogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgdmFyIHRhZyA9IGdldFRhZyh2YWx1ZSksCiAgICAgICAgICAgICAgICBpc0Z1bmMgPSB0YWcgPT0gZnVuY1RhZyB8fCB0YWcgPT0gZ2VuVGFnOwoKICAgICAgICAgICAgaWYgKGlzQnVmZmVyKHZhbHVlKSkgewogICAgICAgICAgICAgIHJldHVybiBjbG9uZUJ1ZmZlcih2YWx1ZSwgaXNEZWVwKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGFnID09IG9iamVjdFRhZyB8fCB0YWcgPT0gYXJnc1RhZyB8fCAoaXNGdW5jICYmICFvYmplY3QpKSB7CiAgICAgICAgICAgICAgcmVzdWx0ID0gKGlzRmxhdCB8fCBpc0Z1bmMpID8ge30gOiBpbml0Q2xvbmVPYmplY3QodmFsdWUpOwogICAgICAgICAgICAgIGlmICghaXNEZWVwKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gaXNGbGF0CiAgICAgICAgICAgICAgICAgID8gY29weVN5bWJvbHNJbih2YWx1ZSwgYmFzZUFzc2lnbkluKHJlc3VsdCwgdmFsdWUpKQogICAgICAgICAgICAgICAgICA6IGNvcHlTeW1ib2xzKHZhbHVlLCBiYXNlQXNzaWduKHJlc3VsdCwgdmFsdWUpKTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgaWYgKCFjbG9uZWFibGVUYWdzW3RhZ10pIHsKICAgICAgICAgICAgICAgIHJldHVybiBvYmplY3QgPyB2YWx1ZSA6IHt9OwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICByZXN1bHQgPSBpbml0Q2xvbmVCeVRhZyh2YWx1ZSwgdGFnLCBpc0RlZXApOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICAvLyBDaGVjayBmb3IgY2lyY3VsYXIgcmVmZXJlbmNlcyBhbmQgcmV0dXJuIGl0cyBjb3JyZXNwb25kaW5nIGNsb25lLgogICAgICAgICAgc3RhY2sgfHwgKHN0YWNrID0gbmV3IFN0YWNrKTsKICAgICAgICAgIHZhciBzdGFja2VkID0gc3RhY2suZ2V0KHZhbHVlKTsKICAgICAgICAgIGlmIChzdGFja2VkKSB7CiAgICAgICAgICAgIHJldHVybiBzdGFja2VkOwogICAgICAgICAgfQogICAgICAgICAgc3RhY2suc2V0KHZhbHVlLCByZXN1bHQpOwoKICAgICAgICAgIGlmIChpc1NldCh2YWx1ZSkpIHsKICAgICAgICAgICAgdmFsdWUuZm9yRWFjaChmdW5jdGlvbihzdWJWYWx1ZSkgewogICAgICAgICAgICAgIHJlc3VsdC5hZGQoYmFzZUNsb25lKHN1YlZhbHVlLCBiaXRtYXNrLCBjdXN0b21pemVyLCBzdWJWYWx1ZSwgdmFsdWUsIHN0YWNrKSk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgfSBlbHNlIGlmIChpc01hcCh2YWx1ZSkpIHsKICAgICAgICAgICAgdmFsdWUuZm9yRWFjaChmdW5jdGlvbihzdWJWYWx1ZSwga2V5KSB7CiAgICAgICAgICAgICAgcmVzdWx0LnNldChrZXksIGJhc2VDbG9uZShzdWJWYWx1ZSwgYml0bWFzaywgY3VzdG9taXplciwga2V5LCB2YWx1ZSwgc3RhY2spKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICB9CgogICAgICAgICAgdmFyIGtleXNGdW5jID0gaXNGdWxsCiAgICAgICAgICAgID8gKGlzRmxhdCA/IGdldEFsbEtleXNJbiA6IGdldEFsbEtleXMpCiAgICAgICAgICAgIDogKGlzRmxhdCA/IGtleXNJbiA6IGtleXMpOwoKICAgICAgICAgIHZhciBwcm9wcyA9IGlzQXJyID8gdW5kZWZpbmVkJDEgOiBrZXlzRnVuYyh2YWx1ZSk7CiAgICAgICAgICBhcnJheUVhY2gocHJvcHMgfHwgdmFsdWUsIGZ1bmN0aW9uKHN1YlZhbHVlLCBrZXkpIHsKICAgICAgICAgICAgaWYgKHByb3BzKSB7CiAgICAgICAgICAgICAga2V5ID0gc3ViVmFsdWU7CiAgICAgICAgICAgICAgc3ViVmFsdWUgPSB2YWx1ZVtrZXldOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIFJlY3Vyc2l2ZWx5IHBvcHVsYXRlIGNsb25lIChzdXNjZXB0aWJsZSB0byBjYWxsIHN0YWNrIGxpbWl0cykuCiAgICAgICAgICAgIGFzc2lnblZhbHVlKHJlc3VsdCwga2V5LCBiYXNlQ2xvbmUoc3ViVmFsdWUsIGJpdG1hc2ssIGN1c3RvbWl6ZXIsIGtleSwgdmFsdWUsIHN0YWNrKSk7CiAgICAgICAgICB9KTsKICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBUaGUgYmFzZSBpbXBsZW1lbnRhdGlvbiBvZiBgXy5jb25mb3Jtc2Agd2hpY2ggZG9lc24ndCBjbG9uZSBgc291cmNlYC4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IHNvdXJjZSBUaGUgb2JqZWN0IG9mIHByb3BlcnR5IHByZWRpY2F0ZXMgdG8gY29uZm9ybSB0by4KICAgICAgICAgKiBAcmV0dXJucyB7RnVuY3Rpb259IFJldHVybnMgdGhlIG5ldyBzcGVjIGZ1bmN0aW9uLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGJhc2VDb25mb3Jtcyhzb3VyY2UpIHsKICAgICAgICAgIHZhciBwcm9wcyA9IGtleXMoc291cmNlKTsKICAgICAgICAgIHJldHVybiBmdW5jdGlvbihvYmplY3QpIHsKICAgICAgICAgICAgcmV0dXJuIGJhc2VDb25mb3Jtc1RvKG9iamVjdCwgc291cmNlLCBwcm9wcyk7CiAgICAgICAgICB9OwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIGJhc2UgaW1wbGVtZW50YXRpb24gb2YgYF8uY29uZm9ybXNUb2Agd2hpY2ggYWNjZXB0cyBgcHJvcHNgIHRvIGNoZWNrLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBvYmplY3QgdG8gaW5zcGVjdC4KICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gc291cmNlIFRoZSBvYmplY3Qgb2YgcHJvcGVydHkgcHJlZGljYXRlcyB0byBjb25mb3JtIHRvLgogICAgICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiBgb2JqZWN0YCBjb25mb3JtcywgZWxzZSBgZmFsc2VgLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGJhc2VDb25mb3Jtc1RvKG9iamVjdCwgc291cmNlLCBwcm9wcykgewogICAgICAgICAgdmFyIGxlbmd0aCA9IHByb3BzLmxlbmd0aDsKICAgICAgICAgIGlmIChvYmplY3QgPT0gbnVsbCkgewogICAgICAgICAgICByZXR1cm4gIWxlbmd0aDsKICAgICAgICAgIH0KICAgICAgICAgIG9iamVjdCA9IE9iamVjdChvYmplY3QpOwogICAgICAgICAgd2hpbGUgKGxlbmd0aC0tKSB7CiAgICAgICAgICAgIHZhciBrZXkgPSBwcm9wc1tsZW5ndGhdLAogICAgICAgICAgICAgICAgcHJlZGljYXRlID0gc291cmNlW2tleV0sCiAgICAgICAgICAgICAgICB2YWx1ZSA9IG9iamVjdFtrZXldOwoKICAgICAgICAgICAgaWYgKCh2YWx1ZSA9PT0gdW5kZWZpbmVkJDEgJiYgIShrZXkgaW4gb2JqZWN0KSkgfHwgIXByZWRpY2F0ZSh2YWx1ZSkpIHsKICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIGJhc2UgaW1wbGVtZW50YXRpb24gb2YgYF8uZGVsYXlgIGFuZCBgXy5kZWZlcmAgd2hpY2ggYWNjZXB0cyBgYXJnc2AKICAgICAgICAgKiB0byBwcm92aWRlIHRvIGBmdW5jYC4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHtGdW5jdGlvbn0gZnVuYyBUaGUgZnVuY3Rpb24gdG8gZGVsYXkuCiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IHdhaXQgVGhlIG51bWJlciBvZiBtaWxsaXNlY29uZHMgdG8gZGVsYXkgaW52b2NhdGlvbi4KICAgICAgICAgKiBAcGFyYW0ge0FycmF5fSBhcmdzIFRoZSBhcmd1bWVudHMgdG8gcHJvdmlkZSB0byBgZnVuY2AuCiAgICAgICAgICogQHJldHVybnMge251bWJlcnxPYmplY3R9IFJldHVyb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gICAgZnVuY3Rpb24gYmFzZURpZmZlcmVuY2UoYXJyYXksIHZhbHVlcywgaXRlcmF0ZWUsIGNvbXBhcmF0b3IpIHsKICAgICAgICAgIHZhciBpbmRleCA9IC0xLAogICAgICAgICAgICAgIGluY2x1ZGVzID0gYXJyYXlJbmNsdWRlcywKICAgICAgICAgICAgICBpc0NvbW1vbiA9IHRydWUsCiAgICAgICAgICAgICAgbGVuZ3RoID0gYXJyYXkubGVuZ3RoLAogICAgICAgICAgICAgIHJlc3VsdCA9IFtdLAogICAgICAgICAgICAgIHZhbHVlc0xlbmd0aCA9IHZhbHVlcy5sZW5ndGg7CgogICAgICAgICAgaWYgKCFsZW5ndGgpIHsKICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDsKICAgICAgICAgIH0KICAgICAgICAgIGlmIChpdGVyYXRlZSkgewogICAgICAgICAgICB2YWx1ZXMgPSBhcnJheU1hcCh2YWx1ZXMsIGJhc2VVbmFyeShpdGVyYXRlZSkpOwogICAgICAgICAgfQogICAgICAgICAgaWYgKGNvbXBhcmF0b3IpIHsKICAgICAgICAgICAgaW5jbHVkZXMgPSBhcnJheUluY2x1ZGVzV2l0aDsKICAgICAgICAgICAgaXNDb21tb24gPSBmYWxzZTsKICAgICAgICAgIH0KICAgICAgICAgIGVsc2UgaWYgKHZhbHVlcy5sZW5ndGggPj0gTEFSR0VfQVJSQVlfU0laRSkgewogICAgICAgICAgICBpbmNsdWRlcyA9IGNhY2hlSGFzOwogICAgICAgICAgICBpc0NvbW1vbiA9IGZhbHNlOwogICAgICAgICAgICB2YWx1ZXMgPSBuZXcgU2V0Q2FjaGUodmFsdWVzKTsKICAgICAgICAgIH0KICAgICAgICAgIG91dGVyOgogICAgICAgICAgd2hpbGUgKCsraW5kZXggPCBsZW5ndGgpIHsKICAgICAgICAgICAgdmFyIHZhbHVlID0gYXJyYXlbaW5kZXhdLAogICAgICAgICAgICAgICAgY29tcHV0ZWQgPSBpdGVyYXRlZSA9PSBudWxsID8gdmFsdWUgOiBpdGVyYXRlZSh2YWx1ZSk7CgogICAgICAgICAgICB2YWx1ZSA9IChjb21wYXJhdG9yIHx8IHZhbHVlICE9PSAwKSA/IHZhbHVlIDogMDsKICAgICAgICAgICAgaWYgKGlzQ29tbW9uICYmIGNvbXB1dGVkID09PSBjb21wdXRlZCkgewogICAgICAgICAgICAgIHZhciB2YWx1ZXNJbmRleCA9IHZhbHVlc0xlbmd0aDsKICAgICAgICAgICAgICB3aGlsZSAodmFsdWVzSW5kZXgtLSkgewogICAgICAgICAgICAgICAgaWYgKHZhbHVlc1t2YWx1ZXNJbmRleF0gPT09IGNvbXB1dGVkKSB7CiAgICAgICAgICAgICAgICAgIGNvbnRpbnVlIG91dGVyOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICByZXN1bHQucHVzaCh2YWx1ZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoIWluY2x1ZGVzKHZhbHVlcywgY29tcHV0ZWQsIGNvbXBhcmF0b3IpKSB7CiAgICAgICAgICAgICAgcmVzdWx0LnB1c2godmFsdWUpOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIGJhc2UgaW1wbGVtZW50YXRpb24gb2YgYF8uZm9yRWFjaGAgd2l0aG91dCBzdXBwb3J0IGZvciBpdGVyYXRlZSBzaG9ydGhhbmRzLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge0FycmF5fE9iamVjdH0gY29sbGVjdGlvbiBUaGUgY29sbGVjdGlvbiB0byBpdGVyYXRlIG92ZXIuCiAgICAgICAgICogQHBhcmFtIHtGdW5jdGlvbn0gaXRlcmF0ZWUgVGhlIGZ1bmN0aW9uIGludm9rZWQgcGVyIGl0ZXJhdGlvbi4KICAgICAgICAgKiBAcmV0dXJucyB7Q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IHZhbHVlLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGJhc2VFeHRyZW11bShhcnJheSwgaXRlcmF0ZWUsIGNvbXBhcmF0b3IpIHsKICAgICAgICAgIHZhciBpbmRleCA9IC0xLAogICAgICAgICAgICAgIGxlbmd0aCA9IGFycmF5Lmxlbmd0aDsKCiAgICAgICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkgewogICAgICAgICAgICB2YXIgdmFsdWUgPSBhcnJheVtpbmRleF0sCiAgICAgICAgICAgICAgICBjdXJyZW50ID0gaXRlcmF0ZWUodmFsdWUpOwoKICAgICAgICAgICAgaWYgKGN1cnJlbnQgIT0gbnVsbCAmJiAoY29tcHV0ZWQgPT09IHVuZGVmaW5lZCQxCiAgICAgICAgICAgICAgICAgID8gKGN1cnJlbnQgPT09IGN1cnJlbnQgJiYgIWlzU3ltYm9sKGN1cnJlbnQpKQogICAgICAgICAgICAgICAgICA6IGNvbXBhcmF0b3IoY3VycmVudCwgY29tcHV0ZWQpCiAgICAgICAgICAgICAgICApKSB7CiAgICAgICAgICAgICAgdmFyIGNvbXB1dGVkID0gY3VycmVudCwKICAgICAgICAgICAgICAgICAgcmVzdWx0ID0gdmFsdWU7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBUaGUgYmFzZSBpbXBsZW1lbnRhdGlvbiBvZiBgXy5maWxsYCB3aXRob3V0IGFuIGl0ZXJhdGVlIGNhbGwgZ3VhcmQuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7QXJyYXl9IGFycmF5IFRoZSBhcnJheSB0byBmaWxsLgogICAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIGZpbGwgYGFycmF5YCB3aXRoLgogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBbc3RhcnQ9MF0gVGhlIHN0YXJ0IHBvc2l0aW9uLgogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBbZW5kPWFycmF5Lmxlbmd0aF0gVGhlIGVuZCBwb3NpdGlvbi4KICAgICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgYGFycmF5YC4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBiYXNlRmlsbChhcnJheSwgdmFsdWUsIHN0YXJ0LCBlbmQpIHsKICAgICAgICAgIHZhciBsZW5ndGggPSBhcnJheS5sZW5ndGg7CgogICAgICAgICAgc3RhcnQgPSB0b0ludGVnZXIoc3RhcnQpOwogICAgICAgICAgaWYgKHN0YXJ0IDwgMCkgewogICAgICAgICAgICBzdGFydCA9IC1zdGFydCA+IGxlbmd0aCA/IDAgOiAobGVuZ3RoICsgc3RhcnQpOwogICAgICAgICAgfQogICAgICAgICAgZW5kID0gKGVuZCA9PT0gdW5kZWZpbmVkJDEgfHwgZW5kID4gbGVuZ3RoKSA/IGxlbmd0aCA6IHRvSW50ZWdlcihlbmQpOwogICAgICAgICAgaWYgKGVuZCA8IDApIHsKICAgICAgICAgICAgZW5kICs9IGxlbmd0aDsKICAgICAgICAgIH0KICAgICAgICAgIGVuZCA9IHN0YXJ0ID4gZW5kID8gMCA6IHRvTGVuZ3RoKGVuZCk7CiAgICAgICAgICB3aGlsZSAoc3RhcnQgPCBlbmQpIHsKICAgICAgICAgICAgYXJyYXlbc3RhcnQrK10gPSB2YWx1ZTsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiBhcnJheTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBiYXNlIGltcGxlbWVudGF0aW9uIG9mIGBfLmZpbHRlcmAgd2l0aG91dCBzdXBwb3J0IGZvciBpdGVyYXRlZSBzaG9ydGhhbmRzLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge0FycmF5fE9iamVjd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vbiBuYW1lcy4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBiYXNlRnVuY3Rpb25zKG9iamVjdCwgcHJvcHMpIHsKICAgICAgICAgIHJldHVybiBhcnJheUZpbHRlcihwcm9wcywgZnVuY3Rpb24oa2V5KSB7CiAgICAgICAgICAgIHJldHVybiBpc0Z1bmN0aW9uKG9iamVjdFtrZXldKTsKICAgICAgICAgIH0pOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIGJhc2UgaW1wbGVtZW50YXRpb24gb2YgYF8uZ2V0YCB3aXRob3V0IHN1cHBvcnQgZm9yIGRlZmF1bHQgdmFsdWVzLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBvYmplY3QgdG8gcXVlcnkuCiAgICAgICAgICogQHBhcmFtIHtBcnJheXxzdHJpbmd9IHBhdGggVGhlIHBhdGggb2YgdGhlIHByb3BlcnR5IHRvIGdldC4KICAgICAgICAgKiBAcmV0dXJucyB7Kn0gUmV0dXJucyB0aGUgcmVzb2x2ZWQgdmFsdWUuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gYmFzZUdldChvYmplY3QsIHBhdGgpIHsKICAgICAgICAgIHBhdGggPSBjYXN0UGF0aChwYXRoLCBvYmplY3QpOwoKICAgICAgICAgIHZhciBpbmRleCA9IDAsCiAgICAgICAgICAgICAgbGVuZ3RoID0gcGF0aC5sZW5ndGg7CgogICAgICAgICAgd2hpbGUgKG9iamVjdCAhPSBudWxsICYmIGluZGV4IDwgbGVuZ3RoKSB7CiAgICAgICAgICAgIG9iamVjdCA9IG9iamVjdFt0b0tleShwYXRoW2luZGV4KytdKV07CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gKGluZGV4ICYmIGluZGV4ID09IGxlbmd0aCkgPyBvYmplY3QgOiB1bmRlZmluZWQkMTsKICAgICAgICB9CgogICAgICAgIC8qKgogIC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m1lbnRzLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBxdWVyeS4KICAgICAgICAgKiBAcmV0dXJucyB7c3RyaW5nfSBSZXR1cm5zIHRoZSBgdG9TdHJpbmdUYWdgLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGJhc2VHZXRUYWcodmFsdWUpIHsKICAgICAgICAgIGlmICh2YWx1ZSA9PSBudWxsKSB7CiAgICAgICAgICAgIHJldHVybiB2YWx1ZSA9PT0gdW5kZWZpbmVkJDEgPyB1bmRlZmluZWRUYWcgOiBudWxsVGFnOwogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIChzeW1Ub1N0cmluZ1RhZyAmJiBzeW1Ub1N0cmluZ1RhZyBpbiBPYmplY3QodmFsdWUpKQogICAgICAgICAgICA/IGdldFJhd1RhZyh2YWx1ZSkKICAgICAgICAgICAgOiBvYmplY3RUb1N0cmluZyh2YWx1ZSk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBUaGUgYmFzZSBpbXBsZW1lbnRhdGlvbiBvZiBgXy5ndGAgd2hpY2ggZG9lc24ndCBjb2VyY2UgYXJndW1lbnRzLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBjb21wYXJlLgogICAgICAgICAqIEBwYXJhbSB7Kn0gb3RoZXIgVGhlIG90aGVyIHZhbHVlIHRvIGNvbXBhcmUuCiAgICAgICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIGB2YWx1ZWAgaXMgZ3JlYXRlciB0aGFuIGBvdGhlcmAsCiAgICAgICAgICogIGVsc2UgYGZhbHNlYC4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBiYXNlR3QodmFsdWUsIG90aGVyKSB7CiAgICAgICAgICByZXR1cm4gdmFsdWUgPiBvdGhlcjsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBiYXNlIGltcGxlbWVudGF0aW9uIG9mIGBfLmhhc2Agd2l0aG91dCBzdXBwb3J0IGZvciBkZWVwIHBhdGhzLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gW29iamVjdF0gVGhlIG9iamVjdCB0byBxdWVyeS4KICAgICAgICAgKiBAcGFyYW0ge0FycmF5fHN0cmluZ30ga2V5IFRoZSBrZXkgdG8gY2hlY2suCiAgICAgICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIGBrZXlgIGV4aXN0cywgZWxzZSBgZmFsc2VgLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGJhc2VIYXMob2JqZWN0LCBrZXkpIHsKICAgICAgICAgIHJldHVybiBvYmplY3QgIT0gbnVsbCAmJiBoYXNPd25Qcm9wZXJ0eS5jYWxsKG9iamVjdCwga2V5KTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBiYXNlIGltcGxlbWVudGF0aW9uIG9mIGBfLmhhc0luYCB3aXRob3V0IHN1cHBvcnQgZm9yIGRlZXAgcGF0aHMuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBbb2JqZWN0XSBUaGUgb2JqZWN0IHRvIHF1ZXJ5LgogICAgICAgICAqIEBwYXJhbSB7QXJyYXl8c3RyaW5nfSBrZXkgVGhlIGtleSB0byBjaGVjay4KICAgICAgICAgKiBAcmV0dXJucyB7Ym9vbGVhbn0gUmV0dXJucyBgdHJ1ZWAgaWYgYGtleWAgZXhpc3RzLCBlbHNlIGBmYWxzZWAuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gYmFzZUhhc0luKG9iamVjdCwga2V5KSB7CiAgICAgICAgICByZXR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hcnJheXMgdG8gaW5zcGVjdC4KICAgICAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufSBbaXRlcmF0ZWVdIFRoZSBpdGVyYXRlZSBpbnZva2VkIHBlciBlbGVtZW50LgogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IFtjb21wYXJhdG9yXSBUaGUgY29tcGFyYXRvciBpbnZva2VkIHBlciBlbGVtZW50LgogICAgICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyB0aGUgbmV3IGFycmF5IG9mIHNoYXJlZCB2YWx1ZXMuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gYmFzZUludGVyc2VjdGlvbihhcnJheXMsIGl0ZXJhdGVlLCBjb21wYXJhdG9yKSB7CiAgICAgICAgICB2YXIgaW5jbHVkZXMgPSBjb21wYXJhdG9yID8gYXJyYXlJbmNsdWRlc1dpdGggOiBhcnJheUluY2x1ZGVzLAogICAgICAgICAgICAgIGxlbmd0aCA9IGFycmF5c1swXS5sZW5ndGgsCiAgICAgICAgICAgICAgb3RoTGVuZ3RoID0gYXJyYXlzLmxlbmd0aCwKICAgICAgICAgICAgICBvdGhJbmRleCA9IG90aExlbmd0aCwKICAgICAgICAgICAgICBjYWNoZXMgPSBBcnJheShvdGhMZW5ndGgpLAogICAgICAgICAgICAgIG1heExlbmd0aCA9IEluZmluaXR5LAogICAgICAgICAgICAgIHJlc3VsdCA9IFtdOwoKICAgICAgICAgIHdoaWxlIChvdGhJbmRleC0tKSB7CiAgICAgICAgICAgIHZhciBhcnJheSA9IGFycmF5c1tvdGhJbmRleF07CiAgICAgICAgICAgIGlmIChvdGhJbmRleCAmJiBpdGVyYXRlZSkgewogICAgICAgICAgICAgIGFycmF5ID0gYXJyYXlNYXAoYXJyYXksIGJhc2VVbmFyeShpdGVyYXRlZSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIG1heExlbmd0aCA9IG5hdGl2ZU1pbihhcnJheS5sZW5ndGgsIG1heExlbmd0aCk7CiAgICAgICAgICAgIGNhY2hlc1tvdGhJbmRleF0gPSAhY29tcGFyYXRvciAmJiAoaXRlcmF0ZWUgfHwgKGxlbmd0aCA+PSAxMjAgJiYgYXJyYXkubGVuZ3RoID49IDEyMCkpCiAgICAgICAgICAgICAgPyBuZXcgU2V0Q2FjaGUob3RoSW5kZXggJiYgYXJyYXkpCiAgICAgICAgICAgICAgOiB1bmRlZmluZWQkMTsKICAgICAgICAgIH0KICAgICAgICAgIGFycmF5ID0gYXJyYXlzWzBdOwoKICAgICAgICAgIHZhciBpbmRleCA9IC0xLAogICAgICAgICAgICAgIHNlZW4gPSBjYWNoZXNbMF07CgogICAgICAgICAgb3V0ZXI6CiAgICAgICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCAmJiByZXN1bHQubGVuZ3RoIDwgbWF4TGVuZ3RoKSB7CiAgICAgICAgICAgIHZhciB2YWx1ZSA9IGFycmF5W2luZGV4XSwKICAgICAgICAgICAgICAgIGNvbXB1dGVkID0gaXRlcmF0ZWUgPyBpdGVyYXRlZSh2YWx1ZSkgOiB2YWx1ZTsKCiAgICAgICAgICAgIHZhbHVlID0gKGNvbXBhcmF0b3IgfHwgdmFsdWUgIT09IDApID8gdmFsdWUgOiAwOwogICAgICAgICAgICBpZiAoIShzZWVuCiAgICAgICAgICAgICAgICAgID8gY2FjaGVIYXMoc2VlbiwgY29tcHV0ZWQpCiAgICAgICAgICAgICAgICAgIDogaW5jbHVkZXMocmVzdWx0LCBjb21wdXRlZCwgY29tcGFyYXRvcikKICAgICAgICAgICAgICAgICkpIHsKICAgICAgICAgICAgICBvdGhJbmRleCA9IG90aExlbmd0aDsKICAgICAgICAgICAgICB3aGlsZSAoLS1vdGhJbmRleCkgewogICAgICAgICAgICAgICAgdmFyIGNhY2hlID0gY2FjaGVzW290aEluZGV4XTsKICAgICAgICAgICAgICAgIGlmICghKGNhY2hlCiAgICAgICAgICAgICAgICAgICAgICA/IGNhY2hlSGFzKGNhY2hlLCBjb21wdXRlZCkKICAgICAgICAgICAgICAgICAgICAgIDogaW5jbHVkZXMoYXJyYXlzW290aEluZGV4XSwgY29tcHV0ZWQsIGNvbXBhcmF0b3IpKQogICAgICAgICAgICAgICAgICAgICkgewogICAgICAgICAgICAgICAgICBjb250aW51ZSBvdXRlcjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgaWYgKHNlZW4pIHsKICAgICAgICAgICAgICAgIHNlZW4ucHVzaChjb21wdXRlZCk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIHJlc3VsdC5wdXNoKHZhbHVlKTsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIHJlc3VsdDsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBiYXNlIGltcGxlbWVudGF0aW9uIG9mIGBfLmludmVydGAgYW5kIGBfLmludmVydEJ5YCB3aGljaCBpbnZlcnRzCiAgICAgICAgICogYG9iamVjdGAgd2l0aCB2YWx1ZXMgdHJhbnNmb3JtZWQgYnkgYGl0ZXJhdGVlYCBhbmQgc2V0IGJ5IGBzZXR0ZXJgLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBvYmplY3QgdG8gaXRlcmF0ZSBvdmVyLgogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IHNldHRlciBUaGUgZnVuY3Rpb24gdG8gc2V0IGBhY2N1bXVsYXRvcmAgdmFsdWVzLgogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IGl0ZXJhdGVlIFRoZSBpdGVyYXRlZSB0byB0cmFuc2Zvcm0gdmFsdWVzLgogICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBhY2N1bXVsYXRvciBUaGUgaW5pdGlhbCBpbnZlcnRlZCBvYmplY3QuCiAgICAgICAgICogQHJldHVybnMge0Z1bmN0aW9ufSBSZXR1cm5zIGBhY2N1bXVsYXRvcmAuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gYmFzZUludmVydGVyKG9iamVjdCwgc2V0dGVyLCBpdGVyYXRlZSwgYWNjdW11bGF0b3IpIHsKICAgICAgICAgIGJhc2VGb3JPd24ob2JqZWN0LCBmdW5jdGlvbih2YWx1ZSwga2V5LCBvYmplY3QpIHsKICAgICAgICAgICAgc2V0dGVyKGFjY3VtdWxhdG9yLCBpdGVyYXRlZSh2YWx1ZSksIGtleSwgb2JqZWN0KTsKICAgICAgICAgIH0pOwogICAgICAgICAgcmV0dXJuIGFjY3VtdWxhdG9yOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIGJhc2UgaW1wbGVtZW50YXRpb24gb2YgYF8uaW52b2tlYCB3aXRob3V0IHN1cHBvcnQgZm9yIGluZGl2aWR1YWwKICAgICAgICAgKiBtZXRob2QgYXJndW1lbnRzLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBvYmplY3QgdG8gcXVlcnkuCiAgICAgICAgICogQHBhcmFtIHtBcnJheXxzdHJpbmd9IHBhdGggVGhlIHBhdGggb2YgdGhlIG1ldGhvZCB0byBpbnZva2UuCiAgICAgICAgICogQHBhcmFtIHtBcnJheX0gYXJncyBUaGUgYXJndW1lbnRzIHRvIGludm9rZSB0aGUgbWV0aG9kIHdpdGguCiAgICAgICAgICogQHJldHVybnMgeyp9IFJldHVybnMgdGhlIHJlc3VsdCBvZiB0aGUgaW52b2tlZCBtZXRob2QuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gYmFzZUludm9rZShvYmplY3QsIHBhdGgsIGFyZ3MpIHsKICAgICAgICAgIHBhdGggPSBjYXN0UGF0aChwYXRoLCBvYmplY3QpOwogICAgICAgICAgb2JqZWN0ID0gcGFyZW50KG9iamVjdCwgcGF0aCk7CiAgICAgICAgICB2YXIgZnVuYyA9IG9iamVjdCA9PSBudWxsID8gb2JqZWN0IDogb2JqZWN0W3RvS2V5KGxhc3QocGF0aCkpXTsKICAgICAgICAgIHJldHVybiBmdW5jID09IG51bGwgPyB1bmRlZmluZWQkMSA6IGFwcGx5KGZ1bmMsIG9iamVjdCwgYXJncyk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBUaGUgYmFzZSBpbXBsZW1lbnRhdGlvbiBvZiBgXy5pc0FyZ3VtZW50c2AuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIGNoZWNrLgogICAgICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiBgdmFsdWVgIGlzIGFuIGBhcmd1bWVudHNgIG9iamVjdCwKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBiYXNlSXNBcmd1bWVudHModmFsdWUpIHsKICAgICAgICAgIHJldHVybiBpc09iamVjdExpa2UodmFsdWUpICYmIGJhc2VHZXRUYWcodmFsdWUpID09IGFyZ3NUYWc7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBUaGUgYmFzZSBpbXBsZW1lbnRhdGlvbiBvZiBgXy5pc0FycmF5QnVmZmVyYCB3aXRob3V0IE5vZGUuanMgb3B0aW1pemF0aW9ucy4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gY2hlY2suCiAgICAgICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIGB2YWx1ZWAgaXMgYW4gYXJyYXkgYnVmZmVyLCBlbHNlIGBmYWxzZWAuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gYmFzZUlzQXJyYXlCdWZmZXIodmFsdWUpIHsKICAgICAgICAgIHJldHVybiBpc09iamVjdExpa2UodmFsdWUpICYmIGJhc2VHZXRUYWcodmFsdWUpID09IGFycmF5QnVmZmVyVGFnOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIGJhc2UgaW1wbGVtZW50YXRpb24gb2YgYF8uaXNEYXRlYCB3aXRob3V0IE5vZGUuanMgb3B0aW1pemF0aW9ucy4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gY2hlY2suCiAgICAgICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIGB2YWx1ZWAgaXMgYSBkYXRlIG9iamVjdCwgZWxzZSBgZmFsc2VgLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGJhc2VJc0RhdGUodmFsdWUpIHsKICAgICAgICAgIHJldHVybiBpc09iamVjdExpa2UodmFsdWUpICYmIGJhc2VHZXRUYWcodmFsdWUpID09IGRhdGVUYWc7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBUaGUgYmFzZSBpbXBsZW1lbnRhdGlvbiBvZiBgXy5pc0VxdWFsYCB3aGljaCBzdXBwb3J0cyBwYXJ0aWFsIGNvbXBhcmlzb25zCiAgICAgICAgICogYW5kIHRyYWNrcyB0cmF2ZXJzZWQgb2JqZWN0cy4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gY29tcGFyZS4KICAgICAgICAgKiBAcGFyYW0geyp9IG90aGVyIFRoZSBvdGhlciB2YWx1ZSB0byBjb21wYXJlLgogICAgICAgICAqIEBwYXJhbSB7Ym9vbGVhbn0gYml0bWFzayBUaGUgYml0bWFzayBmbGFncy4KICAgICAgICAgKiAgMSAtIFVub3JkZXJlZCBjb21wYXJpc29uCiAgICAgICAgICogIDIgLSBQYXJ0aWFsIGNvbXB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AgICAgICAgb2JqVGFnID0gb2JqSXNBcnIgPyBhcnJheVRhZyA6IGdldFRhZyhvYmplY3QpLAogICAgICAgICAgICAgIG90aFRhZyA9IG90aElzQXJyID8gYXJyYXlUYWcgOiBnZXRUYWcob3RoZXIpOwoKICAgICAgICAgIG9ialRhZyA9IG9ialRhZyA9PSBhcmdzVGFnID8gb2JqZWN0VGFnIDogb2JqVGFnOwogICAgICAgICAgb3RoVGFnID0gb3RoVGFnID09IGFyZ3NUYWcgPyBvYmplY3RUYWcgOiBvdGhUYWc7CgogICAgICAgICAgdmFyIG9iaklzT2JqID0gb2JqVGFnID09IG9iamVjdFRhZywKICAgICAgICAgICAgICBvdGhJc09iaiA9IG90aFRhZyA9PSBvYmplY3RUYWcsCiAgICAgICAgICAgICAgaXNTYW1lVGFnID0gb2JqVGFnID09IG90aFRhZzsKCiAgICAgICAgICBpZiAoaXNTYW1lVGFnICYmIGlzQnVmZmVyKG9iamVjdCkpIHsKICAgICAgICAgICAgaWYgKCFpc0J1ZmZlcihvdGhlcikpIHsKICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgb2JqSXNBcnIgPSB0cnVlOwogICAgICAgICAgICBvYmpJc09iaiA9IGZhbHNlOwogICAgICAgICAgfQogICAgICAgICAgaWYgKGlzU2FtZVRhZyAmJiAhb2JqSXNPYmopIHsKICAgICAgICAgICAgc3RhY2sgfHwgKHN0YWNrID0gbmV3IFN0YWNrKTsKICAgICAgICAgICAgcmV0dXJuIChvYmpJc0FyciB8fCBpc1R5cGVkQXJyYXkob2JqZWN0KSkKICAgICAgICAgICAgICA/IGVxdWFsQXJyYXlzKG9iamVjdCwgb3RoZXIsIGJpdG1hc2ssIGN1c3RvbWl6ZXIsIGVxdWFsRnVuYywgc3RhY2spCiAgICAgICAgICAgICAgOiBlcXVhbEJ5VGFnKG9iamVjdCwgb3RoZXIsIG9ialRhZywgYml0bWFzaywgY3VzdG9taXplciwgZXF1YWxGdW5jLCBzdGFjayk7CiAgICAgICAgICB9CiAgICAgICAgICBpZiAoIShiaXRtYXNrICYgQ09NUEFSRV9QQVJUSUFMX0ZMQUcpKSB7CiAgICAgICAgICAgIHZhciBvYmpJc1dyYXBwZWQgPSBvYmpJc09iaiAmJiBoYXNPd25Qcm9wZXJ0eS5jYWxsKG9iamVjdCwgJ19fd3JhcHBlZF9fJyksCiAgICAgICAgICAgICAgICBvdGhJc1dyYXBwZWQgPSBvdGhJc09iaiAmJiBoYXNPd25Qcm9wZXJ0eS5jYWxsKG90aGVyLCAnX193cmFwcGVkX18nKTsKCiAgICAgICAgICAgIGlmIChvYmpJc1dyYXBwZWQgfHwgb3RoSXNXcmFwcGVkKSB7CiAgICAgICAgICAgICAgdmFyIG9ialVud3JhcHBlZCA9IG9iaklzV3JhcHBlZCA/IG9iamVjdC52YWx1ZSgpIDogb2JqZWN0LAogICAgICAgICAgICAgICAgICBvdGhVbndyYXBwZWQgPSBvdGhJc1dyYXBwZWQgPyBvdGhlci52YWx1ZSgpIDogb3RoZXI7CgogICAgICAgICAgICAgIHN0YWNrIHx8IChzdGFjayA9IG5ldyBTdGFjayk7CiAgICAgICAgICAgICAgcmV0dXJuIGVxdWFsRnVuYyhvYmpVbndyYXBwZWQsIG90aFVud3JhcHBlZCwgYml0bWFzaywgY3VzdG9taXplciwgc3RhY2spOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICBpZiAoIWlzU2FtZVRhZykgewogICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICB9CiAgICAgICAgICBzdGFjayB8fCAoc3RhY2sgPSBuZXcgU3RhY2spOwogICAgICAgICAgcmV0dXJuIGVxdWFsT2JqZWN0cyhvYmplY3QsIG90aGVyLCBiaXRtYXNrLCBjdXN0b21pemVyLCBlcXVhbEZ1bmMsIHN0YWNrKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBiYXNlIGltcGxlbWVudGF0aW9uIG9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NlYC4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBiYXNlSXNNYXRjaChvYmplY3QsIHNvdXJjZSwgbWF0Y2hEYXRhLCBjdXN0b21pemVyKSB7CiAgICAgICAgICB2YXIgaW5kZXggPSBtYXRjaERhdGEubGVuZ3RoLAogICAgICAgICAgICAgIGxlbmd0aCA9IGluZGV4LAogICAgICAgICAgICAgIG5vQ3VzdG9taXplciA9ICFjdXN0b21pemVyOwoKICAgICAgICAgIGlmIChvYmplY3QgPT0gbnVsbCkgewogICAgICAgICAgICByZXR1cm4gIWxlbmd0aDsKICAgICAgICAgIH0KICAgICAgICAgIG9iamVjdCA9IE9iamVjdChvYmplY3QpOwogICAgICAgICAgd2hpbGUgKGluZGV4LS0pIHsKICAgICAgICAgICAgdmFyIGRhdGEgPSBtYXRjaERhdGFbaW5kZXhdOwogICAgICAgICAgICBpZiAoKG5vQ3VzdG9taXplciAmJiBkYXRhWzJdKQogICAgICAgICAgICAgICAgICA/IGRhdGFbMV0gIT09IG9iamVjdFtkYXRhWzBdXQogICAgICAgICAgICAgICAgICA6ICEoZGF0YVswXSBpbiBvYmplY3QpCiAgICAgICAgICAgICAgICApIHsKICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICAgIHdoaWxlICgrK2luZGV4IDwgbGVuZ3RoKSB7CiAgICAgICAgICAgIGRhdGEgPSBtYXRjaERhdGFbaW5kZXhdOwogICAgICAgICAgICB2YXIga2V5ID0gZGF0YVswXSwKICAgICAgICAgICAgICAgIG9ialZhbHVlID0gb2JqZWN0W2tleV0sCiAgICAgICAgICAgICAgICBzcmNWYWx1ZSA9IGRhdGFbMV07CgogICAgICAgICAgICBpZiAobm9DdXN0b21pemVyICYmIGRhdGFbMl0pIHsKICAgICAgICAgICAgICBpZiAob2JqVmFsdWUgPT09IHVuZGVmaW5lZCQxICYmICEoa2V5IGluIG9iamVjdCkpIHsKICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgdmFyIHN0YWNrID0gbmV3IFN0YWNrOwogICAgICAgICAgICAgIGlmIChjdXN0b21pemVyKSB7CiAgICAgICAgICAgICAgICB2YXIgcmVzdWx0ID0gY3VzdG9taXplcihvYmpWYWx1ZSwgc3JjVmFsdWUsIGtleSwgb2JqZWN0LCBzb3VyY2UsIHN0YWNrKTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgaWYgKCEocmVzdWx0ID09PSB1bmRlZmluZWQkMQogICAgICAgICAgICAgICAgICAgID8gYmFzZUlzRXF1YWwoc3JjVmFsdWUsIG9ialZhbHVlLCBDT01QQVJFX1BBUlRJQUxfRkxBRyB8IENPTVBBUkVfVU5PUkRFUkVEX0ZMQUcsIGN1c3RvbWl6ZXIsIHN0YWNrKQogICAgICAgICAgICAgICAgICAgIDogcmVzdWx0CiAgICAgICAgICAgICAgICAgICkpIHsKICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIGJhc2UgaW1wbGVtZW50YXRpb24gb2YgYF8uaXNOYXRpdmVgIHdpdGhvdXQgYmFkIHNoaW0gY2hlY2tzLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBjaGVjay4KICAgICAgICAgKiBAcmV0dXJucyB7Ym9vbGVhbn0gUmV0dXJucyBgdHJ1ZWAgaWYgYHZhbHVlYCBpcyBhIG5hdGl2ZSBmdW5jdGlvbiwKICAgICAgICAgKiAgZWxzZSBgZmFsc2VgLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGJhc2VJc05hdGl2ZSh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5IG9mIHByb3BlcnR5IG5hbWVzLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGJhc2VLZXlzKG9iamVjdCkgewogICAgICAgICAgaWYgKCFpc1Byb3RvdHlwZShvYmplY3QpKSB7CiAgICAgICAgICAgIHJldHVybiBuYXRpdmVLZXlzKG9iamVjdCk7CiAgICAgICAgICB9CiAgICAgICAgICB2YXIgcmVzdWx0ID0gW107CiAgICAgICAgICBmb3IgKHZhciBrZXkgaW4gT2JqZWN0KG9iamVjdCkpIHsKICAgICAgICAgICAgaWYgKGhhc093blByb3BlcnR5LmNhbGwob2JqZWN0LCBrZXkpICYmIGtleSAhPSAnY29uc3RydWN0b3InKSB7CiAgICAgICAgICAgICAgcmVzdWx0LnB1c2goa2V5KTsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIHJlc3VsdDsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBiYXNlIGltcGxlbWVudGF0aW9uIG9mIGBfLmtleXNJbmAgd2hpY2ggZG9lc24ndCB0cmVhdCBzcGFyc2UgYXJyYXlzIGFzIGRlbnNlLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBvYmplY3QgdG8gcXVlcnkuCiAgICAgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBhcnJheSBvZiBwcm9wZXJ0eSBuYW1lcy4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBiYXNlS2V5c0luKG9iamVjdCkgewogICAgICAgICAgaWYgKCFpc09iamVjdChvYmplY3QpKSB7CiAgICAgICAgICAgIHJldHVybiBuYXRpdmVLZXlzSW4ob2JqZWN0KTsKICAgICAgICAgIH0KICAgICAgICAgIHZhciBpc1Byb3RvID0gaXNQcm90b3R5cGUob2JqZWN0KSwKICAgICAgICAgICAgICByZXN1bHQgPSBbXTsKCiAgICAgICAgIC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lvbihvYmplY3QpIHsKICAgICAgICAgICAgdmFyIG9ialZhbHVlID0gZ2V0KG9iamVjdCwgcGF0aCk7CiAgICAgICAgICAgIHJldHVybiAob2JqVmFsdWUgPT09IHVuZGVmaW5lZCQxICYmIG9ialZhbHVlID09PSBzcmNWYWx1ZSkKICAgICAgICAgICAgICA/IGhhc0luKG9iamVjdCwgcGF0aCkKICAgICAgICAgICAgICA6IGJhc2VJc0VxdWFsKHNyY1ZhbHVlLCBvYmpWYWx1ZSwgQ09NUEFSRV9QQVJUSUFMX0ZMQUcgfCBDT01QQVJFX1VOT1JERVJFRF9GTEFHKTsKICAgICAgICAgIH07CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBUaGUgYmFzZSBpbXBsZW1lbnRhdGlvbiBvZiBgXy5tZXJnZWAgd2l0aG91dCBzdXBwb3J0IGZvciBtdWx0aXBsZSBzb3VyY2VzLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBkZXN0aW5hdGlvbiBvYmplY3QuCiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IHNvdXJjZSBUaGUgc291cmNlIG9iamVjdC4KICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gc3JjSW5kZXggVGhlIGluZGV4IG9mIGBzb3VyY2VgLgogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IFtjdXN0b21pemVyXSBUaGUgZnVuY3Rpb24gdG8gY3VzdG9taXplIG1lcmdlZCB2YWx1ZXMuCiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IFtzdGFja10gVHJhY2tzIHRyYXZlcnNlZCBzb3VyY2UgdmFsdWVzIGFuZCB0aGVpciBtZXJnZWQKICAgICAgICAgKiAgY291bnRlcnBhcnRzLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGJhc2VNZXJnZShvYmplY3QsIHNvdXJjZSwgc3JjSW5kZXgsIGN1c3RvbWl6ZXIsIHN0YWNrKSB7CiAgICAgICAgICBpZiAob2JqZWN0ID09PSBzb3VyY2UpIHsKICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgfQogICAgICAgICAgYmFzZUZvcihzb3VyY2UsIGZ1bmN0aW9uKHNyY1ZhbHVlLCBrZXkpIHsKICAgICAgICAgICAgc3RhY2sgfHwgKHN0YWNrID0gbmV3IFN0YWNrKTsKICAgICAgICAgICAgaWYgKGlzT2JqZWN0KHNyY1ZhbHVlKSkgewogICAgICAgICAgICAgIGJhc2VNZXJnZURlZXAob2JqZWN0LCBzb3VyY2UsIGtleSwgc3JjSW5kZXgsIGJhc2VNZXJnZSwgY3VzdG9taXplciwgc3RhY2spOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgIHZhciBuZXdWYWx1ZSA9IGN1c3RvbWl6ZXIKICAgICAgICAgICAgICAgID8gY3VzdG9taXplcihzYWZlR2V0KG9iamVjdCwga2V5KSwgc3JjVmFsdWUsIChrZXkgKyAnJyksIG9iamVjdCwgc291cmNlLCBzdGFjaykKICAgICAgICAgICAgICAgIDogdW5kZWZpbmVkJDE7CgogICAgICAgICAgICAgIGlmIChuZXdWYWx1ZSA9PT0gdW5kZWZpbmVkJDEpIHsKICAgICAgICAgICAgICAgIG5ld1ZhbHVlID0gc3JjVmFsdWU7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIGFzc2lnbk1lcmdlVmFsdWUob2JqZWN0LCBrZXksIG5ld1ZhbHVlKTsKICAgICAgICAgICAgfQogICAgICAgICAgfSwga2V5c0luKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIEEgc3BlY2lhbGl6ZWQgdmVyc2lvbiBvZiBgYmFzZU1lcmdlYCBmb3IgYXJyYXlzIGFuZCBvYmplY3RzIHdoaWNoIHBlcmZvcm1zCiAgICAgICAgICogZGVlcCBtZXJnZXMgYW5kIHRyYWNrcyB0cmF2ZXJzZWQgb2JqZWN0cyBlbmFibGluZyBvYmplY3RzIHdpdGggY2lyY3VsYXIKICAgICAgICAgKiByZWZlcmVuY2VzIHRvIGJlIG1lcmdlZC4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IG9iamVjdCBUaGUgZGVzdGluYXRpb24gb2JqZWN0LgogICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBzb3VyY2UgVGhlIHNvdXJjZSBvYmplY3QuCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IGtleSBUaGUga2V5IG9mIHRoZSB2YWx1ZSB0byBtZXJnZS4KICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gc3JjSW5kZXggVGhlIGluZGV4IG9mIGBzb3VyY2VgLgogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IG1lcmdlRnVuYyBUaGUgZnVuY3Rpb24gdG8gbWVyZ2UgdmFsdWVzLgogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IFtjdXN0b21pemVyXSBUaGUgZnVuY3Rpb24gdG8gY3VzdG9taXplIGFzc2lnbmVkIHZhbHVlcy4KICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gW3N0YWNrXSBUcmFja3MgdHJhdmVyc2VkIHNvdXJjZSB2YWx1ZXMgYW5kIHRoZWlyIG1lcmdlZAogICAgICAgICAqICBjb3VudGVycGFydHMuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gYmFzZU1lcmdlRGVlcChvYmplY3QsIHNvdXJjZSwga2V5LCBzcmNJbmRleCwgbWVyZ2VGdW5jLCBjdXN0b21pemVyLCBzdGFjaykgewogICAgICAgICAgdmFyIG9ialZhbHVlID0gc2FmZUdldChvYmplY3QsIGtleSksCiAgICAgICAgICAgICAgc3JjVmFsdWUgPSBzYWZlR2V0KHNvdXJjZSwga2V5KSwKICAgICAgICAgICAgICBzdGFja2VkID0gc3RhY2suZ2V0KHNyY1ZhbHVlKTsKCiAgICAgICAgICBpZiAoc3RhY2tlZCkgewogICAgICAgICAgICBhc3NpZ25NZXJnZVZhbHVlKG9iamVjdCwga2V5LCBzdGFja2VkKTsKICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgfQogICAgICAgICAgdmFyIG5ld1ZhbHVlID0gY3VzdG9taXplcgogICAgICAgICAgICA/IGN1c3RvbWl6ZXIob2JqVmFsdWUsIHNyY1ZhbHVlLCAoa2V5ICsgJycpLCBvYmplY3QsIHNvdXJjZSwgc3RhY2spCiAgICAgICAgICAgIDogdW5kZWZpbmVkJDE7CgogICAgICAgICAgdmFyIGlzQ29tbW9uID0gbmV3VmFsdWUgPT09IHVuZGVmaW5lZCQxOwoKICAgICAgICAgIGlmIChpc0NvbW1vbikgewogICAgICAgICAgICB2YXIgaXNBcnIgPSBpc0FycmF5KHNyY1ZhbHVlKSwKICAgICAgICAgICAgICAgIGlzQnVmZiA9ICFpc0FyciAmJiBpc0J1ZmZlcihzcmNWYWx1ZSksCiAgICAgICAgICAgICAgICBpc1R5cGVkID0gIWlzQXJyICYmICFpc0J1ZmYgJiYgaXNUeXBlZEFycmF5KHNyY1ZhbHVlKTsKCiAgICAgICAgICAgIG5ld1ZhbHVlID0gc3JjVmFsdWU7CiAgICAgICAgICAgIGlmIChpc0FyciB8fCBpc0J1ZmYgfHwgaXNUeXBlZCkgewogICAgICAgICAgICAgIGlmIChpc0FycmF5KG9ialZhbHVlKSkgewogICAgICAgICAgICAgICAgbmV3VmFsdWUgPSBvYmpWYWx1ZTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgZWxzZSBpZiAoaXNBcnJheUxpa2VPYmplY3Qob2JqVmFsdWUpKSB7CiAgICAgICAgICAgICAgICBuZXdWYWx1ZSA9IGNvcHlBcnJheShvYmpWYWx1ZSk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIGVsc2UgaWYgKGlzQnVmZikgewogICAgICAgICAgICAgICAgaXNDb21tb24gPSBmYWxzZTsKICAgICAgICAgICAgICAgIG5ld1ZhbHVlID0gY2xvbmVCdWZmZXIoc3JjVmFsdWUsIHRydWUpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBlbHNlIGlmIChpc1R5cGVkKSB7CiAgICAgICAgICAgICAgICBpc0NvbW1vbiA9IGZhbHNlOwogICAgICAgICAgICAgICAgbmV3VmFsdWUgPSBjbG9uZVR5cGVkQXJyYXkoc3JjVmFsdWUsIHRydWUpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIG5ld1ZhbHVlID0gW107CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKGlzUGxhaW5PYmplY3Qoc3JjVmFsdWUpIHx8IGlzQXJndW1lbnRzKHNyY1ZhbHVlKSkgewogICAgICAgICAgICAgIG5ld1ZhbHVlID0gb2JqVmFsdWU7CiAgICAgICAgICAgICAgaWYgKGlzQXJndW1lbnRzKG9ialZhbHVlKSkgewogICAgICAgICAgICAgICAgbmV3VmFsdWUgPSB0b1BsYWluT2JqZWN0KG9ialZhbHVlKTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgZWxzZSBpZiAoIWlzT2JqZWN0KG9ialZhbHVlKSB8fCBpc0Z1bmN0aW9uKG9ialZhbHVlKSkgewogICAgICAgICAgICAgICAgbmV3VmFsdWUgPSBpbml0Q2xvbmVPYmplY3Qoc3JjVmFsdWUpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICBpc0NvbW1vbiA9IGZhbHNlOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICBpZiAoaXNDb21tb24pIHsKICAgICAgICAgICAgLy8gUmVjdXJzaXZlbHkgbWVyZ2Ugb2JqZWN0cyBhbmQgYXJyYXlzIChzdXNjZXB0aWJsZSB0byBjYWxsIHN0YWNrIGxpbWl0cykuCiAgICAgICAgICAgIHN0YWNrLnNldChzcmNWYWx1ZSwgbmV3VmFsdWUpOwogICAgICAgICAgICBtZXJnZUZ1bmMobmV3VmFsdWUsIHNyY1ZhbHVlLCBzcmNJbmRleCwgY3VzdG9taXplciwgc3RhY2spOwogICAgICAgICAgICBzdGFja1snZGVsZXRlJ10oc3JjVmFsdWUpOwogICAgICAgICAgfQogICAgICAgICAgYXNzaWduTWVyZ2VWYWx1ZShvYmplY3QsIGtleSwgbmV3VmFsdWUpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIGJhc2UgaW1wbGVtZW50YXRpb24gb2YgYF8ubnRoYCB3aGljaCBkb2Vzbid0IGNvZXJjZSBhcmd1bWVudHMuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7QXJyYXl9IGFycmF5IFRoZSBhcnJheSB0byBxdWVyeS4KICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gbiBUaGUgaW5kZXggb2YgdGhlIGVsZW1lbnQgdG8gcmV0dXJuLgogICAgICAgICAqIEByZXR1cm5zIHsqfSBSZXR1cm5zIHRoZSBudGggZWxlbWVudCBvZiBgYXJyYXlgLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGJhc2VOdGgoYXJyYXksIG4pIHsKICAgICAgICAgIHZhciBsZW5ndGggPSBhcnJheS5sZW5ndGg7CiAgICAgICAgICBpZiAoIWxlbmd0aCkgewogICAgICAgICAgICByZXR1cm47CiAgICAgICAgICB9CiAgICAgICAgICBuICs9IG4gPCAwID8gbGVuZ3RoIDogMDsKICAgICAgICAgIHJldHVybiBpc0luZGV4KG4sIGxlbmd0aCkgPyBhcnJheVtuXSA6IHVuZGVmaW5lZCQxOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIGJhc2UgaW1wbGVtZW50YXRpb24gb2YgYF8ub3JkZXJCeWAgd2l0aG91dCBwYXJhbSBndWFyZHMuCiAgICAgICAgICoK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VzID0gYXJyYXlNYXAoaXRlcmF0ZWVzLCBiYXNlVW5hcnkoZ2V0SXRlcmF0ZWUoKSkpOwoKICAgICAgICAgIHZhciByZXN1bHQgPSBiYXNlTWFwKGNvbGxlY3Rpb24sIGZ1bmN0aW9uKHZhbHVlLCBrZXksIGNvbGxlY3Rpb24pIHsKICAgICAgICAgICAgdmFyIGNyaXRlcmlhID0gYXJyYXlNYXAoaXRlcmF0ZWVzLCBmdW5jdGlvbihpdGVyYXRlZSkgewogICAgICAgICAgICAgIHJldHVybiBpdGVyYXRlZSh2YWx1ZSk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICByZXR1cm4geyAnY3JpdGVyaWEnOiBjcml0ZXJpYSwgJ2luZGV4JzogKytpbmRleCwgJ3ZhbHVlJzogdmFsdWUgfTsKICAgICAgICAgIH0pOwoKICAgICAgICAgIHJldHVybiBiYXNlU29ydEJ5KHJlc3VsdCwgZnVuY3Rpb24ob2JqZWN0LCBvdGhlcikgewogICAgICAgICAgICByZXR1cm4gY29tcGFyZU11bHRpcGxlKG9iamVjdCwgb3RoZXIsIG9yZGVycyk7CiAgICAgICAgICB9KTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBiYXNlIGltcGxlbWVudGF0aW9uIG9mIGBfLnBpY2tgIHdpdGhvdXQgc3VwcG9ydCBmb3IgaW5kaXZpZHVhbAogICAgICAgICAqIHByb3BlcnR5IGlkZW50aWZpZXJzLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBzb3VyY2Ugb2JqZWN0LgogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nW119IHBhdGhzIFRoZSBwcm9wZXJ0eSBwYXRocyB0byBwaWNrLgogICAgICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgdGhlIG5ldyBvYmplY3QuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gYmFzZVBpY2sob2JqZWN0LCBwYXRocykgewogICAgICAgICAgcmV0dXJuIGJhc2VQaWNrQnkob2JqZWN0LCBwYXRocywgZnVuY3Rpb24odmFsdWUsIHBhdGgpIHsKICAgICAgICAgICAgcmV0dXJuIGhhc0luKG9iamVjdCwgcGF0aCk7CiAgICAgICAgICB9KTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBiYXNlIGltcGxlbWVudGF0aW9uIG9mICBgXy5waWNrQnlgIHdpdGhvdXQgc3VwcG9ydCBmb3IgaXRlcmF0ZWUgc2hvcnRoYW5kcy4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IG9iamVjdCBUaGUgc291cmNlIG9iamVjdC4KICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ1tdfSBwYXRocyBUaGUgcHJvcGVydHkgcGF0aHMgdG8gcGljay4KICAgICAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufSBwcmVkaWNhdGUgVGhlIGZ1bmN0aW9uIGludm9rZWQgcGVyIHByb3BlcnR5LgogICAgICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgdGhlIG5ldyBvYmplY3QuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gYmFzZVBpY2tCeShvYmplY3QsIHBhdGhzLCBwcmVkaWNhdGUpIHsKICAgICAgICAgIHZhciBpbmRleCA9IC0xLAogICAgICAgICAgICAgIGxlbmd0aCA9IHBhdGhzLmxlbmd0aCwKICAgICAgICAgICAgICByZXN1bHQgPSB7fTsKCiAgICAgICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkgewogICAgICAgICAgICB2YXIgcGF0aCA9IHBhdGhzW2luZGV4XSwKICAgICAgICAgICAgICAgIHZhbHVlID0gYmFzZUdldChvYmplY3QsIHBhdGgpOwoKICAgICAgICAgICAgaWYgKHByZWRpY2F0ZSh2YWx1ZSwgcGF0aCkpIHsK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ZWUgaW52b2tlZCBwZXIgZWxlbWVudC4KICAgICAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufSBbY29tcGFyYXRvcl0gVGhlIGNvbXBhcmF0b3IgaW52b2tlZCBwZXIgZWxlbWVudC4KICAgICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgYGFycmF5YC4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBiYXNlUHVsbEFsbChhcnJheSwgdmFsdWVzLCBpdGVyYXRlZSwgY29tcGFyYXRvcikgewogICAgICAgICAgdmFyIGluZGV4T2YgPSBjb21wYXJhdG9yID8gYmFzZUluZGV4T2ZXaXRoIDogYmFzZUluZGV4T2YsCiAgICAgICAgICAgICAgaW5kZXggPSAtMSwKICAgICAgICAgICAgICBsZW5ndGggPSB2YWx1ZXMubGVuZ3RoLAogICAgICAgICAgICAgIHNlZW4gPSBhcnJheTsKCiAgICAgICAgICBpZiAoYXJyYXkgPT09IHZhbHVlcykgewogICAgICAgICAgICB2YWx1ZXMgPSBjb3B5QXJyYXkodmFsdWVzKTsKICAgICAgICAgIH0KICAgICAgICAgIGlmIChpdGVyYXRlZSkgewogICAgICAgICAgICBzZWVuID0gYXJyYXlNYXAoYXJyYXksIGJhc2VVbmFyeShpdGVyYXRlZSkpOwogICAgICAgICAgfQogICAgICAgICAgd2hpbGUgKCsraW5kZXggPCBsZW5ndGgpIHsKICAgICAgICAgICAgdmFyIGZyb21JbmRleCA9IDAsCiAgICAgICAgICAgICAgICB2YWx1ZSA9IHZhbHVlc1tpbmRleF0sCiAgICAgICAgICAgICAgICBjb21wdXRlZCA9IGl0ZXJhdGVlID8gaXRlcmF0ZWUodmFsdWUpIDogdmFsdWU7CgogICAgICAgICAgICB3aGlsZSAoKGZyb21JbmRleCA9IGluZGV4T2Yoc2VlbiwgY29tcHV0ZWQsIGZyb21JbmRleCwgY29tcGFyYXRvcikpID4gLTEpIHsKICAgICAgICAgICAgICBpZiAoc2VlbiAhPT0gYXJyYXkpIHsKICAgICAgICAgICAgICAgIHNwbGljZS5jYWxsKHNlZW4sIGZyb21JbmRleCwgMSk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIHNwbGljZS5jYWxsKGFycmF5LCBmcm9tSW5kZXgsIDEpOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gYXJyYXk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBUaGUgYmFzZSBpbXBsZW1lbnRhdGlvbiBvZiBgXy5wdWxsQXRgIHdpdGhvdXQgc3VwcG9ydCBmb3IgaW5kaXZpZHVhbAogICAgICAgICAqIGluZGV4ZXMgb3IgY2FwdHVyaW5nIHRoZSByZW1vdmVkIGVsZW1lbnRzLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge0FycmF5fSBhcnJheSBUaGUgYXJyYXkgdG8gbW9kaWZ5LgogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyW119IGluZGV4ZXMgVGhlIGluZGV4ZXMgb2YgZWxlbWVudHMgdG8gcmVtb3ZlLgogICAgICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyBgYXJyYXlgLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGJhc2VQdWxsQXQoYXJyYXksIGluZGV4ZXMpIHsKICAgICAgICAgIHZhciBsZW5ndGggPSBhcnJheSA/IGluZGV4ZXMubGVuZ3RoIDogMCwKICAgICAgICAgICAgICBsYXN0SW5kZXggPSBsZW5ndGggLSAxOwoKICAgICAgICAgIHdoaWxlIChsZW5ndGgtLSkgewogICAgICAgICAgICB2YXIgaW5kZXggPSBpbmRleGVzW2xlbmd0aF07CiAgICAgICAgICAgIGlmIChsZW5ndGggPT0gbGFzdEluZGV4IHx8IGluZGV4ICE9PSBwcmV2aW91cykgewogICAgICAgICAgICAgIHZhciBwcmV2aW91cyA9IGluZGV4OwogICAgICAgICAgICAgIGlmIChpc0luZGV4KGluZGV4KSkgewogICAgICAgICAgICAgICAgc3BsaWNlLmNhbGwoYXJyYXksIGluZGV4LCAxKTsKICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgYmFzZVVuc2V0KGFycmF5LCBpbmRleCk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gYXJyYXk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBUaGUgYmFzZSBpbXBsZW1lbnRhdGlvbiBvZiBgXy5yYW5kb21gIHdpdGhvdXQgc3VwcG9ydCBmb3IgcmV0dXJuaW5nCiAgICAgICAgICogZmxvYXRpbmctcG9pbnQgbnVtYmVycy4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IGxvd2VyIFRoZSBsb3dlciBib3VuZC4KICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gdXBwZXIgVGhlIHVwcGVyIGJvdW5kLgogICAgICAgICAqIEByZXR1cm5zIHtudW1iZXJ9IFJldHVybnMgdGhlIHJhbmRvbSBudW1iZXIuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gYmFzZVJhbmRvbShsb3dlciwgdXBwZXIpIHsKICAgICAgICAgIHJldHVybiBsb3dlciArIG5hdGl2ZUZsb29yKG5hdGl2ZVJhbmRvbSgpICogKHVwcGVyIC0gbG93ZXIgKyAxKSk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBUaGUgYmFzZSBpbXBsZW1lbnRhdGlvbiBvZiBgXy5yYW5nZWAgYW5kIGBfLnJhbmdlUmlnaHRgIHdoaWNoIGRvZXNuJ3QKICAgICAgICAgKiBjb2VyY2UgYXJndW1lbnRzLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gc3RhcnQgVGhlIHN0YXJ0IG9mIHRoZSByYW5n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ge251bWJlcn0gbiBUaGUgbnVtYmVyIG9mIHRpbWVzIHRvIHJlcGVhdCB0aGUgc3RyaW5nLgogICAgICAgICAqIEByZXR1cm5zIHtzdHJpbmd9IFJldHVybnMgdGhlIHJlcGVhdGVkIHN0cmluZy4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBiYXNlUmVwZWF0KHN0cmluZywgbikgewogICAgICAgICAgdmFyIHJlc3VsdCA9ICcnOwogICAgICAgICAgaWYgKCFzdHJpbmcgfHwgbiA8IDEgfHwgbiA+IE1BWF9TQUZFX0lOVEVHRVIpIHsKICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDsKICAgICAgICAgIH0KICAgICAgICAgIC8vIExldmVyYWdlIHRoZSBleHBvbmVudGlhdGlvbiBieSBzcXVhcmluZyBhbGdvcml0aG0gZm9yIGEgZmFzdGVyIHJlcGVhdC4KICAgICAgICAgIC8vIFNlZSBodHRwczovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9FeHBvbmVudGlhdGlvbl9ieV9zcXVhcmluZyBmb3IgbW9yZSBkZXRhaWxzLgogICAgICAgICAgZG8gewogICAgICAgICAgICBpZiAobiAlIDIpIHsKICAgICAgICAgICAgICByZXN1bHQgKz0gc3RyaW5nOwogICAgICAgICAgICB9CiAgICAgICAgICAgIG4gPSBuYXRpdmVGbG9vcihuIC8gMik7CiAgICAgICAgICAgIGlmIChuKSB7CiAgICAgICAgICAgICAgc3RyaW5nICs9IHN0cmluZzsKICAgICAgICAgICAgfQogICAgICAgICAgfSB3aGlsZSAobik7CgogICAgICAgICAgcmV0dXJuIHJlc3VsdDsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBiYXNlIGltcGxlbWVudGF0aW9uIG9mIGBfLnJlc3RgIHdoaWNoIGRvZXNuJ3QgdmFsaWRhdGUgb3IgY29lcmNlIGFyZ3VtZW50cy4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtI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iBvYmplY3Q7CiAgICAgICAgICB9CiAgICAgICAgICBwYXRoID0gY2FzdFBhdGgocGF0aCwgb2JqZWN0KTsKCiAgICAgICAgICB2YXIgaW5kZXggPSAtMSwKICAgICAgICAgICAgICBsZW5ndGggPSBwYXRoLmxlbmd0aCwKICAgICAgICAgICAgICBsYXN0SW5kZXggPSBsZW5ndGggLSAxLAogICAgICAgICAgICAgIG5lc3RlZCA9IG9iamVjdDsKCiAgICAgICAgICB3aGlsZSAobmVzdGVkICE9IG51bGwgJiYgKytpbmRleCA8IGxlbmd0aCkgewogICAgICAgICAgICB2YXIga2V5ID0gdG9LZXkocGF0aFtpbmRleF0pLAogICAgICAgICAgICAgICAgbmV3VmFsdWUgPSB2YWx1ZTsKCiAgICAgICAgICAgIGlmIChrZXkgPT09ICdfX3Byb3RvX18nIHx8IGtleSA9PT0gJ2NvbnN0cnVjdG9yJyB8fCBrZXkgPT09ICdwcm90b3R5cGUnKSB7CiAgICAgICAgICAgICAgcmV0dXJuIG9iamVjdDsKICAgICAgICAgICAgfQoKICAgICAgICAgICAgaWYgKGluZGV4ICE9IGxhc3RJbmRleCkgewogICAgICAgICAgICAgIHZhciBvYmpWYWx1ZSA9IG5lc3RlZFtrZXldOwogICAgICAgICAgICAgIG5ld1ZhbHVlID0gY3VzdG9taXplciA/IGN1c3RvbWl6ZXIob2JqVmFsdWUsIGtleSwgbmVzdGVkKSA6IHVuZGVmaW5lZCQxOwogICAgICAgICAgICAgIGlmIChuZXdWYWx1ZSA9PT0gdW5kZWZpbmVkJDEpIHsKICAgICAgICAgICAgICAgIG5ld1ZhbHVlID0gaXNPYmplY3Qob2JqVmFsdWUpCiAgICAgICAgICAgICAgICAgID8gb2JqVmFsdWUKICAgICAgICAgICAgICAgICAgOiAoaXNJbmRleChwYXRoW2luZGV4ICsgMV0pID8gW10gOiB7fSk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGFzc2lnblZhbHVlKG5lc3RlZCwga2V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gICAgICAqLwogICAgICAgIHZhciBiYXNlU2V0VG9TdHJpbmcgPSAhZGVmaW5lUHJvcGVydHkgPyBpZGVudGl0eSA6IGZ1bmN0aW9uKGZ1bmMsIHN0cmluZykgewogICAgICAgICAgcmV0dXJuIGRlZmluZVByb3BlcnR5KGZ1bmMsICd0b1N0cmluZycsIHsKICAgICAgICAgICAgJ2NvbmZpZ3VyYWJsZSc6IHRydWUsCiAgICAgICAgICAgICdlbnVtZXJhYmxlJzogZmFsc2UsCiAgICAgICAgICAgICd2YWx1ZSc6IGNvbnN0YW50KHN0cmluZyksCiAgICAgICAgICAgICd3cml0YWJsZSc6IHRydWUKICAgICAgICAgIH0pOwogICAgICAgIH07CgogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBiYXNlIGltcGxlbWVudGF0aW9uIG9mIGBfLnNodWZmbGVgLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge0FycmF5fE9iamVjdH0gY29sbGVjdGlvbiBUaGUgY29sbGVjdGlvbiB0byBzaHVmZmxlLgogICAgICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyB0aGUgbmV3IHNodWZmbGVkIGFycmF5LgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGJhc2VTaHVmZmxlKGNvbGxlY3Rpb24pIHsKICAgICAgICAgIHJldHVybiBzaHVmZmxlU2VsZih2YWx1ZXMoY29sbGVjdGlvbikpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIGJhc2UgaW1wbGVtZW50YXRpb24gb2YgYF8uc2xpY2VgIHdpdGhvdXQgYW4gaXRlcmF0ZWUgY2FsbCBndWFyZC4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHtBcnJheX0gYXJyYXkgVGhlIGFycmF5IHRvIHNsaWNlLgogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBbc3RhcnQ9MF0gVGhlIHN0YXJ0IHBvc2l0aW9uLgogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBbZW5kPWFycmF5Lmxlbmd0aF0gVGhlIGVuZCBwb3NpdGlvbi4KICAgICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIHNsaWNlIG9mIGBhcnJheWAuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gYmFzZVNsaWNlKGFycmF5LCBzdGFydCwgZW5kKSB7CiAgICAgICAgICB2YXIgaW5kZXggPSAtMSwKICAgICAgICAgICAgICBsZW5ndGggPSBhcnJheS5sZW5ndGg7CgogICAgICAgICAgaWYgKHN0YXJ0IDwgMCkgewogICAgICAgICAgICBzdGFydCA9IC1zdGFydCA+IGxlbmd0aCA/IDAgOiAobGVuZ3RoICsgc3RhcnQpOwogICAgICAgICAgfQogICAgICAgICAgZW5kID0gZW5kID4gbGVuZ3RoID8gbGVuZ3RoIDogZW5kOwogICAgICAgICAgaWYgKGVuZCA8IDApIHsKICAgICAgICAgICAgZW5kICs9IGxlbmd0aDsKICAgICAgICAgIH0KICAgICAgICAgIGxlbmd0aCA9IHN0YXJ0ID4gZW5kID8gMCA6ICgoZW5kIC0gc3RhcnQpID4+PiAwKTsKICAgICAgICAgIHN0YXJ0ID4+Pj0gMDsKCiAgICAgICAgICB2YXIgcmVzdWx0ID0gQXJyYXkobGVuZ3RoKTsKICAgICAgICAgIHdoaWxlICgrK2luZGV4IDwgbGVuZ3RoKSB7CiAgICAgICAgICAgIHJlc3VsdFtpbmRleF0gPSBhcnJheVtpbmRleCArIHN0YXJ0XTsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBUaGUgYmFzZSBpbXBsZW1lbnRhdGlvbiBvZiBgXy5zb21lYCB3aXRob3V0IHN1cHBvcnQgZm9yIGl0ZXJhdGVlIHNob3J0aGFuZHMuCiAgICAgICAgICoKICAgIC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lcn0gUmV0dXJucyB0aGUgaW5kZXggYXQgd2hpY2ggYHZhbHVlYCBzaG91bGQgYmUgaW5zZXJ0ZWQKICAgICAgICAgKiAgaW50byBgYXJyYXlgLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGJhc2VTb3J0ZWRJbmRleEJ5KGFycmF5LCB2YWx1ZSwgaXRlcmF0ZWUsIHJldEhpZ2hlc3QpIHsKICAgICAgICAgIHZhciBsb3cgPSAwLAogICAgICAgICAgICAgIGhpZ2ggPSBhcnJheSA9PSBudWxsID8gMCA6IGFycmF5Lmxlbmd0aDsKICAgICAgICAgIGlmIChoaWdoID09PSAwKSB7CiAgICAgICAgICAgIHJldHVybiAwOwogICAgICAgICAgfQoKICAgICAgICAgIHZhbHVlID0gaXRlcmF0ZWUodmFsdWUpOwogICAgICAgICAgdmFyIHZhbElzTmFOID0gdmFsdWUgIT09IHZhbHVlLAogICAgICAgICAgICAgIHZhbElzTnVsbCA9IHZhbHVlID09PSBudWxsLAogICAgICAgICAgICAgIHZhbElzU3ltYm9sID0gaXNTeW1ib2wodmFsdWUpLAogICAgICAgICAgICAgIHZhbElzVW5kZWZpbmVkID0gdmFsdWUgPT09IHVuZGVmaW5lZCQxOwoKICAgICAgICAgIHdoaWxlIChsb3cgPCBoaWdoKSB7CiAgICAgICAgICAgIHZhciBtaWQgPSBuYXRpdmVGbG9vcigobG93ICsgaGlnaCkgLyAyKSwKICAgICAgICAgICAgICAgIGNvbXB1dGVkID0gaXRlcmF0ZWUoYXJyYXlbbWlkXSksCiAgICAgICAgICAgICAgICBvdGhJc0RlZmluZWQgPSBjb21wdXRlZCAhPT0gdW5kZWZpbmVkJDEsCiAgICAgICAgICAgICAgICBvdGhJc051bGwgPSBjb21wdXRlZCA9PT0gbnVsbCwKICAgICAgICAgICAgICAgIG90aElzUmVmbGV4aXZlID0gY29tcHV0ZWQgPT09IGNvbXB1dGVkLAogICAgICAgICAgICAgICAgb3RoSXNTeW1ib2wgPSBpc1N5bWJvbChjb21wdXRlZCk7CgogICAgICAgICAgICBpZiAodmFsSXNOYU4pIHsKICAgICAgICAgICAgICB2YXIgc2V0TG93ID0gcmV0SGlnaGVzdCB8fCBvdGhJc1JlZmxleGl2ZTsKICAgICAgICAgICAgfSBlbHNlIGlmICh2YWxJc1VuZGVmaW5lZCkgewogICAgICAgICAgICAgIHNldExvdyA9IG90aElzUmVmbGV4aXZlICYmIChyZXRIaWdoZXN0IHx8IG90aElzRGVmaW5lZCk7CiAgICAgICAgICAgIH0gZWxzZSBpZiAodmFsSXNOdWxsKSB7CiAgICAgICAgICAgICAgc2V0TG93ID0gb3RoSXNSZWZsZXhpdmUgJiYgb3RoSXNEZWZpbmVkICYmIChyZXRIaWdoZXN0IHx8ICFvdGhJc051bGwpOwogICAgICAgICAgICB9IGVsc2UgaWYgKHZhbElzU3ltYm9sKSB7CiAgICAgICAgICAgICAgc2V0TG93ID0gb3RoSXNSZWZsZXhpdmUgJiYgb3RoSXNEZWZpbmVkICYmICFvdGhJc051bGwgJiYgKHJldEhpZ2hlc3QgfHwgIW90aElzU3ltYm9sKTsKICAgICAgICAgICAgfSBlbHNlIGlmIChvdGhJc051bGwgfHwgb3RoSXNTeW1ib2wpIHsKICAgICAgICAgICAgICBzZXRMb3cgPSBmYWxzZTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICBzZXRMb3cgPSByZXRIaWdoZXN0ID8gKGNvbXB1dGVkIDw9IHZhbHVlKSA6IChjb21wdXRlZCA8IHZhbHVlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoc2V0TG93KSB7CiAgICAgICAgICAgICAgbG93ID0gbWlkICsgMTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICBoaWdoID0gbWlkOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gbmF0aXZlTWluKGhpZ2gsIE1BWF9BUlJBWV9JTkRFWCk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBUaGUgYmFzZSBpbXBsZW1lbnRhdGlvbiBvZiBgXy5zb3J0ZWRVbmlxYCBhbmQgYF8uc29ydGVkVW5pcUJ5YCB3aXRob3V0CiAgICAgICAgICogc3VwcG9ydCBmb3IgaXRlcmF0ZWUgc2hvcnRoYW5kcy4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHtBcnJheX0gYXJyYXkgVGhlIGFycmF5IHRvIGluc3BlY3QuCiAgICAgICAgICogQHBhcmFtIHtGdW5jdGlvbn0gW2l0ZXJhdGVlXSBUaGUgaXRlcmF0ZWUgaW52b2tlZCBwZXIgZWxlbWVudC4KICAgICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIG5ldyBkdXBsaWNhdGUgZnJlZSBhcnJheS4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBiYXNlU29ydGVkVW5pcShhcnJheSwgaXRlcmF0ZWUpIHsKICAgICAgICAgIHZhciBpbmRleCA9IC0xLAogICAgICAgICAgICAgIGxlbmd0aCA9IGFycmF5Lmxlbmd0aCwKICAgICAgICAgICAgICByZXNJbmRleCA9IDAsCiAgICAgICAgICAgICAgcmVzdWx0ID0gW107CgogICAgICAgICAgd2hpbGUgKCsraW5kZXggPCBsZW5ndGgpIHsKICAgICAgICAgICAgdmFyIHZhbHVlID0gYXJyYXlbaW5kZXhdLAogICAgICAgICAgICAgICAgY29tcHV0ZWQgPSBpdGVyYXRlZSA/IGl0ZXJhdGVlKHZhbHVlKSA6IHZhbHVlOwoKICAgICAgICAgICAgaWYgKCFpbmRleCB8fCAhZXEoY29tcHV0ZWQsIHNlZW4pKSB7CiAgICAgICAgICAgICAgdmFyIHNlZW4gPSBjb21wdXRlZDsKICAgICAgICAgICAgICByZXN1bHRbcmVzSW5kZXgrK10gPSB2YWx1ZSA9PT0gMCA/IDAgOiB2YWx1ZTsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIHJlc3VsdDsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBiYXNlIGltcGxlbWVudGF0aW9uIG9mIGBfLnRvTnVtYmVyYCB3aGljaCBkb2Vzbid0IGVuc3VyZSBjb3JyZWN0CiAgICAgICAgICogY29udmVyc2lvbnMgb2YgYmluYXJ5LCBoZXhhZGVjaW1hbCwgb3Igb2N0YWwgc3RyaW5nIHZhbHVlcy4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gcHJvY2Vzcy4KICAgICAgICAgKiBAcmV0dXJucyB7bnVtYmVyfSBSZXR1cm5zIHRoZSBudW1iZXIuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gYmFzZVRvTnVtYmVyKHZhbHVlKSB7CiAgICAgICAgICBpZiAodHlwZW9mIHZhbHVlID09ICdudW1iZXInKSB7CiAgICAgICAgICAgIHJldHVybiB2YWx1ZTsKICAgICAgICAgIH0KICAgICAgICAgIGlmIChpc1N5bWJvbCh2YWx1ZSkpIHsKICAgICAgICAgICAgcmV0dXJuIE5BTjsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiArdmFsdWU7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBUaGUgYmFzZSBpbXBsZW1lbnRhdGlvbiBvZiBgXy50b1N0cmluZ2Agd2hpY2ggZG9lc24ndCBjb252ZXJ0IG51bGxpc2gKICAgICAgICAgKiB2YWx1ZXMgdG8gZW1wdHkgc3RyaW5ncy4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gcHJvY2Vzcy4KICAgICAgICAgKiBAcmV0dXJucyB7c3RyaW5nfSBSZXR1cm5zIHRoZSBzdHJpbmcuCiAgICAgICAgICovCiAgICAgICAgZnVuY3R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JhdGVlIGludm9rZWQgcGVyIGVsZW1lbnQuCiAgICAgICAgICogQHBhcmFtIHtGdW5jdGlvbn0gW2NvbXBhcmF0b3JdIFRoZSBjb21wYXJhdG9yIGludm9rZWQgcGVyIGVsZW1lbnQuCiAgICAgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBuZXcgZHVwbGljYXRlIGZyZWUgYXJyYXkuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gYmFzZVVuaXEoYXJyYXksIGl0ZXJhdGVlLCBjb21wYXJhdG9yKSB7CiAgICAgICAgICB2YXIgaW5kZXggPSAtMSwKICAgICAgICAgICAgICBpbmNsdWRlcyA9IGFycmF5SW5jbHVkZXMsCiAgICAgICAgICAgICAgbGVuZ3RoID0gYXJyYXkubGVuZ3RoLAogICAgICAgICAgICAgIGlzQ29tbW9uID0gdHJ1ZSwKICAgICAgICAgICAgICByZXN1bHQgPSBbXSwKICAgICAgICAgICAgICBzZWVuID0gcmVzdWx0OwoKICAgICAgICAgIGlmIChjb21wYXJhdG9yKSB7CiAgICAgICAgICAgIGlzQ29tbW9uID0gZmFsc2U7CiAgICAgICAgICAgIGluY2x1ZGVzID0gYXJyYXlJbmNsdWRlc1dpdGg7CiAgICAgICAgICB9CiAgICAgICAgICBlbHNlIGlmIChsZW5ndGggPj0gTEFSR0VfQVJSQVlfU0laRSkgewogICAgICAgICAgICB2YXIgc2V0ID0gaXRlcmF0ZWUgPyBudWxsIDogY3JlYXRlU2V0KGFycmF5KTsKICAgICAgICAgICAgaWYgKHNldCkgewogICAgICAgICAgICAgIHJldHVybiBzZXRUb0FycmF5KHNldCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaXNDb21tb24gPSBmYWxzZTsKICAgICAgICAgICAgaW5jbHVkZXMgPSBjYWNoZUhhczsKICAgICAgICAgICAgc2VlbiA9IG5ldyBTZXRDYWNoZTsKICAgICAgICAgIH0KICAgICAgICAgIGVsc2UgewogICAgICAgICAgICBzZWVuID0gaXRlcmF0ZWUgPyBbXSA6IHJlc3VsdDsKICAgICAgICAgIH0KICAgICAgICAgIG91dGVyOgogICAgICAgICAgd2hpbGUgKCsraW5kZXggPCBsZW5ndGgpIHsKICAgICAgICAgICAgdmFyIHZhbHVlID0gYXJyYXlbaW5kZXhdLAogICAgICAgICAgICAgICAgY29tcHV0ZWQgPSBpdGVyYXRlZSA/IGl0ZXJhdGVlKHZhbHVlKSA6IHZhbHVlOwoKICAgICAgICAgICAgdmFsdWUgPSAoY29tcGFyYXRvciB8fCB2YWx1ZSAhPT0gMCkgPyB2YWx1ZSA6IDA7CiAgICAgICAgICAgIGlmIChpc0NvbW1vbiAmJiBjb21wdXRlZCA9PT0gY29tcHV0ZWQpIHsKICAgICAgICAgICAgICB2YXIgc2VlbkluZGV4ID0gc2Vlbi5sZW5ndGg7CiAgICAgICAgICAgICAgd2hpbGUgKHNlZW5JbmRleC0tKSB7CiAgICAgICAgICAgICAgICBpZiAoc2VlbltzZWVuSW5kZXhdID09PSBjb21wdXRlZCkgewogICAgICAgICAgICAgICAgICBjb250aW51ZSBvdXRlcjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgaWYgKGl0ZXJhdGVlKSB7CiAgICAgICAgICAgICAgICBzZWVuLnB1c2goY29tcHV0ZWQpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICByZXN1bHQucHVzaCh2YWx1ZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoIWluY2x1ZGVzKHNlZW4sIGNvbXB1dGVkLCBjb21wYXJhdG9yKSkgewogICAgICAgICAgICAgIGlmIChzZWVuICE9PSByZXN1bHQpIHsKICAgICAgICAgICAgICAgIHNlZW4ucHVzaChjb21wdXRlZCk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIHJlc3VsdC5wdXNoKHZhbHVlKTsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIHJl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HBhcmFtIHtGdW5jdGlvbn0gW2NvbXBhcmF0b3JdIFRoZSBjb21wYXJhdG9yIGludm9rZWQgcGVyIGVsZW1lbnQuCiAgICAgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBuZXcgYXJyYXkgb2YgdmFsdWVzLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGJhc2VYb3IoYXJyYXlzLCBpdGVyYXRlZSwgY29tcGFyYXRvcikgewogICAgICAgICAgdmFyIGxlbmd0aCA9IGFycmF5cy5sZW5ndGg7CiAgICAgICAgICBpZiAobGVuZ3RoIDwgMikgewogICAgICAgICAgICByZXR1cm4gbGVuZ3RoID8gYmFzZVVuaXEoYXJyYXlzWzBdKSA6IFtdOwogICAgICAgICAgfQogICAgICAgICAgdmFyIGluZGV4ID0gLTEsCiAgICAgICAgICAgICAgcmVzdWx0ID0gQXJyYXkobGVuZ3RoKTsKCiAgICAgICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkgewogICAgICAgICAgICB2YXIgYXJyYXkgPSBhcnJheXNbaW5kZXhdLAogICAgICAgICAgICAgICAgb3RoSW5kZXggPSAtMTsKCiAgICAgICAgICAgIHdoaWxlICgrK290aEluZGV4IDwgbGVuZ3RoKSB7CiAgICAgICAgICAgICAgaWYgKG90aEluZGV4ICE9IGluZGV4KSB7CiAgICAgICAgICAgICAgICByZXN1bHRbaW5kZXhdID0gYmFzZURpZmZlcmVuY2UocmVzdWx0W2luZGV4XSB8fCBhcnJheSwgYXJyYXlzW290aEluZGV4XSwgaXRlcmF0ZWUsIGNvbXBhcmF0b3IpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIGJhc2VVbmlxKGJhc2VGbGF0dGVuKHJlc3VsdCwgMSksIGl0ZXJhdGVlLCBjb21wYXJhdG9yKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFRoaXMgYmFzZSBpbXBsZW1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AgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBpbnNwZWN0LgogICAgICAgICAqIEByZXR1cm5zIHtBcnJheXxPYmplY3R9IFJldHVybnMgdGhlIGNhc3QgYXJyYXktbGlrZSBvYmplY3QuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gY2FzdEFycmF5TGlrZU9iamVjdCh2YWx1ZSkgewogICAgICAgICAgcmV0dXJuIGlzQXJyYXlMaWtlT2JqZWN0KHZhbHVlKSA/IHZhbHVlIDogW107CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDYXN0cyBgdmFsdWVgIHRvIGBpZGVudGl0eWAgaWYgaXQncyBub3QgYSBmdW5jdGlvbi4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gaW5zcGVjdC4KICAgICAgICAgKiBAcmV0dXJucyB7RnVuY3Rpb259IFJldHVybnMgY2FzdCBmdW5jdGlvbi4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBjYXN0RnVuY3Rpb24odmFsdWUpIHsKICAgICAgICAgIHJldHVybiB0eXBlb2YgdmFsdWUgPT0gJ2Z1bmN0aW9uJyA/IHZhbHVlIDogaWRlbnRpdHk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDYXN0cyBgdmFsdWVgIHRvIGEgcGF0aCBhcnJheSBpZiBpdCdzIG5vdCBvbmUuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIGluc3BlY3QuCiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IFtvYmplY3RdIFRoZSBvYmplY3QgdG8gcXVlcnkga2V5cyBvbi4KICAgICAgICAgKiBAcmV0dXJucyB7QXJ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ge251bWJlcn0gW2VuZD1hcnJheS5sZW5ndGhdIFRoZSBlbmQgcG9zaXRpb24uCiAgICAgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBjYXN0IHNsaWNlLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGNhc3RTbGljZShhcnJheSwgc3RhcnQsIGVuZCkgewogICAgICAgICAgdmFyIGxlbmd0aCA9IGFycmF5Lmxlbmd0aDsKICAgICAgICAgIGVuZCA9IGVuZCA9PT0gdW5kZWZpbmVkJDEgPyBsZW5ndGggOiBlbmQ7CiAgICAgICAgICByZXR1cm4gKCFzdGFydCAmJiBlbmQgPj0gbGVuZ3RoKSA/IGFycmF5IDogYmFzZVNsaWNlKGFycmF5LCBzdGFydCwgZW5kKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIEEgc2ltcGxlIHdyYXBwZXIgYXJvdW5kIHRoZSBnbG9iYWwgW2BjbGVhclRpbWVvdXRgXShodHRwczovL21kbi5pby9jbGVhclRpbWVvdXQpLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge251bWJlcnxPYmplY3R9IGlkIFRoZSB0aW1lciBpZCBvciB0aW1lb3V0IG9iamVjdCBvZiB0aGUgdGltZXIgdG8gY2xlYXIuCiAgICAgICAgICovCiAgICAgICAgdmFyIGNsZWFyVGltZW91dCA9IGN0eENsZWFyVGltZW91dCB8fCBmdW5jdGlvbihpZCkgewogICAgICAgICAgcmV0dXJuIHJvb3QuY2xlYXJUaW1lb3V0KGlkKTsKICAgICAgICB9OwoKICAgICAgICAvKioKICAgICAgICAgKiBDcmVhdGVzIGEgY2xvbmUgb2YgIGBidWZmZXJgLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge0J1ZmZlcn0gYnVmZmVyIFRoZSBidWZmZXIgdG8gY2xvbmUuCiAgICAgICAgICogQHBhcmFtIHtib29sZWFuf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zdHJ1Y3RvcihyZWdleHAuc291cmNlLCByZUZsYWdzLmV4ZWMocmVnZXhwKSk7CiAgICAgICAgICByZXN1bHQubGFzdEluZGV4ID0gcmVnZXhwLmxhc3RJbmRleDsKICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDcmVhdGVzIGEgY2xvbmUgb2YgdGhlIGBzeW1ib2xgIG9iamVjdC4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IHN5bWJvbCBUaGUgc3ltYm9sIG9iamVjdCB0byBjbG9uZS4KICAgICAgICAgKiBAcmV0dXJucyB7T2JqZWN0fSBSZXR1cm5zIHRoZSBjbG9uZWQgc3ltYm9sIG9iamVjdC4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBjbG9uZVN5bWJvbChzeW1ib2wpIHsKICAgICAgICAgIHJldHVybiBzeW1ib2xWYWx1ZU9mID8gT2JqZWN0KHN5bWJvbFZhbHVlT2YuY2FsbChzeW1ib2wpKSA6IHt9OwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhIGNsb25lIG9mIGB0eXBlZEFycmF5YC4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IHR5cGVkQXJyYXkgVGhlIHR5cGVkIGFycmF5IHRvIGNsb25lLgogICAgICAgICAqIEBwYXJhbSB7Ym9vbGVhbn0gW2lzRGVlcF0gU3BlY2lmeSBhIGRlZXAgY2xvbmUuCiAgICAgICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyB0aGUgY2xvbmVkIHR5cGVkIGFycmF5LgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGNsb25lVHlwZWRBcnJheSh0eXBlZEFycmF5LCBpc0RlZXApIHsKICAgICAgICAgIHZhciBidWZmZXIgPSBpc0RlZXA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AgICAgICAgICAgICBvdGhJc1JlZmxleGl2ZSA9IG90aGVyID09PSBvdGhlciwKICAgICAgICAgICAgICAgIG90aElzU3ltYm9sID0gaXNTeW1ib2wob3RoZXIpOwoKICAgICAgICAgICAgaWYgKCghb3RoSXNOdWxsICYmICFvdGhJc1N5bWJvbCAmJiAhdmFsSXNTeW1ib2wgJiYgdmFsdWUgPiBvdGhlcikgfHwKICAgICAgICAgICAgICAgICh2YWxJc1N5bWJvbCAmJiBvdGhJc0RlZmluZWQgJiYgb3RoSXNSZWZsZXhpdmUgJiYgIW90aElzTnVsbCAmJiAhb3RoSXNTeW1ib2wpIHx8CiAgICAgICAgICAgICAgICAodmFsSXNOdWxsICYmIG90aElzRGVmaW5lZCAmJiBvdGhJc1JlZmxleGl2ZSkgfHwKICAgICAgICAgICAgICAgICghdmFsSXNEZWZpbmVkICYmIG90aElzUmVmbGV4aXZlKSB8fAogICAgICAgICAgICAgICAgIXZhbElzUmVmbGV4aXZlKSB7CiAgICAgICAgICAgICAgcmV0dXJuIDE7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKCghdmFsSXNOdWxsICYmICF2YWxJc1N5bWJvbCAmJiAhb3RoSXNTeW1ib2wgJiYgdmFsdWUgPCBvdGhlcikgfHwKICAgICAgICAgICAgICAgIChvdGhJc1N5bWJvbCAmJiB2YWxJc0RlZmluZWQgJiYgdmFsSXNSZWZsZXhpdmUgJiYgIXZhbElzTnVsbCAmJiAhdmFsSXNTeW1ib2wpIHx8CiAgICAgICAgICAgICAgICAob3RoSXNOdWxsICYmIHZhbElzRGVmaW5lZCAmJiB2YWxJc1JlZmxleGl2ZSkgfHwKICAgICAgICAgICAgICAgICghb3RoSXNEZWZpbmVkICYmIHZhbElzUmVmbGV4aXZlKSB8fAogICAgICAgICAgICAgICAgIW90aElzUmVmbGV4aXZlKSB7CiAgICAgICAgICAgICAgcmV0dXJuIC0xOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm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vdGhDcml0ZXJpYSA9IG90aGVyLmNyaXRlcmlhLAogICAgICAgICAgICAgIGxlbmd0aCA9IG9iakNyaXRlcmlhLmxlbmd0aCwKICAgICAgICAgICAgICBvcmRlcnNMZW5ndGggPSBvcmRlcnMubGVuZ3RoOwoKICAgICAgICAgIHdoaWxlICgrK2luZGV4IDwgbGVuZ3RoKSB7CiAgICAgICAgICAgIHZhciByZXN1bHQgPSBjb21wYXJlQXNjZW5kaW5nKG9iakNyaXRlcmlhW2luZGV4XSwgb3RoQ3JpdGVyaWFbaW5kZXhdKTsKICAgICAgICAgICAgaWYgKHJlc3VsdCkgewogICAgICAgICAgICAgIGlmIChpbmRleCA+PSBvcmRlcnNMZW5ndGgpIHsKICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIHZhciBvcmRlciA9IG9yZGVyc1tpbmRleF07CiAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCAqIChvcmRlciA9PSAnZGVzYycgPyAtMSA6IDEpOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICAvLyBGaXhlcyBhbiBgQXJyYXkjc29ydGAgYnVnIGluIHRoZSBKUyBlbmdpbmUgZW1iZWRkZWQgaW4gQWRvYmUgYXBwbGljYXRpb25zCiAgICAgICAgICAvLyB0aGF0IGNhdXNlcyBpdCwgdW5kZXIgY2VydGFpbiBjaXJjdW1zdGFuY2VzLCB0byBwcm92aWRlIHRoZSBzYW1lIHZhbHVlIGZvcgogICAgICAgICAgLy8gYG9iamVjdGAgYW5kIGBvdGhlcmAuIFNlZSBodHRwczovL2dpdGh1Yi5jb20vamFzaGtlbmFzL3VuZGVyc2NvcmUvcHVsbC8xMjQ3CiAgICAgICAgICAvLyBmb3IgbW9yZSBkZXRhaWxzLgogICAgICAgICAgLy8KICAgICAgICAgIC8vIFRoaXMgYWxzbyBlbnN1cmVzIGEgc3RhYmxlIHNvcnQgaW4gVjggYW5kIG90aGV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gICAgIGFyZ3NMZW5ndGggPSBhcmdzLmxlbmd0aCwKICAgICAgICAgICAgICBob2xkZXJzTGVuZ3RoID0gaG9sZGVycy5sZW5ndGgsCiAgICAgICAgICAgICAgbGVmdEluZGV4ID0gLTEsCiAgICAgICAgICAgICAgbGVmdExlbmd0aCA9IHBhcnRpYWxzLmxlbmd0aCwKICAgICAgICAgICAgICByYW5nZUxlbmd0aCA9IG5hdGl2ZU1heChhcmdzTGVuZ3RoIC0gaG9sZGVyc0xlbmd0aCwgMCksCiAgICAgICAgICAgICAgcmVzdWx0ID0gQXJyYXkobGVmdExlbmd0aCArIHJhbmdlTGVuZ3RoKSwKICAgICAgICAgICAgICBpc1VuY3VycmllZCA9ICFpc0N1cnJpZWQ7CgogICAgICAgICAgd2hpbGUgKCsrbGVmdEluZGV4IDwgbGVmdExlbmd0aCkgewogICAgICAgICAgICByZXN1bHRbbGVmdEluZGV4XSA9IHBhcnRpYWxzW2xlZnRJbmRleF07CiAgICAgICAgICB9CiAgICAgICAgICB3aGlsZSAoKythcmdzSW5kZXggPCBob2xkZXJzTGVuZ3RoKSB7CiAgICAgICAgICAgIGlmIChpc1VuY3VycmllZCB8fCBhcmdzSW5kZXggPCBhcmdzTGVuZ3RoKSB7CiAgICAgICAgICAgICAgcmVzdWx0W2hvbGRlcnNbYXJnc0luZGV4XV0gPSBhcmdzW2FyZ3NJbmRleF07CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICAgIHdoaWxlIChyYW5nZUxlbmd0aC0tKSB7CiAgICAgICAgICAgIHJlc3VsdFtsZWZ0SW5kZXgrK10gPSBhcmdzW2FyZ3NJbmRleCsrXTsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBUaGlzIGZ1bmN0aW9uIGlzIGxpa2UgYGNvbXBvc2VBcmdzYCBleGNlcHQgdGhhdCB0aGUgYXJndW1lbnRzIGNvbXBvc2l0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IEFycmF5KHJhbmdlTGVuZ3RoICsgcmlnaHRMZW5ndGgpLAogICAgICAgICAgICAgIGlzVW5jdXJyaWVkID0gIWlzQ3VycmllZDsKCiAgICAgICAgICB3aGlsZSAoKythcmdzSW5kZXggPCByYW5nZUxlbmd0aCkgewogICAgICAgICAgICByZXN1bHRbYXJnc0luZGV4XSA9IGFyZ3NbYXJnc0luZGV4XTsKICAgICAgICAgIH0KICAgICAgICAgIHZhciBvZmZzZXQgPSBhcmdzSW5kZXg7CiAgICAgICAgICB3aGlsZSAoKytyaWdodEluZGV4IDwgcmlnaHRMZW5ndGgpIHsKICAgICAgICAgICAgcmVzdWx0W29mZnNldCArIHJpZ2h0SW5kZXhdID0gcGFydGlhbHNbcmlnaHRJbmRleF07CiAgICAgICAgICB9CiAgICAgICAgICB3aGlsZSAoKytob2xkZXJzSW5kZXggPCBob2xkZXJzTGVuZ3RoKSB7CiAgICAgICAgICAgIGlmIChpc1VuY3VycmllZCB8fCBhcmdzSW5kZXggPCBhcmdzTGVuZ3RoKSB7CiAgICAgICAgICAgICAgcmVzdWx0W29mZnNldCArIGhvbGRlcnNbaG9sZGVyc0luZGV4XV0gPSBhcmdzW2FyZ3NJbmRleCsrXTsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIHJlc3VsdDsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENvcGllcyB0aGUgdmFsdWVzIG9mIGBzb3VyY2VgIHRvIGBhcnJheWAuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7QXJyYXl9IHNvdXJjZSBUaGUgYXJyYXkgdG8gY29weSB2YWx1ZXMgZnJvbS4KICAgICAgICAgKiBAcGFyYW0ge0FycmF5fSBbYXJyYXk9W11dIFRoZSBhcnJheSB0byBjb3B5IHZhbHVlcyB0by4KICAgICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgYGFycmF5YC4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBjb3B5QXJyYXkoc291cmNlLCBhcnJheSkgewogICAgICAgICAgdmFyIGluZGV4ID0gLTEsCiAgICAgICAgICAgICAgbGVuZ3RoID0gc291cmNlLmxlbmd0aDsKCiAgICAgICAgICBhcnJheSB8fCAoYXJyYXkgPSBBcnJheShsZW5ndGgpKTsKICAgICAgICAgIHdoaWxlICgrK2luZGV4IDwgbGVuZ3RoKSB7CiAgICAgICAgICAgIGFycmF5W2luZGV4XSA9IHNvdXJjZVtpbmRleF07CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gYXJyYXk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDb3BpZXMgcHJvcGVydGllcyBvZiBgc291cmNlYCB0byBgb2JqZWN0YC4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IHNvdXJjZSBUaGUgb2JqZWN0IHRvIGNvcHkgcHJvcGVydGllcyBmcm9tLgogICAgICAgICAqIEBwYXJhbSB7QXJyYXl9IHByb3BzIFRoZSBwcm9wZXJ0eSBpZGVudGlmaWVycyB0byBjb3B5LgogICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBbb2JqZWN0PXt9XSBUaGUgb2JqZWN0IHRvIGNvcHkgcHJvcGVydGllcyB0by4KICAgICAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufSBbY3VzdG9taXplcl0gVGhlIGZ1bmN0aW9uIHRvIGN1c3RvbWl6ZSBjb3BpZWQgdmFsdWVzLgogICAgICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgYG9iamVjdGAuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gY29weU9iamVjdChzb3VyY2UsIHByb3BzLCBvYmplY3QsIGN1c3RvbWl6ZXIpIHsKICAgICAgICAgIHZhciBpc05ldyA9ICFvYmplY3Q7CiAgICAgICAgICBvYmplY3QgfHwgKG9iamVjdCA9IHt9KTsKCiAgICAgICAgICB2YXIgaW5kZXggPSAtMSwKICAgICAgICAgICAgICBsZW5ndGggPSBwcm9wcy5sZW5ndGg7CgogICAgICAgICAgd2hpbGUgKCsraW5kZXggPCBsZW5ndGgpIHsKICAgICAgICAgICAgdmFyIGtleSA9IHByb3BzW2luZGV4XTsKCiAgICAgICAgICAgIHZhciBuZXdWYWx1ZSA9IGN1c3RvbWl6ZXIKICAgICAgICAgICAgICA/IGN1c3RvbWl6ZXIob2JqZWN0W2tleV0sIHNvdXJjZVtrZXldLCBrZXksIG9iamVjdCwgc291cmNlKQogICAgICAgICAgICAgIDogdW5kZWZpbmVkJDE7CgogICAgICAgICAgICBpZiAobmV3VmFsdWUgPT09IHVuZGVmaW5lZCQxKSB7CiAgICAgICAgICAgICAgbmV3VmFsdWUgPSBzb3VyY2Vba2V5XTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoaXNOZXcpIHsKICAgICAgICAgICAgICBiYXNlQXNzaWduVmFsdWUob2JqZWN0LCBrZXksIG5ld1ZhbHVlKTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICBhc3NpZ25WYWx1ZShvYmplY3QsIGtleSwgbmV3VmFsdWUpOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gb2JqZWN0OwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ29waWVzIG93biBzeW1ib2xzIG9mIGBzb3VyY2VgIHRvIGBvYmplY3RgLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gc291cmNlIFRoZSBvYmplY3QgdG8gY29weSBzeW1ib2xzIGZyb20uCiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IFtvYmplY3Q9e31dIFRoZSBvYmplY3QgdG8gY29weSBzeW1ib2xzIHRvLgogICAgICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgYG9iamVjdGAuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gY29weVN5bWJvbHMoc291cmNlLCBvYmplY3QpIHsKICAgICAgICAgIHJldHVybiBjb3B5T2JqZWN0KHNvdXJjZSwgZ2V0U3ltYm9scyhzb3VyY2UpLCBvYmplY3QpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ29waWVzIG93biBhbmQgaW5oZXJpdGVkIHN5bWJvbHMgb2YgYHNvdXJjZWAgdG8gYG9iamVjdGAuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBzb3VyY2UgVGhlIG9iamVjdCB0byBjb3B5IHN5bWJvbHMgZnJvbS4KICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gW29iamVjdD17fV0gVGhlIG9iamVjdCB0byBjb3B5IHN5bWJvbHMgdG8uCiAgICAgICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyBgb2JqZWN0YC4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBjb3B5U3ltYm9sc0luKHNvdXJjZSwgb2JqZWN0KSB7CiAgICAgICAgICByZXR1cm4gY29weU9iamVjdChzb3VyY2UsIGdldFN5bWJvbHNJbihzb3VyY2UpLCBvYmplY3QpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhIGZ1bmN0aW9uIGxpa2UgYF8uZ3JvdXBCeWAuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IHNldHRlciBUaGUgZnVuY3Rpb24gdG8gc2V0IGFjY3VtdWxhdG9yIHZhbHVlcy4KICAgICAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufSBbaW5pdGlhbGl6ZXJdIFRoZSBhY2N1bXVsYXRvciBvYmplY3QgaW5pdGlhbGl6ZXIuCiAgICAgICAgICogQHJldHVybnMge0Z1bmN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emVyID0gbGVuZ3RoID4gMSA/IHNvdXJjZXNbbGVuZ3RoIC0gMV0gOiB1bmRlZmluZWQkMSwKICAgICAgICAgICAgICAgIGd1YXJkID0gbGVuZ3RoID4gMiA/IHNvdXJjZXNbMl0gOiB1bmRlZmluZWQkMTsKCiAgICAgICAgICAgIGN1c3RvbWl6ZXIgPSAoYXNzaWduZXIubGVuZ3RoID4gMyAmJiB0eXBlb2YgY3VzdG9taXplciA9PSAnZnVuY3Rpb24nKQogICAgICAgICAgICAgID8gKGxlbmd0aC0tLCBjdXN0b21pemVyKQogICAgICAgICAgICAgIDogdW5kZWZpbmVkJDE7CgogICAgICAgICAgICBpZiAoZ3VhcmQgJiYgaXNJdGVyYXRlZUNhbGwoc291cmNlc1swXSwgc291cmNlc1sxXSwgZ3VhcmQpKSB7CiAgICAgICAgICAgICAgY3VzdG9taXplciA9IGxlbmd0aCA8IDMgPyB1bmRlZmluZWQkMSA6IGN1c3RvbWl6ZXI7CiAgICAgICAgICAgICAgbGVuZ3RoID0gMTsKICAgICAgICAgICAgfQogICAgICAgICAgICBvYmplY3QgPSBPYmplY3Qob2JqZWN0KTsKICAgICAgICAgICAgd2hpbGUgKCsraW5kZXggPCBsZW5ndGgpIHsKICAgICAgICAgICAgICB2YXIgc291cmNlID0gc291cmNlc1tpbmRleF07CiAgICAgICAgICAgICAgaWYgKHNvdXJjZSkgewogICAgICAgICAgICAgICAgYXNzaWduZXIob2JqZWN0LCBzb3VyY2UsIGluZGV4LCBjdXN0b21pemVyKTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIG9iamVjdDsKICAgICAgICAgIH0pOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhIGBiYXNlRWFjaGAgb3IgYGJhc2VFYWNoUmlnaHRgIGZ1bmN0aW9uLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufSBlYWNoRnVuYyBUaGUgZnVuY3Rpb24gdG8gaXRlcmF0ZSBvdmVyIGEgY29sbGVjdGlvbi4KICAgICAgICAgKiBAcGFyYW0ge2Jvb2xlYW59IFtmcm9tUmlnaHRdIFNwZWNpZnkgaXRlcmF0aW5nIGZyb20gcmlnaHQgdG8gbGVmdC4KICAgICAgICAgKiBAcmV0dXJucyB7RnVuY3Rpb259IFJldHVybnMgdGhlIG5ldyBiYXNlIGZ1bmN0aW9uLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGNyZWF0ZUJhc2VFYWNoKGVhY2hGdW5jLCBmcm9tUmlnaHQpIHsKICAgICAgICAgIHJldHVybiBmdW5jdGlvbihjb2xsZWN0aW9uLCBpdGVyYXRlZSkgewogICAgICAgICAgICBpZiAoY29sbGVjdGlvbiA9PSBudWxsKSB7CiAgICAgICAgICAgICAgcmV0dXJuIGNvbGxlY3Rpb247CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKCFpc0FycmF5TGlrZShjb2xsZWN0aW9uKSkgewogICAgICAgICAgICAgIHJldHVybiBlYWNoRnVuYyhjb2xsZWN0aW9uLCBpdGVyYXRlZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIGxlbmd0aCA9IGNvbGxlY3Rpb24ubGVuZ3RoLAogICAgICAgICAgICAgICAgaW5kZXggPSBmcm9tUmlnaHQgPyBsZW5ndGggOiAtMSwKICAgICAgICAgICAgICAgIGl0ZXJhYmxlID0gT2JqZWN0KGNvbGxlY3Rpb24pOwoKICAgICAgICAgICAgd2hpbGUgKChmcm9tUmlnaHQgPyBpbmRleC0tIDogKytpbmRleCA8IGxlbmd0aCkpIHsKICAgICAgICAgICAgICBpZiAoaXRlcmF0ZWUoaXRlcmFibGVbaW5kZXhdLCBpbmRleCwgaXRlcmFibGUpID09PSBmYWxzZSkgewogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBjb2xsZWN0aW9uOwogICAgICAgICAgfTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYSBiYXNlIGZ1bmN0aW9uIGZvciBtZXRob2RzIGxpa2UgYF8uZm9ySW5gIGFuZCBgXy5mb3JPd25gLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge2Jvb2xlYW59IFtmcm9tUmlnaHRdIFNwZWNpZnkgaXRlcmF0aW5nIGZyb20gcmlnaHQgdG8gbGVmdC4KICAgICAgICAgKiBAcmV0dXJucyB7RnVuY3Rpb259IFJldHVybnMgdGhlIG5ldyBiYXNlIGZ1bmN0aW9uLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGNyZWF0ZUJhc2VGb3IoZnJvbVJpZ2h0KSB7CiAgICAgICAgICByZXR1cm4gZnVuY3Rpb24ob2JqZWN0LCBpdGVyYXRlZSwga2V5c0Z1bmMpIHsKICAgICAgICAgICAgdmFyIGluZGV4ID0gLTEsCiAgICAgICAgICAgICAgICBpdGVyYWJsZSA9IE9iamVjdChvYmplY3QpLAogICAgICAgICAgICAgICAgcHJvcHMgPSBrZXlzRnVuYyhvYmplY3QpLAogICAgICAgICAgICAgICAgbGVuZ3RoID0gcHJvcHMubGVuZ3RoOwoKICAgICAgICAgICAgd2hpbGUgKGxlbmd0aC0tKSB7CiAgICAgICAgICAgICAgdmFyIGtleSA9IHByb3BzW2Zyb21SaWdodCA/IGxlbmd0aCA6ICsraW5kZXhdOwogICAgICAgICAgICAgIGlmIChpdGVyYXRlZShpdGVyYWJsZVtrZXldLCBrZXksIGl0ZXJhYmxlKSA9PT0gZmFsc2UpIHsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gb2JqZWN0OwogICAgICAgICAgfTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICA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RlcyBhIGZ1bmN0aW9uIGxpa2UgYF8ubG93ZXJGaXJzdGAuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBtZXRob2ROYW1lIFRoZSBuYW1lIG9mIHRoZSBgU3RyaW5nYCBjYXNlIG1ldGhvZCB0byB1c2UuCiAgICAgICAgICogQHJldHVybnMge0Z1bmN0aW9ufSBSZXR1cm5zIHRoZSBuZXcgY2FzZSBmdW5jdGlvbi4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBjcmVhdGVDYXNlRmlyc3QobWV0aG9kTmFtZSkgewogICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uKHN0cmluZykgewogICAgICAgICAgICBzdHJpbmcgPSB0b1N0cmluZyhzdHJpbmcpOwoKICAgICAgICAgICAgdmFyIHN0clN5bWJvbHMgPSBoYXNVbmljb2RlKHN0cmluZykKICAgICAgICAgICAgICA/IHN0cmluZ1RvQXJyYXkoc3RyaW5nKQogICAgICAgICAgICAgIDogdW5kZWZpbmVkJDE7CgogICAgICAgICAgICB2YXIgY2hyID0gc3RyU3ltYm9scwogICAgICAgICAgICAgID8gc3RyU3ltYm9sc1swXQogICAgICAgICAgICAgIDogc3RyaW5nLmNoYXJBdCgwKTsKCiAgICAgICAgICAgIHZhciB0cmFpbGluZyA9IHN0clN5bWJvbHMKICAgICAgICAgICAgICA/IGNhc3RTbGljZShzdHJTeW1ib2xzLCAxKS5qb2luKCcnKQogICAgICAgICAgICAgIDogc3RyaW5nLnNsaWNlKDEpOwoKICAgICAgICAgICAgcmV0dXJuIGNoclttZXRob2ROYW1lXSgpICsgdHJhaWxpbmc7CiAgICAgICAgICB9OwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhIGZ1bmN0aW9uIGxpa2UgYF8uY2FtZWxDYXNlYC4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHB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1bWVudHMubGVuZ3RoLAogICAgICAgICAgICAgICAgYXJncyA9IEFycmF5KGxlbmd0aCksCiAgICAgICAgICAgICAgICBpbmRleCA9IGxlbmd0aCwKICAgICAgICAgICAgICAgIHBsYWNlaG9sZGVyID0gZ2V0SG9sZGVyKHdyYXBwZXIpOwoKICAgICAgICAgICAgd2hpbGUgKGluZGV4LS0pIHsKICAgICAgICAgICAgICBhcmdzW2luZGV4XSA9IGFyZ3VtZW50c1tpbmRleF07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIGhvbGRlcnMgPSAobGVuZ3RoIDwgMyAmJiBhcmdzWzBdICE9PSBwbGFjZWhvbGRlciAmJiBhcmdzW2xlbmd0aCAtIDFdICE9PSBwbGFjZWhvbGRlcikKICAgICAgICAgICAgICA/IFtdCiAgICAgICAgICAgICAgOiByZXBsYWNlSG9sZGVycyhhcmdzLCBwbGFjZWhvbGRlcik7CgogICAgICAgICAgICBsZW5ndGggLT0gaG9sZGVycy5sZW5ndGg7CiAgICAgICAgICAgIGlmIChsZW5ndGggPCBhcml0eSkgewogICAgICAgICAgICAgIHJldHVybiBjcmVhdGVSZWN1cnJ5KAogICAgICAgICAgICAgICAgZnVuYywgYml0bWFzaywgY3JlYXRlSHlicmlkLCB3cmFwcGVyLnBsYWNlaG9sZGVyLCB1bmRlZmluZWQkMSwKICAgICAgICAgICAgICAgIGFyZ3MsIGhvbGRlcnMsIHVuZGVmaW5lZCQxLCB1bmRlZmluZWQkMSwgYXJpdHkgLSBsZW5ndGgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciBmbiA9ICh0aGlzICYmIHRoaXMgIT09IHJvb3QgJiYgdGhpcyBpbnN0YW5jZW9mIHdyYXBwZXIpID8gQ3RvciA6IGZ1bmM7CiAgICAgICAgICAgIHJldHVybiBhcHBseShmbiwgdGhpcywgYXJncyk7CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gd3JhcHBlcjsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYSBgXy5maW5kYCBvciBgXy5maW5kTGFzdGAgZnVuY3Rpb24uCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IGZpbmRJbmRleEZ1bmMgVGhlIGZ1bmN0aW9uIHRvIGZpbmQgdGhlIGNvbGxlY3Rpb24gaW5kZXguCiAgICAgICAgICogQHJldHVybnMge0Z1bmN0aW9ufSBSZXR1cm5zIHRoZSBuZXcgZmluZCBmdW5jdGlvbi4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBjcmVhdGVGaW5kKGZpbmRJbmRleEZ1bmMpIHsKICAgICAgICAgIHJldHVybiBmdW5jdGlvbihjb2xsZWN0aW9uLCBwcmVkaWNhdGUsIGZyb21JbmRleCkgewogICAgICAgICAgICB2YXIgaXRlcmFibGUgPSBPYmplY3QoY29sbGVjdGlvbik7CiAgICAgICAgICAgIGlmICghaXNBcnJheUxpa2UoY29sbGVjdGlvbikpIHsKICAgICAgICAgICAgICB2YXIgaXRlcmF0ZWUgPSBnZXRJdGVyYXRlZShwcmVkaWNhdGUsIDMpOwogICAgICAgICAgICAgIGNvbGxlY3Rpb24gPSBrZXlzKGNvbGxlY3Rpb24pOwogICAgICAgICAgICAgIHByZWRpY2F0ZSA9IGZ1bmN0aW9uKGtleSkgeyByZXR1cm4gaXRlcmF0ZWUoaXRlcmFibGVba2V5XSwga2V5LCBpdGVyYWJsZSk7IH07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIGluZGV4ID0gZmluZEluZGV4RnVuYyhjb2xsZWN0aW9uLCBwcmVkaWNhdGUsIGZyb21JbmRleCk7CiAgICAgICAgICAgIHJldHVybiBpbmRleCA+IC0xID8gaXRlcmFibGVbaXRlcmF0ZWUgPyBjb2xsZWN0aW9uW2luZGV4XSA6IGluZGV4XSA6IHVuZGVmaW5lZCQxOwogICAgICAgICAgfTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYSBgXy5mbG93YCBvciBgXy5mbG93UmlnaHRgIGZ1bmN0aW9uLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge2Jvb2xlYW59IFtmcm9tUmlnaHRdIFNwZWNpZnkgaXRlcmF0aW5nIGZyb20gcmlnaHQgdG8gbGVmdC4KICAgICAgICAgKiBAcmV0dXJucyB7RnVuY3Rpb259IFJldHVybnMgdGhlIG5ldyBmbG93IGZ1bmN0aW9uLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGNyZWF0ZUZsb3coZnJvbVJpZ2h0KSB7CiAgICAgICAgICByZXR1cm4gZmxhdFJlc3QoZnVuY3Rpb24oZnVuY3MpIHsKICAgICAgICAgICAgdmFyIGxlbmd0aCA9IGZ1bmNzLmxlbmd0aCwKICAgICAgICAgICAgICAgIGluZGV4ID0gbGVuZ3RoLAogICAgICAgICAgICAgICAgcHJlcmVxID0gTG9kYXNoV3JhcHBlci5wcm90b3R5cGUudGhydTsKCiAgICAgICAgICAgIGlmIChmcm9tUmlnaHQpIHsKICAgICAgICAgICAgICBmdW5jcy5yZXZlcnNlKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgd2hpbGUgKGluZGV4LS0pIHsKICAgICAgICAgICAgICB2YXIgZnVuYyA9IGZ1bmNzW2luZGV4XTsKICAgICAgICAgICAgICBpZiAodHlwZW9mIGZ1bmMgIT0gJ2Z1bmN0aW9uJykgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihGVU5DX0VSUk9SX1RFWFQpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBpZiAocHJlcmVxICYmICF3cmFwcGVyICYmIGdldEZ1bmNOYW1lKGZ1bmMpID09ICd3cmFwcGVyJykgewogICAgICAgICAgICAgICAgdmFyIHdyYXBwZXIgPSBuZXcgTG9kYXNoV3JhcHBlcihbXSwgdHJ1ZSk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGluZGV4ID0gd3JhcHBlciA/IGluZGV4IDogbGVuZ3RoOwogICAgICAgICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkgewogICAgICAgICAgICAgIGZ1bmMgPSBmdW5jc1tpbmRleF07CgogICAgICAgICAgICAgIHZhciBmdW5jTmFtZSA9IGdldEZ1bmNOYW1lKGZ1bmMpLAogICAgICAgICAgICAgICAgICBkYXRhID0gZnVuY05hbWUgPT0gJ3dyYXBwZXInID8gZ2V0RGF0YShmdW5jKSA6IHVuZGVmaW5lZCQxOwoKICAgICAgICAgICAgICBpZiAoZGF0YSAmJiBpc0xhemlhYmxlKGRhdGFbMF0pICYmCiAgICAgICAgICAgICAgICAgICAgZGF0YVsxXSA9PSAoV1JBUF9BUllfRkxBRyB8IFdSQVBfQ1VSUllfRkxBRyB8IFdSQVBfUEFSVElBTF9GTEFHIHwgV1JBUF9SRUFSR19GTEFHKSAmJgogICAgICAgICAgICAgICAgICAgICFkYXRhWzRdLmxlbmd0aCAmJiBkYXRhWzldID09IDEKICAgICAgICAgICAgICAgICAgKSB7CiAgICAgICAgICAgICAgICB3cmFwcGVyID0gd3JhcHBlcltnZXRGdW5jTmFtZShkYXRhWzBdKV0uYXBwbHkod3JhcHBlciwgZGF0YVszXSk7CiAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIHdyYXBwZXIgPSAoZnVuYy5sZW5ndGggPT0gMSAmJiBpc0xhemlhYmxlKGZ1bmMpKQogICAgICAgICAgICAgICAgICA/IHdyYXBwZXJbZnVuY05hbWVdKCkKICAgICAgICAgICAgICAgICAgOiB3cmFwcGVyLnRocnUoZnVuYyk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbigpIHsKICAgICAgICAgICAgICB2YXIgYXJncyA9IGFyZ3VtZW50cywKICAgICAgICAgICAgICAgICAgdmFsdWUgPSBhcmdzWzBdOwoKICAgICAgICAgICAgICBpZiAod3JhcHBlciAmJiBhcmdzLmxlbmd0aCA9PSAxICYmIGlzQXJyYXkodmFsdWUpKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gd3JhcHBlci5wbGFudCh2YWx1ZSkudmFsdWUoKTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgdmFyIGluZGV4ID0gMCwKICAgICAgICAgICAgICAgICAgcmVzdWx0ID0gbGVuZ3RoID8gZnVuY3NbaW5kZXhdLmFwcGx5KHRoaXMsIGFyZ3MpIDogdmFsdWU7CgogICAgICAgICAgICAgIHdoaWxlICgrK2luZGV4IDwgbGVuZ3RoKSB7CiAgICAgICAgICAgICAgICByZXN1bHQgPSBmdW5jc1tpbmRleF0uY2FsbCh0aGlzLCByZXN1bHQpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICAgICAgICB9OwogICAgICAgICAgfSk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDcmVhdGVzIGEgZnVuY3Rpb24gdGhhdCB3cmFwcyBgZnVuY2AgdG8gaW52b2tlIGl0IHdpdGggb3B0aW9uYWwgYHRoaXNgCiAgICAgICAgICogYmluZGluZyBvZiBgdGhpc0FyZ2AsIHBhcnRpYWwgYXBwbGljYXRpb24sIGFuZCBjdXJyeWluZy4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHtGdW5jdGlvbnxzdHJpbmd9IGZ1bmMgVGhlIGZ1bmN0aW9uIG9yIG1ldGhvZCBuYW1lIHRvIHdyYXAuCiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IGJpdG1hc2sgVGhlIGJpdG1hc2sgZmxhZ3MuIFNlZSBgY3JlYXRlV3JhcGAgZm9yIG1vcmUgZGV0YWlscy4KICAgICAgICAgKiBAcGFyYW0geyp9IFt0aGlzQXJnXSBUaGUgYHRoaX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9IGJpdG1hc2sgJiBXUkFQX0FSWV9GTEFHLAogICAgICAgICAgICAgIGlzQmluZCA9IGJpdG1hc2sgJiBXUkFQX0JJTkRfRkxBRywKICAgICAgICAgICAgICBpc0JpbmRLZXkgPSBiaXRtYXNrICYgV1JBUF9CSU5EX0tFWV9GTEFHLAogICAgICAgICAgICAgIGlzQ3VycmllZCA9IGJpdG1hc2sgJiAoV1JBUF9DVVJSWV9GTEFHIHwgV1JBUF9DVVJSWV9SSUdIVF9GTEFHKSwKICAgICAgICAgICAgICBpc0ZsaXAgPSBiaXRtYXNrICYgV1JBUF9GTElQX0ZMQUcsCiAgICAgICAgICAgICAgQ3RvciA9IGlzQmluZEtleSA/IHVuZGVmaW5lZCQxIDogY3JlYXRlQ3RvcihmdW5jKTsKCiAgICAgICAgICBmdW5jdGlvbiB3cmFwcGVyKCkgewogICAgICAgICAgICB2YXIgbGVuZ3RoID0gYXJndW1lbnRzLmxlbmd0aCwKICAgICAgICAgICAgICAgIGFyZ3MgPSBBcnJheShsZW5ndGgpLAogICAgICAgICAgICAgICAgaW5kZXggPSBsZW5ndGg7CgogICAgICAgICAgICB3aGlsZSAoaW5kZXgtLSkgewogICAgICAgICAgICAgIGFyZ3NbaW5kZXhdID0gYXJndW1lbnRzW2luZGV4XTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoaXNDdXJyaWVkKSB7CiAgICAgICAgICAgICAgdmFyIHBsYWNlaG9sZGVyID0gZ2V0SG9sZGVyKHdyYXBwZXIpLAogICAgICAgICAgICAgICAgICBob2xkZXJzQ291bnQgPSBjb3VudEhvbGRlcnMoYXJncywgcGxhY2Vob2xkZXIpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChwYXJ0aWFscykgewogICAgICAgICAgICAgIGFyZ3MgPSBjb21wb3NlQXJncyhhcmdzLCBwYXJ0aWFscywgaG9sZGVycywgaXNDdXJyaWVkKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAocGFydGlhbHNSaWdodCkgewogICAgICAgICAgICAgIGFyZ3MgPSBjb21wb3NlQXJnc1JpZ2h0KGFyZ3MsIHBhcnRpYWxzUmlnaHQsIGhvbGRlcnNSaWdodCwgaXNDdXJyaWVkKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBsZW5ndGggLT0gaG9sZGVyc0NvdW50OwogICAgICAgICAgICBpZiAoaXNDdXJyaWVkICYmIGxlbmd0aCA8IGFyaXR5KSB7CiAgICAgICAgICAgICAgdmFyIG5ld0hvbGRlcnMgPSByZXBsYWNlSG9sZGVycyhhcmdzLCBwbGFjZWhvbGRlcik7CiAgICAgICAgICAgICAgcmV0dXJuIGNyZWF0ZVJlY3VycnkoCiAgICAgICAgICAgICAgICBmdW5jLCBiaXRtYXNrLCBjcmVhdGVIeWJyaWQsIHdyYXBwZXIucGxhY2Vob2xkZXIsIHRoaXNBcmcsCiAgICAgICAgICAgICAgICBhcmdzLCBuZXdIb2xkZXJzLCBhcmdQb3MsIGFyeSwgYXJpdHkgLSBsZW5ndGgKICAgICAgICAgICAgICApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciB0aGlzQmluZGluZyA9IGlzQmluZCA/IHRoaXNBcmcgOiB0aGlzLAogICAgICAgICAgICAgICAgZm4gPSBpc0JpbmRLZXkgPyB0aGlzQmluZGluZ1tmdW5jXSA6IGZ1bmM7CgogICAgICAgICAgICBsZW5ndGggPSBhcmdzLmxlbmd0aDsKICAgICAgICAgICAgaWYgKGFyZ1BvcykgewogICAgICAgICAgICAgIGFyZ3MgPSByZW9yZGVyKGFyZ3MsIGFyZ1Bvcyk7CiAgICAgICAgICAgIH0gZWxzZSBpZiAoaXNGbGlwICYmIGxlbmd0aCA+IDEpIHsKICAgICAgICAgICAgICBhcmdzLnJldmVyc2UoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoaXNBcnkgJiYgYXJ5IDwgbGVuZ3RoKSB7CiAgICAgICAgICAgICAgYXJncy5sZW5ndGggPSBhcnk7CiAgICAg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nRpYWwoZnVuYywgYml0bWFzaywgdGhpc0FyZywgcGFydGlhbHMpIHsKICAgICAgICAgIHZhciBpc0JpbmQgPSBiaXRtYXNrICYgV1JBUF9CSU5EX0ZMQUcsCiAgICAgICAgICAgICAgQ3RvciA9IGNyZWF0ZUN0b3IoZnVuYyk7CgogICAgICAgICAgZnVuY3Rpb24gd3JhcHBlcigpIHsKICAgICAgICAgICAgdmFyIGFyZ3NJbmRleCA9IC0xLAogICAgICAgICAgICAgICAgYXJnc0xlbmd0aCA9IGFyZ3VtZW50cy5sZW5ndGgsCiAgICAgICAgICAgICAgICBsZWZ0SW5kZXggPSAtMSwKICAgICAgICAgICAgICAgIGxlZnRMZW5ndGggPSBwYXJ0aWFscy5sZW5ndGgsCiAgICAgICAgICAgICAgICBhcmdzID0gQXJyYXkobGVmdExlbmd0aCArIGFyZ3NMZW5ndGgpLAogICAgICAgICAgICAgICAgZm4gPSAodGhpcyAmJiB0aGlzICE9PSByb290ICYmIHRoaXMgaW5zdGFuY2VvZiB3cmFwcGVyKSA/IEN0b3IgOiBmdW5jOwoKICAgICAgICAgICAgd2hpbGUgKCsrbGVmdEluZGV4IDwgbGVmdExlbmd0aCkgewogICAgICAgICAgICAgIGFyZ3NbbGVmdEluZGV4XSA9IHBhcnRpYWxzW2xlZnRJbmRleF07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgd2hpbGUgKGFyZ3NMZW5ndGgtLSkgewogICAgICAgICAgICAgIGFyZ3NbbGVmdEluZGV4KytdID0gYXJndW1lbnRzWysrYXJnc0luZGV4XTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gYXBwbHkoZm4sIGlzQmluZCA/IHRoaXNBcmcgOiB0aGlzLCBhcmdzKTsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiB3cmFwcGVyOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhIGBfLnJhbmdlYCBvciBgXy5yYW5nZVJpZ2h0YCBm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gICAgICAgICBpZiAoaXNMYXppYWJsZShmdW5jKSkgewogICAgICAgICAgICBzZXREYXRhKHJlc3VsdCwgbmV3RGF0YSk7CiAgICAgICAgICB9CiAgICAgICAgICByZXN1bHQucGxhY2Vob2xkZXIgPSBwbGFjZWhvbGRlcjsKICAgICAgICAgIHJldHVybiBzZXRXcmFwVG9TdHJpbmcocmVzdWx0LCBmdW5jLCBiaXRtYXNrKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYSBmdW5jdGlvbiBsaWtlIGBfLnJvdW5kYC4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IG1ldGhvZE5hbWUgVGhlIG5hbWUgb2YgdGhlIGBNYXRoYCBtZXRob2QgdG8gdXNlIHdoZW4gcm91bmRpbmcuCiAgICAgICAgICogQHJldHVybnMge0Z1bmN0aW9ufSBSZXR1cm5zIHRoZSBuZXcgcm91bmQgZnVuY3Rpb24uCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gY3JlYXRlUm91bmQobWV0aG9kTmFtZSkgewogICAgICAgICAgdmFyIGZ1bmMgPSBNYXRoW21ldGhvZE5hbWVdOwogICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uKG51bWJlciwgcHJlY2lzaW9uKSB7CiAgICAgICAgICAgIG51bWJlciA9IHRvTnVtYmVyKG51bWJlcik7CiAgICAgICAgICAgIHByZWNpc2lvbiA9IHByZWNpc2lvbiA9PSBudWxsID8gMCA6IG5hdGl2ZU1pbih0b0ludGVnZXIocHJlY2lzaW9uKSwgMjkyKTsKICAgICAgICAgICAgaWYgKHByZWNpc2lvbiAmJiBuYXRpdmVJc0Zpbml0ZShudW1iZXIpKSB7CiAgICAgICAgICAgICAgLy8gU2hpZnQgd2l0aCBleHBvbmVudGlhbCBub3RhdGlvbiB0byBhdm9pZCBmbG9hdGluZy1wb2ludCBpc3N1ZXMuCiAgICAgICAgICAgICAgLy8gU2VlIFtNRE5dKGh0dHBzOi8vbWRuLmlvL3JvdW5kI0V4YW1wbGVzKSBmb3IgbW9yZSBkZXRhaWxzLgogICAgICAgICAgICAgIHZhciBwYWlyID0gKHRvU3RyaW5nKG51bWJlcikgKyAnZScpLnNwbGl0KCdlJyksCiAgICAgICAgICAgICAgICAgIHZhbHVlID0gZnVuYyhwYWlyWzBdICsgJ2UnICsgKCtwYWlyWzFdICsgcHJlY2lzaW9uKSk7CgogICAgICAgICAgICAgIHBhaXIgPSAodG9TdHJpbmcodmFsdWUpICsgJ2UnKS5zcGxpdCgnZScpOwogICAgICAgICAgICAgIHJldHVybiArKHBhaXJbMF0gKyAnZScgKyAoK3BhaXJbMV0gLSBwcmVjaXNpb24pKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gZnVuYyhudW1iZXIpOwogICAgICAgICAgfTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYSBzZXQgb2JqZWN0IG9mIGB2YWx1ZXNgLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge0FycmF5fSB2YWx1ZXMgVGhlIHZhbHVlcyB0byBhZGQgdG8gdGhlIHNldC4KICAgICAgICAgKiBAcmV0dXJucyB7T2JqZWN0fSBSZXR1cm5zIHRoZSBuZXcgc2V0LgogICAgICAgICAqLwogICAgICAgIHZhciBjcmVhdGVTZXQgPSAhKFNldCAmJiAoMSAvIHNldFRvQXJyYXkobmV3IFNldChbLC0wXSkpWzFdKSA9PSBJTkZJTklUWSkgPyBub29wIDogZnVuY3Rpb24odmFsdWVzKSB7CiAgICAgICAgICByZXR1cm4gbmV3IFNldCh2YWx1ZXMpOwogICAgICAgIH07CgogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYSBgXy50b1BhaXJzYCBvciBgXy50b1BhaXJzSW5gIGZ1bmN0aW9uLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufSBrZXlzRnVuYyBUaGUgZnVuY3Rpb24gdG8gZ2V0IHRoZSBrZXlzIG9mIGEgZ2l2ZW4gb2JqZWN0LgogICAgICAgICAqIEByZXR1cm5zIHtGdW5jdGlvbn0gUmV0dXJucyB0aGUgbmV3IHBhaXJzIGZ1bmN0aW9uLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGNyZWF0ZVRvUGFpcnMoa2V5c0Z1bmMpIHsKICAgICAgICAgIHJldHVybiBmdW5jdGlvbihvYmplY3QpIHsKICAgICAgICAgICAgdmFyIHRhZyA9IGdldFRhZyhvYmplY3QpOwogICAgICAgICAgICBpZiAodGFnID09IG1hcFRhZykgewogICAgICAgICAgICAgIHJldHVybiBtYXBUb0FycmF5KG9iamVjdCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHRhZyA9PSBzZXRUYWcpIHsKICAgICAgICAgICAgICByZXR1cm4gc2V0VG9QYWlycyhvYmplY3QpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBiYXNlVG9QYWlycyhvYmplY3QsIGtleXNGdW5jKG9iamVjdCkpOwogICAgICAgICAgfTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYSBmdW5jdGlvbiB0aGF0IGVpdGhlciBjdXJyaWVzIG9yIGludm9rZXMgYGZ1bmNgIHdpdGggb3B0aW9uYWwKICAgICAgICAgKiBgdGhpc2AgYmluZGluZyBhbmQgcGFydGlhbGx5IGFwcGxpZWQgYXJndW1lbnRzLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufHN0cmluZ30gZnVuYyBUaGUgZnVuY3Rpb24gb3IgbWV0aG9kIG5hbWUgdG8gd3JhcC4KICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gYml0bWFzayBUaGUgYml0bWFzayBmbGFncy4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ICAgICB9CiAgICAgICAgICB2YXIgZGF0YSA9IGlzQmluZEtleSA/IHVuZGVmaW5lZCQxIDogZ2V0RGF0YShmdW5jKTsKCiAgICAgICAgICB2YXIgbmV3RGF0YSA9IFsKICAgICAgICAgICAgZnVuYywgYml0bWFzaywgdGhpc0FyZywgcGFydGlhbHMsIGhvbGRlcnMsIHBhcnRpYWxzUmlnaHQsIGhvbGRlcnNSaWdodCwKICAgICAgICAgICAgYXJnUG9zLCBhcnksIGFyaXR5CiAgICAgICAgICBdOwoKICAgICAgICAgIGlmIChkYXRhKSB7CiAgICAgICAgICAgIG1lcmdlRGF0YShuZXdEYXRhLCBkYXRhKTsKICAgICAgICAgIH0KICAgICAgICAgIGZ1bmMgPSBuZXdEYXRhWzBdOwogICAgICAgICAgYml0bWFzayA9IG5ld0RhdGFbMV07CiAgICAgICAgICB0aGlzQXJnID0gbmV3RGF0YVsyXTsKICAgICAgICAgIHBhcnRpYWxzID0gbmV3RGF0YVszXTsKICAgICAgICAgIGhvbGRlcnMgPSBuZXdEYXRhWzRdOwogICAgICAgICAgYXJpdHkgPSBuZXdEYXRhWzldID0gbmV3RGF0YVs5XSA9PT0gdW5kZWZpbmVkJDEKICAgICAgICAgICAgPyAoaXNCaW5kS2V5ID8gMCA6IGZ1bmMubGVuZ3RoKQogICAgICAgICAgICA6IG5hdGl2ZU1heChuZXdEYXRhWzldIC0gbGVuZ3RoLCAwKTsKCiAgICAgICAgICBpZiAoIWFyaXR5ICYmIGJpdG1hc2sgJiAoV1JBUF9DVVJSWV9GTEFHIHwgV1JBUF9DVVJSWV9SSUdIVF9GTEFHKSkgewogICAgICAgICAgICBiaXRtYXNrICY9IH4oV1JBUF9DVVJSWV9GTEFHIHwgV1JBUF9DVVJSWV9SSUdIVF9GTEFHKTsKICAgICAgICAgIH0KICAgICAgICAgIGlmICghYml0bWFzayB8fCBiaXRtYXNrID09IFdSQVBfQklORF9GTEFHKSB7CiAgICAgICAgICAgIHZhciByZXN1bHQgPSBjc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XShzcmNWYWx1ZSk7CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gb2JqVmFsdWU7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBVc2VkIGJ5IGBfLm9taXRgIHRvIGN1c3RvbWl6ZSBpdHMgYF8uY2xvbmVEZWVwYCB1c2UgdG8gb25seSBjbG9uZSBwbGFpbgogICAgICAgICAqIG9iamVjdHMuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIGluc3BlY3QuCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IGtleSBUaGUga2V5IG9mIHRoZSBwcm9wZXJ0eSB0byBpbnNwZWN0LgogICAgICAgICAqIEByZXR1cm5zIHsqfSBSZXR1cm5zIHRoZSB1bmNsb25lZCB2YWx1ZSBvciBgdW5kZWZpbmVkYCB0byBkZWZlciBjbG9uaW5nIHRvIGBfLmNsb25lRGVlcGAuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gY3VzdG9tT21pdENsb25lKHZhbHVlKSB7CiAgICAgICAgICByZXR1cm4gaXNQbGFpbk9iamVjdCh2YWx1ZSkgPyB1bmRlZmluZWQkMSA6IHZhbHVlOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQSBzcGVjaWFsaXplZCB2ZXJzaW9uIG9mIGBiYXNlSXNFcXVhbERlZXBgIGZvciBhcnJheXMgd2l0aCBzdXBwb3J0IGZvcgogICAgICAgICAqIHBhcnRpYWwgZGVlcCBjb21wYXJpc29ucy4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHtBcnJheX0gYXJyYXkgVGhlIGFycmF5IHRvIGNvbXBhcmUuCiAgICAgICAgICogQHBhcmFtIHtBcnJheX0gb3RoZXIgVGhlIG90aGVyIGFycmF5IHRvIGNvbXBhcmUuCiAgICAgICAgICogQHBhcmF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yU3RhY2tlZCA9IHN0YWNrLmdldChhcnJheSk7CiAgICAgICAgICB2YXIgb3RoU3RhY2tlZCA9IHN0YWNrLmdldChvdGhlcik7CiAgICAgICAgICBpZiAoYXJyU3RhY2tlZCAmJiBvdGhTdGFja2VkKSB7CiAgICAgICAgICAgIHJldHVybiBhcnJTdGFja2VkID09IG90aGVyICYmIG90aFN0YWNrZWQgPT0gYXJyYXk7CiAgICAgICAgICB9CiAgICAgICAgICB2YXIgaW5kZXggPSAtMSwKICAgICAgICAgICAgICByZXN1bHQgPSB0cnVlLAogICAgICAgICAgICAgIHNlZW4gPSAoYml0bWFzayAmIENPTVBBUkVfVU5PUkRFUkVEX0ZMQUcpID8gbmV3IFNldENhY2hlIDogdW5kZWZpbmVkJDE7CgogICAgICAgICAgc3RhY2suc2V0KGFycmF5LCBvdGhlcik7CiAgICAgICAgICBzdGFjay5zZXQob3RoZXIsIGFycmF5KTsKCiAgICAgICAgICAvLyBJZ25vcmUgbm9uLWluZGV4IHByb3BlcnRpZXMuCiAgICAgICAgICB3aGlsZSAoKytpbmRleCA8IGFyckxlbmd0aCkgewogICAgICAgICAgICB2YXIgYXJyVmFsdWUgPSBhcnJheVtpbmRleF0sCiAgICAgICAgICAgICAgICBvdGhWYWx1ZSA9IG90aGVyW2luZGV4XTsKCiAgICAgICAgICAgIGlmIChjdXN0b21pemVyKSB7CiAgICAgICAgICAgICAgdmFyIGNvbXBhcmVkID0gaXNQYXJ0aWFsCiAgICAgICAgICAgICAgICA/IGN1c3RvbWl6ZXIob3RoVmFsdWUsIGFyclZhbHVlLCBpbmRleCwgb3RoZXIsIGFycmF5LCBzdGFjaykKICAgICAgICAgICAgICAgIDogY3VzdG9taXplcihhcnJWYWx1ZSwgb3RoVmFsdWUsIGluZGV4LCBhcnJheSwgb3RoZXIsIHN0YWNrKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoY29tcGFyZWQgIT09IHVuZGVmaW5lZCQxKSB7CiAgICAgICAgICAgICAgaWYgKGNvbXBhcmVkKSB7CiAgICAgICAgICAgICAgICBjb250aW51ZTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgcmVzdWx0ID0gZmFsc2U7CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gUmVjdXJzaXZlbHkgY29tcGFyZSBhcnJheXMgKHN1c2NlcHRpYmxlIHRvIGNhbGwgc3RhY2sgbGltaXRzKS4KICAgICAgICAgICAgaWYgKHNlZW4pIHsKICAgICAgICAgICAgICBpZiAoIWFycmF5U29tZShvdGhlciwgZnVuY3Rpb24ob3RoVmFsdWUsIG90aEluZGV4KSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKCFjYWNoZUhhcyhzZWVuLCBvdGhJbmRleCkgJiYKICAgICAgICAgICAgICAgICAgICAgICAgKGFyclZhbHVlID09PSBvdGhWYWx1ZSB8fCBlcXVhbEZ1bmMoYXJyVmFsdWUsIG90aFZhbHVlLCBiaXRtYXNrLCBjdXN0b21pemVyLCBzdGFjaykpKSB7CiAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2Vlbi5wdXNoKG90aEluZGV4KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgIH0pKSB7CiAgICAgICAgICAgICAgICByZXN1bHQgPSBmYWxzZTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSBlbHNlIGlmICghKAogICAgICAgICAgICAgICAgICBhcnJWYWx1ZSA9PT0gb3RoVmFsdWUgfHwKICAgICAgICAgICAgICAgICAgICBlcXVhbEZ1bmMoYXJyVmFsdWUsIG90aFZhbHVlLCBiaXRtYXNrLCBjdXN0b21pemVyLCBzdGFjaykKICAgICAgICAgICAgICAgICkpIHsKICAgICAgICAgICAgICByZXN1bHQgPSBmYWxzZTsKICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgICAgc3RhY2tb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aW9uIHRvIGRldGVybWluZSBlcXVpdmFsZW50cyBvZiB2YWx1ZXMuCiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IHN0YWNrIFRyYWNrcyB0cmF2ZXJzZWQgYG9iamVjdGAgYW5kIGBvdGhlcmAgb2JqZWN0cy4KICAgICAgICAgKiBAcmV0dXJucyB7Ym9vbGVhbn0gUmV0dXJucyBgdHJ1ZWAgaWYgdGhlIG9iamVjdHMgYXJlIGVxdWl2YWxlbnQsIGVsc2UgYGZhbHNlYC4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBlcXVhbEJ5VGFnKG9iamVjdCwgb3RoZXIsIHRhZywgYml0bWFzaywgY3VzdG9taXplciwgZXF1YWxGdW5jLCBzdGFjaykgewogICAgICAgICAgc3dpdGNoICh0YWcpIHsKICAgICAgICAgICAgY2FzZSBkYXRhVmlld1RhZzoKICAgICAgICAgICAgICBpZiAoKG9iamVjdC5ieXRlTGVuZ3RoICE9IG90aGVyLmJ5dGVMZW5ndGgpIHx8CiAgICAgICAgICAgICAgICAgIChvYmplY3QuYnl0ZU9mZnNldCAhPSBvdGhlci5ieXRlT2Zmc2V0KSkgewogICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBvYmplY3QgPSBvYmplY3QuYnVmZmVyOwogICAgICAgICAgICAgIG90aGVyID0gb3RoZXIuYnVmZmVyOwoKICAgICAgICAgICAgY2FzZSBhcnJheUJ1ZmZlclRhZzoKICAgICAgICAgICAgICBpZiAoKG9iamVjdC5ieXRlTGVuZ3RoICE9IG90aGVyLmJ5dGVMZW5ndGgpIHx8CiAgICAgICAgICAgICAgICAgICFlcXVhbEZ1bmMobmV3IFVpbnQ4QXJyYXkob2JqZWN0KSwgbmV3IFVpbnQ4QXJyYXkob3RoZXIpKSkgewogICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKCiAgICAgICAgICAgIGNhc2UgYm9vbFRhZzoKICAgICAgICAgICAgY2FzZSBkYXRlVGFnOgogICAgICAgICAgICBjYXNlIG51bWJlclRhZzoKICAgICAgICAgICAgICAvLyBDb2VyY2UgYm9vbGVhbnMgdG8gYDFgIG9yIGAwYCBhbmQgZGF0ZXMgdG8gbWlsbGlzZWNvbmRzLgogICAgICAgICAgICAgIC8vIEludmFsaWQgZGF0ZXMgYXJlIGNvZXJjZWQgdG8gYE5hTmAuCiAgICAgICAgICAgICAgcmV0dXJuIGVxKCtvYmplY3QsICtvdGhlcik7CgogICAgICAgICAgICBjYXNlIGVycm9yVGFnOgogICAgICAgICAgICAgIHJldHVybiBvYmplY3QubmFtZSA9PSBvdGhlci5uYW1lICYmIG9iamVjdC5tZXNzYWdlID09IG90aGVyLm1lc3NhZ2U7CgogICAgICAgICAgICBjYXNlIHJlZ2V4cFRhZzoKICAgICAgICAgICAgY2FzZSBzdHJpbmdUYWc6CiAgICAgICAgICAgICAgLy8gQ29lcmNlIHJlZ2V4ZXMgdG8gc3RyaW5ncyBhbmQgdHJlYXQgc3RyaW5ncywgcHJpbWl0aXZlcyBhbmQgb2JqZWN0cywKICAgICAgICAgICAgICAvLyBhcyBlcXVhbC4gU2VlIGh0dHA6Ly93d3cuZWNtYS1pbnRlcm5hdGlvbmFsLm9yZy9lY21hLTI2Mi83LjAvI3NlYy1yZWdleHAucHJvdG90eXBlLnRvc3RyaW5nCiAgICAgICAgICAgICAgLy8gZm9yIG1vcmUgZGV0YWlscy4KICAgICAgICAgICAgICByZXR1cm4gb2JqZWN0ID09IChvdGhlciArICcnKTsKCiAgICAgICAgICAgIGNhc2UgbWFwVGFnOgogICAgICAgICAgICAgIHZhciBjb252ZXJ0ID0gbWFwVG9BcnJheTsKCiAgICAgICAgICAgIGNhc2Ugc2V0VGFnOgogICAgICAgICAgICAgIHZhciBpc1BhcnRpYWwgPSBiaXRtYXNrICYgQ09NUEFSRV9QQVJUSUFMX0ZMQUc7CiAgICAgICAgICAgICAgY29udmVydCB8fCAoY29udmVydCA9IHNldFRvQXJyYXkpOwoKICAgICAgICAgICAgICBpZiAob2JqZWN0LnNpemUgIT0gb3RoZXIuc2l6ZSAmJiAhaXNQYXJ0aWFsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIC8vIEFzc3VtZSBjeWNsaWMgdmFsdWVzIGFyZSBlcXVhbC4KICAgICAgICAgICAgICB2YXIgc3RhY2tlZCA9IHN0YWNrLmdldChvYmplY3QpOwogICAgICAgICAgICAgIGlmIChzdGFja2VkKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gc3RhY2tlZCA9PSBvdGhlcjsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgYml0bWFzayB8PSBDT01QQVJFX1VOT1JERVJFRF9GTEFHOwoKICAgICAgICAgICAgICAvLyBSZWN1cnNpdmVseSBjb21wYXJlIG9iamVjdHMgKHN1c2NlcHRpYmxlIHRvIGNhbGwgc3RhY2sgbGltaXRzKS4KICAgICAgICAgICAgICBzdGFjay5zZXQob2JqZWN0LCBvdGhlcik7CiAgICAgICAgICAgICAgdmFyIHJlc3VsdCA9IGVxdWFsQXJyYXlzKGNvbnZlcnQob2JqZWN0KSwgY29udmVydChvdGhlciksIGJpdG1hc2ssIGN1c3RvbWl6ZXIsIGVxdWFsRnVuYywgc3RhY2spOwogICAgICAgICAgICAgIHN0YWNrWydkZWxldGUnXShvYmplY3QpOwogICAgICAgICAgICAgIHJldHVybiByZXN1bHQ7CgogICAgICAgICAgICBjYXNlIHN5bWJvbFRhZzoKICAgICAgICAgICAgICBpZiAoc3ltYm9sVmFsdWVPZikgewogICAgICAgICAgICAgICAgcmV0dXJuIHN5bWJvbFZhbHVlT2YuY2FsbChvYmplY3QpID09IHN5bWJvbFZhbHVlT2YuY2FsbChvdGhlcik7CiAgICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgIC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YWNrKSB7CiAgICAgICAgICB2YXIgaXNQYXJ0aWFsID0gYml0bWFzayAmIENPTVBBUkVfUEFSVElBTF9GTEFHLAogICAgICAgICAgICAgIG9ialByb3BzID0gZ2V0QWxsS2V5cyhvYmplY3QpLAogICAgICAgICAgICAgIG9iakxlbmd0aCA9IG9ialByb3BzLmxlbmd0aCwKICAgICAgICAgICAgICBvdGhQcm9wcyA9IGdldEFsbEtleXMob3RoZXIpLAogICAgICAgICAgICAgIG90aExlbmd0aCA9IG90aFByb3BzLmxlbmd0aDsKCiAgICAgICAgICBpZiAob2JqTGVuZ3RoICE9IG90aExlbmd0aCAmJiAhaXNQYXJ0aWFsKSB7CiAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgIH0KICAgICAgICAgIHZhciBpbmRleCA9IG9iakxlbmd0aDsKICAgICAgICAgIHdoaWxlIChpbmRleC0tKSB7CiAgICAgICAgICAgIHZhciBrZXkgPSBvYmpQcm9wc1tpbmRleF07CiAgICAgICAgICAgIGlmICghKGlzUGFydGlhbCA/IGtleSBpbiBvdGhlciA6IGhhc093blByb3BlcnR5LmNhbGwob3RoZXIsIGtleSkpKSB7CiAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICAvLyBDaGVjayB0aGF0IGN5Y2xpYyB2YWx1ZXMgYXJlIGVxdWFsLgogICAgICAgICAgdmFyIG9ialN0YWNrZWQgPSBzdGFjay5nZXQob2JqZWN0KTsKICAgICAgICAgIHZhciBvdGhTdGFja2VkID0gc3RhY2suZ2V0KG90aGVyKTsKICAgICAgICAgIGlmIChvYmpTdGFja2VkICYmIG90aFN0YWNrZWQpIHsKICAgICAgICAgICAgcmV0dXJuIG9ialN0YWNrZWQgPT0gb3RoZXIgJiYgb3RoU3RhY2tlZCA9PSBvYmplY3Q7CiAgICAgICAgICB9CiAgICAgICAgICB2YXIgcmVzdWx0ID0gdHJ1ZTsKICAgICAgICAgIHN0YWNrLnNldChvYmplY3QsIG90aGVyKTsKICAgICAgICAgIHN0YWNrLnNldChvdGhlciwgb2JqZWN0KTsKCiAgICAgICAgICB2YXIgc2tpcEN0b3IgPSBpc1BhcnRpYWw7CiAgICAgICAgICB3aGlsZSAoKytpbmRleCA8IG9iakxlbmd0aCkgewogICAgICAgICAgICBrZXkgPSBvYmpQcm9wc1tpbmRleF07CiAgICAgICAgICAgIHZhciBvYmpWYWx1ZSA9IG9iamVjdFtrZXldLAogICAgICAgICAgICAgICAgb3RoVmFsdWUgPSBvdGhlcltrZXldOwoKICAgICAgICAgICAgaWYgKGN1c3RvbWl6ZXIpIHsKICAgICAgICAgICAgICB2YXIgY29tcGFyZWQgPSBpc1BhcnRpYWwKICAgICAgICAgICAgICAgID8gY3VzdG9taXplcihvdGhWYWx1ZSwgb2JqVmFsdWUsIGtleSwgb3RoZXIsIG9iamVjdCwgc3RhY2spCiAgICAgICAgICAgICAgICA6IGN1c3RvbWl6ZXIob2JqVmFsdWUsIG90aFZhbHVlLCBrZXksIG9iamVjdCwgb3RoZXIsIHN0YWNrKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBSZWN1cnNpdmVseSBjb21wYXJlIG9iamVjdHMgKHN1c2NlcHRpYmxlIHRvIGNhbGwgc3RhY2sgbGltaXRzKS4KICAgICAgICAgICAgaWYgKCEoY29tcGFyZWQgPT09IHVuZGVmaW5lZCQxCiAgICAgICAgICAgICAgICAgID8gKG9ialZhbHVlID09PSBvdGhWYWx1ZSB8fCBlcXVhbEZ1bmMob2JqVmFsdWUsIG90aFZhbHVlLCBiaXRtYXNrLCBjdXN0b21pemVyLCBzdGFjaykpCiAgICAgICAgICAgICAgICAgIDogY29tcGFyZWQKICAgICAgICAgICAgICAgICkpIHsKICAgICAgICAgICAgICByZXN1bHQgPSBmYWxzZTsKICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQogICAgICAgICAgICBza2lwQ3RvciB8fCAoc2tpcEN0b3IgPSBrZX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0aW9uIHRvIGFwcGx5IGEgcmVzdCBwYXJhbWV0ZXIgdG8uCiAgICAgICAgICogQHJldHVybnMge0Z1bmN0aW9ufSBSZXR1cm5zIHRoZSBuZXcgZnVuY3Rpb24uCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gZmxhdFJlc3QoZnVuYykgewogICAgICAgICAgcmV0dXJuIHNldFRvU3RyaW5nKG92ZXJSZXN0KGZ1bmMsIHVuZGVmaW5lZCQxLCBmbGF0dGVuKSwgZnVuYyArICcnKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYW4gYXJyYXkgb2Ygb3duIGVudW1lcmFibGUgcHJvcGVydHkgbmFtZXMgYW5kIHN5bWJvbHMgb2YgYG9iamVjdGAuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvYmplY3QgVGhlIG9iamVjdCB0byBxdWVyeS4KICAgICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIGFycmF5IG9mIHByb3BlcnR5IG5hbWVzIGFuZCBzeW1ib2xzLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGdldEFsbEtleXMob2JqZWN0KSB7CiAgICAgICAgICByZXR1cm4gYmFzZUdldEFsbEtleXMob2JqZWN0LCBrZXlzLCBnZXRTeW1ib2xzKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYW4gYXJyYXkgb2Ygb3duIGFuZCBpbmhlcml0ZWQgZW51bWVyYWJsZSBwcm9wZXJ0eSBuYW1lcyBhbmQKICAgICAgICAgKiBzeW1ib2xzIG9mIGBvYmplY3RgLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBvYmplY3QgdG8gcXVlcnkuCiAgICAgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBhcnJheSBvZiBwcm9wZXJ0eSBuYW1lcyBhbmQgc3ltYm9scy4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBnZXRBbGxLZXlzSW4ob2JqZWN0KSB7CiAgICAgICAgICByZXR1cm4gYmFzZUdldEFsbEtleXMob2JqZWN0LCBrZXlzSW4sIGdldFN5bWJvbHNJbik7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIG1ldGFkYXRhIGZvciBgZnVuY2AuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IGZ1bmMgVGhlIGZ1bmN0aW9uIHRvIHF1ZXJ5LgogICAgICAgICAqIEByZXR1cm5zIHsqfSBSZXR1cm5zIHRoZSBtZXRhZGF0YSBmb3IgYGZ1bmNgLgogICAgICAgICAqLwogICAgICAgIHZhciBnZXREYXRhID0gIW1ldGFNYXAgPyBub29wIDogZnVuY3Rpb24oZnVuYykgewogICAgICAgICAgcmV0dXJuIG1ldGFNYXAuZ2V0KGZ1bmMpOwogICAgICAgIH07CgogICAgICAgIC8qKgogICAgICAgICAqIEdldHMgdGhlIG5hbWUgb2YgYGZ1bmNgLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufSBmdW5jIFRoZSBmdW5jdGlvbiB0byBxdWVyeS4KICAgICAgICAgKiBAcmV0dXJucyB7c3RyaW5nfSBSZXR1cm5zIHRoZSBmdW5jdGlvbiBuYW1lLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGdldEZ1bmNOYW1lKGZ1bmMpIHsKICAgICAgICAgIHZhciByZXN1bHQgPSAoZnVuYy5uYW1lICsgJycpLAogICAgICAgICAgICAgIGFycmF5ID0gcmVhbE5hbWVzW3Jlc3VsdF0sCiAgICAgICAgICAgICAgbGVuZ3RoID0gaGFzT3duUHJvcGVydHkuY2FsbChyZWFsTmFtZXMsIHJlc3VsdCkgPyBhcnJheS5sZW5ndGggOiAwOwoKICAgICAgICAgIHdoaWxlIChsZW5ndGgtLSkgewogICAgICAgICAgICB2YXIgZGF0YSA9IGFycmF5W2xlbmd0aF0sCiAgICAgICAgICAgICAgICBvdGhlckZ1bmMgPSBkYXRhLmZ1bmM7CiAgICAgICAgICAgIGlmIChvdGhlckZ1bmMgPT0gbnVsbCB8fCBvdGhlckZ1bmMgPT0gZnVuYykgewogICAgICAgICAgICAgIHJldHVybiBkYXRhLm5hbWU7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIHRoZSBhcmd1bWVudCBwbGFjZWhvbGRlciB2YWx1ZSBmb3IgYGZ1bmNgLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufSBmdW5jIFRoZSBmdW5jdGlvbiB0byBpbnNwZWN0LgogICAgICAgICAqIEByZXR1cm5zIHsqfSBSZXR1cm5zIHRoZSBwbGFjZWhvbGRlciB2YWx1ZS4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBnZXRIb2xkZXIoZnVuYykgewogICAgICAgICAgdmFyIG9iamVjdCA9IGhhc093blByb3BlcnR5LmNhbGwobG9kYXNoLCAncGxhY2Vob2xkZXInKSA/IGxvZGFzaCA6IGZ1bmM7CiAgICAgICAgICByZXR1cm4gb2JqZWN0LnBsYWNlaG9sZGVyOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogR2V0cyB0aGUgYXBwcm9wcmlhdGUgIml0ZXJhdGVlIiBmdW5jdGlvbi4gSWYgYF8uaXRlcmF0ZWVgIGlzIGN1c3RvbWl6ZWQsCiAgICAgICAgICogdGhpcyBmdW5jdGlvbiByZXR1cm5zIHRoZSBjdXN0b20gbWV0aG9kLCBv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ICAgICAgICAqIEByZXR1cm5zIHsqfSBSZXR1cm5zIHRoZSBtYXAgZGF0YS4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBnZXRNYXBEYXRhKG1hcCwga2V5KSB7CiAgICAgICAgICB2YXIgZGF0YSA9IG1hcC5fX2RhdGFfXzsKICAgICAgICAgIHJldHVybiBpc0tleWFibGUoa2V5KQogICAgICAgICAgICA/IGRhdGFbdHlwZW9mIGtleSA9PSAnc3RyaW5nJyA/ICdzdHJpbmcnIDogJ2hhc2gnXQogICAgICAgICAgICA6IGRhdGEubWFwOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogR2V0cyB0aGUgcHJvcGVydHkgbmFtZXMsIHZhbHVlcywgYW5kIGNvbXBhcmUgZmxhZ3Mgb2YgYG9iamVjdGAuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvYmplY3QgVGhlIG9iamVjdCB0byBxdWVyeS4KICAgICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIG1hdGNoIGRhdGEgb2YgYG9iamVjdGAuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gZ2V0TWF0Y2hEYXRhKG9iamVjdCkgewogICAgICAgICAgdmFyIHJlc3VsdCA9IGtleXMob2JqZWN0KSwKICAgICAgICAgICAgICBsZW5ndGggPSByZXN1bHQubGVuZ3RoOwoKICAgICAgICAgIHdoaWxlIChsZW5ndGgtLSkgewogICAgICAgICAgICB2YXIga2V5ID0gcmVzdWx0W2xlbmd0aF0sCiAgICAgICAgICAgICAgICB2YWx1ZSA9IG9iamVjdFtrZXldOwoKICAgICAgICAgICAgcmVzdWx0W2xlbmd0aF0gPSBba2V5LCB2YWx1ZSwgaXNTdHJpY3RDb21wYXJhYmxlKHZhbHVlKV07CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICAgIH0KCiAgICA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IHZhbHVlW3N5bVRvU3RyaW5nVGFnXTsKCiAgICAgICAgICB0cnkgewogICAgICAgICAgICB2YWx1ZVtzeW1Ub1N0cmluZ1RhZ10gPSB1bmRlZmluZWQkMTsKICAgICAgICAgICAgdmFyIHVubWFza2VkID0gdHJ1ZTsKICAgICAgICAgIH0gY2F0Y2ggKGUpIHt9CgogICAgICAgICAgdmFyIHJlc3VsdCA9IG5hdGl2ZU9iamVjdFRvU3RyaW5nLmNhbGwodmFsdWUpOwogICAgICAgICAgaWYgKHVubWFza2VkKSB7CiAgICAgICAgICAgIGlmIChpc093bikgewogICAgICAgICAgICAgIHZhbHVlW3N5bVRvU3RyaW5nVGFnXSA9IHRhZzsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICBkZWxldGUgdmFsdWVbc3ltVG9TdHJpbmdUYWddOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhbiBhcnJheSBvZiB0aGUgb3duIGVudW1lcmFibGUgc3ltYm9scyBvZiBgb2JqZWN0YC4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IG9iamVjdCBUaGUgb2JqZWN0IHRvIHF1ZXJ5LgogICAgICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyB0aGUgYXJyYXkgb2Ygc3ltYm9scy4KICAgICAgICAgKi8KICAgICAgICB2YXIgZ2V0U3ltYm9scyA9ICFuYXRpdmVHZXRTeW1ib2xzID8gc3R1YkFycmF5IDogZnVuY3Rpb24ob2JqZWN0KSB7CiAgICAgICAgICBpZiAob2JqZWN0ID09IG51bGwpIHsKICAgICAgICAgICAgcmV0dXJuIFtdOwogICAgICAgICAgfQogICAgICAgICAgb2JqZWN0ID0gT2JqZWN0KG9iamVjdCk7CiAgICAgICAgICByZXR1cm4gYXJyYXlGaWx0ZXIobmF0aXZlR2V0U3ltYm9scyhvYmplY3QpLCBmdW5jdGlvbihzeW1ib2wpIHsKICAgICAgICAgICAgcmV0dXJuIHByb3BlcnR5SXNFbnVtZXJhYmxlLmNhbGwob2JqZWN0LCBzeW1ib2wpOwogICAgICAgICAgfSk7CiAgICAgICAgfTsKCiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhbiBhcnJheSBvZiB0aGUgb3duIGFuZCBpbmhlcml0ZWQgZW51bWVyYWJsZSBzeW1ib2xzIG9mIGBvYmplY3RgLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBvYmplY3QgdG8gcXVlcnkuCiAgICAgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBhcnJheSBvZiBzeW1ib2xzLgogICAgICAgICAqLwogICAgICAgIHZhciBnZXRTeW1ib2xzSW4gPSAhbmF0aXZlR2V0U3ltYm9scyA/IHN0dWJBcnJheSA6IGZ1bmN0aW9uKG9iamVjdCkgewogICAgICAgICAgdmFyIHJlc3VsdCA9IFtdOwogICAgICAgICAgd2hpbGUgKG9iamVjdCkgewogICAgICAgICAgICBhcnJheVB1c2gocmVzdWx0LCBnZXRTeW1ib2xzKG9iamVjdCkpOwogICAgICAgICAgICBvYmplY3QgPSBnZXRQcm90b3R5cGUob2JqZWN0KTsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgfTsKCiAgICAgICAgLyoqCiAgICAgICAgICogR2V0cyB0aGUgYHRvU3RyaW5nVGFnYCBvZiBgdmFsdWVgLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBxdWVyeS4KICAgICAgICAgKiBAcmV0dXJucyB7c3RyaW5nfSBSZXR1cm5zIHRoZSBgdG9TdHJpbmdUYWdgLgogICAgICAgICAqLwogICAgICAgIHZhciBnZXRUYWcgPSBiYXNlR2V0VGFnOwoKICAgICAgICAvLyBGYWxsYmFjayBmb3IgZGF0YSB2aWV3cywgbWFwcywgc2V0cywgYW5kIHdlYWsgbWFwcyBpbiBJRSAxMSBhbmQgcHJvbWlzZXMgaW4gTm9kZS5qcyA8IDYuCiAgICAgICAgaWYgKChEYXRhVmlldyAmJiBnZXRUYWcobmV3IERhdGFWaWV3KG5ldyBBcnJheUJ1ZmZlcigxKSkpICE9IGRhdGFWaWV3VGFnKSB8fAogICAgICAgICAgICAoTWFwICYmIGdldFRhZyhuZXcgTWFwKSAhPSBtYXBUYWcpIHx8CiAgICAgICAgICAgIChQcm9taXNlICYmIGdldFRhZyhQcm9taXNlLnJlc29sdmUoKSkgIT0gcHJvbWlzZVRhZykgfHwKICAgICAgICAgICAgKFNldCAmJiBnZXRUYWcobmV3IFNldCkgIT0gc2V0VGFnKSB8fAogICAgICAgICAgICAoV2Vha01hcCAmJiBnZXRUYWcobmV3IFdlYWtNYXApICE9IHdlYWtNYXBUYWcpKSB7CiAgICAgICAgICBnZXRUYWcgPSBmdW5jdGlvbih2YWx1ZSkgewogICAgICAgICAgICB2YXIgcmVzdWx0ID0gYmFzZUdldFRhZyh2YWx1ZSksCiAgICAgICAgICAgICAgICBDdG9yID0gcmVzdWx0ID09IG9iamVjdFRhZyA/IHZhbHVlLmNvbnN0cnVjdG9yIDogdW5kZWZpbmVkJDEsCiAgICAgICAgICAgICAgICBjdG9yU3RyaW5nID0gQ3RvciA/IHRvU291cmNlKEN0b3IpIDogJyc7CgogICAgICAgICAgICBpZiAoY3RvclN0cmluZykgewogICAgICAgICAgICAgIHN3aXRjaCAoY3RvclN0cmluZykgewogICAgICAgICAgICAgICAgY2FzZSBkYXRhVmlld0N0b3JTdHJpbmc6IHJldHVybiBkYXRhVmlld1RhZzsKICAgICAgICAgICAgICAgIGNhc2UgbWFwQ3RvclN0cmluZzogcmV0dXJuIG1hcFRhZzsKICAgICAgICAgICAgICAgIGNhc2UgcHJvbWlzZUN0b3JTdHJpbmc6IHJldHVybiBwcm9taXNlVGFnOwogICAgICAgICAgICAgICAgY2FzZSBzZXRDdG9yU3RyaW5nOiByZXR1cm4gc2V0VGFnOwogICAgICAgICAgICAgICAgY2FzZSB3ZWFrTWFwQ3RvclN0cmluZzogcmV0dXJuIHdlYWtNYXBUYWc7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgICB9OwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogR2V0cyB0aGUgdmlldywgYXBwbHlpbmcgYW55IGB0cmFuc2Zvcm1zYCB0byB0aGUgYHN0YXJ0YCBhbmQgYGVuZGAgcG9zaXRpb25zLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gc3RhcnQgVGhlIHN0YXJ0IG9mIHRoZSB2aWV3LgogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBlbmQgVGhlIGVuZCBvZiB0aGUgdmlldy4KICAgICAgICAgKiBAcGFyYW0ge0FycmF5fSB0cmFuc2Zvcm1zIFRoZSB0cmFuc2Zvcm1hdGlvbnMgdG8gYXBwbHkgdG8gdGhlIHZpZXcuCiAgICAgICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyBhbiBvYmplY3QgY29udGFpbmluZyB0aGUgYHN0YXJ0YCBhbmQgYGVuZGAKICAgICAgICAgKiAgcG9zaXRpb25zIG9mIHRoZSB2aWV3LgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGdldFZpZXcoc3RhcnQsIGVuZCwgdHJhbnNmb3JtcykgewogICAgICAgICAgdmFyIGluZGV4ID0gLTEsCiAgICAgICAgICAgICAgbGVuZ3RoID0gdHJhbnNmb3Jtcy5sZW5ndGg7CgogICAgICAgICAgd2hpbGUgKCsraW5kZXggPCBsZW5ndGgpIHsKICAgICAgICAgICAgdmFyIGRhdGEgPSB0cmFuc2Zvcm1zW2luZGV4XSwKICAgICAgICAgICAgICAgIHNpemUgPSBkYXRhLnNpemU7CgogICAgICAgICAgICBzd2l0Y2ggKGRhdGEudHlwZSkgewogICAgICAgICAgICAgIGNhc2UgJ2Ryb3AnOiAgICAgIHN0YXJ0ICs9IHNpemU7IGJyZWFrOwogICAgICAgICAgICAgIGNhc2UgJ2Ryb3BSaWdodCc6IGVuZCAtPSBzaXplOyBicmVhazsKICAgICAgICAgICAgICBjYXNlICd0YWtlJzogICAgICBlbmQgPSBuYXRpdmVNaW4oZW5kLCBzdGFydCArIHNpemUpOyBicmVhazsKICAgICAgICAgICAgICBjYXNlICd0YWtlUmlnaHQnOiBzdGFydCA9IG5hdGl2ZU1heChzdGFydCwgZW5kIC0gc2l6ZSk7IGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4geyAnc3RhcnQnOiBzdGFydCwgJ2VuZCc6IGVuZCB9OwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogRXh0cmFjdHMgd3JhcHBlciBkZXRhaWxzIGZyb20gdGhlIGBzb3VyY2VgIGJvZHkgY29tbWVudC4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IHNvdXJjZSBUaGUgc291cmNlIHRvIGluc3BlY3QuCiAgICAgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSB3cmFwcGVyIGRldGFpbHMuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gZ2V0V3JhcERldGFpbHMoc291cmNlKSB7CiAgICAgICAgICB2YXIgbWF0Y2ggPSBzb3VyY2UubWF0Y2gocmVXcmFwRGV0YWlscyk7CiAgICAgICAgICByZXR1cm4gbWF0Y2ggPyBtYXRjaFsxXS5zcGxpdChyZVNwbGl0RGV0YWlscykgOiBbXTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENoZWNrcyBpZiBgcGF0aGAgZXhpc3RzIG9uIGBvYmplY3RgLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBvYmplY3QgdG8gcXVlcnkuCiAgICAgICAgICogQHBhcmFtIHtBcnJheXxzdHJpbmd9IHBhdGggVGhlIHBhdGggdG8gY2hlY2suCiAgICAgICAgICogQHBhcmFtIHtGdW5jdGlvbn0gaGFzRnVuYyBUaGUgZnVuY3Rpb24gdG8gY2hlY2sgcHJvcGVydGllcy4KICAgICAgICAgKiBAcmV0dXJucyB7Ym9vbGVhbn0gUmV0dXJucyBgdHJ1ZWAgaWYgYHBhdGhgIGV4aXN0cywgZWxzZSBgZmFsc2VgLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGhhc1BhdGgob2JqZWN0LCBwYXRoLCBoYXNGdW5jKSB7CiAgICAgICAgICBwYXRoID0gY2FzdFBhdGgocGF0aCwgb2JqZWN0KTsKCiAgICAgICAgICB2YXIgaW5kZXggPSAtMSwKICAgICAgICAgICAgICBsZW5ndGggPSBwYXRoLmxlbmd0aCwKICAgICAgICAgICAgICByZXN1bHQgPSBmYWxzZTsKCiAgICAgICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkgewogICAgICAgICAgICB2YXIga2V5ID0gdG9LZXkocGF0aFtpbmRleF0pOwogICAgICAgICAgICBpZiAoIShyZXN1bHQgPSBvYmplY3QgIT0gbnVsbCAmJiBoYXNGdW5jKG9iamVjdCwga2V5KSkpIHsKICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQogICAgICAgICAgICBvYmplY3QgPSBvYmplY3Rba2V5XTsKICAgICAgICAgIH0KICAgICAgICAgIGlmIChyZXN1bHQgfHwgKytpbmRleCAhPSBsZW5ndGgpIHsKICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDsKICAgICAgICAgIH0KICAgICAgICAgIGxlbmd0aCA9IG9iamVjdCA9PSBudWxsID8gMCA6IG9iamVjdC5sZW5ndGg7CiAgICAgICAgICByZXR1cm4gISFsZW5ndGggJiYgaXNMZW5ndGgobGVuZ3RoKSAmJiBpc0luZGV4KGtleSwgbGVuZ3RoKSAmJgogICAgICAgICAgICAoaXNBcnJheShvYmplY3QpIHx8IGlzQXJndW1lbnRzKG9iamVjdCkpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogSW5pdGlhbGl6ZXMgYW4gYXJyYXkgY2xvbmUuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7QXJyYXl9IGFycmF5IFRoZSBhcnJheSB0byBjbG9uZS4KICAgICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIGluaXRpYWxpemVkIGNsb25lLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGluaXRDbG9uZUFycmF5KGFycmF5KSB7CiAgICAgICAgICB2YXIgbGVuZ3RoID0gYXJyYXkubGVuZ3RoLAogICAgICAgICAgICAgIHJlc3VsdCA9IG5ldyBhcnJheS5jb25zdHJ1Y3RvcihsZW5ndGgpOwoKICAgICAgICAgIC8vIEFkZCBwcm9wZXJ0aWVzIGFzc2lnbmVkIGJ5IGBSZWdFeHAjZXhlY2AuCiAgICAgICAgICBpZiAobGVuZ3RoICYmIHR5cGVvZiBhcnJheVswXSA9PSAnc3RyaW5nJyAmJiBoYXNPd25Qcm9wZXJ0eS5jYWxsKGFycmF5LCAnaW5kZXgnKSkgewogICAgICAgICAgICByZXN1bHQuaW5kZXggPSBhcnJheS5pbmRleDsKICAgICAgICAgICAgcmVzdWx0LmlucHV0ID0gYXJyYXkuaW5wdXQ7CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogSW5pdGlhbGl6ZXMg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25lLgogICAgICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgdGhlIGluaXRpYWxpemVkIGNsb25lLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGluaXRDbG9uZUJ5VGFnKG9iamVjdCwgdGFnLCBpc0RlZXApIHsKICAgICAgICAgIHZhciBDdG9yID0gb2JqZWN0LmNvbnN0cnVjdG9yOwogICAgICAgICAgc3dpdGNoICh0YWcpIHsKICAgICAgICAgICAgY2FzZSBhcnJheUJ1ZmZlclRhZzoKICAgICAgICAgICAgICByZXR1cm4gY2xvbmVBcnJheUJ1ZmZlcihvYmplY3QpOwoKICAgICAgICAgICAgY2FzZSBib29sVGFnOgogICAgICAgICAgICBjYXNlIGRhdGVUYWc6CiAgICAgICAgICAgICAgcmV0dXJuIG5ldyBDdG9yKCtvYmplY3QpOwoKICAgICAgICAgICAgY2FzZSBkYXRhVmlld1RhZzoKICAgICAgICAgICAgICByZXR1cm4gY2xvbmVEYXRhVmlldyhvYmplY3QsIGlzRGVlcCk7CgogICAgICAgICAgICBjYXNlIGZsb2F0MzJUYWc6IGNhc2UgZmxvYXQ2NFRhZzoKICAgICAgICAgICAgY2FzZSBpbnQ4VGFnOiBjYXNlIGludDE2VGFnOiBjYXNlIGludDMyVGFnOgogICAgICAgICAgICBjYXNlIHVpbnQ4VGFnOiBjYXNlIHVpbnQ4Q2xhbXBlZFRhZzogY2FzZSB1aW50MTZUYWc6IGNhc2UgdWludDMyVGFnOgogICAgICAgICAgICAgIHJldHVybiBjbG9uZVR5cGVkQXJyYXkob2JqZWN0LCBpc0RlZXApOwoKICAgICAgICAgICAgY2FzZSBtYXBUYWc6CiAgICAgICAgICAgICAgcmV0dXJuIG5ldyBDdG9yOwoKICAgICAgICAgICAgY2FzZSBudW1iZXJUYWc6CiAgICAgICAgICAgIGNhc2Ugc3RyaW5nVGFnOgogICAgICAgICAgICAgIHJldHVybiBuZXcgQ3RvcihvYmplY3QpOwoKICAgICAgICAgICAgY2FzZSByZWdleHBUYWc6CiAgICAgICAgICAgICAgcmV0dXJuIGNsb25lUmVnRXhwKG9iamVjdCk7CgogICAgICAgICAgICBjYXNlIHNldFRhZzoKICAgICAgICAgICAgICByZXR1cm4gbmV3IEN0b3I7CgogICAgICAgICAgICBjYXNlIHN5bWJvbFRhZzoKICAgICAgICAgICAgICByZXR1cm4gY2xvbmVTeW1ib2wob2JqZWN0KTsKICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIEluc2VydHMgd3JhcHBlciBgZGV0YWlsc2AgaW4gYSBjb21tZW50IGF0IHRoZSB0b3Agb2YgdGhlIGBzb3VyY2VgIGJvZHkuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBzb3VyY2UgVGhlIHNvdXJjZSB0byBtb2RpZnkuCiAgICAgICAgICogQHJldHVybnMge0FycmF5fSBkZXRhaWxzIFRoZSBkZXRhaWxzIHRvIGluc2VydC4KICAgICAgICAgKiBAcmV0dXJucyB7c3RyaW5nfSBSZXR1cm5zIHRoZSBtb2RpZmllZCBzb3VyY2UuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gaW5zZXJ0V3JhcERldGFpbHMoc291cmNlLCBkZXRhaWxzKSB7CiAgICAgICAgICB2YXIgbGVuZ3RoID0gZGV0YWlscy5sZW5ndGg7CiAgICAgICAgICBpZiAoIWxlbmd0aCkgewogICAgICAgICAgICByZXR1cm4gc291cmNlOwogICAgICAgICAgfQogICAgICAgICAgdmFyIGxhc3RJbmRleCA9IGxlbmd0aCAtIDE7CiAgICAgICAgICBkZXRhaWxzW2xhc3RJbmRleF0gPSAobGVuZ3RoID4gMSA/ICcmICcgOiAnJykgKyBkZXRhaWxzW2xhc3RJbmRleF07CiAgICAgICAgICBkZXRhaWxzID0gZGV0YWlscy5qb2luKGxlbmd0aCA+IDIgPyAnLCAnIDogJyAnKTsKICAgICAgICAgIHJldHVybi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rpb24gaXNJdGVyYXRlZUNhbGwodmFsdWUsIGluZGV4LCBvYmplY3QpIHsKICAgICAgICAgIGlmICghaXNPYmplY3Qob2JqZWN0KSkgewogICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICB9CiAgICAgICAgICB2YXIgdHlwZSA9IHR5cGVvZiBpbmRleDsKICAgICAgICAgIGlmICh0eXBlID09ICdudW1iZXInCiAgICAgICAgICAgICAgICA/IChpc0FycmF5TGlrZShvYmplY3QpICYmIGlzSW5kZXgoaW5kZXgsIG9iamVjdC5sZW5ndGgpKQogICAgICAgICAgICAgICAgOiAodHlwZSA9PSAnc3RyaW5nJyAmJiBpbmRleCBpbiBvYmplY3QpCiAgICAgICAgICAgICAgKSB7CiAgICAgICAgICAgIHJldHVybiBlcShvYmplY3RbaW5kZXhdLCB2YWx1ZSk7CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDaGVja3MgaWYgYHZhbHVlYCBpcyBhIHByb3BlcnR5IG5hbWUgYW5kIG5vdCBhIHByb3BlcnR5IHBhdGguCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIGNoZWNrLgogICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBbb2JqZWN0XSBUaGUgb2JqZWN0IHRvIHF1ZXJ5IGtleXMgb24uCiAgICAgICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIGB2YWx1ZWAgaXMgYSBwcm9wZXJ0eSBuYW1lLCBlbHNlIGBmYWxzZWAuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gaXNLZXkodmFsdWUsIG9iamVjdCkgewogICAgICAgICAgaWYgKGlzQXJyYXkodmFsdWUpKSB7CiAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgIH0KICAgICAgICAgIHZhciB0eXBlID0gdHlwZW9mIHZhbHVlOwogICAgICAgICAgaWYgKHR5cGUgPT0gJ251bWJlcicgfHwgdHlwZSA9PSAnc3ltYm9sJyB8fCB0eXBlID09ICdib29sZWFuJyB8fAogICAgICAgICAgICAgIHZhbHVlID09IG51bGwgfHwgaXNTeW1ib2wodmFsdWUpKSB7CiAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIHJlSXNQbGFpblByb3AudGVzdCh2YWx1ZSkgfHwgIXJlSXNEZWVwUHJvcC50ZXN0KHZhbHVlKSB8fAogICAgICAgICAgICAob2JqZWN0ICE9IG51bGwgJiYgdmFsdWUgaW4gT2JqZWN0KG9iamVjdCkpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ2hlY2tzIGlmIGB2YWx1ZWAgaXMgc3VpdGFibGUgZm9yIHVzZSBhcyB1bmlxdWUgb2JqZWN0IGtleS4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gY2hlY2suCiAgICAgICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIGB2YWx1ZWAgaXMgc3VpdGFibGUsIGVsc2UgYGZhbHNlYC4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBpc0tleWFibGUodmFsdWUpIHsKICAgICAgICAgIHZhciB0eXBlID0gdHlwZW9mIHZhbHVlOwogICAgICAgICAgcmV0dXJuICh0eXBlID09ICdzdHJpbmcnIHx8IHR5cGUgPT0gJ251bWJlcicgfHwgdHlwZSA9PSAnc3ltYm9sJyB8fCB0eXBlID09ICdib29sZWFuJykKICAgICAgICAgICAgPyAodmFsdWUgIT09ICdfX3Byb3RvX18nKQogICAgICAgICAgICA6ICh2YWx1ZSA9PT0gbnVsbCk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDaGVja3MgaWYgYGZ1bmNgIGhhcyBhIGxhenkgY291bnRlcnBhcnQuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IGZ1bmMgVGhlIGZ1bmN0aW9uIHRvIGNoZWNrLgogICAgICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiBgZnVuY2AgaGFzIGEgbGF6eSBjb3VudGVycGFydCwKICAgICAgICAgKiAgZWxzZSBgZmFsc2VgLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGlzTGF6aWFibGUoZnVuYykgewogICAgICAgICAgdmFyIGZ1bmNOYW1lID0gZ2V0RnVuY05hbWUoZnVuYyksCiAgICAgICAgICAgICAgb3RoZXIgPSBsb2Rhc2hbZnVuY05hbWVdOwoKICAgICAgICAgIGlmICh0eXBlb2Ygb3RoZXIgIT0gJ2Z1bmN0aW9uJyB8fCAhKGZ1bmNOYW1lIGluIExhenlXcmFwcGVyLnByb3RvdHlwZSkpIHsKICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgfQogICAgICAgICAgaWYgKGZ1bmMgPT09IG90aGVyKSB7CiAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgfQogICAgICAgICAgdmFyIGRhdGEgPSBnZXREYXRhKG90aGVyKTsKICAgICAgICAgIHJldHVybiAhIWRhdGEgJiYgZnVuYyA9PT0gZGF0YVswXTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENoZWNrcyBpZiBgZnVuY2AgaGFzIGl0cyBzb3VyY2UgbWFza2VkLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufSBmdW5jIFRoZSBmdW5jdGlvbiB0byBjaGVjay4KICAgICAgICAgKiBAcmV0dXJucyB7Ym9vbGVhbn0gUmV0dXJucyBgdH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3Rpb24nICYmIEN0b3IucHJvdG90eXBlKSB8fCBvYmplY3RQcm90bzsKCiAgICAgICAgICByZXR1cm4gdmFsdWUgPT09IHByb3RvOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ2hlY2tzIGlmIGB2YWx1ZWAgaXMgc3VpdGFibGUgZm9yIHN0cmljdCBlcXVhbGl0eSBjb21wYXJpc29ucywgaS5lLiBgPT09YC4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gY2hlY2suCiAgICAgICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIGB2YWx1ZWAgaWYgc3VpdGFibGUgZm9yIHN0cmljdAogICAgICAgICAqICBlcXVhbGl0eSBjb21wYXJpc29ucywgZWxzZSBgZmFsc2VgLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGlzU3RyaWN0Q29tcGFyYWJsZSh2YWx1ZSkgewogICAgICAgICAgcmV0dXJuIHZhbHVlID09PSB2YWx1ZSAmJiAhaXNPYmplY3QodmFsdWUpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQSBzcGVjaWFsaXplZCB2ZXJzaW9uIG9mIGBtYXRjaGVzUHJvcGVydHlgIGZvciBzb3VyY2UgdmFsdWVzIHN1aXRhYmxlCiAgICAgICAgICogZm9yIHN0cmljdCBlcXVhbGl0eSBjb21wYXJpc29ucywgaS5lLiBgPT09YC4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IGtleSBUaGUga2V5IG9mIHRoZSBwcm9wZXJ0eSB0byBnZXQuCiAgICAgICAgICogQHBhcmFtIHsqfSBzcmNWYWx1ZSBUaGUgdmFsdWUgdG8gbWF0Y2guCiAgICAgICAgICogQHJldHVybnMge0Z1bmN0aW9ufSBSZXR1cm5zIHRoZSBuZXcgc3BlYyBmdW5jdGlvbi4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBtYXRjaGVzU3RyaWN0Q29tcGFyYWJsZShrZXksIHNyY1ZhbHVlKSB7CiAgICAgICAgICByZXR1cm4gZnVuY3Rpb24ob2JqZWN0KSB7CiAgICAgICAgICAgIGlmIChvYmplY3QgPT0gbnVsbCkgewogICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gb2JqZWN0W2tleV0gPT09IHNyY1ZhbHVlICYmCiAgICAgICAgICAgICAgKHNyY1ZhbHVlICE9PSB1bmRlZmluZWQkMSB8fCAoa2V5IGluIE9iamVjdChvYmplY3QpKSk7CiAgICAgICAgICB9OwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQSBzcGVjaWFsaXplZCB2ZXJzaW9uIG9mIGBfLm1lbW9pemVgIHdoaWNoIGNsZWFycyB0aGUgbWVtb2l6ZWQgZnVuY3Rpb24ncwogICAgICAgICAqIGNhY2hlIHdoZW4gaXQgZXhjZWVkcyBgTUFYX01FTU9JWkVfU0laRWAuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IGZ1bmMgVGhlIGZ1bmN0aW9uIHRvIGhhdmUgaXRzIG91dHB1dCBtZW1vaXplZC4KICAgICAgICAgKiBAcmV0dXJucyB7RnVuY3Rpb259IFJldHVybnMgdGhlIG5ldyBtZW1vaXplZCBmdW5jdGlvbi4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBtZW1vaXplQ2FwcGVkKGZ1bmMpIHsKICAgICAgICAgIHZhciByZXN1bHQgPSBtZW1vaXplKGZ1bmMsIGZ1bmN0aW9uKGtleSkgewogICAgICAgICAgICBpZiAoY2FjaGUuc2l6ZSA9PT0gTUFYX01FTU9JWkVfU0laRSkgewogICAgICAgICAgICAgIGNhY2hlLmNsZWFyKCk7C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ICAgICAgIHJldHVybiBkYXRhOwogICAgICAgICAgfQogICAgICAgICAgLy8gVXNlIHNvdXJjZSBgdGhpc0FyZ2AgaWYgYXZhaWxhYmxlLgogICAgICAgICAgaWYgKHNyY0JpdG1hc2sgJiBXUkFQX0JJTkRfRkxBRykgewogICAgICAgICAgICBkYXRhWzJdID0gc291cmNlWzJdOwogICAgICAgICAgICAvLyBTZXQgd2hlbiBjdXJyeWluZyBhIGJvdW5kIGZ1bmN0aW9uLgogICAgICAgICAgICBuZXdCaXRtYXNrIHw9IGJpdG1hc2sgJiBXUkFQX0JJTkRfRkxBRyA/IDAgOiBXUkFQX0NVUlJZX0JPVU5EX0ZMQUc7CiAgICAgICAgICB9CiAgICAgICAgICAvLyBDb21wb3NlIHBhcnRpYWwgYXJndW1lbnRzLgogICAgICAgICAgdmFyIHZhbHVlID0gc291cmNlWzNdOwogICAgICAgICAgaWYgKHZhbHVlKSB7CiAgICAgICAgICAgIHZhciBwYXJ0aWFscyA9IGRhdGFbM107CiAgICAgICAgICAgIGRhdGFbM10gPSBwYXJ0aWFscyA/IGNvbXBvc2VBcmdzKHBhcnRpYWxzLCB2YWx1ZSwgc291cmNlWzRdKSA6IHZhbHVlOwogICAgICAgICAgICBkYXRhWzRdID0gcGFydGlhbHMgPyByZXBsYWNlSG9sZGVycyhkYXRhWzNdLCBQTEFDRUhPTERFUikgOiBzb3VyY2VbNF07CiAgICAgICAgICB9CiAgICAgICAgICAvLyBDb21wb3NlIHBhcnRpYWwgcmlnaHQgYXJndW1lbnRzLgogICAgICAgICAgdmFsdWUgPSBzb3VyY2VbNV07CiAgICAgICAgICBpZiAodmFsdWUpIHsKICAgICAgICAgICAgcGFydGlhbHMgPSBkYXRhWzVdOwogICAgICAgICAgICBkYXRhWzVdID0gcGFydGlhbHMgPyBjb21wb3NlQXJnc1JpZ2h0KHBhcnRpYWxzLCB2YWx1ZSwgc291cmNlWzZdKSA6IHZhbHVlOwogICAgICAgICAgICBkYXRhWzZdID0gcGFydGlhbHMgPyByZXBsYWNlSG9sZGVycyhkYXRhWzVdLCBQTEFDRUhPTERFUikgOiBzb3VyY2VbNl07CiAgICAgICAgICB9CiAgICAgICAgICAvLyBVc2Ugc291cmNlIGBhcmdQb3NgIGlmIGF2YWlsYWJsZS4KICAgICAgICAgIHZhbHVlID0gc291cmNlWzddOwogICAgICAgICAgaWYgKHZhbHVlKSB7CiAgICAgICAgICAgIGRhdGFbN10gPSB2YWx1ZTsKICAgICAgICAgIH0KICAgICAgICAgIC8vIFVzZSBzb3VyY2UgYGFyeWAgaWYgaXQncyBzbWFsbGVyLgogICAgICAgICAgaWYgKHNyY0JpdG1hc2sgJiBXUkFQX0FSWV9GTEFHKSB7CiAgICAgICAgICAgIGRhdGFbOF0gPSBkYXRhWzhdID09IG51bGwgPyBzb3VyY2VbOF0gOiBuYXRpdmVNaW4oZGF0YVs4XSwgc291cmNlWzhdKTsKICAgICAgICAgIH0KICAgICAgICAgIC8vIFVzZSBzb3VyY2UgYGFyaXR5YCBpZiBvbmUgaXMgbm90IHByb3ZpZGVkLgogICAgICAgICAgaWYgKGRhdGFbOV0gPT0gbnVsbCkgewogICAgICAgICAgICBkYXRhWzldID0gc291cmNlWzldOwogICAgICAgICAgfQogICAgICAgICAgLy8gVXNlIHNvdXJjZSBgZnVuY2AgYW5kIG1lcmdlIGJpdG1hc2tzLgogICAgICAgICAgZGF0YVswXSA9IHNvdXJjZVswXTsKICAgICAgICAgIGRhdGFbMV0gPSBuZXdCaXRtYXNrOwoKICAgICAgICAgIHJldHVybiBkYXRhOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogVGhpcyBmdW5jdGlvbiBpcyBsaWtlCiAgICAgICAgICogW2BPYmplY3Qua2V5c2BdKGh0dHA6Ly9lY21hLWludGVybmF0aW9uYWwub3JnL2VjbWEtMjYyLzcuMC8jc2VjLW9iamVjdC5rZXlzKQogICAgICAgICAqIGV4Y2VwdCB0aGF0IGl0IGluY2x1ZGVzIGluaGVyaXRlZCBlbnVtZXJhYmxlIHByb3BlcnRpZXMuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvYmplY3QgVGhlIG9iamVjdCB0byBxdWVyeS4KICAgICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIGFycmF5IG9mIHByb3BlcnR5IG5hbWVzLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIG5hdGl2ZUtleXNJbihvYmplY3QpIHsKICAgICAgICAgIHZhciByZXN1bHQgPSBbXTsKICAgICAgICAgIGlmIChvYmplY3QgIT0gbnVsbCkgewogICAgICAgICAgICBmb3IgKHZhciBrZXkgaW4gT2JqZWN0KG9iamVjdCkpIHsKICAgICAgICAgICAgICByZXN1bHQucHVzaChrZXkpOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ29udmVydHMgYHZhbHVlYCB0byBhIHN0cmluZyB1c2luZyBgT2JqZWN0LnByb3RvdHlwZS50b1N0cmluZ2AuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIGNvbnZlcnQuCiAgICAgICAgICogQHJldHVybnMge3N0cmluZ30gUmV0dXJucyB0aGUgY29udmVydGVkIHN0cmluZy4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBvYmplY3RUb1N0cmluZyh2YWx1ZSkgewogICAgICAgICAgcmV0dXJuIG5hdGl2ZU9iamVjdFRvU3RyaW5nLmNhbGwodmFsdWUpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQSBzcGVjaWFsaXplZCB2ZXJzaW9uIG9mIGBiYXNlUmVzdGAgd2hpY2ggdHJhbnNmb3JtcyB0aGUgcmVzdCBhcnJheS4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHtGdW5jdGlvbn0gZnVuYyBUaGUgZnVuY3Rpb24gdG8gYXBwbHkgYSByZXN0IHBhcmFtZXRlciB0by4KICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gW3N0YXJ0PWZ1bmMubGVuZ3RoLTFdIFRoZSBzdGFydCBwb3NpdGlvbiBvZiB0aGUgcmVzdCBwYXJhbWV0ZXIuCiAgICAgICAgICogQHBhcmFtIHtGdW5jdGlvbn0gdHJhbnNmb3JtIFRoZSByZXN0IGFycmF5IHRyYW5zZm9ybS4KICAgICAgICAgKiBAcmV0dXJucyB7RnVuY3Rpb259IFJldHVybnMgdGhlIG5ldyBmdW5jdGlvbi4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBvdmVyUmVzdChmdW5jLCBzdGFydCwgdHJhbnNmb3JtKSB7CiAgICAgICAgICBzdGFydCA9IG5hdGl2ZU1heChzdGFydCA9PT0gdW5kZWZpbmVkJDEgPyAoZnVuYy5sZW5ndGggLSAxKSA6IHN0YXJ0LCAwKTsKICAgICAgICAgIHJldHVybiBmdW5jdGlvbigpIHsKICAgICAgICAgICAgdmFyIGFyZ3MgPSBhcmd1bWVudHMsCiAgICAgICAgICAgICAgICBpbmRleCA9IC0xLAogICAgICAgICAgICAgICAgbGVuZ3RoID0gbmF0aXZlTWF4KGFyZ3MubGVuZ3RoIC0gc3RhcnQsIDApLAogICAgICAgICAgICAgICAgYXJyYXkgPSBBcnJheShsZW5ndGgpOwoKICAgICAgICAgICAgd2hpbGUgKCsraW5kZXggPCBsZW5ndGgpIHsKICAgICAgICAgICAgICBhcnJheVtpbmRleF0gPSBhcmdzW3N0YXJ0ICsgaW5kZXhdOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGluZGV4ID0gLTE7CiAgICAgICAgICAgIHZhciBvdGhlckFyZ3MgPSBBcnJheShzdGFydCArIDEpOwogICAgICAgICAgICB3aGlsZ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ZWNvbmQgZWxlbWVudCwgYW5kIHNvIG9uLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge0FycmF5fSBhcnJheSBUaGUgYXJyYXkgdG8gcmVvcmRlci4KICAgICAgICAgKiBAcGFyYW0ge0FycmF5fSBpbmRleGVzIFRoZSBhcnJhbmdlZCBhcnJheSBpbmRleGVzLgogICAgICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyBgYXJyYXlgLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHJlb3JkZXIoYXJyYXksIGluZGV4ZXMpIHsKICAgICAgICAgIHZhciBhcnJMZW5ndGggPSBhcnJheS5sZW5ndGgsCiAgICAgICAgICAgICAgbGVuZ3RoID0gbmF0aXZlTWluKGluZGV4ZXMubGVuZ3RoLCBhcnJMZW5ndGgpLAogICAgICAgICAgICAgIG9sZEFycmF5ID0gY29weUFycmF5KGFycmF5KTsKCiAgICAgICAgICB3aGlsZSAobGVuZ3RoLS0pIHsKICAgICAgICAgICAgdmFyIGluZGV4ID0gaW5kZXhlc1tsZW5ndGhdOwogICAgICAgICAgICBhcnJheVtsZW5ndGhdID0gaXNJbmRleChpbmRleCwgYXJyTGVuZ3RoKSA/IG9sZEFycmF5W2luZGV4XSA6IHVuZGVmaW5lZCQxOwogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIGFycmF5OwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogR2V0cyB0aGUgdmFsdWUgYXQgYGtleWAsIHVubGVzcyBga2V5YCBpcyAiX19wcm90b19fIiBvciAiY29uc3RydWN0b3IiLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBvYmplY3QgdG8gcXVlcnkuCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IGtleSBUaGUga2V5IG9mIHRoZSBwcm9wZXJ0eSB0byBnZXQuCiAgICAgICAgICogQHJldHVybnMgeyp9IFJldHVybnMgdGhlIHByb3BlcnR5IHZhbHVlLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHNhZmVHZXQob2JqZWN0LCBrZXkpIHsKICAgICAgICAgIGlmIChrZXkgPT09ICdjb25zdHJ1Y3RvcicgJiYgdHlwZW9mIG9iamVjdFtrZXldID09PSAnZnVuY3Rpb24nKSB7CiAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgIH0KCiAgICAgICAgICBpZiAoa2V5ID09ICdfX3Byb3RvX18nKSB7CiAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgIH0KCiAgICAgICAgICByZXR1cm4gb2JqZWN0W2tleV07CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIG1ldGFkYXRhIGZvciBgZnVuY2AuCiAgICAgICAgICoKICAgICAgICAgKiAqKk5vdGU6KiogSWYgdGhpcyBmdW5jdGlvbiBiZWNvbWVzIGhvdCwgaS5lLiBpcyBpbnZva2VkIGEgbG90IGluIGEgc2hvcnQKICAgICAgICAgKiBwZXJpb2Qgb2YgdGltZSwgaXQgd2lsbCB0cmlwIGl0cyBicmVha2VyIGFuZCB0cmFuc2l0aW9uIHRvIGFuIGlkZW50aXR5CiAgICAgICAgICogZnVuY3Rpb24gdG8gYXZvaWQgZ2FyYmFnZSBjb2xsZWN0aW9uIHBhdXNlcyBpbiBWOC4gU2VlCiAgICAgICAgICogW1Y4IGlzc3VlIDIwNzBdKGh0dHBzOi8vYnVncy5jaHJvbWl1bS5vcmcvcC92OC9pc3N1ZXMvZGV0YWlsP2lkPTIwNzApCiAgICAgICAgICogZm9yIG1vcmUgZGV0YWlscy4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHtGdW5jdGlvbn0gZnVuYyBUaGUgZnVuY3Rpb24gdG8gYXNzb2NpYXRlIG1ldGFkYXRhIHdpdGguCiAgICAgICAgICogQHBhc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AgICAgKiBAcmV0dXJucyB7RnVuY3Rpb259IFJldHVybnMgYGZ1bmNgLgogICAgICAgICAqLwogICAgICAgIHZhciBzZXRUb1N0cmluZyA9IHNob3J0T3V0KGJhc2VTZXRUb1N0cmluZyk7CgogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgdGhlIGB0b1N0cmluZ2AgbWV0aG9kIG9mIGB3cmFwcGVyYCB0byBtaW1pYyB0aGUgc291cmNlIG9mIGByZWZlcmVuY2VgCiAgICAgICAgICogd2l0aCB3cmFwcGVyIGRldGFpbHMgaW4gYSBjb21tZW50IGF0IHRoZSB0b3Agb2YgdGhlIHNvdXJjZSBib2R5LgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufSB3cmFwcGVyIFRoZSBmdW5jdGlvbiB0byBtb2RpZnkuCiAgICAgICAgICogQHBhcmFtIHtGdW5jdGlvbn0gcmVmZXJlbmNlIFRoZSByZWZlcmVuY2UgZnVuY3Rpb24uCiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IGJpdG1hc2sgVGhlIGJpdG1hc2sgZmxhZ3MuIFNlZSBgY3JlYXRlV3JhcGAgZm9yIG1vcmUgZGV0YWlscy4KICAgICAgICAgKiBAcmV0dXJucyB7RnVuY3Rpb259IFJldHVybnMgYHdyYXBwZXJgLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHNldFdyYXBUb1N0cmluZyh3cmFwcGVyLCByZWZlcmVuY2UsIGJpdG1hc2spIHsKICAgICAgICAgIHZhciBzb3VyY2UgPSAocmVmZXJlbmNlICsgJycpOwogICAgICAgICAgcmV0dXJuIHNldFRvU3RyaW5nKHdyYXBwZXIsIGluc2VydFdyYXBEZXRhaWxzKHNvdXJjZSwgdXBkYXRlV3JhcERldGFpbHMoZ2V0V3JhcERldGFpbHMoc291cmNlKSwgYml0bWFzaykpKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYSBmdW5jdGlvbiB0aGF0J2xsIHNob3J0IG91dCBhbmQgaW52b2tlIGBpZGVudGl0eWAgaW5zdGVhZAogICAgICAgICAqIG9mIGBmdW5jYCB3aGVuIGl0J3MgY2FsbGVkIGBIT1RfQ09VTlRgIG9yIG1vcmUgdGltZXMgaW4gYEhPVF9TUEFOYAogICAgICAgICAqIG1pbGxpc2Vjb25kcy4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHtGdW5jdGlvbn0gZnVuYyBUaGUgZnVuY3Rpb24gdG8gcmVzdHJpY3QuCiAgICAgICAgICogQHJldHVybnMge0Z1bmN0aW9ufSBSZXR1cm5zIHRoZSBuZXcgc2hvcnRhYmxlIGZ1bmN0aW9uLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHNob3J0T3V0KGZ1bmMpIHsKICAgICAgICAgIHZhciBjb3VudCA9IDAsCiAgICAgICAgICAgICAgbGFzdENhbGxlZCA9IDA7CgogICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uKCkgewogICAgICAgICAgICB2YXIgc3RhbXAgPSBuYXRpdmVOb3coKSwKICAgICAgICAgICAgICAgIHJlbWFpbmluZyA9IEhPVF9TUEFOIC0gKHN0YW1wIC0gbGFzdENhbGxlZCk7CgogICAgICAgICAgICBsYXN0Q2FsbGVkID0gc3RhbXA7CiAgICAgICAgICAgIGlmIChyZW1haW5pbmcgPiAwKSB7CiAgICAgICAgICAgICAgaWYgKCsrY291bnQgPj0gSE9UX0NPVU5UKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gYXJndW1lbnRzWzBdOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICBjb3VudCA9IDA7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIGZ1bmMuYXBwbHkodW5kZWZpbmVkJDEsIGFyZ3VtZW50cyk7CiAgICAgICAgICB9OwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQSBzcGVjaWFsaXplZCB2ZXJzaW9uIG9mIGBfLnNodWZmbGVgIHdoaWNoIG11dGF0ZXMgYW5kIHNldHMgdGhlIHNpemUgb2YgYGFycmF5YC4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHtBcnJheX0gYXJyYXkgVGhlIGFycmF5IHRvIHNodWZmbGUuCiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IFtzaXplPWFycmF5Lmxlbmd0aF0gVGhlIHNpemUgb2YgYGFycmF5YC4KICAgICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgYGFycmF5YC4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBzaHVmZmxlU2VsZihhcnJheSwgc2l6ZSkgewogICAgICAgICAgdmFyIGluZGV4ID0gLTEsCiAgICAgICAgICAgICAgbGVuZ3RoID0gYXJyYXkubGVuZ3RoLAogICAgICAgICAgICAgIGxhc3RJbmRleCA9IGxlbmd0aCAtIDE7CgogICAgICAgICAgc2l6ZSA9IHNpemUgPT09IHVuZGVmaW5lZCQxID8gbGVuZ3RoIDogc2l6ZTsKICAgICAgICAgIHdoaWxlICgrK2luZGV4IDwgc2l6ZSkgewogICAgICAgICAgICB2YXIgcmFuZCA9IGJhc2VSYW5kb20oaW5kZXgsIGxhc3RJbmRleCksCiAgICAgICAgICAgICAgICB2YWx1ZSA9IGFycmF5W3JhbmRdOwoKICAgICAgICAgICAgYXJyYXlbcmFuZF0gPSBhcnJheVtpbmRleF07CiAgICAgICAgICAgIGFycmF5W2luZGV4XSA9IHZhbHVlOwogICAgICAgICAgfQogICAgICAgICAgYXJyYXkubGVuZ3RoID0gc2l6ZTsKICAgICAgICAgIHJldHVybiBhcnJheTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENvbnZlcnRzIGBzdHJpbmdgIHRvIGEgcHJvcGVydHkgcGF0aCBhcnJheS4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IHN0cmluZyBUaGUgc3RyaW5nIHRvIGNvbnZlcnQuCiAgICAgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBwcm9wZXJ0eSBwYXRoIGFycmF5LgogICAgICAgICAqLwogICAgICAgIHZhciBzdHJpbmdUb1BhdGggPSBtZW1vaXplQ2FwcGVkKGZ1bmN0aW9uKHN0cmluZykgewogICAgICAgICAgdmFyIHJlc3VsdCA9IFtdOwogICAgICAgICAgaWYgKHN0cmluZy5jaGFyQ29kZUF0KDApID09PSA0NiAvKiAuICovKSB7CiAgICAgICAgICAgIHJlc3VsdC5wdXNoKCcnKTsKICAgICAgICAgIH0KICAgICAgICAgIHN0cmluZy5yZXBsYWNlKHJlUHJvcE5hbWUsIGZ1bmN0aW9uKG1hdGNoLCBudW1iZXIsIHF1b3RlLCBzdWJTdHJpbmcpIHsKICAgICAgICAgICAgcmVzdWx0LnB1c2gocXVvdGUgPyBzdWJTdHJpbmcucmVwbGFjZShyZUVzY2FwZUNoYXIsICckMScpIDogKG51bWJlciB8fCBtYXRjaCkpOwogICAgICAgICAgfSk7CiAgICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICAgIH0pOwoKICAgICAgICAvKioKICAgICAgICAgKiBDb252ZXJ0cyBgdmFsdWVgIHRvIGEgc3RyaW5nIGtleSBpZiBpdCdzIG5vdCBhIHN0cmluZyBvciBzeW1ib2wuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIGluc3BlY3QuCiAgICAgICAgICogQHJldHVybnMge3N0cmluZ3xzeW1ib2x9IFJldHVybnMgdGhlIGtleS4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiB0b0tleSh2YWx1ZSkgewogICAgICAgICAgaWYgKHR5cGVvZiB2YWx1ZSA9PSAnc3RyaW5nJyB8fCBpc1N5bWJvbCh2YWx1ZSkpIHsKICAgICAgICAgICAgcmV0dXJuIHZhbHVlOwogICAgICAgICAgfQogICAgICAgICAgdmFyIHJlc3VsdCA9ICh2YWx1ZSArICcnKTsKICAgICAgICAgIHJldHVybiAocmVzdWx0ID09ICcwJyAmJiAoMSAvIHZhbHVlKSA9PSAtSU5GSU5JVFkpID8gJy0wJyA6IHJlc3VsdDsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENvbnZlcnRzIGBmdW5jYCB0byBpdHMgc291cmNlIGNvZGUuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IGZ1bmMgVGhlIGZ1bmN0aW9uIHRvIGNvbnZlcnQuCiAgICAgICAgICogQHJldHVybnMge3N0cmluZ30gUmV0dXJucyB0aGUgc291cmNlIGNvZGUuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gdG9Tb3VyY2UoZnVuYykgewogICAgICAgICAgaWYgKGZ1bmMgIT0gbnVsbCkgewogICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgIHJldHVybiBmdW5jVG9TdHJpbmcuY2FsbChmdW5jKTsKICAgICAgICAgICAgfSBjYXRjaCAoZSkge30KICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICByZXR1cm4gKGZ1bmMgKyAnJyk7CiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHt9CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gJyc7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBVcGRhdGVzIHdyYXBwZXIgYGRldGFpbHNgIGJhc2VkIG9uIGBiaXRtYXNrYCBmbGFncy4KICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybnMge0FycmF5fSBkZXRhaWxzIFRoZSBkZXRhaWxzIHRvIG1vZGlmeS4KICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gYml0bWFzayBUaGUgYml0bWFzayBmbGFncy4gU2VlIGBjcmVhdGVXcmFwYCBmb3IgbW9yZSBkZXRhaWxzLgogICAgICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyBgZGV0YWlsc2AuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gdXBkYXRlV3JhcERldGFpbHMoZGV0YWlscywgYml0bWFzaykgewogICAgICAgICAgYXJyYXlFYWNoKHdyYXBGbGFncywgZnVuY3Rpb24ocGFpcikgewogICAgICAgICAgICB2YXIgdmFsdWUgPSAnXy4nICsgcGFpclswXTsKICAgICAgICAgICAgaWYgKChiaXRtYXNrICYgcGFpclsxXSkgJiYgIWFycmF5SW5jbHVkZXMoZGV0YWlscywgdmFsdWUpKSB7CiAgICAgICAgICAgICAgZGV0YWlscy5wdXNoKHZhbHVlKTsKICAgICAgICAgICAgfQogICAgICAgICAgfSk7CiAgICAgICAgICByZXR1cm4gZGV0YWlscy5zb3J0KCk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDcmVhdGVzIGEgY2xvbmUgb2YgYHdyYXBwZXJgLgogICAgICAgICAqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gd3JhcHBlciBUaGUgd3JhcHBlciB0byBjbG9uZS4KICAgICAgICAgKiBAcmV0dXJucyB7T2JqZWN0fSBSZXR1cm5zIHRoZSBjbG9uZWQgd3JhcHBlci4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiB3cmFwcGVyQ2xvbmUod3JhcHBlcikgewogICAgICAgICAgaWYgKHdyYXBwZXIgaW5zdGFuY2VvZiBMYXp5V3JhcHBlcikgewogICAgICAgICAgICByZXR1cm4gd3JhcHBlci5jbG9uZSgpOwogICAgICAgICAgfQogICAgICAgICAgdmFyIHJlc3VsdCA9IG5ldyBMb2Rhc2hXcmFwcGVyKHdyYXBwZXIuX193cm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heX0gUmV0dXJucyB0aGUgbmV3IGFycmF5IG9mIGNodW5rcy4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy5jaHVuayhbJ2EnLCAnYicsICdjJywgJ2QnXSwgMik7CiAgICAgICAgICogLy8gPT4gW1snYScsICdiJ10sIFsnYycsICdkJ11dCiAgICAgICAgICoKICAgICAgICAgKiBfLmNodW5rKFsnYScsICdiJywgJ2MnLCAnZCddLCAzKTsKICAgICAgICAgKiAvLyA9PiBbWydhJywgJ2InLCAnYyddLCBbJ2QnXV0KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBjaHVuayhhcnJheSwgc2l6ZSwgZ3VhcmQpIHsKICAgICAgICAgIGlmICgoZ3VhcmQgPyBpc0l0ZXJhdGVlQ2FsbChhcnJheSwgc2l6ZSwgZ3VhcmQpIDogc2l6ZSA9PT0gdW5kZWZpbmVkJDEpKSB7CiAgICAgICAgICAgIHNpemUgPSAxOwogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgc2l6ZSA9IG5hdGl2ZU1heCh0b0ludGVnZXIoc2l6ZSksIDApOwogICAgICAgICAgfQogICAgICAgICAgdmFyIGxlbmd0aCA9IGFycmF5ID09IG51bGwgPyAwIDogYXJyYXkubGVuZ3RoOwogICAgICAgICAgaWYgKCFsZW5ndGggfHwgc2l6ZSA8IDEpIHsKICAgICAgICAgICAgcmV0dXJuIFtdOwogICAgICAgICAgfQogICAgICAgICAgdmFyIGluZGV4ID0gMCwKICAgICAgICAgICAgICByZXNJbmRleCA9IDAsCiAgICAgICAgICAgICAgcmVzdWx0ID0gQXJyYXkobmF0aXZlQ2VpbChsZW5ndGggLyBzaXplKSk7CgogICAgICAgICAgd2hpbGUgKGluZGV4IDwgbGVuZ3RoKSB7CiAgICAgICAgICAgIHJlc3VsdFtyZXNJbmRleCsrXSA9IGJhc2VTbGljZShhcnJheSwgaW5kZXgsIChpbmRleCArPSBzaXplKSk7CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhbiBhcnJheSB3aXRoIGFsbCBmYWxzZXkgdmFsdWVzIHJlbW92ZWQuIFRoZSB2YWx1ZXMgYGZhbHNlYCwgYG51bGxgLAogICAgICAgICAqIGAwYCwgYCIiYCwgYHVuZGVmaW5lZGAsIGFuZCBgTmFOYCBhcmUgZmFsc2V5LgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDAuMS4wCiAgICAgICAgICogQGNhdGVnb3J5IEFycmF5CiAgICAgICAgICogQHBhcmFtIHtBcnJheX0gYXJyYXkgVGhlIGFycmF5IHRvIGNvbXBhY3QuCiAgICAgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBuZXcgYXJyYXkgb2YgZmlsdGVyZWQgdmFsdWVzLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLmNvbXBhY3QoWzAsIDEsIGZhbHNlLCAyLCAnJywgM10pOwogICAgICAgICAqIC8vID0+IFsxLCAyLCAzXQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGNvbXBhY3QoYXJyYXkpIHsKICAgICAgICAgIHZhciBpbmRleCA9IC0xLAogICAgICAgICAgICAgIGxlbmd0aCA9IGFycmF5ID09IG51bGwgPyAwIDogYXJyYXkubGVuZ3RoLAogICAgICAgICAgICAgIHJlc0luZGV4ID0gMCwKICAgICAgICAgICAgICByZXN1bHQgPSBbXTsKCiAgICAgICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkgewogICAgICAgICAgICB2YXIgdmFsdWUgPSBhcnJheVtpbmRleF07CiAgICAgICAgICAgIGlmICh2YWx1ZSkgewogICAgICAgICAgICAgIHJlc3VsdFtyZXNJbmRleCsrXSA9IHZhbHVlOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhIG5ldyBhcnJheSBjb25jYXRlbmF0aW5nIGBhcnJheWAgd2l0aCBhbnkgYWRkaXRpb25hbCBhcnJheXMKICAgICAgICAgKiBhbmQvb3IgdmFsdWVzLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDQuMC4wCiAgICAgICAgICogQGNhdGVnb3J5IEFycmF5CiAgICAgICAgICogQHBhcmFtIHtBcnJheX0gYXJyYXkgVGhlIGFycmF5IHRvIGNvbmNhdGVuYXRlLgogICAgICAgICAqIEBwYXJhbSB7Li4uKn0gW3ZhbHVlc10gVGhlIHZhbHVlcyB0byBjb25jYXRlbmF0ZS4KICAgICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIG5ldyBjb25jYXRlbmF0ZWQgYXJyYXkuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIHZhciBhcnJheSA9IFsxXTsKICAgICAgICAgKiB2YXIgb3RoZXIgPSBfLmNvbmNhdChhcnJheSwgMiwgWzNdLCBbWzRdXSk7CiAgICAgICAgICoKICAgICAgICAgKiBjb25zb2xlLmxvZyhvdGhlcik7CiAgICAgICAgICogLy8gPT4gWzEsIDIsIDMsIFs0XV0KICAgICAgICAgKgogICAgICAgICAqIGNvbnNvbGUubG9nKGFycmF5KTsKICAgICAgICAgKiAvLyA9PiBbMV0KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBjb25jYXQoKSB7CiAgICAgICAgICB2YXIgbGVuZ3RoID0gYXJndW1lbnRzLmxlbmd0aDsKICAgICAgICAgIGlmICghbGVuZ3RoKSB7CiAgICAgICAgICAgIHJldHVybiBbXTsKICAgICAgICAgIH0KICAgICAgICAgIHZhciBhcmdzID0gQXJyYXkobGVuZ3RoIC0gMSksCiAgICAgICAgICAgICAgYXJyYXkgPSBhcmd1bWVudHNbMF0sCiAgICAgICAgICAgICAgaW5kZXggPSBsZW5ndGg7CgogICAgICAgICAgd2hpbGUgKGluZGV4LS0pIHsKICAgICAgICAgICAgYXJnc1tpbmRleCAtIDFdID0gYXJndW1lbnRzW2luZGV4XTsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiBhcnJheVB1c2goaXNBcnJheShhcnJheSkgPyBjb3B5QXJyYXkoYXJyYXkpIDogW2FycmF5XSwgYmFzZUZsYXR0ZW4oYXJncywgMSkpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhbiBhcnJheSBvZiBgYXJyYXlgIHZhbHVlcyBub3QgaW5jbHVkZWQgaW4gdGhlIG90aGVyIGdpdmVuIGFycmF5cwogICAgICAgICAqIHVzaW5nIFtgU2FtZVZhbHVlWmVyb2BdKGh0dHA6Ly9lY21hLWludGVybmF0aW9uYWwub3JnL2VjbWEtMjYyLzcuMC8jc2VjLXNhbWV2YWx1ZXplcm8pCiAgICAgICAgICogZm9yIGVxdWFsaXR5IGNvbXBhcmlzb25zLiBUaGUgb3JkZXIgYW5kIHJlZmVyZW5jZXMgb2YgcmVzdWx0IHZhbHVlcyBhcmUKICAgICAgICAgKiBkZXRlcm1pbmVkIGJ5IHRoZSBmaXJzdCBhcnJheS4KICAgICAgICAgKgogICAgICAgICAqICoqTm90ZToqKiBVbmxpa2UgYF8ucHVsbEFsbGAsIHRoaXMgbWV0aG9kIHJldHVybnMgYSBuZXcgYXJyYXkuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgMC4xLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgQXJyYXkKICAgICAgICAgKiBAcGFyYW0ge0FycmF5fSBhcnJheSBUaGUgYXJyYXkgdG8gaW5zcGVjdC4KICA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VudDoKICAgICAgICAgKiAodmFsdWUpLgogICAgICAgICAqCiAgICAgICAgICogKipOb3RlOioqIFVubGlrZSBgXy5wdWxsQWxsQnlgLCB0aGlzIG1ldGhvZCByZXR1cm5zIGEgbmV3IGFycmF5LgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDQuMC4wCiAgICAgICAgICogQGNhdGVnb3J5IEFycmF5CiAgICAgICAgICogQHBhcmFtIHtBcnJheX0gYXJyYXkgVGhlIGFycmF5IHRvIGluc3BlY3QuCiAgICAgICAgICogQHBhcmFtIHsuLi5BcnJheX0gW3ZhbHVlc10gVGhlIHZhbHVlcyB0byBleGNsdWRlLgogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IFtpdGVyYXRlZT1fLmlkZW50aXR5XSBUaGUgaXRlcmF0ZWUgaW52b2tlZCBwZXIgZWxlbWVudC4KICAgICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIG5ldyBhcnJheSBvZiBmaWx0ZXJlZCB2YWx1ZXMuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8uZGlmZmVyZW5jZUJ5KFsyLjEsIDEuMl0sIFsyLjMsIDMuNF0sIE1hdGguZmxvb3IpOwogICAgICAgICAqIC8vID0+IFsxLjJdCiAgICAgICAgICoKICAgICAgICAgKiAvLyBUaGUgYF8ucHJvcGVydHlgIGl0ZXJhdGVlIHNob3J0aGFuZC4KICAgICAgICAgKiBfLmRpZmZlcmVuY2VCeShbeyAneCc6IDIgfSwgeyAneCc6IDEgfV0sIFt7ICd4JzogMSB9XSwgJ3gnKTsKICAgICAgICAgKiAvLyA9PiBbeyAneCc6IDIgfV0KICAgICAgICAgKi8KICAgICAgICB2YXIgZGlmZmVyZW5jZUJ5ID0gYmFzZVJlc3QoZnVuY3Rpb24oYXJyYXksIHZhbHVlcykgewogICAgICAgICAg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IpCiAgICAgICAgICAgIDogW107CiAgICAgICAgfSk7CgogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYSBzbGljZSBvZiBgYXJyYXlgIHdpdGggYG5gIGVsZW1lbnRzIGRyb3BwZWQgZnJvbSB0aGUgYmVnaW5uaW5nLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDAuNS4wCiAgICAgICAgICogQGNhdGVnb3J5IEFycmF5CiAgICAgICAgICogQHBhcmFtIHtBcnJheX0gYXJyYXkgVGhlIGFycmF5IHRvIHF1ZXJ5LgogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBbbj0xXSBUaGUgbnVtYmVyIG9mIGVsZW1lbnRzIHRvIGRyb3AuCiAgICAgICAgICogQHBhcmFtLSB7T2JqZWN0fSBbZ3VhcmRdIEVuYWJsZXMgdXNlIGFzIGFuIGl0ZXJhdGVlIGZvciBtZXRob2RzIGxpa2UgYF8ubWFwYC4KICAgICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIHNsaWNlIG9mIGBhcnJheWAuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8uZHJvcChbMSwgMiwgM10pOwogICAgICAgICAqIC8vID0+IFsyLCAzXQogICAgICAgICAqCiAgICAgICAgICogXy5kcm9wKFsxLCAyLCAzXSwgMik7CiAgICAgICAgICogLy8gPT4gWzNdCiAgICAgICAgICoKICAgICAgICAgKiBfLmRyb3AoWzEsIDIsIDNdLCA1KTsKICAgICAgICAgKiAvLyA9PiBbXQogICAgICAgICAqCiAgICAgICAgICogXy5kcm9wKFsxLCAyLCAzXSwgMCk7CiAgICAgICAgICogLy8gPT4gWzEsIDIsIDNdCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gZHJvcChhcnJheSwgbiwgZ3VhcmQpIHsKICAgICAgICAgIHZhciBsZW5ndGggPSBhcnJheSA9PSBudWxsID8gMCA6IGFycmF5Lmxlbmd0aDsKICAgICAgICAgIGlmICghbGVuZ3RoKSB7CiAgICAgICAgICAgIHJldHVybiBbXTsKICAgICAgICAgIH0KICAgICAgICAgIG4gPSAoZ3VhcmQgfHwgbiA9PT0gdW5kZWZpbmVkJDEpID8gMSA6IHRvSW50ZWdlcihuKTsKICAgICAgICAgIHJldHVybiBiYXNlU2xpY2UoYXJyYXksIG4gPCAwID8gMCA6IG4sIGxlbmd0aCk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDcmVhdGVzIGEgc2xpY2Ugb2YgYGFycmF5YCB3aXRoIGBuYCBlbGVtZW50cyBkcm9wcGVkIGZyb20gdGhlIGVuZC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAzLjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBBcnJheQogICAgICAgICAqIEBwYXJhbSB7QXJyYXl9IGFycmF5IFRoZSBhcnJheSB0byBxdWVyeS4KICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gW249MV0gVGhlIG51bWJlciBvZiBlbGVtZW50cyB0byBkcm9wLgogICAgICAgICAqIEBwYXJhbS0ge09iamVjdH0gW2d1YXJkXSBFbmFibGVzIHVzZSBhcyBhbiBpdGVyYXRlZSBmb3IgbWV0aG9kcyBsaWtlIGBfLm1hcGAuCiAgICAgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBzbGljZSBvZiBgYXJyYXlgLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLmRyb3BSaWdodChbMSwgMiwgM10pOwogICAgICAgICAqIC8vID0+IFsxLCAyXQogICAgICAgICAqCiAgICAgICAgICogXy5kcm9wUmlnaHQoWzEsIDIsIDNdLCAyKTsKICAgICAgICAgKiAvLyA9PiBbMV0KICAgICAgICAgKgogICAgICAgICAqIF8uZHJvcFJpZ2h0KFsxLCAyLCAzXSwgNSk7CiAgICAgICAgICogLy8gPT4gW10KICAgICAgICAgKgogICAgICAgICAqIF8uZHJvcFJpZ2h0KFsxLCAyLCAzXSwgMCk7CiAgICAgICAgICogLy8gPT4gWzEsIDIsIDNdCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gZHJvcFJpZ2h0KGFycmF5LCBuLCBndWFyZCkgewogICAgICAgICAgdmFyIGxlbmd0aCA9IGFycmF5ID09IG51bGwgPyAwIDogYXJyYXkubGVuZ3RoOwogICAgICAgICAgaWYgKCFsZW5ndGgpIHsKICAgICAgICAgICAgcmV0dXJuIFtdOwogICAgICAgICAgfQogICAgICAgICAgbiA9IChndWFyZCB8fCBuID09PSB1bmRlZmluZWQkMSkgPyAxIDogdG9JbnRlZ2VyKG4pOwogICAgICAgICAgbiA9IGxlbmd0aCAtIG47CiAgICAgICAgICByZXR1cm4gYmFzZVNsaWNlKGFycmF5LCAwLCBuIDwgMCA/IDAgOiBuKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYSBzbGljZSBvZiBgYXJyYXlgIGV4Y2x1ZGluZyBlbGVtZW50cyBkcm9wcGVkIGZyb20gdGhlIGVuZC4KICAgICAgICAgKiBFbGVtZW50cyBhcmUgZHJvcHBlZCB1bnRpbCBgcHJlZGljYXRlYCByZXR1cm5zIGZhbHNleS4gVGhlIHByZWRpY2F0ZSBpcwogICAgICAgICAqIGludm9rZWQgd2l0aCB0aHJlZSBhcmd1bWVudHM6ICh2YWx1ZSwgaW5kZXgsIGFycmF5KS4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAzLjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBBcnJheQogICAgICAgICAqIEBwYXJhbSB7QXJyYXl9IGFycmF5IFRoZSBhcnJheSB0byBxdWVyeS4KICAgICAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufSBbcHJlZGljYXRlPV8uaWRlbnRpdHldIFRoZSBmdW5jdGlvbiBpbnZva2VkIHBlciBpdGVyYXRpb24uCiAgICAgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBzbGljZSBvZiBgYXJyYXlgLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiB2YXIgdXNlcnMgPSBbCiAgICAgICAgICogICB7ICd1c2VyJzogJ2Jhcm5leScsICAnYWN0aXZlJzogdHJ1ZSB9LAogICAgICAgICAqICAgeyAndXNlcic6ICdmcmVkJywgICAgJ2FjdGl2ZSc6IGZhbHNlIH0sCiAgICAgICAgICogICB7ICd1c2VyJzogJ3BlYmJsZXMnLCAnYWN0aXZlJzogZmFsc2UgfQogICAgICAgICAqIF07CiAgICAgICAgICoKICAgICAgICAgKiBfLmRyb3BSaWdodFdoaWxlKHVzZXJzLCBmdW5jdGlvbihvKSB7IHJldHVybiAhby5hY3RpdmU7IH0pOwogICAgICAgICAqIC8vID0+IG9iamVjdHMgZm9yIFsnYmFybmV5J10KICAgICAgICAgKgogICAgICAgICAqIC8vIFRoZSBgXy5tYXRjaGVzYCBpdGVyYXRlZSBzaG9ydGhhbmQuCiAgICAgICAgICogXy5kcm9wUmlnaHRXaGlsZSh1c2VycywgeyAndXNlcic6ICdwZWJibGVzJywgJ2FjdGl2ZSc6IGZhbHNlIH0pOwogICAgICAgICAqIC8vID0+IG9iamVjdHMgZm9yIFsnYmFybmV5JywgJ2ZyZWQnXQogICAgICAgICAqCiAgICAgICAgICogLy8gVGhlIGBfLm1hdGNoZXNQcm9wZXJ0eWAgaXRlcmF0ZWUgc2hvcnRoYW5kLgogICAgICAgICAqIF8uZHJvcFJpZ2h0V2hpbGUodXNlcnMsIFsnYWN0aXZlJywgZmFsc2VdKTsKICAgICAgICAgKiAvLyA9PiBvYmplY3RzIGZvciBbJ2Jhcm5leSddCiAgICAgICAgICoKIC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aW9uLgogICAgICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyB0aGUgc2xpY2Ugb2YgYGFycmF5YC4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogdmFyIHVzZXJzID0gWwogICAgICAgICAqICAgeyAndXNlcic6ICdiYXJuZXknLCAgJ2FjdGl2ZSc6IGZhbHNlIH0sCiAgICAgICAgICogICB7ICd1c2VyJzogJ2ZyZWQnLCAgICAnYWN0aXZlJzogZmFsc2UgfSwKICAgICAgICAgKiAgIHsgJ3VzZXInOiAncGViYmxlcycsICdhY3RpdmUnOiB0cnVlIH0KICAgICAgICAgKiBdOwogICAgICAgICAqCiAgICAgICAgICogXy5kcm9wV2hpbGUodXNlcnMsIGZ1bmN0aW9uKG8pIHsgcmV0dXJuICFvLmFjdGl2ZTsgfSk7CiAgICAgICAgICogLy8gPT4gb2JqZWN0cyBmb3IgWydwZWJibGVzJ10KICAgICAgICAgKgogICAgICAgICAqIC8vIFRoZSBgXy5tYXRjaGVzYCBpdGVyYXRlZSBzaG9ydGhhbmQuCiAgICAgICAgICogXy5kcm9wV2hpbGUodXNlcnMsIHsgJ3VzZXInOiAnYmFybmV5JywgJ2FjdGl2ZSc6IGZhbHNlIH0pOwogICAgICAgICAqIC8vID0+IG9iamVjdHMgZm9yIFsnZnJlZCcsICdwZWJibGVzJ10KICAgICAgICAgKgogICAgICAgICAqIC8vIFRoZSBgXy5tYXRjaGVzUHJvcGVydHlgIGl0ZXJhdGVlIHNob3J0aGFuZC4KICAgICAgICAgKiBfLmRyb3BXaGlsZSh1c2VycywgWydhY3RpdmUnLCBmYWxzZV0pOwogICAgICAgICAqIC8vID0+IG9iamVjdHMgZm9yIFsncGViYmxlcyddCiAgICAgICAgICoKICAgICAgICAgKiAvLyBUaGUgYF8ucHJvcGVydHlgIGl0ZXJhdGVlIHNob3J0aGFuZC4KICAgICAgICAgKiBfLmRyb3BXaGlsZSh1c2VycywgJ2FjdGl2ZScpOwogICAgICAgICAqIC8vID0+IG9iamVjdHMgZm9yIFsnYmFybmV5JywgJ2ZyZWQnLCAncGViYmxlcyddCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gZHJvcFdoaWxlKGFycmF5LCBwcmVkaWNhdGUpIHsKICAgICAgICAgIHJldHVybiAoYXJyYXkgJiYgYXJyYXkubGVuZ3RoKQogICAgICAgICAgICA/IGJhc2VXaGlsZShhcnJheSwgZ2V0SXRlcmF0ZWUocHJlZGljYXRlLCAzKSwgdHJ1ZSkKICAgICAgICAgICAgOiBbXTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIEZpbGxzIGVsZW1lbnRzIG9mIGBhcnJheWAgd2l0aCBgdmFsdWVgIGZyb20gYHN0YXJ0YCB1cCB0bywgYnV0IG5vdAogICAgICAgICAqIGluY2x1ZGluZywgYGVuZGAuCiAgICAgICAgICoKICAgICAgICAgKiAqKk5vdGU6KiogVGhpcyBtZXRob2QgbXV0YXRlcyBgYXJyYXlgLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDMuMi4wCiAgICAgICAgICogQGNhdGVnb3J5IEFycmF5CiAgICAgICAgICogQHBhcmFtIHtBcnJheX0gYXJyYXkgVGhlIGFycmF5IHRvIGZpbGwuCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gZmlsbCBgYXJyYXlgIHdpdGguCiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IFtzdGFydD0wXSBUaGUgc3RhcnQgcG9zaXRpb24uCiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IFtlbmQ9YXJyYXkubGVuZ3RoXSBUaGUgZW5kIHBvc2l0aW9uLgogICAgICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyBgYXJyYXlgLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiB2YXIgYXJyYXkgPSBbMSwgMiwgM107CiAgICAgICAgICoKICAgICAgICAgKiBfLmZpbGwoYXJyYXksICdhJyk7CiAgICAgICAgICogY29uc29sZS5sb2coYXJyYXkpOwogICAgICAgICAqIC8vID0+IFsnYScsICdhJywgJ2EnXQogICAgICAgICAqCiAgICAgICAgICogXy5maWxsKEFycmF5KDMpLCAyKTsKICAgICAgICAgKiAvLyA9PiBbMiwgMiwgMl0KICAgICAgICAgKgogICAgICAgICAqIF8uZmlsbChbNCwgNiwgOCwgMTBdLCAnKicsIDEsIDMpOwogICAgICAgICAqIC8vID0+IFs0LCAnKicsICcqJywgMTBdCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gZmlsbChhcnJheSwgdmFsdWUsIHN0YXJ0LCBlbmQpIHsKICAgICAgICAgIHZhciBsZW5ndGggPSBhcnJheSA9PSBudWxsID8gMCA6IGFycmF5Lmxlbmd0aDsKICAgICAgICAgIGlmICghbGVuZ3RoKSB7CiAgICAgICAgICAgIHJldHVybiBbXTsKICAgICAgICAgIH0KICAgICAgICAgIGlmIChzdGFydCAmJiB0eXBlb2Ygc3RhcnQgIT0gJ251bWJlcicgJiYgaXNJdGVyYXRlZUNhbGwoYXJyYXksIHZhbHVlLCBzdGFydCkpIHsKICAgICAgICAgICAgc3RhcnQgPSAwOwogICAgICAgICAgICBlbmQgPSBsZW5ndGg7CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gYmFzZUZpbGwoYXJyYXksIHZhbHVlLCBzdGFydCwgZW5kKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFRoaXMgbWV0aG9kIGlzIGxpa2UgYF8uZmluZGAgZXhjZXB0IHRoYXQgaXQgcmV0dXJucyB0aGUgaW5kZXggb2YgdGhlIGZpcnN0CiAgICAgICAgICogZWxlbWVudCBgcHJlZGljYXRlYCByZXR1cm5zIHRydXRoeSBmb3IgaW5zdGVhZCBvZiB0aGUgZWxlbWVudCBpdHNlbGYuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgMS4xLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgQXJyYXkKICAgICAgICAgKiBAcGFyYW0ge0FycmF5fSBhcnJheSBUaGUgYXJyYXkgdG8gaW5zcGVjdC4KICAgICAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufSBbcHJlZGljYXRlPV8uaWRlbnRpdHldIFRoZSBmdW5jdGlvbiBpbnZva2VkIHBlciBpdGVyYXRpb24uCiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IFtmcm9tSW5kZXg9MF0gVGhlIGluZGV4IHRvIHNlYXJjaCBmcm9tLgogICAgICAgICAqIEByZXR1cm5zIHtudW1iZXJ9IFJldHVybnMgdGhlIGluZGV4IG9mIHRoZSBmb3VuZCBlbGVtZW50LCBlbHNlIGAtMWAuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIHZhciB1c2VycyA9IFsKICAgICAgICAgKiAgIHsgJ3VzZXInOiAnYmFybmV5JywgICdhY3RpdmUnOiBmYWxzZSB9LAogICAgICAgICAqICAgeyAndXNlcic6ICdmcmVkJywgICAgJ2FjdGl2ZSc6IGZhbHNlIH0sCiAgICAgICAgICogICB7ICd1c2VyJzogJ3BlYmJsZXMnLCAnYWN0aXZlJzogdHJ1ZSB9CiAgICAgICAgICogXTsKICAgICAgICAgKgogICAgICAgICAqIF8uZmluZEluZGV4KHVzZXJzLCBmdW5jdGlvbihvKSB7IHJldHVybiBvLnVzZXIgPT0gJ2Jhcm5leSc7IH0pOwogICAgICAgICAqIC8vID0+IDAKICAgICAgICAgKgogICAgICAgICAqIC8vIFRoZSBgXy5tYXRjaGVzYCBpdGVyYXRlZSBzaG9ydGhhbmQuCiAgICAgICAgICogXy5maW5kSW5kZXgodXNlcnMsIHsgJ3VzZXInOiAnZnJlZCcsICdhY3RpdmUnOiBmYWxzZSB9KTsKICAgICAgICAgKiAvLyA9PiAxCiAgICAgICAgICoKICAgICAgICAgKiAvLyBUaGUgYF8ubWF0Y2hlc1Byb3BlcnR5YCBpdGVyYXRlZSBzaG9ydGhhbmQuCiAgICAgICAgICogXy5maW5kSW5kZXgodXNlcnMsIFsnYWN0aXZlJywgZmFsc2VdKTsKICAgICAgICAgKiAvLyA9PiAwCiAgICAgICAgICoKICAgICAgICAgKiAvLyBUaGUgYF8ucHJvcGVydHlgIGl0ZXJhdGVlIHNob3J0aGFuZC4KICAgICAgICAgKiBfLmZpbmRJbmRleCh1c2VycywgJ2FjdGl2ZScpOwogICAgICAgICAqIC8vID0+IDIKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBmaW5kSW5kZXgoYXJyYXksIHByZWRpY2F0ZSwgZnJvbUluZGV4KSB7CiAgICAgICAgICB2YXIgbGVuZ3RoID0gYXJyYXkgPT0gbnVsbCA/IDAgOiBhcnJheS5sZW5ndGg7CiAgICAgICAgICBpZiAoIWxlbmd0aCkgewogICAgICAgICAgICByZXR1cm4gLTE7CiAgICAgICAgICB9CiAgICAgICAgICB2YXIgaW5kZXggPSBmcm9tSW5kZXggPT0gbnVsbCA/IDAgOiB0b0ludGVnZXIoZnJvbUluZGV4KTsKICAgICAgICAgIGlmIChpbmRleCA8IDApIHsKICAgICAgICAgICAgaW5kZXggPSBuYXRpdmVNYXgobGVuZ3RoICsgaW5kZXgsIDApOwogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIGJhc2VGaW5kSW5kZXgoYXJyYXksIGdldEl0ZXJhdGVlKHByZWRpY2F0ZSwgMyksIGluZGV4KTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFRoaXMgbWV0aG9kIGlzIGxpa2UgYF8uZmluZEluZGV4YCBleGNlcHQgdGhhdCBpdCBpdGVyYXRlcyBvdmVyIGVsZW1lbnRzCiAgICAgICAgICogb2YgYGNvbGxlY3Rpb25gIGZyb20gcmlnaHQgdG8gbGVmdC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAyLjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBBcnJheQogICAgICAgICAqIEBwYXJhbSB7QXJyYXl9IGFycmF5IFRoZSBhcnJheSB0byBpbnNwZWN0LgogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IFtwcmVkaWNhdGU9Xy5pZGVudGl0eV0gVGhlIGZ1bmN0aW9uIGludm9rZWQgcGVyIGl0ZXJhdGlvbi4KICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gW2Zyb21JbmRleD1hcnJheS5sZW5ndGgtMV0gVGhlIGluZGV4IHRvIHNlYXJjaCBmcm9tLgogICAgICAgICAqIEByZXR1cm5zIHtudW1iZXJ9IFJldHVybnMgdGhlIGluZGV4IG9mIHRoZSBmb3VuZCBlbGVtZW50LCBlbHNlIGAtMWAuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIHZhciB1c2VycyA9IFsKICAgICAgICAgKiAgIHsgJ3VzZXInOiAnYmFybmV5JywgICdhY3RpdmUnOiB0cnVlIH0sCiAgICAgICAgICogICB7ICd1c2VyJzogJ2ZyZWQnLCAgICAnYWN0aXZlJzogZmFsc2UgfSwKICAgICAgICAgKiAgIHsgJ3VzZXInOiAncGViYmxlcycsICdhY3RpdmUnOiBmYWxzZSB9CiAgICAgICAgICogXTsKICAgICAgICAgKgogICAgICAgICAqIF8uZmluZExhc3RJbmRleCh1c2VycywgZnVuY3Rpb24obykgeyByZXR1cm4gby51c2VyID09ICdwZWJibGVzJzsgfSk7CiAgICAgICAgICogLy8gPT4gMgogICAgICAgICAqCiAgICAgICAgICogLy8gVGhlIGBfLm1hdGNoZXNgIGl0ZXJhdGVlIHNob3J0aGFuZC4KICAgICAgICAgKiBfLmZpbmRMYXN0SW5kZXgodXNlcnMsIHsgJ3VzZXInOiAnYmFybmV5JywgJ2FjdGl2ZSc6IHRydWUgfSk7CiAgICAgICAgICogLy8gPT4gMAogICAgICAgICAqCiAgICAgICAgICogLy8gVGhlIGBfLm1hdGNoZXNQcm9wZXJ0eWAgaXRlcmF0ZWUgc2hvcnRoYW5kLgogICAgICAgICAqIF8uZmluZExhc3RJbmRleCh1c2VycywgWydhY3RpdmUnLCBmYWxzZV0pOwogICAgICAgICAqIC8vID0+IDIKICAgICAgICAgKgogICAgICAgICAqIC8vIFRoZSBgXy5wcm9wZXJ0eWAgaXRlcmF0ZWUgc2hvcnRoYW5kLgogICAgICAgICAqIF8uZmluZExhc3RJbmRleCh1c2VycywgJ2FjdGl2ZScpOwogICAgICAgICAqIC8vID0+IDAKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBmaW5kTGFzdEluZGV4KGFycmF5LCBwcmVkaWNhdGUsIGZyb21JbmRleCkgewogICAgICAgICAgdmFyIGxlbmd0aCA9IGFycmF5ID09IG51bGwgPyAwIDogYXJyYXkubGVuZ3RoOwogICAgICAgICAgaWYgKCFsZW5ndGgpIHsKICAgICAgICAgICAgcmV0dXJuIC0xOwogICAgICAgICAgfQogICAgICAgICAgdmFyIGluZGV4ID0gbGVuZ3RoIC0gMTsKICAgICAgICAgIGlmIChmcm9tSW5kZXggIT09IHVuZGVmaW5lZCQxKSB7CiAgICAgICAgICAgIGluZGV4ID0gdG9JbnRlZ2VyKGZyb21JbmRleCk7CiAgICAgICAgICAgIGluZGV4ID0gZnJvbUluZGV4IDwgMAogICAgICAgICAgICAgID8gbmF0aXZlTWF4KGxlbmd0aCArIGluZGV4LCAwKQogICAgICAgICAgICAgIDogbmF0aXZlTWluKGluZGV4LCBsZW5ndGggLSAxKTsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiBiYXNlRmluZEluZGV4KGFycmF5LCBnZXRJdGVyYXRlZShwcmVkaWNhdGUsIDMpLCBpbmRleCwgdHJ1ZSk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBGbGF0dGVucyBgYXJyYXlgIGEgc2luZ2xlIGxldmVsIGRlZXAuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgMC4xLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgQXJyYXkKICAgICAgICAgKiBAcGFyYW0ge0FycmF5fSBhcnJheSBUaGUgYXJyYXkgdG8gZmxhdHRlbi4KICAgICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIG5ldyBmbGF0dGVuZWQgYXJyYXkuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8uZmxhdHRlbihbMSwgWzIsIFszLCBbNF1dLCA1XV0pOwogICAgICAgICAqIC8vID0+IFsxLCAyLCBbMywgWzRdXSwgNV0KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBmbGF0dGVuKGFycmF5KSB7CiAgICAgICAgICB2YXIgbGVuZ3RoID0gYXJyYXkgPT0gbnVsbCA/IDAgOiBhcnJheS5sZW5ndGg7CiAgICAgICAgICByZXR1cm4gbGVuZ3RoID8gYmFzZUZsYXR0ZW4oYXJyYXksIDEpIDogW107CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBSZWN1cnNpdmVseSBmbGF0dGVucyBgYXJyYXlgLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDMuMC4wCiAgICAgICAgICogQGNhdGVnb3J5IEFycmF5CiAgICAgICAgICogQHBhcmFtIHtBcnJheX0gYXJyYXkgVGhlIGFycmF5IHRvIGZsYXR0ZW4uCiAgICAgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBuZXcgZmxhdHRlbmVkIGFycmF5LgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLmZsYXR0ZW5EZWVwKFsxLCBbMiwgWzMsIFs0XV0sIDVdXSk7CiAgICAgICAgICogLy8gPT4gWzEsIDIsIDMsIDQsIDVdCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gZmxhdHRlbkRlZXAoYXJyYXkpIHsKICAgICAgICAgIHZhciBsZW5ndGggPSBhcnJheSA9PSBudWxsID8gMCA6IGFycmF5Lmxlbmd0aDsKICAgICAgICAgIHJldHVybiBsZW5ndGggPyBiYXNlRmxhdHRlbihhcnJheSwgSU5GSU5JVFkpIDogW107CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBSZWN1cnNpdmVseSBmbGF0dGVuIGBhcnJheWAgdXAgdG8gYGRlcHRoYCB0aW1lcy4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSA0LjQuMAogICAgICAgICAqIEBjYXRlZ29yeSBBcnJheQogICAgICAgICAqIEBwYXJhbSB7QXJyYXl9IGFycmF5IFRoZSBhcnJheSB0byBmbGF0dGVuLgogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBbZGVwdGg9MV0gVGhlIG1heGltdW0gcmVjdXJzaW9uIGRlcHRoLgogICAgICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyB0aGUgbmV3IGZsYXR0ZW5lZCBhcnJheS4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogdmFyIGFycmF5ID0gWzEsIFsyLCBbMywgWzRdXSwgNV1dOwogICAgICAgICAqCiAgICAgICAgICogXy5mbGF0dGVuRGVwdGgoYXJyYXksIDEpOwogICAgICAgICAqIC8vID0+IFsxLCAyLCBbMywgWzRdXSwgNV0KICAgICAgICAgKgogICAgICAgICAqIF8uZmxhdHRlbkRlcHRoKGFycmF5LCAyKTsKICAgICAgICAgKiAvLyA9PiBbMSwgMiwgMywgWzRdLCA1XQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGZsYXR0ZW5EZXB0aChhcnJheSwgZGVwdGgpIHsKICAgICAgICAgIHZhciBsZW5ndGggPSBhcnJheSA9PSBudWxsID8gMCA6IGFycmF5Lmxlbmd0aDsKICAgICAgICAgIGlmICghbGVuZ3RoKSB7CiAgICAgICAgICAgIHJldHVybiBbXTsKICAgICAgICAgIH0KICAgICAgICAgIGRlcHRoID0gZGVwdGggPT09IHVuZGVmaW5lZCQxID8gMSA6IHRvSW50ZWdlcihkZXB0aCk7CiAgICAgICAgICByZXR1cm4gYmFzZUZsYXR0ZW4oYXJyYXksIGRlcHRoKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBpbnZlcnNlIG9mIGBfLnRvUGFpcnNgOyB0aGlzIG1ldGhvZCByZXR1cm5zIGFuIG9iamVjdCBjb21wb3NlZAogICAgICAgICAqIGZyb20ga2V5LXZhbHVlIGBwYWlyc2AuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgQXJyYXkKICAgICAgICAgKiBAcGFyYW0ge0FycmF5fSBwYWlycyBUaGUga2V5LXZhbHVlIHBhaXJzLgogICAgICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgdGhlIG5ldyBvYmplY3QuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8uZnJvbVBhaXJzKFtbJ2EnLCAxXSwgWydiJywgMl1dKTsKICAgICAgICAgKiAvLyA9PiB7ICdhJzogMSwgJ2InOiAyIH0KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBmcm9tUGFpcnMocGFpcnMpIHsKICAgICAgICAgIHZhciBpbmRleCA9IC0xLAogICAgICAgICAgICAgIGxlbmd0aCA9IHBhaXJzID09IG51bGwgPyAwIDogcGFpcnMubGVuZ3RoLAogICAgICAgICAgICAgIHJlc3VsdCA9IHt9OwoKICAgICAgICAgIHdoaWxlICgrK2luZGV4IDwgbGVuZ3RoKSB7CiAgICAgICAgICAgIHZhciBwYWlyID0gcGFpcnNbaW5kZXhdOwogICAgICAgICAgICByZXN1bHRbcGFpclswXV0gPSBwYWlyWzFdOwogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIHJlc3VsdDsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIEdldHMgdGhlIGZpcnN0IGVsZW1lbnQgb2YgYGFycmF5YC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAwLjEuMAogICAgICAgICAqIEBhbGlhcyBmaXJzdAogICAgICAgICAqIEBjYXRlZ29yeSBBcnJheQogICAgICAgICAqIEBwYXJhbSB7QXJyYXl9IGFycmF5IFRoZSBhcnJheSB0byBxdWVyeS4KICAgICAgICAgKiBAcmV0dXJucyB7Kn0gUmV0dXJucyB0aGUgZmlyc3QgZWxlbWVudCBvZiBgYXJyYXlgLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLmhlYWQoWzEsIDIsIDNdKTsKICAgICAgICAgKiAvLyA9PiAxCiAgICAgICAgICoKICAgICAgICAgKiBfLmhlYWQoW10pOwogICAgICAgICAqIC8vID0+IHVuZGVmaW5lZAogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGhlYWQoYXJyYXkpIHsKICAgICAgICAgIHJldHVybiAoYXJyYXkgJiYgYXJyYXkubGVuZ3RoKSA/IGFycmF5WzBdIDogdW5kZWZpbmVkJDE7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIHRoZSBpbmRleCBhdCB3aGljaCB0aGUgZmlyc3Qgb2NjdXJyZW5jZSBvZiBgdmFsdWVgIGlzIGZvdW5kIGluIGBhcnJheWAKICAgICAgICAgKiB1c2luZyB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gIHZhciBsZW5ndGggPSBhcnJheSA9PSBudWxsID8gMCA6IGFycmF5Lmxlbmd0aDsKICAgICAgICAgIGlmICghbGVuZ3RoKSB7CiAgICAgICAgICAgIHJldHVybiAtMTsKICAgICAgICAgIH0KICAgICAgICAgIHZhciBpbmRleCA9IGZyb21JbmRleCA9PSBudWxsID8gMCA6IHRvSW50ZWdlcihmcm9tSW5kZXgpOwogICAgICAgICAgaWYgKGluZGV4IDwgMCkgewogICAgICAgICAgICBpbmRleCA9IG5hdGl2ZU1heChsZW5ndGggKyBpbmRleCwgMCk7CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gYmFzZUluZGV4T2YoYXJyYXksIHZhbHVlLCBpbmRleCk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIGFsbCBidXQgdGhlIGxhc3QgZWxlbWVudCBvZiBgYXJyYXlgLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDAuMS4wCiAgICAgICAgICogQGNhdGVnb3J5IEFycmF5CiAgICAgICAgICogQHBhcmFtIHtBcnJheX0gYXJyYXkgVGhlIGFycmF5IHRvIHF1ZXJ5LgogICAgICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyB0aGUgc2xpY2Ugb2YgYGFycmF5YC4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy5pbml0aWFsKFsxLCAyLCAzXSk7CiAgICAgICAgICogLy8gPT4gWzEsIDJdCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gaW5pdGlhbChhcnJheSkgewogICAgICAgICAgdmFyIGxlbmd0aCA9IGFycmF5ID09IG51bGwgPyAwIDogYXJyYXkubGVuZ3RoOwogICAgICAgICAgcmV0dXJuIGxlbmd0aCA/IGJhc2VTbGljZShhcnJheSwgMCwgLTEpIDogW107CiAgICAgICAgfQoKICAgICAgICAvKio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iAgICAgICAgICogb2YgcmVzdWx0IHZhbHVlcyBhcmUgZGV0ZXJtaW5lZCBieSB0aGUgZmlyc3QgYXJyYXkuIFRoZSBjb21wYXJhdG9yIGlzCiAgICAgICAgICogaW52b2tlZCB3aXRoIHR3byBhcmd1bWVudHM6IChhcnJWYWwsIG90aFZhbCkuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgQXJyYXkKICAgICAgICAgKiBAcGFyYW0gey4uLkFycmF5fSBbYXJyYXlzXSBUaGUgYXJyYXlzIHRvIGluc3BlY3QuCiAgICAgICAgICogQHBhcmFtIHtGdW5jdGlvbn0gW2NvbXBhcmF0b3JdIFRoZSBjb21wYXJhdG9yIGludm9rZWQgcGVyIGVsZW1lbnQuCiAgICAgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBuZXcgYXJyYXkgb2YgaW50ZXJzZWN0aW5nIHZhbHVlcy4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogdmFyIG9iamVjdHMgPSBbeyAneCc6IDEsICd5JzogMiB9LCB7ICd4JzogMiwgJ3knOiAxIH1dOwogICAgICAgICAqIHZhciBvdGhlcnMgPSBbeyAneCc6IDEsICd5JzogMSB9LCB7ICd4JzogMSwgJ3knOiAyIH1dOwogICAgICAgICAqCiAgICAgICAgICogXy5pbnRlcnNlY3Rpb25XaXRoKG9iamVjdHMsIG90aGVycywgXy5pc0VxdWFsKTsKICAgICAgICAgKiAvLyA9PiBbeyAneCc6IDEsICd5JzogMiB9XQogICAgICAgICAqLwogICAgICAgIHZhciBpbnRlcnNlY3Rpb25XaXRoID0gYmFzZVJlc3QoZnVuY3Rpb24oYXJyYXlzKSB7CiAgICAgICAgICB2YXIgY29tcGFyYXRvciA9IGxhc3QoYXJyYXlzKSwKICAgICAgICAgICAgICBtYXBwZWQgPSBhcnJheU1hcChhcnJheXMsIGNhc3RBcnJheUxpa2VPYmplY3QpOwoKICAgICAgICAgIGNvbXBhcmF0b3IgPSB0eXBlb2YgY29tcGFyYXRvciA9PSAnZnVuY3Rpb24nID8gY29tcGFyYXRvciA6IHVuZGVmaW5lZCQxOwogICAgICAgICAgaWYgKGNvbXBhcmF0b3IpIHsKICAgICAgICAgICAgbWFwcGVkLnBvcCgpOwogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIChtYXBwZWQubGVuZ3RoICYmIG1hcHBlZFswXSA9PT0gYXJyYXlzWzBdKQogICAgICAgICAgICA/IGJhc2VJbnRlcnNlY3Rpb24obWFwcGVkLCB1bmRlZmluZWQkMSwgY29tcGFyYXRvcikKICAgICAgICAgICAgOiBbXTsKICAgICAgICB9KTsKCiAgICAgICAgLyoqCiAgICAgICAgICogQ29udmVydHMgYWxsIGVsZW1lbnRzIGluIGBhcnJheWAgaW50byBhIHN0cmluZyBzZXBhcmF0ZWQgYnkgYHNlcGFyYXRvcmAuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgQXJyYXkKICAgICAgICAgKiBAcGFyYW0ge0FycmF5fSBhcnJheSBUaGUgYXJyYXkgdG8gY29udmVydC4KICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gW3NlcGFyYXRvcj0nLCddIFRoZSBlbGVtZW50IHNlcGFyYXRvci4KICAgICAgICAgKiBAcmV0dXJucyB7c3RyaW5nfSBSZXR1cm5zIHRoZSBqb2luZWQgc3RyaW5nLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLmpvaW4oWydhJywgJ2InLCAnYyddLCAnficpOwogICAgICAgICAqIC8vID0+ICdhfmJ+YycKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBqb2luKGFycmF5LCBzZXBhcmF0b3IpIHsKICAgICAgICAgIHJldHVybiBhcnJheSA9PSBudWxsID8gJycgOiBuYXRpdmVKb2luLmNhbGwoYXJyYXksIHNlcGFyYXRvcik7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIHRoZSBsYXN0IGVsZW1lbnQgb2YgYGFycmF5YC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAwLjEuMAogICAgICAgICAqIEBjYXRlZ29yeSBBcnJheQogICAgICAgICAqIEBwYXJhbSB7QXJyYXl9IGFycmF5IFRoZSBhcnJheSB0byBxdWVyeS4KICAgICAgICAgKiBAcmV0dXJucyB7Kn0gUmV0dXJucyB0aGUgbGFzdCBlbGVtZW50IG9mIGBhcnJheWAuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8ubGFzdChbMSwgMiwgM10pOwogICAgICAgICAqIC8vID0+IDMKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBsYXN0KGFycmF5KSB7CiAgICAgICAgICB2YXIgbGVuZ3RoID0gYXJyYXkgPT0gbnVsbCA/IDAgOiBhcnJheS5sZW5ndGg7CiAgICAgICAgICByZXR1cm4gbGVuZ3RoID8gYXJyYXlbbGVuZ3RoIC0gMV0gOiB1bmRlZmluZWQkMTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFRoaXMgbWV0aG9kIGlzIGxpa2UgYF8uaW5kZXhPZmAgZXhjZXB0IHRoYXQgaXQgaXRlcmF0ZXMgb3ZlciBlbGVtZW50cyBvZgogICAgICAgICAqIGBhcnJheWAgZnJvbSByaWdodCB0byBsZWZ0LgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDAuMS4wCiAgICAgICAgICogQGNhdGVnb3J5IEFycmF5CiAgICAgICAgICogQHBhcmFtIHtBcnJheX0gYXJyYXkgVGhlIGFycmF5IHRvIGluc3BlY3QuCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gc2VhcmNoIGZvci4KICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gW2Zyb21JbmRleD1hcnJheS5sZW5ndGgtMV0gVGhlIGluZGV4IHRvIHNlYXJjaCBmcm9tLgogICAgICAgICAqIEByZXR1cm5zIHtudW1iZXJ9IFJldHVybnMgdGhlIGluZGV4IG9mIHRoZSBtYXRjaGVkIHZhbHVlLCBlbHNlIGAtMWAuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8ubGFzdEluZGV4T2YoWzEsIDIsIDEsIDJdLCAyKTsKICAgICAgICAgKiAvLyA9PiAzCiAgICAgICAgICoKICAgICAgICAgKiAvLyBTZWFyY2ggZnJvbSB0aGUgYGZyb21JbmRleGAuCiAgICAgICAgICogXy5sYXN0SW5kZXhPZihbMSwgMiwgMSwgMl0sIDIsIDIpOwogICAgICAgICAqIC8vID0+IDEKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBsYXN0SW5kZXhPZihhcnJheSwgdmFsdWUsIGZyb21JbmRleCkgewogICAgICAgICAgdmFyIGxlbmd0aCA9IGFycmF5ID09IG51bGwgPyAwIDogYXJyYXkubGVuZ3RoOwogICAgICAgICAgaWYgKCFsZW5ndGgpIHsKICAgICAgICAgICAgcmV0dXJuIC0xOwogICAgICAgICAgfQogICAgICAgICAgdmFyIGluZGV4ID0gbGVuZ3RoOwogICAgICAgICAgaWYgKGZyb21JbmRleCAhPT0gdW5kZWZpbmVkJDEpIHsKICAgICAgICAgICAgaW5kZXggPSB0b0ludGVnZXIoZnJvbUluZGV4KTsKICAgICAgICAgICAgaW5kZXggPSBpbmRleCA8IDAgPyBuYXRpdmVNYXgobGVuZ3RoICsgaW5kZXgsIDApIDogbmF0aXZlTWluKGluZGV4LCBsZW5ndGggLSAxKTsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiB2YWx1ZSA9PT0gdmFsdWUKICAgICAgICAgICAgPyBzdHJpY3RMYXN0SW5kZXhPZihhcnJheSwgdmFsdWUsIGluZGV4KQogICAgICAgICAgICA6IGJhc2VGaW5kSW5kZXgoYXJyYXksIGJhc2VJc05hTiwgaW5kZXgsIHRydWUpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogR2V0cyB0aGUgZWxlbWVudCBhdCBpbmRleCBgbmAgb2YgYGFycmF5YC4gSWYgYG5gIGlzIG5lZ2F0aXZlLCB0aGUgbnRoCiAgICAgICAgICogZWxlbWVudCBmcm9tIHRoZSBlbmQgaXMgcmV0dXJuZWQuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC4xMS4wCiAgICAgICAgICogQGNhdGVnb3J5IEFycmF5CiAgICAgICAgICogQHBhcmFtIHtBcnJheX0gYXJyYXkgVGhlIGFycmF5IHRvIHF1ZXJ5LgogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBbbj0wXSBUaGUgaW5kZXggb2YgdGhlIGVsZW1lbnQgdG8gcmV0dXJuLgogICAgICAgICAqIEByZXR1cm5zIHsqfSBSZXR1cm5zIHRoZSBudGggZWxlbWVudCBvZiBgYXJyYXlgLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiB2YXIgYXJyYXkgPSBbJ2EnLCAnYicsICdjJywgJ2QnXTsKICAgICAgICAgKgogICAgICAgICAqIF8ubnRoKGFycmF5LCAxKTsKICAgICAgICAgKiAvLyA9PiAnYicKICAgICAgICAgKgogICAgICAgICAqIF8ubnRoKGFycmF5LCAtMik7CiAgICAgICAgICogLy8gPT4gJ2MnOwogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIG50aChhcnJheSwgbikgewogICAgICAgICAgcmV0dXJuIChhcnJheSAmJiBhcnJheS5sZW5ndGgpID8gYmFzZU50aChhcnJheSwgdG9JbnRlZ2VyKG4pKSA6IHVuZGVmaW5lZCQxOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogUmVtb3ZlcyBhbGwgZ2l2ZW4gdmFsdWVzIGZyb20gYGFycmF5YCB1c2luZwogICAgICAgICAqIFtgU2FtZVZhbHVlWmVyb2BdKGh0dHA6Ly9lY21hLWludGVybmF0aW9uYWwub3JnL2VjbWEtMjYyLzcuMC8jc2VjLXNhbWV2YWx1ZXplcm8pCiAgICAgICAgICogZm9yIGVxdWFsaXR5IGNvbXBhcmlzb25zLgogICAgICAgICAqCiAgICAgICAgICogKipOb3RlOioqIFVubGlrZSBgXy53aXRob3V0YCwgdGhpcyBtZXRob2QgbXV0YXRlcyBgYXJyYXlgLiBVc2UgYF8ucmVtb3ZlYAogICAgICAgICAqIHRvIHJlbW92ZSBlbGVtZW50cyBmcm9tIGFuIGFycmF5IGJ5IHByZWRpY2F0ZS4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAyLjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBBcnJheQogICAgICAgICAqIEBwYXJhbSB7QXJyYXl9IGFycmF5IFRoZSBhcnJheSB0byBtb2RpZnkuCiAgICAgICAgICogQHBhcmFtIHsuLi4qfSBbdmFsdWVzXSBUaGUgdmFsdWVzIHRvIHJlbW92ZS4KICAgICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgYGFycmF5YC4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogdmFyIGFycmF5ID0gWydhJywgJ2InLCAnYycsICdhJywgJ2InLCAnYyddOwogICAgICAgICAqCiAgICAgICAgICogXy5wdWxsKGFycmF5LCAnYScsICdjJyk7CiAgICAgICAgICogY29uc29sZS5sb2coYXJyYXkpOwogICAgICAgICAqIC8vID0+IFsnYicsICdiJ10KICAgICAgICAgKi8KICAgICAgICB2YXIgcHVsbCA9IGJhc2VSZXN0KHB1bGxBbGwpOwoKICAgICAgICAvKioKICAgICAgICAgKiBUaGlzIG1ldGhvZCBpcyBsaWtlIGBfLnB1bGxgIGV4Y2VwdCB0aGF0IGl0IGFjY2VwdHMgYW4gYXJyYXkgb2YgdmFsdWVzIHRvIHJlbW92ZS4KICAgICAgICAgKgogICAgICAgICAqICoqTm90ZToqKiBVbmxpa2UgYF8uZGlmZmVyZW5jZWAsIHRoaXMgbWV0aG9kIG11dGF0ZXMgYGFycmF5YC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSA0LjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBBcnJheQogICAgICAgICAqIEBwYXJhbSB7QXJyYXl9IGFycmF5IFRoZSBhcnJheSB0byBtb2RpZnkuCiAgICAgICAgICogQHBhcmFtIHtBcnJheX0gdmFsdWVzIFRoZSB2YWx1ZXMgdG8gcmVtb3ZlLgogICAgICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyBgYXJyYXlgLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiB2YXIgYXJyYXkgPSBbJ2EnLCAnYicsICdjJywgJ2EnLCAnYicsICdjJ107CiAgICAgICAgICoKICAgICAgICAgKiBfLnB1bGxBbGwoYXJyYXksIFsnYScsICdjJ10pOwogICAgICAgICAqIGNvbnNvbGUubG9nKGFycmF5KTsKICAgICAgICAgKiAvLyA9PiBbJ2InLCAnYiddCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gcHVsbEFsbChhcnJheSwgdmFsdWVzKSB7CiAgICAgICAgICByZXR1cm4gKGFycmF5ICYmIGFycmF5Lmxlbmd0aCAmJiB2YWx1ZXMgJiYgdmFsdWVzLmxlbmd0aCkKICAgICAgICAg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B9LCB7ICd4JzogMyB9LCB7ICd4JzogMSB9XTsKICAgICAgICAgKgogICAgICAgICAqIF8ucHVsbEFsbEJ5KGFycmF5LCBbeyAneCc6IDEgfSwgeyAneCc6IDMgfV0sICd4Jyk7CiAgICAgICAgICogY29uc29sZS5sb2coYXJyYXkpOwogICAgICAgICAqIC8vID0+IFt7ICd4JzogMiB9XQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHB1bGxBbGxCeShhcnJheSwgdmFsdWVzLCBpdGVyYXRlZSkgewogICAgICAgICAgcmV0dXJuIChhcnJheSAmJiBhcnJheS5sZW5ndGggJiYgdmFsdWVzICYmIHZhbHVlcy5sZW5ndGgpCiAgICAgICAgICAgID8gYmFzZVB1bGxBbGwoYXJyYXksIHZhbHVlcywgZ2V0SXRlcmF0ZWUoaXRlcmF0ZWUsIDIpKQogICAgICAgICAgICA6IGFycmF5OwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogVGhpcyBtZXRob2QgaXMgbGlrZSBgXy5wdWxsQWxsYCBleGNlcHQgdGhhdCBpdCBhY2NlcHRzIGBjb21wYXJhdG9yYCB3aGljaAogICAgICAgICAqIGlzIGludm9rZWQgdG8gY29tcGFyZSBlbGVtZW50cyBvZiBgYXJyYXlgIHRvIGB2YWx1ZXNgLiBUaGUgY29tcGFyYXRvciBpcwogICAgICAgICAqIGludm9rZWQgd2l0aCB0d28gYXJndW1lbnRzOiAoYXJyVmFsLCBvdGhWYWwpLgogICAgICAgICAqCiAgICAgICAgICogKipOb3RlOioqIFVubGlrZSBgXy5kaWZmZXJlbmNlV2l0aGAsIHRoaXMgbWV0aG9kIG11dGF0ZXMgYGFycmF5YC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSA0LjYuMAogICAgICAgICAqIEBjYXRlZ29yeSBBcnJheQogICAgICAgICAqIEBwYXJhbSB7QXJyYXl9IGFycmF5IFRoZSBhcnJheSB0byBtb2RpZnkuCiAgICAgICAgICogQHBhcmFtIHtBcnJheX0gdmFsdWVzIFRoZSB2YWx1ZXMgdG8gcmVtb3ZlLgogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IFtjb21wYXJhdG9yXSBUaGUgY29tcGFyYXRvciBpbnZva2VkIHBlciBlbGVtZW50LgogICAgICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyBgYXJyYXlgLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiB2YXIgYXJyYXkgPSBbeyAneCc6IDEsICd5JzogMiB9LCB7ICd4JzogMywgJ3knOiA0IH0sIHsgJ3gnOiA1LCAneSc6IDYgfV07CiAgICAgICAgICoKICAgICAgICAgKiBfLnB1bGxBbGxXaXRoKGFycmF5LCBbeyAneCc6IDMsICd5JzogNCB9XSwgXy5pc0VxdWFsKTsKICAgICAgICAgKiBjb25zb2xlLmxvZyhhcnJheSk7CiAgICAgICAgICogLy8gPT4gW3sgJ3gnOiAxLCAneSc6IDIgfSwgeyAneCc6IDUsICd5JzogNiB9XQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHB1bGxBbGxXaXRoKGFycmF5LCB2YWx1ZXMsIGNvbXBhcmF0b3IpIHsKICAgICAgICAgIHJldHVybiAoYXJyYXkgJiYgYXJyYXkubGVuZ3RoICYmIHZhbHVlcyAmJiB2YWx1ZXMubGVuZ3RoKQogICAgICAgICAgICA/IGJhc2VQdWxsQWxsKGFycmF5LCB2YWx1ZXMsIHVuZGVmaW5lZCQxLCBjb21wYXJhdG9yKQogICAgICAgICAgICA6IGFycmF5OwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogUmVtb3ZlcyBlbGVtZW50cyBmcm9tIGBhcnJheWAgY29ycmVzcG9uZGluZyB0byBgaW5kZXhlc2AgYW5kIHJldHVybnMgYW4KICAgICAgICAgKiBhcnJheSBvZiByZW1vdmVkIGVsZW1lbnRzLgogICAgICAgICAqCiAgICAgICAgICogKipOb3RlOioqIFVubGlrZSBgXy5hdGAsIHRoaXMgbWV0aG9kIG11dGF0ZXMgYGFycmF5YC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAzLjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBBcnJheQogICAgICAgICAqIEBwYXJhbSB7QXJyYXl9IGFycmF5IFRoZSBhcnJheSB0byBtb2RpZnkuCiAgICAgICAgICogQHBhcmFtIHsuLi4obnVtYmVyfG51bWJlcltdKX0gW2luZGV4ZXNdIFRoZSBpbmRleGVzIG9mIGVsZW1lbnRzIHRvIHJlbW92ZS4KICAgICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIG5ldyBhcnJheSBvZiByZW1vdmVkIGVsZW1lbnRzLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiB2YXIgYXJyYXkgPSBbJ2EnLCAnYicsICdjJywgJ2QnXTsKICAgICAgICAgKiB2YXIgcHVsbGVkID0gXy5wdWxsQXQoYXJyYXksIFsxLCAzXSk7CiAgICAgICAgICoKICAgICAgICAgKiBjb25zb2xlLmxvZyhhcnJheSk7CiAgICAgICAgICogLy8gPT4gWydhJywgJ2MnXQogICAgICAgICAqCiAgICAgICAgICogY29uc29sZS5sb2cocHVsbGVkKTsKICAgICAgICAgKiAvLyA9PiBbJ2InLCAnZCddCiAgICAgICAgICovCiAgICAgICAgdmFyIHB1bGxBdCA9IGZsYXRSZXN0KGZ1bmN0aW9uKGFycmF5LCBpbmRleGVzKSB7CiAgICAgICAgICB2YXIgbGVuZ3RoID0gYXJyYXkgPT0gbnVsbCA/IDAgOiBhcnJheS5sZW5ndGgsCiAgICAgICAgICAgICAgcmVzdWx0ID0gYmFzZUF0KGFycmF5LCBpbmRleGVzKTsKCiAgICAgICAgICBiYXNlUHVsbEF0KGFycmF5LCBhcnJheU1hcChpbmRleGVzLCBmdW5jdGlvbihpbmRleCkgewogICAgICAgICAgICByZXR1cm4gaXNJbmRleChpbmRleCwgbGVuZ3RoKSA/ICtpbmRleCA6IGluZGV4OwogICAgICAgICAgfSkuc29ydChjb21wYXJlQXNjZW5kaW5nKSk7CgogICAgICAgICAgcmV0dXJuIHJlc3VsdDsKICAgICAgICB9KTsKCiAgICAgICAgLyoqCiAgICAgICAgICogUmVtb3ZlcyBhbGwgZWxlbWVudHMgZnJvbSBgYXJyYXlgIHRoYXQgYHByZWRpY2F0ZWAgcmV0dXJucyB0cnV0aHkgZm9yCiAgICAgICAgICogYW5kIHJldHVybnMgYW4gYXJyYXkgb2YgdGhlIHJlbW92ZWQgZWxlbWVudHMuIFRoZSBwcmVkaWNhdGUgaXMgaW52b2tlZAogICAgICAgICAqIHdpdGggdGhyZWUgYXJndW1lbnRzOiAodmFsdWUsIGluZGV4LCBhcnJheSkuCiAgICAgICAgICoKICAgICAgICAgKiAqKk5vdGU6KiogVW5saWtlIGBfLmZpbHRlcmAsIHRoaXMgbWV0aG9kIG11dGF0ZXMgYGFycmF5YC4gVXNlIGBfLnB1bGxgCiAgICAgICAgICogdG8gcHVsbCBlbGVtZW50cyBmcm9tIGFuIGFycmF5IGJ5IHZhbHVlLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDIuMC4wCiAgICAgICAgICogQGNhdGVnb3J5IEFycmF5CiAgICAgICAgICogQHBhcmFtIHtBcnJheX0gYXJyYXkgVGhlIGFycmF5IHRvIG1vZGlmeS4KICAgICAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufSBbcHJlZGljYXRlPV8uaWRlbnRpdHldIFRoZSBmdW5jdGlvbiBpbnZva2VkIHBlciBpdGVyYXRpb24uCiAgICAgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBuZXcgYXJyYXkgb2YgcmVtb3ZlZCBlbGVtZW50cy4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogdmFyIGFycmF5ID0gWzEsIDIsIDMsIDRdOwogICAgICAgICAqIHZhciBldmVucyA9IF8ucmVtb3ZlKGFycmF5LCBmdW5jdGlvbihuKSB7CiAgICAgICAgICogICByZXR1cm4gbiAlIDIgPT0gMDsKICAgICAgICAgKiB9KTsKICAgICAgICAgKgogICAgICAgICAqIGNvbnNvbGUubG9nKGFycmF5KTsKICAgICAgICAgKiAvLyA9PiBbMSwgM10KICAgICAgICAgKgogICAgICAgICAqIGNvbnNvbGUubG9nKGV2ZW5zKTsKICAgICAgICAgKiAvLyA9PiBbMiwgNF0KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiByZW1vdmUoYXJyYXksIHByZWRpY2F0ZSkgewogICAgICAgICAgdmFyIHJlc3VsdCA9IFtdOwogICAgICAgICAgaWYgKCEoYXJyYXkgJiYgYXJyYXkubGVuZ3RoKSkgewogICAgICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICAgICAgfQogICAgICAgICAgdmFyIGluZGV4ID0gLTEsCiAgICAgICAgICAgICAgaW5kZXhlcyA9IFtdLAogICAgICAgICAgICAgIGxlbmd0aCA9IGFycmF5Lmxlbmd0aDsKCiAgICAgICAgICBwcmVkaWNhdGUgPSBnZXRJdGVyYXRlZShwcmVkaWNhdGUsIDMpOwogICAgICAgICAgd2hpbGUgKCsraW5kZXggPCBsZW5ndGgpIHsKICAgICAgICAgICAgdmFyIHZhbHVlID0gYXJyYXlbaW5kZXhdOwogICAgICAgICAgICBpZiAocHJlZGljYXRlKHZhbHVlLCBpbmRleCwgYXJyYXkpKSB7CiAgICAgICAgICAgICAgcmVzdWx0LnB1c2godmFsdWUpOwogICAgICAgICAgICAgIGluZGV4ZXMucHVzaChpbmRleCk7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICAgIGJhc2VQdWxsQXQoYXJyYXksIGluZGV4ZXMpOwogICAgICAgICAgcmV0dXJuIHJlc3VsdDsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFJldmVyc2VzIGBhcnJheWAgc28gdGhhdCB0aGUgZmlyc3QgZWxlbWVudCBiZWNvbWVzIHRoZSBsYXN0LCB0aGUgc2Vjb25kCiAgICAgICAgICogZWxlbWVudCBiZWNvbWVzIHRoZSBzZWNvbmQgdG8gbGFzdCwgYW5kIHNvIG9uLgogICAgICAgICAqCiAgICAgICAgICogKipOb3RlOioqIFRoaXMgbWV0aG9kIG11dGF0ZXMgYGFycmF5YCBhbmQgaXMgYmFzZWQgb24KICAgICAgICAgKiBbYEFycmF5I3JldmVyc2VgXShodHRwczovL21kbi5pby9BcnJheS9yZXZlcnNlKS4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSA0LjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBBcnJheQogICAgICAgICAqIEBwYXJhbSB7QXJyYXl9IGFycmF5IFRoZSBhcnJheSB0byBtb2RpZnkuCiAgICAgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIGBhcnJheWAuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIHZhciBhcnJheSA9IFsxLCAyLCAzXTsKICAgICAgICAgKgogICAgICAgICAqIF8ucmV2ZXJzZShhcnJheSk7CiAgICAgICAgICogLy8gPT4gWzMsIDIsIDFdCiAgICAgICAgICoKICAgICAgICAgKiBjb25zb2xlLmxvZyhhcnJheSk7CiAgICAgICAgICogLy8gPT4gWzMsIDIsIDFdCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gcmV2ZXJzZShhcnJheSkgewogICAgICAgICAgcmV0dXJuIGFycmF5ID09IG51bGwgPyBhcnJheSA6IG5hdGl2ZVJldmVyc2UuY2FsbChhcnJheSk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDcmVhdGVzIGEgc2xpY2Ugb2YgYGFycmF5YCBmcm9tIGBzdGFydGAgdXAgdG8sIGJ1dCBub3QgaW5jbHVkaW5nLCBgZW5kYC4KICAgICAgICAgKgogICAgICAgICAqICoqTm90ZToqKiBUaGlzIG1ldGhvZCBpcyB1c2VkIGluc3RlYWQgb2YKICAgICAgICAgKiBbYEFycmF5I3NsaWNlYF0oaHR0cHM6Ly9tZG4uaW8vQXJyYXkvc2xpY2UpIHRvIGVuc3VyZSBkZW5zZSBhcnJheXMgYXJlCiAgICAgICAgICogcmV0dXJuZWQuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgMy4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgQXJyYXkKICAgICAgICAgKiBAcGFyYW0ge0FycmF5fSBhcnJheSBUaGUgYXJyYXkgdG8gc2xpY2UuCiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IFtzdGFydD0wXSBUaGUgc3RhcnQgcG9zaXRpb24uCiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IFtlbmQ9YXJyYXkubGVuZ3RoXSBUaGUgZW5kIHBvc2l0aW9uLgogICAgICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyB0aGUgc2xpY2Ugb2YgYGFycmF5YC4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBzbGljZShhcnJheSwgc3RhcnQsIGVuZCkgewogICAgICAgICAgdmFyIGxlbmd0aCA9IGFycmF5ID09IG51bGwgPyAwIDogYXJyYXkubGVuZ3RoOwogICAgICAgICAgaWYgKCFsZW5ndGgpIHsKICAgICAgICAgICAgcmV0dXJuIFtdOwogICAgICAgICAgfQogICAgICAgICAgaWYgKGVuZCAmJiB0eXBlb2YgZW5kICE9ICdudW1iZXInICYmIGlzSXRlcmF0ZWVDYWxsKGFycmF5LCBzdGFydCwgZW5kKSkgewogICAgICAgICAgICBzdGFydCA9IDA7CiAgICAgICAgICAgIGVuZCA9IGxlbmd0aDsKICAgICAgICAgIH0KICAgICAgICAgIGVsc2UgewogICAgICAgICAgICBzdGFydCA9IHN0YXJ0ID09IG51bGwgPyAwIDogdG9JbnRlZ2VyKHN0YXJ0KTsKICAgICAgICAgICAgZW5kID0gZW5kID09PSB1bmRlZmluZWQkMSA/IGxlbmd0aCA6IHRvSW50ZWdlcihlbmQpOwogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIGJhc2VTbGljZShhcnJheSwgc3RhcnQsIGVuZCk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBVc2VzIGEgYmluYXJ5IHNlYXJjaCB0byBkZXRlcm1pbmUgdGhlIGxvd2VzdCBpbmRleCBhdCB3aGljaCBgdmFsdWVgCiAgICAgICAgICogc2hvdWxkIGJlIGluc2VydGVkIGludG8gYGFycmF5YCBpbiBvcmRlciB0byBtYWludGFpbiBpdHMgc29ydCBvcmRlci4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAwLjEuMAogICAgICAgICAqIEBjYXRlZ29yeSBBcnJheQogICAgICAgICAqIEBwYXJhbSB7QXJyYXl9IGFycmF5IFRoZSBzb3J0ZWQgYXJyYXkgdG8gaW5zcGVjdC4KICAgICAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBldmFsdWF0ZS4KICAgICAgICAgKiBAcmV0dXJucyB7bnVtYmVyfSBSZXR1cm5zIHRoZSBpbmRleCBhdCB3aGljaCBgdmFsdWVgIHNob3VsZCBiZSBpbnNlcnRlZAogICAgICAgICAqICBpbnRvIGBhcnJheWAuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8uc29ydGVkSW5kZXgoWzMwLCA1MF0sIDQwKTsKICAgICAgICAgKiAvLyA9PiAxCiAgICAgICAgIC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CB7ICd4JzogNSB9XTsKICAgICAgICAgKgogICAgICAgICAqIF8uc29ydGVkSW5kZXhCeShvYmplY3RzLCB7ICd4JzogNCB9LCBmdW5jdGlvbihvKSB7IHJldHVybiBvLng7IH0pOwogICAgICAgICAqIC8vID0+IDAKICAgICAgICAgKgogICAgICAgICAqIC8vIFRoZSBgXy5wcm9wZXJ0eWAgaXRlcmF0ZWUgc2hvcnRoYW5kLgogICAgICAgICAqIF8uc29ydGVkSW5kZXhCeShvYmplY3RzLCB7ICd4JzogNCB9LCAneCcpOwogICAgICAgICAqIC8vID0+IDAKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBzb3J0ZWRJbmRleEJ5KGFycmF5LCB2YWx1ZSwgaXRlcmF0ZWUpIHsKICAgICAgICAgIHJldHVybiBiYXNlU29ydGVkSW5kZXhCeShhcnJheSwgdmFsdWUsIGdldEl0ZXJhdGVlKGl0ZXJhdGVlLCAyKSk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBUaGlzIG1ldGhvZCBpcyBsaWtlIGBfLmluZGV4T2ZgIGV4Y2VwdCB0aGF0IGl0IHBlcmZvcm1zIGEgYmluYXJ5CiAgICAgICAgICogc2VhcmNoIG9uIGEgc29ydGVkIGBhcnJheWAuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgQXJyYXkKICAgICAgICAgKiBAcGFyYW0ge0FycmF5fSBhcnJheSBUaGUgYXJyYXkgdG8gaW5zcGVjdC4KICAgICAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBzZWFyY2ggZm9yLgogICAgICAgICAqIEByZXR1cm5zIHtudW1iZXJ9IFJldHVybnMgdGhlIGluZGV4IG9mIHRoZSBtYXRjaGVkIHZhbHVlLCBlbHNlIGAtMWAuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8uc29ydGVkSW5kZXhPZihbNCwgNSwgNSwgNSwgNl0sIDUpOwogICAgICAgICAqIC8vID0+IDEKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBzb3J0ZWRJbmRleE9mKGFycmF5LCB2YWx1ZSkgewogICAgICAgICAgdmFyIGxlbmd0aCA9IGFycmF5ID09IG51bGwgPyAwIDogYXJyYXkubGVuZ3RoOwogICAgICAgICAgaWYgKGxlbmd0aCkgewogICAgICAgICAgICB2YXIgaW5kZXggPSBiYXNlU29ydGVkSW5kZXgoYXJyYXksIHZhbHVlKTsKICAgICAgICAgICAgaWYgKGluZGV4IDwgbGVuZ3RoICYmIGVxKGFycmF5W2luZGV4XSwgdmFsdWUpKSB7CiAgICAgICAgICAgICAgcmV0dXJuIGluZGV4OwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gLTE7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBUaGlzIG1ldGhvZCBpcyBsaWtlIGBfLnNvcnRlZEluZGV4YCBleGNlcHQgdGhhdCBpdCByZXR1cm5zIHRoZSBoaWdoZXN0CiAgICAgICAgICogaW5kZXggYXQgd2hpY2ggYHZhbHVlYCBzaG91bGQgYmUgaW5zZXJ0ZWQgaW50byBgYXJyYXlgIGluIG9yZGVyIHRvCiAgICAgICAgICogbWFpbnRhaW4gaXRzIHNvcnQgb3JkZXIuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgMy4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgQXJyYXkKICAgICAgICAgKiBAcGFyYW0ge0FycmF5fSBhcnJheSBUaGUgc29ydGVkIGFycmF5IHRvIGluc3BlY3QuCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gZXZhbHVhdGUuCiAgICAgICAgIC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V8uaWRlbnRpdHldIFRoZSBpdGVyYXRlZSBpbnZva2VkIHBlciBlbGVtZW50LgogICAgICAgICAqIEByZXR1cm5zIHtudW1iZXJ9IFJldHVybnMgdGhlIGluZGV4IGF0IHdoaWNoIGB2YWx1ZWAgc2hvdWxkIGJlIGluc2VydGVkCiAgICAgICAgICogIGludG8gYGFycmF5YC4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogdmFyIG9iamVjdHMgPSBbeyAneCc6IDQgfSwgeyAneCc6IDUgfV07CiAgICAgICAgICoKICAgICAgICAgKiBfLnNvcnRlZExhc3RJbmRleEJ5KG9iamVjdHMsIHsgJ3gnOiA0IH0sIGZ1bmN0aW9uKG8pIHsgcmV0dXJuIG8ueDsgfSk7CiAgICAgICAgICogLy8gPT4gMQogICAgICAgICAqCiAgICAgICAgICogLy8gVGhlIGBfLnByb3BlcnR5YCBpdGVyYXRlZSBzaG9ydGhhbmQuCiAgICAgICAgICogXy5zb3J0ZWRMYXN0SW5kZXhCeShvYmplY3RzLCB7ICd4JzogNCB9LCAneCcpOwogICAgICAgICAqIC8vID0+IDEKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBzb3J0ZWRMYXN0SW5kZXhCeShhcnJheSwgdmFsdWUsIGl0ZXJhdGVlKSB7CiAgICAgICAgICByZXR1cm4gYmFzZVNvcnRlZEluZGV4QnkoYXJyYXksIHZhbHVlLCBnZXRJdGVyYXRlZShpdGVyYXRlZSwgMiksIHRydWUpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogVGhpcyBtZXRob2QgaXMgbGlrZSBgXy5sYXN0SW5kZXhPZmAgZXhjZXB0IHRoYXQgaXQgcGVyZm9ybXMgYSBiaW5hcnkKICAgICAgICAgKiBzZWFyY2ggb24gYSBzb3J0ZWQgYGFycmF5YC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSA0LjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBBcnJheQogICAgICAgICAqIEBwYXJhbSB7QXJyYXl9IGFycmF5IFRoZSBhcnJheSB0byBpbnNwZWN0LgogICAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIHNlYXJjaCBmb3IuCiAgICAgICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgaW5kZXggb2YgdGhlIG1hdGNoZWQgdmFsdWUsIGVsc2UgYC0xYC4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy5zb3J0ZWRMYXN0SW5kZXhPZihbNCwgNSwgNSwgNSwgNl0sIDUpOwogICAgICAgICAqIC8vID0+IDMKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBzb3J0ZWRMYXN0SW5kZXhPZihhcnJheSwgdmFsdWUpIHsKICAgICAgICAgIHZhciBsZW5ndGggPSBhcnJheSA9PSBudWxsID8gMCA6IGFycmF5Lmxlbmd0aDsKICAgICAgICAgIGlmIChsZW5ndGgpIHsKICAgICAgICAgICAgdmFyIGluZGV4ID0gYmFzZVNvcnRlZEluZGV4KGFycmF5LCB2YWx1ZSwgdHJ1ZSkgLSAxOwogICAgICAgICAgICBpZiAoZXEoYXJyYXlbaW5kZXhdLCB2YWx1ZSkpIHsKICAgICAgICAgICAgICByZXR1cm4gaW5kZXg7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiAtMTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFRoaXMgbWV0aG9kIGlzIGxpa2UgYF8udW5pcWAgZXhjZXB0IHRoYXQgaXQncyBkZXNpZ25lZCBhbmQgb3B0aW1pemVkCiAgICAgICAgICogZm9yIHNvcnRlZCBhcnJheXMuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgQXJyYXkKICAgICAgICAgKiBAcGFyYW0ge0FycmF5fSBhcnJheSBUaGUgYXJyYXkgdG8gaW5zcGVjdC4KICAgICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIG5ldyBkdXBsaWNhdGUgZnJlZSBhcnJheS4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy5zb3J0ZWRVbmlxKFsxLCAxLCAyXSk7CiAgICAgICAgICogLy8gPT4gWzEsIDJdCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gc29ydGVkVW5pcShhcnJheSkgewogICAgICAgICAgcmV0dXJuIChhcnJheSAmJiBhcnJheS5sZW5ndGgpCiAgICAgICAgICAgID8gYmFzZVNvcnRlZFVuaXEoYXJyYXkpCiAgICAgICAgICAgIDogW107CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBUaGlzIG1ldGhvZCBpcyBsaWtlIGBfLnVuaXFCeWAgZXhjZXB0IHRoYXQgaXQncyBkZXNpZ25lZCBhbmQgb3B0aW1pemVkCiAgICAgICAgICogZm9yIHNvcnRlZCBhcnJheXMuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgQXJyYXkKICAgICAgICAgKiBAcGFyYW0ge0FycmF5fSBhcnJheSBUaGUgYXJyYXkgdG8gaW5zcGVjdC4KICAgICAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufSBbaXRlcmF0ZWVdIFRoZSBpdGVyYXRlZSBpbnZva2VkIHBlciBlbGVtZW50LgogICAgICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyB0aGUgbmV3IGR1cGxpY2F0ZSBmcmVlIGFycmF5LgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLnNvcnRlZFVuaXFCeShbMS4xLCAxLjIsIDIuMywgMi40XSwgTWF0aC5mbG9vcik7CiAgICAgICAgICogLy8gPT4gWzEuMSwgMi4zXQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHNvcnRlZFVuaXFCeShhcnJheSwgaXRlcmF0ZWUpIHsKICAgICAgICAgIHJldHVybiAoYXJyYXkgJiYgYXJyYXkubGVuZ3RoKQogICAgICAgICAgICA/IGJhc2VTb3J0ZWRVbmlxKGFycmF5LCBnZXRJdGVyYXRlZShpdGVyYXRlZSwgMikpCiAgICAgICAgICAgIDogW107CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIGFsbCBidXQgdGhlIGZpcnN0IGVsZW1lbnQgb2YgYGFycmF5YC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSA0LjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBBcnJheQogICAgICAgICAqIEBwYXJhbSB7QXJyYXl9IGFycmF5IFRoZSBhcnJheSB0byBxdWVyeS4KICAgICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIHNsaWNlIG9mIGBhcnJheWAuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8udGFpbChbMSwgMiwgM10pOwogICAgICAgICAqIC8vID0+IFsyLCAzXQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHRhaWwoYXJyYXkpIHsKICAgICAgICAgIHZhciBsZW5ndGggPSBhcnJheSA9PSBudWxsID8gMCA6IGFycmF5Lmxlbmd0aDsKICAgICAgICAgIHJldHVybiBsZW5ndGggPyBiYXNlU2xpY2UoYXJyYXksIDEsIGxlbmd0aCkgOiBbXTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYSBzbGljZSBvZiBgYXJyYXlgIHdpdGggYG5gIGVsZW1lbnRzIHRha2VuIGZyb20gdGhlIGJlZ2lubmluZy4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAwLjEuMAogICAgICAgICAqIEBjYXRlZ29yeSBBcnJheQogICAgICAgICAqIEBwYXJhbSB7QXJyYXl9IGFycmF5IFRoZSBhcnJheSB0byBxdWVyeS4KICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gW249MV0gVGhlIG51bWJlciBvZiBlbGVtZW50cyB0byB0YWtlLgogICAgICAgICAqIEBwYXJhbS0ge09iamVjdH0gW2d1YXJkXSBFbmFibGVzIHVzZSBhcyBhbiBpdGVyYXRlZSBmb3IgbWV0aG9kcyBsaWtlIGBfLm1hcGAuCiAgICAgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBzbGljZSBvZiBgYXJyYXlgLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLnRha2UoWzEsIDIsIDNdKTsKICAgICAgICAgKiAvLyA9PiBbMV0KICAgICAgICAgKgogICAgICAgICAqIF8udGFrZShbMSwgMiwgM10sIDIpOwogICAgICAgICAqIC8vID0+IFsxLCAyXQogICAgICAgICAqCiAgICAgICAgICogXy50YWtlKFsxLCAyLCAzXSwgNSk7CiAgICAgICAgICogLy8gPT4gWzEsIDIsIDNdCiAgICAgICAgICoKICAgICAgICAgKiBfLnRha2UoWzEsIDIsIDNdLCAwKTsKICAgICAgICAgKiAvLyA9PiBbXQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHRha2UoYXJyYXksIG4sIGd1YXJkKSB7CiAgICAgICAgICBpZiAoIShhcnJheSAmJiBhcnJheS5sZW5ndGgpKSB7CiAgICAgICAgICAgIHJldHVybiBbXTsKICAgICAgICAgIH0KICAgICAgICAgIG4gPSAoZ3VhcmQgfHwgbiA9PT0gdW5kZWZpbmVkJDEpID8gMSA6IHRvSW50ZWdlcihuKTsKICAgICAgICAgIHJldHVybiBiYXNlU2xpY2UoYXJyYXksIDAsIG4gPCAwID8gMCA6IG4pOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhIHNsaWNlIG9mIGBhcnJheWAgd2l0aCBgbmAgZWxlbWVudHMgdGFrZW4gZnJvbSB0aGUgZW5kLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDMuMC4wCiAgICAgICAgICogQGNhdGVnb3J5IEFycmF5CiAgICAgICAgICogQHBhcmFtIHtBcnJheX0gYXJyYXkgVGhlIGFycmF5IHRvIHF1ZXJ5LgogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBbbj0xXSBUaGUgbnVtYmVyIG9mIGVsZW1lbnRzIHRvIHRha2UuCiAgICAgICAgICogQHBhcmFtLSB7T2JqZWN0fSBbZ3VhcmRdIEVuYWJsZXMgdXNlIGFzIGFuIGl0ZXJhdGVlIGZvciBtZXRob2RzIGxpa2UgYF8ubWFwYC4KICAgICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIHNsaWNlIG9mIGBhcnJheWAuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8udGFrZVJpZ2h0KFsxLCAyLCAzXSk7CiAgICAgICAgICogLy8gPT4gWzNdCiAgICAgICAgICoKICAgICAgICAgKiBfLnRha2VSaWdodChbMSwgMiwgM10sIDIpOwogICAgICAgICAqIC8vID0+IFsyLCAzXQogICAgICAgICAqCiAgICAgICAgICogXy50YWtlUmlnaHQoWzEsIDIsIDNdLCA1KTsKICAgICAgICAgKiAvLyA9PiBbMSwgMiwgM10KICAgICAgICAgKgogICAgICAgICAqIF8udGFrZVJpZ2h0KFsxLCAyLCAzXSwgMCk7CiAgICAgICAgICogLy8gPT4gW10KICAgICAgIC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b2YgYGFycmF5YC4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogdmFyIHVzZXJzID0gWwogICAgICAgICAqICAgeyAndXNlcic6ICdiYXJuZXknLCAgJ2FjdGl2ZSc6IHRydWUgfSwKICAgICAgICAgKiAgIHsgJ3VzZXInOiAnZnJlZCcsICAgICdhY3RpdmUnOiBmYWxzZSB9LAogICAgICAgICAqICAgeyAndXNlcic6ICdwZWJibGVzJywgJ2FjdGl2ZSc6IGZhbHNlIH0KICAgICAgICAgKiBdOwogICAgICAgICAqCiAgICAgICAgICogXy50YWtlUmlnaHRXaGlsZSh1c2VycywgZnVuY3Rpb24obykgeyByZXR1cm4gIW8uYWN0aXZlOyB9KTsKICAgICAgICAgKiAvLyA9PiBvYmplY3RzIGZvciBbJ2ZyZWQnLCAncGViYmxlcyddCiAgICAgICAgICoKICAgICAgICAgKiAvLyBUaGUgYF8ubWF0Y2hlc2AgaXRlcmF0ZWUgc2hvcnRoYW5kLgogICAgICAgICAqIF8udGFrZVJpZ2h0V2hpbGUodXNlcnMsIHsgJ3VzZXInOiAncGViYmxlcycsICdhY3RpdmUnOiBmYWxzZSB9KTsKICAgICAgICAgKiAvLyA9PiBvYmplY3RzIGZvciBbJ3BlYmJsZXMnXQogICAgICAgICAqCiAgICAgICAgICogLy8gVGhlIGBfLm1hdGNoZXNQcm9wZXJ0eWAgaXRlcmF0ZWUgc2hvcnRoYW5kLgogICAgICAgICAqIF8udGFrZVJpZ2h0V2hpbGUodXNlcnMsIFsnYWN0aXZlJywgZmFsc2VdKTsKICAgICAgICAgKiAvLyA9PiBvYmplY3RzIGZvciBbJ2ZyZWQnLCAncGViYmxlcyddCiAgICAgICAgICoKICAgICAgICAgKiAvLyBUaGUgYF8ucHJvcGVydHlgIGl0ZXJhdGVlIHNob3J0aGFuZC4KICAgICAgICAgKiBfLnRha2VSaWdodFdoaWxlKHVzZXJzLCAnYWN0aXZlJyk7CiAgICAgICAgICogLy8gPT4gW10KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiB0YWtlUmlnaHRXaGlsZShhcnJheSwgcHJlZGljYXRlKSB7CiAgICAgICAgICByZXR1cm4gKGFycmF5ICYmIGFycmF5Lmxlbmd0aCkKICAgICAgICAgICAgPyBiYXNlV2hpbGUoYXJyYXksIGdldEl0ZXJhdGVlKHByZWRpY2F0ZSwgMyksIGZhbHNlLCB0cnVlKQogICAgICAgICAgICA6IFtdOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhIHNsaWNlIG9mIGBhcnJheWAgd2l0aCBlbGVtZW50cyB0YWtlbiBmcm9tIHRoZSBiZWdpbm5pbmcuIEVsZW1lbnRzCiAgICAgICAgICogYXJlIHRha2VuIHVudGlsIGBwcmVkaWNhdGVgIHJldHVybnMgZmFsc2V5LiBUaGUgcHJlZGljYXRlIGlzIGludm9rZWQgd2l0aAogICAgICAgICAqIHRocmVlIGFyZ3VtZW50czogKHZhbHVlLCBpbmRleCwgYXJyYXkpLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDMuMC4wCiAgICAgICAgICogQGNhdGVnb3J5IEFycmF5CiAgICAgICAgICogQHBhcmFtIHtBcnJheX0gYXJyYXkgVGhlIGFycmF5IHRvIHF1ZXJ5LgogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IFtwcmVkaWNhdGU9Xy5pZGVudGl0eV0gVGhlIGZ1bmN0aW9uIGludm9rZWQgcGVyIGl0ZXJhdGlvbi4KICAgICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIHNsaWNlIG9mIGBhcnJheWAuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIHZhciB1c2VycyA9IFsKICAgICAgICAgKiAgIHsgJ3VzZXInOiAnYmFybmV5JywgICdhY3RpdmUnOiBmYWxzZSB9LAogICAgICAgICAqICAgeyAndXNlcic6ICdmcmVkJywgICAgJ2FjdGl2ZSc6IGZhbHNlIH0sCiAgICAgICAgICogICB7ICd1c2VyJzogJ3BlYmJsZXMnLCAnYWN0aXZlJzogdHJ1ZSB9CiAgICAgICAgICogXTsKICAgICAgICAgKgogICAgICAgICAqIF8udGFrZVdoaWxlKHVzZXJzLCBmdW5jdGlvbihvKSB7IHJldHVybiAhby5hY3RpdmU7IH0pOwogICAgICAgICAqIC8vID0+IG9iamVjdHMgZm9yIFsnYmFybmV5JywgJ2ZyZWQnXQogICAgICAgICAqCiAgICAgICAgICogLy8gVGhlIGBfLm1hdGNoZXNgIGl0ZXJhdGVlIHNob3J0aGFuZC4KICAgICAgICAgKiBfLnRha2VXaGlsZSh1c2VycywgeyAndXNlcic6ICdiYXJuZXknLCAnYWN0aXZlJzogZmFsc2UgfSk7CiAgICAgICAgICogLy8gPT4gb2JqZWN0cyBmb3IgWydiYXJuZXknXQogICAgICAgICAqCiAgICAgICAgICogLy8gVGhlIGBfLm1hdGNoZXNQcm9wZXJ0eWAgaXRlcmF0ZWUgc2hvcnRoYW5kLgogICAgICAgICAqIF8udGFrZVdoaWxlKHVzZXJzLCBbJ2FjdGl2ZScsIGZhbHNlXSk7CiAgICAgICAgICogLy8gPT4gb2JqZWN0cyBmb3IgWydiYXJuZXknLCAnZnJlZCddCiAgICAgICAgICoKICAgICAgICAgKiAvLyBUaGUgYF8ucHJvcGVydHlgIGl0ZXJhdGVlIHNob3J0aGFuZC4KICAgICAgICAgKiBfLnRha2VXaGlsZSh1c2VycywgJ2FjdGl2ZScpOwogICAgICAgICAqIC8vID0+IFtdCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gdGFrZVdoaWxlKGFycmF5LCBwcmVkaWNhdGUpIHsKICAgICAgICAgIHJldHVybiAoYXJyYXkgJiYgYXJyYXkubGVuZ3RoKQogICAgICAgICAgICA/IGJhc2VXaGlsZShhcnJheSwgZ2V0SXRlcmF0ZWUocHJlZGljYXRlLCAzKSkKICAgICAgICAgICAgOiBbXTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYW4gYXJyYXkgb2YgdW5pcXVlIHZhbHVlcywgaW4gb3JkZXIsIGZyb20gYWxsIGdpdmVuIGFycmF5cyB1c2luZwogICAgICAgICAqIFtgU2FtZVZhbHVlWmVyb2BdKGh0dHA6Ly9lY21hLWludGVybmF0aW9uYWwub3JnL2VjbWEtMjYyLzcuMC8jc2VjLXNhbWV2YWx1ZXplcm8pCiAgICAgICAgICogZm9yIGVxdWFsaXR5IGNvbXBhcmlzb25zLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDAuMS4wCiAgICAgICAgICogQGNhdGVnb3J5IEFycmF5CiAgICAgICAgICogQHBhcmFtIHsuLi5BcnJheX0gW2FycmF5c10gVGhlIGFycmF5cyB0byBpbnNwZWN0LgogICAgICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyB0aGUgbmV3IGFycmF5IG9mIGNvbWJpbmVkIHZhbHVlcy4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy51bmlvbihbMl0sIFsxLCAyXSk7CiAgICAgICAgICogLy8gPT4gWzIsIDFdCiAgICAgICAgICovCiAgICAgICAgdmFyIHVuaW9uID0gYmFzZVJlc3QoZnVuY3Rpb24oYXJyYXlzKSB7CiAgICAgICAgICByZXR1cm4gYmFzZVVuaXEoYmFzZUZsYXR0ZW4oYXJyYXlzLCAxLCBpc0FycmF5TGlrZU9iamVjdCwgdHJ1ZSkpOwogICAgICAgIH0pOwoKICAgICAgICAvKioKICAgICAgICAgKiBUaGlzIG1ldGhvZCBpcyBsaWtlIGBfLnVuaW9uYCBleGNlcHQgdGhhdCBpdCBhY2NlcHRzIGBpdGVyYXRlZWAgd2hpY2ggaXMKICAgICAgICAgKiBpbnZva2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AneCc6IDEgfSwgeyAneCc6IDIgfV0KICAgICAgICAgKi8KICAgICAgICB2YXIgdW5pb25CeSA9IGJhc2VSZXN0KGZ1bmN0aW9uKGFycmF5cykgewogICAgICAgICAgdmFyIGl0ZXJhdGVlID0gbGFzdChhcnJheXMpOwogICAgICAgICAgaWYgKGlzQXJyYXlMaWtlT2JqZWN0KGl0ZXJhdGVlKSkgewogICAgICAgICAgICBpdGVyYXRlZSA9IHVuZGVmaW5lZCQxOwogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIGJhc2VVbmlxKGJhc2VGbGF0dGVuKGFycmF5cywgMSwgaXNBcnJheUxpa2VPYmplY3QsIHRydWUpLCBnZXRJdGVyYXRlZShpdGVyYXRlZSwgMikpOwogICAgICAgIH0pOwoKICAgICAgICAvKioKICAgICAgICAgKiBUaGlzIG1ldGhvZCBpcyBsaWtlIGBfLnVuaW9uYCBleGNlcHQgdGhhdCBpdCBhY2NlcHRzIGBjb21wYXJhdG9yYCB3aGljaAogICAgICAgICAqIGlzIGludm9rZWQgdG8gY29tcGFyZSBlbGVtZW50cyBvZiBgYXJyYXlzYC4gUmVzdWx0IHZhbHVlcyBhcmUgY2hvc2VuIGZyb20KICAgICAgICAgKiB0aGUgZmlyc3QgYXJyYXkgaW4gd2hpY2ggdGhlIHZhbHVlIG9jY3Vycy4gVGhlIGNvbXBhcmF0b3IgaXMgaW52b2tlZAogICAgICAgICAqIHdpdGggdHdvIGFyZ3VtZW50czogKGFyclZhbCwgb3RoVmFsKS4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSA0LjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBBcnJheQogICAgICAgICAqIEBwYXJhbSB7Li4uQXJyYXl9IFthcnJheXNdIFRoZSBhcnJheXMgdG8gaW5zcGVjdC4KICAgICAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufSBbY29tcGFyYXRvcl0gVGhlIGNvbXBhcmF0b3IgaW52b2tlZCBwZXIgZWxlbWVudC4KICAgICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIG5ldyBhcnJheSBvZiBjb21iaW5lZCB2YWx1ZXMuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIHZhciBvYmplY3RzID0gW3sgJ3gnOiAxLCAneSc6IDIgfSwgeyAneCc6IDIsICd5JzogMSB9XTsKICAgICAgICAgKiB2YXIgb3RoZXJzID0gW3sgJ3gnOiAxLCAneSc6IDEgfSwgeyAneCc6IDEsICd5JzogMiB9XTsKICAgICAgICAgKgogICAgICAgICAqIF8udW5pb25XaXRoKG9iamVjdHMsIG90aGVycywgXy5pc0VxdWFsKTsKICAgICAgICAgKiAvLyA9PiBbeyAneCc6IDEsICd5JzogMiB9LCB7ICd4JzogMiwgJ3knOiAxIH0sIHsgJ3gnOiAxLCAneSc6IDEgfV0KICAgICAgICAgKi8KICAgICAgICB2YXIgdW5pb25XaXRoID0gYmFzZVJlc3QoZnVuY3Rpb24oYXJyYXlzKSB7CiAgICAgICAgICB2YXIgY29tcGFyYXRvciA9IGxhc3QoYXJyYXlzKTsKICAgICAgICAgIGNvbXBhcmF0b3IgPSB0eXBlb2YgY29tcGFyYXRvciA9PSAnZnVuY3Rpb24nID8gY29tcGFyYXRvciA6IHVuZGVmaW5lZCQxOwogICAgICAgICAgcmV0dXJuIGJhc2VVbmlxKGJhc2VGbGF0dGVuKGFycmF5cywgMSwgaXNBcnJheUxpa2VPYmplY3QsIHRydWUpLCB1bmRlZmluZWQkMSwgY29tcGFyYXRvcik7CiAgICAgICAgfSk7CgogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYSBkdXBsaWNhdGUtZnJlZSB2ZXJzaW9uIG9mIGFuIGFycmF5LCB1c2luZwogICAgICAgICAqIFtgU2FtZVZhbHVlWmVyb2BdKGh0dHA6Ly9lY21hLWludGVybmF0aW9uYWwub3JnL2VjbWEtMjYyLzcuMC8jc2VjLXNhbWV2YWx1ZXplcm8pCiAgICAgICAgICogZm9yIGVxdWFsaXR5IGNvbXBhcmlzb25zLCBpbiB3aGljaCBvbmx5IHRoZSBmaXJzdCBvY2N1cnJlbmNlIG9mIGVhY2ggZWxlbWVudAogICAgICAgICAqIGlzIGtlcHQuIFRoZSBvcmRlciBvZiByZXN1bHQgdmFsdWVzIGlzIGRldGVybWluZWQgYnkgdGhlIG9yZGVyIHRoZXkgb2NjdXIKICAgICAgICAgKiBpbiB0aGUgYXJyYXkuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgMC4xLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgQXJyYXkKICAgICAgICAgKiBAcGFyYW0ge0FycmF5fSBhcnJheSBUaGUgYXJyYXkgdG8gaW5zcGVjdC4KICAgICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIG5ldyBkdXBsaWNhdGUgZnJlZSBhcnJheS4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy51bmlxKFsyLCAxLCAyXSk7CiAgICAgICAgICogLy8gPT4gWzIsIDFdCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gdW5pcShhcnJheSkgewogICAgICAgICAgcmV0dXJuIChhcnJheSAmJiBhcnJheS5sZW5ndGgpID8gYmFzZVVuaXEoYXJyYXkpIDogW107CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBUaGlzIG1ldGhvZCBpcyBsaWtlIGBfLnVuaXFgIGV4Y2VwdCB0aGF0IGl0IGFjY2VwdHMgYGl0ZXJhdGVlYCB3aGljaCBpcwogICAgICAgICAqIGludm9rZWQgZm9yIGVhY2ggZWxlbWVudCBpbiBgYXJyYXlgIHRvIGdlbmVyYXRlIHRoZSBjcml0ZXJpb24gYnkgd2hpY2gKICAgICAgIC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aXFXaXRoKG9iamVjdHMsIF8uaXNFcXVhbCk7CiAgICAgICAgICogLy8gPT4gW3sgJ3gnOiAxLCAneSc6IDIgfSwgeyAneCc6IDIsICd5JzogMSB9XQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHVuaXFXaXRoKGFycmF5LCBjb21wYXJhdG9yKSB7CiAgICAgICAgICBjb21wYXJhdG9yID0gdHlwZW9mIGNvbXBhcmF0b3IgPT0gJ2Z1bmN0aW9uJyA/IGNvbXBhcmF0b3IgOiB1bmRlZmluZWQkMTsKICAgICAgICAgIHJldHVybiAoYXJyYXkgJiYgYXJyYXkubGVuZ3RoKSA/IGJhc2VVbmlxKGFycmF5LCB1bmRlZmluZWQkMSwgY29tcGFyYXRvcikgOiBbXTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFRoaXMgbWV0aG9kIGlzIGxpa2UgYF8uemlwYCBleGNlcHQgdGhhdCBpdCBhY2NlcHRzIGFuIGFycmF5IG9mIGdyb3VwZWQKICAgICAgICAgKiBlbGVtZW50cyBhbmQgY3JlYXRlcyBhbiBhcnJheSByZWdyb3VwaW5nIHRoZSBlbGVtZW50cyB0byB0aGVpciBwcmUtemlwCiAgICAgICAgICogY29uZmlndXJhdGlvbi4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAxLjIuMAogICAgICAgICAqIEBjYXRlZ29yeSBBcnJheQogICAgICAgICAqIEBwYXJhbSB7QXJyYXl9IGFycmF5IFRoZSBhcnJheSBvZiBncm91cGVkIGVsZW1lbnRzIHRvIHByb2Nlc3MuCiAgICAgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBuZXcgYXJyYXkgb2YgcmVncm91cGVkIGVsZW1lbnRzLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiB2YXIgemlwcGVkID0gXy56aXAoWydhJywgJ2InXSwgWzEsIDJdLCBbdHJ1ZSwgZmFsc2VdKTsKICAgICAgICAgKiAvLyA9PiBbWydhJywgMSwgdHJ1ZV0sIFsnYicsIDIsIGZhbHNlXV0KICAgICAgICAgKgogICAgICAgICAqIF8udW56aXAoemlwcGVkKTsKICAgICAgICAgKiAvLyA9PiBbWydhJywgJ2InXSwgWzEsIDJdLCBbdHJ1ZSwgZmFsc2VdXQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHVuemlwKGFycmF5KSB7CiAgICAgICAgICBpZiAoIShhcnJheSAmJiBhcnJheS5sZW5ndGgpKSB7CiAgICAgICAgICAgIHJldHVybiBbXTsKICAgICAgICAgIH0KICAgICAgICAgIHZhciBsZW5ndGggPSAwOwogICAgICAgICAgYXJyYXkgPSBhcnJheUZpbHRlcihhcnJheSwgZnVuY3Rpb24oZ3JvdXApIHsKICAgICAgICAgICAgaWYgKGlzQXJyYXlMaWtlT2JqZWN0KGdyb3VwKSkgewogICAgICAgICAgICAgIGxlbmd0aCA9IG5hdGl2ZU1heChncm91cC5sZW5ndGgsIGxlbmd0aCk7CiAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0pOwogICAgICAgICAgcmV0dXJuIGJhc2VUaW1lcyhsZW5ndGgsIGZ1bmN0aW9uKGluZGV4KSB7CiAgICAgICAgICAgIHJldHVybiBhcnJheU1hcChhcnJheSwgYmFzZVByb3BlcnR5KGluZGV4KSk7CiAgICAgICAgICB9KTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFRoaXMgbWV0aG9kIGlzIGxpa2UgYF8udW56aXBgIGV4Y2VwdCB0aGF0IGl0IGFjY2VwdHMgYGl0ZXJhdGVlYCB0byBzcGVjaWZ5CiAgICAgICAgICogaG93IHJlZ3JvdXBlZCB2YWx1ZXMgc2hvdWxkIGJlIGNvbWJpbmVkLiBUaGUgaXRlcmF0ZWUgaXMgaW52b2tlZCB3aXRoIHRoZQogICAgICAgICAqIGVsZW1lbnRzIG9mIGVhY2ggZ3JvdXA6ICguLi5ncm91cCkuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgMy44LjAKICAgICAgICAgKiBAY2F0ZWdvcnkgQXJyYXkKICAgICAgICAgKiBAcGFyYW0ge0FycmF5fSBhcnJheSBUaGUgYXJyYXkgb2YgZ3JvdXBlZCBlbGVtZW50cyB0byBwcm9jZXNzLgogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IFtpdGVyYXRlZT1fLmlkZW50aXR5XSBUaGUgZnVuY3Rpb24gdG8gY29tYmluZQogICAgICAgICAqICByZWdyb3VwZWQgdmFsdWVzLgogICAgICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyB0aGUgbmV3IGFycmF5IG9mIHJlZ3JvdXBlZCBlbGVtZW50cy4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogdmFyIHppcHBlZCA9IF8uemlwKFsxLCAyXSwgWzEwLCAyMF0sIFsxMDAsIDIwMF0pOwogICAgICAgICAqIC8vID0+IFtbMSwgMTAsIDEwMF0sIFsyLCAyMCwgMjAwXV0KICAgICAgICAgKgogICAgICAgICAqIF8udW56aXBXaXRoKHppcHBlZCwgXy5hZGQpOwogICAgICAgICAqIC8vID0+IFszLCAzMCwgMzAwXQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHVuemlwV2l0aChhcnJheSwgaXRlcmF0ZWUpIHsKICAgICAgICAgIGlmICghKGFycmF5ICYmIGFycmF5Lmxlbmd0aCkpIHsKICAgICAgICAgICAgcmV0dXJuIFtdOwogICAgICAgICAgfQogICAgICAgICAgdmFyIHJlc3VsdCA9IHVuemlwKGFycmF5KTsKICAgICAgICAgIGlmIChpdGVyYXRlZSA9PSBudWxsKSB7CiAgICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gYXJyYXlNYXAocmVzdWx0LCBmdW5jdGlvbihncm91cCkgewogICAgICAgICAgICByZXR1cm4gYXBwbHkoaXRlcmF0ZWUsIHVuZGVmaW5lZCQxLCBncm91cCk7CiAgICAgICAgICB9KTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYW4gYXJyYXkgZXhjbHVkaW5nIGFsbCBnaXZlbiB2YWx1ZXMgdXNpbmcKICAgICAgICAgKiBbYFNhbWVWYWx1ZVplcm9gXShodHRwOi8vZWNtYS1pbnRlcm5hdGlvbmFsLm9yZy9lY21hLTI2Mi83LjAvI3NlYy1zYW1ldmFsdWV6ZXJvKQogICAgICAgICAqIGZvciBlcXVhbGl0eSBjb21wYXJpc29ucy4KICAgICAgICAgKgogICAgICAgICAqICoqTm90ZToqKiBVbmxpa2UgYF8ucHVsbGAsIHRoaXMgbWV0aG9kIHJldHVybnMgYSBuZXcgYXJyYXkuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgMC4xLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgQXJyYXkKICAgICAgICAgKiBAcGFyYW0ge0FycmF5fSBhcnJheSBUaGUgYXJyYXkgdG8gaW5zcGVjdC4KICAgICAgICAgKiBAcGFyYW0gey4uLip9IFt2YWx1ZXNdIFRoZSB2YWx1ZXMgdG8gZXhjbHVkZS4KICAgICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIG5ldyBhcnJheSBvZiBmaWx0ZXJlZCB2YWx1ZXMuCiAgICAgICAgICogQHNlZSBfLmRpZmZlcmVuY2UsIF8ueG9yCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8ud2l0aG91dChbMiwgMSwgMiwgM10sIDEsIDIpOwogICAgICAgICAqIC8vID0+IFszXQogICAgICAgICAqLwogICAgICAgIHZhciB3aXRob3V0ID0gYmFzZVJlc3QoZnVuY3Rpb24oYXJyYXksIHZhbHVlcykgewogICAgICAgICAgcmV0dXJuIGlzQXJyYXlMaWtlT2JqZWN0KGFycmF5KQogICAgICAgICAgICA/IGJhc2VEaWZmZXJlbmNlKGFycmF5LCB2YWx1ZXMpCiAgICAgICAgICAgIDogW107CiAgICAgICAgfSk7CgogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYW4gYXJyYXkgb2YgdW5pcXVlIHZhbHVlcyB0aGF0IGlzIHRoZQogICAgICAgICAqIFtzeW1tZXRyaWMgZGlmZmVyZW5jZV0oaHR0cHM6Ly9lbi53aWtpcGVkaWEub3JnL3dpa2kvU3ltbWV0cmljX2RpZmZlcmVuY2UpCiAgICAgICAgICogb2YgdGhlIGdpdmVuIGFycmF5cy4gVGhlIG9yZGVyIG9mIHJlc3VsdCB2YWx1ZXMgaXMgZGV0ZXJtaW5lZCBieSB0aGUgb3JkZXIKICAgICAgICAgKiB0aGV5IG9jY3VyIGluIHRoZSBhcnJheXMuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgMi40LjAKICAgICAgICAgKiBAY2F0ZWdvcnkgQXJyYXkKICAgICAgICAgKiBAcGFyYW0gey4uLkFycmF5fSBbYXJyYXlzXSBUaGUgYXJyYXlzIHRvIGluc3BlY3QuCiAgICAgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBuZXcgYXJyYXkgb2YgZmlsdGVyZWQgdmFsdWVzLgogICAgICAgICAqIEBzZWUgXy5kaWZmZXJlbmNlLCBfLndpdGhvdXQKICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy54b3IoWzIsIDFdLCBbMiwgM10pOwogICAgICAgICAqIC8vID0+IFsxLCAzXQogICAgICAgICAqLwogICAgICAgIHZhciB4b3IgPSBiYXNlUmVzdChm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rZU9iamVjdCksIHVuZGVmaW5lZCQxLCBjb21wYXJhdG9yKTsKICAgICAgICB9KTsKCiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhbiBhcnJheSBvZiBncm91cGVkIGVsZW1lbnRzLCB0aGUgZmlyc3Qgb2Ygd2hpY2ggY29udGFpbnMgdGhlCiAgICAgICAgICogZmlyc3QgZWxlbWVudHMgb2YgdGhlIGdpdmVuIGFycmF5cywgdGhlIHNlY29uZCBvZiB3aGljaCBjb250YWlucyB0aGUKICAgICAgICAgKiBzZWNvbmQgZWxlbWVudHMgb2YgdGhlIGdpdmVuIGFycmF5cywgYW5kIHNvIG9uLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDAuMS4wCiAgICAgICAgICogQGNhdGVnb3J5IEFycmF5CiAgICAgICAgICogQHBhcmFtIHsuLi5BcnJheX0gW2FycmF5c10gVGhlIGFycmF5cyB0byBwcm9jZXNzLgogICAgICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyB0aGUgbmV3IGFycmF5IG9mIGdyb3VwZWQgZWxlbWVudHMuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8uemlwKFsnYScsICdiJ10sIFsxLCAyXSwgW3RydWUsIGZhbHNlXSk7CiAgICAgICAgICogLy8gPT4gW1snYScsIDEsIHRydWVdLCBbJ2InLCAyLCBmYWxzZV1dCiAgICAgICAgICovCiAgICAgICAgdmFyIHppcCA9IGJhc2VSZXN0KHVuemlwKTsKCiAgICAgICAgLyoqCiAgICAgICAgICogVGhpcyBtZXRob2QgaXMgbGlrZSBgXy5mcm9tUGFpcnNgIGV4Y2VwdCB0aGF0IGl0IGFjY2VwdHMgdHdvIGFycmF5cywKICAgICAgICAgKiBvbmUgb2YgcHJvcGVydHkgaWRlbnRpZmllcnMgYW5kIG9uZSBvZiBjb3JyZXNwb25kaW5nIHZhbHVlcy4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAwLjQuMAogICAgICAgICAqIEBjYXRlZ29yeSBBcnJheQogICAgICAgICAqIEBwYXJhbSB7QXJyYXl9IFtwcm9wcz1bXV0gVGhlIHByb3BlcnR5IGlkZW50aWZpZXJzLgogICAgICAgICAqIEBwYXJhbSB7QXJyYXl9IFt2YWx1ZXM9W11dIFRoZSBwcm9wZXJ0eSB2YWx1ZXMuCiAgICAgICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyB0aGUgbmV3IG9iamVjdC4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy56aXBPYmplY3QoWydhJywgJ2InXSwgWzEsIDJdKTsKICAgICAgICAgKiAvLyA9PiB7ICdhJzogMSwgJ2InOiAyIH0KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiB6aXBPYmplY3QocHJvcHMsIHZhbHVlcykgewogICAgICAgICAgcmV0dXJuIGJhc2VaaXBPYmplY3QocHJvcHMgfHwgW10sIHZhbHVlcyB8fCBbXSwgYXNzaWduVmFsdWUpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogVGhpcyBtZXRob2QgaXMgbGlrZSBgXy56aXBPYmplY3RgIGV4Y2VwdCB0aGF0IGl0IHN1cHBvcnRzIHByb3BlcnR5IHBhdGhzLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDQuMS4wCiAgICAgICAgICogQGNhdGVnb3J5IEFycmF5CiAgICAgICAgICogQHBhcmFtIHtBcnJheX0gW3Byb3BzPVtdXSBUaGUgcHJvcGVydHkgaWRlbnRpZmllcnMuCiAgICAgICAgICogQHBhcmFtIHtBcnJheX0gW3ZhbHVlcz1bXV0gVGhlIHByb3BlcnR5IHZhbH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JlIHVud3JhcHBlZAogICAgICAgICAqIHdpdGggYF8jdmFsdWVgLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDEuMy4wCiAgICAgICAgICogQGNhdGVnb3J5IFNlcQogICAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIHdyYXAuCiAgICAgICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyB0aGUgbmV3IGBsb2Rhc2hgIHdyYXBwZXIgaW5zdGFuY2UuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIHZhciB1c2VycyA9IFsKICAgICAgICAgKiAgIHsgJ3VzZXInOiAnYmFybmV5JywgICdhZ2UnOiAzNiB9LAogICAgICAgICAqICAgeyAndXNlcic6ICdmcmVkJywgICAgJ2FnZSc6IDQwIH0sCiAgICAgICAgICogICB7ICd1c2VyJzogJ3BlYmJsZXMnLCAnYWdlJzogMSB9CiAgICAgICAgICogXTsKICAgICAgICAgKgogICAgICAgICAqIHZhciB5b3VuZ2VzdCA9IF8KICAgICAgICAgKiAgIC5jaGFpbih1c2VycykKICAgICAgICAgKiAgIC5zb3J0QnkoJ2FnZScpCiAgICAgICAgICogICAubWFwKGZ1bmN0aW9uKG8pIHsKICAgICAgICAgKiAgICAgcmV0dXJuIG8udXNlciArICcgaXMgJyArIG8uYWdlOwogICAgICAgICAqICAgfSkKICAgICAgICAgKiAgIC5oZWFkKCkKICAgICAgICAgKiAgIC52YWx1ZSgpOwogICAgICAgICAqIC8vID0+ICdwZWJibGVzIGlzIDEnCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gY2hhaW4odmFsdWUpIHsKICAgICAgICAgIHZhciByZXN1bHQgPSBsb2Rhc2godmFsdWUpOwogICAgICAgICAgcmVzdWx0Ll9fY2hhaW5fXyA9IHRydWU7CiAgICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogVGhpcyBtZXRob2QgaW52b2tlcyBgaW50ZXJjZXB0b3JgIGFuZCByZXR1cm5zIGB2YWx1ZWAuIFRoZSBpbnRlcmNlcHRvcgogICAgICAgICAqIGlzIGludm9rZWQgd2l0aCBvbmUgYXJndW1lbnQ7ICh2YWx1ZSkuIFRoZSBwdXJwb3NlIG9mIHRoaXMgbWV0aG9kIGlzIHRvCiAgICAgICAgICogInRhcCBpbnRvIiBhIG1ldGhvZCBjaGFpbiBzZXF1ZW5jZSBpbiBvcmRlciB0byBtb2RpZnkgaW50ZXJtZWRpYXRlIHJlc3VsdHMuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgMC4xLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgU2VxCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gcHJvdmlkZSB0byBgaW50ZXJjZXB0b3JgLgogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IGludGVyY2VwdG9yIFRoZSBmdW5jdGlvbiB0byBpbnZva2UuCiAgICAgICAgICogQHJldHVybnMgeyp9IFJldHVybnMgYHZhbHVlYC4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXyhbMSwgMiwgM10pCiAgICAgICAgICogIC50YXAoZnVuY3Rpb24oYXJyYXkpIHsKICAgICAgICAgKiAgICAvLyBNdXRhdGUgaW5wdXQgYXJyYXkuCiAgICAgICAgICogICAgYXJyYXkucG9wKCk7CiAgICAgICAgICogIH0pCiAgICAgICAgICogIC5yZXZlcnNlKCkKICAgICAgICAgKiAgLnZhbHVlKCk7CiAgICAgICAgICogLy8gPT4gWzIsIDFdCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gdGFwKHZhbHVlLCBpbnRlcmNlcHRvcikgewogICAgICAgICAgaW50ZXJjZXB0b3IodmFsdWUpOwogICAgICAgICAgcmV0dXJuIHZhbHVlOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogVGhpcyBtZXRob2QgaXMgbGlrZSBgXy50YXBgIGV4Y2VwdCB0aGF0IGl0IHJldHVybnMgdGhlIHJlc3VsdCBvZiBgaW50ZXJjZXB0b3JgLgogICAgICAgICAqIFRoZSBwdXJwb3NlIG9mIHRoaXMgbWV0aG9kIGlzIHRvICJwYXNzIHRocnUiIHZhbHVlcyByZXBsYWNpbmcgaW50ZXJtZWRpYXRlCiAgICAgICAgICogcmVzdWx0cyBpbiBhIG1ldGhvZCBjaGFpbiBzZXF1ZW5jZS4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAzLjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBTZXEKICAgICAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBwcm92aWRlIHRvIGBpbnRlcmNlcHRvcmAuCiAgICAgICAgICogQHBhcmFtIHtGdW5jdGlvbn0gaW50ZXJjZXB0b3IgVGhlIGZ1bmN0aW9uIHRvIGludm9rZS4KICAgICAgICAgKiBAcmV0dXJucyB7Kn0gUmV0dXJucyB0aGUgcmVzdWx0IG9mIGBpbnRlcmNlcHRvcmAuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8oJyAgYWJjICAnKQogICAgICAgICAqICAuY2hhaW4oKQogICAgICAgICAqICAudHJpbSgpCiAgICAgICAgICogIC50aHJ1KGZ1bmN0aW9uKHZhbHVlKSB7CiAgICAgICAgICogICAgcmV0dXJuIFt2YWx1ZV07CiAgICAgICAgICogIH0pCiAgICAgICAgICogIC52YWx1ZSgpOwogICAgICAgICAqIC8vID0+IFsnYWJjJ10KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiB0aHJ1KHZhbHVlLCBpbnRlcmNlcHRvcikgewogICAgICAgICAgcmV0dXJuIGludGVyY2VwdG9yKHZhbHVlKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFRoaXMgbWV0aG9kIGlzIHRoZSB3cmFwcGVyIHZlcnNpb24gb2YgYF8uYXRgLgogICAgICAgICAqCiAgICAgICAgICogQG5hbWUgYXQKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAxLjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBTZXEKICAgICAgICAgKiBAcGFyYW0gey4uLihzdHJpbmd8c3RyaW5nW10pfSBbcGF0aHNdIFRoZSBwcm9wZXJ0eSBwYXRocyB0byBwaWNrLgogICAgICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgdGhlIG5ldyBgbG9kYXNoYCB3cmFwcGVyIGluc3RhbmNlLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiB2YXIgb2JqZWN0ID0geyAnYSc6IFt7ICdiJzogeyAnYyc6IDMgfSB9LCA0XSB9OwogICAgICAgICAqCiAgICAgICAgICogXyhvYmplY3QpLmF0KFsnYVswXS5iLmMnLCAnYVsxXSddKS52YWx1ZSgpOwogICAgICAgICAqIC8vID0+IFszLCA0XQogICAgICAgICAqLwogICAgICAgIHZhciB3cmFwcGVyQXQgPSBmbGF0UmVzdChmdW5jdGlvbihwYXRocykgewogICAgICAgICAgdmFyIGxlbmd0aCA9IHBhdGhzLmxlbmd0aCwKICAgICAgICAgICAgICBzdGFydCA9IGxlbmd0aCA/IHBhdGhzWzBdIDogMCwKICAgICAgICAgICAgICB2YWx1ZSA9IHRoaXMuX193cmFwcGVkX18sCiAgICAgICAgICAgICAgaW50ZXJjZXB0b3IgPSBmdW5jdGlvbihvYmplY3QpIHsgcmV0dXJuIGJhc2VBdChvYmplY3QsIHBhdGhzKTsgfTsKCiAgICAgICAgICBpZiAobGVuZ3RoID4gMSB8fCB0aGlzLl9fYWN0aW9uc19fLmxlbmd0aCB8fAogICAgICAgICAgICAgICEodmFsdWUgaW5zdGFuY2VvZiBMYXp5V3JhcHBlcikgfHwgIWlzSW5kZXgoc3RhcnQpKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLnRocnUoaW50ZXJjZXB0b3IpOwogICAgICAgICAgfQogICAgICAgICAgdmFsdWUgPSB2YWx1ZS5zbGljZShzdGFydCwgK3N0YXJ0ICsgKGxlbmd0aCA/IDEgOiAwKSk7CiAgICAgICAgICB2YWx1ZS5fX2FjdGlvbnNfXy5wdXNoKHsKICAgICAgICAgICAgJ2Z1bmMnOiB0aHJ1LAogICAgICAgICAgICAnYXJncyc6IFtpbnRlcmNlcHRvcl0sCiAgICAgICAgICAgICd0aGlzQXJnJzogdW5kZWZpbmVkJDEKICAgICAgICAgIH0pOwogICAgICAgICAgcmV0dXJuIG5ldyBMb2Rhc2hXcmFwcGVyKHZhbHVlLCB0aGlzLl9fY2hhaW5fXykudGhydShmdW5jdGlvbihhcnJheSkgewogICAgICAgICAgICBpZiAobGVuZ3RoICYmICFhcnJheS5sZW5ndGgpIHsKICAgICAgICAgICAgICBhcnJheS5wdXNoKHVuZGVmaW5lZCQxKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gYXJyYXk7CiAgICAgICAgICB9KTsKICAgICAgICB9KTsKCiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhIGBsb2Rhc2hgIHdyYXBwZXIgaW5zdGFuY2Ugd2l0aCBleHBsaWNpdCBtZXRob2QgY2hhaW4gc2VxdWVuY2VzIGVuYWJsZWQuCiAgICAgICAgICoKICAgICAgICAgKiBAbmFtZSBjaGFpbgogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDAuMS4wCiAgICAgICAgICogQGNhdGVnb3J5IFNlcQogICAgICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgdGhlIG5ldyBgbG9kYXNoYCB3cmFwcGVyIGluc3RhbmNlLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiB2YXIgdXNlcnMgPSBbCiAgICAgICAgICogICB7ICd1c2VyJzogJ2Jhcm5leScsICdhZ2UnOiAzNiB9LAogICAgICAgICAqICAgeyAndXNlcic6ICdmcmVkJywgICAnYWdlJzogNDAgfQogICAgICAgICAqIF07CiAgICAgICAgICoKICAgICAgICAgKiAvLyBBIHNlcXVlbmNlIHdpdGhvdXQgZXhwbGljaXQgY2hhaW5pbmcuCiAgICAgICAgICogXyh1c2VycykuaGVhZCgpOwogICAgICAgICAqIC8vID0+IHsgJ3VzZXInOiAnYmFybmV5JywgJ2FnZSc6IDM2IH0KICAgICAgICAgKgogICAgICAgICAqIC8vIEEgc2VxdWVuY2Ugd2l0aCBleHBsaWNpdCBjaGFpbmluZy4KICAgICAgICAgKiBfKHVzZXJzKQogICAgICAgICAqICAgLmNoYWluKCkKICAgICAgICAgKiAgIC5oZWFkKCkKICAgICAgICAgKiAgIC5waWNrKCd1c2VyJykKICAgICAgICAgKiAgIC52YWx1ZSgpOwogICAgICAgICAqIC8vID0+IHsgJ3VzZXInOiAnYmFybmV5JyB9CiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gd3JhcHBlckNoYWluKCkgewogICAgICAgICAgcmV0dXJuIGNoYWluKHRoaXMpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogRXhlY3V0ZXMgdGhlIGNoYWluIHNlcXVlbmNlIGFuZCByZXR1cm5zIHRoZSB3cmFwcGVkIHJlc3VsdC4KICAgICAgICAgKgogICAgICAgICAqIEBuYW1lIGNvbW1pdAogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDMuMi4wCiAgICAgICAgICogQGNhdGVnb3J5IFNlcQogICAgICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgdGhlIG5ldyBgbG9kYXNoYCB3cmFwcGVyIGluc3RhbmNlLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiB2YXIgYXJyYXkgPSBbMSwgMl07CiAgICAgICAgICogdmFyIHdyYXBwZWQgPSBfKGFycmF5KS5wdXNoKDMpOwogICAgICAgICAqCiAgICAgICAgICogY29uc29sZS5sb2coYXJyYXkpOwogICAgICAgICAqIC8vID0+IFsxLCAyXQogICAgICAgICAqCiAgICAgICAgICogd3JhcHBlZCA9IHdyYXBwZWQuY29tbWl0KCk7CiAgICAgICAgICogY29uc29sZS5sb2coYXJyYXkpOwogICAgICAgICAqIC8vID0+IFsxLCAyLCAzXQogICAgICAgICAqCiAgICAgICAgICogd3JhcHBlZC5sYXN0KCk7CiAgICAgICAgICogLy8gPT4gMwogICAgICAgICAqCiAgICAgICAgICogY29uc29sZS5sb2coYXJyYXkpOwogICAgICAgICAqIC8vID0+IFsxLCAyLCAzXQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHdyYXBwZXJDb21taXQoKSB7CiAgICAgICAgICByZXR1cm4gbmV3IExvZGFzaFdyYXBwZXIodGhpcy52YWx1ZSgpLCB0aGlzLl9fY2hhaW5fXyk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIHRoZSBuZXh0IHZhbHVlIG9uIGEgd3JhcHBlZCBvYmplY3QgZm9sbG93aW5nIHRoZQogICAgICAgICAqIFtpdGVyYXRvciBwcm90b2NvbF0oaHR0cHM6Ly9tZG4uaW8vaXRlcmF0aW9uX3Byb3RvY29scyNpdGVyYXRvcikuCiAgICAgICAgICoKICAgICAgICAgKiBAbmFtZSBuZXh0CiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgU2VxCiAgICAgICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyB0aGUgbmV4dCBpdGVyYXRvciB2YWx1ZS4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogdmFyIHdyYXBwZWQgPSBfKFsxLCAyXSk7CiAgICAgICAgICoKICAgICAgICAgKiB3cmFwcGVkLm5leHQoKTsKICAgICAgICAgKiAvLyA9PiB7ICdkb25lJzogZmFsc2UsICd2YWx1ZSc6IDEgfQogICAgICAgICAqCiAgICAgICAgICogd3JhcHBlZC5uZXh0KCk7CiAgICAgICAgICogLy8gPT4geyAnZG9uZSc6IGZhbHNlLCAndmFsdWUnOiAyIH0KICAgICAgICAgKgogICAgICAgICAqIHdyYXBwZWQubmV4dCgpOwogICAgICAgICAqIC8vID0+IHsgJ2RvbmUnOiB0cnVlLCAndmFsdWUnOiB1bmRlZmluZWQgfQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHdyYXBwZXJOZXh0KCkgewogICAgICAgICAgaWYgKHRoaXMuX192YWx1ZXNfXyA9PT0gdW5kZWZpbmVkJDEpIHsKICAgICAgICAgICAgdGhpcy5fX3ZhbHVlc19fID0gdG9BcnJheSh0aGlzLnZhbHVlKCkpOwogICAgICAgICAgfQogICAgICAgICAgdmFyIGRvbmUgPSB0aGlzLl9faW5kZXhfXyA+PSB0aGlzLl9fdmFsdWVzX18ubGVuZ3RoLAogICAgICAgICAgICAgIHZhbHVlID0gZG9uZSA/IHVuZGVmaW5lZCQxIDogdGhpcy5fX3ZhbHVlc19fW3RoaXMuX19pbmRleF9fKytdOwoKICAgICAgICAgIHJldHVybiB7ICdkb25lJzogZG9uZSwgJ3ZhbHVlJzogdmFsdWUgfTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIEVuYWJsZXMgdGhlIHdyYXBwZXIgdG8gYmUgaXRlcmFibGUuCiAgICAgICAgICoKICAgICAgICAgKiBAbmFtZSBTeW1ib2wuaXRlcmF0b3IKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSA0LjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBTZXEKICAgICAgICAgKiBAcmV0dXJucyB7T2JqZWN0fSBSZXR1cm5zIHRoZSB3cmFwcGVyIG9iamVjdC4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogdmFyIHdyYXBwZWQgPSBfKFsxLCAyXSk7CiAgICAgICAgICoKICAgICAgICAgKiB3cmFwcGVkW1N5bWJvbC5pdGVyYXRvcl0oKSA9PT0gd3JhcHBlZDsKICAgICAgICAgKiAvLyA9PiB0cnVlCiAgICAgICAgICoKICAgICAgICAgKiBBcnJheS5mcm9tKHdyYXBwZWQpOwogICAgICAgICAqIC8vID0+IFsxLCAyXQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHdyYXBwZXJUb0l0ZXJhdG9yKCkgewogICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDcmVhdGVzIGEgY2xvbmUgb2YgdGhlIGNoYWluIHNlcXVlbmNlIHBsYW50aW5nIGB2YWx1ZWAgYXMgdGhlIHdyYXBwZWQgdmFsdWUuCiAgICAgICAgICoKICAgICAgICAgKiBAbmFtZSBwbGFudAogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDMuMi4wCiAgICAgICAgICogQGNhdGVnb3J5IFNlcQogICAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIHBsYW50LgogICAgICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgdGhlIG5ldyBgbG9kYXNoYCB3cmFwcGVyIGluc3RhbmNlLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBmdW5jdGlvbiBzcXVhcmUobikgewogICAgICAgICAqICAgcmV0dXJuIG4gKiBuOwogICAgICAgICAqIH0KICAgICAgICAgKgogICAgICAgICAqIHZhciB3cmFwcGVkID0gXyhbMSwgMl0pLm1hcChzcXVhcmUpOwogICAgICAgICAqIHZhciBvdGhlciA9IHdyYXBwZWQucGxhbnQoWzMsIDRdKTsKICAgICAgICAgKgogICAgICAgICAqIG90aGVyLnZhbHVlKCk7CiAgICAgICAgICogLy8gPT4gWzksIDE2XQogICAgICAgICAqCiAgICAgICAgICogd3JhcHBlZC52YWx1ZSgpOwogICAgICAgICAqIC8vID0+IFsxLCA0XQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHdyYXBwZXJQbGFudCh2YWx1ZSkgewogICAgICAgICAgdmFyIHJlc3VsdCwKICAgICAgICAgICAgICBwYXJlbnQgPSB0aGlzOwoKICAgICAgICAgIHdoaWxlIChwYXJlbnQgaW5zdGFuY2VvZiBiYXNlTG9kYXNoKSB7CiAgICAgICAgICAgIHZhciBjbG9uZSA9IHdyYXBwZXJDbG9uZShwYXJlbnQpOwogICAgICAgICAgICBjbG9uZS5fX2luZGV4X18gPSAwOwogICAgICAgICAgICBjbG9uZS5fX3ZhbHVlc19fID0gdW5kZWZpbmVkJDE7CiAgICAgICAgICAgIGlmIChyZXN1bHQpIHsKICAgICAgICAgICAgICBwcmV2aW91cy5fX3dyYXBwZWRfXyA9IGNsb25lOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgIHJlc3VsdCA9IGNsb25lOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciBwcmV2aW91cyA9IGNsb25lOwogICAgICAgICAgICBwYXJlbnQgPSBwYXJlbnQuX193cmFwcGVkX187CiAgICAgICAgICB9CiAgICAgICAgICBwcmV2aW91cy5fX3dyYXBwZWRfXyA9IHZhbHVlOwogICAgICAgICAgcmV0dXJuIHJlc3VsdDsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFRoaXMgbWV0aG9kIGlzIHRoZSB3cmFwcGVyIHZlcnNpb24gb2YgYF8ucmV2ZXJzZWAuCiAgICAgICAgICoKICAgICAgICAgKiAqKk5vdGU6KiogVGhpcyBtZXRob2QgbXV0YXRlcyB0aGUgd3JhcHBlZCBhcnJheS4KICAgICAgICAgKgogICAgICAgICAqIEBuYW1lIHJldmVyc2UKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAwLjEuMAogICAgICAgICAqIEBjYXRlZ29yeSBTZXEKICAgICAgICAgKiBAcmV0dXJucyB7T2JqZWN0fSBSZXR1cm5zIHRoZSBuZXcgYGxvZGFzaGAgd3JhcHBlciBpbnN0YW5jZS4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogdmFyIGFycmF5ID0gWzEsIDIsIDNdOwogICAgICAgICAqCiAgICAgICAgICogXyhhcnJheSkucmV2ZXJzZSgpLnZhbHVlKCkKICAgICAgICAgKiAvLyA9PiBbMywgMiwgMV0KICAgICAgICAgKgogICAgICAgICAqIGNvbnNvbGUubG9nKGFycmF5KTsKICAgICAgICAgKiAvLyA9PiBbMywgMiwgMV0KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiB3cmFwcGVyUmV2ZXJzZSgpIHsKICAgICAgICAgIHZhciB2YWx1ZSA9IHRoaXMuX193cmFwcGVkX187CiAgICAgICAgICBpZiAodmFsdWUgaW5zdGFuY2VvZiBMYXp5V3JhcHBlcikgewogICAgICAgICAgICB2YXIgd3JhcHBlZCA9IHZhbHVlOwogICAgICAgICAgICBpZiAodGhpcy5fX2FjdGlvbnNfXy5sZW5ndGgpIHsKICAgICAgICAgICAgICB3cmFwcGVkID0gbmV3IExhenlXcmFwcGVyKHRoaXMpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHdyYXBwZWQgPSB3cmFwcGVkLnJldmVyc2UoKTsKICAgICAgICAgICAgd3JhcHBlZC5fX2FjdGlvbnNfXy5wdXNoKHsKICAgICAgICAgICAgICAnZnVuYyc6IHRocnUsCiAgICAgICAgICAgICAgJ2FyZ3MnOiBbcmV2ZXJzZV0sCiAgICAgICAgICAgICAgJ3RoaXNBcmcnOiB1bmRlZmluZWQkMQogICAgICAgICAgICB9KTsKICAgICAgICAgICAgcmV0dXJuIG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zdWx0LCB2YWx1ZSwga2V5KSB7CiAgICAgICAgICBpZiAoaGFzT3duUHJvcGVydHkuY2FsbChyZXN1bHQsIGtleSkpIHsKICAgICAgICAgICAgKytyZXN1bHRba2V5XTsKICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIGJhc2VBc3NpZ25WYWx1ZShyZXN1bHQsIGtleSwgMSk7CiAgICAgICAgICB9CiAgICAgICAgfSk7CgogICAgICAgIC8qKgogICAgICAgICAqIENoZWNrcyBpZiBgcHJlZGljYXRlYCByZXR1cm5zIHRydXRoeSBmb3IgKiphbGwqKiBlbGVtZW50cyBvZiBgY29sbGVjdGlvbmAuCiAgICAgICAgICogSXRlcmF0aW9uIGlzIHN0b3BwZWQgb25jZSBgcHJlZGljYXRlYCByZXR1cm5zIGZhbHNleS4gVGhlIHByZWRpY2F0ZSBpcwogICAgICAgICAqIGludm9rZWQgd2l0aCB0aHJlZSBhcmd1bWVudHM6ICh2YWx1ZSwgaW5kZXh8a2V5LCBjb2xsZWN0aW9uKS4KICAgICAgICAgKgogICAgICAgICAqICoqTm90ZToqKiBUaGlzIG1ldGhvZCByZXR1cm5zIGB0cnVlYCBmb3IKICAgICAgICAgKiBbZW1wdHkgY29sbGVjdGlvbnNdKGh0dHBzOi8vZW4ud2lraXBlZGlhLm9yZy93aWtpL0VtcHR5X3NldCkgYmVjYXVzZQogICAgICAgICAqIFtldmVyeXRoaW5nIGlzIHRydWVdKGh0dHBzOi8vZW4ud2lraXBlZGlhLm9yZy93aWtpL1ZhY3VvdXNfdHJ1dGgpIG9mCiAgICAgICAgICogZWxlbWVudHMgb2YgZW1wdHkgY29sbGVjdGlvbnMuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgMC4xLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgQ29sbGVjdGlvbgogICAgICAgICAqIEBwYXJhbSB7QXJyYXl8T2JqZWN0fSB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V0aHkgZm9yLiBUaGUgcHJlZGljYXRlIGlzIGludm9rZWQgd2l0aCB0aHJlZQogICAgICAgICAqIGFyZ3VtZW50czogKHZhbHVlLCBpbmRleHxrZXksIGNvbGxlY3Rpb24pLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDAuMS4wCiAgICAgICAgICogQGNhdGVnb3J5IENvbGxlY3Rpb24KICAgICAgICAgKiBAcGFyYW0ge0FycmF5fE9iamVjdH0gY29sbGVjdGlvbiBUaGUgY29sbGVjdGlvbiB0byBpbnNwZWN0LgogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IFtwcmVkaWNhdGU9Xy5pZGVudGl0eV0gVGhlIGZ1bmN0aW9uIGludm9rZWQgcGVyIGl0ZXJhdGlvbi4KICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gW2Zyb21JbmRleD0wXSBUaGUgaW5kZXggdG8gc2VhcmNoIGZyb20uCiAgICAgICAgICogQHJldHVybnMgeyp9IFJldHVybnMgdGhlIG1hdGNoZWQgZWxlbWVudCwgZWxzZSBgdW5kZWZpbmVkYC4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogdmFyIHVzZXJzID0gWwogICAgICAgICAqICAgeyAndXNlcic6ICdiYXJuZXknLCAgJ2FnZSc6IDM2LCAnYWN0aXZlJzogdHJ1ZSB9LAogICAgICAgICAqICAgeyAndXNlcic6ICdmcmVkJywgICAgJ2FnZSc6IDQwLCAnYWN0aXZlJzogZmFsc2UgfSwKICAgICAgICAgKiAgIHsgJ3VzZXInOiAncGViYmxlcycsICdhZ2UnOiAxLCAgJ2FjdGl2ZSc6IHRydWUgfQogICAgICAgICAqIF07CiAgICAgICAgICoKICAgICAgICAgKiBfLmZpbmQodXNlcnMsIGZ1bmN0aW9uKG8pIHsgcmV0dXJuIG8uYWdlIDwgNDA7IH0pOwogICAgICAgICAqIC8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SBleHBsaWNpdGx5IHJldHVybmluZyBgZmFsc2VgLgogICAgICAgICAqCiAgICAgICAgICogKipOb3RlOioqIEFzIHdpdGggb3RoZXIgIkNvbGxlY3Rpb25zIiBtZXRob2RzLCBvYmplY3RzIHdpdGggYSAibGVuZ3RoIgogICAgICAgICAqIHByb3BlcnR5IGFyZSBpdGVyYXRlZCBsaWtlIGFycmF5cy4gVG8gYXZvaWQgdGhpcyBiZWhhdmlvciB1c2UgYF8uZm9ySW5gCiAgICAgICAgICogb3IgYF8uZm9yT3duYCBmb3Igb2JqZWN0IGl0ZXJhdGlvbi4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAwLjEuMAogICAgICAgICAqIEBhbGlhcyBlYWNoCiAgICAgICAgICogQGNhdGVnb3J5IENvbGxlY3Rpb24KICAgICAgICAgKiBAcGFyYW0ge0FycmF5fE9iamVjdH0gY29sbGVjdGlvbiBUaGUgY29sbGVjdGlvbiB0byBpdGVyYXRlIG92ZXIuCiAgICAgICAgICogQHBhcmFtIHtGdW5jdGlvbn0gW2l0ZXJhdGVlPV8uaWRlbnRpdHldIFRoZSBmdW5jdGlvbiBpbnZva2VkIHBlciBpdGVyYXRpb24uCiAgICAgICAgICogQHJldHVybnMge0FycmF5fE9iamVjdH0gUmV0dXJucyBgY29sbGVjdGlvbmAuCiAgICAgICAgICogQHNlZSBfLmZvckVhY2hSaWdodAogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLmZvckVhY2goWzEsIDJdLCBmdW5jdGlvbih2YWx1ZSkgewogICAgICAgICAqICAgY29uc29sZS5sb2codmFsdWUpOwogICAgICAgICAqIH0pOwogICAgICAgICAqIC8vID0+IExvZ3MgYDFgIHRoZW4gYDJgLgogICAgICAgICAqCiAgICAgICAgICogXy5mb3JFYWNoKHsgJ2EnOiAxLCAnYic6IDIgfSwgZnVuY3Rpb24odm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BzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAwLjEuMAogICAgICAgICAqIEBjYXRlZ29yeSBDb2xsZWN0aW9uCiAgICAgICAgICogQHBhcmFtIHtBcnJheXxPYmplY3R9IGNvbGxlY3Rpb24gVGhlIGNvbGxlY3Rpb24gdG8gaXRlcmF0ZSBvdmVyLgogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IFtpdGVyYXRlZT1fLmlkZW50aXR5XSBUaGUgaXRlcmF0ZWUgdG8gdHJhbnNmb3JtIGtleXMuCiAgICAgICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyB0aGUgY29tcG9zZWQgYWdncmVnYXRlIG9iamVjdC4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy5ncm91cEJ5KFs2LjEsIDQuMiwgNi4zXSwgTWF0aC5mbG9vcik7CiAgICAgICAgICogLy8gPT4geyAnNCc6IFs0LjJdLCAnNic6IFs2LjEsIDYuM10gfQogICAgICAgICAqCiAgICAgICAgICogLy8gVGhlIGBfLnByb3BlcnR5YCBpdGVyYXRlZSBzaG9ydGhhbmQuCiAgICAgICAgICogXy5ncm91cEJ5KFsnb25lJywgJ3R3bycsICd0aHJlZSddLCAnbGVuZ3RoJyk7CiAgICAgICAgICogLy8gPT4geyAnMyc6IFsnb25lJywgJ3R3byddLCAnNSc6IFsndGhyZWUnXSB9CiAgICAgICAgICovCiAgICAgICAgdmFyIGdyb3VwQnkgPSBjcmVhdGVBZ2dyZWdhdG9yKGZ1bmN0aW9uKHJlc3VsdCwgdmFsdWUsIGtleSkgewogICAgICAgICAgaWYgKGhhc093blByb3BlcnR5LmNhbGwocmVzdWx0LCBrZXkpKSB7CiAgICAgICAgICAgIHJlc3VsdFtrZXldLnB1c2godmFsdWUpOwogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgYmFzZUFzc2lnblZhbHVlKHJlc3VsdCwga2V5LCBb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ByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiBgdmFsdWVgIGlzIGZvdW5kLCBlbHNlIGBmYWxzZWAuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8uaW5jbHVkZXMoWzEsIDIsIDNdLCAxKTsKICAgICAgICAgKiAvLyA9PiB0cnVlCiAgICAgICAgICoKICAgICAgICAgKiBfLmluY2x1ZGVzKFsxLCAyLCAzXSwgMSwgMik7CiAgICAgICAgICogLy8gPT4gZmFsc2UKICAgICAgICAgKgogICAgICAgICAqIF8uaW5jbHVkZXMoeyAnYSc6IDEsICdiJzogMiB9LCAxKTsKICAgICAgICAgKiAvLyA9PiB0cnVlCiAgICAgICAgICoKICAgICAgICAgKiBfLmluY2x1ZGVzKCdhYmNkJywgJ2JjJyk7CiAgICAgICAgICogLy8gPT4gdHJ1ZQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGluY2x1ZGVzKGNvbGxlY3Rpb24sIHZhbHVlLCBmcm9tSW5kZXgsIGd1YXJkKSB7CiAgICAgICAgICBjb2xsZWN0aW9uID0gaXNBcnJheUxpa2UoY29sbGVjdGlvbikgPyBjb2xsZWN0aW9uIDogdmFsdWVzKGNvbGxlY3Rpb24pOwogICAgICAgICAgZnJvbUluZGV4ID0gKGZyb21JbmRleCAmJiAhZ3VhcmQpID8gdG9JbnRlZ2VyKGZyb21JbmRleCkgOiAwOwoKICAgICAgICAgIHZhciBsZW5ndGggPSBjb2xsZWN0aW9uLmxlbmd0aDsKICAgICAgICAgIGlmIChmcm9tSW5kZXggPCAwKSB7CiAgICAgICAgICAgIGZyb21JbmRleCA9IG5hdGl2ZU1heChsZW5ndGggKyBmcm9tSW5kZXgsIDApOwogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIGlzU3RyaW5nKGNvbGxlY3Rpb24pCiAgICAgICAgICAgID8gKGZyb21JbmRleCA8PSBsZW5ndGggJiYgY29sbGVjdGlvbi5pbmR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d2l0aC4KICAgICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIGFycmF5IG9mIHJlc3VsdHMuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8uaW52b2tlTWFwKFtbNSwgMSwgN10sIFszLCAyLCAxXV0sICdzb3J0Jyk7CiAgICAgICAgICogLy8gPT4gW1sxLCA1LCA3XSwgWzEsIDIsIDNdXQogICAgICAgICAqCiAgICAgICAgICogXy5pbnZva2VNYXAoWzEyMywgNDU2XSwgU3RyaW5nLnByb3RvdHlwZS5zcGxpdCwgJycpOwogICAgICAgICAqIC8vID0+IFtbJzEnLCAnMicsICczJ10sIFsnNCcsICc1JywgJzYnXV0KICAgICAgICAgKi8KICAgICAgICB2YXIgaW52b2tlTWFwID0gYmFzZVJlc3QoZnVuY3Rpb24oY29sbGVjdGlvbiwgcGF0aCwgYXJncykgewogICAgICAgICAgdmFyIGluZGV4ID0gLTEsCiAgICAgICAgICAgICAgaXNGdW5jID0gdHlwZW9mIHBhdGggPT0gJ2Z1bmN0aW9uJywKICAgICAgICAgICAgICByZXN1bHQgPSBpc0FycmF5TGlrZShjb2xsZWN0aW9uKSA/IEFycmF5KGNvbGxlY3Rpb24ubGVuZ3RoKSA6IFtdOwoKICAgICAgICAgIGJhc2VFYWNoKGNvbGxlY3Rpb24sIGZ1bmN0aW9uKHZhbHVlKSB7CiAgICAgICAgICAgIHJlc3VsdFsrK2luZGV4XSA9IGlzRnVuYyA/IGFwcGx5KHBhdGgsIHZhbHVlLCBhcmdzKSA6IGJhc2VJbnZva2UodmFsdWUsIHBhdGgsIGFyZ3MpOwogICAgICAgICAgfSk7CiAgICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICAgIH0pOwoKICAgICAgICAvKioKICAgICAgICAgKiBDcmVhdGVzIGFuIG9iamVjdCBjb21wb3NlZCBvZiBrZXlzIGdlbmVyYXRlZCBmcm9tIHRoZSByZXN1bHRzIG9mIHJ1bm5p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IFRoZSBmdW5jdGlvbiBpbnZva2VkIHBlciBpdGVyYXRpb24uCiAgICAgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBuZXcgZmlsdGVyZWQgYXJyYXkuCiAgICAgICAgICogQHNlZSBfLmZpbHRlcgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiB2YXIgdXNlcnMgPSBbCiAgICAgICAgICogICB7ICd1c2VyJzogJ2Jhcm5leScsICdhZ2UnOiAzNiwgJ2FjdGl2ZSc6IGZhbHNlIH0sCiAgICAgICAgICogICB7ICd1c2VyJzogJ2ZyZWQnLCAgICdhZ2UnOiA0MCwgJ2FjdGl2ZSc6IHRydWUgfQogICAgICAgICAqIF07CiAgICAgICAgICoKICAgICAgICAgKiBfLnJlamVjdCh1c2VycywgZnVuY3Rpb24obykgeyByZXR1cm4gIW8uYWN0aXZlOyB9KTsKICAgICAgICAgKiAvLyA9PiBvYmplY3RzIGZvciBbJ2ZyZWQnXQogICAgICAgICAqCiAgICAgICAgICogLy8gVGhlIGBfLm1hdGNoZXNgIGl0ZXJhdGVlIHNob3J0aGFuZC4KICAgICAgICAgKiBfLnJlamVjdCh1c2VycywgeyAnYWdlJzogNDAsICdhY3RpdmUnOiB0cnVlIH0pOwogICAgICAgICAqIC8vID0+IG9iamVjdHMgZm9yIFsnYmFybmV5J10KICAgICAgICAgKgogICAgICAgICAqIC8vIFRoZSBgXy5tYXRjaGVzUHJvcGVydHlgIGl0ZXJhdGVlIHNob3J0aGFuZC4KICAgICAgICAgKiBfLnJlamVjdCh1c2VycywgWydhY3RpdmUnLCBmYWxzZV0pOwogICAgICAgICAqIC8vID0+IG9iamVjdHMgZm9yIFsnZnJlZCddCiAgICAgICAgICoKICAgICAgICAgKiAvLyBUaGUgYF8ucHJvcGVydHlgIGl0ZXJhdGVlIHNob3J0aGFuZC4KICAgICAgICAgKiBfLnJlamVjdCh1c2VycywgJ2FjdGl2ZScpOwogICAgICAgICAqIC8vID0+IG9iamVjdHMgZm9yIFsnYmFybmV5J10KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiByZWplY3QoY29sbGVjdGlvbiwgcHJlZGljYXRlKSB7CiAgICAgICAgICB2YXIgZnVuYyA9IGlzQXJyYXkoY29sbGVjdGlvbikgPyBhcnJheUZpbHRlciA6IGJhc2VGaWx0ZXI7CiAgICAgICAgICByZXR1cm4gZnVuYyhjb2xsZWN0aW9uLCBuZWdhdGUoZ2V0SXRlcmF0ZWUocHJlZGljYXRlLCAzKSkpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogR2V0cyBhIHJhbmRvbSBlbGVtZW50IGZyb20gYGNvbGxlY3Rpb25gLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDIuMC4wCiAgICAgICAgICogQGNhdGVnb3J5IENvbGxlY3Rpb24KICAgICAgICAgKiBAcGFyYW0ge0FycmF5fE9iamVjdH0gY29sbGVjdGlvbiBUaGUgY29sbGVjdGlvbiB0byBzYW1wbGUuCiAgICAgICAgICogQHJldHVybnMgeyp9IFJldHVybnMgdGhlIHJhbmRvbSBlbGVtZW50LgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLnNhbXBsZShbMSwgMiwgMywgNF0pOwogICAgICAgICAqIC8vID0+IDIKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBzYW1wbGUoY29sbGVjdGlvbikgewogICAgICAgICAgdmFyIGZ1bmMgPSBpc0FycmF5KGNvbGxlY3Rpb24pID8gYXJyYXlTYW1wbGUgOiBiYXNlU2FtcGxlOwogICAgICAgICAgcmV0dXJuIGZ1bmMoY29sbGVjdGlvbik7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIGBuYCByYW5kb20gZWxlbWVudHMgYXQgdW5pcXVlIGtleXMgZnJvbSBgY29sbGVjdGlvbmAgdXAgdG8gdGhlCiAgICAgICAgICogc2l6ZSBvZiBgY29sbGVjdGlvbmAuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgQ29sbGVjdGlvbgogICAgICAgICAqIEBwYXJhbSB7QXJyYXl8T2JqZWN0fSBjb2xsZWN0aW9uIFRoZSBjb2xsZWN0aW9uIHRvIHNhbXBsZS4KICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gW249MV0gVGhlIG51bWJlciBvZiBlbGVtZW50cyB0byBzYW1wbGUuCiAgICAgICAgICogQHBhcmFtLSB7T2JqZWN0fSBbZ3VhcmRdIEVuYWJsZXMgdXNlIGFzIGFuIGl0ZXJhdGVlIGZvciBtZXRob2RzIGxpa2UgYF8ubWFwYC4KICAgICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIHJhbmRvbSBlbGVtZW50cy4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy5zYW1wbGVTaXplKFsxLCAyLCAzXSwgMik7CiAgICAgICAgICogLy8gPT4gWzMsIDFdCiAgICAgICAgICoKICAgICAgICAgKiBfLnNhbXBsZVNpemUoWzEsIDIsIDNdLCA0KTsKICAgICAgICAgKiAvLyA9PiBbMiwgMywgMV0KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBzYW1wbGVTaXplKGNvbGxlY3Rpb24sIG4sIGd1YXJkKSB7CiAgICAgICAgICBpZiAoKGd1YXJkID8gaXNJdGVyYXRlZUNhbGwoY29sbGVjdGlvbiwgbiwgZ3VhcmQpIDogbiA9PT0gdW5kZWZpbmVkJDEpKSB7CiAgICAgICAgICAgIG4gPSAxOwogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgbiA9IHRvSW50ZWdlcihuKTsKICAgICAgICAgIH0KICAgICAgICAgIHZhciBmdW5jID0gaXNBcnJheShjb2xsZWN0aW9uKSA/IGFycmF5U2FtcGxlU2l6ZSA6IGJhc2VTYW1wbGVTaXplOwogICAgICAgICAgcmV0dXJuIGZ1bmMoY29sbGVjdGlvbiwgbik7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDcmVhdGVzIGFuIGFycmF5IG9mIHNodWZmbGVkIHZhbHVlcywgdXNpbmcgYSB2ZXJzaW9uIG9mIHRoZQogICAgICAgICAqIFtGaXNoZXItWWF0ZXMgc2h1ZmZsZV0oaHR0cHM6Ly9lbi53aWtpcGVkaWEub3JnL3dpa2kvRmlzaGVyLVlhdGVzX3NodWZmbGUpLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDAuMS4wCiAgICAgICAgICogQGNhdGVnb3J5IENvbGxlY3Rpb24KICAgICAgICAgKiBAcGFyYW0ge0FycmF5fE9iamVjdH0gY29sbGVjdGlvbiBUaGUgY29sbGVjdGlvbiB0byBzaHVmZmxlLgogICAgICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyB0aGUgbmV3IHNodWZmbGVkIGFycmF5LgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLnNodWZmbGUoWzEsIDIsIDMsIDRdKTsKICAgICAgICAgKiAvLyA9PiBbNCwgMSwgMywgMl0KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBzaHVmZmxlKGNvbGxlY3Rpb24pIHsKICAgICAgICAgIHZhciBmdW5jID0gaXNBcnJheShjb2xsZWN0aW9uKSA/IGFycmF5U2h1ZmZsZSA6IGJhc2VTaHVmZmxlOwogICAgICAgICAgcmV0dXJuIGZ1bmMoY29sbGVjdGlvbik7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIHRoZSBzaXplIG9mIGBjb2xsZWN0aW9uYCBieSByZXR1cm5pbmcgaXRzIGxlbmd0aCBmb3IgYXJyYXktbGlrZQogICAgICAgICAqIHZhbHVlcyBvciB0aGUgbnVtYmVyIG9mIG93biBlbnVtZXJhYmxlIHN0cmluZyBrZXllZCBwcm9wZXJ0aWVzIGZvciBvYmplY3RzLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDAuMS4wCiAgICAgICAgICogQGNhdGVnb3J5IENvbGxlY3Rpb24KICAgICAgICAgKiBAcGFyYW0ge0FycmF5fE9iamVjdHxzdHJpbmd9IGNvbGxlY3Rpb24gVGhlIGNvbGxlY3Rpb24gdG8gaW5zcGVjdC4KICAgICAgICAgKiBAcmV0dXJucyB7bnVtYmVyfSBSZXR1cm5zIHRoZSBjb2xsZWN0aW9uIHNpemUuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8uc2l6ZShbMSwgMiwgM10pOwogICAgICAgICAqIC8vID0+IDMKICAgICAgICAgKgogICAgICAgICAqIF8uc2l6ZSh7ICdhJzogMSwgJ2InOiAyIH0pOwogICAgICAgICAqIC8vID0+IDIKICAgICAgICAgKgogICAgICAgICAqIF8uc2l6ZSgncGViYmxlcycpOwogICAgICAgICAqIC8vID0+IDcKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBzaXplKGNvbGxlY3Rpb24pIHsKICAgICAgICAgIGlmIChjb2xsZWN0aW9uID09IG51bGwpIHsKICAgICAgICAgICAgcmV0dXJuIDA7CiAgICAgICAgICB9CiAgICAgICAgICBpZiAoaXNBcnJheUxpa2UoY29sbGVjdGlvbikpIHsKICAgICAgICAgICAgcmV0dXJuIGlzU3RyaW5nKGNvbGxlY3Rpb24pID8gc3RyaW5nU2l6ZShjb2xsZWN0aW9uKSA6IGNvbGxlY3Rpb24ubGVuZ3RoOwogICAgICAgICAgfQogICAgICAgICAgdmFyIHRhZyA9IGdldFRhZyhjb2xs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WVudCBwYXNzZXMgdGhlIHByZWRpY2F0ZSBjaGVjaywKICAgICAgICAgKiAgZWxzZSBgZmFsc2VgLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLnNvbWUoW251bGwsIDAsICd5ZXMnLCBmYWxzZV0sIEJvb2xlYW4pOwogICAgICAgICAqIC8vID0+IHRydWUKICAgICAgICAgKgogICAgICAgICAqIHZhciB1c2VycyA9IFsKICAgICAgICAgKiAgIHsgJ3VzZXInOiAnYmFybmV5JywgJ2FjdGl2ZSc6IHRydWUgfSwKICAgICAgICAgKiAgIHsgJ3VzZXInOiAnZnJlZCcsICAgJ2FjdGl2ZSc6IGZhbHNlIH0KICAgICAgICAgKiBdOwogICAgICAgICAqCiAgICAgICAgICogLy8gVGhlIGBfLm1hdGNoZXNgIGl0ZXJhdGVlIHNob3J0aGFuZC4KICAgICAgICAgKiBfLnNvbWUodXNlcnMsIHsgJ3VzZXInOiAnYmFybmV5JywgJ2FjdGl2ZSc6IGZhbHNlIH0pOwogICAgICAgICAqIC8vID0+IGZhbHNlCiAgICAgICAgICoKICAgICAgICAgKiAvLyBUaGUgYF8ubWF0Y2hlc1Byb3BlcnR5YCBpdGVyYXRlZSBzaG9ydGhhbmQuCiAgICAgICAgICogXy5zb21lKHVzZXJzLCBbJ2FjdGl2ZScsIGZhbHNlXSk7CiAgICAgICAgICogLy8gPT4gdHJ1ZQogICAgICAgICAqCiAgICAgICAgICogLy8gVGhlIGBfLnByb3BlcnR5YCBpdGVyYXRlZSBzaG9ydGhhbmQuCiAgICAgICAgICogXy5zb21lKHVzZXJzLCAnYWN0aXZlJyk7CiAgICAgICAgICogLy8gPT4gdHJ1ZQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHNvbWUoY29sbGVjdGlvbiwgcHJlZGljYXRlLCBndWFyZCkgewogICAgICAgICAgdmFyIGZ1bmMgPSBpc0FycmF5KGNvbGxlY3Rpb24pID8gYXJyYXlTb21lIDogYmFz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iAgICAgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBuZXcgc29ydGVkIGFycmF5LgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiB2YXIgdXNlcnMgPSBbCiAgICAgICAgICogICB7ICd1c2VyJzogJ2ZyZWQnLCAgICdhZ2UnOiA0OCB9LAogICAgICAgICAqICAgeyAndXNlcic6ICdiYXJuZXknLCAnYWdlJzogMzYgfSwKICAgICAgICAgKiAgIHsgJ3VzZXInOiAnZnJlZCcsICAgJ2FnZSc6IDMwIH0sCiAgICAgICAgICogICB7ICd1c2VyJzogJ2Jhcm5leScsICdhZ2UnOiAzNCB9CiAgICAgICAgICogXTsKICAgICAgICAgKgogICAgICAgICAqIF8uc29ydEJ5KHVzZXJzLCBbZnVuY3Rpb24obykgeyByZXR1cm4gby51c2VyOyB9XSk7CiAgICAgICAgICogLy8gPT4gb2JqZWN0cyBmb3IgW1snYmFybmV5JywgMzZdLCBbJ2Jhcm5leScsIDM0XSwgWydmcmVkJywgNDhdLCBbJ2ZyZWQnLCAzMF1dCiAgICAgICAgICoKICAgICAgICAgKiBfLnNvcnRCeSh1c2VycywgWyd1c2VyJywgJ2FnZSddKTsKICAgICAgICAgKiAvLyA9PiBvYmplY3RzIGZvciBbWydiYXJuZXknLCAzNF0sIFsnYmFybmV5JywgMzZdLCBbJ2ZyZWQnLCAzMF0sIFsnZnJlZCcsIDQ4XV0KICAgICAgICAgKi8KICAgICAgICB2YXIgc29ydEJ5ID0gYmFzZVJlc3QoZnVuY3Rpb24oY29sbGVjdGlvbiwgaXRlcmF0ZWVzKSB7CiAgICAgICAgICBpZiAoY29sbGVjdGlvbiA9PSBudWxsKSB7CiAgICAgICAgICAgIHJldHVybiBbXTsKICAgICAgICAgIH0KICAgICAgICAgIHZhciBsZW5ndGggPSBpdGVyYXRlZXMubGVuZ3RoOwogICAgICAgICAgaWYgKGxlbmd0aCA+IDEgJiYgaXNJdGVyYXRlZUNhbG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XIoc2F2ZXMubGVuZ3RoLCBmdW5jdGlvbigpIHsKICAgICAgICAgKiAgIGNvbnNvbGUubG9nKCdkb25lIHNhdmluZyEnKTsKICAgICAgICAgKiB9KTsKICAgICAgICAgKgogICAgICAgICAqIF8uZm9yRWFjaChzYXZlcywgZnVuY3Rpb24odHlwZSkgewogICAgICAgICAqICAgYXN5bmNTYXZlKHsgJ3R5cGUnOiB0eXBlLCAnY29tcGxldGUnOiBkb25lIH0pOwogICAgICAgICAqIH0pOwogICAgICAgICAqIC8vID0+IExvZ3MgJ2RvbmUgc2F2aW5nIScgYWZ0ZXIgdGhlIHR3byBhc3luYyBzYXZlcyBoYXZlIGNvbXBsZXRlZC4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBhZnRlcihuLCBmdW5jKSB7CiAgICAgICAgICBpZiAodHlwZW9mIGZ1bmMgIT0gJ2Z1bmN0aW9uJykgewogICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKEZVTkNfRVJST1JfVEVYVCk7CiAgICAgICAgICB9CiAgICAgICAgICBuID0gdG9JbnRlZ2VyKG4pOwogICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uKCkgewogICAgICAgICAgICBpZiAoLS1uIDwgMSkgewogICAgICAgICAgICAgIHJldHVybiBmdW5jLmFwcGx5KHRoaXMsIGFyZ3VtZW50cyk7CiAgICAgICAgICAgIH0KICAgICAgICAgIH07CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDcmVhdGVzIGEgZnVuY3Rpb24gdGhhdCBpbnZva2VzIGBmdW5jYCwgd2l0aCB1cCB0byBgbmAgYXJndW1lbnRzLAogICAgICAgICAqIGlnbm9yaW5nIGFueSBhZGRpdGlvbmFsIGFyZ3VtZW50cy4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAzLjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBGdW5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gdGhhbiBgbmAgdGltZXMuIFN1YnNlcXVlbnQKICAgICAgICAgKiBjYWxscyB0byB0aGUgY3JlYXRlZCBmdW5jdGlvbiByZXR1cm4gdGhlIHJlc3VsdCBvZiB0aGUgbGFzdCBgZnVuY2AgaW52b2NhdGlvbi4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAzLjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBGdW5jdGlvbgogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBuIFRoZSBudW1iZXIgb2YgY2FsbHMgYXQgd2hpY2ggYGZ1bmNgIGlzIG5vIGxvbmdlciBpbnZva2VkLgogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IGZ1bmMgVGhlIGZ1bmN0aW9uIHRvIHJlc3RyaWN0LgogICAgICAgICAqIEByZXR1cm5zIHtGdW5jdGlvbn0gUmV0dXJucyB0aGUgbmV3IHJlc3RyaWN0ZWQgZnVuY3Rpb24uCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIGpRdWVyeShlbGVtZW50KS5vbignY2xpY2snLCBfLmJlZm9yZSg1LCBhZGRDb250YWN0VG9MaXN0KSk7CiAgICAgICAgICogLy8gPT4gQWxsb3dzIGFkZGluZyB1cCB0byA0IGNvbnRhY3RzIHRvIHRoZSBsaXN0LgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGJlZm9yZShuLCBmdW5jKSB7CiAgICAgICAgICB2YXIgcmVzdWx0OwogICAgICAgICAgaWYgKHR5cGVvZiBmdW5jICE9ICdmdW5jdGlvbicpIHsKICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihGVU5DX0VSUk9SX1RFWFQpOwogICAgICAgICAgfQogICAgICAgICAgbiA9IHRvSW50ZWdlcihuKTsKICAgICAgICAgIHJldHVybiBmdW5jdGlvbigpIHsKICAgICAgICAgICAgaWYgKC0tbiA+IDApIHsKICAgICAgICAgICAgICByZXN1bHQgPSBmdW5jLmFwcGx5KHRoaXMsIGFyZ3VtZW50cyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKG4gPD0gMSkgewogICAgICAgICAgICAgIGZ1bmMgPSB1bmRlZmluZWQkMTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICAgICAgfTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYSBmdW5jdGlvbiB0aGF0IGludm9rZXMgYGZ1bmNgIHdpdGggdGhlIGB0aGlzYCBiaW5kaW5nIG9mIGB0aGlzQXJnYAogICAgICAgICAqIGFuZCBgcGFydGlhbHNgIHByZXBlbmRlZCB0byB0aGUgYXJndW1lbnRzIGl0IHJlY2VpdmVzLgogICAgICAgICAqCiAgICAgICAgICogVGhlIGBfLmJpbmQucGxhY2Vob2xkZXJgIHZhbHVlLCB3aGljaCBkZWZhdWx0cyB0byBgX2AgaW4gbW9ub2xpdGhpYyBidWlsZHMsCiAgICAgICAgICogbWF5IGJlIHVzZWQgYXMgYSBwbGFjZWhvbGRlciBmb3IgcGFydGlhbGx5IGFwcGxpZWQgYXJndW1lbnRzLgogICAgICAgICAqCiAgICAgICAgICogKipOb3RlOioqIFVubGlrZSBuYXRpdmUgYEZ1bmN0aW9uI2JpbmRgLCB0aGlzIG1ldGhvZCBkb2Vzbid0IHNldCB0aGUgImxlbmd0aCIKICAgICAgICAgKiBwcm9wZXJ0eSBvZiBib3VuZCBmdW5jdGlvbnMuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgMC4xLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgRnVuY3Rpb24KICAgICAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufSBmdW5jIFRoZSBmdW5jdGlvbiB0byBiaW5kLgogICAgICAgICAqIEBwYXJhbSB7Kn0gdGhpc0FyZyBUaGUgYHRoaXNgIGJpbmRpbmcgb2YgYGZ1bmNgLgogICAgICAgICAqIEBwYXJhbSB7Li4uKn0gW3BhcnRpYWxzXSBUaGUgYXJndW1lbnRzIHRvIGJlIHBhcnRpYWxseSBhcHBsaWVkLgogICAgICAgICAqIEByZXR1cm5zIHtGdW5jdGlvbn0gUmV0dXJucyB0aGUgbmV3IGJvdW5kIGZ1bmN0aW9uLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBmdW5jdGlvbiBncmVldChncmVldGluZywgcHVuY3R1YXRpb24pIHsKICAgICAgICAgKiAgIHJldHVybiBncmVldGluZyArICcgJyArIHRoaXMudXNlciArIHB1bmN0dWF0aW9uOwogICAgICAgICAqIH0KICAgICAgICAgKgogICAgICAgICAqIHZhciBvYmplY3QgPSB7ICd1c2VyJzogJ2ZyZWQnIH07CiAgICAgICAgICoKICAgICAgICAgKiB2YXIgYm91bmQgPSBfLmJpbmQoZ3JlZXQsIG9iamVjdCwgJ2hpJyk7CiAgICAgICAgICogYm91bmQoJyEnKTsKICAgICAgICAgKiAvLyA9PiAnaGkgZnJlZCEnCiAgICAgICAgICoKICAgICAgICAgKiAvLyBCb3VuZCB3aXRoIHBsYWNlaG9sZGVycy4KICAgICAgICAgKiB2YXIgYm91bmQgPSBfLmJpbmQoZ3JlZXQsIG9iamVjdCwgXywgJyEnKTsKICAgICAgICAgKiBib3VuZCgnaGknKTsKICAgICAgICAgKiAvLyA9PiAnaGkgZnJlZCEnCiAgICAgICAgICovCiAgICAgICAgdmFyIGJpbmQgPSBiYXNlUmVzdChmdW5jdGlvbihmdW5jLCB0aGlzQXJnLCBwYXJ0aWFscykgewogICAgICAgICAgdmFyIGJpdG1hc2sgPSBXUkFQX0JJTkRfRkxBRzsKICAgICAgICAgIGlmIChwYXJ0aWFscy5sZW5ndGgpIHsKICAgICAgICAgICAgdmFyIGhvbGRlcnMgPSByZXBs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AqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDAuMTAuMAogICAgICAgICAqIEBjYXRlZ29yeSBGdW5jdGlvbgogICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvYmplY3QgVGhlIG9iamVjdCB0byBpbnZva2UgdGhlIG1ldGhvZCBvbi4KICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30ga2V5IFRoZSBrZXkgb2YgdGhlIG1ldGhvZC4KICAgICAgICAgKiBAcGFyYW0gey4uLip9IFtwYXJ0aWFsc10gVGhlIGFyZ3VtZW50cyB0byBiZSBwYXJ0aWFsbHkgYXBwbGllZC4KICAgICAgICAgKiBAcmV0dXJucyB7RnVuY3Rpb259IFJldHVybnMgdGhlIG5ldyBib3VuZCBmdW5jdGlvbi4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogdmFyIG9iamVjdCA9IHsKICAgICAgICAgKiAgICd1c2VyJzogJ2ZyZWQnLAogICAgICAgICAqICAgJ2dyZWV0JzogZnVuY3Rpb24oZ3JlZXRpbmcsIHB1bmN0dWF0aW9uKSB7CiAgICAgICAgICogICAgIHJldHVybiBncmVldGluZyArICcgJyArIHRoaXMudXNlciArIHB1bmN0dWF0aW9uOwogICAgICAgICAqICAgfQogICAgICAgICAqIH07CiAgICAgICAgICoKICAgICAgICAgKiB2YXIgYm91bmQgPSBfLmJpbmRLZXkob2JqZWN0LCAnZ3JlZXQnLCAnaGknKTsKICAgICAgICAgKiBib3VuZCgnIScpOwogICAgICAgICAqIC8vID0+ICdoaSBmcmVkIScKICAgICAgICAgKgogICAgICAgICAqIG9iamVjdC5ncmVldCA9IGZ1bmN0aW9uKGdyZWV0aW5nLCBwdW5jdHVhdGlvbikgewogICAgICAgICAqICAgcmV0dXJuIGdyZWV0aW5nICsgJ3lhICcgKyB0aGlzLnVzZXIgKyBwdW5jdHVhdGlvbjsKICAgICAgICAgKiB9OwogICAgICAgICAqCiAgICAgICAgICogYm91bmQoJyEnKTsKICAgICAgICAgKiAvLyA9PiAnaGl5YSBmcmVkIScKICAgICAgICAgKgogICAgICAgICAqIC8vIEJvdW5kIHdpdGggcGxhY2Vob2xkZXJzLgogICAgICAgICAqIHZhciBib3VuZCA9IF8uYmluZEtleShvYmplY3QsICdncmVldCcsIF8sICchJyk7CiAgICAgICAgICogYm91bmQoJ2hpJyk7CiAgICAgICAgICogLy8gPT4gJ2hpeWEgZnJlZCEnCiAgICAgICAgICovCiAgICAgICAgdmFyIGJpbmRLZXkgPSBiYXNlUmVzdChmdW5jdGlvbihvYmplY3QsIGtleSwgcGFydGlhbHMpIHsKICAgICAgICAgIHZhciBiaXRtYXNrID0gV1JBUF9CSU5EX0ZMQUcgfCBXUkFQX0JJTkRfS0VZX0ZMQUc7CiAgICAgICAgICBpZiAocGFydGlhbHMubGVuZ3RoKSB7CiAgICAgICAgICAgIHZhciBob2xkZXJzID0gcmVwbGFjZUhvbGRlcnMocGFydGlhbHMsIGdldEhvbGRlcihiaW5kS2V5KSk7CiAgICAgICAgICAgIGJpdG1hc2sgfD0gV1JBUF9QQVJUSUFMX0ZMQUc7CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gY3JlYXRlV3JhcChrZXksIGJpdG1hc2ssIG9iamVjdCwgcGFydGlhbHMsIGhvbGRlcnMpOwogICAgICAgIH0pOwoKICAgICAgICAvKioKICAgICAgICAgKiBDcmVhdGVzIGEgZnVuY3Rpb24gdGhhdCBhY2NlcHRzIGFyZ3VtZW50cyBvZiBgZnVuY2AgYW5kIGVpdGhlciBpbnZva2VzCiAgICAgICAgICogYGZ1bmNgIHJldHVybmluZyBpdHMgcmVzdWx0LCBpZiBhdCBsZWFzdCBgYXJpdHlgIG51bWJlciBvZiBhcmd1bWVudHMgaGF2ZQogICAgICAgICAqIGJlZW4gcHJvdmlkZWQsIG9yIHJldHVybnMgYSBmdW5jdGlvbiB0aGF0IGFjY2VwdHMgdGhlIHJlbWFpbmluZyBgZnVuY2AKICAgICAgIC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gICAgICAgICogICByZXR1cm4gW2EsIGIsIGNdOwogICAgICAgICAqIH07CiAgICAgICAgICoKICAgICAgICAgKiB2YXIgY3VycmllZCA9IF8uY3VycnkoYWJjKTsKICAgICAgICAgKgogICAgICAgICAqIGN1cnJpZWQoMSkoMikoMyk7CiAgICAgICAgICogLy8gPT4gWzEsIDIsIDNdCiAgICAgICAgICoKICAgICAgICAgKiBjdXJyaWVkKDEsIDIpKDMpOwogICAgICAgICAqIC8vID0+IFsxLCAyLCAzXQogICAgICAgICAqCiAgICAgICAgICogY3VycmllZCgxLCAyLCAzKTsKICAgICAgICAgKiAvLyA9PiBbMSwgMiwgM10KICAgICAgICAgKgogICAgICAgICAqIC8vIEN1cnJpZWQgd2l0aCBwbGFjZWhvbGRlcnMuCiAgICAgICAgICogY3VycmllZCgxKShfLCAzKSgyKTsKICAgICAgICAgKiAvLyA9PiBbMSwgMiwgM10KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBjdXJyeShmdW5jLCBhcml0eSwgZ3VhcmQpIHsKICAgICAgICAgIGFyaXR5ID0gZ3VhcmQgPyB1bmRlZmluZWQkMSA6IGFyaXR5OwogICAgICAgICAgdmFyIHJlc3VsdCA9IGNyZWF0ZVdyYXAoZnVuYywgV1JBUF9DVVJSWV9GTEFHLCB1bmRlZmluZWQkMSwgdW5kZWZpbmVkJDEsIHVuZGVmaW5lZCQxLCB1bmRlZmluZWQkMSwgdW5kZWZpbmVkJDEsIGFyaXR5KTsKICAgICAgICAgIHJlc3VsdC5wbGFjZWhvbGRlciA9IGN1cnJ5LnBsYWNlaG9sZGVyOwogICAgICAgICAgcmV0dXJuIHJlc3VsdDsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFRoaXMgbWV0aG9kIGlzIGxpa2UgYF8uY3VycnlgIGV4Y2VwdCB0aGF0IGFyZ3VtZW50cyBhcmUgYXBwbGllZCB0byBgZnVuY2AKICAgICAgICAgKiBpbiB0aGUgbWFubmVyIG9mIGBfL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zdHJlYW0nKTsKICAgICAgICAgKiBqUXVlcnkoc291cmNlKS5vbignbWVzc2FnZScsIGRlYm91bmNlZCk7CiAgICAgICAgICoKICAgICAgICAgKiAvLyBDYW5jZWwgdGhlIHRyYWlsaW5nIGRlYm91bmNlZCBpbnZvY2F0aW9uLgogICAgICAgICAqIGpRdWVyeSh3aW5kb3cpLm9uKCdwb3BzdGF0ZScsIGRlYm91bmNlZC5jYW5jZWwpOwogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGRlYm91bmNlKGZ1bmMsIHdhaXQsIG9wdGlvbnMpIHsKICAgICAgICAgIHZhciBsYXN0QXJncywKICAgICAgICAgICAgICBsYXN0VGhpcywKICAgICAgICAgICAgICBtYXhXYWl0LAogICAgICAgICAgICAgIHJlc3VsdCwKICAgICAgICAgICAgICB0aW1lcklkLAogICAgICAgICAgICAgIGxhc3RDYWxsVGltZSwKICAgICAgICAgICAgICBsYXN0SW52b2tlVGltZSA9IDAsCiAgICAgICAgICAgICAgbGVhZGluZyA9IGZhbHNlLAogICAgICAgICAgICAgIG1heGluZyA9IGZhbHNlLAogICAgICAgICAgICAgIHRyYWlsaW5nID0gdHJ1ZTsKCiAgICAgICAgICBpZiAodHlwZW9mIGZ1bmMgIT0gJ2Z1bmN0aW9uJykgewogICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKEZVTkNfRVJST1JfVEVYVCk7CiAgICAgICAgICB9CiAgICAgICAgICB3YWl0ID0gdG9OdW1iZXIod2FpdCkgfHwgMDsKICAgICAgICAgIGlmIChpc09iamVjdChvcHRpb25zKSkgewogICAgICAgICAgICBsZWFkaW5nID0gISFvcHRpb25zLmxlYWRpbmc7CiAgICAgICAgICAgIG1heGluZyA9ICdtYXhXYWl0JyBpbiBvcHRpb25zOwogICAgICAgICAgICBtYXhXYWl0ID0gbWF4aW5nID8gbmF0aXZlTWF4KHRvTnVtYmVyKG9wdGlvbnMubWF4V2FpdCkgfHwgMCwgd2FpdCkgOiBtYXhXYWl0OwogICAgICAgICAgICB0cmFpbGluZyA9ICd0cmFpbGluZycgaW4gb3B0aW9ucyA/ICEhb3B0aW9ucy50cmFpbGluZyA6IHRyYWlsaW5nOwogICAgICAgICAgfQoKICAgICAgICAgIGZ1bmN0aW9uIGludm9rZUZ1bmModGltZSkgewogICAgICAgICAgICB2YXIgYXJncyA9IGxhc3RBcmdzLAogICAgICAgICAgICAgICAgdGhpc0FyZyA9IGxhc3RUaGlzOwoKICAgICAgICAgICAgbGFzdEFyZ3MgPSBsYXN0VGhpcyA9IHVuZGVmaW5lZCQxOwogICAgICAgICAgICBsYXN0SW52b2tlVGltZSA9IHRpbWU7CiAgICAgICAgICAgIHJlc3VsdCA9IGZ1bmMuYXBwbHkodGhpc0FyZywgYXJncyk7CiAgICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgICB9CgogICAgICAgICAgZnVuY3Rpb24gbGVhZGluZ0VkZ2UodGltZSkgewogICAgICAgICAgICAvLyBSZXNldCBhbnkgYG1heFdhaXRgIHRpbWVyLgogICAgICAgICAgICBsYXN0SW52b2tlVGltZSA9IHRpbWU7CiAgICAgICAgICAgIC8vIFN0YXJ0IHRoZSB0aW1lciBmb3IgdGhlIHRyYWlsaW5nIGVkZ2UuCiAgICAgICAgICAgIHRpbWVySWQgPSBzZXRUaW1lb3V0KHRpbWVyRXhwaXJlZCwgd2FpdCk7CiAgICAgICAgICAgIC8vIEludm9rZSB0aGUgbGVhZGluZyBlZGdlLgogICAgICAgICAgICByZXR1cm4gbGVhZGluZyA/IGludm9rZUZ1bmModGltZSkgOiByZXN1bHQ7CiAgICAgICAgICB9CgogICAgICAgICAgZnVuY3Rpb24gcmVtYWluaW5nV2FpdCh0aW1lKSB7CiAgICAgICAgICAgIHZhciB0aW1lU2luY2VMYXN0Q2FsbCA9IHRpbWUgLSBsYXN0Q2FsbFRpbWUsCiAgICAgICAgICAgICAgICB0aW1lU2luY2VMYXN0SW52b2tlID0gdGltZSAtIGxhc3RJbnZva2VUaW1lLAogICAgICAgICAgICAgICAgdGltZVdhaXRpbmcgPSB3YWl0IC0gdGltZVNpbmNlTGFzdENhbGw7CgogICAgICAgICAgICByZXR1cm4gbWF4aW5nCiAgICAgICAgICAgICAgPyBuYXRpdmVNaW4odGltZVdhaXRpbmcsIG1heFdhaXQgLSB0aW1lU2luY2VMYXN0SW52b2tlKQogICAgICAgICAgICAgIDogdGltZVdhaXRpbmc7CiAgICAgICAgICB9CgogICAgICAgICAgZnVuY3Rpb24gc2hvdWxkSW52b2tlKHRpbWUpIHsKICAgICAgICAgICAgdmFyIHRpbWVTaW5jZUxhc3RDYWxsID0gdGltZSAtIGxhc3RDYWxsVGltZSwKICAgICAgICAgICAgICAgIHRpbWVTaW5jZUxhc3RJbnZva2UgPSB0aW1lIC0gbGFzdEludm9rZVRpbWU7CgogICAgICAgICAgICAvLyBFaXRoZXIgdGhpcyBpcyB0aGUgZmlyc3QgY2FsbCwgYWN0aXZpdHkgaGFzIHN0b3BwZWQgYW5kIHdlJ3JlIGF0IHRoZQogICAgICAgICAgICAvLyB0cmFpbGluZyBlZGdlLCB0aGUgc3lzdGVtIHRpbWUgaGFzIGdvbmUgYmFja3dhcmRzIGFuZCB3ZSdyZSB0cmVhdGluZwogICAgICAgICAgICAvLyBpdCBhcyB0aGUgdHJhaWxpbmcgZWRnZSwgb3Igd2UndmUgaGl0IHRoZSBgbWF4V2FpdGAgbGltaXQuCiAgICAgICAgICAgIHJldHVybiAobGFzdENhbGxUaW1lID09PSB1bmRlZmluZWQkMSB8fCAodGltZVNpbmNlTGFzdENhbGwgPj0gd2FpdCkgfHwKICAgICAgICAgICAgICAodGltZVNpbmNlTGFzdENhbGwgPCAwKSB8fCAobWF4aW5nICYmIHRpbWVTaW5jZUxhc3RJbnZva2UgPj0gbWF4V2FpdCkpOwogICAgICAgICAgfQoKICAgICAgICAgIGZ1bmN0aW9uIHRpbWVyRXhwaXJlZCgpIHsKICAgICAgICAgICAgdmFyIHRpbWUgPSBub3coKTsKICAgICAgICAgICAgaWYgKHNob3VsZEludm9rZSh0aW1lKSkgewogICAgICAgICAgICAgIHJldHVybiB0cmFpbGluZ0VkZ2UodGltZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gUmVzdGFydCB0aGUgdGltZXIuCiAgICAgICAgICAgIHRpbWVySWQgPSBzZXRUaW1lb3V0KHRpbWVyRXhwaXJlZCwgcmVtYWluaW5nV2FpdCh0aW1lKSk7CiAgICAgICAgICB9CgogICAgICAgICAgZnVuY3Rpb24gdHJhaWxpbmdFZGdlKHRpbWUpIHsKICAgICAgICAgICAgdGltZXJJZCA9IHVuZGVmaW5lZCQxOwoKICAgICAgICAgICAgLy8gT25seSBpbnZva2UgaWYgd2UgaGF2ZSBgbGFzdEFyZ3NgIHdoaWNoIG1lYW5zIGBmdW5jYCBoYXMgYmVlbgogICAgICAgICAgICAvLyBkZWJvdW5jZWQgYXQgbGVhc3Qgb25jZS4KICAgICAgICAgICAgaWYgKHRyYWlsaW5nICYmIGxhc3RBcmdzKSB7CiAgICAgICAgICAgICAgcmV0dXJuIGludm9rZUZ1bmModGltZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgbGFzdEFyZ3MgPSBsYXN0VGhpcyA9IHVuZGVmaW5lZCQxOwogICAgICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICAgICAgfQoKICAgICAgICAgIGZ1bmN0aW9uIGNhbmNlbCgpIHsKICAgICAgICAgICAgaWYgKHRpbWVySWQgIT09IHVuZGVmaW5lZCQxKSB7CiAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHRpbWVySWQpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGxhc3RJbnZva2VUaW1lID0gMDsKICAgICAgICAgICAgbGFzdEFyZ3MgPSBsYXN0Q2FsbFRpbWUgPSBsYXN0VGhpcyA9IHRpbWVySWQgPSB1bmRlZmluZWQkMTsKICAgICAgICAgIH0KCiAgICAgICAgICBmdW5jdGlvbiBmbHVzaCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRpbWVySWQgPT09IHVuZGVmaW5lZCQxID8gcmVzdWx0IDogdHJhaWxpbmdFZGdlKG5vdygpKTsKICAgICAgICAgIH0KCiAgICAgICAgICBmdW5jdGlvbiBkZWJvdW5jZWQoKSB7CiAgICAgICAgICAgIHZhciB0aW1lID0gbm93KCksCiAgICAgICAgICAgICAgICBpc0ludm9raW5nID0gc2hvdWxkSW52b2tlKHRpbWUpOwoKICAgICAgICAgICAgbGFzdEFyZ3MgPSBhcmd1bWVudHM7CiAgICAgICAgICAgIGxhc3RUaGlzID0gdGhpczsKICAgICAgICAgICAgbGFzdENhbGxUaW1lID0gdGltZTsKCiAgICAgICAgICAgIGlmIChpc0ludm9raW5nKSB7CiAgICAgICAgICAgICAgaWYgKHRpbWVySWQgPT09IHVuZGVmaW5lZCQxKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gbGVhZGluZ0VkZ2UobGFzdENhbGxUaW1lKTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgaWYgKG1heGluZykgewogICAgICAgICAgICAgICAgLy8gSGFuZGxlIGludm9jYXRpb25zIGluIGEgdGlnaHQgbG9vcC4KICAgICAgICAgICAgICAgIGNsZWFyVGltZW91dCh0aW1lcklkKTsKICAgICAgICAgICAgICAgIHRpbWVySWQgPSBzZXRUaW1lb3V0KHRpbWVyRXhwaXJlZCwgd2FpdCk7CiAgICAgICAgICAgICAgICByZXR1cm4gaW52b2tlRnVuYyhsYXN0Q2FsbFRpbWUpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGltZXJJZCA9PT0gdW5kZWZpbmVkJDEpIHsKICAgICAgICAgICAgICB0aW1lcklkID0gc2V0VGltZW91dCh0aW1lckV4cGlyZWQsIHdhaXQpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgICB9CiAgICAgICAgICBkZWJvdW5jZWQuY2FuY2VsID0gY2FuY2VsOwogICAgICAgICAgZGVib3VuY2VkLmZsdXNoID0gZmx1c2g7CiAgICAgICAgICByZXR1cm4gZGVib3VuY2VkOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogRGVmZXJzIGludm9raW5nIHRoZSBgZnVuY2AgdW50aWwgdGhlIGN1cnJlbnQgY2FsbCBzdGFjayBoYXMgY2xlYXJlZC4gQW55CiAgICAgICAgICogYWRkaXRpb25hbCBhcmd1bWVudHMgYXJlIHByb3ZpZGVkIHRvIGBmdW5jYCB3aGVuIGl0J3MgaW52b2tlZC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAwLjEuMAogICAgICAgICAqIEBjYXRlZ29yeSBGdW5jdGlvbgogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IGZ1bmMgVGhlIGZ1bmN0aW9uIHRvIGRlZmVyLgogICAgICAgICAqIEBwYXJhbSB7Li4uKn0gW2FyZ3NdIFRoZSBhcmd1bWVudHMgdG8gaW52b2tlIGBmdW5jYCB3aXRoLgogICAgICAgICAqIEByZXR1cm5zIHtudW1iZXJ9IFJldHVybnMgdGhlIHRpbWVyIGlkLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLmRlZmVyKGZ1bmN0aW9uKHRleHQpIHsKICAgICAgICAgKiAgIGNvbnNvbGUubG9nKHRleHQpOwogICAgICAgICAqIH0sICdkZWZlcnJlZCcpOwogICAgICAgICAqIC8vID0+IExvZ3MgJ2RlZmVycmVkJyBhZnRlciBvbmUgbWlsbGlzZWNvbmQuCiAgICAgICAgICovCiAgICAgICAgdmFyIGRlZmVyID0gYmFzZVJlc3QoZnVuY3Rpb24oZnVuYywgYXJncykgewogICAgICAgICAgcmV0dXJuIGJhc2VEZWxheShmdW5jLCAxLCBhcmdzKTsKICAgICAgICB9KTsKCiAgICAgICAgLyoqCiAgICAgICAgICogSW52b2tlcyBgZnVuY2AgYWZ0ZXIgYHdhaXRgIG1pbGxpc2Vjb25kcy4gQW55IGFkZGl0aW9uYWwgYXJndW1lbnRzIGFyZQogICAgICAgICAqIHByb3ZpZGVkIHRvIGBmdW5jYCB3aGVuIGl0J3MgaW52b2tlZC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAwLjEuMAogICAgICAgICAqIEBjYXRlZ29yeSBGdW5jdGlvbgogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IGZ1bmMgVGhlIGZ1bmN0aW9uIHRvIGRlbGF5LgogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSB3YWl0IFRoZSBudW1iZXIgb2YgbWlsbGlzZWNvbmRzIHRvIGRlbGF5IGludm9jYXRpb24uCiAgICAgICAgICogQHBhcmFtIHsuLi4qfSBbYXJnc10gVGhlIGFyZ3VtZW50cyB0byBpbnZva2UgYGZ1bmNgIHdpdGguCiAgICAgICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgdGltZXIgaWQuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8uZGVsYXkoZnVuY3Rpb24odGV4dCkgewogICAgICAgICAqICAgY29uc29sZS5sb2codGV4dCk7CiAgICAgICAgICogfSwgMTAwMCwgJ2xhdGVyJyk7CiAgICAgICAgICogLy8gPT4gTG9ncyAnbGF0ZXInIGFmdGVyIG9uZSBzZWNvbmQuCiAgICAgICAgICovCiAgICAgICAgdmFyIGRlbGF5ID0gYmFzZVJlc3QoZnVuY3Rpb24oZnVuYywgd2FpdCwgYXJncykgewogICAgICAgICAgcmV0dXJuIGJhc2VEZWxheShmdW5jLCB0b051bWJlcih3YWl0KSB8fCAwLCBhcmdzKTsKICAgICAgICB9KTsKCiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhIGZ1bmN0aW9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VuY3Rpb259IFtyZXNvbHZlcl0gVGhlIGZ1bmN0aW9uIHRvIHJlc29sdmUgdGhlIGNhY2hlIGtleS4KICAgICAgICAgKiBAcmV0dXJucyB7RnVuY3Rpb259IFJldHVybnMgdGhlIG5ldyBtZW1vaXplZCBmdW5jdGlvbi4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogdmFyIG9iamVjdCA9IHsgJ2EnOiAxLCAnYic6IDIgfTsKICAgICAgICAgKiB2YXIgb3RoZXIgPSB7ICdjJzogMywgJ2QnOiA0IH07CiAgICAgICAgICoKICAgICAgICAgKiB2YXIgdmFsdWVzID0gXy5tZW1vaXplKF8udmFsdWVzKTsKICAgICAgICAgKiB2YWx1ZXMob2JqZWN0KTsKICAgICAgICAgKiAvLyA9PiBbMSwgMl0KICAgICAgICAgKgogICAgICAgICAqIHZhbHVlcyhvdGhlcik7CiAgICAgICAgICogLy8gPT4gWzMsIDRdCiAgICAgICAgICoKICAgICAgICAgKiBvYmplY3QuYSA9IDI7CiAgICAgICAgICogdmFsdWVzKG9iamVjdCk7CiAgICAgICAgICogLy8gPT4gWzEsIDJdCiAgICAgICAgICoKICAgICAgICAgKiAvLyBNb2RpZnkgdGhlIHJlc3VsdCBjYWNoZS4KICAgICAgICAgKiB2YWx1ZXMuY2FjaGUuc2V0KG9iamVjdCwgWydhJywgJ2InXSk7CiAgICAgICAgICogdmFsdWVzKG9iamVjdCk7CiAgICAgICAgICogLy8gPT4gWydhJywgJ2InXQogICAgICAgICAqCiAgICAgICAgICogLy8gUmVwbGFjZSBgXy5tZW1vaXplLkNhY2hlYC4KICAgICAgICAgKiBfLm1lbW9pemUuQ2FjaGUgPSBXZWFrTWFwOwogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIG1lbW9pemUoZnVuYywgcmVzb2x2ZXIpIHsKICAgICAgICAgIGlmICh0eXBlb2YgZnVuYyAhPSAnZnVuY3Rpb24nIHx8IChyZXNvbHZlciAhPSBudWxs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GFuZCBhcmd1bWVudHMgb2YgdGhlCiAgICAgICAgICogY3JlYXRlZCBmdW5jdGlvbi4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAzLjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBGdW5jdGlvbgogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IHByZWRpY2F0ZSBUaGUgcHJlZGljYXRlIHRvIG5lZ2F0ZS4KICAgICAgICAgKiBAcmV0dXJucyB7RnVuY3Rpb259IFJldHVybnMgdGhlIG5ldyBuZWdhdGVkIGZ1bmN0aW9uLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBmdW5jdGlvbiBpc0V2ZW4obikgewogICAgICAgICAqICAgcmV0dXJuIG4gJSAyID09IDA7CiAgICAgICAgICogfQogICAgICAgICAqCiAgICAgICAgICogXy5maWx0ZXIoWzEsIDIsIDMsIDQsIDUsIDZdLCBfLm5lZ2F0ZShpc0V2ZW4pKTsKICAgICAgICAgKiAvLyA9PiBbMSwgMywgNV0KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBuZWdhdGUocHJlZGljYXRlKSB7CiAgICAgICAgICBpZiAodHlwZW9mIHByZWRpY2F0ZSAhPSAnZnVuY3Rpb24nKSB7CiAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoRlVOQ19FUlJPUl9URVhUKTsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiBmdW5jdGlvbigpIHsKICAgICAgICAgICAgdmFyIGFyZ3MgPSBhcmd1bWVudHM7CiAgICAgICAgICAgIHN3aXRjaCAoYXJncy5sZW5ndGgpIHsKICAgICAgICAgICAgICBjYXNlIDA6IHJldHVybiAhcHJlZGljYXRlLmNhbGwodGhpcyk7CiAgICAgICAgICAgICAgY2FzZSAxOiByZXR1cm4gIXByZWRpY2F0ZS5jYWxsKHRoaXMsIGFyZ3NbMF0pOwogICAgICAgICAgICAgIGNhc2UgMjogcmV0dXJuICFwcmVkaWNhdGUuY2FsbCh0aGlzLCBhcmdzWzBdLCBhcmdzWzFdKTsKICAgICAgICAgICAgICBjYXNlIDM6IHJldHVybiAhcHJlZGljYXRlLmNhbGwodGhpcywgYXJnc1swXSwgYXJnc1sxXSwgYXJnc1syXSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuICFwcmVkaWNhdGUuYXBwbHkodGhpcywgYXJncyk7CiAgICAgICAgICB9OwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhIGZ1bmN0aW9uIHRoYXQgaXMgcmVzdHJpY3RlZCB0byBpbnZva2luZyBgZnVuY2Agb25jZS4gUmVwZWF0IGNhbGxzCiAgICAgICAgICogdG8gdGhlIGZ1bmN0aW9uIHJldHVybiB0aGUgdmFsdWUgb2YgdGhlIGZpcnN0IGludm9jYXRpb24uIFRoZSBgZnVuY2AgaXMKICAgICAgICAgKiBpbnZva2VkIHdpdGggdGhlIGB0aGlzYCBiaW5kaW5nIGFuZCBhcmd1bWVudHMgb2YgdGhlIGNyZWF0ZWQgZnVuY3Rpb24uCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgMC4xLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgRnVuY3Rpb24KICAgICAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufSBmdW5jIFRoZSBmdW5jdGlvbiB0byByZXN0cmljdC4KICAgICAgICAgKiBAcmV0dXJucyB7RnVuY3Rpb259IFJldHVybnMgdGhlIG5ldyByZXN0cmljdGVkIGZ1bmN0aW9uLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiB2YXIgaW5pdGlhbGl6ZSA9IF8ub25jZShjcmVhdGVBcHBsaWNhdGlvbik7CiAgICAgICAgICogaW5pdGlhbGl6ZSgpOwogICAgICAgICAqIGluaXRpYWxpemUoKTsKICAgICAgICAgKiAvLyA9PiBgY3JlYXRlQXBwbGljYXRpb25gIGlzIGludm9rZWQgb25jZQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIG9uY2UoZnVuYykgewogICAgICAgICAgcmV0dXJuIGJlZm9yZSgyLCBmdW5jKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYSBmdW5jdGlvbiB0aGF0IGludm9rZXMgYGZ1bmNgIHdpdGggaXRzIGFyZ3VtZW50cyB0cmFuc2Zvcm1lZC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAc2luY2UgNC4wLjAKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBjYXRlZ29yeSBGdW5jdGlvbgogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IGZ1bmMgVGhlIGZ1bmN0aW9uIHRvIHdyYXAuCiAgICAgICAgICogQHBhcmFtIHsuLi4oRnVuY3Rpb258RnVuY3Rpb25bXSl9IFt0cmFuc2Zvcm1zPVtfLmlkZW50aXR5XV0KICAgICAgICAgKiAgVGhlIGFyZ3VtZW50IHRyYW5zZm9ybXMuCiAgICAgICAgICogQHJldHVybnMge0Z1bmN0aW9ufSBSZXR1cm5zIHRoZSBuZXcgZnVuY3Rpb24uCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIGZ1bmN0aW9uIGRvdWJsZWQobikgewogICAgICAgICAqICAgcmV0dXJuIG4gKiAyOwogICAgICAgICAqIH0KICAgICAgICAgKgogICAgICAgICAqIGZ1bmN0aW9uIHNxdWFyZShuKSB7CiAgICAgICAgICogICByZXR1cm4gbiAqIG47CiAgICAgICAgICogfQogICAgICAgICAqCiAgICAgICAgICogdmFyIGZ1bmMgPSBfLm92ZXJBcmdzKGZ1bmN0aW9uKHgsIHkpIHsKICAgICAgICAgKiAgIHJldHVybiBbeCwgeV07CiAgICAgICAgICogfSwgW3NxdWFyZSwgZG91YmxlZF0pOwogICAgICAgICAqCiAgICAgICAgICogZnVuYyg5LCAzKTsKICAgICAgICAgKiAvLyA9PiBbODEsIDZdCiAgICAgICAgICoKICAgICAgICAgKiBmdW5jKDEwLCA1KTsKICAgICAgICAgKiAvLyA9PiBbMTAwLCAxMF0KICAgICAgICAgKi8KICAgICAgICB2YXIgb3ZlckFyZ3MgPSBjYXN0UmVzdChmdW5jdGlvbihmdW5jLCB0cmFuc2Zvcm1zKSB7CiAgICAgICAgICB0cmFuc2Zvcm1zID0gKHRyYW5zZm9ybXMubGVuZ3RoID09IDEgJiYgaXNBcnJheSh0cmFuc2Zvcm1zWzBdKSkKICAgICAgICAgICAgPyBhcnJheU1hcCh0cmFuc2Zvcm1zWzBdLCBiYXNlVW5hcnkoZ2V0SXRlcmF0ZWUoKSkpCiAgICAgICAgICAgIDogYXJyYXlNYXAoYmFzZUZsYXR0ZW4odHJhbnNmb3JtcywgMSksIGJhc2VVbmFyeShnZXRJdGVyYXRlZSgpKSk7CgogICAgICAgICAgdmFyIGZ1bmNzTGVuZ3RoID0gdHJhbnNmb3Jtcy5sZW5ndGg7CiAgICAgICAgICByZXR1cm4gYmFzZVJlc3QoZnVuY3Rpb24oYXJncykgewogICAgICAgICAgICB2YXIgaW5kZXggPSAtMSwKICAgICAgICAgICAgICAgIGxlbmd0aCA9IG5hdGl2ZU1pbihhcmdzLmxlbmd0aCwgZnVuY3NMZW5ndGgpOwoKICAgICAgICAgICAgd2hpbGUgKCsraW5kZXggPCBsZW5ndGgpIHsKICAgICAgICAgICAgICBhcmdzW2luZGV4XSA9IHRyYW5zZm9ybXNbaW5kZXhdLmNhbGwodGhpcywgYXJnc1tpbmRleF0pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBhcHBseShmdW5jLCB0aGlzLCBhcmdzKTsKICAgICAgICAgIH0pOwogICAgICAgIH0pOwoKICAgICAgICAvKioKICAg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iZXlvbmQgcHJvdmlkZWQgYXMKICAgICAgICAgKiBhbiBhcnJheS4KICAgICAgICAgKgogICAgICAgICAqICoqTm90ZToqKiBUaGlzIG1ldGhvZCBpcyBiYXNlZCBvbiB0aGUKICAgICAgICAgKiBbcmVzdCBwYXJhbWV0ZXJdKGh0dHBzOi8vbWRuLmlvL3Jlc3RfcGFyYW1ldGVycykuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgRnVuY3Rpb24KICAgICAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufSBmdW5jIFRoZSBmdW5jdGlvbiB0byBhcHBseSBhIHJlc3QgcGFyYW1ldGVyIHRvLgogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBbc3RhcnQ9ZnVuYy5sZW5ndGgtMV0gVGhlIHN0YXJ0IHBvc2l0aW9uIG9mIHRoZSByZXN0IHBhcmFtZXRlci4KICAgICAgICAgKiBAcmV0dXJucyB7RnVuY3Rpb259IFJldHVybnMgdGhlIG5ldyBmdW5jdGlvbi4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogdmFyIHNheSA9IF8ucmVzdChmdW5jdGlvbih3aGF0LCBuYW1lcykgewogICAgICAgICAqICAgcmV0dXJuIHdoYXQgKyAnICcgKyBfLmluaXRpYWwobmFtZXMpLmpvaW4oJywgJykgKwogICAgICAgICAqICAgICAoXy5zaXplKG5hbWVzKSA+IDEgPyAnLCAmICcgOiAnJykgKyBfLmxhc3QobmFtZXMpOwogICAgICAgICAqIH0pOwogICAgICAgICAqCiAgICAgICAgICogc2F5KCdoZWxsbycsICdmcmVkJywgJ2Jhcm5leScsICdwZWJibGVzJyk7CiAgICAgICAgICogLy8gPT4gJ2hlbGxvIGZyZWQsIGJhcm5leSwgJiBwZWJibGVzJwogICAgICAgICAqLwogICAgICAg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XJhbSB7bnVtYmVyfSBbc3RhcnQ9MF0gVGhlIHN0YXJ0IHBvc2l0aW9uIG9mIHRoZSBzcHJlYWQuCiAgICAgICAgICogQHJldHVybnMge0Z1bmN0aW9ufSBSZXR1cm5zIHRoZSBuZXcgZnVuY3Rpb24uCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIHZhciBzYXkgPSBfLnNwcmVhZChmdW5jdGlvbih3aG8sIHdoYXQpIHsKICAgICAgICAgKiAgIHJldHVybiB3aG8gKyAnIHNheXMgJyArIHdoYXQ7CiAgICAgICAgICogfSk7CiAgICAgICAgICoKICAgICAgICAgKiBzYXkoWydmcmVkJywgJ2hlbGxvJ10pOwogICAgICAgICAqIC8vID0+ICdmcmVkIHNheXMgaGVsbG8nCiAgICAgICAgICoKICAgICAgICAgKiB2YXIgbnVtYmVycyA9IFByb21pc2UuYWxsKFsKICAgICAgICAgKiAgIFByb21pc2UucmVzb2x2ZSg0MCksCiAgICAgICAgICogICBQcm9taXNlLnJlc29sdmUoMzYpCiAgICAgICAgICogXSk7CiAgICAgICAgICoKICAgICAgICAgKiBudW1iZXJzLnRoZW4oXy5zcHJlYWQoZnVuY3Rpb24oeCwgeSkgewogICAgICAgICAqICAgcmV0dXJuIHggKyB5OwogICAgICAgICAqIH0pKTsKICAgICAgICAgKiAvLyA9PiBhIFByb21pc2Ugb2YgNzYKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBzcHJlYWQoZnVuYywgc3RhcnQpIHsKICAgICAgICAgIGlmICh0eXBlb2YgZnVuYyAhPSAnZnVuY3Rpb24nKSB7CiAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoRlVOQ19FUlJPUl9URVhUKTsKICAgICAgICAgIH0KICAgICAgICAgIHN0YXJ0ID0gc3RhcnQgPT0gbnVsbCA/IDAgOiBuYXRpdmVNYXgodG9JbnRlZ2VyKHN0YXJ0KSwgMCk7CiAgICAgICAgICByZXR1cm4gYmFzZVJ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5nJzogZmFsc2UgfSk7CiAgICAgICAgICogalF1ZXJ5KGVsZW1lbnQpLm9uKCdjbGljaycsIHRocm90dGxlZCk7CiAgICAgICAgICoKICAgICAgICAgKiAvLyBDYW5jZWwgdGhlIHRyYWlsaW5nIHRocm90dGxlZCBpbnZvY2F0aW9uLgogICAgICAgICAqIGpRdWVyeSh3aW5kb3cpLm9uKCdwb3BzdGF0ZScsIHRocm90dGxlZC5jYW5jZWwpOwogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHRocm90dGxlKGZ1bmMsIHdhaXQsIG9wdGlvbnMpIHsKICAgICAgICAgIHZhciBsZWFkaW5nID0gdHJ1ZSwKICAgICAgICAgICAgICB0cmFpbGluZyA9IHRydWU7CgogICAgICAgICAgaWYgKHR5cGVvZiBmdW5jICE9ICdmdW5jdGlvbicpIHsKICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihGVU5DX0VSUk9SX1RFWFQpOwogICAgICAgICAgfQogICAgICAgICAgaWYgKGlzT2JqZWN0KG9wdGlvbnMpKSB7CiAgICAgICAgICAgIGxlYWRpbmcgPSAnbGVhZGluZycgaW4gb3B0aW9ucyA/ICEhb3B0aW9ucy5sZWFkaW5nIDogbGVhZGluZzsKICAgICAgICAgICAgdHJhaWxpbmcgPSAndHJhaWxpbmcnIGluIG9wdGlvbnMgPyAhIW9wdGlvbnMudHJhaWxpbmcgOiB0cmFpbGluZzsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiBkZWJvdW5jZShmdW5jLCB3YWl0LCB7CiAgICAgICAgICAgICdsZWFkaW5nJzogbGVhZGluZywKICAgICAgICAgICAgJ21heFdhaXQnOiB3YWl0LAogICAgICAgICAgICAndHJhaWxpbmcnOiB0cmFpbGluZwogICAgICAgICAgfSk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDcmVhdGVzIGEgZnVuY3Rpb24gdGhhdCBhY2NlcHRzIHVwIHRvIG9uZSBhcmd1bWVudCwgaWdub3JpbmcgYW55CiAgICAgICAgICogYWRkaXRpb25hbCBhcmd1bWVudHMuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgRnVuY3Rpb24KICAgICAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufSBmdW5jIFRoZSBmdW5jdGlvbiB0byBjYXAgYXJndW1lbnRzIGZvci4KICAgICAgICAgKiBAcmV0dXJucyB7RnVuY3Rpb259IFJldHVybnMgdGhlIG5ldyBjYXBwZWQgZnVuY3Rpb24uCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8ubWFwKFsnNicsICc4JywgJzEwJ10sIF8udW5hcnkocGFyc2VJbnQpKTsKICAgICAgICAgKiAvLyA9PiBbNiwgOCwgMTBdCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gdW5hcnkoZnVuYykgewogICAgICAgICAgcmV0dXJuIGFyeShmdW5jLCAxKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYSBmdW5jdGlvbiB0aGF0IHByb3ZpZGVzIGB2YWx1ZWAgdG8gYHdyYXBwZXJgIGFzIGl0cyBmaXJzdAogICAgICAgICAqIGFyZ3VtZW50LiBBbnkgYWRkaXRpb25hbCBhcmd1bWVudHMgcHJvdmlkZWQgdG8gdGhlIGZ1bmN0aW9uIGFyZSBhcHBlbmRlZAogICAgICAgICAqIHRvIHRob3NlIHByb3ZpZGVkIHRvIHRoZSBgd3JhcHBlcmAuIFRoZSB3cmFwcGVyIGlzIGludm9rZWQgd2l0aCB0aGUgYHRoaXNgCiAgICAgICAgICogYmluZGluZyBvZiB0aGUgY3JlYXRlZCBmdW5jdGlvbi4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAq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nb3J5IExhbmcKICAgICAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBpbnNwZWN0LgogICAgICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyB0aGUgY2FzdCBhcnJheS4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy5jYXN0QXJyYXkoMSk7CiAgICAgICAgICogLy8gPT4gWzFdCiAgICAgICAgICoKICAgICAgICAgKiBfLmNhc3RBcnJheSh7ICdhJzogMSB9KTsKICAgICAgICAgKiAvLyA9PiBbeyAnYSc6IDEgfV0KICAgICAgICAgKgogICAgICAgICAqIF8uY2FzdEFycmF5KCdhYmMnKTsKICAgICAgICAgKiAvLyA9PiBbJ2FiYyddCiAgICAgICAgICoKICAgICAgICAgKiBfLmNhc3RBcnJheShudWxsKTsKICAgICAgICAgKiAvLyA9PiBbbnVsbF0KICAgICAgICAgKgogICAgICAgICAqIF8uY2FzdEFycmF5KHVuZGVmaW5lZCk7CiAgICAgICAgICogLy8gPT4gW3VuZGVmaW5lZF0KICAgICAgICAgKgogICAgICAgICAqIF8uY2FzdEFycmF5KCk7CiAgICAgICAgICogLy8gPT4gW10KICAgICAgICAgKgogICAgICAgICAqIHZhciBhcnJheSA9IFsxLCAyLCAzXTsKICAgICAgICAgKiBjb25zb2xlLmxvZyhfLmNhc3RBcnJheShhcnJheSkgPT09IGFycmF5KTsKICAgICAgICAgKiAvLyA9PiB0cnVlCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gY2FzdEFycmF5KCkgewogICAgICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSB7CiAgICAgICAgICAgIHJldHVybiBbXTsKICAgICAgICAgIH0KICAgICAgICAgIHZhciB2YWx1ZSA9IGFyZ3VtZW50c1swXTsKICAgICAgICAgIHJldHVybiBpc0FycmF5KHZhbHVlKSA/IHZhbHVlIDogW3ZhbHVlXTsKICAgICAgICB9CgogICAgICAgIC8qKgogIC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XBsZQogICAgICAgICAqCiAgICAgICAgICogdmFyIG9iamVjdHMgPSBbeyAnYSc6IDEgfSwgeyAnYic6IDIgfV07CiAgICAgICAgICoKICAgICAgICAgKiB2YXIgc2hhbGxvdyA9IF8uY2xvbmUob2JqZWN0cyk7CiAgICAgICAgICogY29uc29sZS5sb2coc2hhbGxvd1swXSA9PT0gb2JqZWN0c1swXSk7CiAgICAgICAgICogLy8gPT4gdHJ1ZQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGNsb25lKHZhbHVlKSB7CiAgICAgICAgICByZXR1cm4gYmFzZUNsb25lKHZhbHVlLCBDTE9ORV9TWU1CT0xTX0ZMQUcpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogVGhpcyBtZXRob2QgaXMgbGlrZSBgXy5jbG9uZWAgZXhjZXB0IHRoYXQgaXQgYWNjZXB0cyBgY3VzdG9taXplcmAgd2hpY2gKICAgICAgICAgKiBpcyBpbnZva2VkIHRvIHByb2R1Y2UgdGhlIGNsb25lZCB2YWx1ZS4gSWYgYGN1c3RvbWl6ZXJgIHJldHVybnMgYHVuZGVmaW5lZGAsCiAgICAgICAgICogY2xvbmluZyBpcyBoYW5kbGVkIGJ5IHRoZSBtZXRob2QgaW5zdGVhZC4gVGhlIGBjdXN0b21pemVyYCBpcyBpbnZva2VkIHdpdGgKICAgICAgICAgKiB1cCB0byBmb3VyIGFyZ3VtZW50czsgKHZhbHVlIFssIGluZGV4fGtleSwgb2JqZWN0LCBzdGFja10pLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDQuMC4wCiAgICAgICAgICogQGNhdGVnb3J5IExhbmcKICAgICAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBjbG9uZS4KICAgICAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufSBbY3VzdG9taXplcl0gVGhlIGZ1bmN0aW9uIHRvIGN1c3RvbWl6ZSBjbG9uaW5nLgogICAgICAgICAqIEByZXR1cm5zIHsqfSBSZXR1cm5zIHRoZSBjbG9uZWQgdmFsdWUuCiAgICAgICAgICogQHNlZSBfLmNsb25lRGVlcFdpdGgKICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogZnVuY3Rpb24gY3VzdG9taXplcih2YWx1ZSkgewogICAgICAgICAqICAgaWYgKF8uaXNFbGVtZW50KHZhbHVlKSkgewogICAgICAgICAqICAgICByZXR1cm4gdmFsdWUuY2xvbmVOb2RlKGZhbHNlKTsKICAgICAgICAgKiAgIH0KICAgICAgICAgKiB9CiAgICAgICAgICoKICAgICAgICAgKiB2YXIgZWwgPSBfLmNsb25lV2l0aChkb2N1bWVudC5ib2R5LCBjdXN0b21pemVyKTsKICAgICAgICAgKgogICAgICAgICAqIGNvbnNvbGUubG9nKGVsID09PSBkb2N1bWVudC5ib2R5KTsKICAgICAgICAgKiAvLyA9PiBmYWxzZQogICAgICAgICAqIGNvbnNvbGUubG9nKGVsLm5vZGVOYW1lKTsKICAgICAgICAgKiAvLyA9PiAnQk9EWScKICAgICAgICAgKiBjb25zb2xlLmxvZyhlbC5jaGlsZE5vZGVzLmxlbmd0aCk7CiAgICAgICAgICogLy8gPT4gMAogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGNsb25lV2l0aCh2YWx1ZSwgY3VzdG9taXplcikgewogICAgICAgICAgY3VzdG9taXplciA9IHR5cGVvZiBjdXN0b21pemVyID09ICdmdW5jdGlvbicgPyBjdXN0b21pemVyIDogdW5kZWZpbmVkJDE7CiAgICAgICAgICByZXR1cm4gYmFzZUNsb25lKHZhbHVlLCBDTE9ORV9TWU1CT0xTX0ZMQUcsIGN1c3RvbWl6ZXIpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogVGhpcyBtZXRob2QgaXMgbGlrZSBgXy5jbG9uZWAgZXhjZXB0IHRoYXQgaXQgcmV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Wx1ZSB0byByZWN1cnNpdmVseSBjbG9uZS4KICAgICAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufSBbY3VzdG9taXplcl0gVGhlIGZ1bmN0aW9uIHRvIGN1c3RvbWl6ZSBjbG9uaW5nLgogICAgICAgICAqIEByZXR1cm5zIHsqfSBSZXR1cm5zIHRoZSBkZWVwIGNsb25lZCB2YWx1ZS4KICAgICAgICAgKiBAc2VlIF8uY2xvbmVXaXRoCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIGZ1bmN0aW9uIGN1c3RvbWl6ZXIodmFsdWUpIHsKICAgICAgICAgKiAgIGlmIChfLmlzRWxlbWVudCh2YWx1ZSkpIHsKICAgICAgICAgKiAgICAgcmV0dXJuIHZhbHVlLmNsb25lTm9kZSh0cnVlKTsKICAgICAgICAgKiAgIH0KICAgICAgICAgKiB9CiAgICAgICAgICoKICAgICAgICAgKiB2YXIgZWwgPSBfLmNsb25lRGVlcFdpdGgoZG9jdW1lbnQuYm9keSwgY3VzdG9taXplcik7CiAgICAgICAgICoKICAgICAgICAgKiBjb25zb2xlLmxvZyhlbCA9PT0gZG9jdW1lbnQuYm9keSk7CiAgICAgICAgICogLy8gPT4gZmFsc2UKICAgICAgICAgKiBjb25zb2xlLmxvZyhlbC5ub2RlTmFtZSk7CiAgICAgICAgICogLy8gPT4gJ0JPRFknCiAgICAgICAgICogY29uc29sZS5sb2coZWwuY2hpbGROb2Rlcy5sZW5ndGgpOwogICAgICAgICAqIC8vID0+IDIwCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gY2xvbmVEZWVwV2l0aCh2YWx1ZSwgY3VzdG9taXplcikgewogICAgICAgICAgY3VzdG9taXplciA9IHR5cGVvZiBjdXN0b21pemVyID09ICdmdW5jdGlvbicgPyBjdXN0b21pemVyIDogdW5kZWZpbmVkJDE7CiAgICAgICAgICByZXR1cm4gYmFzZUNsb25lKHZhbHVlLCBDTE9ORV9ERUVQX0ZMQUcgf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ICAgICAgKiB2YXIgb3RoZXIgPSB7ICdhJzogMSB9OwogICAgICAgICAqCiAgICAgICAgICogXy5lcShvYmplY3QsIG9iamVjdCk7CiAgICAgICAgICogLy8gPT4gdHJ1ZQogICAgICAgICAqCiAgICAgICAgICogXy5lcShvYmplY3QsIG90aGVyKTsKICAgICAgICAgKiAvLyA9PiBmYWxzZQogICAgICAgICAqCiAgICAgICAgICogXy5lcSgnYScsICdhJyk7CiAgICAgICAgICogLy8gPT4gdHJ1ZQogICAgICAgICAqCiAgICAgICAgICogXy5lcSgnYScsIE9iamVjdCgnYScpKTsKICAgICAgICAgKiAvLyA9PiBmYWxzZQogICAgICAgICAqCiAgICAgICAgICogXy5lcShOYU4sIE5hTik7CiAgICAgICAgICogLy8gPT4gdHJ1ZQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGVxKHZhbHVlLCBvdGhlcikgewogICAgICAgICAgcmV0dXJuIHZhbHVlID09PSBvdGhlciB8fCAodmFsdWUgIT09IHZhbHVlICYmIG90aGVyICE9PSBvdGhlcik7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDaGVja3MgaWYgYHZhbHVlYCBpcyBncmVhdGVyIHRoYW4gYG90aGVyYC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAzLjkuMAogICAgICAgICAqIEBjYXRlZ29yeSBMYW5nCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gY29tcGFyZS4KICAgICAgICAgKiBAcGFyYW0geyp9IG90aGVyIFRoZSBvdGhlciB2YWx1ZSB0byBjb21wYXJlLgogICAgICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiBgdmFsdWVgIGlzIGdyZWF0ZXIgdGhhbiBgb3RoZXJgLAogICAgICAgICAqICBlbHNlIGBmYWxzZWAuCiAgICAgICAgICogQHNlZSBfLmx0CiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8uZ3QoMywgMSk7CiAgICAgICAgICogLy8gPT4gdHJ1ZQogICAgICAgICAqCiAgICAgICAgICogXy5ndCgzLCAzKTsKICAgICAgICAgKiAvLyA9PiBmYWxzZQogICAgICAgICAqCiAgICAgICAgICogXy5ndCgxLCAzKTsKICAgICAgICAgKiAvLyA9PiBmYWxzZQogICAgICAgICAqLwogICAgICAgIHZhciBndCA9IGNyZWF0ZVJlbGF0aW9uYWxPcGVyYXRpb24oYmFzZUd0KTsKCiAgICAgICAgLyoqCiAgICAgICAgICogQ2hlY2tzIGlmIGB2YWx1ZWAgaXMgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvIGBvdGhlcmAuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgMy45LjAKICAgICAgICAgKiBAY2F0ZWdvcnkgTGFuZwogICAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIGNvbXBhcmUuCiAgICAgICAgICogQHBhcmFtIHsqfSBvdGhlciBUaGUgb3RoZXIgdmFsdWUgdG8gY29tcGFyZS4KICAgICAgICAgKiBAcmV0dXJucyB7Ym9vbGVhbn0gUmV0dXJucyBgdHJ1ZWAgaWYgYHZhbHVlYCBpcyBncmVhdGVyIHRoYW4gb3IgZXF1YWwgdG8KICAgICAgICAgKiAgYG90aGVyYCwgZWxzZSBgZmFsc2VgLgogICAgICAgICAqIEBzZWUgXy5sdGUKICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy5ndGUoMywgMSk7CiAgICAgICAgICogLy8gPT4gdHJ1ZQogICAgICAgICAqCiAgICAgICAgICogXy5ndGUoMywgMyk7CiAgICAgICAgICogLy8gPT4gdHJ1ZQogICAgICAgICAqCiAgICAgICAgICogXy5ndGUoMSwgMyk7CiAgICAgICAgICogLy8gPT4gZmFsc2UKICAgICAgICAgKi8KICAgICAgICB2YXIgZ3RlID0gY3JlYXRlUmVsYXRpb25hbE9wZXJhdGlvbihmdW5jdGlvbih2YWx1ZSwgb3RoZXIpIHsKICAgICAgICAgIHJldHVybiB2YWx1ZSA+PSBvdGhlcjsKICAgICAgICB9KTsKCiAgICAgICAgLyoqCiAgICAgICAgICogQ2hlY2tzIGlmIGB2YWx1ZWAgaXMgbGlrZWx5IGFuIGBhcmd1bWVudHNgIG9iamVjdC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAwLjEuMAogICAgICAgICAqIEBjYXRlZ29yeSBMYW5nCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gY2hlY2suCiAgICAgICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIGB2YWx1ZWAgaXMgYW4gYGFyZ3VtZW50c2Agb2JqZWN0LAogICAgICAgICAqICBlbHNlIGBmYWxzZWAuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8uaXNBcmd1bWVudHMoZnVuY3Rpb24oKSB7IHJldHVybiBhcmd1bWVudHM7IH0oKSk7CiAgICAgICAgICogLy8gPT4gdHJ1ZQogICAgICAgICAqCiAgICAgICAgICogXy5pc0FyZ3VtZW50cyhbMSwgMiwgM10pOwogICAgICAgICAqIC8vID0+IGZhbHNlCiAgICAgICAgICovCiAgICAgICAgdmFyIGlzQXJndW1lbnRzID0gYmFzZUlzQXJndW1lbnRzKGZ1bmN0aW9uKCkgeyByZXR1cm4gYXJndW1lbnRzOyB9KCkpID8gYmFzZUlzQXJndW1lbnRzIDogZnVuY3Rpb24odmFsdWUpIHsKICAgICAgICAgIHJldHVybiBpc09iamVjdExpa2UodmFsdWUpICYmIGhhc093blByb3BlcnR5LmNhbGwodmFsdWUsICdjYWxsZWUnKSAmJgogICAgICAgICAgICAhcHJvcGVydHlJc0VudW1lcmFibGUuY2FsbCh2YWx1ZSwgJ2NhbGxlZScpOwogICAgICAgIH07CgogICAgICAgIC8qKgogICAgICAgICAqIENoZWNrcyBpZiBgdmFsdWVgIGlzIGNsYXNzaWZpZWQgYXMgYW4gYEFycmF5YCBvYmplY3QuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgMC4xLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgTGFuZwogICAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIGNoZWNrLgogICAgICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiBgdmFsdWVgIGlzIGFuIGFycmF5LCBlbHNlIGBmYWxzZWAuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8uaXNBcnJheShbMSwgMiwgM10pOwogICAgICAgICAqIC8vID0+IHRydWUKICAgICAgICAgKgogICAgICAgICAqIF8uaXNBcnJheShkb2N1bWVudC5ib2R5LmNoaWxkcmVuKTsKICAgICAgICAgKiAvLyA9PiBmYWxzZQogICAgICAgICAqCiAgICAgICAgICogXy5pc0FycmF5KCdhYmMnKTsKICAgICAgICAgKiAvLyA9PiBmYWxzZQogICAgICAgICAqCiAgICAgICAgICogXy5pc0FycmF5KF8ubm9vcCk7CiAgICAgICAgICogLy8gPT4gZmFsc2UKICAgICAgICAgKi8KICAgICAgICB2YXIgaXNBcnJheSA9IEFycmF5LmlzQXJyYXk7CgogICAgICAgIC8qKgogICAgICAgICAqIENoZWNrcyBpZiBgdmFsdWVgIGlzIGNsYXNzaWZpZWQgYXMgYW4gYEFycmF5QnVmZmVyYCBvYmplY3QuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG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SBMYW5nCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gY2hlY2suCiAgICAgICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIGB2YWx1ZWAgaXMgYXJyYXktbGlrZSwgZWxzZSBgZmFsc2VgLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLmlzQXJyYXlMaWtlKFsxLCAyLCAzXSk7CiAgICAgICAgICogLy8gPT4gdHJ1ZQogICAgICAgICAqCiAgICAgICAgICogXy5pc0FycmF5TGlrZShkb2N1bWVudC5ib2R5LmNoaWxkcmVuKTsKICAgICAgICAgKiAvLyA9PiB0cnVlCiAgICAgICAgICoKICAgICAgICAgKiBfLmlzQXJyYXlMaWtlKCdhYmMnKTsKICAgICAgICAgKiAvLyA9PiB0cnVlCiAgICAgICAgICoKICAgICAgICAgKiBfLmlzQXJyYXlMaWtlKF8ubm9vcCk7CiAgICAgICAgICogLy8gPT4gZmFsc2UKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBpc0FycmF5TGlrZSh2YWx1ZSkgewogICAgICAgICAgcmV0dXJuIHZhbHVlICE9IG51bGwgJiYgaXNMZW5ndGgodmFsdWUubGVuZ3RoKSAmJiAhaXNGdW5jdGlvbih2YWx1ZSk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBUaGlzIG1ldGhvZCBpcyBsaWtlIGBfLmlzQXJyYXlMaWtlYCBleGNlcHQgdGhhdCBpdCBhbHNvIGNoZWNrcyBpZiBgdmFsdWVgCiAgICAgICAgICogaXMgYW4gb2JqZWN0LgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDQuMC4wCiAgICAgICAgICogQGNhdGVnb3J5IExhbmcKICAgICAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBjaGVjay4KICAgICAgICAgKiBAcmV0dXJucyB7Ym9vbGVhbn0gUmV0dXJucyBgdHJ1ZWAgaWYgYHZhbHVlYCBpcyBhbiBhcnJheS1saWtlIG9iamVjdCwKICAgICAgICAgKiAgZWxzZSBgZmFsc2VgLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLmlzQXJyYXlMaWtlT2JqZWN0KFsxLCAyLCAzXSk7CiAgICAgICAgICogLy8gPT4gdHJ1ZQogICAgICAgICAqCiAgICAgICAgICogXy5pc0FycmF5TGlrZU9iamVjdChkb2N1bWVudC5ib2R5LmNoaWxkcmVuKTsKICAgICAgICAgKiAvLyA9PiB0cnVlCiAgICAgICAgICoKICAgICAgICAgKiBfLmlzQXJyYXlMaWtlT2JqZWN0KCdhYmMnKTsKICAgICAgICAgKiAvLyA9PiBmYWxzZQogICAgICAgICAqCiAgICAgICAgICogXy5pc0FycmF5TGlrZU9iamVjdChfLm5vb3ApOwogICAgICAgICAqIC8vID0+IGZhbHNlCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gaXNBcnJheUxpa2VPYmplY3QodmFsdWUpIHsKICAgICAgICAgIHJldHVybiBpc09iamVjdExpa2UodmFsdWUpICYmIGlzQXJyYXlMaWtlKHZhbHVlKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENoZWNrcyBpZiBgdmFsdWVgIGlzIGNsYXNzaWZpZWQgYXMgYSBib29sZWFuIHByaW1pdGl2ZSBvciBvYmplY3QuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgMC4xLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgTGFuZwogICAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIGNoZWNrLgogICAgICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiBgdmFsdWVgIGlzIGEgYm9vbGVhbiwgZWxzZSBgZmFsc2VgLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLmlzQm9vbGVhbihmYWxzZSk7CiAgICAgICAgICogLy8gPT4gdHJ1ZQogICAgICAgICAqCiAgICAgICAgICogXy5pc0Jvb2xlYW4obnVsbCk7CiAgICAgICAgICogLy8gPT4gZmFsc2UKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBpc0Jvb2xlYW4odmFsdWUpIHsKICAgICAgICAgIHJldHVybiB2YWx1ZSA9PT0gdHJ1ZSB8fCB2YWx1ZSA9PT0gZmFsc2UgfHwKICAgICAgICAgICAgKGlzT2JqZWN0TGlrZSh2YWx1ZSkgJiYgYmFzZUdldFRhZyh2YWx1ZSkgPT0gYm9vbFRhZyk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDaGVja3MgaWYgYHZhbHVlYCBpcyBhIGJ1ZmZlci4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSA0LjMuMAogICAgICAgICAqIEBjYXRlZ29yeSBMYW5nCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gY2hlY2suCiAgICAgICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIGB2YWx1ZWAgaXMgYSBidWZmZXIsIGVsc2UgYGZhbHNlYC4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy5pc0J1ZmZlcihuZXcgQnVmZmVyKDIpKTsKICAgICAgICAgKiAvLyA9PiB0cnVlCiAgICAgICAgICoKICAgICAgICAgKiBfLmlzQnVmZmVyKG5ldyBVaW50OEFycmF5KDIpKTsKICAgICAgICAgKiAvLyA9PiBmYWxzZQogICAgICAgICAqLwogICAgICAgIHZhciBpc0J1ZmZlciA9IG5hdGl2ZUlzQnVmZmVyIHx8IHN0dWJGYWxzZTsKCiAgICAgICAgLyoqCiAgICAgICAgICogQ2hlY2tzIGlmIGB2YWx1ZWAgaXMgY2xhc3NpZmllZCBhcyBhIGBEYXRlYCBvYmplY3QuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgMC4xLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgTGFuZwogICAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIGNoZWNrLgogICAgICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiBgdmFsdWVgIGlzIGEgZGF0ZSBvYmplY3QsIGVsc2UgYGZhbHNlYC4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy5pc0RhdGUobmV3IERhdGUpOwogICAgICAgICAqIC8vID0+IHRydWUKICAgICAgICAgKgogICAgICAgICAqIF8uaXNEYXRlKCdNb24gQXByaWwgMjMgMjAxMicpOwogICAgICAgICAqIC8vID0+IGZhbHNlCiAgICAgICAgICovCiAgICAgICAgdmFyIGlzRGF0ZSA9IG5vZGVJc0RhdGUgPyBiYXNlVW5hcnkobm9kZUlzRGF0ZSkgOiBiYXNlSXNEYXRlOwoKICAgICAgICAvKioKICAgICAgICAgKiBDaGVja3MgaWYgYHZhbHVlYCBpcyBsaWtlbHkgYSBET00gZWxlbWVudC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAwLjEuMAogICAgICAgICAqIEBjYXRlZ29yeSBMYW5nCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gY2hlY2suCiAgICAgICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIGB2YWx1ZWAgaXMgYSBET00gZWxlbWVudCwgZWxzZSBgZmFsc2VgLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLmlzRWxlbWVudChkb2N1bWVudC5ib2R5KTsKICAgICAgICAgKiAvLyA9PiB0cnVlCiAgICAgICAgICoKICAgICAgICAgKiBfLmlzRWxlbWVudCgnPGJvZHk+Jyk7CiAgICAgICAgICogLy8gPT4gZmFsc2UKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBpc0VsZW1lbnQodmFsdWUpIHsKICAgICAgICAgIHJldHVybiBpc09iamVjdExpa2UodmFsdWUpICYmIHZhbHVlLm5vZGVUeXBlID09PSAxICYmICFpc1BsYWluT2JqZWN0KHZhbHVlKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENoZWNrcyBpZiBgdmFsdWVgIGlzIGFuIGVtcHR5IG9iamVjdCwgY29sbGVjdGlvbiwgbWFwLCBvciBzZXQuCiAgICAgICAgICoKICAgICAgICAgKiBPYmplY3RzIGFyZSBjb25zaWRlcmVkIGVtcHR5IGlmIHRoZXkgaGF2ZSBubyBvd24gZW51bWVyYWJsZSBzdHJpbmcga2V5ZWQKICAgICAgICAgKiBwcm9wZXJ0aWVzLgogICAgICAgICAqCiAgICAgICAgICogQXJyYXktbGlrZSB2YWx1ZXMgc3VjaCBhcyBgYXJndW1lbnRzYCBvYmplY3RzLCBhcnJheXMsIGJ1ZmZlcnMsIHN0cmluZ3MsIG9yCiAgICAgICAgICogalF1ZXJ5LWxpa2UgY29sbGVjdGlvbnMgYXJlIGNvbnNpZGVyZWQgZW1wdHkgaWYgdGhleSBoYXZlIGEgYGxlbmd0aGAgb2YgYDBgLgogICAgICAgICAqIFNpbWlsYXJseSwgbWFwcyBhbmQgc2V0cyBhcmUgY29uc2lkZXJlZCBlbXB0eSBpZiB0aGV5IGhhdmUgYSBgc2l6ZWAgb2YgYDBgLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDAuMS4wCiAgICAgICAgICogQGNhdGVnb3J5IExhbmcKICAgICAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBjaGVjay4KICAgICAgICAgKiBAcmV0dXJucyB7Ym9vbGVhbn0gUmV0dXJucyBgdHJ1ZWAgaWYgYHZhbHVlYCBpcyBlbXB0eSwgZWxzZSBgZmFsc2VgLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLmlzRW1wdHkobnVsbCk7CiAgICAgICAgICogLy8gPT4gdHJ1ZQogICAgICAgICAqCiAgICAgICAgICogXy5pc0VtcHR5KHRydWUpOwogICAgICAgICAqIC8vID0+IHRydWUKICAgICAgICAgKgogICAgICAgICAqIF8uaXNFbXB0eSgxKTsKICAgICAgICAgKiAvLyA9PiB0cnVlCiAgICAgICAgICoKICAgICAgICAgKiBfLmlzRW1wdHkoWzEsIDIsIDNdKTsKICAgICAgICAgKiAvLyA9PiBmYWxzZQogICAgICAgICAqCiAgICAgICAgICogXy5pc0VtcHR5KHsgJ2EnOiAxIH0pOwogICAgICAgICAqIC8vID0+IGZhbHNlCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gaXNFbXB0eSh2YWx1ZSkgewogICAgICAgICAgaWYgKHZhbHVlID09IG51bGwpIHsKICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICB9CiAgICAgICAgICBpZiAoaXNBcnJheUxpa2UodmFsdWUpICYmCiAgICAgICAgICAgICAgKGlzQXJyYXkodmFsdWUpIHx8IHR5cGVvZiB2YWx1ZSA9PSAnc3RyaW5nJyB8fCB0eXBlb2YgdmFsdWUuc3BsaWNlID09ICdmdW5jdGlvbicgfHwKICAgICAgICAgICAgICAgIGlzQnVmZmVyKHZhbHVlKSB8fCBpc1R5cGVkQXJyYXkodmFsdWUpIHx8IGlzQXJndW1lbnRzKHZhbHVlKSkpIHsKICAgICAgICAgICAgcmV0dXJuICF2YWx1ZS5sZW5ndGg7CiAgICAgICAgICB9CiAgICAgICAgICB2YXIgdGFnID0gZ2V0VGFnKHZhbHVlKTsKICAgICAgICAgIGlmICh0YWcgPT0gbWFwVGFnIHx8IHRhZyA9PSBzZXRUYWcpIHsKICAgICAgICAgICAgcmV0dXJuICF2YWx1ZS5zaXplOwogICAgICAgICAgfQogICAgICAgICAgaWYgKGlzUHJvdG90eXBlKHZhbHVlKSkgewogICAgICAgICAgICByZXR1cm4gIWJhc2VLZXlzKHZhbHVlKS5sZW5ndGg7CiAgICAgICAgICB9CiAgICAgICAgICBmb3IgKHZhciBrZXkgaW4gdmFsdWUpIHsKICAgICAgICAgICAgaWYgKGhhc093blByb3BlcnR5LmNhbGwodmFsdWUsIGtleSkpIHsKICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogUGVyZm9ybXMgYSBkZWVwIGNvbXBhcmlzb24gYmV0d2VlbiB0d28gdmFsdWVzIHRvIGRldGVybWluZSBpZiB0aGV5IGFyZQogICAgICAgICAqIGVxdWl2YWxlbnQuCiAgICAgICAgICoKICAgICAgICAgKiAqKk5vdGU6KiogVGhpcyBtZXRob2Qgc3VwcG9ydHMgY29tcGFyaW5nIGFycmF5cywgYXJyYXkgYnVmZmVycywgYm9vbGVhbnMsCiAgICAgICAgICogZGF0ZSBvYmplY3RzLCBlcnJvciBvYmplY3RzLCBtYXBzLCBudW1iZXJzLCBgT2JqZWN0YCBvYmplY3RzLCByZWdleGVzLAogICAgICAgICAqIHNldHMsIHN0cmluZ3MsIHN5bWJvbHMsIGFuZCB0eXBlZCBhcnJheXMuIGBPYmplY3RgIG9iamVjdHMgYXJlIGNvbXBhcmVkCiAgICAgICAgICogYnkgdGhlaXIgb3duLCBub3QgaW5oZXJpdGVkLCBlbnVtZXJhYmxlIHByb3BlcnRpZXMuIEZ1bmN0aW9ucyBhbmQgRE9NCiAgICAgICAgICogbm9kZXMgYXJlIGNvbXBhcmVkIGJ5IHN0cmljdCBlcXVhbGl0eSwgaS5lLiBgPT09YC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAwLjEuMAogICAgICAgICAqIEBjYXRlZ29yeSBMYW5nCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gY29tcGFyZS4KICAgICAgICAgKiBAcGFyYW0geyp9IG90aGVyIFRoZSBvdGhlciB2YWx1ZSB0byBjb21wYXJlLgogICAgICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiB0aGUgdmFsdWVzIGFyZSBlcXVpdmFsZW50LCBlbHNlIGBmYWxzZWAuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIHZhciBvYmplY3QgPSB7ICdhJzogMSB9OwogICAgICAgICAqIHZhciBvdGhlciA9IHsgJ2EnOiAxIH07CiAgICAgICAgICoKICAgICAgICAgKiBfLmlzRXF1YWwob2JqZWN0LCBvdGhlcik7CiAgICAgICAgICogLy8gPT4gdHJ1ZQogICAgICAgICAqCiAgICAgICAgICogb2JqZWN0ID09PSBvdGhlcjsKICAgICAgICAgKiAvLyA9PiBmYWxzZQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGlzRXF1YWwodmFsdWUsIG90aGVyKSB7CiAgICAgICAgICByZXR1cm4gYmFzZUlzRXF1YWwodmFsdWUsIG90aGVyKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFRoaXMgbWV0aG9kIGlzIGxpa2UgYF8uaXNFcXVhbGAgZXhjZXB0IHRoYXQgaXQgYWNjZXB0cyBgY3VzdG9taXplcmAgd2hpY2gK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AgICAgICAgICogICBpZiAoaXNHcmVldGluZyhvYmpWYWx1ZSkgJiYgaXNHcmVldGluZyhvdGhWYWx1ZSkpIHsKICAgICAgICAgKiAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICogICB9CiAgICAgICAgICogfQogICAgICAgICAqCiAgICAgICAgICogdmFyIGFycmF5ID0gWydoZWxsbycsICdnb29kYnllJ107CiAgICAgICAgICogdmFyIG90aGVyID0gWydoaScsICdnb29kYnllJ107CiAgICAgICAgICoKICAgICAgICAgKiBfLmlzRXF1YWxXaXRoKGFycmF5LCBvdGhlciwgY3VzdG9taXplcik7CiAgICAgICAgICogLy8gPT4gdHJ1ZQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGlzRXF1YWxXaXRoKHZhbHVlLCBvdGhlciwgY3VzdG9taXplcikgewogICAgICAgICAgY3VzdG9taXplciA9IHR5cGVvZiBjdXN0b21pemVyID09ICdmdW5jdGlvbicgPyBjdXN0b21pemVyIDogdW5kZWZpbmVkJDE7CiAgICAgICAgICB2YXIgcmVzdWx0ID0gY3VzdG9taXplciA/IGN1c3RvbWl6ZXIodmFsdWUsIG90aGVyKSA6IHVuZGVmaW5lZCQxOwogICAgICAgICAgcmV0dXJuIHJlc3VsdCA9PT0gdW5kZWZpbmVkJDEgPyBiYXNlSXNFcXVhbCh2YWx1ZSwgb3RoZXIsIHVuZGVmaW5lZCQxLCBjdXN0b21pemVyKSA6ICEhcmVzdWx0OwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ2hlY2tzIGlmIGB2YWx1ZWAgaXMgYW4gYEVycm9yYCwgYEV2YWxFcnJvcmAsIGBSYW5nZUVycm9yYCwgYFJlZmVyZW5jZUVycm9yYCwKICAgICAgICAgKiBgU3ludGF4RXJyb3JgLCBgVHlwZUVycm9yYCwgb3IgYFVSSUVycm9yYCBvYmplY3QuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgMy4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgTGFuZwogICAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIGNoZWNrLgogICAgICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiBgdmFsdWVgIGlzIGFuIGVycm9yIG9iamVjdCwgZWxzZSBgZmFsc2VgLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLmlzRXJyb3IobmV3IEVycm9yKTsKICAgICAgICAgKiAvLyA9PiB0cnVlCiAgICAgICAgICoKICAgICAgICAgKiBfLmlzRXJyb3IoRXJyb3IpOwogICAgICAgICAqIC8vID0+IGZhbHNlCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gaXNFcnJvcih2YWx1ZSkgewogICAgICAgICAgaWYgKCFpc09iamVjdExpa2UodmFsdWUpKSB7CiAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgIH0KICAgICAgICAgIHZhciB0YWcgPSBiYXNlR2V0VGFnKHZhbHVlKTsKICAgICAgICAgIHJldHVybiB0YWcgPT0gZXJyb3JUYWcgfHwgdGFnID09IGRvbUV4Y1RhZyB8fAogICAgICAgICAgICAodHlwZW9mIHZhbHVlLm1lc3NhZ2UgPT0gJ3N0cmluZycgJiYgdHlwZW9mIHZhbHVlLm5hbWUgPT0gJ3N0cmluZycgJiYgIWlzUGxhaW5PYmplY3QodmFsdWUpKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENoZWNrcyBpZiBgdmFsdWVgIGlzIGEgZmluaXRlIHByaW1pdGl2ZSBudW1iZXIuCiAgICAgICAgICoKICAgICAgICAgKiAqKk5vdGU6KiogVGhpcyBtZXRob2QgaXMgYmFzZWQgb24KICAgICAgICAgKiBbYE51bWJlci5pc0Zpbml0ZWBdKGh0dHBzOi8vbWRuLmlvL051bWJlci9pc0Zpbml0ZSkuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgMC4xLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgTGFuZwogICAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIGNoZWNrLgogICAgICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiBgdmFsdWVgIGlzIGEgZmluaXRlIG51bWJlciwgZWxzZSBgZmFsc2VgLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLmlzRmluaXRlKDMpOwogICAgICAgICAqIC8vID0+IHRydWUKICAgICAgICAgKgogICAgICAgICAqIF8uaXNGaW5pdGUoTnVtYmVyLk1JTl9WQUxVRSk7CiAgICAgICAgICogLy8gPT4gdHJ1ZQogICAgICAgICAqCiAgICAgICAgICogXy5pc0Zpbml0ZShJbmZpbml0eSk7CiAgICAgICAgICogLy8gPT4gZmFsc2UKICAgICAgICAgKgogICAgICAgICAqIF8uaXNGaW5pdGUoJzMnKTsKICAgICAgICAgKiAvLyA9PiBmYWxzZQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGlzRmluaXRlKHZhbHVlKSB7CiAgICAgICAgICByZXR1cm4gdHlwZW9mIHZhbHVlID09ICdudW1iZXInICYmIG5hdGl2ZUlzRmluaXRlKHZhbHVlKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENoZWNrcyBpZiBgdmFsdWVgIGlzIGNsYXNzaWZpZWQgYXMgYSBgRnVuY3Rpb25gIG9iamVjdC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAwLjEuMAogICAgICAgICAqIEBjYXRlZ29yeSBMYW5nCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUa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Jlci9pc0ludGVnZXIpLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDQuMC4wCiAgICAgICAgICogQGNhdGVnb3J5IExhbmcKICAgICAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBjaGVjay4KICAgICAgICAgKiBAcmV0dXJucyB7Ym9vbGVhbn0gUmV0dXJucyBgdHJ1ZWAgaWYgYHZhbHVlYCBpcyBhbiBpbnRlZ2VyLCBlbHNlIGBmYWxzZWAuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8uaXNJbnRlZ2VyKDMpOwogICAgICAgICAqIC8vID0+IHRydWUKICAgICAgICAgKgogICAgICAgICAqIF8uaXNJbnRlZ2VyKE51bWJlci5NSU5fVkFMVUUpOwogICAgICAgICAqIC8vID0+IGZhbHNlCiAgICAgICAgICoKICAgICAgICAgKiBfLmlzSW50ZWdlcihJbmZpbml0eSk7CiAgICAgICAgICogLy8gPT4gZmFsc2UKICAgICAgICAgKgogICAgICAgICAqIF8uaXNJbnRlZ2VyKCczJyk7CiAgICAgICAgICogLy8gPT4gZmFsc2UKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBpc0ludGVnZXIodmFsdWUpIHsKICAgICAgICAgIHJldHVybiB0eXBlb2YgdmFsdWUgPT0gJ251bWJlcicgJiYgdmFsdWUgPT0gdG9JbnRlZ2VyKHZhbHVlKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENoZWNrcyBpZiBgdmFsdWVgIGlzIGEgdmFsaWQgYXJyYXktbGlrZSBsZW5ndGguCiAgICAgICAgICoKICAgICAgICAgKiAqKk5vdGU6KiogVGhpcyBtZXRob2QgaXMgbG9vc2VseSBiYXNlZCBvbgogICAgICAgICAqIFtgVG9MZW5ndGhgXShodHRwOi8vZWNtYS1pbnRlcm5hdGlvbmFsLm9yZy9lY21hLTI2Mi83LjAvI3NlYy10b2xlbmd0aCkuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgTGFuZwogICAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIGNoZWNrLgogICAgICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiBgdmFsdWVgIGlzIGEgdmFsaWQgbGVuZ3RoLCBlbHNlIGBmYWxzZWAuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8uaXNMZW5ndGgoMyk7CiAgICAgICAgICogLy8gPT4gdHJ1ZQogICAgICAgICAqCiAgICAgICAgICogXy5pc0xlbmd0aChOdW1iZXIuTUlOX1ZBTFVFKTsKICAgICAgICAgKiAvLyA9PiBmYWxzZQogICAgICAgICAqCiAgICAgICAgICogXy5pc0xlbmd0aChJbmZpbml0eSk7CiAgICAgICAgICogLy8gPT4gZmFsc2UKICAgICAgICAgKgogICAgICAgICAqIF8uaXNMZW5ndGgoJzMnKTsKICAgICAgICAgKiAvLyA9PiBmYWxzZQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGlzTGVuZ3RoKHZhbHVlKSB7CiAgICAgICAgICByZXR1cm4gdHlwZW9mIHZhbHVlID09ICdudW1iZXInICYmCiAgICAgICAgICAgIHZhbHVlID4gLTEgJiYgdmFsdWUgJSAxID09IDAgJiYgdmFsdWUgPD0gTUFYX1NBRkVfSU5URUdFUjsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENoZWNrcyBpZiBgdmFsdWVgIGlzIHRoZQogICAgICAgICAqIFtsYW5ndWFnZSB0eXBlXShodHRwOi8vd3d3LmVjbWEtaW50ZXJuYXRpb25hbC5vcmcvZWNtYS0yNjIvNy4wLyNzZWMtZWNtYXNjcmlwdC1sYW5ndWFnZS10eXBlcykKICAgICAgICAgKiBvZiBgT2JqZWN0YC4gKGUuZy4gYXJyYXlzLCBmdW5jdGlvbnMsIG9iamVjdHMsIHJlZ2V4ZXMsIGBuZXcgTnVtYmVyKDApYCwgYW5kIGBuZXcgU3RyaW5nKCcnKWApCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgMC4xLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgTGFuZwogICAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIGNoZWNrLgogICAgICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiBgdmFsdWVgIGlzIGFuIG9iamVjdCwgZWxzZSBgZmFsc2VgLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLmlzT2JqZWN0KHt9KTsKICAgICAgICAgKiAvLyA9PiB0cnVlCiAgICAgICAgICoKICAgICAgICAgKiBfLmlzT2JqZWN0KFsxLCAyLCAzXSk7CiAgICAgICAgICogLy8gPT4gdHJ1ZQogICAgICAgICAqCiAgICAgICAgICogXy5pc09iamVjdChfLm5vb3ApOwogICAgICAgICAqIC8vID0+IHRydWUKICAgICAgICAgKgogICAgICAgICAqIF8uaXNPYmplY3QobnVsbCk7CiAgICAgICAgICogLy8gPT4gZmFsc2UKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBpc09iamVjdCh2YWx1ZSkgewogICAgICAgICAgdmFyIHR5cGUgPSB0eXBlb2YgdmFsdWU7CiAgICAgICAgICByZXR1cm4gdmFsdWUgIT0gbnVsbCAmJiAodHlwZSA9PSAnb2JqZWN0JyB8fCB0eXBlID09ICdmdW5jdGlvbicpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ2hlY2tzIGlmIGB2YWx1ZWAgaXMgb2JqZWN0LWxpa2UuIEEgdmFsdWUgaXMgb2JqZWN0LWxpa2UgaWYgaXQncyBub3QgYG51bGxgCiAgICAgICAgICogYW5kIGhhcyBhIGB0eXBlb2ZgIHJlc3VsdCBvZiAib2JqZWN0Ii4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSA0LjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBMYW5nCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gY2hlY2suCiAgICAgICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIGB2YWx1ZWAgaXMgb2JqZWN0LWxpa2UsIGVsc2UgYGZhbHNlYC4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy5pc09iamVjdExpa2Uoe30pOwogICAgICAgICAqIC8vID0+IHRydWUKICAgICAgICAgKgogICAgICAgICAqIF8uaXNPYmplY3RMaWtlKFsxLCAyLCAzXSk7CiAgICAgICAgICogLy8gPT4gdHJ1ZQogICAgICAgICAqCiAgICAgICAgICogXy5pc09iamVjdExpa2UoXy5ub29wKTsKICAgICAgICAgKiAvLyA9PiBmYWxzZQogICAgICAgICAqCiAgICAgICAgICogXy5pc09iamVjdExpa2UobnVsbCk7CiAgICAgICAgICogLy8gPT4gZmFsc2UKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBpc09iamVjdExpa2UodmFsdWUpIHsKICAgICAgICAgIHJldHVybiB2YWx1ZSAhPSBudWxsICYmIHR5cGVvZiB2YWx1ZSA9PSAnb2JqZWN0JzsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENoZWNrcyBpZiBgdmFsdWVgIGlzIGNsYXNzaWZpZWQgYXMgYSBgTWFwYCBvYmplY3QuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC4zLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgTGFuZwogICAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIGNoZWNrLgogICAgICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiBgdmFsdWVgIGlzIGEgbWFwLCBlbHNlIGBmYWxzZWAuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8uaXNNYXAobmV3IE1hcCk7CiAgICAgICAgICogLy8gPT4gdHJ1ZQogICAgICAgICAqCiAgICAgICAgICogXy5pc01hcChuZXcgV2Vha01hcCk7CiAgICAgICAgICogLy8gPT4gZmFsc2UKICAgICAgICAgKi8KICAgICAgICB2YXIgaXNNYXAgPSBub2RlSXNNYXAgPyBiYXNlVW5hcnkobm9kZUlzTWFwKSA6IGJhc2VJc01hcDsKCiAgICAgICAgLyoqCiAgICAgICAgICogUGVyZm9ybXMgYSBwYXJ0aWFsIGRlZXAgY29tcGFyaXNvbiBiZXR3ZWVuIGBvYmplY3RgIGFuZCBgc291cmNlYCB0bwogICAgICAgICAqIGRldGVybWluZSBpZiBgb2JqZWN0YCBjb250YWlucyBlcXVpdmFsZW50IHByb3BlcnR5IHZhbHVlcy4KICAgICAgICAgKgogICAgICAgICAqICoqTm90ZToqKiBUaGlzIG1ldGhvZCBpcyBlcXVpdmFsZW50IHRvIGBfLm1hdGNoZXNgIHdoZW4gYHNvdXJjZWAgaXMKICAgICAgICAgKiBwYXJ0aWFsbHkgYXBwbGllZC4KICAgICAgICAgKgogICAgICAgICAqIFBhcnRpYWwgY29tcGFyaXNvbnMgd2lsbCBtYXRjaCBlbXB0eSBhcnJheSBhbmQgZW1wdHkgb2JqZWN0IGBzb3VyY2VgCiAgICAgICAgICogdmFsdWVzIGFnYWluc3QgYW55IGFycmF5IG9yIG9iamVjdCB2YWx1ZSwgcmVzcGVjdGl2ZWx5LiBTZWUgYF8uaXNFcXVhbGAKICAgICAgICAgKiBmb3IgYSBsaXN0IG9mIHN1cHBvcnRlZCB2YWx1ZSBjb21wYXJpc29ucy4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAzLjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBMYW5nCiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IG9iamVjdCBUaGUgb2JqZWN0IHRvIGluc3BlY3QuCiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IHNvdXJjZSBUaGUgb2JqZWN0IG9mIHByb3BlcnR5IHZhbHVlcyB0byBtYXRjaC4KICAgICAgICAgKiBAcmV0dXJucyB7Ym9vbGVhbn0gUmV0dXJucyBgdHJ1ZWAgaWYgYG9iamVjdGAgaXMgYSBtYXRjaCwgZWxzZSBgZmFsc2VgLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiB2YXIgb2JqZWN0ID0geyAnYSc6IDEsICdiJzogMiB9OwogICAgICAgICAqCiAgICAgICAgICogXy5pc01hdGNoKG9iamVjdCwgeyAnYic6IDIgfSk7CiAgICAgICAgICogLy8gPT4gdHJ1ZQogICAgICAgICAqCiAgICAgICAgICogXy5pc01hdGNoKG9iamVjdCwgeyAnYic6IDEgfSk7CiAgICAgICAgICogLy8gPT4gZmFsc2UKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBpc01hdGNoKG9iamVjdCwgc291cmNlKSB7CiAgICAgICAgICByZXR1cm4gb2JqZWN0ID09PSBzb3VyY2UgfHwgYmFzZUlzTWF0Y2gob2JqZWN0LCBzb3VyY2UsIGdldE1hdGNoRGF0YShzb3VyY2UpKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFRoaXMgbWV0aG9kIGlzIGxpa2UgYF8uaXNNYXRjaGAgZXhjZXB0IHRoYXQgaXQgYWNjZXB0cyBgY3VzdG9taXplcmAgd2hpY2gKICAgICAgICAgKiBpcyBpbnZva2VkIHRvIGNvbXBhcmUgdmFsdWVzLiBJZiBgY3VzdG9taXplcmAgcmV0dXJucyBgdW5kZWZpbmVkYCwgY29tcGFyaXNvbnMKICAgICAgICAgKiBhcmUgaGFuZGxlZCBieSB0aGUgbWV0aG9kIGluc3RlYWQuIFRoZSBgY3VzdG9taXplcmAgaXMgaW52b2tlZCB3aXRoIGZpdmUKICAgICAgICAgKiBhcmd1bWVudHM6IChvYmpWYWx1ZSwgc3JjVmFsdWUsIGluZGV4fGtleSwgb2JqZWN0LCBzb3VyY2UpLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDQuMC4wCiAgICAgICAgICogQGNhdGVnb3J5IExhbmcKICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBvYmplY3QgdG8gaW5zcGVjdC4KICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gc291cmNlIFRoZSBvYmplY3Qgb2YgcHJvcGVydHkgdmFsdWVzIHRvIG1hdGNoLgogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IFtjdXN0b21pemVyXSBUaGUgZnVuY3Rpb24gdG8gY3VzdG9taXplIGNvbXBhcmlzb25zLgogICAgICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiBgb2JqZWN0YCBpcyBhIG1hdGNoLCBlbHNlIGBmYWxzZWAuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIGZ1bmN0aW9uIGlzR3JlZXRpbmcodmFsdWUpIHsKICAgICAgICAgKiAgIHJldHVybiAvXmgoPzppfGVsbG8pJC8udGVzdCh2YWx1ZSk7CiAgICAgICAgICogfQogICAgICAgICAqCiAgICAgICAgICogZnVuY3Rpb24gY3VzdG9taXplcihvYmpWYWx1Z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ICAgICAqIGB1bmRlZmluZWRgIGFuZCBvdGhlciBub24tbnVtYmVyIHZhbHVlcy4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAwLjEuMAogICAgICAgICAqIEBjYXRlZ29yeSBMYW5nCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gY2hlY2suCiAgICAgICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIGB2YWx1ZWAgaXMgYE5hTmAsIGVsc2UgYGZhbHNlYC4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy5pc05hTihOYU4pOwogICAgICAgICAqIC8vID0+IHRydWUKICAgICAgICAgKgogICAgICAgICAqIF8uaXNOYU4obmV3IE51bWJlcihOYU4pKTsKICAgICAgICAgKiAvLyA9PiB0cnVlCiAgICAgICAgICoKICAgICAgICAgKiBpc05hTih1bmRlZmluZWQpOwogICAgICAgICAqIC8vID0+IHRydWUKICAgICAgICAgKgogICAgICAgICAqIF8uaXNOYU4odW5kZWZpbmVkKTsKICAgICAgICAgKiAvLyA9PiBmYWxzZQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGlzTmFOKHZhbHVlKSB7CiAgICAgICAgICAvLyBBbiBgTmFOYCBwcmltaXRpdmUgaXMgdGhlIG9ubHkgdmFsdWUgdGhhdCBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgogICAgICAgICAgLy8gUGVyZm9ybSB0aGUgYHRvU3RyaW5nVGFnYCBjaGVjayBmaXJzdCB0byBhdm9pZCBlcnJvcnMgd2l0aCBzb21lCiAgICAgICAgICAvLyBBY3RpdmVYIG9iamVjdHMgaW4gSUUuCiAgICAgICAgICByZXR1cm4gaXNOdW1iZXIodmFsdWUpICYmIHZhbHVlICE9ICt2YWx1ZTsKICAgICAgICB9CgogICAgICAgIC8qK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WVgIGlzIGEgbmF0aXZlIGZ1bmN0aW9uLAogICAgICAgICAqICBlbHNlIGBmYWxzZWAuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8uaXNOYXRpdmUoQXJyYXkucHJvdG90eXBlLnB1c2gpOwogICAgICAgICAqIC8vID0+IHRydWUKICAgICAgICAgKgogICAgICAgICAqIF8uaXNOYXRpdmUoXyk7CiAgICAgICAgICogLy8gPT4gZmFsc2UKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBpc05hdGl2ZSh2YWx1ZSkgewogICAgICAgICAgaWYgKGlzTWFza2FibGUodmFsdWUpKSB7CiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihDT1JFX0VSUk9SX1RFWFQpOwogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIGJhc2VJc05hdGl2ZSh2YWx1ZSk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDaGVja3MgaWYgYHZhbHVlYCBpcyBgbnVsbGAuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgMC4xLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgTGFuZwogICAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIGNoZWNrLgogICAgICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiBgdmFsdWVgIGlzIGBudWxsYCwgZWxzZSBgZmFsc2VgLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLmlzTnVsbChudWxsKTsKICAgICAgICAgKiAvLyA9PiB0cnVlCiAgICAgICAgICoKICAgICAgICAgKiBfLmlzTnVsbCh2b2lkIDApOwogICAgICAgICAqIC8vID0+IGZhbHNlCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gaXNOdWxsKHZhbHVlKSB7CiAgICAgICAgICByZXR1cm4gdmFsdWUgPT09IG51bGw7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDaGVja3MgaWYgYHZhbHVlYCBpcyBgbnVsbGAgb3IgYHVuZGVmaW5lZGAuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgTGFuZwogICAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIGNoZWNrLgogICAgICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiBgdmFsdWVgIGlzIG51bGxpc2gsIGVsc2UgYGZhbHNlYC4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy5pc05pbChudWxsKTsKICAgICAgICAgKiAvLyA9PiB0cnVlCiAgICAgICAgICoKICAgICAgICAgKiBfLmlzTmlsKHZvaWQgMCk7CiAgICAgICAgICogLy8gPT4gdHJ1ZQogICAgICAgICAqCiAgICAgICAgICogXy5pc05pbChOYU4pOwogICAgICAgICAqIC8vID0+IGZhbHNlCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gaXNOaWwodmFsdWUpIHsKICAgICAgICAgIHJldHVybiB2YWx1ZSA9PSBudWxsOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ2hlY2tzIGlmIGB2YWx1ZWAgaXMgY2xhc3NpZmllZCBhcyBhIGBOdW1iZXJgIHByaW1pdGl2ZSBvciBvYmplY3QuCiAgICAgICAgICoKICAgICAgICAgKiAqKk5vdGU6KiogVG8gZXhjbHVkZSBgSW5maW5pdHlgLCBgLUluZmluaXR5YCwgYW5kIGBOYU5gLCB3aGljaCBhcmUKICAgICAgICAgKiBjbGFzc2lmaWVkIGFzIG51bWJlcnMsIHVzZSB0aGUgYF8uaXNGaW5pdGVgIG1ldGhvZC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAwLjEuMAogICAgICAgICAqIEBjYXRlZ29yeSBMYW5nCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gY2hlY2suCiAgICAgICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIGB2YWx1ZWAgaXMgYSBudW1iZXIsIGVsc2UgYGZhbHNlYC4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy5pc051bWJlcigzKTsKICAgICAgICAgKiAvLyA9PiB0cnVlCiAgICAgICAgICoKICAgICAgICAgKiBfLmlzTnVtYmVyKE51bWJlci5NSU5fVkFMVUUpOwogICAgICAgICAqIC8vID0+IHRydWUKICAgICAgICAgKgogICAgICAgICAqIF8uaXNOdW1iZXIoSW5maW5pdHkpOwogICAgICAgICAqIC8vID0+IHRydWUKICAgICAgICAgKgogICAgICAgICAqIF8uaXNOdW1iZXIoJzMnKTsKICAgICAgICAgKiAvLyA9PiBmYWxzZQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGlzTnVtYmVyKHZhbHVlKSB7CiAgICAgICAgICByZXR1cm4gdHlwZW9mIHZhbHVlID09ICdudW1iZXInIHx8CiAgICAgICAgICAgIChpc09iamVjdExpa2UodmFsdWUpICYmIGJhc2VHZXRUYWcodmFsdWUpID09IG51bWJlclRhZyk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDaGVja3MgaWYgYHZhbHVlYCBpcyBhIHBsYWluIG9iamVjdCwgdGhhdCBpcywgYW4gb2JqZWN0IGNyZWF0ZWQgYnkgdGhlCiAgICAgICAgICogYE9iamVjdGAgY29uc3RydWN0b3Igb3Igb25lIHdpdGggYSBgW1tQcm90b3R5cGVdXWAgb2YgYG51bGxgLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDAuOC4wCiAgICAgICAgICogQGNhdGVnb3J5IExhbmcKICAgICAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBjaGVjay4KICAgICAgICAgKiBAcmV0dXJucyB7Ym9vbGVhbn0gUmV0dXJucyBgdHJ1ZWAgaWYgYHZhbHVlYCBpcyBhIHBsYWluIG9iamVjdCwgZWxzZSBgZmFsc2VgLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBmdW5jdGlvbiBGb28oKSB7CiAgICAgICAgICogICB0aGlzLmEgPSAxOwogICAgICAgICAqIH0KICAgICAgICAgKgogICAgICAgICAqIF8uaXNQbGFpbk9iamVjdChuZXcgRm9vKTsKICAgICAgICAgKiAvLyA9PiBmYWxzZQogICAgICAgICAqCiAgICAgICAgICogXy5pc1BsYWluT2JqZWN0KFsxLCAyLCAzXSk7CiAgICAgICAgICogLy8gPT4gZmFsc2UKICAgICAgICAgKgogICAgICAgICAqIF8uaXNQbGFpbk9iamVjdCh7ICd4JzogMCwgJ3knOiAwIH0pOwogICAgICAgICAqIC8vID0+IHRydWUKICAgICAgICAgKgogICAgICAgICAqIF8uaXNQbGFpbk9iamVjdChPYmplY3QuY3JlYXRlKG51bGwpKTsKICAgICAgICAgKiAvLyA9PiB0cnVlCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gaXNQbGFpbk9iamVjdCh2YWx1ZSkgewogICAgICAgICAgaWYgKCFpc09iamVjdExpa2UodmFsdWUpIHx8IGJhc2VHZXRUYWcodmFsdWUpICE9IG9iamVjdFRhZykgewogICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICB9CiAgICAgICAgICB2YXIgcHJvdG8gPSBnZXRQcm90b3R5cGUodmFsdWUpOwogICAgICAgICAgaWYgKHByb3RvID09PSBudWxsKSB7CiAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgfQogICAgICAgICAgdmFyIEN0b3IgPSBoYXNPd25Qcm9wZXJ0eS5jYWxsKHByb3RvLCAnY29uc3RydWN0b3InKSAmJiBwcm90by5jb25zdHJ1Y3RvcjsKICAgICAgICAgIHJldHVybiB0eXBlb2YgQ3RvciA9PSAnZnVuY3Rpb24nICYmIEN0b3IgaW5zdGFuY2VvZiBDdG9yICYmCiAgICAgICAgICAgIGZ1bmNUb1N0cmluZy5jYWxsKEN0b3IpID09IG9iamVjdEN0b3JTdHJpbmc7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDaGVja3MgaWYgYHZhbHVlYCBpcyBjbGFzc2lmaWVkIGFzIGEgYFJlZ0V4cGAgb2JqZWN0LgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDAuMS4wCiAgICAgICAgICogQGNhdGVnb3J5IExhbmcKICAgICAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBjaGVjay4KICAgICAgICAgKiBAcmV0dXJucyB7Ym9vbGVhbn0gUmV0dXJucyBgdHJ1ZWAgaWYgYHZhbHVlYCBpcyBhIHJlZ2V4cCwgZWxzZSBgZmFsc2VgLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLmlzUmVnRXhwKC9hYmMvKTsKICAgICAgICAgKiAvLyA9PiB0cnVlCiAgICAgICAgICoKICAgICAgICAgKiBfLmlzUmVnRXhwKCcvYWJjLycpOwogICAgICAgICAqIC8vID0+IGZhbHNlCiAgICAgICAgICovCiAgICAgICAgdmFyIGlzUmVnRXhwID0gbm9kZUlzUmVnRXhwID8gYmFzZVVuYXJ5KG5vZGVJc1JlZ0V4cCkgOiBiYXNlSXNSZWdFeHA7CgogICAgICAgIC8qKgogICAgICAgICAqIENoZWNrcyBpZiBgdmFsdWVgIGlzIGEgc2FmZSBpbnRlZ2VyLiBBbiBpbnRlZ2VyIGlzIHNhZmUgaWYgaXQncyBhbiBJRUVFLTc1NAogICAgICAgICAqIGRvdWJsZSBwcmVjaXNpb24gbnVtYmVyIHdoaWNoIGlzbid0IHRoZSByZXN1bHQgb2YgYSByb3VuZGVkIHVuc2FmZSBpbnRlZ2VyLgogICAgICAgICAqCiAgICAgICAgICogKipOb3RlOioqIFRoaXMgbWV0aG9kIGlzIGJhc2VkIG9uCiAgICAgICAgICogW2BOdW1iZXIuaXNTYWZlSW50ZWdlcmBdKGh0dHBzOi8vbWRuLmlvL051bWJlci9pc1NhZmVJbnRlZ2VyKS4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSA0LjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBMYW5nCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gY2hlY2suCiAgICAgICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIGB2YWx1ZWAgaXMgYSBzYWZlIGludGVnZXIsIGVsc2UgYGZhbHNlYC4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy5pc1NhZmVJbnRlZ2VyKDMpOwogICAgICAgICAqIC8vID0+IHRydWUKICAgICAgICAgKgogICAgICAgICAqIF8uaXNTYWZlSW50ZWdlcihOdW1iZXIuTUlOX1ZBTFVFKTsKICAgICAgICAgKiAvLyA9PiBmYWxzZQogICAgICAgICAqCiAgICAgICAgICogXy5pc1NhZmVJbnRlZ2VyKEluZmluaXR5KTsKICAgICAgICAgKiAvLyA9PiBmYWxzZQogICAgICAgICAqCiAgICAgICAgICogXy5pc1NhZmVJbnRlZ2VyKCczJyk7CiAgICAgICAgICogLy8gPT4gZmFsc2UKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBpc1NhZmVJbnRlZ2VyKHZhbHVlKSB7CiAgICAgICAgICByZXR1cm4gaXNJbnRlZ2VyKHZhbHVlKSAmJiB2YWx1ZSA+PSAtTUFYX1NBRkVfSU5URUdFUiAmJiB2YWx1ZSA8PSBNQVhfU0FGRV9JTlRFR0VSOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ2hlY2tzIGlmIGB2YWx1ZWAgaXMgY2xhc3NpZmllZCBhcyBhIGBTZXRgIG9iamVjdC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSA0LjMuMAogICAgICAgICAqIEBjYXRlZ29yeSBMYW5nCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gY2hlY2suCiAgICAgICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIGB2YWx1ZWAgaXMgYSBzZXQsIGVsc2UgYGZhbHNlYC4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy5pc1NldChuZXcgU2V0KTsKICAgICAgICAgKiAvLyA9PiB0cnVlCiAgICAgICAgICoKICAgICAgICAgKiBfLmlzU2V0KG5ldyBXZWFrU2V0KTsKICAgICAgICAgKiAvLyA9PiBmYWxzZQogICAgICAgICAqLwogICAgICAgIHZhciBpc1NldCA9IG5vZGVJc1NldCA/IGJhc2VVbmFyeShub2RlSXNTZXQpIDogYmFzZUlzU2V0OwoKICAgICAgICAvKioKICAgICAgICAgKiBDaGVja3MgaWYgYHZhbHVlYCBpcyBjbGFzc2lmaWVkIGFzIGEgYFN0cmluZ2AgcHJpbWl0aXZlIG9yIG9iamVjdC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAc2luY2UgMC4xLjAKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBjYXRlZ29yeSBMYW5nCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gY2hlY2suCiAgICAgICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIGB2YWx1ZWAgaXMgYSBzdHJpbmcsIGVsc2UgYGZhbHNlYC4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy5pc1N0cmluZygnYWJjJyk7CiAgICAgICAgICogLy8gPT4gdHJ1ZQogICAgICAgICAqCiAgICAgICAgICogXy5pc1N0cmluZygxKTsKICAgICAgICAgKiAvLyA9PiBmYWxzZQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGlzU3RyaW5nKHZhbHVlKSB7CiAgICAgICAgICByZXR1cm4gdHlwZW9mIHZhbHVlID09ICdzdHJpbmcnIHx8CiAgICAgICAgICAgICghaXNBcnJheSh2YWx1ZSkgJiYgaXNPYmplY3RMaWtlKHZhbHVlKSAmJiBiYXNlR2V0VGFnKHZhbHVlKSA9PSBzdHJpbmdUYWcpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ2hlY2tzIGlmIGB2YWx1ZWAgaXMgY2xhc3NpZmllZCBhcyBhIGBTeW1ib2xgIHByaW1pdGl2ZSBvciBvYmplY3QuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgTGFuZwogICAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIGNoZWNrLgogICAgICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiBgdmFsdWVgIGlzIGEgc3ltYm9sLCBlbHNlIGBmYWxzZWAuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8uaXNTeW1ib2woU3ltYm9sLml0ZXJhdG9yKTsKICAgICAgICAgKiAvLyA9PiB0cnVlCiAgICAgICAgICoKICAgICAgICAgKiBfLmlzU3ltYm9sKCdhYmMnKTsKICAgICAgICAgKiAvLyA9PiBmYWxzZQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGlzU3ltYm9sKHZhbHVlKSB7CiAgICAgICAgICByZXR1cm4gdHlwZW9mIHZhbHVlID09ICdzeW1ib2wnIHx8CiAgICAgICAgICAgIChpc09iamVjdExpa2UodmFsdWUpICYmIGJhc2VHZXRUYWcodmFsdWUpID09IHN5bWJvbFRhZyk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDaGVja3MgaWYgYHZhbHVlYCBpcyBjbGFzc2lmaWVkIGFzIGEgdHlwZWQgYXJyYXkuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgMy4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgTGFuZwogICAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIGNoZWNrLgogICAgICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiBgdmFsdWVgIGlzIGEgdHlwZWQgYXJyYXksIGVsc2UgYGZhbHNlYC4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy5pc1R5cGVkQXJyYXkobmV3IFVpbnQ4QXJyYXkpOwogICAgICAgICAqIC8vID0+IHRydWUKICAgICAgICAgKgogICAgICAgICAqIF8uaXNUeXBlZEFycmF5KFtdKTsKICAgICAgICAgKiAvLyA9PiBmYWxzZQogICAgICAgICAqLwogICAgICAgIHZhciBpc1R5cGVkQXJyYXkgPSBub2RlSXNUeXBlZEFycmF5ID8gYmFzZVVuYXJ5KG5vZGVJc1R5cGVkQXJyYXkpIDogYmFzZUlzVHlwZWRBcnJheTsKCiAgICAgICAgLyoqCiAgICAgICAgICogQ2hlY2tzIGlmIGB2YWx1ZWAgaXMgYHVuZGVmaW5lZGAuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQHNpbmNlIDAuMS4wCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAY2F0ZWdvcnkgTGFuZwogICAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIGNoZWNrLgogICAgICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiBgdmFsdWVgIGlzIGB1bmRlZmluZWRgLCBlbHNlIGBmYWxzZWAuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8uaXNVbmRlZmluZWQodm9pZCAwKTsKICAgICAgICAgKiAvLyA9PiB0cnVlCiAgICAgICAgICoKICAgICAgICAgKiBfLmlzVW5kZWZpbmVkKG51bGwpOwogICAgICAgICAqIC8vID0+IGZhbHNlCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gaXNVbmRlZmluZWQodmFsdWUpIHsKICAgICAgICAgIHJldHVybiB2YWx1ZSA9PT0gdW5kZWZpbmVkJDE7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDaGVja3MgaWYgYHZhbHVlYCBpcyBjbGFzc2lmaWVkIGFzIGEgYFdlYWtNYXBgIG9iamVjdC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSA0LjMuMAogICAgICAgICAqIEBjYXRlZ29yeSBMYW5nCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gY2hlY2suCiAgICAgICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIGB2YWx1ZWAgaXMgYSB3ZWFrIG1hcCwgZWxzZSBgZmFsc2VgLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLmlzV2Vha01hcChuZXcgV2Vha01hcCk7CiAgICAgICAgICogLy8gPT4gdHJ1ZQogICAgICAgICAqCiAgICAgICAgICogXy5pc1dlYWtNYXAobmV3IE1hcCk7CiAgICAgICAgICogLy8gPT4gZmFsc2UKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBpc1dlYWtNYXAodmFsdWUpIHsKICAgICAgICAgIHJldHVybiBpc09iamVjdExpa2UodmFsdWUpICYmIGdldFRhZyh2YWx1ZSkgPT0gd2Vha01hcFRhZzsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENoZWNrcyBpZiBgdmFsdWVgIGlzIGNsYXNzaWZpZWQgYXMgYSBgV2Vha1NldGAgb2JqZWN0LgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDQuMy4wCiAgICAgICAgICogQGNhdGVnb3J5IExhbmcKICAgICAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBjaGVjay4KICAgICAgICAgKiBAcmV0dXJucyB7Ym9vbGVhbn0gUmV0dXJucyBgdHJ1ZWAgaWYgYHZhbHVlYCBpcyBhIHdlYWsgc2V0LCBlbHNlIGBmYWxzZWAuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8uaXNXZWFrU2V0KG5ldyBXZWFrU2V0KTsKICAgICAgICAgKiAvLyA9PiB0cnVlCiAgICAgICAgICoKICAgICAgICAgKiBfLmlzV2Vha1NldChuZXcgU2V0KTsKICAgICAgICAgKiAvLyA9PiBmYWxzZQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGlzV2Vha1NldCh2YWx1ZSkgewogICAgICAgICAgcmV0dXJuIGlzT2JqZWN0TGlrZSh2YWx1ZSkgJiYgYmFzZUdldFRhZyh2YWx1ZSkgPT0gd2Vha1NldFRhZzsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENoZWNrcyBpZiBgdmFsdWVgIGlzIGxlc3MgdGhhbiBgb3RoZXJgLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDMuOS4wCiAgICAgICAgICogQGNhdGVnb3J5IExhbmcKICAgICAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBjb21wYXJlLgogICAgICAgICAqIEBwYXJhbSB7Kn0gb3RoZXIgVGhlIG90aGVyIHZhbHVlIHRvIGNvbXBhcmUuCiAgICAgICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIGB2YWx1ZWAgaXMgbGVzcyB0aGFuIGBvdGhlcmAsCiAgICAgICAgICogIGVsc2UgYGZhbHNlYC4KICAgICAgICAgKiBAc2VlIF8uZ3QKICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy5sdCgxLCAzKTsKICAgICAgICAgKiAvLyA9PiB0cnVlCiAgICAgICAgICoKICAgICAgICAgKiBfLmx0KDMsIDMpOwogICAgICAgICAqIC8vID0+IGZhbHNlCiAgICAgICAgICoKICAgICAgICAgKiBfLmx0KDMsIDEpOwogICAgICAgICAqIC8vID0+IGZhbHNlCiAgICAgICAgICovCiAgICAgICAgdmFyIGx0ID0gY3JlYXRlUmVsYXRpb25hbE9wZXJhdGlvbihiYXNlTHQpOwoKICAgICAgICAvKioKICAgICAgICAgKiBDaGVja3MgaWYgYHZhbHVlYCBpcyBsZXNzIHRoYW4gb3IgZXF1YWwgdG8gYG90aGVyYC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAzLjkuMAogICAgICAgICAqIEBjYXRlZ29yeSBMYW5nCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gY29tcGFyZS4KICAgICAgICAgKiBAcGFyYW0geyp9IG90aGVyIFRoZSBvdGhlciB2YWx1ZSB0byBjb21wYXJlLgogICAgICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiBgdmFsdWVgIGlzIGxlc3MgdGhhbiBvciBlcXVhbCB0bwogICAgICAgICAqICBgb3RoZXJgLCBlbHNlIGBmYWxzZWAuCiAgICAgICAgICogQHNlZSBfLmd0ZQogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLmx0ZSgxLCAzKTsKICAgICAgICAgKiAvLyA9PiB0cnVlCiAgICAgICAgICoKICAgICAgICAgKiBfLmx0ZSgzLCAzKTsKICAgICAgICAgKiAvLyA9PiB0cnVlCiAgICAgICAgICoKICAgICAgICAgKiBfLmx0ZSgzLCAxKTsKICAgICAgICAgKiAvLyA9PiBmYWxzZQogICAgICAgICAqLwogICAgICAgIHZhciBsdGUgPSBjcmVhdGVSZWxhdGlvbmFsT3BlcmF0aW9uKGZ1bmN0aW9uKHZhbHVlLCBvdGhlcikgewogICAgICAgICAgcmV0dXJuIHZhbHVlIDw9IG90aGVyOwogICAgICAgIH0pOwoKICAgICAgICAvKioKICAgICAgICAgKiBDb252ZXJ0cyBgdmFsdWVgIHRvIGFuIGFycmF5LgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBzaW5jZSAwLjEuMAogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQGNhdGVnb3J5IExhbmcKICAgICAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBjb252ZXJ0LgogICAgICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyB0aGUgY29udmVydGVkIGFycmF5LgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLnRvQXJyYXkoeyAnYSc6IDEsICdiJzogMiB9KTsKICAgICAgICAgKiAvLyA9PiBbMSwgMl0KICAgICAgICAgKgogICAgICAgICAqIF8udG9BcnJheSgnYWJjJyk7CiAgICAgICAgICogLy8gPT4gWydhJywgJ2InLCAnYyddCiAgICAgICAgICoKICAgICAgICAgKiBfLnRvQXJyYXkoMSk7CiAgICAgICAgICogLy8gPT4gW10KICAgICAgICAgKgogICAgICAgICAqIF8udG9BcnJheShudWxsKTsKICAgICAgICAgKiAvLyA9PiBbXQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHRvQXJyYXkodmFsdWUpIHsKICAgICAgICAgIGlmICghdmFsdWUpIHsKICAgICAgICAgICAgcmV0dXJuIFtdOwogICAgICAgICAgfQogICAgICAgICAgaWYgKGlzQXJyYXlMaWtlKHZhbHVlKSkgewogICAgICAgICAgICByZXR1cm4gaXNTdHJpbmcodmFsdWUpID8gc3RyaW5nVG9BcnJheSh2YWx1ZSkgOiBjb3B5QXJyYXkodmFsdWUpOwogICAgICAgICAgfQogICAgICAgICAgaWYgKHN5bUl0ZXJhdG9yICYmIHZhbHVlW3N5bUl0ZXJhdG9yXSkgewogICAgICAgICAgICByZXR1cm4gaXRlcmF0b3JUb0FycmF5KHZhbHVlW3N5bUl0ZXJhdG9yXSgpKTsKICAgICAgICAgIH0KICAgICAgICAgIHZhciB0YWcgPSBnZXRUYWcodmFsdWUpLAogICAgICAgICAgICAgIGZ1bmMgPSB0YWcgPT0gbWFwVGFnID8gbWFwVG9BcnJheSA6ICh0YWcgPT0gc2V0VGFnID8gc2V0VG9BcnJheSA6IHZhbHVlcyk7CgogICAgICAgICAgcmV0dXJuIGZ1bmModmFsdWUpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ29udmVydHMgYHZhbHVlYCB0byBhIGZpbml0ZSBudW1iZXIuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC4xMi4wCiAgICAgICAgICogQGNhdGVnb3J5IExhbmcKICAgICAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBjb252ZXJ0LgogICAgICAgICAqIEByZXR1cm5zIHtudW1iZXJ9IFJldHVybnMgdGhlIGNvbnZlcnRlZCBudW1iZXIuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8udG9GaW5pdGUoMy4yKTsKICAgICAgICAgKiAvLyA9PiAzLjIKICAgICAgICAgKgogICAgICAgICAqIF8udG9GaW5pdGUoTnVtYmVyLk1JTl9WQUxVRSk7CiAgICAgICAgICogLy8gPT4gNWUtMzI0CiAgICAgICAgICoKICAgICAgICAgKiBfLnRvRmluaXRlKEluZmluaXR5KTsKICAgICAgICAgKiAvLyA9PiAxLjc5NzY5MzEzNDg2MjMxNTdlKzMwOAogICAgICAgICAqCiAgICAgICAgICogXy50b0Zpbml0ZSgnMy4yJyk7CiAgICAgICAgICogLy8gPT4gMy4yCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gdG9GaW5pdGUodmFsdWUpIHsKICAgICAgICAgIGlmICghdmFsdWUpIHsKICAgICAgICAgICAgcmV0dXJuIHZhbHVlID09PSAwID8gdmFsdWUgOiAwOwogICAgICAgICAgfQogICAgICAgICAgdmFsdWUgPSB0b051bWJlcih2YWx1ZSk7CiAgICAgICAgICBpZiAodmFsdWUgPT09IElORklOSVRZIHx8IHZhbHVlID09PSAtSU5GSU5JVFkpIHsKICAgICAgICAgICAgdmFyIHNpZ24gPSAodmFsdWUgPCAwID8gLTEgOiAxKTsKICAgICAgICAgICAgcmV0dXJuIHNpZ24gKiBNQVhfSU5URUdFUjsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiB2YWx1ZSA9PT0gdmFsdWUgPyB2YWx1ZSA6IDA7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDb252ZXJ0cyBgdmFsdWVgIHRvIGFuIGludGVnZXIuCiAgICAgICAgICoKICAgICAgICAgKiAqKk5vdGU6KiogVGhpcyBtZXRob2QgaXMgbG9vc2VseSBiYXNlZCBvbgogICAgICAgICAqIFtgVG9JbnRlZ2VyYF0oaHR0cDovL3d3dy5lY21hLWludGVybmF0aW9uYWwub3JnL2VjbWEtMjYyLzcuMC8jc2VjLXRvaW50ZWdlcikuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgTGFuZwogICAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIGNvbnZlcnQuCiAgICAgICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgY29udmVydGVkIGludGVnZXIuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8udG9JbnRlZ2VyKDMuMik7CiAgICAgICAgICogLy8gPT4gMwogICAgICAgICAqCiAgICAgICAgICogXy50b0ludGVnZXIoTnVtYmVyLk1JTl9WQUxVRSk7CiAgICAgICAgICogLy8gPT4gMAogICAgICAgICAqCiAgICAgICAgICogXy50b0ludGVnZXIoSW5maW5pdHkpOwogICAgICAgICAqIC8vID0+IDEuNzk3NjkzMTM0ODYyMzE1N2UrMzA4CiAgICAgICAgICoKICAgICAgICAgKiBfLnRvSW50ZWdlcignMy4yJyk7CiAgICAgICAgICogLy8gPT4gMwogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHRvSW50ZWdlcih2YWx1ZSkgewogICAgICAgICAgdmFyIHJlc3VsdCA9IHRvRmluaXRlKHZhbHVlKSwKICAgICAgICAgICAgICByZW1haW5kZXIgPSByZXN1bHQgJSAxOwoKICAgICAgICAgIHJldHVybiByZXN1bHQgPT09IHJlc3VsdCA/IChyZW1haW5kZXIgPyByZXN1bHQgLSByZW1haW5kZXIgOiByZXN1bHQpIDogMDsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENvbnZlcnRzIGB2YWx1ZWAgdG8gYW4gaW50ZWdlciBzdWl0YWJsZSBmb3IgdXNlIGFzIHRoZSBsZW5ndGggb2YgYW4KICAgICAgICAgKiBhcnJheS1saWtlIG9iamVjdC4KICAgICAgICAgKgogICAgICAgICAqICoqTm90ZToqKiBUaGlzIG1ldGhvZCBpcyBiYXNlZCBvbgogICAgICAgICAqIFtgVG9MZW5ndGhgXShodHRwOi8vZWNtYS1pbnRlcm5hdGlvbmFsLm9yZy9lY21hLTI2Mi83LjAvI3NlYy10b2xlbmd0aCkuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgTGFuZwogICAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIGNvbnZlcnQuCiAgICAgICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgY29udmVydGVkIGludGVnZXIuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8udG9MZW5ndGgoMy4yKTsKICAgICAgICAgKiAvLyA9PiAzCiAgICAgICAgICoKICAgICAgICAgKiBfLnRvTGVuZ3RoKE51bWJlci5NSU5fVkFMVUUpOwogICAgICAgICAqIC8vID0+IDAKICAgICAgICAgKgogICAgICAgICAqIF8udG9MZW5ndGgoSW5maW5pdHkpOwogICAgICAgICAqIC8vID0+IDQyOTQ5NjcyOTUKICAgICAgICAgKgogICAgICAgICAqIF8udG9MZW5ndGgoJzMuMicpOwogICAgICAgICAqIC8vID0+IDMKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiB0b0xlbmd0aCh2YWx1ZSkgewogICAgICAgICAgcmV0dXJuIHZhbHVlID8gYmFzZUNsYW1wKHRvSW50ZWdlcih2YWx1ZSksIDAsIE1BWF9BUlJBWV9MRU5HVEgpIDogMDsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENvbnZlcnRzIGB2YWx1ZWAgdG8gYSBudW1iZXIuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgTGFuZwogICAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIHByb2Nlc3MuCiAgICAgICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgbnVtYmVyLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLnRvTnVtYmVyKDMuMik7CiAgICAgICAgICogLy8gPT4gMy4yCiAgICAgICAgICoKICAgICAgICAgKiBfLnRvTnVtYmVyKE51bWJlci5NSU5fVkFMVUUpOwogICAgICAgICAqIC8vID0+IDVlLTMyNAogICAgICAgICAqCiAgICAgICAgICogXy50b051bWJlcihJbmZpbml0eSk7CiAgICAgICAgICogLy8gPT4gSW5maW5pdHkKICAgICAgICAgKgogICAgICAgICAqIF8udG9OdW1iZXIoJzMuMicpOwogICAgICAgICAqIC8vID0+IDMuMgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHRvTnVtYmVyKHZhbHVlKSB7CiAgICAgICAgICBpZiAodHlwZW9mIHZhbHVlID09ICdudW1iZXInKSB7CiAgICAgICAgICAgIHJldHVybiB2YWx1ZTsKICAgICAgICAgIH0KICAgICAgICAgIGlmIChpc1N5bWJvbCh2YWx1ZSkpIHsKICAgICAgICAgICAgcmV0dXJuIE5BTjsKICAgICAgICAgIH0KICAgICAgICAgIGlmIChpc09iamVjdCh2YWx1ZSkpIHsKICAgICAgICAgICAgdmFyIG90aGVyID0gdHlwZW9mIHZhbHVlLnZhbHVlT2YgPT0gJ2Z1bmN0aW9uJyA/IHZhbHVlLnZhbHVlT2YoKSA6IHZhbHVlOwogICAgICAgICAgICB2YWx1ZSA9IGlzT2JqZWN0KG90aGVyKSA/IChvdGhlciArICcnKSA6IG90aGVyOwogICAgICAgICAgfQogICAgICAgICAgaWYgKHR5cGVvZiB2YWx1ZSAhPSAnc3RyaW5nJykgewogICAgICAgICAgICByZXR1cm4gdmFsdWUgPT09IDAgPyB2YWx1ZSA6ICt2YWx1ZTsKICAgICAgICAgIH0KICAgICAgICAgIHZhbHVlID0gdmFsdWUucmVwbGFjZShyZVRyaW0sICcnKTsKICAgICAgICAgIHZhciBpc0JpbmFyeSA9IHJlSXNCaW5hcnkudGVzdCh2YWx1ZSk7CiAgICAgICAgICByZXR1cm4gKGlzQmluYXJ5IHx8IHJlSXNPY3RhbC50ZXN0KHZhbHVlKSkKICAgICAgICAgICAgPyBmcmVlUGFyc2VJbnQodmFsdWUuc2xpY2UoMiksIGlzQmluYXJ5ID8gMiA6IDgpCiAgICAgICAgICAgIDogKHJlSXNCYWRIZXgudGVzdCh2YWx1ZSkgPyBOQU4gOiArdmFsdWUpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ29udmVydHMgYHZhbHVlYCB0byBhIHBsYWluIG9iamVjdCBmbGF0dGVuaW5nIGluaGVyaXRlZCBlbnVtZXJhYmxlIHN0cmluZwogICAgICAgICAqIGtleWVkIHByb3BlcnRpZXMgb2YgYHZhbHVlYCB0byBvd24gcHJvcGVydGllcyBvZiB0aGUgcGxhaW4gb2JqZWN0LgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDMuMC4wCiAgICAgICAgICogQGNhdGVnb3J5IExhbmcKICAgICAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBjb252ZXJ0LgogICAgICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgdGhlIGNvbnZlcnRlZCBwbGFpbiBvYmplY3QuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIGZ1bmN0aW9uIEZvbygpIHsKICAgICAgICAgKiAgIHRoaXMuYiA9IDI7CiAgICAgICAgICogfQogICAgICAgICAqCiAgICAgICAgICogRm9vLnByb3RvdHlwZS5jID0gMzsKICAgICAgICAgKgogICAgICAgICAqIF8uYXNzaWduKHsgJ2EnOiAxIH0sIG5ldyBGb28pOwogICAgICAgICAqIC8vID0+IHsgJ2EnOiAxLCAnYic6IDIgfQogICAgICAgICAqCiAgICAgICAgICogXy5hc3NpZ24oeyAnYSc6IDEgfSwgXy50b1BsYWluT2JqZWN0KG5ldyBGb28pKTsKICAgICAgICAgKiAvLyA9PiB7ICdhJzogMSwgJ2InOiAyLCAnYyc6IDMgfQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHRvUGxhaW5PYmplY3QodmFsdWUpIHsKICAgICAgICAgIHJldHVybiBjb3B5T2JqZWN0KHZhbHVlLCBrZXlzSW4odmFsdWUpKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENvbnZlcnRzIGB2YWx1ZWAgdG8gYSBzYWZlIGludGVnZXIuIEEgc2FmZSBpbnRlZ2VyIGNhbiBiZSBjb21wYXJlZCBhbmQKICAgICAgICAgKiByZXByZXNlbnRlZCBjb3JyZWN0bHkuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgTGFuZwogICAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIGNvbnZlcnQuCiAgICAgICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgY29udmVydGVkIGludGVnZXIuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8udG9TYWZlSW50ZWdlcigzLjIpOwogICAgICAgICAqIC8vID0+IDMKICAgICAgICAgKgogICAgICAgICAqIF8udG9TYWZlSW50ZWdlcihOdW1iZXIuTUlOX1ZBTFVFKTsKICAgICAgICAgKiAvLyA9PiAwCiAgICAgICAgICoKICAgICAgICAgKiBfLnRvU2FmZUludGVnZXIoSW5maW5pdHkpOwogICAgICAgICAqIC8vID0+IDkwMDcxOTkyNTQ3NDA5OTEKICAgICAgICAgKgogICAgICAgICAqIF8udG9TYWZlSW50ZWdlcignMy4yJyk7CiAgICAgICAgICogLy8gPT4gMwogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHRvU2FmZUludGVnZXIodmFsdWUpIHsKICAgICAgICAgIHJldHVybiB2YWx1ZQogICAgICAgICAgICA/IGJhc2VDbGFtcCh0b0ludGVnZXIodmFsdWUpLCAtTUFYX1NBRkVfSU5URUdFUiwgTUFYX1NBRkVfSU5URUdFUikKICAgICAgICAgICAgOiAodmFsdWUgPT09IDAgPyB2YWx1ZSA6IDApOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ29udmVydHMgYHZhbHVlYCB0byBhIHN0cmluZy4gQW4gZW1wdHkgc3RyaW5nIGlzIHJldHVybmVkIGZvciBgbnVsbGAKICAgICAgICAgKiBhbmQgYHVuZGVmaW5lZGAgdmFsdWVzLiBUaGUgc2lnbiBvZiBgLTBgIGlzIHByZXNlcnZlZC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSA0LjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBMYW5nCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gY29udmVydC4KICAgICAgICAgKiBAcmV0dXJucyB7c3RyaW5nfSBSZXR1cm5zIHRoZSBjb252ZXJ0ZWQgc3RyaW5nLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICA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gICAgICogQHNpbmNlIDAuMTAuMAogICAgICAgICAqIEBjYXRlZ29yeSBPYmplY3QKICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBkZXN0aW5hdGlvbiBvYmplY3QuCiAgICAgICAgICogQHBhcmFtIHsuLi5PYmplY3R9IFtzb3VyY2VzXSBUaGUgc291cmNlIG9iamVjdHMuCiAgICAgICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyBgb2JqZWN0YC4KICAgICAgICAgKiBAc2VlIF8uYXNzaWduSW4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogZnVuY3Rpb24gRm9vKCkgewogICAgICAgICAqICAgdGhpcy5hID0gMTsKICAgICAgICAgKiB9CiAgICAgICAgICoKICAgICAgICAgKiBmdW5jdGlvbiBCYXIoKSB7CiAgICAgICAgICogICB0aGlzLmMgPSAzOwogICAgICAgICAqIH0KICAgICAgICAgKgogICAgICAgICAqIEZvby5wcm90b3R5cGUuYiA9IDI7CiAgICAgICAgICogQmFyLnByb3RvdHlwZS5kID0gNDsKICAgICAgICAgKgogICAgICAgICAqIF8uYXNzaWduKHsgJ2EnOiAwIH0sIG5ldyBGb28sIG5ldyBCYXIpOwogICAgICAgICAqIC8vID0+IHsgJ2EnOiAxLCAnYyc6IDMgfQogICAgICAgICAqLwogICAgICAgIHZhciBhc3NpZ24gPSBjcmVhdGVBc3NpZ25lcihmdW5jdGlvbihvYmplY3QsIHNvdXJjZSkgewogICAgICAgICAgaWYgKGlzUHJvdG90eXBlKHNvdXJjZSkgfHwgaXNBcnJheUxpa2Uoc291cmNlKSkgewogICAgICAgICAgICBjb3B5T2JqZWN0KHNvdXJjZSwga2V5cyhzb3VyY2UpLCBvYmplY3QpOwogICAgICAgICAgICByZXR1cm47CiAgICAgICAgICB9CiAgICAgICAgICBmb3IgKHZhciBrZXkgaW4gc291cmNlKSB7CiAgICAgICAgICAgIGlmIChoYXNPd25Qcm9wZXJ0eS5jYWxsKHNvdXJjZSwga2V5KSkgewogICAgICAgICAgICAgIGFzc2lnblZhbHVlKG9iamVjdCwga2V5LCBzb3VyY2Vba2V5XSk7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICB9KTsKCiAgICAgICAgLyoqCiAgICAgICAgICogVGhpcyBtZXRob2QgaXMgbGlrZSBgXy5hc3NpZ25gIGV4Y2VwdCB0aGF0IGl0IGl0ZXJhdGVzIG92ZXIgb3duIGFuZAogICAgICAgICAqIGluaGVyaXRlZCBzb3VyY2UgcHJvcGVydGllcy4KICAgICAgICAgKgogICAgICAgICAqICoqTm90ZToqKiBUaGlzIG1ldGhvZCBtdXRhdGVzIGBvYmplY3RgLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDQuMC4wCiAgICAgICAgICogQGFsaWFzIGV4dGVuZAogICAgICAgICAqIEBjYXRlZ29yeSBPYmplY3QKICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBkZXN0aW5hdGlvbiBvYmplY3QuCiAgICAgICAgICogQHBhcmFtIHsuLi5PYmplY3R9IFtzb3VyY2VzXSBUaGUgc291cmNlIG9iamVjdHMuCiAgICAgICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyBgb2JqZWN0YC4KICAgICAgICAgKiBAc2VlIF8uYXNzaWduCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIGZ1bmN0aW9uIEZvbygpIHsKICAgICAgICAgKiAgIHRoaXMuYSA9IDE7CiAgICAgICAgICogfQogICAgICAgICAqCiAgICAgICAgICogZnVuY3Rpb24gQmFyKCkgewogICAgICAgICAqICAgdGhpcy5jID0gMzsKICAgICAgICAgKiB9CiAgICAgICAgICoKICAgICAgICAgKiBGb28ucHJvdG90eXBlLmIgPSAyOwogICAgICAgICAqIEJhci5wcm90b3R5cGUuZCA9IDQ7CiAgICAgICAgICoKICAgICAgICAgKiBfLmFzc2lnbkluKHsgJ2EnOiAwIH0sIG5ldyBGb28sIG5ldyBCYXIpOwogICAgICAgICAqIC8vID0+IHsgJ2EnOiAxLCAnYic6IDIsICdjJzogMywgJ2QnOiA0IH0KICAgICAgICAgKi8KICAgICAgICB2YXIgYXNzaWduSW4gPSBjcmVhdGVBc3NpZ25lcihmdW5jdGlvbihvYmplY3QsIHNvdXJjZSkgewogICAgICAgICAgY29weU9iamVjdChzb3VyY2UsIGtleXNJbihzb3VyY2UpLCBvYmplY3QpOwogICAgICAgIH0pOwoKICAgICAgICAvKioKICAgICAgICAgKiBUaGlzIG1ldGhvZCBpcyBsaWtlIGBfLmFzc2lnbkluYCBleGNlcHQgdGhhdCBpdCBhY2NlcHRzIGBjdXN0b21pemVyYAogICAgICAgICAqIHdoaWNoIGlzIGludm9rZWQgdG8gcHJvZHVjZSB0aGUgYXNzaWduZWQgdmFsdWVzLiBJZiBgY3VzdG9taXplcmAgcmV0dXJucwogICAgICAgICAqIGB1bmRlZmluZWRgLCBhc3NpZ25tZW50IGlzIGhhbmRsZWQgYnkgdGhlIG1ldGhvZCBpbnN0ZWFkLiBUaGUgYGN1c3RvbWl6ZXJgCiAgICAgICAgICogaXMgaW52b2tlZCB3aXRoIGZpdmUgYXJndW1lbnRzOiAob2JqVmFsdWUsIHNyY1ZhbHVlLCBrZXksIG9iamVjdCwgc291cmNlKS4KICAgICAgICAgKgogICAgICAgICAqICoqTm90ZToqKiBUaGlzIG1ldGhvZCBtdXRhdGVzIGBvYmplY3RgLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDQuMC4wCiAgICAgICAgICogQGFsaWFzIGV4dGVuZFdpdGgKICAgICAgICAgKiBAY2F0ZWdvcnkgT2JqZWN0CiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IG9iamVjdCBUaGUgZGVzdGluYXRpb24gb2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YAogICAgICAgICAqIHdoaWNoIGlzIGludm9rZWQgdG8gcHJvZHVjZSB0aGUgYXNzaWduZWQgdmFsdWVzLiBJZiBgY3VzdG9taXplcmAgcmV0dXJucwogICAgICAgICAqIGB1bmRlZmluZWRgLCBhc3NpZ25tZW50IGlzIGhhbmRsZWQgYnkgdGhlIG1ldGhvZCBpbnN0ZWFkLiBUaGUgYGN1c3RvbWl6ZXJgCiAgICAgICAgICogaXMgaW52b2tlZCB3aXRoIGZpdmUgYXJndW1lbnRzOiAob2JqVmFsdWUsIHNyY1ZhbHVlLCBrZXksIG9iamVjdCwgc291cmNlKS4KICAgICAgICAgKgogICAgICAgICAqICoqTm90ZToqKiBUaGlzIG1ldGhvZCBtdXRhdGVzIGBvYmplY3RgLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDQuMC4wCiAgICAgICAgICogQGNhdGVnb3J5IE9iamVjdAogICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvYmplY3QgVGhlIGRlc3RpbmF0aW9uIG9iamVjdC4KICAgICAgICAgKiBAcGFyYW0gey4uLk9iamVjdH0gc291cmNlcyBUaGUgc291cmNlIG9iamVjdHMuCiAgICAgICAgICogQHBhcmFtIHtGdW5jdGlvbn0gW2N1c3RvbWl6ZXJdIFRoZSBmdW5jdGlvbiB0byBjdXN0b21pemUgYXNzaWduZWQgdmFsdWVzLgogICAgICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgYG9iamVjdGAuCiAgICAgICAgICogQHNlZSBfLmFzc2lnbkluV2l0aAogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBmdW5jdGlvbiBjdXN0b21pemVyKG9ialZhbHVlLCBzcmNWYWx1ZSkgewogICAgICAgICAqICAgcmV0dXJuIF8uaXNVbmRlZmluZWQob2JqVmFsdWUpID8gc3JjVmFsdWUgOiBvYmpWYWx1ZTsKICAgICAgICAgKiB9CiAgICAgICAgICoKICAgICAgICAgKiB2YXIgZGVmYXVsdHMgPSBfLnBhcnRpYWxSaWdodChfLmFzc2lnbldpdGgsIGN1c3RvbWl6ZXIpOwogICAgICAgICAqCiAgICAgICAgICogZGVmYXVsdHMoeyAnYSc6IDEgfSwgeyAnYic6IDIgfSwgeyAnYSc6IDMgfSk7CiAgICAgICAgICogLy8gPT4geyAnYSc6IDEsICdiJzogMiB9CiAgICAgICAgICovCiAgICAgICAgdmFyIGFzc2lnbldpdGggPSBjcmVhdGVBc3NpZ25lcihmdW5jdGlvbihvYmplY3QsIHNvdXJjZSwgc3JjSW5kZXgsIGN1c3RvbWl6ZXIpIHsKICAgICAgICAgIGNvcHlPYmplY3Qoc291cmNlLCBrZXlzKHNvdXJjZSksIG9iamVjdCwgY3VzdG9taXplcik7CiAgICAgICAgfSk7CgogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYW4gYXJyYXkgb2YgdmFsdWVzIGNvcnJlc3BvbmRpbmcgdG8gYHBhdGhzYCBvZiBgb2JqZWN0YC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAxLjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBPYmplY3QKICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBvYmplY3QgdG8gaXRlcmF0ZSBvdmVyLgogICAgICAgICAqIEBwYXJhbSB7Li4uKHN0cmluZ3xzdHJpbmdbXSl9IFtwYXRoc10gVGhlIHByb3BlcnR5IHBhdGhzIHRvIHBpY2suCiAgICAgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBwaWNrZWQgdmFsdWVzLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiB2YXIgb2JqZWN0ID0geyAnYSc6IFt7ICdiJzogeyAnYyc6IDMgfSB9LCA0XSB9OwogICAgICAgICAqCiAgICAgICAgICogXy5hdChvYmplY3QsIFsnYVswXS5iLmMnLCAnYVsxXSddKTsKICAgICAgICAgKiAvLyA9PiBbMywgNF0KICAgICAgICAgKi8KICAgICAgICB2YXIgYXQgPSBmbGF0UmVzdChiYXNlQXQpOwoKICAgICAgICAvKioKICAgICAgICAgKiBDcmVhdGVzIGFuIG9iamVjdCB0aGF0IGluaGVyaXRzIGZyb20gdGhlIGBwcm90b3R5cGVgIG9iamVjdC4gSWYgYQogICAgICAgICAqIGBwcm9wZXJ0aWVzYCBvYmplY3QgaXMgZ2l2ZW4sIGl0cyBvd24gZW51bWVyYWJsZSBzdHJpbmcga2V5ZWQgcHJvcGVydGllcwogICAgICAgICAqIGFyZSBhc3NpZ25lZCB0byB0aGUgY3JlYXRlZCBvYmplY3QuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgMi4zLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgT2JqZWN0CiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IHByb3RvdHlwZSBUaGUgb2JqZWN0IHRvIGluaGVyaXQgZnJvbS4KICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gW3Byb3BlcnRpZXNdIFRoZSBwcm9wZXJ0aWVzIHRvIGFzc2lnbiB0byB0aGUgb2JqZWN0LgogICAgICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgdGhlIG5ldyBvYmplY3QuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIGZ1bmN0aW9uIFNoYXBlKCkgewogICAgICAgICAqICAgdGhpcy54ID0gMDsKICAgICAgICAgKiAgIHRoaXMueSA9IDA7CiAgICAgICAgICogfQogICAgICAgICAqCiAgICAgICAgICogZnVuY3Rpb24gQ2lyY2xlKCkgewogICAgICAgICAqICAgU2hhcGUuY2FsbCh0aGlzKTsKICAgICAgICAgKiB9CiAgICAgICAgICoKICAgICAgICAgKiBDaXJjbGUucHJvdG90eXBlID0gXy5jcmVhdGUoU2hhcGUucHJvdG90eXBlLCB7CiAgICAgICAgICogICAnY29uc3RydWN0b3InOiBDaXJjbGUKICAgICAgICAgKiB9KTsKICAgICAgICAgKgogICAgICAgICAqIHZhciBjaXJjbGUgPSBuZXcgQ2lyY2xlOwogICAgICAgICAqIGNpcmNsZSBpbnN0YW5jZW9mIENpcmNsZTsKICAgICAgICAgKiAvLyA9PiB0cnVlCiAgICAgICAgICoKICAgICAgICAgKiBjaXJjbGUgaW5zdGFuY2VvZiBTaGFwZTsKICAgICAgICAgKiAvLyA9PiB0cnVlCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gY3JlYXRlKHByb3RvdHlwZSwgcHJvcGVydGllcykgewogICAgICAgICAgdmFyIHJlc3VsdCA9IGJhc2VDcmVhdGUocHJvdG90eXBlKTsKICAgICAgICAgIHJldHVybiBwcm9wZXJ0aWVzID09IG51bGwgPyByZXN1bHQgOiBiYXNlQXNzaWduKHJlc3VsdCwgcHJvcGVydGllcyk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBBc3NpZ25zIG93biBhbmQgaW5oZXJpdGVkIGVudW1lcmFibGUgc3RyaW5nIGtleWVkIHByb3BlcnRpZXMgb2Ygc291cmNlCiAgICAgICAgICogb2JqZWN0cyB0byB0aGUgZGVzdGluYXRpb24gb2JqZWN0IGZvciBhbGwgZGVzdGluYXRpb24gcHJvcGVydGllcyB0aGF0CiAgICAgICAgICogcmVzb2x2ZSB0byBgdW5kZWZpbmVkYC4gU291cmNlIG9iamVjdHMgYXJlIGFwcGxpZWQgZnJvbSBsZWZ0IHRvIHJpZ2h0LgogICAgICAgICAqIE9uY2UgYSBwcm9wZXJ0eSBpcyBzZXQsIGFkZGl0aW9uYWwgdmFsdWVzIG9mIHRoZSBzYW1lIHByb3BlcnR5IGFyZSBpZ25vcmVkLgogICAgICAgICAqCiAgICAgICAgICogKipOb3RlOioqIFRoaXMgbWV0aG9kIG11dGF0ZXMgYG9iamVjdGAuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQHNpbmNlIDAuMS4wCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAY2F0ZWdvcnkgT2JqZWN0CiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IG9iamVjdCBUaGUgZGVzdGluYXRpb24gb2JqZWN0LgogICAgICAgICAqIEBwYXJhbSB7Li4uT2JqZWN0fSBbc291cmNlc10gVGhlIHNvdXJjZSBvYmplY3RzLgogICAgICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgYG9iamVjdGAuCiAgICAgICAgICogQHNlZSBfLmRlZmF1bHRzRGVlcAogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLmRlZmF1bHRzKHsgJ2EnOiAxIH0sIHsgJ2InOiAyIH0sIHsgJ2EnOiAzIH0pOwogICAgICAgICAqIC8vID0+IHsgJ2EnOiAxLCAnYic6IDIgfQogICAgICAgICAqLwogICAgICAgIHZhciBkZWZhdWx0cyA9IGJhc2VSZXN0KGZ1bmN0aW9uKG9iamVjdCwgc291cmNlcykgewogICAgICAgICAgb2JqZWN0ID0gT2JqZWN0KG9iamVjdCk7CgogICAgICAgICAgdmFyIGluZGV4ID0gLTE7CiAgICAgICAgICB2YXIgbGVuZ3RoID0gc291cmNlcy5sZW5ndGg7CiAgICAgICAgICB2YXIgZ3VhcmQgPSBsZW5ndGggPiAyID8gc291cmNlc1syXSA6IHVuZGVmaW5lZCQxOwoKICAgICAgICAgIGlmIChndWFyZCAmJiBpc0l0ZXJhdGVlQ2FsbChzb3VyY2VzWzBdLCBzb3VyY2VzWzFdLCBndWFyZCkpIHsKICAgICAgICAgICAgbGVuZ3RoID0gMTsKICAgICAgICAgIH0KCiAgICAgICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkgewogICAgICAgICAgICB2YXIgc291cmNlID0gc291cmNlc1tpbmRleF07CiAgICAgICAgICAgIHZhciBwcm9wcyA9IGtleXNJbihzb3VyY2UpOwogICAgICAgICAgICB2YXIgcHJvcHNJbmRleCA9IC0xOwogICAgICAgICAgICB2YXIgcHJvcHNMZW5ndGggPSBwcm9wcy5sZW5ndGg7CgogICAgICAgICAgICB3aGlsZSAoKytwcm9wc0luZGV4IDwgcHJvcHNMZW5ndGgpIHsKICAgICAgICAgICAgICB2YXIga2V5ID0gcHJvcHNbcHJvcHNJbmRleF07CiAgICAgICAgICAgICAgdmFyIHZhbHVlID0gb2JqZWN0W2tleV07CgogICAgICAgICAgICAgIGlmICh2YWx1ZSA9PT0gdW5kZWZpbmVkJDEgfHwKICAgICAgICAgICAgICAgICAgKGVxKHZhbHVlLCBvYmplY3RQcm90b1trZXldKSAmJiAhaGFzT3duUHJvcGVydHkuY2FsbChvYmplY3QsIGtleSkpKSB7CiAgICAgICAgICAgICAgICBvYmplY3Rba2V5XSA9IHNvdXJjZVtrZXldOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgfQoKICAgICAgICAgIHJldHVybiBvYmplY3Q7CiAgICAgICAgfSk7CgogICAgICAgIC8qKgogICAgICAgICAqIFRoaXMgbWV0aG9kIGlzIGxpa2UgYF8uZGVmYXVsdHNgIGV4Y2VwdCB0aGF0IGl0IHJlY3Vyc2l2ZWx5IGFzc2lnbnMKICAgICAgICAgKiBkZWZhdWx0IHByb3BlcnRpZXMuCiAgICAgICAgICoKICAgICAgICAgKiAqKk5vdGU6KiogVGhpcyBtZXRob2QgbXV0YXRlcyBgb2JqZWN0YC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAzLjEwLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgT2JqZWN0CiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IG9iamVjdCBUaGUg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JwogICAgICAgICAqCiAgICAgICAgICogLy8gVGhlIGBfLnByb3BlcnR5YCBpdGVyYXRlZSBzaG9ydGhhbmQuCiAgICAgICAgICogXy5maW5kS2V5KHVzZXJzLCAnYWN0aXZlJyk7CiAgICAgICAgICogLy8gPT4gJ2Jhcm5leScKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBmaW5kS2V5KG9iamVjdCwgcHJlZGljYXRlKSB7CiAgICAgICAgICByZXR1cm4gYmFzZUZpbmRLZXkob2JqZWN0LCBnZXRJdGVyYXRlZShwcmVkaWNhdGUsIDMpLCBiYXNlRm9yT3duKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFRoaXMgbWV0aG9kIGlzIGxpa2UgYF8uZmluZEtleWAgZXhjZXB0IHRoYXQgaXQgaXRlcmF0ZXMgb3ZlciBlbGVtZW50cyBvZgogICAgICAgICAqIGEgY29sbGVjdGlvbiBpbiB0aGUgb3Bwb3NpdGUgb3JkZXIuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgMi4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgT2JqZWN0CiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IG9iamVjdCBUaGUgb2JqZWN0IHRvIGluc3BlY3QuCiAgICAgICAgICogQHBhcmFtIHtGdW5jdGlvbn0gW3ByZWRpY2F0ZT1fLmlkZW50aXR5XSBUaGUgZnVuY3Rpb24gaW52b2tlZCBwZXIgaXRlcmF0aW9uLgogICAgICAgICAqIEByZXR1cm5zIHtzdHJpbmd8dW5kZWZpbmVkfSBSZXR1cm5zIHRoZSBrZXkgb2YgdGhlIG1hdGNoZWQgZWxlbWVudCwKICAgICAgICAgKiAgZWxzZSBgdW5kZWZpbmVkYC4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogdmFyIHVzZXJzID0gewogICAgICAgICAqICAgJ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ICAgICAgICAgKgogICAgICAgICAqIEZvby5wcm90b3R5cGUuYyA9IDM7CiAgICAgICAgICoKICAgICAgICAgKiBfLmZvckluKG5ldyBGb28sIGZ1bmN0aW9uKHZhbHVlLCBrZXkpIHsKICAgICAgICAgKiAgIGNvbnNvbGUubG9nKGtleSk7CiAgICAgICAgICogfSk7CiAgICAgICAgICogLy8gPT4gTG9ncyAnYScsICdiJywgdGhlbiAnYycgKGl0ZXJhdGlvbiBvcmRlciBpcyBub3QgZ3VhcmFudGVlZCkuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gZm9ySW4ob2JqZWN0LCBpdGVyYXRlZSkgewogICAgICAgICAgcmV0dXJuIG9iamVjdCA9PSBudWxsCiAgICAgICAgICAgID8gb2JqZWN0CiAgICAgICAgICAgIDogYmFzZUZvcihvYmplY3QsIGdldEl0ZXJhdGVlKGl0ZXJhdGVlLCAzKSwga2V5c0luKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFRoaXMgbWV0aG9kIGlzIGxpa2UgYF8uZm9ySW5gIGV4Y2VwdCB0aGF0IGl0IGl0ZXJhdGVzIG92ZXIgcHJvcGVydGllcyBvZgogICAgICAgICAqIGBvYmplY3RgIGluIHRoZSBvcHBvc2l0ZSBvcmRlci4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAyLjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBPYmplY3QKICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBvYmplY3QgdG8gaXRlcmF0ZSBvdmVyLgogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IFtpdGVyYXRlZT1fLmlkZW50aXR5XSBUaGUgZnVuY3Rpb24gaW52b2tlZCBwZXIgaXRlcmF0aW9uLgogICAgICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgYG9iamVjdGAuCiAgICAgICAgICogQHNlZSBfLmZvckluCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIGZ1bmN0aW9uIEZvbygpIHsKICAgICAgICAgKiAgIHRoaXMuYSA9IDE7CiAgICAgICAgICogICB0aGlzLmIgPSAyOwogICAgICAgICAqIH0KICAgICAgICAgKgogICAgICAgICAqIEZvby5wcm90b3R5cGUuYyA9IDM7CiAgICAgICAgICoKICAgICAgICAgKiBfLmZvckluUmlnaHQobmV3IEZvbywgZnVuY3Rpb24odmFsdWUsIGtleSkgewogICAgICAgICAqICAgY29uc29sZS5sb2coa2V5KTsKICAgICAgICAgKiB9KTsKICAgICAgICAgKiAvLyA9PiBMb2dzICdjJywgJ2InLCB0aGVuICdhJyBhc3N1bWluZyBgXy5mb3JJbmAgbG9ncyAnYScsICdiJywgdGhlbiAnYycuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gZm9ySW5SaWdodChvYmplY3QsIGl0ZXJhdGVlKSB7CiAgICAgICAgICByZXR1cm4gb2JqZWN0ID09IG51bGwKICAgICAgICAgICAgPyBvYmplY3QKICAgICAgICAgICAgOiBiYXNlRm9yUmlnaHQob2JqZWN0LCBnZXRJdGVyYXRlZShpdGVyYXRlZSwgMyksIGtleXNJbik7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBJdGVyYXRlcyBvdmVyIG93biBlbnVtZXJhYmxlIHN0cmluZyBrZXllZCBwcm9wZXJ0aWVzIG9mIGFuIG9iamVjdCBhbmQKICAgICAgICAgKiBpbnZva2VzIGBpdGVyYXRlZWAgZm9yIGVhY2ggcHJvcGVydHkuIFRoZSBpdGVyYXRlZSBpcyBpbnZva2VkIHdpdGggdGhyZWUKICAgICAgICAgKiBhcmd1bWVudHM6ICh2YWx1ZSwga2V5LCBvYmplY3QpLiBJdGVyYXRlZSBmdW5jdGlvbnMgbWF5IGV4aXQgaXRlcmF0aW9uCiAgICAgICAgICogZWFybHkgYnkgZXhwbGljaXRseSByZXR1cm5pbmcgYGZhbHNlYC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAwLjMuMAogICAgICAgICAqIEBjYXRlZ29yeSBPYmplY3QKICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBvYmplY3QgdG8gaXRlcmF0ZSBvdmVyLgogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IFtpdGVyYXRlZT1fLmlkZW50aXR5XSBUaGUgZnVuY3Rpb24gaW52b2tlZCBwZXIgaXRlcmF0aW9uLgogICAgICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgYG9iamVjdGAuCiAgICAgICAgICogQHNlZSBfLmZvck93blJpZ2h0CiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIGZ1bmN0aW9uIEZvbygpIHsKICAgICAgICAgKiAgIHRoaXMuYSA9IDE7CiAgICAgICAgICogICB0aGlzLmIgPSAyOwogICAgICAgICAqIH0KICAgICAgICAgKgogICAgICAgICAqIEZvby5wcm90b3R5cGUuYyA9IDM7CiAgICAgICAgICoKICAgICAgICAgKiBfLmZvck93bihuZXcgRm9vLCBmdW5jdGlvbih2YWx1ZSwga2V5KSB7CiAgICAgICAgICogICBjb25zb2xlLmxvZyhrZXkpOwogICAgICAgICAqIH0pOwogICAgICAgICAqIC8vID0+IExvZ3MgJ2EnIHRoZW4gJ2InIChpdGVyYXRpb24gb3JkZXIgaXMgbm90IGd1YXJhbnRlZWQpLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGZvck93bihvYmplY3QsIGl0ZXJhdGVlKSB7CiAgICAgICAgICByZXR1cm4gb2JqZWN0ICYmIGJhc2VGb3JPd24ob2JqZWN0LCBnZXRJdGVyYXRlZShpdGVyYXRlZSwgMykpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogVGhpcyBtZXRob2QgaXMgbGlrZSBgXy5mb3JPd25gIGV4Y2VwdCB0aGF0IGl0IGl0ZXJhdGVzIG92ZXIgcHJvcGVydGllcyBvZgogICAgICAgICAqIGBvYmplY3RgIGluIHRoZSBvcHBvc2l0ZSBvcmRlci4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAyLjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBPYmplY3QKICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBvYmplY3QgdG8gaXRlcmF0ZSBvdmVyLgogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IFtpdGVyYXRlZT1fLmlkZW50aXR5XSBUaGUgZnVuY3Rpb24gaW52b2tlZCBwZXIgaXRlcmF0aW9uLgogICAgICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgYG9iamVjdGAuCiAgICAgICAgICogQHNlZSBfLmZvck93bgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBmdW5jdGlvbiBGb28oKSB7CiAgICAgICAgICogICB0aGlzLmEgPSAxOwogICAgICAgICAqICAgdGhpcy5iID0gMjsKICAgICAgICAgKiB9CiAgICAgICAgICoKICAgICAgICAgKiBGb28ucHJvdG90eXBlLmMgPSAzOwogICAgICAgICAqCiAgICAgICAgICogXy5mb3JPd25SaWdodChuZXcgRm9vLCBmdW5jdGlvbih2YWx1ZSwga2V5KSB7CiAgICAgICAgICogICBjb25zb2xlLmxvZyhrZXkpOwogICAgICAgICAqIH0pOwogICAgICAgICAqIC8vID0+IExvZ3MgJ2InIHRoZW4gJ2EnIGFzc3VtaW5nIGBfLmZvck93bmAgbG9ncyAnYScgdGhlbiAnYicuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gZm9yT3duUmlnaHQob2JqZWN0LCBpdGVyYXRlZSkgewogICAgICAgICAgcmV0dXJuIG9iamVjdCAmJiBiYXNlRm9yT3duUmlnaHQob2JqZWN0LCBnZXRJdGVyYXRlZShpdGVyYXRlZSwgMykpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhbiBhcnJheSBvZiBmdW5jdGlvbiBwcm9wZXJ0eSBuYW1lcyBmcm9tIG93biBlbnVtZXJhYmxlIHByb3BlcnRpZXMKICAgICAgICAgKiBvZiBgb2JqZWN0YC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAc2luY2UgMC4xLjAKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBjYXRlZ29yeSBPYmplY3QKICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBvYmplY3QgdG8gaW5zcGVjdC4KICAgICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIGZ1bmN0aW9uIG5hbWVzLgogICAgICAgICAqIEBzZWUgXy5mdW5jdGlvbnNJbgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBmdW5jdGlvbiBGb28oKSB7CiAgICAgICAgICogICB0aGlzLmEgPSBfLmNvbnN0YW50KCdhJyk7CiAgICAgICAgICogICB0aGlzLmIgPSBfLmNvbnN0YW50KCdiJyk7CiAgICAgICAgICogfQogICAgICAgICAqCiAgICAgICAgICogRm9vLnByb3RvdHlwZS5jID0gXy5jb25zdGFudCgnYycpOwogICAgICAgICAqCiAgICAgICAgICogXy5mdW5jdGlvbnMobmV3IEZvbyk7CiAgICAgICAgICogLy8gPT4gWydhJywgJ2InXQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGZ1bmN0aW9ucyhvYmplY3QpIHsKICAgICAgICAgIHJldHVybiBvYmplY3QgPT0gbnVsbCA/IFtdIDogYmFzZUZ1bmN0aW9ucyhvYmplY3QsIGtleXMob2JqZWN0KSk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDcmVhdGVzIGFuIGFycmF5IG9mIGZ1bmN0aW9uIHByb3BlcnR5IG5hbWVzIGZyb20gb3duIGFuZCBpbmhlcml0ZWQKICAgICAgICAgKiBlbnVtZXJhYmxlIHByb3BlcnRpZXMgb2YgYG9iamVjdGAuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgT2JqZWN0CiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IG9iamVjdCBUaGUgb2JqZWN0IHRvIGluc3BlY3QuCiAgICAgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBmdW5jdGlvbiBuYW1lcy4KICAgICAgICAgKiBAc2VlIF8uZnVuY3Rpb25zCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIGZ1bmN0aW9uIEZvbygpIHsKICAgICAgICAgKiAgIHRoaXMuYSA9IF8uY29uc3RhbnQoJ2EnKTsKICAgICAgICAgKiAgIHRoaXMuYiA9IF8uY29uc3RhbnQoJ2InKTsKICAgICAgICAgKiB9CiAgICAgICAgICoKICAgICAgICAgKiBGb28ucHJvdG90eXBlLmMgPSBfLmNvbnN0YW50KCdjJyk7CiAgICAgICAgICoKICAgICAgICAgKiBfLmZ1bmN0aW9uc0luKG5ldyBGb28pOwogICAgICAgICAqIC8vID0+IFsnYScsICdiJywgJ2MnXQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGZ1bmN0aW9uc0luKG9iamVjdCkgewogICAgICAgICAgcmV0dXJuIG9iamVjdCA9PSBudWxsID8gW10gOiBiYXNlRnVuY3Rpb25zKG9iamVjdCwga2V5c0luKG9iamVjdCkpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogR2V0cyB0aGUgdmFsdWUgYXQgYHBhdGhgIG9mIGBvYmplY3RgLiBJZiB0aGUgcmVzb2x2ZWQgdmFsdWUgaXMKICAgICAgICAgKiBgdW5kZWZpbmVkYCwgdGhlIGBkZWZhdWx0VmFsdWVgIGlzIHJldHVybmVkIGluIGl0cyBwbGFjZS4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAzLjcuMAogICAgICAgICAqIEBjYXRlZ29yeSBPYmplY3QKICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBvYmplY3QgdG8gcXVlcnkuCiAgICAgICAgICogQHBhcmFtIHtBcnJheXxzdHJpbmd9IHBhdGggVGhlIHBhdGggb2YgdGhlIHByb3BlcnR5IHRvIGdldC4KICAgICAgICAgKiBAcGFyYW0geyp9IFtkZWZhdWx0VmFsdWVdIFRoZSB2YWx1ZSByZXR1cm5lZCBmb3IgYHVuZGVmaW5lZGAgcmVzb2x2ZWQgdmFsdWVzLgogICAgICAgICAqIEByZXR1cm5zIHsqfSBSZXR1cm5zIHRoZSByZXNvbHZlZCB2YWx1ZS4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogdmFyIG9iamVjdCA9IHsgJ2EnOiBbeyAnYic6IHsgJ2MnOiAzIH0gfV0gfTsKICAgICAgICAgKgogICAgICAgICAqIF8uZ2V0KG9iamVjdCwgJ2FbMF0uYi5jJyk7CiAgICAgICAgICogLy8gPT4gMwogICAgICAgICAqCiAgICAgICAgICogXy5nZXQob2JqZWN0LCBbJ2EnLCAnMCcsICdiJywgJ2MnXSk7CiAgICAgICAgICogLy8gPT4gMwogICAgICAgICAqCiAgICAgICAgICogXy5nZXQob2JqZWN0LCAnYS5iLmMnLCAnZGVmYXVsdCcpOwogICAgICAgICAqIC8vID0+ICdkZWZhdWx0JwogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGdldChvYmplY3QsIHBhdGgsIGRlZmF1bHRWYWx1ZSkgewogICAgICAgICAgdmFyIHJlc3VsdCA9IG9iamVjdCA9PSBudWxsID8gdW5kZWZpbmVkJDEgOiBiYXNlR2V0KG9iamVjdCwgcGF0aCk7CiAgICAgICAgICByZXR1cm4gcmVzdWx0ID09PSB1bmRlZmluZWQkMSA/IGRlZmF1bHRWYWx1ZSA6IHJlc3VsdDsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENoZWNrcyBpZiBgcGF0aGAgaXMgYSBkaXJlY3QgcHJvcGVydHkgb2YgYG9iamVjdGAuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQHNpbmNlIDAuMS4wCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAY2F0ZWdvcnkgT2JqZWN0CiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IG9iamVjdCBUaGUgb2JqZWN0IHRvIHF1ZXJ5LgogICAgICAgICAqIEBwYXJhbSB7QXJyYXl8c3RyaW5nfSBwYXRoIFRoZSBwYXRoIHRvIGNoZWNrLgogICAgICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiBgcGF0aGAgZXhpc3RzLCBlbHNlIGBmYWxzZWAuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIHZhciBvYmplY3QgPSB7ICdhJzogeyAnYic6IDIgfSB9OwogICAgICAgICAqIHZhciBvdGhlciA9IF8uY3JlYXRlKHsgJ2EnOiBfLmNyZWF0ZSh7ICdiJzogMiB9KSB9KTsKICAgICAgICAgKgogICAgICAgICAqIF8uaGFzKG9iamVjdCwgJ2EnKTsKICAgICAgICAgKiAvLyA9PiB0cnVlCiAgICAgICAgICoKICAgICAgICAgKiBfLmhhcyhvYmplY3QsICdhLmInKTsKICAgICAgICAgKiAvLyA9PiB0cnVlCiAgICAgICAgICoKICAgICAgICAgKiBfLmhhcyhvYmplY3QsIFsnYScsICdiJ10pOwogICAgICAgICAqIC8vID0+IHRydWUKICAgICAgICAgKgogICAgICAgICAqIF8uaGFzKG90aGVyLCAnYScpOwogICAgICAgICAqIC8vID0+IGZhbHNlCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gaGFzKG9iamVjdCwgcGF0aCkgewogICAgICAgICAgcmV0dXJuIG9iamVjdCAhPSBudWxsICYmIGhhc1BhdGgob2JqZWN0LCBwYXRoLCBiYXNlSGFzKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENoZWNrcyBpZiBgcGF0aGAgaXMgYSBkaXJlY3Qgb3IgaW5oZXJpdGVkIHByb3BlcnR5IG9mIGBvYmplY3RgLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDQuMC4wCiAgICAgICAgICogQGNhdGVnb3J5IE9iamVjdAogICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvYmplY3QgVGhlIG9iamVjdCB0byBxdWVyeS4KICAgICAgICAgKiBAcGFyYW0ge0FycmF5fHN0cmluZ30gcGF0aCBUaGUgcGF0aCB0byBjaGVjay4KICAgICAgICAgKiBAcmV0dXJucyB7Ym9vbGVhbn0gUmV0dXJucyBgdHJ1ZWAgaWYgYHBhdGhgIGV4aXN0cywgZWxzZSBgZmFsc2VgLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiB2YXIgb2JqZWN0ID0gXy5jcmVhdGUoeyAnYSc6IF8uY3JlYXRlKHsgJ2InOiAyIH0pIH0pOwogICAgICAgICAqCiAgICAgICAgICogXy5oYXNJbihvYmplY3QsICdhJyk7CiAgICAgICAgICogLy8gPT4gdHJ1ZQogICAgICAgICAqCiAgICAgICAgICogXy5oYXNJbihvYmplY3QsICdhLmInKTsKICAgICAgICAgKiAvLyA9PiB0cnVlCiAgICAgICAgICoKICAgICAgICAgKiBfLmhhc0luKG9iamVjdCwgWydhJywgJ2InXSk7CiAgICAgICAgICogLy8gPT4gdHJ1ZQogICAgICAgICAqCiAgICAgICAgICogXy5oYXNJbihvYmplY3QsICdiJyk7CiAgICAgICAgICogLy8gPT4gZmFsc2UKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBoYXNJbihvYmplY3QsIHBhdGgpIHsKICAgICAgICAgIHJldHVybiBvYmplY3QgIT0gbnVsbCAmJiBoYXNQYXRoKG9iamVjdCwgcGF0aCwgYmFzZUhhc0luKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYW4gb2JqZWN0IGNvbXBvc2VkIG9mIHRoZSBpbnZlcnRlZCBrZXlzIGFuZCB2YWx1ZXMgb2YgYG9iamVjdGAuCiAgICAgICAgICogSWYgYG9iamVjdGAgY29udGFpbnMgZHVwbGljYXRlIHZhbHVlcywgc3Vic2VxdWVudCB2YWx1ZXMgb3ZlcndyaXRlCiAgICAgICAgICogcHJvcGVydHkgYXNzaWdubWVudHMgb2YgcHJldmlvdXMgdmFsdWVzLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDAuNy4wCiAgICAgICAgICogQGNhdGVnb3J5IE9iamVjdAogICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvYmplY3QgVGhlIG9iamVjdCB0byBpbnZlcnQuCiAgICAgICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyB0aGUgbmV3IGludmVydGVkIG9iamVjdC4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogdmFyIG9iamVjdCA9IHsgJ2EnOiAxLCAnYic6IDIsICdjJzogMSB9OwogICAgICAgICAqCiAgICAgICAgICogXy5pbnZlcnQob2JqZWN0KTsKICAgICAgICAgKiAvLyA9PiB7ICcxJzogJ2MnLCAnMic6ICdiJyB9CiAgICAgICAgICovCiAgICAgICAgdmFyIGludmVydCA9IGNyZWF0ZUludm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tpdGVyYXRlZT1fLmlkZW50aXR5XSBUaGUgaXRlcmF0ZWUgaW52b2tlZCBwZXIgZWxlbWVudC4KICAgICAgICAgKiBAcmV0dXJucyB7T2JqZWN0fSBSZXR1cm5zIHRoZSBuZXcgaW52ZXJ0ZWQgb2JqZWN0LgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiB2YXIgb2JqZWN0ID0geyAnYSc6IDEsICdiJzogMiwgJ2MnOiAxIH07CiAgICAgICAgICoKICAgICAgICAgKiBfLmludmVydEJ5KG9iamVjdCk7CiAgICAgICAgICogLy8gPT4geyAnMSc6IFsnYScsICdjJ10sICcyJzogWydiJ10gfQogICAgICAgICAqCiAgICAgICAgICogXy5pbnZlcnRCeShvYmplY3QsIGZ1bmN0aW9uKHZhbHVlKSB7CiAgICAgICAgICogICByZXR1cm4gJ2dyb3VwJyArIHZhbHVlOwogICAgICAgICAqIH0pOwogICAgICAgICAqIC8vID0+IHsgJ2dyb3VwMSc6IFsnYScsICdjJ10sICdncm91cDInOiBbJ2InXSB9CiAgICAgICAgICovCiAgICAgICAgdmFyIGludmVydEJ5ID0gY3JlYXRlSW52ZXJ0ZXIoZnVuY3Rpb24ocmVzdWx0LCB2YWx1ZSwga2V5KSB7CiAgICAgICAgICBpZiAodmFsdWUgIT0gbnVsbCAmJgogICAgICAgICAgICAgIHR5cGVvZiB2YWx1ZS50b1N0cmluZyAhPSAnZnVuY3Rpb24nKSB7CiAgICAgICAgICAgIHZhbHVlID0gbmF0aXZlT2JqZWN0VG9TdHJpbmcuY2FsbCh2YWx1ZSk7CiAgICAgICAgICB9CgogICAgICAgICAgaWYgKGhhc093blByb3BlcnR5LmNhbGwocmVzdWx0LCB2YWx1ZSkpIHsKICAgICAgICAgICAgcmVzdWx0W3ZhbHVlXS5wdXNoKGtleSk7CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICByZXN1bHRbdmFsdWVdID0gW2tleV07CiAgICAgICAgICB9CiAgICAgICAgfSwgZ2V0SXRlcmF0ZWUpOwoKICAgICAgICAvKioKICAgICAgICAgKiBJbnZva2VzIHRoZSBtZXRob2QgYXQgYHBhdGhgIG9mIGBvYmplY3RgLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDQuMC4wCiAgICAgICAgICogQGNhdGVnb3J5IE9iamVjdAogICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvYmplY3QgVGhlIG9iamVjdCB0byBxdWVyeS4KICAgICAgICAgKiBAcGFyYW0ge0FycmF5fHN0cmluZ30gcGF0aCBUaGUgcGF0aCBvZiB0aGUgbWV0aG9kIHRvIGludm9rZS4KICAgICAgICAgKiBAcGFyYW0gey4uLip9IFthcmdzXSBUaGUgYXJndW1lbnRzIHRvIGludm9rZSB0aGUgbWV0aG9kIHdpdGguCiAgICAgICAgICogQHJldHVybnMgeyp9IFJldHVybnMgdGhlIHJlc3VsdCBvZiB0aGUgaW52b2tlZCBtZXRob2QuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIHZhciBvYmplY3QgPSB7ICdhJzogW3sgJ2InOiB7ICdjJzogWzEsIDIsIDMsIDRdIH0gfV0gfTsKICAgICAgICAgKgogICAgICAgICAqIF8uaW52b2tlKG9iamVjdCwgJ2FbMF0uYi5jLnNsaWNlJywgMSwgMyk7CiAgICAgICAgICogLy8gPT4gWzIsIDNdCiAgICAgICAgICovCiAgICAgICAgdmFyIGludm9rZSA9IGJhc2VSZXN0KGJhc2VJbnZva2UpOwoKICAgICAgICAvKioKICAgICAgICAgKiBDcmVhdGVzIGFuIGFycmF5IG9mIHRoZSBvd24gZW51bWVyYWJsZSBwcm9wZXJ0eSBuYW1lcyBvZiBgb2JqZWN0YC4KICAgICAgICAgKgogICAgICAgICAqICoqTm90ZToqKiBOb24tb2JqZWN0IHZhbHVlcyBhcmUgY29lcmNlZCB0byBvYmplY3RzLiBTZWUgdGhlCiAgICAgICAgICogW0VTIHNwZWNdKGh0dHA6Ly9lY21hLWludGVybmF0aW9uYWwub3JnL2VjbWEtMjYyLzcuMC8jc2VjLW9iamVjdC5rZXlzKQogICAgICAgICAqIGZvciBtb3JlIGRldGFpbHMuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQHNpbmNlIDAuMS4wCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAY2F0ZWdvcnkgT2JqZWN0CiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IG9iamVjdCBUaGUgb2JqZWN0IHRvIHF1ZXJ5LgogICAgICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyB0aGUgYXJyYXkgb2YgcHJvcGVydHkgbmFtZXMuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIGZ1bmN0aW9uIEZvbygpIHsKICAgICAgICAgKiAgIHRoaXMuYSA9IDE7CiAgICAgICAgICogICB0aGlzLmIgPSAyOwogICAgICAgICAqIH0KICAgICAgICAgKgogICAgICAgICAqIEZvby5wcm90b3R5cGUuYyA9IDM7CiAgICAgICAgICoKICAgICAgICAgKiBfLmtleXMobmV3IEZvbyk7CiAgICAgICAgICogLy8gPT4gWydhJywgJ2InXSAoaXRlcmF0aW9uIG9yZGVyIGlzIG5vdCBndWFyYW50ZWVkKQogICAgICAgICAqCiAgICAgICAgICogXy5rZXlzKCdoaScpOwogICAgICAgICAqIC8vID0+IFsnMCcsICcxJ10KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBrZXlzKG9iamVjdCkgewogICAgICAgICAgcmV0dXJuIGlzQXJyYXlMaWtlKG9iamVjdCkgPyBhcnJheUxpa2VLZXlzKG9iamVjdCkgOiBiYXNlS2V5cyhvYmplY3QpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhbiBhcnJheSBvZiB0aGUgb3duIGFuZCBpbmhlcml0ZWQgZW51bWVyYWJsZSBwcm9wZXJ0eSBuYW1lcyBvZiBgb2JqZWN0YC4KICAgICAgICAgKgogICAgICAgICAqICoqTm90ZToqKiBOb24tb2JqZWN0IHZhbHVlcyBhcmUgY29lcmNlZCB0byBvYmplY3RzLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDMuMC4wCiAgICAgICAgICogQGNhdGVnb3J5IE9iamVjdAogICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvYmplY3QgVGhlIG9iamVjdCB0byBxdWVyeS4KICAgICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIGFycmF5IG9mIHByb3BlcnR5IG5hbWVzLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBmdW5jdGlvbiBGb28oKSB7CiAgICAgICAgICogICB0aGlzLmEgPSAxOwogICAgICAgICAqICAgdGhpcy5iID0gMjsKICAgICAgICAgKiB9CiAgICAgICAgICoKICAgICAgICAgKiBGb28ucHJvdG90eXBlLmMgPSAzOwogICAgICAgICAqCiAgICAgICAgICogXy5rZXlzSW4obmV3IEZvbyk7CiAgICAgICAgICogLy8gPT4gWydhJywgJ2InLCAnYyddIChpdGVyYXRpb24gb3JkZXIgaXMgbm90IGd1YXJhbnRlZWQpCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24ga2V5c0luKG9iamVjdCkgewogICAgICAgICAgcmV0dXJuIGlzQXJyYXlMaWtlKG9iamVjdCkgPyBhcnJheUxpa2VLZXlzKG9iamVjdCwgdHJ1ZSkgOiBiYXNlS2V5c0luKG9iamVjdCk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBUaGUgb3Bwb3NpdGUgb2YgYF8ubWFwVmFsdWVzYDsgdGhpcyBtZXRob2QgY3JlYXRlcyBhbiBvYmplY3Qgd2l0aCB0aGUKICA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gICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIHZhciB1c2VycyA9IHsKICAgICAgICAgKiAgICdmcmVkJzogICAgeyAndXNlcic6ICdmcmVkJywgICAgJ2FnZSc6IDQwIH0sCiAgICAgICAgICogICAncGViYmxlcyc6IHsgJ3VzZXInOiAncGViYmxlcycsICdhZ2UnOiAxIH0KICAgICAgICAgKiB9OwogICAgICAgICAqCiAgICAgICAgICogXy5tYXBWYWx1ZXModXNlcnMsIGZ1bmN0aW9uKG8pIHsgcmV0dXJuIG8uYWdlOyB9KTsKICAgICAgICAgKiAvLyA9PiB7ICdmcmVkJzogNDAsICdwZWJibGVzJzogMSB9IChpdGVyYXRpb24gb3JkZXIgaXMgbm90IGd1YXJhbnRlZWQpCiAgICAgICAgICoKICAgICAgICAgKiAvLyBUaGUgYF8ucHJvcGVydHlgIGl0ZXJhdGVlIHNob3J0aGFuZC4KICAgICAgICAgKiBfLm1hcFZhbHVlcyh1c2VycywgJ2FnZScpOwogICAgICAgICAqIC8vID0+IHsgJ2ZyZWQnOiA0MCwgJ3BlYmJsZXMnOiAxIH0gKGl0ZXJhdGlvbiBvcmRlciBpcyBub3QgZ3VhcmFudGVlZCkKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBtYXBWYWx1ZXMob2JqZWN0LCBpdGVyYXRlZSkgewogICAgICAgICAgdmFyIHJlc3VsdCA9IHt9OwogICAgICAgICAgaXRlcmF0ZWUgPSBnZXRJdGVyYXRlZShpdGVyYXRlZSwgMyk7CgogICAgICAgICAgYmFzZUZvck93bihvYmplY3QsIGZ1bmN0aW9uKHZhbHVlLCBrZXksIG9iamVjdCkgewogICAgICAgICAgICBiYXNlQXNzaWduVmFsdWUocmVzdWx0LCBrZXksIGl0ZXJhdGVlKHZhbHVlLCBrZXksIG9iamVjdCkpOwogICAgICAgICAgfSk7CiAgICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogV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cmNlIG9iamVjdHMuCiAgICAgICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyBgb2JqZWN0YC4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogdmFyIG9iamVjdCA9IHsKICAgICAgICAgKiAgICdhJzogW3sgJ2InOiAyIH0sIHsgJ2QnOiA0IH1dCiAgICAgICAgICogfTsKICAgICAgICAgKgogICAgICAgICAqIHZhciBvdGhlciA9IHsKICAgICAgICAgKiAgICdhJzogW3sgJ2MnOiAzIH0sIHsgJ2UnOiA1IH1dCiAgICAgICAgICogfTsKICAgICAgICAgKgogICAgICAgICAqIF8ubWVyZ2Uob2JqZWN0LCBvdGhlcik7CiAgICAgICAgICogLy8gPT4geyAnYSc6IFt7ICdiJzogMiwgJ2MnOiAzIH0sIHsgJ2QnOiA0LCAnZSc6IDUgfV0gfQogICAgICAgICAqLwogICAgICAgIHZhciBtZXJnZSA9IGNyZWF0ZUFzc2lnbmVyKGZ1bmN0aW9uKG9iamVjdCwgc291cmNlLCBzcmNJbmRleCkgewogICAgICAgICAgYmFzZU1lcmdlKG9iamVjdCwgc291cmNlLCBzcmNJbmRleCk7CiAgICAgICAgfSk7CgogICAgICAgIC8qKgogICAgICAgICAqIFRoaXMgbWV0aG9kIGlzIGxpa2UgYF8ubWVyZ2VgIGV4Y2VwdCB0aGF0IGl0IGFjY2VwdHMgYGN1c3RvbWl6ZXJgIHdoaWNoCiAgICAgICAgICogaXMgaW52b2tlZCB0byBwcm9kdWNlIHRoZSBtZXJnZWQgdmFsdWVzIG9mIHRoZSBkZXN0aW5hdGlvbiBhbmQgc291cmNlCiAgICAgICAgICogcHJvcGVydGllcy4gSWYgYGN1c3RvbWl6ZXJgIHJldHVybnMgYHVuZGVmaW5lZGAsIG1lcmdpbmcgaXMgaGFuZGxlZCBieSB0aGUKICAgICAgICAgKiBtZXRob2QgaW5zdGVhZC4gVGhlIGBjdXN0b21pemVyYCBpcyBpbnZva2VkIHdpdGggc2l4IGFyZ3VtZW50czoKICAgICAgICAgKiAob2JqVmFsdWUsIHNyY1ZhbHVlLCBrZXksIG9iamVjdCwgc291cmNlLCBzdGFjaykuCiAgICAgICAgICoKICAgICAgICAgKiAqKk5vdGU6KiogVGhpcyBtZXRob2QgbXV0YXRlcyBgb2JqZWN0YC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSA0LjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBPYmplY3QKICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBkZXN0aW5hdGlvbiBvYmplY3QuCiAgICAgICAgICogQHBhcmFtIHsuLi5PYmplY3R9IHNvdXJjZXMgVGhlIHNvdXJjZSBvYmplY3RzLgogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IGN1c3RvbWl6ZXIgVGhlIGZ1bmN0aW9uIHRvIGN1c3RvbWl6ZSBhc3NpZ25lZCB2YWx1ZXMuCiAgICAgICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyBgb2JqZWN0YC4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogZnVuY3Rpb24gY3VzdG9taXplcihvYmpWYWx1ZSwgc3JjVmFsdWUpIHsKICAgICAgICAgKiAgIGlmIChfLmlzQXJyYXkob2JqVmFsdWUpKSB7CiAgICAgICAgICogICAgIHJldHVybiBvYmpWYWx1ZS5jb25jYXQoc3JjVmFsdWUpOwogICAgICAgICAqICAgfQogICAgICAgICAqIH0KICAgICAgICAgKgogICAgICAgICAqIHZhciBvYmplY3QgPSB7ICdhJzogWzFdLCAnYic6IFsyXSB9OwogICAgICAgICAqIHZhciBvdGhlciA9IHsgJ2EnOiBbM10sICdiJzogWzRdIH07CiAgICAgICAgICoKICAgICAgICAgKiBfLm1lcmdlV2l0aChvYmplY3QsIG90aGVyLCBjdXN0b21pemVyKTsKICAgICAgICAgKiAvLyA9PiB7ICdhJzogWzEsIDNdLCAnYic6IFsyLCA0XSB9CiAgICAgICAgICovCiAgICAgICAgdmFyIG1lcmdlV2l0aCA9IGNyZWF0ZUFzc2lnbmVyKGZ1bmN0aW9uKG9iamVjdCwgc291cmNlLCBzcmNJbmRleCwgY3VzdG9taXplcikgewogICAgICAgICAgYmFzZU1lcmdlKG9iamVjdCwgc291cmNlLCBzcmNJbmRleCwgY3VzdG9taXplcik7CiAgICAgICAgfSk7CgogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBvcHBvc2l0ZSBvZiBgXy5waWNrYDsgdGhpcyBtZXRob2QgY3JlYXRlcyBhbiBvYmplY3QgY29tcG9zZWQgb2YgdGhlCiAgICAgICAgICogb3duIGFuZCBpbmhlcml0ZWQgZW51bWVyYWJsZSBwcm9wZXJ0eSBwYXRocyBvZiBgb2JqZWN0YCB0aGF0IGFyZSBub3Qgb21pdHRlZC4KICAgICAgICAgKgogICAgICAgICAqICoqTm90ZToqKiBUaGlzIG1ldGhvZCBpcyBjb25zaWRlcmFibHkgc2xvd2VyIHRoYW4gYF8ucGlja2AuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQHNpbmNlIDAuMS4wCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAY2F0ZWdvcnkgT2JqZWN0CiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IG9iamVjdCBUaGUgc291cmNlIG9iamVjdC4KICAgICAgICAgKiBAcGFyYW0gey4uLihzdHJpbmd8c3RyaW5nW10pfSBbcGF0aHNdIFRoZSBwcm9wZXJ0eSBwYXRocyB0byBvbWl0LgogICAgICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgdGhlIG5ldyBvYmplY3QuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIHZhciBvYmplY3QgPSB7ICdhJzogMSwgJ2InOiAnMicsICdjJzogMyB9OwogICAgICAgICAqCiAgICAgICAgICogXy5vbWl0KG9iamVjdCwgWydhJywgJ2MnXSk7CiAgICAgICAgICogLy8gPT4geyAnYic6ICcyJyB9CiAgICAgICAgICovCiAgICAgICAgdmFyIG9taXQgPSBmbGF0UmVzdChmdW5jdGlvbihvYmplY3QsIHBhdGhzKSB7CiAgICAgICAgICB2YXIgcmVzdWx0ID0ge307CiAgICAgICAgICBpZiAob2JqZWN0ID09IG51bGwpIHsKICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDsKICAgICAgICAgIH0KICAgICAgICAgIHZhciBpc0RlZXAgPSBmYWxzZTsKICAgICAgICAgIHBhdGhzID0gYXJyYXlNYXAocGF0aHMsIGZ1bmN0aW9uKHBhdGgpIHsKICAgICAgICAgICAgcGF0aCA9IGNhc3RQYXRoKHBhdGgsIG9iamVjdCk7CiAgICAgICAgICAgIGlzRGVlcCB8fCAoaXNEZWVwID0gcGF0aC5sZW5ndGggPiAxKTsKICAgICAgICAgICAgcmV0dXJuIHBhdGg7CiAgICAgICAgICB9KTsKICAgICAgICAgIGNvcHlPYmplY3Qob2JqZWN0LCBnZXRBbGxLZXlzSW4ob2JqZWN0KSwgcmVzdWx0KTsKICAgICAgICAgIGlmIChpc0RlZXApIHsKICAgICAgICAgICAgcmVzdWx0ID0gYmFzZUNsb25lKHJlc3VsdCwgQ0xPTkVfREVFUF9GTEFHIHwgQ0xPTkVfRkxBVF9GTEFHIHwgQ0xPTkVfU1lNQk9MU19GTEFHLCBjdXN0b21PbWl0Q2xvbmUpOwogICAgICAgICAgfQogICAgICAgICAgdmFyIGxlbmd0aCA9IHBhdGhzLmxlbmd0aDsKICAgICAgICAgIHdoaWxlIChsZW5ndGgtLSkgewogICAgICAgICAgICBiYXNlVW5zZXQocmVzdWx0LCBwYXRoc1tsZW5ndGhdKTsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgfSk7CgogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBvcHBvc2l0ZSBvZiBgXy5waWNrQnlgOyB0aGlzIG1ldGhvZCBjcmVhdGVzIGFuIG9iamVjdCBjb21wb3NlZCBvZgogICAgICAgICAqIHRoZSBvd24gYW5kIGluaGVyaXRlZCBlbnVtZXJhYmxlIHN0cmluZyBrZXllZCBwcm9wZXJ0aWVzIG9mIGBvYmplY3RgIHRoYXQKICAgICAgICAgKiBgcHJlZGljYXRlYCBkb2Vzbid0IHJldHVybiB0cnV0aHkgZm9yLiBUaGUgcHJlZGljYXRlIGlzIGludm9rZWQgd2l0aCB0d28KICAgICAgICAgKiBhcmd1bWVudHM6ICh2YWx1ZSwga2V5KS4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSA0LjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBPYmplY3QKICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBzb3VyY2Ugb2JqZWN0LgogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IFtwcmVkaWNhdGU9Xy5pZGVudGl0eV0gVGhlIGZ1bmN0aW9uIGludm9rZWQgcGVyIHByb3BlcnR5LgogICAgICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgdGhlIG5ldyBvYmplY3QuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIHZhciBvYmplY3QgPSB7ICdhJzogMSwgJ2InOiAnMicsICdjJzogMyB9OwogICAgICAgICAqCiAgICAgICAgICogXy5vbWl0Qnkob2JqZWN0LCBfLmlzTnVtYmVyKTsKICAgICAgICAgKiAvLyA9PiB7ICdiJzogJzInIH0KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBvbWl0Qnkob2JqZWN0LCBwcmVkaWNhdGUpIHsKICAgICAgICAgIHJldHVybiBwaWNrQnkob2JqZWN0LCBuZWdhdGUoZ2V0SXRlcmF0ZWUocHJlZGljYXRlKSkpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhbiBvYmplY3QgY29tcG9zZWQgb2YgdGhlIHBpY2tlZCBgb2JqZWN0YCBwcm9wZXJ0aWVzLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBzaW5jZSAwLjEuMAogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQGNhdGVnb3J5IE9iamVjdAogICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvYmplY3QgVGhlIHNvdXJjZSBvYmplY3QuCiAgICAgICAgICogQHBhcmFtIHsuLi4oc3RyaW5nfHN0cmluZ1tdKX0gW3BhdGhzXSBUaGUgcHJvcGVydHkgcGF0aHMgdG8gcGljay4KICAgICAgICAgKiBAcmV0dXJucyB7T2JqZWN0fSBSZXR1cm5zIHRoZSBuZXcgb2JqZWN0LgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiB2YXIgb2JqZWN0ID0geyAnYSc6IDEsICdiJzogJzInLCAnYyc6IDMgfTsKICAgICAgICAgKgogICAgICAgICAqIF8ucGljayhvYmplY3QsIFsnYScsICdjJ10pOwogICAgICAgICAqIC8vID0+IHsgJ2EnOiAxLCAnYyc6IDMgfQogICAgICAgICAqLwogICAgICAgIHZhciBwaWNrID0gZmxhdFJlc3QoZnVuY3Rpb24ob2JqZWN0LCBwYXRocykgewogICAgICAgICAgcmV0dXJuIG9iamVjdCA9PSBudWxsID8ge30gOiBiYXNlUGljayhvYmplY3QsIHBhdGhzKTsKICAgICAgICB9KTsKCiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhbiBvYmplY3QgY29tcG9zZWQgb2YgdGhlIGBvYmplY3RgIHByb3BlcnRpZXMgYHByZWRpY2F0ZWAgcmV0dXJucwogICAgICAgICAqIHRydXRoeSBmb3IuIFRoZSBwcmVkaWNhdGUgaXMgaW52b2tlZCB3aXRoIHR3byBhcmd1bWVudHM6ICh2YWx1ZSwga2V5KS4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSA0LjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBPYmplY3QKICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBzb3VyY2Ugb2JqZWN0LgogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IFtwcmVkaWNhdGU9Xy5pZGVudGl0eV0gVGhlIGZ1bmN0aW9uIGludm9rZWQgcGVyIHByb3BlcnR5LgogICAgICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgdGhlIG5ldyBvYmplY3QuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIHZhciBvYmplY3QgPSB7ICdhJzogMSwgJ2InOiAnMicsICdjJzogMyB9OwogICAgICAgICAqCiAgICAgICAgICogXy5waWNrQnkob2JqZWN0LCBfLmlzTnVtYmVyKTsKICAgICAgICAgKiAvLyA9PiB7ICdhJzogMSwgJ2MnOiAzIH0KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBwaWNrQnkob2JqZWN0LCBwcmVkaWNhdGUpIHsKICAgICAgICAgIGlmIChvYmplY3QgPT0gbnVsbCkgewogICAgICAgICAgICByZXR1cm4ge307CiAgICAgICAgICB9CiAgICAgICAgICB2YXIgcHJvcHMgPSBhcnJheU1hcChnZXRBbGxLZXlzSW4ob2JqZWN0KSwgZnVuY3Rpb24ocHJvcCkgewogICAgICAgICAgICByZXR1cm4gW3Byb3BdOwogICAgICAgICAgfSk7CiAgICAgICAgICBwcmVkaWNhdGUgPSBnZXRJdGVyYXRlZShwcmVkaWNhdGUpOwogICAgICAgICAgcmV0dXJuIGJhc2VQaWNrQnkob2JqZWN0LCBwcm9wcywgZnVuY3Rpb24odmFsdWUsIHBhdGgpIHsKICAgICAgICAgICAgcmV0dXJuIHBy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sdChvYmplY3QsICdhWzBdLmIuYzInKTsKICAgICAgICAgKiAvLyA9PiA0CiAgICAgICAgICoKICAgICAgICAgKiBfLnJlc3VsdChvYmplY3QsICdhWzBdLmIuYzMnLCAnZGVmYXVsdCcpOwogICAgICAgICAqIC8vID0+ICdkZWZhdWx0JwogICAgICAgICAqCiAgICAgICAgICogXy5yZXN1bHQob2JqZWN0LCAnYVswXS5iLmMzJywgXy5jb25zdGFudCgnZGVmYXVsdCcpKTsKICAgICAgICAgKiAvLyA9PiAnZGVmYXVsdCcKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiByZXN1bHQob2JqZWN0LCBwYXRoLCBkZWZhdWx0VmFsdWUpIHsKICAgICAgICAgIHBhdGggPSBjYXN0UGF0aChwYXRoLCBvYmplY3QpOwoKICAgICAgICAgIHZhciBpbmRleCA9IC0xLAogICAgICAgICAgICAgIGxlbmd0aCA9IHBhdGgubGVuZ3RoOwoKICAgICAgICAgIC8vIEVuc3VyZSB0aGUgbG9vcCBpcyBlbnRlcmVkIHdoZW4gcGF0aCBpcyBlbXB0eS4KICAgICAgICAgIGlmICghbGVuZ3RoKSB7CiAgICAgICAgICAgIGxlbmd0aCA9IDE7CiAgICAgICAgICAgIG9iamVjdCA9IHVuZGVmaW5lZCQxOwogICAgICAgICAgfQogICAgICAgICAgd2hpbGUgKCsraW5kZXggPCBsZW5ndGgpIHsKICAgICAgICAgICAgdmFyIHZhbHVlID0gb2JqZWN0ID09IG51bGwgPyB1bmRlZmluZWQkMSA6IG9iamVjdFt0b0tleShwYXRoW2luZGV4XSldOwogICAgICAgICAgICBpZiAodmFsdWUgPT09IHVuZGVmaW5lZCQxKSB7CiAgICAgICAgICAgICAgaW5kZXggPSBsZW5ndGg7CiAgICAgICAgICAgICAgdmFsdWUgPSBkZWZhdWx0VmFsdWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgb2JqZWN0ID0gaXNGdW5jdGlvbih2YWx1ZSkgPyB2YWx1ZS5jYWxsKG9iamVjdCkgOiB2YWx1ZTsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiBvYmplY3Q7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIHRoZSB2YWx1ZSBhdCBgcGF0aGAgb2YgYG9iamVjdGAuIElmIGEgcG9ydGlvbiBvZiBgcGF0aGAgZG9lc24ndCBleGlzdCwKICAgICAgICAgKiBpdCdzIGNyZWF0ZWQuIEFycmF5cyBhcmUgY3JlYXRlZCBmb3IgbWlzc2luZyBpbmRleCBwcm9wZXJ0aWVzIHdoaWxlIG9iamVjdHMKICAgICAgICAgKiBhcmUgY3JlYXRlZCBmb3IgYWxsIG90aGVyIG1pc3NpbmcgcHJvcGVydGllcy4gVXNlIGBfLnNldFdpdGhgIHRvIGN1c3RvbWl6ZQogICAgICAgICAqIGBwYXRoYCBjcmVhdGlvbi4KICAgICAgICAgKgogICAgICAgICAqICoqTm90ZToqKiBUaGlzIG1ldGhvZCBtdXRhdGVzIGBvYmplY3RgLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDMuNy4wCiAgICAgICAgICogQGNhdGVnb3J5IE9iamVjdAogICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvYmplY3QgVGhlIG9iamVjdCB0byBtb2RpZnkuCiAgICAgICAgICogQHBhcmFtIHtBcnJheXxzdHJpbmd9IHBhdGggVGhlIHBhdGggb2YgdGhlIHByb3BlcnR5IHRvIHNldC4KICAgICAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBzZXQuCiAgICAgICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyBgb2JqZWN0YC4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogdmFyIG9iamVjdCA9IHsgJ2EnOiBbeyAnYic6IHsgJ2MnOiAzIH0gfV0gfTsKICAgICAgICAgKgogICAgICAgICAqIF8uc2V0KG9iamVjdCwgJ2FbMF0uYi5jJywgNCk7CiAgICAgICAgICogY29uc29sZS5sb2cob2JqZWN0LmFbMF0uYi5jKTsKICAgICAgICAgKiAvLyA9PiA0CiAgICAgICAgICoKICAgICAgICAgKiBfLnNldChvYmplY3QsIFsneCcsICcwJywgJ3knLCAneiddLCA1KTsKICAgICAgICAgKiBjb25zb2xlLmxvZyhvYmplY3QueFswXS55LnopOwogICAgICAgICAqIC8vID0+IDUKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBzZXQob2JqZWN0LCBwYXRoLCB2YWx1ZSkgewogICAgICAgICAgcmV0dXJuIG9iamVjdCA9PSBudWxsID8gb2JqZWN0IDogYmFzZVNldChvYmplY3QsIHBhdGgsIHZhbHVlKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFRoaXMgbWV0aG9kIGlzIGxpa2UgYF8uc2V0YCBleGNlcHQgdGhhdCBpdCBhY2NlcHRzIGBjdXN0b21pemVyYCB3aGljaCBpcwogICAgICAgICAqIGludm9rZWQgdG8gcHJvZHVjZSB0aGUgb2JqZWN0cyBvZiBgcGF0aGAuICBJZiBgY3VzdG9taXplcmAgcmV0dXJucyBgdW5kZWZpbmVkYAogICAgICAgICAqIHBhdGggY3JlYXRpb24gaXMgaGFuZGxlZCBieSB0aGUgbWV0aG9kIGluc3RlYWQuIFRoZSBgY3VzdG9taXplcmAgaXMgaW52b2tlZAogICAgICAgICAqIHdpdGggdGhyZWUgYXJndW1lbnRzOiAobnNWYWx1ZSwga2V5LCBuc09iamVjdCkuCiAgICAgICAgICoKICAgICAgICAgKiAqKk5vdGU6KiogVGhpcyBtZXRob2QgbXV0YXRlcyBgb2JqZWN0YC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSA0LjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBPYmplY3QKICAgICAgICAg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BfLmZyb21QYWlyc2AuIElmIGBvYmplY3RgIGlzIGEgbWFwIG9yIHNldCwgaXRzCiAgICAgICAgICogZW50cmllcyBhcmUgcmV0dXJuZWQuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC4wLjAKICAgICAgICAgKiBAYWxpYXMgZW50cmllcwogICAgICAgICAqIEBjYXRlZ29yeSBPYmplY3QKICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBvYmplY3QgdG8gcXVlcnkuCiAgICAgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBrZXktdmFsdWUgcGFpcnMuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIGZ1bmN0aW9uIEZvbygpIHsKICAgICAgICAgKiAgIHRoaXMuYSA9IDE7CiAgICAgICAgICogICB0aGlzLmIgPSAyOwogICAgICAgICAqIH0KICAgICAgICAgKgogICAgICAgICAqIEZvby5wcm90b3R5cGUuYyA9IDM7CiAgICAgICAgICoKICAgICAgICAgKiBfLnRvUGFpcnMobmV3IEZvbyk7CiAgICAgICAgICogLy8gPT4gW1snYScsIDFdLCBbJ2InLCAyXV0gKGl0ZXJhdGlvbiBvcmRlciBpcyBub3QgZ3VhcmFudGVlZCkKICAgICAgICAgKi8KICAgICAgICB2YXIgdG9QYWlycyA9IGNyZWF0ZVRvUGFpcnMoa2V5cyk7CgogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYW4gYXJyYXkgb2Ygb3duIGFuZCBpbmhlcml0ZWQgZW51bWVyYWJsZSBzdHJpbmcga2V5ZWQtdmFsdWUgcGFpcnMKICAgICAgICAgKiBmb3IgYG9iamVjdGAgd2hpY2ggY2FuIGJlIGNvbnN1bWVkIGJ5IGBfLmZyb21QYWlyc2AuIElmIGBvYmplY3RgIGlzIGEgbWFwCiAgICAgICAgICogb3Igc2V0LCBpdHMgZW50cmllcyBhcmUgcmV0dXJuZWQuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC4wLjAKICAgICAgICAgKiBAYWxpYXMgZW50cmllc0luCiAgICAgICAgICogQGNhdGVnb3J5IE9iamVjdAogICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvYmplY3QgVGhlIG9iamVjdCB0byBxdWVyeS4KICAgICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIGtleS12YWx1ZSBwYWlycy4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogZnVuY3Rpb24gRm9vKCkgewogICAgICAgICAqICAgdGhpcy5hID0gMTsKICAgICAgICAgKiAgIHRoaXMuYiA9IDI7CiAgICAgICAgICogfQogICAgICAgICAqCiAgICAgICAgICogRm9vLnByb3RvdHlwZS5jID0gMzsKICAgICAgICAgKgogICAgICAgICAqIF8udG9QYWlyc0luKG5ldyBGb28pOwogICAgICAgICAqIC8vID0+IFtbJ2EnLCAxXSwgWydiJywgMl0sIFsnYycsIDNdXSAoaXRlcmF0aW9uIG9yZGVyIGlzIG5vdCBndWFyYW50ZWVkKQogICAgICAgICAqLwogICAgICAgIHZhciB0b1BhaXJzSW4gPSBjcmVhdGVUb1BhaXJzKGtleXNJbik7CgogICAgICAgIC8qKgogICAgICAgICAqIEFuIGFsdGVybmF0aXZlIHRvIGBfLnJlZHVjZWA7IHRoaXMgbWV0aG9kIHRyYW5zZm9ybXMgYG9iamVjdGAgdG8gYSBuZXcKICAgICAgICAgKiBgYWNjdW11bGF0b3JgIG9iamVjdCB3aGljaCBpcyB0aGUgcmVzdWx0IG9mIHJ1bm5pbmcgZWFjaCBvZiBpdHMgb3duCiAgICAgICAgICogZW51bWVyYWJsZSBzdHJpbmcga2V5ZWQgcHJvcGVydGllcyB0aHJ1IGBpdGVyYXRlZWAsIHd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CiAgICAgICAgICogICByZXN1bHQucHVzaChuICo9IG4pOwogICAgICAgICAqICAgcmV0dXJuIG4gJSAyID09IDA7CiAgICAgICAgICogfSwgW10pOwogICAgICAgICAqIC8vID0+IFs0LCA5XQogICAgICAgICAqCiAgICAgICAgICogXy50cmFuc2Zvcm0oeyAnYSc6IDEsICdiJzogMiwgJ2MnOiAxIH0sIGZ1bmN0aW9uKHJlc3VsdCwgdmFsdWUsIGtleSkgewogICAgICAgICAqICAgKHJlc3VsdFt2YWx1ZV0gfHwgKHJlc3VsdFt2YWx1ZV0gPSBbXSkpLnB1c2goa2V5KTsKICAgICAgICAgKiB9LCB7fSk7CiAgICAgICAgICogLy8gPT4geyAnMSc6IFsnYScsICdjJ10sICcyJzogWydiJ10gfQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHRyYW5zZm9ybShvYmplY3QsIGl0ZXJhdGVlLCBhY2N1bXVsYXRvcikgewogICAgICAgICAgdmFyIGlzQXJyID0gaXNBcnJheShvYmplY3QpLAogICAgICAgICAgICAgIGlzQXJyTGlrZSA9IGlzQXJyIHx8IGlzQnVmZmVyKG9iamVjdCkgfHwgaXNUeXBlZEFycmF5KG9iamVjdCk7CgogICAgICAgICAgaXRlcmF0ZWUgPSBnZXRJdGVyYXRlZShpdGVyYXRlZSwgNCk7CiAgICAgICAgICBpZiAoYWNjdW11bGF0b3IgPT0gbnVsbCkgewogICAgICAgICAgICB2YXIgQ3RvciA9IG9iamVjdCAmJiBvYmplY3QuY29uc3RydWN0b3I7CiAgICAgICAgICAgIGlmIChpc0Fyckxpa2UpIHsKICAgICAgICAgICAgICBhY2N1bXVsYXRvciA9IGlzQXJyID8gbmV3IEN0b3IgOiBbXTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChpc09iamVjdChvYmplY3QpKSB7CiAgICAgICAgICAgICAgYWNjdW11bGF0b3IgPSBpc0Z1bmN0aW9uKEN0b3IpID8gYmFzZUNyZWF0ZShnZXRQcm90b3R5cGUob2JqZWN0KSkgOiB7fTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICBhY2N1bXVsYXRvciA9IHt9OwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICAoaXNBcnJMaWtlID8gYXJyYXlFYWNoIDogYmFzZUZvck93bikob2JqZWN0LCBmdW5jdGlvbih2YWx1ZSwgaW5kZXgsIG9iamVjdCkgewogICAgICAgICAgICByZXR1cm4gaXRlcmF0ZWUoYWNjdW11bGF0b3IsIHZhbHVlLCBpbmRleCwgb2JqZWN0KTsKICAgICAgICAgIH0pOwogICAgICAgICAgcmV0dXJuIGFjY3VtdWxhdG9yOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogUmVtb3ZlcyB0aGUgcHJvcGVydHkgYXQgYHBhdGhgIG9mIGBvYmplY3RgLgogICAgICAgICAqCiAgICAgICAgICogKipOb3RlOioqIFRoaXMgbWV0aG9kIG11dGF0ZXMgYG9iamVjdGAuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgT2JqZWN0CiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IG9iamVjdCBUaGUgb2JqZWN0IHRvIG1vZGlmeS4KICAgICAgICAgKiBAcGFyYW0ge0FycmF5fHN0cmluZ30gcGF0aCBUaGUgcGF0aCBvZiB0aGUgcHJvcGVydHkgdG8gdW5zZXQuCiAgICAgICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIHRoZSBwcm9wZXJ0eSBpcyBkZWxldGVkLCBlbHNlIGBmYWxzZWAuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIHZhciBvYmplY3QgPSB7ICdhJzogW3sgJ2InOiB7ICdjJzogNyB9IH1dIH07CiAgICAgICAgICogXy51bnNldChvYmplY3QsICdhWzBdLmIuYycpOwogICAgICAgICAqIC8vID0+IHRydWUKICAgICAgICAgKgogICAgICAgICAqIGNvbnNvbGUubG9nKG9iamVjdCk7CiAgICAgICAgICogLy8gPT4geyAnYSc6IFt7ICdiJzoge30gfV0gfTsKICAgICAgICAgKgogICAgICAgICAqIF8udW5zZXQob2JqZWN0LCBbJ2EnLCAnMCcsICdiJywgJ2MnXSk7CiAgICAgICAgICogLy8gPT4gdHJ1ZQogICAgICAgICAqCiAgICAgICAgICogY29uc29sZS5sb2cob2JqZWN0KTsKICAgICAgICAgKiAvLyA9PiB7ICdhJzogW3sgJ2InOiB7fSB9XSB9OwogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHVuc2V0KG9iamVjdCwgcGF0aCkgewogICAgICAgICAgcmV0dXJuIG9iamVjdCA9PSBudWxsID8gdHJ1ZSA6IGJhc2VVbnNldChvYmplY3QsIHBhdGgpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogVGhpcyBtZXRob2QgaXMgbGlrZSBgXy5zZXRgIGV4Y2VwdCB0aGF0IGFjY2VwdHMgYHVwZGF0ZXJgIHRvIHByb2R1Y2UgdGhlCiAgICAgICAgICogdmFsdWUgdG8gc2V0LiBVc2UgYF8udXBkYXRlV2l0aGAgdG8gY3VzdG9taXplIGBwYXRoYCBjcmVhdGlvbi4gVGhlIGB1cGRhdGVyYAogICAgICAgICAqIGlzIGludm9rZWQgd2l0aCBvbmUgYXJndW1lbnQ6ICh2YWx1ZSkuCiAgICAgICAgICoKICAgICAgICAgKiAqKk5vdGU6KiogVGhpcyBtZXRob2QgbXV0YXRlcyBgb2JqZWN0YC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSA0LjYuMAogICAgICAgICAqIEBjYXRlZ29yeSBPYmplY3QKICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gb2J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dHMgYGN1c3RvbWl6ZXJgIHdoaWNoIGlzCiAgICAgICAgICogaW52b2tlZCB0byBwcm9kdWNlIHRoZSBvYmplY3RzIG9mIGBwYXRoYC4gIElmIGBjdXN0b21pemVyYCByZXR1cm5zIGB1bmRlZmluZWRgCiAgICAgICAgICogcGF0aCBjcmVhdGlvbiBpcyBoYW5kbGVkIGJ5IHRoZSBtZXRob2QgaW5zdGVhZC4gVGhlIGBjdXN0b21pemVyYCBpcyBpbnZva2VkCiAgICAgICAgICogd2l0aCB0aHJlZSBhcmd1bWVudHM6IChuc1ZhbHVlLCBrZXksIG5zT2JqZWN0KS4KICAgICAgICAgKgogICAgICAgICAqICoqTm90ZToqKiBUaGlzIG1ldGhvZCBtdXRhdGVzIGBvYmplY3RgLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDQuNi4wCiAgICAgICAgICogQGNhdGVnb3J5IE9iamVjdAogICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvYmplY3QgVGhlIG9iamVjdCB0byBtb2RpZnkuCiAgICAgICAgICogQHBhcmFtIHtBcnJheXxzdHJpbmd9IHBhdGggVGhlIHBhdGggb2YgdGhlIHByb3BlcnR5IHRvIHNldC4KICAgICAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufSB1cGRhdGVyIFRoZSBmdW5jdGlvbiB0byBwcm9kdWNlIHRoZSB1cGRhdGVkIHZhbHVlLgogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IFtjdXN0b21pemVyXSBUaGUgZnVuY3Rpb24gdG8gY3VzdG9taXplIGFzc2lnbmVkIHZhbHVlcy4KICAgICAgICAgKiBAcmV0dXJucyB7T2JqZWN0fSBSZXR1cm5zIGBvYmplY3RgLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiB2YXIgb2JqZWN0ID0ge307CiAgICAgICAgICoKICAgICAgICAgKiBfLnVwZGF0ZVdpdGgob2JqZWN0LCAnWzBdWzFdJywgXy5jb25zdGFudCgnYScpLCBPYmplY3QpOwogICAgICAgICAqIC8vID0+IHsgJzAnOiB7ICcxJzogJ2EnIH0gfQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHVwZGF0ZVdpdGgob2JqZWN0LCBwYXRoLCB1cGRhdGVyLCBjdXN0b21pemVyKSB7CiAgICAgICAgICBjdXN0b21pemVyID0gdHlwZW9mIGN1c3RvbWl6ZXIgPT0gJ2Z1bmN0aW9uJyA/IGN1c3RvbWl6ZXIgOiB1bmRlZmluZWQkMTsKICAgICAgICAgIHJldHVybiBvYmplY3QgPT0gbnVsbCA/IG9iamVjdCA6IGJhc2VVcGRhdGUob2JqZWN0LCBwYXRoLCBjYXN0RnVuY3Rpb24odXBkYXRlciksIGN1c3RvbWl6ZXIpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhbiBhcnJheSBvZiB0aGUgb3duIGVudW1lcmFibGUgc3RyaW5nIGtleWVkIHByb3BlcnR5IHZhbHVlcyBvZiBgb2JqZWN0YC4KICAgICAgICAgKgogICAgICAgICAqICoqTm90ZToqKiBOb24tb2JqZWN0IHZhbHVlcyBhcmUgY29lcmNlZCB0byBvYmplY3RzLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBzaW5jZSAwLjEuMAogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQGNhdGVnb3J5IE9iamVjdAogICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvYmplY3QgVGhlIG9iamVjdCB0byBxdWVyeS4KICAgICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIGFycmF5IG9mIHByb3BlcnR5IHZhbHVlcy4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogZnVuY3Rpb24gRm9vKCkgewogICAgICAgICAqICAgdGhpcy5hID0gMTsKICAgICAgICAgKiAgIHRoaXMuYiA9IDI7CiAgICAgICAgICogfQogICAgICAgICAqCiAgICAgICAgICogRm9vLnByb3RvdHlwZS5jID0gMzsKICAgICAgICAgKgogICAgICAgICAqIF8udmFsdWVzKG5ldyBGb28pOwogICAgICAgICAqIC8vID0+IFsxLCAyXSAoaXRlcmF0aW9uIG9yZGVyIGlzIG5vdCBndWFyYW50ZWVkKQogICAgICAgICAqCiAgICAgICAgICogXy52YWx1ZXMoJ2hpJyk7CiAgICAgICAgICogLy8gPT4gWydoJywgJ2knXQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHZhbHVlcyhvYmplY3QpIHsKICAgICAgICAgIHJldHVybiBvYmplY3QgPT0gbnVsbCA/IFtdIDogYmFzZVZhbHVlcyhvYmplY3QsIGtleXMob2JqZWN0KSk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDcmVhdGVzIGFuIGFycmF5IG9mIHRoZSBvd24gYW5kIGluaGVyaXRlZCBlbnVtZXJhYmxlIHN0cmluZyBrZXllZCBwcm9wZXJ0eQogICAgICAgICAqIHZhbHVlcyBvZiBgb2JqZWN0YC4KICAgICAgICAgKgogICAgICAgICAqICoqTm90ZToqKiBOb24tb2JqZWN0IHZhbHVlcyBhcmUgY29lcmNlZCB0byBvYmplY3RzLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDMuMC4wCiAgICAgICAgICogQGNhdGVnb3J5IE9iamVjdAogICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvYmplY3QgVGhlIG9iamVjdCB0byBxdWVyeS4KICAgICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIGFycmF5IG9mIHByb3BlcnR5IHZhbHVlcy4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogZnVuY3Rpb24gRm9vKCkgewogICAgICAgICAqICAgdGhpcy5hID0gMTsKICAgICAgICAgKiAgIHRoaXMuYiA9IDI7CiAgICAgICAgICogfQogICAgICAgICAqCiAgICAgICAgICogRm9vLnByb3RvdHlwZS5jID0gMzsKICAgICAgICAgKgogICAgICAgICAqIF8udmFsdWVzSW4obmV3IEZvbyk7CiAgICAgICAgICogLy8gPT4gWzEsIDIsIDNdIChpdGVyYXRpb24gb3JkZXIgaXMgbm90IGd1YXJhbnRlZWQpCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gdmFsdWVzSW4ob2JqZWN0KSB7CiAgICAgICAgICByZXR1cm4gb2JqZWN0ID09IG51bGwgPyBbXSA6IGJhc2VWYWx1ZXMob2JqZWN0LCBrZXlzSW4ob2JqZWN0KSk7CiAgICAgICAgfQoKICAgICAgICAvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCgogICAgICAgIC8qKgogICAgICAgICAqIENsYW1wcyBgbnVtYmVyYCB3aXRoaW4gdGhlIGluY2x1c2l2ZSBgbG93ZXJgIGFuZCBgdXBwZXJgIGJvdW5kcy4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSA0LjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBOdW1iZXIKICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gbnVtYmVyIFRoZSBudW1iZXIgdG8gY2xhbXAuCiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IFtsb3dlcl0gVGhlIGxvd2VyIGJvdW5kLgogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSB1cHBlciBUaGUgdXBwZXIgYm91bmQuCiAgICAgICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgY2xhbXBlZCBudW1iZXIuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8uY2xhbXAoLTEwLCAtNSwgNSk7CiAgICAgICAgICogLy8gPT4gLTUKICAgICAgICAgKgogICAgICAgICAqIF8uY2xhbXAoMTAsIC01LCA1KTsKICAgICAgICAgKiAvLyA9PiA1CiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gY2xhbXAobnVtYmVyLCBsb3dlciwgdXBwZXIpIHsKICAgICAgICAgIGlmICh1cHBlciA9PT0gdW5kZWZpbmVkJDEpIHsKICAgICAgICAgICAgdXBwZXIgPSBsb3dlcjsKICAgICAgICAgICAgbG93ZXIgPSB1bmRlZmluZWQkMTsKICAgICAgICAgIH0KICAgICAgICAgIGlmICh1cHBlciAhPT0gdW5kZWZpbmVkJDEpIHsKICAgICAgICAgICAgdXBwZXIgPSB0b051bWJlcih1cHBlcik7CiAgICAgICAgICAgIHVwcGVyID0gdXBwZXIgPT09IHVwcGVyID8gdXBwZXIgOiAwOwogICAgICAgICAgfQogICAgICAgICAgaWYgKGxvd2VyICE9PSB1bmRlZmluZWQkMSkgewogICAgICAgICAgICBsb3dlciA9IHRvTnVtYmVyKGxvd2VyKTsKICAgICAgICAgICAgbG93ZXIgPSBsb3dlciA9PT0gbG93ZXIgPyBsb3dlciA6IDA7CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gYmFzZUNsYW1wKHRvTnVtYmVyKG51bWJlciksIGxvd2VyLCB1cHBlcik7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDaGVja3MgaWYgYG5gIGlzIGJldHdlZW4gYHN0YXJ0YCBhbmQgdXAgdG8sIGJ1dCBub3QgaW5jbHVkaW5nLCBgZW5kYC4gSWYKICAgICAgICAgKiBgZW5kYCBpcyBub3Qgc3BlY2lmaWVkLCBpdCdzIHNldCB0byBgc3RhcnRgIHdpdGggYHN0YXJ0YCB0aGVuIHNldCB0byBgMGAuCiAgICAgICAgICogSWYgYHN0YXJ0YCBpcyBncmVhdGVyIHRoYW4gYGVuZGAgdGhlIHBhcmFtcyBhcmUgc3dhcHBlZCB0byBzdXBwb3J0CiAgICAgICAgICogbmVnYXRpdmUgcmFuZ2VzLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDMuMy4wCiAgICAgICAgICogQGNhdGVnb3J5IE51bWJlcgogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBudW1iZXIgVGhlIG51bWJlciB0byBjaGVjay4KICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gW3N0YXJ0PTBdIFRoZSBzdGFydCBvZiB0aGUgcmFuZ2UuCiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IGVuZCBUaGUgZW5kIG9mIHRoZSByYW5nZS4KICAgICAgICAgKiBAcmV0dXJucyB7Ym9vbGVhbn0gUmV0dXJucyBgdHJ1ZWAgaWYgYG51bWJlcmAgaXMgaW4gdGhlIHJhbmdlLCBlbHNlIGBmYWxzZWAuCiAgICAgICAgICogQHNlZSBfLnJhbmdlLCBfLnJhbmdlUmlnaHQKICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy5pblJhbmdlKDMsIDIsIDQpOwogICAgICAgICAqIC8vID0+IHRydWUKICAgICAgICAgKgogICAgICAgICAqIF8uaW5SYW5nZSg0LCA4KTsKICAgICAgICAgKiAvLyA9PiB0cnVlCiAgICAgICAgICoKICAgICAgICAgKiBfLmluUmFuZ2UoNCwgMik7CiAgICAgICAgICogLy8gPT4gZmFsc2UKICAgICAgICAgKgogICAgICAgICAqIF8uaW5SYW5nZSgyLCAyKTsKICAgICAgICAgKiAvLyA9PiBmYWxzZQogICAgICAgICAqCiAgICAgICAgICogXy5pblJhbmdlKDEuMiwgMik7CiAgICAgICAgICogLy8gPT4gdHJ1ZQogICAgICAgICAqCiAgICAgICAgICogXy5pblJhbmdlKDUuMiwgNCk7CiAgICAgICAgICogLy8gPT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ZwogICAgICAgICAqIGZsb2F0aW5nLXBvaW50IHZhbHVlcyB3aGljaCBjYW4gcHJvZHVjZSB1bmV4cGVjdGVkIHJlc3VsdHMuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgMC43LjAKICAgICAgICAgKiBAY2F0ZWdvcnkgTnVtYmVyCiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IFtsb3dlcj0wXSBUaGUgbG93ZXIgYm91bmQuCiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IFt1cHBlcj0xXSBUaGUgdXBwZXIgYm91bmQuCiAgICAgICAgICogQHBhcmFtIHtib29sZWFufSBbZmxvYXRpbmddIFNwZWNpZnkgcmV0dXJuaW5nIGEgZmxvYXRpbmctcG9pbnQgbnVtYmVyLgogICAgICAgICAqIEByZXR1cm5zIHtudW1iZXJ9IFJldHVybnMgdGhlIHJhbmRvbSBudW1iZXIuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8ucmFuZG9tKDAsIDUpOwogICAgICAgICAqIC8vID0+IGFuIGludGVnZXIgYmV0d2VlbiAwIGFuZCA1CiAgICAgICAgICoKICAgICAgICAgKiBfLnJhbmRvbSg1KTsKICAgICAgICAgKiAvLyA9PiBhbHNvIGFuIGludGVnZXIgYmV0d2VlbiAwIGFuZCA1CiAgICAgICAgICoKICAgICAgICAgKiBfLnJhbmRvbSg1LCB0cnVlKTsKICAgICAgICAgKiAvLyA9PiBhIGZsb2F0aW5nLXBvaW50IG51bWJlciBiZXR3ZWVuIDAgYW5kIDUKICAgICAgICAgKgogICAgICAgICAqIF8ucmFuZG9tKDEuMiwgNS4yKTsKICAgICAgICAgKiAvLyA9PiBhIGZsb2F0aW5nLXBvaW50IG51bWJlciBiZXR3ZWVuIDEuMiBhbmQgNS4yCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gcmFuZG9tKGxvd2VyLCB1cHBlciwgZmxvYXRpbmcpIHsKICAgICAgICAgIGlmIChmbG9hdGluZyAmJiB0eXBlb2YgZmxvYXRpbmcgIT0gJ2Jvb2xlYW4nICYmIGlzSXRlcmF0ZWVDYWxsKGxvd2VyLCB1cHBlciwgZmxvYXRpbmcpKSB7CiAgICAgICAgICAgIHVwcGVyID0gZmxvYXRpbmcgPSB1bmRlZmluZWQkMTsKICAgICAgICAgIH0KICAgICAgICAgIGlmIChmbG9hdGluZyA9PT0gdW5kZWZpbmVkJDEpIHsKICAgICAgICAgICAgaWYgKHR5cGVvZiB1cHBlciA9PSAnYm9vbGVhbicpIHsKICAgICAgICAgICAgICBmbG9hdGluZyA9IHVwcGVyOwogICAgICAgICAgICAgIHVwcGVyID0gdW5kZWZpbmVkJDE7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAodHlwZW9mIGxvd2VyID09ICdib29sZWFuJykgewogICAgICAgICAgICAgIGZsb2F0aW5nID0gbG93ZXI7CiAgICAgICAgICAgICAgbG93ZXIgPSB1bmRlZmluZWQkMTsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgICAgaWYgKGxvd2VyID09PSB1bmRlZmluZWQkMSAmJiB1cHBlciA9PT0gdW5kZWZpbmVkJDEpIHsKICAgICAgICAgICAgbG93ZXIgPSAwOwogICAgICAgICAgICB1cHBlciA9IDE7CiAgICAgICAgICB9CiAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgbG93ZXIgPSB0b0Zpbml0ZShsb3dlcik7CiAgICAgICAgICAgIGlmICh1cHBlciA9PT0gdW5kZWZpbmVkJDEpIHsKICAgICAgICAgICAgICB1cHBlciA9IGxvd2VyOwogICAgICAgICAgICAgIGxvd2VyID0gMDsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICB1cHBlciA9IHRvRmluaXRlKHVwcGVyKTsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgICAgaWYgKGxvd2VyID4gdXBwZXIpIHsKICAgICAgICAgICAgdmFyIHRlbXAgPSBsb3dlcjsKICAgICAgICAgICAgbG93ZXIgPSB1cHBlcjsKICAgICAgICAgICAgdXBwZXIgPSB0ZW1wOwogICAgICAgICAgfQogICAgICAgICAgaWYgKGZsb2F0aW5nIHx8IGxvd2VyICUgMSB8fCB1cHBlciAlIDEpIHsKICAgICAgICAgICAgdmFyIHJhbmQgPSBuYXRpdmVSYW5kb20oKTsKICAgICAgICAgICAgcmV0dXJuIG5hdGl2ZU1pbihsb3dlciArIChyYW5kICogKHVwcGVyIC0gbG93ZXIgKyBmcmVlUGFyc2VGbG9hdCgnMWUtJyArICgocmFuZCArICcnKS5sZW5ndGggLSAxKSkpKSwgdXBwZXIpOwogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIGJhc2VSYW5kb20obG93ZXIsIHVwcGVyKTsKICAgICAgICB9CgogICAgICAgIC8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KCiAgICAgICAgLyoqCiAgICAgICAgICogQ29udmVydHMgYHN0cmluZ2AgdG8gW2NhbWVsIGNhc2VdKGh0dHBzOi8vZW4ud2lraXBlZGlhLm9yZy93aWtpL0NhbWVsQ2FzZSkuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgMy4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgU3RyaW5nCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IFtzdHJpbmc9JyddIFRoZSBzdHJpbmcgdG8gY29udmVydC4KICAgICAgICAgKiBAcmV0dXJucyB7c3RyaW5nfSBSZXR1cm5zIHRoZSBjYW1lbCBjYXNlZCBzdHJpbmcuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8uY2FtZWxDYXNlKCdGb28gQmFyJyk7CiAgICAgICAgICogLy8gPT4gJ2Zvb0JhcicKICAgICAgICAgKgogICAgICAgICAqIF8uY2FtZWxDYXNlKCctLWZvby1iYXItLScpOwogICAgICAgICAqIC8vID0+ICdmb29CYXInCiAgICAgICAgICoKICAgICAgICAgKiBfLmNhbWVsQ2FzZSgnX19GT09fQkFSX18nKTsKICAgICAgICAgKiAvLyA9PiAnZm9vQmFyJwogICAgICAgICAqLwogICAgICAgIHZhciBjYW1lbENhc2UgPSBjcmVhdGVDb21wb3VuZGVyKGZ1bmN0aW9uKHJlc3VsdCwgd29yZCwgaW5kZXgpIHsKICAgICAgICAgIHdvcmQgPSB3b3JkLnRvTG93ZXJDYXNlKCk7CiAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgKGluZGV4ID8gY2FwaXRhbGl6ZSh3b3JkKSA6IHdvcmQpOwogICAgICAgIH0pOwoKICAgICAgICAvKioKICAgICAgICAgKiBDb252ZXJ0cyB0aGUgZmlyc3QgY2hhcmFjdGVyIG9mIGBzdHJpbmdgIHRvIHVwcGVyIGNhc2UgYW5kIHRoZSByZW1haW5pbmcKICAgICAgICAgKiB0byBsb3dlciBjYXNlLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDMuMC4wCiAgICAgICAgICogQGNhdGVnb3J5IFN0cmluZwogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBbc3RyaW5nPScnXSBUaGUgc3RyaW5nIHRvIGNhcGl0YWxpemUuCiAgICAgICAgICogQHJldHVybnMge3N0cmluZ30gUmV0dXJucyB0aGUgY2FwaXRhbGl6ZWQgc3RyaW5nLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLmNhcGl0YWxpemUoJ0ZSRUQnKTsKICAgICAgICAgKiAvLyA9PiAnRnJlZCcKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBjYXBpdGFsaXplKHN0cmluZykgewogICAgICAgICAgcmV0dXJuIHVwcGVyRmlyc3QodG9TdHJpbmcoc3RyaW5nKS50b0xvd2VyQ2FzZSgpKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIERlYnVycnMgYHN0cmluZ2AgYnkgY29udmVydGluZwogICAgICAgICAqIFtMYXRpbi0xIFN1cHBsZW1lbnRdKGh0dHBzOi8vZW4ud2lraXBlZGlhLm9yZy93aWtpL0xhdGluLTFfU3VwcGxlbWVudF8oVW5pY29kZV9ibG9jaykjQ2hhcmFjdGVyX3RhYmxlKQogICAgICAgICAqIGFuZCBbTGF0aW4gRXh0ZW5kZWQtQV0oaHR0cHM6Ly9lbi53aWtpcGVkaWEub3JnL3dpa2kvTGF0aW5fRXh0ZW5kZWQtQSkKICAgICAgICAgKiBsZXR0ZXJzIHRvIGJhc2ljIExhdGluIGxldHRlcnMgYW5kIHJlbW92aW5nCiAgICAgICAgICogW2NvbWJpbmluZyBkaWFjcml0aWNhbCBtYXJrc10oaHR0cHM6Ly9lbi53aWtpcGVkaWEub3JnL3dpa2kvQ29tYmluaW5nX0RpYWNyaXRpY2FsX01hcmtzKS4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAzLjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBTdHJpbmcKICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gW3N0cmluZz0nJ10gVGhlIHN0cmluZyB0byBkZWJ1cnIuCiAgICAgICAgICogQHJldHVybnMge3N0cmluZ30gUmV0dXJucyB0aGUgZGVidXJyZWQgc3RyaW5nLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLmRlYnVycignZMOpasOgIHZ1Jyk7CiAgICAgICAgICogLy8gPT4gJ2RlamEgdnUnCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gZGVidXJyKHN0cmluZykgewogICAgICAgICAgc3RyaW5nID0gdG9TdHJpbmcoc3RyaW5nKTsKICAgICAgICAgIHJldHVybiBzdHJpbmcgJiYgc3RyaW5nLnJlcGxhY2UocmVMYXRpbiwgZGVidXJyTGV0dGVyKS5yZXBsYWNlKHJlQ29tYm9NYXJrLCAnJyk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDaGVja3MgaWYgYHN0cmluZ2AgZW5kcyB3aXRoIHRoZSBnaXZlbiB0YXJnZXQgc3RyaW5nLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDMuMC4wCiAgICAgICAgICogQGNhdGVnb3J5IFN0cmluZwogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBbc3RyaW5nPScnXSBUaGUgc3RyaW5nIHRvIGluc3BlY3QuCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IFt0YXJnZXRdIFRoZSBzdHJpbmcgdG8gc2VhcmNoIGZvci4KICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gW3Bvc2l0aW9uPXN0cmluZy5sZW5ndGhdIFRoZSBwb3NpdGlvbiB0byBzZWFyY2ggdXAgdG8uCiAgICAgICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIGBzdHJpbmdgIGVuZHMgd2l0aCBgdGFyZ2V0YCwKICAgICAgICAgKiAgZWxzZSBgZmFsc2VgLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLmVuZHNXaXRoKCdhYmMnLCAnYycpOwogICAgICAgICAqIC8vID0+IHRydWUKICAgICAgICAgKgogICAgICAgICAqIF8uZW5kc1dpdGgoJ2FiYycsICdiJyk7CiAgICAgICAgICogLy8gPT4gZmFsc2UKICAgICAgICAgKgogICAgICAgICAqIF8uZW5kc1dpdGgoJ2FiYycsICdiJywgMik7CiAgICAgICAgICogLy8gPT4gdHJ1ZQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGVuZHNXaXRoKHN0cmluZywgdGFyZ2V0LCBwb3NpdGlvbikgewogICAgICAgICAgc3RyaW5nID0gdG9TdHJpbmcoc3RyaW5nKTsKICAgICAgICAgIHRhcmdldCA9IGJhc2VUb1N0cmluZyh0YXJnZXQpOwoKICAgICAgICAgIHZhciBsZW5ndGggPSBzdHJpbmcubGVuZ3RoOwogICAgICAgICAgcG9zaXRpb24gPSBwb3NpdGlvbiA9PT0gdW5kZWZpbmVkJDEKICAgICAgICAgICAgPyBsZW5ndGgKICAgICAgICAgICAgOiBiYXNlQ2xhbXAodG9JbnRlZ2VyKHBvc2l0aW9uKSwgMCwgbGVuZ3RoKTsKCiAgICAgICAgICB2YXIgZW5kID0gcG9zaXRpb247CiAgICAgICAgICBwb3NpdGlvbiAtPSB0YXJnZXQubGVuZ3RoOwogICAgICAgICAgcmV0dXJuIHBvc2l0aW9uID49IDAgJiYgc3RyaW5nLnNsaWNlKHBvc2l0aW9uLCBlbmQpID09IHRhcmdldDsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENvbnZlcnRzIHRoZSBjaGFyYWN0ZXJzICImIiwgIjwiLCAiPiIsICciJywgYW5kICInIiBpbiBgc3RyaW5nYCB0byB0aGVpcgogICAgICAgICAqIGNvcnJlc3BvbmRpbmcgSFRNTCBlbnRpdGllcy4KICAgICAgICAgKgogICAgICAgICAqICoqTm90ZToqKiBObyBvdGhlciBjaGFyYWN0ZXJzIGFyZSBlc2NhcGVkLiBUbyBlc2NhcGUgYWRkaXRpb25hbAogICAgICAgICAqIGNoYXJhY3RlcnMgdXNlIGEgdGhpcmQtcGFydHkgbGlicmFyeSBsaWtlIFtfaGVfXShodHRwczovL210aHMuYmUvaGUpLgogICAgICAgICAqCiAgICAgICAgICogVGhvdWdoIHRoZSAiPiIgY2hhcmFjdGVyIGlzIGVzY2FwZWQgZm9yIHN5bW1ldHJ5LCBjaGFyYWN0ZXJzIGxpa2UKICAgICAgICAgKiAiPiIgYW5kICIvIiBkb24ndCBuZWVkIGVzY2FwaW5nIGluIEhUTUwgYW5kIGhhdmUgbm8gc3BlY2lhbCBtZWFuaW5nCiAgICAgICAgICogdW5sZXNzIHRoZXkncmUgcGFydCBvZiBhIHRhZyBvciB1bnF1b3RlZCBhdHRyaWJ1dGUgdmFsdWUuIFNlZQogICAgICAgICAqIFtNYXRoaWFzIEJ5bmVucydzIGFydGljbGVdKGh0dHBzOi8vbWF0aGlhc2J5bmVucy5iZS9ub3Rlcy9hbWJpZ3VvdXMtYW1wZXJzYW5kcykKICAgICAgICAgKiAodW5kZXIgInNlbWktcmVsYXRlZCBmdW4gZmFjdCIpIGZvciBtb3JlIGRldGFpbHMuCiAgICAgICAgICoKICAgICAgICAgKiBXaGVuIHdvcmtpbmcgd2l0aCBIVE1MIHlvdSBzaG91bGQgYWx3YXlzCiAgICAgICAgICogW3F1b3RlIGF0dHJpYnV0ZSB2YWx1ZXNdKGh0dHA6Ly93b25rby5jb20vcG9zdC9odG1sLWVzY2FwaW5nKSB0byByZWR1Y2UKICAgICAgICAgKiBYU1MgdmVjdG9ycy4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAc2luY2UgMC4xLjAKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBjYXRlZ29yeSBTdHJpbmcKICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gW3N0cmluZz0nJ10gVGhlIHN0cmluZyB0byBlc2NhcGUuCiAgICAgICAgICogQHJldHVybnMge3N0cmluZ30gUmV0dXJucyB0aGUgZXNjYXBlZCBzdHJpbmcuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8uZXNjYXBlKCdmcmVkLCBiYXJuZXksICYgcGViYmxlcycpOwogICAgICAgICAqIC8vID0+ICdmcmVkLCBiYXJuZXksICZhbXA7IHBlYmJsZXMnCiAgICAgICAgICovCi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wogICAgICAgICAgcmV0dXJuIChzdHJpbmcgJiYgcmVIYXNSZWdFeHBDaGFyLnRlc3Qoc3RyaW5nKSkKICAgICAgICAgICAgPyBzdHJpbmcucmVwbGFjZShyZVJlZ0V4cENoYXIsICdcXCQmJykKICAgICAgICAgICAgOiBzdHJpbmc7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDb252ZXJ0cyBgc3RyaW5nYCB0bwogICAgICAgICAqIFtrZWJhYiBjYXNlXShodHRwczovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9MZXR0ZXJfY2FzZSNTcGVjaWFsX2Nhc2Vfc3R5bGVzKS4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAzLjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBTdHJpbmcKICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gW3N0cmluZz0nJ10gVGhlIHN0cmluZyB0byBjb252ZXJ0LgogICAgICAgICAqIEByZXR1cm5zIHtzdHJpbmd9IFJldHVybnMgdGhlIGtlYmFiIGNhc2VkIHN0cmluZy4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy5rZWJhYkNhc2UoJ0ZvbyBCYXInKTsKICAgICAgICAgKiAvLyA9PiAnZm9vLWJhcicKICAgICAgICAgKgogICAgICAgICAqIF8ua2ViYWJDYXNlKCdmb29CYXInKTsKICAgICAgICAgKiAvLyA9PiAnZm9vLWJhcicKICAgICAgICAgKgogICAgICAgICAqIF8ua2ViYWJDYXNlKCdfX0ZPT19CQVJfXycpOwogICAgICAgICAqIC8vID0+ICdmb28tYmFyJwogICAgICAgICAqLwogICAgICAgIHZhciBrZWJhYkNhc2UgPSBjcmVhdGVDb21wb3VuZGVyKGZ1bmN0aW9uKHJlc3VsdCwgd29yZCwgaW5kZXgpIHsKICAgICAgICAgIHJldHVybiByZXN1bHQgKyAoaW5kZXggPyAnLScgOiAnJykgKyB3b3JkLnRvTG93ZXJDYXNlKCk7CiAgICAgICAgfSk7CgogICAgICAgIC8qKgogICAgICAgICAqIENvbnZlcnRzIGBzdHJpbmdgLCBhcyBzcGFjZSBzZXBhcmF0ZWQgd29yZHMsIHRvIGxvd2VyIGNhc2UuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgU3RyaW5nCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IFtzdHJpbmc9JyddIFRoZSBzdHJpbmcgdG8gY29udmVydC4KICAgICAgICAgKiBAcmV0dXJucyB7c3RyaW5nfSBSZXR1cm5zIHRoZSBsb3dlciBjYXNlZCBzdHJpbmcuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8ubG93ZXJDYXNlKCctLUZvby1CYXItLScpOwogICAgICAgICAqIC8vID0+ICdmb28gYmFyJwogICAgICAgICAqCiAgICAgICAgICogXy5sb3dlckNhc2UoJ2Zvb0JhcicpOwogICAgICAgICAqIC8vID0+ICdmb28gYmFyJwogICAgICAgICAqCiAgICAgICAgICogXy5sb3dlckNhc2UoJ19fRk9PX0JBUl9fJyk7CiAgICAgICAgICogLy8gPT4gJ2ZvbyBiYXInCiAgICAgICAgICovCiAgICAgICAgdmFyIGxvd2VyQ2FzZSA9IGNyZWF0ZUNvbXBvdW5kZXIoZnVuY3Rpb24ocmVzdWx0LCB3b3JkLCBpbmRleCkgewogICAgICAgICAgcmV0dXJuIHJlc3VsdCArIChpbmRleCA/ICcgJyA6ICcnKSArIHdvcmQudG9Mb3dlckNhc2UoKTsKICAgICAgICB9KTsKCiAgICAgICAgLyoqCiAgICAgICAgICogQ29udmVydHMgdGhlIGZpcnN0IGNoYXJhY3RlciBvZiBgc3RyaW5nYCB0byBsb3dlciBjYXNlLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDQuMC4wCiAgICAgICAgICogQGNhdGVnb3J5IFN0cmluZwogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBbc3RyaW5nPScnXSBUaGUgc3RyaW5nIHRvIGNvbnZlcnQuCiAgICAgICAgICogQHJldHVybnMge3N0cmluZ30gUmV0dXJucyB0aGUgY29udmVydGVkIHN0cmluZy4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy5sb3dlckZpcnN0KCdGcmVkJyk7CiAgICAgICAgICogLy8gPT4gJ2ZyZWQnCiAgICAgICAgICoKICAgICAgICAgKiBfLmxvd2VyRmlyc3QoJ0ZSRUQnKTsKICAgICAgICAgKiAvLyA9PiAnZlJFRCcKICAgICAgICAgKi8KICAgICAgICB2YXIgbG93ZXJGaXJzdCA9IGNyZWF0ZUNhc2VGaXJzdCgndG9Mb3dlckNhc2UnKTsKCiAgICAgICAgLyoqCiAgICAgICAgICogUGFkcyBgc3RyaW5nYCBvbiB0aGUgbGVmdCBhbmQgcmlnaHQgc2lkZXMgaWYgaXQncyBzaG9ydGVyIHRoYW4gYGxlbmd0aGAuCiAgICAgICAgICogUGFkZGluZyBjaGFyYWN0ZXJzIGFyZSB0cnVuY2F0ZWQgaWYgdGhleSBjYW4ndCBiZSBldmVubHkgZGl2aWRlZCBieSBgbGVuZ3RoYC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAzLjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBTdHJpbmcKICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gW3N0cmluZz0nJ10gVGhlIHN0cmluZyB0byBwYWQuCiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IFtsZW5ndGg9MF0gVGhlIHBhZGRpbmcgbGVuZ3RoLgogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBbY2hhcnM9JyAnXSBUaGUgc3RyaW5nIHVzZWQgYXMgcGFkZGluZy4KICAgICAgICAgKiBAcmV0dXJucyB7c3RyaW5nfSBSZXR1cm5zIHRoZSBwYWRkZWQgc3RyaW5nLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLnBhZCgnYWJjJywgOCk7CiAgICAgICAgICogLy8gPT4gJyAgYWJjICAgJwogICAgICAgICAqCiAgICAgICAgICogXy5wYWQoJ2FiYycsIDgsICdfLScpOwogICAgICAgICAqIC8vID0+ICdfLWFiY18tXycKICAgICAgICAgKgogICAgICAgICAqIF8ucGFkKCdhYmMnLCAzKTsKICAgICAgICAgKiAvLyA9PiAnYWJjJwogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHBhZChzdHJpbmcsIGxlbmd0aCwgY2hhcnMpIHsKICAgICAgICAgIHN0cmluZyA9IHRvU3RyaW5nKHN0cmluZyk7CiAgICAgICAgICBsZW5ndGggPSB0b0ludGVnZXIobGVuZ3RoKTsKCiAgICAgICAgICB2YXIgc3RyTGVuZ3RoID0gbGVuZ3RoID8gc3RyaW5nU2l6ZShzdHJpbmcpIDogMDsKICAgICAgICAgIGlmICghbGVuZ3RoIHx8IHN0ckxlbmd0aCA+PSBsZW5ndGgpIHsKICAgICAgICAgICAgcmV0dXJuIHN0cmluZzsKICAgICAgICAgIH0KICAgICAgICAgIHZhciBtaWQgPSAobGVuZ3RoIC0gc3RyTGVuZ3RoKSAvIDI7CiAgICAgICAgICByZXR1cm4gKAogICAgICAgICAgICBjcmVhdGVQYWRkaW5nKG5hdGl2ZUZsb29yKG1pZCksIGNoYXJzKSArCiAgICAgICAgICAgIHN0cmluZyArCiAgICAgICAgICAgIGNyZWF0ZVBhZGRpbmcobmF0aXZlQ2VpbChtaWQpLCBjaGFycykKICAgICAgICAgICk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBQYWRzIGBzdHJpbmdgIG9uIHRoZSByaWdodCBzaWRlIGlmIGl0J3Mgc2hvcnRlciB0aGFuIGBsZW5ndGhgLiBQYWRkaW5nCiAgICAgICAgICogY2hhcmFjdGVycyBhcmUgdHJ1bmNhdGVkIGlmIHRoZXkgZXhjZWVkIGBsZW5ndGhgLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDQuMC4wCiAgICAgICAgICogQGNhdGVnb3J5IFN0cmluZwogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBbc3RyaW5nPScnXSBUaGUgc3RyaW5nIHRvIHBhZC4KICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gW2xlbmd0aD0wXSBUaGUgcGFkZGluZyBsZW5ndGguCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IFtjaGFycz0nICddIFRoZSBzdHJpbmcgdXNlZCBhcyBwYWRkaW5nLgogICAgICAgICAqIEByZXR1cm5zIHtzdHJpbmd9IFJldHVybnMgdGhlIHBhZGRlZCBzdHJpbmcuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8ucGFkRW5kKCdhYmMnLCA2KTsKICAgICAgICAgKiAvLyA9PiAnYWJjICAgJwogICAgICAgICAqCiAgICAgICAgICogXy5wYWRFbmQoJ2FiYycsIDYsICdfLScpOwogICAgICAgICAqIC8vID0+ICdhYmNfLV8nCiAgICAgICAgICoKICAgICAgICAgKiBfLnBhZEVuZCgnYWJjJywgMyk7CiAgICAgICAgICogLy8gPT4gJ2FiYycKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBwYWRFbmQoc3RyaW5nLCBsZW5ndGgsIGNoYXJzKSB7CiAgICAgICAgICBzdHJpbmcgPSB0b1N0cmluZyhzdHJpbmcpOwogICAgICAgICAgbGVuZ3RoID0gdG9JbnRlZ2VyKGxlbmd0aCk7CgogICAgIC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gICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgMS4xLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgU3RyaW5nCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IHN0cmluZyBUaGUgc3RyaW5nIHRvIGNvbnZlcnQuCiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IFtyYWRpeD0xMF0gVGhlIHJhZGl4IHRvIGludGVycHJldCBgdmFsdWVgIGJ5LgogICAgICAgICAqIEBwYXJhbS0ge09iamVjdH0gW2d1YXJkXSBFbmFibGVzIHVzZSBhcyBhbiBpdGVyYXRlZSBmb3IgbWV0aG9kcyBsaWtlIGBfLm1hcGAuCiAgICAgICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgY29udmVydGVkIGludGVnZXIuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8ucGFyc2VJbnQoJzA4Jyk7CiAgICAgICAgICogLy8gPT4gOAogICAgICAgICAqCiAgICAgICAgICogXy5tYXAoWyc2JywgJzA4JywgJzEwJ10sIF8ucGFyc2VJbnQpOwogICAgICAgICAqIC8vID0+IFs2LCA4LCAxMF0KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBwYXJzZUludChzdHJpbmcsIHJhZGl4LCBndWFyZCkgewogICAgICAgICAgaWYgKGd1YXJkIHx8IHJhZGl4ID09IG51bGwpIHsKICAgICAgICAgICAgcmFkaXggPSAwOwogICAgICAgICAgfSBlbHNlIGlmIChyYWRpeCkgewogICAgICAgICAgICByYWRpeCA9ICtyYWRpeDsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiBuYXRpdmVQYXJzZUludCh0b1N0cmluZyhzdHJpbmcpLnJlcGxhY2UocmVUcmltU3RhcnQsICcnKSwgcmFkaXggfHwgMCk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBSZXBlYXRzIHRoZSBnaXZlbiBzdHJpbmcgYG5gIHRpbWVzLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDMuMC4wCiAgICAgICAgICogQGNhdGVnb3J5IFN0cmluZwogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBbc3RyaW5nPScnXSBUaGUgc3RyaW5nIHRvIHJlcGVhdC4KICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gW249MV0gVGhlIG51bWJlciBvZiB0aW1lcyB0byByZXBlYXQgdGhlIHN0cmluZy4KICAgICAgICAgKiBAcGFyYW0tIHtPYmplY3R9IFtndWFyZF0gRW5hYmxlcyB1c2UgYXMgYW4gaXRlcmF0ZWUgZm9yIG1ldGhvZHMgbGlrZSBgXy5tYXBgLgogICAgICAgICAqIEByZXR1cm5zIHtzdHJpbmd9IFJldHVybnMgdGhlIHJlcGVhdGVkIHN0cmluZy4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy5yZXBlYXQoJyonLCAzKTsKICAgICAgICAgKiAvLyA9PiAnKioqJwogICAgICAgICAqCiAgICAgICAgICogXy5yZXBlYXQoJ2FiYycsIDIpOwogICAgICAgICAqIC8vID0+ICdhYmNhYmMnCiAgICAgICAgICoKICAgICAgICAgKiBfLnJlcGVhdCgnYWJjJywgMCk7CiAgICAgICAgICogLy8gPT4gJycKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiByZXBlYXQoc3RyaW5nLCBuLCBndWFyZCkgewogICAgICAgICAgaWYgKChndWFyZCA/IGlzSXRlcmF0ZWVDYWxsKHN0cmluZywgbiwgZ3VhcmQpIDogbiA9PT0gdW5kZWZpbmVkJDEpKSB7CiAgICAgICAgICAgIG4gPSAxOwogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgbiA9IHRvSW50ZWdlcihuKTsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiBiYXNlUmVwZWF0KHRvU3RyaW5nKHN0cmluZyksIG4pOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogUmVwbGFjZXMgbWF0Y2hlcyBmb3IgYHBhdHRlcm5gIGluIGBzdHJpbmdgIHdpdGggYHJlcGxhY2VtZW50YC4KICAgICAgICAgKgogICAgICAgICAqICoqTm90ZToqKiBUaGlzIG1ldGhvZCBpcyBiYXNlZCBvbgogICAgICAgICAqIFtgU3RyaW5nI3JlcGxhY2VgXShodHRwczovL21kbi5pby9TdHJpbmcvcmVwbGFjZSkuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgU3RyaW5nCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IFtzdHJpbmc9JyddIFRoZSBzdHJpbmcgdG8gbW9kaWZ5LgogICAgICAgICAqIEBwYXJhbSB7UmVnRXhwfHN0cmluZ30gcGF0dGVybiBUaGUgcGF0dGVybiB0byByZXBsYWNlLgogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb258c3RyaW5nfSByZXBsYWNlbWVudCBUaGUgbWF0Y2ggcmVwbGFjZW1lbnQuCiAgICAgICAgICogQHJldHVybnMge3N0cmluZ30gUmV0dXJucyB0aGUgbW9kaWZpZWQgc3RyaW5nLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLnJlcGxhY2UoJ0hpIEZyZWQnLCAnRnJlZCcsICdCYXJuZXknKTsKICAgICAgICAgKiAvLyA9PiAnSGkgQmFybmV5JwogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHJlcGxhY2UoKSB7CiAgICAgICAgICB2YXIgYXJncyA9IGFyZ3VtZW50cywKICAgICAgICAgICAgICBzdHJpbmcgPSB0b1N0cmluZyhhcmdzWzBdKTsKCiAgICAgICAgICByZXR1cm4gYXJncy5sZW5ndGggPCAzID8gc3RyaW5nIDogc3RyaW5nLnJlcGxhY2UoYXJnc1sxXSwgYXJnc1syXSk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDb252ZXJ0cyBgc3RyaW5nYCB0bwogICAgICAgICAqIFtzbmFrZSBjYXNlXShodHRwczovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9TbmFrZV9jYXNlKS4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAzLjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBTdHJpbmcKICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gW3N0cmluZz0nJ10gVGhlIHN0cmluZyB0byBjb252ZXJ0LgogICAgICAgICAqIEByZXR1cm5zIHtzdHJpbmd9IFJldHVybnMgdGhlIHNuYWtlIGNhc2VkIHN0cmluZy4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy5zbmFrZUNhc2UoJ0ZvbyBCYXInKTsKICAgICAgICAgKiAvLyA9PiAnZm9vX2JhcicKICAgICAgICAgKgogICAgICAgICAqIF8uc25ha2VDYXNlKCdmb29CYXInKTsKICAgICAgICAgKiAvLyA9PiAnZm9vX2JhcicKICAgICAgICAgKgogICAgICAgICAqIF8uc25ha2VDYXNlKCctLUZPTy1CQVItLScpOwogICAgICAgICAqIC8vID0+ICdmb29fYmFyJwogICAgICAgICAqLwogICAgICAgIHZhciBzbmFrZUNhc2UgPSBjcmVhdGVDb21wb3VuZGVyKGZ1bmN0aW9uKHJlc3VsdCwgd29yZCwgaW5kZXgpIHsKICAgICAgICAgIHJldHVybiByZXN1bHQgKyAoaW5kZXggPyAnXycgOiAnJykgKyB3b3JkLnRvTG93ZXJDYXNlKCk7CiAgICAgICAgfSk7CgogICAgICAgIC8qKgogICAgICAgICAqIFNwbGl0cyBgc3RyaW5nYCBieSBgc2VwYXJhdG9yYC4KICAgICAgICAgKgogICAgICAgICAqICoqTm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Pj4gMDsKICAgICAgICAgIGlmICghbGltaXQpIHsKICAgICAgICAgICAgcmV0dXJuIFtdOwogICAgICAgICAgfQogICAgICAgICAgc3RyaW5nID0gdG9TdHJpbmcoc3RyaW5nKTsKICAgICAgICAgIGlmIChzdHJpbmcgJiYgKAogICAgICAgICAgICAgICAgdHlwZW9mIHNlcGFyYXRvciA9PSAnc3RyaW5nJyB8fAogICAgICAgICAgICAgICAgKHNlcGFyYXRvciAhPSBudWxsICYmICFpc1JlZ0V4cChzZXBhcmF0b3IpKQogICAgICAgICAgICAgICkpIHsKICAgICAgICAgICAgc2VwYXJhdG9yID0gYmFzZVRvU3RyaW5nKHNlcGFyYXRvcik7CiAgICAgICAgICAgIGlmICghc2VwYXJhdG9yICYmIGhhc1VuaWNvZGUoc3RyaW5nKSkgewogICAgICAgICAgICAgIHJldHVybiBjYXN0U2xpY2Uoc3RyaW5nVG9BcnJheShzdHJpbmcpLCAwLCBsaW1pdCk7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiBzdHJpbmcuc3BsaXQoc2VwYXJhdG9yLCBsaW1pdCk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDb252ZXJ0cyBgc3RyaW5nYCB0bwogICAgICAgICAqIFtzdGFydCBjYXNlXShodHRwczovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9MZXR0ZXJfY2FzZSNTdHlsaXN0aWNfb3Jfc3BlY2lhbGlzZWRfdXNhZ2UpLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDMuMS4wCiAgICAgICAgICogQGNhdGVnb3J5IFN0cmluZwogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBbc3RyaW5nPScnXSBUaGUgc3RyaW5nIHRvIGNvbnZlcnQuCiAgICAgICAgICogQHJldHVybnMge3N0cmluZ30gUmV0dXJucyB0aGUgc3RhcnQgY2FzZWQgc3RyaW5nLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLnN0YXJ0Q2FzZSgnLS1mb28tYmFyLS0nKTsKICAgICAgICAgKiAvLyA9PiAnRm9vIEJhcicKICAgICAgICAgKgogICAgICAgICAqIF8uc3RhcnRDYXNlKCdmb29CYXInKTsKICAgICAgICAgKiAvLyA9PiAnRm9vIEJhcicKICAgICAgICAgKgogICAgICAgICAqIF8uc3RhcnRDYXNlKCdfX0ZPT19CQVJfXycpOwogICAgICAgICAqIC8vID0+ICdGT08gQkFSJwogICAgICAgICAqLwogICAgICAgIHZhciBzdGFydENhc2UgPSBjcmVhdGVDb21wb3VuZGVyKGZ1bmN0aW9uKHJlc3VsdCwgd29yZCwgaW5kZXgpIHsKICAgICAgICAgIHJldHVybiByZXN1bHQgKyAoaW5kZXggPyAnICcgOiAnJykgKyB1cHBlckZpcnN0KHdvcmQpOwogICAgICAgIH0pOwoKICAgICAgICAvKioKICAgICAgICAgKiBDaGVja3MgaWYgYHN0cmluZ2Agc3RhcnRzIHdpdGggdGhlIGdpdmVuIHRhcmdldCBzdHJpbmcuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgMy4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgU3RyaW5nCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IFtzdHJpbmc9JyddIFRoZSBzdHJpbmcgdG8gaW5zcGVjdC4KICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gW3RhcmdldF0gVGhlIHN0cmluZyB0byBzZWFyY2ggZm9yLgogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBbcG9zaXRpb249MF0gVGhlIHBvc2l0aW9uIHRvIHNlYXJjaCBmcm9tLgogICAgICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiBgc3RyaW5nYCBz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Kz0gIicgK1xuX19lKCIgKyBlc2NhcGVWYWx1ZSArICIpICtcbiciOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChldmFsdWF0ZVZhbHVlKSB7CiAgICAgICAgICAgICAgaXNFdmFsdWF0aW5nID0gdHJ1ZTsKICAgICAgICAgICAgICBzb3VyY2UgKz0gIic7XG4iICsgZXZhbHVhdGVWYWx1ZSArICI7XG5fX3AgKz0gJyI7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGludGVycG9sYXRlVmFsdWUpIHsKICAgICAgICAgICAgICBzb3VyY2UgKz0gIicgK1xuKChfX3QgPSAoIiArIGludGVycG9sYXRlVmFsdWUgKyAiKSkgPT0gbnVsbCA/ICcnIDogX190KSArXG4nIjsKICAgICAgICAgICAgfQogICAgICAgICAgICBpbmRleCA9IG9mZnNldCArIG1hdGNoLmxlbmd0aDsKCiAgICAgICAgICAgIC8vIFRoZSBKUyBlbmdpbmUgZW1iZWRkZWQgaW4gQWRvYmUgcHJvZHVjdHMgbmVlZHMgYG1hdGNoYCByZXR1cm5lZCBpbgogICAgICAgICAgICAvLyBvcmRlciB0byBwcm9kdWNlIHRoZSBjb3JyZWN0IGBvZmZzZXRgIHZhbHVlLgogICAgICAgICAgICByZXR1cm4gbWF0Y2g7CiAgICAgICAgICB9KTsKCiAgICAgICAgICBzb3VyY2UgKz0gIic7XG4iOwoKICAgICAgICAgIC8vIElmIGB2YXJpYWJsZWAgaXMgbm90IHNwZWNpZmllZCB3cmFwIGEgd2l0aC1zdGF0ZW1lbnQgYXJvdW5kIHRoZSBnZW5lcmF0ZWQKICAgICAgICAgIC8vIGNvZGUgdG8gYWRkIHRoZSBkYXRhIG9iamVjdCB0byB0aGUgdG9wIG9mIHRoZSBzY29wZSBjaGFpbi4KICAgICAgICAgIHZhciB2YXJpYWJsZSA9IGhhc093blByb3BlcnR5LmNhbGwob3B0aW9ucywgJ3ZhcmlhYmxlJykgJiYgb3B0aW9ucy52YXJpYWJsZTsKICAgICAgICAgIGlmICghdmFyaWFibGUpIHsKICAgICAgICAgICAgc291cmNlID0gJ3dpdGggKG9iaikge1xuJyArIHNvdXJjZSArICdcbn1cbic7CiAgICAgICAgICB9CiAgICAgICAgICAvLyBDbGVhbnVwIGNvZGUgYnkgc3RyaXBwaW5nIGVtcHR5IHN0cmluZ3MuCiAgICAgICAgICBzb3VyY2UgPSAoaXNFdmFsdWF0aW5nID8gc291cmNlLnJlcGxhY2UocmVFbXB0eVN0cmluZ0xlYWRpbmcsICcnKSA6IHNvdXJjZSkKICAgICAgICAgICAgLnJlcGxhY2UocmVFbXB0eVN0cmluZ01pZGRsZSwgJyQxJykKICAgICAgICAgICAgLnJlcGxhY2UocmVFbXB0eVN0cmluZ1RyYWlsaW5nLCAnJDE7Jyk7CgogICAgICAgICAgLy8gRnJhbWUgY29kZSBhcyB0aGUgZnVuY3Rpb24gYm9keS4KICAgICAgICAgIHNvdXJjZSA9ICdmdW5jdGlvbignICsgKHZhcmlhYmxlIHx8ICdvYmonKSArICcpIHtcbicgKwogICAgICAgICAgICAodmFyaWFibGUKICAgICAgICAgICAgICA/ICcnCiAgICAgICAgICAgICAgOiAnb2JqIHx8IChvYmogPSB7fSk7XG4nCiAgICAgICAgICAgICkgKwogICAgICAgICAgICAidmFyIF9fdCwgX19wID0gJyciICsKICAgICAgICAgICAgKGlzRXNjYXBpbmcKICAgICAgICAgICAgICAgPyAnLCBfX2UgPSBfLmVzY2FwZScKICAgICAgICAgICAgICAgOiAnJwogICAgICAgICAgICApICsKICAgICAgICAgICAgKGlzRXZhbHVhdGluZwogICAgICAgICAgICAgID8gJywgX19qID0gQXJyYXkucHJvdG90eXBlLmpvaW47XG4nICsKICAgICAgICAgICAgICAgICJmdW5jdGlvbiBwcmludCgpIHsgX19wICs9IF9fai5jYWxsKGFyZ3VtZW50cywgJycpIH1cbiIKICAgICAgICAgICAgICA6ICc7XG4nCiAgICAgICAgICAgICkgKwogICAgICAgICAgICBzb3VyY2UgKwogICAgICAgICAgICAncmV0dXJuIF9fcFxufSc7CgogICAgICAgICAgdmFyIHJlc3VsdCA9IGF0dGVtcHQoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgIHJldHVybiBGdW5jdGlvbihpbXBvcnRzS2V5cywgc291cmNlVVJMICsgJ3JldHVybiAnICsgc291cmNlKQogICAgICAgICAgICAgIC5hcHBseSh1bmRlZmluZWQkMSwgaW1wb3J0c1ZhbHVlcyk7CiAgICAgICAgICB9KTsKCiAgICAgICAgICAvLyBQcm92aWRlIHRoZSBjb21waWxlZCBmdW5jdGlvbidzIHNvdXJjZSBieSBpdHMgYHRvU3RyaW5nYCBtZXRob2Qgb3IKICAgICAgICAgIC8vIHRoZSBgc291cmNlYCBwcm9wZXJ0eSBhcyBhIGNvbnZlbmllbmNlIGZvciBpbmxpbmluZyBjb21waWxlZCB0ZW1wbGF0ZXMuCiAgICAgICAgICByZXN1bHQuc291cmNlID0gc291cmNlOwogICAgICAgICAgaWYgKGlzRXJyb3IocmVzdWx0KSkgewogICAgICAgICAgICB0aHJvdyByZXN1bHQ7CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ29udmVydHMgYHN0cmluZ2AsIGFzIGEgd2hvbGUsIHRvIGxvd2VyIGNhc2UganVzdCBsaWtlCiAgICAgICAgICogW1N0cmluZyN0b0xvd2VyQ2FzZV0oaHR0cHM6Ly9tZG4uaW8vdG9Mb3dlckNhc2UpLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDQuMC4wCiAgICAgICAgICogQGNhdGVnb3J5IFN0cmluZwogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBbc3RyaW5nPScnXSBUaGUgc3RyaW5nIHRvIGNvbnZlcnQuCiAgICAgICAgICogQHJldHVybnMge3N0cmluZ30gUmV0dXJucyB0aGUgbG93ZXIgY2FzZWQgc3RyaW5nLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLnRvTG93ZXIoJy0tRm9vLUJhci0tJyk7CiAgICAgICAgICogLy8gPT4gJy0tZm9vLWJhci0tJwogICAgICAgICAqCiAgICAgICAgICogXy50b0xvd2VyKCdmb29CYXInKTsKICAgICAgICAgKiAvLyA9PiAnZm9vYmFyJwogICAgICAgICAqCiAgICAgICAgICogXy50b0xvd2VyKCdfX0ZPT19CQVJfXycpOwogICAgICAgICAqIC8vID0+ICdfX2Zvb19iYXJfXycKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiB0b0xvd2VyKHZhbHVlKSB7CiAgICAgICAgICByZXR1cm4gdG9TdHJpbmcodmFsdWUpLnRvTG93ZXJDYXNlKCk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDb252ZXJ0cyBgc3RyaW5nYCwgYXMgYSB3aG9sZSwgdG8gdXBwZXIgY2FzZSBqdXN0IGxpa2UKICAgICAgICAgKiBbU3RyaW5nI3RvVXBwZXJDYXNlXShodHRwczovL21kbi5pby90b1VwcGVyQ2FzZSkuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgU3RyaW5nCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IFtzdHJpbmc9JyddIFRoZSBzdHJpbmcgdG8gY29udmVydC4KICAgICAgICAgKiBAcmV0dXJucyB7c3RyaW5nfSBSZXR1cm5zIHRoZSB1cHBlciBjYXNlZCBzdHJpbmcuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8udG9VcHBlcignLS1mb28tYmFyLS0nKTsKICAgICAgICAgKiAvLyA9PiAnLS1GT08tQkFSLS0nCiAgICAgICAgICoKICAgICAgICAgKiBfLnRvVXBwZXIoJ2Zvb0JhcicpOwogICAgICAgICAqIC8vID0+ICdGT09CQVInCiAgICAgICAgICoKICAgICAgICAgKiBfLnRvVXBwZXIoJ19fZm9vX2Jhcl9fJyk7CiAgICAgICAgICogLy8gPT4gJ19fRk9PX0JBUl9fJwogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHRvVXBwZXIodmFsdWUpIHsKICAgICAgICAgIHJldHVybiB0b1N0cmluZyh2YWx1ZSkudG9VcHBlckNhc2UoKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFJlbW92ZXMgbGVhZGluZyBhbmQgdHJhaWxpbmcgd2hpdGVzcGFjZSBvciBzcGVjaWZpZWQgY2hhcmFjdGVycyBmcm9tIGBzdHJpbmdgLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDMuMC4wCiAgICAgICAgICogQGNhdGVnb3J5IFN0cmluZwogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBbc3RyaW5nPScnXSBUaGUgc3RyaW5nIHRvIHRyaW0uCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IFtjaGFycz13aGl0ZXNwYWNlXSBUaGUgY2hhcmFjdGVycyB0byB0cmltLgogICAgICAgICAqIEBwYXJhbS0ge09iamVjdH0gW2d1YXJkXSBFbmFibGVzIHVzZSBhcyBhbiBpdGVyYXRlZSBmb3IgbWV0aG9kcyBsaWtlIGBfLm1hcGAuCiAgICAgICAgICogQHJldHVybnMge3N0cmluZ30gUmV0dXJucyB0aGUgdHJpbW1lZCBzdHJpbmcuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8udHJpbSgnICBhYmMgICcpOwogICAgICAgICAqIC8vID0+ICdhYmMnCiAgICAgICAgICoKICAgICAgICAgKiBfLnRyaW0oJy1fLWFiYy1fLScsICdfLScpOwogICAgICAgICAqIC8vID0+ICdhYmMnCiAgICAgICAgICoKICAgICAgICAgKiBfLm1hcChbJyAgZm9vICAnLCAnICBiYXIgICddLCBfLnRyaW0pOwogICAgICAgICAqIC8vID0+IFsnZm9vJywgJ2JhciddCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gdHJpbShzdHJpbmcsIGNoYXJzLCBndWFyZCkgewogICAgICAgICAgc3RyaW5nID0gdG9TdHJpbmcoc3RyaW5nKTsKICAgICAgICAgIGlmIChzdHJpbmcgJiYgKGd1YXJkIHx8IGNoYXJzID09PSB1bmRlZmluZWQkMSkpIHsKICAgICAgICAgICAgcmV0dXJuIHN0cmluZy5yZXBsYWNlKHJlVHJpbSwgJycpOwogICAgICAgICAgfQogICAgICAgICAgaWYgKCFzdHJpbmcgfHwgIShjaGFycyA9IGJhc2VUb1N0cmluZyhjaGFycykpKSB7CiAgICAgICAgICAgIHJldHVybiBzdHJpbmc7CiAgICAgICAgICB9CiAgICAgICAgICB2YXIgc3RyU3ltYm9scyA9IHN0cmluZ1RvQXJyYXkoc3RyaW5nKSwKICAgICAgICAgICAgICBjaHJTeW1ib2xzID0gc3RyaW5nVG9BcnJheShjaGFycyksCiAgICAgICAgICAgICAgc3RhcnQgPSBjaGFyc1N0YXJ0SW5kZXgoc3RyU3ltYm9scywgY2hyU3ltYm9scyksCiAgICAgICAgICAgICAgZW5kID0gY2hhcnNFbmRJbmRleChzdHJTeW1ib2xzLCBjaHJTeW1ib2xzKSArIDE7CgogICAgICAgICAgcmV0dXJuIGNhc3RTbGljZShzdHJTeW1ib2xzLCBzdGFydCwgZW5kKS5qb2luKCcnKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFJlbW92ZXMgdHJhaWxpbmcgd2hpdGVzcGFjZSBvciBzcGVjaWZpZWQgY2hhcmFjdGVycyBmcm9tIGBzdHJpbmdgLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDQuMC4wCiAgICAgICAgICogQGNhdGVnb3J5IFN0cmluZwogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBbc3RyaW5nPScnXSBUaGUgc3RyaW5nIHRvIHRyaW0uCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IFtjaGFycz13aGl0ZXNwYWNlXSBUaGUgY2hhcmFjdGVycyB0byB0cmltLgogICAgICAgICAqIEBwYXJhbS0ge09iamVjdH0gW2d1YXJkXSBFbmFibGVzIHVzZSBhcyBhbiBpdGVyYXRlZSBmb3IgbWV0aG9kcyBsaWtlIGBfLm1hcGAuCiAgICAgICAgICogQHJldHVybnMge3N0cmluZ30gUmV0dXJucyB0aGUgdHJpbW1lZCBzdHJpbmcuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8udHJpbUVuZCgnICBhYmMgICcpOwogICAgICAgICAqIC8vID0+ICcgIGFiYycKICAgICAgICAgKgogICAgICAgICAqIF8udHJpbUVuZCgnLV8tYWJjLV8tJywgJ18tJyk7CiAgICAgICAgICogLy8gPT4gJy1fLWFiYycKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiB0cmltRW5kKHN0cmluZywgY2hhcnMsIGd1YXJkKSB7CiAgICAgICAgICBzdHJpbmcgPSB0b1N0cmluZyhzdHJpbmcpOwogICAgICAgICAgaWYgKHN0cmluZyAmJiAoZ3VhcmQgfHwgY2hhcnMgPT09IHVuZGVmaW5lZCQxKSkgewogICAgICAgICAgICByZXR1cm4gc3RyaW5nLnJlcGxhY2UocmVUcmltRW5kLCAnJyk7CiAgICAgICAgICB9CiAgICAgICAgICBpZiAoIXN0cmluZyB8fCAhKGNoYXJzID0gYmFzZVRvU3RyaW5nKGNoYXJzKSkpIHsKICAgICAgICAgICAgcmV0dXJuIHN0cmluZzsKICAgICAgICAgIH0KICAgICAgICAgIHZhciBzdHJTeW1ib2xzID0gc3RyaW5nVG9BcnJheShzdHJpbmcpLAogICAgICAgICAgICAgIGVuZCA9IGNoYXJzRW5kSW5kZXgoc3RyU3ltYm9scywgc3RyaW5nVG9BcnJheShjaGFycykpICsgMTsKCiAgICAgICAgICByZXR1cm4gY2FzdFNsaWNlKHN0clN5bWJvbHMsIDAsIGVuZCkuam9pbignJyk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBSZW1vdmVzIGxlYWRpbmcgd2hpdGVzcGFjZSBvciBzcGVjaWZpZWQgY2hhcmFjdGVycyBmcm9tIGBzdHJpbmdgLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDQuMC4wCiAgICAgICAgICogQGNhdGVnb3J5IFN0cmluZwogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBbc3RyaW5nPScnXSBUaGUgc3RyaW5nIHRvIHRyaW0uCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IFtjaGFycz13aGl0ZXNwYWNlXSBUaGUgY2hhcmFjdGVycyB0byB0cmltLgogICAgICAgICAqIEBwYXJhbS0ge09iamVjdH0gW2d1YXJkXSBFbmFibGVzIHVzZSBhcyBhbiBpdGVyYXRlZSBmb3IgbWV0aG9kcyBsaWtlIGBfLm1hcGAuCiAgICAgICAgICogQHJldHVybnMge3N0cmluZ30gUmV0dXJucyB0aGUgdHJpbW1lZCBzdHJpbmcuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8udHJpbVN0YXJ0KCcgIGFiYyAgJyk7CiAgICAgICAgICogLy8gPT4gJ2FiYyAgJwogICAgICAgICAqCiAgICAgICAgICogXy50cmltU3RhcnQoJy1fLWFiYy1fLScsICdfLScpOwogICAgICAgICAqIC8vID0+ICdhYmMtXy0nCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gdHJpbVN0YXJ0KHN0cmluZywgY2hhcnMsIGd1YXJkKSB7CiAgICAgICAgICBzdHJpbmcgPSB0b1N0cmluZyhzdHJpbmcpOwogICAgICAgICAgaWYgKHN0cmluZyAmJiAoZ3VhcmQgfHwgY2hhcnMgPT09IHVuZGVmaW5lZCQxKSkgewogICAgICAgICAgICByZXR1cm4gc3RyaW5nLnJlcGxhY2UocmVUcmltU3RhcnQsICcnKTsKICAgICAgICAgIH0KICAgICAgICAgIGlmICghc3RyaW5nIHx8ICEoY2hhcnMgPSBiYXNlVG9TdHJpbmcoY2hhcnMpKSkgewogICAgICAgICAgICByZXR1cm4gc3RyaW5nOwogICAgICAgICAgfQogICAgICAgICAgdmFyIHN0clN5bWJvbHMgPSBzdHJpbmdUb0FycmF5KHN0cmluZyksCiAgICAgICAgICAgICAgc3RhcnQgPSBjaGFyc1N0YXJ0SW5kZXgoc3RyU3ltYm9scywgc3RyaW5nVG9BcnJheShjaGFycykpOwoKICAgICAgICAgIHJldHVybiBjYXN0U2xpY2Uoc3RyU3ltYm9scywgc3RhcnQpLmpvaW4oJycpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogVHJ1bmNhdGVzIGBzdHJpbmdgIGlmIGl0J3MgbG9uZ2VyIHRoYW4gdGhlIGdpdmVuIG1heGltdW0gc3RyaW5nIGxlbmd0aC4KICAgICAgICAgKiBUaGUgbGFzdCBjaGFyYWN0ZXJzIG9mIHRoZSB0cnVuY2F0ZWQgc3RyaW5nIGFyZSByZXBsYWNlZCB3aXRoIHRoZSBvbWlzc2lvbgogICAgICAgICAqIHN0cmluZyB3aGljaCBkZWZhdWx0cyB0byAiLi4uIi4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSA0LjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBTdHJpbmcKICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gW3N0cmluZz0nJ10gVGhlIHN0cmluZyB0byB0cnVuY2F0ZS4KICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gW29wdGlvbnM9e31d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uLi4nCiAgICAgICAgICoKICAgICAgICAgKiBfLnRydW5jYXRlKCdoaS1kaWRkbHktaG8gdGhlcmUsIG5laWdoYm9yaW5vJywgewogICAgICAgICAqICAgJ29taXNzaW9uJzogJyBbLi4uXScKICAgICAgICAgKiB9KTsKICAgICAgICAgKiAvLyA9PiAnaGktZGlkZGx5LWhvIHRoZXJlLCBuZWlnIFsuLi5dJwogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHRydW5jYXRlKHN0cmluZywgb3B0aW9ucykgewogICAgICAgICAgdmFyIGxlbmd0aCA9IERFRkFVTFRfVFJVTkNfTEVOR1RILAogICAgICAgICAgICAgIG9taXNzaW9uID0gREVGQVVMVF9UUlVOQ19PTUlTU0lPTjsKCiAgICAgICAgICBpZiAoaXNPYmplY3Qob3B0aW9ucykpIHsKICAgICAgICAgICAgdmFyIHNlcGFyYXRvciA9ICdzZXBhcmF0b3InIGluIG9wdGlvbnMgPyBvcHRpb25zLnNlcGFyYXRvciA6IHNlcGFyYXRvcjsKICAgICAgICAgICAgbGVuZ3RoID0gJ2xlbmd0aCcgaW4gb3B0aW9ucyA/IHRvSW50ZWdlcihvcHRpb25zLmxlbmd0aCkgOiBsZW5ndGg7CiAgICAgICAgICAgIG9taXNzaW9uID0gJ29taXNzaW9uJyBpbiBvcHRpb25zID8gYmFzZVRvU3RyaW5nKG9wdGlvbnMub21pc3Npb24pIDogb21pc3Npb247CiAgICAgICAgICB9CiAgICAgICAgICBzdHJpbmcgPSB0b1N0cmluZyhzdHJpbmcpOwoKICAgICAgICAgIHZhciBzdHJMZW5ndGggPSBzdHJpbmcubGVuZ3RoOwogICAgICAgICAgaWYgKGhhc1VuaWNvZGUoc3RyaW5nKSkgewogICAgICAgICAgICB2YXIgc3RyU3ltYm9scyA9IHN0cmluZ1RvQXJyYXkoc3RyaW5nKTsKICAgICAgICAgICAgc3RyTGVuZ3RoID0gc3RyU3ltYm9scy5sZW5ndGg7CiAgICAgICAgICB9CiAgICAgICAgICBpZiAobGVuZ3RoID49IHN0ckxlbmd0aCkgewogICAgICAgICAgICByZXR1cm4gc3RyaW5nOwogICAgICAgICAgfQogICAgICAgICAgdmFyIGVuZCA9IGxlbmd0aCAtIHN0cmluZ1NpemUob21pc3Npb24pOwogICAgICAgICAgaWYgKGVuZCA8IDEpIHsKICAgICAgICAgICAgcmV0dXJuIG9taXNzaW9uOwogICAgICAgICAgfQogICAgICAgICAgdmFyIHJlc3VsdCA9IHN0clN5bWJvbHMKICAgICAgICAgICAgPyBjYXN0U2xpY2Uoc3RyU3ltYm9scywgMCwgZW5kKS5qb2luKCcnKQogICAgICAgICAgICA6IHN0cmluZy5zbGljZSgwLCBlbmQpOwoKICAgICAgICAgIGlmIChzZXBhcmF0b3IgPT09IHVuZGVmaW5lZCQxKSB7CiAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyBvbWlzc2lvbjsKICAgICAgICAgIH0KICAgICAgICAgIGlmIChzdHJTeW1ib2xzKSB7CiAgICAgICAgICAgIGVuZCArPSAocmVzdWx0Lmxlbmd0aCAtIGVuZCk7CiAgICAgICAgICB9CiAgICAgICAgICBpZiAoaXNSZWdFeHAoc2VwYXJhdG9yKSkgewogICAgICAgICAgICBpZiAoc3RyaW5nLnNsaWNlKGVuZCkuc2VhcmNoKHNlcGFyYXRvcikpIHsKICAgICAgICAgICAgICB2YXIgbWF0Y2gsCiAgICAgICAgICAgICAgICAgIHN1YnN0cmluZyA9IHJlc3VsdDsKCiAgICAgICAgICAgICAgaWYgKCFzZXBhcmF0b3IuZ2xvYmFsKSB7CiAgICAgICAgICAgICAgICBzZXBhcmF0b3IgPSBSZWdFeHAoc2VwYXJhdG9yLnNvdXJjZSwgdG9TdHJpbmcocmVGbGFncy5leGVjKHNlcGFyYXRvcikpICsgJ2cnKTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgc2VwYXJhdG9yLmxhc3RJbmRleCA9IDA7CiAgICAgICAgICAgICAgd2hpbGUgKChtYXRjaCA9IHNlcGFyYXRvci5leGVjKHN1YnN0cmluZykpKSB7CiAgICAgICAgICAgICAgICB2YXIgbmV3RW5kID0gbWF0Y2guaW5kZXg7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIHJlc3VsdCA9IHJlc3VsdC5zbGljZSgwLCBuZXdFbmQgPT09IHVuZGVmaW5lZCQxID8gZW5kIDogbmV3RW5kKTsKICAgICAgICAgICAgfQogICAgICAgICAgfSBlbHNlIGlmIChzdHJpbmcuaW5kZXhPZihiYXNlVG9TdHJpbmcoc2VwYXJhdG9yKSwgZW5kKSAhPSBlbmQpIHsKICAgICAgICAgICAgdmFyIGluZGV4ID0gcmVzdWx0Lmxhc3RJbmRleE9mKHNlcGFyYXRvcik7CiAgICAgICAgICAgIGlmIChpbmRleCA+IC0xKSB7CiAgICAgICAgICAgICAgcmVzdWx0ID0gcmVzdWx0LnNsaWNlKDAsIGluZGV4KTsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIHJlc3VsdCArIG9taXNzaW9uOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIGludmVyc2Ugb2YgYF8uZXNjYXBlYDsgdGhpcyBtZXRob2QgY29udmVydHMgdGhlIEhUTUwgZW50aXRpZXMKICAgICAgICAgKiBgJmFtcDtgLCBgJmx0O2AsIGAmZ3Q7YCwgYCZxdW90O2AsIGFuZCBgJiMzOTtgIGluIGBzdHJpbmdgIHRvCiAgICAgICAgICogdGhlaXIgY29ycmVzcG9uZGluZyBjaGFyYWN0ZXJzLgogICAgICAgICAqCiAgICAgICAgICogKipOb3RlOioqIE5vIG90aGVyIEhUTUwgZW50aXRpZXMgYXJlIHVuZXNjYXBlZC4gVG8gdW5lc2NhcGUgYWRkaXRpb25hbAogICAgICAgICAqIEhUTUwgZW50aXRpZXMgdXNlIGEgdGhpcmQtcGFydHkgbGlicmFyeSBsaWtlIFtfaGVfXShodHRwczovL210aHMuYmUvaGUpLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDAuNi4wCiAgICAgICAgICogQGNhdGVnb3J5IFN0cmluZwogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBbc3RyaW5nPScnXSBUaGUgc3RyaW5nIHRvIHVuZXNjYXBlLgogICAgICAgICAqIEByZXR1cm5zIHtzdHJpbmd9IFJldHVybnMgdGhlIHVuZXNjYXBlZCBzdHJpbmcuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8udW5lc2NhcGUoJ2ZyZWQsIGJhcm5leSwgJmFtcDsgcGViYmxlcycpOwogICAgICAgICAqIC8vID0+ICdmcmVkLCBiYXJuZXksICYgcGViYmxlcycKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiB1bmVzY2FwZShzdHJpbmcpIHsKICAgICAgICAgIHN0cmluZyA9IHRvU3RyaW5nKHN0cmluZyk7CiAgICAgICAgICByZXR1cm4gKHN0cmluZyAmJiByZUhhc0VzY2FwZWRIdG1sLnRlc3Qoc3RyaW5nKSkKICAgICAgICAgICAgPyBzdHJpbmcucmVwbGFjZShyZUVzY2FwZWRIdG1sLCB1bmVzY2FwZUh0bWxDaGFyKQogICAgICAgICAgICA6IHN0cmluZzsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENvbnZlcnRzIGBzdHJpbmdgLCBhcyBzcGFjZSBzZXBhcmF0ZWQgd29yZHMsIHRvIHVwcGVyIGNhc2UuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgU3RyaW5nCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IFtzdHJpbmc9JyddIFRoZSBzdHJpbmcgdG8gY29udmVydC4KICAgICAgICAgKiBAcmV0dXJucyB7c3RyaW5nfSBSZXR1cm5zIHRoZSB1cHBlciBjYXNlZCBzdHJpbmcuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8udXBwZXJDYXNlKCctLWZvby1iYXInKTsKICAgICAgICAgKiAvLyA9PiAnRk9PIEJBUicKICAgICAgICAgKgogICAgICAgICAqIF8udXBwZXJDYXNlKCdmb29CYXInKTsKICAgICAgICAgKiAvLyA9PiAnRk9PIEJBUicKICAgICAgICAgKgogICAgICAgICAqIF8udXBwZXJDYXNlKCdfX2Zvb19iYXJfXycpOwogICAgICAgICAqIC8vID0+ICdGT08gQkFSJwogICAgICAgICAqLwogICAgICAgIHZhciB1cHBlckNhc2UgPSBjcmVhdGVDb21wb3VuZGVyKGZ1bmN0aW9uKHJlc3VsdCwgd29yZCwgaW5kZXgpIHsKICAgICAgICAgIHJldHVybiByZXN1bHQgKyAoaW5kZXggPyAnICcgOiAnJykgKyB3b3JkLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgfSk7CgogICAgICAgIC8qKgogICAgICAgICAqIENvbnZlcnRzIHRoZSBmaXJzdCBjaGFyYWN0ZXIgb2YgYHN0cmluZ2AgdG8gdXBwZXIgY2FzZS4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSA0LjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBTdHJpbmcKICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gW3N0cmluZz0nJ10gVGhlIHN0cmluZyB0byBjb252ZXJ0LgogICAgICAgICAqIEByZXR1cm5zIHtzdHJpbmd9IFJldHVybnMgdGhlIGNvbnZlcnRlZCBzdHJpbmcuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8udXBwZXJGaXJzdCgnZnJlZCcpOwogICAgICAgICAqIC8vID0+ICdGcmVkJwogICAgICAgICAqCiAgICAgICAgICogXy51cHBlckZpcnN0KCd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R1cm5zIHRoZSBgZnVuY2AgcmVzdWx0IG9yIGVycm9yIG9iamVjdC4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogLy8gQXZvaWQgdGhyb3dpbmcgZXJyb3JzIGZvciBpbnZhbGlkIHNlbGVjdG9ycy4KICAgICAgICAgKiB2YXIgZWxlbWVudHMgPSBfLmF0dGVtcHQoZnVuY3Rpb24oc2VsZWN0b3IpIHsKICAgICAgICAgKiAgIHJldHVybiBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKHNlbGVjdG9yKTsKICAgICAgICAgKiB9LCAnPl8+Jyk7CiAgICAgICAgICoKICAgICAgICAgKiBpZiAoXy5pc0Vycm9yKGVsZW1lbnRzKSkgewogICAgICAgICAqICAgZWxlbWVudHMgPSBbXTsKICAgICAgICAgKiB9CiAgICAgICAgICovCiAgICAgICAgdmFyIGF0dGVtcHQgPSBiYXNlUmVzdChmdW5jdGlvbihmdW5jLCBhcmdzKSB7CiAgICAgICAgICB0cnkgewogICAgICAgICAgICByZXR1cm4gYXBwbHkoZnVuYywgdW5kZWZpbmVkJDEsIGFyZ3MpOwogICAgICAgICAgfSBjYXRjaCAoZSkgewogICAgICAgICAgICByZXR1cm4gaXNFcnJvcihlKSA/IGUgOiBuZXcgRXJyb3IoZSk7CiAgICAgICAgICB9CiAgICAgICAgfSk7CgogICAgICAgIC8qKgogICAgICAgICAqIEJpbmRzIG1ldGhvZHMgb2YgYW4gb2JqZWN0IHRvIHRoZSBvYmplY3QgaXRzZWxmLCBvdmVyd3JpdGluZyB0aGUgZXhpc3RpbmcKICAgICAgICAgKiBtZXRob2QuCiAgICAgICAgICoKICAgICAgICAgKiAqKk5vdGU6KiogVGhpcyBtZXRob2QgZG9lc24ndCBzZXQgdGhlICJsZW5ndGgiIHByb3BlcnR5IG9mIGJvdW5kIGZ1bmN0aW9ucy4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAc2luY2UgMC4xLjAKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBjYXRlZ29yeSBVdGlsCiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IG9iamVjdCBUaGUgb2JqZWN0IHRvIGJpbmQgYW5kIGFzc2lnbiB0aGUgYm91bmQgbWV0aG9kcyB0by4KICAgICAgICAgKiBAcGFyYW0gey4uLihzdHJpbmd8c3RyaW5nW10pfSBtZXRob2ROYW1lcyBUaGUgb2JqZWN0IG1ldGhvZCBuYW1lcyB0byBiaW5kLgogICAgICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgYG9iamVjdGAuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIHZhciB2aWV3ID0gewogICAgICAgICAqICAgJ2xhYmVsJzogJ2RvY3MnLAogICAgICAgICAqICAgJ2NsaWNrJzogZnVuY3Rpb24oKSB7CiAgICAgICAgICogICAgIGNvbnNvbGUubG9nKCdjbGlja2VkICcgKyB0aGlzLmxhYmVsKTsKICAgICAgICAgKiAgIH0KICAgICAgICAgKiB9OwogICAgICAgICAqCiAgICAgICAgICogXy5iaW5kQWxsKHZpZXcsIFsnY2xpY2snXSk7CiAgICAgICAgICogalF1ZXJ5KGVsZW1lbnQpLm9uKCdjbGljaycsIHZpZXcuY2xpY2spOwogICAgICAgICAqIC8vID0+IExvZ3MgJ2NsaWNrZWQgZG9jcycgd2hlbiBjbGlja2VkLgogICAgICAgICAqLwogICAgICAgIHZhciBiaW5kQWxsID0gZmxhdFJlc3QoZnVuY3Rpb24ob2JqZWN0LCBtZXRob2ROYW1lcykgewogICAgICAgICAgYXJyYXlFYWNoKG1ldGhvZE5hbWVzLCBmdW5jdGlvbihrZXkpIHsKICAgICAgICAgICAga2V5ID0gdG9LZXkoa2V5KTsKICAgICAgICAgICAgYmFzZUFzc2lnblZhbHVlKG9iamVjdCwga2V5LCBiaW5kKG9iamVjdFtrZXldLCBvYmplY3QpKTsKICAgICAgICAgI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ICAgICAgICAgKiBdKTsKICAgICAgICAgKgogICAgICAgICAqIGZ1bmMoeyAnYSc6IDEsICdiJzogMiB9KTsKICAgICAgICAgKiAvLyA9PiAnbWF0Y2hlcyBBJwogICAgICAgICAqCiAgICAgICAgICogZnVuYyh7ICdhJzogMCwgJ2InOiAxIH0pOwogICAgICAgICAqIC8vID0+ICdtYXRjaGVzIEInCiAgICAgICAgICoKICAgICAgICAgKiBmdW5jKHsgJ2EnOiAnMScsICdiJzogJzInIH0pOwogICAgICAgICAqIC8vID0+ICdubyBtYXRjaCcKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBjb25kKHBhaXJzKSB7CiAgICAgICAgICB2YXIgbGVuZ3RoID0gcGFpcnMgPT0gbnVsbCA/IDAgOiBwYWlycy5sZW5ndGgsCiAgICAgICAgICAgICAgdG9JdGVyYXRlZSA9IGdldEl0ZXJhdGVlKCk7CgogICAgICAgICAgcGFpcnMgPSAhbGVuZ3RoID8gW10gOiBhcnJheU1hcChwYWlycywgZnVuY3Rpb24ocGFpcikgewogICAgICAgICAgICBpZiAodHlwZW9mIHBhaXJbMV0gIT0gJ2Z1bmN0aW9uJykgewogICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoRlVOQ19FUlJPUl9URVhUKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gW3RvSXRlcmF0ZWUocGFpclswXSksIHBhaXJbMV1dOwogICAgICAgICAgfSk7CgogICAgICAgICAgcmV0dXJuIGJhc2VSZXN0KGZ1bmN0aW9uKGFyZ3MpIHsKICAgICAgICAgICAgdmFyIGluZGV4ID0gLTE7CiAgICAgICAgICAgIHdoaWxlICgrK2luZGV4IDwgbGVuZ3RoKSB7CiAgICAgICAgICAgICAgdmFyIHBhaXIgPSBwYWlyc1tpbmRleF07CiAgICAgICAgICAgICAgaWYgKGFwcGx5KHBhaXJbMF0sIHRoaXMsIGFyZ3MpKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gYXBwbHkocGFpclsxXSwgdGhpcywgYXJncyk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICB9KTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYSBmdW5jdGlvbiB0aGF0IGludm9rZXMgdGhlIHByZWRpY2F0ZSBwcm9wZXJ0aWVzIG9mIGBzb3VyY2VgIHdpdGgKICAgICAgICAgKiB0aGUgY29ycmVzcG9uZGluZyBwcm9wZXJ0eSB2YWx1ZXMgb2YgYSBnaXZlbiBvYmplY3QsIHJldHVybmluZyBgdHJ1ZWAgaWYKICAgICAgICAgKiBhbGwgcHJlZGljYXRlcyByZXR1cm4gdHJ1dGh5LCBlbHNlIGBmYWxzZWAuCiAgICAgICAgICoKICAgICAgICAgKiAqKk5vdGU6KiogVGhlIGNyZWF0ZWQgZnVuY3Rpb24gaXMgZXF1aXZhbGVudCB0byBgXy5jb25mb3Jtc1RvYCB3aXRoCiAgICAgICAgICogYHNvdXJjZWAgcGFydGlhbGx5IGFwcGxpZWQuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgVXRpbAogICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBzb3VyY2UgVGhlIG9iamVjdCBvZiBwcm9wZXJ0eSBwcmVkaWNhdGVzIHRvIGNvbmZvcm0gdG8uCiAgICAgICAgICogQHJldHVybnMge0Z1bmN0aW9ufSBSZXR1cm5zIHRoZSBuZXcgc3BlYyBmdW5jdGlvbi4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogdmFyIG9iamVjdHMgPSBbCiAgICAgICAgICogICB7ICdhJzogMiwgJ2InOiAxIH0sCiAgICAgICAgICogICB7ICdhJzogMSwgJ2InOiAyIH0KICAgICAgICAgKiBdOwogICAgICAgICAqCiAgICAgICAgICogXy5maWx0ZXIob2JqZWN0cywgXy5jb25mb3Jtcyh7ICdiJzogZnVuY3Rpb24obikgeyByZXR1cm4gbiA+IDE7IH0gfSkpOwogICAgICAgICAqIC8vID0+IFt7ICdhJzogMSwgJ2InOiAyIH1dCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gY29uZm9ybXMoc291cmNlKSB7CiAgICAgICAgICByZXR1cm4gYmFzZUNvbmZvcm1zKGJhc2VDbG9uZShzb3VyY2UsIENMT05FX0RFRVBfRkxBRykpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhIGZ1bmN0aW9uIHRoYXQgcmV0dXJucyBgdmFsdWVgLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDIuNC4wCiAgICAgICAgICogQGNhdGVnb3J5IFV0aWwKICAgICAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byByZXR1cm4gZnJvbSB0aGUgbmV3IGZ1bmN0aW9uLgogICAgICAgICAqIEByZXR1cm5zIHtGdW5jdGlvbn0gUmV0dXJucyB0aGUgbmV3IGNvbnN0YW50IGZ1bmN0aW9uLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiB2YXIgb2JqZWN0cyA9IF8udGltZXMoMiwgXy5jb25zdGFudCh7ICdhJzogMSB9KSk7CiAgICAgICAgICoKICAgICAgICAgKiBjb25zb2xlLmxvZyhvYmplY3RzKTsKICAgICAgICAgKiAvLyA9PiBbeyAnYSc6IDEgfSwgeyAnYSc6IDEgfV0KICAgICAgICAgKgogICAgICAgICAqIGNvbnNvbGUubG9nKG9iamVjdHNbMF0gPT09IG9iamVjdHNbMV0pOwogICAgICAgICAqIC8vID0+IHRydWUKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBjb25zdGFudCh2YWx1ZSkgewogICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uKCkgewogICAgICAgICAgICByZXR1cm4gdmFsdWU7CiAgICAgICAgICB9OwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ2hlY2tzIGB2YWx1ZWAgdG8gZGV0ZXJtaW5lIHdoZXRoZXIgYSBkZWZhdWx0IHZhbHVlIHNob3VsZCBiZSByZXR1cm5lZCBpbgogICAgICAgICAqIGl0cyBwbGFjZS4gVGhlIGBkZWZhdWx0VmFsdWVgIGlzIHJldHVybmVkIGlmIGB2YWx1ZWAgaXMgYE5hTmAsIGBudWxsYCwKICAgICAgICAgKiBvciBgdW5kZWZpbmVkYC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSA0LjE0LjAKICAgICAgICAgKiBAY2F0ZWdvcnkgVXRpbAogICAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIGNoZWNrLgogICAgICAgICAqIEBwYXJhbSB7Kn0gZGVmYXVsdFZhbHVlIFRoZSBkZWZhdWx0IHZhbHVlLgogICAgICAgICAqIEByZXR1cm5zIHsqfSBSZXR1cm5zIHRoZSByZXNvbHZlZCB2YWx1ZS4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy5kZWZhdWx0VG8oMSwgMTApOwogICAgICAgICAqIC8vID0+IDEKICAgICAgICAgKgogICAgICAgICAqIF8uZGVmYXVsdFRvKHVuZGVmaW5lZCwgMTApOwogICAgICAgICAqIC8vID0+IDEwCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gZGVmYXVsdFRvKHZhbHVlLCBkZWZhdWx0VmFsdWUpIHsKICAgICAgICAgIHJldHVybiAodmFsdWUgPT0gbnVsbCB8fCB2YWx1ZSAhPT0gdmFsdWUpID8gZGVmYXVsdFZhbHVlIDogdmFsdWU7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDcmVhdGVzIGEgZnVuY3Rpb24gdGhhdCByZXR1cm5zIHRoZSByZXN1bHQgb2YgaW52b2tpbmcgdGhlIGdpdmVuIGZ1bmN0aW9ucwogICAgICAgICAqIHdpdGggdGhlIGB0aGlzYCBiaW5kaW5nIG9mIHRoZSBjcmVhdGVkIGZ1bmN0aW9uLCB3aGVyZSBlYWNoIHN1Y2Nlc3NpdmUKICAgICAgICAgKiBpbnZvY2F0aW9uIGlzIHN1cHBsaWVkIHRoZSByZXR1cm4gdmFsdWUgb2YgdGhlIHByZXZpb3VzLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDMuMC4wCiAgICAgICAgICogQGNhdGVnb3J5IFV0aWwKICAgICAgICAgKiBAcGFyYW0gey4uLihGdW5jdGlvbnxGdW5jdGlvbltdKX0gW2Z1bmNzXSBUaGUgZnVuY3Rpb25zIHRvIGludm9rZS4KICAgICAgICAgKiBAcmV0dXJucyB7RnVuY3Rpb259IFJldHVybnMgdGhlIG5ldyBjb21wb3NpdGUgZnVuY3Rpb24uCiAgICAgICAgICogQHNlZSBfLmZsb3dSaWdodAogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBmdW5jdGlvbiBzcXVhcmUobikgewogICAgICAgICAqICAgcmV0dXJuIG4gKiBuOwogICAgICAgICAqIH0KICAgICAgICAgKgogICAgICAgICAqIHZhciBhZGRTcXVhcmUgPSBfLmZsb3coW18uYWRkLCBzcXVhcmVdKTsKICAgICAgICAgKiBhZGRTcXVhcmUoMSwgMik7CiAgICAgICAgICogLy8gPT4gOQogICAgICAgICAqLwogICAgICAgIHZhciBmbG93ID0gY3JlYXRlRmxvdygpOwoKICAgICAgICAvKioKICAgICAgICAgKiBUaGlzIG1ldGhvZCBpcyBsaWtlIGBfLmZsb3dgIGV4Y2VwdCB0aGF0IGl0IGNyZWF0ZXMgYSBmdW5jdGlvbiB0aGF0CiAgICAgICAgICogaW52b2tlcyB0aGUgZ2l2ZW4gZnVuY3Rpb25zIGZyb20gcmlnaHQgdG8gbGVmdC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAc2luY2UgMy4wLjAKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBjYXRlZ29yeSBVdGlsCiAgICAgICAgICogQHBhcmFtIHsuLi4oRnVuY3Rpb258RnVuY3Rpb25bXSl9IFtmdW5jc10gVGhlIGZ1bmN0aW9ucyB0byBpbnZva2UuCiAgICAgICAgICogQHJldHVybnMge0Z1bmN0aW9ufSBSZXR1cm5zIHRoZSBuZXcgY29tcG9zaXRlIGZ1bmN0aW9uLgogICAgICAgICAqIEBzZWUgXy5mbG93CiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIGZ1bmN0aW9uIHNxdWFyZShuKSB7CiAgICAgICAgICogICByZXR1cm4gbiAqIG47CiAgICAgICAgICogfQogICAgICAgICAqCiAgICAgICAgICogdmFyIGFkZFNxdWFyZSA9IF8uZmxvd1JpZ2h0KFtzcXVhcmUsIF8uYWRkXSk7CiAgICAgICAgICogYWRkU3F1YXJlKDEsIDIpOwogICAgICAgICAqIC8vID0+IDkKICAgICAgICAgKi8KICAgICAgICB2YXIgZmxvd1JpZ2h0ID0gY3JlYXRlRmxvdyh0cnVlKTsKCiAgICAgICAgLyoqCiAgICAgICAgICogVGhpcyBtZXRob2QgcmV0dXJucyB0aGUgZmlyc3QgYXJndW1lbnQgaXQgcmVjZWl2ZXMuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQHNpbmNlIDAuMS4wCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAY2F0ZWdvcnkgVXRpbAogICAgICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgQW55IHZhbHVlLgogICAgICAgICAqIEByZXR1cm5zIHsqfSBSZXR1cm5zIGB2YWx1ZWAuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIHZhciBvYmplY3QgPSB7ICdhJzogMSB9OwogICAgICAgICAqCiAgICAgICAgICogY29uc29sZS5sb2coXy5pZGVudGl0eShvYmplY3QpID09PSBvYmplY3QpOwogICAgICAgICAqIC8vID0+IHRydWUKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBpZGVudGl0eSh2YWx1ZSkgewogICAgICAgICAgcmV0dXJuIHZhbHVlOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhIGZ1bmN0aW9uIHRoYXQgaW52b2tlcyBgZnVuY2Agd2l0aCB0aGUgYXJndW1lbnRzIG9mIHRoZSBjcmVhdGVkCiAgICAgICAgICogZnVuY3Rpb24uIElmIGBmdW5jYCBpcyBhIHByb3BlcnR5IG5hbWUsIHRoZSBjcmVhdGVkIGZ1bmN0aW9uIHJldHVybnMgdGhlCiAgICAgICAgICogcHJvcGVydHkgdmFsdWUgZm9yIGEgZ2l2ZW4gZWxlbWVudC4gSWYgYGZ1bmNgIGlzIGFuIGFycmF5IG9yIG9iamVjdCwgdGhlCiAgICAgICAgICogY3JlYXRlZCBmdW5jdGlvbiByZXR1cm5zIGB0cnVlYCBmb3IgZWxlbWVudHMgdGhhdCBjb250YWluIHRoZSBlcXVpdmFsZW50CiAgICAgICAgICogc291cmNlIHByb3BlcnRpZXMsIG90aGVyd2lzZSBpdCByZXR1cm5zIGBmYWxzZWAuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQHNpbmNlIDQuMC4wCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAY2F0ZWdvcnkgVXRpbAogICAgICAgICAqIEBwYXJhbSB7Kn0gW2Z1bmM9Xy5pZGVudGl0eV0gVGhlIHZhbHVlIHRvIGNvbnZlcnQgdG8gYSBjYWxsYmFjay4KICAgICAgICAgKiBAc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JzogNCwgJ2InOiA1LCAnYyc6IDYgfV0KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBtYXRjaGVzUHJvcGVydHkocGF0aCwgc3JjVmFsdWUpIHsKICAgICAgICAgIHJldHVybiBiYXNlTWF0Y2hlc1Byb3BlcnR5KHBhdGgsIGJhc2VDbG9uZShzcmNWYWx1ZSwgQ0xPTkVfREVFUF9GTEFHKSk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDcmVhdGVzIGEgZnVuY3Rpb24gdGhhdCBpbnZva2VzIHRoZSBtZXRob2QgYXQgYHBhdGhgIG9mIGEgZ2l2ZW4gb2JqZWN0LgogICAgICAgICAqIEFueSBhZGRpdGlvbmFsIGFyZ3VtZW50cyBhcmUgcHJvdmlkZWQgdG8gdGhlIGludm9rZWQgbWV0aG9kLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDMuNy4wCiAgICAgICAgICogQGNhdGVnb3J5IFV0aWwKICAgICAgICAgKiBAcGFyYW0ge0FycmF5fHN0cmluZ30gcGF0aCBUaGUgcGF0aCBvZiB0aGUgbWV0aG9kIHRvIGludm9rZS4KICAgICAgICAgKiBAcGFyYW0gey4uLip9IFthcmdzXSBUaGUgYXJndW1lbnRzIHRvIGludm9rZSB0aGUgbWV0aG9kIHdpdGguCiAgICAgICAgICogQHJldHVybnMge0Z1bmN0aW9ufSBSZXR1cm5zIHRoZSBuZXcgaW52b2tlciBmdW5jdGlvbi4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogdmFyIG9iamVjdHMgPSBbCiAgICAgICAgICogICB7ICdhJzogeyAnYic6IF8uY29uc3RhbnQoMikgfSB9LAogICAgICAgICAqICAgeyAnYSc6IHsgJ2InOiBfLmNvbnN0YW50KDEpIH0gfQogICAgICAgICAqIF07CiAgICAgICAgICoKICAgICAgICAgKiBfLm1hcChvYmplY3RzLCBfLm1ldGhvZCgnYS5iJykpOwogICAgICAgICAqIC8vID0+IFsyLCAxXQogICAgICAgICAqCiAgICAgICAgICogXy5tYXAob2JqZWN0cywgXy5tZXRob2QoWydhJywgJ2InXSkpOwogICAgICAgICAqIC8vID0+IFsyLCAxXQogICAgICAgICAqLwogICAgICAgIHZhciBtZXRob2QgPSBiYXNlUmVzdChmdW5jdGlvbihwYXRoLCBhcmdzKSB7CiAgICAgICAgICByZXR1cm4gZnVuY3Rpb24ob2JqZWN0KSB7CiAgICAgICAgICAgIHJldHVybiBiYXNlSW52b2tlKG9iamVjdCwgcGF0aCwgYXJncyk7CiAgICAgICAgICB9OwogICAgICAgIH0pOwoKICAgICAgICAvKioKICAgICAgICAgKiBUaGUgb3Bwb3NpdGUgb2YgYF8ubWV0aG9kYDsgdGhpcyBtZXRob2QgY3JlYXRlcyBhIGZ1bmN0aW9uIHRoYXQgaW52b2tlcwogICAgICAgICAqIHRoZSBtZXRob2QgYXQgYSBnaXZlbiBwYXRoIG9mIGBvYmplY3RgLiBBbnkgYWRkaXRpb25hbCBhcmd1bWVudHMgYXJlCiAgICAgICAgICogcHJvdmlkZWQgdG8gdGhlIGludm9rZWQgbWV0aG9kLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDMuNy4wCiAgICAgICAgICogQGNhdGVnb3J5IFV0aWwKICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBvYmplY3QgdG8gcXVlcnkuCiAgICAgICAgICogQHBhcmFtIHsuLi4qfSBbYXJnc10gVGhlIGFyZ3VtZW50cyB0byBpbnZva2UgdGhlIG1ldGhvZCB3aXRoLgogICAgICAgICAqIEByZXR1cm5zIHtGdW5jdGlvbn0gUmV0dXJucyB0aGUgbmV3IGludm9rZXIgZnVuY3Rpb24uCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIHZhciBhcnJheSA9IF8udGltZXMoMywgXy5jb25zdGFudCksCiAgICAgICAgICogICAgIG9iamVjdCA9IHsgJ2EnOiBhcnJheSwgJ2InOiBhcnJheSwgJ2MnOiBhcnJheSB9OwogICAgICAgICAqCiAgICAgICAgICogXy5tYXAoWydhWzJdJywgJ2NbMF0nXSwgXy5tZXRob2RPZihvYmplY3QpKTsKICAgICAgICAgKiAvLyA9PiBbMiwgMF0KICAgICAgICAgKgogICAgICAgICAqIF8ubWFwKFtbJ2EnLCAnMiddLCBbJ2MnLCAnMCddXSwgXy5tZXRob2RPZihvYmplY3QpKTsKICAgICAgICAgKiAvLyA9PiBbMiwgMF0KICAgICAgICAgKi8KICAgICAgICB2YXIgbWV0aG9kT2YgPSBiYXNlUmVzdChmdW5jdGlvbihvYmplY3QsIGFyZ3MpIHsKICAgICAgICAgIHJldHVybiBmdW5jdGlvbihwYXRoKSB7CiAgICAgICAgICAgIHJldHVybiBiYXNlSW52b2tlKG9iamVjdCwgcGF0aCwgYXJncyk7CiAgICAgICAgICB9OwogICAgICAgIH0pOwoKICAgICAgICAvKioKICAgICAgICAgKiBBZGRzIGFsbCBvd24gZW51bWVyYWJsZSBzdHJpbmcga2V5ZWQgZnVuY3Rpb24gcHJvcGVydGllcyBvZiBhIHNvdXJjZQogICAgICAgICAqIG9iamVjdCB0byB0aGUgZGVzdGluYXRpb24gb2JqZWN0LiBJZiBgb2JqZWN0YCBpcyBhIGZ1bmN0aW9uLCB0aGVuIG1ldGhvZHMKICAgICAgICAgKiBhcmUgYWRkZWQgdG8gaXRzIHByb3RvdHlwZSBhcyB3ZWxsLgogICAgICAgICAqCiAgICAgICAgICogKipOb3RlOioqIFVzZSBgXy5ydW5JbkNvbnRleHRgIHRvIGNyZWF0ZSBhIHByaXN0aW5lIGBsb2Rhc2hgIGZ1bmN0aW9uIHRvCiAgICAgICAgICogYXZvaWQgY29uZmxpY3RzIGNhdXNlZCBieSBtb2RpZnlpbmcgdGhlIG9yaWdpbmFsLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBzaW5jZSAwLjEuMAogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQGNhdGVnb3J5IFV0aWwKICAgICAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufE9iamVjdH0gW29iamVjdD1sb2Rhc2hdIFRoZSBkZXN0aW5hdGlvbiBvYmplY3QuCiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IHNvdXJjZSBUaGUgb2JqZWN0IG9mIGZ1bmN0aW9ucyB0byBhZGQuCiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IFtvcHRpb25zPXt9XSBUaGUgb3B0aW9ucyBvYmplY3QuCiAgICAgICAgICogQHBhcmFtIHtib29sZWFufSBbb3B0aW9ucy5jaGFpbj10cnVlXSBTcGVjaWZ5IHdoZXRoZXIgbWl4aW5zIGFyZSBjaGFpbmFibGUuCiAgICAgICAgICogQHJldHVybnMge0Z1bmN0aW9ufE9iamVjdH0gUmV0dXJucyBgb2JqZWN0YC4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogZnVuY3Rpb24gdm93ZWxzKHN0cmluZykgewogICAgICAgICAqICAgcmV0dXJuIF8uZmlsdGVyKHN0cmluZywgZnVuY3Rpb24odikgewogICAgICAgICAqICAgICByZXR1cm4gL1thZWlvdV0vaS50ZXN0KHYpOwogICAgICAgICAqICAgfSk7CiAgICAgICAgICogfQogICAgICAgICAqCiAgICAgICAgICogXy5taXhpbih7ICd2b3dlbHMnOiB2b3dlbHMgfSk7CiAgICAgICAgICogXy52b3dlbHMoJ2ZyZWQnKTsKICAgICAgICAgKiAvLyA9PiBbJ2UnXQogICAgICAgICAqCiAgICAgICAgICogXygnZnJlZCcpLnZvd2VscygpLnZhbHVlKCk7CiAgICAgICAgICogLy8gPT4gWydlJ10KICAgICAgICAgKgogICAgICAgICAqIF8ubWl4aW4oeyAndm93ZWxzJzogdm93ZWxzIH0sIHsgJ2NoYWluJzogZmFsc2UgfSk7CiAgICAgICAgICogXygnZnJlZCcpLnZvd2VscygpOwogICAgICAgICAqIC8vID0+IFsnZSddCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gbWl4aW4ob2JqZWN0LCBzb3VyY2UsIG9wdGlvbnMpIHsKICAgICAgICAgIHZhciBwcm9wcyA9IGtleXMoc291cmNlKSwKICAgICAgICAgICAgICBtZXRob2ROYW1lcyA9IGJhc2VGdW5jdGlvbnMoc291cmNlLCBwcm9wcyk7CgogICAgICAgICAgaWYgKG9wdGlvbnMgPT0gbnVsbCAmJgogICAgICAgICAgICAgICEoaXNPYmplY3Qoc291cmNlKSAmJiAobWV0aG9kTmFtZXMubGVuZ3RoIHx8ICFwcm9wcy5sZW5ndGgpKSkgewogICAgICAgICAgICBvcHRpb25zID0gc291cmNlOwogICAgICAgICAgICBzb3VyY2UgPSBvYmplY3Q7CiAgICAgICAgICAgIG9iamVjdCA9IHRoaXM7CiAgICAgICAgICAgIG1ldGhvZE5hbWVzID0gYmFzZUZ1bmN0aW9ucyhzb3VyY2UsIGtleXMoc291cmNlKSk7CiAgICAgICAgICB9CiAgICAgICAgICB2YXIgY2hhaW4gPSAhKGlzT2JqZWN0KG9wdGlvbnMpICYmICdjaGFpbicgaW4gb3B0aW9ucykgfHwgISFvcHRpb25zLmNoYWluLAogICAgICAgICAgICAgIGlzRnVuYyA9IGlzRnVuY3Rpb24ob2JqZWN0KTsKCiAgICAgICAgICBhcnJheUVhY2gobWV0aG9kTmFtZXMsIGZ1bmN0aW9uKG1ldGhvZE5hbWUpIHsKICAgICAgICAgICAgdmFyIGZ1bmMgPSBzb3VyY2VbbWV0aG9kTmFtZV07CiAgICAgICAgICAgIG9iamVjdFttZXRob2ROYW1lXSA9IGZ1bmM7CiAgICAgICAgICAgIGlmIChpc0Z1bmMpIHsKICAgICAgICAgICAgICBvYmplY3QucHJvdG90eXBlW21ldGhvZE5hbWVdID0gZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICB2YXIgY2hhaW5BbGwgPSB0aGlzLl9fY2hhaW5fXzsKICAgICAgICAgICAgICAgIGlmIChjaGFpbiB8fCBjaGFpbkFsbCkgewogICAgICAgICAgICAgICAgICB2YXIgcmVzdWx0ID0gb2JqZWN0KHRoaXMuX193cmFwcGVkX18pLAogICAgICAgICAgICAgICAgICAgICAgYWN0aW9ucyA9IHJlc3VsdC5fX2FjdGlvbnNfXyA9IGNvcHlBcnJheSh0aGlzLl9fYWN0aW9uc19fKTsKCiAgICAgICAgICAgICAgICAgIGFjdGlvbnMucHVzaCh7ICdmdW5jJzogZnVuYywgJ2FyZ3MnOiBhcmd1bWVudHMsICd0aGlzQXJnJzogb2JqZWN0IH0pOwogICAgICAgICAgICAgICAgICByZXN1bHQuX19jaGFpbl9fID0gY2hhaW5BbGw7CiAgICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gZnVuYy5hcHBseShvYmplY3QsIGFycmF5UHVzaChbdGhpcy52YWx1ZSgpXSwgYXJndW1lbnRzKSk7CiAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgfQogICAgICAgICAgfSk7CgogICAgICAgICAgcmV0dXJuIG9iamVjdDsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFJldmVydHMgdGhlIGBfYCB2YXJpYWJsZSB0byBpdHMgcHJldmlvdXMgdmFsdWUgYW5kIHJldHVybnMgYSByZWZlcmVuY2UgdG8KICAgICAgICAgKiB0aGUgYGxvZGFzaGAgZnVuY3Rpb24uCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQHNpbmNlIDAuMS4wCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAY2F0ZWdvcnkgVXRpbAogICAgICAgICAqIEByZXR1cm5zIHtGdW5jdGlvbn0gUmV0dXJucyB0aGUgYGxvZGFzaGAgZnVuY3Rpb24uCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIHZhciBsb2Rhc2ggPSBfLm5vQ29uZmxpY3QoKTsKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBub0NvbmZsaWN0KCkgewogICAgICAgICAgaWYgKHJvb3QuXyA9PT0gdGhpcykgewogICAgICAgICAgICByb290Ll8gPSBvbGREYXNoOwogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBUaGlzIG1ldGhvZCByZXR1cm5zIGB1bmRlZmluZWRgLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDIuMy4wCiAgICAgICAgICogQGNhdGVnb3J5IFV0aWwKICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy50aW1lcygyLCBfLm5vb3ApOwogICAgICAgICAqIC8vID0+IFt1bmRlZmluZWQsIHVuZGVmaW5lZF0KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBub29wKCkgewogICAgICAgICAgLy8gTm8gb3BlcmF0aW9uIHBlcmZvcm1lZC4KICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYSBmdW5jdGlvbiB0aGF0IGdldHMgdGhlIGFyZ3VtZW50IGF0IGluZGV4IGBuYC4gSWYgYG5gIGlzIG5lZ2F0aXZlLAogICAgICAgICAqIHRoZSBudGggYXJndW1lbnQgZnJvbSB0aGUgZW5kIGlzIHJldHVybmVkLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDQuMC4wCiAgICAgICAgICogQGNhdGVnb3J5IFV0aWwKICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gW249MF0gVGhlIGluZGV4IG9mIHRoZSBhcmd1bWVudCB0byByZXR1cm4uCiAgICAgICAgICogQHJldHVybnMge0Z1bmN0aW9ufSBSZXR1cm5zIHRoZSBuZXcgcGFzcy10aHJ1IGZ1bmN0aW9uLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiB2YXIgZnVuYyA9IF8ubnRoQXJnKDEpOwogICAgICAgICAqIGZ1bmMoJ2EnLCAnYicsICdjJywgJ2QnKTsKICAgICAgICAgKiAvLyA9PiAnYicKICAgICAgICAgKgogICAgICAgICAqIHZhciBmdW5jID0gXy5udGhBcmcoLTIpOwogICAgICAgICAqIGZ1bmMoJ2EnLCAnYicsICdjJywgJ2QnKTsKICAgICAgICAgKiAvLyA9PiAnYycKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBudGhBcmcobikgewogICAgICAgICAgbiA9IHRvSW50ZWdlcihuKTsKICAgICAgICAgIHJldHVybiBiYXNlUmVzdChmdW5jdGlvbihhcmdzKSB7CiAgICAgICAgICAgIHJldHVybiBiYXNlTnRoKGFyZ3MsIG4pOwogICAgICAgICAgfSk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDcmVhdGVzIGEgZnVuY3Rpb24gdGhhdCBpbnZva2VzIGBpdGVyYXRlZXNgIHdpdGggdGhlIGFyZ3VtZW50cyBpdCByZWNlaXZlcwogICAgICAgICAqIGFuZCByZXR1cm5zIHRoZWlyIHJlc3VsdHMuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgVXRpbAogICAgICAgICAqIEBwYXJhbSB7Li4uKEZ1bmN0aW9ufEZ1bmN0aW9uW10pfSBbaXRlcmF0ZWVzPVtfLmlkZW50aXR5XV0KICAgICAgICAgKiAgVGhlIGl0ZXJhdGVlcyB0byBpbnZva2UuCiAgICAgICAgICogQHJldHVybnMge0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N0aW9uW10pfSBbcHJlZGljYXRlcz1bXy5pZGVudGl0eV1dCiAgICAgICAgICogIFRoZSBwcmVkaWNhdGVzIHRvIGNoZWNrLgogICAgICAgICAqIEByZXR1cm5zIHtGdW5jdGlvbn0gUmV0dXJucyB0aGUgbmV3IGZ1bmN0aW9uLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiB2YXIgZnVuYyA9IF8ub3ZlckV2ZXJ5KFtCb29sZWFuLCBpc0Zpbml0ZV0pOwogICAgICAgICAqCiAgICAgICAgICogZnVuYygnMScpOwogICAgICAgICAqIC8vID0+IHRydWUKICAgICAgICAgKgogICAgICAgICAqIGZ1bmMobnVsbCk7CiAgICAgICAgICogLy8gPT4gZmFsc2UKICAgICAgICAgKgogICAgICAgICAqIGZ1bmMoTmFOKTsKICAgICAgICAgKiAvLyA9PiBmYWxzZQogICAgICAgICAqLwogICAgICAgIHZhciBvdmVyRXZlcnkgPSBjcmVhdGVPdmVyKGFycmF5RXZlcnkpOwoKICAgICAgICAvKioKICAgICAgICAgKiBDcmVhdGVzIGEgZnVuY3Rpb24gdGhhdCBjaGVja3MgaWYgKiphbnkqKiBvZiB0aGUgYHByZWRpY2F0ZXNgIHJldHVybgogICAgICAgICAqIHRydXRoeSB3aGVuIGludm9rZWQgd2l0aCB0aGUgYXJndW1lbnRzIGl0IHJlY2VpdmVzLgogICAgICAgICAqCiAgICAgICAgICogRm9sbG93aW5nIHNob3J0aGFuZHMgYXJlIHBvc3NpYmxlIGZvciBwcm92aWRpbmcgcHJlZGljYXRlcy4KICAgICAgICAgKiBQYXNzIGFuIGBPYmplY3RgIGFuZCBpdCB3aWxsIGJlIHVzZWQgYXMgYW4gcGFyYW1ldGVyIGZvciBgXy5tYXRjaGVzYCB0byBjcmVhdGUgdGhlIHByZWRpY2F0ZS4KICAgICAgICAgKiBQYXNzIGFuIGBBcnJheWAgb2YgcGFyYW1ldGVycyBmb3IgYF8ubWF0Y2hlc1Byb3BlcnR5YCBhbmQgdGhlIHByZWRpY2F0ZSB3aWxsIGJlIGNyZWF0ZWQgdXNpbmcgdGhlbS4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSA0LjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBVdGlsCiAgICAgICAgICogQHBhcmFtIHsuLi4oRnVuY3Rpb258RnVuY3Rpb25bXSl9IFtwcmVkaWNhdGVzPVtfLmlkZW50aXR5XV0KICAgICAgICAgKiAgVGhlIHByZWRpY2F0ZXMgdG8gY2hlY2suCiAgICAgICAgICogQHJldHVybnMge0Z1bmN0aW9ufSBSZXR1cm5zIHRoZSBuZXcgZnVuY3Rpb24uCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIHZhciBmdW5jID0gXy5vdmVyU29tZShbQm9vbGVhbiwgaXNGaW5pdGVdKTsKICAgICAgICAgKgogICAgICAgICAqIGZ1bmMoJzEnKTsKICAgICAgICAgKiAvLyA9PiB0cnVlCiAgICAgICAgICoKICAgICAgICAgKiBmdW5jKG51bGwpOwogICAgICAgICAqIC8vID0+IHRydWUKICAgICAgICAgKgogICAgICAgICAqIGZ1bmMoTmFOKTsKICAgICAgICAgKiAvLyA9PiBmYWxzZQogICAgICAgICAqCiAgICAgICAgICogdmFyIG1hdGNoZXNGdW5jID0gXy5vdmVyU29tZShbeyAnYSc6IDEgfSwgeyAnYSc6IDIgfV0pCiAgICAgICAgICogdmFyIG1hdGNoZXNQcm9wZXJ0eUZ1bmMgPSBfLm92ZXJTb21lKFtbJ2EnLCAxXSwgWydhJywgMl1dKQogICAgICAgICAqLwogICAgICAgIHZhciBvdmVyU29tZSA9IGNyZWF0ZU92ZXIoYXJyYXlTb21lKTsKCiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhIGZ1bmN0aW9uIHRoYXQgcmV0dXJucyB0aGUgdmFsdWUgYXQgYHBhdGhgIG9mIGEgZ2l2ZW4gb2JqZWN0LgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDIuNC4wCiAgICAgICAgICogQGNhdGVnb3J5IFV0aWwKICAgICAgICAgKiBAcGFyYW0ge0FycmF5fHN0cmluZ30gcGF0aCBUaGUgcGF0aCBvZiB0aGUgcHJvcGVydHkgdG8gZ2V0LgogICAgICAgICAqIEByZXR1cm5zIHtGdW5jdGlvbn0gUmV0dXJucyB0aGUgbmV3IGFjY2Vzc29yIGZ1bmN0aW9uLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiB2YXIgb2JqZWN0cyA9IFsKICAgICAgICAgKiAgIHsgJ2EnOiB7ICdiJzogMiB9IH0sCiAgICAgICAgICogICB7ICdhJzogeyAnYic6IDEgfSB9CiAgICAgICAgICogXTsKICAgICAgICAgKgogICAgICAgICAqIF8ubWFwKG9iamVjdHMsIF8ucHJvcGVydHkoJ2EuYicpKTsKICAgICAgICAgKiAvLyA9PiBbMiwgMV0KICAgICAgICAgKgogICAgICAgICAqIF8ubWFwKF8uc29ydEJ5KG9iamVjdHMsIF8ucHJvcGVydHkoWydhJywgJ2InXSkpLCAnYS5iJyk7CiAgICAgICAgICogLy8gPT4gWzEsIDJdCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gcHJvcGVydHkocGF0aCkgewogICAgICAgICAgcmV0dXJuIGlzS2V5KHBhdGgpID8gYmFzZVByb3BlcnR5KHRvS2V5KHBhdGgpKSA6IGJhc2VQcm9wZXJ0eURlZXAocGF0aCk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBUaGUgb3Bwb3NpdGUgb2YgYF8ucHJvcGVydHlgOyB0aGlzIG1ldGhvZCBjcmVhdGVzIGEgZnVuY3Rpb24gdGhhdCByZXR1cm5zCiAgICAgICAgICogdGhlIHZhbHVlIGF0IGEgZ2l2ZW4gcGF0aCBvZiBgb2JqZWN0YC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAzLjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBVdGlsCiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IG9iamVjdCBUaGUgb2JqZWN0IHRvIHF1ZXJ5LgogICAgICAgICAqIEByZXR1cm5zIHtGdW5jdGlvbn0gUmV0dXJucyB0aGUgbmV3IGFjY2Vzc29yIGZ1bmN0aW9uLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiB2YXIgYXJyYXkgPSBbMCwgMSwgMl0sCiAgICAgICAgICogICAgIG9iamVjdCA9IHsgJ2EnOiBhcnJheSwgJ2InOiBhcnJheSwgJ2MnOiBhcnJheSB9OwogICAgICAgICAqCiAgICAgICAgICogXy5tYXAoWydhWzJdJywgJ2NbMF0nXSwgXy5wcm9wZXJ0eU9mKG9iamVjdCkpOwogICAgICAgICAqIC8vID0+IFsyLCAwXQogICAgICAgICAqCiAgICAgICAgICogXy5tYXAoW1snYScsICcyJ10sIFsnYycsICcwJ11dLCBfLnByb3BlcnR5T2Yob2JqZWN0KSk7CiAgICAgICAgICogLy8gPT4gWzIsIDBdCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gcHJvcGVydHlPZihvYmplY3QpIHsKICAgICAgICAgIHJldHVybiBmdW5jdGlvbihwYXRoKSB7CiAgICAgICAgICAgIHJldHVybiBvYmplY3QgPT0gbnVsbCA/IHVuZGVmaW5lZCQxIDogYmFzZUdldChvYmplY3QsIHBhdGgpOwogICAgICAgICAgfTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYW4gYXJyYXkgb2YgbnVtYmVycyAocG9zaXRpdmUgYW5kL29yIG5lZ2F0aXZlKSBwcm9ncmVzc2luZyBmcm9tCiAgICAgICAgICogYHN0Y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Ck7CiAgICAgICAgICogLy8gPT4gWzAsIDEsIDIsIDNdCiAgICAgICAgICoKICAgICAgICAgKiBfLnJhbmdlKC00KTsKICAgICAgICAgKiAvLyA9PiBbMCwgLTEsIC0yLCAtM10KICAgICAgICAgKgogICAgICAgICAqIF8ucmFuZ2UoMSwgNSk7CiAgICAgICAgICogLy8gPT4gWzEsIDIsIDMsIDRdCiAgICAgICAgICoKICAgICAgICAgKiBfLnJhbmdlKDAsIDIwLCA1KTsKICAgICAgICAgKiAvLyA9PiBbMCwgNSwgMTAsIDE1XQogICAgICAgICAqCiAgICAgICAgICogXy5yYW5nZSgwLCAtNCwgLTEpOwogICAgICAgICAqIC8vID0+IFswLCAtMSwgLTIsIC0zXQogICAgICAgICAqCiAgICAgICAgICogXy5yYW5nZSgxLCA0LCAwKTsKICAgICAgICAgKiAvLyA9PiBbMSwgMSwgMV0KICAgICAgICAgKgogICAgICAgICAqIF8ucmFuZ2UoMCk7CiAgICAgICAgICogLy8gPT4gW10KICAgICAgICAgKi8KICAgICAgICB2YXIgcmFuZ2UgPSBjcmVhdGVSYW5nZSgpOwoKICAgICAgICAvKioKICAgICAgICAgKiBUaGlzIG1ldGhvZCBpcyBsaWtlIGBfLnJhbmdlYCBleGNlcHQgdGhhdCBpdCBwb3B1bGF0ZXMgdmFsdWVzIGluCiAgICAgICAgICogZGVzY2VuZGluZyBvcmRlci4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSA0LjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBVdGlsCiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IFtzdGFydD0wXSBUaGUgc3RhcnQgb2YgdGhlIHJhbmdlLgogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBlbmQgVGhlIGVuZCBvZiB0aGUgcmFuZ2UuCiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IFtzdGVwPTFdIFRoZSB2YWx1ZSB0byBpbmNyZW1lbnQgb3IgZGVjcmVtZW50IGJ5LgogICAgICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyB0aGUgcmFuZ2Ugb2YgbnVtYmVycy4KICAgICAgICAgKiBAc2VlIF8uaW5SYW5nZSwgXy5yYW5nZQogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLnJhbmdlUmlnaHQoNCk7CiAgICAgICAgICogLy8gPT4gWzMsIDIsIDEsIDBdCiAgICAgICAgICoKICAgICAgICAgKiBfLnJhbmdlUmlnaHQoLTQpOwogICAgICAgICAqIC8vID0+IFstMywgLTIsIC0xLCAwXQogICAgICAgICAqCiAgICAgICAgICogXy5yYW5nZVJpZ2h0KDEsIDUpOwogICAgICAgICAqIC8vID0+IFs0LCAzLCAyLCAxXQogICAgICAgICAqCiAgICAgICAgICogXy5yYW5nZVJpZ2h0KDAsIDIwLCA1KTsKICAgICAgICAgKiAvLyA9PiBbMTUsIDEwLCA1LCAwXQogICAgICAgICAqCiAgICAgICAgICogXy5yYW5nZVJpZ2h0KDAsIC00LCAtMSk7CiAgICAgICAgICogLy8gPT4gWy0zLCAtMiwgLTEsIDBdCiAgICAgICAgICoKICAgICAgICAgKiBfLnJhbmdlUmlnaHQoMSwgNCwgMCk7CiAgICAgICAgICogLy8gPT4gWzEsIDEsIDFdCiAgICAgICAgICoKICAgICAgICAgKiBfLnJhbmdlUmlnaHQoMCk7CiAgICAgICAgICogLy8gPT4gW10KICAgICAgICAgKi8KICAgICAgICB2YXIgcmFuZ2VSaWdodCA9IGNyZWF0ZVJhbmdlKHRydWUpOwoKICAgICAgICAvKioKICAgICAgICAgKiBUaGlzIG1ldGhvZCByZXR1cm5zIGEgbmV3IGVtcHR5IGFycmF5LgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDQuMTMuMAogICAgICAgICAqIEBjYXRlZ29yeSBVdGlsCiAgICAgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBuZXcgZW1wdHkgYXJyYXkuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIHZhciBhcnJheXMgPSBfLnRpbWVzKDIsIF8uc3R1YkFycmF5KTsKICAgICAgICAgKgogICAgICAgICAqIGNvbnNvbGUubG9nKGFycmF5cyk7CiAgICAgICAgICogLy8gPT4gW1tdLCBbXV0KICAgICAgICAgKgogICAgICAgICAqIGNvbnNvbGUubG9nKGFycmF5c1swXSA9PT0gYXJyYXlzWzFdKTsKICAgICAgICAgKiAvLyA9PiBmYWxzZQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHN0dWJBcnJheSgpIHsKICAgICAgICAgIHJldHVybiBbXTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFRoaXMgbWV0aG9kIHJldHVybnMgYGZhbHNlYC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSA0LjEzLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgVXRpbAogICAgICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGBmYWxzZWAuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8udGltZXMoMiwgXy5zdHViRmFsc2UpOwogICAgICAgICAqIC8vID0+IFtmYWxzZSwgZmFsc2VdCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gc3R1YkZhbHNlKCkgewogICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogVGhpcyBtZXRob2QgcmV0dXJucyBhIG5ldyBlbXB0eSBvYmplY3QuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC4xMy4wCiAgICAgICAgICogQGNhdGVnb3J5IFV0aWwKICAgICAgICAgKiBAcmV0dXJucyB7T2JqZWN0fSBSZXR1cm5zIHRoZSBuZXcgZW1wdHkgb2JqZWN0LgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiB2YXIgb2JqZWN0cyA9IF8udGltZXMoMiwgXy5zdHViT2JqZWN0KTsKICAgICAgICAgKgogICAgICAgICAqIGNvbnNvbGUubG9nKG9iamVjdHMpOwogICAgICAgICAqIC8vID0+IFt7fSwge31dCiAgICAgICAgICoKICAgICAgICAgKiBjb25zb2xlLmxvZyhvYmplY3RzWzBdID09PSBvYmplY3RzWzFdKTsKICAgICAgICAgKiAvLyA9PiBmYWxzZQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHN0dWJPYmplY3QoKSB7CiAgICAgICAgICByZXR1cm4ge307CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBUaGlzIG1ldGhvZCByZXR1cm5zIGFuIGVtcHR5IHN0cmluZy4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSA0LjEzLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgVXRpbAogICAgICAgICAqIEByZXR1cm5zIHtzdHJpbmd9IFJldHVybnMgdGhlIGVtcHR5IHN0cmluZy4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy50aW1lcygyLCBfLnN0dWJTdHJpbmcpOwogICAgICAgICAqIC8vID0+IFsnJywgJyddCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gc3R1YlN0cmluZygpIHsKICAgICAgICAgIHJldHVybiAnJzsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFRoaXMgbWV0aG9kIHJldHVybnMgYHRydWVgLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDQuMTMuMAogICAgICAgICAqIEBjYXRlZ29yeSBVdGlsCiAgICAgICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLnRpbWVzKDIsIF8uc3R1YlRydWUpOwogICAgICAgICAqIC8vID0+IFt0cnVlLCB0cnVlXQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHN0dWJUcnVlKCkgewogICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBJbnZva2VzIHRoZSBpdGVyYXRlZSBgbmAgdGltZXMsIHJldHVybmluZyBhbiBhcnJheSBvZiB0aGUgcmVzdWx0cyBvZgogICAgICAgICAqIGVhY2ggaW52b2NhdGlvbi4gVGhlIGl0ZXJhdGVlIGlzIGludm9rZWQgd2l0aCBvbmUgYXJndW1lbnQ7IChpbmRleCkuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQHNpbmNlIDAuMS4wCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAY2F0ZWdvcnkgVXRpbAogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBuIFRoZSBudW1iZXIgb2YgdGltZXMgdG8gaW52b2tlIGBpdGVyYXRlZWAuCiAgICAgICAgICogQHBhcmFtIHtGdW5jdGlvbn0gW2l0ZXJhdGVlPV8uaWRlbnRpdHldIFRoZSBmdW5jdGlvbiBpbnZva2VkIHBlciBpdGVyYXRpb24uCiAgICAgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBhcnJheSBvZiByZXN1bHRzLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLnRpbWVzKDMsIFN0cmluZyk7CiAgICAgICAgICogLy8gPT4gWycwJywgJzEnLCAnMiddCiAgICAgICAgICoKICAgICAgICAgKiAgXy50aW1lcyg0LCBfLmNvbnN0YW50KDApKTsKICAgICAgICAgKiAvLyA9PiBbMCwgMCwgMCwgMF0KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiB0aW1lcyhuLCBpdGVyYXRlZSkgewogICAgICAgICAgbiA9IHRvSW50ZWdlcihuKTsKICAgICAgICAgIGlmIChuIDwgMSB8fCBuID4gTUFYX1NBRkVfSU5URUdFUikgewogICAgICAgICAgICByZXR1cm4gW107CiAgICAgICAgICB9CiAgICAgICAgICB2YXIgaW5kZXggPSBNQVhfQVJSQVlfTEVOR1RILAogICAgICAgICAgICAgIGxlbmd0aCA9IG5hdGl2ZU1pbihuLCBNQVhfQVJSQVlfTEVOR1RIKTsKCiAgICAgICAgICBpdGVyYXRlZSA9IGdldEl0ZXJhdGVlKGl0ZXJhdGVlKTsKICAgICAgICAgIG4gLT0gTUFYX0FSUkFZX0xFTkdUSDsKCiAgICAgICAgICB2YXIgcmVzdWx0ID0gYmFzZVRpbWVzKGxlbmd0aCwgaXRlcmF0ZWUpOwogICAgICAgICAgd2hpbGUgKCsraW5kZXggPCBuKSB7CiAgICAgICAgICAgIGl0ZXJhdGVlKGluZGV4KTsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDb252ZXJ0cyBgdmFsdWVgIHRvIGEgcHJvcGVydHkgcGF0aCBhcnJheS4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSA0LjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBVdGlsCiAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gY29udmVydC4KICAgICAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIG5ldyBwcm9wZXJ0eSBwYXRoIGFycmF5LgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLnRvUGF0aCgnYS5iLmMnKTsKICAgICAgICAgKiAvLyA9PiBbJ2EnLCAnYicsICdjJ10KICAgICAgICAgKgogICAgICAgICAqIF8udG9QYXRoKCdhWzBdLmIuYycpOwogICAgICAgICAqIC8vID0+IFsnYScsICcwJywgJ2InLCAnYyddCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gdG9QYXRoKHZhbHVlKSB7CiAgICAgICAgICBpZiAoaXNBcnJheSh2YWx1ZSkpIHsKICAgICAgICAgICAgcmV0dXJuIGFycmF5TWFwKHZhbHVlLCB0b0tleSk7CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gaXNTeW1ib2wodmFsdWUpID8gW3ZhbHVlXSA6IGNvcHlBcnJheShzdHJpbmdUb1BhdGgodG9TdHJpbmcodmFsdWUpKSk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBHZW5lcmF0ZXMgYSB1bmlxdWUgSUQuIElmIGBwcmVmaXhgIGlzIGdpdmVuLCB0aGUgSUQgaXMgYXBwZW5kZWQgdG8gaXQuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQHNpbmNlIDAuMS4wCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAY2F0ZWdvcnkgVXRpbAogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBbcHJlZml4PScnXSBUaGUgdmFsdWUgdG8gcHJlZml4IHRoZSBJRCB3aXRoLgogICAgICAgICAqIEByZXR1cm5zIHtzdHJpbmd9IFJldHVybnMgdGhlIHVuaXF1ZSBJRC4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy51bmlxdWVJZCgnY29udGFjdF8nKTsKICAgICAgICAgKiAvLyA9PiAnY29udGFjdF8xMDQnCiAgICAgICAgICoKICAgICAgICAgKiBfLnVuaXF1ZUlkKCk7CiAgICAgICAgICogLy8gPT4gJzEwNScKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiB1bmlxdWVJZChwcmVmaXgpIHsKICAgICAgICAgIHZhciBpZCA9ICsraWRDb3VudGVyOwogICAgICAgICAgcmV0dXJuIHRvU3RyaW5nKHByZWZpeCkgKyBpZDsKICAgICAgICB9CgogICAgICAgIC8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KCiAgICAgICAgLyoqCiAgICAgICAgICogQWRkcyB0d28gbnVtYmVycy4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAzLjQuMAogICAgICAgICAqIEBjYXRlZ29yeSBNYXRoCiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IGF1Z2VuZCBUaGUgZmlyc3QgbnVtYmVyIGluIGFuIGFkZGl0aW9uLgogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBhZGRlbmQgVGhlIHNlY29uZCBudW1iZXIgaW4gYW4gYWRkaXRpb24uCiAgICAgICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgdG90YWwuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8uYWRkKDYsIDQpOwogICAgICAgICAqIC8vID0+IDEwCiAgICAgICAgICovCiAgICAgICAgdmFyIGFkZCA9IGNyZWF0ZU1hdGhPcGVyYXRpb24oZnVuY3Rpb24oYXVnZW5kLCBhZGRlbmQpIHsKICAgICAgICAgIHJldHVybiBhdWdlbmQgKyBhZGRlbmQ7CiAgICAgICAgfSwgMCk7CgogICAgICAgIC8qKgogICAgICAgICAqIENvbXB1dGVzIGBudW1iZXJgIHJvdW5kZWQgdXAgdG8gYHByZWNpc2lvbmAuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgMy4xMC4wCiAgICAgICAgICogQGNhdGVnb3J5IE1hdGgKICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gbnVtYmVyIFRoZSBudW1iZXIgdG8gcm91bmQgdXAuCiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IFtwcmVjaXNpb249MF0gVGhlIHByZWNpc2lvbiB0byByb3VuZCB1cCB0by4KICAgICAgICAgKiBAcmV0dXJucyB7bnVtYmVyfSBSZXR1cm5zIHRoZSByb3VuZGVkIHVwIG51bWJlci4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy5jZWlsKDQuMDA2KTsKICAgICAgICAgKiAvLyA9PiA1CiAgICAgICAgICoKICAgICAgICAgKiBfLmNlaWwoNi4wMDQsIDIpOwogICAgICAgICAqIC8vID0+IDYuMDEKICAgICAgICAgKgogICAgICAgICAqIF8uY2VpbCg2MDQwLCAtMik7CiAgICAgICAgICogLy8gPT4gNjEwMAogICAgICAgICAqLwogICAgICAgIHZhciBjZWlsID0gY3JlYXRlUm91bmQoJ2NlaWwnKTsKCiAgICAgICAgLyoqCiAgICAgICAgICogRGl2aWRlIHR3byBudW1iZXJzLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDQuNy4wCiAgICAgICAgICogQGNhdGVnb3J5IE1hdGgKICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gZGl2aWRlbmQgVGhlIGZpcnN0IG51bWJlciBpbiBhIGRpdmlzaW9uLgogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBkaXZpc29yIFRoZSBzZWNvbmQgbnVtYmVyIGluIGEgZGl2aXNpb24uCiAgICAgICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgcXVvdGllbnQuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8uZGl2aWRlKDYsIDQpOwogICAgICAgICAqIC8vID0+IDEuNQogICAgICAgICAqLwogICAgICAgIHZhciBkaXZpZGUgPSBjcmVhdGVNYXRoT3BlcmF0aW9uKGZ1bmN0aW9uKGRpdmlkZW5kLCBkaXZpc29yKSB7CiAgICAgICAgICByZXR1cm4gZGl2aWRlbmQgLyBkaXZpc29yOwogICAgICAgIH0sIDEpOwoKICAgICAgICAvKioKICAgICAgICAgKiBDb21wdXRlcyBgbnVtYmVyYCByb3VuZGVkIGRvd24gdG8gYHByZWNpc2lvbmAuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgMy4xMC4wCiAgICAgICAgICogQGNhdGVnb3J5IE1hdGgKICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gbnVtYmVyIFRoZSBudW1iZXIgdG8gcm91bmQgZG93bi4KICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gW3ByZWNpc2lvbj0wXSBUaGUgcHJlY2lzaW9uIHRvIHJvdW5kIGRvd24gdG8uCiAgICAgICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgcm91bmRlZCBkb3duIG51bWJlci4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy5mbG9vcig0LjAwNik7CiAgICAgICAgICogLy8gPT4gNAogICAgICAgICAqCiAgICAgICAgICogXy5mbG9vcigwLjA0NiwgMik7CiAgICAgICAgICogLy8gPT4gMC4wNAogICAgICAgICAqCiAgICAgICAgICogXy5mbG9vcig0MDYwLCAtMik7CiAgICAgICAgICogLy8gPT4gNDAwMAogICAgICAgICAqLwogICAgICAgIHZhciBmbG9vciA9IGNyZWF0ZVJvdW5kKCdmbG9vcicpOwoKICAgICAgICAvKioKICAgICAgICAgKiBDb21wdXRlcyB0aGUgbWF4aW11bSB2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dpdGggb25lIGFyZ3VtZW50OiAodmFsdWUpLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDQuMC4wCiAgICAgICAgICogQGNhdGVnb3J5IE1hdGgKICAgICAgICAgKiBAcGFyYW0ge0FycmF5fSBhcnJheSBUaGUgYXJyYXkgdG8gaXRlcmF0ZSBvdmVyLgogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IFtpdGVyYXRlZT1fLmlkZW50aXR5XSBUaGUgaXRlcmF0ZWUgaW52b2tlZCBwZXIgZWxlbWVudC4KICAgICAgICAgKiBAcmV0dXJucyB7Kn0gUmV0dXJucyB0aGUgbWF4aW11bSB2YWx1ZS4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogdmFyIG9iamVjdHMgPSBbeyAnbic6IDEgfSwgeyAnbic6IDIgfV07CiAgICAgICAgICoKICAgICAgICAgKiBfLm1heEJ5KG9iamVjdHMsIGZ1bmN0aW9uKG8pIHsgcmV0dXJuIG8ubjsgfSk7CiAgICAgICAgICogLy8gPT4geyAnbic6IDIgfQogICAgICAgICAqCiAgICAgICAgICogLy8gVGhlIGBfLnByb3BlcnR5YCBpdGVyYXRlZSBzaG9ydGhhbmQuCiAgICAgICAgICogXy5tYXhCeShvYmplY3RzLCAnbicpOwogICAgICAgICAqIC8vID0+IHsgJ24nOiAyIH0KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBtYXhCeShhcnJheSwgaXRlcmF0ZWUpIHsKICAgICAgICAgIHJldHVybiAoYXJyYXkgJiYgYXJyYXkubGVuZ3RoKQogICAgICAgICAgICA/IGJhc2VFeHRyZW11bShhcnJheSwgZ2V0SXRlcmF0ZWUoaXRlcmF0ZWUsIDIpLCBiYXNlR3QpCiAgICAgICAgICAgIDogdW5kZWZpbmVkJDE7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDb21wdXRlcyB0aGUgbWVhbiBvZiB0aGUgdmFsdWVzIGluIGBhcnJheWAuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgTWF0aAogICAgICAgICAqIEBwYXJhbSB7QXJyYXl9IGFycmF5IFRoZSBhcnJheSB0byBpdGVyYXRlIG92ZXIuCiAgICAgICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgbWVhbi4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy5tZWFuKFs0LCAyLCA4LCA2XSk7CiAgICAgICAgICogLy8gPT4gNQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIG1lYW4oYXJyYXkpIHsKICAgICAgICAgIHJldHVybiBiYXNlTWVhbihhcnJheSwgaWRlbnRpdHkpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogVGhpcyBtZXRob2QgaXMgbGlrZSBgXy5tZWFuYCBleGNlcHQgdGhhdCBpdCBhY2NlcHRzIGBpdGVyYXRlZWAgd2hpY2ggaXMKICAgICAgICAgKiBpbnZva2VkIGZvciBlYWNoIGVsZW1lbnQgaW4gYGFycmF5YCB0byBnZW5lcmF0ZSB0aGUgdmFsdWUgdG8gYmUgYXZlcmFnZWQuCiAgICAgICAgICogVGhlIGl0ZXJhdGVlIGlzIGludm9rZWQgd2l0aCBvbmUgYXJndW1lbnQ6ICh2YWx1ZSkuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC43LjAKICAgICAgICAgKiBAY2F0ZWdvcnkgTWF0aAogICAgICAgICAqIEBwYXJhbSB7QXJyYXl9IGFycmF5IFRoZSBhcnJheSB0byBpdGVyYXRlIG92ZXIuCiAgICAgICAgICogQHBhcmFtIHtGdW5jdGlvbn0gW2l0ZXJhdGVlPV8uaWRlbnRpdHldIFRoZSBpdGVyYXRlZSBpbnZva2VkIHBlciBlbGVtZW50LgogICAgICAgICAqIEByZXR1cm5zIHtudW1iZXJ9IFJldHVybnMgdGhlIG1lYW4uCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIHZhciBvYmplY3RzID0gW3sgJ24nOiA0IH0sIHsgJ24nOiAyIH0sIHsgJ24nOiA4IH0sIHsgJ24nOiA2IH1dOwogICAgICAgICAqCiAgICAgICAgICogXy5tZWFuQnkob2JqZWN0cywgZnVuY3Rpb24obykgeyByZXR1cm4gby5uOyB9KTsKICAgICAgICAgKiAvLyA9PiA1CiAgICAgICAgICoKICAgICAgICAgKiAvLyBUaGUgYF8ucHJvcGVydHlgIGl0ZXJhdGVlIHNob3J0aGFuZC4KICAgICAgICAgKiBfLm1lYW5CeShvYmplY3RzLCAnbicpOwogICAgICAgICAqIC8vID0+IDUKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBtZWFuQnkoYXJyYXksIGl0ZXJhdGVlKSB7CiAgICAgICAgICByZXR1cm4gYmFzZU1lYW4oYXJyYXksIGdldEl0ZXJhdGVlKGl0ZXJhdGVlLCAyKSk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDb21wdXRlcyB0aGUgbWluaW11bSB2YWx1ZSBvZiBgYXJyYXlgLiBJZiBgYXJyYXlgIGlzIGVtcHR5IG9yIGZhbHNleSwKICAgICAgICAgKiBgdW5kZWZpbmVkYCBpcyByZXR1cm5lZC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAc2luY2UgMC4xLjAKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBjYXRlZ29yeSBNYXRoCiAgICAgICAgICogQHBhcmFtIHtBcnJheX0gYXJyYXkgVGhlIGFycmF5IHRvIGl0ZXJhdGUgb3Zlci4KICAgICAgICAgKiBAcmV0dXJucyB7Kn0gUmV0dXJucyB0aGUgbWluaW11bSB2YWx1ZS4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogXy5taW4oWzQsIDIsIDgsIDZdKTsKICAgICAgICAgKiAvLyA9PiAyCiAgICAgICAgICoKICAgICAgICAgKiBfLm1pbihbXSk7CiAgICAgICAgICogLy8gPT4gdW5kZWZpbmVkCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gbWluKGFycmF5KSB7CiAgICAgICAgICByZXR1cm4gKGFycmF5ICYmIGFycmF5Lmxlbmd0aCkKICAgICAgICAgICAgPyBiYXNlRXh0cmVtdW0oYXJyYXksIGlkZW50aXR5LCBiYXNlTHQpCiAgICAgICAgICAgIDogdW5kZWZpbmVkJDE7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBUaGlzIG1ldGhvZCBpcyBsaWtlIGBfLm1pbmAgZXhjZXB0IHRoYXQgaXQgYWNjZXB0cyBgaXRlcmF0ZWVgIHdoaWNoIGlzCiAgICAgICAgICogaW52b2tlZCBmb3IgZWFjaCBlbGVtZW50IGluIGBhcnJheWAgdG8gZ2VuZXJhdGUgdGhlIGNyaXRlcmlvbiBieSB3aGljaAogICAgICAgICAqIHRoZSB2YWx1ZSBpcyByYW5rZWQuIFRoZSBpdGVyYXRlZSBpcyBpbnZva2VkIHdpdGggb25lIGFyZ3VtZW50OiAodmFsdWUpLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDQuMC4wCiAgICAgICAgICogQGNhdGVnb3J5IE1hdGgKICAgICAgICAgKiBAcGFyYW0ge0FycmF5fSBhcnJheSBUaGUgYXJyYXkgdG8gaXRlcmF0ZSBvdmVyLgogICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IFtpdGVyYXRlZT1fLmlkZW50aXR5XSBUaGUgaXRlcmF0ZWUgaW52b2tlZCBwZXIgZWxlbWVudC4KICAgICAgICAgKiBAcmV0dXJucyB7Kn0gUmV0dXJucyB0aGUgbWluaW11bSB2YWx1ZS4KICAgICAgICAgKiBAZXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogdmFyIG9iamVjdHMgPSBbeyAnbic6IDEgfSwgeyAnbic6IDIgfV07CiAgICAgICAgICoKICAgICAgICAgKiBfLm1pbkJ5KG9iamVjdHMsIGZ1bmN0aW9uKG8pIHsgcmV0dXJuIG8ubjsgfSk7CiAgICAgICAgICogLy8gPT4geyAnbic6IDEgfQogICAgICAgICAqCiAgICAgICAgICogLy8gVGhlIGBfLnByb3BlcnR5YCBpdGVyYXRlZSBzaG9ydGhhbmQuCiAgICAgICAgICogXy5taW5CeShvYmplY3RzLCAnbicpOwogICAgICAgICAqIC8vID0+IHsgJ24nOiAxIH0KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBtaW5CeShhcnJheSwgaXRlcmF0ZWUpIHsKICAgICAgICAgIHJldHVybiAoYXJyYXkgJiYgYXJyYXkubGVuZ3RoKQogICAgICAgICAgICA/IGJhc2VFeHRyZW11bShhcnJheSwgZ2V0SXRlcmF0ZWUoaXRlcmF0ZWUsIDIpLCBiYXNlTHQpCiAgICAgICAgICAgIDogdW5kZWZpbmVkJDE7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBNdWx0aXBseSB0d28gbnVtYmVycy4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSA0LjcuMAogICAgICAgICAqIEBjYXRlZ29yeSBNYXRoCiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IG11bHRpcGxpZXIgVGhlIGZpcnN0IG51bWJlciBpbiBhIG11bHRpcGxpY2F0aW9uLgogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBtdWx0aXBsaWNhbmQgVGhlIHNlY29uZCBudW1iZXIgaW4gYSBtdWx0aXBsaWNhdGlvbi4KICAgICAgICAgKiBAcmV0dXJucyB7bnVtYmVyfSBSZXR1cm5zIHRoZSBwcm9kdWN0LgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBfLm11bHRpcGx5KDYsIDQpOwogICAgICAgICAqIC8vID0+IDI0CiAgICAgICAgICovCiAgICAgICAgdmFyIG11bHRpcGx5ID0gY3JlYXRlTWF0aE9wZXJhdGlvbihmdW5jdGlvbihtdWx0aXBsaWVyLCBtdWx0aXBsaWNhbmQpIHsKICAgICAgICAgIHJldHVybiBtdWx0aXBsaWVyICogbXVsdGlwbGljYW5kOwogICAgICAgIH0sIDEpOwoKICAgICAgICAvKioKICAgICAgICAgKiBDb21wdXRlcyBgbnVtYmVyYCByb3VuZGVkIHRvIGBwcmVjaXNpb25gLgogICAgICAgICAqCiAgICAgICAgICogQHN0YXRpYwogICAgICAgICAqIEBtZW1iZXJPZiBfCiAgICAgICAgICogQHNpbmNlIDMuMTAuMAogICAgICAgICAqIEBjYXRlZ29yeSBNYXRoCiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IG51bWJlciBUaGUgbnVtYmVyIHRvIHJvdW5kLgogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBbcHJlY2lzaW9uPTBdIFRoZSBwcmVjaXNpb24gdG8gcm91bmQgdG8uCiAgICAgICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgcm91bmRlZCBudW1iZXIuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8ucm91bmQoNC4wMDYpOwogICAgICAgICAqIC8vID0+IDQKICAgICAgICAgKgogICAgICAgICAqIF8ucm91bmQoNC4wMDYsIDIpOwogICAgICAgICAqIC8vID0+IDQuMDEKICAgICAgICAgKgogICAgICAgICAqIF8ucm91bmQoNDA2MCwgLTIpOwogICAgICAgICAqIC8vID0+IDQxMDAKICAgICAgICAgKi8KICAgICAgICB2YXIgcm91bmQgPSBjcmVhdGVSb3VuZCgncm91bmQnKTsKCiAgICAgICAgLyoqCiAgICAgICAgICogU3VidHJhY3QgdHdvIG51bWJlcnMuCiAgICAgICAgICoKICAgICAgICAgKiBAc3RhdGljCiAgICAgICAgICogQG1lbWJlck9mIF8KICAgICAgICAgKiBAc2luY2UgNC4wLjAKICAgICAgICAgKiBAY2F0ZWdvcnkgTWF0aAogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBtaW51ZW5kIFRoZSBmaXJzdCBudW1iZXIgaW4gYSBzdWJ0cmFjdGlvbi4KICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gc3VidHJhaGVuZCBUaGUgc2Vjb25kIG51bWJlciBpbiBhIHN1YnRyYWN0aW9uLgogICAgICAgICAqIEByZXR1cm5zIHtudW1iZXJ9IFJldHVybnMgdGhlIGRpZmZlcmVuY2UuCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8uc3VidHJhY3QoNiwgNCk7CiAgICAgICAgICogLy8gPT4gMgogICAgICAgICAqLwogICAgICAgIHZhciBzdWJ0cmFjdCA9IGNyZWF0ZU1hdGhPcGVyYXRpb24oZnVuY3Rpb24obWludWVuZCwgc3VidHJhaGVuZCkgewogICAgICAgICAgcmV0dXJuIG1pbnVlbmQgLSBzdWJ0cmFoZW5kOwogICAgICAgIH0sIDApOwoKICAgICAgICAvKioKICAgICAgICAgKiBDb21wdXRlcyB0aGUgc3VtIG9mIHRoZSB2YWx1ZXMgaW4gYGFycmF5YC4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSAzLjQuMAogICAgICAgICAqIEBjYXRlZ29yeSBNYXRoCiAgICAgICAgICogQHBhcmFtIHtBcnJheX0gYXJyYXkgVGhlIGFycmF5IHRvIGl0ZXJhdGUgb3Zlci4KICAgICAgICAgKiBAcmV0dXJucyB7bnVtYmVyfSBSZXR1cm5zIHRoZSBzdW0uCiAgICAgICAgICogQGV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIF8uc3VtKFs0LCAyLCA4LCA2XSk7CiAgICAgICAgICogLy8gPT4gMjAKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBzdW0oYXJyYXkpIHsKICAgICAgICAgIHJldHVybiAoYXJyYXkgJiYgYXJyYXkubGVuZ3RoKQogICAgICAgICAgICA/IGJhc2VTdW0oYXJyYXksIGlkZW50aXR5KQogICAgICAgICAgICA6IDA7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBUaGlzIG1ldGhvZCBpcyBsaWtlIGBfLnN1bWAgZXhjZXB0IHRoYXQgaXQgYWNjZXB0cyBgaXRlcmF0ZWVgIHdoaWNoIGlzCiAgICAgICAgICogaW52b2tlZCBmb3IgZWFjaCBlbGVtZW50IGluIGBhcnJheWAgdG8gZ2VuZXJhdGUgdGhlIHZhbHVlIHRvIGJlIHN1bW1lZC4KICAgICAgICAgKiBUaGUgaXRlcmF0ZWUgaXMgaW52b2tlZCB3aXRoIG9uZSBhcmd1bWVudDogKHZhbHVlKS4KICAgICAgICAgKgogICAgICAgICAqIEBzdGF0aWMKICAgICAgICAgKiBAbWVtYmVyT2YgXwogICAgICAgICAqIEBzaW5jZSA0LjAuMAogICAgICAgICAqIEBjYXRlZ29yeSBNYXRoCiAgICAgICAgICogQHBhcmFtIHtBcnJheX0gYXJyYXkgVGhlIGFycmF5IHRvIGl0ZXJhdGUgb3Zlci4KICAgICAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufSBbaXRlcmF0ZWU9Xy5pZGVudGl0eV0gVGhlIGl0ZXJhdGVlIGludm9rZWQgcGVyIGVsZW1lbnQuCiAgICAgICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgc3VtLgogICAgICAgICAqIEBleGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiB2YXIgb2JqZWN0cyA9IFt7ICduJzogNCB9LCB7ICduJzogMiB9LCB7ICduJzogOCB9LCB7ICduJzogNiB9XTsKICAgICAgICAgKgogICAgICAgICAqIF8uc3VtQnkob2JqZWN0cywgZnVuY3Rpb24obykgeyByZXR1cm4gby5uOyB9KTsKICAgICAgICAgKiAvLyA9PiAyMAogICAgICAgICAqCiAgICAgICAgICogLy8gVGhlIGBfLnByb3BlcnR5YCBpdGVyYXRlZSBzaG9ydGhhbmQuCiAgICAgICAgICogXy5zdW1CeShvYmplY3RzLCAnbicpOwogICAgICAgICAqIC8vID0+IDIwCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gc3VtQnkoYXJyYXksIGl0ZXJhdGVlKSB7CiAgICAgICAgICByZXR1cm4gKGFycmF5ICYmIGFycmF5Lmxlbmd0aCkKICAgICAgICAgICAgPyBiYXNlU3VtKGFycmF5LCBnZXRJdGVyYXRlZShpdGVyYXRlZSwgMikpCiAgICAgICAgICAgIDogMDsKICAgICAgICB9CgogICAgICAgIC8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KCiAgICAgICAgLy8gQWRkIG1ldGhvZHMgdGhhdCByZXR1cm4gd3JhcHBlZCB2YWx1ZXMgaW4gY2hhaW4gc2VxdWVuY2VzLgogICAgICAgIGxvZGFzaC5hZnRlciA9IGFmdGVyOwogICAgICAgIGxvZGFzaC5hcnkgPSBhcnk7CiAgICAgICAgbG9kYXNoLmFzc2lnbiA9IGFzc2lnbjsKICAgICAgICBsb2Rhc2guYXNzaWduSW4gPSBhc3NpZ25JbjsKICAgICAgICBsb2Rhc2guYXNzaWduSW5XaXRoID0gYXNzaWduSW5XaXRoOwogICAgICAgIGxvZGFzaC5hc3NpZ25XaXRoID0gYXNzaWduV2l0aDsKICAgICAgICBsb2Rhc2guYXQgPSBhdDsKICAgICAgICBsb2Rhc2guYmVmb3JlID0gYmVmb3JlOwogICAgICAgIG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lJ10sIGZ1bmN0aW9uKG1ldGhvZE5hbWUsIGluZGV4KSB7CiAgICAgICAgICBMYXp5V3JhcHBlci5wcm90b3R5cGVbbWV0aG9kTmFtZV0gPSBmdW5jdGlvbihuKSB7CiAgICAgICAgICAgIG4gPSBuID09PSB1bmRlZmluZWQkMSA/IDEgOiBuYXRpdmVNYXgodG9JbnRlZ2VyKG4pLCAwKTsKCiAgICAgICAgICAgIHZhciByZXN1bHQgPSAodGhpcy5fX2ZpbHRlcmVkX18gJiYgIWluZGV4KQogICAgICAgICAgICAgID8gbmV3IExhenlXcmFwcGVyKHRoaXMpCiAgICAgICAgICAgICAgOiB0aGlzLmNsb25lKCk7CgogICAgICAgICAgICBpZiAocmVzdWx0Ll9fZmlsdGVyZWRfXykgewogICAgICAgICAgICAgIHJlc3VsdC5fX3Rha2VDb3VudF9fID0gbmF0aXZlTWluKG4sIHJlc3VsdC5fX3Rha2VDb3VudF9fKTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICByZXN1bHQuX192aWV3c19fLnB1c2goewogICAgICAgICAgICAgICAgJ3NpemUnOiBuYXRpdmVNaW4obiwgTUFYX0FSUkFZX0xFTkdUSCksCiAgICAgICAgICAgICAgICAndHlwZSc6IG1ldGhvZE5hbWUgKyAocmVzdWx0Ll9fZGlyX18gPCAwID8gJ1JpZ2h0JyA6ICcnKQogICAgICAgICAgICAgIH0pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgICB9OwoKICAgICAgICAgIExhenlXcmFwcGVyLnByb3RvdHlwZVttZXRob2ROYW1lICsgJ1JpZ2h0J10gPSBmdW5jdGlvbihuKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLnJldmVyc2UoKVttZXRob2ROYW1lXShuKS5yZXZlcnNlKCk7CiAgICAgICAgICB9OwogICAgICAgIH0pOwoKICAgICAgICAvLyBBZGQgYExhenlXcmFwcGVyYCBtZXRob2RzIHRoYXQgYWNj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7CiAgICAgICAgICBpZiAodHlwZW9mIHBhdGggPT0gJ2Z1bmN0aW9uJykgewogICAgICAgICAgICByZXR1cm4gbmV3IExhenlXcmFwcGVyKHRoaXMpOwogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIHRoaXMubWFwKGZ1bmN0aW9uKHZhbHVlKSB7CiAgICAgICAgICAgIHJldHVybiBiYXNlSW52b2tlKHZhbHVlLCBwYXRoLCBhcmdzKTsKICAgICAgICAgIH0pOwogICAgICAgIH0pOwoKICAgICAgICBMYXp5V3JhcHBlci5wcm90b3R5cGUucmVqZWN0ID0gZnVuY3Rpb24ocHJlZGljYXRlKSB7CiAgICAgICAgICByZXR1cm4gdGhpcy5maWx0ZXIobmVnYXRlKGdldEl0ZXJhdGVlKHByZWRpY2F0ZSkpKTsKICAgICAgICB9OwoKICAgICAgICBMYXp5V3JhcHBlci5wcm90b3R5cGUuc2xpY2UgPSBmdW5jdGlvbihzdGFydCwgZW5kKSB7CiAgICAgICAgICBzdGFydCA9IHRvSW50ZWdlcihzdGFydCk7CgogICAgICAgICAgdmFyIHJlc3VsdCA9IHRoaXM7CiAgICAgICAgICBpZiAocmVzdWx0Ll9fZmlsdGVyZWRfXyAmJiAoc3RhcnQgPiAwIHx8IGVuZCA8IDApKSB7CiAgICAgICAgICAgIHJldHVybiBuZXcgTGF6eVdyYXBwZXIocmVzdWx0KTsKICAgICAgICAgIH0KICAgICAgICAgIGlmIChzdGFydCA8IDApIHsKICAgICAgICAgICAgcmVzdWx0ID0gcmVzdWx0LnRha2VSaWdodCgtc3RhcnQpOwogICAgICAgICAgfSBlbHNlIGlmIChzdGFydCkgewogICAgICAgICAgICByZXN1bHQgPSByZXN1bHQuZHJvcChzdGFydCk7CiAgICAgICAgICB9CiAgICAgICAgICBpZiAoZW5kICE9PSB1bmRlZmluZWQkMSkgewogICAgICAgICAgICBlbmQgPSB0b0ludGVnZXIoZW5kKTsKICAgICAgICAgICAgcmVzdWx0ID0gZW5kIDwgMCA/IHJlc3VsdC5kcm9wUmlnaHQoLWVuZCkgOiByZXN1bHQudGFrZShlbmQgLSBzdGFydCk7CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICAgIH07CgogICAgICAgIExhenlXcmFwcGVyLnByb3RvdHlwZS50YWtlUmlnaHRXaGlsZSA9IGZ1bmN0aW9uKHByZWRpY2F0ZSkgewogICAgICAgICAgcmV0dXJuIHRoaXMucmV2ZXJzZSgpLnRha2VXaGlsZShwcmVkaWNhdGUpLnJldmVyc2UoKTsKICAgICAgICB9OwoKICAgICAgICBMYXp5V3JhcHBlci5wcm90b3R5cGUudG9BcnJheSA9IGZ1bmN0aW9uKCkgewogICAgICAgICAgcmV0dXJuIHRoaXMudGFrZShNQVhfQVJSQVlfTEVOR1RIKTsKICAgICAgICB9OwoKICAgICAgICAvLyBBZGQgYExhenlXcmFwcGVyYCBtZXRob2RzIHRvIGBsb2Rhc2gucHJvdG90eXBlYC4KICAgICAgICBiYXNlRm9yT3duKExhenlXcmFwcGVyLnByb3RvdHlwZSwgZnVuY3Rpb24oZnVuYywgbWV0aG9kTmFtZSkgewogICAgICAgICAgdmFyIGNoZWNrSXRlcmF0ZWUgPSAvXig/OmZpbHRlcnxmaW5kfG1hcHxyZWplY3QpfFdoaWxlJC8udGVzdChtZXRob2ROYW1lKSwKICAgICAgICAgICAgICBpc1Rha2VyID0gL14oPzpoZWFkfGxhc3QpJC8udGVzdChtZXRob2ROYW1lKSwKICAgICAgICAgICAgICBsb2Rhc2hGdW5jID0gbG9kYXNoW2lzVGFrZXIgPyAoJ3Rha2UnICsgKG1ldGhvZE5hbWUgPT0gJ2xhc3QnID8gJ1JpZ2h0JyA6ICcnKSkgOiBtZXRob2ROYW1lXSwKICAgICAgICAgICAgICByZXRVbndyYXBwZWQgPSBpc1Rha2VyIHx8IC9eZmluZC8udGVzdChtZXRob2ROYW1lKTsKCiAgICAgICAgICBpZiAoIWxvZGFzaEZ1bmMpIHsKICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgfQogICAgICAgICAgbG9kYXNoLnByb3RvdHlwZVttZXRob2ROYW1lXSA9IGZ1bmN0aW9uKCkgewogICAgICAgICAgICB2YXIgdmFsdWUgPSB0aGlzLl9fd3JhcHBlZF9fLAogICAgICAgICAgICAgICAgYXJncyA9IGlzVGFrZXIgPyBbMV0gOiBhcmd1bWVudHMsCiAgICAgICAgICAgICAgICBpc0xhenkgPSB2YWx1ZSBpbnN0YW5jZW9mIExhenlXcmFwcGVyLAogICAgICAgICAgICAgICAgaXRlcmF0ZWUgPSBhcmdzWzBdLAogICAgICAgICAgICAgICAgdXNlTGF6eSA9IGlzTGF6eSB8fCBpc0FycmF5KHZhbHVlKTsKCiAgICAgICAgICAgIHZhciBpbnRlcmNlcHRvciA9IGZ1bmN0aW9uKHZhbHVlKSB7CiAgICAgICAgICAgICAgdmFyIHJlc3VsdCA9IGxvZGFzaEZ1bmMuYXBwbHkobG9kYXNoLCBhcnJheVB1c2goW3ZhbHVlXSwgYXJncykpOwogICAgICAgICAgICAgIHJldHVybiAoaXNUYWtlciAmJiBjaGFpbkFsbCkgPyByZXN1bHRbMF0gOiByZXN1bHQ7CiAgICAgICAgICAgIH07CgogICAgICAgICAgICBpZiAodXNlTGF6eSAmJiBjaGVja0l0ZXJhdGVlICYmIHR5cGVvZiBpdGVyYXRlZSA9PSAnZnVuY3Rpb24nICYmIGl0ZXJhdGVlLmxlbmd0aCAhPSAxKSB7CiAgICAgICAgICAgICAgLy8gQXZvaWQgbGF6eSB1c2UgaWYgdGhlIGl0ZXJhdGVlIGhhcyBhICJsZW5ndGgiIHZhbHVlIG90aGVyIHRoYW4gYDFgLgogICAgICAgICAgICAgIGlzTGF6eSA9IHVzZUxhenkgPSBmYWxzZTsKICAgICAgICAgICAgfQogICAgICAgICAgICB2YXIgY2hhaW5BbGwgPSB0aGlzLl9fY2hhaW5fXywKICAgICAgICAgICAgICAgIGlzSHlicmlkID0gISF0aGlzLl9fYWN0aW9uc19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bmN0aW9uKG1ldGhvZE5hbWUpIHsKICAgICAgICAgIHZhciBmdW5jID0gYXJyYXlQcm90b1ttZXRob2ROYW1lXSwKICAgICAgICAgICAgICBjaGFpbk5hbWUgPSAvXig/OnB1c2h8c29ydHx1bnNoaWZ0KSQvLnRlc3QobWV0aG9kTmFtZSkgPyAndGFwJyA6ICd0aHJ1JywKICAgICAgICAgICAgICByZXRVbndyYXBwZWQgPSAvXig/OnBvcHxzaGlmdCkkLy50ZXN0KG1ldGhvZE5hbWUpOwoKICAgICAgICAgIGxvZGFzaC5wcm90b3R5cGVbbWV0aG9kTmFtZV0gPSBmdW5jdGlvbigpIHsKICAgICAgICAgICAgdmFyIGFyZ3MgPSBhcmd1bWVudHM7CiAgICAgICAgICAgIGlmIChyZXRVbndyYXBwZWQgJiYgIXRoaXMuX19jaGFpbl9fKSB7CiAgICAgICAgICAgICAgdmFyIHZhbHVlID0gdGhpcy52YWx1ZSgpOwogICAgICAgICAgICAgIHJldHVybiBmdW5jLmFwcGx5KGlzQXJyYXkodmFsdWUpID8gdmFsdWUgOiBbXSwgYXJncyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXNbY2hhaW5OYW1lXShmdW5jdGlvbih2YWx1ZSkgewogICAgICAgICAgICAgIHJldHVybiBmdW5jLmFwcGx5KGlzQXJyYXkodmFsdWUpID8gdmFsdWUgOiBbXSwgYXJncyk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgfTsKICAgICAgICB9KTsKCiAgICAgICAgLy8gTWFwIG1pbmlmaWVkIG1ldGhvZCBuYW1lcyB0byB0aGVpciByZWFsIG5hbWVzLgogICAgICAgIGJhc2VGb3JPd24oTGF6eVdyYXBwZXIucHJvdG90eXBlLCBmdW5jdGlvbihmdW5jLCBtZXRob2ROYW1lKSB7CiAgICAgICAgICB2YXIgbG9kYXNoRnVuYyA9IGxvZGFzaFttZXRob2ROYW1lXTsKICAgICAgICAgIGlmIChsb2Rhc2hGdW5jKSB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HlsZU5vZGUgewogICAgICBjb25zdHJ1Y3RvcigpIHsKICAgICAgICAvKiogQHR5cGUge251bWJlcn0gKi8KICAgICAgICB0aGlzWydzdGFydCddID0gMDsKICAgICAgICAvKiogQHR5cGUge251bWJlcn0gKi8KICAgICAgICB0aGlzWydlbmQnXSA9IDA7CiAgICAgICAgLyoqIEB0eXBlIHtTdHlsZU5vZGV9ICovCiAgICAgICAgdGhpc1sncHJldmlvdXMnXSA9IG51bGw7CiAgICAgICAgLyoqIEB0eXBlIHtTdHlsZU5vZGV9ICovCiAgICAgICAgdGhpc1sncGFyZW50J10gPSBudWxsOwogICAgICAgIC8qKiBAdHlwZSB7QXJyYXk8U3R5bGVOb2RlPn0gKi8KICAgICAgICB0aGlzWydydWxlcyddID0gbnVsbDsKICAgICAgICAvKiogQHR5cGUge3N0cmluZ30gKi8KICAgICAgICB0aGlzWydwYXJzZWRDc3NUZXh0J10gPSAnJzsKICAgICAgICAvKiogQHR5cGUge3N0cmluZ30gKi8KICAgICAgICB0aGlzWydjc3NUZXh0J10gPSAnJzsKICAgICAgICAvKiogQHR5cGUge2Jvb2xlYW59ICovCiAgICAgICAgdGhpc1snYXRSdWxlJ10gPSBmYWxzZTsKICAgICAgICAvKiogQHR5cGUge251bWJlcn0gKi8KICAgICAgICB0aGlzWyd0eXBlJ10gPSAwOwogICAgICAgIC8qKiBAdHlwZSB7c3RyaW5nfSAqLwogICAgICAgIHRoaXNbJ2tleWZyYW1lc05hbWUnXSA9ICcnOwogICAgICAgIC8qKiBAdHlwZSB7c3RyaW5nfSAqLwogICAgICAgIHRoaXNbJ3NlbGVjdG9yJ10gPSAnJzsKICAgICAgICAvKiogQHR5cGUge3N0cmluZ30gKi8KICAgICAgICB0aGlzWydwYXJzZWRTZWxlY3RvciddID0gJyc7CiAgICAgIH0KICAgIH0KCiAgICAvLyBnaXZlbiBhIHN0cmluZyBvZiBjc3MsIHJldHVybiBhIHNpbXBsZSBydWxlIHRyZWUKICAgIC8qKgogICAgICogQHBhcmFtIHtzdHJpbmd9IHRleHQKICAgICAqIEByZXR1cm4ge1N0eWxlTm9kZX0KICAgICAqLwogICAgZnVuY3Rpb24gcGFyc2UodGV4dCkgewogICAgICB0ZXh0ID0gY2xlYW4odGV4dCk7CiAgICAgIHJldHVybiBwYXJzZUNzcyhsZXgodGV4dCksIHRleHQpOwogICAgfQoKICAgIC8vIHJlbW92ZSBzdHVmZiB3ZSBkb24ndCBjYXJlIGFib3V0IHRoYXQgbWF5IGhpbmRlciBwYXJzaW5nCiAgICAvKioKICAgICAqIEBwYXJhbSB7c3RyaW5nfSBjc3NUZXh0CiAgICAgKiBAcmV0dXJuIHtzdHJpbmd9CiAgICAgKi8KICAgIGZ1bmN0aW9uIGNsZWFuKGNzc1RleHQpIHsKICAgICAgcmV0dXJuIGNzc1RleHQucmVwbGFjZShSWC5jb21tZW50cywgJycpLnJlcGxhY2UoUlgucG9ydCwgJycpOwogICAgfQoKICAgIC8vIHN1cGVyIHNpbXBsZSB7Li4ufSBsZXhlciB0aGF0IHJldHVybnMgYSBub2RlIHRyZWUKICAgIC8qKgogICAgICogQHBhcmFtIHtzdHJpbmd9IHRleHQKICAgICAqIEByZXR1cm4geyFTdHlsZU5vZGV9CiAgICAgKi8KICAgIGZ1bmN0aW9uIGxleCh0ZXh0KSB7CiAgICAgIGxldCByb290ID0gbmV3IFN0eWxlTm9kZSgpOwogICAgICByb290WydzdGFydCddID0gMDsKICAgICAgcm9vdFsnZW5kJ10gPSB0ZXh0Lmxlbmd0aDsKICAgICAgbGV0IG4gPSByb290OwogICAgICBmb3IgKGxldCBpID0gMCwgbCA9IHRleHQubGVuZ3RoOyBpIDwgbDsgaSsrKSB7CiAgICAgICAgaWYgKHRleHRbaV0gPT09IE9QRU5fQlJBQ0UpIHsKICAgICAgICAgIGlmICghblsncnVsZXMnXSkgewogICAgICAgICAgICBuWydydWxlcyddID0gW107CiAgICAgICAgICB9CiAgICAgICAgICBsZXQgcCA9IG47CiAgICAgICAgICBsZXQgcHJldmlvdXMgPSBwWydydWxlcyddW3BbJ3J1bGVzJ10ubGVuZ3RoIC0gMV0gfHwgbnVsbDsKICAgICAgICAgIG4gPSBuZXcgU3R5bGVOb2RlKCk7CiAgICAgICAgICBuWydzdGFydCddID0gaSArIDE7CiAgICAgICAgICBuWydwYXJlbnQnXSA9IHA7CiAgICAgICAgICBuWydwcmV2aW91cyddID0gcHJldmlvdXM7CiAgICAgICAgICBwWydydWxlcyddLnB1c2gobik7CiAgICAgICAgfSBlbHNlIGlmICh0ZXh0W2ldID09PSBDTE9TRV9CUkFDRSkgewogICAgICAgICAgblsnZW5kJ10gPSBpICsgMTsKICAgICAgICAgIG4gPSBuWydwYXJlbnQnXSB8fCByb290OwogICAgICAgIH0KICAgICAgfQogICAgICByZXR1cm4gcm9vdDsKICAgIH0KCiAgICAvLyBhZGQgc2VsZWN0b3JzL2Nzc1RleHQgdG8gbm9kZSB0cmVlCiAgICAvKioKICAgICAqIEBwYXJhbSB7U3R5bGVOb2RlfSBub2RlCiAgICAgKiBAcGFyYW0ge3N0cmluZ30gdGV4dAogICAgICogQHJldHVybiB7IVN0eWxlTm9kZX0KICAgICAqLwogICAgZnVuY3Rpb24gcGFyc2VDc3Mobm9kZSwgdGV4dCkgewogICAgICBsZXQgdCA9IHRleHQuc3Vic3RyaW5nKG5vZGVbJ3N0YXJ0J10sIG5vZGVbJ2VuZCddIC0gMSk7CiAgICAgIG5vZGVbJ3BhcnNlZENzc1RleHQnXSA9IG5vZGVbJ2Nzc1RleHQnXSA9IHQudHJpbSgpOwogICAgICBpZiAobm9kZVsncGFyZW50J10pIHsKICAgICAgICBsZXQgc3MgPSBub2RlWydwcmV2aW91cyddID8gbm9kZVsncHJldmlvdXMnXVsnZW5kJ10gOiBub2RlWydwYXJlbnQnXVsnc3RhcnQnXTsKICAgICAgICB0ID0gdGV4dC5zdWJzdHJpbmcoc3MsIG5vZGVbJ3N0YXJ0J10gLSAxKTsKICAgICAgICB0ID0gX2V4cGFuZF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vZGV9IG5vZGUKICAgICAqIEBwYXJhbSB7Ym9vbGVhbj19IHByZXNlcnZlUHJvcGVydGllcwogICAgICogQHBhcmFtIHtzdHJpbmc9fSB0ZXh0CiAgICAgKiBAcmV0dXJuIHtzdHJpbmd9CiAgICAgKi8KICAgIGZ1bmN0aW9uIHN0cmluZ2lmeShub2RlLCBwcmVzZXJ2ZVByb3BlcnRpZXMsIHRleHQgPSAnJykgewogICAgICAvLyBjYWxjIHJ1bGUgY3NzVGV4dAogICAgICBsZXQgY3NzVGV4dCA9ICcnOwogICAgICBpZiAobm9kZVsnY3NzVGV4dCddIHx8IG5vZGVbJ3J1bGVzJ10pIHsKICAgICAgICBsZXQgciQgPSBub2RlWydydWxlcyddOwogICAgICAgIGlmIChyJCAmJiAhX2hhc01peGluUnVsZXMociQpKSB7CiAgICAgICAgICBmb3IgKGxldCBpID0gMCwgbCA9IHIkLmxlbmd0aCwgcjsKICAgICAgICAgICAgKGkgPCBsKSAmJiAociA9IHIkW2ldKTsgaSsrKSB7CiAgICAgICAgICAgIGNzc1RleHQgPSBzdHJpbmdpZnkociwgcHJlc2VydmVQcm9wZXJ0aWVzLCBjc3NUZXh0KTsKICAgICAgICAgIH0KICAgICAgICB9IGVsc2UgewogICAgICAgICAgY3NzVGV4dCA9IHByZXNlcnZlUHJvcGVydGllcyA/IG5vZGVbJ2Nzc1RleHQnXSA6CiAgICAgICAgICAgIHJlbW92ZUN1c3RvbVByb3BzKG5vZGVbJ2Nzc1RleHQnXSk7CiAgICAgICAgICBjc3NUZXh0ID0gY3NzVGV4dC50cmltKCk7CiAgICAgICAgICBpZiAoY3NzVGV4dCkgewogICAgICAgICAgICBjc3NUZXh0ID0gJyAgJyArIGNzc1RleHQgKyAnXG4nOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgICAvLyBlbWl0IHJ1bGUgaWYgdGhlcmUgaXMgY3NzVGV4dAogICAgICBpZiAoY3NzVGV4dCkgewogICAgICAgIGlmIChub2RlWydzZ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ZShSWC5jdXN0b21Qcm9wLCAnJykKICAgICAgICAucmVwbGFjZShSWC5taXhpblByb3AsICcnKTsKICAgIH0KCiAgICAvKioKICAgICAqIEBwYXJhbSB7c3RyaW5nfSBjc3NUZXh0CiAgICAgKiBAcmV0dXJuIHtzdHJpbmd9CiAgICAgKi8KICAgIGZ1bmN0aW9uIHJlbW92ZUN1c3RvbVByb3BBcHBseShjc3NUZXh0KSB7CiAgICAgIHJldHVybiBjc3NUZXh0CiAgICAgICAgLnJlcGxhY2UoUlgubWl4aW5BcHBseSwgJycpCiAgICAgICAgLnJlcGxhY2UoUlgudmFyQXBwbHksICcnKTsKICAgIH0KCiAgICAvKiogQGVudW0ge251bWJlcn0gKi8KICAgIGNvbnN0IHR5cGVzID0gewogICAgICBTVFlMRV9SVUxFOiAxLAogICAgICBLRVlGUkFNRVNfUlVMRTogNywKICAgICAgTUVESUFfUlVMRTogNCwKICAgICAgTUlYSU5fUlVMRTogMTAwMAogICAgfTsKCiAgICBjb25zdCBPUEVOX0JSQUNFID0gJ3snOwogICAgY29uc3QgQ0xPU0VfQlJBQ0UgPSAnfSc7CgogICAgLy8gaGVscGVyIHJlZ2V4cCdzCiAgICBjb25zdCBSWCA9IHsKICAgICAgY29tbWVudHM6IC9cL1wqW14qXSpcKisoW14vKl1bXipdKlwqKykqXC8vZ2ltLAogICAgICBwb3J0OiAvQGltcG9ydFteO10qOy9naW0sCiAgICAgIGN1c3RvbVByb3A6IC8oPzpeW147XC1cc31dKyk/LS1bXjt7fV0qPzpbXnt9O10qPyg/Ols7XG5dfCQpL2dpbSwKICAgICAgbWl4aW5Qcm9wOiAvKD86XlteO1wtXHN9XSspPy0tW147e31dKj86W157fTtdKj97W159XSo/fSg/Ols7XG5dfCQpPy9naW0sCiAgICAgIG1peGluQXBwbHk6IC9AYXBwbHlccypcKD9bXik7XSpcKT9ccyooPzpbO1xuXXwkKT8vZ2ltLAogICAgICB2YXJBcHBseTogL1teOzpdKj86W147XSo/dmFyXChbXjt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IHR5cGVzLk1FRElBX1JVTEUpIHsKICAgICAgICAgIGxldCBtYXRjaE1lZGlhID0gbm9kZVsnc2VsZWN0b3InXS5tYXRjaChNRURJQV9NQVRDSCk7CiAgICAgICAgICBpZiAobWF0Y2hNZWRpYSkgewogICAgICAgICAgICAvLyBpZiBydWxlIGlzIGEgbm9uIG1hdGNoaW5nIEBtZWRpYSBydWxlLCBza2lwIHN1YnJ1bGVzCiAgICAgICAgICAgIGlmICghd2luZG93Lm1hdGNoTWVkaWEobWF0Y2hNZWRpYVsxXSkubWF0Y2hlcykgewogICAgICAgICAgICAgIHNraXBSdWxlcyA9IHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgICAgaWYgKHR5cGUgPT09IHR5cGVzLlNUWUxFX1JVTEUpIHsKICAgICAgICBzdHlsZVJ1bGVDYWxsYmFjayhub2RlKTsKICAgICAgfSBlbHNlIGlmIChrZXlmcmFtZXNSdWxlQ2FsbGJhY2sgJiYKICAgICAgICB0eXBlID09PSB0eXBlcy5LRVlGUkFNRVNfUlVMRSkgewogICAgICAgIGtleWZyYW1lc1J1bGVDYWxsYmFjayhub2RlKTsKICAgICAgfSBlbHNlIGlmICh0eXBlID09PSB0eXBlcy5NSVhJTl9SVUxFKSB7CiAgICAgICAgc2tpcFJ1bGVzID0gdHJ1ZTsKICAgICAgfQogICAgICBsZXQgciQgPSBub2RlWydydWxlcyddOwogICAgICBpZiAociQgJiYgIXNraXBSdWxlcykgewogICAgICAgIGZvciAobGV0IGk9MCwgbD1yJC5sZW5ndGgsIHI7IChpPGwpICYmIChyPXIkW2ldKTsgaSsrKSB7CiAgICAgICAgICBmb3JFYWNoUnVsZShyLCBzdHlsZVJ1bGVDYWxsYmFjaywga2V5ZnJhbWVzUnVsZUNhbGxiYWNrLCBvbmx5QWN0aXZlUnVsZXMpOwogICAgICAgIH0KICAgICAgfQogICAgfQoKICAgIC8qKgogICAgICogV2FsayBmcm9tIHRleHRbc3RhcnRdIG1hdGNoaW5nIHBhcmVucyBhbmQKICAgICAqIHJldHVybnMgcG9zaXRpb24gb2YgdGhlIG91dGVyIGVuZCBwYXJlbgogICAgICogQHBhcmFtIHtzdHJpbmd9IHRleHQKICAgICAqIEBwYXJhbSB7bnVtYmVyfSBzdGFydAogICAgICogQHJldHVybiB7bnVtYmVyfQogICAgICovCiAgICBmdW5jdGlvbiBmaW5kTWF0Y2hpbmdQYXJlbih0ZXh0LCBzdGFydCkgewogICAgICBsZXQgbGV2ZWwgPSAwOwogICAgICBmb3IgKGxldCBpPXN0YXJ0LCBsPXRleHQubGVuZ3RoOyBpIDwgbDsgaSsrKSB7CiAgICAgICAgaWYgKHRleHRbaV0gPT09ICcoJykgewogICAgICAgICAgbGV2ZWwrKzsKICAgICAgICB9IGVsc2UgaWYgKHRleHRbaV0gPT09ICcpJykgewogICAgICAgICAgaWYgKC0tbGV2ZWwgPT09IDApIHsKICAgICAgICAgICAgcmV0dXJuIGk7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICAgIHJldHVybiAtMTsKICAgIH0KCiAgICAvKioKICAgICAqIEBwYXJhbSB7c3RyaW5nfSBzdHIKICAgICAqIEBwYXJhbSB7ZnVuY3Rpb24oc3RyaW5nLCBzdHJpbmcsIHN0cmluZywgc3RyaW5nKX0gY2FsbGJhY2sKICAgICAqLwogICAgZnVuY3Rpb24gcHJvY2Vzc1ZhcmlhYmxlQW5kRmFsbGJhY2soc3RyLCBjYWxsYmFjaykgewogICAgICAvLyBmaW5kICd2YXIoJwogICAgICBsZXQgc3RhcnQgPSBzdHIuaW5kZXhPZigndmFyKCcpOwogICAgICBpZiAoc3RhcnQgPT09IC0xKSB7CiAgICAgICAgLy8gbm8gdmFyPywgZXZlcnl0aGluZyBpcyBwcmVmaXgKICAgICAgICByZXR1cm4gY2FsbGJhY2soc3RyLCAnJywgJycsICcnKTsKICAgICAgfQogICAgICAvLyR7cHJlZml4fXZhcigke2lubmVyfSkke3N1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sbAogICAgICogaW5zZXJ0IGEgY29tbWVudCBvZiB0aGUgZm9ybSBgPCEtLWNzcy1idWlsZDpzaGFkb3ctLT5gCiAgICAgKgogICAgICogQHBhcmFtIHshSFRNTEVsZW1lbnR9IGVsZW1lbnQKICAgICAqIEByZXR1cm4ge3N0cmluZ30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0QnVpbGRDb21tZW50KGVsZW1lbnQpIHsKICAgICAgY29uc3QgYnVpbGRDb21tZW50ID0gZWxlbWVudC5sb2NhbE5hbWUgPT09ICd0ZW1wbGF0ZScgPwogICAgICAgICAgLyoqIEB0eXBlIHshSFRNTFRlbXBsYXRlRWxlbWVudH0gKi8gKGVsZW1lbnQpLmNvbnRlbnQuZmlyc3RDaGlsZCA6CiAgICAgICAgICBlbGVtZW50LmZpcnN0Q2hpbGQ7CiAgICAgIGlmIChidWlsZENvbW1lbnQgaW5zdGFuY2VvZiBDb21tZW50KSB7CiAgICAgICAgY29uc3QgY29tbWVudFBhcnRzID0gYnVpbGRDb21tZW50LnRleHRDb250ZW50LnRyaW0oKS5zcGxpdCgnOicpOwogICAgICAgIGlmIChjb21tZW50UGFydHNbMF0gPT09IENTU19CVUlMRF9BVFRSKSB7CiAgICAgICAgICByZXR1cm4gY29tbWVudFBhcnRzWzFdOwogICAgICAgIH0KICAgICAgfQogICAgICByZXR1cm4gJyc7CiAgICB9CgogICAgLyoqCiAgICAgKiBAcGFyYW0geyFIVE1MRWxlbWVudH0gZWxlbWVudAogICAgICovCiAgICBmdW5jdGlvbiByZW1vdmVCdWlsZENvbW1lbnQoZWxlbWVudCkgewogICAgICBjb25zdCBidWlsZENvbW1lbnQgPSBlbGVtZW50LmxvY2FsTmFtZSA9PT0gJ3RlbXBsYXRlJyA/CiAgICAgICAgICAvKiogQHR5cGUgeyFIVE1MVGVtcGxhdGVFbGVtZW50fSAqLyAoZWxlbWVudCkuY29udGVudC5maXJzdENoaWxkIDoKICAgICAgICAgIGVsZW1lbnQuZmlyc3RDa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ogICAgICAgIC8vIE5PVEU6IGZvciBiYyB3aXRoIHNoaW0sIGRvbid0IGFwcGx5IG51bGwgdmFsdWVzLgogICAgICAgIGlmIChwID09PSBudWxsKSB7CiAgICAgICAgICBlbGVtZW50LnN0eWxlLnJlbW92ZVByb3BlcnR5KHApOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICBlbGVtZW50LnN0eWxlLnNldFByb3BlcnR5KHAsIHByb3BlcnRpZXNbcF0pOwogICAgICAgIH0KICAgICAgfQogICAgfQoKICAgIC8qKgogICAgICogQHBhcmFtIHtFbGVtZW50fSBlbGVtZW50CiAgICAgKiBAcGFyYW0ge3N0cmluZ30gcHJvcGVydHkKICAgICAqIEByZXR1cm4ge3N0cmluZ30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0Q29tcHV0ZWRTdHlsZVZhbHVlKGVsZW1lbnQsIHByb3BlcnR5KSB7CiAgICAgIC8qKgogICAgICAgKiBAY29uc3Qge3N0cmluZ30KICAgICAgICovCiAgICAgIGNvbnN0IHZhbHVlID0gd2luZG93LmdldENvbXB1dGVkU3R5bGUoZWxlbWVudCkuZ2V0UHJvcGVydHlWYWx1ZShwcm9wZXJ0eSk7CiAgICAgIGlmICghdmFsdWUpIHsKICAgICAgICByZXR1cm4gJyc7CiAgICAgIH0gZWxzZSB7CiAgICAgICAgcmV0dXJuIHZhbHVlLnRyaW0oKTsKICAgICAgfQogICAgfQoKICAgIC8qKgogICAgICogcmV0dXJuIHRydWUgaWYgYGNzc1RleHRgIGNvbnRhaW5zIGEgbWl4aW4gZGVmaW5pdGlvbiBvciBjb25zdW1wdGlvbgogICAgICogQHBhcmFtIHtzdHJpbmd9IGNzc1RleHQKICAgICAqIEByZXR1cm4ge2Jvb2xlYW59CiAgICAgKi8KICAgIGZ1bmN0aW9uIGRldGVjdE1peGluKGNzc1RleHQpIHsKICAgICAgY29uc3QgaGFzID0gTUlYSU5fTUFUQ0gudGVzdChjc3NUZXh0KSB8fCBWQVJfQVNTSUdO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gLy8gc2VwYXJhdG9yIHVzZWQgYmV0d2VlbiBtaXhpbi1uYW1lIGFuZCBtaXhpbi1wcm9wZXJ0eS1uYW1lIHdoZW4gcHJvZHVjaW5nIHByb3BlcnRpZXMKICAgIC8vIE5PVEU6IHBsYWluICctJyBtYXkgY2F1c2UgY29sbGlzaW9ucyBpbiB1c2VyIHN0eWxlcwogICAgY29uc3QgTUlYSU5fVkFSX1NFUCA9ICdfLV8nOwoKICAgIC8vIG1hcCBvZiBtaXhpbiB0byBwcm9wZXJ0eSBuYW1lcwogICAgLy8gLS1mb286IHtib3JkZXI6IDJweH0gLT4ge3Byb3BlcnRpZXM6IHsoLS1mb28sIFsnYm9yZGVyJ10pfSwgZGVwZW5kYW50czogeydlbGVtZW50LW5hbWUnOiBwcm90b319CiAgICBjbGFzcyBNaXhpbk1hcCB7CiAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgIC8qKiBAdHlwZSB7IU9iamVjdDxzdHJpbmcsICFNaXhpbk1hcEVudHJ5Pn0gKi8KICAgICAgICB0aGlzLl9tYXAgPSB7fTsKICAgICAgfQogICAgICAvKioKICAgICAgICogQHBhcmFtIHtzdHJpbmd9IG5hbWUKICAgICAgICogQHBhcmFtIHshUHJvcGVydHlFbnRyeX0gcHJvcHMKICAgICAgICovCiAgICAgIHNldChuYW1lLCBwcm9wcykgewogICAgICAgIG5hbWUgPSBuYW1lLnRyaW0oKTsKICAgICAgICB0aGlzLl9tYXBbbmFtZV0gPSB7CiAgICAgICAgICBwcm9wZXJ0aWVzOiBwcm9wcywKICAgICAgICAgIGRlcGVuZGFudHM6IHt9CiAgICAgICAgfTsKICAgICAgfQogICAgICAvKioKICAgICAgICogQHBhcmFtIHtzdHJpbmd9IG5hbWUKICAgICAgICogQHJldHVybiB7TWl4aW5NYXBFbnRyeX0KICAgICAgICovCiAgICAgIGdldChuYW1lKSB7CiAgICAgICAgbmFtZSA9IG5hbWUudHJpbSgpOwogICAgICAgIHJldHVybiB0aGlzLl9tYXBbbmFtZV0gfHwgbnVsbDsKICAgICAgfQogICAgfQoKICAgIC8qKgogICAgICogQ2FsbGJhY2sgZm9yIHdoZW4gYW4gZWxlbWVudCBpcyBtYXJrZWQgaW52YWxpZAogICAgICogQHR5cGUgez9mdW5jdGlvbihzdHJpbmcpfQogICAgICovCiAgICBsZXQgaW52YWxpZENhbGxiYWNrID0gbnVsbDsKCiAgICAvKiogQHVucmVzdHJpY3RlZCAqLwogICAgY2xhc3MgQXBwbHlTaGltIHsKICAgICAgY29uc3RydWN0b3IoKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/c3RyaW5nfSAqLwogICAgICAgIHRoaXMuX2N1cnJlbnRFbGVtZW50ID0gbnVsbDsKICAgICAgICAvKiogQHR5cGUge0hUTUxNZXRhRWxlbWVudH0gKi8KICAgICAgICB0aGlzLl9tZWFzdXJlRWxlbWVudCA9IG51bGw7CiAgICAgICAgdGhpcy5fbWFwID0gbmV3IE1peGluTWFwKCk7CiAgICAgIH0KICAgICAgLyoqCiAgICAgICAqIHJldHVybiB0cnVlIGlmIGBjc3NUZXh0YCBjb250YWlucyBhIG1peGluIGRlZmluaXRpb24gb3IgY29uc3VtcHRpb24KICAgICAgICogQHBhcmFtIHtzdHJpbmd9IGNzc1RleHQKICAgICAgICogQHJldHVybiB7Ym9vbGVhbn0KICAgICAgICovCiAgICAgIGRldGVjdE1peGluKGNzc1RleHQpIHsKICAgICAgICByZXR1cm4gZGV0ZWN0TWl4aW4oY3NzVGV4dCk7CiAgICAgIH0KCiAgICAgIC8qKgogICAgICAgKiBHYXRoZXIgc3R5bGVzIGludG8gb25lIHN0eWxlIGZvciBlYXNpZXIgcHJvY2Vzc2luZwogICAgICAgKiBAcGFyYW0geyFIVE1MVGVtcGxhdGVFbGVtZW50fSB0ZW1wbGF0ZQogICAgICAgKiBAcmV0dXJuIHtIVE1MU3R5bGVFbGVtZW50fQogICAgICAgKi8KICAgICAgZ2F0aGVyU3R5bGVzKHRlbXBsYXRlKSB7Ci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sbDsKICAgICAgfQogICAgICAvKioKICAgICAgICogQHBhcmFtIHshSFRNTFN0eWxlRWxlbWVudH0gc3R5bGUKICAgICAgICogQHBhcmFtIHtzdHJpbmd9IGVsZW1lbnROYW1lCiAgICAgICAqIEByZXR1cm4ge1N0eWxlTm9kZX0KICAgICAgICovCiAgICAgIHRyYW5zZm9ybVN0eWxlKHN0eWxlLCBlbGVtZW50TmFtZSA9ICcnKSB7CiAgICAgICAgbGV0IGFzdCA9IHJ1bGVzRm9yU3R5bGUoc3R5bGUpOwogICAgICAgIHRoaXMudHJhbnNmb3JtUnVsZXMoYXN0LCBlbGVtZW50TmFtZSk7CiAgICAgICAgc3R5bGUudGV4dENvbnRlbnQgPSB0b0Nzc1RleHQoYXN0KTsKICAgICAgICByZXR1cm4gYXN0OwogICAgICB9CiAgICAgIC8qKgogICAgICAgKiBAcGFyYW0geyFIVE1MU3R5bGVFbGVtZW50fSBzdHlsZQogICAgICAgKiBAcmV0dXJuIHtTdHlsZU5vZGV9CiAgICAgICAqLwogICAgICB0cmFuc2Zvcm1DdXN0b21TdHlsZShzdHlsZSkgewogICAgICAgIGxldCBhc3QgPSBydWxlc0ZvclN0eWxlKHN0eWxlKTsKICAgICAgICBmb3JFYWNoUnVsZShhc3QsIChydWxlKSA9PiB7CiAgICAgICAgICBpZiAocnVsZVsnc2VsZWN0b3InXSA9PT0gJzpyb290JykgewogICAgICAgICAgICBydWxlWydzZWxlY3RvciddID0gJ2h0bWwnOwogICAgICAgICAgfQogICAgICAgICAgdGhpcy50cmFuc2Zvcm1SdWxlKHJ1bGUpOwogICAgICAgIH0pOwogICAgICAgIHN0eWxlLnRleHRDb250ZW50ID0gdG9Dc3NUZXh0KGFzdCk7CiAgICAgICAgcmV0dXJuIGFzdDsKICAgICAgfQogICAgICAvKioKICAgICAgICogQHBhcmFtIHtTdHlsZU5vZGV9IHJ1bGVzCiAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBlbGVtZW50TmFtZQogICAgICAgKi8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CBlbnRyeSBpbiB0aGUgbWFwIHRvIGFkZCB0aGlzIGVsZW1lbnQgYXMgYSBkZXBlbmRlbmN5IGZvciB3aGVuIGl0IGlzIGRlZmluZWQuCiAgICAgICAgaWYgKCFtaXhpbkVudHJ5KSB7CiAgICAgICAgICB0aGlzLl9tYXAuc2V0KG1peGluTmFtZSwge30pOwogICAgICAgICAgbWl4aW5FbnRyeSA9IHRoaXMuX21hcC5nZXQobWl4aW5OYW1lKTsKICAgICAgICB9CiAgICAgICAgaWYgKG1peGluRW50cnkpIHsKICAgICAgICAgIGlmICh0aGlzLl9jdXJyZW50RWxlbWVudCkgewogICAgICAgICAgICBtaXhpbkVudHJ5LmRlcGVuZGFudHNbdGhpcy5fY3VycmVudEVsZW1lbnRdID0gdHJ1ZTsKICAgICAgICAgIH0KICAgICAgICAgIGxldCBwLCBwYXJ0cywgZjsKICAgICAgICAgIGNvbnN0IHByb3BlcnRpZXMgPSBtaXhpbkVudHJ5LnByb3BlcnRpZXM7CiAgICAgICAgICBmb3IgKHAgaW4gcHJvcGVydGllcykgewogICAgICAgICAgICBmID0gZmFsbGJhY2tzICYmIGZhbGxiYWNrc1twXTsKICAgICAgICAgICAgcGFydHMgPSBbcCwgJzogdmFyKCcsIG1peGluTmFtZSwgTUlYSU5fVkFSX1NFUCwgcF07CiAgICAgICAgICAgIGlmIChmKSB7CiAgICAgICAgICAgICAgcGFydHMucHVzaCgnLCcsIGYucmVwbGFjZShJTVBPUlRBTlQsICcnKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcGFydHMucHVzaCgnKScpOwogICAgICAgICAgICBpZiAoSU1QT1JUQU5ULnRlc3QocHJvcGVydGllc1twXSkpIHsKICAgICAgICAgICAgICBwYXJ0cy5wdXNoKCcgIWltcG9ydGFudCcpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhcnMucHVzaChwYXJ0cy5qb2luKCcnKSk7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiB2YX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lcicKICAgICAgICAgICAgdmFsdWUgPSAnYXBwbHktc2hpbS1pbmhlcml0JzsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIHZhbHVlOwogICAgICB9CgogICAgICAvKioKICAgICAgICogInBhcnNlIiBhIG1peGluIGRlZmluaXRpb24gaW50byBhIG1hcCBvZiBwcm9wZXJ0aWVzIGFuZCB2YWx1ZXMKICAgICAgICogY3NzVGV4dFRvTWFwKCdib3JkZXI6IDJweCBzb2xpZCBibGFjaycpIC0+ICgnYm9yZGVyJywgJzJweCBzb2xpZCBibGFjaycpCiAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSB0ZXh0CiAgICAgICAqIEBwYXJhbSB7Ym9vbGVhbj19IHJlcGxhY2VJbml0aWFsT3JJbmhlcml0CiAgICAgICAqIEByZXR1cm4geyFPYmplY3Q8c3RyaW5nLCBzdHJpbmc+fQogICAgICAgKi8KICAgICAgX2Nzc1RleHRUb01hcCh0ZXh0LCByZXBsYWNlSW5pdGlhbE9ySW5oZXJpdCA9IGZhbHNlKSB7CiAgICAgICAgbGV0IHByb3BzID0gdGV4dC5zcGxpdCgnOycpOwogICAgICAgIGxldCBwcm9wZXJ0eSwgdmFsdWU7CiAgICAgICAgbGV0IG91dCA9IHt9OwogICAgICAgIGZvciAobGV0IGkgPSAwLCBwLCBzcDsgaSA8IHByb3BzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICBwID0gcHJvcHNbaV07CiAgICAgICAgICBpZiAocCkgewogICAgICAgICAgICBzcCA9IHAuc3BsaXQoJzonKTsKICAgICAgICAgICAgLy8gaWdub3JlIGxpbmVzIHRoYXQgYXJlbid0IGRlZmluaXRpb25zIGxpa2UgQG1lZGlhCiAgICAgICAgICAgIGlmIChzcC5sZW5ndGggPiAxKSB7CiAgICAgICAgICAgICAgcHJvcGVydHkgPSBzcFswXS50cmltKCk7CiAgICAgICAgICAgICAgLy8gc29tZSBwcm9wZXJ0aWVzIG1heSBoYXZlICc6JyBpbiB0aGUgdmFsdWUsIGxpa2UgZGF0YSB1cmxzCiAgICAgICAgICAgICAgdmFsdWUgPSBzcC5zbGljZSgxKS5qb2luKCc6Jyk7CiAgICAgICAgICAgICAgaWYgKHJlcGxhY2VJbml0aWFsT3JJbmhlcml0KSB7CiAgICAgICAgICAgICAgICB2YWx1ZSA9IHRoaXMuX3JlcGxhY2VJbml0aWFsT3JJbmhlcml0KHByb3BlcnR5LCB2YWx1ZSk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIG91dFtwcm9wZXJ0eV0gPSB2YWx1ZTsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gb3V0OwogICAgICB9CgogICAgICAvKioKICAgICAgICogQHBhcmFtIHtNaXhpbk1hcEVudHJ5fSBtaXhpbkVudHJ5CiAgICAgICAqLwogICAgICBfaW52YWxpZGF0ZU1peGluRW50cnkobWl4aW5FbnRyeSkgewogICAgICAgIGlmICghaW52YWxpZENhbGxiYWNrKSB7CiAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIGZvciAobGV0IGVsZW1lbnROYW1lIGluIG1peGluRW50cnkuZGVwZW5kYW50cykgewogICAgICAgICAgaWYgKGVsZW1lbnROYW1lICE9PSB0aGlzLl9jdXJyZW50RWxlbWVudCkgewogICAgICAgICAgICBpbnZhbGlkQ2FsbGJhY2soZWxlbWVudE5hbWUpOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQoKICAgICAgLyoqCiAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBtYXRjaFRleHQKICAgICAgICogQHBhcmFtIHtzdHJpbmd9IHByb3BlcnR5TmFtZQogICAgICAgKiBAcGFyYW0gez9zdHJpbmd9IHZhbHVlUHJvcGVydHkKICAgICAgICogQHBhcmFtIHs/c3RyaW5nfSB2YWx1ZU1peGluCiAgICAgICAqIEBwYXJhbSB7IVN0eWxlTm9kZX0gcnVsZQogICAgICAgKiBAcmV0dXJuIH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ID0gbWl4aW5WYWx1ZXNbcF07CiAgICAgICAgICAvLyBpZiBwcm9wZXJ0eSBub3QgZGVmaW5lZCBieSBjdXJyZW50IG1peGluLCBzZXQgaW5pdGlhbAogICAgICAgICAgaWYgKHYgPT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICB2ID0gJ2luaXRpYWwnOwogICAgICAgICAgfQogICAgICAgICAgaWYgKG9sZFByb3BzICYmICEocCBpbiBvbGRQcm9wcykpIHsKICAgICAgICAgICAgbmVlZFRvSW52YWxpZGF0ZSA9IHRydWU7CiAgICAgICAgICB9CiAgICAgICAgICBvdXQucHVzaChgJHtwcm9wZXJ0eU5hbWV9JHtNSVhJTl9WQVJfU0VQfSR7cH06ICR7dn1gKTsKICAgICAgICB9CiAgICAgICAgaWYgKG5lZWRUb0ludmFsaWRhdGUpIHsKICAgICAgICAgIHRoaXMuX2ludmFsaWRhdGVNaXhpbkVudHJ5KG1peGluRW50cnkpOwogICAgICAgIH0KICAgICAgICBpZiAobWl4aW5FbnRyeSkgewogICAgICAgICAgbWl4aW5FbnRyeS5wcm9wZXJ0aWVzID0gY29tYmluZWRQcm9wczsKICAgICAgICB9CiAgICAgICAgLy8gYmVjYXVzZSB0aGUgbWl4aW5NYXAgaXMgZ2xvYmFsLCB0aGUgbWl4aW4gbWlnaHQgY29uZmxpY3Qgd2l0aAogICAgICAgIC8vIGEgZGlmZmVyZW50IHNjb3BlJ3Mgc2ltcGxlIHZhcmlhYmxlIGRlZmluaXRpb246CiAgICAgICAgLy8gRXhhbXBsZToKICAgICAgICAvLyBzb21lIHN0eWxlIHNvbWV3aGVyZToKICAgICAgICAvLyAtLW1peGluMTp7IC4uLiB9CiAgICAgICAgLy8gLS1taXhpbjI6IHZhcigtLW1peGluMSk7CiAgICAgICAgLy8gc29tZSBvdGhlciBlbGVtZW50OgogICAgICAgIC8vIC0tbWl4aW4xOiAxMHB4IHNvbGlkIHJlZDsKICAgICAgICAvLyAtLWZvbzogdmFyKC0tbWl4aW4xK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NTUy5DdXN0b21TdHlsZUludGVyZmFjZSk7CiAgICAgICAgICB0aGlzLmN1c3RvbVN0eWxlSW50ZXJmYWNlWyd0cmFuc2Zvcm1DYWxsYmFjayddID0gKHN0eWxlKSA9PiB7CiAgICAgICAgICAgIGFwcGx5U2hpbS50cmFuc2Zvcm1DdXN0b21TdHlsZShzdHlsZSk7CiAgICAgICAgICB9OwogICAgICAgICAgdGhpcy5jdXN0b21TdHlsZUludGVyZmFjZVsndmFsaWRhdGVDYWxsYmFjayddID0gKCkgPT4gewogICAgICAgICAgICByZXF1ZXN0QW5pbWF0aW9uRnJhbWUoKCkgPT4gewogICAgICAgICAgICAgIGlmICh0aGlzLmN1c3RvbVN0eWxlSW50ZXJmYWNlWydlbnF1ZXVlZCddKSB7CiAgICAgICAgICAgICAgICB0aGlzLmZsdXNoQ3VzdG9tU3R5bGVzKCk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICAgIH07CiAgICAgICAgfQogICAgICB9CiAgICAgIC8qKgogICAgICAgKiBAcGFyYW0geyFIVE1MVGVtcGxhdGVFbGVtZW50fSB0ZW1wbGF0ZQogICAgICAgKiBAcGFyYW0ge3N0cmluZ30gZWxlbWVudE5hbWUKICAgICAgICovCiAgICAgIHByZXBhcmVUZW1wbGF0ZSh0ZW1wbGF0ZSwgZWxlbWVudE5hbWUpIHsKICAgICAgICB0aGlzLmVuc3VyZSgpOwogICAgICAgIGlmIChlbGVtZW50SGFzQnVpbHRDc3ModGVtcGxhdGUpKSB7CiAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIHRlbXBsYXRlTWFwW2VsZW1lbnROYW1lXSA9IHRlbXBsYXRlOwogICAgICAgIGxldCBhc3QgPSBhcHBseVNoaW0udHJhbnNmb3JtVGVtcGxhdGUodGVtcGxhdGUsIGVsZW1lbnROYW1lKTsKICAgICAgICAvLyBzYXZlIG9yaWdpbmFsIHN0eWxlIGFzdCB0byB1c2UgZm9yIHJldmFsaWR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B7IUhUTUxFbGVtZW50fSBlbGVtZW50CiAgICAgICAgICovCiAgICAgICAgc3R5bGVFbGVtZW50KGVsZW1lbnQpIHsKICAgICAgICAgIGFwcGx5U2hpbUludGVyZmFjZS5mbHVzaEN1c3RvbVN0eWxlcygpOwogICAgICAgICAgYXBwbHlTaGltSW50ZXJmYWNlLnN0eWxlRWxlbWVudChlbGVtZW50KTsKICAgICAgICB9LAoKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0ge09iamVjdD19IHByb3BlcnRpZXMKICAgICAgICAgKi8KICAgICAgICBzdHlsZURvY3VtZW50KHByb3BlcnRpZXMpIHsKICAgICAgICAgIGFwcGx5U2hpbUludGVyZmFjZS5mbHVzaEN1c3RvbVN0eWxlcygpOwogICAgICAgICAgYXBwbHlTaGltSW50ZXJmYWNlLnN0eWxlRG9jdW1lbnQocHJvcGVydGllcyk7CiAgICAgICAgfSwKCiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHtFbGVtZW50fSBlbGVtZW50CiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IHByb3BlcnR5CiAgICAgICAgICogQHJldHVybiB7c3RyaW5nfQogICAgICAgICAqLwogICAgICAgIGdldENvbXB1dGVkU3R5bGVWYWx1ZShlbGVtZW50LCBwcm9wZXJ0eSkgewogICAgICAgICAgcmV0dXJuIGdldENvbXB1dGVkU3R5bGVWYWx1ZShlbGVtZW50LCBwcm9wZXJ0eSk7CiAgICAgICAgfSwKCiAgICAgICAgZmx1c2hDdXN0b21TdHlsZXMoKSB7CiAgICAgICAgICBhcHBseVNoaW1JbnRlcmZhY2UuZmx1c2hDdXN0b21TdHlsZXMoKTsKICAgICAgICB9LAoKICAgICAgICBuYXRpdmVDc3M6IG5hdGl2ZUNzc1ZhcmlhYmxlcywKICAgICAgICBuYXRpdmVTaGFkb3c6IG5hdGl2ZVNoYWRvdywKICAgICAgICBjc3NCdWlsZDogY3NzQnVpbGQsCiAgICAgICAgZGlzYWJsZVJ1bn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YgZ2xvYmFsbHkgZmx1c2hhYmxlIHRhc2tzLgogICAgICoKICAgICAqIEBwYXJhbSB7IURlYm91bmNlcn0gZGVib3VuY2VyIERlYm91bmNlciB0byBlbnF1ZXVlCiAgICAgKiBAcmV0dXJuIHt2b2lkfQogICAgICovCiAgICBjb25zdCBlbnF1ZXVlRGVib3VuY2VyID0gZnVuY3Rpb24oZGVib3VuY2VyKSB7CiAgICAgIGRlYm91bmNlclF1ZXVlLmFkZChkZWJvdW5jZXIpOwogICAgfTsKCiAgICAvKioKICAgICAqIEZsdXNoZXMgYW55IGVucXVldWVkIGRlYm91bmNlcnMKICAgICAqCiAgICAgKiBAcmV0dXJuIHtib29sZWFufSBSZXR1cm5zIHdoZXRoZXIgYW55IGRlYm91bmNlcnMgd2VyZSBmbHVzaGVkCiAgICAgKi8KICAgIGNvbnN0IGZsdXNoRGVib3VuY2VycyA9IGZ1bmN0aW9uKCkgewogICAgICBjb25zdCBkaWRGbHVzaCA9IEJvb2xlYW4oZGVib3VuY2VyUXVldWUuc2l6ZSk7CiAgICAgIC8vIElmIG5ldyBkZWJvdW5jZXJzIGFyZSBhZGRlZCB3aGlsZSBmbHVzaGluZywgU2V0LmZvckVhY2ggd2lsbCBlbnN1cmUKICAgICAgLy8gbmV3bHkgYWRkZWQgb25lcyBhcmUgYWxzbyBmbHVzaGVkCiAgICAgIGRlYm91bmNlclF1ZXVlLmZvckVhY2goZGVib3VuY2VyID0+IHsKICAgICAgICB0cnkgewogICAgICAgICAgZGVib3VuY2VyLmZsdXNoKCk7CiAgICAgICAgfSBjYXRjaChlKSB7CiAgICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHsKICAgICAgICAgICAgdGhyb3cgZTsKICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgfSk7CiAgICAgIHJldHVybiBkaWRGbHVzaDsKICAgIH07CgogICAgLyoqCiAgICBAbGljZW5zZQogICAgQ29weXJpZ2h0IChjKSAyMDE3IFRoZSBQb2x5bWVyIFByb2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UgPT09IE5vZGUuRUxFTUVOVF9OT0RFKSB7CiAgICAgICAgICAgIGlmIChwYXRoW2ldLmxvY2FsTmFtZSA9PT0gJ2xhYmVsJykgewogICAgICAgICAgICAgIGNsaWNrZWRMYWJlbHMucHVzaCgvKiogQHR5cGUgeyFIVE1MTGFiZWxFbGVtZW50fSAqLyAocGF0aFtpXSkpOwogICAgICAgICAgICB9IGVsc2UgaWYgKGNhbkJlTGFiZWxsZWQoLyoqIEB0eXBlIHshSFRNTEVsZW1lbnR9ICovIChwYXRoW2ldKSkpIHsKICAgICAgICAgICAgICBsZXQgb3duZXJMYWJlbHMgPQogICAgICAgICAgICAgICAgICBtYXRjaGluZ0xhYmVscygvKiogQHR5cGUgeyFIVE1MRWxlbWVudH0gKi8gKHBhdGhbaV0pKTsKICAgICAgICAgICAgICAvLyBjaGVjayBpZiBvbmUgb2YgdGhlIGNsaWNrZWQgbGFiZWxzIGlzIGxhYmVsbGluZyB0aGlzIGVsZW1lbnQKICAgICAgICAgICAgICBmb3IgKGxldCBqID0gMDsgaiA8IG93bmVyTGFiZWxzLmxlbmd0aDsgaisrKSB7CiAgICAgICAgICAgICAgICBjbGlja0Zyb21MYWJlbCA9IGNsaWNrRnJvbUxhYmVsIHx8IGNsaWNrZWRMYWJlbHMuaW5kZXhPZihvd25lckxhYmVsc1tqXSkgPiAtMTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICAgIGlmIChwYXRoW2ldID09PSBQT0lOVEVSU1RBVEUubW91c2UudGFyZ2V0KSB7CiAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLy8gaWYgb25lIG9mIHRoZSBjbGlja2VkIGxhYmVscyB3YXMgbGFiZWxsaW5nIHRoZSB0YXJnZXQgZWxlbWVudCwKICAgICAgICAvLyB0aGlzIGlzIG5vdCBhIGdob3N0IGNsaWNrCiAgICAgICAgaWYgKGNsaWNrRnJvbUxhYmVsKSB7CiAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIG1vdXNlRXZlbnQucHJldmVudERlZmF1bHQoKTsKICAgICAgICBtb3VzZUV2ZW50LnN0b3BQcm9wYWdhdGlvbigpOwogICAgICB9CiAgICB9OwoKICAgIC8qKgogICAgICogQHBhcmFtIHtib29sZWFuPX0gc2V0dXAgVHJ1ZSB0byBhZGQsIGZhbHNlIHRvIHJlbW92ZS4KICAgICAqIEByZXR1cm4ge3ZvaWR9CiAgICAgKi8KICAgIGZ1bmN0aW9uIHNldHVwVGVhcmRvd25Nb3VzZUNhbmNlbGxlcihzZXR1cCkgewogICAgICBsZXQgZXZlbnRzID0gSVNfVE9VQ0hfT05MWSA/IFsnY2xpY2snXSA6IE1PVVNFX0VWRU5UUzsKICAgICAgZm9yIChsZXQgaSA9IDAsIGVuOyBpIDwgZXZlbnRzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgZW4gPSBldmVudHNbaV07CiAgICAgICAgaWYgKHNldHVwKSB7CiAgICAgICAgICAvLyByZXNldCBjbGlja0xhYmVscyBhcnJheQogICAgICAgICAgY2xpY2tlZExhYmVscy5sZW5ndGggPSAwOwogICAgICAgICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcihlbiwgbW91c2VDYW5jZWxsZXIsIHRydWUpOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICBkb2N1bWVudC5yZW1vdmVFdmVudExpc3RlbmVyKGVuLCBtb3VzZUNhbmNlbGxlciwgdHJ1ZSk7CiAgICAgICAgfQogICAgICB9CiAgICB9CgogICAgZnVuY3Rpb24gaWdub3JlTW91c2UoZSkgewogICAgICBpZiAoIVBPSU5URVJTVEFURS5tb3VzZS5tb3VzZUlnbm9yZUpvYikgewogICAgICAgIHNldHVwVGVhcmRvd25Nb3VzZUNhbmNlbGxlcih0cnVlKTsKICAgICAgfQogICAgICBsZXQgdW5zZXQgPSBmdW5jdGlvbigpIHsKICAgICAgICBzZXR1cFRlYXJk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VybiAhKCh4ID49IGJjci5sZWZ0ICYmIHggPD0gYmNyLnJpZ2h0KSAmJiAoeSA+PSBiY3IudG9wICYmIHkgPD0gYmNyLmJvdHRvbSkpOwogICAgICB9CiAgICAgIHJldHVybiBmYWxzZTsKICAgIH0KCiAgICBsZXQgUE9JTlRFUlNUQVRFID0gewogICAgICBtb3VzZTogewogICAgICAgIHRhcmdldDogbnVsbCwKICAgICAgICBtb3VzZUlnbm9yZUpvYjogbnVsbAogICAgICB9LAogICAgICB0b3VjaDogewogICAgICAgIHg6IDAsCiAgICAgICAgeTogMCwKICAgICAgICBpZDogLTEsCiAgICAgICAgc2Nyb2xsRGVjaWRlZDogZmFsc2UKICAgICAgfQogICAgfTsKCiAgICBmdW5jdGlvbiBmaXJzdFRvdWNoQWN0aW9uKGV2KSB7CiAgICAgIGxldCB0YSA9ICdhdXRvJzsKICAgICAgbGV0IHBhdGggPSBnZXRDb21wb3NlZFBhdGgoZXYpOwogICAgICBmb3IgKGxldCBpID0gMCwgbjsgaSA8IHBhdGgubGVuZ3RoOyBpKyspIHsKICAgICAgICBuID0gcGF0aFtpXTsKICAgICAgICBpZiAobltUT1VDSF9BQ1RJT05dKSB7CiAgICAgICAgICB0YSA9IG5bVE9VQ0hfQUNUSU9OXTsKICAgICAgICAgIGJyZWFrOwogICAgICAgIH0KICAgICAgfQogICAgICByZXR1cm4gdGE7CiAgICB9CgogICAgZnVuY3Rpb24gdHJhY2tEb2N1bWVudChzdGF0ZU9iaiwgbW92ZWZuLCB1cGZuKSB7CiAgICAgIHN0YXRlT2JqLm1vdmVmbiA9IG1vdmVmbjsKICAgICAgc3RhdGVPYmoudXBmbiA9IHVwZm47CiAgICAgIGRvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIoJ21vdXNlbW92ZScsIG1vdmVmbik7CiAgICAgIGRvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIoJ21vdXNldXAnLCB1cGZuKTsKICAgIH0KCiAgICBmdW5jdGlvbiB1bnRy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FyaSkuCiAgICAgIHJldHVybiBwYXRoLmxlbmd0aCA+IDAgPyBwYXRoWzBdIDogZXYudGFyZ2V0OwogICAgfQoKICAgIC8qKgogICAgICogQHByaXZhdGUKICAgICAqIEBwYXJhbSB7RXZlbnR9IGV2IEV2ZW50LgogICAgICogQHJldHVybiB7dm9pZH0KICAgICAqLwogICAgZnVuY3Rpb24gX2hhbmRsZU5hdGl2ZShldikgewogICAgICBsZXQgaGFuZGxlZDsKICAgICAgbGV0IHR5cGUgPSBldi50eXBlOwogICAgICBsZXQgbm9kZSA9IGV2LmN1cnJlbnRUYXJnZXQ7CiAgICAgIGxldCBnb2JqID0gbm9kZVtHRVNUVVJFX0tFWV07CiAgICAgIGlmICghZ29iaikgewogICAgICAgIHJldHVybjsKICAgICAgfQogICAgICBsZXQgZ3MgPSBnb2JqW3R5cGVdOwogICAgICBpZiAoIWdzKSB7CiAgICAgICAgcmV0dXJuOwogICAgICB9CiAgICAgIGlmICghZXZbSEFORExFRF9PQkpdKSB7CiAgICAgICAgZXZbSEFORExFRF9PQkpdID0ge307CiAgICAgICAgaWYgKHR5cGUuc2xpY2UoMCwgNSkgPT09ICd0b3VjaCcpIHsKICAgICAgICAgIGV2ID0gLyoqIEB0eXBlIHtUb3VjaEV2ZW50fSAqLyhldik7IC8vIGVzbGludC1kaXNhYmxlLWxpbmUgbm8tc2VsZi1hc3NpZ24KICAgICAgICAgIGxldCB0ID0gZXYuY2hhbmdlZFRvdWNoZXNbMF07CiAgICAgICAgICBpZiAodHlwZSA9PT0gJ3RvdWNoc3RhcnQnKSB7CiAgICAgICAgICAgIC8vIG9ubHkgaGFuZGxlIHRoZSBmaXJzdCBmaW5nZXIKICAgICAgICAgICAgaWYgKGV2LnRvdWNoZXMubGVuZ3RoID09PSAxKSB7CiAgICAgICAgICAgICAgUE9JTlRFUlNUQVRFLnRvdWNoLmlkID0gdC5pZGVudGlmaWVyOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICBpZiAoUE9JTlRFUlNUQVRFLnRvdWNoLmlkICE9PSB0LmlkZW50aWZpZXIpIHsKICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgfQogICAgICAgICAgaWYgKCFIQVNfTkFUSVZFX1RBKSB7CiAgICAgICAgICAgIGlmICh0eXBlID09PSAndG91Y2hzdGFydCcgfHwgdHlwZSA9PT0gJ3RvdWNobW92ZScpIHsKICAgICAgICAgICAgICBfaGFuZGxlVG91Y2hBY3Rpb24oZXYpOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICAgIGhhbmRsZWQgPSBldltIQU5ETEVEX09CSl07CiAgICAgIC8vIHVzZWQgdG8gaWdub3JlIHN5bnRoZXRpYyBtb3VzZSBldmVudHMKICAgICAgaWYgKGhhbmRsZWQuc2tpcCkgewogICAgICAgIHJldHVybjsKICAgICAgfQogICAgICAvLyByZXNldCByZWNvZ25pemVyIHN0YXRlCiAgICAgIGZvciAobGV0IGkgPSAwLCByOyBpIDwgcmVjb2duaXplcnMubGVuZ3RoOyBpKyspIHsKICAgICAgICByID0gcmVjb2duaXplcnNbaV07CiAgICAgICAgaWYgKGdzW3IubmFtZV0gJiYgIWhhbmRsZWRbci5uYW1lXSkgewogICAgICAgICAgaWYgKHIuZmxvdyAmJiByLmZsb3cuc3RhcnQuaW5kZXhPZihldi50eXBlKSA+IC0xICYmIHIucmVzZXQpIHsKICAgICAgICAgICAgci5yZXNldCgpOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgICAvLyBlbmZvcmNlIGdlc3R1cmUgcmVjb2duaXplciBvcmRlcgogICAgICBmb3IgKGxldCBpID0gMCwgcjsgaSA8IHJlY29nbml6ZXJzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgciA9IHJlY29nbml6ZXJzW2ldOwogICAgICAgIGlmIChnc1tyLm5hbWVdICYmICFoYW5kbGVkW3IubmFtZV0pIHsKICAgICAgICAgIGhhbmRsZWRbci5uYW1lXSA9IHRydWU7CiAgICAgICAgICByW3R5cGVdKGV2KTsKICAgICAgICB9CiAgICAgIH0KICAgIH0KCiAgICAvKioKICAgICAqIEBwcml2YXRlCiAgICAgKiBAcGFyYW0ge1RvdWNoRXZlbnR9IGV2IEV2ZW50LgogICAgICogQHJldHVybiB7dm9pZH0KICAgICAqLwogICAgZnVuY3Rpb24gX2hhbmRsZVRvdWNoQWN0aW9uKGV2KSB7CiAgICAgIGxldCB0ID0gZXYuY2hhbmdlZFRvdWNoZXNbMF07CiAgICAgIGxldCB0eXBlID0gZXYudHlwZTsKICAgICAgaWYgKHR5cGUgPT09ICd0b3VjaHN0YXJ0JykgewogICAgICAgIFBPSU5URVJTVEFURS50b3VjaC54ID0gdC5jbGllbnRYOwogICAgICAgIFBPSU5URVJTVEFURS50b3VjaC55ID0gdC5jbGllbnRZOwogICAgICAgIFBPSU5URVJTVEFURS50b3VjaC5zY3JvbGxEZWNpZGVkID0gZmFsc2U7CiAgICAgIH0gZWxzZSBpZiAodHlwZSA9PT0gJ3RvdWNobW92ZScpIHsKICAgICAgICBpZiAoUE9JTlRFUlNUQVRFLnRvdWNoLnNjcm9sbERlY2lkZWQpIHsKICAgICAgICAgIHJldHVybjsKICAgICAgICB9CiAgICAgICAgUE9JTlRFUlNUQVRFLnRvdWNoLnNjcm9sbERlY2lkZWQgPSB0cnVlOwogICAgICAgIGxldCB0YSA9IGZpcnN0VG91Y2hBY3Rpb24oZXYpOwogICAgICAgIGxldCBzaG91bGRQcmV2ZW50ID0gZmFsc2U7CiAgICAgICAgbGV0IGR4ID0gTWF0aC5hYnMoUE9JTlRFUlNUQVRFLnRvdWNoLnggLSB0LmNsaWVudFgpOwogICAgICAgIGxldCBkeSA9IE1hdGguYWJzKFBPSU5URVJTVEFURS50b3VjaC55IC0gdC5jbGllbnRZKTsKICAgICAgICBpZiAoIWV2LmNhbmNlbGFibGUpIDsgZWxzZSBpZiAodGEgPT09ICdub25lJykgewogICAgICAgICAgc2hvdWxkUHJldmVudCA9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ZXVwJywgJ3RvdWNoZW5kJ10KICAgICAgfSwKICAgICAgZW1pdHM6IFsnZG93bicsICd1cCddLAoKICAgICAgaW5mbzogewogICAgICAgIG1vdmVmbjogbnVsbCwKICAgICAgICB1cGZuOiBudWxsCiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogQHRoaXMge0dlc3R1cmVSZWNvZ25pemVyfQogICAgICAgKiBAcmV0dXJuIHt2b2lkfQogICAgICAgKi8KICAgICAgcmVzZXQ6IGZ1bmN0aW9uKCkgewogICAgICAgIHVudHJhY2tEb2N1bWVudCh0aGlzLmluZm8pOwogICAgICB9LAoKICAgICAgLyoqCiAgICAgICAqIEB0aGlzIHtHZXN0dXJlUmVjb2duaXplcn0KICAgICAgICogQHBhcmFtIHtNb3VzZUV2ZW50fSBlCiAgICAgICAqIEByZXR1cm4ge3ZvaWR9CiAgICAgICAqLwogICAgICBtb3VzZWRvd246IGZ1bmN0aW9uKGUpIHsKICAgICAgICBpZiAoIWhhc0xlZnRNb3VzZUJ1dHRvbihlKSkgewogICAgICAgICAgcmV0dXJuOwogICAgICAgIH0KICAgICAgICBsZXQgdCA9IF9maW5kT3JpZ2luYWxUYXJnZXQoZSk7CiAgICAgICAgbGV0IHNlbGYgPSB0aGlzOwogICAgICAgIGxldCBtb3ZlZm4gPSBmdW5jdGlvbiBtb3ZlZm4oZSkgewogICAgICAgICAgaWYgKCFoYXNMZWZ0TW91c2VCdXR0b24oZSkpIHsKICAgICAgICAgICAgZG93bnVwRmlyZSgndXAnLCB0LCBlKTsKICAgICAgICAgICAgdW50cmFja0RvY3VtZW50KHNlbGYuaW5mbyk7CiAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBsZXQgdXBmbiA9IGZ1bmN0aW9uIHVwZm4oZSkgewogICAgICAgICAgaWYgKGhhc0xlZnRNb3VzZUJ1dHRvbihlKSkgewogICAgICAgICAgICBkb3dudXBGaXJlKCd1cCcsIHQsIGUpOwogICAgICAgICAgfQogICAgICAgICAgdW50cmF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mV0dXJuOwogICAgICB9CiAgICAgIF9maXJlKHRhcmdldCwgdHlwZSwgewogICAgICAgIHg6IGV2ZW50LmNsaWVudFgsCiAgICAgICAgeTogZXZlbnQuY2xpZW50WSwKICAgICAgICBzb3VyY2VFdmVudDogZXZlbnQsCiAgICAgICAgcHJldmVudGVyOiBwcmV2ZW50ZXIsCiAgICAgICAgcHJldmVudDogZnVuY3Rpb24oZSkgewogICAgICAgICAgcmV0dXJuIHByZXZlbnQoZSk7CiAgICAgICAgfQogICAgICB9KTsKICAgIH0KCiAgICByZWdpc3RlciQxKHsKICAgICAgbmFtZTogJ3RyYWNrJywKICAgICAgdG91Y2hBY3Rpb246ICdub25lJywKICAgICAgZGVwczogWydtb3VzZWRvd24nLCAndG91Y2hzdGFydCcsICd0b3VjaG1vdmUnLCAndG91Y2hlbmQnXSwKICAgICAgZmxvdzogewogICAgICAgIHN0YXJ0OiBbJ21vdXNlZG93bicsICd0b3VjaHN0YXJ0J10sCiAgICAgICAgZW5kOiBbJ21vdXNldXAnLCAndG91Y2hlbmQnXQogICAgICB9LAogICAgICBlbWl0czogWyd0cmFjayddLAoKICAgICAgaW5mbzogewogICAgICAgIHg6IDAsCiAgICAgICAgeTogMCwKICAgICAgICBzdGF0ZTogJ3N0YXJ0JywKICAgICAgICBzdGFydGVkOiBmYWxzZSwKICAgICAgICBtb3ZlczogW10sCiAgICAgICAgLyoqIEB0aGlzIHtHZXN0dXJlSW5mb30gKi8KICAgICAgICBhZGRNb3ZlOiBmdW5jdGlvbihtb3ZlKSB7CiAgICAgICAgICBpZiAodGhpcy5tb3Zlcy5sZW5ndGggPiBUUkFDS19MRU5HVEgpIHsKICAgICAgICAgICAgdGhpcy5tb3Zlcy5zaGlmdCgpOwogICAgICAgICAgfQogICAgICAgICAgdGhpcy5tb3Zlcy5wdXNoKG1vdmUpOwogICAgICAgIH0sCiAgICAgICAgbW92ZWZuOiBudWxsLAogICAgICAgIHVwZm46IG51bGwsCiAgICAgICAgcHJldmVudDogZmFsc2UKICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgKiBAdGhpcyB7R2VzdHVyZVJlY29nbml6ZXJ9CiAgICAgICAqIEByZXR1cm4ge3ZvaWR9CiAgICAgICAqLwogICAgICByZXNldDogZnVuY3Rpb24oKSB7CiAgICAgICAgdGhpcy5pbmZvLnN0YXRlID0gJ3N0YXJ0JzsKICAgICAgICB0aGlzLmluZm8uc3RhcnRlZCA9IGZhbHNlOwogICAgICAgIHRoaXMuaW5mby5tb3ZlcyA9IFtdOwogICAgICAgIHRoaXMuaW5mby54ID0gMDsKICAgICAgICB0aGlzLmluZm8ueSA9IDA7CiAgICAgICAgdGhpcy5pbmZvLnByZXZlbnQgPSBmYWxzZTsKICAgICAgICB1bnRyYWNrRG9jdW1lbnQodGhpcy5pbmZvKTsKICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgKiBAdGhpcyB7R2VzdHVyZVJlY29nbml6ZXJ9CiAgICAgICAqIEBwYXJhbSB7TW91c2VFdmVudH0gZQogICAgICAgKiBAcmV0dXJuIHt2b2lkfQogICAgICAgKi8KICAgICAgbW91c2Vkb3duOiBmdW5jdGlvbihlKSB7CiAgICAgICAgaWYgKCFoYXNMZWZ0TW91c2VCdXR0b24oZSkpIHsKICAgICAgICAgIHJldHVybjsKICAgICAgICB9CiAgICAgICAgbGV0IHQgPSBfZmluZE9yaWdpbmFsVGFyZ2V0KGUpOwogICAgICAgIGxldCBzZWxmID0gdGhpczsKICAgICAgICBsZXQgbW92ZWZuID0gZnVuY3Rpb24gbW92ZWZuKGUpIHsKICAgICAgICAgIGxldCB4ID0gZS5jbGllbnRYLCB5ID0gZS5jbGllbnRZOwogICAgICAgICAgaWYgKHRyYWNrSGFzTW92ZWRFbm91Z2goc2VsZi5pbmZvLCB4LCB5KSkgewogICAgICAgICAgICAvLyBmaXJzdCBtb3ZlIGlzICdzdGFydCcsIHN1YnNlcXVlbnQgbW92ZXMgYXJlICdtb3ZlJywgbW91c2V1cCBpcyAnZW5kJwogICAgICAgICAgICBzZWxmLmluZm8uc3RhdGUgPSBzZWxmLmluZm8uc3RhcnRlZCA/IChlLnR5cGUgPT09ICdtb3VzZXVwJyA/ICdlbmQnIDogJ3RyYWNrJykgOiAnc3RhcnQnOwogICAgICAgICAgICBpZiAoc2VsZi5pbmZvLnN0YXRlID09PSAnc3RhcnQnKSB7CiAgICAgICAgICAgICAgLy8gaWYgYW5kIG9ubHkgaWYgdHJhY2tpbmcsIGFsd2F5cyBwcmV2ZW50IHRhcAogICAgICAgICAgICAgIHByZXZlbnQoJ3RhcCcpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHNlbGYuaW5mby5hZGRNb3ZlKHt4OiB4LCB5OiB5fSk7CiAgICAgICAgICAgIGlmICghaGFzTGVmdE1vdXNlQnV0dG9uKGUpKSB7CiAgICAgICAgICAgICAgLy8gYWx3YXlzIGZpcmUgImVuZCIKICAgICAgICAgICAgICBzZWxmLmluZm8uc3RhdGUgPSAnZW5kJzsKICAgICAgICAgICAgICB1bnRyYWNrRG9jdW1lbnQoc2VsZi5pbmZvKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodCkgewogICAgICAgICAgICAgIHRyYWNrRmlyZShzZWxmLmluZm8sIHQsIGUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHNlbGYuaW5mby5zdGFydGVkID0gdHJ1ZTsKICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIGxldCB1cGZuID0gZnVuY3Rpb24gdXBmbihlKSB7CiAgICAgICAgICBpZiAoc2VsZi5pbmZvLnN0YXJ0ZWQpIHsKICAgICAgICAgICAgbW92ZWZuKGUpOwogICAgICAgICAgfQoKICAgICAgICAgIC8vIHJlbW92ZSB0aGUgdGVtcG9yYXJ5IGxpc3RlbmVycwogICAgICAgICAgdW50cmFja0RvY3VtZW50KHNlbGYuaW5mbyk7CiAgICAgICAgfTsKICAgICAgICAvLyBhZGQgdGVtcG9yYXJ5IGRvY3VtZW50IGxpc3RlbmVycyBhcyBtb3VzZSByZXRhcmdldHMKICAgICAgICB0cmFja0RvY3VtZW50KHRoaXMuaW5mbywgbW92ZWZuLCB1cGZuKTsKICAgICAgICB0aGlzLmluZm8ueCA9IGUuY2xpZW50WDsKICAgICAgICB0aGlzLmluZm8ueSA9IGUuY2xpZW50WTsKICAgICAgfSwKICAgICAgLyoqCiAgICAgICAqIEB0aGlzIHtHZXN0dXJlUmVjb2duaXplcn0KICAgICAgICogQHBhcmFtIHtUb3VjaEV2ZW50fSBlCiAgICAgICAqIEByZXR1cm4ge3ZvaWR9CiAgICAgICAqLwogICAgICB0b3VjaHN0YXJ0OiBmdW5jdGlvbihlKSB7CiAgICAgICAgbGV0IGN0ID0gZS5jaGFuZ2VkVG91Y2hlc1swXTsKICAgICAgICB0aGlzLmluZm8ueCA9IGN0LmNsaWVudFg7CiAgICAgICAgdGhpcy5pbmZvLnkgPSBjdC5jbGllbnRZOwogICAgICB9LAogICAgICAvKioKICAgICAgICogQHRoaXMge0dlc3R1cmVSZWNvZ25pemVyfQogICAgICAgKiBAcGFyYW0ge1RvdWNoRXZlbnR9IGUKICAgICAgICogQHJldHVybiB7dm9pZH0KICAgICAgICovCiAgICAgIHRvdWNobW92ZTogZnVuY3Rpb24oZSkgewogICAgICAgIGxldCB0ID0gX2ZpbmRPcmlnaW5hbFRhcmdldChlKTsKICAgICAgICBsZXQgY3QgPSBlLmNoYW5nZWRUb3VjaGVzWzBdOwogICAgICAgIGxldCB4ID0gY3QuY2xpZW50WCwgeSA9IGN0LmNsaWVudFk7CiAgICAgICAgaWYgKHRyYWNrSGFzTW92ZWRFbm91Z2godGhpcy5pbmZvLCB4LCB5KSkgewogICAgICAgICAgaWYgKHRoaXMuaW5mby5zdGF0ZSA9PT0gJ3N0YXJ0JykgewogICAgICAgICAgICAvLyBpZiBhbmQgb25seSBpZiB0cmFja2luZywgYWx3YXlzIHByZXZlbnQgdGFwCiAgICAgICAgICAgIHByZXZlbnQoJ3RhcCcpOwogICAgICAgICAgfQogICAgICAgICAgdGhpcy5pbmZvLmFkZE1vdmUoe3g6IHgsIHk6IHl9KTsKICAgICAgICAgIHRyYWNrRmlyZSh0aGlzLmluZm8sIHQsIGN0KTsKICAgICAgICAgIHRoaXMuaW5mby5zdGF0ZSA9ICd0cmFjayc7CiAgICAgICAgICB0aGlzLmluZm8uc3RhcnRlZCA9IHRydWU7CiAgICAgICAgfQogICAgICB9LAogICAgICAvKioKICAgICAgICogQHRoaXMge0dlc3R1cmVSZWNvZ25pemVyfQogICAgICAgKiBAcGFyYW0ge1RvdWNoRXZlbnR9IGUKICAgICAgICogQHJldHVybiB7dm9pZH0KICAgICAgICovCiAgICAgIHRvdWNoZW5kOiBmdW5jdGlvbihlKSB7CiAgICAgICAgbGV0IHQgPSBfZmluZE9yaWdpbmFsVGFyZ2V0KGUpOwogICAgICAgIGxldCBjdCA9IGUuY2hhbmdlZFRvdWNoZXNbMF07CiAgICAgICAgLy8gb25seSB0cmFja2VuZCBpZiB0cmFjayB3YXMgc3RhcnRlZCBhbmQgbm90IGFib3J0ZWQKICAgICAgICBpZiAodGhpcy5pbmZvLnN0YXJ0ZWQpIHsKICAgICAgICAgIC8vIHJlc2V0IHN0YXJ0ZWQgc3RhdGUgb24gdXAKICAgICAgICAgIHRoaXMuaW5mby5zdGF0ZSA9ICdlbmQnOwogICAgICAgICAgdGhpcy5pbmZvLmFkZE1vdmUoe3g6IGN0LmNsaWVudFgsIHk6IGN0LmNsaWVudFl9KTsKICAgICAgICAgIHRyYWNrRmlyZSh0aGlzLmluZm8sIHQsIGN0KTsKICAgICAgICB9CiAgICAgIH0KICAgIH0pOwoKICAgIC8qKgogICAgICogQHBhcmFtIHshR2VzdHVyZUluZm99IGluZm8KICAgICAqIEBwYXJhbSB7bnVtYmVyfSB4CiAgICAgKiBAcGFyYW0ge251bWJlcn0geQogICAgICogQHJldHVybiB7Ym9vbGVhbn0KICAgICAqLwogICAgZnVuY3Rpb24gdHJhY2tIYXNNb3ZlZEVub3VnaCh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dldCwgJ3RyYWNrJywgewogICAgICAgIHN0YXRlOiBpbmZvLnN0YXRlLAogICAgICAgIHg6IHRvdWNoLmNsaWVudFgsCiAgICAgICAgeTogdG91Y2guY2xpZW50WSwKICAgICAgICBkeDogZHgsCiAgICAgICAgZHk6IGR5LAogICAgICAgIGRkeDogZGR4LAogICAgICAgIGRkeTogZGR5LAogICAgICAgIHNvdXJjZUV2ZW50OiB0b3VjaCwKICAgICAgICBob3ZlcjogZnVuY3Rpb24oKSB7CiAgICAgICAgICByZXR1cm4gZGVlcFRhcmdldEZpbmQodG91Y2guY2xpZW50WCwgdG91Y2guY2xpZW50WSk7CiAgICAgICAgfQogICAgICB9KTsKICAgIH0KCiAgICByZWdpc3RlciQxKHsKICAgICAgbmFtZTogJ3RhcCcsCiAgICAgIGRlcHM6IFsnbW91c2Vkb3duJywgJ2NsaWNrJywgJ3RvdWNoc3RhcnQnLCAndG91Y2hlbmQnXSwKICAgICAgZmxvdzogewogICAgICAgIHN0YXJ0OiBbJ21vdXNlZG93bicsICd0b3VjaHN0YXJ0J10sCiAgICAgICAgZW5kOiBbJ2NsaWNrJywgJ3RvdWNoZW5kJ10KICAgICAgfSwKICAgICAgZW1pdHM6IFsndGFwJ10sCiAgICAgIGluZm86IHsKICAgICAgICB4OiBOYU4sCiAgICAgICAgeTogTmFOLAogICAgICAgIHByZXZlbnQ6IGZhbHNlCiAgICAgIH0sCiAgICAgIC8qKgogICAgICAgKiBAdGhpcyB7R2VzdHVyZVJlY29nbml6ZXJ9CiAgICAgICAqIEByZXR1cm4ge3ZvaWR9CiAgICAgICAqLwogICAgICByZXNldDogZnVuY3Rpb24oKSB7CiAgICAgICAgdGhpcy5pbmZvLnggPSBOYU47CiAgICAgICAgdGhpcy5pbmZvLnkgPSBOYU47CiAgICAgICAgdGhpcy5pbmZvLnByZXZlbnQgPSBmYWxzZTsKICAgICAgfSwKICAgICAgLyoqCiAgICAgICAqIEB0aGlzIHtHZXN0dXJlUmVjb2duaXplcn0KICAgICAgICogQHBhcmFtIHtNb3VzZUV2ZW50fSBlCiAgICAgICAqIEByZXR1cm4ge3ZvaWR9CiAgICAgICAqLwogICAgICBtb3VzZWRvd246IGZ1bmN0aW9uKGUpIHsKICAgICAgICBpZiAoaGFzTGVmdE1vdXNlQnV0dG9uKGUpKSB7CiAgICAgICAgICB0aGlzLmluZm8ueCA9IGUuY2xpZW50WDsKICAgICAgICAgIHRoaXMuaW5mby55ID0gZS5jbGllbnRZOwogICAgICAgIH0KICAgICAgfSwKICAgICAgLyoqCiAgICAgICAqIEB0aGlzIHtHZXN0dXJlUmVjb2duaXplcn0KICAgICAgICogQHBhcmFtIHtNb3VzZUV2ZW50fSBlCiAgICAgICAqIEByZXR1cm4ge3ZvaWR9CiAgICAgICAqLwogICAgICBjbGljazogZnVuY3Rpb24oZSkgewogICAgICAgIGlmIChoYXNMZWZ0TW91c2VCdXR0b24oZSkpIHsKICAgICAgICAgIHRyYWNrRm9yd2FyZCh0aGlzLmluZm8sIGUpOwogICAgICAgIH0KICAgICAgfSwKICAgICAgLyoqCiAgICAgICAqIEB0aGlzIHtHZXN0dXJlUmVjb2duaXplcn0KICAgICAgICogQHBhcmFtIHtUb3VjaEV2ZW50fSBlCiAgICAgICAqIEByZXR1cm4ge3ZvaWR9CiAgICAgICAqLwogICAgICB0b3VjaHN0YXJ0OiBmdW5jdGlvbihlKSB7CiAgICAgICAgY29uc3QgdG91Y2ggPSBlLmNoYW5nZWRUb3VjaGVzWzBdOwogICAgICAgIHRoaXMuaW5mby54ID0gdG91Y2guY2xpZW50WDsKICAgICAgICB0aGlzLmluZm8ueSA9IHRvdWNoLmNsaWVudFk7CiAgICAgIH0sCiAgICAgIC8qKgogICAgICAgKiBAdGhpcyB7R2VzdHVyZVJlY29nbml6ZXJ9CiAgICAgICAqIEBwYXJhbSB7VG91Y2hFdmVudH0gZQogICAgICAgKiBAcmV0dXJuIHt2b2lkfQogICAgICAgKi8KICAgICAgdG91Y2hlbmQ6IGZ1bmN0a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Y29uc3QgR2VzdHVyZUV2ZW50TGlzdGVuZXJzID0gZGVkdXBpbmdNaXhpbigoc3VwZXJDbGFzcykgPT4gewogICAgICAvKioKICAgICAgICogQHBvbHltZXIKICAgICAgICogQG1peGluQ2xhc3MKICAgICAgICogQGltcGxlbWVudHMge1BvbHltZXJfR2VzdHVyZUV2ZW50TGlzdGVuZXJzfQogICAgICAgKi8KICAgICAgY2xhc3MgR2VzdHVyZUV2ZW50TGlzdGVuZXJzIGV4dGVuZHMgc3VwZXJDbGFzcyB7CiAgICAgICAgLyoqCiAgICAgICAgICogQWRkIHRoZSBldmVudCBsaXN0ZW5lciB0byB0aGUgbm9kZSBpZiBpdCBpcyBhIGdlc3R1cmVzIGV2ZW50LgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHshRXZlbnRUYXJnZXR9IG5vZGUgTm9kZSB0byBhZGQgZXZlbnQgbGlzdGVuZXIgdG8KICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gZXZlbnROYW1lIE5hbWUgb2YgZXZlbnQKICAgICAgICAgKiBAcGFyYW0ge2Z1bmN0aW9uKCFFdmVudCk6dm9pZH0gaGFuZGxlciBMaXN0ZW5lciBmdW5jdGlvbiB0byBhZGQKICAgICAgICAgKiBAcmV0dXJuIHt2b2lkfQogICAgICAgICAqIEBvdmVycmlkZQogICAgICAgICAqLwogICAgICAgIF9hZGRFdmVudExpc3RlbmVyVG9Ob2RlKG5vZGUsIGV2ZW50TmFtZSwgaGFuZGxlcikgewogICAgICAgICAgaWYgKCFhZGRMaXN0ZW5lcihub2RlLCBldmVudE5hbWUsIGhhbmRsZXIpKSB7CiAgICAgICAgICAgIHN1cGVyLl9hZGRFdmVudExpc3RlbmVyVG9Ob2RlKG5vZGUsIGV2ZW50TmFtZSwgaGFuZGxlcik7CiAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBSZW1vdmUgdGhlIGV2ZW50IGxpc3RlbmVyIHRvIHRoZSBub2Rl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0cmluZ30gTW9kaWZpZWQgQ1NTCiAgICAgICAgICogQG5vY29sbGFwc2UKICAgICAgICAgKi8KICAgICAgICBzdGF0aWMgX3JlcGxhY2VEaXJJbkNzc1RleHQodGV4dCkgewogICAgICAgICAgbGV0IHJlcGxhY2VkVGV4dCA9IHRleHQ7CiAgICAgICAgICByZXBsYWNlZFRleHQgPSByZXBsYWNlZFRleHQucmVwbGFjZShIT1NUX0RJUiwgSE9TVF9ESVJfUkVQTEFDTUVOVCk7CiAgICAgICAgICByZXBsYWNlZFRleHQgPSByZXBsYWNlZFRleHQucmVwbGFjZShFTF9ESVIsIEVMX0RJUl9SRVBMQUNNRU5UKTsKICAgICAgICAgIHJldHVybiByZXBsYWNlZFRleHQ7CiAgICAgICAgfQoKICAgICAgICBjb25zdHJ1Y3RvcigpIHsKICAgICAgICAgIHN1cGVyKCk7CiAgICAgICAgICAvKiogQHR5cGUge2Jvb2xlYW59ICovCiAgICAgICAgICB0aGlzLl9fYXV0b0Rpck9wdE91dCA9IGZhbHNlOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQG92ZXJyaWRlCiAgICAgICAgICogQHN1cHByZXNzIHtpbnZhbGlkQ2FzdHN9IENsb3N1cmUgZG9lc24ndCB1bmRlcnN0YW5kIHRoYXQgYHRoaXNgIGlzIGFuCiAgICAgICAgICogICAgIEhUTUxFbGVtZW50CiAgICAgICAgICogQHJldHVybiB7dm9pZH0KICAgICAgICAgKi8KICAgICAgICByZWFkeSgpIHsKICAgICAgICAgIHN1cGVyLnJlYWR5KCk7CiAgICAgICAgICB0aGlzLl9fYXV0b0Rpck9wdE91dCA9IC8qKiBAdHlwZSB7IUhUTUxFbGVtZW50fSAqLyh0aGlzKS5oYXNBdHRyaWJ1dGUoJ2RpcicpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQG92ZXJyaWRlCiAgICAgICAgICogQHN1cHByZXNzIHttaXNzaW5nUHJvcGVydGllc30gSWYgaXQgZXhpc3RzIG9uIGVsZW1lbnRCYXNlLCBpdCBjYW4gYmUKICAgICAgICAgKiAgIHN1cGVyJ2QKICAgICAgICAgKiBAcmV0dXJuIHt2b2lkfQogICAgICAgICAqLwogICAgICAgIGNvbm5lY3RlZENhbGxiYWNrKCkgewogICAgICAgICAgaWYgKGVsZW1lbnRCYXNlLnByb3RvdHlwZS5jb25uZWN0ZWRDYWxsYmFjaykgewogICAgICAgICAgICBzdXBlci5jb25uZWN0ZWRDYWxsYmFjaygpOwogICAgICAgICAgfQogICAgICAgICAgaWYgKHRoaXMuY29uc3RydWN0b3IuX19hY3RpdmF0ZURpcikgewogICAgICAgICAgICB0YWtlUmVjb3JkcygpOwogICAgICAgICAgICBESVJfSU5TVEFOQ0VTLnB1c2godGhpcyk7CiAgICAgICAgICAgIHNldFJUTCh0aGlzKTsKICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIEBvdmVycmlkZQogICAgICAgICAqIEBzdXBwcmVzcyB7bWlzc2luZ1Byb3BlcnRpZXN9IElmIGl0IGV4aXN0cyBvbiBlbGVtZW50QmFzZSwgaXQgY2FuIGJlCiAgICAgICAgICogICBzdXBlcidkCiAgICAgICAgICogQHJldHVybiB7dm9pZH0KICAgICAgICAgKi8KICAgICAgICBkaXNjb25uZWN0ZWRDYWxsYmFjaygpIHsKICAgICAgICAgIGlmIChlbGVtZW50QmFzZS5wcm90b3R5cGUuZGlzY29ubmVjdGVkQ2FsbGJhY2spIHsKICAgICAgICAgICAgc3VwZXIuZGlzY29ubmVjdGVkQ2FsbGJhY2soKTsKICAgICAgICAgIH0KICAgICAgICAgIGlmICh0aGlzLmNvbnN0cnVjdG9yLl9fYWN0aXZhdGVEaXIpIHsKICAgICAgICAgICAgY29uc3QgaWR4ID0gRElSX0lOU1RBTkNFUy5pbmRleE9mKHRoaXMpOwogICAgICAgICAgICBpZiAoaWR4ID4gLTEpIHsKICAgICAgICAgICAgICBESVJfSU5TVEFOQ0VTLnN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mUgbmV4dCByZW5kZXIKICAgICAgcmVxdWVzdEFuaW1hdGlvbkZyYW1lKGZ1bmN0aW9uKCkgewogICAgICAgIHNjaGVkdWxlZCA9IGZhbHNlOwogICAgICAgIGZsdXNoUXVldWUoYmVmb3JlUmVuZGVyUXVldWUpOwogICAgICAgIC8vIGFmdGVyIHRoZSByZW5kZXIKICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCkgewogICAgICAgICAgcnVuUXVldWUoYWZ0ZXJSZW5kZXJRdWV1ZSk7CiAgICAgICAgfSk7CiAgICAgIH0pOwogICAgfQoKICAgIGZ1bmN0aW9uIGZsdXNoUXVldWUocXVldWUpIHsKICAgICAgd2hpbGUgKHF1ZXVlLmxlbmd0aCkgewogICAgICAgIGNhbGxNZXRob2QocXVldWUuc2hpZnQoKSk7CiAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiBydW5RdWV1ZShxdWV1ZSkgewogICAgICBmb3IgKGxldCBpPTAsIGw9cXVldWUubGVuZ3RoOyBpIDwgbDsgaSsrKSB7CiAgICAgICAgY2FsbE1ldGhvZChxdWV1ZS5zaGlmdCgpKTsKICAgICAgfQogICAgfQoKICAgIGZ1bmN0aW9uIGNhbGxNZXRob2QoaW5mbykgewogICAgICBjb25zdCBjb250ZXh0ID0gaW5mb1swXTsKICAgICAgY29uc3QgY2FsbGJhY2sgPSBpbmZvWzFdOwogICAgICBjb25zdCBhcmdzID0gaW5mb1syXTsKICAgICAgdHJ5IHsKICAgICAgICBjYWxsYmFjay5hcHBseShjb250ZXh0LCBhcmdzKTsKICAgICAgfSBjYXRjaChlKSB7CiAgICAgICAgc2V0VGltZW91dCgoKSA9PiB7CiAgICAgICAgICB0aHJvdyBlOwogICAgICAgIH0pOwogICAgICB9CiAgICB9CgoKICAgIC8qKgogICAgICogRW5xdWV1ZXMgYSBjYWxsYmFjayB3aGljaCB3aWxsIGJlIHJ1biBiZWZvcmUgdGhlIG5leHQgcmVuZGVyLCBhdAogICAgICogYH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XQgY29sdW1uQ291bnQgPSBjdXJyZW50RW5kIC0gY3VycmVudFN0YXJ0ICsgMTsKICAgICAgbGV0IGRpc3RhbmNlcyA9IG5ldyBBcnJheShyb3dDb3VudCk7CgogICAgICAvLyAiQWRkaXRpb24iIHJvd3MuIEluaXRpYWxpemUgbnVsbCBjb2x1bW4uCiAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgcm93Q291bnQ7IGkrKykgewogICAgICAgIGRpc3RhbmNlc1tpXSA9IG5ldyBBcnJheShjb2x1bW5Db3VudCk7CiAgICAgICAgZGlzdGFuY2VzW2ldWzBdID0gaTsKICAgICAgfQoKICAgICAgLy8gSW5pdGlhbGl6ZSBudWxsIHJvdwogICAgICBmb3IgKGxldCBqID0gMDsgaiA8IGNvbHVtbkNvdW50OyBqKyspCiAgICAgICAgZGlzdGFuY2VzWzBdW2pdID0gajsKCiAgICAgIGZvciAobGV0IGkgPSAxOyBpIDwgcm93Q291bnQ7IGkrKykgewogICAgICAgIGZvciAobGV0IGogPSAxOyBqIDwgY29sdW1uQ291bnQ7IGorKykgewogICAgICAgICAgaWYgKGVxdWFscyhjdXJyZW50W2N1cnJlbnRTdGFydCArIGogLSAxXSwgb2xkW29sZFN0YXJ0ICsgaSAtIDFdKSkKICAgICAgICAgICAgZGlzdGFuY2VzW2ldW2pdID0gZGlzdGFuY2VzW2kgLSAxXVtqIC0gMV07CiAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgbGV0IG5vcnRoID0gZGlzdGFuY2VzW2kgLSAxXVtqXSArIDE7CiAgICAgICAgICAgIGxldCB3ZXN0ID0gZGlzdGFuY2VzW2ldW2ogLSAxXSArIDE7CiAgICAgICAgICAgIGRpc3RhbmNlc1tpXVtqXSA9IG5vcnRoIDwgd2VzdCA/IG5vcnRoIDogd2VzdDsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KCiAgICAgIHJldHVybiBkaXN0YW5jZXM7CiAgICB9CgogICAgLy8gVGhpcyBzdGFydHMgYXQgdGhlIGZpbmFsIHdlaWdodCwgYW5kIHdhbGtzICJiYWNrd2FyZCIgYnkgZmluZGluZwogICAgLy8gdGhlIG1pbmltdW0gcHJldmlvdXMgd2VpZ2h0IHJlY3Vyc2l2ZWx5IHVudGlsIHRoZSBvcmlnaW4gb2YgdGhlIHdlaWdodAogICAgLy8gbWF0cml4LgogICAgZnVuY3Rpb24gc3BsaWNlT3BlcmF0aW9uc0Zyb21FZGl0RGlzdGFuY2VzKGRpc3RhbmNlcykgewogICAgICBsZXQgaSA9IGRpc3RhbmNlcy5sZW5ndGggLSAxOwogICAgICBsZXQgaiA9IGRpc3RhbmNlc1swXS5sZW5ndGggLSAxOwogICAgICBsZXQgY3VycmVudCA9IGRpc3RhbmNlc1tpXVtqXTsKICAgICAgbGV0IGVkaXRzID0gW107CiAgICAgIHdoaWxlIChpID4gMCB8fCBqID4gMCkgewogICAgICAgIGlmIChpID09IDApIHsKICAgICAgICAgIGVkaXRzLnB1c2goRURJVF9BREQpOwogICAgICAgICAgai0tOwogICAgICAgICAgY29udGludWU7CiAgICAgICAgfQogICAgICAgIGlmIChqID09IDApIHsKICAgICAgICAgIGVkaXRzLnB1c2goRURJVF9ERUxFVEUpOwogICAgICAgICAgaS0tOwogICAgICAgICAgY29udGludWU7CiAgICAgICAgfQogICAgICAgIGxldCBub3J0aFdlc3QgPSBkaXN0YW5jZXNbaSAtIDFdW2ogLSAxXTsKICAgICAgICBsZXQgd2VzdCA9IGRpc3RhbmNlc1tpIC0gMV1bal07CiAgICAgICAgbGV0IG5vcnRoID0gZGlzdGFuY2VzW2ldW2ogLSAxXTsKCiAgICAgICAgbGV0IG1pbjsKICAgICAgICBpZiAod2VzdCA8IG5vcnRoKQogICAgICAgICAgbWluID0gd2VzdCA8IG5vcnRoV2VzdCA/IHdlc3QgOiBub3J0aFdlc3Q7CiAgICAgICAgZWxzZQogICAgICAgICAgbWluID0gbm9ydGggPCBub3J0aFdlc3QgPyBub3J0aCA6IG5vcnRoV2VzdDsKCiAgICAgICAgaWYgKG1pbiA9PSBub3J0aFdlc3QpIHsKICAgICAgICAgIGlmIChub3J0aFdlc3QgPT0gY3VycmVudCkgewogICAgICAgICAgICBlZGl0cy5wdXNoKEVESVRfTEVBVkUpOwogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgZWRpdHMucHVzaChFRElUX1VQREFURSk7CiAgICAgICAgICAgIGN1cnJlbnQgPSBub3J0aFdlc3Q7CiAgICAgICAgICB9CiAgICAgICAgICBpLS07CiAgICAgICAgICBqLS07CiAgICAgICAgfSBlbHNlIGlmIChtaW4gPT0gd2VzdCkgewogICAgICAgICAgZWRpdHMucHVzaChFRElUX0RFTEVURSk7CiAgICAgICAgICBpLS07CiAgICAgICAgICBjdXJyZW50ID0gd2VzdDsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgZWRpdHMucHVzaChFRElUX0FERCk7CiAgICAgICAgICBqLS07CiAgICAgICAgICBjdXJyZW50ID0gbm9ydGg7CiAgICAgICAgfQogICAgICB9CgogICAgICBlZGl0cy5yZXZlcnNlKCk7CiAgICAgIHJldHVybiBlZGl0czsKICAgIH0KCiAgICAvKioKICAgICAqIFNwbGljZSBQcm9qZWN0aW9uIGZ1bmN0aW9uczoKICAgICAqCiAgICAgKiBBIHNwbGljZSBtYXAgaXMgYSByZXByZXNlbnRhdGlvbiBvZiBob3cgYSBwcmV2aW91cyBhcnJheSBvZiBpdGVtcwogICAgICogd2FzIHRyYW5zZm9ybWVkIGludG8gYSBuZXcgYXJyYXkgb2YgaXRlbXMuIENvbmNlcHR1YWxseSBpdCBpcyBhIGxpc3Qgb2YKICAgICAqIHR1cGxlcyBvZgogICAgICoKICAgICAqICAgPGluZGV4LCByZW1vdmVkLCBhZGRlZENvdW50PgogICAgICoKICAgICAqIHdoaWNoIGFyZSBrZXB0IGluIGFzY2VuZGluZyBpbmRleCBvcmRlciBvZi4gVGhlIHR1cGxlIHJlcHJlc2VudHMgdGhhdCBhdAogICAgICogdGhlIHxp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gW10sIGN1cnJlbnRFbmQgLSBjdXJyZW50U3RhcnQpIF07CgogICAgICBsZXQgb3BzID0gc3BsaWNlT3BlcmF0aW9uc0Zyb21FZGl0RGlzdGFuY2VzKAogICAgICAgICAgY2FsY0VkaXREaXN0YW5jZXMoY3VycmVudCwgY3VycmVudFN0YXJ0LCBjdXJyZW50RW5kLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbGQsIG9sZFN0YXJ0LCBvbGRFbmQpKTsKCiAgICAgIHNwbGljZSA9IHVuZGVmaW5lZDsKICAgICAgbGV0IHNwbGljZXMgPSBbXTsKICAgICAgbGV0IGluZGV4ID0gY3VycmVudFN0YXJ0OwogICAgICBsZXQgb2xkSW5kZXggPSBvbGRTdGFydDsKICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBvcHMubGVuZ3RoOyBpKyspIHsKICAgICAgICBzd2l0Y2gob3BzW2ldKSB7CiAgICAgICAgICBjYXNlIEVESVRfTEVBVkU6CiAgICAgICAgICAgIGlmIChzcGxpY2UpIHsKICAgICAgICAgICAgICBzcGxpY2VzLnB1c2goc3BsaWNlKTsKICAgICAgICAgICAgICBzcGxpY2UgPSB1bmRlZmluZWQ7CiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIGluZGV4Kys7CiAgICAgICAgICAgIG9sZEluZGV4Kys7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgY2FzZSBFRElUX1VQREFURToKICAgICAgICAgICAgaWYgKCFzcGxpY2UpCiAgICAgICAgICAgICAgc3BsaWNlID0gbmV3U3BsaWNlKGluZGV4LCBbXSwgMCk7CgogICAgICAgICAgICBzcGxpY2UuYWRkZWRDb3VudCsrOwogICAgICAgICAgICBpbmRleCsrOwoKICAgICAgICAgICAgc3BsaWNlLnJlbW92ZWQucHVzaChvbGRbb2xkSW5kZXhdKTsKICAgICAgICAgICAgb2xkSW5kZXgrKzsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICBjYXNlIEVESVRfQUREOgogICAgICAgICAgICBpZiAoIXNwbGljZSkKICAgICAgICAgICAgICBzcGxpY2UgPSBuZXdTcGxpY2UoaW5kZXgsIFtdLCAwKTsKCiAgICAgICAgICAgIHNwbGljZS5hZGRlZENvdW50Kys7CiAgICAgICAgICAgIGluZGV4Kys7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgY2FzZSBFRElUX0RFTEVURToKICAgICAgICAgICAgaWYgKCFzcGxpY2UpCiAgICAgICAgICAgICAgc3BsaWNlID0gbmV3U3BsaWNlKGluZGV4LCBbXSwgMCk7CgogICAgICAgICAgICBzcGxpY2UucmVtb3ZlZC5wdXNoKG9sZFtvbGRJbmRleF0pOwogICAgICAgICAgICBvbGRJbmRleCsrOwogICAgICAgICAgICBicmVhazsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIGlmIChzcGxpY2UpIHsKICAgICAgICBzcGxpY2VzLnB1c2goc3BsaWNlKTsKICAgICAgfQogICAgICByZXR1cm4gc3BsaWNlczsKICAgIH0KCiAgICBmdW5jdGlvbiBzaGFyZWRQcmVmaXgoY3VycmVudCwgb2xkLCBzZWFyY2hMZW5ndGgpIHsKICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBzZWFyY2hMZW5ndGg7IGkrKykKICAgICAgICBpZiAoIWVxdWFscyhjdXJyZW50W2ldLCBvbGRbaV0pKQogICAgICAgICAgcmV0dXJuIGk7CiAgICAgIHJldHVybiBzZWFyY2hMZW5ndGg7CiAgICB9CgogICAgZnVuY3Rpb24gc2hhcmVkU3VmZml4KGN1cnJlbnQsIG9sZCwgc2VhcmNoTGVuZ3RoKSB7CiAgICAgIGxldCBpbmRleDEgPSBjdXJyZW50Lmxlbmd0aDsKICAgICAgbGV0IGluZGV4MiA9IG9sZC5sZW5ndGg7CiAgICAgIGxldCBjb3VudCA9IDA7CiAgICAgIHdoaWxlIChjb3VudCA8IHNlYXJjaExlbmd0aCAmJiBlcXVhbHMoY3VycmVudFstLWluZGV4MV0sIG9sZFstLWlu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Y2FsbGJhY2spIHsKICAgICAgICAvKioKICAgICAgICAgKiBAdHlwZSB7TXV0YXRpb25PYnNlcnZlcn0KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqLwogICAgICAgIHRoaXMuX3NoYWR5Q2hpbGRyZW5PYnNlcnZlciA9IG51bGw7CiAgICAgICAgLyoqCiAgICAgICAgICogQHR5cGUge011dGF0aW9uT2JzZXJ2ZXJ9CiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKi8KICAgICAgICB0aGlzLl9uYXRpdmVDaGlsZHJlbk9ic2VydmVyID0gbnVsbDsKICAgICAgICB0aGlzLl9jb25uZWN0ZWQgPSBmYWxzZTsKICAgICAgICAvKioKICAgICAgICAgKiBAdHlwZSB7IUhUTUxFbGVtZW50fQogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICovCiAgICAgICAgdGhpcy5fdGFyZ2V0ID0gdGFyZ2V0OwogICAgICAgIHRoaXMuY2FsbGJhY2sgPSBjYWxsYmFjazsKICAgICAgICB0aGlzLl9lZmZlY3RpdmVOb2RlcyA9IFtdOwogICAgICAgIHRoaXMuX29ic2VydmVyID0gbnVsbDsKICAgICAgICB0aGlzLl9zY2hlZHVsZWQgPSBmYWxzZTsKICAgICAgICAvKioKICAgICAgICAgKiBAdHlwZSB7ZnVuY3Rpb24oKX0KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqLwogICAgICAgIHRoaXMuX2JvdW5kU2NoZWR1bGUgPSAoKSA9PiB7CiAgICAgICAgICB0aGlzLl9zY2hlZHVsZSgpOwogICAgICAgIH07CiAgICAgICAgdGhpcy5jb25uZWN0KCk7CiAgICAgICAgdGhpcy5fc2NoZWR1bGUoKTsKICAgICAgfQoKICAgICAgLyoqCiAgICAgICAqIEFjdGl2YXRlcyBhbiBvYnNlcnZlci4gVGhpcyBtZXRob2QgaXMgYXV0b21hdGljYWxseSBjYWxsZWQgd2hlbgogICAgICAgKiBhIGBGbGF0dGVuZWROb2Rlc09ic2VydmVyYCBpcyBjcmVhdGVkLiBJdCBzaG91bGQgb25seSBiZSBjYWxsZWQgdG8KICAgICAgICogcmUtYWN0aXZhdGUgYW4gb2JzZXJ2ZXIgdGhhdCBoYXMgYmVlbiBkZWFjdGl2YXRlZCB2aWEgdGhlIGBkaXNjb25uZWN0YCBtZXRob2QuCiAgICAgICAqCiAgICAgICAqIEByZXR1cm4ge3ZvaWR9CiAgICAgICAqLwogICAgICBjb25uZWN0KCkgewogICAgICAgIGlmIChpc1Nsb3QodGhpcy5fdGFyZ2V0KSkgewogICAgICAgICAgdGhpcy5fbGlzdGVuU2xvdHMoW3RoaXMuX3RhcmdldF0pOwogICAgICAgIH0gZWxzZSBpZiAod3JhcCh0aGlzLl90YXJnZXQpLmNoaWxkcmVuKSB7CiAgICAgICAgICB0aGlzLl9saXN0ZW5TbG90cygKICAgICAgICAgICAgICAvKiogQHR5cGUgeyFOb2RlTGlzdDwhTm9kZT59ICovICh3cmFwKHRoaXMuX3RhcmdldCkuY2hpbGRyZW4pKTsKICAgICAgICAgIGlmICh3aW5kb3cuU2hhZHlET00pIHsKICAgICAgICAgICAgdGhpcy5fc2hhZHlDaGlsZHJlbk9ic2VydmVyID0KICAgICAgICAgICAgICB3aW5kb3cuU2hhZHlET00ub2JzZXJ2ZUNoaWxkcmVuKHRoaXMuX3RhcmdldCwgKG11dGF0aW9ucykgPT4gewogICAgICAgICAgICAgICAgdGhpcy5fcHJvY2Vzc011dGF0aW9ucyhtdXRhdGlvbnMpOwogICAgICAgICAgICAgIH0pOwogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgdGhpcy5fbmF0aXZlQ2hpbGRyZW5PYnNlcnZlciA9CiAgICAgICAgICAgICAgbmV3IE11dGF0aW9uT2JzZXJ2ZXIoKG11dGF0aW9ucykgPT4gewogICAgICAgICAgICAgICAgdGhpcy5fcHJvY2Vzc011dGF0aW9ucyhtdXRhdGlvbnMpOwogICAgICAgICAgICAgIH0pOwogICAgICAgICAgICB0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W2ldKTsgaSsrKSB7CiAgICAgICAgICBmb3IgKGxldCBqPTAsIG47IChqIDwgcy5yZW1vdmVkLmxlbmd0aCkgJiYgKG49cy5yZW1vdmVkW2pdKTsgaisrKSB7CiAgICAgICAgICAgIGluZm8ucmVtb3ZlZE5vZGVzLnB1c2gobik7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8vIHByb2Nlc3MgYWRkcwogICAgICAgIGZvciAobGV0IGk9MCwgczsgKGk8c3BsaWNlcy5sZW5ndGgpICYmIChzPXNwbGljZXNbaV0pOyBpKyspIHsKICAgICAgICAgIGZvciAobGV0IGo9cy5pbmRleDsgaiA8IHMuaW5kZXggKyBzLmFkZGVkQ291bnQ7IGorKykgewogICAgICAgICAgICBpbmZvLmFkZGVkTm9kZXMucHVzaChuZXdOb2Rlc1tqXSk7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8vIHVwZGF0ZSBjYWNoZQogICAgICAgIHRoaXMuX2VmZmVjdGl2ZU5vZGVzID0gbmV3Tm9kZXM7CiAgICAgICAgbGV0IGRpZEZsdXNoID0gZmFsc2U7CiAgICAgICAgaWYgKGluZm8uYWRkZWROb2Rlcy5sZW5ndGggfHwgaW5mby5yZW1vdmVkTm9kZXMubGVuZ3RoKSB7CiAgICAgICAgICBkaWRGbHVzaCA9IHRydWU7CiAgICAgICAgICB0aGlzLmNhbGxiYWNrLmNhbGwodGhpcy5fdGFyZ2V0LCBpbmZvKTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGRpZEZsdXNoOwogICAgICB9CgogICAgICAvKioKICAgICAgICogQHBhcmFtIHshQXJyYXk8IU5vZGU+fCFOb2RlTGlzdDwhTm9kZT59IG5vZGVMaXN0IE5vZGVzIHRoYXQgY291bGQgY2hhbmdlCiAgICAgICAqIEByZXR1cm4ge3ZvaWR9CiAgICAgICAqIEBwcml2YXRlCiAgICAgICAqLwogICAgICBfbGlzdGVuU2xvdHMobm9kZUxpc3QpIHsKICAgICAgICBmb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gKiBGb3Igc2xvdCBlbGVtZW50cywgcmV0dXJucyB0aGUgbm9kZXMgYXNzaWduZWQgdG8gdGhlIHNsb3Q7IG90aGVyd2lzZQogICAgICAgKiBhbiBlbXB0eSBhcnJheS4gSXQgaXMgZXF1aXZhbGVudCB0byBgPHNsb3Q+LmFkZGlnbmVkTm9kZXMoe2ZsYXR0ZW46dHJ1ZX0pYC4KICAgICAgICoKICAgICAgICogQHJldHVybiB7IUFycmF5PCFOb2RlPn0gQXJyYXkgb2YgYXNzaWduZWQgbm9kZXMKICAgICAgICogQG92ZXJyaWRlCiAgICAgICAqLwogICAgICBnZXREaXN0cmlidXRlZE5vZGVzKCkgewogICAgICAgIHJldHVybiAodGhpcy5ub2RlLmxvY2FsTmFtZSA9PT0gJ3Nsb3QnKSA/CiAgICAgICAgICB3cmFwKHRoaXMubm9kZSkuYXNzaWduZWROb2Rlcyh7ZmxhdHRlbjogdHJ1ZX0pIDoKICAgICAgICAgIFtdOwogICAgICB9CgogICAgICAvKioKICAgICAgICogUmV0dXJucyBhbiBhcnJheSBvZiBhbGwgc2xvdHMgdGhpcyBlbGVtZW50IHdhcyBkaXN0cmlidXRlZCB0by4KICAgICAgICoKICAgICAgICogQHJldHVybiB7IUFycmF5PCFIVE1MU2xvdEVsZW1lbnQ+fSBEZXNjcmlwdGlvbgogICAgICAgKiBAb3ZlcnJpZGUKICAgICAgICovCiAgICAgIGdldERlc3RpbmF0aW9uSW5zZXJ0aW9uUG9pbnRzKCkgewogICAgICAgIGxldCBpcCQgPSBbXTsKICAgICAgICBsZXQgbiA9IHdyYXAodGhpcy5ub2RlKS5hc3NpZ25lZFNsb3Q7CiAgICAgICAgd2hpbGUgKG4pIHsKICAgICAgICAgIGlwJC5wdXNoKG4pOwogICAgICAgICAgbiA9IHdyYXAobikuYXNzaWduZWRTbG90OwogICAgICAgIH0KICAgICAgICByZXR1cm4gaXAkOwogICAgICB9CgogICAgICAvKioKICAgICAgICogQ2FsbHMgYGltcG9ydE5vZG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BlbGVtZW50cyBmb3IgdGhpcyBlbGVtZW50IGJhc2VkCiAgICAgICAqIG9uIHRoZSBnaXZlbiBzZWxlY3Rvci4KICAgICAgICoKICAgICAgICogQHBhcmFtIHtzdHJpbmd9IHNlbGVjdG9yIFNlbGVjdG9yIHRvIGZpbHRlciBub2RlcyBhZ2FpbnN0CiAgICAgICAqIEByZXR1cm4geyFBcnJheTwhSFRNTEVsZW1lbnQ+fSBMaXN0IG9mIGZsYXR0ZW5lZCBjaGlsZCBlbGVtZW50cwogICAgICAgKiBAb3ZlcnJpZGUKICAgICAgICovCiAgICAgIHF1ZXJ5RGlzdHJpYnV0ZWRFbGVtZW50cyhzZWxlY3RvcikgewogICAgICAgIGxldCBjJCA9IHRoaXMuZ2V0RWZmZWN0aXZlQ2hpbGROb2RlcygpOwogICAgICAgIGxldCBsaXN0ID0gW107CiAgICAgICAgZm9yIChsZXQgaT0wLCBsPWMkLmxlbmd0aCwgYzsgKGk8bCkgJiYgKGM9YyRbaV0pOyBpKyspIHsKICAgICAgICAgIGlmICgoYy5ub2RlVHlwZSA9PT0gTm9kZS5FTEVNRU5UX05PREUpICYmCiAgICAgICAgICAgICAgbWF0Y2hlc1NlbGVjdG9yKGMsIHNlbGVjdG9yKSkgewogICAgICAgICAgICBsaXN0LnB1c2goYyk7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiBsaXN0OwogICAgICB9CgogICAgICAvKioKICAgICAgICogRm9yIHNoYWRvdyByb290cywgcmV0dXJucyB0aGUgY3VycmVudGx5IGZvY3VzZWQgZWxlbWVudCB3aXRoaW4gdGhpcwogICAgICAgKiBzaGFkb3cgcm9vdC4KICAgICAgICoKICAgICAgICogcmV0dXJuIHtOb2RlfHVuZGVmaW5lZH0gQ3VycmVudGx5IGZvY3VzZWQgZWxlbWVudAogICAgICAgKiBAb3ZlcnJpZGUKICAgICAgICovCiAgICAgIGdldCBhY3RpdmVFbGVtZW50KCkgewogICAgICAgIGxldCBub2RlID0gdGhpcy5ub2RlOwogICAgICAgIHJldHVybiBub2RlLl9hY3RpdmVFbGVtZW50ICE9PSB1bmRlZmluZWQgPyBub2RlLl9hY3RpdmVFbGVtZW50IDogbm9kZS5hY3RpdmVFbGVtZW50OwogICAgICB9CiAgICB9CgogICAgZnVuY3Rpb24gZm9yd2FyZE1ldGhvZHMocHJvdG8sIG1ldGhvZHMpIHsKICAgICAgZm9yIChsZXQgaT0wOyBpIDwgbWV0aG9kcy5sZW5ndGg7IGkrKykgewogICAgICAgIGxldCBtZXRob2QgPSBtZXRob2RzW2ldOwogICAgICAgIC8qIGVzbGludC1kaXNhYmxlIHZhbGlkLWpzZG9jICovCiAgICAgICAgcHJvdG9bbWV0aG9kXSA9IC8qKiBAdGhpcyB7RG9tQXBpTmF0aXZlfSAqLyBmdW5jdGlvbigpIHsKICAgICAgICAgIHJldHVybiB0aGlzLm5vZGVbbWV0aG9kXS5hcHBseSh0aGlzLm5vZGUsIGFyZ3VtZW50cyk7CiAgICAgICAgfTsKICAgICAgICAvKiBlc2xpbnQtZW5hYmxlICovCiAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiBmb3J3YXJkUmVhZE9ubHlQcm9wZXJ0aWVzKHByb3RvLCBwcm9wZXJ0aWVzKSB7CiAgICAgIGZvciAobGV0IGk9MDsgaSA8IHByb3BlcnRpZXMubGVuZ3RoOyBpKyspIHsKICAgICAgICBsZXQgbmFtZSA9IHByb3BlcnRpZXNbaV07CiAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KHByb3RvLCBuYW1lLCB7CiAgICAgICAgICBnZXQ6IGZ1bmN0aW9uKCkgewogICAgICAgICAgICBjb25zdCBkb21BcGkgPSAvKiogQHR5cGUge0RvbUFwaU5hdGl2ZX0gKi8odGhpcyk7CiAgICAgICAgICAgIHJldHVybiBkb21BcGkubm9kZVtuYW1lXTsKICAgICAgICAgIH0sCiAgICAgICAgICBjb25maWd1cmFibGU6IHRydWUKICAgICAgICB9KTsKICAgICAgfQogICAgfQoKICAgIGZ1bmN0aW9uIGZvcndhcmRQcm9wZXJ0aWVzKHByb3RvLCBwcm9wZXJ0aWVzKSB7CiAgICAgIGZvciAobGV0IGk9MDsgaSA8IHByb3BlcnRpZXMubGVuZ3RoOyBpKyspIHsKICAgICAgICBsZXQgbmFtZSA9IHByb3BlcnRpZXNbaV07CiAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KHByb3RvLCBuYW1lLCB7CiAgICAgICAgICAvKioKICAgICAgICAgICAqIEB0aGlzIHtEb21BcGlOYXRpdmV9CiAgICAgICAgICAgKiBAcmV0dXJuIHsqfSAuCiAgICAgICAgICAgKi8KICAgICAgICAgIGdldDogZnVuY3Rpb24oKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLm5vZGVbbmFtZV07CiAgICAgICAgICB9LAogICAgICAgICAgLyoqCiAgICAgICAgICAgKiBAdGhpcyB7RG9tQXBpTmF0aXZlfQogICAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSAuCiAgICAgICAgICAgKi8KICAgICAgICAgIHNldDogZnVuY3Rpb24odmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5ub2RlW25hbWVdID0gdmFsdWU7CiAgICAgICAgICB9LAogICAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlCiAgICAgICAgfSk7CiAgICAgIH0KICAgIH0KCgogICAgLyoqCiAgICAgKiBFdmVudCBBUEkgd3JhcHBlciBjbGFzcyByZXR1cm5lZCBmcm9tIGBkb20uKHRhcmdldClgIHdoZW4KICAgICAqIGB0YXJnZXRgIGlzIGFuIGBFdmVudGAuCiAgICAgKi8KICAgIGNsYXNzIEV2ZW50QXBpIHsKICAgICAgY29uc3RydWN0b3IoZXZlbnQpIHsKICAgICAgICB0aGlzLmV2ZW50ID0gZXZlbnQ7CiAgICAgIH0KCiAgICAgIC8qKgogICAgICAgKiBSZXR1cm5zIHRoZSBmaXJzdCBub2RlIG9uIHRoZSBgY29tcG9zZWRQYXRoYCBvZiB0aGlzIGV2ZW50LgogICAgICAgKgogICAgICAgKiBAcmV0dXJuIHshRXZlbnRUYXJnZXR9IFRoZSBub2RlIHRoaXMgZXZlbnQgd2FzIGRpc3BhdGNoZWQgdG8KICAgICAgICovCiAgICAgIGdldCByb290VGFyZ2V0KCkgewogICAgICAgIHJldHVybiB0aGlzLnBhdGhbMF07CiAgICAgIH0KCiAgICAgIC8qKgogICAgICAgKiBSZXR1cm5zIHRoZSBsb2NhbCAocmUtdGFyZ2V0ZWQpIHRhcmdldCBmb3IgdGhpcyBldmVudC4KICAgICAgICoKICAgICAgICogQHJldHVybiB7IUV2ZW50VGFyZ2V0fSBUaGUgbG9jYWwgKHJlLXRhcmdldGVkKSB0YXJnZXQgZm9yIHRoaXMgZXZlbnQuCiAgICAgICAqLwogICAgICBnZXQgbG9jYWxUYXJnZXQoKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuZXZlbnQudGFyZ2V0OwogICAgICB9CgogICAgICAvKioKICAgICAgICogUmV0dXJucyB0aGUgYGNvbXBvc2VkUGF0aGAgZm9yIHRoaXMgZXZlbnQuCiAgICAgICAqIEByZXR1cm4geyFBcnJheTwhRXZlbnRUYXJnZXQ+fSBUaGUgbm9kZXMgdGhpcyBldmVudCBwcm9wYWdhdGVkIHRocm91Z2gKICAgICAgICovCiAgICAgIGdldCBwYXRoKCkgewogICAgICAgIHJldHVybiB0aGlzLmV2ZW50LmNvbXBvc2VkUGF0aCgpOwogICAgICB9CiAgICB9CgogICAgbGV0IERvbUFwaUltcGwgPSBEb21BcGlOYXRpdmU7CgogICAgaWYgKHdpbmRvd1snU2hhZHlET00nXSAmJiB3aW5kb3dbJ1NoYWR5RE9NJ11bJ2luVXNlJ10gJiYgd2luZG93WydTaGFkeURPTSddWydub1BhdGNoJ10gJiYgd2luZG93WydTaGFkeURPTSddWydXcmFwcGVyJ10pIHsKCiAgICAgIC8qKgogICAgICAgKiBAcHJpdmF0ZQogICAgICAgKiBAZXh0ZW5kcyB7SFRNT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AgZ2V0KCkgewogICAgICAgICAgICBjb25zdCBjdXJyZW50ID0gdGhpcy5ldmVudC5jdXJyZW50VGFyZ2V0OwogICAgICAgICAgICBjb25zdCBjdXJyZW50Um9vdCA9IGN1cnJlbnQgJiYgZG9tKGN1cnJlbnQpLmdldE93bmVyUm9vdCgpOwogICAgICAgICAgICBjb25zdCBwJCA9IHRoaXMucGF0aDsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBwJC5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgIGNvbnN0IGUgPSBwJFtpXTsKICAgICAgICAgICAgICBpZiAoZG9tKGUpLmdldE93bmVyUm9vdCgpID09PSBjdXJyZW50Um9vdCkgewogICAgICAgICAgICAgICAgcmV0dXJuIGU7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICB9LAogICAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlCiAgICAgICAgfSwKCiAgICAgICAgcGF0aDogewogICAgICAgICAgZ2V0KCkgewogICAgICAgICAgICByZXR1cm4gd2luZG93WydTaGFkeURPTSddWydjb21wb3NlZFBhdGgnXSh0aGlzLmV2ZW50KTsKICAgICAgICAgIH0sCiAgICAgICAgICBjb25maWd1cmFibGU6IHRydWUKICAgICAgICB9CiAgICAgIH0pOwoKICAgIH0gZWxzZSB7CgogICAgICAvLyBNZXRob2RzIHRoYXQgY2FuIHByb3Zva2UgZGlzdHJpYnV0aW9uIG9yIG11c3QgcmV0dXJuIHRoZSBsb2dpY2FsLCBub3QKICAgICAgLy8gY29tcG9zZWQgdHJlZS4KICAgICAgZm9yd2FyZE1ldGhvZHMoRG9tQXBpTmF0aXZlLnByb3RvdHlwZSwgWwogICAgICAgICdjbG9uZU5vZGUnLCAnYXBwZW5kQ2hpbGQnLCAnaW5zZXJ0QmVmb3JlJywgJ3JlbW92ZUNoaWxkJywKICAgICAgICAncmVwbGFjZUNoaWxkJywgJ3NldEF0dHJpYnV0ZScsICdyZW1vdmVBdHRya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ICAgIGNvbnN0IHNjb3BpZnkgPSAobm9kZSkgPT4gewogICAgICAgIGlmICghc2FtZVNjb3BlKG5vZGUsIHJvb3QpKSB7CiAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIC8vIE5PVEU6IG5hdGl2ZSBxU0EgZG9lcyBub3QgaG9ub3Igc2NvcGVkIERPTSwgYnV0IGl0IGlzIGZhc3RlciwgYW5kIHRoZSBzYW1lIGJlaGF2aW9yIGFzIFBvbHltZXIgdjEKICAgICAgICBjb25zdCBlbGVtZW50cyA9IEFycmF5LmZyb20oU2hhZHlET00kMVsnbmF0aXZlTWV0aG9kcyddWydxdWVyeVNlbGVjdG9yQWxsJ10uY2FsbChub2RlLCAnKicpKTsKICAgICAgICBlbGVtZW50cy5wdXNoKG5vZGUpOwogICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZWxlbWVudHMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgIGNvbnN0IGVsID0gZWxlbWVudHNbaV07CiAgICAgICAgICBpZiAoIXNhbWVTY29wZShlbCwgcm9vdCkpIHsKICAgICAgICAgICAgY29udGludWU7CiAgICAgICAgICB9CiAgICAgICAgICBjb25zdCBjdXJyZW50U2NvcGUgPSBTY29waW5nU2hpbVsnY3VycmVudFNjb3BlRm9yTm9kZSddKGVsKTsKICAgICAgICAgIGlmIChjdXJyZW50U2NvcGUgIT09IGNvbnRhaW5lclNjb3BlKSB7CiAgICAgICAgICAgIGlmIChjdXJyZW50U2NvcGUgIT09ICcnKSB7CiAgICAgICAgICAgICAgU2NvcGluZ1NoaW1bJ3Vuc2NvcGVOb2RlJ10oZWwsIGN1cnJlbnRTY29wZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgU2NvcGluZ1NoaW1bJ3Njb3BlTm9kZSddKGVsLCBjb250YWluZXJTY29wZSk7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9OwoKICAgICAgLy8gc2NvcGUgZXZlcnl0aGluZyBpbiBjb250YWluZXIKICAgICAgc2NvcGlmeShjb250YWluZXIpOwoKICAgICAgaWYgKHNob3VsZE9ic2VydmUpIHsKICAgICAgICBjb25zdCBtbyA9IG5ldyBNdXRhdGlvbk9ic2VydmVyKChteG5zKSA9PiB7CiAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IG14bnMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgY29uc3QgbXhuID0gbXhuc1tpXTsKICAgICAgICAgICAgZm9yIChsZXQgaiA9IDA7IGogPCBteG4uYWRkZWROb2Rlcy5sZW5ndGg7IGorKykgewogICAgICAgICAgICAgIGNvbnN0IGFkZGVkTm9kZSA9IG14bi5hZGRlZE5vZGVzW2pdOwogICAgICAgICAgICAgIGlmIChhZGRlZE5vZGUubm9kZVR5cGUgPT09IE5vZGUuRUxFTUVOVF9OT0RFKSB7CiAgICAgICAgICAgICAgICBzY29waWZ5KGFkZGVkTm9kZSk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfSk7CiAgICAgICAgbW8ub2JzZXJ2ZShjb250YWluZXIsIHtjaGlsZExpc3Q6IHRydWUsIHN1YnRyZWU6IHRydWV9KTsKICAgICAgICByZXR1cm4gbW87CiAgICAgIH0gZWxzZSB7CiAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgIH0KICAgIH0KCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcKICAgICAqIEBzdXBwcmVzcyB7Y2hlY2tQcm90b3R5cGFsVHlwZXN9CiAgICAgKiBAbGljZW5zZSBDb3B5cmlnaHQgKGMpIDIwMTcgVGhlIFBvbHltZXIgUHJvamVjdCBBdXRob3JzLiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICAgICogVGhpcyBjb2RlIG1heSBvbmx5IGJlIHVzZWQgdW5kZXIgdGhlIEJTRCBzdHlsZSBsaWNlbnNlIGZvdW5kIGF0CiAgICAgKiBodHRwOi8vcG9seW1lci5naXRodWIuaW8vTElDRU5TR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1lbnQgaXMgYWxyZWFkeSBjb25uZWN0ZWQuCiAgICAgICAgICAgIGlmICh0aGlzLl9faXNVcGdyYWRlRGlzYWJsZWQgJiYgdmFsdWUgPT0gbnVsbCkgewogICAgICAgICAgICAgIHN1cGVyLl9pbml0aWFsaXplUHJvcGVydGllcygpOwogICAgICAgICAgICAgIHRoaXMuX19pc1VwZ3JhZGVEaXNhYmxlZCA9IGZhbHNlOwogICAgICAgICAgICAgIGlmICh3cmFwKHRoaXMpLmlzQ29ubmVjdGVkKSB7CiAgICAgICAgICAgICAgICBzdXBlci5jb25uZWN0ZWRDYWxsYmFjaygpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgc3VwZXIuYXR0cmlidXRlQ2hhbmdlZENhbGxiYWNrKAogICAgICAgICAgICAgICAgbmFtZSwgb2xkLCB2YWx1ZSwgLyoqIEB0eXBlIHtudWxsfHN0cmluZ30gKi8gKG5hbWVzcGFjZSkpOwogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgLy8gUHJldmVudCBlbGVtZW50IGZyb20gY29ubmVjdGluZyB3aGVuIGl0J3MgdXBncmFkZSBkaXNhYmxlZC4KICAgICAgICAvLyBUaGlzIHByZXZlbnRzIHVzZXIgY29kZSBpbiBgYXR0YWNoZWRgIGZyb20gYmVpbmcgY2FsbGVkLgogICAgICAgIC8qKiBAb3ZlcnJpZGUgKi8KICAgICAgICBjb25uZWN0ZWRDYWxsYmFjaygpIHsKICAgICAgICAgIGlmICghdGhpcy5fX2lzVXBncmFkZURpc2FibGVkKSB7CiAgICAgICAgICAgIHN1cGVyLmNvbm5lY3RlZENhbGxiYWNrKCk7CiAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICAvLyBQcmV2ZW50IGVsZW1lbnQgZnJvbSBkaXNjb25uZWN0aW5nIHdoZW4gaXQncyB1cGdyYWRlIGRpc2FibGVkLgogICAgICAgIC8vIFRoaXMgYXZvaWR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NHZXR0ZXIobGVnYWN5RWxlbWVudEJhc2UpOwoKICAgICAgLyoqCiAgICAgICAqIE1hcCBvZiBzaW1wbGUgbmFtZXMgdG8gdG91Y2ggYWN0aW9uIG5hbWVzCiAgICAgICAqIEBkaWN0CiAgICAgICAqLwogICAgICBjb25zdCBESVJFQ1RJT05fTUFQID0gewogICAgICAgICd4JzogJ3Bhbi14JywKICAgICAgICAneSc6ICdwYW4teScsCiAgICAgICAgJ25vbmUnOiAnbm9uZScsCiAgICAgICAgJ2FsbCc6ICdhdXRvJwogICAgICB9OwoKICAgICAgLyoqCiAgICAgICAqIEBwb2x5bWVyCiAgICAgICAqIEBtaXhpbkNsYXNzCiAgICAgICAqIEBleHRlbmRzIHtsZWdhY3lFbGVtZW50QmFzZX0KICAgICAgICogQGltcGxlbWVudHMge1BvbHltZXJfTGVnYWN5RWxlbWVudE1peGlufQogICAgICAgKiBAdW5yZXN0cmljdGVkCiAgICAgICAqLwogICAgICBjbGFzcyBMZWdhY3lFbGVtZW50IGV4dGVuZHMgbGVnYWN5RWxlbWVudEJhc2UgewoKICAgICAgICBjb25zdHJ1Y3RvcigpIHsKICAgICAgICAgIHN1cGVyKCk7CiAgICAgICAgICAvKiogQHR5cGUge2Jvb2xlYW59ICovCiAgICAgICAgICB0aGlzLmlzQXR0YWNoZWQ7CiAgICAgICAgICAvKiogQHR5cGUgez9XZWFrTWFwPCFFbGVtZW50LCAhT2JqZWN0PHN0cmluZywgIUZ1bmN0aW9uPj59ICovCiAgICAgICAgICB0aGlzLl9fYm91bmRMaXN0ZW5lcnM7CiAgICAgICAgICAvKiogQHR5cGUgez9PYmplY3Q8c3RyaW5nLCA/RnVuY3Rpb24+fSAqLwogICAgICAgICAgdGhpcy5fZGVib3VuY2VyczsKICAgICAgICAgIC8vIE5PVEU6IElubGluZWQgZm9yIHBlcmYgZnJvbSB2ZXJzaW9uIG9mIERpc2FibGVVcGdyYWRlTWl4aW4uCiAgICAgICAgICAvKiogQHR5cGUge2Jvb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AgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogTGVnYWN5IGNhbGxiYWNrIGNhbGxlZCBkdXJpbmcgYGNvbm5lY3RlZENhbGxiYWNrYCwgZm9yIG92ZXJyaWRpbmcKICAgICAgICAgKiBieSB0aGUgdXNlci4KICAgICAgICAgKiBAb3ZlcnJpZGUKICAgICAgICAgKiBAcmV0dXJuIHt2b2lkfQogICAgICAgICAqLwogICAgICAgIGF0dGFjaGVkKCkge30KCiAgICAgICAgLyoqCiAgICAgICAgICogUHJvdmlkZXMgYW4gaW1wbGVtZW50YXRpb24gb2YgYGRpc2Nvbm5lY3RlZENhbGxiYWNrYAogICAgICAgICAqIHdoaWNoIGFkZHMgUG9seW1lciBsZWdhY3kgQVBJJ3MgYGRldGFjaGVkYCBtZXRob2QuCiAgICAgICAgICogQHJldHVybiB7dm9pZH0KICAgICAgICAgKiBAb3ZlcnJpZGUKICAgICAgICAgKi8KICAgICAgICBkaXNjb25uZWN0ZWRDYWxsYmFjaygpIHsKICAgICAgICAgIC8vIE5PVEU6IElubGluZWQgZm9yIHBlcmYgZnJvbSB2ZXJzaW9uIG9mIERpc2FibGVVcGdyYWRlTWl4aW4uCiAgICAgICAgICBpZiAoIXRoaXMuX19pc1VwZ3JhZGVEaXNhYmxlZCkgewogICAgICAgICAgICBzdXBlci5kaXNjb25uZWN0ZWRDYWxsYmFjaygpOwogICAgICAgICAgICB0aGlzLmlzQXR0YWNoZWQgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5kZXRhY2hlZCgpOwogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogTGVnYWN5IGNhbGxiYWNrIGNhbGxlZCBkdXJpbmcgYGRpc2Nvbm5lY3RlZENhbGxiYWNrYCwgZm9yIG92ZXJyaWRpbmcKICAgICAgICAgKiBieSB0aGUgdXNlci4KICAgICAgICAgKiBAb3ZlcnJpZGUKICAgICAgICAgKiBAcmV0dXJuIHt2b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gZWxlbWVudCBpcyBhbHJlYWR5IGNvbm5lY3RlZC4KICAgICAgICAgICAgICBpZiAodGhpcy5fX2lzVXBncmFkZURpc2FibGVkICYmIHZhbHVlID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2luaXRpYWxpemVQcm9wZXJ0aWVzKCk7CiAgICAgICAgICAgICAgICB0aGlzLl9faXNVcGdyYWRlRGlzYWJsZWQgPSBmYWxzZTsKICAgICAgICAgICAgICAgIGlmICh3cmFwKHRoaXMpLmlzQ29ubmVjdGVkKSB7CiAgICAgICAgICAgICAgICAgIHRoaXMuY29ubmVjdGVkQ2FsbGJhY2soKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgc3VwZXIuYXR0cmlidXRlQ2hhbmdlZENhbGxiYWNrKG5hbWUsIG9sZCwgdmFsdWUsIG5hbWVzcGFjZSk7CiAgICAgICAgICAgICAgdGhpcy5hdHRyaWJ1dGVDaGFuZ2VkKG5hbWUsIG9sZCwgdmFsdWUpOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBMZWdhY3kgY2FsbGJhY2sgY2FsbGVkIGR1cmluZyBgYXR0cmlidXRlQ2hhbmdlZENoYWxsYmFja2AsIGZvciBvdmVycmlkaW5nCiAgICAgICAgICogYnkgdGhlIHVzZXIuCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IG5hbWUgTmFtZSBvZiBhdHRyaWJ1dGUuCiAgICAgICAgICogQHBhcmFtIHs/c3RyaW5nfSBvbGQgT2xkIHZhbHVlIG9mIGF0dHJpYnV0ZS4KICAgICAgICAgKiBAcGFyYW0gez9zdHJpbmd9IHZhbHVlIEN1cnJlbnQgdmFsdWUgb2YgYXR0cmlidXRlLgogICAgICAgICAqIEByZXR1cm4ge3ZvaWR9CiAgICAgICAgICogQG92ZXJyaWRlCiAgICAgICAgICovCiAgICAgICAgYXR0cmlidXRlQ2hhbmdlZChuYW1lLCBvbGQsIHZhbHVlKSB7fSAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIG5vLXVudXNlZC12YXJzCgogICAgICAgIC8qKgogICAgICAgICAqIE92ZXJyaWRlcyB0aGUgZGVmYXVsdCBgUG9seW1lci5Qcm9wZXJ0eUVmZmVjdHNgIGltcGxlbWVudGF0aW9uIHRvCiAgICAgICAgICogYWRkIHN1cHBvcnQgZm9yIGNsYXNzIGluaXRpYWxpemF0aW9uIHZpYSB0aGUgYF9yZWdpc3RlcmVkYCBjYWxsYmFjay4KICAgICAgICAgKiBUaGlzIGlzIGNhbGxlZCBvbmx5IHdoZW4gdGhlIGZpcnN0IGluc3RhbmNlIG9mIHRoZSBlbGVtZW50IGlzIGNyZWF0ZWQuCiAgICAgICAgICoKICAgICAgICAgKiBAcmV0dXJuIHt2b2lkfQogICAgICAgICAqIEBvdmVycmlkZQogICAgICAgICAqIEBzdXBwcmVzcyB7aW52YWxpZENhc3RzfQogICAgICAgICAqLwogICAgICAgIF9pbml0aWFsaXplUHJvcGVydGllcygpIHsKICAgICAgICAgIC8vIE5PVEU6IElubGluZWQgZm9yIHBlcmYgZnJvbSB2ZXJzaW9uIG9mIERpc2FibGVVcGdyYWRlTWl4aW4uCiAgICAgICAgICAvLyBPbmx5IGF1dG8tdXNlIGRpc2FibGUtdXBncmFkZSBpZiBsZWdhY3lPcHRpbWl6YXRpb25zIGlzIHNldC4KICAgICAgICAgIGlmIChsZWdhY3lPcHRpbWl6YXRpb25zICYmIHRoaXMuaGFzQXR0cmlidXRlKERJU0FCTEVEX0FUVFIkMSkpIHsKICAgICAgICAgICAgdGhpcy5fX2lzVXBncmFkZURpc2FibGVkID0gdHJ1ZTsKICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIGxldCBwcm90byA9IE9iamVjdC5nZXRQcm90b3R5cGVPZih0aGlzKTsKICAgICAgICAgICAgaWYgKCFwcm90by5oYXN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WxlbWVudCB0byBzZXQgYXR0cmlidXRlIHRvLgogICAgICAgICAqIEByZXR1cm4ge3ZvaWR9CiAgICAgICAgICogQG92ZXJyaWRlCiAgICAgICAgICovCiAgICAgICAgc2VyaWFsaXplVmFsdWVUb0F0dHJpYnV0ZSh2YWx1ZSwgYXR0cmlidXRlLCBub2RlKSB7CiAgICAgICAgICB0aGlzLl92YWx1ZVRvTm9kZUF0dHJpYnV0ZSgvKiogQHR5cGUge0VsZW1lbnR9ICovIChub2RlIHx8IHRoaXMpLCB2YWx1ZSwgYXR0cmlidXRlKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENvcGllcyBvd24gcHJvcGVydGllcyAoaW5jbHVkaW5nIGFjY2Vzc29yIGRlc2NyaXB0b3JzKSBmcm9tIGEgc291cmNlCiAgICAgICAgICogb2JqZWN0IHRvIGEgdGFyZ2V0IG9iamVjdC4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBwcm90b3R5cGUgVGFyZ2V0IG9iamVjdCB0byBjb3B5IHByb3BlcnRpZXMgdG8uCiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IGFwaSBTb3VyY2Ugb2JqZWN0IHRvIGNvcHkgcHJvcGVydGllcyBmcm9tLgogICAgICAgICAqIEByZXR1cm4ge09iamVjdH0gcHJvdG90eXBlIG9iamVjdCB0aGF0IHdhcyBwYXNzZWQgYXMgZmlyc3QgYXJndW1lbnQuCiAgICAgICAgICogQG92ZXJyaWRlCiAgICAgICAgICovCiAgICAgICAgZXh0ZW5kKHByb3RvdHlwZSwgYXBpKSB7CiAgICAgICAgICBpZiAoIShwcm90b3R5cGUgJiYgYXBpKSkgewogICAgICAgICAgICByZXR1cm4gcHJvdG90eXBlIHx8IGFwaTsKICAgICAgICAgIH0KICAgICAgICAgIGxldCBuJCA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eU5hbWVzKGFwaSk7CiAgICAgICAgICBmb3IgKGxldCBpPTAsIG47IChpPG4kLmxlbmd0aCkgJiYgKG49biRbaV0pOyBpKyspIHsKICAgICAgICAgICAgbGV0IHBkID0gT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcihhcGksIG4pOwogICAgICAgICAgICBpZiAocGQpIHsKICAgICAgICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkocHJvdG90eXBlLCBuLCBwZCk7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiBwcm90b3R5cGU7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDb3BpZXMgcHJvcHMgZnJvbSBhIHNvdXJjZSBvYmplY3QgdG8gYSB0YXJnZXQgb2JqZWN0LgogICAgICAgICAqCiAgICAgICAgICogTm90ZSwgdGhpcyBtZXRob2QgdXNlcyBhIHNpbXBsZSBgZm9yLi4uaW5gIHN0cmF0ZWd5IGZvciBlbnVtZXJhdGluZwogICAgICAgICAqIHByb3BlcnRpZXMuICBUbyBlbnN1cmUgb25seSBgb3duUHJvcGVydGllc2AgYXJlIGNvcGllZCBmcm9tIHNvdXJjZQogICAgICAgICAqIHRvIHRhcmdldCBhbmQgdGhhdCBhY2Nlc3NvciBpbXBsZW1lbnRhdGlvbnMgYXJlIGNvcGllZCwgdXNlIGBleHRlbmRgLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHshT2JqZWN0fSB0YXJnZXQgVGFyZ2V0IG9iamVjdCB0byBjb3B5IHByb3BlcnRpZXMgdG8uCiAgICAgICAgICogQHBhcmFtIHshT2JqZWN0fSBzb3VyY2UgU291cmNlIG9iamVjdCB0byBjb3B5IHByb3BlcnRpZXMgZnJvbS4KICAgICAgICAgKiBAcmV0dXJuIHshT2JqZWN0fSBUYXJnZXQgb2JqZWN0IHRoYXQgd2FzIHBhc3NlZCBhcyBmaXJzdCBhcmd1bWVudC4KICAgICAgICAgKiBAb3ZlcnJpZGUKICAgICAgICAgKi8KICAgICAgICBtaXhpbih0YXJnZXQsIHNvdXJjZSkgewogICAgICAgICAgZm9yIChsZXQgaSBpbiBzb3VyY2UpIHsKICAgICAgICAgICAgdGFyZ2V0W2ldID0gc291cmNlW2ldOwogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIHRhcmdldDsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgdGhlIHByb3RvdHlwZSBvZiBhbiBvYmplY3QuCiAgICAgICAgICoKICAgICAgICAgKiBOb3RlIHRoaXMgbWV0aG9kIGlzIHByb3ZpZGVkIGFzIGJhY2t3YXJkLWNvbXBhdGlibGUgbGVnYWN5IEFQSQogICAgICAgICAqIG9ubHkuICBJdCBpcyBub3QgZGlyZWN0bHkgY2FsbGVkIGJ5IGFueSBQb2x5bWVyIGZlYXR1cmVzLgogICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvYmplY3QgVGhlIG9iamVjdCBvbiB3aGljaCB0byBzZXQgdGhlIHByb3RvdHlwZS4KICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gcHJvdG90eXBlIFRoZSBwcm90b3R5cGUgdGhhdCB3aWxsIGJlIHNldCBvbiB0aGUgZ2l2ZW4KICAgICAgICAgKiBgb2JqZWN0YC4KICAgICAgICAgKiBAcmV0dXJuIHtPYmplY3R9IFJldHVybnMgdGhlIGdpdmVuIGBvYmplY3RgIHdpdGggaXRzIHByb3RvdHlwZSBzZXQKICAgICAgICAgKiB0byB0aGUgZ2l2ZW4gYHByb3RvdHlwZWAgb2JqZWN0LgogICAgICAgICAqIEBvdmVycmlkZQogICAgICAgICAqLwogICAgICAgIGNoYWluT2JqZWN0KG9iamVjdCwgcHJvdG90eXBlKSB7CiAgICAgICAgICBpZiAob2JqZWN0ICYmIHByb3RvdHlwZSAmJiBvYmplY3QgIT09IHByb3RvdHlwZSkgewogICAgICAgICAgICBvYmplY3QuX19wcm90b19fID0gcHJvdG90eXBlOwogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIG9iamVjdDsKICAgICAgICB9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dmVudCh0eXBlLCB7CiAgICAgICAgICAgIGJ1YmJsZXM6IG9wdGlvbnMuYnViYmxlcyA9PT0gdW5kZWZpbmVkID8gdHJ1ZSA6IG9wdGlvbnMuYnViYmxlcywKICAgICAgICAgICAgY2FuY2VsYWJsZTogQm9vbGVhbihvcHRpb25zLmNhbmNlbGFibGUpLAogICAgICAgICAgICBjb21wb3NlZDogb3B0aW9ucy5jb21wb3NlZCA9PT0gdW5kZWZpbmVkID8gdHJ1ZTogb3B0aW9ucy5jb21wb3NlZAogICAgICAgICAgfSk7CiAgICAgICAgICBldmVudC5kZXRhaWwgPSBkZXRhaWw7CiAgICAgICAgICBsZXQgbm9kZSA9IG9wdGlvbnMubm9kZSB8fCB0aGlzOwogICAgICAgICAgd3JhcChub2RlKS5kaXNwYXRjaEV2ZW50KGV2ZW50KTsKICAgICAgICAgIHJldHVybiBldmVudDsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENvbnZlbmllbmNlIG1ldGhvZCB0byBhZGQgYW4gZXZlbnQgbGlzdGVuZXIgb24gYSBnaXZlbiBlbGVtZW50LAogICAgICAgICAqIGxhdGUgYm91bmQgdG8gYSBuYW1lZCBtZXRob2Qgb24gdGhpcyBlbGVtZW50LgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/RXZlbnRUYXJnZXR9IG5vZGUgRWxlbWVudCB0byBhZGQgZXZlbnQgbGlzdGVuZXIgdG8uCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IGV2ZW50TmFtZSBOYW1lIG9mIGV2ZW50IHRvIGxpc3RlbiBmb3IuCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IG1ldGhvZE5hbWUgTmFtZSBvZiBoYW5kbGVyIG1ldGhvZCBvbiBgdGhpc2AgdG8gY2FsbC4KICAgICAgICAgKiBAcmV0dXJuIHt2b2lkfQogICAgICAgICAqIEBvdmVycmlkZQogICAgICAgICAqLwogICAgICAgIGxpc3Rlbihub2RlLCBldmVudE5hbWUsIG1ldGhvZE5hbWUpIHsKICAgICAgICAgIG5vZGUgPSAvKiogQHR5cGUgeyFFdmVudFRhcmdldH0gKi8gKG5vZGUgfHwgdGhpcyk7CiAgICAgICAgICBsZXQgaGJsID0gdGhpcy5fX2JvdW5kTGlzdGVuZXJzIHx8CiAgICAgICAgICAgICh0aGlzLl9fYm91bmRMaXN0ZW5lcnMgPSBuZXcgV2Vha01hcCgpKTsKICAgICAgICAgIGxldCBibCA9IGhibC5nZXQobm9kZSk7CiAgICAgICAgICBpZiAoIWJsKSB7CiAgICAgICAgICAgIGJsID0ge307CiAgICAgICAgICAgIGhibC5zZXQobm9kZSwgYmwpOwogICAgICAgICAgfQogICAgICAgICAgbGV0IGtleSA9IGV2ZW50TmFtZSArIG1ldGhvZE5hbWU7CiAgICAgICAgICBpZiAoIWJsW2tleV0pIHsKICAgICAgICAgICAgYmxba2V5XSA9IHRoaXMuX2FkZE1ldGhvZEV2ZW50TGlzdGVuZXJUb05vZGUoCiAgICAgICAgICAgICAgICAvKiogQHR5cGUgeyFOb2RlfSAqLyAobm9kZSksIGV2ZW50TmFtZSwgbWV0aG9kTmFtZSwgdGhpcyk7CiAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDb252ZW5pZW5jZSBtZXRob2QgdG8gcmVtb3ZlIGFuIGV2ZW50IGxpc3RlbmVyIGZyb20gYSBnaXZlbiBlbGVtZW50LAogICAgICAgICAqIGxhdGUgYm91bmQgdG8gYSBuYW1lZCBtZXRob2Qgb24gdGhpcyBlbGVtZW50LgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/RXZlbnRUYXJnZXR9IG5vZGUgRWxlbWVudCB0byByZW1vdmUgZXZlbnQgbGlzdGVuZXIgZnJvbS4KICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gZXZlbnROYW1lIE5hbWUgb2YgZXZlbnQgdG8gc3RvcCBsaXN0ZW5pbmcgdG8uCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IG1ldGhvZE5hbWUgTmFtZSBvZiBoYW5kbGVyIG1ldGhvZCBvbiBgdGhpc2AgdG8gbm90IGNhbGwKICAgICAgICAgYW55bW9yZS4KICAgICAgICAgKiBAcmV0dXJuIHt2b2lkfQogICAgICAgICAqIEBvdmVycmlkZQogICAgICAgICAqLwogICAgICAgIHVubGlzdGVuKG5vZGUsIGV2ZW50TmFtZSwgbWV0aG9kTmFtZSkgewogICAgICAgICAgbm9kZSA9IC8qKiBAdHlwZSB7IUV2ZW50VGFyZ2V0fSAqLyAobm9kZSB8fCB0aGlzKTsKICAgICAgICAgIGxldCBibCA9IHRoaXMuX19ib3VuZExpc3RlbmVycyAmJgogICAgICAgICAgICAgIHRoaXMuX19ib3VuZExpc3RlbmVycy5nZXQoLyoqIEB0eXBlIHshRWxlbWVudH0gKi8gKG5vZGUpKTsKICAgICAgICAgIGxldCBrZXkgPSBldmVudE5hbWUgKyBtZXRob2ROYW1lOwogICAgICAgICAgbGV0IGhhbmRsZXIgPSBibCAmJiBibFtrZXldOwogICAgICAgICAgaWYgKGhhbmRsZXIpIHsKICAgICAgICAgICAgdGhpcy5fcmVtb3ZlRXZlbnRMaXN0ZW5lckZyb21Ob2RlKAogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHshTm9kZX0gKi8gKG5vZGUpLCBldmVudE5hbWUsIGhhbmRsZXIpOwogICAgICAgICAgICBibFtrZXldID0gLyoqIEB0eXBlIHs/fSAqLyAobnVsbCk7CiAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBPdmVycmlkZSBzY3JvbGxpbmcgYmVoYXZpb3IgdG8gYWxsIGRpcmVjdGlvbiwgb25lIGRpcmVjdGlvbiwgb3Igbm9uZS4KICAgICAgICAgKgogICAgICAgICAqIFZhbGlkIHNjcm9sbCBkaXJlY3Rpb25zOgogICAgICAgICAqICAgLSAnYWxsJzogc2Nyb2xsIGluIGFueSBkaXJlY3Rpb24KICAgICAgICAgKiAgIC0gJ3gnOiBzY3JvbGwgb25seSBpbiB0aGUgJ3gnIGRpcmVjdGlvbgogICAgICAgICAqICAgLSAneSc6IHNjcm9sbCBvbmx5IGluIHRoZSAneScgZGlyZWN0aW9uCiAgICAgICAgICogICAtICdub25lJzogZGlzYWJsZSBzY3JvbGxpbmcgZm9yIHRoaXMgbm9kZQogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmc9fSBkaXJlY3Rpb24gRGlyZWN0aW9uIHRvIGFsbG93IHNjcm9sbGluZwogICAgICAgICAqIERlZmF1bHRzIHRvIGBhbGxgLgogICAgICAgICAqIEBwYXJhbSB7RWxlbWVudD19IG5vZGUgRWxlbWVudCB0byBhcHBseSBzY3JvbGwgZGlyZWN0aW9uIHNldHRpbmcuCiAgICAgICAgICogRGVmYXVsdHMgdG8gYHRoaXNgLgogICAgICAgICAqIEByZXR1cm4ge3ZvaWR9CiAgICAgICAgICogQG92ZXJyaWRlCiAgICAgICAgICovCiAgICAgICAgc2V0U2Nyb2xsRGlyZWN0aW9uKGRpcmVjdGlvbiwgbm9kZSkgewogICAgICAgICAgc2V0VG91Y2hBY3Rpb24oCiAgICAgICAgICAgICAgLyoqIEB0eXBlIHshRWxlbWVudH0gKi8gKG5vZGUgfHwgdGhpcyksCiAgICAgICAgICAgICAgRElSRUNUSU9OX01BUFtkaXJlY3Rpb25dIHx8ICdhdXRvJyk7CiAgICAgICAgfQogICAgICAgIC8qICoqKiogRW5kIEV2ZW50cyAqKioqICovCgogICAgICAgIC8qKgogICAgICAgICAqIENvbnZlbmllbmNlIG1ldGhvZCB0byBydW4gYHF1ZXJ5U2VsZWN0b3JgIG9uIHRoaXMgbG9jYWwgRE9NIHNjb3BlLgogICAgICAgICAqCiAgICAgICAgICogVGhpcyBmdW5jdGlvbiBjYWxscyBgUG9seW1lci5kb20odGhpcy5yb290KS5xdWVyeVNlbGVjdG9yKHNsY3RyKWAuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gc2xjdHIgU2VsZWN0b3IgdG8gcnVuIG9uIHRoaXMgbG9jYWwgRE9NIHNjb3BlCiAgICAgICAgICogQHJldHVybiB7RWxlbWVudH0gRWxlbWVudCBmb3VuZCBieSB0aGUgc2VsZWN0b3IsIG9yIG51bGwgaWYgbm90IGZvdW5kLgogICAgICAgICAqIEBvdmVycmlkZQogICAgICAgICAqLwogICAgICAgICQkKHNsY3RyKSB7CiAgICAgICAgICAvLyBOb3RlLCBubyBuZWVkIHRvIGB3cmFwYCB0aGlzIGJlY2F1c2Ugcm9vdCBpcyBhbHdheXMgcGF0Y2hlZAogICAgICAgICAgcmV0dXJuIHRoaXMucm9vdC5xdWVyeVNlbGVjdG9yKHNsY3RyKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybiB0aGUgZWxlbWVudCB3aG9zZSBsb2NhbCBkb20gd2l0aGluIHdoaWNoIHRoaXMgZWxlbWVudAogICAgICAgICAqIGlzIGNvbnRhaW5lZC4gVGhpcyBpcyBhIHNob3J0aGFuZCBmb3IKICAgICAgICAgKiBgdGhpcy5nZXRSb290Tm9kZSgpLmhvc3RgLgogICAgICAgICAqIEB0aGlzIHtFbGVtZW50fQogICAgICAgICAqIEByZXR1cm4gez9Ob2RlfSBUaGUgZWxlbWVudCB3aG9zZSBsb2NhbCBkb20gd2l0aGluIHdoaWNoIHRoaXMgZWxlbWVudCBpcwogICAgICAgICAqIGNvbnRhaW5lZC4KICAgICAgICAgKiBAb3ZlcnJpZGUKICAgICAgICAgKi8KICAgICAgICBnZXQgZG9tSG9zdCgpIHsKICAgICAgICAgIGxldCByb290ID0gd3JhcCh0aGlzKS5nZXRSb290Tm9kZSgpOwogICAgICAgICAgcmV0dXJuIChyb290IGluc3RhbmNlb2YgRG9jdW1lbnRGcmFnbWVudCkgPyAvKiogQHR5cGUge1NoYWRvd1Jvb3R9ICovIChyb290KS5ob3N0IDogcm9vdDsKICAgICAgICB9CgogICA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N0LmZpbHRlcihmdW5jdGlvbigvKiogQHR5cGUgeyFOb2RlfSAqLyBuKSB7CiAgICAgICAgICAgIHJldHVybiAobi5ub2RlVHlwZSA9PT0gTm9kZS5FTEVNRU5UX05PREUpOwogICAgICAgICAgfSk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBSZXR1cm5zIGEgc3RyaW5nIG9mIHRleHQgY29udGVudCB0aGF0IGlzIHRoZSBjb25jYXRlbmF0aW9uIG9mIHRoZQogICAgICAgICAqIHRleHQgY29udGVudCdzIG9mIHRoZSBlbGVtZW50J3MgZWZmZWN0aXZlIGNoaWxkTm9kZXMgKHRoZSBlbGVtZW50cwogICAgICAgICAqIHJldHVybmVkIGJ5IDxhIGhyZWY9IiNnZXRFZmZlY3RpdmVDaGlsZE5vZGVzPmdldEVmZmVjdGl2ZUNoaWxkTm9kZXM8L2E+LgogICAgICAgICAqCiAgICAgICAgICogQHJldHVybiB7c3RyaW5nfSBMaXN0IG9mIGVmZmVjdGl2ZSBjaGlsZHJlbi4KICAgICAgICAgKiBAb3ZlcnJpZGUKICAgICAgICAgKi8KICAgICAgICBnZXRFZmZlY3RpdmVUZXh0Q29udGVudCgpIHsKICAgICAgICAgIGxldCBjbiA9IHRoaXMuZ2V0RWZmZWN0aXZlQ2hpbGROb2RlcygpOwogICAgICAgICAgbGV0IHRjID0gW107CiAgICAgICAgICBmb3IgKGxldCBpPTAsIGM7IChjID0gY25baV0pOyBpKyspIHsKICAgICAgICAgICAgaWYgKGMubm9kZVR5cGUgIT09IE5vZGUuQ09NTUVOVF9OT0RFKSB7CiAgICAgICAgICAgICAgdGMucHVzaChjLnRleHRDb250ZW50KTsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIHRjLmpvaW4oJycpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogUmV0dXJucyB0aGUgZmlyc3QgZWZmZWN0aXZlIGNoaWxkTm9kZSB3aXRoaW4gdGh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RlbnQgPwogICAgICAgICAgICAgIC8qKiBAdHlwZSB7UG9seW1lckRvbUFwaX0gKi8gKGRvbShjb250ZW50KSkuZ2V0RGlzdHJpYnV0ZWROb2RlcygpIDoKICAgICAgICAgICAgICBbXTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgYSBsaXN0IG9mIGVsZW1lbnQgY2hpbGRyZW4gZGlzdHJpYnV0ZWQgdG8gdGhpcyBlbGVtZW50J3MKICAgICAgICAgKiBgPHNsb3Q+YC4KICAgICAgICAgKgogICAgICAgICAqIElmIHRoaXMgZWxlbWVudCBjb250YWlucyBtb3JlIHRoYW4gb25lIGA8c2xvdD5gIGluIGl0cwogICAgICAgICAqIGxvY2FsIERPTSwgYW4gb3B0aW9uYWwgc2VsZWN0b3IgbWF5IGJlIHBhc3NlZCB0byBjaG9vc2UgdGhlIGRlc2lyZWQKICAgICAgICAgKiBjb250ZW50LiAgVGhpcyBtZXRob2QgZGlmZmVycyBmcm9tIGBnZXRDb250ZW50Q2hpbGROb2Rlc2AgaW4gdGhhdCBvbmx5CiAgICAgICAgICogZWxlbWVudHMgYXJlIHJldHVybmVkLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmc9fSBzbGN0ciBDU1Mgc2VsZWN0b3IgdG8gY2hvb3NlIHRoZSBkZXNpcmVkCiAgICAgICAgICogICBgPGNvbnRlbnQ+YC4gIERlZmF1bHRzIHRvIGBjb250ZW50YC4KICAgICAgICAgKiBAcmV0dXJuIHshQXJyYXk8IUhUTUxFbGVtZW50Pn0gTGlzdCBvZiBkaXN0cmlidXRlZCBub2RlcyBmb3IgdGhlCiAgICAgICAgICogICBgPHNsb3Q+YC4KICAgICAgICAgKiBAc3VwcHJlc3Mge2ludmFsaWRDYXN0c30KICAgICAgICAgKiBAb3ZlcnJpZGUKICAgICAgICAgKi8KICAgICAgICBnZXRDb250ZW50Q2hpbGRyZW4oc2xjdHIpIHsKICAgICAgICAgIGxldCBj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tzIHdoZXRoZXIgYW4gZWxlbWVudCBpcyBpbiB0aGlzIGVsZW1lbnQncyBsb2NhbCBET00gdHJlZS4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7IUVsZW1lbnR9IG5vZGUgVGhlIGVsZW1lbnQgdG8gYmUgY2hlY2tlZC4KICAgICAgICAgKiBAcmV0dXJuIHtib29sZWFufSB0cnVlIGlmIG5vZGUgaXMgaW4gdGhpcyBlbGVtZW50J3MgbG9jYWwgRE9NIHRyZWUuCiAgICAgICAgICogQG92ZXJyaWRlCiAgICAgICAgICovCiAgICAgICAgaXNMb2NhbERlc2NlbmRhbnQobm9kZSkgewogICAgICAgICAgcmV0dXJuIHRoaXMucm9vdCA9PT0gd3JhcChub2RlKS5nZXRSb290Tm9kZSgpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogTm8tb3AgZm9yIGJhY2t3YXJkcyBjb21wYXRpYmlsaXR5LiBUaGlzIHNob3VsZCBub3cgYmUgaGFuZGxlZCBieQogICAgICAgICAqIFNoYWR5Q3NzIGxpYnJhcnkuCiAgICAgICAgICogQHBhcmFtICB7IUVsZW1lbnR9IGNvbnRhaW5lciBDb250YWluZXIgZWxlbWVudCB0byBzY29wZQogICAgICAgICAqIEBwYXJhbSAge2Jvb2xlYW49fSBzaG91bGRPYnNlcnZlIGlmIHRydWUsIHN0YXJ0IGEgbXV0YXRpb24gb2JzZXJ2ZXIgZm9yIGFkZGVkIG5vZGVzIHRvIHRoZSBjb250YWluZXIKICAgICAgICAgKiBAcmV0dXJuIHs/TXV0YXRpb25PYnNlcnZlcn0gUmV0dXJucyBhIG5ldyBNdXRhdGlvbk9ic2VydmVyIG9uIGBjb250YWluZXJgIGlmIGBzaG91bGRPYnNlcnZlYCBpcyB0cnVlLgogICAgICAgICAqIEBvdmVycmlkZQogICAgICAgICAqLwogICAgICAgIHNjb3BlU3VidHJlZShjb250YWluZXIsIHNob3VsZE9ic2VydmUgPSBmYWxzZSkgewogICAgIC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MgdHJ1ZSBpZiB0aGUgZGVib3VuY2VyIGlzCiAgICAgICAgICogYWN0aXZlOyBgY2FuY2VsKClgIGNhbmNlbHMgdGhlIGRlYm91bmNlciBpZiBpdCBpcyBhY3RpdmU7CiAgICAgICAgICogYGZsdXNoKClgIGltbWVkaWF0ZWx5IGludm9rZXMgdGhlIGRlYm91bmNlZCBjYWxsYmFjayBpZiB0aGUgZGVib3VuY2VyCiAgICAgICAgICogaXMgYWN0aXZlLgogICAgICAgICAqIEBvdmVycmlkZQogICAgICAgICAqLwogICAgICAgIGRlYm91bmNlKGpvYk5hbWUsIGNhbGxiYWNrLCB3YWl0KSB7CiAgICAgICAgICB0aGlzLl9kZWJvdW5jZXJzID0gdGhpcy5fZGVib3VuY2VycyB8fCB7fTsKICAgICAgICAgIHJldHVybiB0aGlzLl9kZWJvdW5jZXJzW2pvYk5hbWVdID0gRGVib3VuY2VyLmRlYm91bmNlKAogICAgICAgICAgICAgICAgdGhpcy5fZGVib3VuY2Vyc1tqb2JOYW1lXQogICAgICAgICAgICAgICwgd2FpdCA+IDAgPyB0aW1lT3V0LmFmdGVyKHdhaXQpIDogbWljcm9UYXNrCiAgICAgICAgICAgICAgLCBjYWxsYmFjay5iaW5kKHRoaXMpKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgd2hldGhlciBhIG5hbWVkIGRlYm91bmNlciBpcyBhY3RpdmUuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gam9iTmFtZSBUaGUgbmFtZSBvZiB0aGUgZGVib3VuY2VyIHN0YXJ0ZWQgd2l0aCBgZGVib3VuY2VgCiAgICAgICAgICogQHJldHVybiB7Ym9vbGVhbn0gV2hldGhlciB0aGUgZGVib3VuY2VyIGlzIGFjdGl2ZSAoaGFzIG5vdCB5ZXQgZmlyZWQpLgogICAgICAgICAqIEBvdmVycmlkZQogICAgICAgICAqLwogICAgICAgIGlzRGVib3VuY2VyQWN0aXZlKGpvYk5hbWUpIHsKICAgICAgICAgIHRoaXMuX2RlYm91bmNlcnMgPSB0aGlzLl9kZWJvdW5jZXJzIHx8IHt9OwogICAgICAgICAgbGV0IGRlYm91bmNlciA9IHRoaXMuX2RlYm91bmNlcnNbam9iTmFtZV07CiAgICAgICAgICByZXR1cm4gISEoZGVib3VuY2VyICYmIGRlYm91bmNlci5pc0FjdGl2ZSgpKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIEltbWVkaWF0ZWx5IGNhbGxzIHRoZSBkZWJvdW5jZXIgYGNhbGxiYWNrYCBhbmQgaW5hY3RpdmF0ZXMgaXQuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gam9iTmFtZSBUaGUgbmFtZSBvZiB0aGUgZGVib3VuY2VyIHN0YXJ0ZWQgd2l0aCBgZGVib3VuY2VgCiAgICAgICAgICogQHJldHVybiB7dm9pZH0KICAgICAgICAgKiBAb3ZlcnJpZGUKICAgICAgICAgKi8KICAgICAgICBmbHVzaERlYm91bmNlcihqb2JOYW1lKSB7CiAgICAgICAgICB0aGlzLl9kZWJvdW5jZXJzID0gdGhpcy5fZGVib3VuY2VycyB8fCB7fTsKICAgICAgICAgIGxldCBkZWJvdW5jZXIgPSB0aGlzLl9kZWJvdW5jZXJzW2pvYk5hbWVdOwogICAgICAgICAgaWYgKGRlYm91bmNlcikgewogICAgICAgICAgICBkZWJvdW5jZXIuZmx1c2goKTsKICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIENhbmNlbHMgYW4gYWN0aXZlIGRlYm91bmNlci4gIFRoZSBgY2FsbGJhY2tgIHdpbGwgbm90IGJlIGNhbGxlZC4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBqb2JOYW1lIFRoZSBuYW1lIG9mIHRoZSBkZWJvdW5jZXIgc3RhcnRlZCB3aXRoIGBkZWJvdW5jZWAKICAgICAgICAgKiBAcmV0dXJuIHt2b2lkfQogICAgICAgICAqIEBvdmVycmlkZQogICAgICAgICAqLwogICAgICAgIGNhbmNlbERlYm91bmNlcihqb2JOYW1lKSB7CiAgICAgICAgICB0aGlzLl9kZWJvdW5jZXJzID0gdGhpcy5fZGVib3VuY2VycyB8fCB7fTsKICAgICAgICAgIGxldCBkZWJvdW5jZXIgPSB0aGlzLl9kZWJvdW5jZXJzW2pvYk5hbWVdOwogICAgICAgICAgaWYgKGRlYm91bmNlcikgewogICAgICAgICAgICBkZWJvdW5jZXIuY2FuY2VsKCk7CiAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBSdW5zIGEgY2FsbGJhY2sgZnVuY3Rpb24gYXN5bmNocm9ub3VzbHkuCiAgICAgICAgICoKICAgICAgICAgKiBCeSBkZWZhdWx0IChpZiBubyB3YWl0VGltZSBpcyBzcGVjaWZpZWQpLCBhc3luYyBjYWxsYmFja3MgYXJlIHJ1biBhdAogICAgICAgICAqIG1pY3JvdGFzayB0aW1pbmcsIHdoaWNoIHdpbGwgb2NjdXIgYmVmb3JlIHBhaW50LgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHshRnVuY3Rpb259IGNhbGxiYWNrIFRoZSBjYWxsYmFjayBmdW5jdGlvbiB0byBydW4sIGJvdW5kIHRvCiAgICAgICAgICogICAgIGB0aGlzYC4KICAgICAgICAgKiBAcGFyYW0ge251bWJlcj19IHdhaXRUaW1lIFRpbWUgdG8gd2FpdCBiZWZvcmUgY2FsbGluZyB0aGUKICAgICAgICAgKiAgIGBjYWxsYmFja2AuICBJZiB1bnNwZWNpZmllZCBvciAwLCB0aGUgY2FsbGJhY2sgd2lsbCBiZSBydW4gYXQgbWljcm90YXNrCiAgICAgICAgICogICB0aW1pbmcgKGJlZm9yZSBwYWludCkuCiAgICAgICAgICogQHJldHVybiB7bnVtYmVyfSBIYW5kbGUgdGhhdCBtYXkgYmUgdXNlZCB0byBjYW5jZWwgdGhlIGFzeW5jIGpvYi4KICAgICAgICAgKiBAb3ZlcnJpZGUKICAgICAgICAgKi8KICAgICAgICBhc3luYyhjYWxsYmFjaywgd2FpdFRpbWUpIHsKICAgICAgICAgIHJldHVybiB3YWl0VGltZSA+IDAgPyB0aW1lT3V0LnJ1bihjYWxsYmFjay5iaW5kKHRoaXMpLCB3YWl0VGltZSkgOgogICAgICAgICAgICAgIH5taWNyb1Rhc2sucnVuKGNhbGxiYWNrLmJpbmQodGhpcykpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ2FuY2VscyBhbiBhc3luYyBvcGVyYXRpb24gc3RhcnRlZCB3aXRoIGBhc3luY2AuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gaGFuZGxlIEhhbmRsZSByZXR1cm5lZCBmcm9tIG9yaWdpbmFsIGBhc3luY2AgY2FsbCB0bwogICAgICAgICAqICAgY2FuY2VsLgogICAgICAgICAqIEByZXR1cm4ge3ZvaWR9CiAgICAgICAgICogQG92ZXJyaWRlCiAgICAgICAgICovCiAgICAgICAgY2FuY2VsQXN5bmMoaGFuZGxlKSB7CiAgICAgICAgICBoYW5kbGUgPCAwID8gbWljcm9UYXNrLmNhbmNlbCh+aGFuZGxlKSA6CiAgICAgICAgICAgICAgdGltZU91dC5jYW5jZWwoaGFuZGxlKTsKICAgICAgICB9CgogICAgICAgIC8vIG90aGVyCgogICAgICAgIC8qKgogICAgICAgICAqIENvbnZlbmllbmNlIG1ldGhvZCBmb3IgY3JlYXRpbmcgYW4gZWxlbWVudCBhbmQgY29uZmlndXJpbmcgaXQuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gdGFnIEhUTUwgZWxlbWVudCB0YWcgdG8gY3JlYXRlLgogICAgICAgICAqIEBwYXJhbSB7T2JqZWN0PX0gcHJvcHMgT2JqZWN0IG9mIHByb3BlcnRpZXMgdG8gY29uZmlndXJlIG9uIHRoZQogICAgICAgICAqICAgIGluc3RhbmNlLgogICAgICAgICAqIEByZXR1cm4geyFFbGVtZW50fSBOZXdseSBjcmVhdGVkIGFuZCBjb25maWd1cmVkIGVsZW1lbnQuCiAgICAgICAgICogQG92ZXJyaWRlCiAgICAgICAgICovCiAgICAgICAgY3JlYXRlKHRhZywgcHJvcHMpIHsKICAgICAgICAgIGxldCBlbHQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KHRhZyk7CiAgICAgICAgICBpZiAocHJvcHMpIHsKICAgICAgICAgICAgaWYgKGVsdC5zZXRQcm9wZXJ0aWVzKSB7CiAgICAgICAgICAgICAgZWx0LnNldFByb3BlcnRpZXMocHJvcHMpOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgIGZvciAobGV0IG4gaW4gcHJvcHMpIHsKICAgICAgICAgICAgICAgIGVsdFtuXSA9IHByb3BzW25dOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIGVsdDsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFBvbHlmaWxsIGZvciBFbGVtZW50LnByb3RvdHlwZS5tYXRjaGVzLCB3aGljaCBpcyBzb21ldGltZXMgc3RpbGwKICAgICAgICAgKiBwcmVmaXhlZC4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBzZWxlY3RvciBTZWxlY3RvciB0byB0ZXN0LgogICAgICAgICAqIEBwYXJhbSB7IUVsZW1lbnQ9fSBub2RlIEVsZW1lbnQgdG8gdGVzdCB0aGUgc2VsZWN0b3IgYWdhaW5zdC4KICAgICAgICAgKiBAcmV0dXJuIHtib29sZWFufSBXaGV0aGVyIHRoZSBlbGVtZW50IG1hdGNoZXMgdGhlIHNlbGVjdG9yLgogICAgICAgICAqIEBvdmVycmlkZQogICAgICAgICAqLwogICAgICAgIGVsZW1lbnRNYXRjaGVzKHNlbGVjdG9yLCBub2RlKSB7CiAgICAgICAgICByZXR1cm4gbWF0Y2hlc1NlbGV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nJlbW92ZUF0dHJpYnV0ZShuYW1lKTsKICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgfQogICAgICAgIH0KCgogICAgICAgIC8qKgogICAgICAgICAqIFRvZ2dsZXMgYSBDU1MgY2xhc3Mgb24gb3Igb2ZmLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IG5hbWUgQ1NTIGNsYXNzIG5hbWUKICAgICAgICAgKiBAcGFyYW0ge2Jvb2xlYW49fSBib29sIEJvb2xlYW4gdG8gZm9yY2UgdGhlIGNsYXNzIG9uIG9yIG9mZi4KICAgICAgICAgKiAgICBXaGVuIHVuc3BlY2lmaWVkLCB0aGUgc3RhdGUgb2YgdGhlIGNsYXNzIHdpbGwgYmUgcmV2ZXJzZWQuCiAgICAgICAgICogQHBhcmFtIHtFbGVtZW50PX0gbm9kZSBOb2RlIHRvIHRhcmdldC4gIERlZmF1bHRzIHRvIGB0aGlzYC4KICAgICAgICAgKiBAcmV0dXJuIHt2b2lkfQogICAgICAgICAqIEBvdmVycmlkZQogICAgICAgICAqLwogICAgICAgIHRvZ2dsZUNsYXNzKG5hbWUsIGJvb2wsIG5vZGUpIHsKICAgICAgICAgIG5vZGUgPSAvKiogQHR5cGUge0VsZW1lbnR9ICovIChub2RlIHx8IHRoaXMpOwogICAgICAgICAgaWYgKGFyZ3VtZW50cy5sZW5ndGggPT0gMSkgewogICAgICAgICAgICBib29sID0gIW5vZGUuY2xhc3NMaXN0LmNvbnRhaW5zKG5hbWUpOwogICAgICAgICAgfQogICAgICAgICAgaWYgKGJvb2wpIHsKICAgICAgICAgICAgbm9kZS5jbGFzc0xpc3QuYWRkKG5hbWUpOwogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgbm9kZS5jbGFzc0xpc3QucmVtb3ZlKG5hbWUpOwogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQ3Jvc3MtcGxhdGZvcm0gaGVscGVyIGZ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lzYC4KICAgICAgICAgKiBAcmV0dXJuIHt2b2lkfQogICAgICAgICAqIEBvdmVycmlkZQogICAgICAgICAqLwogICAgICAgIHRyYW5zbGF0ZTNkKHgsIHksIHosIG5vZGUpIHsKICAgICAgICAgIG5vZGUgPSAvKiogQHR5cGUge0VsZW1lbnR9ICovIChub2RlIHx8IHRoaXMpOwogICAgICAgICAgdGhpcy50cmFuc2Zvcm0oJ3RyYW5zbGF0ZTNkKCcgKyB4ICsgJywnICsgeSArICcsJyArIHogKyAnKScsIG5vZGUpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogUmVtb3ZlcyBhbiBpdGVtIGZyb20gYW4gYXJyYXksIGlmIGl0IGV4aXN0cy4KICAgICAgICAgKgogICAgICAgICAqIElmIHRoZSBhcnJheSBpcyBzcGVjaWZpZWQgYnkgcGF0aCwgYSBjaGFuZ2Ugbm90aWZpY2F0aW9uIGlzCiAgICAgICAgICogZ2VuZXJhdGVkLCBzbyB0aGF0IG9ic2VydmVycywgZGF0YSBiaW5kaW5ncyBhbmQgY29tcHV0ZWQKICAgICAgICAgKiBwcm9wZXJ0aWVzIHdhdGNoaW5nIHRoYXQgcGF0aCBjYW4gdXBkYXRlLgogICAgICAgICAqCiAgICAgICAgICogSWYgdGhlIGFycmF5IGlzIHBhc3NlZCBkaXJlY3RseSwgKipubyBjaGFuZ2UKICAgICAgICAgKiBub3RpZmljYXRpb24gaXMgZ2VuZXJhdGVkKiouCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0ge3N0cmluZyB8ICFBcnJheTxudW1iZXJ8c3RyaW5nPn0gYXJyYXlPclBhdGggUGF0aCB0byBhcnJheSBmcm9tCiAgICAgICAgICogICAgIHdoaWNoIHRvIHJlbW92ZSB0aGUgaXRlbQogICAgICAgICAqICAgKG9yIHRoZSBhcnJheSBpdHNlbGYpLgogICAgICAgICAqIEBwYXJhbSB7Kn0gaXRlbSBJdGVtIHRvIHJlbW92ZS4KICAgICAgICAgKiBAcmV0dXJuIHtBcnJheX0gQXJyYXkgY29udGFpbmluZyBpdGVtIHJlbW92ZWQuCiAgICAgICAgICogQG92ZXJyaWRlCiAgICAgICAgICovCiAgICAgICAgYXJyYXlEZWxldGUoYXJyYXlPclBhdGgsIGl0ZW0pIHsKICAgICAgICAgIGxldCBpbmRleDsKICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KGFycmF5T3JQYXRoKSkgewogICAgICAgICAgICBpbmRleCA9IGFycmF5T3JQYXRoLmluZGV4T2YoaXRlbSk7CiAgICAgICAgICAgIGlmIChpbmRleCA+PSAwKSB7CiAgICAgICAgICAgICAgcmV0dXJuIGFycmF5T3JQYXRoLnNwbGljZShpbmRleCwgMSk7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIGxldCBhcnIgPSBnZXQodGhpcywgYXJyYXlPclBhdGgpOwogICAgICAgICAgICBpbmRleCA9IGFyci5pbmRleE9mKGl0ZW0pOwogICAgICAgICAgICBpZiAoaW5kZXggPj0gMCkgewogICAgICAgICAgICAgIHJldHVybiB0aGlzLnNwbGljZShhcnJheU9yUGF0aCwgaW5kZXgsIDEpOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICB9CgogICAgICAgIC8vIGxvZ2dpbmcKCiAgICAgICAgLyoqCiAgICAgICAgICogRmFjYWRlcyBgY29uc29sZS5sb2dgL2B3YXJuYC9gZXJyb3JgIGFzIG92ZXJyaWRlIHBvaW50LgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IGxldmVsIE9uZSBvZiAnbG9nJywgJ3dhcm4nLCAnZXJyb3InCiAgICAgICAgICogQHBhcmFtIHtBcnJheX0gYXJncyBBcnJheSBvZiBzdHJpbmdzIG9yIG9iamVjdHMgdG8gbG9nCiAgICAgICAgICogQHJldHVybiB7dm9pZH0KICAgICAgICAgKiBAb3ZlcnJpZGUKICAgICAgICAgKi8KICAgICAgICBfbG9nZ2VyKGxldmVsLCBhcmdzKSB7CiAgICAgICAgICAvLyBhY2NlcHQgWydmb28nLCAnYmFyJ10gYW5kIFtbJ2ZvbycsICdiYXInXV0KICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KGFyZ3MpICYmIGFyZ3MubGVuZ3RoID09PSAxICYmIEFycmF5LmlzQXJyYXkoYXJnc1swXSkpIHsKICAgICAgICAgICAgYXJncyA9IGFyZ3NbMF07CiAgICAgICAgICB9CiAgICAgICAgICBzd2l0Y2gobGV2ZWwpIHsKICAgICAgICAgICAgY2FzZSAnbG9nJzoKICAgICAgICAgICAgY2FzZSAnd2Fybic6CiAgICAgICAgICAgIGNhc2UgJ2Vycm9yJzoKICAgICAgICAgICAgICBjb25zb2xlW2xldmVsXSguLi5hcmdzKTsKICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIEZhY2FkZXMgYGNvbnNvbGUubG9nYCBhcyBhbiBvdmVycmlkZSBwb2ludC4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7Li4uKn0gYXJncyBBcnJheSBvZiBzdHJpbmdzIG9yIG9iamVjdHMgdG8gbG9nCiAgICAgICAgICogQHJldHVybiB7dm9pZH0KICAgICAgICAgKiBAb3ZlcnJpZGUKICAgICAgICAgKi8KICAgICAgICBfbG9nKC4uLmFyZ3MpIHsKICAgICAgICAgIHRoaXMuX2xvZ2dlcignbG9nJywgYXJncyk7CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBGYWNhZGVzIGBjb25zb2xlLndhcm5gIGFzIGFuIG92ZXJyaWRlIHBvaW50LgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHsuLi4qfSBhcmdzIEFycmF5IG9mIHN0cmluZ3Mgb3Igb2JqZWN0cyB0byBsb2cKICAgICAgICAgKiBAcmV0dXJuIHt2b2lkfQogICAgICAgICAqIEBvdmVycmlkZQogICAgICAgICAqLwogICAgICAgIF93YXJuKC4uLmFyZ3MpIHsKICAgICAgICAgIHRoaXMuX2xvZ2dlcignd2FybicsIGFyZ3MpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogRmFjYWRlcyBgY29uc29sZS5lcnJvcmAgYXMgYW4gb3ZlcnJpZGUgcG9pbnQuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gey4uLip9IGFyZ3MgQXJyYXkgb2Ygc3RyaW5ncyBvciBvYmplY3RzIHRvIGxvZwogICAgICAgICAqIEByZXR1cm4ge3ZvaWR9CiAgICAgICAgICogQG92ZXJyaWRlCiAgICAgICAgICovCiAgICAgICAgX2Vycm9yKC4uLmFyZ3MpIHsKICAgICAgICAgIHRoaXMuX2xvZ2dlcignZXJyb3InLCBhcmdzKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIEZvcm1hdHMgYSBtZXNzYWdlIHVzaW5nIHRoZSBlbGVtZW50IHR5cGUgYW4gYSBtZXRob2QgbmFtZS4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBtZXRob2ROYW1lIE1ldGhvZCBuYW1lIHRvIGFzc29jaWF0ZSB3aXRoIG1lc3NhZ2UKICAgICAgICAgKiBAcGFyYW0gey4uLip9IGFyZ3MgQXJyYXkgb2Ygc3RyaW5ncyBvciBvYmplY3RzIHRvIGxvZwogICAgICAgICAqIEByZXR1cm4geyFBcnJheX0gQXJyYXkgd2l0aCBmb3JtYXR0aW5nIGluZm9ybWF0aW9uIGZvciBgY29uc29sZWAKICAgICAgICAgKiAgIGxvZ2dpbmcuCiAgICAgICAgICogQG92ZXJyaWRlCiAgICAgICAgICovCiAgICAgICAgX2xvZ2YobWV0aG9kTmFtZSwgLi4uYXJncykgewogICAgICAgICAgcmV0dXJuIFsnWyVzOjolc10nLCB0aGlzLmlzLCBtZXRob2ROYW1lLCAuLi5hcmdzXTsKICAgICAgICB9CgogICAgICB9CgogICAgICBMZWdhY3lFbGVtZW50LnByb3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IGludG8gY29tcG9uZW50cy4KICAgICAqCiAgICAgKiA8cD5UaGlzIGlzIHRoZSBjb21wYXJpc29uIGZ1bmN0aW9uIHVzZWQgZm9yIHNvcnRpbmcgbW9zdCBzdHJpbmcgdmFsdWVzIGluCiAgICAgKiBUZW5zb3JCb2FyZC4gVW5saWtlIHRoZSBzdGFuZGFyZCBhc2NpaWJldGljYWwgY29tcGFyYXRvciwgdGhpcyBmdW5jdGlvbgogICAgICoga25vd3MgdGhhdCAnYTEwYicgPiAnYTJiJy4gRml4ZWQgcG9pbnQgYW5kIGVuZ2luZWVyaW5nIG5vdGF0aW9uIGFyZQogICAgICogc3VwcG9ydGVkLiBUaGlzIGZ1bmN0aW9uIGFsc28gc3BsaXRzIHRoZSBpbnB1dCBieSBzbGFzaCBhbmQgdW5kZXJzY29yZSB0bwogICAgICogcGVyZm9ybSBhcnJheSBjb21wYXJpc29uLiBUaGVyZWZvcmUgaXQga25vd3MgdGhhdCAnYS9hJyA8ICdhKy9hJyBldmVuCiAgICAgKiB0aG91Z2ggJysnIDwgJy8nIGluIHRoZSBBU0NJSSB0YWJsZS4KICAgICAqLwogICAgZnVuY3Rpb24gY29tcGFyZVRhZ05hbWVzKGEsIGIpIHsKICAgICAgICBsZXQgYWkgPSAwOwogICAgICAgIGxldCBiaSA9IDA7CiAgICAgICAgd2hpbGUgKHRydWUpIHsKICAgICAgICAgICAgaWYgKGFpID09PSBhLmxlbmd0aCkgewogICAgICAgICAgICAgICAgcmV0dXJuIGJpID09PSBiLmxlbmd0aCA/IDAgOiAtMTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoYmkgPT09IGIubGVuZ3RoKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gMTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoaXNEaWdpdChhW2FpXSkgJiYgaXNEaWdpdChiW2JpXSkpIHsKICAgICAgICAgICAgICAgIGNvbnN0IGFpcyA9IGFpOwogICAgICAgICAgICAgICAgY29uc3QgYmlzID0gYmk7CiAgICAgICAgICAgICAgICBhaSA9IGNvbnN1bWVOdW1iZXIoYSwgYWkgKyAxKTsKICAgICAgICAgICAgICAgIGJpID0gY29uc3VtZU51bWJlcihiLCBiaSArIDEpOwogICAgICAgICAgICAgICAgY29uc3QgYW4gPSBwYXJzZUZsb2F0KGEuc2xpY2UoYWlzLCBhaSkpOwogICAgICAgICAgICAgICAgY29uc3QgYm4gPSBwYXJzZUZsb2F0KGIuc2xpY2UoYmlzLCBiaSkpOwogICAgICAgICAgICAgICAgaWYgKGFuIDwgYm4pIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gLTE7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAoYW4gPiBibikgewogICAgICAgICAgICAgICAgICAgIHJldHVybiAxOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgY29udGludWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGlzQnJlYWsoYVthaV0pKSB7CiAgICAgICAgICAgICAgICBpZiAoIWlzQnJlYWsoYltiaV0pKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC0xOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKGlzQnJlYWsoYltiaV0pKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gMTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChhW2FpXSA8IGJbYmldKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gLTE7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoYVthaV0gPiBiW2JpXSkgewogICAgICAgICAgICAgICAgcmV0dXJuIDE7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgYWkrKzsKICAgICAgICAgICAgYmkrKzsKICAgICAgICB9CiAgICB9CiAgICBmdW5jdGlvbiBjb25zdW1lTnVtYmVyKHMsIGkpIHsKICAgICAgICBsZXQgU3RhdGU7CiAgICAgICAgKGZ1bmN0aW9uIChTdGF0ZSkgewogICAgICAgICAgICBTdGF0ZVtTdGF0ZVsiTkFUVVJBTCJdID0gMF0gPSAiTkFUVVJBTCI7CiAgICAgICAgICAgIFN0YXRlW1N0YXRlWyJSRUFMIl0gPSAxXSA9ICJSRUFMIjsKICAgICAgICAgICAgU3RhdGVbU3RhdGVbIkVYUE9ORU5UX1NJR04iXSA9IDJdID0gIkVYUE9ORU5UX1NJR04iOwogICAgICAgICAgICBTdGF0ZVtTdGF0ZVsiRVhQT05FTlQiXSA9IDNdID0gIkVYUE9ORU5UIjsKICAgICAgICB9KShTdGF0ZSB8fCAoU3RhdGUgPSB7fSkpOwogICAgICAgIGxldCBzdGF0ZSA9IFN0YXRlLk5BVFVSQUw7CiAgICAgICAgZm9yICg7IGkgPCBzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgIGlmIChzdGF0ZSA9PT0gU3RhdGUuTkFUVVJBTCkgewogICAgICAgICAgICAgICAgaWYgKHNbaV0gPT09ICcuJykgewogICAgICAgICAgICAgICAgICAgIHN0YXRlID0gU3RhdGUuUkVBTDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKHNbaV0gPT09ICdlJyB8fCBzW2ldID09PSAnRScpIHsKICAgICAgICAgICAgICAgICAgICBzdGF0ZSA9IFN0YXRlLkVYUE9ORU5UX1NJR047CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmICghaXNEaWdpdChzW2ldKSkgewogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKHN0YXRlID09PSBTdGF0ZS5SRUFMKSB7CiAgICAgICAgICAgICAgICBpZiAoc1tpXSA9PT0gJ2UnIHx8IHNbaV0gPT09ICdFJykgewogICAgICAgICAgICAgICAgICAgIHN0YXRlID0gU3RhdGUuRVhQT05FTlRfU0lHTjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKCFpc0RpZ2l0KHNbaV0pKSB7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoc3RhdGUgPT09IFN0YXRlLkVYUE9ORU5UX1NJR04pIHsKICAgICAgICAgICAgICAgIGlmIChpc0RpZ2l0KHNbaV0pIHx8IHNbaV0gPT09ICcrJyB8fCBzW2ldID09PSAnLScpIHsKICAgICAgICAgICAgICAgICAgICBzdGF0ZSA9IFN0YXRlLkVYUE9ORU5UOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoc3RhdGUgPT09IFN0YXRlLkVYUE9ORU5UKSB7CiAgICAgICAgICAgICAgICBpZiAoIWlzRGlnaXQoc1tpXSkpIHsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gaTsKICAgIH0KICAgIGZ1bmN0aW9uIGlzRGlnaXQoYykgewogICAgICAgIHJldHVybiAnMCcgPD0gYyAmJiBjIDw9ICc5JzsKICAgIH0KICAgIGZ1bmN0aW9uIGlzQnJlYWsoYykgewogICAgICAgIC8vIFRPRE8oQGphcnQpOiBSZW1vdmUgdW5kZXJzY29yZSB3aGVuIHBlb3BsZSBzdG9wIHVzaW5nIGl0IGxpa2UgYSBzbGFzaC4KICAgICAgICByZXR1cm4gYyA9PT0gJy8nIHx8IGMgPT09ICdfJyB8fCBpc0RpZ2l0KGMpOwogICAgfQoKICAgIC8qIENvcHlyaWdodCAyMDE1IFRoZSBUZW5zb3JGbG93IEF1dGhvcnMuIEFsbCBSaWdodHMgUmVzZXJ2ZWQ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FVC4KICAgICAgICAgICAgICAgIGlmICh0aGlzLmJvZHkpIHsKICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgSW52YWxpZFJlcXVlc3RPcHRpb25zRXJyb3IoJ2JvZHkgbXVzdCBiZSBtaXNzaW5nIGZvciBhIEdFVCByZXF1ZXN0LicpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIFdlIGFsbG93IGJvZHktbGVzcyBvciBjb250ZW50VHlwZS1sZXNzIFBPU1RzIGV2ZW4gaWYgdGhleSBkb24ndAogICAgICAgICAgICAvLyBtYWtlIG11Y2ggc2Vuc2UuCiAgICAgICAgfQogICAgfQogICAgY2xhc3MgUmVxdWVzdE1hbmFnZXIgewogICAgICAgIGNvbnN0cnVjdG9yKG5TaW11bHRhbmVvdXNSZXF1ZXN0cyA9IDEwMDAsIG1heFJldHJpZXMgPSAzKSB7CiAgICAgICAgICAgIHRoaXMuX3F1ZXVlID0gW107CiAgICAgICAgICAgIHRoaXMuX25BY3RpdmVSZXF1ZXN0cyA9IDA7CiAgICAgICAgICAgIHRoaXMuX25TaW11bHRhbmVvdXNSZXF1ZXN0cyA9IG5TaW11bHRhbmVvdXNSZXF1ZXN0czsKICAgICAgICAgICAgdGhpcy5fbWF4UmV0cmllcyA9IG1heFJldHJpZXM7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEdpdmVzIGEgcHJvbWlzZSB0aGF0IGxvYWRzIGFzc2V0cyBmcm9tIGdpdmVuIHVybCAocmVzcGVjdHMgcXVldWluZykuIElmCiAgICAgICAgICogcG9zdERhdGEgaXMgcHJvdmlkZWQsIHRoaXMgcmVxdWVzdCB3aWxsIHVzZSBQT1NULCBub3QgR0VULiBUaGlzIGlzIGFuCiAgICAgICAgICogb2JqZWN0IG1hcHBpbmcgUE9TVCBrZXlzIHRvIHN0cmluZyB2YWx1ZXMuCiAgICAgICAgICovCiAgICAgICAgcmVxdWVzdCh1cmwsIHBvc3REYXRhKSB7CiAgICAgICAgICAgIGNvbnN0IHJlcXVlc3RPcHRpb25zID0gcmVxdWVzdE9wdGlvbnNGcm9tUG9zdERhdGEocG9zdERhdGEpOwogICAgICAgICAgICByZXR1cm4gdGhpcy5yZXF1ZXN0V2l0aE9wdGlvbnModXJsLCByZXF1ZXN0T3B0aW9ucyk7CiAgICAgICAgfQogICAgICAgIHJlcXVlc3RXaXRoT3B0aW9ucyh1cmwsIHJlcXVlc3RPcHRpb25zKSB7CiAgICAgICAgICAgIHJlcXVlc3RPcHRpb25zLnZhbGlkYXRlKCk7CiAgICAgICAgICAgIGNvbnN0IHByb21pc2UgPSBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7CiAgICAgICAgICAgICAgICBjb25zdCByZXNvbHZlciA9IHsgcmVzb2x2ZTogcmVzb2x2ZSwgcmVqZWN0OiByZWplY3QgfTsKICAgICAgICAgICAgICAgIHRoaXMuX3F1ZXVlLnB1c2gocmVzb2x2ZXIpOwogICAgICAgICAgICAgICAgdGhpcy5sYXVuY2hSZXF1ZXN0cygpOwogICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgLnRoZW4oKCkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMucHJvbWlzZVdpdGhSZXRyaWVzKHVybCwgdGhpcy5fbWF4UmV0cmllcywgcmVxdWVzdE9wdGlvbnMpOwogICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgLnRoZW4oKHJlc3BvbnNlKSA9PiB7CiAgICAgICAgICAgICAgICAvLyBTdWNjZXNzIC0gTGV0J3MgZnJlZSBzcGFjZSBmb3IgYW5vdGhlciBhY3RpdmUKICAgICAgICAgICAgICAgIC8vIHJlcXVlc3QsIGFuZCBsYXVuY2ggaXQKICAgICAgICAgICAgICAgIHRoaXMuX25BY3RpdmVSZXF1ZXN0cy0tOwogICAgICAgICAgICAgICAgdGhpcy5sYXVuY2hSZXF1ZXN0cygpOwogICAgICAgICAgICAgICAgcmV0dXJuIHJlc3BvbnNlOwogICAgICAgICAgICB9LCAocmVqZWN0aW9uKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAocmVqZWN0aW9uLm5hbWUgPT09ICdSZXF1ZXN0TmV0d29ya0Vycm9yJykgewogICAgICAgICAgICAgICAgICAgIC8vIElmIHdlIGZhaWxlZCBkdWUgdG8gbmV0d29yayBlcnJvciwgd2Ugc2hvdWxkCiAgICAgICAgICAgICAgICAgICAgLy8gZGVjcmVtZW50CiAgICAgICAgICAgICAgICAgICAgLy8gX25BY3RpdmVSZXF1ZXN0cyBiZWNhdXNlIHRoaXMgcmVxdWVzdCB3YXMKICAgICAgICAgICAgICAgICAgICAvLyBhY3RpdmUKICAgICAgICAgICAgICAgICAgICB0aGlzLl9uQWN0aXZlUmVxdWVzdHMtLTsKICAgICAgICAgICAgICAgICAgICB0aGlzLmxhdW5jaFJlcXVlc3RzKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gUHJvbWlzZS5yZWplY3QocmVqZWN0aW9uKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHJldHVybiBwcm9taXNlOwogICAgICAgIH0KICAgICAgICBmZXRjaCh1cmwsIGZldGNoT3B0aW9ucykgewogICAgICAgICAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4gewogICAgICAgICAgICAgICAgY29uc3QgcmVzb2x2ZXIgPSB7IHJlc29sdmU6IHJlc29sdmUsIHJlamVjdDogcmVqZWN0IH07CiAgICAgICAgICAgICAgICB0aGlzLl9xdWV1ZS5wdXNoKHJlc29sdmVyKTsKICAgICAgICAgICAgICAgIHRoaXMubGF1bmNoUmVxdWVzdHMoKTsKICAgICAgICAgICAgfSkudGhlbigoKSA9PiB7CiAgICAgICAgICAgICAgICBsZXQgbnVtVHJpZXMgPSAxOwogICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgY29uc3QgcmV0cnlGZXRjaCA9ICgpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgZmV0Y2godXJsLCBmZXRjaE9wdGlvbnMpLnRoZW4oKHJlc3BvbnNlKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXJlc3BvbnNlLm9rICYmIHRoaXMuX21heFJldHJpZXMgPiBudW1UcmllcykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG51bVRyaWVzKys7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0cnlGZXRjaCgpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmUocmVzcG9uc2UpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fbkFjdGl2ZVJlcXVlc3RzLS07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmxhdW5jaFJlcXVlc3RzKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICAgICAgcmV0cnlGZXRjaCgpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICBjbGVhclF1ZXVlKCkgewogICAgICAgICAgICB3aGlsZSAodGhpcy5fcXVldWUubGVuZ3RoID4gMCkgewogICAgICAgICAgICAgICAgdGhpcy5fcXVldWUKICAgICAgICAgICAgICAgICAgICAucG9wKCkKICAgICAgICAgICAgICAgICAgICAucmVqZWN0KG5ldyBSZXF1ZXN0Q2FuY2VsbGF0aW9uRXJyb3IoJ1JlcXVlc3QgY2FuY2VsbGVkIGJ5IGNsZWFyUXVldWUnKSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyogUmV0dXJuIG51bWJlciBvZiBjdXJy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byb21pc2VGcm9tVXJsKHVybCwgcmVxdWVzdE9wdGlvbnMpIHsKICAgICAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHsKICAgICAgICAgICAgICAgIGNvbnN0IHJlcSA9IGJ1aWxkWE1MSHR0cFJlcXVlc3QocmVxdWVzdE9wdGlvbnMubWV0aG9kVHlwZSwgdXJsLCByZXF1ZXN0T3B0aW9ucy53aXRoQ3JlZGVudGlhbHMsIHJlcXVlc3RPcHRpb25zLmNvbnRlbnRUeXBlKTsKICAgICAgICAgICAgICAgIHJlcS5vbmxvYWQgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKHJlcS5zdGF0dXMgPT09IDIwMCkgewogICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKEpTT04ucGFyc2UocmVxLnJlc3BvbnNlVGV4dCkpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0KG5ldyBSZXF1ZXN0TmV0d29ya0Vycm9yKHJlcSwgdXJsKSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIHJlcS5vbmVycm9yID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgICAgIHJlamVjdChuZXcgUmVxdWVzdE5ldHdvcmtFcnJvcihyZXEsIHVybCkpOwogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIGlmIChyZXF1ZXN0T3B0aW9ucy5ib2R5KSB7CiAgICAgICAgICAgICAgICAgICAgcmVxLnNlbmQocmVxdWVzdE9wdGlvbnMuYm9keSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICByZXEuc2VuZCgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICB9CiA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5jdGlvbiBjcmVhdGVSb3V0ZXIoZGF0YURpciA9ICdkYXRhJywgdXJsU2VhcmNoUGFyYW1zID0gaW5pdGlhbFVSTFNlYXJjaFBhcmFtcykgewogICAgICAgIGlmIChkYXRhRGlyW2RhdGFEaXIubGVuZ3RoIC0gMV0gPT09ICcvJykgewogICAgICAgICAgICBkYXRhRGlyID0gZGF0YURpci5zbGljZSgwLCBkYXRhRGlyLmxlbmd0aCAtIDEpOwogICAgICAgIH0KICAgICAgICByZXR1cm4gewogICAgICAgICAgICBlbnZpcm9ubWVudDogKCkgPT4gY3JlYXRlRGF0YVBhdGgoZGF0YURpciwgJy9lbnZpcm9ubWVudCcpLAogICAgICAgICAgICBleHBlcmltZW50czogKCkgPT4gY3JlYXRlRGF0YVBhdGgoZGF0YURpciwgJy9leHBlcmltZW50cycpLAogICAgICAgICAgICBwbHVnaW5Sb3V0ZTogKHBsdWdpbk5hbWUsIHJvdXRlLCBwYXJhbXMpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiBjcmVhdGVEYXRhUGF0aChkYXRhRGlyICsgJy9wbHVnaW4nLCBgLyR7cGx1Z2luTmFtZX0ke3JvdXRlfWAsIHBhcmFtcyk7CiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHBsdWdpbnNMaXN0aW5nOiAoKSA9PiBjcmVhdGVEYXRhUGF0aChkYXRhRGlyLCAnL3BsdWdpbnNfbGlzdGluZycsIGNyZWF0ZVNlYXJjaFBhcmFtKHsKICAgICAgICAgICAgICAgIFtFWFBFUklNRU5UQUxfUExVR0lOU19RVUVSWV9QQVJBTV06IHVybFNlYXJjaFBhcmFtcy5nZXRBbGwoRVhQRVJJTUVOVEFMX1BMVUdJTlNfUVVFUllfUEFSQU0pLAogICAgICAgICAgICB9KSksCiAgICAgICAgICAgIHJ1bnM6ICgpID0+IGNyZWF0ZURhdGFQYXRoKGRhdGFEaXIsICcvcnVucycpLAogICAgICAgICAgICBydW5zRm9yRXhwZXJpbWVudDogKGlkKS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5VHlwZSA9IHt9KSk7CiAgICAvKioKICAgICAqIENvbXB1dGUgYSBjYXRlZ29yeSBjb250YWluaW5nIHRoZSBzZWFyY2ggcmVzdWx0cyBmb3IgdGhlIGdpdmVuIHF1ZXJ5LgogICAgICovCiAgICBmdW5jdGlvbiBjYXRlZ29yaXplQnlTZWFyY2hRdWVyeSh4cywgcXVlcnkpIHsKICAgICAgICBjb25zdCByZSA9ICgoKSA9PiB7CiAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IFJlZ0V4cChxdWVyeSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY2F0Y2ggKGUpIHsKICAgICAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgICAgICB9CiAgICAgICAgfSkoKTsKICAgICAgICByZXR1cm4gewogICAgICAgICAgICBuYW1lOiBxdWVyeSwKICAgICAgICAgICAgbWV0YWRhdGE6IHsKICAgICAgICAgICAgICAgIHR5cGU6IENhdGVnb3J5VHlwZS5TRUFSQ0hfUkVTVUxUUywKICAgICAgICAgICAgICAgIHZhbGlkUmVnZXg6ICEhcmUsCiAgICAgICAgICAgICAgICB1bml2ZXJzYWxSZWdleDogcXVlcnkgPT09ICcuKicsCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIGl0ZW1zOiByZSA/IHhzLmZpbHRlcigoeCkgPT4geC5tYXRjaChyZSkpIDogW10sCiAgICAgICAgfTsKICAgIH0KICAgIC8qKgogICAgICogQ29tcHV0ZSB0aGUgcXVvdGllbnQgc2V0ICRYL3tcc2ltfSQsIHdoZXJlICRhIFxzaW0gYiQgaWYgJGEkIGFuZCAkYiQKICAgICAqIHNoYXJlIGEgY29tbW9uIGBzZXBhcmF0b3JgLXByZWZpeC4gT3JkZXIgaXMgcHJlc2VydmVkLgogICAgICovCiAgICBmdW5jdGlvbiBjYXRlZ29yaXplQnlQcmVmaXgoeHMsIHNlcGFyYXRvciA9ICcvJykgewogICAgICAgIGNvbnN0IGNhdGVnb3JpZXMgPSBbXTsKICAgICAgICBjb25zdCBjYXRlZ29yaWVzQnlOYW1lID0ge307CiAgICAgICAgeHMuZm9yRWFjaCgoeCkgPT4gewogICAgICAgICAgICBjb25zdCBpbmRleCA9IHguaW5kZXhPZihzZXBhcmF0b3IpOwogICAgICAgICAgICBjb25zdCBuYW1lID0gaW5kZXggPj0gMCA/IHguc2xpY2UoMCwgaW5kZXgpIDogeDsKICAgICAgICAgICAgaWYgKCFjYXRlZ29yaWVzQnlOYW1lW25hbWVdKSB7CiAgICAgICAgICAgICAgICBjb25zdCBjYXRlZ29yeSA9IHsKICAgICAgICAgICAgICAgICAgICBuYW1lLAogICAgICAgICAgICAgICAgICAgIG1ldGFkYXRhOiB7IHR5cGU6IENhdGVnb3J5VHlwZS5QUkVGSVhfR1JPVVAgfSwKICAgICAgICAgICAgICAgICAgICBpdGVtczogW10sCiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgY2F0ZWdvcmllc0J5TmFtZVtuYW1lXSA9IGNhdGVnb3J5OwogICAgICAgICAgICAgICAgY2F0ZWdvcmllcy5wdXNoKGNhdGVnb3J5KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBjYXRlZ29yaWVzQnlOYW1lW25hbWVdLml0ZW1zLnB1c2goeCk7CiAgICAgICAgfSk7CiAgICAgICAgcmV0dXJuIGNhdGVnb3JpZXM7CiAgICB9CiAgICAvKgogICAgICogQ29tcHV0ZSB0aGUgc3RhbmRhcmQgY2F0ZWdvcml6YXRpb24gb2YgdGhlIGdpdmVuIGlucHV0LCBpbmNsdWRpbmcKICAgICAqIGJvdGggc2VhcmNoIGNhdGVnb3JpZXMgYW5kIHByZWZpeCBjYXRlZ29yaWVzLgogICAgICovCiAgICBmdW5jdGlvbiBjYXRlZ29yaXplKHhzLCBxdWVyeSA9ICcnKSB7CiAgICAgICAgY29uc3QgYnlGaWx0ZXIgPSBbY2F0ZWdvcml6ZUJ5U2VhcmNoUXVlcnkoeHMsIHF1ZXJ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gICAgICAgICAgdGhpcy5jcmVhdGVQcm9wZXJ0aWVzKGIucHJvcGVydGllcyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAoYi5vYnNlcnZlcnMpIHsKICAgICAgICAgICAgICAgICAgdGhpcy5jcmVhdGVPYnNlcnZlcnMoYi5vYnNlcnZlcnMsIGIucHJvcGVydGllcyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChpbmZvLnByb3BlcnRpZXMpIHsKICAgICAgICAgICAgICB0aGlzLmNyZWF0ZVByb3BlcnRpZXMoaW5mby5wcm9wZXJ0aWVzKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoaW5mby5vYnNlcnZlcnMpIHsKICAgICAgICAgICAgICB0aGlzLmNyZWF0ZU9ic2VydmVycyhpbmZvLm9ic2VydmVycywgaW5mby5wcm9wZXJ0aWVzKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBtYWtlIHN1cmUgdG8gcHJlcGFyZSB0aGUgZWxlbWVudCB0ZW1wbGF0ZQogICAgICAgICAgICB0aGlzLl9wcmVwYXJlVGVtcGxhdGUoKTsKICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIC8qKiBAbm9jb2xsYXBzZSAqLwogICAgICAgIHN0YXRpYyBnZXQgcHJvcGVydGllcygpIHsKICAgICAgICAgIGNvbnN0IHByb3BlcnRpZXMgPSB7fTsKICAgICAgICAgIGlmIChiZWhhdmlvckxpc3QpIHsKICAgICAgICAgICAgZm9yIChsZXQgaT0wOyBpIDwgYmVoYXZpb3JMaXN0Lmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgbWVyZ2VQcm9wZXJ0aWVzKHByb3BlcnRpZXMsIGJlaGF2aW9yTGlzdFtpXS5wcm9wZXJ0aWVzKTsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgICAgbWVyZ2VQcm9wZXJ0aWVzKHByb3BlcnRpZXMsIGluZm8ucHJvcGVydGllcyk7CiAgICAgICAgICByZXR1cm4gcHJvcGVydGllczsKICAgICAgICB9CgogICAgICAgIC8qKiBAbm9jb2xsYXBzZSAqLwogICAgICAgIHN0YXRpYyBnZXQgb2JzZXJ2ZXJzKCkgewogICAgICAgICAgbGV0IG9ic2VydmVycyA9IFtdOwogICAgICAgICAgaWYgKGJlaGF2aW9yTGlzdCkgewogICAgICAgICAgICBmb3IgKGxldCBpPTAsIGI7IGkgPCBiZWhhdmlvckxpc3QubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICBiID0gYmVoYXZpb3JMaXN0W2ldOwogICAgICAgICAgICAgIGlmIChiLm9ic2VydmVycykgewogICAgICAgICAgICAgICAgb2JzZXJ2ZXJzID0gb2JzZXJ2ZXJzLmNvbmNhdChiLm9ic2VydmVycyk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICBpZiAoaW5mby5vYnNlcnZlcnMpIHsKICAgICAgICAgICAgb2JzZXJ2ZXJzID0gb2JzZXJ2ZXJzLmNvbmNhdChpbmZvLm9ic2VydmVycyk7CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gb2JzZXJ2ZXJzOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7dm9pZH0KICAgICAgICAgKi8KICAgICAgICBjcmVhdGVkKCkgewogICAgICAgICAgc3VwZXIuY3JlYXRlZCgpOwogICAgICAgICAgY29uc3QgbGlzdCA9IGxpZmVjeWNsZS5jcmVhdGVkOwogICAgICAgICAgaWYgKGxpc3QpIHsKICAgICAgICAgICAgZm9yIChsZXQgaT0wOyBpIDwgbGlzdC5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgIGxpc3RbaV0uY2FsbCh0aGlzKTsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7dm9pZH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AgICAgICAvLyBlbnN1cmUgc3VwZXJjbGFzcyBpcyByZWdpc3RlcmVkIGZpcnN0LgogICAgICAgICAgICBzdXBlci5fcmVnaXN0ZXJlZCgpOwogICAgICAgICAgICAvLyBjb3B5IHByb3BlcnRpZXMgb250byB0aGUgZ2VuZXJhdGVkIGNsYXNzIGxhemlseSBpZiB3ZSdyZSBvcHRpbWl6aW5nLAogICAgICAgICAgICBpZiAobGVnYWN5T3B0aW1pemF0aW9ucykgewogICAgICAgICAgICAgIGNvcHlQcm9wZXJ0aWVzVG9Qcm90byhnZW5lcmF0ZWRQcm90byk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gbWFrZSBzdXJlIGxlZ2FjeSBsaWZlY3ljbGUgaXMgY2FsbGVkIG9uIHRoZSAqZWxlbWVudConcyBwcm90b3R5cGUKICAgICAgICAgICAgLy8gYW5kIG5vdCB0aGUgZ2VuZXJhdGVkIGNsYXNzIHByb3RvdHlwZTsgaWYgdGhlIGVsZW1lbnQgaGFzIGJlZW4KICAgICAgICAgICAgLy8gZXh0ZW5kZWQsIHRoZXNlIGFyZSAqbm90KiB0aGUgc2FtZS4KICAgICAgICAgICAgY29uc3QgcHJvdG8gPSBPYmplY3QuZ2V0UHJvdG90eXBlT2YodGhpcyk7CiAgICAgICAgICAgIGxldCBsaXN0ID0gbGlmZWN5Y2xlLmJlZm9yZVJlZ2lzdGVyOwogICAgICAgICAgICBpZiAobGlzdCkgewogICAgICAgICAgICAgIGZvciAobGV0IGk9MDsgaSA8IGxpc3QubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIGxpc3RbaV0uY2FsbChwcm90byk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGxpc3QgPSBsaWZlY3ljbGUucmVnaXN0ZXJlZDsKICAgICAgICAgICAgaWYgKGxpc3QpIHsKICAgICAgICAgICAgICBmb3IgKGxldCBpPTA7IGkgPCBsaXN0Lmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICBsaXN0W2ldLmNhbGwocHJvdG8pOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7dm9pZH0KICAgICAgICAgKi8KICAgICAgICBfYXBwbHlMaXN0ZW5lcnMoKSB7CiAgICAgICAgICBzdXBlci5fYXBwbHlMaXN0ZW5lcnMoKTsKICAgICAgICAgIGNvbnN0IGxpc3QgPSBsaWZlY3ljbGUubGlzdGVuZXJzOwogICAgICAgICAgaWYgKGxpc3QpIHsKICAgICAgICAgICAgZm9yIChsZXQgaT0wOyBpIDwgbGlzdC5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgIGNvbnN0IGxpc3RlbmVycyA9IGxpc3RbaV07CiAgICAgICAgICAgICAgaWYgKGxpc3RlbmVycykgewogICAgICAgICAgICAgICAgZm9yIChsZXQgbCBpbiBsaXN0ZW5lcnMpIHsKICAgICAgICAgICAgICAgICAgdGhpcy5fYWRkTWV0aG9kRXZlbnRMaXN0ZW5lclRvTm9kZSh0aGlzLCBsLCBsaXN0ZW5lcnNbbF0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgLy8gbm90ZTogZXhjZXB0aW9uIHRvICJzdXBlciB0aGVuIG1lIiBydWxlOwogICAgICAgIC8vIGRvIHdvcmsgYmVmb3JlIGNhbGxpbmcgc3VwZXIgc28gdGhhdCBzdXBlciBhdHRyaWJ1dGVzCiAgICAgICAgLy8gb25seSBhcHBseSBpZiBub3QgYWxyZWFkeSBzZXQuCiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7dm9pZH0KICAgICAgICAgKi8KICAgICAgICBfZW5zdXJlQXR0cmlidXRlcygpIHsKICAgICAgICAgIGNvbnN0IGxpc3QgPSBsaWZlY3ljbGUuaG9zdEF0dHJpYnV0ZXM7CiAgICAgICAgICBpZiAobGlzdCkgewogICAgICAgICAgICBmb3IgKGxldCBpPWxpc3QubGVuZ3RoLTE7IGkgPj0gMDsgaS0tKSB7CiAgICAgICAgICAgICAgY29uc3QgaG9zdEF0dHJpYnV0ZXMgPSBsaXN0W2ldOwogICAgICAgICAgICAgIGZvciAobGV0IGEgaW4gaG9zdEF0dHJpYnV0ZXMpIHsKICAgICAgICAgICAgICAgICAgdGhpcy5fZW5zdXJlQXR0cmlidXRlKGEsIGhvc3RBdHRyaWJ1dGVzW2FdKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgICAgc3VwZXIuX2Vuc3VyZUF0dHJpYnV0ZXMoKTsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4ge3ZvaWR9CiAgICAgICAgICovCiAgICAgICAgcmVhZHkoKSB7CiAgICAgICAgICBzdXBlci5yZWFkeSgpOwogICAgICAgICAgbGV0IGxpc3QgPSBsaWZlY3ljbGUucmVhZHk7CiAgICAgICAgICBpZiAobGlzdCkgewogICAgICAgICAgICBmb3IgKGxldCBpPTA7IGkgPCBsaXN0Lmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgbGlzdFtpXS5jYWxsKHRoaXMpOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHt2b2lkfQogICAgICAgICAqLwogICAgICAgIGF0dGFjaGVkKCkgewogICAgICAgICAgc3VwZXIuYXR0YWNoZWQoKTsKICAgICAgICAgIGxldCBsaXN0ID0gbGlmZWN5Y2xlLmF0dGFjaGVkOwogICAgICAgICAgaWYgKGxpc3QpIHsKICAgICAgICAgICAgZm9yIChsZXQgaT0wOyBpIDwgbGlzdC5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgIGxpc3RbaV0uY2FsbCh0aGlzKTsKICAgICAgICAgICAgfQogICAgICAgICAgfQogIC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NvbnN0cnVjdG9yLnByb3RvdHlwZSk7CiAgICAgIG5ldyBjb25zdHJ1Y3RvcigpOwogICAgICBuZXdJbnN0YW5jZSA9IG51bGw7CiAgICB9CgogICAgLyoqCiAgICAgKiBCYXNlIGNsYXNzIGZvciBUZW1wbGF0ZUluc3RhbmNlLgogICAgICogQGNvbnN0cnVjdG9yCiAgICAgKiBAZXh0ZW5kcyB7SFRNTEVsZW1lbnR9CiAgICAgKiBAaW1wbGVtZW50cyB7UG9seW1lcl9Qcm9wZXJ0eUVmZmVjdHN9CiAgICAgKiBAcHJpdmF0ZQogICAgICovCiAgICBjb25zdCB0ZW1wbGF0ZUluc3RhbmNlQmFzZSA9IFByb3BlcnR5RWZmZWN0cyhjbGFzcyB7fSk7CgogICAgZnVuY3Rpb24gc2hvd0hpZGVDaGlsZHJlbihoaWRlLCBjaGlsZHJlbikgewogICAgICBmb3IgKGxldCBpPTA7IGk8Y2hpbGRyZW4ubGVuZ3RoOyBpKyspIHsKICAgICAgICBsZXQgbiA9IGNoaWxkcmVuW2ldOwogICAgICAgIC8vIElnbm9yZSBub24tY2hhbmdlcwogICAgICAgIGlmIChCb29sZWFuKGhpZGUpICE9IEJvb2xlYW4obi5fX2hpZGVUZW1wbGF0ZUNoaWxkcmVuX18pKSB7CiAgICAgICAgICAvLyBjbGVhciBhbmQgcmVzdG9yZSB0ZXh0CiAgICAgICAgICBpZiAobi5ub2RlVHlwZSA9PT0gTm9kZS5URVhUX05PREUpIHsKICAgICAgICAgICAgaWYgKGhpZGUpIHsKICAgICAgICAgICAgICBuLl9fcG9seW1lclRleHRDb250ZW50X18gPSBuLnRleHRDb250ZW50OwogICAgICAgICAgICAgIG4udGV4dENvbnRlbnQgPSAnJzsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICBuLnRleHRDb250ZW50ID0gbi5fX3BvbHltZXJUZXh0Q29udGVudF9fOwogICAgICAgICAgICB9CiAgICAgICAgICAvLyByZW1vdmUgYW5kIHJlcGxhY2Ugc2xvdAogICAgICAgICAgfSBlbHNlIGlmIChuLmxvY2FsTmFtZSA9PT0gJ3Nsb3QnKSB7CiAgICAgICAgICAgIGlmIChoaWRlKSB7CiAgICAgICAgICAgICAgbi5fX3BvbHltZXJSZXBsYWNlZF9fID0gZG9jdW1lbnQuY3JlYXRlQ29tbWVudCgnaGlkZGVuLXNsb3QnKTsKICAgICAgICAgICAgICB3cmFwKHdyYXAobikucGFyZW50Tm9kZSkucmVwbGFjZUNoaWxkKG4uX19wb2x5bWVyUmVwbGFjZWRfXywgbik7CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgY29uc3QgcmVwbGFjZSA9IG4uX19wb2x5bWVyUmVwbGFjZWRfXzsKICAgICAgICAgICAgICBpZiAocmVwbGFjZSkgewogICAgICAgICAgICAgICAgd3JhcCh3cmFwKHJlcGxhY2UpLnBhcmVudE5vZGUpLnJlcGxhY2VDaGlsZChuLCByZXBsYWNlKTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICAgIC8vIGhpZGUgYW5kIHNob3cgbm9kZXMKICAgICAgICAgIGVsc2UgaWYgKG4uc3R5bGUpIHsKICAgICAgICAgICAgaWYgKGhpZGUpIHsKICAgICAgICAgICAgICBuLl9fcG9seW1lckRpc3BsYXlfXyA9IG4uc3R5bGUuZGlzcGxheTsKICAgICAgICAgICAgICBuLnN0eWxlLmRpc3BsYXkgPSAnbm9uZSc7CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgbi5zdHlsZS5kaXNwbGF5ID0gbi5fX3BvbHltZXJEaXNwbGF5X187CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgbi5fX2hpZGVUZW1wbGF0ZUNoaWxkcmVuX18gPSBoaWRlOwogICAgICAgIGlmIChuLl9zaG93SGlkZUNoaWxkcmVuKSB7CiAgICAgICAgICBuLl9zaG93SGlkZUNoaWxkcmVuKG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GF0dHJpYnV0ZQogICAgICAgIHRoaXMubXV0YWJsZURhdGEgPSB0cnVlOwogICAgICB9CgogICAgICAvKioKICAgICAgICogQG92ZXJyaWRlCiAgICAgICAqIEByZXR1cm4ge3ZvaWR9CiAgICAgICAqLwogICAgICBjb25uZWN0ZWRDYWxsYmFjaygpIHsKICAgICAgICBpZiAoIWhpZGVFbGVtZW50c0dsb2JhbGx5KCkpIHsKICAgICAgICAgIHRoaXMuc3R5bGUuZGlzcGxheSA9ICdub25lJzsKICAgICAgICB9CiAgICAgICAgdGhpcy5yZW5kZXIoKTsKICAgICAgfQoKICAgICAgLyoqCiAgICAgICAqIEBvdmVycmlkZQogICAgICAgKiBAcmV0dXJuIHt2b2lkfQogICAgICAgKi8KICAgICAgZGlzY29ubmVjdGVkQ2FsbGJhY2soKSB7CiAgICAgICAgdGhpcy5fX3JlbW92ZUNoaWxkcmVuKCk7CiAgICAgIH0KCiAgICAgIF9faW5zZXJ0Q2hpbGRyZW4oKSB7CiAgICAgICAgd3JhcCh3cmFwKHRoaXMpLnBhcmVudE5vZGUpLmluc2VydEJlZm9yZSh0aGlzLnJvb3QsIHRoaXMpOwogICAgICB9CgogICAgICBfX3JlbW92ZUNoaWxkcmVuKCkgewogICAgICAgIGlmICh0aGlzLl9fY2hpbGRyZW4pIHsKICAgICAgICAgIGZvciAobGV0IGk9MDsgaTx0aGlzLl9fY2hpbGRyZW4ubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgdGhpcy5yb290LmFwcGVuZENoaWxkKHRoaXMuX19jaGlsZHJlbltpXSk7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CgogICAgICAvKioKICAgICAgICogRm9yY2VzIHRoZSBlbGVtZW50IHRvIHJlbmRlciBpdHMgY29udGVudC4gVGhpcyBpcyB0eXBpY2FsbHkgb25seQogICAgICAgKiBuZWNlc3NhcnkgdG8gY2FsbCBpZiBIVE1MSW1wb3J0cyB3aXRoIHRoZSBhc3luYyBhdHRyaWJ1dG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nN0YW5jZSdzIGJpbmRpbmcKICAgICAqIHNjb3BlLCB0aHVzIHRlbXBsYXRlcyBzaG91bGQgYmluZCB0byBzdWItcHJvcGVydGllcyBvZiBgaXRlbWAuCiAgICAgKgogICAgICogRXhhbXBsZToKICAgICAqCiAgICAgKiBgYGBodG1sCiAgICAgKiA8ZG9tLW1vZHVsZSBpZD0iZW1wbG95ZWUtbGlzdCI+CiAgICAgKgogICAgICogICA8dGVtcGxhdGU+CiAgICAgKgogICAgICogICAgIDxkaXY+IEVtcGxveWVlIGxpc3Q6IDwvZGl2PgogICAgICogICAgIDxkb20tcmVwZWF0IGl0ZW1zPSJ7e2VtcGxveWVlc319Ij4KICAgICAqICAgICAgIDx0ZW1wbGF0ZT4KICAgICAqICAgICAgICAgPGRpdj5GaXJzdCBuYW1lOiA8c3Bhbj57e2l0ZW0uZmlyc3R9fTwvc3Bhbj48L2Rpdj4KICAgICAqICAgICAgICAgPGRpdj5MYXN0IG5hbWU6IDxzcGFuPnt7aXRlbS5sYXN0fX08L3NwYW4+PC9kaXY+CiAgICAgKiAgICAgICA8L3RlbXBsYXRlPgogICAgICogICAgIDwvZG9tLXJlcGVhdD4KICAgICAqCiAgICAgKiAgIDwvdGVtcGxhdGU+CiAgICAgKgogICAgICogPC9kb20tbW9kdWxlPgogICAgICogYGBgCiAgICAgKgogICAgICogV2l0aCB0aGUgZm9sbG93aW5nIGN1c3RvbSBlbGVtZW50IGRlZmluaXRpb246CiAgICAgKgogICAgICogYGBganMKICAgICAqIGNsYXNzIEVtcGxveWVlTGlzdCBleHRlbmRzIFBvbHltZXJFbGVtZW50IHsKICAgICAqICAgc3RhdGljIGdldCBpcygpIHsgcmV0dXJuICdlbXBsb3llZS1saXN0JzsgfQogICAgICogICBzdGF0aWMgZ2V0IHByb3BlcnRpZXMoKSB7CiAgICAgKiAgICAgcmV0dXJuIHsKICAgICAqICAgICAgIGVtcGxveWVlczogewogICAgICogICAgICAgICB2YWx1ZSgpIHsKICAgICAqICAgIC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ERPTSBpcyBhZGRlZCBvciByZW1vdmVkIGJ5IHRoaXMgdGVtcGxhdGUgKGJ5CiAgICAgICAgICogZGVmYXVsdCwgcmVuZGVyaW5nIG9jY3VycyBsYXppbHkpLiAgVG8gZm9yY2UgaW1tZWRpYXRlIHJlbmRlcmluZywgY2FsbAogICAgICAgICAqIGByZW5kZXJgLgogICAgICAgICAqCiAgICAgICAgICogQGV2ZW50IGRvbS1jaGFuZ2UKICAgICAgICAgKi8KICAgICAgICByZXR1cm4gewoKICAgICAgICAgIC8qKgogICAgICAgICAgICogQW4gYXJyYXkgY29udGFpbmluZyBpdGVtcyBkZXRlcm1pbmluZyBob3cgbWFueSBpbnN0YW5jZXMgb2YgdGhlIHRlbXBsYXRlCiAgICAgICAgICAgKiB0byBzdGFtcCBhbmQgdGhhdCB0aGF0IGVhY2ggdGVtcGxhdGUgaW5zdGFuY2Ugc2hvdWxkIGJpbmQgdG8uCiAgICAgICAgICAgKi8KICAgICAgICAgIGl0ZW1zOiB7CiAgICAgICAgICAgIHR5cGU6IEFycmF5CiAgICAgICAgICB9LAoKICAgICAgICAgIC8qKgogICAgICAgICAgICogVGhlIG5hbWUgb2YgdGhlIHZhcmlhYmxlIHRvIGFkZCB0byB0aGUgYmluZGluZyBzY29wZSBmb3IgdGhlIGFycmF5CiAgICAgICAgICAgKiBlbGVtZW50IGFzc29jaWF0ZWQgd2l0aCBhIGdpdmVuIHRlbXBsYXRlIGluc3RhbmNlLgogICAgICAgICAgICovCiAgICAgICAgICBhczogewogICAgICAgICAgICB0eXBlOiBTdHJpbmcsCiAgICAgICAgICAgIHZhbHVlOiAnaXRlbScKICAgICAgICAgIH0sCgogICAgICAgICAgLyoqCiAgICAgICAgICAgKiBUaGUgbmFtZSBvZiB0aGUgdmFyaWFibGUgdG8gYWRkIHRvIHRoZSBiaW5kaW5nIHNjb3BlIHdpdGggdGhlIGluZGV4CiAgICAgICAgICAgKiBvZiB0aGUgaW5zdGFuY2UgaW4gdGhlIHNvcnRlZCBhbmQgZmlsdGVyZWQgbGlzdCBvZiByZW5kZXJlZCBpdGVtcy4KICAgICAgICAgICAqIE5vdGUsIGZvciB0aGUgaW5kZXggaW4gdGhlIGB0aGlzLml0ZW1zYCBhcnJheSwgdXNlIHRoZSB2YWx1ZSBvZiB0aGUKICAgICAgICAgICAqIGBpdGVtc0luZGV4QXNgIHByb3BlcnR5LgogICAgICAgICAgICovCiAgICAgICAgICBpbmRleEFzOiB7CiAgICAgICAgICAgIHR5cGU6IFN0cmluZywKICAgICAgICAgICAgdmFsdWU6ICdpbmRleCcKICAgICAgICAgIH0sCgogICAgICAgICAgLyoqCiAgICAgICAgICAgKiBUaGUgbmFtZSBvZiB0aGUgdmFyaWFibGUgdG8gYWRkIHRvIHRoZSBiaW5kaW5nIHNjb3BlIHdpdGggdGhlIGluZGV4CiAgICAgICAgICAgKiBvZiB0aGUgaW5zdGFuY2UgaW4gdGhlIGB0aGlzLml0ZW1zYCBhcnJheS4gTm90ZSwgZm9yIHRoZSBpbmRleCBvZgogICAgICAgICAgICogdGhpcyBpbnN0YW5jZSBpbiB0aGUgc29ydGVkIGFuZCBmaWx0ZXJlZCBsaXN0IG9mIHJlbmRlcmVkIGl0ZW1zLAogICAgICAgICAgICogdXNlIHRoZSB2YWx1ZSBvZiB0aGUgYGluZGV4QXNgIHByb3BlcnR5LgogICAgICAgICAgICovCiAgICAgICAgICBpdGVtc0luZGV4QXM6IHsKICAgICAgICAgICAgdHlwZTogU3RyaW5nLAogICAgICAgICAgICB2YWx1ZTogJ2l0ZW1zSW5kZXgnCiAgICAgICAgICB9LAoKICAgICAgICAgIC8qKgogICAgICAgICAgICogQSBmdW5jdGlvbiB0aGF0IHNob3VsZCBkZXRlcm1pbmUgdGhlIHNvcnQgb3JkZXIgb2YgdGhlIGl0ZW1zLiAgVGhpcwogICAgICAgICAgICogcHJvcGVydHkgc2hvdWxkIGVpdGhlciBiZSBwcm92aWRlZCBhcyBhIHN0cmluZywgaW5kaWNhdGluZyBhI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yB0aGlzIHRvIGEgaGlnaGVyIG51bWJlciBhbGxvd3MgbG93ZXIgbGF0ZW5jeSBhbmQgaGlnaGVyCiAgICAgICAgICAgKiB0aHJvdWdocHV0IGZvciBldmVudCBoYW5kbGVycyBhbmQgb3RoZXIgdGFza3MsIGJ1dCByZXN1bHRzIGluIGEKICAgICAgICAgICAqIGxvbmdlciB0aW1lIGZvciB0aGUgcmVtYWluaW5nIGl0ZW1zIHRvIGNvbXBsZXRlIHJlbmRlcmluZy4KICAgICAgICAgICAqLwogICAgICAgICAgdGFyZ2V0RnJhbWVyYXRlOiB7CiAgICAgICAgICAgIHR5cGU6IE51bWJlciwKICAgICAgICAgICAgdmFsdWU6IDIwCiAgICAgICAgICB9LAoKICAgICAgICAgIF90YXJnZXRGcmFtZVRpbWU6IHsKICAgICAgICAgICAgdHlwZTogTnVtYmVyLAogICAgICAgICAgICBjb21wdXRlZDogJ19fY29tcHV0ZUZyYW1lVGltZSh0YXJnZXRGcmFtZXJhdGUpJwogICAgICAgICAgfSwKCiAgICAgICAgICAvKioKICAgICAgICAgICAqIFdoZW4gdGhlIGdsb2JhbCBgc3VwcHJlc3NUZW1wbGF0ZU5vdGlmaWNhdGlvbnNgIHNldHRpbmcgaXMgdXNlZCwgc2V0dGluZwogICAgICAgICAgICogYG5vdGlmeURvbUNoYW5nZTogdHJ1ZWAgd2lsbCBlbmFibGUgZmlyaW5nIGBkb20tY2hhbmdlYCBldmVudHMgb24gdGhpcwogICAgICAgICAgICogZWxlbWVudC4KICAgICAgICAgICAqLwogICAgICAgICAgbm90aWZ5RG9tQ2hhbmdlOiB7CiAgICAgICAgICAgIHR5cGU6IEJvb2xlYW4KICAgICAgICAgIH0sCgogICAgICAgICAgLyoqCiAgICAgICAgICAgKiBXaGVuIGNodW5raW5nIGlzIGVuYWJsZWQgdmlhIGBpbml0aWFsQ291bnRgIGFuZCB0aGUgYGl0ZW1zYCBhcnJheSBpcwogICAgICAgICAgICogc2V0IHRvIGEgbmV3IGFyc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ZXVzZUNodW5rZWRJbnN0YW5jZXM6IHsKICAgICAgICAgICAgdHlwZTogQm9vbGVhbgogICAgICAgICAgfQoKICAgICAgICB9OwoKICAgICAgfQoKICAgICAgc3RhdGljIGdldCBvYnNlcnZlcnMoKSB7CiAgICAgICAgcmV0dXJuIFsgJ19faXRlbXNDaGFuZ2VkKGl0ZW1zLiopJyBdOwogICAgICB9CgogICAgICBjb25zdHJ1Y3RvcigpIHsKICAgICAgICBzdXBlcigpOwogICAgICAgIHRoaXMuX19pbnN0YW5jZXMgPSBbXTsKICAgICAgICB0aGlzLl9fcmVuZGVyRGVib3VuY2VyID0gbnVsbDsKICAgICAgICB0aGlzLl9faXRlbXNJZHhUb0luc3RJZHggPSB7fTsKICAgICAgICB0aGlzLl9fY2h1bmtDb3VudCA9IG51bGw7CiAgICAgICAgdGhpcy5fX3JlbmRlclN0YXJ0VGltZSA9IG51bGw7CiAgICAgICAgdGhpcy5fX2l0ZW1zQXJyYXlDaGFuZ2VkID0gZmFsc2U7CiAgICAgICAgdGhpcy5fX3Nob3VsZE1lYXN1cmVDaHVuayA9IGZhbHNlOwogICAgICAgIHRoaXMuX19zaG91bGRDb250aW51ZUNodW5raW5nID0gZmFsc2U7CiAgICAgICAgdGhpcy5fX2NodW5raW5nSWQgPSAwOwogICAgICAgIHRoaXMuX19zb3J0Rm4gPSBudWxsOwogICAgICAgIHRoaXMuX19maWx0ZXJGbiA9IG51bGw7CiAgICAgICAgdGhpcy5fX29ic2VydmVQYXRocyA9IG51bGw7CiAgICAgICAgLyoqIEB0eXBlIHs/ZnVuY3Rpb24obmV3OlRlbXBsYXRlSW5zdGFuY2VCYXNlLCBPYmplY3Q9KX0gKi8KICAgICAgICB0aGlzLl9fY3RvciA9IG51bGw7CiAgICAgICAgdGhpcy5fX2lzRGV0YWNoZWQgPSB0cnVlOwogICAgICAgIHRoaXMudGVtcGxhdGUgPSBudWxsOwogICAgICAgIC8qKiBAdHlwZSB7VGVtcGxhdGVJbmZvfSAqLwogICAgICAgIHRoaXMuX3RlbXBsYXRlSW5mbzsKICAgICAgfQoKICAgICAgLyoqCiAgICAgICAqIEBvdmVycmlkZQogICAgICAgKiBAcmV0dXJuIHt2b2lkfQogICAgICAgKi8KICAgICAgZGlzY29ubmVjdGVkQ2FsbGJhY2soKSB7CiAgICAgICAgc3VwZXIuZGlzY29ubmVjdGVkQ2FsbGJhY2soKTsKICAgICAgICB0aGlzLl9faXNEZXRhY2hlZCA9IHRydWU7CiAgICAgICAgZm9yIChsZXQgaT0wOyBpPHRoaXMuX19pbnN0YW5jZXMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgIHRoaXMuX19kZXRhY2hJbnN0YW5jZShpKTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIC8qKgogICAgICAgKiBAb3ZlcnJpZGUKICAgICAgICogQHJldHVybiB7dm9pZH0KICAgICAgICovCiAgICAgIGNvbm5lY3RlZENhbGxiYWNrKCkgewogICAgICAgIHN1cGVyLmNvbm5lY3RlZENhbGxiYWNrKCk7CiAgICAgICAgaWYgKCFoaWRlRWxlbWVudHNHbG9iYWxseSgpKSB7CiAgICAgICAgICB0aGlzLnN0eWxlLmRpc3BsYXkgPSAnbm9uZSc7CiAgICAgICAgfQogICAgICAgIC8vIG9ubHkgcGVyZm9ybSBhdHRhY2htZW50IGlmIHRoZSBlbGVtZW50IHdhcyBwcmV2aW91c2x5IGRldGFjaGVkLgogICAgICAgIGlmICh0aGlzLl9faXNEZXRhY2hlZCkgewogICAgICAgICAgdGhpcy5fX2lzRGV0YWNoZWQgPSBmYWxzZTsKICAgICAgICAgIGxldCB3cmFwcGVkUGFyZW50ID0gd3JhcCh3cmFwKHRoaXMpLnBhcmVudE5vZGUpOwogICAgICAgICAgZm9yIChsZXQgaT0wOyBpPHRoaXMuX19pbnN0YW5jZXMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgdGhpcy5fX2F0dGFjaEluc3RhbmNlKGksIHdyYXBwZWRQYXJlbnQpOwogICAgICA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qKgogICAgICAgICAgICAgKiBAdGhpcyB7RG9tUmVwZWF0fQogICAgICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gcHJvcCBQcm9wZXJ0eSB0byBzZXQKICAgICAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBWYWx1ZSB0byBzZXQgcHJvcGVydHkgdG8KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGZvcndhcmRIb3N0UHJvcDogZnVuY3Rpb24ocHJvcCwgdmFsdWUpIHsKICAgICAgICAgICAgICBsZXQgaSQgPSB0aGlzLl9faW5zdGFuY2VzOwogICAgICAgICAgICAgIGZvciAobGV0IGk9MCwgaW5zdDsgKGk8aSQubGVuZ3RoKSAmJiAoaW5zdD1pJFtpXSk7IGkrKykgewogICAgICAgICAgICAgICAgaW5zdC5mb3J3YXJkSG9zdFByb3AocHJvcCwgdmFsdWUpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSwKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEB0aGlzIHtEb21SZXBlYXR9CiAgICAgICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBpbnN0IEluc3RhbmNlIHRvIG5vdGlmeQogICAgICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gcHJvcCBQcm9wZXJ0eSB0byBub3RpZnkKICAgICAgICAgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBWYWx1ZSB0byBub3RpZnkKICAgICAgICAgICAgICovCiAgICAgICAgICAgIG5vdGlmeUluc3RhbmNlUHJvcDogZnVuY3Rpb24oaW5zdCwgcHJvcCwgdmFsdWUpIHsKICAgICAgICAgICAgICBpZiAobWF0Y2hlcyh0aGlzLmFzLCBwcm9wKSkgewogICAgICAgICAgICAgICAgbGV0IGlkeCA9IGluc3RbdGhpcy5pdGVtc0luZGV4QXNdOwogICAgICAgICAgICAgICAgaWYgKHByb3AgPT0gdGhpcy5hcykgewogICAgICAgICAgICAgICAgICB0aGlzLml0ZW1zW2lkeF0gPSB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NlZCBpbnRvIGNvbmNyZXRlCiAgICAgKiAgIGltcGxlbWVudGF0aW9uLgogICAgICovCiAgICBjbGFzcyBEb21JZkJhc2UgZXh0ZW5kcyBQb2x5bWVyRWxlbWVudCB7CgogICAgICAvLyBOb3QgbmVlZGVkIHRvIGZpbmQgdGVtcGxhdGU7IGNhbiBiZSByZW1vdmVkIG9uY2UgdGhlIGFuYWx5emVyCiAgICAgIC8vIGNhbiBmaW5kIHRoZSB0YWcgbmFtZSBmcm9tIGN1c3RvbUVsZW1lbnRzLmRlZmluZSBjYWxsCiAgICAgIHN0YXRpYyBnZXQgaXMoKSB7IHJldHVybiAnZG9tLWlmJzsgfQoKICAgICAgc3RhdGljIGdldCB0ZW1wbGF0ZSgpIHsgcmV0dXJuIG51bGw7IH0KCiAgICAgIHN0YXRpYyBnZXQgcHJvcGVydGllcygpIHsKCiAgICAgICAgcmV0dXJuIHsKCiAgICAgICAgICAvKioKICAgICAgICAgICAqIEZpcmVkIHdoZW5ldmVyIERPTSBpcyBhZGRlZCBvciByZW1vdmVkL2hpZGRlbiBieSB0aGlzIHRlbXBsYXRlIChieQogICAgICAgICAgICogZGVmYXVsdCwgcmVuZGVyaW5nIG9jY3VycyBsYXppbHkpLiAgVG8gZm9yY2UgaW1tZWRpYXRlIHJlbmRlcmluZywgY2FsbAogICAgICAgICAgICogYHJlbmRlcmAuCiAgICAgICAgICAgKgogICAgICAgICAgICogQGV2ZW50IGRvbS1jaGFuZ2UKICAgICAgICAgICAqLwoKICAgICAgICAgIC8qKgogICAgICAgICAgICogQSBib29sZWFuIGluZGljYXRpbmcgd2hldGhlciB0aGlzIHRlbXBsYXRlIHNob3VsZCBzdGFtcC4KICAgICAgICAgICAqLwogICAgICAgICAgaWY6IHsKICAgICAgICAgICAgdHlwZTogQm9vbGVhbiwKICAgICAgICAgICAgb2JzZXJ2ZXI6ICdfX2RlYm91bmNlUmVuZGVyJwogICAgICAgICAgfSwKCiAgICAgICAgICAvKioKICAgICAgICAgICAq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gICAgIH0KICAgICAgICAgIC8vIEZpbmQgdGhlIHRlbXBsYXRlICh3aGVuIGZhbHNlLCB0aGVyZSB3YXMgbm8gdGVtcGxhdGUgeWV0KQogICAgICAgICAgaWYgKCF0aGlzLl9fZW5zdXJlVGVtcGxhdGUoKSkgewogICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICB9CiAgICAgICAgICB0aGlzLl9fY3JlYXRlQW5kSW5zZXJ0SW5zdGFuY2UocGFyZW50Tm9kZSk7CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgIC8vIE1vdmUgaW5zdGFuY2UgY2hpbGRyZW4gaWYgbmVjZXNzYXJ5CiAgICAgICAgICBsZXQgY2hpbGRyZW4gPSB0aGlzLl9fZ2V0SW5zdGFuY2VOb2RlcygpOwogICAgICAgICAgaWYgKGNoaWxkcmVuICYmIGNoaWxkcmVuLmxlbmd0aCkgewogICAgICAgICAgICAvLyBEZXRlY3QgY2FzZSB3aGVyZSBkb20taWYgd2FzIHJlLWF0dGFjaGVkIGluIG5ldyBwb3NpdGlvbgogICAgICAgICAgICBsZXQgbGFzdENoaWxkID0gd3JhcCh0aGlzKS5wcmV2aW91c1NpYmxpbmc7CiAgICAgICAgICAgIGlmIChsYXN0Q2hpbGQgIT09IGNoaWxkcmVuW2NoaWxkcmVuLmxlbmd0aC0xXSkgewogICAgICAgICAgICAgIGZvciAobGV0IGk9MCwgbjsgKGk8Y2hpbGRyZW4ubGVuZ3RoKSAmJiAobj1jaGlsZHJlbltpXSk7IGkrKykgewogICAgICAgICAgICAgICAgd3JhcChwYXJlbnROb2RlKS5pbnNlcnRCZWZvcmUobiwgdGhpcyk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiB0cnVlOwogICAgICB9CgogICAgICAvKioKICAgICAgICogRm9yY2VzIHRoZSBlbGVtZW50IHRvIHJlbmRlciBpdHMgY29udGVudC4gTm9ybWFsbHkg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ICAgICAgLy8gTm8gdGVtcGxhdGUgZm91bmQgeWV0CiAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgIH0KICAgICAgICB9IGVsc2UgaWYgKHRoaXMucmVzdGFtcCkgewogICAgICAgICAgdGhpcy5fX3RlYXJkb3duSW5zdGFuY2UoKTsKICAgICAgICB9CiAgICAgICAgdGhpcy5fc2hvd0hpZGVDaGlsZHJlbigpOwogICAgICAgIGlmICgoIXN1cHByZXNzVGVtcGxhdGVOb3RpZmljYXRpb25zIHx8IHRoaXMubm90aWZ5RG9tQ2hhbmdlKQogICAgICAgICAgICAmJiB0aGlzLmlmICE9IHRoaXMuX2xhc3RJZikgewogICAgICAgICAgdGhpcy5kaXNwYXRjaEV2ZW50KG5ldyBDdXN0b21FdmVudCgnZG9tLWNoYW5nZScsIHsKICAgICAgICAgICAgYnViYmxlczogdHJ1ZSwKICAgICAgICAgICAgY29tcG9zZWQ6IHRydWUKICAgICAgICAgIH0pKTsKICAgICAgICAgIHRoaXMuX2xhc3RJZiA9IHRoaXMuaWY7CiAgICAgICAgfQogICAgICB9CgogICAgICAvLyBJZGVhbGx5IHRoZXNlIHdvdWxkIGJlIGFubm90YXRlZCBhcyBhYnN0cmFjdCBtZXRob2RzIGluIGFuIGFic3RyYWN0IGNsYXNzLAogICAgICAvLyBidXQgY2xvc3VyZSBjb21waWxlciBpcyBmaW5uaWNreQogICAgICAvKiBlc2xpbnQtZGlzYWJsZSB2YWxpZC1qc2RvYyAqLwogICAgICAvKioKICAgICAgICogQWJzdHJhY3QgQVBJIHRvIGJlIGltcGxlbWVudGVkIGJ5IHN1YmNsYXNzOiBSZXR1cm5zIHRydWUgaWYgYSB0ZW1wbGF0ZQogICAgICAgKiBpbnN0YW5jZSBoYXMgYmVlbiBjcmVhdGVkIGFuZCBpbnNlcnRlZC4KICAgICAgICoKICAgICAgICogQHByb3RlY3RlZAogICAgICAgKiBAcmV0dXJuIHtib29sZWFufSBUcnVlIHdoZW4gYW4gaW5zdGFuY2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SBmb3IgbGF0ZXIgcmVtb3ZpbmcgaXQgdXNpbmcgdGhlIGBfcmVtb3ZlQm91bmREb21gIG1ldGhvZC4KICAgICAqLwogICAgY2xhc3MgRG9tSWZGYXN0IGV4dGVuZHMgRG9tSWZCYXNlIHsKCiAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgIHN1cGVyKCk7CiAgICAgICAgdGhpcy5fX2luc3RhbmNlID0gbnVsbDsKICAgICAgICB0aGlzLl9fc3luY0luZm8gPSBudWxsOwogICAgICB9CgogICAgICAvKioKICAgICAgICogSW1wbGVtZW50YXRpb24gb2YgYWJzdHJhY3QgQVBJIG5lZWRlZCBieSBEb21JZkJhc2UuCiAgICAgICAqCiAgICAgICAqIEBvdmVycmlkZQogICAgICAgKiBAcmV0dXJuIHtib29sZWFufSBUcnVlIHdoZW4gYW4gaW5zdGFuY2UgaGFzIGJlZW4gY3JlYXRlZC4KICAgICAgICovCiAgICAgIF9faGFzSW5zdGFuY2UoKSB7CiAgICAgICAgcmV0dXJuIEJvb2xlYW4odGhpcy5fX2luc3RhbmNlKTsKICAgICAgfQoKICAgICAgLyoqCiAgICAgICAqIEltcGxlbWVudGF0aW9uIG9mIGFic3RyYWN0IEFQSSBuZWVkZWQgYnkgRG9tSWZCYXNlLgogICAgICAgKgogICAgICAgKiBAb3ZlcnJpZGUKICAgICAgICogQHJldHVybiB7QXJyYXk8Tm9kZT59IEFycmF5IG9mIGNoaWxkIG5vZGVzIHN0YW1wZWQgZnJvbSB0aGUgdGVtcGxhdGUKICAgICAgICogaW5zdGFuY2UuCiAgICAgICAqLwogICAgICBfX2dldEluc3RhbmNlTm9kZXMoKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuX19pbnN0YW5jZS50ZW1wbGF0ZUluZm8uY2hpbGROb2RlczsKICAgICAgfQoKICAgICAgLyoqCiAgICAgICAqIEltcGxlbWVudGF0aW9uIG9mIGFic3RyYWN0IEFQSSBuZWVkZWQgYnkgRG9tSWZCYXNlLgogICAg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oJ29iai5mb28nLCB2KWAsIGJ1dAogICAgICAgICAgICAgICAgLy8gbm90ZSB0aGF0IHBhdGggbm90aWZpY2F0aW9ucyBsaWtlIGBzZXQoJ29iai5mb28uYmFyJywgdilgIHdpbGwKICAgICAgICAgICAgICAgIC8vIG5vdCBwcm9wYWdhdGUuIFNpbmNlIGJhdGNoZWQgcGF0aCBub3RpZmljYXRpb25zIGFyZSBub3QKICAgICAgICAgICAgICAgIC8vIHN1cHBvcnRlZCwgd2UgY2Fubm90IHNpbXBseSBhY2N1bXVsYXRlIHBhdGggbm90aWZpY2F0aW9ucy4gVGhpcwogICAgICAgICAgICAgICAgLy8gaXMgZXF1aXZhbGVudCB0byB0aGUgbm9uLWZhc3REb21JZiBjYXNlLCB3aGljaCBzdG9yZXMgcm9vdChwKSBpbgogICAgICAgICAgICAgICAgLy8gX19pbnZhbGlkUHJvcHMuCiAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IHAgaW4gY2hhbmdlZFByb3BzKSB7CiAgICAgICAgICAgICAgICAgIGNvbnN0IHJvb3RQcm9wID0gcm9vdChwKTsKICAgICAgICAgICAgICAgICAgc3luY0luZm8uY2hhbmdlZFByb3BzW3Jvb3RQcm9wXSA9IHRoaXMuX19kYXRhSG9zdFtyb290UHJvcF07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIE9iamVjdC5hc3NpZ24oc3luY0luZm8uY2hhbmdlZFByb3BzLCBjaGFuZ2VkUHJvcHMpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgLy8gU3RhbXAgdGhlIHRlbXBsYXRlLCBhbmQgc2V0IGl0cyBEb2N1bWVudEZyYWdtZW50IHRvIHRoZSAiaW5zdGFuY2UiCiAgICAgICAgdGhpcy5fX2luc3RhbmNlID0gaG9zdC5fc3RhbXBUZW1wbGF0ZSgKICAgICAgICAgICAgLyoqIEB0eXB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AgIHRoaXMuX19zeW5jSG9zdFByb3BlcnRpZXMoKTsKICAgICAgICB9CiAgICAgIH0KICAgIH0KCiAgICAvKioKICAgICAqIFRoZSAibGVnYWN5IiBpbXBsZW1lbnRhdGlvbiBvZiBgZG9tLWlmYCwgaW1wbGVtZW50ZWQgdXNpbmcgYFRlbXBsYXRpemVyYC4KICAgICAqCiAgICAgKiBJbiB0aGlzIHZlcnNpb24sIGB0aGlzLl9faW5zdGFuY2VgIGlzIHRoZSBgVGVtcGxhdGVJbnN0YW5jZWAgcmV0dXJuZWQKICAgICAqIGZyb20gdGhlIHRlbXBsYXRpemVkIGNvbnN0cnVjdG9yLgogICAgICovCiAgICBjbGFzcyBEb21JZkxlZ2FjeSBleHRlbmRzIERvbUlmQmFzZSB7CgogICAgICBjb25zdHJ1Y3RvcigpIHsKICAgICAgICBzdXBlcigpOwogICAgICAgIHRoaXMuX19jdG9yID0gbnVsbDsKICAgICAgICB0aGlzLl9faW5zdGFuY2UgPSBudWxsOwogICAgICAgIHRoaXMuX19pbnZhbGlkUHJvcHMgPSBudWxsOwogICAgICB9CgogICAgICAvKioKICAgICAgICogSW1wbGVtZW50YXRpb24gb2YgYWJzdHJhY3QgQVBJIG5lZWRlZCBieSBEb21JZkJhc2UuCiAgICAgICAqCiAgICAgICAqIEBvdmVycmlkZQogICAgICAgKiBAcmV0dXJuIHtib29sZWFufSBUcnVlIHdoZW4gYW4gaW5zdGFuY2UgaGFzIGJlZW4gY3JlYXRlZC4KICAgICAgICovCiAgICAgIF9faGFzSW5zdGFuY2UoKSB7CiAgICAgICAgcmV0dXJuIEJvb2xlYW4odGhpcy5fX2luc3RhbmNlKTsKICAgICAgfQoKICAgICAgLyoqCiAgICAgICAqIEltcGxlbWVudGF0aW9uIG9mIGFic3RyYWN0IEFQSSBuZWVkZWQgYnkgRG9tSWZCYXNlLgogICAgICAgKgogICAgICAgKiBAb3ZlcnJpZGUKICAgICAgICogQHJldHVybiB7QXJyYXk8Tm9kZT59IEFycm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hdGUpLCB0aGlzLCB7CiAgICAgICAgICAgICAgICAvLyBkb20taWYgdGVtcGxhdGl6ZXIgaW5zdGFuY2VzIHJlcXVpcmUgYG11dGFibGU6IHRydWVgLCBhcwogICAgICAgICAgICAgICAgLy8gYF9fc3luY0hvc3RQcm9wZXJ0aWVzYCByZWxpZXMgb24gdGhhdCBiZWhhdmlvciB0byBzeW5jIG9iamVjdHMKICAgICAgICAgICAgICAgIG11dGFibGVEYXRhOiB0cnVlLAogICAgICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gcHJvcCBQcm9wZXJ0eSB0byBmb3J3YXJkCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFZhbHVlIG9mIHByb3BlcnR5CiAgICAgICAgICAgICAgICAgKiBAdGhpcyB7RG9tSWZMZWdhY3l9CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIGZvcndhcmRIb3N0UHJvcDogZnVuY3Rpb24ocHJvcCwgdmFsdWUpIHsKICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX19pbnN0YW5jZSkgewogICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmlmKSB7CiAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9faW5zdGFuY2UuZm9yd2FyZEhvc3RQcm9wKHByb3AsIHZhbHVlKTsKICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgLy8gSWYgd2UgaGF2ZSBhbiBpbnN0YW5jZSBidXQgYXJlIHNxdWVsY2hpbmcgaG9zdCBwcm9wZXJ0eQogICAgICAgICAgICAgICAgICAgICAgLy8gZm9yd2FyZGluZyBkdWUgdG8gaWYgYmVpbmcgZmFsc2UsIG5vdGUgdGhlIGludmFsaWRhdGVkCiAgICAgICAgICAgICAgICAgICAgICAvLyBwcm9wZXJ0aWVzIHNvIGBfX3N5bmNIb3N0UHJvcGVydGllc2AgY2FuIHN5bmMgdGhlbSB0aGUgbmV4dAogICAgICAgICAgICAgICAgICAgICAgLy8gdGltZSBgaWZgIGJlY29tZXMgdHJ1ZQogICAgICAgICAgICAgICAgICAgICAgdGhpcy5fX2ludmFsaWRQcm9wcyA9CiAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fX2ludmFsaWRQcm9wcyB8fCBPYmplY3QuY3JlYXRlKG51bGwpOwogICAgICAgICAgICAgICAgICAgICAgdGhpcy5fX2ludmFsaWRQcm9wc1tyb290KHByb3ApXSA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIC8vIENyZWF0ZSBhbmQgaW5zZXJ0IHRoZSBpbnN0YW5jZQogICAgICAgIHRoaXMuX19pbnN0YW5jZSA9IG5ldyB0aGlzLl9fY3RvcigpOwogICAgICAgIHdyYXAocGFyZW50Tm9kZSkuaW5zZXJ0QmVmb3JlKHRoaXMuX19pbnN0YW5jZS5yb290LCB0aGlzKTsKICAgICAgfQoKICAgICAgLyoqCiAgICAgICAqIEltcGxlbWVudGF0aW9uIG9mIGFic3RyYWN0IEFQSSBuZWVkZWQgYnkgRG9tSWZCYXNlLgogICAgICAgKgogICAgICAgKiBSZW1vdmVzIHRoZSBpbnN0YW5jZSBhbmQgYW55IG5vZGVzIGl0IGNyZWF0ZWQuCiAgICAgICAqCiAgICAgICAqIEBvdmVycmlkZQogICAgICAgKiBAcmV0dXJuIHt2b2lkfQogICAgICAgKi8KICAgICAgX190ZWFyZG93bkluc3RhbmNlKCkgewogICAgICAgIGlmICh0aGlzLl9faW5zdGFuY2UpIHsKICAgICAgICAgIGxldCBjJCA9IHRoaXMuX19pbnN0YW5jZS5jaGlsZHJlbjsKICAgICAgICAgIGlmIChjJCAmJiBjJC5sZW5ndGgpIHsKICAgICAgICAgICAgLy8gdXNlIGZpcnN0IGNoaWxkIHBhcmVudCwgZm9yIGNhc2Ugd2hlbiBkb20taWYgbWF5IGhhdmUgYmVlbiBkZXRhY2hlZAogICAgICAgICAgICBsZXQgcGFyZW50ID0gd3JhcChjJFswXSkucGFyZW50Tm9kZTsKICAgICAgICAgICAgLy8gSW5zdGFuY2UgY2hpbGRyZW4gbWF5IGJlIGRpc2Nvbm5lY3RlZCBmcm9tIHBhcmVudHMgd2hlbiBkb20taWYKICAgICAgICAgICAgLy8gZGV0YWNoZXMgaWYgYSB0cmVlIHdhcyBpbm5lckhUTUwnZWQKICAgICAgICAgICAgaWYgKHBhcmVudCkgewogICAgICAgICAgICAgIHBhcmVudCA9IHdyYXAocGFyZW50KTsKICAgICAgICAgICAgICBmb3IgKGxldCBpPTAsIG47IChpPGMkLmxlbmd0aCkgJiYgKG49YyRbaV0pOyBpKyspIHsKICAgICAgICAgICAgICAgIHBhcmVudC5yZW1vdmVDaGlsZChuKTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICAgIHRoaXMuX19pbnZhbGlkUHJvcHMgPSBudWxsOwogICAgICAgICAgdGhpcy5fX2luc3RhbmNlID0gbnVsbDsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIC8qKgogICAgICAgKiBGb3J3YXJkcyBhbnkgcHJvcGVydGllcyB0aGF0IGNoYW5nZWQgd2hpbGUgdGhlIGBpZmAgd2FzIGZhbHNlIGludG8gdGhlCiAgICAgICAqIHRlbXBsYXRlIGluc3RhbmNlIGFuZCBmbHVzaGVzIGl0LgogICAgICAgKgogICAgICAgKiBAcmV0dXJuIHt2b2lkfQogICAgICAgKi8KICAgICAgX19zeW5jSG9zdFByb3BlcnRpZXMoKSB7CiAgICAgICAgbGV0IHByb3BzID0gdGhpcy5fX2ludmFsaWRQcm9wczsKICAgICAgICBpZiAocHJvcHMpIHsKICAgICAgICAgIHRoaXMuX19pbnZhbGlkUHJvcHMgPSBudWxsOwogICAgICAgICAgZm9yIChsZXQgcHJvcCBpbiBw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zZWxlY3Rpb24gd2lsbCBiZSBtYWRlLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgaXRlbXM6IHsKICAgICAgICAgICAgICB0eXBlOiBBcnJheSwKICAgICAgICAgICAgfSwKCiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBXaGVuIGB0cnVlYCwgbXVsdGlwbGUgaXRlbXMgbWF5IGJlIHNlbGVjdGVkIGF0IG9uY2UgKGluIHRoaXMgY2FzZSwKICAgICAgICAgICAgICogYHNlbGVjdGVkYCBpcyBhbiBhcnJheSBvZiBjdXJyZW50bHkgc2VsZWN0ZWQgaXRlbXMpLiAgV2hlbiBgZmFsc2VgLAogICAgICAgICAgICAgKiBvbmx5IG9uZSBpdGVtIG1heSBiZSBzZWxlY3RlZCBhdCBhIHRpbWUuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICBtdWx0aTogewogICAgICAgICAgICAgIHR5cGU6IEJvb2xlYW4sCiAgICAgICAgICAgICAgdmFsdWU6IGZhbHNlLAogICAgICAgICAgICB9LAoKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFdoZW4gYG11bHRpYCBpcyB0cnVlLCB0aGlzIGlzIGFuIGFycmF5IHRoYXQgY29udGFpbnMgYW55IHNlbGVjdGVkLgogICAgICAgICAgICAgKiBXaGVuIGBtdWx0aWAgaXMgZmFsc2UsIHRoaXMgaXMgdGhlIGN1cnJlbnRseSBzZWxlY3RlZCBpdGVtLCBvciBgbnVsbGAKICAgICAgICAgICAgICogaWYgbm8gaXRlbSBpcyBzZWxlY3RlZC4KICAgICAgICAgICAgICogQHR5cGUgez9PYmplY3R8P0FycmF5PCFPYmplY3Q+fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgc2VsZWN0ZWQ6IHt0eXBlOiBPYmplY3QsIG5vdGlmeTogdHJ1ZX0sCgogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogV2hlbiBgbXVsdGlgIGlzIGZhbHNlLCB0aGlzIGlzIHRoZSBjdXJ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2VzCiAgICAgICAgICAgIHRoaXMuX19hcHBseVNwbGljZXMoaXRlbXNJbmZvLnZhbHVlLmluZGV4U3BsaWNlcyk7CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAvLyBDYXNlIDMgLSBhbiBhcnJheSBlbGVtZW50IHdhcyBjaGFuZ2VkLCBzbyBkZXNlbGVjdCB0aGUgcHJldmlvdXMKICAgICAgICAgICAgLy8gaXRlbSBmb3IgdGhhdCBpbmRleCBpZiBpdCB3YXMgcHJldmlvdXNseSBzZWxlY3RlZAogICAgICAgICAgICBsZXQgcGFydCA9IHBhdGguc2xpY2UoYCR7SlNDb21waWxlcl9yZW5hbWVQcm9wZXJ0eSgnaXRlbXMnLCB0aGlzKX0uYC5sZW5ndGgpOwogICAgICAgICAgICBsZXQgaWR4ID0gcGFyc2VJbnQocGFydCwgMTApOwogICAgICAgICAgICBpZiAoKHBhcnQuaW5kZXhPZignLicpIDwgMCkgJiYgcGFydCA9PSBpZHgpIHsKICAgICAgICAgICAgICB0aGlzLl9fZGVzZWxlY3RDaGFuZ2VkSWR4KGlkeCk7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIF9fYXBwbHlTcGxpY2VzKHNwbGljZXMpIHsKICAgICAgICAgIGxldCBzZWxlY3RlZCA9IHRoaXMuX19zZWxlY3RlZE1hcDsKICAgICAgICAgIC8vIEFkanVzdCBzZWxlY3RlZCBpbmRpY2VzIGFuZCBtYXJrIHJlbW92YWxzCiAgICAgICAgICBmb3IgKGxldCBpPTA7IGk8c3BsaWNlcy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICBsZXQgcyA9IHNwbGljZXNbaV07CiAgICAgICAgICAgIHNlbGVjdGVkLmZvckVhY2goKGlkeCwgaXRlbSkgPT4gewogICAgICAgICAgICAgIGlmIChpZHggPCBzLmluZGV4KSA7IGVsc2UgaWYgKGlkeCA+PSBzLmluZGV4ICsgcy5yZW1vdmVkLmxlbmd0aCkgewogICAgICAgICAgICAgICAgLy8gYWRqdXN0IGluZGV4CiAgICAgICAgICAgICAgICBzZWxlY3RlZC5zZXQoaXRlbSwgaWR4ICsgcy5hZGRlZENvdW50IC0gcy5yZW1vdmVkLmxlbmd0aCk7CiAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIC8vIHJlbW92ZSBpbmRleAogICAgICAgICAgICAgICAgc2VsZWN0ZWQuc2V0KGl0ZW0sIC0xKTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBmb3IgKGxldCBqPTA7IGo8cy5hZGRlZENvdW50OyBqKyspIHsKICAgICAgICAgICAgICBsZXQgaWR4ID0gcy5pbmRleCArIGo7CiAgICAgICAgICAgICAgaWYgKHNlbGVjdGVkLmhhcyh0aGlzLml0ZW1zW2lkeF0pKSB7CiAgICAgICAgICAgICAgICBzZWxlY3RlZC5zZXQodGhpcy5pdGVtc1tpZHhdLCBpZHgpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgICAgLy8gVXBkYXRlIGxpbmtlZCBwYXRocwogICAgICAgICAgdGhpcy5fX3VwZGF0ZUxpbmtzKCk7CiAgICAgICAgICAvLyBSZW1vdmUgc2VsZWN0ZWQgaXRlbXMgdGhhdCB3ZXJlIHJlbW92ZWQgZnJvbSB0aGUgaXRlbXMgYXJyYXkKICAgICAgICAgIGxldCBzaWR4ID0gMDsKICAgICAgICAgIHNlbGVjdGVkLmZvckVhY2goKGlkeCwgaXRlbSkgPT4gewogICAgICAgICAgICBpZiAoaWR4IDwgMCkgewogICAgICAgICAgICAgIGlmICh0aGlzLm11bHRpKSB7CiAgICAgICAgICAgICAgICB0aGlzLnNwbGljZShKU0NvbXBpbGVyX3JlbmFtZVByb3BlcnR5KCdzZWxlY3RlZCcsIHRoaXMpLCBzaWR4LCAxKTsKICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5zZWxlY3RlZCA9IHRoaXMuc2VsZWN0ZWRJdGVtID0gbnVsbDsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgc2VsZWN0ZWQuZGVsZXRlKGl0ZW0pOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgIHNpZHgrKzsKICAgICAgICAgICAgfQogICAgICAgICAgfSk7CiAgICAgICAgfQoKICAgICAgICBfX3VwZGF0ZUxpbmtzKCkgewogICAgICAgICAgdGhpcy5fX2RhdGFMaW5rZWRQYXRocyA9IHt9OwogICAgICAgICAgaWYgKHRoaXMubXVsdGkpIHsKICAgICAgICAgICAgbGV0IHNpZHggPSAwOwogICAgICAgICAgICB0aGlzLl9fc2VsZWN0ZWRNYXAuZm9yRWFjaChpZHggPT4gewogICAgICAgICAgICAgIGlmIChpZHggPj0gMCkgewogICAgICAgICAgICAgICAgdGhpcy5saW5rUGF0aHMoCiAgICAgICAgICAgICAgICAgICAgYCR7SlNDb21waWxlcl9yZW5hbWVQcm9wZXJ0eSgnaXRlbXMnLCB0aGlzKX0uJHtpZHh9YCwKICAgICAgICAgICAgICAgICAgICBgJHtKU0NvbXBpbGVyX3JlbmFtZVByb3BlcnR5KCdzZWxlY3RlZCcsIHRoaXMpfS4ke3NpZHgrK31gKTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgdGhpcy5fX3NlbGVjdGVkTWFwLmZvckVhY2goaWR4ID0+IHsKICAgICAgICAgICAgICB0aGlzLmxpbmtQYXRocygKICAgICAgICAgICAgICAgICAgSlNDb21waWxlcl9yZW5hbWVQcm9wZXJ0eSgnc2VsZWN0ZWQnLCB0aGlzKSwKICAgICAgICAgICAgICAgICAgYCR7SlNDb21waWxlcl9yZW5hbWVQcm9wZXJ0eSgnaXRlbXMnLCB0aGlzKX0uJHtpZHh9YCk7CiAgICAgICAgICAgICAgdGhpcy5saW5rUGF0aHMoCiAgICAgICAgICAgICAgICAgIEpTQ29tcGlsZXJfcmVuYW1lUHJvcGVydHkoJ3NlbGVjdGVkSXRlbScsIHRoaXMpLAogICAgICAgICAgICAgICAgICBgJHtKU0NvbXBpbGVyX3JlbmFtZVByb3BlcnR5KCdpdGVtcycsIHRoaXMpfS4ke2lkeH1gKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICAvKioKICAgICAgICAgKiBDbGVhcnMgdGhlIHNlbGVjdGlvbiBzdGF0ZS4KICAgICAgICAgKiBAb3ZlcnJpZGUKICAgICAgICAgKiBAcmV0dXJuIHt2b2lkfQogICAgICAgICAqLwogICAgICAgIGNsZWFyU2VsZWN0aW9uKCkgewogICAgICAgICAgLy8gVW5iaW5kIHByZXZpb3VzIHNlbGVjdGlvbgogICAgICAgICAgdGhpcy5fX2RhdGFMaW5rZWRQYXRocyA9IHt9OwogICAgICAgICAgLy8gVGhlIHNlbGVjdGVkIG1hcCBzdG9yZXMgMyBwaWVjZXMgb2YgaW5mb3JtYXRpb246CiAgICAgICAgICAvLyBrZXk6IGl0ZW1zIGFycmF5IG9iamVjdAogICAgICAgICAgLy8gdmFsdWU6IGl0ZW1zIGFycmF5IGluZGV4CiAgICAgICAgICAvLyBvcmRlcjogc2VsZWN0ZWQgYXJyYXkgaW5kZXgKICAgICAgICAgIHRoaXMuX19zZWxlY3RlZE1hcCA9IG5ldyBNYXAoKTsKICAgICAgICAgIC8vIEluaXRpYWxpemUgc2VsZWN0aW9uCiAgICAgICAgICB0aGlzLnNlbGVjdGVkID0gdGhpcy5tdWx0aSA/IFtdIDogbnVsbDsKICAgICAgICAgIHRoaXMuc2VsZWN0ZWRJdGVtID0gbnVsbDsKICAgICAgICB9CgogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgd2hldGhlciB0aGUgaXRlbSBpcyBjdXJyZW50bHkgc2VsZWN0ZWQuCiAgICAgICAgICoKICAgICAgICAgKiBAb3ZlcnJpZGUKICAgICAgICAgKiBAcGFyYW0geyp9IGl0ZW0gSXRlbSBmcm9tIGBpdGVtc2AgYXJyYXkgdG8gdGVzdAogICAgICAgICAqIEByZXR1cm4ge2Jvb2xlYW59IFdoZXRoZXIgdGhlIGl0ZW0gaXMgc2VsZWN0ZWQKICAgICAgICAgKi8KICAgICAgICBpc1NlbGVjdGVkKGl0ZW0pIHsKICAgICAgICAgIHJldHVybiB0aGlzLl9fc2VsZWN0ZWRNYXAuaGFzKGl0ZW0pOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogUmV0dXJucyB3aGV0aGVyIHRoZSBpdGVtIGlzIGN1cnJlbnRseSBzZWxlY3RlZC4KICAgICAgICAgKgogICAgICAgICAqIEBvdmVycmlkZQogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBpZHggSW5kZXggZnJvbSBgaXRlbXNgIGFycmF5IHRvIHRlc3QKICAgICAgICAgKiBAcmV0dXJuIHtib29sZWFufSBXaGV0aGVyIHRoZSBpdGVtIGlzIHNlbGVjdGVkCiAgICAgICAgICovCiAgICAgICAgaXNJbmRleFNlbGVjdGVkKGlkeCkgewogICAgICAgICAgcmV0dXJuIHRoaXMuaXNTZWxlY3RlZCh0aGlzLml0ZW1zW2lkeF0pOwogICAgICAgIH0KCiAgICAgICAgX19kZXNlbGVjdENoYW5nZWRJZHgoaWR4KSB7CiAgICAgICAgICBsZXQgc2lkeCA9IHRoaXMuX19zZWxlY3RlZEluZGV4Rm9ySXRlbUluZGV4KGlkeCk7CiAgICAgICAgICBpZiAoc2lkeCA+PSAwKSB7CiAgICAgICAgICAgIGxldCBpID0gMDsKICAgICAgICAgICAgdGhpcy5fX3NlbGVjdGVkTWFwLmZvckVhY2goKGlkeCwgaXRlbSkgPT4gewogICAgICAgICAgICAgIGlmIChzaWR4ID09IGkrKykgewogICAgICAgICAgICAgICAgdGhpcy5kZXNlbGVjdChpdGVtKTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgIC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kpOwogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICogU2VsZWN0cyB0aGUgZ2l2ZW4gaW5kZXguICBXaGVuIGB0b2dnbGVgIGlzIHRydWUsIHRoaXMgd2lsbCBhdXRvbWF0aWNhbGx5CiAgICAgICAgICogZGVzZWxlY3QgdGhlIGl0ZW0gaWYgYWxyZWFkeSBzZWxlY3RlZC4KICAgICAgICAgKgogICAgICAgICAqIEBvdmVycmlkZQogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBpZHggSW5kZXggZnJvbSBgaXRlbXNgIGFycmF5IHRvIHNlbGVjdAogICAgICAgICAqIEByZXR1cm4ge3ZvaWR9CiAgICAgICAgICovCiAgICAgICAgc2VsZWN0SW5kZXgoaWR4KSB7CiAgICAgICAgICBsZXQgaXRlbSA9IHRoaXMuaXRlbXNbaWR4XTsKICAgICAgICAgIGlmICghdGhpcy5pc1NlbGVjdGVkKGl0ZW0pKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5tdWx0aSkgewogICAgICAgICAgICAgIHRoaXMuX19zZWxlY3RlZE1hcC5jbGVhcigpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX19zZWxlY3RlZE1hcC5zZXQoaXRlbSwgaWR4KTsKICAgICAgICAgICAgdGhpcy5fX3VwZGF0ZUxpbmtzKCk7CiAgICAgICAgICAgIGlmICh0aGlzLm11bHRpKSB7CiAgICAgICAgICAgICAgdGhpcy5wdXNoKEpTQ29tcGlsZXJfcmVuYW1lUHJvcGVydHkoJ3NlbGVjdGVkJywgdGhpcyksIGl0ZW0pOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgIHRoaXMuc2VsZWN0ZWQgPSB0aGlzLnNlbGVjdGVkSXRlbSA9IGl0ZW07CiAgICAgICAgICAgIH0KICAgICAgICAgIH0gZWxzZSBpZiAodGhpcy50b2dnbGUpIHsKICAgICAgICAgICAgdGhpcy5kZXNlbGVjdEluZGV4KGlkeCk7CiAgICAgICA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dj5MYXN0IG5hbWU6IDxzcGFuPnt7aXRlbS5sYXN0fX08L3NwYW4+PC9kaXY+CiAgICAgKiAgICAgICAgICAgICAgIDxidXR0b24gb24tY2xpY2s9InRvZ2dsZVNlbGVjdGlvbiI+U2VsZWN0PC9idXR0b24+CiAgICAgKiAgICAgICAgICAgPC90ZW1wbGF0ZT4KICAgICAqICAgICAgICAgPC9kb20tcmVwZWF0PgogICAgICoKICAgICAqICAgICAgICAgPGFycmF5LXNlbGVjdG9yIGlkPSJzZWxlY3RvciIKICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1zPSJ7e2VtcGxveWVlc319IgogICAgICogICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWQ9Int7c2VsZWN0ZWR9fSIKICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgIG11bHRpIHRvZ2dsZT48L2FycmF5LXNlbGVjdG9yPgogICAgICoKICAgICAqICAgICAgICAgPGRpdj4gU2VsZWN0ZWQgZW1wbG95ZWVzOiA8L2Rpdj4KICAgICAqICAgICAgICAgPGRvbS1yZXBlYXQgaXRlbXM9Int7c2VsZWN0ZWR9fSI+CiAgICAgKiAgICAgICAgICAgPHRlbXBsYXRlPgogICAgICogICAgICAgICAgICAgPGRpdj5GaXJzdCBuYW1lOiA8c3Bhbj57e2l0ZW0uZmlyc3R9fTwvc3Bhbj48L2Rpdj4KICAgICAqICAgICAgICAgICAgIDxkaXY+TGFzdCBuYW1lOiA8c3Bhbj57e2l0ZW0ubGFzdH19PC9zcGFuPjwvZGl2PgogICAgICogICAgICAgICAgIDwvdGVtcGxhdGU+CiAgICAgKiAgICAgICAgIDwvZG9tLXJlcGVhdD5gOwogICAgICogICB9CiAgICAgKiAgIHN0YXRpYyBnZXQgaXMoKSB7IHJldHVybiAnZW1wbG95ZWUtbGlzdCc7IH0KICAgICAqICAgc3RhdGljIGdldCBwcm9wZXJ0aWVzKCkgewogICAgICogICAgIHJldHVybiB7CiAgICAgKiAgICAgICBlbXBsb3llZXM6IHsKICAgICAqICAgICAgICAgdmFsdWUoKSB7CiAgICAgKiAgICAgICAgICAgcmV0dXJuIFsKICAgICAqICAgICAgICAgICAgIHtmaXJzdDogJ0JvYicsIGxhc3Q6ICdTbWl0aCd9LAogICAgICogICAgICAgICAgICAge2ZpcnN0OiAnU2FsbHknLCBsYXN0OiAnSm9obnNvbid9LAogICAgICogICAgICAgICAgICAgLi4uCiAgICAgKiAgICAgICAgICAgXTsKICAgICAqICAgICAgICAgfQogICAgICogICAgICAgfQogICAgICogICAgIH07CiAgICAgKiAgIH0KICAgICAqICAgdG9nZ2xlU2VsZWN0aW9uKGUpIHsKICAgICAqICAgICBjb25zdCBpdGVtID0gdGhpcy4kLmVtcGxveWVlTGlzdC5pdGVtRm9yRWxlbWVudChlLnRhcmdldCk7CiAgICAgKiAgICAgdGhpcy4kLnNlbGVjdG9yLnNlbGVjdChpdGVtKTsKICAgICAqICAgfQogICAgICogfQogICAgICogYGBgCiAgICAgKgogICAgICogQHBvbHltZXIKICAgICAqIEBjdXN0b21FbGVtZW50CiAgICAgKiBAZXh0ZW5kcyB7YmFzZUFycmF5U2VsZWN0b3J9CiAgICAgKiBAYXBwbGllc01peGluIEFycmF5U2VsZWN0b3JNaXhpbgogICAgICogQHN1bW1hcnkgQ3VzdG9tIGVsZW1lbnQgdGhhdCBsaW5rcyBwYXRocyBiZXR3ZWVuIGFuIGlucHV0IGBpdGVtc2AgYXJyYXkgYW5kCiAgICAgKiAgIGFuIG91dHB1dCBgc2VsZWN0ZWRgIGl0ZW0gb3IgYXJyYXkgYmFzZWQgb24gY2FsbHMgdG8gaXRzIHNlbGVjdGlvbiBBUEkuCiAgICAgKi8KICAgIGNsYXNzIEFycmF5U2VsZWN0b3IgZXh0ZW5kcyBiYXNlQXJyYXlTZWxlY3RvciB7CiAgICAgIC8vIE5vdCBuZWVkZWQgdG8gZmluZCB0ZW1wbGF0ZTsgY2FuIGJlIHJlbW92ZWQgb25jZSB0aGUgYW5h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AcGFyYW0ge0VsZW1lbnR9IGVsZW1lbnQKICAgICAgICAgKiBAcGFyYW0ge09iamVjdD19IHByb3BlcnRpZXMKICAgICAgICAgKi8KICAgICAgICBzdHlsZVN1YnRyZWUoZWxlbWVudCwgcHJvcGVydGllcykgewogICAgICAgICAgY3VzdG9tU3R5bGVJbnRlcmZhY2UucHJvY2Vzc1N0eWxlcygpOwogICAgICAgICAgdXBkYXRlTmF0aXZlUHJvcGVydGllcyhlbGVtZW50LCBwcm9wZXJ0aWVzKTsKICAgICAgICB9LAoKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0ge0VsZW1lbnR9IGVsZW1lbnQKICAgICAgICAgKi8KICAgICAgICBzdHlsZUVsZW1lbnQoZWxlbWVudCkgeyAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIG5vLXVudXNlZC12YXJzCiAgICAgICAgICBjdXN0b21TdHlsZUludGVyZmFjZS5wcm9jZXNzU3R5bGVzKCk7CiAgICAgICAgfSwKCiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHtPYmplY3Q9fSBwcm9wZXJ0aWVzCiAgICAgICAgICovCiAgICAgICAgc3R5bGVEb2N1bWVudChwcm9wZXJ0aWVzKSB7CiAgICAgICAgICBjdXN0b21TdHlsZUludGVyZmFjZS5wcm9jZXNzU3R5bGVzKCk7CiAgICAgICAgICB1cGRhdGVOYXRpdmVQcm9wZXJ0aWVzKGRvY3VtZW50LmJvZHksIHByb3BlcnRpZXMpOwogICAgICAgIH0sCgogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7RWxlbWVudH0gZWxlbWVudAogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBwcm9wZXJ0eQogICAgICAgICAqIEByZXR1cm4ge3N0cmluZ30KICAgICAgICAgKi8KICAgICAgICBnZXRDb21wdXRlZFN0eWxlVmFsdWUoZWxlbWVudCwgcHJvcGVydHkpIHsKICAgICAgICAgIHJldHVybiBnZXRDb21wdXRlZFN0eWxlVmF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ViLmNvbS93ZWJjb21wb25lbnRzL3NoYWR5Y3NzI2Fib3V0LWFwcGx5c2hpbSkKICAgICAqICAgKGBzaGFkeWNzcy9hcHBseS1zaGltLmh0bWxgKS4KICAgICAqCiAgICAgKiBUbyB1c2U6CiAgICAgKgogICAgICogLSBJbXBvcnQgYGN1c3RvbS1zdHlsZS5odG1sYC4KICAgICAqIC0gUGxhY2UgYSBgPGN1c3RvbS1zdHlsZT5gIGVsZW1lbnQgaW4gdGhlIG1haW4gZG9jdW1lbnQsIHdyYXBwaW5nIGFuIGlubGluZSBgPHN0eWxlPmAgdGFnIHRoYXQKICAgICAqICAgY29udGFpbnMgdGhlIENTUyBydWxlcyB5b3Ugd2FudCB0byBzaGltLgogICAgICoKICAgICAqIEZvciBleGFtcGxlOgogICAgICoKICAgICAqIGBgYGh0bWwKICAgICAqIDwhLS0gaW1wb3J0IGFwcGx5IHNoaW0tLW9ubHkgcmVxdWlyZWQgaWYgdXNpbmcgbWl4aW5zIC0tPgogICAgICogPGxpbmsgcmVsPSJpbXBvcnQiIGhyZWY9ImJvd2VyX2NvbXBvbmVudHMvc2hhZHljc3MvYXBwbHktc2hpbS5odG1sIj4KICAgICAqIDwhLS0gaW1wb3J0IGN1c3RvbS1zdHlsZSBlbGVtZW50IC0tPgogICAgICogPGxpbmsgcmVsPSJpbXBvcnQiIGhyZWY9ImJvd2VyX2NvbXBvbmVudHMvcG9seW1lci9saWIvZWxlbWVudHMvY3VzdG9tLXN0eWxlLmh0bWwiPgogICAgICoKICAgICAqIDxjdXN0b20tc3R5bGU+CiAgICAgKiAgIDxzdHlsZT4KICAgICAqICAgICBodG1sIHsKICAgICAqICAgICAgIC0tY3VzdG9tLWNvbG9yOiBibHVlOwogICAgICogICAgICAgLS1jdXN0b20tbWl4aW46IHsKICAgICAqICAgICAgICAgZm9udC13ZWlnaHQ6IGJvbGQ7CiAgICAgKiAgICAgICAgIGNvbG9yOiByZWQ7CiAgICAgKiAgICAgICB9OwogICAgICogICAgIH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6ZWQgZXhwbGljaXRseSBieSBhbm90aGVyIHJlc2l6YWJsZSwgb3Igd2hlbgogICAgICp0aGUgd2luZG93IGhhcyBiZWVuIHJlc2l6ZWQuCiAgICAgKgogICAgICogTm90ZSwgdGhlIGBpcm9uLXJlc2l6ZWAgZXZlbnQgaXMgbm9uLWJ1YmJsaW5nLgogICAgICoKICAgICAqIEBwb2x5bWVyQmVoYXZpb3IKICAgICAqIEBkZW1vIGRlbW8vaW5kZXguaHRtbAogICAgICoqLwogICAgY29uc3QgSXJvblJlc2l6YWJsZUJlaGF2aW9yID0gewogICAgICBwcm9wZXJ0aWVzOiB7CiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIGNsb3Nlc3QgYW5jZXN0b3IgZWxlbWVudCB0aGF0IGltcGxlbWVudHMgYElyb25SZXNpemFibGVCZWhhdmlvcmAuCiAgICAgICAgICovCiAgICAgICAgX3BhcmVudFJlc2l6YWJsZTogewogICAgICAgICAgdHlwZTogT2JqZWN0LAogICAgICAgICAgb2JzZXJ2ZXI6ICdfcGFyZW50UmVzaXphYmxlQ2hhbmdlZCcsCiAgICAgICAgfSwKCiAgICAgICAgLyoqCiAgICAgICAgICogVHJ1ZSBpZiB0aGlzIGVsZW1lbnQgaXMgY3VycmVudGx5IG5vdGlmeWluZyBpdHMgZGVzY2VuZGFudCBlbGVtZW50cyBvZgogICAgICAgICAqIHJlc2l6ZS4KICAgICAgICAgKi8KICAgICAgICBfbm90aWZ5aW5nRGVzY2VuZGFudDogewogICAgICAgICAgdHlwZTogQm9vbGVhbiwKICAgICAgICAgIHZhbHVlOiBmYWxzZSwKICAgICAgICB9CiAgICAgIH0sCgogICAgICBsaXN0ZW5lcnM6IHsKICAgICAgICAnaXJvbi1yZXF1ZXN0LXJlc2l6ZS1ub3RpZmljYXRpb25zJzogJ19vbklyb25SZXF1ZXN0UmVzaXplTm90aWZpY2F0aW9ucycKICAgICAgfSwKCiAgICAgIGNyZWF0ZWQ6IGZ1bmN0aW9uKCkgewog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FudAogICAgICAgKiByZXNpemFibGVzIG9mIGEgcmVzaXplIGNoYW5nZS4KICAgICAgICovCiAgICAgIG5vdGlmeVJlc2l6ZTogZnVuY3Rpb24oKSB7CiAgICAgICAgaWYgKCF0aGlzLmlzQXR0YWNoZWQpIHsKICAgICAgICAgIHJldHVybjsKICAgICAgICB9CgogICAgICAgIHRoaXMuX2ludGVyZXN0ZWRSZXNpemFibGVzLmZvckVhY2goZnVuY3Rpb24ocmVzaXphYmxlKSB7CiAgICAgICAgICBpZiAodGhpcy5yZXNpemVyU2hvdWxkTm90aWZ5KHJlc2l6YWJsZSkpIHsKICAgICAgICAgICAgdGhpcy5fbm90aWZ5RGVzY2VuZGFudChyZXNpemFibGUpOwogICAgICAgICAgfQogICAgICAgIH0sIHRoaXMpOwoKICAgICAgICB0aGlzLl9maXJlUmVzaXplKCk7CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogVXNlZCB0byBhc3NpZ24gdGhlIGNsb3Nlc3QgcmVzaXphYmxlIGFuY2VzdG9yIHRvIHRoaXMgcmVzaXphYmxlCiAgICAgICAqIGlmIHRoZSBhbmNlc3RvciBkZXRlY3RzIGEgcmVxdWVzdCBmb3Igbm90aWZpY2F0aW9ucy4KICAgICAgICovCiAgICAgIGFzc2lnblBhcmVudFJlc2l6YWJsZTogZnVuY3Rpb24ocGFyZW50UmVzaXphYmxlKSB7CiAgICAgICAgaWYgKHRoaXMuX3BhcmVudFJlc2l6YWJsZSkgewogICAgICAgICAgdGhpcy5fcGFyZW50UmVzaXphYmxlLnN0b3BSZXNpemVOb3RpZmljYXRpb25zRm9yKHRoaXMpOwogICAgICAgIH0KCiAgICAgICAgdGhpcy5fcGFyZW50UmVzaXphYmxlID0gcGFyZW50UmVzaXphYmxlOwoKICAgICAgICBpZiAocGFyZW50UmVzaXphYmxlICYmCiAgICAgICAgICAgIHBhcmVudFJlc2l6YWJsZS5faW50ZXJlc3RlZFJlc2l6YWJsZXMuaW5kZXhPZih0aGlzKSA9PT0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AgICAgICogc2hvdWxkIG5vdCBiZSBub3RpZmllZCBieSB0aGUgY3VycmVudCBlbGVtZW50LiBSZXR1cm4gdHJ1ZSBpZiBhbiBlbGVtZW50CiAgICAgICAqIHNob3VsZCBiZSBub3RpZmllZCwgb3IgZmFsc2UgaWYgaXQgc2hvdWxkIG5vdCBiZSBub3RpZmllZC4KICAgICAgICoKICAgICAgICogQHBhcmFtIHtIVE1MRWxlbWVudH0gZWxlbWVudCBBIGNhbmRpZGF0ZSBkZXNjZW5kYW50IGVsZW1lbnQgdGhhdAogICAgICAgKiBpbXBsZW1lbnRzIGBJcm9uUmVzaXphYmxlQmVoYXZpb3JgLgogICAgICAgKiBAcmV0dXJuIHtib29sZWFufSBUcnVlIGlmIHRoZSBgZWxlbWVudGAgc2hvdWxkIGJlIG5vdGlmaWVkIG9mIHJlc2l6ZS4KICAgICAgICovCiAgICAgIHJlc2l6ZXJTaG91bGROb3RpZnk6IGZ1bmN0aW9uKGVsZW1lbnQpIHsKICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgfSwKCiAgICAgIF9vbkRlc2NlbmRhbnRJcm9uUmVzaXplOiBmdW5jdGlvbihldmVudCkgewogICAgICAgIGlmICh0aGlzLl9ub3RpZnlpbmdEZXNjZW5kYW50KSB7CiAgICAgICAgICBldmVudC5zdG9wUHJvcGFnYXRpb24oKTsKICAgICAgICAgIHJldHVybjsKICAgICAgICB9CgogICAgICAgIC8vIG5vIG5lZWQgdG8gdXNlIHRoaXMgZHVyaW5nIHNoYWRvdyBkb20gYmVjYXVzZSBvZiBldmVudCByZXRhcmdldGluZwogICAgICAgIGlmICghdXNlU2hhZG93KSB7CiAgICAgICAgICB0aGlzLl9maXJlUmVzaXplKCk7CiAgICAgICAgfQogICAgICB9LAoKICAgICAgX2ZpcmVSZXNpemU6IGZ1bmN0aW9uKCkgewogICAgICAgIHRoaXMuZmlyZSgnaXJvbi1yZXNpemUnLCBudWxsLCB7bm9kZTogdGhpcywgYnViYmxlczogZmF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AgICAgICAgIC8vIHRoZWlyIHBhcmVudCBhZ2FpbiwgaW4gY2FzZSBpdCdzIHRoaXMgcmVzaXphYmxlLgogICAgICAgICAgICBPUlBIQU5TLmZvckVhY2goZnVuY3Rpb24ob3JwaGFuKSB7CiAgICAgICAgICAgICAgaWYgKG9ycGhhbiAhPT0gdGhpcykgewogICAgICAgICAgICAgICAgb3JwaGFuLl9maW5kUGFyZW50KCk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9LCB0aGlzKTsKCiAgICAgICAgICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKCdyZXNpemUnLCB0aGlzLl9ib3VuZE5vdGlmeVJlc2l6ZSk7CiAgICAgICAgICAgIHRoaXMubm90aWZ5UmVzaXplKCk7CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAvLyBJZiB0aGlzIHJlc2l6YWJsZSBoYXMgYSBwYXJlbnQsIHRlbGwgb3RoZXIgY2hpbGQgcmVzaXphYmxlcyBvZgogICAgICAgICAgICAvLyB0aGF0IHBhcmVudCB0byB0cnkgZmluZGluZyB0aGVpciBwYXJlbnQgYWdhaW4sIGluIGNhc2UgaXQncyB0aGlzCiAgICAgICAgICAgIC8vIHJlc2l6YWJsZS4KICAgICAgICAgICAgdGhpcy5fcGFyZW50UmVzaXphYmxlLl9pbnRlcmVzdGVkUmVzaXphYmxlcwogICAgICAgICAgICAgICAgLmZvckVhY2goZnVuY3Rpb24ocmVzaXphYmxlKSB7CiAgICAgICAgICAgICAgICAgIGlmIChyZXNpemFibGUgIT09IHRoaXMpIHsKICAgICAgICAgICAgICAgICAgICByZXNpemFibGUuX2ZpbmRQYXJlbnQoKTsKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSwgdGhpcyk7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9LAoKICAgICAgX2ZpbmRQYXJlbnQ6IGZ1bmN0aW9uKCkgewogICAgICAgIHRoaXMuYXNzaWduUGFyZW50UmVzaXphYm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9yIGBtYXhIZWlnaHRgLgogICAgICAgKiBAcHJpdmF0ZQogICAgICAgKi8KICAgICAgZ2V0IF9kaW1lbnNpb25NYXgoKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuaG9yaXpvbnRhbCA/ICdtYXhXaWR0aCcgOiAnbWF4SGVpZ2h0JzsKICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgKiBgbWF4LXdpZHRoYCBvciBgbWF4LWhlaWdodGAuCiAgICAgICAqIEBwcml2YXRlCiAgICAgICAqLwogICAgICBnZXQgX2RpbWVuc2lvbk1heENzcygpIHsKICAgICAgICByZXR1cm4gdGhpcy5ob3Jpem9udGFsID8gJ21heC13aWR0aCcgOiAnbWF4LWhlaWdodCc7CiAgICAgIH0sCgogICAgICBob3N0QXR0cmlidXRlczogewogICAgICAgIHJvbGU6ICdncm91cCcsCiAgICAgICAgJ2FyaWEtaGlkZGVuJzogJ3RydWUnLAogICAgICB9LAoKICAgICAgbGlzdGVuZXJzOiB7dHJhbnNpdGlvbmVuZDogJ19vblRyYW5zaXRpb25FbmQnfSwKCiAgICAgIC8qKgogICAgICAgKiBUb2dnbGUgdGhlIG9wZW5lZCBzdGF0ZS4KICAgICAgICoKICAgICAgICogQG1ldGhvZCB0b2dnbGUKICAgICAgICovCiAgICAgIHRvZ2dsZTogZnVuY3Rpb24oKSB7CiAgICAgICAgdGhpcy5vcGVuZWQgPSAhdGhpcy5vcGVuZWQ7CiAgICAgIH0sCgogICAgICBzaG93OiBmdW5jdGlvbigpIHsKICAgICAgICB0aGlzLm9wZW5lZCA9IHRydWU7CiAgICAgIH0sCgogICAgICBoaWRlOiBmdW5jdGlvbigpIHsKICAgICAgICB0aGlzLm9wZW5lZCA9IGZhbHNlOwogICAgICB9LAoKICAgICAgLyoqCiAgICAgICAqIFVwZGF0ZXMgdGhlIHNpemUgb2YgdGhlIGVsZW1lbnQuCiAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBzaXplIFRoZSBuZXcgdmFsdWUgZm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XBvc2l0aW9uaW5nCiAgICAqLwoKICAgIGNvbnN0IHRlbXBsYXRlID0gaHRtbGAKLyogTW9zdCBjb21tb24gdXNlZCBmbGV4IHN0eWxlcyovCjxkb20tbW9kdWxlIGlkPSJpcm9uLWZsZXgiPgogIDx0ZW1wbGF0ZT4KICAgIDxzdHlsZT4KICAgICAgLmxheW91dC5ob3Jpem9udGFsLAogICAgICAubGF5b3V0LnZlcnRpY2FsIHsKICAgICAgICBkaXNwbGF5OiAtbXMtZmxleGJveDsKICAgICAgICBkaXNwbGF5OiAtd2Via2l0LWZsZXg7CiAgICAgICAgZGlzcGxheTogZmxleDsKICAgICAgfQoKICAgICAgLmxheW91dC5pbmxpbmUgewogICAgICAgIGRpc3BsYXk6IC1tcy1pbmxpbmUtZmxleGJveDsKICAgICAgICBkaXNwbGF5OiAtd2Via2l0LWlubGluZS1mbGV4OwogICAgICAgIGRpc3BsYXk6IGlubGluZS1mbGV4OwogICAgICB9CgogICAgICAubGF5b3V0Lmhvcml6b250YWwgewogICAgICAgIC1tcy1mbGV4LWRpcmVjdGlvbjogcm93OwogICAgICAgIC13ZWJraXQtZmxleC1kaXJlY3Rpb246IHJvdzsKICAgICAgICBmbGV4LWRpcmVjdGlvbjogcm93OwogICAgICB9CgogICAgICAubGF5b3V0LnZlcnRpY2FsIHsKICAgICAgICAtbXMtZmxleC1kaXJlY3Rpb246IGNvbHVtbjsKICAgICAgICAtd2Via2l0LWZsZXgtZGlyZWN0aW9uOiBjb2x1bW47CiAgICAgICAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjsKICAgICAgfQoKICAgICAgLmxheW91dC53cmFwIHsKICAgICAgICAtbXMtZmxleC13cmFwOiB3cmFwOwogICAgICAgIC13ZWJraXQtZmxleC13cmFwOiB3cmFwOwogICAgICAgIGZsZXgtd3JhcDogd3JhcDsKICAgICAgfQoKICAgICAgLmxheW91dC5uby13cmFwIHsKICAgICAgICAtbXMtZmxleC13cmFwOiBub3dyYXA7CiAgICAgICAgLXdlYmtpdC1mbGV4LXdyYXA6IG5vd3JhcDsKICAgICAgICBmbGV4LXdyYXA6IG5vd3JhcDsKICAgICAgfQoKICAgICAgLmxheW91dC5jZW50ZXIsCiAgICAgIC5sYXlvdXQuY2VudGVyLWNlbnRlciB7CiAgICAgICAgLW1zLWZsZXgtYWxpZ246IGNlbnRlcjsKICAgICAgICAtd2Via2l0LWFsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICAgICAgfQoKICAgICAgLmxheW91dC5jZW50ZXItanVzdGlmaWVkLAogICAgICAubGF5b3V0LmNlbnRlci1jZW50ZXIgewogICAgICAgIC1tcy1mbGV4LXBhY2s6IGNlbnRlcjsKICAgICAgICAtd2Via2l0LWp1c3RpZnktY29udGVudDogY2VudGVyOwogICAgICAgIGp1c3RpZnktY29udGVudDogY2VudGVyOwogICAgICB9CgogICAgICAuZmxleCB7CiAgICAgICAgLW1zLWZsZXg6IDEgMSAwLjAwMDAwMDAwMXB4OwogICAgICAgIC13ZWJraXQtZmxleDogMTsKICAgICAgICBmbGV4OiAxOwogICAgICAgIC13ZWJraXQtZmxleC1iYXNpczogMC4wMDAwMDAwMDFweDsKICAgICAgICBmbGV4LWJhc2lzOiAwLjAwMDAwMDAwMXB4OwogICAgICB9CgogICAgICAuZmxleC1hdXRvIHsKICAgICAgICAtbXMtZmxleDogMSAxIGF1dG87CiAgICAgICAgLXdlYmtpdC1mbGV4OiAxIDEgYXV0bzsKICAgICAgICBmbGV4OiAxIDEgYXV0bzsKICAgICAgfQoKICAgICAgLmZsZXgtbm9uZSB7CiAgICAgICAgLW1zLWZsZXg6IG5vbmU7CiAgICAgICAgLXdlYmtpdC1mbGV4OiBub25lOwogICAgICAgIGZsZXg6IG5vbmU7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgPC90ZW1wbGF0ZT4KPC9kb20tbW9kdWxlPgovKiBCYXNpYyBmbGV4Ym94IHJldmVyc2Ugc3R5bGVzICovCjxkb20tbW9kdWxlIGlkPSJpcm9uLWZsZXgtcmV2ZXJzZSI+CiAgPHRlbXBsYXRlPgogICAgPHN0eWxlPgogICAgICAubGF5b3V0Lmhvcml6b250YWwtcmV2ZXJzZSwKICAgICAgLmxheW91dC52ZXJ0aWNhbC1yZXZlcnNlIHsKICAgICAgICBkaXNwbGF5OiAtbXMtZmxleGJveDsKICAgICAgICBkaXNwbGF5OiAtd2Via2l0LWZsZXg7CiAgICAgICAgZGlzcGxheTogZmxleDsKICAgICAgfQoKICAgICAgLmxheW91dC5ob3Jpem9udGFsLXJldmVyc2UgewogICAgICAgIC1tcy1mbGV4LWRpcmVjdGlvbjogcm93LXJldmVyc2U7CiAgICAgICAgLXdlYmtpdC1mbGV4LWRpcmVjdGlvbjogcm93LXJldmVyc2U7CiAgICAgICAgZmxleC1kaXJlY3Rpb246IHJvdy1yZXZlcnNlOwogICAgICB9CgogICAgICAubGF5b3V0LnZlcnRpY2FsLXJldmVyc2UgewogICAgICAgIC1tcy1mbGV4LWRpcmVjdGlvbjogY29sdW1uLXJldmVyc2U7CiAgICAgICAgLXdlYmtpdC1mbGV4LWRpcmVjdGlvbjogY29sdW1uLXJldmVyc2U7CiAgICAgICAgZmxleC1kaXJlY3Rpb246IGNvbHVtbi1yZXZlcnNlOwogICAgICB9CgogICAgICAubGF5b3V0LndyYXAtcmV2ZXJzZSB7CiAgICAgICAgLW1zLWZsZXgtd3JhcDogd3JhcC1yZXZlcnNlOwogICAgICAgIC13ZWJraXQtZmxleC13cmFwOiB3cmFwLXJldmVyc2U7CiAgICAgICAgZmxleC13cmFwOiB3cmFwLXJldmVyc2U7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgPC90ZW1wbGF0ZT4KPC9kb20tbW9kdWxlPgovKiBGbGV4Ym94IGFsaWdubWVudCAqLwo8ZG9tLW1vZHVsZSBpZD0iaXJvbi1mbGV4LWFsaWdubWVudCI+CiAgPHRlbXBsYXRlPgogICAgPHN0eWxlPgogICAgICAvKioKICAgICAgICogQWxpZ25tZW50IGluIGNyb3NzIGF4aXMuCiAgICAgICAqLwogICAgICAubGF5b3V0LnN0YXJ0IHsKICAgICAgICAtbXMtZmxleC1hbGlnbjogc3RhcnQ7CiAgICAgICAgLXdlYmtpdC1hbGlnbi1pdGVtczogZmxleC1zdGFydDsKICAgICAgICBhbGlnbi1pdGVtczogZmxleC1zdGFydDsKICAgICAgfQoKICAgICAgLmxheW91dC5jZW50ZXIsCiAgICAgIC5sYXlvdXQuY2VudGVyLWNlbnRlciB7CiAgICAgICAgLW1zLWZsZXgtYWxpZ246IGNlbnRlcjsKICAgICAgICAtd2Via2l0LWFsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICAgICAgfQoKICAgICAgLmxheW91dC5lbmQgewogICAgICAgIC1tcy1mbGV4LWFsaWduOiBlbmQ7CiAgICAgICAgLXdlYmtpdC1hbGlnbi1pdGVtczogZmxleC1lbmQ7CiAgICAgICAgYWxpZ24taXRlbXM6IGZsZXgtZW5kOwogICAgICB9CgogICAgICAubGF5b3V0LmJhc2VsaW5lIHsKICAgICAgICAtbXMtZmxleC1hbGlnbjogYmFzZWxpbmU7CiAgICAgICAgLXdlYmtpdC1hbGlnbi1pdGVtczogYmFzZWxpbmU7CiAgICAgICAgYWxpZ24taXRlbXM6IGJhc2VsaW5lOwogICAgICB9CgogICAgICAvKioKICAgICAgICogQWxpZ25tZW50IGluIG1haW4gYXhpcy4KICAgICAgICovCiAgICAgIC5sYXlvdXQuc3RhcnQtanVzdGlmaWVkIHsKICAgICAgICAtbXMtZmxleC1wYWNrOiBzdGFydDsKICAgICAgICAtd2Via2l0LWp1c3RpZnktY29udGVudDogZmxleC1zdGFydDsKICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtc3RhcnQ7CiAgICAgIH0KCiAgICAgIC5sYXlvdXQuY2VudGVyLWp1c3RpZmllZCwKICAgICAgLmxheW91dC5jZW50ZXItY2VudGVyIHsKICAgICAgICAtbXMtZmxleC1wYWNrOiBjZW50ZXI7CiAgICAgICAgLXdlYmtpdC1qdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjsKICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjsKICAgICAgfQoKICAgICAgLmxheW91dC5lbmQtanVzdGlmaWVkIHsKICAgICAgICAtbXMtZmxleC1wYWNrOiBlbmQ7CiAgICAgICAgLXdlYmtpdC1qdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtZW5kOwogICAgICAgIGp1c3RpZnktY29udGVudDogZmxleC1lbmQ7CiAgICAgIH0KCiAgICAgIC5sYXlvdXQuYXJvdW5kLWp1c3RpZmllZCB7CiAgICAgICAgLW1zLWZsZXgtcGFjazogZGlzdHJpYnV0ZTsKICAgICAgICAtd2Via2l0LWp1c3RpZnktY29udGVudDogc3BhY2UtYXJvdW5kOwogICAgICAgIGp1c3RpZnktY29udGVudDogc3BhY2UtYXJvdW5kOwogICAgICB9CgogICAgICAubGF5b3V0Lmp1c3RpZmllZCB7CiAgICAgICAgLW1zLWZsZXgtcGFjazoganVzdGlmeTsKICAgICAgICAtd2Via2l0LWp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjsKICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47CiAgICAgIH0KCiAgICAgIC8qKgogICAgICAgKiBTZWxmIGFsaWdubWVudC4KICAgICAgICovCiAgICAgIC5zZWxmLXN0YXJ0IHsKICAgICAgICAtbXMtYWxpZ24tc2VsZjogZmxleC1zdGFydDsKICAgICAgICAtd2Via2l0LWFsaWduLXNlbGY6IGZsZXgtc3RhcnQ7CiAgICAgICAgYWxpZ24tc2VsZjogZmxleC1zdGFydDsKICAgICAgfQoKICAgICAgLnNlbGYtY2VudGVyIHsKICAgICAgICAtbXMtYWxpZ24tc2VsZjogY2VudGVyOwogICAgICAgIC13ZWJraXQtYWxpZ24tc2Vs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VudDogZmxleC1lbmQ7CiAgICAgICAgYWxpZ24tY29udGVudDogZmxleC1lbmQ7CiAgICAgIH0KCiAgICAgIC5sYXlvdXQuY2VudGVyLWFsaWduZWQgewogICAgICAgIC1tcy1mbGV4LWxpbmUtcGFjazogY2VudGVyOyAgLyogSUUxMCAqLwogICAgICAgIC1tcy1hbGlnbi1jb250ZW50OiBjZW50ZXI7CiAgICAgICAgLXdlYmtpdC1hbGlnbi1jb250ZW50OiBjZW50ZXI7CiAgICAgICAgYWxpZ24tY29udGVudDogY2VudGVyOwogICAgICB9CgogICAgICAubGF5b3V0LmJldHdlZW4tYWxpZ25lZCB7CiAgICAgICAgLW1zLWZsZXgtbGluZS1wYWNrOiBqdXN0aWZ5OyAgLyogSUUxMCAqLwogICAgICAgIC1tcy1hbGlnbi1jb250ZW50OiBzcGFjZS1iZXR3ZWVuOwogICAgICAgIC13ZWJraXQtYWxpZ24tY29udGVudDogc3BhY2UtYmV0d2VlbjsKICAgICAgICBhbGlnbi1jb250ZW50OiBzcGFjZS1iZXR3ZWVuOwogICAgICB9CgogICAgICAubGF5b3V0LmFyb3VuZC1hbGlnbmVkIHsKICAgICAgICAtbXMtZmxleC1saW5lLXBhY2s6IGRpc3RyaWJ1dGU7ICAvKiBJRTEwICovCiAgICAgICAgLW1zLWFsaWduLWNvbnRlbnQ6IHNwYWNlLWFyb3VuZDsKICAgICAgICAtd2Via2l0LWFsaWduLWNvbnRlbnQ6IHNwYWNlLWFyb3VuZDsKICAgICAgICBhbGlnbi1jb250ZW50OiBzcGFjZS1hcm91bmQ7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgPC90ZW1wbGF0ZT4KPC9kb20tbW9kdWxlPgovKiBOb24tZmxleGJveCBwb3NpdGlvbmluZyBoZWxwZXIgc3R5bGVzICovCjxkb20tbW9kdWxlIGlkPSJpcm9uLWZsZXgtZmFjdG9ycyI+CiAgPHRlbXBsYXRlPgogICAgPHN0eWxlPgogICAgICAuZmxleCwKICAgICAgLmZsZXgtMSB7CiAgICAgICAgLW1zLWZsZXg6IDEgMSAwLjAwMDAwMDAwMXB4OwogICAgICAgIC13ZWJraXQtZmxleDogMTsKICAgICAgICBmbGV4OiAxOwogICAgICAgIC13ZWJraXQtZmxleC1iYXNpczogMC4wMDAwMDAwMDFweDsKICAgICAgICBmbGV4LWJhc2lzOiAwLjAwMDAwMDAwMXB4OwogICAgICB9CgogICAgICAuZmxleC0yIHsKICAgICAgICAtbXMtZmxleDogMjsKICAgICAgICAtd2Via2l0LWZsZXg6IDI7CiAgICAgICAgZmxleDogMjsKICAgICAgfQoKICAgICAgLmZsZXgtMyB7CiAgICAgICAgLW1zLWZsZXg6IDM7CiAgICAgICAgLXdlYmtpdC1mbGV4OiAzOwogICAgICAgIGZsZXg6IDM7CiAgICAgIH0KCiAgICAgIC5mbGV4LTQgewogICAgICAgIC1tcy1mbGV4OiA0OwogICAgICAgIC13ZWJraXQtZmxleDogNDsKICAgICAgICBmbGV4OiA0OwogICAgICB9CgogICAgICAuZmxleC01IHsKICAgICAgICAtbXMtZmxleDogNTsKICAgICAgICAtd2Via2l0LWZsZXg6IDU7CiAgICAgICAgZmxleDogNTsKICAgICAgfQoKICAgICAgLmZsZXgtNiB7CiAgICAgICAgLW1zLWZsZXg6IDY7CiAgICAgICAgLXdlYmtpdC1mbGV4OiA2OwogICAgICAgIGZsZXg6IDY7CiAgICAgIH0KCiAgICAgIC5mbGV4LTcgewogICAgICAgIC1tcy1mbGV4OiA3OwogICAgICAgIC13ZWJraXQtZmxleDogNzsKICAgICAgICBmbGV4OiA3OwogICAgICB9CgogICAgICAuZmxleC04IHsKICAgICAgICAtbXMtZmxleDogODsKICAgICAgICAtd2Via2l0LWZsZXg6IDg7CiAgICAgICAgZmxleDogODsKICAgICAgfQoKICAgICAgLmZsZXgtOSB7CiAgICAgICAgLW1zLWZsZXg6IDk7CiAgICAgICAgLXdlYmtpdC1mbGV4OiA5OwogICAgICAgIGZsZXg6IDk7CiAgICAgIH0KCiAgICAgIC5mbGV4LTEwIHsKICAgICAgICAtbXMtZmxleDogMTA7CiAgICAgICAgLXdlYmtpdC1mbGV4OiAxMDsKICAgICAgICBmbGV4OiAxMDsKICAgICAgfQoKICAgICAgLmZsZXgtMTEgewogICAgICAgIC1tcy1mbGV4OiAxMTsKICAgICAgICAtd2Via2l0LWZsZXg6IDExOwogICAgICAgIGZsZXg6IDExOwogICAgICB9CgogICAgICAuZmxleC0xMiB7CiAgICAgICAgLW1zLWZsZXg6IDEyOwogICAgICAgIC13ZWJraXQtZmxleDogMTI7CiAgICAgICAgZmxleDogMTI7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgPC90ZW1wbGF0ZT4KPC9kb20tbW9kdWxlPgo8ZG9tLW1vZHVsZSBpZD0iaXJvbi1wb3NpdGlvbmluZyI+CiAgPHRlbXBsYXRlPgogICAgPHN0eWxlPgogICAgICAuYmxvY2sgewogICAgICAgIGRpc3BsYXk6IGJsb2NrOwogICAgICB9CgogICAgICBbaGlkZGVuXSB7CiAgICAgICAgZGlzcGxheTogbm9uZSAhaW1wb3J0YW50OwogICAgICB9CgogICAgICAuaW52aXNpYmxlIHsKICAgICAgICB2aXNpYmlsaXR5OiBoaWRkZW4gIWltcG9ydGFudDsKICAgICAgfQoKICAgICAgLnJlbGF0aXZlIHsKICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7CiAgICAgIH0KCiAgICAgIC5maXQgewogICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTsKICAgICAgICB0b3A6IDA7CiAgICAgICAgcmlnaHQ6IDA7CiAgICAgICAgYm90dG9tOiAwOwogICAgICAgIGxlZnQ6IDA7CiAgICAgIH0KCiAgICAgIGJvZHkuZnVsbGJsZWVkIHsKICAgICAgICBtYXJnaW46IDA7CiAgICAgICAgaGVpZ2h0OiAxMDB2aDsKICAgICAgfQoKICAgICAgLnNjcm9sbCB7CiAgICAgICAgLXdlYmtpdC1vdmVyZmxvdy1zY3JvbGxpbmc6IHRvdWNoOwogICAgICAgIG92ZXJmbG93OiBhdXRvOwogICAgICB9CgogICAgICAvKiBmaXhlZCBwb3NpdGlvbiAqLwogICAgICAuZml4ZWQtYm90dG9tLAogICAgICAuZml4ZWQtbGVmdCwKICAgICAgLmZpeGVkLXJpZ2h0LAogICAgICAuZml4ZWQtdG9wIHsKICAgICAgICBwb3NpdGlvbjogZml4ZWQ7CiAgICAgIH0KCiAgICAgIC5maXhlZC10b3AgewogICAgICAgIHRvcDogMDsKICAgICAgICBsZWZ0OiAwOwogICAgICAgIHJpZ2h0OiAwOwogICAgICB9CgogICAgICAuZml4ZWQtcmlnaHQgewogICAgICAgIHRvcDogMDsKICAgICAgICByaWdodDogMDsKICAgICAgICBib3R0b206IDA7CiAgICAgIH0KCiAgICAgIC5maXhlZC1ib3R0b20gewogICAgICAgIHJpZ2h0OiAwOwogICAgICAgIGJvdHRvbTogMDsKICAgICAgICBsZWZ0OiAwOwogICAgICB9CgogICAgICAuZml4ZWQtbGVmdCB7CiAgICAgICAgdG9wOiAwOwogICAgICAgIGJvdHRvbTogMDsKICAgICAgICBsZWZ0OiAwOwogICAgICB9CiAgICA8L3N0eWxlPgogIDwvdGVtcGxhdGU+CjwvZG9tLW1vZHVsZT4KYDsKICAgIHRlbXBsYXRlLnNldEF0dHJpYnV0ZSgnc3R5bGUnLCAnZGlzcGxheTogbm9uZTsnKTsKICAgIGRvY3VtZW50LmhlYWQuYXBwZW5kQ2hpbGQodGVtcGxhdGUuY29udGVudCk7CgogICAgLyoqCiAgICBAbGljZW5zZQogICAgQ29weXJpZ2h0IChjKSAyMDE1IFRoZSBQb2x5bWVyIFByb2plY3QgQXV0aG9ycy4gQWxsIHJpZ2h0cyByZXNlcnZlZC4KICAgIFRoaXMgY29kZSBtYXkgb25seSBiZSB1c2VkIHVuZGVyIHRoZSBCU0Qgc3R5bGUgbGljZW5zZSBmb3VuZCBhdAogICAgaHR0cDovL3BvbHltZXIuZ2l0aHViLmlvL0xJQ0VOU0UudHh0IFRoZSB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Xg7CiAgICAgIH07CgogICAgICAtLWxheW91dC1pbmxpbmU6IHsKICAgICAgICBkaXNwbGF5OiAtbXMtaW5saW5lLWZsZXhib3g7CiAgICAgICAgZGlzcGxheTogLXdlYmtpdC1pbmxpbmUtZmxleDsKICAgICAgICBkaXNwbGF5OiBpbmxpbmUtZmxleDsKICAgICAgfTsKCiAgICAgIC0tbGF5b3V0LWhvcml6b250YWw6IHsKICAgICAgICBAYXBwbHkgLS1sYXlvdXQ7CgogICAgICAgIC1tcy1mbGV4LWRpcmVjdGlvbjogcm93OwogICAgICAgIC13ZWJraXQtZmxleC1kaXJlY3Rpb246IHJvdzsKICAgICAgICBmbGV4LWRpcmVjdGlvbjogcm93OwogICAgICB9OwoKICAgICAgLS1sYXlvdXQtaG9yaXpvbnRhbC1yZXZlcnNlOiB7CiAgICAgICAgQGFwcGx5IC0tbGF5b3V0OwoKICAgICAgICAtbXMtZmxleC1kaXJlY3Rpb246IHJvdy1yZXZlcnNlOwogICAgICAgIC13ZWJraXQtZmxleC1kaXJlY3Rpb246IHJvdy1yZXZlcnNlOwogICAgICAgIGZsZXgtZGlyZWN0aW9uOiByb3ctcmV2ZXJzZTsKICAgICAgfTsKCiAgICAgIC0tbGF5b3V0LXZlcnRpY2FsOiB7CiAgICAgICAgQGFwcGx5IC0tbGF5b3V0OwoKICAgICAgICAtbXMtZmxleC1kaXJlY3Rpb246IGNvbHVtbjsKICAgICAgICAtd2Via2l0LWZsZXgtZGlyZWN0aW9uOiBjb2x1bW47CiAgICAgICAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjsKICAgICAgfTsKCiAgICAgIC0tbGF5b3V0LXZlcnRpY2FsLXJldmVyc2U6IHsKICAgICAgICBAYXBwbHkgLS1sYXlvdXQ7CgogICAgICAgIC1tcy1mbGV4LWRpcmVjdGlvbjogY29sdW1uLXJldmVyc2U7CiAgICAgICAgLXdlYmtpdC1mbGV4LWRpcmVjdGlvbjogY29sdW1uLXJldmVyc2U7CiAgICAgICAgZmxleC1kaXJlY3Rpb246IGNvbHVtbi1yZXZlcnNlOwogICAgICB9OwoKICAgICAgLS1sYXlvdXQtd3JhcDogewogICAgICAgIC1tcy1mbGV4LXdyYXA6IHdyYXA7CiAgICAgICAgLXdlYmtpdC1mbGV4LXdyYXA6IHdyYXA7CiAgICAgICAgZmxleC13cmFwOiB3cmFwOwogICAgICB9OwoKICAgICAgLS1sYXlvdXQtd3JhcC1yZXZlcnNlOiB7CiAgICAgICAgLW1zLWZsZXgtd3JhcDogd3JhcC1yZXZlcnNlOwogICAgICAgIC13ZWJraXQtZmxleC13cmFwOiB3cmFwLXJldmVyc2U7CiAgICAgICAgZmxleC13cmFwOiB3cmFwLXJldmVyc2U7CiAgICAgIH07CgogICAgICAtLWxheW91dC1mbGV4LWF1dG86IHsKICAgICAgICAtbXMtZmxleDogMSAxIGF1dG87CiAgICAgICAgLXdlYmtpdC1mbGV4OiAxIDEgYXV0bzsKICAgICAgICBmbGV4OiAxIDEgYXV0bzsKICAgICAgfTsKCiAgICAgIC0tbGF5b3V0LWZsZXgtbm9uZTogewogICAgICAgIC1tcy1mbGV4OiBub25lOwogICAgICAgIC13ZWJraXQtZmxleDogbm9uZTsKICAgICAgICBmbGV4OiBub25lOwogICAgICB9OwoKICAgICAgLS1sYXlvdXQtZmxleDogewogICAgICAgIC1tcy1mbGV4OiAxIDEgMC4wMDAwMDAwMDFweDsKICAgICAgICAtd2Via2l0LWZsZXg6IDE7CiAgICAgICAgZmxleDogMTsKICAgICAgICAtd2Via2l0LWZsZXgtYmFzaXM6IDAuMDAwMDAwMDAxcHg7CiAgICAgICAgZmxleC1iYXNpczogMC4wMDAwMDAwMDFweDsKICAgICAgfTsKCiAgICAgIC0tbGF5b3V0LWZsZXgtMjogewogICAgICAgIC1tcy1mbGV4OiAyOwogICAgICAgIC13ZWJraXQtZmxleDogMjsKICAgICAgICBmbGV4OiAyOwogICAgICB9OwoKICAgICAgLS1sYXlvdXQtZmxleC0zOiB7CiAgICAgICAgLW1zLWZsZXg6IDM7CiAgICAgICAgLXdlYmtpdC1mbGV4OiAzOwogICAgICAgIGZsZXg6IDM7CiAgICAgIH07CgogICAgICAtLWxheW91dC1mbGV4LTQ6IHsKICAgICAgICAtbXMtZmxleDogNDsKICAgICAgICAtd2Via2l0LWZsZXg6IDQ7CiAgICAgICAgZmxleDogNDsKICAgICAgfTsKCiAgICAgIC0tbGF5b3V0LWZsZXgtNTogewogICAgICAgIC1tcy1mbGV4OiA1OwogICAgICAgIC13ZWJraXQtZmxleDogNTsKICAgICAgICBmbGV4OiA1OwogICAgICB9OwoKICAgICAgLS1sYXlvdXQtZmxleC02OiB7CiAgICAgICAgLW1zLWZsZXg6IDY7CiAgICAgICAgLXdlYmtpdC1mbGV4OiA2OwogICAgICAgIGZsZXg6IDY7CiAgICAgIH07CgogICAgICAtLWxheW91dC1mbGV4LTc6IHsKICAgICAgICAtbXMtZmxleDogNzsKICAgICAgICAtd2Via2l0LWZsZXg6IDc7CiAgICAgICAgZmxleDogNzsKICAgICAgfTsKCiAgICAgIC0tbGF5b3V0LWZsZXgtODogewogICAgICAgIC1tcy1mbGV4OiA4OwogICAgICAgIC13ZWJraXQtZmxleDogODsKICAgICAgICBmbGV4OiA4OwogICAgICB9OwoKICAgICAgLS1sYXlvdXQtZmxleC05OiB7CiAgICAgICAgLW1zLWZsZXg6IDk7CiAgICAgICAgLXdlYmtpdC1mbGV4OiA5OwogICAgICAgIGZsZXg6IDk7CiAgICAgIH07CgogICAgICAtLWxheW91dC1mbGV4LTEwOiB7CiAgICAgICAgLW1zLWZsZXg6IDEwOwogICAgICAgIC13ZWJraXQtZmxleDogMTA7CiAgICAgICAgZmxleDogMTA7CiAgICAgIH07CgogICAgICAtLWxheW91dC1mbGV4LTExOiB7CiAgICAgICAgLW1zLWZsZXg6IDExOwogICAgICAgIC13ZWJraXQtZmxleDogMTE7CiAgICAgICAgZmxleDogMTE7CiAgICAgIH07CgogICAgICAtLWxheW91dC1mbGV4LTEyOiB7CiAgICAgICAgLW1zLWZsZXg6IDEyOwogICAgICAgIC13ZWJraXQtZmxleDogMTI7CiAgICAgICAgZmxleDogMTI7CiAgICAgIH07CgogICAgICAvKiBhbGlnbm1lbnQgaW4gY3Jvc3MgYXhpcyAqLwoKICAgICAgLS1sYXlvdXQtc3RhcnQ6IHsKICAgICAgICAtbXMtZmxleC1hbGlnbjogc3RhcnQ7CiAgICAgICAgLXdlYmtpdC1hbGlnbi1pdGVtczogZmxleC1zdGFydDsKICAgICAgICBhbGlnbi1pdGVtczogZmxleC1zdGFydDsKICAgICAgfTsKCiAgICAgIC0tbGF5b3V0LWNlbnRlcjogewogICAgICAgIC1tcy1mbGV4LWFsaWduOiBjZW50ZXI7CiAgICAgICAgLXdlYmtpdC1hbGlnbi1pdGVtczogY2VudGVyOwogICAgICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgIH07CgogICAgICAtLWxheW91dC1lbmQ6IHsKICAgICAgICAtbXMtZmxleC1hbGlnbjogZW5kOwogICAgICAgIC13ZWJraXQtYWxpZ24taXRlbXM6IGZsZXgtZW5kOwogICAgICAgIGFsaWduLWl0ZW1zOiBmbGV4LWVuZDsKICAgICAgfTsKCiAgICAgIC0tbGF5b3V0LWJhc2VsaW5lOiB7CiAgICAgICAgLW1zLWZsZXgtYWxpZ246IGJhc2VsaW5lOwogICAgICAgIC13ZWJraXQtYWxpZ24taXRlbXM6IGJhc2VsaW5lOwogICAgICAgIGFsaWduLWl0ZW1zOiBiYXNlbGluZTsKICAgICAgfTsKCiAgICAgIC8qIGFsaWdubWVudCBpbiBtYWluIGF4aXMgKi8KCiAgICAgIC0tbGF5b3V0LXN0YXJ0LWp1c3RpZmllZDogewogICAgICAgIC1tcy1mbGV4LXBhY2s6IHN0YXJ0OwogICAgICAgIC13ZWJraXQtanVzdGlmeS1jb250ZW50OiBmbGV4LXN0YXJ0OwogICAgICAgIGp1c3RpZnktY29udGVudDogZmxleC1zdGFydDsKICAgICAgfTsKCiAgICAgIC0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lnbi1zZWxmOiBmbGV4LXN0YXJ0OwogICAgICAgIGFsaWduLXNlbGY6IGZsZXgtc3RhcnQ7CiAgICAgIH07CgogICAgICAtLWxheW91dC1zZWxmLWNlbnRlcjogewogICAgICAgIC1tcy1hbGlnbi1zZWxmOiBjZW50ZXI7CiAgICAgICAgLXdlYmtpdC1hbGlnbi1zZWxmOiBjZW50ZXI7CiAgICAgICAgYWxpZ24tc2VsZjogY2VudGVyOwogICAgICB9OwoKICAgICAgLS1sYXlvdXQtc2VsZi1lbmQ6IHsKICAgICAgICAtbXMtYWxpZ24tc2VsZjogZmxleC1lbmQ7CiAgICAgICAgLXdlYmtpdC1hbGlnbi1zZWxmOiBmbGV4LWVuZDsKICAgICAgICBhbGlnbi1zZWxmOiBmbGV4LWVuZDsKICAgICAgfTsKCiAgICAgIC0tbGF5b3V0LXNlbGYtc3RyZXRjaDogewogICAgICAgIC1tcy1hbGlnbi1zZWxmOiBzdHJldGNoOwogICAgICAgIC13ZWJraXQtYWxpZ24tc2VsZjogc3RyZXRjaDsKICAgICAgICBhbGlnbi1zZWxmOiBzdHJldGNoOwogICAgICB9OwoKICAgICAgLS1sYXlvdXQtc2VsZi1iYXNlbGluZTogewogICAgICAgIC1tcy1hbGlnbi1zZWxmOiBiYXNlbGluZTsKICAgICAgICAtd2Via2l0LWFsaWduLXNlbGY6IGJhc2VsaW5lOwogICAgICAgIGFsaWduLXNlbGY6IGJhc2VsaW5lOwogICAgICB9OwoKICAgICAgLyogbXVsdGktbGluZSBhbGlnbm1lbnQgaW4gbWFpbiBheGlzICovCgogICAgICAtLWxheW91dC1zdGFydC1hbGlnbmVkOiB7CiAgICAgICAgLW1zLWZsZXgtbGluZS1wYWNrOiBzdGFydDsgIC8qIElFMTAgKi8KICAgICAgICAtbXMtYWxpZ24tY29udGVudDogZmxleC1zdGFydDsKICAgICAgICAtd2Via2l0LWFsaWduLWNvbnRlbnQ6IGZsZXgtc3RhcnQ7CiAgICAgICAgYWxpZ24tY29udGVudDogZmxleC1zdGFydDsKICAgICAgfTsKCiAgICAgIC0tbGF5b3V0LWVuZC1hbGlnbmVkOiB7CiAgICAgICAgLW1zLWZsZXgtbGluZS1wYWNrOiBlbmQ7ICAvKiBJRTEwICovCiAgICAgICAgLW1zLWFsaWduLWNvbnRlbnQ6IGZsZXgtZW5kOwogICAgICAgIC13ZWJraXQtYWxpZ24tY29udGVudDogZmxleC1lbmQ7CiAgICAgICAgYWxpZ24tY29udGVudDogZmxleC1lbmQ7CiAgICAgIH07CgogICAgICAtLWxheW91dC1jZW50ZXItYWxpZ25lZDogewogICAgICAgIC1tcy1mbGV4LWxpbmUtcGFjazogY2VudGVyOyAgLyogSUUxMCAqLwogICAgICAgIC1tcy1hbGlnbi1jb250ZW50OiBjZW50ZXI7CiAgICAgICAgLXdlYmtpdC1hbGlnbi1jb250ZW50OiBjZW50ZXI7CiAgICAgICAgYWxpZ24tY29udGVudDogY2VudGVyOwogICAgICB9OwoKICAgICAgLS1sYXlvdXQtYmV0d2Vlbi1hbGlnbmVkOiB7CiAgICAgICAgLW1zLWZsZXgtbGluZS1wYWNrOiBqdXN0aWZ5OyAgLyogSUUxMCAqLwogICAgICAgIC1tcy1hbGlnbi1jb250ZW50OiBzcGFjZS1iZXR3ZWVuOwogICAgICAgIC13ZWJraXQtYWxpZ24tY29udGVudDogc3BhY2UtYmV0d2VlbjsKICAgICAgICBhbGlnbi1jb250ZW50OiBzcGFjZS1iZXR3ZWVuOwogICAgICB9OwoKICAgICAgLS1sYXlvdXQtYXJvdW5kLWFsaWduZWQ6IHsKICAgICAgICAtbXMtZmxleC1saW5lLXBhY2s6IGRpc3RyaWJ1dGU7ICAvKiBJRTEwICovCiAgICAgICAgLW1zLWFsaWduLWNvbnRlbnQ6IHNwYWNlLWFyb3VuZDsKICAgICAgICAtd2Via2l0LWFsaWduLWNvbnRlbnQ6IHNwYWNlLWFyb3VuZDsKICAgICAgICBhbGlnbi1jb250ZW50OiBzcGFjZS1hcm91bmQ7CiAgICAgIH07CgogICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICAgICAgICAgICAgICAgT3RoZXIgTGF5b3V0CiAgICAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCgogICAgICAtLWxheW91dC1ibG9jazogewogICAgICAgIGRpc3BsYXk6IGJsb2NrOwogICAgICB9OwoKICAgICAgLS1sYXlvdXQtaW52aXNpYmxlOiB7CiAgICAgICAgdmlzaWJpbGl0eTogaGlkZGVuICFpbXBvcnRhbnQ7CiAgICAgIH07CgogICAgICAtLWxheW91dC1yZWxhdGl2ZTogewogICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTsKICAgICAgfTsKCiAgICAgIC0tbGF5b3V0LWZpdDogewogICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTsKICAgICAgICB0b3A6IDA7CiAgICAgICAgcmlnaHQ6IDA7CiAgICAgICAgYm90dG9tOiAwOwogICAgICAgIGxlZnQ6IDA7CiAgICAgIH07CgogICAgICAtLWxheW91dC1zY3JvbGw6IHsKICAgICAgICAtd2Via2l0LW92ZXJmbG93LXNjcm9sbGluZzogdG91Y2g7CiAgICAgICAgb3ZlcmZsb3c6IGF1dG87CiAgICAgIH07CgogICAgICAtLWxheW91dC1mdWxsYmxlZWQ6IHsKICAgICAgICBtYXJnaW46IDA7CiAgICAgICAgaGVpZ2h0OiAxMDB2aDsKICAgICAgfTsKCiAgICAgIC8qIGZpeGVkIHBvc2l0aW9uICovCgogICAgICAtLWxheW91dC1maXhlZC10b3A6IHsKICAgICAgICBwb3NpdGlvbjogZml4ZWQ7CiAgICAgICAgdG9wOiAwOwogICAgICAgIGxlZnQ6IDA7CiAgICAgICAgcmlnaHQ6IDA7CiAgICAgIH07CgogICAgICAtLWxheW91dC1maXhlZC1yaWdodDogewogICAgICAgIHBvc2l0aW9uOiBmaXhlZDsKICAgICAgICB0b3A6IDA7CiAgICAgICAgcmlnaHQ6IDA7CiAgICAgICAgYm90dG9tOiAwOwogICA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Uy50eHQgVGhlIGNvbXBsZXRlIHNldCBvZiBjb250cmlidXRvcnMgbWF5IGJlCiAgICBmb3VuZCBhdCBodHRwOi8vcG9seW1lci5naXRodWIuaW8vQ09OVFJJQlVUT1JTLnR4dCBDb2RlIGRpc3RyaWJ1dGVkIGJ5IEdvb2dsZSBhcwogICAgcGFydCBvZiB0aGUgcG9seW1lciBwcm9qZWN0IGlzIGFsc28gc3ViamVjdCB0byBhbiBhZGRpdGlvbmFsIElQIHJpZ2h0cyBncmFudAogICAgZm91bmQgYXQgaHR0cDovL3BvbHltZXIuZ2l0aHViLmlvL1BBVEVOVFMudHh0CiAgICAqLwoKICAgIGNsYXNzIElyb25NZXRhIHsKICAgICAgLyoqCiAgICAgICAqIEBwYXJhbSB7ewogICAgICAgKiAgIHR5cGU6IChzdHJpbmd8bnVsbHx1bmRlZmluZWQpLAogICAgICAgKiAgIGtleTogKHN0cmluZ3xudWxsfHVuZGVmaW5lZCksCiAgICAgICAqICAgdmFsdWU6ICosCiAgICAgICAqIH09fSBvcHRpb25zCiAgICAgICAqLwogICAgICBjb25zdHJ1Y3RvcihvcHRpb25zKSB7CiAgICAgICAgSXJvbk1ldGFbJyAnXShvcHRpb25zKTsKCiAgICAgICAgLyoqIEB0eXBlIHtzdHJpbmd9ICovCiAgICAgICAgdGhpcy50eXBlID0gKG9wdGlvbnMgJiYgb3B0aW9ucy50eXBlKSB8fCAnZGVmYXVsdCc7CiAgICAgICAgLyoqIEB0eXBlIHtzdHJpbmd8bnVsbHx1bmRlZmluZWR9ICovCiAgICAgICAgdGhpcy5rZXkgPSBvcHRpb25zICYmIG9wdGlvbnMua2V5OwogICAgICAgIGlmIChvcHRpb25zICYmICd2YWx1ZScgaW4gb3B0aW9ucykgewogICAgICAgICAgLyoqIEB0eXBlIHsqfSAqLwogICAgICAgICAgdGhpcy52YWx1ZSA9IG9wdGlvbnMudmFsdWU7CiAgICAgICAgfQogICAgICB9CgogICAgICAvKiogQHJldHVybiB7Kn0gKi8KICAgICAgZ2V0IHZhbHVlKCkgewogICAgICAgIHZhciB0eXBlID0gdGhpcy50eXBlOwogICAgICAgIHZhciBrZXkgPSB0aGlzLmtleTsKCiAgICAgICAgaWYgKHR5cGUgJiYga2V5KSB7CiAgICAgICAgICByZXR1cm4gSXJvbk1ldGEudHlwZXNbdHlwZV0gJiYgSXJvbk1ldGEudHlwZXNbdHlwZV1ba2V5XTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIC8qKiBAcGFyYW0geyp9IHZhbHVlICovCiAgICAgIHNldCB2YWx1ZSh2YWx1ZSkgewogICAgICAgIHZhciB0eXBlID0gdGhpcy50eXBlOwogICAgICAgIHZhciBrZXkgPSB0aGlzLmtleTsKCiAgICAgICAgaWYgKHR5cGUgJiYga2V5KSB7CiAgICAgICAgICB0eXBlID0gSXJvbk1ldGEudHlwZXNbdHlwZV0gPSBJcm9uTWV0YS50eXBlc1t0eXBlXSB8fCB7fTsKICAgICAgICAgIGlmICh2YWx1ZSA9PSBudWxsKSB7CiAgICAgICAgICAgIGRlbGV0ZSB0eXBlW2tleV07CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICB0eXBlW2tleV0gPSB2YWx1ZTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KCiAgICAgIC8qKiBAcmV0dXJuIHshQXJyYXk8Kj59ICovCiAgICAgIGdldCBsaXN0KCkgewogICAgICAgIHZhciB0eXBlID0gdGhpcy50eXBlOwoKICAgICAgICBpZiAodHlwZSkgewogICAgICAgICAgdmFyIGl0ZW1zID0gSXJvbk1ldGEudHlwZXNbdGhpcy50eXBlXTsKICAgICAgICAgIGlmICghaXRlbXMpIHsKICAgICAgICAgICAgcmV0dXJuIFtdOwogICAgICAgICAgfQoKICAgICAgICAgIHJldHVybiBPYmplY3Qua2V5cyhpdGVtcykubWFwKGZ1bmN0aW9uKGtleSkgewogICAgICAgICAgICByZXR1cm4gbWV0YURhdGFzW3RoaXMudHlwZV1ba2V5XTsKICAgICAgICA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yIGVsZW1lbnQsIHlvdSBjYW4gaW5jbHVkZSBhIG1ldGEgaW4geW91ciB0ZW1wbGF0ZToKCiAgICAgICAgPGlyb24tbWV0YSBpZD0ibWV0YSI+PC9pcm9uLW1ldGE+CiAgICAgICAgLi4uCiAgICAgICAgdGhpcy4kLm1ldGEuYnlLZXkoJ2luZm8nKTsKCiAgICBAZ3JvdXAgSXJvbiBFbGVtZW50cwogICAgQGRlbW8gZGVtby9pbmRleC5odG1sCiAgICBAZWxlbWVudCBpcm9uLW1ldGEKICAgICovCiAgICBQb2x5bWVyKHsKCiAgICAgIGlzOiAnaXJvbi1tZXRhJywKCiAgICAgIHByb3BlcnRpZXM6IHsKCiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIHR5cGUgb2YgbWV0YS1kYXRhLiAgQWxsIG1ldGEtZGF0YSBvZiB0aGUgc2FtZSB0eXBlIGlzIHN0b3JlZAogICAgICAgICAqIHRvZ2V0aGVyLgogICAgICAgICAqIEB0eXBlIHtzdHJpbmd9CiAgICAgICAgICovCiAgICAgICAgdHlwZTogewogICAgICAgICAgdHlwZTogU3RyaW5nLAogICAgICAgICAgdmFsdWU6ICdkZWZhdWx0JywKICAgICAgICB9LAoKICAgICAgICAvKioKICAgICAgICAgKiBUaGUga2V5IHVzZWQgdG8gc3RvcmUgYHZhbHVlYCB1bmRlciB0aGUgYHR5cGVgIG5hbWVzcGFjZS4KICAgICAgICAgKiBAdHlwZSB7P3N0cmluZ30KICAgICAgICAgKi8KICAgICAgICBrZXk6IHsKICAgICAgICAgIHR5cGU6IFN0cmluZywKICAgICAgICB9LAoKICAgICAgICAvKioKICAgICAgICAgKiBUaGUgbWV0YS1kYXRhIHRvIHN0b3JlIG9yIHJldHJpZXZlLgogICAgICAgICAqIEB0eXBlIHsqfQogICAgICAgICAqLwogICAgICAgIHZhbHVlOiB7CiAgICAgICAgICB0eXBlOiBTdHJpbmcsCiAgICAgICAgICBub3RpZnk6IHRydWUsCiAgICAgICAgfSwKCiAgIC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b24taWNvbi1oZWlnaHQsIDI0cHgpOwogICAgICAgIEBhcHBseSAtLWlyb24taWNvbjsKICAgICAgfQoKICAgICAgOmhvc3QoW2hpZGRlbl0pIHsKICAgICAgICBkaXNwbGF5OiBub25lOwogICAgICB9CiAgICA8L3N0eWxlPgpgLAoKICAgICAgaXM6ICdpcm9uLWljb24nLAoKICAgICAgcHJvcGVydGllczogewoKICAgICAgICAvKioKICAgICAgICAgKiBUaGUgbmFtZSBvZiB0aGUgaWNvbiB0byB1c2UuIFRoZSBuYW1lIHNob3VsZCBiZSBvZiB0aGUgZm9ybToKICAgICAgICAgKiBgaWNvbnNldF9uYW1lOmljb25fbmFtZWAuCiAgICAgICAgICovCiAgICAgICAgaWNvbjoge3R5cGU6IFN0cmluZ30sCgogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBuYW1lIG9mIHRoZSB0aGVtZSB0byB1c2VkLCBpZiBvbmUgaXMgc3BlY2lmaWVkIGJ5IHRoZQogICAgICAgICAqIGljb25zZXQuCiAgICAgICAgICovCiAgICAgICAgdGhlbWU6IHt0eXBlOiBTdHJpbmd9LAoKICAgICAgICAvKioKICAgICAgICAgKiBJZiB1c2luZyBpcm9uLWljb24gd2l0aG91dCBhbiBpY29uc2V0LCB5b3UgY2FuIHNldCB0aGUgc3JjIHRvIGJlCiAgICAgICAgICogdGhlIFVSTCBvZiBhbiBpbmRpdmlkdWFsIGljb24gaW1hZ2UgZmlsZS4gTm90ZSB0aGF0IHRoaXMgd2lsbCB0YWtlCiAgICAgICAgICogcHJlY2VkZW5jZSBvdmVyIGEgZ2l2ZW4gaWNvbiBhdHRyaWJ1dGUuCiAgICAgICAgICovCiAgICAgICAgc3JjOiB7dHlwZTogU3RyaW5nfSwKCiAgICAgICAgLyoqCiAgICAgICAgICogQHR5cGUgeyFJcm9uTWV0YX0KICAgICAgICAgKi8KICAgICAgICBfbWV0YToge3ZhbHVlOiBCYXNlLmNyZWF0ZSgnaXJvbi1tZXRhJywge3R5cGU6ICdpY29uc2V0J30pfQoKICAgICAgfSwKCiAgICAgIG9ic2VydmVyczogWwogICAgICAgICdfdXBkYXRlSWNvbihfbWV0YSwgaXNBdHRhY2hlZCknLAogICAgICAgICdfdXBkYXRlSWNvbih0aGVtZSwgaXNBdHRhY2hlZCknLAogICAgICAgICdfc3JjQ2hhbmdlZChzcmMsIGlzQXR0YWNoZWQpJywKICAgICAgICAnX2ljb25DaGFuZ2VkKGljb24sIGlzQXR0YWNoZWQpJwogICAgICBdLAoKICAgICAgX0RFRkFVTFRfSUNPTlNFVDogJ2ljb25zJywKCiAgICAgIF9pY29uQ2hhbmdlZDogZnVuY3Rpb24oaWNvbikgewogICAgICAgIHZhciBwYXJ0cyA9IChpY29uIHx8ICcnKS5zcGxpdCgnOicpOwogICAgICAgIHRoaXMuX2ljb25OYW1lID0gcGFydHMucG9wKCk7CiAgICAgICAgdGhpcy5faWNvbnNldE5hbWUgPSBwYXJ0cy5wb3AoKSB8fCB0aGlzLl9ERUZBVUxUX0lDT05TRVQ7CiAgICAgICAgdGhpcy5fdXBkYXRlSWNvbigpOwogICAgICB9LAoKICAgICAgX3NyY0NoYW5nZWQ6IGZ1bmN0aW9uKHNyYykgewogICAgICAgIHRoaXMuX3VwZGF0ZUljb24oKTsKICAgICAgfSwKCiAgICAgIF91c2VzSWNvbnNldDogZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuaWNvbiB8fCAhdGhpcy5zcmM7CiAgICAgIH0sCgogICAgICAvKiogQHN1cHByZXNzIHt2aXNpYmlsaXR5fSAqLwogICAgICBfdXBkYXRlSWNvbjogZnVuY3Rpb24oKSB7CiAgICAgICAgaWYgKHRoaXMuX3VzZXNJY29uc2V0KCkpIHsKICAgICAgICAgIGlmICh0aGlzLl9pbWcgJiYgdGhpcy5faW1nLnBhcmVudE5vZGUpIHsKICAgICAgICAgICAgZG9tKHRoaXMucm9vdCkucmVtb3ZlQ2hpbGQodGhpcy5faW1nKTsKICAgICAgICAgIH0KICAgICAgICAgIGlmICh0aGlzLl9pY29uTmFtZSA9PT0gJycpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX2ljb25zZXQpIHsKICAgICAgICAgICAgICB0aGlzLl9pY29uc2V0LnJlbW92ZUljb24odGhpcyk7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0gZWxzZSBpZiAodGhpcy5faWNvbnNldE5hbWUgJiYgdGhpcy5fbWV0YSkgewogICAgICAgICAgICB0aGlzLl9pY29uc2V0ID0gLyoqIEB0eXBlIHs/UG9seW1lci5JY29uc2V0fSAqLyAoCiAgICAgICAgICAgICAgICB0aGlzLl9tZXRhLmJ5S2V5KHRoaXMuX2ljb25zZXROYW1lKSk7CiAgICAgICAgICAgIGlmICh0aGlzLl9pY29uc2V0KSB7CiAgICAgICAgICAgICAgdGhpcy5faWNvbnNldC5hcHBseUljb24odGhpcywgdGhpcy5faWNvbk5hbWUsIHRoaXMudGhlbWUpOwogICAgICAgICAgICAgIHRoaXMudW5saXN0ZW4od2luZG93LCAnaXJvbi1pY29uc2V0LWFkZGVkJywgJ191cGRhdGVJY29uJyk7CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgdGhpcy5saXN0ZW4od2luZG93LCAnaXJvbi1pY29uc2V0LWFkZGVkJywgJ191cGRhdGVJY29uJyk7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICB9IGVsc2UgewogICAgICAgICAgaWYgKHRoaXMuX2ljb25zZXQpIHsKICAgICAgICAgICAgdGhpcy5faWNvbnNldC5yZW1vdmVJY29uKHRoaXMpOwogICAgICAgICAgfQogICAgICAgICAgaWYgKCF0aGlzLl9pbWcpIHsKICAgICAgICAgICAgdGhpcy5faW1nID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnaW1nJyk7CiAgICAgICAgICAgIHRoaXMuX2ltZy5zdHlsZS53aWR0aCA9ICcxMDAlJzsKICAgICAgICAgICAgdGhpcy5faW1nLnN0eWxlLmhlaWdodCA9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bnRhaW4gc3ZnIGljb25zLiBUaGUgc3ZnIGljb24gZWxlbWVudHMgc2hvdWxkIGJlIGNoaWxkcmVuIG9mIHRoZQogICAgICogYGlyb24taWNvbnNldC1zdmdgIGVsZW1lbnQuIE11bHRpcGxlIGljb25zIHNob3VsZCBiZSBnaXZlbiBkaXN0aW5jdCBpZCdzLgogICAgICoKICAgICAqIFVzaW5nIHN2ZyBlbGVtZW50cyB0byBjcmVhdGUgaWNvbnMgaGFzIGEgZmV3IGFkdmFudGFnZXMgb3ZlciB0cmFkaXRpb25hbAogICAgICogYml0bWFwIGdyYXBoaWNzIGxpa2UganBnIG9yIHBuZy4gSWNvbnMgdGhhdCB1c2Ugc3ZnIGFyZSB2ZWN0b3IgYmFzZWQgc28KICAgICAqIHRoZXkgYXJlIHJlc29sdXRpb24gaW5kZXBlbmRlbnQgYW5kIHNob3VsZCBsb29rIGdvb2Qgb24gYW55IGRldmljZS4gVGhleQogICAgICogYXJlIHN0eWxhYmxlIHZpYSBjc3MuIEljb25zIGNhbiBiZSB0aGVtZWQsIGNvbG9yaXplZCwgYW5kIGV2ZW4gYW5pbWF0ZWQuCiAgICAgKgogICAgICogRXhhbXBsZToKICAgICAqCiAgICAgKiAgICAgPGlyb24taWNvbnNldC1zdmcgbmFtZT0ibXktc3ZnLWljb25zIiBzaXplPSIyNCI+CiAgICAgKiAgICAgICA8c3ZnPgogICAgICogICAgICAgICA8ZGVmcz4KICAgICAqICAgICAgICAgICA8ZyBpZD0ic2hhcGUiPgogICAgICogICAgICAgICAgICAgPHJlY3QgeD0iMTIiIHk9IjAiIHdpZHRoPSIxMiIgaGVpZ2h0PSIyNCIgLz4KICAgICAqICAgICAgICAgICAgIDxjaXJjbGUgY3g9IjEyIiBjeT0iMTIiIHI9IjEyIiAvPgogICAgICogICAgICAgICAgIDwvZz4KICAgICAqICAgICAgICAgPC9kZWZzPgogICAgICogICAgICAgPC9zdmc+CiAgICAgKiAgICAgPC9pcm9uLWljb25zZXQtc3ZnP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yb25NZXRhKHt0eXBlOiAnaWNvbnNldCcsIGtleTogbnVsbCwgdmFsdWU6IG51bGx9KTsKICAgICAgfSwKCiAgICAgIGF0dGFjaGVkOiBmdW5jdGlvbigpIHsKICAgICAgICB0aGlzLnN0eWxlLmRpc3BsYXkgPSAnbm9uZSc7CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogQ29uc3RydWN0IGFuIGFycmF5IG9mIGFsbCBpY29uIG5hbWVzIGluIHRoaXMgaWNvbnNldC4KICAgICAgICoKICAgICAgICogQHJldHVybiB7IUFycmF5fSBBcnJheSBvZiBpY29uIG5hbWVzLgogICAgICAgKi8KICAgICAgZ2V0SWNvbk5hbWVzOiBmdW5jdGlvbigpIHsKICAgICAgICB0aGlzLl9pY29ucyA9IHRoaXMuX2NyZWF0ZUljb25NYXAoKTsKICAgICAgICByZXR1cm4gT2JqZWN0LmtleXModGhpcy5faWNvbnMpLm1hcChmdW5jdGlvbihuKSB7CiAgICAgICAgICByZXR1cm4gdGhpcy5uYW1lICsgJzonICsgbjsKICAgICAgICB9LCB0aGlzKTsKICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgKiBBcHBsaWVzIGFuIGljb24gdG8gdGhlIGdpdmVuIGVsZW1lbnQuCiAgICAgICAqCiAgICAgICAqIEFuIHN2ZyBpY29uIGlzIHByZXBlbmRlZCB0byB0aGUgZWxlbWVudCdzIHNoYWRvd1Jvb3QgaWYgaXQgZXhpc3RzLAogICAgICAgKiBvdGhlcndpc2UgdG8gdGhlIGVsZW1lbnQgaXRzZWxmLgogICAgICAgKgogICAgICAgKiBJZiBSVEwgbWlycm9yaW5nIGlzIGVuYWJsZWQsIGFuZCB0aGUgaWNvbiBpcyBtYXJrZWQgdG8gYmUgbWlycm9yZWQgaW4KICAgICAgICogUlRMLCB0aGUgZWxlbWVudCB3aWxsIGJlIHRlc3RlZCAob25jZSBhbmQgb25seSBvbmNlIGV2ZXIgZm9yIGVhY2gKICAgICAgICogaWNvbnNldCkgdG8gZG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Jc1JUTCA9PSBudWxsKSB7CiAgICAgICAgICBpZiAodGhpcy51c2VHbG9iYWxSdGxBdHRyaWJ1dGUpIHsKICAgICAgICAgICAgdmFyIGdsb2JhbEVsZW1lbnQgPQogICAgICAgICAgICAgICAgKGRvY3VtZW50LmJvZHkgJiYgZG9jdW1lbnQuYm9keS5oYXNBdHRyaWJ1dGUoJ2RpcicpKSA/CiAgICAgICAgICAgICAgICBkb2N1bWVudC5ib2R5IDoKICAgICAgICAgICAgICAgIGRvY3VtZW50LmRvY3VtZW50RWxlbWVudDsKCiAgICAgICAgICAgIHRoaXMuX190YXJnZXRJc1JUTCA9IGdsb2JhbEVsZW1lbnQuZ2V0QXR0cmlidXRlKCdkaXInKSA9PT0gJ3J0bCc7CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICBpZiAodGFyZ2V0ICYmIHRhcmdldC5ub2RlVHlwZSAhPT0gTm9kZS5FTEVNRU5UX05PREUpIHsKICAgICAgICAgICAgICB0YXJnZXQgPSB0YXJnZXQuaG9zdDsKICAgICAgICAgICAgfQoKICAgICAgICAgICAgdGhpcy5fX3RhcmdldElzUlRMID0KICAgICAgICAgICAgICAgIHRhcmdldCAmJiB3aW5kb3cuZ2V0Q29tcHV0ZWRTdHlsZSh0YXJnZXQpWydkaXJlY3Rpb24nXSA9PT0gJ3J0bCc7CiAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICByZXR1cm4gdGhpcy5fX3RhcmdldElzUlRMOwogICAgICB9LAoKICAgICAgLyoqCiAgICAgICAqCiAgICAgICAqIFdoZW4gbmFtZSBpcyBjaGFuZ2VkLCByZWdpc3RlciBpY29uc2V0IG1ldGFkYXRhCiAgICAgICAqCiAgICAgICAqLwogICAgICBfbmFtZUNoYW5nZWQ6IGZ1bmN0aW9uKCkgewogICAgICAgIHRoaXMuX21ldGEudmFsdWUgPSBudWxsOwogICAgICAgIHRoaXMuX21ldGEua2V5ID0gdGhpcy5uYW1lOwogICAgICAgIHRoaXMuX21ldGEudmFsdWUgPSB0aGlzOwoKICAgICAgICB0aGlzLmFzeW5jKGZ1bmN0aW9uKCkgewogICAgICAgICAgdGhpcy5maXJlKCdpcm9uLWljb25zZXQtYWRkZWQnLCB0aGlzLCB7bm9kZTogd2luZG93fSk7CiAgICAgICAgfSk7CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogQ3JlYXRlIGEgbWFwIG9mIGNoaWxkIFNWRyBlbGVtZW50cyBieSBpZC4KICAgICAgICoKICAgICAgICogQHJldHVybiB7IU9iamVjdH0gTWFwIG9mIGlkJ3MgdG8gU1ZHIGVsZW1lbnRzLgogICAgICAgKi8KICAgICAgX2NyZWF0ZUljb25NYXA6IGZ1bmN0aW9uKCkgewogICAgICAgIC8vIE9iamVjdHMgY2hhaW5lZCB0byBPYmplY3QucHJvdG90eXBlIChge31gKSBoYXZlIG1lbWJlcnMuIFNwZWNpZmljYWxseSwKICAgICAgICAvLyBvbiBGRiB0aGVyZSBpcyBhIGB3YXRjaGAgbWV0aG9kIHRoYXQgY29uZnVzZXMgdGhlIGljb24gbWFwLCBzbyB3ZQogICAgICAgIC8vIG5lZWQgdG8gdXNlIGEgbnVsbC1iYXNlZCBvYmplY3QgaGVyZS4KICAgICAgICB2YXIgaWNvbnMgPSBPYmplY3QuY3JlYXRlKG51bGwpOwogICAgICAgIGRvbSh0aGlzKS5xdWVyeVNlbGVjdG9yQWxsKCdbaWRdJykuZm9yRWFjaChmdW5jdGlvbihpY29uKSB7CiAgICAgICAgICBpY29uc1tpY29uLmlkXSA9IGljb247CiAgICAgICAgfSk7CiAgICAgICAgcmV0dXJuIGljb25zOwogICAgICB9LAoKICAgICAgLyoqCiAgICAgICAqIFByb2R1Y2UgaW5zdGFsbGFibGUgY2xvbmUgb2YgdGhlIFNWRyBlbGVtZW50IG1hdGNoaW5nIGBpZGAgaW4gdGhpcwogICAgICAgKiBpY29uc2V0LCBvciBgdW5kZWZpbmVkYCBpZiB0aGVyZSBpcyBubyBtYXRjaGluZyBlb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gICAgKiBUcmFuc2Zvcm1zIHRoZSBrZXkuCiAgICAgKiBAcGFyYW0ge3N0cmluZ30ga2V5IFRoZSBLZXlCb2FyZEV2ZW50LmtleQogICAgICogQHBhcmFtIHtCb29sZWFufSBbbm9TcGVjaWFsQ2hhcnNdIExpbWl0cyB0aGUgdHJhbnNmb3JtYXRpb24gdG8KICAgICAqIGFscGhhLW51bWVyaWMgY2hhcmFjdGVycy4KICAgICAqLwogICAgZnVuY3Rpb24gdHJhbnNmb3JtS2V5KGtleSwgbm9TcGVjaWFsQ2hhcnMpIHsKICAgICAgdmFyIHZhbGlkS2V5ID0gJyc7CiAgICAgIGlmIChrZXkpIHsKICAgICAgICB2YXIgbEtleSA9IGtleS50b0xvd2VyQ2FzZSgpOwogICAgICAgIGlmIChsS2V5ID09PSAnICcgfHwgU1BBQ0VfS0VZLnRlc3QobEtleSkpIHsKICAgICAgICAgIHZhbGlkS2V5ID0gJ3NwYWNlJzsKICAgICAgICB9IGVsc2UgaWYgKEVTQ19LRVkudGVzdChsS2V5KSkgewogICAgICAgICAgdmFsaWRLZXkgPSAnZXNjJzsKICAgICAgICB9IGVsc2UgaWYgKGxLZXkubGVuZ3RoID09IDEpIHsKICAgICAgICAgIGlmICghbm9TcGVjaWFsQ2hhcnMgfHwgS0VZX0NIQVIudGVzdChsS2V5KSkgewogICAgICAgICAgICB2YWxpZEtleSA9IGxLZXk7CiAgICAgICAgICB9CiAgICAgICAgfSBlbHNlIGlmIChBUlJPV19LRVkudGVzdChsS2V5KSkgewogICAgICAgICAgdmFsaWRLZXkgPSBsS2V5LnJlcGxhY2UoJ2Fycm93JywgJycpOwogICAgICAgIH0gZWxzZSBpZiAobEtleSA9PSAnbXVsdGlwbHknKSB7CiAgICAgICAgICAvLyBudW1wYWQgJyonIGNhbiBtYXAgdG8gTXVsdGlwbHkgb24gSUUvV2luZG93cwogICAgICAgICAgdmFsaWRLZXkgPSAnKic7CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgIHZhbGlkS2V5ID0gbEtleTsKICAgICAgICB9CiAgICAgIH0KICAgICAgcmV0dXJuIHZhbGlkS2V5OwogICAgfQoKICAgIGZ1bmN0aW9uIHRyYW5zZm9ybUtleUlkZW50aWZpZXIoa2V5SWRlbnQpIHsKICAgICAgdmFyIHZhbGlkS2V5ID0gJyc7CiAgICAgIGlmIChrZXlJZGVudCkgewogICAgICAgIGlmIChrZXlJZGVudCBpbiBLRVlfSURFTlRJRklFUikgewogICAgICAgICAgdmFsaWRLZXkgPSBLRVlfSURFTlRJRklFUltrZXlJZGVudF07CiAgICAgICAgfSBlbHNlIGlmIChJREVOVF9DSEFSLnRlc3Qoa2V5SWRlbnQpKSB7CiAgICAgICAgICBrZXlJZGVudCA9IHBhcnNlSW50KGtleUlkZW50LnJlcGxhY2UoJ1UrJywgJzB4JyksIDE2KTsKICAgICAgICAgIHZhbGlkS2V5ID0gU3RyaW5nLmZyb21DaGFyQ29kZShrZXlJZGVudCkudG9Mb3dlckNhc2UoKTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgdmFsaWRLZXkgPSBrZXlJZGVudC50b0xvd2VyQ2FzZSgpOwogICAgICAgIH0KICAgICAgfQogICAgICByZXR1cm4gdmFsaWRLZXk7CiAgICB9CgogICAgZnVuY3Rpb24gdHJhbnNmb3JtS2V5Q29kZShrZXlDb2RlKSB7CiAgICAgIHZhciB2YWxpZEtleSA9ICcnOwogICAgICBpZiAoTnVtYmVyKGtleUNvZGUpKSB7CiAgICAgICAgaWYgKGtleUNvZGUgPj0gNjUgJiYga2V5Q29kZSA8PSA5MCkgewogICAgICAgICAgLy8gYXNjaWkgYS16CiAgICAgICAgICAvLyBsb3dlcmNhc2UgaXMgMzIgb2Zmc2V0IGZyb20gdXBwZXJjYXNlCiAgICAgICAgICB2YWxpZEtleSA9IFN0cmluZy5mcm9tQ2hhckNvZGUoMzIgKyBrZXlDb2RlKTsKICAgICAgICB9IGVsc2UgaWYgKGtleUNvZGUgPj0gMTEyICYmIGtleU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mV2ZW50KTsgLy8gRVZFTlQsIGUuZy4gImtleWRvd24iCiAgICAgKiAgICAgICAgY29uc29sZS5sb2coZXZlbnQuZGV0YWlsLmtleWJvYXJkRXZlbnQpOyAvLyB0aGUgb3JpZ2luYWwgS2V5Ym9hcmRFdmVudAogICAgICogICAgICB9CiAgICAgKgogICAgICogVXNlIHRoZSBga2V5RXZlbnRUYXJnZXRgIGF0dHJpYnV0ZSB0byBzZXQgdXAgZXZlbnQgaGFuZGxlcnMgb24gYSBzcGVjaWZpYwogICAgICogbm9kZS4KICAgICAqCiAgICAgKiBTZWUgdGhlIFtkZW1vIHNvdXJjZQogICAgICogY29kZV0oaHR0cHM6Ly9naXRodWIuY29tL1BvbHltZXJFbGVtZW50cy9pcm9uLWExMXkta2V5cy1iZWhhdmlvci9ibG9iL21hc3Rlci9kZW1vL3gta2V5LWF3YXJlLmh0bWwpCiAgICAgKiBmb3IgYW4gZXhhbXBsZS4KICAgICAqCiAgICAgKiBAZGVtbyBkZW1vL2luZGV4Lmh0bWwKICAgICAqIEBwb2x5bWVyQmVoYXZpb3IKICAgICAqLwogICAgY29uc3QgSXJvbkExMXlLZXlzQmVoYXZpb3IgPSB7CiAgICAgIHByb3BlcnRpZXM6IHsKICAgICAgICAvKioKICAgICAgICAgKiBUaGUgRXZlbnRUYXJnZXQgdGhhdCB3aWxsIGJlIGZpcmluZyByZWxldmFudCBLZXlib2FyZEV2ZW50cy4gU2V0IGl0IHRvCiAgICAgICAgICogYG51bGxgIHRvIGRpc2FibGUgdGhlIGxpc3RlbmVycy4KICAgICAgICAgKiBAdHlwZSB7P0V2ZW50VGFyZ2V0fQogICAgICAgICAqLwogICAgICAgIGtleUV2ZW50VGFyZ2V0OiB7CiAgICAgICAgICB0eXBlOiBPYmplY3QsCiAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24oKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgfQogICAgICAgIH0sCgogICAgICAgIC8qKgogICAgICAgICAqIElmIHRydWUsIHRoaXMgcHJvcGVydHkgd2lsbCBjYXVzZSB0aGUgaW1wbGVtZW50aW5nIGVsZW1lbnQgdG8KICAgICAgICAgKiBhdXRvbWF0aWNhbGx5IHN0b3AgcHJvcGFnYXRpb24gb24gYW55IGhhbmRsZWQgS2V5Ym9hcmRFdmVudHMuCiAgICAgICAgICovCiAgICAgICAgc3RvcEtleWJvYXJkRXZlbnRQcm9wYWdhdGlvbjoge3R5cGU6IEJvb2xlYW4sIHZhbHVlOiBmYWxzZX0sCgogICAgICAgIF9ib3VuZEtleUhhbmRsZXJzOiB7CiAgICAgICAgICB0eXBlOiBBcnJheSwKICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbigpIHsKICAgICAgICAgICAgcmV0dXJuIFtdOwogICAgICAgICAgfQogICAgICAgIH0sCgogICAgICAgIC8vIFdlIHVzZSB0aGlzIGR1ZSB0byBhIGxpbWl0YXRpb24gaW4gSUUxMCB3aGVyZSBpbnN0YW5jZXMgd2lsbCBoYXZlCiAgICAgICAgLy8gb3duIHByb3BlcnRpZXMgb2YgZXZlcnl0aGluZyBvbiB0aGUgInByb3RvdHlwZSIuCiAgICAgICAgX2ltcGVyYXRpdmVLZXlCaW5kaW5nczogewogICAgICAgICAgdHlwZTogT2JqZWN0LAogICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uKCkgewogICAgICAgICAgICByZXR1cm4ge307CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9LAoKICAgICAgb2JzZXJ2ZXJzOiBbJ19yZXNldEtleUV2ZW50TGlzdGVuZXJzKGtleUV2ZW50VGFyZ2V0LCBfYm91bmRLZXlIYW5kbGVycyknXSwKCgogICAgICAvKioKICAgICAgICogVG8gYmUgdXNlZCB0byBleHByZXNzIHdoYXQgY29tYmluYXRpb24gb2Yga2V5cyAgd2lsbCB0cmlnZ2VyIHRoZSByZWxhdGl2ZQogICAgICAgKiBjYWxsYmFjay4gZS5nLiBga2V5QmluZGluZ3M6IHsgJ2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qCiAgICAgICAqIFdoZW4gY2FsbGVkLCB3aWxsIHJlbW92ZSBhbGwgaW1wZXJhdGl2ZWx5LWFkZGVkIGtleSBiaW5kaW5ncy4KICAgICAgICovCiAgICAgIHJlbW92ZU93bktleUJpbmRpbmdzOiBmdW5jdGlvbigpIHsKICAgICAgICB0aGlzLl9pbXBlcmF0aXZlS2V5QmluZGluZ3MgPSB7fTsKICAgICAgICB0aGlzLl9wcmVwS2V5QmluZGluZ3MoKTsKICAgICAgICB0aGlzLl9yZXNldEtleUV2ZW50TGlzdGVuZXJzKCk7CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogUmV0dXJucyB0cnVlIGlmIGEga2V5Ym9hcmQgZXZlbnQgbWF0Y2hlcyBgZXZlbnRTdHJpbmdgLgogICAgICAgKgogICAgICAgKiBAcGFyYW0ge0tleWJvYXJkRXZlbnR9IGV2ZW50CiAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBldmVudFN0cmluZwogICAgICAgKiBAcmV0dXJuIHtib29sZWFufQogICAgICAgKi8KICAgICAga2V5Ym9hcmRFdmVudE1hdGNoZXNLZXlzOiBmdW5jdGlvbihldmVudCwgZXZlbnRTdHJpbmcpIHsKICAgICAgICB2YXIga2V5Q29tYm9zID0gcGFyc2VFdmVudFN0cmluZyhldmVudFN0cmluZyk7CiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBrZXlDb21ib3MubGVuZ3RoOyArK2kpIHsKICAgICAgICAgIGlmIChrZXlDb21ib01hdGNoZXNFdmVudChrZXlDb21ib3NbaV0sIGV2ZW50KSkgewogICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICB9LAoKICAgICAgX2NvbGxlY3RLZXlCaW5kaW5nczogZnVuY3Rpb24oKSB7CiAgICAgICAgdmFyIGtleUJpbmRpbmdzID0gdGhpcy5iZWhhdmlvcnMubWFwKGZ1bmN0aW9uKGJlaGF2aW9yKSB7CiAgICAgICAgICByZXR1cm4gYmVoYXZpb3Iua2V5QmluZGluZ3M7CiAgICAgICAgfSk7CgogICAgICAgIGlmIChrZXlCaW5kaW5ncy5pbmRleE9mKHRoaXMua2V5QmluZGluZ3MpID09PSAtMSkgewogICAgICAgICAga2V5QmluZGluZ3MucHVzaCh0aGlzLmtleUJpbmRpbmdzKTsKICAgICAgICB9CgogICAgICAgIHJldHVybiBrZXlCaW5kaW5nczsKICAgICAgfSwKCiAgICAgIF9wcmVwS2V5QmluZGluZ3M6IGZ1bmN0aW9uKCkgewogICAgICAgIHRoaXMuX2tleUJpbmRpbmdzID0ge307CgogICAgICAgIHRoaXMuX2NvbGxlY3RLZXlCaW5kaW5ncygpLmZvckVhY2goZnVuY3Rpb24oa2V5QmluZGluZ3MpIHsKICAgICAgICAgIGZvciAodmFyIGV2ZW50U3RyaW5nIGluIGtleUJpbmRpbmdzKSB7CiAgICAgICAgICAgIHRoaXMuX2FkZEtleUJpbmRpbmcoZXZlbnRTdHJpbmcsIGtleUJpbmRpbmdzW2V2ZW50U3RyaW5nXSk7CiAgICAgICAgICB9CiAgICAgICAgfSwgdGhpcyk7CgogICAgICAgIGZvciAodmFyIGV2ZW50U3RyaW5nIGluIHRoaXMuX2ltcGVyYXRpdmVLZXlCaW5kaW5ncykgewogICAgICAgICAgdGhpcy5fYWRkS2V5QmluZGluZygKICAgICAgICAgICAgICBldmVudFN0cmluZywgdGhpcy5faW1wZXJhdGl2ZUtleUJpbmRpbmdzW2V2ZW50U3RyaW5nXSk7CiAgICAgICAgfQoKICAgICAgICAvLyBHaXZlIHByZWNlZGVuY2UgdG8gY29tYm9zIHdpdGggbW9kaWZpZXJzIHRvIGJlIGNoZWNrZWQgZmlyc3QuCiAgICAgICAgZm9yICh2YXIgZXZlbnROYW1lIGluIHRoaXMuX2tleUJpbmRpbmdzKSB7CiAgICAgICAgICB0aGlzLl9rZXlCaW5kaW5nc1tldmVudE5hbWVdLnNvcnQoZnVuY3Rpb24oa2IxLCBrYjIpIHsKICAgICAgICAgICAgdmFyIGIxID0ga2IxWzBdLmhhc01vZGlmaWVyczsKICAgICAgICAgICAgdmFyIGIyID0ga2IyWzBdLmhhc01vZGlmaWVyczsKICAgICAgICAgICAgcmV0dXJuIChiMSA9PT0gYjIpID8gMCA6IGIxID8gLTEgOiAxOwogICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICB9LAoKICAgICAgX2FkZEtleUJpbmRpbmc6IGZ1bmN0aW9uKGV2ZW50U3RyaW5nLCBoYW5kbGVyTmFtZSkgewogICAgICAgIHBhcnNlRXZlbnRTdHJpbmcoZXZlbnRTdHJpbmcpLmZvckVhY2goZnVuY3Rpb24oa2V5Q29tYm8pIHsKICAgICAgICAgIHRoaXMuX2tleUJpbmRpbmdzW2tleUNvbWJvLmV2ZW50XSA9CiAgICAgICAgICAgICAgdGhpcy5fa2V5QmluZGluZ3Nba2V5Q29tYm8uZXZlbnRdIHx8IFtdOwoKICAgICAgICAgIHRoaXMuX2tleUJpbmRpbmdzW2tleUNvbWJvLmV2ZW50XS5wdXNoKFtrZXlDb21ibywgaGFuZGxlck5hbWVdKTsKICAgICAgICB9LCB0aGlzKTsKICAgICAgfSwKCiAgICAgIF9yZXNldEtleUV2ZW50TGlzdGVuZXJzOiBmdW5jdGlvbigpIHsKICAgICAgICB0aGlzLl91bmxpc3RlbktleUV2ZW50TGlzdGVuZXJzKCk7CgogICAgICAgIGlmICh0aGlzLmlzQXR0YWNoZWQpIHsKICAgICAgICAgIHRoaXMuX2xpc3RlbktleUV2ZW50TGlzdGVuZXJzKCk7CiAgICAgICAgfQogICAgICB9LAoKICAgICAgX2xpc3RlbktleUV2ZW50TGlzdGVuZXJzOiBmdW5jdGlvbigpIHsKICAgICAgICBpZiAoIXRoaXMua2V5RXZlbnRUYXJnZXQpIHsKICAgICAgICAgIHJldHVybjsKICAgICAgICB9CiAgICAgICAgT2JqZWN0LmtleXModGhpcy5fa2V5QmluZGluZ3MpLmZv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uZGxlclR1cGxlWzJdOwoKICAgICAgICAgIGtleUV2ZW50VGFyZ2V0LnJlbW92ZUV2ZW50TGlzdGVuZXIoZXZlbnROYW1lLCBib3VuZEtleUhhbmRsZXIpOwogICAgICAgIH0KICAgICAgfSwKCiAgICAgIF9vbktleUJpbmRpbmdFdmVudDogZnVuY3Rpb24oa2V5QmluZGluZ3MsIGV2ZW50KSB7CiAgICAgICAgaWYgKHRoaXMuc3RvcEtleWJvYXJkRXZlbnRQcm9wYWdhdGlvbikgewogICAgICAgICAgZXZlbnQuc3RvcFByb3BhZ2F0aW9uKCk7CiAgICAgICAgfQoKICAgICAgICAvLyBpZiBldmVudCBoYXMgYmVlbiBhbHJlYWR5IHByZXZlbnRlZCwgZG9uJ3QgZG8gYW55dGhpbmcKICAgICAgICBpZiAoZXZlbnQuZGVmYXVsdFByZXZlbnRlZCkgewogICAgICAgICAgcmV0dXJuOwogICAgICAgIH0KCiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBrZXlCaW5kaW5ncy5sZW5ndGg7IGkrKykgewogICAgICAgICAgdmFyIGtleUNvbWJvID0ga2V5QmluZGluZ3NbaV1bMF07CiAgICAgICAgICB2YXIgaGFuZGxlck5hbWUgPSBrZXlCaW5kaW5nc1tpXVsxXTsKICAgICAgICAgIGlmIChrZXlDb21ib01hdGNoZXNFdmVudChrZXlDb21ibywgZXZlbnQpKSB7CiAgICAgICAgICAgIHRoaXMuX3RyaWdnZXJLZXlIYW5kbGVyKGtleUNvbWJvLCBoYW5kbGVyTmFtZSwgZXZlbnQpOwogICAgICAgICAgICAvLyBleGl0IHRoZSBsb29wIGlmIGV2ZW50RGVmYXVsdCB3YXMgcHJldmVudGVkCiAgICAgICAgICAgIGlmIChldmVudC5kZWZhdWx0UHJldmVudGVkKSB7CiAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9LAoKICAgICAgX3RyaWdnZXJLZXlIYW5kb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WVzOgogICAgICAgICAqCiAgICAgICAgICogIyMjIEVsZW1lbnRzIGlkCiAgICAgICAgICoKICAgICAgICAgKmBgYGh0bWwKICAgICAgICAgKiA8ZGl2IGlkPSJzY3JvbGxhYmxlLWVsZW1lbnQiIHN0eWxlPSJvdmVyZmxvdzogYXV0bzsiPgogICAgICAgICAqICA8eC1lbGVtZW50IHNjcm9sbC10YXJnZXQ9InNjcm9sbGFibGUtZWxlbWVudCI+CiAgICAgICAgICogICAgPCEtLSBDb250ZW50LS0+CiAgICAgICAgICogIDwveC1lbGVtZW50PgogICAgICAgICAqIDwvZGl2PgogICAgICAgICAqYGBgCiAgICAgICAgICogSW4gdGhpcyBjYXNlLCB0aGUgYHNjcm9sbFRhcmdldGAgd2lsbCBwb2ludCB0byB0aGUgb3V0ZXIgZGl2IGVsZW1lbnQuCiAgICAgICAgICoKICAgICAgICAgKiAjIyMgRG9jdW1lbnQgc2Nyb2xsaW5nCiAgICAgICAgICoKICAgICAgICAgKiBGb3IgZG9jdW1lbnQgc2Nyb2xsaW5nLCB5b3UgY2FuIHVzZSB0aGUgcmVzZXJ2ZWQgd29yZCBgZG9jdW1lbnRgOgogICAgICAgICAqCiAgICAgICAgICpgYGBodG1sCiAgICAgICAgICogPHgtZWxlbWVudCBzY3JvbGwtdGFyZ2V0PSJkb2N1bWVudCI+CiAgICAgICAgICogICA8IS0tIENvbnRlbnQgLS0+CiAgICAgICAgICogPC94LWVsZW1lbnQ+CiAgICAgICAgICpgYGAKICAgICAgICAgKgogICAgICAgICAqICMjIyBFbGVtZW50cyByZWZlcmVuY2UKICAgICAgICAgKgogICAgICAgICAqYGBganMKICAgICAgICAgKiBhcHBIZWFkZXIuc2Nyb2xsVGFyZ2V0ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3Njcm9sbGFibGUtZWxlbWVudCcpOwogICAgICAgICAqYGBgCiAgICAgICAgICoKICAgICAgICAgKiBAdHlwZSB7SFRNTEVsZW1lbnR9CiAgICAgICAgICog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aGlzLl9kb2M7CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogU2hvcnRjdXQgZm9yIHRoZSBkb2N1bWVudCBlbGVtZW50CiAgICAgICAqCiAgICAgICAqIEB0eXBlIHtFbGVtZW50fQogICAgICAgKi8KICAgICAgZ2V0IF9kb2MoKSB7CiAgICAgICAgcmV0dXJuIHRoaXMub3duZXJEb2N1bWVudC5kb2N1bWVudEVsZW1lbnQ7CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogR2V0cyB0aGUgbnVtYmVyIG9mIHBpeGVscyB0aGF0IHRoZSBjb250ZW50IG9mIGFuIGVsZW1lbnQgaXMgc2Nyb2xsZWQKICAgICAgICogdXB3YXJkLgogICAgICAgKgogICAgICAgKiBAdHlwZSB7bnVtYmVyfQogICAgICAgKi8KICAgICAgZ2V0IF9zY3JvbGxUb3AoKSB7CiAgICAgICAgaWYgKHRoaXMuX2lzVmFsaWRTY3JvbGxUYXJnZXQoKSkgewogICAgICAgICAgcmV0dXJuIHRoaXMuc2Nyb2xsVGFyZ2V0ID09PSB0aGlzLl9kb2MgPyB3aW5kb3cucGFnZVlPZmZzZXQgOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNjcm9sbFRhcmdldC5zY3JvbGxUb3A7CiAgICAgICAgfQogICAgICAgIHJldHVybiAwOwogICAgICB9LAoKICAgICAgLyoqCiAgICAgICAqIEdldHMgdGhlIG51bWJlciBvZiBwaXhlbHMgdGhhdCB0aGUgY29udGVudCBvZiBhbiBlbGVtZW50IGlzIHNjcm9sbGVkIHRvIHRoZQogICAgICAgKiBsZWZ0LgogICAgICAgKgogICAgICAgKiBAdHlwZSB7bnVtYmVyfQogICAgICAgKi8KICAgICAgZ2V0IF9zY3JvbGxMZWZ0KCkgewogICAgICAgIGlmICh0aGlzLl9pc1ZhbGlkU2Nyb2xsVGFyZ2V0KCkpIHsKICAgICAgICAgIHJldHVybiB0aGlzLnNjcm9sbFR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ICAgdGhpcy5zY3JvbGxUYXJnZXQuc2Nyb2xsTGVmdCA9IGxlZnQ7CiAgICAgICAgICB0aGlzLnNjcm9sbFRhcmdldC5zY3JvbGxUb3AgPSB0b3A7CiAgICAgICAgfQogICAgICB9LAoKICAgICAgLyoqCiAgICAgICAqIEdldHMgdGhlIHdpZHRoIG9mIHRoZSBzY3JvbGwgdGFyZ2V0LgogICAgICAgKgogICAgICAgKiBAdHlwZSB7bnVtYmVyfQogICAgICAgKi8KICAgICAgZ2V0IF9zY3JvbGxUYXJnZXRXaWR0aCgpIHsKICAgICAgICBpZiAodGhpcy5faXNWYWxpZFNjcm9sbFRhcmdldCgpKSB7CiAgICAgICAgICByZXR1cm4gdGhpcy5zY3JvbGxUYXJnZXQgPT09IHRoaXMuX2RvYyA/IHdpbmRvdy5pbm5lcldpZHRoIDoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zY3JvbGxUYXJnZXQub2Zmc2V0V2lkdGg7CiAgICAgICAgfQogICAgICAgIHJldHVybiAwOwogICAgICB9LAoKICAgICAgLyoqCiAgICAgICAqIEdldHMgdGhlIGhlaWdodCBvZiB0aGUgc2Nyb2xsIHRhcmdldC4KICAgICAgICoKICAgICAgICogQHR5cGUge251bWJlcn0KICAgICAgICovCiAgICAgIGdldCBfc2Nyb2xsVGFyZ2V0SGVpZ2h0KCkgewogICAgICAgIGlmICh0aGlzLl9pc1ZhbGlkU2Nyb2xsVGFyZ2V0KCkpIHsKICAgICAgICAgIHJldHVybiB0aGlzLnNjcm9sbFRhcmdldCA9PT0gdGhpcy5fZG9jID8gd2luZG93LmlubmVySGVpZ2h0IDoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zY3JvbGxUYXJnZXQub2Zmc2V0SGVpZ2h0OwogICAgICAgIH0KICAgICAgICByZXR1cm4gMDsKICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgK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cHV0KQogICAgYGBgaHRtbAogICAgPGhlYWQ+CiAgICAgIDxzdHlsZT4KICAgICAgICBib2R5IHsKICAgICAgICAgIGhlaWdodDogMTAwdmg7CiAgICAgICAgICBtYXJnaW46IDA7CiAgICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgICAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjsKICAgICAgICB9CgogICAgICAgIGFwcC10b29sYmFyIHsKICAgICAgICAgIHBvc2l0aW9uOiBmaXhlZDsKICAgICAgICAgIHRvcDogMDsKICAgICAgICAgIGxlZnQ6IDA7CiAgICAgICAgICByaWdodDogMDsKICAgICAgICB9CgogICAgICAgIGlyb24tbGlzdCB7CiAgICAgICAgICAvKiBhZGQgcGFkZGluZyBzaW5jZSB0aGUgYXBwLXRvb2xiYXIgaXMgZml4ZWQgYXQgdGhlIHRvcCAqXC8KICAgICAgICAgIHBhZGRpbmctdG9wOiA2NHB4OwogICAgICAgIH0KICAgICAgPC9zdHlsZT4KICAgIDwvaGVhZD4KICAgIDxib2R5PgogICAgICA8YXBwLXRvb2xiYXI+QXBwIG5hbWU8L2FwcC10b29sYmFyPgogICAgICA8aXJvbi1saXN0IHNjcm9sbC10YXJnZXQ9ImRvY3VtZW50Ij4KICAgICAgICA8dGVtcGxhdGU+CiAgICAgICAgICA8ZGl2PgogICAgICAgICAgICAuLi4KICAgICAgICAgIDwvZGl2PgogICAgICAgIDwvdGVtcGxhdGU+CiAgICAgIDwvaXJvbi1saXN0PgogICAgPC9ib2R5PgogICAgYGBgCgogICAgYGlyb24tbGlzdGAgbXVzdCBiZSBnaXZlbiBhIGA8dGVtcGxhdGU+YCB3aGljaCBjb250YWlucyBleGFjdGx5IG9uZSBlbGVtZW50LiBJbgogICAgdGhlIGV4YW1wbGVzIGFib3ZlIHdlIHVzZWQgYSBgPGRpdj5gLCBidXQgeW91IGNhbiBwcm92aWRlIGFueSBlbGVtZW50IChpbmNsdWRpbmcKICAgIGN1c3RvbSBlbGVtZW50cyk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YWRkIHRvIHRoZSBiaW5kaW5nIHNjb3BlIHdpdGggdGhlIGluZGV4CiAgICAgICAgICogZm9yIHRoZSByb3cuCiAgICAgICAgICovCiAgICAgICAgaW5kZXhBczoge3R5cGU6IFN0cmluZywgdmFsdWU6ICdpbmRleCd9LAoKICAgICAgICAvKioKICAgICAgICAgKiBUaGUgbmFtZSBvZiB0aGUgdmFyaWFibGUgdG8gYWRkIHRvIHRoZSBiaW5kaW5nIHNjb3BlIHRvIGluZGljYXRlCiAgICAgICAgICogaWYgdGhlIHJvdyBpcyBzZWxlY3RlZC4KICAgICAgICAgKi8KICAgICAgICBzZWxlY3RlZEFzOiB7dHlwZTogU3RyaW5nLCB2YWx1ZTogJ3NlbGVjdGVkJ30sCgogICAgICAgIC8qKgogICAgICAgICAqIFdoZW4gdHJ1ZSwgdGhlIGxpc3QgaXMgcmVuZGVyZWQgYXMgYSBncmlkLiBHcmlkIGl0ZW1zIG11c3QgaGF2ZQogICAgICAgICAqIGZpeGVkIHdpZHRoIGFuZCBoZWlnaHQgc2V0IHZpYSBDU1MuIGUuZy4KICAgICAgICAgKgogICAgICAgICAqIGBgYGh0bWwKICAgICAgICAgKiA8aXJvbi1saXN0IGdyaWQ+CiAgICAgICAgICogICA8dGVtcGxhdGU+CiAgICAgICAgICogICAgICA8ZGl2IHN0eWxlPSJ3aWR0aDogMTAwcHg7IGhlaWdodDogMTAwcHg7Ij4gMTAweDEwMCA8L2Rpdj4KICAgICAgICAgKiAgIDwvdGVtcGxhdGU+CiAgICAgICAgICogPC9pcm9uLWxpc3Q+CiAgICAgICAgICogYGBgCiAgICAgICAgICovCiAgICAgICAgZ3JpZDogewogICAgICAgICAgdHlwZTogQm9vbGVhbiwKICAgICAgICAgIHZhbHVlOiBmYWxzZSwKICAgICAgICAgIHJlZmxlY3RUb0F0dHJpYnV0ZTogdHJ1ZSwKICAgICAgICAgIG9ic2VydmVyOiAnX2dyaWRDaGFuZ2VkJwogICAgICAgIH0sCgogICAgICAgIC8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kIGFzIHRoZSB2aWV3cG9ydCBpbiB0aGUgY29udGV4dCBvZgogICAgICAgKiBsaXN0LgogICAgICAgKi8KICAgICAgX3ZpZXdwb3J0SGVpZ2h0OiAwLAoKICAgICAgLyoqCiAgICAgICAqIFRoZSB3aWR0aCBvZiB0aGUgbGlzdC4gVGhpcyBpcyByZWZlcnJlZCBhcyB0aGUgdmlld3BvcnQgaW4gdGhlIGNvbnRleHQgb2YKICAgICAgICogbGlzdC4KICAgICAgICovCiAgICAgIF92aWV3cG9ydFdpZHRoOiAwLAoKICAgICAgLyoqCiAgICAgICAqIEFuIGFycmF5IG9mIERPTSBub2RlcyB0aGF0IGFyZSBjdXJyZW50bHkgaW4gdGhlIHRyZWUKICAgICAgICogQHR5cGUgez9BcnJheTwhSFRNTEVsZW1lbnQ+fQogICAgICAgKi8KICAgICAgX3BoeXNpY2FsSXRlbXM6IG51bGwsCgogICAgICAvKioKICAgICAgICogQW4gYXJyYXkgb2YgaGVpZ2h0cyBmb3IgZWFjaCBpdGVtIGluIGBfcGh5c2ljYWxJdGVtc2AKICAgICAgICogQHR5cGUgez9BcnJheTxudW1iZXI+fQogICAgICAgKi8KICAgICAgX3BoeXNpY2FsU2l6ZXM6IG51bGwsCgogICAgICAvKioKICAgICAgICogQSBjYWNoZWQgdmFsdWUgZm9yIHRoZSBmaXJzdCB2aXNpYmxlIGluZGV4LgogICAgICAgKiBTZWUgYGZpcnN0VmlzaWJsZUluZGV4YAogICAgICAgKiBAdHlwZSB7P251bWJlcn0KICAgICAgICovCiAgICAgIF9maXJzdFZpc2libGVJbmRleFZhbDogbnVsbCwKCiAgICAgIC8qKgogICAgICAgKiBBIGNhY2hlZCB2YWx1ZSBmb3IgdGhlIGxhc3QgdmlzaWJsZSBpbmRleC4KICAgICAgICogU2VlIGBsYXN0VmlzaWJsZUluZGV4YAogICAgICAgKiBAdHlwZSB7P251bWJlcn0KICAgICAgICovCiAgICAgIF9sYXN0VmlzaWJsZUluZGV4VmFsOiBudWxs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sUG9zaXRpb24pIHsKICAgICAgICAgICAgICByZXR1cm4gdGhpcy5ncmlkID8gdmlkeCAtICh2aWR4ICUgdGhpcy5faXRlbXNQZXJSb3cpIDogdmlkeDsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBIYW5kbGUgYSBwYXJ0aWFsbHkgcmVuZGVyZWQgZmluYWwgcm93IGluIGdyaWQgbW9kZQogICAgICAgICAgICBpZiAodGhpcy5ncmlkICYmIHRoaXMuX3ZpcnR1YWxDb3VudCAtIDEgPT09IHZpZHgpIHsKICAgICAgICAgICAgICByZXR1cm4gdmlkeCAtICh2aWR4ICUgdGhpcy5faXRlbXNQZXJSb3cpOwogICAgICAgICAgICB9CiAgICAgICAgICB9KSB8fAogICAgICAgICAgICAgIDA7CiAgICAgICAgICB0aGlzLl9maXJzdFZpc2libGVJbmRleFZhbCA9IGlkeDsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGlkeDsKICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgKiBHZXRzIHRoZSBpbmRleCBvZiB0aGUgbGFzdCB2aXNpYmxlIGl0ZW0gaW4gdGhlIHZpZXdwb3J0LgogICAgICAgKgogICAgICAgKiBAdHlwZSB7bnVtYmVyfQogICAgICAgKi8KICAgICAgZ2V0IGxhc3RWaXNpYmxlSW5kZXgoKSB7CiAgICAgICAgdmFyIGlkeCA9IHRoaXMuX2xhc3RWaXNpYmxlSW5kZXhWYWw7CiAgICAgICAgaWYgKGlkeCA9PSBudWxsKSB7CiAgICAgICAgICBpZiAodGhpcy5ncmlkKSB7CiAgICAgICAgICAgIGlkeCA9IE1hdGgubWluKAogICAgICAgICAgICAgICAgdGhpcy5fdmlydHVhbENvdW50LAogICAgICAgICAgICAgICAgdGhpcy5maXJzdFZpc2libGVJbmRleCArIHRoaXMuX2VzdFJvd3NJblZpZXcgKiB0aGlzLl9pdGVtc1BlclJvdyAtCiAgICAgICAgICAgICAgICAgICAgMSk7CiAgICAgICAgICB9IGVsc2UgewogICAgICA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5jcmVhc2VQb29sSWZOZWVkZWQnLAogICAgICAgICAgICAgIHRoaXMuX2luY3JlYXNlUG9vbElmTmVlZGVkLmJpbmQodGhpcywgMCksCiAgICAgICAgICAgICAgbWljcm9UYXNrKTsKICAgICAgICB9CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogUmV0dXJucyBhbiBvYmplY3QgdGhhdCBjb250YWlucyB0aGUgaW5kZXhlcyBvZiB0aGUgcGh5c2ljYWwgaXRlbXMKICAgICAgICogdGhhdCBtaWdodCBiZSByZXVzZWQgYW5kIHRoZSBwaHlzaWNhbFRvcC4KICAgICAgICoKICAgICAgICogQHBhcmFtIHtib29sZWFufSBmcm9tVG9wIElmIHRoZSBwb3RlbnRpYWwgcmV1c2FibGUgaXRlbXMgYXJlIGFib3ZlIHRoZSBzY3JvbGxpbmcgcmVnaW9uLgogICAgICAgKi8KICAgICAgX2dldFJldXNhYmxlczogZnVuY3Rpb24oZnJvbVRvcCkgewogICAgICAgIHZhciBpdGgsIGxhc3RJdGgsIG9mZnNldENvbnRlbnQsIHBoeXNpY2FsSXRlbUhlaWdodDsKICAgICAgICB2YXIgaWR4cyA9IFtdOwogICAgICAgIHZhciBwcm90ZWN0ZWRPZmZzZXRDb250ZW50ID0gdGhpcy5faGlkZGVuQ29udGVudFNpemUgKiB0aGlzLl9yYXRpbzsKICAgICAgICB2YXIgdmlydHVhbFN0YXJ0ID0gdGhpcy5fdmlydHVhbFN0YXJ0OwogICAgICAgIHZhciB2aXJ0dWFsRW5kID0gdGhpcy5fdmlydHVhbEVuZDsKICAgICAgICB2YXIgcGh5c2ljYWxDb3VudCA9IHRoaXMuX3BoeXNpY2FsQ291bnQ7CiAgICAgICAgdmFyIHRvcCA9IHRoaXMuX3BoeXNpY2FsVG9wICsgdGhpcy5fc2Nyb2xsT2Zmc2V0OwogICAgICAgIHZhciBib3R0b20gPSB0aGlzLl9waHlzaWNhbEJvdHRvbSArIHRoaXMuX3Njcm9sbE9mZnNldDsKICAgICAgICA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dlLgogICAgICAgICAgICBpZiAodmlydHVhbEVuZCArIGlkeHMubGVuZ3RoICsgMSA+PSB0aGlzLl92aXJ0dWFsQ291bnQpIHsKICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBDaGVjayB0aGF0IHRoZSBpbmRleCBpcyBub3QgdmlzaWJsZS4KICAgICAgICAgICAgaWYgKHRvcCArIHBoeXNpY2FsSXRlbUhlaWdodCA+PSBzY3JvbGxUb3AgLSB0aGlzLl9zY3JvbGxPZmZzZXQpIHsKICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZHhzLnB1c2goaXRoKTsKICAgICAgICAgICAgdG9wID0gdG9wICsgcGh5c2ljYWxJdGVtSGVpZ2h0OwogICAgICAgICAgICBpdGggPSAoaXRoICsgMSkgJSBwaHlzaWNhbENvdW50OwogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgLy8gQ2hlY2sgdGhhdCBpbmRleCBpcyB3aXRoaW4gdGhlIHZhbGlkIHJhbmdlLgogICAgICAgICAgICBpZiAodmlydHVhbFN0YXJ0IC0gaWR4cy5sZW5ndGggPD0gMCkgewogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIENoZWNrIHRoYXQgdGhlIGluZGV4IGlzIG5vdCB2aXNpYmxlLgogICAgICAgICAgICBpZiAodG9wICsgdGhpcy5fcGh5c2ljYWxTaXplIC0gcGh5c2ljYWxJdGVtSGVpZ2h0IDw9IHNjcm9sbEJvdHRvbSkgewogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlkeHMucHVzaChpdGgpOwogICAgICAgICAgICB0b3AgPSB0b3AgLSBwaHlzaWNhbEl0ZW1IZWlnaHQ7CiAgICAgICAgICAgIGl0aCA9IChpdGggPT09IDApID8gcGh5c2ljYWxDb3VudCAtIDEgOiBpdGggLSAxOwogICAgICAgICAgfQogICAgIC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AgICAgICAgIHRoaXMuX3BoeXNpY2FsVG9wIDw9IHRoaXMuX3Njcm9sbFBvc2l0aW9uOwogICAgICB9LAoKICAgICAgLyoqCiAgICAgICAqIEluY3JlYXNlcyB0aGUgcG9vbCBzaXplLgogICAgICAgKi8KICAgICAgX2luY3JlYXNlUG9vbElmTmVlZGVkOiBmdW5jdGlvbihjb3VudCkgewogICAgICAgIHZhciBuZXh0UGh5c2ljYWxDb3VudCA9IHRoaXMuX2NsYW1wKAogICAgICAgICAgICB0aGlzLl9waHlzaWNhbENvdW50ICsgY291bnQsCiAgICAgICAgICAgIERFRkFVTFRfUEhZU0lDQUxfQ09VTlQsCiAgICAgICAgICAgIHRoaXMuX3ZpcnR1YWxDb3VudCAtIHRoaXMuX3ZpcnR1YWxTdGFydCk7CiAgICAgICAgbmV4dFBoeXNpY2FsQ291bnQgPSB0aGlzLl9jb252ZXJ0SW5kZXhUb0NvbXBsZXRlUm93KG5leHRQaHlzaWNhbENvdW50KTsKICAgICAgICBpZiAodGhpcy5ncmlkKSB7CiAgICAgICAgICB2YXIgY29ycmVjdGlvbiA9IG5leHRQaHlzaWNhbENvdW50ICUgdGhpcy5faXRlbXNQZXJSb3c7CiAgICAgICAgICBpZiAoY29ycmVjdGlvbiAmJiBuZXh0UGh5c2ljYWxDb3VudCAtIGNvcnJlY3Rpb24gPD0gdGhpcy5fcGh5c2ljYWxDb3VudCkgewogICAgICAgICAgICBuZXh0UGh5c2ljYWxDb3VudCArPSB0aGlzLl9pdGVtc1BlclJvdzsKICAgICAgICAgIH0KICAgICAgICAgIG5leHRQaHlzaWNhbENvdW50IC09IGNvcnJlY3Rpb247CiAgICAgICAgfQogICAgICAgIHZhciBkZWx0YSA9IG5leHRQaHlzaWNhbENvdW50IC0gdGhpcy5fcGh5c2ljYWxDb3VudDsKICAgICAgICB2YXIgbmV4dEluY3JlYXNlID0gTWF0aC5yb3VuZCh0aGlzLl9waHlzaWNhbENvdW50ICogMC41KTsKCiAgICAgICAgaWYg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ICAgICAgbWljcm9UYXNrKTsKICAgICAgICB9IGVsc2UgaWYgKHRoaXMuX3BoeXNpY2FsU2l6ZSA8IHRoaXMuX29wdFBoeXNpY2FsU2l6ZSkgewogICAgICAgICAgLy8gWWllbGQgYW5kIGluY3JlYXNlIHRoZSBwb29sIGR1cmluZyBpZGxlIHRpbWUgdW50aWwgdGhlIHBoeXNpY2FsIHNpemUgaXMKICAgICAgICAgIC8vIG9wdGltYWwuCiAgICAgICAgICB0aGlzLl9kZWJvdW5jZSgKICAgICAgICAgICAgICAnX2luY3JlYXNlUG9vbElmTmVlZGVkJywKICAgICAgICAgICAgICB0aGlzLl9pbmNyZWFzZVBvb2xJZk5lZWRlZC5iaW5kKAogICAgICAgICAgICAgICAgICB0aGlzLAogICAgICAgICAgICAgICAgICB0aGlzLl9jbGFtcCgKICAgICAgICAgICAgICAgICAgICAgIE1hdGgucm91bmQoNTAgLyB0aGlzLl90ZW1wbGF0ZUNvc3QpLCAxLCBuZXh0SW5jcmVhc2UpKSwKICAgICAgICAgICAgICBpZGxlUGVyaW9kKTsKICAgICAgICB9CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogUmVuZGVycyB0aGUgYSBuZXcgbGlzdC4KICAgICAgICovCiAgICAgIF9yZW5kZXI6IGZ1bmN0aW9uKCkgewogICAgICAgIGlmICghdGhpcy5pc0F0dGFjaGVkIHx8ICF0aGlzLl9pc1Zpc2libGUpIHsKICAgICAgICAgIHJldHVybjsKICAgICAgICB9CiAgICAgICAgaWYgKHRoaXMuX3BoeXNpY2FsQ291bnQgIT09IDApIHsKICAgICAgICAgIHZhciByZXVzYWJsZXMgPSB0aGlzLl9nZXRSZXVzYWJsZXModHJ1ZSk7CiAgICAgICAgICB0aGlzLl9waHlzaWNhbFRvcCA9IHJldXNhYmxlcy5waHlzaWNhbFRvcDsKICAgICAgICAgIHRoaXMuX3ZpcnR1YWxTdGFydCA9IHRoaXMuX3ZpcnR1YWxTdGFydCArIHJldXNhYmxlcy5pbmRle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B0aGlzLl9yZW1vdmVGb2N1c2VkSXRlbSgpOwogICAgICAgIH0KICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgKiBFeGVjdXRlcyBhIHByb3ZpZGVkIGZ1bmN0aW9uIHBlciBldmVyeSBwaHlzaWNhbCBpbmRleCBpbiBgaXRlbVNldGAKICAgICAgICogYGl0ZW1TZXRgIGRlZmF1bHQgdmFsdWUgaXMgZXF1aXZhbGVudCB0byB0aGUgZW50aXJlIHNldCBvZiBwaHlzaWNhbAogICAgICAgKiBpbmRleGVzLgogICAgICAgKgogICAgICAgKiBAcGFyYW0geyFmdW5jdGlvbihudW1iZXIsIG51bWJlcil9IGZuCiAgICAgICAqIEBwYXJhbSB7IUFycmF5PG51bWJlcj49fSBpdGVtU2V0CiAgICAgICAqLwogICAgICBfaXRlcmF0ZUl0ZW1zOiBmdW5jdGlvbihmbiwgaXRlbVNldCkgewogICAgICAgIHZhciBwaWR4LCB2aWR4LCBydG4sIGk7CgogICAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoID09PSAyICYmIGl0ZW1TZXQpIHsKICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBpdGVtU2V0Lmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgIHBpZHggPSBpdGVtU2V0W2ldOwogICAgICAgICAgICB2aWR4ID0gdGhpcy5fY29tcHV0ZVZpZHgocGlkeCk7CiAgICAgICAgICAgIGlmICgocnRuID0gZm4uY2FsbCh0aGlzLCBwaWR4LCB2aWR4KSkgIT0gbnVsbCkgewogICAgICAgICAgICAgIHJldHVybiBydG47CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICB9IGVsc2UgewogICAgICAgICAgcGlkeCA9IHRoaXMuX3BoeXNpY2FsU3RhcnQ7CiAgICAgICAgICB2aWR4ID0gdGhpcy5fdmlydHVhbFN0YXJ0OwogICAgICAgICAgZm9yICg7IHBpZHggPCB0aGlzLl9waHlzaWNhbENvdW50OyBwaWR4KyssIHZpZHgrKykgewogICAgICAgICAgICBpZiAoKHJ0biA9IGZuLmNhbGwodGhpcywgcGlkeCwgdmlkeCkpICE9IG51bGwpIHsKICAgICAgICAgICAgICByZXR1cm4gcnRuOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICBmb3IgKHBpZHggPSAwOyBwaWR4IDwgdGhpcy5fcGh5c2ljYWxTdGFydDsgcGlkeCsrLCB2aWR4KyspIHsKICAgICAgICAgICAgaWYgKChydG4gPSBmbi5jYWxsKHRoaXMsIHBpZHgsIHZpZHgpKSAhPSBudWxsKSB7CiAgICAgICAgICAgICAgcmV0dXJuIHJ0bjsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgKiBSZXR1cm5zIHRoZSB2aXJ0dWFsIGluZGV4IGZvciBhIGdpdmVuIHBoeXNpY2FsIGluZGV4CiAgICAgICAqCiAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBwaWR4IFBoeXNpY2FsIGluZGV4CiAgICAgICAqIEByZXR1cm4ge251bWJlcn0KICAgICAgICovCiAgICAgIF9jb21wdXRlVmlkeDogZnVuY3Rpb24ocGlkeCkgewogICAgICAgIGlmIChwaWR4ID49IHRoaXMuX3BoeXNpY2FsU3RhcnQpIHsKICAgICAgICAgIHJldHVybiB0aGlzLl92aXJ0dWFsU3RhcnQgKyAocGlkeCAtIHRoaXMuX3BoeXNpY2FsU3RhcnQpOwogICAgICAgIH0KICAgICAgICByZXR1cm4gdGhpcy5fdmlydHVhbFN0YXJ0ICsgKHRoaXMuX3BoeXNpY2FsQ291bnQgLSB0aGlzLl9waHlzaWNhbFN0YXJ0KSArCiAgICAgICAgICAgIHBpZHg7CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogQXNzaWducyB0aGUgZGF0YSBtb2RlbHMgdG8gYSBnaXZlbiBzZXQgb2YgaXRlbXMuCiAgICAgICAqIEBwYXJhbSB7IUFycmF5PG51bWJlcj49fSBpdGV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CArPSB0aGlzLl9waHlzaWNhbFNpemVzW3BpZHhdID8gMSA6IDA7CiAgICAgICAgfSwgaXRlbVNldCk7CgogICAgICAgIGlmICh0aGlzLmdyaWQpIHsKICAgICAgICAgIHRoaXMuX3VwZGF0ZUdyaWRNZXRyaWNzKCk7CiAgICAgICAgICB0aGlzLl9waHlzaWNhbFNpemUgPQogICAgICAgICAgICAgIE1hdGguY2VpbCh0aGlzLl9waHlzaWNhbENvdW50IC8gdGhpcy5faXRlbXNQZXJSb3cpICogdGhpcy5fcm93SGVpZ2h0OwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICBvbGRQaHlzaWNhbFNpemUgPSAodGhpcy5faXRlbXNQZXJSb3cgPT09IDEpID8KICAgICAgICAgICAgICBvbGRQaHlzaWNhbFNpemUgOgogICAgICAgICAgICAgIE1hdGguY2VpbCh0aGlzLl9waHlzaWNhbENvdW50IC8gdGhpcy5faXRlbXNQZXJSb3cpICogdGhpcy5fcm93SGVpZ2h0OwogICAgICAgICAgdGhpcy5fcGh5c2ljYWxTaXplID0KICAgICAgICAgICAgICB0aGlzLl9waHlzaWNhbFNpemUgKyBuZXdQaHlzaWNhbFNpemUgLSBvbGRQaHlzaWNhbFNpemU7CiAgICAgICAgICB0aGlzLl9pdGVtc1BlclJvdyA9IDE7CiAgICAgICAgfQogICAgICAgIC8vIFVwZGF0ZSB0aGUgYXZlcmFnZSBpZiBpdCBtZWFzdXJlZCBzb21ldGhpbmcuCiAgICAgICAgaWYgKHRoaXMuX3BoeXNpY2FsQXZlcmFnZUNvdW50ICE9PSBwcmV2QXZnQ291bnQpIHsKICAgICAgICAgIHRoaXMuX3BoeXNpY2FsQXZlcmFnZSA9IE1hdGgucm91bmQoCiAgICAgICAgICAgICAgKChwcmV2UGh5c2ljYWxBdmcgKiBwcmV2QXZnQ291bnQpICsgbmV3UGh5c2ljYWxTaXplKSAvCiAgICAgICAgICAgICAgdGhpcy5fcGh5c2ljYWxBdmVyYWdlQ291bnQpOwogICAg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GlkeCwgdmlkeCkgewogICAgICAgICAgICB2YXIgbW9kdWx1cyA9IHZpZHggJSB0aGlzLl9pdGVtc1BlclJvdzsKICAgICAgICAgICAgdmFyIHggPSBNYXRoLmZsb29yKChtb2R1bHVzICogdGhpcy5faXRlbVdpZHRoKSArIHJvd09mZnNldCk7CiAgICAgICAgICAgIGlmICh0aGlzLl9pc1JUTCkgewogICAgICAgICAgICAgIHggPSB4ICogLTE7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy50cmFuc2xhdGUzZCh4ICsgJ3B4JywgeSArICdweCcsIDAsIHRoaXMuX3BoeXNpY2FsSXRlbXNbcGlkeF0pOwogICAgICAgICAgICBpZiAodGhpcy5fc2hvdWxkUmVuZGVyTmV4dFJvdyh2aWR4KSkgewogICAgICAgICAgICAgIHkgKz0gdGhpcy5fcm93SGVpZ2h0OwogICAgICAgICAgICB9CiAgICAgICAgICB9KTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgY29uc3Qgb3JkZXIgPSBbXTsKICAgICAgICAgIHRoaXMuX2l0ZXJhdGVJdGVtcyhmdW5jdGlvbihwaWR4LCB2aWR4KSB7CiAgICAgICAgICAgIGNvbnN0IGl0ZW0gPSB0aGlzLl9waHlzaWNhbEl0ZW1zW3BpZHhdOwogICAgICAgICAgICB0aGlzLnRyYW5zbGF0ZTNkKDAsIHkgKyAncHgnLCAwLCBpdGVtKTsKICAgICAgICAgICAgeSArPSB0aGlzLl9waHlzaWNhbFNpemVzW3BpZHhdOwogICAgICAgICAgICBjb25zdCBpdGVtSWQgPSBpdGVtLmlkOwogICAgICAgICAgICBpZiAoaXRlbUlkKSB7CiAgICAgICAgICAgICAgb3JkZXIucHVzaChpdGVtSWQpOwogICAgICAgICAgICB9CiAgICAgICAgICB9KTsKICAgICAgICAgIGlmIChvcmRlci5sZW5ndGgpIHsKICAgICAgICAgICAgdGhpcy5zZXRBdHRyaWJ1dGUoJ2FyaWEtb3ducycsIG9yZGVyLmpvaW4oJyAnKSk7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9LAoKICAgICAgX2dldFBoeXNpY2FsU2l6ZUluY3JlbWVudDogZnVuY3Rpb24ocGlkeCkgewogICAgICAgIGlmICghdGhpcy5ncmlkKSB7CiAgICAgICAgICByZXR1cm4gdGhpcy5fcGh5c2ljYWxTaXplc1twaWR4XTsKICAgICAgICB9CiAgICAgICAgaWYgKHRoaXMuX2NvbXB1dGVWaWR4KHBpZHgpICUgdGhpcy5faXRlbXNQZXJSb3cgIT09IHRoaXMuX2l0ZW1zUGVyUm93IC0gMSkgewogICAgICAgICAgcmV0dXJuIDA7CiAgICAgICAgfQogICAgICAgIHJldHVybiB0aGlzLl9yb3dIZWlnaHQ7CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogUmV0dXJucywgYmFzZWQgb24gdGhlIGN1cnJlbnQgaW5kZXgsCiAgICAgICAqIHdoZXRoZXIgb3Igbm90IHRoZSBuZXh0IGluZGV4IHdpbGwgbmVlZAogICAgICAgKiB0byBiZSByZW5kZXJlZCBvbiBhIG5ldyByb3cuCiAgICAgICAqCiAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSB2aWR4IFZpcnR1YWwgaW5kZXgKICAgICAgICogQHJldHVybiB7Ym9vbGVhbn0KICAgICAgICovCiAgICAgIF9zaG91bGRSZW5kZXJOZXh0Um93OiBmdW5jdGlvbih2aWR4KSB7CiAgICAgICAgcmV0dXJuIHZpZHggJSB0aGlzLl9pdGVtc1BlclJvdyA9PT0gdGhpcy5faXRlbXNQZXJSb3cgLSAxOwogICAgICB9LAoKICAgICAgLyoqCiAgICAgICAqIEFkanVzdHMgdGhlIHNjcm9sbCBwb3NpdGlvbiB3aGVuIGl0IHdhcyBvdmVyZXN0aW1hdGVkLgogICAgICAgKi8KICAgICAgX2FkanVzdFNjcm9sbFBvc2l0aW9uOiBmdW5jdGlvbigpIHsKICAgICAgICB2YXIgZGVsdGFIZWlnaHQgPSB0aGlzLl92aXJ0dWFsU3Rhcn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AgICAgIC8qKgogICAgICAgKiBTY3JvbGwgdG8gYSBzcGVjaWZpYyBpbmRleCBpbiB0aGUgdmlydHVhbCBsaXN0IHJlZ2FyZGxlc3MKICAgICAgICogb2YgdGhlIHBoeXNpY2FsIGl0ZW1zIGluIHRoZSBET00gdHJlZS4KICAgICAgICoKICAgICAgICogQG1ldGhvZCBzY3JvbGxUb0luZGV4CiAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBpZHggVGhlIGluZGV4IG9mIHRoZSBpdGVtCiAgICAgICAqLwogICAgICBzY3JvbGxUb0luZGV4OiBmdW5jdGlvbihpZHgpIHsKICAgICAgICBpZiAodHlwZW9mIGlkeCAhPT0gJ251bWJlcicgfHwgaWR4IDwgMCB8fCBpZHggPiB0aGlzLml0ZW1zLmxlbmd0aCAtIDEpIHsKICAgICAgICAgIHJldHVybjsKICAgICAgICB9CiAgICAgICAgZmx1c2goKTsKICAgICAgICAvLyBJdGVtcyBzaG91bGQgaGF2ZSBiZWVuIHJlbmRlcmVkIHByaW9yIHNjcm9sbGluZyB0byBhbiBpbmRleC4KICAgICAgICBpZiAodGhpcy5fcGh5c2ljYWxDb3VudCA9PT0gMCkgewogICAgICAgICAgcmV0dXJuOwogICAgICAgIH0KICAgICAgICBpZHggPSB0aGlzLl9jbGFtcChpZHgsIDAsIHRoaXMuX3ZpcnR1YWxDb3VudCAtIDEpOwogICAgICAgIC8vIFVwZGF0ZSB0aGUgdmlydHVhbCBzdGFydCBvbmx5IHdoZW4gbmVlZGVkLgogICAgICAgIGlmICghdGhpcy5faXNJbmRleFJlbmRlcmVkKGlkeCkgfHwgaWR4ID49IHRoaXMuX21heFZpcnR1YWxTdGFydCkgewogICAgICAgICAgdGhpcy5fdmlydHVhbFN0YXJ0ID0KICAgICAgICAgICAgICB0aGlzLmdyaWQgPyAoaWR4IC0gdGhpcy5faXRlbXNQZXJSb3cgKiAyKSA6IChpZHggLSAxKTsKICAgICAgICB9CiAgICAgICAgdGhpcy5fbWFuYWdl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MgYXJyYXkuCiAgICAgICAqLwogICAgICBzZWxlY3RJbmRleDogZnVuY3Rpb24oaW5kZXgpIHsKICAgICAgICBpZiAoaW5kZXggPCAwIHx8IGluZGV4ID49IHRoaXMuX3ZpcnR1YWxDb3VudCkgewogICAgICAgICAgcmV0dXJuOwogICAgICAgIH0KICAgICAgICBpZiAoIXRoaXMubXVsdGlTZWxlY3Rpb24gJiYgdGhpcy5zZWxlY3RlZEl0ZW0pIHsKICAgICAgICAgIHRoaXMuY2xlYXJTZWxlY3Rpb24oKTsKICAgICAgICB9CiAgICAgICAgaWYgKHRoaXMuX2lzSW5kZXhSZW5kZXJlZChpbmRleCkpIHsKICAgICAgICAgIHZhciBtb2RlbCA9IHRoaXMubW9kZWxGb3JFbGVtZW50KAogICAgICAgICAgICAgIHRoaXMuX3BoeXNpY2FsSXRlbXNbdGhpcy5fZ2V0UGh5c2ljYWxJbmRleChpbmRleCldKTsKICAgICAgICAgIGlmIChtb2RlbCkgewogICAgICAgICAgICBtb2RlbFt0aGlzLnNlbGVjdGVkQXNdID0gdHJ1ZTsKICAgICAgICAgIH0KICAgICAgICAgIHRoaXMudXBkYXRlU2l6ZUZvckluZGV4KGluZGV4KTsKICAgICAgICB9CiAgICAgICAgdGhpcy4kLnNlbGVjdG9yLnNlbGVjdEluZGV4KGluZGV4KTsKICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgKiBEZXNlbGVjdHMgdGhlIGdpdmVuIGl0ZW0uCiAgICAgICAqCiAgICAgICAqIEBtZXRob2QgZGVzZWxlY3QKICAgICAgICogQHBhcmFtIHtPYmplY3R9IGl0ZW0gVGhlIGl0ZW0gaW5zdGFuY2UuCiAgICAgICAqLwogICAgICBkZXNlbGVjdEl0ZW06IGZ1bmN0aW9uKGl0ZW0pIHsKICAgICAgICByZXR1cm4gdGhpcy5kZXNlbGVjdEluZGV4KHRoaXMuaXRlbXMuaW5kZXhPZihpdGVtKSk7CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogRG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lclJvdyB8fCAxOwogICAgICAgIHJldHVybiB0aGlzLmdyaWQgPyBNYXRoLmNlaWwoaWR4IC8gdGhpcy5faXRlbXNQZXJSb3cpICogdGhpcy5faXRlbXNQZXJSb3cgOgogICAgICAgICAgICAgICAgICAgICAgICAgICBpZHg7CiAgICAgIH0sCgogICAgICBfaXNJbmRleFJlbmRlcmVkOiBmdW5jdGlvbihpZHgpIHsKICAgICAgICByZXR1cm4gaWR4ID49IHRoaXMuX3ZpcnR1YWxTdGFydCAmJiBpZHggPD0gdGhpcy5fdmlydHVhbEVuZDsKICAgICAgfSwKCiAgICAgIF9pc0luZGV4VmlzaWJsZTogZnVuY3Rpb24oaWR4KSB7CiAgICAgICAgcmV0dXJuIGlkeCA+PSB0aGlzLmZpcnN0VmlzaWJsZUluZGV4ICYmIGlkeCA8PSB0aGlzLmxhc3RWaXNpYmxlSW5kZXg7CiAgICAgIH0sCgogICAgICBfZ2V0UGh5c2ljYWxJbmRleDogZnVuY3Rpb24odmlkeCkgewogICAgICAgIHJldHVybiAodGhpcy5fcGh5c2ljYWxTdGFydCArICh2aWR4IC0gdGhpcy5fdmlydHVhbFN0YXJ0KSkgJQogICAgICAgICAgICB0aGlzLl9waHlzaWNhbENvdW50OwogICAgICB9LAoKICAgICAgZm9jdXNJdGVtOiBmdW5jdGlvbihpZHgpIHsKICAgICAgICB0aGlzLl9mb2N1c1BoeXNpY2FsSXRlbShpZHgpOwogICAgICB9LAoKICAgICAgX2ZvY3VzUGh5c2ljYWxJdGVtOiBmdW5jdGlvbihpZHgpIHsKICAgICAgICBpZiAoaWR4IDwgMCB8fCBpZHggPj0gdGhpcy5fdmlydHVhbENvdW50KSB7CiAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIHRoaXMuX3Jlc3RvcmVGb2N1c2VkSXRlbSgpOwogICAgICAgIC8vIHNjcm9sbCB0byBpbmRleCB0byBtYWtlIHN1cmUgaXQncyByZW5kZXJlZAogICAgICAgIGlmICghdGhpcy5fa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GlzLl9mb2N1c2VkVmlydHVhbEluZGV4IDwgdGhpcy5fdmlydHVhbENvdW50IC0gMSkKICAgICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7CiAgICAgICAgICAgIHRoaXMuX2ZvY3VzUGh5c2ljYWxJdGVtKAogICAgICAgICAgICAgICAgdGhpcy5fZm9jdXNlZFZpcnR1YWxJbmRleCArICh0aGlzLmdyaWQgPyB0aGlzLl9pdGVtc1BlclJvdyA6IDEpKTsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICBjYXNlIC8qIEFSUk9XX1JJR0hUICovIDM5OgogICAgICAgICAgICBpZiAodGhpcy5ncmlkKQogICAgICAgICAgICAgIHRoaXMuX2ZvY3VzUGh5c2ljYWxJdGVtKAogICAgICAgICAgICAgICAgICB0aGlzLl9mb2N1c2VkVmlydHVhbEluZGV4ICsgKHRoaXMuX2lzUlRMID8gLTEgOiAxKSk7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgY2FzZSAvKiBBUlJPV19VUCAqLyAzODoKICAgICAgICAgICAgaWYgKHRoaXMuX2ZvY3VzZWRWaXJ0dWFsSW5kZXggPiAwKQogICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTsKICAgICAgICAgICAgdGhpcy5fZm9jdXNQaHlzaWNhbEl0ZW0oCiAgICAgICAgICAgICAgICB0aGlzLl9mb2N1c2VkVmlydHVhbEluZGV4IC0gKHRoaXMuZ3JpZCA/IHRoaXMuX2l0ZW1zUGVyUm93IDogMSkpOwogICAgICAgICAgICBicmVhazsKICAgICAgICAgIGNhc2UgLyogQVJST1dfTEVGVCAqLyAzNzoKICAgICAgICAgICAgaWYgKHRoaXMuZ3JpZCkKICAgICAgICAgICAgICB0aGlzLl9mb2N1c1BoeXNpY2FsSXRlbSgKICAgICAgICAgICAgICAgICAgdGhpcy5fZm9jdXNlZFZpcnR1YWxJbmRleCArICh0aGlzLl9pc1JUTCA/IDEgOiAtMSkpOwogICAgICAgICAgICBicmVh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XBsYXRlOiAxfQogICAgICAgICAqLwogICAgICAgIF9leGNsdWRlZExvY2FsTmFtZXM6IHsKICAgICAgICAgIHR5cGU6IE9iamVjdCwKICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbigpIHsKICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAndGVtcGxhdGUnOiAxLAogICAgICAgICAgICAgICdkb20tYmluZCc6IDEsCiAgICAgICAgICAgICAgJ2RvbS1pZic6IDEsCiAgICAgICAgICAgICAgJ2RvbS1yZXBlYXQnOiAxLAogICAgICAgICAgICB9OwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfSwKCiAgICAgIG9ic2VydmVyczogWwogICAgICAgICdfdXBkYXRlQXR0ckZvclNlbGVjdGVkKGF0dHJGb3JTZWxlY3RlZCknLAogICAgICAgICdfdXBkYXRlU2VsZWN0ZWQoc2VsZWN0ZWQpJywKICAgICAgICAnX2NoZWNrRmFsbGJhY2soZmFsbGJhY2tTZWxlY3Rpb24pJwogICAgICBdLAoKICAgICAgY3JlYXRlZDogZnVuY3Rpb24oKSB7CiAgICAgICAgdGhpcy5fYmluZEZpbHRlckl0ZW0gPSB0aGlzLl9maWx0ZXJJdGVtLmJpbmQodGhpcyk7CiAgICAgICAgdGhpcy5fc2VsZWN0aW9uID0gbmV3IElyb25TZWxlY3Rpb24odGhpcy5fYXBwbHlTZWxlY3Rpb24uYmluZCh0aGlzKSk7CiAgICAgIH0sCgogICAgICBhdHRhY2hlZDogZnVuY3Rpb24oKSB7CiAgICAgICAgdGhpcy5fb2JzZXJ2ZXIgPSB0aGlzLl9vYnNlcnZlSXRlbXModGhpcyk7CiAgICAgICAgdGhpcy5fYWRkTGlzdGVuZXIodGhpcy5hY3RpdmF0ZUV2ZW50KTsKICAgICAgfSwKCiAgICAgIGRldGFjaGVkOiBmdW5jdGlvbigpIHsKICAgICAgICBpZiAodGhpcy5fb2JzZXJ2ZXIpIHsKICAgICAgICAgIGRvbSh0aGlzKS51bm9ic2VydmVOb2Rlcyh0aGlzLl9vYnNlcnZlcik7CiAgICAgICAgfQogICAgICAgIHRoaXMuX3JlbW92ZUxpc3RlbmVyKHRoaXMuYWN0aXZhdGVFdmVudCk7CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogUmV0dXJucyB0aGUgaW5kZXggb2YgdGhlIGdpdmVuIGl0ZW0uCiAgICAgICAqCiAgICAgICAqIEBtZXRob2QgaW5kZXhPZgogICAgICAgKiBAcGFyYW0ge09iamVjdH0gaXRlbQogICAgICAgKiBAcmV0dXJucyBSZXR1cm5zIHRoZSBpbmRleCBvZiB0aGUgaXRlbQogICAgICAgKi8KICAgICAgaW5kZXhPZjogZnVuY3Rpb24oaXRlbSkgewogICAgICAgIHJldHVybiB0aGlzLml0ZW1zID8gdGhpcy5pdGVtcy5pbmRleE9mKGl0ZW0pIDogLTE7CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogU2VsZWN0cyB0aGUgZ2l2ZW4gdmFsdWUuCiAgICAgICAqCiAgICAgICAqIEBtZXRob2Qgc2VsZWN0CiAgICAgICAqIEBwYXJhbSB7c3RyaW5nfG51bWJlcn0gdmFsdWUgdGhlIHZhbHVlIHRvIHNlbGVjdC4KICAgICAgICovCiAgICAgIHNlbGVjdDogZnVuY3Rpb24odmFsdWUpIHsKICAgICAgICB0aGlzLnNlbGVjdGVkID0gdmFsdWU7CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogU2VsZWN0cyB0aGUgcHJldmlvdXMgaXRlbS4KICAgICAgICoKICAgICAgICogQG1ldGhvZCBzZWxlY3RQcmV2aW91cwogICAgICAgKi8KICAgICAgc2VsZWN0UHJldmlvdXM6IGZ1bmN0aW9uKCkgewogICAgICAgIHZhciBsZW5ndGggPSB0aGlzLml0ZW1zLmxlbmd0aDsKICAgICAgICB2YXIgaW5kZXggPSBsZW5ndGggLSAxOwogICAgICAgIGlmICh0aGlzLnNlbGVjdGVkICE9PSB1bmRlZmluZWQpIHsKICAgICAgICAgIGluZG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mNsZWFyKCk7CiAgICAgICAgfQogICAgICAgIC8vIENoZWNrIGZvciBpdGVtcywgc2luY2UgdGhpcyBhcnJheSBpcyBwb3B1bGF0ZWQgb25seSB3aGVuIGF0dGFjaGVkCiAgICAgICAgLy8gU2luY2UgTnVtYmVyKDApIGlzIGZhbHN5LCBleHBsaWNpdGx5IGNoZWNrIGZvciB1bmRlZmluZWQKICAgICAgICBpZiAodGhpcy5mYWxsYmFja1NlbGVjdGlvbiAmJiB0aGlzLml0ZW1zLmxlbmd0aCAmJgogICAgICAgICAgICAodGhpcy5fc2VsZWN0aW9uLmdldCgpID09PSB1bmRlZmluZWQpKSB7CiAgICAgICAgICB0aGlzLnNlbGVjdGVkID0gdGhpcy5mYWxsYmFja1NlbGVjdGlvbjsKICAgICAgICB9CiAgICAgIH0sCgogICAgICBfZmlsdGVySXRlbTogZnVuY3Rpb24obm9kZSkgewogICAgICAgIHJldHVybiAhdGhpcy5fZXhjbHVkZWRMb2NhbE5hbWVzW25vZGUubG9jYWxOYW1lXTsKICAgICAgfSwKCiAgICAgIF92YWx1ZVRvSXRlbTogZnVuY3Rpb24odmFsdWUpIHsKICAgICAgICByZXR1cm4gKHZhbHVlID09IG51bGwpID8gbnVsbCA6IHRoaXMuaXRlbXNbdGhpcy5fdmFsdWVUb0luZGV4KHZhbHVlKV07CiAgICAgIH0sCgogICAgICBfdmFsdWVUb0luZGV4OiBmdW5jdGlvbih2YWx1ZSkgewogICAgICAgIGlmICh0aGlzLmF0dHJGb3JTZWxlY3RlZCkgewogICAgICAgICAgZm9yICh2YXIgaSA9IDAsIGl0ZW07IGl0ZW0gPSB0aGlzLml0ZW1zW2ldOyBpKyspIHsKICAgICAgICAgICAgaWYgKHRoaXMuX3ZhbHVlRm9ySXRlbShpdGVtKSA9PSB2YWx1ZSkgewogICAgICAgICAgICAgIHJldHVybiBpOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgIHJldHVybiBOdW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sc2UsIGNhbmNlbGFibGU6IGZhbHNlfSk7CiAgICAgICAgfSk7CiAgICAgIH0sCgogICAgICBfYWN0aXZhdGVIYW5kbGVyOiBmdW5jdGlvbihlKSB7CiAgICAgICAgdmFyIHQgPSBlLnRhcmdldDsKICAgICAgICB2YXIgaXRlbXMgPSB0aGlzLml0ZW1zOwogICAgICAgIHdoaWxlICh0ICYmIHQgIT0gdGhpcykgewogICAgICAgICAgdmFyIGkgPSBpdGVtcy5pbmRleE9mKHQpOwogICAgICAgICAgaWYgKGkgPj0gMCkgewogICAgICAgICAgICB2YXIgdmFsdWUgPSB0aGlzLl9pbmRleFRvVmFsdWUoaSk7CiAgICAgICAgICAgIHRoaXMuX2l0ZW1BY3RpdmF0ZSh2YWx1ZSwgdCk7CiAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgIH0KICAgICAgICAgIHQgPSB0LnBhcmVudE5vZGU7CiAgICAgICAgfQogICAgICB9LAoKICAgICAgX2l0ZW1BY3RpdmF0ZTogZnVuY3Rpb24odmFsdWUsIGl0ZW0pIHsKICAgICAgICBpZiAoIXRoaXMuZmlyZSgnaXJvbi1hY3RpdmF0ZScsIHtzZWxlY3RlZDogdmFsdWUsIGl0ZW06IGl0ZW19LCB7CiAgICAgICAgICAgICAgICAgICBjYW5jZWxhYmxlOiB0cnVlCiAgICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgICAuZGVmYXVsdFByZXZlbnRlZCkgewogICAgICAgICAgdGhpcy5zZWxlY3QodmFsdWUpOwogICAgICAgIH0KICAgICAgfQoKICAgIH07CgogICAgLyoqCiAgICBAbGljZW5zZQogICAgQ29weXJpZ2h0IChjKSAyMDE1IFRoZSBQb2x5bWVyIFByb2plY3QgQXV0aG9ycy4gQWxsIHJpZ2h0cyByZXNlcnZlZC4KICAgIFRoaXMgY29kZSBtYXkgb25seSBiZSB1c2VkIHVuZGVyIHRoZSBCU0Qgc3R5bGUgbGljZW5zZSBmb3VuZCBhdAogICAgaHR0cDov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yAwLjI4cyBjdWJpYy1iZXppZXIoMC40LCAwLCAwLjIsIDEpOwogICAgICB9OwoKICAgICAgLS1zaGFkb3ctbm9uZTogewogICAgICAgIGJveC1zaGFkb3c6IG5vbmU7CiAgICAgIH07CgogICAgICAvKiBmcm9tIGh0dHA6Ly9jb2RlcGVuLmlvL3NoeW5kbWFuL3Blbi9jNTM5NGRkZjJlOGIyYTVjOTE4NTkwNGI1NzQyMWNkYiAqLwoKICAgICAgLS1zaGFkb3ctZWxldmF0aW9uLTJkcDogewogICAgICAgIGJveC1zaGFkb3c6IDAgMnB4IDJweCAwIHJnYmEoMCwgMCwgMCwgMC4xNCksCiAgICAgICAgICAgICAgICAgICAgMCAxcHggNXB4IDAgcmdiYSgwLCAwLCAwLCAwLjEyKSwKICAgICAgICAgICAgICAgICAgICAwIDNweCAxcHggLTJweCByZ2JhKDAsIDAsIDAsIDAuMik7CiAgICAgIH07CgogICAgICAtLXNoYWRvdy1lbGV2YXRpb24tM2RwOiB7CiAgICAgICAgYm94LXNoYWRvdzogMCAzcHggNHB4IDAgcmdiYSgwLCAwLCAwLCAwLjE0KSwKICAgICAgICAgICAgICAgICAgICAwIDFweCA4cHggMCByZ2JhKDAsIDAsIDAsIDAuMTIpLAogICAgICAgICAgICAgICAgICAgIDAgM3B4IDNweCAtMnB4IHJnYmEoMCwgMCwgMCwgMC40KTsKICAgICAgfTsKCiAgICAgIC0tc2hhZG93LWVsZXZhdGlvbi00ZHA6IHsKICAgICAgICBib3gtc2hhZG93OiAwIDRweCA1cHggMCByZ2JhKDAsIDAsIDAsIDAuMTQpLAogICAgICAgICAgICAgICAgICAgIDAgMXB4IDEwcHggMCByZ2JhKDAsIDAsIDAsIDAuMTIpLAogICAgICAgICAgICAgICAgICAgIDAgMnB4IDRweCAtMXB4IHJnYmEoMCwgMCwgMCwgMC40KTsKICAgICAgfTsKCiAgICAgIC0tc2hhZG93LWVsZXZhdGlvbi02ZHA6IHsKICAgICAgICBib3gtc2hhZG93OiAwIDZweCAxMHB4IDAgcmdiYSgwLCAwLCAwLCAwLjE0KSwKICAgICAgICAgICAgICAgICAgICAwIDFweCAxOHB4IDAgcmdiYSgwLCAwLCAwLCAwLjEyKSwKICAgICAgICAgICAgICAgICAgICAwIDNweCA1cHggLTFweCByZ2JhKDAsIDAsIDAsIDAuNCk7CiAgICAgIH07CgogICAgICAtLXNoYWRvdy1lbGV2YXRpb24tOGRwOiB7CiAgICAgICAgYm94LXNoYWRvdzogMCA4cHggMTBweCAxcHggcmdiYSgwLCAwLCAwLCAwLjE0KSwKICAgICAgICAgICAgICAgICAgICAwIDNweCAxNHB4IDJweCByZ2JhKDAsIDAsIDAsIDAuMTIpLAogICAgICAgICAgICAgICAgICAgIDAgNXB4IDVweCAtM3B4IHJnYmEoMCwgMCwgMCwgMC40KTsKICAgICAgfTsKCiAgICAgIC0tc2hhZG93LWVsZXZhdGlvbi0xMmRwOiB7CiAgICAgICAgYm94LXNoYWRvdzogMCAxMnB4IDE2cHggMXB4IHJnYmEoMCwgMCwgMCwgMC4xNCksCiAgICAgICAgICAgICAgICAgICAgMCA0cHggMjJweCAzcHggcmdiYSgwLCAwLCAwLCAwLjEyKSwKICAgICAgICAgICAgICAgICAgICAwIDZweCA3cHggLTRweCByZ2JhKDAsIDAsIDAsIDAuNCk7CiAgICAgIH07CgogICAgICAtLXNoYWRvdy1lbGV2YXRpb24tMTZkcDogewogICAgICAgIGJveC1zaGFkb3c6IDAgMTZweCAyNHB4IDJweCByZ2JhKDAsIDAsIDAsIDAuMTQpLAogICAgICAgICAgICAgICAgICAgIDAgIDZweCAzMHB4IDVweCByZ2JhKDAsIDAsIDAsIDAuMTIpLAogICAgICAgICAgICAgICAgICAgIDAgIDhweCAxMHB4IC01cHggcmdiYSgwLCAwLCAwLCAwLjQpOwogICAgICB9OwoKICAgICAgLS1zaGFkb3ctZWxldmF0aW9uLTI0ZHA6IHsKICAgICAgICBib3gtc2hhZG93OiAwIDI0cHggMzhweCAzcHggcmdiYSgwLC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AgKi8KICAgIGNvbnN0IHRlbXBsYXRlJDUgPSBodG1sYAo8ZG9tLW1vZHVsZSBpZD0icGFwZXItbWF0ZXJpYWwtc3R5bGVzIj4KICA8dGVtcGxhdGU+CiAgICA8c3R5bGU+CiAgICAgIGh0bWwgewogICAgICAgIC0tcGFwZXItbWF0ZXJpYWw6IHsKICAgICAgICAgIGRpc3BsYXk6IGJsb2NrOwogICAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlOwogICAgICAgIH07CiAgICAgICAgLS1wYXBlci1tYXRlcmlhbC1lbGV2YXRpb24tMTogewogICAgICAgICAgQGFwcGx5IC0tc2hhZG93LWVsZXZhdGlvbi0yZHA7CiAgICAgICAgfTsKICAgICAgICAtLXBhcGVyLW1hdGVyaWFsLWVsZXZhdGlvbi0yOiB7CiAgICAgICAgICBAYXBwbHkgLS1zaGFkb3ctZWxldmF0aW9uLTRkcDsKICAgICAgICB9OwogICAgICAgIC0tcGFwZXItbWF0ZXJpYWwtZWxldmF0aW9uLTM6IHsKICAgICAgICAgIEBhcHBseSAtLXNoYWRvdy1lbGV2YXRpb24tNmRwOwogICAgICAgIH07CiAgICAgICAgLS1wYXBlci1tYXRlcmlhbC1lbGV2YXRpb24tNDogewogICAgICAgICAgQGFwcGx5IC0tc2hhZG93LWVsZXZhdGlvbi04ZHA7CiAgICAgICAgfTsKICAgICAgICAtLXBhcGVyLW1hdGVyaWFsLWVsZXZhdGlvbi01OiB7CiAgICAgICAgICBAYXBwbHkgLS1zaGFkb3ctZWxldmF0aW9uLTE2ZHA7CiAgICAgICAgfTsKICAgICAgfQogICAgICAucGFwZXItbWF0ZXJpYWwgewogICAgICAgIEBhcHBseSAtLXBhcGVyLW1hdGVyaWFsOwogICAgICB9CiAgICAgIC5wYXBlci1tYXRlcmlhbFtlbGV2YXRpb249IjEiXSB7CiAgICAgICAgQGFwcGx5IC0tcGFwZXItbWF0ZXJpYWwtZWxldmF0aW9uLTE7CiAgICAgIH0KICAgICAgLnBhcGVyLW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gICAgICAqLwogICAgICAgIGZvY3VzZWQ6IHsKICAgICAgICAgIHR5cGU6IEJvb2xlYW4sCiAgICAgICAgICB2YWx1ZTogZmFsc2UsCiAgICAgICAgICBub3RpZnk6IHRydWUsCiAgICAgICAgICByZWFkT25seTogdHJ1ZSwKICAgICAgICAgIHJlZmxlY3RUb0F0dHJpYnV0ZTogdHJ1ZQogICAgICAgIH0sCgogICAgICAgIC8qKgogICAgICAgICAqIElmIHRydWUsIHRoZSB1c2VyIGNhbm5vdCBpbnRlcmFjdCB3aXRoIHRoaXMgZWxlbWVudC4KICAgICAgICAgKi8KICAgICAgICBkaXNhYmxlZDogewogICAgICAgICAgdHlwZTogQm9vbGVhbiwKICAgICAgICAgIHZhbHVlOiBmYWxzZSwKICAgICAgICAgIG5vdGlmeTogdHJ1ZSwKICAgICAgICAgIG9ic2VydmVyOiAnX2Rpc2FibGVkQ2hhbmdlZCcsCiAgICAgICAgICByZWZsZWN0VG9BdHRyaWJ1dGU6IHRydWUKICAgICAgICB9LAoKICAgICAgICAvKioKICAgICAgICAgKiBWYWx1ZSBvZiB0aGUgYHRhYmluZGV4YCBhdHRyaWJ1dGUgYmVmb3JlIGBkaXNhYmxlZGAgd2FzIGFjdGl2YXRlZC4KICAgICAgICAgKiBgbnVsbGAgbWVhbnMgdGhlIGF0dHJpYnV0ZSB3YXMgbm90IHByZXNlbnQuCiAgICAgICAgICogQHR5cGUgez9zdHJpbmd8dW5kZWZpbmVkfQogICAgICAgICAqLwogICAgICAgIF9vbGRUYWJJbmRleDoge3R5cGU6IFN0cmluZ30sCgogICAgICAgIF9ib3VuZEZvY3VzQmx1ckhhbmRsZXI6IHsKICAgICAgICAgIHR5cGU6IEZ1bmN0aW9uLAogICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fZm9jdXNCbHVySGFuZGxlci5iaW5kKHRoaXMpOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfSwKCiAg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G9seW1lciBQcm9qZWN0IEF1dGhvcnMuIEFsbCByaWdodHMgcmVzZXJ2ZWQuCiAgICBUaGlzIGNvZGUgbWF5IG9ubHkgYmUgdXNlZCB1bmRlciB0aGUgQlNEIHN0eWxlIGxpY2Vuc2UgZm91bmQgYXQKICAgIGh0dHA6Ly9wb2x5bWVyLmdpdGh1Yi5pby9MSUNFTlNFLnR4dCBUaGUgY29tcGxldGUgc2V0IG9mIGF1dGhvcnMgbWF5IGJlIGZvdW5kIGF0CiAgICBodHRwOi8vcG9seW1lci5naXRodWIuaW8vQVVUSE9SUy50eHQgVGhlIGNvbXBsZXRlIHNldCBvZiBjb250cmlidXRvcnMgbWF5IGJlCiAgICBmb3VuZCBhdCBodHRwOi8vcG9seW1lci5naXRodWIuaW8vQ09OVFJJQlVUT1JTLnR4dCBDb2RlIGRpc3RyaWJ1dGVkIGJ5IEdvb2dsZSBhcwogICAgcGFydCBvZiB0aGUgcG9seW1lciBwcm9qZWN0IGlzIGFsc28gc3ViamVjdCB0byBhbiBhZGRpdGlvbmFsIElQIHJpZ2h0cyBncmFudAogICAgZm91bmQgYXQgaHR0cDovL3BvbHltZXIuZ2l0aHViLmlvL1BBVEVOVFMudHh0CiAgICAqLwoKICAgIC8qKgogICAgICogQGRlbW8gZGVtby9pbmRleC5odG1sCiAgICAgKiBAcG9seW1lckJlaGF2aW9yIElyb25CdXR0b25TdGF0ZQogICAgICovCiAgICBjb25zdCBJcm9uQnV0dG9uU3RhdGVJbXBsID0gewoKICAgICAgcHJvcGVydGllczogewoKICAgICAgICAvKioKICAgICAgICAgKiBJZiB0cnVlLCB0aGUgdXNlciBpcyBjdXJyZW50bHkgaG9sZGluZyBkb3duIHRoZSBidXR0b24uCiAgICAgICAgICovCiAgICAgICAgcHJlc3NlZDogewogICAgICAgICAgdHlwZTogQm9vbGVhbiwKICAgICAgICAgIHJlYWRPbmx5OiB0cnVlLAogICAgICAgICAgdmFsdWU6IGZhbHNlLAogICAgICAgICAgcmVmbGVj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lbnQpIHsKICAgICAgICB0aGlzLl9zZXRQb2ludGVyRG93bih0cnVlKTsKICAgICAgICB0aGlzLl9zZXRQcmVzc2VkKHRydWUpOwogICAgICAgIHRoaXMuX3NldFJlY2VpdmVkRm9jdXNGcm9tS2V5Ym9hcmQoZmFsc2UpOwogICAgICB9LAoKICAgICAgX3VwSGFuZGxlcjogZnVuY3Rpb24oKSB7CiAgICAgICAgdGhpcy5fc2V0UG9pbnRlckRvd24oZmFsc2UpOwogICAgICAgIHRoaXMuX3NldFByZXNzZWQoZmFsc2UpOwogICAgICB9LAoKICAgICAgLyoqCiAgICAgICAqIEBwYXJhbSB7IUtleWJvYXJkRXZlbnR9IGV2ZW50IC4KICAgICAgICovCiAgICAgIF9zcGFjZUtleURvd25IYW5kbGVyOiBmdW5jdGlvbihldmVudCkgewogICAgICAgIHZhciBrZXlib2FyZEV2ZW50ID0gZXZlbnQuZGV0YWlsLmtleWJvYXJkRXZlbnQ7CiAgICAgICAgdmFyIHRhcmdldCA9IGRvbShrZXlib2FyZEV2ZW50KS5sb2NhbFRhcmdldDsKCiAgICAgICAgLy8gSWdub3JlIHRoZSBldmVudCBpZiB0aGlzIGlzIGNvbWluZyBmcm9tIGEgZm9jdXNlZCBsaWdodCBjaGlsZCwgc2luY2UgdGhhdAogICAgICAgIC8vIGVsZW1lbnQgd2lsbCBkZWFsIHdpdGggaXQuCiAgICAgICAgaWYgKHRoaXMuaXNMaWdodERlc2NlbmRhbnQoLyoqIEB0eXBlIHtOb2RlfSAqLyAodGFyZ2V0KSkpCiAgICAgICAgICByZXR1cm47CgogICAgICAgIGtleWJvYXJkRXZlbnQucHJldmVudERlZmF1bHQoKTsKICAgICAgICBrZXlib2FyZEV2ZW50LnN0b3BJbW1lZGlhdGVQcm9wYWdhdGlvbigpOwogICAgICAgIHRoaXMuX3NldFByZXNzZWQodHJ1ZSk7CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogQHBhcmFtIHshS2V5Ym9hcmRFdmVudH0gZX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Ch0aGlzLndhdmUpOwoKICAgICAgdGhpcy5yZXNldEludGVyYWN0aW9uU3RhdGUoKTsKICAgIH0KCiAgICBSaXBwbGUuTUFYX1JBRElVUyA9IDMwMDsKCiAgICBSaXBwbGUucHJvdG90eXBlID0gewogICAgICBnZXQgcmVjZW50ZXJzKCkgewogICAgICAgIHJldHVybiB0aGlzLmVsZW1lbnQucmVjZW50ZXJzOwogICAgICB9LAoKICAgICAgZ2V0IGNlbnRlcigpIHsKICAgICAgICByZXR1cm4gdGhpcy5lbGVtZW50LmNlbnRlcjsKICAgICAgfSwKCiAgICAgIGdldCBtb3VzZURvd25FbGFwc2VkKCkgewogICAgICAgIHZhciBlbGFwc2VkOwoKICAgICAgICBpZiAoIXRoaXMubW91c2VEb3duU3RhcnQpIHsKICAgICAgICAgIHJldHVybiAwOwogICAgICAgIH0KCiAgICAgICAgZWxhcHNlZCA9IFV0aWxpdHkubm93KCkgLSB0aGlzLm1vdXNlRG93blN0YXJ0OwoKICAgICAgICBpZiAodGhpcy5tb3VzZVVwU3RhcnQpIHsKICAgICAgICAgIGVsYXBzZWQgLT0gdGhpcy5tb3VzZVVwRWxhcHNlZDsKICAgICAgICB9CgogICAgICAgIHJldHVybiBlbGFwc2VkOwogICAgICB9LAoKICAgICAgZ2V0IG1vdXNlVXBFbGFwc2VkKCkgewogICAgICAgIHJldHVybiB0aGlzLm1vdXNlVXBTdGFydCA/IFV0aWxpdHkubm93KCkgLSB0aGlzLm1vdXNlVXBTdGFydCA6IDA7CiAgICAgIH0sCgogICAgICBnZXQgbW91c2VEb3duRWxhcHNlZFNlY29uZHMoKSB7CiAgICAgICAgcmV0dXJuIHRoaXMubW91c2VEb3duRWxhcHNlZCAvIDEwMDA7CiAgICAgIH0sCgogICAgICBnZXQgbW91c2VVcEVsYXBzZWRTZWNvbmRzKCkgewogICAgICAgIHJldHVybiB0aGlzLm1vdXNlVXBFbGFwc2VkIC8gMTAwMDsKICAgICAgfSwKCiAgICAgIGdldCBtb3VzZ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pcy5tYXhSYWRpdXMsIFJpcHBsZS5NQVhfUkFESVVTKTsKICAgICAgfSwKCiAgICAgIGdldCBpc0FuaW1hdGlvbkNvbXBsZXRlKCkgewogICAgICAgIHJldHVybiB0aGlzLm1vdXNlVXBTdGFydCA/IHRoaXMuaXNPcGFjaXR5RnVsbHlEZWNheWVkIDoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmlzUmVzdGluZ0F0TWF4UmFkaXVzOwogICAgICB9LAoKICAgICAgZ2V0IHRyYW5zbGF0aW9uRnJhY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuIE1hdGgubWluKAogICAgICAgICAgICAxLCB0aGlzLnJhZGl1cyAvIHRoaXMuY29udGFpbmVyTWV0cmljcy5zaXplICogMiAvIE1hdGguc3FydCgyKSk7CiAgICAgIH0sCgogICAgICBnZXQgeE5vdygpIHsKICAgICAgICBpZiAodGhpcy54RW5kKSB7CiAgICAgICAgICByZXR1cm4gdGhpcy54U3RhcnQgKyB0aGlzLnRyYW5zbGF0aW9uRnJhY3Rpb24gKiAodGhpcy54RW5kIC0gdGhpcy54U3RhcnQpOwogICAgICAgIH0KCiAgICAgICAgcmV0dXJuIHRoaXMueFN0YXJ0OwogICAgICB9LAoKICAgICAgZ2V0IHlOb3coKSB7CiAgICAgICAgaWYgKHRoaXMueUVuZCkgewogICAgICAgICAgcmV0dXJuIHRoaXMueVN0YXJ0ICsgdGhpcy50cmFuc2xhdGlvbkZyYWN0aW9uICogKHRoaXMueUVuZCAtIHRoaXMueVN0YXJ0KTsKICAgICAgICB9CgogICAgICAgIHJldHVybiB0aGlzLnlTdGFydDsKICAgICAgfSwKCiAgICAgIGdldCBpc01vdXNlRG93bigpIHsKICAgICAgICByZXR1cm4gdGhpcy5tb3VzZURvd25TdGFydCAmJiAhdGhpcy5tb3VzZVVwU3RhcnQ7CiAgICAgIH0sCgogICAgICByZXNldEludGVyYWN0aW9uU3RhdGU6IGZ1bmN0aW9uKCkgewogICAgICAgIHRoaXMubWF4UmFkaXVzID0gMDsKICAgICAgICB0aGlzLm1vdXNlRG93blN0YXJ0ID0gMDsKICAgICAgICB0aGlzLm1vdXNlVXBTdGFydCA9IDA7CgogICAgICAgIHRoaXMueFN0YXJ0ID0gMDsKICAgICAgICB0aGlzLnlTdGFydCA9IDA7CiAgICAgICAgdGhpcy54RW5kID0gMDsKICAgICAgICB0aGlzLnlFbmQgPSAwOwogICAgICAgIHRoaXMuc2xpZGVEaXN0YW5jZSA9IDA7CgogICAgICAgIHRoaXMuY29udGFpbmVyTWV0cmljcyA9IG5ldyBFbGVtZW50TWV0cmljcyh0aGlzLmVsZW1lbnQpOwogICAgICB9LAoKICAgICAgZHJhdzogZnVuY3Rpb24oKSB7CiAgICAgICAgdmFyIHNjYWxlOwogICAgICAgIHZhciBkeDsKICAgICAgICB2YXIgZHk7CgogICAgICAgIHRoaXMud2F2ZS5zdHlsZS5vcGFjaXR5ID0gdGhpcy5vcGFjaXR5OwoKICAgICAgICBzY2FsZSA9IHRoaXMucmFkaXVzIC8gKHRoaXMuY29udGFpbmVyTWV0cmljcy5zaXplIC8gMik7CiAgICAgICAgZHggPSB0aGlzLnhOb3cgLSAodGhpcy5jb250YWluZXJNZXRyaWNzLndpZHRoIC8gMik7CiAgICAgICAgZHkgPSB0aGlzLnlOb3cgLSAodGhpcy5jb250YWluZXJNZXRyaWNzLmhlaWdodCAvIDIpOwoKCiAgICAgICAgLy8gMmQgdHJhbnNmb3JtIGZvciBzYWZhcmkgYmVjYXVzZSBvZiBib3JkZXItcmFkaXVzIGFuZCBvdmVyZmxvdzpoaWRkZW4KICAgICAgICAvLyBjbGlwcGluZyBidWcuIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD05ODUzOAogICAgICAgIHRoaXMud2F2ZUNvbnRhaW5lci5zdHlsZS53ZWJraXRUcmFuc2Zvcm0gPQogICAgICAgICAgICAndHJhbnNsYXRlKCcgKyBkeCArICdweCwgJyArIGR5ICsgJ3B4KSc7CiAgICAgICAgdGhpcy53YXZlQ29udGFpbmVyLnN0eWxlLnRyYW5zZm9ybSA9CiAgICAgICAgICAgICd0cmFuc2xhdGUzZCgnICsgZHggKyAncHgsICcgKyBkeSArICdweCwgMCknOwogICAgICAgIHRoaXMud2F2ZS5zdHlsZS53ZWJraXRUcmFuc2Zvcm0gPSAnc2NhbGUoJyArIHNjYWxlICsgJywnICsgc2NhbGUgKyAnKSc7CiAgICAgICAgdGhpcy53YXZlLnN0eWxlLnRyYW5zZm9ybSA9ICdzY2FsZTNkKCcgKyBzY2FsZSArICcsJyArIHNjYWxlICsgJywxKSc7CiAgICAgIH0sCgogICAgICAvKiogQHBhcmFtIHtFdmVudD19IGV2ZW50ICovCiAgICAgIGRvd25BY3Rpb246IGZ1bmN0aW9uKGV2ZW50KSB7CiAgICAgICAgdmFyIHhDZW50ZXIgPSB0aGlzLmNvbnRhaW5lck1ldHJpY3Mud2lkdGggLyAyOwogICAgICAgIHZhciB5Q2VudGVyID0gdGhpcy5jb250YWluZXJNZXRyaWNzLmhlaWdodCAvIDI7CgogICAgICAgIHRoaXMucmVzZXRJbnRlcmFjdGlvblN0YXRlKCk7CiAgICAgICAgdGhpcy5tb3VzZURvd25TdGFydCA9IFV0aWxpdHkubm93KCk7CgogICAgICAgIGlmICh0aGlzLmNlbnRlcikgewogICAgICAgICAgdGhpcy54U3RhcnQgPSB4Q2VudGVyOwogICAgICAgICAgdGhpcy55U3RhcnQgPSB5Q2VudGVyOwogICAgICAgICAgdGhpcy5zbGlkZURpc3RhbmNlID0KICAgICAgICAgICAgICBVdGlsaXR5LmRpc3RhbmNlKHRoaXMueFN0YXJ0LCB0aGlzLnlTdGFydCwgdGhpcy54RW5kLCB0aGlzLnlFbmQpOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICB0aGlzLnhTdGFydCA9IGV2ZW50ID8KICAgICAgICAgICAgICBldmVudC5kZXRhaWwueCAtIHRoaXMuY29udGFpbmVyTWV0cmljcy5ib3VuZGluZ1JlY3QubGVmdCA6CiAgICAgICAgICAgICAgdGhpcy5jb250YWluZXJNZXRyaWNzLndpZHRoIC8gMjsKICAgICAgICAgIHRoaXMueVN0YXJ0ID0gZXZlbnQgPwogICAgICAgICAgICAgIGV2ZW50LmRldGFpbC55IC0gdGhpcy5jb250YWluZXJNZXRyaWNzLmJvdW5kaW5nUmVjdC50b3AgOgogICAgICAgICAgICAgIHRoaXMuY29udGFpbmVyTWV0cmljcy5oZWlnaHQgLyAyOwogICAgICAgIH0KCiAgICAgICAgaWYgKHRoaXMucmVjZW50ZXJzKSB7CiAgICAgICAgICB0aGlzLnhFbmQgPSB4Q2VudGVyOwogICAgICAgICAgdGhpcy55RW5kID0geUNlbnRlcjsKICAgICAgICAgIHRoaXMuc2xpZGVEaXN0YW5jZSA9CiAgICAgICAgICAgICAgVXRpbGl0eS5kaXN0YW5jZSh0aGlzLnhTdGFydCwgdGhpcy55U3RhcnQsIHRoaXMueEVuZCwgdGhpcy55RW5kKTsKICAgICAgICB9CgogICAgICAgIHRoaXMubWF4UmFkaXVzID0gdGhpcy5jb250YWluZXJNZXRyaWNzLmZ1cnRoZXN0Q29ybmVyRGlzdGFuY2VGcm9tKAogICAgICAgICAgICB0aGlzLnhTdGFydCwgdGhpcy55U3RhcnQpOwoKICAgICAgICB0aGlzLndhdmVDb250YWluZXIuc3R5bGUudG9wID0KICAgICAgICAgICAgKHRoaXMuY29udGFpbmVyTWV0cmljcy5oZWlnaHQgLSB0aGlzLmNvbnRhaW5lck1ldHJpY3Muc2l6ZSkgLyAyICsgJ3B4JzsKICAgICAgICB0aGlzLndhdmVDb250YWluZXIuc3R5bGUubGVmdCA9CiAgICAgICAgICAgICh0aGlzLmNvbnRhaW5lck1ldHJpY3Mud2lkdGggLSB0aGlzLmNvbnRhaW5lck1ldHJpY3Muc2l6ZSkgLyAyICsgJ3B4JzsKCiAgICAgICAgdGhpcy53YXZlQ29udGFpbmVyLnN0eWxlLndpZHRoID0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ICAgICAgICAgcm91bmRlZCBjb3JuZXJzKS4gU2VlOiBodHRwOi8vanNiaW4uY29tL3RlbWV4YS80CgogICAgICAgICAgIE5vdGU6IFdlIG9ubHkgYXBwbHkgdGhpcyBzdHlsZSBjb25kaXRpb25hbGx5LiBPdGhlcndpc2UsIHRoZSBicm93c2VyCiAgICAgICAgICAgd2lsbCBjcmVhdGUgYSBuZXcgY29tcG9zaXRpbmcgbGF5ZXIgZm9yIGV2ZXJ5IHJpcHBsZSBlbGVtZW50IG9uIHRoZQogICAgICAgICAgIHBhZ2UsIGFuZCB0aGF0IHdvdWxkIGJlIGJhZC4gKi8KICAgICAgICAtd2Via2l0LXRyYW5zZm9ybTogdHJhbnNsYXRlKDAsIDApOwogICAgICAgIHRyYW5zZm9ybTogdHJhbnNsYXRlM2QoMCwgMCwgMCk7CiAgICAgIH0KCiAgICAgICNiYWNrZ3JvdW5kLAogICAgICAjd2F2ZXMsCiAgICAgIC53YXZlLWNvbnRhaW5lciwKICAgICAgLndhdmUgewogICAgICAgIHBvaW50ZXItZXZlbnRzOiBub25lOwogICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTsKICAgICAgICB0b3A6IDA7CiAgICAgICAgbGVmdDogMDsKICAgICAgICB3aWR0aDogMTAwJTsKICAgICAgICBoZWlnaHQ6IDEwMCU7CiAgICAgIH0KCiAgICAgICNiYWNrZ3JvdW5kLAogICAgICAud2F2ZSB7CiAgICAgICAgb3BhY2l0eTogMDsKICAgICAgfQoKICAgICAgI3dhdmVzLAogICAgICAud2F2ZSB7CiAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjsKICAgICAgfQoKICAgICAgLndhdmUtY29udGFpbmVyLAogICAgICAud2F2ZSB7CiAgICAgICAgYm9yZGVyLXJhZGl1czogNTAlOwogICAgICB9CgogICAgICA6aG9zdCguY2lyY2xlKSAjYmFja2dyb3VuZCwKICAgICAgOmhvc3QoLmNpcmNsZSkgI3dhdmVzIHsKICAgICAgICBib3JkZXItcmFkaXVzOiA1MCU7CiAgICAgIH0KCiAgICAgIDpob3N0KC5jaXJjbGUpIC53YXZlLWNvbnRhaW5lciB7CiAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjsKICAgICAgfQogICAgPC9zdHlsZT4KCiAgICA8ZGl2IGlkPSJiYWNrZ3JvdW5kIj48L2Rpdj4KICAgIDxkaXYgaWQ9IndhdmVzIj48L2Rpdj4KYCwKCiAgICAgIGlzOiAncGFwZXItcmlwcGxlJywKICAgICAgYmVoYXZpb3JzOiBbSXJvbkExMXlLZXlzQmVoYXZpb3JdLAoKICAgICAgcHJvcGVydGllczogewogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBpbml0aWFsIG9wYWNpdHkgc2V0IG9uIHRoZSB3YXZlLgogICAgICAgICAqIEB0eXBlIG51bWJlcgogICAgICAgICAqIEBkZWZhdWx0IDAuMjUKICAgICAgICAgKi8KICAgICAgICBpbml0aWFsT3BhY2l0eToge3R5cGU6IE51bWJlciwgdmFsdWU6IDAuMjV9LAoKICAgICAgICAvKioKICAgICAgICAgKiBIb3cgZmFzdCAob3BhY2l0eSBwZXIgc2Vjb25kKSB0aGUgd2F2ZSBmYWRlcyBvdXQuCiAgICAgICAgICoKICAgICAgICAgKiBAdHlwZSBudW1iZXIKICAgICAgICAgKiBAZGVmYXVsdCAwLjgKICAgICAgICAgKi8KICAgICAgICBvcGFjaXR5RGVjYXlWZWxvY2l0eToge3R5cGU6IE51bWJlciwgdmFsdWU6IDAuOH0sCgogICAgICAgIC8qKgogICAgICAgICAqIElmIHRydWUsIHJpcHBsZXMgd2lsbCBleGhpYml0IGEgZ3Jhdml0YXRpb25hbCBwdWxsIHRvd2FyZHMKICAgICAgICAgKiB0aGUgY2VudGVyIG9mIHRoZWlyIGNvbnRhaW5lciBhcyB0aGV5IGZhZGUgYXdheS4KICAgICAgICAgKgogICAgICAgICAqIEB0eXBlIGJvb2xlYW4KICAgICAgICAgKiBAZGVmYXVsdCBmYWxzZQogICAgICAgICAqLwogICAgICAgIHJlY2VudGVyczoge3R5cGU6IEJvb2xlYW4sIHZhbHVlOiBmYWxzZX0sCgogICAgICAgIC8qKgogICAgICAgICAqIElmIHRydWUsIHJpcHBsZXMgd2lsbCBjZW50ZXIgaW5zaWRlIGl0cyBjb250YWluZXIKICAgICAgICAgKgogICAgICAgICAqIEB0eXBlIGJvb2xlYW4KICAgICAgICAgKiBAZGVmYXVsdCBmYWxzZQogICAgICAgICAqLwogICAgICAgIGNlbnRlcjoge3R5cGU6IEJvb2xlYW4sIHZhbHVlOiBmYWxzZX0sCgogICAgICAgIC8qKgogICAgICAgICAqIEEgbGlzdCBvZiB0aGUgdmlzdWFsIHJpcHBsZXMuCiAgICAgICAgICoKICAgICAgICAgKiBAdHlwZSBBcnJheQogICAgICAgICAqIEBkZWZhdWx0IFtdCiAgICAgICAgICovCiAgICAgICAgcmlwcGxlczogewogICAgICAgICAgdHlwZTogQXJyYXksCiAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24oKSB7CiAgICAgICAgICAgIHJldHVybiBbXTsKICAgICAgICAgIH0KICAgICAgICB9LAoKICAgICAgICAvKioKICAgICAgICAgKiBUcnVlIHdoZW4gdGhlcmUgYXJlIHZpc2libGUgcmlwcGxlcyBhbmltYXRpbmcgd2l0aGluIHRoZQogICAgICAgICAqIGVsZW1lbnQuCiAgICAgICAgICovCiAgICAgICAgYW5pbWF0aW5nOgogICAgICAgICAgICB7dHlwZTogQm9vbGVhbiwgcmVhZE9ubHk6IHRydWUsIHJlZmxlY3RUb0F0dHJpYnV0ZTogdHJ1ZSwgdmFsdWU6IGZhbHNlfSwKCiAgICAgICAgLyoqCiAgICAgICAgICogSWYgdHJ1ZSwgdGhlIHJpcHBsZSB3aWxsIHJlbWFpbiBpbiB0aGUgImRvd24iIHN0YXRlIHVudGlsIGBob2xkRG93bmAKICAgICAgICAgKiBpcyBzZXQgdG8gZmFsc2UgYWdhaW4uCiAgICAgICAgICovCiAgICAgICAgaG9sZERvd246IHt0eXBlOiBCb29sZWFuLCB2YWx1ZTogZmFsc2UsIG9ic2VydmVyOiAnX2hvbGREb3duQ2hhbmdlZCd9LAoKICAgICAgICAvKioKICAgICAgICAgKiBJZiB0cnVlLCB0aGUgcmlwcGxlIHdpbGwgbm90IGdlbmVyYXRlIGEgcmlwcGxlIGVmZmVjdAogICAgICAgICAqIHZpYSBwb2ludGVyIGludGVyYWN0aW9uLgogICAgICAgICAqIENhbGxpbmcgcmlwcGxlJ3MgaW1wZXJhdGl2ZSBhcGkgbGlrZSBgc2ltdWxhdGVkUmlwcGxlYCB3aWxsCiAgICAgICAgICogc3RpbGwgZ2VuZXJhdGUgdGhlIHJpcHBsZSBlZmZlY3QuCiAgICAgICAgICovCiAgICAgICAgbm9pbms6IHt0eXBlOiBCb29sZWFuLCB2YWx1ZTogZmFsc2V9LAoKICAgICAgICBfYW5pbWF0aW5nOiB7dHlwZTogQm9vbGVhbn0sCgogICAgICAgIF9ib3VuZEFuaW1hdGU6IHsKICAgICAgICAgIHR5cGU6IEZ1bmN0aW9uLAogICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5hbmltYXRlLmJpbmQodGhpcyk7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9LAoKICAgICAgZ2V0IHRhcmdldCgpIHsKICAgICAgICByZXR1cm4gdGhpcy5rZXlFdmVudFRhcmdldDsKICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgKiBAdHlwZSB7IU9iamVjdH0KICAgICAgICovCiAgICAgIGtleUJpbmRpbmdzOiB7CiAgICAgICAgJ2VudGVyOmtleWRvd24nOiAnX29uRW50ZXJLZXlkb3duJywKICAgICAgICAnc3BhY2U6a2V5ZG93bic6ICdfb25TcGFjZUtleWRvd24nLAogICAgICAgICdzcGFjZTprZXl1cCc6ICdfb25TcGFjZUtleXVwJwogICAgICB9LAoKICAgICAgLyoqIEBvdmVycmlkZSAqLwogICAgICBhdHRhY2hlZDogZnVuY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kb3duJywgJ3VpRG93bkFjdGlvbicpOwogICAgICAgIHRoaXMua2V5RXZlbnRUYXJnZXQgPSBudWxsOwogICAgICB9LAoKICAgICAgZ2V0IHNob3VsZEtlZXBBbmltYXRpbmcoKSB7CiAgICAgICAgZm9yICh2YXIgaW5kZXggPSAwOyBpbmRleCA8IHRoaXMucmlwcGxlcy5sZW5ndGg7ICsraW5kZXgpIHsKICAgICAgICAgIGlmICghdGhpcy5yaXBwbGVzW2luZGV4XS5pc0FuaW1hdGlvbkNvbXBsZXRlKSB7CiAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICB9LAoKICAgICAgc2ltdWxhdGVkUmlwcGxlOiBmdW5jdGlvbigpIHsKICAgICAgICB0aGlzLmRvd25BY3Rpb24obnVsbCk7CgogICAgICAgIC8vIFBsZWFzZSBzZWUgcG9seW1lci9wb2x5bWVyIzEzMDUKICAgICAgICB0aGlzLmFzeW5jKGZ1bmN0aW9uKCkgewogICAgICAgICAgdGhpcy51cEFjdGlvbigpOwogICAgICAgIH0sIDEpOwogICAgICB9LAoKICAgICAgLyoqCiAgICAgICAqIFByb3Zva2VzIGEgcmlwcGxlIGRvd24gZWZmZWN0IHZpYSBhIFVJIGV2ZW50LAogICAgICAgKiByZXNwZWN0aW5nIHRoZSBgbm9pbmtgIHByb3BlcnR5LgogICAgICAgKiBAcGFyYW0ge0V2ZW50PX0gZXZlbnQKICAgICAgICovCiAgICAgIHVpRG93bkFjdGlvbjogZnVuY3Rpb24oZXZlbnQpIHsKICAgICAgICBpZiAoIXRoaXMubm9pbmspIHsKICAgICAgICAgIHRoaXMuZG93bkFjdGlvbihldmVudCk7CiAgICAgICAgfQogICAgICB9LAoKICAgICAgLyoqCiAgICAgICAqIFByb3Zva2VzIGEgcmlwcGxlIGRvd24gZWZmZWN0IHZpYSBhIFVJIGV2ZW50LAogICAgICAgKiAqbm90KiByZXNwZWN0aW5nIHRoZSBgbm9pbmtgIHByb3BlcnR5LgogICAgICAgKiBAcGFyYW0ge0V2ZW50PX0gZXZlbnQKICAgICAgICovCiAgICAgIGRvd25BY3Rpb246IGZ1bmN0aW9uKGV2ZW50KSB7CiAgICAgICAgaWYgKHRoaXMuaG9sZERvd24gJiYgdGhpcy5yaXBwbGVzLmxlbmd0aCA+IDApIHsKICAgICAgICAgIHJldHVybjsKICAgICAgICB9CgogICAgICAgIHZhciByaXBwbGUgPSB0aGlzLmFkZFJpcHBsZSgpOwoKICAgICAgICByaXBwbGUuZG93bkFjdGlvbihldmVudCk7CgogICAgICAgIGlmICghdGhpcy5fYW5pbWF0aW5nKSB7CiAgICAgICAgICB0aGlzLl9hbmltYXRpbmcgPSB0cnVlOwogICAgICAgICAgdGhpcy5hbmltYXRlKCk7CiAgICAgICAgfQogICAgICB9LAoKICAgICAgLyoqCiAgICAgICAqIFByb3Zva2VzIGEgcmlwcGxlIHVwIGVmZmVjdCB2aWEgYSBVSSBldmVudCwKICAgICAgICogcmVzcGVjdGluZyB0aGUgYG5vaW5rYCBwcm9wZXJ0eS4KICAgICAgICogQHBhcmFtIHtFdmVudD19IGV2ZW50CiAgICAgICAqLwogICAgICB1aVVwQWN0aW9uOiBmdW5jdGlvbihldmVudCkgewogICAgICAgIGlmICghdGhpcy5ub2luaykgewogICAgICAgICAgdGhpcy51cEFjdGlvbihldmVudCk7CiAgICAgICAgfQogICAgICB9LAoKICAgICAgLyoqCiAgICAgICAqIFByb3Zva2VzIGEgcmlwcGxlIHVwIGVmZmVjdCB2aWEgYSBVSSBldmVudCwKICAgICAgICogKm5vdCogcmVzcGVjdGluZyB0aGUgYG5vaW5rYCBwcm9wZXJ0eS4KICAgICAgICogQHBhcmFtIHtFdmVudD19IGV2ZW50CiAgICAgICAqLwogICAgICB1cEFjdGlvbjogZnVuY3Rpb24oZXZlbnQpIHsKICAgICAgICBpZiAodGhpcy5ob2xkRG93bikgewogICAgICAgICAgcmV0dXJuOwogICAgICAgIH0KCiAgICAgICAgdGhpcy5yaXBwbGVzLmZvckVhY2goZnVuY3Rpb24ocmlwcGxlKSB7CiAgICAgICAgICByaXBwbGUudXBBY3Rpb24oZXZlbnQpOwogICAgICAgIH0pOwoKICAgICAgICB0aGlzLl9hbmltYXRpbmcgPSB0cnVlOwogICAgICAgIHRoaXMuYW5pbWF0ZSgpOwogICAgICB9LAoKICAgICAgb25BbmltYXRpb25Db21wbGV0ZTogZnVuY3Rpb24oKSB7CiAgICAgICAgdGhpcy5fYW5pbWF0aW5nID0gZmFsc2U7CiAgICAgICAgdGhpcy4kLmJhY2tncm91bmQuc3R5bGUuYmFja2dyb3VuZENvbG9yID0gJyc7CiAgICAgICAgdGhpcy5maXJlKCd0cmFuc2l0aW9uZW5kJyk7CiAgICAgIH0sCgogICAgICBhZGRSaXBwbGU6IGZ1bmN0aW9uKCkgewogICAgICAgIHZhciByaXBwbGUgPSBuZXcgUmlwcGxlKHRoaXMpOwoKICAgICAgICBkb20odGhpcy4kLndhdmVzKS5hcHBlbmRDaGlsZChyaXBwbGUud2F2ZUNvbnRhaW5lcik7CiAgICAgICAgdGhpcy4kLmJhY2tncm91bmQuc3R5bGUuYmFja2dyb3VuZENvbG9yID0gcmlwcGxlLmNvbG9yOwogICAgICAgIHRoaXMucmlwcGxlcy5wdXNoKHJpcHBsZSk7CgogICAgICAgIHRoaXMuX3NldEFuaW1hdGluZyh0cnVlKTsKCiAgICAgICAgcmV0dXJuIHJpcHBsZTsKICAgICAgfSwKCiAgICAgIHJlbW92ZVJpcHBsZTogZnVuY3Rpb24ocmlwcGxlKSB7CiAgICAgICAgdmFyIHJpcHBsZUluZGV4ID0gdGhpcy5yaXBwbGVzLmluZGV4T2YocmlwcGxlKTsKCiAgICAgICAgaWYgKHJpcHBsZUluZGV4IDwgMCkgewogICAgICAgICAgcmV0dXJuOwogICAgICAgIH0KCiAgICAgICAgdGhpcy5yaXBwbGVzLnNwbGljZShyaXBwbGVJbmRleCwgMSk7CgogIC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LWJ1dHRvbj4KICAgICAgICAgIDxpcm9uLWljb24gaWNvbj0iZmF2b3JpdGUiPjwvaXJvbi1pY29uPgogICAgICAgICAgY3VzdG9tIGJ1dHRvbiBjb250ZW50CiAgICAgICAgPC9wYXBlci1idXR0b24+CgogICAgVG8gdXNlIGBwYXBlci1idXR0b25gIGFzIGEgbGluaywgd3JhcCBpdCBpbiBhbiBhbmNob3IgdGFnLiBTaW5jZSBgcGFwZXItYnV0dG9uYAogICAgd2lsbCBhbHJlYWR5IHJlY2VpdmUgZm9jdXMsIHlvdSBtYXkgd2FudCB0byBwcmV2ZW50IHRoZSBhbmNob3IgdGFnIGZyb20KICAgIHJlY2VpdmluZyBmb2N1cyBhcyB3ZWxsIGJ5IHNldHRpbmcgaXRzIHRhYmluZGV4IHRvIC0xLgoKICAgICAgICA8YSBocmVmPSJodHRwczovL3d3dy5wb2x5bWVyLXByb2plY3Qub3JnLyIgdGFiaW5kZXg9Ii0xIj4KICAgICAgICAgIDxwYXBlci1idXR0b24gcmFpc2VkPlBvbHltZXIgUHJvamVjdDwvcGFwZXItYnV0dG9uPgogICAgICAgIDwvYT4KCiAgICAjIyMgU3R5bGluZwoKICAgIFN0eWxlIHRoZSBidXR0b24gd2l0aCBDU1MgYXMgeW91IHdvdWxkIGEgbm9ybWFsIERPTSBlbGVtZW50LgoKICAgICAgICBwYXBlci1idXR0b24uZmFuY3kgewogICAgICAgICAgYmFja2dyb3VuZDogZ3JlZW47CiAgICAgICAgICBjb2xvcjogeWVsbG93OwogICAgICAgIH0KCiAgICAgICAgcGFwZXItYnV0dG9uLmZhbmN5OmhvdmVyIHsKICAgICAgICAgIGJhY2tncm91bmQ6IGxpbWU7CiAgICAgICAgfQoKICAgICAgICBwYXBlci1idXR0b25bZGlzYWJsZWRdLAogICAgICAgIHBhcGVyLWJ1dHRvblt0b2dnbGVzXVthY3RpdmVdIHsKICAgICAgICAgIGJhY2tncm91bmQ6IHJlZDsKICAgICAgICB9CgogICAgQnkgZGVmY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Ly8gV2FpdCB1bnRpbCBzdHlsZXMgaGF2ZSByZXNvbHZlZCB0byBjaGVjayBmb3IgdGhlIGRlZmF1bHQgc2VudGluZWwuCiAgICAgICAgLy8gU2VlIHBvbHltZXIjNDAwOSBmb3IgbW9yZSBkZXRhaWxzLgogICAgICAgIGFmdGVyTmV4dFJlbmRlcih0aGlzLCBmdW5jdGlvbigpIHsKICAgICAgICAgIHZhciBpbmtTaXplID0KICAgICAgICAgICAgICB0aGlzLmdldENvbXB1dGVkU3R5bGVWYWx1ZSgnLS1jYWxjdWxhdGVkLXBhcGVyLWNoZWNrYm94LWluay1zaXplJykKICAgICAgICAgICAgICAgICAgLnRyaW0oKTsKICAgICAgICAgIC8vIElmIHVuc2V0LCBjb21wdXRlIGFuZCBzZXQgdGhlIGRlZmF1bHQgYC0tcGFwZXItY2hlY2tib3gtaW5rLXNpemVgLgogICAgICAgICAgaWYgKGlua1NpemUgPT09ICctMXB4JykgewogICAgICAgICAgICB2YXIgY2hlY2tib3hTaXplVGV4dCA9CiAgICAgICAgICAgICAgICB0aGlzLmdldENvbXB1dGVkU3R5bGVWYWx1ZSgnLS1jYWxjdWxhdGVkLXBhcGVyLWNoZWNrYm94LXNpemUnKQogICAgICAgICAgICAgICAgICAgIC50cmltKCk7CgogICAgICAgICAgICB2YXIgdW5pdHMgPSAncHgnOwogICAgICAgICAgICB2YXIgdW5pdHNNYXRjaGVzID0gY2hlY2tib3hTaXplVGV4dC5tYXRjaCgvW0EtWmEtel0rJC8pOwogICAgICAgICAgICBpZiAodW5pdHNNYXRjaGVzICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgdW5pdHMgPSB1bml0c01hdGNoZXNbMF07CiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIHZhciBjaGVja2JveFNpemUgPSBwYXJzZUZsb2F0KGNoZWNrYm94U2l6ZVRleHQpOwogICAgICAgICAgICB2YXIgZGVmYXVsdElua1NpemUgPSAoOCAvIDMpICogY2hlY2tib3hTaXplOwoKICAgICAgICAgICAgaWYgKHVuaXRzID09PSAncHgnKSB7CiAgICAgICAgICAgICAgZGVmYXVsdElua1NpemUgPSBNYXRoLmZsb29yKGRlZmF1bHRJbmtTaXplKTsKCiAgICAgICAgICAgICAgLy8gVGhlIGNoZWNrYm94IGFuZCByaXBwbGUgbmVlZCB0byBoYXZlIHRoZSBzYW1lIHBhcml0eSBzbyB0aGF0IHRoZWlyCiAgICAgICAgICAgICAgLy8gY2VudGVycyBhbGlnbi4KICAgICAgICAgICAgICBpZiAoZGVmYXVsdElua1NpemUgJSAyICE9PSBjaGVja2JveFNpemUgJSAyKSB7CiAgICAgICAgICAgICAgICBkZWZhdWx0SW5rU2l6ZSsrOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQoKICAgICAgICAgICAgdGhpcy51cGRhdGVTdHlsZXMoewogICAgICAgICAgICAgICctLXBhcGVyLWNoZWNrYm94LWluay1zaXplJzogZGVmYXVsdElua1NpemUgKyB1bml0cywKICAgICAgICAgICAgfSk7CiAgICAgICAgICB9CiAgICAgICAgfSk7CiAgICAgIH0sCgogICAgICBfY29tcHV0ZUNoZWNrYm94Q2xhc3M6IGZ1bmN0aW9uKGNoZWNrZWQsIGludmFsaWQpIHsKICAgICAgICB2YXIgY2xhc3NOYW1lID0gJyc7CiAgICAgICAgaWYgKGNoZWNrZWQpIHsKICAgICAgICAgIGNsYXNzTmFtZSArPSAnY2hlY2tlZCAnOwogICAgICAgIH0KICAgICAgICBpZiAoaW52YWxpZCkgewogICAgICAgICAgY2xhc3NOYW1lICs9ICdpbnZhbGlkJzsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGNsYXNzTmFtZTsKICAgICAgfSwKCiAgICAgIF9jb21wdXRlQ2hlY2ttYXJrQ2xhc3M6IGZ1bmN0aW9uKGNoZWNrZWQpIHsKICAgICAgICByZXR1cm4gY2hlY2tlZCA/ICcnIDogJ2hpZGRlbic7CiAgICAgIH0sCgogICAgICAvLyBjcmVhdGUgcmlwcGxlIGluc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dGhlIHBvc2l0aW9uVGFyZ2V0IHdpdGhvdXQgb3ZlcmxhcHBpbmcKICAgICAgICAgKiBpdC4KICAgICAgICAgKi8KICAgICAgICBub092ZXJsYXA6IHt0eXBlOiBCb29sZWFufSwKCiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIGVsZW1lbnQgdGhhdCBzaG91bGQgYmUgdXNlZCB0byBwb3NpdGlvbiB0aGUgZWxlbWVudC4gSWYgbm90IHNldCwgaXQKICAgICAgICAgKiB3aWxsIGRlZmF1bHQgdG8gdGhlIHBhcmVudCBub2RlLgogICAgICAgICAqIEB0eXBlIHshRWxlbWVudH0KICAgICAgICAgKi8KICAgICAgICBwb3NpdGlvblRhcmdldDoge3R5cGU6IEVsZW1lbnR9LAoKICAgICAgICAvKioKICAgICAgICAgKiBUaGUgb3JpZW50YXRpb24gYWdhaW5zdCB3aGljaCB0byBhbGlnbiB0aGUgZWxlbWVudCBob3Jpem9udGFsbHkKICAgICAgICAgKiByZWxhdGl2ZSB0byB0aGUgYHBvc2l0aW9uVGFyZ2V0YC4gUG9zc2libGUgdmFsdWVzIGFyZSAibGVmdCIsICJyaWdodCIsCiAgICAgICAgICogImNlbnRlciIsICJhdXRvIi4KICAgICAgICAgKi8KICAgICAgICBob3Jpem9udGFsQWxpZ246IHt0eXBlOiBTdHJpbmd9LAoKICAgICAgICAvKioKICAgICAgICAgKiBUaGUgb3JpZW50YXRpb24gYWdhaW5zdCB3aGljaCB0byBhbGlnbiB0aGUgZWxlbWVudCB2ZXJ0aWNhbGx5CiAgICAgICAgICogcmVsYXRpdmUgdG8gdGhlIGBwb3NpdGlvblRhcmdldGAuIFBvc3NpYmxlIHZhbHVlcyBhcmUgInRvcCIsICJib3R0b20iLAogICAgICAgICAqICJtaWRkbGUiLCAiYXV0byIuCiAgICAgICAgICovCiAgICAgICAgdmVydGljYWxBbGlnbjoge3R5cGU6IFN0cmluZ30sCgogICAgICAgIC8qKgogICAgICAgICAqIElmIHRydWUsIGl0IHdpb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gZG93bndhcmRzLgogICAgICAgICAqCiAgICAgICAgICogQ29udmVyc2VseSBpZiBgdmVydGljYWxBbGlnbmAgaXMgImJvdHRvbSIsIHRoaXMgb2Zmc2V0IHdpbGwgaW5jcmVhc2UKICAgICAgICAgKiBvciBkZWNyZWFzZSB0aGUgZGlzdGFuY2UgdG8gdGhlIGJvdHRvbSBzaWRlIG9mIHRoZSBzY3JlZW46IGEgbmVnYXRpdmUKICAgICAgICAgKiBvZmZzZXQgd2lsbCBtb3ZlIHRoZSBkcm9wZG93biBkb3dud2FyZHM7IGEgcG9zaXRpdmUgb25lLCB1cHdhcmRzLgogICAgICAgICAqLwogICAgICAgIHZlcnRpY2FsT2Zmc2V0OiB7dHlwZTogTnVtYmVyLCB2YWx1ZTogMCwgbm90aWZ5OiB0cnVlfSwKCiAgICAgICAgLyoqCiAgICAgICAgICogU2V0IHRvIHRydWUgdG8gYXV0by1maXQgb24gYXR0YWNoLgogICAgICAgICAqLwogICAgICAgIGF1dG9GaXRPbkF0dGFjaDoge3R5cGU6IEJvb2xlYW4sIHZhbHVlOiBmYWxzZX0sCgogICAgICAgIC8qKiBAdHlwZSB7P09iamVjdH0gKi8KICAgICAgICBfZml0SW5mbzoge3R5cGU6IE9iamVjdH0KICAgICAgfSwKCiAgICAgIGdldCBfZml0V2lkdGgoKSB7CiAgICAgICAgdmFyIGZpdFdpZHRoOwogICAgICAgIGlmICh0aGlzLmZpdEludG8gPT09IHdpbmRvdykgewogICAgICAgICAgZml0V2lkdGggPSB0aGlzLmZpdEludG8uaW5uZXJXaWR0aDsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgZml0V2lkdGggPSB0aGlzLmZpdEludG8uZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCkud2lkdGg7CiAgICAgICAgfQogICAgICAgIHJldHVybiBmaXRXaWR0aDsKICAgICAgfSwKCiAgICAgIGdldCBfZml0SGVpZ2h0KCkgewogICAgICAgIHZhciBmaXRIZWlnaHQ7CiAgICAgICAgaWYgKHRoaXMuZml0SW50byA9PT0gd2luZG93KSB7CiAgICAgICAgICBmaXRIZWlnaHQgPSB0aGlzLmZpdEludG8uaW5uZXJIZWlnaHQ7CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgIGZpdEhlaWdodCA9IHRoaXMuZml0SW50by5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKS5oZWlnaHQ7CiAgICAgICAgfQogICAgICAgIHJldHVybiBmaXRIZWlnaHQ7CiAgICAgIH0sCgogICAgICBnZXQgX2ZpdExlZnQoKSB7CiAgICAgICAgdmFyIGZpdExlZnQ7CiAgICAgICAgaWYgKHRoaXMuZml0SW50byA9PT0gd2luZG93KSB7CiAgICAgICAgICBmaXRMZWZ0ID0gMDsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgZml0TGVmdCA9IHRoaXMuZml0SW50by5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKS5sZWZ0OwogICAgICAgIH0KICAgICAgICByZXR1cm4gZml0TGVmdDsKICAgICAgfSwKCiAgICAgIGdldCBfZml0VG9wKCkgewogICAgICAgIHZhciBmaXRUb3A7CiAgICAgICAgaWYgKHRoaXMuZml0SW50byA9PT0gd2luZG93KSB7CiAgICAgICAgICBmaXRUb3AgPSAwOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICBmaXRUb3AgPSB0aGlzLmZpdEludG8uZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCkudG9wOwogICAgICAgIH0KICAgICAgICByZXR1cm4gZml0VG9wOwogICAgICB9LAoKICAgICAgLyoqCiAgICAgICAqIFRoZSBlbGVtZW50IHRoYXQgc2hvdWxkIGJlIHVzZWQgdG8gcG9zaXRpb24gdGhlIGVsZW1lbnQsCiAgICAgICAqIGlmIG5vIHBvc2l0aW9uIHRhcmdldCBpcyBjb25maWd1cmVkLgogICAgICAgKi8KICAgICAgZ2V0IF9kZWZhdWx0UG9zaXRpb25UYXJnZXQoKSB7CiAgICAgICAgdmFyIHBhcmVudCA9IGRvbSh0aGlzKS5wYXJlbnROb2RlOwoKICAgICAgICBpZiAocGFyZW50ICYmIHBhcmVudC5ub2RlVHlwZSA9PT0gTm9kZS5ET0NVTUVOVF9GUkFHTUVOVF9OT0RFKSB7CiAgICAgICAgICBwYXJlbnQgPSBwYXJlbnQuaG9zdDsKICAgICAgICB9CgogICAgICAgIHJldHVybiBwYXJlbnQ7CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogVGhlIGhvcml6b250YWwgYWxpZ24gdmFsdWUsIGFjY291bnRpbmcgZm9yIHRoZSBSVEwvTFRSIHRleHQgZGlyZWN0aW9uLgogICAgICAgKi8KICAgICAgZ2V0IF9sb2NhbGVIb3Jpem9udGFsQWxpZ24oKSB7CiAgICAgICAgaWYgKHRoaXMuX2lzUlRMKSB7CiAgICAgICAgICAvLyBJbiBSVEwsICJsZWZ0IiBiZWNvbWVzICJyaWdodCIuCiAgICAgICAgICBpZiAodGhpcy5ob3Jpem9udGFsQWxpZ24gPT09ICdyaWdodCcpIHsKICAgICAgICAgICAgcmV0dXJuICdsZWZ0JzsKICAgICAgICAgIH0KICAgICAgICAgIGlmICh0aGlzLmhvcml6b250YWxBbGlnbiA9PT0gJ2xlZnQnKSB7CiAgICAgICAgICAgIHJldHVybiAncmlnaHQnOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gdGhpcy5ob3Jpem9udGFsQWxpZ247CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogVHJ1ZSBpZiB0aGUgZWxlbWVudCBzaG91bGQgYmUgcG9zaXRpb25lZCBpbnN0ZWFkIG9mIGNlbnRlcmVkLgogICAgICAgKiBAcHJpdmF0ZQogICAgICAgKi8KICAgICAgZ2V0IF9fc2hvdWxkUG9zaXRpb24oKSB7CiAgICAgICAgcmV0dXJuICh0aGlzLmhvcml6b250YWxBbGlnbiB8fCB0aGlzLnZlcnRpY2FsQWxpZ24pICYmIHRoaXMucG9zaXRpb25UYXJnZXQ7CiAgICAgIH0sCgogICAgICA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hc29ucyB3ZWJjb21wb25lbnRzL3NoYWR5ZG9tIzEyMAogICAgICAgICAgICAvLyBGbHVzaCB0byBnZXQgY29ycmVjdCBsYXlvdXQgaW5mby4KICAgICAgICAgICAgd2luZG93LlNoYWR5RE9NICYmIFNoYWR5RE9NLmZsdXNoKCk7CiAgICAgICAgICAgIHRoaXMuZml0KCk7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9LAoKICAgICAgLyoqIEBvdmVycmlkZSAqLwogICAgICBkZXRhY2hlZDogZnVuY3Rpb24oKSB7CiAgICAgICAgaWYgKHRoaXMuX19kZWZlcnJlZEZpdCkgewogICAgICAgICAgY2xlYXJUaW1lb3V0KHRoaXMuX19kZWZlcnJlZEZpdCk7CiAgICAgICAgICB0aGlzLl9fZGVmZXJyZWRGaXQgPSBudWxsOwogICAgICAgIH0KICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgKiBQb3NpdGlvbnMgYW5kIGZpdHMgdGhlIGVsZW1lbnQgaW50byB0aGUgYGZpdEludG9gIGVsZW1lbnQuCiAgICAgICAqLwogICAgICBmaXQ6IGZ1bmN0aW9uKCkgewogICAgICAgIHRoaXMucG9zaXRpb24oKTsKICAgICAgICB0aGlzLmNvbnN0cmFpbigpOwogICAgICAgIHRoaXMuY2VudGVyKCk7CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogTWVtb2l6ZSBpbmZvcm1hdGlvbiBuZWVkZWQgdG8gcG9zaXRpb24gYW5kIHNpemUgdGhlIHRhcmdldCBlbGVtZW50LgogICAgICAgKiBAc3VwcHJlc3Mge2RlcHJlY2F0ZWR9CiAgICAgICAqLwogICAgICBfZGlzY292ZXJJbmZvOiBmdW5jdGlvbigpIHsKICAgICAgICBpZiAodGhpcy5fZml0SW5mbykgewogICAgICAgICAgcmV0dXJuOwogICAgICAgIH0KICAgICAgICB2YXIgdGFyZ2V0ID0gd2luZG93LmdldENvbXB1dGVkU3R5bGUodGhpcyk7CiAgICAgICAgdmFyIHNpemVyID0gd2luZG93LmdldENvbXB1dGVkU3R5bGUodGhpcy5zaXppbmdUYXJnZXQpOwoKICAgICAgICB0aGlzLl9maXRJbmZvID0gewogICAgICAgICAgaW5saW5lU3R5bGU6IHsKICAgICAgICAgICAgdG9wOiB0aGlzLnN0eWxlLnRvcCB8fCAnJywKICAgICAgICAgICAgbGVmdDogdGhpcy5zdHlsZS5sZWZ0IHx8ICcnLAogICAgICAgICAgICBwb3NpdGlvbjogdGhpcy5zdHlsZS5wb3NpdGlvbiB8fCAnJwogICAgICAgICAgfSwKICAgICAgICAgIHNpemVySW5saW5lU3R5bGU6IHsKICAgICAgICAgICAgbWF4V2lkdGg6IHRoaXMuc2l6aW5nVGFyZ2V0LnN0eWxlLm1heFdpZHRoIHx8ICcnLAogICAgICAgICAgICBtYXhIZWlnaHQ6IHRoaXMuc2l6aW5nVGFyZ2V0LnN0eWxlLm1heEhlaWdodCB8fCAnJywKICAgICAgICAgICAgYm94U2l6aW5nOiB0aGlzLnNpemluZ1RhcmdldC5zdHlsZS5ib3hTaXppbmcgfHwgJycKICAgICAgICAgIH0sCiAgICAgICAgICBwb3NpdGlvbmVkQnk6IHsKICAgICAgICAgICAgdmVydGljYWxseTogdGFyZ2V0LnRvcCAhPT0gJ2F1dG8nID8KICAgICAgICAgICAgICAgICd0b3AnIDoKICAgICAgICAgICAgICAgICh0YXJnZXQuYm90dG9tICE9PSAnYXV0bycgPyAnYm90dG9tJyA6IG51bGwpLAogICAgICAgICAgICBob3Jpem9udGFsbHk6IHRhcmdldC5sZWZ0ICE9PSAnYXV0bycgPwogICAgICAgICAgICAgICAgJ2xlZnQnIDoKICAgICAgICAgICAgICAgICh0YXJnZXQucmlnaHQgIT09ICdhdXRvJyA/ICdyaWdodCcgOiBudWxsKQogICAgICAgICAgfSwKICAgICAgICAgIHNpemVkQnk6IHsKICAgICAgICAgICAgaGVpZ2h0OiBzaXplci5tYXhIZWlnaHQgIT09ICdub25lJywKICAgICAgICAgICAgd2lkdGg6IHNpemVyLm1heFdpZHRoICE9PSAnbm9uZScsCiAgICAgICAgICAgIG1pbldpZHRoOiBwYXJzZUludChzaXplci5taW5XaWR0aCwgMTApIHx8IDAsCiAgICAgICAgICAgIG1pbkhlaWdodDogcGFyc2VJbnQoc2l6ZXIubWluSGVpZ2h0LCAxMCkgfHwgMAogICAgICAgICAgfSwKICAgICAgICAgIG1hcmdpbjogewogICAgICAgICAgICB0b3A6IHBhcnNlSW50KHRhcmdldC5tYXJnaW5Ub3AsIDEwKSB8fCAwLAogICAgICAgICAgICByaWdodDogcGFyc2VJbnQodGFyZ2V0Lm1hcmdpblJpZ2h0LCAxMCkgfHwgMCwKICAgICAgICAgICAgYm90dG9tOiBwYXJzZUludCh0YXJnZXQubWFyZ2luQm90dG9tLCAxMCkgfHwgMCwKICAgICAgICAgICAgbGVmdDogcGFyc2VJbnQodGFyZ2V0Lm1hcmdpbkxlZnQsIDEwKSB8fCAwCiAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgKiBSZXNldHMgdGhlIHRhcmdldCBlbGVtZW50J3MgcG9zaXRpb24gYW5kIHNpemUgY29uc3RyYWludHMsIGFuZCBjbGVhcgogICAgICAgKiB0aGUgbWVtb2l6ZWQgZGF0YS4KICAgICAgICovCiAgICAgIHJlc2V0Rml0OiBmdW5jdGlvbigpIHsKICAgICAgICB2YXIgaW5mbyA9IHRoaXMuX2ZpdEluZm8gfHwge307CiAgICAgICAgZm9yICh2YXIgcHJvcGVydHkgaW4gaW5mby5zaXplcklubGluZVN0eWxlKSB7CiAgICAgICAgICB0aGlzLnNpemluZ1RhcmdldC5zdHlsZVtwcm9wZXJ0eV0gPSBpbmZvLnNpemVySW5saW5lU3R5bGVbcHJvcGVydHldOwogICAgICAgIH0KICAgICAgICBmb3IgKHZhciBwcm9wZXJ0eSBpbiBpbmZvLmlubGluZVN0eWxlKSB7CiAgICAgICAgICB0aGlzLnN0eWxlW3Byb3BlcnR5XSA9IGluZm8u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W4obGVmdCwgcmlnaHQgLSB0aGlzLl9maXRJbmZvLnNpemVkQnkubWluV2lkdGgpKTsKICAgICAgICB0b3AgPSBNYXRoLm1heCgKICAgICAgICAgICAgZml0UmVjdC50b3AgKyBtYXJnaW4udG9wLAogICAgICAgICAgICBNYXRoLm1pbih0b3AsIGJvdHRvbSAtIHRoaXMuX2ZpdEluZm8uc2l6ZWRCeS5taW5IZWlnaHQpKTsKCiAgICAgICAgLy8gVXNlIHJpZ2h0L2JvdHRvbSB0byBzZXQgbWF4V2lkdGgvbWF4SGVpZ2h0LCBhbmQgcmVzcGVjdAogICAgICAgIC8vIG1pbldpZHRoL21pbkhlaWdodC4KICAgICAgICB0aGlzLnNpemluZ1RhcmdldC5zdHlsZS5tYXhXaWR0aCA9CiAgICAgICAgICAgIE1hdGgubWF4KHJpZ2h0IC0gbGVmdCwgdGhpcy5fZml0SW5mby5zaXplZEJ5Lm1pbldpZHRoKSArICdweCc7CiAgICAgICAgdGhpcy5zaXppbmdUYXJnZXQuc3R5bGUubWF4SGVpZ2h0ID0KICAgICAgICAgICAgTWF0aC5tYXgoYm90dG9tIC0gdG9wLCB0aGlzLl9maXRJbmZvLnNpemVkQnkubWluSGVpZ2h0KSArICdweCc7CgogICAgICAgIC8vIFJlbW92ZSB0aGUgb2Zmc2V0IGNhdXNlZCBieSBhbnkgc3RhY2tpbmcgY29udGV4dC4KICAgICAgICB0aGlzLnN0eWxlLmxlZnQgPSAobGVmdCAtIHJlY3QubGVmdCkgKyAncHgnOwogICAgICAgIHRoaXMuc3R5bGUudG9wID0gKHRvcCAtIHJlY3QudG9wKSArICdweCc7CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogQ29uc3RyYWlucyB0aGUgc2l6ZSBvZiB0aGUgZWxlbWVudCB0byBgZml0SW50b2AgYnkgc2V0dGluZyBgbWF4LWhlaWdodGAKICAgICAgICogYW5kL29yIGBtYXgtd2lkdGhgLgogICAgICAgKi8KICAgICAgY29uc3RyYWluOiBmdW5j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0Tm9ybWFsaXplZFJlY3Q6IGZ1bmN0aW9uKHRhcmdldCkgewogICAgICAgIGlmICh0YXJnZXQgPT09IGRvY3VtZW50LmRvY3VtZW50RWxlbWVudCB8fCB0YXJnZXQgPT09IHdpbmRvdykgewogICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgdG9wOiAwLAogICAgICAgICAgICBsZWZ0OiAwLAogICAgICAgICAgICB3aWR0aDogd2luZG93LmlubmVyV2lkdGgsCiAgICAgICAgICAgIGhlaWdodDogd2luZG93LmlubmVySGVpZ2h0LAogICAgICAgICAgICByaWdodDogd2luZG93LmlubmVyV2lkdGgsCiAgICAgICAgICAgIGJvdHRvbTogd2luZG93LmlubmVySGVpZ2h0CiAgICAgICAgICB9OwogICAgICAgIH0KICAgICAgICByZXR1cm4gdGFyZ2V0LmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpOwogICAgICB9LAoKICAgICAgX19nZXRPZmZzY3JlZW5BcmVhOiBmdW5jdGlvbihwb3NpdGlvbiwgc2l6ZSwgZml0UmVjdCkgewogICAgICAgIHZhciB2ZXJ0aWNhbENyb3AgPSBNYXRoLm1pbigwLCBwb3NpdGlvbi50b3ApICsKICAgICAgICAgICAgTWF0aC5taW4oMCwgZml0UmVjdC5ib3R0b20gLSAocG9zaXRpb24udG9wICsgc2l6ZS5oZWlnaHQpKTsKICAgICAgICB2YXIgaG9yaXpvbnRhbENyb3AgPSBNYXRoLm1pbigwLCBwb3NpdGlvbi5sZWZ0KSArCiAgICAgICAgICAgIE1hdGgubWluKDAsIGZpdFJlY3QucmlnaHQgLSAocG9zaXRpb24ubGVmdCArIHNpemUud2lkdGgpKTsKICAgICAgICByZXR1cm4gTWF0aC5hYnModmVydGljYWxDcm9wKSAqIHNpemUud2lkdGggKwogICAgICAgICAgICBNYXRoLmFicyhob3Jpem9udGFsQ3JvcCkgKiBzaXplLmhlaWdodDsKICAgICAgfSwKCgogICAgICBfX2dldFBvc2l0aW9uOiBmdW5jdGlvbigKICAgICAgICAgIGhBbGlnbiwgdkFsaWduLCBzaXplLCBzaXplTm9NYXJnaW5zLCBwb3NpdGlvblJlY3QsIGZpdFJlY3QpIHsKICAgICAgICAvLyBBbGwgdGhlIHBvc3NpYmxlIGNvbmZpZ3VyYXRpb25zLgogICAgICAgIC8vIE9yZGVyZWQgYXMgdG9wLWxlZnQsIHRvcC1yaWdodCwgYm90dG9tLWxlZnQsIGJvdHRvbS1yaWdodC4KICAgICAgICB2YXIgcG9zaXRpb25zID0gWwogICAgICAgICAgewogICAgICAgICAgICB2ZXJ0aWNhbEFsaWduOiAndG9wJywKICAgICAgICAgICAgaG9yaXpvbnRhbEFsaWduOiAnbGVmdCcsCiAgICAgICAgICAgIHRvcDogcG9zaXRpb25SZWN0LnRvcCArIHRoaXMudmVydGljYWxPZmZzZXQsCiAgICAgICAgICAgIGxlZnQ6IHBvc2l0aW9uUmVjdC5sZWZ0ICsgdGhpcy5ob3Jpem9udGFsT2Zmc2V0CiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICB2ZXJ0aWNhbEFsaWduOiAndG9wJywKICAgICAgICAgICAgaG9yaXpvbnRhbEFsaWduOiAncmlnaHQnLAogICAgICAgICAgICB0b3A6IHBvc2l0aW9uUmVjdC50b3AgKyB0aGlzLnZlcnRpY2FsT2Zmc2V0LAogICAgICAgICAgICBsZWZ0OiBwb3NpdGlvblJlY3QucmlnaHQgLSBzaXplLndpZHRoIC0gdGhpcy5ob3Jpem9udGFsT2Zmc2V0CiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICB2ZXJ0aWNhbEFsaWduOiAnYm90dG9tJywKICAgICAgICAgICAgaG9yaXpvbnRhbEFsaWduOiAnbGVmdCcsCiAgICAgICAgICAgIHRvcDogcG9zaXRpb25SZWN0LmJvdHRvbSAtIHNpemUuaGVpZ2h0IC0gdGhpcy52ZXJ0aWNhbE9mZnNldCwKICAgICAgICAgICAgbGVmdDogcG9zaXRpb25SZWN0LmxlZnQgKyB0aGlzLmhvcml6b250YWxPZmZzZXQKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgIHZlcnRpY2FsQWxpZ246ICdib3R0b20nLAogICAgICAgICAgICBob3Jpem9udGFsQWxpZ246ICdyaWdodCcsCiAgICAgICAgICAgIHRvcDogcG9zaXRpb25SZWN0LmJvdHRvbSAtIHNpemUuaGVpZ2h0IC0gdGhpcy52ZXJ0aWNhbE9mZnNldCwKICAgICAgICAgICAgbGVmdDogcG9zaXRpb25SZWN0LnJpZ2h0IC0gc2l6ZS53aWR0aCAtIHRoaXMuaG9yaXpvbnRhbE9mZnNldAogICAgICAgICAgfQogICAgICAgIF07CgogICAgICAgIGlmICh0aGlzLm5vT3ZlcmxhcCkgewogICAgICAgICAgLy8gRHVwbGljYXRlLgogICAgICAgICAgZm9yICh2YXIgaSA9IDAsIGwgPSBwb3NpdGlvbnMubGVuZ3RoOyBpIDwgbDsgaSsrKSB7CiAgICAgICAgICAgIHZhciBjb3B5ID0ge307CiAgICAgICAgICAgIGZvciAodmFyIGtleSBpbiBwb3NpdGlvbnNbaV0pIHsKICAgICAgICAgICAgICBjb3B5W2tleV0gPSBwb3NpdGlvbnNbaV1ba2V5XTsKICAgICAgICAgICAgfQogICAgICAgICAgICBwb3NpdGlvbnMucHVzaChjb3B5KTsKICAgICAgICAgIH0KICAgICAgICAgIC8vIEhvcml6b250YWwgb3ZlcmxhcCBvbmx5LgogICAgICAgICAgcG9zaXRpb25zWzBdLnRvcCA9IHBvc2l0aW9uc1sxXS50b3AgKz0gcG9zaXRpb25SZWN0LmhlaWdodDsKICAgICAgICAgIHBvc2l0aW9uc1syXS50b3AgPSBwb3NpdGlvbnNbM10udG9wIC09IHBvc2l0aW9uUmVjdC5oZWlnaHQ7CiAgICAgICAgICAvLyBWZXJ0aWNhbCBvdmVybGFwIG9ubHkuCiAgICAgICAgICBwb3NpdGlvbnNbNF0ubGVmdCA9IHBvc2l0aW9uc1s2XS5sZWZ0ICs9IHBvc2l0aW9uUmVjdC53aWR0aDsKICAgICAgICAgIHBvc2l0aW9uc1s1XS5sZWZ0ID0gcG9zaXRpb25zWzddLmxlZnQgLT0gcG9zaXRpb25SZWN0LndpZHRoOwogICAgICAgIH0KCiAgICAgICAgLy8gQ29uc2lkZXIgYXV0byBhcyBudWxsIGZvciBjb2RpbmcgY29udmVuaWVuY2UuCiAgICAgICAgdkFsaWduID0gdkFsaWduID09PSAnYXV0bycgPyBudWxsIDogdkFsaWduOwogICAgICAgIGhBbGlnbiA9IGhBbGlnbiA9PT0gJ2F1dG8nID8gbnVsbCA6IGhBbGlnbjsKCiAgICAgICAgaWYgKCFoQWxpZ24gfHwgaEFsaWduID09PSAnY2VudGVyJykgewogICAgICAgICAgcG9zaXRpb25zLnB1c2goewogICAgICAgICAgICB2ZXJ0aWNhbEFsaWduOiAndG9wJywKICAgICAgICAgICAgaG9yaXpvbnRhbEFsaWduOiAnY2VudGVyJywKICAgICAgICAgICAgdG9wOiBwb3NpdGlvblJlY3QudG9wICsgdGhpcy52ZXJ0aWNhbE9mZnNldCArCiAgICAgICAgICAgICAgICAodGhpcy5ub092ZXJsYXAgPyBwb3NpdGlvblJlY3QuaGVpZ2h0IDogMCksCiAgICAgICAgICAgIGxlZnQ6IHBvc2l0aW9uUmVjdC5sZWZ0IC0gc2l6ZU5vTWFyZ2lucy53aWR0aCAvIDIgKwogICAgICAgICAgICAgICAgcG9zaXRpb25SZWN0LndpZHRoIC8gMiArIHRoaXMuaG9yaXpvbnRhbE9mZnNldAogICAgICAgICAgfSk7CiAgICAgICAgICBwb3NpdGlvbnMucHVzaCh7CiAgICAgICAgICAgIHZlcnRpY2FsQWxpZ246ICdib3R0b20nLAogICAgICAgICAgICBob3Jpem9udGFsQWxpZ246ICdjZW50ZXInLAogICAgICAgICAgICB0b3A6IHBvc2l0aW9uUmVjdC5ib3R0b20gLSBzaXplLmhlaWdodCAtIHRoaXMudmVydGljYWxPZmZzZXQgLQogICAgICAgICAgICAgICAgKHRoaXMubm9PdmVybGFwID8gcG9zaXRpb25SZWN0LmhlaWdodCA6IDApLAogICAgICAgICAgICBsZWZ0OiBwb3NpdGlvblJlY3QubGVmdCAtIHNpemVOb01hcmdpbnMud2lkdGggLyAyICsKICAgICAgICAgICAgICAgIHBvc2l0aW9uUmVjdC53aWR0aCAvIDIgKyB0aGlzLmhvcml6b250YWxPZmZzZXQKICAgICAgICAgIH0pOwogICAgICAgIH0KCiAgICAgICAgaWYgKCF2QWxpZ24gfHwgdkFsaWduID09PSAnbWlkZGxlJykgewogICAgICAgICAgcG9zaXRpb25zLnB1c2goewogICAgICAgICAgICB2ZXJ0aWNhbEFsaWduOiAnbWlkZGxlJywKICAgICAgICAgICAgaG9yaXpvbnRhbEFsaWduOiAnbGVmdCcsCiAgICAgICAgICAgIHRvcDogcG9zaXRpb25SZWN0LnRvcCAtIHNpemVOb01hcmdpbnMuaGVpZ2h0IC8gMiArCiAgICAgICAgICAgICAgICBwb3NpdGlvblJlY3QuaGVpZ2h0IC8gMiArIHRoaXMudmVydGljYWxPZmZzZXQsCiAgICAgICAgICAgIGxlZnQ6IHBvc2l0aW9uUmVjdC5sZWZ0ICsgdGhpcy5ob3Jpem9udGFsT2Zmc2V0ICsKICAgICAgICAgICAgICAgICh0aGlzLm5vT3ZlcmxhcCA/IHBvc2l0aW9uUmVjdC53aWR0aCA6IDApCiAgICAgICAgICB9KTsKICAgICAgICAgIHBvc2l0aW9ucy5wdXNoKHsKICAgICAgICAgICAgdmVydGljYWxBbGlnbjogJ21pZGRsZScsCiAgICAgICAgICAgIGhvcml6b250YWxBbGlnbjogJ3JpZ2h0JywKICAgICAgICAgICAgdG9wOiBwb3NpdGlvblJlY3QudG9wIC0gc2l6ZU5vTWFyZ2lucy5oZWlnaHQgLyAyICsKICAgICAgICAgICAgICAgIHBvc2l0aW9uUmVjdC5oZWlnaHQgLyAyICsgdGhpcy52ZXJ0aWNhbE9mZnNldCwKICAgICAgICAgICAgbGVmdDogcG9zaXRpb25SZWN0LnJpZ2h0IC0gc2l6ZS53aWR0aCAtIHRoaXMuaG9yaXpvbnRhbE9mZnNldCAtCiAgICAgICAgICAgICAgICAodGhpcy5ub092ZXJsYXAgPyBwb3NpdGlvblJlY3Qud2lkdGggOiAwKQogICAgICAgICAgfSk7CiAgICAgICAgfQoKICAgICAgICBpZiAodkFsaWduID09PSAnbWlkZGxlJyAmJiBoQWxpZ24gPT09ICdjZW50ZXInKSB7CiAgICAgICAgICBwb3NpdGlvbnMucHVzaCh7CiAgICAgICAgICAgIHZlcnRpY2FsQWxpZ246ICdtaWRkbGUnLAogICAgICAgICAgICBob3Jpem9udGFsQWxpZ246ICdjZW50ZXInLAogICAgICAgICAgICB0b3A6IHBvc2l0aW9uUmVjdC50b3AgLSBzaXplTm9NYXJnaW5zLmhlaWdodCAvIDIgKwogICAgICAgICAgICAgICAgcG9zaXRpb25SZWN0LmhlaWdodCAvIDIgKyB0aGlzLnZlcnRpY2FsT2Zmc2V0LAogICAgICAgICAgICBsZWZ0OiBwb3NpdGlvblJlY3QubGVmdCAtIHNpemVOb01hcmdpbnMud2lkdGggLyAyICsKICAgICAgICAgICAgICAgIHBvc2l0aW9uUmVjdC53aWR0aCAvIDIgKyB0aGlzLmhvcml6b250YWxPZmZzZXQKICAgICAgICAgIH0pOwogICAgICAgIH0KCiAgICAgICAgdmFyIHBvc2l0aW9uOwogICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgcG9zaXRpb25zLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICB2YXIgY2FuZGlkYXRlID0gcG9zaXRpb25zW2ldOwogICAgICAgICAgdmFyIHZBbGlnbk9rID0gY2FuZGlkYXRlLnZlcnRpY2FsQWxpZ24gPT09IHZBbGlnbjsKICAgICAgICAgIHZhciBoQWxpZ25PayA9IGNhbmRpZGF0ZS5ob3Jpem9udGFsQWxpZ24gPT09IGhBbGlnbjsKCiAgICAgICAgICAvLyBJZiBib3RoIHZBbGlnbiBhbmQgaEFsaWduIGFyZSB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yBgdGFiSW5kZXggPSAtMWAKICAgICAgICogQHBhcmFtIHshSFRNTEVsZW1lbnR9IGVsZW1lbnQKICAgICAgICogQHJldHVybiB7IW51bWJlcn0KICAgICAgICogQHByaXZhdGUKICAgICAgICovCiAgICAgIF9ub3JtYWxpemVkVGFiSW5kZXgoZWxlbWVudCkgewogICAgICAgIGlmICh0aGlzLmlzRm9jdXNhYmxlKGVsZW1lbnQpKSB7CiAgICAgICAgICB2YXIgdGFiSW5kZXggPSBlbGVtZW50LmdldEF0dHJpYnV0ZSgndGFiaW5kZXgnKSB8fCAwOwogICAgICAgICAgcmV0dXJuIE51bWJlcih0YWJJbmRleCk7CiAgICAgICAgfQogICAgICAgIHJldHVybiAtMTsKICAgICAgfQoKICAgICAgLyoqCiAgICAgICAqIFNlYXJjaGVzIGZvciBub2RlcyB0aGF0IGFyZSB0YWJiYWJsZSBhbmQgYWRkcyB0aGVtIHRvIHRoZSBgcmVzdWx0YCBhcnJheS4KICAgICAgICogUmV0dXJucyBpZiB0aGUgYHJlc3VsdGAgYXJyYXkgbmVlZHMgdG8gYmUgc29ydGVkIGJ5IHRhYmluZGV4LgogICAgICAgKiBAcGFyYW0geyFOb2RlfSBub2RlIFRoZSBzdGFydGluZyBwb2ludCBmb3IgdGhlIHNlYXJjaDsgYWRkZWQgdG8gYHJlc3VsdGAKICAgICAgICogaWYgdGFiYmFibGUuCiAgICAgICAqIEBwYXJhbSB7IUFycmF5PCFIVE1MRWxlbWVudD59IHJlc3VsdAogICAgICAgKiBAcmV0dXJuIHtib29sZWFufQogICAgICAgKiBAcHJpdmF0ZQogICAgICAgKi8KICAgICAgX2NvbGxlY3RUYWJiYWJsZU5vZGVzKG5vZGUsIHJlc3VsdCkgewogICAgICAgIC8vIElmIG5vdCBhbiBlbGVtZW50IG9yIG5vdCB2aXNpYmxlLCBubyBuZWVkIHRvIGV4cGxvcmUgY2hpbGRyZW4uCiAgICAgICAgaWYgKG5vZGUubm9kZVR5cGUgIT09IE5vZGUuRUxFTUVOVF9OT0RFKSB7CiAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgfQogICAgICAgIHZhciBlbGVtZW50ID0gLyoqIEB0eXBlIHshSFRNTEVsZW1lbnR9ICovIChub2RlKTsKICAgICAgICBpZiAoIXRoaXMuX2lzVmlzaWJsZShlbGVtZW50KSkgewogICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgIH0KICAgICAgICB2YXIgdGFiSW5kZXggPSB0aGlzLl9ub3JtYWxpemVkVGFiSW5kZXgoZWxlbWVudCk7CiAgICAgICAgdmFyIG5lZWRzU29ydCA9IHRhYkluZGV4ID4gMDsKICAgICAgICBpZiAodGFiSW5kZXggPj0gMCkgewogICAgICAgICAgcmVzdWx0LnB1c2goZWxlbWVudCk7CiAgICAgICAgfQogICAgICAgIC8vIEluIFNoYWRvd0RPTSB2MSwgdGFiIG9yZGVyIGlzIGFmZmVjdGVkIGJ5IHRoZSBvcmRlciBvZiBkaXN0cnVidXRpb24uCiAgICAgICAgLy8gRS5nLiBnZXRUYWJiYWJsZU5vZGVzKCNyb290KSBpbiBTaGFkb3dET00gdjEgc2hvdWxkIHJldHVybiBbI0EsICNCXTsKICAgICAgICAvLyBpbiBTaGFkb3dET00gdjAgdGFiIG9yZGVyIGlzIG5vdCBhZmZlY3RlZCBieSB0aGUgZGlzdHJ1YnV0aW9uIG9yZGVyLAogICAgICAgIC8vIGluIGZhY3QgZ2V0VGFiYmFibGVOb2Rlcygjcm9vdCkgcmV0dXJucyBbI0IsICNBXS4KICAgICAgICAvLyAgPGRpdiBpZD0icm9vdCI+CiAgICAgICAgLy8gICA8IS0tIHNoYWRvdyAtLT4KICAgICAgICAvLyAgICAgPHNsb3QgbmFtZT0iYSI+CiAgICAgICAgLy8gICAgIDxzbG90IG5hbWU9ImIiPgogICAgICAgIC8vICAgPCEtLSAvc2hhZG93IC0tPgogICAgICAgIC8vICAgPGlucHV0IGlkPSJBIiBzbG90PSJhIj4KICAgICAgICAvLyA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bnR9IGVsZW1lbnQKICAgICAgICogQHJldHVybiB7Ym9vbGVhbn0KICAgICAgICogQHByaXZhdGUKICAgICAgICovCiAgICAgIF9pc1Zpc2libGUoZWxlbWVudCkgewogICAgICAgIC8vIENoZWNrIGlubGluZSBzdHlsZSBmaXJzdCB0byBzYXZlIGEgcmUtZmxvdy4gSWYgbG9va3MgZ29vZCwgY2hlY2sgYWxzbwogICAgICAgIC8vIGNvbXB1dGVkIHN0eWxlLgogICAgICAgIHZhciBzdHlsZSA9IGVsZW1lbnQuc3R5bGU7CiAgICAgICAgaWYgKHN0eWxlLnZpc2liaWxpdHkgIT09ICdoaWRkZW4nICYmIHN0eWxlLmRpc3BsYXkgIT09ICdub25lJykgewogICAgICAgICAgc3R5bGUgPSB3aW5kb3cuZ2V0Q29tcHV0ZWRTdHlsZShlbGVtZW50KTsKICAgICAgICAgIHJldHVybiAoc3R5bGUudmlzaWJpbGl0eSAhPT0gJ2hpZGRlbicgJiYgc3R5bGUuZGlzcGxheSAhPT0gJ25vbmUnKTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICB9CgogICAgICAvKioKICAgICAgICogU29ydHMgYW4gYXJyYXkgb2YgdGFiYmFibGUgZWxlbWVudHMgYnkgdGFiaW5kZXguIFJldHVybnMgYSBuZXcgYXJyYXkuCiAgICAgICAqIEBwYXJhbSB7IUFycmF5PCFIVE1MRWxlbWVudD59IHRhYmJhYmxlcwogICAgICAgKiBAcmV0dXJuIHshQXJyYXk8IUhUTUxFbGVtZW50Pn0KICAgICAgICogQHByaXZhdGUKICAgICAgICovCiAgICAgIF9zb3J0QnlUYWJJbmRleCh0YWJiYWJsZXMpIHsKICAgICAgICAvLyBJbXBsZW1lbnQgYSBtZXJnZSBzb3J0IGFzIEFycmF5LnByb3RvdHlwZS5zb3J0IGRvZXMgYSBub24tc3RhYmxlIHNvcnQKICAgICAgICAvLyBodHRwczovL2RldmVsb3Blci5tb3ppbGxhLm9yZy9lbi1VUy9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ICByZXN1bHQucHVzaChyaWdodC5zaGlmdCgpKTsKICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIHJlc3VsdC5wdXNoKGxlZnQuc2hpZnQoKSk7CiAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICByZXR1cm4gcmVzdWx0LmNvbmNhdChsZWZ0LCByaWdodCk7CiAgICAgIH0KCiAgICAgIC8qKgogICAgICAgKiBSZXR1cm5zIGlmIGVsZW1lbnQgYGFgIGhhcyBsb3dlciB0YWIgb3JkZXIgY29tcGFyZWQgdG8gZWxlbWVudCBgYmAKICAgICAgICogKGJvdGggZWxlbWVudHMgYXJlIGFzc3VtZWQgdG8gYmUgZm9jdXNhYmxlIGFuZCB0YWJiYWJsZSkuCiAgICAgICAqIEVsZW1lbnRzIHdpdGggdGFiaW5kZXggPSAwIGhhdmUgbG93ZXIgdGFiIG9yZGVyIGNvbXBhcmVkIHRvIGVsZW1lbnRzCiAgICAgICAqIHdpdGggdGFiaW5kZXggPiAwLgogICAgICAgKiBJZiBib3RoIGhhdmUgc2FtZSB0YWJpbmRleCwgaXQgcmV0dXJucyBmYWxzZS4KICAgICAgICogQHBhcmFtIHshSFRNTEVsZW1lbnR9IGEKICAgICAgICogQHBhcmFtIHshSFRNTEVsZW1lbnR9IGIKICAgICAgICogQHJldHVybiB7Ym9vbGVhbn0KICAgICAgICogQHByaXZhdGUKICAgICAgICovCiAgICAgIF9oYXNMb3dlclRhYk9yZGVyKGEsIGIpIHsKICAgICAgICAvLyBOb3JtYWxpemUgdGFiSW5kZXhlcwogICAgICAgIC8vIGUuZy4gaW4gRmlyZWZveCBgPGRpdiBjb250ZW50ZWRpdGFibGU+YCBoYXMgYHRhYkluZGV4ID0gLTFgCiAgICAgICAgdmFyIGF0aSA9IE1hdGgubWF4KGEudGFiSW5kZXgsIDApOwogICAgICAgIHZhciBidGkgPSBNYXRoLm1heChiLnRhYkluZGV4LCAwKTsKICAgICAgICByZXR1cm4gKGF0aSA9PT0gMCB8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W5lZCBjaGFuZ2VzLgogICAgICAgIHRoaXMuX19vcGVuZWRSYWYgPSBudWxsOwogICAgICB9LAoKICAgICAgLyoqIEBvdmVycmlkZSAqLwogICAgICBhdHRhY2hlZDogZnVuY3Rpb24oKSB7CiAgICAgICAgdGhpcy5vcGVuZWQgJiYgdGhpcy5fb3BlbmVkQ2hhbmdlZCh0aGlzLm9wZW5lZCk7CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogQXBwZW5kcyB0aGUgYmFja2Ryb3AgdG8gZG9jdW1lbnQgYm9keSBpZiBuZWVkZWQuCiAgICAgICAqLwogICAgICBwcmVwYXJlOiBmdW5jdGlvbigpIHsKICAgICAgICBpZiAodGhpcy5vcGVuZWQgJiYgIXRoaXMucGFyZW50Tm9kZSkgewogICAgICAgICAgZG9tKGRvY3VtZW50LmJvZHkpLmFwcGVuZENoaWxkKHRoaXMpOwogICAgICAgIH0KICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgKiBTaG93cyB0aGUgYmFja2Ryb3AuCiAgICAgICAqLwogICAgICBvcGVuOiBmdW5jdGlvbigpIHsKICAgICAgICB0aGlzLm9wZW5lZCA9IHRydWU7CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogSGlkZXMgdGhlIGJhY2tkcm9wLgogICAgICAgKi8KICAgICAgY2xvc2U6IGZ1bmN0aW9uKCkgewogICAgICAgIHRoaXMub3BlbmVkID0gZmFsc2U7CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogUmVtb3ZlcyB0aGUgYmFja2Ryb3AgZnJvbSBkb2N1bWVudCBib2R5IGlmIG5lZWRlZC4KICAgICAgICovCiAgICAgIGNvbXBsZXRlOiBmdW5jdGlvbigpIHsKICAgICAgICBpZiAoIXRoaXMub3BlbmVkICYmIHRoaXMucGFyZW50Tm9kZSA9PT0gZG9jdW1lbnQuYm9keSkgewogICAgICAgICAgZG9tKHRoaXMucGFyZW50Tm9kZSkucmVtb3ZlQ2hpbGQodGhpcyk7CiAgICAgICAgfQogICAgICB9LAoKICAgICAgX29uVHJhbnNpdGlvbmVuZDogZnVuY3Rpb24oZXZlbnQpIHsKICAgICAgICBpZiAoZXZlbnQgJiYgZXZlbnQudGFyZ2V0ID09PSB0aGlzKSB7CiAgICAgICAgICB0aGlzLmNvbXBsZXRlKCk7CiAgICAgICAgfQogICAgICB9LAoKICAgICAgLyoqCiAgICAgICAqIEBwYXJhbSB7Ym9vbGVhbn0gb3BlbmVkCiAgICAgICAqIEBwcml2YXRlCiAgICAgICAqLwogICAgICBfb3BlbmVkQ2hhbmdlZDogZnVuY3Rpb24ob3BlbmVkKSB7CiAgICAgICAgaWYgKG9wZW5lZCkgewogICAgICAgICAgLy8gQXV0by1hdHRhY2guCiAgICAgICAgICB0aGlzLnByZXBhcmUoKTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgLy8gQW5pbWF0aW9uIG1pZ2h0IGJlIGRpc2FibGVkIHZpYSB0aGUgbWl4aW4gb3Igb3BhY2l0eSBjdXN0b20gcHJvcGVydHkuCiAgICAgICAgICAvLyBJZiBpdCBpcyBkaXNhYmxlZCBpbiBvdGhlciB3YXlzLCBpdCdzIHVwIHRvIHRoZSB1c2VyIHRvIGNhbGwgY29tcGxldGUuCiAgICAgICAgICB2YXIgY3MgPSB3aW5kb3cuZ2V0Q29tcHV0ZWRTdHlsZSh0aGlzKTsKICAgICAgICAgIGlmIChjcy50cmFuc2l0aW9uRHVyYXRpb24gPT09ICcwcycgfHwgY3Mub3BhY2l0eSA9PSAwKSB7CiAgICAgICAgICAgIHRoaXMuY29tcGxldGUoKTsKICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIGlmICghdGhpcy5pc0F0dGFjaGVkKSB7CiAgICAgICAgICByZXR1cm47CiAgICAgICAgfQoKICAgICAgICAvLyBBbHdheXMgY2FuY2VsIHByZXZpb3VzIHJlcXVlc3RBbmltYXRpb25GcmFtZS4KICAgICAgICBpZiAodGhpcy5fX29wZW5lZFJhZikgewogICAgICAgICAgd2lu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0IGlzIGFsc28gc3ViamVjdCB0byBhbiBhZGRpdGlvbmFsIElQIHJpZ2h0cyBncmFudAogICAgZm91bmQgYXQgaHR0cDovL3BvbHltZXIuZ2l0aHViLmlvL1BBVEVOVFMudHh0CiAgICAqLwoKICAgIC8qKgogICAgICogQHBhY2thZ2UKICAgICAqLwogICAgY2xhc3MgSXJvbk92ZXJsYXlNYW5hZ2VyQ2xhc3MgewogICAgICBjb25zdHJ1Y3RvcigpIHsKICAgICAgICAvKioKICAgICAgICAgKiBVc2VkIHRvIGtlZXAgdHJhY2sgb2YgdGhlIG9wZW5lZCBvdmVybGF5cy4KICAgICAgICAgKiBAcHJpdmF0ZSB7IUFycmF5PCFFbGVtZW50Pn0KICAgICAgICAgKi8KICAgICAgICB0aGlzLl9vdmVybGF5cyA9IFtdOwoKICAgICAgICAvKioKICAgICAgICAgKiBpZnJhbWVzIGhhdmUgYSBkZWZhdWx0IHotaW5kZXggb2YgMTAwLAogICAgICAgICAqIHNvIHRoaXMgZGVmYXVsdCBzaG91bGQgYmUgYXQgbGVhc3QgdGhhdC4KICAgICAgICAgKiBAcHJpdmF0ZSB7bnVtYmVyfQogICAgICAgICAqLwogICAgICAgIHRoaXMuX21pbmltdW1aID0gMTAxOwoKICAgICAgICAvKioKICAgICAgICAgKiBNZW1vaXplZCBiYWNrZHJvcCBlbGVtZW50LgogICAgICAgICAqIEBwcml2YXRlIHtFbGVtZW50fG51bGx9CiAgICAgICAgICovCiAgICAgICAgdGhpcy5fYmFja2Ryb3BFbGVtZW50ID0gbnVsbDsKCiAgICAgICAgLy8gRW5hYmxlIGRvY3VtZW50LXdpZGUgdGFwIHJlY29nbml6ZXIuCiAgICAgICAgLy8gTk9URTogVXNlIHVzZUNhcHR1cmU9dHJ1ZSB0byBhdm9pZCBhY2NpZGVudGFsbHkgcHJldmVudGlvbiBvZiB0aGUgY2xvc2luZwogICAgICAgIC8vIG9mIGFuIG92ZXJsYXkgdmlhIGV2ZW50LnN0b3BQcm9wYWd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4gYWN0aXZlOwogICAgICB9CgogICAgICAvKioKICAgICAgICogQnJpbmdzIHRoZSBvdmVybGF5IGF0IHRoZSBzcGVjaWZpZWQgaW5kZXggdG8gdGhlIGZyb250LgogICAgICAgKiBAcGFyYW0ge251bWJlcn0gaQogICAgICAgKiBAcHJpdmF0ZQogICAgICAgKi8KICAgICAgX2JyaW5nT3ZlcmxheUF0SW5kZXhUb0Zyb250KGkpIHsKICAgICAgICB2YXIgb3ZlcmxheSA9IHRoaXMuX292ZXJsYXlzW2ldOwogICAgICAgIGlmICghb3ZlcmxheSkgewogICAgICAgICAgcmV0dXJuOwogICAgICAgIH0KICAgICAgICB2YXIgbGFzdEkgPSB0aGlzLl9vdmVybGF5cy5sZW5ndGggLSAxOwogICAgICAgIHZhciBjdXJyZW50T3ZlcmxheSA9IHRoaXMuX292ZXJsYXlzW2xhc3RJXTsKICAgICAgICAvLyBFbnN1cmUgYWx3YXlzLW9uLXRvcCBvdmVybGF5IHN0YXlzIG9uIHRvcC4KICAgICAgICBpZiAoY3VycmVudE92ZXJsYXkgJiYKICAgICAgICAgICAgdGhpcy5fc2hvdWxkQmVCZWhpbmRPdmVybGF5KG92ZXJsYXksIGN1cnJlbnRPdmVybGF5KSkgewogICAgICAgICAgbGFzdEktLTsKICAgICAgICB9CiAgICAgICAgLy8gSWYgYWxyZWFkeSB0aGUgdG9wIGVsZW1lbnQsIHJldHVybi4KICAgICAgICBpZiAoaSA+PSBsYXN0SSkgewogICAgICAgICAgcmV0dXJuOwogICAgICAgIH0KICAgICAgICAvLyBVcGRhdGUgei1pbmRleCB0byBiZSBvbiB0b3AuCiAgICAgICAgdmFyIG1pbmltdW1aID0gTWF0aC5tYXgodGhpcy5jdXJyZW50T3ZlcmxheVooKSwgdGhpcy5fbWluaW11bVopOwogICAgICAgIGlmICh0aGlzLl9nZXRaKG92ZXJsYXkpIDw9IG1pbmltdW1aKSB7CiAgICAgICAgICB0aGlzLl9hcHBseU92ZXJsYXlaKG92ZXJsYXksIG1pbmltdW1aKTsKICAgICAgICB9CgogICAgICAgIC8vIFNoaWZ0IG90aGVyIG92ZXJsYXlzIGJlaGluZCB0aGUgbmV3IG9uIHRvcC4KICAgICAgICB3aGlsZSAoaSA8IGxhc3RJKSB7CiAgICAgICAgICB0aGlzLl9vdmVybGF5c1tpXSA9IHRoaXMuX292ZXJsYXlzW2kgKyAxXTsKICAgICAgICAgIGkrKzsKICAgICAgICB9CiAgICAgICAgdGhpcy5fb3ZlcmxheXNbbGFzdEldID0gb3ZlcmxheTsKICAgICAgfQoKICAgICAgLyoqCiAgICAgICAqIEFkZHMgdGhlIG92ZXJsYXkgYW5kIHVwZGF0ZXMgaXRzIHotaW5kZXggaWYgaXQncyBvcGVuZWQsIG9yIHJlbW92ZXMgaXQgaWYKICAgICAgICogaXQncyBjbG9zZWQuIEFsc28gdXBkYXRlcyB0aGUgYmFja2Ryb3Agei1pbmRleC4KICAgICAgICogQHBhcmFtIHshRWxlbWVudH0gb3ZlcmxheQogICAgICAgKi8KICAgICAgYWRkT3JSZW1vdmVPdmVybGF5KG92ZXJsYXkpIHsKICAgICAgICBpZiAob3ZlcmxheS5vcGVuZWQpIHsKICAgICAgICAgIHRoaXMuYWRkT3ZlcmxheShvdmVybGF5KTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgdGhpcy5yZW1vdmVPdmVybGF5KG92ZXJsYXkpOwogICAgICAgIH0KICAgICAgfQoKICAgICAgLyoqCiAgICAgICAqIFRyYWNrcyBvdmVybGF5cyBmb3Igei1pbmRleCBhbmQgZm9jdXMgbWFuYWdlbWVudC4KICAgICAgICogRW5zdXJlcyB0aGUgbGFzdCBhZGRlZCBvdmVybGF5IHdpdGggYWx3YXlzLW9uLXRvcCByZW1haW5zIG9uIHRvcC4KICAgICAgICogQHBhcmFtIHshRWxlbWVudH0gb3ZlcmxheQogICAgICAgKi8KICAgICAgYWRkT3ZlcmxheShvdmVybGF5KSB7CiAgICAgICAgdmFyIGkgPSB0aGlzLl9vdmVybGF5cy5pbmRleE9mKG92ZXJsYXkpOwogICAgICAgIGlmIChpID49IDApIHsKICAgICAgICAgIHRoaXMuX2JyaW5nT3ZlcmxheUF0SW5kZXhUb0Zyb250KGkpOwogICAgICAgICAgdGhpcy50cmFja0JhY2tkcm9wKCk7CiAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIHZhciBpbnNlcnRpb25JbmRleCA9IHRoaXMuX292ZXJsYXlzLmxlbmd0aDsKICAgICAgICB2YXIgY3VycmVudE92ZXJsYXkgPSB0aGlzLl9vdmVybGF5c1tpbnNlcnRpb25JbmRleCAtIDFdOwogICAgICAgIHZhciBtaW5pbXVtWiA9IE1hdGgubWF4KHRoaXMuX2dldFooY3VycmVudE92ZXJsYXkpLCB0aGlzLl9taW5pbXVtWik7CiAgICAgICAgdmFyIG5ld1ogPSB0aGlzLl9nZXRaKG92ZXJsYXkpOwoKICAgICAgICAvLyBFbnN1cmUgYWx3YXlzLW9uLXRvcCBvdmVybGF5IHN0YXlzIG9uIHRvcC4KICAgICAgICBpZiAoY3VycmVudE92ZXJsYXkgJiYKICAgICAgICAgICAgdGhpcy5fc2hvdWxkQmVCZWhpbmRPdmVybGF5KG92ZXJsYXksIGN1cnJlbnRPdmVybGF5KSkgewogICAgICAgICAgLy8gVGhpcyBidW1wcyB0aGUgei1pbmRleCBvZiArMi4KICAgICAgICAgIHRoaXMuX2FwcGx5T3ZlcmxheVooY3VycmVudE92ZXJsYXksIG1pbmltdW1aKTsKICAgICAgICAgIGluc2VydGlvbkluZGV4LS07CiAgICAgICAgICAvLyBVcGRhdGUgbWluaW11bVogdG8gbWF0Y2ggcHJldmlvdXMgb3ZlcmxheSdzIHotaW5kZXguCiAgICAgICAgICB2YXIgcHJldmlvdXNPdmVybGF5ID0gdGhpcy5fb3ZlcmxheXNbaW5zZXJ0aW9uSW5kZXggLSAxXTsKICAgICAgICAgIG1pbmltdW1aID0gTWF0aC5tYXgodGhpcy5fZ2V0WihwcmV2aW91c092ZXJsYXkpLCB0aGlzLl9taW5pbXVtWik7CiAgICAgICAgfQoKICAgICAgICAvLyBVcGRhdGUgei1pbmRleCBhbmQgaW5zZXJ0IG92ZXJsYXkuCiAgICAgICAgaWYgKG5ld1ogPD0gbWluaW11bVopIHsKICAgICAgICAgIHRoaXMuX2FwcGx5T3ZlcmxheVoob3ZlcmxheSwgbWluaW11bVopOwogICAgICAgIH0KICAgICAgICB0aGlzLl9vdmVybGF5cy5zcGxpY2UoaW5zZXJ0aW9uSW5kZXgsIDAsIG92ZXJsYXkpOwoKICAgICAgICB0aGlzLnRyYWNrQmFja2Ryb3AoKTsKICAgICAgfQoKICAgICAgLyoqCiAgICAgICAqIEBwYXJhbSB7IUVsZW1lbnR9IG92ZXJsYXkKICAgICAgICovCiAgICAgIHJlbW92ZU92ZXJsYXkob3ZlcmxheSkgewogICAgICAgIHZhciBpID0gdGhpcy5fb3ZlcmxheXMuaW5kZXhPZihvdmVybGF5KTsKICAgICAgICBpZiAoaSA9PT0gLTEpIHsKICAgICAgICAgIHJldHVybjsKICAgICAgICB9CiAgICAgICAgdGhpcy5fb3ZlcmxheXMuc3BsaWNlKGksIDEpOwoKICAgICAgICB0aGlzLnRyYWNrQmFja2Ryb3AoKTsKICAgICAgfQoKICAgICAgLyoqCiAgICAgICAqIFJldHVybnMgdGhlIGN1cnJlbnQgb3ZlcmxheS4KICAgICAgICogQHJldHVybiB7IUVsZW1lbnR8dW5kZWZpbmVkfQogICAgICAgKi8KICAgICAgY3VycmVudE92ZXJsYXkoKSB7CiAgICAgICAgdmFyIGkgPSB0aGlzLl9vdmVybGF5cy5sZW5ndGggLSAxOwogICAgICAgIHJldHVybiB0aGlzLl9vdmVybGF5c1tpXTsKICAgICAgfQoKICAgICAgLyoqCiAgICAgICAqIFJldHVybnMgdGhlIGN1cnJlbnQgb3ZlcmxheSB6LWluZGV4LgogICAgICAgKiBAcmV0dXJuIHtudW1iZXJ9CiAgICAgICAqLwogICAgICBjdXJyZW50T3ZlcmxheV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ryb3BFbGVtZW50LnN0eWxlLnpJbmRleCA9IHRoaXMuX2dldFoob3ZlcmxheSkgLSAxOwogICAgICAgIHRoaXMuYmFja2Ryb3BFbGVtZW50Lm9wZW5lZCA9ICEhb3ZlcmxheTsKICAgICAgICAvLyBQcm9wZXJ0eSBvYnNlcnZlcnMgYXJlIG5vdCBmaXJlZCB1bnRpbCBlbGVtZW50IGlzIGF0dGFjaGVkCiAgICAgICAgLy8gaW4gUG9seW1lciAyLngsIHNvIHdlIGVuc3VyZSBlbGVtZW50IGlzIGF0dGFjaGVkIGlmIG5lZWRlZC4KICAgICAgICAvLyBodHRwczovL2dpdGh1Yi5jb20vUG9seW1lci9wb2x5bWVyL2lzc3Vlcy80NTI2CiAgICAgICAgdGhpcy5iYWNrZHJvcEVsZW1lbnQucHJlcGFyZSgpOwogICAgICB9CgogICAgICAvKioKICAgICAgICogQHJldHVybiB7IUFycmF5PCFFbGVtZW50Pn0KICAgICAgICovCiAgICAgIGdldEJhY2tkcm9wcygpIHsKICAgICAgICB2YXIgYmFja2Ryb3BzID0gW107CiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0aGlzLl9vdmVybGF5cy5sZW5ndGg7IGkrKykgewogICAgICAgICAgaWYgKHRoaXMuX292ZXJsYXlzW2ldLndpdGhCYWNrZHJvcCkgewogICAgICAgICAgICBiYWNrZHJvcHMucHVzaCh0aGlzLl9vdmVybGF5c1tpXSk7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiBiYWNrZHJvcHM7CiAgICAgIH0KCiAgICAgIC8qKgogICAgICAgKiBSZXR1cm5zIHRoZSB6LWluZGV4IGZvciB0aGUgYmFja2Ryb3AuCiAgICAgICAqIEByZXR1cm4ge251bWJlcn0KICAgICAgICovCiAgICAgIGJhY2tkcm9wWigpIHsKICAgICAgICByZXR1cm4gdGhpcy5fZ2V0Wih0aGlzLl9vdmVybGF5V2l0aEJhY2tkcm9wKCkpIC0gMTsKICAgICAgfQoKICAgICAgLyoqCiAgICAgICAqIFJldHVybnMgdGhlIHRvcCBvcGVuZWQgb3ZlcmxheSB0aGF0IGhhcyBhIGJhY2tkcm9wLgogICAgICAgKiBAcmV0dXJuIHshRWxlbWVudHx1bmRlZmluZWR9CiAgICAgICAqIEBwcml2YXRlCiAgICAgICAqLwogICAgICBfb3ZlcmxheVdpdGhCYWNrZHJvcCgpIHsKICAgICAgICBmb3IgKHZhciBpID0gdGhpcy5fb3ZlcmxheXMubGVuZ3RoIC0gMTsgaSA+PSAwOyBpLS0pIHsKICAgICAgICAgIGlmICh0aGlzLl9vdmVybGF5c1tpXS53aXRoQmFja2Ryb3ApIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX292ZXJsYXlzW2ldOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQoKICAgICAgLyoqCiAgICAgICAqIENhbGN1bGF0ZXMgdGhlIG1pbmltdW0gei1pbmRleCBmb3IgdGhlIG92ZXJsYXkuCiAgICAgICAqIEBwYXJhbSB7RWxlbWVudD19IG92ZXJsYXkKICAgICAgICogQHByaXZhdGUKICAgICAgICovCiAgICAgIF9nZXRaKG92ZXJsYXkpIHsKICAgICAgICB2YXIgeiA9IHRoaXMuX21pbmltdW1aOwogICAgICAgIGlmIChvdmVybGF5KSB7CiAgICAgICAgICB2YXIgejEgPSBOdW1iZXIoCiAgICAgICAgICAgICAgb3ZlcmxheS5zdHlsZS56SW5kZXggfHwgd2luZG93LmdldENvbXB1dGVkU3R5bGUob3ZlcmxheSkuekluZGV4KTsKICAgICAgICAgIC8vIENoZWNrIGlmIGlzIGEgbnVtYmVyCiAgICAgICAgICAvLyBOdW1iZXIuaXNOYU4gbm90IHN1cHBvcnRlZCBpbiBJRSAxMCsKICAgICAgICAgIGlmICh6MSA9PT0gejEpIHsKICAgICAgICAgICAgeiA9IHoxOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gejsKICAgICAgfQoKICAgICAgLyoqCiAgICAgICAqIEBwYXJhbSB7IUVsZW1lbnR9IGVsZW1lbnQKICAgICAgICogQHBhcmFtIHtudW1iZXJ8c3RyaW5nfSB6CiAgICAgICAqIEBwcml2YXRlCiAgICAgICAqLwogICAgICBfc2V0WihlbGVtZW50LCB6KSB7CiAgICAgICAgZWxlbWVudC5zdHlsZS56SW5kZXggPSB6OwogICAgICB9CgogICAgICAvKioKICAgICAgICogQHBhcmFtIHshRWxlbWVudH0gb3ZlcmxheQogICAgICAgKiBAcGFyYW0ge251bWJlcn0gYWJvdmVaCiAgICAgICAqIEBwcml2YXRlCiAgICAgICAqLwogICAgICBfYXBwbHlPdmVybGF5WihvdmVybGF5LCBhYm92ZVopIHsKICAgICAgICB0aGlzLl9zZXRaKG92ZXJsYXksIGFib3ZlWiArIDIpOwogICAgICB9CgogICAgICAvKioKICAgICAgICogUmV0dXJucyB0aGUgZGVlcGVzdCBvdmVybGF5IGluIHRoZSBwYXRoLgogICAgICAgKiBAcGFyYW0geyFBcnJheTwhRWxlbWVudD49fSBwYXRoCiAgICAgICAqIEByZXR1cm4geyFFbGVtZW50fHVuZGVmaW5lZH0KICAgICAgICogQHN1cHByZXNzIHttaXNzaW5nUHJvcGVydGllc30KICAgICAgICogQHByaXZhdGUKICAgICAgICovCiAgICAgIF9vdmVybGF5SW5QYXRoKHBhdGgpIHsKICAgICAgICBwYXRoID0gcGF0aCB8fCBbXTsKICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHBhdGgubGVuZ3RoOyBpKyspIHsKICAgICAgICAgIGlmIChwYXRoW2ldLl9tYW5hZ2VyID09PSB0aGlzKSB7CiAgICAgICAgICAgIHJldHVybiBwYXRoW2ldOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQoKICAgICAgLyoqCiAgICAgICAqIEVuc3VyZXMgdGhlIGNsaWNrIGV2ZW50IGlzIGRlbGVnYXRlZCB0byB0aGUgcmlnaHQgb3ZlcmxheS4KICAgICAgICogQHBhcmFtIHshRXZlbnR9IGV2ZW50CiAgICAgICAqIEBwcml2YXRlCiAgICAgICAqLwogICAgICBfb25DYXB0dXJlQ2xpY2soZXZlbnQpIHsKICAgICAgICB2YXIgaSA9IHRoaXMuX292ZXJsYXlzLmxlbmd0aCAtIDE7CiAgICAgICAgaWYgKGkgPT09IC0xKQogICAgICAgICAgcmV0dXJuOwogICAgICAgIHZhciBwYXRoID0gLyoqIEB0eXBlIHshQXJyYXk8IUV2ZW50VGFyZ2V0Pn0gKi8gKGRvbShldmVudCkucGF0aCk7CiAgICAgICAgdmFyIG92ZXJsYXk7CiAgICAgICAgLy8gQ2hlY2sgaWYgY2xpY2tlZCBvdXRzaWRlIG9mIG92ZXJsYXkuCiAgICAgICAgd2hpbGUgKChvdmVybGF5ID0gLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5fb3ZlcmxheXNbaV0pKSAmJgogICAgICAgICAgICAgICB0aGlzLl9vdmVybGF5SW5QYXRoKHBhdGgpICE9PSBvdmVybGF5KSB7CiAgICAgICAgICBvdmVybGF5Ll9vbkNhcHR1cmVDbGljayhldmVudCk7CiAgICAgICAgICBpZiAob3ZlcmxheS5hbGxvd0NsaWNrVGhyb3VnaCkgewogICAgICAgICAgICBpLS07CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICBicmVhazsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KCiAgICAgIC8qKgogICAgICAgKiBFbnN1cmVzIHRoZSBmb2N1cyBldmVudCBpcyBkZWxlZ2F0ZWQgdG8gdGhlIHJpZ2h0IG92ZXJsYXkuCiAgICAgICAqIEBwYXJhbSB7IUV2ZW50fSBldmVudAogICAgICAgKiBAcHJpdmF0ZQogICAgICAgKi8KICAgICAgX29uQ2FwdHVyZUZvY3VzKGV2ZW50KSB7CiAgICAgICAgdmFyIG92ZXJsYXkgPSAvKiogQHR5cGUgez99ICovICh0aGlzLmN1cnJlbnRPdmVybGF5KCkpOwogICAgICAgIGlmIChvdmVybGF5KSB7CiAgICAgICAgICBvdmVybGF5Ll9vbkNhcHR1cmVGb2N1cyhldmVudCk7CiAgICAgICAgfQogICAgICB9CgogICAgICAvKioKICAgICAgICogRW5zdXJlcyBUQUIgYW5kIEVTQyBrZXlib2FyZCBldmVudHMgYXJlIGRlbGVnYXRlZCB0byB0aGUgcmlnaHQgb3ZlcmxheS4KICAgICAgICogQHBhcmFtIHshRXZlbnR9IGV2ZW50CiAgICAgICAqIEBwcml2YXRlCiAgICAgICAqLwogICAgICBfb25DYXB0dXJlS2V5RG93bihldmVudCkgewogICAgICAgIHZhciBvdmVybGF5ID0gLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5jdXJyZW50T3ZlcmxheSgpKTsKICAgICAgICBpZiAob3ZlcmxheSkgewogICAgICAgICAgaWYgKElyb25BMTF5S2V5c0JlaGF2aW9yLmtleWJvYXJkRXZlbnRNYXRjaGVzS2V5cyhldmVudCwgJ2VzYycpKSB7CiAgICAgICAgICAgIG92ZXJsYXkuX29uQ2FwdHVyZUVzYyhldmVudCk7CiAgICAgICAgICB9IGVsc2UgaWYgKElyb25BMTF5S2V5c0JlaGF2aW9yLmtleWJvYXJkRXZlbnRNYXRjaGVzS2V5cyhldmVudCwgJ3RhYicpKSB7CiAgICAgICAgICAgIG92ZXJsYXkuX29uQ2FwdHVyZVRhYihldmVudCk7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CgogICAgICAvKioKICAgICAgICogUmV0dXJucyBpZiB0aGUgb3ZlcmxheTEgc2hvdWxkIGJlIGJlaGluZCBvdmVybGF5Mi4KICAgICAgICogQHBhcmFtIHshRWxlbWVudH0gb3ZlcmxheTEKICAgICAgICogQHBhcmFtIHshRWxlbWVudH0gb3ZlcmxheTIKICAgICAgICogQHJldHVybiB7Ym9vbGVhbn0KICAgICAgICogQHN1cHByZXNzIHttaXNzaW5nUHJvcGVydGllc30KICAgICAgICogQHByaXZhdGUKICAgICAgICovCiAgICAgIF9zaG91bGRCZUJlaGluZE92ZXJsYXkob3ZlcmxheTEsIG92ZXJsYXk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gICAgICByZWFkT25seTogdHJ1ZSwKICAgICAgICAgIHR5cGU6IEJvb2xlYW4sCiAgICAgICAgICB2YWx1ZTogZmFsc2UKICAgICAgICB9LAoKICAgICAgICAvKioKICAgICAgICAgKiBTZXQgdG8gdHJ1ZSB0byBkaXNwbGF5IGEgYmFja2Ryb3AgYmVoaW5kIHRoZSBvdmVybGF5LiBJdCB0cmFwcyB0aGUgZm9jdXMKICAgICAgICAgKiB3aXRoaW4gdGhlIGxpZ2h0IERPTSBvZiB0aGUgb3ZlcmxheS4KICAgICAgICAgKi8KICAgICAgICB3aXRoQmFja2Ryb3A6IHsKICAgICAgICAgIG9ic2VydmVyOiAnX3dpdGhCYWNrZHJvcENoYW5nZWQnLAogICAgICAgICAgdHlwZTogQm9vbGVhbiwKICAgICAgICB9LAoKICAgICAgICAvKioKICAgICAgICAgKiBTZXQgdG8gdHJ1ZSB0byBkaXNhYmxlIGF1dG8tZm9jdXNpbmcgdGhlIG92ZXJsYXkgb3IgY2hpbGQgbm9kZXMgd2l0aAogICAgICAgICAqIHRoZSBgYXV0b2ZvY3VzYCBhdHRyaWJ1dGVgIHdoZW4gdGhlIG92ZXJsYXkgaXMgb3BlbmVkLgogICAgICAgICAqLwogICAgICAgIG5vQXV0b0ZvY3VzOiB7CiAgICAgICAgICB0eXBlOiBCb29sZWFuLAogICAgICAgICAgdmFsdWU6IGZhbHNlLAogICAgICAgIH0sCgogICAgICAgIC8qKgogICAgICAgICAqIFNldCB0byB0cnVlIHRvIGRpc2FibGUgY2FuY2VsaW5nIHRoZSBvdmVybGF5IHdpdGggdGhlIEVTQyBrZXkuCiAgICAgICAgICovCiAgICAgICAgbm9DYW5jZWxPbkVzY0tleTogewogICAgICAgICAgdHlwZTogQm9vbGVhbiwKICAgICAgICAgIHZhbHVlOiBmYWxzZSwKICAgICAgICB9LAoKICAgICAgICAvKioKICAgICAgICAgKiBTZXQgdG8gdHJ1ZSB0byBkaXNhYmxlIGNhbmNlbGluZyB0aGUgb3Zl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hyb3VnaCBvdmVybGF5cy4KICAgICAgICAgKiBXaGVuIHRoZSB1c2VyIGNsaWNrcyBvdXRzaWRlIHRoaXMgb3ZlcmxheSwgdGhlIGNsaWNrIG1heQogICAgICAgICAqIGNsb3NlIHRoZSBvdmVybGF5IGJlbG93LgogICAgICAgICAqLwogICAgICAgIGFsbG93Q2xpY2tUaHJvdWdoOiB7CiAgICAgICAgICB0eXBlOiBCb29sZWFuLAogICAgICAgIH0sCgogICAgICAgIC8qKgogICAgICAgICAqIFNldCB0byB0cnVlIHRvIGtlZXAgb3ZlcmxheSBhbHdheXMgb24gdG9wLgogICAgICAgICAqLwogICAgICAgIGFsd2F5c09uVG9wOiB7CiAgICAgICAgICB0eXBlOiBCb29sZWFuLAogICAgICAgIH0sCgogICAgICAgIC8qKgogICAgICAgICAqIERldGVybWluZXMgd2hpY2ggYWN0aW9uIHRvIHBlcmZvcm0gd2hlbiBzY3JvbGwgb3V0c2lkZSBhbiBvcGVuZWQgb3ZlcmxheQogICAgICAgICAqIGhhcHBlbnMuIFBvc3NpYmxlIHZhbHVlczogbG9jayAtIGJsb2NrcyBzY3JvbGxpbmcgZnJvbSBoYXBwZW5pbmcsIHJlZml0IC0KICAgICAgICAgKiBjb21wdXRlcyB0aGUgbmV3IHBvc2l0aW9uIG9uIHRoZSBvdmVybGF5IGNhbmNlbCAtIGNhdXNlcyB0aGUgb3ZlcmxheSB0bwogICAgICAgICAqIGNsb3NlCiAgICAgICAgICovCiAgICAgICAgc2Nyb2xsQWN0aW9uOiB7CiAgICAgICAgICB0eXBlOiBTdHJpbmcsCiAgICAgICAgfSwKCiAgICAgICAgLyoqCiAgICAgICAgICogU2hvcnRjdXQgdG8gYWNjZXNzIHRvIHRoZSBvdmVybGF5IG1hbmFnZXIuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAdHlwZSB7IUlyb25PdmVybGF5TWFuYWdlckNsYXNzfQogICAgICAgICAqLwogICAgICAgIF9tYW5hZ2VyOiB7CiAgICAgICAgICB0eXBlOiBPYmplY3QsCiAgICAgICAgICB2YWx1ZTogSXJvbk92ZXJsYXlNYW5hZ2VyLAogICAgICAgIH0sCgogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBub2RlIGJlaW5nIGZvY3VzZWQuCiAgICAgICAgICogQHR5cGUgez9Ob2RlfQogICAgICAgICAqLwogICAgICAgIF9mb2N1c2VkQ2hpbGQ6IHsKICAgICAgICAgIHR5cGU6IE9iamVjdCwKICAgICAgICB9CgogICAgICB9LAoKICAgICAgbGlzdGVuZXJzOiB7J2lyb24tcmVzaXplJzogJ19vbklyb25SZXNpemUnfSwKCiAgICAgIG9ic2VydmVyczogWydfX3VwZGF0ZVNjcm9sbE9ic2VydmVycyhpc0F0dGFjaGVkLCBvcGVuZWQsIHNjcm9sbEFjdGlvbiknXSwKCiAgICAgIC8qKgogICAgICAgKiBUaGUgYmFja2Ryb3AgZWxlbWVudC4KICAgICAgICogQHJldHVybiB7IUVsZW1lbnR9CiAgICAgICAqLwogICAgICBnZXQgYmFja2Ryb3BFbGVtZW50KCkgewogICAgICAgIHJldHVybiB0aGlzLl9tYW5hZ2VyLmJhY2tkcm9wRWxlbWVudDsKICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgKiBSZXR1cm5zIHRoZSBub2RlIHRvIGdpdmUgZm9jdXMgdG8uCiAgICAgICAqIEByZXR1cm4geyFOb2RlfQogICAgICAgKi8KICAgICAgZ2V0IF9mb2N1c05vZGUoKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuX2ZvY3VzZWRDaGlsZCB8fCBkb20odGhpcykucXVlcnlTZWxlY3RvcignW2F1dG9mb2N1c10nKSB8fCB0aGlzOwogICAgICB9LAoKICAgICAgLyoqCiAgICAgICAqIEFycmF5IG9mIG5vZGVzIHRoYXQgY2FuIHJlY2VpdmUgZm9jdXMgKG92ZXJsYXkgaW5jbHVkZWQpLCBvcmRlcmVkIGJ5CiAgICAgICAqIGB0YWJpbmRleGAuIFRoaXMgaXM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JlRm9jdXNOb2RlLmZvY3VzKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICAgIHRoaXMuX19yZXN0b3JlRm9jdXNOb2RlID0gbnVsbDsKICAgICAgICAgIHRoaXMuX2ZvY3VzTm9kZS5ibHVyKCk7CiAgICAgICAgICB0aGlzLl9mb2N1c2VkQ2hpbGQgPSBudWxsOwogICAgICAgIH0KICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgKiBDYW5jZWxzIChjbG9zZXMpIHRoZSBvdmVybGF5LiBDYWxsIHdoZW4gY2xpY2sgaGFwcGVucyBvdXRzaWRlIHRoZSBvdmVybGF5LgogICAgICAgKiBAcGFyYW0geyFFdmVudH0gZXZlbnQKICAgICAgICogQHByb3RlY3RlZAogICAgICAgKi8KICAgICAgX29uQ2FwdHVyZUNsaWNrOiBmdW5jdGlvbihldmVudCkgewogICAgICAgIGlmICghdGhpcy5ub0NhbmNlbE9uT3V0c2lkZUNsaWNrKSB7CiAgICAgICAgICB0aGlzLmNhbmNlbChldmVudCk7CiAgICAgICAgfQogICAgICB9LAoKICAgICAgLyoqCiAgICAgICAqIEtlZXBzIHRyYWNrIG9mIHRoZSBmb2N1c2VkIGNoaWxkLiBJZiB3aXRoQmFja2Ryb3AsIHRyYXBzIGZvY3VzIHdpdGhpbgogICAgICAgKiBvdmVybGF5LgogICAgICAgKiBAcGFyYW0geyFFdmVudH0gZXZlbnQKICAgICAgICogQHByb3RlY3RlZAogICAgICAgKi8KICAgICAgX29uQ2FwdHVyZUZvY3VzOiBmdW5jdGlvbihldmVudCkgewogICAgICAgIGlmICghdGhpcy53aXRoQmFja2Ryb3ApIHsKICAgICAgICAgIHJldHVybjsKICAgICAgICB9CiAgICAgICAgdmFyIHBhdGggPSBkb20oZXZlbnQpLnBhdGg7CiAgICAgICAgaWYgKHBhdGguaW5kZXhPZih0aGlzKSA9PT0gLTEpIHsKICAgICAgICAgIGV2ZW50LnN0b3BQcm9wYWdhdGlvbigpOwogICAgIC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lcnMoKTsKICAgICAgICB9CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogQHByaXZhdGUKICAgICAgICovCiAgICAgIF9fYWRkU2Nyb2xsTGlzdGVuZXJzOiBmdW5jdGlvbigpIHsKICAgICAgICBpZiAoIXRoaXMuX19yb290Tm9kZXMpIHsKICAgICAgICAgIHRoaXMuX19yb290Tm9kZXMgPSBbXTsKICAgICAgICAgIC8vIExpc3RlbiBmb3Igc2Nyb2xsIGV2ZW50cyBpbiBhbGwgc2hhZG93Um9vdHMgaG9zdGluZyB0aGlzIG92ZXJsYXkgb25seQogICAgICAgICAgLy8gd2hlbiBpbiBuYXRpdmUgU2hhZG93RE9NLgogICAgICAgICAgaWYgKHVzZVNoYWRvdykgewogICAgICAgICAgICB2YXIgbm9kZSA9IHRoaXM7CiAgICAgICAgICAgIHdoaWxlIChub2RlKSB7CiAgICAgICAgICAgICAgaWYgKG5vZGUubm9kZVR5cGUgPT09IE5vZGUuRE9DVU1FTlRfRlJBR01FTlRfTk9ERSAmJiBub2RlLmhvc3QpIHsKICAgICAgICAgICAgICAgIHRoaXMuX19yb290Tm9kZXMucHVzaChub2RlKTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgbm9kZSA9IG5vZGUuaG9zdCB8fCBub2RlLmFzc2lnbmVkU2xvdCB8fCBub2RlLnBhcmVudE5vZGU7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICAgIHRoaXMuX19yb290Tm9kZXMucHVzaChkb2N1bWVudCk7CiAgICAgICAgfQogICAgICAgIHRoaXMuX19yb290Tm9kZXMuZm9yRWFjaChmdW5jdGlvbihlbCkgewogICAgICAgICAgZWwuYWRkRXZlbnRMaXN0ZW5lcignc2Nyb2xsJywgdGhpcy5fX29uQ2FwdHVyZVNjcm9sbCwgewogICAgICAgICAgICBjYXB0dXJlOiB0cnVlLAogICAgICAgICAgICBwYXNzaXZlOiB0cnVlLAogICAgICAgICAgfSk7CiAgICAgICAgfSwgdGhpcyk7CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogQHByaXZhdGUKICAgICAgICovCiAgICAgIF9fcmVtb3ZlU2Nyb2xsTGlzdGVuZXJzOiBmdW5jdGlvbigpIHsKICAgICAgICBpZiAodGhpcy5fX3Jvb3ROb2RlcykgewogICAgICAgICAgdGhpcy5fX3Jvb3ROb2Rlcy5mb3JFYWNoKGZ1bmN0aW9uKGVsKSB7CiAgICAgICAgICAgIGVsLnJlbW92ZUV2ZW50TGlzdGVuZXIoJ3Njcm9sbCcsIHRoaXMuX19vbkNhcHR1cmVTY3JvbGwsIHsKICAgICAgICAgICAgICBjYXB0dXJlOiB0cnVlLAogICAgICAgICAgICAgIHBhc3NpdmU6IHRydWUsCiAgICAgICAgICAgIH0pOwogICAgICAgICAgfSwgdGhpcyk7CiAgICAgICAgfQogICAgICAgIGlmICghdGhpcy5pc0F0dGFjaGVkKSB7CiAgICAgICAgICB0aGlzLl9fcm9vdE5vZGVzID0gbnVsbDsKICAgICAgICB9CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogQHBhcmFtIHtzdHJpbmc9fSBzY3JvbGxBY3Rpb24KICAgICAgICogQHJldHVybiB7Ym9vbGVhbn0KICAgICAgICogQHByaXZhdGUKICAgICAgICovCiAgICAgIF9faXNWYWxpZFNjcm9sbEFjdGlvbjogZnVuY3Rpb24oc2Nyb2xsQWN0aW9uKSB7CiAgICAgICAgcmV0dXJuIHNjcm9sbEFjdGlvbiA9PT0gJ2xvY2snIHx8IHNjcm9sbEFjdGlvbiA9PT0gJ3JlZml0JyB8fAogICAgICAgICAgICBzY3JvbGxBY3Rpb24gPT09ICdjYW5jZWwnOwogICAgICB9LAoKICAgICAgLyoqCiAgICAgICAqIEBwcml2YXRlCiAgICAgICAqLwogICAgICBfX29uQ2FwdHVyZVNjcm9sbDogZnVuY3Rpb24oZXZlbnQpIHsKICAgICAgICBpZiAodGhpcy5fX2lzQW5pbWF0aW5nKSB7CiAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIC8vIENoZWNrIGlmIHNjcm9sbCBvdXRzaWRlIHRoZSBvdmVybGF5LgogICAgICAgIGlmIChkb20oZXZlbnQpLnBhdGguaW5kZXhPZih0aGlzKSA+PSAwKSB7CiAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIHN3aXRjaCAodGhpcy5zY3JvbGxBY3Rpb24pIHsKICAgICAgICAgIGNhc2UgJ2xvY2snOgogICAgICAgICAgICAvLyBOT1RFOiBzY3JvbGxpbmcgbWlnaHQgaGFwcGVuIGlmIGEgc2Nyb2xsIGV2ZW50IGlzIG5vdCBjYW5jZWxsYWJsZSwgb3IKICAgICAgICAgICAgLy8gaWYgdXNlciBwcmVzc2VkIGtleXMgdGhhdCBjYXVzZSBzY3JvbGxpbmcgKHRoZXkncmUgbm90IHByZXZlbnRlZCBpbgogICAgICAgICAgICAvLyBvcmRlciBub3QgdG8gYnJlYWsgYTExeSBmZWF0dXJlcyBsaWtlIG5hdmlnYXRlIHdpdGggYXJyb3cga2V5cykuCiAgICAgICAgICAgIHRoaXMuX19yZXN0b3JlU2Nyb2xsUG9zaXRpb24oKTsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICBjYXNlICdyZWZpdCc6CiAgICAgICAgICAgIHRoaXMuX19kZXJhZigncmVmaXQnLCB0aGlzLnJlZml0KTsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICBjYXNlICdjYW5jZWwnOgogICAgICAgICAgICB0aGlzLmNhbmNlbChldmVudCk7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgIH0KICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgKiBNZW1vaXplcyB0aGUgc2Nyb2xsIHBvc2l0aW9uIG9mIHRoZSBvdXRzaWRlIHNjcm9sbGluZyBlbGVtZW50LgogICAgICAgKiBAcHJpdmF0ZQogICAgICAgKi8KICAgICAgX19zYXZlU2Nyb2xsUG9zaXRpb246IGZ1bmN0aW9uKCkgewogICAgICAgIGlmIChk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0OwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAvLyBTaW5jZSB3ZSBkb24ndCBrbm93IGlmIGlzIHRoZSBib2R5IG9yIGh0bWwsIHNldCBib3RoLgogICAgICAgICAgZG9jdW1lbnQuZG9jdW1lbnRFbGVtZW50LnNjcm9sbFRvcCA9IGRvY3VtZW50LmJvZHkuc2Nyb2xsVG9wID0KICAgICAgICAgICAgICB0aGlzLl9fc2Nyb2xsVG9wOwogICAgICAgICAgZG9jdW1lbnQuZG9jdW1lbnRFbGVtZW50LnNjcm9sbExlZnQgPSBkb2N1bWVudC5ib2R5LnNjcm9sbExlZnQgPQogICAgICAgICAgICAgIHRoaXMuX19zY3JvbGxMZWZ0OwogICAgICAgIH0KICAgICAgfSwKCiAgICB9OwoKICAgIGNvbnN0IGNvbXBvc2VkUGFyZW50ID0gbm9kZSA9PgogICAgICAgIG5vZGUuYXNzaWduZWRTbG90IHx8IG5vZGUucGFyZW50Tm9kZSB8fCBub2RlLmhvc3Q7CgogICAgY29uc3QgY29tcG9zZWRDb250YWlucyA9IChhbmNlc3RvciwgZGVzY2VuZGFudCkgPT4gewogICAgICBmb3IgKGxldCBlbGVtZW50ID0gZGVzY2VuZGFudDsgZWxlbWVudDsgZWxlbWVudCA9IGNvbXBvc2VkUGFyZW50KGVsZW1lbnQpKSB7CiAgICAgICAgaWYgKGVsZW1lbnQgPT09IGFuY2VzdG9yKSB7CiAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICB9CiAgICAgIH0KICAgICAgcmV0dXJuIGZhbHNlOwogICAgfTsKCiAgICAvKioKICAgICAgVXNlIGBQb2x5bWVyLklyb25PdmVybGF5QmVoYXZpb3JgIHRvIGltcGxlbWVudCBhbiBlbGVtZW50IHRoYXQgY2FuIGJlIGhpZGRlbgogICAgICBvciBzaG93biwgYW5kIGRpc3BsYXlzIG9uIHRvcCBvZiBvdGhlciBjb250ZW50LiBJdCBpbmNsdWRlcyBhbiBvcHRpb25hbAogICAgICBiYW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RtbGAKICAgIDxzdHlsZT4KCiAgICAgIDpob3N0IHsKICAgICAgICBkaXNwbGF5OiBibG9jazsKICAgICAgICBAYXBwbHkgLS1sYXlvdXQtcmVsYXRpdmU7CiAgICAgIH0KCiAgICAgIDpob3N0KC5pcy1zY3JvbGxlZDpub3QoOmZpcnN0LWNoaWxkKSk6OmJlZm9yZSB7CiAgICAgICAgY29udGVudDogJyc7CiAgICAgICAgcG9zaXRpb246IGFic29sdXRlOwogICAgICAgIHRvcDogMDsKICAgICAgICBsZWZ0OiAwOwogICAgICAgIHJpZ2h0OiAwOwogICAgICAgIGhlaWdodDogMXB4OwogICAgICAgIGJhY2tncm91bmQ6IHZhcigtLWRpdmlkZXItY29sb3IpOwogICAgICB9CgogICAgICA6aG9zdCguY2FuLXNjcm9sbDpub3QoLnNjcm9sbGVkLXRvLWJvdHRvbSk6bm90KDpsYXN0LWNoaWxkKSk6OmFmdGVyIHsKICAgICAgICBjb250ZW50OiAnJzsKICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7CiAgICAgICAgYm90dG9tOiAwOwogICAgICAgIGxlZnQ6IDA7CiAgICAgICAgcmlnaHQ6IDA7CiAgICAgICAgaGVpZ2h0OiAxcHg7CiAgICAgICAgYmFja2dyb3VuZDogdmFyKC0tZGl2aWRlci1jb2xvcik7CiAgICAgIH0KCiAgICAgIC5zY3JvbGxhYmxlIHsKICAgICAgICBwYWRkaW5nOiAwIDI0cHg7CgogICAgICAgIEBhcHBseSAtLWxheW91dC1zY3JvbGw7CiAgICAgICAgQGFwcGx5IC0tcGFwZXItZGlhbG9nLXNjcm9sbGFibGU7CiAgICAgIH0KCiAgICAgIC5maXQgewogICAgICAgIEBhcHBseSAtLWxheW91dC1maXQ7CiAgICAgIH0KICAgIDwvc3R5bGU+CgogICAgPGRpdiBpZD0ic2Nyb2xsYWJsZSIgY2xhc3M9InNjcm9sbGFibGUiIG9uLXNjcm9sbD0idXBkYXRlU2Nyb2xsU3RhdGUiPgogICAgICA8c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ncmFudAogICAgZm91bmQgYXQgaHR0cDovL3BvbHltZXIuZ2l0aHViLmlvL1BBVEVOVFMudHh0CiAgICAqLwogICAgY29uc3QgdGVtcGxhdGUkYSA9IGh0bWxgPGN1c3RvbS1zdHlsZT4KICA8c3R5bGUgaXM9ImN1c3RvbS1zdHlsZSI+CiAgICBodG1sIHsKCiAgICAgIC8qIFNoYXJlZCBTdHlsZXMgKi8KICAgICAgLS1wYXBlci1mb250LWNvbW1vbi1iYXNlOiB7CiAgICAgICAgZm9udC1mYW1pbHk6ICdSb2JvdG8nLCAnTm90bycsIHNhbnMtc2VyaWY7CiAgICAgICAgLXdlYmtpdC1mb250LXNtb290aGluZzogYW50aWFsaWFzZWQ7CiAgICAgIH07CgogICAgICAtLXBhcGVyLWZvbnQtY29tbW9uLWNvZGU6IHsKICAgICAgICBmb250LWZhbWlseTogJ1JvYm90byBNb25vJywgJ0NvbnNvbGFzJywgJ01lbmxvJywgbW9ub3NwYWNlOwogICAgICAgIC13ZWJraXQtZm9udC1zbW9vdGhpbmc6IGFudGlhbGlhc2VkOwogICAgICB9OwoKICAgICAgLS1wYXBlci1mb250LWNvbW1vbi1leHBlbnNpdmUta2VybmluZzogewogICAgICAgIHRleHQtcmVuZGVyaW5nOiBvcHRpbWl6ZUxlZ2liaWxpdHk7CiAgICAgIH07CgogICAgICAtLXBhcGVyLWZvbnQtY29tbW9uLW5vd3JhcDogewogICAgICAgIHdoaXRlLXNwYWNlOiBub3dyYXA7CiAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjsKICAgICAgICB0ZXh0LW92ZXJmbG93OiBlbGxpcHNpczsKICAgICAgfTsKCiAgICAgIC8qIE1hdGVyaWFsIEZvbnQgU3R5bGVzICovCgogICAgICAtLXBhcGVyLWZvbnQtZGlzcGxheTQ6IHsKICAgICAgICBAYXBwbHkgLS1wYXBlci1mb250LWNvbW1vbi1iYXNlOwogICAgICAgIEBhcHBseSAtLXBhcGVyLWZvbnQtY29tbW9uLW5vd3JhcDsKCiAgICAgICAgZm9udC1zaXplOiAxMTJweDsKICAgICAgICBmb250LXdlaWdodDogMzAwOwogICAgICAgIGxldHRlci1zcGFjaW5nOiAtLjA0NGVtOwogICAgICAgIGxpbmUtaGVpZ2h0OiAxMjBweDsKICAgICAgfTsKCiAgICAgIC0tcGFwZXItZm9udC1kaXNwbGF5MzogewogICAgICAgIEBhcHBseSAtLXBhcGVyLWZvbnQtY29tbW9uLWJhc2U7CiAgICAgICAgQGFwcGx5IC0tcGFwZXItZm9udC1jb21tb24tbm93cmFwOwoKICAgICAgICBmb250LXNpemU6IDU2cHg7CiAgICAgICAgZm9udC13ZWlnaHQ6IDQwMDsKICAgICAgICBsZXR0ZXItc3BhY2luZzogLS4wMjZlbTsKICAgICAgICBsaW5lLWhlaWdodDogNjBweDsKICAgICAgfTsKCiAgICAgIC0tcGFwZXItZm9udC1kaXNwbGF5MjogewogICAgICAgIEBhcHBseSAtLXBhcGVyLWZvbnQtY29tbW9uLWJhc2U7CgogICAgICAgIGZvbnQtc2l6ZTogNDVweDsKICAgICAgICBmb250LXdlaWdodDogNDAwOwogICAgICAgIGxldHRlci1zcGFjaW5nOiAtLjAxOGVtOwogICAgICAgIGxpbmUtaGVpZ2h0OiA0OHB4OwogICAgICB9OwoKICAgICAgLS1wYXBlci1mb250LWRpc3BsYXkxOiB7CiAgICAgICAgQGFwcGx5IC0tcGFwZXItZm9udC1jb21tb24tYmFzZTsKCiAgICAgICAgZm9udC1zaXplOiAzNHB4OwogICAgICAgIGZvbnQtd2VpZ2h0OiA0MDA7CiAgICAgICAgbGV0dGVyLXNwYWNpbmc6IC0uMDFlbTsKICAgICAgICBsaW5lLWhlaWdodDogNDBweDsKICAgICAgfTsKCiAgICAgIC0tcGFwZXItZm9udC1oZWFkbGluZTogewogICAgICAgIEBhcHBseSAtLXBhcGVyLWZvbnQtY29tbW9uLWJhc2U7CgogICAgICAgIGZvbnQtc2l6ZTogMjRweDsKICAgICAgICBmb250LXdlaWdodDogNDAwOwogICAgICAgIGxldHRlci1zcGFjaW5nOiAtLjAxMmVtOwogICAgICAgIGxpbmUtaGVpZ2h0OiAzMnB4OwogICAgICB9OwoKICAgICAgLS1wYXBlci1mb250LXRpdGxlOiB7CiAgICAgICAgQGFwcGx5IC0tcGFwZXItZm9udC1jb21tb24tYmFzZTsKICAgICAgICBAYXBwbHkgLS1wYXBlci1mb250LWNvbW1vbi1ub3dyYXA7CgogICAgICAgIGZvbnQtc2l6ZTogMjBweDsKICAgICAgICBmb250LXdlaWdodDogNTAwOwogICAgICAgIGxpbmUtaGVpZ2h0OiAyOHB4OwogICAgICB9OwoKICAgICAgLS1wYXBlci1mb250LXN1YmhlYWQ6IHsKICAgICAgICBAYXBwbHkgLS1wYXBlci1mb250LWNvbW1vbi1iYXNlOwoKICAgICAgICBmb250LXNpemU6IDE2cHg7CiAgICAgICAgZm9udC13ZWlnaHQ6IDQwMDsKICAgICAgICBsaW5lLWhlaWdodDogMjRweDsKICAgICAgfTsKCiAgICAgIC0tcGFwZXItZm9udC1ib2R5MjogewogICAgICAgIEBhcHBseSAtLXBhcGVyLWZvbnQtY29tbW9uLWJhc2U7CgogICAgICAgIGZvbnQtc2l6ZTogMTRweDsKICAgICAgICBmb250LXdlaWdodDogNTAwOwogICAgICAgIGxpbmUtaGVpZ2h0OiAyNHB4OwogICAgICB9OwoKICAgICAgLS1wYXBlci1mb250LWJvZHkxOiB7CiAgICAgICAgQGFwcGx5IC0tcGFwZXItZm9udC1jb21tb24tYmFzZTsKCiAgICAgICAgZm9udC1zaXplOiAxNHB4OwogICAgICAgIGZvbnQtd2VpZ2h0OiA0MDA7CiAgICAgICAgbGluZS1oZWlnaHQ6IDIwcHg7CiAgICAgIH07CgogICAgICAtLXBhcGVyLWZvbnQtY2FwdGlvbjogewogICAgICAgIEBhcHBseSAtLXBhcGVyLWZvbnQtY29tbW9uLWJhc2U7CiAgICAgICAgQGFwcGx5IC0tcGFwZXItZm9udC1jb21tb24tbm93cmFwOwoKICAgICAgICBmb250LXNpemU6IDEycHg7CiAgICAgICAgZm9udC13ZWlnaHQ6IDQwMDsKICAgICAgICBsZXR0ZXItc3BhY2luZzogMC4wMTFlbTsKICAgICAgICBsaW5lLWhlaWdodDogMjBweDsKICAgICAgfTsKCiAgICAgIC0tcGFwZXItZm9udC1tZW51OiB7CiAgICAgICAgQGFwcGx5IC0tcGFwZXItZm9udC1jb21tb24tYmFzZTsKICAgICAgICBAYXBwbHkgLS1wYXBlci1mb250LWNvbW1vbi1ub3dyYXA7CgogICAgICAgIGZvbnQtc2l6ZTogMTNweDsKICAgICAgICBmb250LXdlaWdodDogNTAwOwogICAgICAgIGxpbmUtaGVpZ2h0OiAyNHB4OwogICAgICB9OwoKICAgICAgLS1wYXBlci1mb250LWJ1dHRvbjogewogICAgICAgIEBhcHBseSAtLXBhcGVyLWZvbnQtY29tbW9uLWJhc2U7CiAgICAgICAgQGFwcGx5IC0tcGFwZXItZm9udC1jb21tb24tbm93cmFwOwoKICAgICAgICBmb250LXNpemU6IDE0cHg7CiAgICAgICAgZm9udC13ZWlnaHQ6IDUwMDsKICAgICAgICBsZXR0ZXItc3BhY2luZzogMC4wMThlbTsKICAgICAgICBsaW5lLWhlaWdodDogMjRweDsKICAgICAgICB0ZXh0LXRyYW5zZm9ybTogdXBwZXJjYXNlOwogICAgICB9OwoKICAgICAgLS1wYXBlci1mb250LWNvZGUyOiB7CiAgICAgICAgQGFwcGx5IC0tcGFwZXItZm9udC1jb21tb24tY29kZTsKCiAgICAgICAgZm9udC1zaXplOiAxNHB4OwogICAgICAgIGZvbnQtd2VpZ2h0OiA3MDA7CiAgICAgICAgbGluZS1oZWlnaHQ6IDIwcHg7CiAgICAgIH07CgogICAgICAtLXBhcGVyLWZvbnQtY29kZTE6IHsKICAgICAgICBAYXBwbHkgLS1wYXBlci1mb250LWNvbW1vbi1jb2RlOwoKICAgICAgICBmb250LXNpemU6IDE0cHg7CiAgICAgICAgZm9udC13ZWlnaHQ6IDUwMDsKICAgICAgICB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LmdpdGh1Yi5pby9QQVRFTlRTLnR4dAogICAgKi8KCiAgICAvKioKICAgICAqIGBOZW9uQW5pbWF0YWJsZUJlaGF2aW9yYCBpcyBpbXBsZW1lbnRlZCBieSBlbGVtZW50cyBjb250YWluaW5nCiAgICAgKiBhbmltYXRpb25zIGZvciB1c2Ugd2l0aCBlbGVtZW50cyBpbXBsZW1lbnRpbmcKICAgICAqIGBOZW9uQW5pbWF0aW9uUnVubmVyQmVoYXZpb3JgLgogICAgICogQHBvbHltZXJCZWhhdmlvcgogICAgICovCiAgICBjb25zdCBOZW9uQW5pbWF0YWJsZUJlaGF2aW9yID0gewoKICAgICAgcHJvcGVydGllczogewoKICAgICAgICAvKioKICAgICAgICAgKiBBbmltYXRpb24gY29uZmlndXJhdGlvbi4gU2VlIFJFQURNRSBmb3IgbW9yZSBpbmZvLgogICAgICAgICAqLwogICAgICAgIGFuaW1hdGlvbkNvbmZpZzoge3R5cGU6IE9iamVjdH0sCgogICAgICAgIC8qKgogICAgICAgICAqIENvbnZlbmllbmNlIHByb3BlcnR5IGZvciBzZXR0aW5nIGFuICdlbnRyeScgYW5pbWF0aW9uLiBEbyBub3Qgc2V0CiAgICAgICAgICogYGFuaW1hdGlvbkNvbmZpZy5lbnRyeWAgbWFudWFsbHkgaWYgdXNpbmcgdGhpcy4gVGhlIGFuaW1hdGVkIG5vZGUgaXMgc2V0CiAgICAgICAgICogdG8gYHRoaXNgIGlmIHVzaW5nIHRoaXMgcHJvcGVydHkuCiAgICAgICAgICovCiAgICAgICAgZW50cnlBbmltYXRpb246IHsKICAgICAgICAgIG9ic2VydmVyOiAnX2VudHJ5QW5pbWF0aW9uQ2hhbmdlZCcsCiAgICAgICAgICB0eXBlOiBTdHJpbmcsCiAgICAgICAgfSwKCiAgICAgICAgLyoqCiAgICAgICAgICogQ29udmVuaWVuY2UgcHJvcGVydHkgZm9yIHNldHRpbmcgYW4gJ2V4aXQnIGFuaW1hdGlvbi4gRG8gbm90IHNldAogICAgICAgIC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BcnJheS5pc0FycmF5KHRoaXNDb25maWcpKSB7CiAgICAgICAgICB0aGlzQ29uZmlnID0gW3RoaXNDb25maWddOwogICAgICAgIH0KCiAgICAgICAgLy8gaXRlcmF0ZSBhbmltYXRpb25zIGFuZCByZWN1cnNlIHRvIHByb2Nlc3MgY29uZmlndXJhdGlvbnMgZnJvbSBjaGlsZCBub2RlcwogICAgICAgIGlmICh0aGlzQ29uZmlnKSB7CiAgICAgICAgICBmb3IgKHZhciBjb25maWcsIGluZGV4ID0gMDsgY29uZmlnID0gdGhpc0NvbmZpZ1tpbmRleF07IGluZGV4KyspIHsKICAgICAgICAgICAgaWYgKGNvbmZpZy5hbmltYXRhYmxlKSB7CiAgICAgICAgICAgICAgY29uZmlnLmFuaW1hdGFibGUuX2dldEFuaW1hdGlvbkNvbmZpZ1JlY3Vyc2l2ZSgKICAgICAgICAgICAgICAgICAgY29uZmlnLnR5cGUgfHwgdHlwZSwgbWFwLCBhbGxDb25maWdzKTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICBpZiAoY29uZmlnLmlkKSB7CiAgICAgICAgICAgICAgICB2YXIgY2FjaGVkQ29uZmlnID0gbWFwW2NvbmZpZy5pZF07CiAgICAgICAgICAgICAgICBpZiAoY2FjaGVkQ29uZmlnKSB7CiAgICAgICAgICAgICAgICAgIC8vIG1lcmdlIGNvbmZpZ3VyYXRpb25zIHdpdGggdGhlIHNhbWUgaWQsIG1ha2luZyBhIGNsb25lIGxhemlseQogICAgICAgICAgICAgICAgICBpZiAoIWNhY2hlZENvbmZpZy5pc0Nsb25lKSB7CiAgICAgICAgICAgICAgICAgICAgbWFwW2NvbmZpZy5pZF0gPSB0aGlzLl9jbG9uZUNvbmZpZyhjYWNoZWRDb25maWcpOwogICAgICAgICAgICAgICAgICAgIGNhY2hlZENvbmZpZyA9IG1hcFtjb25maWcuaWRdOwogICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgIHRoaXMuX2NvcHlQcm9wZXJ0aWVzKGNhY2hlZENvbmZpZywgY29uZmlnKTsKICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgIC8vIHB1dCBhbnkgY29uZmlncyB3aXRoIGFuIGlkIGludG8gYSBtYXAKICAgICAgICAgICAgICAgICAgbWFwW2NvbmZpZy5pZF0gPSBjb25maWc7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIGFsbENvbmZpZ3MucHVzaChjb25maWcpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgKiBBbiBlbGVtZW50IGltcGxlbWVudGluZyBgTmVvbkFuaW1hdGlvblJ1bm5lckJlaGF2aW9yYCBjYWxscyB0aGlzCiAgICAgICAqIG1ldGhvZCB0byBjb25maWd1cmUgYW4gYW5pbWF0aW9uIHdpdGggYW4gb3B0aW9uYWwgdHlwZS4gRWxlbWVudHMKICAgICAgICogaW1wbGVtZW50aW5nIGBOZW9uQW5pbWF0YWJsZUJlaGF2aW9yYCBzaG91bGQgZGVmaW5lIHRoZSBwcm9wZXJ0eQogICAgICAgKiBgYW5pbWF0aW9uQ29uZmlnYCwgd2hpY2ggaXMgZWl0aGVyIGEgY29uZmlndXJhdGlvbiBvYmplY3Qgb3IgYSBtYXAgb2YKICAgICAgICogYW5pbWF0aW9uIHR5cGUgdG8gYXJyYXkgb2YgY29uZmlndXJhdGlvbiBvYmplY3RzLgogICAgICAgKi8KICAgICAgZ2V0QW5pbWF0aW9uQ29uZmlnOiBmdW5jdGlvbih0eXBlKSB7CiAgICAgICAgdmFyIG1hcCA9IHt9OwogICAgICAgIHZhciBhbGxDb25maWdzID0gW107CiAgICAgICAgdGhpcy5fZ2V0QW5pbWF0aW9uQ29uZmlnUmVjdXJzaXZlKHR5cGUsIG1hcCwgYWxsQ29uZmlncyk7CiAgICAgICAgLy8gYX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vciBOZW9uQW5pbWF0aW9uUnVubmVyQmVoYXZpb3IKICAgICAqLwogICAgY29uc3QgTmVvbkFuaW1hdGlvblJ1bm5lckJlaGF2aW9ySW1wbCA9IHsKCiAgICAgIF9jb25maWd1cmVBbmltYXRpb25zOiBmdW5jdGlvbihjb25maWdzKSB7CiAgICAgICAgdmFyIHJlc3VsdHMgPSBbXTsKICAgICAgICB2YXIgcmVzdWx0c1RvUGxheSA9IFtdOwoKICAgICAgICBpZiAoY29uZmlncy5sZW5ndGggPiAwKSB7CiAgICAgICAgICBmb3IgKGxldCBjb25maWcsIGluZGV4ID0gMDsgY29uZmlnID0gY29uZmlnc1tpbmRleF07IGluZGV4KyspIHsKICAgICAgICAgICAgbGV0IG5lb25BbmltYXRpb24gPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KGNvbmZpZy5uYW1lKTsKICAgICAgICAgICAgLy8gaXMgdGhpcyBlbGVtZW50IGFjdHVhbGx5IGEgbmVvbiBhbmltYXRpb24/CiAgICAgICAgICAgIGlmIChuZW9uQW5pbWF0aW9uLmlzTmVvbkFuaW1hdGlvbikgewogICAgICAgICAgICAgIGxldCByZXN1bHQgPSBudWxsOwogICAgICAgICAgICAgIC8vIENsb3N1cmUgY29tcGlsZXIgZG9lcyBub3Qgd29yayB3ZWxsIHdpdGggYSB0cnkgLyBjYXRjaCBoZXJlLgogICAgICAgICAgICAgIC8vIC5jb25maWd1cmUgbmVlZHMgdG8gYmUgZXhwbGljaXRseSBkZWZpbmVkCiAgICAgICAgICAgICAgaWYgKCFuZW9uQW5pbWF0aW9uLmNvbmZpZ3VyZSkgewogICAgICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gY29uZmlnCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHtBbmltYXRpb25FZmZlY3RSZWFkT25seX0KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgbmVvbkFuaW1hdGlvbi5jb25maWd1cmUgPSBmdW5jdGlvbihjb25maWcpIHsKICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgcmVzdWx0ID0gbmVvbkFuaW1hdGlvbi5jb25maWd1cmUoY29uZmlnKTsKICAgICAgICAgICAgICByZXN1bHRzVG9QbGF5LnB1c2goewogICAgICAgICAgICAgICAgcmVzdWx0OiByZXN1bHQsCiAgICAgICAgICAgICAgICBjb25maWc6IGNvbmZpZywKICAgICAgICAgICAgICAgIG5lb25BbmltYXRpb246IG5lb25BbmltYXRpb24sCiAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgY29uc29sZS53YXJuKHRoaXMuaXMgKyAnOicsIGNvbmZpZy5uYW1lLCAnbm90IGZvdW5kIScpOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHJlc3VsdHNUb1BsYXkubGVuZ3RoOyBpKyspIHsKICAgICAgICAgIGxldCByZXN1bHQgPSByZXN1bHRzVG9QbGF5W2ldLnJlc3VsdDsKICAgICAgICAgIGxldCBjb25maWcgPSByZXN1bHRzVG9QbGF5W2ldLmNvbmZpZzsKICAgICAgICAgIGxldCBuZW9uQW5pbWF0aW9uID0gcmVzdWx0c1RvUGxheVtpXS5uZW9uQW5pbWF0aW9uOwogICAgICAgICAgLy8gY29uZmlndXJhdGlvbiBvciBwbGF5IGNvdWxkIGZhaWwgaWYgcG9seWZpbGxzIGFyZW4ndCBsb2FkZWQKICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgIC8vIENoZWNrIGlmIHdlIGhhdmUgYW4gRWZmZWN0IHJhdGhlciB0aGFuIGFuIEFuaW1hdGlvbgogICAgICAgICAgICBpZiAodHlwZW9mIHJlc3VsdC5jYW5jZWwgIT0gJ2Z1bmN0aW9uJykgewogICAgICAgICAgICAgIHJlc3VsdCA9IGRvY3VtZW50LnRpbWVsaW5lLnBsYXkocmVzdWx0KTsKICAgICAgICAgICAgfQogICAgICAgICAgfSBjYXRjaCAoZSkgewogICAgICAgICAgICByZXN1bHQgPSBudWxsOwogICAgICAgICAgICBjb25zb2xlLndhcm4oJ0NvdWxkbnQgcGxheScsICcoJywgY29uZmlnLm5hbWUsICcpLicsIGUpOwogICAgICAgICAgfQoKICAgICAgICAgIGlmIChyZXN1bHQpIHsKICAgICAgICAgICAgcmVzdWx0cy5wdXNoKHsKICAgICAgICAgICAgICBuZW9uQW5pbWF0aW9uOiBuZW9uQW5pbWF0aW9uLAogICAgICAgICAgICAgIGNvbmZpZzogY29uZmlnLAogICAgICAgICAgICAgIGFuaW1hdGlvbjogcmVzdWx0LAogICAgICAgICAgICB9KTsKICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIHJldHVybiByZXN1bHRzOwogICAgICB9LAoKICAgICAgX3Nob3VsZENvbXBsZXRlOiBmdW5jdGlvbihhY3RpdmVFbnRyaWVzKSB7CiAgICAgICAgdmFyIGZpbmlzaGVkID0gdHJ1ZTsKICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGFjdGl2ZUVudHJpZXMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgIGlmIChhY3RpdmVFbnRyaWVzW2ldLmFuaW1hdGlvbi5wbGF5U3RhdGUgIT0gJ2ZpbmlzaGVkJykgewogICAgICAgICAgICBmaW5pc2hlZCA9IGZhbHNlOwogICAgICAgICAgICBicmVhazsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIGZpbmlzaGVkOwogICAgICB9LAoKICAgICAgX2NvbXBsZXRlOiBmdW5jdGlvbihhY3RpdmVFbnRyaWVzKSB7CiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBhY3RpdmVFbnRyaWVzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICBhY3RpdmVFbnRyaWVzW2ldLm5lb25BbmltYXRpb24uY29tcGxldGUoYWN0aXZlRW50cmllc1tpXS5jb25maWcpOwogICAgICAgIH0KICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGFjdGl2ZUVudHJpZXMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgIGFjdGl2ZUVudHJpZXNbaV0uYW5pbWF0aW9uLmNhbmNlbCgpOwogICAgICAgIH0KICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgKiBQbGF5cyBhbiBhbmltYXRpb24gd2l0aCBhbiBvcHRpb25hbCBgdHlwZWAuCiAgICAgICAqIEBwYXJhbSB7c3RyaW5nPX0gdHlwZQogICAgICAgKiBAcGFyYW0geyFPYmplY3Q9fSBjb29raWUKICAgICAgICovCiAgICAgIHBsYXlBbmltYXRpb246IGZ1bmN0aW9uKHR5cGUsIGNvb2tpZSkgewogICAgICAgIHZhciBjb25maWdzID0gdGhpcy5nZXRBbmltYXRpb25Db25maWcodHlwZSk7CiAgICAgICAgaWYgKCFjb25maWdzKSB7CiAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIHRoaXMuX2FjdGl2ZSA9IHRoaXMuX2FjdGl2ZSB8fCB7fTsKICAgICAgICBpZiAodGhpcy5fYWN0aXZlW3R5cGVdKSB7CiAgICAgICAgICB0aGlzLl9jb21wbGV0ZSh0aGlzLl9hY3RpdmVbdHlwZV0pOwogICAgICAgICAgZGVsZXRlIHRoaXMuX2FjdGl2ZVt0eXBlXTsKICAgICAgICB9CgogICAgICAgIHZhciBhY3RpdmVFbnRyaWVzID0gdGhpcy5fY29uZmlndXJlQW5pbWF0aW9ucyhjb25maWdzKTsKCiAgICAgICAgaWYgKGFjdGl2ZUVudHJpZXMubGVuZ3RoID09IDApIHsKICAgICAgICAgIHRoaXMuZmlyZSgnbmVvbi1hbmltYXRpb24tZmluaXNoJywgY29va2llLCB7YnViYmxlczogZmFsc2V9KTsKICAgICAgICAgIHJldHVybjsKICAgICAgICB9CgogICAgICAgIHRoaXMuX2FjdGl2ZVt0eXBlXSA9IGFjdGl2ZUVudHJpZXM7CgogICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgYWN0aXZlRW50cmllcy5sZW5ndGg7IGkrKykgewogICAgICAgICAgYWN0aXZlRW50cmllc1tpXS5hbmltYXRpb24ub25maW5pc2ggPSBmdW5jdGlvbigpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX3Nob3VsZENvbXBsZXRlKGFjdGl2ZUVudHJpZXMpKSB7CiAgICAgICAgICAgICAgdGhpcy5fY29tcGxldGUoYWN0aXZlRW50cmllcyk7CiAgICAgICAgICAgICAgZGVsZXRlIHRoaXMuX2FjdGl2ZVt0eXBlXTsKICAgICAgICAgICAgICB0aGlzLmZpcmUoJ25lb24tYW5pbWF0aW9uLWZpbmlzaCcsIGNvb2tpZSwge2J1YmJsZXM6IGZhbHNlfSk7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0uYmluZCh0aGlzKTsKICAgICAgICB9CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogQ2FuY2VscyB0aGUgY3VycmVudGx5IHJ1bm5pbmcgYW5pbWF0aW9ucy4KICAgICAgICovCiAgICAgIGNhbmNlbEFuaW1hdGlvbjogZnVuY3Rpb24oKSB7CiAgICAgICAgZm9yICh2YXIgayBpbiB0aGlzLl9hY3RpdmUpIHsKICAgICAgICAgIHZhciBlbnRyaWVzID0gdGhpcy5fYWN0aXZlW2tdOwoKICAgICAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaiBpbiBlbnRyaWVzKSB7CiAgICAgICAgICAgIGVudHJpZXNbal0uYW5pbWF0aW9uLmNhbmNlbCgpOwogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgdGhpcy5fYWN0aXZlID0ge307CiAgICAgIH0KICAgIH07CgogICAgLyoqIEBwb2x5bWVyQmVoYXZpb3IgKi8KICAgIGNvbnN0IE5lb25BbmltYXRpb25SdW5uZXJCZWhhdmlvciA9CiAgICAgICAgW05lb25BbmltYXRhYmxlQ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IHRoZSBpbnRlcm5hbCByZWZlcmVuY2UuCiAgICAgICAgdGhpcy5fb2JzZXJ2ZXIgPSBkb20odGhpcykub2JzZXJ2ZU5vZGVzKGZ1bmN0aW9uKGluZm8pIHsKICAgICAgICAgIHRoaXMuX2luaXRTbG90dGVkSW5wdXQoKTsKICAgICAgICB9LmJpbmQodGhpcykpOwogICAgICB9LAoKICAgICAgZGV0YWNoZWQ6IGZ1bmN0aW9uKCkgewogICAgICAgIGlmICh0aGlzLl9vYnNlcnZlcikgewogICAgICAgICAgZG9tKHRoaXMpLnVub2JzZXJ2ZU5vZGVzKHRoaXMuX29ic2VydmVyKTsKICAgICAgICAgIHRoaXMuX29ic2VydmVyID0gbnVsbDsKICAgICAgICB9CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogUmV0dXJucyB0aGUgZGlzdHJpYnV0ZWQgaW5wdXQgZWxlbWVudC4KICAgICAgICovCiAgICAgIGdldCBpbnB1dEVsZW1lbnQoKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuX2lucHV0RWxlbWVudDsKICAgICAgfSwKCiAgICAgIF9pbml0U2xvdHRlZElucHV0OiBmdW5jdGlvbigpIHsKICAgICAgICB0aGlzLl9pbnB1dEVsZW1lbnQgPSB0aGlzLmdldEVmZmVjdGl2ZUNoaWxkcmVuKClbMF07CgogICAgICAgIGlmICh0aGlzLmlucHV0RWxlbWVudCAmJiB0aGlzLmlucHV0RWxlbWVudC52YWx1ZSkgewogICAgICAgICAgdGhpcy5iaW5kVmFsdWUgPSB0aGlzLmlucHV0RWxlbWVudC52YWx1ZTsKICAgICAgICB9CgogICAgICAgIHRoaXMuZmlyZSgnaXJvbi1pbnB1dC1yZWFkeScpOwogICAgICB9LAoKICAgICAgZ2V0IF9wYXR0ZXJuUmVnRXhwKCkgewogICAgICAgIHZhciBwYXR0ZXJuOwogICAgICAgIGlmICh0aGlzLmFsbG93ZWRQYXR0ZXJuKSB7CiAgICAgICAgICBwYXR0ZXJuID0gbmV3IFJl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ZSBicm93c2VyLgogICAgICAgIC8vIC0gbW9zdCBjb250cm9sIGNoYXJhY3RlcnMgKGFycm93cywgYmFja3NwYWNlKSBkbyBub3Qgc2VuZCBhIGBrZXlwcmVzc2AKICAgICAgICAvLyBldmVudAogICAgICAgIC8vICAgaW4gQ2hyb21lLCBidXQgdGhlICpkbyogb24gRmlyZWZveAogICAgICAgIC8vIC0gaW4gRmlyZWZveCwgd2hlbiB0aGV5IGRvIHNlbmQgYSBga2V5cHJlc3NgIGV2ZW50LCBjb250cm9sIGNoYXJzIGhhdmUKICAgICAgICAvLyAgIGEgY2hhckNvZGUgPSAwLCBrZXlDb2RlID0geHggKGZvciBleC4gNDAgZm9yIGRvd24gYXJyb3cpCiAgICAgICAgLy8gLSBwcmludGFibGUgY2hhcmFjdGVycyBhbHdheXMgc2VuZCBhIGtleXByZXNzIGV2ZW50LgogICAgICAgIC8vIC0gaW4gRmlyZWZveCwgcHJpbnRhYmxlIGNoYXJzIGFsd2F5cyBoYXZlIGEga2V5Q29kZSA9IDAuIEluIENocm9tZSwgdGhlCiAgICAgICAgLy8ga2V5Q29kZQogICAgICAgIC8vICAgYWx3YXlzIG1hdGNoZXMgdGhlIGNoYXJDb2RlLgogICAgICAgIC8vIE5vbmUgb2YgdGhpcyBtYWtlcyBhbnkgc2Vuc2UuCgogICAgICAgIC8vIEZvciB0aGVzZSBrZXlzLCBBU0NJSSBjb2RlID09IGJyb3dzZXIga2V5Y29kZS4KICAgICAgICB2YXIgYW55Tm9uUHJpbnRhYmxlID0gKGV2ZW50LmtleUNvZGUgPT0gOCkgfHwgIC8vIGJhY2tzcGFjZQogICAgICAgICAgICAoZXZlbnQua2V5Q29kZSA9PSA5KSB8fCAgICAgICAgICAgICAgICAgICAgLy8gdGFiCiAgICAgICAgICAgIChldmVudC5rZXlDb2RlID09IDEzKSB8fCAgICAgICAgICAgICAgICAgICAvLyBlbnRlcgogICAgICAgICAgICAoZXZlbnQua2V5Q29kZSA9PSAyNyk7ICAgICAgICAgICAgICAgICAgICAgLy8gZXNjYXBlCgogICAgICAgIC8vIEZvciB0aGVzZSBrZXlzLCBtYWtlIHN1cmUgaXQncyBhIGJyb3dzZXIga2V5Y29kZSBhbmQgbm90IGFuIEFTQ0lJIGNvZGUuCiAgICAgICAgdmFyIG1vek5vblByaW50YWJsZSA9IChldmVudC5rZXlDb2RlID09IDE5KSB8fCAgLy8gcGF1c2UKICAgICAgICAgICAgKGV2ZW50LmtleUNvZGUgPT0gMjApIHx8ICAgICAgICAgICAgICAgICAgICAvLyBjYXBzIGxvY2sKICAgICAgICAgICAgKGV2ZW50LmtleUNvZGUgPT0gNDUpIHx8ICAgICAgICAgICAgICAgICAgICAvLyBpbnNlcnQKICAgICAgICAgICAgKGV2ZW50LmtleUNvZGUgPT0gNDYpIHx8ICAgICAgICAgICAgICAgICAgICAvLyBkZWxldGUKICAgICAgICAgICAgKGV2ZW50LmtleUNvZGUgPT0gMTQ0KSB8fCAgICAgICAgICAgICAgICAgICAvLyBudW0gbG9jawogICAgICAgICAgICAoZXZlbnQua2V5Q29kZSA9PSAxNDUpIHx8ICAgICAgICAgICAgICAgICAgIC8vIHNjcm9sbCBsb2NrCiAgICAgICAgICAgIChldmVudC5rZXlDb2RlID4gMzIgJiYKICAgICAgICAgICAgIGV2ZW50LmtleUNvZGUgPCA0MSkgfHwgIC8vIHBhZ2UgdXAvZG93biwgZW5kLCBob21lLCBhcnJvd3MKICAgICAgICAgICAgKGV2ZW50LmtleUNvZGUgPiAxMTEgJiYgZXZlbnQua2V5Q29kZSA8IDEyNCk7ICAvLyBmbiBrZXlzCgogICAgICAgIHJldHVybiAhYW55Tm9uUHJpbnRhYmxlICYmICEoZXZlbnQuY2hhckNvZGUgPT0gMCAmJiBtb3pOb25QcmludGFibGUpOwogICAgICB9LAoKICAgICAgX29uS2V5cHJlc3M6IGZ1bmN0aW9uKGV2ZW50KSB7CiAgICAgICAgaWYgKCF0aGlzLmFsbG93ZWRQYXR0ZXJuICYmIHRoaXMuaW5wdXRFbGVtZW50LnR5cGUgIT09ICdudW1iZXInKSB7CiAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIHZhciByZWdleHAgPSB0aGlzLl9wYXR0ZXJuUmVnRXhwOwogICAgICAgIGlmICghcmVnZXhwKSB7CiAgICAgICAgICByZXR1cm47CiAgICAgICAgfQoKICAgICAgICAvLyBIYW5kbGUgc3BlY2lhbCBrZXlzIGFuZCBiYWNrc3BhY2UKICAgICAgICBpZiAoZXZlbnQubWV0YUtleSB8fCBldmVudC5jdHJsS2V5IHx8IGV2ZW50LmFsdEtleSkgewogICAgICAgICAgcmV0dXJuOwogICAgICAgIH0KCiAgICAgICAgLy8gQ2hlY2sgdGhlIHBhdHRlcm4gZWl0aGVyIGhlcmUgb3IgaW4gYF9vbklucHV0YCwgYnV0IG5vdCBpbiBib3RoLgogICAgICAgIHRoaXMuX3BhdHRlcm5BbHJlYWR5Q2hlY2tlZCA9IHRydWU7CgogICAgICAgIHZhciB0aGlzQ2hhciA9IFN0cmluZy5mcm9tQ2hhckNvZGUoZXZlbnQuY2hhckNvZGUpOwogICAgICAgIGlmICh0aGlzLl9pc1ByaW50YWJsZShldmVudCkgJiYgIXJlZ2V4cC50ZXN0KHRoaXNDaGFyKSkgewogICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTsKICAgICAgICAgIHRoaXMuX2Fubm91bmNlSW52YWxpZENoYXJhY3RlcigKICAgICAgICAgICAgICAnSW52YWxpZCBjaGFyYWN0ZXIgJyArIHRoaXNDaGFyICsgJyBub3QgZW50ZXJlZC4nKTsKICAgICAgICB9CiAgICAgIH0sCgogICAgICBfY2hlY2tQYXR0ZXJuVmFsaWRpdHk6IGZ1bmN0aW9uKCkgewogICAgICAgIHZhciByZWdleHAgPSB0aGlzLl9wYXR0ZXJuUmVnRXhwOwogICAgICAgIGlmICghcmVnZXhwKSB7CiAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICB9CiAgICAgICAgZm9yICh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ci1pbnB1dC1jb250YWluZXItaW52YWxpZC1jb2xvciwgdmFyKC0tZXJyb3ItY29sb3IpKTsKICAgICAgICAtd2Via2l0LXRyYW5zZm9ybTogbm9uZTsKICAgICAgICB0cmFuc2Zvcm06IG5vbmU7CiAgICAgICAgLXdlYmtpdC10cmFuc2l0aW9uOiAtd2Via2l0LXRyYW5zZm9ybSAwLjI1czsKICAgICAgICB0cmFuc2l0aW9uOiB0cmFuc2Zvcm0gMC4yNXM7CgogICAgICAgIEBhcHBseSAtLXBhcGVyLXRyYW5zaXRpb24tZWFzaW5nOwogICAgICB9CgogICAgICAudW5mb2N1c2VkLWxpbmUgewogICAgICAgIEBhcHBseSAtLWxheW91dC1maXQ7CiAgICAgICAgYm9yZGVyLWJvdHRvbTogMXB4IHNvbGlkIHZhcigtLXBhcGVyLWlucHV0LWNvbnRhaW5lci1jb2xvciwgdmFyKC0tc2Vjb25kYXJ5LXRleHQtY29sb3IpKTsKICAgICAgICBAYXBwbHkgLS1wYXBlci1pbnB1dC1jb250YWluZXItdW5kZXJsaW5lOwogICAgICB9CgogICAgICA6aG9zdChbZGlzYWJsZWRdKSAudW5mb2N1c2VkLWxpbmUgewogICAgICAgIGJvcmRlci1ib3R0b206IDFweCBkYXNoZWQ7CiAgICAgICAgYm9yZGVyLWNvbG9yOiB2YXIoLS1wYXBlci1pbnB1dC1jb250YWluZXItY29sb3IsIHZhcigtLXNlY29uZGFyeS10ZXh0LWNvbG9yKSk7CiAgICAgICAgQGFwcGx5IC0tcGFwZXItaW5wdXQtY29udGFpbmVyLXVuZGVybGluZS1kaXNhYmxlZDsKICAgICAgfQoKICAgICAgLmlucHV0LXdyYXBwZXIgewogICAgICAgIEBhcHBseSAtLWxheW91dC1ob3Jpem9udGFsOwogICAgICAgIEBhcHBseSAtLWxheW91dC1jZW50ZXI7CiAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlOwogICAgICB9CgogICAgICAuaW5wdXQtY29udGVudCB7CiAgICAgICAgQGFwcGx5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gICAgICAgICAgIHJldHVybiB0aGlzLl9vbkJsdXIuYmluZCh0aGlzKTsKICAgICAgICAgIH0KICAgICAgICB9LAoKICAgICAgICBfYm91bmRPbklucHV0OiB7CiAgICAgICAgICB0eXBlOiBGdW5jdGlvbiwKICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbigpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX29uSW5wdXQuYmluZCh0aGlzKTsKICAgICAgICAgIH0KICAgICAgICB9LAoKICAgICAgICBfYm91bmRWYWx1ZUNoYW5nZWQ6IHsKICAgICAgICAgIHR5cGU6IEZ1bmN0aW9uLAogICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fb25WYWx1ZUNoYW5nZWQuYmluZCh0aGlzKTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0sCgogICAgICBsaXN0ZW5lcnM6IHsKICAgICAgICAnYWRkb24tYXR0YWNoZWQnOiAnX29uQWRkb25BdHRhY2hlZCcsCiAgICAgICAgJ2lyb24taW5wdXQtdmFsaWRhdGUnOiAnX29uSXJvbklucHV0VmFsaWRhdGUnCiAgICAgIH0sCgogICAgICBnZXQgX3ZhbHVlQ2hhbmdlZEV2ZW50KCkgewogICAgICAgIHJldHVybiB0aGlzLmF0dHJGb3JWYWx1ZSArICctY2hhbmdlZCc7CiAgICAgIH0sCgogICAgICBnZXQgX3Byb3BlcnR5Rm9yVmFsdWUoKSB7CiAgICAgICAgcmV0dXJuIGRhc2hUb0NhbWVsQ2FzZSh0aGlzLmF0dHJGb3JWYWx1ZSk7CiAgICAgIH0sCgogICAgICBnZXQgX2lucHV0RWxlbWVudCgpIHsKICAgICAgICByZXR1cm4gZG9tKHRoaXMpLnF1ZXJ5U2VsZWN0b3IodGhpcy5faW5wdXRTZWxlY3Rvcik7CiAgICAgIH0sCgogICAgICBnZXQgX2lucHV0RWxlbWVudFZhbHVlKCkgewogICAgICAgIHJldHVybiB0aGl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aWQnOwogICAgICAgICAgICB9IGVsc2UgaWYgKGZvY3VzZWQpIHsKICAgICAgICAgICAgICBjbHMgKz0gJyBsYWJlbC1pcy1oaWdobGlnaHRlZCc7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIC8vIFdoZW4gdGhlIGxhYmVsIGlzIG5vdCBmbG9hdGluZywgaXQgc2hvdWxkIG92ZXJsYXAgdGhlIGlucHV0IGVsZW1lbnQuCiAgICAgICAgICAgIGlmIChsYWJlbCkgewogICAgICAgICAgICAgIHRoaXMuJC5sYWJlbEFuZElucHV0Q29udGFpbmVyLnN0eWxlLnBvc2l0aW9uID0gJ3JlbGF0aXZlJzsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoaW52YWxpZCkgewogICAgICAgICAgICAgIGNscyArPSAnIGlzLWludmFsaWQnOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgIGlmIChfaW5wdXRIYXNDb250ZW50KSB7CiAgICAgICAgICAgIGNscyArPSAnIGxhYmVsLWlzLWhpZGRlbic7CiAgICAgICAgICB9CiAgICAgICAgICBpZiAoaW52YWxpZCkgewogICAgICAgICAgICBjbHMgKz0gJyBpcy1pbnZhbGlkJzsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaWYgKGZvY3VzZWQpIHsKICAgICAgICAgIGNscyArPSAnIGZvY3VzZWQnOwogICAgICAgIH0KICAgICAgICByZXR1cm4gY2xzOwogICAgICB9LAoKICAgICAgLyoqIEBwcml2YXRlICovCiAgICAgIF9jb21wdXRlVW5kZXJsaW5lQ2xhc3M6IGZ1bmN0aW9uKGZvY3VzZWQsIGludmFsaWQpIHsKICAgICAgICB2YXIgY2xzID0gJ3VuZGVybGluZSc7CiAgICAgICAgaWYgKGludmFsaWQpIHsKICAgICAgICAgIGNscyArPSAnIGlzLWludmFsaWQnOwogICAgICAgIH0gZWxzZSBpZiAoZm9jdXNlZCkg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b24sIHNlZToKICAgIGh0dHBzOi8vd3d3LnczLm9yZy9UUi9hY2NuYW1lLTEuMS8jbWFwcGluZ19hZGRpdGlvbmFsX25kX2Rlc2NyaXB0aW9uCiAgICAtLT4KICAgIDxkaXYgaWQ9ImExMXlXcmFwcGVyIj4KICAgICAgPHNsb3Q+PC9zbG90PgogICAgPC9kaXY+CmAsCgogICAgICBpczogJ3BhcGVyLWlucHV0LWVycm9yJywKICAgICAgYmVoYXZpb3JzOiBbUGFwZXJJbnB1dEFkZG9uQmVoYXZpb3JdLAoKICAgICAgcHJvcGVydGllczogewogICAgICAgIC8qKgogICAgICAgICAqIFRydWUgaWYgdGhlIGVycm9yIGlzIHNob3dpbmcuCiAgICAgICAgICovCiAgICAgICAgaW52YWxpZDoge3JlYWRPbmx5OiB0cnVlLCByZWZsZWN0VG9BdHRyaWJ1dGU6IHRydWUsIHR5cGU6IEJvb2xlYW59CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogVGhpcyBvdmVycmlkZXMgdGhlIHVwZGF0ZSBmdW5jdGlvbiBpbiBQYXBlcklucHV0QWRkb25CZWhhdmlvci4KICAgICAgICogQHBhcmFtIHt7CiAgICAgICAqICAgaW5wdXRFbGVtZW50OiAoRWxlbWVudHx1bmRlZmluZWQpLAogICAgICAgKiAgIHZhbHVlOiAoc3RyaW5nfHVuZGVmaW5lZCksCiAgICAgICAqICAgaW52YWxpZDogYm9vbGVhbgogICAgICAgKiB9fSBzdGF0ZSAtCiAgICAgICAqICAgICBpbnB1dEVsZW1lbnQ6IFRoZSBpbnB1dCBlbGVtZW50LgogICAgICAgKiAgICAgdmFsdWU6IFRoZSBpbnB1dCB2YWx1ZS4KICAgICAgICogICAgIGludmFsaWQ6IFRydWUgaWYgdGhlIGlucHV0IHZhbHVlIGlzIGludmFsaWQuCiAgICAgICAqLwogICAgICB1cGRhdGU6IGZ1bmN0aW9uKHN0YXRlKSB7CiAgICAgICAgdGhpcy5fc2V0SW52YWxpZChzdGF0ZS5pb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zYWdlOiB7dHlwZTogU3RyaW5nfSwKCiAgICAgICAgLyoqCiAgICAgICAgICogU2V0IHRvIHRydWUgdG8gc2hvdyBhIGNoYXJhY3RlciBjb3VudGVyLgogICAgICAgICAqLwogICAgICAgIGNoYXJDb3VudGVyOiB7dHlwZTogQm9vbGVhbiwgdmFsdWU6IGZhbHNlfSwKCiAgICAgICAgLyoqCiAgICAgICAgICogU2V0IHRvIHRydWUgdG8gZGlzYWJsZSB0aGUgZmxvYXRpbmcgbGFiZWwuIElmIHlvdSdyZSB1c2luZwogICAgICAgICAqIFBhcGVySW5wdXRCZWhhdmlvciB0byBpbXBsZW1lbnQgeW91ciBvd24gcGFwZXItaW5wdXQtbGlrZSBlbGVtZW50LCBiaW5kCiAgICAgICAgICogdGhpcyB0byB0aGUgYDxwYXBlci1pbnB1dC1jb250YWluZXI+YCdzIGBub0xhYmVsRmxvYXRgIHByb3BlcnR5LgogICAgICAgICAqLwogICAgICAgIG5vTGFiZWxGbG9hdDoge3R5cGU6IEJvb2xlYW4sIHZhbHVlOiBmYWxzZX0sCgogICAgICAgIC8qKgogICAgICAgICAqIFNldCB0byB0cnVlIHRvIGFsd2F5cyBmbG9hdCB0aGUgbGFiZWwuIElmIHlvdSdyZSB1c2luZyBQYXBlcklucHV0QmVoYXZpb3IKICAgICAgICAgKiB0byBpbXBsZW1lbnQgeW91ciBvd24gcGFwZXItaW5wdXQtbGlrZSBlbGVtZW50LCBiaW5kIHRoaXMgdG8gdGhlCiAgICAgICAgICogYDxwYXBlci1pbnB1dC1jb250YWluZXI+YCdzIGBhbHdheXNGbG9hdExhYmVsYCBwcm9wZXJ0eS4KICAgICAgICAgKi8KICAgICAgICBhbHdheXNGbG9hdExhYmVsOiB7dHlwZTogQm9vbGVhbiwgdmFsdWU6IGZhbHNlfSwKCiAgICAgICAgLyoqCiAgICAgICAgICogU2V0IHRvIHRydWUgdG8gYXV0by12YWxpZGF0ZSB0aGUgaW5wdXQgdmFsdWUuIElmIHlvdSdyZSB1c2luZwogICAgICAgICAqIFBhcGVySW5wdXRCZWhhdmlvciB0byBpbXBsZW1lbnQgeW91ciBvd24gcGFwZXItaW5wdXQtbGlrZSBlbGVtZW50LCBiaW5kCiAgICAgICAgICogdGhpcyB0byB0aGUgYDxwYXBlci1pbnB1dC1jb250YWluZXI+YCdzIGBhdXRvVmFsaWRhdGVgIHByb3BlcnR5LgogICAgICAgICAqLwogICAgICAgIGF1dG9WYWxpZGF0ZToge3R5cGU6IEJvb2xlYW4sIHZhbHVlOiBmYWxzZX0sCgogICAgICAgIC8qKgogICAgICAgICAqIE5hbWUgb2YgdGhlIHZhbGlkYXRvciB0byB1c2UuIElmIHlvdSdyZSB1c2luZyBQYXBlcklucHV0QmVoYXZpb3IgdG8KICAgICAgICAgKiBpbXBsZW1lbnQgeW91ciBvd24gcGFwZXItaW5wdXQtbGlrZSBlbGVtZW50LCBiaW5kIHRoaXMgdG8KICAgICAgICAgKiB0aGUgYDxpbnB1dCBpcz0iaXJvbi1pbnB1dCI+YCdzIGB2YWxpZGF0b3JgIHByb3BlcnR5LgogICAgICAgICAqLwogICAgICAgIHZhbGlkYXRvcjoge3R5cGU6IFN0cmluZ30sCgogICAgICAgIC8vIEhUTUxJbnB1dEVsZW1lbnQgYXR0cmlidXRlcyBmb3IgYmluZGluZyBpZiBuZWVkZWQKCiAgICAgICAgLyoqCiAgICAgICAgICogSWYgeW91J3JlIHVzaW5nIFBhcGVySW5wdXRCZWhhdmlvciB0byBpbXBsZW1lbnQgeW91ciBvd24gcGFwZXItaW5wdXQtbGlrZQogICAgICAgICAqIGVsZW1lbnQsIGJpbmQgdGhpcyB0byB0aGUgYDxpbnB1dCBpcz0iaXJvbi1pbnB1dCI+YCdzIGBhdXRvY29tcGxldGVgCiAgICAgICAgICogcHJvcGVydHkuCiAgICAgICAgICovCiAgICAgICAgYXV0b2NvbXBsZXRlOiB7dHlwZTogU3RyaW5nLCB2YWx1ZTogJ29mZid9LAoKICAgICAgICAvKioKICAgICAgICAgKiBJZiB5b3UncmUgdXNpbmcgUGFwZXJJbnB1dEJlaGF2aW9yIHRvIGltcGxlbWVudCB5b3VyIG93biBwYXBlci1pbnB1dC1saWtlCiAgICAgICAgICogZWxlbWVudCwgYmluZCB0aGlzIHRvIHRoZSBgPGlucHV0IGlzPSJpcm9uLWlucHV0Ij5gJ3MgYGF1dG9mb2N1c2AKICAgICAgICAgKiBwcm9wZXJ0eS4KICAgICAgICAgKgogICAgICAgICAqIEB0eXBlIHshYm9vbGVhbn0KICAgICAgICAgKi8KICAgICAgICBhdXRvZm9jdXM6IHt0eXBlOiBCb29sZWFuLCBvYnNlcnZlcjogJ19hdXRvZm9jdXNDaGFuZ2VkJ30sCgogICAgICAgIC8qKgogICAgICAgICAqIElmIHlvdSdyZSB1c2luZyBQYXBlcklucHV0QmVoYXZpb3IgdG8gaW1wbGVtZW50IHlvdXIgb3duIHBhcGVyLWlucHV0LWxpa2UKICAgICAgICAgKiBlbGVtZW50LCBiaW5kIHRoaXMgdG8gdGhlIGA8aW5wdXQgaXM9Imlyb24taW5wdXQiPmAncyBgaW5wdXRtb2RlYAogICAgICAgICAqIHByb3BlcnR5LgogICAgICAgICAqLwogICAgICAgIGlucHV0bW9kZToge3R5cGU6IFN0cmluZ30sCgogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBtaW5pbXVtIGxlbmd0aCBvZiB0aGUgaW5wdXQgdmFsdWUuCiAgICAgICAgICogSWYgeW91J3JlIHVzaW5nIFBhcGVySW5wdXRCZWhhdmlvciB0byBpbXBsZW1lbnQgeW91ciBvd24gcGFwZXItaW5wdXQtbGlrZQogICAgICAgICAqIGVsZW1lbnQsIGJpbmQgdGhpcyB0byB0aGUgYDxpbnB1dCBpcz0iaXJvbi1pbnB1dCI+YCdzIGBtaW5sZW5ndGhgCiAgICAgICAgICogcHJvcGVydHkuCiAgICAgICAgICovCiAgICAgICAgbWlubGVuZ3RoOiB7dHlwZTogTnVtYmVyfSwKCiAgICAgICAgLyoqCiAgICA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V0Ij5gJ3MgYG1heGAgcHJvcGVydHkuCiAgICAgICAgICovCiAgICAgICAgbWF4OiB7dHlwZTogU3RyaW5nfSwKCiAgICAgICAgLyoqCiAgICAgICAgICogTGltaXRzIHRoZSBudW1lcmljIG9yIGRhdGUtdGltZSBpbmNyZW1lbnRzLgogICAgICAgICAqIElmIHlvdSdyZSB1c2luZyBQYXBlcklucHV0QmVoYXZpb3IgdG8gaW1wbGVtZW50IHlvdXIgb3duIHBhcGVyLWlucHV0LWxpa2UKICAgICAgICAgKiBlbGVtZW50LCBiaW5kIHRoaXMgdG8gdGhlIGA8aW5wdXQgaXM9Imlyb24taW5wdXQiPmAncyBgc3RlcGAgcHJvcGVydHkuCiAgICAgICAgICovCiAgICAgICAgc3RlcDoge3R5cGU6IFN0cmluZ30sCgogICAgICAgIC8qKgogICAgICAgICAqIElmIHlvdSdyZSB1c2luZyBQYXBlcklucHV0QmVoYXZpb3IgdG8gaW1wbGVtZW50IHlvdXIgb3duIHBhcGVyLWlucHV0LWxpa2UKICAgICAgICAgKiBlbGVtZW50LCBiaW5kIHRoaXMgdG8gdGhlIGA8aW5wdXQgaXM9Imlyb24taW5wdXQiPmAncyBgbmFtZWAgcHJvcGVydHkuCiAgICAgICAgICovCiAgICAgICAgbmFtZToge3R5cGU6IFN0cmluZ30sCgogICAgICAgIC8qKgogICAgICAgICAqIEEgcGxhY2Vob2xkZXIgc3RyaW5nIGluIGFkZGl0aW9uIHRvIHRoZSBsYWJlbC4gSWYgdGhpcyBpcyBzZXQsIHRoZSBsYWJlbAogICAgICAgICAqIHdpbGwgYWx3YXlzIGZsb2F0LgogICAgICAgICAqLwogICAgICAgIHBsYWNlaG9sZGVyOiB7CiAgICAgICAgICB0eXBlOiBTdHJpbmcsCiAgICAgICAgICAvLyBuZWVkIHRvIHNldCBhIGRlZmF1bHQgc28gX2NvbXB1dGVBbHdheXNGbG9hdExhYmVsIGlzIHJ1bgogICAgICAgICAgdmFsdWU6ICcnCiAgICAgICAgfSwKCiAgICAgICAgLyoqCiAgICAgICAgICogSWYgeW91J3JlIHVzaW5nIFBhcGVySW5wdXRCZWhhdmlvciB0byBpbXBsZW1lbnQgeW91ciBvd24gcGFwZXItaW5wdXQtbGlrZQogICAgICAgICAqIGVsZW1lbnQsIGJpbmQgdGhpcyB0byB0aGUgYDxpbnB1dCBpcz0iaXJvbi1pbnB1dCI+YCdzIGByZWFkb25seWAKICAgICAgICAgKiBwcm9wZXJ0eS4KICAgICAgICAgKi8KICAgICAgICByZWFkb25seToge3R5cGU6IEJvb2xlYW4sIHZhbHVlOiBmYWxzZX0sCgogICAgICAgIC8qKgogICAgICAgICAqIElmIHlvdSdyZSB1c2luZyBQYXBlcklucHV0QmVoYXZpb3IgdG8gaW1wbGVtZW50IHlvdXIgb3duIHBhcGVyLWlucHV0LWxpa2UKICAgICAgICAgKiBlbGVtZW50LCBiaW5kIHRoaXMgdG8gdGhlIGA8aW5wdXQgaXM9Imlyb24taW5wdXQiPmAncyBgc2l6ZWAgcHJvcGVydHkuCiAgICAgICAgICovCiAgICAgICAgc2l6ZToge3R5cGU6IE51bWJlcn0sCgogICAgICAgIC8vIE5vbnN0YW5kYXJkIGF0dHJpYnV0ZXMgZm9yIGJpbmRpbmcgaWYgbmVlZGVkCgogICAgICAgIC8qKgogICAgICAgICAqIElmIHlvdSdyZSB1c2luZyBQYXBlcklucHV0QmVoYXZpb3IgdG8gaW1wbGVtZW50IHlvdXIgb3duIHBhcGVyLWlucHV0LWxpa2UKICAgICAgICAgKiBlbGVtZW50LCBiaW5kIHRoaXMgdG8gdGhlIGA8aW5wdXQgaXM9Imlyb24taW5wdXQiPmAncyBgYXV0b2NhcGl0YWxpemVgCiAgICAgICAgICogcHJvcGVydHkuCiAgICAgICAgICoKICAgICAgICAgKiBAdHlwZSB7c3RyaW5nfQogICAgICAgICAqLwogICAgICAgIGF1dG9jYXBpdGFsaXplOiB7dHlwZTogU3RyaW5nLCB2YWx1ZTogJ25vbmUnfSwKCiAgICAgICAg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wbGVtZW50IHlvdXIgb3duIHBhcGVyLWlucHV0LWxpa2UKICAgICAgICAgKiBlbGVtZW50LCBiaW5kIHRoaXMgdG8gdGhlIGA8aW5wdXQgaXM9Imlyb24taW5wdXQiPmAncyBgYWNjZXB0YCBwcm9wZXJ0eSwKICAgICAgICAgKiB1c2VkIHdpdGggdHlwZT1maWxlLgogICAgICAgICAqLwogICAgICAgIGFjY2VwdDoge3R5cGU6IFN0cmluZ30sCgogICAgICAgIC8qKgogICAgICAgICAqIElmIHlvdSdyZSB1c2luZyBQYXBlcklucHV0QmVoYXZpb3IgdG8gaW1wbGVtZW50IHlvdXIgb3duIHBhcGVyLWlucHV0LWxpa2UKICAgICAgICAgKiBlbGVtZW50LCBiaW5kIHRoaXMgdG8gdGhlYDxpbnB1dCBpcz0iaXJvbi1pbnB1dCI+YCdzIGBtdWx0aXBsZWAgcHJvcGVydHksCiAgICAgICAgICogdXNlZCB3aXRoIHR5cGU9ZmlsZS4KICAgICAgICAgKi8KICAgICAgICBtdWx0aXBsZToge3R5cGU6IEJvb2xlYW59LAoKICAgICAgICAvKiogQHByaXZhdGUgKi8KICAgICAgICBfYXJpYURlc2NyaWJlZEJ5OiB7dHlwZTogU3RyaW5nLCB2YWx1ZTogJyd9LAoKICAgICAgICAvKiogQHByaXZhdGUgKi8KICAgICAgICBfYXJpYUxhYmVsbGVkQnk6IHt0eXBlOiBTdHJpbmcsIHZhbHVlOiAnJ30sCgogICAgICAgIC8qKiBAcHJpdmF0ZSAqLwogICAgICAgIF9pbnB1dElkOiB7dHlwZTogU3RyaW5nLCB2YWx1ZTogJyd9CiAgICAgIH0sCgogICAgICBsaXN0ZW5lcnM6IHsKICAgICAgICAnYWRkb24tYXR0YWNoZWQnOiAnX29uQWRkb25BdHRhY2hlZCcsCiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogQHR5cGUgeyFPYmplY3R9CiAgICAgICAqLwogICAgICBrZXlCaW5kaW5nczogeydzaGlmdCt0YWI6a2V5ZG93bic6ICdfb25TaGlmdFRhYkRvd24nfSwKCiAgICAgIC8qKiBAcHJpdmF0ZSAqLwogICAgICBob3N0QXR0cmlidXRlczoge3RhYmluZGV4OiAwfSwKCiAgICAgIC8qKgogICAgICAgKiBSZXR1cm5zIGEgcmVmZXJlbmNlIHRvIHRoZSBpbnB1dCBlbGVtZW50LgogICAgICAgKiBAcmV0dXJuIHshSFRNTEVsZW1lbnR9CiAgICAgICAqLwogICAgICBnZXQgaW5wdXRFbGVtZW50KCkgewogICAgICAgIC8vIENocm9tZSBnZW5lcmF0ZXMgYXVkaXQgZXJyb3JzIGlmIGFuIDxpbnB1dCB0eXBlPSJwYXNzd29yZCI+IGhhcyBhCiAgICAgICAgLy8gZHVwbGljYXRlIElELCB3aGljaCBpcyBhbG1vc3QgYWx3YXlzIHRydWUgaW4gU2hhZHkgRE9NLiBHZW5lcmF0ZQogICAgICAgIC8vIGEgdW5pcXVlIElEIGluc3RlYWQuCiAgICAgICAgaWYgKCF0aGlzLiQpIHsKICAgICAgICAgIHRoaXMuJCA9IHt9OwogICAgICAgIH0KICAgICAgICBpZiAoIXRoaXMuJC5pbnB1dCkgewogICAgICAgICAgdGhpcy5fZ2VuZXJhdGVJbnB1dElkKCk7CiAgICAgICAgICB0aGlzLiQuaW5wdXQgPSB0aGlzLiQkKCcjJyArIHRoaXMuX2lucHV0SWQpOwogICAgICAgIH0KICAgICAgICByZXR1cm4gdGhpcy4kLmlucHV0OwogICAgICB9LAoKICAgICAgLyoqCiAgICAgICAqIFJldHVybnMgYSByZWZlcmVuY2UgdG8gdGhlIGZvY3VzYWJsZSBlbGVtZW50LgogICAgICAgKiBAcmV0dXJuIHshSFRNTEVsZW1lbnR9CiAgICAgICAqLwogICAgICBnZXQgX2ZvY3VzYWJsZUVsZW1lbnQoKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuaW5wdXRFbGVtZW50OwogICAgICB9LAoKICAgICAgLyoqIEBvdmVycmlkZSAqLwogICAgICBjcmVhdGVkOiBm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IF9hcHBlbmRTdHJpbmdXaXRoU3BhY2U6IGZ1bmN0aW9uKHN0ciwgbW9yZSkgewogICAgICAgIGlmIChzdHIpIHsKICAgICAgICAgIHN0ciA9IHN0ciArICcgJyArIG1vcmU7CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgIHN0ciA9IG1vcmU7CiAgICAgICAgfQogICAgICAgIHJldHVybiBzdHI7CiAgICAgIH0sCgogICAgICBfb25BZGRvbkF0dGFjaGVkOiBmdW5jdGlvbihldmVudCkgewogICAgICAgIHZhciB0YXJnZXQgPSBkb20oZXZlbnQpLnJvb3RUYXJnZXQ7CiAgICAgICAgaWYgKHRhcmdldC5pZCkgewogICAgICAgICAgdGhpcy5fYXJpYURlc2NyaWJlZEJ5ID0KICAgICAgICAgICAgICB0aGlzLl9hcHBlbmRTdHJpbmdXaXRoU3BhY2UodGhpcy5fYXJpYURlc2NyaWJlZEJ5LCB0YXJnZXQuaWQpOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICB2YXIgaWQgPSAncGFwZXItaW5wdXQtYWRkLW9uLScgKyBQYXBlcklucHV0SGVscGVyLk5leHRBZGRvbklEKys7CiAgICAgICAgICB0YXJnZXQuaWQgPSBpZDsKICAgICAgICAgIHRoaXMuX2FyaWFEZXNjcmliZWRCeSA9CiAgICAgICAgICAgICAgdGhpcy5fYXBwZW5kU3RyaW5nV2l0aFNwYWNlKHRoaXMuX2FyaWFEZXNjcmliZWRCeSwgaWQpOwogICAgICAgIH0KICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgKiBWYWxpZGF0ZXMgdGhlIGlucHV0IGVsZW1lbnQgYW5kIHNldHMgYW4gZXJyb3Igc3R5bGUgaWYgbmVlZGVkLgogICAgICAgKgogICAgICAgKiBAcmV0dXJuIHtib29sZWFufQogICAgICAgKi8KICAgICAgdmFsaWRhdGU6IGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiB0aGlzLmlucHV0RWxlbWVudC52YWxpZGF0ZSgpOwogICAgIC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YmVsSUQrKzsKICAgICAgICAgIGxhYmVsLmlkID0gbGFiZWxsZWRCeTsKICAgICAgICB9CiAgICAgICAgdGhpcy5fYXJpYUxhYmVsbGVkQnkgPSBsYWJlbGxlZEJ5OwogICAgICB9LAoKICAgICAgX2dlbmVyYXRlSW5wdXRJZDogZnVuY3Rpb24oKSB7CiAgICAgICAgaWYgKCF0aGlzLl9pbnB1dElkIHx8IHRoaXMuX2lucHV0SWQgPT09ICcnKSB7CiAgICAgICAgICB0aGlzLl9pbnB1dElkID0gJ2lucHV0LScgKyBQYXBlcklucHV0SGVscGVyLk5leHRJbnB1dElEKys7CiAgICAgICAgfQogICAgICB9LAoKICAgICAgX29uQ2hhbmdlOiBmdW5jdGlvbihldmVudCkgewogICAgICAgIC8vIEluIHRoZSBTaGFkb3cgRE9NLCB0aGUgYGNoYW5nZWAgZXZlbnQgaXMgbm90IGxlYWtlZCBpbnRvIHRoZQogICAgICAgIC8vIGFuY2VzdG9yIHRyZWUsIHNvIHdlIG11c3QgZG8gdGhpcyBtYW51YWxseS4KICAgICAgICAvLyBTZWUKICAgICAgICAvLyBodHRwczovL3czYy5naXRodWIuaW8vd2ViY29tcG9uZW50cy9zcGVjL3NoYWRvdy8jZXZlbnRzLXRoYXQtYXJlLW5vdC1sZWFrZWQtaW50by1hbmNlc3Rvci10cmVlcy4KICAgICAgICBpZiAodGhpcy5zaGFkb3dSb290KSB7CiAgICAgICAgICB0aGlzLmZpcmUoCiAgICAgICAgICAgICAgZXZlbnQudHlwZSwKICAgICAgICAgICAgICB7c291cmNlRXZlbnQ6IGV2ZW50fSwKICAgICAgICAgICAgICB7bm9kZTogdGhpcywgYnViYmxlczogZXZlbnQuYnViYmxlcywgY2FuY2VsYWJsZTogZXZlbnQuY2FuY2VsYWJsZX0pOwogICAgICAgIH0KICAgICAgfSwKCiAgICAgIF9hdXRvZm9jdXNDaGFuZ2VkOiBmdW5jdGlvbigpIHsKICAgICAgICAvLyBGaXJlZm94IGRvZXNuJ3Qg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gICAgZm9udC1mYW1pbHk6IGluaGVyaXQ7CiAgICAgICAgZm9udC13ZWlnaHQ6IGluaGVyaXQ7CiAgICAgICAgZm9udC1zaXplOiBpbmhlcml0OwogICAgICAgIGxldHRlci1zcGFjaW5nOiBpbmhlcml0OwogICAgICAgIHdvcmQtc3BhY2luZzogaW5oZXJpdDsKICAgICAgICBsaW5lLWhlaWdodDogaW5oZXJpdDsKICAgICAgICB0ZXh0LXNoYWRvdzogaW5oZXJpdDsKICAgICAgICBjb2xvcjogaW5oZXJpdDsKICAgICAgICBjdXJzb3I6IGluaGVyaXQ7CiAgICAgIH0KCiAgICAgIGlucHV0OmRpc2FibGVkIHsKICAgICAgICBAYXBwbHkgLS1wYXBlci1pbnB1dC1jb250YWluZXItaW5wdXQtZGlzYWJsZWQ7CiAgICAgIH0KCiAgICAgIGlucHV0Ojotd2Via2l0LW91dGVyLXNwaW4tYnV0dG9uLAogICAgICBpbnB1dDo6LXdlYmtpdC1pbm5lci1zcGluLWJ1dHRvbiB7CiAgICAgICAgQGFwcGx5IC0tcGFwZXItaW5wdXQtY29udGFpbmVyLWlucHV0LXdlYmtpdC1zcGlubmVyOwogICAgICB9CgogICAgICBpbnB1dDo6LXdlYmtpdC1jbGVhci1idXR0b24gewogICAgICAgIEBhcHBseSAtLXBhcGVyLWlucHV0LWNvbnRhaW5lci1pbnB1dC13ZWJraXQtY2xlYXI7CiAgICAgIH0KCiAgICAgIGlucHV0Ojotd2Via2l0LWNhbGVuZGFyLXBpY2tlci1pbmRpY2F0b3IgewogICAgICAgIEBhcHBseSAtLXBhcGVyLWlucHV0LWNvbnRhaW5lci1pbnB1dC13ZWJraXQtY2FsZW5kYXItcGlja2VyLWluZGljYXRvcjsKICAgICAgfQoKICAgICAgaW5wdXQ6Oi13ZWJraXQtaW5wdXQtcGxhY2Vob2xkZXIgewogICAgICAgIGNvbG9yOiB2YXIoLS1wYXBlci1pbnB1dC1jb250YWluZXItY29sb3IsIHZhcigtLXNlY29uZGFyeS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aW5wdXQtY2hhci1jb3VudGVyPgogICAgICA8L3RlbXBsYXRlPgoKICAgIDwvcGFwZXItaW5wdXQtY29udGFpbmVyPgogIGAsCgogICAgICBiZWhhdmlvcnM6IFtQYXBlcklucHV0QmVoYXZpb3IsIElyb25Gb3JtRWxlbWVudEJlaGF2aW9yXSwKCiAgICAgIHByb3BlcnRpZXM6IHsKICAgICAgICB2YWx1ZTogewogICAgICAgICAgLy8gUmVxdWlyZWQgZm9yIHRoZSBjb3JyZWN0IFR5cGVTY3JpcHQgdHlwZS1nZW5lcmF0aW9uCiAgICAgICAgICB0eXBlOiBTdHJpbmcKICAgICAgICB9LAoKICAgICAgICBpbnB1dFJvbGU6IHsKICAgICAgICAgIHR5cGU6IFN0cmluZywKICAgICAgICAgIHZhbHVlOiB1bmRlZmluZWQsCiAgICAgICAgfSwKCiAgICAgICAgaW5wdXRBcmlhSGFzcG9wdXA6IHsKICAgICAgICAgIHR5cGU6IFN0cmluZywKICAgICAgICAgIHZhbHVlOiB1bmRlZmluZWQsCiAgICAgICAgfSwKICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgKiBSZXR1cm5zIGEgcmVmZXJlbmNlIHRvIHRoZSBmb2N1c2FibGUgZWxlbWVudC4gT3ZlcnJpZGRlbiBmcm9tCiAgICAgICAqIFBhcGVySW5wdXRCZWhhdmlvciB0byBjb3JyZWN0bHkgZm9jdXMgdGhlIG5hdGl2ZSBpbnB1dC4KICAgICAgICoKICAgICAgICogQHJldHVybiB7IUhUTUxFbGVtZW50fQogICAgICAgKi8KICAgICAgZ2V0IF9mb2N1c2FibGVFbGVtZW50KCkgewogICAgICAgIHJldHVybiB0aGlzLmlucHV0RWxlbWVudC5faW5wdXRFbGVtZW50OwogICAgICB9LAoKICAgICAgLy8gTm90ZTogVGhpcyBldmVudCBpcyBvbmx5IGF2YWlsYWJsZSBpbiB0aGUgMS4wIHZlcnNpb24gb2YgdGhpcyBlbGVtZW50LgogICAgICAvLyBJbiAyLjAsIHRoZS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gX3RlbXBsYXRlOiBodG1sYAogICAgPHN0eWxlPgogICAgICA6aG9zdCB7CiAgICAgICAgcG9zaXRpb246IGZpeGVkOwogICAgICB9CgogICAgICAjY29udGVudFdyYXBwZXIgOjpzbG90dGVkKCopIHsKICAgICAgICBvdmVyZmxvdzogYXV0bzsKICAgICAgfQoKICAgICAgI2NvbnRlbnRXcmFwcGVyLmFuaW1hdGluZyA6OnNsb3R0ZWQoKikgewogICAgICAgIG92ZXJmbG93OiBoaWRkZW47CiAgICAgICAgcG9pbnRlci1ldmVudHM6IG5vbmU7CiAgICAgIH0KICAgIDwvc3R5bGU+CgogICAgPGRpdiBpZD0iY29udGVudFdyYXBwZXIiPgogICAgICA8c2xvdCBpZD0iY29udGVudCIgbmFtZT0iZHJvcGRvd24tY29udGVudCI+PC9zbG90PgogICAgPC9kaXY+CmAsCgogICAgICBpczogJ2lyb24tZHJvcGRvd24nLAoKICAgICAgYmVoYXZpb3JzOiBbCiAgICAgICAgSXJvbkNvbnRyb2xTdGF0ZSwKICAgICAgICBJcm9uQTExeUtleXNCZWhhdmlvciwKICAgICAgICBJcm9uT3ZlcmxheUJlaGF2aW9yLAogICAgICAgIE5lb25BbmltYXRpb25SdW5uZXJCZWhhdmlvcgogICAgICBdLAoKICAgICAgcHJvcGVydGllczogewogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBvcmllbnRhdGlvbiBhZ2FpbnN0IHdoaWNoIHRvIGFsaWduIHRoZSBkcm9wZG93biBjb250ZW50CiAgICAgICAgICogaG9yaXpvbnRhbGx5IHJlbGF0aXZlIHRvIHRoZSBkcm9wZG93biB0cmlnZ2VyLgogICAgICAgICAqIE92ZXJyaWRkZW4gZnJvbSBgUG9seW1lci5Jcm9uRml0QmVoYXZpb3JgLgogICAgICAgICAqLwogICAgICAgIGhvcml6b250YWxBbGlnbjoge3R5cGU6IFN0cmluZywgdmFsdWU6ICdsZWZ0JywgcmVmbGVjdFRvQXR0cmlidXRlOiB0cnVlfSwKCiAgICA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2VzcyBvZiBvcGVuaW5nIG9yCiAgICAgICAqIGNsb3NpbmcgdGhlIGRyb3Bkb3duIGJ5IHBvc2l0aW9uaW5nIGl0IG9yIHNldHRpbmcgaXRzIGRpc3BsYXkgdG8KICAgICAgICogbm9uZS4KICAgICAgICovCiAgICAgIF9vbk5lb25BbmltYXRpb25GaW5pc2g6IGZ1bmN0aW9uKCkgewogICAgICAgIHRoaXMuJC5jb250ZW50V3JhcHBlci5jbGFzc0xpc3QucmVtb3ZlKCdhbmltYXRpbmcnKTsKICAgICAgICBpZiAodGhpcy5vcGVuZWQpIHsKICAgICAgICAgIHRoaXMuX2ZpbmlzaFJlbmRlck9wZW5lZCgpOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICB0aGlzLl9maW5pc2hSZW5kZXJDbG9zZWQoKTsKICAgICAgICB9CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogQ29uc3RydWN0cyB0aGUgZmluYWwgYW5pbWF0aW9uIGNvbmZpZyBmcm9tIGRpZmZlcmVudCBwcm9wZXJ0aWVzIHVzZWQKICAgICAgICogdG8gY29uZmlndXJlIHNwZWNpZmljIHBhcnRzIG9mIHRoZSBvcGVuaW5nIGFuZCBjbG9zaW5nIGFuaW1hdGlvbnMuCiAgICAgICAqLwogICAgICBfdXBkYXRlQW5pbWF0aW9uQ29uZmlnOiBmdW5jdGlvbigpIHsKICAgICAgICAvLyBVcGRhdGUgdGhlIGFuaW1hdGlvbiBub2RlIHRvIGJlIHRoZSBjb250YWluZWRFbGVtZW50LgogICAgICAgIHZhciBhbmltYXRpb25Ob2RlID0gdGhpcy5jb250YWluZWRFbGVtZW50OwogICAgICAgIHZhciBhbmltYXRpb25zID0gW10uY29uY2F0KHRoaXMub3BlbkFuaW1hdGlvbkNvbmZpZyB8fCBbXSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuY29uY2F0KHRoaXMuY2xvc2VBbmltYXRpb25Db25maWcgfHwgW10pOwogICAgICAgIGZvciAodmFyIGkg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BDYW4gYmUgdXNlZCB0byBkZXRlcm1pbmUgdGhhdCBlbGVtZW50cyBpbXBsZW1lbnQgdGhpcyBiZWhhdmlvci4KICAgICAgICovCiAgICAgIGlzTmVvbkFuaW1hdGlvbjogdHJ1ZSwKCiAgICAgIC8qKgogICAgICAgKiBEbyBhbnkgYW5pbWF0aW9uIGNvbmZpZ3VyYXRpb24gaGVyZS4KICAgICAgICovCiAgICAgIC8vIGNvbmZpZ3VyZTogZnVuY3Rpb24oY29uZmlnKSB7CiAgICAgIC8vIH0sCgogICAgICBjcmVhdGVkOiBmdW5jdGlvbigpIHsKICAgICAgICBpZiAoIWRvY3VtZW50LmJvZHkuYW5pbWF0ZSkgewogICAgICAgICAgY29uc29sZS53YXJuKAogICAgICAgICAgICAgICdObyB3ZWIgYW5pbWF0aW9ucyBkZXRlY3RlZC4gVGhpcyBlbGVtZW50IHdpbGwgbm90JyArCiAgICAgICAgICAgICAgJyBmdW5jdGlvbiB3aXRob3V0IGEgd2ViIGFuaW1hdGlvbnMgcG9seWZpbGwuJyk7CiAgICAgICAgfQogICAgICB9LAoKICAgICAgLyoqCiAgICAgICAqIFJldHVybnMgdGhlIGFuaW1hdGlvbiB0aW1pbmcgYnkgbWl4aW5nIGluIHByb3BlcnRpZXMgZnJvbSBgY29uZmlnYCB0byB0aGUKICAgICAgICogZGVmYXVsdHMgZGVmaW5lZCBieSB0aGUgYW5pbWF0aW9uLgogICAgICAgKi8KICAgICAgdGltaW5nRnJvbUNvbmZpZzogZnVuY3Rpb24oY29uZmlnKSB7CiAgICAgICAgaWYgKGNvbmZpZy50aW1pbmcpIHsKICAgICAgICAgIGZvciAodmFyIHByb3BlcnR5IGluIGNvbmZpZy50aW1pbmcpIHsKICAgICAgICAgICAgdGhpcy5hbmltYXRpb25UaW1pbmdbcHJvcGVydHldID0gY29uZmlnLnRpbWluZ1twcm9wZXJ0eV07CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiB0aGlzLmFuaW1hdG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YXIgbm9kZSA9IGNvbmZpZy5ub2RlOwogICAgICAgIHZhciByZWN0ID0gbm9kZS5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKTsKICAgICAgICB2YXIgd2lkdGggPSByZWN0LndpZHRoOwoKICAgICAgICB0aGlzLl9lZmZlY3QgPSBuZXcgS2V5ZnJhbWVFZmZlY3QoCiAgICAgICAgICAgIG5vZGUsCiAgICAgICAgICAgIFt7d2lkdGg6ICh3aWR0aCAvIDIpICsgJ3B4J30sIHt3aWR0aDogd2lkdGggKyAncHgnfV0sCiAgICAgICAgICAgIHRoaXMudGltaW5nRnJvbUNvbmZpZyhjb25maWcpKTsKCiAgICAgICAgcmV0dXJuIHRoaXMuX2VmZmVjdDsKICAgICAgfQogICAgfSk7CgogICAgUG9seW1lcih7CiAgICAgIGlzOiAncGFwZXItbWVudS1zaHJpbmstd2lkdGgtYW5pbWF0aW9uJywKCiAgICAgIGJlaGF2aW9yczogW05lb25BbmltYXRpb25CZWhhdmlvcl0sCgogICAgICBjb25maWd1cmU6IGZ1bmN0aW9uKGNvbmZpZykgewogICAgICAgIHZhciBub2RlID0gY29uZmlnLm5vZGU7CiAgICAgICAgdmFyIHJlY3QgPSBub2RlLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpOwogICAgICAgIHZhciB3aWR0aCA9IHJlY3Qud2lkdGg7CgogICAgICAgIHRoaXMuX2VmZmVjdCA9IG5ldyBLZXlmcmFtZUVmZmVjdCgKICAgICAgICAgICAgbm9kZSwKICAgICAgICAgICAgW3t3aWR0aDogd2lkdGggKyAncHgnfSwge3dpZHRoOiB3aWR0aCAtICh3aWR0aCAvIDIwKSArICdweCd9XSwKICAgICAgICAgICAgdGhpcy50aW1pbmdGcm9tQ29uZmlnKGNvbmZpZykpOwoKICAgICAgICByZXR1cm4gdGhpcy5fZWZmZWN0OwogICAgICB9CiAgICB9KTsKCiAgICBQb2x5bWVyKHsKICAgICAgaXM6ICdwYXBlci1tZW51LXNocmluay1oZWlnaHQt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LW1lbnUtYnV0dG9uOwogICAgICB9CgogICAgICA6aG9zdChbZGlzYWJsZWRdKSB7CiAgICAgICAgY3Vyc29yOiBhdXRvOwogICAgICAgIGNvbG9yOiB2YXIoLS1kaXNhYmxlZC10ZXh0LWNvbG9yKTsKCiAgICAgICAgQGFwcGx5IC0tcGFwZXItbWVudS1idXR0b24tZGlzYWJsZWQ7CiAgICAgIH0KCiAgICAgIGlyb24tZHJvcGRvd24gewogICAgICAgIEBhcHBseSAtLXBhcGVyLW1lbnUtYnV0dG9uLWRyb3Bkb3duOwogICAgICB9CgogICAgICAuZHJvcGRvd24tY29udGVudCB7CiAgICAgICAgQGFwcGx5IC0tc2hhZG93LWVsZXZhdGlvbi0yZHA7CgogICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTsKICAgICAgICBib3JkZXItcmFkaXVzOiAycHg7CiAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogdmFyKC0tcGFwZXItbWVudS1idXR0b24tZHJvcGRvd24tYmFja2dyb3VuZCwgdmFyKC0tcHJpbWFyeS1iYWNrZ3JvdW5kLWNvbG9yKSk7CgogICAgICAgIEBhcHBseSAtLXBhcGVyLW1lbnUtYnV0dG9uLWNvbnRlbnQ7CiAgICAgIH0KCiAgICAgIDpob3N0KFt2ZXJ0aWNhbC1hbGlnbj0idG9wIl0pIC5kcm9wZG93bi1jb250ZW50IHsKICAgICAgICBtYXJnaW4tYm90dG9tOiAyMHB4OwogICAgICAgIG1hcmdpbi10b3A6IC0xMHB4OwogICAgICAgIHRvcDogMTBweDsKICAgICAgfQoKICAgICAgOmhvc3QoW3ZlcnRpY2FsLWFsaWduPSJib3R0b20iXSkgLmRyb3Bkb3duLWNvbnRlbnQgewogICAgICAgIGJvdHRvbTogMTBweDsKICAgICAgICBtYXJnaW4tYm90dG9tOiAtMTBweDsKICAgICAgICBtYXJnaW4tdG9wOiAyMHB4OwogICAgICB9CgogICAgICAjdHJpZ2dlciB7CiAgICAgICAgY3Vyc29yOiBwb2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+PC9zbG90PgogICAgICA8L2Rpdj4KICAgIDwvaXJvbi1kcm9wZG93bj4KYCwKCiAgICAgIGlzOiAncGFwZXItbWVudS1idXR0b24nLAoKICAgICAgLyoqCiAgICAgICAqIEZpcmVkIHdoZW4gdGhlIGRyb3Bkb3duIG9wZW5zLgogICAgICAgKgogICAgICAgKiBAZXZlbnQgcGFwZXItZHJvcGRvd24tb3BlbgogICAgICAgKi8KCiAgICAgIC8qKgogICAgICAgKiBGaXJlZCB3aGVuIHRoZSBkcm9wZG93biBjbG9zZXMuCiAgICAgICAqCiAgICAgICAqIEBldmVudCBwYXBlci1kcm9wZG93bi1jbG9zZQogICAgICAgKi8KCiAgICAgIGJlaGF2aW9yczogW0lyb25BMTF5S2V5c0JlaGF2aW9yLCBJcm9uQ29udHJvbFN0YXRlXSwKCiAgICAgIHByb3BlcnRpZXM6IHsKICAgICAgICAvKioKICAgICAgICAgKiBUcnVlIGlmIHRoZSBjb250ZW50IGlzIGN1cnJlbnRseSBkaXNwbGF5ZWQuCiAgICAgICAgICovCiAgICAgICAgb3BlbmVkOgogICAgICAgICAgICB7dHlwZTogQm9vbGVhbiwgdmFsdWU6IGZhbHNlLCBub3RpZnk6IHRydWUsIG9ic2VydmVyOiAnX29wZW5lZENoYW5nZWQnfSwKCiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIG9yaWVudGF0aW9uIGFnYWluc3Qgd2hpY2ggdG8gYWxpZ24gdGhlIG1lbnUgZHJvcGRvd24KICAgICAgICAgKiBob3Jpem9udGFsbHkgcmVsYXRpdmUgdG8gdGhlIGRyb3Bkb3duIHRyaWdnZXIuCiAgICAgICAgICovCiAgICAgICAgaG9yaXpvbnRhbEFsaWduOiB7dHlwZTogU3RyaW5nLCB2YWx1ZTogJ2xlZnQnLCByZWZsZWN0VG9BdHRyaWJ1dGU6IHRydWV9LAoKICAgICAgICAvKioKICAgICAgICAgKiBUaGUgb3JpZW50YXRpb24gYWdhaW5zdCB3aGljaCB0byBhbGlnbiB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WxzZX0sCgogICAgICAgIC8qKgogICAgICAgICAqIFNldCB0byB0cnVlIHRvIGVuYWJsZSBhdXRvbWF0aWNhbGx5IGNsb3NpbmcgdGhlIGRyb3Bkb3duIGFmdGVyIGFuCiAgICAgICAgICogaXRlbSBoYXMgYmVlbiBhY3RpdmF0ZWQsIGV2ZW4gaWYgdGhlIHNlbGVjdGlvbiBkaWQgbm90IGNoYW5nZS4KICAgICAgICAgKi8KICAgICAgICBjbG9zZU9uQWN0aXZhdGU6IHt0eXBlOiBCb29sZWFuLCB2YWx1ZTogZmFsc2V9LAoKICAgICAgICAvKioKICAgICAgICAgKiBBbiBhbmltYXRpb24gY29uZmlnLiBJZiBwcm92aWRlZCwgdGhpcyB3aWxsIGJlIHVzZWQgdG8gYW5pbWF0ZSB0aGUKICAgICAgICAgKiBvcGVuaW5nIG9mIHRoZSBkcm9wZG93bi4KICAgICAgICAgKi8KICAgICAgICBvcGVuQW5pbWF0aW9uQ29uZmlnOiB7CiAgICAgICAgICB0eXBlOiBPYmplY3QsCiAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24oKSB7CiAgICAgICAgICAgIHJldHVybiBbCiAgICAgICAgICAgICAge25hbWU6ICdmYWRlLWluLWFuaW1hdGlvbicsIHRpbWluZzoge2RlbGF5OiAxMDAsIGR1cmF0aW9uOiAyMDB9fSwKICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBuYW1lOiAncGFwZXItbWVudS1ncm93LXdpZHRoLWFuaW1hdGlvbicsCiAgICAgICAgICAgICAgICB0aW1pbmc6IHsKICAgICAgICAgICAgICAgICAgZGVsYXk6IDEwMCwKICAgICAgICAgICAgICAgICAgZHVyYXRpb246IDE1MCwKICAgICAgICAgICAgICAgICAgZWFzaW5nOiBjb25maWcuQU5JTUFUSU9OX0NVQklDX0JFWklFUgogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgbmFtZTogJ3BhcGVyLW1lbnUtZ3Jvdy1oZWlnaHQtYW5pbWF0aW9uJywKICAgICAgICAgICAgICAgIHRpbWluZzogewogICAgICAgICAgICAgICAgICBkZWxheTogMTAwLAogICAgICAgICAgICAgICAgICBkdXJhdGlvbjogMjc1LAogICAgICAgICAgICAgICAgICBlYXNpbmc6IGNvbmZpZy5BTklNQVRJT05fQ1VCSUNfQkVaSUVSCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgfQogICAgICAgICAgICBdOwogICAgICAgICAgfQogICAgICAgIH0sCgogICAgICAgIC8qKgogICAgICAgICAqIEFuIGFuaW1hdGlvbiBjb25maWcuIElmIHByb3ZpZGVkLCB0aGlzIHdpbGwgYmUgdXNlZCB0byBhbmltYXRlIHRoZQogICAgICAgICAqIGNsb3Npbmcgb2YgdGhlIGRyb3Bkb3duLgogICAgICAgICAqLwogICAgICAgIGNsb3NlQW5pbWF0aW9uQ29uZmlnOiB7CiAgICAgICAgICB0eXBlOiBPYmplY3QsCiAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24oKSB7CiAgICAgICAgICAgIHJldHVybiBbCiAgICAgICAgICAgICAge25hbWU6ICdmYWRlLW91dC1hbmltYXRpb24nLCB0aW1pbmc6IHtkdXJhdGlvbjogMTUwfX0sCiAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgbmFtZTogJ3BhcGVyLW1lbnUtc2hyaW5rLXdpZHRoLWFuaW1hdGlvbicsCiAgICAgICAgICAgICAgICB0aW1pbmc6IHsKICAgICAgICAgICAgICAgICAgZGVsYXk6IDEwMCwKICAgICAgICAgICAgICAgICAgZHVyYXRpb246IDUwLAogICAgICAgICAgICAgICAgICBlYXNpbmc6IGNvbmZpZy5BTklNQVRJT05fQ1VCSUNfQkVaSUVSCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBuYW1lOiAncGFwZXItbWVudS1zaHJpbmstaGVpZ2h0LWFuaW1hdGlvbics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CAnYXJpYS1oYXNwb3B1cCc6ICd0cnVlJ30sCgogICAgICBsaXN0ZW5lcnM6CiAgICAgICAgICB7J2lyb24tYWN0aXZhdGUnOiAnX29uSXJvbkFjdGl2YXRlJywgJ2lyb24tc2VsZWN0JzogJ19vbklyb25TZWxlY3QnfSwKCiAgICAgIC8qKgogICAgICAgKiBUaGUgY29udGVudCBlbGVtZW50IHRoYXQgaXMgY29udGFpbmVkIGJ5IHRoZSBtZW51IGJ1dHRvbiwgaWYgYW55LgogICAgICAgKi8KICAgICAgZ2V0IGNvbnRlbnRFbGVtZW50KCkgewogICAgICAgIC8vIFBvbHltZXIgMi54IHJldHVybnMgc2xvdC5hc3NpZ25lZE5vZGVzIHdoaWNoIGNhbiBjb250YWluIHRleHQgbm9kZXMuCiAgICAgICAgdmFyIG5vZGVzID0gZG9tKHRoaXMuJC5jb250ZW50KS5nZXREaXN0cmlidXRlZE5vZGVzKCk7CiAgICAgICAgZm9yICh2YXIgaSA9IDAsIGwgPSBub2Rlcy5sZW5ndGg7IGkgPCBsOyBpKyspIHsKICAgICAgICAgIGlmIChub2Rlc1tpXS5ub2RlVHlwZSA9PT0gTm9kZS5FTEVNRU5UX05PREUpIHsKICAgICAgICAgICAgcmV0dXJuIG5vZGVzW2ldOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgKiBUb2dnbGVzIHRoZSBkcm9wZG93biBjb250ZW50IGJldHdlZW4gb3BlbmVkIGFuZCBjbG9zZWQuCiAgICAgICAqLwogICAgICB0b2dnbGU6IGZ1bmN0aW9uKCkgewogICAgICAgIGlmICh0aGlzLm9wZW5lZCkgewogICAgICAgICAgdGhpcy5jbG9zZSgpOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICB0aGlzLm9wZW4oKTsKICAgICAgICB9CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogTWFrZSB0aGUgZHJvcGRvd24gY29udGVudCBhcHBlYXIgYXMgYW4gb3ZlcmxheSBwb3NpdGlvbmVkIHJlbGF0aXZlCiAgICAgICAqIHRvIHRoZSBkcm9wZG93biB0cmlnZ2VyLgogICAgICAgKi8KICAgICAgb3BlbjogZnVuY3Rpb24oKSB7CiAgICAgICAgaWYgKHRoaXMuZGlzYWJsZWQpIHsKICAgICAgICAgIHJldHVybjsKICAgICAgICB9CgogICAgICAgIHRoaXMuJC5kcm9wZG93bi5vcGVuKCk7CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogSGlkZSB0aGUgZHJvcGRvd24gY29udGVudC4KICAgICAgICovCiAgICAgIGNsb3NlOiBmdW5jdGlvbigpIHsKICAgICAgICB0aGlzLiQuZHJvcGRvd24uY2xvc2UoKTsKICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgKiBXaGVuIGFuIGBpcm9uLXNlbGVjdGAgZXZlbnQgaXMgcmVjZWl2ZWQsIHRoZSBkcm9wZG93biBzaG91bGQKICAgICAgICogYXV0b21hdGljYWxseSBjbG9zZSBvbiB0aGUgYXNzdW1wdGlvbiB0aGF0IGEgdmFsdWUgaGFzIGJlZW4gY2hvc2VuLgogICAgICAgKgogICAgICAgKiBAcGFyYW0ge0N1c3RvbUV2ZW50fSBldmVudCBBIEN1c3RvbUV2ZW50IGluc3RhbmNlIHdpdGggdHlwZQogICAgICAgKiBzZXQgdG8gYCJpcm9uLXNlbGVjdCJgLgogICAgICAgKi8KICAgICAgX29uSXJvblNlbGVjdDogZnVuY3Rpb24oZXZlbnQpIHsKICAgICAgICBpZiAoIXRoaXMuaWdub3JlU2VsZWN0KSB7CiAgICAgICAgICB0aGlzLmNsb3NlKCk7CiAgICAgICAgfQogICAgICB9LAoKICAgICAgLyoqCiAgICAgICAqIENsb3NlcyB0aGUgZHJvcGRvd24gd2hlbiBhbiBgaXJvbi1hY3RpdmF0ZWAgZXZlbnQgaXMgcmVjZWl2ZWQgaWYKICAgICAgICogYGNsb3NlT25BY3RpdmF0ZWAgaXMgdHJ1ZS4KICAgICAgICoKICAgICA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RoZSBmb2N1cyB0YXJnZXQgZm9yIHRoZSBgaXJvbi1kcm9wZG93bmAgdG8gYmUgdXBkYXRlZCBhcwogICAgICAgICAgLy8gbmVjZXNzYXJ5OgogICAgICAgICAgdGhpcy5fZHJvcGRvd25Db250ZW50ID0gdGhpcy5jb250ZW50RWxlbWVudDsKICAgICAgICAgIHRoaXMuZmlyZSgncGFwZXItZHJvcGRvd24tb3BlbicpOwogICAgICAgIH0gZWxzZSBpZiAob2xkT3BlbmVkICE9IG51bGwpIHsKICAgICAgICAgIHRoaXMuZmlyZSgncGFwZXItZHJvcGRvd24tY2xvc2UnKTsKICAgICAgICB9CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogSWYgdGhlIGRyb3Bkb3duIGlzIG9wZW4gd2hlbiBkaXNhYmxlZCBiZWNvbWVzIHRydWUsIGNsb3NlIHRoZQogICAgICAgKiBkcm9wZG93bi4KICAgICAgICoKICAgICAgICogQHBhcmFtIHtib29sZWFufSBkaXNhYmxlZCBUcnVlIGlmIGRpc2FibGVkLCBvdGhlcndpc2UgZmFsc2UuCiAgICAgICAqLwogICAgICBfZGlzYWJsZWRDaGFuZ2VkOiBmdW5jdGlvbihkaXNhYmxlZCkgewogICAgICAgIElyb25Db250cm9sU3RhdGUuX2Rpc2FibGVkQ2hhbmdlZC5hcHBseSh0aGlzLCBhcmd1bWVudHMpOwogICAgICAgIGlmIChkaXNhYmxlZCAmJiB0aGlzLm9wZW5lZCkgewogICAgICAgICAgdGhpcy5jbG9zZSgpOwogICAgICAgIH0KICAgICAgfSwKCiAgICAgIF9fb25Jcm9uT3ZlcmxheUNhbmNlbGVkOiBmdW5jdGlvbihldmVudCkgewogICAgICAgIHZhciB1aUV2ZW50ID0gZXZlbnQuZGV0YWlsOwogICAgICAgIHZhciB0cmlnZ2VyID0gdGhpcy4kLnRyaWdnZXI7CiAgICAgICAgdmFyIHBhdGggPSBkb20odWlFdmVudCkucGF0aDsKCiAgICAgICAgaWYgKHBhdGguaW5kZXh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XItYm94OwogICAgICAgICAgY3Vyc29yOiBwb2ludGVyOwogICAgICAgIH07CgogICAgICAgIEBhcHBseSAtLXBhcGVyLWRyb3Bkb3duLW1lbnU7CiAgICAgIH0KCiAgICAgIC8qIHBhcGVyLWRyb3Bkb3duLW1lbnUgYW5kIHBhcGVyLWRyb3Bkb3duLW1lbnUtbGlnaHQgYm90aCBkZWxlZ2F0ZSBmb2N1cwogICAgICAgKiB0byBvdGhlciBpbnRlcm5hbCBlbGVtZW50cyB3aGljaCBtYW5hZ2UgZm9jdXMgc3R5bGluZy4gKi8KICAgICAgOmhvc3QoOmZvY3VzKSB7CiAgICAgICAgb3V0bGluZTogbm9uZTsKICAgICAgfQoKICAgICAgOmhvc3QoOmRpcihydGwpKSB7CiAgICAgICAgdGV4dC1hbGlnbjogcmlnaHQ7CgogICAgICAgIEBhcHBseSgtLXBhcGVyLWRyb3Bkb3duLW1lbnUpOwogICAgICB9CgogICAgICA6aG9zdChbZGlzYWJsZWRdKSB7CiAgICAgICAgQGFwcGx5IC0tcGFwZXItZHJvcGRvd24tbWVudS1kaXNhYmxlZDsKICAgICAgfQoKICAgICAgOmhvc3QoW25vaW5rXSkgcGFwZXItcmlwcGxlIHsKICAgICAgICBkaXNwbGF5OiBub25lOwogICAgICB9CgogICAgICA6aG9zdChbbm8tbGFiZWwtZmxvYXRdKSBwYXBlci1yaXBwbGUgewogICAgICAgIHRvcDogOHB4OwogICAgICB9CgogICAgICBwYXBlci1yaXBwbGUgewogICAgICAgIHRvcDogMTJweDsKICAgICAgICBsZWZ0OiAwcHg7CiAgICAgICAgYm90dG9tOiA4cHg7CiAgICAgICAgcmlnaHQ6IDBweDsKCiAgICAgICAgQGFwcGx5IC0tcGFwZXItZHJvcGRvd24tbWVudS1yaXBwbGU7CiAgICAgIH0KCiAgICAgIHBhcGVyLW1lbnUtYnV0dG9uIHsKICAgICAgICBkaXNwbGF5OiBibG9jazsKICAgICAgICBwYWRkaW5nOiAwOwoKICAgICAgICBAYXBw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gICAgICAgLy8gc3RpbGwgaW4gYSBgRG9jdW1lbnRGcmFnbWVudGAuIFRoaXMgaGFzIHRoZSBlZmZlY3Qgb2YgY2F1c2luZwogICAgICAgIC8vIGhhbmRsZXJzIG5vdCB0byBmaXJlLiBTbywgd2UgZG91YmxlIGNoZWNrIHRoaXMgdmFsdWUgb24gYXR0YWNoZWQ6CiAgICAgICAgdmFyIGNvbnRlbnRFbGVtZW50ID0gdGhpcy5jb250ZW50RWxlbWVudDsKICAgICAgICBpZiAoY29udGVudEVsZW1lbnQgJiYgY29udGVudEVsZW1lbnQuc2VsZWN0ZWRJdGVtKSB7CiAgICAgICAgICB0aGlzLl9zZXRTZWxlY3RlZEl0ZW0oY29udGVudEVsZW1lbnQuc2VsZWN0ZWRJdGVtKTsKICAgICAgICB9CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogVGhlIGNvbnRlbnQgZWxlbWVudCB0aGF0IGlzIGNvbnRhaW5lZCBieSB0aGUgZHJvcGRvd24gbWVudSwgaWYgYW55LgogICAgICAgKi8KICAgICAgZ2V0IGNvbnRlbnRFbGVtZW50KCkgewogICAgICAgIC8vIFBvbHltZXIgMi54IHJldHVybnMgc2xvdC5hc3NpZ25lZE5vZGVzIHdoaWNoIGNhbiBjb250YWluIHRleHQgbm9kZXMuCiAgICAgICAgdmFyIG5vZGVzID0gZG9tKHRoaXMuJC5jb250ZW50KS5nZXREaXN0cmlidXRlZE5vZGVzKCk7CiAgICAgICAgZm9yICh2YXIgaSA9IDAsIGwgPSBub2Rlcy5sZW5ndGg7IGkgPCBsOyBpKyspIHsKICAgICAgICAgIGlmIChub2Rlc1tpXS5ub2RlVHlwZSA9PT0gTm9kZS5FTEVNRU5UX05PREUpIHsKICAgICAgICAgICAgcmV0dXJuIG5vZGVzW2ldOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgKiBTaG93IHRoZSBkcm9wZG93biBjb250ZW50LgogICAgICAgKi8KICAgICAg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WNvbnRhaW5lcjogewogICAgICAgICAgICBib3JkZXI6IDFweCBzb2xpZCBncmF5OwogICAgICAgICAgfTsKCiAgICBUbyBjaGFuZ2UgdGhlIHBhbmVsIGNvbnRhaW5lciBpbiBkaWZmZXJlbnQgbW9kZXM6CgogICAgICAgIHBhcGVyLWhlYWRlci1wYW5lbCB7CiAgICAgICAgICAtLXBhcGVyLWhlYWRlci1wYW5lbC1zdGFuZGFyZC1jb250YWluZXI6IHsKICAgICAgICAgICAgYm9yZGVyOiAxcHggc29saWQgZ3JheTsKICAgICAgICAgIH07CgogICAgICAgICAgLS1wYXBlci1oZWFkZXItcGFuZWwtc2VhbWVkLWNvbnRhaW5lcjogewogICAgICAgICAgICBib3JkZXI6IDFweCBzb2xpZCBncmF5OwogICAgICAgICAgfTsKCiAgICAgICAgICAtLXBhcGVyLWhlYWRlci1wYW5lbC13YXRlcmZhbGwtY29udGFpbmVyOiB7CiAgICAgICAgICAgIGJvcmRlcjogMXB4IHNvbGlkIGdyYXk7CiAgICAgICAgICB9OwoKICAgICAgICAgIC0tcGFwZXItaGVhZGVyLXBhbmVsLXdhdGVyZmFsbC10YWxsLWNvbnRhaW5lcjogewogICAgICAgICAgICBib3JkZXI6IDFweCBzb2xpZCBncmF5OwogICAgICAgICAgfTsKCiAgICAgICAgICAtLXBhcGVyLWhlYWRlci1wYW5lbC1zY3JvbGwtY29udGFpbmVyOiB7CiAgICAgICAgICAgIGJvcmRlcjogMXB4IHNvbGlkIGdyYXk7CiAgICAgICAgICB9OwoKICAgICAgICAgIC0tcGFwZXItaGVhZGVyLXBhbmVsLWNvdmVyLWNvbnRhaW5lcjogewogICAgICAgICAgICBib3JkZXI6IDFweCBzb2xpZCBncmF5OwogICAgICAgICAgfTsKICAgICAgICB9CgogICAgVGhlIGZvbGxvd2luZyBjdXN0b20gcHJvcGVydGllcyBhbmQgbWl4aW5zIGFyZSBhdmFpbGFibGUgZm9yIHN0eWxpbmc6CgogICAgQ3VzdG9tIHByb3Blcn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7CiAgICAgICAgbWluLWhlaWdodDogMDsKICAgICAgICBAYXBwbHkgLS1wYXBlci1oZWFkZXItcGFuZWwtYm9keTsKICAgICAgfQoKICAgICAgI21haW5Db250YWluZXIgewogICAgICAgIEBhcHBseSAtLXBhcGVyLWhlYWRlci1wYW5lbC1jb250YWluZXI7CiAgICAgIH0KCiAgICAgIC8qCiAgICAgICAqIG1vZGU6IHNjcm9sbAogICAgICAgKi8KICAgICAgOmhvc3QoW21vZGU9c2Nyb2xsXSkgI21haW5Db250YWluZXIgewogICAgICAgIEBhcHBseSAtLXBhcGVyLWhlYWRlci1wYW5lbC1zY3JvbGwtY29udGFpbmVyOwogICAgICAgIG92ZXJmbG93OiB2aXNpYmxlOwogICAgICB9CgogICAgICA6aG9zdChbbW9kZT1zY3JvbGxdKSB7CiAgICAgICAgb3ZlcmZsb3cteTogYXV0bzsKICAgICAgICBvdmVyZmxvdy14OiBoaWRkZW47CiAgICAgICAgLXdlYmtpdC1vdmVyZmxvdy1zY3JvbGxpbmc6IHRvdWNoOwogICAgICB9CgogICAgICAvKgogICAgICAgKiBtb2RlOiBjb3ZlcgogICAgICAgKi8KICAgICAgOmhvc3QoW21vZGU9Y292ZXJdKSAjbWFpbkNvbnRhaW5lciB7CiAgICAgICAgQGFwcGx5IC0tcGFwZXItaGVhZGVyLXBhbmVsLWNvdmVyLWNvbnRhaW5lcjsKICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7CiAgICAgICAgdG9wOiAwOwogICAgICAgIHJpZ2h0OiAwOwogICAgICAgIGJvdHRvbTogMDsKICAgICAgICBsZWZ0OiAwOwogICAgICB9CgogICAgICA6aG9zdChbbW9kZT1jb3Zlcl0pICNtYWluUGFuZWwgewogICAgICAgIHBvc2l0aW9uOiBzdGF0aWM7CiAgICAgIH0KCiAgICAgIC8qCiAgICAgICAqIG1vZGU6IHN0YW5kYXJkCiAgICAgICAqLwogICAgICA6aG9zdChbbW9kZT1zdGFuZGFyZF0pICNtYWluQ29udGFpbmVyIHsKICAgICAgICBAYXBwbHkgLS1wYXBlci1oZWFkZXItcGFuZWwtc3RhbmRhcmQtY29udGFpbmVyOwogICAgICB9CgogICAgICAvKgogICAgICAgKiBtb2RlOiBzZWFtZWQKICAgICAgICovCiAgICAgIDpob3N0KFttb2RlPXNlYW1lZF0pICNtYWluQ29udGFpbmVyIHsKICAgICAgICBAYXBwbHkgLS1wYXBlci1oZWFkZXItcGFuZWwtc2VhbWVkLWNvbnRhaW5lcjsKICAgICAgfQoKCiAgICAgIC8qCiAgICAgICAqIG1vZGU6IHdhdGVyZmFsbAogICAgICAgKi8KICAgICAgOmhvc3QoW21vZGU9d2F0ZXJmYWxsXSkgI21haW5Db250YWluZXIgewogICAgICAgIEBhcHBseSAtLXBhcGVyLWhlYWRlci1wYW5lbC13YXRlcmZhbGwtY29udGFpbmVyOwogICAgICB9CgogICAgICAvKgogICAgICAgKiBtb2RlOiB3YXRlcmZhbGwtdGFsbAogICAgICAgKi8KICAgICAgOmhvc3QoW21vZGU9d2F0ZXJmYWxsLXRhbGxdKSAjbWFpbkNvbnRhaW5lciB7CiAgICAgICAgQGFwcGx5IC0tcGFwZXItaGVhZGVyLXBhbmVsLXdhdGVyZmFsbC10YWxsLWNvbnRhaW5lcjsKICAgICAgfQoKICAgICAgI2Ryb3BTaGFkb3cgewogICAgICAgIHRyYW5zaXRpb246IG9wYWNpdHkgMC41czsKICAgICAgICBoZWlnaHQ6IDZweDsKICAgICAgICBib3gtc2hhZG93OiBpbnNldCAwcHggNXB4IDZweCAtM3B4IHJnYmEoMCwgMCwgMCwgMC40KTsKICAgICAgICBAYXBwbHkgLS1wYXBlci1oZWFkZXItcGFuZWwtc2hhZG93OwogICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTsKICAgICAgICB0b3A6IDA7CiAgICAgICAgbGVmdDogMDsKICAgICAgICByaWdodDogMDsKICAgICAgICBvcGFjaXR5OiAwOwogICAgICAgIHBvaW50ZXItZXZlbnRzOiBub25lOwogICAg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ICAgPC9wYXBlci1oZWFkZXItcGFuZWw+CiAgICAgICAgICovCiAgICAgICAgbW9kZTogewogICAgICAgICAgdHlwZTogU3RyaW5nLAogICAgICAgICAgdmFsdWU6ICdzdGFuZGFyZCcsCiAgICAgICAgICBvYnNlcnZlcjogJ19tb2RlQ2hhbmdlZCcsCiAgICAgICAgICByZWZsZWN0VG9BdHRyaWJ1dGU6IHRydWUKICAgICAgICB9LAoKICAgICAgICAvKioKICAgICAgICAgKiBJZiB0cnVlLCB0aGUgZHJvcC1zaGFkb3cgaXMgYWx3YXlzIHNob3duIG5vIG1hdHRlciB3aGF0IG1vZGUgaXMgc2V0IHRvLgogICAgICAgICAqLwogICAgICAgIHNoYWRvdzoge3R5cGU6IEJvb2xlYW4sIHZhbHVlOiBmYWxzZX0sCgogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBjbGFzcyB1c2VkIGluIHdhdGVyZmFsbC10YWxsIG1vZGUuICBDaGFuZ2UgdGhpcyBpZiB0aGUgaGVhZGVyCiAgICAgICAgICogYWNjZXB0cyBhIGRpZmZlcmVudCBjbGFzcyBmb3IgdG9nZ2xpbmcgaGVpZ2h0LCBlLmcuICJtZWRpdW0tdGFsbCIKICAgICAgICAgKi8KICAgICAgICB0YWxsQ2xhc3M6IHt0eXBlOiBTdHJpbmcsIHZhbHVlOiAndGFsbCd9LAoKICAgICAgICAvKioKICAgICAgICAgKiBJZiB0cnVlLCB0aGUgc2Nyb2xsZXIgaXMgYXQgdGhlIHRvcAogICAgICAgICAqLwogICAgICAgIGF0VG9wOiB7CiAgICAgICAgICB0eXBlOiBCb29sZWFuLAogICAgICAgICAgdmFsdWU6IHRydWUsCiAgICAgICAgICBub3RpZnk6IHRydWUsCiAgICAgICAgICByZWFkT25seTogdHJ1ZSwKICAgICAgICAgIHJlZmxlY3RUb0F0dHJpYnV0ZTogdHJ1ZQogICAgICAgIH0KICAgICAgfSwKCiAgICAgIG9ic2VydmVyczogWydfY29tcHV0ZURyb3BTaGFkb3d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CiAgICAgICAgLyogQmVjYXVzZSBvZiBwb2x5bWVyLzI1NTgsIHRoaXMgc3R5bGUgaGFzIGxvd2VyIHNwZWNpZmljaXR5IHRoYW4gKiAqLwogICAgICAgIGJveC1zaXppbmc6IGJvcmRlci1ib3ggIWltcG9ydGFudDsKCiAgICAgICAgQGFwcGx5IC0tcGFwZXItaWNvbi1idXR0b247CiAgICAgIH0KCiAgICAgIDpob3N0ICNpbmsgewogICAgICAgIGNvbG9yOiB2YXIoLS1wYXBlci1pY29uLWJ1dHRvbi1pbmstY29sb3IsIHZhcigtLXByaW1hcnktdGV4dC1jb2xvcikpOwogICAgICAgIG9wYWNpdHk6IDAuNjsKICAgICAgfQoKICAgICAgOmhvc3QoW2Rpc2FibGVkXSkgewogICAgICAgIGNvbG9yOiB2YXIoLS1wYXBlci1pY29uLWJ1dHRvbi1kaXNhYmxlZC10ZXh0LCB2YXIoLS1kaXNhYmxlZC10ZXh0LWNvbG9yKSk7CiAgICAgICAgcG9pbnRlci1ldmVudHM6IG5vbmU7CiAgICAgICAgY3Vyc29yOiBhdXRvOwoKICAgICAgICBAYXBwbHkgLS1wYXBlci1pY29uLWJ1dHRvbi1kaXNhYmxlZDsKICAgICAgfQoKICAgICAgOmhvc3QoW2hpZGRlbl0pIHsKICAgICAgICBkaXNwbGF5OiBub25lICFpbXBvcnRhbnQ7CiAgICAgIH0KCiAgICAgIDpob3N0KDpob3ZlcikgewogICAgICAgIEBhcHBseSAtLXBhcGVyLWljb24tYnV0dG9uLWhvdmVyOwogICAgICB9CgogICAgICBpcm9uLWljb24gewogICAgICAgIC0taXJvbi1pY29uLXdpZHRoOiAxMDAlOwogICAgICAgIC0taXJvbi1pY29uLWhlaWdodDogMTAwJTsKICAgICAgfQogICAgPC9zdHlsZT4KCiAgICA8aXJvbi1pY29uIGlkPSJpY29uIiBzcmM9Iltbc3JjXV0iIGljb249IltbaWNvbl1dIgogICAgICAgICAgICAgICBhbHQkPSJbW2FsdF1dIj48L2lyb24taWN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ICAgICAgd2lkdGg6IDQwMHB4OwogICAgICAgIGJvcmRlcjogMXB4IHNvbGlkOwogICAgICAgIHBhZGRpbmc6IDJweDsKICAgICAgICAtbW96LWFwcGVhcmFuY2U6IHRleHRhcmVhOwogICAgICAgIC13ZWJraXQtYXBwZWFyYW5jZTogdGV4dGFyZWE7CiAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjsKICAgICAgfQoKICAgICAgLm1pcnJvci10ZXh0IHsKICAgICAgICB2aXNpYmlsaXR5OiBoaWRkZW47CiAgICAgICAgd29yZC13cmFwOiBicmVhay13b3JkOwogICAgICAgIEBhcHBseSAtLWlyb24tYXV0b2dyb3ctdGV4dGFyZWE7CiAgICAgIH0KCiAgICAgIC5maXQgewogICAgICAgIEBhcHBseSAtLWxheW91dC1maXQ7CiAgICAgIH0KCiAgICAgIHRleHRhcmVhIHsKICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7CiAgICAgICAgb3V0bGluZTogbm9uZTsKICAgICAgICBib3JkZXI6IG5vbmU7CiAgICAgICAgcmVzaXplOiBub25lOwogICAgICAgIGJhY2tncm91bmQ6IGluaGVyaXQ7CiAgICAgICAgY29sb3I6IGluaGVyaXQ7CiAgICAgICAgLyogc2VlIGNvbW1lbnRzIGluIHRlbXBsYXRlICovCiAgICAgICAgd2lkdGg6IDEwMCU7CiAgICAgICAgaGVpZ2h0OiAxMDAlOwogICAgICAgIGZvbnQtc2l6ZTogaW5oZXJpdDsKICAgICAgICBmb250LWZhbWlseTogaW5oZXJpdDsKICAgICAgICBsaW5lLWhlaWdodDogaW5oZXJpdDsKICAgICAgICB0ZXh0LWFsaWduOiBpbmhlcml0OwogICAgICAgIEBhcHBseSAtLWlyb24tYXV0b2dyb3ctdGV4dGFyZWE7CiAgICAgIH0KCiAgICAgIHRleHRhcmVhOjotd2Via2l0LWlucHV0LXBsYWNlaG9sZGVyIHsKICAgICAgICBAYXBwbHkgLS1pcm9uLWF1dG9ncm93LXRleHRhcmVhLXBsYWN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lZCcsIHR5cGU6IFN0cmluZywgbm90aWZ5OiB0cnVlfSwKCiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIGluaXRpYWwgbnVtYmVyIG9mIHJvd3MuCiAgICAgICAgICoKICAgICAgICAgKiBAYXR0cmlidXRlIHJvd3MKICAgICAgICAgKiBAdHlwZSBudW1iZXIKICAgICAgICAgKiBAZGVmYXVsdCAxCiAgICAgICAgICovCiAgICAgICAgcm93czoge3R5cGU6IE51bWJlciwgdmFsdWU6IDEsIG9ic2VydmVyOiAnX3VwZGF0ZUNhY2hlZCd9LAoKICAgICAgICAvKioKICAgICAgICAgKiBUaGUgbWF4aW11bSBudW1iZXIgb2Ygcm93cyB0aGlzIGVsZW1lbnQgY2FuIGdyb3cgdG8gdW50aWwgaXQKICAgICAgICAgKiBzY3JvbGxzLiAwIG1lYW5zIG5vIG1heGltdW0uCiAgICAgICAgICoKICAgICAgICAgKiBAYXR0cmlidXRlIG1heFJvd3MKICAgICAgICAgKiBAdHlwZSBudW1iZXIKICAgICAgICAgKiBAZGVmYXVsdCAwCiAgICAgICAgICovCiAgICAgICAgbWF4Um93czoge3R5cGU6IE51bWJlciwgdmFsdWU6IDAsIG9ic2VydmVyOiAnX3VwZGF0ZUNhY2hlZCd9LAoKICAgICAgICAvKioKICAgICAgICAgKiBCb3VuZCB0byB0aGUgdGV4dGFyZWEncyBgYXV0b2NvbXBsZXRlYCBhdHRyaWJ1dGUuCiAgICAgICAgICovCiAgICAgICAgYXV0b2NvbXBsZXRlOiB7dHlwZTogU3RyaW5nLCB2YWx1ZTogJ29mZid9LAoKICAgICAgICAvKioKICAgICAgICAgKiBCb3VuZCB0byB0aGUgdGV4dGFyZWEncyBgYXV0b2ZvY3VzYCBhdHRyaWJ1dGUuCiAgICAgICAgICoKICAgICAgICAgKiBAdHlwZSB7IWJvb2xlYW59CiAgICAgICAgICovCiAgICAgICAgYXV0b2ZvY3VzOiB7dHlwZTogQm9vbGVhbiwgdmFsdWU6IGZhbHNlfSwKCiAgICAgICAgLyoqCiAgICAgICAgICogQm91bmQgdG8gdGhlIHRleHRhcmVhJ3MgYGF1dG9jYXBpdGFsaXplYCBhdHRyaWJ1dGUuCiAgICAgICAgICovCiAgICAgICAgYXV0b2NhcGl0YWxpemU6IHt0eXBlOiBTdHJpbmcsIHZhbHVlOiAnbm9uZSd9LAoKICAgICAgICAvKioKICAgICAgICAgKiBCb3VuZCB0byB0aGUgdGV4dGFyZWEncyBgaW5wdXRtb2RlYCBhdHRyaWJ1dGUuCiAgICAgICAgICovCiAgICAgICAgaW5wdXRtb2RlOiB7dHlwZTogU3RyaW5nfSwKCiAgICAgICAgLyoqCiAgICAgICAgICogQm91bmQgdG8gdGhlIHRleHRhcmVhJ3MgYHBsYWNlaG9sZGVyYCBhdHRyaWJ1dGUuCiAgICAgICAgICovCiAgICAgICAgcGxhY2Vob2xkZXI6IHt0eXBlOiBTdHJpbmd9LAoKICAgICAgICAvKioKICAgICAgICAgKiBCb3VuZCB0byB0aGUgdGV4dGFyZWEncyBgcmVhZG9ubHlgIGF0dHJpYnV0ZS4KICAgICAgICAgKi8KICAgICAgICByZWFkb25seToge3R5cGU6IFN0cmluZ30sCgogICAgICAgIC8qKgogICAgICAgICAqIFNldCB0byB0cnVlIHRvIG1hcmsgdGhlIHRleHRhcmVhIGFzIHJlcXVpcmVkLgogICAgICAgICAqLwogICAgICAgIHJlcXVpcmVkOiB7dHlwZTogQm9vbGVhbn0sCgogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBtaW5pbXVtIGxlbmd0aCBvZiB0aGUgaW5wdXQgdmFsdWUuCiAgICAgICAgICovCiAgICAgICAgbWlubGVuZ3RoOiB7dHlwZTogTnVtYmVyfSwKCiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIG1heGltdW0gbGVuZ3RoIG9mIHRoZSBpbnB1dCB2YWx1ZS4KICAgICAgICAgKi8KICAgICAgICBtYXhsZW5ndGg6IHt0eXBlOiBOdW1iZXJ9LAoKICAgICAgICAvK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ICAgICAgICB0aGlzLnZhbHVlID0gZXZlbnRQYXRoID8gZXZlbnRQYXRoWzBdLnZhbHVlIDogZXZlbnQudGFyZ2V0LnZhbHVlOwogICAgICB9LAoKICAgICAgX2NvbnN0cmFpbjogZnVuY3Rpb24odG9rZW5zKSB7CiAgICAgICAgdmFyIF90b2tlbnM7CiAgICAgICAgdG9rZW5zID0gdG9rZW5zIHx8IFsnJ107CiAgICAgICAgLy8gRW5mb3JjZSB0aGUgbWluIGFuZCBtYXggaGVpZ2h0cyBmb3IgYSBtdWx0aWxpbmUgaW5wdXQgdG8gYXZvaWQKICAgICAgICAvLyBtZWFzdXJlbWVudAogICAgICAgIGlmICh0aGlzLm1heFJvd3MgPiAwICYmIHRva2Vucy5sZW5ndGggPiB0aGlzLm1heFJvd3MpIHsKICAgICAgICAgIF90b2tlbnMgPSB0b2tlbnMuc2xpY2UoMCwgdGhpcy5tYXhSb3dzKTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgX3Rva2VucyA9IHRva2Vucy5zbGljZSgwKTsKICAgICAgICB9CiAgICAgICAgd2hpbGUgKHRoaXMucm93cyA+IDAgJiYgX3Rva2Vucy5sZW5ndGggPCB0aGlzLnJvd3MpIHsKICAgICAgICAgIF90b2tlbnMucHVzaCgnJyk7CiAgICAgICAgfQogICAgICAgIC8vIFVzZSAmIzE2MDsgaW5zdGVhZCAmbmJzcDsgb2YgdG8gYWxsb3cgdGhpcyBlbGVtZW50IHRvIGJlIHVzZWQgaW4gWEhUTUwuCiAgICAgICAgcmV0dXJuIF90b2tlbnMuam9pbignPGJyLz4nKSArICcmIzE2MDsnOwogICAgICB9LAoKICAgICAgX3ZhbHVlRm9yTWlycm9yOiBmdW5jdGlvbigpIHsKICAgICAgICB2YXIgaW5wdXQgPSB0aGlzLnRleHRhcmVhOwogICAgICAgIGlmICghaW5wdXQpIHsKICAgICAgICAgIHJldHVybjsKICAgICAgICB9CiAgICAgICAgdGhpcy50b2tlbnMgPSAoaW5wdXQgJiYgaW5wdXQudmFsdWUpID8gaW5wdXQudmFsdWUucmVwbGFjZSgvJi9nbSwgJyZhbXA7JykKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnJlcGxhY2UoLyIvZ20sICcmcXVvdDsnKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAucmVwbGFjZSgvJy9nbSwgJyYjMzk7JykKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnJlcGxhY2UoLzwvZ20sICcmbHQ7JykKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnJlcGxhY2UoLz4vZ20sICcmZ3Q7JykKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnNwbGl0KCdcbicpIDoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbJyddOwogICAgICAgIHJldHVybiB0aGlzLl9jb25zdHJhaW4odGhpcy50b2tlbnMpOwogICAgICB9LAoKICAgICAgX3VwZGF0ZUNhY2hlZDogZnVuY3Rpb24oKSB7CiAgICAgICAgdGhpcy4kLm1pcnJvci5pbm5lckhUTUwgPSB0aGlzLl9jb25zdHJhaW4odGhpcy50b2tlbnMpOwogICAgICB9CiAgICB9KTsKCiAgICAvKioKICAgIEBsaWNlbnNlCiAgICBDb3B5cmlnaHQgKGMpIDIwMTUgVGhlIFBvbHltZXIgUHJvamVjdCBBdXRob3JzLiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICAgVGhpcyBjb2RlIG1heSBvbmx5IGJlIHVzZWQgdW5kZXIgdGhlIEJTRCBzdHlsZSBsaWNlbnNlIGZvdW5kIGF0CiAgICBodHRwOi8vcG9seW1lci5naXRodWIuaW8vTElDRU5TRS50eHQgVGhlIGNvbXBsZXRlIHNldCBvZiBhdXRob3JzIG1heSBiZSBmb3VuZCB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KICAgICAgICBfYXJpYUxhYmVsbGVkQnk6IHsKICAgICAgICAgIG9ic2VydmVyOiAnX2FyaWFMYWJlbGxlZEJ5Q2hhbmdlZCcsCiAgICAgICAgICB0eXBlOiBTdHJpbmcsCiAgICAgICAgfSwKCiAgICAgICAgX2FyaWFEZXNjcmliZWRCeTogewogICAgICAgICAgb2JzZXJ2ZXI6ICdfYXJpYURlc2NyaWJlZEJ5Q2hhbmdlZCcsCiAgICAgICAgICB0eXBlOiBTdHJpbmcsCiAgICAgICAgfSwKCiAgICAgICAgdmFsdWU6IHsKICAgICAgICAgIC8vIFJlcXVpcmVkIGZvciB0aGUgY29ycmVjdCBUeXBlU2NyaXB0IHR5cGUtZ2VuZXJhdGlvbgogICAgICAgICAgdHlwZTogU3RyaW5nLAogICAgICAgIH0sCgogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBpbml0aWFsIG51bWJlciBvZiByb3dzLgogICAgICAgICAqIEB0eXBlIHtudW1iZXJ9CiAgICAgICAgICogQGRlZmF1bHQgMQogICAgICAgICAqLwogICAgICAgIHJvd3M6IHsKICAgICAgICAgIHR5cGU6IE51bWJlciwKICAgICAgICAgIHZhbHVlOiAxLAogICAgICAgIH0sCgogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBtYXhpbXVtIG51bWJlciBvZiByb3dzIHRoaXMgZWxlbWVudCBjYW4gZ3JvdyB0byB1bnRpbCBpdAogICAgICAgICAqIHNjcm9sbHMuIDAgbWVhbnMgbm8gbWF4aW11bS4KICAgICAgICAgKiBAdHlwZSB7bnVtYmVyfQogICAgICAgICAqIEBkZWZhdWx0IDAKICAgICAgICAgKi8KICAgICAgICBtYXhSb3dzOiB7CiAgICAgICAgICB0eXBlOiBOdW1iZXIsCiAgICAgICAgICB2YWx1ZTogMCwKICAgICAgICB9LAogICAgICB9LAoKICAgICAgLyoqCiAgICAgICAqIEByZXR1cm4ge251bWJlcn0KICAgICAgICovCiAgICAgIGdldCBzZWxlY3Rpb25TdGFydCgpIH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dENvbnRlbnRgIHdpbGwgYmUgdXNlZC4KICAgICAgICAgKi8KICAgICAgICBhdHRyRm9ySXRlbVRpdGxlOiB7dHlwZTogU3RyaW5nfSwKCiAgICAgICAgLyoqCiAgICAgICAgICogQHR5cGUge2Jvb2xlYW59CiAgICAgICAgICovCiAgICAgICAgZGlzYWJsZWQ6IHsKICAgICAgICAgIHR5cGU6IEJvb2xlYW4sCiAgICAgICAgICB2YWx1ZTogZmFsc2UsCiAgICAgICAgICBvYnNlcnZlcjogJ19kaXNhYmxlZENoYW5nZWQnLAogICAgICAgIH0sCiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogVGhlIGxpc3Qgb2Yga2V5cyBoYXMgYmVlbiB0YWtlbiBmcm9tCiAgICAgICAqIGh0dHBzOi8vZGV2ZWxvcGVyLm1vemlsbGEub3JnL2VuLVVTL2RvY3MvV2ViL0FQSS9LZXlib2FyZEV2ZW50L2dldE1vZGlmaWVyU3RhdGUKICAgICAgICogQHByaXZhdGUKICAgICAgICovCiAgICAgIF9NT0RJRklFUl9LRVlTOiBbCiAgICAgICAgJ0FsdCcsCiAgICAgICAgJ0FsdEdyYXBoJywKICAgICAgICAnQ2Fwc0xvY2snLAogICAgICAgICdDb250cm9sJywKICAgICAgICAnRm4nLAogICAgICAgICdGbkxvY2snLAogICAgICAgICdIeXBlcicsCiAgICAgICAgJ01ldGEnLAogICAgICAgICdOdW1Mb2NrJywKICAgICAgICAnT1MnLAogICAgICAgICdTY3JvbGxMb2NrJywKICAgICAgICAnU2hpZnQnLAogICAgICAgICdTdXBlcicsCiAgICAgICAgJ1N5bWJvbCcsCiAgICAgICAgJ1N5bWJvbExvY2snCiAgICAgIF0sCgogICAgICAvKiogQHByaXZhdGUgKi8KICAgICAgX1NFQVJDSF9SRVNFVF9USU1FT1VUX01TOiAxMDAwLAoKICAgICAgLyoqIEBwcml2YXRlICovCiAgICAgIF9wcmV2aW91c1RhYkluZGV4OiAwLAoKICAgICAgaG9zdEF0dHJpYnV0ZXM6IHsKICAgICAgICAncm9sZSc6ICdtZW51JywKICAgICAgfSwKCiAgICAgIG9ic2VydmVyczogWydfdXBkYXRlTXVsdGlzZWxlY3RhYmxlKG11bHRpKSddLAoKICAgICAgbGlzdGVuZXJzOiB7CiAgICAgICAgJ2ZvY3VzJzogJ19vbkZvY3VzJywKICAgICAgICAna2V5ZG93bic6ICdfb25LZXlkb3duJywKICAgICAgICAnaXJvbi1pdGVtcy1jaGFuZ2VkJzogJ19vbklyb25JdGVtc0NoYW5nZWQnCiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogQHR5cGUgeyFPYmplY3R9CiAgICAgICAqLwogICAgICBrZXlCaW5kaW5nczogewogICAgICAgICd1cCc6ICdfb25VcEtleScsCiAgICAgICAgJ2Rvd24nOiAnX29uRG93bktleScsCiAgICAgICAgJ2VzYyc6ICdfb25Fc2NLZXknLAogICAgICAgICdzaGlmdCt0YWI6a2V5ZG93bic6ICdfb25TaGlmdFRhYkRvd24nCiAgICAgIH0sCgogICAgICBhdHRhY2hlZDogZnVuY3Rpb24oKSB7CiAgICAgICAgdGhpcy5fcmVzZXRUYWJpbmRpY2VzKCk7CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogU2VsZWN0cyB0aGUgZ2l2ZW4gdmFsdWUuIElmIHRoZSBgbXVsdGlgIHByb3BlcnR5IGlzIHRydWUsIHRoZW4gdGhlIHNlbGVjdGVkCiAgICAgICAqIHN0YXRlIG9mIHRoZSBgdmFsdWVgIHdpbGwgYmUgdG9nZ2xlZDsgb3RoZXJ3aXNlIHRoZSBgdmFsdWVgIHdpbGwgYmUKICAgICAgICogc2VsZWN0ZWQuCiAgICAgICAqCiAgICAgICAqIEBwYXJhbSB7c3RyaW5nfG51bWJlcn0gdmFsdWUgdGhlIHZhbHVlIHRvIHNlbGVjdC4KICAgICAgICovCiAgICAgIHNlbGVjdDogZnVuY3Rpb24odmFsdWUpIHsKICAgICAgICAvLyBDYW5jZWwgYXV0b21hdGljYWxseSBmb2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ua2V5Lmxlbmd0aCA9PSAxID8KICAgICAgICAgICAgZXZlbnQua2V5IDoKICAgICAgICAgICAgU3RyaW5nLmZyb21DaGFyQ29kZShldmVudC5rZXlDb2RlKTsKICAgICAgICBzZWFyY2hUZXh0ICs9IGtleS50b0xvY2FsZUxvd2VyQ2FzZSgpOwoKICAgICAgICB2YXIgc2VhcmNoTGVuZ3RoID0gc2VhcmNoVGV4dC5sZW5ndGg7CgogICAgICAgIGZvciAodmFyIGkgPSAwLCBpdGVtOyBpdGVtID0gdGhpcy5pdGVtc1tpXTsgaSsrKSB7CiAgICAgICAgICBpZiAoaXRlbS5oYXNBdHRyaWJ1dGUoJ2Rpc2FibGVkJykpIHsKICAgICAgICAgICAgY29udGludWU7CiAgICAgICAgICB9CgogICAgICAgICAgdmFyIGF0dHIgPSB0aGlzLmF0dHJGb3JJdGVtVGl0bGUgfHwgJ3RleHRDb250ZW50JzsKICAgICAgICAgIHZhciB0aXRsZSA9IChpdGVtW2F0dHJdIHx8IGl0ZW0uZ2V0QXR0cmlidXRlKGF0dHIpIHx8ICcnKS50cmltKCk7CgogICAgICAgICAgaWYgKHRpdGxlLmxlbmd0aCA8IHNlYXJjaExlbmd0aCkgewogICAgICAgICAgICBjb250aW51ZTsKICAgICAgICAgIH0KCiAgICAgICAgICBpZiAodGl0bGUuc2xpY2UoMCwgc2VhcmNoTGVuZ3RoKS50b0xvY2FsZUxvd2VyQ2FzZSgpID09IHNlYXJjaFRleHQpIHsKICAgICAgICAgICAgdGhpcy5fc2V0Rm9jdXNlZEl0ZW0oaXRlbSk7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgdGhpcy5fc2VhcmNoVGV4dCA9IHNlYXJjaFRleHQ7CiAgICAgICAgdGhpcy5kZWJvdW5jZSgKICAgICAgICAgICAgJ19jbGVhclNlYXJjaFRleHQnLAogICAgICAgICAgICB0aGlzLl9jbGVhclNlYXJjaFRleHQsCiAgICAgICAgICAgI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dGVkCiAgICAgICAgICB2YXIgZmlyc3RTZWxlY3RlZEl0ZW0gPSB0aGlzLm11bHRpID8KICAgICAgICAgICAgICAodGhpcy5zZWxlY3RlZEl0ZW1zICYmIHRoaXMuc2VsZWN0ZWRJdGVtc1swXSkgOgogICAgICAgICAgICAgIHRoaXMuc2VsZWN0ZWRJdGVtOwoKICAgICAgICAgIHRoaXMuX3NldEZvY3VzZWRJdGVtKG51bGwpOwoKICAgICAgICAgIGlmIChmaXJzdFNlbGVjdGVkSXRlbSkgewogICAgICAgICAgICB0aGlzLl9zZXRGb2N1c2VkSXRlbShmaXJzdFNlbGVjdGVkSXRlbSk7CiAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMuaXRlbXNbMF0pIHsKICAgICAgICAgICAgLy8gV2UgZmluZCB0aGUgZmlyc3Qgbm9uZS1kaXNhYmxlZCBpdGVtIChpZiBvbmUgZXhpc3RzKQogICAgICAgICAgICB0aGlzLl9mb2N1c05leHQoKTsKICAgICAgICAgIH0KICAgICAgICB9KTsKICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgKiBIYW5kbGVyIHRoYXQgaXMgY2FsbGVkIHdoZW4gdGhlIHVwIGtleSBpcyBwcmVzc2VkLgogICAgICAgKgogICAgICAgKiBAcGFyYW0ge0N1c3RvbUV2ZW50fSBldmVudCBBIGtleSBjb21iaW5hdGlvbiBldmVudC4KICAgICAgICovCiAgICAgIF9vblVwS2V5OiBmdW5jdGlvbihldmVudCkgewogICAgICAgIC8vIHVwIGFuZCBkb3duIGFycm93cyBtb3ZlcyB0aGUgZm9jdXMKICAgICAgICB0aGlzLl9mb2N1c1ByZXZpb3VzKCk7CiAgICAgICAgZXZlbnQuZGV0YWlsLmtleWJvYXJkRXZlbnQucHJldmVudERlZmF1bHQoKTsKICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgKiBIYW5kbGVyIHRoYXQgaXMgY2FsbGVkIHdoZW4gdGhlIGRvd24ga2V5IGlzIHByZXNzZWQuCiAgICAgICAqCiAgICAgICAqIEBwYXJhbSB7Q3VzdG9tRXZlbnR9IGV2ZW50IEEga2V5IGNvbWJpbmF0aW9uIGV2ZW50LgogICAgICAgKi8KICAgICAgX29uRG93bktleTogZnVuY3Rpb24oZXZlbnQpIHsKICAgICAgICB0aGlzLl9mb2N1c05leHQoKTsKICAgICAgICBldmVudC5kZXRhaWwua2V5Ym9hcmRFdmVudC5wcmV2ZW50RGVmYXVsdCgpOwogICAgICB9LAoKICAgICAgLyoqCiAgICAgICAqIEhhbmRsZXIgdGhhdCBpcyBjYWxsZWQgd2hlbiB0aGUgZXNjIGtleSBpcyBwcmVzc2VkLgogICAgICAgKgogICAgICAgKiBAcGFyYW0ge0N1c3RvbUV2ZW50fSBldmVudCBBIGtleSBjb21iaW5hdGlvbiBldmVudC4KICAgICAgICovCiAgICAgIF9vbkVzY0tleTogZnVuY3Rpb24oZXZlbnQpIHsKICAgICAgICB2YXIgZm9jdXNlZEl0ZW0gPSB0aGlzLmZvY3VzZWRJdGVtOwogICAgICAgIGlmIChmb2N1c2VkSXRlbSkgewogICAgICAgICAgZm9jdXNlZEl0ZW0uYmx1cigpOwogICAgICAgIH0KICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgKiBIYW5kbGVyIHRoYXQgaXMgY2FsbGVkIHdoZW4gYSBrZXlkb3duIGV2ZW50IGlzIGRldGVjdGVkLgogICAgICAgKgogICAgICAgKiBAcGFyYW0ge0tleWJvYXJkRXZlbnR9IGV2ZW50IEEga2V5Ym9hcmQgZXZlbnQuCiAgICAgICAqLwogICAgICBfb25LZXlkb3duOiBmdW5jdGlvbihldmVudCkgewogICAgICAgIGlmICghdGhpcy5rZXlib2FyZEV2ZW50TWF0Y2hlc0tleXMoZXZlbnQsICd1cCBkb3duIGVzYycpKSB7CiAgICAgICAgICAvLyBhbGwgb3RoZXIga2V5cyBmb2N1cyB0aGUgbWVudSBpdGVtIHN0YXJ0aW5nIHdpdGggdGhhdCBjaGFyYWN0ZXIKICAgICAgICA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aW9uLCAycykgbGluZWFyIGluZmluaXRlOwogICAgICAgIGFuaW1hdGlvbjogaW5kZXRlcm1pbmF0ZS1zcGxpdHRlciB2YXIoLS1wYXBlci1wcm9ncmVzcy1pbmRldGVybWluYXRlLWN5Y2xlLWR1cmF0aW9uLCAycykgbGluZWFyIGluZmluaXRlOwogICAgICB9CgogICAgICBALXdlYmtpdC1rZXlmcmFtZXMgaW5kZXRlcm1pbmF0ZS1iYXIgewogICAgICAgIDAlIHsKICAgICAgICAgIC13ZWJraXQtdHJhbnNmb3JtOiBzY2FsZVgoMSkgdHJhbnNsYXRlWCgtMTAwJSk7CiAgICAgICAgfQogICAgICAgIDUwJSB7CiAgICAgICAgICAtd2Via2l0LXRyYW5zZm9ybTogc2NhbGVYKDEpIHRyYW5zbGF0ZVgoMCUpOwogICAgICAgIH0KICAgICAgICA3NSUgewogICAgICAgICAgLXdlYmtpdC10cmFuc2Zvcm06IHNjYWxlWCgxKSB0cmFuc2xhdGVYKDAlKTsKICAgICAgICAgIC13ZWJraXQtYW5pbWF0aW9uLXRpbWluZy1mdW5jdGlvbjogY3ViaWMtYmV6aWVyKC4yOCwuNjIsLjM3LC45MSk7CiAgICAgICAgfQogICAgICAgIDEwMCUgewogICAgICAgICAgLXdlYmtpdC10cmFuc2Zvcm06IHNjYWxlWCgwKSB0cmFuc2xhdGVYKDAlKTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIEAtd2Via2l0LWtleWZyYW1lcyBpbmRldGVybWluYXRlLXNwbGl0dGVyIHsKICAgICAgICAwJSB7CiAgICAgICAgICAtd2Via2l0LXRyYW5zZm9ybTogc2NhbGVYKC43NSkgdHJhbnNsYXRlWCgtMTI1JSk7CiAgICAgICAgfQogICAgICAgIDMwJSB7CiAgICAgICAgICAtd2Via2l0LXRyYW5zZm9ybTogc2NhbGVYKC43NSkgdHJhbnNsYXRlWCgtMTI1JSk7CiAgICAgICAgICAtd2Via2l0LWFuaW1hdGlvbi10aW1pbmctZnVuY3Rpb246IGN1YmljLWJlemllciguNDIsMCwuNiwuOCk7CiAgICAgICAgfQogICAgICAgIDkwJSB7CiAgICAgICAgICAtd2Via2l0LXRyYW5zZm9ybTogc2NhbGVYKC43NSkgdHJhbnNsYXRlWCgxMjUlKTsKICAgICAgICB9CiAgICAgICAgMTAwJSB7CiAgICAgICAgICAtd2Via2l0LXRyYW5zZm9ybTogc2NhbGVYKC43NSkgdHJhbnNsYXRlWCgxMjUlKTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIEBrZXlmcmFtZXMgaW5kZXRlcm1pbmF0ZS1iYXIgewogICAgICAgIDAlIHsKICAgICAgICAgIHRyYW5zZm9ybTogc2NhbGVYKDEpIHRyYW5zbGF0ZVgoLTEwMCUpOwogICAgICAgIH0KICAgICAgICA1MCUgewogICAgICAgICAgdHJhbnNmb3JtOiBzY2FsZVgoMSkgdHJhbnNsYXRlWCgwJSk7CiAgICAgICAgfQogICAgICAgIDc1JSB7CiAgICAgICAgICB0cmFuc2Zvcm06IHNjYWxlWCgxKSB0cmFuc2xhdGVYKDAlKTsKICAgICAgICAgIGFuaW1hdGlvbi10aW1pbmctZnVuY3Rpb246IGN1YmljLWJlemllciguMjgsLjYyLC4zNywuOTEpOwogICAgICAgIH0KICAgICAgICAxMDAlIHsKICAgICAgICAgIHRyYW5zZm9ybTogc2NhbGVYKDApIHRyYW5zbGF0ZVgoMCUpOwogICAgICAgIH0KICAgICAgfQoKICAgICAgQGtleWZyYW1lcyBpbmRldGVybWluYXRlLXNwbGl0dGVyIHsKICAgICAgICAwJSB7CiAgICAgICAgICB0cmFuc2Zvcm06IHNjYWxlWCguNzUpIHRyYW5zbGF0ZVgoLTEyNSUpOwogICAgICAgIH0KICAgICAgICAzMCUgewogICAgICAgICAgdHJhbnNmb3JtOiBzY2FsZVgoLjc1KSB0cmFuc2xhdGVYKC0xMjUlKTsKICAgICAgICAgIGFuaW1hdGlvbi10aW1pbmctZnVuY3Rpb246IGN1YmljLWJlemllciguNDIsMCwuN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ICAgLyoqCiAgICAgKiBgSXJvbk1lbnViYXJCZWhhdmlvcmAgaW1wbGVtZW50cyBhY2Nlc3NpYmxlIG1lbnViYXIgYmVoYXZpb3IuCiAgICAgKgogICAgICogQHBvbHltZXJCZWhhdmlvciBJcm9uTWVudWJhckJlaGF2aW9yCiAgICAgKi8KICAgIGNvbnN0IElyb25NZW51YmFyQmVoYXZpb3JJbXBsID0gewoKICAgICAgaG9zdEF0dHJpYnV0ZXM6IHsncm9sZSc6ICdtZW51YmFyJ30sCgogICAgICAvKioKICAgICAgICogQHR5cGUgeyFPYmplY3R9CiAgICAgICAqLwogICAgICBrZXlCaW5kaW5nczogeydsZWZ0JzogJ19vbkxlZnRLZXknLCAncmlnaHQnOiAnX29uUmlnaHRLZXknfSwKCiAgICAgIF9vblVwS2V5OiBmdW5jdGlvbihldmVudCkgewogICAgICAgIHRoaXMuZm9jdXNlZEl0ZW0uY2xpY2soKTsKICAgICAgICBldmVudC5kZXRhaWwua2V5Ym9hcmRFdmVudC5wcmV2ZW50RGVmYXVsdCgpOwogICAgICB9LAoKICAgICAgX29uRG93bktleTogZnVuY3Rpb24oZXZlbnQpIHsKICAgICAgICB0aGlzLmZvY3VzZWRJdGVtLmNsaWNrKCk7CiAgICAgICAgZXZlbnQuZGV0YWlsLmtleWJvYXJkRXZlbnQucHJldmVudERlZmF1bHQoKTsKICAgICAgfSwKCiAgICAgIGdldCBfaXNSVEwoKSB7CiAgICAgICAgcmV0dXJuIHdpbmRvdy5nZXRDb21wdXRlZFN0eWxlKHRoaXMpWydkaXJlY3Rpb24nXSA9PT0gJ3J0bCc7CiAgICAgIH0sCgogICAgICBfb25MZWZ0S2V5OiBmdW5jdGlvbihldmVudCkgewogICAgICAgIGlmICh0aGlzLl9pc1JUTCkgewogICAgICAgICAgdGhpcy5fZm9jdXNOZXh0KCk7CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgIHRoaXMuX2ZvY3VzUHJldmlvdXMoKTsKICAgICAgICB9CiAgICAg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IuZWRpdGFibGUgewogICAgICBtYXJnaW4tdG9wOiAxMnB4OwogICAgICBtYXJnaW4tYm90dG9tOiAxMnB4OwogICAgfQoKICAgIC5iYXItY29udGFpbmVyIHsKICAgICAgcG9zaXRpb246IGFic29sdXRlOwogICAgICB0b3A6IDA7CiAgICAgIGJvdHRvbTogMDsKICAgICAgbGVmdDogMDsKICAgICAgcmlnaHQ6IDA7CiAgICAgIG92ZXJmbG93OiBoaWRkZW47CiAgICB9CgogICAgLnJpbmcgPiAuYmFyLWNvbnRhaW5lciB7CiAgICAgIGxlZnQ6IGNhbGMoNXB4ICsgdmFyKC0tY2FsY3VsYXRlZC1wYXBlci1zbGlkZXItaGVpZ2h0KS8yKTsKICAgICAgdHJhbnNpdGlvbjogbGVmdCAwLjE4cyBlYXNlOwogICAgfQoKICAgIC5yaW5nLmV4cGFuZC5kcmFnZ2luZyA+IC5iYXItY29udGFpbmVyIHsKICAgICAgdHJhbnNpdGlvbjogbm9uZTsKICAgIH0KCiAgICAucmluZy5leHBhbmQ6bm90KC5waW4pID4gLmJhci1jb250YWluZXIgewogICAgICBsZWZ0OiBjYWxjKDhweCArIHZhcigtLWNhbGN1bGF0ZWQtcGFwZXItc2xpZGVyLWhlaWdodCkvMik7CiAgICB9CgogICAgI3NsaWRlckJhciB7CiAgICAgIHBhZGRpbmc6IDE1cHggMDsKICAgICAgd2lkdGg6IDEwMCU7CiAgICAgIGJhY2tncm91bmQtY29sb3I6IHZhcigtLXBhcGVyLXNsaWRlci1iYXItY29sb3IsIHRyYW5zcGFyZW50KTsKICAgICAgLS1wYXBlci1wcm9ncmVzcy1jb250YWluZXItY29sb3I6IHZhcigtLXBhcGVyLXNsaWRlci1jb250YWluZXItY29sb3IsIHZhcigtLXBhcGVyLWdyZXktNDAwKSk7CiAgICAgIC0tcGFwZXItcHJvZ3Jlc3MtaGVpZ2h0OiB2YXIoLS1jYWxjdWxhdGVkLXBhcGVyLXNsaWRlci1oZWlnaHQpOwogICAgfQoKICAgI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JhciB8IGAycHhgCiAgICBgLS1wYXBlci1zbGlkZXItaW5wdXRgIHwgTWl4aW4gYXBwbGllZCB0byB0aGUgaW5wdXQgaW4gZWRpdGFibGUgbW9kZSB8IGB7fWAKICAgIGAtLXBhcGVyLXNsaWRlci1pbnB1dC1jb250YWluZXItaW5wdXRgIHwgTWl4aW4gYXBwbGllZCB0byB0aGUgcGFwZXItaW5wdXQtY29udGFpbmVyLWlucHV0IGluIGVkaXRhYmxlIG1vZGUgfCBge31gCgogICAgQGdyb3VwIFBhcGVyIEVsZW1lbnRzCiAgICBAZWxlbWVudCBwYXBlci1zbGlkZXIKICAgIEBkZW1vIGRlbW8vaW5kZXguaHRtbAogICAgKi8KICAgIFBvbHltZXIoewogICAgICBfdGVtcGxhdGU6IHRlbXBsYXRlJGUsCgogICAgICBpczogJ3BhcGVyLXNsaWRlcicsCgogICAgICBiZWhhdmlvcnM6IFsKICAgICAgICBJcm9uQTExeUtleXNCZWhhdmlvciwKICAgICAgICBJcm9uRm9ybUVsZW1lbnRCZWhhdmlvciwKICAgICAgICBQYXBlcklua3lGb2N1c0JlaGF2aW9yLAogICAgICAgIElyb25SYW5nZUJlaGF2aW9yCiAgICAgIF0sCgogICAgICBwcm9wZXJ0aWVzOiB7CiAgICAgICAgdmFsdWU6IHsKICAgICAgICAgIHR5cGU6IE51bWJlciwKICAgICAgICAgIHZhbHVlOiAwLAogICAgICAgIH0sCgogICAgICAgIC8qKgogICAgICAgICAqIElmIHRydWUsIHRoZSBzbGlkZXIgdGh1bWIgc25hcHMgdG8gdGljayBtYXJrcyBldmVubHkgc3BhY2VkIGJhc2VkCiAgICAgICAgICogb24gdGhlIGBzdGVwYCBwcm9wZXJ0eSB2YWx1ZS4KICAgICAgICAgKi8KICAgICAgICBzbmFwczogewogICAgICAgICAgdHlwZTogQm9vbGVhbiwKICAgICAgICAgIHZhbHVlOiBmYWxzZSwKICAgICAgICAgIG5vdGlmeTogdHJ1ZSwKICAgICAgICB9LAoKICAgICAgICAvKioKICAgICAgICAgKiBJZiB0cnVlLCBhIHBpbiB3aXRoIG51bWVyaWMgdmFsdWUgbGFiZWwgaXMgc2hvd24gd2hlbiB0aGUgc2xpZGVyIHRodW1iCiAgICAgICAgICogaXMgcHJlc3NlZC4gVXNlIGZvciBzZXR0aW5ncyBmb3Igd2hpY2ggdXNlcnMgbmVlZCB0byBrbm93IHRoZSBleGFjdAogICAgICAgICAqIHZhbHVlIG9mIHRoZSBzZXR0aW5nLgogICAgICAgICAqLwogICAgICAgIHBpbjogewogICAgICAgICAgdHlwZTogQm9vbGVhbiwKICAgICAgICAgIHZhbHVlOiBmYWxzZSwKICAgICAgICAgIG5vdGlmeTogdHJ1ZSwKICAgICAgICB9LAoKICAgICAgICAvKioKICAgICAgICAgKiBUaGUgbnVtYmVyIHRoYXQgcmVwcmVzZW50cyB0aGUgY3VycmVudCBzZWNvbmRhcnkgcHJvZ3Jlc3MuCiAgICAgICAgICovCiAgICAgICAgc2Vjb25kYXJ5UHJvZ3Jlc3M6IHsKICAgICAgICAgIHR5cGU6IE51bWJlciwKICAgICAgICAgIHZhbHVlOiAwLAogICAgICAgICAgbm90aWZ5OiB0cnVlLAogICAgICAgICAgb2JzZXJ2ZXI6ICdfc2Vjb25kYXJ5UHJvZ3Jlc3NDaGFuZ2VkJywKICAgICAgICB9LAoKICAgICAgICAvKioKICAgICAgICAgKiBJZiB0cnVlLCBhbiBpbnB1dCBpcyBzaG93biBhbmQgdXNlciBjYW4gdXNlIGl0IHRvIHNldCB0aGUgc2xpZGVyIHZhbHVlLgogICAgICAgICAqLwogICAgICAgIGVkaXRhYmxlOiB7CiAgICAgICAgICB0eXBlOiBCb29sZWFuLAogICAgICAgICAgdmFsdWU6IGZhbHNlLAogICAgICAgIH0sCgogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBpbW1lZGlhdGUgdmFsdWUgb2YgdGhlIHNsaWRlci4gIFRoaXMgdmFsdWUgaXMgdXBkYXRlZCB3aGlsZSB0aGUgdXNlcgogICAgICAgICAqIGlzIGRyYWdnaW5nIHRoZSBzbGlkZXIuCiAgICAgICAgICovCiAgICAgICAgaW1tZWRpYXRlVmFsdWU6IHsKICAgICAgICAgIHR5cGU6IE51bWJlciwKICAgICAgICAgIHZhbHVlOiAwLAogICAgICAgICAgcmVhZE9ubHk6IHRydWUsCiAgICAgICAgICBub3RpZnk6IHRydWUsCiAgICAgICAgfSwKCiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIG1heGltdW0gbnVtYmVyIG9mIG1hcmtlcnMKICAgICAgICAgKi8KICAgICAgICBtYXhNYXJrZXJzOiB7CiAgICAgICAgICB0eXBlOiBOdW1iZXIsCiAgICAgICAgICB2YWx1ZTogMCwKICAgICAgICAgIG5vdGlmeTogdHJ1ZSwKICAgICAgICB9LAoKICAgICAgICAvKioKICAgICAgICAgKiBJZiB0cnVlLCB0aGUga25vYiBpcyBleHBhbmRlZAogICAgICAgICAqLwogICAgICAgIGV4cGFuZDogewogICAgICAgICAgdHlwZTogQm9vbGVhbiwKICAgICAgICAgIHZhbHVlOiBmYWxzZSwKICAgICAgICAgIHJlYWRPbmx5OiB0cnVlLAogICAgICAgIH0sCgogICAgICAgIC8qKgogICAgICAgICAqIElmIHRydWUsIGEgdG91Y2htb3ZlIG9uIHRoZSBzbGlkZXIgYmFyIGRvZXNuJ3QgZHJhZyB0aGUgc2xpZGVyIHRodW5iLgogICAgICAgICAqIFRhcHBpbmcgb24gdGhlIHNsaWRlciBiYXIgc3RpbGwgdXBkYXRlcyB0aGUgc2xpZGVyJ3MgcG9zaXRpb24KICAgICAgICAgKi8KICAgICAgICBpZ25vcmVCYXJUb3VjaDogewogICAgICAgICAgdHlwZTogQm9vbGVhbiwKICAgICAgICAgIHZhbHVlOiBmYWxzZSwKICAgICAgICB9LAoKICAgICAgICAvKioKICAgICAgICAgKiBUcnVlIHdoZW4gdGhlIHVzZXIgaXMgZHJhZ2dpbmcgdGhlIHNsaWRlci4KICAgICAgICAgKi8KICAgICAgICBkcmFnZ2luZzogewogICAgICAgICAgdHlwZTogQm9vbGVhbiwKICAgICAgICAgIHZhbHVlOiBmYWxzZSwKICAgICAgICAgIHJlYWRPbmx5OiB0cnVlLAogICAgICAgICAgbm90aWZ5OiB0cnVlLAogICAgICAgIH0sCgogICAgICAgIHRyYW5zaXRpbmc6IHsKICAgICAgICAgIHR5cGU6IEJvb2xlYW4sCiAgICAgICAgICB2YWx1ZTogZmFsc2UsCiAgICAgICAgICByZWFkT25seTogdHJ1ZSwKICAgICAgICB9LAoKICAgICAgICBtYXJrZXJzOiB7CiAgICAgICAgICB0eXBlOiBBcnJheSwKICAgICAgICAgIHJlYWRPbmx5OiB0cnVlLAogICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uKCkgewogICAgICAgICAgICByZXR1cm4gW107CiAgICAgICAgICB9LAogICAgICAgIH0sCiAgICAgIH0sCgogICAgICBvYnNlcnZlcnM6IFsKICAgICAgICAnX3VwZGF0ZUtub2IodmFsdWUsIG1pbiwgbWF4LCBzbmFwcywgc3RlcCknLAogICAgICAgICdfdmFsdWVDaGFuZ2VkKHZhbHVlKScsCiAgICAgICAgJ19pbW1lZGlhdGVWYWx1ZUNoYW5nZWQoaW1tZWRpYXRlVmFsdWUpJywKICAgICAgICAnX3VwZGF0ZU1hcmtlcnMobWF4TWFya2VycywgbWluLCBtYXgsIHNuYXBzKScsCiAgICAgIF0sCgogICAgICBob3N0QXR0cmlidXRlczogewogICAgICAgIHJvbGU6ICdzbGlkZXInLAogICAgICAgIHRhYmluZGV4OiAwLAogICAgICB9LAoKICAgICAgLyoqIEB0eXBlIHshT2JqZWN0fSAqLwogICAgICBrZXlCaW5kaW5nczogewogICAgICAgICdsZWZ0JzogJ19sZWZ0S2V5JywKICAgICAgICAncmlnaHQnOiAnX3JpZ2h0S2V5JywKICAgICAgICAnZG93biBwYWdlZG93biBob21lJzogJ19kZWNyZW1lbnRLZXknLAogICAgICAgICd1cCBwYWdldXAgZW5kJzogJ19pbmNyZW1lbnR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KiAxMDApOwoKICAgICAgICB0aGlzLiQuc2xpZGVyS25vYi5zdHlsZS5sZWZ0ID0gdGhpcy5yYXRpbyArICclJzsKICAgICAgICBpZiAodGhpcy5kcmFnZ2luZykgewogICAgICAgICAgdGhpcy5fa25vYnN0YXJ0eCA9ICh0aGlzLnJhdGlvICogdGhpcy5fdykgLyAxMDA7CiAgICAgICAgICB0aGlzLnRyYW5zbGF0ZTNkKDAsIDAsIDAsIHRoaXMuJC5zbGlkZXJLbm9iKTsKICAgICAgICB9CiAgICAgIH0sCgogICAgICBfY2FsY0tub2JQb3NpdGlvbjogZnVuY3Rpb24ocmF0aW8pIHsKICAgICAgICByZXR1cm4gKHRoaXMubWF4IC0gdGhpcy5taW4pICogcmF0aW8gLyAxMDAgKyB0aGlzLm1pbjsKICAgICAgfSwKCiAgICAgIF9vblRyYWNrOiBmdW5jdGlvbihldmVudCkgewogICAgICAgIGV2ZW50LnN0b3BQcm9wYWdhdGlvbigpOwogICAgICAgIHN3aXRjaCAoZXZlbnQuZGV0YWlsLnN0YXRlKSB7CiAgICAgICAgICBjYXNlICdzdGFydCc6CiAgICAgICAgICAgIHRoaXMuX3RyYWNrU3RhcnQoZXZlbnQpOwogICAgICAgICAgICBicmVhazsKICAgICAgICAgIGNhc2UgJ3RyYWNrJzoKICAgICAgICAgICAgdGhpcy5fdHJhY2tYKGV2ZW50KTsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICBjYXNlICdlbmQnOgogICAgICAgICAgICB0aGlzLl90cmFja0VuZCgpOwogICAgICAgICAgICBicmVhazsKICAgICAgICB9CiAgICAgIH0sCgogICAgICBfdHJhY2tTdGFydDogZnVuY3Rpb24oZXZlbnQpIHsKICAgICAgICB0aGlzLl9zZXRUcmFuc2l0aW5nKGZhbHNlKTsKICAgICAgICB0aGlzLl93ID0gdGhpcy4kLnNsaWRlckJhci5vZmZzZXRXaWR0aDsKICAgICAgICB0aGlzLl94ID0gdGhpcy5yYXRpbyAqIHRoaXMuX3c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2Ugd2lsbCBjYWxsZWQgcHJldmVudCBkZWZhdWx0CiAgICAgICAgdGhpcy5mb2N1cygpOwogICAgICB9LAoKICAgICAgX2JhcmRvd246IGZ1bmN0aW9uKGV2ZW50KSB7CiAgICAgICAgaWYgKHRoaXMuX2FsbG93QmFyRXZlbnQoZXZlbnQpKSB7CiAgICAgICAgICB0aGlzLmRlYm91bmNlKCdleHBhbmRLbm9iJywgdGhpcy5fZXhwYW5kS25vYiwgNjApOwogICAgICAgICAgdGhpcy5fYmFyY2xpY2soZXZlbnQpOwogICAgICAgIH0KICAgICAgfSwKCiAgICAgIF9rbm9iVHJhbnNpdGlvbkVuZDogZnVuY3Rpb24oZXZlbnQpIHsKICAgICAgICBpZiAoZXZlbnQudGFyZ2V0ID09PSB0aGlzLiQuc2xpZGVyS25vYikgewogICAgICAgICAgdGhpcy5fc2V0VHJhbnNpdGluZyhmYWxzZSk7CiAgICAgICAgfQogICAgICB9LAoKICAgICAgX3VwZGF0ZU1hcmtlcnM6IGZ1bmN0aW9uKG1heE1hcmtlcnMsIG1pbiwgbWF4LCBzbmFwcykgewogICAgICAgIGlmICghc25hcHMpIHsKICAgICAgICAgIHRoaXMuX3NldE1hcmtlcnMoW10pOwogICAgICAgIH0KICAgICAgICB2YXIgc3RlcHMgPSBNYXRoLnJvdW5kKChtYXggLSBtaW4pIC8gdGhpcy5zdGVwKTsKICAgICAgICBpZiAoc3RlcHMgPiBtYXhNYXJrZXJzKSB7CiAgICAgICAgICBzdGVwcyA9IG1heE1hcmtlcnM7CiAgICAgICAgfQogICAgICAgIGlmIChzdGVwcyA8IDAgfHwgIWlzRmluaXRlKHN0ZXBzKSkgewogICAgICAgICAgc3RlcHMgPSAwOwogICAgICAgIH0KICAgICAgICB0aGlzLl9zZXRNYXJrZXJzKG5ldyBBcnJheShzdGVwcykpOwogICAgICB9LAoKICAgICAgX21lcmdlQ2xhc3NlczogZnVuY3Rpb24oY2xhc3NlcykgewogICAgICAgIHJldHVybiBPYmplY3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HJldHVybiB0aGlzLl9faXNSVEw7CiAgICAgIH0sCgogICAgICBfbGVmdEtleTogZnVuY3Rpb24oZXZlbnQpIHsKICAgICAgICBpZiAodGhpcy5faXNSVEwpCiAgICAgICAgICB0aGlzLl9pbmNyZW1lbnRLZXkoZXZlbnQpOwogICAgICAgIGVsc2UKICAgICAgICAgIHRoaXMuX2RlY3JlbWVudEtleShldmVudCk7CiAgICAgIH0sCgogICAgICBfcmlnaHRLZXk6IGZ1bmN0aW9uKGV2ZW50KSB7CiAgICAgICAgaWYgKHRoaXMuX2lzUlRMKQogICAgICAgICAgdGhpcy5fZGVjcmVtZW50S2V5KGV2ZW50KTsKICAgICAgICBlbHNlCiAgICAgICAgICB0aGlzLl9pbmNyZW1lbnRLZXkoZXZlbnQpOwogICAgICB9LAoKICAgICAgX2luY3JlbWVudEtleTogZnVuY3Rpb24oZXZlbnQpIHsKICAgICAgICBpZiAoIXRoaXMuZGlzYWJsZWQpIHsKICAgICAgICAgIGlmIChldmVudC5kZXRhaWwua2V5ID09PSAnZW5kJykgewogICAgICAgICAgICB0aGlzLnZhbHVlID0gdGhpcy5tYXg7CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICB0aGlzLmluY3JlbWVudCgpOwogICAgICAgICAgfQogICAgICAgICAgdGhpcy5maXJlKCdjaGFuZ2UnKTsKICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7CiAgICAgICAgfQogICAgICB9LAoKICAgICAgX2RlY3JlbWVudEtleTogZnVuY3Rpb24oZXZlbnQpIHsKICAgICAgICBpZiAoIXRoaXMuZGlzYWJsZWQpIHsKICAgICAgICAgIGlmIChldmVudC5kZXRhaWwua2V5ID09PSAnaG9tZScpIHsKICAgICAgICAgICAgdGhpcy52YWx1ZSA9IHRoaXMubWluOwogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgdGhpcy5kZWNyZW1lbnQoKTsKICAgICAgICAgIH0KICAgICAgICAgIHRoaXMuZmlyZSgnY2h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1lci5naXRodWIuaW8vUEFURU5UUy50eHQKICAgICovCiAgICBjb25zdCAkX2RvY3VtZW50Q29udGFpbmVyJDQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCd0ZW1wbGF0ZScpOwogICAgJF9kb2N1bWVudENvbnRhaW5lciQ0LnNldEF0dHJpYnV0ZSgnc3R5bGUnLCAnZGlzcGxheTogbm9uZTsnKTsKCiAgICAkX2RvY3VtZW50Q29udGFpbmVyJDQuaW5uZXJIVE1MID0gYDxkb20tbW9kdWxlIGlkPSJwYXBlci1zcGlubmVyLXN0eWxlcyI+CiAgPHRlbXBsYXRlPgogICAgPHN0eWxlPgogICAgICAvKgogICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAgICAgIC8qIFNUWUxFUyBGT1IgVEhFIFNQSU5ORVIgKi8KICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwoKICAgICAgLyoKICAgICAgICogQ29uc3RhbnRzOgogICAgICAgKiAgICAgIEFSQ1NJWkUgICAgID0gMjcwIGRlZ3JlZXMgKGFtb3VudCBvZiBjaXJjbGUgdGhlIGFyYyB0YWtlcyB1cCkKICAgICAgICogICAgICBBUkNUSU1FICAgICA9IDEzMzNtcyAodGltZSBpdCB0YWtlcyB0byBleHBhbmQgYW5kIGNvbnRyYWN0IGFyYykKICAgICAgICogICAgICBBUkNTVEFSVFJPVCA9IDIxNiBkZWdyZWVzIChob3cgbXVjaCB0aGUgc3RhcnQgbG9jYXRpb24gb2YgdGhlIGFyYwogICAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2hvdWxkIHJvdGF0ZSBlYWNoIHRpbWUsIDIxNiBnaXZlcyB1cyBhCiAgICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1IHBvaW50ZWQgc3RhciBzaGFwZSAoaXQncyAzNjAvNSAqIDMpLgogICAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRm9yIGEgNyBwb2ludGVkIHN0YXIsIHdlIG1pZ2h0IGRvCiAgICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzNjAvNyAqIDMgPSAxNTQuMjg2KQogICAgICAgKiAgICAgIFNIUklOS19USU1FID0gNDAwbXMKICAgICAgICovCgogICAgICA6aG9zdCB7CiAgICAgICAgZGlzcGxheTogaW5saW5lLWJsb2NrOwogICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTsKICAgICAgICB3aWR0aDogMjhweDsKICAgICAgICBoZWlnaHQ6IDI4cHg7CgogICAgICAgIC8qIDM2MCAqIEFSQ1RJTUUgLyAoQVJDU1RBUlRST1QgKyAoMzYwLUFSQ1NJWkUpKSAqLwogICAgICAgIC0tcGFwZXItc3Bpbm5lci1jb250YWluZXItcm90YXRpb24tZHVyYXRpb246IDE1NjhtczsKCiAgICAgICAgLyogQVJDVElNRSAqLwogICAgICAgIC0tcGFwZXItc3Bpbm5lci1leHBhbmQtY29udHJhY3QtZHVyYXRpb246IDEzMzNtczsKCiAgICAgICAgLyogNCAqIEFSQ1RJTUUgKi8KICAgICAgICAtLXBhcGVyLXNwaW5uZXItZnVsbC1jeWNsZS1kdXJhdGlvbjogNTMzMm1zOwoKICAgICAgICAvKiBTSFJJTktfVElNRSAqLwogICAgICAgIC0tcGFwZXItc3Bpbm5lci1jb29sZG93bi1kdXJhdGlvbjogNDAwbXM7CiAgICAgIH0KCiAgICAgICNzcGlubmVyQ29udGFpbmVyIHsKICAgICAgICB3aWR0aDogMTAwJTsKICAgICAgICBoZWlnaHQ6IDEwMCU7CgogICAgICAgIC8qIFRoZSBzcGlubmVyIGRvZXMgbm90IGhhdmUgYW55IGNvbnRlbnRzIHRoYXQgd291bGQgaGF2ZSB0byBiZQogICAgICAgICAqIGZsaXBwZWQgaWYgdGhlIGRpcmVjdGlvbiBjaGFuZ2VzLiBBbHdheXMgdXNlIGx0ciBzbyB0aGF0IHRoZQogICAgICAgICAqIHN0eWxlIHdvcmtzIG91dCBjb3JyZWN0bHkgaW4gYm90aCBjYXNlcy4gKi8KICAgICAgICBkaXJlY3Rpb246IGx0cjsKICAgICAgfQoKICAgICAgI3NwaW5uZXJDb250YWluZXIuYWN0aXZlIHsKICAgICAgICAtd2Via2l0LWFuaW1hdGlvbjogY29udGFpbmVyLXJvdGF0ZSB2YXIoLS1wYXBlci1zcGlubmVyLWNvbnRhaW5lci1yb3RhdGlvbi1kdXJhdGlvbikgbGluZWFyIGluZmluaXRlOwogICAgICAgIGFuaW1hdGlvbjogY29udGFpbmVyLXJvdGF0ZSB2YXIoLS1wYXBlci1zcGlubmVyLWNvbnRhaW5lci1yb3RhdGlvbi1kdXJhdGlvbikgbGluZWFyIGluZmluaXRlOwogICAgICB9CgogICAgICBALXdlYmtpdC1rZXlmcmFtZXMgY29udGFpbmVyLXJvdGF0ZSB7CiAgICAgICAgdG8geyAtd2Via2l0LXRyYW5zZm9ybTogcm90YXRlKDM2MGRlZykgfQogICAgICB9CgogICAgICBAa2V5ZnJhbWVzIGNvbnRhaW5lci1yb3RhdGUgewogICAgICAgIHRvIHsgdHJhbnNmb3JtOiByb3RhdGUoMzYwZGVnKSB9CiAgICAgIH0KCiAgICAgIC5zcGlubmVyLWxheWVyIHsKICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7CiAgICAgICAgd2lkdGg6IDEwMCU7CiAgICAgICAgaGVpZ2h0OiAxMDAlOwogICAgICAgIG9wYWNpdHk6IDA7CiAgICAgICAgd2hpdGUtc3BhY2U6IG5vd3JhcDsKICAgICAgICBjb2xvcjogdmFyKC0tcGFwZXItc3Bpbm5lci1jb2xvciwgdmFyKC0tZ29vZ2xlLWJsdWUtNTAwKSk7CiAgICAgIH0KCiAgICAgIC5sYXllci0xIHsKICAgICAgICBjb2xvcjogdmFyKC0tcGFwZXItc3Bpbm5lci1sYXllci0xLWNvbG9yLCB2YXIoLS1nb29nbGUtYmx1ZS01MDApKTsKICAgICAgfQoKICAgICAgLmxheWVyLTIgewogICAgICAgIGNvbG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H0KICAgICAgICA5MCUgeyBvcGFjaXR5OiAxIH0KICAgICAgICB0byB7IG9wYWNpdHk6IDEgfQogICAgICB9CgogICAgICBAa2V5ZnJhbWVzIGxheWVyLTEtZmFkZS1pbi1vdXQgewogICAgICAgIDAlIHsgb3BhY2l0eTogMSB9CiAgICAgICAgMjUlIHsgb3BhY2l0eTogMSB9CiAgICAgICAgMjYlIHsgb3BhY2l0eTogMCB9CiAgICAgICAgODklIHsgb3BhY2l0eTogMCB9CiAgICAgICAgOTAlIHsgb3BhY2l0eTogMSB9CiAgICAgICAgdG8geyBvcGFjaXR5OiAxIH0KICAgICAgfQoKICAgICAgQC13ZWJraXQta2V5ZnJhbWVzIGxheWVyLTItZmFkZS1pbi1vdXQgewogICAgICAgIDAlIHsgb3BhY2l0eTogMCB9CiAgICAgICAgMTUlIHsgb3BhY2l0eTogMCB9CiAgICAgICAgMjUlIHsgb3BhY2l0eTogMSB9CiAgICAgICAgNTAlIHsgb3BhY2l0eTogMSB9CiAgICAgICAgNTElIHsgb3BhY2l0eTogMCB9CiAgICAgICAgdG8geyBvcGFjaXR5OiAwIH0KICAgICAgfQoKICAgICAgQGtleWZyYW1lcyBsYXllci0yLWZhZGUtaW4tb3V0IHsKICAgICAgICAwJSB7IG9wYWNpdHk6IDAgfQogICAgICAgIDE1JSB7IG9wYWNpdHk6IDAgfQogICAgICAgIDI1JSB7IG9wYWNpdHk6IDEgfQogICAgICAgIDUwJSB7IG9wYWNpdHk6IDEgfQogICAgICAgIDUxJSB7IG9wYWNpdHk6IDAgfQogICAgICAgIHRvIHsgb3BhY2l0eTogMCB9CiAgICAgIH0KCiAgICAgIEAtd2Via2l0LWtleWZyYW1lcyBsYXllci0zLWZhZGUtaW4tb3V0IHsKICAgICAgICAwJSB7IG9wYWNpdHk6IDAgfQogICAgICAgIDQwJSB7IG9wYWNpdHk6IDAgfQogICAgICAgIDUwJSB7IG9wYWNpdHk6IDEgfQogICAgICAgIDc1JSB7IG9wYWNpdHk6IDEg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ZWFyIGJldHdlZW4gdGhlIHR3byBhZGphY2VudCBkaXYuY2lyY2xlLWNsaXBwZXIgd2hpbGUgdGhlCiAgICAgICAqIHNwaW5uZXIgaXMgcm90YXRpbmcgKGFwcGVhcnMgb24gQ2hyb21lIDUwLCBTYWZhcmkgOS4xLjEsIGFuZCBFZGdlKS4KICAgICAgICovCiAgICAgIC5zcGlubmVyLWxheWVyOjphZnRlciB7CiAgICAgICAgY29udGVudDogJyc7CiAgICAgICAgbGVmdDogNDUlOwogICAgICAgIHdpZHRoOiAxMCU7CiAgICAgICAgYm9yZGVyLXRvcC1zdHlsZTogc29saWQ7CiAgICAgIH0KCiAgICAgIC5zcGlubmVyLWxheWVyOjphZnRlciwKICAgICAgLmNpcmNsZS1jbGlwcGVyIC5jaXJjbGUgewogICAgICAgIGJveC1zaXppbmc6IGJvcmRlci1ib3g7CiAgICAgICAgcG9zaXRpb246IGFic29sdXRlOwogICAgICAgIHRvcDogMDsKICAgICAgICBib3JkZXItd2lkdGg6IHZhcigtLXBhcGVyLXNwaW5uZXItc3Ryb2tlLXdpZHRoLCAzcHgpOwogICAgICAgIGJvcmRlci1yYWRpdXM6IDUwJTsKICAgICAgfQoKICAgICAgLmNpcmNsZS1jbGlwcGVyIC5jaXJjbGUgewogICAgICAgIGJvdHRvbTogMDsKICAgICAgICB3aWR0aDogMjAwJTsKICAgICAgICBib3JkZXItc3R5bGU6IHNvbGlkOwogICAgICAgIGJvcmRlci1ib3R0b20tY29sb3I6IHRyYW5zcGFyZW50ICFpbXBvcnRhbnQ7CiAgICAgIH0KCiAgICAgIC5jaXJjbGUtY2xpcHBlci5sZWZ0IC5jaXJjbGUgewogICAgICAgIGxlZnQ6IDA7CiAgICAgICAgYm9yZGVyLXJpZ2h0LWNvbG9yOiB0cmFuc3BhcmVudCAhaW1wb3J0YW50OwogICAgICAgIC13ZWJraXQtdHJhbnNmb3JtOiByb3RhdGUoMTI5ZGVnKTsKICAgICAgICB0cmFuc2Zvcm06IHJvdGF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CiAgICA8c3R5bGU+CiAgICAgIDpob3N0IHsKICAgICAgICBAYXBwbHkgLS1sYXlvdXQtaW5saW5lOwogICAgICAgIEBhcHBseSAtLWxheW91dC1jZW50ZXI7CiAgICAgICAgQGFwcGx5IC0tbGF5b3V0LWNlbnRlci1qdXN0aWZpZWQ7CiAgICAgICAgQGFwcGx5IC0tbGF5b3V0LWZsZXgtYXV0bzsKCiAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlOwogICAgICAgIHBhZGRpbmc6IDAgMTJweDsKICAgICAgICBvdmVyZmxvdzogaGlkZGVuOwogICAgICAgIGN1cnNvcjogcG9pbnRlcjsKICAgICAgICB2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlOwoKICAgICAgICBAYXBwbHkgLS1wYXBlci1mb250LWNvbW1vbi1iYXNlOwogICAgICAgIEBhcHBseSAtLXBhcGVyLXRhYjsKICAgICAgfQoKICAgICAgOmhvc3QoOmZvY3VzKSB7CiAgICAgICAgb3V0bGluZTogbm9uZTsKICAgICAgfQoKICAgICAgOmhvc3QoW2xpbmtdKSB7CiAgICAgICAgcGFkZGluZzogMDsKICAgICAgfQoKICAgICAgLnRhYi1jb250ZW50IHsKICAgICAgICBoZWlnaHQ6IDEwMCU7CiAgICAgICAgdHJhbnNmb3JtOiB0cmFuc2xhdGVaKDApOwogICAgICAgICAgLXdlYmtpdC10cmFuc2Zvcm06IHRyYW5zbGF0ZVooMCk7CiAgICAgICAgdHJhbnNpdGlvbjogb3BhY2l0eSAwLjFzIGN1YmljLWJlemllcigwLjQsIDAuMCwgMSwgMSk7CiAgICAgICAgQGFwcGx5IC0tbGF5b3V0LWhvcml6b250YWw7CiAgICAgICAgQGFwcGx5IC0tbGF5b3V0LWNlbnRlci1jZW50ZXI7CiAgICAgICAgQGFwcGx5IC0tbGF5b3V0LWZsZXgtYXV0bzsKICAgICAgICBAYXBwbHkgLS1wYXBlci10YWItY29udGVudDsKICAgICAgfQoKICAgICAgOmhvc3QoOm5vdCguaXJv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CByZWZsZWN0VG9BdHRyaWJ1dGU6IHRydWV9CgogICAgICB9LAoKICAgICAgLyoqIEBwcml2YXRlICovCiAgICAgIGhvc3RBdHRyaWJ1dGVzOiB7cm9sZTogJ3RhYid9LAoKICAgICAgbGlzdGVuZXJzOiB7ZG93bjogJ191cGRhdGVOb2luaycsIHRhcDogJ19vblRhcCd9LAoKICAgICAgYXR0YWNoZWQ6IGZ1bmN0aW9uKCkgewogICAgICAgIHRoaXMuX3VwZGF0ZU5vaW5rKCk7CiAgICAgIH0sCgogICAgICBnZXQgX3BhcmVudE5vaW5rKCkgewogICAgICAgIHZhciBwYXJlbnQgPSBkb20odGhpcykucGFyZW50Tm9kZTsKICAgICAgICByZXR1cm4gISFwYXJlbnQgJiYgISFwYXJlbnQubm9pbms7CiAgICAgIH0sCgogICAgICBfdXBkYXRlTm9pbms6IGZ1bmN0aW9uKCkgewogICAgICAgIHRoaXMubm9pbmsgPSAhIXRoaXMubm9pbmsgfHwgISF0aGlzLl9wYXJlbnROb2luazsKICAgICAgfSwKCiAgICAgIF9vblRhcDogZnVuY3Rpb24oZXZlbnQpIHsKICAgICAgICBpZiAodGhpcy5saW5rKSB7CiAgICAgICAgICB2YXIgYW5jaG9yID0gdGhpcy5xdWVyeUVmZmVjdGl2ZUNoaWxkcmVuKCdhJyk7CgogICAgICAgICAgaWYgKCFhbmNob3IpIHsKICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgfQoKICAgICAgICAgIC8vIERvbid0IGdldCBzdHVjayBpbiBhIGxvb3AgZGVsZWdhdGluZwogICAgICAgICAgLy8gdGhlIGxpc3RlbmVyIGZyb20gdGhlIGNoaWxkIGFuY2hvcgogICAgICAgICAgaWYgKGV2ZW50LnRhcmdldCA9PT0gYW5jaG9yKSB7CiAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgIH0KCiAgICAgICAgICBhbmNob3IuY2xpY2soKTsKICAgICAgICB9CiAgICAgIH0KICAgIH0pOwoKICAgIC8qKgogICAgQGx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90aCB2YWx1ZXMgYXJlIG5lZWRlZCwgc2luY2Ugc29tZSBwaG9uZXMgcmVxdWlyZSB0aGUgdmFsdWUgdG8gYmUgXGB0cmFuc3BhcmVudFxgLiAqLwogICAgICAgIC13ZWJraXQtdGFwLWhpZ2hsaWdodC1jb2xvcjogcmdiYSgwLCAwLCAwLCAwKTsKICAgICAgICAtd2Via2l0LXRhcC1oaWdobGlnaHQtY29sb3I6IHRyYW5zcGFyZW50OwoKICAgICAgICBAYXBwbHkgLS1wYXBlci10YWJzOwogICAgICB9CgogICAgICA6aG9zdCg6ZGlyKHJ0bCkpIHsKICAgICAgICBAYXBwbHkgLS1sYXlvdXQtaG9yaXpvbnRhbC1yZXZlcnNlOwogICAgICB9CgogICAgICAjdGFic0NvbnRhaW5lciB7CiAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlOwogICAgICAgIGhlaWdodDogMTAwJTsKICAgICAgICB3aGl0ZS1zcGFjZTogbm93cmFwOwogICAgICAgIG92ZXJmbG93OiBoaWRkZW47CiAgICAgICAgQGFwcGx5IC0tbGF5b3V0LWZsZXgtYXV0bzsKICAgICAgICBAYXBwbHkgLS1wYXBlci10YWJzLWNvbnRhaW5lcjsKICAgICAgfQoKICAgICAgI3RhYnNDb250ZW50IHsKICAgICAgICBoZWlnaHQ6IDEwMCU7CiAgICAgICAgLW1vei1mbGV4LWJhc2lzOiBhdXRvOwogICAgICAgIC1tcy1mbGV4LWJhc2lzOiBhdXRvOwogICAgICAgIGZsZXgtYmFzaXM6IGF1dG87CiAgICAgICAgQGFwcGx5IC0tcGFwZXItdGFicy1jb250ZW50OwogICAgICB9CgogICAgICAjdGFic0NvbnRlbnQuc2Nyb2xsYWJsZSB7CiAgICAgICAgcG9zaXRpb246IGFic29sdXRlOwogICAgICAgIHdoaXRlLXNwYWNlOiBub3dyYXA7CiAgICAgIH0KCiAgICAgICN0YWJzQ29udGVudDpub3QoLnNjcm9sbGFibGUpLAogICAgICAjdGFic0NvbnRlbnQuc2Nyb2xsYWJsZS5maXQtY29udGFpbmVyIHsKICAgICAgICBAYXBwbHkgLS1sYXlvdXQtaG9yaXpvbnRhbDsKICAgICAgfQoKICAgICAgI3RhYnNDb250ZW50LnNjcm9sbGFibGUuZml0LWNvbnRhaW5lciB7CiAgICAgICAgbWluLXdpZHRoOiAxMDAlOwogICAgICB9CgogICAgICAjdGFic0NvbnRlbnQuc2Nyb2xsYWJsZS5maXQtY29udGFpbmVyID4gOjpzbG90dGVkKCopIHsKICAgICAgICAvKiBJRSAtIHByZXZlbnQgdGFicyBmcm9tIGNvbXByZXNzaW5nIHdoZW4gdGhleSBzaG91bGQgc2Nyb2xsLiAqLwogICAgICAgIC1tcy1mbGV4OiAxIDAgYXV0bzsKICAgICAgICAtd2Via2l0LWZsZXg6IDEgMCBhdXRvOwogICAgICAgIGZsZXg6IDEgMCBhdXRvOwogICAgICB9CgogICAgICAuaGlkZGVuIHsKICAgICAgICBkaXNwbGF5OiBub25lOwogICAgICB9CgogICAgICAubm90LXZpc2libGUgewogICAgICAgIG9wYWNpdHk6IDA7CiAgICAgICAgY3Vyc29yOiBkZWZhdWx0OwogICAgICB9CgogICAgICBwYXBlci1pY29uLWJ1dHRvbiB7CiAgICAgICAgd2lkdGg6IDQ4cHg7CiAgICAgICAgaGVpZ2h0OiA0OHB4OwogICAgICAgIHBhZGRpbmc6IDEycHg7CiAgICAgICAgbWFyZ2luOiAwIDRweDsKICAgICAgfQoKICAgICAgI3NlbGVjdGlvbkJhciB7CiAgICAgICAgcG9zaXRpb246IGFic29sdXRlOwogICAgICAgIGhlaWdodDogMDsKICAgICAgICBib3R0b206IDA7CiAgICAgICAgbGVmdDogMDsKICAgICAgICByaWdodDogMDsKICAgICAgICBib3JkZXItYm90dG9tOiAycHggc29saWQgdmFyKC0tcGFwZXItdGFicy1zZWxlY3Rpb24tYmFyLWNvbG9yLCB2YXIoLS1wYXBlci15ZWxsb3ctYTEwMCkpOwogICAgICAgICAgLXdlYmtpdC10cmFuc2Zvc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AoKICAgICAgX3NldE5vaW5rQXR0cmlidXRlOiBmdW5jdGlvbihlbGVtZW50KSB7CiAgICAgICAgZWxlbWVudC5zZXRBdHRyaWJ1dGUoJ25vaW5rJywgJycpOwogICAgICB9LAoKICAgICAgX3JlbW92ZU5vaW5rQXR0cmlidXRlOiBmdW5jdGlvbihlbGVtZW50KSB7CiAgICAgICAgZWxlbWVudC5yZW1vdmVBdHRyaWJ1dGUoJ25vaW5rJyk7CiAgICAgIH0sCgogICAgICBfY29tcHV0ZVNjcm9sbEJ1dHRvbkNsYXNzOiBmdW5jdGlvbigKICAgICAgICAgIGhpZGVUaGlzQnV0dG9uLCBzY3JvbGxhYmxlLCBoaWRlU2Nyb2xsQnV0dG9ucykgewogICAgICAgIGlmICghc2Nyb2xsYWJsZSB8fCBoaWRlU2Nyb2xsQnV0dG9ucykgewogICAgICAgICAgcmV0dXJuICdoaWRkZW4nOwogICAgICAgIH0KCiAgICAgICAgaWYgKGhpZGVUaGlzQnV0dG9uKSB7CiAgICAgICAgICByZXR1cm4gJ25vdC12aXNpYmxlJzsKICAgICAgICB9CgogICAgICAgIHJldHVybiAnJzsKICAgICAgfSwKCiAgICAgIF9jb21wdXRlVGFic0NvbnRlbnRDbGFzczogZnVuY3Rpb24oc2Nyb2xsYWJsZSwgZml0Q29udGFpbmVyKSB7CiAgICAgICAgcmV0dXJuIHNjcm9sbGFibGUgPyAnc2Nyb2xsYWJsZScgKyAoZml0Q29udGFpbmVyID8gJyBmaXQtY29udGFpbmVyJyA6ICcnKSA6CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnIGZpdC1jb250YWluZXInOwogICAgICB9LAoKICAgICAgX2NvbXB1dGVTZWxlY3Rpb25CYXJDbGFzczogZnVuY3Rpb24obm9CYXIsIGFsaWduQm90dG9tKSB7CiAgICAgICAgaWYgKG5vQmFyKSB7CiAgICAgICAgICByZXR1cm4gJ2hpZGRlbic7CiAgICAgICAgfSBlbHNlIGlmIChhbGlnbkJvdHRvbSkgew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AgICB0aGlzLl9jYWxjUGVyY2VudCh0YWJPZmZzZXRMZWZ0LCB3KSArIG0pOwogICAgICAgIH0KCiAgICAgICAgaWYgKHRoaXMuc2Nyb2xsYWJsZSkgewogICAgICAgICAgdGhpcy5fc2Nyb2xsVG9TZWxlY3RlZElmTmVlZGVkKHRhYlJlY3Qud2lkdGgsIHRhYk9mZnNldExlZnQpOwogICAgICAgIH0KICAgICAgfSwKCiAgICAgIF9zY3JvbGxUb1NlbGVjdGVkSWZOZWVkZWQ6IGZ1bmN0aW9uKHRhYldpZHRoLCB0YWJPZmZzZXRMZWZ0KSB7CiAgICAgICAgdmFyIGwgPSB0YWJPZmZzZXRMZWZ0IC0gdGhpcy4kLnRhYnNDb250YWluZXIuc2Nyb2xsTGVmdDsKICAgICAgICBpZiAobCA8IDApIHsKICAgICAgICAgIHRoaXMuJC50YWJzQ29udGFpbmVyLnNjcm9sbExlZnQgKz0gbDsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgbCArPSAodGFiV2lkdGggLSB0aGlzLiQudGFic0NvbnRhaW5lci5vZmZzZXRXaWR0aCk7CiAgICAgICAgICBpZiAobCA+IDApIHsKICAgICAgICAgICAgdGhpcy4kLnRhYnNDb250YWluZXIuc2Nyb2xsTGVmdCArPSBsOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfSwKCiAgICAgIF9jYWxjUGVyY2VudDogZnVuY3Rpb24odywgdzApIHsKICAgICAgICByZXR1cm4gMTAwICogdyAvIHcwOwogICAgICB9LAoKICAgICAgX3Bvc2l0aW9uQmFyOiBmdW5jdGlvbih3aWR0aCwgbGVmdCkgewogICAgICAgIHdpZHRoID0gd2lkdGggfHwgMDsKICAgICAgICBsZWZ0ID0gbGVmdCB8fCAwOwoKICAgICAgICB0aGlzLl93aWR0aCA9IHdpZHRoOwogICAgICAgIHRoaXMuX2xlZnQgPSBsZWZ0OwogICAgICAgIHRoaXMudHJhbnNmb3JtKAogICAgICAgICAgICAndHJhbnNsYXRlWCgnIC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ICAgICAgICBvcGFjaXR5OiAwOwogICAgICAgIC13ZWJraXQtdHJhbnNmb3JtOiB0cmFuc2xhdGVZKDEwMHB4KTsKICAgICAgICB0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoMTAwcHgpOwogICAgICAgIEBhcHBseSAtLXBhcGVyLWZvbnQtY29tbW9uLWJhc2U7CiAgICAgIH0KCiAgICAgIDpob3N0KC5jYXBzdWxlKSB7CiAgICAgICAgYm9yZGVyLXJhZGl1czogMjRweDsKICAgICAgfQoKICAgICAgOmhvc3QoLmZpdC1ib3R0b20pIHsKICAgICAgICB3aWR0aDogMTAwJTsKICAgICAgICBtaW4td2lkdGg6IDA7CiAgICAgICAgYm9yZGVyLXJhZGl1czogMDsKICAgICAgICBtYXJnaW46IDA7CiAgICAgIH0KCiAgICAgIDpob3N0KC5wYXBlci10b2FzdC1vcGVuKSB7CiAgICAgICAgb3BhY2l0eTogMTsKICAgICAgICAtd2Via2l0LXRyYW5zZm9ybTogdHJhbnNsYXRlWSgwcHgpOwogICAgICAgIHRyYW5zZm9ybTogdHJhbnNsYXRlWSgwcHgpOwogICAgICB9CiAgICA8L3N0eWxlPgoKICAgIDxzcGFuIGlkPSJsYWJlbCI+e3t0ZXh0fX08L3NwYW4+CiAgICA8c2xvdD48L3Nsb3Q+CmAsCgogICAgICBpczogJ3BhcGVyLXRvYXN0JywKICAgICAgYmVoYXZpb3JzOiBbSXJvbk92ZXJsYXlCZWhhdmlvcl0sCgogICAgICBwcm9wZXJ0aWVzOiB7CiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIGVsZW1lbnQgdG8gZml0IGB0aGlzYCBpbnRvLgogICAgICAgICAqIE92ZXJyaWRkZW4gZnJvbSBgUG9seW1lci5Jcm9uRml0QmVoYXZpb3JgLgogICAgICAgICAqLwogICAgICAgIGZpdEludG86IHt0eXBlOiBPYmplY3QsIHZhbHVlOiB3aW5kb3csIG9ic2VydmVyOiAnX29uRml0SW50b0NoYW5nZWQnfSwKCiAgICAg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oqCiAgICAgICAqIFJlYWQtb25seS4gQ2FuIGF1dG8tY2xvc2UgaWYgZHVyYXRpb24gaXMgYSBwb3NpdGl2ZSBmaW5pdGUgbnVtYmVyLgogICAgICAgKiBAcHJvcGVydHkgX2NhbkF1dG9DbG9zZQogICAgICAgKi8KICAgICAgZ2V0IF9jYW5BdXRvQ2xvc2UoKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuZHVyYXRpb24gPiAwICYmIHRoaXMuZHVyYXRpb24gIT09IEluZmluaXR5OwogICAgICB9LAoKICAgICAgY3JlYXRlZDogZnVuY3Rpb24oKSB7CiAgICAgICAgdGhpcy5fYXV0b0Nsb3NlID0gbnVsbDsKICAgICAgICBJcm9uQTExeUFubm91bmNlci5yZXF1ZXN0QXZhaWxhYmlsaXR5KCk7CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogU2hvdyB0aGUgdG9hc3QuIFdpdGhvdXQgYXJndW1lbnRzLCB0aGlzIGlzIHRoZSBzYW1lIGFzIGBvcGVuKClgIGZyb20KICAgICAgICogYElyb25PdmVybGF5QmVoYXZpb3JgLgogICAgICAgKiBAcGFyYW0geyhPYmplY3R8c3RyaW5nKT19IHByb3BlcnRpZXMgUHJvcGVydGllcyB0byBiZSBzZXQgYmVmb3JlIG9wZW5pbmcgdGhlIHRvYXN0LgogICAgICAgKiBlLmcuIGB0b2FzdC5zaG93KCdoZWxsbycpYCBvciBgdG9hc3Quc2hvdyh7dGV4dDogJ2hlbGxvJywgZHVyYXRpb246IDMwMDB9KWAKICAgICAgICovCiAgICAgIHNob3c6IGZ1bmN0aW9uKHByb3BlcnRpZXMpIHsKICAgICAgICBpZiAodHlwZW9mIHByb3BlcnRpZXMgPT0gJ3N0cmluZycpIHsKICAgICAgICAgIHByb3BlcnRpZXMgPSB7dGV4dDogcHJvcGVydGllc307CiAgICAgICAgfQogICAgICAgIGZvciAodmFyIHByb3BlcnR5IGluIHByb3BlcnRpZXMpIHsKICAgICAgICAgIGlmIChwcm9wZXJ0eS5pbmRleE9mKCdfJykgPT09IDApIHsKICAgICAgICAgICAgQmFzZS5fd2FybigKICAgICAgICAgICAgICAgICdUaGUgcHJvcGVydHkgIicgKyBwcm9wZXJ0eSArICciIGlzIHByaXZhdGUgYW5kIHdhcyBub3Qgc2V0LicpOwogICAgICAgICAgfSBlbHNlIGlmIChwcm9wZXJ0eSBpbiB0aGlzKSB7CiAgICAgICAgICAgIHRoaXNbcHJvcGVydHldID0gcHJvcGVydGllc1twcm9wZXJ0eV07CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICBCYXNlLl93YXJuKCdUaGUgcHJvcGVydHkgIicgKyBwcm9wZXJ0eSArICciIGlzIG5vdCB2YWxpZC4nKTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgdGhpcy5vcGVuKCk7CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogSGlkZSB0aGUgdG9hc3QuIFNhbWUgYXMgYGNsb3NlKClgIGZyb20gYElyb25PdmVybGF5QmVoYXZpb3JgLgogICAgICAgKi8KICAgICAgaGlkZTogZnVuY3Rpb24oKSB7CiAgICAgICAgdGhpcy5jbG9zZSgpOwogICAgICB9LAoKICAgICAgLyoqCiAgICAgICAqIENhbGxlZCBvbiB0cmFuc2l0aW9ucyBvZiB0aGUgdG9hc3QsIGluZGljYXRpbmcgYSBmaW5pc2hlZCBhbmltYXRpb24KICAgICAgICogQHByaXZhdGUKICAgICAgICovCiAgICAgIF9fb25UcmFuc2l0aW9uRW5kOiBmdW5jdGlvbihlKSB7CiAgICAgICAgLy8gdGhlcmUgYXJlIGRpZmZlcmVudCB0cmFuc2l0aW9ucyB0aGF0IGFyZSBoYXBwZW5pbmcgd2hlbiBvcGVuaW5nIGFuZAogICAgICAgIC8vIGNsb3NpbmcgdGhlIHRvYXN0LiBUaGUgbGFzdCBvbmUgc28gZmFyIGlzIGZvciBgb3BhY2l0eWAuCiAgICAgICAgLy8gVGhpcyBtYXJrcyB0aGUgZW5kIG9mIHRoZSB0cmFuc2l0aW9uLCBzbyB3ZSBjaGVjayBmb3IgdGhpcyB0byBkZXRlcm1pbmUKICAgICAgICAvLyBpZiB0aGlzIGlzIHRoZSBjb3JyZWN0IGV2ZW50LgogICAgICAgIGlmIChlICYmIGUudGFyZ2V0ID09PSB0aGlzICYmIGUucHJvcGVydHlOYW1lID09PSAnb3BhY2l0eScpIHsKICAgICAgICAgIGlmICh0aGlzLm9wZW5lZCkgewogICAgICAgICAgICB0aGlzLl9maW5pc2hSZW5kZXJPcGVuZWQoKTsKICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIHRoaXMuX2ZpbmlzaFJlbmRlckNsb3NlZCgpOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgKiBPdmVycmlkZGVuIGZyb20gYElyb25PdmVybGF5QmVoYXZpb3JgLgogICAgICAgKiBDYWxsZWQgd2hlbiB0aGUgdmFsdWUgb2YgYG9wZW5lZGAgY2hhbmdlcy4KICAgICAgICovCiAgICAgIF9vcGVuZWRDaGFuZ2VkOiBmdW5jdGlvbigpIHsKICAgICAgICBpZiAodGhpcy5fYXV0b0Nsb3NlICE9PSBudWxsKSB7CiAgICAgICAgICB0aGlzLmNhbmNlbEFzeW5jKHRoaXMuX2F1dG9DbG9zZSk7CiAgICAgICAgICB0aGlzLl9hdXRvQ2xvc2UgPSBudWxsOwogICAgICAgIH0KICAgICAgICBpZiAodGhpcy5vcGVuZWQpIHsKICAgICAgICAgIGlmIChjdXJyZW50VG9hc3QgJiYgY3VycmVudFRvYXN0ICE9PSB0aGlzKSB7CiAgICAgICAgICAgIGN1cnJlbnRUb2FzdC5jbG9zZSgpOwogICAgICAgICAgfQogICAgICAgICAgY3VycmVudFRvYXN0ID0gdGhpczsKICAgICAgICAgIHRoaXMuZmlyZSgnaXJvbi1hbm5vdW5jZScsIHt0ZXh0OiB0aGlzLnRleHR9KTsKICAgICAgICAgIGlmICh0aGlzLl9jYW5BdXRvQ2xvc2UpIHsKICAgICAgICAgICAgdGhpcy5fYXV0b0Nsb3NlID0gdGhpcy5hc3luYyh0aGlzLmNsb3NlLCB0aGlzLmR1cmF0aW9uKTsKICAgICAgICAgIH0KICAgICAgICB9IGVsc2UgaWYgKGN1cnJlbnRUb2FzdCA9PT0gdGhpcykgewogICAgICAgICAgY3VycmVudFRvYXN0ID0gbnVsbDsKICAgICAgICB9CiAgICAgICAgSXJvbk92ZXJsYXlCZWhhdmlvckltcGwuX29wZW5lZENoYW5nZWQuYXBwbHkodGhpcywgYXJndW1lbnRzKTsKICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgKiBPdmVycmlkZGVuIGZyb20gYElyb25PdmVybGF5QmVoYXZpb3JgLgogICAgICAgKi8KICAgICAgX3JlbmRlck9wZW5lZDogZnVuY3Rpb24oKSB7CiAgICAgICAgdGhpcy5jbGFzc0xpc3QuYWRkKCdwYXBlci10b2FzdC1vcGVuJyk7CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogT3ZlcnJpZGRlbiBmcm9tIGBJcm9uT3ZlcmxheUJlaGF2aW9yYC4KICAgICAgICovCiAgICAgIF9yZW5kZXJDbG9zZWQ6IGZ1bmN0aW9uKCkgewogICAgICAgIHRoaXMuY2xhc3NMaXN0LnJlbW92ZSgncGFwZXItdG9hc3Qtb3BlbicpOwogICAgICB9LAoKICAgICAgLyoqCiAgICAgICAqIEBwcml2YXRlCiAgICAgICAqLwogICAgICBfb25GaXRJbnRvQ2hhbmdlZDogZnVuY3Rpb24oZml0SW50bykgewogICAgICAgIHRoaXMucG9zaXRpb25UYXJnZXQgPSBmaXRJbnRvOwogICAgICB9CgogICAgICAvKioKICAgICAgICogRmlyZWQgd2hlbiBgcGFwZXItdG9hc3RgIGlzIG9wZW5lZC4KICAgICAgICoKICAgICAgICogQGV2ZW50ICdpcm9uLWFubm91bmNlJwogICAgICAgKiBAcGFyYW0ge3t0ZXh0OiBzdHJpbmd9fSBkZXRhaWwgQ29udGFpbnMgdGV4d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ZW50QmVoYXZpb3JdLAoKICAgICAgLyoqIEBwcml2YXRlICovCiAgICAgIGhvc3RBdHRyaWJ1dGVzOiB7cm9sZTogJ2J1dHRvbicsICdhcmlhLXByZXNzZWQnOiAnZmFsc2UnLCB0YWJpbmRleDogMH0sCgogICAgICBwcm9wZXJ0aWVzOiB7CiAgICAgICAgICAvKioKICAgICAgICAgICAqIEZpcmVkIHdoZW4gdGhlIGNoZWNrZWQgc3RhdGUgY2hhbmdlcyBkdWUgdG8gdXNlciBpbnRlcmFjdGlvbi4KICAgICAgICAgICAqCiAgICAgICAgICAgKiBAZXZlbnQgY2hhbmdlCiAgICAgICAgICAgKi8KICAgICAgICAgIC8qKgogICAgICAgICAgICogRmlyZWQgd2hlbiB0aGUgY2hlY2tlZCBzdGF0ZSBjaGFuZ2VzLgogICAgICAgICAgICoKICAgICAgICAgICAqIEBldmVudCBpcm9uLWNoYW5nZQogICAgICAgICAgICovCiAgICAgIH0sCgogICAgICBsaXN0ZW5lcnM6IHt0cmFjazogJ19vbnRyYWNrJ30sCgogICAgICBhdHRhY2hlZDogZnVuY3Rpb24oKSB7CiAgICAgICAgYWZ0ZXJOZXh0UmVuZGVyKHRoaXMsIGZ1bmN0aW9uKCkgewogICAgICAgICAgc2V0VG91Y2hBY3Rpb24odGhpcywgJ3Bhbi15Jyk7CiAgICAgICAgfSk7CiAgICAgIH0sCgogICAgICBfb250cmFjazogZnVuY3Rpb24oZXZlbnQpIHsKICAgICAgICB2YXIgdHJhY2sgPSBldmVudC5kZXRhaWw7CiAgICAgICAgaWYgKHRyYWNrLnN0YXRlID09PSAnc3RhcnQnKSB7CiAgICAgICAgICB0aGlzLl90cmFja1N0YXJ0KHRyYWNrKTsKICAgICAgICB9IGVsc2UgaWYgKHRyYWNrLnN0YXRlID09PSAndHJhY2snKSB7CiAgICAgICAgICB0aGlzLl90cmFja01vdmUodHJhY2spOwogICAgICAgIH0gZWxzZSBpZiAodHJhY2suc3RhdGUgPT09ICdlbmQnKSB7C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BodG1sYAogICAgPHN0eWxlPgogICAgICA6aG9zdCB7CiAgICAgICAgLS1jYWxjdWxhdGVkLXBhcGVyLXRvb2xiYXItaGVpZ2h0OiB2YXIoLS1wYXBlci10b29sYmFyLWhlaWdodCwgNjRweCk7CiAgICAgICAgLS1jYWxjdWxhdGVkLXBhcGVyLXRvb2xiYXItc20taGVpZ2h0OiB2YXIoLS1wYXBlci10b29sYmFyLXNtLWhlaWdodCwgNTZweCk7CiAgICAgICAgZGlzcGxheTogYmxvY2s7CiAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlOwogICAgICAgIGJveC1zaXppbmc6IGJvcmRlci1ib3g7CiAgICAgICAgLW1vei1ib3gtc2l6aW5nOiBib3JkZXItYm94OwogICAgICAgIGhlaWdodDogdmFyKC0tY2FsY3VsYXRlZC1wYXBlci10b29sYmFyLWhlaWdodCk7CiAgICAgICAgYmFja2dyb3VuZDogdmFyKC0tcGFwZXItdG9vbGJhci1iYWNrZ3JvdW5kLCB2YXIoLS1wcmltYXJ5LWNvbG9yKSk7CiAgICAgICAgY29sb3I6IHZhcigtLXBhcGVyLXRvb2xiYXItY29sb3IsIHZhcigtLWRhcmstdGhlbWUtdGV4dC1jb2xvcikpOwogICAgICAgIEBhcHBseSAtLXBhcGVyLXRvb2xiYXI7CiAgICAgIH0KCiAgICAgIDpob3N0KC5hbmltYXRlKSB7CiAgICAgICAgdHJhbnNpdGlvbjogdmFyKC0tcGFwZXItdG9vbGJhci10cmFuc2l0aW9uLCBoZWlnaHQgMC4xOHMgZWFzZS1pbik7CiAgICAgIH0KCiAgICAgIDpob3N0KC5tZWRpdW0tdGFsbCkgewogICAgICAgIGhlaWdodDogY2FsYyh2YXIoLS1jYWxjdWxhdGVkLXBhcGVyLXRvb2xiYXItaGVpZ2h0KSAqIDIpOwogICAgICAgIEBhcHBseSAtLXBhcGVyLXRvb2xiYXItbWVkaXVtOwogICAgICB9CgogICAgICA6aG9zdCgudGFsbCkgewogICAgICAgIGhlaWdodDogY2FsYyh2YXIoLS1jYWxjdWxhdGVkLXBhcGVyLXRvb2xiYXItaGVpZ2h0KSAqIDMpOwogICAgICAgIEBhcHBseSAtLXBhcGVyLXRvb2xiYXItdGFsbDsKICAgICAgfQoKICAgICAgLnRvb2xiYXItdG9vbHMgewogICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTsKICAgICAgICBoZWlnaHQ6IHZhcigtLWNhbGN1bGF0ZWQtcGFwZXItdG9vbGJhci1oZWlnaHQpOwogICAgICAgIHBhZGRpbmc6IDAgMTZweDsKICAgICAgICBwb2ludGVyLWV2ZW50czogbm9uZTsKICAgICAgICBAYXBwbHkgLS1sYXlvdXQtaG9yaXpvbnRhbDsKICAgICAgICBAYXBwbHkgLS1sYXlvdXQtY2VudGVyOwogICAgICAgIEBhcHBseSAtLXBhcGVyLXRvb2xiYXItY29udGVudDsKICAgICAgfQoKICAgICAgLyoKICAgICAgICogVE9ETzogV2hlcmUgc2hvdWxkIG1lZGlhIHF1ZXJ5IGJyZWFrcG9pbnRzIGxpdmUgc28gdGhleSBjYW4gYmUgc2hhcmVkIGJldHdlZW4gZWxlbWVudHM/CiAgICAgICAqLwoKICAgICAgQG1lZGlhIChtYXgtd2lkdGg6IDYwMHB4KSB7CiAgICAgICAgOmhvc3QgewogICAgICAgICAgaGVpZ2h0OiB2YXIoLS1jYWxjdWxhdGVkLXBhcGVyLXRvb2xiYXItc20taGVpZ2h0KTsKICAgICAgICB9CgogICAgICAgIDpob3N0KC5tZWRpdW0tdGFsbCkgewogICAgICAgICAgaGVpZ2h0OiBjYWxjKHZhcigtLWNhbGN1bGF0ZWQtcGFwZXItdG9vbGJhci1zbS1oZWlnaHQpICogMik7CiAgICAgICAgfQoKICAgICAgICA6aG9zdCgudGFsbCkgewogICAgICAgICAgaGVpZ2h0OiBjYWxjKHZhcigtLWNhbGN1bGF0ZWQtcGFwZXItdG9vbGJhci1zbS1oZWlnaHQpICogMyk7CiAgICAgICAgfQoKICAgICAgICAudG9vbGJhci10b29scyB7CiAgICAgICAgICBoZWlnaHQ6IHZhcigtLWNhbGN1bGF0ZWQtcGFwZXItdG9vbGJhci1zbS1oZWlnaHQpOwogICAgICAgIH0KICAgICAgfQoKICAgICAgI3RvcEJhciB7CiAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlOwogICAgICB9CgogICAgICAvKiBtaWRkbGUgYmFyICovCiAgICAgICNtaWRkbGVCYXIgewogICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTsKICAgICAgICB0b3A6IDA7CiAgICAgICAgcmlnaHQ6IDA7CiAgICAgICAgbGVmdDogMDsKICAgICAgfQoKICAgICAgOmhvc3QoLnRhbGwpICNtaWRkbGVCYXIsCiAgICAgIDpob3N0KC5tZWRpdW0tdGFsbCkgI21pZGRsZUJhciB7CiAgICAgICAgLXdlYmtpdC10cmFuc2Zvcm06IHRyYW5zbGF0ZVkoMTAwJSk7CiAgICAgICAgdHJhbnNmb3JtOiB0cmFuc2xhdGVZKDEwMCUpOwogICAgICB9CgogICAgICAvKiBib3R0b20gYmFyICovCiAgICAgICNib3R0b21CYXIgewogICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTsKICAgICAgICByaWdodDogMDsKICAgICAgICBib3R0b206IDA7CiAgICAgICAgbGVmdDogMDsKICAgICAgfQoKICAgICAgLyoKICAgICAgICogbWFrZSBlbGVtZW50cyAoZS5nLiBidXR0b25zKSByZXNwb25kIHRvIG1vdXNlL3RvdWNoIGV2ZW50cwogICAgICAgKgogICAgICAgKiBcYC50b29sYmFyLXRvb2xzXGAgZGlzYWJsZXMgdG91Y2ggZXZlbnRzIHNvIG11bHRpcGxlIHRvb2xiYXJzIGNhbiBzdGFjayBhbmQgbm90CiAgICAgICAqIGFic29yYiBldmVudHMuIEFsbCBjaGlsZHJlbiBtdXN0IGhhdmUgcG9pbnRlciBldmVudHMgcmUtZW5hYmxlZCB0byB3b3JrIGFzCiAgICAgICAqIGV4cGVjdGVkLgogICAgICAgKi8KICAgICAgLnRvb2xiYXItdG9vbHMgPiA6OnNsb3R0ZWQoKjpub3QoW2Rpc2FibGVkXSkpIHsKICAgICAgICBwb2ludGVyLWV2ZW50czogYXV0bzsKICAgICAgfQoKICAgICAgLnRvb2xiYXItdG9vbHMgPiA6OnNsb3R0ZWQoLnRpdGxlKSB7CiAgICAgICAgQGFwcGx5IC0tcGFwZXItZm9udC1jb21tb24tYmFzZTsKICAgICAgICB3aGl0ZS1zcGFjZTogbm93cmFwOwogICAgICAgIG92ZXJmbG93OiBoaWRkZW47CiAgICAgICAgdGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7CiAgICAgICAgZm9udC1zaXplOiAyMHB4OwogICAgICAgIGZvbnQtd2VpZ2h0OiA0MDA7CiAgICAgICAgbGluZS1oZWlnaHQ6IDE7CiAgICAgICAgcG9pbnRlci1ldmVudHM6IG5vbmU7CiAgICAgICAgQGFwcGx5IC0tbGF5b3V0LWZsZXg7CiAgICAgIH0KCiAgICAgIC50b29sYmFyLXRvb2xzID4gOjpzbG90dGVkKC50aXRsZSkgewogICAgICAgIG1hcmdpbi1sZWZ0OiA1NnB4OwogICAgICB9CgogICAgICAudG9vbGJhci10b29scyA+IDo6c2xvdHRlZChwYXBlci1pY29uLWJ1dHRvbiArIC50aXRsZSkgewogICAgICAgIG1hcmdpbi1sZWZ0OiAwOwogICAgICB9CgogICAgICAvKioKICAgICAgICogVGhlIC0tcGFwZXItdG9vbGJhci10aXRsZSBtaXhpbiBpcyBhcHBsaWVkIGhlcmUgaW5zdGVhZCBvZiBhYm92ZSB0bwogICAgICAgKiBmaXggdGhlIGlzc3VlIHdpdGggbWFyZ2luLWxlZnQgYmVpbmcgaWdub3JlZCBkdWUgdG8gY3NzIG9yZGVyaW5nLgogICAgICAgKi8KICAgICAgLnRvb2xiYXItdG9vbHMgPiA6OnNsb3R0ZWQoLnRpdGxlKSB7CiAgICAgICAgQGFwcGx5IC0tcGFwZXItdG9vbGJhci10aXRsZTsKICAgICAgfQoKICAgICAgLnR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ic2VydmVyLm9ic2VydmUobm9kZSwge2NoaWxkTGlzdDogdHJ1ZSwgc3VidHJlZTogdHJ1ZX0pOwogICAgICAgIHJldHVybiBvYnNlcnZlcjsKICAgICAgfSwKCiAgICAgIF91cGRhdGVBcmlhTGFiZWxsZWRCeTogZnVuY3Rpb24oKSB7CiAgICAgICAgZmx1c2goKTsKICAgICAgICB2YXIgbGFiZWxsZWRCeSA9IFtdOwogICAgICAgIHZhciBjb250ZW50cyA9CiAgICAgICAgICAgIEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGRvbSh0aGlzLnJvb3QpLnF1ZXJ5U2VsZWN0b3JBbGwoJ3Nsb3QnKSkKICAgICAgICAgICAgICAgIC5jb25jYXQoQXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwoCiAgICAgICAgICAgICAgICAgICAgZG9tKHRoaXMucm9vdCkucXVlcnlTZWxlY3RvckFsbCgnY29udGVudCcpKSk7CgogICAgICAgIGZvciAodmFyIGNvbnRlbnQsIGluZGV4ID0gMDsgY29udGVudCA9IGNvbnRlbnRzW2luZGV4XTsgaW5kZXgrKykgewogICAgICAgICAgdmFyIG5vZGVzID0gZG9tKGNvbnRlbnQpLmdldERpc3RyaWJ1dGVkTm9kZXMoKTsKICAgICAgICAgIGZvciAodmFyIG5vZGUsIGpuZGV4ID0gMDsgbm9kZSA9IG5vZGVzW2puZGV4XTsgam5kZXgrKykgewogICAgICAgICAgICBpZiAobm9kZS5jbGFzc0xpc3QgJiYgbm9kZS5jbGFzc0xpc3QuY29udGFpbnMoJ3RpdGxlJykpIHsKICAgICAgICAgICAgICBpZiAobm9kZS5pZCkgewogICAgICAgICAgICAgICAgbGFiZWxsZWRCeS5wdXNoKG5vZGUuaWQpOwogICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICB2YXIgaWQgPSAncGFwZXItdG9vbGJhci1sYWJlbC0nICsgTWF0aC5mbG9vcihNYXRoLnJhbmRvbSgpICogMTAwMDApOwogICA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jazsKICAgICAgICBvdXRsaW5lOiBub25lOwogICAgICAgIEBhcHBseSAtLXBhcGVyLWZvbnQtY29tbW9uLWJhc2U7CiAgICAgICAgZm9udC1zaXplOiAxMHB4OwogICAgICAgIGxpbmUtaGVpZ2h0OiAxOwogICAgICAgIGJhY2tncm91bmQtY29sb3I6IHZhcigtLXBhcGVyLXRvb2x0aXAtYmFja2dyb3VuZCwgIzYxNjE2MSk7CiAgICAgICAgY29sb3I6IHZhcigtLXBhcGVyLXRvb2x0aXAtdGV4dC1jb2xvciwgd2hpdGUpOwogICAgICAgIHBhZGRpbmc6IDhweDsKICAgICAgICBib3JkZXItcmFkaXVzOiAycHg7CiAgICAgICAgQGFwcGx5IC0tcGFwZXItdG9vbHRpcDsKICAgICAgfQoKICAgICAgQGtleWZyYW1lcyBrZXlGcmFtZVNjYWxlVXAgewogICAgICAgIDAlIHsKICAgICAgICAgIHRyYW5zZm9ybTogc2NhbGUoMC4wKTsKICAgICAgICB9CiAgICAgICAgMTAwJSB7CiAgICAgICAgICB0cmFuc2Zvcm06IHNjYWxlKDEuMCk7CiAgICAgICAgfQogICAgICB9CgogICAgICBAa2V5ZnJhbWVzIGtleUZyYW1lU2NhbGVEb3duIHsKICAgICAgICAwJSB7CiAgICAgICAgICB0cmFuc2Zvcm06IHNjYWxlKDEuMCk7CiAgICAgICAgfQogICAgICAgIDEwMCUgewogICAgICAgICAgdHJhbnNmb3JtOiBzY2FsZSgwLjApOwogICAgICAgIH0KICAgICAgfQoKICAgICAgQGtleWZyYW1lcyBrZXlGcmFtZUZhZGVJbk9wYWNpdHkgewogICAgICAgIDAlIHsKICAgICAgICAgIG9wYWNpdHk6IDA7CiAgICAgICAgfQogICAgICAgIDEwMCUgewogICAgICAgICAgb3BhY2l0eTogdmFyKC0tcGFwZXItdG9vbHRpcC1vcGFjaXR5LCAwLjkpOwogICAgICAgIH0KICAgICAgfQoKICAgICAgQGtleWZyYW1lcyBrZXlGcmFtZUZhZGVPdXRPcGFjaXR5IHsKICAgICAgICAwJSB7CiAgICAgICAgICBvcGFjaXR5OiB2YXIoLS1wYXBlci10b29sdGlwLW9wYWNpdHksIDAuOSk7CiAgICAgICAgfQogICAgICAgIDEwMCUgewogICAgICAgICAgb3BhY2l0eTogMDsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIEBrZXlmcmFtZXMga2V5RnJhbWVTbGlkZURvd25JbiB7CiAgICAgICAgMCUgewogICAgICAgICAgdHJhbnNmb3JtOiB0cmFuc2xhdGVZKC0yMDAwcHgpOwogICAgICAgICAgb3BhY2l0eTogMDsKICAgICAgICB9CiAgICAgICAgMTAlIHsKICAgICAgICAgIG9wYWNpdHk6IDAuMjsKICAgICAgICB9CiAgICAgICAgMTAwJSB7CiAgICAgICAgICB0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoMCk7CiAgICAgICAgICBvcGFjaXR5OiB2YXIoLS1wYXBlci10b29sdGlwLW9wYWNpdHksIDAuOSk7CiAgICAgICAgfQogICAgICB9CgogICAgICBAa2V5ZnJhbWVzIGtleUZyYW1lU2xpZGVEb3duT3V0IHsKICAgICAgICAwJSB7CiAgICAgICAgICB0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoMCk7CiAgICAgICAgICBvcGFjaXR5OiB2YXIoLS1wYXBlci10b29sdGlwLW9wYWNpdHksIDAuOSk7CiAgICAgICAgfQogICAgICAgIDEwJSB7CiAgICAgICAgICBvcGFjaXR5OiAwLjI7CiAgICAgICAgfQogICAgICAgIDEwMCUgewogICAgICAgICAgdHJhbnNmb3JtOiB0cmFuc2xhdGVZKC0yMDAwcHgpOwogICAgICAgICAgb3BhY2l0eTogMDsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIC5mYWRlLWluLWFuaW1hdGlvbiB7CiAgICAgICAgb3BhY2l0eTogMDsKICAgICAgICBhbmltYXRpb24tZGVsYXk6IHZhcigtLXBhcGVyLXRvb2x0aXAtZGVsYXktaW4sIDUwMG1zKTsKICAgICAgICBhbmltYXRpb24tbmFt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sKICAgICAgICBvcGFjaXR5OiAwOwogICAgICAgIGFuaW1hdGlvbi1kZWxheTogdmFyKC0tcGFwZXItdG9vbHRpcC1kZWxheS1vdXQsIDUwMG1zKTsKICAgICAgICBhbmltYXRpb24tbmFtZToga2V5RnJhbWVTbGlkZURvd25JbjsKICAgICAgICBhbmltYXRpb24taXRlcmF0aW9uLWNvdW50OiAxOwogICAgICAgIGFuaW1hdGlvbi10aW1pbmctZnVuY3Rpb246IGN1YmljLWJlemllcigwLjAsIDAuMCwgMC4yLCAxKTsKICAgICAgICBhbmltYXRpb24tZHVyYXRpb246IHZhcigtLXBhcGVyLXRvb2x0aXAtZHVyYXRpb24tb3V0LCA1MDBtcyk7CiAgICAgICAgYW5pbWF0aW9uLWZpbGwtbW9kZTogZm9yd2FyZHM7CiAgICAgICAgQGFwcGx5IC0tcGFwZXItdG9vbHRpcC1hbmltYXRpb247CiAgICAgIH0KCiAgICAgIC5zbGlkZS1kb3duLWFuaW1hdGlvbi1vdXQgewogICAgICAgIHRyYW5zZm9ybTogdHJhbnNsYXRlWSgwKTsKICAgICAgICBvcGFjaXR5OiB2YXIoLS1wYXBlci10b29sdGlwLW9wYWNpdHksIDAuOSk7CiAgICAgICAgYW5pbWF0aW9uLWRlbGF5OiB2YXIoLS1wYXBlci10b29sdGlwLWRlbGF5LW91dCwgNTAwbXMpOwogICAgICAgIGFuaW1hdGlvbi1uYW1lOiBrZXlGcmFtZVNsaWRlRG93bk91dDsKICAgICAgICBhbmltYXRpb24taXRlcmF0aW9uLWNvdW50OiAxOwogICAgICAgIGFuaW1hdGlvbi10aW1pbmctZnVuY3Rpb246IGN1YmljLWJlemllcigwLjQsIDAuMCwgMSwgMSk7CiAgICAgICAgYW5pbWF0aW9uLWR1cmF0aW9uOiB2YXIoLS1wYXBlci10b29sdGlwLWR1cmF0aW9uLW91dCwgNTAwbXMpOwogICAgICAgIGFuaW1hdGlvbi1maWxsLW1vZGU6IGZvcndhcmRzOwogICAgICAgIEBhcHBseS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ICAgICAgICAgICAgJ2VudHJ5JzoKICAgICAgICAgICAgICAgICAgW3tuYW1lOiAnZmFkZS1pbi1hbmltYXRpb24nLCBub2RlOiB0aGlzLCB0aW1pbmc6IHtkZWxheTogMH19XSwKICAgICAgICAgICAgICAgICAgJ2V4aXQnOiBbe25hbWU6ICdmYWRlLW91dC1hbmltYXRpb24nLCBub2RlOiB0aGlzfV0KICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgIH0sCiAgICAgICAgX3Nob3dpbmc6IHt0eXBlOiBCb29sZWFuLCB2YWx1ZTogZmFsc2V9CiAgICAgIH0sCgogICAgICBsaXN0ZW5lcnM6IHsKICAgICAgICAnd2Via2l0QW5pbWF0aW9uRW5kJzogJ19vbkFuaW1hdGlvbkVuZCcsCiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogUmV0dXJucyB0aGUgdGFyZ2V0IGVsZW1lbnQgdGhhdCB0aGlzIHRvb2x0aXAgaXMgYW5jaG9yZWQgdG8uIEl0IGlzCiAgICAgICAqIGVpdGhlciB0aGUgZWxlbWVudCBnaXZlbiBieSB0aGUgYGZvcmAgYXR0cmlidXRlLCBvciB0aGUgaW1tZWRpYXRlIHBhcmVudAogICAgICAgKiBvZiB0aGUgdG9vbHRpcC4KICAgICAgICoKICAgICAgICogQHR5cGUge05vZGV9CiAgICAgICAqLwogICAgICBnZXQgdGFyZ2V0KCkgewogICAgICAgIHZhciBwYXJlbnROb2RlID0gZG9tKHRoaXMpLnBhcmVudE5vZGU7CiAgICAgICAgLy8gSWYgdGhlIHBhcmVudE5vZGUgaXMgYSBkb2N1bWVudCBmcmFnbWVudCwgdGhlbiB3ZSBuZWVkIHRvIHVzZSB0aGUgaG9zdC4KICAgICAgICB2YXIgb3duZXJSb290ID0gZG9tKHRoaXMpLmdldE93bmVyUm9vdCgpOwogICAgICAgIHZhciB0YXJnZXQ7CiAgICAgICAgaWYgKHRoaXMuZm9yKSB7CiAgICAgICAgICB0YXJnZXQgPSBkb20ob3duZXJSb290KS5xdWVyeVNlbGVjdG9yKCcjJyArIHRoaXMuZm9yKTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgdGFyZ2V0ID0gcGFyZW50Tm9kZS5ub2RlVHlwZSA9PSBOb2RlLkRPQ1VNRU5UX0ZSQUdNRU5UX05PREUgPwogICAgICAgICAgICAgIG93bmVyUm9vdC5ob3N0IDoKICAgICAgICAgICAgICBwYXJlbnROb2RlOwogICAgICAgIH0KICAgICAgICByZXR1cm4gdGFyZ2V0OwogICAgICB9LAoKICAgICAgLyoqCiAgICAgICAqIEByZXR1cm4ge3ZvaWR9CiAgICAgICAqLwogICAgICBhdHRhY2hlZDogZnVuY3Rpb24oKSB7CiAgICAgICAgdGhpcy5fZmluZFRhcmdldCgpOwogICAgICB9LAoKICAgICAgLyoqCiAgICAgICAqIEByZXR1cm4ge3ZvaWR9CiAgICAgICAqLwogICAgICBkZXRhY2hlZDogZnVuY3Rpb24oKSB7CiAgICAgICAgaWYgKCF0aGlzLm1hbnVhbE1vZGUpCiAgICAgICAgICB0aGlzLl9yZW1vdmVMaXN0ZW5lcnMoKTsKICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgKiBSZXBsYWNlcyBOZW9uLUFuaW1hdGlvbiBwbGF5QW5pbWF0aW9uIC0ganVzdCBjYWxscyBzaG93IGFuZCBoaWRlLgogICAgICAgKiBAZGVwcmVjYXRlZCBVc2Ugc2hvdyBhbmQgaGlkZSBpbnN0ZWFkLgogICAgICAgKiBAcGFyYW0ge3N0cmluZ30gdHlwZSBFaXRoZXIgYGVudHJ5YCBvciBgZXhpdGAKICAgICAgICovCiAgICAgIHBsYXlBbmltYXRpb246IGZ1bmN0aW9uKHR5cGUpIHsKICAgICAgICBpZiAodHlwZSA9PT0gJ2VudHJ5JykgewogICAgICAgICAgdGhpcy5zaG93KCk7CiAgICAgICAgfSBlbHNlIGlmICh0eXBlID09PSAnZXhpdCcpIHsKICAgICAgICAgIHRoaXMuaGlkZSgpOwogICAgICAgIH0KICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgKiBDYW5jZWxzIHRoZSBhbmltYXRpb24gYW5kIGVpdGhlciBmdWxseSBzaG93cyBvciBmdWxseSBoaWRlcyB0b29sdGlwCiAgICAgICAqLwogICAgICBjYW5jZWxBbmltYXRpb246IGZ1bmN0aW9uKCkgewogICAgICAgIC8vIFNob3J0LWN1dCBhbmQgY2FuY2VsIGFsbCBhbmltYXRpb25zIGFuZCBoaWRlCiAgICAgICAgdGhpcy4kLnRvb2x0aXAuY2xhc3NMaXN0LmFkZCgnY2FuY2VsLWFuaW1hdGlvbicpOwogICAgICB9LAoKICAgICAgLyoqCiAgICAgICAqIFNob3dzIHRoZSB0b29sdGlwIHByb2dyYW1hdGljYWxseQogICAgICAgKiBAcmV0dXJuIHt2b2lkfQogICAgICAgKi8KICAgICAgc2hvdzogZnVuY3Rpb24oKSB7CiAgICAgICAgLy8gSWYgdGhlIHRvb2x0aXAgaXMgYWxyZWFkeSBzaG93aW5nLCB0aGVyZSdzIG5vdGhpbmcgdG8gZG8uCiAgICAgICAgaWYgKHRoaXMuX3Nob3dpbmcpCiAgICAgICAgICByZXR1cm47CgogICAgICAgIGlmIChkb20odGhpcykudGV4dENvbnRlbnQudHJpbSgpID09PSAnJykgewogICAgICAgICAgLy8gQ2hlY2sgaWYgZWZmZWN0aXZlIGNoaWxkcmVuIGFyZSBhbHNvIGVtcHR5CiAgICAgICAgICB2YXIgYWxsQ2hpbGRyZW5FbXB0eSA9IHRydWU7CiAgICAgICAgICB2YXIgZWZmZWN0aXZlQ2hpbGRyZW4gPSBkb20odGhpcykuZ2V0RWZmZWN0aXZlQ2hpbGROb2RlcygpOwogICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBlZmZlY3RpdmVDaGlsZHJlbi5sZW5ndGg7IGkrKykgewogICAgICAgICAgICBpZiAoZWZmZWN0aXZlQ2hpbGRyZW5baV0udGV4dENvbnRlbnQudHJpbSgpICE9PSAnJykgewogICAgICAgICAg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hhdCBuZXcgc3RhdGUgd2lsbCBwcm9wYWdhdGUKICAgICAgICAgICAgICAgIC8vIHRvIHRoZSBjb21wb25lbnQgd2l0aCBzcGVjaWZpZWQgcHJvcGVydHkuIEl0IGlzIGltcG9ydGFudCB0aGF0IHRoaXMKICAgICAgICAgICAgICAgIC8vIGZ1bmN0aW9uIGRvZXMgbm90IHJlLWFzc2lnbiBuZWVkbGVzc2x5LCB0byBhdm9pZCBQb2x5bWVyIG9ic2VydmVyCiAgICAgICAgICAgICAgICAvLyBjaHVybi4KICAgICAgICAgICAgICAgIGNvbnN0IHNldENvbXBvbmVudFZhbHVlID0gKCkgPT4gewogICAgICAgICAgICAgICAgICAgIGNvbnN0IHN0b3JlZFZhbHVlID0gZ2V0KHVyaVN0b3JhZ2VOYW1lLCBmdWxsT3B0aW9ucyk7CiAgICAgICAgICAgICAgICAgICAgY29uc3QgY3VycmVudFZhbHVlID0gdGhpc1tmdWxsT3B0aW9ucy5wb2x5bWVyUHJvcGVydHldOwogICAgICAgICAgICAgICAgICAgIGlmICghbG9kYXNoLmlzRXF1YWwoc3RvcmVkVmFsdWUsIGN1cnJlbnRWYWx1ZSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1tmdWxsT3B0aW9ucy5wb2x5bWVyUHJvcGVydHldID0gc3RvcmVkVmFsdWU7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIGNvbnN0IGFkZExpc3RlbmVyID0gZnVsbE9wdGlvbnMudXNlTG9jYWxTdG9yYWdlCiAgICAgICAgICAgICAgICAgICAgPyBhZGRTdG9yYWdlTGlzdGVuZXIKICAgICAgICAgICAgICAgICAgICA6IGFkZEhhc2hMaXN0ZW5lcjsKICAgICAgICAgICAgICAgIC8vIFRPRE8oc3RlcGhhbndsZWUpOiBXaGVuIHVzaW5nIGZha2VIYXNoLCBpdCBfc2hvdWxkIG5vdF8gbGlzdGVuIHRvIHRoZQogICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgICAgIHdpbmRvdy5oYXNoY2hhbmdlLgogICAgICAgICAgICAgICAgY29uc3QgbGlzdGVuS2V5ID0gYWRkTGlzdGVuZXIoKCkgPT4gc2V0Q29tcG9uZW50VmFsdWUoKSk7CiAgICAgICAgICAgICAgICBpZiAoZnVsbE9wdGlvbnMudXNlTG9jYWxTdG9yYWdlKSB7CiAgICAgICAgICAgICAgICAgICAgc3RvcmFnZUxpc3RlbmVycy5wdXNoKGxpc3RlbktleSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBoYXNoTGlzdGVuZXJzLnB1c2gobGlzdGVuS2V5KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vIFNldCB0aGUgdmFsdWUgb24gdGhlIHByb3BlcnR5LgogICAgICAgICAgICAgICAgc2V0Q29tcG9uZW50VmFsdWUoKTsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzW2Z1bGxPcHRpb25zLnBvbHltZXJQcm9wZXJ0eV07CiAgICAgICAgICAgIH07CiAgICAgICAgfQogICAgICAgIGZ1bmN0aW9uIGRpc3Bvc2VCaW5kaW5nKCkgewogICAgICAgICAgICBoYXNoTGlzdGVuZXJzLmZvckVhY2goKGtleSkgPT4gcmVtb3ZlSGFzaExpc3RlbmVyQnlLZXkoa2V5KSk7CiAgICAgICAgICAgIHN0b3JhZ2VMaXN0ZW5lcnMuZm9yRWFjaCgoa2V5KSA9PiByZW1vdmVTdG9yYWdlTGlzdGVuZXJCeUtleShrZXkpKTsKICAgICAgICB9CiAgICAgICAgZnVuY3Rpb24gZ2V0T2JzZXJ2ZXIoa2V5LCBvcHRpb25zKSB7CiAgICAgICAgICAgIGNvbnN0IGZ1bGxPcHRpb25zID0gT2JqZWN0LmFzc2lnbih7IGRlZmF1bHRWYWx1ZTogb3B0aW9ucy5kZWZhdWx0VmFsdWUsIHBvbHltZXJQcm9wZ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Qgb25seSBzdG9yZWQKICAgICAgICAgKiBzdHJpbmdzLCBib29sZWFucy4KICAgICAgICAgKi8KICAgICAgICBjb25zdCB3aXRVcmxDb21wYXRpYmlsaXR5U2V0ID0gbmV3IFNldChbCiAgICAgICAgICAgICdleGFtcGxlc1BhdGgnLAogICAgICAgICAgICAnaGlkZU1vZGVsUGFuZTInLAogICAgICAgICAgICAnbW9kZWxOYW1lMScsCiAgICAgICAgICAgICdtb2RlbE5hbWUyJywKICAgICAgICAgICAgJ2luZmVyZW5jZUFkZHJlc3MxJywKICAgICAgICAgICAgJ2luZmVyZW5jZUFkZHJlc3MyJywKICAgICAgICAgICAgJ21vZGVsVHlwZScsCiAgICAgICAgICAgICdtb2RlbFZlcnNpb24xJywKICAgICAgICAgICAgJ21vZGVsVmVyc2lvbjInLAogICAgICAgICAgICAnbW9kZWxTaWduYXR1cmUxJywKICAgICAgICAgICAgJ21vZGVsU2lnbmF0dXJlMicsCiAgICAgICAgICAgICdtYXhFeGFtcGxlcycsCiAgICAgICAgICAgICdsYWJlbFZvY2FiUGF0aCcsCiAgICAgICAgICAgICdtdWx0aUNsYXNzJywKICAgICAgICAgICAgJ3NlcXVlbmNlRXhhbXBsZXMnLAogICAgICAgICAgICAnbWF4Q2xhc3Nlc1RvRGlzcGxheScsCiAgICAgICAgICAgICdzYW1wbGluZ09kZHMnLAogICAgICAgICAgICAndXNlUHJlZGljdEFwaScsCiAgICAgICAgICAgICdwcmVkaWN0SW5wdXRUZW5zb3InLAogICAgICAgICAgICAncHJlZGljdE91dHB1dFRlbnNvcicsCiAgICAgICAgXSk7CiAgICAgICAgY29uc3QgaXRlbXMgPSBjb21wb25lbnRUb0RpY3QocmVhZENvbXBvbmVudCgpKTsKICAgICAgICBpZiAoaXRlbXNbVEFCXSA9PT0gJ3doYXRpZicpIHsKICAgICAgICAgICAgZm9yIChsZXQgb2xkTmFtZSBvZiB3aXRVcmxDb21wYXRpYmlsaXR5U2V0KSB7CiAgICAgICAgICAgICAgICBpZiAob2xkTmFtZSBpbiBpdGVtcykgewogICAgICAgICAgICAgICAgICAgIGNvbnN0IG9sZFZhbHVlID0gaXRlbXNbb2xkTmFtZV07CiAgICAgICAgICAgICAgICAgICAgaXRlbXNbYHAud2hhdGlmLiR7b2xkTmFtZX1gXSA9IG9sZFZhbHVlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHdyaXRlQ29tcG9uZW50KGRpY3RUb0NvbXBvbmVudChpdGVtcykpOwogICAgICAgIHVybERpY3QgPSBpdGVtczsKICAgIH0KICAgIC8qKgogICAgICogR2V0IGEgdW5pcXVlIHN0b3JhZ2UgbmFtZSBmb3IgYSAoUG9seW1lciBjb21wb25lbnQsIHByb3BlcnR5TmFtZSkgdHVwbGUuCiAgICAgKgogICAgICogRElTQU1CSUdVQVRPUiBtdXN0IGJlIHNldCBvbiB0aGUgY29tcG9uZW50LCBpZiBvdGhlciBjb21wb25lbnRzIHVzZSB0aGUKICAgICAqIHNhbWUgcHJvcGVydHlOYW1lLgogICAgICovCiAgICBmdW5jdGlvbiBnZXRVUklTdG9yYWdlTmFtZShjb21wb25lbnQsIHByb3BlcnR5TmFtZSkgewogICAgICAgIGNvbnN0IGQgPSBjb21wb25lbnRbRElTQU1CSUdVQVRPUl07CiAgICAgICAgY29uc3QgY29tcG9uZW50cyA9IGQgPT0gbnVsbCA/IFtwcm9wZXJ0eU5hbWVdIDogW2QsIHByb3BlcnR5TmFtZV07CiAgICAgICAgcmV0dXJuIGNvbXBvbmVudHMuam9pbignLicpOwogICAgfQogICAgLyoqCiAgICAgKiBSZWFkIGNvbXBvbmVudCBmcm9tIFVSSSAoZS5nLiByZXR1cm5zICJldmVudHMmcnVuUHJlZml4PXRyYWluKiIpLgogICAgICovCiAgICBmdW5jdGlvbiByZWFkQ29tcG9uZW50KCkgewogICAgICAgIHJldHVybiB1c2VIYXNoKCkgPyB3aW5kb3cubG9jYXRpb24uaGFzaC5zbGljZSgxKSA6IGdldEZha2VIYXNoKCk7CiAgICB9CiAgICAvKioKICAgICAqIFdyaXRlIGNvbXBvbmVudCB0byBVUkkuCiAgICAgKi8KICAgIGZ1bmN0aW9uIHdyaXRlQ29tcG9uZW50KGNvbXBvbmVudCwgdXNlTG9jYXRpb25SZXBsYWNlID0gZmFsc2UpIHsKICAgICAgICBpZiAodXNlSGFzaCgpKSB7CiAgICAgICAgICAgIGlmICh1c2VMb2NhdGlvblJlcGxhY2UpIHsKICAgICAgICAgICAgICAgIGNvbnN0IHVybCA9IG5ldyBVUkwod2luZG93LmxvY2F0aW9uLmhyZWYpOwogICAgICAgICAgICAgICAgdXJsLmhhc2ggPSBjb21wb25lbnQ7CiAgICAgICAgICAgICAgICB3aW5kb3cuaGlzdG9yeS5yZXBsYWNlU3RhdGUobnVsbCwgJycsIHVybC50b1N0cmluZygpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHdpbmRvdy5sb2NhdGlvbi5oYXNoID0gY29tcG9uZW50OwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICBzZXRGYWtlSGFzaChjb21wb25lbnQpOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQ29udmVydCBkaWN0aW9uYXJ5IG9mIHN0cmluZ3MgaW50byBhIFVSSSBDb21wb25lbnQuCiAgICAgKiBBbGwga2V5IHZhbHVlIGVudHJpZXMgZ2V0IGFkZGVkIGFzIGtleSB2YWx1ZSBwYWlycyBpbiB0aGUgY29tcG9uZW50LAogICAgICogd2l0aCB0aGUgZXhjZXB0aW9uIG9mIGEga2V5IHdpdGggdGhlIFRBQiB2YWx1ZSwgd2hpY2ggaWYgcHJlc2VudAogICAgICogZ2V0cyBwcmVwZW5kZWQgdG8gdGhlIFVSSSBDb21wb25lbnQgc3RyaW5nIGZvciBiYWNrd2FyZHMgY29tcGF0aWJpbGl0eQogICAgICogcmVhc29ucy4KICAgICAqLwogICAgZnVuY3Rpb24gZGljdFRvQ29tcG9uZW50KGl0ZW1zKSB7CiAgICAgICAgbGV0IGNvbXBvbmVudCA9ICcnOwogICAgICAgIC8vIEFkZCB0aGUgdGFiIG5hbWUgZS5nLiAnZXZlbnRzJywgJ2ltYWdlcycsICdoaXN0b2dyYW1zJyBhcyBhIHByZWZpeAogICAgICAgIC8vIGZvciBiYWNrd2FyZHMgY29tcGF0YmlsaXR5LgogICAgICAgIGlmIChpdGVtc1tUQUJdICE9PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgY29tcG9uZW50ICs9IGl0ZW1zW1RBQl07CiAgICAgICAgfQogICAgICAgIC8vIEpvaW4gb3RoZXIgc3RyaW5ncyB3aXRoICZrZXk9dmFsdWUgbm90YXRpb24KICAgICAgICBjb25zdCBub25UYWIgPSBPYmplY3Qua2V5cyhpdGVtcykKICAgICAgICAgICAgLm1hcCgoa2V5KSA9PiBba2V5LCBpdGVtc1trZXldXSkKICAgICAgICAgICAgLmZpbHRlcigocGFpcikgPT4gcGFpclswXSAhPT0gVEFCKQogICAgICAgICAgICAubWFwKChwYWlyKSA9PiB7CiAgICAgICAgICAgIHJldHVybiBlbmNvZGVVUklDb21wb25lbnQocGFpclswXSkgKyAnPScgKyBlbmNvZGVVUklDb21wb25lbnQocGFpclsxXSk7CiAgICAgICAgfSkKICAgICAgICAgICAgLmpvaW4oJyYnKTsKICAgICAgICByZXR1cm4gbm9uVGFiLmxlbmd0aCA+IDAgPyBjb21wb25lbnQgKyAnJicgKyBub25UYWIgOiBjb21wb25lbnQ7CiAgICB9CiAgICAvKioKICAgICAqIENvbnZlcnQgYSBVUkkgQ29tcG9uZW50IGludG8gYSBkaWN0aW9uYXJ5IG9mIHN0cmluZ3MuCiAgICAgKiBDb21wb25lbnQgc2hvdWxkIGNvbnNpc3Qgb2Yga2V5LXZhbHVlIHBhaXJzIGpvaW5lZCBieSBhIGRlbGltaXRlcgogICAgICogd2l0aCB0aGUgZXhjZXB0aW9uIG9mIHRoZSB0YWJOYW1lLgogICAgICogUmV0dXJucyBkaWN0IGNvbnNpc3Rpbmcgb2YgYWxsIGtleS12YWx1ZSBwYWlycyBhbmQKICAgICAqIGRpY3RbVEFCXSA9IHRhYk5hbWUKICAgICAqLwogICAgZnVuY3Rpb24gY29tcG9uZW50VG9EaWN0KGNvbXBvbmVudCkgewogICAgICAgIGNvbnN0IGl0ZW1zID0ge307CiAgICAgICAgY29uc3QgdG9rZW5zID0gY29tcG9uZW50LnNwbGl0KCcmJyk7CiAgICAgICAgdG9rZW5zLmZvckVhY2goKHRva2VuKSA9PiB7CiAgICAgICAgICAgIGNvbnN0IGt2ID0gdG9rZW4uc3BsaXQoJz0nKTsKICAgICAgICAgICAgLy8gU3BlY2lhbCBiYWNrd2FyZHMgY29tcGF0aWJpbGl0eSBmb3IgVVJJIGNvbXBvbmVudHMgbGlrZSAjc2NhbGFycy4KICAgICAgICAgICAgaWYgKGt2Lmxlbmd0aCA9PT0gMSkgewogICAgICAgICAgICAgICAgaXRlbXNbVEFCXSA9IGt2WzBdOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKGt2Lmxlbmd0aCA9PT0gMikgewogICAgICAgICAgICAgICAgaXRlbXNbZGVjb2RlVVJJQ29tcG9uZW50KGt2WzBdKV0gPSBkZWNvZGVVUklDb21wb25lbnQoa3ZbMV0pOwogICAgICAgICAgICB9CiAgICAgICAgfSk7CiAgICAgICAgcmV0dXJuIGl0ZW1zOwogICAgfQogICAgLyoqCiAgICAgKiBEZWxldGUgYSBrZXkgZnJvbSB0aGUgVVJJLgogICAgICovCiAgICBmdW5jdGlvbiB1bnNldEZyb21VUkkoa2V5KSB7CiAgICAgICAgY29uc3QgaXRlbXMgPSBjb21wb25lbnRUb0RpY3QocmVhZENvbXBvbmVudCgpKTsKICAgICAgICBkZWxldGUgaXRlbXNba2V5XTsKICAgICAgICB3cml0ZUNvbXBvbmVudChkaWN0VG9Db21wb25lbnQoaXRlbXMpKTsKICAgIH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09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KICAgIHJlZ2lzdGVyU3R5bGVEb21Nb2R1bGUoewogICAgICAgIG1vZHVsZU5hbWU6ICdkYXNoYm9hcmQtc3R5bGUnLAogICAgICAgIHN0eWxlRGVwZW5kZW5jaWVzOiBbJ2lyb24tZmxleCddLAogICAgICAgIHN0eWxlQ29udGVudDogYAogICAgICA6aG9zdCB7CiAgICAgICAgLS1zaWRlYmFyLXZlcnRpY2FsLXBhZGRpbmc6IDE1cHg7CiAgICAgICAgLS1zaWRlYmFyLWxlZnQtcGFkZGluZzogMzBweDsKICAgICAgfQoKICAgICAgW3Nsb3Q9J3NpZGViYXInXSB7CiAgICAgICAgYm94LXNpemluZzogYm9yZGVyLWJveDsKICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47CiAgICAgICAgaGVpZ2h0OiAxMDAlOwogICAgICAgIG1hcmdpbi1yaWdodDogMTBweDsKICAgICAgICBvdmVyZmxvdy14OiBoaWRkZW47CiAgICAgICAgcGFkZGluZzogNXB4IDA7CiAgICAgICAgdGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7CiAgICAgIH0KCiAgICAgIC5zZXR0aW5ncyB7CiAgICAgICAgbWluLWhlaWdodDogNTBweDsKICAgICAgICBvdmVyZmxvdy14OiBoaWRkZW47CiAgICAgICAgb3ZlcmZsb3cteTogYXV0bzsKICAgICAgICB3aWxsLWNoYW5nZTogdHJhbnNmb3JtOwogICAgICB9CgogICAgICAucnVucy1zZWxlY3RvciB7CiAgICAgICAgZGlzcGxheTogZmxleDsKICAgICAgICBmbGV4LWdyb3c6IDE7CiAgICAgICAgbWluLWhlaWdodDogMjAwcHg7CiAgICAgIH0KCiAgICAgIHRmLXJ1bnMtc2VsZWN0b3IgewogICAgICAgIGZsZXgtZ3JvdzogMTsKICAgICAgICBmbGV4LXNocmluazogMTsKICAgIC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gICAgIGZsZXgtZGlyZWN0aW9uOiByb3c7CiAgICAgICAgaGVpZ2h0OiAxMDAlOwogICAgICB9CgogICAgICAjc2lkZWJhciB7CiAgICAgICAgZmxleDogMCAwIHZhcigtLXRmLWRhc2hib2FyZC1sYXlvdXQtc2lkZWJhci1iYXNpcywgMjUlKTsKICAgICAgICBoZWlnaHQ6IDEwMCU7CiAgICAgICAgbWF4LXdpZHRoOiB2YXIoLS10Zi1kYXNoYm9hcmQtbGF5b3V0LXNpZGViYXItbWF4LXdpZHRoLCAzNTBweCk7CiAgICAgICAgbWluLXdpZHRoOiB2YXIoLS10Zi1kYXNoYm9hcmQtbGF5b3V0LXNpZGViYXItbWluLXdpZHRoLCAyNzBweCk7CiAgICAgICAgb3ZlcmZsb3cteTogYXV0bzsKICAgICAgICB0ZXh0LW92ZXJmbG93OiBlbGxpcHNpczsKICAgICAgfQoKICAgICAgI2NlbnRlciB7CiAgICAgICAgZmxleC1ncm93OiAxOwogICAgICAgIGZsZXgtc2hyaW5rOiAxOwogICAgICAgIGhlaWdodDogMTAwJTsKICAgICAgICBvdmVyZmxvdzogaGlkZGVuOwogICAgICB9CgogICAgICA6OnNsb3R0ZWQoW3Nsb3Q9J2NlbnRlciddKSB7CiAgICAgICAgY29udGFpbjogc3RyaWN0OwogICAgICAgIGhlaWdodDogMTAwJTsKICAgICAgICBvdmVyZmxvdy14OiBoaWRkZW47CiAgICAgICAgb3ZlcmZsb3cteTogYXV0bzsKICAgICAgICB3aWR0aDogMTAwJTsKICAgICAgICB3aWxsLWNoYW5nZTogdHJhbnNmb3JtOwogICAgICB9CgogICAgICAudGYtZ3JhcGgtZGFzaGJvYXJkICNjZW50ZXIgewogICAgICAgIGJhY2tncm91bmQ6ICNmZmY7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgYDsKICAgIFRmRGFzaGJvYXJkTGF5b3V0ID0gX19kZWNvcmF0ZShbCiAgICAgICAgY3VzdG9tRWxlbWVudCgndGYtZGFzaGJvYXJkLW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hZCBhIGNoYW5jZSB0byBpbml0aWFsaXplIHByb3Blcmx5LgogICAgICAgICAgICBpZiAoIUFycmF5LmlzQXJyYXkob3JpZykpIHsKICAgICAgICAgICAgICAgIG9yaWcgPSBbXTsKICAgICAgICAgICAgICAgIHRoaXMuc2V0KHByb3AsIG9yaWcpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNvbnN0IGxvb2t1cCA9IG5ldyBTZXQobmV3VmFsLm1hcCgoaXRlbSwgaSkgPT4gZ2V0S2V5KGl0ZW0sIGkpKSk7CiAgICAgICAgICAgIGxldCBvcmlnSW5kID0gMDsKICAgICAgICAgICAgbGV0IG5ld1ZhbEluZCA9IDA7CiAgICAgICAgICAgIHdoaWxlIChvcmlnSW5kIDwgb3JpZy5sZW5ndGggJiYgbmV3VmFsSW5kIDwgbmV3VmFsLmxlbmd0aCkgewogICAgICAgICAgICAgICAgaWYgKCFsb29rdXAuaGFzKGdldEtleShvcmlnW29yaWdJbmRdLCBvcmlnSW5kKSkpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLnNwbGljZShwcm9wLCBvcmlnSW5kLCAxKTsKICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKGdldEtleShvcmlnW29yaWdJbmRdLCBvcmlnSW5kKSA9PSBnZXRLZXkobmV3VmFsW25ld1ZhbEluZF0sIG5ld1ZhbEluZCkpIHsKICAgICAgICAgICAgICAgICAgICAvLyB1cGRhdGUgdGhlIGVsZW1lbnQuCiAgICAgICAgICAgICAgICAgICAgLy8gVE9ETyhzdGVwaGFud2xlZSk6IFdlIG1heSBiZSBhYmxlIHRvIHVwZGF0ZSB0aGUgb3JpZ2luYWwgcmVmZXJlbmNlIG9mCiAgICAgICAgICAgICAgICAgICAgLy8gdGhlIGB2YWx1ZWAgYnkgZGVlcC1jb3B5aW5nIHRoZSBuZXcgdmFsdWUgb3Zlci4KICAgICAgICAgICAgICAgICAgICB0aGlzLnNldChgJHtwcm9wfS4ke29yaWdJbmR9YCwgbmV3VmFsW25ld1ZhbEluZF0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5zcGxpY2UocHJvcCwgb3JpZ0luZCwgMCwgbmV3VmFsW25ld1ZhbEluZF0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgbmV3VmFsSW5kKys7CiAgICAgICAgICAgICAgICBvcmlnSW5kKys7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKG9yaWdJbmQgPCBvcmlnLmxlbmd0aCkgewogICAgICAgICAgICAgICAgdGhpcy5zcGxpY2UocHJvcCwgb3JpZ0luZCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKG5ld1ZhbEluZCA8IG5ld1ZhbC5sZW5ndGgpIHsKICAgICAgICAgICAgICAgIHRoaXMucHVzaChwcm9wLCAuLi5uZXdWYWwuc2xpY2UobmV3VmFsSW5kKSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CgogICAgLyoqCiAgICAgKiBUaGUgVGZEb21SZXBlYXRCZWhhdmlvciByZS1pbXBsZW1lbnRzIHBhcnQgb2YgdGhlIGRvbS1yZXBlYXQgdGVtcGxhdGUuCiAgICAgKiBJdCBjYW4gYmUgYXBwbGllZCB0byBhbnkgUG9seW1lciBjb21wb25lbnRzIHRvIG1ha2UgaXQgZG9tLXJlcGVhdC1saWtlLgogICAgICogVGhlIG1ham9yIGRpc2NyZXBlbmN5IGlzIGluIHN5bnRheCB3aGVuIHVzaW5nOgogICAgICoKICAgICAqICAgPHRlbXBsYXRlIGlzPSJkb20tcmVwZWF0Ij4KICAgICAqICAgICAuLi4KICAgICAqICAgPC90ZW1wbGF0ZT4KICAgICAqICAgLy8gdmVyc3VzCiAgICAgKiAgIDxmb28tY29tcD4KICAgICAqICAgICA8dGVtcGxhdGU+CiAgICAgKiAgICAgICAuLi4KICAgICAqICAgICA8L3RlbXBsYXRlPgogICAgICogICA8L2Zvby1jb21wPgogICAgICoKICAgICAqIFdoZW4gaW1wbGVtZW50aW5nIHRoZSBiZWhhdmlvciwgdGhlIFBvbHltZXIgY29tcG9uZW50IGhhcyB0byBpbnZva2UKICAgICAqIGB0aGlzLnVwZGF0ZURvbShuZXdJdGVtcylgLiBPdGhlciBwcm90ZWN0ZWQgQVBJcyBhcmUgYHNldEdldEl0ZW1LZXlgIGFuZAogICAgICogYHNldENhY2hlU2l6ZWAgKHBsZWFzZSBzZWUgcmVzcGVjdGl2ZSBkb2MgZm9yIGRldGFpbHMpLgogICAgICovCiAgICBjbGFzcyBUZkRvbVJlcGVhdCBleHRlbmRzIEFycmF5VXBkYXRlSGVscGVyIHsKICAgICAgICBjb25zdHJ1Y3RvcigpIHsKICAgICAgICAgICAgc3VwZXIoLi4uYXJndW1lbnRzKTsKICAgICAgICAgICAgdGhpcy5hcyA9ICdpdGVtJzsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFdoZXRoZXIgYWxsIHN0YW1wZWQgaXRlbXMgYXJlIGFjdGl2ZSBvciBub3QuCiAgICAgICAgICAgICAqIEBwcm90ZWN0ZWQKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX2NvbnRlbnRBY3RpdmUgPSB0cnVlOwogICAgICAgICAgICB0aGlzLl9kb21Cb290c3RyYXBwZWQgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5fY3RvciA9IG51bGw7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBBIGxpc3Qgb2YgcmVuZGVyZWQgYW5kIG1vdW50ZWQgaXRlbXMuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9yZW5kZXJlZEl0ZW1zID0gW107CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBBIG1hcCBvZiBzdGFtcGVkIGNoaWxkIGNvbXBvbmVudHMuCiAgICAgICAgICAgICAqLwogICA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ciBmb3IgYW4KICAgICAgICAgKiBpdGVtLiBJdCBpcyB1c2VkIHRvIG9wdGltaXplIHBlcmZvcm1hbmNlIG9mIHJlZHJhd3MuIFRoZSBkZWZhdWx0IGlzCiAgICAgICAgICogSlNPTi5zdHJpbmdpZnkoaXRlbSkuCiAgICAgICAgICovCiAgICAgICAgc2V0R2V0SXRlbUtleShnZXRJdGVtS2V5KSB7CiAgICAgICAgICAgIHRoaXMuX2dldEl0ZW1LZXkgPSBnZXRJdGVtS2V5OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBVcGRhdGVzIERPTSB0byByZWZsZWN0IGNoYW5nZXMgaW4gYGl0ZW1zYC4KICAgICAgICAgKi8KICAgICAgICB1cGRhdGVEb20oaXRlbXMpIHsKICAgICAgICAgICAgdGhpcy51cGRhdGVBcnJheVByb3AoJ19yZW5kZXJlZEl0ZW1zJywgaXRlbXMsIHRoaXMuX2dldEl0ZW1LZXkpOwogICAgICAgIH0KICAgICAgICBfZW5zdXJlVGVtcGxhdGl6ZWQoKSB7CiAgICAgICAgICAgIC8vIFBvbHltZXIgaXMgbm90IHJlYWR5IChhbmQgcHJvcHMvRE9NIGZvciB0aGUgY29tcG9uZW50cyBhcmUgbm90CiAgICAgICAgICAgIC8vIHBvcHVsYXRlZCkKICAgICAgICAgICAgaWYgKCF0aGlzLmlzQ29ubmVjdGVkKQogICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICBpZiAoIXRoaXMuX2N0b3IpIHsKICAgICAgICAgICAgICAgIGNvbnN0IHRlbXBsYXRlTm9kZSA9IHRoaXMucXVlcnlTZWxlY3RvcigndGVtcGxhdGUnKTsKICAgICAgICAgICAgICAgIHRoaXMuX2N0b3IgPSB0ZW1wbGF0aXplKHRlbXBsYXRlTm9kZSwgdGhpcywgewogICAgICAgICAgICAgICAgICAgIHBhcmVudE1vZGVsOiB0cnVlLAogICAgICAgICAgICAgICAgICAgIGluc3RhbmNlUHJvcHM6IHsKICAgICAgICAgICAgICAgICAgICAgICAgW3RoaXMuYXNdOiB0cnVlLAogICAgICAgICAgICAgICAgICAgICAgICBhY3RpdmU6IHRoaXMuX2NvbnRlbnRBY3RpdmUsCiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICBmb3J3YXJkSG9zdFByb3A6IGZ1bmN0aW9uIChwcm9wLCB2YWx1ZSkgewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9yZW5kZXJlZFRlbXBsYXRlSW5zdC5mb3JFYWNoKChpbnN0KSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnN0LmZvcndhcmRIb3N0UHJvcChwcm9wLCB2YWx1ZSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICB9CiAgICAgICAgX2Jvb3RzdHJhcERvbSgpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLl9lbnN1cmVUZW1wbGF0aXplZCgpIHx8IHRoaXMuX2RvbUJvb3RzdHJhcHBlZCkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNvbnN0IG9ic2VydmVyID0gbmV3IE11dGF0aW9uT2JzZXJ2ZXIoKG11dGF0aW9uc0xpc3QpID0+IHsKICAgICAgICAgICAgICAgIGZvciAoY29uc3QgbXV0YXRpb24gb2YgbXV0YXRpb25zTGlzdCkgewogICAgICAgICAgICAgICAgICAgIGlmIChtdXRhdGlvbi50eXBlID09PSAnY2hpbGRMaXN0JykgewogICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IG5vZGUgb2YgQXJyYXkuZnJvbShtdXRhdGlvbi5hZGRlZE5vZGVzKSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG5vZGUgaW5zdGFuY2VvZiBFbGVtZW50KSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbm9kZS5zZXRBdHRyaWJ1dGUoJ3Nsb3QnLCAnaXRlbXMnKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIG9ic2VydmVyLm9ic2VydmUodGhpcywgeyBjaGlsZExpc3Q6IHRydWUgfSk7CiAgICAgICAgICAgIEFycmF5LmZyb20odGhpcy5jaGlsZHJlbikuZm9yRWFjaCgoY2hpbGQpID0+IHsKICAgICAgICAgICAgICAgIHRoaXMucmVtb3ZlQ2hpbGQoY2hpbGQpOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdGhpcy5fbHJ1Q2FjaGVkSXRlbXMuY2xlYXIoKTsKICAgICAgICAgICAgdGhpcy5fcmVuZGVyZWRJdGVtcy5mb3JFYWNoKChpdGVtLCBpbmRleCkgPT4gdGhpcy5faW5zZXJ0SXRlbShpdGVtLCBpbmRleCkpOwogICAgICAgICAgICB0aGlzLl9kb21Cb290c3RyYXBwZWQgPSB0cnVlOwogICAgICAgIH0KICAgICAgICBfdXBkYXRlQWN0aXZlKCkgewogICAgICAgICAgICBpZiAoIXRoaXMuX2RvbUJvb3RzdHJhcHBlZCkKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgQXJyYXkuZnJvbSh0aGlzLl9yZW5kZXJlZFRlbXBsYXRlSW5zdC52YWx1ZXMoKSkuZm9yRWFjaCgoaW5zdCkgPT4gewogICAgICAgICAgICAgICAgaW5zdC5ub3RpZnlQYXRoKCdhY3RpdmUnLCB0aGlzLl9jb250ZW50QWN0aXZlKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIF91cGRhdGVEb20oZXZlbnQgLy8gUG9seW1lckRlZXBQcm9wZXJ0eUNoYW5nZTxULCBQb2x5bWVyU3BsaWNlQ2hhbmdlPFRbXT4+CiAgICAgICAgKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5fZG9tQm9vdHN0cmFwcGVkKQogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAvLyBUaGVzZSBhcmUgdW5pbnRlcmVzdGluZy4KICAgICAgICAgICAgaWYgKGV2ZW50LnBhdGggPT0gJ19yZW5kZXJlZEl0ZW1zJyB8fAogICAgICAgICAgICAgICAgZXZlbnQucGF0aCA9PSAnX3JlbmRlcmVkSXRlbXMubGVuZ3RoJykgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChldmVudC5wYXRoID09PSAnX3JlbmRlcmVkSXRlbXMuc3BsaWNlcycpIHsKICAgICAgICAgICAgICAgIGNvbnN0IHZhbHVlID0gZXZlbnQudmFsdWU7IC8vIFBvbHltZXJTcGxpY2VDaGFuZ2U8VFtdPjsKICAgICAgICAgICAgICAgIHZhbHVlLmluZGV4U3BsaWNlcy5mb3JFYWNoKChzcGxpY2UpID0+IHsKICAgICAgICAgICAgICAgICAgICBjb25zdCB7IGluZGV4LCBhZGRlZENvdW50LCBvYmplY3QsIHJlbW92ZWQgfSA9IHNwbGljZTsKICAgICAgICAgICAgICAgICAgICByZW1vdmVkLmZvckVhY2goKGl0ZW0pID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fcmVtb3ZlSXRlbShpdGVtLCB0aGlzLmNoaWxkcmVuW2luZGV4XSk7CiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICAgICAgb2JqZWN0CiAgICAgICAgICAgICAgICAgICAgICAgIC5zbGljZShpbmRleCwgaW5kZXggKyBhZGRlZENvdW50KQogICAgICAgICAgICAgICAgICAgICAgICAuZm9yRWFjaCgoaXRlbSwgaW5kKSA9PiB0aGlzLl9pbnNlcnRJdGVtKGl0ZW0sIGluZGV4ICsgaW5kKSk7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fdHJpbUNhY2hlKCk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIC8vIFVwZGF0ZSB0aGUgc3RhbXBlZCBhbmQgbW91bnRlZCBET00gbW9kZWwgYnkgbm90aWZ5aW5nLgogICAgICAgICAgICAgICAgY29uc3Qga2V5ID0gdGhpcy5fZ2V0SXRlbUtleShldmVudC52YWx1ZSk7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5fcmVuZGVyZWRUZW1wbGF0ZUluc3QuaGFzKGtleSkpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9yZW5kZXJlZFRlbXBsYXRlSW5zdC5nZXQoa2V5KS5ub3RpZnlQYXRoKHRoaXMuYXMsIGV2ZW50LnZhbHVlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIGNvbnNvbGUud2FybihgRXhwZWN0ZWQgJyR7a2V5fScgdG8gZXhpc3QgaW4gdGhlIERPTSBidXQgYCArIGBjb3VsZCBub3QgZmluZCBvbmUuYCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgX2luc2VydEl0ZW0oaXRlbSwgYXRJbmRleCkgewogICAgICAgICAgICBpZiAoIXRoaXMuX2Vuc3VyZVRlbXBsYXRpemVkKCkpIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignRXhwZWN0ZWQgdGVtcGxhdGl6ZWQgYmVmb3JlIGluc2VydGluZyBhbiBpdGVtJyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgbGV0IGZyYWdPckVsOwogICAgICAgICAgICBjb25zdCBrZXkgPSB0aGlzLl9nZXRJdGVtS2V5KGl0ZW0pOwogICAgICAgICAgICBpZiAodGhpcy5fbHJ1Q2FjaGVkSXRlbXMuaGFzKGtleSkpIHsKICAgICAgICAgICAgICAgIGZyYWdPckVsID0gdGhpcy5fbHJ1Q2FjaGVkSXRlbXMuZ2V0KGtleSk7CiAgICAgICAgICAgICAgICB0aGlzLl9scnVDYWNoZWRJdGVtcy5kZWxldGUoa2V5KTsKICAgICAgICAgICAgICAgIHRoaXMuX3JlbmRlcmVkVGVtcGxhdGVJbnN0CiAgICAgICAgICAgICAgICAgICAgLmdldChrZXkpCiAgICAgICAgICAgICAgICAgICAgLm5vdGlmeVBhdGgoJ2FjdGl2ZScsIHRoaXMuX2NvbnRlbnRBY3RpdmUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgY29uc3QgcHJvcCA9IHsgW3RoaXMuYXNdOiBpdGVtLCBhY3RpdmU6IHRoaXMuX2NvbnRlbnRBY3RpdmUgfTsKICAgICAgICAgICAgICAgIGNvbnN0IGluc3QgPSBuZXcgdGhpcy5fY3Rvcihwcm9wKTsKICAgICAgICAgICAgICAgIGZyYWdPckVsID0gaW5zdC5yb290OwogICAgICAgICAgICAgICAgdGhpcy5fcmVuZGVyZWRUZW1wbGF0ZUluc3Quc2V0KGtleSwgaW5zdCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHRoaXMuY2hpbGRyZW5bYXRJbmRleF0pIHsKICAgICAgICAgICAgICAgIHRoaXMuaW5zZXJ0QmVmb3JlKGZyYWdPckVsLCB0aGlzLmNoaWxkcmVuW2F0SW5kZXhdKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIGNvbnN0IGVscyA9IGZyYWdPckVsLm5vZGVUeXBlID09IE5vZGUuRE9DVU1FTlRfRlJBR01FTlRfTk9ERQogICAgICAgICAgICAgICAgICAgID8gQXJyYXkuZnJvbShmcmFnT3JFbC5jaGlsZHJlbikKICAgICAgICAgICAgICAgICAgICA6IFtmcmFnT3JFbF07CiAgICAgICAgICAgICAgICBlbHMuZm9yRWFjaCgoZWwpID0+IGVsLnN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AgICAgICAgc3VwZXIoLi4uYXJndW1lbnRzKTsKICAgICAgICAgICAgdGhpcy5kaXNhYmxlUGFnaW5hdGlvbiA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLmdldENhdGVnb3J5SXRlbUtleSA9IChpdGVtKSA9PiBKU09OLnN0cmluZ2lmeShpdGVtKTsKICAgICAgICAgICAgdGhpcy5fbGltaXQgPSAxMjsKICAgICAgICAgICAgdGhpcy5fYWN0aXZlSW5kZXggPSAwOwogICAgICAgICAgICB0aGlzLl9wYWdlSW5wdXRSYXdWYWx1ZSA9ICcnOwogICAgICAgICAgICB0aGlzLl9wYWdlSW5wdXRGb2N1c2VkID0gZmFsc2U7CiAgICAgICAgfQogICAgICAgIF9jb21wdXRlQ291bnQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmNhdGVnb3J5Lml0ZW1zLmxlbmd0aDsKICAgICAgICB9CiAgICAgICAgZ2V0IF9oYXNNdWx0aXBsZSgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2NvdW50ID4gMTsKICAgICAgICB9CiAgICAgICAgX3RvZ2dsZVBhbmUoKSB7CiAgICAgICAgICAgIHRoaXMub3BlbmVkID0gIXRoaXMub3BlbmVkOwogICAgICAgIH0KICAgICAgICBfY2hhbmdlQ29udGVudEFjdGl2ZShvcGVuZWQpIHsKICAgICAgICAgICAgdGhpcy5fY29udGVudEFjdGl2ZSA9IG9wZW5lZDsKICAgICAgICB9CiAgICAgICAgX29uUGFuZVJlbmRlcmVkQ2hhbmdlZChuZXdSZW5kZXJlZCwgb2xkUmVuZGVyZWQpIHsKICAgICAgICAgICAgaWYgKG5ld1JlbmRlcmVkICYmIG5ld1JlbmRlcmVkICE9PSBvbGRSZW5kZXJlZCkgewogICAgICAgICAgICAgICAgLy8gRm9yY2UgZG9tLWlmIHJlbmRlciB3aXRob3V0IHdhaXRpbmcgZm9yIG9uZSByQUYuCiAgICAgICAgICAgICAgICB0aGlzLiQuaWZSZW5kZXJlZC5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bmF0aW9uOwogICAgICAgICAgICBpZiAoIWl0ZW1zUmVuZGVyZWQpCiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIGNvbnN0IGFjdGl2ZVBhZ2VJbmRleCA9IE1hdGguZmxvb3IoYWN0aXZlSW5kZXggLyBsaW1pdCk7CiAgICAgICAgICAgIGNvbnN0IGl0ZW1zID0gdGhpcy5jYXRlZ29yeS5pdGVtcyB8fCBbXTsKICAgICAgICAgICAgY29uc3QgZG9tSXRlbXMgPSBkaXNhYmxlUGFnaW5hdGlvbgogICAgICAgICAgICAgICAgPyBpdGVtcwogICAgICAgICAgICAgICAgOiBpdGVtcy5zbGljZShhY3RpdmVQYWdlSW5kZXggKiBsaW1pdCwgKGFjdGl2ZVBhZ2VJbmRleCArIDEpICogbGltaXQpOwogICAgICAgICAgICB0aGlzLnVwZGF0ZURvbShkb21JdGVtcyk7CiAgICAgICAgfQogICAgICAgIF9saW1pdENoYW5nZWQobGltaXQpIHsKICAgICAgICAgICAgdGhpcy5zZXRDYWNoZVNpemUobGltaXQgKiAyKTsKICAgICAgICB9CiAgICAgICAgX2dldENhdGVnb3J5SXRlbUtleUNoYW5nZWQoKSB7CiAgICAgICAgICAgIHRoaXMuc2V0R2V0SXRlbUtleSh0aGlzLmdldENhdGVnb3J5SXRlbUtleSk7CiAgICAgICAgfQogICAgICAgIGdldCBfY3VycmVudFBhZ2UoKSB7CiAgICAgICAgICAgIHZhciBsaW1pdCA9IHRoaXMuX2xpbWl0OwogICAgICAgICAgICB2YXIgYWN0aXZlSW5kZXggPSB0aGlzLl9hY3RpdmVJbmRleDsKICAgICAgICAgICAgcmV0dXJuIE1hdGguZmxvb3IoYWN0aXZlSW5kZXggLyBsaW1pdCkgKyAxOwogICAgICAgIH0KICAgICAgICBfY29tcHV0ZVBhZ2VDb3VudChfLCBsaW1pdCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5jYXRlZ29yeSA/IE1hdGguY2VpbCh0aGlzLmNhdGVnb3J5Lml0ZW1zLmxlbmd0aCAvIGxpbWl0KSA6IDA7CiAgICAgICAgfQogICAgICAgIGdldCBfbXVsdGlwbGVQYWdlc0V4aXN0KCkgewogICAgICAgICAgICB2YXIgcGFnZUNvdW50ID0gdGhpcy5fcGFnZUNvdW50OwogICAgICAgICAgICB2YXIgZGlzYWJsZVBhZ2luYXRpb24gPSB0aGlzLmRpc2FibGVQYWdpbmF0aW9uOwogICAgICAgICAgICByZXR1cm4gIWRpc2FibGVQYWdpbmF0aW9uICYmIHBhZ2VDb3VudCA+IDE7CiAgICAgICAgfQogICAgICAgIGdldCBfaGFzUHJldmlvdXNQYWdlKCkgewogICAgICAgICAgICB2YXIgY3VycmVudFBhZ2UgPSB0aGlzLl9jdXJyZW50UGFnZTsKICAgICAgICAgICAgcmV0dXJuIGN1cnJlbnRQYWdlID4gMTsKICAgICAgICB9CiAgICAgICAgZ2V0IF9oYXNOZXh0UGFnZSgpIHsKICAgICAgICAgICAgdmFyIGN1cnJlbnRQYWdlID0gdGhpcy5fY3VycmVudFBhZ2U7CiAgICAgICAgICAgIHZhciBwYWdlQ291bnQgPSB0aGlzLl9wYWdlQ291bnQ7CiAgICAgICAgICAgIHJldHVybiBjdXJyZW50UGFnZSA8IHBhZ2VDb3VudDsKICAgICAgICB9CiAgICAgICAgX2NvbXB1dGVJbnB1dFdpZHRoKHBhZ2VDb3VudCkgewogICAgICAgICAgICAvLyBBZGQgMjBweCBmb3IgdGhlICsvLSBhcnJvd3MgYWRkZWQgYnkgYnJvd3NlcnMuCiAgICAgICAgICAgIHJldHVybiBgY2FsYygke3BhZ2VDb3VudC50b1N0cmluZygpLmxlbmd0aH1lbSArIDIwcHgpYDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVXBkYXRlIF9hY3RpdmVJbmRleCwgbWFpbnRhaW5pbmcgaXRzIHJhbmdlIGludmFyaWFudC4KICAgICAgICAgKi8KICAgICAgICBfc2V0QWN0aXZlSW5kZXgoaW5kZXgpIHsKICAgICAgICAgICAgY29uc3QgbWF4SW5kZXggPSAodGhpcy5jYXRlZ29yeS5pdGVtcyB8fCBbXSkubGVuZ3RoIC0gMTsKICAgICAgICAgICAgaWYgKGluZGV4ID4gbWF4SW5kZXgpIHsKICAgICAgICAgICAgICAgIGluZGV4ID0gbWF4SW5kZXg7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGluZGV4IDwgMCkgewogICAgICAgICAgICAgICAgaW5kZXggPSAwOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuc2V0KCdfYWN0aXZlSW5kZXgnLCBpbmRleCk7CiAgICAgICAgfQogICAgICAgIF9jbGFtcEFjdGl2ZUluZGV4KCkgewogICAgICAgICAgICB0aGlzLl9zZXRBY3RpdmVJbmRleCh0aGlzLl9hY3RpdmVJbmRleCk7CiAgICAgICAgfQogICAgICAgIF9wZXJmb3JtUHJldmlvdXNQYWdlKCkgewogICAgICAgICAgICB0aGlzLl9zZXRBY3RpdmVJbmRleCh0aGlzLl9hY3RpdmVJbmRleCAtIHRoaXMuX2xpbWl0KTsKICAgICAgICB9CiAgICAgICAgX3BlcmZvcm1OZXh0UGFnZSgpIHsKICAgICAgICAgICAgdGhpcy5fc2V0QWN0aXZlSW5kZXgodGhpcy5fYWN0aXZlSW5kZXggKyB0aGlzLl9saW1pdCk7CiAgICAgICAgfQogICAgICAgIF9jb21wdXRlUGFnZUlucHV0VmFsdWUoZm9jdXNlZCwgcmF3VmFsdWUsIGN1cnJlbnRQYWdlKSB7CiAgICAgICAgICAgIHJldHVybiBmb2N1c2VkID8gcmF3VmFsdWUgOiBjdXJyZW50UGFnZS50b1N0cmluZygpOwogICAgICAgIH0KICAgICAgICBfaGFuZGxlUGFnZUlucHV0RXZlbnQoZSkgewogICAgICAgICAgICB0aGlzLnNldCgnX3BhZ2VJbnB1dFJhd1ZhbHVlJywgZS50YXJnZXQudmFsdWUpOwogICAgICAgICAgICBjb25zdCBvbmVJbmRleGVkUGFnZSA9IE51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atb2YtY29udGFpbmVyIj48L3NwYW4+CiAgICAgICAgICA8dGVtcGxhdGUgaXM9ImRvbS1pZiIgaWY9IltbX211bHRpcGxlUGFnZXNFeGlzdF1dIj4KICAgICAgICAgICAgPGRpdiBjbGFzcz0iYmlnLXBhZ2UtYnV0dG9ucyIgc3R5bGU9Im1hcmdpbi1ib3R0b206IDEwcHg7Ij4KICAgICAgICAgICAgICA8cGFwZXItYnV0dG9uCiAgICAgICAgICAgICAgICBvbi10YXA9Il9wZXJmb3JtUHJldmlvdXNQYWdlIgogICAgICAgICAgICAgICAgZGlzYWJsZWQkPSJbWyFfaGFzUHJldmlvdXNQYWdlXV0iCiAgICAgICAgICAgICAgICA+UHJldmlvdXMgcGFnZTwvcGFwZXItYnV0dG9uCiAgICAgICAgICAgICAgPgogICAgICAgICAgICAgIDxwYXBlci1idXR0b24KICAgICAgICAgICAgICAgIG9uLXRhcD0iX3BlcmZvcm1OZXh0UGFnZSIKICAgICAgICAgICAgICAgIGRpc2FibGVkJD0iW1shX2hhc05leHRQYWdlXV0iCiAgICAgICAgICAgICAgICA+TmV4dCBwYWdlPC9wYXBlci1idXR0b24KICAgICAgICAgICAgICA+CiAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgPC90ZW1wbGF0ZT4KCiAgICAgICAgICA8ZGl2IGlkPSJpdGVtcyI+CiAgICAgICAgICAgIDxzbG90IG5hbWU9Iml0ZW1zIj48L3Nsb3Q+CiAgICAgICAgICA8L2Rpdj4KICAgICAgICAgIDx0ZW1wbGF0ZSBpcz0iZG9tLWlmIiBpZj0iW1tfbXVsdGlwbGVQYWdlc0V4aXN0XV0iPgogICAgICAgICAgICA8ZGl2IGlkPSJjb250cm9scy1jb250YWluZXIiPgogICAgICAgICAgICAgIDxkaXYgc3R5bGU9ImRpc3BsYXk6IGlubGluZS1ibG9jazsgcGFkZGluZzogMCA1cHgiPgogICAgICAgICAgICAgICAgUGFnZQogICAgICAgICAgICAgICAgPHBhcGVyLWlucHV0CiAgICAgICAgICAgICAgICAgIGlkPSJwYWdlLWlucHV0IgogICAgICAgICAgICAgICAgICB0eXBlPSJudW1iZXIiCiAgICAgICAgICAgICAgICAgIG5vLWxhYmVsLWZsb2F0PSIiCiAgICAgICAgICAgICAgICAgIG1pbj0iMSIKICAgICAgICAgICAgICAgICAgbWF4PSJbW19wYWdlQ291bnRdXSIKICAgICAgICAgICAgICAgICAgdmFsdWU9IltbX3BhZ2VJbnB1dFZhbHVlXV0iCiAgICAgICAgICAgICAgICAgIG9uLWlucHV0PSJfaGFuZGxlUGFnZUlucHV0RXZlbnQiCiAgICAgICAgICAgICAgICAgIG9uLWNoYW5nZT0iX2hhbmRsZVBhZ2VDaGFuZ2VFdmVudCIKICAgICAgICAgICAgICAgICAgb24tZm9jdXM9Il9oYW5kbGVQYWdlRm9jdXNFdmVudCIKICAgICAgICAgICAgICAgICAgb24tYmx1cj0iX2hhbmRsZVBhZ2VCbHVyRXZlbnQiCiAgICAgICAgICAgICAgICA+PC9wYXBlci1pbnB1dD4KICAgICAgICAgICAgICAgIG9mIFtbX3BhZ2VDb3VudF1dCiAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgIDwvZGl2PgoKICAgICAgICAgICAgPGRpdiBjbGFzcz0iYmlnLXBhZ2UtYnV0dG9ucyIgc3R5bGU9Im1hcmdpbi10b3A6IDEwcHg7Ij4KICAgICAgICAgICAgICA8cGFwZXItYnV0dG9uCiAgICAgICAgICAgICAgICBvbi10YXA9Il9wZXJmb3JtUHJldmlvdXNQYWdlIgogICAgICAgICAgICAgICAgZGlzYWJsZWQkPSJbWyFfaGFzUHJldmlvdXNQYWdlXV0iCiAgICAgICAgICAgICAgICA+UHJldmlvdXMgcGFnZTwvcGFwZXItYnV0dG9uCiAgICAgICAgICAgICAgPgogICAgICAgICAgICAgIDxwYXBlci1idXR0b24KICAgICAgICAgICAgICAgIG9uLXRhcD0iX3BlcmZvcm1OZXh0UGFnZSIKICAgICAgICAgICAgICAgIGRpc2FibGVkJD0iW1shX2hhc05leHRQYWdlXV0iCiAgICAgICAgICAgICAgICA+TmV4dCBwYWdlPC9wYXBlci1idXR0b24KICAgICAgICAgICAgICA+CiAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgPC90ZW1wbGF0ZT4KICAgICAgICA8L2Rpdj4KICAgICAgPC9pcm9uLWNvbGxhcHNlPgogICAgPC90ZW1wbGF0ZT4KICAgIDxzdHlsZT4KICAgICAgOmhvc3QgewogICAgICAgIGRpc3BsYXk6IGJsb2NrOwogICAgICAgIG1hcmdpbjogMCA1cHggMXB4IDEwcHg7CiAgICAgIH0KCiAgICAgIDpob3N0KDpmaXJzdC1vZi10eXBlKSB7CiAgICAgICAgbWFyZ2luLXRvcDogMTBweDsKICAgICAgfQoKICAgICAgOmhvc3QoOmxhc3Qtb2YtdHlwZSkgewogICAgICAgIG1hcmdpbi1ib3R0b206IDIwcHg7CiAgICAgIH0KCiAgICAgIC5oZWFkaW5nIHsKICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiB3aGl0ZTsKICAgICAgICBib3JkZXI6IG5vbmU7CiAgICAgICAgY3Vyc29yOiBwb2ludGVyOwogICAgICAgIHdpZHRoOiAxMDAlOwogICAgICAgIGZvbnQtc2l6ZTogMTVweDsKICAgICAgICBsaW5lLWhlaWdodDogMTsKICAgICAgICBib3gtc2hhZG93OiAwIDFweCA1cHggcmdiYSgwLCAwLCAwLCAwLjIpOwogICAgICAgIHBhZGRpbmc6IDEwcHggMTVweDsKICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgICAganVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuOwogICAgICB9CgogICAgICAuaGVhZGluZzo6LW1vei1mb2N1cy1pbm5lciB7CiAgICAgICAgcGFkZGluZzogMTBweCAxNXB4OwogICAgICB9CgogICAgICBbb3Blbi1idXR0b25dIHsKICAgICAgICBib3JkZXItYm90dG9tLWxlZnQtcmFkaXVzOiAwICFpbXBvcnRhbnQ7CiAgICAgICAgYm9yZGVyLWJvdHRvbS1yaWdodC1yYWRpdXM6IDAgIWltcG9ydGFudDsKICAgICAgfQoKICAgICAgW29wZW4tYnV0dG9uXSAuZXhwYW5kLWFycm93IHsKICAgICAgICB0cmFuc2Zvcm06IHJvdGF0ZVooMTgwZGVnKTsKICAgICAgfQoKICAgICAgLm5hbWUgewogICAgICAgIGRpc3BsYXk6IGlubGluZS1mbGV4OwogICAgICAgIG92ZXJmbG93OiBoaWRkZW47CiAgICAgIH0KCiAgICAgIC5saWdodCB7CiAgICAgICAgY29sb3I6IHZhcigtLXBhcGVyLWdyZXktNTAwKTsKICAgICAgfQoKICAgICAgLmNhdGVnb3J5LW5hbWUgewogICAgICAgIHdoaXRlLXNwYWNlOiBwcmU7CiAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjsKICAgICAgICB0ZXh0LW92ZXJmbG93OiBlbGxpcHNpczsKICAgICAgICBwYWRkaW5nOiAycHggMDsKICAgICAgfQoKICAgICAgLmNvdW50IHsKICAgICAgICBtYXJnaW46IDAgNXB4OwogICAgICAgIGZvbnQtc2l6ZTogMTJweDsKICAgICAgICBjb2xvcjogdmFyKC0tcGFwZXItZ3JleS01MDApOwogICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICAgICAgICBmbGV4OiBub25lOwogICAgICB9CgogICAgICAuaGVhZGluZzo6LW1vei1mb2N1cy1pbm5lciB7CiAgICAgICAgcGFkZGluZzogMTBweCAxNXB4OwogICAgICB9CgogICAgICAuY29udGVudCB7CiAgICAgICAgZGlzcGxheTogZmxleDsKICAgICAgICBmbGV4LWRpcmVjdGlvbjogY29sdW1uOwogICAgICAgIGJhY2tncm91bmQ6IHdoaXRlOwogICAgICAgIGJvcmRlci1ib3R0b20tbGVmdC1yYWRpdXM6IDJweDsKICAgICAgICBib3JkZXItYm90dG9tLXJpZ2h0LXJhZGl1czogMnB4OwogICAgICAgIGJvcmRlci10b3A6IG5vbmU7CiAgICAgICAgYm9yZGVyOiAxcHggc29saWQgI2RlZGVkZTsKICAgICAgICBwYWRkaW5nOiAxNXB4OwogICAgICB9CgogICAgICAubGlnaHQgewogICAgICAgIGNvbG9yOiB2YXIoLS1wYXBlci1ncmV5LTUwMCk7CiAgICAgIH0KCiAgICAgICNjb250cm9scy1jb250YWluZXIgewogICAgICAgIGp1c3RpZnktY29udGVudDogY2VudGVyOwogICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAgZmxleC1kaXJlY3Rpb246IHJvdzsKICAgICAgICBmbGV4LWdyb3c6IDA7CiAgICAgICAgZmxleC1zaHJpbms6IDA7CiAgICAgICAgd2lkdGg6IDEwMCU7CiAgICAgIH0KCiAgICAgICNjb250cm9scy1jb250YWluZXIgcGFwZXItYnV0dG9uIHsKICAgICAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7CiAgICAgIH0KCiAgICAgIC5iaWctcGFnZS1idXR0b25zIHsKICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICB9CgogICAgICAuYmlnLXBhZ2UtYnV0dG9ucyBwYXBlci1idXR0b24gewogICAgICAgIGJhY2tncm91bmQtY29sb3I6IHZhcigtLXRiLXVpLWxpZ2h0LWFjY2VudCk7CiAgICAgICAgY29sb3I6IHZhcigtLXRiLXVpLWRhcmstYWNjZW50KTsKICAgICAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7CiAgICAgICAgZmxleC1iYXNpczogMDsKICAgICAgICBmbGV4LWdyb3c6IDE7CiAgICAgICAgZmxleC1zaHJpbms6IDE7CiAgICAgICAgZm9udC1zaXplOiAxM3B4OwogICAgICB9CgogICAgICAuYmlnLXBhZ2UtYnV0dG9ucyBwYXBlci1idXR0b25bZGlzYWJsZWRdIHsKICAgICAgICBiYWNrZ3JvdW5kOiBub25lOwogICAgICB9CgogICAgICBzbG90IHsKICAgICAgICBkaXNwbGF5OiBmbGV4O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gICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgICAgICB0aGlzLnJlcXVlc3RNYW5hZ2VyID0gbmV3IFJlcXVlc3RNYW5hZ2VyKDEgLyogc2ltdWx0YW5lb3VzIHJlcXVlc3QgKi8pOwogICAgICAgICAgICB0aGlzLl9saXN0ZW5lcnMgPSBuZXcgU2V0KCk7CiAgICAgICAgICAgIHRoaXMuaW5pdGlhbGl6ZWQgPSBmYWxzZTsKICAgICAgICB9CiAgICAgICAgcmVmcmVzaCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMubG9hZCgpLnRoZW4oKCkgPT4gewogICAgICAgICAgICAgICAgdGhpcy5pbml0aWFsaXplZCA9IHRydWU7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZWdpc3RlciBhIGxpc3RlbmVyIChudWxsYXJ5IGZ1bmN0aW9uKSB0byBiZSBjYWxsZWQgd2hlbiBuZXcgcnVucyBhcmUKICAgICAgICAgKiBhdmFpbGFibGUuCiAgICAgICAgICovCiAgICAgICAgYWRkTGlzdGVuZXIobGlzdGVuZXIpIHsKICAgICAgICAgICAgY29uc3Qga2V5ID0gbmV3IExpc3RlbktleSQxKGxpc3RlbmVyKTsKICAgICAgICAgICAgdGhpcy5fbGlzdGVuZXJzLmFkZChrZXkpOwogICAgICAgICAgICByZXR1cm4ga2V5OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZW1vdmUgYSBsaXN0ZW5lciByZWdpc3RlcmVkIHdpdGggYGFkZExpc3RlbmVyYC4KICAgICAgICAgKi8KICAgICAgICByZW1vdmVMaXN0ZW5lckJ5S2V5KGxpc3RlbktleSkgewogICAgICAgICAgICB0aGlzLl9saXN0ZW5lcnMuZGVsZXRlKGxpc3RlbktleSk7CiAgICAgICAgfQogICAgICAgIGVtaXRDaGFuZ2UoKSB7CiAgICAgICAgICAgIHRoaXMuX2xpc3RlbmVycy5mb3JFYWNoKChsaXN0ZW5L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W1pdGF0aW9ucyB1bmRlciB0aGUgTGljZW5zZS4KICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCiAgICBjbGFzcyBFbnZpcm9ubWVudFN0b3JlIGV4dGVuZHMgQmFzZVN0b3JlIHsKICAgICAgICBsb2FkKCkgewogICAgICAgICAgICBjb25zdCB1cmwgPSBnZXRSb3V0ZXIoKS5lbnZpcm9ubWVudCgpOwogICAgICAgICAgICByZXR1cm4gdGhpcy5yZXF1ZXN0TWFuYWdlci5yZXF1ZXN0KHVybCkudGhlbigocmVzdWx0KSA9PiB7CiAgICAgICAgICAgICAgICBjb25zdCBlbnZpcm9ubWVudCA9IHsKICAgICAgICAgICAgICAgICAgICBkYXRhTG9jYXRpb246IHJlc3VsdC5kYXRhX2xvY2F0aW9uLAogICAgICAgICAgICAgICAgICAgIHdpbmRvd1RpdGxlOiByZXN1bHQud2luZG93X3RpdGxlLAogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIGlmIChyZXN1bHQuZXhwZXJpbWVudF9uYW1lICE9PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgICAgICAgICBlbnZpcm9ubWVudC5leHBlcmltZW50TmFtZSA9IHJlc3VsdC5leHBlcmltZW50X25hbWU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAocmVzdWx0LmV4cGVyaW1lbnRfZGVzY3JpcHRpb24gIT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICAgICAgICAgIGVudmlyb25tZW50LmV4cGVyaW1lbnREZXNjcmlwdGlvbiA9IHJlc3VsdC5leHBlcmltZW50X2Rlc2NyaXB0aW9uOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKHJlc3VsdC5jcmVhdGlvbl90aW1lICE9PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgICAgICAgICBlbnZpcm9ubWVudC5jcmVhdGlvblRpbWUgPSByZXN1bHQuY3JlYXRpb25fdGltZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChsb2Rhc2guaXNFcXVhbCh0aGlzLmVudmlyb25tZW50LCBlbnZpcm9ubWVudCkpCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgdGhpcy5lbnZpcm9ubWVudCA9IGVudmlyb25tZW50OwogICAgICAgICAgICAgICAgdGhpcy5lbWl0Q2hhbmdlKCk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICBnZXREYXRhTG9jYXRpb24oKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmVudmlyb25tZW50ID8gdGhpcy5lbnZpcm9ubWVudC5kYXRhTG9jYXRpb24gOiAnJzsKICAgICAgICB9CiAgICAgICAgZ2V0V2luZG93VGl0bGUoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmVudmlyb25tZW50ID8gdGhpcy5lbnZpcm9ubWVudC53aW5kb3dUaXRsZSA6ICcnOwogICAgICAgIH0KICAgICAgICBnZXRFeHBlcmltZW50TmFtZSgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuZW52aXJvbm1lbnQgPyB0aGlzLmVudmlyb25tZW50LmV4cGVyaW1lbnROYW1lIDogJyc7CiAgICAgICAgfQogICAgICAgIGdldEV4cGVyaW1lbnREZXNjcmlwdGlvbigpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuZW52aXJvbm1lbnQgPyB0aGlzLmVudmlyb25tZW50LmV4cGVyaW1lbnREZXNjcmlwdGlvbiA6ICcnOwogICAgICAgIH0KICAgICAgICBnZXRDcmVhdGlvblRpbWUoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmVudmlyb25tZW50ID8gdGhpcy5lbnZpcm9ubWVudC5jcmVhdGlvblRpbWUgOiBudWxsOwogICAgICAgIH0KICAgIH0KICAgIGNvbnN0IGVudmlyb25tZW50U3RvcmUgPSBuZX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4uYXJndW1lbnRzKTsKICAgICAgICAgICAgdGhpcy5fcnVucyA9IFtdOwogICAgICAgIH0KICAgICAgICBsb2FkKCkgewogICAgICAgICAgICBjb25zdCB1cmwgPSBnZXRSb3V0ZXIoKS5ydW5zKCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzLnJlcXVlc3RNYW5hZ2VyLnJlcXVlc3QodXJsKS50aGVuKChuZXdSdW5zKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAoIWxvZGFzaC5pc0VxdWFsKHRoaXMuX3J1bnMsIG5ld1J1bnMpKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fcnVucyA9IG5ld1J1bnM7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5lbWl0Q2hhbmdlKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBHZXQgdGhlIGN1cnJlbnQgbGlzdCBvZiBydW5zLiBJZiBubyBkYXRhIGlzIGF2YWlsYWJsZSwgdGhpcyB3aWxsIGJlCiAgICAgICAgICogYW4gZW1wdHkgYXJyYXkgKGkuZS4sIHRoZXJlIGlzIG5vIGRpc3RpbmN0aW9uIGJldHdlZW4gIm5vIHJ1bnMiIGFuZAogICAgICAgICAqICJubyBydW5zIHlldCIpLgogICAgICAgICAqLwogICAgICAgIGdldFJ1bnMoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9ydW5zLnNsaWNlKCk7CiAgICAgICAgfQogICAgfQogICAgY29uc3QgcnVuc1N0b3JlID0gbmV3IFJ1bnNTdG9yZSgpOwoKICAgIHZhciB2ZXJzaW9uJDEgPSAiNS43LjAiOwoKICAgIGZ1bmN0aW9uIGFzY2VuZGluZyhhLCBiKSB7CiAgICAgIHJldHVybiBhIDwgYiA/IC0xIDogYSA+IGIgPyAxIDogYSA+PSBiID8gMCA6IE5hTjsKICAgIH0KCiAgICBmdW5jdGlvbiBiaXNlY3Rvcihjb21wYXJlKSB7CiAgICAgIGlmIChjb21wYXJlLmxlbmd0aCA9PT0gMSkgY29tcGFyZSA9IGFzY2VuZGluZ0NvbXBhcmF0b3IoY29tcGFyZSk7CiAgICAgIHJldHVybiB7CiAgICAgICAgbGVmdDogZnVuY3Rpb24oYSwgeCwgbG8sIGhpKSB7CiAgICAgICAgICBpZiAobG8gPT0gbnVsbCkgbG8gPSAwOwogICAgICAgICAgaWYgKGhpID09IG51bGwpIGhpID0gYS5sZW5ndGg7CiAgICAgICAgICB3aGlsZSAobG8gPCBoaSkgewogICAgICAgICAgICB2YXIgbWlkID0gbG8gKyBoaSA+Pj4gMTsKICAgICAgICAgICAgaWYgKGNvbXBhcmUoYVttaWRdLCB4KSA8IDApIGxvID0gbWlkICsgMTsKICAgICAgICAgICAgZWxzZSBoaSA9IG1pZDsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiBsbzsKICAgICAgICB9LAogICAgICAgIHJpZ2h0OiBmdW5jdGlvbihhLCB4LCBsbywgaGkpIHsKICAgICAgICAgIGlmIChsbyA9PSBudWxsKSBsbyA9IDA7CiAgICAgICAgICBpZiAoaGkgPT0gbnVsbCkgaGkgPSBhLmxlbmd0aDsKICAgICAgICAgIHdoaWxlIChsbyA8IGhpKSB7CiAgICAgICAgICAgIHZhciBtaWQgPSBsbyArIGhpID4+PiAxOwogICAgICAgICAgICBpZiAoY29tcGFyZShhW21pZF0sIHgpID4gMCkgaGkgPSBtaWQ7CiAgICAgICAgICAgIGVsc2UgbG8gPSBtaWQgKyAxOwogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIGxvOwogICAgICAgIH0KICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiBhc2NlbmRpbmdDb21wYXJhdG9yKGYpIHsKICAgICAgcmV0dXJuIGZ1bmN0aW9uKGQsIHgpIHsKICAgICAgICByZXR1cm4gYXNjZW5kaW5nKGYoZCksIHgpOwogICAgICB9OwogICAgfQoKICAgIHZhciBhc2NlbmRpbmdCaXNlY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ybiB2YWx1ZXM7CiAgICB9CgogICAgZnVuY3Rpb24gZGVzY2VuZGluZyhhLCBiKSB7CiAgICAgIHJldHVybiBiIDwgYSA/IC0xIDogYiA+IGEgPyAxIDogYiA+PSBhID8gMCA6IE5hTjsKICAgIH0KCiAgICBmdW5jdGlvbiBudW1iZXIoeCkgewogICAgICByZXR1cm4geCA9PT0gbnVsbCA/IE5hTiA6ICt4OwogICAgfQoKICAgIGZ1bmN0aW9uIHZhcmlhbmNlKHZhbHVlcywgdmFsdWVvZikgewogICAgICB2YXIgbiA9IHZhbHVlcy5sZW5ndGgsCiAgICAgICAgICBtID0gMCwKICAgICAgICAgIGkgPSAtMSwKICAgICAgICAgIG1lYW4gPSAwLAogICAgICAgICAgdmFsdWUsCiAgICAgICAgICBkZWx0YSwKICAgICAgICAgIHN1bSA9IDA7CgogICAgICBpZiAodmFsdWVvZiA9PSBudWxsKSB7CiAgICAgICAgd2hpbGUgKCsraSA8IG4pIHsKICAgICAgICAgIGlmICghaXNOYU4odmFsdWUgPSBudW1iZXIodmFsdWVzW2ldKSkpIHsKICAgICAgICAgICAgZGVsdGEgPSB2YWx1ZSAtIG1lYW47CiAgICAgICAgICAgIG1lYW4gKz0gZGVsdGEgLyArK207CiAgICAgICAgICAgIHN1bSArPSBkZWx0YSAqICh2YWx1ZSAtIG1lYW4pOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQoKICAgICAgZWxzZSB7CiAgICAgICAgd2hpbGUgKCsraSA8IG4pIHsKICAgICAgICAgIGlmICghaXNOYU4odmFsdWUgPSBudW1iZXIodmFsdWVvZih2YWx1ZXNbaV0sIGksIHZhbHVlcykpKSkgewogICAgICAgICAgICBkZWx0YSA9IHZhbHVlIC0gbWVhbjsKICAgICAgICAgICAgbWVhbiArPSBkZWx0YSAvICsrbTsKICAgICAgICAgICAgc3VtICs9IGRlbHRhICogKHZhbHVlIC0gbWVhbik7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CgogICAgICBpZiAobSA+IDEpIHJldHVybiBzdW0gLyAobSAtIDEpOwogICAgfQoKICAgIGZ1bmN0aW9uIGRldmlhdGlvbihhcnJheSwgZikgewogICAgICB2YXIgdiA9IHZhcmlhbmNlKGFycmF5LCBmKTsKICAgICAgcmV0dXJuIHYgPyBNYXRoLnNxcnQodikgOiB2OwogICAgfQoKICAgIGZ1bmN0aW9uIGV4dGVudCh2YWx1ZXMsIHZhbHVlb2YpIHsKICAgICAgdmFyIG4gPSB2YWx1ZXMubGVuZ3RoLAogICAgICAgICAgaSA9IC0xLAogICAgICAgICAgdmFsdWUsCiAgICAgICAgICBtaW4sCiAgICAgICAgICBtYXg7CgogICAgICBpZiAodmFsdWVvZiA9PSBudWxsKSB7CiAgICAgICAgd2hpbGUgKCsraSA8IG4pIHsgLy8gRmluZCB0aGUgZmlyc3QgY29tcGFyYWJsZSB2YWx1ZS4KICAgICAgICAgIGlmICgodmFsdWUgPSB2YWx1ZXNbaV0pICE9IG51bGwgJiYgdmFsdWUgPj0gdmFsdWUpIHsKICAgICAgICAgICAgbWluID0gbWF4ID0gdmFsdWU7CiAgICAgICAgICAgIHdoaWxlICgrK2kgPCBuKSB7IC8vIENvbXBhcmUgdGhlIHJlbWFpbmluZyB2YWx1ZXMuCiAgICAgICAgICAgICAgaWYgKCh2YWx1ZSA9IHZhbHVlc1tpXSkgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgaWYgKG1pbiA+IHZhbHVlKSBtaW4gPSB2YWx1ZTsKICAgICAgICAgICAgICAgIGlmIChtYXggPCB2YWx1ZSkgbWF4ID0gdmFsdWU7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CgogICAgICBlbHNlIHsKICAgICAgICB3aGlsZSAoKytpIDwgbikgeyAvLyBGaW5kIHRoZSBmaXJzdCBjb21wYXJhYmxlIHZhbHVlLgogICAgICAgICAgaWYgKCh2YWx1ZSA9IHZhbHVlb2YodmFsdWVzW2ldLC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ogICAgICAgIC8vIENvbnZlcnQgbnVtYmVyIG9mIHRocmVzaG9sZHMgaW50byB1bmlmb3JtIHRocmVzaG9sZHMuCiAgICAgICAgaWYgKCFBcnJheS5pc0FycmF5KHR6KSkgewogICAgICAgICAgdHogPSB0aWNrU3RlcCh4MCwgeDEsIHR6KTsKICAgICAgICAgIHR6ID0gc2VxdWVuY2UoTWF0aC5jZWlsKHgwIC8gdHopICogdHosIHgxLCB0eik7IC8vIGV4Y2x1c2l2ZQogICAgICAgIH0KCiAgICAgICAgLy8gUmVtb3ZlIGFueSB0aHJlc2hvbGRzIG91dHNpZGUgdGhlIGRvbWFpbi4KICAgICAgICB2YXIgbSA9IHR6Lmxlbmd0aDsKICAgICAgICB3aGlsZSAodHpbMF0gPD0geDApIHR6LnNoaWZ0KCksIC0tbTsKICAgICAgICB3aGlsZSAodHpbbSAtIDFdID4geDEpIHR6LnBvcCgpLCAtLW07CgogICAgICAgIHZhciBiaW5zID0gbmV3IEFycmF5KG0gKyAxKSwKICAgICAgICAgICAgYmluOwoKICAgICAgICAvLyBJbml0aWFsaXplIGJpbnMuCiAgICAgICAgZm9yIChpID0gMDsgaSA8PSBtOyArK2kpIHsKICAgICAgICAgIGJpbiA9IGJpbnNbaV0gPSBbXTsKICAgICAgICAgIGJpbi54MCA9IGkgPiAwID8gdHpbaSAtIDFdIDogeDA7CiAgICAgICAgICBiaW4ueDEgPSBpIDwgbSA/IHR6W2ldIDogeDE7CiAgICAgICAgfQoKICAgICAgICAvLyBBc3NpZ24gZGF0YSB0byBiaW5zIGJ5IHZhbHVlLCBpZ25vcmluZyBhbnkgb3V0c2lkZSB0aGUgZG9tYWluLgogICAgICAgIGZvciAoaSA9IDA7IGkgPCBuOyArK2kpIHsKICAgICAgICAgIHggPSB2YWx1ZXNbaV07CiAgICAgICAgICBpZiAoeDAgPD0geCAmJiB4IDw9IHgxKSB7CiAgICAgICAgICAgIGJpbnNbYmlzZWN0UmlnaHQodHosIHgsIDAsIG0pXS5wdX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sKSB7CiAgICAgICAgd2hpbGUgKCsraSA8IG4pIHsgLy8gRmluZCB0aGUgZmlyc3QgY29tcGFyYWJsZSB2YWx1ZS4KICAgICAgICAgIGlmICgodmFsdWUgPSB2YWx1ZXNbaV0pICE9IG51bGwgJiYgdmFsdWUgPj0gdmFsdWUpIHsKICAgICAgICAgICAgbWF4ID0gdmFsdWU7CiAgICAgICAgICAgIHdoaWxlICgrK2kgPCBuKSB7IC8vIENvbXBhcmUgdGhlIHJlbWFpbmluZyB2YWx1ZXMuCiAgICAgICAgICAgICAgaWYgKCh2YWx1ZSA9IHZhbHVlc1tpXSkgIT0gbnVsbCAmJiB2YWx1ZSA+IG1heCkgewogICAgICAgICAgICAgICAgbWF4ID0gdmFsdWU7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CgogICAgICBlbHNlIHsKICAgICAgICB3aGlsZSAoKytpIDwgbikgeyAvLyBGaW5kIHRoZSBmaXJzdCBjb21wYXJhYmxlIHZhbHVlLgogICAgICAgICAgaWYgKCh2YWx1ZSA9IHZhbHVlb2YodmFsdWVzW2ldLCBpLCB2YWx1ZXMpKSAhPSBudWxsICYmIHZhbHVlID49IHZhbHVlKSB7CiAgICAgICAgICAgIG1heCA9IHZhbHVlOwogICAgICAgICAgICB3aGlsZSAoKytpIDwgbikgeyAvLyBDb21wYXJlIHRoZSByZW1haW5pbmcgdmFsdWVzLgogICAgICAgICAgICAgIGlmICgodmFsdWUgPSB2YWx1ZW9mKHZhbHVlc1tpXSwgaSwgdmFsdWVzKSkgIT0gbnVsbCAmJiB2YWx1ZSA+IG1heCkgewogICAgICAgICAgICAgICAgbWF4ID0gdmFsdWU7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CgogICAgICByZXR1cm4gbWF4OwogICAgfQoKICAgIGZ1bmN0aW9uIG1lYW4odmFsdWVzLCB2YWx1ZW9mKSB7CiAgICAgIHZhciBuID0gdmFsdWVzLmxlbmd0aCwKICAgICAgICAgIG0gPSBuLAogICAgICAgICAgaSA9IC0xLAogICAgICAgICAgdmFsdWUsCiAgICAgICAgICBzdW0gPSAwOwoKICAgICAgaWYgKHZhbHVlb2YgPT0gbnVsbCkgewogICAgICAgIHdoaWxlICgrK2kgPCBuKSB7CiAgICAgICAgICBpZiAoIWlzTmFOKHZhbHVlID0gbnVtYmVyKHZhbHVlc1tpXSkpKSBzdW0gKz0gdmFsdWU7CiAgICAgICAgICBlbHNlIC0tbTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIGVsc2UgewogICAgICAgIHdoaWxlICgrK2kgPCBuKSB7CiAgICAgICAgICBpZiAoIWlzTmFOKHZhbHVlID0gbnVtYmVyKHZhbHVlb2YodmFsdWVzW2ldLCBpLCB2YWx1ZXMpKSkpIHN1bSArPSB2YWx1ZTsKICAgICAgICAgIGVsc2UgLS1tOwogICAgICAgIH0KICAgICAgfQoKICAgICAgaWYgKG0pIHJldHVybiBzdW0gLyBtOwogICAgfQoKICAgIGZ1bmN0aW9uIG1lZGlhbih2YWx1ZXMsIHZhbHVlb2YpIHsKICAgICAgdmFyIG4gPSB2YWx1ZXMubGVuZ3RoLAogICAgICAgICAgaSA9IC0xLAogICAgICAgICAgdmFsdWUsCiAgICAgICAgICBudW1iZXJzID0gW107CgogICAgICBpZiAodmFsdWVvZiA9PSBudWxsKSB7CiAgICAgICAgd2hpbGUgKCsraSA8IG4pIHsKICAgICAgICAgIGlmICghaXNOYU4odmFsdWUgPSBudW1iZXIodmFsdWVzW2ldKSkpIHsKICAgICAgICAgICAgbnVtYmVycy5wdXNoKHZhbHVlKTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KCiAgICAgIGVsc2UgewogICAgICAgIHdoaWxlICgrK2kgPCBuKSB7CiAgICAgICAgICBpZiAoIWlzTmFOKHZhbHVlID0gbnVtYmVyKHZhbHVlb2YodmFsdWVzW2ldLCBpLCB2YWx1ZXMpKSkpIHsKICAgICAgICAgICAgbnVtYmVycy5wdXNoKHZhbHVlKTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KCiAgICAgIHJldHVybiB0aHJlc2hvbGQobnVtYmVycy5zb3J0KGFzY2VuZGluZyksIDAuNSk7CiAgICB9CgogICAgZnVuY3Rpb24gbWVyZ2UoYXJyYXlzKSB7CiAgICAgIHZhciBuID0gYXJyYXlzLmxlbmd0aCwKICAgICAgICAgIG0sCiAgICAgICAgICBpID0gLTEsCiAgICAgICAgICBqID0gMCwKICAgICAgICAgIG1lcmdlZCwKICAgICAgICAgIGFycmF5OwoKICAgICAgd2hpbGUgKCsraSA8IG4pIGogKz0gYXJyYXlzW2ldLmxlbmd0aDsKICAgICAgbWVyZ2VkID0gbmV3IEFycmF5KGopOwoKICAgICAgd2hpbGUgKC0tbiA+PSAwKSB7CiAgICAgICAgYXJyYXkgPSBhcnJheXNbbl07CiAgICAgICAgbSA9IGFycmF5Lmxlbmd0aDsKICAgICAgICB3aGlsZSAoLS1tID49IDApIHsKICAgICAgICAgIG1lcmdlZFstLWpdID0gYXJyYXlbbV07CiAgICAgICAgfQogICAgICB9CgogICAgICByZXR1cm4gbWVyZ2VkOwogICAgfQoKICAgIGZ1bmN0aW9uIG1pbih2YWx1ZXMsIHZhbHVlb2YpIHsKICAgICAgdmFyIG4gPSB2YWx1ZXMubGVuZ3RoLAogICAgICAgICAgaSA9IC0xLAogICAgICAgICAgdmFsdWUsCiAgICAgICAgICBtaW47CgogICAgICBpZiAodmFsdWVvZiA9PSBudWxsKSB7CiAgICAgICAgd2hpbGUgKCsraSA8IG4pIHsgLy8gRmluZCB0aGUgZmlyc3QgY29tcGFyYWJsZSB2YWx1ZS4KICAgICAgICAgIGlmICgodmFsdWUgPSB2YWx1ZXNbaV0pICE9IG51bGwgJiYgdmFsdWUgPj0gdmFsdWUpIHsKICAgICAgICAgICAgbWluID0gdmFsdWU7CiAgICAgICAgICAgIHdoaWxlICgrK2kgPCBuKSB7IC8vIENvbXBhcmUgdGhlIHJlbWFpbmluZyB2YWx1ZXMuCiAgICAgICAgICAgICAgaWYgKCh2YWx1ZSA9IHZhbHVlc1tpXSkgIT0gbnVsbCAmJiBtaW4gPiB2YWx1ZSkgewogICAgICAgICAgICAgICAgbWluID0gdmFsdWU7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CgogICAgICBlbHNlIHsKICAgICAgICB3aGlsZSAoKytpIDwgbikgeyAvLyBGaW5kIHRoZSBmaXJzdCBjb21wYXJhYmxlIHZhbHVlLgogICAgICAgICAgaWYgKCh2YWx1ZSA9IHZhbHVlb2YodmFsdWVzW2ldLCBpLCB2YWx1ZXMpKSAhPSBudWxsICYmIHZhbHVlID49IHZhbHVlKSB7CiAgICAgICAgICAgIG1pbiA9IHZhbHVlOwogICAgICAgICAgICB3aGlsZSAoKytpIDwgbikgeyAvLyBDb21wYXJlIHRoZSByZW1haW5pbmcgdmFsdWVzLgogICAgICAgICAgICAgIGlmICgodmFsdWUgPSB2YWx1ZW9mKHZhbHVlc1tpXSwgaSwgdmFsdWVzKSkgIT0gbnVsbCAmJiBtaW4gPiB2YWx1ZSkgewogICAgICAgICAgICAgICAgbWluID0gdmFsdWU7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CgogICAgICByZXR1cm4gbWluOwogICAgfQoKICAgIGZ1bmN0aW9uIHBlcm11dGUoYXJyYXksIGluZGV4ZXMpIHsKICAgICAgdmFyIGkgPSBpbmRleGVzLmxlbmd0aCwgcGVybXV0ZXMgPSBuZXcgQXJyYXkoaSk7CiAgICAgIHdoaWxlIChpLS0pIHBlcm11dGVzW2ldID0gYXJyYXlbaW5kZXhlc1tpXV07CiAgICAgIHJldHVybiBwZXJtdXRlczsKICAgIH0KCiAgICBmdW5jdGlvbiBzY2FuKHZhbHVlcywgY29tcGFyZSkgewogICAgICBpZiAoIShuID0gdmFsdWVzLmxlbmd0aCkpIHJldHVybjsKICAgICAgdmFyIG4sCiAgICAgICAgICBpID0gMCwKICAgICAgICAgIGogPSAwLAogICAgICAgICAgeGksCiAgICAgICAgICB4aiA9IHZhbHVlc1tqXTsKCiAgICAgIGlmIChjb21wYXJlID09IG51bGwpIGNvbXBhcmUgPSBhc2NlbmRpbmc7CgogICAgICB3aGlsZSAoKytpIDwgbikgewogICAgICAgIGlmIChjb21wYXJlKHhpID0gdmFsdWVzW2ldLCB4aikgPCAwIHx8IGNvbXBhcmUoeGosIHhqKSAhPT0gMCkgewogICAgICAgICAgeGogPSB4aSwgaiA9IGk7CiAgICAgICAgfQogICAgICB9CgogICAgICBpZiAoY29tcGFyZSh4aiwgeGopID09PSAwKSByZXR1cm4gajsKICAgIH0KCiAgICBmdW5jdGlvbiBzaHVmZmxlKGFycmF5LCBpMCwgaTEpIHsKICAgICAgdmFyIG0gPSAoaTEgPT0gbnVsbCA/IGFycmF5Lmxlbmd0aCA6IGkxKSAtIChpMCA9IGkwID09IG51bGwgPyAwIDogK2kwKSwKICAgICAgICAgIHQsCiAgICAgICAgICBpOwoKICAgICAgd2hpbGUgKG0pIHsKICAgICAgICBpID0gTWF0aC5yYW5kb20oKSAqIG0tLSB8IDA7CiAgICAgICAgdCA9IGFycmF5W20gKyBpMF07CiAgICAgICAgYXJyYXlbbSArIGkwXSA9IGFycmF5W2kgKyBpMF07CiAgICAgICAgYXJyYXlbaSArIGkwXSA9IHQ7CiAgICAgIH0KCiAgICAgIHJldHVybiBhcnJheTsKICAgIH0KCiAgICBmdW5jdGlvbiBzdW0odmFsdWVzLCB2YWx1ZW9mKSB7CiAgICAgIHZhciBuID0gdmFsdWVzLmxlbmd0aCwKICAgICAgICAgIGkgPSAtMSwKICAgICAgICAgIHZhbHVlLAogICAgICAgICAgc3VtID0gMDsKCiAgICAgIGlmICh2YWx1ZW9mID09IG51bGwpIHsKICAgICAgICB3aGlsZSAoKytpIDwgbik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AgICAgICAgICAgcGF0aCA9IHNlbGVjdGlvbi5zZWxlY3RBbGwoIi5kb21haW4iKS5kYXRhKFtudWxsXSksCiAgICAgICAgICAgIHRpY2sgPSBzZWxlY3Rpb24uc2VsZWN0QWxsKCIudGljayIpLmRhdGEodmFsdWVzLCBzY2FsZSkub3JkZXIoKSwKICAgICAgICAgICAgdGlja0V4aXQgPSB0aWNrLmV4aXQoKSwKICAgICAgICAgICAgdGlja0VudGVyID0gdGljay5lbnRlcigpLmFwcGVuZCgiZyIpLmF0dHIoImNsYXNzIiwgInRpY2siKSwKICAgICAgICAgICAgbGluZSA9IHRpY2suc2VsZWN0KCJsaW5lIiksCiAgICAgICAgICAgIHRleHQgPSB0aWNrLnNlbGVjdCgidGV4dCIpOwoKICAgICAgICBwYXRoID0gcGF0aC5tZXJnZShwYXRoLmVudGVyKCkuaW5zZXJ0KCJwYXRoIiwgIi50aWNrIikKICAgICAgICAgICAgLmF0dHIoImNsYXNzIiwgImRvbWFpbiIpCiAgICAgICAgICAgIC5hdHRyKCJzdHJva2UiLCAiY3VycmVudENvbG9yIikpOwoKICAgICAgICB0aWNrID0gdGljay5tZXJnZSh0aWNrRW50ZXIpOwoKICAgICAgICBsaW5lID0gbGluZS5tZXJnZSh0aWNrRW50ZXIuYXBwZW5kKCJsaW5lIikKICAgICAgICAgICAgLmF0dHIoInN0cm9rZSIsICJjdXJyZW50Q29sb3IiKQogICAgICAgICAgICAuYXR0cih4ICsgIjIiLCBrICogdGlja1NpemVJbm5lcikpOwoKICAgICAgICB0ZXh0ID0gdGV4dC5tZXJnZSh0aWNrRW50ZXIuYXBwZW5kKCJ0ZXh0IikKICAgICAgICAgICAgLmF0dHIoImZpbGwiLCAiY3VycmVudENvbG9yIikKICAgICAgICAgICAgLmF0dHIoeCwgayAqIHNwYWNpbmcpCiAgICAgICAgICAgIC5hdHRyKCJkeSIsIG9yaWVudCA9PT0gdG9wID8gIjBlbSIgOiBvcmllbnQgPT09IGJvdHRvbSA/ICIwLjcxZW0iIDogIjAuMzJlbSIpKTsKCiAgICAgICAgaWYgKGNvbnRleHQgIT09IHNlbGVjdGlvbikgewogICAgICAgICAgcGF0aCA9IHBhdGgudHJhbnNpdGlvbihjb250ZXh0KTsKICAgICAgICAgIHRpY2sgPSB0aWNrLnRyYW5zaXRpb24oY29udGV4dCk7CiAgICAgICAgICBsaW5lID0gbGluZS50cmFuc2l0aW9uKGNvbnRleHQpOwogICAgICAgICAgdGV4dCA9IHRleHQudHJhbnNpdGlvbihjb250ZXh0KTsKCiAgICAgICAgICB0aWNrRXhpdCA9IHRpY2tFeGl0LnRyYW5zaXRpb24oY29udGV4dCkKICAgICAgICAgICAgICAuYXR0cigib3BhY2l0eSIsIGVwc2lsb24pCiAgICAgICAgICAgICAgLmF0dHIoInRyYW5zZm9ybSIsIGZ1bmN0aW9uKGQpIHsgcmV0dXJuIGlzRmluaXRlKGQgPSBwb3NpdGlvbihkKSkgPyB0cmFuc2Zvcm0oZCkgOiB0aGlzLmdldEF0dHJpYnV0ZSgidHJhbnNmb3JtIik7IH0pOwoKICAgICAgICAgIHRpY2tFbnRlcgogICAgICAgICAgICAgIC5hdHRyKCJvcGFjaXR5IiwgZXBzaWxvbikKICAgICAgICAgICAgICAuYXR0cigidHJhbnNmb3JtIiwgZnVuY3Rpb24oZCkgeyB2YXIgcCA9IHRoaXMucGFyZW50Tm9kZS5fX2F4aXM7IHJldHVybiB0cmFuc2Zvcm0ocCAmJiBpc0Zpbml0ZShwID0gcChkKSkgPyBwIDogcG9zaXRpb24oZCkpOyB9KTsKICAgICAgICB9CgogICAgICAgIHRpY2tFeGl0LnJlbW92ZSgpOwoKICAgICAgICBwYXRoCiAgICAgICAgICAgIC5hdHRyKCJkIiwgb3JpZW50ID09PSBsZWZ0IHx8IG9yaWVudCA9PSByaWdodAogICAgICAgICAgICAgICAgPyAodGlja1NpemVPdXRlciA/ICJNIiArIGsgKiB0aWNrU2l6ZU91dGVyICsgIiwiICsgcmFuZ2UwICsgIkgwLjVWIiArIHJhbmdlMSArICJIIiArIGsgKiB0aWNrU2l6ZU91dGVyIDogIk0wLjUsIiArIHJhbmdlMCArICJWIiArIHJhbmdlMSkKICAgICAgICAgICAgICAgIDogKHRpY2tTaXplT3V0ZXIgPyAiTSIgKyByYW5nZTAgKyAiLCIgKyBrICogdGlja1NpemVPdXRlciArICJWMC41SCIgKyByYW5nZTEgKyAiViIgKyBrICogdGlja1NpemVPdXRlciA6ICJNIiArIHJhbmdlMCArICIsMC41SCIgKyByYW5nZTEpKTsKCiAgICAgICAgdGljawogICAgICAgICAgICAuYXR0cigib3BhY2l0eSIsIDEpCiAgICAgICAgICAgIC5hdHRyKCJ0cmFuc2Zvcm0iLCBmdW5jdGlvbihkKSB7IHJldHVybiB0cmFuc2Zvcm0ocG9zaXRpb24oZCkpOyB9KTsKCiAgICAgICAgbGluZQogICAgICAgICAgICAuYXR0cih4ICsgIjIiLCBrICogdGlja1NpemVJbm5lcik7CgogICAgICAgIHRleHQKICAgICAgICAgICAgLmF0dHIoeCwgayAqIHNwYWNpbmcpCiAgICAgICAgICAgIC50ZXh0KGZvcm1hdCk7CgogICAgICAgIHNlbGVjdGlvbi5maWx0ZXIoZW50ZXJpbmcpCiAgICAgICAgICAgIC5hdHRyKCJmaWxsIiwgIm5vbmUiKQogICAgICAgICAgICAuYXR0cigiZm9udC1zaXplIiwgMTApCiAgICAgICAgICAgIC5hdHRyKCJmb250LWZhbWlseSIsICJzYW5zLXNlcmlmIikKICAgICAgICAgICAgLmF0dHIoInRleHQtYW5jaG9yIiwgb3JpZW50ID09PSByaWdodCA/ICJzdGFydCIgOiBvcmllbnQgPT09IGxlZnQgPyAiZW5kIiA6ICJtaWRkbGUiKTsKCiAgICAgICAgc2VsZWN0aW9uCiAgICAgICAgICAgIC5lYWNoKGZ1bmN0aW9uKCkgeyB0aGlzLl9fYXhpcyA9IHBvc2l0aW9uOyB9KTsKICAgICAgfQoKICAgICAgYXhpcy5zY2FsZSA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChzY2FsZSA9IF8sIGF4aXMpIDogc2NhbGU7CiAgICAgIH07CgogICAgICBheGlzLnRpY2tzID0gZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuIHRpY2tBcmd1bWVudHMgPSBzbGljZSQxLmNhbGwoYXJndW1lbnRzKSwgYXhpczsKICAgICAgfTsKCiAgICAgIGF4aXMudGlja0FyZ3VtZW50cyA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/ICh0aWNrQXJndW1lbnRzID0gXyA9PSBudWxsID8gW10gOiBzbGljZSQxLmNhbGwoXyksIGF4aXMpIDogdGlja0FyZ3VtZW50cy5zbGljZSgpOwogICAgICB9OwoKICAgICAgYXhpcy50aWNrVmFsdWVzID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHRpY2tWYWx1ZXMgPSBfID09IG51bGwgPyBudWxsIDogc2xpY2UkMS5jYWxsKF8pLCBheGlzKSA6IHRpY2tWYWx1ZXMgJiYgdGlja1ZhbHVlcy5zbGljZSgpOwogICAgICB9OwoKICAgICAgYXhpcy50aWNrRm9ybWF0ID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHRpY2tGb3JtYXQgPSBfLCBheGlzKSA6IHRpY2tGb3JtYXQ7CiAgICAgIH07CgogICAgICBheGlzLnRpY2tTaXplID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHRpY2tTaXplSW5uZXIgPSB0aWNrU2l6ZU91dGVyID0gK18sIGF4aXMpIDogdGlja1NpemVJbm5lcjsKICAgICAgfTsKCiAgICAgIGF4aXMudGlja1NpemVJbm5lciA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxl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Jyb3IoImlsbGVnYWwgdHlwZTogIiArIHQpOwogICAgICAgIF9bdF0gPSBbXTsKICAgICAgfQogICAgICByZXR1cm4gbmV3IERpc3BhdGNoKF8pOwogICAgfQoKICAgIGZ1bmN0aW9uIERpc3BhdGNoKF8pIHsKICAgICAgdGhpcy5fID0gXzsKICAgIH0KCiAgICBmdW5jdGlvbiBwYXJzZVR5cGVuYW1lcyh0eXBlbmFtZXMsIHR5cGVzKSB7CiAgICAgIHJldHVybiB0eXBlbmFtZXMudHJpbSgpLnNwbGl0KC9efFxzKy8pLm1hcChmdW5jdGlvbih0KSB7CiAgICAgICAgdmFyIG5hbWUgPSAiIiwgaSA9IHQuaW5kZXhPZigiLiIpOwogICAgICAgIGlmIChpID49IDApIG5hbWUgPSB0LnNsaWNlKGkgKyAxKSwgdCA9IHQuc2xpY2UoMCwgaSk7CiAgICAgICAgaWYgKHQgJiYgIXR5cGVzLmhhc093blByb3BlcnR5KHQpKSB0aHJvdyBuZXcgRXJyb3IoInVua25vd24gdHlwZTogIiArIHQpOwogICAgICAgIHJldHVybiB7dHlwZTogdCwgbmFtZTogbmFtZX07CiAgICAgIH0pOwogICAgfQoKICAgIERpc3BhdGNoLnByb3RvdHlwZSA9IGRpc3BhdGNoLnByb3RvdHlwZSA9IHsKICAgICAgY29uc3RydWN0b3I6IERpc3BhdGNoLAogICAgICBvbjogZnVuY3Rpb24odHlwZW5hbWUsIGNhbGxiYWNrKSB7CiAgICAgICAgdmFyIF8gPSB0aGlzLl8sCiAgICAgICAgICAgIFQgPSBwYXJzZVR5cGVuYW1lcyh0eXBlbmFtZSArICIiLCBfKSwKICAgICAgICAgICAgdCwKICAgICAgICAgICAgaSA9IC0xLAogICAgICAgICAgICBuID0gVC5sZW5ndGg7CgogICAgICAgIC8vIElmIG5vIGNhbGxiYWNrIHdhcyBzcGVjaWZpZWQsIHJldHVybiB0aGUgY2FsbGJhY2sgb2YgdGhlIGdpdmVuIHR5cGUgYW5kIG5hbWUuCiAgICAgIC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VzIGludG8gZW50ZXIuCiAgICAgIC8vIFB1dCBhbnkgcmVtYWluaW5nIGRhdGEgaW50byBlbnRlci4KICAgICAgZm9yICg7IGkgPCBkYXRhTGVuZ3RoOyArK2kpIHsKICAgICAgICBpZiAobm9kZSA9IGdyb3VwW2ldKSB7CiAgICAgICAgICBub2RlLl9fZGF0YV9fID0gZGF0YVtpXTsKICAgICAgICAgIHVwZGF0ZVtpXSA9IG5vZGU7CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgIGVudGVyW2ldID0gbmV3IEVudGVyTm9kZShwYXJlbnQsIGRhdGFbaV0pOwogICAgICAgIH0KICAgICAgfQoKICAgICAgLy8gUHV0IGFueSBub24tbnVsbCBub2RlcyB0aGF0IGRvbuKAmXQgZml0IGludG8gZXhpdC4KICAgICAgZm9yICg7IGkgPCBncm91cExlbmd0aDsgKytpKSB7CiAgICAgICAgaWYgKG5vZGUgPSBncm91cFtpXSkgewogICAgICAgICAgZXhpdFtpXSA9IG5vZGU7CiAgICAgICAgfQogICAgICB9CiAgICB9CgogICAgZnVuY3Rpb24gYmluZEtleShwYXJlbnQsIGdyb3VwLCBlbnRlciwgdXBkYXRlLCBleGl0LCBkYXRhLCBrZXkpIHsKICAgICAgdmFyIGksCiAgICAgICAgICBub2RlLAogICAgICAgICAgbm9kZUJ5S2V5VmFsdWUgPSB7fSwKICAgICAgICAgIGdyb3VwTGVuZ3RoID0gZ3JvdXAubGVuZ3RoLAogICAgICAgICAgZGF0YUxlbmd0aCA9IGRhdGEubGVuZ3RoLAogICAgICAgICAga2V5VmFsdWVzID0gbmV3IEFycmF5KGdyb3VwTGVuZ3RoKSwKICAgICAgICAgIGtleVZhbHVlOwoKICAgICAgLy8gQ29tcHV0ZSB0aGUga2V5IGZvciBlYWNoIG5vZGUuCiAgICAgIC8vIElmIG11bHRpcGxlIG5vZGVzIGhhdmUgdGhlIHNhbWUga2V5LCB0aGUgZHVwbGljYXRlcyBhcmUgYWRkZWQgdG8gZXhpdC4KICAgICAgZm9yIChpID0gMDsgaSA8IGdyb3VwTGVuZ3RoOyArK2kpIHsKICAgICAgICBpZiAobm9kZSA9IGdyb3VwW2ldKSB7CiAgICAgICAgICBrZXlWYWx1ZXNbaV0gPSBrZXlWYWx1ZSA9IGtleVByZWZpeCArIGtleS5jYWxsKG5vZGUsIG5vZGUuX19kYXRhX18sIGksIGdyb3VwKTsKICAgICAgICAgIGlmIChrZXlWYWx1ZSBpbiBub2RlQnlLZXlWYWx1ZSkgewogICAgICAgICAgICBleGl0W2ldID0gbm9kZTsKICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIG5vZGVCeUtleVZhbHVlW2tleVZhbHVlXSA9IG5vZGU7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CgogICAgICAvLyBDb21wdXRlIHRoZSBrZXkgZm9yIGVhY2ggZGF0dW0uCiAgICAgIC8vIElmIHRoZXJlIGEgbm9kZSBhc3NvY2lhdGVkIHdpdGggdGhpcyBrZXksIGpvaW4gYW5kIGFkZCBpdCB0byB1cGRhdGUuCiAgICAgIC8vIElmIHRoZXJlIGlzIG5vdCAob3IgdGhlIGtleSBpcyBhIGR1cGxpY2F0ZSksIGFkZCBpdCB0byBlbnRlci4KICAgICAgZm9yIChpID0gMDsgaSA8IGRhdGFMZW5ndGg7ICsraSkgewogICAgICAgIGtleVZhbHVlID0ga2V5UHJlZml4ICsga2V5LmNhbGwocGFyZW50LCBkYXRhW2ldLCBpLCBkYXRhKTsKICAgICAgICBpZiAobm9kZSA9IG5vZGVCeUtleVZhbHVlW2tleVZhbHVlXSkgewogICAgICAgICAgdXBkYXRlW2ldID0gbm9kZTsKICAgICAgICAgIG5vZGUuX19kYXRhX18gPSBkYXRhW2ldOwogICAgICAgICAgbm9kZUJ5S2V5VmFsdWVba2V5VmFsdWVdID0gbnVsbDsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgZW50ZXJbaV0gPSBuZXcgRW50ZXJOb2RlKHBhcmVudCwgZGF0YVtpX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AgICAgICBuZXh0ID0gbm9kZTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KCiAgICAgIHJldHVybiB0aGlzOwogICAgfQoKICAgIGZ1bmN0aW9uIHNlbGVjdGlvbl9zb3J0KGNvbXBhcmUpIHsKICAgICAgaWYgKCFjb21wYXJlKSBjb21wYXJlID0gYXNjZW5kaW5nJDE7CgogICAgICBmdW5jdGlvbiBjb21wYXJlTm9kZShhLCBiKSB7CiAgICAgICAgcmV0dXJuIGEgJiYgYiA/IGNvbXBhcmUoYS5fX2RhdGFfXywgYi5fX2RhdGFfXykgOiAhYSAtICFiOwogICAgICB9CgogICAgICBmb3IgKHZhciBncm91cHMgPSB0aGlzLl9ncm91cHMsIG0gPSBncm91cHMubGVuZ3RoLCBzb3J0Z3JvdXBzID0gbmV3IEFycmF5KG0pLCBqID0gMDsgaiA8IG07ICsraikgewogICAgICAgIGZvciAodmFyIGdyb3VwID0gZ3JvdXBzW2pdLCBuID0gZ3JvdXAubGVuZ3RoLCBzb3J0Z3JvdXAgPSBzb3J0Z3JvdXBzW2pdID0gbmV3IEFycmF5KG4pLCBub2RlLCBpID0gMDsgaSA8IG47ICsraSkgewogICAgICAgICAgaWYgKG5vZGUgPSBncm91cFtpXSkgewogICAgICAgICAgICBzb3J0Z3JvdXBbaV0gPSBub2RlOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBzb3J0Z3JvdXAuc29ydChjb21wYXJlTm9kZSk7CiAgICAgIH0KCiAgICAgIHJldHVybiBuZXcgU2VsZWN0aW9uKHNvcnRncm91cHMsIHRoaXMuX3BhcmVudHMpLm9yZGVyKCk7CiAgICB9CgogICAgZnVuY3Rpb24gYXNjZW5kaW5nJDEoYSwgYikgewogICAgICByZXR1cm4gYSA8IGIgPyAtMSA6IGEgPiBiID8gMSA6IGEgPj0gYiA/IDAgOiBOYU47CiAgICB9CgogICAgZnVuY3Rpb24gc2VsZWN0aW9uX2NhbGwoKSB7CiAgICAgIHZhciBjYWxsYmFjayA9IGFyZ3VtZW50c1swXTsKICAgICAgYXJndW1lbnRzWzBdID0gdGhpczsKICAgICAgY2FsbGJhY2suYXBwbHkobnVsbCwgYXJndW1lbnRzKTsKICAgICAgcmV0dXJuIHRoaXM7CiAgICB9CgogICAgZnVuY3Rpb24gc2VsZWN0aW9uX25vZGVzKCkgewogICAgICB2YXIgbm9kZXMgPSBuZXcgQXJyYXkodGhpcy5zaXplKCkpLCBpID0gLTE7CiAgICAgIHRoaXMuZWFjaChmdW5jdGlvbigpIHsgbm9kZXNbKytpXSA9IHRoaXM7IH0pOwogICAgICByZXR1cm4gbm9kZXM7CiAgICB9CgogICAgZnVuY3Rpb24gc2VsZWN0aW9uX25vZGUoKSB7CgogICAgICBmb3IgKHZhciBncm91cHMgPSB0aGlzLl9ncm91cHMsIGogPSAwLCBtID0gZ3JvdXBzLmxlbmd0aDsgaiA8IG07ICsraikgewogICAgICAgIGZvciAodmFyIGdyb3VwID0gZ3JvdXBzW2pdLCBpID0gMCwgbiA9IGdyb3VwLmxlbmd0aDsgaSA8IG47ICsraSkgewogICAgICAgICAgdmFyIG5vZGUgPSBncm91cFtpXTsKICAgICAgICAgIGlmIChub2RlKSByZXR1cm4gbm9kZTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIHJldHVybiBudWxsOwogICAgfQoKICAgIGZ1bmN0aW9uIHNlbGVjdGlvbl9zaXplKCkgewogICAgICB2YXIgc2l6ZSA9IDA7CiAgICAgIHRoaXMuZWFjaChmdW5jdGlvbigpIHsgKytzaXplOyB9KTsKICAgICAgcmV0dXJuIHNpemU7CiAgICB9CgogICAgZnVuY3Rpb24gc2VsZWN0aW9uX2VtcHR5KCkgewogICAgICByZXR1cm4gIXRoaXMubm9kZSgpOwogICAgfQoKICAgIGZ1bmN0aW9uIHNlbGVjdGlvbl9lYWNoKGNhbGxiYWNrKSB7CgogICAgICBmb3IgKHZhciBncm91cHMgPSB0aGlzLl9ncm91cHMsIGogPSAwLCBtID0gZ3JvdXBzL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mVudHMgPSB7bW91c2VlbnRlcjogIm1vdXNlb3ZlciIsIG1vdXNlbGVhdmU6ICJtb3VzZW91dCJ9OwogICAgICB9CiAgICB9CgogICAgZnVuY3Rpb24gZmlsdGVyQ29udGV4dExpc3RlbmVyKGxpc3RlbmVyLCBpbmRleCwgZ3JvdXApIHsKICAgICAgbGlzdGVuZXIgPSBjb250ZXh0TGlzdGVuZXIobGlzdGVuZXIsIGluZGV4LCBncm91cCk7CiAgICAgIHJldHVybiBmdW5jdGlvbihldmVudCkgewogICAgICAgIHZhciByZWxhdGVkID0gZXZlbnQucmVsYXRlZFRhcmdldDsKICAgICAgICBpZiAoIXJlbGF0ZWQgfHwgKHJlbGF0ZWQgIT09IHRoaXMgJiYgIShyZWxhdGVkLmNvbXBhcmVEb2N1bWVudFBvc2l0aW9uKHRoaXMpICYgOCkpKSB7CiAgICAgICAgICBsaXN0ZW5lci5jYWxsKHRoaXMsIGV2ZW50KTsKICAgICAgICB9CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gY29udGV4dExpc3RlbmVyKGxpc3RlbmVyLCBpbmRleCwgZ3JvdXApIHsKICAgICAgcmV0dXJuIGZ1bmN0aW9uKGV2ZW50MSkgewogICAgICAgIHZhciBldmVudDAgPSBldmVudDsgLy8gRXZlbnRzIGNhbiBiZSByZWVudHJhbnQgKGUuZy4sIGZvY3VzKS4KICAgICAgICBldmVudCA9IGV2ZW50MTsKICAgICAgICB0cnkgewogICAgICAgICAgbGlzdGVuZXIuY2FsbCh0aGlzLCB0aGlzLl9fZGF0YV9fLCBpbmRleCwgZ3JvdXApOwogICAgICAgIH0gZmluYWxseSB7CiAgICAgICAgICBldmVudCA9IGV2ZW50MDsKICAgICAgICB9CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gcGFyc2VUeXBlbmFtZXMkMSh0eXBlbmFtZXMpIHsKICAgICAgcmV0dXJuIHR5cGVuYW1lcy50cmltKCkuc3BsaXQoL158XHMrLykubWFwKGZ1bmN0aW9uKHQpIHsKICAgICAgICB2YXIgbmFtZSA9ICIiLCBpID0gdC5pbmRleE9mKCIuIik7CiAgICAgICAgaWYgKGkgPj0gMCkgbmFtZSA9IHQuc2xpY2UoaSArIDEpLCB0ID0gdC5zbGljZSgwLCBpKTsKICAgICAgICByZXR1cm4ge3R5cGU6IHQsIG5hbWU6IG5hbWV9OwogICAgICB9KTsKICAgIH0KCiAgICBmdW5jdGlvbiBvblJlbW92ZSh0eXBlbmFtZSkgewogICAgICByZXR1cm4gZnVuY3Rpb24oKSB7CiAgICAgICAgdmFyIG9uID0gdGhpcy5fX29uOwogICAgICAgIGlmICghb24pIHJldHVybjsKICAgICAgICBmb3IgKHZhciBqID0gMCwgaSA9IC0xLCBtID0gb24ubGVuZ3RoLCBvOyBqIDwgbTsgKytqKSB7CiAgICAgICAgICBpZiAobyA9IG9uW2pdLCAoIXR5cGVuYW1lLnR5cGUgfHwgby50eXBlID09PSB0eXBlbmFtZS50eXBlKSAmJiBvLm5hbWUgPT09IHR5cGVuYW1lLm5hbWUpIHsKICAgICAgICAgICAgdGhpcy5yZW1vdmVFdmVudExpc3RlbmVyKG8udHlwZSwgby5saXN0ZW5lciwgby5jYXB0dXJlKTsKICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIG9uWysraV0gPSBvOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBpZiAoKytpKSBvbi5sZW5ndGggPSBpOwogICAgICAgIGVsc2UgZGVsZXRlIHRoaXMuX19vbjsKICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiBvbkFkZCh0eXBlbmFtZSwgdmFsdWUsIGNhcHR1cmUpIHsKICAgICAgdmFyIHdyYXAgPSBmaWx0ZXJFdmVudHMuaGFzT3duUHJvcGVydHkodHlwZW5hbWUudHlwZSkgPyBmaWx0ZXJDb250ZXh0TGlzdGVuZXIgOiBjb250ZXh0TGlzdGVuZXI7CiAgICAgIHJldHVybiBmdW5jdGlvbihkLCBpLCBncm91cCk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ndW1lbnRzLmxlbmd0aCA8IDIpIHsKICAgICAgICB2YXIgb24gPSB0aGlzLm5vZGUoKS5fX29uOwogICAgICAgIGlmIChvbikgZm9yICh2YXIgaiA9IDAsIG0gPSBvbi5sZW5ndGgsIG87IGogPCBtOyArK2opIHsKICAgICAgICAgIGZvciAoaSA9IDAsIG8gPSBvbltqXTsgaSA8IG47ICsraSkgewogICAgICAgICAgICBpZiAoKHQgPSB0eXBlbmFtZXNbaV0pLnR5cGUgPT09IG8udHlwZSAmJiB0Lm5hbWUgPT09IG8ubmFtZSkgewogICAgICAgICAgICAgIHJldHVybiBvLnZhbHVlOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybjsKICAgICAgfQoKICAgICAgb24gPSB2YWx1ZSA/IG9uQWRkIDogb25SZW1vdmU7CiAgICAgIGlmIChjYXB0dXJlID09IG51bGwpIGNhcHR1cmUgPSBmYWxzZTsKICAgICAgZm9yIChpID0gMDsgaSA8IG47ICsraSkgdGhpcy5lYWNoKG9uKHR5cGVuYW1lc1tpXSwgdmFsdWUsIGNhcHR1cmUpKTsKICAgICAgcmV0dXJuIHRoaXM7CiAgICB9CgogICAgZnVuY3Rpb24gY3VzdG9tRXZlbnQoZXZlbnQxLCBsaXN0ZW5lciwgdGhhdCwgYXJncykgewogICAgICB2YXIgZXZlbnQwID0gZXZlbnQ7CiAgICAgIGV2ZW50MS5zb3VyY2VFdmVudCA9IGV2ZW50OwogICAgICBldmVudCA9IGV2ZW50MTsKICAgICAgdHJ5IHsKICAgICAgICByZXR1cm4gbGlzdGVuZXIuYXBwbHkodGhhdCwgYXJncyk7CiAgICAgIH0gZmluYWxseSB7CiAgICAgICAgZXZlbnQgPSBldmVudDA7CiAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiBkaXNwYXRjaEV2ZW50KG5vZGUsIHR5cGUsIHBhcmFtcykgewogICAgICB2YXIgd2luZG93ID0gZGVmYXVsdFZpZXcobm9kZSksCi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odmlldykgewogICAgICB2YXIgcm9vdCA9IHZpZXcuZG9jdW1lbnQuZG9jdW1lbnRFbGVtZW50LAogICAgICAgICAgc2VsZWN0aW9uID0gc2VsZWN0KHZpZXcpLm9uKCJkcmFnc3RhcnQuZHJhZyIsIG5vZXZlbnQsIHRydWUpOwogICAgICBpZiAoIm9uc2VsZWN0c3RhcnQiIGluIHJvb3QpIHsKICAgICAgICBzZWxlY3Rpb24ub24oInNlbGVjdHN0YXJ0LmRyYWciLCBub2V2ZW50LCB0cnVlKTsKICAgICAgfSBlbHNlIHsKICAgICAgICByb290Ll9fbm9zZWxlY3QgPSByb290LnN0eWxlLk1velVzZXJTZWxlY3Q7CiAgICAgICAgcm9vdC5zdHlsZS5Nb3pVc2VyU2VsZWN0ID0gIm5vbmUiOwogICAgICB9CiAgICB9CgogICAgZnVuY3Rpb24geWVzZHJhZyh2aWV3LCBub2NsaWNrKSB7CiAgICAgIHZhciByb290ID0gdmlldy5kb2N1bWVudC5kb2N1bWVudEVsZW1lbnQsCiAgICAgICAgICBzZWxlY3Rpb24gPSBzZWxlY3Qodmlldykub24oImRyYWdzdGFydC5kcmFnIiwgbnVsbCk7CiAgICAgIGlmIChub2NsaWNrKSB7CiAgICAgICAgc2VsZWN0aW9uLm9uKCJjbGljay5kcmFnIiwgbm9ldmVudCwgdHJ1ZSk7CiAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpIHsgc2VsZWN0aW9uLm9uKCJjbGljay5kcmFnIiwgbnVsbCk7IH0sIDApOwogICAgICB9CiAgICAgIGlmICgib25zZWxlY3RzdGFydCIgaW4gcm9vdCkgewogICAgICAgIHNlbGVjdGlvbi5vbigic2VsZWN0c3RhcnQuZHJhZyIsIG51bGwpOwogICAgICB9IGVsc2UgewogICAgICAgIHJvb3Quc3R5bGUuTW96VXNlclNlbGVjdCA9IHJvb3QuX19ub3NlbGVjdDsKICAgICAgICBkZWxldGUgcm9vdC5fX25vc2VsZWN0OwogICAgICB9CiAgICB9CgogICA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gICByZXR1cm4gZCA9PSBudWxsID8ge3g6IGV2ZW50LngsIHk6IGV2ZW50Lnl9IDogZDsKICAgIH0KCiAgICBmdW5jdGlvbiBkZWZhdWx0VG91Y2hhYmxlKCkgewogICAgICByZXR1cm4gbmF2aWdhdG9yLm1heFRvdWNoUG9pbnRzIHx8ICgib250b3VjaHN0YXJ0IiBpbiB0aGlzKTsKICAgIH0KCiAgICBmdW5jdGlvbiBkcmFnKCkgewogICAgICB2YXIgZmlsdGVyID0gZGVmYXVsdEZpbHRlciwKICAgICAgICAgIGNvbnRhaW5lciA9IGRlZmF1bHRDb250YWluZXIsCiAgICAgICAgICBzdWJqZWN0ID0gZGVmYXVsdFN1YmplY3QsCiAgICAgICAgICB0b3VjaGFibGUgPSBkZWZhdWx0VG91Y2hhYmxlLAogICAgICAgICAgZ2VzdHVyZXMgPSB7fSwKICAgICAgICAgIGxpc3RlbmVycyA9IGRpc3BhdGNoKCJzdGFydCIsICJkcmFnIiwgImVuZCIpLAogICAgICAgICAgYWN0aXZlID0gMCwKICAgICAgICAgIG1vdXNlZG93bngsCiAgICAgICAgICBtb3VzZWRvd255LAogICAgICAgICAgbW91c2Vtb3ZpbmcsCiAgICAgICAgICB0b3VjaGVuZGluZywKICAgICAgICAgIGNsaWNrRGlzdGFuY2UyID0gMDsKCiAgICAgIGZ1bmN0aW9uIGRyYWcoc2VsZWN0aW9uKSB7CiAgICAgICAgc2VsZWN0aW9uCiAgICAgICAgICAgIC5vbigibW91c2Vkb3duLmRyYWciLCBtb3VzZWRvd25lZCkKICAgICAgICAgIC5maWx0ZXIodG91Y2hhYmxlKQogICAgICAgICAgICAub24oInRvdWNoc3RhcnQuZHJhZyIsIHRvdWNoc3RhcnRlZCkKICAgICAgICAgICAgLm9uKCJ0b3VjaG1vdmUuZHJhZyIsIHRvdWNobW92ZWQpCiAgICAgICAgICAgIC5vbigidG91Y2hlbmQuZHJhZyB0b3VjaGNhbmNlbC5kcmFnIiwgdG91Y2hlbmRlZCkKIC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gICAgICAgICBnID0gby5nIC8gMjU1LAogICAgICAgICAgYiA9IG8uYiAvIDI1NSwKICAgICAgICAgIG1pbiA9IE1hdGgubWluKHIsIGcsIGIpLAogICAgICAgICAgbWF4ID0gTWF0aC5tYXgociwgZywgYiksCiAgICAgICAgICBoID0gTmFOLAogICAgICAgICAgcyA9IG1heCAtIG1pbiwKICAgICAgICAgIGwgPSAobWF4ICsgbWluKSAvIDI7CiAgICAgIGlmIChzKSB7CiAgICAgICAgaWYgKHIgPT09IG1heCkgaCA9IChnIC0gYikgLyBzICsgKGcgPCBiKSAqIDY7CiAgICAgICAgZWxzZSBpZiAoZyA9PT0gbWF4KSBoID0gKGIgLSByKSAvIHMgKyAyOwogICAgICAgIGVsc2UgaCA9IChyIC0gZykgLyBzICsgNDsKICAgICAgICBzIC89IGwgPCAwLjUgPyBtYXggKyBtaW4gOiAyIC0gbWF4IC0gbWluOwogICAgICAgIGggKj0gNjA7CiAgICAgIH0gZWxzZSB7CiAgICAgICAgcyA9IGwgPiAwICYmIGwgPCAxID8gMCA6IGg7CiAgICAgIH0KICAgICAgcmV0dXJuIG5ldyBIc2woaCwgcywgbCwgby5vcGFjaXR5KTsKICAgIH0KCiAgICBmdW5jdGlvbiBoc2woaCwgcywgbCwgb3BhY2l0eSkgewogICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA9PT0gMSA/IGhzbENvbnZlcnQoaCkgOiBuZXcgSHNsKGgsIHMsIGwsIG9wYWNpdHkgPT0gbnVsbCA/IDEgOiBvcGFjaXR5KTsKICAgIH0KCiAgICBmdW5jdGlvbiBIc2woaCwgcywgbCwgb3BhY2l0eSkgewogICAgICB0aGlzLmggPSAraDsKICAgICAgdGhpcy5zID0gK3M7CiAgICAgIHRoaXMubCA9ICtsOwogICAgICB0aGlzLm9wYWNpdHkgPSArb3BhY2l0eTsKICAgIH0KCiAgICBkZWZpbmUoSHNsLCBoc2wsIGV4dGVuZChDb2xvciwgewogICAgICBicmlnaHRlcjogZnVuY3Rpb24oaykgewogICAgICAgIGsgPSBrID09IG51bGwgPyBicmlnaHRlciA6IE1hdGgucG93KGJyaWdodGVyLCBrKTsKICAgICAgICByZXR1cm4gbmV3IEhzbCh0aGlzLmgsIHRoaXMucywgdGhpcy5sICogaywgdGhpcy5vcGFjaXR5KTsKICAgICAgfSwKICAgICAgZGFya2VyOiBmdW5jdGlvbihrKSB7CiAgICAgICAgayA9IGsgPT0gbnVsbCA/IGRhcmtlciA6IE1hdGgucG93KGRhcmtlciwgayk7CiAgICAgICAgcmV0dXJuIG5ldyBIc2wodGhpcy5oLCB0aGlzLnMsIHRoaXMubCAqIGssIHRoaXMub3BhY2l0eSk7CiAgICAgIH0sCiAgICAgIHJnYjogZnVuY3Rpb24oKSB7CiAgICAgICAgdmFyIGggPSB0aGlzLmggJSAzNjAgKyAodGhpcy5oIDwgMCkgKiAzNjAsCiAgICAgICAgICAgIHMgPSBpc05hTihoKSB8fCBpc05hTih0aGlzLnMpID8gMCA6IHRoaXMucywKICAgICAgICAgICAgbCA9IHRoaXMubCwKICAgICAgICAgICAgbTIgPSBsICsgKGwgPCAwLjUgPyBsIDogMSAtIGwpICogcywKICAgICAgICAgICAgbTEgPSAyICogbCAtIG0yOwogICAgICAgIHJldHVybiBuZXcgUmdiKAogICAgICAgICAgaHNsMnJnYihoID49IDI0MCA/IGggLSAyNDAgOiBoICsgMTIwLCBtMSwgbTIpLAogICAgICAgICAgaHNsMnJnYihoLCBtMSwgbTIpLAogICAgICAgICAgaHNsMnJnYihoIDwgMTIwID8gaCArIDI0MCA6IGggLSAxMjAsIG0xLCBtMiksCiAgICAgICAgICB0aGlzLm9wYWNpdHkKICAgICAgICApOwogICAgICB9LAogICAgICBkaXNwbGF5YWJsZTogZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuICgwIDw9IHRoaXMucyAmJiB0aGlzLnMgPD0gMSB8fCBpc05hTih0aGlzLnMpKQogICAgICAgICAgICAmJiAoMCA8PSB0aGlzLmwgJiYg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YXRoLnNpbihoKSAqIG8uYywgby5vcGFjaXR5KTsKICAgIH0KCiAgICBkZWZpbmUoSGNsLCBoY2wsIGV4dGVuZChDb2xvciwgewogICAgICBicmlnaHRlcjogZnVuY3Rpb24oaykgewogICAgICAgIHJldHVybiBuZXcgSGNsKHRoaXMuaCwgdGhpcy5jLCB0aGlzLmwgKyBLICogKGsgPT0gbnVsbCA/IDEgOiBrKSwgdGhpcy5vcGFjaXR5KTsKICAgICAgfSwKICAgICAgZGFya2VyOiBmdW5jdGlvbihrKSB7CiAgICAgICAgcmV0dXJuIG5ldyBIY2wodGhpcy5oLCB0aGlzLmMsIHRoaXMubCAtIEsgKiAoayA9PSBudWxsID8gMSA6IGspLCB0aGlzLm9wYWNpdHkpOwogICAgICB9LAogICAgICByZ2I6IGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiBoY2wybGFiKHRoaXMpLnJnYigpOwogICAgICB9CiAgICB9KSk7CgogICAgdmFyIEEgPSAtMC4xNDg2MSwKICAgICAgICBCID0gKzEuNzgyNzcsCiAgICAgICAgQyA9IC0wLjI5MjI3LAogICAgICAgIEQgPSAtMC45MDY0OSwKICAgICAgICBFID0gKzEuOTcyOTQsCiAgICAgICAgRUQgPSBFICogRCwKICAgICAgICBFQiA9IEUgKiBCLAogICAgICAgIEJDX0RBID0gQiAqIEMgLSBEICogQTsKCiAgICBmdW5jdGlvbiBjdWJlaGVsaXhDb252ZXJ0KG8pIHsKICAgICAgaWYgKG8gaW5zdGFuY2VvZiBDdWJlaGVsaXgpIHJldHVybiBuZXcgQ3ViZWhlbGl4KG8uaCwgby5zLCBvLmwsIG8ub3BhY2l0eSk7CiAgICAgIGlmICghKG8gaW5zdGFuY2VvZiBSZ2IpKSBvID0gcmdiQ29udmVydChvKTsKICAgICAgdmFyIHIgPSBvLnIgLyAyNTUsCiAgICAgICAgICBnID0gby5nIC8gMjU1LAogICAgICAgICAgYiA9IG8uYiAvIDI1NSwKICAgICAgICAgIGwgPSAoQkNfREEg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BhY2l0eSk7CiAgICAgIH0sCiAgICAgIGRhcmtlcjogZnVuY3Rpb24oaykgewogICAgICAgIGsgPSBrID09IG51bGwgPyBkYXJrZXIgOiBNYXRoLnBvdyhkYXJrZXIsIGspOwogICAgICAgIHJldHVybiBuZXcgQ3ViZWhlbGl4KHRoaXMuaCwgdGhpcy5zLCB0aGlzLmwgKiBrLCB0aGlzLm9wYWNpdHkpOwogICAgICB9LAogICAgICByZ2I6IGZ1bmN0aW9uKCkgewogICAgICAgIHZhciBoID0gaXNOYU4odGhpcy5oKSA/IDAgOiAodGhpcy5oICsgMTIwKSAqIGRlZzJyYWQsCiAgICAgICAgICAgIGwgPSArdGhpcy5sLAogICAgICAgICAgICBhID0gaXNOYU4odGhpcy5zKSA/IDAgOiB0aGlzLnMgKiBsICogKDEgLSBsKSwKICAgICAgICAgICAgY29zaCA9IE1hdGguY29zKGgpLAogICAgICAgICAgICBzaW5oID0gTWF0aC5zaW4oaCk7CiAgICAgICAgcmV0dXJuIG5ldyBSZ2IoCiAgICAgICAgICAyNTUgKiAobCArIGEgKiAoQSAqIGNvc2ggKyBCICogc2luaCkpLAogICAgICAgICAgMjU1ICogKGwgKyBhICogKEMgKiBjb3NoICsgRCAqIHNpbmgpKSwKICAgICAgICAgIDI1NSAqIChsICsgYSAqIChFICogY29zaCkpLAogICAgICAgICAgdGhpcy5vcGFjaXR5CiAgICAgICAgKTsKICAgICAgfQogICAgfSkpOwoKICAgIGZ1bmN0aW9uIGJhc2lzKHQxLCB2MCwgdjEsIHYyLCB2MykgewogICAgICB2YXIgdDIgPSB0MSAqIHQxLCB0MyA9IHQyICogdDE7CiAgICAgIHJldHVybiAoKDEgLSAzICogdDEgKyAzICogdDIgLSB0MykgKiB2MAogICAgICAgICAgKyAoNCAtIDYgKiB0MiArIDMgKiB0MykgKiB2MQogICAgICAgICAgKyAoMSArIDMgKiB0MSArIDMgKiB0MiAtIDMgKiB0MykgKiB2MgogICAgICAgICAgKyB0MyAqIHYzKSAvID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B2YXIgY29sb3IgPSBnYW1tYSh5KTsKCiAgICAgIGZ1bmN0aW9uIHJnYiQxKHN0YXJ0LCBlbmQpIHsKICAgICAgICB2YXIgciA9IGNvbG9yKChzdGFydCA9IHJnYihzdGFydCkpLnIsIChlbmQgPSByZ2IoZW5kKSkuciksCiAgICAgICAgICAgIGcgPSBjb2xvcihzdGFydC5nLCBlbmQuZyksCiAgICAgICAgICAgIGIgPSBjb2xvcihzdGFydC5iLCBlbmQuYiksCiAgICAgICAgICAgIG9wYWNpdHkgPSBub2dhbW1hKHN0YXJ0Lm9wYWNpdHksIGVuZC5vcGFjaXR5KTsKICAgICAgICByZXR1cm4gZnVuY3Rpb24odCkgewogICAgICAgICAgc3RhcnQuciA9IHIodCk7CiAgICAgICAgICBzdGFydC5nID0gZyh0KTsKICAgICAgICAgIHN0YXJ0LmIgPSBiKHQpOwogICAgICAgICAgc3RhcnQub3BhY2l0eSA9IG9wYWNpdHkodCk7CiAgICAgICAgICByZXR1cm4gc3RhcnQgKyAiIjsKICAgICAgICB9OwogICAgICB9CgogICAgICByZ2IkMS5nYW1tYSA9IHJnYkdhbW1hOwoKICAgICAgcmV0dXJuIHJnYiQxOwogICAgfSkoMSk7CgogICAgZnVuY3Rpb24gcmdiU3BsaW5lKHNwbGluZSkgewogICAgICByZXR1cm4gZnVuY3Rpb24oY29sb3JzKSB7CiAgICAgICAgdmFyIG4gPSBjb2xvcnMubGVuZ3RoLAogICAgICAgICAgICByID0gbmV3IEFycmF5KG4pLAogICAgICAgICAgICBnID0gbmV3IEFycmF5KG4pLAogICAgICAgICAgICBiID0gbmV3IEFycmF5KG4pLAogICAgICAgICAgICBpLCBjb2xvcjsKICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbjsgKytpKSB7CiAgICAgICAgICBjb2xvciA9IHJnYihjb2xvcnNbaV0pOwogICAgICAgICAgcltpXSA9IGNvbG9yLnIgfHwgMDsKICAgICAgICAgIGdbaV0gPSBjb2xvci5nIHx8IDA7CiAgICAgICAgICBiW2ldID0gY29sb3IuYiB8fCAwOwogICAgICAgIH0KICAgICAgICByID0gc3BsaW5lKHIpOwogICAgICAgIGcgPSBzcGxpbmUoZyk7CiAgICAgICAgYiA9IHNwbGluZShiKTsKICAgICAgICBjb2xvci5vcGFjaXR5ID0gMTsKICAgICAgICByZXR1cm4gZnVuY3Rpb24odCkgewogICAgICAgICAgY29sb3IuciA9IHIodCk7CiAgICAgICAgICBjb2xvci5nID0gZyh0KTsKICAgICAgICAgIGNvbG9yLmIgPSBiKHQpOwogICAgICAgICAgcmV0dXJuIGNvbG9yICsgIiI7CiAgICAgICAgfTsKICAgICAgfTsKICAgIH0KCiAgICB2YXIgcmdiQmFzaXMgPSByZ2JTcGxpbmUoYmFzaXMkMSk7CiAgICB2YXIgcmdiQmFzaXNDbG9zZWQgPSByZ2JTcGxpbmUoYmFzaXNDbG9zZWQpOwoKICAgIGZ1bmN0aW9uIG51bWJlckFycmF5KGEsIGIpIHsKICAgICAgaWYgKCFiKSBiID0gW107CiAgICAgIHZhciBuID0gYSA/IE1hdGgubWluKGIubGVuZ3RoLCBhLmxlbmd0aCkgOiAwLAogICAgICAgICAgYyA9IGIuc2xpY2UoKSwKICAgICAgICAgIGk7CiAgICAgIHJldHVybiBmdW5jdGlvbih0KSB7CiAgICAgICAgZm9yIChpID0gMDsgaSA8IG47ICsraSkgY1tpXSA9IGFbaV0gKiAoMSAtIHQpICsgYltpXSAqIHQ7CiAgICAgICAgcmV0dXJuIGM7CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gaXNOdW1iZXJBcnJheSh4KSB7CiAgICAgIHJldHVybiBBcnJheUJ1ZmZlci5pc1ZpZXcoeCkgJiYgISh4IGluc3RhbmNlb2YgRGF0YVZpZXcpOwogICAgfQoKICAgIGZ1bmN0aW9uIGFycmF5JDEoYSwgYikgewogICAgICByZXR1cm4gKGlzTnVtYmVyQXJyYXkoYikgPyBudW1iZXJBcnJheSA6IGdlbmVyaWNBcnJheSkoYSwgYik7CiAgICB9CgogICAgZnVuY3Rpb24gZ2VuZXJpY0FycmF5KGEsIGIpIHsKICAgICAgdmFyIG5iID0gYiA/IGIubGVuZ3RoIDogMCwKICAgICAgICAgIG5hID0gYSA/IE1hdGgubWluKG5iLCBhLmxlbmd0aCkgOiAwLAogICAgICAgICAgeCA9IG5ldyBBcnJheShuYSksCiAgICAgICAgICBjID0gbmV3IEFycmF5KG5iKSwKICAgICAgICAgIGk7CgogICAgICBmb3IgKGkgPSAwOyBpIDwgbmE7ICsraSkgeFtpXSA9IGludGVycG9sYXRlVmFsdWUoYVtpXSwgYltpXSk7CiAgICAgIGZvciAoOyBpIDwgbmI7ICsraSkgY1tpXSA9IGJbaV07CgogICAgICByZXR1cm4gZnVuY3Rpb24odCkgewogICAgICAgIGZvciAoaSA9IDA7IGkgPCBuYTsgKytpKSBjW2ldID0geFtpXSh0KTsKICAgICAgICByZXR1cm4gYzsKICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiBkYXRlKGEsIGIpIHsKICAgICAgdmFyIGQgPSBuZXcgRGF0ZTsKICAgICAgcmV0dXJuIGEgPSArYSwgYiA9ICtiLCBmdW5jdGlvbih0KSB7CiAgICAgICAgcmV0dXJuIGQuc2V0VGltZShhICogKDEgLSB0KSArIGIgKiB0KSwgZDsKICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiBpbnRlcnBvbGF0ZU51bWJlcihhLCBiKSB7CiAgICAgIHJldHVybiBhID0gK2EsIGIgPSArYiwgZnVuY3Rpb24odCkgewogICAgICAgIHJldHVybiBhICogKDEgLSB0KSArIGIgKiB0OwogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIG9iamVjdChhLCBiKSB7CiAgICAgIHZhciBpID0ge30sCiAgICAgICAgICBjID0ge30sCiAgICAgICAgICBrOwoKICAgICAgaWYgKGEgPT09IG51bGwgfHwgdHlwZW9mIGEgIT09ICJvYmplY3QiKSBhID0ge307CiAgICAgIGlmIChiID09PSBudWxsIHx8IHR5cGVvZiBiICE9PSAib2JqZWN0IikgYiA9IHt9OwoKICAgICAgZm9yIChrIGluIGIpIHsKICAgICAgICBpZiAoayBpbiBhKSB7CiAgICAgICAgICBpW2tdID0gaW50ZXJwb2xhdGVWYWx1ZShhW2tdLCBiW2tdKTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgY1trXSA9IGJba107CiAgICAgICAgfQogICAgICB9CgogICAgICByZXR1cm4gZnVuY3Rpb24odCkgewogICAgICAgIGZvciAoayBpbiBpKSBjW2tdID0gaVtrXSh0KTsKICAgICAgICByZXR1cm4gYzsKICAgICAgfTsKICAgIH0KCiAgICB2YXIgcmVBID0gL1stK10/KD86XGQrXC4/XGQqfFwuP1xkKykoPzpbZUVdWy0rXT9cZCspPy9nLAogICAgICAgIHJlQiA9IG5ldyBSZWdFeHAocmVBLnNvdXJjZSwgImciKTsKCiAgICBmdW5jdGlvbiB6ZXJvKGIpIHsKICAgICAgcmV0dXJuIGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiBiOwogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIG9uZShiKSB7CiAgICAgIHJldHVybiBmdW5jdGlvbih0KSB7CiAgICAgICAgcmV0dXJuIGIodCkgKyAiIjsKICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiBpbnRlcnBvbGF0ZVN0cmluZyhhLCBiKSB7CiAgICAgIHZhciBiaSA9IHJlQS5sYXN0SW5kZXggPSByZUIubGFzdEluZGV4ID0gMCwgLy8gc2NhbiBpbmRleCBmb3IgbmV4dCBudW1iZXIgaW4gYgogICAgICAgICAgYW0sIC8vIGN1cnJlbnQgbWF0Y2ggaW4gYQogICAgICAgICAgYm0sIC8vIGN1cnJlbnQgbWF0Y2ggaW4gYgogICAgICAgICAgYnMsIC8vIHN0cmluZyBwcmVjZWRpbmcgY3VycmVudCBudW1iZXIgaW4gYiwgaWYgYW55CiAgICAgICAgICBpID0gLTEsIC8vIGluZGV4IGluIHMKICAgICAgICAgIHMgPSBbXSwgLy8gc3RyaW5nIGNvbnN0YW50cyBhbmQgcGxhY2Vob2xkZXJzCiAgICAgICAgICBxID0gW107IC8vIG51bWJlciBpbnRlcnBvbGF0b3JzCgogICAgICAvLyBDb2VyY2UgaW5wdXRzIHRvIHN0cmluZ3MuCiAgICAgIGEgPSBhICsgIiIsIGIgPSBiICsgIiI7CgogICAgICAvLyBJbnRlcnBvbGF0ZSBwYWlycyBvZiBudW1iZXJzIGluIGEgJiBiLgogICAgICB3aGlsZSAoKGFtID0gcmVBLmV4ZWMoYSkpCiAgICAgICAgICAmJiAoYm0gPSByZUIuZXhlYyhiKSkpIHsKICAgICAgICBpZiAoKGJzID0gYm0uaW5kZXgpID4gYmkpIHsgLy8gYSBzdHJpbmcgcHJlY2VkZXMgdGhlIG5leHQgbnVtYmVyIGluIGIKICAgICAgICAgIGJzID0gYi5zbGljZShiaSwgYnMpOwogICAgICAgICAgaWYgKHNbaV0pIHNbaV0gKz0gYnM7IC8vIGNvYWxlc2NlIHdpdGggcHJldmlvdXMgc3RyaW5nCiAgICAgICAgICBlbHNlIHNbKytpXSA9IGJzOwogICAgICAgIH0KICAgICAgICBpZiAoKGFtID0gYW1bMF0pID09PSAoYm0gPSBibVswXSkpIHsgLy8gbnVtYmVycyBpbiBhICYgYiBtYXRjaAogICAgICAgICAgaWYgKHNbaV0pIHNbaV0gKz0gYm07IC8vIGNvYWxlc2NlIHdpdGggcHJldmlvdXMgc3RyaW5nCiAgICAgICAgICBlbHNlIHNbKytpXSA9IGJtOwogICAgICAgIH0gZWxzZSB7IC8vIGludGVycG9sYXRlIG5vbi1tYXRjaGluZyBudW1iZXJzCiAgICAgICAgICBzWysraV0gPSBudWxsOwogICAgICAgICAgcS5wdXNoKHtpOiBpLCB4OiBpbnRlcnBvbGF0ZU51bWJlcihhbSwgYm0pfSk7CiAgICAgICAgfQogICAgICAgIGJpID0gcmVCLmxhc3RJbmRleDsKICAgICAgfQoKICAgICAgLy8gQWRkIHJlbWFpbnMgb2YgYi4KICAgICAgaWYgKGJpIDwgYi5sZW5ndGgpIHsKICAgICAgICBicyA9IGIuc2xpY2UoYmkpOwogICAgICAgIGlmIChzW2ldKSBzW2ldICs9IGJzOyAvLyBjb2FsZXNjZSB3aXRoIHByZXZpb3VzIHN0cmluZwogICAgICAgIGVsc2Ugc1srK2ldID0gYnM7CiAgICAgIH0KCiAgICAgIC8vIFNwZWNpYWwgb3B0aW1pemF0aW9uIGZvciBvbmx5IGEgc2luZ2xlIG1hdGNoLgogICAgICAvLyBPdGhlcndpc2UsIGludGVycG9sYXRlIGVhY2ggb2YgdGhlIG51bWJlcnMgYW5kIHJlam9pbiB0aGUgc3RyaW5nLgogICAgICByZXR1cm4gcy5sZW5ndGggPCAyID8gKHFbMF0KICAgICAgICAgID8gb25lKHFbMF0ueCkKICAgICAgICAgIDogemVybyhiKSkKICAgICAgICAgIDogKGIgPSBxLmxlbmd0aCwgZnVuY3Rpb24odCkgewogICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwLCBvOyBpIDwgYjsgKytpKSBzWyhvID0gcVtpXSkuaV0gPSBvLngodCk7CiAgICAgICAgICAgICAgcmV0dXJuIHMuam9pbigiIik7CiAgICAgICAgICAgIH0pOwogICAgfQoKICAgIGZ1bmN0aW9uIGludGVycG9sYXRlVmFsdWUoYSwgYikgewogICAgICB2YXIgdCA9IHR5cGVvZiBiLCBjOwogICAgICByZXR1cm4gYiA9PSBudWxsIHx8IHQgPT09ICJib29sZWFuIiA/IGNvbnN0YW50JDMoYikKICAgICAgICAgIDogKHQgPT09ICJudW1iZXIiID8gaW50ZXJwb2xhdGVOdW1iZXIKICAgICAgICAgIDogdCA9PT0gInN0cmluZyIgPyAoKGMgPSBjb2xvcihiKSkgPyAoYiA9IGMsIGludGVycG9sYXRlUmdiKSA6IGludGVycG9sYXRlU3RyaW5nKQogICAgICAgICAgOiBiIGluc3RhbmNlb2YgY29sb3IgPyBpbnRlcnBvbGF0ZVJnYgogICAgICAgICAgOiBiIGluc3RhbmNlb2YgRGF0ZSA/IGRhdGUKICAgICAgICAgIDogaXNOdW1iZXJBcnJheShiKSA/IG51bWJlckFycmF5CiAgICAgICAgICA6IEFycmF5LmlzQXJyYXkoYikgPyBnZW5lcmljQXJyYXkKICAgICAgICAgIDogdHlwZW9mIGIudmFsdWVPZiAhPT0gImZ1bmN0aW9uIiAmJiB0eXBlb2YgYi50b1N0cmluZyAhPT0gImZ1bmN0aW9uIiB8fCBpc05hTihiKSA/IG9iamVjdAogICAgICAgICAgOiBpbnRlcnBvbGF0ZU51bWJlcikoYSwgYik7CiAgICB9CgogICAgZnVuY3Rpb24gZGlzY3JldGUocmFuZ2UpIHsKICAgICAgdmFyIG4gPSByYW5nZS5sZW5ndGg7CiAgICAgIHJldHVybiBmdW5jdGlvbih0KSB7CiAgICAgICAgcmV0dXJuIHJhbmdlW01hdGgubWF4KDAsIE1hdGgubWluKG4gLSAxLCBNYXRoLmZsb29yKHQgKiBuKSkpXTsKICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiBodWUkMShhLCBiKSB7CiAgICAgIHZhciBpID0gaHVlKCthLCArYik7CiAgICAgIHJldHVybiBmdW5jdGlvbih0KSB7CiAgICAgICAgdmFyIHggPSBpKHQpOwogICAgICAgIHJldHVybiB4IC0gMzYwICogTWF0aC5mbG9vcih4IC8gMzYwKTsKICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiBpbnRlcnBvbGF0ZVJvdW5kKGEsIGIpIHsKICAgICAgcmV0dXJuIGEgPSArYSwgYiA9ICtiLCBmdW5jdGlvbih0KSB7CiAgICAgICAgcmV0dXJuIE1hdGgucm91bmQoYSAqICgxIC0gdCkgKyBiICogdCk7CiAgICAgIH07CiAgICB9CgogICAgdmFyIGRlZ3JlZXMgPSAxODAgLyBNYXRoLlBJOwoKICAgIHZhciBpZGVudGl0eSQyID0gewogICAgICB0cmFuc2xhdGVYOiAwLAogICAgICB0cmFuc2xhdGVZOiAwLAogICAgICByb3R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YiArIGRlZ1BhcmVuKTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIHNrZXdYKGEsIGIsIHMsIHEpIHsKICAgICAgICBpZiAoYSAhPT0gYikgewogICAgICAgICAgcS5wdXNoKHtpOiBzLnB1c2gocG9wKHMpICsgInNrZXdYKCIsIG51bGwsIGRlZ1BhcmVuKSAtIDIsIHg6IGludGVycG9sYXRlTnVtYmVyKGEsIGIpfSk7CiAgICAgICAgfSBlbHNlIGlmIChiKSB7CiAgICAgICAgICBzLnB1c2gocG9wKHMpICsgInNrZXdYKCIgKyBiICsgZGVnUGFyZW4pOwogICAgICAgIH0KICAgICAgfQoKICAgICAgZnVuY3Rpb24gc2NhbGUoeGEsIHlhLCB4YiwgeWIsIHMsIHEpIHsKICAgICAgICBpZiAoeGEgIT09IHhiIHx8IHlhICE9PSB5YikgewogICAgICAgICAgdmFyIGkgPSBzLnB1c2gocG9wKHMpICsgInNjYWxlKCIsIG51bGwsICIsIiwgbnVsbCwgIikiKTsKICAgICAgICAgIHEucHVzaCh7aTogaSAtIDQsIHg6IGludGVycG9sYXRlTnVtYmVyKHhhLCB4Yil9LCB7aTogaSAtIDIsIHg6IGludGVycG9sYXRlTnVtYmVyKHlhLCB5Yil9KTsKICAgICAgICB9IGVsc2UgaWYgKHhiICE9PSAxIHx8IHliICE9PSAxKSB7CiAgICAgICAgICBzLnB1c2gocG9wKHMpICsgInNjYWxlKCIgKyB4YiArICIsIiArIHliICsgIikiKTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIHJldHVybiBmdW5jdGlvbihhLCBiKSB7CiAgICAgICAgdmFyIHMgPSBbXSwgLy8gc3RyaW5nIGNvbnN0YW50cyBhbmQgcGxhY2Vob2xkZXJzCiAgICAgICAgICAgIHEgPSBbXTsgLy8gbnVtYmVyIGludGVycG9sYXRvcnMKICAgICAgICBhID0gcGFyc2UoYSksIGIgPSBwYXJzZShiKTsKICAgICAgICB0cmFuc2xhdGUoYS50cmFuc2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ICAgIHJldHVybiAoKHggPSBNYXRoLmV4cCgyICogeCkpIC0gMSkgLyAoeCArIDEpOwogICAgfQoKICAgIC8vIHAwID0gW3V4MCwgdXkwLCB3MF0KICAgIC8vIHAxID0gW3V4MSwgdXkxLCB3MV0KICAgIGZ1bmN0aW9uIGludGVycG9sYXRlWm9vbShwMCwgcDEpIHsKICAgICAgdmFyIHV4MCA9IHAwWzBdLCB1eTAgPSBwMFsxXSwgdzAgPSBwMFsyXSwKICAgICAgICAgIHV4MSA9IHAxWzBdLCB1eTEgPSBwMVsxXSwgdzEgPSBwMVsyXSwKICAgICAgICAgIGR4ID0gdXgxIC0gdXgwLAogICAgICAgICAgZHkgPSB1eTEgLSB1eTAsCiAgICAgICAgICBkMiA9IGR4ICogZHggKyBkeSAqIGR5LAogICAgICAgICAgaSwKICAgICAgICAgIFM7CgogICAgICAvLyBTcGVjaWFsIGNhc2UgZm9yIHUwIOKJhSB1MS4KICAgICAgaWYgKGQyIDwgZXBzaWxvbjIpIHsKICAgICAgICBTID0gTWF0aC5sb2codzEgLyB3MCkgLyByaG87CiAgICAgICAgaSA9IGZ1bmN0aW9uKHQpIHsKICAgICAgICAgIHJldHVybiBbCiAgICAgICAgICAgIHV4MCArIHQgKiBkeCwKICAgICAgICAgICAgdXkwICsgdCAqIGR5LAogICAgICAgICAgICB3MCAqIE1hdGguZXhwKHJobyAqIHQgKiBTKQogICAgICAgICAgXTsKICAgICAgICB9OwogICAgICB9CgogICAgICAvLyBHZW5lcmFsIGNhc2UuCiAgICAgIGVsc2UgewogICAgICAgIHZhciBkMSA9IE1hdGguc3FydChkMiksCiAgICAgICAgICAgIGIwID0gKHcxICogdzEgLSB3MCAqIHcwICsgcmhvNCAqIGQyKSAvICgyICogdzAgKiByaG8yICogZDEpLAogICAgICAgICAgICBiMSA9ICh3MSAqIHcxIC0gdzAgKiB3MCAtIHJobzQgKiBkMikgLyAoMiAqIHcxICogcmhvMiAqIGQxKSwKICAgICAgICAgICAgcjAgPSBNYXRoLmxvZyhNYXRoLnNxcnQoYjAgKiBiMCArIDEpIC0gYjApLAogICAgICAgICAgICByMSA9IE1hdGgubG9nKE1hdGguc3FydChiMSAqIGIxICsgMSkgLSBiMSk7CiAgICAgICAgUyA9IChyMSAtIHIwKSAvIHJobzsKICAgICAgICBpID0gZnVuY3Rpb24odCkgewogICAgICAgICAgdmFyIHMgPSB0ICogUywKICAgICAgICAgICAgICBjb3NocjAgPSBjb3NoKHIwKSwKICAgICAgICAgICAgICB1ID0gdzAgLyAocmhvMiAqIGQxKSAqIChjb3NocjAgKiB0YW5oKHJobyAqIHMgKyByMCkgLSBzaW5oKHIwKSk7CiAgICAgICAgICByZXR1cm4gWwogICAgICAgICAgICB1eDAgKyB1ICogZHgsCiAgICAgICAgICAgIHV5MCArIHUgKiBkeSwKICAgICAgICAgICAgdzAgKiBjb3NocjAgLyBjb3NoKHJobyAqIHMgKyByMCkKICAgICAgICAgIF07CiAgICAgICAgfTsKICAgICAgfQoKICAgICAgaS5kdXJhdGlvbiA9IFMgKiAxMDAwOwoKICAgICAgcmV0dXJuIGk7CiAgICB9CgogICAgZnVuY3Rpb24gaHNsJDEoaHVlKSB7CiAgICAgIHJldHVybiBmdW5jdGlvbihzdGFydCwgZW5kKSB7CiAgICAgICAgdmFyIGggPSBodWUoKHN0YXJ0ID0gaHNsKHN0YXJ0KSkuaCwgKGVuZCA9IGhzbChlbmQpKS5oKSwKICAgICAgICAgICAgcyA9IG5vZ2FtbWEoc3RhcnQucywgZW5kLnMpLAogICAgICAgICAgICBsID0gbm9nYW1tYShzdGFydC5sLCBlbmQubCksCiAgICAgICAgICAgIG9wYWNpdHkgPSBub2dhbW1hKHN0YXJ0Lm9wYWNpdHksIGVuZC5vcGFjaXR5KTsKICAgICAgICByZXR1cm4gZnVuY3Rpb24odCkgewogICAgICAgICAgc3RhcnQuaCA9IGgodCk7CiAgICAgICAgICBzdGFydC5zID0gcyh0KTsKICAgICAgICAgIHN0YXJ0LmwgPSBsKHQpOw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OwogICAgICAgIHJldHVybiBmdW5jdGlvbih0KSB7CiAgICAgICAgICBzdGFydC5oID0gaCh0KTsKICAgICAgICAgIHN0YXJ0LmMgPSBjKHQpOwogICAgICAgICAgc3RhcnQubCA9IGwodCk7CiAgICAgICAgICBzdGFydC5vcGFjaXR5ID0gb3BhY2l0eSh0KTsKICAgICAgICAgIHJldHVybiBzdGFydCArICIiOwogICAgICAgIH07CiAgICAgIH0KICAgIH0KCiAgICB2YXIgaGNsJDIgPSBoY2wkMShodWUpOwogICAgdmFyIGhjbExvbmcgPSBoY2wkMShub2dhbW1hKTsKCiAgICBmdW5jdGlvbiBjdWJlaGVsaXgkMShodWUpIHsKICAgICAgcmV0dXJuIChmdW5jdGlvbiBjdWJlaGVsaXhHYW1tYSh5KSB7CiAgICAgICAgeSA9ICt5OwoKICAgICAgICBmdW5jdGlvbiBjdWJlaGVsaXgkMShzdGFydCwgZW5kKSB7CiAgICAgICAgICB2YXIgaCA9IGh1ZSgoc3RhcnQgPSBjdWJlaGVsaXgoc3RhcnQpKS5oLCAoZW5kID0gY3ViZWhlbGl4KGVuZCkpLmgpLAogICAgICAgICAgICAgIHMgPSBub2dhbW1hKHN0YXJ0LnMsIGVuZC5zKSwKICAgICAgICAgICAgICBsID0gbm9nYW1tYShzdGFydC5sLCBlbmQubCksCiAgICAgICAgICAgICAgb3BhY2l0eSA9IG5vZ2FtbWEoc3RhcnQub3BhY2l0eSwgZW5kLm9wYWNpdHkpOwogICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uKHQpIHsKICAgICAgICAgICAgc3RhcnQuaCA9IGgodCk7CiAgICAgICAgICAgIHN0YXJ0LnMgPSBzKHQpOwogICAgICAgICAgICBzdGFydC5sID0gbChNYXRoLnBvdyh0LCB5KSk7CiAgICAgICAgICAgIHN0YXJ0Lm9wYWNpdHkgPSBvcGFjaXR5KHQpOwogICAgICAgICAgICByZXR1cm4gc3RhcnQgKyAiIjsKICAgICAgICAgIH07CiAgICAgICAgfQoKICAg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ICAgdmFyIHQgPSB0YXNrSGVhZCwgZTsKICAgICAgd2hpbGUgKHQpIHsKICAgICAgICBpZiAoKGUgPSBjbG9ja05vdyAtIHQuX3RpbWUpID49IDApIHQuX2NhbGwuY2FsbChudWxsLCBlKTsKICAgICAgICB0ID0gdC5fbmV4dDsKICAgICAgfQogICAgICAtLWZyYW1lOwogICAgfQoKICAgIGZ1bmN0aW9uIHdha2UoKSB7CiAgICAgIGNsb2NrTm93ID0gKGNsb2NrTGFzdCA9IGNsb2NrLm5vdygpKSArIGNsb2NrU2tldzsKICAgICAgZnJhbWUgPSB0aW1lb3V0ID0gMDsKICAgICAgdHJ5IHsKICAgICAgICB0aW1lckZsdXNoKCk7CiAgICAgIH0gZmluYWxseSB7CiAgICAgICAgZnJhbWUgPSAwOwogICAgICAgIG5hcCgpOwogICAgICAgIGNsb2NrTm93ID0gMDsKICAgICAgfQogICAgfQoKICAgIGZ1bmN0aW9uIHBva2UoKSB7CiAgICAgIHZhciBub3cgPSBjbG9jay5ub3coKSwgZGVsYXkgPSBub3cgLSBjbG9ja0xhc3Q7CiAgICAgIGlmIChkZWxheSA+IHBva2VEZWxheSkgY2xvY2tTa2V3IC09IGRlbGF5LCBjbG9ja0xhc3QgPSBub3c7CiAgICB9CgogICAgZnVuY3Rpb24gbmFwKCkgewogICAgICB2YXIgdDAsIHQxID0gdGFza0hlYWQsIHQyLCB0aW1lID0gSW5maW5pdHk7CiAgICAgIHdoaWxlICh0MSkgewogICAgICAgIGlmICh0MS5fY2FsbCkgewogICAgICAgICAgaWYgKHRpbWUgPiB0MS5fdGltZSkgdGltZSA9IHQxLl90aW1lOwogICAgICAgICAgdDAgPSB0MSwgdDEgPSB0MS5fbmV4dDsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgdDIgPSB0MS5fbmV4dCwgdDEuX25leHQgPSBudWxsOwogICAgICAgICAgdDEgPSB0MCA/IHQwLl9uZXh0ID0gdDIgOiB0YXNrSGVhZCA9IHQyOwogICAgICAgIH0K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iAoaWQgaW4gc2NoZWR1bGVzKSByZXR1cm47CiAgICAgIGNyZWF0ZSQxKG5vZGUsIGlkLCB7CiAgICAgICAgbmFtZTogbmFtZSwKICAgICAgICBpbmRleDogaW5kZXgsIC8vIEZvciBjb250ZXh0IGR1cmluZyBjYWxsYmFjay4KICAgICAgICBncm91cDogZ3JvdXAsIC8vIEZvciBjb250ZXh0IGR1cmluZyBjYWxsYmFjay4KICAgICAgICBvbjogZW1wdHlPbiwKICAgICAgICB0d2VlbjogZW1wdHlUd2VlbiwKICAgICAgICB0aW1lOiB0aW1pbmcudGltZSwKICAgICAgICBkZWxheTogdGltaW5nLmRlbGF5LAogICAgICAgIGR1cmF0aW9uOiB0aW1pbmcuZHVyYXRpb24sCiAgICAgICAgZWFzZTogdGltaW5nLmVhc2UsCiAgICAgICAgdGltZXI6IG51bGwsCiAgICAgICAgc3RhdGU6IENSRUFURUQKICAgICAgfSk7CiAgICB9CgogICAgZnVuY3Rpb24gaW5pdChub2RlLCBpZCkgewogICAgICB2YXIgc2NoZWR1bGUgPSBnZXQkMihub2RlLCBpZCk7CiAgICAgIGlmIChzY2hlZHVsZS5zdGF0ZSA+IENSRUFURUQpIHRocm93IG5ldyBFcnJvcigidG9vIGxhdGU7IGFscmVhZHkgc2NoZWR1bGVkIik7CiAgICAgIHJldHVybiBzY2hlZHVsZTsKICAgIH0KCiAgICBmdW5jdGlvbiBzZXQkMihub2RlLCBpZCkgewogICAgICB2YXIgc2NoZWR1bGUgPSBnZXQkMihub2RlLCBpZCk7CiAgICAgIGlmIChzY2hlZHVsZS5zdGF0ZSA+IFNUQVJURUQpIHRocm93IG5ldyBFcnJvcigidG9vIGxhdGU7IGFscmVhZHkgcnVubmluZyIpOwogICAgICByZXR1cm4gc2NoZWR1bGU7CiAgICB9CgogICAgZnVuY3Rpb24gZ2V0JDIobm9kZSwgaWQpIHsKICAgICAgdmFyIHNjaGVkdWxlID0gbm9kZS5fX3RyYW5zaXRpb247CiAgICAgIGlmICghc2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JlIGluaXRpYWxpemVkLgogICAgICAgIHNlbGYuc3RhdGUgPSBTVEFSVElORzsKICAgICAgICBzZWxmLm9uLmNhbGwoInN0YXJ0Iiwgbm9kZSwgbm9kZS5fX2RhdGFfXywgc2VsZi5pbmRleCwgc2VsZi5ncm91cCk7CiAgICAgICAgaWYgKHNlbGYuc3RhdGUgIT09IFNUQVJUSU5HKSByZXR1cm47IC8vIGludGVycnVwdGVkCiAgICAgICAgc2VsZi5zdGF0ZSA9IFNUQVJURUQ7CgogICAgICAgIC8vIEluaXRpYWxpemUgdGhlIHR3ZWVuLCBkZWxldGluZyBudWxsIHR3ZWVuLgogICAgICAgIHR3ZWVuID0gbmV3IEFycmF5KG4gPSBzZWxmLnR3ZWVuLmxlbmd0aCk7CiAgICAgICAgZm9yIChpID0gMCwgaiA9IC0xOyBpIDwgbjsgKytpKSB7CiAgICAgICAgICBpZiAobyA9IHNlbGYudHdlZW5baV0udmFsdWUuY2FsbChub2RlLCBub2RlLl9fZGF0YV9fLCBzZWxmLmluZGV4LCBzZWxmLmdyb3VwKSkgewogICAgICAgICAgICB0d2VlblsrK2pdID0gbzsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgdHdlZW4ubGVuZ3RoID0gaiArIDE7CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIHRpY2soZWxhcHNlZCkgewogICAgICAgIHZhciB0ID0gZWxhcHNlZCA8IHNlbGYuZHVyYXRpb24gPyBzZWxmLmVhc2UuY2FsbChudWxsLCBlbGFwc2VkIC8gc2VsZi5kdXJhdGlvbikgOiAoc2VsZi50aW1lci5yZXN0YXJ0KHN0b3ApLCBzZWxmLnN0YXRlID0gRU5ESU5HLCAxKSwKICAgICAgICAgICAgaSA9IC0xLAogICAgICAgICAgICBuID0gdHdlZW4ubGVuZ3RoOwoKICAgICAgICB3aGlsZSAoKytpIDwgbikgewogICAgICAgICAgdHdlZW5baV0uY2FsbChub2RlLCB0KTsKICAgICAgICB9CgogICAgICAgIC8vIER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AgICAgICAgICAgICAgdHdlZW4xW2ldID0gdDsKICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgICAgaWYgKGkgPT09IG4pIHR3ZWVuMS5wdXNoKHQpOwogICAgICAgIH0KCiAgICAgICAgc2NoZWR1bGUudHdlZW4gPSB0d2VlbjE7CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gdHJhbnNpdGlvbl90d2VlbihuYW1lLCB2YWx1ZSkgewogICAgICB2YXIgaWQgPSB0aGlzLl9pZDsKCiAgICAgIG5hbWUgKz0gIiI7CgogICAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA8IDIpIHsKICAgICAgICB2YXIgdHdlZW4gPSBnZXQkMih0aGlzLm5vZGUoKSwgaWQpLnR3ZWVuOwogICAgICAgIGZvciAodmFyIGkgPSAwLCBuID0gdHdlZW4ubGVuZ3RoLCB0OyBpIDwgbjsgKytpKSB7CiAgICAgICAgICBpZiAoKHQgPSB0d2VlbltpXSkubmFtZSA9PT0gbmFtZSkgewogICAgICAgICAgICByZXR1cm4gdC52YWx1ZTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgIH0KCiAgICAgIHJldHVybiB0aGlzLmVhY2goKHZhbHVlID09IG51bGwgPyB0d2VlblJlbW92ZSA6IHR3ZWVuRnVuY3Rpb24pKGlkLCBuYW1lLCB2YWx1ZSkpOwogICAgfQoKICAgIGZ1bmN0aW9uIHR3ZWVuVmFsdWUodHJhbnNpdGlvbiwgbmFtZSwgdmFsdWUpIHsKICAgICAgdmFyIGlkID0gdHJhbnNpdGlvbi5faWQ7CgogICAgICB0cmFuc2l0aW9uLmVhY2goZnVuY3Rpb24oKSB7CiAgICAgICAgdmFyIHNjaGVkdWxlID0gc2V0JDIodGhpcywgaWQpOwogICAgICAgIChzY2hlZHVsZS52YWx1ZSB8fCAoc2NoZWR1bGUudmFsdWUgPSB7fSkpW25hbWVdID0gd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IHNpdCh0aGlzLCBpZCksCiAgICAgICAgICAgIG9uID0gc2NoZWR1bGUub247CgogICAgICAgIC8vIElmIHRoaXMgbm9kZSBzaGFyZWQgYSBkaXNwYXRjaCB3aXRoIHRoZSBwcmV2aW91cyBub2RlLAogICAgICAgIC8vIGp1c3QgYXNzaWduIHRoZSB1cGRhdGVkIHNoYXJlZCBkaXNwYXRjaCBhbmQgd2XigJlyZSBkb25lIQogICAgICAgIC8vIE90aGVyd2lzZSwgY29weS1vbi13cml0ZS4KICAgICAgICBpZiAob24gIT09IG9uMCkgKG9uMSA9IChvbjAgPSBvbikuY29weSgpKS5vbihuYW1lLCBsaXN0ZW5lcik7CgogICAgICAgIHNjaGVkdWxlLm9uID0gb24xOwogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIHRyYW5zaXRpb25fb24obmFtZSwgbGlzdGVuZXIpIHsKICAgICAgdmFyIGlkID0gdGhpcy5faWQ7CgogICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA8IDIKICAgICAgICAgID8gZ2V0JDIodGhpcy5ub2RlKCksIGlkKS5vbi5vbihuYW1lKQogICAgICAgICAgOiB0aGlzLmVhY2gob25GdW5jdGlvbihpZCwgbmFtZSwgbGlzdGVuZXIpKTsKICAgIH0KCiAgICBmdW5jdGlvbiByZW1vdmVGdW5jdGlvbihpZCkgewogICAgICByZXR1cm4gZnVuY3Rpb24oKSB7CiAgICAgICAgdmFyIHBhcmVudCA9IHRoaXMucGFyZW50Tm9kZTsKICAgICAgICBmb3IgKHZhciBpIGluIHRoaXMuX190cmFuc2l0aW9uKSBpZiAoK2kgIT09IGlkKSByZXR1cm47CiAgICAgICAgaWYgKHBhcmVudCkgcGFyZW50LnJlbW92ZUNoaWxkKHRoaXMpOwogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIHRyYW5zaXRpb25fcmVtb3ZlKCkgewogICAgICByZXR1cm4gdGhpcy5vbigiZW5kLnJlbW92ZSIsIHJlbW92ZUZ1b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UFVSRV9fKi9PYmplY3QuZnJlZXplKHsKICAgICAgICBfX3Byb3RvX186IG51bGwsCiAgICAgICAgZWFzZUxpbmVhcjogbGluZWFyJDEsCiAgICAgICAgZWFzZVF1YWQ6IHF1YWRJbk91dCwKICAgICAgICBlYXNlUXVhZEluOiBxdWFkSW4sCiAgICAgICAgZWFzZVF1YWRPdXQ6IHF1YWRPdXQsCiAgICAgICAgZWFzZVF1YWRJbk91dDogcXVhZEluT3V0LAogICAgICAgIGVhc2VDdWJpYzogY3ViaWNJbk91dCwKICAgICAgICBlYXNlQ3ViaWNJbjogY3ViaWNJbiwKICAgICAgICBlYXNlQ3ViaWNPdXQ6IGN1YmljT3V0LAogICAgICAgIGVhc2VDdWJpY0luT3V0OiBjdWJpY0luT3V0LAogICAgICAgIGVhc2VQb2x5OiBwb2x5SW5PdXQsCiAgICAgICAgZWFzZVBvbHlJbjogcG9seUluLAogICAgICAgIGVhc2VQb2x5T3V0OiBwb2x5T3V0LAogICAgICAgIGVhc2VQb2x5SW5PdXQ6IHBvbHlJbk91dCwKICAgICAgICBlYXNlU2luOiBzaW5Jbk91dCwKICAgICAgICBlYXNlU2luSW46IHNpbkluLAogICAgICAgIGVhc2VTaW5PdXQ6IHNpbk91dCwKICAgICAgICBlYXNlU2luSW5PdXQ6IHNpbkluT3V0LAogICAgICAgIGVhc2VFeHA6IGV4cEluT3V0LAogICAgICAgIGVhc2VFeHBJbjogZXhwSW4sCiAgICAgICAgZWFzZUV4cE91dDogZXhwT3V0LAogICAgICAgIGVhc2VFeHBJbk91dDogZXhwSW5PdXQsCiAgICAgICAgZWFzZUNpcmNsZTogY2lyY2xlSW5PdXQsCiAgICAgICAgZWFzZUNpcmNsZUluOiBjaXJjbGVJbiwKICAgICAgICBlYXNlQ2lyY2xlT3V0OiBjaXJjbGVPdXQsCiAgICAgICAgZWFzZUNpcmNsZUluT3V0OiBjaXJjbGVJbk91dCwKICAgICAgICBlYXNlQm91bmNlOiBib3VuY2VPdXQsCiAgICAgICAgZWFzZUJvdW5jZUluOiBib3VuY2VJbiwKICAgICAgICBlYXNlQm91bmNlT3V0OiBib3VuY2VPdXQsCiAgICAgICAgZWFzZUJvdW5jZUluT3V0OiBib3VuY2VJbk91dCwKICAgICAgICBlYXNlQmFjazogYmFja0luT3V0LAogICAgICAgIGVhc2VCYWNrSW46IGJhY2tJbiwKICAgICAgICBlYXNlQmFja091dDogYmFja091dCwKICAgICAgICBlYXNlQmFja0luT3V0OiBiYWNrSW5PdXQsCiAgICAgICAgZWFzZUVsYXN0aWM6IGVsYXN0aWNPdXQsCiAgICAgICAgZWFzZUVsYXN0aWNJbjogZWxhc3RpY0luLAogICAgICAgIGVhc2VFbGFzdGljT3V0OiBlbGFzdGljT3V0LAogICAgICAgIGVhc2VFbGFzdGljSW5PdXQ6IGVsYXN0aWNJbk91dAogICAgfSk7CgogICAgdmFyIGRlZmF1bHRUaW1pbmcgPSB7CiAgICAgIHRpbWU6IG51bGwsIC8vIFNldCBvbiB1c2UuCiAgICAgIGRlbGF5OiAwLAogICAgICBkdXJhdGlvbjogMjUwLAogICAgICBlYXNlOiBjdWJpY0luT3V0CiAgICB9OwoKICAgIGZ1bmN0aW9uIGluaGVyaXQobm9kZSwgaWQpIHsKICAgICAgdmFyIHRpbWluZzsKICAgICAgd2hpbGUgKCEodGltaW5nID0gbm9kZS5fX3RyYW5zaXRpb24pIHx8ICEodGltaW5nID0gdGltaW5nW2lkXSkpIHsKICAgICAgICBpZiAoIShub2RlID0gbm9kZS5wYXJlbnROb2RlKSkgewogICAgICAgICAgcmV0dXJuIGRlZmF1bHRUaW1pbmcudGltZSA9IG5vdygpLCBkZWZhdWx0VGltaW5nOwogICAgICAgIH0KICAgICAgfQogICAgICByZXR1cm4gdGltaW5nOwogICAgfQoKICAgIGZ1bmN0aW9uIHNlbGVjdGlvbl90cmFuc2l0aW9uKG5hbWUpIHsKICAgICAgdmFyIGlkLAogICAgICAgICAgdGltaW5nOwoKICAgICAgaWYgKG5hbWUga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InciLCAiZSIsICJzIiwgIm53IiwgIm5lIiwgInN3IiwgInNlIl0ubWFwKHR5cGUpLAogICAgICBpbnB1dDogZnVuY3Rpb24oeHkpIHsgcmV0dXJuIHh5ID09IG51bGwgPyBudWxsIDogbnVtYmVyMih4eSk7IH0sCiAgICAgIG91dHB1dDogZnVuY3Rpb24oeHkpIHsgcmV0dXJuIHh5OyB9CiAgICB9OwoKICAgIHZhciBjdXJzb3JzID0gewogICAgICBvdmVybGF5OiAiY3Jvc3NoYWlyIiwKICAgICAgc2VsZWN0aW9uOiAibW92ZSIsCiAgICAgIG46ICJucy1yZXNpemUiLAogICAgICBlOiAiZXctcmVzaXplIiwKICAgICAgczogIm5zLXJlc2l6ZSIsCiAgICAgIHc6ICJldy1yZXNpemUiLAogICAgICBudzogIm53c2UtcmVzaXplIiwKICAgICAgbmU6ICJuZXN3LXJlc2l6ZSIsCiAgICAgIHNlOiAibndzZS1yZXNpemUiLAogICAgICBzdzogIm5lc3ctcmVzaXplIgogICAgfTsKCiAgICB2YXIgZmxpcFggPSB7CiAgICAgIGU6ICJ3IiwKICAgICAgdzogImUiLAogICAgICBudzogIm5lIiwKICAgICAgbmU6ICJudyIsCiAgICAgIHNlOiAic3ciLAogICAgICBzdzogInNlIgogICAgfTsKCiAgICB2YXIgZmxpcFkgPSB7CiAgICAgIG46ICJzIiwKICAgICAgczogIm4iLAogICAgICBudzogInN3IiwKICAgICAgbmU6ICJzZSIsCiAgICAgIHNlOiAibmUiLAogICAgICBzdzogIm53IgogICAgfTsKCiAgICB2YXIgc2lnbnNYID0gewogICAgICBvdmVybGF5OiArMSwKICAgICAgc2VsZWN0aW9uOiArMSwKICAgICAgbjogbnVsbCwKICAgICAgZTogKzEsCiAgICAgIHM6IG51bGwsCiAgICAgIHc6IC0xLAogICAgICBudzogLTEsCiAgICAgIG5lOiArMSwKICAgICAgc2U6ICsxLAogICAgICBzdzogLTEKICAgIH07CgogICAgdmFyIHNpZ25zWSA9IHsKICAgICAgb3Zl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IDYsCiAgICAgICAgICB0b3VjaGVuZGluZzsKCiAgICAgIGZ1bmN0aW9uIGJydXNoKGdyb3VwKSB7CiAgICAgICAgdmFyIG92ZXJsYXkgPSBncm91cAogICAgICAgICAgICAucHJvcGVydHkoIl9fYnJ1c2giLCBpbml0aWFsaXplKQogICAgICAgICAgLnNlbGVjdEFsbCgiLm92ZXJsYXkiKQogICAgICAgICAgLmRhdGEoW3R5cGUoIm92ZXJsYXkiKV0pOwoKICAgICAgICBvdmVybGF5LmVudGVyKCkuYXBwZW5kKCJyZWN0IikKICAgICAgICAgICAgLmF0dHIoImNsYXNzIiwgIm92ZXJsYXkiKQogICAgICAgICAgICAuYXR0cigicG9pbnRlci1ldmVudHMiLCAiYWxsIikKICAgICAgICAgICAgLmF0dHIoImN1cnNvciIsIGN1cnNvcnMub3ZlcmxheSkKICAgICAgICAgIC5tZXJnZShvdmVybGF5KQogICAgICAgICAgICAuZWFjaChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICB2YXIgZXh0ZW50ID0gbG9jYWwkMSh0aGlzKS5leHRlbnQ7CiAgICAgICAgICAgICAgc2VsZWN0KHRoaXMpCiAgICAgICAgICAgICAgICAgIC5hdHRyKCJ4IiwgZXh0ZW50WzBdWzBdKQogICAgICAgICAgICAgICAgICAuYXR0cigieSIsIGV4dGVudFswXVsxXSkKICAgICAgICAgICAgICAgICAgLmF0dHIoIndpZHRoIiwgZXh0ZW50WzFdWzBdIC0gZXh0ZW50WzBdWzBdKQogICAgICAgICAgICAgICAgICAuYXR0cigiaGVpZ2h0IiwgZXh0ZW50WzFdWzFdIC0gZXh0ZW50WzBdWzFdKTsKICAgICAgICAgICAgfSk7CgogICAgICAgIGdyb3VwLnNlbGVjdEFsbCgiLnNlbGVjdGlvbiIpCiAgICAgICAgICAuZGF0YShbdHlwZSgic2VsZWN0aW9uIildKQogICAgICAgICAgLmVudGVyKCkuYXBwZW5kKCJyZWN0IikKICAgICAgICAgICAgLmF0dHIoImNsYXNzIiwgIn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KQogICAgICAgICAgICAub24oInRvdWNoZW5kLmJydXNoIHRvdWNoY2FuY2VsLmJydXNoIiwgdG91Y2hlbmRlZCkKICAgICAgICAgICAgLnN0eWxlKCJ0b3VjaC1hY3Rpb24iLCAibm9uZSIpCiAgICAgICAgICAgIC5zdHlsZSgiLXdlYmtpdC10YXAtaGlnaGxpZ2h0LWNvbG9yIiwgInJnYmEoMCwwLDAsMCkiKTsKICAgICAgfQoKICAgICAgYnJ1c2gubW92ZSA9IGZ1bmN0aW9uKGdyb3VwLCBzZWxlY3Rpb24pIHsKICAgICAgICBpZiAoZ3JvdXAuc2VsZWN0aW9uKSB7CiAgICAgICAgICBncm91cAogICAgICAgICAgICAgIC5vbigic3RhcnQuYnJ1c2giLCBmdW5jdGlvbigpIHsgZW1pdHRlcih0aGlzLCBhcmd1bWVudHMpLmJlZm9yZXN0YXJ0KCkuc3RhcnQoKTsgfSkKICAgICAgICAgICAgICAub24oImludGVycnVwdC5icnVzaCBlbmQuYnJ1c2giLCBmdW5jdGlvbigpIHsgZW1pdHRlcih0aGlzLCBhcmd1bWVudHMpLmVuZCgpOyB9KQogICAgICAgICAgICAgIC50d2VlbigiYnJ1c2giLCBmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgIHZhciB0aGF0ID0gdGhpcywKICAgICAgICAgICAgICAgICAgICBzdGF0ZSA9IHRoYXQuX19icnVzaCwKICAgICAgICAgICAgICAgICAgICBlbWl0ID0gZW1pdHRlcih0aGF0LCBhcmd1bWVudHMpLAogICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbjAgPSBzdGF0ZS5zZWxlY3Rpb24sCiAgICAgICAgICAgICAgICAgICAgc2VsZWN0aW9uMSA9IGRpbS5pbnB1dCh0eXBlb2Ygc2VsZWN0aW9uID09PSAiZnVuY3Rpb24iID8gc2VsZWN0aW9uLmFwcGx5KHRoaXMsIGFyZ3VtZW50cykgOiBzZWxlY3Rpb24sIHN0YXRlLmV4dGVudCksCiAgICAgICAgICAgICAgICAgICAgaSA9IGludGVycG9sYXRlVmFsdWUoc2VsZWN0aW9uMCwgc2VsZWN0aW9uMSk7CgogICAgICAgICAgICAgICAgZnVuY3Rpb24gdHdlZW4odCkgewogICAgICAgICAgICAgICAgICBzdGF0ZS5zZWxlY3Rpb24gPSB0ID09PSAxICYmIHNlbGVjdGlvbjEgPT09IG51bGwgPyBudWxsIDogaSh0KTsKICAgICAgICAgICAgICAgICAgcmVkcmF3LmNhbGwodGhhdCk7CiAgICAgICAgICAgICAgICAgIGVtaXQuYnJ1c2goKTsKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICByZXR1cm4gc2VsZWN0aW9uMCAhPT0gbnVsbCAmJiBzZWxlY3Rpb24xICE9PSBudWxsID8gdHdlZW4gOiB0d2VlbigxKTsKICAgICAgICAgICAgICB9KTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgZ3JvdXAKICAgICAgICAgICAgICAuZWFjaChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgIHZhciB0aGF0ID0gdGhpcywKICAgICAgICAgICAgICAgICAgICBhcmdzID0gYXJndW1lbnRzLAogICAgICAgICAgICAgICAgICAgIHN0YXRlID0gdGhhdC5fX2JydXNoLAogICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbjEgPSBkaW0uaW5wdXQodHlwZW9mIHNlbGVjdGlvbiA9PT0gImZ1bmN0aW9uIiA/IHNlbGVjdGlvbi5hcHBseSh0aGF0LCBhcmdzKSA6IHNlbGVjdGlvbiwgc3RhdGUuZXh0ZW50KSwKICAgICAgICAgICAgICAgICAgICBlbWl0ID0gZW1pdHRlcih0aGF0LCBhcmdzKS5iZWZvcmVzdGFydCgpOwoKICAgICAgICAgICAgICAgIGludGVycnVwdCh0aGF0KTsKICAgICAgICAgICAgICAgIHN0YXRlLnNlbGVjdGlvbiA9IHNlbGVjdGlvbjEgPT09IG51bGwgPyBudWxsIDogc2VsZWN0aW9uMTsKICAgICAgICAgICAgICAgIHJlZHJhdy5jYWxsKHRoYXQpOwogICAgICAgICAgICAgICAgZW1pdC5zdGFydCgpLmJydXNoKCkuZW5kKCk7CiAgICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICB9OwoKICAgICAgYnJ1c2guY2xlYXIgPSBmdW5jdGlvbihncm91cCkgewogICAgICAgIGJydXNoLm1vdmUoZ3JvdXAsIG51bGwpOwogICAgICB9OwoKICAgICAgZnVuY3Rpb24gcmVkcmF3KCkgewogICAgICAgIHZhciBncm91cCA9IHNlbGVjdCh0aGlzKSwKICAgICAgICAgICAgc2VsZWN0aW9uID0gbG9jYWwkMSh0aGlzKS5zZWxlY3Rpb247CgogICAgICAgIGlmIChzZWxlY3Rpb24pIHsKICAgICAgICAgIGdyb3VwLnNlbGVjdEFsbCgiLnNlbGVjdGlvbiIpCiAgICAgICAgICAgICAgLnN0eWxlKCJkaXNwbGF5IiwgbnVsbCkKICAgICAgICAgICAgICAuYXR0cigieCIsIHNlbGVjdGlvblswXVswXSkKICAgICAgICAgICAgICAuYXR0cigieSIsIHNlbGVjdGlvblswXVsxXSkKICAgICAgICAgICAgICAuYXR0cigid2lkdGgiLCBzZWxlY3Rpb25bMV1bMF0gLSBzZWxlY3Rpb25bMF1bMF0pCiAgICAgICAgICAgICAgLmF0dHIoImhlaWdodCIsIHNlbGVjdGlvblsxXVsxXSAtIHNlbGVjdGlvblswXVsxXSk7CgogICAgICAgICAgZ3JvdXAuc2VsZWN0QWxsKCIuaGFuZGxlIikKICAgICAgICAgICAgICAuc3R5bGUoImRpc3BsYXkiLCBudWxsKQogICAgICAgICAgICAgIC5hdHRyKCJ4IiwgZnVuY3Rpb24oZCkgeyByZXR1cm4gZC50eXBlW2QudHlwZS5sZW5ndGggLSAxXSA9PT0gImUiID8gc2VsZWN0aW9uWzFdWzBdIC0gaGFuZGxlU2l6ZSAvIDIgOiBzZWxlY3Rpb25bMF1bMF0gLSBoYW5kbGVTaXplIC8gMjsgfSkKICAgICAgICAgICAgICAuYXR0cigieSIsIGZ1bmN0aW9uKGQpIHsgcmV0dXJuIGQudHlwZVswXSA9PT0gInMiID8gc2VsZWN0aW9uWzFdWzFdIC0gaGFuZGxlU2l6ZSAvIDIgOiBzZWxlY3Rpb25bMF1bMV0gLSBoYW5kbGVTaXplIC8gMjsgfSkKICAgICAgICAgICAgICAuYXR0cigid2lkdGgiLCBmdW5jdGlvbihkKSB7IHJldHVybiBkLnR5cGUgPT09ICJuIiB8fCBkLnR5cGUgPT09ICJzIiA/IHNlbGVjdGlvblsxXVswXSAtIHNlbGVjdGlvblswXVswXSArIGhhbmRsZVNpemUgOiBoYW5kbGVTaXplOyB9KQogICAgICAgICAgICAgIC5hdHRyKCJoZWlnaHQiLCBmdW5jdGlvbihkKSB7IHJldHVybiBkLnR5cGUgPT09ICJlIiB8fCBkLnR5cGUgPT09ICJ3IiA/IHNlbGVjdGlvblsxXVsxXSAtIHNlbGVjdGlvblswXVsxXSArIGhhbmRsZVNpemUgOiBoYW5kbGVTaXplOyB9KTsKICAgICAgICB9CgogICAgICAgIGVsc2UgewogICAgICAgICAgZ3JvdXAuc2VsZWN0QWxsKCIuc2VsZWN0aW9uLC5oYW5kbGUiKQogICAgICAgICAgICAgIC5zdHlsZSgiZGlzcGxheSIsICJub25lIikKICAgICAgICAgICAgICAuYXR0cigieCIsIG51bGwpCiAgICAgICAgICAgICAgLmF0dHIoInkiLCBudWxsKQogICAgICAgICAgICAgIC5hdHRyKCJ3aWR0aCIsIG51bGwpCiAgICAgICAgICAgICAgLmF0dHIoImhlaWdodCIsIG51bGwpOwogICAgICAgIH0KICAgICAgfQoKICAgICAgZnVuY3Rpb24gZW1pdHRlcih0aGF0LCBhcmdzLCBjbGVhbikgewogICAgICAgIHJldHVybiAoIWNsZWFuICYmIHRoYXQuX19icnVzaC5lbWl0dGVyKSB8fCBuZXcgRW1pdHRlcih0aGF0LCBhcmdzKTsKICAgICAgfQoKICAgICAgZnVuY3Rpb24gRW1pdHRlcih0aGF0LCBhcmdzKSB7CiAgICAgIC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sIFt0eXBlLCB0aGlzLnRoYXQsIHRoaXMuYXJnc10pOwogICAgICAgIH0KICAgICAgfTsKCiAgICAgIGZ1bmN0aW9uIHN0YXJ0ZWQoKSB7CiAgICAgICAgaWYgKHRvdWNoZW5kaW5nICYmICFldmVudC50b3VjaGVzKSByZXR1cm47CiAgICAgICAgaWYgKCFmaWx0ZXIuYXBwbHkodGhpcywgYXJndW1lbnRzKSkgcmV0dXJuOwoKICAgICAgICB2YXIgdGhhdCA9IHRoaXMsCiAgICAgICAgICAgIHR5cGUgPSBldmVudC50YXJnZXQuX19kYXRhX18udHlwZSwKICAgICAgICAgICAgbW9kZSA9IChrZXlzICYmIGV2ZW50Lm1ldGFLZXkgPyB0eXBlID0gIm92ZXJsYXkiIDogdHlwZSkgPT09ICJzZWxlY3Rpb24iID8gTU9ERV9EUkFHIDogKGtleXMgJiYgZXZlbnQuYWx0S2V5ID8gTU9ERV9DRU5URVIgOiBNT0RFX0hBTkRMRSksCiAgICAgICAgICAgIHNpZ25YID0gZGltID09PSBZID8gbnVsbCA6IHNpZ25zWFt0eXBlXSwKICAgICAgICAgICAgc2lnblkgPSBkaW0gPT09IFggPyBudWxsIDogc2lnbnNZW3R5cGVdLAogICAgICAgICAgICBzdGF0ZSA9IGxvY2FsJDEodGhhdCksCiAgICAgICAgICAgIGV4dGVudCA9IHN0YXRlLmV4dGVudCwKICAgICAgICAgICAgc2VsZWN0aW9uID0gc3RhdGUuc2VsZWN0aW9uLAogICAgICAgICAgICBXID0gZXh0ZW50WzBdWzBdLCB3MCwgdzEsCiAgICAgICAgICAgIE4gPSBleHRlbnRbMF1bMV0sIG4wLCBuMSwKICAgICAgICAgICAgRSA9IGV4dGVudFsxXVswXSwgZTAsIGUxLAogICAgICAgICAgICBTID0gZXh0ZW50WzFdWzFdLCBzMCwgczEsCiAgICAgICAgICAgIGR4ID0gMCwKICAgICAgICAgICAgZHkgPSAwLAogICAgICAgICAgICBtb3ZpbmcsCiAgICAgICAgICAgIHNoaWZ0aW5nID0gc2lnblggJiYgc2lnblkgJiYga2V5cyAmJiBldmVudC5zaGlmdEtleSwKICAgICAgICAgICAgbG9ja1gsCiAgICAgICAgICAgIGxvY2tZLAogICAgICAgICAgICBwb2ludGVyID0gZXZlbnQudG91Y2hlcyA/IHRvdWNoZXIoZXZlbnQuY2hhbmdlZFRvdWNoZXNbMF0uaWRlbnRpZmllcikgOiBtb3VzZSwKICAgICAgICAgICAgcG9pbnQwID0gcG9pbnRlcih0aGF0KSwKICAgICAgICAgICAgcG9pbnQgPSBwb2ludDAsCiAgICAgICAgICAgIGVtaXQgPSBlbWl0dGVyKHRoYXQsIGFyZ3VtZW50cywgdHJ1ZSkuYmVmb3Jlc3RhcnQoKTsKCiAgICAgICAgaWYgKHR5cGUgPT09ICJvdmVybGF5IikgewogICAgICAgICAgaWYgKHNlbGVjdGlvbikgbW92aW5nID0gdHJ1ZTsKICAgICAgICAgIHN0YXRlLnNlbGVjdGlvbiA9IHNlbGVjdGlvbiA9IFsKICAgICAgICAgICAgW3cwID0gZGltID09PSBZID8gVyA6IHBvaW50MFswXSwgbjAgPSBkaW0gPT09IFggPyBOIDogcG9pbnQwWzFdXSwKICAgICAgICAgICAgW2UwID0gZGltID09PSBZID8gRSA6IHcwLCBzMCA9IGRpbSA9PT0gWCA/IFMgOiBuMF0KICAgICAgICAgIF07CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgIHcwID0gc2VsZWN0aW9uWzBdWzBdOwogICAgICAgICAgbjAgPSBzZWxlY3Rpb25bMF1bMV07CiAgICAgICAgICBlMCA9IHNlbGVjdGlvblsxXVswXTsKICAgICAgICAgIHMwID0gc2VsZWN0aW9uWzFdWzFdOwogICAgICAgIH0KCiAgICAgICAgdzEgPSB3MDsKICAgICAgICBuMSA9IG4wOwogICAgICAgIGUxID0gZTA7CiAgICAgICAgczEgPSBzMDsKCiAgICAgICAgdmFyIGdyb3VwID0gc2VsZWN0KHRoYXQpCiAgICAgICAgICAgIC5hdHRyKCJwb2ludGVyLWV2ZW50cyIsICJub25lIik7CgogICAgICAgIHZhciBvdmVybGF5ID0gZ3JvdXAuc2VsZWN0QWxsKCIub3ZlcmxheSIpCiAgICAgICAgICAgIC5hdHRyKCJjdXJzb3IiLCBjdXJzb3JzW3R5cGVdKTsKCiAgICAgICAgaWYgKGV2ZW50LnRvdWNoZXMpIHsKICAgICAgICAgIGVtaXQubW92ZWQgPSBtb3ZlZDsKICAgICAgICAgIGVtaXQuZW5kZWQgPSBlbmRlZDsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgdmFyIHZpZXcgPSBzZWxlY3QoZXZlbnQudmlldykKICAgICAgICAgICAgICAub24oIm1vdXNlbW92ZS5icnVzaCIsIG1vdmVkLCB0cnVlKQogICAgICAgICAgICAgIC5vbigibW91c2V1cC5icnVzaCIsIGVuZGVkLCB0cnVlKTsKICAgICAgICAgIGlmIChrZXlzKSB2aWV3CiAgICAgICAgICAgICAgLm9uKCJrZXlkb3duLmJydXNoIiwga2V5ZG93bmVkLCB0cnVlKQogICAgICAgICAgICAgIC5vbigia2V5dXAuYnJ1c2giLCBrZXl1cHBlZCwgdHJ1ZSk7CgogICAgICAgICAgZHJhZ0Rpc2FibGUoZXZlbnQudmlldyk7CiAgICAgICAgfQoKICAgICAgICBub3Byb3BhZ2F0aW9uJDEoKTsKICAgICAgICBpbnRlcnJ1cHQodGhhdCk7CiAgICAgICAgcmVkcmF3LmNhbGwodGhhdCk7CiAgICAgICAgZW1pdC5zdGFydCgpOwoKICAgICAgICBmdW5jdGlvbiBtb3ZlZCgpIHsKICAgICAgICAgIHZhciBwb2ludDEgPSBwb2ludGVyKHRoYXQpOwogICAgICAgICAgaWYgKHNoaWZ0aW5nICYmICFsb2NrWCAmJiAhbG9ja1kpIHsKICAgICAgICAgICAgaWYgKE1hdGguYWJzKHBvaW50MVswXSAtIHBvaW50WzBdKSA+IE1hdGguYWJzKHBvaW50MVsxXSAtIHBvaW50WzFdKSkgbG9ja1kgPSB0cnVlOwogICAgICAgICAgICBlbHNlIGxvY2tYID0gdHJ1ZTsKICAgICAgICAgIH0KICAgICAgICAgIHBvaW50ID0gcG9pbnQxOwogICAgICAgICAgbW92aW5nID0gdHJ1ZTsKICAgICAgICAgIG5vZXZlbnQkMSgpOwogICAgICAgICAgbW92ZSgpOwogICAgICAgIH0KCiAgICAgICAgZnVuY3Rpb24gbW92ZSgpIHsKICAgICAgICAgIHZhciB0OwoKICAgICAgICAgIGR4ID0gcG9pbnRbMF0gLSBwb2ludDBbMF07CiAgICAgICAgICBkeSA9IHBvaW50WzFdIC0gcG9pbnQwWzFdOwoKICAgICAgICAgIHN3aXRjaCAobW9kZSkgewogICAgICAgICAgICBjYXNlIE1PREVfU1BBQ0U6CiAgICAgICAgICAgIGNhc2UgTU9ERV9EUkFHOiB7CiAgICAgICAgICAgICAgaWYgKHNpZ25YKSBkeCA9IE1hdGgubWF4KFcgLSB3MCwgTWF0aC5taW4oRSAtIGUwLCBkeCkpLCB3MSA9IHcwICsgZHgsIGUxID0gZTAgKyBkeDsKICAgICAgICAgICAgICBpZiAoc2lnblkpIGR5ID0gTWF0aC5tYXgoTiAtIG4wLCBNYXRoLm1pbihTIC0gczAsIGR5KSksIG4xID0gbjAgKyBkeSwgczEgPSBzMCArIGR5OwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNhc2UgTU9ERV9IQU5ETEU6IHsKICAgICAgICAgICAgICBpZiAoc2lnblggPCAwKSBkeCA9IE1hdGgubWF4KFcgLSB3MCwgTWF0aC5taW4oRSAtIHcwLCBkeCkpLCB3MSA9IHcwICsgZHgsIGUxID0gZTA7CiAgICAgICAgICAgICAgZWxzZSBpZiAoc2lnblggPiAwKSBkeCA9IE1hdGgubWF4KFcgLSBlMCwgTWF0aC5taW4oRSAtIGUwLCBkeCkpLCB3MSA9IHcwLCBlMSA9IGUwICsgZHg7CiAgICAgICAgICAgICAgaWYgKHNpZ25ZIDwgMCkgZHkgPSBNYXRoLm1heChOIC0gbjAsIE1hdGgubWluKFMgLSBuMCwgZHkpKSwgbjEgPSBuMCArIGR5LCBzMSA9IHMwOwogICAgICAgICAgICAgIGVsc2UgaWYgKHNpZ25ZID4gMCkgZHkgPSBNYXRoLm1heChOIC0gczAsIE1hdGgubWluKFMgLSBzMCwgZHkpKSwgbjEgPSBuMCwgczEgPSBzMCArIGR5OwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNhc2UgTU9ERV9DRU5URVI6IHsKICAgICAgICAgICAgICBpZiAoc2lnblgpIHcxID0gTWF0aC5tYXgoVywgTWF0aC5taW4oRSwgdzAgLSBkeCAqIHNpZ25YKSksIGUxID0gTWF0aC5tYXgoVywgTWF0aC5taW4oRSwgZTAgKyBkeCAqIHNpZ25YKSk7CiAgICAgICAgICAgICAgaWYgKHNpZ25ZKSBuMSA9IE1hdGgubWF4KE4sIE1hdGgubWluKFMsIG4wIC0gZHkgKiBzaWduWSkpLCBzMSA9IE1hdGgubWF4KE4sIE1hdGgubWluKFMsIHMwICsgZHkgKiBzaWduWSkpOwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgICB9CgogICAgICAgICAgaWYgKGUxIDwgdzEpIHsKICAgICAgICAgICAgc2lnblggKj0gLTE7CiAgICAgICAgICAgIHQgPSB3MCwgdzAgPSBlMCwgZTAgPSB0OwogICAgICAgICAgICB0ID0gdzEsIHcxID0gZTEsIGUxID0gdDsKICAgICAgICAgICAgaWYgKHR5cGUgaW4gZmxpcFgpIG92ZXJsYXkuYXR0cigiY3Vyc29yIiwgY3Vyc29yc1t0eXBlID0gZmxpcFhbdHlwZV1dKTsKICAgICAgICAgIH0KCiAgICAgICAgICBpZiAoczEgPCBuMSkgewogICAgICAgICAgICBzaWduWSAqPSAtMTsKICAgICAgICAgICAgdCA9IG4wLCBuMCA9IHMwLCBzMCA9IHQ7CiAgICAgICAgICAgIHQgPSBuMSwgbjEgPSBzMSwgczEgPSB0OwogICAgICAgICAgICBpZiAodHlwZSBpbiBmbGlwWSkgb3ZlcmxheS5hdHRyKCJjdXJzb3IiLCBjdXJzb3JzW3R5cGUgPSBmbGlwWVt0eXBlXV0pOwogICAgICAgICAgfQoKICAgICAgICAgIGlmIChzdGF0ZS5zZWxlY3Rpb24pIHNlbGVjdGlvbiA9IHN0YXRlLnNlbGVjdGlvbjsgLy8gTWF5IGJlIHNldCBieSBicnVzaC5tb3ZlIQogICAgICAgICAgaWYgKGxvY2tYKSB3MSA9IHNlbGVjdGlvblswXVswXSwgZTEgPSBzZWxlY3Rpb25bMV1bMF07CiAgICAgICAgICBpZiAobG9ja1kpIG4xID0gc2VsZWN0aW9uWzBdWzFdLCBzMSA9IHNlbGVjdGlvblsxXVsxXTsKCiAgICAgICAgICBpZiAoc2VsZWN0aW9uWzBdWzBdICE9PSB3MQogICAgICAgICAgICAgIHx8IHNlbGVjdGlvblswXVsxXSAhPT0gbjEKICAgICAgICAgICAgICB8fCBzZWxlY3Rpb25bMV1bMF0gIT09IGUxCiAgICAgICAgICAgICAgfHwgc2VsZWN0aW9uWzFdWzFdICE9PSBzMSkgewogICAgICAgICAgICBzdGF0ZS5zZWxlY3Rpb24gPSBbW3cxLCBuMV0sIFtlMSwgczFdXTsKICAgICAgICAgICAgcmVkcmF3LmNhbGwodGhhdCk7CiAgICAgICAgICAgIGVtaXQuYnJ1c2goKTsKICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIGZ1bmN0aW9uIGVuZGVkKCkgewogICAgICAgICAgbm9wcm9wYWdhdGlvbiQxKCk7CiAgICAgICAgICBpZiAoZXZlbnQudG91Y2hlcykgewogICAgICAgICAgICBpZiAoZXZlbnQudG91Y2hlcy5sZW5ndGgpIHJldHVybjsKICAgICAgICAgICAgaWYgKHRvdWNoZW5kaW5nKSBjbGVhclRpbWVvdXQodG91Y2hlbmRpbmcpOwogICAgICAgICAgICB0b3VjaGVuZGluZyA9IHNldFRpbWVvdXQoZnVuY3Rpb24oKSB7IHRvdWNoZW5kaW5nID0gbnVsbDsgfSwgNTAwKTsgLy8gR2hvc3QgY2xpY2tzIGFyZSBkZWxheWVkIQogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgeWVzZHJhZyhldmVudC52aWV3LCBtb3ZpbmcpOwogICAgICAgICAgICB2aWV3Lm9uKCJrZXlkb3duLmJydXNoIGtleXVwLmJydXNoIG1vdXNlbW92ZS5icnVzaCBtb3VzZXVwLmJydXNoIiwgbnVsbCk7CiAgICAgICAgICB9CiAgICAgICAgICBncm91cC5hdHRyKCJwb2ludGVyLWV2ZW50cyIsICJhbGwiKTsKICAgICAgICAgIG92ZXJsYXkuYXR0cigiY3Vyc29yIiwgY3Vyc29ycy5vdmVybGF5KTsKICAgICAgICAgIGlmIChzdGF0ZS5zZWxlY3Rpb24pIHNlbGVjdGlvbiA9IHN0YXRlLnNlbGVjdGlvbjsgLy8gTWF5IGJlIHNldCBieSBicnVzaC5tb3ZlIChvbiBzdGFydCkhCiAgICAgICAgICBpZiAoZW1wdHkkMShzZWxlY3Rpb24pKSBzdGF0ZS5zZWxlY3Rpb24gPSBudWxsLCByZWRyYXcuY2FsbCh0aGF0KTsKICAgICAgICAgIGVtaXQuZW5kKCk7CiAgICAgICAgfQoKICAgICAgICBmdW5jdGlvbiBrZXlkb3duZWQoKSB7CiAgICAgICAgICBzd2l0Y2ggKGV2ZW50LmtleUNvZGUpIHsKICAgICAgICAgICAgY2FzZSAxNjogeyAvLyBTSElGVAogICAgICAgICAgICAgIHNoaWZ0aW5nID0gc2lnblggJiYgc2lnblk7CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY2FzZSAxODogeyAvLyBBTFQKICAgICAgICAgICAgICBpZiAobW9kZSA9PT0gTU9ERV9IQU5ETEUpIHsKICAgICAgICAgICAgICAgIGlmIChzaWduWCkgZTAgPSBlMSAtIGR4ICogc2lnblgsIHcwID0gdzEgKyBkeCAqIHNpZ25YOwogICAgICAgICAgICAgICAgaWYgKHNpZ25ZKSBzMCA9IHMxIC0gZHkgKiBzaWduWSwgbjAgPSBuMSArIGR5ICogc2lnblk7CiAgICAgICAgICAgICAgICBtb2RlID0gTU9ERV9DRU5URVI7CiAgICAgICAgICAgICAgICBtb3ZlKCk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNhc2UgMzI6IHsgLy8gU1BBQ0U7IHRha2VzIHByaW9yaXR5IG92ZXIgQUxUCiAgICAgICAgICAgICAgaWYgKG1vZGUgPT09IE1PREVfSEFORExFIHx8IG1vZGUgPT09IE1PREVfQ0VOVEVSKSB7CiAgICAgICAgICAgICAgICBpZiAoc2lnblggPCAwKSBlMCA9IGUxIC0gZHg7IGVsc2UgaWYgKHNpZ25YID4gMCkgdzAgPSB3MSAtIGR4OwogICAgICAgICAgICAgICAgaWYgKHNpZ25ZIDwgMCkgczAgPSBzMSAtIGR5OyBlbHNlIGlmIChzaWduWSA+IDApIG4wID0gbjEgLSBkeTsKICAgICAgICAgICAgICAgIG1vZGUgPSBNT0RFX1NQQUNFOwogICAgICAgICAgICAgICAgb3ZlcmxheS5hdHRyKCJjdXJzb3IiLCBjdXJzb3JzLnNlbGVjdGlvbik7CiAgICAgICAgICAgICAgICBtb3ZlKCk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGRlZmF1bHQ6IHJldHVybjsKICAgICAgICAgIH0KICAgICAgICAgIG5vZXZlbnQkMSgpOwogICAgICAgIH0KCiAgICAgICAgZnVuY3Rpb24ga2V5dXBwZWQoKSB7CiAgICAgICAgICBzd2l0Y2ggKGV2ZW50LmtleUNvZGUpIHsKICAgICAgICAgICAgY2FzZSAxNjogeyAvLyBTSElGVAogICAgICAgICAgICAgIGlmIChzaGlmdGluZykgewogICAgICAgICAgICAgICAgbG9ja1ggPSBsb2NrWSA9IHNoaWZ0aW5nID0gZmFsc2U7CiAgICAgICAgICAgICAgICBtb3ZlKCk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNhc2UgMTg6IHsgLy8gQUxUCiAgICAgICAgICAgICAgaWYgKG1vZGUgPT09IE1PREVfQ0VOVEVSKSB7CiAgICAgICAgICAgICAgICBpZiAoc2lnblggPCAwKSBlMCA9IGUxOyBlbHNlIGlmIChzaWduWCA+IDApIHcwID0gdzE7CiAgICAgICAgICAgICAgICBpZiAoc2lnblkgPCAwKSBzMCA9IHMxOyBlbHNlIGlmIChzaWduWSA+IDApIG4wID0gbjE7CiAgICAgICAgICAgICAgICBtb2RlID0gTU9ERV9IQU5ETEU7CiAgICAgICAgICAgICAgICBtb3ZlKCk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNhc2UgMzI6IHsgLy8gU1BBQ0UKICAgICAgICAgICAgICBpZiAobW9kZSA9PT0gTU9ERV9TUEFDRSkgewogICAgICAgICAgICAgICAgaWYgKGV2ZW50LmFsdEtleSkgewogICAgICAgICAgICAgICAgICBpZiAoc2lnblgpIGUwID0gZTEgLSBkeCAqIHNpZ25YLCB3MCA9IHcxICsgZHggKiBzaWduWDsKICAgICAgICAgICAgICAgICAgaWYgKHNpZ25ZKSBzMCA9IHMxIC0gZHkgKiBzaWduWSwgbjAgPSBuMSArIGR5ICogc2lnblk7CiAgICAgICAgICAgICAgICAgIG1vZGUgPSBNT0RFX0NFTlRFUjsKICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgIGlmIChzaWduWCA8IDApIGUwID0gZTE7IGVsc2UgaWYgKHNpZ25YID4gMCkgdzAgPSB3MTsKICAgICAgICAgICAgICAgICAgaWYgKHNpZ25ZIDwgMCkgczAgPSBzMTsgZWxzZSBpZiAoc2lnblkgPiAwKSBuMCA9IG4xOwogICAgICAgICAgICAgICAgICBtb2RlID0gTU9ERV9IQU5ETEU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBvdmVybGF5LmF0dHIoImN1cnNvciIsIGN1cnNvcnNbdHlwZV0pOwogICAgICAgICAgICAgICAgbW92ZSgpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQogICAgICAgICAgICBkZWZhdWx0OiByZXR1cm47CiAgICAgICAgICB9CiAgICAgICAgICBub2V2ZW50JDEoKTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIHRvdWNobW92ZWQoKSB7CiAgICAgICAgZW1pdHRlcih0aGlzLCBhcmd1bWVudHMpLm1vdmVkKCk7CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIHRvdWNoZW5kZWQoKSB7CiAgICAgICAgZW1pdHRlcih0aGlzLCBhcmd1bWVudHMpLmVuZGVkKCk7CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIGluaXRpYWxpemUoKSB7CiAgICAgICAgdmFyIHN0YXRlID0gdGhpcy5fX2JydXNoIHx8IHtzZWxlY3Rpb246IG51bGx9OwogICAgICAgIHN0YXRlLmV4dGVudCA9IG51bWJlcjIoZXh0ZW50LmFwcGx5KHRoaXMsIGFyZ3VtZW50cykpOwogICAgICAgIHN0YXRlLmRpbSA9IGRpbTsKICAgICAgICByZXR1cm4gc3RhdGU7CiAgICAgIH0KCiAgICAgIGJydXNoLmV4dGVudCA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChleHRlbnQgPSB0eXBlb2YgXyA9PT0gImZ1bmN0aW9uIiA/IF8gOiBjb25zdGFudCQ0KG51bWJlcjIoXykpLCBicnVzaCkgOiBleHRlbnQ7CiAgICAgIH07CgogICAgICBicnVzaC5maWx0ZXIgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3Vt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29tcGFyZVZhbHVlKGNvbXBhcmUpIHsKICAgICAgcmV0dXJuIGZ1bmN0aW9uKGEsIGIpIHsKICAgICAgICByZXR1cm4gY29tcGFyZSgKICAgICAgICAgIGEuc291cmNlLnZhbHVlICsgYS50YXJnZXQudmFsdWUsCiAgICAgICAgICBiLnNvdXJjZS52YWx1ZSArIGIudGFyZ2V0LnZhbHVlCiAgICAgICAgKTsKICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiBjaG9yZCgpIHsKICAgICAgdmFyIHBhZEFuZ2xlID0gMCwKICAgICAgICAgIHNvcnRHcm91cHMgPSBudWxsLAogICAgICAgICAgc29ydFN1Ymdyb3VwcyA9IG51bGwsCiAgICAgICAgICBzb3J0Q2hvcmRzID0gbnVsbDsKCiAgICAgIGZ1bmN0aW9uIGNob3JkKG1hdHJpeCkgewogICAgICAgIHZhciBuID0gbWF0cml4Lmxlbmd0aCwKICAgICAgICAgICAgZ3JvdXBTdW1zID0gW10sCiAgICAgICAgICAgIGdyb3VwSW5kZXggPSBzZXF1ZW5jZShuKSwKICAgICAgICAgICAgc3ViZ3JvdXBJbmRleCA9IFtdLAogICAgICAgICAgICBjaG9yZHMgPSBbXSwKICAgICAgICAgICAgZ3JvdXBzID0gY2hvcmRzLmdyb3VwcyA9IG5ldyBBcnJheShuKSwKICAgICAgICAgICAgc3ViZ3JvdXBzID0gbmV3IEFycmF5KG4gKiBuKSwKICAgICAgICAgICAgaywKICAgICAgICAgICAgeCwKICAgICAgICAgICAgeDAsCiAgICAgICAgICAgIGR4LAogICAgICAgICAgICBpLAogICAgICAgICAgICBqOwoKICAgICAgICAvLyBDb21wdXRlIHRoZSBzdW0uCiAgICAgICAgayA9IDAsIGkgPSAtMTsgd2hpbGUgKCsraSA8IG4pIHsKICAgICAgICAgIHggPSAwLCBqID0gLTE7IHdoaWxlICgrK2ogPCBuKSB7CiAgICAgICAgICAgIHggKz0gbWF0cml4W2ldW2pdOwogICAgICAgICAgfQogICAgICAgICAgZ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mluZyBvYmplY3QgbGl0ZXJhbCBwcm9wZXJ0aWVzIQogICAgICAgIHggPSAwLCBpID0gLTE7IHdoaWxlICgrK2kgPCBuKSB7CiAgICAgICAgICB4MCA9IHgsIGogPSAtMTsgd2hpbGUgKCsraiA8IG4pIHsKICAgICAgICAgICAgdmFyIGRpID0gZ3JvdXBJbmRleFtpXSwKICAgICAgICAgICAgICAgIGRqID0gc3ViZ3JvdXBJbmRleFtkaV1bal0sCiAgICAgICAgICAgICAgICB2ID0gbWF0cml4W2RpXVtkal0sCiAgICAgICAgICAgICAgICBhMCA9IHgsCiAgICAgICAgICAgICAgICBhMSA9IHggKz0gdiAqIGs7CiAgICAgICAgICAgIHN1Ymdyb3Vwc1tkaiAqIG4gKyBkaV0gPSB7CiAgICAgICAgICAgICAgaW5kZXg6IGRpLAogICAgICAgICAgICAgIHN1YmluZGV4OiBkaiwKICAgICAgICAgICAgICBzdGFydEFuZ2xlOiBhMCwKICAgICAgICAgICAgICBlbmRBbmdsZTogYTEsCiAgICAgICAgICAgICAgdmFsdWU6IHYKICAgICAgICAgICAgfTsKICAgICAgICAgIH0KICAgICAgICAgIGdyb3Vwc1tkaV0gPSB7CiAgICAgICAgICAgIGluZGV4OiBkaSwKICAgICAgICAgICAgc3RhcnRBbmdsZTogeDAsCiAgICAgICAgICAgIGVuZEFuZ2xlOiB4LAogICAgICAgICAgICB2YWx1ZTogZ3JvdXBTdW1zW2RpXQogICAgICAgICAgfTsKICAgICAgICAgIHggKz0gZHg7CiAgICAgICAgfQoKICAgICAgICAvLyBHZW5lcmF0ZSBjaG9yZHMgZm9yIGVhY2ggKG5vbi1lbXB0eSkgc3ViZ3JvdXAtc3ViZ3JvdXAgbGluay4KICAgICAgICBpID0gLTE7IHdoaWxlICgrK2kgPCBuKSB7CiAgICAgICAgICBqID0gaSAtIDE7IHdoaWxlICgrK2ogPCBuKSB7CiAgICAgICAgICAgIHZhciBzb3VyY2UgPSBzdWJncm91cHNbaiAqIG4gKyBpXSwKICAgICAgICAgICAgICAgIHRhcmdldCA9IHN1Ymdyb3Vwc1tpICogbiArIGpdOwogICAgICAgICAgICBpZiAoc291cmNlLnZhbHVlIHx8IHRhcmdldC52YWx1ZSkgewogICAgICAgICAgICAgIGNob3Jkcy5wdXNoKHNvdXJjZS52YWx1ZSA8IHRhcmdldC52YWx1ZQogICAgICAgICAgICAgICAgICA/IHtzb3VyY2U6IHRhcmdldCwgdGFyZ2V0OiBzb3VyY2V9CiAgICAgICAgICAgICAgICAgIDoge3NvdXJjZTogc291cmNlLCB0YXJnZXQ6IHRhcmdldH0pOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICByZXR1cm4gc29ydENob3JkcyA/IGNob3Jkcy5zb3J0KHNvcnRDaG9yZHMpIDogY2hvcmRzOwogICAgICB9CgogICAgICBjaG9yZC5wYWRBbmdsZSA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChwYWRBbmdsZSA9IG1heCQxKDAsIF8pLCBjaG9yZCkgOiBwYWRBbmdsZTsKICAgICAgfTsKCiAgICAgIGNob3JkLnNvcnRHcm91cHMgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoc29ydEdyb3VwcyA9IF8sIGNob3JkKSA6IHNvcnRHcm91cHM7CiAgICAgIH07CgogICAgICBjaG9yZC5zb3J0U3ViZ3JvdXBzID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHNvcnRTdWJncm91cHMgPSBfLCBjaG9yZCkgOiBzb3J0U3ViZ3JvdXBzOwogICAgICB9OwoKICAgICAgY2hvcmQuc29ydENob3JkcyA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChfID09IG51bGwgPyBzb3J0Q2hvcmRzID0gbnVsbCA6IChzb3J0Q2hvcmRzID0gY29tcGFyZVZhbHVlKF8pKS5fID0gXywgY2hvcmQpIDogc29ydENob3JkcyAmJiBzb3J0Q2hvcmRzLl87CiAgICAgIH07CgogICAgICByZXR1cm4gY2hvcmQ7CiAgICB9CgogICAgdmFyIHNsaWNlJDIgPSBBcnJheS5wcm90b3R5cGUuc2xpY2U7CgogICAgZnVuY3Rpb24gY29uc3RhbnQkNSh4KSB7CiAgICAgIHJldHVybiBmdW5jdGlvbigpIHsKICAgICAgICByZXR1cm4geDsKICAgICAgfTsKICAgIH0KCiAgICB2YXIgcGkkMiA9IE1hdGguUEksCiAgICAgICAgdGF1JDIgPSAyICogcGkkMiwKICAgICAgICBlcHNpbG9uJDEgPSAxZS02LAogICAgICAgIHRhdUVwc2lsb24gPSB0YXUkMiAtIGVwc2lsb24kMTsKCiAgICBmdW5jdGlvbiBQYXRoKCkgewogICAgICB0aGlzLl94MCA9IHRoaXMuX3kwID0gLy8gc3RhcnQgb2YgY3VycmVudCBzdWJwYXRoCiAgICAgIHRoaXMuX3gxID0gdGhpcy5feTEgPSBudWxsOyAvLyBlbmQgb2YgY3VycmVudCBzdWJwYXRoCiAgICAgIHRoaXMuXyA9ICIiOwogICAgfQoKICAgIGZ1bmN0aW9uIHBhdGgoKSB7CiAgICAgIHJldHVybiBuZXcgUGF0aDsKICAgIH0KCiAgICBQYXRoLnByb3RvdHlwZSA9IHBhdGgucHJvdG90eXBlID0gewogICAgICBjb25zdHJ1Y3RvcjogUGF0aCwKICAgICAgbW92ZVRvOiBmdW5jdGlvbih4LCB5KSB7CiAgICAgICAgdGhpcy5fICs9ICJNIiArICh0aGlzLl94MCA9IHRoaXMuX3gxID0gK3gpICsgIiwiICsgKHRoaXMuX3kwID0gdGhpcy5feTEgPSAreSk7CiAgICAgIH0sCiAgICAgIGNsb3NlUGF0aDogZnVuY3Rpb24oKSB7CiAgICAgICAgaWYgKHRoaXMuX3gxICE9PSBudWxsKSB7CiAgICAgICAgICB0aGlzLl94MSA9IHRoaXMuX3gwLCB0aGlzLl95MSA9IHRoaXMuX3kwOwogICAgICAgICAgdGhpcy5fICs9ICJaIjsKICAgICAgICB9CiAgICAgIH0sCiAgICAgIGxpbmVUbzogZnVuY3Rpb24oeCwgeSkgewogICAgICAgIHRoaXMuXyArPSAiTCIgKyAodGhpcy5feDEgPSAreCkgKyAiLCIgKyAodGhpcy5feTEgPSAreSk7CiAgICAgIH0sCiAgICAgIHF1YWRyYXRpY0N1cnZlVG86IGZ1bmN0aW9uKHgxLCB5MSwgeCwgeSkgewogICAgICAgIHRoaXMuXyArPSAiUSIgKyAoK3gxKSArICIsIiArICgreTEpICsgIiwiICsgKHRoaXMuX3gxID0gK3gpICsgIiwiICsgKHRoaXMuX3kxID0gK3kpOwogICAgICB9LAogICAgICBiZXppZXJDdXJ2ZVRvOiBmdW5jdGlvbih4MSwgeTEsIHgyLCB5MiwgeCwgeSkgewogICAgICAgIHRoaXMuXyArPSAiQyIgKyAoK3gxKSArICIsIiArICgreTEpICsgIiwiICsgKCt4MikgKyAiLCIgKyAoK3kyKSArICIsIiArICh0aGlzLl94MSA9ICt4KSArICIsIiArICh0aGlzLl95MSA9ICt5KTsKICAgICAgfSwKICAgICAgYXJjVG86IGZ1bmN0aW9uKHgxLCB5MSwgeDIsIHkyLCByKSB7CiAgICAgICAgeDEgPSAreDEsIHkxID0gK3kxLCB4MiA9ICt4MiwgeTIgPSAreTIsIHIgPSArcjsKICAgICAgICB2YXIgeDAgPSB0aGlzLl94MSwKICAgICAgICAgICAgeTAgPSB0aGlzLl95MSwKICAgICAgICAgICAgeDIxID0geDIgLSB4MSwKICAgICAgICAgICAgeTIxID0geTIgLSB5MSwKICAgICAgICAgICAgeDAxID0geDAgLSB4MSwKICAgICAgICAgICAgeTAxID0geTAgLSB5MSwKICAgICAgICAgICAgbDAxXzIgPSB4MDEgKiB4MDEgKyB5MDEgKiB5MDE7CgogICAgICAgIC8vIElzIHRoZSByYWRpdXMgbmVnYXRpdmU/IEVycm9yLgogICAgICAgIGlmIChyIDwgMCkgdGhyb3cgbmV3IEVycm9yKCJuZWdhdGl2ZSByYWRpdXM6ICIgKyByKTsKCiAgICAgICAgLy8gSXMgdGhpcyBwYXRoIGVtcHR5PyBNb3ZlIHRvICh4MSx5MSkuCiAgICAgICAgaWYgKHRoaXMuX3gxID09PSBudWxsKSB7CiAgICAgICAgICB0aGlzLl8gKz0gIk0iICsgKHRoaXMuX3gxID0geDEpICsgIiwiICsgKHRoaXMuX3kxID0geTEpOwogICAgICAgIH0KCiAgICAgICAgLy8gT3IsIGlzICh4MSx5MSkgY29pbmNpZGVudCB3aXRoICh4MCx5MCk/IERvIG5vdGhpbmcuCiAgICAgICAgZWxzZSBpZiAoIShsMDFfMiA+IGVwc2lsb24kMSkpOwoKICAgICAgICAvLyBPciwgYXJlICh4MCx5MCksICh4MSx5MSkgYW5kICh4Mix5MikgY29sbGluZWFyPwogICAgICAgIC8vIEVxdWl2YWxlbnRseSwgaXMgKHgxLHkxKSBjb2luY2lkZW50IHdpdGggKHgyLHkyKT8KICAgICAgICAvLyBPciwgaXMgdGhlIHJhZGl1cyB6ZXJvPyBMaW5lIHRvICh4MSx5MSkuCiAgICAgICAgZWxzZSBpZiAoIShNYXRoLmFicyh5MDEgKiB4MjEgLSB5MjEgKiB4MDEpID4gZXBzaWxvbiQxKSB8fCAhcikgewogICAgICAgICAgdGhpcy5fICs9ICJMIiArICh0aGlzLl94MSA9IHgxKSArICIsIiArICh0aGlzLl95MSA9IHkxKTsKICAgICAgICB9CgogICAgICAgIC8vIE90aGVyd2lzZSwgZHJhdyBhbiBhcmMhCiAgICAgICAgZWxzZSB7CiAgICAgICAgICB2YXIgeDIwID0geDIgLSB4MCwKICAgICAgICAgICAgICB5MjAgPSB5MiAtIHkwLAogICAgICAgICAgICAgIGwyMV8yID0geDIxICogeDIxICsgeTIxICogeTIxLAogICAgICAgICAgICAgIGwyMF8yID0geDIwICogeDIwICsgeTIwICogeTIwLAogICAgICAgICAgICAgIGwyMSA9IE1hdGguc3FydChsMjFfMiksCiAgICAgICAgICAgICAgbDAxID0gTWF0aC5zcXJ0KGwwMV8yKSwKICAgICAgICAgICAgICBsID0gciAqIE1hdGgudGFuKChwaSQyIC0gTWF0aC5hY29zKChsMjFfMiArIGwwMV8yIC0gbDIwXzIpIC8gKDIgKiBsMjEgKiBsMDEpKSkgLyAyKSwKICAgICAgICAgICAgICB0MDEgPSBsIC8gbDAxLAogICAgICAgICAgICAgIHQyMSA9IGwgLyBsMjE7CgogICAgICAgICAgLy8gSWYgdGhlIHN0YXJ0IHRhbmdlbnQgaXMgbm90IGNvaW5jaWRlbnQgd2l0aCAoeDAseTApLCBsaW5lIHRvLgogICAgICAgICAgaWYgKE1hdGguYWJzKHQwMSAtIDEpID4gZXBzaWxvbiQxKSB7CiAgICAgICAgICAgIHRoaXMuXyArPSAiTCIgKyAoeDEgKyB0MDEgKiB4MDEpICsgIiwiICsgKHkxICsgdDAxICogeTAxKTsKICAgICAgICAgIH0KCiAgICAgICAgICB0aGlzLl8gKz0gIkEiICsgciArICIsIiArIHIgKyAiLDAsMCwiICsgKCsoeTAxICogeDIwID4geDAxICogeTIwKSkgKyAiLCIgKyAodGhpcy5feDEgPSB4MSArIHQyMSAqIHgyMSkgKyAiLCIgKyAodGhpcy5feTEgPSB5MSArIHQyMSAqIHkyMSk7CiAgICAgICAgfQogICAgICB9LAogICAgICBhcmM6IGZ1bmN0aW9uKHgsIHksIHIsIGEwLCBhMSwgY2N3KSB7CiAgICAgICAgeCA9ICt4LCB5ID0gK3ksIHIgPSArciwgY2N3ID0gISFjY3c7CiAgICAgICAgdmFyIGR4ID0gciAqIE1hdGguY29zKGEwKSwKICAgICAgICAgICAgZHkgPSByICogTWF0aC5zaW4oYTApLAogICAgICAgICAgICB4MCA9IHggKyBkeCwKICAgICAgICAgICAgeTAgPSB5ICsgZHksCiAgICAgICAgICAgIGN3ID0gMSBeIGNjdywKICAgICAgICAgICAgZGEgPSBjY3cgPyBhMCAtIGExI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SArICIsIiArICh5IC0gZHkpICsgIkEiICsgciArICIsIiArIHIgKyAiLDAsMSwiICsgY3cgKyAiLCIgKyAodGhpcy5feDEgPSB4MCkgKyAiLCIgKyAodGhpcy5feTEgPSB5MCk7CiAgICAgICAgfQoKICAgICAgICAvLyBJcyB0aGlzIGFyYyBub24tZW1wdHk/IERyYXcgYW4gYXJjIQogICAgICAgIGVsc2UgaWYgKGRhID4gZXBzaWxvbiQxKSB7CiAgICAgICAgICB0aGlzLl8gKz0gIkEiICsgciArICIsIiArIHIgKyAiLDAsIiArICgrKGRhID49IHBpJDIpKSArICIsIiArIGN3ICsgIiwiICsgKHRoaXMuX3gxID0geCArIHIgKiBNYXRoLmNvcyhhMSkpICsgIiwiICsgKHRoaXMuX3kxID0geSArIHIgKiBNYXRoLnNpbihhMSkpOwogICAgICAgIH0KICAgICAgfSwKICAgICAgcmVjdDogZnVuY3Rpb24oeCwgeSwgdywgaCkgewogICAgICAgIHRoaXMuXyArPSAiTSIgKyAodGhpcy5feDAgPSB0aGlzLl94MSA9ICt4KSArICIsIiArICh0aGlzLl95MCA9IHRoaXMuX3kxID0gK3kpICsgImgiICsgKCt3KSArICJ2IiArICgraCkgKyAiaCIgKyAoLXcpICsgIloiOwogICAgICB9LAogICAgICB0b1N0cmluZzogZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuXzsKICAgICAgfQogICAgfTsKCiAgICBmdW5jdGlvbiBkZWZhdWx0U291cmNlKGQpIHsKICAgICAgcmV0dXJuIGQuc291cmNlOwogICAgfQoKICAgIGZ1bmN0aW9uIGRlZmF1bHRUYXJnZXQoZCkgewogICAgICByZXR1cm4gZC50YXJnZXQ7CiAgICB9CgogICAgZnVuY3Rpb24gZGVmYXVsdFJhZGl1cyhkKSB7CiAgICAgIHJldHVybiBkLnJhZGl1czsKICAgIH0KCiAgICBmdW5jdGlvbiBkZWZhdWx0U3RhcnRBbmdsZShkKSB7CiAgICAgIHJldHVybiBkLnN0YXJ0QW5nbGU7CiAgICB9CgogICAgZnVuY3Rpb24gZGVmYXVsdEVuZEFuZ2xlKGQpIHsKICAgICAgcmV0dXJuIGQuZW5kQW5nbGU7CiAgICB9CgogICAgZnVuY3Rpb24gcmliYm9uKCkgewogICAgICB2YXIgc291cmNlID0gZGVmYXVsdFNvdXJjZSwKICAgICAgICAgIHRhcmdldCA9IGRlZmF1bHRUYXJnZXQsCiAgICAgICAgICByYWRpdXMgPSBkZWZhdWx0UmFkaXVzLAogICAgICAgICAgc3RhcnRBbmdsZSA9IGRlZmF1bHRTdGFydEFuZ2xlLAogICAgICAgICAgZW5kQW5nbGUgPSBkZWZhdWx0RW5kQW5nbGUsCiAgICAgICAgICBjb250ZXh0ID0gbnVsbDsKCiAgICAgIGZ1bmN0aW9uIHJpYmJvbigpIHsKICAgICAgICB2YXIgYnVmZmVyLAogICAgICAgICAgICBhcmd2ID0gc2xpY2UkMi5jYWxsKGFyZ3VtZW50cyksCiAgICAgICAgICAgIHMgPSBzb3VyY2UuYXBwbHkodGhpcywgYXJndiksCiAgICAgICAgICAgIHQgPSB0YXJnZXQuYXBwbHkodGhpcywgYXJndiksCiAgICAgICAgICAgIHNyID0gK3JhZGl1cy5hcHBseSh0aGlzLCAoYXJndlswXSA9IHMsIGFyZ3YpKSwKICAgICAgICAgICAgc2EwID0gc3RhcnRBbmdsZS5hcHBseSh0aGlzLCBhcmd2KSAtIGhhbGZQaSQxLAogICAgICAgICAgICBzYTEgPSBlbmRBbmdsZS5hcHBseSh0aGlzLCBhcmd2KSAtIGhhbGZQaSQxLAogICAgICAgICAgICBzeDAgPSBzciAqIGNvcyhzYTApLAogICAgICAgICAgICBzeTAgPSBzciAqIHNpbihzYTApLAogICAgICAgICAgICB0ciA9ICtyYWRpdXMuYXBwbHkodGhpcywgKGFyZ3ZbMF0gPSB0LCBhcmd2KSksCiAgICAgICAgICAgIHRhMCA9IHN0YXJ0QW5nbGUuYXBwbHkodGhpcywgYXJndikgLSBoYWxmUGkkMSwKIC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gICAgIH07CgogICAgICByaWJib24uZW5kQW5nbGUgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoZW5kQW5nbGUgPSB0eXBlb2YgXyA9PT0gImZ1bmN0aW9uIiA/IF8gOiBjb25zdGFudCQ1KCtfKSwgcmliYm9uKSA6IGVuZEFuZ2xlOwogICAgICB9OwoKICAgICAgcmliYm9uLnNvdXJjZSA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChzb3VyY2UgPSBfLCByaWJib24pIDogc291cmNlOwogICAgICB9OwoKICAgICAgcmliYm9uLnRhcmdldCA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/ICh0YXJnZXQgPSBfLCByaWJib24pIDogdGFyZ2V0OwogICAgICB9OwoKICAgICAgcmliYm9uLmNvbnRleHQgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoKGNvbnRleHQgPSBfID09IG51bGwgPyBudWxsIDogXyksIHJpYmJvbikgOiBjb250ZXh0OwogICAgICB9OwoKICAgICAgcmV0dXJuIHJpYmJvbjsKICAgIH0KCiAgICB2YXIgcHJlZml4ID0gIiQiOwoKICAgIGZ1bmN0aW9uIE1hcCQxKCkge30KCiAgICBNYXAkMS5wcm90b3R5cGUgPSBtYXAkMS5wcm90b3R5cGUgPSB7CiAgICAgIGNvbnN0cnVjdG9yOiBNYXAkMSwKICAgICAgaGFzOiBmdW5jdGlvbihrZXkpIHsKICAgICAgICByZXR1cm4gKHByZWZpeCArIGtleSkgaW4gdGhpczsKICAgICAgfSwKICAgICAgZ2V0OiBmdW5jdGlvbihrZXkpIHsKICAgICAgICByZXR1cm4gdGhpc1twcmVmaXggKyBrZXldOwogICAgICB9LAogICAgICBzZXQ6IGZ1bmN0aW9uKGtleSwgdmFsdWUpIHsKICAgICAgICB0aGlzW3ByZWZpeCArIGtleV0gPSB2YWx1ZTsKICAgICAgICByZXR1cm4gdGhpczsKICAgICAgfSwKICAgICAgcmVtb3ZlOiBmdW5jdGlvbihrZXkpIHsKICAgICAgICB2YXIgcHJvcGVydHkgPSBwcmVmaXggKyBrZXk7CiAgICAgICAgcmV0dXJuIHByb3BlcnR5IGluIHRoaXMgJiYgZGVsZXRlIHRoaXNbcHJvcGVydHldOwogICAgICB9LAogICAgICBjbGVhcjogZnVuY3Rpb24oKSB7CiAgICAgICAgZm9yICh2YXIgcHJvcGVydHkgaW4gdGhpcykgaWYgKHByb3BlcnR5WzBdID09PSBwcmVmaXgpIGRlbGV0ZSB0aGlzW3Byb3BlcnR5XTsKICAgICAgfSwKICAgICAga2V5czogZnVuY3Rpb24oKSB7CiAgICAgICAgdmFyIGtleXMgPSBbXTsKICAgICAgICBmb3IgKHZhciBwcm9wZXJ0eSBpbiB0aGlzKSBpZiAocHJvcGVydHlbMF0gPT09IHByZWZpeCkga2V5cy5wdXNoKHByb3BlcnR5LnNsaWNlKDEpKTsKICAgICAgICByZXR1cm4ga2V5czsKICAgICAgfSwKICAgICAgdmFsdWVzOiBmdW5jdGlvbigpIHsKICAgICAgICB2YXIgdmFsdWVzID0gW107CiAgICAgICAgZm9yICh2YXIgcHJvcGVydHkgaW4gdGhpcykgaWYgKHByb3BlcnR5WzBdID09PSBwcmVmaXgpIHZhbHVlcy5wdXNoKHRoaXNbcHJvcGVydHldKTsKICAgICAgICByZXR1cm4gdmFsdWVzOwogICAgICB9LAogICAgICBlbnRyaWVzOiBmdW5jdGlvbigpIHsKICAgICAgICB2YXIgZW50cmllcyA9IFtdOwogICAgICAgIGZvciAodmFyIHByb3BlcnR5IGluIHRoaXMpIGlmIChwcm9wZXJ0eVswXSA9PT0gcHJlZml4KSBlbnRyaWVzLnB1c2goe2tleTogcHJvcGVydHkuc2xpY2UoMSksIHZhbHVlOiB0aGlzW3Byb3BlcnR5XX0pOwogICA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pbGUgKCsraSA8IG4pIG1hcC5zZXQoaSwgb2JqZWN0W2ldKTsKICAgICAgICBlbHNlIHdoaWxlICgrK2kgPCBuKSBtYXAuc2V0KGYobyA9IG9iamVjdFtpXSwgaSwgb2JqZWN0KSwgbyk7CiAgICAgIH0KCiAgICAgIC8vIENvbnZlcnQgb2JqZWN0IHRvIG1hcC4KICAgICAgZWxzZSBpZiAob2JqZWN0KSBmb3IgKHZhciBrZXkgaW4gb2JqZWN0KSBtYXAuc2V0KGtleSwgb2JqZWN0W2tleV0pOwoKICAgICAgcmV0dXJuIG1hcDsKICAgIH0KCiAgICBmdW5jdGlvbiBuZXN0KCkgewogICAgICB2YXIga2V5cyA9IFtdLAogICAgICAgICAgc29ydEtleXMgPSBbXSwKICAgICAgICAgIHNvcnRWYWx1ZXMsCiAgICAgICAgICByb2xsdXAsCiAgICAgICAgICBuZXN0OwoKICAgICAgZnVuY3Rpb24gYXBwbHkoYXJyYXksIGRlcHRoLCBjcmVhdGVSZXN1bHQsIHNldFJlc3VsdCkgewogICAgICAgIGlmIChkZXB0aCA+PSBrZXlzLmxlbmd0aCkgewogICAgICAgICAgaWYgKHNvcnRWYWx1ZXMgIT0gbnVsbCkgYXJyYXkuc29ydChzb3J0VmFsdWVzKTsKICAgICAgICAgIHJldHVybiByb2xsdXAgIT0gbnVsbCA/IHJvbGx1cChhcnJheSkgOiBhcnJheTsKICAgICAgICB9CgogICAgICAgIHZhciBpID0gLTEsCiAgICAgICAgICAgIG4gPSBhcnJheS5sZW5ndGgsCiAgICAgICAgICAgIGtleSA9IGtleXNbZGVwdGgrK10sCiAgICAgICAgICAgIGtleVZhbHVlLAogICAgICAgICAgICB2YWx1ZSwKICAgICAgICAgICAgdmFsdWVzQnlLZXkgPSBtYXAkMSgpLAogICAgICAgICAgICB2YWx1ZXMsCiAgICAgICAgICAgIHJlc3VsdCA9IGNyZWF0ZVJlc3VsdCgpOwoKICAgICAgICB3aGlsZSAoKytpIDwgbikgewogICAgICAgICAgaWYgKHZhbHVlcyA9IHZhbHVlc0J5S2V5LmdldChrZXlWYWx1ZSA9IGtleSh2YWx1ZSA9IGFycmF5W2ldKSArICIiKSkgewogICAgICAgICAgICB2YWx1ZXMucHVzaCh2YWx1ZSk7CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICB2YWx1ZXNCeUtleS5zZXQoa2V5VmFsdWUsIFt2YWx1ZV0pOwogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgdmFsdWVzQnlLZXkuZWFjaChmdW5jdGlvbih2YWx1ZXMsIGtleSkgewogICAgICAgICAgc2V0UmVzdWx0KHJlc3VsdCwga2V5LCBhcHBseSh2YWx1ZXMsIGRlcHRoLCBjcmVhdGVSZXN1bHQsIHNldFJlc3VsdCkpOwogICAgICAgIH0pOwoKICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICB9CgogICAgICBmdW5jdGlvbiBlbnRyaWVzKG1hcCwgZGVwdGgpIHsKICAgICAgICBpZiAoKytkZXB0aCA+IGtleXMubGVuZ3RoKSByZXR1cm4gbWFwOwogICAgICAgIHZhciBhcnJheSwgc29ydEtleSA9IHNvcnRLZXlzW2RlcHRoIC0gMV07CiAgICAgICAgaWYgKHJvbGx1cCAhPSBudWxsICYmIGRlcHRoID49IGtleXMubGVuZ3RoKSBhcnJheSA9IG1hcC5lbnRyaWVzKCk7CiAgICAgICAgZWxzZSBhcnJheSA9IFtdLCBtYXAuZWFjaChmdW5jdGlvbih2LCBrKSB7IGFycmF5LnB1c2goe2tleTogaywgdmFsdWVzOiBlbnRyaWVzKHYsIGRlcHRoKX0pOyB9KTsKICAgICAgICByZXR1cm4gc29ydEtleSAhPSBudWxsID8gYXJyYXkuc29ydChmdW5jdGlvbihhLCBiKSB7IHJldHVybiBzb3J0S2V5KGEua2V5LCBiLmtleSk7IH0pIDogYXJyYXk7CiAgICAgIH0KCiAgICAgIHJldHVybiBuZXN0ID0gewogICAgICAgIG9iamVjdDogZnVuY3Rpb24oYXJyYXkpIHs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iBrZXlzKG1hcCkgewogICAgICB2YXIga2V5cyA9IFtdOwogICAgICBmb3IgKHZhciBrZXkgaW4gbWFwKSBrZXlzLnB1c2goa2V5KTsKICAgICAgcmV0dXJuIGtleXM7CiAgICB9CgogICAgZnVuY3Rpb24gdmFsdWVzKG1hcCkgewogICAgICB2YXIgdmFsdWVzID0gW107CiAgICAgIGZvciAodmFyIGtleSBpbiBtYXApIHZhbHVlcy5wdXNoKG1hcFtrZXldKTsKICAgICAgcmV0dXJuIHZhbHVlczsKICAgIH0KCiAgICBmdW5jdGlvbiBlbnRyaWVzKG1hcCkgewogICAgICB2YXIgZW50cmllcyA9IFtdOwogICAgICBmb3IgKHZhciBrZXkgaW4gbWFwKSBlbnRyaWVzLnB1c2goe2tleToga2V5LCB2YWx1ZTogbWFwW2tleV19KTsKICAgICAgcmV0dXJuIGVudHJpZXM7CiAgICB9CgogICAgdmFyIGFycmF5JDIgPSBBcnJheS5wcm90b3R5cGU7CgogICAgdmFyIHNsaWNlJDMgPSBhcnJheSQyLnNsaWNlOwoKICAgIGZ1bmN0aW9uIGFzY2VuZGluZyQyKGEsIGIpIHsKICAgICAgcmV0dXJuIGEgLSBiOwogICAgfQoKICAgIGZ1bmN0aW9uIGFyZWEocmluZykgewogICAgICB2YXIgaSA9IDAsIG4gPSByaW5nLmxlbmd0aCwgYXJlYSA9IHJpbmdbbiAtIDFdWzFdICogcmluZ1swXVswXSAtIHJpbmdbbiAtIDFdWzBdICogcmluZ1swXVsxXTsKICAgICAgd2hpbGUgKCsraSA8IG4pIGFyZWEgKz0gcmluZ1tpIC0gMV1bMV0gKiByaW5nW2ldWzBdIC0gcmluZ1tpIC0gMV1bMF0gKiByaW5nW2ldWzFdOwogICAgICByZXR1cm4gYXJlYTsKICAgIH0KCiAgICBmdW5jdGlvbiBjb25zdGFudCQ2KHgpIHsKICAgICAgcmV0dXJuIGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiB4OwogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIGNvbnRhaW5zKHJpbmcsIGhvbGUpIHsKICAgICAgdmFyIGkgPSAtMSwgbiA9IGhvbGUubGVuZ3RoLCBjOwogICAgICB3aGlsZSAoKytpIDwgbikgaWYgKGMgPSByaW5nQ29udGFpbnMocmluZywgaG9sZVtpXSkpIHJldHVybiBjOwogICAgICByZXR1cm4gMDsKICAgIH0KCiAgICBmdW5jdGlvbiByaW5nQ29udGFpbnMocmluZywgcG9pbnQpIHsKICAgICAgdmFyIHggPSBwb2ludFswXSwgeSA9IHBvaW50WzFdLCBjb250YWlucyA9IC0xOwogICAgICBmb3IgKHZhciBpID0gMCwgbiA9IHJpbmcubGVuZ3RoLCBqID0gbiAtIDE7IGkgPCBuOyBqID0gaSsrKSB7CiAgICAgICAgdmFyIHBpID0gcmluZ1tpXSwgeGkgPSBwaVswXSwgeWkgPSBwaVsxXSwgcGogPSByaW5nW2pdLCB4aiA9IHBqWzBdLCB5aiA9IHBqWzFdOwogICAgICAgIGlmIChzZWdtZW50Q29udGFpbnMocGksIHBqLCBwb2ludCkpIHJldHVybiAwOwogICAgICAgIGlmICgoKHlpID4geSkgIT09ICh5aiA+IHkpKSAmJiAoKHggPCAoeGogLSB4aSkgKiAoeSAtIHlpKSAvICh5aiAtIHlpKSArIHhpKSkpIGNvbnRhaW5zID0gLWNvbnRhaW5zOwogICAgICB9CiAgICAgIHJldHVybiBjb250YWluczsKICAgIH0KCiAgICBmdW5jdGlvbiBzZWdtZW50Q29udGFpbnMoYSwgYiwgYykgewogICAgICB2YXIgaTsgcmV0dXJuIGNvbGxpbmVhcihhLCBiLCBjKSAmJiB3aXRoaW4oYVtpID0gKyhhWzBdID09PSBiWzBdKV0sIGNbaV0sIGJbaV0pOwogICAgfQoKICAgIGZ1bmN0aW9uIGNvbGxpbmVhcihhLCBiLCBjKSB7CiAgICAgIHJldHVybiAoYlswXSAtIGFbMF0pICogKGNbMV0gLSBhWzFdKSA9PT0gKGNbMF0gLSBhWzBdKSAqIChiWz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IGZ1bmN0aW9uKHJpbmcpIHsKICAgICAgICAgIHNtb290aChyaW5nLCB2YWx1ZXMsIHZhbHVlKTsKICAgICAgICAgIGlmIChhcmVhKHJpbmcpID4gMCkgcG9seWdvbnMucHVzaChbcmluZ10pOwogICAgICAgICAgZWxzZSBob2xlcy5wdXNoKHJpbmcpOwogICAgICAgIH0pOwoKICAgICAgICBob2xlcy5mb3JFYWNoKGZ1bmN0aW9uKGhvbGUpIHsKICAgICAgICAgIGZvciAodmFyIGkgPSAwLCBuID0gcG9seWdvbnMubGVuZ3RoLCBwb2x5Z29uOyBpIDwgbjsgKytpKSB7CiAgICAgICAgICAgIGlmIChjb250YWlucygocG9seWdvbiA9IHBvbHlnb25zW2ldKVswXSwgaG9sZSkgIT09IC0xKSB7CiAgICAgICAgICAgICAgcG9seWdvbi5wdXNoKGhvbGUpOwogICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgIH0pOwoKICAgICAgICByZXR1cm4gewogICAgICAgICAgdHlwZTogIk11bHRpUG9seWdvbiIsCiAgICAgICAgICB2YWx1ZTogdmFsdWUsCiAgICAgICAgICBjb29yZGluYXRlczogcG9seWdvbnMKICAgICAgICB9OwogICAgICB9CgogICAgICAvLyBNYXJjaGluZyBzcXVhcmVzIHdpdGggaXNvbGluZXMgc3RpdGNoZWQgaW50byByaW5ncy4KICAgICAgLy8gQmFzZWQgb24gaHR0cHM6Ly9naXRodWIuY29tL3RvcG9qc29uL3RvcG9qc29uLWNsaWVudC9ibG9iL3YzLjAuMC9zcmMvc3RpdGNoLmpzCiAgICAgIGZ1bmN0aW9uIGlzb3JpbmdzKHZhbHVlcywgdmFsdWUsIGNhbGxiYWNrKSB7CiAgICAgICAgdmFyIGZyYWdtZW50QnlTdGFydCA9IG5ldyBBcnJheSwKICAgICAgICAgICAgZnJhZ21lbnRCeUVuZCA9IG5ldyBBcnJheSwKICAgICAgICAgICAgeCwgeSwgdDAsIHQxLCB0Miwgd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MSB8IHQyIDw8IDNdLmZvckVhY2goc3RpdGNoKTsKICAgICAgICB9CgogICAgICAgIC8vIFNwZWNpYWwgY2FzZSBmb3IgdGhlIGxhc3Qgcm93ICh5ID0gZHkgLSAxLCB0MCA9IHQxID0gMCkuCiAgICAgICAgeCA9IC0xOwogICAgICAgIHQyID0gdmFsdWVzW3kgKiBkeF0gPj0gdmFsdWU7CiAgICAgICAgY2FzZXNbdDIgPDwgMl0uZm9yRWFjaChzdGl0Y2gpOwogICAgICAgIHdoaWxlICgrK3ggPCBkeCAtIDEpIHsKICAgICAgICAgIHQzID0gdDIsIHQyID0gdmFsdWVzW3kgKiBkeCArIHggKyAxXSA+PSB2YWx1ZTsKICAgICAgICAgIGNhc2VzW3QyIDw8IDIgfCB0MyA8PCAzXS5mb3JFYWNoKHN0aXRjaCk7CiAgICAgICAgfQogICAgICAgIGNhc2VzW3QyIDw8IDNdLmZvckVhY2goc3RpdGNoKTsKCiAgICAgICAgZnVuY3Rpb24gc3RpdGNoKGxpbmUpIHsKICAgICAgICAgIHZhciBzdGFydCA9IFtsaW5lWzBdWzBdICsgeCwgbGluZVswXVsxXSArIHldLAogICAgICAgICAgICAgIGVuZCA9IFtsaW5lWzFdWzBdICsgeCwgbGluZVsxXVsxXSArIHldLAogICAgICAgICAgICAgIHN0YXJ0SW5kZXggPSBpbmRleChzdGFydCksCiAgICAgICAgICAgICAgZW5kSW5kZXggPSBpbmRleChlbmQpLAogICAgICAgICAgICAgIGYsIGc7CiAgICAgICAgICBpZiAoZiA9IGZyYWdtZW50QnlFbmRbc3RhcnRJbmRleF0pIHsKICAgICAgICAgICAgaWYgKGcgPSBmcmFnbWVudEJ5U3RhcnRbZW5kSW5kZXhdKSB7CiAgICAgICAgICAgICAgZGVsZXRlIGZyYWdtZW50QnlFbmRbZi5lbmRdOwogICAgICAgICAgICAgIGRlbGV0ZSBmcmFnbWVudEJ5U3RhcnRbZy5zdGFydF07CiAgICAgICAgICAgICAgaWYgKGYgPT09IGcpIHsKICAgICAgICAgICAgICAgIGYucmluZy5wdXNoKGVuZCk7CiAgICAgICAgICAgICAgICBjYWxsYmFjayhmLnJpbmcpOwogICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICBmcmFnbWVudEJ5U3RhcnRbZi5zdGFydF0gPSBmcmFnbWVudEJ5RW5kW2cuZW5kXSA9IHtzdGFydDogZi5zdGFydCwgZW5kOiBnLmVuZCwgcmluZzogZi5yaW5nLmNvbmNhdChnLnJpbmcpfTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgZGVsZXRlIGZyYWdtZW50QnlFbmRbZi5lbmRdOwogICAgICAgICAgICAgIGYucmluZy5wdXNoKGVuZCk7CiAgICAgICAgICAgICAgZnJhZ21lbnRCeUVuZFtmLmVuZCA9IGVuZEluZGV4XSA9IGY7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0gZWxzZSBpZiAoZiA9IGZyYWdtZW50QnlTdGFydFtlbmRJbmRleF0pIHsKICAgICAgICAgICAgaWYgKGcgPSBmcmFnbWVudEJ5RW5kW3N0YXJ0SW5kZXhdKSB7CiAgICAgICAgICAgICAgZGVsZXRlIGZyYWdtZW50QnlTdGFydFtmLnN0YXJ0XTsKICAgICAgICAgICAgICBkZWxldGUgZnJhZ21lbnRCeUVuZFtnLmVuZF07CiAgICAgICAgICAgICAgaWYgKGYgPT09IGcpIHsKICAgICAgICAgICAgICAgIGYucmluZy5wdXNoKGVuZCk7CiAgICAgICAgICAgICAgICBjYWxsYmFjayhmLnJpbmcpOwogICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICBmcmFnbWVudEJ5U3RhcnRbZy5zdGFydF0gPSBmcmFnbWVudEJ5RW5kW2YuZW5kXSA9IHtzdGFydDogZy5zdGFydCwgZW5kOiBmLmVuZCwgcmluZzogZy5yaW5nLmNvbmNhdChmLnJpbmcpfTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgZGVsZXRlIGZyYWdtZW50QnlTdGFydFtmLnN0YXJ0XTsKICAgICAgICAgICAgICBmLnJpbmcudW5zaGlmdChzdGFydCk7CiAgICAgICAgICAgICAgZnJhZ21lbnRCeVN0YXJ0W2Yuc3RhcnQgPSBzdGFydEluZGV4XSA9IGY7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIGZyYWdtZW50QnlTdGFydFtzdGFydEluZGV4XSA9IGZyYWdtZW50QnlFbmRbZW5kSW5kZXhdID0ge3N0YXJ0OiBzdGFydEluZGV4LCBlbmQ6IGVuZEluZGV4LCByaW5nOiBbc3RhcnQsIGVuZF19OwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQoKICAgICAgZnVuY3Rpb24gaW5kZXgocG9pbnQpIHsKICAgICAgICByZXR1cm4gcG9pbnRbMF0gKiAyICsgcG9pbnRbMV0gKiAoZHggKyAxKSAqIDQ7CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIHNtb290aExpbmVhcihyaW5nLCB2YWx1ZXMsIHZhbHVlKSB7CiAgICAgICAgcmluZy5mb3JFYWNoKGZ1bmN0aW9uKHBvaW50KSB7CiAgICAgICAgICB2YXIgeCA9IHBvaW50WzBdLAogICAgICAgICAgICAgIHkgPSBwb2ludFsxXSwKICAgICAgICAgICAgICB4dCA9IHggfCAwLAogICAgICAgICAgICAgIHl0ID0geSB8IDAsCiAgICAgICAgICAgICAgdjAsCiAgICAgICAgICAgICAgdjEgPSB2YWx1ZXNbeXQgKiBkeCArIHh0XTsKICAgICAgICAgIGlmICh4ID4gMCAmJiB4IDwgZHggJiYgeHQgPT09IHgpIHsKICAgICAgICAgICAgdjAgPSB2YWx1ZXNbeXQgKiBkeCArIHh0IC0gMV07CiAgICAgICAgICAgIHBvaW50WzBdID0geCArICh2YWx1ZSAtIHYwKSAvICh2MSAtIHYwKSAtIDAuNTsKICAgICAgICAgIH0KICAgICAgICAgIGlmICh5ID4gMCAmJiB5IDwgZHkgJiYgeXQgPT09IHkpIHsKICAgICAgICAgICAgdjAgPSB2YWx1ZXNbKHl0IC0gMSkgKiBkeCArIHh0XTsKICAgICAgICAgICAgcG9pbnRbMV0gPSB5ICsgKHZhbHVlIC0gdjApIC8gKHYxIC0gdjApIC0gMC41OwogICAgICAgICAgfQogICAgICAgIH0pOwogICAgICB9CgogICAgICBjb250b3Vycy5jb250b3VyID0gY29udG91cjsKCiAgICAgIGNvbnRvdXJzLnNpemUgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSByZXR1cm4gW2R4LCBkeV07CiAgICAgICAgdmFyIF8wID0gTWF0aC5jZWlsKF9bMF0pLCBfMSA9IE1hdGguY2VpbChfWzFdKTsKICAgICAgICBpZiAoIShfMCA+IDApIHx8ICEoXzEgPiAwKSkgdGhyb3cgbmV3IEVycm9yKCJpbnZhbGlkIHNpemUiKTsKICAgICAgICByZXR1cm4gZHggPSBfMCwgZHkgPSBfMSwgY29udG91cnM7CiAgICAgIH07CgogICAgICBjb250b3Vycy50aHJlc2hvbGRzID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHRocmVzaG9sZCA9IHR5cGVvZiBfID09PSAiZnVuY3Rpb24iID8gXyA6IEFycmF5LmlzQXJyYXkoXykgPyBjb25zdGFudCQ2KHNsaWNlJDMuY2FsbChfKSkgOiBjb25zdGFudCQ2KF8pLCBjb250b3VycykgOiB0aHJlc2hvbGQ7CiAgICAgIH07CgogICAgICBjb250b3Vycy5zbW9vdGggPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoc21vb3RoID0gXyA/IHNtb290aExpbmVhciA6IG5vb3AkMSwgY29udG91cnMpIDogc21vb3RoID09PSBzbW9vdGhMaW5lYXI7CiAgICAgIH07CgogICAgICByZXR1cm4gY29udG91cnM7CiAgICB9CgogICAgLy8gVE9ETyBPcHRpbWl6ZSBlZGdlIGNhc2VzLgogICAgLy8gVE9ETyBPcHRpbWl6ZSBpbmRleCBjYWxjdWxhdGlvbi4KICAgIC8vIFRPRE8gT3B0aW1pemUgYXJndW1lbnRzLgogICAgZnVuY3Rpb24gYmx1clgoc291cmNlLCB0YXJnZXQsIHIpIHsKICAgICAgdmFyIG4gPSBzb3VyY2Uud2lkdGgsCiAgICAgICAgICBtID0gc291cmNlLmhlaWdodCwKICAgICAgICAgIHcgPSAociA8PCAxKSArIDE7CiAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgbTsgKytqKSB7CiAgICAgICAgZm9yICh2YXIgaSA9IDAsIHNyID0gMDsgaSA8IG4gKyByOyArK2kpIHsKICAgICAgICAgIGlmIChpIDwgbikgewogICAgICAgICAgICBzciArPSBzb3VyY2UuZGF0YVtpICsgaiAqIG5dOwogICAgICAgICAgfQogICAgICAgICAgaWYgKGkgPj0gcikgewogICAgICAgICAgICBpZiAoaSA+PSB3KSB7CiAgICAgICAgICAgICAgc3IgLT0gc291cmNlLmRhdGFbaSAtIHcgKyBqICogbl07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGFyZ2V0LmRhdGFbaSAtIHIgKyBqICogbl0gPSBzciAvIE1hdGgubWluKGkgKyAxLCBuIC0gMSArIHcgLSBpLCB3KTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KCiAgICAvLyBUT0RPIE9wdGltaXplIGVkZ2UgY2FzZXMuCiAgICAvLyBUT0RPIE9wdGltaXplIGluZGV4IGNhbGN1bGF0aW9uLgogICAgLy8gVE9ETyBPcHRpbWl6ZSBhcmd1bWVudHMuCiAgICBmdW5jdGlvbiBibHVyWShzb3VyY2UsIHRhcmdldCwgcikgewogICAgICB2YXIgbiA9IHNvdXJjZS53aWR0aCwKICAgICAgICAgIG0gPSBzb3VyY2UuaGVpZ2h0LAogICAgICAgICAgdyA9IChyIDw8IDEpICsgMTsKICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBuOyArK2kpIHsKICAgICAgICBmb3IgKHZhciBqID0gMCwgc3IgPSAwOyBqIDwgbSArIHI7ICsraikgewogICAgICAgICAgaWYgKGogPCBtKSB7CiAgICAgICAgICAgIHNyICs9IHNvdXJjZS5kYXRhW2kgKyBqICogbl07CiAgICAgICAgICB9CiAgICAgICAgICBpZiAoaiA+PSByKSB7CiAgICAgICAgICAgIGlmIChqID49IHcpIHsKICAgICAgICAgICAgICBzciAtPSBzb3VyY2UuZGF0YVtpICsgKGogLSB3KSAqIG5dOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRhcmdldC5kYXRhW2kgKyAoaiAtIHIpICogbl0gPSBzciAvIE1hdGgubWluKGogKyAxLCBtIC0gMSArIHcgLSBqLCB3KTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiBkZWZhdWx0WChkKSB7CiAgICAgIHJldHVybiBkWzBdOwogICAgfQoKICAgIGZ1bmN0aW9uIGRlZmF1bHRZKGQpIHsKICAgICAgcmV0dXJuIGRbMV07CiAgICB9CgogICAgZnVuY3Rpb24gZGVmYXVsdFdlaWdodCgpIHsKICAgICAgcmV0dXJuIDE7CiAgICB9CgogICAgZnVuY3Rpb24gZGVuc2l0eSgpIHsKICAgICAgdmFyIHggPSBkZWZhdWx0WCwKICAgICAgICAgIHkgPSBkZWZhdWx0WSwKICAgICAgICAgIHdlaWdodCA9IGRlZmF1bHRXZWlnaHQsCiAgICAgICAgICBkeCA9IDk2MCwKICAgICAgICAgIGR5ID0gNTAwLAogICAgICAgICAgciA9IDIwLCAvLyBibHVyIHJhZGl1cwogICAgICAgICAgayA9IDIsIC8vIGxvZzIoZ3JpZCBjZWxsIHNpemUpCiAgICAgICAgICBvID0gciAqIDMsIC8vIGdyaWQgb2Zmc2V0LCB0byBwYWQgZm9yIGJsdXIKICAgICAgICAgIG4gPSAoZHggKyBvIC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yAvLyBEZW5zaXR5IGluIHBvaW50cyBwZXIgc3F1YXJlIHBpeGVsLgogICAgICAgIGdlb21ldHJ5LmNvb3JkaW5hdGVzLmZvckVhY2godHJhbnNmb3JtUG9seWdvbik7CiAgICAgICAgcmV0dXJuIGdlb21ldHJ5OwogICAgICB9CgogICAgICBmdW5jdGlvbiB0cmFuc2Zvcm1Qb2x5Z29uKGNvb3JkaW5hdGVzKSB7CiAgICAgICAgY29vcmRpbmF0ZXMuZm9yRWFjaCh0cmFuc2Zvcm1SaW5nKTsKICAgICAgfQoKICAgICAgZnVuY3Rpb24gdHJhbnNmb3JtUmluZyhjb29yZGluYXRlcykgewogICAgICAgIGNvb3JkaW5hdGVzLmZvckVhY2godHJhbnNmb3JtUG9pbnQpOwogICAgICB9CgogICAgICAvLyBUT0RPIE9wdGltaXplLgogICAgICBmdW5jdGlvbiB0cmFuc2Zvcm1Qb2ludChjb29yZGluYXRlcykgewogICAgICAgIGNvb3JkaW5hdGVzWzBdID0gY29vcmRpbmF0ZXNbMF0gKiBNYXRoLnBvdygyLCBrKSAtIG87CiAgICAgICAgY29vcmRpbmF0ZXNbMV0gPSBjb29yZGluYXRlc1sxXSAqIE1hdGgucG93KDIsIGspIC0gbzsKICAgICAgfQoKICAgICAgZnVuY3Rpb24gcmVzaXplKCkgewogICAgICAgIG8gPSByICogMzsKICAgICAgICBuID0gKGR4ICsgbyAqIDIpID4+IGs7CiAgICAgICAgbSA9IChkeSArIG8gKiAyKSA+PiBrOwogICAgICAgIHJldHVybiBkZW5zaXR5OwogICAgICB9CgogICAgICBkZW5zaXR5LnggPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoeCA9IHR5cGVvZiBfID09PSAiZnVuY3Rpb24iID8gXyA6IGNvbnN0YW50JDYoK18pLCBkZW5zaXR5KSA6IHg7CiAgICAgIH07CgogICAgICBkZW5zaXR5LnkgPSBmdW5jdGlvbihfKSB7CiAgICAgICA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W51dGVzID0gZGF0ZS5nZXRVVENNaW51dGVzKCksCiAgICAgICAgICBzZWNvbmRzID0gZGF0ZS5nZXRVVENTZWNvbmRzKCksCiAgICAgICAgICBtaWxsaXNlY29uZHMgPSBkYXRlLmdldFVUQ01pbGxpc2Vjb25kcygpOwogICAgICByZXR1cm4gaXNOYU4oZGF0ZSkgPyAiSW52YWxpZCBEYXRlIgogICAgICAgICAgOiBmb3JtYXRZZWFyKGRhdGUuZ2V0VVRDRnVsbFllYXIoKSkgKyAiLSIgKyBwYWQoZGF0ZS5nZXRVVENNb250aCgpICsgMSwgMikgKyAiLSIgKyBwYWQoZGF0ZS5nZXRVVENEYXRlKCksIDIpCiAgICAgICAgICArIChtaWxsaXNlY29uZHMgPyAiVCIgKyBwYWQoaG91cnMsIDIpICsgIjoiICsgcGFkKG1pbnV0ZXMsIDIpICsgIjoiICsgcGFkKHNlY29uZHMsIDIpICsgIi4iICsgcGFkKG1pbGxpc2Vjb25kcywgMykgKyAiWiIKICAgICAgICAgIDogc2Vjb25kcyA/ICJUIiArIHBhZChob3VycywgMikgKyAiOiIgKyBwYWQobWludXRlcywgMikgKyAiOiIgKyBwYWQoc2Vjb25kcywgMikgKyAiWiIKICAgICAgICAgIDogbWludXRlcyB8fCBob3VycyA/ICJUIiArIHBhZChob3VycywgMikgKyAiOiIgKyBwYWQobWludXRlcywgMikgKyAiWiIKICAgICAgICAgIDogIiIpOwogICAgfQoKICAgIGZ1bmN0aW9uIGRzdkZvcm1hdChkZWxpbWl0ZXIpIHsKICAgICAgdmFyIHJlRm9ybWF0ID0gbmV3IFJlZ0V4cCgiW1wiIiArIGRlbGltaXRlciArICJcblxyXSIpLAogICAgICAgICAgREVMSU1JVEVSID0gZGVsaW1pdGVyLmNoYXJDb2RlQXQoMCk7CgogICAgICBmdW5jdGlvbiBwYXJzZSh0ZXh0LCBmKSB7CiAgICAgICAgdmFyIGNvbnZlcnQsIGNvbHVtbnMsIHJvd3MgPSBwYXJzZVJvd3ModGV4dCwgZnVuY3Rpb24ocm93LCBpKSB7CiAgICAgICAgICBpZiAoY29udmVydCkgcmV0dXJuIGNvbnZlcnQocm93LCBpIC0gMSk7CiAgICAgICAgICBjb2x1bW5zID0gcm93LCBjb252ZXJ0ID0gZiA/IGN1c3RvbUNvbnZlcnRlcihyb3csIGYpIDogb2JqZWN0Q29udmVydGVyKHJvdyk7CiAgICAgICAgfSk7CiAgICAgICAgcm93cy5jb2x1bW5zID0gY29sdW1ucyB8fCBbXTsKICAgICAgICByZXR1cm4gcm93czsKICAgICAgfQoKICAgICAgZnVuY3Rpb24gcGFyc2VSb3dzKHRleHQsIGYpIHsKICAgICAgICB2YXIgcm93cyA9IFtdLCAvLyBvdXRwdXQgcm93cwogICAgICAgICAgICBOID0gdGV4dC5sZW5ndGgsCiAgICAgICAgICAgIEkgPSAwLCAvLyBjdXJyZW50IGNoYXJhY3RlciBpbmRleAogICAgICAgICAgICBuID0gMCwgLy8gY3VycmVudCBsaW5lIG51bWJlcgogICAgICAgICAgICB0LCAvLyBjdXJyZW50IHRva2VuCiAgICAgICAgICAgIGVvZiA9IE4gPD0gMCwgLy8gY3VycmVudCB0b2tlbiBmb2xsb3dlZCBieSBFT0Y/CiAgICAgICAgICAgIGVvbCA9IGZhbHNlOyAvLyBjdXJyZW50IHRva2VuIGZvbGxvd2VkIGJ5IEVPTD8KCiAgICAgICAgLy8gU3RyaXAgdGhlIHRyYWlsaW5nIG5ld2xpbmUuCiAgICAgICAgaWYgKHRleHQuY2hhckNvZGVBdChOIC0gMSkgPT09IE5FV0xJTkUpIC0tTjsKICAgICAgICBpZiAodGV4dC5jaGFyQ29kZUF0KE4gLSAxKSA9PT0gUkVUVVJOKSAtLU47CgogICAgICAgIGZ1bmN0aW9uIHRva2VuKCkgewogICAgICAgICAgaWYgKGVvZikgcmV0dXJuIEVPRjsKICAgICAgICAgIGlmIChlb2wpIHJldHVybiBlb2wgPSBmYWxzZSwgRU9MOwoKICAgICAgICAgIC8vIFVuZXNjYX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LgogICAgICAgICAgcmV0dXJuIGVvZiA9IHRydWUsIHRleHQuc2xpY2UoaiwgTik7CiAgICAgICAgfQoKICAgICAgICB3aGlsZSAoKHQgPSB0b2tlbigpKSAhPT0gRU9GKSB7CiAgICAgICAgICB2YXIgcm93ID0gW107CiAgICAgICAgICB3aGlsZSAodCAhPT0gRU9MICYmIHQgIT09IEVPRikgcm93LnB1c2godCksIHQgPSB0b2tlbigpOwogICAgICAgICAgaWYgKGYgJiYgKHJvdyA9IGYocm93LCBuKyspKSA9PSBudWxsKSBjb250aW51ZTsKICAgICAgICAgIHJvd3MucHVzaChyb3cpOwogICAgICAgIH0KCiAgICAgICAgcmV0dXJuIHJvd3M7CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIHByZWZvcm1hdEJvZHkocm93cywgY29sdW1ucykgewogICAgICAgIHJldHVybiByb3dzLm1hcChmdW5jdGlvbihyb3cpIHsKICAgICAgICAgIHJldHVybiBjb2x1bW5zLm1hcChmdW5jdGlvbihjb2x1bW4pIHsKICAgICAgICAgICAgcmV0dXJuIGZvcm1hdFZhbHVlKHJvd1tjb2x1bW5dKTsKICAgICAgICAgIH0pLmpvaW4oZGVsaW1pdGVyKTsKICAgICAgICB9KTsKICAgICAgfQoKICAgICAgZnVuY3Rpb24gZm9ybWF0KHJvd3MsIGNvbHVtbnMpIHsKICAgICAgICBpZiAoY29sdW1ucyA9PSBudWxsKSBjb2x1bW5zID0gaW5mZXJDb2x1bW5zKHJvd3MpOwogICAgICAgIHJldHVybiBbY29sdW1ucy5tYXAoZm9ybWF0VmFsdWUpLmpvaW4oZGVsaW1pdGVyKV0uY29uY2F0KHByZWZvcm1hdEJvZHkocm93cywgY29sdW1ucykpLmpvaW4oIlxuIik7CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIGZvcm1hdEJvZHkocm93cywgY29sdW1ucykgewogICAgICAgIGlmIChjb2x1bW5zID09IG51bGwpIGNvbHVtbnMgPSBpbmZlckNvbHVtbnMocm93cyk7CiAgICAgICAgcmV0dXJuIHByZWZvcm1hdEJvZHkocm93cywgY29sdW1ucykuam9pbigiXG4iKTsKICAgICAgfQoKICAgICAgZnVuY3Rpb24gZm9ybWF0Um93cyhyb3dzKSB7CiAgICAgICAgcmV0dXJuIHJvd3MubWFwKGZvcm1hdFJvdykuam9pbigiXG4iKTsKICAgICAgfQoKICAgICAgZnVuY3Rpb24gZm9ybWF0Um93KHJvdykgewogICAgICAgIHJldHVybiByb3cubWFwKGZvcm1hdFZhbHVlKS5qb2luKGRlbGltaXRlcik7CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIGZvcm1hdFZhbHVlKHZhbHVlKSB7CiAgICAgICAgcmV0dXJuIHZhbHVlID09IG51bGwgPyAiIgogICAgICAgICAgICA6IHZhbHVlIGluc3RhbmNlb2YgRGF0ZSA/IGZvcm1hdERhdGUodmFsdWUpCiAgICAgICAgICAgIDogcmVGb3JtYXQudGVzdCh2YWx1ZSArPSAiIikgPyAiXCIiICsgdmFsdWUucmVwbGFjZSgvIi9nLCAiXCJcIiIpICsgIlwiIgogICAgICAgICAgICA6IHZhbHVlOwogICAgICB9CgogICAgICByZXR1cm4gewogICAgICAgIHBhcnNlOiBwYXJzZSwKICAgICAgICBwYXJzZVJvd3M6IHBhcnNlUm93cywKICAgICAgICBmb3JtYXQ6IGZvcm1hdCwKICAgICAgICBmb3JtYXRCb2R5OiBmb3JtYXRCb2R5LAogICAgICAgIGZvcm1hdFJvd3M6IGZvcm1hdFJvd3MsCiAgICAgICAgZm9ybWF0Um93OiBmb3JtYXRSb3csCiAgICAgICAgZm9ybWF0VmFsdWU6IGZvcm1hdFZhbHVlCiAgICAgIH07CiAgICB9CgogICAgdmFyIGNzdiA9IGRzdkZvcm1hdCgiLCIpOwoKICAgIHZhciBjc3ZQYXJzZSA9IGNzdi5wYXJzZTsKICAgIHZhciBjc3ZQYXJzZVJvd3MgPSBjc3YucGFyc2VSb3dzOwogICAgdmFyIGNzdkZvcm1hdCA9IGNzdi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QoKICAgIGZ1bmN0aW9uIGpzb24oaW5wdXQsIGluaXQpIHsKICAgICAgcmV0dXJuIGZldGNoKGlucHV0LCBpbml0KS50aGVuKHJlc3BvbnNlSnNvbik7CiAgICB9CgogICAgZnVuY3Rpb24gcGFyc2VyKHR5cGUpIHsKICAgICAgcmV0dXJuIGZ1bmN0aW9uKGlucHV0LCBpbml0KSAgewogICAgICAgIHJldHVybiB0ZXh0KGlucHV0LCBpbml0KS50aGVuKGZ1bmN0aW9uKHRleHQpIHsKICAgICAgICAgIHJldHVybiAobmV3IERPTVBhcnNlcikucGFyc2VGcm9tU3RyaW5nKHRleHQsIHR5cGUpOwogICAgICAgIH0pOwogICAgICB9OwogICAgfQoKICAgIHZhciB4bWwgPSBwYXJzZXIoImFwcGxpY2F0aW9uL3htbCIpOwoKICAgIHZhciBodG1sJDEgPSBwYXJzZXIoInRleHQvaHRtbCIpOwoKICAgIHZhciBzdmcgPSBwYXJzZXIoImltYWdlL3N2Zyt4bWwiKTsKCiAgICBmdW5jdGlvbiBjZW50ZXIkMSh4LCB5KSB7CiAgICAgIHZhciBub2RlczsKCiAgICAgIGlmICh4ID09IG51bGwpIHggPSAwOwogICAgICBpZiAoeSA9PSBudWxsKSB5ID0gMDsKCiAgICAgIGZ1bmN0aW9uIGZvcmNlKCkgewogICAgICAgIHZhciBpLAogICAgICAgICAgICBuID0gbm9kZXMubGVuZ3RoLAogICAgICAgICAgICBub2RlLAogICAgICAgICAgICBzeCA9IDAsCiAgICAgICAgICAgIHN5ID0gMDsKCiAgICAgICAgZm9yIChpID0gMDsgaSA8IG47ICsraSkgewogICAgICAgICAgbm9kZSA9IG5vZGVzW2ldLCBzeCArPSBub2RlLngsIHN5ICs9IG5vZGUueTsKICAgICAgICB9CgogICAgICAgIGZvciAoc3ggPSBzeCAvIG4gLSB4LCBzeSA9IHN5IC8gbiAtIHksIGkgPSAwOyBpIDwgbjsgKytpKSB7CiAgICAgICAgICBub2RlID0gbm9kZXNbaV0sIG5vZGUueCAtPSBzeCwgbm9kZS55IC09IHN5OwogICAgICAgIH0KICAgICAgfQoKICAgICAgZm9yY2UuaW5pdGlhbGl6ZSA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICBub2RlcyA9IF87CiAgICAgIH07CgogICAgICBmb3JjZS54ID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHggPSArXywgZm9yY2UpIDogeDsKICAgICAgfTsKCiAgICAgIGZvcmNlLnkgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoeSA9ICtfLCBmb3JjZSkgOiB5OwogICAgICB9OwoKICAgICAgcmV0dXJuIGZvcmNlOwogICAgfQoKICAgIGZ1bmN0aW9uIGNvbnN0YW50JDcoeCkgewogICAgICByZXR1cm4gZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuIHg7CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gamlnZ2xlKCkgewogICAgICByZXR1cm4gKE1hdGgucmFuZG9tKCkgLSAwLjUpICogMWUtNjsKICAgIH0KCiAgICBmdW5jdGlvbiB0cmVlX2FkZChkKSB7CiAgICAgIHZhciB4ID0gK3RoaXMuX3guY2FsbChudWxsLCBkKSwKICAgICAgICAgIHkgPSArdGhpcy5feS5jYWxsKG51bGwsIGQpOwogICAgICByZXR1cm4gYWRkKHRoaXMuY292ZXIoeCwgeSksIHgsIHksIGQpOwogICAgfQoKICAgIGZ1bmN0aW9uIGFkZCh0cmVlLCB4LCB5LCBkKSB7CiAgICAgIGlmIChpc05hTih4KSB8fCBpc05hTih5KSkgcmV0dXJuIHRyZWU7IC8vIGlnbm9yZSBpbnZhbGlkIHBvaW50cwoKICAgICAgdmFyIHBhcmVudCwKICAgICAgICAgIG5vZGUgPSB0cmVlLl9yb290LAogICAgICAgICAgbGVhZiA9IHtkYXRhOiBkfSwKICAgICAgICAgIHgwID0gdHJlZS5feDAsCiAgICAgICAgICB5MCA9IHRyZWUuX3kwLAogICAgICAgICAgeDEgPSB0cmVlLl94MSwKICAgICAgICAgIHkxID0gdHJlZS5feTEsCiAgICAgICAgICB4bSwKICAgICAgICAgIHltLAogICAgICAgICAgeHAsCiAgICAgICAgICB5cCwKICAgICAgICAgIHJpZ2h0LAogICAgICAgICAgYm90dG9tLAogICAgICAgICAgaSwKICAgICAgICAgIGo7CgogICAgICAvLyBJZiB0aGUgdHJlZSBpcyBlbXB0eSwgaW5pdGlhbGl6ZSB0aGUgcm9vdCBhcyBhIGxlYWYuCiAgICAgIGlmICghbm9kZSkgcmV0dXJuIHRyZWUuX3Jvb3QgPSBsZWFmLCB0cmVlOwoKICAgICAgLy8gRmluZCB0aGUgZXhpc3RpbmcgbGVhZiBmb3IgdGhlIG5ldyBwb2ludCwgb3IgYWRkIGl0LgogICAgICB3aGlsZSAobm9kZS5sZW5ndGgpIHsKICAgICAgICBpZiAocmlnaHQgPSB4ID49ICh4bSA9ICh4MCArIHgxKSAvIDIpKSB4MCA9IHhtOyBlbHNlIHgxID0geG07CiAgICAgICAgaWYgKGJvdHRvbSA9IHkgPj0gKHltID0gKHkwICsgeTEpIC8gMikpIHkwID0geW07IGVsc2UgeTEgPSB5bTsKICAgICAgICBpZiAocGFyZW50ID0gbm9kZSwgIShub2RlID0gbm9kZVtpID0gYm90dG9tIDw8IDEgfCByaWdodF0pKSByZXR1cm4gcGFyZW50W2ldID0gbGVhZiwgdHJlZTsKICAgICAgfQoKICAgICAgLy8gSXMgdGhlIG5ldyBwb2ludCBpcyBleGFjdGx5IGNvaW5jaWRlbnQgd2l0aCB0aGUgZXhpc3RpbmcgcG9pbnQ/CiAgICAgIHhwID0gK3RyZWUuX3guY2FsbChudWxsLCBub2RlLmRhdGEpOwogICAgICB5cCA9ICt0cmVlLl95LmNhbGwobnVsbCwgbm9kZS5kYXRhKTsKICAgICAgaWYgKHggPT09IHhwICYmIHkgPT09IHlwKSByZXR1cm4gbGVhZi5uZXh0ID0gbm9kZSwgcGFyZW50ID8gcGFyZW50W2ldID0gbGVhZiA6IHRyZWUuX3Jvb3QgPSBsZWFmLCB0cmVlOwoKICAgICAgLy8gT3RoZXJ3aXNlLCBzcGxpdCB0aGUgbGVhZiBub2RlIHVudGlsIHRoZSBvbGQgYW5kIG5ldyBwb2ludCBhcmUgc2VwYXJhdGVkLgogICAgICBkbyB7CiAgICAgICAgcGFyZW50ID0gcGFyZW50ID8gcGFyZW50W2ldID0gbmV3IEFycmF5KDQpIDogdHJlZS5fcm9vdCA9IG5ldyBBcnJheSg0KTsKICAgICAgICBpZiAocmlnaHQgPSB4ID49ICh4bSA9ICh4MCArIHgxKSAvIDIpKSB4MCA9IHhtOyBlbHNlIHgxID0geG07CiAgICAgICAgaWYgKGJvdHRvbSA9IHkgPj0gKHltID0gKHkwICsgeTEpIC8gMikpIHkwID0geW07IGVsc2UgeTEgPSB5bTsKICAgICAgfSB3aGlsZSAoKGkgPSBib3R0b20gPDwgMSB8IHJpZ2h0KSA9PT0gKGogPSAoeXAgPj0geW0pIDw8IDEgfCAoeHAgPj0geG0pKSk7CiAgICAgIHJldHVybiBwYXJlbnRbal0gPSBub2RlLCBwYXJlbnRbaV0gPSBsZWFmLCB0cmVlOwogICAgfQoKICAgIGZ1bmN0aW9uIGFkZEFsbChkYXRhKSB7CiAgICAgIHZhciBkLCBpLCBuID0gZGF0YS5sZW5ndGgsCiAgICAgICAgICB4LAogICAgICAgICAgeSwKICAgICAgICAgIHh6ID0gbmV3IEFycmF5KG4pLAogICAgICAgICAgeXogPSBuZXcgQXJyYXkobiksCiAgICAgICAgICB4MCA9IEluZmluaXR5LAogICAgICAgICAgeTAgPSBJbmZpbml0eSwKICAgICAgICAgIHgxID0gLUluZmluaXR5LAogICAgICAgICAgeTEgPSAtSW5maW5pdHk7CgogICAgICAvLyBDb21wdXRlIHRoZSBwb2ludHMgYW5kIHRoZWlyIGV4dGVudC4KICAgICAgZm9yIChpID0gMDsgaSA8IG47ICsraSkgewogICAgICAgIGlmIChpc05hTih4ID0gK3RoaXMuX3guY2FsbChudWxsLCBkID0gZGF0YVtpXSkpIHx8IGlzTmFOKHkgPSArdGhpcy5feS5jYWxsKG51bGwsIGQpKSkgY29udGludWU7CiAgICAgICAgeHpbaV0gPSB4OwogICAgICAgIHl6W2ldID0geTsKICAgICAgICBpZiAoeCA8IHgwKSB4MCA9IHg7CiAgICAgICAgaWYgKHggPiB4MSkgeDEgPSB4OwogICAgICAgIGlmICh5IDwgeTApIHkwID0geTsKICAgICAgICBpZiAoeSA+IHkxKSB5MSA9IHk7CiAgICAgIH0KCiAgICAgIC8vIElmIHRoZXJlIHdlcmUgbm8gKHZhbGlkKSBwb2ludHMsIGFib3J0LgogICAgICBpZiAoeDAgPiB4MSB8fCB5MCA+IHkxKSByZXR1cm4gdGhpczsKCiAgICAgIC8vIEV4cGFuZCB0aGUgdHJlZSB0byBjb3ZlciB0aGUgbmV3IHBvaW50cy4KICAgICAgdGhpcy5jb3Zlcih4MCwgeTApLmNvdmVyKHgxLCB5MSk7CgogICAgICAvLyBBZGQgdGhlIG5ldyBwb2ludHMuCiAgICAgIGZvciAoaSA9IDA7IGkgPCBuOyArK2kpIHsKICAgICAgICBhZGQodGhpcywgeHpbaV0sIHl6W2ldLCBkYXRhW2ldKTsKICAgICAgfQoKICAgICAgcmV0dXJuIHRoaXM7CiAgICB9CgogICAgZnVuY3Rpb24gdHJlZV9jb3Zlcih4LCB5KSB7CiAgICAgIGlmIChpc05hTih4ID0gK3gpIHx8IGlzTmFOKHkgPSAreSkpIHJldHVybiB0aGlzOyAvLyBpZ25vcmUgaW52YWxpZCBwb2ludHMKCiAgICAgIHZhciB4MCA9IHRoaXMuX3gwLAogICAgICAgICAgeTAgPSB0aGlzLl95MCwKICAgICAgICAgIHgxID0gdGhpcy5feDEsCiAgICAgICAgICB5MSA9IHRoaXMuX3kxOwoKICAgICAgLy8gSWYgdGhlIHF1YWR0cmVlIGhhcyBubyBleHRlbnQsIGluaXRpYWxpemUgdGhlbS4KICAgICAgLy8gSW50ZWdlciBleHRlbnQgYXJlIG5lY2Vzc2FyeSBzbyB0aGF0IGlmIHdlIGxhdGVyIGRvdWJsZSB0aGUgZXh0ZW50LAogICAgICAvLyB0aGUgZXhpc3RpbmcgcXVhZHJhbnQgYm91bmRhcmllcyBkb27igJl0IGNoYW5nZSBkdWUgdG8gZmxvYXRpbmcgcG9pbnQgZXJyb3IhCiAgICAgIGlmIChpc05hTih4MCkpIHsKICAgICAgICB4MSA9ICh4MCA9IE1hdGguZmxvb3IoeCkpICsgMTsKICAgICAgICB5MSA9ICh5MCA9IE1hdGguZmxvb3IoeSkpICsgMTsKICAgICAgfQoKICAgICAgLy8gT3RoZXJ3aXNlLCBkb3VibGUgcmVwZWF0ZWRseSB0byBjb3Zlci4KICAgICAgZWxzZSB7CiAgICAgICAgdmFyIHogPSB4MSAtIHgwLAogICAgICAgICAgICBub2RlID0gdGhpcy5fcm9vdCwKICAgICAgICAgICAgcGFyZW50LAogICAgICAgICAgICBpOwoKICAgICAgICB3aGlsZSAoeDAgPiB4IHx8IHggPj0geDEgfHwgeTAgPiB5IHx8IHkgPj0geTEpIHsKICAgICAgICAgIGkgPSAoeSA8IHkwKSA8PCAxIHwgKHggPCB4MCk7CiAgICAgICAgICBwYXJlbnQgPSBuZXcgQXJyYXkoNCksIHBhcmVudFtpXSA9IG5vZGUsIG5vZGUgPSBwYXJlbnQsIHogKj0gMjsKICAgICAgICAgIHN3aXRjaCAoaSkgewogICAgICAgICAgICBjYXNlIDA6IHgxID0geDAgKyB6LCB5MSA9IHkwICsgejsgYnJlYWs7CiAgICAgICAgICAgIGNhc2UgMTogeDAgPSB4MSAtIHosIHkxID0geTAgKyB6OyBicmVhazsKICAgICAgICAgICAgY2FzZSAyOiB4MSA9IHgwICsgeiwgeTAgPSB5MSAtIHo7IGJyZWFrOwogICAgICAgICAgICBjYXNlIDM6IHgwID0geDEgLSB6LCB5MCA9IHkxIC0gejsgYnJlYWs7CiAgIC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0aGlzLl94MCwKICAgICAgICAgIHkwID0gdGhpcy5feTAsCiAgICAgICAgICB4MSwKICAgICAgICAgIHkxLAogICAgICAgICAgeDIsCiAgICAgICAgICB5MiwKICAgICAgICAgIHgzID0gdGhpcy5feDEsCiAgICAgICAgICB5MyA9IHRoaXMuX3kxLAogICAgICAgICAgcXVhZHMgPSBbXSwKICAgICAgICAgIG5vZGUgPSB0aGlzLl9yb290LAogICAgICAgICAgcSwKICAgICAgICAgIGk7CgogICAgICBpZiAobm9kZSkgcXVhZHMucHVzaChuZXcgUXVhZChub2RlLCB4MCwgeTAsIHgzLCB5MykpOwogICAgICBpZiAocmFkaXVzID09IG51bGwpIHJhZGl1cyA9IEluZmluaXR5OwogICAgICBlbHNlIHsKICAgICAgICB4MCA9IHggLSByYWRpdXMsIHkwID0geSAtIHJhZGl1czsKICAgICAgICB4MyA9IHggKyByYWRpdXMsIHkzID0geSArIHJhZGl1czsKICAgICAgICByYWRpdXMgKj0gcmFkaXVzOwogICAgICB9CgogICAgICB3aGlsZSAocSA9IHF1YWRzLnBvcCgpKSB7CgogICAgICAgIC8vIFN0b3Agc2VhcmNoaW5nIGlmIHRoaXMgcXVhZHJhbnQgY2Fu4oCZdCBjb250YWluIGEgY2xvc2VyIG5vZGUuCiAgICAgICAgaWYgKCEobm9kZSA9IHEubm9kZSkKICAgICAgICAgICAgfHwgKHgxID0gcS54MCkgPiB4MwogICAgICAgICAgICB8fCAoeTEgPSBxLnkwKSA+IHkzCiAgICAgICAgICAgIHx8ICh4MiA9IHEueDEpIDwgeDAKICAgICAgICAgICAgfHwgKHkyID0gcS55MSkgPCB5MCkgY29udGludWU7CgogICAgICAgIC8vIEJpc2VjdCB0aGUgY3VycmVudCBxdWFkcmFudC4KICAgICAgICBpZiAobm9kZS5sZW5ndGgpIHsKICAgICAgICAgIHZhciB4bSA9ICh4MSArIHgyKSAvIDIsCiAgICAgICAgICAgICAgeW0gPSAoeTEgKyB5MikgLyAyOwoKICAgICAgICAgIHF1YWRzLnB1c2goCiAgICAgICAgICAgIG5ldyBRdWFkKG5vZGVbM10sIHhtLCB5bSwgeDIsIHkyKSwKICAgICAgICAgICAgbmV3IFF1YWQobm9kZVsyXSwgeDEsIHltLCB4bSwgeTIpLAogICAgICAgICAgICBuZXcgUXVhZChub2RlWzFdLCB4bSwgeTEsIHgyLCB5bSksCiAgICAgICAgICAgIG5ldyBRdWFkKG5vZGVbMF0sIHgxLCB5MSwgeG0sIHltKQogICAgICAgICAgKTsKCiAgICAgICAgICAvLyBWaXNpdCB0aGUgY2xvc2VzdCBxdWFkcmFudCBmaXJzdC4KICAgICAgICAgIGlmIChpID0gKHkgPj0geW0pIDw8IDEgfCAoeCA+PSB4bSkpIHsKICAgICAgICAgICAgcSA9IHF1YWRzW3F1YWRzLmxlbmd0aCAtIDFdOwogICAgICAgICAgICBxdWFkc1txdWFkcy5sZW5ndGggLSAxXSA9IHF1YWRzW3F1YWRzLmxlbmd0aCAtIDEgLSBpXTsKICAgICAgICAgICAgcXVhZHNbcXVhZHMubGVuZ3RoIC0gMSAtIGldID0gcTsKICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIC8vIFZpc2l0IHRoaXMgcG9pbnQuIChWaXNpdGluZyBjb2luY2lkZW50IHBvaW50cyBpc27igJl0IG5lY2Vzc2FyeSEpCiAgICAgICAgZWxzZSB7CiAgICAgICAgICB2YXIgZHggPSB4IC0gK3RoaXMuX3guY2FsbChudWxsLCBub2RlLmRhdGEpLAogICAgICAgICAgICAgIGR5ID0geSAtICt0aGlzLl95LmNhbGwobnVsbCwgbm9kZS5kYXRhKSwKICAgICAgICAgICAgICBkMiA9IGR4ICogZHggKyBkeSAqIGR5OwogICAgICAgICAgaWYgKGQyIDwgcmFkaXVzKSB7CiAgICAgICAgICAgIHZhciBkID0gTWF0aC5zcXJ0KHJhZGl1cyA9IGQyKTsKICAgICAgICAgICAgeDAgPSB4IC0gZCwgeTAgPSB5IC0gZDsKICAgICAgICAgICAgeDMgPSB4ICsgZCwgeTMgPSB5ICsgZDsKICAgICAgICAgICAgZGF0YSA9IG5vZGUuZGF0YTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KCiAgICAgIHJldHVybiBkYXRhOwogICAgfQoKICAgIGZ1bmN0aW9uIHRyZWVfcmVtb3ZlKGQpIHsKICAgICAgaWYgKGlzTmFOKHggPSArdGhpcy5feC5jYWxsKG51bGwsIGQpKSB8fCBpc05hTih5ID0gK3RoaXMuX3kuY2FsbChudWxsLCBkKSkpIHJldHVybiB0aGlzOyAvLyBpZ25vcmUgaW52YWxpZCBwb2ludHMKCiAgICAgIHZhciBwYXJlbnQsCiAgICAgICAgICBub2RlID0gdGhpcy5fcm9vdCwKICAgICAgICAgIHJldGFpbmVyLAogICAgICAgICAgcHJldmlvdXMsCiAgICAgICAgICBuZXh0LAogICAgICAgICAgeDAgPSB0aGlzLl94MCwKICAgICAgICAgIHkwID0gdGhpcy5feTAsCiAgICAgICAgICB4MSA9IHRoaXMuX3gxLAogICAgICAgICAgeTEgPSB0aGlzLl95MSwKICAgICAgICAgIHgsCiAgICAgICAgICB5LAogICAgICAgICAgeG0sCiAgICAgICAgICB5bSwKICAgICAgICAgIHJpZ2h0LAogICAgICAgICAgYm90dG9tLAogICAgICAgICAgaSwKICAgICAgICAgIGo7CgogICAgICAvLyBJZiB0aGUgdHJlZSBpcyBlbXB0eSwgaW5pdGlhbGl6ZSB0aGUgcm9vdCBhcyBhIGxlYWYuCiAgICAgIGlmICghbm9kZSkgcmV0dXJuIHRoaXM7CgogICAgICAvLyBGaW5kIHRoZSBsZWFmIG5vZGUgZm9yIHRoZSBwb2ludC4KICAgICAgLy8gV2hpbGUgZGVzY2VuZGluZywgYWxzbyByZXRhaW4gdGhlIGRlZXBlc3QgcGFyZW50IHdpdGggYSBub24tcmVtb3ZlZCBzaWJsaW5nLgogICAgICBpZiAobm9kZS5sZW5ndGgpIHdoaWxlICh0cnVlKSB7CiAgICAgICAgaWYgKHJpZ2h0ID0geCA+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oaXMuX3gwLCB0aGlzLl95MCwgdGhpcy5feDEsIHRoaXMuX3kxKSwKICAgICAgICAgIG5vZGUgPSB0aGlzLl9yb290LAogICAgICAgICAgbm9kZXMsCiAgICAgICAgICBjaGlsZDsKCiAgICAgIGlmICghbm9kZSkgcmV0dXJuIGNvcHk7CgogICAgICBpZiAoIW5vZGUubGVuZ3RoKSByZXR1cm4gY29weS5fcm9vdCA9IGxlYWZfY29weShub2RlKSwgY29weTsKCiAgICAgIG5vZGVzID0gW3tzb3VyY2U6IG5vZGUsIHRhcmdldDogY29weS5fcm9vdCA9IG5ldyBBcnJheSg0KX1dOwogICAgICB3aGlsZSAobm9kZSA9IG5vZGVzLnBvcCgpKSB7CiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCA0OyArK2kpIHsKICAgICAgICAgIGlmIChjaGlsZCA9IG5vZGUuc291cmNlW2ldKSB7CiAgICAgICAgICAgIGlmIChjaGlsZC5sZW5ndGgpIG5vZGVzLnB1c2goe3NvdXJjZTogY2hpbGQsIHRhcmdldDogbm9kZS50YXJnZXRbaV0gPSBuZXcgQXJyYXkoNCl9KTsKICAgICAgICAgICAgZWxzZSBub2RlLnRhcmdldFtpXSA9IGxlYWZfY29weShjaGlsZCk7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CgogICAgICByZXR1cm4gY29weTsKICAgIH07CgogICAgdHJlZVByb3RvLmFkZCA9IHRyZWVfYWRkOwogICAgdHJlZVByb3RvLmFkZEFsbCA9IGFkZEFsbDsKICAgIHRyZWVQcm90by5jb3ZlciA9IHRyZWVfY292ZXI7CiAgICB0cmVlUHJvdG8uZGF0YSA9IHRyZWVfZGF0YTsKICAgIHRyZWVQcm90by5leHRlbnQgPSB0cmVlX2V4dGVudDsKICAgIHRyZWVQcm90by5maW5kID0gdHJlZV9maW5kOwogICAgdHJlZVByb3RvLnJlbW92ZSA9IHRyZWVfcmVtb3ZlOwogICAgdHJlZVByb3RvLnJlbW92ZUFsbCA9IHJlbW92ZUFsbDsKICAgIHRyZWVQcm90by5yb290ID0gdHJlZV9yb290OwogICAgdHJlZVByb3RvLnNpemUgPSB0cmVlX3NpemU7CiAgICB0cmVlUHJvdG8udmlzaXQgPSB0cmVlX3Zpc2l0OwogICAgdHJlZVByb3RvLnZpc2l0QWZ0ZXIgPSB0cmVlX3Zpc2l0QWZ0ZXI7CiAgICB0cmVlUHJvdG8ueCA9IHRyZWVfeDsKICAgIHRyZWVQcm90by55ID0gdHJlZV95OwoKICAgIGZ1bmN0aW9uIHgoZCkgewogICAgICByZXR1cm4gZC54ICsgZC52eDsKICAgIH0KCiAgICBmdW5jdGlvbiB5KGQpIHsKICAgICAgcmV0dXJuIGQueSArIGQudnk7CiAgICB9CgogICAgZnVuY3Rpb24gY29sbGlkZShyYWRpdXMpIHsKICAgICAgdmFyIG5vZGVzLAogICAgICAgICAgcmFkaWksCiAgICAgICAgICBzdHJlbmd0aCA9IDEsCiAgICAgICAgICBpdGVyYXRpb25zID0gMTsKCiAgICAgIGlmICh0eXBlb2YgcmFkaXVzICE9PSAiZnVuY3Rpb24iKSByYWRpdXMgPSBjb25zdGFudCQ3KHJhZGl1cyA9PSBudWxsID8gMSA6ICtyYWRpdXMpOwoKICAgICAgZnVuY3Rpb24gZm9yY2UoKSB7CiAgICAgICAgdmFyIGksIG4gPSBub2Rlcy5sZW5ndGgsCiAgICAgICAgICAgIHRyZWUsCiAgICAgICAgICAgIG5vZGUsCiAgICAgICAgICAgIHhpLAogICAgICAgICAgICB5aSwKICAgICAgICAgICAgcmksCiAgICAgICAgICAgIHJpMjsKCiAgICAgICAgZm9yICh2YXIgayA9IDA7IGsgPCBpdGVyYXRpb25zOyArK2spIHsKICAgICAgICAgIHRyZWUgPSBxdWFkdHJlZShub2RlcywgeCwgeSkudmlzaXRBZnRlcihwcmVwYXJlKTsKICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBuOyArK2kpIHsKICAgICAgICAgICAgbm9kZSA9IG5vZGVzW2ldOwogICAgICAgICAgICByaSA9IHJhZGlpW25vZGUuaW5kZXhdLCByaTIgPSByaSAqIHJpOwogICAgICAgICAgICB4aSA9IG5vZGUueCArIG5vZGUudng7CiAgICAgICAgICAgIHlpID0gbm9kZS55ICsgbm9kZS52eTsKICAgICAgICAgICAgdHJlZS52aXNpdChhcHBseSk7CiAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICBmdW5jdGlvbiBhcHBseShxdWFkLCB4MCwgeTAsIHgxLCB5MSkgewogICAgICAgICAgdmFyIGRhdGEgPSBxdWFkLmRhdGEsIHJqID0gcXVhZC5yLCByID0gcmkgKyByajsKICAgICAgICAgIGlmIChkYXRhKSB7CiAgICAgICAgICAgIGlmIChkYXRhLmluZGV4ID4gbm9kZS5pbmRleCkgewogICAgICAgICAgICAgIHZhciB4ID0geGkgLSBkYXRhLnggLSBkYXRhLnZ4LAogICAgICAgICAgICAgICAgICB5ID0geWkgLSBkYXRhLnkgLSBkYXRhLnZ5LAogICAgICAgICAgICAgICAgICBsID0geCAqIHggKyB5ICogeTsKICAgICAgICAgICAgICBpZiAobCA8IHIgKiByKSB7CiAgICAgICAgICAgICAgICBpZiAoeCA9PT0gMCkgeCA9IGppZ2dsZSgpLCBsICs9IHggKiB4OwogICAgICAgICAgICAgICAgaWYgKHkgPT09IDApIHkgPSBqaWdnbGUoKSwgbCArPSB5ICogeTsKICAgICAgICAgICAgICAgIGwgPSAociAtIChsID0gTWF0aC5zcXJ0KGwpKSkgLyBsICogc3RyZW5ndGg7CiAgICAgICAgICAgICAgICBub2RlLnZ4ICs9ICh4ICo9IGwpICogKHIgPSAocmogKj0gcmopIC8gKHJpMiArIHJqKSk7CiAgICAgICAgICAgICAgICBub2RlLnZ5ICs9ICh5ICo9IGwpICogcjsKICAgICAgICAgICAgICAgIGRhdGEudnggLT0geCAqIChyID0gMSAtIHIpOwogICAgICAgICAgICAgICAgZGF0YS52eSAtPSB5ICogcjsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIHgwID4geGkgKyByIHx8IHgxIDwgeGkgLSByIHx8IHkwID4geWkgKyByIHx8IHkxIDwgeWkgLSByOwogICAgICAgIH0KICAgICAgfQoKICAgICAgZnVuY3Rpb24gcHJlcGFyZShxdWFkKSB7CiAgICAgICAgaWYgKHF1YWQuZGF0YSkgcmV0dXJuIHF1YWQuciA9IHJhZGlpW3F1YWQuZGF0YS5pbmRleF07CiAgICAgICAgZm9yICh2YXIgaSA9IHF1YWQuciA9IDA7IGkgPCA0OyArK2kpIHsKICAgICAgICAgIGlmIChxdWFkW2ldICYmIHF1YWRbaV0uciA+IHF1YWQucikgewogICAgICAgICAgICBxdWFkLnIgPSBxdWFkW2ldLnI7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CgogICAgICBmdW5jdGlvbiBpbml0aWFsaXplKCkgewogICAgICAgIGlmICghbm9kZXMpIHJldHVybjsKICAgICAgICB2YXIgaSwgbiA9IG5vZGVzLmxlbmd0aCwgbm9kZTsKICAgICAgICByYWRpaSA9IG5ldyBBcnJheShuKTsKICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbjsgKytpKSBub2RlID0gbm9kZXNbaV0sIHJhZGlpW25vZGUuaW5kZXhdID0gK3JhZGl1cyhub2RlLCBpLCBub2Rlcyk7CiAgICAgIH0KCiAgICAgIGZvcmNlLmluaXRpYWxpemUgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgbm9kZXMgPSBfOwogICAgICAgIGluaXRpYWxpemUoKTsKICAgICAgfTsKCiAgICAgIGZvcmNlLml0ZXJhdGlvbnMgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoaXRlcmF0aW9ucyA9ICtfLCBmb3JjZSkgOiBpdGVyYXRpb25zOwogICAgICB9OwoKICAgICAgZm9yY2Uuc3RyZW5ndGggPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoc3RyZW5ndGggPSArXywgZm9yY2UpIDogc3RyZW5ndGg7CiAgICAgIH07CgogICAgICBmb3JjZS5yYWRpdXMgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAocmFkaXVzID0gdHlwZW9mIF8gPT09ICJmdW5jdGlvbiIgPyBfIDogY29uc3RhbnQkNygrXyksIGluaXRpYWxpemUoKSwgZm9yY2UpIDogcmFkaXVzOwogICAgICB9OwoKICAgICAgcmV0dXJuIGZvcmNlOwogICAgfQoKICAgIGZ1bmN0aW9uIGluZGV4KGQpIHsKICAgICAgcmV0dXJuIGQuaW5kZXg7CiAgICB9CgogICAgZnVuY3Rpb24gZmluZChub2RlQnlJZCwgbm9kZUlkKSB7CiAgICAgIHZhciBub2RlID0gbm9kZUJ5SWQuZ2V0KG5vZGVJZCk7CiAgICAgIGlmICghbm9kZSkgdGhyb3cgbmV3IEVycm9yKCJtaXNzaW5nOiAiICsgbm9kZUlkKTsKICAgICAgcmV0dXJuIG5vZGU7CiAgICB9CgogICAgZnVuY3Rpb24gbGluayhsaW5rcykgewogICAgICB2YXIgaWQgPSBpbmRleCwKICAgICAgICAgIHN0cmVuZ3RoID0gZGVmYXVsdFN0cmVuZ3RoLAogICAgICAgICAgc3RyZW5ndGhzLAogICAgICAgICAgZGlzdGFuY2UgPSBjb25zdGFudCQ3KDMwKSwKICAgICAgICAgIGRpc3RhbmNlcywKICAgICAgICAgIG5vZGVzLAogICAgICAgICAgY291bnQsCiAgICAgICAgICBiaWFzLAogICAgICAgICAgaXRlcmF0aW9ucyA9IDE7CgogICAgICBpZiAobGlua3MgPT0gbnVsbCkgbGlua3MgPSBbXTsKCiAgICAgIGZ1bmN0aW9uIGRlZmF1bHRTdHJlbmd0aChsaW5rKSB7CiAgICAgICAgcmV0dXJuIDEgLyBNYXRoLm1pbihjb3VudFtsaW5rLnNvdXJjZS5pbmRleF0sIGNvdW50W2xpbmsudGFyZ2V0LmluZGV4XSk7CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIGZvcmNlKGFscGhhKSB7CiAgICAgICAgZm9yICh2YXIgayA9IDAsIG4gPSBsaW5rcy5sZW5ndGg7IGsgPCBpdGVyYXRpb25zOyArK2spIHsKICAgICAgICAgIGZvciAodmFyIGkgPSAwLCBsaW5rLCBzb3VyY2UsIHRhcmdldCwgeCwgeSwgbCwgYjsgaSA8IG47ICsraSkgewogICAgICAgICAgICBsaW5rID0gbGlua3NbaV0sIHNvdXJjZSA9IGxpbmsuc291cmNlLCB0YXJnZXQgPSBsaW5rLnRhcmdldDsKICAgICAgICAgICAgeCA9IHRhcmdldC54ICsgdGFyZ2V0LnZ4IC0gc291cmNlLnggLSBzb3VyY2UudnggfHwgamlnZ2xlKCk7CiAgICAgICAgICAgIHkgPSB0YXJnZXQueSArIHRhcmdldC52eSAtIHNvdXJjZS55IC0gc291cmNlLnZ5IHx8IGppZ2dsZSgpOwogICAgICAgICAgICBsID0gTWF0aC5zcXJ0KHggKiB4ICsgeSAqIHkpOwogICAgICAgICAgICBsID0gKGwgLSBkaXN0YW5jZXNbaV0pIC8gbCAqIGFscGhhICogc3RyZW5ndGhzW2ldOwogICAgICAgICAgICB4ICo9IGwsIHkgKj0gbDsKICAgICAgICAgICAgdGFyZ2V0LnZ4IC09IHggKiAoYiA9IGJpYXNbaV0pOwogICAgICAgICAgICB0YXJnZXQudnkgLT0geSAqIGI7CiAgICAgICAgICAgIHNvdXJjZS52eCArPSB4ICogKGIgPSAxIC0gYik7CiAgICAgICAgICAgIHNvdXJjZS52eSArPSB5ICogYjsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIGluaXRpYWxpemUoKSB7CiAgICAgICAgaWYgKCFub2RlcykgcmV0dXJuOwoKICAgICAgICB2YXIgaSwKICAgICAgICAgICAgbiA9IG5vZGVzLmxlbmd0aCwKICAgICAgICAgICAgbSA9IGxpbmtzLmxlbmd0aCwKICAgICAgICAgICAgbm9kZUJ5SWQgPSBtYXAkMShub2RlcywgaWQpLAogICAgICAgICAgICBsaW5rOwoKICAgICAgICBmb3IgKGkgPSAwLCBjb3VudCA9IG5ldyBBcnJheShuKTsgaSA8IG07ICsraSkgewogICAgICAgICAgbGluayA9IGxpbmtzW2ldLCBsaW5rLmluZGV4ID0gaTsKICAgICAgICAgIGlmICh0eXBlb2YgbGluay5zb3VyY2UgIT09ICJvYmplY3QiKSBsaW5rLnNvdXJjZSA9IGZpbmQobm9kZUJ5SWQsIGxpbmsuc291cmNlKTsKICAgICAgICAgIGlmICh0eXBlb2YgbGluay50YXJnZXQgIT09ICJvYmplY3QiKSBsaW5rLnRhcmdldCA9IGZpbmQobm9kZUJ5SWQsIGxpbmsudGFyZ2V0KTsKICAgICAgICAgIGNvdW50W2xpbmsuc291cmNlLmluZGV4XSA9IChjb3VudFtsaW5rLnNvdXJjZS5pbmRleF0gfHwgMCkgKyAxOwogICAgICAgICAgY291bnRbbGluay50YXJnZXQuaW5kZXhdID0gKGNvdW50W2xpbmsudGFyZ2V0LmluZGV4XSB8fCAwKSArIDE7CiAgICAgICAgfQoKICAgICAgICBmb3IgKGkgPSAwLCBiaWFzID0gbmV3IEFycmF5KG0pOyBpIDwgbTsgKytpKSB7CiAgICAgICAgICBsaW5rID0gbGlua3NbaV0sIGJpYXNbaV0gPSBjb3VudFtsaW5rLnNvdXJjZS5pbmRleF0gLyAoY291bnRbbGluay5zb3VyY2UuaW5kZXhdICsgY291bnRbbGluay50YXJnZXQuaW5kZXhdKTsKICAgICAgICB9CgogICAgICAgIHN0cmVuZ3RocyA9IG5ldyBBcnJheShtKSwgaW5pdGlhbGl6ZVN0cmVuZ3RoKCk7CiAgICAgICAgZGlzdGFuY2VzID0gbmV3IEFycmF5KG0pLCBpbml0aWFsaXplRGlzdGFuY2UoKTsKICAgICAgfQoKICAgICAgZnVuY3Rpb24gaW5pdGlhb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XRjaCgidGljayIsICJlbmQiKTsKCiAgICAgIGlmIChub2RlcyA9PSBudWxsKSBub2RlcyA9IFtdOwoKICAgICAgZnVuY3Rpb24gc3RlcCgpIHsKICAgICAgICB0aWNrKCk7CiAgICAgICAgZXZlbnQuY2FsbCgidGljayIsIHNpbXVsYXRpb24pOwogICAgICAgIGlmIChhbHBoYSA8IGFscGhhTWluKSB7CiAgICAgICAgICBzdGVwcGVyLnN0b3AoKTsKICAgICAgICAgIGV2ZW50LmNhbGwoImVuZCIsIHNpbXVsYXRpb24pOwogICAgICAgIH0KICAgICAgfQoKICAgICAgZnVuY3Rpb24gdGljayhpdGVyYXRpb25zKSB7CiAgICAgICAgdmFyIGksIG4gPSBub2Rlcy5sZW5ndGgsIG5vZGU7CgogICAgICAgIGlmIChpdGVyYXRpb25zID09PSB1bmRlZmluZWQpIGl0ZXJhdGlvbnMgPSAxOwoKICAgICAgICBmb3IgKHZhciBrID0gMDsgayA8IGl0ZXJhdGlvbnM7ICsraykgewogICAgICAgICAgYWxwaGEgKz0gKGFscGhhVGFyZ2V0IC0gYWxwaGEpICogYWxwaGFEZWNheTsKCiAgICAgICAgICBmb3JjZXMuZWFjaChmdW5jdGlvbiAoZm9yY2UpIHsKICAgICAgICAgICAgZm9yY2UoYWxwaGEpOwogICAgICAgICAgfSk7CgogICAgICAgICAgZm9yIChpID0gMDsgaSA8IG47ICsraSkgewogICAgICAgICAgICBub2RlID0gbm9kZXNbaV07CiAgICAgICAgICAgIGlmIChub2RlLmZ4ID09IG51bGwpIG5vZGUueCArPSBub2RlLnZ4ICo9IHZlbG9jaXR5RGVjYXk7CiAgICAgICAgICAgIGVsc2Ugbm9kZS54ID0gbm9kZS5meCwgbm9kZS52eCA9IDA7CiAgICAgICAgICAgIGlmIChub2RlLmZ5ID09IG51bGwpIG5vZGUueSArPSBub2RlLnZ5ICo9IHZlbG9jaXR5RGVjYXk7CiAgICAgICAgICAgIGVsc2Ugbm9kZS55ID0gbm9kZS5meSwgbm9kZS52eSA9IDA7CiAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICByZXR1cm4gc2ltdWxhdGlvbjsKICAgICAgfQoKICAgICAgZnVuY3Rpb24gaW5pdGlhbGl6ZU5vZGVzKCkgewogICAgICAgIGZvciAodmFyIGkgPSAwLCBuID0gbm9kZXMubGVuZ3RoLCBub2RlOyBpIDwgbjsgKytpKSB7CiAgICAgICAgICBub2RlID0gbm9kZXNbaV0sIG5vZGUuaW5kZXggPSBpOwogICAgICAgICAgaWYgKG5vZGUuZnggIT0gbnVsbCkgbm9kZS54ID0gbm9kZS5meDsKICAgICAgICAgIGlmIChub2RlLmZ5ICE9IG51bGwpIG5vZGUueSA9IG5vZGUuZnk7CiAgICAgICAgICBpZiAoaXNOYU4obm9kZS54KSB8fCBpc05hTihub2RlLnkpKSB7CiAgICAgICAgICAgIHZhciByYWRpdXMgPSBpbml0aWFsUmFkaXVzICogTWF0aC5zcXJ0KGkpLCBhbmdsZSA9IGkgKiBpbml0aWFsQW5nbGU7CiAgICAgICAgICAgIG5vZGUueCA9IHJhZGl1cyAqIE1hdGguY29zKGFuZ2xlKTsKICAgICAgICAgICAgbm9kZS55ID0gcmFkaXVzICogTWF0aC5zaW4oYW5nbGUpOwogICAgICAgICAgfQogICAgICAgICAgaWYgKGlzTmFOKG5vZGUudngpIHx8IGlzTmFOKG5vZGUudnkpKSB7CiAgICAgICAgICAgIG5vZGUudnggPSBub2RlLnZ5ID0gMDsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIGluaXRpYWxpemVGb3JjZShmb3JjZSkgewogICAgICAgIGlmIChmb3JjZS5pbml0aWFsaXplKSBmb3JjZS5pbml0aWFsaXplKG5vZGVzKTsKICAgICAgICByZXR1cm4gZm9yY2U7CiAgICAgIH0KCiAgICAgIGluaXRpYWxpemVOb2RlcygpOwoKICAgICAgcmV0dXJuIHNpbXVsYXRpb24gPSB7CiAgICAgICAgdGljazogdGljaywKCiAgICAgICAgcmVzdGFydDogZnVuY3Rpb24oKSB7CiAgICAgICAgICByZXR1cm4gc3RlcHBlci5yZXN0YXJ0KHN0ZXApLCBzaW11bGF0aW9uOwogICAgICAgIH0sCgogICAgICAgIHN0b3A6IGZ1bmN0aW9uKCkgewogICAgICAgICAgcmV0dXJuIHN0ZXBwZXIuc3RvcCgpLCBzaW11bGF0aW9uOwogICAgICAgIH0sCgogICAgICAgIG5vZGVzOiBmdW5jdGlvbihfKSB7CiAgICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChub2RlcyA9IF8sIGluaXRpYWxpemVOb2RlcygpLCBmb3JjZXMuZWFjaChpbml0aWFsaXplRm9yY2UpLCBzaW11bGF0aW9uKSA6IG5vZGVzOwogICAgICAgIH0sCgogICAgICAgIGFscGhhOiBmdW5jdGlvbihfKSB7CiAgICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChhbHBoYSA9ICtfLCBzaW11bGF0aW9uKSA6IGFscGhhOwogICAgICAgIH0sCgogICAgICAgIGFscGhhTWluOiBmdW5jdGlvbihfKSB7CiAgICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChhbHBoYU1pbiA9ICtfLCBzaW11bGF0aW9uKSA6IGFscGhhTWluOwogICAgICAgIH0sCgogICAgICAgIGFscGhhRGVjYXk6IGZ1bmN0aW9uKF8pIHsKICAgICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKGFscGhhRGVjYXkgPSArXywgc2ltdWxhdGlvbikgOiArYWxwaGFEZWNheTsKICAgICAgICB9LAoKICAgICAgICBhbHBoYVRhcmdldDogZnVuY3Rpb24oXykgewogICAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoYWxwaGFUYXJnZXQgPSArXywgc2ltdWxhdGlvbikgOiBhbHBoYVRhcmdldDsKICAgICAgICB9LAoKICAgICAgICB2ZWxvY2l0eURlY2F5OiBmdW5jdGlvbihfKSB7CiAgICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/ICh2ZWxvY2l0eURlY2F5ID0gMSAtIF8sIHNpbXVsYXRpb24pIDogMSAtIHZlbG9jaXR5RGVjYXk7CiAgICAgICAgfSwKCiAgICAgICAgZm9yY2U6IGZ1bmN0aW9uKG5hbWUsIF8pIHsKICAgICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID4gMSA/ICgoXyA9PSBudWxsID8gZm9yY2VzLnJlbW92ZShuYW1lKSA6IGZvcmNlcy5zZXQobmFtZSwgaW5pdGlhbGl6ZUZvcmNlKF8pKSksIHNpbXVsYXRpb24pIDogZm9yY2VzLmdldChuYW1lKTsKICAgICAgICB9LAoKICAgICAgICBmaW5kOiBmdW5jdGlvbih4LCB5LCByYWRpdXMpIHsKICAgICAgICAgIHZhciBpID0gMCwKICAgICAgICAgICAgICBuID0gbm9kZXMubGVuZ3RoLAogICAgICAgICAgICAgIGR4LAogICAgICAgICAgICAgIGR5LAogICAgICAgICAgICAgIGQyLAogICAgICAgICAgICAgIG5vZGUsCiAgICAgICAgICAgICAgY2xvc2VzdDsKCiAgICAgICAgICBpZiAocmFkaXVzID09IG51bGwpIHJhZGl1cyA9IEluZmluaXR5OwogICAgICAgICAgZWxzZSByYWRpdXMgKj0gcmFkaXVzOwoKICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBuOyArK2kpIHsKICAgICAgICAgICAgbm9kZSA9IG5vZGVzW2ldOwogICAgICAgICAgICBkeCA9IHggLSBub2RlLng7CiAgICAgICAgICAgIGR5ID0geSAtIG5vZGUueTsKICAgICAgICAgICAgZDIgPSBkeCAqIGR4ICsgZHkgKiBkeTsKICAgICAgICAgICAgaWYgKGQyIDwgcmFkaXVzKSBjbG9zZXN0ID0gbm9kZSwgcmFkaXVzID0gZDI7CiAgICAgICAgICB9CgogICAgICAgICAgcmV0dXJuIGNsb3Nlc3Q7CiAgICAgICAgfSwKCiAgICAgICAgb246IGZ1bmN0aW9uKG5hbWUsIF8pIHsKICAgICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID4gMSA/IChldmVudC5vbihuYW1lLCBfKSwgc2ltdWxhdGlvbikgOiBldmVudC5vbihuYW1lKTsKICAgICAgICB9CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gbWFueUJvZHkoKSB7CiAgICAgIHZhciBub2RlcywKICAgICAgICAgIG5vZGUsCiAgICAgICAgICBhbHBoYSwKICAgICAgICAgIHN0cmVuZ3RoID0gY29uc3RhbnQkNygtMzApLAogICAgICAgICAgc3RyZW5ndGhzLAogICAgICAgICAgZGlzdGFuY2VNaW4yID0gMSwKICAgICAgICAgIGRpc3RhbmNlTWF4MiA9IEluZmluaXR5LAogICAgICAgICAgdGhldGEyID0gMC44MTsKCiAgICAgIGZ1bmN0aW9uIGZvcmNlKF8pIHsKICAgICAgICB2YXIgaSwgbiA9IG5vZGVzLmxlbmd0aCwgdHJlZSA9IHF1YWR0cmVlKG5vZGVzLCB4JDEsIHkkMSkudmlzaXRBZnRlcihhY2N1bXVsYXRlKTsKICAgICAgICBmb3IgKGFscGhhID0gXywgaSA9IDA7IGkgPCBuOyArK2kpIG5vZGUgPSBub2Rlc1tpXSwgdHJlZS52aXNpdChhcHBseSk7CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIGluaXRpYWxpemUoKSB7CiAgICAgICAgaWYgKCFub2RlcykgcmV0dXJuOwogICAgICAgIHZhciBpLCBuID0gbm9kZXMubGVuZ3RoLCBub2RlOwogICAgICAgIHN0cmVuZ3RocyA9IG5ldyBBcnJheShuKTsKICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbjsgKytpKSBub2RlID0gbm9kZXNbaV0sIHN0cmVuZ3Roc1tub2RlLmluZGV4XSA9ICtzdHJlbmd0aChub2RlLCBpLCBub2Rlcyk7CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIGFjY3VtdWxhdGUocXVhZCkgewogICAgICAgIHZhciBzdHJlbmd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nksCiAgICAgICAgICAgIHcgPSB4MiAtIHgxLAogICAgICAgICAgICBsID0geCAqIHggKyB5ICogeTsKCiAgICAgICAgLy8gQXBwbHkgdGhlIEJhcm5lcy1IdXQgYXBwcm94aW1hdGlvbiBpZiBwb3NzaWJsZS4KICAgICAgICAvLyBMaW1pdCBmb3JjZXMgZm9yIHZlcnkgY2xvc2Ugbm9kZXM7IHJhbmRvbWl6ZSBkaXJlY3Rpb24gaWYgY29pbmNpZGVudC4KICAgICAgICBpZiAodyAqIHcgLyB0aGV0YTIgPCBsKSB7CiAgICAgICAgICBpZiAobCA8IGRpc3RhbmNlTWF4MikgewogICAgICAgICAgICBpZiAoeCA9PT0gMCkgeCA9IGppZ2dsZSgpLCBsICs9IHggKiB4OwogICAgICAgICAgICBpZiAoeSA9PT0gMCkgeSA9IGppZ2dsZSgpLCBsICs9IHkgKiB5OwogICAgICAgICAgICBpZiAobCA8IGRpc3RhbmNlTWluMikgbCA9IE1hdGguc3FydChkaXN0YW5jZU1pbjIgKiBsKTsKICAgICAgICAgICAgbm9kZS52eCArPSB4ICogcXVhZC52YWx1ZSAqIGFscGhhIC8gbDsKICAgICAgICAgICAgbm9kZS52eSArPSB5ICogcXVhZC52YWx1ZSAqIGFscGhhIC8gbDsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgIH0KCiAgICAgICAgLy8gT3RoZXJ3aXNlLCBwcm9jZXNzIHBvaW50cyBkaXJlY3RseS4KICAgICAgICBlbHNlIGlmIChxdWFkLmxlbmd0aCB8fCBsID49IGRpc3RhbmNlTWF4MikgcmV0dXJuOwoKICAgICAgICAvLyBMaW1pdCBmb3JjZXMgZm9yIHZlcnkgY2xvc2Ugbm9kZXM7IHJhbmRvbWl6ZSBkaXJlY3Rpb24gaWYgY29pbmNpZGVudC4KICAgICAgICBpZiAocXVhZC5kYXRhICE9PSBub2RlIHx8IHF1YWQubmV4dCkgewogICAgICAgICAgaWYgKHggPT09IDApIHggPSBqaWdnbGUoKSwgbCArPSB4ICogeDsKICAgICAgICAgIGlmICh5ID09PSAwKSB5ID0gamlnZ2xlKCksIGwgKz0geSAqIHk7CiAgICAgICAgICBpZiAobCA8IGRpc3RhbmNlTWluMikgbCA9IE1hdGguc3FydChkaXN0YW5jZU1pbjIgKiBsKTsKICAgICAgICB9CgogICAgICAgIGRvIGlmIChxdWFkLmRhdGEgIT09IG5vZGUpIHsKICAgICAgICAgIHcgPSBzdHJlbmd0aHNbcXVhZC5kYXRhLmluZGV4XSAqIGFscGhhIC8gbDsKICAgICAgICAgIG5vZGUudnggKz0geCAqIHc7CiAgICAgICAgICBub2RlLnZ5ICs9IHkgKiB3OwogICAgICAgIH0gd2hpbGUgKHF1YWQgPSBxdWFkLm5leHQpOwogICAgICB9CgogICAgICBmb3JjZS5pbml0aWFsaXplID0gZnVuY3Rpb24oXykgewogICAgICAgIG5vZGVzID0gXzsKICAgICAgICBpbml0aWFsaXplKCk7CiAgICAgIH07CgogICAgICBmb3JjZS5zdHJlbmd0aCA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChzdHJlbmd0aCA9IHR5cGVvZiBfID09PSAiZnVuY3Rpb24iID8gXyA6IGNvbnN0YW50JDcoK18pLCBpbml0aWFsaXplKCksIGZvcmNlKSA6IHN0cmVuZ3RoOwogICAgICB9OwoKICAgICAgZm9yY2UuZGlzdGFuY2VNaW4gPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoZGlzdGFuY2VNaW4yID0gXyAqIF8sIGZvcmNlKSA6IE1hdGguc3FydChkaXN0YW5jZU1pbjIpOwogICAgICB9OwoKICAgICAgZm9yY2UuZGlzdGFuY2VNYXggPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoZGlzdGFuY2VNYXgyID0gXyAqIF8sIGZvcmNlKSA6IE1hdGguc3FydChkaXN0YW5jZU1heDIpOwogICAgICB9OwoKICAgICAgZm9yY2UudGhldGEgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAodGhldGEyID0gXyAqIF8sIGZvcmNlKSA6IE1hdGguc3FydCh0aGV0YTIpOwogICAgICB9OwoKICAgICAgcmV0dXJuIGZvcmNlOwogICAgfQoKICAgIGZ1bmN0aW9uIHJhZGlhbChyYWRpdXMsIHgsIHkpIHsKICAgICAgdmFyIG5vZGVzLAogICAgICAgICAgc3RyZW5ndGggPSBjb25zdGFudCQ3KDAuMSksCiAgICAgICAgICBzdHJlbmd0aHMsCiAgICAgICAgICByYWRpdXNlczsKCiAgICAgIGlmICh0eXBlb2YgcmFkaXVzICE9PSAiZnVuY3Rpb24iKSByYWRpdXMgPSBjb25zdGFudCQ3KCtyYWRpdXMpOwogICAgICBpZiAoeCA9PSBudWxsKSB4ID0gMDsKICAgICAgaWYgKHkgPT0gbnVsbCkgeSA9IDA7CgogICAgICBmdW5jdGlvbiBmb3JjZShhbHBoYSkgewogICAgICAgIGZvciAodmFyIGkgPSAwLCBuID0gbm9kZXMubGVuZ3RoOyBpIDwgbjsgKytpKSB7CiAgICAgICAgICB2YXIgbm9kZSA9IG5vZGVzW2ldLAogICAgICAgICAgICAgIGR4ID0gbm9kZS54IC0geCB8fCAxZS02LAogICAgICAgICAgICAgIGR5ID0gbm9kZS55IC0geSB8fCAxZS02LAogICAgICAgICAgICAgIHIgPSBNYXRoLnNxcnQoZHggKiBkeCArIGR5ICogZHkpLAogICAgICAgICAgICAgIGsgPSAocmFkaXVzZXNbaV0gLSByKSAqIHN0cmVuZ3Roc1tpXSAqIGFscGhhIC8gcjsKICAgICAgICAgIG5vZGUudnggKz0gZHggKiBrOwogICAgICAgICAgbm9kZS52eSArPSBkeSAqIGs7CiAgICAgICAgfQogICAgICB9CgogICAgICBmdW5jdGlvbiBpbml0aWFsaXplKCkgewogICAgICA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kgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoeSA9ICtfLCBmb3JjZSkgOiB5OwogICAgICB9OwoKICAgICAgcmV0dXJuIGZvcmNlOwogICAgfQoKICAgIGZ1bmN0aW9uIHgkMih4KSB7CiAgICAgIHZhciBzdHJlbmd0aCA9IGNvbnN0YW50JDcoMC4xKSwKICAgICAgICAgIG5vZGVzLAogICAgICAgICAgc3RyZW5ndGhzLAogICAgICAgICAgeHo7CgogICAgICBpZiAodHlwZW9mIHggIT09ICJmdW5jdGlvbiIpIHggPSBjb25zdGFudCQ3KHggPT0gbnVsbCA/IDAgOiAreCk7CgogICAgICBmdW5jdGlvbiBmb3JjZShhbHBoYSkgewogICAgICAgIGZvciAodmFyIGkgPSAwLCBuID0gbm9kZXMubGVuZ3RoLCBub2RlOyBpIDwgbjsgKytpKSB7CiAgICAgICAgICBub2RlID0gbm9kZXNbaV0sIG5vZGUudnggKz0gKHh6W2ldIC0gbm9kZS54KSAqIHN0cmVuZ3Roc1tpXSAqIGFscGhhOwogICAgICAgIH0KICAgICAgfQoKICAgICAgZnVuY3Rpb24gaW5pdGlhbGl6ZSgpIHsKICAgICAgICBpZiAoIW5vZGVzKSByZXR1cm47CiAgICAgICAgdmFyIGksIG4gPSBub2Rlcy5sZW5ndGg7CiAgICAgICAgc3RyZW5ndGhzID0gbmV3IEFycmF5KG4pOwogICAgICAgIHh6ID0gbmV3IEFycmF5KG4pOwogICAgICAgIGZvciAoaSA9IDA7IGkgPCBuOyArK2kpIHsKICAgICAgICAgIHN0cmVuZ3Roc1tpXSA9IGlzTmFOKHh6W2ldID0gK3gobm9kZXNbaV0sIGksIG5vZGVzKSkgPyAwIDogK3N0cmVuZ3RoKG5vZGVzW2ldLCBpLCBub2Rlcyk7CiAgICAgICAgfQogICAgICB9CgogICAgICBmb3JjZS5pbml0aWFsaXplID0gZnVuY3Rpb24oXykgewogICAgICAgIG5vZGVzID0gXzsKICAgICAgICBpbml0aWFsaXplKCk7CiAgICAgIH07CgogICAgICBmb3JjZS5zdHJlbmd0aCA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChzdHJlbmd0aCA9IHR5cGVvZiBfID09PSAiZnVuY3Rpb24iID8gXyA6IGNvbnN0YW50JDcoK18pLCBpbml0aWFsaXplKCksIGZvcmNlKSA6IHN0cmVuZ3RoOwogICAgICB9OwoKICAgICAgZm9yY2UueCA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/ICh4ID0gdHlwZW9mIF8gPT09ICJmdW5jdGlvbiIgPyBfIDogY29uc3RhbnQkNygrXyksIGluaXRpYWxpemUoKSwgZm9yY2UpIDogeDsKICAgICAgfTsKCiAgICAgIHJldHVybiBmb3JjZTsKICAgIH0KCiAgICBmdW5jdGlvbiB5JDIoeSkgewogICAgICB2YXIgc3RyZW5ndGggPSBjb25zdGFudCQ3KDAuMSksCiAgICAgICAgICBub2RlcywKICAgICAgICAgIHN0cmVuZ3RocywKICAgICAgICAgIHl6OwoKICAgICAgaWYgKHR5cGVvZiB5ICE9PSAiZnVuY3Rpb24iKSB5ID0gY29uc3RhbnQkNyh5ID09IG51bGwgPyAwIDogK3kpOwoKICAgICAgZnVuY3Rpb24gZm9yY2UoYWxwaGEpIHsKICAgICAgICBmb3IgKHZhciBpID0gMCwgbiA9IG5vZGVzLmxlbmd0aCwgbm9kZTsgaSA8IG47ICsraSkgewogICAgICAgICAgbm9kZSA9IG5vZGVzW2ldLCBub2RlLnZ5ICs9ICh5eltpXSAtIG5vZGUueSkgKiBzdHJlbmd0aHNbaV0gKiBhbHBoYTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIGluaXRpYWxpemUoKSB7CiAgICAgICAgaWYgKCFub2RlcykgcmV0dXJuOwogICAgICAgIHZhciBpLCBuID0gbm9kZXMubGVuZ3R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A7CgogICAgICAgIHdoaWxlIChpID4gMCAmJiBnID4gMCkgewogICAgICAgICAgaWYgKGxlbmd0aCArIGcgKyAxID4gd2lkdGgpIGcgPSBNYXRoLm1heCgxLCB3aWR0aCAtIGxlbmd0aCk7CiAgICAgICAgICB0LnB1c2godmFsdWUuc3Vic3RyaW5nKGkgLT0gZywgaSArIGcpKTsKICAgICAgICAgIGlmICgobGVuZ3RoICs9IGcgKyAxKSA+IHdpZHRoKSBicmVhazsKICAgICAgICAgIGcgPSBncm91cGluZ1tqID0gKGogKyAxKSAlIGdyb3VwaW5nLmxlbmd0aF07CiAgICAgICAgfQoKICAgICAgICByZXR1cm4gdC5yZXZlcnNlKCkuam9pbih0aG91c2FuZHMpOwogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIGZvcm1hdE51bWVyYWxzKG51bWVyYWxzKSB7CiAgICAgIHJldHVybiBmdW5jdGlvbih2YWx1ZSkgewogICAgICAgIHJldHVybiB2YWx1ZS5yZXBsYWNlKC9bMC05XS9nLCBmdW5jdGlvbihpKSB7CiAgICAgICAgICByZXR1cm4gbnVtZXJhbHNbK2ldOwogICAgICAgIH0pOwogICAgICB9OwogICAgfQoKICAgIC8vIFtbZmlsbF1hbGlnbl1bc2lnbl1bc3ltYm9sXVswXVt3aWR0aF1bLF1bLnByZWNpc2lvbl1bfl1bdHlwZV0KICAgIHZhciByZSA9IC9eKD86KC4pPyhbPD49Xl0pKT8oWytcLSggXSk/KFskI10pPygwKT8oXGQrKT8oLCk/KFwuXGQrKT8ofik/KFthLXolXSk/JC9pOwoKICAgIGZ1bmN0aW9uIGZvcm1hdFNwZWNpZmllcihzcGVjaWZpZXIpIHsKICAgICAgaWYgKCEobWF0Y2ggPSByZS5leGVjKHNwZWNpZmllcikpKSB0aHJvdyBuZXcgRXJyb3IoImludmFsaWQgZm9ybWF0OiAiICsgc3BlY2lmaWVyKTsKICAgICAgdmFyIG1hdGNoOwogICAgICByZXR1cm4gbmV3IEZvcm1hdFNwZ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WR0aDsKICAgICAgdGhpcy5jb21tYSA9ICEhc3BlY2lmaWVyLmNvbW1hOwogICAgICB0aGlzLnByZWNpc2lvbiA9IHNwZWNpZmllci5wcmVjaXNpb24gPT09IHVuZGVmaW5lZCA/IHVuZGVmaW5lZCA6ICtzcGVjaWZpZXIucHJlY2lzaW9uOwogICAgICB0aGlzLnRyaW0gPSAhIXNwZWNpZmllci50cmltOwogICAgICB0aGlzLnR5cGUgPSBzcGVjaWZpZXIudHlwZSA9PT0gdW5kZWZpbmVkID8gIiIgOiBzcGVjaWZpZXIudHlwZSArICIiOwogICAgfQoKICAgIEZvcm1hdFNwZWNpZmllci5wcm90b3R5cGUudG9TdHJpbmcgPSBmdW5jdGlvbigpIHsKICAgICAgcmV0dXJuIHRoaXMuZmlsbAogICAgICAgICAgKyB0aGlzLmFsaWduCiAgICAgICAgICArIHRoaXMuc2lnbgogICAgICAgICAgKyB0aGlzLnN5bWJvbAogICAgICAgICAgKyAodGhpcy56ZXJvID8gIjAiIDogIiIpCiAgICAgICAgICArICh0aGlzLndpZHRoID09PSB1bmRlZmluZWQgPyAiIiA6IE1hdGgubWF4KDEsIHRoaXMud2lkdGggfCAwKSkKICAgICAgICAgICsgKHRoaXMuY29tbWEgPyAiLCIgOiAiIikKICAgICAgICAgICsgKHRoaXMucHJlY2lzaW9uID09PSB1bmRlZmluZWQgPyAiIiA6ICIuIiArIE1hdGgubWF4KDAsIHRoaXMucHJlY2lzaW9uIHwgMCkpCiAgICAgICAgICArICh0aGlzLnRyaW0gPyAifiIgOiAiIikKICAgICAgICAgICsgdGhpcy50eXBlOwogICAgfTsKCiAgICAvLyBUcmltcyBpbnNpZ25pZmljYW50IHplcm9zLCBlLmcuLCByZXBsYWNlcyAxLjIwMDBrIHdpdGggMS4yay4KICAgIGZ1bmN0aW9uIGZvcm1hdFRyaW0ocykgewogICAgICBvdXQ6IGZvciAodmFyIG4gPSBzLmxlbmd0aCwgaSA9IDEsIGkwID0gLTEsIGkxOyBpIDwgbjsgKytpKSB7CiAgICAgICAgc3dpdGNoIChzW2ldKSB7CiAgICAgICAgICBjYXNlICIuIjogaTAgPSBpMSA9IGk7IGJyZWFrOwogICAgICAgICAgY2FzZSAiMCI6IGlmIChpMCA9PT0gMCkgaTAgPSBpOyBpMSA9IGk7IGJyZWFrOwogICAgICAgICAgZGVmYXVsdDogaWYgKCErc1tpXSkgYnJlYWsgb3V0OyBpZiAoaTAgPiAwKSBpMCA9IDA7IGJyZWFrOwogICAgICAgIH0KICAgICAgfQogICAgICByZXR1cm4gaTAgPiAwID8gcy5zbGljZSgwLCBpMCkgKyBzLnNsaWNlKGkxICsgMSkgOiBzOwogICAgfQoKICAgIHZhciBwcmVmaXhFeHBvbmVudDsKCiAgICBmdW5jdGlvbiBmb3JtYXRQcmVmaXhBdXRvKHgsIHApIHsKICAgICAgdmFyIGQgPSBmb3JtYXREZWNpbWFsKHgsIHApOwogICAgICBpZiAoIWQpIHJldHVybiB4ICsgIiI7CiAgICAgIHZhciBjb2VmZmljaWVudCA9IGRbMF0sCiAgICAgICAgICBleHBvbmVudCA9IGRbMV0sCiAgICAgICAgICBpID0gZXhwb25lbnQgLSAocHJlZml4RXhwb25lbnQgPSBNYXRoLm1heCgtOCwgTWF0aC5taW4oOCwgTWF0aC5mbG9vcihleHBvbmVudCAvIDMpKSkgKiAzKSArIDEsCiAgICAgICAgICBuID0gY29lZmZpY2llbnQubGVuZ3RoOwogICAgICByZXR1cm4gaSA9PT0gbiA/IGNvZWZmaWNpZW50CiAgICAgICAgICA6IGkgPiBuID8gY29lZmZpY2llbnQgKyBuZXcgQXJyYXkoaSAtIG4gKyAxKS5qb2luKCIwIikKICAgICAgICAgIDogaSA+IDAgPyBjb2VmZmljaWVudC5zbGljZSgwLCBpKSArICIuIiArIGNvZWZmaWNpZW50LnNsaWNlKGkpCiAgICAgICAgICA6ICIwLiIgKyBuZXcgQXJyYXkoMSAtIGkpLmpvaW4oIjAiKSArIGZvcm1hdERlY2ltYWwoeCwgTWF0aC5tYXgoMCwgcCArIGkgLSAxKSlbMF07IC8vIGxlc3MgdGhhbiAxeSEKICAgIH0KCiAgICBmdW5jdGlvbiBmb3JtYXRSb3VuZGVkKHgsIHApIHsKICAgICAgdmFyIGQgPSBmb3JtYXREZWNpbWFsKHgsIHApOwogICAgICBpZiAoIWQpIHJldHVybiB4ICsgIiI7CiAgICAgIHZhciBjb2VmZmljaWVudCA9IGRbMF0sCiAgICAgICAgICBleHBvbmVudCA9IGRbMV07CiAgICAgIHJldHVybiBleHBvbmVudCA8IDAgPyAiMC4iICsgbmV3IEFycmF5KC1leHBvbmVudCkuam9pbigiMCIpICsgY29lZmZpY2llbnQKICAgICAgICAgIDogY29lZmZpY2llbnQubGVuZ3RoID4gZXhwb25lbnQgKyAxID8gY29lZmZpY2llbnQuc2xpY2UoMCwgZXhwb25lbnQgKyAxKSArICIuIiArIGNvZWZmaWNpZW50LnNsaWNlKGV4cG9uZW50ICsgMSkKICAgICAgICAgIDogY29lZmZpY2llbnQgKyBuZXcgQXJyYXkoZXhwb25lbnQgLSBjb2VmZmljaWVudC5sZW5ndGggKyAyKS5qb2luKCIwIik7CiAgICB9CgogICAgdmFyIGZvcm1hdFR5cGVzID0gewogICAgICAiJSI6IGZ1bmN0aW9uKHgsIHApIHsgcmV0dXJuICh4ICogMTAwKS50b0ZpeGVkKHApOyB9LAogICAgICAiYiI6IGZ1bmN0aW9uKHgpIHsgcmV0dXJuIE1hdGgucm91bmQoeCkudG9TdHJpbmcoMik7IH0sCiAgICAgICJjIjogZnVuY3Rpb24oeCkgeyByZXR1cm4geCArICIiOyB9LAogICAgICAiZCI6IGZ1bmN0aW9uKHgpIHsgcmV0dXJuIE1hdGgucm91bmQoeCkudG9TdHJpbmcoMTApOyB9LAogICAgICAiZSI6IGZ1bmN0aW9uKHgsIHApIHsgcmV0dXJuIHgudG9FeHBvbmVudGlhbChwKTsgfSwKICAgICAgImYiOiBmdW5jdGlvbih4LCBwKSB7IHJldHVybiB4LnRvRml4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7IGJyZWFrOwogICAgICAgICAgICBjYXNlICJeIjogdmFsdWUgPSBwYWRkaW5nLnNsaWNlKDAsIGxlbmd0aCA9IHBhZGRpbmcubGVuZ3RoID4+IDEpICsgdmFsdWVQcmVmaXggKyB2YWx1ZSArIHZhbHVlU3VmZml4ICsgcGFkZGluZy5zbGljZShsZW5ndGgpOyBicmVhazsKICAgICAgICAgICAgZGVmYXVsdDogdmFsdWUgPSBwYWRkaW5nICsgdmFsdWVQcmVmaXggKyB2YWx1ZSArIHZhbHVlU3VmZml4OyBicmVhazsKICAgICAgICAgIH0KCiAgICAgICAgICByZXR1cm4gbnVtZXJhbHModmFsdWUpOwogICAgICAgIH0KCiAgICAgICAgZm9ybWF0LnRvU3RyaW5nID0gZnVuY3Rpb24oKSB7CiAgICAgICAgICByZXR1cm4gc3BlY2lmaWVyICsgIiI7CiAgICAgICAgfTsKCiAgICAgICAgcmV0dXJuIGZvcm1hdDsKICAgICAgfQoKICAgICAgZnVuY3Rpb24gZm9ybWF0UHJlZml4KHNwZWNpZmllciwgdmFsdWUpIHsKICAgICAgICB2YXIgZiA9IG5ld0Zvcm1hdCgoc3BlY2lmaWVyID0gZm9ybWF0U3BlY2lmaWVyKHNwZWNpZmllciksIHNwZWNpZmllci50eXBlID0gImYiLCBzcGVjaWZpZXIpKSwKICAgICAgICAgICAgZSA9IE1hdGgubWF4KC04LCBNYXRoLm1pbig4LCBNYXRoLmZsb29yKGV4cG9uZW50JDEodmFsdWUpIC8gMykpKSAqIDMsCiAgICAgICAgICAgIGsgPSBNYXRoLnBvdygxMCwgLWUpLAogICAgICAgICAgICBwcmVmaXggPSBwcmVmaXhlc1s4ICsgZSAvIDNdOwogICAgICAgIHJldHVybiBmdW5jdGlvbih2YWx1ZSkgewogICAgICAgICAgcmV0dXJuIGYoayAqIHZhbHVlKSArIHByZWZpeDsKICAgICAgICB9OwogICAgICB9CgogICAgICByZXR1cm4gewogICAgICAgIGZvcm1hdDogbmV3Rm9ybWF0LAogICAgICAgIGZvcm1hdFByZWZpeDogZm9ybWF0UHJlZml4CiAgICAgIH07CiAgICB9CgogICAgdmFyIGxvY2FsZTsKICAgIHZhciBmb3JtYXQ7CiAgICB2YXIgZm9ybWF0UHJlZml4OwoKICAgIGRlZmF1bHRMb2NhbGUoewogICAgICBkZWNpbWFsOiAiLiIsCiAgICAgIHRob3VzYW5kczogIiwiLAogICAgICBncm91cGluZzogWzNdLAogICAgICBjdXJyZW5jeTogWyIkIiwgIiJdLAogICAgICBtaW51czogIi0iCiAgICB9KTsKCiAgICBmdW5jdGlvbiBkZWZhdWx0TG9jYWxlKGRlZmluaXRpb24pIHsKICAgICAgbG9jYWxlID0gZm9ybWF0TG9jYWxlKGRlZmluaXRpb24pOwogICAgICBmb3JtYXQgPSBsb2NhbGUuZm9ybWF0OwogICAgICBmb3JtYXRQcmVmaXggPSBsb2NhbGUuZm9ybWF0UHJlZml4OwogICAgICByZXR1cm4gbG9jYWxlOwogICAgfQoKICAgIGZ1bmN0aW9uIHByZWNpc2lvbkZpeGVkKHN0ZXApIHsKICAgICAgcmV0dXJuIE1hdGgubWF4KDAsIC1leHBvbmVudCQxKE1hdGguYWJzKHN0ZXApKSk7CiAgICB9CgogICAgZnVuY3Rpb24gcHJlY2lzaW9uUHJlZml4KHN0ZXAsIHZhbHVlKSB7CiAgICAgIHJldHVybiBNYXRoLm1heCgwLCBNYXRoLm1heCgtOCwgTWF0aC5taW4oOCwgTWF0aC5mbG9vcihleHBvbmVudCQxKHZhbHVlKSAvIDMpKSkgKiAzIC0gZXhwb25lbnQkMShNYXRoLmFicyhzdGVwKSkpOwogICAgfQoKICAgIGZ1bmN0aW9uIHByZWNpc2lvblJvdW5kKHN0ZXAsIG1heCkgewogICAgICBzdGVwID0gTWF0aC5hYnMoc3RlcCksIG1heCA9IE1hdGguYWJzKG1heCkgLSBzdGVwOwogICAgICByZXR1cm4gTWF0aC5tYXgoMCwgZXhwb25lbnQkMShtYXgpIC0gZXhwb25lbnQkMShzdGVwK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bGFtYmRhMSkpIGxhbWJkYTEgPSBsYW1iZGE7CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICBpZiAoYW5nbGUobGFtYmRhLCBsYW1iZGExKSA+IGFuZ2xlKGxhbWJkYTAkMSwgbGFtYmRhMSkpIGxhbWJkYTAkMSA9IGxhbWJkYTsKICAgICAgICAgIH0KICAgICAgICB9IGVsc2UgewogICAgICAgICAgaWYgKGxhbWJkYTEgPj0gbGFtYmRhMCQxKSB7CiAgICAgICAgICAgIGlmIChsYW1iZGEgPCBsYW1iZGEwJDEpIGxhbWJkYTAkMSA9IGxhbWJkYTsKICAgICAgICAgICAgaWYgKGxhbWJkYSA+IGxhbWJkYTEpIGxhbWJkYTEgPSBsYW1iZGE7CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICBpZiAobGFtYmRhID4gbGFtYmRhMikgewogICAgICAgICAgICAgIGlmIChhbmdsZShsYW1iZGEwJDEsIGxhbWJkYSkgPiBhbmdsZShsYW1iZGEwJDEsIGxhbWJkYTEpKSBsYW1iZGExID0gbGFtYmRhOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgIGlmIChhbmdsZShsYW1iZGEsIGxhbWJkYTEpID4gYW5nbGUobGFtYmRhMCQxLCBsYW1iZGExKSkgbGFtYmRhMCQxID0gbGFtYmRhOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9IGVsc2UgewogICAgICAgIHJhbmdlcy5wdXNoKHJhbmdlID0gW2xhbWJkYTAkMSA9IGxhbWJkYSwgbGFtYmRhMSA9IGxhbWJkYV0pOwogICAgICB9CiAgICAgIGlmIChwaGkgPCBwaGkwKSBwaGkwID0gcGhpOwogICAgICBpZiAocGhpID4gcGhpMSkgcGhpMSA9IHBoaTsKICAgICAgcDAgPSBwLCBsYW1iZGEyID0gbGFtYmRhOwogICAgfQoKICAgIGZ1bmN0aW9uIGJvdW5kc0xpbmVTdGFydCgpIHsKICAgICAgYm91bmRzU3R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BoaSA9IGNvcyQxKHBoaSksCiAgICAgICAgICB4ID0gY29zUGhpICogY29zJDEobGFtYmRhKSwKICAgICAgICAgIHkgPSBjb3NQaGkgKiBzaW4kMShsYW1iZGEpLAogICAgICAgICAgeiA9IHNpbiQxKHBoaSksCiAgICAgICAgICB3ID0gYXRhbjIoc3FydCgodyA9IHkwICogeiAtIHowICogeSkgKiB3ICsgKHcgPSB6MCAqIHggLSB4MCAqIHopICogdyArICh3ID0geDAgKiB5IC0geTAgKiB4KSAqIHcpLCB4MCAqIHggKyB5MCAqIHkgKyB6MCAqIHopOwogICAgICBXMSArPSB3OwogICAgICBYMSArPSB3ICogKHgwICsgKHgwID0geCkpOwogICAgICBZMSArPSB3ICogKHkwICsgKHkwID0geSkpOwogICAgICBaMSArPSB3ICogKHowICsgKHowID0geikpOwogICAgICBjZW50cm9pZFBvaW50Q2FydGVzaWFuKHgwLCB5MCwgejApOwogICAgfQoKICAgIGZ1bmN0aW9uIGNlbnRyb2lkTGluZUVuZCgpIHsKICAgICAgY2VudHJvaWRTdHJlYW0ucG9pbnQgPSBjZW50cm9pZFBvaW50OwogICAgfQoKICAgIC8vIFNlZSBKLiBFLiBCcm9jaywgVGhlIEluZXJ0aWEgVGVuc29yIGZvciBhIFNwaGVyaWNhbCBUcmlhbmdsZSwKICAgIC8vIEouIEFwcGxpZWQgTWVjaGFuaWNzIDQyLCAyMzkgKDE5NzUpLgogICAgZnVuY3Rpb24gY2VudHJvaWRSaW5nU3RhcnQoKSB7CiAgICAgIGNlbnRyb2lkU3RyZWFtLnBvaW50ID0gY2VudHJvaWRSaW5nUG9pbnRGaXJzdDsKICAgIH0KCiAgICBmdW5jdGlvbiBjZW50cm9pZFJpbmdFbmQoKSB7CiAgICAgIGNlbnRyb2lkUmluZ1BvaW50KGxhbWJkYTAwJDIsIHBoaTAwJDIpOwogICAgICBjZW50cm9pZFN0cmVhbS5wb2ludCA9IGNlbnRyb2lkUG9pbnQ7CiAgICB9CgogICAgZnVuY3Rpb24gY2VudHJvaWRSaW5nUG9pbnRGaXJzdChsYW1iZGEsIHBoaSkgewogICAgICBsYW1iZGEwMCQyID0gbGFtYmRhLCBwaGkwMCQyID0gcGhpOwogICAgICBsYW1iZGEgKj0gcmFkaWFucywgcGhpICo9IHJhZGlhbnM7CiAgICAgIGNlbnRyb2lkU3RyZWFtLnBvaW50ID0gY2VudHJvaWRSaW5nUG9pbnQ7CiAgICAgIHZhciBjb3NQaGkgPSBjb3MkMShwaGkpOwogICAgICB4MCA9IGNvc1BoaSAqIGNvcyQxKGxhbWJkYSk7CiAgICAgIHkwID0gY29zUGhpICogc2luJDEobGFtYmRhKTsKICAgICAgejAgPSBzaW4kMShwaGkpOwogICAgICBjZW50cm9pZFBvaW50Q2FydGVzaWFuKHgwLCB5MCwgejApOwogICAgfQoKICAgIGZ1bmN0aW9uIGNlbnRyb2lkUmluZ1BvaW50KGxhbWJkYSwgcGhpKSB7CiAgICAgIGxhbWJkYSAqPSByYWRpYW5zLCBwaGkgKj0gcmFkaWFuczsKICAgICAgdmFyIGNvc1BoaSA9IGNvcyQxKHBoaSksCiAgICAgICAgICB4ID0gY29zUGhpICogY29zJDEobGFtYmRhKSwKICAgICAgICAgIHkgPSBjb3NQaGkgKiBzaW4kMShsYW1iZGEpLAogICAgICAgICAgeiA9IHNpbiQxKHBoaSksCiAgICAgICAgICBjeCA9IHkwICogeiAtIHowICogeSwKICAgICAgICAgIGN5ID0gejAgKiB4IC0geDAgKiB6LAogICAgICAgICAgY3ogPSB4MCAqIHkgLSB5MCAqIHgsCiAgICAgICAgICBtID0gc3FydChjeCAqIGN4ICsgY3kgKiBjeSArIGN6ICogY3opLAogICAgICAgICAgdyA9IGFzaW4obSksIC8vIGxpbmUgd2VpZ2h0ID0gYW5nbGUKICAgICAgICAgIHYgPSBtICYmIC13IC8gbTsgLy8gYXJlYSB3ZWlnaHQgbXVsdGlwbGllcgogICAgICBYMiArPSB2ICogY3g7CiAgICAgIFkyICs9IHYgKiBjeTsKICAgICAgWjIgKz0gdiAqIGN6OwogICAgICBXMSArPSB3OwogICAgICBYMSArPSB3ICogKHgwICsgKHgwID0geCkpOwogICAgICBZMSArPSB3ICogKHkwICsgKHkwID0geSkpOwogICAgICBaMSArPSB3ICogKHowICsgKHowID0geikpOwogICAgICBjZW50cm9pZFBvaW50Q2FydGVzaWFuKHgwLCB5MCwgejApOwogICAgfQoKICAgIGZ1bmN0aW9uIGNlbnRyb2lkKG9iamVjdCkgewogICAgICBXMCA9IFcxID0KICAgICAgWDAgPSBZMCA9IFowID0KICAgICAgWDEgPSBZMSA9IFoxID0KICAgICAgWDIgPSBZMiA9IFoyID0gMDsKICAgICAgZ2VvU3RyZWFtKG9iamVjdCwgY2VudHJvaWRTdHJlYW0pOwoKICAgICAgdmFyIHggPSBYMiwKICAgICAgICAgIHkgPSBZMiwKICAgICAgICAgIHogPSBaMiwKICAgICAgICAgIG0gPSB4ICogeCArIHkgKiB5ICsgeiAqIHo7CgogICAgICAvLyBJZiB0aGUgYXJlYS13ZWlnaHRlZCBjY2VudHJvaWQgaXMgdW5kZWZpbmVkLCBmYWxsIGJhY2sgdG8gbGVuZ3RoLXdlaWdodGVkIGNjZW50cm9pZC4KICAgICAgaWYgKG0gPCBlcHNpbG9uMiQxKSB7CiAgICAgICAgeCA9IFgxLCB5ID0gWTEsIHogPSBaMTsKICAgICAgICAvLyBJZiB0aGUgZmVhdHVyZSBoYXMgemVybyBsZW5ndGgsIGZhbGwgYmFjayB0byBhcml0aG1ldGljIG1lYW4gb2YgcG9pbnQgdmVjdG9ycy4KICAgICAgICBpZiAoVzEgPCBlcHNpbG9uJDIpIHggPSBYMCwgeSA9IFkwLCB6ID0gWjA7CiAgICAgICAgbSA9IHggKiB4ICsgeSAqIHkgKyB6ICogejsKICAgICAgICAvLyBJZiB0aGUgZmVhdHVyZSBzdGlsbCBoYXMgYW4gdW5kZWZpbmVkIGNjZW50cm9pZCwgdGhlbiByZXR1cm4uCiAgICAgICAgaWYgKG0gPCBl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oZGVsdGFHYW1tYSk7CgogICAgICBmdW5jdGlvbiByb3RhdGlvbihsYW1iZGEsIHBoaSkgewogICAgICAgIHZhciBjb3NQaGkgPSBjb3MkMShwaGkpLAogICAgICAgICAgICB4ID0gY29zJDEobGFtYmRhKSAqIGNvc1BoaSwKICAgICAgICAgICAgeSA9IHNpbiQxKGxhbWJkYSkgKiBjb3NQaGksCiAgICAgICAgICAgIHogPSBzaW4kMShwaGkpLAogICAgICAgICAgICBrID0geiAqIGNvc0RlbHRhUGhpICsgeCAqIHNpbkRlbHRhUGhpOwogICAgICAgIHJldHVybiBbCiAgICAgICAgICBhdGFuMih5ICogY29zRGVsdGFHYW1tYSAtIGsgKiBzaW5EZWx0YUdhbW1hLCB4ICogY29zRGVsdGFQaGkgLSB6ICogc2luRGVsdGFQaGkpLAogICAgICAgICAgYXNpbihrICogY29zRGVsdGFHYW1tYSArIHkgKiBzaW5EZWx0YUdhbW1hKQogICAgICAgIF07CiAgICAgIH0KCiAgICAgIHJvdGF0aW9uLmludmVydCA9IGZ1bmN0aW9uKGxhbWJkYSwgcGhpKSB7CiAgICAgICAgdmFyIGNvc1BoaSA9IGNvcyQxKHBoaSksCiAgICAgICAgICAgIHggPSBjb3MkMShsYW1iZGEpICogY29zUGhpLAogICAgICAgICAgICB5ID0gc2luJDEobGFtYmRhKSAqIGNvc1BoaSwKICAgICAgICAgICAgeiA9IHNpbiQxKHBoaSksCiAgICAgICAgICAgIGsgPSB6ICogY29zRGVsdGFHYW1tYSAtIHkgKiBzaW5EZWx0YUdhbW1hOwogICAgICAgIHJldHVybiBbCiAgICAgICAgICBhdGFuMih5ICogY29zRGVsdGFHYW1tYSArIHogKiBzaW5EZWx0YUdhbW1hLCB4ICogY29zRGVsdGFQaGkgKyBrICogc2luRGVsdGFQaGkpLAogICAgICAgICAgYXNpbihrICogY29zRGVsdGFQaGkgLSB4ICogc2luRGVsdGFQaGkpCiAgICAgICAgXTsKICAgICAgfTsKCiAgICAgIHJldHVybiByb3R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AgICAgdmFyIHJhZGl1cyA9IGFjb3MoLXBvaW50WzFdKTsKICAgICAgcmV0dXJuICgoLXBvaW50WzJdIDwgMCA/IC1yYWRpdXMgOiByYWRpdXMpICsgdGF1JDMgLSBlcHNpbG9uJDIpICUgdGF1JDM7CiAgICB9CgogICAgZnVuY3Rpb24gY2lyY2xlKCkgewogICAgICB2YXIgY2VudGVyID0gY29uc3RhbnQkOChbMCwgMF0pLAogICAgICAgICAgcmFkaXVzID0gY29uc3RhbnQkOCg5MCksCiAgICAgICAgICBwcmVjaXNpb24gPSBjb25zdGFudCQ4KDYpLAogICAgICAgICAgcmluZywKICAgICAgICAgIHJvdGF0ZSwKICAgICAgICAgIHN0cmVhbSA9IHtwb2ludDogcG9pbnR9OwoKICAgICAgZnVuY3Rpb24gcG9pbnQoeCwgeSkgewogICAgICAgIHJpbmcucHVzaCh4ID0gcm90YXRlKHgsIHkpKTsKICAgICAgICB4WzBdICo9IGRlZ3JlZXMkMSwgeFsxXSAqPSBkZWdyZWVzJDE7CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIGNpcmNsZSgpIHsKICAgICAgICB2YXIgYyA9IGNlbnRlci5hcHBseSh0aGlzLCBhcmd1bWVudHMpLAogICAgICAgICAgICByID0gcmFkaXVzLmFwcGx5KHRoaXMsIGFyZ3VtZW50cykgKiByYWRpYW5zLAogICAgICAgICAgICBwID0gcHJlY2lzaW9uLmFwcGx5KHRoaXMsIGFyZ3VtZW50cykgKiByYWRpYW5zOwogICAgICAgIHJpbmcgPSBbXTsKICAgICAgICByb3RhdGUgPSByb3RhdGVSYWRpYW5zKC1jWzBdICogcmFkaWFucywgLWNbMV0gKiByYWRpYW5zLCAwKS5pbnZlcnQ7CiAgICAgICAgY2lyY2xlU3RyZWFtKHN0cmVhbSwgciwgcCwgMSk7CiAgICAgICAgYyA9IHt0eXBlOiAiUG9seWdvbiIsIGNvb3JkaW5hdGVzOiBbcmluZ119OwogICAgICAgIHJpbmcgPSByb3RhdGUgPSBudWxsOwogICAgICAgIHJldHVybiBjOwogICAgICB9CgogICAgICBjaXJjbGUuY2VudGVyID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKGNlbnRlciA9IHR5cGVvZiBfID09PSAiZnVuY3Rpb24iID8gXyA6IGNvbnN0YW50JDgoWytfWzBdLCArX1sxXV0pLCBjaXJjbGUpIDogY2VudGVyOwogICAgICB9OwoKICAgICAgY2lyY2xlLnJhZGl1cyA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChyYWRpdXMgPSB0eXBlb2YgXyA9PT0gImZ1bmN0aW9uIiA/IF8gOiBjb25zdGFudCQ4KCtfKSwgY2lyY2xlKSA6IHJhZGl1czsKICAgICAgfTsKCiAgICAgIGNpcmNsZS5wcmVjaXNpb24gPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAocHJlY2lzaW9uID0gdHlwZW9mIF8gPT09ICJmdW5jdGlvbiIgPyBfIDogY29uc3RhbnQkOCgrXyksIGNpcmNsZSkgOiBwcmVjaXNpb247CiAgICAgIH07CgogICAgICByZXR1cm4gY2lyY2xlOwogICAgfQoKICAgIGZ1bmN0aW9uIGNsaXBCdWZmZXIoKSB7CiAgICAgIHZhciBsaW5lcyA9IFtdLAogICAgICAgICAgbGluZTsKICAgICAgcmV0dXJuIHsKICAgICAgICBwb2ludDogZnVuY3Rpb24oeCwgeSwgbSkgewogICAgICAgICAgbGluZS5wdXNoKFt4LCB5LCBtXSk7CiAgICAgICAgfSwKICAgICAgICBsaW5lU3RhcnQ6IGZ1bmN0aW9uKCkgewogICAgICAgICAgbGluZXMucHVzaChsaW5lID0gW10pOwogICAgICAgIH0sCiAgICAgICAgbGluZUVuZDogbm9vcCQyLAogICAgICAgIHJlam9pbjogZnVuY3Rpb24oKSB7CiAgICAgICAgICBpZiAobGluZXMubGVuZ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gY29tcGFyZUludGVyc2VjdGlvbiwgc3RhcnRJbnNpZGUsIGludGVycG9sYXRlLCBzdHJlYW0pIHsKICAgICAgdmFyIHN1YmplY3QgPSBbXSwKICAgICAgICAgIGNsaXAgPSBbXSwKICAgICAgICAgIGksCiAgICAgICAgICBuOwoKICAgICAgc2VnbWVudHMuZm9yRWFjaChmdW5jdGlvbihzZWdtZW50KSB7CiAgICAgICAgaWYgKChuID0gc2VnbWVudC5sZW5ndGggLSAxKSA8PSAwKSByZXR1cm47CiAgICAgICAgdmFyIG4sIHAwID0gc2VnbWVudFswXSwgcDEgPSBzZWdtZW50W25dLCB4OwoKICAgICAgICBpZiAocG9pbnRFcXVhbChwMCwgcDEpKSB7CiAgICAgICAgICBpZiAoIXAwWzJdICYmICFwMVsyXSkgewogICAgICAgICAgICBzdHJlYW0ubGluZVN0YXJ0KCk7CiAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBuOyArK2kpIHN0cmVhbS5wb2ludCgocDAgPSBzZWdtZW50W2ldKVswXSwgcDBbMV0pOwogICAgICAgICAgICBzdHJlYW0ubGluZUVuZCgpOwogICAgICAgICAgICByZXR1cm47CiAgICAgICAgICB9CiAgICAgICAgICAvLyBoYW5kbGUgZGVnZW5lcmF0ZSBjYXNlcyBieSBtb3ZpbmcgdGhlIHBvaW50CiAgICAgICAgICBwMVswXSArPSAyICogZXBzaWxvbiQyOwogICAgICAgIH0KCiAgICAgICAgc3ViamVjdC5wdXNoKHggPSBuZXcgSW50ZXJzZWN0aW9uKHAwLCBzZWdtZW50LCBudWxsLCB0cnVlKSk7CiAgICAgICAgY2xpcC5wdXNoKHgubyA9IG5ldyBJbnRlcnNlY3Rpb24ocDAsIG51bGwsIHgsIGZhbHNlKSk7CiAgICAgICAgc3ViamVjdC5wdXNoKHggPSBuZXcgSW50ZXJzZWN0aW9uKHAxLCBzZWdtZW50LCBudWxsLCBmYWxzZSkpOwogICAgICAgIGNsaXAucHVzaCh4Lm8gPSBuZXcgSW50ZXJzZWN0aW9uKHAxLCBudWxsLCB4LCB0cnVlKSk7CiAgICAgIH0pOwoKICAgICAgaWYgKCFzdWJqZWN0Lmxlbmd0aCkgcmV0dXJuOwoKICAgICAgY2xpcC5zb3J0KGNvbXBhcmVJbnRlcnNlY3Rpb24pOwogICAgICBsaW5rJDEoc3ViamVjdCk7CiAgICAgIGxpbmskMShjbGlwKTsKCiAgICAgIGZvciAoaSA9IDAsIG4gPSBjbGlwLmxlbmd0aDsgaSA8IG47ICsraSkgewogICAgICAgIGNsaXBbaV0uZSA9IHN0YXJ0SW5zaWRlID0gIXN0YXJ0SW5zaWRlOwogICAgICB9CgogICAgICB2YXIgc3RhcnQgPSBzdWJqZWN0WzBdLAogICAgICAgICAgcG9pbnRzLAogICAgICAgICAgcG9pbnQ7CgogICAgICB3aGlsZSAoMSkgewogICAgICAgIC8vIEZpbmQgZmlyc3QgdW52aXNpdGVkIGludGVyc2VjdGlvbi4KICAgICAgICB2YXIgY3VycmVudCA9IHN0YXJ0LAogICAgICAgICAgICBpc1N1YmplY3QgPSB0cnVlOwogICAgICAgIHdoaWxlIChjdXJyZW50LnYpIGlmICgoY3VycmVudCA9IGN1cnJlbnQubikgPT09IHN0YXJ0KSByZXR1cm47CiAgICAgICAgcG9pbnRzID0gY3VycmVudC56OwogICAgICAgIHN0cmVhbS5saW5lU3RhcnQoKTsKICAgICAgICBkbyB7CiAgICAgICAgICBjdXJyZW50LnYgPSBjdXJyZW50Lm8udiA9IHRydWU7CiAgICAgICAgICBpZiAoY3VycmVudC5lKSB7CiAgICAgICAgICAgIGlmIChpc1N1YmplY3QpIHsKICAgICAgICAgICAgICBmb3IgKGkgPSAwLCBuID0gcG9pbnRzLmxlbmd0aDsgaSA8IG47ICsraSkgc3RyZWFtLnBvaW50KChwb2ludCA9IHBvaW50c1tpXSlbMF0sIHBvaW50WzFdKTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICBpbnRlcnBvbGF0ZShjdXJyZW50LngsIGN1cnJlbnQubi54LCAxLCBzdHJlYW0pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGN1cnJlbnQgPSBjdXJyZW50Lm47CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICBpZiAoaXNTdWJqZWN0KSB7CiAgICAgICAgICAgICAgcG9pbnRzID0gY3VycmVudC5wLno7CiAgICAgICAgICAgICAgZm9yIChpID0gcG9pbnRzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSBzdHJlYW0ucG9pbnQoKHBvaW50ID0gcG9pbnRzW2ldKVswXSwgcG9pbnRbMV0pOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgIGludGVycG9sYXRlKGN1cnJlbnQueCwgY3VycmVudC5wLngsIC0xLCBzdHJlYW0pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGN1cnJlbnQgPSBjdXJyZW50LnA7CiAgICAgICAgICB9CiAgICAgICAgICBjdXJyZW50ID0gY3VycmVudC5vOwogICAgICAgICAgcG9pbnRzID0gY3VycmVudC56OwogICAgICAgICAgaXNTdWJqZWN0ID0gIWlzU3ViamVjdDsKICAgICAgICB9IHdoaWxlICghY3VycmVudC52KTsKICAgICAgICBzdHJlYW0ubGluZUVuZCgpOwogICAgICB9CiAgICB9CgogICAgZnVuY3Rpb24gbGluayQxKGFycmF5KSB7CiAgICAgIGlmICghKG4gPSBhcnJheS5sZW5ndGgpKSByZXR1cm47CiAgICAgIHZhciBuLAogICAgICAgICAgaSA9IDAsCiAgICAgICAgICBhID0gYXJyYXlbMF0sCiAgICAgICAgICBiOwogICAgICB3aGlsZSAoKytpIDwgbikgewogICAgICAgIGEubiA9IGIgPSBhcnJheVtpXTsKICAgICAgICBiLnAgPSBhOwogICAgICAgIGEgPSBiOwogICAgICB9CiAgICAgIGEubiA9IGIgPSBhcnJheVswXTsKICAgICAgYi5wID0gYTsKICAgIH0KCiAgICB2YXIgc3VtJDEgPSBhZGRlcigpOwoKICAgIGZ1bmN0aW9uIGxvbmdpdHVkZShwb2ludCkgewogICAgICBpZiAoYWJzKHBvaW50WzBdKSA8PSBwaSQzKQogICAgICAgIHJldHVybiBwb2ludFswXTsKICAgICAgZWxzZQogICAgICAgIHJldHVybiBzaWduKHBvaW50WzBdKSAqICgoYWJzKHBvaW50WzBdKSArIHBpJDMpICUgdGF1JDMgLSBwaSQzKTsKICAgIH0KCiAgICBmdW5jdGlvbiBwb2x5Z29uQ29udGFpbnMocG9seWdvbiwgcG9pbnQpIHsKICAgICAgdmFyIGxhbWJkYSA9IGxvbmdpdHVkZShwb2ludCksCiAgICAgICAgICBwaGkgPSBwb2ludFsxXSwKICAgICAgICAgIHNpblBoaSA9IHNpbiQxKHBoaSksCiAgICAgICAgICBub3JtYWwgPSBbc2luJDEobGFtYmRhKSwgLWNvcyQxKGxhbWJkYSksIDBdLAogICAgICAgICAgYW5nbGUgPSAwLAogICAgICAgICAgd2luZGluZyA9IDA7CgogICAgICBzdW0kMS5yZXNldCgpOwoKICAgICAgaWYgKHNpblBoaSA9PT0gMSkgcGhpID0gaGFsZlBpJDIgKyBlcHNpbG9uJDI7CiAgICAgIGVsc2UgaWYgKHNpblBoaSA9PT0gLTEpIHBoaSA9IC1oYWxmUGkkMiAtIGVwc2lsb24kMjsKCiAgICAgIGZvciAodmFyIGkgPSAwLCBuID0gcG9seWdvbi5sZW5ndGg7IGkgPCBuOyArK2kpIHsKICAgICAgICBpZiAoIShtID0gKHJpbmcgPSBwb2x5Z29uW2ldKS5sZW5ndGgpKSBjb250aW51ZTsKICAgICAgICB2YXIgcmluZywKICAgICAgICAgICAgbSwKICAgICAgICAgICAgcG9pbnQwID0gcmluZ1ttIC0gMV0sCiAgICAgICAgICAgIGxhbWJkYTAgPSBsb25naXR1ZGUocG9pbnQwKSwKICAgICAgICAgICAgcGhpMCA9IHBvaW50MFsxXSAvIDIgKyBxdWFydGVyUGksCiAgICAgICAgICAgIHNpblBoaTAgPSBzaW4kMShwaGkwKSwKICAgICAgICAgICAgY29zUGhpMCA9IGNvcyQxKHBoaTApOwoKICAgICAgICBmb3IgKHZhciBqID0gMDsgaiA8IG07ICsraiwgbGFtYmRhMCA9IGxhbWJkYTEsIHNpblBoaTAgPSBzaW5QaGkxLCBjb3NQaGkwID0gY29zUGhpMSwgcG9pbnQwID0gcG9pbnQxKSB7CiAgICAgICAgICB2YXIgcG9pbnQxID0gcmluZ1tqXSwKICAgICAgICAgICAgICBsYW1iZGExID0gbG9uZ2l0dWRlKHBvaW50MSksCiAgICAgICAgICAgICAgcGhpMSA9IHBvaW50MVsxXSAvIDIgKyBxdWFydGVyUGksCiAgICAgICAgICAgICAgc2luUGhpMSA9IHNpbiQxKHBoaTEpLAogICAgICAgICAgICAgIGNvc1BoaTEgPSBjb3MkMShwaGkxKSwKICAgICAgICAgICAgICBkZWx0YSA9IGxhbWJkYTEgLSBsYW1iZGEwLAogICAgICAgICAgICAgIHNpZ24gPSBkZWx0YSA+PSAwID8gMSA6IC0xLAogICAgICAgICAgICAgIGFic0RlbHRhID0gc2lnbiAqIGRlbHRhLAogICAgICAgICAgICAgIGFudGltZXJpZGlhbiA9IGFic0RlbHRhID4gcGkkMywKICAgICAgICAgICAgICBrID0gc2luUGhpMCAqIHNpblBoaTE7CgogICAgICAgICAgc3VtJDEuYWRkKGF0YW4yKGsgKiBzaWduICogc2luJDEoYWJzRGVsdGEpLCBjb3NQaGkwICogY29zUGhpMSArIGsgKiBjb3MkMShhYnNEZWx0YSkpKTsKICAgICAgICAgIGFuZ2xlICs9IGFudGltZXJpZGlhbiA/IGRlbHRhICsgc2lnbiAqIHRhdSQzIDogZGVsdGE7CgogICAgICAgICAgLy8gQXJlIHRoZSBsb25naXR1ZGVzIGVpdGhlciBzaWRlIG9mIHRoZSBwb2ludOKAmXMgbWVyaWRpYW4gKGxhbWJkYSksCiAgICAgICAgICAvLyBhbmQgYXJlIHRoZSBsYXRpdHVkZXMgc21hbGxlciB0aGFuIHRoZSBwYXJhbGxlbCAocGhpKT8KICAgICAgICAgIG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xpcC5saW5lU3RhcnQgPSByaW5nU3RhcnQ7CiAgICAgICAgICAgIGNsaXAubGluZUVuZCA9IHJpbmdFbmQ7CiAgICAgICAgICAgIHNlZ21lbnRzID0gW107CiAgICAgICAgICAgIHBvbHlnb24gPSBbXTsKICAgICAgICAgIH0sCiAgICAgICAgICBwb2x5Z29uRW5kOiBmdW5jdGlvbigpIHsKICAgICAgICAgICAgY2xpcC5wb2ludCA9IHBvaW50OwogICAgICAgICAgICBjbGlwLmxpbmVTdGFydCA9IGxpbmVTdGFydDsKICAgICAgICAgICAgY2xpcC5saW5lRW5kID0gbGluZUVuZDsKICAgICAgICAgICAgc2VnbWVudHMgPSBtZXJnZShzZWdtZW50cyk7CiAgICAgICAgICAgIHZhciBzdGFydEluc2lkZSA9IHBvbHlnb25Db250YWlucyhwb2x5Z29uLCBzdGFydCk7CiAgICAgICAgICAgIGlmIChzZWdtZW50cy5sZW5ndGgpIHsKICAgICAgICAgICAgICBpZiAoIXBvbHlnb25TdGFydGVkKSBzaW5rLnBvbHlnb25TdGFydCgpLCBwb2x5Z29uU3RhcnRlZCA9IHRydWU7CiAgICAgICAgICAgICAgY2xpcFJlam9pbihzZWdtZW50cywgY29tcGFyZUludGVyc2VjdGlvbiwgc3RhcnRJbnNpZGUsIGludGVycG9sYXRlLCBzaW5rKTsKICAgICAgICAgICAgfSBlbHNlIGlmIChzdGFydEluc2lkZSkgewogICAgICAgICAgICAgIGlmICghcG9seWdvblN0YXJ0ZWQpIHNpbmsucG9seWdvblN0YXJ0KCksIHBvbHlnb25TdGFydGVkID0gdHJ1ZTsKICAgICAgICAgICAgICBzaW5rLmxpbmVTdGFydCgpOwogICAgICAgICAgICAgIGludGVycG9sYXRlKG51bGwsIG51bGwsIDEsIHNpbmspOwogICAgICAgICAgICAgIHNpbmsubGluZUVuZCgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChwb2x5Z29uU3RhcnRlZCkgc2luay5wb2x5Z29uRW5kKCksIHBvbHlnb25TdGFydGVkID0gZmFsc2U7CiAgICAgICAgICAgIHNlZ21lbnRzID0gcG9seWdvbiA9IG51bGw7CiAgICAgICAgICB9LAogICAgICAgICAgc3BoZXJlOiBmdW5jdGlvbigpIHsKICAgICAgICAgICAgc2luay5wb2x5Z29uU3RhcnQoKTsKICAgICAgICAgICAgc2luay5saW5lU3RhcnQoKTsKICAgICAgICAgICAgaW50ZXJwb2xhdGUobnVsbCwgbnVsbCwgMSwgc2luayk7CiAgICAgICAgICAgIHNpbmsubGluZUVuZCgpOwogICAgICAgICAgICBzaW5rLnBvbHlnb25FbmQoKTsKICAgICAgICAgIH0KICAgICAgICB9OwoKICAgICAgICBmdW5jdGlvbiBwb2ludChsYW1iZGEsIHBoaSkgewogICAgICAgICAgaWYgKHBvaW50VmlzaWJsZShsYW1iZGEsIHBoaSkpIHNpbmsucG9pbnQobGFtYmRhLCBwaGkpOwogICAgICAgIH0KCiAgICAgICAgZnVuY3Rpb24gcG9pbnRMaW5lKGxhbWJkYSwgcGhpKSB7CiAgICAgICAgICBsaW5lLnBvaW50KGxhbWJkYSwgcGhpKTsKICAgICAgICB9CgogICAgICAgIGZ1bmN0aW9uIGxpbmVTdGFydCgpIHsKICAgICAgICAgIGNsaXAucG9pbnQgPSBwb2ludExpbmU7CiAgICAgICAgICBsaW5lLmxpbmVTdGFydCgpOwogICAgICAgIH0KCiAgICAgICAgZnVuY3Rpb24gbGluZUVuZCgpIHsKICAgICAgICAgIGNsaXAucG9pbnQgPSBwb2ludDsKICAgICAgICAgIGxpbmUubGluZUVuZCgpOwogICAgICAgIH0KCiAgICAgICAgZnVuY3Rpb24gcG9pbnRSaW5nKGxhbWJkYSwgcGhpKSB7CiAgICAgICAgICByaW5nLnB1c2goW2xhbWJkYSwgcGhpXSk7CiAgICAgICAgICByaW5nU2luay5wb2ludChsYW1iZGEsIHBoaSk7CiAgICAgICAgfQoKICAgICAgICBmdW5jdGlvbiByaW5nU3RhcnQoKSB7CiAgICAgICAgICByaW5nU2luay5saW5lU3RhcnQoKTsKICAgICAgICAgIHJpbmcgPSBbXTsKICAgICAgICB9CgogICAgICAgIGZ1bmN0aW9uIHJpbmdFbmQoKSB7CiAgICAgICAgICBwb2ludFJpbmcocmluZ1swXVswXSwgcmluZ1swXVsxXSk7CiAgICAgICAgICByaW5nU2luay5saW5lRW5kKCk7CgogICAgICAgICAgdmFyIGNsZWFuID0gcmluZ1NpbmsuY2xlYW4oKSwKICAgICAgICAgICAgICByaW5nU2VnbWVudHMgPSByaW5nQnVmZmVyLnJlc3VsdCgpLAogICAgICAgICAgICAgIGksIG4gPSByaW5nU2VnbWVudHMubGVuZ3RoLCBtLAogICAgICAgICAgICAgIHNlZ21lbnQsCiAgICAgICAgICAgICAgcG9pbnQ7CgogICAgICAgICAgcmluZy5wb3AoKTsKICAgICAgICAgIHBvbHlnb24ucHVzaChyaW5nKTsKICAgICAgICAgIHJpbmcgPSBudWxsOwoKICAgICAgICAgIGlmICghbikgcmV0dXJuOwoKICAgICAgICAgIC8vIE5vIGludGVyc2VjdGlvbnMuCiAgICAgICAgICBpZiAoY2xlYW4gJiAxKSB7CiAgICAgICAgICAgIHNlZ21lbnQgPSByaW5nU2VnbWVudHNbMF07CiAgICAgICAgICAgIGlmICgobSA9IHNlZ21lbnQubGVuZ3RoIC0gMSkgPiAwKSB7CiAgICAgICAgICAgICAgaWYgKCFwb2x5Z29uU3RhcnRlZCkgc2luay5wb2x5Z29uU3RhcnQoKSwgcG9seWdvblN0YXJ0ZWQgPSB0cnVlOwogICAgICAgICAgICAgIHNpbmsubGluZVN0YXJ0KCk7CiAgICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IG07ICsraSkgc2luay5wb2ludCgocG9pbnQgPSBzZWdtZW50W2ldKVswXSwgcG9pbnRbMV0pOwogICAgICAgICAgICAgIHNpbmsubGluZUVuZCgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgIH0KCiAgICAgICAgICAvLyBSZWpvaW4gY29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aW50KHNpZ24wLCBwaGkwKTsKICAgICAgICAgICAgc3RyZWFtLmxpbmVFbmQoKTsKICAgICAgICAgICAgc3RyZWFtLmxpbmVTdGFydCgpOwogICAgICAgICAgICBzdHJlYW0ucG9pbnQoc2lnbjEsIHBoaTApOwogICAgICAgICAgICBzdHJlYW0ucG9pbnQobGFtYmRhMSwgcGhpMCk7CiAgICAgICAgICAgIGNsZWFuID0gMDsKICAgICAgICAgIH0gZWxzZSBpZiAoc2lnbjAgIT09IHNpZ24xICYmIGRlbHRhID49IHBpJDMpIHsgLy8gbGluZSBjcm9zc2VzIGFudGltZXJpZGlhbgogICAgICAgICAgICBpZiAoYWJzKGxhbWJkYTAgLSBzaWduMCkgPCBlcHNpbG9uJDIpIGxhbWJkYTAgLT0gc2lnbjAgKiBlcHNpbG9uJDI7IC8vIGhhbmRsZSBkZWdlbmVyYWNpZXMKICAgICAgICAgICAgaWYgKGFicyhsYW1iZGExIC0gc2lnbjEpIDwgZXBzaWxvbiQyKSBsYW1iZGExIC09IHNpZ24xICogZXBzaWxvbiQyOwogICAgICAgICAgICBwaGkwID0gY2xpcEFudGltZXJpZGlhbkludGVyc2VjdChsYW1iZGEwLCBwaGkwLCBsYW1iZGExLCBwaGkxKTsKICAgICAgICAgICAgc3RyZWFtLnBvaW50KHNpZ24wLCBwaGkwKTsKICAgICAgICAgICAgc3RyZWFtLmxpbmVFbmQoKTsKICAgICAgICAgICAgc3RyZWFtLmxpbmVTdGFydCgpOwogICAgICAgICAgICBzdHJlYW0ucG9pbnQoc2lnbjEsIHBoaTApOwogICAgICAgICAgICBjbGVhbiA9IDA7CiAgICAgICAgICB9CiAgICAgICAgICBzdHJlYW0ucG9pbnQobGFtYmRhMCA9IGxhbWJkYTEsIHBoaTAgPSBwaGkxKTsKICAgICAgICAgIHNpZ24wID0gc2lnbjE7CiAgICAgICAgfSwKICAgICAgICBsaW5lRW5kOiBmdW5jdGlvbigpIHsKICAgICAgICAgIHN0cmVhbS5saW5lRW5kKC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AgICAgIHZhciBwb2ludDEgPSBbbGFtYmRhLCBwaGldLAogICAgICAgICAgICAgICAgcG9pbnQyLAogICAgICAgICAgICAgICAgdiA9IHZpc2libGUobGFtYmRhLCBwaGkpLAogICAgICAgICAgICAgICAgYyA9IHNtYWxsUmFkaXVzCiAgICAgICAgICAgICAgICAgID8gdiA/IDAgOiBjb2RlKGxhbWJkYSwgcGhpKQogICAgICAgICAgICAgICAgICA6IHYgPyBjb2RlKGxhbWJkYSArIChsYW1iZGEgPCAwID8gcGkkMyA6IC1waSQzKSwgcGhpKSA6IDA7CiAgICAgICAgICAgIGlmICghcG9pbnQwICYmICh2MDAgPSB2MCA9IHYpKSBzdHJlYW0ubGluZVN0YXJ0KCk7CiAgICAgICAgICAgIGlmICh2ICE9PSB2MCkgewogICAgICAgICAgICAgIHBvaW50MiA9IGludGVyc2VjdChwb2ludDAsIHBvaW50MSk7CiAgICAgICAgICAgICAgaWYgKCFwb2ludDIgfHwgcG9pbnRFcXVhbChwb2ludDAsIHBvaW50MikgfHwgcG9pbnRFcXVhbChwb2ludDEsIHBvaW50MikpCiAgICAgICAgICAgICAgICBwb2ludDFbMl0gPSAxOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh2ICE9PSB2MCkgewogICAgICAgICAgICAgIGNsZWFuID0gMDsKICAgICAgICAgICAgICBpZiAodikgewogICAgICAgICAgICAgICAgLy8gb3V0c2lkZSBnb2luZyBpbgogICAgICAgICAgICAgICAgc3RyZWFtLmxpbmVTdGFydCgpOwogICAgICAgICAgICAgICAgcG9pbnQyID0gaW50ZXJzZWN0KHBvaW50MSwgcG9pbnQwKTsKICAgICAgICAgICAgICAgIHN0cmVhbS5wb2ludChwb2ludDJbMF0sIHBvaW50MlsxXSk7CiAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIC8vIGluc2lkZSBnb2luZyBvdXQKICAgICAgICAgICAgICAgIHBvaW50MiA9IGludGVyc2VjdChwb2ludDAsIHBvaW50MSk7CiAgICAgICAgICAgICAgICBzdHJlYW0ucG9pbnQocG9pbnQyWzBdLCBwb2ludDJbMV0sIDIpOwogICAgICAgICAgICAgICAgc3RyZWFtLmxpbmVFbmQoKTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgcG9pbnQwID0gcG9pbnQyOwogICAgICAgICAgICB9IGVsc2UgaWYgKG5vdEhlbWlzcGhlcmUgJiYgcG9pbnQwICYmIHNtYWxsUmFkaXVzIF4gdikgewogICAgICAgICAgICAgIHZhciB0OwogICAgICAgICAgICAgIC8vIElmIHRoZSBjb2RlcyBmb3IgdHdvIHBvaW50cyBhcmUgZGlmZmVyZW50LCBvciBhcmUgYm90aCB6ZXJvLAogICAgICAgICAgICAgIC8vIGFuZCB0aGVyZSB0aGlzIHNlZ21lbnQgaW50ZXJzZWN0cyB3aXRoIHRoZSBzbWFsbCBjaXJjbGUuCiAgICAgICAgICAgICAgaWYgKCEoYyAmIGMwKSAmJiAodCA9IGludGVyc2VjdChwb2ludDEsIHBvaW50MCwgdHJ1ZSkpKSB7CiAgICAgICAgICAgICAgICBjbGVhbiA9IDA7CiAgICAgICAgICAgICAgICBpZiAoc21hbGxSYWRpdXMpIHsKICAgICAgICAgICAgICAgICAgc3RyZWFtLmxpbmVTdGFydCgpOwogICAgICAgICAgICAgICAgICBzdHJlYW0ucG9pbnQodFswXVswXSwgdFswXVsxXSk7CiAgICAgICAgICAgICAgICAgIHN0cmVhbS5wb2ludCh0WzFdWzBdLCB0WzFdWzFdKTsKICAgICAgICAgICAgICAgICAgc3RyZWFtLmxpbmVFbmQoKTsKICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgIHN0cmVhbS5wb2ludCh0WzFdWzBdLCB0WzFdWzFdKTsKICAgICAgICAgICAgICAgICAgc3RyZWFtLmxpbmVFbmQoKTsKICAgICAgICAgICAgICAgICAgc3RyZWFtLmxpbmVTdGFydCgpOwogICAgICAgICAgICAgICAgICBzdHJlYW0ucG9pbnQodFswXVswXSwgdFswXVsxXSwgMyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh2ICYmICghcG9pbnQwIHx8ICFwb2ludEVxdWFsKHBvaW50MCwgcG9pbnQxKSkpIHsKICAgICAgICAgICAgICBzdHJlYW0ucG9pbnQocG9pbnQxWzBdLCBwb2ludDFbMV0pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHBvaW50MCA9IHBvaW50MSwgdjAgPSB2LCBjMCA9IGM7CiAgICAgICAgICB9LAogICAgICAgICAgbGluZUVuZDogZnVuY3Rpb24oKSB7CiAgICAgICAgICAgIGlmICh2MCkgc3RyZWFtLmxpbmVFbmQoKTsKICAgICAgICAgICAgcG9pbnQwID0gbnVsbDsKICAgICAgICAgIH0sCiAgICAgICAgICAvLyBSZWpvaW4gZmlyc3QgYW5kIGxhc3Qgc2VnbWVudHMgaWYgdGhlcmUgd2VyZSBpbnRlcnNlY3Rpb25zIGFuZCB0aGUgZmlyc3QKICAgICAgICAgIC8vIGFuZCBsYXN0IHBvaW50cyB3ZXJlIHZpc2libGUuCiAgICAgICAgICBjbGVhbjogZnVuY3Rpb24oKSB7CiAgICAgICAgICAgIHJldHVybiBjbGVhbiB8ICgodjAwICYmIHYwKSA8PCAxKTsKICAgICAgICAgIH0KICAgICAgICB9OwogICAgICB9CgogICAgICAvLyBJbnRlcnNlY3RzIHRoZSBncmVhdCBjaXJjbGUgYmV0d2VlbiBhIGFuZCBiIHdpdGggdGhlIGNsaXAgY2lyY2xlLgogICAgICBmdW5jdGlvbiBpbnRlcnNlY3QoYSwgYiwgdHdvKSB7CiAgICAgICAgdmFyIHBhID0gY2FydGVzaWFuKGEpLAogICAgICAgICAgICBwYiA9IGNhcnRlc2lhbihiKTsKCiAgICAgICAgLy8gV2UgaGF2ZSB0d28gcGxhbmVzLCBuMS5wID0gZDEgYW5kIG4yLnAgPSBkMi4KICAgICAgICAvLyBGaW5kIG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AgICAgYnggPSBiWzBdLAogICAgICAgICAgYnkgPSBiWzFdLAogICAgICAgICAgdDAgPSAwLAogICAgICAgICAgdDEgPSAxLAogICAgICAgICAgZHggPSBieCAtIGF4LAogICAgICAgICAgZHkgPSBieSAtIGF5LAogICAgICAgICAgcjsKCiAgICAgIHIgPSB4MCAtIGF4OwogICAgICBpZiAoIWR4ICYmIHIgPiAwKSByZXR1cm47CiAgICAgIHIgLz0gZHg7CiAgICAgIGlmIChkeCA8IDApIHsKICAgICAgICBpZiAociA8IHQwKSByZXR1cm47CiAgICAgICAgaWYgKHIgPCB0MSkgdDEgPSByOwogICAgICB9IGVsc2UgaWYgKGR4ID4gMCkgewogICAgICAgIGlmIChyID4gdDEpIHJldHVybjsKICAgICAgICBpZiAociA+IHQwKSB0MCA9IHI7CiAgICAgIH0KCiAgICAgIHIgPSB4MSAtIGF4OwogICAgICBpZiAoIWR4ICYmIHIgPCAwKSByZXR1cm47CiAgICAgIHIgLz0gZHg7CiAgICAgIGlmIChkeCA8IDApIHsKICAgICAgICBpZiAociA+IHQxKSByZXR1cm47CiAgICAgICAgaWYgKHIgPiB0MCkgdDAgPSByOwogICAgICB9IGVsc2UgaWYgKGR4ID4gMCkgewogICAgICAgIGlmIChyIDwgdDApIHJldHVybjsKICAgICAgICBpZiAociA8IHQxKSB0MSA9IHI7CiAgICAgIH0KCiAgICAgIHIgPSB5MCAtIGF5OwogICAgICBpZiAoIWR5ICYmIHIgPiAwKSByZXR1cm47CiAgICAgIHIgLz0gZHk7CiAgICAgIGlmIChkeSA8IDApIHsKICAgICAgICBpZiAociA8IHQwKSByZXR1cm47CiAgICAgICAgaWYgKHIgPCB0MSkgdDEgPSByOwogICAgICB9IGVsc2UgaWYgKGR5ID4gMCkgewogICAgICAgIGlmIChyID4gdDEpIHJldHVybjsKICAgICAgICBpZiAociA+IHQwKSB0MCA9IHI7CiAgICAgIH0KCiAgICAgIHIgPSB5MSAtIGF5OwogICAgICBpZiAoIWR5ICYmIHIgPCAwKSByZXR1cm47CiAgICAgIHIgLz0gZHk7CiAgICAgIGlmIChkeSA8IDApIHsKICAgICAgICBpZiAociA+IHQxKSByZXR1cm47CiAgICAgICAgaWYgKHIgPiB0MCkgdDAgPSByOwogICAgICB9IGVsc2UgaWYgKGR5ID4gMCkgewogICAgICAgIGlmIChyIDwgdDApIHJldHVybjsKICAgICAgICBpZiAociA8IHQxKSB0MSA9IHI7CiAgICAgIH0KCiAgICAgIGlmICh0MCA+IDApIGFbMF0gPSBheCArIHQwICogZHgsIGFbMV0gPSBheSArIHQwICogZHk7CiAgICAgIGlmICh0MSA8IDEpIGJbMF0gPSBheCArIHQxICogZHgsIGJbMV0gPSBheSArIHQxICogZHk7CiAgICAgIHJldHVybiB0cnVlOwogICAgfQoKICAgIHZhciBjbGlwTWF4ID0gMWU5LCBjbGlwTWluID0gLWNsaXBNYXg7CgogICAgLy8gVE9ETyBVc2UgZDMtcG9seWdvbuKAmXMgcG9seWdvbkNvbnRhaW5zIGhlcmUgZm9yIHRoZSByaW5nIGNoZWNrPwogICAgLy8gVE9ETyBFbGltaW5hdGUgZHVwbGljYXRlIGJ1ZmZlcmluZyBpbiBjbGlwQnVmZmVyIGFuZCBwb2x5Z29uLnB1c2g/CgogICAgZnVuY3Rpb24gY2xpcFJlY3RhbmdsZSh4MCwgeTAsIHgxLCB5MSkgewoKICAgICAgZnVuY3Rpb24gdmlzaWJsZSh4LCB5KSB7CiAgICAgICAgcmV0dXJuIHgwIDw9IHggJiYgeCA8PSB4MSAmJiB5MCA8PSB5ICYmIHkgPD0geTE7CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIGludGVycG9sYXRlKGZyb20sIHRvLCBkaXJlY3Rpb24sIHN0cmVhbSkgewogICAgICAgIHZhciBhID0gMCwgYTEgPSAwOwogICAgICAgIGlmIChmcm9tID09IG51bGwKICAgICAgICAgICAgfHwgKGEgPSBjb3JuZXIoZnJvbSwgZGlyZWN0aW9uKSkgIT09IChhMSA9IGNvcm5lcih0bywgZGlyZWN0aW9uKSkKICAgICAgICAgICAgfHwgY29tcGFyZVBvaW50KGZyb20sIHRvKSA8IDAgXiBkaXJlY3Rpb24gPiAwKSB7CiAgICAgICAgICBkbyBzdHJlYW0ucG9pbnQoYSA9PT0gMCB8fCBhID09PSAzID8geDAgOiB4MSwgYSA+IDEgPyB5MSA6IHkwKTsKICAgICAgICAgIHdoaWxlICgoYSA9IChhICsgZGlyZWN0aW9uICsgNCkgJSA0KSAhPT0gYTEpOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICBzdHJlYW0ucG9pbnQodG9bMF0sIHRvWzFdKTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIGNvcm5lcihwLCBkaXJlY3Rpb24pIHsKICAgICAgICByZXR1cm4gYWJzKHBbMF0gLSB4MCkgPCBlcHNpbG9uJDIgPyBkaXJlY3Rpb24gPiAwID8gMCA6IDMKICAgICAgICAgICAgOiBhYnMocFswXSAtIHgxKSA8IGVwc2lsb24kMiA/IGRpcmVjdGlvbiA+IDAgPyAyIDogMQogICAgICAgICAgICA6IGFicyhwWzFdIC0geTApIDwgZXBzaWxvbiQyID8gZGlyZWN0aW9uID4gMCA/IDEgOiAwCiAgICAgICAgICAgIDogZGlyZWN0aW9uID4gMCA/IDMgOiAyOyAvLyBhYnMocFsxXSAtIHkxKSA8IGVwc2lsb24KICAgICAgfQoKICAgICAgZnVuY3Rpb24gY29tcGFyZUludGVyc2VjdGlvbihhLCBiKSB7CiAgICAgICAgcmV0dXJuIGNvbXBhcmVQb2ludChhLngsIGIueCk7CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIGNvbXBhcmVQb2ludChhLCBiKSB7CiAgICAgICAgdmFyIGNhID0gY29ybmVyKGEsIDEpLAogICAgICAgICAgICBjYiA9IGNvcm5lcihiLCAxKTsKICAgICAgICByZXR1cm4gY2EgIT09IGNiID8gY2EgLSBjYgogICAgICAgICAgICA6IGNhID09PSAwID8gYlsxXSAtIGFbMV0KICAgICAgICAgICAgOiBjYSA9PT0gMSA/IGFbMF0gLSBiWzBdCiAgICAgICAgICAgIDogY2EgPT09IDIgPyBhWzFdIC0gYlsxXQogICAgICAgICAgICA6IGJbMF0gLSBhWzBdOwogICAgICB9CgogICAgICByZXR1cm4gZnVuY3Rpb24oc3RyZWFtKSB7CiAgICAgICAgdmFyIGFjdGl2ZVN0cmVhbSA9IHN0cmVhbSwKICAgICAgICAgICAgYnVmZmVyU3RyZWFtID0gY2xpcEJ1ZmZlcigpLAogICAgICAgICAgICBzZWdtZW50cywKICAgICAgICAgICAgcG9seWdvbiwKICAgICAgICAgICAgcmluZywKICAgICAgICAgICAgeF9fLCB5X18sIHZfXywgLy8gZmlyc3QgcG9pbnQKICAgICAgICAgICAgeF8sIHlfLCB2XywgLy8gcHJldmlvdXMgcG9pbnQKICAgICAgICAgICAgZmlyc3QsCiAgICAgICAgICAgIGNsZWFuOwoKICAgICAgICB2YXIgY2xpcFN0cmVhbSA9IHsKICAgICAgICAgIHBvaW50OiBwb2ludCwKICAgICAgICAgIGxpbmVTdGFydDogbGluZVN0YXJ0LAogICAgICAgICAgbGluZUVuZDogbGluZUVuZCwKICAgICAgICAgIHBvbHlnb25TdGFydDogcG9seWdvblN0YXJ0LAogICAgICAgICAgcG9seWdvbkVuZDogcG9seWdvbkVuZAogICAgICAgIH07CgogICAgICAgIGZ1bmN0aW9uIHBvaW50KHgsIHkpIHsKICAgICAgICAgIGlmICh2aXNpYmxlKHgsIHkpKSBhY3RpdmVTdHJlYW0ucG9pbnQoeCwgeSk7CiAgICAgICAgfQoKICAgICAgICBmdW5jdGlvbiBwb2x5Z29uSW5zaWRlKCkgewogICAgICAgICAgdmFyIHdpbmRpbmcgPSAwOwoKICAgICAgICAgIGZvciAodmFyIGkgPSAwLCBuID0gcG9seWdvbi5sZW5ndGg7IGkgPCBuOyArK2kpIHsKICAgICAgICAgICAgZm9yICh2YXIgcmluZyA9IHBvbHlnb25baV0sIGogPSAxLCBtID0g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2aXNpYmxlKSB7CiAgICAgICAgICAgIHN0cmVhbS5wb2x5Z29uU3RhcnQoKTsKICAgICAgICAgICAgaWYgKGNsZWFuSW5zaWRlKSB7CiAgICAgICAgICAgICAgc3RyZWFtLmxpbmVTdGFydCgpOwogICAgICAgICAgICAgIGludGVycG9sYXRlKG51bGwsIG51bGwsIDEsIHN0cmVhbSk7CiAgICAgICAgICAgICAgc3RyZWFtLmxpbmVFbmQoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodmlzaWJsZSkgewogICAgICAgICAgICAgIGNsaXBSZWpvaW4oc2VnbWVudHMsIGNvbXBhcmVJbnRlcnNlY3Rpb24sIHN0YXJ0SW5zaWRlLCBpbnRlcnBvbGF0ZSwgc3RyZWFtKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBzdHJlYW0ucG9seWdvbkVuZCgpOwogICAgICAgICAgfQogICAgICAgICAgYWN0aXZlU3RyZWFtID0gc3RyZWFtLCBzZWdtZW50cyA9IHBvbHlnb24gPSByaW5nID0gbnVsbDsKICAgICAgICB9CgogICAgICAgIGZ1bmN0aW9uIGxpbmVTdGFydCgpIHsKICAgICAgICAgIGNsaXBTdHJlYW0ucG9pbnQgPSBsaW5lUG9pbnQ7CiAgICAgICAgICBpZiAocG9seWdvbikgcG9seWdvbi5wdXNoKHJpbmcgPSBbXSk7CiAgICAgICAgICBmaXJzdCA9IHRydWU7CiAgICAgICAgICB2XyA9IGZhbHNlOwogICAgICAgICAgeF8gPSB5XyA9IE5hTjsKICAgICAgICB9CgogICAgICAgIC8vIFRPRE8gcmF0aGVyIHRoYW4gc3BlY2lhbC1jYXNlIHBvbHlnb25zLCBzaW1wbHkgaGFuZGxlIHRoZW0gc2VwYXJhdGVseS4KICAgICAgICAvLyBJZGVhbGx5LCBjb2luY2lkZW50IGludGVyc2VjdGlvbiBwb2ludHMgc2hvdWxkIGJlIGppdHRlcmVkIHRvIGF2b2lkCiAgICAgICAgLy8gY2xpcHBpbmcgaXNzdWVzLgogICAgICAgIGZ1bmN0aW9uIGxpbmVFbmQoKSB7CiAgICAgICAgICBpZiAoc2VnbWVudHMpIHsKICAgICAgICAgICAgbGluZVBvaW50KHhfXywgeV9fKTsKICAgICAgICAgICAgaWYgKHZfXyAmJiB2XykgYnVmZmVyU3RyZWFtLnJlam9pbigpOwogICAgICAgICAgICBzZWdtZW50cy5wdXNoKGJ1ZmZlclN0cmVhbS5yZXN1bHQoKSk7CiAgICAgICAgICB9CiAgICAgICAgICBjbGlwU3RyZWFtLnBvaW50ID0gcG9pbnQ7CiAgICAgICAgICBpZiAodl8pIGFjdGl2ZVN0cmVhbS5saW5lRW5kKCk7CiAgICAgICAgfQoKICAgICAgICBmdW5jdGlvbiBsaW5lUG9pbnQoeCwgeSkgewogICAgICAgICAgdmFyIHYgPSB2aXNpYmxlKHgsIHkpOwogICAgICAgICAgaWYgKHBvbHlnb24pIHJpbmcucHVzaChbeCwgeV0pOwogICAgICAgICAgaWYgKGZpcnN0KSB7CiAgICAgICAgICAgIHhfXyA9IHgsIHlfXyA9IHksIHZfXyA9IHY7CiAgICAgICAgICAgIGZpcnN0ID0gZmFsc2U7CiAgICAgICAgICAgIGlmICh2KSB7CiAgICAgICAgICAgICAgYWN0aXZlU3RyZWFtLmxpbmVTdGFydCgpOwogICAgICAgICAgICAgIGFjdGl2ZVN0cmVhbS5wb2ludCh4LCB5KTsKICAgICAgICAgICAgfQogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgaWYgKHYgJiYgdl8pIGFjdGl2ZVN0cmVhbS5wb2ludCh4LCB5KTsKICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgdmFyIGEgPSBbeF8gPSBNYXRoLm1heChjbGlwTWluLCBNYXRoLm1pbihjbGlwTWF4LCB4XykpLCB5XyA9IE1hdGgubWF4KGNsaXBNaW4sIE1hdGgubWluKGNsaXBNYXgsIHlfKSldLAogICAgICAgICAgICAgICAgICBiID0gW3ggPSBNYXRoLm1heChjbGlwTWluLCBNYXRoLm1pbihjbGlwTWF4LCB4KSksIHkgPSBNYXRoLm1heChjbGlwTWluLCBNYXRoLm1pbihjbGlwTWF4LCB5KSldOwogICAgICAgICAgICAgIGlmIChjbGlwTGluZShhLCBiLCB4MCwgeTAsIHgxLCB5MSkpIHsKICAgICAgICAgICAgICAgIGlmICghdl8pIHsKICAgICAgICAgICAgICAgICAgYWN0aXZlU3RyZWFtLmxpbmVTdGFydCgpOwogICAgICAgICAgICAgICAgICBhY3RpdmVTdHJlYW0ucG9pbnQoYVswXSwgYVsxXSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBhY3RpdmVTdHJlYW0ucG9pbnQoYlswXSwgYlsxXSk7CiAgICAgICAgICAgICAgICBpZiAoIXYpIGFjdGl2ZVN0cmVhbS5saW5lRW5kKCk7CiAgICAgICAgICAgICAgICBjbGVhbiA9IGZhbHNlOwogICAgICAgICAgICAgIH0gZWxzZSBpZiAodikgewogICAgICAgICAgICAgICAgYWN0aXZlU3RyZWFtLmxpbmVTdGFydCgpOwogICAgICAgICAgICAgICAgYWN0aXZlU3RyZWFtLnBvaW50KHgsIHkpOwogICAgICAgICAgICAgICAgY2xlYW4gPSBmYWxzZTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICAgIHhfID0geCwgeV8gPSB5LCB2XyA9IHY7CiAgICAgICAgfQoKICAgICAgICByZXR1cm4gY2xpcFN0cmVhbTsKICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiBleHRlbnQkMSgpIHsKICAgICAgdmFyIHgwID0gMCwKICAgICAgICAgIHkwID0gMCwKICAgICAgICAgIHgxID0gOTYwLAogICAgICAgICAgeTEgPSA1MDAsCiAgICAgICAgICBjYWNoZSwKICAgICAgICAgIGNhY2hlU3RyZWFtLAogICAgICAgICAgY2xpcDsKCiAgICAgIHJldHVybiBjbGlwID0gewogICAgICAgIHN0cmVhbTogZnVuY3Rpb24oc3RyZWFtKSB7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GRpc3RhbmNlKGNvb3JkaW5hdGVzW2ldLCBwb2ludCk7CiAgICAgICAgaWYgKGJvID09PSAwKSByZXR1cm4gdHJ1ZTsKICAgICAgICBpZiAoaSA+IDApIHsKICAgICAgICAgIGFiID0gZGlzdGFuY2UoY29vcmRpbmF0ZXNbaV0sIGNvb3JkaW5hdGVzW2kgLSAxXSk7CiAgICAgICAgICBpZiAoCiAgICAgICAgICAgIGFiID4gMCAmJgogICAgICAgICAgICBhbyA8PSBhYiAmJgogICAgICAgICAgICBibyA8PSBhYiAmJgogICAgICAgICAgICAoYW8gKyBibyAtIGFiKSAqICgxIC0gTWF0aC5wb3coKGFvIC0gYm8pIC8gYWIsIDIpKSA8IGVwc2lsb24yJDEgKiBhYgogICAgICAgICAgKQogICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICB9CiAgICAgICAgYW8gPSBibzsKICAgICAgfQogICAgICByZXR1cm4gZmFsc2U7CiAgICB9CgogICAgZnVuY3Rpb24gY29udGFpbnNQb2x5Z29uKGNvb3JkaW5hdGVzLCBwb2ludCkgewogICAgICByZXR1cm4gISFwb2x5Z29uQ29udGFpbnMoY29vcmRpbmF0ZXMubWFwKHJpbmdSYWRpYW5zKSwgcG9pbnRSYWRpYW5zKHBvaW50KSk7CiAgICB9CgogICAgZnVuY3Rpb24gcmluZ1JhZGlhbnMocmluZykgewogICAgICByZXR1cm4gcmluZyA9IHJpbmcubWFwKHBvaW50UmFkaWFucyksIHJpbmcucG9wKCksIHJpbmc7CiAgICB9CgogICAgZnVuY3Rpb24gcG9pbnRSYWRpYW5zKHBvaW50KSB7CiAgICAgIHJldHVybiBbcG9pbnRbMF0gKiByYWRpYW5zLCBwb2ludFsxXSAqIHJhZGlhbnNdOwogICAgfQoKICAgIGZ1bmN0aW9uIGNvbnRhaW5zJDEob2JqZWN0LCBwb2ludCkgewogICAgICByZXR1cm4gKG9iamVjdCAmJiBjb250YWluc09iamVjdFR5cGUuaGFzT3duUHJvcGVydHkob2Jq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JDJdXSk7CiAgICB9CgogICAgZnVuY3Rpb24gZ3JhdGljdWxlMTAoKSB7CiAgICAgIHJldHVybiBncmF0aWN1bGUoKSgpOwogICAgfQoKICAgIGZ1bmN0aW9uIGludGVycG9sYXRlJDEoYSwgYikgewogICAgICB2YXIgeDAgPSBhWzBdICogcmFkaWFucywKICAgICAgICAgIHkwID0gYVsxXSAqIHJhZGlhbnMsCiAgICAgICAgICB4MSA9IGJbMF0gKiByYWRpYW5zLAogICAgICAgICAgeTEgPSBiWzFdICogcmFkaWFucywKICAgICAgICAgIGN5MCA9IGNvcyQxKHkwKSwKICAgICAgICAgIHN5MCA9IHNpbiQxKHkwKSwKICAgICAgICAgIGN5MSA9IGNvcyQxKHkxKSwKICAgICAgICAgIHN5MSA9IHNpbiQxKHkxKSwKICAgICAgICAgIGt4MCA9IGN5MCAqIGNvcyQxKHgwKSwKICAgICAgICAgIGt5MCA9IGN5MCAqIHNpbiQxKHgwKSwKICAgICAgICAgIGt4MSA9IGN5MSAqIGNvcyQxKHgxKSwKICAgICAgICAgIGt5MSA9IGN5MSAqIHNpbiQxKHgxKSwKICAgICAgICAgIGQgPSAyICogYXNpbihzcXJ0KGhhdmVyc2luKHkxIC0geTApICsgY3kwICogY3kxICogaGF2ZXJzaW4oeDEgLSB4MCkpKSwKICAgICAgICAgIGsgPSBzaW4kMShkKTsKCiAgICAgIHZhciBpbnRlcnBvbGF0ZSA9IGQgPyBmdW5jdGlvbih0KSB7CiAgICAgICAgdmFyIEIgPSBzaW4kMSh0ICo9IGQpIC8gaywKICAgICAgICAgICAgQSA9IHNpbiQxKGQgLSB0KSAvIGssCiAgICAgICAgICAgIHggPSBBICoga3gwICsgQiAqIGt4MSwKICAgICAgICAgICAgeSA9IEEgKiBreTAgKyBCICoga3kxLAogICAgICAgICAgICB6ID0gQSAqIHN5MCArIEIgKiBzeTE7CiAgICAgICAgcmV0dXJuIFsKICAgICAgICAgIGF0YW4yKHksIHgpICogZGVncmVlcyQxLAogICAgICA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W50JDE7CiAgICAgICAgY2VudHJvaWRTdHJlYW0kMS5saW5lU3RhcnQgPSBjZW50cm9pZExpbmVTdGFydCQxOwogICAgICAgIGNlbnRyb2lkU3RyZWFtJDEubGluZUVuZCA9IGNlbnRyb2lkTGluZUVuZCQxOwogICAgICB9LAogICAgICByZXN1bHQ6IGZ1bmN0aW9uKCkgewogICAgICAgIHZhciBjZW50cm9pZCA9IFoyJDEgPyBbWDIkMSAvIFoyJDEsIFkyJDEgLyBaMiQxXQogICAgICAgICAgICA6IFoxJDEgPyBbWDEkMSAvIFoxJDEsIFkxJDEgLyBaMSQxXQogICAgICAgICAgICA6IFowJDEgPyBbWDAkMSAvIFowJDEsIFkwJDEgLyBaMCQxXQogICAgICAgICAgICA6IFtOYU4sIE5hTl07CiAgICAgICAgWDAkMSA9IFkwJDEgPSBaMCQxID0KICAgICAgICBYMSQxID0gWTEkMSA9IFoxJDEgPQogICAgICAgIFgyJDEgPSBZMiQxID0gWjIkMSA9IDA7CiAgICAgICAgcmV0dXJuIGNlbnRyb2lkOwogICAgICB9CiAgICB9OwoKICAgIGZ1bmN0aW9uIGNlbnRyb2lkUG9pbnQkMSh4LCB5KSB7CiAgICAgIFgwJDEgKz0geDsKICAgICAgWTAkMSArPSB5OwogICAgICArK1owJDE7CiAgICB9CgogICAgZnVuY3Rpb24gY2VudHJvaWRMaW5lU3RhcnQkMSgpIHsKICAgICAgY2VudHJvaWRTdHJlYW0kMS5wb2ludCA9IGNlbnRyb2lkUG9pbnRGaXJzdExpbmU7CiAgICB9CgogICAgZnVuY3Rpb24gY2VudHJvaWRQb2ludEZpcnN0TGluZSh4LCB5KSB7CiAgICAgIGNlbnRyb2lkU3RyZWFtJDEucG9pbnQgPSBjZW50cm9pZFBvaW50TGluZTsKICAgICAgY2VudHJvaWRQb2ludCQxKHgwJDMgPSB4LCB5MCQzID0geSk7CiAgICB9CgogICAgZnVuY3Rpb24gY2VudHJvaWRQb2ludExpbmUoeCwgeSkgewogICAgICB2YXI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CgogICAgICB6ID0geTAkMyAqIHggLSB4MCQzICogeTsKICAgICAgWDIkMSArPSB6ICogKHgwJDMgKyB4KTsKICAgICAgWTIkMSArPSB6ICogKHkwJDMgKyB5KTsKICAgICAgWjIkMSArPSB6ICogMzsKICAgICAgY2VudHJvaWRQb2ludCQxKHgwJDMgPSB4LCB5MCQzID0geSk7CiAgICB9CgogICAgZnVuY3Rpb24gUGF0aENvbnRleHQoY29udGV4dCkgewogICAgICB0aGlzLl9jb250ZXh0ID0gY29udGV4dDsKICAgIH0KCiAgICBQYXRoQ29udGV4dC5wcm90b3R5cGUgPSB7CiAgICAgIF9yYWRpdXM6IDQuNSwKICAgICAgcG9pbnRSYWRpdXM6IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gdGhpcy5fcmFkaXVzID0gXywgdGhpczsKICAgICAgfSwKICAgICAgcG9seWdvblN0YXJ0OiBmdW5jdGlvbigpIHsKICAgICAgICB0aGlzLl9saW5lID0gMDsKICAgICAgfSwKICAgICAgcG9seWdvbkVuZDogZnVuY3Rpb24oKSB7CiAgICAgICAgdGhpcy5fbGluZSA9IE5hTjsKICAgICAgfSwKICAgICAgbGluZVN0YXJ0OiBmdW5jdGlvbigpIHsKICAgICAgICB0aGlzLl9wb2ludCA9IDA7CiAgICAgIH0sCiAgICAgIGxpbmVFbmQ6IGZ1bmN0aW9uKCkgewogICAgICAgIGlmICh0aGlzLl9saW5lID09PSAwKSB0aGlzLl9jb250ZXh0LmNsb3NlUGF0aCgpOwogICAgICAgIHRoaXMuX3BvaW50ID0gTmFOOwogICAgICB9LAogICAgICBwb2ludDogZnVuY3Rpb24oeCwgeSkgewogICAgICAgIHN3aXRjaCAodGhpcy5fcG9pbnQpIHsKICAgICAgICAgIGNhc2UgMDogewogICAgICAgICAgICB0aGlzLl9jb250ZXh0Lm1vdmVUbyh4LCB5KTsKICAgICAgICAgICAgdGhpcy5fcG9pbnQgPSAxOwogICAgICAgICAgICBicmVhazsKICAgICAgICAgIH0KICAgICAgICAgIGNhc2UgMTogewogICAgICAgICAgICB0aGlzLl9jb250ZXh0LmxpbmVUbyh4LCB5KTsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICB9CiAgICAgICAgICBkZWZhdWx0OiB7CiAgICAgICAgICAgIHRoaXMuX2NvbnRleHQubW92ZVRvKHggKyB0aGlzLl9yYWRpdXMsIHkpOwogICAgICAgICAgICB0aGlzLl9jb250ZXh0LmFyYyh4LCB5LCB0aGlzLl9yYWRpdXMsIDAsIHRhdSQzKTsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9LAogICAgICByZXN1bHQ6IG5vb3AkMgogICAgfTsKCiAgICB2YXIgbGVuZ3RoU3VtJDEgPSBhZGRlcigpLAogICAgICAgIGxlbmd0aFJpbmcsCiAgICAgICAgeDAwJDIsCiAgICAgICAgeTAwJDIsCiAgICAgICAgeDAkNCwKICAgICAgICB5MCQ0OwoKICAgIHZhciBsZW5ndGhTdHJlYW0kMSA9IHsKICAgICAgcG9pbnQ6IG5vb3AkMiwKICAgICAgbGluZVN0YXJ0OiBmdW5jdGlvbigpIHsKICAgICAgICBsZW5ndGhTdHJlYW0kMS5wb2ludCA9IGxlbmd0aFBvaW50Rmlyc3QkMTsKICAgICAgfSwKICAgICAgbGluZUVuZDogZnVuY3Rpb24oKSB7CiAgICAgICAgaWYgKGxlbmd0aFJpbmcpIGxlbmd0aFBvaW50JDEoeDAwJDIsIHkwMCQyKTsKICAgICAgICBsZW5ndGhTdHJlYW0kMS5wb2ludCA9IG5vb3AkMjsKICAgICAgfSwKICAgICAgcG9seWdvblN0YXJ0OiBmdW5jdGlvbigpIHsKICAgICAgICBsZW5ndGhSaW5nID0gdHJ1ZTsKICAgICAgfSwKICAgICAgcG9seWdvbkVuZDogZnVuY3Rpb24oKSB7CiAgICAgICAgbGVuZ3RoUmluZyA9IG51bGw7CiAgICAgIH0sCiAgICAgIHJlc3VsdDogZnVuY3Rpb24oKSB7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GlzLl9wb2ludCA9IDA7CiAgICAgIH0sCiAgICAgIGxpbmVFbmQ6IGZ1bmN0aW9uKCkgewogICAgICAgIGlmICh0aGlzLl9saW5lID09PSAwKSB0aGlzLl9zdHJpbmcucHVzaCgiWiIpOwogICAgICAgIHRoaXMuX3BvaW50ID0gTmFOOwogICAgICB9LAogICAgICBwb2ludDogZnVuY3Rpb24oeCwgeSkgewogICAgICAgIHN3aXRjaCAodGhpcy5fcG9pbnQpIHsKICAgICAgICAgIGNhc2UgMDogewogICAgICAgICAgICB0aGlzLl9zdHJpbmcucHVzaCgiTSIsIHgsICIsIiwgeSk7CiAgICAgICAgICAgIHRoaXMuX3BvaW50ID0gMTsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICB9CiAgICAgICAgICBjYXNlIDE6IHsKICAgICAgICAgICAgdGhpcy5fc3RyaW5nLnB1c2goIkwiLCB4LCAiLCIsIHkpOwogICAgICAgICAgICBicmVhazsKICAgICAgICAgIH0KICAgICAgICAgIGRlZmF1bHQ6IHsKICAgICAgICAgICAgaWYgKHRoaXMuX2NpcmNsZSA9PSBudWxsKSB0aGlzLl9jaXJjbGUgPSBjaXJjbGUkMSh0aGlzLl9yYWRpdXMpOwogICAgICAgICAgICB0aGlzLl9zdHJpbmcucHVzaCgiTSIsIHgsICIsIiwgeSwgdGhpcy5fY2lyY2xlKTsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9LAogICAgICByZXN1bHQ6IGZ1bmN0aW9uKCkgewogICAgICAgIGlmICh0aGlzLl9zdHJpbmcubGVuZ3RoKSB7CiAgICAgICAgICB2YXIgcmVzdWx0ID0gdGhpcy5fc3RyaW5nLmpvaW4oIiIpOwogICAgICAgICAgdGhpcy5fc3RyaW5nID0gW107CiAgICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICB9CiAgICAgIH0KICAgIH07CgogICAgZnVuY3Rpb24gY2lyY2xlJDEocmFkaXVzKSB7CiAgICAgIHJldHVybiAibTAsIiArIHJhZGl1cwogICAgICAgICAgKyAiYSIgKyByYWRpdXMgKyAiLCIgKyByYWRpdXMgKyAiIDAgMSwxIDAsIiArIC0yICogcmFkaXVzCiAgICAgICAgICArICJhIiArIHJhZGl1cyArICIsIiArIHJhZGl1cyArICIgMCAxLDEgMCwiICsgMiAqIHJhZGl1cwogICAgICAgICAgKyAieiI7CiAgICB9CgogICAgZnVuY3Rpb24gaW5kZXgkMShwcm9qZWN0aW9uLCBjb250ZXh0KSB7CiAgICAgIHZhciBwb2ludFJhZGl1cyA9IDQuNSwKICAgICAgICAgIHByb2plY3Rpb25TdHJlYW0sCiAgICAgICAgICBjb250ZXh0U3RyZWFtOwoKICAgICAgZnVuY3Rpb24gcGF0aChvYmplY3QpIHsKICAgICAgICBpZiAob2JqZWN0KSB7CiAgICAgICAgICBpZiAodHlwZW9mIHBvaW50UmFkaXVzID09PSAiZnVuY3Rpb24iKSBjb250ZXh0U3RyZWFtLnBvaW50UmFkaXVzKCtwb2ludFJhZGl1cy5hcHBseSh0aGlzLCBhcmd1bWVudHMpKTsKICAgICAgICAgIGdlb1N0cmVhbShvYmplY3QsIHByb2plY3Rpb25TdHJlYW0oY29udGV4dFN0cmVhbSkpOwogICAgICAgIH0KICAgICAgICByZXR1cm4gY29udGV4dFN0cmVhbS5yZXN1bHQoKTsKICAgICAgfQoKICAgICAgcGF0aC5hcmVhID0gZnVuY3Rpb24ob2JqZWN0KSB7CiAgICAgICAgZ2VvU3RyZWFtKG9iamVjdCwgcHJvamVjdGlvblN0cmVhbShhcmVhU3RyZWFtJDEpKTsKICAgICAgICByZXR1cm4gYXJlYVN0cmVhbSQxLnJlc3VsdCgpOwogICAgICB9OwoKICAgICAgcGF0aC5tZWFzdXJlID0gZnVuY3Rpb24ob2JqZWN0KSB7CiAgICAgICAgZ2VvU3RyZWFtKG9iamVjdCwgcHJvamVjdGlvbl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0gLSBleHRlbnRbMF1bMV0sCiAgICAgICAgICAgIGsgPSBNYXRoLm1pbih3IC8gKGJbMV1bMF0gLSBiWzBdWzBdKSwgaCAvIChiWzFdWzFdIC0gYlswXVsxXSkpLAogICAgICAgICAgICB4ID0gK2V4dGVudFswXVswXSArICh3IC0gayAqIChiWzFdWzBdICsgYlswXVswXSkpIC8gMiwKICAgICAgICAgICAgeSA9ICtleHRlbnRbMF1bMV0gKyAoaCAtIGsgKiAoYlsxXVsxXSArIGJbMF1bMV0pKSAvIDI7CiAgICAgICAgcHJvamVjdGlvbi5zY2FsZSgxNTAgKiBrKS50cmFuc2xhdGUoW3gsIHldKTsKICAgICAgfSwgb2JqZWN0KTsKICAgIH0KCiAgICBmdW5jdGlvbiBmaXRTaXplKHByb2plY3Rpb24sIHNpemUsIG9iamVjdCkgewogICAgICByZXR1cm4gZml0RXh0ZW50KHByb2plY3Rpb24sIFtbMCwgMF0sIHNpemVdLCBvYmplY3QpOwogICAgfQoKICAgIGZ1bmN0aW9uIGZpdFdpZHRoKHByb2plY3Rpb24sIHdpZHRoLCBvYmplY3QpIHsKICAgICAgcmV0dXJuIGZpdChwcm9qZWN0aW9uLCBmdW5jdGlvbihiKSB7CiAgICAgICAgdmFyIHcgPSArd2lkdGgsCiAgICAgICAgICAgIGsgPSB3IC8gKGJbMV1bMF0gLSBiWzBdWzBdKSwKICAgICAgICAgICAgeCA9ICh3IC0gayAqIChiWzFdWzBdICsgYlswXVswXSkpIC8gMiwKICAgICAgICAgICAgeSA9IC1rICogYlswXVsxXTsKICAgICAgICBwcm9qZWN0aW9uLnNjYWxlKDE1MCAqIGspLnRyYW5zbGF0ZShbeCwgeV0pOwogICAgICB9LCBvYmplY3QpOwogICAgfQoKICAgIGZ1bmN0aW9uIGZpdEhlaWdodChwcm9qZWN0aW9uLCBoZWlnaHQsIG9iamVjdCkgewogICAgICByZXR1cm4gZml0KHByb2plY3Rpb24sIGZ1bmN0aW9uKGIpIHsKICAgICAgICB2YXIg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LSB4MCwKICAgICAgICAgICAgZHkgPSB5MSAtIHkwLAogICAgICAgICAgICBkMiA9IGR4ICogZHggKyBkeSAqIGR5OwogICAgICAgIGlmIChkMiA+IDQgKiBkZWx0YTIgJiYgZGVwdGgtLSkgewogICAgICAgICAgdmFyIGEgPSBhMCArIGExLAogICAgICAgICAgICAgIGIgPSBiMCArIGIxLAogICAgICAgICAgICAgIGMgPSBjMCArIGMxLAogICAgICAgICAgICAgIG0gPSBzcXJ0KGEgKiBhICsgYiAqIGIgKyBjICogYyksCiAgICAgICAgICAgICAgcGhpMiA9IGFzaW4oYyAvPSBtKSwKICAgICAgICAgICAgICBsYW1iZGEyID0gYWJzKGFicyhjKSAtIDEpIDwgZXBzaWxvbiQyIHx8IGFicyhsYW1iZGEwIC0gbGFtYmRhMSkgPCBlcHNpbG9uJDIgPyAobGFtYmRhMCArIGxhbWJkYTEpIC8gMiA6IGF0YW4yKGIsIGEpLAogICAgICAgICAgICAgIHAgPSBwcm9qZWN0KGxhbWJkYTIsIHBoaTIpLAogICAgICAgICAgICAgIHgyID0gcFswXSwKICAgICAgICAgICAgICB5MiA9IHBbMV0sCiAgICAgICAgICAgICAgZHgyID0geDIgLSB4MCwKICAgICAgICAgICAgICBkeTIgPSB5MiAtIHkwLAogICAgICAgICAgICAgIGR6ID0gZHkgKiBkeDIgLSBkeCAqIGR5MjsKICAgICAgICAgIGlmIChkeiAqIGR6IC8gZDIgPiBkZWx0YTIgLy8gcGVycGVuZGljdWxhciBwcm9qZWN0ZWQgZGlzdGFuY2UKICAgICAgICAgICAgICB8fCBhYnMoKGR4ICogZHgyICsgZHkgKiBkeTIpIC8gZDIgLSAwLjUpID4gMC4zIC8vIG1pZHBvaW50IGNsb3NlIHRvIGFuIGVuZAogICAgICAgICAgICAgIHx8IGEwICogYTEgKyBiMCAqIGIxICsgYzAgKiBjMSA8IGNvc01pbkRpc3RhbmNlKSB7IC8vIGFuZ3VsYXIgZGlzdGFuY2UKICAgICAgICAgICAgcmVz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nNmb3JtLmludmVydCA9IGZ1bmN0aW9uKHgsIHkpIHsKICAgICAgICByZXR1cm4gWyh4IC0gZHgpIC8gayAqIHN4LCAoZHkgLSB5KSAvIGsgKiBzeV07CiAgICAgIH07CiAgICAgIHJldHVybiB0cmFuc2Zvcm07CiAgICB9CgogICAgZnVuY3Rpb24gc2NhbGVUcmFuc2xhdGVSb3RhdGUoaywgZHgsIGR5LCBzeCwgc3ksIGFscGhhKSB7CiAgICAgIHZhciBjb3NBbHBoYSA9IGNvcyQxKGFscGhhKSwKICAgICAgICAgIHNpbkFscGhhID0gc2luJDEoYWxwaGEpLAogICAgICAgICAgYSA9IGNvc0FscGhhICogaywKICAgICAgICAgIGIgPSBzaW5BbHBoYSAqIGssCiAgICAgICAgICBhaSA9IGNvc0FscGhhIC8gaywKICAgICAgICAgIGJpID0gc2luQWxwaGEgLyBrLAogICAgICAgICAgY2kgPSAoc2luQWxwaGEgKiBkeSAtIGNvc0FscGhhICogZHgpIC8gaywKICAgICAgICAgIGZpID0gKHNpbkFscGhhICogZHggKyBjb3NBbHBoYSAqIGR5KSAvIGs7CiAgICAgIGZ1bmN0aW9uIHRyYW5zZm9ybSh4LCB5KSB7CiAgICAgICAgeCAqPSBzeDsgeSAqPSBzeTsKICAgICAgICByZXR1cm4gW2EgKiB4IC0gYiAqIHkgKyBkeCwgZHkgLSBiICogeCAtIGEgKiB5XTsKICAgICAgfQogICAgICB0cmFuc2Zvcm0uaW52ZXJ0ID0gZnVuY3Rpb24oeCwgeSkgewogICAgICAgIHJldHVybiBbc3ggKiAoYWkgKiB4IC0gYmkgKiB5ICsgY2kpLCBzeSAqIChmaSAtIGJpICogeCAtIGFpICogeSldOwogICAgICB9OwogICAgICByZXR1cm4gdHJhbnNmb3JtOwogICAgfQoKICAgIGZ1bmN0aW9uIHByb2plY3Rpb24ocHJvamVjdCkgewogICAgICByZXR1cm4gcHJvamVjdGlvbk11dGF0b3IoZnVuY3Rpb24oKSB7IHJldHVybiBwcm9qZWN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HByb2plY3RUcmFuc2Zvcm0pOwogICAgICAgIHByb2plY3RSZXNhbXBsZSA9IHJlc2FtcGxlKHByb2plY3RUcmFuc2Zvcm0sIGRlbHRhMik7CiAgICAgICAgcmV0dXJuIHJlc2V0KCk7CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIHJlc2V0KCkgewogICAgICAgIGNhY2hlID0gY2FjaGVTdHJlYW0gPSBudWxsOwogICAgICAgIHJldHVybiBwcm9qZWN0aW9uOwogICAgICB9CgogICAgICByZXR1cm4gZnVuY3Rpb24oKSB7CiAgICAgICAgcHJvamVjdCA9IHByb2plY3RBdC5hcHBseSh0aGlzLCBhcmd1bWVudHMpOwogICAgICAgIHByb2plY3Rpb24uaW52ZXJ0ID0gcHJvamVjdC5pbnZlcnQgJiYgaW52ZXJ0OwogICAgICAgIHJldHVybiByZWNlbnRlcigpOwogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIGNvbmljUHJvamVjdGlvbihwcm9qZWN0QXQpIHsKICAgICAgdmFyIHBoaTAgPSAwLAogICAgICAgICAgcGhpMSA9IHBpJDMgLyAzLAogICAgICAgICAgbSA9IHByb2plY3Rpb25NdXRhdG9yKHByb2plY3RBdCksCiAgICAgICAgICBwID0gbShwaGkwLCBwaGkxKTsKCiAgICAgIHAucGFyYWxsZWxzID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gbShwaGkwID0gX1swXSAqIHJhZGlhbnMsIHBoaTEgPSBfWzFdICogcmFkaWFucykgOiBbcGhpMCAqIGRlZ3JlZXMkMSwgcGhpMSAqIGRlZ3JlZXMkMV07CiAgICAgIH07CgogICAgICByZXR1cm4gcDsKICAgIH0KCiAgICBmdW5jdGlvbiBjeWxpbmRyaWNhbEVxdWFsQXJlYVJhdyhwaGkwKSB7CiAgICAgIHZhciBjb3NQaGkwID0gY29zJDEocGhpMCk7CgogICAgICBmdW5jdGlvbiBmb3J3YXJkKGxhbWJkYSwgcG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GVTdHJlYW0sCiAgICAgICAgICBsb3dlcjQ4ID0gYWxiZXJzKCksIGxvd2VyNDhQb2ludCwKICAgICAgICAgIGFsYXNrYSA9IGNvbmljRXF1YWxBcmVhKCkucm90YXRlKFsxNTQsIDBdKS5jZW50ZXIoWy0yLCA1OC41XSkucGFyYWxsZWxzKFs1NSwgNjVdKSwgYWxhc2thUG9pbnQsIC8vIEVQU0c6MzMzOAogICAgICAgICAgaGF3YWlpID0gY29uaWNFcXVhbEFyZWEoKS5yb3RhdGUoWzE1NywgMF0pLmNlbnRlcihbLTMsIDE5LjldKS5wYXJhbGxlbHMoWzgsIDE4XSksIGhhd2FpaVBvaW50LCAvLyBFU1JJOjEwMjAwNwogICAgICAgICAgcG9pbnQsIHBvaW50U3RyZWFtID0ge3BvaW50OiBmdW5jdGlvbih4LCB5KSB7IHBvaW50ID0gW3gsIHldOyB9fTsKCiAgICAgIGZ1bmN0aW9uIGFsYmVyc1VzYShjb29yZGluYXRlcykgewogICAgICAgIHZhciB4ID0gY29vcmRpbmF0ZXNbMF0sIHkgPSBjb29yZGluYXRlc1sxXTsKICAgICAgICByZXR1cm4gcG9pbnQgPSBudWxsLAogICAgICAgICAgICAobG93ZXI0OFBvaW50LnBvaW50KHgsIHkpLCBwb2ludCkKICAgICAgICAgICAgfHwgKGFsYXNrYVBvaW50LnBvaW50KHgsIHkpLCBwb2ludCkKICAgICAgICAgICAgfHwgKGhhd2FpaVBvaW50LnBvaW50KHgsIHkpLCBwb2ludCk7CiAgICAgIH0KCiAgICAgIGFsYmVyc1VzYS5pbnZlcnQgPSBmdW5jdGlvbihjb29yZGluYXRlcykgewogICAgICAgIHZhciBrID0gbG93ZXI0OC5zY2FsZSgpLAogICAgICAgICAgICB0ID0gbG93ZXI0OC50cmFuc2xhdGUoKSwKICAgICAgICAgICAgeCA9IChjb29yZGluYXRlc1swXSAtIHRbMF0pIC8gaywKICAgICAgICAgICAgeSA9IChjb29yZGluYXRlc1sxXSAtIHRbMV0pIC8g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WxlKGN4ICogY3kpOwogICAgICAgIHJldHVybiBbCiAgICAgICAgICBrICogY3kgKiBzaW4kMSh4KSwKICAgICAgICAgIGsgKiBzaW4kMSh5KQogICAgICAgIF07CiAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiBhemltdXRoYWxJbnZlcnQoYW5nbGUpIHsKICAgICAgcmV0dXJuIGZ1bmN0aW9uKHgsIHkpIHsKICAgICAgICB2YXIgeiA9IHNxcnQoeCAqIHggKyB5ICogeSksCiAgICAgICAgICAgIGMgPSBhbmdsZSh6KSwKICAgICAgICAgICAgc2MgPSBzaW4kMShjKSwKICAgICAgICAgICAgY2MgPSBjb3MkMShjKTsKICAgICAgICByZXR1cm4gWwogICAgICAgICAgYXRhbjIoeCAqIHNjLCB6ICogY2MpLAogICAgICAgICAgYXNpbih6ICYmIHkgKiBzYyAvIHopCiAgICAgICAgXTsKICAgICAgfQogICAgfQoKICAgIHZhciBhemltdXRoYWxFcXVhbEFyZWFSYXcgPSBhemltdXRoYWxSYXcoZnVuY3Rpb24oY3hjeSkgewogICAgICByZXR1cm4gc3FydCgyIC8gKDEgKyBjeGN5KSk7CiAgICB9KTsKCiAgICBhemltdXRoYWxFcXVhbEFyZWFSYXcuaW52ZXJ0ID0gYXppbXV0aGFsSW52ZXJ0KGZ1bmN0aW9uKHopIHsKICAgICAgcmV0dXJuIDIgKiBhc2luKHogLyAyKTsKICAgIH0pOwoKICAgIGZ1bmN0aW9uIGF6aW11dGhhbEVxdWFsQXJlYSgpIHsKICAgICAgcmV0dXJuIHByb2plY3Rpb24oYXppbXV0aGFsRXF1YWxBcmVhUmF3KQogICAgICAgICAgLnNjYWxlKDEyNC43NSkKICAgICAgICAgIC5jbGlwQW5nbGUoMTgwIC0gMWUtMyk7CiAgICB9CgogICAgdmFyIGF6aW11dGhhbEVxdWlkaXN0YW50UmF3ID0gYXppbXV0aGFsUmF3KGZ1bmN0aW9uKGMpIHsKICAgICAgcmV0dXJuIChjID0gYWNvcyhjKSkg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hdzsKCiAgICAgIGZ1bmN0aW9uIHByb2plY3QoeCwgeSkgewogICAgICAgIHZhciBneSA9IGcgLSB5LCBueCA9IG4gKiB4OwogICAgICAgIHJldHVybiBbZ3kgKiBzaW4kMShueCksIGcgLSBneSAqIGNvcyQxKG54KV07CiAgICAgIH0KCiAgICAgIHByb2plY3QuaW52ZXJ0ID0gZnVuY3Rpb24oeCwgeSkgewogICAgICAgIHZhciBneSA9IGcgLSB5LAogICAgICAgICAgICBsID0gYXRhbjIoeCwgYWJzKGd5KSkgKiBzaWduKGd5KTsKICAgICAgICBpZiAoZ3kgKiBuIDwgMCkKICAgICAgICAgIGwgLT0gcGkkMyAqIHNpZ24oeCkgKiBzaWduKGd5KTsKICAgICAgICByZXR1cm4gW2wgLyBuLCBnIC0gc2lnbihuKSAqIHNxcnQoeCAqIHggKyBneSAqIGd5KV07CiAgICAgIH07CgogICAgICByZXR1cm4gcHJvamVjdDsKICAgIH0KCiAgICBmdW5jdGlvbiBjb25pY0VxdWlkaXN0YW50KCkgewogICAgICByZXR1cm4gY29uaWNQcm9qZWN0aW9uKGNvbmljRXF1aWRpc3RhbnRSYXcpCiAgICAgICAgICAuc2NhbGUoMTMxLjE1NCkKICAgICAgICAgIC5jZW50ZXIoWzAsIDEzLjkzODldKTsKICAgIH0KCiAgICB2YXIgQTEgPSAxLjM0MDI2NCwKICAgICAgICBBMiA9IC0wLjA4MTEwNiwKICAgICAgICBBMyA9IDAuMDAwODkzLAogICAgICAgIEE0ID0gMC4wMDM3OTYsCiAgICAgICAgTSA9IHNxcnQoMykgLyAyLAogICAgICAgIGl0ZXJhdGlvbnMgPSAxMjsKCiAgICBmdW5jdGlvbiBlcXVhbEVhcnRoUmF3KGxhbWJkYSwgcGhpKSB7CiAgICAgIHZhciBsID0gYXNpbihNICogc2luJDEocGhpKSksIGwyID0gbCAqIGwsIGw2ID0gbDIgKiBsMiAqIGwyOwogICAgICByZXR1cm4gWwogICAgICAgIGxhbWJkYSAqIGNvcyQxKGwpIC8gKE0gKiAoQTEgKyAzICogQTIgKiBsMiArIGw2ICogKDcgKiBBMyArIDkgKiBBNCAqIGwyKSkpLAogICAgICAgIGwgKiAoQTEgKyBBMiAqIGwyICsgbDYgKiAoQTMgKyBBNCAqIGwyKSkKICAgICAgXTsKICAgIH0KCiAgICBlcXVhbEVhcnRoUmF3LmludmVydCA9IGZ1bmN0aW9uKHgsIHkpIHsKICAgICAgdmFyIGwgPSB5LCBsMiA9IGwgKiBsLCBsNiA9IGwyICogbDIgKiBsMjsKICAgICAgZm9yICh2YXIgaSA9IDAsIGRlbHRhLCBmeSwgZnB5OyBpIDwgaXRlcmF0aW9uczsgKytpKSB7CiAgICAgICAgZnkgPSBsICogKEExICsgQTIgKiBsMiArIGw2ICogKEEzICsgQTQgKiBsMikpIC0geTsKICAgICAgICBmcHkgPSBBMSArIDMgKiBBMiAqIGwyICsgbDYgKiAoNyAqIEEzICsgOSAqIEE0ICogbDIpOwogICAgICAgIGwgLT0gZGVsdGEgPSBmeSAvIGZweSwgbDIgPSBsICogbCwgbDYgPSBsMiAqIGwyICogbDI7CiAgICAgICAgaWYgKGFicyhkZWx0YSkgPCBlcHNpbG9uMiQxKSBicmVhazsKICAgICAgfQogICAgICByZXR1cm4gWwogICAgICAgIE0gKiB4ICogKEExICsgMyAqIEEyICogbDIgKyBsNiAqICg3ICogQTMgKyA5ICogQTQgKiBsMikpIC8gY29zJDEobCksCiAgICAgICAgYXNpbihzaW4kMShsKSAvIE0pCiAgICAgIF07CiAgICB9OwoKICAgIGZ1bmN0aW9uIGVxdWFsRWFydGgoKSB7CiAgICAgIHJldHVybiBwcm9qZWN0aW9uKGVxdWFsRWFydGhSYXcpCiAgICAgICAgICAuc2NhbGUoMTc3LjE1OCk7CiAgICB9CgogICAgZnVuY3Rpb24gZ25vbW9uaWNSYXcoeCwgeSkgewogICAgICB2YXIgY3kgPSBjb3MkMSh5KSwgayA9IGNvcyQxKHgpICogY3k7CiAgICAgIHJldHVybiBbY3kgKiBzaW4kMSh4KSAvIGssIHNpbiQxKHkpIC8ga107CiAgICB9CgogICAgZ25vbW9uaWNSYXcuaW52ZXJ0ID0gYXppbXV0aGFsSW52ZXJ0KGF0YW4pOwoKICAgIGZ1bmN0aW9uIGdub21vbmljKCkgewogICAgICByZXR1cm4gcHJvamVjdGlvbihnbm9tb25pY1JhdykKICAgICAgICAgIC5zY2FsZSgxNDQuMDQ5KQogICAgICAgICAgLmNsaXBBbmdsZSg2MCk7CiAgICB9CgogICAgZnVuY3Rpb24gaWRlbnRpdHkkNSgpIHsKICAgICAgdmFyIGsgPSAxLCB0eCA9IDAsIHR5ID0gMCwgc3ggPSAxLCBzeSA9IDEsIC8vIHNjYWxlLCB0cmFuc2xhdGUgYW5kIHJlZmxlY3QKICAgICAgICAgIGFscGhhID0gMCwgY2EsIHNhLCAvLyBhbmdsZQogICAgICAgICAgeDAgPSBudWxsLCB5MCwgeDEsIHkxLCAvLyBjbGlwIGV4dGVudAogICAgICAgICAga3ggPSAxLCBreSA9IDEsCiAgICAgICAgICB0cmFuc2Zvcm0gPSB0cmFuc2Zvcm1lcih7CiAgICAgICAgICAgIHBvaW50OiBmdW5jdGlvbih4LCB5KSB7CiAgICAgICAgICAgICAgdmFyIHAgPSBwcm9qZWN0aW9uKFt4LCB5XSk7CiAgICAgICAgICAgICAgdGhpcy5zdHJlYW0ucG9pbnQocFswXSwgcFsxXSk7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0pLAogICAgICAgICAgcG9zdGNsaXAgPSBpZGVudGl0eSQ0LAogICAgICAgICAgY2FjaGUsCiAgICAgICAgICBjYWNoZVN0cmVhbTsKCiAgICAgIGZ1bmN0aW9uIHJlc2V0KCkgewogICAgICAgIGt4ID0gayAqIHN4OwogICAgICAgIGt5ID0gayAqIHN5OwogICAgICAgIGNhY2hlID0gY2FjaGVTdHJlYW0gPSBudWxsOwogICAgICAgIHJldHVybiBwcm9qZWN0aW9uOwogICAgICB9CgogICAgICBmdW5jdGlvbiBwcm9qZWN0aW9uIChwKSB7CiAgICAgICAgdmFyIHggPSBwWzBdICoga3gsIHkgPSBwWzFdICoga3k7CiAgICAgICAgaWYgKGFscGhhKSB7CiAgICAgICAgICB2YXIgdCA9IHkgKiBjYSAtIHggKiBzYTsKICAgICAgICAgIHggPSB4ICogY2EgKyB5ICogc2E7CiAgICAgICAgICB5ID0gdDsKICAgICAgICB9ICAgIAogICAgICAgIHJldHVybiBbeCArIHR4LCB5ICsgdHldOwogICAgICB9CiAgICAgIHByb2plY3Rpb24uaW52ZXJ0ID0gZnVuY3Rpb24ocCkgewogICAgICAgIHZhciB4ID0gcFswXSAtIHR4LCB5ID0gcFsxXSAtIHR5OwogICAgICAgIGlmIChhbHBoYSkgewogICAgICAgICAgdmFyIHQgPSB5ICogY2EgKyB4ICogc2E7CiAgICAgICAgICB4ID0geCAqIGNhIC0geSAqIHNhOwogICAgICAgICAgeSA9IHQ7CiAgICAgICAgfQogICAgICAgIHJldHVybiBbeCAvIGt4LCB5IC8ga3ldOwogICAgICB9OwogICAgICBwcm9qZWN0aW9uLnN0cmVhbSA9IGZ1bmN0aW9uKHN0cmVhbSkgewogICAgICAgIHJldHVybiBjYWNoZSAmJiBjYWNoZVN0cmVhbSA9PT0gc3RyZWFtID8gY2FjaGUgOiBjYWNoZSA9IHRyYW5zZm9ybShwb3N0Y2xpcChjYWNoZVN0cmVhbSA9IHN0cmVhbSkpOwogICAgICB9OwogICAgICBwcm9qZWN0aW9uLnBvc3RjbGlwID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHBvc3RjbGlwID0gXywgeDAgPSB5MCA9IHgxID0geTEgPSBudWxsLCByZXNldCgpKSA6IHBvc3RjbGlwOwogICAgICB9OwogICAgICBwcm9qZWN0aW9uLmNsaXBFeHRlbnQgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAocG9zdGNsaXAgPSBfID09I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dWNlKHksIGMpIHsKICAgICAgcmV0dXJuIE1hdGgubWF4KHksIGMueSk7CiAgICB9CgogICAgZnVuY3Rpb24gbGVhZkxlZnQobm9kZSkgewogICAgICB2YXIgY2hpbGRyZW47CiAgICAgIHdoaWxlIChjaGlsZHJlbiA9IG5vZGUuY2hpbGRyZW4pIG5vZGUgPSBjaGlsZHJlblswXTsKICAgICAgcmV0dXJuIG5vZGU7CiAgICB9CgogICAgZnVuY3Rpb24gbGVhZlJpZ2h0KG5vZGUpIHsKICAgICAgdmFyIGNoaWxkcmVuOwogICAgICB3aGlsZSAoY2hpbGRyZW4gPSBub2RlLmNoaWxkcmVuKSBub2RlID0gY2hpbGRyZW5bY2hpbGRyZW4ubGVuZ3RoIC0gMV07CiAgICAgIHJldHVybiBub2RlOwogICAgfQoKICAgIGZ1bmN0aW9uIGNsdXN0ZXIoKSB7CiAgICAgIHZhciBzZXBhcmF0aW9uID0gZGVmYXVsdFNlcGFyYXRpb24sCiAgICAgICAgICBkeCA9IDEsCiAgICAgICAgICBkeSA9IDEsCiAgICAgICAgICBub2RlU2l6ZSA9IGZhbHNlOwoKICAgICAgZnVuY3Rpb24gY2x1c3Rlcihyb290KSB7CiAgICAgICAgdmFyIHByZXZpb3VzTm9kZSwKICAgICAgICAgICAgeCA9IDA7CgogICAgICAgIC8vIEZpcnN0IHdhbGssIGNvbXB1dGluZyB0aGUgaW5pdGlhbCB4ICYgeSB2YWx1ZXMuCiAgICAgICAgcm9vdC5lYWNoQWZ0ZXIoZnVuY3Rpb24obm9kZSkgewogICAgICAgICAgdmFyIGNoaWxkcmVuID0gbm9kZS5jaGlsZHJlbjsKICAgICAgICAgIGlmIChjaGlsZHJlbikgewogICAgICAgICAgICBub2RlLnggPSBtZWFuWChjaGlsZHJlbik7CiAgICAgICAgICAgIG5vZGUueSA9IG1heFkoY2hpbGRyZW4pOwogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgbm9kZS54ID0gcHJldmlvdXNOb2RlID8geCArPSBzZXBhcmF0aW9uKG5vZGUsIHByZXZpb3VzTm9kZSkgOiAwOwogICAgICAgICAgICBub2RlLnkgPSAwOwogICAgICAgICAgICBwcmV2aW91c05vZGUgPSBub2RlOwogICAgICAgICAgfQogICAgICAgIH0pOwoKICAgICAgICB2YXIgbGVmdCA9IGxlYWZMZWZ0KHJvb3QpLAogICAgICAgICAgICByaWdodCA9IGxlYWZSaWdodChyb290KSwKICAgICAgICAgICAgeDAgPSBsZWZ0LnggLSBzZXBhcmF0aW9uKGxlZnQsIHJpZ2h0KSAvIDIsCiAgICAgICAgICAgIHgxID0gcmlnaHQueCArIHNlcGFyYXRpb24ocmlnaHQsIGxlZnQpIC8gMjsKCiAgICAgICAgLy8gU2Vjb25kIHdhbGssIG5vcm1hbGl6aW5nIHggJiB5IHRvIHRoZSBkZXNpcmVkIHNpemUuCiAgICAgICAgcmV0dXJuIHJvb3QuZWFjaEFmdGVyKG5vZGVTaXplID8gZnVuY3Rpb24obm9kZSkgewogICAgICAgICAgbm9kZS54ID0gKG5vZGUueCAtIHJvb3QueCkgKiBkeDsKICAgICAgICAgIG5vZGUueSA9IChyb290LnkgLSBub2RlLnkpICogZHk7CiAgICAgICAgfSA6IGZ1bmN0aW9uKG5vZGUpIHsKICAgICAgICAgIG5vZGUueCA9IChub2RlLnggLSB4MCkgLyAoeDEgLSB4MCkgKiBkeDsKICAgICAgICAgIG5vZGUueSA9ICgxIC0gKHJvb3QueSA/IG5vZGUueSAvIHJvb3QueSA6IDEpKSAqIGR5OwogICAgICAgIH0pOwogICAgICB9CgogICAgICBjbHVzdGVyLnNlcGFyYXRpb24gPSBmdW5jdGlvbih4KSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoc2VwYXJhdGlvbiA9IHgsIGNsdXN0ZXIpIDogc2VwYXJhdGlvbjsKICAgICAgfTsKCiAgICAgIGNsdXN0ZXIuc2l6ZSA9IGZ1bmN0aW9uKHgpIHsKICAgICAgICByZXR1cm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c3RvcikgewogICAgICAgIG5vZGVzLnNwbGljZShrLCAwLCBlbmQpOwogICAgICAgIGVuZCA9IGVuZC5wYXJlbnQ7CiAgICAgIH0KICAgICAgcmV0dXJuIG5vZGVzOwogICAgfQoKICAgIGZ1bmN0aW9uIGxlYXN0Q29tbW9uQW5jZXN0b3IoYSwgYikgewogICAgICBpZiAoYSA9PT0gYikgcmV0dXJuIGE7CiAgICAgIHZhciBhTm9kZXMgPSBhLmFuY2VzdG9ycygpLAogICAgICAgICAgYk5vZGVzID0gYi5hbmNlc3RvcnMoKSwKICAgICAgICAgIGMgPSBudWxsOwogICAgICBhID0gYU5vZGVzLnBvcCgpOwogICAgICBiID0gYk5vZGVzLnBvcCgpOwogICAgICB3aGlsZSAoYSA9PT0gYikgewogICAgICAgIGMgPSBhOwogICAgICAgIGEgPSBhTm9kZXMucG9wKCk7CiAgICAgICAgYiA9IGJOb2Rlcy5wb3AoKTsKICAgICAgfQogICAgICByZXR1cm4gYzsKICAgIH0KCiAgICBmdW5jdGlvbiBub2RlX2FuY2VzdG9ycygpIHsKICAgICAgdmFyIG5vZGUgPSB0aGlzLCBub2RlcyA9IFtub2RlXTsKICAgICAgd2hpbGUgKG5vZGUgPSBub2RlLnBhcmVudCkgewogICAgICAgIG5vZGVzLnB1c2gobm9kZSk7CiAgICAgIH0KICAgICAgcmV0dXJuIG5vZGVzOwogICAgfQoKICAgIGZ1bmN0aW9uIG5vZGVfZGVzY2VuZGFudHMoKSB7CiAgICAgIHZhciBub2RlcyA9IFtdOwogICAgICB0aGlzLmVhY2goZnVuY3Rpb24obm9kZSkgewogICAgICAgIG5vZGVzLnB1c2gobm9kZSk7CiAgICAgIH0pOwogICAgICByZXR1cm4gbm9kZXM7CiAgICB9CgogICAgZnVuY3Rpb24gbm9kZV9sZWF2ZXMoKSB7CiAgICAgIHZhciBsZWF2ZXMgPSBbXTsKICAgICAgdGhpcy5lYWNoQmVmb3JlKGZ1bmN0aW9uKG5vZGUpIHsKICAgICAgICBpZiAoIW5vZGUuY2hpbGRyZW4pIHsKICAgICAgICAgIGxlYXZlcy5wdXNoKG5vZGUpOwogICAgICAgIH0KICAgICAgfSk7CiAgICAgIHJldHVybiBsZWF2ZXM7CiAgICB9CgogICAgZnVuY3Rpb24gbm9kZV9saW5rcygpIHsKICAgICAgdmFyIHJvb3QgPSB0aGlzLCBsaW5rcyA9IFtdOwogICAgICByb290LmVhY2goZnVuY3Rpb24obm9kZSkgewogICAgICAgIGlmIChub2RlICE9PSByb290KSB7IC8vIERvbuKAmXQgaW5jbHVkZSB0aGUgcm9vdOKAmXMgcGFyZW50LCBpZiBhbnkuCiAgICAgICAgICBsaW5rcy5wdXNoKHtzb3VyY2U6IG5vZGUucGFyZW50LCB0YXJnZXQ6IG5vZGV9KTsKICAgICAgICB9CiAgICAgIH0pOwogICAgICByZXR1cm4gbGlua3M7CiAgICB9CgogICAgZnVuY3Rpb24gaGllcmFyY2h5KGRhdGEsIGNoaWxkcmVuKSB7CiAgICAgIHZhciByb290ID0gbmV3IE5vZGUkMShkYXRhKSwKICAgICAgICAgIHZhbHVlZCA9ICtkYXRhLnZhbHVlICYmIChyb290LnZhbHVlID0gZGF0YS52YWx1ZSksCiAgICAgICAgICBub2RlLAogICAgICAgICAgbm9kZXMgPSBbcm9vdF0sCiAgICAgICAgICBjaGlsZCwKICAgICAgICAgIGNoaWxkcywKICAgICAgICAgIGksCiAgICAgICAgICBuOwoKICAgICAgaWYgKGNoaWxkcmVuID09IG51bGwpIGNoaWxkcmVuID0gZGVmYXVsdENoaWxkcmVuOwoKICAgICAgd2hpbGUgKG5vZGUgPSBub2Rlcy5wb3AoKSkgewogICAgICAgIGlmICh2YWx1ZWQpIG5vZGUudmFsdWUgPSArbm9kZS5kYXRhLnZhbHVlOwogICAgICAgIGlmICgoY2hpbGRzID0gY2hpbGRyZW4obm9kZS5kYXRhKSkgJiYgKG4gPSBjaGlsZHMubGVuZ3RoKSkgewogICAgICAgICAgbm9kZS5jaGlsZHJlbiA9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IEJbal0sIHApLCBCKSkgewogICAgICAgICAgICByZXR1cm4gW0JbaV0sIEJbal0sIHBdOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQoKICAgICAgLy8gSWYgd2UgZ2V0IGhlcmUgdGhlbiBzb21ldGhpbmcgaXMgdmVyeSB3cm9uZy4KICAgICAgdGhyb3cgbmV3IEVycm9yOwogICAgfQoKICAgIGZ1bmN0aW9uIGVuY2xvc2VzTm90KGEsIGIpIHsKICAgICAgdmFyIGRyID0gYS5yIC0gYi5yLCBkeCA9IGIueCAtIGEueCwgZHkgPSBiLnkgLSBhLnk7CiAgICAgIHJldHVybiBkciA8IDAgfHwgZHIgKiBkciA8IGR4ICogZHggKyBkeSAqIGR5OwogICAgfQoKICAgIGZ1bmN0aW9uIGVuY2xvc2VzV2VhayhhLCBiKSB7CiAgICAgIHZhciBkciA9IGEuciAtIGIuciArIDFlLTYsIGR4ID0gYi54IC0gYS54LCBkeSA9IGIueSAtIGEueTsKICAgICAgcmV0dXJuIGRyID4gMCAmJiBkciAqIGRyID4gZHggKiBkeCArIGR5ICogZHk7CiAgICB9CgogICAgZnVuY3Rpb24gZW5jbG9zZXNXZWFrQWxsKGEsIEIpIHsKICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBCLmxlbmd0aDsgKytpKSB7CiAgICAgICAgaWYgKCFlbmNsb3Nlc1dlYWsoYSwgQltpXSkpIHsKICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICB9CiAgICAgIH0KICAgICAgcmV0dXJuIHRydWU7CiAgICB9CgogICAgZnVuY3Rpb24gZW5jbG9zZUJhc2lzKEIpIHsKICAgICAgc3dpdGNoIChCLmxlbmd0aCkgewogICAgICAgIGNhc2UgMTogcmV0dXJuIGVuY2xvc2VCYXNpczEoQlswXSk7CiAgICAgICAgY2FzZSAyOiByZXR1cm4gZW5jbG9zZUJhc2lzMihCWzBdLCBCWzFdKTsKICAgICAgICBjYXNlIDM6IHJldHVybiBlbmNsb3NlQmFzaXMzKEJbMF0sIEJbMV0sIEJbMl0pOwogICAgICB9CiAgICB9CgogICAgZnVuY3Rpb24gZW5jbG9zZUJhc2lzMShhKSB7CiAgICAgIHJldHVybiB7CiAgICAgICAgeDogYS54LAogICAgICAgIHk6IGEueSwKICAgICAgICByOiBhLnIKICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiBlbmNsb3NlQmFzaXMyKGEsIGIpIHsKICAgICAgdmFyIHgxID0gYS54LCB5MSA9IGEueSwgcjEgPSBhLnIsCiAgICAgICAgICB4MiA9IGIueCwgeTIgPSBiLnksIHIyID0gYi5yLAogICAgICAgICAgeDIxID0geDIgLSB4MSwgeTIxID0geTIgLSB5MSwgcjIxID0gcjIgLSByMSwKICAgICAgICAgIGwgPSBNYXRoLnNxcnQoeDIxICogeDIxICsgeTIxICogeTIxKTsKICAgICAgcmV0dXJuIHsKICAgICAgICB4OiAoeDEgKyB4MiArIHgyMSAvIGwgKiByMjEpIC8gMiwKICAgICAgICB5OiAoeTEgKyB5MiArIHkyMSAvIGwgKiByMjEpIC8gMiwKICAgICAgICByOiAobCArIHIxICsgcjIpIC8gMgogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIGVuY2xvc2VCYXNpczMoYSwgYiwgYykgewogICAgICB2YXIgeDEgPSBhLngsIHkxID0gYS55LCByMSA9IGEuciwKICAgICAgICAgIHgyID0gYi54LCB5MiA9IGIueSwgcjIgPSBiLnIsCiAgICAgICAgICB4MyA9IGMueCwgeTMgPSBjLnksIHIzID0gYy5yLAogICAgICAgICAgYTIgPSB4MSAtIHgyLAogICAgICAgICAgYTMgPSB4MSAtIHgzLAogICAgICAgICAgYjIgPSB5MSAtIHkyLAogICAgICAgICAgYjMgPSB5MSAtIHkzLAogICAgICAgICAgYzIgPSByMiAtIHIxLAogICAgICAgICAgYzMgPSByMyAtIHIxLAogICAgICAgICAgZDEgPSB4MSAqIHgxICsgeTEgKiB5MSAtIHIxICogcjEsCiAgICAgICAgICBkMiA9IGQxIC0geDIgKiB4MiAtIHkyICogeTIgKyByMiAqIHIyLAogICAgICAgICAgZDMgPSBkMSAtIHgzICogeDMgLSB5MyAqIHkzICsgcjMgKiByMywKICAgICAgICAgIGFiID0gYTMgKiBiMiAtIGEyICogYjMsCiAgICAgICAgICB4YSA9IChiMiAqIGQzIC0gYjMgKiBkMikgLyAoYWIgKiAyKSAtIHgxLAogICAgICAgICAgeGIgPSAoYjMgKiBjMiAtIGIyICogYzMpIC8gYWIsCiAgICAgICAgICB5YSA9IChhMyAqIGQyIC0gYTIgKiBkMykgLyAoYWIgKiAyKSAtIHkxLAogICAgICAgICAgeWIgPSAoYTIgKiBjMyAtIGEzICogYzIpIC8gYWIsCiAgICAgICAgICBBID0geGIgKiB4YiArIHliICogeWIgLSAxLAogICAgICAgICAgQiA9IDIgKiAocjEgKyB4YSAqIHhiICsgeWEgKiB5YiksCiAgICAgICAgICBDID0geGEgKiB4YSArIHlhICogeWEgLSByMSAqIHIxLAogICAgICAgICAgciA9IC0oQSA/IChCICsgTWF0aC5zcXJ0KEIgKiBCIC0gNCAqIEEgKiBDKSkgLyAoMiAqIEEpIDogQyAvIEIpOwogICAgICByZXR1cm4gewogICAgICAgIHg6IHgxICsgeGEgKyB4YiAqIHIsCiAgICAgICAgeTogeTEgKyB5YSArIHliICogciwKICAgICAgICByOiByCiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gcGxhY2UoYiwgYSwgYykgewogICAgICB2YXIgZHggPSBiLnggLSBhLngsIHgsIGEyLAogICAgICAgICAgZHkgPSBiLnkgLSBhLnksIHksIGIyLAogICAgICAgICAgZDIgPSBkeCAqIGR4ICsgZHkgKiBkeTsKICAgICAgaWYgKGQyKSB7CiAgICAgICAgYTIgPSBhLnIgKyBjLnIsIGEyICo9IGEyOwogICAgICAgIGIyID0gYi5yICsgYy5yLCBiMiAqPSBiMjsKICAgICAgICBpZiAoYTIgPiBiMikgewogICAgICAgICAgeCA9IChkMiArIGIyIC0gYTIpIC8gKDIgKiBkMik7CiAgICAgICAgICB5ID0gTWF0aC5zcXJ0KE1hdGgubWF4KDAsIGIyIC8gZDIgLSB4ICogeCkpOwogICAgICAgICAgYy54ID0gYi54IC0geCAqIGR4IC0geSAqIGR5OwogICAgICAgICAgYy55ID0gYi55IC0geCAqIGR5ICsgeSAqIGR4OwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICB4ID0gKGQyICsgYTIgLSBiMikgLyAoMiAqIGQyKTsKICAgICAgICAgIHkgPSBNYXRoLnNxcnQoTWF0aC5tYXgoMCwgYTIgLyBkMiAtIHggKiB4KSk7CiAgICAgICAgICBjLnggPSBhLnggKyB4ICogZHggLSB5ICogZHk7CiAgICAgICAgICBjLnkgPSBhLnkgKyB4ICogZHkgKyB5ICogZHg7CiAgICAgICAgfQogICAgICB9IGVsc2UgewogICAgICAgIGMueCA9IGEueCArIGMucjsKICAgICAgICBjLnkgPSBhLnk7CiAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiBpbnRlcnNlY3RzKGEsIGIpIHsKICAgICAgdmFyIGRyID0gYS5yICsgYi5yIC0gMWUtNiwgZHggPSBiLnggLSBhLngsIGR5ID0gYi55IC0gYS55OwogICAgICByZXR1cm4gZHIgPiAwICYmIGRyICogZHIgPiBkeCAqIGR4ICsgZHkgKiBkeTsKICAgIH0KCiAgICBmdW5jdGlvbiBzY29yZShub2RlKSB7CiAgICAgIHZhciBhID0gbm9kZS5fLAogICAgICAgICAgYiA9IG5vZGUubmV4dC5fLAogICAgICAgICAgYWIgPSBhLnIgKyBiLnIsCiAgICAgICAgICBkeCA9IChhLnggKiBiLnIgKyBiLnggKiBhLnIpIC8gYWIsCiAgICAgICAgICBkeSA9IChhLnkgKiBiLnIgKyBiLnkgKiBhLnIpIC8gYWI7CiAgICAgIHJldHVybiBkeCAqIGR4ICsgZHkgKiBkeTsKICAgIH0KCiAgICBmdW5jdGlvbiBOb2RlJDIoY2lyY2xlKSB7CiAgICAgIHRoaXMuXyA9IGNpc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FjZShhLl8sIGIuXywgYyA9IGNpcmNsZXNbaV0pLCBjID0gbmV3IE5vZGUkMihjKTsKCiAgICAgICAgLy8gRmluZCB0aGUgY2xvc2VzdCBpbnRlcnNlY3RpbmcgY2lyY2xlIG9uIHRoZSBmcm9udC1jaGFpbiwgaWYgYW55LgogICAgICAgIC8vIOKAnENsb3NlbmVzc+KAnSBpcyBkZXRlcm1pbmVkIGJ5IGxpbmVhciBkaXN0YW5jZSBhbG9uZyB0aGUgZnJvbnQtY2hhaW4uCiAgICAgICAgLy8g4oCcQWhlYWTigJ0gb3Ig4oCcYmVoaW5k4oCdIGlzIGxpa2V3aXNlIGRldGVybWluZWQgYnkgbGluZWFyIGRpc3RhbmNlLgogICAgICAgIGogPSBiLm5leHQsIGsgPSBhLnByZXZpb3VzLCBzaiA9IGIuXy5yLCBzayA9IGEuXy5yOwogICAgICAgIGRvIHsKICAgICAgICAgIGlmIChzaiA8PSBzaykgewogICAgICAgICAgICBpZiAoaW50ZXJzZWN0cyhqLl8sIGMuXykpIHsKICAgICAgICAgICAgICBiID0gaiwgYS5uZXh0ID0gYiwgYi5wcmV2aW91cyA9IGEsIC0taTsKICAgICAgICAgICAgICBjb250aW51ZSBwYWNrOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHNqICs9IGouXy5yLCBqID0gai5uZXh0OwogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgaWYgKGludGVyc2VjdHMoay5fLCBjLl8pKSB7CiAgICAgICAgICAgICAgYSA9IGssIGEubmV4dCA9IGIsIGIucHJldmlvdXMgPSBhLCAtLWk7CiAgICAgICAgICAgICAgY29udGludWUgcGFjazsKICAgICAgICAgICAgfQogICAgICAgICAgICBzayArPSBrLl8uciwgayA9IGsucHJldmlvdXM7CiAgICAgICAgICB9CiAgICAgICAgfSB3aGlsZSAoaiAhPT0gay5uZXh0KTsKCiAgICAgICAgLy8gU3VjY2VzcyEgSW5zZXJ0IHRoZSBuZXcgY2lyY2xlIGMgYmV0d2V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W9mIGYgIT09ICJmdW5jdGlvbiIpIHRocm93IG5ldyBFcnJvcjsKICAgICAgcmV0dXJuIGY7CiAgICB9CgogICAgZnVuY3Rpb24gY29uc3RhbnRaZXJvKCkgewogICAgICByZXR1cm4gMDsKICAgIH0KCiAgICBmdW5jdGlvbiBjb25zdGFudCQ5KHgpIHsKICAgICAgcmV0dXJuIGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiB4OwogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIGRlZmF1bHRSYWRpdXMkMShkKSB7CiAgICAgIHJldHVybiBNYXRoLnNxcnQoZC52YWx1ZSk7CiAgICB9CgogICAgZnVuY3Rpb24gaW5kZXgkMigpIHsKICAgICAgdmFyIHJhZGl1cyA9IG51bGwsCiAgICAgICAgICBkeCA9IDEsCiAgICAgICAgICBkeSA9IDEsCiAgICAgICAgICBwYWRkaW5nID0gY29uc3RhbnRaZXJvOwoKICAgICAgZnVuY3Rpb24gcGFjayhyb290KSB7CiAgICAgICAgcm9vdC54ID0gZHggLyAyLCByb290LnkgPSBkeSAvIDI7CiAgICAgICAgaWYgKHJhZGl1cykgewogICAgICAgICAgcm9vdC5lYWNoQmVmb3JlKHJhZGl1c0xlYWYocmFkaXVzKSkKICAgICAgICAgICAgICAuZWFjaEFmdGVyKHBhY2tDaGlsZHJlbihwYWRkaW5nLCAwLjUpKQogICAgICAgICAgICAgIC5lYWNoQmVmb3JlKHRyYW5zbGF0ZUNoaWxkKDEpKTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgcm9vdC5lYWNoQmVmb3JlKHJhZGl1c0xlYWYoZGVmYXVsdFJhZGl1cyQxKSkKICAgICAgICAgICAgICAuZWFjaEFmdGVyKHBhY2tDaGlsZHJlbihjb25zdGFudFplcm8sIDEpKQogICAgICAgICAgICAgIC5lYWNoQWZ0ZXIocGFja0NoaWxkcmVuKHBhZGRpbmcsIHJvb3QuciAvIE1hdGgubWluKGR4LCBkeSkpKQogICAgICAgICAgICAgI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CiAgICAgICAgICAgICAgbiA9IGNoaWxkcmVuLmxlbmd0aCwKICAgICAgICAgICAgICByID0gcGFkZGluZyhub2RlKSAqIGsgfHwgMCwKICAgICAgICAgICAgICBlOwoKICAgICAgICAgIGlmIChyKSBmb3IgKGkgPSAwOyBpIDwgbjsgKytpKSBjaGlsZHJlbltpXS5yICs9IHI7CiAgICAgICAgICBlID0gcGFja0VuY2xvc2UoY2hpbGRyZW4pOwogICAgICAgICAgaWYgKHIpIGZvciAoaSA9IDA7IGkgPCBuOyArK2kpIGNoaWxkcmVuW2ldLnIgLT0gcjsKICAgICAgICAgIG5vZGUuciA9IGUgKyByOwogICAgICAgIH0KICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiB0cmFuc2xhdGVDaGlsZChrKSB7CiAgICAgIHJldHVybiBmdW5jdGlvbihub2RlKSB7CiAgICAgICAgdmFyIHBhcmVudCA9IG5vZGUucGFyZW50OwogICAgICAgIG5vZGUuciAqPSBrOwogICAgICAgIGlmIChwYXJlbnQpIHsKICAgICAgICAgIG5vZGUueCA9IHBhcmVudC54ICsgayAqIG5vZGUueDsKICAgICAgICAgIG5vZGUueSA9IHBhcmVudC55ICsgayAqIG5vZGUueTsKICAgICAgICB9CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gcm91bmROb2RlKG5vZGUpIHsKICAgICAgbm9kZS54MCA9IE1hdGgucm91bmQobm9kZS54MCk7CiAgICAgIG5vZGUueTAgPSBNYXRoLnJvdW5kKG5vZGUueTApOwogICAgICBub2RlLngxID0gTWF0aC5yb3VuZChub2RlLngxKTsKICAgICAgbm9kZS55MSA9IE1hdGgucm91bmQobm9kZS55MSk7CiAgICB9CgogICAgZnVuY3Rpb24gdHJlZW1hcERpY2UocGFyZW50LCB4MCwgeTAsIHgxLCB5MSkgewogICAgICB2YXIgbm9kZXMgPSBwYXJlbnQuY2hpbGRyZW4sCiAgICAgICAgICBub2RlLAogICAgICAgICAgaSA9IC0xLAogICAgICAgICAgbiA9IG5vZGVzLmxlbmd0aCwKICAgICAgICAgIGsgPSBwYXJlbnQudmFsdWUgJiYgKHgxIC0geDApIC8gcGFyZW50LnZhbHVlOwoKICAgICAgd2hpbGUgKCsraSA8IG4pIHsKICAgICAgICBub2RlID0gbm9kZXNbaV0sIG5vZGUueTAgPSB5MCwgbm9kZS55MSA9IHkxOwogICAgICAgIG5vZGUueDAgPSB4MCwgbm9kZS54MSA9IHgwICs9IG5vZGUudmFsdWUgKiBrOwogICAgICB9CiAgICB9CgogICAgZnVuY3Rpb24gcGFydGl0aW9uKCkgewogICAgICB2YXIgZHggPSAxLAogICAgICAgICAgZHkgPSAxLAogICAgICAgICAgcGFkZGluZyA9IDAsCiAgICAgICAgICByb3VuZCA9IGZhbHNlOwoKICAgICAgZnVuY3Rpb24gcGFydGl0aW9uKHJvb3QpIHsKICAgICAgICB2YXIgbiA9IHJvb3QuaGVpZ2h0ICsgMTsKICAgICAgICByb290LngwID0KICAgICAgICByb290LnkwID0gcGFkZGluZzsKICAgICAgICByb290LngxID0gZHg7CiAgICAgICAgcm9vdC55MSA9IGR5IC8gbjsKICAgICAgICByb290LmVhY2hCZWZvcmUocG9zaXRpb25Ob2RlKGR5LCBuKSk7CiAgICAgICAgaWYgKHJvdW5kKSByb290LmVhY2hCZWZvcmUocm91bmROb2RlKTsKICAgICAgICByZXR1cm4gcm9vdDsKICAgICAgfQoKICAgICAgZnVuY3Rpb24gcG9zaXRpb25Ob2RlKGR5LCBuKSB7CiAgICAgICAgcmV0dXJuIGZ1bmN0aW9uKG5vZGUpIHsKICAgICAgICAgIGlmIChub2RlLmNoaWxkcmVuKSB7CiAgICAgICAgICAgIHRyZWVtYXBEaWNlKG5vZGUsIG5vZGUueDAsIGR5ICogKG5vZGUuZGVwdGggKyAxKSAvIG4sIG5vZGUueDEsIGR5ICogKG5vZGUuZGVwdGggKyAyKSAvIG4pOwogICAgICAgICAgfQogICAgICAgICAgdmFyIHgwID0gbm9kZS54MCwKICAgICAgICAgICAgICB5MCA9IG5vZGUueTAsCiAgICAgICAgICAgICAgeDEgPSBub2RlLngxIC0gcGFkZGluZywKICAgICAgICAgICAgICB5MSA9IG5vZGUueTEgLSBwYWRkaW5nOwogICAgICAgICAgaWYgKHgxIDwgeDApIHgwID0geDEgPSAoeDAgKyB4MSkgLyAyOwogICAgICAgICAgaWYgKHkxIDwgeTApIHkwID0geTEgPSAoeTAgKyB5MSkgLyAyOwogICAgICAgICAgbm9kZS54MCA9IHgwOwogICAgICAgICAgbm9kZS55MCA9IHkwOwogICAgICAgICAgbm9kZS54MSA9IHgxOwogICAgICAgICAgbm9kZS55MSA9IHkxOwogICAgICAgIH07CiAgICAgIH0KCiAgICAgIHBhcnRpdGlvbi5yb3VuZCA9IGZ1bmN0aW9uKHgpIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChyb3VuZCA9ICEheCwgcGFydGl0aW9uKSA6IHJvdW5kOwogICAgICB9OwoKICAgICAgcGFydGl0aW9uLnNpemUgPSBmdW5jdGlvbih4KSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoZHggPSAreFswXSwgZHkgPSAreFsxXSwgcGFydGl0aW9uKSA6IFtkeCwgZHldOwogICAgICB9OwoKICAgICAgcGFydGl0aW9uLnBhZGRpbmcgPSBmdW5jdGlvbih4KSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAocGFkZGluZyA9ICt4LCBwYXJ0aXRpb24pIDogcGFkZGluZzsKICAgICAgfTsKCiAgICAgIHJldHVybiBwYXJ0aXRpb247CiAgICB9CgogICAgdmFyIGtleVByZWZpeCQxID0gIiQiLCAvLyBQcm90ZWN0IGFnYWluc3Qga2V5cyBsaWtlIOKAnF9fcHJvdG9fX+KAnS4KICAgICAgICBwcmVyb290ID0ge2RlcHRoOiAtMX0sCiAgICAgICAgYW1iaWd1b3VzID0ge307CgogICAgZnVuY3Rpb24gZGVmYXVsdElkKGQpIHsKICAgICAgcmV0dXJuIGQuaWQ7CiAgICB9CgogICAgZnVuY3Rpb24gZGVmYXVsdFBhcmVudElkKGQpIHsKICAgICAgcmV0dXJuIGQucGFyZW50SWQ7CiAgICB9CgogICAgZnVuY3Rpb24gc3RyYXRpZnkoKSB7CiAgICAgIHZhciBpZCA9IGRlZmF1bHRJZCwKICAgICAgICAgIHBhcmVudElkID0gZGVmYXVsdFBhcmVudElkOwoKICAgICAgZnVuY3Rpb24gc3RyYXRpZnkoZGF0YSkgewogICAgICAgIHZhciBkLAogICAgICAgICAgICBpLAogICAgICAgICAgICBuID0gZGF0YS5sZW5ndGgsCiAgICAgICAgICAgIHJvb3QsCiAgICAgICAgICAgIHBhcmVudCwKICAgICAgICAgICAgbm9kZSwKICAgICAgICAgICAgbm9kZXMgPSBuZXcgQXJyYXkobiksCiAgICAgICAgICAgIG5vZGVJZCwKICAgICAgICAgICAgbm9kZUtleSwKICAgICAgICAgICAgbm9kZUJ5S2V5ID0ge307CgogICAgICAgIGZvciAoaSA9IDA7IGkgPCBuOyArK2kpIHsKICAgICAgICAgIGQgPSBkYXRhW2ldLCBub2RlID0gbm9kZXNbaV0gPSBuZXcgTm9kZSQxKGQpOwogICAgICAgICAgaWYgKChub2RlSWQgPSBpZChkLCBpLCBkYXRhKSkgIT0gbnVsbCAmJiAobm9kZUlkICs9ICIiKSkgewogICAgICAgICAgICBub2RlS2V5ID0ga2V5UHJlZml4JDEgKyAobm9kZS5pZCA9IG5vZGVJZCk7CiAgICAgICAgICAgIG5vZGVCeUtleVtub2RlS2V5XSA9IG5vZGVLZXkgaW4gbm9kZUJ5S2V5ID8gYW1iaWd1b3VzIDogbm9kZTsKICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIGZvciAoaSA9IDA7IGkgPCBuOyArK2kpIHsKICAgICAgICAgIG5vZGUgPSBub2Rlc1tpXSwgbm9kZUlkID0gcGFyZW50SWQoZGF0YVtpXSwgaSwgZGF0YSk7CiAgICAgICAgICBpZiAobm9kZUlkID09IG51bGwgfHwgIShub2RlSWQgKz0gIiIpKSB7CiAgICAgICAgICAgIGlmIChyb290KSB0aHJvdyBuZXcgRXJyb3IoIm11bHRpcGxlIHJvb3RzIik7CiAgICAgICAgICAgIHJvb3QgPSBub2RlOwogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgcGFyZW50ID0gbm9kZUJ5S2V5W2tleVByZWZpeCQxICsgbm9kZUlkXTsKICAgICAgICAgICAgaWYgKCFwYXJlbnQpIHRocm93IG5ldyBFcnJvcigibWlzc2luZzogIiArIG5vZGVJZCk7CiAgICAgICAgICAgIGlmIChwYXJlbnQgPT09IGFtYmlndW91cykgdGhyb3cgbmV3IEVycm9yKCJhbWJpZ3VvdXM6ICIgKyBub2RlSWQpOwogICAgICAgICAgICBpZiAocGFyZW50LmNoaWxkcmVuKSBwYXJlbnQuY2hpbGRyZW4ucHVzaChub2RlKTsKICAgICAgICAgICAgZWxzZSBwYXJlbnQuY2hpbGRyZW4gPSBbbm9kZV07CiAgICAgICAgICAgIG5vZGUucGFyZW50ID0gcGFyZW50OwogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgaWYgKCFyb290KSB0aHJvdyBuZXcgRXJyb3IoIm5vIHJvb3QiKTsKICAgICAgICByb290LnBhcmVudCA9IHByZXJvb3Q7CiAgICAgICAgcm9vdC5lYWNoQmVmb3JlKGZ1bmN0aW9uKG5vZGUpIHsgbm9kZS5kZXB0aCA9IG5vZGUucGFyZW50LmRlcHRoICsgMTsgLS1uOyB9KS5lYWNoQmVmb3JlKGNvbXB1dGVIZWlnaHQpOwogICAgICAgIHJvb3QucGFyZW50ID0gbnVsbDsKICAgICAgICBpZiAobiA+IDApIHRocm93IG5ldyBFcnJvcigiY3ljbGUiKTsKCiAgICAgICAgcmV0dXJuIHJvb3Q7CiAgICAgIH0KCiAgICAgIHN0cmF0aWZ5LmlkID0gZnVuY3Rpb24oeCkgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3R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b3Qocm9vdCk7CgogICAgICAgIC8vIENvbXB1dGUgdGhlIGxheW91dCB1c2luZyBCdWNoaGVpbSBldCBhbC7igJlzIGFsZ29yaXRobS4KICAgICAgICB0LmVhY2hBZnRlcihmaXJzdFdhbGspLCB0LnBhcmVudC5tID0gLXQuejsKICAgICAgICB0LmVhY2hCZWZvcmUoc2Vjb25kV2Fsayk7CgogICAgICAgIC8vIElmIGEgZml4ZWQgbm9kZSBzaXplIGlzIHNwZWNpZmllZCwgc2NhbGUgeCBhbmQgeS4KICAgICAgICBpZiAobm9kZVNpemUpIHJvb3QuZWFjaEJlZm9yZShzaXplTm9kZSk7CgogICAgICAgIC8vIElmIGEgZml4ZWQgdHJlZSBzaXplIGlzIHNwZWNpZmllZCwgc2NhbGUgeCBhbmQgeSBiYXNlZCBvbiB0aGUgZXh0ZW50LgogICAgICAgIC8vIENvbXB1dGUgdGhlIGxlZnQtbW9zdCwgcmlnaHQtbW9zdCwgYW5kIGRlcHRoLW1vc3Qgbm9kZXMgZm9yIGV4dGVudHMuCiAgICAgICAgZWxzZSB7CiAgICAgICAgICB2YXIgbGVmdCA9IHJvb3QsCiAgICAgICAgICAgICAgcmlnaHQgPSByb290LAogICAgICAgICAgICAgIGJvdHRvbSA9IHJvb3Q7CiAgICAgICAgICByb290LmVhY2hCZWZvcmUoZnVuY3Rpb24obm9kZSkgewogICAgICAgICAgICBpZiAobm9kZS54IDwgbGVmdC54KSBsZWZ0ID0gbm9kZTsKICAgICAgICAgICAgaWYgKG5vZGUueCA+IHJpZ2h0LngpIHJpZ2h0ID0gbm9kZTsKICAgICAgICAgICAgaWYgKG5vZGUuZGVwdGggPiBib3R0b20uZGVwdGgpIGJvdHRvbSA9IG5vZGU7CiAgICAgICAgICB9KTsKICAgICAgICAgIHZhciBzID0gbGVmdCA9PT0gcmlnaHQgPyAxIDogc2VwYXJhdGlvbihsZWZ0LCByaWdodCkgLyAyLAogICAgICAgICAgICAgIHR4ID0gcyAtIGxlZnQueCwKICAg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gc2hpZnQ7CiAgICAgICAgICB3aGlsZSAodmltID0gbmV4dFJpZ2h0KHZpbSksIHZpcCA9IG5leHRMZWZ0KHZpcCksIHZpbSAmJiB2aXApIHsKICAgICAgICAgICAgdm9tID0gbmV4dExlZnQodm9tKTsKICAgICAgICAgICAgdm9wID0gbmV4dFJpZ2h0KHZvcCk7CiAgICAgICAgICAgIHZvcC5hID0gdjsKICAgICAgICAgICAgc2hpZnQgPSB2aW0ueiArIHNpbSAtIHZpcC56IC0gc2lwICsgc2VwYXJhdGlvbih2aW0uXywgdmlwLl8pOwogICAgICAgICAgICBpZiAoc2hpZnQgPiAwKSB7CiAgICAgICAgICAgICAgbW92ZVN1YnRyZWUobmV4dEFuY2VzdG9yKHZpbSwgdiwgYW5jZXN0b3IpLCB2LCBzaGlmdCk7CiAgICAgICAgICAgICAgc2lwICs9IHNoaWZ0OwogICAgICAgICAgICAgIHNvcCArPSBzaGlmdDsKICAgICAgICAgICAgfQogICAgICAgICAgICBzaW0gKz0gdmltLm07CiAgICAgICAgICAgIHNpcCArPSB2aXAubTsKICAgICAgICAgICAgc29tICs9IHZvbS5tOwogICAgICAgICAgICBzb3AgKz0gdm9wLm07CiAgICAgICAgICB9CiAgICAgICAgICBpZiAodmltICYmICFuZXh0UmlnaHQodm9wKSkgewogICAgICAgICAgICB2b3AudCA9IHZpbTsKICAgICAgICAgICAgdm9wLm0gKz0gc2ltIC0gc29wOwogICAgICAgICAgfQogICAgICAgICAgaWYgKHZpcCAmJiAhbmV4dExlZnQodm9tKSkgewogICAgICAgICAgICB2b20udCA9IHZpcDsKICAgICAgICAgICAgdm9tLm0gKz0gc2lwIC0gc29tOwogICAgICAgICAgICBhbmNlc3RvciA9IHY7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiBhbmNlc3RvcjsKICAgICAgfQoKICAgICAgZnVuY3Rpb24gc2l6ZU5vZGUobm9kZSkgewogICAgICAgIG5vZGUueCAqPSBkeDsKICAgICAgICBub2RlL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ogICAgdmFyIHBoaSA9ICgxICsgTWF0aC5zcXJ0KDUpKSAvIDI7CgogICAgZnVuY3Rpb24gc3F1YXJpZnlSYXRpbyhyYXRpbywgcGFyZW50LCB4MCwgeTAsIHgxLCB5MSkgewogICAgICB2YXIgcm93cyA9IFtdLAogICAgICAgICAgbm9kZXMgPSBwYXJlbnQuY2hpbGRyZW4sCiAgICAgICAgICByb3csCiAgICAgICAgICBub2RlVmFsdWUsCiAgICAgICAgICBpMCA9IDAsCiAgICAgICAgICBpMSA9IDAsCiAgICAgICAgICBuID0gbm9kZXMubGVuZ3RoLAogICAgICAgICAgZHgsIGR5LAogICAgICAgICAgdmFsdWUgPSBwYXJlbnQudmFsdWUsCiAgICAgICAgICBzdW1WYWx1ZSwKICAgICAgICAgIG1pblZhbHVlLAogICAgICAgICAgbWF4VmFsdWUsCiAgICAgICAgICBuZXdSYXRpbywKICAgICAgICAgIG1pblJhdGlvLAogICAgICAgICAgYWxwaGEsCiAgICAgICAgICBiZXRhOwoKICAgICAgd2hpbGUgKGkwIDwgbikgewogICAgICAgIGR4ID0geDEgLSB4MCwgZHkgPSB5MSAtIHkwOwoKICAgICAgICAvLyBGaW5kIHRoZSBuZXh0IG5vbi1lbXB0eSBub2RlLgogICAgICAgIGRvIHN1bVZhbHVlID0gbm9kZXNbaTErK10udmFsdWU7IHdoaWxlICghc3VtVmFsdWUgJiYgaTEgPCBuKTsKICAgICAgICBtaW5WYWx1ZSA9IG1heFZhbHVlID0gc3VtVmFsdWU7CiAgICAgICAgYWxwaGEgPSBNYXRoLm1heChkeSAvIGR4LCBkeCAvIGR5KSAvICh2YWx1ZSAqIHJhdGlvKTsKICAgICAgICBiZXRhID0gc3VtVmFsdWUgKiBzdW1WYWx1ZSAqIGFscGhhOwogICAgICAgIG1pblJhdGlvID0gTWF0aC5tYXgobWF4VmFsdWUgLyBiZXRhLCBiZXRhIC8gbWluVmFsdWUpOwoKICAgICAgICAvLyBLZWVwIGFkZGluZyBub2RlcyB3aGl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gICAgIH0KCiAgICAgIHJldHVybiByb3dzOwogICAgfQoKICAgIHZhciBzcXVhcmlmeSA9IChmdW5jdGlvbiBjdXN0b20ocmF0aW8pIHsKCiAgICAgIGZ1bmN0aW9uIHNxdWFyaWZ5KHBhcmVudCwgeDAsIHkwLCB4MSwgeTEpIHsKICAgICAgICBzcXVhcmlmeVJhdGlvKHJhdGlvLCBwYXJlbnQsIHgwLCB5MCwgeDEsIHkxKTsKICAgICAgfQoKICAgICAgc3F1YXJpZnkucmF0aW8gPSBmdW5jdGlvbih4KSB7CiAgICAgICAgcmV0dXJuIGN1c3RvbSgoeCA9ICt4KSA+IDEgPyB4IDogMSk7CiAgICAgIH07CgogICAgICByZXR1cm4gc3F1YXJpZnk7CiAgICB9KShwaGkpOwoKICAgIGZ1bmN0aW9uIGluZGV4JDMoKSB7CiAgICAgIHZhciB0aWxlID0gc3F1YXJpZnksCiAgICAgICAgICByb3VuZCA9IGZhbHNlLAogICAgICAgICAgZHggPSAxLAogICAgICAgICAgZHkgPSAxLAogICAgICAgICAgcGFkZGluZ1N0YWNrID0gWzBdLAogICAgICAgICAgcGFkZGluZ0lubmVyID0gY29uc3RhbnRaZXJvLAogICAgICAgICAgcGFkZGluZ1RvcCA9IGNvbnN0YW50WmVybywKICAgICAgICAgIHBhZGRpbmdSaWdodCA9IGNvbnN0YW50WmVybywKICAgICAgICAgIHBhZGRpbmdCb3R0b20gPSBjb25zdGFudFplcm8sCiAgICAgICAgICBwYWRkaW5nTGVmdCA9IGNvbnN0YW50WmVybzsKCiAgICAgIGZ1bmN0aW9uIHRyZWVtYXAocm9vdCkgewogICAgICAgIHJvb3QueDAgPQogICAgICAgIHJvb3QueTAgPSAwOwogICAgICAgIHJvb3QueDEgPSBkeDsKICAgICAgICByb290LnkxID0gZHk7CiAgICAgICAgcm9vdC5lYWNoQmVmb3JlKHBvc2l0aW9uTm9kZSk7CiAgICAgICAgcGFkZGluZ1N0YWNrID0gWzBdOwogICAgICAgIGlmIChyb3VuZCkgcm9vdC5lYWNoQmVmb3JlKHJvdW5kTm9kZSk7CiAgICAgICAgcmV0dXJuIHJvb3Q7CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIHBvc2l0aW9uTm9kZShub2RlKSB7CiAgICAgICAgdmFyIHAgPSBwYWRkaW5nU3RhY2tbbm9kZS5kZXB0aF0sCiAgICAgICAgICAgIHgwID0gbm9kZS54MCArIHAsCiAgICAgICAgICAgIHkwID0gbm9kZS55MCArIHAsCiAgICAgICAgICAgIHgxID0gbm9kZS54MSAtIHAsCiAgICAgICAgICAgIHkxID0gbm9kZS55MSAtIHA7CiAgICAgICAgaWYgKHgxIDwgeDApIHgwID0geDEgPSAoeDAgKyB4MSkgLyAyOwogICAgICAgIGlmICh5MSA8IHkwKSB5MCA9IHkxID0gKHkwICsgeTEpIC8gMjsKICAgICAgICBub2RlLngwID0geDA7CiAgICAgICAgbm9kZS55MCA9IHkwOwogICAgICAgIG5vZGUueDEgPSB4MTsKICAgICAgICBub2RlLnkxID0geTE7CiAgICAgICAgaWYgKG5vZGUuY2hpbGRyZW4pIHsKICAgICAgICAgIHAgPSBwYWRkaW5nU3RhY2tbbm9kZS5kZXB0aCArIDFdID0gcGFkZGluZ0lubmVyKG5vZGUpIC8gMjsKICAgICAgICAgIHgwICs9IHBhZGRpbmdMZWZ0KG5vZGUpIC0gcDsKICAgICAgICAgIHkwICs9IHBhZGRpbmdUb3Aobm9kZSkgLSBwOwogICAgICAgICAgeDEgLT0gcGFkZGluZ1JpZ2h0KG5vZGUpIC0gcDsKICAgICAgICAgIHkxIC09IHBhZGRpbmdCb3R0b20obm9kZSkgLSBwOwogICAgICAgICAgaWYgKHgxIDwgeDApIHgwID0geDEgPSAoeDAgKyB4MSkgLyAyOwogICAgICAgICAgaWYgKHkxIDwgeTApIHkwID0geTEgPSAoeTAgKyB5MSkgLyAyOwogICAgICAgICAgdGlsZShub2RlLCB4MCwgeTAsIHgxLCB5MSk7CiAgICAgICAgfQogICAgICB9CgogIC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ICAgICAgICAgIGksIG4gPSBub2Rlcy5sZW5ndGgsCiAgICAgICAgICBzdW0sIHN1bXMgPSBuZXcgQXJyYXkobiArIDEpOwoKICAgICAgZm9yIChzdW1zWzBdID0gc3VtID0gaSA9IDA7IGkgPCBuOyArK2kpIHsKICAgICAgICBzdW1zW2kgKyAxXSA9IHN1bSArPSBub2Rlc1tpXS52YWx1ZTsKICAgICAgfQoKICAgICAgcGFydGl0aW9uKDAsIG4sIHBhcmVudC52YWx1ZSwgeDAsIHkwLCB4MSwgeTEpOwoKICAgICAgZnVuY3Rpb24gcGFydGl0aW9uKGksIGosIHZhbHVlLCB4MCwgeTAsIHgxLCB5MSkgewogICAgICAgIGlmIChpID49IGogLSAxKSB7CiAgICAgICAgICB2YXIgbm9kZSA9IG5vZGVzW2ldOwogICAgICAgICAgbm9kZS54MCA9IHgwLCBub2RlLnkwID0geTA7CiAgICAgICAgICBub2RlLngxID0geDEsIG5vZGUueTEgPSB5MTsKICAgICAgICAgIHJldHVybjsKICAgICAgICB9CgogICAgICAgIHZhciB2YWx1ZU9mZnNldCA9IHN1bXNbaV0sCiAgICAgICAgICAgIHZhbHVlVGFyZ2V0ID0gKHZhbHVlIC8gMikgKyB2YWx1ZU9mZnNldCwKICAgICAgICAgICAgayA9IGkgKyAxLAogICAgICAgICAgICBoaSA9IGogLSAxOwoKICAgICAgICB3aGlsZSAoayA8IGhpKSB7CiAgICAgICAgICB2YXIgbWlkID0gayArIGhpID4+PiAxOwogICAgICAgICAgaWYgKHN1bXNbbWlkXSA8IHZhbHVlVGFyZ2V0KSBrID0gbWlkICsgMTsKICAgICAgICAgIGVsc2UgaGkgPSBtaWQ7CiAgICAgICAgfQoKICAgICAgICBpZiAoKHZhbHVlVGFyZ2V0IC0gc3Vtc1trIC0gMV0pIDwgKHN1bXNba10gLSB2YWx1ZVRhcmdldCkgJiYgaSArIDEgPCBrKSAtLWs7CgogICAgICAgIHZhciB2YWx1ZUxlZnQgPSBzdW1zW2tdIC0gdmFsdWVPZmZzZXQsCiAgICAgICAgICAgIHZhbHVlUmlnaHQgPSB2YWx1ZSAtIHZhbHVlTGVmdDsKCiAgICAgICAgaWYgKCh4MSAtIHgwKSA+ICh5MSAtIHkwKSkgewogICAgICAgICAgdmFyIHhrID0gKHgwICogdmFsdWVSaWdodCArIHgxICogdmFsdWVMZWZ0KSAvIHZhbHVlOwogICAgICAgICAgcGFydGl0aW9uKGksIGssIHZhbHVlTGVmdCwgeDAsIHkwLCB4aywgeTEpOwogICAgICAgICAgcGFydGl0aW9uKGssIGosIHZhbHVlUmlnaHQsIHhrLCB5MCwgeDEsIHkxKTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgdmFyIHlrID0gKHkwICogdmFsdWVSaWdodCArIHkxICogdmFsdWVMZWZ0KSAvIHZhbHVlOwogICAgICAgICAgcGFydGl0aW9uKGksIGssIHZhbHVlTGVmdCwgeDAsIHkwLCB4MSwgeWspOwogICAgICAgICAgcGFydGl0aW9uKGssIGosIHZhbHVlUmlnaHQsIHgwLCB5aywgeDEsIHkxKTsKICAgICAgICB9CiAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiBzbGljZURpY2UocGFyZW50LCB4MCwgeTAsIHgxLCB5MSkgewogICAgICAocGFyZW50LmRlcHRoICYgMSA/IHRyZWVtYXBTbGljZSA6IHRyZWVtYXBEaWNlKShwYXJlbnQsIHgwLCB5MCwgeDEsIHkxKTsKICAgIH0KCiAgICB2YXIgcmVzcXVhcmlmeSA9IChmdW5jdGlvbiBjdXN0b20ocmF0aW8pIHsKCiAgICAgIGZ1bmN0aW9uIHJlc3F1YXJpZnkocGFyZW50LCB4MCwgeTAsIHgxLCB5MSkgewogICAgICAgIGlmICgocm93cyA9IHBhcmVudC5fc3F1YXJpZnkpICYmIChyb3dzLnJhdGlvID09PSByYXRpbykpIHsKICAgICAgICAgIHZhciByb3dzLAogICAgICAgICAgICAgIHJvdywKICAgICAgICAgICAgICBub2RlcywKICAgICAgICAgICAgICBpLAogICAgICAgICAgICAgIGogPSAtMSwKICAgICAgICAgICAgICBuLAogICAgICAgICAgICAgIG0gPSByb3dzLmxlbmd0aCwKICAgICAgICAgICAgICB2YWx1ZSA9IHBhcmVudC52YWx1ZTsKCiAgICAgICAgICB3aGlsZSAoKytqIDwgbSkgewogICAgICAgICAgICByb3cgPSByb3dzW2pdLCBub2RlcyA9IHJvdy5jaGlsZHJlbjsKICAgICAgICAgICAgZm9yIChpID0gcm93LnZhbHVlID0gMCwgbiA9IG5vZGVzLmxlbmd0aDsgaSA8IG47ICsraSkgcm93LnZhbHVlICs9IG5vZGVzW2ldLnZhbHVlOwogICAgICAgICAgICBpZiAocm93LmRpY2UpIHRyZWVtYXBEaWNlKHJvdywgeDAsIHkwLCB4MSwgeTAgKz0gKHkxIC0geTApICogcm93LnZhbHVlIC8gdmFsdWUpOwogICAgICAgICAgICBlbHNlIHRyZWVtYXBTbGljZShyb3csIHgwLCB5MCwgeDAgKz0gKHgxIC0geDApICogcm93LnZhbHVlIC8gdmFsdWUsIHkxKTsKICAgICAgICAgICAgdmFsdWUgLT0gcm93LnZhbHVlOwogICAgICAgICAgfQogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICBwYXJlbnQuX3NxdWFyaWZ5ID0gcm93cyA9IHNxdWFyaWZ5UmF0aW8ocmF0aW8sIHBhcmVudCwgeDAsIHkwLCB4MSwgeTEpOwogICAgICAgICAgcm93cy5yYXRpbyA9IHJhdGlvOwogICAgICAgIH0KICAgICAgfQoKICAgICAgcmVzcXVhcmlmeS5yYXRpbyA9IGZ1bmN0aW9uKHgpIHsKICAgICAgICByZXR1cm4gY3VzdG9tKCh4ID0gK3gpID4gMSA/IHggOiAxKTsKICAgICAgfTsKCiAgICAgIHJldHVybiByZXNxdWFyaWZ5OwogICAgfSkocGhpKTsKCiAgICBmdW5jdGlvbiBhcmVhJDIocG9seWdvbikgewogICAgICB2YXIgaSA9IC0xLAogICAgICAgICAgbiA9IHBvbHlnb24ubGVuZ3RoLAogICAgICAgICAgYSwKICAgICAgICAgIGIgPSBwb2x5Z29uW24gLSAxXSwKICAgICAgICAgIGFyZWEgPSAwOwoKICAgICAgd2hpbGUgKCsraSA8IG4pIHsKICAgICAgICBhID0gYjsKICAgICAgICBiID0gcG9seWdvbltpXTsKICAgICAgICBhcmVhICs9IGFbMV0gKiBiWzBdIC0gYVswXSAqIGJbMV07CiAgICAgIH0KCiAgICAgIHJldHVybiBhcmVhIC8gMjsKICAgIH0KCiAgICBmdW5jdGlvbiBjZW50cm9pZCQxKHBvbHlnb24pIHsKICAgICAgdmFyIGkgPSAtMSwKICAgICAgICAgIG4gPSBwb2x5Z29uLmxlbmd0aCwKICAgICAgICAgIHggPSAwLAogICAgICAgICAgeSA9IDAsCiAgICAgICAgICBhLAogICAgICAgICAgYiA9IHBvbHlnb25bbiAtIDFdLAogICAgICAgICAgYywKICAgICAgICAgIGsgPSAwOwoKICAgICAgd2hpbGUgKCsraSA8IG4pIHsKICAgICAgICBhID0gYjsKICAgICAgICBiID0gcG9seWdvbltpXTsKICAgICAgICBrICs9IGMgPSBhWzBdICogYlsxXSAtIGJbMF0gKiBhWzFdOwogICAgICAgIHggKz0gKGFbMF0gKyBiWzBdKSAqIGM7CiAgICAgICAgeSArPSAoYVsxXSArIGJbMV0pICogYzsKICAgICAgfQoKICAgICAgcmV0dXJuIGsgKj0gMywgW3ggLyBrLCB5IC8ga107CiAgICB9CgogICAgLy8gUmV0dXJucyB0aGUgMkQgY3Jvc3MgcHJvZHVjdCBvZiBBQiBhbmQgQUMgdmVjdG9ycywgaS5lLiwgdGhlIHotY29tcG9uZW50IG9mCiAgICAvLyB0aGUgM0QgY3Jvc3MgcHJvZHVjdCBpbiBhIHF1YWRyYW50IEkgQ2FydGVzaWFuIGNvb3JkaW5hdGUgc3lzdGVtICgreCBpcwogICAgLy8gcmlnaHQsICt5IGlzIHVwKS4gUmV0dXJucyBhIHBvc2l0aXZlIHZhbHVlIGlmIEFCQyBpcyBjb3VudGVyLWNsb2N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ogICAgICB2YXIgaSA9IC0xLAogICAgICAgICAgbiA9IHBvbHlnb24ubGVuZ3RoLAogICAgICAgICAgYiA9IHBvbHlnb25bbiAtIDFdLAogICAgICAgICAgeGEsCiAgICAgICAgICB5YSwKICAgICAgICAgIHhiID0gYlswXSwKICAgICAgICAgIHliID0gYlsxXSwKICAgICAgICAgIHBlcmltZXRlciA9IDA7CgogICAgICB3aGlsZSAoKytpIDwgbikgewogICAgICAgIHhhID0geGI7CiAgICAgICAgeWEgPSB5YjsKICAgICAgICBiID0gcG9seWdvbltpXTsKICAgICAgICB4YiA9IGJbMF07CiAgICAgICAgeWIgPSBiWzFdOwogICAgICAgIHhhIC09IHhiOwogICAgICAgIHlhIC09IHliOwogICAgICAgIHBlcmltZXRlciArPSBNYXRoLnNxcnQoeGEgKiB4YSArIHlhICogeWEpOwogICAgICB9CgogICAgICByZXR1cm4gcGVyaW1ldGVyOwogICAgfQoKICAgIGZ1bmN0aW9uIGRlZmF1bHRTb3VyY2UkMSgpIHsKICAgICAgcmV0dXJuIE1hdGgucmFuZG9tKCk7CiAgICB9CgogICAgdmFyIHVuaWZvcm0gPSAoZnVuY3Rpb24gc291cmNlUmFuZG9tVW5pZm9ybShzb3VyY2UpIHsKICAgICAgZnVuY3Rpb24gcmFuZG9tVW5pZm9ybShtaW4sIG1heCkgewogICAgICAgIG1pbiA9IG1pbiA9PSBudWxsID8gMCA6ICttaW47CiAgICAgICAgbWF4ID0gbWF4ID09IG51bGwgPyAxIDogK21heDsKICAgICAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA9PT0gMSkgbWF4ID0gbWluLCBtaW4gPSAwOwogICAgICAgIGVsc2UgbWF4IC09IG1pbjsKICAgICAgICByZXR1cm4gZnVuY3Rpb24oKSB7CiAgICAgICAgICByZXR1cm4gc291cmNlKCkgKiBtYXggKyBtaW47CiAgICAgICAgfTsKICAgICAgfQoKICAgICAgcmFuZG9tVW5pZm9ybS5zb3VyY2UgPSBzb3VyY2VSYW5kb21Vbmlmb3JtOwoKICAgICAgcmV0dXJuIHJhbmRvbVVuaWZvcm07CiAgICB9KShkZWZhdWx0U291cmNlJDEpOwoKICAgIHZhciBub3JtYWwgPSAoZnVuY3Rpb24gc291cmNlUmFuZG9tTm9ybWFsKHNvdXJjZSkgewogICAgICBmdW5jdGlvbiByYW5kb21Ob3JtYWwobXUsIHNpZ21hKSB7CiAgICAgICAgdmFyIHgsIHI7CiAgICAgICAgbXUgPSBtdSA9PSBudWxsID8gMCA6ICttdTsKICAgICAgICBzaWdtYSA9IHNpZ21hID09IG51bGwgPyAxIDogK3NpZ21hOwogICAgICAgIHJldHVybiBmdW5jdGlvbigpIHsKICAgICAgICAgIHZhciB5OwoKICAgICAgICAgIC8vIElmIGF2YWlsYWJsZSwgdXNlIHRoZSBzZWNvbmQgcHJldmlvdXNseS1nZW5lcmF0ZWQgdW5pZm9ybSByYW5kb20uCiAgICAgICAgICBpZiAoeCAhPSBudWxsKSB5ID0geCwgeCA9IG51bGw7CgogICAgICAgICAgLy8gT3RoZXJ3aXNlLCBnZW5lcmF0ZSBhIG5ldyB4IGFuZCB5LgogICAgICAgICAgZWxzZSBkbyB7CiAgICAgICAgICAgIHggPSBzb3VyY2UoKSAqIDIgLSAxOwogICAgICAgICAgICB5ID0gc291cmNlKCkgKiAyIC0gMTsKICAgICAgICAgICAgciA9IHggKiB4ICsgeSAqIHk7CiAgICAgICAgICB9IHdoaWxlICghciB8fCByID4gMSk7CgogICAgICAgICAgcmV0dXJuIG11ICsgc2lnbWEgKiB5ICogTWF0aC5zcXJ0KC0yICogTWF0aC5sb2cocikgLyByKTsKICAgICAgICB9OwogICAgICB9CgogICAgICByYW5kb21Ob3JtYWwuc291cmNlID0gc291cmNlUmFuZG9tTm9ybWFsOwoKICAgICAgcmV0dXJuIHJhbmRvbU5vcm1hbDsKICAgIH0pKGRlZmF1bHRTb3VyY2UkMSk7CgogICAgdmFyIGxvZ05vcm1hbCA9IChmdW5jdGlvbiBzb3VyY2VSYW5k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0aW9uKCkgewogICAgICAgICAgcmV0dXJuIHJhbmRvbUlyd2luSGFsbCgpIC8gbjsKICAgICAgICB9OwogICAgICB9CgogICAgICByYW5kb21CYXRlcy5zb3VyY2UgPSBzb3VyY2VSYW5kb21CYXRlczsKCiAgICAgIHJldHVybiByYW5kb21CYXRlczsKICAgIH0pKGRlZmF1bHRTb3VyY2UkMSk7CgogICAgdmFyIGV4cG9uZW50aWFsJDEgPSAoZnVuY3Rpb24gc291cmNlUmFuZG9tRXhwb25lbnRpYWwoc291cmNlKSB7CiAgICAgIGZ1bmN0aW9uIHJhbmRvbUV4cG9uZW50aWFsKGxhbWJkYSkgewogICAgICAgIHJldHVybiBmdW5jdGlvbigpIHsKICAgICAgICAgIHJldHVybiAtTWF0aC5sb2coMSAtIHNvdXJjZSgpKSAvIGxhbWJkYTsKICAgICAgICB9OwogICAgICB9CgogICAgICByYW5kb21FeHBvbmVudGlhbC5zb3VyY2UgPSBzb3VyY2VSYW5kb21FeHBvbmVudGlhbDsKCiAgICAgIHJldHVybiByYW5kb21FeHBvbmVudGlhbDsKICAgIH0pKGRlZmF1bHRTb3VyY2UkMSk7CgogICAgZnVuY3Rpb24gaW5pdFJhbmdlKGRvbWFpbiwgcmFuZ2UpIHsKICAgICAgc3dpdGNoIChhcmd1bWVudHMubGVuZ3RoKSB7CiAgICAgICAgY2FzZSAwOiBicmVhazsKICAgICAgICBjYXNlIDE6IHRoaXMucmFuZ2UoZG9tYWluKTsgYnJlYWs7CiAgICAgICAgZGVmYXVsdDogdGhpcy5yYW5nZShyYW5nZSkuZG9tYWluKGRvbWFpbik7IGJyZWFrOwogICAgICB9CiAgICAgIHJldHVybiB0aGlzOwogICAgfQoKICAgIGZ1bmN0aW9uIGluaXRJbnRlcnBvbGF0b3IoZG9tYWluLCBpbnRlcnBvbGF0b3IpIHsKICAgICAgc3dpdGNoIChhcmd1bWVudHMubGVuZ3RoKSB7CiAgICAgICAgY2FzZSAwOiBicmVhazsKICAgICAgICBjYXNlIDE6IHRoaXMuaW50ZXJwb2xhdG9yKGRvbWFpbik7IGJyZWFrOwogICAgICAgIGRlZmF1bHQ6IHRoaXMuaW50ZXJwb2xhdG9yKGludGVycG9sYXRvcikuZG9tYWluKGRvbWFpbik7IGJyZWFrOwogICAgICB9CiAgICAgIHJldHVybiB0aGlzOwogICAgfQoKICAgIHZhciBhcnJheSQzID0gQXJyYXkucHJvdG90eXBlOwoKICAgIHZhciBtYXAkMyA9IGFycmF5JDMubWFwOwogICAgdmFyIHNsaWNlJDUgPSBhcnJheSQzLnNsaWNlOwoKICAgIHZhciBpbXBsaWNpdCA9IHtuYW1lOiAiaW1wbGljaXQifTsKCiAgICBmdW5jdGlvbiBvcmRpbmFsKCkgewogICAgICB2YXIgaW5kZXggPSBtYXAkMSgpLAogICAgICAgICAgZG9tYWluID0gW10sCiAgICAgICAgICByYW5nZSA9IFtdLAogICAgICAgICAgdW5rbm93biA9IGltcGxpY2l0OwoKICAgICAgZnVuY3Rpb24gc2NhbGUoZCkgewogICAgICAgIHZhciBrZXkgPSBkICsgIiIsIGkgPSBpbmRleC5nZXQoa2V5KTsKICAgICAgICBpZiAoIWkpIHsKICAgICAgICAgIGlmICh1bmtub3duICE9PSBpbXBsaWNpdCkgcmV0dXJuIHVua25vd247CiAgICAgICAgICBpbmRleC5zZXQoa2V5LCBpID0gZG9tYWluLnB1c2goZCkpOwogICAgICAgIH0KICAgICAgICByZXR1cm4gcmFuZ2VbKGkgLSAxKSAlIHJhbmdlLmxlbmd0aF07CiAgICAgIH0KCiAgICAgIHNjYWxlLmRvbWFpbiA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHJldHVybiBkb21haW4uc2xpY2UoKTsKICAgICAgICBkb21haW4gPSBbXSwgaW5kZXggPSBtYXAkMSgpOwogICAgICAgIHZhciBpID0gLTEsIG4gPSBfLmxlbmd0aCwgZCwga2V5OwogICAgICAgIHdoaWxlICgrK2kgPCBuKSBpZiAoIWluZGV4LmhhcyhrZXkgPSAoZCA9IF9baV0pICsgIiIpKSBpbmRleC5zZXQoa2V5LCBkb21haW4ucHVzaChkKSk7CiAgICAgICAgcmV0dXJuIHNjYWxlOwogICAgICB9OwoKICAgICAgc2NhbGUucmFuZ2UgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAocmFuZ2UgPSBzbGljZSQ1LmNhbGwoXyksIHNjYWxlKSA6IHJhbmdlLnNsaWNlKCk7CiAgICAgIH07CgogICAgICBzY2FsZS51bmtub3duID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHVua25vd24gPSBfLCBzY2FsZSkgOiB1bmtub3duOwogICAgICB9OwoKICAgICAgc2NhbGUuY29weSA9IGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiBvcmRpbmFsKGRvbWFpbiwgcmFuZ2UpLnVua25vd24odW5rbm93bik7CiAgICAgIH07CgogICAgICBpbml0UmFuZ2UuYXBwbHkoc2NhbGUsIGFyZ3VtZW50cyk7CgogICAgICByZXR1cm4gc2NhbGU7CiAgICB9CgogICAgZnVuY3Rpb24gYmFuZCgpIHsKICAgICAgdmFyIHNjYWxlID0gb3JkaW5hbCgpLnVua25vd24odW5kZWZpbmVkKSwKICAgICAgICAgIGRvbWFpbiA9IHNjYWxlLmRvbWFpbiwKICAgICAgICAgIG9yZGluYWxSYW5nZSA9IHNjYWxlLnJhbmdlLAogICAgICAgICAgcmFuZ2UgPSBbMCwgMV0sCiAgICAgICAgICBzdGVwLAogICAgICAgICAgYmFuZHdpZHRoLAogICAgICAgICAgcm91bmQgPSBmYWxzZSwKICAgICAgICAgIHBhZGRpbmdJbm5lciA9IDAsCiAgICAgICAgICBwYWRkaW5nT3V0ZXIgPSAwLAogICAgICAgICAgYWxpZ24gPSAwLjU7CgogICAgICBkZWxldGUgc2NhbGUudW5rbm93bjsKCiAgICAgIGZ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hbmdlID0gWytfWzBdLCArX1sxXV0sIHJlc2NhbGUoKSkgOiByYW5nZS5zbGljZSgpOwogICAgICB9OwoKICAgICAgc2NhbGUucmFuZ2VSb3VuZCA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gcmFuZ2UgPSBbK19bMF0sICtfWzFdXSwgcm91bmQgPSB0cnVlLCByZXNjYWxlKCk7CiAgICAgIH07CgogICAgICBzY2FsZS5iYW5kd2lkdGggPSBmdW5jdGlvbigpIHsKICAgICAgICByZXR1cm4gYmFuZHdpZHRoOwogICAgICB9OwoKICAgICAgc2NhbGUuc3RlcCA9IGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiBzdGVwOwogICAgICB9OwoKICAgICAgc2NhbGUucm91bmQgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAocm91bmQgPSAhIV8sIHJlc2NhbGUoKSkgOiByb3VuZDsKICAgICAgfTsKCiAgICAgIHNjYWxlLnBhZGRpbmcgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAocGFkZGluZ0lubmVyID0gTWF0aC5taW4oMSwgcGFkZGluZ091dGVyID0gK18pLCByZXNjYWxlKCkpIDogcGFkZGluZ0lubmVyOwogICAgICB9OwoKICAgICAgc2NhbGUucGFkZGluZ0lubmVyID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHBhZGRpbmdJbm5lciA9IE1hdGgubWluKDEsIF8pLCByZXNjYWxlKCkpIDogcGFkZGluZ0lubmVyOwogICAgICB9OwoKICAgICAgc2NhbGUucGFkZGluZ091dGVyID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHBhZGRpbmdPdXRlciA9ICtfLCByZXNjYWxlKCkpIDogcGFkZGluZ091dGVyOwogICAgICB9OwoKICAgICA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YW5nZVswXSwgcjEgPSByYW5nZVsxXTsKICAgICAgaWYgKGQxIDwgZDApIGQwID0gbm9ybWFsaXplJDEoZDEsIGQwKSwgcjAgPSBpbnRlcnBvbGF0ZShyMSwgcjApOwogICAgICBlbHNlIGQwID0gbm9ybWFsaXplJDEoZDAsIGQxKSwgcjAgPSBpbnRlcnBvbGF0ZShyMCwgcjEpOwogICAgICByZXR1cm4gZnVuY3Rpb24oeCkgeyByZXR1cm4gcjAoZDAoeCkpOyB9OwogICAgfQoKICAgIGZ1bmN0aW9uIHBvbHltYXAoZG9tYWluLCByYW5nZSwgaW50ZXJwb2xhdGUpIHsKICAgICAgdmFyIGogPSBNYXRoLm1pbihkb21haW4ubGVuZ3RoLCByYW5nZS5sZW5ndGgpIC0gMSwKICAgICAgICAgIGQgPSBuZXcgQXJyYXkoaiksCiAgICAgICAgICByID0gbmV3IEFycmF5KGopLAogICAgICAgICAgaSA9IC0xOwoKICAgICAgLy8gUmV2ZXJzZSBkZXNjZW5kaW5nIGRvbWFpbnMuCiAgICAgIGlmIChkb21haW5bal0gPCBkb21haW5bMF0pIHsKICAgICAgICBkb21haW4gPSBkb21haW4uc2xpY2UoKS5yZXZlcnNlKCk7CiAgICAgICAgcmFuZ2UgPSByYW5nZS5zbGljZSgpLnJldmVyc2UoKTsKICAgICAgfQoKICAgICAgd2hpbGUgKCsraSA8IGopIHsKICAgICAgICBkW2ldID0gbm9ybWFsaXplJDEoZG9tYWluW2ldLCBkb21haW5baSArIDFdKTsKICAgICAgICByW2ldID0gaW50ZXJwb2xhdGUocmFuZ2VbaV0sIHJhbmdlW2kgKyAxXSk7CiAgICAgIH0KCiAgICAgIHJldHVybiBmdW5jdGlvbih4KSB7CiAgICAgICAgdmFyIGkgPSBiaXNlY3RSaWdodChkb21haW4sIHgsIDEsIGopIC0gMTsKICAgICAgICByZXR1cm4gcltpXShkW2ldKHgpKTsKICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiBjb3B5KHNvdXJjZSwgdGFyZ2V0KSB7CiAgICAgIHJldHVybiB0YXJnZXQKICAgICAgICAgIC5kb21haW4oc291cmNlLmRvbWFpbigpKQogICAgICAgICAgLnJhbmdlKHNvdXJjZS5yYW5nZSgpKQogICAgICAgICAgLmludGVycG9sYXRlKHNvdXJjZS5pbnRlcnBvbGF0ZSgpKQogICAgICAgICAgLmNsYW1wKHNvdXJjZS5jbGFtcCgpKQogICAgICAgICAgLnVua25vd24oc291cmNlLnVua25vd24oKSk7CiAgICB9CgogICAgZnVuY3Rpb24gdHJhbnNmb3JtZXIkMSgpIHsKICAgICAgdmFyIGRvbWFpbiA9IHVuaXQsCiAgICAgICAgICByYW5nZSA9IHVuaXQsCiAgICAgICAgICBpbnRlcnBvbGF0ZSA9IGludGVycG9sYXRlVmFsdWUsCiAgICAgICAgICB0cmFuc2Zvcm0sCiAgICAgICAgICB1bnRyYW5zZm9ybSwKICAgICAgICAgIHVua25vd24sCiAgICAgICAgICBjbGFtcCA9IGlkZW50aXR5JDYsCiAgICAgICAgICBwaWVjZXdpc2UsCiAgICAgICAgICBvdXRwdXQsCiAgICAgICAgICBpbnB1dDsKCiAgICAgIGZ1bmN0aW9uIHJlc2NhbGUoKSB7CiAgICAgICAgcGllY2V3aXNlID0gTWF0aC5taW4oZG9tYWluLmxlbmd0aCwgcmFuZ2UubGVuZ3RoKSA+IDIgPyBwb2x5bWFwIDogYmltYXA7CiAgICAgICAgb3V0cHV0ID0gaW5wdXQgPSBudWxsOwogICAgICAgIHJldHVybiBzY2FsZTsKICAgICAgfQoKICAgICAgZnVuY3Rpb24gc2NhbGUoeCkgewogICAgICAgIHJldHVybiBpc05hTih4ID0gK3gpID8gdW5rbm93biA6IChvdXRwdXQgfHwgKG91dHB1dCA9IHBpZWNld2lzZShkb21haW4ubWFwKHRyYW5zZm9ybSksIHJhbmdlLCBpbnRlcnBvbGF0ZSkpKSh0cmFuc2Zvcm0oY2xhbXAoeCkpKTsKICAgICAgfQoKICAgICAgc2NhbGUuaW52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gICAgICAgIHJldHVybiBmb3JtYXRQcmVmaXgoc3BlY2lmaWVyLCB2YWx1ZSk7CiAgICAgICAgfQogICAgICAgIGNhc2UgIiI6CiAgICAgICAgY2FzZSAiZSI6CiAgICAgICAgY2FzZSAiZyI6CiAgICAgICAgY2FzZSAicCI6CiAgICAgICAgY2FzZSAiciI6IHsKICAgICAgICAgIGlmIChzcGVjaWZpZXIucHJlY2lzaW9uID09IG51bGwgJiYgIWlzTmFOKHByZWNpc2lvbiA9IHByZWNpc2lvblJvdW5kKHN0ZXAsIE1hdGgubWF4KE1hdGguYWJzKHN0YXJ0KSwgTWF0aC5hYnMoc3RvcCkpKSkpIHNwZWNpZmllci5wcmVjaXNpb24gPSBwcmVjaXNpb24gLSAoc3BlY2lmaWVyLnR5cGUgPT09ICJlIik7CiAgICAgICAgICBicmVhazsKICAgICAgICB9CiAgICAgICAgY2FzZSAiZiI6CiAgICAgICAgY2FzZSAiJSI6IHsKICAgICAgICAgIGlmIChzcGVjaWZpZXIucHJlY2lzaW9uID09IG51bGwgJiYgIWlzTmFOKHByZWNpc2lvbiA9IHByZWNpc2lvbkZpeGVkKHN0ZXApKSkgc3BlY2lmaWVyLnByZWNpc2lvbiA9IHByZWNpc2lvbiAtIChzcGVjaWZpZXIudHlwZSA9PT0gIiUiKSAqIDI7CiAgICAgICAgICBicmVhazsKICAgICAgICB9CiAgICAgIH0KICAgICAgcmV0dXJuIGZvcm1hdChzcGVjaWZpZXIpOwogICAgfQoKICAgIGZ1bmN0aW9uIGxpbmVhcmlzaChzY2FsZSkgewogICAgICB2YXIgZG9tYWluID0gc2NhbGUuZG9tYWluOwoKICAgICAgc2NhbGUudGlja3MgPSBmdW5jdGlvbihjb3VudCkgewogICAgICAgIHZhciBkID0gZG9tYWluKCk7CiAgICAgICAgcmV0dXJuIHRpY2tzKGRbMF0sIGRbZC5sZW5ndGggLSAxXSwgY291bnQgPT0gbnVsbCA/IDEwIDogY291bnQpOwogICAgICB9OwoKICAgICAgc2NhbGUudGlja0Zvcm1hdCA9IGZ1bmN0aW9uKGNvdW50LCBzcGVjaWZpZXIpIHsKICAgICAgICB2YXIgZCA9IGRvbWFpbigpOwogICAgICAgIHJldHVybiB0aWNrRm9ybWF0KGRbMF0sIGRbZC5sZW5ndGggLSAxXSwgY291bnQgPT0gbnVsbCA/IDEwIDogY291bnQsIHNwZWNpZmllcik7CiAgICAgIH07CgogICAgICBzY2FsZS5uaWNlID0gZnVuY3Rpb24oY291bnQpIHsKICAgICAgICBpZiAoY291bnQgPT0gbnVsbCkgY291bnQgPSAxMDsKCiAgICAgICAgdmFyIGQgPSBkb21haW4oKSwKICAgICAgICAgICAgaTAgPSAwLAogICAgICAgICAgICBpMSA9IGQubGVuZ3RoIC0gMSwKICAgICAgICAgICAgc3RhcnQgPSBkW2kwXSwKICAgICAgICAgICAgc3RvcCA9IGRbaTFdLAogICAgICAgICAgICBzdGVwOwoKICAgICAgICBpZiAoc3RvcCA8IHN0YXJ0KSB7CiAgICAgICAgICBzdGVwID0gc3RhcnQsIHN0YXJ0ID0gc3RvcCwgc3RvcCA9IHN0ZXA7CiAgICAgICAgICBzdGVwID0gaTAsIGkwID0gaTEsIGkxID0gc3RlcDsKICAgICAgICB9CgogICAgICAgIHN0ZXAgPSB0aWNrSW5jcmVtZW50KHN0YXJ0LCBzdG9wLCBjb3VudCk7CgogICAgICAgIGlmIChzdGVwID4gMCkgewogICAgICAgICAgc3RhcnQgPSBNYXRoLmZsb29yKHN0YXJ0IC8gc3RlcCkgKiBzdGVwOwogICAgICAgICAgc3RvcCA9IE1hdGguY2VpbChzdG9wIC8gc3RlcCkgKiBzdGVwOwogICAgICAgICAgc3RlcCA9IHRpY2tJbmNyZW1lbnQoc3RhcnQsIHN0b3AsIGNvdW50KTsKICAgICAgICB9IGVsc2UgaWYgKHN0ZXAgPCAwKSB7CiAgICAgICAgICBzdGFydCA9IE1hdGguY2VpbChzdGFydCAqIHN0ZXApIC8gc3RlcDsKICAgICAgICAgIHN0b3AgPSBNYXRoLmZsb29yKHN0b3AgKiBzdGVwKSAvIHN0ZXA7CiAgICAgICAgICBzdGVwID0gdGlja0luY3JlbWVudChzdGFydCwgc3RvcCwgY291bnQpOwogICAgICAgIH0KCiAgICAgICAgaWYgKHN0ZXAgPiAwKSB7CiAgICAgICAgICBkW2kwXSA9IE1hdGguZmxvb3Ioc3RhcnQgLyBzdGVwKSAqIHN0ZXA7CiAgICAgICAgICBkW2kxXSA9IE1hdGguY2VpbChzdG9wIC8gc3RlcCkgKiBzdGVwOwogICAgICAgICAgZG9tYWluKGQpOwogICAgICAgIH0gZWxzZSBpZiAoc3RlcCA8IDApIHsKICAgICAgICAgIGRbaTBdID0gTWF0aC5jZWlsKHN0YXJ0ICogc3RlcCkgLyBzdGVwOwogICAgICAgICAgZFtpMV0gPSBNYXRoLmZsb29yKHN0b3AgKiBzdGVwKSAvIHN0ZXA7CiAgICAgICAgICBkb21haW4oZCk7CiAgICAgICAgfQoKICAgICAgICByZXR1cm4gc2NhbGU7CiAgICAgIH07CgogICAgICByZXR1cm4gc2NhbGU7CiAgICB9CgogICAgZnVuY3Rpb24gbGluZWFyJDIoKSB7CiAgICAgIHZhciBzY2FsZSA9IGNvbnRpbnVvdXMoaWRlbnRpdHkkNiwgaWRlbnRpdHkkNik7CgogICAgICBzY2FsZS5jb3B5ID0gZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuIGNvcHkoc2NhbGUsIGxpbmVhciQyKCkpOwogICAgICB9OwoKICAgICAgaW5pdFJhbmdlLmFwcGx5KHNjYWxlLCBhcmd1bWVudHMpOwoKICAgICAgcmV0dXJuIGxpbmVhcmlzaChzY2FsZSk7CiAgICB9CgogICAgZnVuY3Rpb24gaWRlbnRpdHkkNyhkb21haW4pIHsKICAgICAgdmFyIHVua25vd247CgogICAgICBmdW5jdGlvbiBzY2FsZSh4KSB7CiAgICAgICAgcmV0dXJuIGlzTmFOKHggPSAreCkgPyB1bmtub3duIDogeDsKICAgICAgfQoKICAgICAgc2NhbGUuaW52ZXJ0ID0gc2NhbGU7CgogICAgICBzY2FsZS5kb21haW4gPSBzY2FsZS5yYW5nZSA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChkb21haW4gPSBtYXAkMy5jYWxsKF8sIG51bWJlciQyKSwgc2NhbGUpIDogZG9tYWluLnNsaWNlKCk7CiAgICAgIH07CgogICAgICBzY2FsZS51bmtub3duID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHVua25vd24gPSBfLCBzY2FsZSkgOiB1bmtub3duOwogICAgICB9OwoKICAgICAgc2NhbGUuY29weSA9IGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiBpZGVudGl0eSQ3KGRvbWFpbikudW5rbm93bih1bmtub3duKTsKICAgICAgfTsKCiAgICAgIGRvbWFpbiA9IGFyZ3VtZW50cy5sZW5ndGggPyBtYXAkMy5jYWxsKGRvbWFpbiwgbnVtYmVyJDIpIDogWzAsIDFdOwoKICAgICAgcmV0dXJuIGxpbmVhcmlzaChzY2FsZSk7CiAgICB9CgogICAgZnVuY3Rpb24gbmljZShkb21haW4sIGludGVydmFsKSB7CiAgICAgIGRvbWFpbiA9IGRvbWFpbi5zbGljZSgpOwoKICAgICAgdmFyIGkwID0gMCwKICAgICAgICAgIGkxID0gZG9tYWluLmxlbmd0aCAtIDEsCiAgICAgICAgICB4MCA9IGRvbWFpbltpMF0sCiAgICAgICAgICB4MSA9IGRvbWFpbltpMV0sCiAgICAgICAgICB0OwoKICAgICAgaWYgKHgxIDwgeDApIHsKICAgICAgICB0ID0gaTAsIGkwID0gaTEsIGkxID0gdDsKICAgICAgICB0ID0geDAsIHgwID0geDEsIHgxID0gdDsKICAgICAgfQoKICAgICAgZG9tYWluW2kwXSA9IGludGVydmFsLmZsb29yKHgwKTsKICAgICAgZG9tYWluW2kxXSA9IGludGVydmFsLmNlaWwoeDEpOwogICAgICBy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gICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIGxvZ2dpc2godHJhbnNmb3JtKSB7CiAgICAgIHZhciBzY2FsZSA9IHRyYW5zZm9ybSh0cmFuc2Zvcm1Mb2csIHRyYW5zZm9ybUV4cCksCiAgICAgICAgICBkb21haW4gPSBzY2FsZS5kb21haW4sCiAgICAgICAgICBiYXNlID0gMTAsCiAgICAgICAgICBsb2dzLAogICAgICAgICAgcG93czsKCiAgICAgIGZ1bmN0aW9uIHJlc2NhbGUoKSB7CiAgICAgICAgbG9ncyA9IGxvZ3AoYmFzZSksIHBvd3MgPSBwb3dwKGJhc2UpOwogICAgICAgIGlmIChkb21haW4oKVswXSA8IDApIHsKICAgICAgICAgIGxvZ3MgPSByZWZsZWN0KGxvZ3MpLCBwb3dzID0gcmVmbGVjdChwb3dzKTsKICAgICAgICAgIHRyYW5zZm9ybSh0cmFuc2Zvcm1Mb2duLCB0cmFuc2Zvcm1FeHBuKTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgdHJhbnNmb3JtKHRyYW5zZm9ybUxvZywgdHJhbnNmb3JtRXhwKTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIHNjYWxlOwogICAgICB9CgogICAgICBzY2FsZS5iYXNlID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKGJhc2UgPSArXywgcmVzY2FsZSgpKSA6IGJhc2U7CiAgICAgIH07CgogICAgICBzY2FsZS5kb21haW4gPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoZG9tYWluKF8pLCByZXNjYWxlKCkpIDogZG9tYWluKCk7CiAgICAgIH07CgogICAgICBzY2FsZS50aWNrcyA9IGZ1bmN0aW9uKGNvdW50KSB7CiAgICAgICAgdmFyIGQgPSBkb21haW4oKSwKICAgICAgICAgICAgdSA9IGRbMF0sCiAgICAgICAgICAgIHYgPSBkW2QubGVuZ3RoIC0gMV0sCiAgICAgICAgICAgIHI7CgogICAgICAgIGlmIChyID0gdiA8IHUpIGkgPSB1LCB1ID0gdiwgdiA9IGk7CgogICAgICAgIHZhciBpID0gbG9ncyh1KSwKICAgICAgICAgICAgaiA9IGxvZ3ModiksCiAgICAgICAgICAgIHAsCiAgICAgICAgICAgIGssCiAgICAgICAgICAgIHQsCiAgICAgICAgICAgIG4gPSBjb3VudCA9PSBudWxsID8gMTAgOiArY291bnQsCiAgICAgICAgICAgIHogPSBbXTsKCiAgICAgICAgaWYgKCEoYmFzZSAlIDEpICYmIGogLSBpIDwgbikgewogICAgICAgICAgaSA9IE1hdGgucm91bmQoaSkgLSAxLCBqID0gTWF0aC5yb3VuZChqKSArIDE7CiAgICAgICAgICBpZiAodSA+IDApIGZvciAoOyBpIDwgajsgKytpKSB7CiAgICAgICAgICAgIGZvciAoayA9IDEsIHAgPSBwb3dzKGkpOyBrIDwgYmFzZTsgKytrKSB7CiAgICAgICAgICAgICAgdCA9IHAgKiBrOwogICAgICAgICAgICAgIGlmICh0IDwgdSkgY29udGludWU7CiAgICAgICAgICAgICAgaWYgKHQgPiB2KSBicmVhazsKICAgICAgICAgICAgICB6LnB1c2godCk7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0gZWxzZSBmb3IgKDsgaSA8IGo7ICsraSkgewogICAgICAgICAgICBmb3IgKGsgPSBiYXNlIC0gMSwgcCA9IHBvd3MoaSk7IGsgPj0gMTsgLS1rKSB7CiAgICAgICAgICAgICAgdCA9IHAgKiBrOwogICAgICAgICAgICAgIGlmICh0IDwgdSkgY29udGludWU7CiAgICAgICAgICAgICAgaWYgKHQgPiB2KSBicmVhazsKICAgICAgICAgICAgICB6LnB1c2godCk7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICB9IGVsc2UgewogICAgICAgICAgeiA9IHRpY2tzKGksIGosIE1hdGgubWluKGogLSBpLCBuKSkubWFwKHBvd3MpOwogICAgICAgIH0KCiAgICAgICAgcmV0dXJuIHIgPy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GljZSgpOwogICAgICB9OwoKICAgICAgc2NhbGUudW5rbm93biA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/ICh1bmtub3duID0gXywgc2NhbGUpIDogdW5rbm93bjsKICAgICAgfTsKCiAgICAgIHNjYWxlLnF1YW50aWxlcyA9IGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiB0aHJlc2hvbGRzLnNsaWNlKCk7CiAgICAgIH07CgogICAgICBzY2FsZS5jb3B5ID0gZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuIHF1YW50aWxlKCkKICAgICAgICAgICAgLmRvbWFpbihkb21haW4pCiAgICAgICAgICAgIC5yYW5nZShyYW5nZSkKICAgICAgICAgICAgLnVua25vd24odW5rbm93bik7CiAgICAgIH07CgogICAgICByZXR1cm4gaW5pdFJhbmdlLmFwcGx5KHNjYWxlLCBhcmd1bWVudHMpOwogICAgfQoKICAgIGZ1bmN0aW9uIHF1YW50aXplJDEoKSB7CiAgICAgIHZhciB4MCA9IDAsCiAgICAgICAgICB4MSA9IDEsCiAgICAgICAgICBuID0gMSwKICAgICAgICAgIGRvbWFpbiA9IFswLjVdLAogICAgICAgICAgcmFuZ2UgPSBbMCwgMV0sCiAgICAgICAgICB1bmtub3duOwoKICAgICAgZnVuY3Rpb24gc2NhbGUoeCkgewogICAgICAgIHJldHVybiB4IDw9IHggPyByYW5nZVtiaXNlY3RSaWdodChkb21haW4sIHgsIDAsIG4pXSA6IHVua25vd247CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIHJlc2NhbGUoKSB7CiAgICAgICAgdmFyIGkgPSAtMTsKICAgICAgICBkb21haW4gPSBuZXcgQXJyYXkobik7CiAgICAgICAgd2hpbGUgKCsraSA8IG4pIGRvbWFpbltpXSA9ICgoaSArIDEpICogeDEgLSAoaSAtIG4pICogeDApIC8gKG4gKyAxKTsKICAgICAgICByZXR1cm4gc2NhbGU7CiAgICAgIH0KCiAgICAgIHNjYWxlLmRvbWFpbiA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/ICh4MCA9ICtfWzBdLCB4MSA9ICtfWzFdLCByZXNjYWxlKCkpIDogW3gwLCB4MV07CiAgICAgIH07CgogICAgICBzY2FsZS5yYW5nZSA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChuID0gKHJhbmdlID0gc2xpY2UkNS5jYWxsKF8pKS5sZW5ndGggLSAxLCByZXNjYWxlKCkpIDogcmFuZ2Uuc2xpY2UoKTsKICAgICAgfTsKCiAgICAgIHNjYWxlLmludmVydEV4dGVudCA9IGZ1bmN0aW9uKHkpIHsKICAgICAgICB2YXIgaSA9IHJhbmdlLmluZGV4T2YoeSk7CiAgICAgICAgcmV0dXJuIGkgPCAwID8gW05hTiwgTmFOXQogICAgICAgICAgICA6IGkgPCAxID8gW3gwLCBkb21haW5bMF1dCiAgICAgICAgICAgIDogaSA+PSBuID8gW2RvbWFpbltuIC0gMV0sIHgxXQogICAgICAgICAgICA6IFtkb21haW5baSAtIDFdLCBkb21haW5baV1dOwogICAgICB9OwoKICAgICAgc2NhbGUudW5rbm93biA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/ICh1bmtub3duID0gXywgc2NhbGUpIDogc2NhbGU7CiAgICAgIH07CgogICAgICBzY2FsZS50aHJlc2hvbGRzID0gZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuIGRvbWFpbi5zbGljZSgpOwogICAgICB9OwoKICAgICAgc2NhbGUuY29weSA9IGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiBxdWFudGl6ZSQxKCkKICAgICAgICAgICAgLmRvbWFpbihbeDAsIHgxXSkKICAgICAgICAgICAgLnJhbmdlKHJhbmdlKQogICAgICAgICAgICAudW5rbm93bih1bmtub3duKTsKICAgICAgf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sIGZ1bmN0aW9uKGRhdGUsIHN0ZXApIHsKICAgICAgICAgIGlmIChkYXRlID49IGRhdGUpIHsKICAgICAgICAgICAgaWYgKHN0ZXAgPCAwKSB3aGlsZSAoKytzdGVwIDw9IDApIHsKICAgICAgICAgICAgICB3aGlsZSAob2Zmc2V0aShkYXRlLCAtMSksICF0ZXN0KGRhdGUpKSB7fSAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIG5vLWVtcHR5CiAgICAgICAgICAgIH0gZWxzZSB3aGlsZSAoLS1zdGVwID49IDApIHsKICAgICAgICAgICAgICB3aGlsZSAob2Zmc2V0aShkYXRlLCArMSksICF0ZXN0KGRhdGUpKSB7fSAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIG5vLWVtcHR5CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICB9KTsKICAgICAgfTsKCiAgICAgIGlmIChjb3VudCkgewogICAgICAgIGludGVydmFsLmNvdW50ID0gZnVuY3Rpb24oc3RhcnQsIGVuZCkgewogICAgICAgICAgdDAkMS5zZXRUaW1lKCtzdGFydCksIHQxJDEuc2V0VGltZSgrZW5kKTsKICAgICAgICAgIGZsb29yaSh0MCQxKSwgZmxvb3JpKHQxJDEpOwogICAgICAgICAgcmV0dXJuIE1hdGguZmxvb3IoY291bnQodDAkMSwgdDEkMSkpOwogICAgICAgIH07CgogICAgICAgIGludGVydmFsLmV2ZXJ5ID0gZnVuY3Rpb24oc3RlcCkgewogICAgICAgICAgc3RlcCA9IE1hdGguZmxvb3Ioc3RlcCk7CiAgICAgICAgICByZXR1cm4gIWlzRmluaXRlKHN0ZXApIHx8ICEoc3RlcCA+IDApID8gbnVsbAogICAgICAgICAgICAgIDogIShzdGVwID4gMSkgPyBpbnRlcnZhbAogICAgICAgICAgICAgIDogaW50ZXJ2YWwuZmlsdGVyKGZpZWxkCiAgICAgICAgICAgICAgICAgID8gZnVuY3Rpb24oZCkgeyByZXR1cm4gZmllbGQoZCkgJSBzdGVwID09PSAwO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zaG9ydFdlZWtkYXlzKSwKICAgICAgICAgIHNob3J0V2Vla2RheUxvb2t1cCA9IGZvcm1hdExvb2t1cChsb2NhbGVfc2hvcnRXZWVrZGF5cyksCiAgICAgICAgICBtb250aFJlID0gZm9ybWF0UmUobG9jYWxlX21vbnRocyksCiAgICAgICAgICBtb250aExvb2t1cCA9IGZvcm1hdExvb2t1cChsb2NhbGVfbW9udGhzKSwKICAgICAgICAgIHNob3J0TW9udGhSZSA9IGZvcm1hdFJlKGxvY2FsZV9zaG9ydE1vbnRocyksCiAgICAgICAgICBzaG9ydE1vbnRoTG9va3VwID0gZm9ybWF0TG9va3VwKGxvY2FsZV9zaG9ydE1vbnRocyk7CgogICAgICB2YXIgZm9ybWF0cyA9IHsKICAgICAgICAiYSI6IGZvcm1hdFNob3J0V2Vla2RheSwKICAgICAgICAiQSI6IGZvcm1hdFdlZWtkYXksCiAgICAgICAgImIiOiBmb3JtYXRTaG9ydE1vbnRoLAogICAgICAgICJCIjogZm9ybWF0TW9udGgsCiAgICAgICAgImMiOiBudWxsLAogICAgICAgICJkIjogZm9ybWF0RGF5T2ZNb250aCwKICAgICAgICAiZSI6IGZvcm1hdERheU9mTW9udGgsCiAgICAgICAgImYiOiBmb3JtYXRNaWNyb3NlY29uZHMsCiAgICAgICAgIkgiOiBmb3JtYXRIb3VyMjQsCiAgICAgICAgIkkiOiBmb3JtYXRIb3VyMTIsCiAgICAgICAgImoiOiBmb3JtYXREYXlPZlllYXIsCiAgICAgICAgIkwiOiBmb3JtYXRNaWxsaXNlY29uZHMsCiAgICAgICAgIm0iOiBmb3JtYXRNb250aE51bWJlciwKICAgICAgICAiTSI6IGZvcm1hdE1pbnV0ZXMsCiAgICAgICAgInAiOiBmb3JtYXRQZXJpb2QsCiAgICAgICAgInEiOiBmb3JtYXRRdWFydGVyLAogICAgICAgICJRIjogZm9ybWF0VW5peFRpbWVzdGFtcCwKICAgICAgICAicyI6IGZvcm1hdFVuaXhUaW1lc3RhbXBTZWNvbmRzLAogICAgICAgICJTIjogZm9ybWF0U2Vjb25kcywKICAgICAgICAidSI6IGZvcm1hdFdlZWtkYXlOdW1iZXJNb25kYXksCiAgICAgICAgIlUiOiBmb3JtYXRXZWVrTnVtYmVyU3VuZGF5LAogICAgICAgICJWIjogZm9ybWF0V2Vla051bWJlcklTTywKICAgICAgICAidyI6IGZvcm1hdFdlZWtkYXlOdW1iZXJTdW5kYXksCiAgICAgICAgIlciOiBmb3JtYXRXZWVrTnVtYmVyTW9uZGF5LAogICAgICAgICJ4IjogbnVsbCwKICAgICAgICAiWCI6IG51bGwsCiAgICAgICAgInkiOiBmb3JtYXRZZWFyJDEsCiAgICAgICAgIlkiOiBmb3JtYXRGdWxsWWVhciwKICAgICAgICAiWiI6IGZvcm1hdFpvbmUsCiAgICAgICAgIiUiOiBmb3JtYXRMaXRlcmFsUGVyY2VudAogICAgICB9OwoKICAgICAgdmFyIHV0Y0Zvcm1hdHMgPSB7CiAgICAgICAgImEiOiBmb3JtYXRVVENTaG9ydFdlZWtkYXksCiAgICAgICAgIkEiOiBmb3JtYXRVVENXZWVrZGF5LAogICAgICAgICJiIjogZm9ybWF0VVRDU2hvcnRNb250aCwKICAgICAgICAiQiI6IGZvcm1hdFVUQ01vbnRoLAogICAgICAgICJjIjogbnVsbCwKICAgICAgICAiZCI6IGZvcm1hdFVUQ0RheU9mTW9udGgsCiAgICAgICAgImUiOiBmb3JtYXRVVENEYXlPZk1vbnRoLAogICAgICAgICJmIjogZm9ybWF0VVRDTWljcm9zZWNvbmRzLAogICAgICAgICJIIjogZm9ybWF0VVRDSG91cjI0LAogICAgICAgICJJIjogZm9ybWF0VVRDSG91cjEyLAogICAgICAgICJqIjogZm9ybWF0VVRDRGF5T2ZZZWFyLAogICAgICAgICJMIjogZm9ybWF0VVRDTWlsbGlzZWNvbmRzLAogICAgICAgICJtIjogZm9ybWF0VVRDTW9udGhOdW1iZXIsCiAgICAgICAgIk0iOiBmb3JtYXRVVENNaW51dGVzLAogICAgICAgICJwIjogZm9ybWF0VVRDUGVyaW9kLAogICAgICAgICJxIjogZm9ybWF0VVRDUXVhcnRlciwKICAgICAgICAiUSI6IGZvcm1hdFVuaXhUaW1lc3RhbXAsCiAgICAgICAgInMiOiBmb3JtYXRVbml4VGltZXN0YW1wU2Vjb25kcywKICAgICAgICAiUyI6IGZvcm1hdFVUQ1NlY29uZHMsCiAgICAgICAgInUiOiBmb3JtYXRVVENXZWVrZGF5TnVtYmVyTW9uZGF5LAogICAgICAgICJVIjogZm9ybWF0VVRDV2Vla051bWJlclN1bmRheSwKICAgICAgICAiViI6IGZvcm1hdFVUQ1dlZWtOdW1iZXJJU08sCiAgICAgICAgInciOiBmb3JtYXRVVENXZWVrZGF5TnVtYmVyU3VuZGF5LAogICAgICAgICJXIjogZm9ybWF0VVRDV2Vla051bWJlck1vbmRheSwKICAgICAgICAieCI6IG51bGwsCiAgICAgICAgIlgiOiBudWxsLAogICAgICAgICJ5IjogZm9ybWF0VVRDWWVhciwKICAgICAgICAiWSI6IGZvcm1hdFVUQ0Z1bGxZZWFyLAogICAgICAgICJaIjogZm9ybWF0VVRDWm9uZSwKICAgICAgICAiJSI6IGZvcm1hdExpdGVyYWxQZXJjZW50CiAgICAgIH07CgogICAgICB2YXIgcGFyc2VzID0gewogICAgICAgICJhIjogcGFyc2VTaG9ydFdlZWtkYXksCiAgICAgICAgIkEiOiBwYXJzZVdlZWtkYXksCiAgICAgICAgImIiOiBwYXJzZVNob3J0TW9udGgsCiAgICAgICAgIkIiOiBwYXJzZU1vbnRoLAogICAgICAgICJjIjogcGFyc2VMb2NhbGVEYXRlVGltZSwKICAgICAgICAiZCI6IHBhcnNlRGF5T2ZNb250aCwKICAgICAgICAiZSI6IHBhcnNlRGF5T2ZNb250aCwKICAgICAgICAiZiI6IHBhcnNlTWljcm9zZWNvbmRzLAogICAgICAgICJIIjogcGFyc2VIb3VyMjQsCiAgICAgICAgIkkiOiBwYXJzZUhvdXIyNCwKICAgICAgICAiaiI6IHBhc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aW5nLnB1c2goYyk7CiAgICAgICAgICAgICAgaiA9IGkgKyAxOwogICAgICAgICAgICB9CiAgICAgICAgICB9CgogICAgICAgICAgc3RyaW5nLnB1c2goc3BlY2lmaWVyLnNsaWNlKGosIGkpKTsKICAgICAgICAgIHJldHVybiBzdHJpbmcuam9pbigiIik7CiAgICAgICAgfTsKICAgICAgfQoKICAgICAgZnVuY3Rpb24gbmV3UGFyc2Uoc3BlY2lmaWVyLCBaKSB7CiAgICAgICAgcmV0dXJuIGZ1bmN0aW9uKHN0cmluZykgewogICAgICAgICAgdmFyIGQgPSBuZXdEYXRlKDE5MDAsIHVuZGVmaW5lZCwgMSksCiAgICAgICAgICAgICAgaSA9IHBhcnNlU3BlY2lmaWVyKGQsIHNwZWNpZmllciwgc3RyaW5nICs9ICIiLCAwKSwKICAgICAgICAgICAgICB3ZWVrLCBkYXkkMTsKICAgICAgICAgIGlmIChpICE9IHN0cmluZy5sZW5ndGgpIHJldHVybiBudWxsOwoKICAgICAgICAgIC8vIElmIGEgVU5JWCB0aW1lc3RhbXAgaXMgc3BlY2lmaWVkLCByZXR1cm4gaXQuCiAgICAgICAgICBpZiAoIlEiIGluIGQpIHJldHVybiBuZXcgRGF0ZShkLlEpOwogICAgICAgICAgaWYgKCJzIiBpbiBkKSByZXR1cm4gbmV3IERhdGUoZC5zICogMTAwMCArICgiTCIgaW4gZCA/IGQuTCA6IDApKTsKCiAgICAgICAgICAvLyBJZiB0aGlzIGlzIHV0Y1BhcnNlLCBuZXZlciB1c2UgdGhlIGxvY2FsIHRpbWV6b25lLgogICAgICAgICAgaWYgKFogJiYgISgiWiIgaW4gZCkpIGQuWiA9IDA7CgogICAgICAgICAgLy8gVGhlIGFtLXBtIGZsYWcgaXMgMCBmb3IgQU0sIGFuZCAxIGZvciBQTS4KICAgICAgICAgIGlmICgicCIgaW4gZCkgZC5IID0gZC5IICUgMTIgKyBkLnAgKiAxMjsKCiAgICAgICAgICAvLyBJZiB0aGUgbW9udGggd2FzIG5vdCBzcGVjaWZpZWQsIGluaGVyaXQgZnJvbSB0aGUgcXVhcnRlci4KICAgICAgICAgIGlmIChkLm0gPT09IHVuZGVmaW5lZCkgZC5tID0gInEiIGluIGQgPyBkLnEgOiAwOwoKICAgICAgICAgIC8vIENvbnZlcnQgZGF5LW9mLXdlZWsgYW5kIHdlZWstb2YteWVhciB0byBkYXktb2YteWVhci4KICAgICAgICAgIGlmICgiViIgaW4gZCkgewogICAgICAgICAgICBpZiAoZC5WIDwgMSB8fCBkLlYgPiA1MykgcmV0dXJuIG51bGw7CiAgICAgICAgICAgIGlmICghKCJ3IiBpbiBkKSkgZC53ID0gMTsKICAgICAgICAgICAgaWYgKCJaIiBpbiBkKSB7CiAgICAgICAgICAgICAgd2VlayA9IHV0Y0RhdGUobmV3RGF0ZShkLnksIDAsIDEpKSwgZGF5JDEgPSB3ZWVrLmdldFVUQ0RheSgpOwogICAgICAgICAgICAgIHdlZWsgPSBkYXkkMSA+IDQgfHwgZGF5JDEgPT09IDAgPyB1dGNNb25kYXkuY2VpbCh3ZWVrKSA6IHV0Y01vbmRheSh3ZWVrKTsKICAgICAgICAgICAgICB3ZWVrID0gdXRjRGF5Lm9mZnNldCh3ZWVrLCAoZC5WIC0gMSkgKiA3KTsKICAgICAgICAgICAgICBkLnkgPSB3ZWVrLmdldFVUQ0Z1bGxZZWFyKCk7CiAgICAgICAgICAgICAgZC5tID0gd2Vlay5nZXRVVENNb250aCgpOwogICAgICAgICAgICAgIGQuZCA9IHdlZWsuZ2V0VVRDRGF0ZSgpICsgKGQudyArIDYpICUgNzsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICB3ZWVrID0gbG9jYWxEYXRlKG5ld0RhdGUoZC55LCAwLCAxKSksIGRheSQxID0gd2Vlay5nZXREYXkoKTsKICAgICAgICAgICAgICB3ZWVrID0gZGF5JDEgPiA0IHx8IGRheSQxID09PSAwID8gbW9uZGF5LmNlaWwod2VlaykgOiBtb25kYXkod2Vlayk7CiAgICAgICAgICAgICAgd2VlayA9IGRheS5vZmZzZXQod2VlaywgKGQuViAtIDEpICogNyk7CiAgICAgICAgICAgICAgZC55ID0gd2Vlay5nZXRGdWxsWWVhcigpOwogICAgICAgICAgICAgIGQubSA9IHdlZWsuZ2V0TW9udGgoKTsKICAgICAgICAgICAgICBkLmQgPSB3ZWVrLmdldERhdGUoKSArIChkLncgKyA2KSAlIDc7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0gZWxzZSBpZiAoIlciIGluIGQgfHwgIlUiIGluIGQpIHsKICAgICAgICAgICAgaWYgKCEoInciIGluIGQpKSBkLncgPSAidSIgaW4gZCA/IGQudSAlIDcgOiAiVyIgaW4gZCA/IDEgOiAwOwogICAgICAgICAgICBkYXkkMSA9ICJaIiBpbiBkID8gdXRjRGF0ZShuZXdEYXRlKGQueSwgMCwgMSkpLmdldFVUQ0RheSgpIDogbG9jYWxEYXRlKG5ld0RhdGUoZC55LCAwLCAxKSkuZ2V0RGF5KCk7CiAgICAgICAgICAgIGQubSA9IDA7CiAgICAgICAgICAgIGQuZCA9ICJXIiBpbiBkID8gKGQudyArIDYpICUgNyArIGQuVyAqIDcgLSAoZGF5JDEgKyA1KSAlIDcgOiBkLncgKyBkLlUgKiA3IC0gKGRheSQxICsgNikgJSA3OwogICAgICAgICAgfQoKICAgICAgICAgIC8vIElmIGEgdGltZSB6b25lIGlzIHNwZWNpZmllZCwgYWxsIGZpZWxkcyBhcmUgaW50ZXJwcmV0ZWQgYXMgVVRDIGFuZCB0aGVuCiAgICAgICAgICAvLyBvZmZzZXQgYWNjb3JkaW5nIHRvIHRoZSBzcGVjaWZpZWQgdGltZSB6b25lLgogICAgICAgICAgaWYgKCJaIiBpbiBkKSB7CiAgICAgICAgICAgIGQuSCArPSBkLlogLyAxMDAgfCAwOwogICAgICAgICAgICBkLk0gKz0gZC5aICUgMTAwOwogICAgICAgICAgICByZXR1cm4gdXRjRGF0ZShkKTsKICAgICAgICAgIH0KCiAgICAgICAgICAvLyBPdGhlcndpc2UsIGFsbCBmaWVsZHMgYXJlIGluIGxvY2FsIHRpbWUuCiAgICAgICAgICByZXR1cm4gbG9jYWxEYXRlKGQpOwogICAgICAgIH07CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIHBhcnNlU3BlY2lmaWVyKGQsIHNwZWNpZmllciwgc3RyaW5nLCBqKSB7CiAgICAgICAgdmFyIGkgPSAwLAogICAgICAgICAgICBuID0gc3BlY2lmaWVyLmxlbmd0aCwKICAgICAgICAgICAgbSA9IHN0cmluZy5sZW5ndGgsCiAgICAgICAgICAgIGMsCiAgICAgICAgICAgIHBhcnNlOwoKICAgICAgICB3aGlsZSAoaSA8IG4pIHsKICAgICAgICAgIGlmIChqID49IG0pIHJldHVybiAtMTsKICAgICAgICAgIGMgPSBzcGVjaWZpZXIuY2hhckNvZGVBdChpKyspOwogICAgICAgICAgaWYgKGMgPT09IDM3KSB7CiAgICAgICAgICAgIGMgPSBzcGVjaWZpZXIuY2hhckF0KGkrKyk7CiAgICAgICAgICAgIHBhcnNlID0gcGFyc2VzW2MgaW4gcGFkcyA/IHNwZWNpZmllci5jaGFyQXQoaSsrKSA6IGNdOwogICAgICAgICAgICBpZiAoIXBhcnNlIHx8ICgoaiA9IHBhcnNlKGQsIHN0cmluZywgaikpIDwgMCkpIHJldHVybiAtMTsKICAgICAgICAgIH0gZWxzZSBpZiAoYyAhPSBzdHJpbmcuY2hhckNvZGVBdChqKyspKSB7CiAgICAgICAgICAgIHJldHVybiAtMTsKICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIHJldHVybiBqOwogICAgICB9CgogICAgICBmdW5jdGlvbiBwYXJzZVBlcmlvZChkLCBzdHJpbmcsIGkpIHsKICAgICAgICB2YXIgbiA9IHBlcmlvZFJlLmV4ZWMoc3RyaW5nLnNsaWNlKGkpKTsKICAgICAgICByZXR1cm4gbiA/IChkLnAgPSBwZXJpb2RMb29rdXBbblswXS50b0xvd2VyQ2FzZSgpXSwgaSArIG5bMF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ZShzcGVjaWZpZXIgKz0gIiIsIGZhbHNlKTsKICAgICAgICAgIHAudG9TdHJpbmcgPSBmdW5jdGlvbigpIHsgcmV0dXJuIHNwZWNpZmllcjsgfTsKICAgICAgICAgIHJldHVybiBwOwogICAgICAgIH0sCiAgICAgICAgdXRjRm9ybWF0OiBmdW5jdGlvbihzcGVjaWZpZXIpIHsKICAgICAgICAgIHZhciBmID0gbmV3Rm9ybWF0KHNwZWNpZmllciArPSAiIiwgdXRjRm9ybWF0cyk7CiAgICAgICAgICBmLnRvU3RyaW5nID0gZnVuY3Rpb24oKSB7IHJldHVybiBzcGVjaWZpZXI7IH07CiAgICAgICAgICByZXR1cm4gZjsKICAgICAgICB9LAogICAgICAgIHV0Y1BhcnNlOiBmdW5jdGlvbihzcGVjaWZpZXIpIHsKICAgICAgICAgIHZhciBwID0gbmV3UGFyc2Uoc3BlY2lmaWVyICs9ICIiLCB0cnVlKTsKICAgICAgICAgIHAudG9TdHJpbmcgPSBmdW5jdGlvbigpIHsgcmV0dXJuIHNwZWNpZmllcjsgfTsKICAgICAgICAgIHJldHVybiBwOwogICAgICAgIH0KICAgICAgfTsKICAgIH0KCiAgICB2YXIgcGFkcyA9IHsiLSI6ICIiLCAiXyI6ICIgIiwgIjAiOiAiMCJ9LAogICAgICAgIG51bWJlclJlID0gL15ccypcZCsvLCAvLyBub3RlOiBpZ25vcmVzIG5leHQgZGlyZWN0aXZlCiAgICAgICAgcGVyY2VudFJlID0gL14lLywKICAgICAgICByZXF1b3RlUmUgPSAvW1xcXiQqKz98W1xdKCkue31dL2c7CgogICAgZnVuY3Rpb24gcGFkJDEodmFsdWUsIGZpbGwsIHdpZHRoKSB7CiAgICAgIHZhciBzaWduID0gdmFsdWUgPCAwID8gIi0iIDogIiIsCiAgICAgICAgICBzdHJpbmcgPSAoc2lnbiA/IC12YWx1ZSA6IHZhbHVlKSArICIiLAogICAgICAgICAgbGVuZ3RoID0gc3RyaW5nLmxlbmd0aDsKICAgICAgcmV0dXJ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aW9uRGF5JDEgKiA3LAogICAgICAgIGR1cmF0aW9uTW9udGggPSBkdXJhdGlvbkRheSQxICogMzAsCiAgICAgICAgZHVyYXRpb25ZZWFyID0gZHVyYXRpb25EYXkkMSAqIDM2NTsKCiAgICBmdW5jdGlvbiBkYXRlJDEodCkgewogICAgICByZXR1cm4gbmV3IERhdGUodCk7CiAgICB9CgogICAgZnVuY3Rpb24gbnVtYmVyJDModCkgewogICAgICByZXR1cm4gdCBpbnN0YW5jZW9mIERhdGUgPyArdCA6ICtuZXcgRGF0ZSgrdCk7CiAgICB9CgogICAgZnVuY3Rpb24gY2FsZW5kYXIoeWVhciwgbW9udGgsIHdlZWssIGRheSwgaG91ciwgbWludXRlLCBzZWNvbmQsIG1pbGxpc2Vjb25kLCBmb3JtYXQpIHsKICAgICAgdmFyIHNjYWxlID0gY29udGludW91cyhpZGVudGl0eSQ2LCBpZGVudGl0eSQ2KSwKICAgICAgICAgIGludmVydCA9IHNjYWxlLmludmVydCwKICAgICAgICAgIGRvbWFpbiA9IHNjYWxlLmRvbWFpbjsKCiAgICAgIHZhciBmb3JtYXRNaWxsaXNlY29uZCA9IGZvcm1hdCgiLiVMIiksCiAgICAgICAgICBmb3JtYXRTZWNvbmQgPSBmb3JtYXQoIjolUyIpLAogICAgICAgICAgZm9ybWF0TWludXRlID0gZm9ybWF0KCIlSTolTSIpLAogICAgICAgICAgZm9ybWF0SG91ciA9IGZvcm1hdCgiJUkgJXAiKSwKICAgICAgICAgIGZvcm1hdERheSA9IGZvcm1hdCgiJWEgJWQiKSwKICAgICAgICAgIGZvcm1hdFdlZWsgPSBmb3JtYXQoIiViICVkIiksCiAgICAgICAgICBmb3JtYXRNb250aCA9IGZvcm1hdCgiJUIiKSwKICAgICAgICAgIGZvcm1hdFllYXIgPSBmb3JtYXQoIiVZIik7CgogICAgICB2YXIgdGlja0ludGVydmFscyA9IFsKICAgICAgICBbc2Vjb25kLCAgMSwgICAgICBkdXJhdGlvblNlY29uZCQxXSwKICAgICAgICBbc2Vjb25kLCAgNSwgIDUgKiBkdXJhdGlvblNlY29uZCQxXSwKICAgICAgICBbc2Vjb25kLCAxNSwgMTUgKiBkdXJhdGlvblNlY29uZCQxXSwKICAgICAgICBbc2Vjb25kLCAzMCwgMzAgKiBkdXJhdGlvblNlY29uZCQxXSwKICAgICAgICBbbWludXRlLCAgMSwgICAgICBkdXJhdGlvbk1pbnV0ZSQxXSwKICAgICAgICBbbWludXRlLCAgNSwgIDUgKiBkdXJhdGlvbk1pbnV0ZSQxXSwKICAgICAgICBbbWludXRlLCAxNSwgMTUgKiBkdXJhdGlvbk1pbnV0ZSQxXSwKICAgICAgICBbbWludXRlLCAzMCwgMzAgKiBkdXJhdGlvbk1pbnV0ZSQxXSwKICAgICAgICBbICBob3VyLCAgMSwgICAgICBkdXJhdGlvbkhvdXIkMSAgXSwKICAgICAgICBbICBob3VyLCAgMywgIDMgKiBkdXJhdGlvbkhvdXIkMSAgXSwKICAgICAgICBbICBob3VyLCAgNiwgIDYgKiBkdXJhdGlvbkhvdXIkMSAgXSwKICAgICAgICBbICBob3VyLCAxMiwgMTIgKiBkdXJhdGlvbkhvdXIkMSAgXSwKICAgICAgICBbICAgZGF5LCAgMSwgICAgICBkdXJhdGlvbkRheSQxICAgXSwKICAgICAgICBbICAgZGF5LCAgMiwgIDIgKiBkdXJhdGlvbkRheSQxICAgXSwKICAgICAgICBbICB3ZWVrLCAgMSwgICAgICBkdXJhdGlvbldlZWskMSAgXSwKICAgICAgICBbIG1vbnRoLCAgMSwgICAgICBkdXJhdGlvbk1vbnRoIF0sCiAgICAgICAgWyBtb250aCwgIDMsICAzICogZHVyYXRpb25Nb250aCBdLAogICAgICAgIFsgIHllYXIsICAxLCAgICAgIGR1cmF0aW9uWWVhciAgXQogICAgICBdOwoKICAgICAgZnVuY3Rpb24gdGlja0Zvcm1hdChkYXRlKSB7CiAgICAgICAgcmV0dXJuIChzZWNvbmQoZGF0ZSkgPCBkYXRlID8gZm9ybWF0TWlsb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yZ2V0KTsKICAgICAgICAgIGlmIChpID09PSB0aWNrSW50ZXJ2YWxzLmxlbmd0aCkgewogICAgICAgICAgICBzdGVwID0gdGlja1N0ZXAoc3RhcnQgLyBkdXJhdGlvblllYXIsIHN0b3AgLyBkdXJhdGlvblllYXIsIGludGVydmFsKTsKICAgICAgICAgICAgaW50ZXJ2YWwgPSB5ZWFyOwogICAgICAgICAgfSBlbHNlIGlmIChpKSB7CiAgICAgICAgICAgIGkgPSB0aWNrSW50ZXJ2YWxzW3RhcmdldCAvIHRpY2tJbnRlcnZhbHNbaSAtIDFdWzJdIDwgdGlja0ludGVydmFsc1tpXVsyXSAvIHRhcmdldCA/IGkgLSAxIDogaV07CiAgICAgICAgICAgIHN0ZXAgPSBpWzFdOwogICAgICAgICAgICBpbnRlcnZhbCA9IGlbMF07CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICBzdGVwID0gTWF0aC5tYXgodGlja1N0ZXAoc3RhcnQsIHN0b3AsIGludGVydmFsKSwgMSk7CiAgICAgICAgICAgIGludGVydmFsID0gbWlsbGlzZWNvbmQ7CiAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICByZXR1cm4gc3RlcCA9PSBudWxsID8gaW50ZXJ2YWwgOiBpbnRlcnZhbC5ldmVyeShzdGVwKTsKICAgICAgfQoKICAgICAgc2NhbGUuaW52ZXJ0ID0gZnVuY3Rpb24oeSkgewogICAgICAgIHJldHVybiBuZXcgRGF0ZShpbnZlcnQoeSkpOwogICAgICB9OwoKICAgICAgc2NhbGUuZG9tYWluID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gZG9tYWluKG1hcCQzLmNhbGwoXywgbnVtYmVyJDMpKSA6IGRvbWFpbigpLm1hcChkYXRlJDEpOwogICAgICB9OwoKICAgICAgc2NhbGUudGlja3MgPSBmdW5jdGlvbihpbnRlcnZhbCwgc3RlcCkgewogICAgICAgIHZhciBkID0gZG9tYWluKCksCiAgICAgICAgICAgIHQwID0gZFswXSwKICAgICAgICAgICAgdDEgPSBkW2QubGVuZ3RoIC0gMV0sCiAgICAgICAgICAgIHIgPSB0MSA8IHQwLAogICAgICAgICAgICB0OwogICAgICAgIGlmIChyKSB0ID0gdDAsIHQwID0gdDEsIHQxID0gdDsKICAgICAgICB0ID0gdGlja0ludGVydmFsKGludGVydmFsLCB0MCwgdDEsIHN0ZXApOwogICAgICAgIHQgPSB0ID8gdC5yYW5nZSh0MCwgdDEgKyAxKSA6IFtdOyAvLyBpbmNsdXNpdmUgc3RvcAogICAgICAgIHJldHVybiByID8gdC5yZXZlcnNlKCkgOiB0OwogICAgICB9OwoKICAgICAgc2NhbGUudGlja0Zvcm1hdCA9IGZ1bmN0aW9uKGNvdW50LCBzcGVjaWZpZXIpIHsKICAgICAgICByZXR1cm4gc3BlY2lmaWVyID09IG51bGwgPyB0aWNrRm9ybWF0IDogZm9ybWF0KHNwZWNpZmllcik7CiAgICAgIH07CgogICAgICBzY2FsZS5uaWNlID0gZnVuY3Rpb24oaW50ZXJ2YWwsIHN0ZXApIHsKICAgICAgICB2YXIgZCA9IGRvbWFpbigpOwogICAgICAgIHJldHVybiAoaW50ZXJ2YWwgPSB0aWNrSW50ZXJ2YWwoaW50ZXJ2YWwsIGRbMF0sIGRbZC5sZW5ndGggLSAxXSwgc3RlcCkpCiAgICAgICAgICAgID8gZG9tYWluKG5pY2UoZCwgaW50ZXJ2YWwpKQogICAgICAgICAgICA6IHNjYWxlOwogICAgICB9OwoKICAgICAgc2NhbGUuY29weSA9IGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiBjb3B5KHNjYWxlLCBjYWxlbmRhcih5ZWFyLCBtb250aCwgd2VlaywgZGF5LCBob3VyLCBtaW51dGUsIHNlY29uZCwgbWlsbGlzZWNvbmQsIGZvcm1hdCkpOwogICAgICB9OwoKICAgICAgcmV0dXJuIHNjYWxlOwogICAgfQoKICAgIGZ1bmN0aW9uIHRpbWUoKSB7CiAgICAgIH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ICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAodDAgPSB0cmFuc2Zvcm0oeDAgPSArX1swXSksIHQxID0gdHJhbnNmb3JtKHgxID0gK19bMV0pLCBrMTAgPSB0MCA9PT0gdDEgPyAwIDogMSAvICh0MSAtIHQwKSwgc2NhbGUpIDogW3gwLCB4MV07CiAgICAgIH07CgogICAgICBzY2FsZS5jbGFtcCA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChjbGFtcCA9ICEhXywgc2NhbGUpIDogY2xhbXA7CiAgICAgIH07CgogICAgICBzY2FsZS5pbnRlcnBvbGF0b3IgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoaW50ZXJwb2xhdG9yID0gXywgc2NhbGUpIDogaW50ZXJwb2xhdG9yOwogICAgICB9OwoKICAgICAgc2NhbGUudW5rbm93biA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/ICh1bmtub3duID0gXywgc2NhbGUpIDogdW5rbm93bjsKICAgICAgfTsKCiAgICAgIHJldHVybiBmdW5jdGlvbih0KSB7CiAgICAgICAgdHJhbnNmb3JtID0gdCwgdDAgPSB0KHgwKSwgdDEgPSB0KHgxKSwgazEwID0gdDAgPT09IHQxID8gMCA6IDEgLyAodDEgLSB0MCk7CiAgICAgICAgcmV0dXJuIHNjYWxlOwogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIGNvcHkkMShzb3VyY2UsIHRhcmdldCkgewogICAgICByZXR1cm4gdGFyZ2V0CiAgICAgICAgICAuZG9tYWluKHNvdXJjZS5kb21haW4oKSkKICAgICAgICAgIC5pbnRlcnBvbGF0b3Ioc291cmNlLmludGVycG9sYXRvcigpKQogICAgICAgICAgLmNsYW1wKHNvdXJjZS5jbGFtcCgpKQogICAgICAgICAgLnVua25vd24oc291cmNlLnVua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3IgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoaW50ZXJwb2xhdG9yID0gXywgc2NhbGUpIDogaW50ZXJwb2xhdG9yOwogICAgICB9OwoKICAgICAgc2NhbGUuY29weSA9IGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiBzZXF1ZW50aWFsUXVhbnRpbGUoaW50ZXJwb2xhdG9yKS5kb21haW4oZG9tYWluKTsKICAgICAgfTsKCiAgICAgIHJldHVybiBpbml0SW50ZXJwb2xhdG9yLmFwcGx5KHNjYWxlLCBhcmd1bWVudHMpOwogICAgfQoKICAgIGZ1bmN0aW9uIHRyYW5zZm9ybWVyJDMoKSB7CiAgICAgIHZhciB4MCA9IDAsCiAgICAgICAgICB4MSA9IDAuNSwKICAgICAgICAgIHgyID0gMSwKICAgICAgICAgIHQwLAogICAgICAgICAgdDEsCiAgICAgICAgICB0MiwKICAgICAgICAgIGsxMCwKICAgICAgICAgIGsyMSwKICAgICAgICAgIGludGVycG9sYXRvciA9IGlkZW50aXR5JDYsCiAgICAgICAgICB0cmFuc2Zvcm0sCiAgICAgICAgICBjbGFtcCA9IGZhbHNlLAogICAgICAgICAgdW5rbm93bjsKCiAgICAgIGZ1bmN0aW9uIHNjYWxlKHgpIHsKICAgICAgICByZXR1cm4gaXNOYU4oeCA9ICt4KSA/IHVua25vd24gOiAoeCA9IDAuNSArICgoeCA9ICt0cmFuc2Zvcm0oeCkpIC0gdDEpICogKHggPCB0MSA/IGsxMCA6IGsyMSksIGludGVycG9sYXRvcihjbGFtcCA/IE1hdGgubWF4KDAsIE1hdGgubWluKDEsIHgpKSA6IHgpKTsKICAgICAgfQoKICAgICAgc2NhbGUuZG9tYWluID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHQwID0gdHJhbnNmb3JtKHgwID0gK19bMF0pLCB0MSA9IHRyYW5zZm9ybSh4MSA9ICtfWzFd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4MDEgPSB4MCAtIHgxLAogICAgICAgICAgeTAxID0geTAgLSB5MSwKICAgICAgICAgIGxvID0gKGN3ID8gcmMgOiAtcmMpIC8gc3FydCQyKHgwMSAqIHgwMSArIHkwMSAqIHkwMSksCiAgICAgICAgICBveCA9IGxvICogeTAxLAogICAgICAgICAgb3kgPSAtbG8gKiB4MDEsCiAgICAgICAgICB4MTEgPSB4MCArIG94LAogICAgICAgICAgeTExID0geTAgKyBveSwKICAgICAgICAgIHgxMCA9IHgxICsgb3gsCiAgICAgICAgICB5MTAgPSB5MSArIG95LAogICAgICAgICAgeDAwID0gKHgxMSArIHgxMCkgLyAyLAogICAgICAgICAgeTAwID0gKHkxMSArIHkxMCkgLyAyLAogICAgICAgICAgZHggPSB4MTAgLSB4MTEsCiAgICAgICAgICBkeSA9IHkxMCAtIHkxMSwKICAgICAgICAgIGQyID0gZHggKiBkeCArIGR5ICogZHksCiAgICAgICAgICByID0gcjEgLSByYywKICAgICAgICAgIEQgPSB4MTEgKiB5MTAgLSB4MTAgKiB5MTEsCiAgICAgICAgICBkID0gKGR5IDwgMCA/IC0xIDogMSkgKiBzcXJ0JDIobWF4JDIoMCwgciAqIHIgKiBkMiAtIEQgKiBEKSksCiAgICAgICAgICBjeDAgPSAoRCAqIGR5IC0gZHggKiBkKSAvIGQyLAogICAgICAgICAgY3kwID0gKC1EICogZHggLSBkeSAqIGQpIC8gZDIsCiAgICAgICAgICBjeDEgPSAoRCAqIGR5ICsgZHggKiBkKSAvIGQyLAogICAgICAgICAgY3kxID0gKC1EICogZHggKyBkeSAqIGQpIC8gZDIsCiAgICAgICAgICBkeDAgPSBjeDAgLSB4MDAsCiAgICAgICAgICBkeTAgPSBjeTAgLSB5MDAsCiAgICAgICAgICBkeDEgPSBjeDEgLSB4MDAsCiAgICAgICAgICBkeTEgPSBjeTEgLSB5MDA7CgogICAgICAvLyBQaWNrIHRoZSBjbG9zZXIgb2YgdGhlIHR3byBpbnRlcnNlY3Rpb24gcG9pbnRzLgogICAgICAvLyBUT0RPIElzIHRoZXJlIGEgZmFzdGVyIHdheSB0byBkZXRlcm1pbmUgd2hpY2ggaW50ZXJzZWN0aW9uIHRvIHVzZT8KICAgICAgaWYgKGR4MCAqIGR4MCArIGR5MCAqIGR5MCA+IGR4MSAqIGR4MSArIGR5MSAqIGR5MSkgY3gwID0gY3gxLCBjeTAgPSBjeTE7CgogICAgICByZXR1cm4gewogICAgICAgIGN4OiBjeDAsCiAgICAgICAgY3k6IGN5MCwKICAgICAgICB4MDE6IC1veCwKICAgICAgICB5MDE6IC1veSwKICAgICAgICB4MTE6IGN4MCAqIChyMSAvIHIgLSAxKSwKICAgICAgICB5MTE6IGN5MCAqIChyMSAvIHIgLSAxKQogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIGFyYygpIHsKICAgICAgdmFyIGlubmVyUmFkaXVzID0gYXJjSW5uZXJSYWRpdXMsCiAgICAgICAgICBvdXRlclJhZGl1cyA9IGFyY091dGVyUmFkaXVzLAogICAgICAgICAgY29ybmVyUmFkaXVzID0gY29uc3RhbnQkYigwKSwKICAgICAgICAgIHBhZFJhZGl1cyA9IG51bGwsCiAgICAgICAgICBzdGFydEFuZ2xlID0gYXJjU3RhcnRBbmdsZSwKICAgICAgICAgIGVuZEFuZ2xlID0gYXJjRW5kQW5nbGUsCiAgICAgICAgICBwYWRBbmdsZSA9IGFyY1BhZEFuZ2xlLAogICAgICAgICAgY29udGV4dCA9IG51bGw7CgogICAgICBmdW5jdGlvbiBhcmMoKSB7CiAgICAgICAgdmFyIGJ1ZmZlciwKICAgICAgICAgICAgciwKICAgICAgICAgICAgcjAgPSAraW5uZXJSYWRpdXMuYXBwbHkodGhpcywgYXJndW1lbnRzKSwKICAgICAgICAgICAgcjEgPSArb3V0ZXJSYWRpdXMuYXBwbHkodGhpcywgYXJndW1lbnRzKSwKICAgICAgICAgICAgYTAgPSBzdGFydEFuZ2xlLmFwcGx5KHRoaXMsIGFyZ3VtZW50cykgLSBoYWxmUGkkMywKICAgICAgICAgICAgYTEgPSBlbmRBbmdsZS5hcHBseSh0aGlzLCBhcmd1bWVudHMpIC0gaGFsZlBpJDMsCiAgICAgICAgICAgIGRhID0gYWJzJDEoYTEgLSBhMCksCiAgICAgICAgICAgIGN3ID0gYTEgPiBhMDsKCiAgICAgICAgaWYgKCFjb250ZXh0KSBjb250ZXh0ID0gYnVmZmVyID0gcGF0aCgpOwoKICAgICAgICAvLyBFbnN1cmUgdGhhdCB0aGUgb3V0ZXIgcmFkaXVzIGlzIGFsd2F5cyBsYXJnZXIgdGhhbiB0aGUgaW5uZXIgcmFkaXVzLgogICAgICAgIGlmIChyMSA8IHIwKSByID0gcjEsIHIxID0gcjAsIHIwID0gcjsKCiAgICAgICAgLy8gSXMgaXQgYSBwb2ludD8KICAgICAgICBpZiAoIShyMSA+IGVwc2lsb24kMykpIGNvbnRleHQubW92ZVRvKDAsIDApOwoKICAgICAgICAvLyBPciBpcyBpdCBhIGNpcmNsZSBvciBhbm51bHVzPwogICAgICAgIGVsc2UgaWYgKGRhID4gdGF1JDQgLSBlcHNpbG9uJDMpIHsKICAgICAgICAgIGNvbnRleHQubW92ZVRvKHIxICogY29zJDIoYTApLCByMSAqIHNpbiQyKGEwKSk7CiAgICAgICAgICBjb250ZXh0LmFyYygwLCAwLCByMSwgYTAsIGExLCAhY3cpOwogICAgICAgICAgaWYgKHIwID4gZXBzaWxvbiQzKSB7CiAgICAgICAgICAgIGNvbnRleHQubW92ZVRvKHIwICogY29zJDIoYTEpLCByMCAqIHNpbiQyKGExKSk7CiAgICAgICAgICAgIGNvbnRleHQuYXJjKDAsIDAsIHIwLCBhMSwgYTAsIGN3KTsKICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIC8vIE9yIGlzIGl0IGEgY2lyY3VsYXIgb3IgYW5udWxhciBzZWN0b3I/CiAgICAgICAgZWxzZSB7CiAgICAgICAgICB2YXIgYTAxID0gYTAsCiAgICAgICAgICAgICAgYTExID0gYTEsCiAgICAgICAgICAgICAgYTAwID0gYTAsCiAgICAgICAgICAgICAgYTEwID0gYTEsCiAgICAgICAgICAgICAgZGEwID0gZGEsCiAgICAgICAgICAgICAgZGExID0gZGEsCiAgICAgICAgICAgICAgYXAgPSBwYWRBbmdsZS5hcHBseSh0aGlzLCBhcmd1bWVudHMpIC8gMiwKICAgICAgICAgICAgICBycCA9IChhcCA+IGVwc2lsb24kMykgJiYgKHBhZFJhZGl1cyA/ICtwYWRSYWRpdXMuYXBwbHkodGhpcywgYXJndW1lbnRzKSA6IHNxcnQkMihyMCAqIHIwICsgcjEgKiByMSkpLAogICAgICAgICAgICAgIHJjID0gbWluJDEoYWJzJDEocjEgLSByMCkgLyAyLCArY29ybmVyUmFkaXVzLmFwcGx5KHRoaXMsIGFyZ3VtZW50cykpLAogICAgICAgICAgICAgIHJjMCA9IHJjLAogICAgICAgICAgICAgIHJjMSA9IHJjLAogICAgICAgICAgICAgIHQwLAogICAgICAgICAgICAgIHQxOwoKICAgICAgICAgIC8vIEFwcGx5IHBhZGRpbmc/IE5vdGUgdGhhdCBzaW5jZSByMSDiiaUgcjAsIGRhMSDiiaUgZGEwLgogICAgICAgICAgaWYgKHJwID4gZXBzaWxvbiQzKSB7CiAgICAgICAgICAgIHZhciBwMCA9IGFzaW4kMShycCAvIHIwICogc2luJDIoYXApKSwKICAgICAgICAgICAgICAgIHAxID0gYXNpbiQxKHJwIC8gcjEgKiBzaW4kMihhcCkpOwogICAgICAgICAgICBpZiAoKGRhMCAtPSBwMCAqIDIpID4gZXBzaWxvbiQzKSBwMCAqPSAoY3cgPyAxIDogLTEpLCBhMDAgKz0gcDAsIGExMCAtPSBwMDsKICAgICAgICAgICAgZWxzZSBkYTAgPSAwLCBhMDAgPSBhMTAgPSAoYTAgKyBhMSkgLyAyOwogICAgICAgICAgICBpZiAoKGRhMSAtPSBwMSAqIDIpID4gZXBzaWxvbiQzKSBwMSAqPSAoY3cgPyAxIDogLTEpLCBhMDEgKz0gcDEsIGExMSAtPSBwMTsKICAgICAgICAgICAgZWxzZSBkYTEgPSAwLCBhMDEgPSBhMTEgPSAoYTAgKyBhMSkgLyAyOwogICAgICAgICAgfQoKICAgICAgICAgIHZhciB4MDEgPSByMSAqIGNvcyQyKGEwMSksCiAgICAgICAgICAgICAgeTAxID0gcjEgKiBzaW4kMihhMDEpLAogICAgICAgICAgICAgIHgxMCA9IHIwICogY29zJDIoYTEwKSwKICAgICAgICAgICAgICB5MTAgPSByMCAqIHNpbiQyKGExMCk7CgogICAgICAgICAgLy8gQXBwbHkgcm91bmRlZCBjb3JuZXJzPwogICAgICAgICAgaWYgKHJjID4gZXBzaWxvbiQzKSB7CiAgICAgICAgICAgIHZhciB4MTEgPSByMSAqIGNvcyQyKGExMSksCiAgICAgICAgICAgICAgICB5MTEgPSByMSAqIHNpbiQyKGExMSksCiAgICAgICAgICAgICAgICB4MDAgPSByMCAqIGNvcyQyKGEwMCksCiAgICAgICAgICAgICAgICB5MDAgPSByMCAqIHNpbiQyKGEwMCksCiAgICAgICAgICAgICAgICBvYzsKCiAgICAgICAgICAgIC8vIFJlc3RyaWN0IHRoZSBjb3JuZXIgcmFkaXVzIGFjY29yZGluZyB0byB0aGUgc2VjdG9yIGFuZ2xlLgogICAgICAgICAgICBpZiAoZGEgPCBwaSQ0ICYmIChvYyA9IGludGVyc2VjdCh4MDEsIHkwMSwgeDAwLCB5MDAsIHgxMSwgeTExLCB4MTAsIHkxMCkpKSB7CiAgICAgICAgICAgICAgdmFyIGF4ID0geDAxIC0gb2NbMF0sCiAgICAgICAgICAgICAgICAgIGF5ID0geTAxIC0gb2NbMV0sCiAgICAgICAgICAgICAgICAgIGJ4ID0geDExIC0gb2NbMF0sCiAgICAgICAgICAgICAgICAgIGJ5ID0geTExIC0gb2NbMV0sCiAgICAgICAgICAgICAgICAgIGtjID0gMSAvIHNpbiQyKGFjb3MkMSgoYXggKiBieCArIGF5ICogYnkpIC8gKHNxcnQkMihheCAqIGF4ICsgYXkgKiBheSkgKiBzcXJ0JDIoYnggKiBieCArIGJ5ICogYnkpKSkgLyAyKSwKICAgICAgICAgICAgICAgICAgbGMgPSBzcXJ0JDIob2NbMF0gKiBvY1swXSArIG9jWzFdICogb2NbMV0pOwogICAgICAgICAgICAgIHJjMCA9IG1pbiQxKHJjLCAocjAgLSBsYykgLyAoa2MgLSAxKSk7CiAgICAgICAgICAgICAgcmMxID0gbWluJDEocmMsIChyMSAtIGxjKSAvIChrYyArIDEpKTsKICAgICAgICAgICAgfQogICAgICAgICAgfQoKICAgICAgICAgIC8vIElzIHRoZSBzZWN0b3IgY29sbGFwc2VkIHRvIGEgbGluZT8KICAgICAgICAgIGlmICghKGRhMSA+IGVwc2lsb24kMykpIGNvbnRleHQubW92ZVRvKHgwMSwgeTAxKTsKCiAgICAgICAgICAvLyBEb2VzIHRoZSBzZWN0b3LigJlzIG91dGVyIHJpbmcgaGF2ZSByb3VuZGVkIGNvcm5lcnM/CiAgICAgICAgICBlbHNlIGlmIChyYzEgPiBlcHNpbG9uJDMpIHsKICAgICAgICAgICAgdDAgPSBjb3JuZXJUYW5nZW50cyh4MDAsIHkwMCwgeDAxLCB5MDEsIHIxLCByYzEsIGN3KTsKICAgICAgICAgICAgdDEgPSBjb3JuZXJUYW5nZW50cyh4MTEsIHkxMSwgeDEwLCB5MTAsIHIxLCByYzEsIGN3KTsKCiAgICAgICAgICAgIGNvbnRleHQubW92ZVRvKHQwLmN4ICsgdDAueDAxLCB0MC5jeSArIHQwLnkwMSk7CgogICAgICAgICAgICAvLyBIYXZlIHRoZSBjb3JuZXJzIG1lcmdlZD8KICAgICAgICAgICAgaWYgKHJjMSA8IHJjKSBjb250ZXh0LmFyYyh0MC5jeCwgdDAuY3ksIHJjMSwgYXRhbjIkMSh0MC55MDEsIHQwLngwMSksIGF0YW4yJDEodDEueTAxLCB0MS54MDEpLCAhY3cpOwoKICAgICAgICAgICAgLy8gT3RoZXJ3aXNlLCBkcmF3IHRoZSB0d28gY29ybmVycyBhbmQgdGhlIHJpbmcu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5ndGggPyAoKGNvbnRleHQgPSBfID09IG51bGwgPyBudWxsIDogXyksIGFyYykgOiBjb250ZXh0OwogICAgICB9OwoKICAgICAgcmV0dXJuIGFyYzsKICAgIH0KCiAgICBmdW5jdGlvbiBMaW5lYXIoY29udGV4dCkgewogICAgICB0aGlzLl9jb250ZXh0ID0gY29udGV4dDsKICAgIH0KCiAgICBMaW5lYXIucHJvdG90eXBlID0gewogICAgICBhcmVhU3RhcnQ6IGZ1bmN0aW9uKCkgewogICAgICAgIHRoaXMuX2xpbmUgPSAwOwogICAgICB9LAogICAgICBhcmVhRW5kOiBmdW5jdGlvbigpIHsKICAgICAgICB0aGlzLl9saW5lID0gTmFOOwogICAgICB9LAogICAgICBsaW5lU3RhcnQ6IGZ1bmN0aW9uKCkgewogICAgICAgIHRoaXMuX3BvaW50ID0gMDsKICAgICAgfSwKICAgICAgbGluZUVuZDogZnVuY3Rpb24oKSB7CiAgICAgICAgaWYgKHRoaXMuX2xpbmUgfHwgKHRoaXMuX2xpbmUgIT09IDAgJiYgdGhpcy5fcG9pbnQgPT09IDEpKSB0aGlzLl9jb250ZXh0LmNsb3NlUGF0aCgpOwogICAgICAgIHRoaXMuX2xpbmUgPSAxIC0gdGhpcy5fbGluZTsKICAgICAgfSwKICAgICAgcG9pbnQ6IGZ1bmN0aW9uKHgsIHkpIHsKICAgICAgICB4ID0gK3gsIHkgPSAreTsKICAgICAgICBzd2l0Y2ggKHRoaXMuX3BvaW50KSB7CiAgICAgICAgICBjYXNlIDA6IHRoaXMuX3BvaW50ID0gMTsgdGhpcy5fbGluZSA/IHRoaXMuX2NvbnRleHQubGluZVRvKHgsIHkpIDogdGhpcy5fY29udGV4dC5tb3ZlVG8oeCwgeSk7IGJyZWFrOwogICAgICAgICAgY2FzZSAxOiB0aGlzLl9wb2ludCA9IDI7IC8vIHByb2NlZWQKICAgICAgICAgIGRlZmF1bHQ6IHRoaXMuX2NvbnRleHQubGluZVRvKHgsIHkpOyBicmVhazsKICAgICAgICB9CiAgICAgIH0KICAgIH07CgogICAgZnVuY3Rpb24gY3VydmVMaW5lYXIoY29udGV4dCkgewogICAgICByZXR1cm4gbmV3IExpbmVhcihjb250ZXh0KTsKICAgIH0KCiAgICBmdW5jdGlvbiB4JDMocCkgewogICAgICByZXR1cm4gcFswXTsKICAgIH0KCiAgICBmdW5jdGlvbiB5JDMocCkgewogICAgICByZXR1cm4gcFsxXTsKICAgIH0KCiAgICBmdW5jdGlvbiBsaW5lKCkgewogICAgICB2YXIgeCA9IHgkMywKICAgICAgICAgIHkgPSB5JDMsCiAgICAgICAgICBkZWZpbmVkID0gY29uc3RhbnQkYih0cnVlKSwKICAgICAgICAgIGNvbnRleHQgPSBudWxsLAogICAgICAgICAgY3VydmUgPSBjdXJ2ZUxpbmVhciwKICAgICAgICAgIG91dHB1dCA9IG51bGw7CgogICAgICBmdW5jdGlvbiBsaW5lKGRhdGEpIHsKICAgICAgICB2YXIgaSwKICAgICAgICAgICAgbiA9IGRhdGEubGVuZ3RoLAogICAgICAgICAgICBkLAogICAgICAgICAgICBkZWZpbmVkMCA9IGZhbHNlLAogICAgICAgICAgICBidWZmZXI7CgogICAgICAgIGlmIChjb250ZXh0ID09IG51bGwpIG91dHB1dCA9IGN1cnZlKGJ1ZmZlciA9IHBhdGgoKSk7CgogICAgICAgIGZvciAoaSA9IDA7IGkgPD0gbjsgKytpKSB7CiAgICAgICAgICBpZiAoIShpIDwgbiAmJiBkZWZpbmVkKGQgPSBkYXRhW2ldLCBpLCBkYXRhKSkgPT09IGRlZmluZWQwKSB7CiAgICAgICAgICAgIGlmIChkZWZpbmVkMCA9ICFkZWZpbmVkMCkgb3V0cHV0LmxpbmVTdGFydCgpOwogICAgICAgICAgICBlbHNlIG91dHB1dC5saW5lRW5kKCk7CiAgICAgICAgICB9CiAgICAgICAgICBpZiAoZGVmaW5lZDApIG91dHB1dC5wb2ludCgreChkLCBpLCBkYXRhKSwgK3koZCwgaSwgZGF0YSkpOwogICAgICAgIH0KCiAg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N0aW9uIGFyZWEkMygpIHsKICAgICAgdmFyIHgwID0geCQzLAogICAgICAgICAgeDEgPSBudWxsLAogICAgICAgICAgeTAgPSBjb25zdGFudCRiKDApLAogICAgICAgICAgeTEgPSB5JDMsCiAgICAgICAgICBkZWZpbmVkID0gY29uc3RhbnQkYih0cnVlKSwKICAgICAgICAgIGNvbnRleHQgPSBudWxsLAogICAgICAgICAgY3VydmUgPSBjdXJ2ZUxpbmVhciwKICAgICAgICAgIG91dHB1dCA9IG51bGw7CgogICAgICBmdW5jdGlvbiBhcmVhKGRhdGEpIHsKICAgICAgICB2YXIgaSwKICAgICAgICAgICAgaiwKICAgICAgICAgICAgaywKICAgICAgICAgICAgbiA9IGRhdGEubGVuZ3RoLAogICAgICAgICAgICBkLAogICAgICAgICAgICBkZWZpbmVkMCA9IGZhbHNlLAogICAgICAgICAgICBidWZmZXIsCiAgICAgICAgICAgIHgweiA9IG5ldyBBcnJheShuKSwKICAgICAgICAgICAgeTB6ID0gbmV3IEFycmF5KG4pOwoKICAgICAgICBpZiAoY29udGV4dCA9PSBudWxsKSBvdXRwdXQgPSBjdXJ2ZShidWZmZXIgPSBwYXRoKCkpOwoKICAgICAgICBmb3IgKGkgPSAwOyBpIDw9IG47ICsraSkgewogICAgICAgICAgaWYgKCEoaSA8IG4gJiYgZGVmaW5lZChkID0gZGF0YVtpXSwgaSwgZGF0YSkpID09PSBkZWZpbmVkMCkgewogICAgICAgICAgICBpZiAoZGVmaW5lZDAgPSAhZGVmaW5lZDApIHsKICAgICAgICAgICAgICBqID0gaTsKICAgICAgICAgICAgICBvdXRwdXQuYXJlYVN0YXJ0KCk7CiAgICAgICAgICAgICAgb3V0cHV0LmxpbmVTdGFydCgpOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgIG91dHB1dC5saW5lRW5kKCk7CiAgICAgICAgICAgICAgb3V0cHV0LmxpbmVTdGFydCgpOwogICAgICAgICAgICAgIGZvciAoayA9IGkgLSAxOyBrID49IGo7IC0taykgewogICAgICAgICAgICAgICAgb3V0cHV0LnBvaW50KHgweltrXSwgeTB6W2tdKTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgb3V0cHV0LmxpbmVFbmQoKTsKICAgICAgICAgICAgICBvdXRwdXQuYXJlYUVuZCgpOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICBpZiAoZGVmaW5lZDApIHsKICAgICAgICAgICAgeDB6W2ldID0gK3gwKGQsIGksIGRhdGEpLCB5MHpbaV0gPSAreTAoZCwgaSwgZGF0YSk7CiAgICAgICAgICAgIG91dHB1dC5wb2ludCh4MSA/ICt4MShkLCBpLCBkYXRhKSA6IHgweltpXSwgeTEgPyAreTEoZCwgaSwgZGF0YSkgOiB5MHpbaV0pOwogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgaWYgKGJ1ZmZlcikgcmV0dXJuIG91dHB1dCA9IG51bGwsIGJ1ZmZlciArICIiIHx8IG51bGw7CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIGFyZWFsaW5lKCkgewogICAgICAgIHJldHVybiBsaW5lKCkuZGVmaW5lZChkZWZpbmVkKS5jdXJ2ZShjdXJ2ZSkuY29udGV4dChjb250ZXh0KTsKICAgICAgfQoKICAgICAgYXJlYS54ID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHgwID0gdHlwZW9mIF8gPT09ICJmdW5jdGlvbiIgPyBfIDogY29uc3RhbnQkYigrXyksIHgxID0gbnVsbCwgYXJlYSkgOiB4MDsKICAgICAgfTsKCiAgICAgIGFyZWEueDAgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoeDAgPSB0eXBlb2YgXyA9PT0gImZ1bmN0aW9uIiA/IF8gOiBjb25zdGFudCRiKCtfKSwgYXJlYSkgOiB4MDsKICAgICAgfTsKCiAgICAgIGFyZWEueDEgPSBmdW5jdGlvbihfK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YWRBbmdsZSA9IGNvbnN0YW50JGIoMCk7CgogICAgICBmdW5jdGlvbiBwaWUoZGF0YSkgewogICAgICAgIHZhciBpLAogICAgICAgICAgICBuID0gZGF0YS5sZW5ndGgsCiAgICAgICAgICAgIGosCiAgICAgICAgICAgIGssCiAgICAgICAgICAgIHN1bSA9IDAsCiAgICAgICAgICAgIGluZGV4ID0gbmV3IEFycmF5KG4pLAogICAgICAgICAgICBhcmNzID0gbmV3IEFycmF5KG4pLAogICAgICAgICAgICBhMCA9ICtzdGFydEFuZ2xlLmFwcGx5KHRoaXMsIGFyZ3VtZW50cyksCiAgICAgICAgICAgIGRhID0gTWF0aC5taW4odGF1JDQsIE1hdGgubWF4KC10YXUkNCwgZW5kQW5nbGUuYXBwbHkodGhpcywgYXJndW1lbnRzKSAtIGEwKSksCiAgICAgICAgICAgIGExLAogICAgICAgICAgICBwID0gTWF0aC5taW4oTWF0aC5hYnMoZGEpIC8gbiwgcGFkQW5nbGUuYXBwbHkodGhpcywgYXJndW1lbnRzKSksCiAgICAgICAgICAgIHBhID0gcCAqIChkYSA8IDAgPyAtMSA6IDEpLAogICAgICAgICAgICB2OwoKICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbjsgKytpKSB7CiAgICAgICAgICBpZiAoKHYgPSBhcmNzW2luZGV4W2ldID0gaV0gPSArdmFsdWUoZGF0YVtpXSwgaSwgZGF0YSkpID4gMCkgewogICAgICAgICAgICBzdW0gKz0gdjsKICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIC8vIE9wdGlvbmFsbHkgc29ydCB0aGUgYXJjcyBieSBwcmV2aW91c2x5LWNvbXB1dGVkIHZhbHVlcyBvciBieSBkYXRhLgogICAgICAgIGlmIChzb3J0VmFsdWVzICE9IG51bGwpIGluZGV4LnNvcnQoZnVuY3Rpb24oaSwgaikgeyByZXR1cm4gc29ydFZhbHVlcyhhcmNzW2ldLCBhcmNzW2pdKTsgfSk7CiAgICAgICAgZWxzZSBpZiAoc29ydCAhPSBudWxsKSBpbmRleC5zb3J0KGZ1bmN0aW9uKGksIGopIHsgcmV0dXJuIHNvcnQoZGF0YVtpXSwgZGF0YVtqXSk7IH0pOwoKICAgICAgICAvLyBDb21wdXRlIHRoZSBhcmNzISBUaGV5IGFyZSBzdG9yZWQgaW4gdGhlIG9yaWdpbmFsIGRhdGEncyBvcmRlci4KICAgICAgICBmb3IgKGkgPSAwLCBrID0gc3VtID8gKGRhIC0gbiAqIHBhKSAvIHN1bSA6IDA7IGkgPCBuOyArK2ksIGEwID0gYTEpIHsKICAgICAgICAgIGogPSBpbmRleFtpXSwgdiA9IGFyY3Nbal0sIGExID0gYTAgKyAodiA+IDAgPyB2ICogayA6IDApICsgcGEsIGFyY3Nbal0gPSB7CiAgICAgICAgICAgIGRhdGE6IGRhdGFbal0sCiAgICAgICAgICAgIGluZGV4OiBpLAogICAgICAgICAgICB2YWx1ZTogdiwKICAgICAgICAgICAgc3RhcnRBbmdsZTogYTAsCiAgICAgICAgICAgIGVuZEFuZ2xlOiBhMSwKICAgICAgICAgICAgcGFkQW5nbGU6IHAKICAgICAgICAgIH07CiAgICAgICAgfQoKICAgICAgICByZXR1cm4gYXJjczsKICAgICAgfQoKICAgICAgcGllLnZhbHVlID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHZhbHVlID0gdHlwZW9mIF8gPT09ICJmdW5jdGlvbiIgPyBfIDogY29uc3RhbnQkYigrXyksIHBpZSkgOiB2YWx1ZTsKICAgICAgfTsKCiAgICAgIHBpZS5zb3J0VmFsdWVzID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHNvcnRWYWx1ZXMgPSBfLCBzb3J0ID0gbnVsbCwgcGllKSA6IHNvcnRWYWx1ZXM7CiAgICAgIH07CgogICAgICBwaWUuc29ydCA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd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XR1cm4gYTsKICAgIH0KCiAgICBmdW5jdGlvbiBwb2ludFJhZGlhbCh4LCB5KSB7CiAgICAgIHJldHVybiBbKHkgPSAreSkgKiBNYXRoLmNvcyh4IC09IE1hdGguUEkgLyAyKSwgeSAqIE1hdGguc2luKHgpXTsKICAgIH0KCiAgICB2YXIgc2xpY2UkNiA9IEFycmF5LnByb3RvdHlwZS5zbGljZTsKCiAgICBmdW5jdGlvbiBsaW5rU291cmNlKGQpIHsKICAgICAgcmV0dXJuIGQuc291cmNlOwogICAgfQoKICAgIGZ1bmN0aW9uIGxpbmtUYXJnZXQoZCkgewogICAgICByZXR1cm4gZC50YXJnZXQ7CiAgICB9CgogICAgZnVuY3Rpb24gbGluayQyKGN1cnZlKSB7CiAgICAgIHZhciBzb3VyY2UgPSBsaW5rU291cmNlLAogICAgICAgICAgdGFyZ2V0ID0gbGlua1RhcmdldCwKICAgICAgICAgIHggPSB4JDMsCiAgICAgICAgICB5ID0geSQzLAogICAgICAgICAgY29udGV4dCA9IG51bGw7CgogICAgICBmdW5jdGlvbiBsaW5rKCkgewogICAgICAgIHZhciBidWZmZXIsIGFyZ3YgPSBzbGljZSQ2LmNhbGwoYXJndW1lbnRzKSwgcyA9IHNvdXJjZS5hcHBseSh0aGlzLCBhcmd2KSwgdCA9IHRhcmdldC5hcHBseSh0aGlzLCBhcmd2KTsKICAgICAgICBpZiAoIWNvbnRleHQpIGNvbnRleHQgPSBidWZmZXIgPSBwYXRoKCk7CiAgICAgICAgY3VydmUoY29udGV4dCwgK3guYXBwbHkodGhpcywgKGFyZ3ZbMF0gPSBzLCBhcmd2KSksICt5LmFwcGx5KHRoaXMsIGFyZ3YpLCAreC5hcHBseSh0aGlzLCAoYXJndlswXSA9IHQsIGFyZ3YpKSwgK3kuYXBwbHkodGhpcywgYXJndikpOwogICAgICAgIGlmIChidWZmZXIpIHJldHVybiBjb250ZXh0ID0gbnVsbCwgYnVmZmVyICsgIiIgfHwgbnVsbDsKICAgICAgfQoKICAg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gTWF0aC5zcXJ0KHNpemUgLyBwaSQ0KTsKICAgICAgICBjb250ZXh0Lm1vdmVUbyhyLCAwKTsKICAgICAgICBjb250ZXh0LmFyYygwLCAwLCByLCAwLCB0YXUkNCk7CiAgICAgIH0KICAgIH07CgogICAgdmFyIGNyb3NzJDIgPSB7CiAgICAgIGRyYXc6IGZ1bmN0aW9uKGNvbnRleHQsIHNpemUpIHsKICAgICAgICB2YXIgciA9IE1hdGguc3FydChzaXplIC8gNSkgLyAyOwogICAgICAgIGNvbnRleHQubW92ZVRvKC0zICogciwgLXIpOwogICAgICAgIGNvbnRleHQubGluZVRvKC1yLCAtcik7CiAgICAgICAgY29udGV4dC5saW5lVG8oLXIsIC0zICogcik7CiAgICAgICAgY29udGV4dC5saW5lVG8ociwgLTMgKiByKTsKICAgICAgICBjb250ZXh0LmxpbmVUbyhyLCAtcik7CiAgICAgICAgY29udGV4dC5saW5lVG8oMyAqIHIsIC1yKTsKICAgICAgICBjb250ZXh0LmxpbmVUbygzICogciwgcik7CiAgICAgICAgY29udGV4dC5saW5lVG8ociwgcik7CiAgICAgICAgY29udGV4dC5saW5lVG8ociwgMyAqIHIpOwogICAgICAgIGNvbnRleHQubGluZVRvKC1yLCAzICogcik7CiAgICAgICAgY29udGV4dC5saW5lVG8oLXIsIHIpOwogICAgICAgIGNvbnRleHQubGluZVRvKC0zICogciwgcik7CiAgICAgICAgY29udGV4dC5jbG9zZVBhdGgoKTsKICAgICAgfQogICAgfTsKCiAgICB2YXIgdGFuMzAgPSBNYXRoLnNxcnQoMSAvIDMpLAogICAgICAgIHRhbjMwXzIgPSB0YW4zMCAqIDI7CgogICAgdmFyIGRpYW1vbmQgPSB7CiAgICAgIGRyYXc6IGZ1bmN0aW9uKGNvbnRleHQsIHNpemUpIHsKICAgICAgICB2YXIgeSA9IE1hdGguc3FydChzaXplIC8gdGFuMzBfMiksCiAgICAgICAgICAgIHggPSB5ICogdGFuMzA7CiAgICAgICAgY29udGV4dC5tb3ZlVG8oMCwgLXkpOwogICAgICAgIGNvbnRleHQubGluZVRvKHgsIDApOwogICAgICAgIGNvbnRleHQubGluZVRvKDAsIHkpOwogICAgICAgIGNvbnRleHQubGluZVRvKC14LCAwKTsKICAgICAgICBjb250ZXh0LmNsb3NlUGF0aCgpOwogICAgICB9CiAgICB9OwoKICAgIHZhciBrYSA9IDAuODkwODEzMDkxNTI5Mjg1MjI4MTAsCiAgICAgICAga3IgPSBNYXRoLnNpbihwaSQ0IC8gMTApIC8gTWF0aC5zaW4oNyAqIHBpJDQgLyAxMCksCiAgICAgICAga3ggPSBNYXRoLnNpbih0YXUkNCAvIDEwKSAqIGtyLAogICAgICAgIGt5ID0gLU1hdGguY29zKHRhdSQ0IC8gMTApICoga3I7CgogICAgdmFyIHN0YXIgPSB7CiAgICAgIGRyYXc6IGZ1bmN0aW9uKGNvbnRleHQsIHNpemUpIHsKICAgICAgICB2YXIgciA9IE1hdGguc3FydChzaXplICoga2EpLAogICAgICAgICAgICB4ID0ga3ggKiByLAogICAgICAgICAgICB5ID0ga3kgKiByOwogICAgICAgIGNvbnRleHQubW92ZVRvKDAsIC1yKTsKICAgICAgICBjb250ZXh0LmxpbmVUbyh4LCB5KTsKICAgICAgICBmb3IgKHZhciBpID0gMTsgaSA8IDU7ICsraSkgewogICAgICAgICAgdmFyIGEgPSB0YXUkNCAqIGkgLyA1LAogICAgICAgICAgICAgIGMgPSBNYXRoLmNvcyhhKSwKICAgICAgICAgICAgICBzID0gTWF0aC5zaW4oYSk7CiAgICAgICAgICBjb250ZXh0LmxpbmVUbyhzICogciwgLWMgKiByKTsKICAgICAgICAgIGNvbnRleHQubGluZVRvKGMgKiB4IC0gcyAqIHksIHMgKiB4ICsgYyAqIHkpOwogICAgICAgIH0KICAgICAgICBjb250ZXh0LmNsb3NlUGF0aCgpOwogICAgICB9CiAgICB9OwoKICAgIHZhciBzcXVhcmUgPSB7CiAgICAgIGRyYXc6IGZ1bmN0aW9uKGNvbnRleHQsIHNpemUpIHsKICAgICAgICB2YXIgdyA9IE1hdGguc3FydChzaXplKSwKICAgICAgICAgICAgeCA9IC13IC8gMjsKICAgICAgICBjb250ZXh0LnJlY3QoeCwgeCwgdywgdyk7CiAgICAgIH0KICAgIH07CgogICAgdmFyIHNxcnQzID0gTWF0aC5zcXJ0KDMpOwoKICAgIHZhciB0cmlhbmdsZSA9IHsKICAgICAgZHJhdzogZnVuY3Rpb24oY29udGV4dCwgc2l6ZSkgewogICAgICAgIHZhciB5ID0gLU1hdGguc3FydChzaXplIC8gKHNxcnQzICogMykpOwogICAgICAgIGNvbnRleHQubW92ZVRvKDAsIHkgKiAyKTsKICAgICAgICBjb250ZXh0LmxpbmVUbygtc3FydDMgKiB5LCAteSk7CiAgICAgICAgY29udGV4dC5saW5lVG8oc3FydDMgKiB5LCAteSk7CiAgICAgICAgY29udGV4dC5jbG9zZVBhdGgoKTsKICAgICAgfQogICAgfTsKCiAgICB2YXIgYyQyID0gLTAuNSwKICAgICAgICBzID0gTWF0aC5zcXJ0KDMpIC8gMiwKICAgICAgICBrID0gMSAvIE1hdGguc3FydCgxMiksCiAgICAgICAgYSA9IChrIC8gMiArIDEpICogMzsKCiAgICB2YXIgd3llID0gewogICAgICBkcmF3OiBmdW5jdGlvbihjb250ZXh0LCBzaXplKSB7CiAgICAgICAgdmFyIHIgPSBNYXRoLnNxcnQoc2l6ZSAvIGEpLAogICAgICAgICAgICB4MCA9IHIgLyAyLAogICAgICAgICAgICB5MCA9IHIgKiBrLAogICAgICAgICAgICB4MSA9IHgwLAogICAgICAgICAgICB5MSA9IHIgKiBrICsgciwKICAgICAgICAgICAgeDIgPSAteDEsCiAgICAgICAgICAgIHkyID0geTE7CiAgICAgICAgY29udGV4dC5tb3ZlVG8oeDAsIHkwKTsKICAgICAgICBjb250ZXh0LmxpbmVUbyh4MSwgeTEpOwogICAgICAgIGNvbnRleHQubGluZVRvKHgyLCB5Mik7CiAgICAgICAgY29udGV4dC5saW5lVG8oYyQyICogeDAgLSBzICogeTAsIHMgKiB4MCArIGMkMiAqIHkwKTsKICAgICAgICBjb250ZXh0LmxpbmVUbyhjJDIgKiB4MSAtIHMgKiB5MSwgcyAqIHgxICsgYyQyICogeTEpOwogICAgICAgIGNvbnRleHQubGluZVRvKGMkMiAqIHgyIC0gcyAqIHkyLCBzICogeDIgKyBjJDIgKiB5Mik7CiAgICAgICAgY29udGV4dC5saW5lVG8oYyQyICogeDAgKyBzICogeTAsIGMkMiAqIHkwIC0gcyAqIHgwKTsKICAgICAgICBjb250ZXh0LmxpbmVUbyhjJDIgKiB4MSArIHMgKiB5MSwgYyQyICogeTEgLSBzICogeDEpOwogICAgICAgIGNvbnRleHQubGluZVRvKGMkMiAqIHgyICsgcyAqIHkyLCBjJDIgKiB5MiAtIHMgKiB4Mik7CiAgICAgICAgY29udGV4dC5jbG9zZVBhdGgoKTsKICAgICAgfQogICAgfTsKCiAgICB2YXIgc3ltYm9scyA9IFsKICAgICAgY2lyY2xlJDIsCiAgICAgIGNyb3NzJDIsCiAgICAgIGRpYW1vbmQsCiAgICAgIHNxdWFyZSwKICAgICAgc3RhciwKICAgICAgdHJpYW5nbGUsCiAgICAgIHd5ZQogICAgXTsKCiAgICBmdW5jdGlvbiBzeW1ib2woKSB7CiAgICAgIHZhciB0eXBlID0gY29uc3RhbnQkYihjaXJjbGUkMiksCiAgICAgICAgICBzaXplID0gY29uc3RhbnQkYig2NCksCiAgICAgICAgICBjb250ZXh0ID0gbnVsbDsKCiAgICAgIGZ1bmN0aW9uIHN5bWJvbCgpIHsKICAgICAgICB2YXIgYnVmZmVyOwogICAgICAgIGlmICghY29udGV4dCkgY29udGV4dCA9IGJ1ZmZlciA9IHBhdGgoKTsKICAgICAgICB0eXBlLmFwcGx5KHRoaXMsIGFyZ3VtZW50cykuZHJhdyhjb250ZXh0LCArc2l6ZS5hcHBseSh0aGlzLCBhcmd1bWVudHMpKTsKICAgICAgICBpZiAoYnVmZmVyKSByZXR1cm4gY29udGV4dCA9IG51bGwsIGJ1Zm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N0aW9uIEJhc2lzKGNvbnRleHQpIHsKICAgICAgdGhpcy5fY29udGV4dCA9IGNvbnRleHQ7CiAgICB9CgogICAgQmFzaXMucHJvdG90eXBlID0gewogICAgICBhcmVhU3RhcnQ6IGZ1bmN0aW9uKCkgewogICAgICAgIHRoaXMuX2xpbmUgPSAwOwogICAgICB9LAogICAgICBhcmVhRW5kOiBmdW5jdGlvbigpIHsKICAgICAgICB0aGlzLl9saW5lID0gTmFOOwogICAgICB9LAogICAgICBsaW5lU3RhcnQ6IGZ1bmN0aW9uKCkgewogICAgICAgIHRoaXMuX3gwID0gdGhpcy5feDEgPQogICAgICAgIHRoaXMuX3kwID0gdGhpcy5feTEgPSBOYU47CiAgICAgICAgdGhpcy5fcG9pbnQgPSAwOwogICAgICB9LAogICAgICBsaW5lRW5kOiBmdW5jdGlvbigpIHsKICAgICAgICBzd2l0Y2ggKHRoaXMuX3BvaW50KSB7CiAgICAgICAgICBjYXNlIDM6IHBvaW50JDIodGhpcywgdGhpcy5feDEsIHRoaXMuX3kxKTsgLy8gcHJvY2VlZAogICAgICAgICAgY2FzZSAyOiB0aGlzLl9jb250ZXh0LmxpbmVUbyh0aGlzLl94MSwgdGhpcy5feTEpOyBicmVhazsKICAgICAgICB9CiAgICAgICAgaWYgKHRoaXMuX2xpbmUgfHwgKHRoaXMuX2xpbmUgIT09IDAgJiYgdGhpcy5fcG9pbnQgPT09IDEpKSB0aGlzLl9jb250ZXh0LmNsb3NlUGF0aCgpOwogICAgICAgIHRoaXMuX2xpbmUgPSAxIC0gdGhpcy5fbGluZTsKICAgICAgfSwKICAgICAgcG9pbnQ6IGZ1bmN0aW9uKHgsIHkpIHsKICAgICAgICB4ID0gK3gsIHkgPSAreTsKICAgICAgICBzd2l0Y2ggKHRoaXMuX3BvaW50KSB7CiAgICAgICAgICBjYXNlIDA6IHRoaXMuX3BvaW50ID0gMTsgdGhpcy5fbGluZSA/IHRoaXMuX2NvbnRleHQubGluZVRvKHgsIHkpIDogdGhpc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gICAgICBjYXNlIDE6IHsKICAgICAgICAgICAgdGhpcy5fY29udGV4dC5tb3ZlVG8odGhpcy5feDIsIHRoaXMuX3kyKTsKICAgICAgICAgICAgdGhpcy5fY29udGV4dC5jbG9zZVBhdGgoKTsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICB9CiAgICAgICAgICBjYXNlIDI6IHsKICAgICAgICAgICAgdGhpcy5fY29udGV4dC5tb3ZlVG8oKHRoaXMuX3gyICsgMiAqIHRoaXMuX3gzKSAvIDMsICh0aGlzLl95MiArIDIgKiB0aGlzLl95MykgLyAzKTsKICAgICAgICAgICAgdGhpcy5fY29udGV4dC5saW5lVG8oKHRoaXMuX3gzICsgMiAqIHRoaXMuX3gyKSAvIDMsICh0aGlzLl95MyArIDIgKiB0aGlzLl95MikgLyAzKTsKICAgICAgICAgICAgdGhpcy5fY29udGV4dC5jbG9zZVBhdGgoKTsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICB9CiAgICAgICAgICBjYXNlIDM6IHsKICAgICAgICAgICAgdGhpcy5wb2ludCh0aGlzLl94MiwgdGhpcy5feTIpOwogICAgICAgICAgICB0aGlzLnBvaW50KHRoaXMuX3gzLCB0aGlzLl95Myk7CiAgICAgICAgICAgIHRoaXMucG9pbnQodGhpcy5feDQsIHRoaXMuX3k0KTsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9LAogICAgICBwb2ludDogZnVuY3Rpb24oeCwgeSkgewogICAgICAgIHggPSAreCwgeSA9ICt5OwogICAgICAgIHN3aXRjaCAodGhpcy5fcG9pbnQpIHsKICAgICAgICAgIGNhc2UgMDogdGhpcy5fcG9pbnQgPSAxOyB0aGlzLl94MiA9IHgsIHRoaXMuX3kyID0geTsgYnJlYWs7CiAgICAgICAgICBjYXNlIDE6IHRoaXMuX3BvaW50ID0gMjsgdGhpcy5feDMgPSB4LCB0aGlzLl95MyA9IHk7IGJyZWFrOwogICAgICAgICAgY2FzZSAy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nByb3RvdHlwZSA9IHsKICAgICAgbGluZVN0YXJ0OiBmdW5jdGlvbigpIHsKICAgICAgICB0aGlzLl94ID0gW107CiAgICAgICAgdGhpcy5feSA9IFtdOwogICAgICAgIHRoaXMuX2Jhc2lzLmxpbmVTdGFydCgpOwogICAgICB9LAogICAgICBsaW5lRW5kOiBmdW5jdGlvbigpIHsKICAgICAgICB2YXIgeCA9IHRoaXMuX3gsCiAgICAgICAgICAgIHkgPSB0aGlzLl95LAogICAgICAgICAgICBqID0geC5sZW5ndGggLSAxOwoKICAgICAgICBpZiAoaiA+IDApIHsKICAgICAgICAgIHZhciB4MCA9IHhbMF0sCiAgICAgICAgICAgICAgeTAgPSB5WzBdLAogICAgICAgICAgICAgIGR4ID0geFtqXSAtIHgwLAogICAgICAgICAgICAgIGR5ID0geVtqXSAtIHkwLAogICAgICAgICAgICAgIGkgPSAtMSwKICAgICAgICAgICAgICB0OwoKICAgICAgICAgIHdoaWxlICgrK2kgPD0gaikgewogICAgICAgICAgICB0ID0gaSAvIGo7CiAgICAgICAgICAgIHRoaXMuX2Jhc2lzLnBvaW50KAogICAgICAgICAgICAgIHRoaXMuX2JldGEgKiB4W2ldICsgKDEgLSB0aGlzLl9iZXRhKSAqICh4MCArIHQgKiBkeCksCiAgICAgICAgICAgICAgdGhpcy5fYmV0YSAqIHlbaV0gKyAoMSAtIHRoaXMuX2JldGEpICogKHkwICsgdCAqIGR5KQogICAgICAgICAgICApOwogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgdGhpcy5feCA9IHRoaXMuX3kgPSBudWxsOwogICAgICAgIHRoaXMuX2Jhc2lzLmxpbmVFbmQoKTsKICAgICAgfSwKICAgICAgcG9pbnQ6IGZ1bmN0aW9uKHgsIHkpIHsKICAgICAgICB0aGlzLl94LnB1c2goK3gpOwogICAgICAgIHRoaXMuX3kucHVzaCgreSk7CiAgICAgIH0KICAgIH07CgogICAgdmFyIGJ1bmRsZSA9IChmdW5jdGlvbiBjdXN0b20oYm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Rpb24oKSB7CiAgICAgICAgdGhpcy5feDAgPSB0aGlzLl94MSA9IHRoaXMuX3gyID0KICAgICAgICB0aGlzLl95MCA9IHRoaXMuX3kxID0gdGhpcy5feTIgPSBOYU47CiAgICAgICAgdGhpcy5fcG9pbnQgPSAwOwogICAgICB9LAogICAgICBsaW5lRW5kOiBmdW5jdGlvbigpIHsKICAgICAgICBzd2l0Y2ggKHRoaXMuX3BvaW50KSB7CiAgICAgICAgICBjYXNlIDI6IHRoaXMuX2NvbnRleHQubGluZVRvKHRoaXMuX3gyLCB0aGlzLl95Mik7IGJyZWFrOwogICAgICAgICAgY2FzZSAzOiBwb2ludCQzKHRoaXMsIHRoaXMuX3gxLCB0aGlzLl95MSk7IGJyZWFrOwogICAgICAgIH0KICAgICAgICBpZiAodGhpcy5fbGluZSB8fCAodGhpcy5fbGluZSAhPT0gMCAmJiB0aGlzLl9wb2ludCA9PT0gMSkpIHRoaXMuX2NvbnRleHQuY2xvc2VQYXRoKCk7CiAgICAgICAgdGhpcy5fbGluZSA9IDEgLSB0aGlzLl9saW5lOwogICAgICB9LAogICAgICBwb2ludDogZnVuY3Rpb24oeCwgeSkgewogICAgICAgIHggPSAreCwgeSA9ICt5OwogICAgICAgIHN3aXRjaCAodGhpcy5fcG9pbnQpIHsKICAgICAgICAgIGNhc2UgMDogdGhpcy5fcG9pbnQgPSAxOyB0aGlzLl9saW5lID8gdGhpcy5fY29udGV4dC5saW5lVG8oeCwgeSkgOiB0aGlzLl9jb250ZXh0Lm1vdmVUbyh4LCB5KTsgYnJlYWs7CiAgICAgICAgICBjYXNlIDE6IHRoaXMuX3BvaW50ID0gMjsgdGhpcy5feDEgPSB4LCB0aGlzLl95MSA9IHk7IGJyZWFrOwogICAgICAgICAgY2FzZSAyOiB0aGlzLl9wb2ludCA9IDM7IC8vIHByb2NlZWQKICAgICAgICAgIGRlZmF1bHQ6IHBvaW50JDModGhpcywgeCwgeSk7IGJyZWFrOwogICAgICAgIH0KICAgICAgICB0aG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iAgICAgICAgc3dpdGNoICh0aGlzLl9wb2ludCkgewogICAgICAgICAgY2FzZSAxOiB7CiAgICAgICAgICAgIHRoaXMuX2NvbnRleHQubW92ZVRvKHRoaXMuX3gzLCB0aGlzLl95Myk7CiAgICAgICAgICAgIHRoaXMuX2NvbnRleHQuY2xvc2VQYXRoKCk7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgfQogICAgICAgICAgY2FzZSAyOiB7CiAgICAgICAgICAgIHRoaXMuX2NvbnRleHQubGluZVRvKHRoaXMuX3gzLCB0aGlzLl95Myk7CiAgICAgICAgICAgIHRoaXMuX2NvbnRleHQuY2xvc2VQYXRoKCk7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgfQogICAgICAgICAgY2FzZSAzOiB7CiAgICAgICAgICAgIHRoaXMucG9pbnQodGhpcy5feDMsIHRoaXMuX3kzKTsKICAgICAgICAgICAgdGhpcy5wb2ludCh0aGlzLl94NCwgdGhpcy5feTQpOwogICAgICAgICAgICB0aGlzLnBvaW50KHRoaXMuX3g1LCB0aGlzLl95NSk7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfSwKICAgICAgcG9pbnQ6IGZ1bmN0aW9uKHgsIHkpIHsKICAgICAgICB4ID0gK3gsIHkgPSAreTsKICAgICAgICBzd2l0Y2ggKHRoaXMuX3BvaW50KSB7CiAgICAgICAgICBjYXNlIDA6IHRoaXMuX3BvaW50ID0gMTsgdGhpcy5feDMgPSB4LCB0aGlzLl95MyA9IHk7IGJyZWFrOwogICAgICAgICAgY2FzZSAxOiB0aGlzLl9wb2ludCA9IDI7IHRoaXMuX2NvbnRleHQubW92ZVRvKHRoaXMuX3g0ID0geCwgdGhpcy5feTQgPSB5KTsgYnJlYWs7CiAgICAgICAgICBjYXNlIDI6IHRoaXMuX3BvaW50ID0gMzsgdGhpcy5feDUgPSB4LCB0aGlzLl95NSA9IHk7IGJyZWFrOwogICAgICAgICAgZGVmYXVsd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aXMuX3g0ID0gdGhpcy5feDUgPQogICAgICAgIHRoaXMuX3kwID0gdGhpcy5feTEgPSB0aGlzLl95MiA9IHRoaXMuX3kzID0gdGhpcy5feTQgPSB0aGlzLl95NSA9IE5hTjsKICAgICAgICB0aGlzLl9sMDFfYSA9IHRoaXMuX2wxMl9hID0gdGhpcy5fbDIzX2EgPQogICAgICAgIHRoaXMuX2wwMV8yYSA9IHRoaXMuX2wxMl8yYSA9IHRoaXMuX2wyM18yYSA9CiAgICAgICAgdGhpcy5fcG9pbnQgPSAwOwogICAgICB9LAogICAgICBsaW5lRW5kOiBmdW5jdGlvbigpIHsKICAgICAgICBzd2l0Y2ggKHRoaXMuX3BvaW50KSB7CiAgICAgICAgICBjYXNlIDE6IHsKICAgICAgICAgICAgdGhpcy5fY29udGV4dC5tb3ZlVG8odGhpcy5feDMsIHRoaXMuX3kzKTsKICAgICAgICAgICAgdGhpcy5fY29udGV4dC5jbG9zZVBhdGgoKTsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICB9CiAgICAgICAgICBjYXNlIDI6IHsKICAgICAgICAgICAgdGhpcy5fY29udGV4dC5saW5lVG8odGhpcy5feDMsIHRoaXMuX3kzKTsKICAgICAgICAgICAgdGhpcy5fY29udGV4dC5jbG9zZVBhdGgoKTsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICB9CiAgICAgICAgICBjYXNlIDM6IHsKICAgICAgICAgICAgdGhpcy5wb2ludCh0aGlzLl94MywgdGhpcy5feTMpOwogICAgICAgICAgICB0aGlzLnBvaW50KHRoaXMuX3g0LCB0aGlzLl95NCk7CiAgICAgICAgICAgIHRoaXMucG9pbnQodGhpcy5feDUsIHRoaXMuX3k1KTsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9LAogICAgICBwb2ludDogZnVuY3Rpb24oeCwgeSkgewogICAgICAgIHggPSAreCwgeSA9ICt5OwoKICAgICAgICBpZiAodGhpcy5fcG9pbnQpI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b24gY2F0bXVsbFJvbShjb250ZXh0KSB7CiAgICAgICAgcmV0dXJuIGFscGhhID8gbmV3IENhdG11bGxSb21DbG9zZWQoY29udGV4dCwgYWxwaGEpIDogbmV3IENhcmRpbmFsQ2xvc2VkKGNvbnRleHQsIDApOwogICAgICB9CgogICAgICBjYXRtdWxsUm9tLmFscGhhID0gZnVuY3Rpb24oYWxwaGEpIHsKICAgICAgICByZXR1cm4gY3VzdG9tKCthbHBoYSk7CiAgICAgIH07CgogICAgICByZXR1cm4gY2F0bXVsbFJvbTsKICAgIH0pKDAuNSk7CgogICAgZnVuY3Rpb24gQ2F0bXVsbFJvbU9wZW4oY29udGV4dCwgYWxwaGEpIHsKICAgICAgdGhpcy5fY29udGV4dCA9IGNvbnRleHQ7CiAgICAgIHRoaXMuX2FscGhhID0gYWxwaGE7CiAgICB9CgogICAgQ2F0bXVsbFJvbU9wZW4ucHJvdG90eXBlID0gewogICAgICBhcmVhU3RhcnQ6IGZ1bmN0aW9uKCkgewogICAgICAgIHRoaXMuX2xpbmUgPSAwOwogICAgICB9LAogICAgICBhcmVhRW5kOiBmdW5jdGlvbigpIHsKICAgICAgICB0aGlzLl9saW5lID0gTmFOOwogICAgICB9LAogICAgICBsaW5lU3RhcnQ6IGZ1bmN0aW9uKCkgewogICAgICAgIHRoaXMuX3gwID0gdGhpcy5feDEgPSB0aGlzLl94MiA9CiAgICAgICAgdGhpcy5feTAgPSB0aGlzLl95MSA9IHRoaXMuX3kyID0gTmFOOwogICAgICAgIHRoaXMuX2wwMV9hID0gdGhpcy5fbDEyX2EgPSB0aGlzLl9sMjNfYSA9CiAgICAgICAgdGhpcy5fbDAxXzJhID0gdGhpcy5fbDEyXzJhID0gdGhpcy5fbDIzXzJhID0KICAgICAgICB0aGlzLl9wb2ludCA9IDA7CiAgICAgIH0sCiAgICAgIGxpbmVFbmQ6IGZ1bmN0aW9uKCkgewogICAgICAgIGlmICh0aGlzLl9saW5lIHx8ICh0aGlzLl9saW5lICE9PSAw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VgucHJvdG90eXBlID0gewogICAgICBhcmVhU3RhcnQ6IGZ1bmN0aW9uKCkgewogICAgICAgIHRoaXMuX2xpbmUgPSAwOwogICAgICB9LAogICAgICBhcmVhRW5kOiBmdW5jdGlvbigpIHsKICAgICAgICB0aGlzLl9saW5lID0gTmFOOwogICAgICB9LAogICAgICBsaW5lU3RhcnQ6IGZ1bmN0aW9uKCkgewogICAgICAgIHRoaXMuX3gwID0gdGhpcy5feDEgPQogICAgICAgIHRoaXMuX3kwID0gdGhpcy5feTEgPQogICAgICAgIHRoaXMuX3QwID0gTmFOOwogICAgICAgIHRoaXMuX3BvaW50ID0gMDsKICAgICAgfSwKICAgICAgbGluZUVuZDogZnVuY3Rpb24oKSB7CiAgICAgICAgc3dpdGNoICh0aGlzLl9wb2ludCkgewogICAgICAgICAgY2FzZSAyOiB0aGlzLl9jb250ZXh0LmxpbmVUbyh0aGlzLl94MSwgdGhpcy5feTEpOyBicmVhazsKICAgICAgICAgIGNhc2UgMzogcG9pbnQkNSh0aGlzLCB0aGlzLl90MCwgc2xvcGUyKHRoaXMsIHRoaXMuX3QwKSk7IGJyZWFrOwogICAgICAgIH0KICAgICAgICBpZiAodGhpcy5fbGluZSB8fCAodGhpcy5fbGluZSAhPT0gMCAmJiB0aGlzLl9wb2ludCA9PT0gMSkpIHRoaXMuX2NvbnRleHQuY2xvc2VQYXRoKCk7CiAgICAgICAgdGhpcy5fbGluZSA9IDEgLSB0aGlzLl9saW5lOwogICAgICB9LAogICAgICBwb2ludDogZnVuY3Rpb24oeCwgeSkgewogICAgICAgIHZhciB0MSA9IE5hTjsKCiAgICAgICAgeCA9ICt4LCB5ID0gK3k7CiAgICAgICAgaWYgKHggPT09IHRoaXMuX3gxICYmIHkgPT09IHRoaXMuX3kxKSByZXR1cm47IC8vIElnbm9yZSBjb2luY2lkZW50IHBvaW50cy4KICAgICAgICBzd2l0Y2ggKHRoaXMuX3BvaW50KSB7CiAgICAgICAgICBjYXNlIDA6IHRoaXMuX3B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Ghpcy5fbGluZSA/IHRoaXMuX2NvbnRleHQubGluZVRvKHhbMF0sIHlbMF0pIDogdGhpcy5fY29udGV4dC5tb3ZlVG8oeFswXSwgeVswXSk7CiAgICAgICAgICBpZiAobiA9PT0gMikgewogICAgICAgICAgICB0aGlzLl9jb250ZXh0LmxpbmVUbyh4WzFdLCB5WzFdKTsKICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIHZhciBweCA9IGNvbnRyb2xQb2ludHMoeCksCiAgICAgICAgICAgICAgICBweSA9IGNvbnRyb2xQb2ludHMoeSk7CiAgICAgICAgICAgIGZvciAodmFyIGkwID0gMCwgaTEgPSAxOyBpMSA8IG47ICsraTAsICsraTEpIHsKICAgICAgICAgICAgICB0aGlzLl9jb250ZXh0LmJlemllckN1cnZlVG8ocHhbMF1baTBdLCBweVswXVtpMF0sIHB4WzFdW2kwXSwgcHlbMV1baTBdLCB4W2kxXSwgeVtpMV0pOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICBpZiAodGhpcy5fbGluZSB8fCAodGhpcy5fbGluZSAhPT0gMCAmJiBuID09PSAxKSkgdGhpcy5fY29udGV4dC5jbG9zZVBhdGgoKTsKICAgICAgICB0aGlzLl9saW5lID0gMSAtIHRoaXMuX2xpbmU7CiAgICAgICAgdGhpcy5feCA9IHRoaXMuX3kgPSBudWxsOwogICAgICB9LAogICAgICBwb2ludDogZnVuY3Rpb24oeCwgeSkgewogICAgICAgIHRoaXMuX3gucHVzaCgreCk7CiAgICAgICAgdGhpcy5feS5wdXNoKCt5KTsKICAgICAgfQogICAgfTsKCiAgICAvLyBTZWUgaHR0cHM6Ly93d3cucGFydGljbGVpbmNlbGwuY29tLzIwMTIvYmV6aWVyLXNwbGluZXMvIGZvciBkZXJpdmF0aW9uLgogICAgZnVuY3Rpb24gY29udHJvbFBvaW50cyh4KSB7CiAgICAgIHZhciBpLAogICAgICAgICAgbiA9IHgubGVuZ3RoIC0gMSwKICAgICAgICAgIG0sCiAgICAgICAgICBhID0gbmV3IEFycmF5KG4pLAogICAgICAgICAgYiA9IG5ldyBBcnJheShuKSwKICAgICAgICAgIHIgPSBuZXcgQXJyYXkobik7CiAgICAgIGFbMF0gPSAwLCBiWzBdID0gMiwgclswXSA9IHhbMF0gKyAyICogeFsxXTsKICAgICAgZm9yIChpID0gMTsgaSA8IG4gLSAxOyArK2kpIGFbaV0gPSAxLCBiW2ldID0gNCwgcltpXSA9IDQgKiB4W2ldICsgMiAqIHhbaSArIDFdOwogICAgICBhW24gLSAxXSA9IDIsIGJbbiAtIDFdID0gNywgcltuIC0gMV0gPSA4ICogeFtuIC0gMV0gKyB4W25dOwogICAgICBmb3IgKGkgPSAxOyBpIDwgbjsgKytpKSBtID0gYVtpXSAvIGJbaSAtIDFdLCBiW2ldIC09IG0sIHJbaV0gLT0gbSAqIHJbaSAtIDFdOwogICAgICBhW24gLSAxXSA9IHJbbiAtIDFdIC8gYltuIC0gMV07CiAgICAgIGZvciAoaSA9IG4gLSAyOyBpID49IDA7IC0taSkgYVtpXSA9IChyW2ldIC0gYVtpICsgMV0pIC8gYltpXTsKICAgICAgYltuIC0gMV0gPSAoeFtuXSArIGFbbiAtIDFdKSAvIDI7CiAgICAgIGZvciAoaSA9IDA7IGkgPCBuIC0gMTsgKytpKSBiW2ldID0gMiAqIHhbaSArIDFdIC0gYVtpICsgMV07CiAgICAgIHJldHVybiBbYSwgYl07CiAgICB9CgogICAgZnVuY3Rpb24gbmF0dXJhbChjb250ZXh0KSB7CiAgICAgIHJldHVybiBuZXcgTmF0dXJhbChjb250ZXh0KTsKICAgIH0KCiAgICBmdW5jdGlvbiBTdGVwKGNvbnRleHQsIHQpIHsKICAgICAgdGhpcy5fY29udGV4dCA9IGNvbnRleHQ7CiAgICAgIHRoaXMuX3QgPSB0OwogICAgfQoKICAgIFN0ZXAucHJvdG90eXBlID0gewogICAgICBhcmVhU3RhcnQ6IGZ1bmN0aW9uKCkgewogICAgICAgIHRoaXMuX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AgICAgICAgICB0aGlzLl9jb250ZXh0LmxpbmVUbyh4LCB5KTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICB2YXIgeDEgPSB0aGlzLl94ICogKDEgLSB0aGlzLl90KSArIHggKiB0aGlzLl90OwogICAgICAgICAgICAgIHRoaXMuX2NvbnRleHQubGluZVRvKHgxLCB0aGlzLl95KTsKICAgICAgICAgICAgICB0aGlzLl9jb250ZXh0LmxpbmVUbyh4MSwgeSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHRoaXMuX3ggPSB4LCB0aGlzLl95ID0geTsKICAgICAgfQogICAgfTsKCiAgICBmdW5jdGlvbiBzdGVwKGNvbnRleHQpIHsKICAgICAgcmV0dXJuIG5ldyBTdGVwKGNvbnRleHQsIDAuNSk7CiAgICB9CgogICAgZnVuY3Rpb24gc3RlcEJlZm9yZShjb250ZXh0KSB7CiAgICAgIHJldHVybiBuZXcgU3RlcChjb250ZXh0LCAwKTsKICAgIH0KCiAgICBmdW5jdGlvbiBzdGVwQWZ0ZXIoY29udGV4dCkgewogICAgICByZXR1cm4gbmV3IFN0ZXAoY29udGV4dCwgMSk7CiAgICB9CgogICAgZnVuY3Rpb24gbm9uZSQxKHNlcmllcywgb3JkZXIpIHsKICAgICAgaWYgKCEoKG4gPSBzZXJpZXMubGVuZ3RoKSA+IDEpKSByZXR1cm47CiAgICAgIGZvciAodmFyIGkgPSAxLCBqLCBzMCwgczEgPSBzZXJpZXNbb3JkZXJbMF1dLCBuLCBtID0gczEubGVuZ3RoOyBpIDwgbjsgKytpKSB7CiAgICAgICAgczAgPSBzMSwgczEgPSBzZXJpZXNbb3JkZXJbaV1dOwogICAgICAgIGZvciAoaiA9IDA7IGogPCBtOyArK2opIHsKICAgICAgICAgIHMxW2pdWzFdICs9IHMxW2pdWzBdID0gaXNOYU4oczBbal1bMV0pID8gczBbal1bMF0gOiBzMFtqXVsxXTsKICAgICAgICB9CiAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiBub25lJDIoc2VyaWVzKSB7CiAgICAgIHZhciBuID0gc2VyaWVzLmxlbmd0aCwgbyA9IG5ldyBBcnJheShuKTsKICAgICAgd2hpbGUgKC0tbiA+PSAwKSBvW25dID0gbjsKICAgICAgcmV0dXJuIG87CiAgICB9CgogICAgZnVuY3Rpb24gc3RhY2tWYWx1ZShkLCBrZXkpIHsKICAgICAgcmV0dXJuIGRba2V5XTsKICAgIH0KCiAgICBmdW5jdGlvbiBzdGFjaygpIHsKICAgICAgdmFyIGtleXMgPSBjb25zdGFudCRiKFtdKSwKICAgICAgICAgIG9yZGVyID0gbm9uZSQyLAogICAgICAgICAgb2Zmc2V0ID0gbm9uZSQxLAogICAgICAgICAgdmFsdWUgPSBzdGFja1ZhbHVlOwoKICAgICAgZnVuY3Rpb24gc3RhY2soZGF0YSkgewogICAgICAgIHZhciBreiA9IGtleXMuYXBwbHkodGhpcywgYXJndW1lbnRzKSwKICAgICAgICAgICAgaSwKICAgICAgICAgICAgbSA9IGRhdGEubGVuZ3RoLAogICAgICAgICAgICBuID0ga3oubGVuZ3RoLAogICAgICAgICAgICBzeiA9IG5ldyBBcnJheShuKSwKICAgICAgICAgICAgb3o7CgogICAgICAgIGZvciAoaSA9IDA7IGkgPCBuOyArK2kpIHsKICAgICAgICAgIGZvciAodmFyIGtpID0ga3pbaV0sIHNpID0gc3pbaV0gPSBuZXcgQXJyYXkobSksIGogPSAwLCBzaWo7IGogPCBtOyArK2opIHsKICAgICAgICAgICAgc2lbal0gPSBzaWogPSBbMCwgK3ZhbHVlKGRhdGFbal0sIGtpLCBqLCBkYXRhKV07CiAgICAgICAgICAgIHNpai5kYXRhID0gZGF0YVtqXTsKICAgICAgICAgIH0KICAgICAgICAgIHNpLmtleSA9IGtpOwogICAgICAgIH0KCiAgICAgICAgZm9yIChpID0gMCwgb3ogPSBvcmRlcihzeik7IGkgPCBuOyArK2kpIHsKICAgICAgICAgIHN6W296W2ldXS5pbmRleCA9IGk7CiAgICAgICAgfQoKICAgICAgICBvZmZzZXQoc3osIG96KTsKICAgICAgICByZXR1cm4gc3o7CiAgICAgIH0KCiAgICAgIHN0YWNrLmtleXMgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoa2V5cyA9IHR5cGVvZiBfID09PSAiZnVuY3Rpb24iID8gXyA6IGNvbnN0YW50JGIoc2xpY2UkNi5jYWxsKF8pKSwgc3RhY2spIDoga2V5czsKICAgICAgfTsKCiAgICAgIHN0YWNrLnZhbHVlID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHZhbHVlID0gdHlwZW9mIF8gPT09ICJmdW5jdGlvbiIgPyBfIDogY29uc3RhbnQkYigrXyksIHN0YWNrKSA6IHZhbHVlOwogICAgICB9OwoKICAgICAgc3RhY2sub3JkZXIgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAob3JkZXIgPSBfID09IG51bGwgPyBub25lJDIgOiB0eXBlb2YgXyA9PT0gImZ1bmN0aW9uIiA/IF8gOiBjb25zdGFudCRiKHNsaWNlJDYuY2FsbChfKSksIHN0YWNrKSA6IG9yZGVyOwogICAgICB9OwoKICAgICAgc3RhY2sub2Zmc2V0ID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKG9mZnNldCA9IF8gPT0gbnVsbCA/IG5vbmUkMSA6IF8sIHN0YWNrKSA6IG9mZnNldDsKICAgICAgfTsKCiAgICAgIHJldHVybiBzdGFjazsKICAgIH0KCiAgICBmdW5jdGlvbiBleHBhbmQoc2VyaWVzLCBvcmRlcikgewogICAgICBpZiAoISgobiA9IHNlcmllcy5sZW5ndGgpID4gMCkpIHJldHVybjsKICAgICAgZm9yICh2YXIgaSwgbiwgaiA9IDAs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iA8IG07ICsraikgewogICAgICAgIGZvciAodmFyIGkgPSAwLCB5ID0gMDsgaSA8IG47ICsraSkgeSArPSBzZXJpZXNbaV1bal1bMV0gfHwgMDsKICAgICAgICBzMFtqXVsxXSArPSBzMFtqXVswXSA9IC15IC8gMjsKICAgICAgfQogICAgICBub25lJDEoc2VyaWVzLCBvcmRlcik7CiAgICB9CgogICAgZnVuY3Rpb24gd2lnZ2xlKHNlcmllcywgb3JkZXIpIHsKICAgICAgaWYgKCEoKG4gPSBzZXJpZXMubGVuZ3RoKSA+IDApIHx8ICEoKG0gPSAoczAgPSBzZXJpZXNbb3JkZXJbMF1dKS5sZW5ndGgpID4gMCkpIHJldHVybjsKICAgICAgZm9yICh2YXIgeSA9IDAsIGogPSAxLCBzMCwgbSwgbjsgaiA8IG07ICsraikgewogICAgICAgIGZvciAodmFyIGkgPSAwLCBzMSA9IDAsIHMyID0gMDsgaSA8IG47ICsraSkgewogICAgICAgICAgdmFyIHNpID0gc2VyaWVzW29yZGVyW2ldXSwKICAgICAgICAgICAgICBzaWowID0gc2lbal1bMV0gfHwgMCwKICAgICAgICAgICAgICBzaWoxID0gc2lbaiAtIDFdWzFdIHx8IDAsCiAgICAgICAgICAgICAgczMgPSAoc2lqMCAtIHNpajEpIC8gMjsKICAgICAgICAgIGZvciAodmFyIGsgPSAwOyBrIDwgaTsgKytrKSB7CiAgICAgICAgICAgIHZhciBzayA9IHNlcmllc1tvcmRlcltrXV0sCiAgICAgICAgICAgICAgICBza2owID0gc2tbal1bMV0gfHwgMCwKICAgICAgICAgICAgICAgIHNrajEgPSBza1tqIC0gMV1bMV0gfHwgMDsKICAgICAgICAgICAgczMgKz0gc2tqMCAtIHNrajE7CiAgICAgICAgICB9CiAgICAgICAgICBzMSArPSBzaWowLCBzMiArPSBzMyAqIHNpajA7CiAgICAgICAgfQogICAgICAgIHMwW2ogLSAxXVsxXSArPSBzMFtqIC0gMV1bMF0gPSB5OwogICAgICAgIGlmIChzMSkgeSAtPSBzM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gICBmdW5jdGlvbiBpbnNpZGVPdXQoc2VyaWVzKSB7CiAgICAgIHZhciBuID0gc2VyaWVzLmxlbmd0aCwKICAgICAgICAgIGksCiAgICAgICAgICBqLAogICAgICAgICAgc3VtcyA9IHNlcmllcy5tYXAoc3VtJDIpLAogICAgICAgICAgb3JkZXIgPSBhcHBlYXJhbmNlKHNlcmllcyksCiAgICAgICAgICB0b3AgPSAwLAogICAgICAgICAgYm90dG9tID0gMCwKICAgICAgICAgIHRvcHMgPSBbXSwKICAgICAgICAgIGJvdHRvbXMgPSBbXTsKCiAgICAgIGZvciAoaSA9IDA7IGkgPCBuOyArK2kpIHsKICAgICAgICBqID0gb3JkZXJbaV07CiAgICAgICAgaWYgKHRvcCA8IGJvdHRvbSkgewogICAgICAgICAgdG9wICs9IHN1bXNbal07CiAgICAgICAgICB0b3BzLnB1c2goaik7CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgIGJvdHRvbSArPSBzdW1zW2pdOwogICAgICAgICAgYm90dG9tcy5wdXNoKGopOwogICAgICAgIH0KICAgICAgfQoKICAgICAgcmV0dXJuIGJvdHRvbXMucmV2ZXJzZSgpLmNvbmNhdCh0b3BzKTsKICAgIH0KCiAgICBmdW5jdGlvbiByZXZlcnNlKHNlcmllcykgewogICAgICByZXR1cm4gbm9uZSQyKHNlcmllcykucmV2ZXJzZSgpOwogICAgfQoKICAgIGZ1bmN0aW9uIGNvbnN0YW50JGMoeCkgewogICAgICByZXR1cm4gZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuIHg7CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24geCQ0KGQpIHsKICAgICAgcmV0dXJuIGRbMF07CiAgICB9CgogICAgZnVuY3Rpb24geSQ0KGQpIHsKICAgICAgcmV0dXJuIGRbMV07CiAgICB9CgogICAgZnVuY3Rpb24gUmVkQmxhY2tUcmVlKCkgewogICAgICB0aGlzLl8gPSBudWxsOyAvLyByb290IG5vZGUKICAgIH0KCiAgICBmdW5jdGlvbiBSZWRCbGFja05vZGUobm9kZSkgewogICAgICBub2RlLlUgPSAvLyBwYXJlbnQgbm9kZQogICAgICBub2RlLkMgPSAvLyBjb2xvciAtIHRydWUgZm9yIHJlZCwgZmFsc2UgZm9yIGJsYWNrCiAgICAgIG5vZGUuTCA9IC8vIGxlZnQgbm9kZQogICAgICBub2RlLlIgPSAvLyByaWdodCBub2RlCiAgICAgIG5vZGUuUCA9IC8vIHByZXZpb3VzIG5vZGUKICAgICAgbm9kZS5OID0gbnVsbDsgLy8gbmV4dCBub2RlCiAgICB9CgogICAgUmVkQmxhY2tUcmVlLnByb3RvdHlwZSA9IHsKICAgICAgY29uc3RydWN0b3I6IFJlZEJsYWNrVHJlZSwKCiAgICAgIGluc2VydDogZnVuY3Rpb24oYWZ0ZXIsIG5vZGUpIHsKICAgICAgICB2YXIgcGFyZW50LCBncmFuZHBhLCB1bmNsZTsKCiAgICAgICAgaWYgKGFmdGVyKSB7CiAgICAgICAgICBub2RlLlAgPSBhZnRlcjsKICAgICAgICAgIG5vZGUuTiA9IGFmdGVyLk47CiAgICAgICAgICBpZiAoYWZ0ZXIuTikgYWZ0ZXIuTi5QID0gbm9kZTsKICAgICAgICAgIGFmdGVyLk4gPSBub2RlOwogICAgICAgICAgaWYgKGFmdGVyLlIpIHsKICAgICAgICAgICAgYWZ0ZXIgPSBhZnRlci5SOwogICAgICAgICAgICB3aGlsZSAoYWZ0ZXIuTCkgYWZ0ZXIgPSBhZnRlci5MOwogICAgICAgICAgICBhZnRlci5MID0gbm9kZTsKICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIGFmdGVyLlIgPSBub2RlOwogICAgICAgICAgfQogICAgICAgICAgcGFyZW50ID0gYWZ0ZXI7CiAgICAgICAgfSBlbHNlIGlmICh0aGlzLl8pIHsKICAgICAgICAgIGFmdGVyID0gUmVkQmxhY2tGaXJzdCh0aGlzLl8pOwogICAgICAgICAgbm9kZS5QID0gbnVsbDsKICAgICAgICAgIG5vZGUuTiA9IGFmdGVyOwogICAgICAgICAgYWZ0ZXIuUCA9IGFmdGVyLkwgPSBub2RlOwogICAgICAgICAgcGFyZW50ID0gYWZ0ZXI7CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgIG5vZGUuUCA9IG5vZGUuTiA9IG51bGw7CiAgICAgICAgICB0aGlzLl8gPSBub2RlOwogICAgICAgICAgcGFyZW50ID0gbnVsbDsKICAgICAgICB9CiAgICAgICAgbm9kZS5MID0gbm9kZS5SID0gbnVsbDsKICAgICAgICBub2RlLlUgPSBwYXJlbnQ7CiAgICAgICAgbm9kZS5DID0gdHJ1ZTsKCiAgICAgICAgYWZ0ZXIgPSBub2RlOwogICAgICAgIHdoaWxlIChwYXJlbnQgJiYgcGFyZW50LkMpIHsKICAgICAgICAgIGdyYW5kcGEgPSBwYXJlbnQuVTsKICAgICAgICAgIGlmIChwYXJlbnQgPT09IGdyYW5kcGEuTCkgewogICAgICAgICAgICB1bmNsZSA9IGdyYW5kcGEuUjsKICAgICAgICAgICAgaWYgKHVuY2xlICYmIHVuY2xlLkMpIHsKICAgICAgICAgICAgICBwYXJlbnQuQyA9IHVuY2xlLkMgPSBmYWxzZTsKICAgICAgICAgICAgICBncmFuZHBhLkMgPSB0cnVlOwogICAgICAgICAgICAgIGFmdGVyID0gZ3JhbmRwYTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICBpZiAoYWZ0ZXIgPT09IHBhcmVudC5SKSB7CiAgICAgICAgICAgICAgICBSZWRCbGFja1JvdGF0ZUxlZnQodGhpcywgcGFyZW50KTsKICAgICAgICAgICAgICAgIGFmdGVyID0gcGFyZW50OwogICAgICAgICAgICAgICAgcGFyZW50ID0gYWZ0ZXIuVTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgcGFyZW50LkMgPSBmYWxzZTsKICAgICAgICAgICAgICBncmFuZHBhLkMgPSB0cnVlOwogICAgICAgICAgICAgIFJlZEJsYWNrUm90YXRlUmlnaHQodGhpcywgZ3JhbmRwYSk7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIHVuY2xlID0gZ3JhbmRwYS5MOwogICAgICAgICAgICBpZiAodW5jbGUgJiYgdW5jbGUuQykgewogICAgICAgICAgICAgIHBhcmVudC5DID0gdW5jbGUuQyA9IGZhbHNlOwogICAgICAgICAgICAgIGdyYW5kcGEuQyA9IHRydWU7CiAgICAgICAgICAgICAgYWZ0ZXIgPSBncmFuZHBhOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgIGlmIChhZnRlciA9PT0gcGFyZW50LkwpIHsKICAgICAgICAgICAgICAgIFJlZEJsYWNrUm90YXRlUmlnaHQodGhpcywgcGFyZW50KTsKICAgICAgICAgICAgICAgIGFmdGVyID0gcGFyZW50OwogICAgICAgICAgICAgICAgcGFyZW50ID0gYWZ0ZXIuVTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgcGFyZW50LkMgPSBmYWxzZTsKICAgICAgICAgICAgICBncmFuZHBhLkMgPSB0cnVlOwogICAgICAgICAgICAgIFJlZEJsYWNrUm90YXRlTGVmdCh0aGlzLCBncmFuZHBhKTsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgICAgcGFyZW50ID0gYWZ0ZXIuVTsKICAgICAgICB9CiAgICAgICAgdGhpcy5fLkMgPSBmYWxzZTsKICAgICAgfSwKCiAgICAgIHJlbW92ZTogZnVuY3Rpb24obm9kZSkgewogICAgICAgIGlmIChub2RlLk4pIG5vZGUuTi5QID0gbm9kZS5QOwogICAgICAgIGlmIChub2RlLlApIG5vZGUuUC5OID0gbm9kZS5OOwogICAgICAgIG5vZGUuTiA9IG5vZGUuUCA9IG51bGw7CgogICAgICAgIHZhciBwYXJlbnQgPSBub2RlLlUsCiAgICAgICAgICAgIHNpYmxpbmcsCiAgICAgICAgICAgIGxlZnQgPSBub2RlLkwsCiAgICAgICAgICAgIHJpZ2h0ID0gbm9kZS5SLAogICAgICAgICAgICBuZXh0LAogICAgICAgICAgICByZWQ7CgogICAgICAgIGlmICghbGVmdCkgbmV4dCA9IHJpZ2h0OwogICAgICAgIGVsc2UgaWYgKCFyaWdodCkgbmV4dCA9IGxlZnQ7CiAgICAgICAgZWxzZSBuZXh0ID0gUmVkQmxhY2tGaXJzdChyaWdodCk7CgogICAgICAgIGlmIChwYXJlbnQpIHsKICAgICAgICAgIGlmIChwYXJlbnQuTCA9PT0gbm9kZSkgcGFyZW50LkwgPSBuZXh0OwogICAgICAgICAgZWxzZSBwYXJlbnQuUiA9IG5leHQ7CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgIHRoaXMuXyA9IG5leHQ7CiAgICAgICAgfQoKICAgICAgICBpZiAobGVmdCAmJiByaWdodCkgewogICAgICAgICAgcmVkID0gbmV4dC5DOwogICAgICAgICAgbmV4dC5DID0gbm9kZS5DOwogICAgICAgICAgbmV4dC5MID0gbGVmdDsKICAgICAgICAgIGxlZnQuVSA9IG5leHQ7CiAgICAgICAgICBpZiAobmV4dCAhPT0gcmlnaHQpIHsKICAgICAgICAgICAgcGFyZW50ID0gbmV4dC5VOwogICAgICAgICAgICBuZXh0LlUgPSBub2RlLlU7CiAgICAgICAgICAgIG5vZGUgPSBuZXh0LlI7CiAgICAgICAgICAgIHBhcmVudC5MID0gbm9kZTsKICAgICAgICAgICAgbmV4dC5SID0gcmlnaHQ7CiAgICAgICAgICAgIHJpZ2h0LlUgPSBuZXh0OwogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgbmV4dC5VID0gcGFyZW50OwogICAgICAgICAgICBwYXJlbnQgPSBuZXh0OwogICAgICAgICAgICBub2RlID0gbmV4dC5SOwogICAgICAgICAgfQogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICByZWQgPSBub2RlLkM7CiAgICAgICAgICBub2RlID0gbmV4dDsKICAgICAgICB9CgogICAgICAgIGlmIChub2RlKSBub2RlLlUgPSBwYXJlbnQ7CiAgICAgICAgaWYgKHJlZCkgcmV0dXJuOwogICAgICAgIGlmIChub2RlICYmIG5vZGUuQykgeyBub2RlLkMgPSBmYWxzZTsgcmV0dXJuOyB9CgogICAgICAgIGRvIHsKICAgICAgICAgIGlmIChub2RlID09PSB0aGlzLl8pIGJyZWFrOwogICAgICAgICAgaWYgKG5vZGUgPT09IHBhcmVudC5MKSB7CiAgICAgICAgICAgIHNpYmxpbmcgPSBwYXJlbnQuUjsKICAgICAgICAgICAgaWYgKHNpYmxpbmcuQykgewogICAgICAgICAgICAgIHNpYmxpbmcuQyA9IGZhbHNlOwogICAgICAgICAgICAgIHBhcmVudC5DID0gdHJ1ZTsKICAgICAgICAgICAgICBSZWRCbGFja1JvdGF0ZUxlZnQodGhpcywgcGFyZW50KTsKICAgICAgICAgICAgICBzaWJsaW5nID0gcGFyZW50LlI7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKChzaWJsaW5nLkwgJiYgc2libGluZy5MLkMpCiAgICAgICAgICAgICAgICB8fCAoc2libGluZy5SICYmIHNpYmxpbmcuUi5DKSkgewogICAgICAgICAgICAgIGlmICghc2libGluZy5SIHx8ICFzaWJsaW5nLlIuQykgewogICAgICAgICAgICAgICAgc2libGluZy5MLkMgPSBmYWxzZTsKICAgICAgICAgICAgICAgIHNpYmxpbmcuQyA9IHRydWU7CiAgICAgICAgICAgICAgICBSZWRCbGFja1JvdGF0ZVJpZ2h0KHRoaXMsIHNpYmxpbmcpOwogICAgICAgICAgICAgICAgc2libGluZyA9IHBhcmVudC5SOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBzaWJsaW5nLkMgPSBwYXJlbnQuQzsKICAgICAgICAgICAgICBwYXJlbnQuQyA9IHNpYmxpbmcuUi5DID0gZmFsc2U7CiAgICAgICAgICAgICAgUmVkQmxhY2tSb3RhdGVMZWZ0KHRoaXMsIHBhcmVudCk7CiAgICAgICAgICAgICAgbm9kZSA9IHRoaXMuXzsKICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgc2libGluZyA9IHBhcmVudC5MOwogICAgICAgICAgICBpZiAoc2libGluZy5DKSB7CiAgICAgICAgICAgICAgc2libGluZy5DID0gZmFsc2U7CiAgICAgICAgICAgICAgcGFyZW50LkMgPSB0cnVlOwogICAgICAgICAgICAgIFJlZEJsYWNrUm90YXRlUmlnaHQodGhpcywgcGFyZW50KTsKICAgICAgICAgICAgICBzaWJsaW5nID0gcGFyZW50Lkw7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKChzaWJsaW5nLkwgJiYgc2libGluZy5MLkMpCiAgICAgICAgICAgICAgfHwgKHNpYmxpbmcuUiAmJiBzaWJsaW5nLlIuQykpIHsKICAgICAgICAgICAgICBpZiAoIXNpYmxpbmcuTCB8fCAhc2libGluZy5MLkMpIHsKICAgICAgICAgICAgICAgIHNpYmxpbmcuUi5DID0gZmFsc2U7CiAgICAgICAgICAgICAgICBzaWJsaW5nLkMgPSB0cnVlOwogICAgICAgICAgICAgICAgUmVkQmxhY2tSb3RhdGVMZWZ0KHRoaXMsIHNpYmxpbmcpOwogICAgICAgICAgICAgICAgc2libGluZyA9IHBhcmVudC5MOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBzaWJsaW5nLkMgPSBwYXJlbnQuQzsKICAgICAgICAgICAgICBwYXJlbnQuQyA9IHNpYmxpbmcuTC5DID0gZmFsc2U7CiAgICAgICAgICAgICAgUmVkQmxhY2tSb3RhdGVSaWdodCh0aGlzLCBwYXJlbnQpOwogICAgICAgICAgICAgIG5vZGUgPSB0aGlzLl87CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICAgIHNpYmxpbmcuQyA9IHRydWU7CiAgICAgICAgICBub2RlID0gcGFyZW50OwogICAgICAgICAgcGFyZW50ID0gcGFyZW50LlU7CiAgICAgICAgfSB3aGlsZSAoIW5vZGUuQyk7CgogICAgICAgIGlmIChub2RlKSBub2RlLkMgPSBmYWxzZTsKICAgICAgfQogICAgfTsKCiAgICBmdW5jdGlvbiBSZWRCbGFja1JvdGF0ZUxlZnQodHJlZSwgbm9kZSkgewogICAgICB2YXIgcCA9IG5vZGUsCiAgICAgICAgICBxID0gbm9kZS5SLAogICAgICAgICAgcGFyZW50ID0gcC5VOwoKICAgICAgaWYgKHBhcmVudCkgewogICAgICAgIGlmIChwYXJlbnQuTCA9PT0gcCkgcGFyZW50LkwgPSBxOwogICAgICAgIGVsc2UgcGFyZW50LlIgPSBxOwogICAgICB9IGVsc2UgewogICAgICAgIHRyZWUuXyA9IHE7CiAgICAgIH0KCiAgICAgIHEuVSA9IHBhcmVudDsKICAgICAgcC5VID0gcTsKICAgICAgcC5SID0gcS5MOwogICAgICBpZiAocC5SKSBwLlIuVSA9IHA7CiAgICAgIHEuTCA9IHA7CiAgICB9CgogICAgZnVuY3Rpb24gUmVkQmxhY2tSb3RhdGVSaWdodCh0cmVlLCBub2RlKSB7CiAgICAgIHZhciBwID0gbm9kZSwKICAgICAgICAgIHEgPSBub2RlLkwsCiAgICAgICAgICBwYXJlbnQgPSBwLlU7CgogICAgICBpZiAocGFyZW50KSB7CiAgICAgICAgaWYgKHBhcmVudC5MID09PSBwKSBwYXJlbnQuTCA9IHE7CiAgICAgICAgZWxzZSBwYXJlbnQuUiA9IHE7CiAgICAgIH0gZWxzZSB7CiAgICAgICAgdHJlZS5fID0gcTsKICAgICAgfQoKICAgICAgcS5VID0gcGFyZW50OwogICAgICBwLlUgPSBxOwogICAgICBwLkwgPSBxLlI7CiAgICAgIGlmIChwLkwpIHAuTC5VID0gcDsKICAgICAgcS5SID0gcDsKICAgIH0KCiAgICBmdW5jdGlvbiBSZWRCbGFja0ZpcnN0KG5vZGUpIHsKICAgICAgd2hpbGUgKG5vZGUuTCkgbm9kZSA9IG5vZGUuTDsKICAgICAgcmV0dXJuIG5vZGU7CiAgICB9CgogICAgZnVuY3Rpb24gY3JlYXRlRWRnZShsZWZ0LCByaWdodC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lvbiBjbGlwRWRnZShlZGdlLCB4MCwgeTAsIHgxLCB5MSkgewogICAgICB2YXIgYSA9IGVkZ2VbMF0sCiAgICAgICAgICBiID0gZWRnZVsxXSwKICAgICAgICAgIGF4ID0gYVswXSwKICAgICAgICAgIGF5ID0gYVsxXSwKICAgICAgICAgIGJ4ID0gYlswXSwKICAgICAgICAgIGJ5ID0gYlsxXSwKICAgICAgICAgIHQwID0gMCwKICAgICAgICAgIHQxID0gMSwKICAgICAgICAgIGR4ID0gYnggLSBheCwKICAgICAgICAgIGR5ID0gYnkgLSBheSwKICAgICAgICAgIHI7CgogICAgICByID0geDAgLSBheDsKICAgICAgaWYgKCFkeCAmJiByID4gMCkgcmV0dXJuOwogICAgICByIC89IGR4OwogICAgICBpZiAoZHggPCAwKSB7CiAgICAgICAgaWYgKHIgPCB0MCkgcmV0dXJuOwogICAgICAgIGlmIChyIDwgdDEpIHQxID0gcjsKICAgICAgfSBlbHNlIGlmIChkeCA+IDApIHsKICAgICAgICBpZiAociA+IHQxKSByZXR1cm47CiAgICAgICAgaWYgKHIgPiB0MCkgdDAgPSByOwogICAgICB9CgogICAgICByID0geDEgLSBheDsKICAgICAgaWYgKCFkeCAmJiByIDwgMCkgcmV0dXJuOwogICAgICByIC89IGR4OwogICAgICBpZiAoZHggPCAwKSB7CiAgICAgICAgaWYgKHIgPiB0MSkgcmV0dXJuOwogICAgICAgIGlmIChyID4gdDApIHQwID0gcjsKICAgICAgfSBlbHNlIGlmIChkeCA+IDApIHsKICAgICAgICBpZiAociA8IHQwKSByZXR1cm47CiAgICAgICAgaWYgKHIgPCB0MSkgdDEgPSByOwogICAgICB9CgogICAgICByID0geTAgLSBheTsKICAgICAgaWYgKCFkeSAmJiByID4gMCkgcmV0dXJuOwogICAgICByIC89IGR5OwogICAgICBpZiAoZHkgPCAwKSB7CiAgICAgICAgaWYgKHIgPCB0MCkgcmV0dXJuOwogICAgICAgIGlmIChyIDwgdDEpIHQxID0gcjsKICAgICAgfSBlbHNlIGlmIChkeSA+IDApIHsKICAgICAgICBpZiAociA+IHQxKSByZXR1cm47CiAgICAgICAgaWYgKHIgPiB0MCkgdDAgPSByOwogICAgICB9CgogICAgICByID0geTEgLSBheTsKICAgICAgaWYgKCFkeSAmJiByIDwgMCkgcmV0dXJuOwogICAgICByIC89IGR5OwogICAgICBpZiAoZHkgPCAwKSB7CiAgICAgICAgaWYgKHIgPiB0MSkgcmV0dXJuOwogICAgICAgIGlmIChyID4gdDApIHQwID0gcjsKICAgICAgfSBlbHNlIGlmIChkeSA+IDApIHsKICAgICAgICBpZiAociA8IHQwKSByZXR1cm47CiAgICAgICAgaWYgKHIgPCB0MSkgdDEgPSByOwogICAgICB9CgogICAgICBpZiAoISh0MCA+IDApICYmICEodDEgPCAxKSkgcmV0dXJuIHRydWU7IC8vIFRPRE8gQmV0dGVyIGNoZWNrPwoKICAgICAgaWYgKHQwID4gMCkgZWRnZVswXSA9IFtheCArIHQwICogZHgsIGF5ICsgdDAgKiBkeV07CiAgICAgIGlmICh0MSA8IDEpIGVkZ2VbMV0gPSBbYXggKyB0MSAqIGR4LCBheSArIHQxICogZHldOwogICAgICByZXR1cm4gdHJ1ZTsKICAgIH0KCiAgICBmdW5jdGlvbiBjb25uZWN0RWRnZShlZGdlLCB4MCwgeTAsIHgxLCB5MSkgewogICAgICB2YXIgdjEgPSBlZGdlWzFdOwogICAgICBpZiAodjEpIHJldHVybiB0cnVlOwoKICAgICAgdmFyIHYwID0gZWRnZVswXSwKICAgICAgICAgIGxlZnQgPSBlZGdlLmxlZnQsCiAgICAgICAgICByaWdodCA9IGVkZ2UucmlnaHQsCiAgICAgICAgICBseCA9IGxlZnRbMF0sCiAgICAgICAgICBseSA9IGxlZnRbMV0sCiAgICAgICAgICByeCA9IHJpZ2h0WzBdLAogICAgICAgICAgcnkgPSByaWdodFsxXSwKICAgICAgICAgIGZ4ID0gKGx4ICsgcngpIC8gMiwKICAgICAgICAgIGZ5ID0gKGx5ICsgcnkpIC8gMiwKICAgICAgICAgIGZtLAogICAgICAgICAgZmI7CgogICAgICBpZiAocnkgPT09IGx5KSB7CiAgICAgICAgaWYgKGZ4IDwgeDAgfHwgZnggPj0geDEpIHJldHVybjsKICAgICAgICBpZiAobHggPiByeCkgewogICAgICAgICAgaWYgKCF2MCkgdjAgPSBbZngsIHkwXTsKICAgICAgICAgIGVsc2UgaWYgKHYwWzFdID49IHkxKSByZXR1cm47CiAgICAgICAgICB2MSA9IFtmeCwgeTFdOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICBpZiAoIXYwKSB2MCA9IFtmeCwgeTFdOwogICAgICAgICAgZWxzZSBpZiAodjBbMV0gPCB5MCkgcmV0dXJuOwogICAgICAgICAgdjEgPSBbZngsIHkwXTsKICAgICAgICB9CiAgICAgIH0gZWxzZSB7CiAgICAgICAgZm0gPSAobHggLSByeCkgLyAocnkgLSBseSk7CiAgICAgICAgZmIgPSBmeSAtIGZtICogZng7CiAgICAgICAgaWYgKGZtIDwgLTEgfHwgZm0gPiAxKSB7CiAgICAgICAgICBpZiAobHggPiByeCkgewogICAgICAgICAgICBpZiAoIXYwKSB2MCA9IFsoeTAgLSBmYikgLyBmbSwgeTBdOwogICAgICAgICAgICBlbHNlIGlmICh2MFsxXSA+PSB5MSkgcmV0dXJuOwogICAgICAgICAgICB2MSA9IFsoeTEgLSBmYikgLyBmbSwgeTFdOwogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgaWYgKCF2MCkgdjAgPSBbKHkxIC0gZmIpIC8gZm0sIHkxXTsKICAgICAgICAgICAgZWxzZSBpZiAodjBbMV0gPCB5MCkgcmV0dXJuOwogICAgICAgICAgICB2MSA9IFsoeTAgLSBmYikgLyBmbSwgeTBdOwogICAgICAgICAgfQogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICBpZiAobHkgPCByeSkgewogICAgICAgICAgICBpZiAoIXYwKSB2MCA9IFt4MCwgZm0gKiB4MCArIGZiXTsKICAgICAgICAgICAgZWxzZSBpZiAodj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Sk7CiAgICAgICAgICBmb3IgKGogPSAwOyBqIDwgbTsgKytqKSBpbmRleFtqXSA9IGosIGFycmF5W2pdID0gY2VsbEhhbGZlZGdlQW5nbGUoY2VsbCwgZWRnZXNbaGFsZmVkZ2VzW2pdXSk7CiAgICAgICAgICBpbmRleC5zb3J0KGZ1bmN0aW9uKGksIGopIHsgcmV0dXJuIGFycmF5W2pdIC0gYXJyYXlbaV07IH0pOwogICAgICAgICAgZm9yIChqID0gMDsgaiA8IG07ICsraikgYXJyYXlbal0gPSBoYWxmZWRnZXNbaW5kZXhbal1dOwogICAgICAgICAgZm9yIChqID0gMDsgaiA8IG07ICsraikgaGFsZmVkZ2VzW2pdID0gYXJyYXlbal07CiAgICAgICAgfQogICAgICB9CiAgICB9CgogICAgZnVuY3Rpb24gY2xpcENlbGxzKHgwLCB5MCwgeDEsIHkxKSB7CiAgICAgIHZhciBuQ2VsbHMgPSBjZWxscy5sZW5ndGgsCiAgICAgICAgICBpQ2VsbCwKICAgICAgICAgIGNlbGwsCiAgICAgICAgICBzaXRlLAogICAgICAgICAgaUhhbGZlZGdlLAogICAgICAgICAgaGFsZmVkZ2VzLAogICAgICAgICAgbkhhbGZlZGdlcywKICAgICAgICAgIHN0YXJ0LAogICAgICAgICAgc3RhcnRYLAogICAgICAgICAgc3RhcnRZLAogICAgICAgICAgZW5kLAogICAgICAgICAgZW5kWCwKICAgICAgICAgIGVuZFksCiAgICAgICAgICBjb3ZlciA9IHRydWU7CgogICAgICBmb3IgKGlDZWxsID0gMDsgaUNlbGwgPCBuQ2VsbHM7ICsraUNlbGwpIHsKICAgICAgICBpZiAoY2VsbCA9IGNlbGxzW2lDZWxsXSkgewogICAgICAgICAgc2l0ZSA9IGNlbGwuc2l0ZTsKICAgICAgICAgIGhhbGZlZGdlcyA9IGNlbGwuaGFsZmVkZ2VzOwogICAgICAgICAgaUhhbGZlZGdlID0gaGFsZmVkZ2VzLmxlbmd0aDsKCiAgICAgICAgICAvLyBSZW1vdmUgYW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YgKGNlbGwgPSBjZWxsc1tpQ2VsbF0pIHsKICAgICAgICAgIGlmICghY2VsbC5oYWxmZWRnZXMubGVuZ3RoKSB7CiAgICAgICAgICAgIGRlbGV0ZSBjZWxsc1tpQ2VsbF07CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CgogICAgdmFyIGNpcmNsZVBvb2wgPSBbXTsKCiAgICB2YXIgZmlyc3RDaXJjbGU7CgogICAgZnVuY3Rpb24gQ2lyY2xlKCkgewogICAgICBSZWRCbGFja05vZGUodGhpcyk7CiAgICAgIHRoaXMueCA9CiAgICAgIHRoaXMueSA9CiAgICAgIHRoaXMuYXJjID0KICAgICAgdGhpcy5zaXRlID0KICAgICAgdGhpcy5jeSA9IG51bGw7CiAgICB9CgogICAgZnVuY3Rpb24gYXR0YWNoQ2lyY2xlKGFyYykgewogICAgICB2YXIgbEFyYyA9IGFyYy5QLAogICAgICAgICAgckFyYyA9IGFyYy5OOwoKICAgICAgaWYgKCFsQXJjIHx8ICFyQXJjKSByZXR1cm47CgogICAgICB2YXIgbFNpdGUgPSBsQXJjLnNpdGUsCiAgICAgICAgICBjU2l0ZSA9IGFyYy5zaXRlLAogICAgICAgICAgclNpdGUgPSByQXJjLnNpdGU7CgogICAgICBpZiAobFNpdGUgPT09IHJTaXRlKSByZXR1cm47CgogICAgICB2YXIgYnggPSBjU2l0ZVswXSwKICAgICAgICAgIGJ5ID0gY1NpdGVbMV0sCiAgICAgICAgICBheCA9IGxTaXRlWzBdIC0gYngsCiAgICAgICAgICBheSA9IGxTaXRlWzFdIC0gYnksCiAgICAgICAgICBjeCA9IHJTaXRlWzBdIC0gYngsCiAgICAgICAgICBjeSA9IHJTaXRlWzFdIC0gYnk7CgogICAgICB2YXIgZCA9IDIgKiAoYXggKiBjeSAtIGF5ICogY3gpOwogICAgICBpZiAoZCA+PSAtZXBzaWxvbjIkMikgcmV0dXJuOwoKICAgICAgdmFyIGhhID0gYXggKiBheCArIGF5ICogYXksCiAgICA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gICByQXJjID0gZGlzYXBwZWFyaW5nW2lBcmNdOwogICAgICAgIGxBcmMgPSBkaXNhcHBlYXJpbmdbaUFyYyAtIDFdOwogICAgICAgIHNldEVkZ2VFbmQockFyYy5lZGdlLCBsQXJjLnNpdGUsIHJBcmMuc2l0ZSwgdmVydGV4KTsKICAgICAgfQoKICAgICAgbEFyYyA9IGRpc2FwcGVhcmluZ1swXTsKICAgICAgckFyYyA9IGRpc2FwcGVhcmluZ1tuQXJjcyAtIDFdOwogICAgICByQXJjLmVkZ2UgPSBjcmVhdGVFZGdlKGxBcmMuc2l0ZSwgckFyYy5zaXRlLCBudWxsLCB2ZXJ0ZXgpOwoKICAgICAgYXR0YWNoQ2lyY2xlKGxBcmMpOwogICAgICBhdHRhY2hDaXJjbGUockFyYyk7CiAgICB9CgogICAgZnVuY3Rpb24gYWRkQmVhY2goc2l0ZSkgewogICAgICB2YXIgeCA9IHNpdGVbMF0sCiAgICAgICAgICBkaXJlY3RyaXggPSBzaXRlWzFdLAogICAgICAgICAgbEFyYywKICAgICAgICAgIHJBcmMsCiAgICAgICAgICBkeGwsCiAgICAgICAgICBkeHIsCiAgICAgICAgICBub2RlID0gYmVhY2hlcy5fOwoKICAgICAgd2hpbGUgKG5vZGUpIHsKICAgICAgICBkeGwgPSBsZWZ0QnJlYWtQb2ludChub2RlLCBkaXJlY3RyaXgpIC0geDsKICAgICAgICBpZiAoZHhsID4gZXBzaWxvbiQ0KSBub2RlID0gbm9kZS5MOyBlbHNlIHsKICAgICAgICAgIGR4ciA9IHggLSByaWdodEJyZWFrUG9pbnQobm9kZSwgZGlyZWN0cml4KTsKICAgICAgICAgIGlmIChkeHIgPiBlcHNpbG9uJDQpIHsKICAgICAgICAgICAgaWYgKCFub2RlLlIpIHsKICAgICAgICAgICAgICBsQXJjID0gbm9kZTsKICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQogICAgICAgICAgICBub2RlID0gbm9kZS5SOwogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgaWYgKGR4bCA+IC1lcHNpbG9uJDQpIHsKICAgICAgICAgICAgICBsQXJjID0gbm9kZS5QOwogICAgICAgICAgICAgIHJBcmMgPSBub2RlOwogICAgICAgICAgICB9IGVsc2UgaWYgKGR4ciA+IC1lcHNpbG9uJDQpIHsKICAgICAgICAgICAgICBsQXJjID0gbm9kZTsKICAgICAgICAgICAgICByQXJjID0gbm9kZS5OOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgIGxBcmMgPSByQXJjID0gbm9kZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBicmVhazsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KCiAgICAgIGNyZWF0ZUNlbGwoc2l0ZSk7CiAgICAgIHZhciBuZXdBcmMgPSBjcmVhdGVCZWFjaChzaXRlKTsKICAgICAgYmVhY2hlcy5pbnNlcnQobEFyYywgbmV3QXJjKTsKCiAgICAgIGlmICghbEFyYyAmJiAhckFyYykgcmV0dXJuOwoKICAgICAgaWYgKGxBcmMgPT09IHJBcmMpIHsKICAgICAgICBkZXRhY2hDaXJjbGUobEFyYyk7CiAgICAgICAgckFyYyA9IGNyZWF0ZUJlYWNoKGxBcmMuc2l0ZSk7CiAgICAgICAgYmVhY2hlcy5pbnNlcnQobmV3QXJjLCByQXJjKTsKICAgICAgICBuZXdBcmMuZWRnZSA9IHJBcmMuZWRnZSA9IGNyZWF0ZUVkZ2UobEFyYy5zaXRlLCBuZXdBcmMuc2l0ZSk7CiAgICAgICAgYXR0YWNoQ2lyY2xlKGxBcmMpOwogICAgICAgIGF0dGFjaENpcmNsZShyQXJjKTsKICAgICAgICByZXR1cm47CiAgICAgIH0KCiAgICAgIGlmICghckFyYykgeyAvLyAmJiBsQXJjCiAgICAgICAgbmV3QXJjLmVkZ2UgPSBjcmVhdGVFZGdlKGxBcmMuc2l0ZSwgbmV3QXJjLnNpdGUpOwogICAgICAgIHJldHVybjsKICAgICAgfQoKICAgICAgLy8gZWxzZSBs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5Z29uOwogICAgICAgIH0pOwogICAgICB9LAoKICAgICAgdHJpYW5nbGVzOiBmdW5jdGlvbigpIHsKICAgICAgICB2YXIgdHJpYW5nbGVzID0gW10sCiAgICAgICAgICAgIGVkZ2VzID0gdGhpcy5lZGdlczsKCiAgICAgICAgdGhpcy5jZWxscy5mb3JFYWNoKGZ1bmN0aW9uKGNlbGwsIGkpIHsKICAgICAgICAgIGlmICghKG0gPSAoaGFsZmVkZ2VzID0gY2VsbC5oYWxmZWRnZXMpLmxlbmd0aCkpIHJldHVybjsKICAgICAgICAgIHZhciBzaXRlID0gY2VsbC5zaXRlLAogICAgICAgICAgICAgIGhhbGZlZGdlcywKICAgICAgICAgICAgICBqID0gLTEsCiAgICAgICAgICAgICAgbSwKICAgICAgICAgICAgICBzMCwKICAgICAgICAgICAgICBlMSA9IGVkZ2VzW2hhbGZlZGdlc1ttIC0gMV1dLAogICAgICAgICAgICAgIHMxID0gZTEubGVmdCA9PT0gc2l0ZSA/IGUxLnJpZ2h0IDogZTEubGVmdDsKCiAgICAgICAgICB3aGlsZSAoKytqIDwgbSkgewogICAgICAgICAgICBzMCA9IHMxOwogICAgICAgICAgICBlMSA9IGVkZ2VzW2hhbGZlZGdlc1tqXV07CiAgICAgICAgICAgIHMxID0gZTEubGVmdCA9PT0gc2l0ZSA/IGUxLnJpZ2h0IDogZTEubGVmdDsKICAgICAgICAgICAgaWYgKHMwICYmIHMxICYmIGkgPCBzMC5pbmRleCAmJiBpIDwgczEuaW5kZXggJiYgdHJpYW5nbGVBcmVhKHNpdGUsIHMwLCBzMSkgPCAwKSB7CiAgICAgICAgICAgICAgdHJpYW5nbGVzLnB1c2goW3NpdGUuZGF0YSwgczAuZGF0YSwgczEuZGF0YV0pOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfSk7CgogICAgICAgIHJldHVybiB0cmlhbmdsZXM7CiAgICAgIH0sCgogICAgICBsaW5rczogZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dX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0sIGV4dGVudFsxXVsxXSAtIGV4dGVudFswXVsxXV07CiAgICAgIH07CgogICAgICByZXR1cm4gdm9yb25vaTsKICAgIH0KCiAgICBmdW5jdGlvbiBjb25zdGFudCRkKHgpIHsKICAgICAgcmV0dXJuIGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiB4OwogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIFpvb21FdmVudCh0YXJnZXQsIHR5cGUsIHRyYW5zZm9ybSkgewogICAgICB0aGlzLnRhcmdldCA9IHRhcmdldDsKICAgICAgdGhpcy50eXBlID0gdHlwZTsKICAgICAgdGhpcy50cmFuc2Zvcm0gPSB0cmFuc2Zvcm07CiAgICB9CgogICAgZnVuY3Rpb24gVHJhbnNmb3JtKGssIHgsIHkpIHsKICAgICAgdGhpcy5rID0gazsKICAgICAgdGhpcy54ID0geDsKICAgICAgdGhpcy55ID0geTsKICAgIH0KCiAgICBUcmFuc2Zvcm0ucHJvdG90eXBlID0gewogICAgICBjb25zdHJ1Y3RvcjogVHJhbnNmb3JtLAogICAgICBzY2FsZTogZnVuY3Rpb24oaykgewogICAgICAgIHJldHVybiBrID09PSAxID8gdGhpcyA6IG5ldyBUcmFuc2Zvcm0odGhpcy5rICogaywgdGhpcy54LCB0aGlzLnkpOwogICAgICB9LAogICAgICB0cmFuc2xhdGU6IGZ1bmN0aW9uKHgsIHkpIHsKICAgICAgICByZXR1cm4geCA9PT0gMCAmIHkgPT09IDAgPyB0aGlzIDogbmV3IFRyYW5zZm9ybSh0aGlzLmssIHRoaXMueCArIHRoaXMuayAqIHgsIHRoaXMueSArIHRoaXMuayAqIHkpOwogICAgICB9LAogICAgICBhcHBseTogZnVuY3Rpb24ocG9pbnQpIHsKICAgICAgICByZXR1cm4gW3BvaW50WzBdICogdGhpcy5rICsgdGhpcy54LCBwb2ludFsxXSAqIHRoaXMuayArIHRoaXMueV07CiAgICAgIH0sCiAgICAgIGFwcGx5WDogZnVuY3Rpb24oeCkgewogICAgICAg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GR4MSkgLyAyIDogTWF0aC5taW4oMCwgZHgwKSB8fCBNYXRoLm1heCgwLCBkeDEpLAogICAgICAgIGR5MSA+IGR5MCA/IChkeTAgKyBkeTEpIC8gMiA6IE1hdGgubWluKDAsIGR5MCkgfHwgTWF0aC5tYXgoMCwgZHkxKQogICAgICApOwogICAgfQoKICAgIGZ1bmN0aW9uIHpvb20oKSB7CiAgICAgIHZhciBmaWx0ZXIgPSBkZWZhdWx0RmlsdGVyJDIsCiAgICAgICAgICBleHRlbnQgPSBkZWZhdWx0RXh0ZW50JDEsCiAgICAgICAgICBjb25zdHJhaW4gPSBkZWZhdWx0Q29uc3RyYWluLAogICAgICAgICAgd2hlZWxEZWx0YSA9IGRlZmF1bHRXaGVlbERlbHRhLAogICAgICAgICAgdG91Y2hhYmxlID0gZGVmYXVsdFRvdWNoYWJsZSQyLAogICAgICAgICAgc2NhbGVFeHRlbnQgPSBbMCwgSW5maW5pdHldLAogICAgICAgICAgdHJhbnNsYXRlRXh0ZW50ID0gW1stSW5maW5pdHksIC1JbmZpbml0eV0sIFtJbmZpbml0eSwgSW5maW5pdHldXSwKICAgICAgICAgIGR1cmF0aW9uID0gMjUwLAogICAgICAgICAgaW50ZXJwb2xhdGUgPSBpbnRlcnBvbGF0ZVpvb20sCiAgICAgICAgICBsaXN0ZW5lcnMgPSBkaXNwYXRjaCgic3RhcnQiLCAiem9vbSIsICJlbmQiKSwKICAgICAgICAgIHRvdWNoc3RhcnRpbmcsCiAgICAgICAgICB0b3VjaGVuZGluZywKICAgICAgICAgIHRvdWNoRGVsYXkgPSA1MDAsCiAgICAgICAgICB3aGVlbERlbGF5ID0gMTUwLAogICAgICAgICAgY2xpY2tEaXN0YW5jZTIgPSAwOwoKICAgICAgZnVuY3Rpb24gem9vbShzZWxlY3Rpb24pIHsKICAgICAgICBzZWxlY3Rpb24KICAgICAgICAgICAgLnByb3BlcnR5KCJfX3pvb20iLCBkZWZhdWx0VHJhbnNmb3JtKQogICAgICAgICAgICAub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GFydCgpCiAgICAgICAgICAgICAgICAuem9vbShudWxsLCB0eXBlb2YgdHJhbnNmb3JtID09PSAiZnVuY3Rpb24iID8gdHJhbnNmb3JtLmFwcGx5KHRoaXMsIGFyZ3VtZW50cykgOiB0cmFuc2Zvcm0pCiAgICAgICAgICAgICAgICAuZW5kKCk7CiAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgIH07CgogICAgICB6b29tLnNjYWxlQnkgPSBmdW5jdGlvbihzZWxlY3Rpb24sIGssIHApIHsKICAgICAgICB6b29tLnNjYWxlVG8oc2VsZWN0aW9uLCBmdW5jdGlvbigpIHsKICAgICAgICAgIHZhciBrMCA9IHRoaXMuX196b29tLmssCiAgICAgICAgICAgICAgazEgPSB0eXBlb2YgayA9PT0gImZ1bmN0aW9uIiA/IGsuYXBwbHkodGhpcywgYXJndW1lbnRzKSA6IGs7CiAgICAgICAgICByZXR1cm4gazAgKiBrMTsKICAgICAgICB9LCBwKTsKICAgICAgfTsKCiAgICAgIHpvb20uc2NhbGVUbyA9IGZ1bmN0aW9uKHNlbGVjdGlvbiwgaywgcCkgewogICAgICAgIHpvb20udHJhbnNmb3JtKHNlbGVjdGlvbiwgZnVuY3Rpb24oKSB7CiAgICAgICAgICB2YXIgZSA9IGV4dGVudC5hcHBseSh0aGlzLCBhcmd1bWVudHMpLAogICAgICAgICAgICAgIHQwID0gdGhpcy5fX3pvb20sCiAgICAgICAgICAgICAgcDAgPSBwID09IG51bGwgPyBjZW50cm9pZChlKSA6IHR5cGVvZiBwID09PSAiZnVuY3Rpb24iID8gcC5hcHBseSh0aGlzLCBhcmd1bWVudHMpIDogcCwKICAgICAgICAgICAgICBwMSA9IHQwLmludmVydChwMCksCiAgICAgICAgICAgICAgazEgPSB0eXBlb2YgayA9PT0gImZ1bmN0aW9uIiA/IGsuYXBwbHkodGhpcywgYXJndW1lbnRzKSA6IGs7CiAgICAgICAgICByZXR1cm4gY29uc3RyYWluKHRyYW5zbGF0ZShzY2FsZSh0MCwgazE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ZXJyb3Igb24gZW5kLgogICAgICAgICAgICAgICAgZWxzZSB7IHZhciBsID0gaSh0KSwgayA9IHcgLyBsWzJdOyB0ID0gbmV3IFRyYW5zZm9ybShrLCBwWzBdIC0gbFswXSAqIGssIHBbMV0gLSBsWzFdICogayk7IH0KICAgICAgICAgICAgICAgIGcuem9vbShudWxsLCB0KTsKICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9KTsKICAgICAgfQoKICAgICAgZnVuY3Rpb24gZ2VzdHVyZSh0aGF0LCBhcmdzLCBjbGVhbikgewogICAgICAgIHJldHVybiAoIWNsZWFuICYmIHRoYXQuX196b29taW5nKSB8fCBuZXcgR2VzdHVyZSh0aGF0LCBhcmdzKTsKICAgICAgfQoKICAgICAgZnVuY3Rpb24gR2VzdHVyZSh0aGF0LCBhcmdzKSB7CiAgICAgICAgdGhpcy50aGF0ID0gdGhhdDsKICAgICAgICB0aGlzLmFyZ3MgPSBhcmdzOwogICAgICAgIHRoaXMuYWN0aXZlID0gMDsKICAgICAgICB0aGlzLmV4dGVudCA9IGV4dGVudC5hcHBseSh0aGF0LCBhcmdzKTsKICAgICAgICB0aGlzLnRhcHMgPSAwOwogICAgICB9CgogICAgICBHZXN0dXJlLnByb3RvdHlwZSA9IHsKICAgICAgICBzdGFydDogZnVuY3Rpb24oKSB7CiAgICAgICAgICBpZiAoKyt0aGlzLmFjdGl2ZSA9PT0gMSkgewogICAgICAgICAgICB0aGlzLnRoYXQuX196b29taW5nID0gdGhpczsKICAgICAgICAgICAgdGhpcy5lbWl0KCJzdGFydCIpOwogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfSwKICAgICAgICB6b29tOiBmdW5jdGlvbihrZXksIHRyYW5zZm9ybSkgewogICAgICAgICAgaWYgKHRoaXMubW91c2UgJiYga2V5ICE9PSAibW91c2UiKSB0aGlzLm1vdXNlWzFdID0gdHJhbnNmb3JtLmludmVydCh0aGlzLm1vdXNlWzBdKTsKICAgICAgICAgIGlmICh0aGlzLnRvdWNoMCAmJiBrZXkgIT09ICJ0b3VjaCIpIHRoaXMudG91Y2gwWzFdID0gdHJhbnNmb3JtLmludmVydCh0aGlzLnRvdWNoMFswXSk7CiAgICAgICAgICBpZiAodGhpcy50b3VjaDEgJiYga2V5ICE9PSAidG91Y2giKSB0aGlzLnRvdWNoMVsxXSA9IHRyYW5zZm9ybS5pbnZlcnQodGhpcy50b3VjaDFbMF0pOwogICAgICAgICAgdGhpcy50aGF0Ll9fem9vbSA9IHRyYW5zZm9ybTsKICAgICAgICAgIHRoaXMuZW1pdCgiem9vbSIpOwogICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfSwKICAgICAgICBlbmQ6IGZ1bmN0aW9uKCkgewogICAgICAgICAgaWYgKC0tdGhpcy5hY3RpdmUgPT09IDApIHsKICAgICAgICAgICAgZGVsZXRlIHRoaXMudGhhdC5fX3pvb21pbmc7CiAgICAgICAgICAgIHRoaXMuZW1pdCgiZW5kIik7CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9LAogICAgICAgIGVtaXQ6IGZ1bmN0aW9uKHR5cGUpIHsKICAgICAgICAgIGN1c3RvbUV2ZW50KG5ldyBab29tRXZlbnQoem9vbSwgdHlwZSwgdGhpcy50aGF0Ll9fem9vbSksIGxpc3RlbmVycy5hcHBseSwgbGlzdGVuZXJzLCBbdHlwZSwgdGhpcy50aGF0LCB0aGlzLmFyZ3NdKTsKICAgICAgICB9CiAgICAgIH07CgogICAgICBmdW5jdGlvbiB3aGVlbGVkKCkgewogICAgICAgIGlmICghZmlsdGVyLmFwcGx5KHRoaXMsIGFyZ3VtZW50cykpIHJldHVybjsKICAgICAgICB2YXIgZyA9IGdlc3R1cmUodGhpcywgYXJndW1lbnRzKSwKICAgICAgICAgICAgdCA9IHRoaXMuX196b29tLAogICAgICAgICAgICBrID0gTWF0aC5tYXgoc2NhbGVFeHRlbnRbMF0sIE1hdGgubWluKHNjYWxlR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3RyYWluKHRyYW5zbGF0ZShzY2FsZSh0LCBrKSwgZy5tb3VzZVswXSwgZy5tb3VzZVsxXSksIGcuZXh0ZW50LCB0cmFuc2xhdGVFeHRlbnQpKTsKCiAgICAgICAgZnVuY3Rpb24gd2hlZWxpZGxlZCgpIHsKICAgICAgICAgIGcud2hlZWwgPSBudWxsOwogICAgICAgICAgZy5lbmQoKTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIG1vdXNlZG93bmVkKCkgewogICAgICAgIGlmICh0b3VjaGVuZGluZyB8fCAhZmlsdGVyLmFwcGx5KHRoaXMsIGFyZ3VtZW50cykpIHJldHVybjsKICAgICAgICB2YXIgZyA9IGdlc3R1cmUodGhpcywgYXJndW1lbnRzLCB0cnVlKSwKICAgICAgICAgICAgdiA9IHNlbGVjdChldmVudC52aWV3KS5vbigibW91c2Vtb3ZlLnpvb20iLCBtb3VzZW1vdmVkLCB0cnVlKS5vbigibW91c2V1cC56b29tIiwgbW91c2V1cHBlZCwgdHJ1ZSksCiAgICAgICAgICAgIHAgPSBtb3VzZSh0aGlzKSwKICAgICAgICAgICAgeDAgPSBldmVudC5jbGllbnRYLAogICAgICAgICAgICB5MCA9IGV2ZW50LmNsaWVudFk7CgogICAgICAgIGRyYWdEaXNhYmxlKGV2ZW50LnZpZXcpOwogICAgICAgIG5vcHJvcGFnYXRpb24kMigpOwogICAgICAgIGcubW91c2UgPSBbcCwgdGhpcy5fX3pvb20uaW52ZXJ0KHApXTsKICAgICAgICBpbnRlcnJ1cHQodGhpcyk7CiAgICAgICAgZy5zdGFydCgpOwoKICAgICAgICBmdW5jdGlvbiBtb3VzZW1vdmVkKCkgewogICAgICAgICAgbm9ldmVudCQyKCk7CiAgICAgICAgICBpZiAoIWcubW92ZWQpIHsKICAgICAgICAgICAgdmFyIGR4ID0gZXZlbnQuY2xpZW50WCAtIHgwLCBkeSA9IGV2ZW50LmNsaWVudFkgLSB5MDsKICAgICAgICAgICAgZy5tb3ZlZCA9IGR4ICogZHggKyBkeSAqIGR5ID4gY2xpY2tEaXN0YW5jZTI7CiAgICAgICAgICB9CiAgICAgICAgICBnLnpvb20oIm1vdXNlIiwgY29uc3RyYWluKHRyYW5zbGF0ZShnLnRoYXQuX196b29tLCBnLm1vdXNlWzBdID0gbW91c2UoZy50aGF0KSwgZy5tb3VzZVsxXSksIGcuZXh0ZW50LCB0cmFuc2xhdGVFeHRlbnQpKTsKICAgICAgICB9CgogICAgICAgIGZ1bmN0aW9uIG1vdXNldXBwZWQoKSB7CiAgICAgICAgICB2Lm9uKCJtb3VzZW1vdmUuem9vbSBtb3VzZXVwLnpvb20iLCBudWxsKTsKICAgICAgICAgIHllc2RyYWcoZXZlbnQudmlldywgZy5tb3ZlZCk7CiAgICAgICAgICBub2V2ZW50JDIoKTsKICAgICAgICAgIGcuZW5kKCk7CiAgICAgICAgfQogICAgICB9CgogICAgICBmdW5jdGlvbiBkYmxjbGlja2VkKCkgewogICAgICAgIGlmICghZmlsdGVyLmFwcGx5KHRoaXMsIGFyZ3VtZW50cykpIHJldHVybjsKICAgICAgICB2YXIgdDAgPSB0aGlzLl9fem9vbSwKICAgICAgICAgICAgcDAgPSBtb3VzZSh0aGlzKSwKICAgICAgICAgICAgcDEgPSB0MC5pbnZlcnQocDApLAogICAgICAgICAgICBrMSA9IHQwLmsgKiAoZXZlbnQuc2hpZnRLZXkgPyAwLjUgOiAyKSwKICAgICAgICAgICAgdDEgPSBjb25zdHJhaW4odHJhbnNsYXRlKHNjYWxlKHQwLCBrMSksIHAwLCBwMSksIGV4dGVudC5hcHBseSh0aGlzLCBhcmd1bWVudHMpLCB0cmFuc2xhdGVFeHRlbnQpOwoKICAgICAgICBub2V2ZW50JDIoKTsKICAgICAgICBpZiAoZHVyYXRpb24gPiAwKSBzZWxlY3QodGhpcykudHJhbnNpdGlvbigpLmR1cmF0aW9uKGR1cmF0aW9uKS5jYWxsKHNjaGVkdWxlLCB0MSwgcDApOwogICAgICAgIGVsc2Ugc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5nID0gbnVsbDsgfSwgdG91Y2hEZWxheSk7CiAgICAgICAgICBpbnRlcnJ1cHQodGhpcyk7CiAgICAgICAgICBnLnN0YXJ0KCk7CiAgICAgICAgfQogICAgICB9CgogICAgICBmdW5jdGlvbiB0b3VjaG1vdmVkKCkgewogICAgICAgIGlmICghdGhpcy5fX3pvb21pbmcpIHJldHVybjsKICAgICAgICB2YXIgZyA9IGdlc3R1cmUodGhpcywgYXJndW1lbnRzKSwKICAgICAgICAgICAgdG91Y2hlcyA9IGV2ZW50LmNoYW5nZWRUb3VjaGVzLAogICAgICAgICAgICBuID0gdG91Y2hlcy5sZW5ndGgsIGksIHQsIHAsIGw7CgogICAgICAgIG5vZXZlbnQkMigpOwogICAgICAgIGlmICh0b3VjaHN0YXJ0aW5nKSB0b3VjaHN0YXJ0aW5nID0gY2xlYXJUaW1lb3V0KHRvdWNoc3RhcnRpbmcpOwogICAgICAgIGcudGFwcyA9IDA7CiAgICAgICAgZm9yIChpID0gMDsgaSA8IG47ICsraSkgewogICAgICAgICAgdCA9IHRvdWNoZXNbaV0sIHAgPSB0b3VjaCh0aGlzLCB0b3VjaGVzLCB0LmlkZW50aWZpZXIpOwogICAgICAgICAgaWYgKGcudG91Y2gwICYmIGcudG91Y2gwWzJdID09PSB0LmlkZW50aWZpZXIpIGcudG91Y2gwWzBdID0gcDsKICAgICAgICAgIGVsc2UgaWYgKGcudG91Y2gxICYmIGcudG91Y2gxWzJdID09PSB0LmlkZW50aWZpZXIpIGcudG91Y2gxWzBdID0gcDsKICAgICAgICB9CiAgICAgICAgdCA9IGcudGhhdC5fX3pvb207CiAgICAgICAgaWYgKGcudG91Y2gxKSB7CiAgICAgICAgICB2YXIgcDAgPSBnLnRvdWNoMFswXSwgbDAgPSBnLnRvdWNoMFsxXSwKICAgICAgICAgICAgICBwMSA9IGcudG91Y2gxWzBdLCBsMSA9IGcudG91Y2gxWzFdLAogICAgICAgICAgICAgIGRwID0gKGRwID0gcDFbMF0gLSBwMFswXSkgKiBkcCArIChkcCA9IHAxWzFdIC0gcDBbMV0pICogZHAsCiAgICAgICAgICAgICAgZGwgPSAoZGwgPSBsMVswXSAtIGwwWzBdKSAqIGRsICsgKGRsID0gbDFbMV0gLSBsMFsxXSkgKiBkbDsKICAgICAgICAgIHQgPSBzY2FsZSh0LCBNYXRoLnNxcnQoZHAgLyBkbCkpOwogICAgICAgICAgcCA9IFsocDBbMF0gKyBwMVswXSkgLyAyLCAocDBbMV0gKyBwMVsxXSkgLyAyXTsKICAgICAgICAgIGwgPSBbKGwwWzBdICsgbDFbMF0pIC8gMiwgKGwwWzFdICsgbDFbMV0pIC8gMl07CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYgKGcudG91Y2gwKSBwID0gZy50b3VjaDBbMF0sIGwgPSBnLnRvdWNoMFsxXTsKICAgICAgICBlbHNlIHJldHVybjsKICAgICAgICBnLnpvb20oInRvdWNoIiwgY29uc3RyYWluKHRyYW5zbGF0ZSh0LCBwLCBsKSwgZy5leHRlbnQsIHRyYW5zbGF0ZUV4dGVudCkpOwogICAgICB9CgogICAgICBmdW5jdGlvbiB0b3VjaGVuZGVkKCkgewogICAgICAgIGlmICghdGhpcy5fX3pvb21pbmcpIHJldHVybjsKICAgICAgICB2YXIgZyA9IGdlc3R1cmUodGhpcywgYXJndW1lbnRzKSwKICAgICAgICAgICAgdG91Y2hlcyA9IGV2ZW50LmNoYW5nZWRUb3VjaGVzLAogICAgICAgICAgICBuID0gdG91Y2hlcy5sZW5ndGgsIGksIHQ7CgogICAgICAgIG5vcHJvcGFnYXRpb24kMigpOwogICAgICAgIGlmICh0b3VjaGVuZGluZykgY2xlYXJUaW1lb3V0KHRvdWNoZW5kaW5nKTsKICAgICAgICB0b3VjaGVuZGluZyA9IHNldFRpbWVvdXQoZnVuY3Rpb24oKSB7IHRvdWNoZW5kaW5nID0gbnVsbDsgfSwgdG91Y2hEZWxheSk7CiAgICAgICAgZm9yIChpID0gMDsgaSA8IG47ICsraSkgewogICAgICAgICAgdCA9IHRvdWNoZXNbaV07CiAgICAgICAgICBpZiAoZy50b3VjaDAgJiYgZy50b3VjaDBbMl0gPT09IHQuaWRlbnRpZmllcikgZGVsZXRlIGcudG91Y2gwOwogICAgICAgICAgZWxzZSBpZiAoZy50b3VjaDEgJiYgZy50b3VjaDFbMl0gPT09IHQuaWRlbnRpZmllcikgZGVsZXRlIGcudG91Y2gxOwogICAgICAgIH0KICAgICAgICBpZiAoZy50b3VjaDEgJiYgIWcudG91Y2gwKSBnLnRvdWNoMCA9IGcudG91Y2gxLCBkZWxldGUgZy50b3VjaDE7CiAgICAgICAgaWYgKGcudG91Y2gwKSBnLnRvdWNoMFsxXSA9IHRoaXMuX196b29tLmludmVydChnLnRvdWNoMFswXSk7CiAgICAgICAgZWxzZSB7CiAgICAgICAgICBnLmVuZCgpOwogICAgICAgICAgLy8gSWYgdGhpcyB3YXMgYSBkYmx0YXAsIHJlcm91dGUgdG8gdGhlIChvcHRpb25hbCkgZGJsY2xpY2suem9vbSBoYW5kbGVyLgogICAgICAgICAgaWYgKGcudGFwcyA9PT0gMikgewogICAgICAgICAgICB2YXIgcCA9IHNlbGVjdCh0aGlzKS5vbigiZGJsY2xpY2suem9vbSIpOwogICAgICAgICAgICBpZiAocCkgcC5hcHBseSh0aGlzLCBhcmd1bWVudHMpOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQoKICAgICAgem9vbS53aGVlbERlbHRhID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHdoZWVsRGVsdGEgPSB0eXBlb2YgXyA9PT0gImZ1bmN0aW9uIiA/IF8gOiBjb25zdGFudCRkKCtfKSwgem9vbSkgOiB3aGVlbERlbHRhOwogICAgICB9OwoKICAgICAgem9vbS5maWx0ZXIgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoZmlsdGVyID0gdHlwZW9mIF8gPT09ICJmdW5jd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B2ZXJzaW9uOiB2ZXJzaW9uJDEsCiAgICAgICAgYmlzZWN0OiBiaXNlY3RSaWdodCwKICAgICAgICBiaXNlY3RSaWdodDogYmlzZWN0UmlnaHQsCiAgICAgICAgYmlzZWN0TGVmdDogYmlzZWN0TGVmdCwKICAgICAgICBhc2NlbmRpbmc6IGFzY2VuZGluZywKICAgICAgICBiaXNlY3RvcjogYmlzZWN0b3IsCiAgICAgICAgY3Jvc3M6IGNyb3NzLAogICAgICAgIGRlc2NlbmRpbmc6IGRlc2NlbmRpbmcsCiAgICAgICAgZGV2aWF0aW9uOiBkZXZpYXRpb24sCiAgICAgICAgZXh0ZW50OiBleHRlbnQsCiAgICAgICAgaGlzdG9ncmFtOiBoaXN0b2dyYW0sCiAgICAgICAgdGhyZXNob2xkRnJlZWRtYW5EaWFjb25pczogZnJlZWRtYW5EaWFjb25pcywKICAgICAgICB0aHJlc2hvbGRTY290dDogc2NvdHQsCiAgICAgICAgdGhyZXNob2xkU3R1cmdlczogdGhyZXNob2xkU3R1cmdlcywKICAgICAgICBtYXg6IG1heCwKICAgICAgICBtZWFuOiBtZWFuLAogICAgICAgIG1lZGlhbjogbWVkaWFuLAogICAgICAgIG1lcmdlOiBtZXJnZSwKICAgICAgICBtaW46IG1pbiwKICAgICAgICBwYWlyczogcGFpcnMsCiAgICAgICAgcGVybXV0ZTogcGVybXV0ZSwKICAgICAgICBxdWFudGlsZTogdGhyZXNob2xkLAogICAgICAgIHJhbmdlOiBzZXF1ZW5jZSwKICAgICAgICBzY2FuOiBzY2FuLAogICAgICAgIHNodWZmbGU6IHNodWZmbGUsCiAgICAgICAgc3VtOiBzdW0sCiAgICAgICAgdGlja3M6IHRpY2tzLAogICAgICAgIHRpY2tJbmNyZW1lbnQ6IHRpY2tJbmNyZW1lbnQsCiAgICAgICAgdGlja1N0ZXA6IHRpY2tTdGVwLAogICAgICAgIHRyYW5zcG9zZTogdHJhbnNwb3NlLAogICAgICAgIHZhcmlhbmNlOiB2YXJpYW5jZSwKICAgICAgICB6aXA6IHppcCwKICAgICAgICBheGlzVG9wOiBheGlzVG9wLAogICAgICAgIGF4aXNSaWdodDogYXhpc1JpZ2h0LAogICAgICAgIGF4aXNCb3R0b206IGF4aXNCb3R0b20sCiAgICAgICAgYXhpc0xlZnQ6IGF4aXNMZWZ0LAogICAgICAgIGJydXNoOiBicnVzaCwKICAgICAgICBicnVzaFg6IGJydXNoWCwKICAgICAgICBicnVzaFk6IGJydXNoWSwKICAgICAgICBicnVzaFNlbGVjdGlvbjogYnJ1c2hTZWxlY3Rpb24sCiAgICAgICAgY2hvcmQ6IGNob3JkLAogICAgICAgIHJpYmJvbjogcmliYm9uLAogICAgICAgIG5lc3Q6IG5lc3QsCiAgICAgICAgc2V0OiBzZXQkMywKICAgICAgICBtYXA6IG1hcCQxLAogICAgICAgIGtleXM6IGtleXMsCiAgICAgICAgdmFsdWVzOiB2YWx1ZXMsCiAgICAgICAgZW50cmllczogZW50cmllcywKICAgICAgICBjb2xvcjogY29sb3IsCiAgICAgICAgcmdiOiByZ2IsCiAgICAgICAgaHNsOiBoc2wsCiAgICAgICAgbGFiOiBsYWIsCiAgICAgICAgaGNsOiBoY2wsCiAgICAgICAgbGNoOiBsY2gsCiAgICAgICAgZ3JheTogZ3JheSwKICAgICAgICBjdWJlaGVsaXg6IGN1YmVoZWxpeCwKICAgICAgICBjb250b3VyczogY29udG91cnMsCiAgICAgICAgY29udG91ckRlbnNpdHk6IGRlbnNpdHksCiAgICAgICAgZGlzcGF0Y2g6IGRpc3BhdGNoLAogICAgICAgIGRyYWc6IGRyYWcsCiAgICAgICAgZHJhZ0Rpc2FibGU6IGRyYWdEaXNhYmxlLAogICAgICAgIGRyYWdFbmFibGU6IHllc2RyYWcsCiAgICAgICAgZHN2Rm9ybWF0OiBkc3ZGb3JtYXQsCiAgICAgICAgY3N2UGFyc2U6IGNzdlBhcnNlLAogICAgICAgIGNzdlBhcnNlUm93czogY3N2UGFyc2VSb3dzLAogICAgICAgIGNzd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PdXQsCiAgICAgICAgZWFzZVNpbjogc2luSW5PdXQsCiAgICAgICAgZWFzZVNpbkluOiBzaW5JbiwKICAgICAgICBlYXNlU2luT3V0OiBzaW5PdXQsCiAgICAgICAgZWFzZVNpbkluT3V0OiBzaW5Jbk91dCwKICAgICAgICBlYXNlRXhwOiBleHBJbk91dCwKICAgICAgICBlYXNlRXhwSW46IGV4cEluLAogICAgICAgIGVhc2VFeHBPdXQ6IGV4cE91dCwKICAgICAgICBlYXNlRXhwSW5PdXQ6IGV4cEluT3V0LAogICAgICAgIGVhc2VDaXJjbGU6IGNpcmNsZUluT3V0LAogICAgICAgIGVhc2VDaXJjbGVJbjogY2lyY2xlSW4sCiAgICAgICAgZWFzZUNpcmNsZU91dDogY2lyY2xlT3V0LAogICAgICAgIGVhc2VDaXJjbGVJbk91dDogY2lyY2xlSW5PdXQsCiAgICAgICAgZWFzZUJvdW5jZTogYm91bmNlT3V0LAogICAgICAgIGVhc2VCb3VuY2VJbjogYm91bmNlSW4sCiAgICAgICAgZWFzZUJvdW5jZU91dDogYm91bmNlT3V0LAogICAgICAgIGVhc2VCb3VuY2VJbk91dDogYm91bmNlSW5PdXQsCiAgICAgICAgZWFzZUJhY2s6IGJhY2tJbk91dCwKICAgICAgICBlYXNlQmFja0luOiBiYWNrSW4sCiAgICAgICAgZWFzZUJhY2tPdXQ6IGJhY2tPdXQsCiAgICAgICAgZWFzZUJhY2tJbk91dDogYmFja0luT3V0LAogICAgICAgIGVhc2VFbGFzdGljOiBlbGFzdGljT3V0LAogICAgICAgIGVhc2VFbGFzdGljSW46IGVsYXN0aWNJbiwKICAgICAgICBlYXNlRWxhc3RpY091dDogZWxhc3RpY091dCwKICAgICAgICBlYXNlRWxhc3RpY0luT3V0OiBlbGFzdGljSW5PdXQsCiAgICAgICAgYmxvYjogYmxvYiwKICAgICAgICBidWZmZXI6IGJ1ZmZlciwKICAgICAgICBkc3Y6IGRzdiwKICAgICAgICBjc3Y6IGNzdiQxLAogICAgICAgIHRzdjogdHN2JDEsCiAgICAgICAgaW1hZ2U6IGltYWdlLAogICAgICAgIGpzb246IGpzb24sCiAgICAgICAgdGV4dDogdGV4dCwKICAgICAgICB4bWw6IHhtbCwKICAgICAgICBodG1sOiBodG1sJDEsCiAgICAgICAgc3ZnOiBzdmcsCiAgICAgICAgZm9yY2VDZW50ZXI6IGNlbnRlciQxLAogICAgICAgIGZvcmNlQ29sbGlkZTogY29sbGlkZSwKICAgICAgICBmb3JjZUxpbms6IGxpbmssCiAgICAgICAgZm9yY2VNYW55Qm9keTogbWFueUJvZHksCiAgICAgICAgZm9yY2VSYWRpYWw6IHJhZGlhbCwKICAgICAgICBmb3JjZVNpbXVsYXRpb246IHNpbXVsYXRpb24sCiAgICAgICAgZm9yY2VYOiB4JDIsCiAgICAgICAgZm9yY2VZOiB5JDIsCiAgICAgICAgZm9ybWF0RGVmYXVsdExvY2FsZTogZGVmYXVsdExvY2FsZSwKICAgICAgICBnZXQgZm9ybWF0ICgpIHsgcmV0dXJuIGZvcm1hdDsgfSwKICAgICAgICBnZXQgZm9ybWF0UHJlZml4ICgpIHsgcmV0dXJuIGZvcm1hdFByZWZpeDsgfSwKICAgICAgICBmb3JtYXRMb2NhbGU6IGZvcm1hdExvY2FsZSwKICAgICAgICBmb3JtYXRTcGVjaWZpZXI6IGZvcm1hdFNwZWNpZmllciwKICAgICAgICBGb3JtYXRTcGVjaWZpZXI6IEZvcm1hdFNwZWNpZmllciwKICAgICAgICBwcmVjaXNpb25GaXhlZDogcHJlY2lzaW9uRml4ZWQsCiAgICAgICAgcHJlY2lzaW9uUHJlZml4OiBwcmVjaXNpb25QcmVmaXgsCiAgICAgICAgcHJlY2lzaW9uUm91bmQ6IHByZWNpc2lvblJvdW5kLAogICAgICAgIGdlb0FyZWE6IGFyZWEkMSwKICAgICAgICBnZW9Cb3VuZHM6IGJvdW5kcywKICAgICAgICBnZW9DZW50cm9pZDogY2VudHJvaWQsCiAgICAgICAgZ2VvQ2lyY2xlOiBja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ICAgICAgICBwaWVjZXdpc2U6IHBpZWNld2lzZSwKICAgICAgICBxdWFudGl6ZTogcXVhbnRpemUsCiAgICAgICAgcGF0aDogcGF0aCwKICAgICAgICBwb2x5Z29uQXJlYTogYXJlYSQyLAogICAgICAgIHBvbHlnb25DZW50cm9pZDogY2VudHJvaWQkMSwKICAgICAgICBwb2x5Z29uSHVsbDogaHVsbCwKICAgICAgICBwb2x5Z29uQ29udGFpbnM6IGNvbnRhaW5zJDIsCiAgICAgICAgcG9seWdvbkxlbmd0aDogbGVuZ3RoJDIsCiAgICAgICAgcXVhZHRyZWU6IHF1YWR0cmVlLAogICAgICAgIHJhbmRvbVVuaWZvcm06IHVuaWZvcm0sCiAgICAgICAgcmFuZG9tTm9ybWFsOiBub3JtYWwsCiAgICAgICAgcmFuZG9tTG9nTm9ybWFsOiBsb2dOb3JtYWwsCiAgICAgICAgcmFuZG9tQmF0ZXM6IGJhdGVzLAogICAgICAgIHJhbmRvbUlyd2luSGFsbDogaXJ3aW5IYWxsLAogICAgICAgIHJhbmRvbUV4cG9uZW50aWFsOiBleHBvbmVudGlhbCQxLAogICAgICAgIHNjYWxlQmFuZDogYmFuZCwKICAgICAgICBzY2FsZVBvaW50OiBwb2ludCQxLAogICAgICAgIHNjYWxlSWRlbnRpdHk6IGlkZW50aXR5JDcsCiAgICAgICAgc2NhbGVMaW5lYXI6IGxpbmVhciQyLAogICAgICAgIHNjYWxlTG9nOiBsb2ckMSwKICAgICAgICBzY2FsZVN5bWxvZzogc3ltbG9nLAogICAgICAgIHNjYWxlT3JkaW5hbDogb3JkaW5hbCwKICAgICAgICBzY2FsZUltcGxpY2l0OiBpbXBsaWNpdCwKICAgICAgICBzY2FsZVBvdzogcG93JDEsCiAgICAgICAgc2NhbGVTcXJ0OiBzcXJ0JDEsCiAgICAgICAgc2NhbGVRdWFudGlsZTogcXVhbnRpbGUsCiAgICAgICAgc2NhbGVRdWFudGl6ZTogcXVhbnRpemUkMSwKICAgICAgICBzY2FsZVR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ICAgICAgICBzY2hlbWVTZXQzOiBTZXQzLAogICAgICAgIHNjaGVtZVRhYmxlYXUxMDogVGFibGVhdTEwLAogICAgICAgIGludGVycG9sYXRlQnJCRzogQnJCRywKICAgICAgICBzY2hlbWVCckJHOiBzY2hlbWUsCiAgICAgICAgaW50ZXJwb2xhdGVQUkduOiBQUkduLAogICAgICAgIHNjaGVtZVBSR246IHNjaGVtZSQxLAogICAgICAgIGludGVycG9sYXRlUGlZRzogUGlZRywKICAgICAgICBzY2hlbWVQaVlHOiBzY2hlbWUkMiwKICAgICAgICBpbnRlcnBvbGF0ZVB1T3I6IFB1T3IsCiAgICAgICAgc2NoZW1lUHVPcjogc2NoZW1lJDMsCiAgICAgICAgaW50ZXJwb2xhdGVSZEJ1OiBSZEJ1LAogICAgICAgIHNjaGVtZVJkQnU6IHNjaGVtZSQ0LAogICAgICAgIGludGVycG9sYXRlUmRHeTogUmRHeSwKICAgICAgICBzY2hlbWVSZEd5OiBzY2hlbWUkNSwKICAgICAgICBpbnRlcnBvbGF0ZVJkWWxCdTogUmRZbEJ1LAogICAgICAgIHNjaGVtZVJkWWxCdTogc2NoZW1lJDYsCiAgICAgICAgaW50ZXJwb2xhdGVSZFlsR246IFJkWWxHbiwKICAgICAgICBzY2hlbWVSZFlsR246IHNjaGVtZSQ3LAogICAgICAgIGludGVycG9sYXRlU3BlY3RyYWw6IFNwZWN0cmFsLAogICAgICAgIHNjaGVtZVNwZWN0cmFsOiBzY2hlbWUkOCwKICAgICAgICBpbnRlcnBvbGF0ZUJ1R246IEJ1R24sCiAgICAgICAgc2NoZW1lQnVHbjogc2NoZW1lJDksCiAgICAgICAgaW50ZXJwb2xhdGVCdVB1OiBCdVB1LAogICAgICAgIHNjaGVtZUJ1UHU6IHNjaGVtZSRhLAogICAgICAgIGludGVycG9sYXRlR25CdTogR25CdSwKICAgICAgICBzY2hlbWVHbkJ1OiBzY2hlbWUkYiwKICAgICAgICBpbnRlcnBvbGF0ZU9yUmQ6IE9yUmQ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ogICAgICAgIHNjaGVtZVJlZHM6IHNjaGVtZSRwLAogICAgICAgIGludGVycG9sYXRlT3JhbmdlczogT3JhbmdlcywKICAgICAgICBzY2hlbWVPcmFuZ2VzOiBzY2hlbWUkcSwKICAgICAgICBpbnRlcnBvbGF0ZUNpdmlkaXM6IGNpdmlkaXMsCiAgICAgICAgaW50ZXJwb2xhdGVDdWJlaGVsaXhEZWZhdWx0OiBjdWJlaGVsaXgkMywKICAgICAgICBpbnRlcnBvbGF0ZVJhaW5ib3c6IHJhaW5ib3csCiAgICAgICAgaW50ZXJwb2xhdGVXYXJtOiB3YXJtLAogICAgICAgIGludGVycG9sYXRlQ29vbDogY29vbCwKICAgICAgICBpbnRlcnBvbGF0ZVNpbmVib3c6IHNpbmVib3csCiAgICAgICAgaW50ZXJwb2xhdGVUdXJibzogdHVyYm8sCiAgICAgICAgaW50ZXJwb2xhdGVWaXJpZGlzOiB2aXJpZGlzLAogICAgICAgIGludGVycG9sYXRlTWFnbWE6IG1hZ21hLAogICAgICAgIGludGVycG9sYXRlSW5mZXJubzogaW5mZXJubywKICAgICAgICBpbnRlcnBvbGF0ZVBsYXNtYTogcGxhc21hLAogICAgICAgIGNyZWF0ZTogY3JlYXRlLAogICAgICAgIGNyZWF0b3I6IGNyZWF0b3IsCiAgICAgICAgbG9jYWw6IGxvY2FsLAogICAgICAgIG1hdGNoZXI6IG1hdGNoZXIsCiAgICAgICAgbW91c2U6IG1vdXNlLAogICAgICAgIG5hbWVzcGFjZTogbmFtZXNwYWNlLAogICAgICAgIG5hbWVzcGFjZXM6IG5hbWVzcGFjZXMsCiAgICAgICAgY2xpZW50UG9pbnQ6IHBvaW50LAogICAgICAgIHNlbGVjdDogc2VsZWN0LAogICAgICAgIHNlbGVjdEFsbDogc2VsZWN0QWxsLAogICAgICAgIHNlbGVjdGlvbjogc2VsZWN0aW9uLAogICAgICAgIHNlbGVjdG9yOiBzZWxlY3RvciwKICAgICAgICBzZWxlY3RvckFsbDogc2VsZWN0b3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ICAgc3RhY2tPcmRlckFwcGVhcmFuY2U6IGFwcGVhcmFuY2UsCiAgICAgICAgc3RhY2tPcmRlckFzY2VuZGluZzogYXNjZW5kaW5nJDMsCiAgICAgICAgc3RhY2tPcmRlckRlc2NlbmRpbmc6IGRlc2NlbmRpbmckMiwKICAgICAgICBzdGFja09yZGVySW5zaWRlT3V0OiBpbnNpZGVPdXQsCiAgICAgICAgc3RhY2tPcmRlck5vbmU6IG5vbmUkMiwKICAgICAgICBzdGFja09yZGVyUmV2ZXJzZTogcmV2ZXJzZSwKICAgICAgICB0aW1lSW50ZXJ2YWw6IG5ld0ludGVydmFsLAogICAgICAgIHRpbWVNaWxsaXNlY29uZDogbWlsbGlzZWNvbmQsCiAgICAgICAgdGltZU1pbGxpc2Vjb25kczogbWlsbGlzZWNvbmRzLAogICAgICAgIHV0Y01pbGxpc2Vjb25kOiBtaWxsaXNlY29uZCwKICAgICAgICB1dGNNaWxsaXNlY29uZHM6IG1pbGxpc2Vjb25kcywKICAgICAgICB0aW1lU2Vjb25kOiBzZWNvbmQsCiAgICAgICAgdGltZVNlY29uZHM6IHNlY29uZHMsCiAgICAgICAgdXRjU2Vjb25kOiBzZWNvbmQsCiAgICAgICAgdXRjU2Vjb25kczogc2Vjb25kcywKICAgICAgICB0aW1lTWludXRlOiBtaW51dGUsCiAgICAgICAgdGltZU1pbnV0ZXM6IG1pbnV0ZXMsCiAgICAgICAgdGltZUhvdXI6IGhvdXIsCiAgICAgICAgdGltZUhvdXJzOiBob3VycywKICAgICAgICB0aW1lRGF5OiBkYXksCiAgICAgICAgdGltZURheXM6IGRheXMsCiAgICAgICAgdGltZVdlZWs6IHN1bmRheSwKICAgICAgICB0aW1lV2Vla3M6IHN1bmRheXMsCiAgICAgICAgdGltZVN1bmRheTogc3VuZGF5LAogICAgICAgIHRpbWVTdW5kYXlzOiBzdW5kYXlzLAogICAgICAgIHRpbWVNb25kYXk6IG1vbmRheSwKICAgICAgICB0aW1lTW9uZGF5czogbW9uZGF5cywKICAgICAgICB0aW1lVHVlc2RheTogdHVlc2RheSwKICAgICAgICB0aW1lVHVlc2RheXM6IHR1ZXNkYXlzLAogICAgICAgIHRpbWVXZWRuZXNkYXk6IHdlZG5lc2RheSwKICAgICAgICB0aW1lV2VkbmVzZGF5czogd2VkbmVzZGF5cywKICAgICAgICB0aW1lVGh1cnNkYXk6IHRodXJzZGF5LAogICAgICAgIHRpbWVUaHVyc2RheXM6IHRodXJzZGF5cywKICAgICAgICB0aW1lRnJpZGF5OiBmcmlkYXksCiAgICAgICAgdGltZUZyaWRheXM6IGZyaWRheXMsCiAgICAgICAgdGltZVNhdHVyZGF5OiBzYXR1cmRheSwKICAgICAgICB0aW1lU2F0dXJkYXlzOiBzYXR1cmRheXMsCiAgICAgICAgdGltZU1vbnRoOiBtb250aCwKICAgICAgICB0aW1lTW9udGhzOiBtb250aHMsCiAgICAgICAgdGltZVllYXI6IHllYXIsCiAgICAgICAgdGltZVllYXJzOiB5ZWFycywKICAgICAgICB1dGNNaW51dGU6IHV0Y01pbnV0ZSwKICAgICAgICB1dGNNaW51dGVzOiB1dGNNaW51dGVzLAogICAgICAgIHV0Y0hvdXI6IHV0Y0hvdXIsCiAgICAgICAgdXRjSG91cnM6IHV0Y0hvdXJzLAogICAgICAgIHV0Y0RheTogdXRjRGF5LAogICAgICAgIHV0Y0RheXM6IHV0Y0RheXMsCiAgICAgICAgdXRjV2VlazogdXRjU3VuZGF5LAogICAgICAgIHV0Y1dlZWtzOiB1dGNTdW5kYXlzLAogICAgICAgIHV0Y1N1bmRheTogdXRjU3VuZGF5LAogICAgICAgIHV0Y1N1bmRheXM6IHV0Y1N1bmRheXMsCiAgICAgICAgdXRjTW9uZGF5OiB1dGNNb25kYXksCiAgICAgICAgdXRjTW9uZGF5czogdXRjTW9uZGF5cywKICAgICAgICB1dGNUdWVzZGF5OiB1dGNUdWVzZGF5LAogICAgICAgIHV0Y1R1ZXNkYXlzOiB1dGNUdWVzZGF5cywKICAgICAgICB1dGNXZWRuZXNkYXk6IHV0Y1dlZG5lc2RheSwKICAgICAgICB1dGNXZWRuZXNkYXlzOiB1dGNXZWRuZXNkYXlzLAogICAgICAgIHV0Y1RodXJzZGF5OiB1dGNUaHVyc2RheSwKICAgICAgICB1dGNUaHVyc2RheXM6IHV0Y1RodXJzZGF5cywKICAgICAgICB1dGNGcmlkYXk6IHV0Y0ZyaWRheSwKICAgICAgICB1dGNGcmlkYXlzOiB1dGNGcmlkYXlzLAogICAgICAgIHV0Y1NhdHVyZGF5OiB1dGNTYXR1cmRheSwKICAgICAgICB1dGNTYXR1cmRheXM6IHV0Y1NhdHVyZGF5cywKICAgICAgICB1dGNNb250aDogdXRjTW9udGgsCiAgICAgICAgdXRjTW9udGhzOiB1dGNNb250aHMsCiAgICAgICAgdXRjWWVhcjogdXRjWWVhciwKICAgICAgICB1dGNZZWFyczogdXRjWWVhcnMsCiAgICAgICAgdGltZUZvcm1hdERlZmF1bHRMb2NhbGU6IGRlZmF1bHRMb2NhbGUkMSwKICAgICAgICBnZXQgdGltZUZvcm1hdCAoKSB7IHJldHVybiB0aW1lRm9ybWF0OyB9LAogICAgICAgIGdldCB0aW1lUGFyc2UgKCkgeyByZXR1cm4gdGltZVBhcnNlOyB9LAogICAgICAgIGdldCB1dGNGb3JtYXQgKCkgeyByZXR1cm4gdXRjRm9ybWF0OyB9LAogICAgICAgIGdldCB1dGNQYXJzZSAoKSB7IHJldHVybiB1dGNQYXJzZTsgfSwKICAgICAgICB0aW1lRm9ybWF0TG9jYWxlOiBmb3JtYXRMb2NhbGUkMSwKICAgICAgICBpc29Gb3JtYXQ6IGZvcm1hdElzbywKICAgICAgICBpc29QYXJzZTogcGFyc2VJc28sCiAgICAgICAgbm93OiBub3csCiAgICAgICAgdGltZXI6IHRpbWVyLAogICAgICAgIHRpbWVyRmx1c2g6IHRpbWVyRmx1c2gsCiAgICAgICAgdGltZW91dDogdGltZW91dCQxLAogICAgICAgIGludGVydmFsOiBpbnRlcnZhbCQxLAog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mRlciB0aGUgTGljZW5zZS4KICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCiAgICBjb25zdCBwYWxldHRlcyA9IHsKICAgICAgICBnb29nbGVTdGFuZGFyZDogWwogICAgICAgICAgICAnI2RiNDQzNycsCiAgICAgICAgICAgICcjZmY3MDQzJywKICAgICAgICAgICAgJyNmNGI0MDAnLAogICAgICAgICAgICAnIzBmOWQ1OCcsCiAgICAgICAgICAgICcjMDA3OTZiJywKICAgICAgICAgICAgJyMwMGFjYzEnLAogICAgICAgICAgICAnIzQyODVmNCcsCiAgICAgICAgICAgICcjNWM2YmMwJywKICAgICAgICAgICAgJyNhYjQ3YmMnLAogICAgICAgIF0sCiAgICAgICAgZ29vZ2xlQ29vbDogWwogICAgICAgICAgICAnIzllOWQyNCcsCiAgICAgICAgICAgICcjMGY5ZDU4JywKICAgICAgICAgICAgJyMwMDc5NmInLAogICAgICAgICAgICAnIzAwYWNjMScsCiAgICAgICAgICAgICcjNDI4NWY0JywKICAgICAgICAgICAgJyM1YzZiYzAnLAogICAgICAgICAgICAnIzYwN2Q4YicsCiAgICAgICAgXSwKICAgICAgICBnb29nbGVXYXJtOiBbCiAgICAgICAgICAgICcjNzk1NTQ4JywKICAgICAgICAgICAgJyNhYjQ3YmMnLAogICAgICAgICAgICAnI2YwNjI5MicsCiAgICAgICAgICAgICcjYzIxODViJywKICAgICAgICAgICAgJyNkYjQ0MzcnLAogICAgICAgICAgICAnI2ZmNzA0MycsCiAgICAgICAgICAgICcjZjRiNDAwJywKICAgICAgICBdLAogICAgICAgIGdvb2dsZUNvbG9yQmxpbmRBc3Npc3Q6IFsKICAgICAgICAgICAgJyNmZjcwNDMnLAogICAgICAgICAgICAnIzAwQUNDMScsCiAgICAgICAgICAgICcjQUI0N0JDJywKICAgICAgICAgICAgJyMyQTU2QzYnLAogICAgICAgICAgICAnIzBiODA0MycsCiAgICAgICAgICAgICcjRjdDQjREJywKICAgICAgICAgICAgJyNjMGNhMzMnLAogICAgICAgICAgICAnIzVlMzViMScsCiAgICAgICAgICAgICcjQTUyNzE0JywKICAgICAgICBdLAogICAgICAgIC8vIEEgY29sb3JibGluZC1mcmllbmRseSBwYWxldHRlIGRlc2lnbmVkIGZvciBUZW5zb3JCb2FyZCBieSBQYXVsIFRvbAogICAgICAgIC8vIChodHRwczovL3BlcnNvbmFsLnNyb24ubmwvfnBhdWx0LykuCiAgICAgICAgdGVuc29yYm9hcmRDb2xvckJsaW5kQXNzaXN0OiBbCiAgICAgICAgICAgICcjZmY3MDQzJywKICAgICAgICAgICAgJyMwMDc3YmInLAogICAgICAgICAgICAnI2NjMzMxMScsCiAgICAgICAgICAgICcjMzNiYmVlJywKICAgICAgICAgICAgJyNlZTMzNzcnLAogICAgICAgICAgICAnIzAwOTk4OCcsCiAgICAgICAgICAgICcjYmJiYmJiJywKICAgICAgICBdLAogICAgICAgIC8vIFRoZXNlIHBhbGV0dGVzIHRyeSB0byBiZSBiZXR0ZXIgZm9yIGNvbG9yIGRpZmZlcmVudGlhdGlvbi4KICAgICAgICAvLyBodHRwczovL3BlcnNvbmFsLnNyb24ubmwvfnBhdWx0LwogICAgICAgIGNvbG9yQmxpbmRBc3Npc3QxOiBbCiAgICAgICAgICAgICcjNDQ3N2FhJywKICAgICAgICAgICAgJyM0NGFhYWEnLAogICAgICAgICAgICAnI2FhYWE0NCcsCiAgICAgICAgICAgICcjYWE3NzQ0JywKICAgICAgICAgICAgJyNhYTQ0NTUnLAogICAgICAgICAgICAnI2FhNDQ4OCcsCiAgICAgICAgXSwKICAgICAgICBjb2xvckJsaW5kQXNzaXN0MjogWwogICAgICAgICAgICAnIzg4Y2NlZScsCiAgICAgICAgICAgICcjNDRhYTk5JywKICAgICAgICAgICAgJyMxMTc3MzMnLAogICAgICAgICAgICAnIzk5OTkzMycsCiAgICAgICAgICAgICcjZGRjYzc3JywKICAgICAgICAgICAgJyNjYzY2NzcnLAogICAgICAgICAgICAnIzg4MjI1NScsCiAgICAgICAgICAgICcjYWE0NDk5JywKICAgICAgICBdLAogICAgICAgIGNvbG9yQmxpbmRBc3Npc3QzOiBbCiAgICAgICAgICAgICcjMzMyMjg4JywKICAgICAgICAgICAgJyM2Njk5Y2MnLAogICAgICAgICAgICAnIzg4Y2NlZScsCiAgICAgICAgICAgICcjNDRhYTk5JywKICAgICAgICAgICAgJyMxMTc3MzMnLAogICAgICAgICAgICAnIzk5OTkzMycsCiAgICAgICAgICAgICcjZGRjYzc3JywKICAgICAgICAgICAgJyNjYzY2NzcnLAogICAgICAgICAgICAnI2FhNDQ2NicsCiAgICAgICAgICAgICcjODgyMjU1JywKICAgICAgICAgICAgJyM2NjExMDAnLAogICAgICAgICAgICAnI2FhNDQ5OScsCiAgICAgICAgXSwKICAgICAgICBjb2xvckJsaW5kQXNzaXN0NDogWwogICAgICAgICAgICAvLyBQYXVsIFRvbCdzICJBbHRlcm5hdGl2ZSBTY2hlbWUgZm9yIFF1YWxpdGF0aXZlIERhdGEiLiBQcmVmZXJyZWQKICAgICAgICAgICAgLy8gaWYgYHRlbnNvcmJvYXJkQ29sb3JCbGluZEFzc2lzdGAgY2Fubm90IGJlIHVzZWQgZm9yIGFueSByZWFzb24uCiAgICAgICAgICAgICcjNDQ3N2FhJywKICAgICAgICAgICAgJyM2NmNjZWUnLAogICAgICAgICAgICAnIzIyODgzMycsCiAgICAgICAgICAgICcjY2NiYjQ0JywKICAgICAgICAgICAgJyNlZTY2NzcnLAogICAgICAgICAgICAnI2FhMzM3NycsCiAgICAgICAgICAgICcjYmJiYmJiJywKICAgICAgICBdLAogICAgICAgIC8vIGJhc2VkIG9uIHRoaXMgcGFsZXR0ZTogaHR0cDovL21rd2ViLmJjZ3NjLmNhL2Jpb3ZpczIwMTIvCiAgICAgICAgY29sb3JCbGluZEFzc2lzdDU6IFsKICAgICAgICAgICAgJyNGRjZEQjYnLAogICAgICAgICAgICAnIzkyMDAwMCcsCiA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V0FSUkFOVElFUyBPUiBDT05ESVRJT05TIE9GIEFOWSBLSU5ELCBlaXRoZXIgZXhwcmVzcyBvciBpbXBsaWVkLgogICAgU2VlIHRoZSBMaWNlbnNlIGZvciB0aGUgc3BlY2lmaWMgbGFuZ3VhZ2UgZ292ZXJuaW5nIHBlcm1pc3Npb25zIGFuZAogICAgbGltaXRhdGlvbnMgdW5kZXIgdGhlIExpY2Vuc2UuCiAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwogICAgY2xhc3MgRXhwZXJpbWVudHNTdG9yZSBleHRlbmRzIEJhc2VTdG9yZSB7CiAgICAgICAgY29uc3RydWN0b3IoKSB7CiAgICAgICAgICAgIHN1cGVyKC4uLmFyZ3VtZW50cyk7CiAgICAgICAgICAgIHRoaXMuX2V4cGVyaW1lbnRzID0gW107CiAgICAgICAgfQogICAgICAgIGxvYWQoKSB7CiAgICAgICAgICAgIGNvbnN0IHVybCA9IGdldFJvdXRlcigpLmV4cGVyaW1lbnRzKCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzLnJlcXVlc3RNYW5hZ2VyLnJlcXVlc3QodXJsKS50aGVuKChuZXdFeHBlcmltZW50cykgPT4gewogICAgICAgICAgICAgICAgaWYgKCFsb2Rhc2guaXNFcXVhbCh0aGlzLl9leHBlcmltZW50cywgbmV3RXhwZXJpbWVudHMpKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fZXhwZXJpbWVudHMgPSBuZXdFeHBlcmltZW50czsKICAgICAgICAgICAgICAgICAgICB0aGlzLmVtaXRDaGFuZ2UoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEdldCB0aGUgY3VycmVudCBsaXN0IG9mIGV4cGVyaW1lbnRzLiBJZiBubyBkYXRhIGlzIGF2YWlsYWJsZSwgdGhpcyB3aWx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G9zc2libGUgc3RyaW5ncyB0byB1c2UgYXMgdGhlCiAgICAgICAgICogICAgIGRvbWFpbiBmb3IgeW91ciBzY2FsZS4KICAgICAgICAgKi8KICAgICAgICBzZXREb21haW4oc3RyaW5ncykgewogICAgICAgICAgICB0aGlzLmlkZW50aWZpZXJzID0gbWFwJDEoKTsKICAgICAgICAgICAgc3RyaW5ncy5mb3JFYWNoKChzLCBpKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLmlkZW50aWZpZXJzLnNldChzLCB0aGlzLnBhbGV0dGVbaSAlIHRoaXMucGFsZXR0ZS5sZW5ndGhdKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBVc2UgdGhlIGNvbG9yIHNjYWxlIHRvIHRyYW5zZm9ybSBhbiBlbGVtZW50IGluIHRoZSBkb21haW4gaW50byBhIGNvbG9yLgogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBUaGUgaW5wdXQgc3RyaW5nIHRvIG1hcCB0byBhIGNvbG9yLgogICAgICAgICAqIEByZXR1cm4ge3N0cmluZ30gVGhlIGNvbG9yIGNvcnJlc3BvbmRpbmcgdG8gdGhhdCBpbnB1dCBzdHJpbmcuCiAgICAgICAgICogQHRocm93cyBXaWxsIGVycm9yIGlmIGlucHV0IHN0cmluZyBpcyBub3QgaW4gdGhlIHNjYWxlJ3MgZG9tYWluLgogICAgICAgICAqLwogICAgICAgIGdldENvbG9yKHMpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLmlkZW50aWZpZXJzLmhhcyhzKSkgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBTdHJpbmcgJHtzfSB3YXMgbm90IGluIHRoZSBkb21haW4uYCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXMuaWRlbnRpZmllcnMuZ2V0KHMpOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICA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jaGVja2JveCB7CiAgICAgIC0tcGFwZXItY2hlY2tib3gtY2hlY2tlZC1jb2xvcjogdmFyKC0tcGFwZXItcHVycGxlLTUwMCk7CiAgICAgIC0tcGFwZXItY2hlY2tib3gtY2hlY2tlZC1pbmstY29sb3I6IHZhcigtLXBhcGVyLXB1cnBsZS01MDApOwogICAgICAtLXBhcGVyLWNoZWNrYm94LXVuY2hlY2tlZC1jb2xvcjogdmFyKC0tcGFwZXItcHVycGxlLTkwMCk7CiAgICAgIC0tcGFwZXItY2hlY2tib3gtdW5jaGVja2VkLWluay1jb2xvcjogdmFyKC0tcGFwZXItcHVycGxlLTkwMCk7CiAgICB9CiAgICBbY29sb3ItY2xhc3M9J3RlYWwnXSBwYXBlci1jaGVja2JveCB7CiAgICAgIC0tcGFwZXItY2hlY2tib3gtY2hlY2tlZC1jb2xvcjogdmFyKC0tcGFwZXItdGVhbC01MDApOwogICAgICAtLXBhcGVyLWNoZWNrYm94LWNoZWNrZWQtaW5rLWNvbG9yOiB2YXIoLS1wYXBlci10ZWFsLTUwMCk7CiAgICAgIC0tcGFwZXItY2hlY2tib3gtdW5jaGVja2VkLWNvbG9yOiB2YXIoLS1wYXBlci10ZWFsLTkwMCk7CiAgICAgIC0tcGFwZXItY2hlY2tib3gtdW5jaGVja2VkLWluay1jb2xvcjogdmFyKC0tcGFwZXItdGVhbC05MDApOwogICAgfQogICAgW2NvbG9yLWNsYXNzPSdwaW5rJ10gcGFwZXItY2hlY2tib3ggewogICAgICAtLXBhcGVyLWNoZWNrYm94LWNoZWNrZWQtY29sb3I6IHZhcigtLXBhcGVyLXBpbmstNTAwKTsKICAgICAgLS1wYXBlci1jaGVja2JveC1jaGVja2VkLWluay1jb2xvcjogdmFyKC0tcGFwZXItcGluay01MDApOwogICAgICAtLXBhcGVyLWNoZWNrYm94LXVuY2hlY2tlZC1jb2xvcjogdmFyKC0tcGFwZXItcGluay05MDApOwogICAgICAtLXBhcGVyLWNoZWNrYm94LXVuY2hlY2tlZC1pbmstY29sb3I6IHZhcigtLXBhcGVyLXBpbmstOTAwKTsKICAgIH0KICAgIFtjb2xvci1jbGFzcz0nb3JhbmdlJ10gcGFwZXItY2hlY2tib3ggewogICAgICAtLXBhcGVyLWNoZWNrYm94LWNoZWNrZWQtY29sb3I6IHZhcigtLXBhcGVyLW9yYW5nZS01MDApOwogICAgICAtLXBhcGVyLWNoZWNrYm94LWNoZWNrZWQtaW5rLWNvbG9yOiB2YXIoLS1wYXBlci1vcmFuZ2UtNTAwKTsKICAgICAgLS1wYXBlci1jaGVja2JveC11bmNoZWNrZWQtY29sb3I6IHZhcigtLXBhcGVyLW9yYW5nZS05MDApOwogICAgICAtLXBhcGVyLWNoZWNrYm94LXVuY2hlY2tlZC1pbmstY29sb3I6IHZhcigtLXBhcGVyLW9yYW5nZS05MDApOwogICAgfQogICAgW2NvbG9yLWNsYXNzPSdicm93biddIHBhcGVyLWNoZWNrYm94IHsKICAgICAgLS1wYXBlci1jaGVja2JveC1jaGVja2VkLWNvbG9yOiB2YXIoLS1wYXBlci1icm93bi01MDApOwogICAgICAtLXBhcGVyLWNoZWNrYm94LWNoZWNrZWQtaW5rLWNvbG9yOiB2YXIoLS1wYXBlci1icm93bi01MDApOwogICAgICAtLXBhcGVyLWNoZWNrYm94LXVuY2hlY2tlZC1jb2xvcjogdmFyKC0tcGFwZXItYnJvd24tOTAwKTsKICAgICAgLS1wYXBlci1jaGVja2JveC11bmNoZWNrZWQtaW5rLWNvbG9yOiB2YXIoLS1wYXBlci1icm93bi05MDApOwogICAgfQogICAgW2NvbG9yLWNsYXNzPSdpbmRpZ28nXSBwYXBlci1jaGVja2JveCB7CiAgICAgIC0tcGFwZXItY2hlY2tib3gtY2hlY2tlZC1jb2xvcjogdmFyKC0tcGFwZXItaW5kaWdvLTUwMCk7CiAgICAgIC0tcGFwZXItY2hlY2tib3gtY2hlY2tlZC1pbmstY29sb3I6IHZhcigtLXBhcGVyLWluZGlnby01MDApOwogICAgICAtLXBhcGVyLWN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AgICAgICAgICAgICAgIC8vIElmIHRoZSB1c2VyIGNsZWFyZWQgdGhlIGZpZWxkLCB0aGV5IG1heSBiZSBkb25lIHR5cGluZywgc28KICAgICAgICAgICAgICAgICAgICAvLyB1cGRhdGUgbW9yZSBxdWlja2x5LgogICAgICAgICAgICAgICAgICAgIHRoaXMuYXN5bmMoKCkgPT4gewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnJlZ2V4ID0gcjsKICAgICAgICAgICAgICAgICAgICB9LCAzMCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBkZWJvdW5jZWQocik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH07CiAgICAgICAgfQogICAgICAgIGdldCBfcmVnZXgoKSB7CiAgICAgICAgICAgIHZhciByZWdleFN0cmluZyA9IHRoaXMucmVnZXg7CiAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IFJlZ0V4cChyZWdleFN0cmluZyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY2F0Y2ggKGUpIHsKICAgICAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIF9zZXRJc29sYXRvckljb24oKSB7CiAgICAgICAgICAgIHZhciBzZWxlY3Rpb25NYXAgPSB0aGlzLnNlbGVjdGlvblN0YXRlOwogICAgICAgICAgICB2YXIgbnVtQ2hlY2tlZCA9IGxvZGFzaC5maWx0ZXIobG9kYXNoLnZhbHVlcyhzZWxlY3Rpb25NYXApKS5sZW5ndGg7CiAgICAgICAgICAgIHZhciBidXR0b25zID0gQXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwodGhpcy5yb290LnF1ZXJ5U2VsZWN0b3JBbGwoJy5pc29sYXRvcicpKTsKICAgICAgICAgICAgYnV0dG9ucy5mb3JFYWNoKGZ1bmN0aW9uIChiKSB7CiAgICAgICAgICAgICAgICBpZiAobnVtQ2hlY2tlZCA9PT0gMSAmJiBzZWxlY3Rpb25NYXBbYi5uYW1lXSkgewogICAgICAgICAgICAgICAgICAgIGIuaWNvbiA9ICdyYWRpby1idXR0b24tY2hlY2tlZCc7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBiLmljb24gPSAncmFkaW8tYnV0dG9uLXVuY2hlY2tlZCc7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICBjb21wdXRlTmFtZXNNYXRjaGluZ1JlZ2V4KF9fLCBfX18pIHsKICAgICAgICAgICAgY29uc3QgcmVnZXggPSB0aGlzLl9yZWdleDsKICAgICAgICAgICAgcmV0dXJuIHJlZ2V4ID8gdGhpcy5uYW1lcy5maWx0ZXIoKG4pID0+IHJlZ2V4LnRlc3QobikpIDogdGhpcy5uYW1lczsKICAgICAgICB9CiAgICAgICAgY29tcHV0ZU91dFNlbGVjdGVkKF9fLCBfX18pIHsKICAgICAgICAgICAgdmFyIHNlbGVjdGlvblN0YXRlID0gdGhpcy5zZWxlY3Rpb25TdGF0ZTsKICAgICAgICAgICAgdmFyIG51bSA9IHRoaXMubWF4TmFtZXNUb0VuYWJsZUJ5RGVmYXVsdDsKICAgICAgICAgICAgdmFyIGFsbEVuYWJsZWQgPSB0aGlzLm5hbWVzTWF0Y2hpbmdSZWdleC5sZW5ndGggPD0gbnVtOwogICAgICAgICAgICByZXR1cm4gdGhpcy5uYW1lc01hdGNoaW5nUmVnZXguZmlsdGVyKChuKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gc2VsZWN0aW9uU3RhdGVbbl0gPT0gbnVsbCA/IGFsbEVuYWJsZWQgOiBzZWxlY3Rpb25TdGF0ZVtuXTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIHN5bmNocm9uaXplQ29sb3JzKGUpIHsKICAgICAgICAgICAgdGhpcy5fc2V0SXNvbGF0b3JJY29uKCk7CiAgICAgICAgICAgIGNvbnN0IGNoZWNrYm94ZXMgPSB0aGlzLnJvb3QucXVlcnlTZWxlY3RvckFsbCgncGFwZXItY2hlY2tib3gnKTsKICAgICAgICAgICAgY2hlY2tib3hlcy5mb3JFYWNoKChwKSA9PiB7CiAgICAgICAgICAgICAgICBjb25zdCBjb2xvciA9IHRoaXMuY29sb3JpbmcuZ2V0Q29sb3IocC5uYW1lKTsKICAgICAgICAgICAgICAgIHAudXBkYXRlU3R5bGVzKHsKICAgICAgICAgICAgICAgICAgICAnLS1wYXBlci1jaGVja2JveC1jaGVja2VkLWNvbG9yJzogY29sb3IsCiAgICAgICAgICAgICAgICAgICAgJy0tcGFwZXItY2hlY2tib3gtY2hlY2tlZC1pbmstY29sb3InOiBjb2xvciwKICAgICAgICAgICAgICAgICAgICAnLS1wYXBlci1jaGVja2JveC11bmNoZWNrZWQtY29sb3InOiBjb2xvciwKICAgICAgICAgICAgICAgICAgICAnLS1wYXBlci1jaGVja2JveC11bmNoZWNrZWQtaW5rLWNvbG9yJzogY29sb3IsCiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGNvbnN0IGJ1dHRvbnMgPSB0aGlzLnJvb3QucXVlcnlTZWxlY3RvckFsbCgnLmlzb2xhdG9yJyk7CiAgICAgICAgICAgIGJ1dHRvbnMuZm9yRWFjaCgocCkgPT4gewogICAgICAgICAgICAgICAgY29uc3QgY29sb3IgPSB0aGlzLmNvbG9yaW5nLmdldENvbG9yKHAubmFtZSk7CiAgICAgICAgICAgICAgICBwLnN0eWxlWydjb2xvciddID0gY29sb3I7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICAvLyBUaGUgdXBkYXRlU3R5bGVzIGNhbGwgZmFpbHMgc2lsZW50bHkgaWYgdGhlIGJyb3dzZXIgZG9lc24ndCBoYXZlIGZvY3VzLAogICAgICAgICAgICAvLyBlLmcuIGlmIFRlbnNvckJvYXJkIHdhcyBvcGVuZWQgaW50byBhIG5ldyB0YWIgdGhhdCBpc24ndCB2aXNpYmxlLgogICAgICAgICAgICAvLyBTbyB3ZSB3YWl0IGZvciByZXF1ZXN0QW5pbWF0aW9uRnJhbWUuCiAgICAgICAgICAgIHdpbmRvdy5yZXF1ZXN0QW5pbWF0aW9uRnJhbWUoKCkgPT4gewogICAgICAgICAgICAgICAgdGhpcy51cGRhdGVTdHlsZXMoKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIF9pc29sYXRlTmFtZShlKSB7CiAgICAgICAgICAgIC8vIElmIHVzZXIgY2xpY2tzIG9uIHRoZSBsYWJlbCBmb3Igb25lIG5hbWUsIGVuYWJsZSBpdCBhbmQgZGlzYWJsZSBhbGwgb3RoZXIKICAgICAgICAgICAgLy8gbmFtZXMuCiAgICAgICAgICAgIHZhciBuYW1lID0gZS50YXJnZXQubmFtZTsKICAgICAgICAgICAgdmFyIHNlbGVjdGlvblN0YXRlID0ge307CiAgICAgICAgICAgIHRoaXMubmFtZXMuZm9yRWFjaChmdW5jdGlvbiAobikgewogICAgICAgICAgICAgICAgc2VsZWN0aW9uU3RhdGVbbl0gPSBuID09IG5hbWU7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICB0aGlzLnNlbGVjdGlvblN0YXRlID0gc2VsZWN0aW9uU3RhdGU7CiAgICAgICAgfQogICAgICAgIF9jaGVja2JveENoYW5nZShlKSB7CiAgICAgICAgICAgIHZhciB0YXJnZXQgPSBlLnRhcmdldDsKICAgICAgICAgICAgY29uc3QgbmV3U2VsZWN0aW9uU3RhdGUgPSBsb2Rhc2guY2xvbmUodGhpcy5zZWxlY3Rpb25TdGF0ZSk7CiAgICAgICAgICAgIG5ld1NlbGVjdGlvblN0YXRlW3RhcmdldC5uYW1lXSA9IHRhcmdldC5jaGVja2VkOwogICAgICAgICAgICAvLyBuLmIuIG5vdGlmeVBhdGggd29uJ3Qgd29yayBiZWNhdXNlIG5hbWVzIG1heSBoYXZlIHB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gIG5vLWxhYmVsLWZsb2F0PSIiCiAgICAgIGxhYmVsPSJXcml0ZSBhIHJlZ2V4IHRvIGZpbHRlciBydW5zIgogICAgICB2YWx1ZT0iW1tyZWdleF1dIgogICAgICBvbi1iaW5kLXZhbHVlLWNoYW5nZWQ9Il9kZWJvdW5jZWRSZWdleENoYW5nZSIKICAgID48L3BhcGVyLWlucHV0PgogICAgPGRpdiBpZD0ib3V0ZXItY29udGFpbmVyIiBjbGFzcz0ic2Nyb2xsYmFyIj4KICAgICAgPHRlbXBsYXRlCiAgICAgICAgaXM9ImRvbS1yZXBlYXQiCiAgICAgICAgaXRlbXM9IltbbmFtZXNNYXRjaGluZ1JlZ2V4XV0iCiAgICAgICAgb24tZG9tLWNoYW5nZT0ic3luY2hyb25pemVDb2xvcnMiCiAgICAgID4KICAgICAgICA8ZGl2IGNsYXNzPSJuYW1lLXJvdyI+CiAgICAgICAgICA8ZGl2CiAgICAgICAgICAgIGNsYXNzPSJpY29uLWNvbnRhaW5lciBjaGVja2JveC1jb250YWluZXIgdmVydGljYWwtYWxpZ24tY29udGFpbmVyIgogICAgICAgICAgPgogICAgICAgICAgICA8cGFwZXItY2hlY2tib3gKICAgICAgICAgICAgICBjbGFzcz0iY2hlY2tib3ggdmVydGljYWwtYWxpZ24tY2VudGVyIgogICAgICAgICAgICAgIGlkJD0iY2hlY2tib3gtW1tpdGVtXV0iCiAgICAgICAgICAgICAgbmFtZT0iW1tpdGVtXV0iCiAgICAgICAgICAgICAgY2hlY2tlZCQ9IltbX2lzQ2hlY2tlZChpdGVtLCBzZWxlY3Rpb25TdGF0ZS4qKV1dIgogICAgICAgICAgICAgIG9uLWNoYW5nZT0iX2NoZWNrYm94Q2hhbmdlIgogICAgICAgICAgICA+PC9wYXBlci1jaGVja2JveD4KICAgICAgICAgIDwvZGl2PgogICAgICAgICAgPGRpdgogICAgICAgICAgICBjbGFzcz0iaWNvbi1jb250YWluZXIgaXNvbGF0b3ItY29udGFpbmVyIHZlcnRpY2FsLWFsaWduLWNvbnRhaW5lciIKICAgICAgICAgID4KICAgICAgICAgICAgPHBhcGVyLWljb24tYnV0dG9uCiAgICAgICAgICAgICAgaWNvbj0icmFkaW8tYnV0dG9uLXVuY2hlY2tlZCIKICAgICAgICAgICAgICBjbGFzcz0iaXNvbGF0b3IgdmVydGljYWwtYWxpZ24tY2VudGVyIgogICAgICAgICAgICAgIG9uLXRhcD0iX2lzb2xhdGVOYW1lIgogICAgICAgICAgICAgIG5hbWU9IltbaXRlbV1dIgogICAgICAgICAgICA+PC9wYXBlci1pY29uLWJ1dHRvbj4KICAgICAgICAgIDwvZGl2PgogICAgICAgICAgPGRpdiBjbGFzcz0iaXRlbS1sYWJlbC1jb250YWluZXIiPgogICAgICAgICAgICA8c3Bhbj5bW2l0ZW1dXTwvc3Bhbj4KICAgICAgICAgIDwvZGl2PgogICAgICAgIDwvZGl2PgogICAgICA8L3RlbXBsYXRlPgogICAgPC9kaXY+CiAgICA8c3R5bGU+CiAgICAgIHBhcGVyLWlucHV0IHsKICAgICAgICAtLXBhcGVyLWlucHV0LWNvbnRhaW5lci1mb2N1cy1jb2xvcjogdmFyKC0tdGItb3JhbmdlLXN0cm9uZyk7CiAgICAgICAgLS1wYXBlci1pbnB1dC1jb250YWluZXItaW5wdXQ6IHsKICAgICAgICAgIGZvbnQtc2l6ZTogMTRweDsKICAgICAgICB9CiAgICAgICAgLS1wYXBlci1pbnB1dC1jb250YWluZXItbGFiZWw6IHsKICAgICAgICAgIGZvbnQtc2l6ZTogMTRweDsKICAgICAgICB9CiAgICAgIH0KICAgICAgOmhvc3QgewogICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjsKICAgICAgICBoZWlnaHQ6IDEwMCU7CiAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjsKICAgICAgfQogICAgICAjb3V0ZXItY29udGFpbmVyIHsKICAgICAgICBjb250YWluOiBjb250ZW50OwogICAgICAgIGZsZXgtZ3JvdzogMTsKICAgICAgICBmbGV4LXNocmluazogMTsKICAgICAgICBvdmVyZmxvdy14OiBoaWRkZW47CiAgICAgICAgb3ZlcmZsb3cteTogYXV0bzsKICAgICAgICB3aWR0aDogMTAwJTsKICAgICAgICB3aWxsLWNoYW5nZTogdHJhbnNmb3JtOwogICAgICAgIHdvcmQtd3JhcDogYnJlYWstd29yZDsKICAgICAgfQogICAgICAubmFtZS1yb3cgewogICAgICAgIGNvbnRhaW46IGNvbnRlbnQ7CiAgICAgICAgcGFkZGluZy10b3A6IDVweDsKICAgICAgICBwYWRkaW5nLWJvdHRvbTogNXB4OwogICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAgZmxleC1kaXJlY3Rpb246IHJvdzsKICAgICAgICBmb250LXNpemU6IDEzcHg7CiAgICAgICAgd29yZC1icmVhazogYnJlYWstYWxsOyAvKiBtYWtlcyB3cmFwcGluZyBvZiBoeXBlcnBhcmFtIHN0cmluZ3MgYmV0dGVyICovCiAgICAgIH0KICAgICAgLmljb24tY29udGFpbmVyIHsKICAgICAgICBmbGV4LWdyb3c6IDA7CiAgICAgICAgZmxleC1zaHJpbms6IDA7CiAgICAgICAgcGFkZGluZy1sZWZ0OiAycHg7CiAgICAgIH0KICAgICAgLmNoZWNrYm94IHsKICAgICAgICBwYWRkaW5nLWxlZnQ6IDJweDsKICAgICAgICB3aWR0aDogMThweDsKICAgICAgICBoZWlnaHQ6IDE4cHg7CiAgICAgIH0KICAgICAgLmlzb2xhdG9yIHsKICAgICAgICB3aWR0aDogMThweDsKICAgICAgICBoZWlnaHQ6IDE4cHg7CiAgICAgICAgcGFkZGluZzogMHB4OwogICAgICB9CiAgICAgIC5pc29sYXRvci1jb250YWluZXIgewogICAgICAgIHBhZGRpbmctbGVmdDogNnB4OwogICAgICAgIHBhZGRpbmctcmlnaHQ6IDNweDsKICAgICAgfQogICAgICAuY2hlY2tib3gtY29udGFpbmVyIHsKICAgICAgICBwYWRkaW5nLWxlZnQ6IDJweDsKICAgICAgfQogICAgICAuaXRlbS1sYWJlbC1jb250YWluZXIgewogICAgICAgIHBhZGRpbmctbGVmdDogNXB4OwogICAgICAgIGZsZXgtZ3JvdzogMTsKICAgICAgICBmbGV4LXNocmluazogMTsKICAgICAgICB3aWR0aDogMHB4OyAvKiBoYWNrIHRvIGdldCB0aGUgZmxleC1ncm93IHRvIHdvcmsgcHJvcGVybHkgKi8KICAgICAgfQogICAgICAudG9vbHRpcC12YWx1ZS1jb250YWluZXIgewogICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7CiAgICAgICAgZmxleC1ncm93OiAwOwogICAgICAgIGZsZXgtc2hyaW5rOiAwOwogICAgICAgIHRleHQtYWxpZ246IHJpZ2h0OwogICAgICAgIHBhZGRpbmctbGVmdDogMnB4OwogICAgICB9CiAgICAgIC52ZXJ0aWNhbC1hbGlnbi1jb250YWluZXIgewogICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7CiAgICAgIH0KICAgICAgLnZlcnRpY2FsLWFsaWduLWNvbnRhaW5lciAudmVydGljYWwtYWxpZ24tY2VudGVyIHsKICAgICAgICBhbGlnbi1zZWxmOiBjZW50ZXI7CiAgICAgIH0KICAgICAgLnZlcnRpY2FsLWFsaWduLWNvbnRhaW5lciAudmVydGljYWwtYWxpZ24tdG9wIHsKICAgICAgICBhbGlnbi1zZWxmOiBzdGFydDsKICAgICAgfQogICAgPC9zdHlsZT4KICBgOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBBcnJheSwKICAgICAgICB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIEFycmF5KQogICAgXSwgVGZNdWx0aUNoZWNrYm94LnByb3RvdHlwZSwgIm5hbWVzIiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsKICAgICAgICAgICAgdHlwZTogT2JqZWN0LAogICAgICAgIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgT2JqZWN0KQogICAgXSwgVGZNdWx0aUNoZWNrYm94LnByb3RvdHlwZSwgImNvbG9yaW5nIiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsKICAgICAgICAgICAgdHlwZTogU3RyaW5nLAogICAgICAgICAgICBub3RpZnk6IHRydWUsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBTdHJpbmcpCiAgICBdLCBUZk11bHRpQ2hlY2tib3gucHJvdG90eXBlLCAicmVnZXgiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBBcnJheSwKICAgICAgICAgICAgY29tcHV0ZWQ6ICdjb21wdXRlTmFtZXNNYXRjaGluZ1JlZ2V4KG5hbWVzLiosIF9yZWdleCknLAogICAgICAgIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgQXJyYXkpCiAgICBdLCBUZk11bHRpQ2hlY2tib3gucHJvdG90eXBlLCAibmFtZXNNYXRjaGluZ1JlZ2V4Iiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsKICAgICAgICAgICAgLy8gSWYgYSBuYW1lIGlzIGV4cGxpY2l0bHkgZW5hYmxlZCBieSB1c2VyIGdlc3R1cmUsIFRydWUsIGlmIGV4cGxpY2l0bHkKICAgICAgICAgICAgLy8gZGlzYWJsZWQsIEZhbHNlLiBJZiB1bmRlZmluZWQsIGRlZmF1bHQgdmFsdWUgKGVuYWJsZSBmb3IgZmlyc3QgawogICAgICAgICAgICAvLyBuYW1lcywgZGlzYWJsZSBhZnRlcikuCiAgICAgICAgICAgIHR5cG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ZhciBkZWxpbWl0ZXJQYXR0ZXJuID0gdGhpcy5kZWxpbWl0ZXJQYXR0ZXJuOwogICAgICAgICAgICBjb25zdCByZXN1bHQgPSBbXTsKICAgICAgICAgICAgd2hpbGUgKHRydWUpIHsKICAgICAgICAgICAgICAgIGNvbnN0IGRlbGltaXRlclJlZ0V4cCA9IG5ldyBSZWdFeHAoZGVsaW1pdGVyUGF0dGVybiwgJ2cnKTsKICAgICAgICAgICAgICAgIGRlbGltaXRlclJlZ0V4cC50ZXN0KHZhbHVlKTsKICAgICAgICAgICAgICAgIGlmIChkZWxpbWl0ZXJSZWdFeHAubGFzdEluZGV4ID09PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgcmVzdWx0LnB1c2godmFsdWUpOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgcmVzdWx0LnB1c2godmFsdWUuc2xpY2UoMCwgZGVsaW1pdGVyUmVnRXhwLmxhc3RJbmRleCkpOwogICAgICAgICAgICAgICAgICAgIHZhbHVlID0gdmFsdWUuc2xpY2UoZGVsaW1pdGVyUmVnRXhwLmxhc3RJbmRleCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDsKICAgICAgICB9CiAgICB9OwogICAgVGZXYnJTdHJpbmcudGVtcGxhdGUgPSBodG1sIGAKICAgIDwhLS0KICAgICAgVGhpcyB1Z2x5IGZvcm1hdHRpbmcgaXMgcmVxdWlyZWQgdG8gcHJldmVudCBzcGFjZXMgZnJvbSBzbGlwcGluZwogICAgICBpbnRvIHRoZSBIVE1MLgogICAgLS0+CiAgICA8dGVtcGxhdGUgaXM9ImRvbS1yZXBlYXQiIGl0ZW1zPSJbW19wYXJ0c11dIiBhcz0icGFydCIKICAgICAgPltbcGFydF1dPHdicgogICAgLz48L3RlbXBsYXRlPgogIGA7CiAgICBf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oKICAgICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjAKCiAgICBVbmxlc3MgcmVxdWlyZWQgYnkgYXBwbGljYWJsZSBsYXcgb3IgYWdyZWVkIHRvIGluIHdyaXRpbmcsIHNvZnR3YXJlCiAgICBkaXN0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiAiQVMgSVMiIEJBU0lTLAogICAgV0lUSE9VVCBXQVJSQU5USUVTIE9SIENPTkRJVElPTlMgT0YgQU5ZIEtJTkQsIGVpdGhlciBleHByZXNzIG9yIGltcGxpZWQuCiAgICBTZWUgdGhlIExpY2Vuc2UgZm9yIHRoZSBzcGVjaWZpYyBsYW5ndWFnZSBnb3Zlcm5pbmcgcGVybWlzc2lvbnMgYW5kCiAgICBsaW1pdGF0aW9ucyB1bmRlciB0aGUgTGljZW5zZS4KICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCiAgICBsZXQgVGZSdW5zU2VsZWN0b3IgPSBjbGFzcyBUZlJ1bnNTZWxlY3RvciBleHRlbmRzIExlZ2FjeUVsZW1lbnRNaXhpbihQb2x5bWVyRWxlbWVudCkgewogICAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgICAgICBzdXBlciguLi5hcmd1bWVudHMpOwogICAgICAgICAgICB0aGlzLnJ1blNlbGVjdGlvblN0YXRlID0gZ2V0T2JqZWN0SW5pdGlhbGl6ZXIoJ3J1blNlbGVjdGlvblN0YXRlJywgewogICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiB7fSwKICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgIC5jYWxsKHRoaXMpOwogICAgICAgICAgICB0aGlzLnJlZ2V4SW5wdXQgPSBnZXRTdHJpbmdJbml0aWFsaXplcigncmVnZXhJbnB1dCcsIHsKICAgICAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogJycsCiAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAuY2FsbCh0aGlzKTsKICAgICAgICAgICAgdGhpcy5fZGF0YUxvY2F0aW9uQ2xpcExlbmd0aCA9IDI1MDsKICAgICAgICAgICAgdGhpcy5fZGF0YUxvY2F0aW9uRGVsaW1pdGVyUGF0dGVybiA9ICdbLz1fLC1dJzsKICAgICAgICAgICAgdGhpcy5jb2xvcmluZyA9IHsKICAgICAgICAgICAgICAgIGdldENvbG9yOiBydW5zQ29sb3JTY2FsZSwKICAgICAgICAgICAgfTsKICAgICAgICAgICAgdGhpcy5fc3RvcmVSdW5TZWxlY3Rpb25TdGF0ZSA9IGdldE9iamVjdE9ic2VydmVyKCdydW5TZWxlY3Rpb25TdGF0ZScsIHsKICAgICAgICAgICAgICAgIGRlZmF1bHRWYWx1ZToge30sCiAgICAgICAgICAgIH0pOwogICAgICAgICAgICB0aGlzLl9yZWdleE9ic2VydmVyID0gZ2V0U3RyaW5nT2JzZXJ2ZXIoJ3JlZ2V4SW5wdXQnLCB7CiAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWU6ICcnLAogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgYXR0YWNoZWQoKSB7CiAgICAgICAgICAgIHRoaXMuX3J1blN0b3JlTGlzdGVuZXIgPSBydW5zU3RvcmUuYWRkTGlzdGVuZXIoKCkgPT4gewogICAgICAgICAgICAgICAgdGhpcy5zZXQoJ3J1bnMnLCBydW5zU3RvcmUuZ2V0UnVucygpKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHRoaXMuc2V0KCdydW5zJywgcnVuc1N0b3JlLmdldFJ1bnMoKSk7CiAgICAgICAgICAgIHRoaXMuX2VudlN0b3JlTGlzdGVuZXIgPSBlbnZpcm9ubWVudFN0b3JlLmFkZExpc3RlbmVyKCgpID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuc2V0KCdkYXRhTG9jYXRpb24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KICAgICAgICAgIGlzPSJkb20taWYiCiAgICAgICAgICBpZj0iW1tfc2hvdWxkU2hvd0V4cGFuZERhdGFMb2NhdGlvbkJ1dHRvbihkYXRhTG9jYXRpb24sIF9kYXRhTG9jYXRpb25DbGlwTGVuZ3RoKV1dIgogICAgICAgICAgPjwhLS0KICAgICAgICAgIC0tPjxhIGhyZWY9IiIgb24tY2xpY2s9Il9vcGVuRGF0YUxvY2F0aW9uRGlhbG9nIj7igKY8L2E+CiAgICAgICAgPC90ZW1wbGF0ZT4KICAgICAgPC9kaXY+CiAgICA8L3RlbXBsYXRlPgogICAgPHN0eWxlPgogICAgICA6aG9zdCB7CiAgICAgICAgYm94LXNpemluZzogYm9yZGVyLWJveDsKICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47CiAgICAgICAgcGFkZGluZy1ib3R0b206IDEwcHg7CiAgICAgIH0KICAgICAgI3RvcC10ZXh0IHsKICAgICAgICB3aWR0aDogMTAwJTsKICAgICAgICBmbGV4LWdyb3c6IDA7CiAgICAgICAgZmxleC1zaHJpbms6IDA7CiAgICAgICAgcGFkZGluZy1yaWdodDogMTZweDsKICAgICAgICBib3gtc2l6aW5nOiBib3JkZXItYm94OwogICAgICAgIGNvbG9yOiB2YXIoLS1wYXBlci1ncmV5LTgwMCk7CiAgICAgIH0KICAgICAgdGYtbXVsdGktY2hlY2tib3ggewogICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAgZmxleC1ncm93OiAxOwogICAgICAgIGZsZXgtc2hyaW5rOiAxOwogICAgICAgIG92ZXJmbG93OiBoaWRkZW47CiAgICAgIH0KICAgICAgLngtYnV0dG9uIHsKICAgICAgICBmb250LXNpemU6IDEzcHg7CiAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogdmFyKC0tdGItdWktbGlnaHQtYWNjZW50KTsKICAgICAgICBjb2xvcjogdmFyKC0tdGItdWktZGFyay1hY2NlbnQpOwogICAgICB9CiAgICAgICN0b29sdGlwLWhlbHAgewogICAgICAgIGNvbG9yOiB2YXIoLS1wYXBlci1ncmV5LTgwMCk7CiAgICAgICAgbWFyZ2luOiAwOwogICAgICAgIGZvbnQtd2VpZ2h0OiBub3JtYWw7CiAgICAgICAgZm9udC1zaXplOiAxNHB4OwogICAgICAgIG1hcmdpbi1ib3R0b206IDVweDsKICAgICAgfQogICAgICBwYXBlci1idXR0b24gewogICAgICAgIG1hcmdpbi1sZWZ0OiAwOwogICAgICB9CiAgICAgICNkYXRhLWxvY2F0aW9uIHsKICAgICAgICBjb2xvcjogdmFyKC0tdGItdWktZGFyay1hY2NlbnQpOwogICAgICAgIGZvbnQtc2l6ZTogMTNweDsKICAgICAgICBtYXJnaW46IDVweCAwIDAgMDsKICAgICAgICBtYXgtd2lkdGg6IDI4OHB4OwogICAgICB9CiAgICA8L3N0eWxlPgogIGA7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7CiAgICAgICAgICAgIHR5cGU6IE9iamVjdCwKICAgICAgICAgICAgb2JzZXJ2ZXI6ICdfc3RvcmVSdW5TZWxlY3Rpb25TdGF0ZScsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBPYmplY3QpCiAgICBdLCBUZlJ1bnNTZWxlY3Rvci5wcm90b3R5cGUsICJydW5TZWxlY3Rpb25TdGF0ZSIsIHZvaWQgMCk7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7CiAgICAgICAgICAgIHR5cGU6IFN0cmluZywKICAgICAgICAgICAgb2JzZXJ2ZXI6ICdfcmVnZXhPYnNlcnZlcicsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBTdHJpbmcpCiAgICBdLCBUZlJ1bnNTZWxlY3Rvci5wcm90b3R5cGUsICJyZWdleElucHV0Iiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsKICAgICAgICAgICAgdHlwZTogQXJyYXksCiAgICAgICAgICAgIG5vdGlmeTogdHJ1ZSwKICAgICAgICB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIEFycmF5KQogICAgXSwgVGZSdW5zU2VsZWN0b3IucHJvdG90eXBlLCAic2VsZWN0ZWRSdW5zIiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsgdHlwZTogQXJyYXkgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBBcnJheSkKICAgIF0sIFRmUnVuc1NlbGVjdG9yLnByb3RvdHlwZSwgInJ1bnMiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBTdHJpbmcsCiAgICAgICAgICAgIG5vdGlmeTogdHJ1ZSwKICAgICAgICB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIFN0cmluZykKICAgIF0sIFRmUnVuc1NlbGVjdG9yLnByb3RvdHlwZSwgImRhdGFMb2NhdGlvbiIsIHZvaWQgMCk7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7CiAgICAgICAgICAgIHR5cGU6IE51bWJlciwKICAgICAgICB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIE51bWJlcikKICAgIF0sIFRmUnVuc1NlbGVjdG9yLnByb3RvdHlwZSwgIl9kYXRhTG9jYXRpb25DbGlwTGVuZ3RoIiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsKICAgICAgICAgICAgdHlwZTogU3RyaW5nLAogICAgICAgIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgU3RyaW5nKQogICAgXSwgVGZSdW5zU2VsZWN0b3I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gICogICAgICAgaWYgKGNhbmNlbGxlZCkgewogICAgICogICAgICAgICBjb25zb2xlLndhcm4oIkRvbid0IG1ha2UgcHJvbWlzZXMgeW91IGNhbid0IGtlZXAgPjoteyIpOwogICAgICogICAgICAgfQogICAgICogICAgICAgY29uc29sZS5sb2coIkVuam95IHlvdXIgdmFsdWU6IiwgdmFsdWUpOwogICAgICogICAgIH0pKTsKICAgICAqCiAgICAgKiAgICAgLy8gSWYgYG15UHJvbWlzZWAgaXMgcmVzb2x2ZWQgbm93LCB0aGVuIGBjYW5jZWxsZWRgIHdpbGwgYmUgYGZhbHNlYC4KICAgICAqICAgICBjYW5jZWxsZXIuY2FuY2VsQWxsKCk7CiAgICAgKiAgICAgLy8gSWYgYG15UHJvbWlzZWAgaXMgcmVzb2x2ZWQgbm93LCB0aGVuIGBjYW5jZWxsZWRgIHdpbGwgYmUgYHRydWVgLgogICAgICovCiAgICBjbGFzcyBDYW5jZWxsZXIgewogICAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogSG93IG1hbnkgdGltZXMgaGFzIGBjYW5jZWxBbGxgIGJlZW4gY2FsbGVkPwogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5jYW5jZWxsYXRpb25Db3VudCA9IDA7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZSBhIGNhbmNlbGxhYmxlIHRhc2suIFRoaXMgcmV0dXJucyBhIG5ldyBmdW5jdGlvbiB0aGF0LCB3aGVuCiAgICAgICAgICogaW52b2tlZCwgd2lsbCBwYXNzIGl0cyBhcmd1bWVudCB0byB0aGUgcHJvdmlkZWQgZnVuY3Rpb24gYXMgd2VsbCBhcwogICAgICAgICAqIGEgYGNhbmNlbGxlZGAgYXJndW1lbnQuIFRoaXMgYXJndW1lbnQgd2lsbCBiZSBgZmFsc2VgIHVubGVzcyBhbmQKICAgICAgICAgKiB1bnRpbCBgY2FuY2VsQWxsYCBpcyB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ZXMgdGhlCiAgICAgICAqIGFwcGVhcmFuY2Ugd2hlbiB0aGVyZSBpcyBvbmx5IG9uZSBsaW5lIG9mIHRleHQ7IHN0YW5kYXJkIE1hcmtkb3duCiAgICAgICAqIHJlbmRlcmVycyB3aWxsIHN0aWxsIGluY2x1ZGUgYSBcYDxwPlxgIGVsZW1lbnQuCiAgICAgICAqCiAgICAgICAqIEJ5IHRhcmdldGluZyBvbmx5IHRoZSB0b3AtbGV2ZWwsIGV4dHJlbWFsIGVsZW1lbnRzLCB3ZSBwcmVzZXJ2ZSBhbnkKICAgICAgICogYWN0dWFsIHBhcmFncmFwaCBicmVha3MgYW5kIG9ubHkgY2hhbmdlIHRoZSBwYWRkaW5nIGFnYWluc3QgdGhlCiAgICAgICAqIGNvbXBvbmVudCBlZGdlcy4KICAgICAgICovCiAgICAgICNtYXJrZG93biA+IHA6Zmlyc3QtY2hpbGQgewogICAgICAgIG1hcmdpbi10b3A6IDAuM2VtOwogICAgICB9CiAgICAgICNtYXJrZG93biA+IHA6bGFzdC1jaGlsZCB7CiAgICAgICAgbWFyZ2luLWJvdHRvbTogMC4zZW07CiAgICAgIH0KCiAgICAgIC8qIFBsZWFzYW50IHN0eWxlcyBmb3IgTWFya2Rvd24gdGFibGVzLiAqLwogICAgICAjbWFya2Rvd24gdGFibGUgewogICAgICAgIGJvcmRlci1jb2xsYXBzZTogY29sbGFwc2U7CiAgICAgIH0KICAgICAgI21hcmtkb3duIHRhYmxlIHRoIHsKICAgICAgICBmb250LXdlaWdodDogNjAwOwogICAgICB9CiAgICAgICNtYXJrZG93biB0YWJsZSB0aCwKICAgICAgI21hcmtkb3duIHRhYmxlIHRkIHsKICAgICAgICBwYWRkaW5nOiA2cHggMTNweDsKICAgICAgICBib3JkZXI6IDFweCBzb2xpZCAjZGZlMmU1OwogICAgICB9CiAgICAgICNtYXJrZG93biB0YWJsZSB0ciB7CiAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogI2ZmZjsKICAgICAgICBib3J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IGNvbnN0IHJnYiA9IGNvbnZlcnRIZXhUb1JnYihiYWNrZ3JvdW5kKTsKICAgICAgICBpZiAoIXJnYikgewogICAgICAgICAgICByZXR1cm4gJ2luaGVyaXQnOwogICAgICAgIH0KICAgICAgICAvLyBTZWU6IGh0dHA6Ly93d3cudzMub3JnL1RSL0FFUlQjY29sb3ItY29udHJhc3QKICAgICAgICBjb25zdCBicmlnaHRuZXNzID0gTWF0aC5yb3VuZCgocmdiWzBdICogMjk5ICsgcmdiWzFdICogNTg3ICsgcmdiWzJdICogMTE0KSAvIDEwMDApOwogICAgICAgIHJldHVybiBicmlnaHRuZXNzID4gMTI1ID8gJ2luaGVyaXQnIDogJyNlZWUnOwogICAgfQogICAgLyoqCiAgICAgKiBUdXJucyBhIGhleCBzdHJpbmcgaW50byBhbiBSR0IgYXJyYXkuCiAgICAgKiBAcGFyYW0gez9zdHJpbmd9IGNvbG9yIFJHQiBoZXggY29sb3IgY29kZSwgZS5nLiAjZWVlLCAjZWVlZWVlLgogICAgICogQHJldHVybiB7QXJyYXk8bnVtYmVyPn0KICAgICAqLwogICAgZnVuY3Rpb24gY29udmVydEhleFRvUmdiKGNvbG9yKSB7CiAgICAgICAgaWYgKCFjb2xvcikgewogICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICB9CiAgICAgICAgbGV0IG0gPSBjb2xvci5tYXRjaCgvXiMoWzAtOWEtZl17MSwyfSkoWzAtOWEtZl17MSwyfSkoWzAtOWEtZl17MSwyfSkkLyk7CiAgICAgICAgaWYgKCFtKSB7CiAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgIH0KICAgICAgICBpZiAoY29sb3IubGVuZ3RoID09IDQpIHsKICAgICAgICAgICAgZm9yICh2YXIgaSA9IDE7IGkgPD0gMzsgaSsrKSB7CiAgICAgICAgICAgICAgICBtW2ldID0gbVtpXSArIG1baV07CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIFtwYXJzZUludChtWzFdL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GhlCiAgICAgKiAgICAgY2FyZDsgaWYgbGVmdCB1bnNldCwgbm8gYm9yZGVyIHdpbGwgYmUgZGlzcGxheWVkLgogICAgICogICAtIEFueSBjaGlsZHJlbiBvZiB0aGlzIGNvbXBvbmVudCB3aWxsIGJlIHJlbmRlcmVkIGJlbG93IHRoZSBhYm92ZQogICAgICogICAgIGluZm9ybWF0aW9uLCBhbmQgY2FuIGJlIHVzZWQgdG8gZGlzcGxheSAoZm9yIGV4YW1wbGUpIHNvbWUgc21hbGwKICAgICAqICAgICBjb250cm9sIHdpZGdldHMuCiAgICAgKi8KICAgIGxldCBUZkNhcmRIZWFkaW5nID0gY2xhc3MgVGZDYXJkSGVhZGluZyBleHRlbmRzIFBvbHltZXJFbGVtZW50IHsKICAgICAgICBjb25zdHJ1Y3RvcigpIHsKICAgICAgICAgICAgc3VwZXIoLi4uYXJndW1lbnRzKTsKICAgICAgICAgICAgdGhpcy5kaXNwbGF5TmFtZSA9IG51bGw7CiAgICAgICAgICAgIHRoaXMudGFnID0gbnVsbDsKICAgICAgICAgICAgdGhpcy5ydW4gPSBudWxsOwogICAgICAgICAgICB0aGlzLmRlc2NyaXB0aW9uID0gbnVsbDsKICAgICAgICAgICAgdGhpcy5jb2xvciA9IG51bGw7CiAgICAgICAgfQogICAgICAgIF91cGRhdGVIZWFkaW5nU3R5bGUoKSB7CiAgICAgICAgICAgIHRoaXMudXBkYXRlU3R5bGVzKHsKICAgICAgICAgICAgICAgICctLXRmLWNhcmQtaGVhZGluZy1iYWNrZ3JvdW5kLWNvbG9yJzogdGhpcy5fcnVuQmFja2dyb3VuZCwKICAgICAgICAgICAgICAgICctLXRmLWNhcmQtaGVhZGluZy1jb2xvcic6IHRoaXMuX3J1bkNvbG9yLAogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgX2NvbXB1dGVSdW5CYWNrZ3JvdW5kKGNvbG9yKSB7CiAgICAgICAgICAgIHJldHVybiBjb2xvciB8fCAnbm9uZSc7CiAgICAgICAgfQogICAgICAgIF9jb21wdXRlUnVuQ29sb3IoY29sb3IpIHsKICAgICAgICAgICAgcmV0dXJuIHBpY2tUZXh0Q29sb3IoY29sb3IpOwogICAgICAgIH0KICAgICAgICBnZXQgX25hbWVMYWJlbCgpIHsKICAgICAgICAgICAgdmFyIGRpc3BsYXlOYW1lID0gdGhpcy5kaXNwbGF5TmFtZTsKICAgICAgICAgICAgdmFyIHRhZyA9IHRoaXMudGFnOwogICAgICAgICAgICByZXR1cm4gZGlzcGxheU5hbWUgfHwgdGFnIHx8ICcnOwogICAgICAgIH0KICAgICAgICBnZXQgX3RhZ0xhYmVsKCkgewogICAgICAgICAgICB2YXIgZGlzcGxheU5hbWUgPSB0aGlzLmRpc3BsYXlOYW1lOwogICAgICAgICAgICB2YXIgdGFnID0gdGhpcy50YWc7CiAgICAgICAgICAgIHJldHVybiB0YWcgJiYgdGFnICE9PSBkaXNwbGF5TmFtZSA/IHRhZyA6ICcnOwogICAgICAgIH0KICAgICAgICBfdG9nZ2xlRGVzY3JpcHRpb25EaWFsb2coZSkgewogICAgICAgICAgICBjb25zdCBkaWFsb2cgPSB0aGlzLiQuZGVzY3JpcHRpb25EaWFsb2c7CiAgICAgICAgICAgIGRpYWxvZy5wb3NpdGlvblRhcmdldCA9IGUudGFyZ2V0OwogICAgICAgICAgICBkaWFsb2cudG9nZ2xlKCk7CiAgICAgICAgfQogICAgfTsKICAgIFRmQ2FyZEhlYWRpbmcudGVtcGxhdGUgPSBodG1sIGAKICAgIDxkaXYgY2xhc3M9ImNvbnRhaW5lciI+CiAgICAgIDxmaWdjYXB0aW9uIGNsYXNzPSJjb250ZW50Ij4KICAgICAgICA8ZGl2IGNsYXNzPSJoZWFkaW5nLXJvdyI+CiAgICAgICAgICA8dGVtcGxhdGUgaXM9ImRvbS1pZiIgaWY9IltbX25hbWVMYWJlbF1dIj4KICAgICAgICAgICAgPGRpdiBpdGVtcHJvcD0ibmFtZSIgY2xhc3M9ImhlYWRpbmctbGFiZWwgbmFtZSI+W1tfbmFtZUxhYmVsXV08L2Rpdj4KICAgICAgICAgIDwvdGVtcGxhdGU+CiAgICAgICAgICA8dGVtcGxhdGUgaXM9ImRvbS1pZiIgaWY9IltbcnVuXV0iPgogICAgICAgICAgICA8IS0tIEV4dHJhIHdyYXBwaW5nIHNwYW4gbmVlZGVkIHRvIGF2b2lkIGZsZXhib3ggYmxvY2tpZmljYXRpb24uIC0tPgogICAgICAgICAgICA8IS0tIChzZWUgZmxleGJveCBzcGVjLCBzZWN0aW9uIDQgIkZsZXggSXRlbXMiKSAtLT4KICAgICAgICAgICAgPHNwYW4+CiAgICAgICAgICAgICAgPHNwYW4KICAgICAgICAgICAgICAgIGl0ZW1wcm9wPSJydW4iCiAgICAgICAgICAgICAgICBpZD0iaGVhZGluZy1ydW4iCiAgICAgICAgICAgICAgICBjbGFzcz0iaGVhZGluZy1sYWJlbCBoZWFkaW5nLXJpZ2h0IHJ1biIKICAgICAgICAgICAgICAgID5bW3J1bl1dPC9zcGFuCiAgICAgICAgICAgICAgPgogICAgICAgICAgICA8L3NwYW4+CiAgICAgICAgICA8L3RlbXBsYXRlPgogICAgICAgIDwvZGl2PgogICAgICAgIDx0ZW1wbGF0ZSBpcz0iZG9tLWlmIiBpZj0iW1tfdGFnTGFiZWxdXSI+CiAgICAgICAgICA8ZGl2IGNsYXNzPSJoZWFkaW5nLXJvdyI+CiAgICAgICAgICAgIDxkaXYgY2xhc3M9ImhlYWRpbmctbGFiZWwiPgogICAgICAgICAgICAgIHRhZzogPHNwYW4gaXRlbXByb3A9InRhZyI+W1tfdGFnTGFiZWxdXTwvc3Bhbj4KICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICA8L2Rpdj4KICAgICAgICA8L3RlbXBsYXRlPgogICAgICAgIDxzbG90Pjwvc2xvdD4KICAgICAgPC9maWdjYXB0aW9uPgogICAgICA8dGVtcGxhdGUgaXM9ImRvbS1pZiIgaWY9IltbZGVzY3JpcHRpb25dXSI+CiAgICAgICAgPHBhcGVyLWljb24tYnV0dG9uCiAgICAgICAgICBpY29uPSJpbmZvIgogICAgICAgICAgb24tdGFwPSJfdG9nZ2xlRGVzY3JpcHRpb25EaWFsb2ciCiAgICAgICAgICB0aXRsZT0iU2hvdyBzdW1tYXJ5IGRlc2NyaXB0aW9uIgogICAgICAgID48L3BhcGVyLWljb24tYnV0dG9uPgogICAgICA8L3RlbXBsYXRlPgogICAgICA8cGFwZXItZGlhbG9nCiAgICAgICAgaWQ9ImRlc2NyaXB0aW9uRGlhbG9nIgogICAgICAgIG5vLW92ZXJsYXA9IiIKICAgICAgICBob3Jpem9udGFsLWFsaWduPSJhdXRvIgogICAgICAgIHZlcnRpY2FsLWFsaWduPSJhdXRvIgogICAgICA+CiAgICAgICAgPHBhcGVyLWRpYWxvZy1zY3JvbGxhYmxlPgogICAgICAgICAgPHRmLW1hcmtkb3duLXZpZXcgaHRtbD0iW1tkZXNjcmlwdGlvbl1dIj48L3RmLW1hcmtkb3duLXZpZXc+CiAgICAgICAgPC9wYXBlci1kaWFsb2ctc2Nyb2xsYWJsZT4KICAgICAgPC9wYXBlci1kaWFsb2c+CiAgICA8L2Rpdj4KICAgIDxzdHlsZSBpbmNsdWRlPSJ0Zi1jYXJkLWhlYWRpbmctc3R5bGUiPgogICAgICAuY29udGFpbmVyIHsKICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICB9CiAgICAgIC5jb250ZW50IHsKICAgICAgICBmb250LXNpemU6IDEycHg7CiAgICAgICAgZmxleC1ncm93OiAxOwogICAgICB9CiAgICAgIC5uYW1lIHsKICAgICAgICBmb250LXNpemU6IDE0cHg7CiAgICAgIH0KICAgICAgLnJ1biB7CiAgICAgICAgZm9udC1zaXplOiAxMXB4OwogICAgICAgIHdpZHRoOiBhdXRvOwogICAgICAgIGJvcmRlci1yYWRpdXM6IDNweDsKICAgICAgICBmb250LXdlaWdodDogYm9sZDsKICAgICAgICBwYWRkaW5nOiAxcHggNHB4IDJweDsKICAgICAgfQogICA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GRpc3RyaWJ1dGVkIG9uIGFuICJBUyBJUyIgQkFTSVMsCiAgICBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC4KICAgIFNlZSB0aGUgTGljZW5zZSBmb3IgdGhlIHNwZWNpZmljIGxhbmd1YWdlIGdvdmVybmluZyBwZXJtaXNzaW9ucyBhbmQKICAgIGxpbWl0YXRpb25zIHVuZGVyIHRoZSBMaWNlbnNlLgogICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KICAgIC8qCiAgICB0Zi1hdWRpby1sb2FkZXIgbG9hZHMgYW4gaW5kaXZpZHVhbCBhdWRpbyBjbGlwIGZyb20gdGhlIFRlbnNvckJvYXJkCiAgICBiYWNrZW5kLgogICAgKi8KICAgIGxldCBfVGZBdWRpb0xvYWRlciA9IGNsYXNzIF9UZkF1ZGlvTG9hZGVyIGV4dGVuZHMgTGVnYWN5RWxlbWVudE1peGluKFBvbHltZXJFbGVtZW50KSB7CiAgICAgICAgY29uc3RydWN0b3IoKSB7CiAgICAgICAgICAgIHN1cGVyKC4uLmFyZ3VtZW50cyk7CiAgICAgICAgICAgIHRoaXMuX21ldGFkYXRhQ2FuY2VsbGVyID0gbmV3IENhbmNlbGxlcigpOwogICAgICAgICAgICB0aGlzLl9zdGVwcyA9IFtdOwogICAgICAgICAgICB0aGlzLl9hdHRhY2hlZCA9IGZhbHNlOwogICAgICAgIH0KICAgICAgICBnZXQgX3J1bkNvbG9yKCkgewogICAgICAgICAgICB2YXIgcnVuID0gdGhpcy5ydW47CiAgICAgICAgICAgIHJldHVybiBydW5zQ29sb3JTY2FsZShydW4pOwogICAgICAgIH0KICAgICAgICBnZXQgX2hhc0F0TGVhc3RPbmVTdGVwKCkgewogICAgICAgICAgICB2YXIgc3RlcHMgPSB0aGlzLl9zdGVwczsKICAgICAgICAgICAgcmV0dXJuICEhc3RlcHMgJiYgc3RlcHMubGVuZ3RoID4gMDsKICAgICAgICB9CiAgICAgICAgZ2V0IF9oYXNNdWx0aXBsZVN0ZXBzKCkgewogICAgICAgICAgICB2YXIgc3RlcHMgPSB0aGlzLl9zdGVwczsKICAgICAgICAgICAgcmV0dXJuICEhc3RlcHMgJiYgc3RlcHMubGVuZ3RoID4gMTsKICAgICAgICB9CiAgICAgICAgZ2V0IF9tYXhTdGVwSW5kZXgoKSB7CiAgICAgICAgICAgIHZhciBzdGVwcyA9IHRoaXMuX3N0ZXBzOwogICAgICAgICAgICByZXR1cm4gc3RlcHMubGVuZ3RoIC0gMTsKICAgICAgICB9CiAgICAgICAgZ2V0IF9jdXJyZW50RGF0dW0oKSB7CiAgICAgICAgICAgIHZhciBzdGVwcyA9IHRoaXMuX3N0ZXBzOwogICAgICAgICAgICB2YXIgc3RlcEluZGV4ID0gdGhpcy5fc3RlcEluZGV4OwogICAgICAgICAgICByZXR1cm4gc3RlcHNbc3RlcEluZGV4XTsKICAgICAgICB9CiAgICAgICAgZ2V0IF9zYW1wbGVUZXh0KCkgewogICAgICAgICAgICB2YXIgc2FtcGxlID0gdGhpcy5zYW1wbGU7CiAgICAgICAgICAgIHJldHVybiBgJHtzYW1wbGUgKyAxfWA7CiAgICAgICAgfQogICAgICAgIGdldCBfaGFzTXVsdGlwbGVTYW1wbGVzKCkgewogICAgICAgICAgICB2YXIgdG90YWxTYW1wbGVzID0gdGhpcy50b3RhbFNhbXBsZXM7CiAgICAgICAgICAgIHJldHVybiB0b3RhbFNhbXBsZXMgPiAxOwogICAgICAgIH0KICAgICAgICBhdHRhY2hlZCgpIHsKICAgICAgICAgICAgdGhpcy5fYXR0YWNoZWQgPSB0cnVlOwogICAgICAgICAgICB0aGlzLnJlbG9hZCgpOwogICAgICAgIH0KICAgICAgICBfcmVsb2FkT25SdW5UYWdDaGFuZ2UoKSB7CiAgICAgICAgICAgIHRoaXMucmVsb2FkKCk7CiAgICAgICAgfQogICAgICAgIHJlbG9hZCgpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLl9hdHRhY2hlZCkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX21ldGFkYXRhQ2FuY2VsbGVyLmNhbmNlbEFsbCgpOwogICAgICAgICAgICBjb25zdCByb3V0ZXIgPSBnZXRSb3V0ZXIoKTsKICAgICAgICAgICAgY29uc3QgdXJsID0gcm91dGVyLnBsdWdpblJvdXRlKCdhdWRpbycsICcvYXVkaW8nLCBuZXcgVVJMU2VhcmNoUGFyYW1zKHsKICAgICAgICAgICAgICAgIHRhZzogdGhpcy50YWcsCiAgICAgICAgICAgICAgICBydW46IHRoaXMucnVuLAogICAgICAgICAgICAgICAgc2FtcGxlOiBTdHJpbmcodGhpcy5zYW1wbGUpLAogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIGNvbnN0IHVwZGF0ZVN0ZXBzID0gdGhpcy5fbWV0YWRhdGFDYW5jZWxsZXIuY2FuY2VsbGFibGUoKHJlc3VsdCkgPT4gewogICAgICAgICAgICAgICAgaWYgKHJlc3VsdC5jYW5jZWxsZWQpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjb25zdCBkYXRhID0gcmVzdWx0LnZhbHVlOwogICAgICAgICAgICAgICAgY29uc3Qgc3RlcHMgPSBkYXRhLm1hcCh0aGlzLl9jcmVhdGVTdGVwRGF0dW0uYmluZCh0aGlzKSk7CiAgICAgICAgICAgICAgICB0aGlzLnNldCgnX3N0ZXBzJywgc3RlcHMpOwogICAgICAgICAgICAgICAgdGhpcy5zZXQoJ19zdGVwSW5kZXgnLCBzdGVwcy5sZW5ndGggLSAxKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHRoaXMucmVxdWVzdE1hbmFnZXIucmVxdWVzdCh1cmwpLnRoZW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XBsYXRlPgogICAgICAgIDwvZGl2PgogICAgICA8L3RlbXBsYXRlPgogICAgICA8dGVtcGxhdGUgaXM9ImRvbS1pZiIgaWY9IltbX2hhc011bHRpcGxlU3RlcHNdXSI+CiAgICAgICAgPGRpdiBjbGFzcz0iaGVhZGluZy1yb3ciPgogICAgICAgICAgPHBhcGVyLXNsaWRlcgogICAgICAgICAgICBpZD0ic3RlcHMiCiAgICAgICAgICAgIGltbWVkaWF0ZS12YWx1ZT0ie3tfc3RlcEluZGV4fX0iCiAgICAgICAgICAgIG1heD0iW1tfbWF4U3RlcEluZGV4XV0iCiAgICAgICAgICAgIG1heC1tYXJrZXJzPSJbW19tYXhTdGVwSW5kZXhdXSIKICAgICAgICAgICAgc25hcHM9IiIKICAgICAgICAgICAgc3RlcD0iMSIKICAgICAgICAgICAgdmFsdWU9Int7X3N0ZXBJbmRleH19IgogICAgICAgICAgPjwvcGFwZXItc2xpZGVyPgogICAgICAgIDwvZGl2PgogICAgICA8L3RlbXBsYXRlPgogICAgPC90Zi1jYXJkLWhlYWRpbmc+CiAgICA8dGVtcGxhdGUgaXM9ImRvbS1pZiIgaWY9IltbX2hhc0F0TGVhc3RPbmVTdGVwXV0iPgogICAgICA8YXVkaW8KICAgICAgICBjb250cm9scz0iIgogICAgICAgIHNyYyQ9IltbX2N1cnJlbnREYXR1bS51cmxdXSIKICAgICAgICB0eXBlJD0iW1tfY3VycmVudERhdHVtLmNvbnRlbnRUeXBlXV0iCiAgICAgID48L2F1ZGlvPgogICAgICA8dGYtbWFya2Rvd24tdmlldyBodG1sPSJbW19jdXJyZW50RGF0dW0ubGFiZWxdXSI+PC90Zi1tYXJrZG93bi12aWV3PgogICAgPC90ZW1wbGF0ZT4KICAgIDxkaXYgaWQ9Im1haW4tYXVkaW8tY29udGFpbmVyIj48L2Rpdj4KCiAgICA8c3R5bGUgaW5jbHVkZT0idGYtY2FyZC1oZWFkaW5nLXN0eWxlIj4KICAgICAgOmhvc3QgewogICAgICAgIGRpc3BsYXk6IGJsb2NrOwogICAgICAgIHdpZHRoOiAzNTBweDsKICAgICAgICBoZWlnaHQ6IGF1dG87CiAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlOwogICAgICAgIC0tc3RlcC1zbGlkZXIta25vYi1jb2xvcjogIzQyNDI0MjsKICAgICAgICBtYXJnaW4tcmlnaHQ6IDE1cHg7CiAgICAgICAgbWFyZ2luLWJvdHRvbTogMTVweDsKICAgICAgfQoKICAgICAgI3N0ZXBzIHsKICAgICAgICBoZWlnaHQ6IDE1cHg7CiAgICAgICAgbWFyZ2luOiAwIDAgMCAtMTVweDsKICAgICAgICB3aWR0aDogMTAwJTsKICAgICAgICBib3gtc2l6aW5nOiBib3JkZXItYm94OwogICAgICAgIHBhZGRpbmc6IDAgNXB4OyAvKiBzbyB0aGUgc2xpZGVyIGtub2IgZG9lc24ndCBidXR0IG91dCAqLwogICAgICAgIG1hcmdpbi10b3A6IDVweDsKICAgICAgICAtLXBhcGVyLXNsaWRlci1hY3RpdmUtY29sb3I6IHZhcigtLXN0ZXAtc2xpZGVyLWtub2ItY29sb3IpOwogICAgICAgIC0tcGFwZXItc2xpZGVyLWtub2ItY29sb3I6IHZhcigtLXN0ZXAtc2xpZGVyLWtub2ItY29sb3IpOwogICAgICAgIC0tcGFwZXItc2xpZGVyLXBpbi1jb2xvcjogdmFyKC0tc3RlcC1zbGlkZXIta25vYi1jb2xvcik7CiAgICAgICAgLS1wYXBlci1zbGlkZXIta25vYi1zdGFydC1jb2xvcjogdmFyKC0tc3RlcC1zbGlkZXIta25vYi1jb2xvcik7CiAgICAgICAgLS1wYXBlci1zbGlkZXIta25vYi1zdGFydC1ib3JkZXItY29sb3I6IHZhcigtLXN0ZXAtc2xpZGVyLWtub2ItY29sb3IpOwogICAgICAgIC0tcGFwZXItc2xpZGVyLXBpbi1zdGFydC1jb2xvcjogdmFyKC0tc3RlcC1zbGlkZXIta25vYi1jb2xvcik7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgY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G5ldyBSZXF1ZXN0TWFuYWdlcigpOwogICAgICAgIH0KICAgICAgICByZWFkeSgpIHsKICAgICAgICAgICAgc3VwZXIucmVhZHkoKTsKICAgICAgICAgICAgaWYgKHRoaXMucmVsb2FkT25SZWFkeSkKICAgICAgICAgICAgICAgIHRoaXMucmVsb2FkKCk7CiAgICAgICAgfQogICAgICAgIHJlbG9hZCgpIHsKICAgICAgICAgICAgdGhpcy5fZmV0Y2hUYWdzKCkudGhlbigoKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLl9yZWxvYWRBdWRpbygpOwogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgX2ZldGNoVGFncygpIHsKICAgICAgICAgICAgY29uc3QgdXJsID0gZ2V0Um91dGVyKCkucGx1Z2luUm91dGUoJ2F1ZGlvJywgJy90YWdzJyk7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9yZXF1ZXN0TWFuYWdlci5yZXF1ZXN0KHVybCkudGhlbigocnVuVG9UYWdJbmZvKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAobG9kYXNoLmlzRXF1YWwocnVuVG9UYWdJbmZvLCB0aGlzLl9ydW5Ub1RhZ0luZm8pKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gTm8gbmVlZCB0byB1cGRhdGUgYW55dGhpbmcgaWYgdGhlcmUgYXJlIG5vIGNoYW5nZXMuCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgY29uc3QgcnVuVG9UYWcgPSBsb2Rhc2gubWFwVmFsdWVzKHJ1blRvVGFnSW5mbywgKHgpID0+IE9iamVjdC5rZXlzKHgpKTsKICAgICAgICAgICAgICAgIGNvbnN0IHRhZ3MgPSBnZXRUYWdzKHJ1blRvVGFnKTsKICAgICAgICAgICAgICAgIHRoaXMuc2V0KCdfZGF0YU5vdEZvdW5kJywgdGFncy5sZW5ndGggPT09IDApOwogICAgICAgICAgICAgICAgdGhpcy5zZ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Z24oe30sIGl0ZW0sIHsKICAgICAgICAgICAgICAgICAgICBzYW1wbGU6IGksCiAgICAgICAgICAgICAgICAgICAgdG90YWxTYW1wbGVzOiBzYW1wbGVzLAogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNvbnN0IHdpdGhTYW1wbGVzID0gYmFzZUNhdGVnb3JpZXMubWFwKChjYXRlZ29yeSkgPT4gT2JqZWN0LmFzc2lnbih7fSwgY2F0ZWdvcnksIHsKICAgICAgICAgICAgICAgIGl0ZW1zOiBbXS5jb25jYXQuYXBwbHkoW10sIGNhdGVnb3J5Lml0ZW1zLm1hcChleHBsb2RlSXRlbSkpLAogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIHJldHVybiB3aXRoU2FtcGxlczsKICAgICAgICB9CiAgICAgICAgX3RhZ01ldGFkYXRhKHJ1blRvVGFnSW5mbywgcnVuLCB0YWcpIHsKICAgICAgICAgICAgcmV0dXJuIHJ1blRvVGFnSW5mb1tydW5dW3RhZ107CiAgICAgICAgfQogICAgfTsKICAgIFRmQXVkaW9EYXNoYm9hcmQudGVtcGxhdGUgPSBodG1sIGAKICAgIDx0Zi1kYXNoYm9hcmQtbGF5b3V0PgogICAgICA8ZGl2IGNsYXNzPSJzaWRlYmFyIiBzbG90PSJzaWRlYmFyIj4KICAgICAgICA8ZGl2IGNsYXNzPSJzaWRlYmFyLXNlY3Rpb24gcnVucy1zZWxlY3RvciI+CiAgICAgICAgICA8dGYtcnVucy1zZWxlY3RvcgogICAgICAgICAgICBpZD0icnVucy1zZWxlY3RvciIKICAgICAgICAgICAgc2VsZWN0ZWQtcnVucz0ie3tfc2VsZWN0ZWRSdW5zfX0iCiAgICAgICAgICA+PC90Zi1ydW5zLXNlbGVjdG9yPgogICAgICAgIDwvZGl2PgogICAgICA8L2Rpdj4KICAgICAgPGRpdiBjbGFzcz0iY2VudGVyIiBzbG90PSJjZW50ZXIiPgogICAgICAgIDx0ZW1wbGF0ZSBpcz0iZG9tLWlmIiBpZj0iW1tfZGF0YU5vdEZvdW5kXV0iPgogICAgICAgICAgPGRpdiBjbGFzcz0ibm8tZGF0YS13YXJuaW5nIj4KICAgICAgICAgICAgPGgzPk5vIGF1ZGlvIGRhdGEgd2FzIGZvdW5kLjwvaDM+CiAgICAgICAgICAgIDxwPlByb2JhYmxlIGNhdXNlczo8L3A+CiAgICAgICAgICAgIDx1bD4KICAgICAgICAgICAgICA8bGk+WW91IGhhdmVu4oCZdCB3cml0dGVuIGFueSBhdWRpbyBkYXRhIHRvIHlvdXIgZXZlbnQgZmlsZXMuPC9saT4KICAgICAgICAgICAgICA8bGk+VGVuc29yQm9hcmQgY2Fu4oCZdCBmaW5kIHlvdXIgZXZlbnQgZmlsZXMuPC9saT4KICAgICAgICAgICAgPC91bD4KCiAgICAgICAgICAgIDxwPgogICAgICAgICAgICAgIElmIHlvdeKAmXJlIG5ldyB0byB1c2luZyBUZW5zb3JCb2FyZCwgYW5kIHdhbnQgdG8gZmluZCBvdXQgaG93IHRvCiAgICAgICAgICAgICAgYWRkIGRhdGEgYW5kIHNldCB1cCB5b3VyIGV2ZW50IGZpbGVzLCBjaGVjayBvdXQgdGhlCiAgICAgICAgICAgICAgPGEKICAgICAgICAgICAgICAgIGhyZWY9Imh0dHBzOi8vZ2l0aHViLmNvbS90ZW5zb3JmbG93L3RlbnNvcmJvYXJkL2Jsb2IvbWFzdGVyL1JFQURNRS5tZCIKICAgICAgICAgICAgICAgID5SRUFETUU8L2EKICAgICAgICAgICAgICA+CiAgICAgICAgICAgICAgYW5kIHBlcmhhcHMgdGhlCiAgICAgICAgICAgICAgPGEKICAgICAgICAgICAgICAgIGhyZWY9Imh0dHBzOi8vd3d3LnRlbnNvcmZsb3cub3JnL2dldF9zdGFydGVkL3N1bW1hcmllc19hbmRfdGVuc29yYm9hcmQiCiAgICAgICAgICAgICAgICA+VGVuc29yQm9hcmQgdHV0b3JpYWw8L2EKICAgICAgICAgICAgICA+LgogICAgICAgICAgICA8L3A+CgogICAgICAgICAgICA8cD4KICAgICAgICAgICAgICBJZiB5b3UgdGhpbmsgVGVuc29yQm9hcmQgaXMgY29uZmlndXJlZCBwcm9wZXJseSwgcGxlYXNlIHNlZQogICAgICAgICAgICAgIDxhCiAgICAgICAgICAgICAgICBocmVmPSJodHRwczovL2dpdGh1Yi5jb20vdGVuc29yZmxvdy90ZW5zb3Jib2FyZC9ibG9iL21hc3Rlci9SRUFETUUubWQjbXktdGVuc29yYm9hcmQtaXNudC1zaG93aW5nLWFueS1kYXRhLXdoYXRzLXdyb25nIgogICAgICAgICAgICAgICAgPnRoZSBzZWN0aW9uIG9mIHRoZSBSRUFETUUgZGV2b3RlZCB0byBtaXNzaW5nIGRhdGEgcHJvYmxlbXM8L2EKICAgICAgICAgICAgICA+CiAgICAgICAgICAgICAgYW5kIGNvbnNpZGVyIGZpbGluZyBhbiBpc3N1ZSBvbiBHaXRIdWIuCiAgICAgICAgICAgIDwvcD4KICAgICAgICAgIDwvZGl2PgogICAgICAgIDwvdGVtcGxhdGU+CiAgICAgICAgPHRlbXBsYXRlIGlzPSJkb20taWYiIGlmPSJbWyFfZGF0YU5vdEZvdW5kXV0iPgogICAgICAgICAgPHRmLXRhZy1maWx0ZXJlciB0YWctZmlsdGVyPSJ7e190YWdGaWx0ZXJ9fSI+PC90Zi10YWctZmlsdGVyZXI+CiAgICAgICAgICA8dGVtcGxhdGUgaXM9ImRvbS1yZXBlYXQiIGl0ZW1zPSJbW19jYXRlZ29yaWVzXV0iIGFzPSJjYXRlZ29yeSI+CiAgICAgICAgICAgIDx0Zi1jYXRlZ29yeS1wYWdpbmF0ZWQtdmlldwogICAgICAgICAgICAgIGNhdGVnb3J5PSJbW2NhdGVnb3J5XV0iCiAgICAgICAgICAgICAgaW5pdGlhbC1vcGVuZWQ9IltbX3Nob3VsZE9wZW4oaW5kZXgpXV0iCiAgICAgICAgICAgID4KICAgICAgICAgICAgICA8dGVtcGxhdGU+CiAgICAgICAgICAgICAgICA8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yBPUiBDT05ESVRJT05TIE9GIEFOWSBLSU5ELCBlaXRoZXIgZXhwcmVzcyBvciBpbXBsaWVkLgogICAgU2VlIHRoZSBMaWNlbnNlIGZvciB0aGUgc3BlY2lmaWMgbGFuZ3VhZ2UgZ292ZXJuaW5nIHBlcm1pc3Npb25zIGFuZAogICAgbGltaXRhdGlvbnMgdW5kZXIgdGhlIExpY2Vuc2UuCiAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwogICAgbGV0IFRmT3B0aW9uU2VsZWN0b3IgPSBjbGFzcyBUZk9wdGlvblNlbGVjdG9yIGV4dGVuZHMgTGVnYWN5RWxlbWVudE1peGluKFBvbHltZXJFbGVtZW50KSB7CiAgICAgICAgYXR0YWNoZWQoKSB7CiAgICAgICAgICAgIHRoaXMuYXN5bmMoZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgdGhpcy5nZXRFZmZlY3RpdmVDaGlsZHJlbigpLmZvckVhY2goZnVuY3Rpb24gKG5vZGUpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLmxpc3Rlbihub2RlLCAndGFwJywgJ19zZWxlY3RUYXJnZXQnKTsKICAgICAgICAgICAgICAgIH0uYmluZCh0aGlzKSk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICBfc2VsZWN0VGFyZ2V0KGUpIHsKICAgICAgICAgICAgdGhpcy5zZWxlY3RlZElkID0gZS5jdXJyZW50VGFyZ2V0LmlkOwogICAgICAgIH0KICAgICAgICBfc2VsZWN0ZWRJZENoYW5nZWQoKSB7CiAgICAgICAgICAgIHZhciBzZWxlY3RlZCA9IHRoaXMucXVlcnlFZmZlY3RpdmVDaGlsZHJlbignIycgKyB0aGlzLnNlbGVjdGVkSWQpOwogICAgICAgICAgICBpZiAoIXNlbGVjdGVkKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5nZXRFZmZlY3RpdmVDaGlsZHJlbigpLmZvckVhY2goZnVuY3Rpb24gKG5vZGUpIHsKICAgICAgICAgICAgICAgIG5vZGUuY2xhc3NMaXN0LnJlbW92ZSgnc2VsZWN0ZWQnKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHNlbGVjdGVkLmNsYXNzTGlzdC5hZGQoJ3NlbGVjdGVkJyk7CiAgICAgICAgfQogICAgfTsKICAgIFRmT3B0aW9uU2VsZWN0b3IudGVtcGxhdGUgPSBodG1sIGAKICAgIDxkaXYgaWQ9IndyYXAiPgogICAgICA8aDM+W1tuYW1lXV08L2gzPgogICAgICA8ZGl2IGNsYXNzPSJjb250ZW50LXdyYXBwZXIiPjxzbG90Pjwvc2xvdD48L2Rpdj4KICAgIDwvZGl2PgogICAgPHN0eWxlPgogICAgICAuY29udGVudC13cmFwcGVyIDo6c2xvdHRlZCgqKSB7CiAgICAgICAgYmFja2dyb3VuZDogbm9uZTsKICAgICAgICBjb2xvcjogdmFyKC0tdGItdWktZGFyay1hY2NlbnQpOwogICAgICAgIGZvbnQtc2l6ZTogMTNweDsKICAgICAgICBtYXJnaW4tdG9wOiAxMHB4OwogICAgICB9CgogICAgICAuY29udGVudC13cmFwcGVyIDo6c2xvdHRlZCgqKSB7CiAgICAgICAgYmFja2dyb3VuZDogbm9uZTsKICAgICAgICBjb2xvcjogdmFyKC0tdGItdWktZGFyay1hY2NlbnQpOwogICAgICAgIGZvbnQtc2l6ZTogMTNweDsKICAgICAgICBtYXJnaW4tdG9wOiAxMHB4OwogICAgICB9CgogICAgICAuY29udGVudC13cmFwcGVyIDo6c2xvdHRlZCguc2VsZWN0ZWQpIHsKICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiB2YXIoLS10Yi11aS1kYXJrLWFjY2VudCk7CiAgICAgICAgY29sb3I6IHdoaXRlICFpbXBvcnRhbnQ7CiAgICAgIH0KCiAgICAgIGgzIHsKICAgICAgICBjb2xv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nVuVG9UYWdJbmZvLCBkZWZhdWx0RGlzcGxheU5hbWUpIHsKICAgICAgICBsZXQgdW5hbmltb3VzRGlzcGxheU5hbWUgPSB1bmRlZmluZWQ7CiAgICAgICAgY29uc3QgZGVzY3JpcHRpb25Ub1J1bnMgPSB7fTsKICAgICAgICBPYmplY3Qua2V5cyhydW5Ub1RhZ0luZm8pLmZvckVhY2goKHJ1bikgPT4gewogICAgICAgICAgICBjb25zdCBpbmZvID0gcnVuVG9UYWdJbmZvW3J1bl07CiAgICAgICAgICAgIGlmICh1bmFuaW1vdXNEaXNwbGF5TmFtZSA9PT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgICAgICB1bmFuaW1vdXNEaXNwbGF5TmFtZSA9IGluZm8uZGlzcGxheU5hbWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHVuYW5pbW91c0Rpc3BsYXlOYW1lICE9PSBpbmZvLmRpc3BsYXlOYW1lKSB7CiAgICAgICAgICAgICAgICB1bmFuaW1vdXNEaXNwbGF5TmFtZSA9IG51bGw7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGRlc2NyaXB0aW9uVG9SdW5zW2luZm8uZGVzY3JpcHRpb25dID09PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgICAgIGRlc2NyaXB0aW9uVG9SdW5zW2luZm8uZGVzY3JpcHRpb25dID0gW107CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZGVzY3JpcHRpb25Ub1J1bnNbaW5mby5kZXNjcmlwdGlvbl0ucHVzaChydW4pOwogICAgICAgIH0pOwogICAgICAgIGNvbnN0IGRpc3BsYXlOYW1lID0gdW5hbmltb3VzRGlzcGxheU5hbWUgIT0gbnVsbCA/IHVuYW5pbW91c0Rpc3BsYXlOYW1lIDogZGVmYXVsdERpc3BsYXlOYW1lOwogICAgICAgIGNvbnN0IGRlc2NyaXB0aW9uID0gKCgpID0+IHsKICAgICAgICAgICAgY29uc3QgZGVzY3JpcHRpb25zID0gT2JqZWN0LmtleXMoZGVzY3JpcHRpb25Ub1J1bnMpOwogICAgICAgICAgICBpZiAoZGVzY3JpcHRpb25zLmxlbmd0aCA9PT0gMCkgewogICAgICAgICAgICAgICAgcmV0dXJuICcnOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKGRlc2NyaXB0aW9ucy5sZW5ndGggPT09IDEpIHsKICAgICAgICAgICAgICAgIHJldHVybiBkZXNjcmlwdGlvbnNbMF07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBjb25zdCBpdGVtcyA9IGRlc2NyaXB0aW9ucy5tYXAoKGRlc2NyaXB0aW9uKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgY29uc3QgcnVucyA9IGRlc2NyaXB0aW9uVG9SdW5zW2Rlc2NyaXB0aW9uXS5tYXAoKHJ1bikgPT4gewogICAgICAgICAgICAgICAgICAgICAgICAvLyBXZSdyZSBzcGxpY2luZyBwb3RlbnRpYWxseSB1bnNhZmUgZGlzcGxheSBuYW1lcyBpbnRvCiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHNhbml0aXplZCBkZXNjcmlwdGlvbnMsIHNvIHdlIG5lZWQgdG8gc2FuaXRpemUgdGhlbS4KICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc2FmZVJ1biA9IHJ1bgogICAgICAgICAgICAgICAgICAgICAgICAgICAgLnJlcGxhY2UoLzwvZywgJyZsdDsnKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgLnJlcGxhY2UoLz4vZywgJyZndDsnKSAvLyBmb3Igc3ltbWV0cnkgOi0pCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAucmVwbGFjZSgvJi9nLCAnJmFtcDsnKTsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGA8Y29kZT4ke3NhZmVSdW59PC9jb2RlPmA7CiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICAgICAgY29uc3Qgam9pbmVkID0gcnVucy5sZW5ndGggPiAyCiAgICAgICAgICAgICAgICAgICAgICAgID8gcnVucy5zbGljZSgwLCBydW5zLmxlbmd0aCAtIDEpLmpvaW4oJywgJykgKwogICAgICAgICAgICAgICAgICAgICAgICAgICAgJywgYW5kICcgKwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcnVuc1tydW5zLmxlbmd0aCAtIDFdCiAgICAgICAgICAgICAgICAgICAgICAgIDogcnVucy5qb2luKCcgYW5kICcpOwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHJ1bk5vdW4gPSBuZ2V0dGV4dChydW5zLmxlbmd0aCwgJ3J1bicsICdydW5zJyk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGA8bGk+PHA+Rm9yICR7cnVuTm91bn0gJHtqb2luZWR9OjwvcD4ke2Rlc2NyaXB0aW9ufTwvbGk+YDsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgY29uc3QgcHJlZml4ID0gJzxwPjxzdHJvbmc+TXVsdGlwbGUgZGVzY3JpcHRpb25zOjwvc3Ryb25nPjwvcD4nOwogICAgICAgICAgICAgICAgcmV0dXJuIGAke3ByZWZpeH08dWw+JHtpdGVtcy5qb2luKCcnKX08L3VsPmA7CiAgICAgICAgICAgIH0KICAgICAgICB9KSgpOwogICAgICAgIHJldHVybiB7IGRpc3BsYXlOYW1lLCBkZXNjcmlwdGlvbiB9OwogICAgfQogICAgZnVuY3Rpb24gbmdldHRleHQoaywgZW5TaW5ndWxhciwgZW5QbHVyYWwpIHsKICAgICAgICAvLyBQb3RlbnRpYWwgZXh0ZW5zaW9uIHBvaW50IGZvciBwcm9wZXIgaTE4biBpbmZyYXN0cnVjdHVyZSwgaWYgd2UKICAgICAgICAvLyBldmVyIGltcGxlbWVudCBpdC4KICAgICAgICByZXR1cm4gayA9PT0gMSA/IGVuU2luZ3VsYXIgOiBlblBsdXJhbDsKICAgIH0KCiAgICAvKiBDb3B5cmlnaHQgMjAyMCB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ZGlzYWJsZS1uZXh0LWxpbmU6bm8tdW51c2VkLXZhcmlhYmxlCiAgICBjbGFzcyBUZlNtb290aGluZ0lucHV0IGV4dGVuZHMgUG9seW1lckVsZW1lbnQgewogICAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgICAgICBzdXBlciguLi5hcmd1bWVudHMpOwogICAgICAgICAgICB0aGlzLndlaWdodCA9IDAuNjsKICAgICAgICAgICAgdGhpcy5fdXBkYXRlV2VpZ2h0ID0gbG9kYXNoLmRlYm91bmNlKGZ1bmN0aW9uICh2YWwpIHsKICAgICAgICAgICAgICAgIHRoaXMud2VpZ2h0ID0gdmFsOwogICAgICAgICAgICB9LCAyNTApOwogICAgICAgIH0KICAgICAgICBfaW1tZWRpYXRlV2VpZ2h0TnVtYmVyRm9yUGFwZXJTbGlkZXJDaGFuZ2VkKCkgewogICAgICAgICAgICB0aGlzLl9pbnB1dFdlaWdodFN0cmluZ0ZvclBhcGVySW5wdXQgPSB0aGlzLl9pbW1lZGlhdGVXZWlnaHROdW1iZXJGb3JQYXBlclNsaWRlci50b1N0cmluZygpOwogICAgICAgICAgICB0aGlzLl91cGRhdGVXZWlnaHQuY2FsbCh0aGlzLCB0aGlzLl9pbW1lZGlhdGVXZWlnaHROdW1iZXJGb3JQYXBlclNsaWRlcik7CiAgICAgICAgfQogICAgICAgIF9pbnB1dFdlaWdodFN0cmluZ0ZvclBhcGVySW5wdXRDaGFuZ2VkKCkgewogICAgICAgICAgICBpZiAoK3RoaXMuX2lucHV0V2VpZ2h0U3RyaW5nRm9yUGFwZXJJbnB1dCA8IDApIHsKICAgICAgICAgICAgICAgIHRoaXMuX2lucHV0V2VpZ2h0U3RyaW5nRm9yUGFwZXJJbnB1dCA9ICcwJzsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmICgrdGhpcy5faW5wdXRXZWlnaHRTdHJpbmdGb3JQYXBlcklucHV0ID4gMSkgewogICAgICAgICAgICAgICAgdGhpcy5faW5wdXRXZWlnaHRTdHJpbmdGb3JQYXBlcklucHV0ID0gJzEnOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciBkID0gK3RoaXMuX2lucHV0V2VpZ2h0U3RyaW5nRm9yUGFwZXJJbnB1dDsKICAgICAgICAgICAgaWYgKCFpc05hTihkKSkgewogICAgICAgICAgICAgICAgdGhpcy5fdXBkYXRlV2VpZ2h0LmNhbGwodGhpcywgZCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9OwogICAgVGZTbW9vdGhpbmdJbnB1dC50ZW1wbGF0ZSA9IGh0bWwgYAogICAgPGgzIGNsYXNzPSJ0aXRsZSI+U21vb3RoaW5nPC9oMz4KICAgIDxkaXYgY2xhc3M9InNtb290aGluZy1ibG9jayI+CiAgICAgIDxwYXBlci1zbGlkZXIKICAgICAgICBpZD0ic2xpZGVyIgogICAgICAgIGltbWVkaWF0ZS12YWx1ZT0ie3tfaW1tZWRpYXRlV2VpZ2h0TnVtYmVyRm9yUGFwZXJTbGlkZXJ9fSIKICAgICAgICBtYXg9IltbbWF4XV0iCiAgICAgICAgbWluPSJbW21pbl1dIgogICAgICAgIHBpbgogICAgICAgIHN0ZXA9Iltbc3RlcF1dIgogICAgICAgIHR5cGU9Im51bWJlciIKICAgICAgICB2YWx1ZT0ie3t3ZWlnaHR9fSIKICAgICAgPjwvcGFwZXItc2xpZGVyPgogICAgICA8cGFwZXItaW5wdXQKICAgICAgICBpZD0iaW5wdXQiCiAgICAgICAgbGFiZWw9IndlaWdodCIKICAgICAgICBuby1sYWJlbC1mbG9hdAogICAgICAgIHZhbHVlPSJ7e19pbnB1dFdlaWdodFN0cmluZ0ZvclBhcGVySW5wdXR9fSIKICAgICAgICB0eXBlPSJudW1iZXIiCiAgICAgICAgc3RlcD0iW1tzdGVwXV0iCiAgICAgICAgbWluPSJbW21pbl1dIgogICAgICAgIG1heD0iW1ttYXhdXSIKICAgICAgPjwvcGFwZXItaW5wdXQ+CiAgICA8L2Rpdj4KICAgIDxzdHl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nRhaW5lci1pbnB1dDogewogICAgICAgICAgZm9udC1zaXplOiAxNHB4OwogICAgICAgIH0KICAgICAgICAtLXBhcGVyLWlucHV0LWNvbnRhaW5lci1sYWJlbDogewogICAgICAgICAgZm9udC1zaXplOiAxNHB4OwogICAgICAgIH0KICAgICAgICB3aWR0aDogNjBweDsKICAgICAgfQogICAgPC9zdHlsZT4KICBgOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoeyB0eXBlOiBOdW1iZXIgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBOdW1iZXIpCiAgICBdLCBUZlNtb290aGluZ0lucHV0LnByb3RvdHlwZSwgInN0ZXAiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoeyB0eXBlOiBOdW1iZXIgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBOdW1iZXIpCiAgICBdLCBUZlNtb290aGluZ0lucHV0LnByb3RvdHlwZSwgIm1heCIsIHZvaWQgMCk7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7IHR5cGU6IE51bWJlciB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIE51bWJlcikKICAgIF0sIFRmU21vb3RoaW5nSW5wdXQucHJvdG90eXBlLCAibWluIiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsKICAgICAgICAgICAgdHlwZTogTnVtYmVyLAogICAgICAgICAgICBub3RpZnk6IHRydWUsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBOdW1iZXIpCiAgICBdLCBUZlNtb290aGluZ0lucHV0LnByb3RvdHlwZSwgIndlaWdodCIsIHZvaWQgMCk7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7CiAgICAgICAgICAgIHR5cG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5nIGV4cHJlc3Npb25zIGFyZSBlcXVpdmFsZW50OgogICAgICoKICAgICAqICAgICBhZGRQYXJhbXMoImh0dHA6Ly9mb28iLCB7YTogIjEiLCBiOiBbIjIiLCAiMys0Il0sIGM6ICI1In0pCiAgICAgKiAgICAgYWRkUGFyYW1zKCJodHRwOi8vZm9vP2E9MSIsIHtiOiBbIjIiLCAiMys0Il0sIGM6ICI1IiwgZDogdW5kZWZpbmVkfSkKICAgICAqICAgICAiaHR0cDovL2Zvbz9hPTEmYj0yJmI9MyUyQjQmYz01IgogICAgICoKICAgICAqIEBkZXByZWNhdGVkIElmIHVzZWQgd2l0aCBgcm91dGVyLnBsdWdpblJvdXRlYCwgcGxlYXNlIHVzZSB0aGUgcXVlcnlQYXJhbXMKICAgICAqIGFyZ3VtZW50LgogICAgICovCiAgICBmdW5jdGlvbiBhZGRQYXJhbXMoYmFzZVVSTCwgcGFyYW1zKSB7CiAgICAgICAgY29uc3Qga2V5cyA9IE9iamVjdC5rZXlzKHBhcmFtcykKICAgICAgICAgICAgLnNvcnQoKQogICAgICAgICAgICAuZmlsdGVyKChrKSA9PiBwYXJhbXNba10gIT09IHVuZGVmaW5lZCk7CiAgICAgICAgaWYgKCFrZXlzLmxlbmd0aCkgewogICAgICAgICAgICByZXR1cm4gYmFzZVVSTDsgLy8gbm8gbmVlZCB0byBjaGFuZ2UgJy9mb28nIHRvICcvZm9vPycKICAgICAgICB9CiAgICAgICAgY29uc3QgZGVsaW1pdGVyID0gYmFzZVVSTC5pbmRleE9mKCc/JykgIT09IC0xID8gJyYnIDogJz8nOwogICAgICAgIGNvbnN0IHBhcnRzID0gW10uY29uY2F0KC4uLmtleXMubWFwKChrZXkpID0+IHsKICAgICAgICAgICAgY29uc3QgcmF3VmFsdWUgPSBwYXJhbXNba2V5XTsKICAgICAgICAgICAgY29uc3QgdmFsdWVzID0gQXJyYXkuaXNBcnJheShyYXdWYWx1ZSkgPyByYXdWYWx1ZSA6IFtyYXdWYWx1ZV07Ci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oKTsgY29udGludWU7DQogICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6DQogICAgICAgICAgICAgICAgICAgICAgICBpZiAoISh0ID0gXy50cnlzLCB0ID0gdC5sZW5ndGggPiAwICYmIHRbdC5sZW5ndGggLSAxXSkgJiYgKG9wWzBdID09PSA2IHx8IG9wWzBdID09PSAyKSkgeyBfID0gMDsgY29udGludWU7IH0NCiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChvcFswXSA9PT0gMyAmJiAoIXQgfHwgKG9wWzFdID4gdFswXSAmJiBvcFsxXSA8IHRbM10pKSkgeyBfLmxhYmVsID0gb3BbMV07IGJyZWFrOyB9DQogICAgICAgICAgICAgICAgICAgICAgICBpZiAob3BbMF0gPT09IDYgJiYgXy5sYWJlbCA8IHRbMV0pIHsgXy5sYWJlbCA9IHRbMV07IHQgPSBvcDsgYnJlYWs7IH0NCiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0ICYmIF8ubGFiZWwgPCB0WzJdKSB7IF8ubGFiZWwgPSB0WzJdOyBfLm9wcy5wdXNoKG9wKTsgYnJlYWs7IH0NCiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0WzJdKSBfLm9wcy5wb3AoKTsNCiAgICAgICAgICAgICAgICAgICAgICAgIF8udHJ5cy5wb3AoKTsgY29udGludWU7DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIG9wID0gYm9keS5jYWxsKHRoaXNBcmcsIF8pOw0KICAgICAgICAgICAgfSBjYXRjaCAoZSkgeyBvcCA9IFs2LCBlXTsgeSA9IDA7IH0gZmluYWxseSB7IGYgPSB0ID0gMDsgfQ0KICAgICAgICAgICAgaWYgKG9wWzBdICYgNSkgdGhyb3cgb3BbMV07IHJldHVybiB7IHZhbHVlOiBvcFswXSA/IG9wWzFdIDogdm9pZCAwLCBkb25lOiB0cnVlIH07DQogICAgICAgIH0NCiAgICB9DQoNCiAgICBmdW5jdGlvbiBfX2V4cG9ydFN0YXIobSwgZXhwb3J0cykgew0KICAgICAgICBmb3IgKHZhciBwIGluIG0pIGlmICghZXhwb3J0cy5oYXNPd25Qcm9wZXJ0eShwKSkgZXhwb3J0c1twXSA9IG1bcF07DQogICAgfQ0KDQogICAgZnVuY3Rpb24gX192YWx1ZXMobykgew0KICAgICAgICB2YXIgbSA9IHR5cGVvZiBTeW1ib2wgPT09ICJmdW5jdGlvbiIgJiYgb1tTeW1ib2wuaXRlcmF0b3JdLCBpID0gMDsNCiAgICAgICAgaWYgKG0pIHJldHVybiBtLmNhbGwobyk7DQogICAgICAgIHJldHVybiB7DQogICAgICAgICAgICBuZXh0OiBmdW5jdGlvbiAoKSB7DQogICAgICAgICAgICAgICAgaWYgKG8gJiYgaSA+PSBvLmxlbmd0aCkgbyA9IHZvaWQgMDsNCiAgICAgICAgICAgICAgICByZXR1cm4geyB2YWx1ZTogbyAmJiBvW2krK10sIGRvbmU6ICFvIH07DQogICAgICAgICAgICB9DQogICAgICAgIH07DQogICAgfQ0KDQogICAgZnVuY3Rpb24gX19yZWFkKG8sIG4pIHsNCiAgICAgICAgdmFyIG0gPSB0eXBlb2YgU3ltYm9sID09PSAiZnVuY3Rpb24iICYmIG9bU3ltYm9sLml0ZXJhdG9yXTsNCiAgICAgICAgaWYgKCFtKSByZXR1cm4gbzsNCiAgICAgICAgdmFyIGkgPSBtLmNhbGwobyksIHIsIGFyID0gW10sIGU7DQogICAgICAgIHRyeSB7DQogICAgICAgICAgICB3aGlsZSAoKG4gPT09IHZvaWQgMCB8fCBuLS0gPiAwKSAmJiAhKHIgPSBpLm5leHQoKSkuZG9uZSkgYXIucHVzaChyLnZhbHVlKTsNCiAgICAgICAgfQ0KICAgICAgICBjYXRjaCAoZXJyb3IpIHsgZSA9IHsgZXJyb3I6IGVycm9yIH07IH0NCiAgICAgICAgZmluYWxseSB7DQogICAgICAgICAgICB0cnkgew0KICAgICAgICAgICAgICAgIGlmIChyICYmICFyLmRvbmUgJiYgKG0gPSBpWyJyZXR1cm4iXSkpI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ICsgMTsKICAgICAgICAgICAgZWxzZSBoaSA9IG1pZDsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiBsbzsKICAgICAgICB9LAogICAgICAgIHJpZ2h0OiBmdW5jdGlvbihhLCB4LCBsbywgaGkpIHsKICAgICAgICAgIGlmIChsbyA9PSBudWxsKSBsbyA9IDA7CiAgICAgICAgICBpZiAoaGkgPT0gbnVsbCkgaGkgPSBhLmxlbmd0aDsKICAgICAgICAgIHdoaWxlIChsbyA8IGhpKSB7CiAgICAgICAgICAgIHZhciBtaWQgPSBsbyArIGhpID4+PiAxOwogICAgICAgICAgICBpZiAoY29tcGFyZShhW21pZF0sIHgpID4gMCkgaGkgPSBtaWQ7CiAgICAgICAgICAgIGVsc2UgbG8gPSBtaWQgKyAxOwogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIGxvOwogICAgICAgIH0KICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiBhc2NlbmRpbmdDb21wYXJhdG9yJDEoZikgewogICAgICByZXR1cm4gZnVuY3Rpb24oZCwgeCkgewogICAgICAgIHJldHVybiBhc2NlbmRpbmckNChmKGQpLCB4KTsKICAgICAgfTsKICAgIH0KCiAgICB2YXIgYXNjZW5kaW5nQmlzZWN0JDEgPSBiaXNlY3RvciQxKGFzY2VuZGluZyQ0KTsKICAgIHZhciBiaXNlY3RSaWdodCQxID0gYXNjZW5kaW5nQmlzZWN0JDEucmlnaHQ7CiAgICB2YXIgYmlzZWN0TGVmdCQxID0gYXNjZW5kaW5nQmlzZWN0JDEubGVmdDsKCiAgICBmdW5jdGlvbiBwYWlycyQxKGFycmF5LCBmKSB7CiAgICAgIGlmIChmID09IG51bGwpIGYgPSBwYWlyJDE7CiAgICAgIHZhciBpID0gMCwgbiA9IGFycmF5Lmxlbmd0aCAtIDEsIHAgPSBhcnJheVswXSwgcGFpcnMgPSBuZXcgQXJyYXkobiA8IDAgPyAwIDogbik7CiAgICAgIHdoaWxlIChpIDwgbikgcGFpcnNbaV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gICAgICBtZWFuID0gMCwKICAgICAgICAgIHZhbHVlLAogICAgICAgICAgZGVsdGEsCiAgICAgICAgICBzdW0gPSAwOwoKICAgICAgaWYgKHZhbHVlb2YgPT0gbnVsbCkgewogICAgICAgIHdoaWxlICgrK2kgPCBuKSB7CiAgICAgICAgICBpZiAoIWlzTmFOKHZhbHVlID0gbnVtYmVyJDQodmFsdWVzW2ldKSkpIHsKICAgICAgICAgICAgZGVsdGEgPSB2YWx1ZSAtIG1lYW47CiAgICAgICAgICAgIG1lYW4gKz0gZGVsdGEgLyArK207CiAgICAgICAgICAgIHN1bSArPSBkZWx0YSAqICh2YWx1ZSAtIG1lYW4pOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQoKICAgICAgZWxzZSB7CiAgICAgICAgd2hpbGUgKCsraSA8IG4pIHsKICAgICAgICAgIGlmICghaXNOYU4odmFsdWUgPSBudW1iZXIkNCh2YWx1ZW9mKHZhbHVlc1tpXSwgaSwgdmFsdWVzKSkpKSB7CiAgICAgICAgICAgIGRlbHRhID0gdmFsdWUgLSBtZWFuOwogICAgICAgICAgICBtZWFuICs9IGRlbHRhIC8gKyttOwogICAgICAgICAgICBzdW0gKz0gZGVsdGEgKiAodmFsdWUgLSBtZWFuKTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KCiAgICAgIGlmIChtID4gMSkgcmV0dXJuIHN1bSAvIChtIC0gMSk7CiAgICB9CgogICAgZnVuY3Rpb24gZGV2aWF0aW9uJDEoYXJyYXksIGYpIHsKICAgICAgdmFyIHYgPSB2YXJpYW5jZSQxKGFycmF5LCBmKTsKICAgICAgcmV0dXJuIHYgPyBNYXRoLnNxcnQodikgOiB2OwogICAgfQoKICAgIGZ1bmN0aW9uIGV4dGVudCQyKHZhbHVlcywgdmFsdWVvZikgewogICAgICB2YXIgbiA9IHZhbHVlcy5sZW5ndGgsCiAgICAgICAgICBpID0gLTEsCiAgICAgICAgICB2YWx1ZSwKICAgICAgICAgIG1pbiwKICAgICAgICAgIG1heDsKCiAgICAgIGlmICh2YWx1ZW9mID09IG51bGwpIHsKICAgICAgICB3aGlsZSAoKytpIDwgbikgeyAvLyBGaW5kIHRoZSBmaXJzdCBjb21wYXJhYmxlIHZhbHVlLgogICAgICAgICAgaWYgKCh2YWx1ZSA9IHZhbHVlc1tpXSkgIT0gbnVsbCAmJiB2YWx1ZSA+PSB2YWx1ZSkgewogICAgICAgICAgICBtaW4gPSBtYXggPSB2YWx1ZTsKICAgICAgICAgICAgd2hpbGUgKCsraSA8IG4pIHsgLy8gQ29tcGFyZSB0aGUgcmVtYWluaW5nIHZhbHVlcy4KICAgICAgICAgICAgICBpZiAoKHZhbHVlID0gdmFsdWVzW2ldKSAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICBpZiAobWluID4gdmFsdWUpIG1pbiA9IHZhbHVlOwogICAgICAgICAgICAgICAgaWYgKG1heCA8IHZhbHVlKSBtYXggPSB2YWx1ZTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KCiAgICAgIGVsc2UgewogICAgICAgIHdoaWxlICgrK2kgPCBuKSB7IC8vIEZpbmQgdGhlIGZpcnN0IGNvbXBhcmFibGUgdmFsdWUuCiAgICAgICAgICBpZiAoKHZhbHVlID0gdmFsdWVvZih2YWx1ZXNbaV0sIGksIHZhbHVlcykpICE9IG51bGwgJiYgdmFsdWUgPj0gdmFsdWUpIHsKICAgICAgICAgICAgbWluID0gbWF4ID0gdmFsdWU7CiAgICAgICAgICAgIHdoaWxlICgrK2kgPCBuKSB7IC8vIENvbXBhcmUgdGhlIHJlbWFpbmluZyB2YWx1ZXMuCiAgICAgICAgICAgICAgaWYgKCh2YWx1ZSA9IHZhbHVlb2YodmFsdWVzW2ldLCBpLCB2YWx1ZXMpKSAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICBpZiAobWluID4gdmFsdWUpIG1pbiA9IHZhbHVlOwogICAgICAgICAgICAgICAgaWYgKG1heCA8IHZhbHVlKSBtYXggPSB2YWx1ZTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KCiAgICAgIHJldHVybiBbbWluLCBtYXhdOwogICAgfQoKICAgIHZhciBhcnJheSQ0ID0gQXJyYXkucHJvdG90eXBlOwoKICAgIHZhciBzbGljZSQ3ID0gYXJyYXkkNC5zbGljZTsKICAgIHZhciBtYXAkNCA9IGFycmF5JDQubWFwOwoKICAgIGZ1bmN0aW9uIGNvbnN0YW50JGUoeCkgewogICAgICByZXR1cm4gZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuIHg7CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gaWRlbnRpdHkkYSh4KSB7CiAgICAgIHJldHVybiB4OwogICAgfQoKICAgIGZ1bmN0aW9uIHJhbmdlJDEoc3RhcnQsIHN0b3AsIHN0ZXApIHsKICAgICAgc3RhcnQgPSArc3RhcnQsIHN0b3AgPSArc3RvcCwgc3RlcCA9IChuID0gYXJndW1lbnRzLmxlbmd0aCkgPCAyID8gKHN0b3AgPSBzdGFydCwgc3RhcnQgPSAwLCAxKSA6IG4gPCAzID8gMSA6ICtzdGVwOwoKICAgICAgdmFyIGkgPSAtMSwKICAgICAgICAgIG4gPSBNYXRoLm1heCgwLCBNYXRoLmNlaWwoKHN0b3AgLSBzdGFydCkgLyBzdGVwKSkgfCAwLAogICAgICAgICAgcmFuZ2UgPSBuZXcgQXJyYXkobik7CgogICAgICB3aGlsZSAoKytpIDwgbikgewogICAgICAgIHJhbmdlW2ldID0gc3RhcnQgKyBpICogc3RlcDsKICAgICAgfQoKICAgICAgcmV0dXJuIHJhbmdlOwogICAgfQoKICAgIHZhciBlMTAkMSA9IE1hdGguc3FydCg1MCksCiAgICAgICAgZTUkMSA9IE1hdGguc3FydCgxMCksCiAgICAgICAgZTIkMSA9IE1hdGguc3FydCgyKTsKCiAgICBmdW5jdGlvbiB0aWNrc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ICAgICAgcmV0dXJuIHN0b3AgPCBzdGFydCA/IC1zdGVwMSA6IHN0ZXAxOwogICAgfQoKICAgIGZ1bmN0aW9uIHN0dXJnZXModmFsdWVzKSB7CiAgICAgIHJldHVybiBNYXRoLmNlaWwoTWF0aC5sb2codmFsdWVzLmxlbmd0aCkgLyBNYXRoLkxOMikgKyAxOwogICAgfQoKICAgIGZ1bmN0aW9uIGhpc3RvZ3JhbSQxKCkgewogICAgICB2YXIgdmFsdWUgPSBpZGVudGl0eSRhLAogICAgICAgICAgZG9tYWluID0gZXh0ZW50JDIsCiAgICAgICAgICB0aHJlc2hvbGQgPSBzdHVyZ2VzOwoKICAgICAgZnVuY3Rpb24gaGlzdG9ncmFtKGRhdGEpIHsKICAgICAgICB2YXIgaSwKICAgICAgICAgICAgbiA9IGRhdGEubGVuZ3RoLAogICAgICAgICAgICB4LAogICAgICAgICAgICB2YWx1ZXMgPSBuZXcgQXJyYXkobik7CgogICAgICAgIGZvciAoaSA9IDA7IGkgPCBuOyArK2kpIHsKICAgICAgICAgIHZhbHVlc1tpXSA9IHZhbHVlKGRhdGFbaV0sIGksIGRhdGEpOwogICAgICAgIH0KCiAgICAgICAgdmFyIHh6ID0gZG9tYWluKHZhbHVlcyksCiAgICAgICAgICAgIHgwID0geHpbMF0sCiAgICAgICAgICAgIHgxID0geHpbMV0sCiAgICAgICAgICAgIHR6ID0gdGhyZXNob2xkKHZhbHVlcywgeDAsIHgxKTsKCiAgICAgICAgLy8gQ29udmVydCBudW1iZXIgb2YgdGhyZXNob2xkcyBpbnRvIHVuaWZvcm0gdGhyZXNob2xkcy4KICAgICAgICBpZiAoIUFycmF5LmlzQXJyYXkodHopKSB7CiAgICAgICAgICB0eiA9IHRpY2tTdGVwJDEoeDAsIHgxLCB0eik7CiAgICAgICAgICB0eiA9IHJhbmdlJDEoTWF0aC5jZWlsKHgwIC8gdHopICogdHosIE1hdGguZmxvb3IoeDEgLyB0eikgKiB0eiwgdHopOyAvLyBleGNsdXNpd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x1ZTsKICAgICAgICAgICAgd2hpbGUgKCsraSA8IG4pIHsgLy8gQ29tcGFyZSB0aGUgcmVtYWluaW5nIHZhbHVlcy4KICAgICAgICAgICAgICBpZiAoKHZhbHVlID0gdmFsdWVzW2ldKSAhPSBudWxsICYmIHZhbHVlID4gbWF4KSB7CiAgICAgICAgICAgICAgICBtYXggPSB2YWx1ZTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KCiAgICAgIGVsc2UgewogICAgICAgIHdoaWxlICgrK2kgPCBuKSB7IC8vIEZpbmQgdGhlIGZpcnN0IGNvbXBhcmFibGUgdmFsdWUuCiAgICAgICAgICBpZiAoKHZhbHVlID0gdmFsdWVvZih2YWx1ZXNbaV0sIGksIHZhbHVlcykpICE9IG51bGwgJiYgdmFsdWUgPj0gdmFsdWUpIHsKICAgICAgICAgICAgbWF4ID0gdmFsdWU7CiAgICAgICAgICAgIHdoaWxlICgrK2kgPCBuKSB7IC8vIENvbXBhcmUgdGhlIHJlbWFpbmluZyB2YWx1ZXMuCiAgICAgICAgICAgICAgaWYgKCh2YWx1ZSA9IHZhbHVlb2YodmFsdWVzW2ldLCBpLCB2YWx1ZXMpKSAhPSBudWxsICYmIHZhbHVlID4gbWF4KSB7CiAgICAgICAgICAgICAgICBtYXggPSB2YWx1ZTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KCiAgICAgIHJldHVybiBtYXg7CiAgICB9CgogICAgZnVuY3Rpb24gbWVhbiQxKHZhbHVlcywgdmFsdWVvZikgewogICAgICB2YXIgbiA9IHZhbHVlcy5sZW5ndGgsCiAgICAgICAgICBtID0gbiwKICAgICAgICAgIGkgPSAtMSwKICAgICAgICAgIHZhbHVlLAogICAgICAgICAgc3VtID0gMDsKCiAgICAgIGlmICh2YWx1ZW9mID09IG51bGwpIHsKICAgICAgICB3aGlsZSAoKytpIDwgbikgewogICAgICAgICAgaWYgKCFpc05hTih2YWx1ZSA9IG51bWJlciQ0KHZhbHVlc1tpXSkpKSBzdW0gKz0gdmFsdWU7CiAgICAgICAgICBlbHNlIC0tbTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIGVsc2UgewogICAgICAgIHdoaWxlICgrK2kgPCBuKSB7CiAgICAgICAgICBpZiAoIWlzTmFOKHZhbHVlID0gbnVtYmVyJDQodmFsdWVvZih2YWx1ZXNbaV0sIGksIHZhbHVlcykpKSkgc3VtICs9IHZhbHVlOwogICAgICAgICAgZWxzZSAtLW07CiAgICAgICAgfQogICAgICB9CgogICAgICBpZiAobSkgcmV0dXJuIHN1bSAvIG07CiAgICB9CgogICAgZnVuY3Rpb24gbWVkaWFuJDEodmFsdWVzLCB2YWx1ZW9mKSB7CiAgICAgIHZhciBuID0gdmFsdWVzLmxlbmd0aCwKICAgICAgICAgIGkgPSAtMSwKICAgICAgICAgIHZhbHVlLAogICAgICAgICAgbnVtYmVycyA9IFtdOwoKICAgICAgaWYgKHZhbHVlb2YgPT0gbnVsbCkgewogICAgICAgIHdoaWxlICgrK2kgPCBuKSB7CiAgICAgICAgICBpZiAoIWlzTmFOKHZhbHVlID0gbnVtYmVyJDQodmFsdWVzW2ldKSkpIHsKICAgICAgICAgICAgbnVtYmVycy5wdXNoKHZhbHVlKTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KCiAgICAgIGVsc2UgewogICAgICAgIHdoaWxlICgrK2kgPCBuKSB7CiAgICAgICAgICBpZiAoIWlzTmFOKHZhbHVlID0gbnVtYmVyJDQodmFsdWVvZih2YWx1ZXNbaV0sIGksIHZhbHVlcykpKSkgewogICAgICAgICAgICBudW1iZXJzLnB1c2godmFsdWUpOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQoKICAgICAgcmV0dXJuIHF1YW50aWxlJDEobnVtYmVycy5zb3J0KGFzY2VuZGluZyQ0KSwgMC41KTsKICAgIH0KCiAgICBmdW5jdGlvbiBtZXJnZSQxKGFycmF5cykgewogICAgICB2YXIgbiA9IGFycmF5cy5sZW5ndGgsCiAgICAgICAgICBtLAogICAgICAgICAgaSA9IC0xLAogICAgICAgICAgaiA9IDAsCiAgICAgICAgICBtZXJnZWQsCiAgICAgICAgICBhcnJheTsKCiAgICAgIHdoaWxlICgrK2kgPCBuKSBqICs9IGFycmF5c1tpXS5sZW5ndGg7CiAgICAgIG1lcmdlZCA9IG5ldyBBcnJheShqKTsKCiAgICAgIHdoaWxlICgtLW4gPj0gMCkgewogICAgICAgIGFycmF5ID0gYXJyYXlzW25dOwogICAgICAgIG0gPSBhcnJheS5sZW5ndGg7CiAgICAgICAgd2hpbGUgKC0tbSA+PSAwKSB7CiAgICAgICAgICBtZXJnZWRbLS1qXSA9IGFycmF5W21dOwogICAgICAgIH0KICAgICAgfQoKICAgICAgcmV0dXJuIG1lcmdlZDsKICAgIH0KCiAgICBmdW5jdGlvbiBtaW4kMih2YWx1ZXMsIHZhbHVlb2YpIHsKICAgICAgdmFyIG4gPSB2YWx1ZXMubGVuZ3RoLAogICAgICAgICAgaSA9IC0xLAogICAgICAgICAgdmFsdWUsCiAgICAgICAgICBtaW47CgogICAgICBpZiAodmFsdWVvZiA9PSBudWxsKSB7CiAgICAgICAgd2hpbGUgKCsraSA8IG4pIHsgLy8gRmluZCB0aGUgZmlyc3QgY29tcGFyYWJsZSB2YWx1ZS4KICAgICAgICAgIGlmICgodmFsdWUgPSB2YWx1ZXNbaV0pICE9IG51bGwgJiYgdmFsdWUgPj0gdmFsdWUpIHsKICAgICAgICAgICAgbWluID0gdmFsdWU7CiAgICAgICAgICAgIHdoaWxlICgrK2kgPCBuKSB7IC8vIENvbXBhcmUgdGhlIHJlbWFpbmluZyB2YWx1ZXMuCiAgICAgICAgICAgICAgaWYgKCh2YWx1ZSA9IHZhbHVlc1tpXSkgIT0gbnVsbCAmJiBtaW4gPiB2YWx1ZSkgewogICAgICAgICAgICAgICAgbWluID0gdmFsdWU7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CgogICAgICBlbHNlIHsKICAgICAgICB3aGlsZSAoKytpIDwgbikgeyAvLyBGaW5kIHRoZSBmaXJzdCBjb21wYXJhYmxlIHZhbHVlLgogICAgICAgICAgaWYgKCh2YWx1ZSA9IHZhbHVlb2YodmFsdWVzW2ldLCBpLCB2YWx1ZXMpKSAhPSBudWxsICYmIHZhbHVlID49IHZhbHVlKSB7CiAgICAgICAgICAgIG1pbiA9IHZhbHVlOwogICAgICAgICAgICB3aGlsZSAoKytpIDwgbikgeyAvLyBDb21wYXJlIHRoZSByZW1haW5pbmcgdmFsdWVzLgogICAgICAgICAgICAgIGlmICgodmFsdWUgPSB2YWx1ZW9mKHZhbHVlc1tpXSwgaSwgdmFsdWVzKSkgIT0gbnVsbCAmJiBtaW4gPiB2YWx1ZSkgewogICAgICAgICAgICAgICAgbWluID0gdmFsdWU7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CgogICAgICByZXR1cm4gbWluOwogICAgfQoKICAgIGZ1bmN0aW9uIHBlcm11dGUkMShhcnJheSwgaW5kZXhlcykgewogICAgICB2YXIgaSA9IGluZGV4ZXMubGVuZ3RoLCBwZXJtdXRlcyA9IG5ldyBBcnJheShpKTsKICAgICAgd2hpbGUgKGktLSkgcGVybXV0ZXNbaV0gPSBhcnJheVtpbmRleGVzW2ldXTsKICAgICAgcmV0dXJuIHBlcm11dGVzOwogICAgfQoKICAgIGZ1bmN0aW9uIHNjYW4kMSh2YWx1ZXMsIGNvbXBhcmUpIHsKICAgICAgaWYgKCEobiA9IHZhbHVlcy5sZW5ndGgpKSByZXR1cm47CiAgICAgIHZhciBuLAogICAgICAgICAgaSA9IDAsCiAgICAgICAgICBqID0gMCwKICAgICAgICAgIHhpLAogICAgICAgICAgeGogPSB2YWx1ZXNbal07CgogICAgICBpZiAoY29tcGFyZSA9PSBudWxsKSBjb21wYXJlID0gYXNjZW5kaW5nJDQ7CgogICAgICB3aGlsZSAoKytpIDwgbikgewogICAgICAgIGlmIChjb21wYXJlKHhpID0gdmFsdWVzW2ldLCB4aikgPCAwIHx8IGNvbXBhcmUoeGosIHhqKSAhPT0gMCkgewogICAgICAgICAgeGogPSB4aSwgaiA9IGk7CiAgICAgICAgfQogICAgICB9CgogICAgICBpZiAoY29tcGFyZSh4aiwgeGopID09PSAwKSByZXR1cm4gajsKICAgIH0KCiAgICBmdW5jdGlvbiBzaHVmZmxlJDIoYXJyYXksIGkwLCBpMSkgewogICAgICB2YXIgbSA9IChpMSA9PSBudWxsID8gYXJyYXkubGVuZ3RoIDogaTEpIC0gKGkwID0gaTAgPT0gbnVsbCA/IDAgOiAraTApLAogICAgICAgICAgdCwKICAgICAgICAgIGk7CgogICAgICB3aGlsZSAobSkgewogICAgICAgIGkgPSBNYXRoLnJhbmRvbSgpICogbS0tIHwgMDsKICAgICAgICB0ID0gYXJyYXlbbSArIGkwXTsKICAgICAgICBhcnJheVttICsgaTBdID0gYXJyYXlbaSArIGkwXTsKICAgICAgICBhcnJheVtpICsgaTBdID0gdDsKICAgICAgfQoKICAgICAgcmV0dXJuIGFycmF5OwogICAgfQoKICAgIGZ1bmN0aW9uIHN1bSQzKHZhbHVlcywgdmFsdWVvZikgewogICAgICB2YXIgbiA9IHZhbHVlcy5sZW5ndGgsCiAgICAgICAgICBpID0gLTEsCiAgICAgICAgICB2YWx1ZSwKICAgICAgICAgIHN1bSA9IDA7CgogICAgICBpZiAodmFsdWVvZiA9PSBudWxsKSB7CiAgICAgICAgd2hpbGUgKCsraSA8IG4pIHsKICAgICAgICAgIGlmICh2YWx1ZSA9ICt2YWx1ZXNbaV0pIHN1bSArPSB2YWx1ZTsgLy8gTm90ZTogemVybyBhbmQgbnVsbCBhcmUgZXF1aXZhbGVudC4KICAgICAgICB9CiAgICAgIH0KCiAgICAgIGVsc2UgewogICAgICAgIHdoaWxlICgrK2kgPCBuKSB7CiAgICAgICAgICBpZiAodmFsdWUgPSArdmFsdWVvZih2YWx1ZXNbaV0sIGksIHZhbHVlcykpIHN1bSArPSB2YWx1ZTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIHJldHVybiBzdW07CiAgICB9CgogICAgZnVuY3Rpb24gdHJhbnNwb3NlJDEobWF0cml4KSB7CiAgICAgIGlmICghKG4gPSBtYXRyaXgubGVuZ3RoKSkgcmV0dXJuIFtdOwogICAgICBmb3IgKHZhciBpID0gLTEsIG0gPSBtaW4kMihtYXRyaXgsIGxlbmd0aCQzKSwgdHJhbnNwb3NlID0gbmV3IEFycmF5KG0pOyArK2kgPCBtOykgewogICAgICAgIGZvciAodmFyIGogPSAtMSwgbiwgcm93ID0gdHJhbnNwb3NlW2ldID0gbmV3IEFycmF5KG4pOyArK2ogPCBuOykgewogICAgICAgICAgcm93W2pdID0gbWF0cml4W2pdW2ldOwogICAgICAgIH0KICAgICAgfQogICAgICByZXR1cm4gdHJhbnNwb3NlOwogICAgfQoKICAgIGZ1bmN0aW9uIGxlbmd0aCQzKGQpIHsKICAgICAgcmV0dXJuIGQubGVuZ3RoOwogICAgfQoKICAgIGZ1bmN0aW9uIHppcCQxKCkgewogICAgICByZXR1cm4gdHJhbnNwb3NlJDEoYXJndW1lbnRzKTsKICAgIH0KCiAgICB2YXIgc2xpY2UkOCA9IEFycmF5LnByb3RvdHlwZS5zbGljZTsKCiAgICBmdW5jdGlvbiBpZGVudGl0eSRiKHgpIHsKICAgICAgcmV0dXJuIHg7CiAgICB9CgogICAgdmFyIHRvcCQxID0gMSwKICAgICAgICByaWdodCQxID0gMiwKICAgICAgICBib3R0b20kMSA9IDMsCiAgICAgICAgbGVmdCQxID0gNCwKICAgICAgICBlcHNpbG9uJDUgPSAxZS02OwoKICAgIGZ1bmN0aW9uIHRyYW5zbGF0ZVgkMSh4KSB7CiAgICAgIHJldHVybiAidHJhbnNsYXRlKCIgKyAoeCArIDAuNSkgKyAiLDApIjsKICAgI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ayIpLmRhdGEodmFsdWVzLCBzY2FsZSkub3JkZXIoKSwKICAgICAgICAgICAgdGlja0V4aXQgPSB0aWNrLmV4aXQoKSwKICAgICAgICAgICAgdGlja0VudGVyID0gdGljay5lbnRlcigpLmFwcGVuZCgiZyIpLmF0dHIoImNsYXNzIiwgInRpY2siKSwKICAgICAgICAgICAgbGluZSA9IHRpY2suc2VsZWN0KCJsaW5lIiksCiAgICAgICAgICAgIHRleHQgPSB0aWNrLnNlbGVjdCgidGV4dCIpOwoKICAgICAgICBwYXRoID0gcGF0aC5tZXJnZShwYXRoLmVudGVyKCkuaW5zZXJ0KCJwYXRoIiwgIi50aWNrIikKICAgICAgICAgICAgLmF0dHIoImNsYXNzIiwgImRvbWFpbiIpCiAgICAgICAgICAgIC5hdHRyKCJzdHJva2UiLCAiIzAwMCIpKTsKCiAgICAgICAgdGljayA9IHRpY2subWVyZ2UodGlja0VudGVyKTsKCiAgICAgICAgbGluZSA9IGxpbmUubWVyZ2UodGlja0VudGVyLmFwcGVuZCgibGluZSIpCiAgICAgICAgICAgIC5hdHRyKCJzdHJva2UiLCAiIzAwMCIpCiAgICAgICAgICAgIC5hdHRyKHggKyAiMiIsIGsgKiB0aWNrU2l6ZUlubmVyKSk7CgogICAgICAgIHRleHQgPSB0ZXh0Lm1lcmdlKHRpY2tFbnRlci5hcHBlbmQoInRleHQiKQogICAgICAgICAgICAuYXR0cigiZmlsbCIsICIjMDAwIikKICAgICAgICAgICAgLmF0dHIoeCwgayAqIHNwYWNpbmcpCiAgICAgICAgICAgIC5hdHRyKCJkeSIsIG9yaWVudCA9PT0gdG9wJDEgPyAiMGVtIiA6IG9yaWVudCA9PT0gYm90dG9tJDEgPyAiMC43MWVtIiA6ICIwLjMyZW0iKSk7CgogICAgICAgIGlmIChjb250ZXh0ICE9PSBzZWxlY3Rpb24pIHsKICAgICAgICAgIHBhdGggPSBwYXRoLnRyYW5zaXRpb24oY29udGV4dCk7CiAgICAgICAgICB0aWNrID0gdGljay50cmFuc2l0aW9uKGNvbnRleHQpOwogICAgICAgICAgbGluZSA9IGxpbmUudHJhbnNpdGlvbihjb250ZXh0KTsKICAgICAgICAgIHRleHQgPSB0ZXh0LnRyYW5zaXRpb24oY29udGV4dCk7CgogICAgICAgICAgdGlja0V4aXQgPSB0aWNrRXhpdC50cmFuc2l0aW9uKGNvbnRleHQpCiAgICAgICAgICAgICAgLmF0dHIoIm9wYWNpdHkiLCBlcHNpbG9uJDUpCiAgICAgICAgICAgICAgLmF0dHIoInRyYW5zZm9ybSIsIGZ1bmN0aW9uKGQpIHsgcmV0dXJuIGlzRmluaXRlKGQgPSBwb3NpdGlvbihkKSkgPyB0cmFuc2Zvcm0oZCkgOiB0aGlzLmdldEF0dHJpYnV0ZSgidHJhbnNmb3JtIik7IH0pOwoKICAgICAgICAgIHRpY2tFbnRlcgogICAgICAgICAgICAgIC5hdHRyKCJvcGFjaXR5IiwgZXBzaWxvbiQ1KQogICAgICAgICAgICAgIC5hdHRyKCJ0cmFuc2Zvcm0iLCBmdW5jdGlvbihkKSB7IHZhciBwID0gdGhpcy5wYXJlbnROb2RlLl9fYXhpczsgcmV0dXJuIHRyYW5zZm9ybShwICYmIGlzRmluaXRlKHAgPSBwKGQpKSA/IHAgOiBwb3NpdGlvbihkKSk7IH0pOwogICAgICAgIH0KCiAgICAgICAgdGlja0V4aXQucmVtb3ZlKCk7CgogICAgICAgIHBhdGgKICAgICAgICAgICAgLmF0dHIoImQiLCBvcmllbnQgPT09IGxlZnQkMSB8fCBvcmllbnQgPT0gcmlnaHQkMQogICAgICAgICAgICAgICAgPyAiTSIgKyBrICogdGlja1NpemVPdXRlciArICIsIiArIHJhbmdlMCArICJIMC41ViIgKyByYW5nZTEgKyAiSCIgKyBrICogdGlja1NpemVPdXRlcgogICAgICAgICAgICAgICAgOiAiTSIgKyByYW5nZTAgKyAiLCIgKyBrICogdGlja1NpemVPdXRlciArICJWMC41SCIgKyByYW5nZTEgKyAiViIgKyBrICogdGlja1NpemVPdXRlcik7CgogICAgICAgIHRpY2sKICAgICAgICAgICAgLmF0dHIoIm9wYWNpdHkiLCAxKQogICAgICAgICAgICAuYXR0cigidHJhbnNmb3JtIiwgZnVuY3Rpb24oZCkgeyByZXR1cm4gdHJhbnNmb3JtKHBvc2l0aW9uKGQpKTsgfSk7CgogICAgICAgIGxpbmUKICAgICAgICAgICAgLmF0dHIoeCArICIyIiwgayAqIHRpY2tTaXplSW5uZXIpOwoKICAgICAgICB0ZXh0CiAgICAgICAgICAgIC5hdHRyKHgsIGsgKiBzcGFjaW5nKQogICAgICAgICAgICAudGV4dChmb3JtYXQpOwoKICAgICAgICBzZWxlY3Rpb24uZmlsdGVyKGVudGVyaW5nJDEpCiAgICAgICAgICAgIC5hdHRyKCJmaWxsIiwgIm5vbmUiKQogICAgICAgICAgICAuYXR0cigiZm9udC1zaXplIiwgMTApCiAgICAgICAgICAgIC5hdHRyKCJmb250LWZhbWlseSIsICJzYW5zLXNlcmlmIikKICAgICAgICAgICAgLmF0dHIoInRleHQtYW5jaG9yIiwgb3JpZW50ID09PSByaWdodCQxID8gInN0YXJ0IiA6IG9yaWVudCA9PT0gbGVmdCQxID8gImVuZCIgOiAibWlkZGxlIik7CgogICAgICAgIHNlbGVjdGlvbgogICAgICAgICAgICAuZWFjaChmdW5jdGlvbigpIHsgdGhpcy5fX2F4aXMgPSBwb3NpdGlvbjsgfSk7CiAgICAgIH0KCiAgICAgIGF4aXMuc2NhbGUgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoc2NhbGUgPSBfLCBheGlzKSA6IHNjYWxlOwogICAgICB9OwoKICAgICAgYXhpcy50aWNrcyA9IGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiB0aWNrQXJndW1lbnRzID0gc2xpY2UkOC5jYWxsKGFyZ3VtZW50cyksIGF4aXM7CiAgICAgIH07CgogICAgICBheGlzLnRpY2tBcmd1bWVudHMgPSBmdW5jdGlvbihf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GgsIG0gPSBNYXRoLm1pbihtMCwgbTEpLCBtZXJnZXMgPSBuZXcgQXJyYXkobTApLCBqID0gMDsgaiA8IG07ICsraikgewogICAgICAgIGZvciAodmFyIGdyb3VwMCA9IGdyb3VwczBbal0sIGdyb3VwMSA9IGdyb3VwczFbal0sIG4gPSBncm91cDAubGVuZ3RoLCBtZXJnZSA9IG1lcmdlc1tqXSA9IG5ldyBBcnJheShuKSwgbm9kZSwgaSA9IDA7IGkgPCBuOyArK2kpIHsKICAgICAgICAgIGlmIChub2RlID0gZ3JvdXAwW2ldIHx8IGdyb3VwMVtpXSkgewogICAgICAgICAgICBtZXJnZVtpXSA9IG5vZGU7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CgogICAgICBmb3IgKDsgaiA8IG0wOyArK2opIHsKICAgICAgICBtZXJnZXNbal0gPSBncm91cHMwW2pdOwogICAgICB9CgogICAgICByZXR1cm4gbmV3IFNlbGVjdGlvbiQyKG1lcmdlcywgdGhpcy5fcGFyZW50cyk7CiAgICB9CgogICAgZnVuY3Rpb24gc2VsZWN0aW9uX29yZGVyJDEoKSB7CgogICAgICBmb3IgKHZhciBncm91cHMgPSB0aGlzLl9ncm91cHMsIGogPSAtMSwgbSA9IGdyb3Vwcy5sZW5ndGg7ICsraiA8IG07KSB7CiAgICAgICAgZm9yICh2YXIgZ3JvdXAgPSBncm91cHNbal0sIGkgPSBncm91cC5sZW5ndGggLSAxLCBuZXh0ID0gZ3JvdXBbaV0sIG5vZGU7IC0taSA+PSAwOykgewogICAgICAgICAgaWYgKG5vZGUgPSBncm91cFtpXSkgewogICAgICAgICAgICBpZiAobmV4dCAmJiBub2RlLmNvbXBhcmVEb2N1bWVudFBvc2l0aW9uKG5leHQpIF4gNCkgbmV4dC5wYXJlbnROb2RlLmluc2VydEJlZm9yZShub2RlLCBuZXh0KTsKICAgICAgICAgICAgbmV4dCA9IG5vZGU7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CgogICAgICByZXR1cm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B0aGlzLl9fZGF0YV9fLCBpbmRleCwgZ3JvdXApOwogICAgICAgIH0gZmluYWxseSB7CiAgICAgICAgICBldmVudCQxID0gZXZlbnQwOwogICAgICAgIH0KICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiBwYXJzZVR5cGVuYW1lcyQzKHR5cGVuYW1lcykgewogICAgICByZXR1cm4gdHlwZW5hbWVzLnRyaW0oKS5zcGxpdCgvXnxccysvKS5tYXAoZnVuY3Rpb24odCkgewogICAgICAgIHZhciBuYW1lID0gIiIsIGkgPSB0LmluZGV4T2YoIi4iKTsKICAgICAgICBpZiAoaSA+PSAwKSBuYW1lID0gdC5zbGljZShpICsgMSksIHQgPSB0LnNsaWNlKDAsIGkpOwogICAgICAgIHJldHVybiB7dHlwZTogdCwgbmFtZTogbmFtZX07CiAgICAgIH0pOwogICAgfQoKICAgIGZ1bmN0aW9uIG9uUmVtb3ZlJDEodHlwZW5hbWUpIHsKICAgICAgcmV0dXJuIGZ1bmN0aW9uKCkgewogICAgICAgIHZhciBvbiA9IHRoaXMuX19vbjsKICAgICAgICBpZiAoIW9uKSByZXR1cm47CiAgICAgICAgZm9yICh2YXIgaiA9IDAsIGkgPSAtMSwgbSA9IG9uLmxlbmd0aCwgbzsgaiA8IG07ICsraikgewogICAgICAgICAgaWYgKG8gPSBvbltqXSwgKCF0eXBlbmFtZS50eXBlIHx8IG8udHlwZSA9PT0gdHlwZW5hbWUudHlwZSkgJiYgby5uYW1lID09PSB0eXBlbmFtZS5uYW1lKSB7CiAgICAgICAgICAgIHRoaXMucmVtb3ZlRXZlbnRMaXN0ZW5lcihvLnR5cGUsIG8ubGlzdGVuZXIsIG8uY2FwdHVyZSk7CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICBvblsrK2ldID0gbzsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaWYgKCsraSkgb24ubGVuZ3RoID0gaTsKICAgICAgICBlbHNlIGRlbGV0ZSB0aGlzLl9fb247CiAgICA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uX19vbiA9IFtvXTsKICAgICAgICBlbHNlIG9uLnB1c2gobyk7CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gc2VsZWN0aW9uX29uJDEodHlwZW5hbWUsIHZhbHVlLCBjYXB0dXJlKSB7CiAgICAgIHZhciB0eXBlbmFtZXMgPSBwYXJzZVR5cGVuYW1lcyQzKHR5cGVuYW1lICsgIiIpLCBpLCBuID0gdHlwZW5hbWVzLmxlbmd0aCwgdDsKCiAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoIDwgMikgewogICAgICAgIHZhciBvbiA9IHRoaXMubm9kZSgpLl9fb247CiAgICAgICAgaWYgKG9uKSBmb3IgKHZhciBqID0gMCwgbSA9IG9uLmxlbmd0aCwgbzsgaiA8IG07ICsraikgewogICAgICAgICAgZm9yIChpID0gMCwgbyA9IG9uW2pdOyBpIDwgbjsgKytpKSB7CiAgICAgICAgICAgIGlmICgodCA9IHR5cGVuYW1lc1tpXSkudHlwZSA9PT0gby50eXBlICYmIHQubmFtZSA9PT0gby5uYW1lKSB7CiAgICAgICAgICAgICAgcmV0dXJuIG8udmFsdWU7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuOwogICAgICB9CgogICAgICBvbiA9IHZhbHVlID8gb25BZGQkMSA6IG9uUmVtb3ZlJDE7CiAgICAgIGlmIChjYXB0dXJlID09IG51bGwpIGNhcHR1cmUgPSBmYWxzZTsKICAgICAgZm9yIChpID0gMDsgaSA8IG47ICsraSkgdGhpcy5lYWNoKG9uKHR5cGVuYW1lc1tpXSwgdmFsdWUsIGNhcHR1cmUpKTsKICAgICAgcmV0dXJuIHRoaXM7CiAgICB9CgogICAgZnVuY3Rpb24gY3VzdG9tRXZlbnQkMShldmVudDEsIGxpc3RlbmVyLCB0aGF0LCBhcmdzKSB7CiAgICAgIHZhciBldmVudDAgPSBldmVudCQxOwogICAgICBldmVudDEuc291cmNlRXZlbnQgPSBldmVudCQxOwogICAg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5vY2xpY2spIHsKICAgICAgICBzZWxlY3Rpb24ub24oImNsaWNrLmRyYWciLCBub2V2ZW50JDMsIHRydWUpOwogICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKSB7IHNlbGVjdGlvbi5vbigiY2xpY2suZHJhZyIsIG51bGwpOyB9LCAwKTsKICAgICAgfQogICAgICBpZiAoIm9uc2VsZWN0c3RhcnQiIGluIHJvb3QpIHsKICAgICAgICBzZWxlY3Rpb24ub24oInNlbGVjdHN0YXJ0LmRyYWciLCBudWxsKTsKICAgICAgfSBlbHNlIHsKICAgICAgICByb290LnN0eWxlLk1velVzZXJTZWxlY3QgPSByb290Ll9fbm9zZWxlY3Q7CiAgICAgICAgZGVsZXRlIHJvb3QuX19ub3NlbGVjdDsKICAgICAgfQogICAgfQoKICAgIGZ1bmN0aW9uIGRlZmluZSQxKGNvbnN0cnVjdG9yLCBmYWN0b3J5LCBwcm90b3R5cGUpIHsKICAgICAgY29uc3RydWN0b3IucHJvdG90eXBlID0gZmFjdG9yeS5wcm90b3R5cGUgPSBwcm90b3R5cGU7CiAgICAgIHByb3RvdHlwZS5jb25zdHJ1Y3RvciA9IGNvbnN0cnVjdG9yOwogICAgfQoKICAgIGZ1bmN0aW9uIGV4dGVuZCQxKHBhcmVudCwgZGVmaW5pdGlvbikgewogICAgICB2YXIgcHJvdG90eXBlID0gT2JqZWN0LmNyZWF0ZShwYXJlbnQucHJvdG90eXBlKTsKICAgICAgZm9yICh2YXIga2V5IGluIGRlZmluaXRpb24pIHByb3RvdHlwZVtrZXldID0gZGVmaW5pdGlvbltrZXldOwogICAgICByZXR1cm4gcHJvdG90eXBlOwogICAgfQoKICAgIGZ1bmN0aW9uIENvbG9yJDEoKSB7fQoKICAgIHZhciBkYXJrZXIkMSA9IDAuNzsKICAgIHZhciBicmlnaHRlciQxID0gMSAvIGRhcmtlciQxOwoKICAgIHZhciByZUkkMSA9ICJcXHMqKFsrLV0/XFxkKylcXHMqIiwKICAgICAgICByZU4kM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LCBnLCBiLCBvcGFjaXR5ID09IG51bGwgPyAxIDogb3BhY2l0eSk7CiAgICB9CgogICAgZnVuY3Rpb24gUmdiJDEociwgZywgYiwgb3BhY2l0eSkgewogICAgICB0aGlzLnIgPSArcjsKICAgICAgdGhpcy5nID0gK2c7CiAgICAgIHRoaXMuYiA9ICtiOwogICAgICB0aGlzLm9wYWNpdHkgPSArb3BhY2l0eTsKICAgIH0KCiAgICBkZWZpbmUkMShSZ2IkMSwgcmdiJDEsIGV4dGVuZCQxKENvbG9yJDEsIHsKICAgICAgYnJpZ2h0ZXI6IGZ1bmN0aW9uKGspIHsKICAgICAgICBrID0gayA9PSBudWxsID8gYnJpZ2h0ZXIkMSA6IE1hdGgucG93KGJyaWdodGVyJDEsIGspOwogICAgICAgIHJldHVybiBuZXcgUmdiJDEodGhpcy5yICogaywgdGhpcy5nICogaywgdGhpcy5iICogaywgdGhpcy5vcGFjaXR5KTsKICAgICAgfSwKICAgICAgZGFya2VyOiBmdW5jdGlvbihrKSB7CiAgICAgICAgayA9IGsgPT0gbnVsbCA/IGRhcmtlciQxIDogTWF0aC5wb3coZGFya2VyJDEsIGspOwogICAgICAgIHJldHVybiBuZXcgUmdiJDEodGhpcy5yICogaywgdGhpcy5nICogaywgdGhpcy5iICogaywgdGhpcy5vcGFjaXR5KTsKICAgICAgfSwKICAgICAgcmdiOiBmdW5jdGlvbigpIHsKICAgICAgICByZXR1cm4gdGhpczsKICAgICAgfSwKICAgICAgZGlzcGxheWFibGU6IGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiAoLTAuNSA8PSB0aGlzLnIgJiYgdGhpcy5yIDwgMjU1LjUpCiAgICAgICAgICAgICYmICgtMC41IDw9IHRoaXMuZyAmJiB0aGlzLmcgPCAyNTUuNSkKICAgICAgICAgICAgJiYgKC0wLjUgPD0gdGhpcy5iICYmIHRoaXMuYiA8IDI1NS41KQogICAgICAgICAgICAmJiAoMCA8PSB0aGlzLm9wYWNpdHkgJiYgdGhpcy5v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ID8gIjAiIDogIiIpICsgdmFsdWUudG9TdHJpbmcoMTYpOwogICAgfQoKICAgIGZ1bmN0aW9uIGhzbGEkMShoLCBzLCBsLCBhKSB7CiAgICAgIGlmIChhIDw9IDApIGggPSBzID0gbCA9IE5hTjsKICAgICAgZWxzZSBpZiAobCA8PSAwIHx8IGwgPj0gMSkgaCA9IHMgPSBOYU47CiAgICAgIGVsc2UgaWYgKHMgPD0gMCkgaCA9IE5hTjsKICAgICAgcmV0dXJuIG5ldyBIc2wkMShoLCBzLCBsLCBhKTsKICAgIH0KCiAgICBmdW5jdGlvbiBoc2xDb252ZXJ0JDEobykgewogICAgICBpZiAobyBpbnN0YW5jZW9mIEhzbCQxKSByZXR1cm4gbmV3IEhzbCQxKG8uaCwgby5zLCBvLmwsIG8ub3BhY2l0eSk7CiAgICAgIGlmICghKG8gaW5zdGFuY2VvZiBDb2xvciQxKSkgbyA9IGNvbG9yJDEobyk7CiAgICAgIGlmICghbykgcmV0dXJuIG5ldyBIc2wkMTsKICAgICAgaWYgKG8gaW5zdGFuY2VvZiBIc2wkMSkgcmV0dXJuIG87CiAgICAgIG8gPSBvLnJnYigpOwogICAgICB2YXIgciA9IG8uciAvIDI1NSwKICAgICAgICAgIGcgPSBvLmcgLyAyNTUsCiAgICAgICAgICBiID0gby5iIC8gMjU1LAogICAgICAgICAgbWluID0gTWF0aC5taW4ociwgZywgYiksCiAgICAgICAgICBtYXggPSBNYXRoLm1heChyLCBnLCBiKSwKICAgICAgICAgIGggPSBOYU4sCiAgICAgICAgICBzID0gbWF4IC0gbWluLAogICAgICAgICAgbCA9IChtYXggKyBtaW4pIC8gMjsKICAgICAgaWYgKHMpIHsKICAgICAgICBpZiAociA9PT0gbWF4KSBoID0gKGcgLSBiKSAvIHMgKyAoZyA8IGIpICogNjsKICAgICAgICBlbHNlIGlmIChnID09PSBtYXgpIGggPSAoYiAtIHIpIC8gcyArIDI7CiAgICAgICAgZWxzZSBoID0gKHIgLSBnKSAvIHMgKyA0Ow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ogICAgICByZ2I6IGZ1bmN0aW9uKCkgewogICAgICAgIHZhciBoID0gdGhpcy5oICUgMzYwICsgKHRoaXMuaCA8IDApICogMzYwLAogICAgICAgICAgICBzID0gaXNOYU4oaCkgfHwgaXNOYU4odGhpcy5zKSA/IDAgOiB0aGlzLnMsCiAgICAgICAgICAgIGwgPSB0aGlzLmwsCiAgICAgICAgICAgIG0yID0gbCArIChsIDwgMC41ID8gbCA6IDEgLSBsKSAqIHMsCiAgICAgICAgICAgIG0xID0gMiAqIGwgLSBtMjsKICAgICAgICByZXR1cm4gbmV3IFJnYiQxKAogICAgICAgICAgaHNsMnJnYiQxKGggPj0gMjQwID8gaCAtIDI0MCA6IGggKyAxMjAsIG0xLCBtMiksCiAgICAgICAgICBoc2wycmdiJDEoaCwgbTEsIG0yKSwKICAgICAgICAgIGhzbDJyZ2IkMShoIDwgMTIwID8gaCArIDI0MCA6IGggLSAxMjAsIG0xLCBtMiksCiAgICAgICAgICB0aGlzLm9wYWNpdHkKICAgICAgICApOwogICAgICB9LAogICAgICBkaXNwbGF5YWJsZTogZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuICgwIDw9IHRoaXMucyAmJiB0aGlzLnMgPD0gMSB8fCBpc05hTih0aGlzLnMpKQogICAgICAgICAgICAmJiAoMCA8PSB0aGlzLmwgJiYgdGhpcy5sIDw9IDEpCiAgICAgICAgICAgICYmICgwIDw9IHRoaXMub3BhY2l0eSAmJiB0aGlzLm9wYWNpdHkgPD0gMSk7CiAgICAgIH0sCiAgICAgIGZvcm1hdEhzbDogZnVuY3Rpb24oKSB7CiAgICAgICAgdmFyIGEgPSB0aGlzLm9wYWNpdHk7IGEgPSBpc05hTihhKSA/IDEgOiBNYXRoLm1heCgwLCBNYXRoLm1pbigxLCBhKSk7CiAgICAgICAgcmV0dXJuIChhID09PSAxID8gImhzbCgiIDogImhzbGEoIikKICAgICAgICAgICAgKyAodGhpcy5oIHx8IDApICsgIiwgIgogICAgICAgICAgICArICh0aGlzLnMgfHwgMCkgKiAxMDAgKyAiJSwgIgogICAgICAgICAgICArICh0aGlzLmwgfHwgMCkgKiAxMDAgKyAiJSIKICAgICAgICAgICAgKyAoYSA9PT0gMSA/ICIpIiA6ICIsICIgKyBhICsgIikiKTsKICAgICAgfQogICAgfSkpOwoKICAgIC8qIEZyb20gRnZEIDEzLjM3LCBDU1MgQ29sb3IgTW9kdWxlIExldmVsIDMgKi8KICAgIGZ1bmN0aW9uIGhzbDJyZ2IkMShoLCBtMSwgbTIpIHsKICAgICAgcmV0dXJuIChoIDwgNjAgPyBtMSArIChtMiAtIG0xKSAqIGggLyA2MAogICAgICAgICAgOiBoIDwgMTgwID8gbTIKICAgICAgICAgIDogaCA8IDI0MCA/IG0xICsgKG0yIC0gbTEpICogKDI0MCAtIGgpIC8gNjAKICAgICAgICAgIDogbTEpICogMjU1OwogICAgfQoKICAgIGZ1bmN0aW9uIGNvbnN0YW50JGcoeCkgewogICAgICByZXR1cm4gZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuIHg7CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gbGluZWFyJDMoYSwgZCkgewogICAgICByZXR1cm4gZnVuY3Rpb24odCkgewogICAgICAgIHJldHVybiBhICsgdCAqIGQ7CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gZXhwb25lbnRpYWwkMihhLCBiLCB5KSB7CiAgICAgIHJldHVybiBhID0gTWF0aC5wb3coYSwgeSksIGIgPSBNYXRoLnBvdyhiLCB5KSAtIGEsIHkgPSAxIC8geSwgZnVuY3Rpb24odCkgewogICAgICAgIHJldHVybiBNYXRoLnBvdyhhICsgdCAqIGIsIHkpOwogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIGdhbW1hJDEoeSkgewogICAgICByZXR1cm4gKHkgPSAreSkgPT09IDEgPyBub2dhbW1hJDEgOiBmdW5jdGlvbihhLCBiKSB7CiAgICAgICAgcmV0dXJuIGIgLSBhID8gZXhwb25lbnRpYWwkMihhLCBiLCB5KSA6IGNvbnN0YW50JGcoaXNOYU4oYSkgPyBiIDogYSk7CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gbm9nYW1tYSQxKGEsIGIpIHsKICAgICAgdmFyIGQgPSBiIC0gYTsKICAgICAgcmV0dXJuIGQgPyBsaW5lYXIkMyhhLCBkKSA6IGNvbnN0YW50JGcoaXNOYU4oYSkgPyBiIDogYSk7CiAgICB9CgogICAgdmFyIGludGVycG9sYXRlUmdiJDEgPSAoZnVuY3Rpb24gcmdiR2FtbWEoeSkgewogICAgICB2YXIgY29sb3IgPSBnYW1tYSQxKHkpOwoKICAgICAgZnVuY3Rpb24gcmdiKHN0YXJ0LCBlbmQpIHsKICAgICAgICB2YXIgciA9IGNvbG9yKChzdGFydCA9IHJnYiQxKHN0YXJ0KSkuciwgKGVuZCA9IHJnYiQxKGVuZCkpLnIpLAogICAgICAgICAgICBnID0gY29sb3Ioc3RhcnQuZywgZW5kLmcpLAogICAgICAgICAgICBiID0gY29sb3Ioc3RhcnQuYiwgZW5kLmIpLAogICAgICAgICAgICBvcGFjaXR5ID0gbm9nYW1tYSQxKHN0YXJ0Lm9wYWNpdHksIGVuZC5vcGFjaXR5KTsKICAgICAgICByZXR1cm4gZnVuY3Rpb24odCkgewogICAgICAgICAgc3RhcnQuciA9IHIodCk7CiAgICAgICAgICBzdGFydC5nID0gZyh0KTsKICAgICAgICAgIHN0YXJ0LmIgPSBiKHQpOwogICAgICAgICAgc3RhcnQub3BhY2l0eSA9IG9wYWNpdHkodCk7CiAgICAgICAgICByZXR1cm4gc3RhcnQgKyAiIjsKICAgICAgICB9OwogICAgICB9CgogICAgICByZ2IuZ2FtbWEgPSByZ2JHYW1tYTsKCiAgICAgIHJldHVybiByZ2I7CiAgICB9KSgxKTsKCiAgICBmdW5jdGlvbiBudW1iZXJBcnJheSQxKGEsIGIpIHsKICAgICAgaWYgKCFiKSBiID0gW107CiAgICAgIHZhciBuID0gYSA/IE1hdGgubWluKGIubGVuZ3RoLCBhLmxlbmd0aCkgOiAwLAogICAgICAgICAgYyA9IGIuc2xpY2UoKSwKICAgICAgICAgIGk7CiAgICAgIHJldHVybiBmdW5jdGlvbih0KSB7CiAgICAgICAgZm9yIChpID0gMDsgaSA8IG47ICsraSkgY1tpXSA9IGFbaV0gKiAoMSAtIHQpICsgYltpXSAqIHQ7CiAgICAgICAgcmV0dXJuIGM7CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gaXNOdW1iZXJBcnJheSQxKHgpIHsKICAgICAgcmV0dXJuIEFycmF5QnVmZmVyLmlzVmlldyh4KSAmJiAhKHggaW5zdGFuY2VvZiBEYXRhVmlldyk7CiAgICB9CgogICAgZnVuY3Rpb24gZ2VuZXJpY0FycmF5JDEoYSwgYikgewogICAgICB2YXIgbmIgPSBiID8gYi5sZW5ndGggOiAwLAogICAgICAgICAgbmEgPSBhID8gTWF0aC5taW4obmIsIGEubGVuZ3RoKSA6IDAsCiAgICAgICAgICB4ID0gbmV3IEFycmF5KG5hKSwKICAgICAgICAgIGMgPSBuZXcgQXJyYXkobmIpLAogICAgICAgICAgaTsKCiAgICAgIGZvciAoaSA9IDA7IGkgPCBuYTsgKytpKSB4W2ldID0gaW50ZXJwb2xhdGUkMihhW2ldLCBiW2ldKTsKICAgICAgZm9yICg7IGkgPCBuYjsgKytpKSBjW2ldID0gYltpXTsKCiAgICAgIHJldHVybiBmdW5jdGlvbih0KSB7CiAgICAgICAgZm9yIChpID0gMDsgaSA8IG5hOyArK2kpIGNbaV0gPSB4W2ldKHQpOwogICAgICAgIHJldHVybiBjOwogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIGRhdGUkMihhLCBiKSB7CiAgICAgIHZhciBkID0gbmV3IERhdGU7CiAgICAgIHJldHVybiBhID0gK2EsIGIgPSArYiwgZnVuY3Rpb24odCkgewogICAgICAgIHJldHVybiBkLnNldFRpbWUoYSAqICgxIC0gdCkgKyBiICogdCksIGQ7CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gaW50ZXJwb2xhdGVOdW1iZXIkMShhLCBiKSB7CiAgICAgIHJldHVybiBhID0gK2EsIGIgPSArYiwgZnVuY3Rpb24odCkgewogICAgICAgIHJldHVybiBhICogKDEgLSB0KSArIGIgKiB0OwogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIG9iamVjdCQyKGEsIGIpIHsKICAgICAgdmFyIGkgPSB7fSwKICAgICAgICAgIGMgPSB7fSwKICAgICAgICAgIGs7CgogICAgICBpZiAoYSA9PT0gbnVsbCB8fCB0eXBlb2YgYSAhPT0gIm9iamVjdCIpIGEgPSB7fTsKICAgICAgaWYgKGIgPT09IG51bGwgfHwgdHlwZW9mIGIgIT09ICJvYmplY3QiKSBiID0ge307CgogICAgICBmb3IgKGsgaW4gYikgewogICAgICAgIGlmIChrIGluIGEpIHsKICAgICAgICAgIGlba10gPSBpbnRlcnBvbGF0ZSQyKGFba10sIGJba10pOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICBjW2tdID0gYltrXTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIHJldHVybiBmdW5jdGlvbih0KSB7CiAgICAgICAgZm9yIChrIGluIGkpIGNba10gPSBpW2tdKHQpOwogICAgICAgIHJldHVybiBjOwogICAgICB9OwogICAgfQoKICAgIHZhciByZUEkMSA9IC9bLStdPyg/OlxkK1wuP1xkKnxcLj9cZCspKD86W2VFXVstK10/XGQrKT8vZywKICAgICAgICByZUIkMSA9IG5ldyBSZWdFeHAocmVBJDEuc291cmNlLCAiZyIpOwoKICAgIGZ1bmN0aW9uIHplcm8kMShiKSB7CiAgICAgIHJldHVybiBmdW5jdGlvbigpIHsKICAgICAgICByZXR1cm4gYjsKICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiBvbmUkMShiKSB7CiAgICAgIHJldHVybiBmdW5jdGlvbih0KSB7CiAgICAgICAgcmV0dXJuIGIodCkgKyAiIjsKICAgICAgfTsKICAgIH0KCiAgICBm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MgaW4gYSAmIGIgbWF0Y2gKICAgICAgICAgIGlmIChzW2ldKSBzW2ldICs9IGJtOyAvLyBjb2FsZXNjZSB3aXRoIHByZXZpb3VzIHN0cmluZwogICAgICAgICAgZWxzZSBzWysraV0gPSBibTsKICAgICAgICB9IGVsc2UgeyAvLyBpbnRlcnBvbGF0ZSBub24tbWF0Y2hpbmcgbnVtYmVycwogICAgICAgICAgc1srK2ldID0gbnVsbDsKICAgICAgICAgIHEucHVzaCh7aTogaSwgeDogaW50ZXJwb2xhdGVOdW1iZXIkMShhbSwgYm0pfSk7CiAgICAgICAgfQogICAgICAgIGJpID0gcmVCJDEubGFzdEluZGV4OwogICAgICB9CgogICAgICAvLyBBZGQgcmVtYWlucyBvZiBiLgogICAgICBpZiAoYmkgPCBiLmxlbmd0aCkgewogICAgICAgIGJzID0gYi5zbGljZShiaSk7CiAgICAgICAgaWYgKHNbaV0pIHNbaV0gKz0gYnM7IC8vIGNvYWxlc2NlIHdpdGggcHJldmlvdXMgc3RyaW5nCiAgICAgICAgZWxzZSBzWysraV0gPSBiczsKICAgICAgfQoKICAgICAgLy8gU3BlY2lhbCBvcHRpbWl6YXRpb24gZm9yIG9ubHkgYSBzaW5nbGUgbWF0Y2guCiAgICAgIC8vIE90aGVyd2lzZSwgaW50ZXJwb2xhdGUgZWFjaCBvZiB0aGUgbnVtYmVycyBhbmQgcmVqb2luIHRoZSBzdHJpbmcuCiAgICAgIHJldHVybiBzLmxlbmd0aCA8IDIgPyAocVswXQogICAgICAgICAgPyBvbmUkMShxWzBdLngpCiAgICAgICAgICA6IHplcm8kMShiKSkKICAgICAgICAgIDogKGIgPSBxLmxlbmd0aCwgZnVuY3Rpb24odCkgewogICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwLCBvOyBpIDwgYjsgKytpKSBzWyhvID0gcVtpXSkuaV0gPSBvLngodCk7CiAgICAgICAgICAgICAgcmV0dXJuIHMuam9pbigiIik7CiAgICAgICAgICAgIH0pOwogICAgfQoKICAgI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GVnUGFyZW4pIHsKCiAgICAgIGZ1bmN0aW9uIHBvcChzKSB7CiAgICAgICAgcmV0dXJuIHMubGVuZ3RoID8gcy5wb3AoKSArICIgIiA6ICIiOwogICAgICB9CgogICAgICBmdW5jdGlvbiB0cmFuc2xhdGUoeGEsIHlhLCB4YiwgeWIsIHMsIHEpIHsKICAgICAgICBpZiAoeGEgIT09IHhiIHx8IHlhICE9PSB5YikgewogICAgICAgICAgdmFyIGkgPSBzLnB1c2goInRyYW5zbGF0ZSgiLCBudWxsLCBweENvbW1hLCBudWxsLCBweFBhcmVuKTsKICAgICAgICAgIHEucHVzaCh7aTogaSAtIDQsIHg6IGludGVycG9sYXRlTnVtYmVyJDEoeGEsIHhiKX0sIHtpOiBpIC0gMiwgeDogaW50ZXJwb2xhdGVOdW1iZXIkMSh5YSwgeWIpfSk7CiAgICAgICAgfSBlbHNlIGlmICh4YiB8fCB5YikgewogICAgICAgICAgcy5wdXNoKCJ0cmFuc2xhdGUoIiArIHhiICsgcHhDb21tYSArIHliICsgcHhQYXJlbik7CiAgICAgICAgfQogICAgICB9CgogICAgICBmdW5jdGlvbiByb3RhdGUoYSwgYiwgcywgcSkgewogICAgICAgIGlmIChhICE9PSBiKSB7CiAgICAgICAgICBpZiAoYSAtIGIgPiAxODApIGIgKz0gMzYwOyBlbHNlIGlmIChiIC0gYSA+IDE4MCkgYSArPSAzNjA7IC8vIHNob3J0ZXN0IHBhdGgKICAgICAgICAgIHEucHVzaCh7aTogcy5wdXNoKHBvcChzKSArICJyb3RhdGUoIiwgbnVsbCwgZGVnUGFyZW4pIC0gMiwgeDogaW50ZXJwb2xhdGVOdW1iZXIkMShhLCBiKX0pOwogICAgICAgIH0gZWxzZSBpZiAoYikgewogICAgICAgICAgcy5wdXNoKHBvcChzKSArICJyb3RhdGUoIiArIGIgKyBkZWdQYXJlbik7CiAgICAgICAgfQogICAgICB9CgogICAgICBmdW5jdGlvbiBza2V3WChhLCBiLCBzLCBxKSB7CiAgICAgICAgaWYgKGEgIT09IGIpIHsKICAgICAgICAgIHEucHVzaCh7aTogcy5wdXNoKHBvcChzKSArICJza2V3WCgiLCBudWxsLCBkZWdQYXJlbikgLSAyLCB4OiBpbnRlcnBvbGF0ZU51bWJlciQxKGEsIGIpfSk7CiAgICAgICAgfSBlbHNlIGlmIChiKSB7CiAgICAgICAgICBzLnB1c2gocG9wKHMpICsgInNrZXdYKCIgKyBiICsgZGVnUGFyZW4pOwogICAgICAgIH0KICAgICAgfQoKICAgICAgZnVuY3Rpb24gc2NhbGUoeGEsIHlhLCB4YiwgeWIsIHMsIHEpIHsKICAgICAgICBpZiAoeGEgIT09IHhiIHx8IHlhICE9PSB5YikgewogICAgICAgICAgdmFyIGkgPSBzLnB1c2gocG9wKHMpICsgInNjYWxlKCIsIG51bGwsICIsIiwgbnVsbCwgIikiKTsKICAgICAgICAgIHEucHVzaCh7aTogaSAtIDQsIHg6IGludGVycG9sYXRlTnVtYmVyJDEoeGEsIHhiKX0sIHtpOiBpIC0gMiwgeDogaW50ZXJwb2xhdGVOdW1iZXIkMSh5YSwgeWIpfSk7CiAgICAgICAgfSBlbHNlIGlmICh4YiAhPT0gMSB8fCB5YiAhPT0gMSkgewogICAgICAgICAgcy5wdXNoKHBvcChzKSArICJzY2FsZSgiICsgeGIgKyAiLCIgKyB5YiArICIpIik7CiAgICAgICAgfQogICAgICB9CgogICAgICByZXR1cm4gZnVuY3Rpb24oYSwgYikgewogICAgICAgIHZhciBzID0gW10sIC8vIHN0cmluZyBjb25zdGFudHMgYW5kIHBsYWNlaG9sZGVycwogICAgICAgICAgICBxID0gW107IC8vIG51bWJlciBpbnRlcnBvbGF0b3JzCiAgICAgICAgYSA9IHBhcnNlKGEpLCBiID0gcGFyc2UoYik7CiAgICAgICAgdHJhbnNsYXRlKGEudHJhbnNsYXRlWCwgYS50cmFuc2xhdGVZLCBiLnRyYW5zbGF0ZVgsIGIudHJhbnNsYXRlWSwgcywgcSk7CiAgICAgICAgcm90YXRlKGEucm90Y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yIChpID0gMCwgaiA9IC0xOyBpIDwgbjsgKytpKSB7CiAgICAgICAgICBpZiAobyA9IHNlbGYudHdlZW5baV0udmFsdWUuY2FsbChub2RlLCBub2RlLl9fZGF0YV9fLCBzZWxmLmluZGV4LCBzZWxmLmdyb3VwKSkgewogICAgICAgICAgICB0d2VlblsrK2pdID0gbzsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgdHdlZW4ubGVuZ3RoID0gaiArIDE7CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIHRpY2soZWxhcHNlZCkgewogICAgICAgIHZhciB0ID0gZWxhcHNlZCA8IHNlbGYuZHVyYXRpb24gPyBzZWxmLmVhc2UuY2FsbChudWxsLCBlbGFwc2VkIC8gc2VsZi5kdXJhdGlvbikgOiAoc2VsZi50aW1lci5yZXN0YXJ0KHN0b3ApLCBzZWxmLnN0YXRlID0gRU5ESU5HJDEsIDEpLAogICAgICAgICAgICBpID0gLTEsCiAgICAgICAgICAgIG4gPSB0d2Vlbi5sZW5ndGg7CgogICAgICAgIHdoaWxlICgrK2kgPCBuKSB7CiAgICAgICAgICB0d2VlbltpXS5jYWxsKG5vZGUsIHQpOwogICAgICAgIH0KCiAgICAgICAgLy8gRGlzcGF0Y2ggdGhlIGVuZCBldmVudC4KICAgICAgICBpZiAoc2VsZi5zdGF0ZSA9PT0gRU5ESU5HJDEpIHsKICAgICAgICAgIHNlbGYub24uY2FsbCgiZW5kIiwgbm9kZSwgbm9kZS5fX2RhdGFfXywgc2VsZi5pbmRleCwgc2VsZi5ncm91cCk7CiAgICAgICAgICBzdG9wKCk7CiAgICAgICAgfQogICAgICB9CgogICAgICBmdW5jdGlvbiBzdG9wKCkgewogICAgICAgIHNlbGYuc3RhdGUgPSBFTkRFRCQxOwogICAgICAgIHNlbGYudGltZXIuc3RvcCgpOwogICAgICAgIGRlbGV0ZSBzY2hlZHVsZXNbaWRdOwogICAgICAgIGZvciAodmFyIGkgaW4gc2NoZWR1bGVzKSByZXR1cm47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2YXIgdHdlZW4gPSBnZXQkNCh0aGlzLm5vZGUoKSwgaWQpLnR3ZWVuOwogICAgICAgIGZvciAodmFyIGkgPSAwLCBuID0gdHdlZW4ubGVuZ3RoLCB0OyBpIDwgbjsgKytpKSB7CiAgICAgICAgICBpZiAoKHQgPSB0d2VlbltpXSkubmFtZSA9PT0gbmFtZSkgewogICAgICAgICAgICByZXR1cm4gdC52YWx1ZTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgIH0KCiAgICAgIHJldHVybiB0aGlzLmVhY2goKHZhbHVlID09IG51bGwgPyB0d2VlblJlbW92ZSQxIDogdHdlZW5GdW5jdGlvbiQxKShpZCwgbmFtZSwgdmFsdWUpKTsKICAgIH0KCiAgICBmdW5jdGlvbiB0d2VlblZhbHVlJDEodHJhbnNpdGlvbiwgbmFtZSwgdmFsdWUpIHsKICAgICAgdmFyIGlkID0gdHJhbnNpdGlvbi5faWQ7CgogICAgICB0cmFuc2l0aW9uLmVhY2goZnVuY3Rpb24oKSB7CiAgICAgICAgdmFyIHNjaGVkdWxlID0gc2V0JDUodGhpcywgaWQpOwogICAgICAgIChzY2hlZHVsZS52YWx1ZSB8fCAoc2NoZWR1bGUudmFsdWUgPSB7fSkpW25hbWVdID0gdmFsdWUuYXBwbHkodGhpcywgYXJndW1lbnRzKTsKICAgICAgfSk7CgogICAgICByZXR1cm4gZnVuY3Rpb24obm9kZSkgewogICAgICAgIHJldHVybiBnZXQkNChub2RlLCBpZCkudmFsdWVbbmFtZV07CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gaW50ZXJwb2xhdGUkMyhhLCBiKSB7CiAgICAgIHZhciBjOwogICAgICByZXR1cm4gKHR5cGVvZiBiID09PSAibnVtYmVyIiA/IGludGVycG9sYXRlTnVtYmVyJDEKICAgICAgICAgIDogYiBpbnN0YW5jZW9mIGNvbG9yJDEgPyBpbnRlcnBvbGF0ZVJnYiQxCiAgICAgICAgICA6ICh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VudHMpOwogICAgfQoKICAgIGZ1bmN0aW9uIHN0eWxlTnVsbCQxKG5hbWUsIGludGVycG9sYXRlKSB7CiAgICAgIHZhciBzdHJpbmcwMCwKICAgICAgICAgIHN0cmluZzEwLAogICAgICAgICAgaW50ZXJwb2xhdGUwOwogICAgICByZXR1cm4gZnVuY3Rpb24oKSB7CiAgICAgICAgdmFyIHN0cmluZzAgPSBzdHlsZVZhbHVlJDEodGhpcywgbmFtZSksCiAgICAgICAgICAgIHN0cmluZzEgPSAodGhpcy5zdHlsZS5yZW1vdmVQcm9wZXJ0eShuYW1lKSwgc3R5bGVWYWx1ZSQxKHRoaXMsIG5hbWUpKTsKICAgICAgICByZXR1cm4gc3RyaW5nMCA9PT0gc3RyaW5nMSA/IG51bGwKICAgICAgICAgICAgOiBzdHJpbmcwID09PSBzdHJpbmcwMCAmJiBzdHJpbmcxID09PSBzdHJpbmcxMCA/IGludGVycG9sYXRlMAogICAgICAgICAgICA6IGludGVycG9sYXRlMCA9IGludGVycG9sYXRlKHN0cmluZzAwID0gc3RyaW5nMCwgc3RyaW5nMTAgPSBzdHJpbmcxKTsKICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiBzdHlsZVJlbW92ZSQzKG5hbWUpIHsKICAgICAgcmV0dXJuIGZ1bmN0aW9uKCkgewogICAgICAgIHRoaXMuc3R5bGUucmVtb3ZlUHJvcGVydHkobmFtZSk7CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gc3R5bGVDb25zdGFudCQzKG5hbWUsIGludGVycG9sYXRlLCB2YWx1ZTEpIHsKICAgICAgdmFyIHN0cmluZzAwLAogICAgICAgICAgc3RyaW5nMSA9IHZhbHVlMSArICIiLAogICAgICAgICAgaW50ZXJwb2xhdGUwOwogICAgICByZXR1cm4gZnVuY3Rpb24oKSB7CiAgICAgICAgdmFyIHN0cmluZzAgPSBzdHlsZVZhbHVlJDEodGhpcywgbmFtZSk7CiAgICAgICAgcmV0dXJuIHN0cmluZzAgPT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VjdH0sCiAgICAgICAgICAgIGVuZCA9IHt2YWx1ZTogZnVuY3Rpb24oKSB7IGlmICgtLXNpemUgPT09IDApIHJlc29sdmUoKTsgfX07CgogICAgICAgIHRoYXQuZWFjaChmdW5jdGlvbigpIHsKICAgICAgICAgIHZhciBzY2hlZHVsZSA9IHNldCQ1KHRoaXMsIGlkKSwKICAgICAgICAgICAgICBvbiA9IHNjaGVkdWxlLm9uOwoKICAgICAgICAgIC8vIElmIHRoaXMgbm9kZSBzaGFyZWQgYSBkaXNwYXRjaCB3aXRoIHRoZSBwcmV2aW91cyBub2RlLAogICAgICAgICAgLy8ganVzdCBhc3NpZ24gdGhlIHVwZGF0ZWQgc2hhcmVkIGRpc3BhdGNoIGFuZCB3ZeKAmXJlIGRvbmUhCiAgICAgICAgICAvLyBPdGhlcndpc2UsIGNvcHktb24td3JpdGUuCiAgICAgICAgICBpZiAob24gIT09IG9uMCkgewogICAgICAgICAgICBvbjEgPSAob24wID0gb24pLmNvcHkoKTsKICAgICAgICAgICAgb24xLl8uY2FuY2VsLnB1c2goY2FuY2VsKTsKICAgICAgICAgICAgb24xLl8uaW50ZXJydXB0LnB1c2goY2FuY2VsKTsKICAgICAgICAgICAgb24xLl8uZW5kLnB1c2goZW5kKTsKICAgICAgICAgIH0KCiAgICAgICAgICBzY2hlZHVsZS5vbiA9IG9uMTsKICAgICAgICB9KTsKICAgICAgfSk7CiAgICB9CgogICAgdmFyIGlkJDEgPSAwOwoKICAgIGZ1bmN0aW9uIFRyYW5zaXRpb24kMShncm91cHMsIHBhcmVudHMsIG5hbWUsIGlkKSB7CiAgICAgIHRoaXMuX2dyb3VwcyA9IGdyb3VwczsKICAgICAgdGhpcy5fcGFyZW50cyA9IHBhcmVudHM7CiAgICAgIHRoaXMuX25hbWUgPSBuYW1lOwogICAgICB0aGlzLl9pZCA9IGlkOwogICAgfQoKICAgIGZ1bmN0aW9uIHRyYW5zaXRpb24kMShuYW1lKSB7CiAgICAgIHJldHVybiBzZWxlY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R5bGUkMSwKICAgICAgc3R5bGVUd2VlbjogdHJhbnNpdGlvbl9zdHlsZVR3ZWVuJDEsCiAgICAgIHRleHQ6IHRyYW5zaXRpb25fdGV4dCQxLAogICAgICB0ZXh0VHdlZW46IHRyYW5zaXRpb25fdGV4dFR3ZWVuJDEsCiAgICAgIHJlbW92ZTogdHJhbnNpdGlvbl9yZW1vdmUkMSwKICAgICAgdHdlZW46IHRyYW5zaXRpb25fdHdlZW4kMSwKICAgICAgZGVsYXk6IHRyYW5zaXRpb25fZGVsYXkkMSwKICAgICAgZHVyYXRpb246IHRyYW5zaXRpb25fZHVyYXRpb24kMSwKICAgICAgZWFzZTogdHJhbnNpdGlvbl9lYXNlJDEsCiAgICAgIGVuZDogdHJhbnNpdGlvbl9lbmQkMQogICAgfTsKCiAgICB2YXIgZGVmYXVsdFRpbWluZyQxID0gewogICAgICB0aW1lOiBudWxsLCAvLyBTZXQgb24gdXNlLgogICAgICBkZWxheTogMCwKICAgICAgZHVyYXRpb246IDI1MCwKICAgICAgZWFzZTogY3ViaWNJbk91dAogICAgfTsKCiAgICBmdW5jdGlvbiBpbmhlcml0JDEobm9kZSwgaWQpIHsKICAgICAgdmFyIHRpbWluZzsKICAgICAgd2hpbGUgKCEodGltaW5nID0gbm9kZS5fX3RyYW5zaXRpb24pIHx8ICEodGltaW5nID0gdGltaW5nW2lkXSkpIHsKICAgICAgICBpZiAoIShub2RlID0gbm9kZS5wYXJlbnROb2RlKSkgewogICAgICAgICAgcmV0dXJuIGRlZmF1bHRUaW1pbmckMS50aW1lID0gbm93JDEoKSwgZGVmYXVsdFRpbWluZyQxOwogICAgICAgIH0KICAgICAgfQogICAgICByZXR1cm4gdGltaW5nOwogICAgfQoKICAgIGZ1bmN0aW9uIHNlbGVjdGlvbl90cmFuc2l0aW9uJDEobmFtZSkgewogICAgICB2YXIgaWQsCiAgICAgICAgICB0aW1pbmc7CgogICAgICBpZiAobmFtZSBpbnN0YW5jZW9mIFRyYW5zaXRpb24kMS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mN0aW9uKHh5KSB7IHJldHVybiB4eSAmJiBbeHlbMF1bMV0sIHh5WzFdWzFdXTsgfQogICAgfTsKCiAgICB2YXIgWFkkMSA9IHsKICAgICAgbmFtZTogInh5IiwKICAgICAgaGFuZGxlczogWyJuIiwgImUiLCAicyIsICJ3IiwgIm53IiwgIm5lIiwgInNlIiwgInN3Il0ubWFwKHR5cGUkMSksCiAgICAgIGlucHV0OiBmdW5jdGlvbih4eSkgeyByZXR1cm4geHk7IH0sCiAgICAgIG91dHB1dDogZnVuY3Rpb24oeHkpIHsgcmV0dXJuIHh5OyB9CiAgICB9OwoKICAgIHZhciBjdXJzb3JzJDEgPSB7CiAgICAgIG92ZXJsYXk6ICJjcm9zc2hhaXIiLAogICAgICBzZWxlY3Rpb246ICJtb3ZlIiwKICAgICAgbjogIm5zLXJlc2l6ZSIsCiAgICAgIGU6ICJldy1yZXNpemUiLAogICAgICBzOiAibnMtcmVzaXplIiwKICAgICAgdzogImV3LXJlc2l6ZSIsCiAgICAgIG53OiAibndzZS1yZXNpemUiLAogICAgICBuZTogIm5lc3ctcmVzaXplIiwKICAgICAgc2U6ICJud3NlLXJlc2l6ZSIsCiAgICAgIHN3OiAibmVzdy1yZXNpemUiCiAgICB9OwoKICAgIHZhciBmbGlwWCQxID0gewogICAgICBlOiAidyIsCiAgICAgIHc6ICJlIiwKICAgICAgbnc6ICJuZSIsCiAgICAgIG5lOiAibnciLAogICAgICBzZTogInN3IiwKICAgICAgc3c6ICJzZSIKICAgIH07CgogICAgdmFyIGZsaXBZJDEgPSB7CiAgICAgIG46ICJzIiwKICAgICAgczogIm4iLAogICAgICBudzogInN3IiwKICAgICAgbmU6ICJzZSIsCiAgICAgIHNlOiAibmUiLAogICAgICBzdzogIm53IgogICAgfTsKCiAgICB2YXIgc2lnbnNYJDEgPSB7CiAgICAgIG92ZXJsYXk6ICsxLAogICAgICBzZWxlY3Rpb246ICsxLAogICAgICBuOiBudWxsLAogICAgICBlOiArMSwKICAgICAgczogbn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S5lbnRlcigpLmFwcGVuZCgicmVjdCIpCiAgICAgICAgICAgIC5hdHRyKCJjbGFzcyIsICJvdmVybGF5IikKICAgICAgICAgICAgLmF0dHIoInBvaW50ZXItZXZlbnRzIiwgImFsbCIpCiAgICAgICAgICAgIC5hdHRyKCJjdXJzb3IiLCBjdXJzb3JzJDEub3ZlcmxheSkKICAgICAgICAgIC5tZXJnZShvdmVybGF5KQogICAgICAgICAgICAuZWFjaChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICB2YXIgZXh0ZW50ID0gbG9jYWwkMih0aGlzKS5leHRlbnQ7CiAgICAgICAgICAgICAgc2VsZWN0JDEodGhpcykKICAgICAgICAgICAgICAgICAgLmF0dHIoIngiLCBleHRlbnRbMF1bMF0pCiAgICAgICAgICAgICAgICAgIC5hdHRyKCJ5IiwgZXh0ZW50WzBdWzFdKQogICAgICAgICAgICAgICAgICAuYXR0cigid2lkdGgiLCBleHRlbnRbMV1bMF0gLSBleHRlbnRbMF1bMF0pCiAgICAgICAgICAgICAgICAgIC5hdHRyKCJoZWlnaHQiLCBleHRlbnRbMV1bMV0gLSBleHRlbnRbMF1bMV0pOwogICAgICAgICAgICB9KTsKCiAgICAgICAgZ3JvdXAuc2VsZWN0QWxsKCIuc2VsZWN0aW9uIikKICAgICAgICAgIC5kYXRhKFt0eXBlJDEoInNlbGVjdGlvbiIpXSkKICAgICAgICAgIC5lbnRlcigpLmFwcGVuZCgicmVjdCIpCiAgICAgICAgICAgIC5hdHRyKCJjbGFzcyIsICJzZWxlY3Rpb24iKQogICAgICAgICAgICAuYXR0cigiY3Vyc29yIiwgY3Vyc29ycyQxLnNlbGVjdGlvbikKICAgICAgICAgICAgLmF0dHIoImZpbGwiLCAiIzc3NyIpCiAgICAgICAgICAgIC5hdHRyKCJmaWxsLW9wYWNpdHkiLCAwLjMpCiAgICAgICAgICAgIC5hdHRyKCJzdHJva2UiLCAiI2ZmZiIpCiAgICAgICAgICAgIC5hdHRyKCJzaGFwZS1yZW5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gICAgICAgICAgICAgICB2YXIgdGhhdCA9IHRoaXMsCiAgICAgICAgICAgICAgICAgICAgYXJncyA9IGFyZ3VtZW50cywKICAgICAgICAgICAgICAgICAgICBzdGF0ZSA9IHRoYXQuX19icnVzaCwKICAgICAgICAgICAgICAgICAgICBzZWxlY3Rpb24xID0gZGltLmlucHV0KHR5cGVvZiBzZWxlY3Rpb24gPT09ICJmdW5jdGlvbiIgPyBzZWxlY3Rpb24uYXBwbHkodGhhdCwgYXJncykgOiBzZWxlY3Rpb24sIHN0YXRlLmV4dGVudCksCiAgICAgICAgICAgICAgICAgICAgZW1pdCA9IGVtaXR0ZXIodGhhdCwgYXJncykuYmVmb3Jlc3RhcnQoKTsKCiAgICAgICAgICAgICAgICBpbnRlcnJ1cHQkMSh0aGF0KTsKICAgICAgICAgICAgICAgIHN0YXRlLnNlbGVjdGlvbiA9IHNlbGVjdGlvbjEgPT0gbnVsbCB8fCBlbXB0eSQzKHNlbGVjdGlvbjEpID8gbnVsbCA6IHNlbGVjdGlvbjE7CiAgICAgICAgICAgICAgICByZWRyYXcuY2FsbCh0aGF0KTsKICAgICAgICAgICAgICAgIGVtaXQuc3RhcnQoKS5icnVzaCgpLmVuZCgpOwogICAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgfTsKCiAgICAgIGZ1bmN0aW9uIHJlZHJhdygpIHsKICAgICAgICB2YXIgZ3JvdXAgPSBzZWxlY3QkMSh0aGlzKSwKICAgICAgICAgICAgc2VsZWN0aW9uID0gbG9jYWwkMih0aGlzKS5zZWxlY3Rpb247CgogICAgICAgIGlmIChzZWxlY3Rpb24pIHsKICAgICAgICAgIGdyb3VwLnNlbGVjdEFsbCgiLnNlbGVjdGlvbiIpCiAgICAgICAgICAgICAgLnN0eWxlKCJkaXNwbGF5IiwgbnVsbCkKICAgICAgICAgICAgICAuYXR0cigieCIsIHNlbGVjdGlvblswXVswXSkKICAgICAgICAgICAgICAuYXR0cigieSIsIHNlbGVjdGlvblswXVsxXSk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fSEFORExFJDEpLAogICAgICAgICAgICBzaWduWCA9IGRpbSA9PT0gWSQxID8gbnVsbCA6IHNpZ25zWCQxW3R5cGVdLAogICAgICAgICAgICBzaWduWSA9IGRpbSA9PT0gWCQxID8gbnVsbCA6IHNpZ25zWSQxW3R5cGVdLAogICAgICAgICAgICBzdGF0ZSA9IGxvY2FsJDIodGhhdCksCiAgICAgICAgICAgIGV4dGVudCA9IHN0YXRlLmV4dGVudCwKICAgICAgICAgICAgc2VsZWN0aW9uID0gc3RhdGUuc2VsZWN0aW9uLAogICAgICAgICAgICBXID0gZXh0ZW50WzBdWzBdLCB3MCwgdzEsCiAgICAgICAgICAgIE4gPSBleHRlbnRbMF1bMV0sIG4wLCBuMSwKICAgICAgICAgICAgRSA9IGV4dGVudFsxXVswXSwgZTAsIGUxLAogICAgICAgICAgICBTID0gZXh0ZW50WzFdWzFdLCBzMCwgczEsCiAgICAgICAgICAgIGR4LAogICAgICAgICAgICBkeSwKICAgICAgICAgICAgbW92aW5nLAogICAgICAgICAgICBzaGlmdGluZyA9IHNpZ25YICYmIHNpZ25ZICYmIGV2ZW50JDEuc2hpZnRLZXksCiAgICAgICAgICAgIGxvY2tYLAogICAgICAgICAgICBsb2NrWSwKICAgICAgICAgICAgcG9pbnQwID0gbW91c2UkMSh0aGF0KSwKICAgICAgICAgICAgcG9pbnQgPSBwb2ludDAsCiAgICAgICAgICAgIGVtaXQgPSBlbWl0dGVyKHRoYXQsIGFyZ3VtZW50cykuYmVmb3Jlc3RhcnQoKTsKCiAgICAgICAgaWYgKHR5cGUgPT09ICJvdmVybGF5IikgewogICAgICAgICAgc3RhdGUuc2VsZWN0aW9uID0gc2VsZWN0aW9uID0gWwogICAgICAgICAgICBbdzAgPSBkaW0gPT09IFkkMSA/IFcgOiBwb2ludDBbMF0sIG4wID0gZGltID09PSBYJDEgPyBOIDogcG9pbnQwWzFdXSwKICAgICAgICAgICAgW2UwID0gZGltID09PSBZJDEgPyBFIDogdzAsIHMwID0gZGltID09PSBYJDEgPyBTIDogbjBdCiAgICAgICAgICBdOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICB3MCA9IHNlbGVjdGlvblswXVswXTsKICAgICAgICAgIG4wID0gc2VsZWN0aW9uWzBdWzFdOwogICAgICAgICAgZTAgPSBzZWxlY3Rpb25bMV1bMF07CiAgICAgICAgICBzMCA9IHNlbGVjdGlvblsxXVsxXTsKICAgICAgICB9CgogICAgICAgIHcxID0gdzA7CiAgICAgICAgbjEgPSBuMDsKICAgICAgICBlMSA9IGUwOwogICAgICAgIHMxID0gczA7CgogICAgICAgIHZhciBncm91cCA9IHNlbGVjdCQxKHRoYXQpCiAgICAgICAgICAgIC5hdHRyKCJwb2ludGVyLWV2ZW50cyIsICJub25lIik7CgogICAgICAgIHZhciBvdmVybGF5ID0gZ3JvdXAuc2VsZWN0QWxsKCIub3ZlcmxheSIpCiAgICAgICAgICAgIC5hdHRyKCJjdXJzb3IiLCBjdXJzb3JzJDFbdHlwZV0pOwoKICAgICAgICBpZiAoZXZlbnQkMS50b3VjaGVzKSB7CiAgICAgICAgICBncm91cAogICAgICAgICAgICAgIC5vbigidG91Y2htb3ZlLmJydXNoIiwgbW92ZWQsIHRydWUpCiAgICAgICAgICAgICAgLm9uKCJ0b3VjaGVuZC5icnVzaCB0b3VjaGNhbmNlbC5icnVzaCIsIGVuZGVkLCB0cnVlKTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgdmFyIHZpZXcgPSBzZWxlY3QkMShldmVudCQxLnZpZXcpCiAgICAgICAgICAgICAgLm9uKCJrZXlkb3duLmJydXNoIiwga2V5ZG93bmVkLCB0cnVlKQogICAgICAgICAgICAgIC5vbigia2V5dXAuYnJ1c2giLCBrZXl1cHBlZCwgdHJ1ZSkKICAgICAgICAgICAgICAub24oIm1vdXNlbW92ZS5icnVzaCIsIG1vdmVkLCB0cnVlKQogICAgICAgICAgICAgIC5vbigibW91c2V1cC5icnVzaCIsIGVuZGVkLCB0cnVlKTsKCiAgICAgICAgICBkcmFnRGlzYWJsZSQxKGV2ZW50JDEudmlldyk7CiAgICAgICAgfQoKICAgICAgICBub3Byb3BhZ2F0aW9uJDMoKTsKICAgICAgICBpbnRlcnJ1cHQkMSh0aGF0KTsKICAgICAgICByZWRyYXcuY2FsbCh0aGF0KTsKICAgICAgICBlbWl0LnN0YXJ0KCk7CgogICAgICAgIGZ1bmN0aW9uIG1vdmVkKCkgewogICAgICAgICAgdmFyIHBvaW50MSA9IG1vdXNlJDEodGhhdCk7CiAgICAgICAgICBpZiAoc2hpZnRpbmcgJiYgIWxvY2tYICYmICFsb2NrWSkgewogICAgICAgICAgICBpZiAoTWF0aC5hYnMocG9pbnQxWzBdIC0gcG9pbnRbMF0pID4gTWF0aC5hYnMocG9pbnQxWzFdIC0gcG9pbnRbMV0pKSBsb2NrWSA9IHRydWU7CiAgICAgICAgICAgIGVsc2UgbG9ja1ggPSB0cnVlOwogICAgICAgICAgfQogICAgICAgICAgcG9pbnQgPSBwb2ludDE7CiAgICAgICAgICBtb3ZpbmcgPSB0cnVlOwogICAgICAgICAgbm9ldmVudCQ0KCk7CiAgICAgICAgICBtb3ZlKCk7CiAgICAgICAgfQoKICAgICAgICBmdW5jdGlvbiBtb3ZlKCkgewogICAgICAgICAgdmFyIHQ7CgogICAgICAgICAgZHggPSBwb2ludFswXSAtIHBvaW50MFswXTsKICAgICAgICAgIGR5ID0gcG9pbnRbMV0gLSBwb2ludDBbMV07CgogICAgICAgICAgc3dpdGNoIChtb2RlKSB7CiAgICAgICAgICAgIGNhc2UgTU9ERV9TUEFDRSQxOgogICAgICAgICAgICBjYXNlIE1PREVfRFJBRyQxOiB7CiAgICAgICAgICAgICAgaWYgKHNpZ25YKSBkeCA9IE1hdGgubWF4KFcgLSB3MCwgTWF0aC5taW4oRSAtIGUwLCBkeCkpLCB3MSA9IHcwICsgZHgsIGUxID0gZTAgKyBkeDsKICAgICAgICAgICAgICBpZiAoc2lnblkpIGR5ID0gTWF0aC5tYXgoTiAtIG4wLCBNYXRoLm1pbihTIC0gczAsIGR5KSksIG4xID0gbjAgKyBkeSwgczEgPSBzMCArIGR5OwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNhc2UgTU9ERV9IQU5ETEUkMTogewogICAgICAgICAgICAgIGlmIChzaWduWCA8IDApIGR4ID0gTWF0aC5tYXgoVyAtIHcwLCBNYXRoLm1pbihFIC0gdzAsIGR4KSksIHcxID0gdzAgKyBkeCwgZTEgPSBlMDsKICAgICAgICAgICAgICBlbHNlIGlmIChzaWduWCA+IDApIGR4ID0gTWF0aC5tYXgoVyAtIGUwLCBNYXRoLm1pbihFIC0gZTAsIGR4KSksIHcxID0gdzAsIGUxID0gZTAgKyBkeDsKICAgICAgICAgICAgICBpZiAoc2lnblkgPCAwKSBkeSA9IE1hdGgubWF4KE4gLSBuMCwgTWF0aC5taW4oUyAtIG4wLCBkeSkpLCBuMSA9IG4wICsgZHksIHMxID0gczA7CiAgICAgICAgICAgICAgZWxzZSBpZiAoc2lnblkgPiAwKSBkeSA9IE1hdGgubWF4KE4gLSBzMCwgTWF0aC5taW4oUyAtIHMwLCBkeSkpLCBuMSA9IG4wLCBzMSA9IHMwICsgZHk7CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY2FzZSBNT0RFX0NFTlRFUiQxOiB7CiAgICAgICAgICAgICAgaWYgKHNpZ25YKSB3MSA9IE1hdGgubWF4KFcsIE1hdGgubWluKEUsIHcwIC0gZHggKiBzaWduWCkpLCBlMSA9IE1hdGgubWF4KFcsIE1hdGgubWluKEUsIGUwICsgZHggKiBzaWduWCkpOwogICAgICAgICAgICAgIGlmIChzaWduWSkgbjEgPSBNYXRoLm1heChOLCBNYXRoLm1pbihTLCBuMCAtIGR5ICogc2lnblkpKSwgczEgPSBNYXRoLm1heChOLCBNYXRoLm1pbihTLCBzMCArIGR5ICogc2lnblkpKTsKICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQogICAgICAgICAgfQoKICAgICAgICAgIGlmIChlMSA8IHcxKSB7CiAgICAgICAgICAgIHNpZ25YICo9IC0xOwogICAgICAgICAgICB0ID0gdzAsIHcwID0gZTAsIGUwID0gdDsKICAgICAgICAgICAgdCA9IHcxLCB3MSA9IGUxLCBlMSA9IHQ7CiAgICAgICAgICAgIGlmICh0eXBlIGluIGZsaXBYJDEpIG92ZXJsYXkuYXR0cigiY3Vyc29yIiwgY3Vyc29ycyQxW3R5cGUgPSBmbGlwWCQxW3R5cGVdXSk7CiAgICAgICAgICB9CgogICAgICAgICAgaWYgKHMxIDwgbjEpIHsKICAgICAgICAgICAgc2lnblkgKj0gLTE7CiAgICAgICAgICAgIHQgPSBuMCwgbjAgPSBzMCwgczAgPSB0OwogICAgICAgICAgICB0ID0gbjEsIG4xID0gczEsIHMxID0gdDsKICAgICAgICAgICAgaWYgKHR5cGUgaW4gZmxpcFkkMSkgb3ZlcmxheS5hdHRyKCJjdXJzb3IiLCBjdXJzb3JzJDFbdHlwZSA9IGZsaXBZJDFbdHlwZV1dKTsKICAgICAgICAgIH0KCiAgICAgICAgICBpZiAoc3RhdGUuc2VsZWN0aW9uKSBzZWxlY3Rpb24gPSBzdGF0ZS5zZWxlY3Rpb247IC8vIE1heSBiZSBzZXQgYnkgYnJ1c2gubW92ZSEKICAgICAgICAgIGlmIChsb2NrWCkgdzEgPSBzZWxlY3Rpb25bMF1bMF0sIGUxID0gc2VsZWN0aW9uWzFdWzBdOwogICAgICAgICAgaWYgKGxvY2tZKSBuMSA9IHNlbGVjdGlvblswXVsxXSwgczEgPSBzZWxlY3Rpb25bMV1bMV07CgogICAgICAgICAgaWYgKHNlbGVjdGlvblswXVswXSAhPT0gdzEKICAgICAgICAgICAgICB8fCBzZWxlY3Rpb25bMF1bMV0gIT09IG4xCiAgICAgICAgICAgICAgfHwgc2VsZWN0aW9uWzFdWzBdICE9PSBlMQogICAgICAgICAgICAgIHx8IHNlbGVjdGlvblsxXV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3Rpb247IC8vIE1heSBiZSBzZXQgYnkgYnJ1c2gubW92ZSAob24gc3RhcnQpIQogICAgICAgICAgaWYgKGVtcHR5JDMoc2VsZWN0aW9uKSkgc3RhdGUuc2VsZWN0aW9uID0gbnVsbCwgcmVkcmF3LmNhbGwodGhhdCk7CiAgICAgICAgICBlbWl0LmVuZCgpOwogICAgICAgIH0KCiAgICAgICAgZnVuY3Rpb24ga2V5ZG93bmVkKCkgewogICAgICAgICAgc3dpdGNoIChldmVudCQxLmtleUNvZGUpIHsKICAgICAgICAgICAgY2FzZSAxNjogeyAvLyBTSElGVAogICAgICAgICAgICAgIHNoaWZ0aW5nID0gc2lnblggJiYgc2lnblk7CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY2FzZSAxODogeyAvLyBBTFQKICAgICAgICAgICAgICBpZiAobW9kZSA9PT0gTU9ERV9IQU5ETEUkMSkgewogICAgICAgICAgICAgICAgaWYgKHNpZ25YKSBlMCA9IGUxIC0gZHggKiBzaWduWCwgdzAgPSB3MSArIGR4ICogc2lnblg7CiAgICAgICAgICAgICAgICBpZiAoc2lnblkpIHMwID0gczEgLSBkeSAqIHNpZ25ZLCBuMCA9IG4xICsgZHkgKiBzaWduWTsKICAgICAgICAgICAgICAgIG1vZGUgPSBNT0RFX0NFTlRFUiQxOwogICAgICAgICAgICAgICAgbW92ZSgpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQogICAgICAgICAgICBjYXNlIDMyOiB7IC8vIFNQQUNFOyB0YWtlcyBwcmlvcml0eSBvdmVyIEFMVAogICAgICAgICAgICAgIGlmIChtb2RlID09PSBNT0RFX0hBTkRMRSQxIHx8IG1vZGUgPT09IE1PREVfQ0VOVEVSJDEpIHsKICAgICAgICAgICAgICAgIGlmIChzaWduWCA8IDApIGUwID0gZTEgLSBkeDsgZWxzZSBpZiAoc2lnblggPiAwKSB3MCA9IHcxIC0gZHg7CiAgICAgICAgICAgICAgICBpZiAoc2lnblkgPCAwKSBzMCA9IHMxIC0gZHk7IGVsc2UgaWYgKHNpZ25ZID4gMCkgbjAgPSBuMSAtIGR5OwogICAgICAgICAgICAgICAgbW9kZSA9IE1PREVfU1BBQ0UkMTsKICAgICAgICAgICAgICAgIG92ZXJsYXkuYXR0cigiY3Vyc29yIiwgY3Vyc29ycyQxLnNlbGVjdGlvbik7CiAgICAgICAgICAgICAgICBtb3ZlKCk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGRlZmF1bHQ6IHJldHVybjsKICAgICAgICAgIH0KICAgICAgICAgIG5vZXZlbnQkNCgpOwogICAgICAgIH0KCiAgICAgICAgZnVuY3Rpb24ga2V5dXBwZWQoKSB7CiAgICAgICAgICBzd2l0Y2ggKGV2ZW50JDEua2V5Q29kZSkgewogICAgICAgICAgICBjYXNlIDE2OiB7IC8vIFNISUZUCiAgICAgICAgICAgICAgaWYgKHNoaWZ0aW5nKSB7CiAgICAgICAgICAgICAgICBsb2NrWCA9IGxvY2tZID0gc2hpZnRpbmcgPSBmYWxzZTsKICAgICAgICAgICAgICAgIG1vdmUoKTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY2FzZSAxODogeyAvLyBBTFQKICAgICAgICAgICAgICBpZiAobW9kZSA9PT0gTU9ERV9DRU5URVIkMSkgewogICAgICAgICAgICAgICAgaWYgKHNpZ25YIDwgMCkgZTAgPSBlMTsgZWxzZSBpZiAoc2lnblggPiAwKSB3MCA9IHcxOwogICAgICAgICAgICAgICAgaWYgKHNpZ25ZIDwgMCkgczAgPSBzMTsgZWxzZSBpZiAoc2lnblkgPiAwKSBuMCA9IG4xOwogICAgICAgICAgICAgICAgbW9kZSA9IE1PREVfSEFORExFJDE7CiAgICAgICAgICAgICAgICBtb3ZlKCk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNhc2UgMzI6IHsgLy8gU1BBQ0UKICAgICAgICAgICAgICBpZiAobW9kZSA9PT0gTU9ERV9TUEFDRSQxKSB7CiAgICAgICAgICAgICAgICBpZiAoZXZlbnQkMS5hbHRLZXkpIHsKICAgICAgICAgICAgICAgICAgaWYgKHNpZ25YKSBlMCA9IGUxIC0gZHggKiBzaWduWCwgdzAgPSB3MSArIGR4ICogc2lnblg7CiAgICAgICAgICAgICAgICAgIGlmIChzaWduWSkgczAgPSBzMSAtIGR5ICogc2lnblksIG4wID0gbjEgKyBkeSAqIHNpZ25ZOwogICAgICAgICAgICAgICAgICBtb2RlID0gTU9ERV9DRU5URVIkMTsKICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgIGlmIChzaWduWCA8IDApIGUwID0gZTE7IGVsc2UgaWYgKHNpZ25YID4gMCkgdzAgPSB3MTsKICAgICAgICAgICAgICAgICAgaWYgKHNpZ25ZIDwgMCkgczAgPSBzMTsgZWxzZSBpZiAoc2lnblkgPiAwKSBuMCA9IG4xOwogICAgICAgICAgICAgICAgICBtb2RlID0gTU9ERV9IQU5ETEUkMTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIG92ZXJsYXkuYXR0cigiY3Vyc29yIiwgY3Vyc29ycyQxW3R5cGVdKTsKICAgICAgICAgICAgICAgIG1vdmUoKTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZGVmYXVsdDogcmV0dXJuOwogICAgICAgICAgfQogICAgICAgICAgbm9ldmVudCQ0KCk7CiAgICAgICAgfQogICAgICB9CgogICAgICBmdW5jdGlvbiBpbml0aWFsaXplKCkgewogICAgICAgIHZhciBzdGF0ZSA9IHRoaXMuX19icnVzaCB8fCB7c2VsZWN0aW9uOiBudWxsfTsKICAgICAgICBzdGF0ZS5leH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gIH0KCiAgICBmdW5jdGlvbiBiaXNlY3RvciQyKGNvbXBhcmUpIHsKICAgICAgaWYgKGNvbXBhcmUubGVuZ3RoID09PSAxKSBjb21wYXJlID0gYXNjZW5kaW5nQ29tcGFyYXRvciQyKGNvbXBhcmUpOwogICAgICByZXR1cm4gewogICAgICAgIGxlZnQ6IGZ1bmN0aW9uKGEsIHgsIGxvLCBoaSkgewogICAgICAgICAgaWYgKGxvID09IG51bGwpIGxvID0gMDsKICAgICAgICAgIGlmIChoaSA9PSBudWxsKSBoaSA9IGEubGVuZ3RoOwogICAgICAgICAgd2hpbGUgKGxvIDwgaGkpIHsKICAgICAgICAgICAgdmFyIG1pZCA9IGxvICsgaGkgPj4+IDE7CiAgICAgICAgICAgIGlmIChjb21wYXJlKGFbbWlkXSwgeCkgPCAwKSBsbyA9IG1pZCArIDE7CiAgICAgICAgICAgIGVsc2UgaGkgPSBtaWQ7CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gbG87CiAgICAgICAgfSwKICAgICAgICByaWdodDogZnVuY3Rpb24oYSwgeCwgbG8sIGhpKSB7CiAgICAgICAgICBpZiAobG8gPT0gbnVsbCkgbG8gPSAwOwogICAgICAgICAgaWYgKGhpID09IG51bGwpIGhpID0gYS5sZW5ndGg7CiAgICAgICAgICB3aGlsZSAobG8gPCBoaSkgewogICAgICAgICAgICB2YXIgbWlkID0gbG8gKyBoaSA+Pj4gMTsKICAgICAgICAgICAgaWYgKGNvbXBhcmUoYVttaWRdLCB4KSA+IDApIGhpID0gbWlkOwogICAgICAgICAgICBlbHNlIGxvID0gbWlkICsgMTsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiBsbzsKICAgICAgICB9CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gYXNjZW5kaW5nQ29tcGFyYXRvciQyKGYpIHsKICAgICAgcmV0dXJuIGZ1bmN0aW9uKGQsIHgpIHsKICAgICAgICByZXR1cm4gYXNjZW5kaW5nJDYoZihkKSwgeCk7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gpIHsKICAgICAgdmFyIHBhZEFuZ2xlID0gMCwKICAgICAgICAgIHNvcnRHcm91cHMgPSBudWxsLAogICAgICAgICAgc29ydFN1Ymdyb3VwcyA9IG51bGwsCiAgICAgICAgICBzb3J0Q2hvcmRzID0gbnVsbDsKCiAgICAgIGZ1bmN0aW9uIGNob3JkKG1hdHJpeCkgewogICAgICAgIHZhciBuID0gbWF0cml4Lmxlbmd0aCwKICAgICAgICAgICAgZ3JvdXBTdW1zID0gW10sCiAgICAgICAgICAgIGdyb3VwSW5kZXggPSByYW5nZSQyKG4pLAogICAgICAgICAgICBzdWJncm91cEluZGV4ID0gW10sCiAgICAgICAgICAgIGNob3JkcyA9IFtdLAogICAgICAgICAgICBncm91cHMgPSBjaG9yZHMuZ3JvdXBzID0gbmV3IEFycmF5KG4pLAogICAgICAgICAgICBzdWJncm91cHMgPSBuZXcgQXJyYXkobiAqIG4pLAogICAgICAgICAgICBrLAogICAgICAgICAgICB4LAogICAgICAgICAgICB4MCwKICAgICAgICAgICAgZHgsCiAgICAgICAgICAgIGksCiAgICAgICAgICAgIGo7CgogICAgICAgIC8vIENvbXB1dGUgdGhlIHN1bS4KICAgICAgICBrID0gMCwgaSA9IC0xOyB3aGlsZSAoKytpIDwgbikgewogICAgICAgICAgeCA9IDAsIGogPSAtMTsgd2hpbGUgKCsraiA8IG4pIHsKICAgICAgICAgICAgeCArPSBtYXRyaXhbaV1bal07CiAgICAgICAgICB9CiAgICAgICAgICBncm91cFN1bXMucHVzaCh4KTsKICAgICAgICAgIHN1Ymdyb3VwSW5kZXgucHVzaChyYW5nZSQyKG4pKTsKICAgICAgICAgIGsgKz0geDsKICAgICAgICB9CgogICAgICAgIC8vIFNvcnQgZ3JvdXBz4oCmCiAgICAgICAgaWYgKHNvcnRHcm91cHMpIGdyb3VwSW5kZXguc29ydChmdW5jdGlvbihhLCBiKSB7CiAgICAgICAgICByZXR1cm4gc29ydEdyb3Vwcyhncm91cFN1bXNbYV0sIGdyb3VwU3V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iA9IG1hdHJpeFtkaV1bZGpdLAogICAgICAgICAgICAgICAgYTAgPSB4LAogICAgICAgICAgICAgICAgYTEgPSB4ICs9IHYgKiBrOwogICAgICAgICAgICBzdWJncm91cHNbZGogKiBuICsgZGldID0gewogICAgICAgICAgICAgIGluZGV4OiBkaSwKICAgICAgICAgICAgICBzdWJpbmRleDogZGosCiAgICAgICAgICAgICAgc3RhcnRBbmdsZTogYTAsCiAgICAgICAgICAgICAgZW5kQW5nbGU6IGExLAogICAgICAgICAgICAgIHZhbHVlOiB2CiAgICAgICAgICAgIH07CiAgICAgICAgICB9CiAgICAgICAgICBncm91cHNbZGldID0gewogICAgICAgICAgICBpbmRleDogZGksCiAgICAgICAgICAgIHN0YXJ0QW5nbGU6IHgwLAogICAgICAgICAgICBlbmRBbmdsZTogeCwKICAgICAgICAgICAgdmFsdWU6IGdyb3VwU3Vtc1tkaV0KICAgICAgICAgIH07CiAgICAgICAgICB4ICs9IGR4OwogICAgICAgIH0KCiAgICAgICAgLy8gR2VuZXJhdGUgY2hvcmRzIGZvciBlYWNoIChub24tZW1wdHkpIHN1Ymdyb3VwLXN1Ymdyb3VwIGxpbmsuCiAgICAgICAgaSA9IC0xOyB3aGlsZSAoKytpIDwgbikgewogICAgICAgICAgaiA9IGkgLSAxOyB3aGlsZSAoKytqIDwgbikgewogICAgICAgICAgICB2YXIgc291cmNlID0gc3ViZ3JvdXBzW2ogKiBuICsgaV0sCiAgICAgICAgICAgICAgICB0YXJnZXQgPSBzdWJncm91cHNbaSAqIG4gKyBqXTsKICAgICAgICAgICAgaWYgKHNvdXJjZS52YWx1ZSB8fCB0YXJnZXQudmFsdWUpIHsKICAgICAgICAgICAgICBjaG9yZHMucHVzaChzb3VyY2UudmFsdWUgPCB0YXJnZXQudmFsdWUKICAgICAgICAgICAgICAgICAgPyB7c291cmNlOiB0YXJnZXQsIHRhcmdldDogc291cmNlfQogICAgICAgICAgICAgICAgICA6IHtzb3VyY2U6IHNvdXJjZSwgdGFyZ2V0OiB0YXJnZXR9KTsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgcmV0dXJuIHNvcnRDaG9yZHMgPyBjaG9yZHMuc29ydChzb3J0Q2hvcmRzKSA6IGNob3JkczsKICAgICAgfQoKICAgICAgY2hvcmQucGFkQW5nbGUgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAocGFkQW5nbGUgPSBtYXgkNCgwLCBfKSwgY2hvcmQpIDogcGFkQW5nbGU7CiAgICAgIH07CgogICAgICBjaG9yZC5zb3J0R3JvdXBzID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHNvcnRHcm91cHMgPSBfLCBjaG9yZCkgOiBzb3J0R3JvdXBzOwogICAgICB9OwoKICAgICAgY2hvcmQuc29ydFN1Ymdyb3VwcyA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChzb3J0U3ViZ3JvdXBzID0gXywgY2hvcmQpIDogc29ydFN1Ymdyb3VwczsKICAgICAgfTsKCiAgICAgIGNob3JkLnNvcnRDaG9yZHMgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoXyA9PSBudWxsID8gc29ydENob3JkcyA9IG51bGwgOiAoc29ydENob3JkcyA9IGNvbXBhcmVWYWx1ZSQxKF8pKS5fID0gXywgY2hvcmQpIDogc29ydENob3JkcyAmJiBzb3J0Q2hvcmRzLl87CiAgICAgIH07CgogICAgICByZXR1cm4gY2hvcmQ7CiAgICB9CgogICAgdmFyIHNsaWNlJDkgPSBBcnJheS5wcm90b3R5cGUuc2xpY2U7CgogICAgZnVuY3Rpb24gY29uc3RhbnQkaSh4KSB7CiAgICAgIHJldHVybiBmdW5jdGlvbigpIHsKICAgICAgICByZXR1cm4geDsKICAgICAgfTsKICAgIH0KCiAgICB2YXIgcGkkNiA9IE1hdGguUEksCiAgICAgICAgdGF1JDYgPSAyICogcGkkNiwKICAgICAgICBlcHNpbG9uJDYgPSAxZS02LAogICAgICAgIHRhdUVwc2lsb24kMSA9IHRhdSQ2IC0gZXBzaWxvbiQ2OwoKICAgIGZ1bmN0aW9uIFBhdGgkMSgpIHsKICAgICAgdGhpcy5feDAgPSB0aGlzLl95MCA9IC8vIHN0YXJ0IG9mIGN1cnJlbnQgc3VicGF0aAogICAgICB0aGlzLl94MSA9IHRoaXMuX3kxID0gbnVsbDsgLy8gZW5kIG9mIGN1cnJlbnQgc3VicGF0aAogICAgICB0aGlzLl8gPSAiIjsKICAgIH0KCiAgICBmdW5jdGlvbiBwYXRoJDEoKSB7CiAgICAgIHJldHVybiBuZXcgUGF0aCQxOwogICAgfQoKICAgIFBhdGgkMS5wcm90b3R5cGUgPSBwYXRoJDEucHJvdG90eXBlID0gewogICAgICBjb25zdHJ1Y3RvcjogUGF0aCQxLAogICAgICBtb3ZlVG86IGZ1bmN0aW9uKHgsIHkpIHsKICAgICAgICB0aGlzLl8gKz0gIk0iICsgKHRoaXMuX3gwID0gdGhpcy5feDEgPSAreCkgKyAiLCIgKyAodGhpcy5feTAgPSB0aGlzLl95MSA9ICt5KTsKICAgICAgfSwKICAgICAgY2xvc2VQYXRoOiBmdW5jdGlvbigpIHsKICAgICAgICBpZiAodGhpcy5feDEgIT09IG51bGwpIHsKICAgICAgICAgIHRoaXMuX3gxID0gdGhpcy5feDAsIHRoaXMuX3kxID0gdGhpcy5feTA7CiAgICAgICAgICB0aGlzLl8gKz0gIloiOwogICAgICAgIH0KICAgICAgfSwKICAgICAgbGluZVRvOiBmdW5jdGlvbih4LCB5KSB7CiAgICAgICAgdGhpcy5fICs9ICJMIiArICh0aGlzLl94MSA9ICt4KSArICIsIiArICh0aGlzLl95MSA9ICt5KTsKICAgICAgfSwKICAgICAgcXVhZHJhdGljQ3VydmVUbzogZnVuY3Rpb24oeDEsIHkxLCB4LCB5KSB7CiAgICAgICAgdGhpcy5fICs9ICJRIiArICgreDEpICsgIiwiICsgKCt5MSkgKyAiLCIgKyAodGhpcy5feDEgPSAreCkgKyAiLCIgKyAodGhpcy5feTEgPSAreSk7CiAgICAgIH0sCiAgICAgIGJlemllckN1cnZlVG86IGZ1bmN0aW9uKHgxLCB5MSwgeDIsIHkyLCB4LCB5KSB7CiAgICAgICAgdGhpcy5fICs9ICJDIiArICgreDEpICsgIiwiICsgKCt5MSkgKyAiLCIgKyAoK3gyKSArICIsIiArICgreTIpICsgIiwiICsgKHRoaXMuX3gxID0gK3gpICsgIiwiICsgKHRoaXMuX3kxID0gK3kpOwogICAgICB9LAogICAgICBhcmNUbzogZnVuY3Rpb24oeDEsIHkxLCB4MiwgeTIsIHIpIHsKICAgICAgICB4MSA9ICt4MSwgeTEgPSAreTEsIHgyID0gK3gyLCB5MiA9ICt5MiwgciA9ICtyOwogICAgICAgIHZhciB4MCA9IHRoaXMuX3gxLAogICAgICAgICAgICB5MCA9IHRoaXMuX3kxLAogICAgICAgICAgICB4MjEgPSB4MiAtIHgxLAogICAgICAgICAgICB5MjEgPSB5MiAtIHkxLAogICAgICAgICAgICB4MDEgPSB4MCAtIHgxLAogICAgICAgICAgICB5MDEgPSB5MCAtIHkxLAogICAgICAgICAgICBsMDFfMiA9IHgwMSAqIHgwMSArIHkwMSAqIHkwMTsKCiAgICAgICAgLy8gSXMgdGhlIHJhZGl1cyBuZWdhdGl2ZT8gRXJyb3IuCiAgICAgICAgaWYgKHIgPCAwKSB0aHJvdyBuZXcgRXJyb3IoIm5lZ2F0aXZlIHJhZGl1czogIiArIHIpOwoKICAgICAgICAvLyBJcyB0aGlzIHBhdGggZW1wdHk/IE1vdmUgdG8gKHgxLHkxKS4KICAgICAgICBpZiAodGhpcy5feDEgPT09IG51bGwpIHsKICAgICAgICAgIHRoaXMuXyArPSAiTSIgKyAodGhpcy5feDEgPSB4MSkgKyAiLCIgKyAodGhpcy5feTEgPSB5M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DEsCiAgICAgICAgICAgICAgdDIxID0gbCAvIGwyMTsKCiAgICAgICAgICAvLyBJZiB0aGUgc3RhcnQgdGFuZ2VudCBpcyBub3QgY29pbmNpZGVudCB3aXRoICh4MCx5MCksIGxpbmUgdG8uCiAgICAgICAgICBpZiAoTWF0aC5hYnModDAxIC0gMSkgPiBlcHNpbG9uJDYpIHsKICAgICAgICAgICAgdGhpcy5fICs9ICJMIiArICh4MSArIHQwMSAqIHgwMSkgKyAiLCIgKyAoeTEgKyB0MDEgKiB5MDEpOwogICAgICAgICAgfQoKICAgICAgICAgIHRoaXMuXyArPSAiQSIgKyByICsgIiwiICsgciArICIsMCwwLCIgKyAoKyh5MDEgKiB4MjAgPiB4MDEgKiB5MjApKSArICIsIiArICh0aGlzLl94MSA9IHgxICsgdDIxICogeDIxKSArICIsIiArICh0aGlzLl95MSA9IHkxICsgdDIxICogeTIxKTsKICAgICAgICB9CiAgICAgIH0sCiAgICAgIGFyYzogZnVuY3Rpb24oeCwgeSwgciwgYTAsIGExLCBjY3cpIHsKICAgICAgICB4ID0gK3gsIHkgPSAreSwgciA9ICtyLCBjY3cgPSAhIWNjdzsKICAgICAgICB2YXIgZHggPSByICogTWF0aC5jb3MoYTApLAogICAgICAgICAgICBkeSA9IHIgKiBNYXRoLnNpbihhMCksCiAgICAgICAgICAgIHgwID0geCArIGR4LAogICAgICAgICAgICB5MCA9IHkgKyBkeSwKICAgICAgICAgICAgY3cgPSAxIF4gY2N3LAogICAgICAgICAgICBkYSA9IGNjdyA/IGEwIC0gYTEgOiBhMSAtIGEwOwoKICAgICAgICAvLyBJcyB0aGUgcmFkaXVzIG5lZ2F0aXZlPyBFcnJvci4KICAgICAgICBpZiAociA8IDApIHRocm93IG5ldyBFcnJvcigibmVnYXRpdmUgcmFkaXVzOiAiICsgcik7CgogICAgICAgIC8vIElzIHRoaXMgcGF0aCBlbXB0eT8gTW92ZSB0byAoeDAseTApLgogICAgICAgIGlmICh0aGlzLl94MSA9PT0gbnVsbCkgewogICAgICAgICAgdGhpcy5fICs9ICJNIiArIHgwICsgIiwiICsgeTA7CiAgICAgICAgfQoKICAgICAgICAvLyBPciwgaXMgKHgwLHkwKSBub3QgY29pbmNpZGVudCB3aXRoIHRoZSBwcmV2aW91cyBwb2ludD8gTGluZSB0byAoeDAseTApLgogICAgICAgIGVsc2UgaWYgKE1hdGguYWJzKHRoaXMuX3gxIC0geDApID4gZXBzaWxvbiQ2IHx8IE1hdGguYWJzKHRoaXMuX3kxIC0geTApID4gZXBzaWxvbiQ2KSB7CiAgICAgICAgICB0aGlzLl8gKz0gIkwiICsgeDAgKyAiLCIgKyB5MDsKICAgICAgICB9CgogICAgICAgIC8vIElzIHRoaXMgYXJjIGVtcHR5PyBXZeKAmXJlIGRvbmUuCiAgICAgICAgaWYgKCFyKSByZXR1cm47CgogICAgICAgIC8vIERvZXMgdGhlIGFuZ2xlIGdvIHRoZSB3cm9uZyB3YXk/IEZsaXAgdGhlIGRpcmVjdGlvbi4KICAgICAgICBpZiAoZGEgPCAwKSBkYSA9IGRhICUgdGF1JDYgKyB0YXUkNjsKCiAgICAgICAgLy8gSXMgdGhpcyBhIGNvbXBsZXRlIGNpcmNsZT8gRHJhdyB0d28gYXJjcyB0byBjb21wbGV0ZSB0aGUgY2lyY2xlLgogICAgICAgIGlmIChkYSA+IHRhdUVwc2lsb24kMSkgewogICAgICAgICAgdGhpcy5fICs9ICJBIiArIHIgKyAiLCIgKyByICsgIiwwLDEsIiArIGN3ICsgIiwiICsgKHggLSBkeCkgKyAiLCIgKyAoeSAtIGR5KSArICJBIiArIHIgKyAiLCIgKyByICsgIiwwLDEsIiArIGN3ICsgIiwiICsgKHRoaXMuX3gxID0geDApICsgIiwiICsgKHRoaXMuX3kxID0geTApOwogICAgICAgIH0KCiAgICAgICAgLy8gSXMgdGhpcyBhcmMgbm9uLWVtcHR5PyBEcmF3IGFuIGFyYyEKICAgICAgICBlbHNlIGlmIChkYSA+IGVwc2lsb24kNikgewogICAgICAgICAgdGhpcy5fICs9ICJBIiArIHIgKyAiLCIgKyByICsgIiwwLCIgKyAoKyhkYSA+PSBwaSQ2KSkgKyAiLCIgKyBjdyArICIsIiArICh0aGlzLl94MSA9IHggKyByICogTWF0aC5jb3MoYTEpKSArICIsIiArICh0aGlzLl95MSA9IHkgKyByICogTWF0aC5zaW4oYTEpKTsKICAgICAgICB9CiAgICAgIH0sCiAgICAgIHJlY3Q6IGZ1bmN0aW9uKHgsIHksIHcsIGgpIHsKICAgICAgICB0aGlzLl8gKz0gIk0iICsgKHRoaXMuX3gwID0gdGhpcy5feDEgPSAreCkgKyAiLCIgKyAodGhpcy5feTAgPSB0aGlzLl95MSA9ICt5KSArICJoIiArICgrdykgKyAidiIgKyAoK2gpICsgImgiICsgKC13KSArICJaIjsKICAgICAgfSwKICAgICAgdG9TdHJpbmc6IGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiB0aGlzLl87CiAgICAgIH0KICAgIH07CgogICAgZnVuY3Rpb24gZGVmYXVsdFNvdXJjZSQyKGQpIHsKICAgICAgcmV0dXJuIGQuc291cmNlOwogICAgfQoKICAgIGZ1bmN0aW9uIGRlZmF1bHRUYXJnZXQkMShkKSB7CiAgICAgIHJldHVybiBkLnRhcmdldDsKICAgIH0KCiAgICBmdW5jdGlvbiBkZWZhdWx0UmFkaXVzJDIoZCkgewogICAgICByZXR1cm4gZC5yYWRpdXM7CiAgICB9CgogICAgZnVuY3Rpb24gZGVmYXVsdFN0YXJ0QW5nbGUkMShkKSB7CiAgICAgIHJldHVybiBkLnN0YXJ0QW5nbGU7CiAgICB9CgogICAgZnVuY3Rpb24gZGVmYXVsdEVuZEFuZ2xlJDEoZCkgewogICAgICByZXR1cm4gZC5lbmRBbmdsZTsKICAgIH0KCiAgICBmdW5jdGlvbiByaWJib24kMSgpIHsKICAgICAgdmFyIHNvdXJjZSA9IGRlZmF1bHRTb3VyY2UkMiwKICAgICAgICAgIHRhcmdldCA9IGRlZmF1bHRUYXJnZXQkMSwKICA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OwogICAgICB9OwoKICAgICAgcmliYm9uLnNvdXJjZSA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChzb3VyY2UgPSBfLCByaWJib24pIDogc291cmNlOwogICAgICB9OwoKICAgICAgcmliYm9uLnRhcmdldCA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/ICh0YXJnZXQgPSBfLCByaWJib24pIDogdGFyZ2V0OwogICAgICB9OwoKICAgICAgcmliYm9uLmNvbnRleHQgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoKGNvbnRleHQgPSBfID09IG51bGwgPyBudWxsIDogXyksIHJpYmJvbikgOiBjb250ZXh0OwogICAgICB9OwoKICAgICAgcmV0dXJuIHJpYmJvbjsKICAgIH0KCiAgICB2YXIgcHJlZml4JDEgPSAiJCI7CgogICAgZnVuY3Rpb24gTWFwJDIoKSB7fQoKICAgIE1hcCQyLnByb3RvdHlwZSA9IG1hcCQ1LnByb3RvdHlwZSA9IHsKICAgICAgY29uc3RydWN0b3I6IE1hcCQyLAogICAgICBoYXM6IGZ1bmN0aW9uKGtleSkgewogICAgICAgIHJldHVybiAocHJlZml4JDEgKyBrZXkpIGluIHRoaXM7CiAgICAgIH0sCiAgICAgIGdldDogZnVuY3Rpb24oa2V5KSB7CiAgICAgICAgcmV0dXJuIHRoaXNbcHJlZml4JDEgKyBrZXldOwogICAgICB9LAogICAgICBzZXQ6IGZ1bmN0aW9uKGtleSwgdmFsdWUpIHsKICAgICAgICB0aGlzW3ByZWZpeCQxICsga2V5XSA9IHZhbHVlOwogICAgICAgIHJldHVybiB0aGlzOwogICAgICB9LAogICAgICByZW1vdmU6IGZ1bmN0aW9uKGtleSkgewogICAgICAgIHZhciBwcm9wZXJ0eSA9IHByZWZpeCQxICsga2V5OwogICAgICAgIHJldHVybiBwcm9wZXJ0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qZWN0IHRvIG1hcC4KICAgICAgZWxzZSBpZiAob2JqZWN0KSBmb3IgKHZhciBrZXkgaW4gb2JqZWN0KSBtYXAuc2V0KGtleSwgb2JqZWN0W2tleV0pOwoKICAgICAgcmV0dXJuIG1hcDsKICAgIH0KCiAgICBmdW5jdGlvbiBuZXN0JDEoKSB7CiAgICAgIHZhciBrZXlzID0gW10sCiAgICAgICAgICBzb3J0S2V5cyA9IFtdLAogICAgICAgICAgc29ydFZhbHVlcywKICAgICAgICAgIHJvbGx1cCwKICAgICAgICAgIG5lc3Q7CgogICAgICBmdW5jdGlvbiBhcHBseShhcnJheSwgZGVwdGgsIGNyZWF0ZVJlc3VsdCwgc2V0UmVzdWx0KSB7CiAgICAgICAgaWYgKGRlcHRoID49IGtleXMubGVuZ3RoKSB7CiAgICAgICAgICBpZiAoc29ydFZhbHVlcyAhPSBudWxsKSBhcnJheS5zb3J0KHNvcnRWYWx1ZXMpOwogICAgICAgICAgcmV0dXJuIHJvbGx1cCAhPSBudWxsID8gcm9sbHVwKGFycmF5KSA6IGFycmF5OwogICAgICAgIH0KCiAgICAgICAgdmFyIGkgPSAtMSwKICAgICAgICAgICAgbiA9IGFycmF5Lmxlbmd0aCwKICAgICAgICAgICAga2V5ID0ga2V5c1tkZXB0aCsrXSwKICAgICAgICAgICAga2V5VmFsdWUsCiAgICAgICAgICAgIHZhbHVlLAogICAgICAgICAgICB2YWx1ZXNCeUtleSA9IG1hcCQ1KCksCiAgICAgICAgICAgIHZhbHVlcywKICAgICAgICAgICAgcmVzdWx0ID0gY3JlYXRlUmVzdWx0KCk7CgogICAgICAgIHdoaWxlICgrK2kgPCBuKSB7CiAgICAgICAgICBpZiAodmFsdWVzID0gdmFsdWVzQnlLZXkuZ2V0KGtleVZhbHVlID0ga2V5KHZhbHVlID0gYXJyYXlbaV0pICsgIiIpKSB7CiAgICAgICAgICAgIHZhbHVlcy5wdXNoKHZhbHVlKTsKICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgIC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b3RvJDIuaGFzLAogICAgICBhZGQ6IGZ1bmN0aW9uKHZhbHVlKSB7CiAgICAgICAgdmFsdWUgKz0gIiI7CiAgICAgICAgdGhpc1twcmVmaXgkMSArIHZhbHVlXSA9IHZhbHVlOwogICAgICAgIHJldHVybiB0aGlzOwogICAgICB9LAogICAgICByZW1vdmU6IHByb3RvJDIucmVtb3ZlLAogICAgICBjbGVhcjogcHJvdG8kMi5jbGVhciwKICAgICAgdmFsdWVzOiBwcm90byQyLmtleXMsCiAgICAgIHNpemU6IHByb3RvJDIuc2l6ZSwKICAgICAgZW1wdHk6IHByb3RvJDIuZW1wdHksCiAgICAgIGVhY2g6IHByb3RvJDIuZWFjaAogICAgfTsKCiAgICBmdW5jdGlvbiBzZXQkNihvYmplY3QsIGYpIHsKICAgICAgdmFyIHNldCA9IG5ldyBTZXQkMjsKCiAgICAgIC8vIENvcHkgY29uc3RydWN0b3IuCiAgICAgIGlmIChvYmplY3QgaW5zdGFuY2VvZiBTZXQkMikgb2JqZWN0LmVhY2goZnVuY3Rpb24odmFsdWUpIHsgc2V0LmFkZCh2YWx1ZSk7IH0pOwoKICAgICAgLy8gT3RoZXJ3aXNlLCBhc3N1bWUgaXTigJlzIGFuIGFycmF5LgogICAgICBlbHNlIGlmIChvYmplY3QpIHsKICAgICAgICB2YXIgaSA9IC0xLCBuID0gb2JqZWN0Lmxlbmd0aDsKICAgICAgICBpZiAoZiA9PSBudWxsKSB3aGlsZSAoKytpIDwgbikgc2V0LmFkZChvYmplY3RbaV0pOwogICAgICAgIGVsc2Ugd2hpbGUgKCsraSA8IG4pIHNldC5hZGQoZihvYmplY3RbaV0sIGksIG9iamVjdCkpOwogICAgICB9CgogICAgICByZXR1cm4gc2V0OwogICAgfQoKICAgIGZ1bmN0aW9uIGtleXMkMShtYXApIHsKICAgICAgdmFyIGtleXMgPSBbXTsKICAgICAgZm9yICh2YXIga2V5IGluIG1hcCkga2V5cy5wdXNoKGtleSk7CiAgICAgIHJldHVybiBrZXl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HRvU3RyaW5nOiBmdW5jdGlvbigpIHsKICAgICAgICB2YXIgYSA9IHRoaXMub3BhY2l0eTsgYSA9IGlzTmFOKGEpID8gMSA6IE1hdGgubWF4KDAsIE1hdGgubWluKDEsIGEpKTsKICAgICAgICByZXR1cm4gKGEgPT09IDEgPyAicmdiKCIgOiAicmdiYSgiKQogICAgICAgICAgICArIE1hdGgubWF4KDAsIE1hdGgubWluKDI1NSwgTWF0aC5yb3VuZCh0aGlzLnIpIHx8IDApKSArICIsICIKICAgICAgICAgICAgKyBNYXRoLm1heCgwLCBNYXRoLm1pbigyNTUsIE1hdGgucm91bmQodGhpcy5nKSB8fCAwKSkgKyAiLCAiCiAgICAgICAgICAgICsgTWF0aC5tYXgoMCwgTWF0aC5taW4oMjU1LCBNYXRoLnJvdW5kKHRoaXMuYikgfHwgMCkpCiAgICAgICAgICAgICsgKGEgPT09IDEgPyAiKSIgOiAiLCAiICsgYSArICIpIik7CiAgICAgIH0KICAgIH0pKTsKCiAgICBmdW5jdGlvbiBoc2xhJDIoaCwgcywgbCwgYSkgewogICAgICBpZiAoYSA8PSAwKSBoID0gcyA9IGwgPSBOYU47CiAgICAgIGVsc2UgaWYgKGwgPD0gMCB8fCBsID49IDEpIGggPSBzID0gTmFOOwogICAgICBlbHNlIGlmIChzIDw9IDApIGggPSBOYU47CiAgICAgIHJldHVybiBuZXcgSHNsJDIoaCwgcywgbCwgYSk7CiAgICB9CgogICAgZnVuY3Rpb24gaHNsQ29udmVydCQyKG8pIHsKICAgICAgaWYgKG8gaW5zdGFuY2VvZiBIc2wkMikgcmV0dXJuIG5ldyBIc2wkMihvLmgsIG8ucywgby5sLCBvLm9wYWNpdHkpOwogICAgICBpZiAoIShvIGluc3RhbmNlb2YgQ29sb3IkMikpIG8gPSBjb2xvciQyKG8pOwogICAgICBpZiAoIW8pIHJldHVybiBuZXcgSHNsJDI7CiAgICAgIGlmIChvIGluc3RhbmNlb2YgSHNsJDIpIHJldHVybiBvOwogICAgICBvID0g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9CgogICAgZGVmaW5lJDIoSHNsJDIsIGhzbCQ0LCBleHRlbmQkMihDb2xvciQyLCB7CiAgICAgIGJyaWdodGVyOiBmdW5jdGlvbihrKSB7CiAgICAgICAgayA9IGsgPT0gbnVsbCA/IGJyaWdodGVyJDIgOiBNYXRoLnBvdyhicmlnaHRlciQyLCBrKTsKICAgICAgICByZXR1cm4gbmV3IEhzbCQyKHRoaXMuaCwgdGhpcy5zLCB0aGlzLmwgKiBrLCB0aGlzLm9wYWNpdHkpOwogICAgICB9LAogICAgICBkYXJrZXI6IGZ1bmN0aW9uKGspIHsKICAgICAgICBrID0gayA9PSBudWxsID8gZGFya2VyJDIgOiBNYXRoLnBvdyhkYXJrZXIkMiwgayk7CiAgICAgICAgcmV0dXJuIG5ldyBIc2wkMih0aGlzLmgsIHRoaXMucywgdGhpcy5sICogaywgdGhpcy5vcGFjaXR5KTsKICAgICAgfSwKICAgICAgcmdiOiBmdW5jdGlvbigpIHsKICAgICAgICB2YXIgaCA9IHRoaXMuaCAlIDM2MCArICh0aGlzLmggPCAwKSAqIDM2MCwKICAgICAgICAgICAgcyA9IGlzTmFOKGgpIHx8IGlzTmFOKHRoaXMucykgPyAwIDogdGhpcy5zLAogICAgICAgICAgICBsID0gdGhpcy5sLAogICAgICAgICAgICBtMiA9IGwgKyAobCA8IDAuNSA/IGwgOiAxIC0gbCkgKiBzLAogICAgICAgICAgICBtMSA9IDIgKiBsIC0gbTI7CiAgICAgICAgcmV0dXJuIG5ldyBSZ2IkMigKICAgICAgICAgIGhzbDJyZ2IkMihoID49IDI0MCA/IGggLSAyNDAgOiBoICsgMTIwLCBtMSwgbTIpLAogICAgICAgICAgaHNsMnJnYiQyKGgsIG0xLCBtMiksCiAgICAgICAgICBoc2wycmdiJDIoaCA8IDEyMCA/IGggKyAyNDAgOiBoIC0gMTIwLCBtMSwgbTIpLAogICAgICAgICAgdGhpcy5vcGFjaXR5CiAgICAgICAgKTsKICAgICAgfSwKICAgICAgZGlzcGxheWFib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ICBmdW5jdGlvbiBDdWJlaGVsaXgkMShoLCBzLCBsLCBvcGFjaXR5KSB7CiAgICAgIHRoaXMuaCA9ICtoOwogICAgICB0aGlzLnMgPSArczsKICAgICAgdGhpcy5sID0gK2w7CiAgICAgIHRoaXMub3BhY2l0eSA9ICtvcGFjaXR5OwogICAgfQoKICAgIGRlZmluZSQyKEN1YmVoZWxpeCQxLCBjdWJlaGVsaXgkNCwgZXh0ZW5kJDIoQ29sb3IkMiwgewogICAgICBicmlnaHRlcjogZnVuY3Rpb24oaykgewogICAgICAgIGsgPSBrID09IG51bGwgPyBicmlnaHRlciQyIDogTWF0aC5wb3coYnJpZ2h0ZXIkMiwgayk7CiAgICAgICAgcmV0dXJuIG5ldyBDdWJlaGVsaXgkMSh0aGlzLmgsIHRoaXMucywgdGhpcy5sICogaywgdGhpcy5vcGFjaXR5KTsKICAgICAgfSwKICAgICAgZGFya2VyOiBmdW5jdGlvbihrKSB7CiAgICAgICAgayA9IGsgPT0gbnVsbCA/IGRhcmtlciQyIDogTWF0aC5wb3coZGFya2VyJDIsIGspOwogICAgICAgIHJldHVybiBuZXcgQ3ViZWhlbGl4JDEodGhpcy5oLCB0aGlzLnMsIHRoaXMubCAqIGssIHRoaXMub3BhY2l0eSk7CiAgICAgIH0sCiAgICAgIHJnYjogZnVuY3Rpb24oKSB7CiAgICAgICAgdmFyIGggPSBpc05hTih0aGlzLmgpID8gMCA6ICh0aGlzLmggKyAxMjApICogZGVnMnJhZCQxLAogICAgICAgICAgICBsID0gK3RoaXMubCwKICAgICAgICAgICAgYSA9IGlzTmFOKHRoaXMucykgPyAwIDogdGhpcy5zICogbCAqICgxIC0gbCksCiAgICAgICAgICAgIGNvc2ggPSBNYXRoLmNvcyhoKSwKICAgICAgICAgICAgc2luaCA9IE1hdGguc2luKGgpOwogICAgICAgIHJldHVybiBuZXcgUmdiJDIoCiAgICAgICAgICAyNTUgKiAobCArIGEgKiAoQSQxICogY29zaCArIEIkMSAqIHNpbmgpKSwKIC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ndW1lbnRzW2ldICsgIiIpIHx8ICh0IGluIF8pIHx8IC9bXHMuXS8udGVzdCh0KSkgdGhyb3cgbmV3IEVycm9yKCJpbGxlZ2FsIHR5cGU6ICIgKyB0KTsKICAgICAgICBfW3RdID0gW107CiAgICAgIH0KICAgICAgcmV0dXJuIG5ldyBEaXNwYXRjaCQzKF8pOwogICAgfQoKICAgIGZ1bmN0aW9uIERpc3BhdGNoJDMoXykgewogICAgICB0aGlzLl8gPSBfOwogICAgfQoKICAgIGZ1bmN0aW9uIHBhcnNlVHlwZW5hbWVzJDUodHlwZW5hbWVzLCB0eXBlcykgewogICAgICByZXR1cm4gdHlwZW5hbWVzLnRyaW0oKS5zcGxpdCgvXnxccysvKS5tYXAoZnVuY3Rpb24odCkgewogICAgICAgIHZhciBuYW1lID0gIiIsIGkgPSB0LmluZGV4T2YoIi4iKTsKICAgICAgICBpZiAoaSA+PSAwKSBuYW1lID0gdC5zbGljZShpICsgMSksIHQgPSB0LnNsaWNlKDAsIGkpOwogICAgICAgIGlmICh0ICYmICF0eXBlcy5oYXNPd25Qcm9wZXJ0eSh0KSkgdGhyb3cgbmV3IEVycm9yKCJ1bmtub3duIHR5cGU6ICIgKyB0KTsKICAgICAgICByZXR1cm4ge3R5cGU6IHQsIG5hbWU6IG5hbWV9OwogICAgICB9KTsKICAgIH0KCiAgICBEaXNwYXRjaCQzLnByb3RvdHlwZSA9IGRpc3BhdGNoJDMucHJvdG90eXBlID0gewogICAgICBjb25zdHJ1Y3RvcjogRGlzcGF0Y2gkMywKICAgICAgb246IGZ1bmN0aW9uKHR5cGVuYW1lLCBjYWxsYmFjaykgewogICAgICAgIHZhciBfID0gdGhpcy5fLAogICAgICAgICAgICBUID0gcGFyc2VUeXBlbmFtZXMkNSh0eXBlbmFtZSArICIiLCBfKSwKICAgICAgICAgICAgdCwKICAgICAgICAgICAgaSA9IC0xLAogICAgICAgICAgICBuID0gVC5sZW5ndGg7CgogICAgICAgIC8vIElmIG5vIGNhbGxiYW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AgICAgICAgIHJldHVybiBjLnZhbHVlOwogICAgICAgIH0KICAgICAgfQogICAgfQoKICAgIGZ1bmN0aW9uIHNldCQ4KHR5cGUsIG5hbWUsIGNhbGxiYWNrKSB7CiAgICAgIGZvciAodmFyIGkgPSAwLCBuID0gdHlwZS5sZW5ndGg7IGkgPCBuOyArK2kpIHsKICAgICAgICBpZiAodHlwZVtpXS5uYW1lID09PSBuYW1lKSB7CiAgICAgICAgICB0eXBlW2ldID0gbm9vcCQ2LCB0eXBlID0gdHlwZS5zbGljZSgwLCBpKS5jb25jYXQodHlwZS5zbGljZShpICsgMSkpOwogICAgICAgICAgYnJlYWs7CiAgICAgICAgfQogICAgICB9CiAgICAgIGlmIChjYWxsYmFjayAhPSBudWxsKSB0eXBlLnB1c2goe25hbWU6IG5hbWUsIHZhbHVlOiBjYWxsYmFja30pOwogICAgICByZXR1cm4gdHlwZTsKICAgIH0KCiAgICB2YXIgeGh0bWwkMiA9ICJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hodG1sIjsKCiAgICB2YXIgbmFtZXNwYWNlcyQyID0gewogICAgICBzdmc6ICJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIsCiAgICAgIHhodG1sOiB4aHRtbCQyLAogICAgICB4bGluazogImh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiLAogICAgICB4bWw6ICJodHRwOi8vd3d3LnczLm9yZy9YTUwvMTk5OC9uYW1lc3BhY2UiLAogICAgICB4bWxuczogImh0dHA6Ly93d3cudzMub3JnLzIwMDAveG1sbnMvIgogICAgfTsKCiAgICBmdW5jdGlvbiBuYW1lc3BhY2UkMihuYW1lKSB7CiAgICAgIHZhciBwcmVmaXggPSBuYW1lICs9ICIiLCBpID0gcHJlZml4LmluZGV4T2YoIjoiKTsKICAgICAgaWYgKGkgPj0gMCAmJiAocHJlZml4ID0gbmFtZS5zbGljZSgwLCBpKSkgIT09ICJ4bWxucyIpIG5hbWUgPSBuYW1lLnNsaWNlKG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m91cExlbmd0aCA9IGdyb3VwLmxlbmd0aCwKICAgICAgICAgIGRhdGFMZW5ndGggPSBkYXRhLmxlbmd0aDsKCiAgICAgIC8vIFB1dCBhbnkgbm9uLW51bGwgbm9kZXMgdGhhdCBmaXQgaW50byB1cGRhdGUuCiAgICAgIC8vIFB1dCBhbnkgbnVsbCBub2RlcyBpbnRvIGVudGVyLgogICAgICAvLyBQdXQgYW55IHJlbWFpbmluZyBkYXRhIGludG8gZW50ZXIuCiAgICAgIGZvciAoOyBpIDwgZGF0YUxlbmd0aDsgKytpKSB7CiAgICAgICAgaWYgKG5vZGUgPSBncm91cFtpXSkgewogICAgICAgICAgbm9kZS5fX2RhdGFfXyA9IGRhdGFbaV07CiAgICAgICAgICB1cGRhdGVbaV0gPSBub2RlOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICBlbnRlcltpXSA9IG5ldyBFbnRlck5vZGUkMihwYXJlbnQsIGRhdGFbaV0pOwogICAgICAgIH0KICAgICAgfQoKICAgICAgLy8gUHV0IGFueSBub24tbnVsbCBub2RlcyB0aGF0IGRvbuKAmXQgZml0IGludG8gZXhpdC4KICAgICAgZm9yICg7IGkgPCBncm91cExlbmd0aDsgKytpKSB7CiAgICAgICAgaWYgKG5vZGUgPSBncm91cFtpXSkgewogICAgICAgICAgZXhpdFtpXSA9IG5vZGU7CiAgICAgICAgfQogICAgICB9CiAgICB9CgogICAgZnVuY3Rpb24gYmluZEtleSQyKHBhcmVudCwgZ3JvdXAsIGVudGVyLCB1cGRhdGUsIGV4aXQsIGRhdGEsIGtleSkgewogICAgICB2YXIgaSwKICAgICAgICAgIG5vZGUsCiAgICAgICAgICBub2RlQnlLZXlWYWx1ZSA9IHt9LAogICAgICAgICAgZ3JvdXBMZW5ndGggPSBncm91cC5sZW5ndGgsCiAgICAgICAgICBkYXRhTGVuZ3RoID0gZGF0YS5sZW5ndGgsCiAgICAgICAgICBrZXlWYWx1ZXMgPSBuZXcgQXJyYXkoZ3JvdXBMZW5nd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uIGNsYXNzQXJyYXkkMihzdHJpbmcpIHsKICAgICAgcmV0dXJuIHN0cmluZy50cmltKCkuc3BsaXQoL158XHMrLyk7CiAgICB9CgogICAgZnVuY3Rpb24gY2xhc3NMaXN0JDIobm9kZSkgewogICAgICByZXR1cm4gbm9kZS5jbGFzc0xpc3QgfHwgbmV3IENsYXNzTGlzdCQyKG5vZGUpOwogICAgfQoKICAgIGZ1bmN0aW9uIENsYXNzTGlzdCQyKG5vZGUpIHsKICAgICAgdGhpcy5fbm9kZSA9IG5vZGU7CiAgICAgIHRoaXMuX25hbWVzID0gY2xhc3NBcnJheSQyKG5vZGUuZ2V0QXR0cmlidXRlKCJjbGFzcyIpIHx8ICIiKTsKICAgIH0KCiAgICBDbGFzc0xpc3QkMi5wcm90b3R5cGUgPSB7CiAgICAgIGFkZDogZnVuY3Rpb24obmFtZSkgewogICAgICAgIHZhciBpID0gdGhpcy5fbmFtZXMuaW5kZXhPZihuYW1lKTsKICAgICAgICBpZiAoaSA8IDApIHsKICAgICAgICAgIHRoaXMuX25hbWVzLnB1c2gobmFtZSk7CiAgICAgICAgICB0aGlzLl9ub2RlLnNldEF0dHJpYnV0ZSgiY2xhc3MiLCB0aGlzLl9uYW1lcy5qb2luKCIgIikpOwogICAgICAgIH0KICAgICAgfSwKICAgICAgcmVtb3ZlOiBmdW5jdGlvbihuYW1lKSB7CiAgICAgICAgdmFyIGkgPSB0aGlzLl9uYW1lcy5pbmRleE9mKG5hbWUpOwogICAgICAgIGlmIChpID49IDApIHsKICAgICAgICAgIHRoaXMuX25hbWVzLnNwbGljZShpLCAxKTsKICAgICAgICAgIHRoaXMuX25vZGUuc2V0QXR0cmlidXRlKCJjbGFzcyIsIHRoaXMuX25hbWVzLmpvaW4oIiAiKSk7CiAgICAgICAgfQogICAgICB9LAogICAgICBjb250YWluczogZnVuY3Rpb24obmFtZSkgewogICAgICAgIHJldHVybiB0aGlzLl9uYW1lcy5pbmRleE9mKG5hbWUpID49IDA7CiAgICAgIH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dGlvbiBjb250ZXh0TGlzdGVuZXIkMihsaXN0ZW5lciwgaW5kZXgsIGdyb3VwKSB7CiAgICAgIHJldHVybiBmdW5jdGlvbihldmVudDEpIHsKICAgICAgICB2YXIgZXZlbnQwID0gZXZlbnQkMjsgLy8gRXZlbnRzIGNhbiBiZSByZWVudHJhbnQgKGUuZy4sIGZvY3VzKS4KICAgICAgICBldmVudCQyID0gZXZlbnQxOwogICAgICAgIHRyeSB7CiAgICAgICAgICBsaXN0ZW5lci5jYWxsKHRoaXMsIHRoaXMuX19kYXRhX18sIGluZGV4LCBncm91cCk7CiAgICAgICAgfSBmaW5hbGx5IHsKICAgICAgICAgIGV2ZW50JDIgPSBldmVudDA7CiAgICAgICAgfQogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIHBhcnNlVHlwZW5hbWVzJDYodHlwZW5hbWVzKSB7CiAgICAgIHJldHVybiB0eXBlbmFtZXMudHJpbSgpLnNwbGl0KC9efFxzKy8pLm1hcChmdW5jdGlvbih0KSB7CiAgICAgICAgdmFyIG5hbWUgPSAiIiwgaSA9IHQuaW5kZXhPZigiLiIpOwogICAgICAgIGlmIChpID49IDApIG5hbWUgPSB0LnNsaWNlKGkgKyAxKSwgdCA9IHQuc2xpY2UoMCwgaSk7CiAgICAgICAgcmV0dXJuIHt0eXBlOiB0LCBuYW1lOiBuYW1lfTsKICAgICAgfSk7CiAgICB9CgogICAgZnVuY3Rpb24gb25SZW1vdmUkMih0eXBlbmFtZSkgewogICAgICByZXR1cm4gZnVuY3Rpb24oKSB7CiAgICAgICAgdmFyIG9uID0gdGhpcy5fX29uOwogICAgICAgIGlmICghb24pIHJldHVybjsKICAgICAgICBmb3IgKHZhciBqID0gMCwgaSA9IC0xLCBtID0gb24ubGVuZ3RoLCBvOyBqIDwgbTsgKytqKSB7CiAgICAgICAgICBpZiAobyA9IG9uW2pdLCAoIXR5cGVuYW1lLnR5cGUgfHwgby50eXBlID09PSB0eXBlbmFtZS50eXBlKSAmJiBvLm5hbWUgPT09IHR5cGVuYW1lLm5hbWUpIHsKICAgICAgICAgICAgdGhpcy5yZW1vdmVFdmVudExpc3RlbmVyKG8udHlwZSwgby5saXN0ZW5lciwgby5jYXB0dXJlKTsKICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIG9uWysraV0gPSBvOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBpZiAoKytpKSBvbi5sZW5ndGggPSBpOwogICAgICAgIGVsc2UgZGVsZXRlIHRoaXMuX19vbjsKICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiBvbkFkZCQyKHR5cGVuYW1lLCB2YWx1ZSwgY2FwdHVyZSkgewogICAgICB2YXIgd3JhcCA9IGZpbHRlckV2ZW50cyQyLmhhc093blByb3BlcnR5KHR5cGVuYW1lLnR5cGUpID8gZmlsdGVyQ29udGV4dExpc3RlbmVyJDIgOiBjb250ZXh0TGlzdGVuZXIkMjsKICAgICAgcmV0dXJuIGZ1bmN0aW9uKGQsIGksIGdyb3VwKSB7CiAgICAgICAgdmFyIG9uID0gdGhpcy5fX29uLCBvLCBsaXN0ZW5lciA9IHdyYXAodmFsdWUsIGksIGdyb3VwKTsKICAgICAgICBpZiAob24pIGZvciAodmFyIGogPSAwLCBtID0gb24ubGVuZ3RoOyBqIDwgbTsgKytqKSB7CiAgICAgICAgICBpZiAoKG8gPSBvbltqXSkudHlwZSA9PT0gdHlwZW5hbWUudHlwZSAmJiBvLm5hbWUgPT09IHR5cGVuYW1lLm5hbWUpIHsKICAgICAgICAgICAgdGhpcy5yZW1vdmVFdmVudExpc3RlbmVyKG8udHlwZSwgby5saXN0ZW5lciwgby5jYXB0dXJlKTsKICAgICAgICAgICAgdGhpcy5hZGRFdmVudExpc3RlbmVyKG8udHlwZSwgby5saXN0ZW5lciA9IGxpc3RlbmVyLCBvLmNhcHR1cmUgPSBjYXB0dXJlKTsKICAgICAgICAgICAgby52YWx1ZSA9IHZhbHVlOwogICAgICAgICAgICByZXR1cm47CiAg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W51LgogICAgZnVuY3Rpb24gZGVmYXVsdEZpbHRlciQ0KCkgewogICAgICByZXR1cm4gIWV2ZW50JDIuYnV0dG9uOwogICAgfQoKICAgIGZ1bmN0aW9uIGRlZmF1bHRDb250YWluZXIkMSgpIHsKICAgICAgcmV0dXJuIHRoaXMucGFyZW50Tm9kZTsKICAgIH0KCiAgICBmdW5jdGlvbiBkZWZhdWx0U3ViamVjdCQxKGQpIHsKICAgICAgcmV0dXJuIGQgPT0gbnVsbCA/IHt4OiBldmVudCQyLngsIHk6IGV2ZW50JDIueX0gOiBkOwogICAgfQoKICAgIGZ1bmN0aW9uIGRlZmF1bHRUb3VjaGFibGUkMygpIHsKICAgICAgcmV0dXJuICJvbnRvdWNoc3RhcnQiIGluIHRoaXM7CiAgICB9CgogICAgZnVuY3Rpb24gZHJhZyQxKCkgewogICAgICB2YXIgZmlsdGVyID0gZGVmYXVsdEZpbHRlciQ0LAogICAgICAgICAgY29udGFpbmVyID0gZGVmYXVsdENvbnRhaW5lciQxLAogICAgICAgICAgc3ViamVjdCA9IGRlZmF1bHRTdWJqZWN0JDEsCiAgICAgICAgICB0b3VjaGFibGUgPSBkZWZhdWx0VG91Y2hhYmxlJDMsCiAgICAgICAgICBnZXN0dXJlcyA9IHt9LAogICAgICAgICAgbGlzdGVuZXJzID0gZGlzcGF0Y2gkMygic3RhcnQiLCAiZHJhZyIsICJlbmQiKSwKICAgICAgICAgIGFjdGl2ZSA9IDAsCiAgICAgICAgICBtb3VzZWRvd254LAogICAgICAgICAgbW91c2Vkb3dueSwKICAgICAgICAgIG1vdXNlbW92aW5nLAogICAgICAgICAgdG91Y2hlbmRpbmcsCiAgICAgICAgICBjbGlja0Rpc3RhbmNlMiA9IDA7CgogICAgICBmdW5jdGlvbiBkcmFnKHNlbGVjdGlvbikgewogICAgICAgIHNlbGVjdGlvbgogICAgICAgICAgICAub24oIm1vdXNlZG93bi5kcmFnIiwgbW91c2Vkb3duZWQpCiAgICAgICAgICAuZmlsdGVyK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1bmN0aW9uIG1vdXNlbW92ZWQoKSB7CiAgICAgICAgbm9ldmVudCQ1KCk7CiAgICAgICAgaWYgKCFtb3VzZW1vdmluZykgewogICAgICAgICAgdmFyIGR4ID0gZXZlbnQkMi5jbGllbnRYIC0gbW91c2Vkb3dueCwgZHkgPSBldmVudCQyLmNsaWVudFkgLSBtb3VzZWRvd255OwogICAgICAgICAgbW91c2Vtb3ZpbmcgPSBkeCAqIGR4ICsgZHkgKiBkeSA+IGNsaWNrRGlzdGFuY2UyOwogICAgICAgIH0KICAgICAgICBnZXN0dXJlcy5tb3VzZSgiZHJhZyIpOwogICAgICB9CgogICAgICBmdW5jdGlvbiBtb3VzZXVwcGVkKCkgewogICAgICAgIHNlbGVjdCQyKGV2ZW50JDIudmlldykub24oIm1vdXNlbW92ZS5kcmFnIG1vdXNldXAuZHJhZyIsIG51bGwpOwogICAgICAgIHllc2RyYWckMihldmVudCQyLnZpZXcsIG1vdXNlbW92aW5nKTsKICAgICAgICBub2V2ZW50JDUoKTsKICAgICAgICBnZXN0dXJlcy5tb3VzZSgiZW5kIik7CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIHRvdWNoc3RhcnRlZCgpIHsKICAgICAgICBpZiAoIWZpbHRlci5hcHBseSh0aGlzLCBhcmd1bWVudHMpKSByZXR1cm47CiAgICAgICAgdmFyIHRvdWNoZXMgPSBldmVudCQyLmNoYW5nZWRUb3VjaGVzLAogICAgICAgICAgICBjID0gY29udGFpbmVyLmFwcGx5KHRoaXMsIGFyZ3VtZW50cyksCiAgICAgICAgICAgIG4gPSB0b3VjaGVzLmxlbmd0aCwgaSwgZ2VzdHVyZTsKCiAgICAgICAgZm9yIChpID0gMDsgaSA8IG47ICsraSkgewogICAgICAgICAgaWYgKGdlc3R1cmUgPSBiZWZvcmVzdGFydCh0b3VjaGVzW2ldLmlkZW50aWZpZXIsIGMsIHRvdWNoJDEsIHRoaXMsIGFyZ3VtZW50cykpIHsKICAgICAgICAgICAgbm9wcm9wYW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VycywgYXJndW1lbnRzKTsKICAgICAgICByZXR1cm4gdmFsdWUgPT09IGxpc3RlbmVycyA/IGRyYWcgOiB2YWx1ZTsKICAgICAgfTsKCiAgICAgIGRyYWcuY2xpY2tEaXN0YW5jZSA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChjbGlja0Rpc3RhbmNlMiA9IChfID0gK18pICogXywgZHJhZykgOiBNYXRoLnNxcnQoY2xpY2tEaXN0YW5jZTIpOwogICAgICB9OwoKICAgICAgcmV0dXJuIGRyYWc7CiAgICB9CgogICAgdmFyIEVPTCQxID0ge30sCiAgICAgICAgRU9GJDEgPSB7fSwKICAgICAgICBRVU9URSQxID0gMzQsCiAgICAgICAgTkVXTElORSQxID0gMTAsCiAgICAgICAgUkVUVVJOJDEgPSAxMzsKCiAgICBmdW5jdGlvbiBvYmplY3RDb252ZXJ0ZXIkMShjb2x1bW5zKSB7CiAgICAgIHJldHVybiBuZXcgRnVuY3Rpb24oImQiLCAicmV0dXJuIHsiICsgY29sdW1ucy5tYXAoZnVuY3Rpb24obmFtZSwgaSkgewogICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeShuYW1lKSArICI6IGRbIiArIGkgKyAiXSI7CiAgICAgIH0pLmpvaW4oIiwiKSArICJ9Iik7CiAgICB9CgogICAgZnVuY3Rpb24gY3VzdG9tQ29udmVydGVyJDEoY29sdW1ucywgZikgewogICAgICB2YXIgb2JqZWN0ID0gb2JqZWN0Q29udmVydGVyJDEoY29sdW1ucyk7CiAgICAgIHJldHVybiBmdW5jdGlvbihyb3csIGkpIHsKICAgICAgICByZXR1cm4gZihvYmplY3Qocm93KSwgaSwgY29sdW1ucyk7CiAgICAgIH07CiAgICB9CgogICAgLy8gQ29tcHV0ZSB1bmlxdWUgY29sdW1ucyBpbiBvcmRlciBvZiBkaXNjb3ZlcnkuCiAgICBmdW5jdGlvbiBpbmZlckNvbHVtbnMkMShyb3dzKSB7CiAgICAgIHZhciBjb2x1bW5TZXQgPSBPYmplY3QuY3JlYXRlKG51bGwpLAogICAgICAgICAgY29sdW1ucyA9IFtdOwoKICAgICAgcm93cy5mb3JFYWNoKGZ1bmN0aW9uKHJvdykgewogICAgICAgIGZvciAodmFyIGNvbHVtbiBpbiByb3cpIHsKICAgICAgICAgIGlmICghKGNvbHVtbiBpbiBjb2x1bW5TZXQpKSB7CiAgICAgICAgICAgIGNvbHVtbnMucHVzaChjb2x1bW5TZXRbY29sdW1uXSA9IGNvbHVtbik7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9KTsKCiAgICAgIHJldHVybiBjb2x1bW5zOwogICAgfQoKICAgIGZ1bmN0aW9uIGRzdiQxKGRlbGltaXRlcikgewogICAgICB2YXIgcmVGb3JtYXQgPSBuZXcgUmVnRXhwKCJbXCIiICsgZGVsaW1pdGVyICsgIlxuXHJdIiksCiAgICAgICAgICBERUxJTUlURVIgPSBkZWxpbWl0ZXIuY2hhckNvZGVBdCgwKTsKCiAgICAgIGZ1bmN0aW9uIHBhcnNlKHRleHQsIGYpIHsKICAgICAgICB2YXIgY29udmVydCwgY29sdW1ucywgcm93cyA9IHBhcnNlUm93cyh0ZXh0LCBmdW5jdGlvbihyb3csIGkpIHsKICAgICAgICAgIGlmIChjb252ZXJ0KSByZXR1cm4gY29udmVydChyb3csIGkgLSAxKTsKICAgICAgICAgIGNvbHVtbnMgPSByb3csIGNvbnZlcnQgPSBmID8gY3VzdG9tQ29udmVydGVyJDEocm93LCBmKSA6IG9iamVjdENvbnZlcnRlciQxKHJvdyk7CiAgICAgICAgfSk7CiAgICAgICAgcm93cy5jb2x1bW5zID0gY29sdW1ucyB8fCBbXTsKICAgICAgICByZXR1cm4gcm93czsKICAgICAgfQoKICAgICAgZnVuY3Rpb24gcGFyc2VSb3dzKHRleHQsIGYpIHsKICAgICAgICB2YXIgcm93cyA9IFtdLCAvLyBvdXRwdXQgcm93cwogICAgICAgICAgICBOID0gdGV4dC5sZW5ndGgsCiAgICAgICAgICAgIEkgPSAwLCAvLyBjdXJyZW50IGNoYXJhY3RlciBpbmRleAogICAgICAgICAgICBuID0gMCwgLy8gY3VycmVudCBsaW5lIG51bWJlcgogICAgICAgICAgICB0LCAvLyBjdXJyZW50IHRva2VuCiAgICAgICAgICAgIGVvZiA9IE4gPD0gMCwgLy8gY3VycmVudCB0b2tlbiBmb2xsb3dlZCBieSBFT0Y/CiAgICAgICAgICAgIGVvbCA9IGZhbHNlOyAvLyBjdXJyZW50IHRva2VuIGZvbGxvd2VkIGJ5IEVPTD8KCiAgICAgICAgLy8gU3RyaXAgdGhlIHRyYWlsaW5nIG5ld2xpbmUuCiAgICAgICAgaWYgKHRleHQuY2hhckNvZGVBdChOIC0gMSkgPT09IE5FV0xJTkUkMSkgLS1OOwogICAgICAgIGlmICh0ZXh0LmNoYXJDb2RlQXQoTiAtIDEpID09PSBSRVRVUk4kMSkgLS1OOwoKICAgICAgICBmdW5jdGlvbiB0b2tlbigpIHsKICAgICAgICAgIGlmIChlb2YpIHJldHVybiBFT0YkMTsKICAgICAgICAgIGlmIChlb2wpIHJldHVybiBlb2wgPSBmYWxzZSwgRU9MJDE7CgogICAgICAgICAgLy8gVW5lc2NhcGUgcXVvdGVzLgogICAgICAgICAgdmFyIGksIGogPSBJLCBjOwogICAgICAgICAgaWYgKHRleHQuY2hhckNvZGVBdChqKSA9PT0gUVVPVEUkMSkgewogICAgICAgICAgICB3aGlsZSAoSSsrIDwgTiAmJiB0ZXh0LmNoYXJDb2RlQXQoSSkgIT09IFFVT1RFJDEgfHwgdGV4dC5jaGFyQ29kZUF0KCsrSSkgPT09IFFVT1RFJDEpOwogICAgICAgICAgICBpZiAoKGkgPSBJKSA+PSBOKSBlb2YgPSB0cnVlOwogICAgICAgICAgICBlbHNlIGlmICgoYyA9IHRleHQuY2hhckNvZGVBdChJKyspKSA9PT0gTkVXTElORSQxKSBlb2wgPSB0cnVlOwogICAgICAgICAgICBlbHNlIGlmIChjID09PSBSRVRVUk4kMSkgeyBlb2wgPSB0cnVlOyBpZiAodGV4dC5jaGFyQ29kZUF0KEkpID09PSBORVdMSU5FJDEpICsrSTsgfQogICAgICAgICAgICByZXR1cm4gdGV4dC5zbGljZShqICsgMSwgaSAtIDEpLnJlcGxhY2UoLyIiL2csICJcIiIpOwogICAgICAgICAgfQoKICAgICAgICAgIC8vIEZpbmQgbmV4dCBkZWxpbWl0ZXIgb3IgbmV3bGluZS4KICAgICAgICAgIHdoaWxlIChJIDwgTikgewogICAgICAgICAgICBpZiAoKGMgPSB0ZXh0LmNoYXJDb2RlQXQoaSA9IEkrKykpID09PSBORVdMSU5FJDEpIGVvbCA9IHRydWU7CiAgICAgICAgICAgIGVsc2UgaWYgKGMgPT09IFJFVFVSTiQxKSB7IGVvbCA9IHRydWU7IGlmICh0ZXh0LmNoYXJDb2RlQXQoSSkgPT09IE5FV0xJTkUkMSkgKytJOyB9CiAgICAgICAgICAgIGVsc2UgaWYgKGMgIT09IERFTElNSVRFUikgY29udGludWU7CiAgICAgICAgICAgIHJldHVybiB0ZXh0LnNsaWNlKGosIGkpOwogICAgICAgICAgfQoKICAgICAgICAgIC8vIFJldHVybiBsYXN0IHRva2VuIGJlZm9yZSBFT0YuCiAgICAgICAgICByZXR1cm4gZW9mID0gdHJ1ZSwgdGV4dC5zbGljZShqLCBOKTsKICAgICAgICB9CgogICAgICAgIHdoaWxlICgodCA9IHRva2VuKCkpICE9PSBFT0YkMSkgewogICAgICAgICAgdmFyIHJvdyA9IFtdOwogICAgICAgICAgd2hpbGUgKHQgIT09IEVPTCQxICYmIHQgIT09IEVPRiQxKSByb3cucHVzaCh0KSwgdCA9IHRva2VuKCk7CiAgICAgICAgICBpZiAoZiAmJiAocm93ID0gZihyb3csIG4rKykpID09IG51bGwpIGNvbnRpbnVlOwogICAgICAgICAgcm93cy5wdXNoKHJvdyk7CiAgICAgICAgfQoKICAgICAgICByZXR1cm4gcm93czsKICAgICAgfQoKICAgICAgZnVuY3Rpb24gZm9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CA6ICh0IC09IDIpICogdCAqIHQgKyAyKSAvIDI7CiAgICB9CgogICAgdmFyIGV4cG9uZW50JDIgPSAzOwoKICAgIHZhciBwb2x5SW4kMSA9IChmdW5jdGlvbiBjdXN0b20oZSkgewogICAgICBlID0gK2U7CgogICAgICBmdW5jdGlvbiBwb2x5SW4odCkgewogICAgICAgIHJldHVybiBNYXRoLnBvdyh0LCBlKTsKICAgICAgfQoKICAgICAgcG9seUluLmV4cG9uZW50ID0gY3VzdG9tOwoKICAgICAgcmV0dXJuIHBvbHlJbjsKICAgIH0pKGV4cG9uZW50JDIpOwoKICAgIHZhciBwb2x5T3V0JDEgPSAoZnVuY3Rpb24gY3VzdG9tKGUpIHsKICAgICAgZSA9ICtlOwoKICAgICAgZnVuY3Rpb24gcG9seU91dCh0KSB7CiAgICAgICAgcmV0dXJuIDEgLSBNYXRoLnBvdygxIC0gdCwgZSk7CiAgICAgIH0KCiAgICAgIHBvbHlPdXQuZXhwb25lbnQgPSBjdXN0b207CgogICAgICByZXR1cm4gcG9seU91dDsKICAgIH0pKGV4cG9uZW50JDIpOwoKICAgIHZhciBwb2x5SW5PdXQkMSA9IChmdW5jdGlvbiBjdXN0b20oZSkgewogICAgICBlID0gK2U7CgogICAgICBmdW5jdGlvbiBwb2x5SW5PdXQodCkgewogICAgICAgIHJldHVybiAoKHQgKj0gMikgPD0gMSA/IE1hdGgucG93KHQsIGUpIDogMiAtIE1hdGgucG93KDIgLSB0LCBlKSkgLyAyOwogICAgICB9CgogICAgICBwb2x5SW5PdXQuZXhwb25lbnQgPSBjdXN0b207CgogICAgICByZXR1cm4gcG9seUluT3V0OwogICAgfSkoZXhwb25lbnQkMik7CgogICAgdmFyIHBpJDcgPSBNYXRoLlBJLAogICAgICAgIGhhbGZQaSQ1ID0gcGkkNyAvIDI7CgogICAgZnVuY3Rpb24gc2luSW4kMSh0KSB7CiAgICAgIHJldHVybiAxIC0gTWF0aC5jb3ModCAqIGhhbGZQaSQ1KTsKICAgIH0KC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ICAgICAgICByZXR1cm4gLS10ICogdCAqICgocyArIDEpICogdCArIHMpICsgMTsKICAgICAgfQoKICAgICAgYmFja091dC5vdmVyc2hvb3QgPSBjdXN0b207CgogICAgICByZXR1cm4gYmFja091dDsKICAgIH0pKG92ZXJzaG9vdCQxKTsKCiAgICB2YXIgYmFja0luT3V0JDEgPSAoZnVuY3Rpb24gY3VzdG9tKHMpIHsKICAgICAgcyA9ICtzOwoKICAgICAgZnVuY3Rpb24gYmFja0luT3V0KHQpIHsKICAgICAgICByZXR1cm4gKCh0ICo9IDIpIDwgMSA/IHQgKiB0ICogKChzICsgMSkgKiB0IC0gcykgOiAodCAtPSAyKSAqIHQgKiAoKHMgKyAxKSAqIHQgKyBzKSArIDIpIC8gMjsKICAgICAgfQoKICAgICAgYmFja0luT3V0Lm92ZXJzaG9vdCA9IGN1c3RvbTsKCiAgICAgIHJldHVybiBiYWNrSW5PdXQ7CiAgICB9KShvdmVyc2hvb3QkMSk7CgogICAgdmFyIHRhdSQ3ID0gMiAqIE1hdGguUEksCiAgICAgICAgYW1wbGl0dWRlJDEgPSAxLAogICAgICAgIHBlcmlvZCQxID0gMC4zOwoKICAgIHZhciBlbGFzdGljSW4kMSA9IChmdW5jdGlvbiBjdXN0b20oYSwgcCkgewogICAgICB2YXIgcyA9IE1hdGguYXNpbigxIC8gKGEgPSBNYXRoLm1heCgxLCBhKSkpICogKHAgLz0gdGF1JDcpOwoKICAgICAgZnVuY3Rpb24gZWxhc3RpY0luKHQpIHsKICAgICAgICByZXR1cm4gYSAqIE1hdGgucG93KDIsIDEwICogLS10KSAqIE1hdGguc2luKChzIC0gdCkgLyBwKTsKICAgICAgfQoKICAgICAgZWxhc3RpY0luLmFtcGxpdHVkZSA9IGZ1bmN0aW9uKGEpIHsgcmV0dXJuIGN1c3RvbShhLCBwICogdGF1JDcpOyB9OwogICAgICBlbGFzdGljSW4ucGVyaW9kID0gZnVuY3Rpb24ocCkgeyByZXR1cm4gY3VzdG9tKGEsIHApOy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2UueSA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/ICh5ID0gK18sIGZvcmNlKSA6IHk7CiAgICAgIH07CgogICAgICByZXR1cm4gZm9yY2U7CiAgICB9CgogICAgZnVuY3Rpb24gY29uc3RhbnQkbCh4KSB7CiAgICAgIHJldHVybiBmdW5jdGlvbigpIHsKICAgICAgICByZXR1cm4geDsKICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiBqaWdnbGUkMSgpIHsKICAgICAgcmV0dXJuIChNYXRoLnJhbmRvbSgpIC0gMC41KSAqIDFlLTY7CiAgICB9CgogICAgZnVuY3Rpb24gdHJlZV9hZGQkMShkKSB7CiAgICAgIHZhciB4ID0gK3RoaXMuX3guY2FsbChudWxsLCBkKSwKICAgICAgICAgIHkgPSArdGhpcy5feS5jYWxsKG51bGwsIGQpOwogICAgICByZXR1cm4gYWRkJDIodGhpcy5jb3Zlcih4LCB5KSwgeCwgeSwgZCk7CiAgICB9CgogICAgZnVuY3Rpb24gYWRkJDIodHJlZSwgeCwgeSwgZCkgewogICAgICBpZiAoaXNOYU4oeCkgfHwgaXNOYU4oeSkpIHJldHVybiB0cmVlOyAvLyBpZ25vcmUgaW52YWxpZCBwb2ludHMKCiAgICAgIHZhciBwYXJlbnQsCiAgICAgICAgICBub2RlID0gdHJlZS5fcm9vdCwKICAgICAgICAgIGxlYWYgPSB7ZGF0YTogZH0sCiAgICAgICAgICB4MCA9IHRyZWUuX3gwLAogICAgICAgICAgeTAgPSB0cmVlLl95MCwKICAgICAgICAgIHgxID0gdHJlZS5feDEsCiAgICAgICAgICB5MSA9IHRyZWUuX3kxLAogICAgICAgICAgeG0sCiAgICAgICAgICB5bSwKICAgICAgICAgIHhwLAogICAgICAgICAgeXAsCiAgICAgICAgICByaWdodCwKICAgICAgICAgIGJvdHRvbSwKICAgICAgICAgIGksCiAgICAgICAgICBqOwoKICAgICAgLy8gSWYgdGhlIHRyZWUgaXM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mVudFtpXSA9IG5ldyBBcnJheSg0KSA6IHRyZWUuX3Jvb3QgPSBuZXcgQXJyYXkoNCk7CiAgICAgICAgaWYgKHJpZ2h0ID0geCA+PSAoeG0gPSAoeDAgKyB4MSkgLyAyKSkgeDAgPSB4bTsgZWxzZSB4MSA9IHhtOwogICAgICAgIGlmIChib3R0b20gPSB5ID49ICh5bSA9ICh5MCArIHkxKSAvIDIpKSB5MCA9IHltOyBlbHNlIHkxID0geW07CiAgICAgIH0gd2hpbGUgKChpID0gYm90dG9tIDw8IDEgfCByaWdodCkgPT09IChqID0gKHlwID49IHltKSA8PCAxIHwgKHhwID49IHhtKSkpOwogICAgICByZXR1cm4gcGFyZW50W2pdID0gbm9kZSwgcGFyZW50W2ldID0gbGVhZiwgdHJlZTsKICAgIH0KCiAgICBmdW5jdGlvbiBhZGRBbGwkMShkYXRhKSB7CiAgICAgIHZhciBkLCBpLCBuID0gZGF0YS5sZW5ndGgsCiAgICAgICAgICB4LAogICAgICAgICAgeSwKICAgICAgICAgIHh6ID0gbmV3IEFycmF5KG4pLAogICAgICAgICAgeXogPSBuZXcgQXJyYXkobiksCiAgICAgICAgICB4MCA9IEluZmluaXR5LAogICAgICAgICAgeTAgPSBJbmZpbml0eSwKICAgICAgICAgIHgxID0gLUluZmluaXR5LAogICAgICAgICAgeTEgPSAtSW5maW5pdHk7CgogICAgICAvLyBDb21wdXRlIHRoZSBwb2ludHMgYW5kIHRoZWlyIGV4dGVudC4KICAgICAgZm9yIChpID0gMDsgaSA8IG47ICsraSkgewogICAgICAgIGlmIChpc05hTih4ID0gK3RoaXMuX3guY2FsbChudWxsLCBkID0gZGF0YVtpXSkpIHx8IGlzTmFOKHkgPSArdGhpcy5feS5jYWxsKG51bGwsIGQpKSkgY29udGludWU7CiAgICAgICAgeHpbaV0gPSB4OwogICAgICAgIHl6W2ldID0geTsKICAgICAgICBpZiAoeCA8IHgwKSB4MCA9IHg7CiAgICAgICAgaWYgKHggPiB4MSkgeDEgPSB4Ow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NOYU4oeDApKSB7CiAgICAgICAgeDEgPSAoeDAgPSBNYXRoLmZsb29yKHgpKSArIDE7CiAgICAgICAgeTEgPSAoeTAgPSBNYXRoLmZsb29yKHkpKSArIDE7CiAgICAgIH0KCiAgICAgIC8vIE90aGVyd2lzZSwgZG91YmxlIHJlcGVhdGVkbHkgdG8gY292ZXIuCiAgICAgIGVsc2UgewogICAgICAgIHZhciB6ID0geDEgLSB4MCwKICAgICAgICAgICAgbm9kZSA9IHRoaXMuX3Jvb3QsCiAgICAgICAgICAgIHBhcmVudCwKICAgICAgICAgICAgaTsKCiAgICAgICAgd2hpbGUgKHgwID4geCB8fCB4ID49IHgxIHx8IHkwID4geSB8fCB5ID49IHkxKSB7CiAgICAgICAgICBpID0gKHkgPCB5MCkgPDwgMSB8ICh4IDwgeDApOwogICAgICAgICAgcGFyZW50ID0gbmV3IEFycmF5KDQpLCBwYXJlbnRbaV0gPSBub2RlLCBub2RlID0gcGFyZW50LCB6ICo9IDI7CiAgICAgICAgICBzd2l0Y2ggKGkpIHsKICAgICAgICAgICAgY2FzZSAwOiB4MSA9IHgwICsgeiwgeTEgPSB5MCArIHo7IGJyZWFrOwogICAgICAgICAgICBjYXNlIDE6IHgwID0geDEgLSB6LCB5MSA9IHkwICsgejsgYnJlYWs7CiAgICAgICAgICAgIGNhc2UgMjogeDEgPSB4MCArIHosIHkwID0geTEgLSB6OyBicmVhazsKICAgICAgICAgICAgY2FzZSAzOiB4MCA9IHgxIC0geiwgeTAgPSB5MSAtIHo7IGJyZWFrOwogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgaWYgKHRoaXMuX3Jvb3QgJiYgdGhpcy5fcm9vdC5sZW5ndGgpIHRoaXMuX3Jvb3QgPSBub2RlOwogICAgICB9CgogICAgICB0aGlzLl94MCA9IHgwOwogICAgICB0aGlzLl95MCA9IHkwOwogICAgICB0aGlzLl94MSA9IHgxOwogICAgICB0aGlzLl95MSA9IHkxOwogICAgICByZXR1cm4gdGhpczsKICAgIH0KCiAgICBmdW5jdGlvbiB0cmVlX2RhdGEkMSgpIHsKICAgICAgdmFyIGRhdGEgPSBbXTsKICAgICAgdGhpcy52aXNpdChmdW5jdGlvbihub2RlKSB7CiAgICAgICAgaWYgKCFub2RlLmxlbmd0aCkgZG8gZGF0YS5wdXNoKG5vZGUuZGF0YSk7IHdoaWxlIChub2RlID0gbm9kZS5uZXh0KQogICAgICB9KTsKICAgICAgcmV0dXJuIGRhdGE7CiAgICB9CgogICAgZnVuY3Rpb24gdHJlZV9leHRlbnQkMShfKSB7CiAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoCiAgICAgICAgICA/IHRoaXMuY292ZXIoK19bMF1bMF0sICtfWzBdWzFdKS5jb3ZlcigrX1sxXVswXSwgK19bMV1bMV0pCiAgICAgICAgICA6IGlzTmFOKHRoaXMuX3gwKSA/IHVuZGVmaW5lZCA6IFtbdGhpcy5feDAsIHRoaXMuX3kwXSwgW3RoaXMuX3gxLCB0aGlzLl95MV1dOwogICAgfQoKICAgIGZ1bmN0aW9uIFF1YWQkMShub2RlLCB4MCwgeTAsIHgxLCB5MSkgewogICAgICB0aGlzLm5vZGUgPSBub2RlOwogICAgICB0aGlzLngwID0geDA7CiAgICAgIHRoaXMueTAgPSB5MDsKICAgICAgdGhpcy54MSA9IHgxOwogICAgICB0aGlzLnkxID0geTE7CiAgICB9CgogICAgZnVuY3Rpb24gdHJlZV9maW5kJDEoeCwgeSwgcmFkaXVzKSB7CiAgICAgIHZhciBkYXRhLAogICAgICAgICAgeDAgPSB0aGlzLl94MCwKICAgICAgICAgIHkwID0gdGhpcy5feTAsCiAgICAgICAgICB4MSwKICAgICAgICAgIHkxLAogICAgICAgICAgeDIsCiAgICAgICAgICB5MiwKICAgICAgICAgIHgzID0gdGhpcy5feDEsCiAgICAgICAgICB5MyA9IHRoaXMuX3kxLAogICAgICAgICAgcXVhZHMgPSBbXSwKICAgICAgICAgIG5vZGUgPSB0aGlzLl9yb290LAogICAgICAgICAgcSwKICAgICAgICAgIGk7CgogICAgICBpZiAobm9kZSkgcXVhZHMucHVzaChuZXcgUXVhZCQxKG5vZGUsIHgwLCB5MCwgeDMsIHkzKSk7CiAgICAgIGlmIChyYWRpdXMgPT0gbnVsbCkgcmFkaXVzID0gSW5maW5pdHk7CiAgICAgIGVsc2UgewogICAgICAgIHgwID0geCAtIHJhZGl1cywgeTAgPSB5IC0gcmFkaXVzOwogICAgICAgIHgzID0geCArIHJhZGl1cywgeTMgPSB5ICsgcmFkaXVzOwogICAgICAgIHJhZGl1cyAqPSByYWRpdXM7CiAgICAgIH0KCiAgICAgIHdoaWxlIChxID0gcXVhZHMucG9wKCkpIHsKCiAgICAgICAgLy8gU3RvcCBzZWFyY2hpbmcgaWYgdGhpcyBxdWFkcmFudCBjYW7igJl0IGNvbnRhaW4gYSBjbG9zZXIgbm9kZS4KICAgICAgICBpZiAoIShub2RlID0gcS5ub2RlKQogICAgICAgICAgICB8fCAoeDEgPSBxLngwKSA+IHgzCiAgICAgICAgICAgIHx8ICh5MSA9IHEueTApID4geTMKICAgICAgICAgICAgfHwgKHgyID0gcS54MSkgPCB4MAogICAgICAgICAgICB8fCAoeTIgPSBxLnkxKSA8IHkwKSBjb250aW51ZTsKCiAgICAgICAgLy8gQmlzZWN0IHRoZSBjdXJyZW50IHF1YWRyYW50LgogICAgICAgIGlmIChub2RlLmxlbmd0aCkgewogICAgICAgICAgdmFyIHhtID0gKHgxICsgeDIpIC8gMiwKICAgICAgICAgICAgICB5bSA9ICh5MSArIHkyKSAvIDI7CgogICAgICAgICAgcXVhZHMucHVzaCgKICAgICAgICAgICAgbmV3IFF1YWQkMShub2RlWzNdLCB4bSwgeW0sIHgyLCB5MiksCiAgICAgICAgICAgIG5ldyBRdWFkJDEobm9kZVsyXSwgeDEsIHltLCB4bSwgeTIpLAogICAgICAgICAgICBuZXcgUXVhZCQxKG5vZGVbMV0sIHhtLCB5MSwgeDIsIHltKSwKICAgICAgICAgICAgbmV3IFF1YWQkMShub2RlWzBdLCB4MSwgeTEsIHhtLCB5bSkKICAgICAgICAgICk7CgogICAgICAgICAgLy8gVmlzaXQgdGhlIGNsb3Nlc3QgcXVhZHJhbnQgZmlyc3QuCiAgICAgICAgICBpZiAoaSA9ICh5ID49IHltKSA8PCAxIHwgKHggPj0geG0pKSB7CiAgICAgICAgICAgIHEgPSBxdWFkc1txdWFkcy5sZW5ndGggLSAxXTsKICAgICAgICAgICAgcXVhZHNbcXVhZHMubGVuZ3RoIC0gMV0gPSBxdWFkc1txdWFkcy5sZW5ndGggLSAxIC0gaV07CiAgICAgICAgICAgIHF1YWRzW3F1YWRzLmxlbmd0aCAtIDEgLSBpXSA9IHE7CiAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICAvLyBWaXNpdCB0aGlzIHBvaW50LiAoVmlzaXRpbmcgY29pbmNpZGVudCBwb2ludHMgaXNu4oCZdCBuZWNlc3NhcnkhKQogICAgICAgIGVsc2UgewogICAgICAgICAgdmFyIGR4ID0geCAtICt0aGlzLl94LmNhbGwobnVsbCwgbm9kZS5kYXRhKSwKICAgICAgICAgICAgICBkeSA9IHkgLSArdGhpcy5feS5jYWxsKG51bGwsIG5vZGUuZGF0YSksCiAgICAgICAgICAgICAgZDIgPSBkeCAqIGR4ICsgZHkgKiBkeTsKICAgICAgICAgIGlmIChkMiA8IHJhZGl1cykgewogICAgICAgICAgICB2YXIgZCA9IE1hdGguc3FydChyYWRpdXMgPSBkMik7CiAgICAgICAgICAgIHgwID0geCAtIGQsIHkwID0geSAtIGQ7CiAgICAgICAgICAgIHgzID0geCArIGQsIHkzID0geSArIGQ7CiAgICAgICAgICAgIGRhdGEgPSBub2RlLmRhdGE7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CgogICAgICByZXR1cm4gZGF0YTsKICAgIH0KCiAgICBmdW5jdGlvbiB0cmVlX3JlbW92ZSQxKGQpIHsKICAgICAgaWYgKGlzTmFOKHggPSArdGhpcy5feC5jYWxsKG51bGwsIGQpKSB8fCBpc05hTih5ID0gK3RoaXMuX3kuY2FsbChudWxsLCBkKSkpIHJldHVybiB0aGlzOyAvLyBpZ25vcmUgaW52YWxpZCBwb2ludHMKCiAgICAgIHZhciBwYXJlbnQsCiAgICAgICAgICBub2RlID0gdGhpcy5fcm9vdCwKICAgICAgICAgIHJldGFpbmVyLAogICAgICAgICAgcHJldmlvdXMsCiAgICAgICAgICBuZXh0LAogICAgICAgICAgeDAgPSB0aGlzLl94MCwKICAgICAgICAgIHkwID0gdGhpcy5feTAsCiAgICAgICAgICB4MSA9IHRoaXMuX3gxLAogICAgICAgICAgeTEgPSB0aGlzLl95MSwKICAgICAgICAgIHgsCiAgICAgICAgICB5LAogICAgICAgICAgeG0sCiAgICAgICAgICB5bSwKICAgICAgICAgIHJpZ2h0LAogICAgICAgICAgYm90dG9tLAogICAgICAgICAgaSwKICAgICAgICAgIGo7CgogICAgICAvLyBJZiB0aGUgdHJlZSBpcyBlbXB0eSwgaW5pdGlhbGl6ZSB0aGUgcm9vdCBhcyBhIGxlYWYuCiAgICAgIGlmICghbm9kZSkgcmV0dXJuIHRoaXM7CgogICAgICAvLyBGaW5kIHRoZSBsZWFmIG5vZGUgZm9yIHRoZSBwb2ludC4KICAgICAgLy8gV2hpbGUgZGVzY2VuZGluZywgYWxzbyByZXRhaW4gdGhlIGRlZXBlc3QgcGFyZW50IHdpdGggYSBub24tcmVtb3ZlZCBzaWJsaW5nLgogICAgICBpZiAobm9kZS5sZW5ndGgpIHdoaWxlICh0cnVlKSB7CiAgICAgICAgaWYgKHJpZ2h0ID0geCA+PSAoeG0gPSAoeDAgKyB4MSkgLyAyKSkgeDAgPSB4bTsgZWxzZSB4MSA9IHhtOwogICAgICAgIGlmIChib3R0b20gPSB5ID49ICh5bSA9ICh5MCArIHkxKSAvIDIpKSB5MCA9IHltOyBlbHNlIHkxID0geW07CiAgICAgICAgaWYgKCEocGFyZW50ID0gbm9kZSwgbm9kZSA9IG5vZGVbaSA9IGJvdHRvbSA8PC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B0cmVlUHJvdG8kMS52aXNpdCA9IHRyZWVfdmlzaXQkMTsKICAgIHRyZWVQcm90byQxLnZpc2l0QWZ0ZXIgPSB0cmVlX3Zpc2l0QWZ0ZXIkMTsKICAgIHRyZWVQcm90byQxLnggPSB0cmVlX3gkMTsKICAgIHRyZWVQcm90byQxLnkgPSB0cmVlX3kkMTsKCiAgICBmdW5jdGlvbiB4JDUoZCkgewogICAgICByZXR1cm4gZC54ICsgZC52eDsKICAgIH0KCiAgICBmdW5jdGlvbiB5JDUoZCkgewogICAgICByZXR1cm4gZC55ICsgZC52eTsKICAgIH0KCiAgICBmdW5jdGlvbiBjb2xsaWRlJDEocmFkaXVzKSB7CiAgICAgIHZhciBub2RlcywKICAgICAgICAgIHJhZGlpLAogICAgICAgICAgc3RyZW5ndGggPSAxLAogICAgICAgICAgaXRlcmF0aW9ucyA9IDE7CgogICAgICBpZiAodHlwZW9mIHJhZGl1cyAhPT0gImZ1bmN0aW9uIikgcmFkaXVzID0gY29uc3RhbnQkbChyYWRpdXMgPT0gbnVsbCA/IDEgOiArcmFkaXVzKTsKCiAgICAgIGZ1bmN0aW9uIGZvcmNlKCkgewogICAgICAgIHZhciBpLCBuID0gbm9kZXMubGVuZ3RoLAogICAgICAgICAgICB0cmVlLAogICAgICAgICAgICBub2RlLAogICAgICAgICAgICB4aSwKICAgICAgICAgICAgeWksCiAgICAgICAgICAgIHJpLAogICAgICAgICAgICByaTI7CgogICAgICAgIGZvciAodmFyIGsgPSAwOyBrIDwgaXRlcmF0aW9uczsgKytrKSB7CiAgICAgICAgICB0cmVlID0gcXVhZHRyZWUkMShub2RlcywgeCQ1LCB5JDUpLnZpc2l0QWZ0ZXIocHJlcGFyZSk7CiAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbjsgKytpKSB7CiAgICAgICAgICAgIG5vZGUgPSBub2Rlc1tpXTsKICAgICAgICAgICAgcmkgPSByYWRpaVtub2RlLmluZGV4XSwgcmkyID0gcmkgKiByaTsKICAgICAgICAgICAgeGkgPSBub2RlLnggKyBub2RlLnZ4OwogICAgICAgICAgICB5aSA9IG5vZGUueSArIG5vZGUudnk7CiAgICAgICAgICAgIHRyZWUudmlzaXQoYXBwbHkpOwogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgZnVuY3Rpb24gYXBwbHkocXVhZCwgeDAsIHkwLCB4MSwgeTEpIHsKICAgICAgICAgIHZhciBkYXRhID0gcXVhZC5kYXRhLCByaiA9IHF1YWQuciwgciA9IHJpICsgcmo7CiAgICAgICAgICBpZiAoZGF0YSkgewogICAgICAgICAgICBpZiAoZGF0YS5pbmRleCA+IG5vZGUuaW5kZXgpIHsKICAgICAgICAgICAgICB2YXIgeCA9IHhpIC0gZGF0YS54IC0gZGF0YS52eCwKICAgICAgICAgICAgICAgICAgeSA9IHlpIC0gZGF0YS55IC0gZGF0YS52eSwKICAgICAgICAgICAgICAgICAgbCA9IHggKiB4ICsgeSAqIHk7CiAgICAgICAgICAgICAgaWYgKGwgPCByICogcikgewogICAgICAgICAgICAgICAgaWYgKHggPT09IDApIHggPSBqaWdnbGUkMSgpLCBsICs9IHggKiB4OwogICAgICAgICAgICAgICAgaWYgKHkgPT09IDApIHkgPSBqaWdnbGUkMSgpLCBsICs9IHkgKiB5OwogICAgICAgICAgICAgICAgbCA9IChyIC0gKGwgPSBNYXRoLnNxcnQobCkpKSAvIGwgKiBzdHJlbmd0aDsKICAgICAgICAgICAgICAgIG5vZGUudnggKz0gKHggKj0gbCkgKiAociA9IChyaiAqPSByaikgLyAocmkyICsgcmopKTsKICAgICAgICAgICAgICAgIG5vZGUudnkgKz0gKHkgKj0gbCkgKiByOwogICAgICAgICAgICAgICAgZGF0YS52eCAtPSB4ICogKHIgPSAxIC0gcik7CiAgICAgICAgICAgICAgICBkYXRhLnZ5IC09IHkgKiByOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm47CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4geDAgPi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gdGhpc1twcm9wZXJ0eV07CiAgICAgIH0sCiAgICAgIGtleXM6IGZ1bmN0aW9uKCkgewogICAgICAgIHZhciBrZXlzID0gW107CiAgICAgICAgZm9yICh2YXIgcHJvcGVydHkgaW4gdGhpcykgaWYgKHByb3BlcnR5WzBdID09PSBwcmVmaXgkMikga2V5cy5wdXNoKHByb3BlcnR5LnNsaWNlKDEpKTsKICAgICAgICByZXR1cm4ga2V5czsKICAgICAgfSwKICAgICAgdmFsdWVzOiBmdW5jdGlvbigpIHsKICAgICAgICB2YXIgdmFsdWVzID0gW107CiAgICAgICAgZm9yICh2YXIgcHJvcGVydHkgaW4gdGhpcykgaWYgKHByb3BlcnR5WzBdID09PSBwcmVmaXgkMikgdmFsdWVzLnB1c2godGhpc1twcm9wZXJ0eV0pOwogICAgICAgIHJldHVybiB2YWx1ZXM7CiAgICAgIH0sCiAgICAgIGVudHJpZXM6IGZ1bmN0aW9uKCkgewogICAgICAgIHZhciBlbnRyaWVzID0gW107CiAgICAgICAgZm9yICh2YXIgcHJvcGVydHkgaW4gdGhpcykgaWYgKHByb3BlcnR5WzBdID09PSBwcmVmaXgkMikgZW50cmllcy5wdXNoKHtrZXk6IHByb3BlcnR5LnNsaWNlKDEpLCB2YWx1ZTogdGhpc1twcm9wZXJ0eV19KTsKICAgICAgICByZXR1cm4gZW50cmllczsKICAgICAgfSwKICAgICAgc2l6ZTogZnVuY3Rpb24oKSB7CiAgICAgICAgdmFyIHNpemUgPSAwOwogICAgICAgIGZvciAodmFyIHByb3BlcnR5IGluIHRoaXMpIGlmIChwcm9wZXJ0eVswXSA9PT0gcHJlZml4JDIpICsrc2l6ZTsKICAgICAgICByZXR1cm4gc2l6ZTsKICAgICAgfSwKICAgICAgZW1wdHk6IGZ1bmN0aW9uKCkgewogICAgICAgIGZvciAodmFyIHByb3BlcnR5IGluIHRoaXMpIGlmIChwcm9wZXJ0eVswXSA9PT0gcHJlZml4JDIpIHJldHVybiBmYWxzZTsKICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgfSwKICAgICAgZWFjaDogZnVuY3Rpb24oZikgewogICAgICAgIGZvciAodmFyIHByb3BlcnR5IGluIHRoaXMpIGlmIChwcm9wZXJ0eVswXSA9PT0gcHJlZml4JDIpIGYodGhpc1twcm9wZXJ0eV0sIHByb3BlcnR5LnNsaWNlKDEpLCB0aGlzKTsKICAgICAgfQogICAgfTsKCiAgICBmdW5jdGlvbiBtYXAkNihvYmplY3QsIGYpIHsKICAgICAgdmFyIG1hcCA9IG5ldyBNYXAkMzsKCiAgICAgIC8vIENvcHkgY29uc3RydWN0b3IuCiAgICAgIGlmIChvYmplY3QgaW5zdGFuY2VvZiBNYXAkMykgb2JqZWN0LmVhY2goZnVuY3Rpb24odmFsdWUsIGtleSkgeyBtYXAuc2V0KGtleSwgdmFsdWUpOyB9KTsKCiAgICAgIC8vIEluZGV4IGFycmF5IGJ5IG51bWVyaWMgaW5kZXggb3Igc3BlY2lmaWVkIGtleSBmdW5jdGlvbi4KICAgICAgZWxzZSBpZiAoQXJyYXkuaXNBcnJheShvYmplY3QpKSB7CiAgICAgICAgdmFyIGkgPSAtMSwKICAgICAgICAgICAgbiA9IG9iamVjdC5sZW5ndGgsCiAgICAgICAgICAgIG87CgogICAgICAgIGlmIChmID09IG51bGwpIHdoaWxlICgrK2kgPCBuKSBtYXAuc2V0KGksIG9iamVjdFtpXSk7CiAgICAgICAgZWxzZSB3aGlsZSAoKytpIDwgbikgbWFwLnNldChmKG8gPSBvYmplY3RbaV0sIGksIG9iamVjdCksIG8pOwogICAgICB9CgogICAgICAvLyBDb252ZXJ0IG9iamVjdCB0byBtYXAuCiAgICAgIGVsc2UgaWYgKG9iamVjdCkgZm9yICh2YXIga2V5IGluIG9iamVjdCkgbWFwLnNldChrZXksIG9iamVjdFtrZXldKTsKCiAgICAgIHJldHVybiBtYXA7CiAgICB9CgogICAgZnVuY3Rpb24gU2V0JDMoKSB7fQoKICAgIHZhciBwcm90byQzID0gbWFwJDYucHJvdG90eXBlOwoKICAgIFNldCQzLnByb3RvdHlwZSA9IHNldCQ5LnByb3RvdHlwZSA9IHsKICAgICAgY29uc3RydWN0b3I6IFNldCQzLAogICAgICBoYXM6IHByb3RvJDMuaGFzLAogICAgICBhZGQ6IGZ1bmN0aW9uKHZhbHVlKSB7CiAgICAgICAgdmFsdWUgKz0gIiI7CiAgICAgICAgdGhpc1twcmVmaXgkMiArIHZhbHVlXSA9IHZhbHVlOwogICAgICAgIHJldHVybiB0aGlzOwogICAgICB9LAogICAgICByZW1vdmU6IHByb3RvJDMucmVtb3ZlLAogICAgICBjbGVhcjogcHJvdG8kMy5jbGVhciwKICAgICAgdmFsdWVzOiBwcm90byQzLmtleXMsCiAgICAgIHNpemU6IHByb3RvJDMuc2l6ZSwKICAgICAgZW1wdHk6IHByb3RvJDMuZW1wdHksCiAgICAgIGVhY2g6IHByb3RvJDMuZWFjaAogICAgfTsKCiAgICBmdW5jdGlvbiBzZXQkOShvYmplY3QsIGYpIHsKICAgICAgdmFyIHNldCA9IG5ldyBTZXQkMzsKCiAgICAgIC8vIENvcHkgY29uc3RydWN0b3IuCiAgICAgIGlmIChvYmplY3QgaW5zdGFuY2VvZiBTZXQkMykgb2JqZWN0LmVhY2goZnVuY3Rpb24odmFsdWUpIHsgc2V0LmFkZCh2YWx1ZSk7IH0pOwoKICAgICAgLy8gT3RoZXJ3aXNlLCBhc3N1bWUgaXTigJlzIGFuIGFycmF5LgogICAgICBlbHNlIGlmIChvYmplY3QpIHsKICAgICAgICB2YXIgaSA9IC0xLCBuID0gb2JqZWN0Lmxlbmd0aDsKICAgICAgICBpZiAoZiA9PSBudWxsKSB3aGlsZSAoKytpIDwgbikgc2V0LmFkZChvYmplY3RbaV0pOwogICAgICAgIGVsc2Ugd2hpbGUgKCsraSA8IG4pIHNldC5hZGQoZihvYmplY3RbaV0sIGksIG9iamVjdCkpOwogICAgICB9CgogICAgICByZXR1cm4gc2V0OwogICAgfQoKICAgIGZ1bmN0aW9uIGluZGV4JDQoZCkgewogICAgICByZXR1cm4gZC5pbmRleDsKICAgIH0KCiAgICBmdW5jdGlvbiBmaW5kJDEobm9kZUJ5SWQsIG5vZGVJZCkgewogICAgICB2YXIgbm9kZSA9IG5vZGVCeUlkLmdldChub2RlSWQpOwogICAgICBpZiAoIW5vZGUpIHRocm93IG5ldyBFcnJvcigibWlzc2luZzogIiArIG5vZGVJZCk7CiAgICAgIHJldHVybiBub2RlOwogICAgfQoKICAgIGZ1bmN0aW9uIGxpbmskMyhsaW5rcykgewogICAgICB2YXIgaWQgPSBpbmRleCQ0LAogICAgICAgICAgc3RyZW5ndGggPSBkZWZhdWx0U3RyZW5ndGgsCiAgICAgICAgICBzdHJlbmd0aHMsCiAgICAgICAgICBkaXN0YW5jZSA9IGNvbnN0YW50JGwoMzApLAogICAgICAgICAgZGlzdGFuY2VzLAogICAgICAgICAgbm9kZXMsCiAgICAgICAgICBjb3VudCwKICAgICAgICAgIGJpYXMsCiAgICAgICAgICBpdGVyYXRpb25zID0gMTsKCiAgICAgIGlmIChsaW5rcyA9PSBudWxsKSBsaW5rcyA9IFtdOwoKICAgICAgZnVuY3Rpb24gZGVmYXVsdFN0cmVuZ3RoKGxpbmspIHsKICAgICAgICByZXR1cm4gMSAvIE1hdGgubWluKGNvdW50W2xpbmsuc291cmNlLmluZGV4XSwgY291bnRbbGluay50YXJnZXQuaW5kZXhdKTsKICAgICAgfQoKICAgICAgZnVuY3Rpb24gZm9yY2UoYWxwaGEpIHsKICAgICAgICBmb3IgKHZhciBrID0gMCwgbiA9IGxpbmtzLmxlbmd0aDsgayA8IGl0ZXJhdGlvbnM7ICsraykgewogICAgICAgICAgZm9yICh2YXIgaSA9IDAsIGxpbmssIHNvdXJjZSwgdGFyZ2V0LCB4LCB5LCBsLCBiOyBpIDwgbjsgKytpKSB7CiAgICAgICAgICAgIGxpbmsgPSBsaW5rc1tpXSwgc291cmNlID0gbGluay5zb3VyY2UsIHRhcmdldCA9IGxpbmsudGFyZ2V0OwogICAgICAgICAgICB4ID0gdGFyZ2V0LnggKyB0YXJnZXQudnggLSBzb3VyY2UueCAtIHNvdXJjZS52eCB8fCBqaWdnbGUkMSgpOwogICAgICAgICAgICB5ID0gdGFyZ2V0LnkgKyB0YXJnZXQudnkgLSBzb3VyY2UueSAtIHNvdXJjZS52eSB8fCBqaWdnbGUkMSgpOwogICAgICAgICAgICBsID0gTWF0aC5zcXJ0KHggKiB4ICsgeSAqIHkpOwogICAgICAgICAgICBsID0gKGwgLSBkaXN0YW5jZXNbaV0pIC8gbCAqIGFscGhhICogc3RyZW5ndGhzW2ldOwogICAgICAgICAgICB4ICo9IGwsIHkgKj0gbDsKICAgICAgICAgICAgdGFyZ2V0LnZ4IC09IHggKiAoYiA9IGJpYXNbaV0pOwogICAgICAgICAgICB0YXJnZXQudnkgLT0geSAqIGI7CiAgICAgICAgICAgIHNvdXJjZS52eCArPSB4ICogKGIgPSAxIC0gYik7CiAgICAgICAgICAgIHNvdXJjZS52eSArPSB5ICogYjsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIGluaXRpYWxpemUoKSB7CiAgICAgICAgaWYgKCFub2RlcykgcmV0dXJuOwoKICAgICAgICB2YXIgaSwKICAgICAgICAgICAgbiA9IG5vZGVzLmxlbmd0aCwKICAgICAgICAgICAgbSA9IGxpbmtzLmxlbmd0aCwKICAgICAgICAgICAgbm9kZUJ5SWQgPSBtYXAkNihub2RlcywgaWQpLAogICAgICAgICAgICBsaW5rOwoKICAgICAgICBmb3IgKGkgPSAwLCBjb3VudCA9IG5ldyBBcnJheShuKTsgaSA8IG07ICsraSkgewogICAgICAgICAgbGluayA9IGxpbmtzW2ldLCBsaW5rLmluZGV4ID0gaTsKICAgICAgICAgIGlmICh0eXBlb2YgbGluay5zb3VyY2UgIT09ICJvYmplY3QiKSBsaW5rLnNvdXJjZSA9IGZpbmQkMShub2RlQnlJZCwgbGluay5zb3VyY2UpOwogICAgICAgICAgaWYgKHR5cGVvZiBsaW5rLnRhcmdldCAhPT0gIm9iamVjdCIpIGxpbmsudGFyZ2V0ID0gZmluZCQxKG5vZGVCeUlkLCBsaW5rLnRhcmdldCk7CiAgICAgICAgICBjb3VudFtsaW5rLnNvdXJjZS5pbmRleF0gPSAoY291bnRbbGluay5zb3VyY2UuaW5kZXhdIHx8IDApICsgMTsKICAgICAgICAgIGNvdW50W2xpbmsudGFyZ2V0LmluZGV4XSA9IChjb3VudFtsaW5rLnRhcmdldC5pbmRleF0gfHwgMCkgKyAxOwogICAgICAgIH0KCiAgICAgICAgZm9yIChpID0gMCwgYmlhcyA9IG5ldyBBcnJheShtKTsgaSA8IG07ICsraSkgewogICAgICAgICAgbGluayA9IGxpbmtzW2ldLCBiaWFzW2ldID0gY291bnRbbGluay5zb3VyY2UuaW5kZXhdIC8gKGNvdW50W2xpbmsuc291cmNlLmluZGV4XSArIGNvdW50W2xpbmsudGFyZ2V0LmluZGV4XSk7CiAgICAgICAgfQoKICAgICAgICBzdHJlbmd0aHMgPSBuZXcgQXJyYXkobSksIGluaXRpYWxpemVTdHJlbmd0aCgpOwogICAgICAgIGRpc3RhbmNlcyA9IG5ldyBBcnJheShtKSwgaW5pdGlhbGl6ZURpc3RhbmNlKCk7CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIGluaXRpYWxpemVTdHJlbmd0aCgpIHsKICAgICAgICBpZiAoIW5vZGVzKSByZXR1cm47CgogICAgICAgIGZvciAodmFyIGkgPSAwLCBuID0gbGlua3MubGVuZ3RoOyBpIDwgbjsgKytpKSB7CiAgICAgICAgICBzdHJlbmd0aHNbaV0gPSArc3RyZW5ndGgobGlua3NbaV0sIGksIGxpbmtzKTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIGluaXRpYWxpemVEaXN0YW5jZSgpIHsKICAgICAgICBpZiAoIW5vZGVzKSByZXR1cm47CgogICAgICAgIGZvciAodmFyIGkgPSAwLCBuID0gbGlua3MubGVuZ3RoOyBpIDwgbjsgKytpKSB7CiAgICAgICAgICBkaXN0YW5jZXNbaV0gPSArZGlzdGFuY2UobGlua3NbaV0sIGksIGxpbmtzKTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIGZvcmNlLmluaXRpYWxpemUgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgbm9kZXMgPSBfOwogICAgICAgIGluaXRpYWxpemUoKTsKICAgICAgfTsKCiAgICAgIGZvcmNlLmxpbmtzID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKGxpbmtzID0gXywgaW5pdGlhbGl6ZSgpLCBmb3JjZSkgOiBsaW5rczsKICAgICAgfTsKCiAgICAgIGZvcmNlLmlkID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKGlkID0gXywgZm9yY2UpIDogaWQ7CiAgICAgIH07CgogICAgICBmb3JjZS5pdGVyYXRpb25zID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKGl0ZXJhdGlvbnMgPSArXywgZm9yY2UpIDogaXRlcmF0aW9uczsKICAgICAgfTsKCiAgICAgIGZvcmNlLnN0cmVuZ3RoID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHN0cmVuZ3RoID0gdHlwZW9mIF8gPT09ICJmdW5jdGlvbiIgPyBfIDogY29uc3RhbnQkbCgrXyksIGluaXRpYWxpemVTdHJlbmd0aCgpLCBmb3JjZSkgOiBzdHJlbmd0aDsKICAgICAgfTsKCiAgICAgIGZvcmNlLmRpc3RhbmNlID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKGRpc3RhbmNlID0gdHlwZW9mIF8gPT09ICJmdW5jdGlvbiIgPyBfIDogY29uc3RhbnQkbCgrXyksIGluaXRpYWxpemVEaXN0YW5jZSgpLCBmb3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ID0gc2V0JGEoX1t0XSwgdHlwZW5hbWUubmFtZSwgY2FsbGJhY2spOwogICAgICAgICAgZWxzZSBpZiAoY2FsbGJhY2sgPT0gbnVsbCkgZm9yICh0IGluIF8pIF9bdF0gPSBzZXQkYShfW3RdLCB0eXBlbmFtZS5uYW1lLCBudWxsKTsKICAgICAgICB9CgogICAgICAgIHJldHVybiB0aGlzOwogICAgICB9LAogICAgICBjb3B5OiBmdW5jdGlvbigpIHsKICAgICAgICB2YXIgY29weSA9IHt9LCBfID0gdGhpcy5fOwogICAgICAgIGZvciAodmFyIHQgaW4gXykgY29weVt0XSA9IF9bdF0uc2xpY2UoKTsKICAgICAgICByZXR1cm4gbmV3IERpc3BhdGNoJDQoY29weSk7CiAgICAgIH0sCiAgICAgIGNhbGw6IGZ1bmN0aW9uKHR5cGUsIHRoYXQpIHsKICAgICAgICBpZiAoKG4gPSBhcmd1bWVudHMubGVuZ3RoIC0gMikgPiAwKSBmb3IgKHZhciBhcmdzID0gbmV3IEFycmF5KG4pLCBpID0gMCwgbiwgdDsgaSA8IG47ICsraSkgYXJnc1tpXSA9IGFyZ3VtZW50c1tpICsgMl07CiAgICAgICAgaWYgKCF0aGlzLl8uaGFzT3duUHJvcGVydHkodHlwZSkpIHRocm93IG5ldyBFcnJvcigidW5rbm93biB0eXBlOiAiICsgdHlwZSk7CiAgICAgICAgZm9yICh0ID0gdGhpcy5fW3R5cGVdLCBpID0gMCwgbiA9IHQubGVuZ3RoOyBpIDwgbjsgKytpKSB0W2ldLnZhbHVlLmFwcGx5KHRoYXQsIGFyZ3MpOwogICAgICB9LAogICAgICBhcHBseTogZnVuY3Rpb24odHlwZSwgdGhhdCwgYXJncykgewogICAgICAgIGlmICghdGhpcy5fLmhhc093blByb3BlcnR5KHR5cGUpKSB0aHJvdyBuZXcgRXJyb3IoInVua25vd24gdHlwZTogIiArIHR5cGUpOwogICAgICAgIGZvciAodmFyIHQgPSB0aGlzLl9bdHlwZV0sIGkgPSAwLCBuID0gdC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IE1hdGguUEkgKiAoMyAtIE1hdGguc3FydCg1KSk7CgogICAgZnVuY3Rpb24gc2ltdWxhdGlvbiQxKG5vZGVzKSB7CiAgICAgIHZhciBzaW11bGF0aW9uLAogICAgICAgICAgYWxwaGEgPSAxLAogICAgICAgICAgYWxwaGFNaW4gPSAwLjAwMSwKICAgICAgICAgIGFscGhhRGVjYXkgPSAxIC0gTWF0aC5wb3coYWxwaGFNaW4sIDEgLyAzMDApLAogICAgICAgICAgYWxwaGFUYXJnZXQgPSAwLAogICAgICAgICAgdmVsb2NpdHlEZWNheSA9IDAuNiwKICAgICAgICAgIGZvcmNlcyA9IG1hcCQ2KCksCiAgICAgICAgICBzdGVwcGVyID0gdGltZXIkMihzdGVwKSwKICAgICAgICAgIGV2ZW50ID0gZGlzcGF0Y2gkNCgidGljayIsICJlbmQiKTsKCiAgICAgIGlmIChub2RlcyA9PSBudWxsKSBub2RlcyA9IFtdOwoKICAgICAgZnVuY3Rpb24gc3RlcCgpIHsKICAgICAgICB0aWNrKCk7CiAgICAgICAgZXZlbnQuY2FsbCgidGljayIsIHNpbXVsYXRpb24pOwogICAgICAgIGlmIChhbHBoYSA8IGFscGhhTWluKSB7CiAgICAgICAgICBzdGVwcGVyLnN0b3AoKTsKICAgICAgICAgIGV2ZW50LmNhbGwoImVuZCIsIHNpbXVsYXRpb24pOwogICAgICAgIH0KICAgICAgfQoKICAgICAgZnVuY3Rpb24gdGljaygpIHsKICAgICAgICB2YXIgaSwgbiA9IG5vZGVzLmxlbmd0aCwgbm9kZTsKCiAgICAgICAgYWxwaGEgKz0gKGFscGhhVGFyZ2V0IC0gYWxwaGEpICogYWxwaGFEZWNheTsKCiAgICAgICAgZm9yY2VzLmVhY2goZnVuY3Rpb24oZm9yY2UpIHsKICAgICAgICAgIGZvcmNlKGFscGhhKTsKICAgICAgICB9KTsKCiAgICAgICAgZm9yIChpID0gMDsgaSA8IG47ICsraSkgewogICAgICAgICAgbm9kZSA9IG5vZGVzW2ldOwogICAgICAgICAgaWYgKG5vZGUuZnggPT0gbnVsbCkgbm9kZS54ICs9IG5vZGUudnggKj0gdmVsb2NpdHlEZWNheTsKICAgICAgICAgIGVsc2Ugbm9kZS54ID0gbm9kZS5meCwgbm9kZS52eCA9IDA7CiAgICAgICAgICBpZiAobm9kZS5meSA9PSBudWxsKSBub2RlLnkgKz0gbm9kZS52eSAqPSB2ZWxvY2l0eURlY2F5OwogICAgICAgICAgZWxzZSBub2RlLnkgPSBub2RlLmZ5LCBub2RlLnZ5ID0gMDsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIGluaXRpYWxpemVOb2RlcygpIHsKICAgICAgICBmb3IgKHZhciBpID0gMCwgbiA9IG5vZGVzLmxlbmd0aCwgbm9kZTsgaSA8IG47ICsraSkgewogICAgICAgICAgbm9kZSA9IG5vZGVzW2ldLCBub2RlLmluZGV4ID0gaTsKICAgICAgICAgIGlmIChpc05hTihub2RlLngpIHx8IGlzTmFOKG5vZGUueSkpIHsKICAgICAgICAgICAgdmFyIHJhZGl1cyA9IGluaXRpYWxSYWRpdXMkMSAqIE1hdGguc3FydChpKSwgYW5nbGUgPSBpICogaW5pdGlhbEFuZ2xlJDE7CiAgICAgICAgICAgIG5vZGUueCA9IHJhZGl1cyAqIE1hdGguY29zKGFuZ2xlKTsKICAgICAgICAgICAgbm9kZS55ID0gcmFkaXVzICogTWF0aC5zaW4oYW5nbGUpOwogICAgICAgICAgfQogICAgICAgICAgaWYgKGlzTmFOKG5vZGUudngpIHx8IGlzTmFOKG5vZGUudnkpKSB7CiAgICAgICAgICAgIG5vZGUudnggPSBub2RlLnZ5ID0gMDsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIGluaXRpYWxpemVGb3JjZShmb3JjZSkgewogICAgICAgIGlmIChmb3JjZS5pbml0aWFsaXplKSBmb3JjZS5pbml0aWFsaXplKG5vZGVzKTsKICAgICAgICByZXR1cm4gZm9yY2U7CiAgICAgIH0KCiAgICAgIGluaXRpYWxpemVOb2RlcygpOwoKICAgICAgcmV0dXJuIHNpbXVsYXRpb24gPSB7CiAgICAgICAgdGljazogdGljaywKCiAgICAgICAgcmVzdGFydDogZnVuY3Rpb24oKSB7CiAgICAgICAgICByZXR1cm4gc3RlcHBlci5yZXN0YXJ0KHN0ZXApLCBzaW11bGF0aW9uOwogICAgICAgIH0sCgogICAgICAgIHN0b3A6IGZ1bmN0aW9uKCkgewogICAgICAgICAgcmV0dXJuIHN0ZXBwZXIuc3RvcCgpLCBzaW11bGF0aW9uOwogICAgICAgIH0sCgogICAgICAgIG5vZGVzOiBmdW5jdGlvbihfKSB7CiAgICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChub2RlcyA9IF8sIGluaXRpYWxpemVOb2RlcygpLCBmb3JjZXMuZWFjaChpbml0aWFsaXplRm9yY2UpLCBzaW11bGF0aW9uKSA6IG5vZGVzOwogICAgICAgIH0sCgogICAgICAgIGFscGhhOiBmdW5jdGlvbihfKSB7CiAgICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChhbHBoYSA9ICtfLCBzaW11bGF0aW9uKSA6IGFscGhhOwogICAgICAgIH0sCgogICAgICAgIGFscGhhTWluOiBmdW5jdGlvbihfKSB7CiAgICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChhbHBoYU1pbiA9ICtfLCBzaW11bGF0aW9uKSA6IGFscGhhTWluOwogICAgICAgIH0sCgogICAgICAgIGFscGhhRGVjYXk6IGZ1bmN0aW9uKF8pIHsKICAgICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKGFscGhhRGVjYXkgPSArXywgc2ltdWxhdGlvbikgOiArYWxwaGFEZWNheTsKICAgICAgICB9LAoKICAgICAgICBhbHBoYVRhcmdldDogZnVuY3Rpb24oXykgewogICAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoYWxwaGFUYXJnZXQgPSArXywgc2ltdWxhdGlvbikgOiBhbHBoYVRhcmdldDsKICAgICAgICB9LAoKICAgICAgICB2ZWxvY2l0eURlY2F5OiBmdW5jdGlvbihfKSB7CiAgICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/ICh2ZWxvY2l0eURlY2F5ID0gMSAtIF8sIHNpbXVsYXRpb24pIDogMSAtIHZlbG9jaXR5RGVjYXk7CiAgICAgICAgfSwKCiAgICAgICAgZm9yY2U6IGZ1bmN0aW9uKG5hbWUsIF8pIHsKICAgICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID4gMSA/ICgoXyA9PSBudWxsID8gZm9yY2VzLnJlbW92ZShuYW1lKSA6IGZvcmNlcy5zZXQobmFtZSwgaW5pdGlhbGl6ZUZvcmNlKF8pKSksIHNpbXVsYXRpb24pIDogZm9yY2VzLmdldChuYW1lKTsKICAgICAgICB9LAoKICAgICAgICBmaW5kOiBmdW5jdGlvbih4LCB5LCByYWRpdXMpIHsKICAgICAgICAgIHZhciBpID0gMCwKICAgICAgICAgICAgICBuID0gbm9kZXMubGVuZ3RoLAogICAgICAgICAgICAgIGR4LAogICAgICAgICAgICAgIGR5LAogICAgICAgICAgICAgIGQyLAogICAgICAgICAgICAgIG5vZGUsCiAgICAgICAgICAgICAgY2xvc2VzdDsKCiAgICAgICAgICBpZiAocmFkaXVzID09IG51bGwpIHJhZGl1cyA9IEluZmluaXR5OwogICAgICAgICAgZWxzZSByYWRpdXMgKj0gcmFkaXVzOwoKICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBuOyArK2kpIHsKICAgICAgICAgICAgbm9kZSA9IG5vZGVzW2ldOwogICAgICAgICAgICBkeCA9IHggLSBub2RlLng7CiAgICAgICAgICAgIGR5ID0geSAtIG5vZGUueTsKICAgICAgICAgICAgZDIgPSBkeCAqIGR4ICsgZHkgKiBkeTsKICAgICAgICAgICAgaWYgKGQyIDwgcmFkaXVzKSBjbG9zZXN0ID0gbm9kZSwgcmFkaXVzID0gZDI7CiAgICAgICAgICB9CgogICAgICAgICAgcmV0dXJuIGNsb3Nlc3Q7CiAgICAgICAgfSwKCiAgICAgICAgb246IGZ1bmN0aW9uKG5hbWUsIF8pIHsKICAgICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID4gMSA/IChldmVudC5vbihuYW1lLCBfKSwgc2ltdWxhdGlvbikgOiBldmVudC5vbihuYW1lKTsKICAgICAgICB9CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gbWFueUJvZHkkMSgpIHsKICAgICAgdmFyIG5vZGVzLAogICAgICAgICAgbm9kZSwKICAgICAgICAgIGFscGhhLAogICAgICAgICAgc3RyZW5ndGggPSBjb25zdGFudCRsKC0zMCksCiAgICAgICAgICBzdHJlbmd0aHMsCiAgICAgICAgICBkaXN0YW5jZU1pbjIgPSAxLAogICAgICAgICAgZGlzdGFuY2VNYXgyID0gSW5maW5pdHksCiAgICAgICAgICB0aGV0YTIgPSAwLjgxOwoKICAgICAgZnVuY3Rpb24gZm9yY2UoXykgewogICAgICAgIHZhciBpLCBuID0gbm9kZXMubGVuZ3RoLCB0cmVlID0gcXVhZHRyZWUkMShub2RlcywgeCQ2LCB5JDYpLnZpc2l0QWZ0ZXIoYWNjdW11bGF0ZSk7CiAgICAgICAgZm9yIChhbHBoYSA9IF8sIGkgPSAwOyBpIDwgbjsgKytpKSBub2RlID0gbm9kZXNbaV0sIHRyZWUudmlzaXQoYXBwbHkpOwogICAgICB9CgogICAgICBmdW5jdGlvbiBpbml0aWFsaXplKCkgewogICAgICAgIGlmICghbm9kZXMpIHJldHVybjsKICAgICAgICB2YXIgaSwgbiA9IG5vZGVzLmxlbmd0aCwgbm9kZTsKICAgICAgICBzdHJlbmd0aHMgPSBuZXcgQXJyYXkobik7CiAgICAgICAgZm9yIChpID0gMDsgaSA8IG47ICsraSkgbm9kZSA9IG5vZGVzW2ldLCBzdHJlbmd0aHNbbm9kZS5pbmRleF0gPSArc3RyZW5ndGgobm9kZSwgaSwgbm9kZXMpOwogICAgICB9CgogICAgICBmdW5jdGlvbiBhY2N1bXVsYXRlKHF1YWQpIHsKICAgICAgICB2YXIgc3RyZW5ndGggPSAwLCBxLCBjLCB3ZWlnaHQgPSAwLCB4LCB5LCBpOwoKICAgICAgICAvLyBGb3IgaW50ZXJuYWwgbm9kZXMsIGFjY3VtdWxhdGUgZm9yY2VzIGZyb20gY2hpbGQgcXVhZHJhbnRzLgogICAgICAgIGlmIChxdWFkLmxlbmd0aCkgewogICAgICAgICAgZm9yICh4ID0geSA9IGkgPSAwOyBpIDwgNDsgKytpKSB7CiAgICAgICAgICAgIGlmICgocSA9IHF1YWRbaV0pICYmIChjID0gTWF0aC5hYnMocS52YWx1ZSkpKSB7CiAgICAgICAgICAgICAgc3RyZW5ndGggKz0gcS52YWx1ZSwgd2VpZ2h0ICs9IGMsIHggKz0gYyAqIHEueCwgeSArPSBjICogcS55OwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICBxdWFkLnggPSB4IC8gd2VpZ2h0OwogICAgICAgICAgcXVhZC55ID0geSAvIHdlaWdodDsKICAgICAgICB9CgogICAgICAgIC8vIEZvciBsZWFmIG5vZGVzLCBhY2N1bXVsYXRlIGZvcmNlcyBmcm9tIGNvaW5jaWRlbnQgcXVhZHJhbnRzLgogICAgICAgIGVsc2UgewogICAgICAgICAgcSA9IHF1YWQ7CiAgICAgICAgICBxLnggPSBxLmRhdGEueDsKICAgICAgICAgIHEueSA9IHEuZGF0YS55OwogICAgICAgICAgZG8gc3RyZW5ndGggKz0gc3RyZW5ndGhzW3EuZGF0YS5pbmRleF07CiAgICAgICAgICB3aGlsZSAocSA9IHEubmV4dCk7CiAgICAgICAgfQoKICAgICAgICBxdWFkLnZhbHVlID0gc3RyZW5ndGg7CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIGFwcGx5KHF1YWQsIHgxLCBfLCB4MikgewogICAgICAgIGlmICghcXVhZC52YWx1ZSkgcmV0dXJuIHRydWU7CgogICAgICAgIHZhciB4ID0gcXVhZC54IC0gbm9kZS54LAogICAgICAgICAgICB5ID0gcXVhZC55IC0gbm9kZS55LAogICAgICAgICAgICB3ID0geDIgLSB4MSwKICAgICAgICAgICAgbCA9IHggKiB4ICsgeSAqIHk7CgogICAgICAgIC8vIEFwcGx5IHRoZSBCYXJuZXMtSHV0IGFwcHJveGltYXRpb24gaWYgcG9zc2libGUuCiAgICAgICAgLy8gTGltaXQgZm9yY2VzIGZvciB2ZXJ5IGNsb3NlIG5vZGVzOyByYW5kb21pemUgZGlyZWN0aW9uIGlmIGNvaW5jaWRlbnQuCiAgICAgICAgaWYgKHcgKiB3IC8gdGhldGEyIDwgbCkgewogICAgICAgICAgaWYgKGwgPCBkaXN0YW5jZU1heDIpIHsKICAgICAgICAgICAgaWYgKHggPT09IDApIHggPSBqaWdnbGUkMSgpLCBsICs9IHggKiB4OwogICAgICAgICAgICBpZiAoeSA9PT0gMCkgeSA9IGppZ2dsZSQxKCksIGwgKz0geSAqIHk7CiAgICAgICAgICAgIGlmIChsIDwgZGlzdGFuY2VNaW4yKSBsID0gTWF0aC5zcXJ0KGRpc3RhbmNlTWluMiAqIGwpOwogICAgICAgICAgICBub2RlLnZ4ICs9IHggKiBxdWFkLnZhbHVlICogYWxwaGEgLyBsOwogICAgICAgICAgICBub2RlLnZ5ICs9IHkgKiBxdWFkLnZhbHVlICogYWxwaGEgLyBsOwogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgfQoKICAgICAgICAvLyBPdGhlcndpc2UsIHByb2Nlc3MgcG9pbnRzIGRpcmVjdGx5LgogICAgICAgIGVsc2UgaWYgKHF1YWQubGVuZ3RoIHx8IGwgPj0gZGlzdGFuY2VNYXgyKSByZXR1cm47CgogICAgICAgIC8vIExpbWl0IGZvcmNlcyBmb3IgdmVyeSBjbG9zZSBub2RlczsgcmFuZG9taXplIGRpcmVjdGlvbiBpZiBjb2luY2lkZW50LgogICAgICAgIGlmIChxdWFkLmRhdGEgIT09IG5vZGUgfHwgcXVhZC5uZXh0KSB7CiAgICAgICAgICBpZiAoeCA9PT0gMCkgeCA9IGppZ2dsZSQxKCksIGwgKz0geCAqIHg7CiAgICAgICAgICBpZiAoeSA9PT0gMCkgeSA9IGppZ2dsZSQxKCksIGwgKz0geSAqIHk7CiAgICAgICAgICBpZiAobCA8IGRpc3RhbmNlTWluMikgbCA9IE1hdGguc3FydChkaXN0YW5jZU1pbjIgKiBsKTsKICAgICAgICB9CgogICAgICAgIGRvIGlmIChxdWFkLmRhdGEgIT09IG5vZGUpIHsKICAgICAgICAgIHcgPSBzdHJlbmd0aHNbcXVhZC5kYXRhLmluZGV4XSAqIGFscGhhIC8gbDsKICAgICAgICAgIG5vZGUudnggKz0geCAqIHc7CiAgICAgICAgICBub2RlLnZ5ICs9IHkgKiB3OwogICAgICAgIH0gd2hpbGUgKHF1YWQgPSBxdWFkLm5leHQpOwogICAgICB9CgogICAgICBmb3JjZS5pbml0aWFsaXplID0gZnVuY3Rpb24oXykgewogICAgICAgIG5vZGVzID0gXzsKICAgICAgICBpbml0aWFsaXplKCk7CiAgICAgIH07CgogICAgICBmb3JjZS5zdHJlbmd0aCA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChzdHJlbmd0aCA9IHR5cGVvZiBfID09PSAiZnVuY3Rpb24iID8gXyA6IGNvbnN0YW50JGwoK18pLCBpbml0aWFsaXplKCksIGZvcmNlKSA6IHN0cmVuZ3RoOwogICAgICB9OwoKICAgICAgZm9yY2UuZGlzdGFuY2VNaW4gPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoZGlzdGFuY2VNaW4yID0gXyAqIF8sIGZvcmNlKSA6IE1hdGguc3FydChkaXN0YW5jZU1pbjIpOwogICAgICB9OwoKICAgICAgZm9yY2UuZGlzdGFuY2VNYXggPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoZGlzdGFuY2VNYXgyID0gXyAqIF8sIGZvcmNlKSA6IE1hdGguc3FydChkaXN0YW5jZU1heDIpOwogICAgICB9OwoKICAgICAgZm9yY2UudGhldGEgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAodGhldGEyID0gXyAqIF8sIGZvcmNlKSA6IE1hdGguc3FydCh0aGV0YTIpOwogICAgICB9OwoKICAgICAgcmV0dXJuIGZvcmNlOwogICAgfQoKICAgIGZ1bmN0aW9uIHJhZGlhbCQxKHJhZGl1cywgeCwgeSkgewogICAgICB2YXIgbm9kZXMsCiAgICAgICAgICBzdHJlbmd0aCA9IGNvbnN0YW50JGwoMC4xKSwKICAgICAgICAgIHN0cmVuZ3RocywKICAgICAgICAgIHJhZGl1c2VzOwoKICAgICAgaWYgKHR5cGVvZiByYWRpdXMgIT09ICJmdW5jdGlvbiIpIHJhZGl1cyA9IGNvbnN0YW50JGwoK3JhZGl1cyk7CiAgICAgIGlmICh4ID09IG51bGwpIHggPSAwOwogICAgICBpZiAoeSA9PSBudWxsKSB5ID0gMDsKCiAgICAgIGZ1bmN0aW9uIGZvcmNlKGFscGhhKSB7CiAgICAgICAgZm9yICh2YXIgaSA9IDAsIG4gPSBub2Rlcy5sZW5ndGg7IGkgPCBuOyArK2kpIHsKICAgICAgICAgIHZhciBub2RlID0gbm9kZXNbaV0sCiAgICAgICAgICAgICAgZHggPSBub2RlLnggLSB4IHx8IDFlLTYsCiAgICAgICAgICAgICAgZHkgPSBub2RlLnkgLSB5IHx8IDFlLTYsCiAgICAgICAgICAgICAgciA9IE1hdGguc3FydChkeCAqIGR4ICsgZHkgKiBkeSksCiAgICAgICAgICAgICAgayA9IChyYWRpdXNlc1tpXSAtIHIpICogc3RyZW5ndGhzW2ldICogYWxwaGEgLyByOwogICAgICAgICAgbm9kZS52eCArPSBkeCAqIGs7CiAgICAgICAgICBub2RlLnZ5ICs9IGR5ICogazsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIGluaXRpYWxpemUoKSB7CiAgICAgICAgaWYgKCFub2RlcykgcmV0dXJuOwogICAgICAgIHZhciBpLCBuID0gbm9kZXMubGVuZ3RoOwogICAgICAgIHN0cmVuZ3RocyA9IG5ldyBBcnJheShuKTsKICAgICAgICByYWRpdXNlcyA9IG5ldyBBcnJheShuKTsKICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbjsgKytpKSB7CiAgICAgICAgICByYWRpdXNlc1tpXSA9ICtyYWRpdXMobm9kZXNbaV0sIGksIG5vZGVzKTsKICAgICAgICAgIHN0cmVuZ3Roc1tpXSA9IGlzTmFOKHJhZGl1c2VzW2ldKSA/IDAgOiArc3RyZW5ndGgobm9kZXNbaV0sIGksIG5vZGVzKTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIGZvcmNlLmluaXRpYWxpemUgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgbm9kZXMgPSBfLCBpbml0aWFsaXplKCk7CiAgICAgIH07CgogICAgICBmb3JjZS5zdHJlbmd0aCA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChzdHJlbmd0aCA9IHR5cGVvZiBfID09PSAiZnVuY3Rpb24iID8gXyA6IGNvbnN0YW50JGwoK18pLCBpbml0aWFsaXplKCksIGZvcmNlKSA6IHN0cmVuZ3RoOwogICAgICB9OwoKICAgICAgZm9yY2UucmFkaXVzID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHJhZGl1cyA9IHR5cGVvZiBfID09PSAiZnVuY3Rpb24iID8gXyA6IGNvbnN0YW50JGwoK18pLCBpbml0aWFsaXplKCksIGZvcmNlKSA6IHJhZGl1czsKICAgICAgfTsKCiAgICAgIGZvcmNlLnggPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoeCA9ICtfLCBmb3JjZSkgOiB4OwogICAgICB9OwoKICAgICAgZm9yY2UueSA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/ICh5ID0gK18sIGZvcmNlKSA6IHk7CiAgICAgIH07CgogICAgICByZXR1cm4gZm9yY2U7CiAgICB9CgogICAgZnVuY3Rpb24geCQ3KHgpIHsKICAgICAgdmFyIHN0cmVuZ3RoID0gY29uc3RhbnQkbCgwLjEpLAogICAgICAgICAgbm9kZXMsCiAgICAgICAgICBzdHJlbmd0aHMsCiAgICAgICAgICB4ejsKCiAgICAgIGlmICh0eXBlb2YgeCAhPT0gImZ1bmN0aW9uIikgeCA9IGNvbnN0YW50JGwoeCA9PSBudWxsID8gMCA6ICt4KTsKCiAgICAgIGZ1bmN0aW9uIGZvcmNlKGFscGhhKSB7CiAgICAgICAgZm9yICh2YXIgaSA9IDAsIG4gPSBub2Rlcy5sZW5ndGgsIG5vZGU7IGkgPCBuOyArK2kpIHsKICAgICAgICAgIG5vZGUgPSBub2Rlc1tpXSwgbm9kZS52eCArPSAoeHpbaV0gLSBub2RlLngpICogc3RyZW5ndGhzW2ldICogYWxwaGE7CiAgICAgICAgfQogICAgICB9CgogICAgICBmdW5jdGlvbiBpbml0aWFsaXplKCkgewogICAgICAgIGlmICghbm9kZXMpIHJldHVybjsKICAgICAgICB2YXIgaSwgbiA9IG5vZGVzLmxlbmd0aDsKICAgICAgICBzdHJlbmd0aHMgPSBuZXcgQXJyYXkobik7CiAgICAgICAgeHogPSBuZXcgQXJyYXkobik7CiAgICAgICAgZm9yIChpID0gMDsgaSA8IG47ICsraSkgewogICAgICAgICAgc3RyZW5ndGhzW2ldID0gaXNOYU4oeHpbaV0gPSAreChub2Rlc1tpXSwgaSwgbm9kZXMpKSA/IDAgOiArc3RyZW5ndGgobm9kZXNbaV0sIGksIG5vZGVzKTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIGZvcmNlLmluaXRpYWxpemUgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgbm9kZXMgPSBfOwogICAgICAgIGluaXRpYWxpemUoKTsKICAgICAgfTsKCiAgICAgIGZvcmNlLnN0cmVuZ3RoID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHN0cmVuZ3RoID0gdHlwZW9mIF8gPT09ICJmdW5jdGlvbiIgPyBfIDogY29uc3RhbnQkbCgrXyksIGluaXRpYWxpemUoKSwgZm9yY2UpIDogc3RyZW5ndGg7CiAgICAgIH07CgogICAgICBmb3JjZS54ID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHggPSB0eXBlb2YgXyA9PT0gImZ1bmN0aW9uIiA/IF8gOiBjb25zdGFudCRsKCtfKSwgaW5pdGlhbGl6ZSgpLCBmb3JjZSkgOiB4OwogICAgICB9OwoKICAgICAgcmV0dXJuIGZvcmNlOwogICAgfQoKICAgIGZ1bmN0aW9uIHkkNyh5KSB7CiAgICAgIHZhciBzdHJlbmd0aCA9IGNvbnN0YW50JGwoMC4xKSwKICAgICAgICAgIG5vZGVzLAogICAgICAgICAgc3RyZW5ndGhzLAogICAgICAgICAgeXo7CgogICAgICBpZiAodHlwZW9mIHkgIT09ICJmdW5jdGlvbiIpIHkgPSBjb25zdGFudCRsKHkgPT0gbnVsbCA/IDAgOiAreSk7CgogICAgICBmdW5jdGlvbiBmb3JjZShhbHBoYSkgewogICAgICAgIGZvciAodmFyIGkgPSAwLCBuID0gbm9kZXMubGVuZ3RoLCBub2RlOyBpIDwgbjsgKytpKSB7CiAgICAgICAgICBub2RlID0gbm9kZXNbaV0sIG5vZGUudnkgKz0gKHl6W2ldIC0gbm9kZS55KSAqIHN0cmVuZ3Roc1tpXSAqIGFscGhhOwogICAgICAgIH0KICAgICAgfQoKICAgICAgZnVuY3Rp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QgPSBbXSwKICAgICAgICAgICAgaiA9IDAsCiAgICAgICAgICAgIGcgPSBncm91cGluZ1swXSwKICAgICAgICAgICAgbGVuZ3RoID0gMDsKCiAgICAgICAgd2hpbGUgKGkgPiAwICYmIGcgPiAwKSB7CiAgICAgICAgICBpZiAobGVuZ3RoICsgZyArIDEgPiB3aWR0aCkgZyA9IE1hdGgubWF4KDEsIHdpZHRoIC0gbGVuZ3RoKTsKICAgICAgICAgIHQucHVzaCh2YWx1ZS5zdWJzdHJpbmcoaSAtPSBnLCBpICsgZykpOwogICAgICAgICAgaWYgKChsZW5ndGggKz0gZyArIDEpID4gd2lkdGgpIGJyZWFrOwogICAgICAgICAgZyA9IGdyb3VwaW5nW2ogPSAoaiArIDEpICUgZ3JvdXBpbmcubGVuZ3RoXTsKICAgICAgICB9CgogICAgICAgIHJldHVybiB0LnJldmVyc2UoKS5qb2luKHRob3VzYW5kcyk7CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gZm9ybWF0TnVtZXJhbHMkMShudW1lcmFscykgewogICAgICByZXR1cm4gZnVuY3Rpb24odmFsdWUpIHsKICAgICAgICByZXR1cm4gdmFsdWUucmVwbGFjZSgvWzAtOV0vZywgZnVuY3Rpb24oaSkgewogICAgICAgICAgcmV0dXJuIG51bWVyYWxzWytpXTsKICAgICAgICB9KTsKICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiBmb3JtYXREZWZhdWx0KHgsIHApIHsKICAgICAgeCA9IHgudG9QcmVjaXNpb24ocCk7CgogICAgICBvdXQ6IGZvciAodmFyIG4gPSB4Lmxlbmd0aCwgaSA9IDEsIGkwID0gLTEsIGkxOyBpIDwgbjsgKytpKSB7CiAgICAgICAgc3dpdGNoICh4W2ldKSB7CiAgICAgICAgICBjYXNlICIuIjogaTAgPSBpMSA9IGk7IGJyZWFrOwogICAgICAgICAgY2FzZSAiMCI6IGlmIChpMCA9PT0gMCkgaTAgPSBpOyBpMSA9IGk7IGJyZWFrOwogICAgICAgICAgY2FzZSAiZSI6IGJyZWFrIG91dDsKICAgICAgICAgIGRlZmF1bHQ6IGlmIChpMCA+IDApIGkwID0gMDsgYnJlYWs7CiAgICAgICAgfQogICAgICB9CgogICAgICByZXR1cm4gaTAgPiAwID8geC5zbGljZSgwLCBpMCkgKyB4LnNsaWNlKGkxICsgMSkgOiB4OwogICAgfQoKICAgIHZhciBwcmVmaXhFeHBvbmVudCQxOwoKICAgIGZ1bmN0aW9uIGZvcm1hdFByZWZpeEF1dG8kMSh4LCBwKSB7CiAgICAgIHZhciBkID0gZm9ybWF0RGVjaW1hbCQxKHgsIHApOwogICAgICBpZiAoIWQpIHJldHVybiB4ICsgIiI7CiAgICAgIHZhciBjb2VmZmljaWVudCA9IGRbMF0sCiAgICAgICAgICBleHBvbmVudCA9IGRbMV0sCiAgICAgICAgICBpID0gZXhwb25lbnQgLSAocHJlZml4RXhwb25lbnQkMSA9IE1hdGgubWF4KC04LCBNYXRoLm1pbig4LCBNYXRoLmZsb29yKGV4cG9uZW50IC8gMykpKSAqIDMpICsgMSwKICAgICAgICAgIG4gPSBjb2VmZmljaWVudC5sZW5ndGg7CiAgICAgIHJldHVybiBpID09PSBuID8gY29lZmZpY2llbnQKICAgICAgICAgIDogaSA+IG4gPyBjb2VmZmljaWVudCArIG5ldyBBcnJheShpIC0gbiArIDEpLmpvaW4oIjAiKQogICAgICAgICAgOiBpID4gMCA/IGNvZWZmaWNpZW50LnNsaWNlKDAsIGkpICsgIi4iICsgY29lZmZpY2llbnQuc2xpY2UoaSkKICAgICAgICAgIDogIjAuIiArIG5ldyBBcnJheSgxIC0gaSkuam9pbigiMCIpICsgZm9ybWF0RGVjaW1hbCQxKHgsIE1hdGgubWF4KDAsIHAgKyBpIC0gMSkpWzBdOyAvLyBsZXNzIHRoYW4gMXkhCiAgICB9CgogICAgZnVuY3Rpb24gZm9ybWF0Um91bmRlZCQxKHgsIHApIHsKICAgICAgdmFyIGQgPSBmb3JtYXREZWNpbWFsJDEoeCwgcCk7CiAgICAgIGlmICghZCkgcmV0dXJuIHggKyAiIjsKICAgICAgdmFyIGNvZWZmaWNpZW50ID0gZFswXSwKICAgICAgICAgIGV4cG9uZW50ID0gZFsxXTsKICAgICAgcmV0dXJuIGV4cG9uZW50IDwgMCA/ICIwLiIgKyBuZXcgQXJyYXkoLWV4cG9uZW50KS5qb2luKCIwIikgKyBjb2VmZmljaWVudAogICAgICAgICAgOiBjb2VmZmljaWVudC5sZW5ndGggPiBleHBvbmVudCArIDEgPyBjb2VmZmljaWVudC5zbGljZSgwLCBleHBvbmVudCArIDEpICsgIi4iICsgY29lZmZpY2llbnQuc2xpY2UoZXhwb25lbnQgKyAxKQogICAgICAgICAgOiBjb2VmZmljaWVudCArIG5ldyBBcnJheShleHBvbmVudCAtIGNvZWZmaWNpZW50Lmxlbmd0aCArIDIpLmpvaW4oIjAiKTsKICAgIH0KCiAgICB2YXIgZm9ybWF0VHlwZXMkMSA9IHsKICAgICAgIiI6IGZvcm1hdERlZmF1bHQsCiAgICAgICIlIjogZnVuY3Rpb24oeCwgcCkgeyByZXR1cm4gKHggKiAxMDApLnRvRml4ZWQocCk7IH0sCiAgICAgICJiIjogZnVuY3Rpb24oeCkgeyByZXR1cm4gTWF0aC5yb3VuZCh4KS50b1N0cmluZygyKTsgfSwKICAgICAgImMiOiBmdW5jdGlvbih4KSB7IHJldHVybiB4ICsgIiI7IH0sCiAgICAgICJkIjogZnVuY3Rpb24oeCkgeyByZXR1cm4gTWF0aC5yb3VuZCh4KS50b1N0cmluZygxMCk7IH0sCiAgICAgICJlIjogZnVuY3Rpb24oeCwgcCkgeyByZXR1cm4geC50b0V4cG9uZW50aWFsKHApOyB9LAogICAgICAiZiI6IGZ1bmN0aW9uKHgsIHApIHsgcmV0dXJuIHgudG9GaXhlZChwKTsgfSwKICAgICAgImciOiBmdW5jdGlvbih4LCBwKSB7IHJldHVybiB4LnRvUHJlY2lzaW9uKHApOyB9LAogICAgICAibyI6IGZ1bmN0aW9uKHgpIH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PSBjb21tYTsKICAgICAgdGhpcy5wcmVjaXNpb24gPSBwcmVjaXNpb247CiAgICAgIHRoaXMudHlwZSA9IHR5cGU7CiAgICB9CgogICAgRm9ybWF0U3BlY2lmaWVyJDEucHJvdG90eXBlLnRvU3RyaW5nID0gZnVuY3Rpb24oKSB7CiAgICAgIHJldHVybiB0aGlzLmZpbGwKICAgICAgICAgICsgdGhpcy5hbGlnbgogICAgICAgICAgKyB0aGlzLnNpZ24KICAgICAgICAgICsgdGhpcy5zeW1ib2wKICAgICAgICAgICsgKHRoaXMuemVybyA/ICIwIiA6ICIiKQogICAgICAgICAgKyAodGhpcy53aWR0aCA9PSBudWxsID8gIiIgOiBNYXRoLm1heCgxLCB0aGlzLndpZHRoIHwgMCkpCiAgICAgICAgICArICh0aGlzLmNvbW1hID8gIiwiIDogIiIpCiAgICAgICAgICArICh0aGlzLnByZWNpc2lvbiA9PSBudWxsID8gIiIgOiAiLiIgKyBNYXRoLm1heCgwLCB0aGlzLnByZWNpc2lvbiB8IDApKQogICAgICAgICAgKyB0aGlzLnR5cGU7CiAgICB9OwoKICAgIGZ1bmN0aW9uIGlkZW50aXR5JGQoeCkgewogICAgICByZXR1cm4geDsKICAgIH0KCiAgICB2YXIgcHJlZml4ZXMkMSA9IFsieSIsInoiLCJhIiwiZiIsInAiLCJuIiwiwrUiLCJtIiwiIiwiayIsIk0iLCJHIiwiVCIsIlAiLCJFIiwiWiIsIlkiXTsKCiAgICBmdW5jdGlvbiBmb3JtYXRMb2NhbGUkMihsb2NhbGUpIHsKICAgICAgdmFyIGdyb3VwID0gbG9jYWxlLmdyb3VwaW5nICYmIGxvY2FsZS50aG91c2FuZHMgPyBmb3JtYXRHcm91cCQxKGxvY2FsZS5ncm91cGluZywgbG9jYWxlLnRob3VzYW5kcykgOiBpZGVudGl0eSRkLAogICAgICAgICAgY3VycmVuY3kgPSBsb2NhbGUuY3VycmVuY3ksCiAgICAgICAgICBkZWNpbWFsID0gbG9jYWxlLmRlY2ltYWwsCiAgICAgICAgICBudW1lcmFscyA9IGxvY2FsZS5udW1lcmFscyA/IGZvcm1hdE51bWVyYWxzJDEobG9jYWxlLm51bWVyYWxzKSA6IGlkZW50aXR5JGQsCiAgICAgICAgICBwZXJjZW50ID0gbG9jYWxlLnBlcmNlbnQgfHwgIiUiOwoKICAgICAgZnVuY3Rpb24gbmV3Rm9ybWF0KHNwZWNpZmllcikgewogICAgICAgIHNwZWNpZmllciA9IGZvcm1hdFNwZWNpZmllciQxKHNwZWNpZmllcik7CgogICAgICAgIHZhciBmaWxsID0gc3BlY2lmaWVyLmZpbGwsCiAgICAgICAgICAgIGFsaWduID0gc3BlY2lmaWVyLmFsaWduLAogICAgICAgICAgICBzaWduID0gc3BlY2lmaWVyLnNpZ24sCiAgICAgICAgICAgIHN5bWJvbCA9IHNwZWNpZmllci5zeW1ib2wsCiAgICAgICAgICAgIHplcm8gPSBzcGVjaWZpZXIuemVybywKICAgICAgICAgICAgd2lkdGggPSBzcGVjaWZpZXIud2lkdGgsCiAgICAgICAgICAgIGNvbW1hID0gc3BlY2lmaWVyLmNvbW1hLAogICAgICAgICAgICBwcmVjaXNpb24gPSBzcGVjaWZpZXIucHJlY2lzaW9uLAogICAgICAgICAgICB0eXBlID0gc3BlY2lmaWVyLnR5cGU7CgogICAgICAgIC8vIENvbXB1dGUgdGhlIHByZWZpeCBhbmQgc3VmZml4LgogICAgICAgIC8vIEZvciBTSS1wcmVmaXgsIHRoZSBzdWZmaXggaXMgbGF6aWx5IGNvbXB1dGVkLgogICAgICAgIHZhciBwcmVmaXggPSBzeW1ib2wgPT09ICIkIiA/IGN1cnJlbmN5WzBdIDogc3ltYm9sID09PSAiIyIgJiYgL1tib3hYXS8udGVzdCh0eXBlKSA/ICIwIiArIHR5cGUudG9Mb3dlckNhc2UoKSA6ICIiLAogICAgICAgICAgICBzdWZmaXggPSBzeW1ib2wgPT09ICIkIiA/IGN1cnJlbmN5WzFdIDogL1slcF0vLnRlc3QodHlwZSkgPyBwZ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ICAgICAgICAgcmV0dXJuIHNwZWNpZmllciArICIiOwogICAgICAgIH07CgogICAgICAgIHJldHVybiBmb3JtYXQ7CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIGZvcm1hdFByZWZpeChzcGVjaWZpZXIsIHZhbHVlKSB7CiAgICAgICAgdmFyIGYgPSBuZXdGb3JtYXQoKHNwZWNpZmllciA9IGZvcm1hdFNwZWNpZmllciQxKHNwZWNpZmllciksIHNwZWNpZmllci50eXBlID0gImYiLCBzcGVjaWZpZXIpKSwKICAgICAgICAgICAgZSA9IE1hdGgubWF4KC04LCBNYXRoLm1pbig4LCBNYXRoLmZsb29yKGV4cG9uZW50JDModmFsdWUpIC8gMykpKSAqIDMsCiAgICAgICAgICAgIGsgPSBNYXRoLnBvdygxMCwgLWUpLAogICAgICAgICAgICBwcmVmaXggPSBwcmVmaXhlcyQxWzggKyBlIC8gM107CiAgICAgICAgcmV0dXJuIGZ1bmN0aW9uKHZhbHVlKSB7CiAgICAgICAgICByZXR1cm4gZihrICogdmFsdWUpICsgcHJlZml4OwogICAgICAgIH07CiAgICAgIH0KCiAgICAgIHJldHVybiB7CiAgICAgICAgZm9ybWF0OiBuZXdGb3JtYXQsCiAgICAgICAgZm9ybWF0UHJlZml4OiBmb3JtYXRQcmVmaXgKICAgICAgfTsKICAgIH0KCiAgICB2YXIgbG9jYWxlJDI7CiAgICB2YXIgZm9ybWF0JDE7CiAgICB2YXIgZm9ybWF0UHJlZml4JDE7CgogICAgZGVmYXVsdExvY2FsZSQyKHsKICAgICAgZGVjaW1hbDogIi4iLAogICAgICB0aG91c2FuZHM6ICIsIiwKICAgICAgZ3JvdXBpbmc6IFszXSwKICAgICAgY3VycmVuY3k6IFsiJCIsICIiXQogICAgfSk7CgogICAgZnVuY3Rpb24gZGVmYXVsdExvY2FsZSQyKGRlZmluaXRpb24pIHsKICAgICAgbG9jYWxlJDIgPSBmb3JtYXRMb2NhbGUkMihkZWZpbml0aW9uKTsKICAgICAgZm9ybWF0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PSB6ICogY29zRGVsdGFQaGkgKyB4ICogc2luRGVsdGFQaGk7CiAgICAgICAgcmV0dXJuIFsKICAgICAgICAgIGF0YW4yJDIoeSAqIGNvc0RlbHRhR2FtbWEgLSBrICogc2luRGVsdGFHYW1tYSwgeCAqIGNvc0RlbHRhUGhpIC0geiAqIHNpbkRlbHRhUGhpKSwKICAgICAgICAgIGFzaW4kMihrICogY29zRGVsdGFHYW1tYSArIHkgKiBzaW5EZWx0YUdhbW1hKQogICAgICAgIF07CiAgICAgIH0KCiAgICAgIHJvdGF0aW9uLmludmVydCA9IGZ1bmN0aW9uKGxhbWJkYSwgcGhpKSB7CiAgICAgICAgdmFyIGNvc1BoaSA9IGNvcyQ0KHBoaSksCiAgICAgICAgICAgIHggPSBjb3MkNChsYW1iZGEpICogY29zUGhpLAogICAgICAgICAgICB5ID0gc2luJDQobGFtYmRhKSAqIGNvc1BoaSwKICAgICAgICAgICAgeiA9IHNpbiQ0KHBoaSksCiAgICAgICAgICAgIGsgPSB6ICogY29zRGVsdGFHYW1tYSAtIHkgKiBzaW5EZWx0YUdhbW1hOwogICAgICAgIHJldHVybiBbCiAgICAgICAgICBhdGFuMiQyKHkgKiBjb3NEZWx0YUdhbW1hICsgeiAqIHNpbkRlbHRhR2FtbWEsIHggKiBjb3NEZWx0YVBoaSArIGsgKiBzaW5EZWx0YVBoaSksCiAgICAgICAgICBhc2luJDIoayAqIGNvc0RlbHRhUGhpIC0geCAqIHNpbkRlbHRhUGhpKQogICAgICAgIF07CiAgICAgIH07CgogICAgICByZXR1cm4gcm90YXRpb247CiAgICB9CgogICAgZnVuY3Rpb24gcm90YXRpb24kMShyb3RhdGUpIHsKICAgICAgcm90YXRlID0gcm90YXRlUmFkaWFucyQxKHJvdGF0ZVswXSAqIHJhZGlhbnMkMSwgcm90YXRlWzFdICogcmFkaWFucyQxLCByb3RhdGUubGVuZ3RoID4gMiA/IHJvdGF0ZVsyXSAqIHJhZGlhbnMkMSA6IDApOwoKICAgICAgZn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nRlciA9IGNvbnN0YW50JG0oWzAsIDBdKSwKICAgICAgICAgIHJhZGl1cyA9IGNvbnN0YW50JG0oOTApLAogICAgICAgICAgcHJlY2lzaW9uID0gY29uc3RhbnQkbSg2KSwKICAgICAgICAgIHJpbmcsCiAgICAgICAgICByb3RhdGUsCiAgICAgICAgICBzdHJlYW0gPSB7cG9pbnQ6IHBvaW50fTsKCiAgICAgIGZ1bmN0aW9uIHBvaW50KHgsIHkpIHsKICAgICAgICByaW5nLnB1c2goeCA9IHJvdGF0ZSh4LCB5KSk7CiAgICAgICAgeFswXSAqPSBkZWdyZWVzJDMsIHhbMV0gKj0gZGVncmVlcyQzOwogICAgICB9CgogICAgICBmdW5jdGlvbiBjaXJjbGUoKSB7CiAgICAgICAgdmFyIGMgPSBjZW50ZXIuYXBwbHkodGhpcywgYXJndW1lbnRzKSwKICAgICAgICAgICAgciA9IHJhZGl1cy5hcHBseSh0aGlzLCBhcmd1bWVudHMpICogcmFkaWFucyQxLAogICAgICAgICAgICBwID0gcHJlY2lzaW9uLmFwcGx5KHRoaXMsIGFyZ3VtZW50cykgKiByYWRpYW5zJDE7CiAgICAgICAgcmluZyA9IFtdOwogICAgICAgIHJvdGF0ZSA9IHJvdGF0ZVJhZGlhbnMkMSgtY1swXSAqIHJhZGlhbnMkMSwgLWNbMV0gKiByYWRpYW5zJDEsIDApLmludmVydDsKICAgICAgICBjaXJjbGVTdHJlYW0kMShzdHJlYW0sIHIsIHAsIDEpOwogICAgICAgIGMgPSB7dHlwZTogIlBvbHlnb24iLCBjb29yZGluYXRlczogW3JpbmddfTsKICAgICAgICByaW5nID0gcm90YXRlID0gbnVsbDsKICAgICAgICByZXR1cm4gYzsKICAgICAgfQoKICAgICAgY2lyY2xlLmNlbnRlciA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChjZW50ZXIgPSB0eXBlb2YgXyA9PT0gImZ1bmN0aW9uIiA/IF8gOiBjb25zdGFudCRtKFsrX1swXSwgK19bMV1dKSwgY2lyY2xlKSA6IGNlbnRlcjsKICAgICAgfTsKCiAgICAgIGNpcmNsZS5yYWRpdXMgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAocmFkaXVzID0gdHlwZW9mIF8gPT09ICJmdW5jdGlvbiIgPyBfIDogY29uc3RhbnQkbSgrXyksIGNpcmNsZSkgOiByYWRpdXM7CiAgICAgIH07CgogICAgICBjaXJjbGUucHJlY2lzaW9uID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHByZWNpc2lvbiA9IHR5cGVvZiBfID09PSAiZnVuY3Rpb24iID8gXyA6IGNvbnN0YW50JG0oK18pLCBjaXJjbGUpIDogcHJlY2lzaW9uOwogICAgICB9OwoKICAgICAgcmV0dXJuIGNpcmNsZTsKICAgIH0KCiAgICBmdW5jdGlvbiBjbGlwQnVmZmVyJDEoKSB7CiAgICAgIHZhciBsaW5lcyA9IFtdLAogICAgICAgICAgbGluZTsKICAgICAgcmV0dXJuIHsKICAgICAgICBwb2ludDogZnVuY3Rpb24oeCwgeSkgewogICAgICAgICAgbGluZS5wdXNoKFt4LCB5XSk7CiAgICAgICAgfSwKICAgICAgICBsaW5lU3RhcnQ6IGZ1bmN0aW9uKCkgewogICAgICAgICAgbGluZXMucHVzaChsaW5lID0gW10pOwogICAgICAgIH0sCiAgICAgICAgbGluZUVuZDogbm9vcCQ4LAogICAgICAgIHJlam9pbjogZnVuY3Rpb24oKSB7CiAgICAgICAgICBpZiAobGluZXMubGVuZ3RoID4gMSkgbGluZXMucHVzaChsaW5lcy5wb3AoKS5jb25jYXQobGluZXMuc2hpZnQoKSkpOwogICAgICAgIH0sCiAgICAgICAgcmVzdWx0OiBmdW5jdGlvbigpIHsKICAgICAgICAgIHZhciByZXN1bHQgPSBsaW5lczsKICAgICAgICAgIGxpbmVzID0gW107CiAgICAgICA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OwogICAgICB9KTsKCiAgICAgIGlmICghc3ViamVjdC5sZW5ndGgpIHJldHVybjsKCiAgICAgIGNsaXAuc29ydChjb21wYXJlSW50ZXJzZWN0aW9uKTsKICAgICAgbGluayQ0KHN1YmplY3QpOwogICAgICBsaW5rJDQoY2xpcCk7CgogICAgICBmb3IgKGkgPSAwLCBuID0gY2xpcC5sZW5ndGg7IGkgPCBuOyArK2kpIHsKICAgICAgICBjbGlwW2ldLmUgPSBzdGFydEluc2lkZSA9ICFzdGFydEluc2lkZTsKICAgICAgfQoKICAgICAgdmFyIHN0YXJ0ID0gc3ViamVjdFswXSwKICAgICAgICAgIHBvaW50cywKICAgICAgICAgIHBvaW50OwoKICAgICAgd2hpbGUgKDEpIHsKICAgICAgICAvLyBGaW5kIGZpcnN0IHVudmlzaXRlZCBpbnRlcnNlY3Rpb24uCiAgICAgICAgdmFyIGN1cnJlbnQgPSBzdGFydCwKICAgICAgICAgICAgaXNTdWJqZWN0ID0gdHJ1ZTsKICAgICAgICB3aGlsZSAoY3VycmVudC52KSBpZiAoKGN1cnJlbnQgPSBjdXJyZW50Lm4pID09PSBzdGFydCkgcmV0dXJuOwogICAgICAgIHBvaW50cyA9IGN1cnJlbnQuejsKICAgICAgICBzdHJlYW0ubGluZVN0YXJ0KCk7CiAgICAgICAgZG8gewogICAgICAgICAgY3VycmVudC52ID0gY3VycmVudC5vLnYgPSB0cnVlOwogICAgICAgICAgaWYgKGN1cnJlbnQuZSkgewogICAgICAgICAgICBpZiAoaXNTdWJqZWN0KSB7CiAgICAgICAgICAgICAgZm9yIChpID0gMCwgbiA9IHBvaW50cy5sZW5ndGg7IGkgPCBuOyArK2kpIHN0cmVhbS5wb2ludCgocG9pbnQgPSBwb2ludHNbaV0pWzBdLCBwb2ludFsxXSk7CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgaW50ZXJwb2xhdGUoY3VycmVudC54LCBjdXJyZW50Lm4ueCwgMSwgc3RyZWFtKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBjdXJyZW50ID0gY3VycmVudC5uOwogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgaWYgKGlzU3ViamVjdCkgewogICAgICAgICAgICAgIHBvaW50cyA9IGN1cnJlbnQucC56OwogICAgICAgICAgICAgIGZvciAoaSA9IHBvaW50cy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkgc3RyZWFtLnBvaW50KChwb2ludCA9IHBvaW50c1tpXSlbMF0sIHBvaW50WzFdKTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICBpbnRlcnBvbGF0ZShjdXJyZW50LngsIGN1cnJlbnQucC54LCAtMSwgc3RyZWFtKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBjdXJyZW50ID0gY3VycmVudC5wOwogICAgICAgICAgfQogICAgICAgICAgY3VycmVudCA9IGN1cnJlbnQubzsKICAgICAgICAgIHBvaW50cyA9IGN1cnJlbnQuejsKICAgICAgICAgIGlzU3ViamVjdCA9ICFpc1N1YmplY3Q7CiAgICAgICAgfSB3aGlsZSAoIWN1cnJlbnQudik7CiAgICAgICAgc3RyZWFtLmxpbmVFbmQoKTsKICAgICAgfQogICAgfQoKICAgIGZ1bmN0aW9uIGxpbmskNChhcnJheSkgewogICAgICBpZiAoIShuID0gYXJyYXkubGVuZ3RoKSkgcmV0dXJuOwogICAgICB2YXIgbiwKICAgICAgICAgIGkgPSAwLAogICAgICAgICAgYSA9IGFycmF5WzBdLAogICAgICAgICAgYjsKICAgICAgd2hpbGUgKCsraSA8IG4pIHsKICAgICAgICBhLm4gPSBiID0gYXJyYXlbaV07CiAgICAgICAgYi5wID0gYTsKICAgICAgICBhID0gYjsKICAgICAgfQogICAgICBhLm4gPSBiID0gYXJyYXlbMF07CiAgICAgIGIucCA9IGE7CiAgICB9CgogICAgdmFyIHN1bSQ0ID0gYWRkZXIkMSgpOwoKICAgIGZ1bmN0aW9uIHBvbHlnb25Db250YWlucyQxKHBvbHlnb24sIHBvaW50KSB7CiAgICAgIHZhciBsYW1iZGEgPSBwb2ludFswXSwKICAgICAgICAgIHBoaSA9IHBvaW50WzFdLAogICAgICAgICAgbm9ybWFsID0gW3NpbiQ0KGxhbWJkYSksIC1jb3MkNChsYW1iZGEpLCAwXSwKICAgICAgICAgIGFuZ2xlID0gMCwKICAgICAgICAgIHdpbmRpbmcgPSAwOwoKICAgICAgc3VtJDQucmVzZXQoKTsKCiAgICAgIGZvciAodmFyIGkgPSAwLCBuID0gcG9seWdvbi5sZW5ndGg7IGkgPCBuOyArK2kpIHsKICAgICAgICBpZiAoIShtID0gKHJpbmcgPSBwb2x5Z29uW2ldKS5sZW5ndGgpKSBjb250aW51ZTsKICAgICAgICB2YXIgcmluZywKICAgICAgICAgICAgbSwKICAgICAgICAgICAgcG9pbnQwID0gcmluZ1ttIC0gMV0sCiAgICAgICAgICAgIGxhbWJkYTAgPSBwb2ludDBbMF0sCiAgICAgICAgICAgIHBoaTAgPSBwb2ludDBbMV0gLyAyICsgcXVhcnRlclBpJDEsCiAgICAgICAgICAgIHNpblBoaTAgPSBzaW4kNChwaGkwKSwKICAgICAgICAgICAgY29zUGhpMCA9IGNvcyQ0KHBoaTApOwoKICAgICAgICBmb3IgKHZhciBqID0gMDsgaiA8IG07ICsraiwgbGFtYmRhMCA9IGxhbWJkYTEsIHNpblBoaTAgPSBzaW5QaGkxLCBjb3NQaGkwID0gY29zUGhpMSwgcG9pbnQwID0gcG9pbnQxKSB7CiAgICAgICAgICB2YXIgcG9pbnQxID0gcmluZ1tqXSwKICAgICAgICAgICAgICBsYW1iZGExID0gcG9pbnQxWzBdLAogICAgICAgICAgICAgIHBoaTEgPSBwb2ludDFbMV0gLyAyICsgcXVhcnRlclBpJDEsCiAgICAgICAgICAgICAgc2luUGhpMSA9IHNpbiQ0KHBoaTEpLAogICAgICAgICAgICAgIGNvc1BoaTEgPSBjb3MkNChwaGkxKSwKICAgICAgICAgICAgICBkZWx0YSA9IGxhbWJkYTEgLSBsYW1iZG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iBhc2NlbmRpbmckOChhLCBiKSB7CiAgICAgIHJldHVybiBhIDwgYiA/IC0xIDogYSA+IGIgPyAxIDogYSA+PSBiID8gMCA6IE5hTjsKICAgIH0KCiAgICBmdW5jdGlvbiBiaXNlY3RvciQzKGNvbXBhcmUpIHsKICAgICAgaWYgKGNvbXBhcmUubGVuZ3RoID09PSAxKSBjb21wYXJlID0gYXNjZW5kaW5nQ29tcGFyYXRvciQzKGNvbXBhcmUpOwogICAgICByZXR1cm4gewogICAgICAgIGxlZnQ6IGZ1bmN0aW9uKGEsIHgsIGxvLCBoaSkgewogICAgICAgICAgaWYgKGxvID09IG51bGwpIGxvID0gMDsKICAgICAgICAgIGlmIChoaSA9PSBudWxsKSBoaSA9IGEubGVuZ3RoOwogICAgICAgICAgd2hpbGUgKGxvIDwgaGkpIHsKICAgICAgICAgICAgdmFyIG1pZCA9IGxvICsgaGkgPj4+IDE7CiAgICAgICAgICAgIGlmIChjb21wYXJlKGFbbWlkXSwgeCkgPCAwKSBsbyA9IG1pZCArIDE7CiAgICAgICAgICAgIGVsc2UgaGkgPSBtaWQ7CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gbG87CiAgICAgICAgfSwKICAgICAgICByaWdodDogZnVuY3Rpb24oYSwgeCwgbG8sIGhpKSB7CiAgICAgICAgICBpZiAobG8gPT0gbnVsbCkgbG8gPSAwOwogICAgICAgICAgaWYgKGhpID09IG51bGwpIGhpID0gYS5sZW5ndGg7CiAgICAgICAgICB3aGlsZSAobG8gPCBoaSkgewogICAgICAgICAgICB2YXIgbWlkID0gbG8gKyBoaSA+Pj4gMTsKICAgICAgICAgICAgaWYgKGNvbXBhcmUoYVttaWRdLCB4KSA+IDApIGhpID0gbWlkOwogICAgICAgICAgICBlbHNlIGxvID0gbWlkICsgMTsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiBsbzsKICAgICAgICB9CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gYXNjZW5kaW5nQ29tcGFyYXRvciQzKGYpIHsKICAgICAgcmV0dXJuIGZ1bmN0aW9uKGQsIHgpIHsKICAgICAgICByZXR1cm4gYXNjZW5kaW5nJDgoZihkKSwgeCk7CiAgICAgIH07CiAgICB9CgogICAgdmFyIGFzY2VuZGluZ0Jpc2VjdCQzID0gYmlzZWN0b3IkMyhhc2NlbmRpbmckOCk7CgogICAgZnVuY3Rpb24gcmFuZ2UkNChzdGFydCwgc3RvcCwgc3RlcCkgewogICAgICBzdGFydCA9ICtzdGFydCwgc3RvcCA9ICtzdG9wLCBzdGVwID0gKG4gPSBhcmd1bWVudHMubGVuZ3RoKSA8IDIgPyAoc3RvcCA9IHN0YXJ0LCBzdGFydCA9IDAsIDEpIDogbiA8IDMgPyAxIDogK3N0ZXA7CgogICAgICB2YXIgaSA9IC0xLAogICAgICAgICAgbiA9IE1hdGgubWF4KDAsIE1hdGguY2VpbCgoc3RvcCAtIHN0YXJ0KSAvIHN0ZXApKSB8IDAsCiAgICAgICAgICByYW5nZSA9IG5ldyBBcnJheShuKTsKCiAgICAgIHdoaWxlICgrK2kgPCBuKSB7CiAgICAgICAgcmFuZ2VbaV0gPSBzdGFydCArIGkgKiBzdGVwOwogICAgICB9CgogICAgICByZXR1cm4gcmFuZ2U7CiAgICB9CgogICAgZnVuY3Rpb24gbWVyZ2UkMihhcnJheXMpIHsKICAgICAgdmFyIG4gPSBhcnJheXMubGVuZ3RoLAogICAgICAgICAgbSwKICAgICAgICAgIGkgPSAtMSwKICAgICAgICAgIGogPSAwLAogICAgICAgICAgbWVyZ2VkLAogICAgICAgICAgYXJyYXk7CgogICAgICB3aGlsZSAoKytpIDwgbikgaiArPSBhcnJheXNbaV0ubGVuZ3RoOwogICAgICBtZXJnZWQgPSBuZXcgQXJyYXkoaik7CgogICAgICB3aGlsZSAoLS1uID49IDApIHsKICAgICAgICBhcnJheSA9IGFycmF5c1tuXTsKICAgICAgICBtID0gYXJyYXkubGVuZ3RoOwogICAgICAgIHdoaWxlICgtLW0gPj0gMCkgewogICAgICAgICAgbWVyZ2VkWy0tal0gPSBhcnJheVttXTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIHJldHVybiBtZXJnZWQ7CiAgICB9CgogICAgZnVuY3Rpb24gY2xpcCQxKHBvaW50VmlzaWJsZSwgY2xpcExpbmUsIGludGVycG9sYXRlLCBzdGFydCkgewogICAgICByZXR1cm4gZnVuY3Rpb24oc2luaykgewogICAgICAgIHZhciBsaW5lID0gY2xpcExpbmUoc2luayksCiAgICAgICAgICAgIHJpbmdCdWZmZXIgPSBjbGlwQnVmZmVyJDEoKSwKICAgICAgICAgICAgcmluZ1NpbmsgPSBjbGlwTGluZShyaW5nQnVmZmVyKSwKICAgICAgICAgICAgcG9seWdvblN0YXJ0ZWQgPSBmYWxzZSwKICAgICAgICAgICAgcG9seWdvbiwKICAgICAgICAgICAgc2VnbWVudHMsCiAgICAgICAgICAgIHJpbmc7CgogICAgICAgIHZhciBjbGlwID0gewogICAgICAgICAgcG9pbnQ6IHBvaW50LAogICAgICAgICAgbGluZVN0YXJ0OiBsaW5lU3RhcnQsCiAgICAgICAgICBsaW5lRW5kOiBsaW5lRW5kLAogICAgICAgICAgcG9seWdvblN0YXJ0OiBmdW5jdGlvbigpIHsKICAgICAgICAgICAgY2xpcC5wb2ludCA9IHBvaW50UmluZzsKICAgICAgICAgICAgY2xpcC5saW5lU3RhcnQgPSByaW5nU3RhcnQ7CiAgICAgICAgICAgIGNsaXAubGluZUVuZCA9IHJpbmdFbmQ7CiAgICAgICAgICAgIHNlZ21lbnRzID0gW107CiAgICAgICAgICAgIHBvbHlnb24gPSBbXTsKICAgICAgICAgIH0sCiAgICAgICAgICBwb2x5Z29uRW5kOiBmdW5jdGlvbigpIHsKICAgICAgICAgICAgY2xpcC5wb2ludCA9IHBvaW50OwogICAgICAgICAgICBjbGlwLmxpbmVTdGFydCA9IGxpbmVTdGFydDsKICAgICAgICAgICAgY2xpcC5saW5lRW5kID0gbGluZUVuZDsKICAgICAgICAgICAgc2VnbWVudHMgPSBtZXJnZSQyKHNlZ21lbnRzKTsKICAgICAgICAgICAgdmFyIHN0YXJ0SW5zaWRlID0gcG9seWdvbkNvbnRhaW5zJDEocG9seWdvbiwgc3RhcnQpOwogICAgICAgICAgICBpZiAoc2VnbWVudHMubGVuZ3RoKSB7CiAgICAgICAgICAgICAgaWYgKCFwb2x5Z29uU3RhcnRlZCkgc2luay5wb2x5Z29uU3RhcnQoKSwgcG9seWdvblN0YXJ0ZWQgPSB0cnVlOwogICAgICAgICAgICAgIGNsaXBSZWpvaW4kMShzZWdtZW50cywgY29tcGFyZUludGVyc2VjdGlvbiQxLCBzdGFydEluc2lkZSwgaW50ZXJwb2xhdGUsIHNpbmspOwogICAgICAgICAgICB9IGVsc2UgaWYgKHN0YXJ0SW5zaWRlKSB7CiAgICAgICAgICAgICAgaWYgKCFwb2x5Z29uU3RhcnRlZCkgc2luay5wb2x5Z29uU3RhcnQoKSwgcG9seWdvblN0YXJ0ZWQgPSB0cnVlOwogICAgICAgICAgICAgIHNpbmsubGluZVN0YXJ0KCk7CiAgICAgICAgICAgICAgaW50ZXJwb2xhdGUobnVsbCwgbnVsbCwgMSwgc2luayk7CiAgICAgICAgICAgICAgc2luay5saW5lRW5kKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHBvbHlnb25TdGFydGVkKSBzaW5rLnBvbHlnb25FbmQoKSwgcG9seWdvblN0YXJ0ZWQgPSBmYWxzZTsKICAgICAgICAgICAgc2VnbWVudHMgPSBwb2x5Z29uID0gbnVsbDsKICAgICAgICAgIH0sCiAgICAgICAgICBzcGhlcmU6IGZ1bmN0aW9uKCkgewogICAgICAgICAgICBzaW5rLnBvbHlnb25TdGFydCgpOwogICAgICAgICAgICBzaW5rLmxpbmVTdGFydCgpOwogICAgICAgICAgICBpbnRlcnBvbGF0ZShudWxsLCBudWxsLCAxLCBzaW5rKTsKICAgICAgICAgICAgc2luay5saW5lRW5kKCk7CiAgICAgICAgICAgIHNpbmsucG9seWdvbkVuZCgpOwogICAgICAgICAgfQogICAgICAgIH07CgogICAgICAgIGZ1bmN0aW9uIHBvaW50KGxhbWJkYSwgcGhpKSB7CiAgICAgICAgICBpZiAocG9pbnRWaXNpYmxlKGxhbWJkYSwgcGhpKSkgc2luay5wb2ludChsYW1iZGEsIHBoaSk7CiAgICAgICAgfQoKICAgICAgICBmdW5jdGlvbiBwb2ludExpbmUobGFtYmRhLCBwaGkpIHsKICAgICAgICAgIGxpbmUucG9pbnQobGFtYmRhLCBwaGkpOwogICAgICAgIH0KCiAgICAgICAgZnVuY3Rpb24gbGluZVN0YXJ0KCkgewogICAgICAgICAgY2xpcC5wb2ludCA9IHBvaW50TGluZTsKICAgICAgICAgIGxpbmUubGluZVN0YXJ0KCk7CiAgICAgICAgfQoKICAgICAgICBmdW5jdGlvbiBsaW5lRW5kKCkgewogICAgICAgICAgY2xpcC5wb2ludCA9IHBvaW50OwogICAgICAgICAgbGluZS5saW5lRW5kKCk7CiAgICAgICAgfQoKICAgICAgICBmdW5jdGlvbiBwb2ludFJpbmcobGFtYmRhLCBwaGkpIHsKICAgICAgICAgIHJpbmcucHVzaChbbGFtYmRhLCBwaGldKTsKICAgICAgICAgIHJpbmdTaW5rLnBvaW50KGxhbWJkYSwgcGhpKTsKICAgICAgICB9CgogICAgICAgIGZ1bmN0aW9uIHJpbmdTdGFydCgpIHsKICAgICAgICAgIHJpbmdTaW5rLmxpbmVTdGFydCgpOwogICAgICAgICAgcmluZyA9IFtdOwogICAgICAgIH0KCiAgICAgICAgZnVuY3Rpb24gcmluZ0VuZCgpIHsKICAgICAgICAgIHBvaW50UmluZyhyaW5nWzBdWzBdLCByaW5nWzBdWzFdKTsKICAgICAgICAgIHJpbmdTaW5rLmxpbmVFbmQoKTsKCiAgICAgICAgICB2YXIgY2xlYW4gPSByaW5nU2luay5jbGVhbigpLAogICAgICAgICAgICAgIHJpbmdTZWdtZW50cyA9IHJpbmdCdWZmZXIucmVzdWx0KCksCiAgICAgICAgICAgICAgaSwgbiA9IHJpbmdTZWdtZW50cy5sZW5ndGgsIG0sCiAgICAgICAgICAgICAgc2VnbWVudCwKICAgICAgICAgICAgICBwb2ludDsKCiAgICAgICAgICByaW5nLnBvcCgpOwogICAgICAgICAgcG9seWdvbi5wdXNoKHJpbmcpOwogICAgICAgICAgcmluZyA9IG51bGw7CgogICAgICAgICAgaWYgKCFuKSByZXR1cm47CgogICAgICAgICAgLy8gTm8gaW50ZXJzZWN0aW9ucy4KICAgICAgICAgIGlmIChjbGVhbiAmIDEpIHsKICAgICAgICAgICAgc2VnbWVudCA9IHJpbmdTZWdtZW50c1swXTsKICAgICAgICAgICAgaWYgKChtID0gc2VnbWVudC5sZW5ndGggLSAxKSA+IDApIHsKICAgICAgICAgICAgICBpZiAoIXBvbHlnb25TdGFydGVkKSBzaW5rLnBvbHlnb25TdGFydCgpLCBwb2x5Z29uU3RhcnRlZCA9IHRydWU7CiAgICAgICAgICAgICAgc2luay5saW5lU3RhcnQoKTsKICAgICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbTsgKytpKSBzaW5rLnBvaW50KChwb2ludCA9IHNlZ21lbnRbaV0pWzBdLCBwb2ludFsxXSk7CiAgICAgICAgICAgICAgc2luay5saW5lRW5kKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgfQoKICAgICAgICAgIC8vIFJlam9pbiBjb25uZWN0ZWQgc2VnbWVudHMuCiAgICAgICAgICAvLyBUT0RPIHJldXNlIHJpbmdCdWZmZXIucmVqb2luKCk/CiAgICAgICAgICBpZiAobiA+IDEgJiYgY2xlYW4gJiAyKSByaW5nU2VnbWVudHMucHVzaChyaW5nU2VnbWVudHMucG9wKCkuY29uY2F0KHJpbmdTZWdtZW50cy5zaGlmdCgpKSk7CgogICAgICAgICAgc2VnbWVudHMucHVzaChyaW5nU2VnbWVudHMuZmlsdGVyKHZhbGlkU2VnbWVudCQxKSk7CiAgICAgICAgfQoKICAgICAgICByZXR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MgYSBsaW5lIGFuZCBjdXRzIGludG8gdmlzaWJsZSBzZWdtZW50cy4gUmV0dXJuIHZhbHVlcyB1c2VkIGZvciBwb2x5Z29uCiAgICAgIC8vIGNsaXBwaW5nOiAwIC0gdGhlcmUgd2VyZSBpbnRlcnNlY3Rpb25zIG9yIHRoZSBsaW5lIHdhcyBlbXB0eTsgMSAtIG5vCiAgICAgIC8vIGludGVyc2VjdGlvbnMgMiAtIHRoZXJlIHdlcmUgaW50ZXJzZWN0aW9ucywgYW5kIHRoZSBmaXJzdCBhbmQgbGFzdCBzZWdtZW50cwogICAgICAvLyBzaG91bGQgYmUgcmVqb2luZWQuCiAgICAgIGZ1bmN0aW9uIGNsaXBMaW5lKHN0cmVhbSkgewogICAgICAgIHZhciBwb2ludDAsIC8vIHByZXZpb3VzIHBvaW50CiAgICAgICAgICAgIGMwLCAvLyBjb2RlIGZvciBwcmV2aW91cyBwb2ludAogICAgICAgICAgICB2MCwgLy8gdmlzaWJpbGl0eSBvZiBwcmV2aW91cyBwb2ludAogICAgICAgICAgICB2MDAsIC8vIHZpc2liaWxpdHkgb2YgZmlyc3QgcG9pbnQKICAgICAgICAgICAgY2xlYW47IC8vIG5vIGludGVyc2VjdGlvbnMKICAgICAgICByZXR1cm4gewogICAgICAgICAgbGluZVN0YXJ0OiBmdW5jdGlvbigpIHsKICAgICAgICAgICAgdjAwID0gdjAgPSBmYWxzZTsKICAgICAgICAgICAgY2xlYW4gPSAxOwogICAgICAgICAgfSwKICAgICAgICAgIHBvaW50OiBmdW5jdGlvbihsYW1iZGEsIHBoaSkgewogICAgICAgICAgICB2YXIgcG9pbnQxID0gW2xhbWJkYSwgcGhpXSwKICAgICAgICAgICAgICAgIHBvaW50MiwKICAgICAgICAgICAgICAgIHYgPSB2aXNpYmxlKGxhbWJkYSwgcGhpKSwKICAgICAgICAgICAgICAgIGMgPSBzbWFsbFJhZGl1cwogICAgICAgICAgICAgICAgICA/IHYgPyAwIDogY29kZShsYW1iZGEsIHBoaSkKICAgICAgICAgICAgICAgICAgOiB2ID8gY29kZShsYW1iZGEgKyAobGFtYmRhIDwgMCA/IHBpJDggOiAtcGkkOCksIHBoaSkgOiAwOwogICAgICAgICAgICBpZiAoIXBvaW50MCAmJiAodjAwID0gdjAgPSB2KSkgc3RyZWFtLmxpbmVTdGFydCgpOwogICAgICAgICAgICAvLyBIYW5kbGUgZGVnZW5lcmFjaWVzLgogICAgICAgICAgICAvLyBUT0RPIGlnbm9yZSBpZiBub3QgY2xpcHBpbmcgcG9seWdvbnMuCiAgICAgICAgICAgIGlmICh2ICE9PSB2MCkgewogICAgICAgICAgICAgIHBvaW50MiA9IGludGVyc2VjdChwb2ludDAsIHBvaW50MSk7CiAgICAgICAgICAgICAgaWYgKCFwb2ludDIgfHwgcG9pbnRFcXVhbCQxKHBvaW50MCwgcG9pbnQyKSB8fCBwb2ludEVxdWFsJDEocG9pbnQxLCBwb2ludDIpKSB7CiAgICAgICAgICAgICAgICBwb2ludDFbMF0gKz0gZXBzaWxvbiQ3OwogICAgICAgICAgICAgICAgcG9pbnQxWzFdICs9IGVwc2lsb24kNzsKICAgICAgICAgICAgICAgIHYgPSB2aXNpYmxlKHBvaW50MVswXSwgcG9pbnQxWzFdKTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHYgIT09IHYwKSB7CiAgICAgICAgICAgICAgY2xlYW4gPSAwOwogICAgICAgICAgICAgIGlmICh2KSB7CiAgICAgICAgICAgICAgICAvLyBvdXRzaWRlIGdvaW5nIGluCiAgICAgICAgICAgICAgICBzdHJlYW0ubGluZVN0YXJ0KCk7CiAgICAgICAgICAgICAgICBwb2ludDIgPSBpbnRlcnNlY3QocG9pbnQxLCBwb2ludDApOwogICAgICAgICAgICAgICAgc3RyZWFtLnBvaW50KHBvaW50MlswXSwgcG9pbnQyWzFdKTsKICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgLy8gaW5zaWRlIGdvaW5nIG91dAogICAgICAgICAgICAgICAgcG9pbnQyID0gaW50ZXJzZWN0KHBvaW50MCwgcG9pbnQxKTsKICAgICAgICAgICAgICAgIHN0cmVhbS5wb2ludChwb2ludDJbMF0sIHBvaW50MlsxXSk7CiAgICAgICAgICAgICAgICBzdHJlYW0ubGluZUVuZCgpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBwb2ludDAgPSBwb2ludDI7CiAgICAgICAgICAgIH0gZWxzZSBpZiAobm90SGVtaXNwaGVyZSAmJiBwb2ludDAgJiYgc21hbGxSYWRpdXMgXiB2KSB7CiAgICAgICAgICAgICAgdmFyIHQ7CiAgICAgICAgICAgICAgLy8gSWYgdGhlIGNvZGVzIGZvciB0d28gcG9pbnRzIGFyZSBkaWZmZXJlbnQsIG9yIGFyZSBib3RoIHplcm8sCiAgICAgICAgICAgICAgLy8gYW5kIHRoZXJlIHRoaXMgc2VnbWVudCBpbnRlcnNlY3RzIHdpdGggdGhlIHNtYWxsIGNpcmNsZS4KICAgICAgICAgICAgICBpZiAoIShjICYgYzApICYmICh0ID0gaW50ZXJzZWN0KHBvaW50MSwgcG9pbnQwLCB0cnVlKSkpIHsKICAgICAgICAgICAgICAgIGNsZWFuID0gMDsKICAgICAgICAgICAgICAgIGlmIChzbWFsbFJhZGl1cykgewogICAgICAgICAgICAgICAgICBzdHJlYW0ubGluZVN0YXJ0KCk7CiAgICAgICAgICAgICAgICAgIHN0cmVhbS5wb2ludCh0WzBdWzBdLCB0WzBdWzFdKTsKICAgICAgICAgICAgICAgICAgc3RyZWFtLnBvaW50KHRbMV1bMF0sIHRbMV1bMV0pOwogICAgICAgICAgICAgICAgICBzdHJlYW0ubGluZUVuZCgpOwogICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgc3RyZWFtLnBvaW50KHRbMV1bMF0sIHRbMV1bMV0pOwogICAgICAgICAgICAgICAgICBzdHJlYW0ubGluZUVuZCgpOwogICAgICAgICAgICAgICAgICBzdHJlYW0ubGluZVN0YXJ0KCk7CiAgICAgICAgICAgICAgICAgIHN0cmVhbS5wb2ludCh0WzBdWzBdLCB0WzBdWzFdKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHYgJiYgKCFwb2ludDAgfHwgIXBvaW50RXF1YWwkMShwb2ludDAsIHBvaW50MSkpKSB7CiAgICAgICAgICAgICAgc3RyZWFtLnBvaW50KHBvaW50MVswXSwgcG9pbnQxWzFdKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBwb2ludDAgPSBwb2ludDEsIHYwID0gdiwgYzAgPSBjOwogICAgICAgICAgfSwKICAgICAgICAgIGxpbmVFbmQ6IGZ1bmN0aW9uKCkgewogICAgICAgICAgICBpZiAodjApIHN0cmVhbS5saW5lRW5kKCk7CiAgICAgICAgICAgIHBvaW50MCA9IG51bGw7CiAgICAgICAgICB9LAogICAgICAgICAgLy8gUmVqb2luIGZpcnN0IGFuZCBsYXN0IHNlZ21lbnRzIGlmIHRoZXJlIHdlcmUgaW50ZXJzZWN0aW9ucyBhbmQgdGhlIGZpcnN0CiAgICAgICAgICAvLyBhbmQgbGFzdCBwb2ludHMgd2VyZSB2aXNpYmxlLgogICAgICAgICAgY2xlYW46IGZ1bmN0aW9uKCkgewogICAgICAgICAgICByZXR1cm4gY2xlYW4gfCAoKHYwMCAmJiB2MCkgPDwgMSk7CiAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgfQoKICAgICAgLy8gSW50ZXJzZWN0cyB0aGUgZ3JlYXQgY2lyY2xlIGJldHdlZW4gYSBhbmQgYiB3aXRoIHRoZSBjbGlwIGNpcmNsZS4KICAgICAgZnVuY3Rpb24gaW50ZXJzZWN0KGEsIGIsIHR3bykgewogICAgICAgIHZhciBwYSA9IGNhcnRlc2lhbiQxKGEpLAogICAgICAgICAgICBwYiA9IGNhcnRlc2lhbiQxKGIpOwoKICAgICAgICAvLyBXZSBoYXZlIHR3byBwbGFuZ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SkgLSAxKTsKCiAgICAgICAgaWYgKHQyIDwgMCkgcmV0dXJuOwoKICAgICAgICB2YXIgdCA9IHNxcnQkMyh0MiksCiAgICAgICAgICAgIHEgPSBjYXJ0ZXNpYW5TY2FsZSQxKHUsICgtdyAtIHQpIC8gdXUpOwogICAgICAgIGNhcnRlc2lhbkFkZEluUGxhY2UkMShxLCBBKTsKICAgICAgICBxID0gc3BoZXJpY2FsJDEocSk7CgogICAgICAgIGlmICghdHdvKSByZXR1cm4gcTsKCiAgICAgICAgLy8gVHdvIGludGVyc2VjdGlvbiBwb2ludHMuCiAgICAgICAgdmFyIGxhbWJkYTAgPSBhWzBdLAogICAgICAgICAgICBsYW1iZGExID0gYlswXSwKICAgICAgICAgICAgcGhpMCA9IGFbMV0sCiAgICAgICAgICAgIHBoaTEgPSBiWzFdLAogICAgICAgICAgICB6OwoKICAgICAgICBpZiAobGFtYmRhMSA8IGxhbWJkYTApIHogPSBsYW1iZGEwLCBsYW1iZGEwID0gbGFtYmRhMSwgbGFtYmRhMSA9IHo7CgogICAgICAgIHZhciBkZWx0YSA9IGxhbWJkYTEgLSBsYW1iZGEwLAogICAgICAgICAgICBwb2xhciA9IGFicyQyKGRlbHRhIC0gcGkkOCkgPCBlcHNpbG9uJDcsCiAgICAgICAgICAgIG1lcmlkaWFuID0gcG9sYXIgfHwgZGVsdGEgPCBlcHNpbG9uJDc7CgogICAgICAgIGlmICghcG9sYXIgJiYgcGhpMSA8IHBoaTApIHogPSBwaGkwLCBwaGkwID0gcGhpMSwgcGhpMSA9IHo7CgogICAgICAgIC8vIENoZWNrIHRoYXQgdGhlIGZpcnN0IHBvaW50IGlzIGJldHdlZW4gYSBhbmQgYi4KICAgICAgICBpZiAobWVyaWRpYW4KICAgICAgICAgICAgPyBwb2xhcgogICAgICAgICAgICAgID8gcGhpMCArIHBoaTEgPiAwIF4gcVsxXSA8IChhYnMkMihxWzBdIC0gbGFtYmRhMCkgPCBlcHNpbG9uJDcgPyBwaGkwIDogcG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uY3Rpb24gY2xpcExpbmUkMShhLCBiLCB4MCwgeTAsIHgxLCB5MSkgewogICAgICB2YXIgYXggPSBhWzBdLAogICAgICAgICAgYXkgPSBhWzFdLAogICAgICAgICAgYnggPSBiWzBdLAogICAgICAgICAgYnkgPSBiWzFdLAogICAgICAgICAgdDAgPSAwLAogICAgICAgICAgdDEgPSAxLAogICAgICAgICAgZHggPSBieCAtIGF4LAogICAgICAgICAgZHkgPSBieSAtIGF5LAogICAgICAgICAgcjsKCiAgICAgIHIgPSB4MCAtIGF4OwogICAgICBpZiAoIWR4ICYmIHIgPiAwKSByZXR1cm47CiAgICAgIHIgLz0gZHg7CiAgICAgIGlmIChkeCA8IDApIHsKICAgICAgICBpZiAociA8IHQwKSByZXR1cm47CiAgICAgICAgaWYgKHIgPCB0MSkgdDEgPSByOwogICAgICB9IGVsc2UgaWYgKGR4ID4gMCkgewogICAgICAgIGlmIChyID4gdDEpIHJldHVybjsKICAgICAgICBpZiAociA+IHQwKSB0MCA9IHI7CiAgICAgIH0KCiAgICAgIHIgPSB4MSAtIGF4OwogICAgICBpZiAoIWR4ICYmIHIgPCAwKSByZXR1cm47CiAgICAgIHIgLz0gZHg7CiAgICAgIGlmIChkeCA8IDApIHsKICAgICAgICBpZiAociA+IHQxKSByZXR1cm47CiAgICAgICAgaWYgKHIgPiB0MCkgdDAgPSByOwogICAgICB9IGVsc2UgaWYgKGR4ID4gMCkgewogICAgICAgIGlmIChyIDwgdDApIHJldHVybjsKICAgICAgICBpZiAociA8IHQxKSB0MSA9IHI7CiAgICAgIH0KCiAgICAgIHIgPSB5MCAtIGF5OwogICAgICBpZiAoIWR5ICYmIHIgPiAwKSByZXR1cm47CiAgICAgIHIgLz0gZHk7CiAgICAgIGlmIChkeSA8IDApIHsKICAgICAgICBpZiAociA8IHQwKSByZXR1cm47CiAgICAgICAgaWYgKHIgPCB0MSkgdDEgPSByOwogICAgICB9IGVsc2UgaWYgKGR5ID4gMCkgewogICAgICAgIGlmIChyID4gd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SAwLCBhMSA9IDA7CiAgICAgICAgaWYgKGZyb20gPT0gbnVsbAogICAgICAgICAgICB8fCAoYSA9IGNvcm5lcihmcm9tLCBkaXJlY3Rpb24pKSAhPT0gKGExID0gY29ybmVyKHRvLCBkaXJlY3Rpb24pKQogICAgICAgICAgICB8fCBjb21wYXJlUG9pbnQoZnJvbSwgdG8pIDwgMCBeIGRpcmVjdGlvbiA+IDApIHsKICAgICAgICAgIGRvIHN0cmVhbS5wb2ludChhID09PSAwIHx8IGEgPT09IDMgPyB4MCA6IHgxLCBhID4gMSA/IHkxIDogeTApOwogICAgICAgICAgd2hpbGUgKChhID0gKGEgKyBkaXJlY3Rpb24gKyA0KSAlIDQpICE9PSBhMSk7CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgIHN0cmVhbS5wb2ludCh0b1swXSwgdG9bMV0pOwogICAgICAgIH0KICAgICAgfQoKICAgICAgZnVuY3Rpb24gY29ybmVyKHAsIGRpcmVjdGlvbikgewogICAgICAgIHJldHVybiBhYnMkMihwWzBdIC0geDApIDwgZXBzaWxvbiQ3ID8gZGlyZWN0aW9uID4gMCA/IDAgOiAzCiAgICAgICAgICAgIDogYWJzJDIocFswXSAtIHgxKSA8IGVwc2lsb24kNyA/IGRpcmVjdGlvbiA+IDAgPyAyIDogMQogICAgICAgICAgICA6IGFicyQyKHBbMV0gLSB5MCkgPCBlcHNpbG9uJDcgPyBkaXJlY3Rpb24gPiAwID8gMSA6IDAKICAgICAgICAgICAgOiBkaXJlY3Rpb24gPiAwID8gMyA6IDI7IC8vIGFicyhwWzFdIC0geTEpIDwgZXBzaWxvbgogICAgICB9CgogICAgICBmdW5jdGlvbiBjb21wYXJlSW50ZXJzZWN0aW9uKGEsIGIpIHsKICAgICAgICByZXR1cm4gY29tcGFyZVBvaW50KGEueCwgYi54KTsKICAgICAgfQoKICAgICAgZnVuY3Rpb24gY29tcGFyZVBvaW50KGEsIGIpIHsKICAgICAgICB2YXIgY2EgPSBjb3JuZXIoYSwgMSksCiAgICAgICAgICAgIGNiID0gY29ybmVyKGIsIDEpOwogICAgICAgIHJldHVybiBjYSAhPT0gY2IgPyBjYSAtIGNiCiAgICAgICAgICAgIDogY2EgPT09IDAgPyBiWzFdIC0gYVsxXQogICAgICAgICAgICA6IGNhID09PSAxID8gYVswXSAtIGJbMF0KICAgICAgICAgICAgOiBjYSA9PT0gMiA/IGFbMV0gLSBiWzFdCiAgICAgICAgICAgIDogYlswXSAtIGFbMF07CiAgICAgIH0KCiAgICAgIHJldHVybiBmdW5jdGlvbihzdHJlYW0pIHsKICAgICAgICB2YXIgYWN0aXZlU3RyZWFtID0gc3RyZWFtLAogICAgICAgICAgICBidWZmZXJTdHJlYW0gPSBjbGlwQnVmZmVyJDEoKSwKICAgICAgICAgICAgc2VnbWVudHMsCiAgICAgICAgICAgIHBvbHlnb24sCiAgICAgICAgICAgIHJpbmcsCiAgICAgICAgICAgIHhfXywgeV9fLCB2X18sIC8vIGZpcnN0IHBvaW50CiAgICAgICAgICAgIHhfLCB5Xywgdl8sIC8vIHByZXZpb3VzIHBvaW50CiAgICAgICAgICAgIGZpcnN0LAogICAgICAgICAgICBjbGVhbjsKCiAgICAgICAgdmFyIGNsaXBTdHJlYW0gPSB7CiAgICAgICAgICBwb2ludDogcG9pbnQsCiAgICAgICAgICBsaW5lU3RhcnQ6IGxpbmVTdGFydCwKICAgICAgICAgIGxpbmVFbmQ6IGxpbmVFbmQsCiAgICAgICAgICBwb2x5Z29uU3RhcnQ6IHBvbHlnb25TdGFydCwKICAgICAgICAgIHBvbHlnb25FbmQ6IHBvbHlnb25FbmQKICAgICAgICB9OwoKICAgICAgICBmdW5jdGlvbiBwb2ludCh4LCB5KSB7CiAgICAgICAgICBpZiAodmlzaWJsZSh4LCB5KSkgYWN0aXZlU3RyZWFtLnBvaW50KHgsIHkpOwogICAgICAgIH0KCiAgICAgICAgZnVuY3Rpb24gcG9seWdvbkluc2lkZSgpIHsKICAgICAgICAgIHZhciB3aW5kaW5nID0gMDsKCiAgICAgICAgICBmb3IgKHZhciBpID0gMCwgbiA9IHBvbHlnb24ubGVuZ3RoOyBpIDwgbjsgKytpKSB7CiAgICAgICAgICAgIGZvciAodmFyIHJpbmcgPSBwb2x5Z29uW2ldLCBqID0gMSwgbSA9IHJpbmcubGVuZ3RoLCBwb2ludCA9IHJpbmdbMF0sIGEwLCBhMSwgYjAgPSBwb2ludFswXSwgYjEgPSBwb2ludFsxXTsgaiA8IG07ICsraikgewogICAgICAgICAgICAgIGEwID0gYjAsIGExID0gYjEsIHBvaW50ID0gcmluZ1tqXSwgYjAgPSBwb2ludFswXSwgYjEgPSBwb2ludFsxXTsKICAgICAgICAgICAgICBpZiAoYTEgPD0geTEpIHsgaWYgKGIxID4geTEgJiYgKGIwIC0gYTApICogKHkxIC0gYTEpID4gKGIxIC0gYTEpICogKHgwIC0gYTApKSArK3dpbmRpbmc7IH0KICAgICAgICAgICAgICBlbHNlIHsgaWYgKGIxIDw9IHkxICYmIChiMCAtIGEwKSAqICh5MSAtIGExKSA8IChiMSAtIGExKSAqICh4MCAtIGEwKSkgLS13aW5kaW5nOyB9CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KCiAgICAgICAgICByZXR1cm4gd2luZGluZzsKICAgICAgICB9CgogICAgICAgIC8vIEJ1ZmZlciBnZW9tZXRyeSB3aXRoaW4gYSBwb2x5Z29uIGFuZCB0aGVuIGNsaXAgaXQgZW4gbWFzc2UuCiAgICAgICAgZnVuY3Rpb24gcG9seWdvblN0YXJ0KCkgewogICAgICAgICAgYWN0aXZlU3RyZWFtID0gYnVmZmVyU3RyZWFtLCBzZWdtZW50cyA9IFtdLCBwb2x5Z29uID0gW10sIGNsZWFuID0gdHJ1ZTsKICAgICAgICB9CgogICAgICAgIGZ1bmN0aW9uIHBvbHlnb25FbmQoKSB7CiAgICAgICAgICB2YXIgc3RhcnRJbnNpZGUgPSBwb2x5Z29uSW5zaWRlKCksCiAgICAgICAgICAgICAgY2xlYW5JbnNpZGUgPSBjbGVhbiAmJiBzdGFydEluc2lkZSwKICAgICAgICAgICAgICB2aXNpYmxlID0gKHNlZ21lbnRzID0gbWVyZ2UkMihzZWdtZW50cykpLmxlbmd0aDsKICAgICAgICAgIGlmIChjbGVhbkluc2lkZSB8fCB2aXNpYmxlKSB7CiAgICAgICAgICAgIHN0cmVhbS5wb2x5Z29uU3RhcnQoKTsKICAgICAgICAgICAgaWYgKGNsZWFuSW5zaWRlKSB7CiAgICAgICAgICAgICAgc3RyZWFtLmxpbmVTdGFydCgpOwogICAgICAgICAgICAgIGludGVycG9sYXRlKG51bGwsIG51bGwsIDEsIHN0cmVhbSk7CiAgICAgICAgICAgICAgc3RyZWFtLmxpbmVFbmQoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodmlzaWJsZSkgewogICAgICAgICAgICAgIGNsaXBSZWpvaW4kMShzZWdtZW50cywgY29tcGFyZUludGVyc2VjdGlvbiwgc3RhcnRJbnNpZGUsIGludGVycG9sYXRlLCBzdHJlYW0pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHN0cmVhbS5wb2x5Z29uRW5kKCk7CiAgICAgICAgICB9CiAgICAgICAgICBhY3RpdmVTdHJlYW0gPSBzdHJlYW0sIHNlZ21lbnRzID0gcG9seWdvbiA9IHJpbmcgPSBudWxsOwogICAgICAgIH0KCiAgICAgICAgZnVuY3Rpb24gbGluZVN0YXJ0KCkgewogICAgICAgICAgY2xpcFN0cmVhbS5wb2ludCA9IGxpbmVQb2ludDsKICAgICAgICAgIGlmIChwb2x5Z29uKSBwb2x5Z29uLnB1c2gocmluZyA9IFtdKTsKICAgICAgICAgIGZpcnN0ID0gdHJ1ZTsKICAgICAgICAgIHZfID0gZmFsc2U7CiAgICAgICAgICB4XyA9IHlfID0gTmFOOwogICAgICAgIH0KCiAgICAgICAgLy8gVE9ETyByYXRoZXIgdGhhbiBzcGVjaWFsLWNhc2UgcG9seWdvbnMsIHNpbXBseSBoYW5kbGUgdGhlbSBzZXBhcmF0ZWx5LgogICAgICAgIC8vIElkZWFsbHksIGNvaW5jaWRlbnQgaW50ZXJzZWN0aW9uIHBvaW50cyBzaG91bGQgYmUgaml0dGVyZWQgdG8gYXZvaWQKICAgICAgICAvLyBjbGlwcGluZyBpc3N1ZXMuCiAgICAgICAgZnVuY3Rpb24gbGluZUVuZCgpIHsKICAgICAgICAgIGlmIChzZWdtZW50cykgewogICAgICAgICAgICBsaW5lUG9pbnQoeF9fLCB5X18pOwogICAgICAgICAgICBpZiAodl9fICYmIHZfKSBidWZmZXJTdHJlYW0ucmVqb2luKCk7CiAgICAgICAgICAgIHNlZ21lbnRzLnB1c2goYnVmZmVyU3RyZWFtLnJlc3VsdCgpKTsKICAgICAgICAgIH0KICAgICAgICAgIGNsaXBTdHJlYW0ucG9pbnQgPSBwb2ludDsKICAgICAgICAgIGlmICh2XykgYWN0aXZlU3RyZWFtLmxpbmVFbmQoKTsKICAgICAgICB9CgogICAgICAgIGZ1bmN0aW9uIGxpbmVQb2ludCh4LCB5KSB7CiAgICAgICAgICB2YXIgdiA9IHZpc2libGUoeCwgeSk7CiAgICAgICAgICBpZiAocG9seWdvbikgcmluZy5wdXNoKFt4LCB5XSk7CiAgICAgICAgICBpZiAoZmlyc3QpIHsKICAgICAgICAgICAgeF9fID0geCwgeV9fID0geSwgdl9fID0gdjsKICAgICAgICAgICAgZmlyc3QgPSBmYWxzZTsKICAgICAgICAgICAgaWYgKHYpIHsKICAgICAgICAgICAgICBhY3RpdmVTdHJlYW0ubGluZVN0YXJ0KCk7CiAgICAgICAgICAgICAgYWN0aXZlU3RyZWFtLnBvaW50KHgsIHkpOwogICAgICAgICAgICB9CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICBpZiAodiAmJiB2XykgYWN0aXZlU3RyZWFtLnBvaW50KHgsIHkpOwogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICB2YXIgYSA9IFt4XyA9IE1hdGgubWF4KGNsaXBNaW4kMSwgTWF0aC5taW4oY2xpcE1heCQxLCB4XykpLCB5XyA9IE1hdGgubWF4KGNsaXBNaW4kMSwgTWF0aC5taW4oY2xpcE1heCQxLCB5XykpXSwKICAgICAgICAgICAgICAgICAgYiA9IFt4ID0gTWF0aC5tYXgoY2xpcE1pbiQxLCBNYXRoLm1pbihjbGlwTWF4JDEsIHgpKSwgeSA9IE1hdGgubWF4KGNsaXBNaW4kMSwgTWF0aC5taW4oY2xpcE1heCQxLCB5KSldOwogICAgICAgICAgICAgIGlmIChjbGlwTGluZSQxKGEsIGIsIHgwLCB5MCwgeDEsIHkxKSkgewogICAgICAgICAgICAgICAgaWYgKCF2XykgewogICAgICAgICAgICAgICAgICBhY3RpdmVTdHJlYW0ubGluZVN0YXJ0KCk7CiAgICAgICAgICAgICAgICAgIGFjdGl2ZVN0cmVhbS5wb2ludChhWzBdLCBhWzFdKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGFjdGl2ZVN0cmVhbS5wb2ludChiWzBdLCBiWzFdKTsKICAgICAgICAgICAgICAgIGlmICghdikgYWN0aXZlU3RyZWFtLmxpbmVFbmQoKTsKICAgICAgICAgICAgICAgIGNsZWFuID0gZmFsc2U7CiAgICAgICAgICAgICAgfSBlbHNlIGlmICh2KSB7CiAgICAgICAgICAgICAgICBhY3RpdmVTdHJlYW0ubGluZVN0YXJ0KCk7CiAgICAgICAgICAgICAgICBhY3RpdmVTdHJlYW0ucG9pbnQoeCwgeSk7CiAgICAgICAgICAgICAgICBjbGVhbiA9IGZhbHNlOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgICAgeF8gPSB4LCB5XyA9IHksIHZfID0gdjsKICAgICAgICB9CgogICAgICAgIHJldHVybiBjbGlwU3RyZWFtOwogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIGV4dGVudCQzKCkgewogICAgICB2YXIgeDAgPSAwLAogICAgICAgICAgeTAgPSAwLAogICAgICAgICAgeDEgPSA5NjAsCiAgICAgICAgICB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gcG9pbnQpKSByZXR1cm4gdHJ1ZTsKICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgIH0KICAgIH07CgogICAgdmFyIGNvbnRhaW5zR2VvbWV0cnlUeXBlJDEgPSB7CiAgICAgIFNwaGVyZTogZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgIH0sCiAgICAgIFBvaW50OiBmdW5jdGlvbihvYmplY3QsIHBvaW50KSB7CiAgICAgICAgcmV0dXJuIGNvbnRhaW5zUG9pbnQkMShvYmplY3QuY29vcmRpbmF0ZXMsIHBvaW50KTsKICAgICAgfSwKICAgICAgTXVsdGlQb2ludDogZnVuY3Rpb24ob2JqZWN0LCBwb2ludCkgewogICAgICAgIHZhciBjb29yZGluYXRlcyA9IG9iamVjdC5jb29yZGluYXRlcywgaSA9IC0xLCBuID0gY29vcmRpbmF0ZXMubGVuZ3RoOwogICAgICAgIHdoaWxlICgrK2kgPCBuKSBpZiAoY29udGFpbnNQb2ludCQxKGNvb3JkaW5hdGVzW2ldLCBwb2ludCkpIHJldHVybiB0cnVlOwogICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgfSwKICAgICAgTGluZVN0cmluZzogZnVuY3Rpb24ob2JqZWN0LCBwb2ludCkgewogICAgICAgIHJldHVybiBjb250YWluc0xpbmUkMShvYmplY3QuY29vcmRpbmF0ZXMsIHBvaW50KTsKICAgICAgfSwKICAgICAgTXVsdGlMaW5lU3RyaW5nOiBmdW5jdGlvbihvYmplY3QsIHBvaW50KSB7CiAgICAgICAgdmFyIGNvb3JkaW5hdGVzID0gb2JqZWN0LmNvb3JkaW5hdGVzLCBpID0gLTEsIG4gPSBjb29yZGluYXRlcy5sZW5ndGg7CiAgICAgICAgd2hpbGUgKCsraSA8IG4pIGlmIChjb250YWluc0xpbmUkMShjb29yZGluYXRlc1tpXSwgcG9pbnQpKSByZXR1cm4gdHJ1ZTsKICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgIH0sCiAgICAgI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lLmV4dGVudE1ham9yKF8pLmV4dGVudE1pbm9yKF8pOwogICAgICB9OwoKICAgICAgZ3JhdGljdWxlLmV4dGVudE1ham9yID0gZnVuY3Rpb24oXykgewogICAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuIFtbWDAsIFkwXSwgW1gxLCBZMV1dOwogICAgICAgIFgwID0gK19bMF1bMF0sIFgxID0gK19bMV1bMF07CiAgICAgICAgWTAgPSArX1swXVsxXSwgWTEgPSArX1sxXVsxXTsKICAgICAgICBpZiAoWDAgPiBYMSkgXyA9IFgwLCBYMCA9IFgxLCBYMSA9IF87CiAgICAgICAgaWYgKFkwID4gWTEpIF8gPSBZMCwgWTAgPSBZMSwgWTEgPSBfOwogICAgICAgIHJldHVybiBncmF0aWN1bGUucHJlY2lzaW9uKHByZWNpc2lvbik7CiAgICAgIH07CgogICAgICBncmF0aWN1bGUuZXh0ZW50TWlub3IgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSByZXR1cm4gW1t4MCwgeTBdLCBbeDEsIHkxXV07CiAgICAgICAgeDAgPSArX1swXVswXSwgeDEgPSArX1sxXVswXTsKICAgICAgICB5MCA9ICtfWzBdWzFdLCB5MSA9ICtfWzFdWzFdOwogICAgICAgIGlmICh4MCA+IHgxKSBfID0geDAsIHgwID0geDEsIHgxID0gXzsKICAgICAgICBpZiAoeTAgPiB5MSkgXyA9IHkwLCB5MCA9IHkxLCB5MSA9IF87CiAgICAgICAgcmV0dXJuIGdyYXRpY3VsZS5wcmVjaXNpb24ocHJlY2lzaW9uKTsKICAgICAgfTsKCiAgICAgIGdyYXRpY3VsZS5zdGVwID0gZnVuY3Rpb24oXykgewogICAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuIGdyYXRpY3VsZS5zdGVwTWlub3IoKTsKICAgICAgICByZXR1cm4gZ3JhdGljdWxlLnN0ZXBNYWpvcihfKS5zdGVwTWlub3IoXyk7CiAgICAgIH07CgogICAgICBncmF0aWN1bGUuc3RlcE1ham9yID0gZnVuY3Rpb24oXykgewogICAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuIFtEWCwgRFldOwogICAgICAgIERYID0gK19bMF0sIERZID0gK19bMV07CiAgICAgICAgcmV0dXJuIGdyYXRpY3VsZTsKICAgICAgfTsKCiAgICAgIGdyYXRpY3VsZS5zdGVwTWlub3IgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSByZXR1cm4gW2R4LCBkeV07CiAgICAgICAgZHggPSArX1swXSwgZHkgPSArX1sxXTsKICAgICAgICByZXR1cm4gZ3JhdGljdWxlOwogICAgICB9OwoKICAgICAgZ3JhdGljdWxlLnByZWNpc2lvbiA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHJldHVybiBwcmVjaXNpb247CiAgICAgICAgcHJlY2lzaW9uID0gK187CiAgICAgICAgeCA9IGdyYXRpY3VsZVgkMSh5MCwgeTEsIDkwKTsKICAgICAgICB5ID0gZ3JhdGljdWxlWSQxKHgwLCB4MSwgcHJlY2lzaW9uKTsKICAgICAgICBYID0gZ3JhdGljdWxlWCQxKFkwLCBZMSwgOTApOwogICAgICAgIFkgPSBncmF0aWN1bGVZJDEoWDAsIFgxLCBwcmVjaXNpb24pOwogICAgICAgIHJldHVybiBncmF0aWN1bGU7CiAgICAgIH07CgogICAgICByZXR1cm4gZ3JhdGljdWxlCiAgICAgICAgICAuZXh0ZW50TWFqb3IoW1stMTgwLCAtOTAgKyBlcHNpbG9uJDddLCBbMTgwLCA5MCAtIGVwc2lsb24kN11dKQogICAgICAgICAgLmV4dGVudE1pbm9yKFtbLTE4MCwgLTgwIC0gZXBzaWxvbiQ3XSwgWzE4MCwgODAgKyBlcHNpbG9uJDddXSk7CiAgICB9CgogICAgZnVuY3Rpb24gZ3JhdGljdWxlMTAkM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keSAqIGR5KTsKCiAgICAgIFgxJDMgKz0geiAqICh4MCQ4ICsgeCkgLyAyOwogICAgICBZMSQzICs9IHogKiAoeTAkOCArIHkpIC8gMjsKICAgICAgWjEkMyArPSB6OwoKICAgICAgeiA9IHkwJDggKiB4IC0geDAkOCAqIHk7CiAgICAgIFgyJDMgKz0geiAqICh4MCQ4ICsgeCk7CiAgICAgIFkyJDMgKz0geiAqICh5MCQ4ICsgeSk7CiAgICAgIFoyJDMgKz0geiAqIDM7CiAgICAgIGNlbnRyb2lkUG9pbnQkMyh4MCQ4ID0geCwgeTAkOCA9IHkpOwogICAgfQoKICAgIGZ1bmN0aW9uIFBhdGhDb250ZXh0JDEoY29udGV4dCkgewogICAgICB0aGlzLl9jb250ZXh0ID0gY29udGV4dDsKICAgIH0KCiAgICBQYXRoQ29udGV4dCQxLnByb3RvdHlwZSA9IHsKICAgICAgX3JhZGl1czogNC41LAogICAgICBwb2ludFJhZGl1czogZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiB0aGlzLl9yYWRpdXMgPSBfLCB0aGlzOwogICAgICB9LAogICAgICBwb2x5Z29uU3RhcnQ6IGZ1bmN0aW9uKCkgewogICAgICAgIHRoaXMuX2xpbmUgPSAwOwogICAgICB9LAogICAgICBwb2x5Z29uRW5kOiBmdW5jdGlvbigpIHsKICAgICAgICB0aGlzLl9saW5lID0gTmFOOwogICAgICB9LAogICAgICBsaW5lU3RhcnQ6IGZ1bmN0aW9uKCkgewogICAgICAgIHRoaXMuX3BvaW50ID0gMDsKICAgICAgfSwKICAgICAgbGluZUVuZDogZnVuY3Rpb24oKSB7CiAgICAgICAgaWYgKHRoaXMuX2xpbmUgPT09IDApIHRoaXMuX2NvbnRleHQuY2xvc2VQYXRoKCk7CiAgICAgICAgdGhpcy5fcG9pbnQgPSBOYU47CiAgICAgIH0sCiAgICAgIHBvaW50OiBmdW5jdGlvbih4LCB5KSB7CiAgICAgICAgc3dpdGNoICh0aGlzLl9wb2ludCkgewogICAgICAgICAgY2FzZSAwOiB7CiAgICAgICAgICAgIHRoaXMuX2NvbnRleHQubW92ZVRvKHgsIHkpOwogICAgICAgICAgICB0aGlzLl9wb2ludCA9IDE7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgfQogICAgICAgICAgY2FzZSAxOiB7CiAgICAgICAgICAgIHRoaXMuX2NvbnRleHQubGluZVRvKHgsIHkpOwogICAgICAgICAgICBicmVhazsKICAgICAgICAgIH0KICAgICAgICAgIGRlZmF1bHQ6IHsKICAgICAgICAgICAgdGhpcy5fY29udGV4dC5tb3ZlVG8oeCArIHRoaXMuX3JhZGl1cywgeSk7CiAgICAgICAgICAgIHRoaXMuX2NvbnRleHQuYXJjKHgsIHksIHRoaXMuX3JhZGl1cywgMCwgdGF1JDgpOwogICAgICAgICAgICBicmVhazsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0sCiAgICAgIHJlc3VsdDogbm9vcCQ4CiAgICB9OwoKICAgIHZhciBsZW5ndGhTdW0kMyA9IGFkZGVyJDEoKSwKICAgICAgICBsZW5ndGhSaW5nJDEsCiAgICAgICAgeDAwJDUsCiAgICAgICAgeTAwJDUsCiAgICAgICAgeDAkOSwKICAgICAgICB5MCQ5OwoKICAgIHZhciBsZW5ndGhTdHJlYW0kMyA9IHsKICAgICAgcG9pbnQ6IG5vb3AkOCwKICAgICAgbGluZVN0YXJ0OiBmdW5jdGlvbigpIHsKICAgICAgICBsZW5ndGhTdHJlYW0kMy5wb2ludCA9IGxlbmd0aFBvaW50Rmlyc3QkMzsKICAgICAgfSwKICAgICAgbGluZUVuZDogZnVuY3Rpb24oKSB7CiAgICAgICAgaWYgKGxlbmd0aFJpbmckMSkgbGVuZ3RoUG9pbnQkMyh4MDAkNSwgeTAwJDUpOwogICAgICAgIGxlbmd0aFN0cmVhbSQzLnBvaW50ID0gbm9vcCQ4OwogICAgICB9LAogICAgICBwb2x5Z29uU3RhcnQ6IGZ1bmN0aW9uKCkgewogICAgICAgIGxlbmd0aF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AgICAgICB0aGlzLl9saW5lID0gMDsKICAgICAgfSwKICAgICAgcG9seWdvbkVuZDogZnVuY3Rpb24oKSB7CiAgICAgICAgdGhpcy5fbGluZSA9IE5hTjsKICAgICAgfSwKICAgICAgbGluZVN0YXJ0OiBmdW5jdGlvbigpIHsKICAgICAgICB0aGlzLl9wb2ludCA9IDA7CiAgICAgIH0sCiAgICAgIGxpbmVFbmQ6IGZ1bmN0aW9uKCkgewogICAgICAgIGlmICh0aGlzLl9saW5lID09PSAwKSB0aGlzLl9zdHJpbmcucHVzaCgiWiIpOwogICAgICAgIHRoaXMuX3BvaW50ID0gTmFOOwogICAgICB9LAogICAgICBwb2ludDogZnVuY3Rpb24oeCwgeSkgewogICAgICAgIHN3aXRjaCAodGhpcy5fcG9pbnQpIHsKICAgICAgICAgIGNhc2UgMDogewogICAgICAgICAgICB0aGlzLl9zdHJpbmcucHVzaCgiTSIsIHgsICIsIiwgeSk7CiAgICAgICAgICAgIHRoaXMuX3BvaW50ID0gMTsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICB9CiAgICAgICAgICBjYXNlIDE6IHsKICAgICAgICAgICAgdGhpcy5fc3RyaW5nLnB1c2goIkwiLCB4LCAiLCIsIHkpOwogICAgICAgICAgICBicmVhazsKICAgICAgICAgIH0KICAgICAgICAgIGRlZmF1bHQ6IHsKICAgICAgICAgICAgaWYgKHRoaXMuX2NpcmNsZSA9PSBudWxsKSB0aGlzLl9jaXJjbGUgPSBjaXJjbGUkNCh0aGlzLl9yYWRpdXMpOwogICAgICAgICAgICB0aGlzLl9zdHJpbmcucHVzaCgiTSIsIHgsICIsIiwgeSwgdGhpcy5fY2lyY2xlKTsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9LAogICAgICByZXN1bHQ6IGZ1bmN0aW9uKCkgewogICAgICAgIGlmICh0aGlzLl9zdHJpbmcubGVuZ3RoKSB7CiAgICAgICAgICB2YXIgcmVzdWx0ID0gdGhpcy5fc3RyaW5nLmpvaW4oIiIpOwogICAgICAgICAgdGhpcy5fc3RyaW5nID0gW107CiAgICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICB9CiAgICAgIH0KICAgIH07CgogICAgZnVuY3Rpb24gY2lyY2xlJDQocmFkaXVzKSB7CiAgICAgIHJldHVybiAibTAsIiArIHJhZGl1cwogICAgICAgICAgKyAiYSIgKyByYWRpdXMgKyAiLCIgKyByYWRpdXMgKyAiIDAgMSwxIDAsIiArIC0yICogcmFkaXVzCiAgICAgICAgICArICJhIiArIHJhZGl1cyArICIsIiArIHJhZGl1cyArICIgMCAxLDEgMCwiICsgMiAqIHJhZGl1cwogICAgICAgICAgKyAieiI7CiAgICB9CgogICAgZnVuY3Rpb24gaW5kZXgkNShwcm9qZWN0aW9uLCBjb250ZXh0KSB7CiAgICAgIHZhciBwb2ludFJhZGl1cyA9IDQuNSwKICAgICAgICAgIHByb2plY3Rpb25TdHJlYW0sCiAgICAgICAgICBjb250ZXh0U3RyZWFtOwoKICAgICAgZnVuY3Rpb24gcGF0aChvYmplY3QpIHsKICAgICAgICBpZiAob2JqZWN0KSB7CiAgICAgICAgICBpZiAodHlwZW9mIHBvaW50UmFkaXVzID09PSAiZnVuY3Rpb24iKSBjb250ZXh0U3RyZWFtLnBvaW50UmFkaXVzKCtwb2ludFJhZGl1cy5hcHBseSh0aGlzLCBhcmd1bWVudHMpKTsKICAgICAgICAgIGdlb1N0cmVhbSQxKG9iamVjdCwgcHJvamVjdGlvblN0cmVhbShjb250ZXh0U3RyZWFtKSk7CiAgICAgICAgfQogICAgICAgIHJldHVybiBjb250ZXh0U3RyZWFtLnJlc3VsdCgpOwogICAgICB9CgogICAgICBwYXRoLmFyZWEgPSBmdW5jdGlvbihvYmplY3QpIHsKICAgICAgICBnZW9TdHJlYW0kMShvYmplY3QsIHByb2plY3Rpb25TdHJlYW0oYXJlYVN0c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Chjb250ZXh0ID0gbnVsbCwgbmV3IFBhdGhTdHJpbmckMSkgOiBuZXcgUGF0aENvbnRleHQkMShjb250ZXh0ID0gXyk7CiAgICAgICAgaWYgKHR5cGVvZiBwb2ludFJhZGl1cyAhPT0gImZ1bmN0aW9uIikgY29udGV4dFN0cmVhbS5wb2ludFJhZGl1cyhwb2ludFJhZGl1cyk7CiAgICAgICAgcmV0dXJuIHBhdGg7CiAgICAgIH07CgogICAgICBwYXRoLnBvaW50UmFkaXVzID0gZnVuY3Rpb24oXykgewogICAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuIHBvaW50UmFkaXVzOwogICAgICAgIHBvaW50UmFkaXVzID0gdHlwZW9mIF8gPT09ICJmdW5jdGlvbiIgPyBfIDogKGNvbnRleHRTdHJlYW0ucG9pbnRSYWRpdXMoK18pLCArXyk7CiAgICAgICAgcmV0dXJuIHBhdGg7CiAgICAgIH07CgogICAgICByZXR1cm4gcGF0aC5wcm9qZWN0aW9uKHByb2plY3Rpb24pLmNvbnRleHQoY29udGV4dCk7CiAgICB9CgogICAgZnVuY3Rpb24gdHJhbnNmb3JtJDIobWV0aG9kcykgewogICAgICByZXR1cm4gewogICAgICAgIHN0cmVhbTogdHJhbnNmb3JtZXIkNChtZXRob2RzKQogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIHRyYW5zZm9ybWVyJDQobWV0aG9kcykgewogICAgICByZXR1cm4gZnVuY3Rpb24oc3RyZWFtKSB7CiAgICAgICAgdmFyIHMgPSBuZXcgVHJhbnNmb3JtU3RyZWFtJDE7CiAgICAgICAgZm9yICh2YXIga2V5IGluIG1ldGhvZHMpIHNba2V5XSA9IG1ldGhvZHNba2V5XTsKICAgICAgICBzLnN0cmVhbSA9IHN0cmVhbTsKICAgICAgICByZXR1cm4gczsKICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiBUcmFuc2Zvcm1TdHJlYW0kMSgpIHt9CgogICAgVHJhbnNmb3JtU3Ry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XSk7CiAgICAgICAgfQogICAgICB9KTsKICAgIH0KCiAgICBmdW5jdGlvbiByZXNhbXBsZSQzKHByb2plY3QsIGRlbHRhMikgewoKICAgICAgZnVuY3Rpb24gcmVzYW1wbGVMaW5lVG8oeDAsIHkwLCBsYW1iZGEwLCBhMCwgYjAsIGMwLCB4MSwgeTEsIGxhbWJkYTEsIGExLCBiMSwgYzEsIGRlcHRoLCBzdHJlYW0pIHsKICAgICAgICB2YXIgZHggPSB4MSAtIHgwLAogICAgICAgICAgICBkeSA9IHkxIC0geTAsCiAgICAgICAgICAgIGQyID0gZHggKiBkeCArIGR5ICogZHk7CiAgICAgICAgaWYgKGQyID4gNCAqIGRlbHRhMiAmJiBkZXB0aC0tKSB7CiAgICAgICAgICB2YXIgYSA9IGEwICsgYTEsCiAgICAgICAgICAgICAgYiA9IGIwICsgYjEsCiAgICAgICAgICAgICAgYyA9IGMwICsgYzEsCiAgICAgICAgICAgICAgbSA9IHNxcnQkMyhhICogYSArIGIgKiBiICsgYyAqIGMpLAogICAgICAgICAgICAgIHBoaTIgPSBhc2luJDIoYyAvPSBtKSwKICAgICAgICAgICAgICBsYW1iZGEyID0gYWJzJDIoYWJzJDIoYykgLSAxKSA8IGVwc2lsb24kNyB8fCBhYnMkMihsYW1iZGEwIC0gbGFtYmRhMSkgPCBlcHNpbG9uJDcgPyAobGFtYmRhMCArIGxhbWJkYTEpIC8gMiA6IGF0YW4yJDIoYiwgYSksCiAgICAgICAgICAgICAgcCA9IHByb2plY3QobGFtYmRhMiwgcGhpMiksCiAgICAgICAgICAgICAgeDIgPSBwWzBdLAogICAgICAgICAgICAgIHkyID0gcFsxXSwKICAgICAgICAgICAgICBkeDIgPSB4MiAtIHgwLAogICAgICAgICAgICAgIGR5MiA9IHkyIC0geTAsCiAgICAgICAgICAgICAgZHogPSBkeSAqIGR4MiAtIGR4ICogZHkyOwogICAgICAgICAgaWYgKGR6ICogZHogLyBkMiA+IGRlbHRhMiAvLyBwZXJwZW5kaWN1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VybiBmaXRTaXplJDEocHJvamVjdGlvbiwgc2l6ZSwgb2JqZWN0KTsKICAgICAgfTsKCiAgICAgIHByb2plY3Rpb24uZml0V2lkdGggPSBmdW5jdGlvbih3aWR0aCwgb2JqZWN0KSB7CiAgICAgICAgcmV0dXJuIGZpdFdpZHRoJDEocHJvamVjdGlvbiwgd2lkdGgsIG9iamVjdCk7CiAgICAgIH07CgogICAgICBwcm9qZWN0aW9uLmZpdEhlaWdodCA9IGZ1bmN0aW9uKGhlaWdodCwgb2JqZWN0KSB7CiAgICAgICAgcmV0dXJuIGZpdEhlaWdodCQxKHByb2plY3Rpb24sIGhlaWdodCwgb2JqZWN0KTsKICAgICAgfTsKCiAgICAgIGZ1bmN0aW9uIHJlY2VudGVyKCkgewogICAgICAgIHByb2plY3RSb3RhdGUgPSBjb21wb3NlJDEocm90YXRlID0gcm90YXRlUmFkaWFucyQxKGRlbHRhTGFtYmRhLCBkZWx0YVBoaSwgZGVsdGFHYW1tYSksIHByb2plY3QpOwogICAgICAgIHZhciBjZW50ZXIgPSBwcm9qZWN0KGxhbWJkYSwgcGhpKTsKICAgICAgICBkeCA9IHggLSBjZW50ZXJbMF0gKiBrOwogICAgICAgIGR5ID0geSArIGNlbnRlclsxXSAqIGs7CiAgICAgICAgcmV0dXJuIHJlc2V0KCk7CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIHJlc2V0KCkgewogICAgICAgIGNhY2hlID0gY2FjaGVTdHJlYW0gPSBudWxsOwogICAgICAgIHJldHVybiBwcm9qZWN0aW9uOwogICAgICB9CgogICAgICByZXR1cm4gZnVuY3Rpb24oKSB7CiAgICAgICAgcHJvamVjdCA9IHByb2plY3RBdC5hcHBseSh0aGlzLCBhcmd1bWVudHMpOwogICAgICAgIHByb2plY3Rpb24uaW52ZXJ0ID0gcHJvamVjdC5pbnZlcnQgJiYgaW52ZXJ0OwogICAgICAgIHJldHVybiByZWNlbnRlcigpOwogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIGNvbmljUHJvamVjdGlvbiQxKHByb2plY3RBdCkgewogICAgICB2YXIgcGhpMCA9IDAsCiAgICAgICAgICBwaGkxID0gcGkkOCAvIDMsCiAgICAgICAgICBtID0gcHJvamVjdGlvbk11dGF0b3IkMShwcm9qZWN0QXQpLAogICAgICAgICAgcCA9IG0ocGhpMCwgcGhpMSk7CgogICAgICBwLnBhcmFsbGVscyA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IG0ocGhpMCA9IF9bMF0gKiByYWRpYW5zJDEsIHBoaTEgPSBfWzFdICogcmFkaWFucyQxKSA6IFtwaGkwICogZGVncmVlcyQzLCBwaGkxICogZGVncmVlcyQzXTsKICAgICAgfTsKCiAgICAgIHJldHVybiBwOwogICAgfQoKICAgIGZ1bmN0aW9uIGN5bGluZHJpY2FsRXF1YWxBcmVhUmF3JDEocGhpMCkgewogICAgICB2YXIgY29zUGhpMCA9IGNvcyQ0KHBoaTApOwoKICAgICAgZnVuY3Rpb24gZm9yd2FyZChsYW1iZGEsIHBoaSkgewogICAgICAgIHJldHVybiBbbGFtYmRhICogY29zUGhpMCwgc2luJDQocGhpKSAvIGNvc1BoaTBdOwogICAgICB9CgogICAgICBmb3J3YXJkLmludmVydCA9IGZ1bmN0aW9uKHgsIHkpIHsKICAgICAgICByZXR1cm4gW3ggLyBjb3NQaGkwLCBhc2luJDIoeSAqIGNvc1BoaTApXTsKICAgICAgfTsKCiAgICAgIHJldHVybiBmb3J3YXJkOwogICAgfQoKICAgIGZ1bmN0aW9uIGNvbmljRXF1YWxBcmVhUmF3JDEoeTAsIHkxKSB7CiAgICAgIHZhciBzeTAgPSBzaW4kNCh5MCksIG4gPSAoc3kwICsgc2luJDQoeTEpKSAvIDI7CgogICAgICAvLyBBcmUgdGhlIHBhcmFsbGVscyBzeW1tZXRyaWNhbCBhcm91bmQgdGhlIEVxdWF0b3I/CiAgICAgIGlmIChhYnMkMihuKSA8IGVwc2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gkMShhbGJlcnNVc2EsIHdpZHRoLCBvYmplY3QpOwogICAgICB9OwoKICAgICAgYWxiZXJzVXNhLmZpdEhlaWdodCA9IGZ1bmN0aW9uKGhlaWdodCwgb2JqZWN0KSB7CiAgICAgICAgcmV0dXJuIGZpdEhlaWdodCQxKGFsYmVyc1VzYSwgaGVpZ2h0LCBvYmplY3QpOwogICAgICB9OwoKICAgICAgZnVuY3Rpb24gcmVzZXQoKSB7CiAgICAgICAgY2FjaGUgPSBjYWNoZVN0cmVhbSA9IG51bGw7CiAgICAgICAgcmV0dXJuIGFsYmVyc1VzYTsKICAgICAgfQoKICAgICAgcmV0dXJuIGFsYmVyc1VzYS5zY2FsZSgxMDcwKTsKICAgIH0KCiAgICBmdW5jdGlvbiBhemltdXRoYWxSYXckMShzY2FsZSkgewogICAgICByZXR1cm4gZnVuY3Rpb24oeCwgeSkgewogICAgICAgIHZhciBjeCA9IGNvcyQ0KHgpLAogICAgICAgICAgICBjeSA9IGNvcyQ0KHkpLAogICAgICAgICAgICBrID0gc2NhbGUoY3ggKiBjeSk7CiAgICAgICAgcmV0dXJuIFsKICAgICAgICAgIGsgKiBjeSAqIHNpbiQ0KHgpLAogICAgICAgICAgayAqIHNpbiQ0KHkpCiAgICAgICAgXTsKICAgICAgfQogICAgfQoKICAgIGZ1bmN0aW9uIGF6aW11dGhhbEludmVydCQxKGFuZ2xlKSB7CiAgICAgIHJldHVybiBmdW5jdGlvbih4LCB5KSB7CiAgICAgICAgdmFyIHogPSBzcXJ0JDMoeCAqIHggKyB5ICogeSksCiAgICAgICAgICAgIGMgPSBhbmdsZSh6KSwKICAgICAgICAgICAgc2MgPSBzaW4kNChjKSwKICAgICAgICAgICAgY2MgPSBjb3MkNChjKTsKICAgICAgICByZXR1cm4gWwogICAgICAgICAgYXRhbjIkMih4ICogc2MsIHogKiBjYyksCiAgICAgICAgICBhc2luJDIoeiAmJiB5ICogc2MgLyB6KQogICAgICAgIF07CiAgICAgIH0KICAgIH0KCiAgICB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DEsIHkxXV07CiAgICAgICAgfSwKICAgICAgICBzY2FsZTogZnVuY3Rpb24oXykgewogICAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAodHJhbnNmb3JtID0gc2NhbGVUcmFuc2xhdGUkMSgoayA9ICtfKSAqIHN4LCBrICogc3ksIHR4LCB0eSksIHJlc2V0KCkpIDogazsKICAgICAgICB9LAogICAgICAgIHRyYW5zbGF0ZTogZnVuY3Rpb24oXykgewogICAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAodHJhbnNmb3JtID0gc2NhbGVUcmFuc2xhdGUkMShrICogc3gsIGsgKiBzeSwgdHggPSArX1swXSwgdHkgPSArX1sxXSksIHJlc2V0KCkpIDogW3R4LCB0eV07CiAgICAgICAgfSwKICAgICAgICByZWZsZWN0WDogZnVuY3Rpb24oXykgewogICAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAodHJhbnNmb3JtID0gc2NhbGVUcmFuc2xhdGUkMShrICogKHN4ID0gXyA/IC0xIDogMSksIGsgKiBzeSwgdHgsIHR5KSwgcmVzZXQoKSkgOiBzeCA8IDA7CiAgICAgICAgfSwKICAgICAgICByZWZsZWN0WTogZnVuY3Rpb24oXykgewogICAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAodHJhbnNmb3JtID0gc2NhbGVUcmFuc2xhdGUkMShrICogc3gsIGsgKiAoc3kgPSBfID8gLTEgOiAxKSwgdHgsIHR5KSwgcmVzZXQoKSkgOiBzeSA8IDA7CiAgICAgICAgfSwKICAgICAgICBmaXRFeHRlbnQ6IGZ1bmN0aW9uKGV4dGVudCwgb2JqZWN0KSB7CiAgICAgICAgICByZXR1cm4gZml0RXh0ZW50JDEocHJvamVjdGlvbiwgZXh0ZW50LCBvYmplY3QpOwogICAgICAgIH0sCiAgICAgICAgZml0U2l6ZTogZnVuY3Rpb24oc2l6ZSwgb2JqZWN0KSB7CiAgICAgICAgICByZX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9IGNoaWxkcmVuWzBdOwogICAgICByZXR1cm4gbm9kZTsKICAgIH0KCiAgICBmdW5jdGlvbiBsZWFmUmlnaHQkMShub2RlKSB7CiAgICAgIHZhciBjaGlsZHJlbjsKICAgICAgd2hpbGUgKGNoaWxkcmVuID0gbm9kZS5jaGlsZHJlbikgbm9kZSA9IGNoaWxkcmVuW2NoaWxkcmVuLmxlbmd0aCAtIDFdOwogICAgICByZXR1cm4gbm9kZTsKICAgIH0KCiAgICBmdW5jdGlvbiBjbHVzdGVyJDEoKSB7CiAgICAgIHZhciBzZXBhcmF0aW9uID0gZGVmYXVsdFNlcGFyYXRpb24kMiwKICAgICAgICAgIGR4ID0gMSwKICAgICAgICAgIGR5ID0gMSwKICAgICAgICAgIG5vZGVTaXplID0gZmFsc2U7CgogICAgICBmdW5jdGlvbiBjbHVzdGVyKHJvb3QpIHsKICAgICAgICB2YXIgcHJldmlvdXNOb2RlLAogICAgICAgICAgICB4ID0gMDsKCiAgICAgICAgLy8gRmlyc3Qgd2FsaywgY29tcHV0aW5nIHRoZSBpbml0aWFsIHggJiB5IHZhbHVlcy4KICAgICAgICByb290LmVhY2hBZnRlcihmdW5jdGlvbihub2RlKSB7CiAgICAgICAgICB2YXIgY2hpbGRyZW4gPSBub2RlLmNoaWxkcmVuOwogICAgICAgICAgaWYgKGNoaWxkcmVuKSB7CiAgICAgICAgICAgIG5vZGUueCA9IG1lYW5YJDEoY2hpbGRyZW4pOwogICAgICAgICAgICBub2RlLnkgPSBtYXhZJDEoY2hpbGRyZW4pOwogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgbm9kZS54ID0gcHJldmlvdXNOb2RlID8geCArPSBzZXBhcmF0aW9uKG5vZGUsIHByZXZpb3VzTm9kZSkgOiAwOwogICAgICAgICAgICBub2RlLnkgPSAwOwogICAgICAgICAgICBwcmV2aW91c05vZGUgPSBub2RlOwogICAgICAgICAgfQogICAgICAgIH0pOwoKICAgICAgICB2YXIgbGVmdCA9IGxlYWZMZWZ0JDEocm9vdCksCiAgICAgICAgICAgIHJpZ2h0ID0gbGVhZlJpZ2h0JDEocm9vdCksCiAgICAgICAgICAgIHgwID0gbGVmdC54IC0gc2VwYXJhdGlvbihsZWZ0LCByaWdodCkgLyAyLAogICAgICAgICAgICB4MSA9IHJpZ2h0LnggKyBzZXBhcmF0aW9uKHJpZ2h0LCBsZWZ0KSAvIDI7CgogICAgICAgIC8vIFNlY29uZCB3YWxrLCBub3JtYWxpemluZyB4ICYgeSB0byB0aGUgZGVzaXJlZCBzaXplLgogICAgICAgIHJldHVybiByb290LmVhY2hBZnRlcihub2RlU2l6ZSA/IGZ1bmN0aW9uKG5vZGUpIHsKICAgICAgICAgIG5vZGUueCA9IChub2RlLnggLSByb290LngpICogZHg7CiAgICAgICAgICBub2RlLnkgPSAocm9vdC55IC0gbm9kZS55KSAqIGR5OwogICAgICAgIH0gOiBmdW5jdGlvbihub2RlKSB7CiAgICAgICAgICBub2RlLnggPSAobm9kZS54IC0geDApIC8gKHgxIC0geDApICogZHg7CiAgICAgICAgICBub2RlLnkgPSAoMSAtIChyb290LnkgPyBub2RlLnkgLyByb290LnkgOiAxKSkgKiBkeTsKICAgICAgICB9KTsKICAgICAgfQoKICAgICAgY2x1c3Rlci5zZXBhcmF0aW9uID0gZnVuY3Rpb24oeCkgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHNlcGFyYXRpb24gPSB4LCBjbHVzdGVyKSA6IHNlcGFyYXRpb247CiAgICAgIH07CgogICAgICBjbHVzdGVyLnNpemUgPSBmdW5jdGlvbih4KSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAobm9kZVNpemUgPSBmYWxzZSwgZHggPSAreFswXSwgZHkgPSAreFsxXSwgY2x1c3RlcikgOiAobm9kZVNpemUgPyBudWxsIDogW2R4LCBkeV0pOwogICAgICB9OwoKICAgICAgY2x1c3Rlci5ub2RlU2l6ZSA9IGZ1bmN0aW9uKHgpIHs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0aW9uIGxlYXN0Q29tbW9uQW5jZXN0b3IkMShhLCBiKSB7CiAgICAgIGlmIChhID09PSBiKSByZXR1cm4gYTsKICAgICAgdmFyIGFOb2RlcyA9IGEuYW5jZXN0b3JzKCksCiAgICAgICAgICBiTm9kZXMgPSBiLmFuY2VzdG9ycygpLAogICAgICAgICAgYyA9IG51bGw7CiAgICAgIGEgPSBhTm9kZXMucG9wKCk7CiAgICAgIGIgPSBiTm9kZXMucG9wKCk7CiAgICAgIHdoaWxlIChhID09PSBiKSB7CiAgICAgICAgYyA9IGE7CiAgICAgICAgYSA9IGFOb2Rlcy5wb3AoKTsKICAgICAgICBiID0gYk5vZGVzLnBvcCgpOwogICAgICB9CiAgICAgIHJldHVybiBjOwogICAgfQoKICAgIGZ1bmN0aW9uIG5vZGVfYW5jZXN0b3JzJDEoKSB7CiAgICAgIHZhciBub2RlID0gdGhpcywgbm9kZXMgPSBbbm9kZV07CiAgICAgIHdoaWxlIChub2RlID0gbm9kZS5wYXJlbnQpIHsKICAgICAgICBub2Rlcy5wdXNoKG5vZGUpOwogICAgICB9CiAgICAgIHJldHVybiBub2RlczsKICAgIH0KCiAgICBmdW5jdGlvbiBub2RlX2Rlc2NlbmRhbnRzJDEoKSB7CiAgICAgIHZhciBub2RlcyA9IFtdOwogICAgICB0aGlzLmVhY2goZnVuY3Rpb24obm9kZSkgewogICAgICAgIG5vZGVzLnB1c2gobm9kZSk7CiAgICAgIH0pOwogICAgICByZXR1cm4gbm9kZXM7CiAgICB9CgogICAgZnVuY3Rpb24gbm9kZV9sZWF2ZXMkMSgpIHsKICAgICAgdmFyIGxlYXZlcyA9IFtdOwogICAgICB0aGlzLmVhY2hCZWZvcmUoZnVuY3Rpb24obm9kZSkgewogICAgICAgIGlmICghbm9kZS5jaGlsZHJlbikgewogICAgICAgICAgbGVhdmVzLnB1c2gobm9kZSk7CiAgICAgICAgfQogICAgICB9KTsKICAgICAgcmV0dXJuIGxlYXZlczsKICAgIH0KCiAgICBmdW5jdGlvbiBub2RlX2xpbmtzJDEoKSB7CiAgICAgIHZhciByb290ID0gdGhpcywgbGlua3MgPSBbXTsKICAgICAgcm9vdC5lYWNoKGZ1bmN0aW9uKG5vZGUpIHsKICAgICAgICBpZiAobm9kZSAhPT0gcm9vdCkgeyAvLyBEb27igJl0IGluY2x1ZGUgdGhlIHJvb3TigJlzIHBhcmVudCwgaWYgYW55LgogICAgICAgICAgbGlua3MucHVzaCh7c291cmNlOiBub2RlLnBhcmVudCwgdGFyZ2V0OiBub2RlfSk7CiAgICAgICAgfQogICAgICB9KTsKICAgICAgcmV0dXJuIGxpbmtzOwogICAgfQoKICAgIGZ1bmN0aW9uIGhpZXJhcmNoeSQxKGRhdGEsIGNoaWxkcmVuKSB7CiAgICAgIHZhciByb290ID0gbmV3IE5vZGUkMyhkYXRhKSwKICAgICAgICAgIHZhbHVlZCA9ICtkYXRhLnZhbHVlICYmIChyb290LnZhbHVlID0gZGF0YS52YWx1ZSksCiAgICAgICAgICBub2RlLAogICAgICAgICAgbm9kZXMgPSBbcm9vdF0sCiAgICAgICAgICBjaGlsZCwKICAgICAgICAgIGNoaWxkcywKICAgICAgICAgIGksCiAgICAgICAgICBuOwoKICAgICAgaWYgKGNoaWxkcmVuID09IG51bGwpIGNoaWxkcmVuID0gZGVmYXVsdENoaWxkcmVuJDE7CgogICAgICB3aGlsZSAobm9kZSA9IG5vZGVzLnBvcCgpKSB7CiAgICAgICAgaWYgKHZhbHVlZCkgbm9kZS52YWx1ZSA9ICtub2RlLmRhdGEudmFsdWU7CiAgICAgICAgaWYgKChjaGlsZHMgPSBjaGlsZHJlbihub2RlLmRhdGEpKSAmJiAobiA9IGNoaWxkcy5sZW5ndGgpKSB7CiAgICAgICAgICBub2RlLmNoaWxkcmVuID0gbmV3IEFycmF5KG4pOwogICAgICAgICAgZm9yIChpID0gbiAtIDE7IGkgPj0gMDsgLS1pKSB7CiAgICAgICAgICAgIG5vZGVzLnB1c2goY2hpbGQgPSBub2RlLmNoaWx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FzaXMzJDEoQlswXSwgQlsxXSwgQlsyXSk7CiAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiBlbmNsb3NlQmFzaXMxJDEoYSkgewogICAgICByZXR1cm4gewogICAgICAgIHg6IGEueCwKICAgICAgICB5OiBhLnksCiAgICAgICAgcjogYS5yCiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gZW5jbG9zZUJhc2lzMiQxKGEsIGIpIHsKICAgICAgdmFyIHgxID0gYS54LCB5MSA9IGEueSwgcjEgPSBhLnIsCiAgICAgICAgICB4MiA9IGIueCwgeTIgPSBiLnksIHIyID0gYi5yLAogICAgICAgICAgeDIxID0geDIgLSB4MSwgeTIxID0geTIgLSB5MSwgcjIxID0gcjIgLSByMSwKICAgICAgICAgIGwgPSBNYXRoLnNxcnQoeDIxICogeDIxICsgeTIxICogeTIxKTsKICAgICAgcmV0dXJuIHsKICAgICAgICB4OiAoeDEgKyB4MiArIHgyMSAvIGwgKiByMjEpIC8gMiwKICAgICAgICB5OiAoeTEgKyB5MiArIHkyMSAvIGwgKiByMjEpIC8gMiwKICAgICAgICByOiAobCArIHIxICsgcjIpIC8gMgogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIGVuY2xvc2VCYXNpczMkMShhLCBiLCBjKSB7CiAgICAgIHZhciB4MSA9IGEueCwgeTEgPSBhLnksIHIxID0gYS5yLAogICAgICAgICAgeDIgPSBiLngsIHkyID0gYi55LCByMiA9IGIuciwKICAgICAgICAgIHgzID0gYy54LCB5MyA9IGMueSwgcjMgPSBjLnIsCiAgICAgICAgICBhMiA9IHgxIC0geDIsCiAgICAgICAgICBhMyA9IHgxIC0geDMsCiAgICAgICAgICBiMiA9IHkxIC0geTIsCiAgICAgICAgICBiMyA9IHkxIC0geTMsCiAgICAgICAgICBjMiA9IHIyIC0gcjEsCiAgICAgICAgICBjMyA9IHIzIC0gcjEsCiAgICAgICAgICBkMSA9IHgxICogeDEgKyB5MSAqIHkxIC0gcjEgKiByMSwKICAgICAgICAgIGQyID0gZDEgLSB4MiAqIHgyIC0geTIgKiB5MiArIHIyICogcjIsCiAgICAgICAgICBkMyA9IGQxIC0geDMgKiB4MyAtIHkzICogeTMgKyByMyAqIHIzLAogICAgICAgICAgYWIgPSBhMyAqIGIyIC0gYTIgKiBiMywKICAgICAgICAgIHhhID0gKGIyICogZDMgLSBiMyAqIGQyKSAvIChhYiAqIDIpIC0geDEsCiAgICAgICAgICB4YiA9IChiMyAqIGMyIC0gYjIgKiBjMykgLyBhYiwKICAgICAgICAgIHlhID0gKGEzICogZDIgLSBhMiAqIGQzKSAvIChhYiAqIDIpIC0geTEsCiAgICAgICAgICB5YiA9IChhMiAqIGMzIC0gYTMgKiBjMikgLyBhYiwKICAgICAgICAgIEEgPSB4YiAqIHhiICsgeWIgKiB5YiAtIDEsCiAgICAgICAgICBCID0gMiAqIChyMSArIHhhICogeGIgKyB5YSAqIHliKSwKICAgICAgICAgIEMgPSB4YSAqIHhhICsgeWEgKiB5YSAtIHIxICogcjEsCiAgICAgICAgICByID0gLShBID8gKEIgKyBNYXRoLnNxcnQoQiAqIEIgLSA0ICogQSAqIEMpKSAvICgyICogQSkgOiBDIC8gQik7CiAgICAgIHJldHVybiB7CiAgICAgICAgeDogeDEgKyB4YSArIHhiICogciwKICAgICAgICB5OiB5MSArIHlhICsgeWIgKiByLAogICAgICAgIHI6IHIKICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiBwbGFjZSQxKGEsIGIsIGMpIHsKICAgICAgdmFyIGF4ID0gYS54LAogICAgICAgICAgYXkgPSBhLnksCiAgICAgICAgICBkYSA9IGIuciArIGMuciwKICAgICAgICAgIGRiID0gYS5yICsgYy5yLAogICAgICAgICAgZHggPSBiLnggLSBheCwKICAgICAgICAgIGR5ID0gYi55IC0gYXksCiAgICAgICAgICBkYyA9IGR4ICogZHggKyBkeSAqIGR5OwogICAgICBpZiAoZGMpIHsKICAgICAgICB2YXIgeCA9IDAuNSArICgoZGIgKj0gZGIpIC0gKGRhICo9IGRhKSkgLyAoMiAqIGRjKSwKICAgICAgICAgICAgeSA9IE1hdGguc3FydChNYXRoLm1heCgwLCAyICogZGEgKiAoZGIgKyBkYykgLSAoZGIgLT0gZGMpICogZGIgLSBkYSAqIGRhKSkgLyAoMiAqIGRjKTsKICAgICAgICBjLnggPSBheCArIHggKiBkeCArIHkgKiBkeTsKICAgICAgICBjLnkgPSBheSArIHggKiBkeSAtIHkgKiBkeDsKICAgICAgfSBlbHNlIHsKICAgICAgICBjLnggPSBheCArIGRiOwogICAgICAgIGMueSA9IGF5OwogICAgICB9CiAgICB9CgogICAgZnVuY3Rpb24gaW50ZXJzZWN0cyQxKGEsIGIpIHsKICAgICAgdmFyIGR4ID0gYi54IC0gYS54LAogICAgICAgICAgZHkgPSBiLnkgLSBhLnksCiAgICAgICAgICBkciA9IGEuciArIGIucjsKICAgICAgcmV0dXJuIGRyICogZHIgLSAxZS02ID4gZHggKiBkeCArIGR5ICogZHk7CiAgICB9CgogICAgZnVuY3Rpb24gc2NvcmUkMShub2RlKSB7CiAgICAgIHZhciBhID0gbm9kZS5fLAogICAgICAgICAgYiA9IG5vZGUubmV4dC5fLAogICAgICAgICAgYWIgPSBhLnIgKyBiLnIsCiAgICAgICAgICBkeCA9IChhLnggKiBiLnIgKyBiLnggKiBhLnIpIC8gYWIsCiAgICAgICAgICBkeSA9IChhLnkgKiBiLnIgKyBiLnkgKiBhLnIpIC8gYWI7CiAgICAgIHJldHVybiBkeCAqIGR4ICsgZHkgKiBkeTsKICAgIH0KCiAgICBmdW5jdGlvbiBOb2RlJDQoY2lyY2xlKSB7CiAgICAgIHRoaXMuXyA9IGNpcmNsZTsKICAgICAgdGhpcy5uZXh0ID0gbnVsbDsKICAgICAgdGhpcy5wcmV2aW91cyA9IG51bGw7CiAgICB9CgogICAgZnVuY3Rpb24gcGFja0VuY2xvc2UkMShjaXJjbGVzKSB7CiAgICAgIGlmICghKG4gPSBjaXJjbGVzLmxlbmd0aCkpIHJld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AgIC8vIOKAnENsb3NlbmVzc+KAnSBpcyBkZXRlcm1pbmVkIGJ5IGxpbmVhciBkaXN0YW5jZSBhbG9uZyB0aGUgZnJvbnQtY2hhaW4uCiAgICAgICAgLy8g4oCcQWhlYWTigJ0gb3Ig4oCcYmVoaW5k4oCdIGlzIGxpa2V3aXNlIGRldGVybWluZWQgYnkgbGluZWFyIGRpc3RhbmNlLgogICAgICAgIGogPSBiLm5leHQsIGsgPSBhLnByZXZpb3VzLCBzaiA9IGIuXy5yLCBzayA9IGEuXy5yOwogICAgICAgIGRvIHsKICAgICAgICAgIGlmIChzaiA8PSBzaykgewogICAgICAgICAgICBpZiAoaW50ZXJzZWN0cyQxKGouXywgYy5fKSkgewogICAgICAgICAgICAgIGIgPSBqLCBhLm5leHQgPSBiLCBiLnByZXZpb3VzID0gYSwgLS1pOwogICAgICAgICAgICAgIGNvbnRpbnVlIHBhY2s7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgc2ogKz0gai5fLnIsIGogPSBqLm5leHQ7CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICBpZiAoaW50ZXJzZWN0cyQxKGsuXywgYy5fKSkgewogICAgICAgICAgICAgIGEgPSBrLCBhLm5leHQgPSBiLCBiLnByZXZpb3VzID0gYSwgLS1pOwogICAgICAgICAgICAgIGNvbnRpbnVlIHBhY2s7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgc2sgKz0gay5fLnIsIGsgPSBrLnByZXZpb3VzOwogICAgICAgICAgfQogICAgICAgIH0gd2hpbGUgKGogIT09IGsubmV4dCk7CgogICAgICAgIC8vIFN1Y2Nlc3MhIEluc2VydCB0aGUgbmV3IGNpcmNsZSBjIGJldHdlZW4gYSBhbmQgYi4KICAgICAgICBjLnByZXZpb3VzID0gYSwgYy5uZXh0ID0gYiwgYS5uZXh0ID0gYi5wcmV2aW91cyA9IGIgPSBjOwoKICAgICAgICAvLyBDb21wdXRlIHRoZSBuZXcgY2xvc2VzdCBjaXJjbGUgcGF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iAgICB9CgogICAgZnVuY3Rpb24gY29uc3RhbnQkbih4KSB7CiAgICAgIHJldHVybiBmdW5jdGlvbigpIHsKICAgICAgICByZXR1cm4geDsKICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiBkZWZhdWx0UmFkaXVzJDMoZCkgewogICAgICByZXR1cm4gTWF0aC5zcXJ0KGQudmFsdWUpOwogICAgfQoKICAgIGZ1bmN0aW9uIGluZGV4JDYoKSB7CiAgICAgIHZhciByYWRpdXMgPSBudWxsLAogICAgICAgICAgZHggPSAxLAogICAgICAgICAgZHkgPSAxLAogICAgICAgICAgcGFkZGluZyA9IGNvbnN0YW50WmVybyQxOwoKICAgICAgZnVuY3Rpb24gcGFjayhyb290KSB7CiAgICAgICAgcm9vdC54ID0gZHggLyAyLCByb290LnkgPSBkeSAvIDI7CiAgICAgICAgaWYgKHJhZGl1cykgewogICAgICAgICAgcm9vdC5lYWNoQmVmb3JlKHJhZGl1c0xlYWYkMShyYWRpdXMpKQogICAgICAgICAgICAgIC5lYWNoQWZ0ZXIocGFja0NoaWxkcmVuJDEocGFkZGluZywgMC41KSkKICAgICAgICAgICAgICAuZWFjaEJlZm9yZSh0cmFuc2xhdGVDaGlsZCQxKDEpKTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgcm9vdC5lYWNoQmVmb3JlKHJhZGl1c0xlYWYkMShkZWZhdWx0UmFkaXVzJDMpKQogICAgICAgICAgICAgIC5lYWNoQWZ0ZXIocGFja0NoaWxkcmVuJDEoY29uc3RhbnRaZXJvJDEsIDEpKQogICAgICAgICAgICAgIC5lYWNoQWZ0ZXIocGFja0NoaWxkcmVuJDEocGFkZGluZywgcm9vdC5yIC8gTWF0aC5taW4oZHgsIGR5KSkpCiAgICAgICAgICAgICAgLmVhY2hCZWZvcmUodHJhbnNsYXRlQ2hpbGQkMShNYXRoLm1pbihkeCwgZHkpIC8gKDIgKiByb290LnIpKSk7CiAgICAgICAgfQogICAgICAgIHJldHVybiByb290OwogICAgICB9CgogICAgICBwYWNrLnJhZGl1cyA9IGZ1bmN0aW9uKHgpIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChyYWRpdXMgPSBvcHRpb25hbCQxKHgpLCBwYWNrKSA6IHJhZGl1czsKICAgICAgfTsKCiAgICAgIHBhY2suc2l6ZSA9IGZ1bmN0aW9uKHgpIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChkeCA9ICt4WzBdLCBkeSA9ICt4WzFdLCBwYWNrKSA6IFtkeCwgZHldOwogICAgICB9OwoKICAgICAgcGFjay5wYWRkaW5nID0gZnVuY3Rpb24oeCkgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHBhZGRpbmcgPSB0eXBlb2YgeCA9PT0gImZ1bmN0aW9uIiA/IHggOiBjb25zdGFudCRuKCt4KSwgcGFjaykgOiBwYWRkaW5nOwogICAgICB9OwoKICAgICAgcmV0dXJuIHBhY2s7CiAgICB9CgogICAgZnVuY3Rpb24gcmFkaXVzTGVhZiQxKHJhZGl1cykgewogICAgICByZXR1cm4gZnVuY3Rpb24obm9kZSkgewogICAgICAgIGlmICghbm9kZS5jaGlsZHJlbikgewogICAgICAgICAgbm9kZS5yID0gTWF0aC5tYXgoMCwgK3JhZGl1cyhub2RlKSB8fCAwKTsKICAgICAgICB9CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gcGFja0NoaWxkcmVuJDEocGFkZGluZywgaykgewogICAgICByZXR1cm4gZnVuY3Rpb24obm9kZSkgewogICAgICAgIGlmIChjaGlsZHJlbiA9IG5vZGUuY2hpbGRyZW4pIHsKICAgICAgICAgIHZhciBjaGlsZHJlbiwKICAgICAgICAgICAgICBpLAogICAgICAgICAgICAgIG4gPSBjaGlsZHJlbi5sZW5ndGgsCiAgICAgICAgICAgICAgciA9IHBhZGRpbmcobm9kZSkgKiBrIHx8IDAsCiAgICAgICAgICAgICAgZTsKCiAgICAgICAgICBpZiAocikgZm9yIChpID0gMDsgaSA8IG47ICsraSkgY2hpbGRyZW5baV0uciArPSByOwogICAgICAgICAgZSA9IHBhY2tFbmNsb3NlJDEoY2hpbGRyZW4pOwogICAgICAgICAgaWYgKHIpIGZvciAoaSA9IDA7IGkgPCBuOyArK2kpIGNoaWxkcmVuW2ldLnIgLT0gcjsKICAgICAgICAgIG5vZGUuciA9IGUgKyByOwogICAgICAgIH0KICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiB0cmFuc2xhdGVDaGlsZCQxKGspIHsKICAgICAgcmV0dXJuIGZ1bmN0aW9uKG5vZGUpIHsKICAgICAgICB2YXIgcGFyZW50ID0gbm9kZS5wYXJlbnQ7CiAgICAgICAgbm9kZS5yICo9IGs7CiAgICAgICAgaWYgKHBhcmVudCkgewogICAgICAgICAgbm9kZS54ID0gcGFyZW50LnggKyBrICogbm9kZS54OwogICAgICAgICAgbm9kZS55ID0gcGFyZW50LnkgKyBrICogbm9kZS55OwogICAgICAgIH0KICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiByb3VuZE5vZGUkMShub2RlKSB7CiAgICAgIG5vZGUueDAgPSBNYXRoLnJvdW5kKG5vZGUueDApOwogICAgICBub2RlLnkwID0gTWF0aC5yb3VuZChub2RlLnkwKTsKICAgICAgbm9kZS54MSA9IE1hdGgucm91bmQobm9kZS54MSk7CiAgICAgIG5vZGUueTEgPSBNYXRoLnJvdW5kKG5vZGUueTEpOwogICAgfQoKICAgIGZ1bmN0aW9uIHRyZWVtYXBEaWNlJDEocGFyZW50LCB4MCwgeTAsIHgxLCB5MSkgewogICAgICB2YXIgbm9kZXMgPSBwYXJlbnQuY2hpbGRyZW4sCiAgICAgICAgICBub2RlLAogICAgICAgICAgaSA9IC0xLAogICAgICAgICAgbiA9IG5vZGVzLmxlbmd0aCwKICAgICAgICAgIGsgPSBwYXJlbnQudmFsdWUgJiYgKHgxIC0geDApIC8gcGFyZW50LnZhbHVlOwoKICAgICAgd2hpbGUgKCsraSA8IG4pIHsKICAgICAgICBub2RlID0gbm9kZXNbaV0sIG5vZGUueTAgPSB5MCwgbm9kZS55MSA9IHkxOwogICAgICAgIG5vZGUueDAgPSB4MCwgbm9kZS54MSA9IHgwICs9IG5vZGUudmFsdWUgKiBrOwogICAgICB9CiAgICB9CgogICAgZnVuY3Rpb24gcGFydGl0aW9uJDEoKSB7CiAgICAgIHZhciBkeCA9IDEsCiAgICAgICAgICBkeSA9IDEsCiAgICAgICAgICBwYWRkaW5nID0gMCwKICAgICAgICAgIHJvdW5kID0gZmFsc2U7CgogICAgICBmdW5jdGlvbiBwYXJ0aXRpb24ocm9vdCkgewogICAgICAgIHZhciBuID0gcm9vdC5oZWlnaHQgKyAxOwogICAgICAgIHJvb3QueDAgPQogICAgICAgIHJvb3QueTAgPSBwYWRkaW5nOwogICAgICAgIHJvb3QueDEgPSBkeDsKICAgICAgICByb290LnkxID0gZHkgLyBuOwogICAgICAgIHJvb3QuZWFjaEJlZm9yZShwb3NpdGlvbk5vZGUoZHksIG4pKTsKICAgICAgICBpZiAocm91bmQpIHJvb3QuZWFjaEJlZm9yZShyb3VuZE5vZGUkMSk7CiAgICAgICAgcmV0dXJuIHJvb3Q7CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIHBvc2l0aW9uTm9kZShkeSwgbikgewogICAgICAgIHJldHVybiBmdW5jdGlvbihub2RlKSB7CiAgICAgICAgICBpZiAobm9kZS5jaGlsZHJlbikgewogICAgICAgICAgICB0cmVlbWFwRGljZSQxKG5vZGUsIG5vZGUueDAsIGR5ICogKG5vZGUuZGVwdGggKyAxKSAvIG4sIG5vZGUueDEsIGR5ICogKG5vZGUuZGVwdGggKyAyKSAvIG4pOwogICAgICAgICAgfQogICAgICAgICAgdmFyIHgwID0gbm9kZS54MCwKICAgICAgICAgICAgICB5MCA9IG5vZGUueTAsCiAgICAgICAgICAgICAgeDEgPSBub2RlLngxIC0gcGFkZGluZywKICAgICAgICAgICAgICB5MSA9IG5vZGUueTEgLSBwYWRkaW5nOwogICAgICAgICAgaWYgKHgxIDwgeDApIHgwID0geDEgPSAoeDAgKyB4MSkgLyAyOwogICAgICAgICAgaWYgKHkxIDwgeTApIHkwID0geTEgPSAoeTAgKyB5MSkgLyAyOwogICAgICAgICAgbm9kZS54MCA9IHgwOwogICAgICAgICAgbm9kZS55MCA9IHkwOwogICAgICAgICAgbm9kZS54MSA9IHgxOwogICAgICAgICAgbm9kZS55MSA9IHkxOwogICAgICAgIH07CiAgICAgIH0KCiAgICAgIHBhcnRpdGlvbi5yb3VuZCA9IGZ1bmN0aW9uKHgpIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChyb3VuZCA9ICEheCwgcGFydGl0aW9uKSA6IHJvdW5kOwogICAgICB9OwoKICAgICAgcGFydGl0aW9uLnNpemUgPSBmdW5jdGlvbih4KSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoZHggPSAreFswXSwgZHkgPSAreFsxXSwgcGFydGl0aW9uKSA6IFtkeCwgZHldOwogICAgICB9OwoKICAgICAgcGFydGl0aW9uLnBhZGRpbmcgPSBmdW5jdGlvbih4KSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAocGFkZGluZyA9ICt4LCBwYXJ0aXRpb24pIDogcGFkZGluZzsKICAgICAgfTsKCiAgICAgIHJldHVybiBwYXJ0aXRpb247CiAgICB9CgogICAgdmFyIGtleVByZWZpeCQ0ID0gIiQiLCAvLyBQcm90ZWN0IGFnYWluc3Qga2V5cyBsaWtlIOKAnF9fcHJvdG9fX+KAnS4KICAgICAgICBwcmVyb290JDEgPSB7ZGVwdGg6IC0xfSwKICAgICAgICBhbWJpZ3VvdXMkMSA9IHt9OwoKICAgIGZ1bmN0aW9uIGRlZmF1bHRJZCQxKGQpIHsKICAgICAgcmV0dXJuIGQuaWQ7CiAgICB9CgogICAgZnVuY3Rpb24gZGVmYXVsdFBhcmVudElkJDEoZCkgewogICAgICByZXR1cm4gZC5wYXJlbnRJZDsKICAgIH0KCiAgICBmdW5jdGlvbiBzdHJhdGlmeSQxKCkgewogICAgICB2YXIgaWQgPSBkZWZhdWx0SWQkMSwKICAgICAgICAgIHBhcmVudElkID0gZGVmYXVsdFBhcmVudElkJDE7CgogICAgICBmdW5jdGlvbiBzdHJhdGlmeShkYXRhKSB7CiAgICAgICAgdmFyIGQsCiAgICAgICAgICAgIGksCiAgICAgICAgICAgIG4gPSBkYXRhLmxlbmd0aCwKICAgICAgICAgICAgcm9vdCwKICAgICAgICAgICAgcGFyZW50LAogICAgICAgICAgICBub2RlLAogICAgICAgICAgICBub2RlcyA9IG5ldyBBcnJheShuKSwKICAgICAgICAgICAgbm9kZUlkLAogICAgICAgICAgICBub2RlS2V5LAogICAgICAgICAgICBub2RlQnlLZXkgPSB7fTsKCiAgICAgICAgZm9yIChpID0gMDsgaSA8IG47ICsraSkgewogICAgICAgICAgZCA9IGRhdGFbaV0sIG5vZGUgPSBub2Rlc1tpXSA9IG5ldyBOb2RlJDMoZCk7CiAgICAgICAgICBpZiAoKG5vZGVJZCA9IGlkKGQsIGksIGRhdGEpKSAhPSBudWxsICYmIChub2RlSWQgKz0gIiIpKSB7CiAgICAgICAgICAgIG5vZGVLZXkgPSBrZXlQcmVmaXgkNCArIChub2RlLmlkID0gbm9kZUlkKTsKICAgICAgICAgICAgbm9kZUJ5S2V5W25vZGVLZXldID0gbm9kZUtleSBpbiBub2RlQnlLZXkgPyBhbWJpZ3VvdXMkMSA6IG5vZGU7CiAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbjsgKytpKSB7CiAgICAgICAgICBub2RlID0gbm9kZXNbaV0sIG5vZGVJZCA9IHBhcmVudElkKGRhdGFbaV0sIGksIGRhdGEpOwogICAgICAgICAgaWYgKG5vZGVJZCA9PSBudWxsIHx8ICEobm9kZUlkICs9ICIiKSkgewogICAgICAgICAgICBpZiAocm9vdCkgdGhyb3cgbmV3IEVycm9yKCJtdWx0aXBsZSByb290cyIpOwogICAgICAgICAgICByb290ID0gbm9kZTsKICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIHBhcmVudCA9IG5vZGVCeUtleVtrZXlQcmVmaXgkNCArIG5vZGVJZF07CiAgICAgICAgICAgIGlmICghcGFyZW50KSB0aHJvdyBuZXcgRXJyb3IoIm1pc3Npbmc6ICIgKyBub2RlSWQpOwogICAgICAgICAgICBpZiAocGFyZW50ID09PSBhbWJpZ3VvdXMkMSkgdGhyb3cgbmV3IEVycm9yKCJhbWJpZ3VvdXM6ICIgKyBub2RlSWQpOwogICAgICAgICAgICBpZiAocGFyZW50LmNoaWxkcmVuKSBwYXJlbnQuY2hpbGRyZW4ucHVzaChub2RlKTsKICAgICAgICAgICAgZWxzZSBwYXJlbnQuY2hpbGRyZW4gPSBbbm9kZV07CiAgICAgICAgICAgIG5vZGUucGFyZW50ID0gcGFyZW50OwogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgaWYgKCFyb290KSB0aHJvdyBuZXcgRXJyb3IoIm5vIHJvb3QiKTsKICAgICAgICByb290LnBhcmVudCA9IHByZXJvb3QkMTsKICAgICAgICByb290LmVhY2hCZWZvcmUoZnVuY3Rpb24obm9kZSkgeyBub2RlLmRlcHRoID0gbm9kZS5wYXJlbnQuZGVwdGggKyAxOyAtLW47IH0pLmVhY2hCZWZvcmUoY29tcHV0ZUhlaWdodCQxKTsKICAgICAgICByb290LnBhcmVudCA9IG51bGw7CiAgICAgICAgaWYgKG4gPiAwKSB0aHJvdyBuZXcgRXJyb3IoImN5Y2xlIik7CgogICAgICAgIHJldHVybiByb290OwogICAgICB9CgogICAgICBzdHJhdGlmeS5pZCA9IGZ1bmN0aW9uKHgpIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChpZCA9IHJlcXVpcmVkJDEoeCksIHN0cmF0aWZ5KSA6IGlkOwogICAgICB9OwoKICAgICAgc3RyYXRpZn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vbiB0cmVlUm9vdCQxKHJvb3QpIHsKICAgICAgdmFyIHRyZWUgPSBuZXcgVHJlZU5vZGUkMShyb290LCAwKSwKICAgICAgICAgIG5vZGUsCiAgICAgICAgICBub2RlcyA9IFt0cmVlXSwKICAgICAgICAgIGNoaWxkLAogICAgICAgICAgY2hpbGRyZW4sCiAgICAgICAgICBpLAogICAgICAgICAgbjsKCiAgICAgIHdoaWxlIChub2RlID0gbm9kZXMucG9wKCkpIHsKICAgICAgICBpZiAoY2hpbGRyZW4gPSBub2RlLl8uY2hpbGRyZW4pIHsKICAgICAgICAgIG5vZGUuY2hpbGRyZW4gPSBuZXcgQXJyYXkobiA9IGNoaWxkcmVuLmxlbmd0aCk7CiAgICAgICAgICBmb3IgKGkgPSBuIC0gMTsgaSA+PSAwOyAtLWkpIHsKICAgICAgICAgICAgbm9kZXMucHVzaChjaGlsZCA9IG5vZGUuY2hpbGRyZW5baV0gPSBuZXcgVHJlZU5vZGUkMShjaGlsZHJlbltpXSwgaSkpOwogICAgICAgICAgICBjaGlsZC5wYXJlbnQgPSBub2RlOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQoKICAgICAgKHRyZWUucGFyZW50ID0gbmV3IFRyZWVOb2RlJDEobnVsbCwgMCkpLmNoaWxkcmVuID0gW3RyZWVdOwogICAgICByZXR1cm4gdHJlZTsKICAgIH0KCiAgICAvLyBOb2RlLWxpbmsgdHJlZSBkaWFncmFtIHVzaW5nIHRoZSBSZWluZ29sZC1UaWxmb3JkICJ0aWR5IiBhbGdvcml0aG0KICAgIGZ1bmN0aW9uIHRyZWUkMSgpIHsKICAgICAgdmFyIHNlcGFyYXRpb24gPSBkZWZhdWx0U2VwYXJhdGlvbiQzLAogICAgICAgICAgZHggPSAxLAogICAgICAgICAgZHkgPSAxLAogICAgICAgICAgbm9kZVNpemUgPSBudWxsOwoKICAgICAgZnVuY3Rpb24gdHJlZShyb290KSB7CiAgICAgICAgdmFyIHQgPSB0cmVlUm9vdCQxKHJvb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CiAgICAgICAgICAgICAgc2hpZnQ7CiAgICAgICAgICB3aGlsZSAodmltID0gbmV4dFJpZ2h0JDEodmltKSwgdmlwID0gbmV4dExlZnQkMSh2aXApLCB2aW0gJiYgdmlwKSB7CiAgICAgICAgICAgIHZvbSA9IG5leHRMZWZ0JDEodm9tKTsKICAgICAgICAgICAgdm9wID0gbmV4dFJpZ2h0JDEodm9wKTsKICAgICAgICAgICAgdm9wLmEgPSB2OwogICAgICAgICAgICBzaGlmdCA9IHZpbS56ICsgc2ltIC0gdmlwLnogLSBzaXAgKyBzZXBhcmF0aW9uKHZpbS5fLCB2aXAuXyk7CiAgICAgICAgICAgIGlmIChzaGlmdCA+IDApIHsKICAgICAgICAgICAgICBtb3ZlU3VidHJlZSQxKG5leHRBbmNlc3RvciQxKHZpbSwgdiwgYW5jZXN0b3IpLCB2LCBzaGlmdCk7CiAgICAgICAgICAgICAgc2lwICs9IHNoaWZ0OwogICAgICAgICAgICAgIHNvcCArPSBzaGlmdDsKICAgICAgICAgICAgfQogICAgICAgICAgICBzaW0gKz0gdmltLm07CiAgICAgICAgICAgIHNpcCArPSB2aXAubTsKICAgICAgICAgICAgc29tICs9IHZvbS5tOwogICAgICAgICAgICBzb3AgKz0gdm9wLm07CiAgICAgICAgICB9CiAgICAgICAgICBpZiAodmltICYmICFuZXh0UmlnaHQkMSh2b3ApKSB7CiAgICAgICAgICAgIHZvcC50ID0gdmltOwogICAgICAgICAgICB2b3AubSArPSBzaW0gLSBzb3A7CiAgICAgICAgICB9CiAgICAgICAgICBpZiAodmlwICYmICFuZXh0TGVmdCQxKHZvbSkpIHsKICAgICAgICAgICAgdm9tLnQgPSB2aXA7CiAgICAgICAgICAgIHZvbS5tICs9IHNpcCAtIHNvbTsKICAgICAgICAgICAgYW5jZXN0b3IgPSB2OwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gYW5jZXN0b3I7CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIHNpemVOb2RlKG5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m9kZS55MSA9IHkwICs9IG5vZGUudmFsdWUgKiBrOwogICAgICB9CiAgICB9CgogICAgdmFyIHBoaSQxID0gKDEgKyBNYXRoLnNxcnQoNSkpIC8gMjsKCiAgICBmdW5jdGlvbiBzcXVhcmlmeVJhdGlvJDEocmF0aW8sIHBhcmVudCwgeDAsIHkwLCB4MSwgeTEpIHsKICAgICAgdmFyIHJvd3MgPSBbXSwKICAgICAgICAgIG5vZGVzID0gcGFyZW50LmNoaWxkcmVuLAogICAgICAgICAgcm93LAogICAgICAgICAgbm9kZVZhbHVlLAogICAgICAgICAgaTAgPSAwLAogICAgICAgICAgaTEgPSAwLAogICAgICAgICAgbiA9IG5vZGVzLmxlbmd0aCwKICAgICAgICAgIGR4LCBkeSwKICAgICAgICAgIHZhbHVlID0gcGFyZW50LnZhbHVlLAogICAgICAgICAgc3VtVmFsdWUsCiAgICAgICAgICBtaW5WYWx1ZSwKICAgICAgICAgIG1heFZhbHVlLAogICAgICAgICAgbmV3UmF0aW8sCiAgICAgICAgICBtaW5SYXRpbywKICAgICAgICAgIGFscGhhLAogICAgICAgICAgYmV0YTsKCiAgICAgIHdoaWxlIChpMCA8IG4pIHsKICAgICAgICBkeCA9IHgxIC0geDAsIGR5ID0geTEgLSB5MDsKCiAgICAgICAgLy8gRmluZCB0aGUgbmV4dCBub24tZW1wdHkgbm9kZS4KICAgICAgICBkbyBzdW1WYWx1ZSA9IG5vZGVzW2kxKytdLnZhbHVlOyB3aGlsZSAoIXN1bVZhbHVlICYmIGkxIDwgbik7CiAgICAgICAgbWluVmFsdWUgPSBtYXhWYWx1ZSA9IHN1bVZhbHVlOwogICAgICAgIGFscGhhID0gTWF0aC5tYXgoZHkgLyBkeCwgZHggLyBkeSkgLyAodmFsdWUgKiByYXRpbyk7CiAgICAgICAgYmV0YSA9IHN1bVZhbHVlICogc3VtVmFsdWUgKiBhbHBoYTsKICAgICAgICBtaW5SYXRpbyA9IE1hdGgubWF4KG1heFZhbHVlIC8gYmV0YSwg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BkeTsKICAgICAgICByb290LmVhY2hCZWZvcmUocG9zaXRpb25Ob2RlKTsKICAgICAgICBwYWRkaW5nU3RhY2sgPSBbMF07CiAgICAgICAgaWYgKHJvdW5kKSByb290LmVhY2hCZWZvcmUocm91bmROb2RlJDEpOwogICAgICAgIHJldHVybiByb290OwogICAgICB9CgogICAgICBmdW5jdGlvbiBwb3NpdGlvbk5vZGUobm9kZSkgewogICAgICAgIHZhciBwID0gcGFkZGluZ1N0YWNrW25vZGUuZGVwdGhdLAogICAgICAgICAgICB4MCA9IG5vZGUueDAgKyBwLAogICAgICAgICAgICB5MCA9IG5vZGUueTAgKyBwLAogICAgICAgICAgICB4MSA9IG5vZGUueDEgLSBwLAogICAgICAgICAgICB5MSA9IG5vZGUueTEgLSBwOwogICAgICAgIGlmICh4MSA8IHgwKSB4MCA9IHgxID0gKHgwICsgeDEpIC8gMjsKICAgICAgICBpZiAoeTEgPCB5MCkgeTAgPSB5MSA9ICh5MCArIHkxKSAvIDI7CiAgICAgICAgbm9kZS54MCA9IHgwOwogICAgICAgIG5vZGUueTAgPSB5MDsKICAgICAgICBub2RlLngxID0geDE7CiAgICAgICAgbm9kZS55MSA9IHkxOwogICAgICAgIGlmIChub2RlLmNoaWxkcmVuKSB7CiAgICAgICAgICBwID0gcGFkZGluZ1N0YWNrW25vZGUuZGVwdGggKyAxXSA9IHBhZGRpbmdJbm5lcihub2RlKSAvIDI7CiAgICAgICAgICB4MCArPSBwYWRkaW5nTGVmdChub2RlKSAtIHA7CiAgICAgICAgICB5MCArPSBwYWRkaW5nVG9wKG5vZGUpIC0gcDsKICAgICAgICAgIHgxIC09IHBhZGRpbmdSaWdodChub2RlKSAtIHA7CiAgICAgICAgICB5MSAtPSBwYWRkaW5nQm90dG9tKG5vZGUpIC0gcDsKICAgICAgICAgIGlmICh4MSA8IHgwKSB4MCA9IHgxID0gKHgwICsgeDEpIC8gMjsKICAgICAgICAgIGlmICh5MSA8IHkwKSB5MCA9IHkxID0gKHkwICsg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uIGJpbmFyeSQxKHBhcmVudCwgeDAsIHkwLCB4MSwgeTEpIHsKICAgICAgdmFyIG5vZGVzID0gcGFyZW50LmNoaWxkcmVuLAogICAgICAgICAgaSwgbiA9IG5vZGVzLmxlbmd0aCwKICAgICAgICAgIHN1bSwgc3VtcyA9IG5ldyBBcnJheShuICsgMSk7CgogICAgICBmb3IgKHN1bXNbMF0gPSBzdW0gPSBpID0gMDsgaSA8IG47ICsraSkgewogICAgICAgIHN1bXNbaSArIDFdID0gc3VtICs9IG5vZGVzW2ldLnZhbHVlOwogICAgICB9CgogICAgICBwYXJ0aXRpb24oMCwgbiwgcGFyZW50LnZhbHVlLCB4MCwgeTAsIHgxLCB5MSk7CgogICAgICBmdW5jdGlvbiBwYXJ0aXRpb24oaSwgaiwgdmFsdWUsIHgwLCB5MCwgeDEsIHkxKSB7CiAgICAgICAgaWYgKGkgPj0gaiAtIDEpIHsKICAgICAgICAgIHZhciBub2RlID0gbm9kZXNbaV07CiAgICAgICAgICBub2RlLngwID0geDAsIG5vZGUueTAgPSB5MDsKICAgICAgICAgIG5vZGUueDEgPSB4MSwgbm9kZS55MSA9IHkxOwogICAgICAgICAgcmV0dXJuOwogICAgICAgIH0KCiAgICAgICAgdmFyIHZhbHVlT2Zmc2V0ID0gc3Vtc1tpXSwKICAgICAgICAgICAgdmFsdWVUYXJnZXQgPSAodmFsdWUgLyAyKSArIHZhbHVlT2Zmc2V0LAogICAgICAgICAgICBrID0gaSArIDEsCiAgICAgICAgICAgIGhpID0gaiAtIDE7CgogICAgICAgIHdoaWxlIChrIDwgaGkpIHsKICAgICAgICAgIHZhciBtaWQgPSBrICsgaGkgPj4+IDE7CiAgICAgICAgICBpZiAoc3Vtc1ttaWRdIDwgdmFsdWVUYXJnZXQpIGsgPSBtaWQgKyAxOwogICAgICAgICAgZWxzZSBoaSA9IG1pZDsKICAgICAgICB9CgogICAgICAgIGlmICgodmFsdWVUYXJnZXQgLSBzdW1zW2sgLSAxXSkgPCAoc3Vt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gPSBwYXJlbnQuX3NxdWFyaWZ5KSAmJiAocm93cy5yYXRpbyA9PT0gcmF0aW8pKSB7CiAgICAgICAgICB2YXIgcm93cywKICAgICAgICAgICAgICByb3csCiAgICAgICAgICAgICAgbm9kZXMsCiAgICAgICAgICAgICAgaSwKICAgICAgICAgICAgICBqID0gLTEsCiAgICAgICAgICAgICAgbiwKICAgICAgICAgICAgICBtID0gcm93cy5sZW5ndGgsCiAgICAgICAgICAgICAgdmFsdWUgPSBwYXJlbnQudmFsdWU7CgogICAgICAgICAgd2hpbGUgKCsraiA8IG0pIHsKICAgICAgICAgICAgcm93ID0gcm93c1tqXSwgbm9kZXMgPSByb3cuY2hpbGRyZW47CiAgICAgICAgICAgIGZvciAoaSA9IHJvdy52YWx1ZSA9IDAsIG4gPSBub2Rlcy5sZW5ndGg7IGkgPCBuOyArK2kpIHJvdy52YWx1ZSArPSBub2Rlc1tpXS52YWx1ZTsKICAgICAgICAgICAgaWYgKHJvdy5kaWNlKSB0cmVlbWFwRGljZSQxKHJvdywgeDAsIHkwLCB4MSwgeTAgKz0gKHkxIC0geTApICogcm93LnZhbHVlIC8gdmFsdWUpOwogICAgICAgICAgICBlbHNlIHRyZWVtYXBTbGljZSQxKHJvdywgeDAsIHkwLCB4MCArPSAoeDEgLSB4MCkgKiByb3cudmFsdWUgLyB2YWx1ZSwgeTEpOwogICAgICAgICAgICB2YWx1ZSAtPSByb3cudmFsdWU7CiAgICAgICAgICB9CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgIHBhcmVudC5fc3F1YXJpZnkgPSByb3dzID0gc3F1YXJpZnlSYXRpbyQxKHJhdGlvLCBwYXJlbnQsIHgwLCB5MCwgeDEsIHkxKTsKICAgICAgICAgIHJvd3MucmF0aW8gPSByYXRpbzsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIHJlc3F1YXJpZnkucmF0aW8gPSBmdW5jdGlvbih4KSB7CiAgICAgICAgcmV0dXJuIGN1c3RvbSgoeCA9ICt4KSA+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AgICAgaWYgKG8gaW5zdGFuY2VvZiBIc2wkMykgcmV0dXJuIG5ldyBIc2wkMyhvLmgsIG8ucywgby5sLCBvLm9wYWNpdHkpOwogICAgICBpZiAoIShvIGluc3RhbmNlb2YgQ29sb3IkMykpIG8gPSBjb2xvciQzKG8pOwogICAgICBpZiAoIW8pIHJldHVybiBuZXcgSHNsJDM7CiAgICAgIGlmIChvIGluc3RhbmNlb2YgSHNsJDMpIHJldHVybiBvOwogICAgICBvID0gby5yZ2IoKTsKICAgICAgdmFyIHIgPSBvLnIgLyAyNTUsCiAgICAgICAgICBnID0gby5nIC8gMjU1LAogICAgICAgICAgYiA9IG8uYiAvIDI1NSwKICAgICAgICAgIG1pbiA9IE1hdGgubWluKHIsIGcsIGIpLAogICAgICAgICAgbWF4ID0gTWF0aC5tYXgociwgZywgYiksCiAgICAgICAgICBoID0gTmFOLAogICAgICAgICAgcyA9IG1heCAtIG1pbiwKICAgICAgICAgIGwgPSAobWF4ICsgbWluKSAvIDI7CiAgICAgIGlmIChzKSB7CiAgICAgICAgaWYgKHIgPT09IG1heCkgaCA9IChnIC0gYikgLyBzICsgKGcgPCBiKSAqIDY7CiAgICAgICAgZWxzZSBpZiAoZyA9PT0gbWF4KSBoID0gKGIgLSByKSAvIHMgKyAyOwogICAgICAgIGVsc2UgaCA9IChyIC0gZykgLyBzICsgNDsKICAgICAgICBzIC89IGwgPCAwLjUgPyBtYXggKyBtaW4gOiAyIC0gbWF4IC0gbWluOwogICAgICAgIGggKj0gNjA7CiAgICAgIH0gZWxzZSB7CiAgICAgICAgcyA9IGwgPiAwICYmIGwgPCAxID8gMCA6IGg7CiAgICAgIH0KICAgICAgcmV0dXJuIG5ldyBIc2wkMyhoLCBzLCBsLCBvLm9wYWNpdHkpOwogICAgfQoKICAgIGZ1bmN0aW9uIGhzbCQ1KGgsIHMsIGwsIG9wYWNpdHkpIHsKICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPT09IDEgPyBoc2xDb252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MygKICAgICAgICAgIGhzbDJyZ2IkMyhoID49IDI0MCA/IGggLSAyNDAgOiBoICsgMTIwLCBtMSwgbTIpLAogICAgICAgICAgaHNsMnJnYiQzKGgsIG0xLCBtMiksCiAgICAgICAgICBoc2wycmdiJDMoaCA8IDEyMCA/IGggKyAyNDAgOiBoIC0gMTIwLCBtMSwgbTIpLAogICAgICAgICAgdGhpcy5vcGFjaXR5CiAgICAgICAgKTsKICAgICAgfSwKICAgICAgZGlzcGxheWFibGU6IGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiAoMCA8PSB0aGlzLnMgJiYgdGhpcy5zIDw9IDEgfHwgaXNOYU4odGhpcy5zKSkKICAgICAgICAgICAgJiYgKDAgPD0gdGhpcy5sICYmIHRoaXMubCA8PSAxKQogICAgICAgICAgICAmJiAoMCA8PSB0aGlzLm9wYWNpdHkgJiYgdGhpcy5vcGFjaXR5IDw9IDEpOwogICAgICB9LAogICAgICBmb3JtYXRIc2w6IGZ1bmN0aW9uKCkgewogICAgICAgIHZhciBhID0gdGhpcy5vcGFjaXR5OyBhID0gaXNOYU4oYSkgPyAxIDogTWF0aC5tYXgoMCwgTWF0aC5taW4oMSwgYSkpOwogICAgICAgIHJldHVybiAoYSA9PT0gMSA/ICJoc2woIiA6ICJoc2xhKCIpCiAgICAgICAgICAgICsgKHRoaXMuaCB8fCAwKSArICIsICIKICAgICAgICAgICAgKyAodGhpcy5zIHx8IDApICogMTAwICsgIiUsICIKICAgICAgICAgICAgKyAodGhpcy5sIHx8IDApICogMTAwICsgIiUiCiAgICAgICAgICAgICsgKGEgPT09IDEgPyAiKSIgOiAiLCAiICsgYSArICIpIik7CiAgICAgIH0KICAgIH0pKTsKCiAgICAvKiBGcm9tIEZ2RCAxMy4zNywgQ1NTIENvbG9yIE1vZHVsZSBMZXZlbCAzICovCiAgICBmdW5jdGlvbiBoc2wycmdiJDMoaCwgbTEsIG0yKSB7CiAgICAgIHJldHVybiAoaCA8IDYwID8gbTEgKyAobTIgL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09IG51bGwgPyAxIDogb3BhY2l0eSk7CiAgICB9CgogICAgZnVuY3Rpb24gQ3ViZWhlbGl4JDIoaCwgcywgbCwgb3BhY2l0eSkgewogICAgICB0aGlzLmggPSAraDsKICAgICAgdGhpcy5zID0gK3M7CiAgICAgIHRoaXMubCA9ICtsOwogICAgICB0aGlzLm9wYWNpdHkgPSArb3BhY2l0eTsKICAgIH0KCiAgICBkZWZpbmUkMyhDdWJlaGVsaXgkMiwgY3ViZWhlbGl4JDUsIGV4dGVuZCQzKENvbG9yJDMsIHsKICAgICAgYnJpZ2h0ZXI6IGZ1bmN0aW9uKGspIHsKICAgICAgICBrID0gayA9PSBudWxsID8gYnJpZ2h0ZXIkMyA6IE1hdGgucG93KGJyaWdodGVyJDMsIGspOwogICAgICAgIHJldHVybiBuZXcgQ3ViZWhlbGl4JDIodGhpcy5oLCB0aGlzLnMsIHRoaXMubCAqIGssIHRoaXMub3BhY2l0eSk7CiAgICAgIH0sCiAgICAgIGRhcmtlcjogZnVuY3Rpb24oaykgewogICAgICAgIGsgPSBrID09IG51bGwgPyBkYXJrZXIkMyA6IE1hdGgucG93KGRhcmtlciQzLCBrKTsKICAgICAgICByZXR1cm4gbmV3IEN1YmVoZWxpeCQyKHRoaXMuaCwgdGhpcy5zLCB0aGlzLmwgKiBrLCB0aGlzLm9wYWNpdHkpOwogICAgICB9LAogICAgICByZ2I6IGZ1bmN0aW9uKCkgewogICAgICAgIHZhciBoID0gaXNOYU4odGhpcy5oKSA/IDAgOiAodGhpcy5oICsgMTIwKSAqIGRlZzJyYWQkMiwKICAgICAgICAgICAgbCA9ICt0aGlzLmwsCiAgICAgICAgICAgIGEgPSBpc05hTih0aGlzLnMpID8gMCA6IHRoaXMucyAqIGwgKiAoMSAtIGwpLAogICAgICAgICAgICBjb3NoID0gTWF0aC5jb3MoaCksCiAgICAgICAgICAgIHNpbmggPSBNYXRoLnNpbihoKTsKICAgICAgICByZXR1cm4gbmV3IFJnYiQzKAogICAgICAgICAgMjU1ICogKGwgKyBhICogKEEkMiAqIGNvc2ggKyBCJDIgKiBzaW5oKSksCiAgICAgICAgICAyNTUgKiAobCArIGEgKiAoQyQyICogY29zaCArIEQkMiAqIHNpbmgpKSwKICAgICAgICAgIDI1NSAqIChsICsgYSAqIChFJDIgKiBjb3NoKSksCiAgICAgICAgICB0aGlzLm9wYWNpdHkKICAgICAgICApOwogICAgICB9CiAgICB9KSk7CgogICAgZnVuY3Rpb24gYmFzaXMkMyh0MSwgdjAsIHYxLCB2MiwgdjMpIHsKICAgICAgdmFyIHQyID0gdDEgKiB0MSwgdDMgPSB0MiAqIHQxOwogICAgICByZXR1cm4gKCgxIC0gMyAqIHQxICsgMyAqIHQyIC0gdDMpICogdjAKICAgICAgICAgICsgKDQgLSA2ICogdDIgKyAzICogdDMpICogdjEKICAgICAgICAgICsgKDEgKyAzICogdDEgKyAzICogdDIgLSAzICogdDMpICogdjIKICAgICAgICAgICsgdDMgKiB2MykgLyA2OwogICAgfQoKICAgIGZ1bmN0aW9uIGJhc2lzJDQodmFsdWVzKSB7CiAgICAgIHZhciBuID0gdmFsdWVzLmxlbmd0aCAtIDE7CiAgICAgIHJldHVybiBmdW5jdGlvbih0KSB7CiAgICAgICAgdmFyIGkgPSB0IDw9IDAgPyAodCA9IDApIDogdCA+PSAxID8gKHQgPSAxLCBuIC0gMSkgOiBNYXRoLmZsb29yKHQgKiBuKSwKICAgICAgICAgICAgdjEgPSB2YWx1ZXNbaV0sCiAgICAgICAgICAgIHYyID0gdmFsdWVzW2kgKyAxXSwKICAgICAgICAgICAgdjAgPSBpID4gMCA/IHZhbHVlc1tpIC0gMV0gOiAyICogdjEgLSB2MiwKICAgICAgICAgICAgdjMgPSBpIDwgbiAtIDEgPyB2YWx1ZXNbaSArIDJdIDogMiAqIHYyIC0gdjE7CiAgICAgICAgcmV0dXJuIGJhc2lzJDMoKHQgLSBpIC8gbikgKiBuLCB2MCwgdjEsIHYyLCB2Myk7CiAgICAgIH07CiAgICB9CgogICA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OwogICAgICAgICAgcmV0dXJuIHN0YXJ0ICsgIiI7CiAgICAgICAgfTsKICAgICAgfQoKICAgICAgcmdiLmdhbW1hID0gcmdiR2FtbWE7CgogICAgICByZXR1cm4gcmdiOwogICAgfSkoMSk7CgogICAgZnVuY3Rpb24gcmdiU3BsaW5lJDEoc3BsaW5lKSB7CiAgICAgIHJldHVybiBmdW5jdGlvbihjb2xvcnMpIHsKICAgICAgICB2YXIgbiA9IGNvbG9ycy5sZW5ndGgsCiAgICAgICAgICAgIHIgPSBuZXcgQXJyYXkobiksCiAgICAgICAgICAgIGcgPSBuZXcgQXJyYXkobiksCiAgICAgICAgICAgIGIgPSBuZXcgQXJyYXkobiksCiAgICAgICAgICAgIGksIGNvbG9yOwogICAgICAgIGZvciAoaSA9IDA7IGkgPCBuOyArK2kpIHsKICAgICAgICAgIGNvbG9yID0gcmdiJDMoY29sb3JzW2ldKTsKICAgICAgICAgIHJbaV0gPSBjb2xvci5yIHx8IDA7CiAgICAgICAgICBnW2ldID0gY29sb3IuZyB8fCAwOwogICAgICAgICAgYltpXSA9IGNvbG9yLmIgfHwgMDsKICAgICAgICB9CiAgICAgICAgciA9IHNwbGluZShyKTsKICAgICAgICBnID0gc3BsaW5lKGcpOwogICAgICAgIGIgPSBzcGxpbmUoYik7CiAgICAgICAgY29sb3Iub3BhY2l0eSA9IDE7CiAgICAgICAgcmV0dXJuIGZ1bmN0aW9uKHQpIHsKICAgICAgICAgIGNvbG9yLnIgPSByKHQpOwogICAgICAgICAgY29sb3IuZyA9IGcodCk7CiAgICAgICAgICBjb2xvci5iID0gYih0KTsKICAgICAgICAgIHJldHVybiBjb2xvciArICIiOwogICAgICAgIH07CiAgICAgIH07CiAgICB9CgogICAgdmFyIHJnYkJhc2lzJDEgPSByZ2JTcGxpbmUkMShiYXNpcyQ0KTsKICAgIHZhciByZ2JCYXNpc0Nsb3NlZCQxID0gcmdiU3BsaW5lJDEoYmFzaXNDbG9zZWQkMik7CgogICAgZnVuY3Rpb24gYXJyYXkkNShhLCBiKSB7CiAgICAgIHZhciBuYiA9IGIgPyBiLmxlbmd0aCA6IDAsCiAgICAgICAgICBuYSA9IGEgPyBNYXRoLm1pbihuYiwgYS5sZW5ndGgpIDogMCwKICAgICAgICAgIHggPSBuZXcgQXJyYXkobmEpLAogICAgICAgICAgYyA9IG5ldyBBcnJheShuYiksCiAgICAgICAgICBpOwoKICAgICAgZm9yIChpID0gMDsgaSA8IG5hOyArK2kpIHhbaV0gPSB2YWx1ZShhW2ldLCBiW2ldKTsKICAgICAgZm9yICg7IGkgPCBuYjsgKytpKSBjW2ldID0gYltpXTsKCiAgICAgIHJldHVybiBmdW5jdGlvbih0KSB7CiAgICAgICAgZm9yIChpID0gMDsgaSA8IG5hOyArK2kpIGNbaV0gPSB4W2ldKHQpOwogICAgICAgIHJldHVybiBjOwogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIGRhdGUkMyhhLCBiKSB7CiAgICAgIHZhciBkID0gbmV3IERhdGU7CiAgICAgIHJldHVybiBhID0gK2EsIGIgLT0gYSwgZnVuY3Rpb24odCkgewogICAgICAgIHJldHVybiBkLnNldFRpbWUoYSArIGIgKiB0KSwgZDsKICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiBudW1iZXIkNihhLCBiKSB7CiAgICAgIHJldHVybiBhID0gK2EsIGIgLT0gYSwgZnVuY3Rpb24odCkgewogICAgICAgIHJldHVybiBhICsgYiAqIHQ7CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gb2JqZWN0JDQoYSwgYikgewogICAgICB2YXIgaSA9IHt9LAogICAgICAgICAgYyA9IHt9LAogICAgICAgICAgazsKCiAgICAgIGlmIChhID09PSBudWxsIHx8IHR5cGVvZiBhICE9PSAib2JqZWN0IikgYSA9IHt9OwogICAgICBpZiAoYiA9PT0gbnVsbCB8fCB0eXBlb2YgYiAhPT0gIm9iamVjdCIpIGIgPSB7fTsKCiAgICAgIGZvciAoayBpbiBiKSB7CiAgICAgICAgaWYgKGsgaW4gYSkgewogICAgICAgICAgaVtrXSA9IHZhbHVlKGFba10sIGJba10pOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICBjW2tdID0gYltrXTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIHJldHVybiBmdW5jdGlvbih0KSB7CiAgICAgICAgZm9yIChrIGluIGkpIGNba10gPSBpW2tdKHQpOwogICAgICAgIHJldHVybiBjOwogICAgICB9OwogICAgfQoKICAgIHZhciByZUEkMiA9IC9bLStdPyg/OlxkK1wuP1xkKnxcLj9cZCspKD86W2VFXVstK10/XGQrKT8vZywKICAgICAgICByZUIkMiA9IG5ldyBSZWdFeHAocmVBJDIuc291cmNlLCAiZyIpOwoKICAgIGZ1bmN0aW9uIHplcm8kMihiKSB7CiAgICAgIHJldHVybiBmdW5jdGlvbigpIHsKICAgICAgICByZXR1cm4gYjsKICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiBvbmUkMihiKSB7CiAgICAgIHJldHVybiBmdW5jdGlvbih0KSB7CiAgICAgICAgcmV0dXJuIGIodCkgKyAiIjsKICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiBzdHJpbmcoYSwgYikgewogICAgICB2YXIgYmkgPSByZUEkMi5sYXN0SW5kZXggPSByZUIkMi5sYXN0SW5kZXggPSAwLCAvLyBzY2FuIGluZGV4IGZvciBuZXh0IG51bWJlciBpbiBiCiAgICAgICAgICBhbSwgLy8gY3VycmVudCBtYXRjaCBpbiBhCiAgICAgICAgICBibSwgLy8gY3VycmVudCBtYXRjaCBpbiBiCiAgICAgICAgICBicywgLy8gc3RyaW5nIHByZWNlZGluZyBjdXJyZW50IG51bWJlciBpbiBiLCBpZiBhbnkKICAgICAgICAgIGkgPSAtMSwgLy8gaW5kZXggaW4gcwogICAgICAgICAgcyA9IFtdLCAvLyBzdHJpbmcgY29uc3RhbnRzIGFuZCBwbGFjZWhvbGRlcnMKICAgICAgICAgIHEgPSBbXTsgLy8gbnVtYmVyIGludGVycG9sYXRvcnMKCiAgICAgIC8vIENvZXJjZSBpbnB1dHMgdG8gc3RyaW5ncy4KICAgICAgYSA9IGEgKyAiIiwgYiA9IGIgKyAiIjsKCiAgICAgIC8vIEludGVycG9sYXRlIHBhaXJzIG9mIG51bWJlcnMgaW4gYSAmIGIuCiAgICAgIHdoaWxlICgoYW0gPSByZUEkMi5leGVjKGEpKQogICAgICAgICAgJiYgKGJtID0gcmVCJDIuZXhlYyhiKSkpIHsKICAgICAgICBpZiAoKGJzID0gYm0uaW5kZXgpID4gYmkpIHsgLy8gYSBzdHJpbmcgcHJlY2VkZXMgdGhlIG5leHQgbnVtYmVyIGluIGIKICAgICAgICAgIGJzID0gYi5zbGljZShiaSwgYnMpOwogICAgICAgICAgaWYgKHNbaV0pIHNbaV0gKz0gYnM7IC8vIGNvYWxlc2NlIHdpdGggcHJldmlvdXMgc3RyaW5nCiAgICAgICAgICBlbHNlIHNbKytpXSA9IGJzOwogICAgICAgIH0KICAgICAgICBpZiAoKGFtID0gYW1bMF0pID09PSAoYm0gPSBibVswXSkpIHsgLy8gbnVtYmVycyBpbiBhICYgYiBtYXRjaAogICAgICAgICAgaWYgKHNbaV0pIHNbaV0gKz0gYm07IC8vIGNvYWxlc2NlIHdpdGggcHJldmlvdXMgc3RyaW5nCiAgICAgICAgICBlbHNlIHNbKytpXSA9IGJtOwogICAgICAgIH0gZWxzZSB7IC8vIGludGVycG9sYXRlIG5vbi1tYXRjaGluZyBudW1iZXJzCiAgICAgICAgICBzWysraV0gPSBudWxsOwogICAgICAgICAgcS5wdXNoKHtpOiBpLCB4OiBudW1iZXIkNihhbSwgYm0pfSk7CiAgICAgICAgfQogICAgICAgIGJpID0gcmVCJDIubGFzdEluZGV4OwogICAgICB9CgogICAgICAvLyBBZGQgcmVtYWlucyBvZiBiLgogICAgICBpZiAoYmkgPCBiLmxlbmd0aCkgewogICAgICAgIGJzID0gYi5zbGljZShiaSk7CiAgICAgICAgaWYgKHNbaV0pIHNbaV0gKz0gYnM7IC8vIGNvYWxlc2NlIHdpdGggcHJldmlvdXMgc3RyaW5nCiAgICAgICAgZWxzZSBzWysraV0gPSBiczsKICAgICAgfQoKICAgICAgLy8gU3BlY2lhbCBvcHRpbWl6YXRpb24gZm9yIG9ubHkgYSBzaW5nbGUgbWF0Y2guCiAgICAgIC8vIE90aGVyd2lzZSwgaW50ZXJwb2xhdGUgZWFjaCBvZiB0aGUgbnVtYmVycyBhbmQgcmVqb2luIHRoZSBzdHJpbmcuCiAgICAgIHJldHVybiBzLmxlbmd0aCA8IDIgPyAocVswXQogICAgICAgICAgPyBvbmUkMihxWzBdLngpCiAgICAgICAgICA6IHplcm8kMihiKSkKICAgICAgICAgIDogKGIgPSBxLmxlbmd0aCwgZnVuY3Rpb24odCkgewogICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwLCBvOyBpIDwgYjsgKytpKSBzWyhvID0gcVtpXSkuaV0gPSBvLngodCk7CiAgICAgICAgICAgICAgcmV0dXJuIHMuam9pbigiIik7CiAgICAgICAgICAgIH0pOwogICAgfQoKICAgIGZ1bmN0aW9uIHZhbHVlKGEsIGIpIHsKICAgICAgdmFyIHQgPSB0eXBlb2YgYiwgYzsKICAgICAgcmV0dXJuIGIgPT0gbnVsbCB8fCB0ID09PSAiYm9vbGVhbiIgPyBjb25zdGFudCRvKGIpCiAgICAgICAgICA6ICh0ID09PSAibnVtYmVyIiA/IG51bWJlciQ2CiAgICAgICAgICA6IHQgPT09ICJzdHJpbmciID8gKChjID0gY29sb3IkMyhiKSkgPyAoYiA9IGMsIHJnYiQ0KSA6IHN0cmluZykKICAgICAgICAgIDogYiBpbnN0YW5jZW9mIGNvbG9yJDMgPyByZ2IkNAogICAgICAgICAgOiBiIGluc3RhbmNlb2YgRGF0ZSA/IGRhdGUkMwogICAgICAgICAgOiBBcnJheS5pc0FycmF5KGIpID8gYXJyYXkkNQogICAgICAgICAgOiB0eXBlb2YgYi52YWx1ZU9mICE9PSAiZnVuY3Rpb24iICYmIH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il9LCB7aTogaSAtIDIsIHg6IG51bWJlciQ2KHlhLCB5Yil9KTsKICAgICAgICB9IGVsc2UgaWYgKHhiICE9PSAxIHx8IHliICE9PSAxKSB7CiAgICAgICAgICBzLnB1c2gocG9wKHMpICsgInNjYWxlKCIgKyB4YiArICIsIiArIHliICsgIikiKTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIHJldHVybiBmdW5jdGlvbihhLCBiKSB7CiAgICAgICAgdmFyIHMgPSBbXSwgLy8gc3RyaW5nIGNvbnN0YW50cyBhbmQgcGxhY2Vob2xkZXJzCiAgICAgICAgICAgIHEgPSBbXTsgLy8gbnVtYmVyIGludGVycG9sYXRvcnMKICAgICAgICBhID0gcGFyc2UoYSksIGIgPSBwYXJzZShiKTsKICAgICAgICB0cmFuc2xhdGUoYS50cmFuc2xhdGVYLCBhLnRyYW5zbGF0ZVksIGIudHJhbnNsYXRlWCwgYi50cmFuc2xhdGVZLCBzLCBxKTsKICAgICAgICByb3RhdGUoYS5yb3RhdGUsIGIucm90YXRlLCBzLCBxKTsKICAgICAgICBza2V3WChhLnNrZXdYLCBiLnNrZXdYLCBzLCBxKTsKICAgICAgICBzY2FsZShhLnNjYWxlWCwgYS5zY2FsZVksIGIuc2NhbGVYLCBiLnNjYWxlWSwgcywgcSk7CiAgICAgICAgYSA9IGIgPSBudWxsOyAvLyBnYwogICAgICAgIHJldHVybiBmdW5jdGlvbih0KSB7CiAgICAgICAgICB2YXIgaSA9IC0xLCBuID0gcS5sZW5ndGgsIG87CiAgICAgICAgICB3aGlsZSAoKytpIDwgbikgc1sobyA9IHFbaV0pLmldID0gby54KHQpOwogICAgICAgICAgcmV0dXJuIHMuam9pbigiIik7CiAgICAgICAgfTsKICAgICAgfTsKICAgIH0KCiAgICB2YXIgaW50ZXJwb2xhdGVUcmFuc2Zvcm1Dc3MkMiA9IGludGVycG9sYXRlVHJhbnNmb3JtJDIocGFyc2VDc3MkMywgInB4LCAiLCAicHgpIiwgImRlZykiKTsKICAgI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kgPSBmdW5jdGlvbih0KSB7CiAgICAgICAgICByZXR1cm4gWwogICAgICAgICAgICB1eDAgKyB0ICogZHgsCiAgICAgICAgICAgIHV5MCArIHQgKiBkeSwKICAgICAgICAgICAgdzAgKiBNYXRoLmV4cChyaG8kMSAqIHQgKiBTKQogICAgICAgICAgXTsKICAgICAgICB9OwogICAgICB9CgogICAgICAvLyBHZW5lcmFsIGNhc2UuCiAgICAgIGVsc2UgewogICAgICAgIHZhciBkMSA9IE1hdGguc3FydChkMiksCiAgICAgICAgICAgIGIwID0gKHcxICogdzEgLSB3MCAqIHcwICsgcmhvNCQxICogZDIpIC8gKDIgKiB3MCAqIHJobzIkMSAqIGQxKSwKICAgICAgICAgICAgYjEgPSAodzEgKiB3MSAtIHcwICogdzAgLSByaG80JDEgKiBkMikgLyAoMiAqIHcxICogcmhvMiQxICogZDEpLAogICAgICAgICAgICByMCA9IE1hdGgubG9nKE1hdGguc3FydChiMCAqIGIwICsgMSkgLSBiMCksCiAgICAgICAgICAgIHIxID0gTWF0aC5sb2coTWF0aC5zcXJ0KGIxICogYjEgKyAxKSAtIGIxKTsKICAgICAgICBTID0gKHIxIC0gcjApIC8gcmhvJDE7CiAgICAgICAgaSA9IGZ1bmN0aW9uKHQpIHsKICAgICAgICAgIHZhciBzID0gdCAqIFMsCiAgICAgICAgICAgICAgY29zaHIwID0gY29zaCQxKHIwKSwKICAgICAgICAgICAgICB1ID0gdzAgLyAocmhvMiQxICogZDEpICogKGNvc2hyMCAqIHRhbmgkMShyaG8kMSAqIHMgKyByMCkgLSBzaW5oJDEocjApKTsKICAgICAgICAgIHJldHVybiBbCiAgICAgICAgICAgIHV4MCArIHUgKiBkeCwKICAgICAgICAgICAgdXkwICsgdSAqIGR5LAogICAgICAgICAgICB3MCAqIGNvc2hyMCAvIGNvc2gkMShyaG8kMSAqIHMgKyByMCkKICAgICAgICAgIF07CiAgICAgICAgfTsKICAgICAgfQoKICAgICAgaS5kdXJhdGlvbiA9IFMgKiAxMD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HgsIHkpIHsKICAgICAgICB0aGlzLl8gKz0gIlEiICsgKCt4MSkgKyAiLCIgKyAoK3kxKSArICIsIiArICh0aGlzLl94MSA9ICt4KSArICIsIiArICh0aGlzLl95MSA9ICt5KTsKICAgICAgfSwKICAgICAgYmV6aWVyQ3VydmVUbzogZnVuY3Rpb24oeDEsIHkxLCB4MiwgeTIsIHgsIHkpIHsKICAgICAgICB0aGlzLl8gKz0gIkMiICsgKCt4MSkgKyAiLCIgKyAoK3kxKSArICIsIiArICgreDIpICsgIiwiICsgKCt5MikgKyAiLCIgKyAodGhpcy5feDEgPSAreCkgKyAiLCIgKyAodGhpcy5feTEgPSAreSk7CiAgICAgIH0sCiAgICAgIGFyY1RvOiBmdW5jdGlvbih4MSwgeTEsIHgyLCB5MiwgcikgewogICAgICAgIHgxID0gK3gxLCB5MSA9ICt5MSwgeDIgPSAreDIsIHkyID0gK3kyLCByID0gK3I7CiAgICAgICAgdmFyIHgwID0gdGhpcy5feDEsCiAgICAgICAgICAgIHkwID0gdGhpcy5feTEsCiAgICAgICAgICAgIHgyMSA9IHgyIC0geDEsCiAgICAgICAgICAgIHkyMSA9IHkyIC0geTEsCiAgICAgICAgICAgIHgwMSA9IHgwIC0geDEsCiAgICAgICAgICAgIHkwMSA9IHkwIC0geTEsCiAgICAgICAgICAgIGwwMV8yID0geDAxICogeDAxICsgeTAxICogeTAxOwoKICAgICAgICAvLyBJcyB0aGUgcmFkaXVzIG5lZ2F0aXZlPyBFcnJvci4KICAgICAgICBpZiAociA8IDApIHRocm93IG5ldyBFcnJvcigibmVnYXRpdmUgcmFkaXVzOiAiICsgcik7CgogICAgICAgIC8vIElzIHRoaXMgcGF0aCBlbXB0eT8gTW92ZSB0byAoeDEseTEpLgogICAgICAgIGlmICh0aGlzLl94MSA9PT0gbnVsbCkgewogICAgICAgICAgdGhpcy5fICs9ICJNIiArICh0aGlzLl94MSA9IHgxKSArICIsIiArICh0aGlzLl95MSA9IHkxKTsKICAgICAgICB9CgogICA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gICAgdDIxID0gbCAvIGwyMTsKCiAgICAgICAgICAvLyBJZiB0aGUgc3RhcnQgdGFuZ2VudCBpcyBub3QgY29pbmNpZGVudCB3aXRoICh4MCx5MCksIGxpbmUgdG8uCiAgICAgICAgICBpZiAoTWF0aC5hYnModDAxIC0gMSkgPiBlcHNpbG9uJDgpIHsKICAgICAgICAgICAgdGhpcy5fICs9ICJMIiArICh4MSArIHQwMSAqIHgwMSkgKyAiLCIgKyAoeTEgKyB0MDEgKiB5MDEpOwogICAgICAgICAgfQoKICAgICAgICAgIHRoaXMuXyArPSAiQSIgKyByICsgIiwiICsgciArICIsMCwwLCIgKyAoKyh5MDEgKiB4MjAgPiB4MDEgKiB5MjApKSArICIsIiArICh0aGlzLl94MSA9IHgxICsgdDIxICogeDIxKSArICIsIiArICh0aGlzLl95MSA9IHkxICsgdDIxICogeTIxKTsKICAgICAgICB9CiAgICAgIH0sCiAgICAgIGFyYzogZnVuY3Rpb24oeCwgeSwgciwgYTAsIGExLCBjY3cpIHsKICAgICAgICB4ID0gK3gsIHkgPSAreSwgciA9ICtyOwogICAgICAgIHZhciBkeCA9IHIgKiBNYXRoLmNvcyhhMCksCiAgICAgICAgICAgIGR5ID0gciAqIE1hdGguc2luKGEwKSwKICAgICAgICAgICAgeDAgPSB4ICsgZHgsCiAgICAgICAgICAgIHkwID0geSArIGR5LAogICAgICAgICAgICBjdyA9IDEgXiBjY3csCiAgICAgICAgICAgIGRhID0gY2N3ID8gYTAgLSBhMSA6IGExIC0gYTA7CgogICAgICAgIC8vIElzIHRoZSByYWRpdXMgbmVnYXRpdmU/IEVycm9yLgogICAgICAgIGlmIChyIDwgMCkgdGhyb3cgbmV3IEVycm9yKCJuZWdhdGl2ZSByYWRpdXM6ICIgKyByKTsKCiAgICAgICAgLy8gSXMgdGhpcyBwYXRoIGVtcHR5PyBNb3ZlIHRvICh4MCx5MCkuCiAgICAgICAgaWYgKHRoaXMuX3gxID09PSBudWxsKSB7CiAgICAgICAgICB0aGlz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EiICsgciArICIsIiArIHIgKyAiLDAsIiArICgrKGRhID49IHBpJDkpKSArICIsIiArIGN3ICsgIiwiICsgKHRoaXMuX3gxID0geCArIHIgKiBNYXRoLmNvcyhhMSkpICsgIiwiICsgKHRoaXMuX3kxID0geSArIHIgKiBNYXRoLnNpbihhMSkpOwogICAgICAgIH0KICAgICAgfSwKICAgICAgcmVjdDogZnVuY3Rpb24oeCwgeSwgdywgaCkgewogICAgICAgIHRoaXMuXyArPSAiTSIgKyAodGhpcy5feDAgPSB0aGlzLl94MSA9ICt4KSArICIsIiArICh0aGlzLl95MCA9IHRoaXMuX3kxID0gK3kpICsgImgiICsgKCt3KSArICJ2IiArICgraCkgKyAiaCIgKyAoLXcpICsgIloiOwogICAgICB9LAogICAgICB0b1N0cmluZzogZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuXzsKICAgICAgfQogICAgfTsKCiAgICBmdW5jdGlvbiBhcmVhJDUocG9seWdvbikgewogICAgICB2YXIgaSA9IC0xLAogICAgICAgICAgbiA9IHBvbHlnb24ubGVuZ3RoLAogICAgICAgICAgYSwKICAgICAgICAgIGIgPSBwb2x5Z29uW24gLSAxXSwKICAgICAgICAgIGFyZWEgPSAwOwoKICAgICAgd2hpbGUgKCsraSA8IG4pIHsKICAgICAgICBhID0gYjsKICAgICAgICBiID0gcG9seWdvbltpXTsKICAgICAgICBhcmVhICs9IGFbMV0gKiBiWzBdIC0gYVswXSAqIGJbMV07CiAgICAgIH0KCiAgICAgIHJldHVybiBhcmVhIC8gMjsKICAgIH0KCiAgICBmdW5jdGlvbiBjZW50cm9pZCQzKHBvbHlnb24pIHsKICAgICAgdmFyIGkgPSAtMSwKICAgICAgICAgIG4gPSBwb2x5Z29uLmxlbmd0aCwKICAgICAgICAgIHggPSAwLAogICAgICAgICAgeSA9IDAsCiAgICAgICAgICBhLAogICAgICAgICAgYiA9IHBvbHlnb25bbiAtIDFdLAogICAgICAgICAgYywKICAgICAgICAgIGsgPSAwO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GNvbnRhaW5zJDQocG9seWdvbiwgcG9pbnQpIHsKICAgICAgdmFyIG4gPSBwb2x5Z29uLmxlbmd0aCwKICAgICAgICAgIHAgPSBwb2x5Z29uW24gLSAxXSwKICAgICAgICAgIHggPSBwb2ludFswXSwgeSA9IHBvaW50WzFdLAogICAgICAgICAgeDAgPSBwWzBdLCB5MCA9IHBbMV0sCiAgICAgICAgICB4MSwgeTEsCiAgICAgICAgICBpbnNpZGUgPSBmYWxzZTsKCiAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbjsgKytpKSB7CiAgICAgICAgcCA9IHBvbHlnb25baV0sIHgxID0gcFswXSwgeTEgPSBwWzFdOwogICAgICAgIGlmICgoKHkxID4geSkgIT09ICh5MCA+IHkpKSAmJiAoeCA8ICh4MCAtIHgxKSAqICh5IC0geTEpIC8gKHkwIC0geTEpICsgeDEpKSBpbnNpZGUgPSAhaW5zaWRlOwogICAgICAgIHgwID0geDEsIHkwID0geTE7CiAgICAgIH0KCiAgICAgIHJldHVybiBpbnNpZGU7CiAgICB9CgogICAgZnVuY3Rpb24gbGVuZ3RoJDUocG9seWdvbikgewogICAgICB2YXIgaSA9IC0xLAogICAgICAgICAgbiA9IHBvbHlnb24ubGVuZ3RoLAogICAgICAgICAgYiA9IHBvbHlnb25bbiAtIDFdLAogICAgICAgICAgeGEsCiAgICAgICAgICB5YSwKICAgICAgICAgIHhiID0gYlswXSwKICAgICAgICAgIHliID0gYlsxXSwKICAgICAgICAgIHBlcmltZXRlciA9IDA7CgogICAgICB3aGlsZSAoKytpIDwgbikgewogICAgICAgIHhhID0geGI7CiAgICAgICAgeWEgPSB5YjsKICAgICAgICBiID0gcG9seWdvbltpXTsKICAgICAgICB4YiA9IGJbMF07CiAgICAgICAgeWIgPSBiWzFdOwogICAgICAgIHhhIC09IHhiOwogICAgICAgIHlhIC09IHliOwogICAgICAgIHBlcmltZXRlciArPSBNYXRoLnNxcnQoeGEgKiB4YSArIHlhICogeWEpOwogICAgICB9CgogICAgICByZXR1cm4gcGVyaW1ldGVyOwogICAgfQoKICAgIGZ1bmN0aW9uIHRyZWVfYWRkJDIoZCkgewogICAgICB2YXIgeCA9ICt0aGlzLl94LmNhbGwobnVsbCwgZCksCiAgICAgICAgICB5ID0gK3RoaXMuX3kuY2FsbChudWxsLCBkKTsKICAgICAgcmV0dXJuIGFkZCQ0KHRoaXMuY292ZXIoeCwgeSksIHgsIHksIGQpOwogICAgfQoKICAgIGZ1bmN0aW9uIGFkZCQ0KHRyZWUsIHgsIHksIGQpIHsKICAgICAgaWYgKGlzTmFOKHgpIHx8IGlzTmFOKHkpKSByZXR1cm4gdHJlZTsgLy8gaWdub3JlIGludmFsaWQgcG9pbnRzCgogICAgICB2YXIgcGFyZW50LAogICAgICAgICAgbm9kZSA9IHRyZWUuX3Jvb3QsCiAgICAgICAgICBsZWFmID0ge2RhdGE6IGR9LAogICAgICAgICAgeDAgPSB0cmVlLl94MCwKICAgICAgICAgIHkwID0gdHJlZS5feTAsCiAgICAgICAgICB4MSA9IHRyZWUuX3gxLAogICAgICAgICAgeTEgPSB0cmVlLl95MSwKICAgICAgICAgIHhtLAogICAgICAgICAgeW0sCiAgICAgICAgICB4cCwKICAgICAgICAgIHlwLAogICAgICAgICAgcmlnaHQsCiAgICAgICAgICBib3R0b20sCiAgICAgICAgICBpLAogICAgICAgICAgajsKCiAgICAgIC8vIElmIHRoZSB0cmVlIGlzIGVtcHR5LCBpbml0aWFsaXplIHRoZSByb290IGFzIGEgbGVhZi4KICAgICAgaWYgKCFub2RlKSByZXR1cm4gdHJlZS5fcm9vdCA9IGxlYWYsIHRyZWU7CgogICAgICAvLyBGaW5kIHRoZSBleGlzdGluZyBsZWFmIGZvciB0aGUgbmV3IHBvaW50LCBvciBhZGQgaXQuCiAgICAgIHdoaWxlIChub2RlLmxlbmd0aCkgewogICAgICAgIGlmIChyaWdodCA9IHggPj0gKHhtID0gKHgwICsgeDEpIC8gMikpIHgwID0geG07IGVsc2UgeDEgPSB4bTsK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h4cCA+PSB4bSkpKTsKICAgICAgcmV0dXJuIHBhcmVudFtqXSA9IG5vZGUsIHBhcmVudFtpXSA9IGxlYWYsIHRyZWU7CiAgICB9CgogICAgZnVuY3Rpb24gYWRkQWxsJDIoZGF0YSkgewogICAgICB2YXIgZCwgaSwgbiA9IGRhdGEubGVuZ3RoLAogICAgICAgICAgeCwKICAgICAgICAgIHksCiAgICAgICAgICB4eiA9IG5ldyBBcnJheShuKSwKICAgICAgICAgIHl6ID0gbmV3IEFycmF5KG4pLAogICAgICAgICAgeDAgPSBJbmZpbml0eSwKICAgICAgICAgIHkwID0gSW5maW5pdHksCiAgICAgICAgICB4MSA9IC1JbmZpbml0eSwKICAgICAgICAgIHkxID0gLUluZmluaXR5OwoKICAgICAgLy8gQ29tcHV0ZSB0aGUgcG9pbnRzIGFuZCB0aGVpciBleHRlbnQuCiAgICAgIGZvciAoaSA9IDA7IGkgPCBuOyArK2kpIHsKICAgICAgICBpZiAoaXNOYU4oeCA9ICt0aGlzLl94LmNhbGwobnVsbCwgZCA9IGRhdGFbaV0pKSB8fCBpc05hTih5ID0gK3RoaXMuX3kuY2FsbChudWxsLCBkKSkpIGNvbnRpbnVlOwogICAgICAgIHh6W2ldID0geDsKICAgICAgICB5eltpXSA9IHk7CiAgICAgICAgaWYgKHggPCB4MCkgeDAgPSB4OwogICAgICAgIGlmICh4ID4geDEpIHgxID0geDsKICAgICAgICBpZiAoeSA8IHkwKSB5MCA9IHk7CiAgICAgICAgaWYgKHkgPiB5MSkgeTEgPSB5OwogICAgICB9CgogICAgICAvLyBJZiB0aGVyZSB3ZXJlIG5vICh2YWxpZCkgcG9pbnRzLCBpbmhlcml0IHRoZSBleGlzdGluZyBleHRlbnQuCiAgICAgIGlmICh4MSA8IHgwKSB4MCA9IHRoaXMuX3gwLCB4MSA9IHRoaXMuX3gxOwogICAgICBpZiAoeTEgPCB5MCkgeTAgPSB0aGlzLl95MCwgeTEgPSB0aGlzLl95MTsKCiAgICAgIC8vIEV4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4geCB8fCB4ID4geDEgfHwgeTAgPiB5IHx8IHkgPiB5MSkgewogICAgICAgIHZhciB6ID0geDEgLSB4MCwKICAgICAgICAgICAgbm9kZSA9IHRoaXMuX3Jvb3QsCiAgICAgICAgICAgIHBhcmVudCwKICAgICAgICAgICAgaTsKCiAgICAgICAgc3dpdGNoIChpID0gKHkgPCAoeTAgKyB5MSkgLyAyKSA8PCAxIHwgKHggPCAoeDAgKyB4MSkgLyAyKSkgewogICAgICAgICAgY2FzZSAwOiB7CiAgICAgICAgICAgIGRvIHBhcmVudCA9IG5ldyBBcnJheSg0KSwgcGFyZW50W2ldID0gbm9kZSwgbm9kZSA9IHBhcmVudDsKICAgICAgICAgICAgd2hpbGUgKHogKj0gMiwgeDEgPSB4MCArIHosIHkxID0geTAgKyB6LCB4ID4geDEgfHwgeSA+IHkxKTsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICB9CiAgICAgICAgICBjYXNlIDE6IHsKICAgICAgICAgICAgZG8gcGFyZW50ID0gbmV3IEFycmF5KDQpLCBwYXJlbnRbaV0gPSBub2RlLCBub2RlID0gcGFyZW50OwogICAgICAgICAgICB3aGlsZSAoeiAqPSAyLCB4MCA9IHgxIC0geiwgeTEgPSB5MCArIHosIHgwID4geCB8fCB5ID4geTEpOwogICAgICAgICAgICBicmVhazsKICAgICAgICAgIH0KICAgICAgICAgIGNhc2UgMjogewogICAgICAgICAgICBkbyBwYXJlbnQgPSBuZXcgQXJyYXkoNCksIHBhcmVudFtpXSA9IG5vZGUsIG5vZGUgPSBwYXJlbnQ7CiAgICAgICAgICAgIHdoaWxlICh6ICo9IDIsIHgxID0geDAgKyB6LCB5MCA9IHkxIC0geiwgeCA+IHgxIHx8IHkwID4geSk7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgfQogICAgICAgICAgY2FzZSAzOiB7CiAgICAgICAgICAgIGRvIHBhcmVudCA9IG5ldyBBcnJheSg0KSwgcGFyZW50W2ldID0gbm9kZSwgbm9kZSA9IHBhcmVudDsKICAgICAgICAgICAgd2hpbGUgKHogKj0gMiwgeDAgPSB4MSAtIHosIHkwID0geTEgLSB6LCB4MCA+IHggfHwgeTAgPiB5KTsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICBpZiAodGhpcy5fcm9vdCAmJiB0aGlzLl9yb290Lmxlbmd0aCkgdGhpcy5fcm9vdCA9IG5vZGU7CiAgICAgIH0KCiAgICAgIC8vIElmIHRoZSBxdWFkdHJlZSBjb3ZlcnMgdGhlIHBvaW50IGFscmVhZHksIGp1c3QgcmV0dXJuLgogICAgICBlbHNlIHJldHVybiB0aGlzOwoKICAgICAgdGhpcy5feDAgPSB4MDsKICAgICAgdGhpcy5feTAgPSB5MDsKICAgICAgdGhpcy5feDEgPSB4MTsKICAgICAgdGhpcy5feTEgPSB5MTsKICAgICAgcmV0dXJuIHRoaXM7CiAgICB9CgogICAgZnVuY3Rpb24gdHJlZV9kYXRhJDIoKSB7CiAgICAgIHZhciBkYXRhID0gW107CiAgICAgIHRoaXMudmlzaXQoZnVuY3Rpb24obm9kZSkgewogICAgICAgIGlmICghbm9kZS5sZW5ndGgpIGRvIGRhdGEucHVzaChub2RlLmRhdGEpOyB3aGlsZSAobm9kZSA9IG5vZGUubmV4dCkKICAgICAgfSk7CiAgICAgIHJldHVybiBkYXRhOwogICAgfQoKICAgIGZ1bmN0aW9uIHRyZWVfZXh0ZW50JDIoXykgewogICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aAogICAgICAgICAgPyB0aGlzLmNvdmVyKCtfWzBdWzBdLCArX1swXVsxXSkuY292ZXIoK19bMV1bMF0sICtfWzFdWzFdKQogICAgICAgICAgOiBpc05hTih0aGlzLl94MCkgPyB1bmRlZmluZWQgOiBbW3RoaXMuX3gwLCB0aGlzLl95MF0sIFt0aGlzLl94MSwgdGhpcy5feTFdXTsKICAgIH0KCiAgICBmdW5jdGlvbiBRdWFkJDIobm9kZSwgeDAsIHkwLCB4MSwgeTEpIHsKICAgICAgdGhpcy5ub2RlID0gbm9kZTsKICAgICAgdGhpcy54MCA9IHgwOwogICAgICB0aGlzLnkwID0geTA7CiAgICAgIHRoaXMueDEgPSB4MTsKICAgICAgdGhpcy55MSA9IHkxOwogICAgfQoKICAgIGZ1bmN0aW9uIHRyZWVfZmluZCQyKHgsIHksIHJhZGl1cykgewogICAgICB2YXIgZGF0YSwKICAgICAgICAgIHgwID0gdGhpcy5feDAsCiAgICAgICAgICB5MCA9IHRoaXMuX3kwLAogICAgICAgICAgeDEsCiAgICAgICAgICB5MSwKICAgICAgICAgIHgyLAogICAgICAgICAgeTIsCiAgICAgICAgICB4MyA9IHRoaXMuX3gxLAogICAgICAgICAgeTMgPSB0aGlzLl95MSwKICAgICAgICAgIHF1YWRzID0gW10sCiAgICAgICAgICBub2RlID0gdGhpcy5fcm9vdCwKICAgICAgICAgIHEsCiAgICAgICAgICBpOwoKICAgICAgaWYgKG5vZGUpIHF1YWRzLnB1c2gobmV3IFF1YWQkMihub2RlLCB4MCwgeTAsIHgzLCB5MykpOwogICAgICBpZiAocmFkaXVzID09IG51bGwpIHJhZGl1cyA9IEluZmluaXR5OwogICAgICBlbHNlIHsKICAgICAgICB4MCA9IHggLSByYWRpdXMsIHkwID0geSAtIHJhZGl1czsKICAgICAgICB4MyA9IHggKyByYWRpdXMsIHkzID0geSArIHJhZGl1czsKICAgICAgICByYWRpdXMgKj0gcmFkaXVzOwogICAgICB9CgogICAgICB3aGlsZSAocSA9IHF1YWRzLnBvcCgpKSB7CgogICAgICAgIC8vIFN0b3Agc2VhcmNoaW5nIGlmIHRoaXMgcXVhZHJhbnQgY2Fu4oCZdCBjb250YWluIGEgY2xvc2VyIG5vZGUuCiAgICAgICAgaWYgKCEobm9kZSA9IHEubm9kZSkKICAgICAgICAgICAgfHwgKHgxID0gcS54MCkgPiB4MwogICAgICAgICAgICB8fCAoeTEgPSBxLnkwKSA+IHkzCiAgICAgICAgICAgIHx8ICh4MiA9IHEueDEpIDwgeDAKICAgICAgICAgICAgfHwgKHkyID0gcS55MSkgPCB5MCkgY29udGludWU7CgogICAgICAgIC8vIEJpc2VjdCB0aGUgY3VycmVudCBxdWFkcmFudC4KICAgICAgICBpZiAobm9kZS5sZW5ndGgpIHsKICAgICAgICAgIHZhciB4bSA9ICh4MSArIHgyKSAvIDIsCiAgICAgICAgICAgICAgeW0gPSAoeTEgKyB5MikgLyAyOwoKICAgICAgICAgIHF1YWRzLnB1c2goCiAgICAgICAgICAgIG5ldyBRdWFkJDIobm9kZVszXSwgeG0sIHltLCB4MiwgeTIpLAogICAgICAgICAgICBuZXcgUXVhZCQyKG5vZGVbMl0sIHgxLCB5bSwgeG0sIHkyKSwKICAgICAgICAgICAgbmV3IFF1YWQkMihub2RlWzFdLCB4bSwgeTEsIHgyLCB5bSksCiAgICAgICAgICAgIG5ldyBRdWFkJDIobm9kZVswXSwgeDEsIHkxLCB4bSwgeW0pCiAgICAgICAgICApOwoKICAgICAgICAgIC8vIFZpc2l0IHRoZSBjbG9zZXN0IHF1YWRyYW50IGZpcnN0LgogICAgICAgICAgaWYgKGkgPSAoeSA+PSB5bSkgPDwgMSB8ICh4ID49IHhtKSkgewogICAgICAgICAgICBxID0gcXVhZHNbcXVhZHMubGVuZ3RoIC0gMV07CiAgICAgICAgICAgIHF1YWRzW3F1YWRzLmxlbmd0aCAtIDFdID0gcXVhZHNbcXVhZHMubGVuZ3RoIC0gMSAtIGldOwogICAgICAgICAgICBxdWFkc1txdWFkcy5sZW5ndGggLSAxIC0gaV0gPSBxOwogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgLy8gVmlzaXQgdGhpcyBwb2ludC4gKFZpc2l0aW5nIGNvaW5jaWRlbnQgcG9pbnRzIGlzbuKAmXQgbmVjZXNzYXJ5ISkKICAgICAgICBlbHNlIHsKICAgICAgICAgIHZhciBkeCA9IHggLSArdGhpcy5feC5jYWxsKG51bGwsIG5vZGUuZGF0YSksCiAgICAgICAgICAgICAgZHkgPSB5IC0gK3RoaXMuX3kuY2FsbChudWxsLCBub2RlLmRhdGEpLAogICAgICAgICAgICAgIGQyID0gZHggKiBkeCArIGR5ICogZHk7CiAgICAgICAgICBpZiAoZDIgPCByYWRpdXMpIHsKICAgICAgICAgICAgdmFyIGQgPSBNYXRoLnNxcnQocmFkaXVzID0gZDIpOwogICAgICAgICAgICB4MCA9IHggLSBkLCB5MCA9IHkgLSBkOwogICAgICAgICAgICB4MyA9IHggKyBkLCB5MyA9IHkgKyBkOwogICAgICAgICAgICBkYXRhID0gbm9kZS5kYXRhOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQoKICAgICAgcmV0dXJuIGRhdGE7CiAgICB9CgogICAgZnVuY3Rpb24gdHJlZV9yZW1vdmUkMihkKSB7CiAgICAgIGlmIChpc05hTih4ID0gK3RoaXMuX3guY2FsbChudWxsLCBkKSkgfHwgaXNOYU4oeSA9ICt0aGlzLl95LmNhbGwobnVsbCwgZCkpKSByZXR1cm4gdGhpczsgLy8gaWdub3JlIGludmFsaWQgcG9pbnRzCgogICAgICB2YXIgcGFyZW50LAogICAgICAgICAgbm9kZSA9IHRoaXMuX3Jvb3QsCiAgICAgICAgICByZXRhaW5lciwKICAgICAgICAgIHByZXZpb3VzLAogICAgICAgICAgbmV4dCwKICAgICAgICAgIHgwID0gdGhpcy5feDAsCiAgICAgICAgICB5MCA9IHRoaXMuX3kwLAogICAgICAgICAgeDEgPSB0aGlzLl94MSwKICAgICAgICAgIHkxID0gdGhpcy5feTEsCiAgICAgICAgICB4LAogICAgICAgICAgeSwKICAgICAgICAgIHhtLAogICAgICAgICAgeW0sCiAgICAgICAgICByaWdodCwKICAgICAgICAgIGJvdHRvbSwKICAgICAgICAgIGksCiAgICAgICAgICBqOwoKICAgICAgLy8gSWYgdGhlIHRyZWUgaXMgZW1wdHksIGluaXRpYWxpemUgdGhlIHJvb3QgYXMgYSBsZWFmLgogICAgICBpZiAoIW5vZGUpIHJldHVybiB0aGlzOwoKICAgICAgLy8gRmluZCB0aGUgbGVhZiBub2RlIGZvciB0aGUgcG9pbnQuCiAgICAgIC8vIFdoaWxlIGRlc2NlbmRpbmcsIGFsc28gcmV0YWluIHRoZSBkZWVwZXN0IHBhcmVudCB3aXRoIGEgbm9uLXJlbW92ZWQgc2libGluZy4KICAgICAgaWYgKG5vZGUubGVuZ3RoKSB3aGlsZSAodHJ1ZSkgewogICAgICAgIGlmIChyaWdodCA9IHggPj0gKHhtID0gKHgwICsgeDEpIC8gMikpIHgwID0geG07IGVsc2UgeDEgPSB4bTsKICAgICAgICBpZiAoYm90dG9tID0geSA+PSAoeW0gPSAoeTAgKyB5MSkgLyAyKSkgeTAgPSB5bTsgZWxzZSB5MSA9IHltOwogICAgICAgIGlmICghKHBhcmVudCA9IG5vZGUsIG5vZGUgPSBub2RlW2kgPSBib3R0b20gPDwgMSB8IHJpZ2h0XSkpIHJldHVybiB0aGlzOwogICAgICAgIGlmICghbm9kZS5sZW5ndGgpIGJyZWFrOwogICAgICAgIGlmIChwYXJlbnRbKGkgKyAxKSAmIDNdIHx8IHBhcmVudFsoaSArIDIpICYgM10gfHwgcGFyZW50WyhpICsgMykgJiAzXSkgcmV0YWluZXIgPSBwYXJlbnQsIGogPSBpOwogICAgICB9CgogICAgICAvLyBGaW5kIHRoZSBwb2ludCB0byByZW1vdmUuCiAgICAgIHdoaWxlIChub2RlLmRhdGEgIT09IGQpIGlmICghKHByZXZpb3VzID0gbm9kZSwgbm9kZSA9IG5vZGUubmV4dCkpIHJldHVybiB0aGlzOwogICAgICBpZiAobmV4dCA9IG5vZGUubmV4dCkgZGVsZXRlIG5vZGUubmV4dDsKCiAgICAgIC8vIElmIHRoZXJlIGFyZSBtdWx0aXBsZSBjb2luY2lkZW50IHBvaW50cywgcmVtb3ZlIGp1c3QgdGhlIHBvaW50LgogICAgICBpZiAocHJldmlvdXMpIHJldHVybiAobmV4dCA/IHByZXZpb3VzLm5leHQgPSBuZXh0IDogZGVsZXRlIHByZXZpb3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xiYWNrPwogICAgfQoKICAgIFF1ZXVlLnByb3RvdHlwZSA9IHF1ZXVlLnByb3RvdHlwZSA9IHsKICAgICAgY29uc3RydWN0b3I6IFF1ZXVlLAogICAgICBkZWZlcjogZnVuY3Rpb24oY2FsbGJhY2spIHsKICAgICAgICBpZiAodHlwZW9mIGNhbGxiYWNrICE9PSAiZnVuY3Rpb24iKSB0aHJvdyBuZXcgRXJyb3IoImludmFsaWQgY2FsbGJhY2siKTsKICAgICAgICBpZiAodGhpcy5fY2FsbCkgdGhyb3cgbmV3IEVycm9yKCJkZWZlciBhZnRlciBhd2FpdCIpOwogICAgICAgIGlmICh0aGlzLl9lcnJvciAhPSBudWxsKSByZXR1cm4gdGhpczsKICAgICAgICB2YXIgdCA9IHNsaWNlJGIuY2FsbChhcmd1bWVudHMsIDEpOwogICAgICAgIHQucHVzaChjYWxsYmFjayk7CiAgICAgICAgKyt0aGlzLl93YWl0aW5nLCB0aGlzLl90YXNrcy5wdXNoKHQpOwogICAgICAgIHBva2UkMyh0aGlzKTsKICAgICAgICByZXR1cm4gdGhpczsKICAgICAgfSwKICAgICAgYWJvcnQ6IGZ1bmN0aW9uKCkgewogICAgICAgIGlmICh0aGlzLl9lcnJvciA9PSBudWxsKSBhYm9ydCh0aGlzLCBuZXcgRXJyb3IoImFib3J0IikpOwogICAgICAgIHJldHVybiB0aGlzOwogICAgICB9LAogICAgICBhd2FpdDogZnVuY3Rpb24oY2FsbGJhY2spIHsKICAgICAgICBpZiAodHlwZW9mIGNhbGxiYWNrICE9PSAiZnVuY3Rpb24iKSB0aHJvdyBuZXcgRXJyb3IoImludmFsaWQgY2FsbGJhY2siKTsKICAgICAgICBpZiAodGhpcy5fY2FsbCkgdGhyb3cgbmV3IEVycm9yKCJtdWx0aXBsZSBhd2FpdCIpOwogICAgICAgIHRoaXMuX2NhbGwgPSBmdW5jdGlvbihlcnJvciwgcmVzdWx0cykgeyBjYWxsYmFjay5hcHBseShudWxsLCBbZXJyb3JdLmNvbm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ICAgICBqID0gdC5sZW5ndGggLSAxLAogICAgICAgICAgICBjID0gdFtqXTsKICAgICAgICB0W2pdID0gZW5kKHEsIGkpOwogICAgICAgIC0tcS5fd2FpdGluZywgKytxLl9hY3RpdmU7CiAgICAgICAgdCA9IGMuYXBwbHkobnVsbCwgdCk7CiAgICAgICAgaWYgKCFxLl90YXNrc1tpXSkgY29udGludWU7IC8vIHRhc2sgZmluaXNoZWQgc3luY2hyb25vdXNseQogICAgICAgIHEuX3Rhc2tzW2ldID0gdCB8fCBub2Fib3J0OwogICAgICB9CiAgICB9CgogICAgZnVuY3Rpb24gZW5kKHEsIGkpIHsKICAgICAgcmV0dXJuIGZ1bmN0aW9uKGUsIHIpIHsKICAgICAgICBpZiAoIXEuX3Rhc2tzW2ldKSByZXR1cm47IC8vIGlnbm9yZSBtdWx0aXBsZSBjYWxsYmFja3MKICAgICAgICAtLXEuX2FjdGl2ZSwgKytxLl9lbmRlZDsKICAgICAgICBxLl90YXNrc1tpXSA9IG51bGw7CiAgICAgICAgaWYgKHEuX2Vycm9yICE9IG51bGwpIHJldHVybjsgLy8gaWdub3JlIHNlY29uZGFyeSBlcnJvcnMKICAgICAgICBpZiAoZSAhPSBudWxsKSB7CiAgICAgICAgICBhYm9ydChxLCBlKTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgcS5fZGF0YVtpXSA9IHI7CiAgICAgICAgICBpZiAocS5fd2FpdGluZykgcG9rZSQzKHEpOwogICAgICAgICAgZWxzZSBtYXliZU5vdGlmeShxKTsKICAgICAgICB9CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gYWJvcnQocSwgZSkgewogICAgICB2YXIgaSA9IHEuX3Rhc2tzLmxlbmd0aCwgdDsKICAgICAgcS5fZXJyb3IgPSBlOyAvLyBpZ25vcmUgYWN0aXZlIGNhbGxiYWNrcwogICAgICBxLl9kYXRhID0gdW5kZWZpbmVkOyAvLyBhbGxvdyBnYwogICAgICBxLl93YWl0aW5nID0gTmFOOyAvL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ICBmdW5jdGlvbiByYW5kb21Vbmlmb3JtKG1pbiwgbWF4KSB7CiAgICAgICAgbWluID0gbWluID09IG51bGwgPyAwIDogK21pbjsKICAgICAgICBtYXggPSBtYXggPT0gbnVsbCA/IDEgOiArbWF4OwogICAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoID09PSAxKSBtYXggPSBtaW4sIG1pbiA9IDA7CiAgICAgICAgZWxzZSBtYXggLT0gbWluOwogICAgICAgIHJldHVybiBmdW5jdGlvbigpIHsKICAgICAgICAgIHJldHVybiBzb3VyY2UoKSAqIG1heCArIG1pbjsKICAgICAgICB9OwogICAgICB9CgogICAgICByYW5kb21Vbmlmb3JtLnNvdXJjZSA9IHNvdXJjZVJhbmRvbVVuaWZvcm07CgogICAgICByZXR1cm4gcmFuZG9tVW5pZm9ybTsKICAgIH0pKGRlZmF1bHRTb3VyY2UkMyk7CgogICAgdmFyIG5vcm1hbCQxID0gKGZ1bmN0aW9uIHNvdXJjZVJhbmRvbU5vcm1hbChzb3VyY2UpIHsKICAgICAgZnVuY3Rpb24gcmFuZG9tTm9ybWFsKG11LCBzaWdtYSkgewogICAgICAgIHZhciB4LCByOwogICAgICAgIG11ID0gbXUgPT0gbnVsbCA/IDAgOiArbXU7CiAgICAgICAgc2lnbWEgPSBzaWdtYSA9PSBudWxsID8gMSA6ICtzaWdtYTsKICAgICAgICByZXR1cm4gZnVuY3Rpb24oKSB7CiAgICAgICAgICB2YXIgeTsKCiAgICAgICAgICAvLyBJZiBhdmFpbGFibGUsIHVzZSB0aGUgc2Vjb25kIHByZXZpb3VzbHktZ2VuZXJhdGVkIHVuaWZvcm0gcmFuZG9tLgogICAgICAgICAgaWYgKHggIT0gbnVsbCkgeSA9IHgsIHggPSBudWxsOwoKICAgICAgICAgIC8vIE90aGVyd2lzZSwgZ2VuZXJhdGUgYSBuZXcgeCBhbmQgeS4KICAgICAgICAgIGVsc2UgZG8gewogICAgICAgICAgICB4ID0gc291cmNlKCkgKiAyIC0gMTsKIC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dW5jdGlvbiByZXF1ZXN0KHVybCwgY2FsbGJhY2spIHsKICAgICAgdmFyIHJlcXVlc3QsCiAgICAgICAgICBldmVudCA9IGRpc3BhdGNoKCJiZWZvcmVzZW5kIiwgInByb2dyZXNzIiwgImxvYWQiLCAiZXJyb3IiKSwKICAgICAgICAgIG1pbWVUeXBlLAogICAgICAgICAgaGVhZGVycyA9IG1hcCQxKCksCiAgICAgICAgICB4aHIgPSBuZXcgWE1MSHR0cFJlcXVlc3QsCiAgICAgICAgICB1c2VyID0gbnVsbCwKICAgICAgICAgIHBhc3N3b3JkID0gbnVsbCwKICAgICAgICAgIHJlc3BvbnNlLAogICAgICAgICAgcmVzcG9uc2VUeXBlLAogICAgICAgICAgdGltZW91dCA9IDA7CgogICAgICAvLyBJZiBJRSBkb2VzIG5vdCBzdXBwb3J0IENPUlMsIHVzZSBYRG9tYWluUmVxdWVzdC4KICAgICAgaWYgKHR5cGVvZiBYRG9tYWluUmVxdWVzdCAhPT0gInVuZGVmaW5lZCIKICAgICAgICAgICYmICEoIndpdGhDcmVkZW50aWFscyIgaW4geGhyKQogICAgICAgICAgJiYgL14oaHR0cChzKT86KT9cL1wvLy50ZXN0KHVybCkpIHhociA9IG5ldyBYRG9tYWluUmVxdWVzdDsKCiAgICAgICJvbmxvYWQiIGluIHhocgogICAgICAgICAgPyB4aHIub25sb2FkID0geGhyLm9uZXJyb3IgPSB4aHIub250aW1lb3V0ID0gcmVzcG9uZAogICAgICAgICAgOiB4aHIub25yZWFkeXN0YXRlY2hhbmdlID0gZnVuY3Rpb24obykgeyB4aHIucmVhZHlTdGF0ZSA+IDMgJiYgcmVzcG9uZChvKTsgfTsKCiAgICAgIGZ1bmN0aW9uIHJlc3BvbmQobykgewogICAgICAgIHZhciBzdGF0dXMgPSB4aHIuc3RhdHVzLCByZXN1bHQ7CiAgICAgICAgaWYgKCFzdGF0dXMgJiYgaGFzUmVzcG9uc2UoeGhyKQogICAgICAgICAgICB8fCBzdGF0dXMgPj0gMjAwICYmIHN0YXR1cyA8IDMwMAogICAgICAgICAgICB8fCBzdGF0dXMgPT09IDMwNCkgewogICAgICAgICAgaWYgKHJlc3BvbnNlKSB7CiAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgcmVzdWx0ID0gcmVzcG9uc2UuY2FsbChyZXF1ZXN0LCB4aHIpOwogICAgICAgICAgICB9IGNhdGNoIChlKSB7CiAgICAgICAgICAgICAgZXZlbnQuY2FsbCgiZXJyb3IiLCByZXF1ZXN0LCBlKTsKICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIHJlc3VsdCA9IHhocjsKICAgICAgICAgIH0KICAgICAgICAgIGV2ZW50LmNhbGwoImxvYWQiLCByZXF1ZXN0LCByZXN1bHQpOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICBldmVudC5jYWxsKCJlcnJvciIsIHJlcXVlc3QsIG8pOwogICAgICAgIH0KICAgICAgfQoKICAgICAgeGhyLm9ucHJvZ3Jlc3MgPSBmdW5jdGlvbihlKSB7CiAgICAgICAgZXZlbnQuY2FsbCgicHJvZ3Jlc3MiLCByZXF1ZXN0LCBlKTsKICAgICAgfTsKCiAgICAgIHJlcXVlc3QgPSB7CiAgICAgICAgaGVhZGVyOiBmdW5jdGlvbihuYW1lLCB2YWx1ZSkgewogICAgICAgICAgbmFtZSA9IChuYW1lICsgIiIpLnRvTG93ZXJDYXNlKCk7CiAgICAgICAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA8IDIpIHJldHVybiBoZWFkZXJzLmdldChuYW1lKTsKICAgICAgICAgIGlmICh2YWx1ZSA9PSBudWxsKSBoZWFkZXJzLnJlbW92ZShuYW1lKTsKICAgICAgICAgIGVsc2UgaGVhZGVycy5zZXQobmFtZSwgdmFsdWUgKyAiIik7CiAgICAgICAgICByZXR1cm4gcmVxdWVzdDsKICAgICAgICB9LAoKICAgICAgICAvLyBJZiBtaW1lVHlw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wgOiBkYXRhKTsKICAgICAgICAgIHJldHVybiByZXF1ZXN0OwogICAgICAgIH0sCgogICAgICAgIGFib3J0OiBmdW5jdGlvbigpIHsKICAgICAgICAgIHhoci5hYm9ydCgpOwogICAgICAgICAgcmV0dXJuIHJlcXVlc3Q7CiAgICAgICAgfSwKCiAgICAgICAgb246IGZ1bmN0aW9uKCkgewogICAgICAgICAgdmFyIHZhbHVlID0gZXZlbnQub24uYXBwbHkoZXZlbnQsIGFyZ3VtZW50cyk7CiAgICAgICAgICByZXR1cm4gdmFsdWUgPT09IGV2ZW50ID8gcmVxdWVzdCA6IHZhbHVlOwogICAgICAgIH0KICAgICAgfTsKCiAgICAgIGlmIChjYWxsYmFjayAhPSBudWxsKSB7CiAgICAgICAgaWYgKHR5cGVvZiBjYWxsYmFjayAhPT0gImZ1bmN0aW9uIikgdGhyb3cgbmV3IEVycm9yKCJpbnZhbGlkIGNhbGxiYWNrOiAiICsgY2FsbGJhY2spOwogICAgICAgIHJldHVybiByZXF1ZXN0LmdldChjYWxsYmFjayk7CiAgICAgIH0KCiAgICAgIHJldHVybiByZXF1ZXN0OwogICAgfQoKICAgIGZ1bmN0aW9uIGZpeENhbGxiYWNrKGNhbGxiYWNrKSB7CiAgICAgIHJldHVybiBmdW5jdGlvbihlcnJvciwgeGhyKSB7CiAgICAgICAgY2FsbGJhY2soZXJyb3IgPT0gbnVsbCA/IHhociA6IG51bGwpOwogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIGhhc1Jlc3BvbnNlKHhocikgewogICAgICB2YXIgdHlwZSA9IHhoci5yZXNwb25zZVR5cGU7CiAgICAgIHJldHVybiB0eXBlICYmIHR5cGUgIT09ICJ0ZXh0IgogICAgICAgICAgPyB4aHIucmVzcG9uc2UgLy8gbnVsbCBvbiBlcnJvcgogICAgICAgICAgOiB4aHIucmVzcG9uc2VUZXh0OyAvLyAiIiBvbiBlcnJvcgogICAgfQoKICAgIGZ1bmN0aW9uIHR5cGUkMihkZWZhdWx0TWltZVR5cGUsIHJlc3BvbnNlKSB7CiAgICAgIHJldHVybiBmdW5jdGlvbih1cmwsIGNhbGxiYWNrKSB7CiAgICAgICAgdmFyIHIgPSByZXF1ZXN0KHVybCkubWltZVR5cGUoZGVmYXVsdE1pbWVUeXBlKS5yZXNwb25zZShyZXNwb25zZSk7CiAgICAgICAgaWYgKGNhbGxiYWNrICE9IG51bGwpIHsKICAgICAgICAgIGlmICh0eXBlb2YgY2FsbGJhY2sgIT09ICJmdW5jdGlvbiIpIHRocm93IG5ldyBFcnJvcigiaW52YWxpZCBjYWxsYmFjazogIiArIGNhbGxiYWNrKTsKICAgICAgICAgIHJldHVybiByLmdldChjYWxsYmFjayk7CiAgICAgICAgfQogICAgICAgIHJldHVybiByOwogICAgICB9OwogICAgfQoKICAgIHZhciBodG1sJDIgPSB0eXBlJDIoInRleHQvaHRtbCIsIGZ1bmN0aW9uKHhocikgewogICAgICByZXR1cm4gZG9jdW1lbnQuY3JlYXRlUmFuZ2UoKS5jcmVhdGVDb250ZXh0dWFsRnJhZ21lbnQoeGhyLnJlc3BvbnNlVGV4dCk7CiAgICB9KTsKCiAgICB2YXIganNvbiQxID0gdHlwZSQyKCJhcHBsaWNhdGlvbi9qc29uIiwgZnVuY3Rpb24oeGhyKSB7CiAgICAgIHJldHVybiBKU09OLnBhcnNlKHhoci5yZXNwb25zZVRleHQpOwogICAgfSk7CgogICAgdmFyIHRleHQkMSA9IHR5cGUkMigidGV4dC9wbGFpbiIsIGZ1bmN0aW9uKHhocikgewogICAgICByZXR1cm4geGhyLnJlc3BvbnNlVGV4dDsKICAgIH0pOwoKICAgIHZhciB4bWwkMSA9IHR5cGUkMigiYXBwbGljYXRpb24veG1sIiwgZnVuY3Rpb24oeGhyKSB7CiAgICAgIHZhciB4bWwgPSB4aHIucmVzcG9uc2VYTUw7CiAgICAgIGlmICgheG1sKSB0aHJvdyBuZXcgRXJyb3IoInBhcnNlIGVycm9yIik7CiAgICAgIHJldHVybiB4bWw7Ci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jb21wYXJlKTsKICAgICAgcmV0dXJuIHsKICAgICAgICBsZWZ0OiBmdW5jdGlvbihhLCB4LCBsbywgaGkpIHsKICAgICAgICAgIGlmIChsbyA9PSBudWxsKSBsbyA9IDA7CiAgICAgICAgICBpZiAoaGkgPT0gbnVsbCkgaGkgPSBhLmxlbmd0aDsKICAgICAgICAgIHdoaWxlIChsbyA8IGhpKSB7CiAgICAgICAgICAgIHZhciBtaWQgPSBsbyArIGhpID4+PiAxOwogICAgICAgICAgICBpZiAoY29tcGFyZShhW21pZF0sIHgpIDwgMCkgbG8gPSBtaWQgKyAxOwogICAgICAgICAgICBlbHNlIGhpID0gbWlkOwogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIGxvOwogICAgICAgIH0sCiAgICAgICAgcmlnaHQ6IGZ1bmN0aW9uKGEsIHgsIGxvLCBoaSkgewogICAgICAgICAgaWYgKGxvID09IG51bGwpIGxvID0gMDsKICAgICAgICAgIGlmIChoaSA9PSBudWxsKSBoaSA9IGEubGVuZ3RoOwogICAgICAgICAgd2hpbGUgKGxvIDwgaGkpIHsKICAgICAgICAgICAgdmFyIG1pZCA9IGxvICsgaGkgPj4+IDE7CiAgICAgICAgICAgIGlmIChjb21wYXJlKGFbbWlkXSwgeCkgPiAwKSBoaSA9IG1pZDsKICAgICAgICAgICAgZWxzZSBsbyA9IG1pZCArIDE7CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gbG87CiAgICAgICAgfQogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIGFzY2VuZGluZ0NvbXBhcmF0b3IkNChmKSB7CiAgICAgIHJldHVybiBmdW5jdGlvbihkLCB4KSB7CiAgICAgICAgcmV0dXJuIGFzY2VuZGluZyQ5KGYoZCksIHgpOwogICAgICB9OwogICAgfQoKICAgIHZhciBhc2NlbmRpbmdCaXNlY3QkNCA9IGJpc2VjdG9yJDQoYXNjZW5kaW5nJDkpOwogICAgdmFyIGJpc2VjdFJpZ2h0JDIgPSBhc2Nlb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CkgewogICAgICAgIGZvciAodmFyIHByb3BlcnR5IGluIHRoaXMpIGlmIChwcm9wZXJ0eVswXSA9PT0gcHJlZml4JDMpIGRlbGV0ZSB0aGlzW3Byb3BlcnR5XTsKICAgICAgfSwKICAgICAga2V5czogZnVuY3Rpb24oKSB7CiAgICAgICAgdmFyIGtleXMgPSBbXTsKICAgICAgICBmb3IgKHZhciBwcm9wZXJ0eSBpbiB0aGlzKSBpZiAocHJvcGVydHlbMF0gPT09IHByZWZpeCQzKSBrZXlzLnB1c2gocHJvcGVydHkuc2xpY2UoMSkpOwogICAgICAgIHJldHVybiBrZXlzOwogICAgICB9LAogICAgICB2YWx1ZXM6IGZ1bmN0aW9uKCkgewogICAgICAgIHZhciB2YWx1ZXMgPSBbXTsKICAgICAgICBmb3IgKHZhciBwcm9wZXJ0eSBpbiB0aGlzKSBpZiAocHJvcGVydHlbMF0gPT09IHByZWZpeCQzKSB2YWx1ZXMucHVzaCh0aGlzW3Byb3BlcnR5XSk7CiAgICAgICAgcmV0dXJuIHZhbHVlczsKICAgICAgfSwKICAgICAgZW50cmllczogZnVuY3Rpb24oKSB7CiAgICAgICAgdmFyIGVudHJpZXMgPSBbXTsKICAgICAgICBmb3IgKHZhciBwcm9wZXJ0eSBpbiB0aGlzKSBpZiAocHJvcGVydHlbMF0gPT09IHByZWZpeCQzKSBlbnRyaWVzLnB1c2goe2tleTogcHJvcGVydHkuc2xpY2UoMSksIHZhbHVlOiB0aGlzW3Byb3BlcnR5XX0pOwogICAgICAgIHJldHVybiBlbnRyaWVzOwogICAgICB9LAogICAgICBzaXplOiBmdW5jdGlvbigpIHsKICAgICAgICB2YXIgc2l6ZSA9IDA7CiAgICAgICAgZm9yICh2YXIgcHJvcGVydHkgaW4gdGhpcykgaWYgKHByb3BlcnR5WzBdID09PSBwcmVmaXgkMykgKytzaXplOwogICAgICAgIHJldHVybiBzaXplOwogICAgICB9LAogICAgICBlbXB0eTogZnVuY3Rpb24oKSB7CiAgICAgICAgZm9y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zZSB3aGlsZSAoKytpIDwgbikgc2V0LmFkZChmKG9iamVjdFtpXSwgaSwgb2JqZWN0KSk7CiAgICAgIH0KCiAgICAgIHJldHVybiBzZXQ7CiAgICB9CgogICAgdmFyIGFycmF5JDYgPSBBcnJheS5wcm90b3R5cGU7CgogICAgdmFyIG1hcCQ4ID0gYXJyYXkkNi5tYXA7CiAgICB2YXIgc2xpY2UkYyA9IGFycmF5JDYuc2xpY2U7CgogICAgdmFyIGltcGxpY2l0JDEgPSB7bmFtZTogImltcGxpY2l0In07CgogICAgZnVuY3Rpb24gb3JkaW5hbCQxKHJhbmdlKSB7CiAgICAgIHZhciBpbmRleCA9IG1hcCQ3KCksCiAgICAgICAgICBkb21haW4gPSBbXSwKICAgICAgICAgIHVua25vd24gPSBpbXBsaWNpdCQxOwoKICAgICAgcmFuZ2UgPSByYW5nZSA9PSBudWxsID8gW10gOiBzbGljZSRjLmNhbGwocmFuZ2UpOwoKICAgICAgZnVuY3Rpb24gc2NhbGUoZCkgewogICAgICAgIHZhciBrZXkgPSBkICsgIiIsIGkgPSBpbmRleC5nZXQoa2V5KTsKICAgICAgICBpZiAoIWkpIHsKICAgICAgICAgIGlmICh1bmtub3duICE9PSBpbXBsaWNpdCQxKSByZXR1cm4gdW5rbm93bjsKICAgICAgICAgIGluZGV4LnNldChrZXksIGkgPSBkb21haW4ucHVzaChkKSk7CiAgICAgICAgfQogICAgICAgIHJldHVybiByYW5nZVsoaSAtIDEpICUgcmFuZ2UubGVuZ3RoXTsKICAgICAgfQoKICAgICAgc2NhbGUuZG9tYWluID0gZnVuY3Rpb24oXykgewogICAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuIGRvbWFpbi5zbGljZSgpOwogICAgICAgIGRvbWFpbiA9IFtdLCBpbmRleCA9IG1hcCQ3KCk7CiAgICAgICAgdmFyIGkgPSAtMSwgbiA9IF8ubGVuZ3RoLCBkLCBrZXk7CiAgICAgICAgd2hpbGUgKCsraSA8IG4pIGlmICghaW5kZXguaGFzKGtleSA9IChkID0gX1tpXSkgKyAiIikpIGluZGV4LnNldChrZXksIGRvbWFpbi5wdXNoKGQpKTsKICAgICAgICByZXR1cm4gc2NhbGU7CiAgICAgIH07CgogICAgICBzY2FsZS5yYW5nZSA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChyYW5nZSA9IHNsaWNlJGMuY2FsbChfKSwgc2NhbGUpIDogcmFuZ2Uuc2xpY2UoKTsKICAgICAgfTsKCiAgICAgIHNjYWxlLnVua25vd24gPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAodW5rbm93biA9IF8sIHNjYWxlKSA6IHVua25vd247CiAgICAgIH07CgogICAgICBzY2FsZS5jb3B5ID0gZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuIG9yZGluYWwkMSgpCiAgICAgICAgICAgIC5kb21haW4oZG9tYWluKQogICAgICAgICAgICAucmFuZ2UocmFuZ2UpCiAgICAgICAgICAgIC51bmtub3duKHVua25vd24pOwogICAgICB9OwoKICAgICAgcmV0dXJuIHNjYWxlOwogICAgfQoKICAgIGZ1bmN0aW9uIGJhbmQkMSgpIHsKICAgICAgdmFyIHNjYWxlID0gb3JkaW5hbCQxKCkudW5rbm93bih1bmRlZmluZWQpLAogICAgICAgICAgZG9tYWluID0gc2NhbGUuZG9tYWluLAogICAgICAgICAgb3JkaW5hbFJhbmdlID0gc2NhbGUucmFuZ2UsCiAgICAgICAgICByYW5nZSA9IFswLCAxXSwKICAgICAgICAgIHN0ZXAsCiAgICAgICAgICBiYW5kd2lkdGgsCiAgICAgICAgICByb3VuZCA9IGZhbHNlLAogICAgICAgICAgcGFkZGluZ0lubmVyID0gMCwKICAgICAgICAgIHBhZGRpbmdPdXRlciA9IDAsCiAgICAgICAgICBhbGlnbiA9IDAuNTsKCiAgICAgIGRlbGV0ZSBzY2FsZS51bmtub3du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XJuIGFyZ3VtZW50cy5sZW5ndGggPyAocGFkZGluZ091dGVyID0gTWF0aC5tYXgoMCwgTWF0aC5taW4oMSwgXykpLCByZXNjYWxlKCkpIDogcGFkZGluZ091dGVyOwogICAgICB9OwoKICAgICAgc2NhbGUuYWxpZ24gPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoYWxpZ24gPSBNYXRoLm1heCgwLCBNYXRoLm1pbigxLCBfKSksIHJlc2NhbGUoKSkgOiBhbGlnbjsKICAgICAgfTsKCiAgICAgIHNjYWxlLmNvcHkgPSBmdW5jdGlvbigpIHsKICAgICAgICByZXR1cm4gYmFuZCQxKCkKICAgICAgICAgICAgLmRvbWFpbihkb21haW4oKSkKICAgICAgICAgICAgLnJhbmdlKHJhbmdlKQogICAgICAgICAgICAucm91bmQocm91bmQpCiAgICAgICAgICAgIC5wYWRkaW5nSW5uZXIocGFkZGluZ0lubmVyKQogICAgICAgICAgICAucGFkZGluZ091dGVyKHBhZGRpbmdPdXRlcikKICAgICAgICAgICAgLmFsaWduKGFsaWduKTsKICAgICAgfTsKCiAgICAgIHJldHVybiByZXNjYWxlKCk7CiAgICB9CgogICAgZnVuY3Rpb24gcG9pbnRpc2gkMShzY2FsZSkgewogICAgICB2YXIgY29weSA9IHNjYWxlLmNvcHk7CgogICAgICBzY2FsZS5wYWRkaW5nID0gc2NhbGUucGFkZGluZ091dGVyOwogICAgICBkZWxldGUgc2NhbGUucGFkZGluZ0lubmVyOwogICAgICBkZWxldGUgc2NhbGUucGFkZGluZ091dGVyOwoKICAgICAgc2NhbGUuY29weSA9IGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiBwb2ludGlzaCQxKGNvcHkoKSk7CiAgICAgIH07CgogICAgICByZXR1cm4gc2NhbGU7CiAgICB9CgogICAgZnVuY3Rpb24gcG9pbnQkOCgpIHsKICAgICAgcmV0dXJuIHBvaW50aXNoJDEoYmFuZCQxKCkucGFkZGlu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HhmZjQ1MDAsCiAgICAgIG9yY2hpZDogMHhkYTcwZDYsCiAgICAgIHBhbGVnb2xkZW5yb2Q6IDB4ZWVlOGFhLAogICAgICBwYWxlZ3JlZW46IDB4OThmYjk4LAogICAgICBwYWxldHVycXVvaXNlOiAweGFmZWVlZSwKICAgICAgcGFsZXZpb2xldHJlZDogMHhkYjcwOTMsCiAgICAgIHBhcGF5YXdoaXA6IDB4ZmZlZmQ1LAogICAgICBwZWFjaHB1ZmY6IDB4ZmZkYWI5LAogICAgICBwZXJ1OiAweGNkODUzZiwKICAgICAgcGluazogMHhmZmMwY2IsCiAgICAgIHBsdW06IDB4ZGRhMGRkLAogICAgICBwb3dkZXJibHVlOiAweGIwZTBlNiwKICAgICAgcHVycGxlOiAweDgwMDA4MCwKICAgICAgcmViZWNjYXB1cnBsZTogMHg2NjMzOTksCiAgICAgIHJlZDogMHhmZjAwMDAsCiAgICAgIHJvc3licm93bjogMHhiYzhmOGYsCiAgICAgIHJveWFsYmx1ZTogMHg0MTY5ZTEsCiAgICAgIHNhZGRsZWJyb3duOiAweDhiNDUxMywKICAgICAgc2FsbW9uOiAweGZhODA3MiwKICAgICAgc2FuZHlicm93bjogMHhmNGE0NjAsCiAgICAgIHNlYWdyZWVuOiAweDJlOGI1NywKICAgICAgc2Vhc2hlbGw6IDB4ZmZmNWVlLAogICAgICBzaWVubmE6IDB4YTA1MjJkLAogICAgICBzaWx2ZXI6IDB4YzBjMGMwLAogICAgICBza3libHVlOiAweDg3Y2VlYiwKICAgICAgc2xhdGVibHVlOiAweDZhNWFjZCwKICAgICAgc2xhdGVncmF5OiAweDcwODA5MCwKICAgICAgc2xhdGVncmV5OiAweDcwODA5MCwKICAgICAgc25vdzogMHhmZmZhZmEsCiAgICAgIHNwcmluZ2dyZWVuOiAweDAwZmY3ZiwKICAgICAgc3RlZWxibHVlOiAweDQ2ODJiNCwKICAgICAgdGFuOiAweGQyYjQ4YywKICAgICAgdGVhbDogMHgwMDgwODAsCiAgICAgI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DJyZ2IkNChoID49IDI0MCA/IGggLSAyNDAgOiBoICsgMTIwLCBtMSwgbTIpLAogICAgICAgICAgaHNsMnJnYiQ0KGgsIG0xLCBtMiksCiAgICAgICAgICBoc2wycmdiJDQoaCA8IDEyMCA/IGggKyAyNDAgOiBoIC0gMTIwLCBtMSwgbTIpLAogICAgICAgICAgdGhpcy5vcGFjaXR5CiAgICAgICAgKTsKICAgICAgfSwKICAgICAgZGlzcGxheWFibGU6IGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiAoMCA8PSB0aGlzLnMgJiYgdGhpcy5zIDw9IDEgfHwgaXNOYU4odGhpcy5zKSkKICAgICAgICAgICAgJiYgKDAgPD0gdGhpcy5sICYmIHRoaXMubCA8PSAxKQogICAgICAgICAgICAmJiAoMCA8PSB0aGlzLm9wYWNpdHkgJiYgdGhpcy5vcGFjaXR5IDw9IDEpOwogICAgICB9LAogICAgICBmb3JtYXRIc2w6IGZ1bmN0aW9uKCkgewogICAgICAgIHZhciBhID0gdGhpcy5vcGFjaXR5OyBhID0gaXNOYU4oYSkgPyAxIDogTWF0aC5tYXgoMCwgTWF0aC5taW4oMSwgYSkpOwogICAgICAgIHJldHVybiAoYSA9PT0gMSA/ICJoc2woIiA6ICJoc2xhKCIpCiAgICAgICAgICAgICsgKHRoaXMuaCB8fCAwKSArICIsICIKICAgICAgICAgICAgKyAodGhpcy5zIHx8IDApICogMTAwICsgIiUsICIKICAgICAgICAgICAgKyAodGhpcy5sIHx8IDApICogMTAwICsgIiUiCiAgICAgICAgICAgICsgKGEgPT09IDEgPyAiKSIgOiAiLCAiICsgYSArICIpIik7CiAgICAgIH0KICAgIH0pKTsKCiAgICAvKiBGcm9tIEZ2RCAxMy4zNywgQ1NTIENvbG9yIE1vZHVsZSBMZXZlbCAzICovCiAgICBmdW5jdGlvbiBoc2wycmdiJDQoaCwgbTEsIG0yKSB7CiAgICAgIHJldHVybiAoaCA8IDYwID8gbTEgKyAobTIgLSBtMSkgKiBoIC8gNjAKICAgICAgICAgIDogaCA8IDE4MCA/IG0yCiAgICAgICAgICA6IGggPCAyNDAgPyBtMSArIChtMiAtIG0xKSAqICgyNDAgLSBoKSAvIDYwCiAgICAgICAgICA6IG0xKSAqIDI1NTsKICAgIH0KCiAgICB2YXIgZGVnMnJhZCQzID0gTWF0aC5QSSAvIDE4MDsKICAgIHZhciByYWQyZGVnJDMgPSAxODAgLyBNYXRoLlBJOwoKICAgIHZhciBBJDMgPSAtMC4xNDg2MSwKICAgICAgICBCJDMgPSArMS43ODI3NywKICAgICAgICBDJDMgPSAtMC4yOTIyNywKICAgICAgICBEJDMgPSAtMC45MDY0OSwKICAgICAgICBFJDMgPSArMS45NzI5NCwKICAgICAgICBFRCQzID0gRSQzICogRCQzLAogICAgICAgIEVCJDMgPSBFJDMgKiBCJDMsCiAgICAgICAgQkNfREEkMyA9IEIkMyAqIEMkMyAtIEQkMyAqIEEkMzsKCiAgICBmdW5jdGlvbiBjdWJlaGVsaXhDb252ZXJ0JDMobykgewogICAgICBpZiAobyBpbnN0YW5jZW9mIEN1YmVoZWxpeCQzKSByZXR1cm4gbmV3IEN1YmVoZWxpeCQzKG8uaCwgby5zLCBvLmwsIG8ub3BhY2l0eSk7CiAgICAgIGlmICghKG8gaW5zdGFuY2VvZiBSZ2IkNCkpIG8gPSByZ2JDb252ZXJ0JDQobyk7CiAgICAgIHZhciByID0gby5yIC8gMjU1LAogICAgICAgICAgZyA9IG8uZyAvIDI1NSwKICAgICAgICAgIGIgPSBvLmIgLyAyNTUsCiAgICAgICAgICBsID0gKEJDX0RBJDMgKiBiICsgRUQkMyAqIHIgLSBFQiQzICogZykgLyAoQkNfREEkMyArIEVEJDMgLSBFQiQzKSwKICAgICAgICAgIGJsID0gYiAtIGwsCiAgICAgICAgICBrID0gKEUkMyAqIChnIC0gbCkgLSBDJDMgKiBibCkgLyBEJDMsCiAgICAgICAgICBzID0gTWF0aC5zcXJ0KGsgKiBrICsgYmwgKiBibCkgLyAoRSQzICogbCAq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ldyBDdWJlaGVsaXgkMyh0aGlzLmgsIHRoaXMucywgdGhpcy5sICogaywgdGhpcy5vcGFjaXR5KTsKICAgICAgfSwKICAgICAgcmdiOiBmdW5jdGlvbigpIHsKICAgICAgICB2YXIgaCA9IGlzTmFOKHRoaXMuaCkgPyAwIDogKHRoaXMuaCArIDEyMCkgKiBkZWcycmFkJDMsCiAgICAgICAgICAgIGwgPSArdGhpcy5sLAogICAgICAgICAgICBhID0gaXNOYU4odGhpcy5zKSA/IDAgOiB0aGlzLnMgKiBsICogKDEgLSBsKSwKICAgICAgICAgICAgY29zaCA9IE1hdGguY29zKGgpLAogICAgICAgICAgICBzaW5oID0gTWF0aC5zaW4oaCk7CiAgICAgICAgcmV0dXJuIG5ldyBSZ2IkNCgKICAgICAgICAgIDI1NSAqIChsICsgYSAqIChBJDMgKiBjb3NoICsgQiQzICogc2luaCkpLAogICAgICAgICAgMjU1ICogKGwgKyBhICogKEMkMyAqIGNvc2ggKyBEJDMgKiBzaW5oKSksCiAgICAgICAgICAyNTUgKiAobCArIGEgKiAoRSQzICogY29zaCkpLAogICAgICAgICAgdGhpcy5vcGFjaXR5CiAgICAgICAgKTsKICAgICAgfQogICAgfSkpOwoKICAgIGZ1bmN0aW9uIGNvbnN0YW50JHAoeCkgewogICAgICByZXR1cm4gZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuIHg7CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gbGluZWFyJDYoYSwgZCkgewogICAgICByZXR1cm4gZnVuY3Rpb24odCkgewogICAgICAgIHJldHVybiBhICsgdCAqIGQ7CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gZXhwb25lbnRpYWwkNShhLCBiLCB5KSB7CiAgICAgIHJldHVybiBhID0gTWF0aC5wb3coYSwgeSksIGIgPSBNYXRoLnBvdyhiLCB5KSAtIGEsIHkgPSAxIC8geSwgZnVuY3Rpb24odCkgewogICAgICAgIHJldHVybiBNYXRoLnBvdyhhICsgdC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4gZnVuY3Rpb24odCkgewogICAgICAgICAgc3RhcnQuciA9IHIodCk7CiAgICAgICAgICBzdGFydC5nID0gZyh0KTsKICAgICAgICAgIHN0YXJ0LmIgPSBiKHQpOwogICAgICAgICAgc3RhcnQub3BhY2l0eSA9IG9wYWNpdHkodCk7CiAgICAgICAgICByZXR1cm4gc3RhcnQgKyAiIjsKICAgICAgICB9OwogICAgICB9CgogICAgICByZ2IuZ2FtbWEgPSByZ2JHYW1tYTsKCiAgICAgIHJldHVybiByZ2I7CiAgICB9KSgxKTsKCiAgICBmdW5jdGlvbiBudW1iZXJBcnJheSQyKGEsIGIpIHsKICAgICAgaWYgKCFiKSBiID0gW107CiAgICAgIHZhciBuID0gYSA/IE1hdGgubWluKGIubGVuZ3RoLCBhLmxlbmd0aCkgOiAwLAogICAgICAgICAgYyA9IGIuc2xpY2UoKSwKICAgICAgICAgIGk7CiAgICAgIHJldHVybiBmdW5jdGlvbih0KSB7CiAgICAgICAgZm9yIChpID0gMDsgaSA8IG47ICsraSkgY1tpXSA9IGFbaV0gKiAoMSAtIHQpICsgYltpXSAqIHQ7CiAgICAgICAgcmV0dXJuIGM7CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gaXNOdW1iZXJBcnJheSQyKHgpIHsKICAgICAgcmV0dXJuIEFycmF5QnVmZmVyLmlzVmlldyh4KSAmJiAhKHggaW5zdGFuY2VvZiBEYXRhVmlldyk7CiAgICB9CgogICAgZnVuY3Rpb24gZ2VuZXJpY0FycmF5JDIoYSwgYikgewogICAgICB2YXIgbmIgPSBiID8gYi5sZW5ndGggOiAwLAogICAgICAgICAgbmEgPSBhID8gTWF0aC5taW4obmIsIGEubGVuZ3RoKSA6IDAsCiAgICAgICAgICB4ID0gbmV3IEFycmF5KG5hKSwKICAgICAgICAgIGMgPSBuZXcgQXJyYXkobmIpLAogICAgICAgICAgaTsKCiAgICAgIGZvciAoaSA9IDA7IGkgPCBuYTsgKytpKSB4W2ldID0gaW50ZXJwb2xhdGVWYWx1ZSQxKGFbaV0sIGJbaV0pOwogICAgICBmb3IgKDsgaSA8IG5iOyArK2kpIGNbaV0gPSBiW2ldOwoKICAgICAgcmV0dXJuIGZ1bmN0aW9uKHQpIHsKICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbmE7ICsraSkgY1tpXSA9IHhbaV0odCk7CiAgICAgICAgcmV0dXJuIGM7CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gZGF0ZSQ0KGEsIGIpIHsKICAgICAgdmFyIGQgPSBuZXcgRGF0ZTsKICAgICAgcmV0dXJuIGEgPSArYSwgYiA9ICtiLCBmdW5jdGlvbih0KSB7CiAgICAgICAgcmV0dXJuIGQuc2V0VGltZShhICogKDEgLSB0KSArIGIgKiB0KSwgZDsKICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiByZWludGVycG9sYXRlKGEsIGIpIHsKICAgICAgcmV0dXJuIGEgPSArYSwgYiA9ICtiLCBmdW5jdGlvbih0KSB7CiAgICAgICAgcmV0dXJuIGEgKiAoMSAtIHQpICsgYiAqIHQ7CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gb2JqZWN0JDUoYSwgYikgewogICAgICB2YXIgaSA9IHt9LAogICAgICAgICAgYyA9IHt9LAogICAgICAgICAgazsKCiAgICAgIGlmIChhID09PSBudWxsIHx8IHR5cGVvZiBhICE9PSAib2JqZWN0IikgYSA9IHt9OwogICAgICBpZiAoYiA9PT0gbnVsbCB8fCB0eXBlb2YgYiAhPT0gIm9iamVjdCIpIGIgPSB7fTsKCiAgICAgIGZvciAoayBpbiBiKSB7CiAgICAgICAgaWYgKGsgaW4gYSkgewogICAgICAgICAgaVtrXSA9IGludGVycG9sYXRlVmFsdWUkMShhW2tdLCBiW2tdKTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgY1trXSA9IGJba107CiAgICAgICAgfQogICAgICB9CgogICAgICByZXR1cm4gZnVuY3Rpb24odCkgewogICAgICAgIGZvciAoayBpbiBpKSBjW2tdID0gaVtrXSh0KTsKICAgICAgICByZXR1cm4gYzsKICAgICAgfTsKICAgIH0KCiAgICB2YXIgcmVBJDMgPSAvWy0rXT8oPzpcZCtcLj9cZCp8XC4/XGQrKSg/OltlRV1bLStdP1xkKyk/L2csCiAgICAgICAgcmVCJDMgPSBuZXcgUmVnRXhwKHJlQSQzLnNvdXJjZSwgImciKTsKCiAgICBmdW5jdGlvbiB6ZXJvJDMoYikgewogICAgICByZXR1cm4gZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuIGI7CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gb25lJDMoYikgewogICAgICByZXR1cm4gZnVuY3Rpb24odCkgewogICAgICAgIHJldHVybiBiKHQpICsgIiI7CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gc3RyaW5nJDEoYSwgYikgewogICAgICB2YXIgYmkgPSByZUEkMy5sYXN0SW5kZXggPSByZUIkMy5sYXN0SW5kZXggPSAwLCAvLyBzY2FuIGluZGV4IGZvciBuZXh0IG51bWJlciBpbiBiCiAgICAgICAgICBhbSwgLy8gY3VycmVudCBtYXRjaCBpbiBhCiAgICAgICAgICBibSwgLy8gY3VycmVudCBtYXRjaCBpbiBiCiAgICAgICAgICBicywgLy8gc3RyaW5nIHByZWNlZGluZyBjdXJyZW50IG51bWJlciBpbiBiLCBpZiBhbnkKICAgICAgICAgIGkgPSAtMSwgLy8gaW5kZXggaW4gcwogICAgICAgICAgcyA9IFtdLCAvLyBzdHJpbmcgY29uc3RhbnRzIGFuZCBwbGFjZWhvbGRlcnMKICAgICAgICAgIHEgPSBbXTsgLy8gbnVtYmVyIGludGVycG9sYXRvcnMKCiAgICAgIC8vIENvZXJjZSBpbnB1dHMgdG8gc3RyaW5ncy4KICAgICAgYSA9IGEgKyAiIiwgYiA9IGIgKyAiIjsKCiAgICAgIC8vIEludGVycG9sYXRlIHBhaXJzIG9mIG51bWJlcnMgaW4gYSAmIGIuCiAgICAgIHdoaWxlICgoYW0gPSByZUEkMy5leGVjKGEpKQogICAgICAgICAgJiYgKGJtID0gcmVCJDMuZXhlYyhiKSkpIHsKICAgICAgICBpZiAoKGJzID0gYm0uaW5kZXgpID4gYmkpIHsgLy8gYSBzdHJpbmcgcHJlY2VkZXMgdGhlIG5leHQgbnVtYmVyIGluIGIKICAgICAgICAgIGJzID0gYi5zbGljZShiaSwgYnMpOwogICAgICAgICAgaWYgKHNbaV0pIHNbaV0gKz0gYnM7IC8vIGNvYWxlc2NlIHdpdGggcHJldmlvdXMgc3RyaW5nCiAgICAgICAgICBlbHNlIHNbKytpXSA9IGJzOwogICAgICAgIH0KICAgICAgICBpZiAoKGFtID0gYW1bMF0pID09PSAoYm0gPSBibVswXSkpIHsgLy8gbnVtYmVycyBpbiBhICYgYiBtYXRjaAogICAgICAgICAgaWYgKHNbaV0pIHNbaV0gKz0gYm07IC8vIGNvYWxlc2NlIHdpdGggcHJldmlvdXMgc3RyaW5nCiAgICAgICAgICBlbHNlIHNbKytpXSA9IGJtOwogICAgICAgIH0gZWxzZSB7IC8vIGludGVycG9sYXRlIG5vbi1tYXRjaGluZyBudW1iZXJzCiAgICAgICAgICBzWysraV0gPSBudWxsOwogICAgICAgICAgcS5wdXNoKHtpOiBpLCB4OiByZWludGVycG9sYXRlKGFtLCBibSl9KTsKICAgICAgICB9CiAgICAgICAgYmkgPSByZUIkMy5sYXN0SW5kZXg7CiAgICAgIH0KCiAgICAgIC8vIEFkZCByZW1haW5zIG9mIGIuCiAgICAgIGlmIChiaSA8IGIubGVuZ3RoKSB7CiAgICAgICAgYnMgPSBiLnNsaWNlKGJpKTsKICAgICAgICBpZiAoc1tpXSkgc1tpXSArPSBiczsgLy8gY29hbGVzY2Ugd2l0aCBwcmV2aW91cyBzdHJpbmcKICAgICAgICBlbHNlIHNbKytpXSA9IGJzOwogICAgICB9CgogICAgICAvLyBTcGVjaWFsIG9wdGltaXphdGlvbiBmb3Igb25seSBhIHNpbmdsZSBtYXRjaC4KICAgICAg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WJlaGVsaXg7CiAgICAgIH0pKDEpOwogICAgfQoKICAgIGN1YmVoZWxpeCQ5KGh1ZSQzKTsKICAgIHZhciBjdWJlaGVsaXhMb25nJDIgPSBjdWJlaGVsaXgkOShub2dhbW1hJDMpOwoKICAgIGZ1bmN0aW9uIGNvbnN0YW50JHEoeCkgewogICAgICByZXR1cm4gZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuIHg7CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gbnVtYmVyJDgoeCkgewogICAgICByZXR1cm4gK3g7CiAgICB9CgogICAgdmFyIHVuaXQkMSA9IFswLCAxXTsKCiAgICBmdW5jdGlvbiBkZWludGVycG9sYXRlTGluZWFyKGEsIGIpIHsKICAgICAgcmV0dXJuIChiIC09IChhID0gK2EpKQogICAgICAgICAgPyBmdW5jdGlvbih4KSB7IHJldHVybiAoeCAtIGEpIC8gYjsgfQogICAgICAgICAgOiBjb25zdGFudCRxKGIpOwogICAgfQoKICAgIGZ1bmN0aW9uIGRlaW50ZXJwb2xhdGVDbGFtcChkZWludGVycG9sYXRlKSB7CiAgICAgIHJldHVybiBmdW5jdGlvbihhLCBiKSB7CiAgICAgICAgdmFyIGQgPSBkZWludGVycG9sYXRlKGEgPSArYSwgYiA9ICtiKTsKICAgICAgICByZXR1cm4gZnVuY3Rpb24oeCkgeyByZXR1cm4geCA8PSBhID8gMCA6IHggPj0gYiA/IDEgOiBkKHgpOyB9OwogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIHJlaW50ZXJwb2xhdGVDbGFtcChyZWludGVycG9sYXRlKSB7CiAgICAgIHJldHVybiBmdW5jdGlvbihhLCBiKSB7CiAgICAgICAgdmFyIHIgPSByZWludGVycG9sYXRlKGEgPSArYSwgYiA9ICtiKTsKICAgICAgICByZXR1cm4gZnVuY3Rpb24odCkgeyByZXR1cm4gdCA8PSAwID8gYSA6IHQgPj0gMSA/IGIgOiByKHQpOyB9OwogICAgICB9OwogICAgfQoKICAg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CBlaXRoZXIgaGFzIHRoZSBmb3JtIFxkXC5cZCtlWy0rXVxkKwogICAgICAvLyAoZS5nLiwgMS4yZSszKSBvciB0aGUgZm9ybSBcZGVbLStdXGQrIChlLmcuLCAxZSszKS4KICAgICAgcmV0dXJuIFsKICAgICAgICBjb2VmZmljaWVudC5sZW5ndGggPiAxID8gY29lZmZpY2llbnRbMF0gKyBjb2VmZmljaWVudC5zbGljZSgyKSA6IGNvZWZmaWNpZW50LAogICAgICAgICt4LnNsaWNlKGkgKyAxKQogICAgICBdOwogICAgfQoKICAgIGZ1bmN0aW9uIGV4cG9uZW50JDQoeCkgewogICAgICByZXR1cm4geCA9IGZvcm1hdERlY2ltYWwkMihNYXRoLmFicyh4KSksIHggPyB4WzFdIDogTmFOOwogICAgfQoKICAgIGZ1bmN0aW9uIGZvcm1hdEdyb3VwJDIoZ3JvdXBpbmcsIHRob3VzYW5kcykgewogICAgICByZXR1cm4gZnVuY3Rpb24odmFsdWUsIHdpZHRoKSB7CiAgICAgICAgdmFyIGkgPSB2YWx1ZS5sZW5ndGgsCiAgICAgICAgICAgIHQgPSBbXSwKICAgICAgICAgICAgaiA9IDAsCiAgICAgICAgICAgIGcgPSBncm91cGluZ1swXSwKICAgICAgICAgICAgbGVuZ3RoID0gMDsKCiAgICAgICAgd2hpbGUgKGkgPiAwICYmIGcgPiAwKSB7CiAgICAgICAgICBpZiAobGVuZ3RoICsgZyArIDEgPiB3aWR0aCkgZyA9IE1hdGgubWF4KDEsIHdpZHRoIC0gbGVuZ3RoKTsKICAgICAgICAgIHQucHVzaCh2YWx1ZS5zdWJzdHJpbmcoaSAtPSBnLCBpICsgZykpOwogICAgICAgICAgaWYgKChsZW5ndGggKz0gZyArIDEpID4gd2lkdGgpIGJyZWFrOwogICAgICAgICAgZyA9IGdyb3VwaW5nW2ogPSAoaiArIDEpICUgZ3JvdXBpbmcubGVuZ3RoXTsKICAgICAgICB9CgogICAgICAgIHJldHVybiB0LnJldmVyc2UoKS5qb2luKHRob3VzYW5kcyk7CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gZm9ybWF0TnVtZXJhbHMkMihudW1lcmFscykgewogICAgICByZXR1cm4gZnVuY3Rpb24odmFsdWUpIHsKICAgICAgICByZXR1cm4gdmFsdWUucmVwbGFjZSgvWzAtOV0vZywgZnVuY3Rpb24oaSkgewogICAgICAgICAgcmV0dXJuIG51bWVyYWxzWytpXTsKICAgICAgICB9KTsKICAgICAgfTsKICAgIH0KCiAgICAvLyBbW2ZpbGxdYWxpZ25dW3NpZ25dW3N5bWJvbF1bMF1bd2lkdGhdWyxdWy5wcmVjaXNpb25dW35dW3R5cGVdCiAgICB2YXIgcmUkMiA9IC9eKD86KC4pPyhbPD49Xl0pKT8oWytcLSggXSk/KFskI10pPygwKT8oXGQrKT8oLCk/KFwuXGQrKT8ofik/KFthLXolXSk/JC9pOwoKICAgIGZ1bmN0aW9uIGZvcm1hdFNwZWNpZmllciQyKHNwZWNpZmllcikgewogICAgICBpZiAoIShtYXRjaCA9IHJlJDIuZXhlYyhzcGVjaWZpZXIpKSkgdGhyb3cgbmV3IEVycm9yKCJpbnZhbGlkIGZvcm1hdDogIiArIHNwZWNpZmllcik7CiAgICAgIHZhciBtYXRjaDsKICAgICAgcmV0dXJuIG5ldyBGb3JtYXRTcGVjaWZpZXIkMih7CiAgICAgICAgZmlsbDogbWF0Y2hbMV0sCiAgICAgICAgYWxpZ246IG1hdGNoWzJdLAogICAgICAgIHNpZ246IG1hdGNoWzNdLAogICAgICAgIHN5bWJvbDogbWF0Y2hbNF0sCiAgICAgICAgemVybzogbWF0Y2hbNV0sCiAgICAgICAgd2lkdGg6IG1hdGNoWzZdLAogICAgICAgIGNvbW1hOiBtYXRjaFs3XSwKICAgICAgICBwcmVjaXNpb246IG1hdGNoWzhdICYmIG1hdGNoWzhdLnNsaWNlKDEpLAogICAgICAgIHRyaW06IG1hdGNoWzldLAogICAgICAgIHR5cGU6IG1hdGNoWzEwXQogICAgICB9KTsKIC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3RvdHlwZS50b1N0cmluZyA9IGZ1bmN0aW9uKCkgewogICAgICByZXR1cm4gdGhpcy5maWxsCiAgICAgICAgICArIHRoaXMuYWxpZ24KICAgICAgICAgICsgdGhpcy5zaWduCiAgICAgICAgICArIHRoaXMuc3ltYm9sCiAgICAgICAgICArICh0aGlzLnplcm8gPyAiMCIgOiAiIikKICAgICAgICAgICsgKHRoaXMud2lkdGggPT09IHVuZGVmaW5lZCA/ICIiIDogTWF0aC5tYXgoMSwgdGhpcy53aWR0aCB8IDApKQogICAgICAgICAgKyAodGhpcy5jb21tYSA/ICIsIiA6ICIiKQogICAgICAgICAgKyAodGhpcy5wcmVjaXNpb24gPT09IHVuZGVmaW5lZCA/ICIiIDogIi4iICsgTWF0aC5tYXgoMCwgdGhpcy5wcmVjaXNpb24gfCAwKSkKICAgICAgICAgICsgKHRoaXMudHJpbSA/ICJ+IiA6ICIiKQogICAgICAgICAgKyB0aGlzLnR5cGU7CiAgICB9OwoKICAgIC8vIFRyaW1zIGluc2lnbmlmaWNhbnQgemVyb3MsIGUuZy4sIHJlcGxhY2VzIDEuMjAwMGsgd2l0aCAxLjJrLgogICAgZnVuY3Rpb24gZm9ybWF0VHJpbSQxKHMpIHsKICAgICAgb3V0OiBmb3IgKHZhciBuID0gcy5sZW5ndGgsIGkgPSAxLCBpMCA9IC0xLCBpMTsgaSA8IG47ICsraSkgewogICAgICAgIHN3aXRjaCAoc1tpXSkgewogICAgICAgICAgY2FzZSAiLiI6IGkwID0gaTEgPSBpOyBicmVhazsKICAgICAgICAgIGNhc2UgIjAiOiBpZiAoaTAgPT09IDApIGkwID0gaTsgaTEgPSBpOyBicmVhazsKICAgICAgICAgIGRlZmF1bHQ6IGlmICghK3NbaV0pIGJyZWFrIG91dDsgaWYgKGkwID4gMCkgaTAgPSAwOyBicmVhazsKICAgICAgICB9CiAgICAgIH0KICAgICAgcmV0dXJuIGkwID4gMCA/IHMuc2xpY2UoMCwgaTApICsgcy5zbGljZShpMSArIDEpIDogczsKICAgIH0KCiAgICB2YXIgcHJlZml4RXhwb25lbnQkMjsKCiAgICBmdW5jdGlvbiBmb3JtYXRQcmVmaXhBdXRvJDIoeCwgcCkgewogICAgICB2YXIgZCA9IGZvcm1hdERlY2ltYWwkMih4LCBwKTsKICAgICAgaWYgKCFkKSByZXR1cm4geCArICIiOwogICAgICB2YXIgY29lZmZpY2llbnQgPSBkWzBdLAogICAgICAgICAgZXhwb25lbnQgPSBkWzFdLAogICAgICAgICAgaSA9IGV4cG9uZW50IC0gKHByZWZpeEV4cG9uZW50JDIgPSBNYXRoLm1heCgtOCwgTWF0aC5taW4oOCwgTWF0aC5mbG9vcihleHBvbmVudCAvIDMpKSkgKiAzKSArIDEsCiAgICAgICAgICBuID0gY29lZmZpY2llbnQubGVuZ3RoOwogICAgICByZXR1cm4gaSA9PT0gbiA/IGNvZWZmaWNpZW50CiAgICAgICAgICA6IGkgPiBuID8gY29lZmZpY2llbnQgKyBuZXcgQXJyYXkoaSAtIG4gKyAxKS5qb2luKCIwIikKICAgICAgICAgIDogaSA+IDAgPyBjb2VmZmljaWVudC5zbGljZSgwLCBpKSArICIuIiArIGNvZWZmaWNpZW50LnNsaWNlKGkpCiAgICAgICAgICA6ICIwLiIgKyBuZXcgQXJyYXkoMSAtIGkpLmpvaW4oIjAiKSArIGZvcm1hdERlY2ltYWwkMih4LCBNYXRoLm1heCgwLCBwICsgaSAtIDEpKVswXTsgLy8gbGVzcyB0aGFuIDF5IQogICAgfQoKICAgIGZ1bmN0aW9uIGZvcm1hdFJvdW5kZWQkMih4LCBwKSB7CiAgICAgIHZhciBkID0gZm9ybWF0RGVjaW1hbCQyKHgsIHApOwogICAgICBpZiAoIWQpIHJldHVybiB4ICsgIiI7CiAgICAgIHZhciBjb2VmZmljaWVudCA9IGRbMF0sCiAgICAgICAgICBleHBvbmVudCA9IGRbMV07CiAgICAgIHJldHVybiBleHBvbmVudCA8IDAgPyAiMC4iICsgbmV3IEFycmF5KC1leHBvbmVudCkuam9pbigiMCIpICsgY29lZmZpY2llbnQKICAgICAgICAgIDogY29lZmZpY2llbnQubGVuZ3RoID4gZXhwb25lbnQgKyAxID8gY29lZmZpY2llbnQuc2xpY2UoMCwgZXhwb25lbnQgKyAxKSArICIuIiArIGNvZWZmaWNpZW50LnNsaWNlKGV4cG9uZW50ICsgMSkKICAgICAgICAgIDogY29lZmZpY2llbnQgKyBuZXcgQXJyYXkoZXhwb25lbnQgLSBjb2VmZmljaWVudC5sZW5ndGggKyAyKS5qb2luKCIwIik7CiAgICB9CgogICAgdmFyIGZvcm1hdFR5cGVzJDIgPSB7CiAgICAgICIlIjogZnVuY3Rpb24oeCwgcCkgeyByZXR1cm4gKHggKiAxMDApLnRvRml4ZWQocCk7IH0sCiAgICAgICJiIjogZnVuY3Rpb24oeCkgeyByZXR1cm4gTWF0aC5yb3VuZCh4KS50b1N0cmluZygyKTsgfSwKICAgICAgImMiOiBmdW5jdGlvbih4KSB7IHJldHVybiB4ICsgIiI7IH0sCiAgICAgICJkIjogZnVuY3Rpb24oeCkgeyByZXR1cm4gTWF0aC5yb3VuZCh4KS50b1N0cmluZygxMCk7IH0sCiAgICAgICJlIjogZnVuY3Rpb24oeCwgcCkgeyByZXR1cm4geC50b0V4cG9uZW50aWFsKHApOyB9LAogICAgICAiZiI6IGZ1bmN0aW9uKHgsIHApIHsgcmV0dXJuIHgudG9GaXhlZChwKTsgfSwKICAgICAgImciOiBmdW5jdGlvbih4LCBwKSB7IHJldHVybiB4LnRvUHJlY2lzaW9uKHApOyB9LAogICAgICAibyI6IGZ1bmN0aW9uKHgpIHsgcmV0dXJuIE1hdGgucm91bmQoeCkudG9TdHJpbmcoOCk7IH0sCiAgICAgICJwIjogZnVuY3Rpb24oeCwgcCkgeyByZXR1cm4gZm9ybWF0Um91bmRlZCQyKHggKiAxMDAsIHApOyB9LAogICAgICAiciI6IGZvcm1hdFJvdW5kZWQkMiwKICAgICAgInMiOiBmb3JtYXRQcmVmaXhBdXRvJDIsCiAgICAg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T0gdW5kZWZpbmVkID8gaWRlbnRpdHkkaCA6IGZvcm1hdE51bWVyYWxzJDIobWFwJDkuY2FsbChsb2NhbGUubnVtZXJhbHMsIFN0cmluZykpLAogICAgICAgICAgcGVyY2VudCA9IGxvY2FsZS5wZXJjZW50ID09PSB1bmRlZmluZWQgPyAiJSIgOiBsb2NhbGUucGVyY2VudCArICIiLAogICAgICAgICAgbWludXMgPSBsb2NhbGUubWludXMgPT09IHVuZGVmaW5lZCA/ICItIiA6IGxvY2FsZS5taW51cyArICIiLAogICAgICAgICAgbmFuID0gbG9jYWxlLm5hbiA9PT0gdW5kZWZpbmVkID8gIk5hTiIgOiBsb2NhbGUubmFuICsgIiI7CgogICAgICBmdW5jdGlvbiBuZXdGb3JtYXQoc3BlY2lmaWVyKSB7CiAgICAgICAgc3BlY2lmaWVyID0gZm9ybWF0U3BlY2lmaWVyJDIoc3BlY2lmaWVyKTsKCiAgICAgICAgdmFyIGZpbGwgPSBzcGVjaWZpZXIuZmlsbCwKICAgICAgICAgICAgYWxpZ24gPSBzcGVjaWZpZXIuYWxpZ24sCiAgICAgICAgICAgIHNpZ24gPSBzcGVjaWZpZXIuc2lnbiwKICAgICAgICAgICAgc3ltYm9sID0gc3BlY2lmaWVyLnN5bWJvbCwKICAgICAgICAgICAgemVybyA9IHNwZWNpZmllci56ZXJvLAogICAgICAgICAgICB3aWR0aCA9IHNwZWNpZmllci53aWR0aCwKICAgICAgICAgICAgY29tbWEgPSBzcGVjaWZpZXIuY29tbWEsCiAgICAgICAgICAgIHByZWNpc2lvbiA9IHNwZWNpZmllci5wcmVjaXNpb24sCiAgICAgICAgICAgIHRyaW0gPSBzcGVjaWZpZXIudHJpbSwKICAgICAgICAgICAgdHlwZSA9IHNwZWNpZmllci50eXBlOwoKICAgICAgICAvLyBUaGUgIm4iIHR5cGUgaXMgYW4gYWxpYXMgZm9yICIsZyIuCiAgICAgICAgaWYgKHR5cGUgPT09ICJuIikgY29tbWEgPSB0cnVlLCB0eXBl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ICAgICAgICB9CgogICAgICAgICAgcmV0dXJuIG51bWVyYWxzKHZhbHVlKTsKICAgICAgICB9CgogICAgICAgIGZvcm1hdC50b1N0cmluZyA9IGZ1bmN0aW9uKCkgewogICAgICAgICAgcmV0dXJuIHNwZWNpZmllciArICIiOwogICAgICAgIH07CgogICAgICAgIHJldHVybiBmb3JtYXQ7CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIGZvcm1hdFByZWZpeChzcGVjaWZpZXIsIHZhbHVlKSB7CiAgICAgICAgdmFyIGYgPSBuZXdGb3JtYXQoKHNwZWNpZmllciA9IGZvcm1hdFNwZWNpZmllciQyKHNwZWNpZmllciksIHNwZWNpZmllci50eXBlID0gImYiLCBzcGVjaWZpZXIpKSwKICAgICAgICAgICAgZSA9IE1hdGgubWF4KC04LCBNYXRoLm1pbig4LCBNYXRoLmZsb29yKGV4cG9uZW50JDQodmFsdWUpIC8gMykpKSAqIDMsCiAgICAgICAgICAgIGsgPSBNYXRoLnBvdygxMCwgLWUpLAogICAgICAgICAgICBwcmVmaXggPSBwcmVmaXhlcyQyWzggKyBlIC8gM107CiAgICAgICAgcmV0dXJuIGZ1bmN0aW9uKHZhbHVlKSB7CiAgICAgICAgICByZXR1cm4gZihrICogdmFsdWUpICsgcHJlZml4OwogICAgICAgIH07CiAgICAgIH0KCiAgICAgIHJldHVybiB7CiAgICAgICAgZm9ybWF0OiBuZXdGb3JtYXQsCiAgICAgICAgZm9ybWF0UHJlZml4OiBmb3JtYXRQcmVmaXgKICAgICAgfTsKICAgIH0KCiAgICB2YXIgbG9jYWxlJDM7CiAgICB2YXIgZm9ybWF0JDI7CiAgICB2YXIgZm9ybWF0UHJlZml4JDI7CgogICAgZGVmYXVsdExvY2FsZSQzKHsKICAgICAgZGVjaW1hbDogIi4iLAogICAgICB0aG91c2FuZHM6ICIsIiwKICAgICAgZ3JvdXBpbmc6IFszXSwKICAgICAgY3VycmVuY3k6IFsiJCIsICIiXSwKICAgICAgbWludXM6ICItIgogIC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9PSBudWxsID8gMTAgOiBjb3VudCksCiAgICAgICAgICBwcmVjaXNpb247CiAgICAgIHNwZWNpZmllciA9IGZvcm1hdFNwZWNpZmllciQyKHNwZWNpZmllciA9PSBudWxsID8gIixmIiA6IHNwZWNpZmllcik7CiAgICAgIHN3aXRjaCAoc3BlY2lmaWVyLnR5cGUpIHsKICAgICAgICBjYXNlICJzIjogewogICAgICAgICAgdmFyIHZhbHVlID0gTWF0aC5tYXgoTWF0aC5hYnMoc3RhcnQpLCBNYXRoLmFicyhzdG9wKSk7CiAgICAgICAgICBpZiAoc3BlY2lmaWVyLnByZWNpc2lvbiA9PSBudWxsICYmICFpc05hTihwcmVjaXNpb24gPSBwcmVjaXNpb25QcmVmaXgkMihzdGVwLCB2YWx1ZSkpKSBzcGVjaWZpZXIucHJlY2lzaW9uID0gcHJlY2lzaW9uOwogICAgICAgICAgcmV0dXJuIGZvcm1hdFByZWZpeCQyKHNwZWNpZmllciwgdmFsdWUpOwogICAgICAgIH0KICAgICAgICBjYXNlICIiOgogICAgICAgIGNhc2UgImUiOgogICAgICAgIGNhc2UgImciOgogICAgICAgIGNhc2UgInAiOgogICAgICAgIGNhc2UgInIiOiB7CiAgICAgICAgICBpZiAoc3BlY2lmaWVyLnByZWNpc2lvbiA9PSBudWxsICYmICFpc05hTihwcmVjaXNpb24gPSBwcmVjaXNpb25Sb3VuZCQyKHN0ZXAsIE1hdGgubWF4KE1hdGguYWJzKHN0YXJ0KSwgTWF0aC5hYnMoc3RvcCkpKSkpIHNwZWNpZmllci5wcmVjaXNpb24gPSBwcmVjaXNpb24gLSAoc3BlY2lmaWVyLnR5cGUgPT09ICJlIik7CiAgICAgICAgICBicmVhazsKICAgICAgICB9CiAgICAgICAgY2FzZSAiZiI6CiAgICAgICAgY2FzZSAiJSI6IHsKICAgICAgICAgIGlmIChzcGVjaWZpZXIucHJlY2lzaW9uID09IG51bGwgJiYgIWlzTmFOKHByZWNpc2lvbiA9IHByZWNpc2lvbkZpeGVkJDIoc3RlcCkpKSBzcGVjaWZpZXIucHJlY2lzaW9uID0gcHJlY2lzaW9uIC0gKHNwZWNpZmllci50eXBlID09PSAiJSIpICogMjsKICAgICAgICAgIGJyZWFrOwogICAgICAgIH0KICAgICAgfQogICAgICByZXR1cm4gZm9ybWF0JDIoc3BlY2lmaWVyKTsKICAgIH0KCiAgICBmdW5jdGlvbiBsaW5lYXJpc2gkMShzY2FsZSkgewogICAgICB2YXIgZG9tYWluID0gc2NhbGUuZG9tYWluOwoKICAgICAgc2NhbGUudGlja3MgPSBmdW5jdGlvbihjb3VudCkgewogICAgICAgIHZhciBkID0gZG9tYWluKCk7CiAgICAgICAgcmV0dXJuIHRpY2tzJDIoZFswXSwgZFtkLmxlbmd0aCAtIDFdLCBjb3VudCA9PSBudWxsID8gMTAgOiBjb3VudCk7CiAgICAgIH07CgogICAgICBzY2FsZS50aWNrRm9ybWF0ID0gZnVuY3Rpb24oY291bnQsIHNwZWNpZmllcikgewogICAgICAgIHJldHVybiB0aWNrRm9ybWF0JDEoZG9tYWluKCksIGNvdW50LCBzcGVjaWZpZXIpOwogICAgICB9OwoKICAgICAgc2NhbGUubmljZSA9IGZ1bmN0aW9uKGNvdW50KSB7CiAgICAgICAgaWYgKGNvdW50ID09IG51bGwpIGNvdW50ID0gMTA7CgogICAgICAgIHZhciBkID0gZG9tYWluKCksCiAgICAgICAgICAgIGkwID0gMCwKICAgICAgICAgICAgaTEgPSBkLmxlbmd0aCAtIDEsCiAgICAgICAgICAgIHN0YXJ0ID0gZFtpMF0sCiAgICAgICAgICAgIHN0b3AgPSBkW2kxXSwKICAgICAgICAgICAgc3RlcDsKCiAgICAgICAgaWYgKHN0b3AgPCBzdGFydCkgewogICAgICAgICAgc3RlcCA9IHN0YXJ0LCBzdGFydCA9IHN0b3AsIHN0b3AgPSBzdGVwOwogICAgICAgICAgc3RlcCA9IGkwLCBpMCA9IGkxLCBpMSA9IHN0ZXA7CiAgICAgICAgfQoKICAgICAgICBzdGVwID0gdGl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TWF0aC5sb2cxMAogICAgICAgICAgfHwgYmFzZSA9PT0gMiAmJiBNYXRoLmxvZzIKICAgICAgICAgIHx8IChiYXNlID0gTWF0aC5sb2coYmFzZSksIGZ1bmN0aW9uKHgpIHsgcmV0dXJuIE1hdGgubG9nKHgpIC8gYmFzZTsgfSk7CiAgICB9CgogICAgZnVuY3Rpb24gcmVmbGVjdCQxKGYpIHsKICAgICAgcmV0dXJuIGZ1bmN0aW9uKHgpIHsKICAgICAgICByZXR1cm4gLWYoLXgpOwogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIGxvZyQzKCkgewogICAgICB2YXIgc2NhbGUgPSBjb250aW51b3VzJDEoZGVpbnRlcnBvbGF0ZSwgcmVpbnRlcnBvbGF0ZSQxKS5kb21haW4oWzEsIDEwXSksCiAgICAgICAgICBkb21haW4gPSBzY2FsZS5kb21haW4sCiAgICAgICAgICBiYXNlID0gMTAsCiAgICAgICAgICBsb2dzID0gbG9ncCQxKDEwKSwKICAgICAgICAgIHBvd3MgPSBwb3dwJDEoMTApOwoKICAgICAgZnVuY3Rpb24gcmVzY2FsZSgpIHsKICAgICAgICBsb2dzID0gbG9ncCQxKGJhc2UpLCBwb3dzID0gcG93cCQxKGJhc2UpOwogICAgICAgIGlmIChkb21haW4oKVswXSA8IDApIGxvZ3MgPSByZWZsZWN0JDEobG9ncyksIHBvd3MgPSByZWZsZWN0JDEocG93cyk7CiAgICAgICAgcmV0dXJuIHNjYWxlOwogICAgICB9CgogICAgICBzY2FsZS5iYXNlID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKGJhc2UgPSArXywgcmVzY2FsZSgpKSA6IGJhc2U7CiAgICAgIH07CgogICAgICBzY2FsZS5kb21haW4gPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoZG9tYWluKF8pLCByZXNjYWxlKCkpIDogZG9tYWluKCk7CiAgICAgIH07CgogICAgICBzY2FsZS50aWNrcyA9IGZ1bmN0aW9uKGNvdW50KSB7CiAgICAgICAgdmFyIGQgPSBkb21haW4oKSwKICAgICAgICAgICAgdSA9IGRbMF0sCiAgICAgICAgICAgIHYgPSBkW2QubGVuZ3RoIC0gMV0sCiAgICAgICAgICAgIHI7CgogICAgICAgIGlmIChyID0gdiA8IHUpIGkgPSB1LCB1ID0gdiwgdiA9IGk7CgogICAgICAgIHZhciBpID0gbG9ncyh1KSwKICAgICAgICAgICAgaiA9IGxvZ3ModiksCiAgICAgICAgICAgIHAsCiAgICAgICAgICAgIGssCiAgICAgICAgICAgIHQsCiAgICAgICAgICAgIG4gPSBjb3VudCA9PSBudWxsID8gMTAgOiArY291bnQsCiAgICAgICAgICAgIHogPSBbXTsKCiAgICAgICAgaWYgKCEoYmFzZSAlIDEpICYmIGogLSBpIDwgbikgewogICAgICAgICAgaSA9IE1hdGgucm91bmQoaSkgLSAxLCBqID0gTWF0aC5yb3VuZChqKSArIDE7CiAgICAgICAgICBpZiAodSA+IDApIGZvciAoOyBpIDwgajsgKytpKSB7CiAgICAgICAgICAgIGZvciAoayA9IDEsIHAgPSBwb3dzKGkpOyBrIDwgYmFzZTsgKytrKSB7CiAgICAgICAgICAgICAgdCA9IHAgKiBrOwogICAgICAgICAgICAgIGlmICh0IDwgdSkgY29udGludWU7CiAgICAgICAgICAgICAgaWYgKHQgPiB2KSBicmVhazsKICAgICAgICAgICAgICB6LnB1c2godCk7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0gZWxzZSBmb3IgKDsgaSA8IGo7ICsraSkgewogICAgICAgICAgICBmb3IgKGsgPSBiYXNlIC0gMSwgcCA9IHBvd3MoaSk7IGsgPj0gMTsgLS1rKSB7CiAgICAgICAgICAgICAgdCA9IHAgKiBrOwogICAgICAgICAgICAgIGlmICh0IDwgdSkgY29udGludWU7CiAgICAgICAgICAgICAgaWYgKHQgPiB2KSBicmVhazsKICAgICAgICAgICAgICB6LnB1c2godCk7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICB9IGVsc2UgewogICAgICAgICAgeiA9IHRpY2tzJDIoaSwgaiwgTWF0aC5taW4oaiAtIGksIG4pKS5tYXAocG93cyk7CiAgICAgICAgfQoKICAgICAgICByZXR1cm4gciA/IHoucmV2ZXJzZSgpIDogejsKICAgICAgfTsKCiAgICAgIHNjYWxlLnRpY2tGb3JtYXQgPSBmdW5jdGlvbihjb3VudCwgc3BlY2lmaWVyKSB7CiAgICAgICAgaWYgKHNwZWNpZmllciA9PSBudWxsKSBzcGVjaWZpZXIgPSBiYXNlID09PSAxMCA/ICIuMGUiIDogIiwiOwogICAgICAgIGlmICh0eXBlb2Ygc3BlY2lmaWVyICE9PSAiZnVuY3Rpb24iKSBzcGVjaWZpZXIgPSBmb3JtYXQkMihzcGVjaWZpZXIpOwogICAgICAgIGlmIChjb3VudCA9PT0gSW5maW5pdHkpIHJldHVybiBzcGVjaWZpZXI7CiAgICAgICAgaWYgKGNvdW50ID09IG51bGwpIGNvdW50ID0gMTA7CiAgICAgICAgdmFyIGsgPSBNYXRoLm1heCgxLCBiYXNlICogY291bnQgLyBzY2FsZS50aWNrcygpLmxlbmd0aCk7IC8vIFRPRE8gZmFzdCBlc3RpbWF0ZT8KICAgICAgICByZXR1cm4gZnVuY3Rpb24oZCkgewogICAgICAgICAgdmFyIGkgPSBkIC8gcG93cyhNYXRoLnJvdW5kKGxvZ3MoZCkpKTsKICAgICAgICAgIGlmIChpICogYmFzZSA8IGJhc2UgLSAwLjUpIGkgKj0gYmFzZTsKICAgICAgICAgIHJldHVybiBpIDw9IGsgPyBzcGVjaWZpZXIoZCkgOiAiIjsKICAgICAgICB9OwogICAgICB9OwoKICAgICAgc2NhbGUubmljZSA9IGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiBkb21haW4obmljZSQxKGRvbWFpbigpLCB7CiAgICAgICAgICBmbG9vcjogZnVuY3Rpb24oeCkgeyByZXR1cm4gcG93cyhNYXRoLm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JhaXNlJDMoYSArIGIgKiB0LCAxIC8gZXhwb25lbnQpOyB9OwogICAgICB9CgogICAgICBzY2FsZS5leHBvbmVudCA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChleHBvbmVudCA9ICtfLCBkb21haW4oZG9tYWluKCkpKSA6IGV4cG9uZW50OwogICAgICB9OwoKICAgICAgc2NhbGUuY29weSA9IGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiBjb3B5JDIoc2NhbGUsIHBvdyQzKCkuZXhwb25lbnQoZXhwb25lbnQpKTsKICAgICAgfTsKCiAgICAgIHJldHVybiBsaW5lYXJpc2gkMShzY2FsZSk7CiAgICB9CgogICAgZnVuY3Rpb24gc3FydCQ0KCkgewogICAgICByZXR1cm4gcG93JDMoKS5leHBvbmVudCgwLjUpOwogICAgfQoKICAgIGZ1bmN0aW9uIHF1YW50aWxlJDIoKSB7CiAgICAgIHZhciBkb21haW4gPSBbXSwKICAgICAgICAgIHJhbmdlID0gW10sCiAgICAgICAgICB0aHJlc2hvbGRzID0gW107CgogICAgICBmdW5jdGlvbiByZXNjYWxlKCkgewogICAgICAgIHZhciBpID0gMCwgbiA9IE1hdGgubWF4KDEsIHJhbmdlLmxlbmd0aCk7CiAgICAgICAgdGhyZXNob2xkcyA9IG5ldyBBcnJheShuIC0gMSk7CiAgICAgICAgd2hpbGUgKCsraSA8IG4pIHRocmVzaG9sZHNbaSAtIDFdID0gdGhyZXNob2xkJDIoZG9tYWluLCBpIC8gbik7CiAgICAgICAgcmV0dXJuIHNjYWxlOwogICAgICB9CgogICAgICBmdW5jdGlvbiBzY2FsZSh4KSB7CiAgICAgICAgaWYgKCFpc05hTih4ID0gK3gpKSByZXR1cm4gcmFuZ2VbYmlzZWN0UmlnaHQkMih0aHJlc2hvbGRzLCB4KV07CiAgICAgIH0KCiAgICAgIHNjYWxlLmludmVydEV4dGVudCA9IGZ1bmN0aW9uKHkpIHsKICAgICAgICB2YXIgaSA9IHJhbmdlLmluZGV4T2YoeSk7CiAgICAgICAgcmV0dXJuIGkgPCAwID8gW05hTiwgTmFOXSA6IFsKICAgICAgICAgIGkgPiAwID8gdGhyZXNob2xkc1tpIC0gMV0gOiBkb21haW5bMF0sCiAgICAgICAgICBpIDwgdGhyZXNob2xkcy5sZW5ndGggPyB0aHJlc2hvbGRzW2ldIDogZG9tYWluW2RvbWFpbi5sZW5ndGggLSAxXQogICAgICAgIF07CiAgICAgIH07CgogICAgICBzY2FsZS5kb21haW4gPSBmdW5jdGlvbihfKSB7CiAgICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSByZXR1cm4gZG9tYWluLnNsaWNlKCk7CiAgICAgICAgZG9tYWluID0gW107CiAgICAgICAgZm9yICh2YXIgaSA9IDAsIG4gPSBfLmxlbmd0aCwgZDsgaSA8IG47ICsraSkgaWYgKGQgPSBfW2ldLCBkICE9IG51bGwgJiYgIWlzTmFOKGQgPSArZCkpIGRvbWFpbi5wdXNoKGQpOwogICAgICAgIGRvbWFpbi5zb3J0KGFzY2VuZGluZyQ5KTsKICAgICAgICByZXR1cm4gcmVzY2FsZSgpOwogICAgICB9OwoKICAgICAgc2NhbGUucmFuZ2UgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAocmFuZ2UgPSBzbGljZSRjLmNhbGwoXyksIHJlc2NhbGUoKSkgOiByYW5nZS5zbGljZSgpOwogICAgICB9OwoKICAgICAgc2NhbGUucXVhbnRpbGVzID0gZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuIHRocmVzaG9sZHMuc2xpY2UoKTsKICAgICAgfTsKCiAgICAgIHNjYWxlLmNvcHkgPSBmdW5jdGlvbigpIHsKICAgICAgICByZXR1cm4gcXVhbnRpbGUkMigpCiAgICAgICAgICAgIC5kb21haW4oZG9tYWluKQogICAgICAgICAgICAucmFuZ2UocmFuZ2UpOwogICAgICB9OwoKICAgICAg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ICA6IGkgPCAxID8gW3gwLCBkb21haW5bMF1dCiAgICAgICAgICAgIDogaSA+PSBuID8gW2RvbWFpbltuIC0gMV0sIHgxXQogICAgICAgICAgICA6IFtkb21haW5baSAtIDFdLCBkb21haW5baV1dOwogICAgICB9OwoKICAgICAgc2NhbGUuY29weSA9IGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiBxdWFudGl6ZSQzKCkKICAgICAgICAgICAgLmRvbWFpbihbeDAsIHgxXSkKICAgICAgICAgICAgLnJhbmdlKHJhbmdlKTsKICAgICAgfTsKCiAgICAgIHJldHVybiBsaW5lYXJpc2gkMShzY2FsZSk7CiAgICB9CgogICAgZnVuY3Rpb24gdGhyZXNob2xkJDMoKSB7CiAgICAgIHZhciBkb21haW4gPSBbMC41XSwKICAgICAgICAgIHJhbmdlID0gWzAsIDFdLAogICAgICAgICAgbiA9IDE7CgogICAgICBmdW5jdGlvbiBzY2FsZSh4KSB7CiAgICAgICAgaWYgKHggPD0geCkgcmV0dXJuIHJhbmdlW2Jpc2VjdFJpZ2h0JDIoZG9tYWluLCB4LCAwLCBuKV07CiAgICAgIH0KCiAgICAgIHNjYWxlLmRvbWFpbiA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChkb21haW4gPSBzbGljZSRjLmNhbGwoXyksIG4gPSBNYXRoLm1pbihkb21haW4ubGVuZ3RoLCByYW5nZS5sZW5ndGggLSAxKSwgc2NhbGUpIDogZG9tYWluLnNsaWNlKCk7CiAgICAgIH07CgogICAgICBzY2FsZS5yYW5nZSA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChyYW5nZSA9IHNsaWNlJGMuY2FsbChfKSwgbiA9IE1hdGgubWluKGRvbWFpbi5sZW5ndGgsIHJhbmdlLmxlbmd0aCAtIDEpLCBzY2FsZSkgOiByYW5nZS5zbGljZSgpOwogICAgICB9OwoKICAgICAgc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0ZSAtIDEpOwogICAgICAgIH0sIGZ1bmN0aW9uKGRhdGUsIHN0ZXApIHsKICAgICAgICAgIGlmIChkYXRlID49IGRhdGUpIHsKICAgICAgICAgICAgaWYgKHN0ZXAgPCAwKSB3aGlsZSAoKytzdGVwIDw9IDApIHsKICAgICAgICAgICAgICB3aGlsZSAob2Zmc2V0aShkYXRlLCAtMSksICF0ZXN0KGRhdGUpKSB7fSAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIG5vLWVtcHR5CiAgICAgICAgICAgIH0gZWxzZSB3aGlsZSAoLS1zdGVwID49IDApIHsKICAgICAgICAgICAgICB3aGlsZSAob2Zmc2V0aShkYXRlLCArMSksICF0ZXN0KGRhdGUpKSB7fSAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIG5vLWVtcHR5CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICB9KTsKICAgICAgfTsKCiAgICAgIGlmIChjb3VudCkgewogICAgICAgIGludGVydmFsLmNvdW50ID0gZnVuY3Rpb24oc3RhcnQsIGVuZCkgewogICAgICAgICAgdDAkNC5zZXRUaW1lKCtzdGFydCksIHQxJDQuc2V0VGltZSgrZW5kKTsKICAgICAgICAgIGZsb29yaSh0MCQ0KSwgZmxvb3JpKHQxJDQpOwogICAgICAgICAgcmV0dXJuIE1hdGguZmxvb3IoY291bnQodDAkNCwgdDEkNCkpOwogICAgICAgIH07CgogICAgICAgIGludGVydmFsLmV2ZXJ5ID0gZnVuY3Rpb24oc3RlcCkgewogICAgICAgICAgc3RlcCA9IE1hdGguZmxvb3Ioc3RlcCk7CiAgICAgICAgICByZXR1cm4gIWlzRmluaXRlKHN0ZXApIHx8ICEoc3RlcCA+IDApID8gbnVsbAogICAgICAgICAgICAgIDogIShzdGVwID4gMSkgPyBpbnRlcnZhbAogICAgICAgICAgICAgIDogaW50ZXJ2YWwuZmlsdGVyKGZpZWxkCiAgICAgICAgICAgICAgICAgID8gZnVuY3Rpb24oZCkgeyByZXR1cm4gZmll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HdlZWtkYXlMb29rdXAgPSBmb3JtYXRMb29rdXAkMShsb2NhbGVfd2Vla2RheXMpLAogICAgICAgICAgc2hvcnRXZWVrZGF5UmUgPSBmb3JtYXRSZSQxKGxvY2FsZV9zaG9ydFdlZWtkYXlzKSwKICAgICAgICAgIHNob3J0V2Vla2RheUxvb2t1cCA9IGZvcm1hdExvb2t1cCQxKGxvY2FsZV9zaG9ydFdlZWtkYXlzKSwKICAgICAgICAgIG1vbnRoUmUgPSBmb3JtYXRSZSQxKGxvY2FsZV9tb250aHMpLAogICAgICAgICAgbW9udGhMb29rdXAgPSBmb3JtYXRMb29rdXAkMShsb2NhbGVfbW9udGhzKSwKICAgICAgICAgIHNob3J0TW9udGhSZSA9IGZvcm1hdFJlJDEobG9jYWxlX3Nob3J0TW9udGhzKSwKICAgICAgICAgIHNob3J0TW9udGhMb29rdXAgPSBmb3JtYXRMb29rdXAkMShsb2NhbGVfc2hvcnRNb250aHMpOwoKICAgICAgdmFyIGZvcm1hdHMgPSB7CiAgICAgICAgImEiOiBmb3JtYXRTaG9ydFdlZWtkYXksCiAgICAgICAgIkEiOiBmb3JtYXRXZWVrZGF5LAogICAgICAgICJiIjogZm9ybWF0U2hvcnRNb250aCwKICAgICAgICAiQiI6IGZvcm1hdE1vbnRoLAogICAgICAgICJjIjogbnVsbCwKICAgICAgICAiZCI6IGZvcm1hdERheU9mTW9udGgkMSwKICAgICAgICAiZSI6IGZvcm1hdERheU9mTW9udGgkMSwKICAgICAgICAiZiI6IGZvcm1hdE1pY3Jvc2Vjb25kcyQxLAogICAgICAgICJIIjogZm9ybWF0SG91cjI0JDEsCiAgICAgICAgIkkiOiBmb3JtYXRIb3VyMTIkMSwKICAgICAgICAiaiI6IGZvcm1hdERheU9mWWVhciQxLAogICAgICAgICJMIjogZm9ybWF0TWlsbGlzZWNvbmRzJDEsCiAgICAgICAgIm0iOiBmb3JtYXRNb250aE51bWJlciQxLAogICAgICAgICJNIjogZm9ybWF0TWludXRlcyQxLAogICAgICAgICJwIjogZm9ybWF0UGVyaW9kLAogICAgICAgICJxIjogZm9ybWF0UXVhcnRlciwKICAgICAgICAiUSI6IGZvcm1hdFVuaXhUaW1lc3RhbXAkMSwKICAgICAgICAicyI6IGZvcm1hdFVuaXhUaW1lc3RhbXBTZWNvbmRzJDEsCiAgICAgICAgIlMiOiBmb3JtYXRTZWNvbmRzJDEsCiAgICAgICAgInUiOiBmb3JtYXRXZWVrZGF5TnVtYmVyTW9uZGF5JDEsCiAgICAgICAgIlUiOiBmb3JtYXRXZWVrTnVtYmVyU3VuZGF5JDEsCiAgICAgICAgIlYiOiBmb3JtYXRXZWVrTnVtYmVySVNPJDEsCiAgICAgICAgInciOiBmb3JtYXRXZWVrZGF5TnVtYmVyU3VuZGF5JDEsCiAgICAgICAgIlciOiBmb3JtYXRXZWVrTnVtYmVyTW9uZGF5JDEsCiAgICAgICAgIngiOiBudWxsLAogICAgICAgICJYIjogbnVsbCwKICAgICAgICAieSI6IGZvcm1hdFllYXIkMiwKICAgICAgICAiWSI6IGZvcm1hdEZ1bGxZZWFyJDEsCiAgICAgICAgIloiOiBmb3JtYXRab25lJDEsCiAgICAgICAgIiUiOiBmb3JtYXRMaXRlcmFsUGVyY2VudCQxCiAgICAgIH07CgogICAgICB2YXIgdXRjRm9ybWF0cyA9IHsKICAgICAgICAiYSI6IGZvcm1hdFVUQ1Nob3J0V2Vla2RheSwKICAgICAgICAiQSI6IGZvcm1hdFVUQ1dlZWtkYXksCiAgICAgICAgImIiOiBmb3JtYXRVVENTaG9ydE1vbnRoLAogICAgICAgICJCIjogZm9ybWF0VVRDTW9udGgsCiAgICAgICAgImMiOiBudWxsLAogICAgICAgICJkIjogZm9ybWF0VVRDRGF5T2ZNb250aCQxLAogICAgICAgICJlIjogZm9ybWF0VVRDRGF5T2ZNb250aCQxLAogICAgICAgICJmIjogZm9ybWF0VVRDTWljcm9zZWNvbmRzJDEsCiAgICAgICAgIkgiOiBmb3JtYXRVVENIb3VyMjQkMSwK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250aCwKICAgICAgICAiQiI6IHBhcnNlTW9udGgsCiAgICAgICAgImMiOiBwYXJzZUxvY2FsZURhdGVUaW1lLAogICAgICAgICJkIjogcGFyc2VEYXlPZk1vbnRoJDEsCiAgICAgICAgImUiOiBwYXJzZURheU9mTW9udGgkMSwKICAgICAgICAiZiI6IHBhcnNlTWljcm9zZWNvbmRzJDEsCiAgICAgICAgIkgiOiBwYXJzZUhvdXIyNCQxLAogICAgICAgICJJIjogcGFyc2VIb3VyMjQkMSwKICAgICAgICAiaiI6IHBhcnNlRGF5T2ZZZWFyJDEsCiAgICAgICAgIkwiOiBwYXJzZU1pbGxpc2Vjb25kcyQxLAogICAgICAgICJtIjogcGFyc2VNb250aE51bWJlciQxLAogICAgICAgICJNIjogcGFyc2VNaW51dGVzJDEsCiAgICAgICAgInAiOiBwYXJzZVBlcmlvZCwKICAgICAgICAicSI6IHBhcnNlUXVhcnRlciQxLAogICAgICAgICJRIjogcGFyc2VVbml4VGltZXN0YW1wJDEsCiAgICAgICAgInMiOiBwYXJzZVVuaXhUaW1lc3RhbXBTZWNvbmRzJDEsCiAgICAgICAgIlMiOiBwYXJzZVNlY29uZHMkMSwKICAgICAgICAidSI6IHBhcnNlV2Vla2RheU51bWJlck1vbmRheSQxLAogICAgICAgICJVIjogcGFyc2VXZWVrTnVtYmVyU3VuZGF5JDEsCiAgICAgICAgIlYiOiBwYXJzZVdlZWtOdW1iZXJJU08kMSwKICAgICAgICAidyI6IHBhcnNlV2Vla2RheU51bWJlclN1bmRheSQxLAogICAgICAgICJXIjogcGFyc2VXZWVrTnVtYmVyTW9uZGF5JDEsCiAgICAgICAgIngiOiBwYXJzZUxvY2FsZURhdGUsCiAgICAgICAgIlgiOiBwYXJzZUxvY2FsZVRpbWUsCiAgICAgICAgInkiOiBwYXJzZVllYXIkMSwKICAgICAgICAiWSI6IHBhcnNlRnVsbFllYXIkMSwKICAgICAgICAiWiI6IHBhcnNlWm9uZSQxLAogICAgICAgICIlIjogcGFyc2VM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HVzaChzcGVjaWZpZXIuc2xpY2UoaiwgaSkpOwogICAgICAgICAgICAgIGlmICgocGFkID0gcGFkcyQxW2MgPSBzcGVjaWZpZXIuY2hhckF0KCsraSldKSAhPSBudWxsKSBjID0gc3BlY2lmaWVyLmNoYXJBdCgrK2kpOwogICAgICAgICAgICAgIGVsc2UgcGFkID0gYyA9PT0gImUiID8gIiAiIDogIjAiOwogICAgICAgICAgICAgIGlmIChmb3JtYXQgPSBmb3JtYXRzW2NdKSBjID0gZm9ybWF0KGRhdGUsIHBhZCk7CiAgICAgICAgICAgICAgc3RyaW5nLnB1c2goYyk7CiAgICAgICAgICAgICAgaiA9IGkgKyAxOwogICAgICAgICAgICB9CiAgICAgICAgICB9CgogICAgICAgICAgc3RyaW5nLnB1c2goc3BlY2lmaWVyLnNsaWNlKGosIGkpKTsKICAgICAgICAgIHJldHVybiBzdHJpbmcuam9pbigiIik7CiAgICAgICAgfTsKICAgICAgfQoKICAgICAgZnVuY3Rpb24gbmV3UGFyc2Uoc3BlY2lmaWVyLCBaKSB7CiAgICAgICAgcmV0dXJuIGZ1bmN0aW9uKHN0cmluZykgewogICAgICAgICAgdmFyIGQgPSBuZXdEYXRlJDEoMTkwMCwgdW5kZWZpbmVkLCAxKSwKICAgICAgICAgICAgICBpID0gcGFyc2VTcGVjaWZpZXIoZCwgc3BlY2lmaWVyLCBzdHJpbmcgKz0gIiIsIDApLAogICAgICAgICAgICAgIHdlZWssIGRheTsKICAgICAgICAgIGlmIChpICE9IHN0cmluZy5sZW5ndGgpIHJldHVybiBudWxsOwoKICAgICAgICAgIC8vIElmIGEgVU5JWCB0aW1lc3RhbXAgaXMgc3BlY2lmaWVkLCByZXR1cm4gaXQuCiAgICAgICAgICBpZiAoIlEiIGluIGQpIHJldHVybiBuZXcgRGF0ZShkLlEpOwogICAgICAgICAgaWYgKCJzIiBpbiBkKSByZXR1cm4gbmV3IERhdGUoZC5zICogMTAwMCArICgiTCIgaW4gZCA/IGQuTCA6IDApKTsKCiAgICAgICAgICAvLyBJZiB0aGlzIGlzIHV0Y1BhcnNlLCBuZXZlciB1c2UgdGhlIGxvY2FsIHRpbWV6b25lLgogICAgICAgICAgaWYgKFogJiYgISgiWiIgaW4gZCkpIGQuWiA9IDA7CgogICAgICAgICAgLy8gVGhlIGFtLXBtIGZsYWcgaXMgMCBmb3IgQU0sIGFuZCAxIGZvciBQTS4KICAgICAgICAgIGlmICgicCIgaW4gZCkgZC5IID0gZC5IICUgMTIgKyBkLnAgKiAxMjsKCiAgICAgICAgICAvLyBJZiB0aGUgbW9udGggd2FzIG5vdCBzcGVjaWZpZWQsIGluaGVyaXQgZnJvbSB0aGUgcXVhcnRlci4KICAgICAgICAgIGlmIChkLm0gPT09IHVuZGVmaW5lZCkgZC5tID0gInEiIGluIGQgPyBkLnEgOiAwOwoKICAgICAgICAgIC8vIENvbnZlcnQgZGF5LW9mLXdlZWsgYW5kIHdlZWstb2YteWVhciB0byBkYXktb2YteWVhci4KICAgICAgICAgIGlmICgiViIgaW4gZCkgewogICAgICAgICAgICBpZiAoZC5WIDwgMSB8fCBkLlYgPiA1MykgcmV0dXJuIG51bGw7CiAgICAgICAgICAgIGlmICghKCJ3IiBpbiBkKSkgZC53ID0gMTsKICAgICAgICAgICAgaWYgKCJaIiBpbiBkKSB7CiAgICAgICAgICAgICAgd2VlayA9IHV0Y0RhdGUkMShuZXdEYXRlJDEoZC55LCAwLCAxKSksIGRheSA9IHdlZWsuZ2V0VVRDRGF5KCk7CiAgICAgICAgICAgICAgd2VlayA9IGRheSA+IDQgfHwgZGF5ID09PSAwID8gdXRjTW9uZGF5JDEuY2VpbCh3ZWVrKSA6IHV0Y01vbmRheSQxKHdlZWspOwogICAgICAgICAgICAgIHdlZWsgPSB1dGNEYXkkMS5vZmZzZXQod2VlaywgKGQuViAtIDEpICogNyk7CiAgICAgICAgICAgICAgZC55ID0gd2Vlay5nZXRVVENGdWxsWWVhcigpOwogICAgICAgICAgICAgIGQubSA9IHdlZWsuZ2V0VVRDTW9udGgoKTsKICAgICAgICAgICAgICBkLmQgPSB3ZWVrLmdldFVUQ0RhdGUoKSArIChkLncgKyA2KSAlIDc7CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgd2VlayA9IGxvY2FsRGF0ZSQxKG5ld0RhdGUkMShkLnksIDAsIDEpKSwgZGF5ID0gd2Vlay5nZXREYXkoKTsKICAgICAgICAgICAgICB3ZWVrID0gZGF5ID4gNCB8fCBkYXkgPT09IDAgPyBtb25kYXkkMS5jZWlsKHdlZWspIDogbW9uZGF5JDEod2Vlayk7CiAgICAgICAgICAgICAgd2VlayA9IGRheSQxLm9mZnNldCh3ZWVrLCAoZC5WIC0gMSkgKiA3KTsKICAgICAgICAgICAgICBkLnkgPSB3ZWVrLmdldEZ1bGxZZWFyKCk7CiAgICAgICAgICAgICAgZC5tID0gd2Vlay5nZXRNb250aCgpOwogICAgICAgICAgICAgIGQuZCA9IHdlZWsuZ2V0RGF0ZSgpICsgKGQudyArIDYpICUgNzsKICAgICAgICAgICAgfQogICAgICAgICAgfSBlbHNlIGlmICgiVyIgaW4gZCB8fCAiVSIgaW4gZCkgewogICAgICAgICAgICBpZiAoISgidyIgaW4gZCkpIGQudyA9ICJ1IiBpbiBkID8gZC51ICUgNyA6ICJXIiBpbiBkID8gMSA6IDA7CiAgICAgICAgICAgIGRheSA9ICJaIiBpbiBkID8gdXRjRGF0ZSQxKG5ld0RhdGUkMShkLnksIDAsIDEpKS5nZXRVVENEYXkoKSA6IGxvY2FsRGF0ZSQxKG5ld0RhdGUkMShkLnksIDAsIDEpKS5nZXREYXkoKTsKICAgICAgICAgICAgZC5tID0gMDsKICAgICAgICAgICAgZC5kID0gIlciIGluIGQgPyAoZC53ICsgNikgJSA3ICsgZC5XICogNyAtIChkYXkgKyA1KSAlIDcgOiBkLncgKyBkLlUgKiA3IC0gKGRheSArIDYpICUgNzsKICAgICAgICAgIH0KCiAgICAgICAgICAvLyBJZiBhIHRpbWUgem9uZSBpcyBzcGVjaWZpZWQsIGFsbCBmaWVsZHMgYXJlIGludGVycHJldGVkIGFzIFVUQyBhbmQgdGhlbgogICAgICAgICAgLy8gb2Zmc2V0IGFjY29yZGluZyB0byB0aGUgc3BlY2lmaWVkIHRpbWUgem9uZS4KICAgICAgICAgIGlmICgiWiIgaW4gZCkgewogICAgICAgICAgICBkLkggKz0gZC5aIC8gMTAwIHwgMDsKICAgICAgICAgICAgZC5NICs9IGQuWiAlIDEwMDsKICAgICAgICAgICAgcmV0dXJuIHV0Y0RhdGUkMShkKTsKICAgICAgICAgIH0KCiAgICAgICAgICAvLyBPdGhlcndpc2UsIGFsbCBmaWVsZHMgYXJlIGluIGxvY2FsIHRpbWUuCiAgICAgICAgICByZXR1cm4gbG9jYWxEYXRlJDEoZCk7CiAgICAgICAgfTsKICAgICAgfQoKICAgICAgZnVuY3Rpb24gcGFyc2VTcGVjaWZpZXIoZCwgc3BlY2lmaWVyLCBzdHJpbmcsIGopIHsKICAgICAgICB2YXIgaSA9IDAsCiAgICAgICAgICAgIG4gPSBzcGVjaWZpZXIubGVuZ3RoLAogICAgICAgICAgICBtID0gc3RyaW5nLmxlbmd0aCwKICAgICAgICAgICAgYywKICAgICAgICAgICAgcGFyc2U7CgogICAgICAgIHdoaWxlIChpIDwgbikgewogICAgICAgICAgaWYgKGogPj0gbSkgcmV0dXJuIC0xOwogICAgICAgICAgYyA9IHNwZWNpZmllci5jaGFyQ29kZUF0KGkrKyk7CiAgICAgICAgICBpZiAoYyA9PT0gMzcpIHsKICAgICAgICAgICAgYyA9IHNwZWNpZmllci5jaGFyQXQoaSsrKTsKICAgICAgICAgICAgcGFyc2UgPSBwYXJzZXNbYyBpbiBwYWRzJDEgPyBzcGVjaWZpZXIuY2hhckF0KGkrKykgOiBjXTsKICAgICAgICAgICAgaWYgKCFwYXJzZSB8fCAoKGogPSBwYXJzZShkLCBzdHJpbmcsIGopKSA8IDApKSByZXR1cm4gLTE7CiAgICAgICAgICB9IGVsc2UgaWYg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ICAgICB2YXIgdGlja0ludGVydmFscyA9IFsKICAgICAgICBbc2Vjb25kLCAgMSwgICAgICBkdXJhdGlvblNlY29uZCQzXSwKICAgICAgICBbc2Vjb25kLCAgNSwgIDUgKiBkdXJhdGlvblNlY29uZCQzXSwKICAgICAgICBbc2Vjb25kLCAxNSwgMTUgKiBkdXJhdGlvblNlY29uZCQzXSwKICAgICAgICBbc2Vjb25kLCAzMCwgMzAgKiBkdXJhdGlvblNlY29uZCQzXSwKICAgICAgICBbbWludXRlLCAgMSwgICAgICBkdXJhdGlvbk1pbnV0ZSQzXSwKICAgICAgICBbbWludXRlLCAgNSwgIDUgKiBkdXJhdGlvbk1pbnV0ZSQzXSwKICAgICAgICBbbWludXRlLCAxNSwgMTUgKiBkdXJhdGlvbk1pbnV0ZSQzXSwKICAgICAgICBbbWludXRlLCAzMCwgMzAgKiBkdXJhdGlvbk1pbnV0ZSQzXSwKICAgICAgICBbICBob3VyLCAgMSwgICAgICBkdXJhdGlvbkhvdXIkMyAgXSwKICAgICAgICBbICBob3VyLCAgMywgIDMgKiBkdXJhdGlvbkhvdXIkMyAgXSwKICAgICAgICBbICBob3VyLCAgNiwgIDYgKiBkdXJhdGlvbkhvdXIkMyAgXSwKICAgICAgICBbICBob3VyLCAxMiwgMTIgKiBkdXJhdGlvbkhvdXIkMyAgXSwKICAgICAgICBbICAgZGF5LCAgMSwgICAgICBkdXJhdGlvbkRheSQzICAgXSwKICAgICAgICBbICAgZGF5LCAgMiwgIDIgKiBkdXJhdGlvbkRheSQzICAgXSwKICAgICAgICBbICB3ZWVrLCAgMSwgICAgICBkdXJhdGlvbldlZWskMyAgXSwKICAgICAgICBbIG1vbnRoLCAgMSwgICAgICBkdXJhdGlvbk1vbnRoJDEgXSwKICAgICAgICBbIG1vbnRoLCAgMywgIDMgKiBkdXJhdGlvbk1vbnRoJDEgXSwKICAgICAgICBbICB5ZWFyLCAgMSwgICAgICBkdXJhdGlvblllYXIkMSAgXQogICAgICBdOwoKICAgICA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IG51bWJlciQ5KSkgOiBkb21haW4oKS5tYXAoZGF0ZSQ1KTsKICAgICAgfTsKCiAgICAgIHNjYWxlLnRpY2tzID0gZnVuY3Rpb24oaW50ZXJ2YWwsIHN0ZXApIHsKICAgICAgICB2YXIgZCA9IGRvbWFpbigpLAogICAgICAgICAgICB0MCA9IGRbMF0sCiAgICAgICAgICAgIHQxID0gZFtkLmxlbmd0aCAtIDFdLAogICAgICAgICAgICByID0gdDEgPCB0MCwKICAgICAgICAgICAgdDsKICAgICAgICBpZiAocikgdCA9IHQwLCB0MCA9IHQxLCB0MSA9IHQ7CiAgICAgICAgdCA9IHRpY2tJbnRlcnZhbChpbnRlcnZhbCwgdDAsIHQxLCBzdGVwKTsKICAgICAgICB0ID0gdCA/IHQucmFuZ2UodDAsIHQxICsgMSkgOiBbXTsgLy8gaW5jbHVzaXZlIHN0b3AKICAgICAgICByZXR1cm4gciA/IHQucmV2ZXJzZSgpIDogdDsKICAgICAgfTsKCiAgICAgIHNjYWxlLnRpY2tGb3JtYXQgPSBmdW5jdGlvbihjb3VudCwgc3BlY2lmaWVyKSB7CiAgICAgICAgcmV0dXJuIHNwZWNpZmllciA9PSBudWxsID8gdGlja0Zvcm1hdCA6IGZvcm1hdChzcGVjaWZpZXIpOwogICAgICB9OwoKICAgICAgc2NhbGUubmljZSA9IGZ1bmN0aW9uKGludGVydmFsLCBzdGVwKSB7CiAgICAgICAgdmFyIGQgPSBkb21haW4oKTsKICAgICAgICByZXR1cm4gKGludGVydmFsID0gdGlja0ludGVydmFsKGludGVydmFsLCBkWzBdLCBkW2QubGVuZ3RoIC0gMV0sIHN0ZXApKQogICAgICAgICAgICA/IGRvbWFpbihuaWNlJDEoZCwgaW50ZXJ2YWwpKQogICAgICAgICAgICA6IHNjYWxlOwogICAgICB9OwoKICAgICAgc2NhbGUuY29weSA9IGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiBjb3B5JDIoc2NhbGUsIGNhbGVuZGFyJDEoeWVhciwgbW9ud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ICAgICAgICAgICAgcHJldmlvdXMuX25leHQgPSBuZXh0IHx8IG51bGw7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CgogICAgICB1cGRhdGUgPSBuZXcgU2VsZWN0aW9uJDUodXBkYXRlLCBwYXJlbnRzKTsKICAgICAgdXBkYXRlLl9lbnRlciA9IGVudGVyOwogICAgICB1cGRhdGUuX2V4aXQgPSBleGl0OwogICAgICByZXR1cm4gdXBkYXRlOwogICAgfQoKICAgIGZ1bmN0aW9uIHNlbGVjdGlvbl9leGl0JDMoKSB7CiAgICAgIHJldHVybiBuZXcgU2VsZWN0aW9uJDUodGhpcy5fZXhpdCB8fCB0aGlzLl9ncm91cHMubWFwKHNwYXJzZSQzKSwgdGhpcy5fcGFyZW50cyk7CiAgICB9CgogICAgZnVuY3Rpb24gc2VsZWN0aW9uX21lcmdlJDMoc2VsZWN0aW9uKSB7CgogICAgICBmb3IgKHZhciBncm91cHMwID0gdGhpcy5fZ3JvdXBzLCBncm91cHMxID0gc2VsZWN0aW9uLl9ncm91cHMsIG0wID0gZ3JvdXBzMC5sZW5ndGgsIG0xID0gZ3JvdXBzMS5sZW5ndGgsIG0gPSBNYXRoLm1pbihtMCwgbTEpLCBtZXJnZXMgPSBuZXcgQXJyYXkobTApLCBqID0gMDsgaiA8IG07ICsraikgewogICAgICAgIGZvciAodmFyIGdyb3VwMCA9IGdyb3VwczBbal0sIGdyb3VwMSA9IGdyb3VwczFbal0sIG4gPSBncm91cDAubGVuZ3RoLCBtZXJnZSA9IG1lcmdlc1tqXSA9IG5ldyBBcnJheShuKSwgbm9kZSwgaSA9IDA7IGkgPCBuOyArK2kpIHsKICAgICAgICAgIGlmIChub2RlID0gZ3JvdXAwW2ldIHx8IGdyb3VwMVtpXSkgewogICAgICAgICAgICBtZXJnZVtpXSA9IG5vZGU7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CgogICAgICBmb3IgKDsgaiA8IG0wOyArK2opIHsKICAgICAgICBtZXJnZXNbal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W9uKCkgewogICAgICAgIHZhciB2ID0gdmFsdWUuYXBwbHkodGhpcywgYXJndW1lbnRzKTsKICAgICAgICB0aGlzLnRleHRDb250ZW50ID0gdiA9PSBudWxsID8gIiIgOiB2OwogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIHNlbGVjdGlvbl90ZXh0JDModmFsdWUpIHsKICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGgKICAgICAgICAgID8gdGhpcy5lYWNoKHZhbHVlID09IG51bGwKICAgICAgICAgICAgICA/IHRleHRSZW1vdmUkMyA6ICh0eXBlb2YgdmFsdWUgPT09ICJmdW5jdGlvbiIKICAgICAgICAgICAgICA/IHRleHRGdW5jdGlvbiQ1CiAgICAgICAgICAgICAgOiB0ZXh0Q29uc3RhbnQkNSkodmFsdWUpKQogICAgICAgICAgOiB0aGlzLm5vZGUoKS50ZXh0Q29udGVudDsKICAgIH0KCiAgICBmdW5jdGlvbiBodG1sUmVtb3ZlJDMoKSB7CiAgICAgIHRoaXMuaW5uZXJIVE1MID0gIiI7CiAgICB9CgogICAgZnVuY3Rpb24gaHRtbENvbnN0YW50JDModmFsdWUpIHsKICAgICAgcmV0dXJuIGZ1bmN0aW9uKCkgewogICAgICAgIHRoaXMuaW5uZXJIVE1MID0gdmFsdWU7CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gaHRtbEZ1bmN0aW9uJDModmFsdWUpIHsKICAgICAgcmV0dXJuIGZ1bmN0aW9uKCkgewogICAgICAgIHZhciB2ID0gdmFsdWUuYXBwbHkodGhpcywgYXJndW1lbnRzKTsKICAgICAgICB0aGlzLmlubmVySFRNTCA9IHYgPT0gbnVsbCA/ICIiIDogdjsKICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiBzZWxlY3Rpb25faHRtbCQzKHZhbHVlKSB7CiAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoCiAgICAgICAgICA/IHRoaXMuZWFjaCh2YWx1ZSA9PSBudWxsC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VsYXRlZC5jb21wYXJlRG9jdW1lbnRQb3NpdGlvbih0aGlzKSAmIDgpKSkgewogICAgICAgICAgbGlzdGVuZXIuY2FsbCh0aGlzLCBldmVudCk7CiAgICAgICAgfQogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIGNvbnRleHRMaXN0ZW5lciQzKGxpc3RlbmVyLCBpbmRleCwgZ3JvdXApIHsKICAgICAgcmV0dXJuIGZ1bmN0aW9uKGV2ZW50MSkgewogICAgICAgIHZhciBldmVudDAgPSBldmVudCQzOyAvLyBFdmVudHMgY2FuIGJlIHJlZW50cmFudCAoZS5nLiwgZm9jdXMpLgogICAgICAgIGV2ZW50JDMgPSBldmVudDE7CiAgICAgICAgdHJ5IHsKICAgICAgICAgIGxpc3RlbmVyLmNhbGwodGhpcywgdGhpcy5fX2RhdGFfXywgaW5kZXgsIGdyb3VwKTsKICAgICAgICB9IGZpbmFsbHkgewogICAgICAgICAgZXZlbnQkMyA9IGV2ZW50MDsKICAgICAgICB9CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gcGFyc2VUeXBlbmFtZXMkOCh0eXBlbmFtZXMpIHsKICAgICAgcmV0dXJuIHR5cGVuYW1lcy50cmltKCkuc3BsaXQoL158XHMrLykubWFwKGZ1bmN0aW9uKHQpIHsKICAgICAgICB2YXIgbmFtZSA9ICIiLCBpID0gdC5pbmRleE9mKCIuIik7CiAgICAgICAgaWYgKGkgPj0gMCkgbmFtZSA9IHQuc2xpY2UoaSArIDEpLCB0ID0gdC5zbGljZSgwLCBpKTsKICAgICAgICByZXR1cm4ge3R5cGU6IHQsIG5hbWU6IG5hbWV9OwogICAgICB9KTsKICAgIH0KCiAgICBmdW5jdGlvbiBvblJlbW92ZSQzKHR5cGVuYW1lKSB7CiAgICAgIHJldHVybiBmdW5jdGlvbigpIHsKICAgICAgICB2YXIgb24gPSB0aGlzLl9fb247CiAgICAgICAgaWYgKCFvbikgcmV0dXJuOwogICAgICAgIGZvciAodmFyIGogPSAwLCBpID0gLTEsIG0gPSBvbi5sZW5ndGgsIG87IGogPCBtOyArK2opIHsKICAgICAgICAgIGlmIChvID0gb25bal0sICghdHlwZW5hbWUudHlwZSB8fCBvLnR5cGUgPT09IHR5cGVuYW1lLnR5cGUpICYmIG8ubmFtZSA9PT0gdHlwZW5hbWUubmFtZSkgewogICAgICAgICAgICB0aGlzLnJlbW92ZUV2ZW50TGlzdGVuZXIoby50eXBlLCBvLmxpc3RlbmVyLCBvLmNhcHR1cmUpOwogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgb25bKytpXSA9IG87CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGlmICgrK2kpIG9uLmxlbmd0aCA9IGk7CiAgICAgICAgZWxzZSBkZWxldGUgdGhpcy5fX29uOwogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIG9uQWRkJDModHlwZW5hbWUsIHZhbHVlLCBjYXB0dXJlKSB7CiAgICAgIHZhciB3cmFwID0gZmlsdGVyRXZlbnRzJDMuaGFzT3duUHJvcGVydHkodHlwZW5hbWUudHlwZSkgPyBmaWx0ZXJDb250ZXh0TGlzdGVuZXIkMyA6IGNvbnRleHRMaXN0ZW5lciQzOwogICAgICByZXR1cm4gZnVuY3Rpb24oZCwgaSwgZ3JvdXApIHsKICAgICAgICB2YXIgb24gPSB0aGlzLl9fb24sIG8sIGxpc3RlbmVyID0gd3JhcCh2YWx1ZSwgaSwgZ3JvdXApOwogICAgICAgIGlmIChvbikgZm9yICh2YXIgaiA9IDAsIG0gPSBvbi5sZW5ndGg7IGogPCBtOyArK2opIHsKICAgICAgICAgIGlmICgobyA9IG9uW2pdKS50eXBlID09PSB0eXBlbmFtZS50eXBlICYmIG8ubmFtZSA9PT0gdHlwZW5hbWUubmFtZSkgewogICAgICAgICAgICB0aGlzLnJlbW92ZUV2ZW50TGlzdGVuZXIoby50eXBlLCBvLmxpc3RlbmVyLCBvLmNhcHR1cmUpOwogICAgICAgICAgICB0aGlzLmFkZE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JDMucHJvdG90eXBlID0gewogICAgICBjb25zdHJ1Y3RvcjogUGF0aCQzLAogICAgICBtb3ZlVG86IGZ1bmN0aW9uKHgsIHkpIHsKICAgICAgICB0aGlzLl8gKz0gIk0iICsgKHRoaXMuX3gwID0gdGhpcy5feDEgPSAreCkgKyAiLCIgKyAodGhpcy5feTAgPSB0aGlzLl95MSA9ICt5KTsKICAgICAgfSwKICAgICAgY2xvc2VQYXRoOiBmdW5jdGlvbigpIHsKICAgICAgICBpZiAodGhpcy5feDEgIT09IG51bGwpIHsKICAgICAgICAgIHRoaXMuX3gxID0gdGhpcy5feDAsIHRoaXMuX3kxID0gdGhpcy5feTA7CiAgICAgICAgICB0aGlzLl8gKz0gIloiOwogICAgICAgIH0KICAgICAgfSwKICAgICAgbGluZVRvOiBmdW5jdGlvbih4LCB5KSB7CiAgICAgICAgdGhpcy5fICs9ICJMIiArICh0aGlzLl94MSA9ICt4KSArICIsIiArICh0aGlzLl95MSA9ICt5KTsKICAgICAgfSwKICAgICAgcXVhZHJhdGljQ3VydmVUbzogZnVuY3Rpb24oeDEsIHkxLCB4LCB5KSB7CiAgICAgICAgdGhpcy5fICs9ICJRIiArICgreDEpICsgIiwiICsgKCt5MSkgKyAiLCIgKyAodGhpcy5feDEgPSAreCkgKyAiLCIgKyAodGhpcy5feTEgPSAreSk7CiAgICAgIH0sCiAgICAgIGJlemllckN1cnZlVG86IGZ1bmN0aW9uKHgxLCB5MSwgeDIsIHkyLCB4LCB5KSB7CiAgICAgICAgdGhpcy5fICs9ICJDIiArICgreDEpICsgIiwiICsgKCt5MSkgKyAiLCIgKyAoK3gyKSArICIsIiArICgreTIpICsgIiwiICsgKHRoaXMuX3gxID0gK3gpICsgIiwiICsgKHRoaXMuX3kxID0gK3kpOwogICAgICB9LAogICAgICBhcmNUbzogZnVuY3Rpb24oeDEsIHkxLCB4MiwgeTIsIHIpIHsKICAgICAgICB4MSA9ICt4MSwgeTEgPSAreTEsIHgyID0gK3gyLCB5MiA9IC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aGlzLl8gKz0gIkwiICsgKHRoaXMuX3gxID0geDEpICsgIiwiICsgKHRoaXMuX3kxID0geTEpOwogICAgICAgIH0KCiAgICAgICAgLy8gT3RoZXJ3aXNlLCBkcmF3IGFuIGFyYyEKICAgICAgICBlbHNlIHsKICAgICAgICAgIHZhciB4MjAgPSB4MiAtIHgwLAogICAgICAgICAgICAgIHkyMCA9IHkyIC0geTAsCiAgICAgICAgICAgICAgbDIxXzIgPSB4MjEgKiB4MjEgKyB5MjEgKiB5MjEsCiAgICAgICAgICAgICAgbDIwXzIgPSB4MjAgKiB4MjAgKyB5MjAgKiB5MjAsCiAgICAgICAgICAgICAgbDIxID0gTWF0aC5zcXJ0KGwyMV8yKSwKICAgICAgICAgICAgICBsMDEgPSBNYXRoLnNxcnQobDAxXzIpLAogICAgICAgICAgICAgIGwgPSByICogTWF0aC50YW4oKHBpJGEgLSBNYXRoLmFjb3MoKGwyMV8yICsgbDAxXzIgLSBsMjBfMikgLyAoMiAqIGwyMSAqIGwwMSkpKSAvIDIpLAogICAgICAgICAgICAgIHQwMSA9IGwgLyBsMDEsCiAgICAgICAgICAgICAgdDIxID0gbCAvIGwyMTsKCiAgICAgICAgICAvLyBJZiB0aGUgc3RhcnQgdGFuZ2VudCBpcyBub3QgY29pbmNpZGVudCB3aXRoICh4MCx5MCksIGxpbmUgdG8uCiAgICAgICAgICBpZiAoTWF0aC5hYnModDAxIC0gMSkgPiBlcHNpbG9uJDkpIHsKICAgICAgICAgICAgdGhpcy5fICs9ICJMIiArICh4MSArIHQwMSAqIHgwMSkgKyAiLCIgKyAoeTEgKyB0MDEgKiB5MDEpOwogICAgICAgICAgfQoKICAgICAgICAgIHRoaXMuXyArPSAiQSIgKyByICsgIiwiICsgciArICIsMCwwLCIgKyAoKyh5MDEgKiB4MjAgPiB4MDEgKiB5MjApKSArICIsIiArICh0aGlzLl94MSA9IHgxICsgdDIxICogeDIxKSArICIsIiArICh0aGlzLl95MSA9IHkxICsgdDIxICogeTIxKTsKICAgICAgICB9CiAgICAgIH0sCiAgICAgIGFyYzogZnVuY3Rpb24oeCwgeSwgciwgYTAsIGExLCBjY3cpIHsKICAgICAgICB4ID0gK3gsIHkgPSAreSwgciA9ICtyLCBjY3cgPSAhIWNjdzsKICAgICAgICB2YXIgZHggPSByICogTWF0aC5jb3MoYTApLAogICAgICAgICAgICBkeSA9IHIgKiBNYXRoLnNpbihhMCksCiAgICAgICAgICAgIHgwID0geCArIGR4LAogICAgICAgICAgICB5MCA9IHkgKyBkeSwKICAgICAgICAgICAgY3cgPSAxIF4gY2N3LAogICAgICAgICAgICBkYSA9IGNjdyA/IGEwIC0gYTEgOiBhMSAtIGEwOwoKICAgICAgICAvLyBJcyB0aGUgcmFkaXVzIG5lZ2F0aXZlPyBFcnJvci4KICAgICAgICBpZiAociA8IDApIHRocm93IG5ldyBFcnJvcigibmVnYXRpdmUgcmFkaXVzOiAiICsgcik7CgogICAgICAgIC8vIElzIHRoaXMgcGF0aCBlbXB0eT8gTW92ZSB0byAoeDAseTApLgogICAgICAgIGlmICh0aGlzLl94MSA9PT0gbnVsbCkgewogICAgICAgICAgdGhpcy5fICs9ICJNIiArIHgwICsgIiwiICsgeTA7CiAgICAgICAgfQoKICAgICAgICAvLyBPciwgaXMgKHgwLHkwKSBub3QgY29pbmNpZGVudCB3aXRoIHRoZSBwcmV2aW91cyBwb2ludD8gTGluZSB0byAoeDAseTApLgogICAgICAgIGVsc2UgaWYgKE1hdGguYWJzKHRoaXMuX3gxIC0geDApID4gZXBzaWxvbiQ5IHx8IE1hdGguYWJzKHRoaXMuX3kxIC0geTApID4gZXBzaWxvbiQ5KSB7CiAgICAgICAgICB0aGlzLl8gKz0gIkwiICsgeDAgKyAiLCIgKyB5MDsKICAgICAgICB9CgogICAgICAgIC8vIElzIHRoaXMgYXJjIGVtcHR5PyBXZeKAmXJlIGRvbmUuCiAgICAgICAgaWYgKCFyKSByZXR1cm47CgogICAgICAgIC8vIERvZXMgdGhlIGFuZ2xlIGdvIHRoZSB3cm9uZyB3YXk/IEZsaXAgdGhlIGRpcmVjdGlvbi4KICAgICAgICBpZiAoZGEgPCAwKSBkYSA9IGRhICUgdGF1JGEgKyB0YXUkYTsKCiAgICAgICAgLy8gSXMgdGhpcyBhIGNvbXBsZXRlIGNpcmNsZT8gRHJhdyB0d28gYXJjcyB0byBjb21wbGV0ZSB0aGUgY2lyY2xlLgogICAgICAgIGlmIChkYSA+IHRhdUVwc2lsb24kMykgewogICAgICAgICAgdGhpcy5fICs9ICJBIiArIHIgKyAiLCIgKyByICsgIiwwLDEsIiArIGN3ICsgIiwiICsgKHggLSBkeCkgKyAiLCIgKyAoeSAtIGR5KSArICJBIiArIHIgKyAiLCIgKyByICsgIiwwLDEsIiArIGN3ICsgIiwiICsgKHRoaXMuX3gxID0geDApICsgIiwiICsgKHRoaXMuX3kxID0geTApOwogICAgICAgIH0KCiAgICAgICAgLy8gSXMgdGhpcyBhcmMgbm9uLWVtcHR5PyBEcmF3IGFuIGFyYyEKICAgICAgICBlbHNlIGlmIChkYSA+IGVwc2lsb24kOSkgewogICAgICAgICAgdGhpcy5fICs9ICJBIiArIHIgKyAiLCIgKyByICsgIiwwLCIgKyAoKyhkYSA+PSBwaSRhKSkgKyAiLCIgKyBjdyArICIsIiArICh0aGlzLl94MSA9IHggKyByICogTWF0aC5jb3MoYTEpKSArICIsIiArICh0aGlzLl95MSA9IHkgKyByICogTWF0aC5zaW4oYTEpKTsKICAgICAgICB9CiAgICAgIH0sCiAgICAgIHJlY3Q6IGZ1bmN0aW9uKHgsIHksIHcsIGgpIHsKICAgICAgICB0aGlzLl8gKz0gIk0iICsgKHRoaXMuX3gwID0gdGhpcy5feDEgPSAreCkgKyAiLCIgKyAodGhpcy5feTAgPSB0aGlzLl95MSA9ICt5KSArICJoIiArICgrdykgKyAidiIgKyAoK2gpICsgImgiICsgKC13KSArICJaIjsKICAgICAgfSwKICAgICAgdG9TdHJpbmc6IGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVyb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LAogICAgICAgICAgeDAwID0gKHgxMSArIHgxMCkgLyAyLAogICAgICAgICAgeTAwID0gKHkxMSArIHkxMCkgLyAyLAogICAgICAgICAgZHggPSB4MTAgLSB4MTEsCiAgICAgICAgICBkeSA9IHkxMCAtIHkxMSwKICAgICAgICAgIGQyID0gZHggKiBkeCArIGR5ICogZHksCiAgICAgICAgICByID0gcjEgLSByYywKICAgICAgICAgIEQgPSB4MTEgKiB5MTAgLSB4MTAgKiB5MTEsCiAgICAgICAgICBkID0gKGR5IDwgMCA/IC0xIDogMSkgKiBzcXJ0JDUobWF4JDUoMCwgciAqIHIgKiBkMiAtIEQgKiBEKSksCiAgICAgICAgICBjeDAgPSAoRCAqIGR5IC0gZHggKiBkKSAvIGQyLAogICAgICAgICAgY3kwID0gKC1EICogZHggLSBkeSAqIGQpIC8gZDIsCiAgICAgICAgICBjeDEgPSAoRCAqIGR5ICsgZHggKiBkKSAvIGQyLAogICAgICAgICAgY3kxID0gKC1EICogZHggKyBkeSAqIGQpIC8gZDIsCiAgICAgICAgICBkeDAgPSBjeDAgLSB4MDAsCiAgICAgICAgICBkeTAgPSBjeTAgLSB5MDAsCiAgICAgICAgICBkeDEgPSBjeDEgLSB4MDAsCiAgICAgICAgICBkeTEgPSBjeTEgLSB5MDA7CgogICAgICAvLyBQaWNrIHRoZSBjbG9zZXIgb2YgdGhlIHR3byBpbnRlcnNlY3Rpb24gcG9pbnRzLgogICAgICAvLyBUT0RPIElzIHRoZXJlIGEgZmFzdGVyIHdheSB0byBkZXRlcm1pbmUgd2hpY2ggaW50ZXJzZWN0aW9uIHRvIHVzZT8KICAgICAgaWYgKGR4MCAqIGR4MCArIGR5MCAqIGR5MCA+IGR4MSAqIGR4MSArIGR5MSAqIGR5MSkgY3gwID0gY3gxLCBjeTAgPSBjeTE7CgogICAgICByZXR1cm4gewogICAgICAgIGN4OiBjeDAsCiAgICAgICAgY3k6IGN5MCwKICAgICAgICB4MDE6IC1veCwKICAgICAgICB5MDE6IC1veSwKICAgICAgICB4MTE6IGN4MCAqIChyMSAvIHIgLSAxKSwKICAgICAgICB5MTE6IGN5MCAqIChyMSAvIHIgLSAxKQogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIGFyYyQxKCkgewogICAgICB2YXIgaW5uZXJSYWRpdXMgPSBhcmNJbm5lclJhZGl1cyQxLAogICAgICAgICAgb3V0ZXJSYWRpdXMgPSBhcmNPdXRlclJhZGl1cyQxLAogICAgICAgICAgY29ybmVyUmFkaXVzID0gY29uc3RhbnQkcygwKSwKICAgICAgICAgIHBhZFJhZGl1cyA9IG51bGwsCiAgICAgICAgICBzdGFydEFuZ2xlID0gYXJjU3RhcnRBbmdsZSQxLAogICAgICAgICAgZW5kQW5nbGUgPSBhcmNFbmRBbmdsZSQxLAogICAgICAgICAgcGFkQW5nbGUgPSBhcmNQYWRBbmdsZSQxLAogICAgICAgICAgY29udGV4dCA9IG51bGw7CgogICAgICBmdW5jdGlvbiBhcmMoKSB7CiAgICAgICAgdmFyIGJ1ZmZlciwKICAgICAgICAgICAgciwKICAgICAgICAgICAgcjAgPSAraW5uZXJSYWRpdXMuYXBwbHkodGhpcywgYXJndW1lbnRzKSwKICAgICAgICAgICAgcjEgPSArb3V0ZXJSYWRpdXMuYXBwbHkodGhpcywgYXJndW1lbnRzKSwKICAgICAgICAgICAgYTAgPSBzdGFydEFuZ2xlLmFwcGx5KHRoaXMsIGFyZ3VtZW50cykgLSBoYWxmUGkkNywKICAgICAgICAgICAgYTEgPSBlbmRBbmdsZS5hcHBseSh0aGlzLCBhcmd1bWVudHMpIC0gaGFsZlBpJDcsCiAgICAgICAgICAgIGRhID0gYWJzJDMoYTEgLSBhMCksCiAgICAgICAgICAgIGN3ID0gYTEgPiBhMDsKCiAgICAgICAgaWYgKCFjb250ZXh0KSBjb250ZXh0ID0gYnVmZmVyID0gcGF0aCQzKCk7CgogICAgICAgIC8vIEVuc3VyZSB0aGF0IHRoZSBvdXRlciByYWRpdXMgaXMgYWx3YXlzIGxhcmdlciB0aGFuIHRoZSBpbm5lciByYWRpdXMuCiAgICAgICAgaWYgKHIxIDwgcjApIHIgPSByMSwgcjEgPSByMCwgcjAgPSByOwoKICAgICAgICAvLyBJcyBpdCBhIHBvaW50PwogICAgICAgIGlmICghKHIxID4gZXBzaWxvbiRhKSkgY29udGV4dC5tb3ZlVG8oMCwgMCk7CgogICAgICAgIC8vIE9yIGlzIGl0IGEgY2lyY2xlIG9yIGFubnVsdXM/CiAgICAgICAgZWxzZSBpZiAoZGEgPiB0YXUkYiAtIGVwc2lsb24kYSkgewogICAgICAgICAgY29udGV4dC5tb3ZlVG8ocjEgKiBjb3MkNShhMCksIHIxICogc2luJDUoYTApKTsKICAgICAgICAgIGNvbnRleHQuYXJjKDAsIDAsIHIxLCBhMCwgYTEsICFjdyk7CiAgICAgICAgICBpZiAocjAgPiBlcHNpbG9uJGEpIHsKICAgICAgICAgICAgY29udGV4dC5tb3ZlVG8ocjAgKiBjb3MkNShhMSksIHIwICogc2luJDUoYTEpKTsKICAgICAgICAgICAgY29udGV4dC5hcmMoMCwgMCwgcjAsIGExLCBhMCwgY3cpOwogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgLy8gT3IgaXMgaXQgYSBjaXJjdWxhciBvciBhbm51bGFyIHNlY3Rvcj8KICAgICAgICBlbHNlIHsKICAgICAgICAgIHZhciBhMDEgPSBhMCwKICAgICAgICAgICAgICBhMTEgPSBhMSwKICAgICAgICAgICAgICBhMDAgPSBhMCwKICAgICAgICAgICAgICBhMTAgPSBhMSwKICAgICAgICAgICAgICBkYTAgPSBkYSwKICAgICAgICAgICAgICBkYTEgPSBkYSwKICAgICAgICAgICAgICBhcCA9IHBhZEFuZ2xlLmFwcGx5KHRoaXMsIGFyZ3VtZW50cykgLyAyLAogICAgICAgICAgICAgIHJwID0gKGFwID4gZXBzaWxvbiRhKSAmJiAocGFkUmFkaXVzID8gK3BhZFJhZGl1cy5hcHBseSh0aGlzLCBhcmd1bWVudHMpIDogc3FydCQ1KHIwICogcjAgKyByMSAqIHIxKSksCiAgICAgICAgICAgICAgcmMgPSBtaW4kMyhhYnMkMyhyMSAtIHIwKSAvIDIsICtjb3JuZXJSYWRpdXMuYXBwbHkodGhpcywgYXJndW1lbnRzKSksCiAgICAgICAgICAgICAgcmMwID0gcmMsCiAgICAgICAgICAgICAgcmMxID0gcmMsCiAgICAgICAgICAgICAgdDAsCiAgICAgICAgICAgICAgdDE7CgogICAgICAgICAgLy8gQXBwbHkgcGFkZGluZz8gTm90ZSB0aGF0IHNpbmNlIHIxIOKJpSByMCwgZGExIOKJpSBkYTAuCiAgICAgICAgICBpZiAocnAgPiBlcHNpbG9uJGEpIHsKICAgICAgICAgICAgdmFyIHAwID0gYXNpbiQzKHJwIC8gcjAgKiBzaW4kNShhcCkpLAogICAgICAgICAgICAgICAgcDEgPSBhc2luJDMocnAgLyByMSAqIHNpbiQ1KGFwKSk7CiAgICAgICAgICAgIGlmICgoZGEwIC09IHAwICogMikgPiBlcHNpbG9uJGEpIHAwICo9IChjdyA/IDEgOiAtMSksIGEwMCArPSBwMCwgYTEwIC09IHAwOwogICAgICAgICAgICBlbHNlIGRhMCA9IDAsIGEwMCA9IGExMCA9IChhMCArIGExKSAvIDI7CiAgICAgICAgICAgIGlmICgoZGExIC09IHAxICogMikgPiBlcHNpbG9uJGEpIHAxICo9IChjdyA/IDEgOiAtMSksIGEwMSArPSBwMSwgYTExIC09IHAxOwogICAgICAgICAgICBlbHNlIGRhMSA9IDAsIGEwMSA9IGExMSA9IChhMCArIGExKSAvIDI7CiAgICAgICAgICB9CgogICAgICAgICAgdmFyIHgwMSA9IHIxICogY29zJDUoYTAxKSwKICAgICAgICAgICAgICB5MDEgPSByMSAqIHNpbiQ1KGEwMSksCiAgICAgICAgICAgICAgeDEwID0gcjAgKiBjb3MkNShhMTApLAogICAgICAgICAgICAgIHkxMCA9IHIwICogc2luJDUoYTEwKTsKCiAgICAgICAgICAvLyBBcHBseSByb3VuZGVkIGNvcm5lcnM/CiAgICAgICAgICBpZiAocmMgPiBlcHNpbG9uJGEpIHsKICAgICAgICAgICAgdmFyIHgxMSA9IHIxICogY29zJDUoYTExKSwKICAgICAgICAgICAgICAgIHkxMSA9IHIxICogc2luJDUoYTExKSwKICAgICAgICAgICAgICAgIHgwMCA9IHIwICogY29zJDUoYTAwKSwKICAgICAgICAgICAgICAgIHkwMCA9IHIwICogc2luJDUoYTAwKTsKCiAgICAgICAgICAgIC8vIFJlc3RyaWN0IHRoZSBjb3JuZXIgcmFkaXVzIGFjY29yZGluZyB0byB0aGUgc2VjdG9yIGFuZ2xlLgogICAgICAgICAgICBpZiAoZGEgPCBwaSRiKSB7CiAgICAgICAgICAgICAgdmFyIG9jID0gZGEwID4gZXBzaWxvbiRhID8gaW50ZXJzZWN0JDEoeDAxLCB5MDEsIHgwMCwgeTAwLCB4MTEsIHkxMSwgeDEwLCB5MTApIDogW3gxMCwgeTEwXSwKICAgICAgICAgICAgICAgICAgYXggPSB4MDEgLSBvY1swXSwKICAgICAgICAgICAgICAgICAgYXkgPSB5MDEgLSBvY1sxXSwKICAgICAgICAgICAgICAgICAgYnggPSB4MTEgLSBvY1swXSwKICAgICAgICAgICAgICAgICAgYnkgPSB5MTEgLSBvY1sxXSwKICAgICAgICAgICAgICAgICAga2MgPSAxIC8gc2luJDUoYWNvcyQzKChheCAqIGJ4ICsgYXkgKiBieSkgLyAoc3FydCQ1KGF4ICogYXggKyBheSAqIGF5KSAqIHNxcnQkNShieCAqIGJ4ICsgYnkgKiBieSkpKSAvIDIpLAogICAgICAgICAgICAgICAgICBsYyA9IHNxcnQkNShvY1swXSAqIG9jWzBdICsgb2NbMV0gKiBvY1sxXSk7CiAgICAgICAgICAgICAgcmMwID0gbWluJDMocmMsIChyMCAtIGxjKSAvIChrYyAtIDEpKTsKICAgICAgICAgICAgICByYzEgPSBtaW4kMyhyYywgKHIxIC0gbGMpIC8gKGtjICsgMSkpOwogICAgICAgICAgICB9CiAgICAgICAgICB9CgogICAg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gICAgICAgICAgLy8gSGF2ZSB0aGUgY29ybmVycyBtZXJnZWQ/CiAgICAgICAgICAgIGlmIChyYzAgPCByYykgY29udGV4dC5hcmModDAuY3gsIHQwLmN5LCByYzAsIGF0YW4yJDModDAueTAxLCB0MC54MDEpLCBhdGFuMiQzKHQxLnkwMSwgdDEueDAxKSwgIWN3KTsKCiAgICAgICAgICAgIC8vIE90aGVyd2lzZSwgZHJhdyB0aGUgdHdvIGNvcm5lcnMgYW5kIHRoZSByaW5nLgogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICBjb250ZXh0LmFyYyh0MC5jeCwgdDAuY3ksIHJjMCwgYXRhbjIkMyh0MC55MDEsIHQwLngwMSksIGF0YW4yJDModDAueTExLCB0MC54MTEpLCAhY3cpOwogICAgICAgICAgICAgIGNvbnRleHQuYXJjKDAsIDAsIHIwLCBhdGFuMiQzKHQwLmN5ICsgdDAueTExLCB0MC5jeCArIHQwLngxMSksIGF0YW4yJDModDEuY3kgKyB0MS55MTEsIHQxLmN4ICsgdDEueDExKSwgY3cpOwogICAgICAgICAgICAgIGNvbnRleHQuYXJjKHQxLmN4LCB0MS5jeSwgcmMwLCBhdGFuMiQzKHQxLnkxMSwgdDEueDExKSwgYXRhbjIkMyh0MS55MDEsIHQxLngwMSksICFjdyk7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KCiAgICAgICAgICAvLyBPciBpcyB0aGUgaW5uZXIgcmluZyBqdXN0IGEgY2lyY3VsYXIgYXJjPwogICAgICAgICAgZWxzZSBjb250ZXh0LmFyYygwLCAwLCByMCwgYTEwLCBhMDAsIGN3KTsKICAgICAgICB9CgogICAgICAgIGNvbnRleHQuY2xvc2VQYXRoKCk7CgogICAgICAgIGlmIChidWZmZXIpIHJldHVybiBjb250ZXh0ID0gbnVsbCwgYnVmZmVyICsgIiIgfHwgbnVsbDsKICAgICAgfQoKICAgICAgYXJjLmNlbnRyb2lkID0gZnVuY3Rpb24oKSB7CiAgICAgICAgdmFyIHI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5fbGluZSA9IDA7CiAgICAgIH0sCiAgICAgIGFyZWFFbmQ6IGZ1bmN0aW9uKCkgewogICAgICAgIHRoaXMuX2xpbmUgPSBOYU47CiAgICAgIH0sCiAgICAgIGxpbmVTdGFydDogZnVuY3Rpb24oKSB7CiAgICAgICAgdGhpcy5fcG9pbnQgPSAwOwogICAgICB9LAogICAgICBsaW5lRW5kOiBmdW5jdGlvbigpIHsKICAgICAgICBpZiAodGhpcy5fbGluZSB8fCAodGhpcy5fbGluZSAhPT0gMCAmJiB0aGlzLl9wb2ludCA9PT0gMSkpIHRoaXMuX2NvbnRleHQuY2xvc2VQYXRoKCk7CiAgICAgICAgdGhpcy5fbGluZSA9IDEgLSB0aGlzLl9saW5lOwogICAgICB9LAogICAgICBwb2ludDogZnVuY3Rpb24oeCwgeSkgewogICAgICAgIHggPSAreCwgeSA9ICt5OwogICAgICAgIHN3aXRjaCAodGhpcy5fcG9pbnQpIHsKICAgICAgICAgIGNhc2UgMDogdGhpcy5fcG9pbnQgPSAxOyB0aGlzLl9saW5lID8gdGhpcy5fY29udGV4dC5saW5lVG8oeCwgeSkgOiB0aGlzLl9jb250ZXh0Lm1vdmVUbyh4LCB5KTsgYnJlYWs7CiAgICAgICAgICBjYXNlIDE6IHRoaXMuX3BvaW50ID0gMjsgLy8gcHJvY2VlZAogICAgICAgICAgZGVmYXVsdDogdGhpcy5fY29udGV4dC5saW5lVG8oeCwgeSk7IGJyZWFrOwogICAgICAgIH0KICAgICAgfQogICAgfTsKCiAgICBmdW5jdGlvbiBjdXJ2ZUxpbmVhciQxKGNvbnRleHQpIHsKICAgICAgcmV0dXJuIG5ldyBMaW5lYXIkMShjb250ZXh0KTsKICAgIH0KCiAgICBmdW5jdGlvbiB4JDgocCkgewogICAgICByZXR1cm4gcFswXTsKICAgIH0KCiAgICBmdW5jdGlvbiB5JDgocCkgewogICAgICByZXR1cm4gcFsxXTsKICAgIH0KCiAgICBmdW5jdGlvbiBsaW5lJDEoKSB7CiAgICAgIHZhciB4ID0geCQ4LAogICAgICAgICAgeSA9IHkkOCwKICAgICAgICAgIGRlZmluZWQgPSBjb25zdGFudCRzKHRydWUpLAogICAgICAgICAgY29udGV4dCA9IG51bGwsCiAgICAgICAgICBjdXJ2ZSA9IGN1cnZlTGluZWFyJDEsCiAgICAgICAgICBvdXRwdXQgPSBudWxsOwoKICAgICAgZnVuY3Rpb24gbGluZShkYXRhKSB7CiAgICAgICAgdmFyIGksCiAgICAgICAgICAgIG4gPSBkYXRhLmxlbmd0aCwKICAgICAgICAgICAgZCwKICAgICAgICAgICAgZGVmaW5lZDAgPSBmYWxzZSwKICAgICAgICAgICAgYnVmZmVyOwoKICAgICAgICBpZiAoY29udGV4dCA9PSBudWxsKSBvdXRwdXQgPSBjdXJ2ZShidWZmZXIgPSBwYXRoJDMoKSk7CgogICAgICAgIGZvciAoaSA9IDA7IGkgPD0gbjsgKytpKSB7CiAgICAgICAgICBpZiAoIShpIDwgbiAmJiBkZWZpbmVkKGQgPSBkYXRhW2ldLCBpLCBkYXRhKSkgPT09IGRlZmluZWQwKSB7CiAgICAgICAgICAgIGlmIChkZWZpbmVkMCA9ICFkZWZpbmVkMCkgb3V0cHV0LmxpbmVTdGFydCgpOwogICAgICAgICAgICBlbHNlIG91dHB1dC5saW5lRW5kKCk7CiAgICAgICAgICB9CiAgICAgICAgICBpZiAoZGVmaW5lZDApIG91dHB1dC5wb2ludCgreChkLCBpLCBkYXRhKSwgK3koZCwgaSwgZGF0YSkpOwogICAgICAgIH0KCiAgICAgICAgaWYgKGJ1ZmZlcikgcmV0dXJuIG91dHB1dCA9IG51bGwsIGJ1ZmZlciArICIiIHx8IG51bGw7CiAgICAgIH0KCiAgICAgIGxpbmUueCA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/ICh4ID0gdHlwZW9mIF8gPT09ICJmdW5jdGlvbiIgPyBfIDogY29uc3RhbnQkcygrXyksIGxpbmUpIDogeDsKICAgICAgfTsKCiAgICAgIGxpbmUueSA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/ICh5ID0gdHlwZW9mIF8gPT09ICJmdW5jdGlvbiIgPyBfIDogY29uc3RhbnQkcygrXyksIGxpbmUpIDogeTsKICAgICAgfTsKCiAgICAgIGxpbmUuZGVmaW5lZCA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChkZWZpbmVkID0gdHlwZW9mIF8gPT09ICJmdW5jdGlvbiIgPyBfIDogY29uc3RhbnQkcyghIV8pLCBsaW5lKSA6IGRlZmluZWQ7CiAgICAgIH07CgogICAgICBsaW5lLmN1cnZlID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKGN1cnZlID0gXywgY29udGV4dCAhPSBudWxsICYmIChvdXRwdXQgPSBjdXJ2ZShjb250ZXh0KSksIGxpbmUpIDogY3VydmU7CiAgICAgIH07CgogICAgICBsaW5lLmNvbnRleHQgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoXyA9PSBudWxsID8gY29udGV4dCA9IG91dHB1dCA9IG51bGwgOiBvdXRwdXQgPSBjdXJ2ZShjb250ZXh0ID0gXyksIGxpbmUpIDogY29udGV4dDsKICAgICAgfTsKCiAgICAgIHJldHVybiBsaW5lOwogICAgfQoKICAgIGZ1bmN0aW9uIGFyZWEkNigpIHsKICAgICAgdmFyIHgwID0geCQ4LAogICAgICAgICAgeDEgPSBudWxsLAogICAgICAgICAgeTAgPSBjb25zdGFudCRzKDApLAogICAgICAgICAgeTEgPSB5JDgsCiAgICAgICAgICBkZWZpbmVkID0gY29uc3RhbnQkcyh0cnVlKSwKICAgICAgICAgIGNvbnRleHQgPSBudWxsLAogICAgICAgICAgY3VydmUgPSBjdXJ2ZUxpbmVhciQxLAogICAgICAgICAgb3V0cHV0ID0gbnVsbDsKCiAgICAgIGZ1bmN0aW9uIGFyZWEoZGF0YSkgewogICAgICAgIHZhciBpLAogICAgICAgICAgICBqLAogICAgICAgICAgICBrLAogICAgICAgICAgICBuID0gZGF0YS5sZW5ndGgsCiAgICAgICAgICAgIGQsCiAgICAgICAgICAgIGRlZmluZWQwID0gZmFsc2UsCiAgICAgICAgICAgIGJ1ZmZlciwKICAgICAgICAgICAgeDB6ID0gbmV3IEFycmF5KG4pLAogICAgICAgICAgICB5MHogPSBuZXcgQXJyYXkobik7CgogICAgICAgIGlmIChjb250ZXh0ID09IG51bGwpIG91dHB1dCA9IGN1cnZlKGJ1ZmZlciA9IHBhdGgkMygpKTsKCiAgICAgICAgZm9yIChpID0gMDsgaSA8PSBuOyArK2kpIHsKICAgICAgICAgIGlmICghKGkgPCBuICYmIGRlZmluZWQoZCA9IGRhdGFbaV0sIGksIGRhdGEpKSA9PT0gZGVmaW5lZDApIHsKICAgICAgICAgICAgaWYgKGRlZmluZWQwID0gIWRlZmluZWQwKSB7CiAgICAgICAgICAgICAgaiA9IGk7CiAgICAgICAgICAgICAgb3V0cHV0LmFyZWFTdGFydCgpOwogICAgICAgICAgICAgIG91dHB1dC5saW5lU3RhcnQoKTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICBvdXRwdXQubGluZUVuZCgpOwogICAgICAgICAgICAgIG91dHB1dC5saW5lU3RhcnQoKTsKICAgICAgICAgICAgICBmb3IgKGsgPSBpIC0gMTsgayA+PSBqOyAtLWspIHsKICAgICAgICAgICAgICAgIG91dHB1dC5wb2ludCh4MHpba10sIHkweltrXSk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIG91dHB1dC5saW5lRW5kKCk7CiAgICAgICAgICAgICAgb3V0cHV0LmFyZWFFbmQoKTsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgICAgaWYgKGRlZmluZWQwKSB7CiAgICAgICAgICAgIHgweltpXSA9ICt4M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W0gPyAoZGEgLSBuICogcGEpIC8gc3VtIDogMDsgaSA8IG47ICsraSwgYTAgPSBhMSkgewogICAgICAgICAgaiA9IGluZGV4W2ldLCB2ID0gYXJjc1tqXSwgYTEgPSBhMCArICh2ID4gMCA/IHYgKiBrIDogMCkgKyBwYSwgYXJjc1tqXSA9IHsKICAgICAgICAgICAgZGF0YTogZGF0YVtqXSwKICAgICAgICAgICAgaW5kZXg6IGksCiAgICAgICAgICAgIHZhbHVlOiB2LAogICAgICAgICAgICBzdGFydEFuZ2xlOiBhMCwKICAgICAgICAgICAgZW5kQW5nbGU6IGExLAogICAgICAgICAgICBwYWRBbmdsZTogcAogICAgICAgICAgfTsKICAgICAgICB9CgogICAgICAgIHJldHVybiBhcmNzOwogICAgICB9CgogICAgICBwaWUudmFsdWUgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAodmFsdWUgPSB0eXBlb2YgXyA9PT0gImZ1bmN0aW9uIiA/IF8gOiBjb25zdGFudCRzKCtfKSwgcGllKSA6IHZhbHVlOwogICAgICB9OwoKICAgICAgcGllLnNvcnRWYWx1ZXMgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoc29ydFZhbHVlcyA9IF8sIHNvcnQgPSBudWxsLCBwaWUpIDogc29ydFZhbHVlczsKICAgICAgfTsKCiAgICAgIHBpZS5zb3J0ID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHNvcnQgPSBfLCBzb3J0VmFsdWVzID0gbnVsbCwgcGllKSA6IHNvcnQ7CiAgICAgIH07CgogICAgICBwaWUuc3RhcnRBbmdsZSA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChzdGFydEFuZ2xlID0gdHlwZW9mIF8gPT09ICJmdW5jdGlvbiIgPyBfIDogY29u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SB7CiAgICAgICAgdGhpcy5fY3VydmUucG9pbnQociAqIE1hdGguc2luKGEpLCByICogLU1hdGguY29zKGEpKTsKICAgICAgfQogICAgfTsKCiAgICBmdW5jdGlvbiBjdXJ2ZVJhZGlhbCQyKGN1cnZlKSB7CgogICAgICBmdW5jdGlvbiByYWRpYWwoY29udGV4dCkgewogICAgICAgIHJldHVybiBuZXcgUmFkaWFsJDEoY3VydmUoY29udGV4dCkpOwogICAgICB9CgogICAgICByYWRpYWwuX2N1cnZlID0gY3VydmU7CgogICAgICByZXR1cm4gcmFkaWFsOwogICAgfQoKICAgIGZ1bmN0aW9uIGxpbmVSYWRpYWwkMihsKSB7CiAgICAgIHZhciBjID0gbC5jdXJ2ZTsKCiAgICAgIGwuYW5nbGUgPSBsLngsIGRlbGV0ZSBsLng7CiAgICAgIGwucmFkaXVzID0gbC55LCBkZWxldGUgbC55OwoKICAgICAgbC5jdXJ2ZSA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IGMoY3VydmVSYWRpYWwkMihfKSkgOiBjKCkuX2N1cnZlOwogICAgICB9OwoKICAgICAgcmV0dXJuIGw7CiAgICB9CgogICAgZnVuY3Rpb24gbGluZVJhZGlhbCQzKCkgewogICAgICByZXR1cm4gbGluZVJhZGlhbCQyKGxpbmUkMSgpLmN1cnZlKGN1cnZlUmFkaWFsTGluZWFyJDEpKTsKICAgIH0KCiAgICBmdW5jdGlvbiBhcmVhUmFkaWFsJDEoKSB7CiAgICAgIHZhciBhID0gYXJlYSQ2KCkuY3VydmUoY3VydmVSYWRpYWxMaW5lYXIkMSksCiAgICAgICAgICBjID0gYS5jdXJ2ZSwKICAgICAgICAgIHgwID0gYS5saW5lWDAsCiAgICAgICAgICB4MSA9IGEubGluZVgxLAogICAgICAgICAgeTAgPSBhLmxpbmVZMCwKICAgICAgICAgIHkxID0gYS5saW5lWTE7CgogICAgICBhLmFuZ2xlID0gYS54LCBkZWxldGUg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KCiAgICBmdW5jdGlvbiBsaW5rU291cmNlJDEoZCkgewogICAgICByZXR1cm4gZC5zb3VyY2U7CiAgICB9CgogICAgZnVuY3Rpb24gbGlua1RhcmdldCQxKGQpIHsKICAgICAgcmV0dXJuIGQudGFyZ2V0OwogICAgfQoKICAgIGZ1bmN0aW9uIGxpbmskNShjdXJ2ZSkgewogICAgICB2YXIgc291cmNlID0gbGlua1NvdXJjZSQxLAogICAgICAgICAgdGFyZ2V0ID0gbGlua1RhcmdldCQxLAogICAgICAgICAgeCA9IHgkOCwKICAgICAgICAgIHkgPSB5JDgsCiAgICAgICAgICBjb250ZXh0ID0gbnVsbDsKCiAgICAgIGZ1bmN0aW9uIGxpbmsoKSB7CiAgICAgICAgdmFyIGJ1ZmZlciwgYXJndiA9IHNsaWNlJGQuY2FsbChhcmd1bWVudHMpLCBzID0gc291cmNlLmFwcGx5KHRoaXMsIGFyZ3YpLCB0ID0gdGFyZ2V0LmFwcGx5KHRoaXMsIGFyZ3YpOwogICAgICAgIGlmICghY29udGV4dCkgY29udGV4dCA9IGJ1ZmZlciA9IHBhdGgkMygpOwogICAgICAgIGN1cnZlKGNvbnRleHQsICt4LmFwcGx5KHRoaXMsIChhcmd2WzBdID0gcywgYXJndikpLCAreS5hcHBseSh0aGlzLCBhcmd2KSwgK3guYXBwbHkodGhpcywgKGFyZ3ZbMF0gPSB0LCBhcmd2KSksICt5LmFwcGx5KHRoaXMsIGFyZ3YpKTsKICAgICAgICBpZiAoYnVmZmVyKSByZXR1cm4gY29udGV4dCA9IG51bGwsIGJ1ZmZlciArICIiIHx8IG51bGw7CiAgICAgIH0KCiAgICAgIGxpbmsuc291cmNlID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHNvdXJjZSA9IF8sIGxpbmspIDogc291cmNlOwogICAgICB9OwoKICAgICAgbGluay50YXJnZXQgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3Vt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JhdzogZnVuY3Rpb24oY29udGV4dCwgc2l6ZSkgewogICAgICAgIHZhciByID0gTWF0aC5zcXJ0KHNpemUgLyA1KSAvIDI7CiAgICAgICAgY29udGV4dC5tb3ZlVG8oLTMgKiByLCAtcik7CiAgICAgICAgY29udGV4dC5saW5lVG8oLXIsIC1yKTsKICAgICAgICBjb250ZXh0LmxpbmVUbygtciwgLTMgKiByKTsKICAgICAgICBjb250ZXh0LmxpbmVUbyhyLCAtMyAqIHIpOwogICAgICAgIGNvbnRleHQubGluZVRvKHIsIC1yKTsKICAgICAgICBjb250ZXh0LmxpbmVUbygzICogciwgLXIpOwogICAgICAgIGNvbnRleHQubGluZVRvKDMgKiByLCByKTsKICAgICAgICBjb250ZXh0LmxpbmVUbyhyLCByKTsKICAgICAgICBjb250ZXh0LmxpbmVUbyhyLCAzICogcik7CiAgICAgICAgY29udGV4dC5saW5lVG8oLXIsIDMgKiByKTsKICAgICAgICBjb250ZXh0LmxpbmVUbygtciwgcik7CiAgICAgICAgY29udGV4dC5saW5lVG8oLTMgKiByLCByKTsKICAgICAgICBjb250ZXh0LmNsb3NlUGF0aCgpOwogICAgICB9CiAgICB9OwoKICAgIHZhciB0YW4zMCQxID0gTWF0aC5zcXJ0KDEgLyAzKSwKICAgICAgICB0YW4zMF8yJDEgPSB0YW4zMCQxICogMjsKCiAgICB2YXIgZGlhbW9uZCQxID0gewogICAgICBkcmF3OiBmdW5jdGlvbihjb250ZXh0LCBzaXplKSB7CiAgICAgICAgdmFyIHkgPSBNYXRoLnNxcnQoc2l6ZSAvIHRhbjMwXzIkMSksCiAgICAgICAgICAgIHggPSB5ICogdGFuMzAkMTsKICAgICAgICBjb250ZXh0Lm1vdmVUbygwLCAteSk7CiAgICAgICAgY29udGV4dC5saW5lVG8oeCwgMCk7CiAgICAgICAgY29udGV4dC5saW5lVG8oMCwgeSk7CiAgICAgICAgY29udGV4dC5saW5lVG8oLXgsIDApOwogICAgICAgIGNvbnRleHQuY2xvc2VQYXRoKCk7CiAgICAgIH0KICAgIH07CgogICAgdmFyIGthJDEgPSAwLjg5MDgxMzA5MTUyOTI4NTIyODEwLAogICAgICAgIGtyJDEgPSBNYXRoLnNpbihwaSRiIC8gMTApIC8gTWF0aC5zaW4oNyAqIHBpJGIgLyAxMCksCiAgICAgICAga3gkMSA9IE1hdGguc2luKHRhdSRiIC8gMTApICoga3IkMSwKICAgICAgICBreSQxID0gLU1hdGguY29zKHRhdSRiIC8gMTApICoga3IkMTsKCiAgICB2YXIgc3RhciQxID0gewogICAgICBkcmF3OiBmdW5jdGlvbihjb250ZXh0LCBzaXplKSB7CiAgICAgICAgdmFyIHIgPSBNYXRoLnNxcnQoc2l6ZSAqIGthJDEpLAogICAgICAgICAgICB4ID0ga3gkMSAqIHIsCiAgICAgICAgICAgIHkgPSBreSQxICogcjsKICAgICAgICBjb250ZXh0Lm1vdmVUbygwLCAtcik7CiAgICAgICAgY29udGV4dC5saW5lVG8oeCwgeSk7CiAgICAgICAgZm9yICh2YXIgaSA9IDE7IGkgPCA1OyArK2kpIHsKICAgICAgICAgIHZhciBhID0gdGF1JGIgKiBpIC8gNSwKICAgICAgICAgICAgICBjID0gTWF0aC5jb3MoYSksCiAgICAgICAgICAgICAgcyA9IE1hdGguc2luKGEpOwogICAgICAgICAgY29udGV4dC5saW5lVG8ocyAqIHIsIC1jICogcik7CiAgICAgICAgICBjb250ZXh0LmxpbmVUbyhjICogeCAtIHMgKiB5LCBzICogeCArIGMgKiB5KTsKICAgICAgICB9CiAgICAgICAgY29udGV4dC5jbG9zZVBhdGgoKTsKICAgICAgfQogICAgfTsKCiAgICB2YXIgc3F1YXJlJDEgPSB7CiAgICAgIGRyYXc6IGZ1bmN0aW9uKGNvbnRleHQsIHNpemUpIHsKICAgICAgICB2YXIgdyA9IE1hdGguc3FydChzaXplKSwKICAgICAgICAgICAgeCA9IC13IC8gMjsKICAgICAgICBjb250ZXh0LnJlY3QoeCwgeCwgdywgdyk7CiAgICAgIH0KICAgIH07CgogICAgdmFyIHNxcnQzJDEgPSBNYXRoLnNxcnQoMyk7CgogICAgdmFyIHRyaWFuZ2xlJDEgPSB7CiAgICAgIGRyYXc6IGZ1bmN0aW9uKGNvbnRleHQsIHNpemUpIHsKICAgICAgICB2YXIgeSA9IC1NYXRoLnNxcnQoc2l6ZSAvIChzcXJ0MyQxICogMykpOwogICAgICAgIGNvbnRleHQubW92ZVRvKDAsIHkgKiAyKTsKICAgICAgICBjb250ZXh0LmxpbmVUbygtc3FydDMkMSAqIHksIC15KTsKICAgICAgICBjb250ZXh0LmxpbmVUbyhzcXJ0MyQxICogeSwgLXkpOwogICAgICAgIGNvbnRleHQuY2xvc2VQYXRoKCk7CiAgICAgIH0KICAgIH07CgogICAgdmFyIGMkMyA9IC0wLjUsCiAgICAgICAgcyQxID0gTWF0aC5zcXJ0KDMpIC8gMiwKICAgICAgICBrJDEgPSAxIC8gTWF0aC5zcXJ0KDEyKSwKICAgICAgICBhJDEgPSAoayQxIC8gMiArIDEpICogMzsKCiAgICB2YXIgd3llJDEgPSB7CiAgICAgIGRyYXc6IGZ1bmN0aW9uKGNvbnRleHQsIHNpemUpIHsKICAgICAgICB2YXIgciA9IE1hdGguc3FydChzaXplIC8gYSQxKSwKICAgICAgICAgICAgeDAgPSByIC8gMiwKICAgICAgICAgICAgeTAgPSByICogayQxLAogICAgICAgICAgICB4MSA9IHgwLAogICAgICAgICAgICB5MSA9IHIgKiBrJDEgKyByLAogICAgICAgICAgICB4MiA9IC14MSwKICAgICAgICAgICAgeTIgPSB5MTsKICAgICAgICBjb250ZXh0Lm1vdmVUbyh4MCwgeTApOwogICAgICAgIGNvbnRleHQubGluZVRvKHgxLCB5MSk7CiAgICAgICAgY29udGV4dC5saW5lVG8oeDIsIHkyKTsKICAgICAgICBjb250ZXh0LmxpbmVUbyhjJDMgKiB4MCAtIHMkMSAqIHkwLCBzJDEgKiB4MCArIGMkMyAqIHkwKTsKICAgICAgICBjb250ZXh0LmxpbmVUbyhjJDMgKiB4MSA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1bmN0aW9uIEJhc2lzJDEoY29udGV4dCkgewogICAgICB0aGlzLl9jb250ZXh0ID0gY29udGV4dDsKICAgIH0KCiAgICBCYXNpcyQxLnByb3RvdHlwZSA9IHsKICAgICAgYXJlYVN0YXJ0OiBmdW5jdGlvbigpIHsKICAgICAgICB0aGlzLl9saW5lID0gMDsKICAgICAgfSwKICAgICAgYXJlYUVuZDogZnVuY3Rpb24oKSB7CiAgICAgICAgdGhpcy5fbGluZSA9IE5hTjsKICAgICAgfSwKICAgICAgbGluZVN0YXJ0OiBmdW5jdGlvbigpIHsKICAgICAgICB0aGlzLl94MCA9IHRoaXMuX3gxID0KICAgICAgICB0aGlzLl95MCA9IHRoaXMuX3kxID0gTmFOOwogICAgICAgIHRoaXMuX3BvaW50ID0gMDsKICAgICAgfSwKICAgICAgbGluZUVuZDogZnVuY3Rpb24oKSB7CiAgICAgICAgc3dpdGNoICh0aGlzLl9wb2ludCkgewogICAgICAgICAgY2FzZSAzOiBwb2ludCRhKHRoaXMsIHRoaXMuX3gxLCB0aGlzLl95MSk7IC8vIHByb2NlZWQKICAgICAgICAgIGNhc2UgMjogdGhpcy5fY29udGV4dC5saW5lVG8odGhpcy5feDEsIHRoaXMuX3kxKTsgYnJlYWs7CiAgICAgICAgfQogICAgICAgIGlmICh0aGlzLl9saW5lIHx8ICh0aGlzLl9saW5lICE9PSAwICYmIHRoaXMuX3BvaW50ID09PSAxKSkgdGhpcy5fY29udGV4dC5jbG9zZVBhdGgoKTsKICAgICAgICB0aGlzLl9saW5lID0gMSAtIHRoaXMuX2xpbmU7CiAgICAgIH0sCiAgICAgIHBvaW50OiBmdW5jdGlvbih4LCB5KSB7CiAgICAgICAgeCA9ICt4LCB5ID0gK3k7CiAgICAgICAgc3dpdGNoICh0aGlzLl9wb2ludCkgewogICAgICAgICAgY2FzZSAwOiB0aGlzLl9wb2ludCA9IDE7IHRoaXMuX2xpbmUgPyB0aGlzLl9jb250ZXh0LmxpbmVUbyh4LCB5KSA6IHRo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wb2ludCkgewogICAgICAgICAgY2FzZSAxOiB7CiAgICAgICAgICAgIHRoaXMuX2NvbnRleHQubW92ZVRvKHRoaXMuX3gyLCB0aGlzLl95Mik7CiAgICAgICAgICAgIHRoaXMuX2NvbnRleHQuY2xvc2VQYXRoKCk7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgfQogICAgICAgICAgY2FzZSAyOiB7CiAgICAgICAgICAgIHRoaXMuX2NvbnRleHQubW92ZVRvKCh0aGlzLl94MiArIDIgKiB0aGlzLl94MykgLyAzLCAodGhpcy5feTIgKyAyICogdGhpcy5feTMpIC8gMyk7CiAgICAgICAgICAgIHRoaXMuX2NvbnRleHQubGluZVRvKCh0aGlzLl94MyArIDIgKiB0aGlzLl94MikgLyAzLCAodGhpcy5feTMgKyAyICogdGhpcy5feTIpIC8gMyk7CiAgICAgICAgICAgIHRoaXMuX2NvbnRleHQuY2xvc2VQYXRoKCk7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgfQogICAgICAgICAgY2FzZSAzOiB7CiAgICAgICAgICAgIHRoaXMucG9pbnQodGhpcy5feDIsIHRoaXMuX3kyKTsKICAgICAgICAgICAgdGhpcy5wb2ludCh0aGlzLl94MywgdGhpcy5feTMpOwogICAgICAgICAgICB0aGlzLnBvaW50KHRoaXMuX3g0LCB0aGlzLl95NCk7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfSwKICAgICAgcG9pbnQ6IGZ1bmN0aW9uKHgsIHkpIHsKICAgICAgICB4ID0gK3gsIHkgPSAreTsKICAgICAgICBzd2l0Y2ggKHRoaXMuX3BvaW50KSB7CiAgICAgICAgICBjYXNlIDA6IHRoaXMuX3BvaW50ID0gMTsgdGhpcy5feDIgPSB4LCB0aGlzLl95MiA9IHk7IGJyZWFrOwogICAgICAgICAgY2FzZSAxOiB0aGlzLl9wb2ludCA9IDI7IHRoaXMuX3gzID0geCwgdGhpcy5feTMgPSB5OyBicmVhazsKICA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pcy5fYmV0YSA9IGJldGE7CiAgICB9CgogICAgQnVuZGxlJDEucHJvdG90eXBlID0gewogICAgICBsaW5lU3RhcnQ6IGZ1bmN0aW9uKCkgewogICAgICAgIHRoaXMuX3ggPSBbXTsKICAgICAgICB0aGlzLl95ID0gW107CiAgICAgICAgdGhpcy5fYmFzaXMubGluZVN0YXJ0KCk7CiAgICAgIH0sCiAgICAgIGxpbmVFbmQ6IGZ1bmN0aW9uKCkgewogICAgICAgIHZhciB4ID0gdGhpcy5feCwKICAgICAgICAgICAgeSA9IHRoaXMuX3ksCiAgICAgICAgICAgIGogPSB4Lmxlbmd0aCAtIDE7CgogICAgICAgIGlmIChqID4gMCkgewogICAgICAgICAgdmFyIHgwID0geFswXSwKICAgICAgICAgICAgICB5MCA9IHlbMF0sCiAgICAgICAgICAgICAgZHggPSB4W2pdIC0geDAsCiAgICAgICAgICAgICAgZHkgPSB5W2pdIC0geTAsCiAgICAgICAgICAgICAgaSA9IC0xLAogICAgICAgICAgICAgIHQ7CgogICAgICAgICAgd2hpbGUgKCsraSA8PSBqKSB7CiAgICAgICAgICAgIHQgPSBpIC8gajsKICAgICAgICAgICAgdGhpcy5fYmFzaXMucG9pbnQoCiAgICAgICAgICAgICAgdGhpcy5fYmV0YSAqIHhbaV0gKyAoMSAtIHRoaXMuX2JldGEpICogKHgwICsgdCAqIGR4KSwKICAgICAgICAgICAgICB0aGlzLl9iZXRhICogeVtpXSArICgxIC0gdGhpcy5fYmV0YSkgKiAoeTAgKyB0ICogZHkpCiAgICAgICAgICAgICk7CiAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICB0aGlzLl94ID0gdGhpcy5feSA9IG51bGw7CiAgICAgICAgdGhpcy5fYmFzaXMubGluZUVuZCgpOwogICAgICB9LAogICAgICBwb2ludDogZnVuY3Rpb24oeCwgeSkgewogICAgICAgIHRoaXMuX3gucHVzaCgreCk7CiAgICAgICAgdGhpcy5feS5wdXNoKCt5KTsKICAgICAgfQogICAgfTsKCiA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U47CiAgICAgICAgdGhpcy5fcG9pbnQgPSAwOwogICAgICB9LAogICAgICBsaW5lRW5kOiBmdW5jdGlvbigpIHsKICAgICAgICBzd2l0Y2ggKHRoaXMuX3BvaW50KSB7CiAgICAgICAgICBjYXNlIDE6IHsKICAgICAgICAgICAgdGhpcy5fY29udGV4dC5tb3ZlVG8odGhpcy5feDMsIHRoaXMuX3kzKTsKICAgICAgICAgICAgdGhpcy5fY29udGV4dC5jbG9zZVBhdGgoKTsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICB9CiAgICAgICAgICBjYXNlIDI6IHsKICAgICAgICAgICAgdGhpcy5fY29udGV4dC5saW5lVG8odGhpcy5feDMsIHRoaXMuX3kzKTsKICAgICAgICAgICAgdGhpcy5fY29udGV4dC5jbG9zZVBhdGgoKTsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICB9CiAgICAgICAgICBjYXNlIDM6IHsKICAgICAgICAgICAgdGhpcy5wb2ludCh0aGlzLl94MywgdGhpcy5feTMpOwogICAgICAgICAgICB0aGlzLnBvaW50KHRoaXMuX3g0LCB0aGlzLl95NCk7CiAgICAgICAgICAgIHRoaXMucG9pbnQodGhpcy5feDUsIHRoaXMuX3k1KTsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9LAogICAgICBwb2ludDogZnVuY3Rpb24oeCwgeSkgewogICAgICAgIHggPSAreCwgeSA9ICt5OwogICAgICAgIHN3aXRjaCAodGhpcy5fcG9pbnQpIHsKICAgICAgICAgIGNhc2UgMDogdGhpcy5fcG9pbnQgPSAxOyB0aGlzLl94MyA9IHgsIHRoaXMuX3kzID0geTsgYnJlYWs7CiAgICAgICAgICBjYXNlIDE6IHRoaXMuX3BvaW50ID0gMjsgdGhpcy5fY29udGV4dC5tb3ZlVG8odGhpcy5feDQgPSB4LCB0aGlzLl95NCA9IHkpOyBicmVhazsKICAgICAgICAgIGNhc2UgMjogdGhpcy5fcG9pbnQgPSAzOy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AgPSB0aGlzLl94MSA9IHRoaXMuX3gyID0KICAgICAgICB0aGlzLl95MCA9IHRoaXMuX3kxID0gdGhpcy5feTIgPSBOYU47CiAgICAgICAgdGhpcy5fcG9pbnQgPSAwOwogICAgICB9LAogICAgICBsaW5lRW5kOiBmdW5jdGlvbigpIHsKICAgICAgICBpZiAodGhpcy5fbGluZSB8fCAodGhpcy5fbGluZSAhPT0gMCAmJiB0aGlzLl9wb2ludCA9PT0gMykpIHRoaXMuX2NvbnRleHQuY2xvc2VQYXRoKCk7CiAgICAgICAgdGhpcy5fbGluZSA9IDEgLSB0aGlzLl9saW5lOwogICAgICB9LAogICAgICBwb2ludDogZnVuY3Rpb24oeCwgeSkgewogICAgICAgIHggPSAreCwgeSA9ICt5OwogICAgICAgIHN3aXRjaCAodGhpcy5fcG9pbnQpIHsKICAgICAgICAgIGNhc2UgMDogdGhpcy5fcG9pbnQgPSAxOyBicmVhazsKICAgICAgICAgIGNhc2UgMTogdGhpcy5fcG9pbnQgPSAyOyBicmVhazsKICAgICAgICAgIGNhc2UgMjogdGhpcy5fcG9pbnQgPSAzOyB0aGlzLl9saW5lID8gdGhpcy5fY29udGV4dC5saW5lVG8odGhpcy5feDIsIHRoaXMuX3kyKSA6IHRoaXMuX2NvbnRleHQubW92ZVRvKHRoaXMuX3gyLCB0aGlzLl95Mik7IGJyZWFrOwogICAgICAgICAgY2FzZSAzOiB0aGlzLl9wb2ludCA9IDQ7IC8vIHByb2NlZWQKICAgICAgICAgIGRlZmF1bHQ6IHBvaW50JGIodGhpcywgeCwgeSk7IGJyZWFrOwogICAgICAgIH0KICAgICAgICB0aGlzLl94MCA9IHRoaXMuX3gxLCB0aGlzLl94MSA9IHRoaXMuX3gyLCB0aGlzLl94MiA9IHg7CiAgICAgICAgdGhpcy5feTAgPSB0aGlzLl95MSwgdGhpcy5feTEgPSB0aGlzLl95MiwgdGhpcy5feTIgPSB5OwogICAgICB9CiAgICB9OwoKICAgIHZhciBjYXJkaW5hbE9wZW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dGFydDogZnVuY3Rpb24oKSB7CiAgICAgICAgdGhpcy5feDAgPSB0aGlzLl94MSA9IHRoaXMuX3gyID0gdGhpcy5feDMgPSB0aGlzLl94NCA9IHRoaXMuX3g1ID0KICAgICAgICB0aGlzLl95MCA9IHRoaXMuX3kxID0gdGhpcy5feTIgPSB0aGlzLl95MyA9IHRoaXMuX3k0ID0gdGhpcy5feTUgPSBOYU47CiAgICAgICAgdGhpcy5fbDAxX2EgPSB0aGlzLl9sMTJfYSA9IHRoaXMuX2wyM19hID0KICAgICAgICB0aGlzLl9sMDFfMmEgPSB0aGlzLl9sMTJfMmEgPSB0aGlzLl9sMjNfMmEgPQogICAgICAgIHRoaXMuX3BvaW50ID0gMDsKICAgICAgfSwKICAgICAgbGluZUVuZDogZnVuY3Rpb24oKSB7CiAgICAgICAgc3dpdGNoICh0aGlzLl9wb2ludCkgewogICAgICAgICAgY2FzZSAxOiB7CiAgICAgICAgICAgIHRoaXMuX2NvbnRleHQubW92ZVRvKHRoaXMuX3gzLCB0aGlzLl95Myk7CiAgICAgICAgICAgIHRoaXMuX2NvbnRleHQuY2xvc2VQYXRoKCk7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgfQogICAgICAgICAgY2FzZSAyOiB7CiAgICAgICAgICAgIHRoaXMuX2NvbnRleHQubGluZVRvKHRoaXMuX3gzLCB0aGlzLl95Myk7CiAgICAgICAgICAgIHRoaXMuX2NvbnRleHQuY2xvc2VQYXRoKCk7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgfQogICAgICAgICAgY2FzZSAzOiB7CiAgICAgICAgICAgIHRoaXMucG9pbnQodGhpcy5feDMsIHRoaXMuX3kzKTsKICAgICAgICAgICAgdGhpcy5wb2ludCh0aGlzLl94NCwgdGhpcy5feTQpOwogICAgICAgICAgICB0aGlzLnBvaW50KHRoaXMuX3g1LCB0aGlzLl95NSk7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfSw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LSBkeCwgeTEgLSBkeCAqIHQxLCB4MSwgeTEpOwogICAgfQoKICAgIGZ1bmN0aW9uIE1vbm90b25lWCQxKGNvbnRleHQpIHsKICAgICAgdGhpcy5fY29udGV4dCA9IGNvbnRleHQ7CiAgICB9CgogICAgTW9ub3RvbmVYJDEucHJvdG90eXBlID0gewogICAgICBhcmVhU3RhcnQ6IGZ1bmN0aW9uKCkgewogICAgICAgIHRoaXMuX2xpbmUgPSAwOwogICAgICB9LAogICAgICBhcmVhRW5kOiBmdW5jdGlvbigpIHsKICAgICAgICB0aGlzLl9saW5lID0gTmFOOwogICAgICB9LAogICAgICBsaW5lU3RhcnQ6IGZ1bmN0aW9uKCkgewogICAgICAgIHRoaXMuX3gwID0gdGhpcy5feDEgPQogICAgICAgIHRoaXMuX3kwID0gdGhpcy5feTEgPQogICAgICAgIHRoaXMuX3QwID0gTmFOOwogICAgICAgIHRoaXMuX3BvaW50ID0gMDsKICAgICAgfSwKICAgICAgbGluZUVuZDogZnVuY3Rpb24oKSB7CiAgICAgICAgc3dpdGNoICh0aGlzLl9wb2ludCkgewogICAgICAgICAgY2FzZSAyOiB0aGlzLl9jb250ZXh0LmxpbmVUbyh0aGlzLl94MSwgdGhpcy5feTEpOyBicmVhazsKICAgICAgICAgIGNhc2UgMzogcG9pbnQkZCh0aGlzLCB0aGlzLl90MCwgc2xvcGUyJDEodGhpcywgdGhpcy5fdDApKTsgYnJlYWs7CiAgICAgICAgfQogICAgICAgIGlmICh0aGlzLl9saW5lIHx8ICh0aGlzLl9saW5lICE9PSAwICYmIHRoaXMuX3BvaW50ID09PSAxKSkgdGhpcy5fY29udGV4dC5jbG9zZVBhdGgoKTsKICAgICAgICB0aGlzLl9saW5lID0gMSAtIHRoaXMuX2xpbmU7CiAgICAgIH0sCiAgICAgIHBvaW50OiBmdW5jdGlvbih4LCB5KSB7CiAgICAgICAgdmFyIHQxID0gTmFOOwoKICAgICAgICB4ID0gK3gsIHkgPSAreTsKICAgICAgICBpZiAoe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TsKICAgICAgICB0aGlzLl95ID0gW107CiAgICAgIH0sCiAgICAgIGxpbmVFbmQ6IGZ1bmN0aW9uKCkgewogICAgICAgIHZhciB4ID0gdGhpcy5feCwKICAgICAgICAgICAgeSA9IHRoaXMuX3ksCiAgICAgICAgICAgIG4gPSB4Lmxlbmd0aDsKCiAgICAgICAgaWYgKG4pIHsKICAgICAgICAgIHRoaXMuX2xpbmUgPyB0aGlzLl9jb250ZXh0LmxpbmVUbyh4WzBdLCB5WzBdKSA6IHRoaXMuX2NvbnRleHQubW92ZVRvKHhbMF0sIHlbMF0pOwogICAgICAgICAgaWYgKG4gPT09IDIpIHsKICAgICAgICAgICAgdGhpcy5fY29udGV4dC5saW5lVG8oeFsxXSwgeVsxXSk7CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICB2YXIgcHggPSBjb250cm9sUG9pbnRzJDEoeCksCiAgICAgICAgICAgICAgICBweSA9IGNvbnRyb2xQb2ludHMkMSh5KTsKICAgICAgICAgICAgZm9yICh2YXIgaTAgPSAwLCBpMSA9IDE7IGkxIDwgbjsgKytpMCwgKytpMSkgewogICAgICAgICAgICAgIHRoaXMuX2NvbnRleHQuYmV6aWVyQ3VydmVUbyhweFswXVtpMF0sIHB5WzBdW2kwXSwgcHhbMV1baTBdLCBweVsxXVtpMF0sIHhbaTFdLCB5W2kxXSk7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIGlmICh0aGlzLl9saW5lIHx8ICh0aGlzLl9saW5lICE9PSAwICYmIG4gPT09IDEpKSB0aGlzLl9jb250ZXh0LmNsb3NlUGF0aCgpOwogICAgICAgIHRoaXMuX2xpbmUgPSAxIC0gdGhpcy5fbGluZTsKICAgICAgICB0aGlzLl94ID0gdGhpcy5feSA9IG51bGw7CiAgICAgIH0sCiAgICAgIHBvaW50OiBmdW5jdGlvbih4LCB5KSB7CiAgICAgICAgdGhpcy5feC5wdXNoKCt4KTsKICAgICAgICB0aGlzLl95LnB1c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yh4LCB5KSA6IHRoaXMuX2NvbnRleHQubW92ZVRvKHgsIHkpOyBicmVhazsKICAgICAgICAgIGNhc2UgMTogdGhpcy5fcG9pbnQgPSAyOyAvLyBwcm9jZWVkCiAgICAgICAgICBkZWZhdWx0OiB7CiAgICAgICAgICAgIGlmICh0aGlzLl90IDw9IDApIHsKICAgICAgICAgICAgICB0aGlzLl9jb250ZXh0LmxpbmVUbyh0aGlzLl94LCB5KTsKICAgICAgICAgICAgICB0aGlzLl9jb250ZXh0LmxpbmVUbyh4LCB5KTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICB2YXIgeDEgPSB0aGlzLl94ICogKDEgLSB0aGlzLl90KSArIHggKiB0aGlzLl90OwogICAgICAgICAgICAgIHRoaXMuX2NvbnRleHQubGluZVRvKHgxLCB0aGlzLl95KTsKICAgICAgICAgICAgICB0aGlzLl9jb250ZXh0LmxpbmVUbyh4MSwgeSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHRoaXMuX3ggPSB4LCB0aGlzLl95ID0geTsKICAgICAgfQogICAgfTsKCiAgICBmdW5jdGlvbiBzdGVwJDEoY29udGV4dCkgewogICAgICByZXR1cm4gbmV3IFN0ZXAkMShjb250ZXh0LCAwLjUpOwogICAgfQoKICAgIGZ1bmN0aW9uIHN0ZXBCZWZvcmUkMShjb250ZXh0KSB7CiAgICAgIHJldHVybiBuZXcgU3RlcCQxKGNvbnRleHQsIDApOwogICAgfQoKICAgIGZ1bmN0aW9uIHN0ZXBBZnRlciQxKGNvbnRleHQpIHsKICAgICAgcmV0dXJuIG5ldyBTdGVwJDEoY29udGV4dCwgMSk7CiAgICB9CgogICAgZnVuY3Rpb24gbm9uZSQ2KHNlcmllcywgb3JkZXIpIHsKICAgICAgaWYgKCEoKG4gPSBzZXJpZXMubGVuZ3RoKSA+IDEpKSByZXR1cm47CiAgICAgIGZvciAodmFyIGkgPSAxLCBqLCBzMCwgczEgPSBzZXJpZXNbb3JkZXJbMF1dLCBuLCBtID0gczEubGVuZ3RoOyBpIDwgbjsgKytpKSB7CiAgICAgICAgczAgPSBzMSwgczEgPSBzZXJpZXNbb3JkZXJbaV1dOwogICAgICAgIGZvciAoaiA9IDA7IGogPCBtOyArK2opIHsKICAgICAgICAgIHMxW2pdWzFdICs9IHMxW2pdWzBdID0gaXNOYU4oczBbal1bMV0pID8gczBbal1bMF0gOiBzMFtqXVsxXTsKICAgICAgICB9CiAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiBub25lJDcoc2VyaWVzKSB7CiAgICAgIHZhciBuID0gc2VyaWVzLmxlbmd0aCwgbyA9IG5ldyBBcnJheShuKTsKICAgICAgd2hpbGUgKC0tbiA+PSAwKSBvW25dID0gbjsKICAgICAgcmV0dXJuIG87CiAgICB9CgogICAgZnVuY3Rpb24gc3RhY2tWYWx1ZSQxKGQsIGtleSkgewogICAgICByZXR1cm4gZFtrZXldOwogICAgfQoKICAgIGZ1bmN0aW9uIHN0YWNrJDEoKSB7CiAgICAgIHZhciBrZXlzID0gY29uc3RhbnQkcyhbXSksCiAgICAgICAgICBvcmRlciA9IG5vbmUkNywKICAgICAgICAgIG9mZnNldCA9IG5vbmUkNiwKICAgICAgICAgIHZhbHVlID0gc3RhY2tWYWx1ZSQxOwoKICAgICAgZnVuY3Rpb24gc3RhY2soZGF0YSkgewogICAgICAgIHZhciBreiA9IGtleXMuYXBwbHkodGhpcywgYXJndW1lbnRzKSwKICAgICAgICAgICAgaSwKICAgICAgICAgICAgbSA9IGRhdGEubGVuZ3RoLAogICAgICAgICAgICBuID0ga3oubGVuZ3RoLAogICAgICAgICAgICBzeiA9IG5ldyBBcnJheShuKSwKICAgICAgICAgICAgb3o7CgogICAgICAgIGZvciAoaSA9IDA7IGkgPCBuOyArK2kpIHsKICAgICAgICAgIGZvciAodmFyIGtpID0ga3pbaV0sIHNpID0gc3pbaV0gPSBuZXcgQXJyYXkobSksIGogPSAwLCBzaWo7IGogPCBtOyArK2opIHsKICAgICAgICAgICAgc2lbal0gPSBzaWogPSBbMCwgK3ZhbHVlKGRhdGFbal0sIGtpLCBqLCBkYXRhKV07CiAgICAgICAgICAgIHNpai5kYXRhID0gZGF0YVtqXTsKICAgICAgICAgIH0KICAgICAgICAgIHNpLmtleSA9IGtpOwogICAgICAgIH0KCiAgICAgICAgZm9yIChpID0gMCwgb3ogPSBvcmRlcihzeik7IGkgPCBuOyArK2kpIHsKICAgICAgICAgIHN6W296W2ldXS5pbmRleCA9IGk7CiAgICAgICAgfQoKICAgICAgICBvZmZzZXQoc3osIG96KTsKICAgICAgICByZXR1cm4gc3o7CiAgICAgIH0KCiAgICAgIHN0YWNrLmtleXMgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoa2V5cyA9IHR5cGVvZiBfID09PSAiZnVuY3Rpb24iID8gXyA6IGNvbnN0YW50JHMoc2xpY2UkZC5jYWxsKF8pKSwgc3RhY2spIDoga2V5czsKICAgICAgfTsKCiAgICAgIHN0YWNrLnZhbHVlID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHZhbHVlID0gdHlwZW9mIF8gPT09ICJmdW5jdGlvbiIgPyBfIDogY29uc3RhbnQkcygrXyksIHN0YWNrKSA6IHZhbHVlOwogICAgICB9OwoKICAgICAgc3RhY2sub3JkZXIgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAob3JkZXIgPSBfID09IG51bGwgPyBub25lJDcgOiB0eXBlb2YgXyA9PT0gImZ1bmN0aW9uIiA/IF8gOiBjb25zdGFudCRzKHNsaWNlJGQuY2FsbChfKSksIHN0YWNrKSA6IG9yZGVyOwogICAgICB9OwoKICAgICAgc3RhY2sub2Zmc2V0ID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKG9mZnNldCA9IF8gPT0gbnVsbCA/IG5vbmUkNiA6IF8sIHN0YWNrKSA6IG9mZnNldDsKICAgICAgfTsKCiAgICAgIHJldHVybiBzdGFjazsKICAgIH0KCiAgICBmdW5jdGlvbiBleHBhbmQkMShzZXJpZXMsIG9yZGVyKSB7CiAgICAgIGlmICghKChuID0gc2VyaWVzLmxlbmd0aCkgPiAwKSkgcmV0dXJuOwogICAgICBmb3IgKHZhciBpLCBuLCBqID0gMCwgbSA9IHNlcmllc1swXS5sZW5ndGgsIHk7IGogPCBtOyArK2opIHsKICAgICAgICBmb3IgKHkgPSBpID0gMDsgaSA8IG47ICsraSkgeSArPSBzZXJpZXNbaV1bal1bMV0gfHwgMDsKICAgICAgICBpZiAoeSkgZm9yIChpID0gMDsgaSA8IG47ICsraSkgc2VyaWVzW2ldW2pdWzFdIC89IHk7CiAgICAgIH0KICAgICAgbm9uZSQ2KHNlcmllcywgb3JkZXIpOwogICAgfQoKICAgIGZ1bmN0aW9uIGRpdmVyZ2luZyQyKHNlcmllcywgb3JkZXIpIHsKICAgICAgaWYgKCEoKG4gPSBzZXJpZXMubGVuZ3RoKSA+IDEpKSByZXR1cm47CiAgICAgIGZvciAodmFyIGksIGogPSAwLCBkLCBkeSwgeXAsIHluLCBuLCBtID0gc2VyaWVzW29yZGVyWzBdXS5sZW5ndGg7IGogPCBtOyArK2opIHsKICAgICAgICBmb3IgKHlwID0geW4gPSAwLCBpID0gMDsgaSA8IG47ICsraSkgewogICAgICAgICAgaWYgKChkeSA9IChkID0gc2VyaWVzW29yZGVyW2ldXVtqXSlbMV0gLSBkWzBdKSA+PSAwKSB7CiAgICAgICAgICAgIGRbMF0gPSB5cCwgZFsxXSA9IHlwICs9IGR5OwogICAgICAgICAgfSBlbHNlIGlmIChkeSA8IDApIHsKICAgICAgICAgICAgZFsxXSA9IHluLCBkWzBdID0geW4gKz0gZHk7CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICBkWzBdID0geXA7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CgogICAgZnVuY3Rpb24gc2lsaG91ZXR0ZSQxKHNlcmllcywgb3JkZXIpIHsKICAgICAgaWYgKCEoKG4gPSBzZXJpZXMubGVuZ3RoKSA+IDApKSByZXR1cm47CiAgICAgIGZvciAodmFyIGogPSAwLCBzMCA9IHNlcmllc1tvcmRlclswXV0sIG4sIG0gPSBzMC5sZW5ndGg7IGogPCBtOyArK2opIHsKICAgICAgICBmb3IgKHZhciBpID0gMCwgeSA9IDA7IGkgPCBuOyArK2kpIHkgKz0gc2VyaWVzW2ldW2pdWzFdIHx8IDA7CiAgICAgICAgczBbal1bMV0gKz0gczBbal1bMF0gPSAteSAvIDI7CiAgICAgIH0KICAgICAgbm9uZSQ2KHNlcmllcywgb3JkZXIpOwogICAgfQoKICAgIGZ1bmN0aW9uIHdpZ2dsZSQxKHNlcmllcywgb3JkZXIpIHsKICAgICAgaWYgKCEoKG4gPSBzZXJpZXMubGVuZ3RoKSA+IDApIHx8ICEoKG0gPSAoczAgPSBzZXJpZXNbb3JkZXJbMF1dKS5sZW5ndGgpID4gMCkpIHJldHVybjsKICAgICAgZm9yICh2YXIgeSA9IDAsIGogPSAxLCBzMCwgbSwgbjsgaiA8IG07ICsraikgewogICAgICAgIGZvciAodmFyIGkgPSAwLCBzMSA9IDAsIHMyID0gMDsgaSA8IG47ICsraSkgewogICAgICAgICAgdmFyIHNpID0gc2VyaWVzW29yZGVyW2ldXSwKICAgICAgICAgICAgICBzaWowID0gc2lbal1bMV0gfHwgMCwKICAgICAgICAgICAgICBzaWoxID0gc2lbaiAtIDFdWzFdIHx8IDAsCiAgICAgICAgICAgICAgczMgPSAoc2lqMCAtIHNpajEpIC8gMjsKICAgICAgICAgIGZvciAodmFyIGsgPSAwOyBrIDwgaTsgKytrKSB7CiAgICAgICAgICAgIHZhciBzayA9IHNlcmllc1tvcmRlcltrXV0sCiAgICAgICAgICAgICAgICBza2owID0gc2tbal1bMV0gfHwgMCwKICAgICAgICAgICAgICAgIHNrajEgPSBza1tqIC0gMV1bMV0gfHwgMDsKICAgICAgICAgICAgczMgKz0gc2tqMCAtIHNrajE7CiAgICAgICAgICB9CiAgICAgICAgICBzMSArPSBzaWowLCBzMiArPSBzMyAqIHNpajA7CiAgICAgICAgfQogICAgICAgIHMwW2ogLSAxXVsxXSArPSBzMFtqIC0gMV1bMF0gPSB5OwogICAgICAgIGlmIChzMSkgeSAtPSBzMiAvIHMxOwogICAgICB9CiAgICAgIHMwW2ogLSAxXVsxXSArPSBzMFtqIC0gMV1bMF0gPSB5OwogICAgICBub25lJDYoc2VyaWVzLCBvcmRlcik7CiAgICB9CgogICAgZnVuY3Rpb24gYXNjZW5kaW5nJGIoc2VyaWVzKSB7CiAgICAgIHZhciBzdW1zID0gc2VyaWVzLm1hcChzdW0kNSk7CiAgICAgIHJldHVybiBub25lJDcoc2VyaWVzKS5zb3J0KGZ1bmN0aW9uKGEsIGIpIHsgcmV0dXJuIHN1bXNbYV0gLSBzdW1zW2JdOyB9KTsKICAgIH0KCiAgICBmdW5jdGlvbiBzdW0kNShzZXJpZXMpIHsKICAgICAgdmFyIHMgPSAwLCBpID0gLTEsIG4gPSBzZXJpZXMubGVuZ3RoLCB2OwogICAgICB3aGlsZSAoKytpIDwgbikgaWYgKHYgPSArc2VyaWVzW2ldWzFdKSBzICs9IHY7CiAgICAgIHJldHVybiBzOwogICAgfQoKICAgIGZ1bmN0aW9uIGRlc2NlbmRpbmckNShzZXJpZXMpIHsKICAgICAgcmV0dXJuIGFzY2VuZGluZyRiKHNlcmllcykucmV2ZXJzZSgpOwogICAgfQoKICAgIGZ1bmN0aW9uIGluc2lkZU91dCQxKHNlcmllcykgewogICAgICB2YXIgbiA9IHNlcmllcy5sZW5ndGgsCiAgICAgICAgICBpLAogICAgICAgICAgaiwKICAgICAgICAgIHN1bXMgPSBzZXJpZXMubWFwKHN1bSQ1KSwKICAgICAgICAgIG9yZGVyID0gbm9uZSQ3KHNlcmllcykuc29ydChmdW5jdGlvbihhLCBiKSB7IHJldHVybiBzdW1zW2JdIC0gc3Vtc1thXTsgfSksCiAgICAgICAgICB0b3AgPSAwLAogICAgICAgICAgYm90dG9tID0gMCwKICAgICAgICAgIHRvcHMgPSBbXSwKICAgICAgICAgIGJvdHRvbXMgPSBbXTsKCiAgICAgIGZvciAoaSA9IDA7IGkgPCBuOyArK2kpIHsKICAgICAgICBqID0gb3JkZXJbaV07CiAgICAgICAgaWYgKHRvcCA8IGJvdHRvbSkgewogICAgICAgICAgdG9wICs9IHN1bXNbal07CiAgICAgICAgICB0b3BzLnB1c2goaik7CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgIGJvdHRvbSArPSBzdW1zW2pdOwogICAgICAgICAgYm90dG9tcy5wdXNoKGopOwogICAgICAgIH0KICAgICAgfQoKICAgICAgcmV0dXJuIGJvdHRvbXMucmV2ZXJzZSgpLmNvbmNhdCh0b3BzKTsKICAgIH0KCiAgICBmdW5jdGlvbiByZXZlcnNlJDEoc2VyaWVzKSB7CiAgICAgIHJldHVybiBub25lJDcoc2VyaWVzKS5yZXZlcnNlKCk7CiAgICB9CgogICAgdmFyIHQwJDUgPSBuZXcgRGF0ZSwKICAgICAgICB0MSQ1ID0gbmV3IERhdGU7CgogICAgZnVuY3Rpb24gbmV3SW50ZXJ2YWwkMihmbG9vcmksIG9mZnNldGksIGNvdW50LCBmaWVsZCkgewoKICAgICAgZnVuY3Rpb24gaW50ZXJ2YWwoZGF0ZSkgewogICAgICAgIHJldHVybiBmbG9vcmkoZGF0ZSA9IG5ldyBEYXRlKCtkYXRlKSksIGRhdGU7CiAgICAgIH0KCiAgICAgIGludGVydmFsLmZsb29yID0gaW50ZXJ2YWw7CgogICAgICBpbnRlcnZhbC5jZWlsID0gZnVuY3Rpb24oZGF0ZSkgewogICAgICAgIHJldHVybiBmbG9vcmkoZGF0ZSA9IG5ldyBEYXRlKGRhdGUgLSAxKSksIG9mZnNldGkoZGF0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HJldHVybiBuZXdJbnRlcnZhbCQyKGZ1bmN0aW9uKGRhdGUpIHsKICAgICAgICAgIGlmIChkYXRlID49IGRhdGUpIHdoaWxlIChmbG9vcmkoZGF0ZSksICF0ZXN0KGRhdGUpKSBkYXRlLnNldFRpbWUoZGF0ZSAtIDEpOwogICAgICAgIH0sIGZ1bmN0aW9uKGRhdGUsIHN0ZXApIHsKICAgICAgICAgIGlmIChkYXRlID49IGRhdGUpIHsKICAgICAgICAgICAgaWYgKHN0ZXAgPCAwKSB3aGlsZSAoKytzdGVwIDw9IDApIHsKICAgICAgICAgICAgICB3aGlsZSAob2Zmc2V0aShkYXRlLCAtMSksICF0ZXN0KGRhdGUpKSB7fSAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIG5vLWVtcHR5CiAgICAgICAgICAgIH0gZWxzZSB3aGlsZSAoLS1zdGVwID49IDApIHsKICAgICAgICAgICAgICB3aGlsZSAob2Zmc2V0aShkYXRlLCArMSksICF0ZXN0KGRhdGUpKSB7fSAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIG5vLWVtcHR5CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICB9KTsKICAgICAgfTsKCiAgICAgIGlmIChjb3VudCkgewogICAgICAgIGludGVydmFsLmNvdW50ID0gZnVuY3Rpb24oc3RhcnQsIGVuZCkgewogICAgICAgICAgdDAkNS5zZXRUaW1lKCtzdGFydCksIHQxJDUuc2V0VGltZSgrZW5kKTsKICAgICAgICAgIGZsb29yaSh0MCQ1KSwgZmxvb3JpKHQxJDUpOwogICAgICAgICAgcmV0dXJuIE1hdGguZmxvb3IoY291bnQodDAkNSwgdDEkNSkpOwogICAgICAgIH07CgogICAgICAgIGludGVydmFsLmV2ZXJ5ID0gZnVuY3Rpb24oc3RlcCkgewogICAgICAgICAgc3RlcCA9IE1hdGguZmxvb3Ioc3RlcCk7CiAgICAgICAgICByZXR1cm4gIWlzRmluaXRlKHN0ZXApIHx8ICEoc3RlcCA+IDApID8gbn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c2V0aShkYXRlLCAtMSksICF0ZXN0KGRhdGUpKSB7fSAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIG5vLWVtcHR5CiAgICAgICAgICAgIH0gZWxzZSB3aGlsZSAoLS1zdGVwID49IDApIHsKICAgICAgICAgICAgICB3aGlsZSAob2Zmc2V0aShkYXRlLCArMSksICF0ZXN0KGRhdGUpKSB7fSAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIG5vLWVtcHR5CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICB9KTsKICAgICAgfTsKCiAgICAgIGlmIChjb3VudCkgewogICAgICAgIGludGVydmFsLmNvdW50ID0gZnVuY3Rpb24oc3RhcnQsIGVuZCkgewogICAgICAgICAgdDAkNi5zZXRUaW1lKCtzdGFydCksIHQxJDYuc2V0VGltZSgrZW5kKTsKICAgICAgICAgIGZsb29yaSh0MCQ2KSwgZmxvb3JpKHQxJDYpOwogICAgICAgICAgcmV0dXJuIE1hdGguZmxvb3IoY291bnQodDAkNiwgdDEkNikpOwogICAgICAgIH07CgogICAgICAgIGludGVydmFsLmV2ZXJ5ID0gZnVuY3Rpb24oc3RlcCkgewogICAgICAgICAgc3RlcCA9IE1hdGguZmxvb3Ioc3RlcCk7CiAgICAgICAgICByZXR1cm4gIWlzRmluaXRlKHN0ZXApIHx8ICEoc3RlcCA+IDApID8gbnVsbAogICAgICAgICAgICAgIDogIShzdGVwID4gMSkgPyBpbnRlcnZhbAogICAgICAgICAgICAgIDogaW50ZXJ2YWwuZmlsdGVyKGZpZWxkCiAgICAgICAgICAgICAgICAgID8gZnVuY3Rpb24oZCkgeyByZXR1cm4gZmllbGQoZCkgJSBzdGVwID09PSAwOyB9CiAgICAgICAgICAgICAgICAgIDogZnVuY3Rpb24oZCkgeyByZXR1cm4gaW50ZXJ2YWwuY291bnQoMCwgZCkgJSBzdGVwID09PSAwOyB9KTsKICAgICAgICB9OwogICAgICB9CgogICAgICByZXR1cm4gaW50ZXJ2YWw7CiAgICB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VrZGF5UmUgPSBmb3JtYXRSZSQyKGxvY2FsZV9zaG9ydFdlZWtkYXlzKSwKICAgICAgICAgIHNob3J0V2Vla2RheUxvb2t1cCA9IGZvcm1hdExvb2t1cCQyKGxvY2FsZV9zaG9ydFdlZWtkYXlzKSwKICAgICAgICAgIG1vbnRoUmUgPSBmb3JtYXRSZSQyKGxvY2FsZV9tb250aHMpLAogICAgICAgICAgbW9udGhMb29rdXAgPSBmb3JtYXRMb29rdXAkMihsb2NhbGVfbW9udGhzKSwKICAgICAgICAgIHNob3J0TW9udGhSZSA9IGZvcm1hdFJlJDIobG9jYWxlX3Nob3J0TW9udGhzKSwKICAgICAgICAgIHNob3J0TW9udGhMb29rdXAgPSBmb3JtYXRMb29rdXAkMihsb2NhbGVfc2hvcnRNb250aHMpOwoKICAgICAgdmFyIGZvcm1hdHMgPSB7CiAgICAgICAgImEiOiBmb3JtYXRTaG9ydFdlZWtkYXksCiAgICAgICAgIkEiOiBmb3JtYXRXZWVrZGF5LAogICAgICAgICJiIjogZm9ybWF0U2hvcnRNb250aCwKICAgICAgICAiQiI6IGZvcm1hdE1vbnRoLAogICAgICAgICJjIjogbnVsbCwKICAgICAgICAiZCI6IGZvcm1hdERheU9mTW9udGgkMiwKICAgICAgICAiZSI6IGZvcm1hdERheU9mTW9udGgkMiwKICAgICAgICAiZiI6IGZvcm1hdE1pY3Jvc2Vjb25kcyQyLAogICAgICAgICJIIjogZm9ybWF0SG91cjI0JDIsCiAgICAgICAgIkkiOiBmb3JtYXRIb3VyMTIkMiwKICAgICAgICAiaiI6IGZvcm1hdERheU9mWWVhciQyLAogICAgICAgICJMIjogZm9ybWF0TWlsbGlzZWNvbmRzJDIsCiAgICAgICAgIm0iOiBmb3JtYXRNb250aE51bWJlciQyLAogICAgICAgICJNIjogZm9ybWF0TWludXRlcyQyLAogICAgICAgICJwIjogZm9ybWF0UGVyaW9kLAogICAgICAgICJRIjogZm9ybWF0VW5peFRpbWVzdGFtcCQyLAogICAgICAgICJzIjogZm9ybWF0VW5peFRpbWVzdGFtcFNlY29uZHMkMiwKICAgICAgICAiUyI6IGZvcm1hdFNlY29uZHMkMiwKICAgICAgICAidSI6IGZvcm1hdFdlZWtkYXlOdW1iZXJNb25kYXkkMiwKICAgICAgICAiVSI6IGZvcm1hdFdlZWtOdW1iZXJTdW5kYXkkMiwKICAgICAgICAiViI6IGZvcm1hdFdlZWtOdW1iZXJJU08kMiwKICAgICAgICAidyI6IGZvcm1hdFdlZWtkYXlOdW1iZXJTdW5kYXkkMiwKICAgICAgICAiVyI6IGZvcm1hdFdlZWtOdW1iZXJNb25kYXkkMiwKICAgICAgICAieCI6IG51bGwsCiAgICAgICAgIlgiOiBudWxsLAogICAgICAgICJ5IjogZm9ybWF0WWVhciQzLAogICAgICAgICJZIjogZm9ybWF0RnVsbFllYXIkMiwKICAgICAgICAiWiI6IGZvcm1hdFpvbmUkMiwKICAgICAgICAiJSI6IGZvcm1hdExpdGVyYWxQZXJjZW50JDIKICAgICAgfTsKCiAgICAgIHZhciB1dGNGb3JtYXRzID0gewogICAgICAgICJhIjogZm9ybWF0VVRDU2hvcnRXZWVrZGF5LAogICAgICAgICJBIjogZm9ybWF0VVRDV2Vla2RheSwKICAgICAgICAiYiI6IGZvcm1hdFVUQ1Nob3J0TW9udGgsCiAgICAgICAgIkIiOiBmb3JtYXRVVENNb250aCwKICAgICAgICAiYyI6IG51bGwsCiAgICAgICAgImQiOiBmb3JtYXRVVENEYXlPZk1vbnRoJDIsCiAgICAgICAgImUiOiBmb3JtYXRVVENEYXlPZk1vbnRoJDIsCiAgICAgICAgImYiOiBmb3JtYXRVVENNaWNyb3NlY29uZHMkMiwKICAgICAgICAiSCI6IGZvcm1hdFVUQ0hvdXIyNCQyLAogICAgICAgICJJIjogZm9ybWF0VVRDSG91cjEyJDIsCiAgICAgICAgImoiOiBmb3JtYXRVVENEYXlPZlllYXIkMiwKICAgICAgICAiTCI6IGZvcm1hdFVUQ01pbGxpc2Vjb25kcyQyLAogICAgICAgICJtIjogZm9ybWF0VVRDTW9udGhOdW1iZXIkMiwKICAgICAgICAiTSI6IGZvcm1hdFVUQ01pbnV0ZXMkMiwKICAgICAgICAicCI6IGZvcm1hdFVUQ1BlcmlvZCwKICAgICAgICAiUSI6IGZvcm1hdFVuaXhUaW1lc3RhbXAkMiwKICAgICAgICAicyI6IGZvcm1hdFVuaXhUaW1lc3RhbXBTZWNvbmRzJDIsCiAgICAgICAgIlMiOiBmb3JtYXRVVENTZWNvbmRzJDIsCiAgICAgICAgInUiOiBmb3JtYXRVVENXZWVrZGF5TnVtYmVyTW9uZGF5JDIsCiAgICAgICAgIlUiOiBmb3JtYXRVVENXZWVrTnVtYmVyU3VuZGF5JDIsCiAgICAgICAgIlYiOiBmb3JtYXRVVENXZWVrTnVtYmVySVNPJDIsCiAgICAgICAgInciOiBmb3JtYXRVVENXZWVrZGF5TnVtYmVyU3VuZGF5JDIsCiAgICAgICAgIlciOiBmb3JtYXRVVENXZWVrTnVtYmVyTW9uZGF5JDIsCiAgICAgICAgIngiOiBudWxsLAogICAgICAgICJYIjogbnVsbCwKICAgICAgICAieSI6IGZvcm1hdFVUQ1llYXIkMiwKICAgICAgICAiWSI6IGZvcm1hdFVUQ0Z1bGxZZWFyJDIsCiAgICAgICAgIloiOiBmb3JtYXRVVENab25lJDIsCiAgICAgICAgIiUiOiBmb3JtYXRMaXRlcmFsUGVyY2VudCQyCiAgICAgIH07CgogICAgICB2YXIgcGFyc2VzID0gewogICAgICAgICJhIjogcGFyc2VTaG9ydFdlZWtkYXksCiAgICAgICAgIkEiOiBwYXJzZVdlZWtkYXksCiAgICAgICAgImIiOiBwYXJzZVNob3J0TW9udGgsCiAgICAgICAgIkIiOiBwYXJzZU1vbnRoLAogICAgICAgICJjIjogcGFyc2VMb2NhbGVEYXRlVGltZSwKICAgICAgICAiZCI6IHBhcnNlRGF5T2ZNb250aCQyLAogICAgICAgICJlIjogcGFyc2VEYXlPZk1vbnRoJDIsCiAgICAgICAgImYiO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SAiZSIgPyAiICIgOiAiMCI7CiAgICAgICAgICAgICAgaWYgKGZvcm1hdCA9IGZvcm1hdHNbY10pIGMgPSBmb3JtYXQoZGF0ZSwgcGFkKTsKICAgICAgICAgICAgICBzdHJpbmcucHVzaChjKTsKICAgICAgICAgICAgICBqID0gaSArIDE7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KCiAgICAgICAgICBzdHJpbmcucHVzaChzcGVjaWZpZXIuc2xpY2UoaiwgaSkpOwogICAgICAgICAgcmV0dXJuIHN0cmluZy5qb2luKCIiKTsKICAgICAgICB9OwogICAgICB9CgogICAgICBmdW5jdGlvbiBuZXdQYXJzZShzcGVjaWZpZXIsIG5ld0RhdGUpIHsKICAgICAgICByZXR1cm4gZnVuY3Rpb24oc3RyaW5nKSB7CiAgICAgICAgICB2YXIgZCA9IG5ld1llYXIoMTkwMCksCiAgICAgICAgICAgICAgaSA9IHBhcnNlU3BlY2lmaWVyKGQsIHNwZWNpZmllciwgc3RyaW5nICs9ICIiLCAwKSwKICAgICAgICAgICAgICB3ZWVrLCBkYXk7CiAgICAgICAgICBpZiAoaSAhPSBzdHJpbmcubGVuZ3RoKSByZXR1cm4gbnVsbDsKCiAgICAgICAgICAvLyBJZiBhIFVOSVggdGltZXN0YW1wIGlzIHNwZWNpZmllZCwgcmV0dXJuIGl0LgogICAgICAgICAgaWYgKCJRIiBpbiBkKSByZXR1cm4gbmV3IERhdGUoZC5RKTsKCiAgICAgICAgICAvLyBUaGUgYW0tcG0gZmxhZyBpcyAwIGZvciBBTSwgYW5kIDEgZm9yIFBNLgogICAgICAgICAgaWYgKCJwIiBpbiBkKSBkLkggPSBkLkggJSAxMiArIGQucCAqIDEyOwoKICAgICAgICAgIC8vIENvbnZlcnQgZGF5LW9mLXdlZWsgYW5kIHdlZWstb2YteWVhciB0byBkYXktb2YteWVhci4KICAgICAgICAgIGlmICgiViIgaW4gZCkgewogICAgICAgICAgICBpZiAoZC5WIDwgMSB8fCBkLlYgPiA1MykgcmV0dXJuIG51bGw7CiAgICAgICAgICAgIGlmICghKCJ3IiBpbiBkKSkgZC53ID0gMTsKICAgICAgICAgICAgaWYgKCJaIiBpbiBkKSB7CiAgICAgICAgICAgICAgd2VlayA9IHV0Y0RhdGUkMihuZXdZZWFyKGQueSkpLCBkYXkgPSB3ZWVrLmdldFVUQ0RheSgpOwogICAgICAgICAgICAgIHdlZWsgPSBkYXkgPiA0IHx8IGRheSA9PT0gMCA/IHV0Y01vbmRheSQzLmNlaWwod2VlaykgOiB1dGNNb25kYXkkMyh3ZWVrKTsKICAgICAgICAgICAgICB3ZWVrID0gdXRjRGF5JDMub2Zmc2V0KHdlZWssIChkLlYgLSAxKSAqIDcpOwogICAgICAgICAgICAgIGQueSA9IHdlZWsuZ2V0VVRDRnVsbFllYXIoKTsKICAgICAgICAgICAgICBkLm0gPSB3ZWVrLmdldFVUQ01vbnRoKCk7CiAgICAgICAgICAgICAgZC5kID0gd2Vlay5nZXRVVENEYXRlKCkgKyAoZC53ICsgNikgJSA3OwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgIHdlZWsgPSBuZXdEYXRlKG5ld1llYXIoZC55KSksIGRheSA9IHdlZWsuZ2V0RGF5KCk7CiAgICAgICAgICAgICAgd2VlayA9IGRheSA+IDQgfHwgZGF5ID09PSAwID8gbW9uZGF5JDMuY2VpbCh3ZWVrKSA6IG1vbmRheSQzKHdlZWspOwogICAgICAgICAgICAgIHdlZWsgPSBkYXkkMy5vZmZzZXQod2VlaywgKGQuViAtIDEpICogNyk7CiAgICAgICAgICAgICAgZC55ID0gd2Vlay5nZXRGdWxsWWVhcigpOwogICAgICAgICAgICAgIGQubSA9IHdlZWsuZ2V0TW9udGgoKTsKICAgICAgICAgICAgICBkLmQgPSB3ZWVrLmdldERhdGUoKSArIChkLncgKyA2KSAlIDc7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0gZWxzZSBpZiAoIlciIGluIGQgfHwgIlUiIGluIGQpIHsKICAgICAgICAgICAgaWYgKCEoInciIGluIGQpKSBkLncgPSAidSIgaW4gZCA/IGQudSAlIDcgOiAiVyIgaW4gZCA/IDEgOiAwOwogICAgICAgICAgICBkYXkgPSAiWiIgaW4gZCA/IHV0Y0RhdGUkMihuZXdZZWFyKGQueSkpLmdldFVUQ0RheSgpIDogbmV3RGF0ZShuZXdZZWFyKGQueSkpLmdldERheSgpOwogICAgICAgICAgICBkLm0gPSAwOwogICAgICAgICAgICBkLmQgPSAiVyIgaW4gZCA/IChkLncgKyA2KSAlIDcgKyBkLlcgKiA3IC0gKGRheSArIDUpICUgNyA6IGQudyArIGQuVSAqIDcgLSAoZGF5ICsgNikgJSA3OwogICAgICAgICAgfQoKICAgICAgICAgIC8vIElmIGEgdGltZSB6b25lIGlzIHNwZWNpZmllZCwgYWxsIGZpZWxkcyBhcmUgaW50ZXJwcmV0ZWQgYXMgVVRDIGFuZCB0aGVuCiAgICAgICAgICAvLyBvZmZzZXQgYWNjb3JkaW5nIHRvIHRoZSBzcGVjaWZpZWQgdGltZSB6b25lLgogICAgICAgICAgaWYgKCJaIiBpbiBkKSB7CiAgICAgICAgICAgIGQuSCArPSBkLlogLyAxMDAgfCAwOwogICAgICAgICAgICBkLk0gKz0gZC5aICUgMTAwOwogICAgICAgICAgICByZXR1cm4gdXRjRGF0ZSQyKGQpOwogICAgICAgICAgfQoKICAgICAgICAgIC8vIE90aGVyd2lzZSwgYWxsIGZpZWxkcyBhcmUgaW4gbG9jYWwgdGltZS4KICAgICAgICAgIHJldHVybiBuZXdEYXRlKGQpOwogICAgICAgIH07CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIHBhcnNlU3BlY2lmaWVyKGQsIHNwZWNpZmllciwgc3RyaW5nLCBqKSB7CiAgICAgICAgdmFyIGkgPSAwLAogICAgICAgICAgICBuID0gc3BlY2lmaWVyLmxlbmd0aCwKICAgICAgICAgICAgbSA9IHN0cmluZy5sZW5ndGgsCiAgICAgICAgICAgIGMsCiAgICAgICAgICAgIHBhcnNlOwoKICAgICAgICB3aGlsZSAoaSA8IG4pIHsKICAgICAgICAgIGlmIChqID49IG0pIHJldHVybiAtMTsKICAgICAgICAgIGMgPSBzcGVjaWZpZXIuY2hhckNvZGVBdChpKyspOwogICAgICAgICAgaWYgKGMgPT09IDM3KSB7CiAgICAgICAgICAgIGMgPSBzcGVjaWZpZXIuY2hhckF0KGkrKyk7CiAgICAgICAgICAgIHBhcnNlID0gcGFyc2VzW2MgaW4gcGFkcyQyID8gc3BlY2lmaWVyLmNoYXJBdChpKyspIDogY107CiAgICAgICAgICAgIGlmICghcGFyc2UgfHwgKChqID0gcGFyc2UoZCwgc3RyaW5nLCBqKSkgPCAwKSkgcmV0dXJuIC0xOwogICAgICAgICAgfSBlbHNlIGlmIChjICE9IHN0cmluZy5jaGFyQ29kZUF0KGorKykpIHsKICAgICAgICAgICAgcmV0dXJuIC0xOwogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgcmV0dXJuIGo7CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIHBhcnNlUGVyaW9kKGQsIHN0cmluZywgaSkgewogICAgICAgIHZhciBuID0gcGVyaW9kUmUuZXhlYyhzdHJpbmcuc2xpY2UoaSkpOwogICAgICAgIHJldHVybiBuID8gKGQucCA9IHBlcmlvZExvb2t1cFtuWzBdLnRvTG93ZXJDYXNlKCldLCBpICsgblswXS5sZW5ndGgpIDogLTE7CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIHBhcnNlU2hvcnRXZWVrZGF5KGQsIHN0cmluZywgaSkgewogICAgICAgIHZhciBuID0gc2hvcnRXZWVrZGF5UmUuZXhlYyhzdHJpbmcuc2xpY2UoaSkpOwogICAgICAgIHJldHVybiBuID8gKGQudyA9IHNob3J0V2Vla2RheUxvb2t1cFtuWzBdLnRvTG93ZXJDYXNlKCldLCBpICsgblswXS5sZW5ndGgpIDogLTE7CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIHBhcnNlV2Vla2RheShkLCBzdHJpbmcs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ICAgICByZXR1cm4gbG9jYWxlX21vbnRoc1tkLmdldFVUQ01vbnRoKCldOwogICAgICB9CgogICAgICBmdW5jdGlvbiBmb3JtYXRVVENQZXJpb2QoZCkgewogICAgICAgIHJldHVybiBsb2NhbGVfcGVyaW9kc1srKGQuZ2V0VVRDSG91cnMoKSA+PSAxMildOwogICAgICB9CgogICAgICByZXR1cm4gewogICAgICAgIGZvcm1hdDogZnVuY3Rpb24oc3BlY2lmaWVyKSB7CiAgICAgICAgICB2YXIgZiA9IG5ld0Zvcm1hdChzcGVjaWZpZXIgKz0gIiIsIGZvcm1hdHMpOwogICAgICAgICAgZi50b1N0cmluZyA9IGZ1bmN0aW9uKCkgeyByZXR1cm4gc3BlY2lmaWVyOyB9OwogICAgICAgICAgcmV0dXJuIGY7CiAgICAgICAgfSwKICAgICAgICBwYXJzZTogZnVuY3Rpb24oc3BlY2lmaWVyKSB7CiAgICAgICAgICB2YXIgcCA9IG5ld1BhcnNlKHNwZWNpZmllciArPSAiIiwgbG9jYWxEYXRlJDIpOwogICAgICAgICAgcC50b1N0cmluZyA9IGZ1bmN0aW9uKCkgeyByZXR1cm4gc3BlY2lmaWVyOyB9OwogICAgICAgICAgcmV0dXJuIHA7CiAgICAgICAgfSwKICAgICAgICB1dGNGb3JtYXQ6IGZ1bmN0aW9uKHNwZWNpZmllcikgewogICAgICAgICAgdmFyIGYgPSBuZXdGb3JtYXQoc3BlY2lmaWVyICs9ICIiLCB1dGNGb3JtYXRzKTsKICAgICAgICAgIGYudG9TdHJpbmcgPSBmdW5jdGlvbigpIHsgcmV0dXJuIHNwZWNpZmllcjsgfTsKICAgICAgICAgIHJldHVybiBmOwogICAgICAgIH0sCiAgICAgICAgdXRjUGFyc2U6IGZ1bmN0aW9uKHNwZWNpZmllcikgewogICAgICAgICAgdmFyIHAgPSBuZXdQYXJzZShzcGVjaWZpZXIsIHV0Y0RhdGUkMik7CiAgICAgICAgICBwLnRvU3RyaW5nID0gZnVuY3Rpb24oKSB7IHJ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ICAgICByZXR1cm4gbiA/IChkLlcgPSArblswXSwgaSArIG5bMF0ubGVuZ3RoKSA6IC0xOwogICAgfQoKICAgIGZ1bmN0aW9uIHBhcnNlRnVsbFllYXIkMihkLCBzdHJpbmcsIGkpIHsKICAgICAgdmFyIG4gPSBudW1iZXJSZSQyLmV4ZWMoc3RyaW5nLnNsaWNlKGksIGkgKyA0KSk7CiAgICAgIHJldHVybiBuID8gKGQueSA9ICtuWzBdLCBpICsgblswXS5sZW5ndGgpIDogLTE7CiAgICB9CgogICAgZnVuY3Rpb24gcGFyc2VZZWFyJDIoZCwgc3RyaW5nLCBpKSB7CiAgICAgIHZhciBuID0gbnVtYmVyUmUkMi5leGVjKHN0cmluZy5zbGljZShpLCBpICsgMikpOwogICAgICByZXR1cm4gbiA/IChkLnkgPSArblswXSArICgrblswXSA+IDY4ID8gMTkwMCA6IDIwMDApLCBpICsgblswXS5sZW5ndGgpIDogLTE7CiAgICB9CgogICAgZnVuY3Rpb24gcGFyc2Vab25lJDIoZCwgc3RyaW5nLCBpKSB7CiAgICAgIHZhciBuID0gL14oWil8KFsrLV1cZFxkKSg/Ojo/KFxkXGQpKT8vLmV4ZWMoc3RyaW5nLnNsaWNlKGksIGkgKyA2KSk7CiAgICAgIHJldHVybiBuID8gKGQuWiA9IG5bMV0gPyAwIDogLShuWzJdICsgKG5bM10gfHwgIjAwIikpLCBpICsgblswXS5sZW5ndGgpIDogLTE7CiAgICB9CgogICAgZnVuY3Rpb24gcGFyc2VNb250aE51bWJlciQyKGQsIHN0cmluZywgaSkgewogICAgICB2YXIgbiA9IG51bWJlclJlJDIuZXhlYyhzdHJpbmcuc2xpY2UoaSwgaSArIDIpKTsKICAgICAgcmV0dXJuIG4gPyAoZC5tID0gblswXSAtIDEsIGkgKyBuWzBdLmxlbmd0aCkgOiAtMTsKICAgIH0KCiAgICBmdW5jdGlvbiBwYXJzZURheU9mTW9udGgkMihkLCBzdHJpbmcsIGkpIHsKICAgICAgdmFyIG4gPSBudW1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ludG8gZW50ZXIuCiAgICAgIC8vIFB1dCBhbnkgcmVtYWluaW5nIGRhdGEgaW50byBlbnRlci4KICAgICAgZm9yICg7IGkgPCBkYXRhTGVuZ3RoOyArK2kpIHsKICAgICAgICBpZiAobm9kZSA9IGdyb3VwW2ldKSB7CiAgICAgICAgICBub2RlLl9fZGF0YV9fID0gZGF0YVtpXTsKICAgICAgICAgIHVwZGF0ZVtpXSA9IG5vZGU7CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgIGVudGVyW2ldID0gbmV3IEVudGVyTm9kZSQ0KHBhcmVudCwgZGF0YVtpXSk7CiAgICAgICAgfQogICAgICB9CgogICAgICAvLyBQdXQgYW55IG5vbi1udWxsIG5vZGVzIHRoYXQgZG9u4oCZdCBmaXQgaW50byBleGl0LgogICAgICBmb3IgKDsgaSA8IGdyb3VwTGVuZ3RoOyArK2kpIHsKICAgICAgICBpZiAobm9kZSA9IGdyb3VwW2ldKSB7CiAgICAgICAgICBleGl0W2ldID0gbm9kZTsKICAgICAgICB9CiAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiBiaW5kS2V5JDQocGFyZW50LCBncm91cCwgZW50ZXIsIHVwZGF0ZSwgZXhpdCwgZGF0YSwga2V5KSB7CiAgICAgIHZhciBpLAogICAgICAgICAgbm9kZSwKICAgICAgICAgIG5vZGVCeUtleVZhbHVlID0ge30sCiAgICAgICAgICBncm91cExlbmd0aCA9IGdyb3VwLmxlbmd0aCwKICAgICAgICAgIGRhdGFMZW5ndGggPSBkYXRhLmxlbmd0aCwKICAgICAgICAgIGtleVZhbHVlcyA9IG5ldyBBcnJheShncm91cExlbmd0aCksCiAgICAgICAgICBrZXlWYWx1ZTsKCiAgICAgIC8vIENvbXB1dGUgdGhlIGtleSBmb3IgZWFjaCBub2RlLgogICAgICAvLyBJZiBtdWx0aXBsZSBub2RlcyBoYXZlIHRoZSBzYW1lIGtleSwgdGhlIGR1cGxpY2F0ZXMgYXJlIGFkZGVkIHRvIGV4aXQuCiAgICAgIGZvciAoaSA9IDA7IGkgPCBncm91cExlbmd0aDsgKytpKSB7CiAgICAgICAgaWYgKG5vZGUgPSBncm91cFtpXSkgewogICAgICAgICAga2V5VmFsdWVzW2ldID0ga2V5VmFsdWUgPSBrZXlQcmVmaXgkNiArIGtleS5jYWxsKG5vZGUsIG5vZGUuX19kYXRhX18sIGksIGdyb3VwKTsKICAgICAgICAgIGlmIChrZXlWYWx1ZSBpbiBub2RlQnlLZXlWYWx1ZSkgewogICAgICAgICAgICBleGl0W2ldID0gbm9kZTsKICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIG5vZGVCeUtleVZhbHVlW2tleVZhbHVlXSA9IG5vZGU7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CgogICAgICAvLyBDb21wdXRlIHRoZSBrZXkgZm9yIGVhY2ggZGF0dW0uCiAgICAgIC8vIElmIHRoZXJlIGEgbm9kZSBhc3NvY2lhdGVkIHdpdGggdGhpcyBrZXksIGpvaW4gYW5kIGFkZCBpdCB0byB1cGRhdGUuCiAgICAgIC8vIElmIHRoZXJlIGlzIG5vdCAob3IgdGhlIGtleSBpcyBhIGR1cGxpY2F0ZSksIGFkZCBpdCB0byBlbnRlci4KICAgICAgZm9yIChpID0gMDsgaSA8IGRhdGFMZW5ndGg7ICsraSkgewogICAgICAgIGtleVZhbHVlID0ga2V5UHJlZml4JDYgKyBrZXkuY2FsbChwYXJlbnQsIGRhdGFbaV0sIGksIGRhdGEpOwogICAgICAgIGlmIChub2RlID0gbm9kZUJ5S2V5VmFsdWVba2V5VmFsdWVdKSB7CiAgICAgICAgICB1cGRhdGVbaV0gPSBub2RlOwogICAgICAgICAgbm9kZS5fX2RhdGFfXyA9IGRhdGFbaV07CiAgICAgICAgICBub2RlQnlLZXlWYWx1ZVtrZXlWYWx1ZV0gPSBudWxsOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICBlbnRlcltpXSA9IG5ldyBFbnRlck5vZGUkNChwYXJlbnQsIGRhdGFbaV0pOwogICAgICAgIH0KICAgICAgfQoKICAgICAgLy8gQWRkIGFueSByZW1haW5pbmcgbm9kZXMgdGhhdCB3ZXJlIG5vdCBib3VuZCB0byBkYXRhIHRvIGV4aXQuCiAgICAgIGZvciAoaSA9IDA7IGkgPCBncm91cExlbmd0aDsgKytpKSB7CiAgICAgICAgaWYgKChub2RlID0gZ3JvdXBbaV0pICYmIChub2RlQnlLZXlWYWx1ZVtrZXlWYWx1ZXNbaV1dID09PSBub2RlKSkgewogICAgICAgICAgZXhpdFtpXSA9IG5vZGU7CiAgICAgICAgfQogICAgICB9CiAgICB9CgogICAgZnVuY3Rpb24gc2VsZWN0aW9uX2RhdGEkNCh2YWx1ZSwga2V5KSB7CiAgICAgIGlmICghdmFsdWUpIHsKICAgICAgICBkYXRhID0gbmV3IEFycmF5KHRoaXMuc2l6ZSgpKSwgaiA9IC0xOwogICAgICAgIHRoaXMuZWFjaChmdW5jdGlvbihkKSB7IGRhdGFbKytqXSA9IGQ7IH0pOwogICAgICAgIHJldHVybiBkYXRhOwogICAgICB9CgogICAgICB2YXIgYmluZCA9IGtleSA/IGJpbmRLZXkkNCA6IGJpbmRJbmRleCQ0LAogICAgICAgICAgcGFyZW50cyA9IHRoaXMuX3BhcmVudHMsCiAgICAgICAgICBncm91cHMgPSB0aGlzLl9ncm91cHM7CgogICAgICBpZiAodHlwZW9mIHZhbHVlICE9PSAiZnVuY3Rpb24iKSB2YWx1ZSA9IGNvbnN0YW50JHQodmFsdWUpOwoKICAgICAgZm9yICh2YXIgbSA9IGdyb3Vwcy5sZW5ndGgsIHVwZGF0ZSA9IG5ldyBBcnJheShtKSwgZW50ZXIgPSBuZXcgQXJyYXkobSksIGV4aXQgPSBuZXcgQXJyYXkobSksIGogPSAwOyBqIDwgbTsgKytqKSB7CiAgICAgICAgdmFyIHBhcmVudCA9IHBhcmVudHNbal0sCiAgICAgICAgICAgIGdyb3VwID0gZ3JvdXBzW2pdLAogICAgICAgICAgICBncm91cEx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5leHQucGFyZW50Tm9kZS5pbnNlcnRCZWZvcmUobm9kZSwgbmV4dCk7CiAgICAgICAgICAgIG5leHQgPSBub2RlOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQoKICAgICAgcmV0dXJuIHRoaXM7CiAgICB9CgogICAgZnVuY3Rpb24gc2VsZWN0aW9uX3NvcnQkNChjb21wYXJlKSB7CiAgICAgIGlmICghY29tcGFyZSkgY29tcGFyZSA9IGFzY2VuZGluZyRjOwoKICAgICAgZnVuY3Rpb24gY29tcGFyZU5vZGUoYSwgYikgewogICAgICAgIHJldHVybiBhICYmIGIgPyBjb21wYXJlKGEuX19kYXRhX18sIGIuX19kYXRhX18pIDogIWEgLSAhYjsKICAgICAgfQoKICAgICAgZm9yICh2YXIgZ3JvdXBzID0gdGhpcy5fZ3JvdXBzLCBtID0gZ3JvdXBzLmxlbmd0aCwgc29ydGdyb3VwcyA9IG5ldyBBcnJheShtKSwgaiA9IDA7IGogPCBtOyArK2opIHsKICAgICAgICBmb3IgKHZhciBncm91cCA9IGdyb3Vwc1tqXSwgbiA9IGdyb3VwLmxlbmd0aCwgc29ydGdyb3VwID0gc29ydGdyb3Vwc1tqXSA9IG5ldyBBcnJheShuKSwgbm9kZSwgaSA9IDA7IGkgPCBuOyArK2kpIHsKICAgICAgICAgIGlmIChub2RlID0gZ3JvdXBbaV0pIHsKICAgICAgICAgICAgc29ydGdyb3VwW2ldID0gbm9kZTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgc29ydGdyb3VwLnNvcnQoY29tcGFyZU5vZGUpOwogICAgICB9CgogICAgICByZXR1cm4gbmV3IFNlbGVjdGlvbiQ2KHNvcnRncm91cHMsIHRoaXMuX3BhcmVudHMpLm9yZGVyKCk7CiAgICB9CgogICAgZnVuY3Rpb24gYXNjZW5kaW5nJGMoYSwgYikgewogICAgICByZXR1cm4gYSA8IGIgPyAtMSA6IGEgPiBiID8gMSA6IGEgPj0gYiA/IDAgOiBOYU47CiAgICB9Cgog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tpXSkpIHJldHVybiBmYWxzZTsKICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgfQoKICAgICAgcmV0dXJuIHRoaXMuZWFjaCgodHlwZW9mIHZhbHVlID09PSAiZnVuY3Rpb24iCiAgICAgICAgICA/IGNsYXNzZWRGdW5jdGlvbiQ0IDogdmFsdWUKICAgICAgICAgID8gY2xhc3NlZFRydWUkNAogICAgICAgICAgOiBjbGFzc2VkRmFsc2UkNCkobmFtZXMsIHZhbHVlKSk7CiAgICB9CgogICAgZnVuY3Rpb24gdGV4dFJlbW92ZSQ0KCkgewogICAgICB0aGlzLnRleHRDb250ZW50ID0gIiI7CiAgICB9CgogICAgZnVuY3Rpb24gdGV4dENvbnN0YW50JDYodmFsdWUpIHsKICAgICAgcmV0dXJuIGZ1bmN0aW9uKCkgewogICAgICAgIHRoaXMudGV4dENvbnRlbnQgPSB2YWx1ZTsKICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiB0ZXh0RnVuY3Rpb24kNih2YWx1ZSkgewogICAgICByZXR1cm4gZnVuY3Rpb24oKSB7CiAgICAgICAgdmFyIHYgPSB2YWx1ZS5hcHBseSh0aGlzLCBhcmd1bWVudHMpOwogICAgICAgIHRoaXMudGV4dENvbnRlbnQgPSB2ID09IG51bGwgPyAiIiA6IHY7CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gc2VsZWN0aW9uX3RleHQkNCh2YWx1ZSkgewogICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aAogICAgICAgICAgPyB0aGlzLmVhY2godmFsdWUgPT0gbnVsbAogICAgICAgICAgICAgID8gdGV4dFJlbW92ZSQ0IDogKHR5cGVvZiB2YWx1ZSA9PT0gImZ1bmN0aW9uIgogICAgICAgICAgICAgID8gdGV4dEZ1bmN0aW9uJDYKICAgICAgICAgICAgICA6IHRleHRDb25zdGFudCQ2KSh2YWx1ZSkpCiAgICAgICAgICA6IHRoaXMubm9kZSgpLnRleHRDb250ZW50OwogICAgfQo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yb3VwKTsKICAgICAgICB9IGZpbmFsbHkgewogICAgICAgIH0KICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiBwYXJzZVR5cGVuYW1lcyQ5KHR5cGVuYW1lcykgewogICAgICByZXR1cm4gdHlwZW5hbWVzLnRyaW0oKS5zcGxpdCgvXnxccysvKS5tYXAoZnVuY3Rpb24odCkgewogICAgICAgIHZhciBuYW1lID0gIiIsIGkgPSB0LmluZGV4T2YoIi4iKTsKICAgICAgICBpZiAoaSA+PSAwKSBuYW1lID0gdC5zbGljZShpICsgMSksIHQgPSB0LnNsaWNlKDAsIGkpOwogICAgICAgIHJldHVybiB7dHlwZTogdCwgbmFtZTogbmFtZX07CiAgICAgIH0pOwogICAgfQoKICAgIGZ1bmN0aW9uIG9uUmVtb3ZlJDQodHlwZW5hbWUpIHsKICAgICAgcmV0dXJuIGZ1bmN0aW9uKCkgewogICAgICAgIHZhciBvbiA9IHRoaXMuX19vbjsKICAgICAgICBpZiAoIW9uKSByZXR1cm47CiAgICAgICAgZm9yICh2YXIgaiA9IDAsIGkgPSAtMSwgbSA9IG9uLmxlbmd0aCwgbzsgaiA8IG07ICsraikgewogICAgICAgICAgaWYgKG8gPSBvbltqXSwgKCF0eXBlbmFtZS50eXBlIHx8IG8udHlwZSA9PT0gdHlwZW5hbWUudHlwZSkgJiYgby5uYW1lID09PSB0eXBlbmFtZS5uYW1lKSB7CiAgICAgICAgICAgIHRoaXMucmVtb3ZlRXZlbnRMaXN0ZW5lcihvLnR5cGUsIG8ubGlzdGVuZXIsIG8uY2FwdHVyZSk7CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICBvblsrK2ldID0gbzsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaWYgKCsraSkgb24ubGVuZ3RoID0gaTsKICAgICAgICBlbHNlIGRlbGV0ZSB0aGlzLl9fb247CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gb25BZGQkNCh0eXBlbmFtZSwgdmFsdWUs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ICB9CgogICAgZnVuY3Rpb24gc2VsZWN0aW9uX29uJDQodHlwZW5hbWUsIHZhbHVlLCBjYXB0dXJlKSB7CiAgICAgIHZhciB0eXBlbmFtZXMgPSBwYXJzZVR5cGVuYW1lcyQ5KHR5cGVuYW1lICsgIiIpLCBpLCBuID0gdHlwZW5hbWVzLmxlbmd0aCwgdDsKCiAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoIDwgMikgewogICAgICAgIHZhciBvbiA9IHRoaXMubm9kZSgpLl9fb247CiAgICAgICAgaWYgKG9uKSBmb3IgKHZhciBqID0gMCwgbSA9IG9uLmxlbmd0aCwgbzsgaiA8IG07ICsraikgewogICAgICAgICAgZm9yIChpID0gMCwgbyA9IG9uW2pdOyBpIDwgbjsgKytpKSB7CiAgICAgICAgICAgIGlmICgodCA9IHR5cGVuYW1lc1tpXSkudHlwZSA9PT0gby50eXBlICYmIHQubmFtZSA9PT0gby5uYW1lKSB7CiAgICAgICAgICAgICAgcmV0dXJuIG8udmFsdWU7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuOwogICAgICB9CgogICAgICBvbiA9IHZhbHVlID8gb25BZGQkNCA6IG9uUmVtb3ZlJDQ7CiAgICAgIGlmIChjYXB0dXJlID09IG51bGwpIGNhcHR1cmUgPSBmYWxzZTsKICAgICAgZm9yIChpID0gMDsgaSA8IG47ICsraSkgdGhpcy5lYWNoKG9uKHR5cGVuYW1lc1tpXSwgdmFsdWUsIGNhcHR1cmUpKTsKICAgICAgcmV0dXJuIHRoaXM7CiAgICB9CgogICAgZnVuY3Rpb24gZGlzcGF0Y2hFdmVudCQ0KG5vZGUsIHR5cGUsIHBhcmFtcykgewogICAgICB2YXIgd2luZG93ID0gZGVmYXVsdFZpZXckNChub2RlKSwKICAgICAgICAgIGV2ZW50ID0gd2luZG93LkN1c3RvbUV2ZW50OwoKICAgICAgaWYgKHR5cGVvZiBldmVudCA9PT0gImZ1bmN0aW9uIik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Db2xvciQ1KSkgbyA9IGNvbG9yJDUobyk7CiAgICAgIGlmICghbykgcmV0dXJuIG5ldyBIc2wkNTsKICAgICAgaWYgKG8gaW5zdGFuY2VvZiBIc2wkNSkgcmV0dXJuIG87CiAgICAgIG8gPSBvLnJnYigpOwogICAgICB2YXIgciA9IG8uciAvIDI1NSwKICAgICAgICAgIGcgPSBvLmcgLyAyNTUsCiAgICAgICAgICBiID0gby5iIC8gMjU1LAogICAgICAgICAgbWluID0gTWF0aC5taW4ociwgZywgYiksCiAgICAgICAgICBtYXggPSBNYXRoLm1heChyLCBnLCBiKSwKICAgICAgICAgIGggPSBOYU4sCiAgICAgICAgICBzID0gbWF4IC0gbWluLAogICAgICAgICAgbCA9IChtYXggKyBtaW4pIC8gMjsKICAgICAgaWYgKHMpIHsKICAgICAgICBpZiAociA9PT0gbWF4KSBoID0gKGcgLSBiKSAvIHMgKyAoZyA8IGIpICogNjsKICAgICAgICBlbHNlIGlmIChnID09PSBtYXgpIGggPSAoYiAtIHIpIC8gcyArIDI7CiAgICAgICAgZWxzZSBoID0gKHIgLSBnKSAvIHMgKyA0OwogICAgICAgIHMgLz0gbCA8IDAuNSA/IG1heCArIG1pbiA6IDIgLSBtYXggLSBtaW47CiAgICAgICAgaCAqPSA2MDsKICAgICAgfSBlbHNlIHsKICAgICAgICBzID0gbCA+IDAgJiYgbCA8IDEgPyAwIDogaDsKICAgICAgfQogICAgICByZXR1cm4gbmV3IEhzbCQ1KGgsIHMsIGwsIG8ub3BhY2l0eSk7CiAgICB9CgogICAgZnVuY3Rpb24gaHNsJDkoaCwgcywgbCwgb3BhY2l0eSkgewogICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA9PT0gMSA/IGhzbENvbnZlcnQkNShoKSA6IG5ldyBIc2wkNShoLCBzLCBsLCBvcGFjaXR5ID09IG51bGwgPyAxIDogb3BhY2l0eSk7CiAgICB9CgogICAgZnVuY3Rpb24gSHNsJDUoaCwgcywgbCwgb3BhY2l0eSkgewogICAgICB0aGlzLmggPSAraDsKICAgICAgdGhpcy5zID0gK3M7CiAgICAgIHRoaXMubCA9ICtsOwogICAgICB0aGlzLm9wYWNpdHkgPSArb3BhY2l0eTsKICAgIH0KCiAgICBkZWZpbmUkNShIc2wkNSwgaHNsJDksIGV4dGVuZCQ1KENvbG9yJDUsIHsKICAgICAgYnJpZ2h0ZXI6IGZ1bmN0aW9uKGspIHsKICAgICAgICBrID0gayA9PSBudWxsID8gYnJpZ2h0ZXIkNSA6IE1hdGgucG93KGJyaWdodGVyJDUsIGspOwogICAgICAgIHJldHVybiBuZXcgSHNsJDUodGhpcy5oLCB0aGlzLnMsIHRoaXMubCAqIGssIHRoaXMub3BhY2l0eSk7CiAgICAgIH0sCiAgICAgIGRhcmtlcjogZnVuY3Rpb24oaykgewogICAgICAgIGsgPSBrID09IG51bGwgPyBkYXJrZXIkNSA6IE1hdGgucG93KGRhcmtlciQ1LCBrKTsKICAgICAgICByZXR1cm4gbmV3IEhzbCQ1KHRoaXMuaCwgdGhpcy5zLCB0aGlzLmwgKiBrLCB0aGlzLm9wYWNpdHkpOwogICAgICB9LAogICAgICByZ2I6IGZ1bmN0aW9uKCkgewogICAgICAgIHZhciBoID0gdGhpcy5oICUgMzYwICsgKHRoaXMuaCA8IDApICogMzYwLAogICAgICAgICAgICBzID0gaXNOYU4oaCkgfHwgaXNOYU4odGhpcy5zKSA/IDAgOiB0aGlzLnMsCiAgICAgICAgICAgIGwgPSB0aGlzLmwsCiAgICAgICAgICAgIG0yID0gbCArIChsIDwgMC41ID8gbCA6IDEgLSBsKSAqIHMsCiAgICAgICAgICAgIG0xID0gMiAqIGwgLSBtMjsKICAgICAgICByZXR1cm4gbmV3IFJnYiQ1KAogICAgICAgICAgaHNsMnJnYiQ1KGggPj0gMjQwID8gaCAtIDI0MCA6IGggKyAxMjAsIG0xLCBtMiksCiAgICAgICAgICBoc2wycmdiJDUoaCwgbTEsIG0yKSwKICAgICAgICAgIGhzbDJyZ2IkNShoIDwgMTIwID8gaCArIDI0MCA6IGggLSAxMjAsIG0xLCBtMiksCiAgICAgICAgICB0aGlzLm9wYWNpdHkKICAgICAgICApOwogICAgICB9LAogICAgICBkaXNwbGF5YWJsZTogZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuICgwIDw9IHRoaXMucyAmJiB0aGlzLnMgPD0gMSB8fCBpc05hTih0aGlzLnMpKQogICAgICAgICAgICAmJiAoMCA8PSB0aGlzLmwgJiYgdGhpcy5sIDw9IDEpCiAgICAgICAgICAgICYmICgwIDw9IHRoaXMub3BhY2l0eSAmJiB0aGlzLm9wYWNpdHkgPD0gMSk7CiAgICAgIH0sCiAgICAgIGZvcm1hdEhzbDogZnVuY3Rpb24oKSB7CiAgICAgICAgdmFyIGEgPSB0aGlzLm9wYWNpdHk7IGEgPSBpc05hTihhKSA/IDEgOiBNYXRoLm1heCgwLCBNYXRoLm1pbigxLCBhKSk7CiAgICAgICAgcmV0dXJuIChhID09PSAxID8gImhzbCgiIDogImhzbGEoIikKICAgICAgICAgICAgKyAodGhpcy5oIHx8IDApICsgIiwgIgogICAgICAgICAgICArICh0aGlzLnMgfHwgMCkgKiAxMDAgKyAiJSwgIgogICAgICAgICAgICArICh0aGlzLmwgfHwgMCkgKiAxMDAgKyAiJSIKICAgICAgICAgICAgKyAoYSA9PT0gMSA/ICIpIiA6ICIsICIgKyBhICsgIikiKTsKICAgICAgfQogICAgfSkpOwoKICAgIC8qIEZyb20gRnZEIDEzLjM3LCBDU1MgQ29sb3IgTW9kdWxlIExldmVsIDMgKi8KICAgIGZ1bmN0aW9uIGhzbDJyZ2IkNShoLCBtMSwgbTIpIHsKICAgICAgcmV0dXJuIChoIDwgNjAgPyBtMSArIChtMiAtIG0xKSAqIGggLyA2MAogICAgICAgICAgOiBoIDwgMTgwID8gbTIKICAgICAgICAgIDogaCA8IDI0MCA/IG0xICsgKG0yIC0gbTEpICogKDI0MCAtIGgpIC8gNjAKICAgICAgICAgIDogbTEpICogMjU1OwogIC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JnYiQ3KGVuZCkpLnIpLAogICAgICAgICAgICBnID0gY29sb3Ioc3RhcnQuZywgZW5kLmcpLAogICAgICAgICAgICBiID0gY29sb3Ioc3RhcnQuYiwgZW5kLmIpLAogICAgICAgICAgICBvcGFjaXR5ID0gbm9nYW1tYSQ0KHN0YXJ0Lm9wYWNpdHksIGVuZC5vcGFjaXR5KTsKICAgICAgICByZXR1cm4gZnVuY3Rpb24odCkgewogICAgICAgICAgc3RhcnQuciA9IHIodCk7CiAgICAgICAgICBzdGFydC5nID0gZyh0KTsKICAgICAgICAgIHN0YXJ0LmIgPSBiKHQpOwogICAgICAgICAgc3RhcnQub3BhY2l0eSA9IG9wYWNpdHkodCk7CiAgICAgICAgICByZXR1cm4gc3RhcnQgKyAiIjsKICAgICAgICB9OwogICAgICB9CgogICAgICByZ2IuZ2FtbWEgPSByZ2JHYW1tYTsKCiAgICAgIHJldHVybiByZ2I7CiAgICB9KSgxKTsKCiAgICBmdW5jdGlvbiBpbnRlcnBvbGF0ZU51bWJlciQyKGEsIGIpIHsKICAgICAgcmV0dXJuIGEgPSArYSwgYiA9ICtiLCBmdW5jdGlvbih0KSB7CiAgICAgICAgcmV0dXJuIGEgKiAoMSAtIHQpICsgYiAqIHQ7CiAgICAgIH07CiAgICB9CgogICAgdmFyIHJlQSQ0ID0gL1stK10/KD86XGQrXC4/XGQqfFwuP1xkKykoPzpbZUVdWy0rXT9cZCspPy9nLAogICAgICAgIHJlQiQ0ID0gbmV3IFJlZ0V4cChyZUEkNC5zb3VyY2UsICJnIik7CgogICAgZnVuY3Rpb24gemVybyQ0KGIpIHsKICAgICAgcmV0dXJuIGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiBiOwogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIG9uZSQ0KGIpIHsKICAgICAgcmV0dXJuIGZ1bmN0aW9uKHQpIHsKICAgICAgICByZXR1cm4gYih0KSArICIiOwogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIGludGVycG9sYXRlU3RyaW5nJDIoYSwgYikgewogICAgICB2YXIgYmkgPSByZUEkNC5sYXN0SW5kZXggPSByZUIkNC5sYXN0SW5kZXggPSAwLCAvLyBzY2FuIGluZGV4IGZvciBuZXh0IG51bWJlciBpbiBiCiAgICAgICAgICBhbSwgLy8gY3VycmVudCBtYXRjaCBpbiBhCiAgICAgICAgICBibSwgLy8gY3VycmVudCBtYXRjaCBpbiBiCiAgICAgICAgICBicywgLy8gc3RyaW5nIHByZWNlZGluZyBjdXJyZW50IG51bWJlciBpbiBiLCBpZiBhbnkKICAgICAgICAgIGkgPSAtMSwgLy8gaW5kZXggaW4gcwogICAgICAgICAgcyA9IFtdLCAvLyBzdHJpbmcgY29uc3RhbnRzIGFuZCBwbGFjZWhvbGRlcnMKICAgICAgICAgIHEgPSBbXTsgLy8gbnVtYmVyIGludGVycG9sYXRvcnMKCiAgICAgIC8vIENvZXJjZSBpbnB1dHMgdG8gc3RyaW5ncy4KICAgICAgYSA9IGEgKyAiIiwgYiA9IGIgKyAiIjsKCiAgICAgIC8vIEludGVycG9sYXRlIHBhaXJzIG9mIG51bWJlcnMgaW4gYSAmIGIuCiAgICAgIHdoaWxlICgoYW0gPSByZUEkNC5leGVjKGEpKQogICAgICAgICAgJiYgKGJtID0gcmVCJDQuZXhlYyhiKSkpIHsKICAgICAgICBpZiAoKGJzID0gYm0uaW5kZXgpID4gYmkpIHsgLy8gYSBzdHJpbmcgcHJlY2VkZXMgdGhlIG5leHQgbnVtYmVyIGluIGIKICAgICAgICAgIGJzID0gYi5zbGljZShiaSwgYnMpOwogICAgICAgICAgaWYgKHNbaV0pIHNbaV0gKz0gYnM7IC8vIGNvYWxlc2NlIHdpdGggcHJldmlvdXMgc3RyaW5nCiAgICAgICAgICBlbHNlIHNbKytpXSA9IGJzOwogICAgICAgIH0KICAgICAgICBpZiAoKGFtID0gYW1bMF0pID09PSAoYm0gPSBibVswXSkpIHsgLy8gbnVtYmVycyBpbiBhICYgYiBtYXRjaAogICAgICAgICAgaWYgKHNbaV0pIHNbaV0gKz0gYm07IC8vIGNvYWxlc2NlIHdpdGggcHJldmlvdXMgc3RyaW5nCiAgICAgICAgICBlbHNlIHNbKytpXSA9IGJtOwogICAgICAgIH0gZWxzZSB7IC8vIGludGVycG9sYXRlIG5vbi1tYXRjaGluZyBudW1iZXJzCiAgICAgICAgICBzWysraV0gPSBudWxsOwogICAgICAgICAgcS5wdXNoKHtpOiBpLCB4OiBpbnRlcnBvbGF0ZU51bWJlciQyKGFtLCBibSl9KTsKICAgICAgICB9CiAgICAgICAgYmkgPSByZUIkNC5sYXN0SW5kZXg7CiAgICAgIH0KCiAgICAgIC8vIEFkZCByZW1haW5zIG9mIGIuCiAgICAgIGlmIChiaSA8IGIubGVuZ3RoKSB7CiAgICAgICAgYnMgPSBiLnNsaWNlKGJpKTsKICAgICAgICBpZiAoc1tpXSkgc1tpXSArPSBiczsgLy8gY29hbGVzY2Ugd2l0aCBwcmV2aW91cyBzdHJpbmcKICAgICAgICBlbHNlIHNbKytpXSA9IGJzOwogICAgICB9CgogICAgICAvLyBTcGVjaWFsIG9wdGltaXphdGlvbiBmb3Igb25seSBhIHNpbmdsZSBtYXRjaC4KICAgICAgLy8gT3RoZXJ3aXNlLCBpbnRlcnBvbGF0ZSBlYWNoIG9mIHRoZSBudW1iZXJzIGFuZCByZWpvaW4gdGhlIHN0cmluZy4KICAgICAgcmV0dXJuIHMubGVuZ3RoIDwgMiA/IChxWzBdCiAgICAgICAgICA/IG9uZSQ0KHFbMF0ueCkKICAgICAgICAgIDogemVybyQ0KGIpKQogICAgICAgICAgOiAoYiA9IHEubGVuZ3RoLCBmdW5jdGlvbih0KSB7CiAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDAsIG87IGkgPCBiOyArK2kpIHNbKG8gPSBxW2ldKS5pXSA9IG8ueCh0KTsKICAgICAgICAgICAgICByZXR1cm4gcy5qb2luKCIiKTsKICAgICAgICAgICAgfSk7CiAgICB9CgogICAgdmFy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dGgKICAgICAgICAgIHEucHVzaCh7aTogcy5wdXNoKHBvcChzKSArICJyb3RhdGUoIiwgbnVsbCwgZGVnUGFyZW4pIC0gMiwgeDogaW50ZXJwb2xhdGVOdW1iZXIkMihhLCBiKX0pOwogICAgICAgIH0gZWxzZSBpZiAoYikgewogICAgICAgICAgcy5wdXNoKHBvcChzKSArICJyb3RhdGUoIiArIGIgKyBkZWdQYXJlbik7CiAgICAgICAgfQogICAgICB9CgogICAgICBmdW5jdGlvbiBza2V3WChhLCBiLCBzLCBxKSB7CiAgICAgICAgaWYgKGEgIT09IGIpIHsKICAgICAgICAgIHEucHVzaCh7aTogcy5wdXNoKHBvcChzKSArICJza2V3WCgiLCBudWxsLCBkZWdQYXJlbikgLSAyLCB4OiBpbnRlcnBvbGF0ZU51bWJlciQyKGEsIGIpfSk7CiAgICAgICAgfSBlbHNlIGlmIChiKSB7CiAgICAgICAgICBzLnB1c2gocG9wKHMpICsgInNrZXdYKCIgKyBiICsgZGVnUGFyZW4pOwogICAgICAgIH0KICAgICAgfQoKICAgICAgZnVuY3Rpb24gc2NhbGUoeGEsIHlhLCB4YiwgeWIsIHMsIHEpIHsKICAgICAgICBpZiAoeGEgIT09IHhiIHx8IHlhICE9PSB5YikgewogICAgICAgICAgdmFyIGkgPSBzLnB1c2gocG9wKHMpICsgInNjYWxlKCIsIG51bGwsICIsIiwgbnVsbCwgIikiKTsKICAgICAgICAgIHEucHVzaCh7aTogaSAtIDQsIHg6IGludGVycG9sYXRlTnVtYmVyJDIoeGEsIHhiKX0sIHtpOiBpIC0gMiwgeDogaW50ZXJwb2xhdGVOdW1iZXIkMih5YSwgeWIpfSk7CiAgICAgICAgfSBlbHNlIGlmICh4YiAhPT0gMSB8fCB5YiAhPT0gMSkgewogICAgICAgICAgcy5wdXNoKHBvcChzKSArICJzY2FsZSgiICsgeGIgKyAiLCIgKyB5YiArICIpIik7CiAgICAgICAgfQogICAgICB9CgogICAgICByZXR1cm4gZnVuY3Rpb24oYSwgY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ogICAgICBub2RlLlIgPSAvLyByaWdodCBub2RlCiAgICAgIG5vZGUuUCA9IC8vIHByZXZpb3VzIG5vZGUKICAgICAgbm9kZS5OID0gbnVsbDsgLy8gbmV4dCBub2RlCiAgICB9CgogICAgUmVkQmxhY2tUcmVlJDEucHJvdG90eXBlID0gewogICAgICBjb25zdHJ1Y3RvcjogUmVkQmxhY2tUcmVlJDEsCgogICAgICBpbnNlcnQ6IGZ1bmN0aW9uKGFmdGVyLCBub2RlKSB7CiAgICAgICAgdmFyIHBhcmVudCwgZ3JhbmRwYSwgdW5jbGU7CgogICAgICAgIGlmIChhZnRlcikgewogICAgICAgICAgbm9kZS5QID0gYWZ0ZXI7CiAgICAgICAgICBub2RlLk4gPSBhZnRlci5OOwogICAgICAgICAgaWYgKGFmdGVyLk4pIGFmdGVyLk4uUCA9IG5vZGU7CiAgICAgICAgICBhZnRlci5OID0gbm9kZTsKICAgICAgICAgIGlmIChhZnRlci5SKSB7CiAgICAgICAgICAgIGFmdGVyID0gYWZ0ZXIuUjsKICAgICAgICAgICAgd2hpbGUgKGFmdGVyLkwpIGFmdGVyID0gYWZ0ZXIuTDsKICAgICAgICAgICAgYWZ0ZXIuTCA9IG5vZGU7CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICBhZnRlci5SID0gbm9kZTsKICAgICAgICAgIH0KICAgICAgICAgIHBhcmVudCA9IGFmdGVyOwogICAgICAgIH0gZWxzZSBpZiAodGhpcy5fKSB7CiAgICAgICAgICBhZnRlciA9IFJlZEJsYWNrRmlyc3QkMSh0aGlzLl8pOwogICAgICAgICAgbm9kZS5QID0gbnVsbDsKICAgICAgICAgIG5vZGUuTiA9IGFmdGVyOwogICAgICAgICAgYWZ0ZXIuUCA9IGFmdGVyLkwgPSBub2RlOwogICAgICAgICAgcGFyZW50ID0gYWZ0ZXI7CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgIG5vZGUuUCA9IG5vZGUuTiA9IG51bGw7CiAgICAgICAgICB0aGlzLl8gPSBub2RlOwogICAgICAgICAgcGFyZW50ID0gbnVsbDsKICAgICAgICB9CiAgICAgICAgbm9kZS5MID0gbm9kZS5SID0gbnVsbDsKICAgICAgICBub2RlLlUgPSBwYXJlbnQ7CiAgICAgICAgbm9kZS5DID0gdHJ1ZTsKCiAgICAgICAgYWZ0ZXIgPSBub2RlOwogICAgICAgIHdoaWxlIChwYXJlbnQgJiYgcGFyZW50LkMpIHsKICAgICAgICAgIGdyYW5kcGEgPSBwYXJlbnQuVTsKICAgICAgICAgIGlmIChwYXJlbnQgPT09IGdyYW5kcGEuTCkgewogICAgICAgICAgICB1bmNsZSA9IGdyYW5kcGEuUjsKICAgICAgICAgICAgaWYgKHVuY2xlICYmIHVuY2xlLkMpIHsKICAgICAgICAgICAgICBwYXJlbnQuQyA9IHVuY2xlLkMgPSBmYWxzZTsKICAgICAgICAgICAgICBncmFuZHBhLkMgPSB0cnVlOwogICAgICAgICAgICAgIGFmdGVyID0gZ3JhbmRwYTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICBpZiAoYWZ0ZXIgPT09IHBhcmVudC5SKSB7CiAgICAgICAgICAgICAgICBSZWRCbGFja1JvdGF0ZUxlZnQkMSh0aGlzLCBwYXJlbnQpOwogICAgICAgICAgICAgICAgYWZ0ZXIgPSBwYXJlbnQ7CiAgICAgICAgICAgICAgICBwYXJlbnQgPSBhZnRlci5VOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBwYXJlbnQuQyA9IGZhbHNlOwogICAgICAgICAgICAgIGdyYW5kcGEuQyA9IHRydWU7CiAgICAgICAgICAgICAgUmVkQmxhY2tSb3RhdGVSaWdodCQxKHRoaXMsIGdyYW5kcGEpOwogICAgICAgICAgICB9CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICB1bmNsZSA9IGdyYW5kcGEuTDsKICAgICAgICAgICAgaWYgKHVuY2xlICYmIHVuY2xlLkMpIHsKICAgICAgICAgICAgICBwYXJlbnQuQyA9IHVuY2xlLkMgPSBmYWxzZTsKICAgICAgICAgICAgICBncmFuZHBhLkMgPSB0cnVlOwogICAgICAgICAgICAgIGFmdGVyID0gZ3JhbmRwYTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICBpZiAoYWZ0ZXIgPT09IHBhcmVudC5MKSB7CiAgICAgICAgICAgICAgICBSZWRCbGFja1JvdGF0ZVJpZ2h0JDEodGhpcywgcGFyZW50KTsKICAgICAgICAgICAgICAgIGFmdGVyID0gcGFyZW50OwogICAgICAgICAgICAgICAgcGFyZW50ID0gYWZ0ZXIuVTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgcGFyZW50LkMgPSBmYWxzZTsKICAgICAgICAgICAgICBncmFuZHBhLkMgPSB0cnVlOwogICAgICAgICAgICAgIFJlZEJsYWNrUm90YXRlTGVmdCQxKHRoaXMsIGdyYW5kcGEpOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICBwYXJlbnQgPSBhZnRlci5VOwogICAgICAgIH0KICAgICAgICB0aGlzLl8uQyA9IGZhbHNlOwogICAgICB9LAoKICAgICAgcmVtb3ZlOiBmdW5jdGlvbihub2RlKSB7CiAgICAgICAgaWYgKG5vZGUuTikgbm9kZS5OLlAgPSBub2RlLlA7CiAgICAgICAgaWYgKG5vZGUuUCkgbm9kZS5QLk4gPSBub2RlLk47CiAgICAgICAgbm9kZS5OID0gbm9kZS5QID0gbnVsbDsKCiAgICAgICAgdmFyIHBhcmVudCA9IG5vZGUuVSwKICAgICAgICAgICAgc2libGluZywKICAgICAgICAgICAgbGVmdCA9IG5vZGUuTCwKICAgICAgICAgICAgcmlnaHQgPSBub2RlLlIsCiAgICAgICAgICAgIG5leHQsCiAgICAgICAgICAgIHJlZDsKCiAgICAgICAgaWYgKCFsZWZ0KSBuZXh0ID0gcmlnaHQ7CiAgICAgICAgZWxzZSBpZiAoIXJpZ2h0KSBuZXh0ID0gbGVmdDsKICAgICAgICBlbHNlIG5leHQgPSBSZWRCbGFja0ZpcnN0JDEocmlnaHQpOwoKICAgICAgICBpZiAocGFyZW50KSB7CiAgICAgICAgICBpZiAocGFyZW50LkwgPT09IG5vZGUpIHBhcmVudC5MID0gbmV4dDsKICAgICAgICAgIGVsc2UgcGFyZW50LlIgPSBuZXh0OwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICB0aGlzLl8gPSBuZXh0OwogICAgICAgIH0KCiAgICAgICAgaWYgKGxlZnQgJiYgcmlnaHQpIHsKICAgICAgICAgIHJlZCA9IG5leHQuQzsKICAgICAgICAgIG5leHQuQyA9IG5vZGUuQzsKICAgICAgICAgIG5leHQuTCA9IGxlZnQ7CiAgICAgICAgICBsZWZ0LlUgPSBuZXh0OwogICAgICAgICAgaWYgKG5leHQgIT09IHJpZ2h0KSB7CiAgICAgICAgICAgIHBhcmVudCA9IG5leHQuVTsKICAgICAgICAgICAgbmV4dC5VID0gbm9kZS5VOwogICAgICAgICAgICBub2RlID0gbmV4dC5SOwogICAgICAgICAgICBwYXJlbnQuTCA9IG5vZGU7CiAgICAgICAgICAgIG5leHQuUiA9IHJpZ2h0OwogICAgICAgICAgICByaWdodC5VID0gbmV4dDsKICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIG5leHQuVSA9IHBhcmVudDsKICAgICAgICAgICAgcGFyZW50ID0gbmV4dDsKICAgICAgICAgICAgbm9kZSA9IG5leHQuUjsKICAgICAgICAgIH0KICAgICAgICB9IGVsc2UgewogICAgICAgICAgcmVkID0gbm9kZS5DOwogICAgICAgICAgbm9kZSA9IG5leHQ7CiAgICAgICAgfQoKICAgICAgICBpZiAobm9kZSkgbm9kZS5VID0gcGFyZW50OwogICAgICAgIGlmIChyZWQpIHJldHVybjsKICAgICAgICBpZiAobm9kZSAmJiBub2RlLkMpIHsgbm9kZS5DID0gZmFsc2U7IHJldHVybjsgfQoKICAgICAgICBkbyB7CiAgICAgICAgICBpZiAobm9kZSA9PT0gdGhpcy5fKSBicmVhazsKICAgICAgICAgIGlmIChub2RlID09PSBwYXJlbnQuTCkgewogICAgICAgICAgICBzaWJsaW5nID0gcGFyZW50LlI7CiAgICAgICAgICAgIGlmIChzaWJsaW5nLkMpIHsKICAgICAgICAgICAgICBzaWJsaW5nLkMgPSBmYWxzZTsKICAgICAgICAgICAgICBwYXJlbnQuQyA9IHRydWU7CiAgICAgICAgICAgICAgUmVkQmxhY2tSb3RhdGVMZWZ0JDEodGhpcywgcGFyZW50KTsKICAgICAgICAgICAgICBzaWJsaW5nID0gcGFyZW50LlI7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKChzaWJsaW5nLkwgJiYgc2libGluZy5MLkMpCiAgICAgICAgICAgICAgICB8fCAoc2libGluZy5SICYmIHNpYmxpbmcuUi5DKSkgewogICAgICAgICAgICAgIGlmICghc2libGluZy5SIHx8ICFzaWJsaW5nLlIuQykgewogICAgICAgICAgICAgICAgc2libGluZy5MLkMgPSBmYWxzZTsKICAgICAgICAgICAgICAgIHNpYmxpbmcuQyA9IHRydWU7CiAgICAgICAgICAgICAgICBSZWRCbGFja1JvdGF0ZVJpZ2h0JDEodGhpcywgc2libGluZyk7CiAgICAgICAgICAgICAgICBzaWJsaW5nID0gcGFyZW50LlI7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIHNpYmxpbmcuQyA9IHBhcmVudC5DOwogICAgICAgICAgICAgIHBhcmVudC5DID0gc2libGluZy5SLkMgPSBmYWxzZTsKICAgICAgICAgICAgICBSZWRCbGFja1JvdGF0ZUxlZnQkMSh0aGlzLCBwYXJlbnQpOwogICAgICAgICAgICAgIG5vZGUgPSB0aGlzLl87CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIHNpYmxpbmcgPSBwYXJlbnQuTDsKICAgICAgICAgICAgaWYgKHNpYmxpbmcuQykgewogICAgICAgICAgICAgIHNpYmxpbmcuQyA9IGZhbHNlOwogICAgICAgICAgICAgIHBhcmVudC5DID0gdHJ1ZTsKICAgICAgICAgICAgICBSZWRCbGFja1JvdGF0ZVJpZ2h0JDEodGhpcywgcGFyZW50KTsKICAgICAgICAgICAgICBzaWJsaW5nID0gcGFyZW50Lkw7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKChzaWJsaW5nLkwgJiYgc2libGluZy5MLkMpCiAgICAgICAgICAgICAgfHwgKHNpYmxpbmcuUiAmJiBzaWJsaW5nLlIuQykpIHsKICAgICAgICAgICAgICBpZiAoIXNpYmxpbmcuTCB8fCAhc2libGluZy5MLkMpIHsKICAgICAgICAgICAgICAgIHNpYmxpbmcuUi5DID0gZmFsc2U7CiAgICAgICAgICAgICAgICBzaWJsaW5nLkMgPSB0cnVlOwogICAgICAgICAgICAgICAgUmVkQmxhY2tSb3RhdGVMZWZ0JDEodGhpcywgc2libGluZyk7CiAgICAgICAgICAgICAgICBzaWJsaW5nID0gcGFyZW50Lkw7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIHNpYmxpbmcuQyA9IHBhcmVudC5DOwogICAgICAgICAgICAgIHBhcmVudC5DID0gc2libGluZy5MLkMgPSBmYWxzZTsKICAgICAgICAgICAgICBSZWRCbGFja1JvdGF0ZVJpZ2h0JDEodGhpcywgcGFyZW50KTsKICAgICAgICAgICAgICBub2RlID0gdGhpcy5fOwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICBzaWJsaW5nLkMgPSB0cnVlOwogICAgICAgICAgbm9kZSA9IHBhcmVudDsKICAgICAgICAgIHBhcmVudCA9IHBhcmVudC5VOwogICAgICAgIH0gd2hpbGUgKCFub2RlLkMpOwoKICAgICAgICBpZiAobm9kZSkgbm9kZS5DID0gZmFsc2U7CiAgICAgIH0KICAgIH07CgogICAgZnVuY3Rpb24gUmVkQmxhY2tSb3RhdGVMZWZ0JDEodHJlZSwgbm9kZSkgewogICAgICB2YXIgcCA9IG5vZGUsCiAgICAgICAgICBxID0gbm9kZS5SLAogICAgICAgICAgcGFyZW50ID0gcC5VOwoKICAgICAgaWYgKHBhcmVudCkgewogICAgICAgIGlmIChwYXJlbnQuTCA9PT0gcCkgcGFyZW50LkwgPSBxOwogICAgICAgIGVsc2UgcGFyZW50LlIgPSBxOwogICAgICB9IGVsc2UgewogICAgICAgIHRyZWUuXyA9IHE7CiAgICAgIH0KCiAgICAgIHEuVSA9IHBhcmVudDsKICAgICAgcC5VID0gcTsKICAgICAgcC5SID0gcS5MOwogICAgICBpZiAocC5SKSBwLlIuVSA9IHA7CiAgICAgIHEuTCA9IHA7CiAgICB9CgogICAgZnVuY3Rpb24gUmVkQmxhY2tSb3RhdGVSaWdodCQxKHRyZWUsIG5vZGUpIHsKICAgICAgdmFyIHAgPSBub2RlLAogICAgICAgICAgcSA9IG5vZGUuTCwKICAgICAgICAgIHBhcmVudCA9IHAuVTsKCiAgICAgIGlmIChwYXJlbnQpIHsKICAgICAgICBpZiAocGFyZW50LkwgPT09IHApIHBhcmVudC5MID0gcTsKICAgICAgICBlbHNlIHBhcmVudC5SID0gcTsKICAgICAgfSBlbHNlIHsKICAgICAgICB0cmVlLl8gPSBxOwogICAgICB9CgogICAgICBxLlUgPSBwYXJlbnQ7CiAgICAgIHAuVSA9IHE7CiAgICAgIHAuTCA9IHEuUjsKICAgICAgaWYgKHAuTCkgcC5MLlUgPSBwOwogICAgICBxLlIgPSBwOwogICAgfQoKICAgIGZ1bmN0aW9uIFJlZEJsYWNrRmlyc3QkMShub2RlKSB7CiAgICAgIHdoaWxlIChub2RlLkwpIG5vZGUgPSBub2RlLkw7CiAgICAgIHJldHVybiBub2RlOwogICAgfQoKICAgIGZ1bmN0aW9uIGNyZWF0ZUVkZ2UkMShsZWZ0LCByaWdodCwgdjAsIHYxKSB7CiAgICAgIHZhciBlZGdlID0gW251bGwsIG51bGxdLAogICAgICAgICAgaW5kZXggPSBlZGdlcyQxLnB1c2goZWRnZSkgLSAxOwogICAgICBlZGdlLmxlZnQgPS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gICAgICBheCA9IGFbMF0sCiAgICAgICAgICBheSA9IGFbMV0sCiAgICAgICAgICBieCA9IGJbMF0sCiAgICAgICAgICBieSA9IGJbMV0sCiAgICAgICAgICB0MCA9IDAsCiAgICAgICAgICB0MSA9IDEsCiAgICAgICAgICBkeCA9IGJ4IC0gYXgsCiAgICAgICAgICBkeSA9IGJ5IC0gYXksCiAgICAgICAgICByOwoKICAgICAgciA9IHgwIC0gYXg7CiAgICAgIGlmICghZHggJiYgciA+IDApIHJldHVybjsKICAgICAgciAvPSBkeDsKICAgICAgaWYgKGR4IDwgMCkgewogICAgICAgIGlmIChyIDwgdDApIHJldHVybjsKICAgICAgICBpZiAociA8IHQxKSB0MSA9IHI7CiAgICAgIH0gZWxzZSBpZiAoZHggPiAwKSB7CiAgICAgICAgaWYgKHIgPiB0MSkgcmV0dXJuOwogICAgICAgIGlmIChyID4gdDApIHQwID0gcjsKICAgICAgfQoKICAgICAgciA9IHgxIC0gYXg7CiAgICAgIGlmICghZHggJiYgciA8IDApIHJldHVybjsKICAgICAgciAvPSBkeDsKICAgICAgaWYgKGR4IDwgMCkgewogICAgICAgIGlmIChyID4gdDEpIHJldHVybjsKICAgICAgICBpZiAociA+IHQwKSB0MCA9IHI7CiAgICAgIH0gZWxzZSBpZiAoZHggPiAwKSB7CiAgICAgICAgaWYgKHIgPCB0MCkgcmV0dXJuOwogICAgICAgIGlmIChyIDwgdDEpIHQxID0gcjsKICAgICAgfQoKICAgICAgciA9IHkwIC0gYXk7CiAgICAgIGlmICghZHkgJiYgciA+IDApIHJldHVybjsKICAgICAgciAvPSBkeTsKICAgICAgaWYgKGR5IDwgMCkgewogICAgICAgIGlmIChyIDwgdDApIHJldHVybjsKICAgICAgICBpZiAociA8IHQxKSB0MSA9IHI7CiAgICAgIH0gZWxzZSBpZiAoZHkgPiAwKSB7CiAgICAgICAgaWYgKHIgPiB0MSkgcmV0dXJuOwogICAgICAgIGlmIChyID4gdDApIHQwID0gcjsKICAgICAgfQoKICAgICAgciA9IHkxIC0gYXk7CiAgICAgIGlmICghZHkgJiYgciA8IDApIHJldHVybjsKICAgICAgciAvPSBkeTsKICAgICAgaWYgKGR5IDwgMCkgewogICAgICAgIGlmIChyID4gdDEpIHJldHVybjsKICAgICAgICBpZiAociA+IHQwKSB0MCA9IHI7CiAgICAgIH0gZWxzZSBpZiAoZHkgPiAwKSB7CiAgICAgICAgaWYgKHIgPCB0MCkgcmV0dXJuOwogICAgICAgIGlmIChyIDwgdDEpIHQxID0gcjsKICAgICAgfQoKICAgICAgaWYgKCEodDAgPiAwKSAmJiAhKHQxIDwgMSkpIHJldHVybiB0cnVlOyAvLyBUT0RPIEJldHRlciBjaGVjaz8KCiAgICAgIGlmICh0MCA+IDApIGVkZ2VbMF0gPSBbYXggKyB0MCAqIGR4LCBheSArIHQwICogZHldOwogICAgICBpZiAodDEgPCAxKSBlZGdlWzFdID0gW2F4ICsgdDEgKiBkeCwgYXkgKyB0MSAqIGR5XTsKICAgICAgcmV0dXJuIHRydWU7CiAgICB9CgogICAgZnVuY3Rpb24gY29ubmVjdEVkZ2UkMShlZGdlLCB4MCwgeTAsIHgxLCB5MSkgewogICAgICB2YXIgdjEgPSBlZGdlWzFdOwogICAgICBpZiAodjEpIHJldHVybiB0cnVlOwoKICAgICAgdmFyIHYwID0gZWRnZVswXSwKICAgICAgICAgIGxlZnQgPSBlZGdlLmxlZnQsCiAgICAgICAgICByaWdodCA9IGVkZ2UucmlnaHQsCiAgICAgICAgICBseCA9IGxlZnRbMF0sCiAgICAgICAgICBseSA9IGxlZnRbMV0sCiAgICAgICAgICByeCA9IHJpZ2h0WzBdLAogICAgICAgICAgcnkgPSByaWdodFsxXSwKICAgICAgICAgIGZ4ID0gKGx4ICsgcngpIC8gMiwKICAgICAgICAgIGZ5ID0gKGx5ICsgcnkpIC8gMiwKICAgICAgICAgIGZtLAogICAgICAgICAgZmI7CgogICAgICBpZiAocnkgPT09IGx5KSB7CiAgICAgICAgaWYgKGZ4IDwgeDAgfHwgZnggPj0geDEpIHJldHVybjsKICAgICAgICBpZiAobHggPiByeCkgewogICAgICAgICAgaWYgKCF2MCkgdjAgPSBbZngsIHkwXTsKICAgICAgICAgIGVsc2UgaWYgKHYwWzFdID49IHkxKSByZXR1cm47CiAgICAgICAgICB2MSA9IFtmeCwgeTFdOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICBpZiAoIXYwKSB2MCA9IFtmeCwgeTFdOwogICAgICAgICAgZWxzZSBpZiAodjBbMV0gPCB5MCkgcmV0dXJuOwogICAgICAgICAgdjEgPSBbZngsIHkwXTsKICAgICAgICB9CiAgICAgIH0gZWxzZSB7CiAgICAgICAgZm0gPSAobHggLSByeCkgLyAocnkgLSBseSk7CiAgICAgICAgZmIgPSBmeSAtIGZtICogZng7CiAgICAgICAgaWYgKGZtIDwgLTEgfHwgZm0gPiAxKSB7CiAgICAgICAgICBpZiAobHggPiByeCkgewogICAgICAgICAgICBpZiAoIXYwKSB2MCA9IFsoeTAgLSBmYikgLyBmbSwgeTBdOwogICAgICAgICAgICBlbHNlIGlmICh2MFsxXSA+PSB5MSkgcmV0dXJuOwogICAgICAgICAgICB2MSA9IFsoeTEgLSBmYikgLyBmbSwgeTFdOwogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgaWYgKCF2MCkgdjAgPSBbKHkxIC0gZmIpIC8gZm0sIHkxXTsKICAgICAgICAgICAgZWxzZSBpZiAodjBbMV0gPCB5MCkgcmV0dXJuOwogICAgICAgICAgICB2MSA9IFsoeTAgLSBmYikgLyBmbSwgeTBdOwogICAgICAgICAgfQogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICBpZiAobHkgPCByeSkgewogICAgICAgICAgICBpZiAoIXYwKSB2MCA9IFt4MCwgZm0gKiB4MCArIGZiXTsKICAgICAgICAgICAgZWxzZSBpZiAodjBbMF0gPj0geDEpIHJldHVybjsKICAgICAgICAgICAgdjEgPSBbeDEsIGZtICogeDEgKyBmYl07CiAgICAgICAgICB9IGVsc2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VsbHMkMVtpQ2VsbF0pIHsKICAgICAgICAgIGlmICghY2VsbC5oYWxmZWRnZXMubGVuZ3RoKSB7CiAgICAgICAgICAgIGRlbGV0ZSBjZWxscyQxW2lDZWxsXTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KCiAgICB2YXIgY2lyY2xlUG9vbCQxID0gW107CgogICAgdmFyIGZpcnN0Q2lyY2xlJDE7CgogICAgZnVuY3Rpb24gQ2lyY2xlJDEoKSB7CiAgICAgIFJlZEJsYWNrTm9kZSQxKHRoaXMpOwogICAgICB0aGlzLnggPQogICAgICB0aGlzLnkgPQogICAgICB0aGlzLmFyYyA9CiAgICAgIHRoaXMuc2l0ZSA9CiAgICAgIHRoaXMuY3kgPSBudWxsOwogICAgfQoKICAgIGZ1bmN0aW9uIGF0dGFjaENpcmNsZSQxKGFyYykgewogICAgICB2YXIgbEFyYyA9IGFyYy5QLAogICAgICAgICAgckFyYyA9IGFyYy5OOwoKICAgICAgaWYgKCFsQXJjIHx8ICFyQXJjKSByZXR1cm47CgogICAgICB2YXIgbFNpdGUgPSBsQXJjLnNpdGUsCiAgICAgICAgICBjU2l0ZSA9IGFyYy5zaXRlLAogICAgICAgICAgclNpdGUgPSByQXJjLnNpdGU7CgogICAgICBpZiAobFNpdGUgPT09IHJTaXRlKSByZXR1cm47CgogICAgICB2YXIgYnggPSBjU2l0ZVswXSwKICAgICAgICAgIGJ5ID0gY1NpdGVbMV0sCiAgICAgICAgICBheCA9IGxTaXRlWzBdIC0gYngsCiAgICAgICAgICBheSA9IGxTaXRlWzFdIC0gYnksCiAgICAgICAgICBjeCA9IHJTaXRlWzBdIC0gYngsCiAgICAgICAgICBjeSA9IHJTaXRlWzFdIC0gYnk7CgogICAgICB2YXIgZCA9IDIgKiAoYXggKiBjeSAtIGF5ICogY3gpOwogICAgICBpZiAoZCA+PSAtZXBzaWxvbjIkNSkgcmV0dXJuOwoKICAgICAgdmFyIGhhID0gYXggKiBheCArIGF5ICogY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V4ID0gW3gsIHldLAogICAgICAgICAgcHJldmlvdXMgPSBiZWFjaC5QLAogICAgICAgICAgbmV4dCA9IGJlYWNoLk4sCiAgICAgICAgICBkaXNhcHBlYXJpbmcgPSBbYmVhY2hdOwoKICAgICAgZGV0YWNoQmVhY2gkMShiZWFjaCk7CgogICAgICB2YXIgbEFyYyA9IHByZXZpb3VzOwogICAgICB3aGlsZSAobEFyYy5jaXJjbGUKICAgICAgICAgICYmIE1hdGguYWJzKHggLSBsQXJjLmNpcmNsZS54KSA8IGVwc2lsb24kYgogICAgICAgICAgJiYgTWF0aC5hYnMoeSAtIGxBcmMuY2lyY2xlLmN5KSA8IGVwc2lsb24kYikgewogICAgICAgIHByZXZpb3VzID0gbEFyYy5QOwogICAgICAgIGRpc2FwcGVhcmluZy51bnNoaWZ0KGxBcmMpOwogICAgICAgIGRldGFjaEJlYWNoJDEobEFyYyk7CiAgICAgICAgbEFyYyA9IHByZXZpb3VzOwogICAgICB9CgogICAgICBkaXNhcHBlYXJpbmcudW5zaGlmdChsQXJjKTsKICAgICAgZGV0YWNoQ2lyY2xlJDEobEFyYyk7CgogICAgICB2YXIgckFyYyA9IG5leHQ7CiAgICAgIHdoaWxlIChyQXJjLmNpcmNsZQogICAgICAgICAgJiYgTWF0aC5hYnMoeCAtIHJBcmMuY2lyY2xlLngpIDwgZXBzaWxvbiRiCiAgICAgICAgICAmJiBNYXRoLmFicyh5IC0gckFyYy5jaXJjbGUuY3kpIDwgZXBzaWxvbiRiKSB7CiAgICAgICAgbmV4dCA9IHJBcmMuTjsKICAgICAgICBkaXNhcHBlYXJpbmcucHVzaChyQXJjKTsKICAgICAgICBkZXRhY2hCZWFjaCQxKHJBcmMpOwogICAgICAgIHJBcmMgPSBuZXh0OwogICAgICB9CgogICAgICBkaXNhcHBlYXJpbmcucHVzaChyQXJjKTsKICAgICAgZGV0YWNoQ2lyY2xlJDEockFyYyk7CgogICAgICB2YXIgbkFyY3MgPSBkaXNhcHBlYXJpbmcubGVu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gICAgICAgICAgbEFyYyA9IG5vZGU7CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgbm9kZSA9IG5vZGUuUjsKICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIGlmIChkeGwgPiAtZXBzaWxvbiRiKSB7CiAgICAgICAgICAgICAgbEFyYyA9IG5vZGUuUDsKICAgICAgICAgICAgICByQXJjID0gbm9kZTsKICAgICAgICAgICAgfSBlbHNlIGlmIChkeHIgPiAtZXBzaWxvbiRiKSB7CiAgICAgICAgICAgICAgbEFyYyA9IG5vZGU7CiAgICAgICAgICAgICAgckFyYyA9IG5vZGUuTjsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICBsQXJjID0gckFyYyA9IG5vZGU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CgogICAgICBjcmVhdGVDZWxsJDEoc2l0ZSk7CiAgICAgIHZhciBuZXdBcmMgPSBjcmVhdGVCZWFjaCQxKHNpdGUpOwogICAgICBiZWFjaGVzJDEuaW5zZXJ0KGxBcmMsIG5ld0FyYyk7CgogICAgICBpZiAoIWxBcmMgJiYgIXJBcmMpIHJldHVybjsKCiAgICAgIGlmIChsQXJjID09PSByQXJjKSB7CiAgICAgICAgZGV0YWNoQ2lyY2xlJDEobEFyYyk7CiAgICAgICAgckFyYyA9IGNyZWF0ZUJlYWNoJDEobEFyYy5zaXRlKTsKICAgICAgICBiZWFjaGVzJDEuaW5zZXJ0KG5ld0FyYywgckFyYyk7CiAgICAgICAgbmV3QXJjLmVkZ2UgPSByQXJjLmVkZ2UgPSBjcmVhdGVFZGdlJDEobEFyYy5zaXRlLCBuZXdBcmMuc2l0ZSk7CiAgICAgICAgYXR0YWNoQ2lyY2xlJDEobEFyYyk7CiAgICAgICAgYXR0YWNoQ2lyY2xlJDEockFyYyk7CiAgICAgICAgcmV0dXJuOwogICAgICB9Cgog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gY2lyY2xlLnkgJiYgc2l0ZVswXSA8IGNpcmNsZS54KSkpIHsKICAgICAgICAgIGlmIChzaXRlWzBdICE9PSB4IHx8IHNpdGVbMV0gIT09IHkpIHsKICAgICAgICAgICAgYWRkQmVhY2gkMShzaXRlKTsKICAgICAgICAgICAgeCA9IHNpdGVbMF0sIHkgPSBzaXRlWzFdOwogICAgICAgICAgfQogICAgICAgICAgc2l0ZSA9IHNpdGVzLnBvcCgpOwogICAgICAgIH0gZWxzZSBpZiAoY2lyY2xlKSB7CiAgICAgICAgICByZW1vdmVCZWFjaCQxKGNpcmNsZS5hcmMpOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICBicmVhazsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIHNvcnRDZWxsSGFsZmVkZ2VzJDEoKTsKCiAgICAgIGlmIChleHRlbnQpIHsKICAgICAgICB2YXIgeDAgPSArZXh0ZW50WzBdWzBdLAogICAgICAgICAgICB5MCA9ICtleHRlbnRbMF1bMV0sCiAgICAgICAgICAgIHgxID0gK2V4dGVudFsxXVswXSwKICAgICAgICAgICAgeTEgPSArZXh0ZW50WzFdWzFdOwogICAgICAgIGNsaXBFZGdlcyQxKHgwLCB5MCwgeDEsIHkxKTsKICAgICAgICBjbGlwQ2VsbHMkMSh4MCwgeTAsIHgxLCB5MSk7CiAgICAgIH0KCiAgICAgIHRoaXMuZWRnZXMgPSBlZGdlcyQxOwogICAgICB0aGlzLmNlbGxzID0gY2VsbHMkMTsKCiAgICAgIGJlYWNoZXMkMSA9CiAgICAgIGNpcmNsZXMkMSA9CiAgICAgIGVkZ2VzJDEgPQogICAgICBjZWxscyQxID0gbnVsbDsKICAgIH0KCiAgICBEaWFncmFtJDEucHJvdG90eXBlID0gewogICAgICBjb25zdHJ1Y3RvcjogRGlhZ3JhbSQxLAoKICAgICAgcG9seWdvbnM6IGZ1bmN0aW9uKCkgewogICAgICAgIHZhciBlZGdlcyA9IHRoaXMuZWRnZXM7CgogICAgICAgIHJldHVybiB0aGlzLmNlbGxzLm1hcChmdW5jdGlvbihjZWxsKSB7CiAgICAgICAgICB2YXIgcG9seWdvbiA9IGNlbGwuaGFsZmVkZ2VzLm1hcChmdW5jdGlvbihpKSB7IHJldHVybiBjZWxsSGFsZmVkZ2VTdGFydCQxKGNlbGwsIGVkZ2VzW2ldKTsgfSk7CiAgICAgICAgICBwb2x5Z29uLmRhdGEgPSBjZWxsLnNpdGUuZGF0YTsKICAgICAgICAgIHJldHVybiBwb2x5Z29uOwogICAgICAgIH0pOwogICAgICB9LAoKICAgICAgdHJpYW5nbGVzOiBmdW5jdGlvbigpIHsKICAgICAgICB2YXIgdHJpYW5nbGVzID0gW10sCiAgICAgICAgICAgIGVkZ2VzID0gdGhpcy5lZGdlczsKCiAgICAgICAgdGhpcy5jZWxscy5mb3JFYWNoKGZ1bmN0aW9uKGNlbGwsIGkpIHsKICAgICAgICAgIGlmICghKG0gPSAoaGFsZmVkZ2VzID0gY2VsbC5oYWxmZWRnZXMpLmxlbmd0aCkpIHJldHVybjsKICAgICAgICAgIHZhciBzaXRlID0gY2VsbC5zaXRlLAogICAgICAgICAgICAgIGhhbGZlZGdlcywKICAgICAgICAgICAgICBqID0gLTEsCiAgICAgICAgICAgICAgbSwKICAgICAgICAgICAgICBzMCwKICAgICAgICAgICAgICBlMSA9IGVkZ2VzW2hhbGZlZGdlc1ttIC0gMV1dLAogICAgICAgICAgICAgIHMxID0gZTEubGVmdCA9PT0gc2l0ZSA/IGUxLnJpZ2h0IDogZTEubGVmdDsKCiAgICAgICAgICB3aGlsZSAoKytqIDwgbSkgewogICAgICAgICAgICBzMCA9IHMxOwogICAgICAgICAgICBlMSA9IGVkZ2VzW2hhbGZlZGdlc1tqXV07CiAgICAgICAgICAgIHMxID0gZTEubGVmdCA9PT0gc2l0ZSA/IGUxLnJpZ2h0IDogZTEubGVmdDsKICAgICAgICAgICAgaWYgKHMwICYmIHMxICYmIGkgPCBzMC5pbmRleCAmJiBpIDwgczEuaW5kZXggJ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yBpIDwgbjsgKytpKSB0W2ldLnZhbHVlLmFwcGx5KHRoYXQsIGFyZ3MpOwogICAgICB9LAogICAgICBhcHBseTogZnVuY3Rpb24odHlwZSwgdGhhdCwgYXJncykgewogICAgICAgIGlmICghdGhpcy5fLmhhc093blByb3BlcnR5KHR5cGUpKSB0aHJvdyBuZXcgRXJyb3IoInVua25vd24gdHlwZTogIiArIHR5cGUpOwogICAgICAgIGZvciAodmFyIHQgPSB0aGlzLl9bdHlwZV0sIGkgPSAwLCBuID0gdC5sZW5ndGg7IGkgPCBuOyArK2kpIHRbaV0udmFsdWUuYXBwbHkodGhhdCwgYXJncyk7CiAgICAgIH0KICAgIH07CgogICAgZnVuY3Rpb24gZ2V0JGEodHlwZSwgbmFtZSkgewogICAgICBmb3IgKHZhciBpID0gMCwgbiA9IHR5cGUubGVuZ3RoLCBjOyBpIDwgbjsgKytpKSB7CiAgICAgICAgaWYgKChjID0gdHlwZVtpXSkubmFtZSA9PT0gbmFtZSkgewogICAgICAgICAgcmV0dXJuIGMudmFsdWU7CiAgICAgICAgfQogICAgICB9CiAgICB9CgogICAgZnVuY3Rpb24gc2V0JGUodHlwZSwgbmFtZSwgY2FsbGJhY2spIHsKICAgICAgZm9yICh2YXIgaSA9IDAsIG4gPSB0eXBlLmxlbmd0aDsgaSA8IG47ICsraSkgewogICAgICAgIGlmICh0eXBlW2ldLm5hbWUgPT09IG5hbWUpIHsKICAgICAgICAgIHR5cGVbaV0gPSBub29wJGIsIHR5cGUgPSB0eXBlLnNsaWNlKDAsIGkpLmNvbmNhdCh0eXBlLnNsaWNlKGkgKyAxKSk7CiAgICAgICAgICBicmVhazsKICAgICAgICB9CiAgICAgIH0KICAgICAgaWYgKGNhbGxiYWNrICE9IG51bGwpIHR5cGUucHVzaCh7bmFtZTogbmFtZSwgdmFsdWU6IGNhbGxiYWNrfSk7CiAgICAgIHJldHVybiB0eXBlOwogICAgfQoKICAgIHZhciB4aHRtbCQ1ID0gImh0dHA6Ly93d3cudz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1KHBhcmVudCwgZGF0YVtpXSk7CiAgICAgICAgfQogICAgICB9CgogICAgICAvLyBQdXQgYW55IG5vbi1udWxsIG5vZGVzIHRoYXQgZG9u4oCZdCBmaXQgaW50byBleGl0LgogICAgICBmb3IgKDsgaSA8IGdyb3VwTGVuZ3RoOyArK2kpIHsKICAgICAgICBpZiAobm9kZSA9IGdyb3VwW2ldKSB7CiAgICAgICAgICBleGl0W2ldID0gbm9kZTsKICAgICAgICB9CiAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiBiaW5kS2V5JDUocGFyZW50LCBncm91cCwgZW50ZXIsIHVwZGF0ZSwgZXhpdCwgZGF0YSwga2V5KSB7CiAgICAgIHZhciBpLAogICAgICAgICAgbm9kZSwKICAgICAgICAgIG5vZGVCeUtleVZhbHVlID0ge30sCiAgICAgICAgICBncm91cExlbmd0aCA9IGdyb3VwLmxlbmd0aCwKICAgICAgICAgIGRhdGFMZW5ndGggPSBkYXRhLmxlbmd0aCwKICAgICAgICAgIGtleVZhbHVlcyA9IG5ldyBBcnJheShncm91cExlbmd0aCksCiAgICAgICAgICBrZXlWYWx1ZTsKCiAgICAgIC8vIENvbXB1dGUgdGhlIGtleSBmb3IgZWFjaCBub2RlLgogICAgICAvLyBJZiBtdWx0aXBsZSBub2RlcyBoYXZlIHRoZSBzYW1lIGtleSwgdGhlIGR1cGxpY2F0ZXMgYXJlIGFkZGVkIHRvIGV4aXQuCiAgICAgIGZvciAoaSA9IDA7IGkgPCBncm91cExlbmd0aDsgKytpKSB7CiAgICAgICAgaWYgKG5vZGUgPSBncm91cFtpXSkgewogICAgICAgICAga2V5VmFsdWVzW2ldID0ga2V5VmFsdWUgPSBrZXlQcmVmaXgkNyArIGtleS5jYWxsKG5vZGUsIG5vZGUuX19kYXRhX18sIGksIGdyb3VwKTsKICAgICAgICAgIGlmIChrZXlWYWx1ZSBpbiBub2RlQnlLZXlWYWx1ZSkgewogICAgICAgICAgICBleGl0W2ldID0gbm9kZTsKICAgICAg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bmFtZXMpIHsKICAgICAgcmV0dXJuIHR5cGVuYW1lcy50cmltKCkuc3BsaXQoL158XHMrLykubWFwKGZ1bmN0aW9uKHQpIHsKICAgICAgICB2YXIgbmFtZSA9ICIiLCBpID0gdC5pbmRleE9mKCIuIik7CiAgICAgICAgaWYgKGkgPj0gMCkgbmFtZSA9IHQuc2xpY2UoaSArIDEpLCB0ID0gdC5zbGljZSgwLCBpKTsKICAgICAgICByZXR1cm4ge3R5cGU6IHQsIG5hbWU6IG5hbWV9OwogICAgICB9KTsKICAgIH0KCiAgICBmdW5jdGlvbiBvblJlbW92ZSQ1KHR5cGVuYW1lKSB7CiAgICAgIHJldHVybiBmdW5jdGlvbigpIHsKICAgICAgICB2YXIgb24gPSB0aGlzLl9fb247CiAgICAgICAgaWYgKCFvbikgcmV0dXJuOwogICAgICAgIGZvciAodmFyIGogPSAwLCBpID0gLTEsIG0gPSBvbi5sZW5ndGgsIG87IGogPCBtOyArK2opIHsKICAgICAgICAgIGlmIChvID0gb25bal0sICghdHlwZW5hbWUudHlwZSB8fCBvLnR5cGUgPT09IHR5cGVuYW1lLnR5cGUpICYmIG8ubmFtZSA9PT0gdHlwZW5hbWUubmFtZSkgewogICAgICAgICAgICB0aGlzLnJlbW92ZUV2ZW50TGlzdGVuZXIoby50eXBlLCBvLmxpc3RlbmVyLCBvLmNhcHR1cmUpOwogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgb25bKytpXSA9IG87CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGlmICgrK2kpIG9uLmxlbmd0aCA9IGk7CiAgICAgICAgZWxzZSBkZWxldGUgdGhpcy5fX29uOwogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIG9uQWRkJDUodHlwZW5hbWUsIHZhbHVlLCBjYXB0dXJlKSB7CiAgICAgIHZhciB3cmFwID0gZmlsdGVyRXZlbnRzJDUuaGFzT3duUHJvcGVydHkodHlwZW5hbWUudHlwZSkgPyBmaWx0ZXJDb250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mIgLyAyNTUsCiAgICAgICAgICBtaW4gPSBNYXRoLm1pbihyLCBnLCBiKSwKICAgICAgICAgIG1heCA9IE1hdGgubWF4KHIsIGcsIGIpLAogICAgICAgICAgaCA9IE5hTiwKICAgICAgICAgIHMgPSBtYXggLSBtaW4sCiAgICAgICAgICBsID0gKG1heCArIG1pbikgLyAyOwogICAgICBpZiAocykgewogICAgICAgIGlmIChyID09PSBtYXgpIGggPSAoZyAtIGIpIC8gcyArIChnIDwgYikgKiA2OwogICAgICAgIGVsc2UgaWYgKGcgPT09IG1heCkgaCA9IChiIC0gcikgLyBzICsgMjsKICAgICAgICBlbHNlIGggPSAociAtIGcpIC8gcyArIDQ7CiAgICAgICAgcyAvPSBsIDwgMC41ID8gbWF4ICsgbWluIDogMiAtIG1heCAtIG1pbjsKICAgICAgICBoICo9IDYwOwogICAgICB9IGVsc2UgewogICAgICAgIHMgPSBsID4gMCAmJiBsIDwgMSA/IDAgOiBoOwogICAgICB9CiAgICAgIHJldHVybiBuZXcgSHNsJDYoaCwgcywgbCwgby5vcGFjaXR5KTsKICAgIH0KCiAgICBmdW5jdGlvbiBoc2wkYShoLCBzLCBsLCBvcGFjaXR5KSB7CiAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID09PSAxID8gaHNsQ29udmVydCQ2KGgpIDogbmV3IEhzbCQ2KGgsIHMsIGwsIG9wYWNpdHkgPT0gbnVsbCA/IDEgOiBvcGFjaXR5KTsKICAgIH0KCiAgICBmdW5jdGlvbiBIc2wkNihoLCBzLCBsLCBvcGFjaXR5KSB7CiAgICAgIHRoaXMuaCA9ICtoOwogICAgICB0aGlzLnMgPSArczsKICAgICAgdGhpcy5sID0gK2w7CiAgICAgIHRoaXMub3BhY2l0eSA9ICtvcGFjaXR5OwogICAgfQoKICAgIGRlZmluZSQ2KEhzbCQ2LCBoc2wkYSwgZXh0ZW5kJDYoQ29sb3IkNiwgewogICAgICBicmlnaHRlcjogZnVuY3Rpb24oaykgewogICAgICAgIGsgPSBrID09IG51bGwgPyBicmlnaHRlciQ2IDogTWF0aC5wb3coYnJpZ2h0ZXIkNiwgayk7CiAgICAgICAgcmV0dXJuIG5ldyBIc2wkNih0aGlzLmgsIHRoaXMucywgdGhpcy5sICogaywgdGhpcy5vcGFjaXR5KTsKICAgICAgfSwKICAgICAgZGFya2VyOiBmdW5jdGlvbihrKSB7CiAgICAgICAgayA9IGsgPT0gbnVsbCA/IGRhcmtlciQ2IDogTWF0aC5wb3coZGFya2VyJDYsIGspOwogICAgICAgIHJldHVybiBuZXcgSHNsJDYodGhpcy5oLCB0aGlzLnMsIHRoaXMubCAqIGssIHRoaXMub3BhY2l0eSk7CiAgICAgIH0sCiAgICAgIHJnYjogZnVuY3Rpb24oKSB7CiAgICAgICAgdmFyIGggPSB0aGlzLmggJSAzNjAgKyAodGhpcy5oIDwgMCkgKiAzNjAsCiAgICAgICAgICAgIHMgPSBpc05hTihoKSB8fCBpc05hTih0aGlzLnMpID8gMCA6IHRoaXMucywKICAgICAgICAgICAgbCA9IHRoaXMubCwKICAgICAgICAgICAgbTIgPSBsICsgKGwgPCAwLjUgPyBsIDogMSAtIGwpICogcywKICAgICAgICAgICAgbTEgPSAyICogbCAtIG0yOwogICAgICAgIHJldHVybiBuZXcgUmdiJDYoCiAgICAgICAgICBoc2wycmdiJDYoaCA+PSAyNDAgPyBoIC0gMjQwIDogaCArIDEyMCwgbTEsIG0yKSwKICAgICAgICAgIGhzbDJyZ2IkNihoLCBtMSwgbTIpLAogICAgICAgICAgaHNsMnJnYiQ2KGggPCAxMjAgPyBoICsgMjQwIDogaCAtIDEyMCwgbTEsIG0yKSwKICAgICAgICAgIHRoaXMub3BhY2l0eQogICAgICAgICk7CiAgICAgIH0sCiAgICAgIGRpc3BsYXlhYmxlOiBmdW5jdGlvbigpIHsKICAgICAgICByZXR1cm4gKDAgPD0gdGhpcy5zICYmIHRoaXMucyA8PSAxIHx8IGlzTmFOKHRoaXMucykpCiAgICAgICAgICAgICYmICgwIDw9IHRoaXMubCAmJiB0aGlzLmwgPD0gMSkKICAgICAgICAgICAgJiYgKDAgPD0gdGhpcy5vcGFjaXR5ICYmIHRoaXMub3BhY2l0eSA8PSAxKTsKICAgICAgfSwKICAgICAgZm9ybWF0SHNsOiBmdW5jdGlvbigpIHsKICAgICAgICB2YXIgYSA9IHRoaXMub3BhY2l0eTsgYSA9IGlzTmFOKGEpID8gMSA6IE1hdGgubWF4KDAsIE1hdGgubWluKDEsIGEpKTsKICAgICAgICByZXR1cm4gKGEgPT09IDEgPyAiaHNsKCIgOiAiaHNsYSgiKQogICAgICAgICAgICArICh0aGlzLmggfHwgMCkgKyAiLCAiCiAgICAgICAgICAgICsgKHRoaXMucyB8fCAwKSAqIDEwMCArICIlLCAiCiAgICAgICAgICAgICsgKHRoaXMubCB8fCAwKSAqIDEwMCArICIlIgogICAgICAgICAgICArIChhID09PSAxID8gIikiIDogIiwgIiArIGEgKyAiKSIpOwogICAgICB9CiAgICB9KSk7CgogICAgLyogRnJvbSBGdkQgMTMuMzcsIENTUyBDb2xvciBNb2R1bGUgTGV2ZWwgMyAqLwogICAgZnVuY3Rpb24gaHNsMnJnYiQ2KGgsIG0xLCBtMikgewogICAgICByZXR1cm4gKGggPCA2MCA/IG0xICsgKG0yIC0gbTEpICogaCAvIDYwCiAgICAgICAgICA6IGggPCAxODAgPyBtMgogICAgICAgICAgOiBoIDwgMjQwID8gbTEgKyAobTIgLSBtMSkgKiAoMjQwIC0gaCkgLyA2MAogICAgICAgICAgOiBtMSkgKiAyNTU7CiAgICB9CgogICAgZnVuY3Rpb24gY29uc3RhbnQkeCh4KSB7CiAgICAgIHJldHVybiBmdW5jdGlvbigpIHsKICAgICAgICByZXR1cm4geDsKICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiBsaW5lYXIkOShhLCBkKSB7CiAgICAgIHJldHVybiBmdW5jdGlvbih0KSB7CiAgICAgICAgcmV0dXJuIGEgKyB0ICogZDsKICAgICAgfTsKICAgIH0KCiAg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gICAgICBzdGFydC5yID0gcih0KTsKICAgICAgICAgIHN0YXJ0LmcgPSBnKHQpOwogICAgICAgICAgc3RhcnQuYiA9IGIodCk7CiAgICAgICAgICBzdGFydC5vcGFjaXR5ID0gb3BhY2l0eSh0KTsKICAgICAgICAgIHJldHVybiBzdGFydCArICIiOwogICAgICAgIH07CiAgICAgIH0KCiAgICAgIHJnYi5nYW1tYSA9IHJnYkdhbW1hOwoKICAgICAgcmV0dXJuIHJnYjsKICAgIH0pKDEpOwoKICAgIGZ1bmN0aW9uIGludGVycG9sYXRlTnVtYmVyJDMoYSwgYikgewogICAgICByZXR1cm4gYSA9ICthLCBiID0gK2IsIGZ1bmN0aW9uKHQpIHsKICAgICAgICByZXR1cm4gYSAqICgxIC0gdCkgKyBiICogdDsKICAgICAgfTsKICAgIH0KCiAgICB2YXIgcmVBJDUgPSAvWy0rXT8oPzpcZCtcLj9cZCp8XC4/XGQrKSg/OltlRV1bLStdP1xkKyk/L2csCiAgICAgICAgcmVCJDUgPSBuZXcgUmVnRXhwKHJlQSQ1LnNvdXJjZSwgImciKTsKCiAgICBmdW5jdGlvbiB6ZXJvJDUoYikgewogICAgICByZXR1cm4gZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuIGI7CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gb25lJDUoYikgewogICAgICByZXR1cm4gZnVuY3Rpb24odCkgewogICAgICAgIHJldHVybiBiKHQpICsgIiI7CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gaW50ZXJwb2xhdGVTdHJpbmckMyhhLCBiKSB7CiAgICAgIHZhciBiaSA9IHJlQSQ1Lmxhc3RJbmRleCA9IHJlQiQ1Lmxhc3RJbmRleCA9IDAsIC8vIHNjYW4gaW5kZXggZm9yIG5leHQgbnVtYmVyIGluIGIKICAgICAgICAgIGFtLCAvLyBjdXJyZW50IG1hdGNoIGluIGEKICAgICAgICAgIGJtLCAvLyBjdXJyZW50IG1hdGNoIGluIGIKICAgICAgICAgIGJzLCAvLyBzdHJpbmcgcHJlY2VkaW5nIGN1cnJlbnQgbnVtYmVyIGluIGIsIGlmIGFueQogICAgICAgICAgaSA9IC0xLCAvLyBpbmRleCBpbiBzCiAgICAgICAgICBzID0gW10sIC8vIHN0cmluZyBjb25zdGFudHMgYW5kIHBsYWNlaG9sZGVycwogICAgICAgICAgcSA9IFtdOyAvLyBudW1iZXIgaW50ZXJwb2xhdG9ycwoKICAgICAgLy8gQ29lcmNlIGlucHV0cyB0byBzdHJpbmdzLgogICAgICBhID0gYSArICIiLCBiID0gYiArICIiOwoKICAgICAgLy8gSW50ZXJwb2xhdGUgcGFpcnMgb2YgbnVtYmVycyBpbiBhICYgYi4KICAgICAgd2hpbGUgKChhbSA9IHJlQSQ1LmV4ZWMoYSkpCiAgICAgICAgICAmJiAoYm0gPSByZUIkNS5leGVjKGIpKSkgewogICAgICAgIGlmICgoYnMgPSBibS5pbmRleCkgPiBiaSkgeyAvLyBhIHN0cmluZyBwcmVjZWRlcyB0aGUgbmV4dCBudW1iZXIgaW4gYgogICAgICAgICAgYnMgPSBiLnNsaWNlKGJpLCBicyk7CiAgICAgICAgICBpZiAoc1tpXSkgc1tpXSArPSBiczsgLy8gY29hbGVzY2Ugd2l0aCBwcmV2aW91cyBzdHJpbmcKICAgICAgICAgIGVsc2Ugc1srK2ldID0gYnM7CiAgICAgICAgfQogICAgICAgIGlmICgoYW0gPSBhbVswXSkgPT09IChibSA9IGJtWzBdKSkgeyAvLyBudW1iZXJzIGluIGEgJiBiIG1hdGNoCiAgICAgICAgICBpZiAoc1tpXSkgc1tpXSArPSBibTsgLy8gY29hbGVzY2Ugd2l0aCBwcmV2aW91cyBzdHJpbmcKICAgICAgICAgIGVsc2Ugc1srK2ldID0gYm07CiAgICAgICAgfSBlbHNlIHsgLy8gaW50ZXJwb2xhdGUgbm9uLW1hdGNoaW5nIG51bWJlcnMKICAgICAgICAgIHNbKytpXSA9IG51bGw7CiAgICAgICAgICBxLnB1c2goe2k6IGksIHg6IGludGVycG9sYXRlTnVtYmVyJDMoYW0sIGJtKX0pOwogICAgICAgIH0KICAgICAgICBiaSA9IHJlQiQ1Lmxhc3RJbmRleDsKICAgICAgfQoKICAgICAgLy8gQWRkIHJlbWFpbnMgb2YgYi4KICAgICAgaWYgKGJpIDwgYi5sZW5ndGgpIHsKICAgICAgICBicyA9IGIuc2xpY2UoYmkpOwogICAgICAgIGlmIChzW2ldKSBzW2ldICs9IGJzOyAvLyBjb2FsZXNjZSB3aXRoIHByZXZpb3VzIHN0cmluZwogICAgICAgIGVsc2Ugc1srK2ldID0gYnM7CiAgICAgIH0KCiAgICAgIC8vIFNwZWNpYWwgb3B0aW1pemF0aW9uIGZvciBvbmx5IGEgc2luZ2xlIG1hdGNoLgogICAgICAvLyBPdGhlcndpc2UsIGludGVycG9sYXRlIGVhY2ggb2YgdGhlIG51bWJlcnMgYW5kIHJlam9pbiB0aGUgc3RyaW5nLgogICAgICByZXR1cm4gcy5sZW5ndGggPCAyID8gKHFbMF0KICAgICAgICAgID8gb25lJDUocVswXS54KQogICAgICAgICAgOiB6ZXJvJDUoYikpCiAgICAgICAgICA6IChiID0gcS5sZW5ndGgsIGZ1bmN0aW9uKHQpIHsKICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMCwgbzsgaSA8IGI7ICsraSkgc1sobyA9IHFbaV0pLmldID0gby54KHQpOwogICAgICAgICAgICAgIHJldHVybiBzLmpvaW4oIiIpOwogICAgICAgICAgICB9KTsKICAgIH0KCiAgICB2YXIgZGVncmVlcyQ2ID0gMTgwIC8gTWF0aC5QSTsKCiAgICB2YXIgaWRlbnRpdHkkbCA9IHsKICAgICAgdHJhbnNsYXRlWDogMCwKICAgICAgdHJhbnNsYXRlWTogMCwKICAgICAgcm90YXRlOiAwLAogICAgICBza2V3WDogMCwKICAgICAgc2NhbGVYOiAxLAogICAgICBzY2FsZVk6IDEKICAgIH07CgogICAgZnVuY3Rpb24gZGVjb21wb3NlJDQoYSwgYiwgY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IGRlZ1BhcmVuKTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIHNrZXdYKGEsIGIsIHMsIHEpIHsKICAgICAgICBpZiAoYSAhPT0gYikgewogICAgICAgICAgcS5wdXNoKHtpOiBzLnB1c2gocG9wKHMpICsgInNrZXdYKCIsIG51bGwsIGRlZ1BhcmVuKSAtIDIsIHg6IGludGVycG9sYXRlTnVtYmVyJDMoYSwgYil9KTsKICAgICAgICB9IGVsc2UgaWYgKGIpIHsKICAgICAgICAgIHMucHVzaChwb3AocykgKyAic2tld1goIiArIGIgKyBkZWdQYXJlbik7CiAgICAgICAgfQogICAgICB9CgogICAgICBmdW5jdGlvbiBzY2FsZSh4YSwgeWEsIHhiLCB5YiwgcywgcSkgewogICAgICAgIGlmICh4YSAhPT0geGIgfHwgeWEgIT09IHliKSB7CiAgICAgICAgICB2YXIgaSA9IHMucHVzaChwb3AocykgKyAic2NhbGUoIiwgbnVsbCwgIiwiLCBudWxsLCAiKSIpOwogICAgICAgICAgcS5wdXNoKHtpOiBpIC0gNCwgeDogaW50ZXJwb2xhdGVOdW1iZXIkMyh4YSwgeGIpfSwge2k6IGkgLSAyLCB4OiBpbnRlcnBvbGF0ZU51bWJlciQzKHlhLCB5Yil9KTsKICAgICAgICB9IGVsc2UgaWYgKHhiICE9PSAxIHx8IHliICE9PSAxKSB7CiAgICAgICAgICBzLnB1c2gocG9wKHMpICsgInNjYWxlKCIgKyB4YiArICIsIiArIHliICsgIikiKTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIHJldHVybiBmdW5jdGlvbihhLCBiKSB7CiAgICAgICAgdmFyIHMgPSBbXSwgLy8gc3RyaW5nIGNvbnN0YW50cyBhbmQgcGxhY2Vob2xkZXJzCiAgICAgICAgICAgIHEgPSBbXTsgLy8gbnVtYmVyIGludGVycG9sYXRvcnMKICAgICAgICBhID0gcGFyc2UoYSksIGIgPSBwYXJzZShiKTsKICAgICAgICB0cmFuc2xhdGUoYS50cmFu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gfQoKICAgIGZ1bmN0aW9uIHRhbmgkMih4KSB7CiAgICAgIHJldHVybiAoKHggPSBNYXRoLmV4cCgyICogeCkpIC0gMSkgLyAoeCArIDEpOwogICAgfQoKICAgIC8vIHAwID0gW3V4MCwgdXkwLCB3MF0KICAgIC8vIHAxID0gW3V4MSwgdXkxLCB3MV0KICAgIGZ1bmN0aW9uIGludGVycG9sYXRlWm9vbSQxKHAwLCBwMSkgewogICAgICB2YXIgdXgwID0gcDBbMF0sIHV5MCA9IHAwWzFdLCB3MCA9IHAwWzJdLAogICAgICAgICAgdXgxID0gcDFbMF0sIHV5MSA9IHAxWzFdLCB3MSA9IHAxWzJdLAogICAgICAgICAgZHggPSB1eDEgLSB1eDAsCiAgICAgICAgICBkeSA9IHV5MSAtIHV5MCwKICAgICAgICAgIGQyID0gZHggKiBkeCArIGR5ICogZHksCiAgICAgICAgICBpLAogICAgICAgICAgUzsKCiAgICAgIC8vIFNwZWNpYWwgY2FzZSBmb3IgdTAg4omFIHUxLgogICAgICBpZiAoZDIgPCBlcHNpbG9uMiQ2KSB7CiAgICAgICAgUyA9IE1hdGgubG9nKHcxIC8gdzApIC8gcmhvJDI7CiAgICAgICAgaSA9IGZ1bmN0aW9uKHQpIHsKICAgICAgICAgIHJldHVybiBbCiAgICAgICAgICAgIHV4MCArIHQgKiBkeCwKICAgICAgICAgICAgdXkwICsgdCAqIGR5LAogICAgICAgICAgICB3MCAqIE1hdGguZXhwKHJobyQyICogdCAqIFMpCiAgICAgICAgICBdOwogICAgICAgIH07CiAgICAgIH0KCiAgICAgIC8vIEdlbmVyYWwgY2FzZS4KICAgICAgZWxzZSB7CiAgICAgICAgdmFyIGQxID0gTWF0aC5zcXJ0KGQyKSwKICAgICAgICAgICAgYjAgPSAodzEgKiB3MSAtIHcwICogdzAgKyByaG80JDIgKiBkMikgLyAoMiAqIHcwICogcmhvMiQyICogZDEpLAogICAgICAgICAgICBiMSA9ICh3MSAqIHcxIC0gdzAgKiB3MCAtIHJobzQkMiAqIGQyKSAvICgyICogdzEgKiByaG8yJDIgKiBkMSksCiAgICAgICAgICAgIHIwID0gTWF0aC5sb2coTWF0aC5zcXJ0KGIwICogYjAgKyAxKSAtIGIwKSwKICAgICAgICAgICAgcjEgPSBNYXRoLmxvZyhNYXRoLnNxcnQoYjEgKiBiMSArIDEpIC0gYjEpOwogICAgICAgIFMgPSAocjEgLSByMCkgLyByaG8kMjsKICAgICAgICBpID0gZnVuY3Rpb24odCkgewogICAgICAgICAgdmFyIHMgPSB0ICogUywKICAgICAgICAgICAgICBjb3NocjAgPSBjb3NoJDIocjApLAogICAgICAgICAgICAgIHUgPSB3MCAvIChyaG8yJDIgKiBkMSkgKiAoY29zaHIwICogdGFuaCQyKHJobyQyICogcyArIHIwKSAtIHNpbmgkMihyMCkpOwogICAgICAgICAgcmV0dXJuIFsKICAgICAgICAgICAgdXgwICsgdSAqIGR4LAogICAgICAgICAgICB1eTAgKyB1ICogZHksCiAgICAgICAgICAgIHcwICogY29zaHIwIC8gY29zaCQyKHJobyQyICogcyArIHIwKQogICAgICAgICAgXTsKICAgICAgICB9OwogICAgICB9CgogICAgICBpLmR1cmF0aW9uID0gUyAqIDEwMDA7CgogICAgICByZXR1cm4gaTsKICAgIH0KCiAgICB2YXIgZnJhbWUkNSA9IDAsIC8vIGlzIGFuIGFuaW1hdGlvbiBmcmFtZSBwZW5kaW5nPwogICAgICAgIHRpbWVvdXQkOSA9IDAsIC8vIGlzIGEgdGltZW91dCBwZW5kaW5nPwogICAgICAgIGludGVydmFsJDcgPSAwLCAvLyBhcmUgYW55IHRpbWVycyBhY3RpdmU/CiAgICAgICAgcG9rZURlbGF5JDUgPSAxMDAwLCAvLyBob3cgZnJlcXVlbnRseSB3ZSBjaGVjayBmb3IgY2xvY2sgc2tldwogICAgICAgIHRhc2tIZWFkJDUsCiAgICAgICAgdGFza1RhaWwkNSwKICAgICAgICBjbG9ja0xhc3QkNSA9IDAsCiAgICAgICAgY2xvY2tOb3ckNSA9IDA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ICsgZGVsYXkpOwogICAgICB9LCBkZWxheSwgdGltZSk7CiAgICAgIHJldHVybiB0OwogICAgfQoKICAgIHZhciBlbXB0eU9uJDMgPSBkaXNwYXRjaCQ2KCJzdGFydCIsICJlbmQiLCAiY2FuY2VsIiwgImludGVycnVwdCIpOwogICAgdmFyIGVtcHR5VHdlZW4kMyA9IFtdOwoKICAgIHZhciBDUkVBVEVEJDMgPSAwOwogICAgdmFyIFNDSEVEVUxFRCQzID0gMTsKICAgIHZhciBTVEFSVElORyQzID0gMjsKICAgIHZhciBTVEFSVEVEJDMgPSAzOwogICAgdmFyIFJVTk5JTkckMyA9IDQ7CiAgICB2YXIgRU5ESU5HJDMgPSA1OwogICAgdmFyIEVOREVEJDMgPSA2OwoKICAgIGZ1bmN0aW9uIHNjaGVkdWxlJDQobm9kZSwgbmFtZSwgaWQsIGluZGV4LCBncm91cCwgdGltaW5nKSB7CiAgICAgIHZhciBzY2hlZHVsZXMgPSBub2RlLl9fdHJhbnNpdGlvbjsKICAgICAgaWYgKCFzY2hlZHVsZXMpIG5vZGUuX190cmFuc2l0aW9uID0ge307CiAgICAgIGVsc2UgaWYgKGlkIGluIHNjaGVkdWxlcykgcmV0dXJuOwogICAgICBjcmVhdGUkNShub2RlLCBpZCwgewogICAgICAgIG5hbWU6IG5hbWUsCiAgICAgICAgaW5kZXg6IGluZGV4LCAvLyBGb3IgY29udGV4dCBkdXJpbmcgY2FsbGJhY2suCiAgICAgICAgZ3JvdXA6IGdyb3VwLCAvLyBGb3IgY29udGV4dCBkdXJpbmcgY2FsbGJhY2suCiAgICAgICAgb246IGVtcHR5T24kMywKICAgICAgICB0d2VlbjogZW1wdHlUd2VlbiQzLAogICAgICAgIHRpbWU6IHRpbWluZy50aW1lLAogICAgICAgIGRlbGF5OiB0aW1pbmcuZGVsYXksCiAgICAgICAgZHVyYXRpb246IHRpbWluZy5kdXJhdGlvbiwKICAgICAgICBlYXNlOiB0aW1pbmcuZWFzZSwKICAgICAgICB0aW1lc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YW5zaXRpb24gdW50aWwgdGhhdCB0cmFuc2l0aW9uIGhhcyBhCiAgICAgICAgICAvLyBjaGFuY2UgdG8gdGljayAoYW5kIHBvc3NpYmx5IGVuZCk7IHNlZSBkMy9kMy10cmFuc2l0aW9uIzU0IQogICAgICAgICAgaWYgKG8uc3RhdGUgPT09IFNUQVJURUQkMykgcmV0dXJuIHRpbWVvdXQkYShzdGFydCk7CgogICAgICAgICAgLy8gSW50ZXJydXB0IHRoZSBhY3RpdmUgdHJhbnNpdGlvbiwgaWYgYW55LgogICAgICAgICAgaWYgKG8uc3RhdGUgPT09IFJVTk5JTkckMykgewogICAgICAgICAgICBvLnN0YXRlID0gRU5ERUQkMzsKICAgICAgICAgICAgby50aW1lci5zdG9wKCk7CiAgICAgICAgICAgIG8ub24uY2FsbCgiaW50ZXJydXB0Iiwgbm9kZSwgbm9kZS5fX2RhdGFfXywgby5pbmRleCwgby5ncm91cCk7CiAgICAgICAgICAgIGRlbGV0ZSBzY2hlZHVsZXNbaV07CiAgICAgICAgICB9CgogICAgICAgICAgLy8gQ2FuY2VsIGFueSBwcmUtZW1wdGVkIHRyYW5zaXRpb25zLgogICAgICAgICAgZWxzZSBpZiAoK2kgPCBpZCkgewogICAgICAgICAgICBvLnN0YXRlID0gRU5ERUQkMzsKICAgICAgICAgICAgby50aW1lci5zdG9wKCk7CiAgICAgICAgICAgIG8ub24uY2FsbCgiY2FuY2VsIiwgbm9kZSwgbm9kZS5fX2RhdGFfXywgby5pbmRleCwgby5ncm91cCk7CiAgICAgICAgICAgIGRlbGV0ZSBzY2hlZHVsZXNbaV07CiAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICAvLyBEZWZlciB0aGUgZmlyc3QgdGljayB0byBlbmQgb2YgdGhlIGN1cnJlbnQgZnJhbWU7IHNlZSBkMy9kMyMxNTc2LgogICAgICAgIC8vIE5vdGUgdGhlIHRyYW5zaXRpb24gbWF5IGJlIGNhbmNlbGVkIGFmdGVyIHN0YXJ0IGFuZ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W5ndGgpOwogICAgICAgIGZvciAoaSA9IDAsIGogPSAtMTsgaSA8IG47ICsraSkgewogICAgICAgICAgaWYgKG8gPSBzZWxmLnR3ZWVuW2ldLnZhbHVlLmNhbGwobm9kZSwgbm9kZS5fX2RhdGFfXywgc2VsZi5pbmRleCwgc2VsZi5ncm91cCkpIHsKICAgICAgICAgICAgdHdlZW5bKytqXSA9IG87CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHR3ZWVuLmxlbmd0aCA9IGogKyAxOwogICAgICB9CgogICAgICBmdW5jdGlvbiB0aWNrKGVsYXBzZWQpIHsKICAgICAgICB2YXIgdCA9IGVsYXBzZWQgPCBzZWxmLmR1cmF0aW9uID8gc2VsZi5lYXNlLmNhbGwobnVsbCwgZWxhcHNlZCAvIHNlbGYuZHVyYXRpb24pIDogKHNlbGYudGltZXIucmVzdGFydChzdG9wKSwgc2VsZi5zdGF0ZSA9IEVORElORyQzLCAxKSwKICAgICAgICAgICAgaSA9IC0xLAogICAgICAgICAgICBuID0gdHdlZW4ubGVuZ3RoOwoKICAgICAgICB3aGlsZSAoKytpIDwgbikgewogICAgICAgICAgdHdlZW5baV0uY2FsbChub2RlLCB0KTsKICAgICAgICB9CgogICAgICAgIC8vIERpc3BhdGNoIHRoZSBlbmQgZXZlbnQuCiAgICAgICAgaWYgKHNlbGYuc3RhdGUgPT09IEVORElORyQzKSB7CiAgICAgICAgICBzZWxmLm9uLmNhbGwoImVuZCIsIG5vZGUsIG5vZGUuX19kYXRhX18sIHNlbGYuaW5kZXgsIHNlbGYuZ3JvdXApOwogICAgICAgICAgc3RvcCgpOwogICAgICAgIH0KICAgICAgfQoKICAgICAgZnVuY3Rpb24gc3RvcCgpIHsKICAgICAgICBzZWxmLnN0YXRlID0gRU5ERUQkMzsKICAgICAgICBzZWxmLnRpbWVyLnN0b3AoKTsKICAgICAgICBkZWxldGUgc2NoZWR1bGVzW2lkXTsKICAgICAgICBmb3IgKHZhciBpIGluIHNjaGVkdWxlcyk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ogICAgICB2YXIgc3RyaW5nMDAsCiAgICAgICAgICBzdHJpbmcxID0gdmFsdWUxICsgIiIsCiAgICAgICAgICBpbnRlcnBvbGF0ZTA7CiAgICAgIHJldHVybiBmdW5jdGlvbigpIHsKICAgICAgICB2YXIgc3RyaW5nMCA9IHRoaXMuZ2V0QXR0cmlidXRlTlMoZnVsbG5hbWUuc3BhY2UsIGZ1bGxuYW1lLmxvY2FsKTsKICAgICAgICByZXR1cm4gc3RyaW5nMCA9PT0gc3RyaW5nMSA/IG51bGwKICAgICAgICAgICAgOiBzdHJpbmcwID09PSBzdHJpbmcwMCA/IGludGVycG9sYXRlMAogICAgICAgICAgICA6IGludGVycG9sYXRlMCA9IGludGVycG9sYXRlKHN0cmluZzAwID0gc3RyaW5nMCwgdmFsdWUxKTsKICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiBhdHRyRnVuY3Rpb24kOShuYW1lLCBpbnRlcnBvbGF0ZSwgdmFsdWUpIHsKICAgICAgdmFyIHN0cmluZzAwLAogICAgICAgICAgc3RyaW5nMTAsCiAgICAgICAgICBpbnRlcnBvbGF0ZTA7CiAgICAgIHJldHVybiBmdW5jdGlvbigpIHsKICAgICAgICB2YXIgc3RyaW5nMCwgdmFsdWUxID0gdmFsdWUodGhpcyksIHN0cmluZzE7CiAgICAgICAgaWYgKHZhbHVlMSA9PSBudWxsKSByZXR1cm4gdm9pZCB0aGlzLnJlbW92ZUF0dHJpYnV0ZShuYW1lKTsKICAgICAgICBzdHJpbmcwID0gdGhpcy5nZXRBdHRyaWJ1dGUobmFtZSk7CiAgICAgICAgc3RyaW5nMSA9IHZhbHVlMSArICIiOwogICAgICAgIHJldHVybiBzdHJpbmcwID09PSBzdHJpbmcxID8gbnVsbAogICAgICAgICAgICA6IHN0cmluZzAgPT09IHN0cmluZzAwICYmIHN0cmluZzEgPT09IHN0cmluZzEwID8gaW50ZXJwb2xhdGUwCiAgICAgICAgICAgIDogKHN0cmluZzEwID0gc3RyaW5nMSwg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0aW9uX3RyYW5zaXRpb24kMygpIHsKICAgICAgdmFyIG5hbWUgPSB0aGlzLl9uYW1lLAogICAgICAgICAgaWQwID0gdGhpcy5faWQsCiAgICAgICAgICBpZDEgPSBuZXdJZCQzKCk7CgogICAgICBmb3IgKHZhciBncm91cHMgPSB0aGlzLl9ncm91cHMsIG0gPSBncm91cHMubGVuZ3RoLCBqID0gMDsgaiA8IG07ICsraikgewogICAgICAgIGZvciAodmFyIGdyb3VwID0gZ3JvdXBzW2pdLCBuID0gZ3JvdXAubGVuZ3RoLCBub2RlLCBpID0gMDsgaSA8IG47ICsraSkgewogICAgICAgICAgaWYgKG5vZGUgPSBncm91cFtpXSkgewogICAgICAgICAgICB2YXIgaW5oZXJpdCA9IGdldCRiKG5vZGUsIGlkMCk7CiAgICAgICAgICAgIHNjaGVkdWxlJDQobm9kZSwgbmFtZSwgaWQxLCBpLCBncm91cCwgewogICAgICAgICAgICAgIHRpbWU6IGluaGVyaXQudGltZSArIGluaGVyaXQuZGVsYXkgKyBpbmhlcml0LmR1cmF0aW9uLAogICAgICAgICAgICAgIGRlbGF5OiAwLAogICAgICAgICAgICAgIGR1cmF0aW9uOiBpbmhlcml0LmR1cmF0aW9uLAogICAgICAgICAgICAgIGVhc2U6IGluaGVyaXQuZWFzZQogICAgICAgICAgICB9KTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KCiAgICAgIHJldHVybiBuZXcgVHJhbnNpdGlvbiQzKGdyb3VwcywgdGhpcy5fcGFyZW50cywgbmFtZSwgaWQxKTsKICAgIH0KCiAgICBmdW5jdGlvbiB0cmFuc2l0aW9uX2VuZCQyKCkgewogICAgICB2YXIgb24wLCBvbjEsIHRoYXQgPSB0aGlzLCBpZCA9IHRoYXQuX2lkLCBzaXplID0gdGhhdC5zaXplKCk7CiAgICAgIHJldHVybiBuZXcgUHJvbWlzZShmdW5jdGlvbihyZXNvbHZlLCByZWplY3QpIHsKICAgICAgICB2YXIgY2FuY2VsID0ge3ZhbH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ICAgICAgdGltaW5nOwoKICAgICAgaWYgKG5hbWUgaW5zdGFuY2VvZiBUcmFuc2l0aW9uJDMpIHsKICAgICAgICBpZCA9IG5hbWUuX2lkLCBuYW1lID0gbmFtZS5fbmFtZTsKICAgICAgfSBlbHNlIHsKICAgICAgICBpZCA9IG5ld0lkJDMoKSwgKHRpbWluZyA9IGRlZmF1bHRUaW1pbmckMykudGltZSA9IG5vdyQ1KCksIG5hbWUgPSBuYW1lID09IG51bGwgPyBudWxsIDogbmFtZSArICIiOwogICAgICB9CgogICAgICBmb3IgKHZhciBncm91cHMgPSB0aGlzLl9ncm91cHMsIG0gPSBncm91cHMubGVuZ3RoLCBqID0gMDsgaiA8IG07ICsraikgewogICAgICAgIGZvciAodmFyIGdyb3VwID0gZ3JvdXBzW2pdLCBuID0gZ3JvdXAubGVuZ3RoLCBub2RlLCBpID0gMDsgaSA8IG47ICsraSkgewogICAgICAgICAgaWYgKG5vZGUgPSBncm91cFtpXSkgewogICAgICAgICAgICBzY2hlZHVsZSQ0KG5vZGUsIG5hbWUsIGlkLCBpLCBncm91cCwgdGltaW5nIHx8IGluaGVyaXQkMyhub2RlLCBpZCkpOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQoKICAgICAgcmV0dXJuIG5ldyBUcmFuc2l0aW9uJDMoZ3JvdXBzLCB0aGlzLl9wYXJlbnRzLCBuYW1lLCBpZCk7CiAgICB9CgogICAgc2VsZWN0aW9uJDUucHJvdG90eXBlLmludGVycnVwdCA9IHNlbGVjdGlvbl9pbnRlcnJ1cHQkMzsKICAgIHNlbGVjdGlvbiQ1LnByb3RvdHlwZS50cmFuc2l0aW9uID0gc2VsZWN0aW9uX3RyYW5zaXRpb24kMzsKCiAgICBmdW5jdGlvbiBjb25zdGFudCR5KHgpIHsKICAgICAgcmV0dXJuIGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiB4OwogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIFpvb21FdmVudCQxKHRhcmdldCwgdHlwZSwgdHJhbnNmb3JtKSB7CiAgICAgIHRoaXMudGFyZ2V0ID0gdGFyZ2V0OwogICAgICB0aGlzLnR5cGUgPSB0eXBlOwogICAgICB0aGlzLnRyYW5zZm9ybSA9IHRyYW5zZm9ybTsKICAgIH0KCiAgICBmdW5jdGlvbiBUcmFuc2Zvcm0kMShrLCB4LCB5KSB7CiAgICAgIHRoaXMuayA9IGs7CiAgICAgIHRoaXMueCA9IHg7CiAgICAgIHRoaXMueSA9IHk7CiAgICB9CgogICAgVHJhbnNmb3JtJDEucHJvdG90eXBlID0gewogICAgICBjb25zdHJ1Y3RvcjogVHJhbnNmb3JtJDEsCiAgICAgIHNjYWxlOiBmdW5jdGlvbihrKSB7CiAgICAgICAgcmV0dXJuIGsgPT09IDEgPyB0aGlzIDogbmV3IFRyYW5zZm9ybSQxKHRoaXMuayAqIGssIHRoaXMueCwgdGhpcy55KTsKICAgICAgfSwKICAgICAgdHJhbnNsYXRlOiBmdW5jdGlvbih4LCB5KSB7CiAgICAgICAgcmV0dXJuIHggPT09IDAgJiB5ID09PSAwID8gdGhpcyA6IG5ldyBUcmFuc2Zvcm0kMSh0aGlzLmssIHRoaXMueCArIHRoaXMuayAqIHgsIHRoaXMueSArIHRoaXMuayAqIHkpOwogICAgICB9LAogICAgICBhcHBseTogZnVuY3Rpb24ocG9pbnQpIHsKICAgICAgICByZXR1cm4gW3BvaW50WzBdICogdGhpcy5rICsgdGhpcy54LCBwb2ludFsxXSAqIHRoaXMuayArIHRoaXMueV07CiAgICAgIH0sCiAgICAgIGFwcGx5WDogZnVuY3Rpb24oeCkgewogICAgICAgIHJldHVybiB4ICogdGhpcy5rICsgdGhpcy54OwogICAgICB9LAogICAgICBhcHBseVk6IGZ1bmN0aW9uKHkpIHsKICAgICAgICByZXR1cm4geSAqIHRoaXMuayArIHRoaXMueTsKICAgICAgfSwKICAgICAgaW52ZXJ0OiBmdW5jdGlvbihsb2NhdGlvbikgewogICAgICAgIHJldHVybiBbKG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ICAgICAgICAgc2NhbGVFeHRlbnQgPSBbMCwgSW5maW5pdHldLAogICAgICAgICAgdHJhbnNsYXRlRXh0ZW50ID0gW1stSW5maW5pdHksIC1JbmZpbml0eV0sIFtJbmZpbml0eSwgSW5maW5pdHldXSwKICAgICAgICAgIGR1cmF0aW9uID0gMjUwLAogICAgICAgICAgaW50ZXJwb2xhdGUgPSBpbnRlcnBvbGF0ZVpvb20kMSwKICAgICAgICAgIGdlc3R1cmVzID0gW10sCiAgICAgICAgICBsaXN0ZW5lcnMgPSBkaXNwYXRjaCQ2KCJzdGFydCIsICJ6b29tIiwgImVuZCIpLAogICAgICAgICAgdG91Y2hzdGFydGluZywKICAgICAgICAgIHRvdWNoZW5kaW5nLAogICAgICAgICAgdG91Y2hEZWxheSA9IDUwMCwKICAgICAgICAgIHdoZWVsRGVsYXkgPSAxNTAsCiAgICAgICAgICBjbGlja0Rpc3RhbmNlMiA9IDA7CgogICAgICBmdW5jdGlvbiB6b29tKHNlbGVjdGlvbikgewogICAgICAgIHNlbGVjdGlvbgogICAgICAgICAgICAucHJvcGVydHkoIl9fem9vbSIsIGRlZmF1bHRUcmFuc2Zvcm0kMSkKICAgICAgICAgICAgLm9uKCJ3aGVlbC56b29tIiwgd2hlZWxlZCkKICAgICAgICAgICAgLm9uKCJtb3VzZWRvd24uem9vbSIsIG1vdXNlZG93bmVkKQogICAgICAgICAgICAub24oImRibGNsaWNrLnpvb20iLCBkYmxjbGlja2VkKQogICAgICAgICAgLmZpbHRlcih0b3VjaGFibGUpCiAgICAgICAgICAgIC5vbigidG91Y2hzdGFydC56b29tIiwgdG91Y2hzdGFydGVkKQogICAgICAgICAgICAub24oInRvdWNobW92ZS56b29tIiwgdG91Y2htb3ZlZCkKICAgICAgICAgICAgLm9uKCJ0b3VjaGVuZC56b29tIHRvdWNoY2FuY2VsLnpvb20iLCB0b3VjaGVuZGVkKQogICAgICAgICAgICAuc3R5bGUoInRvdWNoLWFjdGlvbiIsICJub25lIikKICAgICAgIC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tZW50cykgOiBrOwogICAgICAgICAgcmV0dXJuIGswICogazE7CiAgICAgICAgfSk7CiAgICAgIH07CgogICAgICB6b29tLnNjYWxlVG8gPSBmdW5jdGlvbihzZWxlY3Rpb24sIGspIHsKICAgICAgICB6b29tLnRyYW5zZm9ybShzZWxlY3Rpb24sIGZ1bmN0aW9uKCkgewogICAgICAgICAgdmFyIGUgPSBleHRlbnQuYXBwbHkodGhpcywgYXJndW1lbnRzKSwKICAgICAgICAgICAgICB0MCA9IHRoaXMuX196b29tLAogICAgICAgICAgICAgIHAwID0gY2VudHJvaWQoZSksCiAgICAgICAgICAgICAgcDEgPSB0MC5pbnZlcnQocDApLAogICAgICAgICAgICAgIGsxID0gdHlwZW9mIGsgPT09ICJmdW5jdGlvbiIgPyBrLmFwcGx5KHRoaXMsIGFyZ3VtZW50cykgOiBrOwogICAgICAgICAgcmV0dXJuIGNvbnN0cmFpbih0cmFuc2xhdGUoc2NhbGUodDAsIGsxKSwgcDAsIHAxKSwgZSwgdHJhbnNsYXRlRXh0ZW50KTsKICAgICAgICB9KTsKICAgICAgfTsKCiAgICAgIHpvb20udHJhbnNsYXRlQnkgPSBmdW5jdGlvbihzZWxlY3Rpb24sIHgsIHkpIHsKICAgICAgICB6b29tLnRyYW5zZm9ybShzZWxlY3Rpb24sIGZ1bmN0aW9uKCkgewogICAgICAgICAgcmV0dXJuIGNvbnN0cmFpbih0aGlzLl9fem9vbS50cmFuc2xhdGUoCiAgICAgICAgICAgIHR5cGVvZiB4ID09PSAiZnVuY3Rpb24iID8geC5hcHBseSh0aGlzLCBhcmd1bWVudHMpIDogeCwKICAgICAgICAgICAgdHlwZW9mIHkgPT09ICJmdW5jdGlvbiIgPyB5LmFwcGx5KHRoaXMsIGFyZ3VtZW50cykgOiB5CiAgICAgICAgICApLCBleHRlbnQuYXBwbHkodGhpcywgYXJndW1lbnRzKSwgdHJhbnNsYXRlRXh0ZW50KTsKICAgICAgICB9KTsKICAgICAgfTsKCiAgICAgIHpvb20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JtLnggJiYgeSA9PT0gdHJhbnNmb3JtLnkgPyB0cmFuc2Zvcm0gOiBuZXcgVHJhbnNmb3JtJDEodHJhbnNmb3JtLmssIHgsIHkpOwogICAgICB9CgogICAgICBmdW5jdGlvbiBjZW50cm9pZChleHRlbnQpIHsKICAgICAgICByZXR1cm4gWygrZXh0ZW50WzBdWzBdICsgK2V4dGVudFsxXVswXSkgLyAyLCAoK2V4dGVudFswXVsxXSArICtleHRlbnRbMV1bMV0pIC8gMl07CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIHNjaGVkdWxlKHRyYW5zaXRpb24sIHRyYW5zZm9ybSwgY2VudGVyKSB7CiAgICAgICAgdHJhbnNpdGlvbgogICAgICAgICAgICAub24oInN0YXJ0Lnpvb20iLCBmdW5jdGlvbigpIHsgZ2VzdHVyZSh0aGlzLCBhcmd1bWVudHMpLnN0YXJ0KCk7IH0pCiAgICAgICAgICAgIC5vbigiaW50ZXJydXB0Lnpvb20gZW5kLnpvb20iLCBmdW5jdGlvbigpIHsgZ2VzdHVyZSh0aGlzLCBhcmd1bWVudHMpLmVuZCgpOyB9KQogICAgICAgICAgICAudHdlZW4oInpvb20iLCBmdW5jdGlvbigpIHsKICAgICAgICAgICAgICB2YXIgdGhhdCA9IHRoaXMsCiAgICAgICAgICAgICAgICAgIGFyZ3MgPSBhcmd1bWVudHMsCiAgICAgICAgICAgICAgICAgIGcgPSBnZXN0dXJlKHRoYXQsIGFyZ3MpLAogICAgICAgICAgICAgICAgICBlID0gZXh0ZW50LmFwcGx5KHRoYXQsIGFyZ3MpLAogICAgICAgICAgICAgICAgICBwID0gY2VudGVyIHx8IGNlbnRyb2lkKGUpLAogICAgICAgICAgICAgICAgICB3ID0gTWF0aC5tYXgoZVsxXVswXSAtIGVbMF1bMF0sIGVbMV1bMV0gLSBlWzBdWzFdKSwKICAgICAgICAgICAgICAgICAgYSA9IHRoYXQuX196b29tLAogICAgICAgICAgICAgICAgICBiID0gdHlwZW9mIHRyYW5zZm9ybSA9PT0gImZ1bmN0aW9uIiA/IHRyYW5zZm9ybS5hcHBseSh0aGF0LCBhcmdzKSA6IHRyYW5zZm9ybSwKICAgICAgICAgICAgICAgICAgaSA9IGludGVycG9sYXRlKGEuaW52ZXJ0KHApLmNvbmNhdCh3IC8gYS5rKSwgYi5pbnZlcnQocCkuY29uY2F0KHcgLyBiLmspKTsKICAgICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24odCkgewogICAgICAgICAgICAgICAgaWYgKHQgPT09IDEpIHQgPSBiOyAvLyBBdm9pZCByb3VuZGluZyBlcnJvciBvbiBlbmQuCiAgICAgICAgICAgICAgICBlbHNlIHsgdmFyIGwgPSBpKHQpLCBrID0gdyAvIGxbMl07IHQgPSBuZXcgVHJhbnNmb3JtJDEoaywgcFswXSAtIGxbMF0gKiBrLCBwWzFdIC0gbFsxXSAqIGspOyB9CiAgICAgICAgICAgICAgICBnLnpvb20obnVsbCwgdCk7CiAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgfSk7CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIGdlc3R1cmUodGhhdCwgYXJncykgewogICAgICAgIGZvciAodmFyIGkgPSAwLCBuID0gZ2VzdHVyZXMubGVuZ3RoLCBnOyBpIDwgbjsgKytpKSB7CiAgICAgICAgICBpZiAoKGcgPSBnZXN0dXJlc1tpXSkudGhhdCA9PT0gdGhhdCkgewogICAgICAgICAgICByZXR1cm4gZzsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIG5ldyBHZXN0dXJlKHRoYXQsIGFyZ3MpOwogICAgICB9CgogICAgICBmdW5jdGlvbiBHZXN0dXJlKHRoYXQsIGFyZ3MpIHsKICAgICAgICB0aGlzLnRoYXQgPSB0aGF0OwogICAgICAgIHRoaXMuYXJncyA9IGFyZ3M7CiAgICAgICAgdGhpcy5pbmRleCA9IC0xOwogICAgICAgIHRoaXMuYWN0aXZlID0gMDsKICAgICAgICB0aGlzLmV4dGVudCA9IGV4dGVudC5hcHBseSh0aGF0LCBhcmdzKTsKICAgICAgfQoKICAgICAgR2VzdHVyZS5wcm90b3R5cGUgPSB7CiAgICAgICAgc3RhcnQ6IGZ1bmN0aW9uKCkgewogICAgICAgICAgaWYgKCsrdGhpcy5hY3RpdmUgPT09IDEpIHsKICAgICAgICAgICAgdGhpcy5pbmRleCA9IGdlc3R1cmVzLnB1c2godGhpcykgLSAxOwogICAgICAgICAgICB0aGlzLmVtaXQoInN0YXJ0Iik7CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9LAogICAgICAgIHpvb206IGZ1bmN0aW9uKGtleSwgdHJhbnNmb3JtKSB7CiAgICAgICAgICBpZiAodGhpcy5tb3VzZSAmJiBrZXkgIT09ICJtb3VzZSIpIHRoaXMubW91c2VbMV0gPSB0cmFuc2Zvcm0uaW52ZXJ0KHRoaXMubW91c2VbMF0pOwogICAgICAgICAgaWYgKHRoaXMudG91Y2gwICYmIGtleSAhPT0gInRvdWNoIikgdGhpcy50b3VjaDBbMV0gPSB0cmFuc2Zvcm0uaW52ZXJ0KHRoaXMudG91Y2gwWzBdKTsKICAgICAgICAgIGlmICh0aGlzLnRvdWNoMSAmJiBrZXkgIT09ICJ0b3VjaCIpIHRoaXMudG91Y2gxWzFdID0gdHJhbnNmb3JtLmludmVydCh0aGlzLnRvdWNoMVswXSk7CiAgICAgICAgICB0aGlzLnRoYXQuX196b29tID0gdHJhbnNmb3JtOwogICAgICAgICAgdGhpcy5lbWl0KCJ6b29tIik7CiAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9LAogICAgICAgIGVuZDogZnVuY3Rpb24oKSB7CiAgICAgICAgICBpZiAoLS10aGlzLmFjdGl2ZSA9PT0gMCkgewogICAgICAgICAgICBnZXN0dXJlcy5zcGxpY2UodGhpcy5pbmRleCwgMSk7CiAgICAgICAgICAgIHRoaXMuaW5kZXggPSAtMTsKICAgICAgICAgICAgdGhpcy5lbWl0KCJlbmQiKTsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH0sCiAgICAgICAgZW1pdDogZnVuY3Rpb24odHlwZSkgewogICAgICAgICAgY3VzdG9tRXZlbnQkNChuZXcgWm9vbUV2ZW50JDEoem9vbSwgdHlwZSwgdGhpcy50aGF0Ll9fem9vbSksIGxpc3RlbmVycy5hcHBseSwgbGlzdGVuZXJzLCBbdHlwZSwgdGhpcy50aGF0LCB0aGlzLmFyZ3NdKTsKICAgICAgICB9CiAgICAgIH07CgogICAgICBmdW5jdGlvbiB3aGVlbGVkKCkgewogICAgICAgIGlmICghZmlsdGVyLmFwcGx5KHRoaXMsIGFyZ3VtZW50cykpIHJldHVybjsKICAgICAgICB2YXIgZyA9IGdlc3R1cmUodGhpcywgYXJndW1lbnRzKSwKICAgICAgICAgICAgdCA9IHRoaXMuX196b29tLAogICAgICAgICAgICBrID0gTWF0aC5tYXgoc2NhbGVFeHRlbnRbMF0sIE1hdGgubWluKHNjYWxlRXh0ZW50WzFdLCB0LmsgKiBNYXRoLnBvdygyLCB3aGVlbERlbHRhLmFwcGx5KHRoaXMsIGFyZ3VtZW50cykpKSksCiAgICAgICAgICAgIHAgPSBtb3VzZSQ0KHRoaXMpOwoKICAgICAgICAvLyBJZiB0aGUgbW91c2UgaXMgaW4gdGhlIHNhbWUgbG9jYXRpb24gYXMgYmVmb3JlLCByZXVzZSBpdC4KICAgICAgICAvLyBJZiB0aGVyZSB3ZXJlIHJlY2VudCB3aGVlbCBldmVudHMsIHJlc2V0IHRoZSB3aGVlbCBpZGxlIHRpbWVvdXQuCiAgICAgICAgaWYgKGcud2hlZWwpIHsKICAgICAgICAgIGlmIChnLm1vdXNlWzBdWzBdICE9PSBwWzBdIHx8IGcubW91c2VbMF1bMV0gIT09IHBbMV0pIHsKICAgICAgICAgICAgZy5tb3VzZVsxXSA9IHQuaW52ZXJ0KGcubW91c2VbMF0gPSBwKTsKICAgICAgICAgIH0KICAgICAgICAgIGNsZWFyVGlt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b20iLCBtb3VzZXVwcGVkLCB0cnVlKSwKICAgICAgICAgICAgcCA9IG1vdXNlJDQodGhpcyksCiAgICAgICAgICAgIHgwID0gZXZlbnQkNC5jbGllbnRYLAogICAgICAgICAgICB5MCA9IGV2ZW50JDQuY2xpZW50WTsKCiAgICAgICAgZHJhZ0Rpc2FibGUkMihldmVudCQ0LnZpZXcpOwogICAgICAgIG5vcHJvcGFnYXRpb24kNSgpOwogICAgICAgIGcubW91c2UgPSBbcCwgdGhpcy5fX3pvb20uaW52ZXJ0KHApXTsKICAgICAgICBpbnRlcnJ1cHQkMyh0aGlzKTsKICAgICAgICBnLnN0YXJ0KCk7CgogICAgICAgIGZ1bmN0aW9uIG1vdXNlbW92ZWQoKSB7CiAgICAgICAgICBub2V2ZW50JDcoKTsKICAgICAgICAgIGlmICghZy5tb3ZlZCkgewogICAgICAgICAgICB2YXIgZHggPSBldmVudCQ0LmNsaWVudFggLSB4MCwgZHkgPSBldmVudCQ0LmNsaWVudFkgLSB5MDsKICAgICAgICAgICAgZy5tb3ZlZCA9IGR4ICogZHggKyBkeSAqIGR5ID4gY2xpY2tEaXN0YW5jZTI7CiAgICAgICAgICB9CiAgICAgICAgICBnLnpvb20oIm1vdXNlIiwgY29uc3RyYWluKHRyYW5zbGF0ZShnLnRoYXQuX196b29tLCBnLm1vdXNlWzBdID0gbW91c2UkNChnLnRoYXQpLCBnLm1vdXNlWzFdKSwgZy5leHRlbnQsIHRyYW5zbGF0ZUV4dGVudCkpOwogICAgICAgIH0KCiAgICAgICAgZnVuY3Rpb24gbW91c2V1cHBlZCgpIHsKICAgICAgICAgIHYub24oIm1vdXNlbW92ZS56b29tIG1vdXNldXAuem9vbSIsIG51bGwpOwogICAgICAgICAgeWVzZHJhZyQzKGV2ZW50JDQudmlldywgZy5tb3ZlZCk7CiAgICAgICAgICBub2V2ZW50JDcoKTsKICAgICAgICAgIGcuZW5kKCk7CiAgICAgICAgfQogICAgICB9CgogICAgICBmdW5jdGlvbiBkYmx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G91Y2hlcywgdC5pZGVudGlmaWVyKTsKICAgICAgICAgIHAgPSBbcCwgdGhpcy5fX3pvb20uaW52ZXJ0KHApLCB0LmlkZW50aWZpZXJdOwogICAgICAgICAgaWYgKCFnLnRvdWNoMCkgZy50b3VjaDAgPSBwLCBzdGFydGVkID0gdHJ1ZTsKICAgICAgICAgIGVsc2UgaWYgKCFnLnRvdWNoMSkgZy50b3VjaDEgPSBwOwogICAgICAgIH0KCiAgICAgICAgLy8gSWYgdGhpcyBpcyBhIGRibHRhcCwgcmVyb3V0ZSB0byB0aGUgKG9wdGlvbmFsKSBkYmxjbGljay56b29tIGhhbmRsZXIuCiAgICAgICAgaWYgKHRvdWNoc3RhcnRpbmcpIHsKICAgICAgICAgIHRvdWNoc3RhcnRpbmcgPSBjbGVhclRpbWVvdXQodG91Y2hzdGFydGluZyk7CiAgICAgICAgICBpZiAoIWcudG91Y2gxKSB7CiAgICAgICAgICAgIGcuZW5kKCk7CiAgICAgICAgICAgIHAgPSBzZWxlY3QkNCh0aGlzKS5vbigiZGJsY2xpY2suem9vbSIpOwogICAgICAgICAgICBpZiAocCkgcC5hcHBseSh0aGlzLCBhcmd1bWVudHMpOwogICAgICAgICAgICByZXR1cm47CiAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICBpZiAoc3RhcnRlZCkgewogICAgICAgICAgdG91Y2hzdGFydGluZyA9IHNldFRpbWVvdXQoZnVuY3Rpb24oKSB7IHRvdWNoc3RhcnRpbmcgPSBudWxsOyB9LCB0b3VjaERlbGF5KTsKICAgICAgICAgIGludGVycnVwdCQzKHRoaXMpOwogICAgICAgICAgZy5zdGFydCgpOwogICAgICAgIH0KICAgICAgfQoKICAgICAgZnVuY3Rpb24gdG91Y2htb3ZlZCgpIHsKICAgICAgICB2YXIgZyA9IGdlc3R1cmUodGhpcywgYXJndW1lbnRzKSwKICAgICAgICAgICAgdG91Y2hlcyA9IGV2ZW50JDQuY2hhbmdlZFRvdWNoZXMsCiAgICAgICAgICAgIG4gPSB0b3VjaGVzLmxlbmd0aCwgaSwgdCwgcCwgbDsKCiAgICAgICAgbm9ldmVudCQ3KCk7CiAgICAgICAgaWYgKHRvdWNoc3RhcnRpbmcpIHRvdWNoc3RhcnRpbmcgPSBjbGVhclRpbWVvdXQodG91Y2hzdGFydGluZyk7CiAgICAgICAgZm9yIChpID0gMDsgaSA8IG47ICsraSkgewogICAgICAgICAgdCA9IHRvdWNoZXNbaV0sIHAgPSB0b3VjaCQzKHRoaXMsIHRvdWNoZXMsIHQuaWRlbnRpZmllcik7CiAgICAgICAgICBpZiAoZy50b3VjaDAgJiYgZy50b3VjaDBbMl0gPT09IHQuaWRlbnRpZmllcikgZy50b3VjaDBbMF0gPSBwOwogICAgICAgICAgZWxzZSBpZiAoZy50b3VjaDEgJiYgZy50b3VjaDFbMl0gPT09IHQuaWRlbnRpZmllcikgZy50b3VjaDFbMF0gPSBwOwogICAgICAgIH0KICAgICAgICB0ID0gZy50aGF0Ll9fem9vbTsKICAgICAgICBpZiAoZy50b3VjaDEpIHsKICAgICAgICAgIHZhciBwMCA9IGcudG91Y2gwWzBdLCBsMCA9IGcudG91Y2gwWzFdLAogICAgICAgICAgICAgIHAxID0gZy50b3VjaDFbMF0sIGwxID0gZy50b3VjaDFbMV0sCiAgICAgICAgICAgICAgZHAgPSAoZHAgPSBwMVswXSAtIHAwWzBdKSAqIGRwICsgKGRwID0gcDFbMV0gLSBwMFsxXSkgKiBkcCwKICAgICAgICAgICAgICBkbCA9IChkbCA9IGwxWzBdIC0gbDBbMF0pICogZGwgKyAoZGwgPSBsMVsxXSAtIGwwWzFdKSAqIGRsOwogICAgICAgICAgdCA9IHNjYWxlKHQsIE1hdGguc3FydChkcCAvIGRsKSk7CiAgICAgICAgICBwID0gWyhwMFswXSArIHAxWzBdKSAvIDIsIChwMFsxXSArIHAxWzFdKSAvIDJdOwogICAgICAgICAgbCA9IFsobDBbMF0gKyBsMVswXSkgLyAyLCAobDBbMV0gKyBsMVsxXSkgLyAy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ICAgICAgICByZXR1cm4gdmFsdWUgPT09IGxpc3RlbmVycyA/IHpvb20gOiB2YWx1ZTsKICAgICAgfTsKCiAgICAgIHpvb20uY2xpY2tEaXN0YW5jZSA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChjbGlja0Rpc3RhbmNlMiA9IChfID0gK18pICogXywgem9vbSkgOiBNYXRoLnNxcnQoY2xpY2tEaXN0YW5jZTIpOwogICAgICB9OwoKICAgICAgcmV0dXJuIHpvb207CiAgICB9CgogICAgdmFyIGQzID0gLyojX19QVVJFX18qL09iamVjdC5mcmVlemUoewogICAgICAgIF9fcHJvdG9fXzogbnVsbCwKICAgICAgICB2ZXJzaW9uOiB2ZXJzaW9uJDIsCiAgICAgICAgYmlzZWN0OiBiaXNlY3RSaWdodCQxLAogICAgICAgIGJpc2VjdFJpZ2h0OiBiaXNlY3RSaWdodCQxLAogICAgICAgIGJpc2VjdExlZnQ6IGJpc2VjdExlZnQkMSwKICAgICAgICBhc2NlbmRpbmc6IGFzY2VuZGluZyQ0LAogICAgICAgIGJpc2VjdG9yOiBiaXNlY3RvciQxLAogICAgICAgIGNyb3NzOiBjcm9zcyQzLAogICAgICAgIGRlc2NlbmRpbmc6IGRlc2NlbmRpbmckMywKICAgICAgICBkZXZpYXRpb246IGRldmlhdGlvbiQxLAogICAgICAgIGV4dGVudDogZXh0ZW50JDIsCiAgICAgICAgaGlzdG9ncmFtOiBoaXN0b2dyYW0kMSwKICAgICAgICB0aHJlc2hvbGRGcmVlZG1hbkRpYWNvbmlzOiBmcmVlZG1hbkRpYWNvbmlzJDEsCiAgICAgICAgdGhyZXNob2xkU2NvdHQ6IHNjb3R0JDEsCiAgICAgICAgdGhyZXNob2xkU3R1cmdlczogc3R1cmdlcywKICAgICAgICBtYXg6IG1heCQzLAogICAgICAgIG1lYW46IG1lYW4kMSwKICAgICAgICBtZWRpYW46IG1lZGlhbiQxLAogICAgICAgIG1lcmdlOiBtZXJnZSQxLAogICAgICAgIG1pbjogbWluJDIsCiAgICAgICAgcGFpcnM6IHBhaXJzJDEsCiAgICAgICAgcGVybXV0ZTogcGVybXV0ZSQxLAogICAgICAgIHF1YW50aWxlOiBxdWFudGlsZSQxLAogICAgICAgIHJhbmdlOiByYW5nZSQxLAogICAgICAgIHNjYW46IHNjYW4kMSwKICAgICAgICBzaHVmZmxlOiBzaHVmZmxlJDIsCiAgICAgICAgc3VtOiBzdW0kMywKICAgICAgICB0aWNrczogdGlja3MkMSwKICAgICAgICB0aWNrSW5jcmVtZW50OiB0aWNrSW5jcmVtZW50JDEsCiAgICAgICAgdGlja1N0ZXA6IHRpY2tTdGVwJDEsCiAgICAgICAgdHJhbnNwb3NlOiB0cmFuc3Bvc2UkMSwKICAgICAgICB2YXJpYW5jZTogdmFyaWFuY2UkMSwKICAgICAgICB6aXA6IHppcCQxLAogICAgICAgIGF4aXNUb3A6IGF4aXNUb3AkMSwKICAgICAgICBheGlzUmlnaHQ6IGF4aXNSaWdodCQxLAogICAgICAgIGF4aXNCb3R0b206IGF4aXNCb3R0b20kMSwKICAgICAgICBheGlzTGVmdDogYXhpc0xlZnQkMSwKICAgICAgICBicnVzaDogYnJ1c2gkMiwKICAgICAgICBicnVzaFg6IGJydXNoWCQxLAogICAgICAgIGJydXNoWTogYnJ1c2hZJDEsCiAgICAgICAgYnJ1c2hTZWxlY3Rpb246IGJydXNoU2VsZWN0aW9uJDEsCiAgICAgICAgY2hvcmQ6IGNob3JkJDEsCiAgICAgICAgcmliYm9uOiByaWJib24kMSwKICAgICAgICBuZXN0OiBuZXN0JDEsCiAgICAgICAgc2V0OiBzZXQkNiwKICAgICAgICBtYXA6IG1hcCQ1LAogICAgICAgIGtleXM6IGtleXMkMSwKICAgICAgICB2YWx1ZXM6IHZhbHVlcyQxLAogICAgICAgIGVudHJpZXM6IGVudHJpZXMkMSwKICAgICAgICBjb2xvcjogY29sb3IkMiwKICAgICAgICByZ2I6IHJnYiQyLAogICA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ogICAgICAgIGVhc2VQb2x5SW46IHBvbHlJbiQxLAogICAgICAgIGVhc2VQb2x5T3V0OiBwb2x5T3V0JDEsCiAgICAgICAgZWFzZVBvbHlJbk91dDogcG9seUluT3V0JDEsCiAgICAgICAgZWFzZVNpbjogc2luSW5PdXQkMSwKICAgICAgICBlYXNlU2luSW46IHNpbkluJDEsCiAgICAgICAgZWFzZVNpbk91dDogc2luT3V0JDEsCiAgICAgICAgZWFzZVNpbkluT3V0OiBzaW5Jbk91dCQxLAogICAgICAgIGVhc2VFeHA6IGV4cEluT3V0JDEsCiAgICAgICAgZWFzZUV4cEluOiBleHBJbiQxLAogICAgICAgIGVhc2VFeHBPdXQ6IGV4cE91dCQxLAogICAgICAgIGVhc2VFeHBJbk91dDogZXhwSW5PdXQkMSwKICAgICAgICBlYXNlQ2lyY2xlOiBjaXJjbGVJbk91dCQxLAogICAgICAgIGVhc2VDaXJjbGVJbjogY2lyY2xlSW4kMSwKICAgICAgICBlYXNlQ2lyY2xlT3V0OiBjaXJjbGVPdXQkMSwKICAgICAgICBlYXNlQ2lyY2xlSW5PdXQ6IGNpcmNsZUluT3V0JDEsCiAgICAgICAgZWFzZUJvdW5jZTogYm91bmNlT3V0JDEsCiAgICAgICAgZWFzZUJvdW5jZUluOiBib3VuY2VJbiQxLAogICAgICAgIGVhc2VCb3VuY2VPdXQ6IGJvdW5jZU91dCQxLAogICAgICAgIGVhc2VCb3VuY2VJbk91dDogYm91bmNlSW5PdXQkMSwKICAgICAgICBlYXNlQmFjazogYmFja0luT3V0JDEsCiAgICAgICAgZWFzZUJhY2tJbjogYmFja0luJDEsCiAgICAgICAgZWFzZUJhY2tPdXQ6IGJhY2tPdXQkMSwKICAgICAgICBlYXNlQmFja0luT3V0OiBiYWNrSW5PdXQkMSwKICAgICAgICBlYXNlRWxhc3RpYzogZWxhc3RpY091dCQxLAogICAgICAgIGVhc2VFbGFzdGljSW46IGVsYXN0aWNJbiQxLAogICAgICAgIGVhc2VFbGFzdGljT3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kpIHsKICAgICAgICByZXR1cm4gc2VsZWN0aW9uLmVhY2goZnVuY3Rpb24gKCkgewogICAgICAgICAgICB2YXIgeCA9IG1hcC5hcHBseSh0aGlzLCBhcmd1bWVudHMpLCBzID0gZDNTZWxlY3Rpb24uc2VsZWN0KHRoaXMpOwogICAgICAgICAgICBmb3IgKHZhciBuYW1lXzMgaW4geCkKICAgICAgICAgICAgICAgIHMuc3R5bGUobmFtZV8zLCB4W25hbWVfM10sIHByaW9yaXR5KTsKICAgICAgICB9KTsKICAgIH0KICAgIGZ1bmN0aW9uIHN0eWxlc09iamVjdChzZWxlY3Rpb24sIG1hcCwgcHJpb3JpdHkpIHsKICAgICAgICBmb3IgKHZhciBuYW1lXzQgaW4gbWFwKQogICAgICAgICAgICBzZWxlY3Rpb24uc3R5bGUobmFtZV80LCBtYXBbbmFtZV80XSwgcHJpb3JpdHkpOwogICAgICAgIHJldHVybiBzZWxlY3Rpb247CiAgICB9CiAgICBmdW5jdGlvbiBzZWxlY3Rpb25fc3R5bGVzKG1hcCwgcHJpb3JpdHkpIHsKICAgICAgICByZXR1cm4gKHR5cGVvZiBtYXAgPT09ICJmdW5jdGlvbiIgPyBzdHlsZXNGdW5jdGlvbiA6IHN0eWxlc09iamVjdCkodGhpcywgbWFwLCBwcmlvcml0eSA9PSBudWxsID8gIiIgOiBwcmlvcml0eSk7CiAgICB9CiAgICBmdW5jdGlvbiBwcm9wZXJ0aWVzRnVuY3Rpb24oc2VsZWN0aW9uLCBtYXApIHsKICAgICAgICByZXR1cm4gc2VsZWN0aW9uLmVhY2goZnVuY3Rpb24gKCkgewogICAgICAgICAgICB2YXIgeCA9IG1hcC5hcHBseSh0aGlzLCBhcmd1bWVudHMpLCBzID0gZDNTZWxlY3Rpb24uc2VsZWN0KHRoaXMpOwogICAgICAgICAgICBmb3IgKHZhciBuYW1lXzUgaW4geCkKICAgICAgICAgICAgICAgIHMucHJvcGVydHkobmFtZV81LCB4W25hbWVfNV0pOwogICAgICAgIH0pOwogICAgfQogICAgZnVuY3Rpb24gcHJvcGVydGllc09iamVjdChzZWxlY3Rpb24sIG1hcCkgewogICAgICAgIGZvciAodmFyIG5hbWVfNiBpbiBtYXApCiAgICAgICAgICAgIHNlbGVjdGlvbi5wcm9wZXJ0eShuYW1lXzYsIG1hcFtuYW1lXzZdKTsKICAgICAgICByZXR1cm4gc2VsZWN0aW9uOwogICAgfQogICAgZnVuY3Rpb24gc2VsZWN0aW9uX3Byb3BlcnRpZXMobWFwKSB7CiAgICAgICAgcmV0dXJuICh0eXBlb2YgbWFwID09PSAiZnVuY3Rpb24iID8gcHJvcGVydGllc0Z1bmN0aW9uIDogcHJvcGVydGllc09iamVjdCkodGhpcywgbWFwKTsKICAgIH0KICAgIGZ1bmN0aW9uIGF0dHJzRnVuY3Rpb24kMSh0cmFuc2l0aW9uLCBtYXApIHsKICAgICAgICByZXR1cm4gdHJhbnNpdGlvbi5lYWNoKGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIHggPSBtYXAuYXBwbHkodGhpcywgYXJndW1lbnRzKSwgdCA9IGQzU2VsZWN0aW9uLnNlbGVjdCh0aGlzKS50cmFuc2l0aW9uKHRyYW5zaXRpb24pOwogICAgICAgICAgICBmb3IgKHZhciBuYW1lXzcgaW4geCkKICAgICAgICAgICAgICAgIHQuYXR0cihuYW1lXzcsIHhbbmFtZV83XSk7CiAgICAgICAgfSk7CiAgICB9CiAgICBmdW5jdGlvbiBhdHRyc09iamVjdCQxKHRyYW5zaXRpb24sIG1hcCkgewogICAgICAgIGZvciAodmFyIG5hbWVfOCBpbiBtYXApCiAgICAgICAgICAgIHRyYW5zaXRpb24uYXR0cihuYW1lXzgsIG1hcFtuYW1lXzhdKTsKICAgICAgICByZXR1cm4gdHJhbnNpdGlvbjsKICAgIH0KICAgIGZ1bmN0aW9uIHRyYW5zaXRpb25fYXR0cnMobWFwKSB7CiAgICAgICAgcmV0dXJuICh0eXBlb2YgbWFwID09PSAiZnVuY3Rpb24iID8g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Rpb24gY29lcmNlRXh0ZXJuYWxEMyhleHRlcm5hbEQzU2VsZWN0aW9uKSB7CiAgICAgICAgLy8gaWYgLmF0dHJzIGlzbid0IGRlZmluZWQ7IGNvbnZlcnQgdGhlIHNlbGVjdGlvbgogICAgICAgIGlmIChleHRlcm5hbEQzU2VsZWN0aW9uLmF0dHJzID09IG51bGwpIHsKICAgICAgICAgICAgaWYgKGV4dGVybmFsRDNTZWxlY3Rpb24ubm9kZXMgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgLy8gbm9kZXMgaXNuJ3QgZGVmaW5lZDsgdGhpcyBpcyBwcm9iYWJseSBhIGQzdjMgc2VsZWN0aW9uLiBoYW5kbGUgaXQgYWNjb3JkaW5nbHkKICAgICAgICAgICAgICAgIHZhciBub2Rlc18xID0gW107CiAgICAgICAgICAgICAgICBleHRlcm5hbEQzU2VsZWN0aW9uLmVhY2goZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgICAgIG5vZGVzXzEucHVzaCh0aGlzKTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgcmV0dXJuIGQzLnNlbGVjdEFsbChub2Rlc18xKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHJldHVybiBkMy5zZWxlY3RBbGwoZXh0ZXJuYWxEM1NlbGVjdGlvbi5ub2RlcygpKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgcmV0dXJuIGV4dGVybmFsRDNTZWxlY3Rpb247CiAgICAgICAgfQogICAgfQogICAgZXhwb3J0cy5jb2VyY2VFeHRlcm5hbEQzID0gY29lcmNlRXh0ZXJuYWxEMzsKICAgIH0pOwoKICAgIHZhciBtYWtlRW51bV8xID0gY3JlYXRlQ29tbW9uanNNb2R1bGUoZnVuY3Rpb24gKG1vZHVsZSwgZXhwb3J0cykgewogICAgLyoqCiAgICAgKiBDb3B5cmlnaHQgMjAxNC1wcmV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hY2tJbk91dCwKICAgICAgICBlbGFzdGljOiBzcmMuZWFzZUVsYXN0aWMsCiAgICAgICAgZWxhc3RpY0luOiBzcmMuZWFzZUVsYXN0aWNJbiwKICAgICAgICBlbGFzdGljT3V0OiBzcmMuZWFzZUVsYXN0aWNPdXQsCiAgICAgICAgZWxhc3RpY0luT3V0OiBzcmMuZWFzZUVsYXN0aWNJbk91dCwKICAgIH07CiAgICBleHBvcnRzLkVhc2VOYW1lID0gbWFrZUVudW1fMS5tYWtlRW51bShbCiAgICAgICAgImxpbmVhciIsCiAgICAgICAgInF1YWQiLAogICAgICAgICJxdWFkSW4iLAogICAgICAgICJxdWFkT3V0IiwKICAgICAgICAicXVhZEluT3V0IiwKICAgICAgICAiY3ViaWMiLAogICAgICAgICJjdWJpY0luIiwKICAgICAgICAiY3ViaWNPdXQiLAogICAgICAgICJjdWJpY0luT3V0IiwKICAgICAgICAicG9seSIsCiAgICAgICAgInBvbHlJbiIsCiAgICAgICAgInBvbHlPdXQiLAogICAgICAgICJwb2x5SW5PdXQiLAogICAgICAgICJzaW4iLAogICAgICAgICJzaW5JbiIsCiAgICAgICAgInNpbk91dCIsCiAgICAgICAgInNpbkluT3V0IiwKICAgICAgICAiZXhwIiwKICAgICAgICAiZXhwSW4iLAogICAgICAgICJleHBPdXQiLAogICAgICAgICJleHBJbk91dCIsCiAgICAgICAgImNpcmNsZSIsCiAgICAgICAgImNpcmNsZUluIiwKICAgICAgICAiY2lyY2xlT3V0IiwKICAgICAgICAiY2lyY2xlSW5PdXQiLAogICAgICAgICJib3VuY2UiLAogICAgICAgICJib3VuY2VJbiIsCiAgICAgICAgImJvdW5jZU91dCIsCiAgICAgICAgImJvdW5jZUluT3V0IiwKICAgICAgICAiYmFjayIsCiAgICAgICAgImJhY2tJbiIsCiAgICAgICAgImJhY2tPdXQiLAogICAgICAgICJiYWNrSW5PdXQiLAogICAgICAgICJlbGFzdGljIiwKICAgICAgICAiZWxhc3RpY0luIiwKICAgICAgICAiZWxh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RlcHMpOwogICAgICAgICAgICByZXR1cm4gdGhpcy5zdGFydERlbGF5KCkgKyBhZGp1c3RlZEl0ZXJhdGl2ZURlbGF5ICogKE1hdGgubWF4KG51bWJlck9mU3RlcHMgLSAxLCAwKSkgKyB0aGlzLnN0ZXBEdXJhdGlvbigpOwogICAgICAgIH07CiAgICAgICAgRWFzaW5nLnByb3RvdHlwZS5hbmltYXRlID0gZnVuY3Rpb24gKHNlbGVjdGlvbiwgYXR0clRvQXBwbGllZFByb2plY3RvcikgewogICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwogICAgICAgICAgICBzZWxlY3Rpb24gPSBjb2VyY2VEMy5jb2VyY2VFeHRlcm5hbEQzKHNlbGVjdGlvbik7CiAgICAgICAgICAgIHZhciBudW1iZXJPZlN0ZXBzID0gc2VsZWN0aW9uLnNpemUoKTsKICAgICAgICAgICAgdmFyIGFkanVzdGVkSXRlcmF0aXZlRGVsYXkgPSB0aGlzLl9nZXRBZGp1c3RlZEl0ZXJhdGl2ZURlbGF5KG51bWJlck9mU3RlcHMpOwogICAgICAgICAgICByZXR1cm4gc2VsZWN0aW9uLnRyYW5zaXRpb24oKQogICAgICAgICAgICAgICAgLmVhc2UodGhpcy5fZ2V0RWFzZUZhY3RvcnkoKSkKICAgICAgICAgICAgICAgIC5kdXJhdGlvbih0aGlzLnN0ZXBEdXJhdGlvbigpKQogICAgICAgICAgICAgICAgLmRlbGF5KGZ1bmN0aW9uIChkLCBpKSB7IHJldHVybiBfdGhpcy5zdGFydERlbGF5KCkgKyBhZGp1c3RlZEl0ZXJhdGl2ZURlbGF5ICogaTsgfSkKICAgICAgICAgICAgICAgIC5hdHRycyhhdHRyVG9BcHBsaWVkUHJvamVjdG9yKTsKICAgICAgICB9OwogICAgICAgIEVhc2luZy5wcm90b3R5cGUuc3RhcnREZWxheSA9IGZ1bmN0aW9uIChzdGFydERlbGF5KSB7CiAgICAgICAgICAgIGlmIChzdGFydERlbGF5ID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9zdGFydERlbGF5OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fc3RhcnREZWxheSA9IHN0YXJ0RGVsYXk7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgRWFzaW5nLnByb3RvdHlwZS5zdGVwRHVyYXRpb24gPSBmdW5jdGlvbiAoc3RlcER1cmF0aW9uKSB7CiAgICAgICAgICAgIGlmIChzdGVwRHVyYXRpb24gPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIE1hdGgubWluKHRoaXMuX3N0ZXBEdXJhdGlvbiwgdGhpcy5fbWF4VG90YWxEdXJhdGlvbik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLl9zdGVwRHVyYXRpb24gPSBzdGVwRHVyYXRpb247CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgRWFzaW5nLnByb3RvdHlwZS5zdGVwRGVsYXkgPSBmdW5jdGlvbiAoc3RlcERlbGF5KSB7CiAgICAgICAgICAgIGlmIChzdGVwRGVsYXkgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3N0ZXBEZWxheTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuX3N0ZXBEZWxheSA9IHN0ZXBEZWxheTsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBFYXNpbmcucHJvdG90eXBlLm1heFRvdGFsRHVyYXRpb24gPSBmdW5jdGlvbiAobWF4VG90YWxEdXJhdGlvbikgewogICAgICAgICAgICBpZiAobWF4VG90YWxEdXJhdGlvbiA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fbWF4VG90YWxEdXJhdGlvbjsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuX21heFRvdGFsRHVyYXRpb24gPSBtYXhUb3RhbER1cmF0aW9uOwogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIEVhc2luZy5wcm90b3R5cGUuZWFzaW5nTW9kZSA9IGZ1bmN0aW9uIChlYXNpbmdNb2RlKSB7CiAgICAgICAgICAgIGlmIChlYXNpbmdNb2RlID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9lYXNpbmdNb2RlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fZWFzaW5nTW9kZSA9IGVhc2luZ01vZGU7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgRWFzaW5nLnByb3RvdHlwZS5fZ2V0RWFzZUZhY3RvcnkgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHZhciBlYXNlID0gdGhpcy5lYXNpbmdNb2RlKCk7CiAgICAgICAgICAgIGlmICh0eXBlb2YgZWFzZSA9PT0gInN0cmluZyIpIHsKICAgICAgICAgICAgICAgIHZhciBtYXliZUVhc2VGdW5jdGlvbiA9IEVBU0VfTkFNRV9NQVBQSU5HW2Vhc2VdOwogICAgICAgICAgICAgICAgaWYgKG1heWJlRWFzZUZ1bmN0aW9uID09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICAvLyBvb3BzOyBuYW1lIGlzIHdyb25nIC0gZGVmYXVsdCB0byBsaW5lYXIgaW5zdGVhZAogICAgICAgICAgICAgICAgICAgIHJldHVybiBFQVNFX05BTUVfTUFQUElOR1sibGluZWFyIl07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gbWF5YmVFYXNlRnVuY3Rpb247CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICByZXR1cm4gZWFzZTsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogQWRqdXN0IHRoZSBpdGVyYXRpdmUgZGVsYXksIHN1Y2ggdGhhdCBpdCB0YWtlcyBpbnRvIGFjY291bnQgdGhlIG1heFRvdGFsRHVyYXRpb24gY29uc3RyYWludAogICAgICAgICAqLwogICAgICAgIEVhc2luZy5wcm90b3R5cGUuX2dldEFkanVzdGVkSXRlcmF0aXZlRGVsYXkgPSBmdW5jdGlvbiAobnVtYmVyT2ZTdGVwcykgewogICAgICAgICAgICB2YXIgc3RlcFN0YXJ0VGltZUludGVydmFsID0gdGhpcy5tYXhUb3RhbER1cmF0aW9uKCkgLSB0aGlzLnN0ZXBEdXJhdGlvbigpOwogICAgICAgICAgICBzdGVwU3RhcnRUaW1lSW50ZXJ2YWwgPSBNYXRoLm1heChzdGVwU3RhcnRUaW1lSW50ZXJ2YWwsIDApOwogICAgICAgICAgICB2YXIgbWF4UG9zc2libGVJdGVyYXRpdmVEZWxheSA9IHN0ZXBTdGFydFRpbWVJbnRlcnZhbCAvIE1hdGgubWF4KG51bWJlck9mU3RlcHMgLSAxLCAxKTsKICAgICAgICAgICAgcmV0dXJuIE1hdGgubWluKHRoaXMuc3RlcERlbGF5KCksIG1heFBvc3NpYmxlSXRlcmF0aXZlRGVsYXkpOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIGRlZmF1bHQgc3RhcnRpbmcgZGVsYXkgb2YgdGhlIGFuaW1hdGlvbiBpbiBtaWxsaXNlY29uZHMKICAgICAgICAgKi8KICAgICAgICBFYXNpbmcuX0RFRkFVTFRfU1RBUlRfREVMQVlfTUlMTElTRUN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1cCBrIGluIHRoZSBjYWNoZSwgY29tcHV0aW5nIHRoZSByZXN1bHQgaWYgaXQgaXNuJ3QKICAgICAgICAgKiBmb3VuZC4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBrIFRoZSBrZXkgdG8gbG9vayB1cCBpbiB0aGUgY2FjaGUuCiAgICAgICAgICogQHJldHVybiB7VH0gVGhlIHZhbHVlIGFzc29jaWF0ZWQgd2l0aCBrOyB0aGUgcmVzdWx0IG9mIGNvbXB1dGUoaykuCiAgICAgICAgICovCiAgICAgICAgQ2FjaGUucHJvdG90eXBlLmdldCA9IGZ1bmN0aW9uIChrKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5jYWNoZS5oYXNPd25Qcm9wZXJ0eShrKSkgewogICAgICAgICAgICAgICAgdGhpcy5jYWNoZVtrXSA9IHRoaXMuY29tcHV0ZShrKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpcy5jYWNoZVtrXTsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIFJlc2V0IHRoZSBjYWNoZSBlbXB0eS4KICAgICAgICAgKgogICAgICAgICAqIEByZXR1cm4ge0NhY2hlPFQ+fSBUaGUgY2FsbGluZyBDYWNoZS4KICAgICAgICAgKi8KICAgICAgICBDYWNoZS5wcm90b3R5cGUuY2xlYXIgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHRoaXMuY2FjaGUgPSB7fTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICByZXR1cm4gQ2FjaGU7CiAgICB9KCkpOwogICAgZXhwb3J0cy5DYWNoZSA9IENhY2hlOwoKICAgIH0pOwoKICAgIHZhciBtZXRob2RzID0gY3JlYXRlQ29tbW9uanNNb2R1bGUoZnVuY3Rpb24gKG1vZHVsZSwgZXhwb3J0cykgewogICAgLyoqCiAgICAgKiBDb3B5cmlnaHQgMjAxNy1wcmVzZW50IFBhbGFudGlyIFRlY2hub2xvZ2llcywgSW5jLiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICAgICogTGljZW5zZWQgdW5kZXIgdGhlIE1JVCBMaWNlbnNlICh0aGUgIkxpY2Vuc2UiKTsgeW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZQogICAgICogbGljZW5zZSBhdCBodHRwczovL2dpdGh1Yi5jb20vcGFsYW50aXIvdHlwZXNldHRhYmxlL2Jsb2IvZGV2ZWxvcC9MSUNFTlNFCiAgICAgKi8KICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCAiX19lc01vZHVsZSIsIHsgdmFsdWU6IHRydWUgfSk7CiAgICB2YXIgTWV0aG9kcyA9IChmdW5jdGlvbiAoKSB7CiAgICAgICAgZnVuY3Rpb24gTWV0aG9kcygpIHsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ2hlY2sgaWYgdHdvIGFycmF5cyBhcmUgZXF1YWwgYnkgc3RyaWN0IGVxdWFsaXR5LgogICAgICAgICAqLwogICAgICAgIE1ldGhvZHMuYXJyYXlFcSA9IGZ1bmN0aW9uIChhLCBiKSB7CiAgICAgICAgICAgIC8vIFRlY2huaWNhbGx5LCBudWxsIGFuZCB1bmRlZmluZWQgYXJlIGFycmF5cyB0b28KICAgICAgICAgICAgaWYgKGEgPT0gbnVsbCB8fCBiID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiBhID09PSBiOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChhLmxlbmd0aCAhPT0gYi5sZW5ndGgpIHsKICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGEubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIGlmIChhW2ldICE9PSBiW2ldKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHthbnl9IGEgT2JqZWN0IHRvIGNoZWNrIGFnYWluc3QgYiBmb3IgZXF1YWxpdHkuCiAgICAgICAgICogQHBhcmFtIHthbnl9IGIgT2JqZWN0IHRvIGNoZWNrIGFnYWluc3QgYSBmb3IgZXF1YWxpdHkuCiAgICAgICAgICoKICAgICAgICAgKiBAcmV0dXJucyB7Ym9vbGVhbn0gd2hldGhlciBvciBub3QgdHdvIG9iamVjdHMgc2hhcmUgdGhlIHNhbWUga2V5cywgYW5kCiAgICAgICAgICogICAgICAgICAgdmFsdWVzIGFzc29jaWF0ZWQgd2l0aCB0aG9zZSBrZXlzLiBWYWx1ZXMgd2lsbCBiZSBjb21wYXJlZAogICAgICAgICAqICAgICAgICAgIHdpdGggPT09LgogICAgICAgICAqLwogICAgICAgIE1ldGhvZHMub2JqRXEgPSBmdW5jdGlvbiAoYSwgYikgewogICAgICAgICAgICBpZiAoYSA9PSBudWxsIHx8IGIgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIGEgPT09IGI7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIGtleXNBID0gT2JqZWN0LmtleXMoYSkuc29ydCgpOwogICAgICAgICAgICB2YXIga2V5c0IgPSBPYmplY3Qua2V5cyhiKS5zb3J0KCk7CiAgICAgICAgICAgIHZhciB2YWx1ZXNBID0ga2V5c0EubWFwKGZ1bmN0aW9uIChrKSB7IHJldHVybiBhW2tdOyB9KTsKICAgICAgICAgICAgdmFyIHZhbHVlc0IgPSBrZXlzQi5tYXAoZnVuY3Rpb24gKGspIHsgcmV0dXJuIGJba107IH0pOwogICAgICAgICAgICByZXR1cm4gTWV0aG9kcy5hcnJheUVxKGtleXNBLCBrZXlzQikgJiYgTWV0aG9kcy5hcnJheUVxKHZhbHVlc0EsIHZhbHVlc0IpOwogICAgICAgIH07CiAgICAgICAgTWV0aG9kcy5zdHJpY3RFcSA9IGZ1bmN0aW9uIChhLCBiKSB7CiAgICAgICAgICAgIHJldHVybiBhID09PSBiOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogU2hpbSBmb3IgXy5kZWZhdWx0cwogICAgICAgICAqLwogICAgICAgIE1ldGhvZHMuZGVmYXVsdHMgPSBmdW5jdGlvbiAodGFyZ2V0KSB7CiAgICAgICAgICAgIHZhciBvYmplY3RzID0gW107CiAgICAgICAgICAgIGZvciAodmFyIF9pID0gMTsgX2kgPCBhcmd1bWVudHMubGVuZ3RoOyBfaSsrKSB7CiAgICAgICAgICAgICAgICBvYmplY3RzW19pIC0gMV0gPSBhcmd1bWVudHNbX2ldOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0YXJnZXQgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcigiQ2Fubm90IGNvbnZlcnQgdW5kZWZpbmVkIG9yIG51bGwgdG8gb2JqZWN0Iik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIHJlc3VsdCA9IE9iamVjdCh0YXJnZXQpOwogICAgICAgICAgICBvYmplY3RzLmZvckVhY2goZnVuY3Rpb24gKG9iaikgewogICAgICAgICAgICAgICAgaWYgKG9iaiAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIga2V5IGluIG9iaikgewogICAgICAgICAgICAgICAgICAgICAgICBpZiAoT2JqZWN0LnByb3RvdHlwZS5oYXNPd25Qcm9wZXJ0eS5jYWxsKG9iaiwga2V5KSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0W2tleV0gPSBvYmpba2V5XTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgfTsKICA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gICAgIHJldHVybiBzdHIgJiYgc3RyLnRyaW0oKSAhPT0gIiI7CiAgICAgICAgfTsKICAgICAgICBTdHJpbmdNZXRob2RzLnRyaW1TdGFydCA9IGZ1bmN0aW9uIChzdHIsIHNwbGl0dGVyKSB7CiAgICAgICAgICAgIGlmICghc3RyKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gc3RyOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciBjaGFycyA9IHN0ci5zcGxpdCgiIik7CiAgICAgICAgICAgIHZhciByZWR1Y2VGdW5jdGlvbiA9IHNwbGl0dGVyID8gZnVuY3Rpb24gKHMpIHsgcmV0dXJuIHMuc3BsaXQoc3BsaXR0ZXIpLnNvbWUoU3RyaW5nTWV0aG9kcy5pc05vdEVtcHR5U3RyaW5nKTsgfQogICAgICAgICAgICAgICAgOiBTdHJpbmdNZXRob2RzLmlzTm90RW1wdHlTdHJpbmc7CiAgICAgICAgICAgIHJldHVybiBjaGFycy5yZWR1Y2UoZnVuY3Rpb24gKHMsIGMpIHsgcmV0dXJuIHJlZHVjZUZ1bmN0aW9uKHMgKyBjKSA/IHMgKyBjIDogczsgfSwgIiIpOwogICAgICAgIH07CiAgICAgICAgU3RyaW5nTWV0aG9kcy50cmltRW5kID0gZnVuY3Rpb24gKHN0ciwgYykgewogICAgICAgICAgICBpZiAoIXN0cikgewogICAgICAgICAgICAgICAgcmV0dXJuIHN0cjsKICAgICAgICAgICAgfQogICAgICAgICAgICB2YXIgcmV2ZXJzZWRDaGFycyA9IHN0ci5zcGxpdCgiIik7CiAgICAgICAgICAgIHJldmVyc2VkQ2hhcnMucmV2ZXJzZSgpOwogICAgICAgICAgICByZXZlcnNlZENoYXJzID0gU3RyaW5nTWV0aG9kcy50cmltU3RhcnQocmV2ZXJzZWRDaGFycy5qb2luKCIiKSwgYykuc3BsaXQoIiIpOwogICAgICAgICAgICByZXZlcnNlZENoYXJzLnJldmVyc2UoKTsKICAgICAgICAgICAgcmV0dXJuIHJldmVyc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ci5wcm90b3R5cGUubWVhc3VyZXIgPSBmdW5jdGlvbiAobmV3TWVhc3VyZXIpIHsKICAgICAgICAgICAgdGhpcy5fbWVhc3VyZXIgPSBuZXdNZWFzdXJlcjsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBXcml0ZXIucHJvdG90eXBlLndyYXBwZXIgPSBmdW5jdGlvbiAobmV3V3JhcHBlcikgewogICAgICAgICAgICB0aGlzLl93cmFwcGVyID0gbmV3V3JhcHBlcjsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBXcml0ZXIucHJvdG90eXBlLnBlbkZhY3RvcnkgPSBmdW5jdGlvbiAobmV3UGVuRmFjdG9yeSkgewogICAgICAgICAgICB0aGlzLl9wZW5GYWN0b3J5ID0gbmV3UGVuRmFjdG9yeTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBXcml0ZXMgdGhlIHRleHQgaW50byB0aGUgY29udGFpbmVyLiBJZiBubyBjb250YWluZXIgaXMgc3BlY2lmaWVkLCB0aGUgcGVuJ3MKICAgICAgICAgKiBkZWZhdWx0IGNvbnRhaW5lciB3aWxsIGJlIHVzZWQuCiAgICAgICAgICovCiAgICAgICAgV3JpdGVyLnByb3RvdHlwZS53cml0ZSA9IGZ1bmN0aW9uICh0ZXh0LCB3aWR0aCwgaGVpZ2h0LCBvcHRpb25zLCBjb250YWluZXIpIHsKICAgICAgICAgICAgaWYgKG9wdGlvbnMgPT09IHZvaWQgMCkgeyBvcHRpb25zID0ge307IH0KICAgICAgICAgICAgLy8gYXBwbHkgZGVmYXVsdCBvcHRpb25zCiAgICAgICAgICAgIG9wdGlvbnMgPSB1dGlscy5NZXRob2RzLmRlZmF1bHRzKHt9LCBERUZBVUxUX1dSSVRFX09QVElPTlMsIG9wdGlvbnMpOwogICAgICAgICAgICAvLyB2YWxpZGF0ZSBpbnB1d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NvcnJlY3RlZFNlY29uZGFyeURpbWVuc2lvbiAtIGxpbmVzLmxlbmd0aCAqIGxpbmVIZWlnaHQpOwogICAgICAgICAgICB2YXIgc2hlYXJDb3JyZWN0aW9uID0gc2hlYXJDb3JyZWN0ZWRYT2Zmc2V0IC0gc2hlYXJDb3JyZWN0ZWRZT2Zmc2V0OwogICAgICAgICAgICAvLyBjb21wdXRlIHRyYW5zZm9ybQogICAgICAgICAgICB2YXIgdHJhbnNsYXRlID0gWzAsIDBdOwogICAgICAgICAgICB2YXIgcm90YXRlID0gb3B0aW9ucy50ZXh0Um90YXRpb24gKyBzaGVhckRlZ3JlZXM7CiAgICAgICAgICAgIHN3aXRjaCAob3B0aW9ucy50ZXh0Um90YXRpb24pIHsKICAgICAgICAgICAgICAgIGNhc2UgOTA6CiAgICAgICAgICAgICAgICAgICAgdHJhbnNsYXRlID0gW3dpZHRoICsgc2hlYXJDb3JyZWN0aW9uLCAwXTsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIGNhc2UgLTkwOgogICAgICAgICAgICAgICAgICAgIHRyYW5zbGF0ZSA9IFstc2hlYXJDb3JyZWN0aW9uLCBoZWlnaHRdOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgY2FzZSAxODA6CiAgICAgICAgICAgICAgICAgICAgdHJhbnNsYXRlID0gW3dpZHRoLCBoZWlnaHQgKyBzaGVhckNvcnJlY3Rpb25dOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgICAgICAgICB0cmFuc2xhdGUgPSBbMCwgLXNoZWFyQ29ycmVjdGlvbl07CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gY3JlYXRlIGEgbmV3IHBlbiBhbmQgd3JpdGUgdGhlIGxpbmVzCiAgICAgICAgICAgIHZhciBsaW5lUGVuID0gdGhp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ICAgICAgICAgZWxlbWVudC5hcHBlbmRDaGlsZChjaGlsZCk7CiAgICAgICAgICAgIHJldHVybiBjaGlsZDsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYW5kIHJldHVybnMgYSBuZXcgSFRNTEVsZW1lbnQgd2l0aCB0aGUgYXR0YWNoZWQgY2xhc3NuYW1lcy4KICAgICAgICAgKi8KICAgICAgICBIdG1sVXRpbHMuY3JlYXRlID0gZnVuY3Rpb24gKHRhZ05hbWUpIHsKICAgICAgICAgICAgdmFyIGNsYXNzTmFtZXMgPSBbXTsKICAgICAgICAgICAgZm9yICh2YXIgX2kgPSAxOyBfaSA8IGFyZ3VtZW50cy5sZW5ndGg7IF9pKyspIHsKICAgICAgICAgICAgICAgIGNsYXNzTmFtZXNbX2kgLSAxXSA9IGFyZ3VtZW50c1tfaV07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIGVsZW1lbnQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KHRhZ05hbWUpOwogICAgICAgICAgICBIdG1sVXRpbHMuYWRkQ2xhc3Nlcy5hcHBseShIdG1sVXRpbHMsIFtlbGVtZW50XS5jb25jYXQoY2xhc3NOYW1lcykpOwogICAgICAgICAgICByZXR1cm4gZWxlbWVudDsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIEFkZHMgdGhlIHZhcmlhZGljIGNsYXNzbmFtZXMgdG8gdGhlIEVsZW1lbnQKICAgICAgICAgKi8KICAgICAgICBIdG1sVXRpbHMuYWRkQ2xhc3NlcyA9IGZ1bmN0aW9uIChlbGVtZW50KSB7CiAgICAgICAgICAgIHZhciBjbGFzc05hbWVzID0gW107CiAgICAgICAgICAgIGZvciAodmFyIF9pID0gMTsgX2kgPCBhcmd1bWVudHMubGVuZ3RoOyBfaSsrKSB7CiAgICAgICAgICAgICAgICBjbGFzc05hbWVzW19pIC0gMV0gPSBhcmd1bWVudHNbX2ldOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNsYXNzTmFtZXMgPSBjbGFzc05hbWVzLmZpbHRlcihmdW5jdGlvbiAoYykgeyByZXR1cm4gYyAhPSBudWxsOyB9KTsKICAgICAgICAgICAgaWYgKGVsZW1lbnQuY2xhc3NMaXN0ICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIGNsYXNzTmFtZXMuZm9yRWFjaChmdW5jdGlvbiAoY2xhc3NOYW1lKSB7CiAgICAgICAgICAgICAgICAgICAgZWxlbWVudC5jbGFzc0xpc3QuYWRkKGNsYXNzTmFtZSk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIC8vIElFIDExIGRvZXMgbm90IHN1cHBvcnQgY2xhc3NMaXN0CiAgICAgICAgICAgICAgICBlbGVtZW50LnNldEF0dHJpYnV0ZSgiY2xhc3MiLCBjbGFzc05hbWVzLmpvaW4oIiAiKSk7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgdGhlIHdpZHRoL2hlaWdodCBvZiBIVE1MRWxlbWVudCdzIGJvdW5kaW5nIGJveAogICAgICAgICAqLwogICAgICAgIEh0bWxVdGlscy5nZXREaW1lbnNpb25zID0gZnVuY3Rpb24gKGVsZW1lbnQpIHsKICAgICAgICAgICAgLy8gdXNpbmcgZmVhdHVyZSBkZXRlY3Rpb24sIHNhZmVseSByZXR1cm4gdGhlIGJvdW5kaW5nIGJveCBkaW1lbnNpb25zIG9mIHRoZQogICAgICAgICAgICAvLyBwcm92aWRlZCBodG1sIGVsZW1lbnQKICAgICAgICAgICAgaWYgKGVsZW1lbnQuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KSB7CiAgICAgICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgICAgIHZhciBfYSA9IGVsZW1lbnQuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCksIHdpZHRoID0gX2Eud2lkdGgsIGhlaWdodCA9IF9hLmhlaWdodDsKICAgICAgICAgICAgICAgICAgICAvLyBjb3B5IHRvIHByZXZlbnQgTm9Nb2RpZmljYXRpb25BbGxvd2VkRXJyb3IKICAgICAgICAgICAgICAgICAgICByZXR1cm4geyB3aWR0aDogd2lkdGgsIGhlaWdodDogaGVpZ2h0IH07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjYXRjaCAoZXJyKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gc3dhbGxvdyBhbnkgZXJyb3JzIHRoYXQgb2NjdXIgKEZpcmVmb3ggTGludXgpCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gaWYgY2FuJ3QgZ2V0IHZhbGlkIGJib3gsIHJldHVybiAwLDAKICAgICAgICAgICAgcmV0dXJuIHsgaGVpZ2h0OiAwLCB3aWR0aDogMCB9OwogICAgICAgIH07CiAgICAgICAgcmV0dXJuIEh0bWxVdGlsczsKICAgIH0oKSk7CiAgICBleHBvcnRzLkh0bWxVdGlscyA9IEh0bWxVdGlsczsKICAgIC8qKgogICAgICogQSB0eXBlc2V0dGVyIGNvbnRleHQgZm9yIEhUTUwuCiAgICAgKi8KICAgIHZhciBIdG1sQ29udGV4dCA9IChmdW5jdGlvbiAoKSB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIGVsZW1lbnQgLSBUaGUgQ1NTIGZvbnQgc3R5bGVzIGFwcGxpZWQgdG8gYGVsZW1lbnRgIHdpbGwgZGV0ZXJtaW5lIHRoZQogICAgICAgICAqIHNpemUgb2YgdGV4dCBtZWFzdXJlbWVudHMuIEFsc28gdGhlIGRlZmF1bHQgdGV4dCBibG9jayBjb250YWluZXIuCiAgICAgICAgICogQHBhcmFtIGNsYXNzTmFtZSAtIGFkZGVkIHRvIG5ldyB0ZXh0IGJsb2NrcwogICAgICAgICAqIEBwYXJhbSBhZGRUaXRsZSAtIGVuYWJsZSB0aXRsZSBhdHRyaWJ1dGUgdG8gYmUgYWRkZWQgdG8gbmV3IHRleHQgYmxvY2tzLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIEh0bWxDb250ZXh0KGVsZW1lbnQsIGNsYXNzTmFtZSwgYWRkVGl0bGUpIHsKICAgICAgICAgICAgaWYgKGFkZFRpdGxlID09PSB2b2lkIDApIHsgYWRkVGl0bGUgPSBmYWxzZTsgfQogICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwogICAgICAgICAgICB0aGlzLmVsZW1lbnQgPSBlbGVtZW50OwogICAgICAgICAgICB0aGlzLmNsYXNzTmFtZSA9IGNsYXNzTmFtZTsKICAgICAgICAgICAgdGhpcy5hZGRUaXRsZSA9IGFkZFRpdGxlOwogICAgICAgICAgICB0aGlzLmNyZWF0ZVJ1bGVyID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uICh0ZXh0KSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIHRleHRFbGVtZW50ID0gSHRtbFV0aWxzLmFwcGVuZChfdGhpcy5lbGVtZW50LCAic3BhbiIsICJ0ZXh0LXRtcCIsIF90aGlzLmNsYXNzTmFtZSk7CiAgICAgICAgICAgICAgICAgICAgdGV4dEVsZW1lbnQudGV4dENvbnRlbnQgPSB0ZXh0OwogICAgICAgICAgICAgICAgICAgIHZhciBkaW1lbnNpb25zID0gSHRtbFV0aWxzLmdldERpbWVuc2lvbnModGV4dEVsZW1lbnQpOwogICAgICAgICAgICAgICAgICAgIF90aGlzLmVsZW1lbnQucmVtb3ZlQ2hpbGQodGV4dEVsZW1lbnQpOyAvLyBlbGVtZW50LnJlbW92ZSgpIGRvZXNuJ3Qgd29yayBpbiBJRTExCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGRpbWVuc2lvbnM7CiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9OwogICAgICAgICAgICB0aGlzLmNyZWF0ZVBlbiA9IGZ1bmN0aW9uICh0ZXh0LCB0cmFuc2Zvcm0sIGVsZW1lbnQpIHsKICAgICAgICAgICAgICAgIGlmIChlbGVtZW50ID09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICBlbGVtZW50ID0gX3RoaXMuZWxlbWVudDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHZhciB0ZXh0QmxvY2sgPSBIdG1sVXRpbHMuYXBwZW5kKGVsZW1lbnQsICJkaXYiLCAidGV4dC1ibG9jayIsIF90aGlzLmNsYXNzTmFtZSk7CiAgICAgICAgICAgICAgICB0ZXh0QmxvY2suc3R5bGUucG9zaXRpb24gPSAicmVsYXRpdmUiOwogICAgICAgICAgICAgICAgdGV4dEJsb2NrLnN0eWxlLnRyYW5zZm9ybSA9CiAgICAgICAgICAgICAgICAgICAgInRyYW5zbGF0ZSgwLCAtMWVtKSAiICsKICAgICAgICAgICAgICAgICAgICAgICAgKCJ0cmFuc2xhdGUoIiArIHRyYW5zZm9ybS50cmFuc2xhdGVbMF0gKyAicHgsICIgKyB0cmFuc2Zvcm0udHJhbnNsYXRlWzFdICsgInB4KSAiKSArCiAgICAgICAgICAgICAgICAgICAgICAgICgicm90YXRlKCIgKyB0cmFuc2Zvcm0ucm90YXRlICsgImRlZykiKTsKICAgICAgICAgICAgICAgIC8vIFRoaXMgYXdrd2FyZCB0cmFuc2Zvcm0gb3JpZ2luIG1hdGNoZXMgdGhlIFNWRyBvcmlnaW4KICAgICAgICAgICAgICAgIHRleHRCbG9jay5zdHlsZS50cmFuc2Zvcm1PcmlnaW4gPSAiMCAxLjJlbSI7CiAgICAgICAgICAgICAgICAvLyBhdHRhY2ggb3B0aW9uYWwgdGl0bGUKICAgICAgICAgICAgICAgIGlmIChfdGhpcy5hZGRUaXRsZSkgewogICAgICAgICAgICAgICAgICAgIHRleHRCbG9jay5zZXRBdHRyaWJ1dGUoInRpdGxlIiwgdGV4dCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gX3RoaXMuY3JlYXRlSHRtbExpbmVQZW4odGV4dEJsb2NrKTsKICAgICAgICAgICAgfTsKICAgICAgICB9CiAgICAgICAgSHRtbENvbnRleHQucHJvdG90eXBlLnNldEFkZFRpdGxlID0gZnVuY3Rpb24gKGFkZFRpdGxlKSB7CiAgICAgICAgICAgIHRoaXMuYWRkVGl0bGUgPSBhZGRUaXRsZTsKICAgICAgICB9OwogICAgICAgIEh0bWxDb250ZXh0LnByb3RvdHlwZS5jcmVhdGVIdG1sTGluZVBlbiA9IGZ1bmN0aW9uICh0ZXh0QmxvY2spIHsKICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIHdyaXRlOiBmdW5jdGlvbiAobGluZSwgd2lkdGgsIHhBbGlnbiwgeE9mZnNldCwgeU9mZnNldCkgewogICAgICAgICAgICAgICAgICAgIHZhciB0ZXh0TGluZSA9IEh0bWxVdGlscy5hcHBlbmQodGV4dEJsb2NrLCAiZGl2IiwgInRleHQtbGluZSIpOwogICAgICAgICAgICAgICAgICAgIHRleHRMaW5lLnRleHRDb250ZW50ID0gbGluZTsKICAgICAgICAgICAgICAgICAgICB0ZXh0TGluZS5zdHlsZS53aWR0aCA9IHdpZHRoICsgInB4IjsKICAgICAgICAgICAgICAgICAgICB0ZXh0TGluZS5zdHlsZS50ZXh0QWxpZ24gPSB4QWxpZ247CiAgICAgICAgICAgICAgICAgICAgdGV4dExpbmUuc3R5bGUucG9zaXRpb24gPSAiYWJzb2x1dGUiOwogICAgICAgICAgICAgICAgICAgIHRleHRMaW5lLnN0eWxlLndoaXRlU3BhY2UgPSAibm93cmFwIjsKICAgICAgICAgICAgICAgICAgICB0ZXh0TGluZS5zdHlsZS50b3AgPSB5T2Zmc2V0ICsgInB4IjsKICAgICAgICAgICAgICAgICAgICB0ZXh0TGluZS5zdHlsZS5sZWZ0ID0geE9mZnNldCArICJweCI7CiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICB9OwogICAgICAgIH07CiAgICAgICAgcmV0dXJuI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AgICAgIHZhciBjbGFzc05hbWVzID0gW107CiAgICAgICAgICAgIGZvciAodmFyIF9pID0gMjsgX2kgPCBhcmd1bWVudHMubGVuZ3RoOyBfaSsrKSB7CiAgICAgICAgICAgICAgICBjbGFzc05hbWVzW19pIC0gMl0gPSBhcmd1bWVudHNbX2ldOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciBjaGlsZCA9IFN2Z1V0aWxzLmNyZWF0ZS5hcHBseShTdmdVdGlscywgW3RhZ05hbWVdLmNvbmNhdChjbGFzc05hbWVzKSk7CiAgICAgICAgICAgIGVsZW1lbnQuYXBwZW5kQ2hpbGQoY2hpbGQpOwogICAgICAgICAgICByZXR1cm4gY2hpbGQ7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBDcmVhdGVzIGFuZCByZXR1cm5zIGEgbmV3IFNWR0VsZW1lbnQgd2l0aCB0aGUgYXR0YWNoZWQgY2xhc3NuYW1lcy4KICAgICAgICAgKi8KICAgICAgICBTdmdVdGlscy5jcmVhdGUgPSBmdW5jdGlvbiAodGFnTmFtZSkgewogICAgICAgICAgICB2YXIgY2xhc3NOYW1lcyA9IFtdOwogICAgICAgICAgICBmb3IgKHZhciBfaSA9IDE7IF9pIDwgYXJndW1lbnRzLmxlbmd0aDsgX2krKykgewogICAgICAgICAgICAgICAgY2xhc3NOYW1lc1tfaSAtIDFdID0gYXJndW1lbnRzW19pXTsKICAgICAgICAgICAgfQogICAgICAgICAgICB2YXIgZWxlbWVudCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnROUyhTdmdVdGlscy5TVkdfTlMsIHRhZ05hbWUpOwogICAgICAgICAgICBodG1sJDMuSHRtbFV0aWxzLmFkZENsYXNzZXMuYXBwbHkoaHRtbCQzLkh0bWxVdGlscywgW2VsZW1lbnRdLmNvbmNhdChjbGFzc05hbWVzKSk7CiAgICAgICAgICAgIHJldHVybiBlbGVtZW50OwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0dXJucyB0aGUgd2lkdGgvaGVpZ2h0IG9mIHN2ZyBlbGVtZW50J3MgYm91bmRpbmcgYm94CiAgICAgICAgICovCiAgICAgICAgU3ZnVXRpbHMuZ2V0RGltZW5zaW9ucyA9IGZ1bmN0aW9uIChlbGVtZW50KSB7CiAgICAgICAgICAgIC8vIHVzaW5nIGZlYXR1cmUgZGV0ZWN0aW9uLCBzYWZlbHkgcmV0dXJuIHRoZSBib3VuZGluZyBib3ggZGltZW5zaW9ucyBvZiB0aGUKICAgICAgICAgICAgLy8gcHJvdmlkZWQgc3ZnIGVsZW1lbnQKICAgICAgICAgICAgaWYgKGVsZW1lbnQuZ2V0QkJveCkgewogICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICB2YXIgX2EgPSBlbGVtZW50LmdldEJCb3goKSwgd2lkdGggPSBfYS53aWR0aCwgaGVpZ2h0ID0gX2EuaGVpZ2h0OwogICAgICAgICAgICAgICAgICAgIC8vIGNvcHkgdG8gcHJldmVudCBOb01vZGlmaWNhdGlvbkFsbG93ZWRFcnJvcgogICAgICAgICAgICAgICAgICAgIHJldHVybiB7IHdpZHRoOiB3aWR0aCwgaGVpZ2h0OiBoZWlnaHQgfTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGNhdGNoIChlcnIpIHsKICAgICAgICAgICAgICAgICAgICAvLyBzd2FsbG93IGFueSBlcnJvcnMgdGhhdCBvY2N1ciAoRmlyZWZveCBMaW51eCkKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBpZiBjYW4ndCBnZXQgdmFsaWQgYmJveCwgcmV0dXJuIDAsMAogICAgICAgICAgICByZXR1cm4geyBoZWlnaHQ6IDAsIHdpZHRoOiAwIH07CiAgICAgICAgfTsKICAgICAgICByZXR1cm4gU3ZnVXRpbHM7CiAgICB9KCkpOwogICAgU3ZnVXRpbHMuU1ZHX05TID0gImh0dHA6Ly93d3cudzMub3JnLzIwMDA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bGVtZW50KSwgcGFyZW50RWxlbWVudCA9IF9hLnBhcmVudEVsZW1lbnQsIGNvbnRhaW5lckVsZW1lbnQgPSBfYS5jb250YWluZXJFbGVtZW50LCB0ZXh0RWxlbWVudCA9IF9hLnRleHRFbGVtZW50OwogICAgICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uICh0ZXh0KSB7CiAgICAgICAgICAgICAgICAgICAgcGFyZW50RWxlbWVudC5hcHBlbmRDaGlsZChjb250YWluZXJFbGVtZW50KTsKICAgICAgICAgICAgICAgICAgICB0ZXh0RWxlbWVudC50ZXh0Q29udGVudCA9IHRleHQ7CiAgICAgICAgICAgICAgICAgICAgdmFyIGRpbWVuc2lvbnMgPSBTdmdVdGlscy5nZXREaW1lbnNpb25zKHRleHRFbGVtZW50KTsKICAgICAgICAgICAgICAgICAgICBwYXJlbnRFbGVtZW50LnJlbW92ZUNoaWxkKGNvbnRhaW5lckVsZW1lbnQpOyAvLyBlbGVtZW50LnJlbW92ZSgpIGRvZXNuJ3Qgd29yayBpbiBJRTExCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGRpbWVuc2lvbnM7CiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9OwogICAgICAgICAgICB0aGlzLmNyZWF0ZVBlbiA9IGZ1bmN0aW9uICh0ZXh0LCB0cmFuc2Zvcm0sIGVsZW1lbnQpIHsKICAgICAgICAgICAgICAgIGlmIChlbGVtZW50ID09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICBlbGVtZW50ID0gX3RoaXMuZWxlbWVudDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHZhciB0ZXh0Q29udGFpbmVyID0gU3ZnVXRpbHMuYXBwZW5kKGVsZW1lbnQsICJnIiwgInRleHQtY29udGFpbmVyIiwgX3RoaXMuY2xhc3NOYW1lKTsKICAgICAgICAgICAgICAgIC8vIGF0dGFjaCBvcHRpb25hbCB0aXRsZQogICAgICAgICAgICAgICAgaWYgKF90aGlzLmFkZFRpdGxlRWxlbWVudCkgewogICAgICAgICAgICAgICAgICAgIFN2Z1V0aWxzLmFwcGVuZCh0ZXh0Q29udGFpbmVyLCAidGl0bGUiKS50ZXh0Q29udGVudCA9IHRleHQ7CiAgICAgICAgICAgICAgICAgICAgdGV4dENvbnRhaW5lci5zZXRBdHRyaWJ1dGUoInRpdGxlIiwgdGV4dCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvLyBjcmVhdGUgYW5kIHRyYW5zZm9ybSB0ZXh0IGJsb2NrIGdyb3VwCiAgICAgICAgICAgICAgICB2YXIgdGV4dEJsb2NrR3JvdXAgPSBTdmdVdGlscy5hcHBlbmQodGV4dENvbnRhaW5lciwgImciLCAidGV4dC1hcmVhIik7CiAgICAgICAgICAgICAgICB0ZXh0QmxvY2tHcm91cC5zZXRBdHRyaWJ1dGUoInRyYW5zZm9ybSIsICJ0cmFuc2xhdGUoIiArIHRyYW5zZm9ybS50cmFuc2xhdGVbMF0gKyAiLCIgKyB0cmFuc2Zvcm0udHJhbnNsYXRlWzFdICsgIikiICsKICAgICAgICAgICAgICAgICAgICAoInJvdGF0ZSgiICsgdHJhbnNmb3JtLnJvdGF0ZSArICIpIikpOwogICAgICAgICAgICAgICAgcmV0dXJuIF90aGlzLmNyZWF0ZVN2Z0xpbmVQZW4odGV4dEJsb2NrR3JvdXApOwogICAgICAgICAgICB9OwogICAgICAgIH0KICAgICAgICBTdmdDb250ZXh0LnByb3RvdHlwZS5zZXRBZGRUaXRsZUVsZW1lbnQgPSBmdW5jdGlvbiAoYWRkVGl0bGVFbGVtZW50KSB7CiAgICAgICAgICAgIHRoaXMuYWRkVGl0bGVFbGVtZW50ID0gYWRkVGl0bGVFbGVtZW50OwogICAgICAgIH07CiAgICAgICAgU3ZnQ29udGV4dC5wcm90b3R5cGUuY3JlYXRlU3ZnTGluZVBlbiA9IGZ1bmN0aW9uICh0ZXh0QmxvY2tHcm91cCkgewogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgd3JpdGU6IGZ1bmN0aW9uIChsaW5lLCB3aWR0aCwgeEFsaWduLCB4T2Zmc2V0LCB5T2Zmc2V0KSB7CiAgICAgICAgICAgICAgICAgICAgeE9mZnNldCArPSB3aWR0aCAqIHdyaXRlcnMuV3JpdGVyLlhPZmZzZXRGYWN0b3JbeEFsaWduXTsKICAgICAgICAgICAgICAgICAgICB2YXIgZWxlbWVudCA9IFN2Z1V0aWxzLmFwcGVuZCh0ZXh0QmxvY2tHcm91cCwgInRleHQiLCAidGV4dC1saW5lIik7CiAgICAgICAgICAgICAgICAgICAgZWxlbWVudC50ZXh0Q29udGVudCA9IGxpbmU7CiAgICAgICAgICAgICAgICAgICAgZWxlbWVudC5zZXRBdHRyaWJ1dGUoInRleHQtYW5jaG9yIiwgU3ZnQ29udGV4dC5BbmNob3JNYXBbeEFsaWduXSk7CiAgICAgICAgICAgICAgICAgICAgZWxlbWVudC5zZXRBdHRyaWJ1dGUoInRyYW5zZm9ybSIsICJ0cmFuc2xhdGUoIiArIHhPZmZzZXQgKyAiLCIgKyB5T2Zmc2V0ICsgIikiKTsKICAgICAgICAgICAgICAgICAgICBlbGVtZW50LnNldEF0dHJpYnV0ZSgieSIsICItMC4yNWVtIik7CiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICB9OwogICAgICAgIH07CiAgICAgICAgU3ZnQ29udGV4dC5wcm90b3R5cGUuZ2V0VGV4dEVsZW1lbnRzID0gZnVuY3Rpb24gKGVsZW1lbnQpIHsKICAgICAgICAgICAgLy8gaWYgZWxlbWVudCBpcyBhbHJlYWR5IGEgdGV4dCBlbGVtZW50LCByZXR1cm4gaXQKICAgICAgICAgICAgaWYgKGVsZW1lbnQudGFnTmFtZSA9PT0gInRleHQiKSB7CiAgICAgICAgICAgICAgICB2YXIgcGFyZW50RWxlbWVudCA9IGVsZW1lbnQucGFyZW50RWxlbWVudDsKICAgICAgICAgICAgICAgIGlmIChwYXJlbnRFbGVtZW50ID09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICBwYXJlbnRFbGVtZW50ID0gZWxlbWVudC5wYXJlbnROb2RlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLy8gbXVzdCBiZSByZW1vdmVkIGZyb20gcGFyZW50IHNpbmNlIHdlIHJlLWFkZCBpdCBvbiBldmVyeSBtZWFzdXJlbWVudAogICAgICAgICAgICAgICAgcGFyZW50RWxlbWVudC5yZW1vdmVDaGlsZChlbGVtZW50KTsKICAgICAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAgICAgY29udGFpbmVyRWxlbWVudDogZWxlbWVudCwKICAgICAgICAgICAgICAgICAgICBwYXJlbnRFbGVtZW50OiBwYXJlbnRFbGVtZW50LAogICAgICAgICAgICAgICAgICAgIHRleHRFbGVtZW50OiBlbGVtZW50LAogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBpZiBlbGVtZW50IGhhcyBhIHRleHQgZWxlbWVudCBkZXNjZW5kZW50LCBzZWxlY3QgaXQgYW5kIHJldHVybiBpdAogICAgICAgICAgICB2YXIgc2VsZWN0ZWQgPSBlbGVtZW50LnF1ZXJ5U2VsZWN0b3IoInRleHQiKTsKICAgICAgICAgICAgaWYgKHNlbGVjdGVkICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIHZhciBwYXJlbnRFbGVtZW50ID0gc2VsZWN0ZWQucGFyZW50RWxlbWVudDsKICAgICAgICAgICAgICAgIGlmIChwYXJlbnRFbGVtZW50ID09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICBwYXJlbnRFbGVtZW50ID0gc2VsZWN0ZWQucGFyZW50Tm9kZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vIG11c3QgYmUgcmVtb3ZlZCBmcm9tIHBhcmVudCBzaW5jZSB3ZSByZS1hZGQgaXQgb24gZXZlcnkgbWVhc3VyZW1lbnQKICAgICAgICAgICAgICAgIHBhcmVudEVsZW1lbnQucmVtb3ZlQ2hpbGQoc2VsZWN0ZWQpOwogICAgICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgICAgICBjb250YWluZXJFbGVtZW50OiBzZWxlY3RlZCwKICAgICAgICAgICAgICAgICAgICBwYXJlbnRFbGVtZW50OiBwYXJlbnRFbGVtZW50LAogICAgICAgICAgICAgICAgICAgIHRleHRFbGVtZW50OiBzZWxlY3RlZCwKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gb3RoZXJ3aXNlIGNyZWF0ZSBhIG5ldyB0ZXh0IGVsZW1lbnQKICAgICAgICAgICAgdmFyIGNyZWF0ZWQgPSBTdmdVdGlscy5jcmVhdGUoInRleHQiLCB0aGlzLmNsYXNzTmFtZSk7CiAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICBjb250YWluZXJFbGVtZW50OiBjcmVhdGVkLAogICAgICAgICAgICAgICAgcGFyZW50RWxlbWVudDogZWxlbWVudCwKICAgICAgICAgICAgICAgIHRleHRFbGVtZW50OiBjcmVhdGVkLAogICAgICAgICAgICB9OwogICAgICAgIH07CiAgICAgICAgcmV0dXJuIFN2Z0NvbnRleHQ7CiAgICB9KCkpOwogICAgU3ZnQ29udGV4dC5BbmNob3JNYXAgPSB7CiAgICAgICAgY2VudGVyOiAibWlkZGxlIiwKICAgICAgICBsZWZ0OiAic3RhcnQiLAogICAgICAgIHJpZ2h0OiAiZW5kIiwKICAgIH07CiAgICBleHBvcnRzLlN2Z0NvbnRleHQgPSBTdmdDb250ZXh0OwoKICAgIH0pOwoKICAgIHZhciBjYW52YXMgPSBjcmVhdGVDb21tb25qc01vZHVsZShmdW5jdGlvbiAobW9kdWxlLCBleHBvcnRzKSB7CiAgICAvKioKICAgICAqIENvcHlyaWdodCAyMDE3LXByZXNlbnQgUGFsYW50aXIgVGVjaG5vbG9naWVzLCBJbmMuIEFsbCByaWdodHMgcmVzZXJ2ZWQuCiAgICAg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5lSGVpZ2h0OwogICAgICAgICAgICB0aGlzLnN0eWxlID0gc3R5bGU7CiAgICAgICAgICAgIHRoaXMuY3JlYXRlUnVsZXIgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24gKHRleHQpIHsKICAgICAgICAgICAgICAgICAgICBfdGhpcy5jdHguZm9udCA9IF90aGlzLnN0eWxlLmZvbnQ7CiAgICAgICAgICAgICAgICAgICAgdmFyIHdpZHRoID0gX3RoaXMuY3R4Lm1lYXN1cmVUZXh0KHRleHQpLndpZHRoOwogICAgICAgICAgICAgICAgICAgIHJldHVybiB7IHdpZHRoOiB3aWR0aCwgaGVpZ2h0OiBfdGhpcy5saW5lSGVpZ2h0IH07CiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9OwogICAgICAgICAgICB0aGlzLmNyZWF0ZVBlbiA9IGZ1bmN0aW9uIChfdGV4dCwgdHJhbnNmb3JtLCBjdHgpIHsKICAgICAgICAgICAgICAgIGlmIChjdHggPT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIGN0eCA9IF90aGlzLmN0eDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGN0eC5zYXZlKCk7CiAgICAgICAgICAgICAgICBjdHgudHJhbnNsYXRlKHRyYW5zZm9ybS50cmFuc2xhdGVbMF0sIHRyYW5zZm9ybS50cmFuc2xhdGVbMV0pOwogICAgICAgICAgICAgICAgY3R4LnJvdGF0ZSh0cmFuc2Zvcm0ucm90YXRlICogTWF0aC5QSSAvIDE4MC4wKTsKICAgICAgICAgICAgICAgIHJldHVybiBfdGhpcy5jcmVhdGVDYW52YXNQZW4oY3R4KTsKICAgICAgICAgICAgfTsKICAgICAgICAgICAgaWYgKHRoaXMuc3R5bGUuZmlsbCA9PT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgICAgICB0aGlzLnN0eWxlLmZpbGwgPSBERUZBVUxUX0ZJTExfQ09MT1I7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgQ2FudmFzQ29udGV4dC5wcm90b3R5cGUuY3JlYXRlQ2FudmFzUGVuID0gZnVuY3Rpb24gKGN0eCkgewogICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgZGVzdHJveTogZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgICAgIGN0eC5yZXN0b3JlKCk7CiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgd3JpdGU6IGZ1bmN0aW9uIChsaW5lLCB3aWR0aCwgeEFsaWduLCB4T2Zmc2V0LCB5T2Zmc2V0KSB7CiAgICAgICAgICAgICAgICAgICAgeE9mZnNldCArPSB3aWR0aCAqIHdyaXRlcnMuV3JpdGVyLlhPZmZzZXRGYWN0b3JbeEFsaWduXTsKICAgICAgICAgICAgICAgICAgICBjdHgudGV4dEFsaWduID0geEFsaWduOwogICAgICAgICAgICAgICAgICAgIGlmIChfdGhpcy5zdHlsZS5mb250ICE9IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICAgICAgY3R4LmZvbnQgPSBfdGhpcy5zdHlsZS5mb250OwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBpZiAoX3RoaXMuc3R5bGUuZmlsbCAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGN0eC5maWxsU3R5bGUgPSBfdGhpcy5zdHlsZS5maWxsOwogICAgICAgICAgICAgICAgICAgICAgICBjdHguZmlsbFRleHQobGluZSwgeE9mZnNldCwgeU9mZnNldCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGlmIChfdGhpcy5zdHlsZS5zdHJva2UgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgICAgICBjdHguc3Ryb2tlU3R5bGUgPSBfdGhpcy5zdHlsZS5maWxsOwogICAgICAgICAgICAgICAgICAgICAgICBjdHguc3Ryb2tlVG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HMpIHsKICAgIC8qKgogICAgICogQ29weXJpZ2h0IDIwMTctcHJlc2VudCBQYWxhbnRpciBUZWNobm9sb2dpZXMsIEluYy4gQWxsIHJpZ2h0cyByZXNlcnZlZC4KICAgICAqIExpY2Vuc2VkIHVuZGVyIHRoZSBNSVQgTGljZW5zZSAodGhlICJMaWNlbnNlIik7IHlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUKICAgICAqIGxpY2Vuc2UgYXQgaHR0cHM6Ly9naXRodWIuY29tL3BhbGFudGlyL3R5cGVzZXR0YWJsZS9ibG9iL2RldmVsb3AvTElDRU5TRQogICAgICovCiAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgIl9fZXNNb2R1bGUiLCB7IHZhbHVlOiB0cnVlIH0pOwogICAgdmFyIEFic3RyYWN0TWVhc3VyZXIgPSAoZnVuY3Rpb24gKCkgewogICAgICAgIGZ1bmN0aW9uIEFic3RyYWN0TWVhc3VyZXIocnVsZXIpIHsKICAgICAgICAgICAgaWYgKHJ1bGVyLmNyZWF0ZVJ1bGVyICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIHRoaXMucnVsZXIgPSBydWxlci5jcmVhdGVSdWxlcigpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5ydWxlciA9IHJ1bGVyOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIEFic3RyYWN0TWVhc3VyZXIucHJvdG90eXBlLm1lYXN1cmUgPSBmdW5jdGlvbiAodGV4dCkgewogICAgICAgICAgICBpZiAodGV4dCA9PT0gdm9pZCAwKSB7IHRleHQgPSBBYnN0cmFjdE1lYXN1cmVyLkhFSUdIVF9URVhUOyB9CiAgICAgICAgICAgIHJldHVybiB0aGlzLnJ1bGVyKHRleHQpOwogICAgICAgIH07CiAgICAgICAgcmV0dXJuIEFic3RyYWN0TWVhc3VyZXI7CiAgICB9KCkpOwogICAgLyoqCiAgICAgKiBB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1bmN0aW9uICh0ZXh0KSB7CiAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7CiAgICAgICAgICAgIGlmICh0ZXh0ID09PSB2b2lkIDApIHsgdGV4dCA9IGFic3RyYWN0TWVhc3VyZXIuQWJzdHJhY3RNZWFzdXJlci5IRUlHSFRfVEVYVDsgfQogICAgICAgICAgICBpZiAodGV4dC50cmltKCkgPT09ICIiKSB7CiAgICAgICAgICAgICAgICByZXR1cm4geyB3aWR0aDogMCwgaGVpZ2h0OiAwIH07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIGxpbmVzRGltZW5zaW9ucyA9IHRleHQudHJpbSgpLnNwbGl0KCJcbiIpLm1hcChmdW5jdGlvbiAobGluZSkgeyByZXR1cm4gX3RoaXMuX21lYXN1cmVMaW5lKGxpbmUpOyB9KTsKICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIGhlaWdodDogbGluZXNEaW1lbnNpb25zLnJlZHVjZShmdW5jdGlvbiAoYWNjLCBkaW0pIHsgcmV0dXJuIGFjYyArIGRpbS5oZWlnaHQ7IH0sIDApLAogICAgICAgICAgICAgICAgd2lkdGg6IGxpbmVzRGltZW5zaW9ucy5yZWR1Y2UoZnVuY3Rpb24gKGFjYywgZGltKSB7IHJldHVybiBNYXRoLm1heChhY2MsIGRpbS53aWR0aCk7IH0sIDApLAogICAgICAgICAgICB9OwogICAgICAgIH07CiAgICAgICAgTWVhc3VyZXIucHJvdG90eXBlLmdldEd1YXJkV2lkdGggPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmd1YXJkV2lkdGggPT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5ndWFyZFdpZHRoID0gX3N1cGVyLnByb3RvdHlwZS5tZWFzdXJlLmNhbGwodGhpcykud2lkdGg7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXMuZ3VhcmRXaWR0aDsKICAgICAgICB9OwogICAgIC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gfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuX21heExpbmVzID0gbm9MaW5lczsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBXcmFwcGVyLnByb3RvdHlwZS50ZXh0VHJpbW1pbmcgPSBmdW5jdGlvbiAob3B0aW9uKSB7CiAgICAgICAgICAgIGlmIChvcHRpb24gPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3RleHRUcmltbWluZzsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIGlmIChvcHRpb24gIT09ICJlbGxpcHNpcyIgJiYgb3B0aW9uICE9PSAibm9uZSIpIHsKICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3Iob3B0aW9uICsgIiAtIHVuc3VwcG9ydGVkIHRleHQgdHJpbW1pbmcgb3B0aW9uLiIpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdGhpcy5fdGV4dFRyaW1taW5nID0gb3B0aW9uOwogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIFdyYXBwZXIucHJvdG90eXBlLmFsbG93QnJlYWtpbmdXb3JkcyA9IGZ1bmN0aW9uIChhbGxvdykgewogICAgICAgICAgICBpZiAoYWxsb3cgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2FsbG93QnJlYWtpbmdXb3JkczsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuX2FsbG93QnJlYWtpbmdXb3JkcyA9IGFsbG93OwogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIFdyYXBwZXIucHJvdG90eXBlLndyYXAgPSBmdW5jdGlvbiAodGV4dCwgbWVhc3VyZXIsIHdpZHRoLCBoZWlnaHQpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgaWYgKGhlaWdodCA9PT0gdm9pZCAwKSB7IGhlaWdodCA9IEluZmluaXR5OyB9CiAgICAgICAgICAgIHZhciBpbml0aWFsV3JhcHBpbmdSZXN1bHQgPSB7CiAgICAgICAgICAgICAgICBub0Jyb2tlV29yZHM6IDAsCiAgICAgICAgICAgICAgICBub0xpbmVzOiAwLAogICAgICAgICAgICAgICAgb3JpZ2luYWxUZXh0OiB0ZXh0LAogICAgICAgICAgICAgICAgdHJ1bmNhdGVkVGV4dDogIiIsCiAgICAgICAgICAgICAgICB3cmFwcGVkVGV4dDogIiIsCiAgICAgICAgICAgIH07CiAgICAgICAgICAgIHZhciBzdGF0ZSA9IHsKICAgICAgICAgICAgICAgIGF2YWlsYWJsZUxpbmVzOiBNYXRoLm1pbihNYXRoLmZsb29yKGhlaWdodCAvIG1lYXN1cmVyLm1lYXN1cmUoKS5oZWlnaHQpLCB0aGlzLl9tYXhMaW5lcyksCiAgICAgICAgICAgICAgICBhdmFpbGFibGVXaWR0aDogd2lkdGgsCiAgICAgICAgICAgICAgICBjYW5GaXRUZXh0OiB0cnVlLAogICAgICAgICAgICAgICAgY3VycmVudExpbmU6ICIiLAogICAgICAgICAgICAgICAgd3JhcHBpbmc6IGluaXRpYWxXcmFwcGluZ1Jlc3VsdCwKICAgICAgICAgICAgfTsKICAgICAgICAgICAgdmFyIGxpbmVzID0gdGV4dC5zcGxpdCgiXG4iKTsKICAgICAgICAgICAgcmV0dXJuIGxpbmVzLnJlZHVjZShmdW5jdGlvbiAocywgbGluZSwgaSkgewogICAgICAgICAgICAgICAgcmV0dXJuIF90aGlzLmJyZWFrTGluZVRvRml0V2lkdGgocywgbGluZSwgaSAhPT0gbGluZXMubGVuZ3RoIC0gMSwgbWVhc3VyZXIpOwogICAgICAgICAgICB9LCBzdGF0ZSkud3JhcHBpbmc7CiAgICAgICAgfTsKICAgICAgICBXcmFwcGVyLnByb3RvdHlwZS5icmVha0xpbmVUb0ZpdFdpZHRoID0gZnVuY3Rpb24gKHN0YXRlLCBsaW5lLCBoYXNOZXh0TGluZSwgbWVhc3VyZXIpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgaWYgKCFzdGF0ZS5jYW5GaXRUZXh0ICYmIHN0YXRlLndyYXBwaW5nLnRydW5jYXRlZFRleHQgIT09ICIiKSB7CiAgICAgICAgICAgICAgICBzdGF0ZS53cmFwcGluZy50cnVuY2F0ZWRUZXh0ICs9ICJcbiI7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIHRva2VucyA9IHRoaXMuX3Rva2VuaXplci50b2tlbml6ZShsaW5lKTsKICAgICAgICAgICAgc3RhdGUgPSB0b2tlbnMucmVkdWNlKGZ1bmN0aW9uIChzLCB0b2tlbikgewogICAgICAgICAgICAgICAgcmV0dXJuIF90aGlzLndyYXBOZXh0VG9rZW4odG9rZW4sIHMsIG1lYXN1cmVyKTsKICAgICAgICAgICAgfSwgc3RhdGUpOwogICAgICAgICAgICB2YXIgd3JhcHBlZFRleHQgPSB1dGlscy5TdHJpbmdNZXRob2RzLnRyaW1FbmQoc3RhdGUuY3VycmVudExpbmUpOwogICAgICAgICAgICBzdGF0ZS53cmFwcGluZy5ub0xpbmVzICs9ICsod3JhcHBlZFRleHQgIT09ICIiKTsKICAgICAgICAgICAgaWYgKHN0YXRlLndyYXBwaW5nLm5vTGluZXMgPT09IHN0YXRlLmF2YWlsYWJsZUxpbmVzICYmIHRoaXMuX3RleHRUcmltbWluZyAhPT0gIm5vbmUiICYmIGhhc05leHRMaW5lKSB7CiAgICAgICAgICAgICAgICAvLyBOb3RlOiBubyBuZWVkIHRvIGFkZCBtb3JlIGVsbGlwc2VzLCB0aGV5IHdlcmUgYWRkZWQgaW4gYHdyYXBOZXh0VG9rZW5gCiAgICAgICAgICAgICAgICBzdGF0ZS5jYW5GaXRUZXh0ID0gZmFsc2U7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBzdGF0ZS53cmFwcGluZy53cmFwcGVkVGV4dCArPSB3cmFwcGVkVGV4dDsKICAgICAgICAgICAgfQogICAgICAgICAgICBzdGF0ZS5jdXJyZW50TGluZSA9ICJcbiI7CiAgICAgICAgICAgIHJldHVybiBzdGF0ZTsKICAgICAgICB9OwogICAgICAgIFdyYXBwZXIucHJvdG90eXBlLmNhbkZpdFRva2VuID0gZnVuY3Rpb24gKHRva2VuLCB3aWR0aCwgbWVhc3VyZXIpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgdmFyIHBvc3NpYmxlQnJlYWtzID0gdG9rZW4uc3BsaXQoIiIpLm1hcChmdW5jdGlvbiAoYywgaSkgeyByZXR1cm4gKGkgIT09IHRva2VuLmxlbmd0aCAtIDEpID8gYyArIF90aGlzLl9icmVha2luZ0NoYXJhY3RlciA6IGM7IH0pOwogICAgICAgICAgICByZXR1cm4gKG1lYXN1cmVyLm1lYXN1cmUodG9rZW4pLndpZHRoIDw9IHdpZHRoKSB8fCBwb3NzaWJsZUJyZWFrcy5ldmVyeShmdW5jdGlvbiAoYykgeyByZXR1cm4gbWVhc3VyZXIubWVhc3VyZShjKS53aWR0aCA8PSB3aWR0aDsgfSk7CiAgICAgICAgfTsKICAgICAgICBXcmFwcGVyLnByb3RvdHlwZS5hZGRFbGxpcHNpcyA9IGZ1bmN0aW9uIChsaW5lLCB3aWR0aCwgbWVhc3VyZXIpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX3RleHRUcmltbWluZyA9PT0gIm5vbmUiKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgICAgIHJlbWFpbmluZ1Rva2VuOiAiIiwKICAgICAgICAgICAgICAgICAgICB3cmFwcGVkVG9rZW46IGxpbmUsCiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciB0cnVuY2F0ZWRMaW5lID0gbGluZS5zdWJzdHJpbmcoMCkudHJpbSgpOwogICAgICAgICAgICB2YXIgbGluZVdpZHRoID0gbWVhc3VyZXIubWVhc3VyZSh0cnVuY2F0ZWRMaW5lKS53aWR0aDsKICAgICAgICAgICAgdmFyIGVsbGlwc2VzV2lkdGggPSBtZWFzdXJlci5tZWFzdXJlKCIuLi4iKS53aWR0aDsKICAgICAgICAgICAgdmFyIHByZWZpeCA9IChsaW5lLmxlbmd0aCA+IDAgJiYgbGluZVswXSA9PT0gIlxuIikgPyAiXG4iIDogIiI7CiAgICAgICAgICAgIGlmICh3aWR0aCA8PSBlbGxpcHNlc1dpZHRoKSB7CiAgICAgICAgICAgICAgICB2YXIgcGVyaW9kV2lkdGggPSBlbGxpcHNlc1dpZHRoIC8gMzsKICAgICAgICAgICAgICAgIHZhciBudW1QZXJpb2RzVGhhdEZpdCA9IE1hdGguZmxvb3Iod2lkdGggLyBwZXJpb2RXaWR0aCk7CiAgICAgICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgICAgIHJlbWFpbmluZ1Rva2VuOiBsaW5lLAogICAgICAgICAgICAgICAgICAgIHdyYXBwZWRUb2tlbjogcHJlZml4ICsgIi4uLiIuc3Vic3RyKDAsIG51bVBlcmlvZHNUaGF0Rml0KSwKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgd2hpbGUgKGxpbmVXaWR0aCArIGVsbGlwc2VzV2lkdGggPiB3aWR0aCkgewogICAgICAgICAgICAgICAgdHJ1bmNhdGVkTGluZSA9IHV0aWxzLlN0cmluZ01ldGhvZHMudHJpbUVuZCh0cnVuY2F0ZWRMaW5lLnN1YnN0cigwLCB0cnVuY2F0ZWRMaW5lLmxlbmd0aCAtIDEpKTsKICAgICAgICAgICAgICAgIGxpbmVXaWR0aCA9IG1lYXN1cmVyLm1lYXN1cmUodHJ1bmNhdGVkTGluZSkud2lkdGg7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIHJlbWFpbmluZ1Rva2VuOiB1dGlscy5TdHJpbmdNZXRob2RzLnRyaW1FbmQobGluZS5zdWJzdHJpbmcodHJ1bmNhdGVkTGluZS5sZW5ndGgpLCAiLSIpLnRyaW0oKSwKICAgICAgICAgICAgICAgIHdyYXBwZWRUb2tlbjogcHJlZml4ICsgdHJ1bmNhdGVkTGluZSArICIuLi4iLAogICAgICAgICAgICB9OwogICAgICAgIH07CiAgICAgICAgV3JhcHBlci5wcm90b3R5cGUud3JhcE5leHRUb2tlbiA9IGZ1bmN0aW9uICh0b2tlbiwgc3RhdGUsIG1lYXN1cmVyKSB7CiAgICAgICAgICAgIGlmICghc3RhdGUuY2FuRml0VGV4dCB8fAogICAgICAgICAgICAgICAgc3RhdGUuYXZhaWxhYmxlTGluZXMgPT09IHN0YXRlLndyYXBwaW5nLm5vTGluZXMgfHwKICAgICAgICAgICAgICAgICF0aGlzLmNhbkZpdFRva2VuKHRva2VuLCBzdGF0ZS5hdmFpbGFibGVXaWR0aCwgbWVhc3VyZXIpKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5maW5pc2hXcmFwcGluZyh0b2tlbiwgc3RhdGUsIG1lYXN1cmVyKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB2YXIgcmVtYWluaW5nVG9rZW4gPSB0b2tlbjsKICAgICAgICAgICAgd2hpbGUgKHJlbWFpbmluZ1Rva2VuKSB7CiAgICAgICAgICAgICAgICB2YXIgcmVzdWx0ID0gdGhpcy5icmVha1Rva2VuVG9GaXRJbldpZHRoKHJlbWFpbmluZ1Rva2VuLCBzdGF0ZS5jdXJyZW50TGluZSwgc3RhdGUuYXZhaWxhYmxlV2lkdGgsIG1lYXN1cmVyKTsKICAgICAgICAgICAgICAgIHN0YXRlLmN1cnJlbnRMaW5lID0gcmVzdWx0LmxpbmU7CiAgICAgICAgICAgICAgICByZW1haW5pbmdUb2tlbiA9IHJlc3VsdC5yZW1haW5pbmdUb2tlbjsKICAgICAgICAgICAgICAgIGlmIChyZW1haW5pbmdUb2tlbiAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgc3RhdGUud3JhcHBpbmcubm9Ccm9rZVdvcmRzICs9ICtyZXN1bHQuYnJlYWtXb3JkOwogICAgICAgICAgICAgICAgICAgICsrc3RhdGUud3JhcHBpbmcubm9MaW5lczsKICAgICAgICAgICAgICAgICAgICBpZiAoc3RhdGUuYXZhaWxhYmxlTGluZXMgPT09IHN0YXRlLndyYXBwaW5nLm5vTGluZXMpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGVsbGlwc2lzUmVzdWx0ID0gdGhpcy5hZGRFbGxpcHNpcyhzdGF0ZS5jdXJyZW50TGluZSwgc3RhdGUuYXZhaWxhYmxlV2lkdGgsIG1lYXN1cmVyKTsKICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGUud3JhcHBpbmcud3JhcHBlZFRleHQgKz0gZWxsaXBzaXNSZXN1bHQud3JhcHBlZFRva2VuOwogICAgICAgICAgICAgICAgICAgICAgICBzdGF0ZS53cmFwcGluZy50cnVuY2F0ZWRUZXh0ICs9IGVsbGlwc2lzUmVzdWx0LnJlbWFpbmluZ1Rva2VuICsgcmVtYWluaW5nVG9rZW47CiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRlLmN1cnJlbnRMaW5lID0gIlxuIjsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHN0YXRlOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGUud3JhcHBpbmcud3JhcHBlZFRleHQgKz0gdXRpbHMuU3RyaW5nTWV0aG9kcy50cmltRW5kKHN0YXRlLmN1cnJlbnRMaW5lKTsKICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGUuY3VycmVudExpbmUgPSAiXG4iOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gc3RhdGU7CiAgICAgICAgfTsKICAgICAgICBXcmFwcGVyLnByb3RvdHlwZS5maW5pc2hXcmFwcGluZyA9IGZ1bmN0aW9uICh0b2tlbiwgc3RhdGUsIG1lYXN1cmVyKSB7CiAgICAgICAgICAgIC8vIFRva2VuIGlzIHJlYWxseSBsb25nLCBidXQgd2UgaGF2ZSBhIHNwYWNlIHRvIHB1dCBwYXJ0IG9mIHRoZSB3b3JkLgogICAgICAgICAgICBpZiAoc3RhdGUuY2FuRml0VGV4dCAmJgogICAgICAgICAgICAgICAgc3RhdGUuYXZhaWxhYmxlTGluZXMgIT09IHN0YXRlLndyYXBwaW5nLm5vTGluZXMgJiYKICAgICAgICAgICAgICAgIHRoaXMuX3RleHRUcmltbWluZyAhPT0gIm5vbmUiKSB7CiAgICAgICAgICAgICAgICB2YXIgcmVzID0gdGhpcy5hZGRFbGxpcHNpcyhzdGF0ZS5jdXJyZW50TGluZSArIHRva2VuLCBzdGF0ZS5hdmFpbGFibGVXaWR0aCwgbWVhc3VyZXIpOwogICAgICAgICAgICAgICAgc3RhdGUud3JhcHBpbmcud3JhcHBlZFRleHQgKz0gcmVzLndyYXBwZWRUb2tlbjsKICAgICAgICAgICAgICAgIHN0YXRlLndyYXBwaW5nLnRydW5jYXRlZFRleHQgKz0gcmVzLnJlbWFpbmluZ1Rva2VuOwogICAgICAgICAgICAgICAgc3RhdGUud3JhcHBpbmcubm9Ccm9rZVdvcmRzICs9ICsocmVzLnJlbWFpbmluZ1Rva2VuLmxlbmd0aCA8IHRva2VuLmxlbmd0aCk7CiAgICAgICAgICAgICAgICBzdGF0ZS53cmFwcGluZy5ub0xpbmVzICs9ICsocmVzLndyYXBwZWRUb2tlbi5sZW5ndGggPiAwKTsKICAgICAgICAgICAgICAgIHN0YXRlLmN1cnJlbnRMaW5lID0gIiI7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBzdGF0ZS53cmFwcGluZy50cnVuY2F0ZWRUZXh0ICs9IHRva2VuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHN0YXRlLmNhbkZpdFRleHQgPSBmYWxzZTsKICAgICAgICAgICAgcmV0dXJuIHN0YXRlOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogQnJlYWtzIHNpbmdsZSB0b2tlbiB0byBmaXQgY3VycmVudCBsaW5lLgogICAgICAgICAqIElmIHRva2VuIGNvbnRhaW5zIG9ubHkgd2hpdGVzcGFjZXMgdGhlbiB0aGV5IHdpbGwgbm90IGJlIHBvcHVsYXRlZCB0byBuZXh0IGxpbmUuCiAgICAgICAgICovCiAgICAgICAgV3JhcHBlci5wcm90b3R5cGUuYnJlYWtUb2tlblRvRml0SW5XaWR0aCA9IGZ1bmN0aW9uICh0b2tlbiwgbGluZSwgYXZhaWxhYmxlV2lkdGgsIG1lYXN1cmVyLCBicmVha2luZ0NoYXJhY3RlcikgewogICAgICAgICAgICBpZiAoYnJlYWtpbmdDaGFyYWN0ZXIgPT09IHZvaWQgMCkgeyBicmVha2luZ0NoYXJhY3RlciA9IHRoaXMuX2JyZWFraW5nQ2hhcmFjdGVyOyB9CiAgICAgICAgICAgIGlmIChtZWFzdXJlci5tZWFzdXJlKGxpbmUgKyB0b2tlbikud2lkdGggPD0gYXZhaWxhYmxlV2lkdGgpIHsKICAgICAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAgICAgYnJlYWtXb3JkOiBmYWxzZSwKICAgICAgICAgICAgICAgICAgICBsaW5lOiBsaW5lICsgdG9rZW4sCiAgICAgICAgICAgICAgICAgICAgcmVtYWluaW5nVG9rZW46IG51bGwsCiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0b2tlbi50cmltKCkgPT09ICIiKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgICAgIGJyZWFrV29yZDogZmFsc2UsCiAgICAgICAgICAgICAgICAgICAgbGluZTogbGluZSwKICAgICAgICAgICAgICAgICAgICByZW1haW5pbmdUb2tlbjogIiIsCiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIGlmIHdlIGRvbid0IGFsbG93IGJyZWFraW5nIHdvcmRzIEFORCB0aGUgdG9rZW4gaXNuJ3QgdGhlIG9ubHkgdGhpbmcgb24gdGhlIGN1cnJlbnQgbGluZS4KICAgICAgICAgICAgaWYgKCF0aGlzLl9hbGxvd0JyZWFraW5nV29yZHMgJiYgbGluZS50cmltKCkgIT09ICIiKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgICAgIGJyZWFrV29yZDogZmFsc2UsCiAgICAgICAgICAgICAgICAgICAgbGluZTogbGluZSwKICAgICAgICAgICAgICAgICAgICByZW1haW5pbmdUb2tlbjogdG9rZW4sCiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciBmaXRUb2tlbkxlbmd0aCA9IDA7CiAgICAgICAgICAgIHdoaWxlIChmaXRUb2tlbkxlbmd0aCA8IHRva2VuLmxlbmd0aCkgewogICAgICAgICAgICAgICAgaWYgKG1lYXN1cmVyLm1lYXN1cmUobGluZSArIHRva2VuLnN1YnN0cmluZygwLCBmaXRUb2tlbkxlbmd0aCArIDEpICsgYnJlYWtpbmdDaGFyYWN0ZXIpLndpZHRoIDw9IGF2YWlsYWJsZVdpZHRoKSB7CiAgICAgICAgICAgICAgICAgICAgKytmaXRUb2tlbkxlbmd0aDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciBzdWZmaXggPSAiIjsKICAgICAgICAgICAgaWYgKGZpdFRva2VuTGVuZ3RoID4gMCkgewogICAgICAgICAgICAgICAgc3VmZml4ID0gYnJlYWtpbmdDaGFyYWN0ZXI7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIGJyZWFrV29yZDogZml0VG9rZW5MZW5ndGggPiAwLAogICAgICAgICAgICAgICAgbGluZTogbGluZSArIHRva2VuLnN1YnN0cmluZygwLCBmaXRUb2tlbkxlbmd0aCkgKyBzdWZmaXgsCiAgICAgICAgICAgICAgICByZW1haW5pbmdUb2tlbjogdG9rZW4uc3Vic3RyaW5nKGZpdFRva2VuTGVuZ3RoKSwKICAgICAgICAgICAgfTsKICAgICAgICB9OwogICAgICAgIHJldHVybiBXcmFwcGVyOwogICAgfSgpKTsKICAgIGV4cG9ydHMuV3JhcHBlciA9IFdyYXBwZXI7CgogICAgfSk7CgogICAgdmFyIHNpbmdsZUxpbmVXcmFwcGVyID0gY3JlYXRlQ29tbW9uanNNb2R1bGUoZnVuY3Rpb24gKG1vZHVsZSwgZXhwb3J0cykgewogICAgLyoqCiAgICAgKiBDb3B5cmlnaHQgMjAxNy1wcmVzZW50IFBhbGFudGlyIFRlY2hub2xvZ2llcywgSW5jLiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICAgICogTGljZW5zZWQgdW5kZXIgdGhlIE1JVCBMaWNlbnNlICh0aGUgIkxpY2Vuc2UiKTsgeW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZQogICAgICogbGljZW5zZSBhdCBodHRwczovL2dpdGh1Yi5jb20vcGFsYW50aXIvdHlwZXNldHRhYmxlL2Jsb2IvZGV2ZWxvcC9MSUNFTlNFCiAgICAgKi8KICAgIHZhciBfX2V4dGVuZHMgPSAoY29tbW9uanNHbG9iYWwgJiYgY29tbW9uanNHbG9iYWwuX19leHRlbmRzKSB8fCAoZnVuY3Rpb24gKCkgewogICAgICAgIHZhciBleHRlbmRTdGF0aWNzID0gT2JqZWN0LnNldFByb3RvdH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iAgICAgICAgICAgIGlmIChoZWlnaHQgPT09IHZvaWQgMCkgeyBoZWlnaHQgPSBJbmZpbml0eTsgfQogICAgICAgICAgICB2YXIgbGluZXMgPSB0ZXh0LnNwbGl0KCJcbiIpOwogICAgICAgICAgICBpZiAobGluZXMubGVuZ3RoID4gMSkgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCJTaW5nbGVMaW5lV3JhcHBlciBpcyBkZXNpZ25lZCB0byB3b3JrIG9ubHkgb24gc2luZ2xlIGxpbmUiKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB2YXIgd3JhcEZOID0gZnVuY3Rpb24gKHcpIHsgcmV0dXJuIF9zdXBlci5wcm90b3R5cGUud3JhcC5jYWxsKF90aGlzLCB0ZXh0LCBtZWFzdXJlciwgdywgaGVpZ2h0KTsgfTsKICAgICAgICAgICAgdmFyIHJlc3VsdCA9IHdyYXBGTih3aWR0aCk7CiAgICAgICAgICAgIGlmIChyZXN1bHQubm9MaW5lcyA8IDIpIHsKICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIGxlZnQgPSAwOwogICAgICAgICAgICB2YXIgcmlnaHQgPSB3aWR0aDsKICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBTaW5nbGVMaW5lV3JhcHBlci5OT19XUkFQX0lURVJBVElPTlMgJiYgcmlnaHQgPiBsZWZ0OyArK2kpIHsKICAgICAgICAgICAgICAgIHZhciBjdXJyZW50V2lkdGggPSAocmlnaHQgKyBsZWZ0KSAvIDI7CiAgICAgICAgICAgICAgICB2YXIgY3VycmVudFJlc3VsdCA9IHdyYXBGTihjdXJyZW50V2lkdGgpOwogICAgICAgICAgICAgICAgaWYgKHRoaXMuYXJlU2FtZVJlc3VsdHMocmVzdWx0LCBjdXJyZW50UmVzdWx0KSkgewogICAgICAgICAgICAgICAgICAgIHJpZ2h0ID0gY3VycmVudFdpZHRoOwogICAgICAg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SkgewogICAgICAgICAgICB2YXIgY29sb3JOdW1iZXIgPSArY29sb3JWYWx1ZTsKICAgICAgICAgICAgdmFyIGhleFZhbHVlID0gY29sb3JOdW1iZXIudG9TdHJpbmcoMTYpOwogICAgICAgICAgICByZXR1cm4gY29sb3JOdW1iZXIgPCAxNiA/ICIwIiArIGhleFZhbHVlIDogaGV4VmFsdWU7CiAgICAgICAgfSk7CiAgICAgICAgaWYgKHJnYi5sZW5ndGggPT09IDQgJiYgcmdiWzNdID09PSAiMDAiKSB7CiAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgIH0KICAgICAgICB2YXIgaGV4Q29kZSA9ICIjIiArIHJnYi5qb2luKCIiKTsKICAgICAgICBjb2xvclRlc3Rlci5jbGFzc2VkKGNsYXNzTmFtZSwgZmFsc2UpOwogICAgICAgIHJldHVybiBoZXhDb2RlOwogICAgfQogICAgZXhwb3J0cy5jb2xvclRlc3QgPSBjb2xvclRlc3Q7CiAgICAvKioKICAgICAqIFJldHVybiByZWxhdGl2ZSBsdW1pbmFuY2UgKGRlZmluZWQgaGVyZTogaHR0cDovL3d3dy53My5vcmcvVFIvMjAwOC9SRUMtV0NBRzIwLTIwMDgxMjExLyNyZWxhdGl2ZWx1bWluYW5jZWRlZikKICAgICAqIEJhc2VkIG9uIGltcGxlbWVudGF0aW9uIGZyb20gY2hyb21hLmpzIGJ5IEdyZWdvciBBaXNjaCAoZ2thKSAobGljZW5zZWQgdW5kZXIgQlNEKQogICAgICogY2hyb21hLmpzIG1heSBiZSBmb3VuZCBoZXJlOiBodHRwczovL2dpdGh1Yi5jb20vZ2thL2Nocm9tYS5qcwogICAgICogTGljZW5zZSBtYXkgYmUgZm91bmQgaGVyZTogaHR0cHM6Ly9naXRodWIuY29tL2drYS9jaHJvbWEuanMvYmxvYi9tYXN0ZXIvTElDRU5TRQogICAgICovCiAgICBmdW5jdGlvbiBsdW1pbmFuY2UoY29sb3IpIHsKICAgICAgICB2YXIgcmdiID0gZDMucmdiKGNvbG9yKTsKICAgICAgICB2YXIgbHVtID0gZnVuY3Rpb24gKHgpIHsKICAgICAgICAgICAgeCA9IHggLyAyNTU7CiAgICAgICAgICAgIHJldHVybiB4IDw9IDAuMDM5MjggPyB4IC8gMTIuOTIgOiBuYXRpdmVNYXRoLnBvdygoeCArIDAuMDU1KSAvIDEuMDU1LCAyLjQpOwogICAgICAgIH07CiAgICAgICAgdmFyIHIgPSBsdW0ocmdiLnIpOwogICAgICAgIHZhciBnID0gbHVtKHJnYi5nKTsKICAgICAgICB2YXIgYiA9IGx1bShyZ2IuYik7CiAgICAgICAgcmV0dXJuIDAuMjEyNiAqIHIgKyAwLjcxNTIgKiBnICsgMC4wNzIyICogYjsKICAgIH0KICAgIH0pOwoKICAgIHZhciBkb21VdGlscyA9IGNyZWF0ZUNvbW1vbmpzTW9kdWxlKGZ1bmN0aW9uIChtb2R1bGUsIGV4cG9ydHMpIHsKICAgIC8qKgogICAgICogQ29weXJpZ2h0IDIwMTQtcHJlc2VudCBQYWxhbnRpciBUZWNobm9sb2dpZXMKICAgICAqIEBsaWNlbnNlIE1JVAogICAgICovCiAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgIl9fZXNNb2R1bGUiLCB7IHZhbHVlOiB0cnVlIH0pOwoKICAgIHZhciBuYXRpdmVNYXRoID0gd2luZG93Lk1hdGg7CiAgICAvKioKICAgICAqIFJldHVybnMgd2hldGhlciB0aGUgY2hpbGQgaXMgaW4gZmFjdCBhIGNoaWxkIG9mIHRoZSBwYXJlbnQKICAgICAqLwogICAgZnVuY3Rpb24gY29udGFpbnMocGFyZW50LCBjaGlsZCkgewogICAgICAgIHZhciBtYXliZVBhcmVudCA9IGNoaWxkOwogICAgICAgIHdoaWxlIChtYXliZVBhcmVudCAhPSBudWxsICYmIG1heWJlUGFyZW50ICE9PSBwYXJlbnQpIHsKICAgICAgICAgICAgbWF5YmVQYXJlbnQgPSBtYXliZVBhcmVudC5wYXJlbnROb2RlOwogICAgICAgIH0KICAgICAgICByZXR1cm4gbWF5YmVQYXJlbnQgPT09IHBhcmVudDsKICAgIH0KICAgIGV4cG9ydHMuY29udGFpbnMgPSBjb250YWluczsKICAgIC8qKgogICAgICogR2V0cyB0aGUgYm91bmRpbmcgYm94IG9mIGFuIGVsZW1lbnQuCiAgICAgKiBAcGFyYW0ge2QzLlNlbGVjdGlvbn0gZWxlbWVudAogICAgICogQHJldHVybnMge1NWR1JlZH0gVGhlIGJvdW5kaW5nIGJveC4KICAgICAqLwogICAgZnVuY3Rpb24gZWxlbWVudEJCb3goZWxlbWVudCkgewogICAgICAgIHZhciBiYm94OwogICAgICAgIC8vIEhBQ0tIQUNLOiBGaXJlZm94IHdvbid0IGNvcnJlY3RseSBtZWFzdXJlIG5vZGVzIHdpdGggc3R5bGUgImRpc3BsYXk6IG5vbmUiIG9yIHRoZWlyIGRlc2NlbmRlbnRzIChGRiBCdWcgNjEyMTE4KS4KICAgICAgICB0cnkgewogICAgICAgICAgICBiYm94ID0gZWxlbWVudC5ub2RlKCkuZ2V0QkJveCgpOwogICAgICAgIH0KICAgICAgICBjYXRjaCAoZXJyKSB7CiAgICAgICAgICAgIGJib3ggPSB7IHg6IDAsIHk6IDAsIHdpZHRoOiAwLCBoZWlnaHQ6IDAgfTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGJib3g7CiAgICB9CiAgICBleHBvcnRzLmVsZW1lbnRCQm94ID0gZWxlbWVudEJCb3g7CiAgICBmdW5jdGlvbiBlbnRpdHlCb3VuZHMoZWxlbWVudCkgewogICAgICAgIGlmIChlbGVtZW50IGluc3RhbmNlb2YgU1ZHRWxlbWVudCkgewogICAgICAgICAgICByZXR1cm4gZWxlbWVudEJCb3goZDMuc2VsZWN0KGVsZW1lbnQpKTsKICAgICAgICB9CiAgICAgICAgZWxzZSBpZiAoZWxlbWVudCBpbnN0YW5jZW9mIEhUTUxFbGVtZW50KSB7CiAgICAgICAgICAgIHZhciByZWN0ID0gZWxlbWVudC5nZXRC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RCLmxlZnQpKSB7CiAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICB9CiAgICAgICAgaWYgKG5hdGl2ZU1hdGguY2VpbChjbGllbnRSZWN0QS5sZWZ0KSA+PSBuYXRpdmVNYXRoLmZsb29yKGNsaWVudFJlY3RCLnJpZ2h0KSkgewogICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgfQogICAgICAgIGlmIChuYXRpdmVNYXRoLmZsb29yKGNsaWVudFJlY3RBLmJvdHRvbSkgPD0gbmF0aXZlTWF0aC5jZWlsKGNsaWVudFJlY3RCLnRvcCkpIHsKICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgIH0KICAgICAgICBpZiAobmF0aXZlTWF0aC5jZWlsKGNsaWVudFJlY3RBLnRvcCkgPj0gbmF0aXZlTWF0aC5mbG9vcihjbGllbnRSZWN0Qi5ib3R0b20pKSB7CiAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIHRydWU7CiAgICB9CiAgICBleHBvcnRzLmNsaWVudFJlY3RzT3ZlcmxhcCA9IGNsaWVudFJlY3RzT3ZlcmxhcDsKICAgIC8qKgogICAgICogUmV0dXJuIGEgbmV3IENsaWVudFJlY3QgdGhhdCBpcyB0aGUgb2xkIENsaWVudFJlY3QgZXhwYW5kZWQgYnkgYW1vdW50IGluIGFsbCBkaXJlY3Rpb25zLgogICAgICogQHBhcmFtIHJlY3QKICAgICAqIEBwYXJhbSBhbW91bnQKICAgICAqLwogICAgZnVuY3Rpb24gZXhwYW5kUmVjdChyZWN0LCBhbW91bnQpIHsKICAgICAgICByZXR1cm4gewogICAgICAgICAgICBsZWZ0OiByZWN0LmxlZnQgLSBhbW91bnQsCiAgICAgICAgICAgIHRvcDogcmVjdC50b3AgLSBhbW91bnQsCiAgICAgICAgICAgIHJpZ2h0OiByZWN0LnJpZ2h0ICsgYW1vdW50LAogICAgICAgICAgICBib3R0b206IHJlY3QuYm90dG9tICsgYW1vdW50LAogICAgICAgICAgICB3aWR0aDogcmVjdC53aWR0aCArIGFtb3VudCAqIDIsCiAgICAgICAgICAgIGhlaWdodDogcmVjdC5oZWlnaHQgKyBhbW91bnQgKiAyLAogICAgICAgIH07CiAgICB9CiAgICBleHBvcnRzLmV4cGFuZFJlY3QgPSBleHBhbmRSZWN0OwogICAgLyoqCiAgICAgKiBSZXR1cm5zIHRydWUgaWYgYW5kIG9ubHkgaWYgaW5uZXJDbGllbnRSZWN0IGlzIGluc2lkZSBvdXRlckNsaWVudFJlY3QuCiAgICAgKgogICAgICogQHBhcmFtIHtDbGllbnRSZWN0fSBpbm5lckNsaWVudFJlY3QgVGhlIGZpcnN0IENsaWVudFJlY3QKICAgICAqIEBwYXJhbSB7Q2xpZW50UmVjdH0gb3V0ZXJDbGllbnRSZWN0IFRoZSBzZWNvbmQgQ2xpZW50UmVjdAogICAgICogQHJldHVybnMge2Jvb2xlYW59IElmIGFuZCBvbmx5IGlmIHRoZSBpbm5lckNsaWVudFJlY3QgaXMgaW5zaWRlIG91dGVyQ2xpZW50UmVjdC4KICAgICAqLwogICAgZnVuY3Rpb24gY2xpZW50UmVjdEluc2lkZShpbm5lckNsaWVudFJlY3QsIG91dGVyQ2xpZW50UmVjdCkgewogICAgICAgIHJldHVybiAobmF0aXZlTWF0aC5mbG9vcihvdXRlckNsaWVudFJlY3QubGVmdCkgPD0gbmF0aXZlTWF0aC5jZWlsKGlubmVyQ2xpZW50UmVjdC5sZWZ0KSAmJgogICAgICAgICAgICBuYXRpdmVNYXRoLmZsb29yKG91dGVyQ2xpZW50UmVjdC50b3ApIDw9IG5hdGl2ZU1hdGguY2VpbChpbm5lckNsaWVudFJlY3QudG9wKSAmJgogICAgICAgICAgICBuYXRpdmVNYXRoLmZsb29yKGlubmVyQ2xpZW50UmVjdC5yaWdodCkgPD0gbmF0aXZlTWF0aC5jZWlsKG91dGVyQ2xpZW50UmVjdC5yaWdodCkgJiYKICAgICAgICAgICAgbm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hbnM7CiAgICAvKioKICAgICAqIFJldHVybnMgaWYgdGhlIHBvaW50IGlzIHdpdGhpbiB0aGUgYm91bmRzLiBQb2ludHMgYWxvbmcKICAgICAqIHRoZSBib3VuZHMgYXJlIGNvbnNpZGVyZWQgIndpdGhpbiIgYXMgd2VsbC4KICAgICAqIEBwYXJhbSB7UG9pbnR9IHAgUG9pbnQgaW4gY29uc2lkZXJhdGlvbnMuCiAgICAgKiBAcGFyYW0ge0JvdW5kc30gYm91bmRzIEJvdW5kcyB3aXRoaW4gd2hpY2ggdG8gY2hlY2sgZm9yIGluY2x1c2lvbi4KICAgICAqLwogICAgZnVuY3Rpb24gd2l0aGluKHAsIGJvdW5kcykgewogICAgICAgIHJldHVybiBib3VuZHMudG9wTGVmdC54IDw9IHAueAogICAgICAgICAgICAmJiBib3VuZHMuYm90dG9tUmlnaHQueCA+PSBwLngKICAgICAgICAgICAgJiYgYm91bmRzLnRvcExlZnQueSA8PSBwLnkKICAgICAgICAgICAgJiYgYm91bmRzLmJvdHRvbVJpZ2h0LnkgPj0gcC55OwogICAgfQogICAgZXhwb3J0cy53aXRoaW4gPSB3aXRoaW47CiAgICAvKioKICAgICAqIFJldHVybnMgd2hldGhlciB0aGUgZmlyc3QgYm91bmRzIGludGVyc2VjdHMgdGhlIHNlY29uZCBib3VuZHMuCiAgICAgKiBQYXNzIHByaW1pdGl2ZSBudW1iZXJzIGRpcmVjdGx5IGZvciBwZXJmb3JtYW5jZS4KICAgICAqCiAgICAgKiBBc3N1bWVzIHdpZHRoIGFuZCBoZWlnaHRzIGFyZSBwb3NpdGl2ZS4KICAgICAqLwogICAgZnVuY3Rpb24gYm91bmRzSW50ZXJzZWN0cyhhWCwgYVksIGFXaWR0aCwgYUhlaWdodCwgYlgsIGJZLCBiV2lkdGgsIGJIZWlnaHQpIHsKICAgICAgICByZXR1cm4gYVggPD0gYlggKyBiV2lkdGggJiYKICAgICAgICAgICAgYlggPD0gYVggKyBhV2lkdGggJiYKICAgICAgICAg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gYVswXSAqIGJbNF0gKyBhWzJdICogYls1XSArIGFbNF0sCiAgICAgICAgICAgIGFbMV0gKiBiWzRdICsgYVszXSAqIGJbNV0gKyBhWzVdLAogICAgICAgIF07CiAgICB9CiAgICBleHBvcnRzLm11bHRpcGx5TWF0cml4ID0gbXVsdGlwbHlNYXRyaXg7CiAgICAvKioKICAgICAqIFByZXBlbmRzIHRyYW5zbGF0aW9uIHRvIHRyYW5zZm9ybWF0aW9uIG1hdHJpeC4KICAgICAqCiAgICAgKiBFcXVpdmFsZW50IHRvIGBtdWx0aXBseU1hdHJpeChbMSwgMCwgMCwgMSwgLi4udl0sIGIpYAogICAgICovCiAgICBmdW5jdGlvbiBwcmVtdWx0aXBseVRyYW5zbGF0ZSh2LCBiKSB7CiAgICAgICAgcmV0dXJuIFsKICAgICAgICAgICAgYlswXSwgYlsxXSwgYlsyXSwgYlszXSwKICAgICAgICAgICAgYls0XSArIHZbMF0sCiAgICAgICAgICAgIGJbNV0gKyB2WzFdLAogICAgICAgIF07CiAgICB9CiAgICBleHBvcnRzLnByZW11bHRpcGx5VHJhbnNsYXRlID0gcHJlbXVsdGlwbHlUcmFuc2xhdGU7CiAgICAvKioKICAgICAqIEFwcGVuZHMgdHJhbnNsYXRpb24gdG8gdHJhbnNmb3JtYXRpb24gbWF0cml4LgogICAgICoKICAgICAqIEVxdWl2YWxlbnQgdG8gYG11bHRpcGx5TWF0cml4KGEsIFsxLCAwLCAwLCAxLCAuLi52XSlgCiAgICAgKi8KICAgIGZ1bmN0aW9uIG11bHRpcGx5VHJhbnNsYXRlKGEsIHYpIHsKICAgICAgICByZXR1cm4gWwogICAgICAgICAgICBhWzBdLCBhWzFdLCBhWzJdLCBhWzNdLAogICAgICAgICAgICBhWzBdICogdlswXSArIGFbMl0gKiB2WzFdICsgYVs0XSwKICAgICAgICAgICAgYVsxXSAqIHZbMF0gKyBhWzNdICogdlsxXSArIGFbNV0sCiAgICAgICAgXTsKICAgIH0KICAgIGV4cG9ydHMubXVsdGlwbHlUcmFuc2xhdGUgPSBtdWx0aXBseVRyYW5zbGF0ZTsKICAgIC8qKgogICAgICogQW5hbHl0aWNhbCBpbnZlcnNlIG9mIGEgYElDc3NUcmFuc2Zvcm1NYXRyaXhgIGFuYWxvZ291cyB0byBhIG5vbi1zaW5ndWxhcgogICAgICogaG9tb2dlbm91cyAzeDMgbWF0cml4LgogICAgICoKICAgICAqIGh0dHA6Ly9tYXRod29ybGQud29sZnJhbS5jb20vTWF0cml4SW52ZXJzZS5odG1sCiAgICAgKiBodHRwczovL3N0YWNrb3ZlcmZsb3cuY29tL3F1ZXN0aW9ucy8yNjI0NDIyL2VmZmljaWVudC00eDQtbWF0cml4LWludmVyc2UtYWZmaW5lLXRyYW5zZm9ybQogICAgICovCiAgICBmdW5jdGlvbiBpbnZlcnRNYXRyaXgoYSkgewogICAgICAgIHZhciBkZXRlcm1pbmFudCA9IGFbMF0gKiBhWzNdIC0gYVsxXSAqIGFbMl07CiAgICAgICAgaWYgKGRldGVybWluYW50ID09PSAwKSB7CiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigic2luZ3VsYXIgbWF0cml4Iik7CiAgICAgICAgfQogICAgICAgIHZhciBpbnZlcnNlRGV0ZXJtaW5hbnQgPSAxIC8gZGV0ZXJtaW5hbnQ7CiAgICAgICAgcmV0dXJuIFsKICAgICAgICAgICAgaW52ZXJzZURldGVybWluYW50ICogYVszXSwKICAgICAgICAgICAgaW52ZXJzZURldGVybWluYW50ICogLWFbMV0sCiAgICAgICAgICAgIGludmVyc2VEZXRlcm1pbmFudCAqIC1hWzJdLAogICAgICAgICAgICBpbnZlcnNlRGV0ZXJtaW5hbnQgKiBhWzBdLAogICAgICAgICAgICBpbnZlcnNlRGV0ZXJtaW5hbnQgKiAoLWFbM10gKiBhWzRdICsgYVsyXSAqIGFbNV0pLAogICAgICAgICAgICBpbnZlcnNlRGV0ZXJtaW5hbnQgKiAoYVsxXSAqIGFbNF0gKyAtYVswXSAqIGFbNV0pL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y5sZW5ndGggPiAwKSB7CiAgICAgICAgICAgICAgICB0aGlzLmFkZE5leHQoZW50cmllcywgbm9kZXMpOwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBDaG9vc2UgdGhlIHR3byBmYXJ0aGVzdC1hcGFydCBlbnRyaWVzIHRvIGJlZ2luIHRoZSBzcGxpdC4KICAgICAgICAgKi8KICAgICAgICBTcGxpdFN0cmF0ZWd5TGluZWFyLnByb3RvdHlwZS5jaG9vc2VGaXJzdFNwbGl0ID0gZnVuY3Rpb24gKGVudHJpZXMsIG5vZGVzKSB7CiAgICAgICAgICAgIC8vIERldGVybWluZSBlbnRyeSBpbmRpY2VzIHRoYXQgaGF2ZSBtaW4vbWF4IHgveSBjb29yZGluYXRlcwogICAgICAgICAgICB2YXIgbWluWEggPSAwOwogICAgICAgICAgICB2YXIgbWluWUggPSAwOwogICAgICAgICAgICB2YXIgbWF4WEwgPSBlbnRyaWVzLmxlbmd0aCAtIDE7CiAgICAgICAgICAgIHZhciBtYXhZTCA9IGVudHJpZXMubGVuZ3RoIC0gMTsKICAgICAgICAgICAgZm9yICh2YXIgaSA9IDE7IGkgPCBlbnRyaWVzLmxlbmd0aCAtIDE7IGkrKykgewogICAgICAgICAgICAgICAgdmFyIGVudHJ5ID0gZW50cmllc1tpXTsKICAgICAgICAgICAgICAgIGlmIChlbnRyeS5ib3VuZHMueGwgPiBlbnRyaWVzW21heFhMXS5ib3VuZHMueGwpIHsKICAgICAgICAgICAgICAgICAgICBtYXhYTCA9IGk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmIChlbnRyeS5ib3VuZHMueGggPCBlbnRyaWVzW21pblhIXS5ib3VuZHMueGgpIHsKICAgICAgICAgICAgICAgICAgICBtaW5YSCA9IGk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAoZW50cnkuYm91bmRzLnlsID4gZW50cmllc1ttYXhZTF0uYm91bmRzLnlsKSB7CiAgICAgICAgICAgICAgICAgICAgbWF4WUwgPSBpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAoZW50cnkuYm91bmRzLnloIDwgZW50cmllc1ttaW5ZSF0uYm91bmRzLnloKSB7CiAgICAgICAgICAgICAgICAgICAgbWluWUggPSBpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIENob29zZSB0byBzcGxpdCB4IG9yIHkgYmFzZWQgb24gZ3JlYXRlc3QgZGlmZmVyZW5jZQogICAgICAgICAgICB2YXIgZHggPSBNYXRoLmFicyhlbnRyaWVzW21pblhIXS5ib3VuZHMueGggLSBlbnRyaWVzW21heFhMXS5ib3VuZHMueGwpOwogICAgICAgICAgICB2YXIgZHkgPSBNYXRoLmFicyhlbnRyaWVzW21pbllIXS5ib3VuZHMueWggLSBlbnRyaWVzW21heFlMXS5ib3VuZHMueWwpOwogICAgICAgICAgICB2YXIgX2EgPSBkeCA+IGR5ID8gW21pblhILCBtYXhYTF0gOiBbbWluWUgsIG1heFlMXSwgaTAgPSBfYVswXSwgaTEgPSBfYVsxXTsKICAgICAgICAgICAgLy8gaWYgbm8gZGV0ZWN0YWJsZSBzcGxpdCwganVzdCB1c2UgZmlyc3QvbGFzdCBlbnRyaWVzCiAgICAgICAgICAgIGlmIChpMCA9PT0gaTEpIHsKICAgICAgICAgICAgICAgIGkwID0gMDsKICAgICAgICAgICAgICAgIGkxID0gZW50cmllcy5sZW5ndGggLSAxOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIFNwbGl0IG9mZiBub2Rlcy4gV2Ugc3BsaWNlIHdpdGggdGhlIG1heCBpbmRleCBmaXJzdCB0byBtYWtlIHN1cmUgd2UKICAgICAgICAgICAgLy8gZG9uJ3QgY2hhbmdlIHRoZSBpbmRleCBvZiB0aGUgc2Vjb25kIHNwbGljZSBjYWxsCiAgICAgICAgICAgIG5vZGVzWzBdLmluc2VydChlbnRyaWVzLnNwbGljZShNYXRoLm1heChpMCwgaTEpLCAxKVswXSk7CiAgICAgICAgICAgIG5vZGVzWzFdLmluc2VydChlbnRyaWVzLnNwbGljZShNYXRoLm1pbihpMCwgaTEpLCAxKVswXSk7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBTcGxpdCB0aGUgbmV4dCBlbnRyeS4gQ2hvb3NlIHRoZSBlbnRyeSB0aGF0IGV4cGFuZHMgaXRzIHBhcmVudCBub2RlJ3MKICAgICAgICAgKiBhcmVhIHRoZSBsZWFzdC4KICAgICAgICAgKi8KICAgICAgICBTcGxpdFN0cmF0ZWd5TGluZWFyLnByb3RvdHlwZS5hZGROZXh0ID0gZnVuY3Rpb24gKGVudHJpZXMsIG5vZGVzKSB7CiAgICAgICAgICAgIHZhciBpbmRleCA9IG51bGw7CiAgICAgICAgICAgIHZhciBtaW5EaWZmID0gbnVsbDsKICAgICAgICAgICAgdmFyIG1pbkRpZmZOb2RlID0gbnVsbDsKICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBlbnRyaWVzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICB2YXIgZW50cnkgPSBlbnRyaWVzW2ldOwogICAgICAgICAgICAgICAgdmFyIGFyZWFEaWZmMCA9IG5vZGVzWzBdLnVuaW9uQXJlYURpZmZlcmVuY2UoZW50cnkuYm91bmRzKTsKICAgICAgICAgICAgICAgIHZhciBhcmVhRGlmZjEgPSBub2Rlc1sxXS51bmlvbkFyZWFEaWZmZXJlbmNlKGVudHJ5LmJvdW5kcyk7CiAgICAgICAgICAgICAgICBpZiAoYXJlYURpZmYwIDwgbWluRGlmZiB8fCBpbmRleCA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgaW5kZXggPSBpOwogICAgICAgICAgICAgICAgICAgIG1pbkRpZmYgPSBhcmVhRGlmZjA7CiAgICAgICAgICAgICAgICAgICAgbWluRGlmZk5vZGUgPSBub2Rlc1swXTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChhcmVhRGlmZjEgPCBtaW5EaWZmKSB7CiAgICAgICAgICAgICAgICAgICAgaW5kZXggPSBpOwogICAgICAgICAgICAgICAgICAgIG1pbkRpZmYgPSBhcmVhRGlmZjE7CiAgICAgICAgICAgICAgICAgICAgbWluRGlmZk5vZGUgPSBub2Rlc1sxXTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBtaW5EaWZmTm9kZS5pbnNlcnQoZW50cmllcy5zcGxpY2UoaW5kZXgsIDEpWzBdKTsKICAgICAgICB9OwogICAgICAgIHJldHVybiBTcGxpdFN0cmF0ZWd5TGluZWFyOwogICAgfSgpKTsKICAgIGV4cG9ydHMuU3BsaXRTdHJhdGVneUxpbmVhciA9IFNwbGl0U3RyYXRlZ3lMaW5lYXI7CiAgICB9KTsKCiAgICB2YXIgclRyZWUgPSBjcmVhdGVDb21tb25qc01vZHVsZShmdW5jdGlvbiAobW9kdWxlLCBleHBvcnRzKSB7CiAgICAvKioKICAgICAqIENvcHlyaWdodCAyMDE3LXByZXNlbnQgUGFsYW50aXIgVGVjaG5vbG9naWVzCiAgICAgKiBAbGljZW5zZSBNSVQKICAgICAqLwogICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsKCiAgICAvKioKICAgICAqIFRoZSBtYXhpbXVtIG51bWJlciBvZiBjaGlsZHJlbiBpbiBhbiByLXRyZWUgbm9kZSBiZWZvcmUgd2UgYXR0ZW1wdCB0byBzcGxpdC4KICAgICAqIFRoaXMgbXVzdCBiZSA+PSAyLgogICAgICovCiAgICB2YXIgREVGQVVMVF9NQVhfTk9ERV9DSElMRFJFTiA9IDU7CiAgICAvKioKICAgICAqIFRoZXJlIGFyZSBzZXZlcmFsIHN0cmF0ZWdpZXMgZm9yIHNwbGl0dGluZyBub2RlcyB0aGF0IGNvbnRh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Jlc3RMZWFmRGlzdGFuY2UpIHsKICAgICAgICAgICAgICAgICAgICBuZWFyZXN0TGVhZkRpc3RhbmNlID0gbmVhcjsKICAgICAgICAgICAgICAgICAgICBmYXJ0aGVzdEJyYW5jaERpc3RhbmNlID0gZmFyOwogICAgICAgICAgICAgICAgICAgIHJldHVybiBRdWVyeVByZWRpY2F0ZVJlc3VsdC5QQVNTX0FORF9PVkVSV1JJVEU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmIChuZWFyID09PSBuZWFyZXN0TGVhZkRpc3RhbmNlKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFF1ZXJ5UHJlZGljYXRlUmVzdWx0LlBBU1M7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gUXVlcnlQcmVkaWNhdGVSZXN1bHQuRkFJTDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIGlmIChuZWFyID4gZmFydGhlc3RCcmFuY2hEaXN0YW5jZSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBRdWVyeVByZWRpY2F0ZVJlc3VsdC5GQUlMOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgZmFydGhlc3RCcmFuY2hEaXN0YW5jZSA9IE1hdGgubWF4KGZhciwgZmFydGhlc3RCcmFuY2hEaXN0YW5jZSk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFF1ZXJ5UHJlZGljYXRlUmVzdWx0LlBBU1M7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgfQogICAgZXhwb3J0cy5jcmVhdGVNaW5pbWl6aW5nTm9kZVByZWRpY2F0ZSA9IGNyZWF0ZU1pbmltaXppbmdOb2RlUHJlZGljYXRlOwogIC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SAwOwogICAgICAgIH07CiAgICAgICAgUlRyZWUucHJvdG90eXBlLmluc2VydCA9IGZ1bmN0aW9uIChib3VuZHMsIHZhbHVlKSB7CiAgICAgICAgICAgIHZhciBub2RlID0gdGhpcy5yb290OwogICAgICAgICAgICAvLyBDaG9vc2Ugc3VidHJlZSB1bnRpbCB3ZSBmaW5kIGEgbGVhZgogICAgICAgICAgICB3aGlsZSAoIW5vZGUubGVhZikgewogICAgICAgICAgICAgICAgbm9kZSA9IG5vZGUuc3VidHJlZShib3VuZHMpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIEluc2VydCBuZXcgdmFsdWUgbm9kZSBpbnRvIGxlYWYgbm9kZQogICAgICAgICAgICB2YXIgdmFsdWVOb2RlID0gUlRyZWVOb2RlLnZhbHVlTm9kZShib3VuZHMsIHZhbHVlKTsKICAgICAgICAgICAgbm9kZS5pbnNlcnQodmFsdWVOb2RlKTsKICAgICAgICAgICAgdGhpcy5zaXplICs9IDE7CiAgICAgICAgICAgIC8vIFdoaWxlIG5vZGUgb3ZlcmZsb3dzLCBzcGxpdCBhbmQgd2FsayB1cAogICAgICAgICAgICB3aGlsZSAobm9kZS5vdmVyZmxvdyh0aGlzLm1heE5vZGVDaGlsZHJlbikpIHsKICAgICAgICAgICAgICAgIG5vZGUgPSBub2RlLnNwbGl0KHRoaXMuc3BsaXRTdHJhdGVneSk7CiAgICAgICAgICAgICAgICBpZiAobm9kZS5wYXJlbnQgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIHRoaXMucm9vdCA9IG5vZGU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHZhbHVlTm9kZTsKICAgICAgICB9OwogICAgICAgIFJUcmVlLnByb3RvdHlwZS5sb2NhdGUgPSBmdW5jdGlvbiAoeHkpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMucXVlcnkoZnVuY3Rpb24gKGIpIHsgcmV0dXJuIGIuY29udGFpb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FwQm91bmRzKGIsIGJvdW5kcyk7IH0pOwogICAgICAgIH07CiAgICAgICAgUlRyZWUucHJvdG90eXBlLmludGVyc2VjdFggPSBmdW5jdGlvbiAoYm91bmRzKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLnF1ZXJ5KGZ1bmN0aW9uIChiKSB7IHJldHVybiBSVHJlZUJvdW5kcy5pc0JvdW5kc092ZXJsYXBYKGIsIGJvdW5kcyk7IH0pOwogICAgICAgIH07CiAgICAgICAgUlRyZWUucHJvdG90eXBlLmludGVyc2VjdFkgPSBmdW5jdGlvbiAoYm91bmRzKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLnF1ZXJ5KGZ1bmN0aW9uIChiKSB7IHJldHVybiBSVHJlZUJvdW5kcy5pc0JvdW5kc092ZXJsYXBZKGIsIGJvdW5kcyk7IH0pOwogICAgICAgIH07CiAgICAgICAgUlRyZWUucHJvdG90eXBlLnF1ZXJ5ID0gZnVuY3Rpb24gKHByZWRpY2F0ZSkgewogICAgICAgICAgICB2YXIgcmVzdWx0cyA9IFtdOwogICAgICAgICAgICBpZiAodGhpcy5yb290LmJvdW5kcyAhPSBudWxsICYmICFwcmVkaWNhdGUodGhpcy5yb290LmJvdW5kcykpIHsKICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHRzOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciBjYW5kaWRhdGVzID0gW3RoaXMucm9vdF07CiAgICAgICAgICAgIHdoaWxlIChjYW5kaWRhdGVzLmxlbmd0aCA+IDApIHsKICAgICAgICAgICAgICAgIHZhciBjYW5kaWRhdGUgPSBjYW5kaWRhdGVzLnNoaWZ0KCk7CiAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGNhbmRpZGF0ZS5lbnRyaWVzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIGVudHJ5ID0gY2FuZGlkYXRlLmVudHJpZXNbaV07CiAgICAgICAgICAgICAgICAgICAgaWYgKHByZWRpY2F0ZShlbnRyeS5ib3VuZHMpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjYW5kaWRhdGUubGVhZikgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0cy5wdXNoKGVudHJ5LnZhbHVlKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhbmRpZGF0ZXMucHVzaChlbnRyeSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHJlc3VsdHM7CiAgICAgICAgfTsKICAgICAgICBSVHJlZS5wcm90b3R5cGUucXVlcnlOb2RlcyA9IGZ1bmN0aW9uIChwcmVkaWNhdGUpIHsKICAgICAgICAgICAgdmFyIHJlc3VsdHMgPSBbXTsKICAgICAgICAgICAgaWYgKHRoaXMucm9vdC5ib3VuZHMgIT0gbnVsbCAmJiBwcmVkaWNhdGUodGhpcy5yb290KSA9PT0gUXVlcnlQcmVkaWNhdGVSZXN1bHQuRkFJTCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdHM7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIGNhbmRpZGF0ZXMgPSBbdGhpcy5yb290XTsKICAgICAgICAgICAgd2hpbGUgKGNhbmRpZGF0ZXMubGVuZ3RoID4gMCkgewogICAgICAgICAgICAgICAgdmFyIGNhbmRpZGF0ZSA9IGNhbmRpZGF0ZXMuc2hpZnQoKTsKICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgY2FuZGlkYXRlLmVudHJpZXMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgICAgICB2YXIgZW50cnkgPSBjYW5kaWRhdGUuZW50cmllc1tpXTsKICAgICAgICAgICAgICAgICAgICB2YXIgcCA9IHByZWRpY2F0ZShlbnRyeSk7CiAgICAgICAgICAgICAgICAgICAgaWYgKHAgPT09IFF1ZXJ5UHJlZGljYXRlUmVzdWx0LlBBU1NfQU5EX09WRVJXUklURSkgewogICAgICAgICAgICAgICAgICAgICAgICByZXN1bHRzID0gW107CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGlmIChwID09PSBRdWVyeVByZWRpY2F0ZVJlc3VsdC5QQVNTIHx8IHAgPT09IFF1ZXJ5UHJlZGljYXRlUmVzdWx0LlBBU1NfQU5EX09WRVJXUklURSkgewogICAgICAgICAgICAgICAgICAgICAgICBpZiAoY2FuZGlkYXRlLmxlYWYpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdHMucHVzaChlbnRyeSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYW5kaWRhdGVzLnB1c2goZW50cnkpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiByZXN1bHRzOwogICAgICAgIH07CiAgICAgICAgcmV0dXJuIFJUcmVlOwogICAgfSgpKTsKICAgIGV4cG9ydHMuUlRyZWUgPSBSVHJlZTsKICAgIHZhciBSVHJlZU5vZGUgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7CiAgICAgICAgZnVuY3Rpb24gUlRyZWVOb2RlKGxlYWYpIHsKICAgICAgICAgICAgdGhpcy5sZWFmID0gbGVhZjsKICAgICAgICAgICAgdGhpcy5ib3VuZHMgPSBudWxsOwogICAgICAgICAgICB0aGlzLmVudHJpZXMgPSBbXTsKICAgICAgICAgICAgdGhpcy5wYXJlbnQgPSBudWxsOwogICAgICAgICAgICB0aGlzLnZhbHVlID0gbnVsbDsKICAgICA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LnVuaW9uQWxsKFthbmNlc3Rvci5ib3VuZHMsIG5vZGUuYm91bmRzXSk7CiAgICAgICAgICAgICAgICBhbmNlc3RvciA9IGFuY2VzdG9yLnBhcmVudDsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIFJlbW92ZXMgYSBjaGlsZCBub2RlIGFuZCB1cGRhdGVzIHRoZSBhbmNlc3RyeSBib3VuZHMuCiAgICAgICAgICoKICAgICAgICAgKiBJZiB0aGUgbm9kZSBhcmd1bWVudCBpcyBub3QgYSBjaGlsZCwgZG8gbm90aGluZy4KICAgICAgICAgKi8KICAgICAgICBSVHJlZU5vZGUucHJvdG90eXBlLnJlbW92ZSA9IGZ1bmN0aW9uIChub2RlKSB7CiAgICAgICAgICAgIHZhciBpID0gdGhpcy5lbnRyaWVzLmluZGV4T2Yobm9kZSk7CiAgICAgICAgICAgIGlmIChpID49IDApIHsKICAgICAgICAgICAgICAgIHRoaXMuZW50cmllcy5zcGxpY2UoaSwgMSk7CiAgICAgICAgICAgICAgICAvLyBVcGRhdGUgYW5jZXN0b3IgYm91bmRzCiAgICAgICAgICAgICAgICB2YXIgYW5jZXN0b3IgPSB0aGlzOwogICAgICAgICAgICAgICAgd2hpbGUgKGFuY2VzdG9yICE9IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICBhbmNlc3Rvci5ib3VuZHMgPSBSVHJlZUJvdW5kcy51bmlvbkFsbChhbmNlc3Rvci5lbnRyaWVzLm1hcChmdW5jdGlvbiAoZSkgeyByZXR1cm4gZS5ib3VuZHM7IH0pKTsKICAgICAgICAgICAgICAgICAgICBhbmNlc3RvciA9IGFuY2VzdG9yLnBhcmVudDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIENob29zZXMgYW4gbm9kZSBmcm9tIHRoZW4gZW50cmllcyB0aGF0IG1pbmltaXplcyB0aGUgYXJlYSBkaWZmZXJlbmNlIHRoYXQKICAgICAgICAgKiBhZGRpbmcgdGhlIGJvdW5kcyB0aGUgZWFjaCBlbnRyeSB3b3VsZCBjYXVzZS4KICAgICAgICAgKi8KICAgICAgICBSVHJlZU5vZGUucHJvdG90eXBlLnN1YnRyZWUgPSBmdW5jdGlvbiAoYm91bmRzKSB7CiAgICAgICAgICAgIHZhciBtaW5EaWZmID0gSW5maW5pdHk7CiAgICAgICAgICAgIHZhciBtaW5FbnRyeSA9IG51bGw7CiAgICAgICAgICAgIC8vIGNob29zZSBlbnRyeSBmb3Igd2hpY2ggdGhlIGFkZGl0aW9uIGxlYXN0IGluY3JlYXNlcyB0aGUgZW50cnkncyBhcmVhCiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdGhpcy5lbnRyaWVzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICB2YXIgZW50cnkgPSB0aGlzLmVudHJpZXNbaV07CiAgICAgICAgICAgICAgICB2YXIgZGlmZkFyZWEgPSBlbnRyeS51bmlvbkFyZWFEaWZmZXJlbmNlKGJvdW5kcyk7CiAgICAgICAgICAgICAgICBpZiAoZGlmZkFyZWEgPCBtaW5EaWZmIHx8ICgKICAgICAgICAgICAgICAgIC8vIGJyZWFrIHRpZXMgdG8gbm9kZSB3aXRoIGZld2VzdCBjaGlsZHJlbgogICAgICAgICAgICAgICAgZGlmZkFyZWEgPT09IG1pbkRpZmYgJiYKICAgICAgICAgICAgICAgICAgICBtaW5FbnRyeSAhPSBudWxsICYmCiAgICAgICAgICAgICAgICAgICAgZW50cnkuZW50cmllcy5sZW5ndGggPCBtaW5FbnRyeS5lbnRyaWVzLmxlbmd0aCkpIHsKICAgICAgICAgICAgICAgICAgICBtaW5FbnRyeSA9IGVudHJ5OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBtaW5FbnRyeTsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIFNwbGl0cyB0aGlzIG5vZGUgYnkgY3JlYXRpbmcgdHdvIG5ldyBub2RlcyBhbmQgZGl2aWRpbmcgdGhlIHRoaXMgbm9kZSdzCiAgICAgICAgICogY2hpbGRyZW4gYmV0d2VlbiB0aGVtLiBUaGlzIG5vZGUgaXMgcmVtb3ZlZCBmcm9tIGl0cyBwYXJlbnQgYW5kIHRoZSB0d28KICAgICAgICAgKiBuZXcgbm9kZXMgYXJlIGFkZGVkLgogICAgICAgICAqCiAgICAgICAgICogSWYgdGhpcyBub2RlIGlzIHRoZSByb290LCBhIG5ldyBwYXJlbnQgbm9kZSBpcyBjcmVhdGVkLgogICAgICAgICAqCiAgICAgICAgICogUmV0dXJucyB0aGUgcGFyZW50IG5vZGUuCiAgICAgICAgICovCiAgICAgICAgUlRyZWVOb2RlLnByb3RvdHlwZS5zcGxpdCA9IGZ1bmN0aW9uIChzdHJhdGVneSkgewogICAgICAgICAgICAvLyBSZW1vdmUgc2VsZiBmcm9tIHBhcmVudC4KICAgICAgICAgICAgaWYgKHRoaXMucGFyZW50ICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIHRoaXMucGFyZW50LnJlbW92ZSh0aGlzKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBDcmVhdGUgY2hpbGRyZW4gZnJvbSBzcGxpdAogICAgICAgICAgICB2YXIgY2hpbGRyZW4gPSBbCiAgICAgICAgICAgICAgICBuZXcgUlRyZWVOb2RlKHRoaXMubGVhZiksCiAgICAgICAgICAgICAgICBuZXcgUlRyZWVOb2RlKHRoaXMubGVhZiksCiAgICAgICAgICAgIF07CiAgICAgICAgICAgIHN0cmF0ZWd5LnNwbGl0KHRoaXMuZW50cmllcywgY2hpbGRyZW4pOwogICAgICAgICAgICAvLyBBZGQgbmV3IG5vZGVzIHRvIHBhcmVudAogICAgICAgICAgICAvLyBJZiByb290LCBjcmVhdGUgbmV3IG5vbi1sZWFmIG5vZGUgYXMgcGFyZW50LgogICAgICAgICAgICB2YXIgcGFyZW50ID0gdGhpcy5wYXJlbnQgIT0gbnVsbCA/IHRoaXMucGFyZW50IDogbmV3IFJUcmVlTm9kZShmYWxzZSk7CiAgICAgICAgICAgIHBhcmVudC5pbnNlcnQoY2hpbGRyZW5bMF0pOwogICAgICAgICAgICBwYXJlbnQuaW5zZXJ0KGNoaWxkcmVuWzFdKTsKICAgICAgICAgICAgLy8gQWx3YXlzIG1ha2UgdGhlIHBhcmVudCBhIG5vbi1sZWFmIGFmdGVyIHNwbGl0CiAgICAgICAgICAgIHBhcmVudC5sZWFmID0gZmFsc2U7CiAgICAgICAgICAgIHJldHVybiBwYXJlbnQ7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBSZXR1cm5zIHRoZSBkaWZmZXJlbmNlIGluIGFyZWEgdGhhdCBhZGRpbmcgYW4gZW50cnkgYGJvdW5kc2AgdG8gdGhlIG5vZGUKICAgICAgICAgKiB3b3VsZCBjYXVzZS4KICAgICAgICAgKi8KICAgICAgICBSVHJlZU5vZGUucHJvdG90eXBlLnVuaW9uQXJlYURpZmZlcmVuY2UgPSBmdW5jdGlvbiAoYm91bmRzKSB7CiAgICAgICAgICAgIHJldHVybiBNYXRoLmFicyhSVHJlZUJvdW5kcy51bmlvbih0aGlzLmJvdW5kcywgYm91bmRzKS5hcmVhKCkgLSB0aGlzLmJvdW5kcy5hcmVhKCkpOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0dXJucyB0aGUgZGVwdGggZnJvbSB0aGlzIG5vZGUgdG8gdGhlIGRlZXBlc3QgbGVhZiBkZXNjZW5kYW50LgogICAgICAgICAqLwogICAgICAgIFJUcmVlTm9kZS5wcm90b3R5cGUubWF4RGVwdGggPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmxlYWYpCiAgICAgICAgICAgICAgICByZXR1cm4gMTsKICAgICAgICAgICAgcmV0dXJuIDEgKyB0aGlzLmVudHJpZXMubWFwKGZ1bmN0aW9uIChlKSB7IHJldHVybiBlLm1heERlcHRoKCk7IH0pLnJlZHVjZShmdW5jdGlvbiAoYSwgYikgeyByZXR1cm4gTWF0aC5tYXgoYSwgYik7IH0pOwogICAgICAgIH07CiAgICAgICAgcmV0dXJuIFJUcmVlTm9kZTsKICAgIH0oKSk7CiAgICBleHBvcnRzLlJUcmVlTm9kZSA9IFJUcmVlTm9kZTsKICAgIHZhciBSVHJlZUJvdW5kcyA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uICgpIHsKICAgICAgICBmdW5jdGlvbiBSVHJlZUJvdW5kcyh4bCwgeWwsIHhoLCB5aCkgewogICAgICAgICAgICB0aGlzLnhsID0geGw7CiAgICAgICAgICAgIHRoaXMueWwgPSB5bDsKICAgICAgICAgICAgdGhpcy54aCA9IHhoOwogICAgICAgICAgICB0aGlzLnloID0geWg7CiAgICAgICAgICAgIHRoaXMud2lkdGggPSB0aGlzLnhoIC0gdGhpcy54bDsKICAgICAgICAgICAgdGhpcy5oZWlnaHQgPSB0aGlzLnloIC0gdGhpcy55bDsKICAgICAgICB9CiAgICAgICAgUlRyZWVCb3VuZHMueHl3aCA9IGZ1bmN0aW9uICh4LCB5LCB3LCBoKSB7CiAgICAgICAgICAgIHJldHVybiBuZXcgUlRyZWVCb3VuZHMoeCwgeSwgeCArIHcsIHkgKyBoKTsKICAgICAgICB9OwogICAgICAgIFJUcmVlQm91bmRzLmVudGl0eUJvdW5kcyA9IGZ1bmN0aW9uIChib3VuZHMpIHsKICAgICAgICAgICAgcmV0dXJuIG5ldyBSVHJlZUJvdW5kcyhib3VuZHMueCwgYm91bmRzLnksIGJvdW5kcy54ICsgYm91bmRzLndpZHRoLCBib3VuZHMueSArIGJvdW5kcy5oZWlnaHQpOwogICAgICAgIH07CiAgICAgICAgUlRyZWVCb3VuZHMuYm91bmRzID0gZnVuY3Rpb24gKGJvdW5kcykgewogICAgICAgICAgICByZXR1cm4gU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uZHMudW5pb24gPSBmdW5jdGlvbiAoYjAsIGIxKSB7CiAgICAgICAgICAgIHJldHVybiBuZXcgUlRyZWVCb3VuZHMoTWF0aC5taW4oYjAueGwsIGIxLnhsKSwgTWF0aC5taW4oYjAueWwsIGIxLnlsKSwgTWF0aC5tYXgoYjAueGgsIGIxLnhoKSwgTWF0aC5tYXgoYjAueWgsIGIxLnloKSk7CiAgICAgICAgfTsKICAgICAgICBSVHJlZUJvdW5kcy51bmlvbkFsbCA9IGZ1bmN0aW9uIChib3VuZHMpIHsKICAgICAgICAgICAgYm91bmRzID0gYm91bmRzLmZpbHRlcihmdW5jdGlvbiAoYikgeyByZXR1cm4gYiAhPSBudWxsOyB9KTsKICAgICAgICAgICAgaWYgKGJvdW5kcy5sZW5ndGggPT09IDApIHsKICAgICAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBib3VuZHMucmVkdWNlKGZ1bmN0aW9uIChiMCwgYjEpIHsgcmV0dXJuIFJUcmVlQm91bmRzLnVuaW9uKGIwLCBiMSk7IH0pOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0dXJucyB0cnVlIGlmIGBhYCBvdmVybGFwcyBgYmAgaW4gdGhlIHggYW5kIHkgYXhlcy4KICAgICAgICAgKgogICAgICAgICAqIFRvdWNoaW5nIGNvdW50cyBhcyBvdmVybGFwLgogICAgICAgICAqLwogICAgICAgIFJUcmVlQm91bmRzLmlzQm91bmRzT3ZlcmxhcEJvdW5kcyA9IGZ1bmN0aW9uIChhLCBiKSB7CiAgICAgICAgICAgIHJldHVybiBSVHJlZUJvdW5kcy5pc0JvdW5kc092ZXJsYXBYKGEsIGIpICYmIFJUcmVlQm91bmRzLmlzQm91bmRzT3ZlcmxhcFkoYSwgYik7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBSZXR1cm5zIHRydWUgaWYgYGFgIG92ZXJsYXBzIGBiYCBpbiB0aGUgeCBheGlzIG9ubHkuCiAgICAgICAgICoKICAgICAgICAgKiBUb3VjaGluZyBjb3VudHMgYXMgb3ZlcmxhcC4KICAgICAgICAgKi8KICAgICAgICBSVHJlZUJvdW5kcy5pc0JvdW5kc092ZXJsYXBYID0gZnVuY3Rpb24gKGEsIGIpIHsKICAgICAgICAgICAgcmV0dXJuICEoYS54aCA8IGIueGwpICYmICEoYS54bCA+IGIueGgpOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0dXJucyB0cnVlIGlmIGBhYCBvdmVybGFwcyBgYmAgaW4gdGhlIHkgYXhpcyBvbmx5LgogICAgICAgICAqCiAgICAgICAgICogVG91Y2hpbmcgY291bnRzIGFzIG92ZXJsYXAuCiAgICAgICAgICovCiAgICAgICAgUlRyZWVCb3VuZHMuaXNCb3VuZHNPdmVybGFwWSA9IGZ1bmN0aW9uIChhLCBiKSB7CiAgICAgICAgICAgIHJldHVybiAhKGEueWggPCBiLnlsKSAmJiAhKGEueWwgPiBiLnloKTsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgdGhlIG9ydGhvZ29uYWwgYWJzb2x1dGUgZGlzdGFuY2UgaW4gdGhlIHgtZGltZW5zaW9uIGZyb20gcG9pbnQKICAgICAgICAgKiBgcGAgdG8gdGhlIG5lYXJlc3QgZWRnZSBvZiBgYm91bmRzYC4KICAgICAgICAgKgogICAgICAgICAqIElmIGBwLnhgIGlzIGluc2lkZSB0aGUgYm91bmRzIHJldHVybnMgYDBgLgogICAgICAgICAqLwogICAgICAgIFJUcmVlQm91bmRzLmFic29sdXRlRGlzdGFuY2VUb05lYXJFZGdlWCA9IGZ1bmN0aW9uIChib3VuZHMsIHApIHsKICAgICAgICAgICAgdmFyIGhhbGYgPSBib3VuZHMud2lkdGggLyAyOwogICAgICAgICAgICB2YXIgbWlkID0gYm91bmRzLnhsICsgaGFsZjsKICAgICAgICAgICAgcmV0dXJuIE1hdGgubWF4KE1hdGguYWJzKHAueCAtIG1pZCkgLSBoYWxmLCAwKTsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgdGhlIG9ydGhvZ29uYWwgYWJzb2x1dGUgZGlzdGFuY2UgaW4gdGhlIHktZGltZW5zaW9uIGZyb20gcG9pbnQKICAgICAgICAgKiBgcGAgdG8gdGhlIG5lYXJlc3QgZWRnZSBvZiBgYm91bmRzYC4KICAgICAgICAgKgogICAgICAgICAqIElmIGBwLnlgIGlzIGluc2lkZSB0aGUgYm91bmRzIHJldHVybnMgYDBgLgogICAgICAgICAqLwogICAgICAgIFJUcmVlQm91bmRzLmFic29sdXRlRGlzdGFuY2VUb05lYXJFZGdlWSA9IGZ1bmN0aW9uIChib3VuZHMsIHApIHsKICAgICAgICAgICAgdmFyIGhhbGYgPSBib3VuZHMuaGVpZ2h0IC8gMjsKICAgICAgICAgICAgdmFyIG1pZCA9IGJvdW5kcy55bCArIGhhbGY7CiAgICAgICAgICAgIHJldHVybiBNYXRoLm1heChNYXRoLmFicyhwLnkgLSBtaWQpIC0gaGFsZiwgMCk7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBSZXR1cm5zIHRoZSBvcnRob2dvbmFsIGFic29sdXRlIGRpc3RhbmNlIGluIHRoZSB4LWRpbWVuc2lvbiBmcm9tIHBvaW50CiAgICAgICAgICogYHBgIHRvIHRoZSBmYXJ0aGVzdCBlZGdlIG9mIGBib3VuZHNgLgogICAgICAgICAqCiAgICAgICAgICogSWYgYHAueGAgaXMgaW5zaWRlIHRoZSBib3VuZHMgcmV0dXJucyBgMGAuCiAgICAgICAgICovCiAgICAgICAgUlRyZWVCb3VuZHMuYWJzb2x1dGVEaXN0YW5jZVRvRmFyRWRnZVggPSBmdW5jdGlvbiAoYm91bmRzLCBwKSB7CiAgICAgICAgICAgIHZhciBuZWFyID0gUlRyZWVCb3VuZHMuYWJzb2x1dGVEaXN0YW5jZVRvTmVhckVkZ2VYKGJvdW5kcywgcCk7CiA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mRzLmRpc3RhbmNlU3F1YXJlZFRvTmVhckVkZ2UgPSBmdW5jdGlvbiAoYm91bmRzLCBwKSB7CiAgICAgICAgICAgIHZhciBkeCA9IFJUcmVlQm91bmRzLmFic29sdXRlRGlzdGFuY2VUb05lYXJFZGdlWChib3VuZHMsIHApOwogICAgICAgICAgICB2YXIgZHkgPSBSVHJlZUJvdW5kcy5hYnNvbHV0ZURpc3RhbmNlVG9OZWFyRWRnZVkoYm91bmRzLCBwKTsKICAgICAgICAgICAgcmV0dXJuIGR4ICogZHggKyBkeSAqIGR5OwogICAgICAgIH07CiAgICAgICAgUlRyZWVCb3VuZHMuZGlzdGFuY2VTcXVhcmVkVG9GYXJFZGdlID0gZnVuY3Rpb24gKGJvdW5kcywgcCkgewogICAgICAgICAgICB2YXIgZHggPSBSVHJlZUJvdW5kcy5hYnNvbHV0ZURpc3RhbmNlVG9GYXJFZGdlWChib3VuZHMsIHApOwogICAgICAgICAgICB2YXIgZHkgPSBSVHJlZUJvdW5kcy5hYnNvbHV0ZURpc3RhbmNlVG9GYXJFZGdlWShib3VuZHMsIHApOwogICAgICAgICAgICByZXR1cm4gZHggKiBkeCArIGR5ICogZHk7CiAgICAgICAgfTsKICAgICAgICBSVHJlZUJvdW5kcy5wcm90b3R5cGUuYXJlYSA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgaWYgKHRoaXMuYXJlYUNhY2hlZCA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICB0aGlzLmFyZWFDYWNoZWQgPSAodGhpcy54aCAtIHRoaXMueGwpICogKHRoaXMueWggLSB0aGlzLnlsKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpcy5hcmVhQ2FjaGVkOwogICAgICAgIH07CiAgICAgICAgUlRyZWVCb3VuZHMucHJvdG90eXBlLmNvbnRhaW5zID0gZnVuY3Rpb24gKHh5KSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLnhsIDw9IHh5LnggJiYgdGhpcy54aCA+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BpZiAoc3RhY2tpbmdPcmRlciA9PT0gInRvcGRvd24iKSB7CiAgICAgICAgICAgIGRhdGFzZXRzID0gZGF0YXNldHMuc2xpY2UoKTsKICAgICAgICAgICAgZGF0YXNldHMucmV2ZXJzZSgpOwogICAgICAgIH0KICAgICAgICBmb3IgKHZhciBfaSA9IDAsIGRhdGFzZXRzXzEgPSBkYXRhc2V0czsgX2kgPCBkYXRhc2V0c18xLmxlbmd0aDsgX2krKykgewogICAgICAgICAgICB2YXIgZGF0YXNldCA9IGRhdGFzZXRzXzFbX2ldOwogICAgICAgICAgICB2YXIga2V5VG9TdGFja2VkRGF0dW0gPSBuZXcgdXRpbHMkMS5NYXAoKTsKICAgICAgICAgICAgdmFyIGRhdGEgPSBkYXRhc2V0LmRhdGEoKTsKICAgICAgICAgICAgdmFyIGRhdGFMZW4gPSBkYXRhLmxlbmd0aDsKICAgICAgICAgICAgZm9yICh2YXIgaW5kZXggPSAwOyBpbmRleCA8IGRhdGFMZW47IGluZGV4KyspIHsKICAgICAgICAgICAgICAgIHZhciBkYXR1bSA9IGRhdGFbaW5kZXhdOwogICAgICAgICAgICAgICAgdmFyIGFjY2Vzc2VkS2V5ID0ga2V5QWNjZXNzb3IoZGF0dW0sIGluZGV4LCBkYXRhc2V0KTsKICAgICAgICAgICAgICAgIHZhciBrZXkgPSBleHBvcnRzLm5vcm1hbGl6ZUtleShhY2Nlc3NlZEtleSk7CiAgICAgICAgICAgICAgICB2YXIgdmFsdWUgPSArdmFsdWVBY2Nlc3NvcihkYXR1bSwgaW5kZXgsIGRhdGFzZXQpOwogICAgICAgICAgICAgICAgdmFyIG9mZnNldCA9IHZvaWQgMDsKICAgICAgICAgICAgICAgIHZhciBvZmZzZXRNYXAgPSAodmFsdWUgPj0gMCkgPyBwb3NpdGl2ZU9mZnNldHMgOiBuZWdhdGl2ZU9mZnNldHM7CiAgICAgICAgICAgICAgICBpZiAob2Zmc2V0TWFwLmhhcyhrZXkpKSB7CiAgICAgICAgICAgICAgICAgICAgb2Zmc2V0ID0gb2Zmc2V0TWFwLmdldChrZXkpOwogICAgICAgICAgICAgICAgICAgIG9mZnNldE1hcC5zZXQoa2V5LCBvZmZzZXQgKyB2YWx1ZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBvZmZzZXQgPSAwOwogICAgICAgICAgICAgICAgICAgIG9mZnNldE1hcC5zZXQoa2V5LCB2YWx1ZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBrZXlUb1N0YWNrZWREYXR1bS5zZXQoa2V5LCB7CiAgICAgICAgICAgICAgICAgICAgb2Zmc2V0OiBvZmZzZXQsCiAgICAgICAgICAgICAgICAgICAgdmFsdWU6IHZhbHVlLAogICAgICAgICAgICAgICAgICAgIGF4aXNWYWx1ZTogYWNjZXNzZWRLZXksCiAgICAgICAgICAgICAgICAgICAgb3JpZ2luYWxEYXR1bTogZGF0dW0sCiAgICAgICAgICAgICAgICAgICAgb3JpZ2luYWxEYXRhc2V0OiBkYXRhc2V0LAogICAgICAgICAgICAgICAgICAgIG9yaWdpbmFsSW5kZXg6IGluZGV4LAogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZGF0YXNldFRvS2V5VG9TdGFja2VkRGF0dW0uc2V0KGRhdGFzZXQsIGtleVRvU3RhY2tlZERhdHVtKTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGRhdGFzZXRUb0tleVRvU3RhY2tlZERhdHVtOwogICAgfQogICAgZXhwb3J0cy5zdGFjayA9IHN0YWNrOwogICAgLyoqCiAgICAgKiBDb21wdXRlcyB0aGUgbWF4aW11bSBhbmQgbWluaW11bSBleHRlbnRzIG9mIGVhY2ggc3RhY2sgaW5kaXZpZHVhbGx5LgogICAgICoKICAgICAqIEBwYXJhbSB7R2VuZXJpY1N0YWNraW5nUmVzdWx0fSBzdGFja2luZ1Jlc3VsdCBUaGUgdmFsdW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bHVlOwogICAgICAgICAgICAgICAgaWYgKCFtYXhpbXVtRXh0ZW50cy5oYXMoa2V5KSkgewogICAgICAgICAgICAgICAgICAgIG1heGltdW1FeHRlbnRzLnNldChrZXksIHsgZXh0ZW50OiBtYXhpbWFsVmFsdWUsIGF4aXNWYWx1ZTogYXhpc1ZhbHVlLCBzdGFja2VkRGF0dW06IGRhdHVtIH0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAobWF4aW11bUV4dGVudHMuZ2V0KGtleSkuZXh0ZW50IDwgbWF4aW1hbFZhbHVlKSB7CiAgICAgICAgICAgICAgICAgICAgbWF4aW11bUV4dGVudHMuc2V0KGtleSwgeyBleHRlbnQ6IG1heGltYWxWYWx1ZSwgYXhpc1ZhbHVlOiBheGlzVmFsdWUsIHN0YWNrZWREYXR1bTogZGF0dW0gfSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAoIW1pbmltdW1FeHRlbnRzLmhhcyhrZXkpKSB7CiAgICAgICAgICAgICAgICAgICAgbWluaW11bUV4dGVudHMuc2V0KGtleSwgeyBleHRlbnQ6IG1pbmltYWxWYWx1ZSwgYXhpc1ZhbHVlOiBheGlzVmFsdWUsIHN0YWNrZWREYXR1bTogZGF0dW0gfSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmIChtaW5pbXVtRXh0ZW50cy5nZXQoa2V5KS5leHRlbnQgPiAobWluaW1hbFZhbHVlKSkgewogICAgICAgICAgICAgICAgICAgIG1pbmltdW1FeHRlbnRzLnNldChrZXksIHsgZXh0ZW50OiBtaW5pbWFsVmFsdWUsIGF4aXNWYWx1ZTogYXhpc1ZhbHVlLCBzdGFja2VkRGF0dW06IGRhdHVtIH0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICB9KTsKICAgICAgICByZXR1cm4geyBtYXhpbXVtRXh0ZW50czogbWF4aW11bUV4dGVudHMsIG1p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XRhLmxlbmd0aDsKICAgICAgICAgICAgZm9yICh2YXIgaW5kZXggPSAwOyBpbmRleCA8IGRhdGFMZW47IGluZGV4KyspIHsKICAgICAgICAgICAgICAgIHZhciBkYXR1bSA9IGRhdGFbaW5kZXhdOwogICAgICAgICAgICAgICAgaWYgKGZpbHRlciAhPSBudWxsICYmICFmaWx0ZXIoZGF0dW0sIGluZGV4LCBkYXRhc2V0KSkgewogICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdmFyIHN0YWNrZWREYXR1bSA9IHN0YWNrZWREYXR1bU1hcC5nZXQoZXhwb3J0cy5ub3JtYWxpemVLZXkoa2V5QWNjZXNzb3IoZGF0dW0sIGluZGV4LCBkYXRhc2V0KSkpOwogICAgICAgICAgICAgICAgZXh0ZW50cy5wdXNoKHN0YWNrZWREYXR1bS52YWx1ZSArIHN0YWNrZWREYXR1bS5vZmZzZXQpOwogICAgICAgICAgICB9CiAgICAgICAgfSk7CiAgICAgICAgdmFyIG1heFN0YWNrRXh0ZW50ID0gdXRpbHMkMS5NYXRoLm1heChleHRlbnRzLCAwKTsKICAgICAgICB2YXIgbWluU3RhY2tFeHRlbnQgPSB1dGlscyQxLk1hdGgubWluKGV4dGVudHMsIDApOwogICAgICAgIHJldHVybiBbbmF0aXZlTWF0aC5taW4obWluU3RhY2tFeHRlbnQsIDApLCBuYXRpdmVNYXRoLm1heCgwLCBtYXhTdGFja0V4dGVudCldOwogICAgfQogICAgZXhwb3J0cy5zdGFja2VkRXh0ZW50ID0gc3RhY2tlZEV4dGVudDsKICAgIC8qKgogICAgICogTm9ybWFsaXplcyBhIGtleSB1c2VkIGZvciBzdGFja2luZwogICAgICoKICAgICAqIEBwYXJhbSB7YW55fSBrZXkgVGhlIGtleSB0byBiZSBub3JtYWxpemVkCiAgICAgKiBAcmV0dXJuIHtzdHJpbmd9IFRoZSBzdHJpbmdpZmllZCBrZXkKICAgICAqLwogICAgZXh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VsZSwgZXhwb3J0cykgewogICAgLyoqCiAgICAgKiBDb3B5cmlnaHQgMjAxNy1wcmVzZW50IFBhbGFudGlyIFRlY2hub2xvZ2llcwogICAgICogQGxpY2Vuc2UgTUlUCiAgICAgKi8KICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCAiX19lc01vZHVsZSIsIHsgdmFsdWU6IHRydWUgfSk7CiAgICAvKioKICAgICAqIFRoaXMgY2xhc3Mga2VlcHMgdHJhY2sgb2YgYnVja2V0aW5nIHN0YXRlIHdoaWxlIGNvbGxhcHNpbmcgZGVuc2UgbGluZQogICAgICogZ2VvbWV0cnkgaW4gYSBsaW5lIGFuZCBhcmVhIHBsb3RzLgogICAgICovCiAgICB2YXIgQnVja2V0ID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKCkgewogICAgICAgIGZ1bmN0aW9uIEJ1Y2tldChpbmRleCwgeFZhbHVlLCB5VmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5lbnRyeUluZGV4ID0gaW5kZXg7CiAgICAgICAgICAgIHRoaXMuZXhpdEluZGV4ID0gaW5kZXg7CiAgICAgICAgICAgIHRoaXMubWluSW5kZXggPSBpbmRleDsKICAgICAgICAgICAgdGhpcy5tYXhJbmRleCA9IGluZGV4OwogICAgICAgICAgICB0aGlzLmJ1Y2tldFZhbHVlID0geFZhbHVlOwogICAgICAgICAgICB0aGlzLm1pblZhbHVlID0geVZhbHVlOwogICAgICAgICAgICB0aGlzLm1heFZhbHVlID0geVZhbHVlOwogICAgICAgIH0KICAgICAgICBCdWNrZXQucHJvdG90eXBlLmlzSW5CdWNrZXQgPSBmdW5jdGlvbiAodmFsdWUpIHsKICAgICAgICAgICAgcmV0dXJuIHZhbHVlID09IHRoaXMuYnVja2V0VmFsdWU7CiAgICAgICAgfTsKICAgICAgICBCdWNrZXQucHJvdG90eXBlLmFkZFRvQnVja2V0ID0gZnVuY3Rpb24gKHZhbHVlLCBpbmRleCkgewogICAgICAgICAgICBpZiAodmFsdWUgPCB0aGlzLm1pblZhbHVlKSB7CiAgICAgICAgICAgICAgICB0aGlzLm1pblZhbHVlID0gdmFsdWU7CiAgICAgICAgICAgICAgICB0aGlzLm1pbkluZGV4ID0gaW5kZXg7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHZhbHVlID4gdGhpcy5tYXhWYWx1ZSkgewogICAgICAgICAgICAgICAgdGhpcy5tYXhWYWx1ZSA9IHZhbHVlOwogICAgICAgICAgICAgICAgdGhpcy5tYXhJbmRleCA9IGluZGV4OwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuZXhpdEluZGV4ID0gaW5kZXg7CiAgICAgICAgfTsKICAgICAgICBCdWNrZXQucHJvdG90eXBlLmdldFVuaXF1ZUluZGljZXMgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHZhciBpZHhzID0gW3RoaXMuZW50cnlJbmRleCwgdGhpcy5tYXhJbmRleCwgdGhpcy5taW5JbmRleCwgdGhpcy5leGl0SW5kZXhdOwogICAgICAgICAgICByZXR1cm4gaWR4cy5maWx0ZXIoZnVuY3Rpb24gKGlkeCwgaSkgeyByZXR1cm4gaSA9PSAwIHx8IGlkeCAhPSBpZHhzW2kgLSAxXTsgfSk7CiAgICAgICAgfTsKICAgICAgICByZXR1cm4gQnVja2V0OwogICAgfSgpKTsKICAgIGV4cG9ydHMuQnVja2V0ID0gQnVja2V0OwogICAgfSk7CgogICAgdmFyIHNldCRnID0gY3JlYXRlQ29tbW9uanNNb2R1bGUoZnVuY3Rpb24gKG1vZHVsZSwgZXhwb3J0cykgewogICAgLyoqCiAgICAgKiBDb3B5cmlnaHQgMjAxNC1wcmVzZW50IFBhbGFudGlyIFRlY2hub2xvZ2llcwogICAgICogQGxpY2Vuc2UgTUlUCiAgICAgKi8KICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCAiX19lc01vZHVsZSIsIHsgdmFsdWU6IHRydWUgfSk7CiAgICAvKioKICAgICAqIFNoaW0gZm9yIEVTNiBzZXQuCiAgICAgKiBodHRwczovL2RldmVsb3Blci5tb3ppbGxhLm9yZy9lbi1VUy9kb2NzL1dlYi9KYXZhU2NyaXB0L1JlZmVyZW5jZS9HbG9iYWxfT2JqZWN0cy9TZXQKICAgICAqLwogICAgdmFyIFNldCA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uICgpIHsKICAgICAgICBmdW5jdGlvbiBTZXQoKSB7CiAgICAgICAgICAgIGlmICh0eXBlb2Ygd2luZG93LlNldCA9PT0gImZ1bmN0aW9uIikgewogICAgICAgICAgICAgICAgdGhpcy5fZXM2U2V0ID0gbmV3IHdpbmRvdy5TZXQoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuX3ZhbHVlcyA9IFtdOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuc2l6ZSA9IDA7CiAgICAgICAgfQogICAgICAgIFNldC5wcm90b3R5cGUuYWRkID0gZnVuY3Rpb24gKHZhbHVlKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9lczZTZXQgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5fZXM2U2V0LmFkZCh2YWx1ZSk7CiAgICAgICAgICAgICAgICB0aGlzLnNpemUgPSB0aGlzLl9lczZTZXQuc2l6ZTsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICghdGhpcy5oYXModmFsdWUpKSB7CiAgICAgICAgICAgICAgICB0aGlzLl92YWx1ZXMucHVzaCh2YWx1ZSk7CiAgICAgICAgICAgICAgICB0aGlzLnNpemUgPSB0aGlzLl92YWx1ZXMubGVuZ3RoOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgU2V0LnByb3RvdHlwZS5kZWxldGUgPSBmdW5jdGlvbiAodmFsdWUpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX2VzNlNldCAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICB2YXIgZGVsZXRlZCA9IHRoaXMuX2VzNlNldC5kZWxldGUodmFsdWUpOwogICAgICAgICAgICAgICAgdGhpcy5zaXplID0gdGhpcy5fZXM2U2V0LnNpemU7CiAgICAgICAgICAgICAgICByZXR1cm4gZGVsZXRlZDsKICAgICAgICAgICAgfQogICAgICAgICAgICB2YXIgaW5kZXggPSB0aGlzLl92YWx1ZXMuaW5kZXhPZih2YWx1ZSk7CiAgICAgICAgICAgIGlmIChpbmRleCAhPT0gLTEpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3ZhbHVlcy5zcGxpY2UoaW5kZXgsIDEpOwogICAgICAgICAgICAgICAgdGhpcy5zaXplID0gdGhpcy5fdmFsdWVzLmxlbmd0aDsKICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICB9OwogICAgICAgIFNldC5wcm90b3R5cGUuaGFzID0gZnVuY3Rpb24gKHZhbHVlKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9lczZTZXQgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2VzNlNldC5oYXModmFsdWUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0aGlzLl92YWx1ZXMuaW5kZXhPZih2YWx1ZSkgIT09IC0xOwogICAgICAgIH07CiAgICAgICAgU2V0LnByb3RvdHlwZS5mb3JFYWNoID0gZnVuY3Rpb24gKGNhbGxiYWNrLCB0aGlzQXJnKSB7CiAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7CiAgICAgICAgICAgIGlmICh0aGlzLl9lczZTZXQgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgdmFyIGNhbGxiYWNrV3JhcHBlciA9IGZ1bmN0aW9uICh2YWx1ZSwgdmFsdWUyKSB7IHJldH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ovIChmdW5jdGlvbiAoX3N1cGVyKSB7CiAgICAgICAgdHNsaWJfZXM2Ll9fZXh0ZW5kcyhDYWxsYmFja1NldCwgX3N1cGVyKTsKICAgICAgICBmdW5jdGlvbiBDYWxsYmFja1NldCgpIHsKICAgICAgICAgICAgcmV0dXJuIF9zdXBlciAhPT0gbnVsbCAmJiBfc3VwZXIuYXBwbHkodGhpcywgYXJndW1lbnRzKSB8fCB0aGlzOwogICAgICAgIH0KICAgICAgICBDYWxsYmFja1NldC5wcm90b3R5cGUuY2FsbENhbGxiYWNrcyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgdmFyIGFyZ3MgPSBbXTsKICAgICAgICAgICAgZm9yICh2YXIgX2kgPSAwOyBfaSA8IGFyZ3VtZW50cy5sZW5ndGg7IF9pKyspIHsKICAgICAgICAgICAgICAgIGFyZ3NbX2ldID0gYXJndW1lbnRzW19pXTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLmZvckVhY2goZnVuY3Rpb24gKGNhbGxiYWNrKSB7CiAgICAgICAgICAgICAgICBjYWxsYmFjay5hcHBseShfdGhpcywgYXJncyk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIHJldHVybiBDYWxsYmFja1NldDsKICAgIH0oc2V0JGcuU2V0KSk7CiAgICBleHBvcnRzLkNhbGxiYWNrU2V0ID0gQ2FsbGJhY2tTZXQ7CiAgICB9KTsKCiAgICB2YXIgZW50aXR5U3RvcmUgPSBjcmVhdGVDb21tb25qc01vZHVsZShmdW5jdGlvbiAobW9kdWxlLCBleHBvcnRzKSB7CiAgICAvKioKICAgICAqIENvcHlyaWdodCAyMDE0LXByZXNlbnQgUGFsYW50aXIgVGVjaG5vbG9naWVzCiAgICAgKiBAbGljZW5zZSBNSVQKICAgICAqLwogICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9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kgewogICAgICAgICAgICAgICAgdmFyIGZpbHRlckJvdW5kcyA9IHJUcmVlLlJUcmVlQm91bmRzLmJvdW5kcyhib3VuZHMpOwogICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBlbnRpdGllcy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgICAgIHZhciBlbnRpdHkgPSBlbnRpdGllc1tpXTsKICAgICAgICAgICAgICAgICAgICB2YXIgZW50aXR5Qm91bmRzID0gclRyZWUuUlRyZWVCb3VuZHMuZW50aXR5Qm91bmRzKGVudGl0eUJvdW5kc0ZhY3RvcnkoZW50aXR5KSk7CiAgICAgICAgICAgICAgICAgICAgaWYgKHJUcmVlLlJUcmVlQm91bmRzLmlzQm91bmRzT3ZlcmxhcEJvdW5kcyhmaWx0ZXJCb3VuZHMsIGVudGl0eUJvdW5kcykpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fcnRyZWUuaW5zZXJ0KGVudGl0eUJvdW5kcywgZW50aXR5KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGVudGl0aWVzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIGVudGl0eSA9IGVudGl0aWVzW2ldOwogICAgICAgICAgICAgICAgICAgIHZhciBlbnRpdHlCb3VuZHMgPSByVHJlZS5SVHJlZUJvdW5kcy5lbnRpdHlCb3VuZHMoZW50aXR5Qm91bmRzRmFjdG9yeShlbnRpdHkpKTsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9ydHJlZS5pbnNlcnQoZW50aXR5Qm91bmRzLCBlbnRpdHkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBFbnRpdHlTdG9yZS5wcm90b3R5cGUuZW50aXR5TmVhcmVzd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IFtdOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIE1hcC5wcm90b3R5cGUuc2V0ID0gZnVuY3Rpb24gKGtleSwgdmFsdWUpIHsKICAgICAgICAgICAgaWYgKG1hdGhVdGlscy5pc05hTihrZXkpKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoIk5hTiBtYXkgbm90IGJlIHVzZWQgYXMgYSBrZXkgdG8gdGhlIE1hcCIpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0aGlzLl9lczZNYXAgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5fZXM2TWFwLnNldChrZXksIHZhbHVlKTsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdGhpcy5fa2V5VmFsdWVQYWlycy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgaWYgKHRoaXMuX2tleVZhbHVlUGFpcnNbaV0ua2V5ID09PSBrZXkpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9rZXlWYWx1ZVBhaXJzW2ldLnZhbHVlID0gdmFsdWU7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fa2V5VmFsdWVQYWlycy5wdXNoKHsga2V5OiBrZXksIHZhbHVlOiB2YWx1ZSB9KTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBNYXAucHJvdG90eXBlLmdldCA9IGZ1bmN0aW9uIChrZXkpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX2VzNk1hcCAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fZXM2TWFwLmdldChrZXkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdGhpcy5fa2V5VmFsdWVQYWlycy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgaWYgKHRoaXMuX2tleVZhbHVlUGFpcnNbaV0ua2V5ID09PSBrZXkpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fa2V5VmFsdWVQYWlyc1tpXS52YWx1ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkOwogICAgICAgIH07CiAgICAgICAgTWFwLnByb3RvdHlwZS5oYXMgPSBmdW5jdGlvbiAoa2V5KSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9lczZNYXAgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2VzNk1hcC5oYXMoa2V5KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRoaXMuX2tleVZhbHVlUGFpcnMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIGlmICh0aGlzLl9rZXlWYWx1ZVBhaXJzW2ldLmtleSA9PT0ga2V5KSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgIH07CiAgICAgICAgTWFwLnByb3RvdHlwZS5mb3JFYWNoID0gZnVuY3Rpb24gKGNhbGxiYWNrRm4sIHRoaXNBcmcpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgaWYgKHRoaXMuX2VzNk1hcCAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICB2YXIgY2FsbGJhY2tXcmFwcGVyID0gZnVuY3Rpb24gKHZhbHVlLCBrZXkpIHsgcmV0dXJuIGNhbGxiYWNrRm4uY2FsbCh0aGlzQXJnLCB2YWx1ZSwga2V5LCBfdGhpcyk7IH07CiAgICAgICAgICAgICAgICB0aGlzLl9lczZNYXAuZm9yRWFjaChjYWxsYmFja1dyYXBwZXIsIHRoaXNBcmcpOwogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2tleVZhbHVlUGFpcnMuZm9yRWFjaChmdW5jdGlvbiAoa2V5VmFsdWVQYWlyKSB7CiAgICAgICAgICAgICAgICBjYWxsYmFja0ZuLmNhbGwodGhpc0FyZywga2V5VmFsdWVQYWlyLnZhbHVlLCBrZXlWYWx1ZVBhaXIua2V5LCBfdGhpcyk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH07CiAgICAgICAgTWFwLnByb3RvdHlwZS5kZWxldGUgPSBmdW5jdGlvbiAoa2V5KSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9lczZNYXAgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2VzNk1hcC5kZWxldGUoa2V5KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRoaXMuX2tleVZhbHVlUGFpcnMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIGlmICh0aGlzLl9rZXlWYWx1ZVBhaXJzW2ldLmtleSA9PT0ga2V5KSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fa2V5VmFsdWVQYWlycy5zcGxpY2UoaSwgMSk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgIH07CiAgICAgICAgcmV0dXJuIE1hcDsKICAgIH0oKSk7CiAgICBleHBvcnRzLk1hcCA9IE1hcDsKICAgIH0pOwoKICAgIHZhciBvYmplY3RVdGlscyA9IGNyZWF0ZUNvbW1vbmpzTW9kdWxlKGZ1bmN0aW9uIChtb2R1bGUsIGV4cG9ydHMpIHsKICAgIC8qKgogICAgICogQ29weXJpZ2h0IDIwMTctcHJlc2VudCBQYWxhbnRpciBUZWNobm9sb2dpZXMKICAgICAqIEBsaWNlbnNlIE1JVAogICAgICovCiAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgIl9fZXNNb2R1bGUiLCB7IHZhbHVlOiB0cnVlIH0pOwogICAgLyoqCiAgICAgKiBQb2x5ZmlsbCBmb3IgT2JqZWN0LmFzc2lnbgogICAgICovCiAgICBmdW5jdGlvbiBhc3NpZ24oKSB7CiAgICAgICAgdmFyIG9ianMgPSBbXTsKICAgICAgICBmb3IgKHZhciBfaSA9IDA7IF9pIDwgYXJndW1lbnRzLmxlbmd0aDsgX2krKykgewogICAgICAgICAgICBvYmpzW19pXSA9IGFyZ3VtZW50c1tfaV07CiAgICAgICAgfQogICAgICAgIHZhciByZXN1bHQgPSB7fTsKICAgICAgICBmb3IgKHZhciBfYSA9IDAsIG9ianNfMSA9IG9ianM7IF9hIDwgb2Jqc18xLmxlbmd0aDsgX2ErKykgewogICAgICAgICAgICB2YXIgb2JqID0gb2Jqc18xW19hXTsKICAgICAgICAgICAgdmFyIGtleXMgPSBPYmplY3Qua2V5cyhvYmopOwogICAgICAgICAgICBmb3IgKHZhciBfYiA9IDAsIGtleXNfMSA9IGtleXM7IF9iIDwga2V5c18xLmxlbmd0aDsgX2IrKykgewogICAgICAgICAgICAgICAgdmFyIGtleSA9IGtleXNfMVtfYl07CiAgICAgICAgICAgICAgICByZXN1bHRba2V5XSA9IG9ialtrZXldOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiByZXN1bHQ7CiAgICB9CiAgICBleHBvcnRzLmFzc2lnbiA9IGFzc2lnbjsKICAgIH0pOwoKICAgIHZhciB0cmFuc2Zvcm1Bd2FyZVRyYW5zbGF0b3IgPSBjcmVhdGVDb21tb25qc01vZHVsZShmdW5jdGlvbiAobW9kdWxlLCBleHBvcnRzKSB7CiAgICAvKioKICAgICAqIENvcHlyaWdodCAyMDE3LXByZXN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YDxib2R5PmAuCiAgICAgKi8KICAgIHZhciBUcmFuc2xhdG9yID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKCkgewogICAgICAgIGZ1bmN0aW9uIFRyYW5zbGF0b3IoX3Jvb3RFbGVtZW50KSB7CiAgICAgICAgICAgIHRoaXMuX3Jvb3RFbGVtZW50ID0gX3Jvb3RFbGVtZW50OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBHaXZlbiBgZG9jdW1lbnRgIGNsaWVudCBjb29yZGluYXRlcywgY29tcHV0ZXMgdGhlIHBvc2l0aW9uIHJlbGF0aXZlIHRvIHRoZQogICAgICAgICAqIGBDb21wb25lbnRgJ3Mgcm9vdCBlbGVtZW50LCB0YWtpbmcgaW50byBhY2NvdW50IHRoZSBjdW11bGF0aXZlIENTUzMKICAgICAgICAgKiB0cmFuc2Zvcm1zIG9mIHRoZSByb290IGVsZW1lbnQgYW5jZXN0b3JzIHVwIHRvIGA8Ym9keT5gLgogICAgICAgICAqCiAgICAgICAgICogVGhpcyB0cmlnZ2VycyBhIGxheW91dCBidXQgZG9lc24ndCBmdXJ0aGVyIG1vZGlmeSB0aGUgRE9NLCBzbyBjYXVzZXMgYQogICAgICAgICAqIG1heGltdW0gb2Ygb25lIGxheW91dCBwZXIgZnJhbWUuCiAgICAgICAgICoKICAgICAgICAgKiBEb2VzIG5vdCBzdXBwb3J0IGB0cmFuc2Zvcm0tb3JpZ2luYCBDU1MgcHJvcGVydHkgb3RoZXIgdGhhbiB0aGUgZGVmYXVsdC4KICAgICAgICAgKi8KICAgICAgICBUcmFuc2xhdG9yLnByb3RvdHlwZS5jb21wdXRlUG9zaXRpb24gPSBmdW5jdGlvbiAoY2xpZW50WCwgY2xpZW50WSkgewogICAgICAgICAgICB2YXIgY2xpZW50UG9zaXRpb24gPSB7CiAgICAgICAgICAgICAgICB4OiBjbGllbnRYLAogICAgICAgICAgICAgICAgeTogY2xpZW50WSwKICAgICAgICAgICAgfTsKICAgICAg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mYWxzZTsKICAgIGV4cG9ydHMuUG9saWN5ID0gbWFrZUVudW1fMS5tYWtlRW51bShbImltbWVkaWF0ZSIsICJhbmltYXRpb25GcmFtZSIsICJ0aW1lb3V0Il0pOwogICAgdmFyIF9yZW5kZXJQb2xpY3kgPSBuZXcgcmVuZGVyUG9saWN5LkFuaW1hdGlvbkZyYW1lKCk7CiAgICBmdW5jdGlvbiByZW5kZXJQb2xpY3kkMShyZW5kZXJQb2xpY3kkMSkgewogICAgICAgIGlmIChyZW5kZXJQb2xpY3kkMSA9PSBudWxsKSB7CiAgICAgICAgICAgIHJldHVybiBfcmVuZGVyUG9saWN5OwogICAgICAgIH0KICAgICAgICBzd2l0Y2ggKHJlbmRlclBvbGljeSQxKSB7CiAgICAgICAgICAgIGNhc2UgZXhwb3J0cy5Qb2xpY3kuaW1tZWRpYXRlOgogICAgICAgICAgICAgICAgX3JlbmRlclBvbGljeSA9IG5ldyByZW5kZXJQb2xpY3kuSW1tZWRpYXRlKCk7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSBleHBvcnRzLlBvbGljeS5hbmltYXRpb25GcmFtZToKICAgICAgICAgICAgICAgIF9yZW5kZXJQb2xpY3kgPSBuZXcgcmVuZGVyUG9saWN5LkFuaW1hdGlvbkZyYW1lKCk7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSBleHBvcnRzLlBvbGljeS50aW1lb3V0OgogICAgICAgICAgICAgICAgX3JlbmRlclBvbGljeSA9IG5ldyByZW5kZXJQb2xpY3kuVGltZW91dCgpOwogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgICAgICB1dGlscyQxLldpbmRvdy53YXJuKCJVbnJlY29nbml6ZWQgcmVuZGVyUG9saWN5OiAiICsgcmVuZGVyUG9saWN5JDEpOwogICAgICAgIH0KICAgIH0KICAgIGV4cG9ydHMucmVuZGVyUG9saWN5ID0gcmVuZG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CB0byBjYWxsIHdoZW4gZGVidWdnaW5nLgogICAgICovCiAgICBmdW5jdGlvbiBmbHVzaCgpIHsKICAgICAgICBpZiAoX2FuaW1hdGlvblJlcXVlc3RlZCkgewogICAgICAgICAgICAvLyBMYXlvdXQKICAgICAgICAgICAgX2NvbXBvbmVudHNOZWVkaW5nQ29tcHV0ZUxheW91dC5mb3JFYWNoKGZ1bmN0aW9uIChjb21wb25lbnQpIHsgcmV0dXJuIGNvbXBvbmVudC5jb21wdXRlTGF5b3V0KCk7IH0pOwogICAgICAgICAgICAvLyBUb3AgbGV2ZWwgcmVuZGVyOyBDb250YWluZXJzIHdpbGwgcHV0IHRoZWlyIGNoaWxkcmVuIGluIHRoZSB0b1JlbmRlciBxdWV1ZQogICAgICAgICAgICBfY29tcG9uZW50c05lZWRpbmdSZW5kZXIuZm9yRWFjaChmdW5jdGlvbiAoY29tcG9uZW50KSB7IHJldHVybiBjb21wb25lbnQucmVuZGVyKCk7IH0pOwogICAgICAgICAgICBfaXNDdXJyZW50bHlGbHVzaGluZyA9IHRydWU7CiAgICAgICAgICAgIHZhciBmYWlsZWRfMSA9IG5ldyB1dGlscyQxLlNldCgpOwogICAgICAgICAgICBfY29tcG9uZW50c05lZWRpbmdSZW5kZXIuZm9yRWFjaChmdW5jdGlvbiAoY29tcG9uZW50KSB7CiAgICAgICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudC5yZW5kZXJJbW1lZGlhdGVseSgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgY2F0Y2ggKGVycikgewogICAgICAgICAgICAgICAgICAgIC8vIHRocm93IGVycm9yIHdpdGggdGltZW91dCB0byBhdm9pZCBpbnRlcnJ1cHRpbmcgZnVydGhlciByZW5kZXJzCiAgICAgICAgICAgICAgICAgICAgd2luZG93LnNldFRpbWVvdXQoZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBlcnI7CiAgICAgICAgICAg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bHMgd2l0aCBDb21wb25lbnQgbGlmZWN5Y2xlIChhbmNob3JpbmcsIGdldHRpbmcgYSBzaXplLCBhbmQgcmVuZGVyaW5nCiAgICAgKiBpbmZyYXN0cnVjdHVyZSksIGFzIHdlbGwgYXMgYnVpbGRpbmcgdGhlIGZyYW1ld29yayBvZiBET00gZWxlbWVudHMgZm9yIGFsbCBDb21wb25lbnRzLgogICAgICovCiAgICB2YXIgQ29tcG9uZW50ID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKCkgewogICAgICAgIGZ1bmN0aW9uIENvbXBvbmVudCgpIHsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFN1YmNsYXNzZXMgc2hvdWxkIHNldCB0aGlzIHRvIHRydWUgaW4gdGhlaXIgY29uc3RydWN0b3IgdG8gcHJldmVudCBjb250ZW50IGZyb20gb3ZlcmZsb3dpbmcuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9vdmVyZmxvd0hpZGRlbiA9IGZhbHNlOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogT3JpZ2luIG9mIHRoaXMgQ29tcG9uZW50IHJlbGF0aXZlIHRvIGl0cyBwYXJlbnQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9vcmlnaW4gPSB7IHg6IDAsIHk6IDAgfTsKICAgICAgICAgICAgdGhpcy5feEFsaWdubWVudCA9ICJsZWZ0IjsKICAgICAgICAgICAgdGhpcy5feUFsaWdubWVudCA9ICJ0b3AiOwogICAgICAgICAgICB0aGlzLl9pc1NldHVwID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuX2lzQW5jaG9yZWQgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5fY3NzQ2xhc3NlcyA9IG5ldyB1dGlscyQxLlNldCgpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogSWYgLmRlc3Ryb3koKSBoYXMgYmVlbiBjYWxsZWQgb24gdGhpcyBDb21wb25lbnQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9kZXN0cm95ZWQgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5fb25BbmNob3JDYWxsYmFja3MgPSBuZXcgdXRpbHMkMS5DYWxsYmFja1NldCgpOwogICAgICAgICAgICB0aGlzLl9vbkRldGFjaENhbGxiYWNrcyA9IG5ldyB1dGlscyQxLkNhbGxiYWNrU2V0KCk7CiAgICAgICAgICAgIHRoaXMuX2Nzc0NsYXNzZXMuYWRkKCJjb21wb25lbnQiKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQXR0YWNoZXMgdGhlIENvbXBvbmVudCBhcyBhIGNoaWxkIG9mIGEgZ2l2ZW4gZDMgU2VsZWN0aW9uLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtkMy5TZWxlY3Rpb259IHNlbGVjdGlvbi4KICAgICAgICAgKiBAcmV0dXJucyB7Q29tcG9uZW50fSBUaGUgY2FsbGluZyBDb21wb25lbnQuCiAgICAgICAgICovCiAgICAgICAgQ29tcG9uZW50LnByb3RvdHlwZS5hbmNob3IgPSBmdW5jdGlvbiAoc2VsZWN0aW9uKSB7CiAgICAgICAgICAgIHNlbGVjdGlvbiA9IGNvZXJjZUQzLmNvZXJjZUV4dGVybmFsRDMoc2VsZWN0aW9uKTsKICAgICAgICAgICAgaWYgKHRoaXMuX2Rlc3Ryb3llZCkgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCJDYW4ndCByZXVzZSBkZXN0cm95KCktZWQgQ29tcG9uZW50cyEiKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5pc1Jvb3QoKSkgewogICAgICAgICAgICAgICAgdGhpcy5fcm9vdEVsZW1lbnQgPSBzZWxlY3Rpb247CiAgICAgICAgICAgICAgICAvLyByb290RWxlbWVudCBnZXRzIHRoZSAicGxvdHRhYmxlIiBDU1MgY2xhc3MKICAgICAgICAgICAgICAgIHRoaXMuX3Jvb3RFbGVtZW50LmNsYXNzZWQoInBsb3R0YWJsZSIsIHRydWUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0aGlzLl9lbGVtZW50ICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIC8vIHJlYXR0YWNoIGV4aXN0aW5nIGVsZW1lbnQKICAgICAgICAgICAgICAgIHNlbGVjdGlvbi5ub2RlKCkuYXBwZW5kQ2hpbGQodGhpcy5fZWxlbWVudC5ub2RlKCkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fZWxlbWVudCA9IHNlbGVjdGlvbi5hcHBlbmQoImRpdiIpOwogICAgICAgICAgICAgICAgdGhpcy5fc2V0dXAoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9pc0FuY2hvcmVkID0gdHJ1ZTsKICAgICAgICAgICAgdGhpcy5fb25BbmNob3JDYWxsYmFja3MuY2FsbENhbGxiYWNrcyh0aGlzKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBBZGRzIGEgY2FsbGJhY2sgdG8gYmUgY2FsbGVkIG9uIGFuY2hvcmluZyB0aGUgQ29tcG9uZW50IHRvIHRoZSBET00uCiAgICAgICAgICogSWYgdGhlIENvbXBvbmVudCBpcyBhbHJlYWR5IGFuY2hvcmVkLCB0aGUgY2FsbGJhY2sgaXMgY2FsbGVkIGltbWVkaWF0ZWx5LgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtDb21wb25lbnRDYWxsYmFja30gY2FsbGJhY2sKICAgICAgICAgKiBAcmV0dXJuIHtDb21wb25lbnR9CiAgICAgICAgICovCiAgICAgICAgQ29tcG9uZW50LnByb3RvdHlwZS5vbkFuY2hvciA9IGZ1bmN0aW9uIChjYWxsYmFjaykgewogICAgICAgICAgICBpZiAodGhpcy5faXNBbmNob3JlZCkgewogICAgICAgICAgICAgICAgY2FsbGJhY2sodGhpcyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fb25BbmNob3JDYWxsYmFja3MuYWRkKGNhbGxiYWNrKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBSZW1vdmVzIGEgY2FsbGJhY2sgdGhhdCB3b3VsZCBiZSBjYWxsZWQgb24gYW5jaG9yaW5nIHRoZSBDb21wb25lbnQgdG8gdGhlIERPTS4KICAgICAgICAgKiBUaGUgY2FsbGJhY2sgaXMgaWRlbnRpZmllZCBieSByZWZlcmVuY2UgZXF1YWxpdHkuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0ge0NvbXBvbmVudENhbGxiYWNrfSBjYWxsYmFjawogICAgICAgICAqIEByZXR1cm4ge0NvbXBvbmVudH0KICAgICAgICAgKi8KICAgICAgICBDb21wb25lbnQucHJvdG90eXBlLm9mZkFuY2hvciA9IGZ1bmN0aW9uIChjYWxsYmFjaykgewogICAgICAgICAgICB0aGlzLl9vbkFuY2hvckNhbGxiYWNrcy5kZWxldGUoY2FsbGJhY2spOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYWRkaXRpb25hbCBlbGVtZW50cyBhcyBuZWNlc3NhcnkgZm9yIHRoZSBDb21wb25lbnQgdG8gZnVuY3Rpb24uCiAgICAgICAgICogQ2FsbGVkIGR1cmluZyBhbmNob3IoKSBpZiB0aGUgQ29tcG9uZW50J3MgZWxlbWVudCBoYXMgbm90IGJlZW4gY3JlYXRlZCB5ZXQuCiAgICAgICAgICogT3ZlcnJpZGUgaW4gc3ViY2xhc3NlcyB0byBwcm92aWRlIGFkZGl0aW9uYWwgZnVuY3Rpb25hbGl0eS4KICAgICAgICAgKi8KICAgICAgICBDb21wb25lbnQucHJvdG90eXBlLl9zZXR1cCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgaWYgKHRoaXMuX2lzU2V0dXApIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9jc3NDbGFzc2VzLmZvckVhY2goZnVuY3Rpb24gKGNzc0NsYXNzKSB7CiAgICAgICAgICAgICAgICBfdGhpcy5fZWxlbWVudC5jbGFzc2VkKGNzc0NsYXNzLCB0cnVlKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHRoaXMuX2Nzc0NsYXNzZXMgPSBuZXcgdXRpbHMkMS5TZXQoKTsKICAgICAgICAgICAgdGhpcy5fYmFja2dyb3VuZENvbnRhaW5lciA9IHRoaXMuX2VsZW1lbnQuYXBwZW5kKCJzdmciKS5jbGFzc2VkKCJiYWNrZ3JvdW5kLWNvbnRhaW5lciIsIHRydWUpOwogICAgICAgICAgICB0aGlzLl9jb250ZW50ID0gdGhpcy5fZWxlbWVudC5hcHBlbmQoInN2ZyIpLmNsYXNzZWQoImNvbnRlbnQiLCB0cnVlKTsKICAgICAgICAgICAgdGhpcy5fZm9yZWdyb3VuZENvbnRhaW5lciA9IHRoaXMuX2VsZW1lbnQuYXBwZW5kKCJzdmciKS5jbGFzc2VkKCJmb3JlZ3JvdW5kLWNvbnRhaW5lciIsIHRydWUpOwogICAgICAgICAgICBpZiAodGhpcy5fb3ZlcmZsb3dIaWRkZW4pIHsKICAgICAgICAgICAgICAgIHRoaXMuX2NvbnRlbnQuY2xhc3NlZCgiY29tcG9uZW50LW92ZXJmbG93LWhpZGRlbiIsIHRydWUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fY29udGVudC5jbGFzc2VkKCJjb21wb25lbnQtb3ZlcmZsb3ctdmlzaWJsZSIsIHRydWUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2lzU2V0dXAgPSB0cnVlOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogR2l2ZW4gYXZhaWxhYmxlIHNwYWNlIGluIHBpeGVscywgcmV0dXJucyB0aGUgbWluaW11bSB3aWR0aCBhbmQgaGVpZ2h0IHRoaXMgQ29tcG9uZW50IHdpbGwgbmVlZC4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBhdmFpbGFibGVXaWR0aAogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBhdmFpbGFibGVIZWlnaHQKICAgICAgICAgKiBAcmV0dXJucyB7U3BhY2VSZXF1ZXN0fQogICAgICAgICAqLwogICAgICAgIENvbXBvbmVudC5wcm90b3R5cGUucmVxdWVzdGVkU3BhY2UgPSBmdW5jdGlvbiAoYXZhaWxhYmxlV2lkdGgsIGF2YWlsYWJsZUhlaWdodCkgewogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgbWluV2lkdGg6IDAsCiAgICAgICAgICAgICAgICBtaW5IZWlnaHQ6IDAsCiAgICAgICAgICAgIH07CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBDb21wdXRlcyBhbmQgc2V0cyB0aGUgc2l6ZSwgcG9zaXRpb24sIGFuZCBhbGlnbm1lbnQgb2YgdGhlIENvbXBvbmVudCBmcm9tIHRoZSBzcGVjaWZpZWQgdmFsdWVzLgogICAgICAgICAqIElmIG5vIHBhcmFtZXRlcnMgYXJlIHN1cHBsaWVkIGFuZCB0aGUgQ29tcG9uZW50IGlzIGEgcm9vdCBub2RlLAogICAgICAgICAqIHRoZXkgYXJlIGluZmVycmVkIGZyb20gdGhlIHNpemUgb2YgdGhlIENvbXBvbmVudCdzIGVsZW1lbnQuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0ge1BvaW50fSBbb3JpZ2luXSBPcmlnaW4gb2YgdGhlIHNwYWNlIG9mZmVyZWQgdG8gdGhlIENvbXBvbmVudC4KICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gW2F2YWlsYWJsZVdpZHRoXSBBdmFpbGFibGUgd2lkdGggaW4gcGl4ZWxzLgogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBbYXZhaWxhYmxlSGVpZ2h0XSBBdmFpbGFibGUgaGVpZ2h0IGluIHBpeGVscy4KICAgICAgICAgKiBAcmV0dXJucyB7Q29tcG9uZW50fSBUaGUgY2FsbGluZyBDb21wb25lbnQuCiAgICAgICAgICovCiAgICAgICAgQ29tcG9uZW50LnByb3RvdHlwZS5jb21wdXRlTGF5b3V0ID0gZnVuY3Rpb24gKG9yaWdpbiwgYXZhaWxhYmxlV2lkdGgsIGF2YWlsYWJsZUhlaWdodCkgewogICAgICAgICAgICBpZiAob3JpZ2luID09IG51bGwgfHwgYXZhaWxhYmxlV2lkdGggPT0gbnVsbCB8fCBhdmFpbGFibGVIZWlnaHQgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgaWYgKHRoaXMuX2VsZW1lbnQgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigiYW5jaG9yKCkgbXVzdCBiZSBjYWxsZWQgYmVmb3JlIGNvbXB1dGVMYXlvdXQoKSIpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAodGhpcy5fcm9vdEVsZW1lbnQgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIC8vIHJldHJpZXZlIGhlaWdodC93aWR0aCBmcm9tIHJvb3RFbGVtZW50CiAgICAgICAgICAgICAgICAgICAgb3JpZ2luID0geyB4OiAwLCB5OiAwIH07CiAgICAgICAgICAgICAgICAgICAgdmFyIGVsZW0gPSB0aGlzLl9yb290RWxlbWVudC5ub2RlKCk7CiAgICAgICAgICAgICAgICAgICAgYXZhaWxhYmxlV2lkdGggPSB1dGlscyQxLkRPTS5lbGVtZW50V2lkdGgoZWxlbSk7CiAgICAgICAgICAgICAgICAgICAgYXZhaWxhYmxlSGVpZ2h0ID0gdXRpbHMkMS5ET00uZWxlbWVudEhlaWdodChlbGVtKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigibnVsbCBhcmd1bWVudHMgY2Fubm90IGJlIHBhc3NlZCB0byBjb21wdXRlTGF5b3V0KCkgb24gYSBub24tcm9vdCwgdW5hbmNob3JlZCBub2RlIik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIF9hID0gdGhpcy5fc2l6ZUZyb21PZmZlcihhdmFpbGFibGVXaWR0aCwgYXZhaWxhYmxlSGVpZ2h0KSwgaGVpZ2h0ID0gX2EuaGVpZ2h0LCB3aWR0aCA9IF9hLndpZHRoOwogICAgICAgICAgICB2YXIgeEFsaWduUHJvcG9ydGlvbiA9IENvbXBvbmVudC5feEFsaWduVG9Qcm9wb3J0aW9uW3RoaXMuX3hBbGlnbm1lbnRdOwogICAgICAgICAgICB2YXIgeUFsaWduUHJvcG9ydGlvbiA9IENvbXBvbmVudC5feUFsaWduVG9Qcm9wb3J0aW9uW3RoaXMuX3lBbGlnbm1lbnRdOwogICAgICAgICAgICB2YXIgb3JpZ2luWCA9IG9yaWdpbi54ICsgKGF2YWlsYWJsZVdpZHRoIC0gd2lkdGgpICogeEFsaWduUHJvcG9ydGlvbjsKICAgICAgICAgICAgdmFyIG9yaWdpblkgPSBvcmlnaW4ueSArIChhdmFpbGFibGVIZWlnaHQgLSBoZWlnaHQpICogeUFsaWduUHJvcG9ydGlvbjsKICAgICAgICAgICAgdGhpcy5zZXRCb3VuZHMod2lkdGgsIGhlaWdodCwgb3JpZ2luWCwgb3JpZ2luWSk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogRGlyZWN0bHkgc2V0cyBjb21wb25lbnQgc2l6ZSBhbmQsIG9wdGlvbmFsbHksIGl0cyBvcmlnaW4uCiAgICAgICAgICoKICAgICAgIC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yaWdpblggPT09IHZvaWQgMCkgeyBvcmlnaW5YID0gMDsgfQogICAgICAgICAgICBpZiAob3JpZ2luWSA9PT0gdm9pZCAwKSB7IG9yaWdpblkgPSAwOyB9CiAgICAgICAgICAgIHRoaXMuX3dpZHRoID0gd2lkdGg7CiAgICAgICAgICAgIHRoaXMuX2hlaWdodCA9IGhlaWdodDsKICAgICAgICAgICAgdGhpcy5fb3JpZ2luID0gewogICAgICAgICAgICAgICAgeDogb3JpZ2luWCwKICAgICAgICAgICAgICAgIHk6IG9yaWdpblksCiAgICAgICAgICAgIH07CiAgICAgICAgICAgIGlmICh0aGlzLl9lbGVtZW50ICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2VsZW1lbnQuc3R5bGVzKHsKICAgICAgICAgICAgICAgICAgICBsZWZ0OiBvcmlnaW5YICsgInB4IiwKICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IGhlaWdodCArICJweCIsCiAgICAgICAgICAgICAgICAgICAgdG9wOiBvcmlnaW5ZICsgInB4IiwKICAgICAgICAgICAgICAgICAgICB3aWR0aDogd2lkdGggKyAicHgiLAogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHRoaXMuX3Jlc2l6ZUhhbmRsZXIgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5fcmVzaXplSGFuZGxlcih7IHdpZHRoOiB3aWR0aCwgaGVpZ2h0OiBoZWlnaHQgfSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBDb21wb25lbnQucHJvdG90eXBlLl9zaXplRnJvbU9mZmVyID0gZnVuY3Rpb24gKGF2YWlsYWJsZVdpZHRoLCBhdmFpbGFibGVIZWlnaHQpIHsKICAgICAgICAgICAgdmFyIHJlcXVlc3RlZFNwYWNlID0gdGhpcy5yZXF1ZXN0ZWRTcGFjZShhdmFpbGFibGVXaWR0aCwgYXZhaWxhYmxlSGVpZ2h0KTsKICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIHdpZHRoOiB0aGlzLmZpeGVkV2lkdGgoKSA/IE1hdGgubWluKGF2YWlsYWJsZVdpZHRoLCByZXF1ZXN0ZWRTcGFjZS5taW5XaWR0aCkgOiBhdmFpbGFibGVXaWR0aCwKICAgICAgICAgICAgICAgIGhlaWdodDogdGhpcy5maXhlZEhlaWdodCgpID8gTWF0aC5taW4oYXZhaWxhYmxlSGVpZ2h0LCByZXF1ZXN0ZWRTcGFjZS5taW5IZWlnaHQpIDogYXZhaWxhYmxlSGVpZ2h0LAogICAgICAgICAgICB9OwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogUXVldWVzIHRoZSBDb21wb25lbnQgZm9yIHJlbmRlcmluZy4KICAgICAgICAgKgogICAgICAgICAqIEByZXR1cm5zIHtDb21wb25lbnR9IFRoZSBjYWxsaW5nIENvbXBvbmVudC4KICAgICAgICAgKi8KICAgICAgICBDb21wb25lbnQucHJvdG90eXBlLnJlbmRlciA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX2lzQW5jaG9yZWQgJiYgdGhpcy5faXNTZXR1cCAmJiB0aGlzLndpZHRoKCkgPj0gMCAmJiB0aGlzLmhlaWdodCgpID49IDApIHsKICAgICAgICAgICAgICAgIHJlbmRlckNvbnRyb2xsZXIucmVnaXN0ZXJUb1JlbmRlcih0aGlzKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIENvbXBvbmVudC5wcm90b3R5cGUucmVuZGVyTG93UHJpb3JpdHkgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLnJlbmRlcigpOwogICAgICAgIH07CiAgICAgICAgQ29tcG9uZW50LnByb3RvdHlwZS5fc2NoZWR1bGVDb21wdXRlTGF5b3V0ID0gZnVuY3Rpb24gKCkgewogICAg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wZS5yZW5kZXJJbW1lZGlhdGVseSA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBDYXVzZXMgdGhlIENvbXBvbmVudCB0byByZS1sYXlvdXQgYW5kIHJlbmRlci4KICAgICAgICAgKgogICAgICAgICAqIEByZXR1cm5zIHtDb21wb25lbnR9IFRoZSBjYWxsaW5nIENvbXBvbmVudC4KICAgICAgICAgKi8KICAgICAgICBDb21wb25lbnQucHJvdG90eXBlLnJlZHJhdyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX2lzQW5jaG9yZWQgJiYgdGhpcy5faXNTZXR1cCkgewogICAgICAgICAgICAgICAgaWYgKHRoaXMuaXNSb290KCkpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9zY2hlZHVsZUNvbXB1dGVMYXlvdXQoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIHRoaXMucGFyZW50KCkucmVkcmF3KCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBUZWxsIHRoaXMgY29tcG9uZW50IHRvIGludmFsaWRhdGUgYW55IGNhY2hpbmcuIFRoaXMgZnVuY3Rpb24gc2hvdWxkIGJlCiAgICAgICAgICogY2FsbGVkIHdoZW4gYSBDU1MgY2hhbmdlIGhhcyBvY2N1cnJlZCB0aGF0IGNvdWxkIGluZmx1ZW5jZSB0aGUgbGF5b3V0CiAgICAgICAgICogb2YgdGhlIENvbXBvbmVudCwgc3VjaCBhcyBjaGFuZ2luZyB0aGUgZm9udCBzaXplLgogICAgICAgICAqCiAgICAgICAgICogU3ViY2xhc3NlcyBzaG91bGQgb3ZlcnJpZGUuCiAgICAgICAgICovCiAgICAgICAgQ29tcG9uZW50LnByb3RvdHlwZS5pbnZhbGlkYXRlQ2FjaGUgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIC8vIENvcmUgY29tcG9uZW50IGhhcyBubyBjYWNoaW5nLgogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogUmVuZGVycyB0aGUgQ29tcG9uZW50IHRvIGEgZ2l2ZW4gSFRNTCBFbGVtZW50LgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtTdHJpbmd8ZDMuU2VsZWN0aW9ufSBlbGVtZW50IFRoZSBlbGVtZW50LCBhIHNlbGVjdG9yIHN0cmluZyBmb3IgdGhlIGVsZW1lbnQsIG9yIGEgZDMuU2VsZWN0aW9uIGZvciB0aGUgZWxlbWVudC4KICAgICAgICAgKiBAcmV0dXJucyB7Q29tcG9uZW50fSBUaGUgY2FsbGluZyBDb21wb25lbnQuCiAgICAgICAgICovCiAgICAgICAgQ29tcG9uZW50LnByb3RvdHlwZS5yZW5kZXJUbyA9IGZ1bmN0aW9uIChlbGVtZW50KSB7CiAgICAgICAgICAgIHRoaXMuZGV0YWNoKCk7CiAgICAgICAgICAgIGlmIChlbGVtZW50ICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIHZhciBzZWxlY3Rpb24gPSB2b2lkIDA7CiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIChlbGVtZW50KSA9PT0gInN0cmluZyIpIHsKICAgICAgICAgICAgICAgICAgICBzZWxlY3Rpb24gPSBkMy5zZWxlY3QoZWxlbWVudCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmIChsb2Rhc2guaXNFbGVtZW50KGVsZW1lbnQpKSB7CiAgICAgICAgICAgICAgICAgICAgc2VsZWN0aW9uID0gZDMuc2VsZWN0KGVsZW1lbnQpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgc2VsZWN0aW9uID0gY29lcmNlRDMuY29lcmNlRXh0ZXJuYWxEMyhlbGVtZW50KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmICghc2VsZWN0aW9uLm5vZGUoKSB8fCBzZWxlY3Rpb24ubm9kZSgpLm5vZGVOYW1lID09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoIlBsb3R0YWJsZSByZXF1aXJlcyBhIHZhbGlkIEVsZW1lbnQgdG8gcmVuZGVyVG8iKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChzZWxlY3Rpb24ubm9kZSgpLm5vZGVOYW1lID09PSAic3ZnIikgewogICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigiUGxvdHRhYmxlIDMueCBhbmQgbGF0ZXIgY2FuIG9ubHkgcmVuZGVyVG8gYW4gSFRNTCBjb21wb25lbnQ7IHBhc3MgYSBkaXYgaW5zdGVhZCEiKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuYW5jaG9yKHNlbGVjdGlvbik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHRoaXMuX2VsZW1lbnQgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCJJZiBhIENvbXBvbmVudCBoYXMgbmV2ZXIgYmVlbiByZW5kZXJlZCBiZWZvcmUsIHRoZW4gcmVuZGVyVG8gbXVzdCBiZSBnaXZlbiBhIG5vZGUgdG8gcmVuZGVyIHRvLCAiICsKICAgICAgICAgICAgICAgICAgICAib3IgYSBkMy5TZWxlY3Rpb24sIG9yIGEgc2VsZWN0b3Igc3RyaW5nIik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmVuZGVyQ29udHJvbGxlci5yZWdpc3RlclRvQ29tcHV0ZUxheW91dEFuZFJlbmRlcih0aGlzKTsKICAgICAgICAgICAgLy8gZmx1c2ggc28gdGhhdCBjb25zdW1lcnMgY2FuIGltbWVkaWF0ZWx5IGF0dGFjaCB0byBzdHVmZiB3ZSBjcmVhdGUgaW4gdGhlIERPTQogICAgICAgICAgICByZW5kZXJDb250cm9sbGVyLmZsdXNoKCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgQ29tcG9uZW50LnByb3RvdHlwZS54QWxpZ25tZW50ID0gZnVuY3Rpb24gKHhBbGlnbm1lbnQpIHsKICAgICAgICAgICAgaWYgKHhBbGlnbm1lbnQgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3hBbGlnbm1lbnQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgeEFsaWdubWVudCA9IHhBbGlnbm1lbnQudG9Mb3dlckNhc2UoKTsKICAgICAgICAgICAgaWYgKENvbXBvbmVudC5feEFsaWduVG9Qcm9wb3J0aW9uW3hBbGlnbm1lbnRdID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigiVW5zdXBwb3J0ZWQgYWxpZ25tZW50OiAiICsgeEFsaWdubWVudCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5feEFsaWdubWVudCA9IHhBbGlnbm1lbnQ7CiAgICAgICAgICAgIHRoaXMucmVkcmF3KCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgQ29tcG9uZW50LnByb3RvdHlwZS55QWxpZ25tZW50ID0gZnVuY3Rpb24gKHlBbGlnbm1lbnQpIHsKICAgICAgICAgICAgaWYgKHlBbGlnbm1lbnQgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3lBbGlnbm1lbnQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgeUFsaWdubWVudCA9IHlBbGlnbm1lbnQudG9Mb3dlckNhc2UoKTsKICAgICAgICAgICAgaWYgKENvbXBvbmVudC5feUFsaWduVG9Qcm9wb3J0aW9uW3lBbGlnbm1lbnRdID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigiVW5zdXBwb3J0ZWQgYWxpZ25tZW50OiAiICsgeUFsaWdubWVudCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5feUFsaWdubWVudCA9IHlBbGlnbm1lbnQ7CiAgICAgICAgICAgIHRoaXMucmVkcmF3KCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogQ2hlY2tzIGlmIHRoZSBDb21wb25lbnQgaGFzIGEgZ2l2ZW4gQ1NTIGNsYXNzLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IGNzc0NsYXNzIFRoZSBDU1MgY2xhc3MgdG8gY2hlY2sgZm9yLgogICAgICAgICAqLwogICAgICAgIENvbXBvbmVudC5wcm90b3R5cGUuaGFzQ2xhc3MgPSBmdW5jdGlvbiAoY3NzQ2xhc3MpIHsKICAgICAgICAgICAgaWYgKGNzc0NsYXNzID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5fZWxlbWVudCA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fY3NzQ2xhc3Nlcy5oYXMoY3NzQ2xhc3MpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2VsZW1lbnQuY2xhc3NlZChjc3NDbGFzcyk7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIEFkZHMgYSBnaXZlbiBDU1MgY2xhc3MgdG8gdGhlIENvbXBvbmVudC4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBjc3NDbGFzcyBUaGUgQ1NTIGNsYXNzIHRvIGFkZC4KICAgICAgICAgKiBAcmV0dXJucyB7Q29tcG9uZW50fSBUaGUgY2FsbGluZyBDb21wb25lbnQuCiAgICAgICAgICovCiAgICAgICAgQ29tcG9uZW50LnByb3RvdHlwZS5hZGRDbGFzcyA9IGZ1bmN0aW9uIChjc3NDbGFzcykgewogICAgICAgICAgICBpZiAoY3NzQ2xhc3MgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHRoaXMuX2VsZW1lbnQgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5fY3NzQ2xhc3Nlcy5hZGQoY3NzQ2xhc3MpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fZWxlbWVudC5jbGFzc2VkKGNzc0NsYXNzLCB0cnVlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIFJlbW92ZXMgYSBnaXZlbiBDU1MgY2xhc3MgZnJvbSB0aGUgQ29tcG9uZW50LgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IGNzc0NsYXNzIFRoZSBDU1MgY2xhc3MgdG8gcmVtb3ZlLgogICAgICAgICAqIEByZXR1cm5zIHtDb21wb25lbnR9IFRoZSBjYWxsaW5nIENvbXBvbmVudC4KICAgICAgICAgKi8KICAgICAgICBDb21wb25lbnQucHJvdG90eXBlLnJlbW92ZUNsYXNzID0gZnVuY3Rpb24gKGNzc0NsYXNzKSB7CiAgICAgICAgICAgIGlmIChjc3NDbGFzcyA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5fZWxlbWVudCA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9jc3NDbGFzc2VzLmRlbGV0ZShjc3NDbGFzcyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLl9lbGVtZW50LmNsYXNzZWQoY3NzQ2xhc3MsIGZhbHNlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIENoZWNrcyBpZiB0aGUgQ29tcG9uZW50IGhhcyBhIGZpeGVkIHdpZHRoIG9yIGlmIGl0IGdyb3dzIHRvIGZpbGwgYXZhaWxhYmxlIHNwYWNlLgogICAgICAgICAqIFJldHVybnMgZmFsc2UgYnkgZGVmYXVsdCBvbiB0aGUgYmFzZSBDb21wb25lbnQgY2xhc3MuCiAgICAgICAgICovCiAgICAgICAgQ29tcG9uZW50LnByb3RvdHlwZS5maXhlZFdpZHRoID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBDaGVja3MgaWYgdGhlIENvbXBvbmVudCBoYXMgYSBmaXhlZCBoZWlnaHQgb3IgaWYgaXQgZ3Jvd3MgdG8gZmlsbCBhdmFpbGFibGUgc3BhY2UuCiAgICAgICAgICogUmV0dXJucyBmYWxzZSBieSBkZWZhdWx0IG9uIHRoZSBiYXNlIENvbXBvbmVudCBjbGFzcy4KICAgICAgICAgKi8KICAgICAgICBDb21wb25lbnQucHJvdG90eXBlLmZpeGVkSGVpZ2h0ID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBEZXRhY2hlcyBhIENvbXBvbmVudCBmcm9tIHRoZSBET00uIFRoZSBDb21wb25lbnQgY2FuIGJlIHJldXNlZC4KICAgICAgICAgKgogICAgICAgICAqIFRoaXMgc2hvdWxkIG9ubHkgYmUgdXNlZCBpZiB5b3UgcGxhbiBvbiByZXVzaW5nIHRoZSBjYWxsaW5nIENvbXBvbmVudC4gT3RoZXJ3aXNlLCB1c2UgZGVzdHJveSgpLgogICAgICAgICAqCiAgICAgICAgICogQHJldHVybnMgVGhlIGNhbGxpbmcgQ29tcG9uZW50LgogICAgICAgICAqLwogICAgICAgIENvbXBvbmVudC5wcm90b3R5cGUuZGV0YWNoID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB0aGlzLnBhcmVudChudWxsKTsKICAgICAgICAgICAgaWYgKHRoaXMuX2lzQW5jaG9yZWQpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2VsZW1lbnQucmVtb3ZlKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5faXNBbmNob3JlZCA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLl9vbkRldGFjaENhbGxiYWNrcy5jYWxsQ2FsbGJhY2tzKHRoaXMpOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIEFkZHMgYSBjYWxsYmFjayB0byBiZSBjYWxsZWQgd2hlbiB0aGUgQ29tcG9uZW50IGlzIGRldGFjaCgpLWVkLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtDb21wb25lbnRDYWxsYmFja30gY2FsbGJhY2sKICAgICAgICAgKiBAcmV0dXJuIHtDb21wb25lbnR9IFRoZSBjYWxsaW5nIENvbXBvbmVudC4KICAgICAgICAgKi8KICAgICAgICBDb21wb25lbnQucHJvdG90eXBlLm9uRGV0YWNoID0gZnVuY3Rpb24gKGNhbGxiYWNrKSB7CiAgICAgICAgICAgIHRoaXMuX29uRGV0YWNoQ2FsbGJhY2tzLmFkZChjYWxsYmFjayk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogUmVtb3ZlcyBhIGNhbGxiYWNrIHRvIGJlIGNhbGxlZCB3aGVuIHRoZSBDb21wb25lbnQgaXMgZGV0YWNoKCktZWQuCiAgICAgICAgICogVGhlIGNhbGxiYWNrIGlzIGlkZW50aWZpZWQgYnkgcmVmZXJlbmNlIGVxdWFsaXR5LgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtDb21wb25lbnRDYWxsYmFja30gY2FsbGJhY2sKICAgICAgICAgKiBAcmV0dXJuIHtDb21wb25lbnR9IFRoZSBjYWxsaW5nIENvbXBvbmVudC4KICAgICAgICAgKi8KICAgICAgICBDb21wb25lbnQucHJvdG90eXBlLm9mZkRldGFjaCA9IGZ1bmN0aW9uIChjYWxsYmFjaykgewogICAgICAgICAgICB0aGlzLl9vbkRldGFjaENhbGxiYWNrcy5kZWxldGUoY2FsbGJhY2spOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIENvbXBvbmVudC5wcm90b3R5cGUucGFyZW50ID0gZnVuY3Rpb24gKHBhcmVudCkgewogICAgICAgICAgICBpZiAocGFyZW50ID09PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9wYXJlbnQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHBhcmVudCAhPT0gbnVsbCAmJiAhcGFyZW50Lmhhcyh0aGlzKSkgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCJQYXNzZWQgaW52YWxpZCBwYXJlbnQiKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9wYXJlbnQgPSBwYXJlbnQ7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybnMge0JvdW5kc30gZm9yIHRoZSBjb21wb25lbnQgaW4gcGl4ZWwgc3BhY2UsIHdoZXJlIHRoZSB0b3BMZWZ0CiAgICAgICAgICogcmVwcmVzZW50cyB0aGUgY29tcG9uZW50J3MgbWluaW11bSB4IGFuZCB5IHZhbHVlcyBhbmQgdGhlIGJvdHRvbVJpZ2h0IHJlcHJlc2VudHMKICAgICAgICAgKiB0aGUgY29tcG9uZW50J3MgbWF4aW11bSB4IGFuZCB5IHZhbHVlcy4KICAgICAgICAgKi8KICAgICAgICBDb21wb25lbnQucHJvdG90eXBlLmJvdW5kcyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIHRvcExlZnQgPSB0aGlzLm9yaWdpbigpOwogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgdG9wTGVmdDogdG9wTGVmdCwKICAgICAgICAgICAgICAgIGJvdHRvbVJpZ2h0OiB7CiAgICAgICAgICAgICAgICAgICAgeDogdG9wTGVmdC54ICsgdGhpcy53aWR0aCgpLAogICAgICAgICAgICAgICAgICAgIHk6IHRvcExlZnQueSArIHRoaXMuaGVpZ2h0KCksCiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICB9OwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogUmVtb3ZlcyBhIENvbXBvbmVudCBmcm9tIHRoZSBET00gYW5kIGRpc2Nvbm5lY3RzIGFsbCBsaXN0ZW5lcnMuCiAgICAgICAgICovCiAgICAgICAgQ29tcG9uZW50LnByb3RvdHlwZS5kZXN0cm95ID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB0aGlzLl9kZXN0cm95ZWQgPSB0cnVlOwogICAgICAgICAgICB0aGlzLmRldGFjaCgpOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogR2V0cyB0aGUgd2lkdGggb2YgdGhlIENvbXBvbmVudCBpbiBwaXhlbHMuCiAgICAgICAgICovCiAgICAgICAgQ29tcG9uZW50LnByb3RvdHlwZS53aWR0aCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3dpZHRoOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogR2V0cyB0aGUgaGVpZ2h0IG9mIHRoZSBDb21wb25lbnQgaW4gcGl4ZWxzLgogICAgICAgICAqLwogICAgICAgIENvbXBvbmVudC5wcm90b3R5cGUuaGVpZ2h0ID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5faGVpZ2h0OwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogR2V0cyB0aGUgb3JpZ2luIG9mIHRoZSBDb21wb25lbnQgcmVsYXRpdmUgdG8gaXRzIHBhcmVudC4KICAgICAgICAgKgogICAgICAgICAqIEByZXR1cm4ge1BvaW50fQogICAgICAgICAqLwogICAgICAgIENvbXBvbmVudC5wcm90b3R5cGUub3JpZ2luID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgeDogdGhpcy5fb3JpZ2luLngsCiAgICAgICAgICAgICAgICB5OiB0aGlzLl9vcmlnaW4ueSwKICAgICAgICAgICAgfTsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIEdldHMgdGhlIG9yaWdpbiBvZiB0aGUgQ29tcG9uZW50IHJlbGF0aXZlIHRvIHRoZSByb290IENvbXBvbmVudC4KICAgICAgICAgKgogICAgICAgICAqIEByZXR1cm4ge1BvaW50fQogICAgICAgICAqLwogICAgICAgIENvbXBvbmVudC5wcm90b3R5cGUub3JpZ2luVG9Sb290ID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB2YXIgb3JpZ2luID0gdGhpcy5vcmlnaW4oKTsKICAgICAgICAgICAgdmFyIGFuY2VzdG9yID0gdGhpcy5wYXJlbnQoKTsKICAgICAgICAgICAgd2hpbGUgKGFuY2VzdG9yICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIHZhciBhbmNlc3Rvck9yaWdpbiA9IGFuY2VzdG9yLm9yaWdpbigpOwogICAgICAgICAgICAgICAgb3JpZ2luLnggKz0gYW5jZXN0b3JPcmlnaW4ueDsKICAgICAgICAgICAgICAgIG9yaWdpbi55ICs9IGFuY2VzdG9yT3JpZ2luLnk7CiAgICAgICAgICAgICAgICBhbmNlc3RvciA9IGFuY2VzdG9yLnBhcmVudCgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBvcmlnaW47CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIHRoZSByb290IGNvbXBvbmVudCBvZiB0aGUgaGllcmFyY2h5LiBJZiB0aGUgcHJvdmlkZWQKICAgICAgICAgKiBjb21wb25lbnQgaXMgdGhlIHJvb3QsIHRoYXQgY29tcG9uZW50IHdpbGwgYmUgcmV0dXJuZWQuCiAgICAgICAgICovCiAgICAgICAgQ29tcG9uZW50LnByb3RvdHlwZS5yb290ID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB2YXIgY29tcG9uZW50ID0gdGhpczsKICAgICAgICAgICAgd2hpbGUgKCFjb21wb25lbnQuaXNSb290KCkpIHsKICAgICAgICAgICAgICAgIGNvbXBvbmVudCA9IGNvbXBvbmVudC5wYXJlbnQoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gY29tcG9uZW50OwogICAgICAgIH07CiAgICAgICAgQ29tcG9uZW50LnByb3RvdHlwZS5pc1Jvb3QgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLnBhcmVudCgpID09IG51bGw7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIHRoZSBTZWxlY3Rpb24gY29udGFpbmluZyB0aGUgPGc+IGluIGZyb250IG9mIHRoZSB2aXN1YWwgZWxlbWVudHMgb2YgdGhlIENvbXBvbmVudC4KICAgICAgICAgKgogICAgICAgICAqIFdpbGwgcmV0dXJuIHVuZGVmaW5lZCBpZiB0aGUgQ29tcG9uZW50IGhhcyBub3QgYmVlbiBhbmNob3JlZC4KICAgICAgICAgKgogICAgICAgICAqIEByZXR1cm4ge2QzLlNlbGVjdGlvbn0KICAgICAgICAgKi8KICAgICAgICBDb21wb25lbnQucHJvdG90eXBlLmZvcmVncm91bmQgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9mb3JlZ3JvdW5kQ29udGFpbmVyOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogR2V0cyB0aGUgU1ZHIHRoYXQgaG9sZHMgdGhlIHZpc3VhbCBlbGVtZW50cyBvZiB0aGUgQ29tcG9uZW50LgogICAgICAgICAqCiAgICAgICAgICogV2lsbCByZXR1cm4gdW5kZWZpbmVkIGlmIHRoZSBDb21wb25lbnQgaGFzIG5vdCBiZWVuIGFuY2hvcmVkLgogICAgICAgICAqCiAgICAgICAgICogQHJldHVybiB7ZDMuU2VsZWN0aW9ufSBjb250ZW50IHNlbGVjdGlvbiBmb3IgdGhlIENvbXBvbmVudAogICAgICAgICAqLwogICAgICAgIENvbXBvbmVudC5wcm90b3R5cGUuY29udGVudCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2NvbnRlbnQ7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBSZXR1cm5zIHRoZSBIVE1MIEVsZW1lbnQgYXQgdGhlIHJvb3Qgb2YgdGhpcyBjb21wb25lbnQncyBET00gdHJlZS4KICAgICAgICAgKi8KICAgICAgICBDb21wb25lbnQucHJvdG90eXBlLmVsZW1lbnQgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9lbGVtZW50OwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0dXJucyB0aGUgdG9wLWxldmVsIHVzZXIgc3VwcGxpZWQgZWxlbWVudCB0aGF0IHJvb3RzIHRoZSB0cmVlIHRoYXQgdGhpcyBDb21wb25lbnQgbGl2ZXMgaW4uCiAgICAgICAgICovCiAgICAgICAgQ29tcG9uZW50LnByb3RvdHlwZS5yb290RWxlbWVudCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMucm9vdCgpLl9yb290RWxlbWVudDsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIEdldHMgdGhlIFNlbGVjdGlvbiBjb250YWluaW5nIHRoZSA8Zz4gYmVoaW5kIHRoZSB2aXN1YWwgZWxlbWVudHMgb2YgdGhlIENvbXBvbmVudC4KICAgICAgICAgKgogICAgICAgICAqIFdpbGwgcmV0dXJuIHVuZGVmaW5lZCBpZiB0aGUgQ29tcG9uZW50IGhhcyBub3QgYmVlbiBhbmNob3JlZC4KICAgICAgICAgKgogICAgICAgICAqIEByZXR1cm4ge2QzLlNlbGVjdGlvbn0gYmFja2dyb3VuZCBzZWxlY3Rpb24gZm9yIHRoZSBDb21wb25lbnQKICAgICAgICAgKi8KICAgICAgICBDb21wb25lbnQucHJvdG90eXBlLmJhY2tncm91bmQgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9iYWNrZ3JvdW5kQ29udGFpbmVyOwogICAgICAgIH07CiAgICAgICAgQ29tcG9uZW50Ll94QWxpZ25Ub1Byb3BvcnRpb24gPSB7CiAgICAgICAgICAgIGxlZnQ6IDAsCiAgICAgICAgICAgIGNlbnRlcjogMC41LAogICAgICAgICAgICByaWdodDogMSwKICAgICAgICB9OwogICAgICAgIENvbXBvbmVudC5feUFsaWduVG9Qcm9wb3J0aW9uID0gewogICAgICAgICAgICB0b3A6IDAsCiAgICAgICAgICAgIGNlbnRlcjogMC41LAogICAgICAgICAgICBib3R0b206IDEsCiAgICAgICAgfTsKICAgICAgICByZXR1cm4gQ29tcG9uZW50OwogICAgfSgpKTsKICAgIGV4cG9ydHMuQ29tcG9uZW50ID0gQ29tcG9uZW50OwogICAgfSk7CgogICAgdmFyIGZvcm1hdHRlcnMgPSBjcmVhdGVDb21tb25qc01vZHVsZShmdW5jdGlvbiAobW9kdWxlLCBleHBvcnRzKSB7CiAgICAvKioKICAgICAqIENvcHlyaWdodCAyMDE0LXByZXNlbnQgUGFsYW50aXIgVGVjaG5vbG9naWVzCiAgICAgKiBAbGljZW5zZSBNSVQKICAgICAqLwogICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KG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ZhdWx0IDMpCiAgICAgKiBAcmV0dXJucyB7Rm9ybWF0dGVyfSBBIGZvcm1hdHRlciB3aXRoIHNob3J0IHNjYWxlIGZvcm1hdHRpbmcKICAgICAqLwogICAgZnVuY3Rpb24gc2hvcnRTY2FsZShwcmVjaXNpb24pIHsKICAgICAgICBpZiAocHJlY2lzaW9uID09PSB2b2lkIDApIHsgcHJlY2lzaW9uID0gMzsgfQogICAgICAgIHZlcmlmeVByZWNpc2lvbihwcmVjaXNpb24pOwogICAgICAgIHZhciBzdWZmaXhlcyA9ICJLTUJUUSI7CiAgICAgICAgdmFyIGV4cG9uZW50Rm9ybWF0dGVyID0gZDMuZm9ybWF0KCIuIiArIHByZWNpc2lvbiArICJlIik7CiAgICAgICAgdmFyIGZpeGVkRm9ybWF0dGVyID0gZDMuZm9ybWF0KCIuIiArIHByZWNpc2lvbiArICJmIik7CiAgICAgICAgdmFyIG1heCA9IE1hdGgucG93KDEwLCAoMyAqIChzdWZmaXhlcy5sZW5ndGggKyAxKSkpOwogICAgICAgIHZhciBtaW4gPSBNYXRoLnBvdygxMCwgLXByZWNpc2lvbik7CiAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIChudW0pIHsKICAgICAgICAgICAgdmFyIGFic051bSA9IE1hdGguYWJzKG51bSk7CiAgICAgICAgICAgIGlmICgoYWJzTnVtIDwgbWluIHx8IGFic051bSA+PSBtYXgpICYmIGFic051bSAhPT0gMCkgewogICAgICAgICAgICAgICAgcmV0dXJuIGV4cG9uZW50Rm9ybWF0dGVyKG51bSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIGlkeCA9IC0xOwogICAgICAgICAgICB3aGlsZSAoYWJzTnVtID49IE1hdGgucG93KDEwMDAsIGlkeCArIDIpICYmIGlkeCA8IChzdWZmaXhlcy5sZW5ndGggLSAxKSkgewogICAgICAgICAgICAgICAgaWR4Kys7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIG91dHB1dCA9ICIiOwogICAgICAgICAgICBpZiAoaWR4ID09PSAtMSkgewogICAgICAgICAgICAgICAgb3V0cHV0ID0gZml4ZWRGb3JtYXR0ZXIobnVtKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIG91dHB1dCA9IGZpeGVkRm9ybWF0dGVyKG51bSAvIE1hdGgucG93KDEwMDAsIGlkeCArIDEpKSArIHN1ZmZpeGVzW2lkeF07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gY2F0Y2ggcm91bmRpbmcgYnkgdGhlIHVuZGVybHlpbmcgZDMgZm9ybWF0dGVyCiAgICAgICAgICAgIGlmICgobnVtID4gMCAmJiBvdXRwdXQuc3Vic3RyKDAsIDQpID09PSAiMTAwMCIpIHx8IChudW0gPCAwICYmIG91dHB1dC5zdWJzdHIoMCwgNSkgPT09ICItMTAwMCIpKSB7CiAgICAgICAgICAgICAgICBpZiAoaWR4IDwgc3VmZml4ZXMubGVuZ3RoIC0gMSkgewogICAgICAgICAgICAgICAgICAgIGlkeCsrOwogICAgICAgICAgICAgICAgICAgIG91dHB1dCA9IGZpeGVkRm9ybWF0dGVyKG51bSAvIE1hdGgucG93KDEwMDAsIGlkeCArIDEpKSArIHN1ZmZpeGVzW2lkeF07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBvdXRwdXQgPSBleHBvbmVudEZvcm1hdHRlcihudW0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBvdXRwdXQ7CiAgICAgICAgfTsKICAgIH0KICAgIGV4cG9ydHMuc2hvcnRTY2FsZSA9IHNob3J0U2NhbGU7CiAgICAvKioKICAgICAqIENyZWF0ZXMgYSBtdWx0aSB0aW1lIGZvcm1hdHRlciB0aGF0IGRpc3BsYXlzIGRhdGVzLgogICAgICoKICAgICAqIEByZXR1cm5zIHtGb3JtYXR0ZXJ9IEEgZm9ybWF0dGVyIGZvciB0aW1lL2RhdGUgdmFsdWVzLgogICAgICovCiAgICBmdW5jdGlvbiBtdWx0aVRpbWUoKSB7CiAgICAgICAgLy8gRm9ybWF0dGVyIHRpZXJzIGdvaW5nIGZyb20gc2hvcnRlc3QgdGltZSBzY2FsZSB0byBsYXJnZXN0IC0gdGhlc2Ugd2VyZSB0YWtlbiBmcm9tIGQzCiAgICAgICAgLy8gaHR0cHM6Ly9naXRodWIuY29tL21ib3N0b2NrL2QzL3dpa2kvVGltZS1Gb3JtYXR0aW5nI2Zvcm1hdF9tdWx0aQogICAgICAgIHZhciBjYW5kaWRhdGVGb3JtYXRzID0gWwogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBzcGVjaWZpZXI6ICIuJUwiLAogICAgICAgICAgICAgICAgcHJlZGljYXRlOiBmdW5jdGlvbiAoZCkgeyByZXR1cm4gZC5nZXRNaWxsaXNlY29uZHMoKSAhPT0gMDsgfSwKICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgc3BlY2lmaWVyOiAiOiVTIiwKICAgICAgICAgICAgICAgIHByZWRpY2F0ZTogZnVuY3Rpb24gKGQpIHsgcmV0dXJuIGQuZ2V0U2Vjb25kcygpICE9PSAwOyB9LAogICAgICAgICAgICB9LAogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBzcGVjaWZpZXI6ICIlSTolTSIsCiAgICAgICAgICAgICAgICBwcmVkaWNhdGU6IGZ1bmN0aW9uIChkKSB7IHJldHVybiBkLmdldE1pbnV0ZXMoKSAhPT0gMDsgfSwKICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgc3BlY2lmaWVyOiAiJUkgJXAiLAogICAgICAgICAgICAgICAgcHJlZGljYXRlOiBmdW5jdGlvbiAoZCkgeyByZXR1cm4gZC5nZXRIb3VycygpICE9PSAwOyB9LAogICAgICAgICAgICB9LAogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBzcGVjaWZpZXI6ICIlYSAlZCIsCiAgICAgICAgICAgICAgICBwcmVkaWNhdGU6IGZ1bmN0aW9uIChkKSB7IHJldHVybiBkLmdldERheSgpICE9PSAwICYmIGQuZ2V0RGF0ZSgpICE9PSAxOyB9LAogICAgICAgICAgICB9LAogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBzcGVjaWZpZXI6ICIlYiAlZCIsCiAgICAgICAgICAgICAgICBwcmVkaWNhdGU6IGZ1bmN0aW9uIChkKSB7IHJldHVybiBkLmdldERhdGUoKSAhPT0gMTsgfSwKICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgc3BlY2lmaWVyOiAiJWIiLAogICAgICAgICAgICAgICAgcHJlZGljYXRlOiBmdW5jdGlvbiAoZCkgeyByZXR1cm4gZC5nZXRNb250aCgpICE9PSAwOyB9LAogICAgICAgICAgICB9LAogICAgICAgIF07CiAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIChkKSB7CiAgICAgICAgICAgIHZhciBhY2NlcHRhYmxlRm9ybWF0cyA9IGNhbmRpZGF0ZUZvcm1hdHMuZmlsdGVyKGZ1bmN0aW9uIChjYW5kaWRhdGUpIHsgcmV0dXJuIGNhbmRpZGF0ZS5wcmVkaWNhdGUoZCk7IH0pOwogICAgICAgICAgICB2YXIgc3BlY2lmaWVyID0gYWNjZXB0YWJsZUZvcm1hdHMubGVuZ3RoID4gMAogICAgICAgICAgICAgICAgPyBhY2NlcHRhYmxlRm9ybWF0c1swXS5zcGVjaWZpZXIKICAgICAgICAgICAgICAgIDogIiVZIjsKICAgICAgICAgICAgcmV0dXJuIGQzLnRpbWVGb3JtYXQoc3BlY2lmaWVyKShkKTsKICAgICAgICB9OwogICAgfQogICAgZXhwb3J0cy5tdWx0aVRpbWUgPSBtdWx0aVRpbWU7CiAgICAvKioKICAgICAqIENyZWF0ZXMgYSB0aW1lIGZvcm1hdHRlciB0aGF0IGRpc3BsYXlzIHRpbWUvZGF0ZSB1c2luZyBnaXZlbiBzcGVj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gICAgdmFyIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcykgfHwgdGhpczsKICAgICAgICAgICAgX3RoaXMuX2VuZFRpY2tMZW5ndGggPSA1OwogICAgICAgICAgICBfdGhpcy5faW5uZXJUaWNrTGVuZ3RoID0gNTsKICAgICAgICAgICAgX3RoaXMuX3RpY2tMYWJlbFBhZGRpbmcgPSAxMDsKICAgICAgICAgICAgX3RoaXMuX21hcmdpbiA9IDE1OwogICAgICAgICAgICBfdGhpcy5fc2hvd0VuZFRpY2tMYWJlbHMgPSBmYWxzZTsKICAgICAgICAgICAgX3RoaXMuX2Fubm90YXRpb25zRW5hYmxlZCA9IGZhbHNlOwogICAgICAgICAgICBfdGhpcy5fYW5ub3RhdGlvblRpZXJDb3VudCA9IDE7CiAgICAgICAgICAgIGlmIChzY2FsZSA9PSBudWxsIHx8IG9yaWVudGF0aW9uID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigiQXhpcyByZXF1aXJlcyBhIHNjYWxlIGFuZCBvcmllbnRhdGlvbiIpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIF90aGlzLl9zY2FsZSA9IHNjYWxlOwogICAgICAgICAgICBfdGhpcy5vcmllbnRhdGlvbihvcmllbnRhdGlvbik7CiAgICAgICAgICAgIF90aGlzLl9zZXREZWZhdWx0QWxpZ25tZW50KCk7CiAgICAgICAgICAgIF90aGlzLmFkZENsYXNzKCJheGlzIik7CiAgICAgICAgICAgIGlmIChfdGhpcy5pc0hvcml6b250YWwoKSkgewogICAgICAgICAgICAgICAgX3RoaXMuYWRkQ2xhc3MoIngtYXhpcyIpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgX3RoaXMuYWRkQ2xhc3MoInktYXhpcyIpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIF90aGlzLmZvcm1hdHRlcihmb3JtYXR0ZXJzLmlkZW50aXR5KCkpOwogICAgICAgICAgICBfdGhpcy5fcmVzY2FsZUNhbGxiYWNrID0gZnVuY3Rpb24gKG5ld1NjYWxlKSB7IHJldHVybiBfdGhpcy5fcmVzY2FsZSgpOyB9OwogICAgICAgICAgICBfdGhpcy5fc2NhbGUub25VcGRhdGUoX3RoaXMuX3Jlc2NhbGVDYWxsYmFjayk7CiAgICAgICAgICAgIF90aGlzLl9hbm5vdGF0ZWRUaWNrcyA9IFtdOwogICAgICAgICAgICBfdGhpcy5fYW5ub3RhdGlvbkZvcm1hdHRlciA9IGZvcm1hdHRlcnMuaWRlbnRpdHkoKTsKICAgICAgICAgICAgcmV0dXJuIF90aGlzOwogICAgICAgIH0KICAgICAgICBBeGlzLnByb3RvdHlwZS5kZXN0cm95ID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLmRlc3Ryb3kuY2FsbCh0aGlzKTsKICAgICAgICAgICAgdGhpcy5fc2NhbGUub2ZmVXBkYXRlKHRoaXMuX3Jlc2NhbGVDYWxsYmFjayk7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIHRoZSB0aWNrIGxhYmVsIGRhdGEgb24gYSBlbGVtZW50LiBFbGVtZW50IGluIGFyZ3VtZW50IG11c3QgYmUgYSBkZXNjZW5kZW50IG9mIGEgdGljayBsYWJlbCBlbGVtZW50LgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtFbGVtZW50fSBlbGVtZW50CiAgICAgICAgICovCiAgICAgICAgQXhpcy5wcm90b3R5cGUudGlja0xhYmVsRGF0YU9uRWxlbWVudCA9IGZ1bmN0aW9uIChlbGVtZW50KSB7CiAgICAgICAgICAgIGlmIChlbGVtZW50ID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIHRpY2tMYWJlbDsKICAgICAgICAgICAgLy8gZ28gdXAgRE9NIHRyZWUgdG8gZmluZCB0aWNrIGxhYmVsIGVsZW1lbnQgaW4gYW5jZXN0b3IgZWxlbWVudHMKICAgICAgICAgICAgd2hpbGUgKChlbGVtZW50ICE9IG51bGwpICYmIChlbGVtZW50LmNsYXNzTGlzdCkgJiYgKHRpY2tMYWJlbCA9PT0gdW5kZWZpbmVkKSkgewogICAgICAgICAgICAgICAgaWYgKGVsZW1lbnQuY2xhc3NMaXN0LmNvbnRhaW5zKEF4aXMuVElDS19MQUJFTF9DTEFTUykpIHsKICAgICAgICAgICAgICAgICAgICB0aWNrTGFiZWwgPSBlbGVtZW50OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgZWxlbWVudCA9IGVsZW1lbnQucGFyZW50Tm9kZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gZWxlbWVudCA9PT0gdW5kZWZpbmVkID8gdW5kZWZpbmVkIDogZDMuc2VsZWN0KGVsZW1lbnQpLmRhdHVtKCk7CiAgICAgICAgfTsKICAgICAgICBBeGlzLnByb3RvdHlwZS5fY29tcHV0ZVdpZHRoID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICAvLyB0byBiZSBvdmVycmlkZGVuIGJ5IHN1YmNsYXNzIGxvZ2ljCiAgICAgICAgICAgIHJldHVybiB0aGlzLl9tYXhMYWJlbFRpY2tMZW5ndGgoKTsKICAgICAgICB9OwogICAgICAgIEF4aXMucHJvdG90eXBlLl9jb21wdXRlSGVpZ2h0ID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICAvLyB0byBiZSBvdmVycmlkZGVuIGJ5IHN1YmNsYXNzIGxvZ2ljCiAgICAgICAgICAgIHJldHVybiB0aGlzLl9tYXhMYWJlbFRpY2tMZW5ndGgoKTsKICAgICAgICB9OwogICAgICAgIEF4aXMucHJvdG90eXBlLnJlcXVlc3RlZFNwYWNlID0gZnVuY3Rpb24gKG9mZmVyZWRXaWR0aCwgb2ZmZXJlZEhlaWdodCkgewogICAgICAgICAgICB2YXIgcmVxdWVzdGVkV2lkdGggPSAwOwogICAgICAgICAgICB2YXIgcmVxdWVzdGVkSGVpZ2h0ID0gMDsKICAgICAgICAgICAgaWYgKHRoaXMuaXNIb3Jpem9udGFsKCkpIHsKICAgICAgICAgICAgICAgIHJlcXVlc3RlZEhlaWdodCA9IHRoaXMuX2NvbXB1dGVIZWlnaHQoKSArIHRoaXMuX21hcmdpbjsKICAgICAgICAgICAgICAgIGlmICh0aGlzLmFubm90YXRpb25zRW5hYmxlZCgpKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIHRpZXJIZWlnaHQgPSB0aGlzLl9hbm5vdGF0aW9uTWVhc3VyZXIubWVhc3VyZSgpLmhlaWdodCArIDIgKiBBeGlzLl9BTk5PVEFUSU9OX0xBQkVMX1BBRERJTkc7CiAgICAgICAgICAgICAgICAgICAgcmVxdWVzdGVkSGVpZ2h0ICs9IHRpZXJIZWlnaHQgKiB0aGlzLmFubm90YXRpb25UaWVyQ291bnQoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHJlcXVlc3RlZFdpZHRoID0gdGhpcy5fY29tcHV0ZVdpZHRoKCkgKyB0aGlzLl9tYXJnaW47CiAgICAgICAgICAgICAgICBpZiAodGhpcy5hbm5vdGF0aW9uc0VuYWJsZWQoKSkgewogICAgICAgICAgICAgICAgICAgIHZhciB0aWVySGVpZ2h0ID0gdGhpcy5fYW5ub3RhdGlvbk1lYXN1cmVyLm1lYXN1cmUoKS5oZWlnaHQgKyAyICogQXhpcy5fQU5OT1RBVElPTl9MQUJFTF9QQURESU5HOwogICAgICAgICAgICAgICAgICAgIHJlcXVlc3RlZFdpZHRoICs9IHRpZXJIZWlnaHQgKiB0aGlzLmFubm90YXRpb25UaWVyQ291bnQoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgbWluV2lkdGg6IHJlcXVlc3RlZFdpZHRoLAogICAgICAgICAgICAgICAgbWluSGVpZ2h0OiByZXF1ZXN0ZWRIZWlnaHQsCiAgICAgICAgICAgIH07CiAgICAgICAgfTsKICAgICAgICBBeGlzLnByb3RvdHlwZS5maXhlZEhlaWdodCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuaXNIb3Jpem9udGFsKCk7CiAgICAgICAgfTsKICAgICAgICBBeGlzLnByb3RvdHlwZS5maXhlZFdpZHRoID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICByZXR1cm4gIXRoaXMuaXNIb3Jpem9udGFsKCk7CiAgICAgICAgfTsKICAgICAgICBBeGlzLnByb3RvdHlwZS5fcmVzY2FsZSA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgLy8gZGVmYXVsdCBpbXBsZW1lbnRhdGlvbjsgc3ViY2xhc3NlcyBtYXkgY2FsbCByZWRyYXcoKSBoZXJlCiAgICAgICAgICAgIHRoaXMucmVuZGVyKCk7CiAgICAgICAgfTsKICAgICAgICBBeGlzLnByb3RvdHlwZS5jb21wdXRlTGF5b3V0ID0gZnVuY3Rpb24gKG9yaWdpbiwgYXZhaWxhYmxlV2lkdGgsIGF2YWlsYWJsZUhlaWdodCkgewogICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLmNvbXB1dGVMYXlvdXQuY2FsbCh0aGlzLCBvcmlnaW4sIGF2YWlsYWJsZVdpZHRoLCBhdmFpbGFibGVIZWlnaHQpOwogICAgICAgICAgICBpZiAodGhpcy5pc0hvcml6b250YWwoKSkgewogICAgICAgICAgICAgICAgdGhpcy5fc2NhbGUucmFuZ2UoWzAsIHRoaXMud2lkdGgoKV0pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fc2NhbGUucmFuZ2UoW3RoaXMuaGVpZ2h0KCksIDBdKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIEF4aXMucHJvdG90eXBlLl9zaXplRnJvbU9mZmVyID0gZnVuY3Rpb24gKGF2YWlsYWJsZVdpZHRoLCBhdmFpbGFibGVIZWlnaHQpIHsKICAgICAgICAgICAgdmFyIHJlcXVlc3RlZFNwYWNlID0gdGhpcy5yZXF1ZXN0ZWRTcGFjZShhdmFpbGFibGVXaWR0aCwgYXZhaWxhYmxlSGVpZ2h0KTsKICAgICAgICAgICAgaWYgKHRoaXMuaXNIb3Jpem9udGFsKCkpIHsKICAgICAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAgICAgd2lkdGg6IGF2YWlsYWJsZVdpZHRoLAogICAgICAgICAgICAgICAgICAgIC8vIGFsd2F5cyBrZWVwIHRoZSBoZWlnaHQgdG8gYmUgd2hhdCB3ZSByZXF1ZXN0OyBBeGVzIHRlbGwgdGhlIG91dHNpZGUgd2hhdCBoZWlnaHQgdGhleSBhcmUuCiAgICAgICAgICAgICAgICAgICAgLy8gdGhpcyBhbGxvd3MgYmx1ZXByaW50LWNoYXJ0IHRvIHB1dCB0aGUgQXhpcyBpbiBkb2N1bWVudCBmbG93IGJ5IHJlbW92aW5nIGFic29sdXRlIHBvc2l0aW9uaW5nCiAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiByZXF1ZXN0ZWRTcGFjZS5taW5IZWlnaHQsCiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IGF2YWlsYWJsZUhlaWdodCwKICAgICAgICAgICAgICAgICAgICB3aWR0aDogcmVxdWVzdGVkU3BhY2UubWluV2lkdGgsCiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBBeGlzLnByb3RvdHlwZS5fc2V0dXAgPSBmdW5jdGlvb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CgpLnJlbW92ZSgpOwogICAgICAgICAgICB0aGlzLl9iYXNlbGluZS5hdHRycyh0aGlzLl9nZW5lcmF0ZUJhc2VsaW5lQXR0ckhhc2goKSk7CiAgICAgICAgICAgIGlmICh0aGlzLmFubm90YXRpb25zRW5hYmxlZCgpKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9kcmF3QW5ub3RhdGlvbnMoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuX3JlbW92ZUFubm90YXRpb25zKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBBeGlzLnByb3RvdHlwZS5hbm5vdGF0ZWRUaWNrcyA9IGZ1bmN0aW9uIChhbm5vdGF0ZWRUaWNrcykgewogICAgICAgICAgICBpZiAoYW5ub3RhdGVkVGlja3MgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2Fubm90YXRlZFRpY2tzOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2Fubm90YXRlZFRpY2tzID0gYW5ub3RhdGVkVGlja3M7CiAgICAgICAgICAgIHRoaXMucmVuZGVyKCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgQXhpcy5wcm90b3R5cGUuYW5ub3RhdGlvbkZvcm1hdHRlciA9IGZ1bmN0aW9uIChhbm5vdGF0aW9uRm9ybWF0dGVyKSB7CiAgICAgICAgICAgIGlmIChhbm5vdGF0aW9uRm9ybWF0dGVyID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9hbm5vdGF0aW9uRm9ybWF0dGVyOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2Fubm90YXRpb25Gb3JtYXR0ZXIgPSBhbm5vdGF0aW9uRm9ybWF0dGVyOwogICAgICAgICAgICB0aGlzLnJlbmRlcigpOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIEF4aXMucHJvdG90eXBlLmFubm90YXRpb25zRW5hYmxlZCA9IGZ1bmN0aW9uIChhbm5vdGF0aW9uc0VuYWJsZWQpIHsKICAgICAgICAgICAgaWYgKGFubm90YXRpb25zRW5hYmxlZCA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fYW5ub3RhdGlvbnNFbmFibGVkOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2Fubm90YXRpb25zRW5hYmxlZCA9IGFubm90YXRpb25zRW5hYmxlZDsKICAgICAgICAgICAgdGhpcy5yZWRyYXcoKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBBeGlzLnByb3RvdHlwZS5hbm5vdGF0aW9uVGllckNvdW50ID0gZnVuY3Rpb24gKGFubm90YXRpb25UaWVyQ291bnQpIHsKICAgICAgICAgICAgaWYgKGFubm90YXRpb25UaWVyQ291bnQgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2Fubm90YXRpb25UaWVyQ291bnQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGFubm90YXRpb25UaWVyQ291bnQgPCAwKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoImFubm90YXRpb25UaWVyQ291bnQgY2Fubm90IGJlIG5lZ2F0aXZlIik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fYW5ub3RhdGlvblRpZXJDb3VudCA9IGFubm90YXRpb25UaWVyQ291bnQ7CiAgICAgICAgICAgIHRoaXMucmVkcmF3KCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgQXhpcy5wcm90b3R5cGUuX2RyYXdBbm5vdGF0aW9ucyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgdmFyIGxhYmVsUGFkZGluZyA9IEF4aXMuX0FOTk9UQVRJT05fTEFCRUxfUEFERElORzsKICAgICAgICAgICAgdmFyIG1lYXN1cmVtZW50cyA9IG5ldyB1dGlscyQxLk1hcCgpOwogICAgICAgICAgICB2YXIgYW5ub3RhdGVkVGlja3MgPSB0aGlzLl9hbm5vdGF0ZWRUaWNrc1RvUmVuZGVyKCk7CiAgICAgICAgICAgIGFubm90YXRlZFRpY2tzLmZvckVhY2goZnVuY3Rpb24gKGFubm90YXRlZFRpY2spIHsKICAgICAgICAgICAgICAgIHZhciBtZWFzdXJlbWVudCA9IF90aGlzLl9hbm5vdGF0aW9uTWVhc3VyZXIubWVhc3VyZShfdGhpcy5hbm5vdGF0aW9uRm9ybWF0dGVyKCkoYW5ub3RhdGVkVGljaykpOwogICAgICAgICAgICAgICAgdmFyIHBhZGRlZE1lYXN1cmVtZW50ID0gewogICAgICAgICAgICAgICAgICAgIHdpZHRoOiBtZWFzdXJlbWVudC53aWR0aCArIDIgKiBsYWJlbFBhZGRpbmcsCiAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiBtZWFzdXJlbWVudC5oZWlnaHQgKyAyICogbGFiZWxQYWRkaW5nLAogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIG1lYXN1cmVtZW50cy5zZXQoYW5ub3RhdGVkVGljaywgcGFkZGVkTWVhc3VyZW1lbnQpOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdmFyIHRpZXJIZWlnaHQgPSB0aGlzLl9hbm5vdGF0aW9uTWVhc3VyZXIubWVhc3VyZSgpLmhlaWdodCArIDIgKiBsYWJlbFBhZGRpbmc7CiAgICAgICAgICAgIHZhciBhbm5vdGF0aW9uVG9UaWVyID0gdGhpcy5fYW5ub3RhdGlvblRvVGllcihtZWFzdXJlbWVudHMpOwogICAgICAgICAgICB2YXIgaGlkZGVuQW5ub3RhdGlvbnMgPSBuZXcgdXRpbHMkMS5TZXQoKTsKICAgICAgICAgICAgdmFyIGF4aXNIZWlnaHQgPSB0aGlzLmlzSG9yaXpvbnRhbCgpID8gdGhpcy5oZWlnaHQoKSA6IHRoaXMud2lkdGgoKTsKICAgICAgICAgICAgdmFyIGF4aXNIZWlnaHRXaXRob3V0TWFyZ2luQW5kQW5ub3RhdGlvbnMgPSB0aGlzLl9jb3JlU2l6ZSgpOwogICAgICAgICAgICB2YXIgbnVtVGllcnMgPSBNYXRoLm1pbih0aGlzLmFubm90YXRpb25UaWVyQ291bnQoKSwgTWF0aC5mbG9vcigoYXhpc0hlaWdodCAtIGF4aXNIZWlnaHRXaXRob3V0TWFyZ2luQW5kQW5ub3RhdGlvbnMpIC8gdGllckhlaWdodCkpOwogICAgICAgICAgICBhbm5vdGF0aW9uVG9UaWVyLmZvckVhY2goZnVuY3Rpb24gKHRpZXIsIGFubm90YXRpb24pIHsKICAgICAgICAgICAgICAgIGlmICh0aWVyID09PSAtMSB8fCB0aWVyID49IG51bVRpZXJzKSB7CiAgICAgICAgICAgICAgICAgICAgaGlkZGVuQW5ub3RhdGlvbnMuYWRkKGFubm90YXRpb24pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdmFyIGJpbmRFbGVtZW50cyA9IGZ1bmN0aW9uIChzZWxlY3Rpb24sIGVsZW1lbnROYW1lLCBjbGFzc05hbWUpIHsKICAgICAgICAgICAgICAgIHZhciBlbGVtZW50c1VwZGF0ZSA9IHNlbGVjdGlvbi5zZWxlY3RBbGwoIi4iICsgY2xhc3NOYW1lKS5kYXRhKGFubm90YXRlZFRpY2tzKTsKICAgICAgICAgICAgICAgIHZhciBlbGVtZW50cyA9IGVsZW1lbnRzVXBkYXRlCiAgICAgICAgICAgICAgICAgICAgLmVudGVyKCkKICAgICAgICAgICAgICAgICAgICAuYXBwZW5kKGVsZW1lbnROYW1lKQogICAgICAgICAgICAgICAgICAgIC5jbGFzc2VkKGNsYXNzTmFtZSwgdHJ1ZSkKICAgICAgICAgICAgICAgICAgICAubWVyZ2UoZWxlbWVudHNVcGRhdGUpOwogICAgICAgICAgICAgICAgZWxlbWVudHNVcGRhdGUuZXhpdCgpLnJlbW92ZSgpOwogICAgICAgICAgICAgICAgcmV0dXJuIGVsZW1lbnRzOwogICAgICAgICAgICB9OwogICAgICAgICAgICB2YXIgb2Zmc2V0RiA9IGZ1bmN0aW9uIChkKSB7CiAgICAgICAgICAgICAgICBzd2l0Y2ggKF90aGlzLm9yaWVudGF0aW9uKCkpIHsKICAgICAgICAgICAgICAgICAgICBjYXNlICJib3R0b20iOgogICAgICAgICAgICAgICAgICAgIGNhc2UgInJpZ2h0IjoKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGFubm90YXRpb25Ub1RpZXIuZ2V0KGQpICogdGllckhlaWdodCArIGF4aXNIZWlnaHRXaXRob3V0TWFyZ2luQW5kQW5ub3RhdGlvbnM7CiAgICAgICAgICAgICAgICAgICAgY2FzZSAidG9wIjoKICAgICAgICAgICAgICAgICAgICBjYXNlICJsZWZ0IjoKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGF4aXNIZWlnaHQgLSBheGlzSGVpZ2h0V2l0aG91dE1hcmdpbkFuZEFubm90YXRpb25zIC0gYW5ub3RhdGlvblRvVGllci5nZXQoZCkgKiB0aWVySGVpZ2h0OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9OwogICAgICAgICAgICB2YXIgcG9zaXRpb25GID0gZnVuY3Rpb24gKGQpIHsgcmV0dXJuIF90aGlzLl9zY2FsZS5zY2FsZShkKTsgfTsKICAgICAgICAgICAgdmFyIHZpc2liaWxpdHlGID0gZnVuY3Rpb24gKGQpIHsgcmV0dXJuIGhpZGRlbkFubm90YXRpb25zLmhhcyhkKSA/ICJoaWRkZW4iIDogInZpc2libGUiOyB9OwogICAgICAgICAgICB2YXIgc2Vjb25kYXJ5UG9zaXRpb247CiAgICAgICAgICAgIHN3aXRjaCAodGhpcy5vcmllbnRhdGlvbigpKSB7CiAgICAgICAgICAgICAgICBjYXNlICJib3R0b20iOgogICAgICAgICAgICAgICAgY2FzZSAicmlnaHQiOgogICAgICAgICAgICAgICAgICAgIHNlY29uZGFyeVBvc2l0aW9uID0gMDsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIGNhc2UgInRvcCI6CiAgICAgICAgICAgICAgICAgICAgc2Vjb25kYXJ5UG9zaXRpb24gPSB0aGlzLmhlaWdodCgpOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgY2FzZSAibGVmdCI6CiAgICAgICAgICAgICAgICAgICAgc2Vjb25kYXJ5UG9zaXRpb24gPSB0aGlzLndpZHRoKCk7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIGlzSG9yaXpvbnRhbCA9IHRoaXMuaXNIb3Jpem9udGFsKCk7CiAgICAgICAgICAgIGJpbmRFbGVtZW50cyh0aGlzLl9hbm5vdGF0aW9uQ29udGFpbmVyLnNlbGVjdCgiLmFubm90YXRpb24tbGluZS1jb250YWluZXIiKSwgImxpbmUiLCBBeGlzLkFOTk9UQVRJT05fTElORV9DTEFTUykKICAgICAgICAgICAgICAgIC5hdHRycyh7CiAgICAgICAgICAgICAgICB4MTogaXNIb3Jpem9udGFsID8gcG9zaXRpb25GIDogc2Vjb25kYXJ5UG9zaXRpb24sCiAgICAgICAgICAgICAgICB4MjogaXNIb3Jpem9udGFsID8gcG9zaXRpb25GIDogb2Zmc2V0RiwKICAgICAgICAgICAgICAgIHkxOiBpc0hvcml6b250YWwgPyBzZWNvbmRhcnlQb3NpdGlvbiA6IHBvc2l0aW9uRiwKICAgICAgICAgICAgICAgIHkyOiBpc0hvcml6b250YWwgPyBvZmZzZXRGIDogcG9zaXRpb25GLAogICAgICAgICAgICAgICAgdmlzaWJpbGl0eTogdmlzaWJpbGl0eUYsCiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBiaW5kRWxlbWVudHModGhpcy5fYW5ub3RhdGlvbkNvbnRhaW5lci5zZWxlY3QoIi5hbm5vdGF0aW9uLWNpcmNsZS1jb250YWluZXIiKSwgImNpcmNsZSIsIEF4aXMuQU5OT1RBVElPTl9DSVJDTEVfQ0xBU1MpCiAgICAgICAgICAgICAgICAuYXR0cnMoewogICAgICAgICAgICAgICAgY3g6IGlzSG9yaXpvbnRhbCA/IHBvc2l0aW9uRiA6IHNlY29uZGFyeVBvc2l0aW9uLAogICAgICAgICAgICAgICAgY3k6IGlzSG9yaXpvbnRhbCA/IHNlY29uZGFyeVBvc2l0aW9uIDogcG9zaXRpb25GLAogICAgICAgICAgICAgICAgcjogMywKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHZhciByZWN0YW5nbGVPZmZzZXRGID0gZnVuY3Rpb24gKGQpIHsKICAgICAgICAgICAgICAgIHN3aXRjaCAoX3RoaXMub3JpZW50YXRpb24oKSkgewogICAgICAgICAgICAgICAgICAgIGNhc2UgImJvdHRvbSI6CiAgICAgICAgICAgICAgICAgICAgY2FzZSAicmlnaHQiOgogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gb2Zmc2V0RihkKTsKICAgICAgICAgICAgICAgICAgICBjYXNlICJ0b3AiOgogICAgICAgICAgICAgICAgICAgIGNhc2UgImxlZnQiOgogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gb2Zmc2V0RihkKSAtIG1lYXN1cmVtZW50cy5nZXQoZCkuaGVpZ2h0OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9OwogICAgICAgICAgICBiaW5kRWxlbWVudHModGhpcy5fYW5ub3RhdGlvbkNvbnRhaW5lci5zZWxlY3QoIi5hbm5vdGF0aW9uLXJlY3QtY29udGFpbmVyIiksICJyZWN0IiwgQXhpcy5BTk5PVEFUSU9OX1JFQ1RfQ0xBU1MpCiAgICAgICAgICAgICAgICAuYXR0cnMoewogICAgICAgICAgICAgICAgeDogaXNIb3Jpem9udGFsID8gcG9zaXR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b3JtOiBmdW5jdGlvbiAoZCkgewogICAgICAgICAgICAgICAgICAgIHZhciB4VHJhbnNsYXRlID0gaXNIb3Jpem9udGFsID8gcG9zaXRpb25GKGQpIDogcmVjdGFuZ2xlT2Zmc2V0RihkKTsKICAgICAgICAgICAgICAgICAgICB2YXIgeVRyYW5zbGF0ZSA9IGlzSG9yaXpvbnRhbCA/IHJlY3RhbmdsZU9mZnNldEYoZCkgOiBwb3NpdGlvbkYoZCk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICJ0cmFuc2xhdGUoIiArIHhUcmFuc2xhdGUgKyAiLCIgKyB5VHJhbnNsYXRlICsgIikiOwogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIHZpc2liaWxpdHk6IHZpc2liaWxpdHlGLAogICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgLmVhY2goZnVuY3Rpb24gKGFubm90YXRpb25MYWJlbCkgewogICAgICAgICAgICAgICAgYW5ub3RhdGlvbldyaXRlci53cml0ZShhbm5vdGF0aW9uRm9ybWF0dGVyKGFubm90YXRpb25MYWJlbCksIGlzSG9yaXpvbnRhbCA/IG1lYXN1cmVtZW50cy5nZXQoYW5ub3RhdGlvbkxhYmVsKS53aWR0aCA6IG1lYXN1cmVtZW50cy5nZXQoYW5ub3RhdGlvbkxhYmVsKS5oZWlnaHQsIGlzSG9yaXpvbnRhbCA/IG1lYXN1cmVtZW50cy5nZXQoYW5ub3RhdGlvbkxhYmVsKS5oZWlnaHQgOiBtZWFzdXJlbWVudHMuZ2V0KGFubm90YXRpb25MYWJlbCkud2lkdGgsIHsKICAgICAgICAgICAgICAgICAgICB4QWxpZ246ICJjZW50ZXIiLAogICAgICAgICAgICAgICAgICAgIHlBbGlnbjogImNlbnRlciIsCiAgICAgICAgICAgICAgICAgICAgdGV4dFJvdGF0aW9uOiBpc0hvcml6b250YWwgPyAwIDogOTAsCiAgICAgICAgICAgICAgICB9LCBkMy5zZWxlY3QodGhpcykubm9kZSgpKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfTsKICAgICAgICBBeGlzLnByb3RvdHlwZS5fYW5ub3RhdGVkVGlja3NUb1JlbmRlciA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgdmFyIHNjYWxlUmFuZ2UgPSB0aGlzLl9zY2FsZS5yYW5nZSgpOwogICAgICAgICAgICByZXR1cm4gdXRpbHMkMS5BcnJheS51bmlxKHRoaXMuYW5ub3RhdGVkVGlja3MoKS5maWx0ZXIoZnVuY3Rpb24gKHRpY2spIHsKICAgICAgICAgICAgICAgIGlmICh0aWNrID09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gdXRpbHMkMS5NYXRoLmluUmFuZ2UoX3RoaXMuX3NjYWxlLnNjYWxlKHRpY2spLCBzY2FsZVJhbmdlWzBdLCBzY2FsZVJhbmdlWzFdKTsKICAgICAgICAgICAgfSkpOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0cmlldmVzIHRoZSBzaXplIG9mIHRoZSBjb3JlIHBpZWNlcy4KICAgICAgICAgKgogICAgICAgICAqIFRoZSBjb3JlIHBpZWNlcyBpbmNsdWRlIHRoZSBsYWJlbHMsIHRoZSBlbmQgdGljayBtYXJrcywgdGhlIGlubmVyIHRpY2sgbWFya3MsIGFuZCB0aGUgdGljayBsYWJlbCBwYWRkaW5nLgogICAgICAgICAqLwogICAgICAgIEF4aXMucHJvdG90eXBlLl9jb3JlU2l6ZSA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIHJlbGV2YW50RGltZW5zaW9uID0gdGhpcy5pc0hvcml6b250YWwoKSA/IHRoaXMuaGVpZ2h0KCkgOiB0aGlzLndpZHRoKCk7CiAgICAgICAgICAgIHZhciBheGlzSGVpZ2h0V2l0aG91dE1hcmdpbiA9IHRoaXMuaXNIb3Jpem9udGFsKCkgPyB0aGlzLl9jb21wdXRlSGVpZ2h0KCkgOiB0aGlzLl9jb21wdXRlV2lkdGgoKTsKICAgICAgICAgICAgcmV0dXJuIE1hdGgubWluKGF4aXNIZWlnaHRXaXRob3V0TWFyZ2luLCByZWxldmFudERpbWVuc2lvbik7CiAgICAgICAgfTsKICAgICAgICBBeGlzLnByb3RvdHlwZS5fYW5ub3RhdGlvblRpZXJIZWlnaHQgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9hbm5vdGF0aW9uTWVhc3VyZXIubWVhc3VyZSgpLmhlaWdodCArIDIgKiBBeGlzLl9BTk5PVEFUSU9OX0xBQkVMX1BBRERJTkc7CiAgICAgICAgfTsKICAgICAgICBBeGlzLnByb3RvdHlwZS5fYW5ub3RhdGlvblRvVGllciA9IGZ1bmN0aW9uIChtZWFzdXJlbWVudHMpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgdmFyIGFubm90YXRpb25UaWVycyA9IFtbXV07CiAgICAgICAgICAgIHZhciBhbm5vdGF0aW9uVG9UaWVyID0gbmV3IHV0aWxzJDEuTWFwKCk7CiAgICAgICAgICAgIHZhciBkaW1lbnNpb24gPSB0aGlzLmlzSG9yaXpvbnRhbCgpID8gdGhpcy53aWR0aCgpIDogdGhpcy5oZWlnaHQoKTsKICAgICAgICAgICAgdGhpcy5fYW5ub3RhdGVkVGlja3NUb1JlbmRlcigpLmZvckVhY2goZnVuY3Rpb24gKGFubm90YXRlZFRpY2spIHsKICAgICAgICAgICAgICAgIHZhciBwb3NpdGlvbiA9IF90aGlzLl9zY2FsZS5zY2FsZShhbm5vdGF0ZWRUaWNrKTsKICAgICAgICAgICAgICAgIHZhciBsZW5ndGggPSBtZWFzdXJlbWVudHMuZ2V0KGFubm90YXRlZFRpY2spLndpZHRoOwogICAgICAgICAgICAgICAgaWYgKHBvc2l0aW9uIDwgMCB8fCBwb3NpdGlvbiArIGxlbmd0aCA+IGRpbWVuc2lvbikgewogICAgICAgICAgICAgICAgICAgIGFubm90YXRpb25Ub1RpZXIuc2V0KGFubm90YXRlZFRpY2ssIC0xKTsKICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB2YXIgdGllckhhc0NvbGxpc2lvbiA9IGZ1bmN0aW9uICh0ZXN0VGllcikgeyByZXR1cm4gYW5ub3RhdGlvblRpZXJzW3Rlc3RUaWVyXS5zb21lKGZ1bmN0aW9uICh0ZXN0VGljaykgewogICAgICAgICAgICAgICAgICAgIHZhciB0ZXN0UG9zaXRpb24gPSBfdGhpcy5fc2NhbGUuc2NhbGUodGVzdFRpY2spOwogICAgICAgICAgICAgICAgICAgIHZhciB0ZXN0TGVuZ3RoID0gbWVhc3VyZW1lbnRzLmdldCh0ZXN0VGljaykud2lkdGg7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHBvc2l0aW9uICsgbGVuZ3RoID49IHRlc3RQb3NpdGlvbiAmJiBwb3NpdGlvbiA8PSB0ZXN0UG9zaXRpb24gKyB0ZXN0TGVuZ3RoOwogICAgICAgICAgICAgICAgfSk7IH07CiAgICAgICAgICAgICAgICB2YXIgdGllciA9IDA7CiAgICAgICAgICAgICAgICB3aGlsZSAodGllckhhc0NvbGxpc2lvbih0aWVyKSkgewogICAgICAgICAgICAgICAgICAgIHRpZXIrKzsKICAgICAgICAgICAgICAgICAgICBpZiAoYW5ub3RhdGlvblRpZXJzLmxlbmd0aCA9PT0gdGllcikgewogICAgICAgICAgICAgICAgICAgICAgICBhbm5vdGF0aW9uVGllcnMucHVzaChbXSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgYW5ub3RhdGlvblRpZXJzW3RpZXJdLnB1c2goYW5ub3RhdGVkVGljayk7CiAgICAgICAgICAgICAgICBhbm5vdGF0aW9uVG9UaWVyLnNldChhbm5vdGF0ZWRUaWNrLCB0aWVyKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHJldHVybiBhbm5vdGF0aW9uVG9UaWVyOwogICAgICAgIH07CiAgICAgICAgQXhpcy5wcm90b3R5cGUuX3JlbW92ZUFubm90YXRpb25zID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB0aGlzLl9hbm5vdGF0aW9uQ29udGFpbmVyLnNlbGVjdEFsbCgiLmFubm90YXRpb24tbGluZSIpLnJlbW92ZSgpOwogICAgICAgICAgICB0aGlzLl9hbm5vdGF0aW9uQ29udGFpbmVyLnNlbGVjdEFsbCgiLmFubm90YXRpb24tY2lyY2xlIikucmVtb3ZlKCk7CiAgICAgICAgICAgIHRoaXMuX2Fubm90YXRpb25Db250YWluZXIuc2VsZWN0QWxsKCIuYW5ub3RhdGlvbi1yZWN0IikucmVtb3ZlKCk7CiAgICAgICAgICAgIHRoaXMuX2Fubm90YXRpb25Db250YWluZXIuc2VsZWN0QWxsKCIuYW5ub3RhdGlvbi1sYWJlbCIpLnJlbW92ZSgpOwogICAgICAgIH07CiAgICAgICAgQXhpcy5wcm90b3R5cGUuX2dlbmVyYXRlQmFzZWxpbmVBdHRySGFzaCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIGJhc2VsaW5lQXR0ckhhc2ggPSB7CiAgICAgICAgICAgICAgICB4MTogMCwKICAgICAgICAgICAgICAgIHkxOiAwLAogICAgICAgICAgICAgICAgeDI6IDAsCiAgICAgICAgICAgICAgICB5MjogMCwKICAgICAgICAgICAgfTsKICAgICAgICAgICAgc3dpdGNoICh0aGlzLl9vcmllbnRhdGlvbikgewogICAgICAgICAgICAgICAgY2FzZSAiYm90dG9tIjoKICAgICAgICAgICAgICAgICAgICBiYXNlbGluZUF0dHJIYXNoWyJ4MiJdID0gdGhpcy53aWR0aCgpOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgY2FzZSAidG9wIjoKICAgICAgICAgICAgICAgICAgICBiYXNlbGluZUF0dHJIYXNoWyJ4MiJdID0gdGhpcy53aWR0aCgpOwogICAgICAgICAgICAgICAgICAgIGJhc2VsaW5lQXR0ckhhc2hbInkxIl0gPSB0aGlzLmhlaWdodCgpOwogICAgICAgICAgICAgICAgICAgIGJhc2VsaW5lQXR0ckhhc2hbInkyIl0gPSB0aGlzLmhlaWdodCgpOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgY2FzZSAibGVmdCI6CiAgICAgICAgICAgICAgICAgICAgYmFzZWxpbmVBdHRySGFzaFsieDEiXSA9IHRoaXMud2lkdGgoKTsKICAgICAgICAgICAgICAgICAgICBiYXNlbGluZUF0dHJIYXNoWyJ4MiJdID0gdGhpcy53aWR0aCgpOwogICAgICAgICAgICAgICAgICAgIGJhc2VsaW5lQXR0ckhhc2hbInkyIl0gPSB0aGlzLmhlaWdodCgpOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgY2FzZSAicmlnaHQiOgogICAgICAgICAgICAgICAgICAgIGJhc2VsaW5lQXR0ckhhc2hbInkyIl0gPSB0aGlzLmhlaWdodCgpOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBiYXNlbGluZUF0dHJIYXNoOwogICAgICAgIH07CiAgICAgICAgQXhpcy5wcm90b3R5cGUuX2dlbmVyYXRlVGlja01hcmtBdHRySGFzaCA9IGZ1bmN0aW9uIChpc0VuZFRpY2tNYXJrKSB7CiAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7CiAgICAgICAgICAgIGlmIChpc0VuZFRpY2tNYXJrID09PSB2b2lkIDApIHsgaXNFbmRUaWNrTWFyayA9IGZhbHNlOyB9CiAgICAgICAgICAgIHZhciB0aWNrTWFya0F0dHJIYXNoID0gewogICAgICAgICAgICAgICAgeDE6IDAsCiAgICAgICAgICAgICAgICB5MTogMCwKICAgICAgICAgICAgICAgIHgyOiAwLAogICAgICAgICAgICAgICAgeTI6IDAsCiAgICAgICAgICAgIH07CiAgICAgICAgICAgIHZhciBzY2FsaW5nRnVuY3Rpb24gPSBmdW5jdGlvbiAoZCkgeyByZXR1cm4gX3RoaXMuX3NjYWxlLnNjYWxlKGQpOyB9OwogICAgICAgICAgICBpZiAodGhpcy5pc0hvcml6b250YWwoKSkgewogICAgICAgICAgICAgICAgdGlja01hcmtBdHRySGFzaFsieDEiXSA9IHNjYWxpbmdGdW5jdGlvbjsKICAgICAgICAgICAgICAgIHRpY2tNYXJrQXR0ckhhc2hbIngyIl0gPSBzY2FsaW5nRnVuY3Rpb247CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aWNrTWFya0F0dHJIYXNoWyJ5MSJdID0gc2NhbGluZ0Z1bmN0aW9uOwogICAgICAgICAgICAgICAgdGlja01hcmtBdHRySGFzaFsieTIiXSA9IHNjYWxpbmdGdW5jdGlvbjsKICAgICAgICAgICAgfQogICAgICAgICAgICB2YXIgdGlja0xlbmd0aCA9IGlzRW5kVGlja01hcmsgPyB0aGlzLl9lbmRUaWNrTGVuZ3RoIDogdGhpcy5faW5uZXJUaWNrTGVuZ3RoOwogICAgICAgICAgICBzd2l0Y2ggKHRoaXMuX29yaWVudGF0aW9uKSB7CiAgICAgICAgICAgICAgICBjYXNlICJib3R0b20iOgogICAgICAgICAgICAgICAgICAgIHRpY2tNYXJrQXR0ckhhc2hbInkyIl0gPSB0aWNrTGVuZ3RoOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgY2FzZSAidG9wIjoKICAgICAgICAgICAgICAgICAgICB0aWNrTWFya0F0dHJIYXNoWyJ5MSJdID0gdGhpcy5oZWlnaHQoKTsKICAgICAgICAgICAgICAgICAgICB0aWNrTWFya0F0dHJIYXNoWyJ5MiJdID0gdGhpcy5oZWlnaHQoKSAtIHRpY2tMZW5ndGg7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBjYXNlICJsZWZ0IjoKICAgICAgICAgICAgICAgICAgICB0aWNrTWFya0F0dHJIYXNoWyJ4MSJdID0gdGhpcy53aWR0aCgpOwogICAgICAgICAgICAgICAgICAgIHRpY2tNYXJrQXR0ckhhc2hbIngyIl0gPSB0aGlzLndpZHRoKCkgLSB0aWNrTGVuZ3RoOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgY2FzZSAicmlnaHQiOgogICAgICAgICAgICAgICAgICAgIHRpY2tNYXJrQXR0ckhhc2hbIngyIl0gPSB0aWNrTGVuZ3RoOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0aWNrTWFya0F0dHJIYXNoOwogICAgICAgIH07CiAgICAgICAgQXhpcy5wcm90b3R5cGUuX3NldERlZmF1bHRBbGlnbm1lbnQgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHN3aXRjaCAodGhpcy5fb3JpZW50YXRpb24pIHsKICAgICAgICAgICAgICAgIGNhc2UgImJvdHRvbSI6CiAgICAgICAgICAgICAgICAgICAgdGhpcy55QWxpZ25tZW50KCJ0b3AiKTsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIGNhc2UgInRvcCI6CiAgICAgICAgICAgICAgICAgICAgdGhpcy55QWxpZ25tZW50KCJib3R0b20iKTsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIGNhc2UgImxlZnQiOgogICAgICAgICAgICAgICAgICAgIHRoaXMueEFsaWdubWVudCgicmlnaHQiKTsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIGNhc2UgInJpZ2h0IjoKICAgICAgICAgICAgICAgICAgICB0aGlzLnhBbGlnbm1lbnQoImxlZnQiKTsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogR2V0IHdoZXRoZXIgdGhpcyBheGlzIGlzIGhvcml6b250YWwgKG9yaWVudGF0aW9uIGlzICJ0b3AiIG9yICJib3R0b20iKSBvciB2ZXJ0aWNhbC4KICAgICAgICAgKiBAcmV0dXJucyB7Ym9vbGVhbn0gLSB0cnVlIGZvciBob3Jpem9udGFsLCBmYWxzZSBmb3IgdmVydGljYWwuCiAgICAgICAgICovCiAgICAgICAgQXhpcy5wcm90b3R5cGUuaXNIb3Jpem9udGFsID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fb3JpZW50YXRpb24gPT09ICJ0b3AiIHx8IHRoaXMuX29yaWVudGF0aW9uID09PSAiYm90dG9tIjsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIEdldCB0aGUgc2NhbGUgdGhhdCB0aGlzIGF4aXMgaXMgYXNzb2NpYXRlZCB3aXRoLgogICAgICAgICAqIEByZXR1cm5zIHtTY2FsZTxELCBudW1iZXI+fQogICAgICAgICAqLwogICAgICAgIEF4aXMucHJvdG90eXBlLmdldFNjYWxlID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fc2NhbGU7CiAgICAgICAgfTsKICAgICAgICBBeGlzLnByb3RvdHlwZS5mb3JtYXR0ZXIgPSBmdW5jdGlvbiAoZm9ybWF0dGVyKSB7CiAgICAgICAgICAgIGlmIChmb3JtYXR0ZXIgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2Zvcm1hdHRlcjsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9mb3JtYXR0ZXIgPSBmb3JtYXR0ZXI7CiAgICAgICAgICAgIHRoaXMucmVkcmF3KCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgQXhpcy5wcm90b3R5cGUuaW5uZXJUaWNrTGVuZ3RoID0gZnVuY3Rpb24gKGxlbmd0aCkgewogICAgICAgICAgICBpZiAobGVuZ3RoID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9pbm5lclRpY2tMZW5ndGg7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBpZiAobGVuZ3RoIDwgMCkgewogICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigiaW5uZXIgdGljayBsZW5ndGggbXVzdCBiZSBwb3NpdGl2ZSIpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdGhpcy5faW5uZXJUaWNrTGVuZ3RoID0gbGVuZ3RoOwogICAgICAgICAgICAgICAgdGhpcy5yZWRyYXcoKTsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBBeGlzLnByb3RvdHlwZS5lbmRUaWNrTGVuZ3RoID0gZnVuY3Rpb24gKGxlbmd0aCkgewogICAgICAgICAgICBpZiAobGVuZ3RoID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9lbmRUaWNrTGVuZ3RoOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgaWYgKGxlbmd0aCA8IDApIHsKICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoImVuZCB0aWNrIGxlbmd0aCBtdXN0IGJlIHBvc2l0aXZlIik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLl9lbmRUaWNrTGVuZ3RoID0gbGVuZ3RoOwogICAgICAgICAgICAgICAgdGhpcy5yZWRyYXcoKTsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIHRoZSBtYXhpbXVtIHBpeGVsIGxlbmd0aCBvdmVyIGFsbCB0aWNrcyBvbiB0aGlzIGF4aXMuCiAgICAgICAgICogQHJldHVybnMge251bWJlcn0KICAgICAgICAgKi8KICAgICAgICBBeGlzLnByb3RvdHlwZS5fbWF4TGFiZWxUaWNrTGVuZ3RoID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICBpZiAodGhpcy5zaG93RW5kVGlja0xhYmVscygpKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gTWF0aC5tYXgodGhpcy5pbm5lclRpY2tMZW5ndGgoKSwgdGhpcy5lbmRUaWNrTGVuZ3RoKCkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuaW5uZXJUaWNrTGVuZ3RoKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIEF4aXMucHJvdG90eXBlLnRpY2tMYWJlbFBhZGRpbmcgPSBmdW5jdGlvbiAocGFkZGluZykgewogICAgICAgICAgICBpZiAocGFkZGluZyA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fdGlja0xhYmVsUGFkZGluZzsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIGlmIChwYWRkaW5nIDwgMCkgewogICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigidGljayBsYWJlbCBwYWRkaW5nIG11c3QgYmUgcG9zaXRpdmUiKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuX3RpY2tMYWJlbFBhZGRpbmcgPSBwYWRkaW5nOwogICAgICAgICAgICAgICAgdGhpcy5yZWRyYXcoKTsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBBeGlzLnByb3RvdHlwZS5tYXJnaW4gPSBmdW5jdGlvbiAoc2l6ZSkgewogICAgICAgICAgICBpZiAoc2l6ZSA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fbWFyZ2luOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgaWYgKHNpemUgPCAwKSB7CiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCJtYXJnaW4gc2l6ZSBtdXN0IGJlIHBvc2l0aXZlIik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLl9tYXJnaW4gPSBzaXplOwogICAgICAgICAgICAgICAgdGhpcy5yZWRyYXcoKTsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBBeGlzLnByb3RvdHlwZS5vcmllbnRhdGlvbiA9IGZ1bmN0aW9uIChvcmllbnRhdGlvbikgewogICAgICAgICAgICBpZiAob3JpZW50YXRpb24gPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX29yaWVudGF0aW9uOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgLy8gZW5zdXJlIGJhY2t3YXJkcyBjb21wYXRpYmlsaXR5IGZvciBvbGRlciB2ZXJzaW9ucyB0aGF0IHN1cHBseSBvcmllbnRhdGlvbiBpbiBkaWZmZXJlbnQgY2FzZXMKICAgICAgICAgICAgICAgIHZhciBuZXdPcmllbnRhdGlvbkxDID0gb3JpZW50YXRpb24udG9Mb3dlckNhc2UoKTsKICAgICAgICAgICAgICAgIGlmIChuZXdPcmllbnRhdGlvbkxDICE9PSAidG9wIiAmJgogICAgICAgICAgICAgICAgICAgIG5ld09yaWVudGF0aW9uTEMgIT09ICJib3R0b20iICYmCiAgICAgICAgICAgICAgICAgICAgbmV3T3JpZW50YXRpb25MQyAhPT0gImxlZnQiICYmCiAgICAgICAgICAgICAgICAgICAgbmV3T3JpZW50YXRpb25MQyAhPT0gInJpZ2h0IikgewogICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigidW5zdXBwb3J0ZWQgb3JpZW50YXRpb24iKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuX29yaWVudGF0aW9uID0gbmV3T3JpZW50YXRpb25MQzsKICAgICAgICAgICAgICAgIHRoaXMucmVkcmF3KCk7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgQXhpcy5wcm90b3R5cGUuc2hvd0VuZFRpY2tMYWJlbHMgPSBmdW5jdGlvbiAoc2hvdykgewogICAgICAgICAgICBpZiAoc2hvdyA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fc2hvd0VuZFRpY2tMYWJlbHM7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fc2hvd0VuZFRpY2tMYWJlbHMgPSBzaG93OwogICAgICAgICAgICB0aGlzLnJlbmRlcigpOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIEF4aXMucHJvdG90eXBlLl9zaG93QWxsVGlja01hcmtzID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB0aGlzLl90aWNrTWFya0NvbnRhaW5lci5zZWxlY3RBbGwoIi4iICsgQXhpcy5USUNLX01BUktfQ0xBU1MpCiAgICAgICAgICAgICAgICAuZWFjaChmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICBkMy5zZWxlY3QodGhpcykuc3R5bGUoInZpc2liaWxpdHkiLCAiaW5oZXJpdCIpOwogICAgICAgICAgICB9KTsKICAgICAgICB9OwogICAgICAgIEF4aXMucHJvdG90eXBlLl9zaG93QWxsVGlja0xhYmVscyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdGhpcy5fdGlja0xhYmVsQ29udGFpbmVyLnNlbGVjdEFsbCgiLiIgKyBBeGlzLlRJQ0tfTEFCRUxfQ0xBU1MpCiAgICAgICAgICAgICAgICAuZWFjaChmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICBkMy5zZWxlY3QodGhpcykuc3R5bGUoInZpc2liaWxpdHkiLCAiaW5oZXJpdCIpOwogICAgICAgICAgICB9KTsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIFJlc3BvbnNpYmxlIGZvciBoaWRpbmcgYW55IHRpY2sgbGFiZWxzIHRoYXQgYnJlYWsgb3V0IG9mIHRoZSBib3VuZGluZwogICAgICAgICAqIGNvbnRhaW5lci4KICAgICAgICAgKi8KICAgICAgICBBeGlzLnByb3RvdHlwZS5faGlkZU92ZXJmbG93aW5nVGlja0xhYmVscyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIGJvdW5kaW5nQm94ID0gdGhpcy5lbGVtZW50KCkubm9kZSgpLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpOwogICAgICAgICAgICB2YXIgdGlja0xhYmVscyA9IHRoaXMuX3RpY2tMYWJlbENvbnRhaW5lci5zZWxlY3RBbGwoIi4iICsgQXhpcy5USUNLX0xBQkVMX0NMQVNTKTsKICAgICAgICAgICAgaWYgKHRpY2tMYWJlbHMuZW1wdHkoKSkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRpY2tMYWJlbHMuZWFjaChmdW5jdGlvbiAoZCwgaSkgewogICAgICAgICAgICAgICAgaWYgKCF1dGlscyQxLkRPTS5jbGllbnRSZWN0SW5zaWRlKHRoaXMuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCksIGJvdW5kaW5nQm94KSkgewogICAgICAgICAgICAgICAgICAgIGQzLnNlbGVjdCh0aGlzKS5zdHlsZSgidmlzaWJpbGl0eSIsICJoaWRkZW4iKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBIaWRlcyB0aGUgVGljayBNYXJrcyB3aGljaCBoYXZlIG5vIGNvcnJlc3BvbmRpbmcgVGljayBMYWJlbHMKICAgICAgICAgKi8KICAgICAgICBBeGlzLnByb3RvdHlwZS5faGlkZVRpY2tNYXJrc1dpdGhvdXRMYWJlbCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIHZpc2libGVUaWNrTWFya3MgPSB0aGlzLl90aWNrTWFya0NvbnRhaW5lci5zZWxlY3RBbGwoIi4iICsgQXhpcy5USUNLX01BUktfQ0xBU1MpOwogICAgICAgICAgICB2YXIgdmlzaWJsZVRpY2tMYWJlbHMgPSB0aGlzLl90aWNrTGFiZWxDb250YWluZXIKICAgICAgICAgICAgICAgIC5zZWxlY3RBbGwoIi4iICsgQXhpcy5USUNLX0xBQkVMX0NMQVNTKQogICAgICAgICAgICAgICAgLmZpbHRlcihmdW5jdGlvbiAoZCwgaSkgewogICAgICAgICAgICAgICAgdmFyIHZpc2liaWxpdHkgPSBkMy5zZWxlY3QodGhpcykuc3R5bGUoInZpc2liaWxpdHkiKTsKICAgICAgICAgICAgICAgIHJldHVybiAodmlzaWJpbGl0eSA9PT0gImluaGVyaXQiKSB8fCAodmlzaWJpbGl0eSA9PT0gInZpc2libGUiKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHZhciBsYWJlbE51bWJlcnNTaG93biA9IHZpc2libGVUaWNrTGFiZWxzLmRhdGEoKTsKICAgICAgICAgICAgdmlzaWJsZVRpY2tNYXJrcy5lYWNoKGZ1bmN0aW9uIChlLCBpKSB7CiAgICAgICAgICAgICAgICBpZiAobGFiZWxOdW1iZXJzU2hvd24uaW5kZXhPZihlKSA9PT0gLTEpIHsKICAgICAgICAgICAgICAgICAgICBkMy5zZWxlY3QodGhpcykuc3R5bGUoInZpc2liaWxpdHkiLCAiaGlkZGVuIik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgIH07CiAgICAgICAgQXhpcy5wcm90b3R5cGUuaW52YWxpZGF0ZUNhY2hlID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB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VwcG9ydGVkCiAgICAgICAgICAgICAqLwogICAgICAgICAgICBfdGhpcy5fdGlja0xhYmVsU2hlYXJBbmdsZSA9IDA7CiAgICAgICAgICAgIF90aGlzLmFkZENsYXNzKCJjYXRlZ29yeS1heGlzIik7CiAgICAgICAgICAgIHJldHVybiBfdGhpczsKICAgICAgICB9CiAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KENhdGVnb3J5LnByb3RvdHlwZSwgIl93cmFwcGVyIiwgewogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQSBXcmFwcGVyIGNvbmZpZ3VyZWQgYWNjb3JkaW5nIHRvIHRoZSBvdGhlciBwcm9wZXJ0aWVzIG9uIHRoaXMgYXhpcy4KICAgICAgICAgICAgICogQHJldHVybnMge1R5cGVzZXR0YWJsZS5XcmFwcGVyfQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICB2YXIgd3JhcHBlciA9IG5ldyBzcmMkMS5XcmFwcGVyKCk7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5fdGlja0xhYmVsTWF4TGluZXMgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIHdyYXBwZXIubWF4TGluZXModGhpcy5fdGlja0xhYmVsTWF4TGluZXMpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIHdyYXBwZXI7CiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIGVudW1lcmFibGU6IHRydWUsCiAgICAgICAgICAgIGNvbmZpZ3VyYWJsZTogdHJ1ZQogICAgICAgIH0pOwogICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShDYXRlZ29yeS5wcm90b3R5cGUsICJfd3JpdGVyIiwgewogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQSBXcml0ZXIgYXR0YWNoZWQgdG8gdGhpcyBtZWFzdXJlciBhbmQgd3JhcHBlci4KICAgICAgICAgICAgICogQHJld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ub3RhdGlvbnMsIHBhZGRpbmcsIGFuZCBtYXJnaW5zKS4KICAgICAgICAgKiAyKSB3aWR0aC9oZWlnaHQgbmVlZGVkIGJ5IHRoZSB0aWNrIHRleHQuCiAgICAgICAgICoKICAgICAgICAgKiBXZSByZXF1ZXN0ZWQgc3BhY2UgaXMgdGhlIHN1bSBvZiB0aGUgbGluZXMgYW5kIHRleHQuCiAgICAgICAgICogQHBhcmFtIG9mZmVyZWRXaWR0aAogICAgICAgICAqIEBwYXJhbSBvZmZlcmVkSGVpZ2h0CiAgICAgICAgICogQHJldHVybnMge2FueX0KICAgICAgICAgKi8KICAgICAgICBDYXRlZ29yeS5wcm90b3R5cGUucmVxdWVzdGVkU3BhY2UgPSBmdW5jdGlvbiAob2ZmZXJlZFdpZHRoLCBvZmZlcmVkSGVpZ2h0KSB7CiAgICAgICAgICAgIHZhciB3aWR0aFJlcXVpcmVkQnlUaWNrcyA9IHRoaXMuaXNIb3Jpem9udGFsKCkgPyAwIDogdGhpcy5fdGlja1NwYWNlUmVxdWlyZWQoKSArIHRoaXMubWFyZ2luKCk7CiAgICAgICAgICAgIHZhciBoZWlnaHRSZXF1aXJlZEJ5VGlja3MgPSB0aGlzLmlzSG9yaXpvbnRhbCgpID8gdGhpcy5fdGlja1NwYWNlUmVxdWlyZWQoKSArIHRoaXMubWFyZ2luKCkgOiAwOwogICAgICAgICAgICBpZiAodGhpcy5fc2NhbGUuZG9tYWluKCkubGVuZ3RoID09PSAwKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgICAgIG1pbldpZHRoOiAwLAogICAgICAgICAgICAgICAgICAgIG1pbkhlaWdodDogMCwKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHRoaXMuYW5ub3RhdGlvbnNFbmFibGVkKCkpIHsKICAgICAgICAgICAgICAgIHZhciB0aWVyVG90YWxIZWlnaHQgPSB0aGlzLl9hbm5vdGF0aW9uVGllckhlaWdodCgpICogdGhpcy5hbm5vdGF0aW9uVGllckNvdW50KCk7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5pc0hvcml6b250YWwoKSkgewogICAgICAgICAgICAgICAgICAgIGhlaWdodFJlcXVpcmVkQnlUaWNrcyArPSB0aWVyVG90YWxIZWlnaHQ7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICB3aWR0aFJlcXVpcmVkQnlUaWNrcyArPSB0aWVyVG90YWxIZWlnaHQ7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIG1lYXN1cmVSZXN1bHQgPSB0aGlzLl9tZWFzdXJlVGlja0xhYmVscyhvZmZlcmVkV2lkdGgsIG9mZmVyZWRIZWlnaHQpOwogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgbWluV2lkdGg6IG1lYXN1cmVSZXN1bHQudXNlZFdpZHRoICsgd2lkdGhSZXF1aXJlZEJ5VGlja3MsCiAgICAgICAgICAgICAgICBtaW5IZWlnaHQ6IG1lYXN1cmVSZXN1bHQudXNlZEhlaWdodCArIGhlaWdodFJlcXVpcmVkQnlUaWNrcywKICAgICAgICAgICAgfTsKICAgICAgICB9OwogICAgICAgIENhdGVnb3J5LnByb3RvdHlwZS5fY29yZVNpemUgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHZhciByZWxldmFudERpbWVuc2lvbiA9IHRoaXMuaXNIb3Jpem9udGFsKCkgPyB0aGlzLmhlaWdodCgpIDogdGhpcy53aWR0aCgpOwogICAgICAgICAgICB2YXIgcmVsZXZhbnRSZXF1ZXN0ZWRTcGFjZURpbWVuc2lvbiA9IHRoaXMuaXNIb3Jpem9udGFsKCkgPwogICAgICAgICAgICAgICAgdGhpcy5yZXF1ZXN0ZWRTcGFjZSh0aGlzLndpZHRoKCksIHRoaXMuaGVpZ2h0KCkpLm1pbkhlaWdodCA6CiAgICAgICAgIC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7CiAgICAgICAgfTsKICAgICAgICBDYXRlZ29yeS5wcm90b3R5cGUudGlja0xhYmVsU2hlYXJBbmdsZSA9IGZ1bmN0aW9uIChhbmdsZSkgewogICAgICAgICAgICBpZiAoYW5nbGUgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3RpY2tMYWJlbFNoZWFyQW5nbGU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGFuZ2xlIDwgLTgwIHx8IGFuZ2xlID4gODApIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigiQW5nbGUgIiArIGFuZ2xlICsgIiBub3Qgc3VwcG9ydGVkOyBNdXN0IGJlIGJldHdlZW4gWy04MCwgODBdIik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fdGlja0xhYmVsU2hlYXJBbmdsZSA9IGFuZ2xlOwogICAgICAgICAgICB0aGlzLnJlZHJhdygpOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIENhdGVnb3J5LnByb3RvdHlwZS50aWNrTGFiZWxNYXhXaWR0aCA9IGZ1bmN0aW9uIChtYXhXaWR0aCkgewogICAgICAgICAgICAvLyBhbGxvdyB1c2VyIHRvIHVuLXNldCB0aWNrTGFiZWxNYXhXaWR0aCBieSBwYXNzaW5nIGluIG51bGwgb3IgdW5kZWZpbmVkIGV4cGxpY2l0bHkKICAgICAgICAgICAgaWYgKGFyZ3VtZW50cy5sZW5ndGggPT09IDApIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl90aWNrTGFiZWxNYXhXaWR0aDsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl90aWNrTGFiZWxNYXhXaWR0aCA9IG1heFdpZHRoOwogICAgICAgICAgICB0aGlzLnJlZHJhdygpOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIENhdGVnb3J5LnByb3RvdHlwZS50aWNrTGFiZWxNYXhMaW5lcyA9IGZ1bmN0aW9uIChtYXhMaW5lcykgewogICAgICAgICAgICAvLyBhbGxvdyB1c2VyIHRvIHVuLXNldCB0aWNrTGFiZWxNYXhMaW5lcyBieSBwYXNzaW5nIGluIG51bGwgb3IgdW5kZWZpbmVkIGV4cGxpY2l0bHkKICAgICAgICAgICAgaWYgKGFyZ3VtZW50cy5sZW5ndGggPT09IDApIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl90aWNrTGFiZWxNYXhMaW5lczsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl90aWNrTGFiZWxNYXhMaW5lcyA9IG1heExpbmVzOwogICAgICAgICAgICB0aGlzLnJlZHJhdygpOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybiB0aGUgc3BhY2UgcmVxdWlyZWQgYnkgdGhlIHRpY2tzLCBwYWRkaW5nIGluY2x1ZGVkLgogICAgICAgICAqIEByZXR1cm5zIHtudW1iZXJ9CiAgICAgICAgICovCiAgICAgICAgQ2F0ZWdvcnkucHJvdG90eXBlLl90aWNrU3BhY2VSZXF1aXJlZCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX21heExhYmVsVGlja0xlbmd0aCgpICsgdGhpcy50aWNrTGFiZWxQYWRkaW5nKCk7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBXcml0ZSB0aWNrcyB0byB0aGUgRE9NLgogICAgICAgICAqIEBwYXJhbSB7UGxvdHRhYmxlLlNjYWxlcy5DYXRlZ29yeX0gc2NhbGUgVGhlIHNjYWxlIHRoaXMgYXhpcyBpcyByZXByZXNlbnRpbmcuCiAgICAgICAgICogQHBhcmFtIHtkMy5TZWxlY3Rpb259IHRpY2tzIFRoZSB0aWNrIGVsZW1lbnRzIHRvIHdyaXRlLgogICAgICAgICAqLwogICAgICAgIENhdGVnb3J5LnByb3RvdHlwZS5fZHJhd1RpY2tzID0gZnVuY3Rpb24gKHN0ZXBXaWR0aCwgdGlja3MpIHsKICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzOwogICAgICAgICAgICB2YXIgeEFsaWduOwogICAgICAgICAgICB2YXIgeUFsaWduOwogICAgICAgICAgICBzd2l0Y2ggKHRoaXMudGlja0xhYmVsQW5nbGUoKSkgewogICAgICAgICAgICAgICAgY2FzZSAwOgogICAgICAgICAgICAgICAgICAgIHhBbGlnbiA9IHsgbGVmdDogInJpZ2h0IiwgcmlnaHQ6ICJsZWZ0IiwgdG9wOiAiY2VudGVyIiwgYm90dG9tOiAiY2VudGVyIiB9OwogICAgICAgICAgICAgICAgICAgIHlBbGlnbiA9IHsgbGVmdDogImNlbnRlciIsIHJpZ2h0OiAiY2VudGVyIiwgdG9wOiAiYm90dG9tIiwgYm90dG9tOiAidG9wIiB9OwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgY2FzZSA5MDoKICAgICAgICAgICAgICAgICAgICB4QWxpZ24gPSB7IGxlZnQ6ICJjZW50ZXIiLCByaWdodDogImNlbnRlciIsIHRvcDogInJpZ2h0IiwgYm90dG9tOiAibGVmdCIgfTsKICAgICAgICAgICAgICAgICAgICB5QWxpZ24gPSB7IGxlZnQ6ICJ0b3AiLCByaWdodDogImJvdHRvbSIsIHRvcDogImNlbnRlciIsIGJvdHRvbTogImNlbnRlciIgfTsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIGNhc2UgLTkwOgogICAgICAgICAgICAgICAgICAgIHhBbGlnbiA9IHsgbGVmdDogImNlbnRlciIsIHJpZ2h0OiAiY2VudGVyIiwgdG9wOiAibGVmdCIsIGJvdHRvbTogInJpZ2h0IiB9OwogICAgICAgICAgICAgICAgICAgIHlBbGlnbiA9IHsgbGVmdDogImJvdHRvbSIsIHJpZ2h0OiAidG9wIiwgdG9wOiAiY2VudGVyIiwgYm90dG9tOiAiY2VudGVyIiB9OwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRpY2tzLmVhY2goZnVuY3Rpb24gKGQpIHsKICAgICAgICAgICAgICAgIHZhciBjb250YWluZXIgPSBkMy5zZWxlY3QodGhpcyk7CiAgICAgICAgICAgICAgICB2YXIgd2lkdGggPSBzZWxmLmlzSG9yaXpvbnRhbCgpID8gc3RlcFdpZHRoIDogc2VsZi53aWR0aCgpIC0gc2VsZi5fdGlja1NwYWNlUmVxdWlyZWQoKTsKICAgICAgICAgICAgICAgIHZhciBoZWlnaHQgPSBzZWxmLmlzSG9yaXpvbnRhbCgpID8gc2VsZi5oZWlnaHQoKSAtIHNlbGYuX3RpY2tTcGFjZVJlcXVpcmVkKCkgOiBzdGVwV2lkdGg7CiAgICAgICAgICAgICAgICB2YXIgd3JpdGVPcHRpb25zID0gewogICAgICAgICAgICAgICAgICAgIHhBbGlnbjogeEFsaWduW3NlbGYub3JpZW50YXRpb24oKV0sCiAgICAgICAgICAgICAgICAgICAgeUFsaWduOiB5QWxpZ25bc2VsZi5vcmllbnRhdGlvbigpXSwKICAgICAgICAgICAgICAgICAgICB0ZXh0Um90YXRpb246IHNlbGYudGlja0xhYmVsQW5nbGUoKSwKICAgICAgICAgICAgICAgICAgICB0ZXh0U2hlYXI6IHNlbGYudGlja0xhYmVsU2hlYXJBbmdsZSgpLAogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIGlmIChzZWxmLl90aWNrTGFiZWxNYXhXaWR0aCAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gZm9yIGxlZnQtb3JpZW50ZWQgYXhlcywgd2UgbXVzdCBtb3ZlIHRoZSB0aWNrcyBieSB0aGUgYW1vdW50IHdlJ3ZlIGN1dCBvZmYgaW4gb3JkZXIgdG8ga2VlcCB0aGUgdGV4dAogICAgICAgICAgICAgICAgICAgIC8vIGFsaWduZWQgd2l0aCB0aGUgc2lkZSBvZiB0aGUgdGlja3MKICAgICAgICAgICAgICAgICAgICBpZiAoc2VsZi5vcmllbnRhdGlvbigpID09PSAibGVmdCIgJiYgd2lkdGggPiBzZWxmLl90aWNrTGFiZWxNYXhXaWR0aCkgewogICAgICAgICAgICAgICAgICAgICAgICB2YXIgY3V0T2ZmV2lkdGggPSB3aWR0aCAtIHNlbGYuX3RpY2tMYWJlbE1heFdpZHRoOwogICAgICAgICAgICAgICAgICAgICAgICB2YXIgbmV3VHJhbnNmb3JtID0gY29udGFpbmVyLmF0dHIoInRyYW5zZm9ybSIpICsgIiB0cmFuc2xhdGUoIiArIGN1dE9mZldpZHRoICsgIiwgMCkiOwogICAgICAgICAgICAgICAgICAgICAgICBjb250YWluZXIuYXR0cigidHJhbnNmb3JtIiwgbmV3VHJhbnNmb3JtKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgd2lkdGggPSBNYXRoLm1pbih3aWR0aCwgc2VsZi5fdGlja0xhYmVsTWF4V2lkdGgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgc2VsZi5fd3JpdGVyLndyaXRlKHNlbGYuZm9ybWF0dGVyKCkoZCksIHdpZHRoLCBoZWlnaHQsIHdyaXRlT3B0aW9ucywgY29udGFpbmVyLm5vZGUoKSk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogTWVhc3VyZXMgdGhlIHNpemUgb2YgdGhlIHRpY2sgbGFiZWxzIHdpdGhvdXQgbWFraW5nIGFueSAocGVybWFuZW50KSBET00gY2hhbmdlcy4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBheGlzV2lkdGggV2lkdGggYXZhaWxhYmxlIGZvciB0aGlzIGF4aXMuCiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IGF4aXNIZWlnaHQgSGVpZ2h0IGF2YWlsYWJsZSBmb3IgdGhpcyBheGlzLgogICAgICAgICAqIEBwYXJhbSB7UGxvdHRhY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SG9yaXpvbnRhbCgpID8gdGlja0xhYmVsRWRnZSA6IDA7CiAgICAgICAgICAgICAgICB2YXIgeSA9IF90aGlzLmlzSG9yaXpvbnRhbCgpID8gMCA6IHRpY2tMYWJlbEVkZ2U7CiAgICAgICAgICAgICAgICByZXR1cm4gInRyYW5zbGF0ZSgiICsgeCArICIsIiArIHkgKyAiKSI7CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIHZhciB0aWNrTGFiZWxzVXBkYXRlID0gdGhpcy5fdGlja0xhYmVsQ29udGFpbmVyLnNlbGVjdEFsbCgiLiIgKyBheGlzJDIuQXhpcy5USUNLX0xBQkVMX0NMQVNTKS5kYXRhKGRvbWFpbik7CiAgICAgICAgICAgIHZhciB0aWNrTGFiZWxzID0gdGlja0xhYmVsc1VwZGF0ZQogICAgICAgICAgICAgICAgLmVudGVyKCkKICAgICAgICAgICAgICAgIC5hcHBlbmQoImciKQogICAgICAgICAgICAgICAgLmNsYXNzZWQoYXhpcyQyLkF4aXMuVElDS19MQUJFTF9DTEFTUywgdHJ1ZSkKICAgICAgICAgICAgICAgIC5tZXJnZSh0aWNrTGFiZWxzVXBkYXRlKTsKICAgICAgICAgICAgdGlja0xhYmVsc1VwZGF0ZS5leGl0KCkucmVtb3ZlKCk7CiAgICAgICAgICAgIHRpY2tMYWJlbHMuYXR0cigidHJhbnNmb3JtIiwgZ2V0VGlja0xhYmVsVHJhbnNmb3JtKTsKICAgICAgICAgICAgLy8gZXJhc2UgYWxsIHRleHQgZmlyc3QsIHRoZW4gcmV3cml0ZQogICAgICAgICAgICB0aWNrTGFiZWxzLnRleHQoIiIpOwogICAgICAgICAgICB0aGlzLl9kcmF3VGlja3Moc3RlcFdpZHRoLCB0aWNrTGFiZWxzKTsKICAgICAgICAgICAgdmFyIHhUcmFuc2xhdGUgPSB0aGlzLm9yaWVudGF0aW9uKCkgPT09ICJyaWdodCIgPyB0aGlzLl90aWNrU3BhY2VSZXF1aXJlZCgpIDogMDsKICAgICAgICAgICA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7CiAgICAgICAgfTsKICAgICAgICBOdW1lcmljLnByb3RvdHlwZS5fY29tcHV0ZUFwcHJveGltYXRlVGV4dFdpZHRoID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwogICAgICAgICAgICB2YXIgdGlja1ZhbHVlcyA9IHRoaXMuX2dldFRpY2tWYWx1ZXMoKTsKICAgICAgICAgICAgdmFyIG1XaWR0aCA9IHRoaXMuX21lYXN1cmVyLm1lYXN1cmUoIk0iKS53aWR0aDsKICAgICAgICAgICAgdmFyIHRleHRMZW5ndGhzID0gdGlja1ZhbHVlcy5tYXAoZnVuY3Rpb24gKHYpIHsKICAgICAgICAgICAgICAgIHZhciBmb3JtYXR0ZWRWYWx1ZSA9IF90aGlzLmZvcm1hdHRlcigpKHYpOwogICAgICAgICAgICAgICAgcmV0dXJuIGZvcm1hdHRlZFZhbHVlLmxlbmd0aCAqIG1XaWR0aDsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHJldHVybiB1dGlscyQxLk1hdGgubWF4KHRleHRMZW5ndGhzLCAwKTsKICAgICAgICB9OwogICAgICAgIE51bWVyaWMucHJvdG90eXBlLl9jb21wdXRlSGVpZ2h0ID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB2YXIgdGV4dEhlaWdodCA9IHRoaXMuX21lYXN1cmVyLm1lYXN1cmUoKS5oZWlnaHQ7CiAgICAgICAgICAgIGlmICh0aGlzLl90aWNrTGFiZWxQb3NpdGlvbmluZyA9PT0gImNlbnRlciIpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9tYXhMYWJlbFRpY2tMZW5ndGgoKSArIHRoaXMudGlja0xhYmVsUGFkZGluZygpICsgdGV4dEhlaWdodDsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHJldHVybiBNYXRoLm1heCh0aGlzLl9tYXhMYWJlbFRpY2tMZW5ndGgoKSwgdGhpcy50aWNrTGFiZWxQYWRkaW5nKCkgKyB0ZXh0SGVpZ2h0KTsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgTnVtZXJpYy5wcm90b3R5cGUuX2dldFRpY2tWYWx1ZXMgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHZhciBzY2FsZSA9IHRoaXMuX3NjYWxlOwogICAgICAgICAgICB2YXIgZG9tYWluID0gc2NhbGUuZG9tYWluKCk7CiAgICAgICAgICAgIHZhciBtaW4gPSBkb21haW5bMF0gPD0gZG9tYWluWzFdID8gZG9tYWluWzBdIDogZG9tYWluWzFdOwogICAgICAgICAgICB2YXIgbWF4ID0gZG9tYWluWzBdID49IGRvbWFpblsxXSA/IGRvbWFpblswXSA6IGRvbWFpblsxXTsKICAgICAgICAgICAgcmV0dXJuIHNjYWxlLnRpY2tzKCkuZmlsdGVyKGZ1bmN0aW9uIChpKSB7IHJldHVybiBpID49IG1pbiAmJiBpIDw9IG1heDsgfSk7CiAgICAgICAgfTsKICAgICAgICBOdW1lcmljLnByb3RvdHlwZS5fcmVzY2FsZSA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLl9pc1NldHVwKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKCF0aGlzLmlzSG9yaXpvbnRhbCgpKSB7CiAgICAgICAgICAgICAgICB2YXIgcmVDb21wdXRlZFdpZHRoID0gdGhpcy5fY29tcHV0ZVdpZHRoKCk7CiAgICAgICAgICAgICAgICBpZiAocmVDb21wdXRlZFdpZHRoID4gdGhpcy53aWR0aCgpIHx8IHJlQ29tcHV0ZWRXaWR0aCA8ICh0aGlzLndpZHRoKCkgLSB0aGlzLm1hcmdpbigpKSkgewogICAgICAgICAgICAgICAgICAgIHRoaXMucmVkcmF3KCk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMucmVuZGVyKCk7CiAgICAgICAgfTsKICAgICAgICBOdW1lcmljLnByb3RvdHlwZS5yZW5kZXJJbW1lZGlhdGVseSA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgX3N1cGVyLnByb3RvdHlwZS5yZW5kZXJJbW1lZGlhdGVseS5jYWxsKHRoaXMpOwogICAgICAgICAgICB2YXIgdGlja0xhYmVsQXR0ckhhc2ggPSB7CiAgICAgICAgICAgICAgICB4OiAwLAogICAgICAgICAgICAgICAgeTogMCwKICAgICAgICAgICAgICAgIGR4OiAiMGVtIiwKICAgICAgICAgICAgICAgIGR5OiAiMC4zZW0iLAogICAgICAgICAgICB9OwogICAgICAgICAgICB2YXIgdGlja01hcmtMZW5ndGggPSB0aGlzLl9tYXhMYWJlbFRpY2tMZW5ndGgoKTsKICAgICAgICAgICAgdmFyIHRpY2tMYWJlbFBhZGRpbmcgPSB0aGlzLnRpY2tMYWJlbFBhZGRpbmcoKTsKICAgICAgICAgICAgdmFyIHRpY2tMYWJlbFRleHRBbmNob3IgPSAibWlkZGxlIjsKICAgICAgICAgICAgdmFyIGxhYmVsR3JvdXBUcmFuc2Zvcm1YID0gMDsKICAgICAgICAgICAgdmFyIGxhYmVsR3JvdXBUcmFuc2Zvcm1ZID0gMDsKICAgICAgICAgICAgdmFyIGxhYmVsR3JvdXBTaGlmdFggPSAwOwogICAgICAgICAgICB2YXIgbGFiZWxHcm91cFNoaWZ0WSA9IDA7CiAgICAgICAgICAgIGlmICh0aGlzLmlzSG9yaXpvbnRhbCgpKSB7CiAgICAgICAgICAgICAgICBzd2l0Y2ggKHRoaXMuX3RpY2tMYWJlbFBvc2l0aW9uaW5nKSB7CiAgICAgICAgICAgICAgICAgICAgY2FzZSAibGVmdCI6CiAgICAgICAgICAgICAgICAgICAgICAgIHRpY2tMYWJlbFRleHRBbmNob3IgPSAiZW5kIjsKICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWxHcm91cFRyYW5zZm9ybVggPSAtdGlja0xhYmVsUGFkZGluZzsKICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWxHcm91cFNoaWZ0WSA9IHRpY2tMYWJlbFBhZGRpbmc7CiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgIGNhc2UgImNlbnRlciI6CiAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsR3JvdXBTaGlmdFkgPSB0aWNrTWFya0xlbmd0aCArIHRpY2tMYWJlbFBhZGRpbmc7CiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgIGNhc2UgInJpZ2h0IjoKICAgICAgICAgICAgICAgICAgICAgICAgdGlja0xhYmVsVGV4dEFuY2hvciA9ICJzdGFydCI7CiAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsR3JvdXBUcmFuc2Zvcm1YID0gdGlja0xhYmVsUGFkZGluZzsKICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWxHcm91cFNoaWZ0WSA9IHRpY2tMYWJlbFBhZGRpbmc7CiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgc3dpdGNoICh0aGlzLl90aWNrTGFiZWxQb3NpdGlvbmluZykgewogICAgICAgICAgICAgICAgICAgIGNhc2UgInRvcCI6CiAgICAgICAgICAgICAgICAgICAgICAgIHRpY2tMYWJlbEF0dHJIYXNoWyJkeSJdID0gIi0wLjNlbSI7CiAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsR3JvdXBTaGlmdFggPSB0aWNrTGFiZWxQYWRkaW5nOwogICAgICAgICAgICAgICAgICAgICAgICBsYWJlbEdyb3VwVHJhbnNmb3JtWSA9IC10aWNrTGFiZWxQYWRkaW5nOwogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICBjYXNlICJjZW50ZXIiOgogICAgICAgICAgICAgICAgICAgICAgICBsYWJlbEdyb3VwU2hpZnRYID0gdGlja01hcmtMZW5ndGggKyB0aWNrTGFiZWxQYWRkaW5nOwogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICBjYXNlICJib3R0b20iOgogICAgICAgICAgICAgICAgICAgICAgICB0aWNrTGFiZWxBdHRySGFzaFsiZHkiXSA9ICIxZW0iOwogICAgICAgICAgICAgICAgICAgICAgICBsYWJlbEdyb3VwU2hpZnRYID0gdGlja0xhYmVsUGFkZGluZzsKICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWxHcm91cFRyYW5zZm9ybVkgPSB0aWNrTGFiZWxQYWRkaW5nOwogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICB2YXIgdGlja01hcmtBdHRySGFzaCA9IHRoaXMuX2dlbmVyYXRlVGlja01hcmtBdHRySGFzaCgpOwogICAgICAgICAgICBzd2l0Y2ggKHRoaXMub3JpZW50YXRpb24oKSkgewogICAgICAgICAgICAgICAgY2FzZSAiYm90dG9tIjoKICAgICAgICAgICAgICAgICAgICB0aWNrTGFiZWxBdHRySGFzaFsieCJdID0gdGlja01hcmtBdHRySGFzaFsieDEiXTsKICAgICAgICAgICAgICAgICAgICB0aWNrTGFiZWxBdHRySGFzaFsiZHkiXSA9ICIwLjk1ZW0iOwogICAgICAgICAgICAgICAgICAgIGxhYmVsR3JvdXBUcmFuc2Zvcm1ZID0gdGlja01hcmtBdHRySGFzaFsieTEiXSArIGxhYmVsR3JvdXBTaGlmdFk7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBjYXNlICJ0b3AiOgogICAgICAgICAgICAgICAgICAgIHRpY2tMYWJlbEF0dHJIYXNoWyJ4Il0gPSB0aWNrTWFya0F0dHJIYXNoWyJ4MSJdOwogICAgICAgICAgICAgICAgICAgIHRpY2tMYWJlbEF0dHJIYXNoWyJkeSJdID0gIi0uMjVlbSI7CiAgICAgICAgICAgICAgICAgICAgbGFiZWxHcm91cFRyYW5zZm9ybVkgPSB0aWNrTWFya0F0dHJIYXNoWyJ5MSJdIC0gbGFiZWxHcm91cFNoaWZ0WTsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIGNhc2UgImxlZnQiOgogICAgICAgICAgICAgICAgICAgIHRpY2tMYWJlbFRleHRBbmNob3IgPSAiZW5kIjsKICAgICAgICAgICAgICAgICAgICBsYWJlbEdyb3VwVHJhbnNmb3JtWCA9IHRpY2tNYXJrQXR0ckhhc2hbIngxIl0gLSBsYWJlbEdyb3VwU2hpZnRYOwogICAgICAgICAgICAgICAgICAgIHRpY2tMYWJlbEF0dHJIYXNoWyJ5Il0gPSB0aWNrTWFya0F0dHJIYXNoWyJ5MSJdOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgY2FzZSAicmlnaHQiOgogICAgICAgICAgICAgICAgICAgIHRpY2tMYWJlbFRleHRBbmNob3IgPSAic3RhcnQiOwogICAgICAgICAgICAgICAgICAgIGxhYmVsR3JvdXBUcmFuc2Zvcm1YID0gdGlja01hcmtBdHRySGFzaFsieDEiXSArIGxhYmVsR3JvdXBTaGlmdFg7CiAgICAgICAgICAgICAgICAgICAgdGlja0xhYmVsQXR0ckhhc2hbInkiXSA9IHRpY2tNYXJrQXR0ckhhc2hbInkxIl07CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIHRpY2tMYWJlbFZhbHVlcyA9IHRoaXMuX2dldFRpY2tWYWx1ZXMoKTsKICAgICAgICAgICAgdmFyIHRpY2tMYWJlbHNVcGRhdGUgPSB0aGlzLl90aWNrTGFiZWxDb250YWluZXIuc2VsZWN0QWxsKCIuIiArIGF4aXMkMi5BeGlzLlRJQ0tfTEFCRUxfQ0xBU1MpLmRhdGEodGlja0xhYmVsVmFsdWVzKTsKICAgICAgICAgICAgdGlja0xhYmVsc1VwZGF0ZS5leGl0KCkucmVtb3ZlKCk7CiAgICAgICAgICAgIHZhciB0aWNrTGFiZWxzID0gdGlja0xhYmVsc1VwZGF0ZQogICAgICAgICAgICAgICAgLmVudGVyKCkKICAgICAgICAgICAgICAgIC5hcHBlbmQoInRleHQiKQogICAgICAgICAgICAgICAgLmNsYXNzZWQoYXhpcyQyLkF4aXMuVElDS19MQUJFTF9DTEFTUywgdHJ1ZSkKICAgICAgICAgICAgICAgIC5tZXJnZSh0aWNrTGFiZWxzVXBkYXRlKTsKICAgICAgICAgICAgdGlja0xhYmVscy5zdHlsZSgidGV4dC1hbmNob3IiLCB0aWNrTGFiZWxUZXh0QW5jaG9yKQogICAgICAgICAgICAgICAgLnN0eWxlKCJ2aXNpYmlsaXR5IiwgImluaGVyaXQiKQogICAgICAgICAgICAgICAgLmF0dHJzKHRpY2tMYWJlbEF0dHJIYXNoKQogICAgICAgICAgICAgICAgLnRleHQoZnVuY3Rpb24gKHMpIHsgcmV0dXJuIF90aGlzLmZvcm1hdHRlcigpKHMpOyB9KTsKICAgICAgICAgICAgdmFyIGxhYmVsR3JvdXBUcmFuc2Zvcm0gPSAidHJhbnNsYXRlKCIgKyBsYWJlbEdyb3VwVHJhbnNmb3JtWCArICIsICIgKyBsYWJlbEdyb3VwVHJhbnNmb3JtWSArICIpIjsKICAgICAgICAgICAgdGhpcy5fdGlja0xhYmVsQ29udGFpbmVyLmF0dHIoInRyYW5zZm9ybSIsIGxhYmVsR3JvdXBUcmFuc2Zvcm0pOwogICAgICAgICAgICB0aGlzLl9zaG93QWxsVGlja01hcmtzKCk7CiAgICAgICAgICAgIGlmICghdGhpcy5zaG93RW5kVGlja0xhYmVscygpKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9oaWRlRW5kVGlja0xhYmVscygpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2hpZGVPdmVyZmxvd2luZ1RpY2tMYWJlbHMoKTsKICAgICAgICAgICAgdGhpcy5faGlkZU92ZXJsYXBwaW5nVGlja0xhYmVscygpOwogICAgICAgICAgICBpZiAodGhpcy5fdGlja0xhYmVsUG9zaXRpb25pbmcgIT09ICJjZW50ZXIiKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9oaWRlVGlja01hcmtzV2l0aG91dExhYmVsKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBOdW1lcmljLnByb3RvdHlwZS50aWNrTGFiZWxQb3NpdGlvbiA9IGZ1bmN0aW9uIChwb3NpdGlvbikgewogICAgICAgICAgICBpZiAocG9zaXRpb24gPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3RpY2tMYWJlbFBvc2l0aW9uaW5nOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdmFyIHBvc2l0aW9uTEMgPSBwb3NpdGlvbi50b0xvd2VyQ2FzZSgpOwogICAgICAgICAgICAgICAgaWYgKHRoaXMuaXNIb3Jpem9udGFsKCkpIHsKICAgICAgICAgICAgICAgICAgICBpZiAoIShwb3NpdGlvbkxDID09PSAibGVmdCIgfHwgcG9zaXRpb25MQyA9PT0gImNlbnRlciIgfHwgcG9zaXRpb25MQyA9PT0gInJpZ2h0IikpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKHBvc2l0aW9uTEMgKyAiIGlzIG5vdCBhIHZhbGlkIHRpY2sgbGFiZWwgcG9zaXRpb24gZm9yIGEgaG9yaXpvbnRhbCBOdW1lcmljQXhpcyIpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIGlmICghKHBvc2l0aW9uTEMgPT09ICJ0b3AiIHx8IHBvc2l0aW9uTEMgPT09ICJjZW50ZXIiIHx8IHBvc2l0aW9uTEMgPT09ICJib3R0b20iKSkgewogICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IocG9zaXRpb25MQyArICIgaXMgbm90IGEgdmFsaWQgdGljayBsYWJlbCBwb3NpdGlvbiBmb3IgYSB2ZXJ0aWNhbCBOdW1lcmljQXhpcyIpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuX3RpY2tMYWJlbFBvc2l0aW9uaW5nID0gcG9zaXRpb25MQzsKICAgICAgICAgICAgICAgIHRoaXMucmVkcmF3KCk7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgTnVtZXJpYy5wcm90b3R5cGUudXNlc1RleHRXaWR0aEFwcHJveGltYXRpb24gPSBmdW5jdGlvbiAoZW5hYmxlKSB7CiAgICAgICAgICAgIGlmIChlbmFibGUgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3VzZXNUZXh0V2lkdGhBcHByb3hpbWF0aW9uOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fdXNlc1RleHRXaWR0aEFwcHJveGltYXRpb24gPSBlbmFibGU7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgTnVtZXJpYy5wcm90b3R5cGUuX2hpZGVFbmRUaWNrTGFiZWxzID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB2YXIgYm91bmRpbmdCb3ggPSB0aGlzLmVsZW1lbnQoKS5ub2RlKCkuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCk7CiAgICAgICAgICAgIHZhciB0aWNrTGFiZWxzID0gdGhpcy5fdGlja0xhYmVsQ29udGFpbmVyLnNlbGVjdEFsbCgiLiIgKyBheGlzJDIuQXhpcy5USUNLX0xBQkVMX0NMQVNTKTsKICAgICAgICAgICAgaWYgKHRpY2tMYWJlbHMuc2l6ZSgpID09PSAwKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIGZpcnN0VGlja0xhYmVsID0gdGlja0xhYmVscy5ub2RlcygpWzBdOwogICAgICAgICAgICBpZiAoIXV0aWxzJDEuRE9NLmNsaWVudFJlY3RJbnNpZGUoZmlyc3RUaWNrTGFiZWwuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCksIGJvdW5kaW5nQm94KSkgewogICAgICAgICAgICAgICAgZDMuc2VsZWN0KGZpcnN0VGlja0xhYmVsKS5zdHlsZSgidmlzaWJpbGl0eSIsICJoaWRkZW4iKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB2YXIgbGFzdFRpY2tMYWJlbCA9IHRpY2tMYWJlbHMubm9kZXMoKVt0aWNrTGFiZWxzLnNpemUoKSAtIDFdOwogICAgICAgICAgICBpZiAoIXV0aWxzJDEuRE9NLmNsaWVudFJlY3RJbnNpZGUobGFzdFRpY2tMYWJlbC5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKSwgYm91bmRpbmdCb3gpKSB7CiAgICAgICAgICAgICAgICBkMy5zZWxlY3QobGFzdFRpY2tMYWJlbCkuc3R5bGUoInZpc2liaWxpdHkiLCAiaGlkZGVuIik7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIE51bWVyaWMucHJvdG90eXBlLl9oaWRlT3ZlcmxhcHBpbmdUaWNrTGFiZWxzID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB2YXIgdmlzaWJsZVRpY2tMYWJlbHMgPSB0aGlzLl90aWNrTGFiZWxDb250YWluZXIKICAgICAgICAgICAgICAgIC5zZWxlY3RBbGwoIi4iICsgYXhpcyQyLkF4aXMuVElDS19MQUJFTF9DTEFTUykKICAgICAgICAgICAgICAgIC5maWx0ZXIoZnVuY3Rpb24gKGQsIGkpIHsKICAgICAgICAgICAgICAgIHZhciB2aXNpYmlsaXR5ID0gZDMuc2VsZWN0KHRoaXMpLnN0eWxlKCJ2aXNpYmlsaXR5Iik7CiAgICAgICAgICAgICAgICByZXR1cm4gKHZpc2liaWxpdHkgPT09ICJpbmhlcml0IikgfHwgKHZpc2liaWxpdHkgPT09ICJ2aXNpYmxlIik7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICB2YXIgdmlzaWJsZVRpY2tMYWJlbFJlY3RzID0gdmlzaWJsZVRpY2tMYWJlbHMubm9kZXMoKS5tYXAoZnVuY3Rpb24gKGxhYmVsKSB7IHJldHVybiBsYWJlbC5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKTsgfSk7CiAgICAgICAgICAgIHZhciBpbnRlcnZhbCA9IDE7CiAgICAgICAgICAgIHdoaWxlICghdGhpcy5faGFzT3ZlcmxhcFdpdGhJbnRlcnZhbChpbnRlcnZhbCwgdmlzaWJsZVRpY2tMYWJlbFJlY3RzKSAmJiBpbnRlcnZhbCA8IHZpc2libGVUaWNrTGFiZWxSZWN0cy5sZW5ndGgpIHsKICAgICAgICAgICAgICAgIGludGVydmFsICs9IDE7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmlzaWJsZVRpY2tMYWJlbHMuZWFjaChmdW5jdGlvbiAoZCwgaSkgewogICAgICAgICAgICAgICAgdmFyIHRpY2tMYWJlbCA9IGQzLnNlbGVjdCh0aGlzKTsKICAgICAgICAgICAgICAgIGlmIChpICUgaW50ZXJ2YWwgIT09IDApIHsKICAgICAgICAgICAgICAgICAgICB0aWNrTGFiZWwuc3R5bGUoInZpc2liaWxpdHkiLCAiaGlkZGVuIik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIG1ldGhvZCBpcyByZXNwb25zaWJsZSBmb3IgZXZlbmx5IHNwYWNpbmcgdGhl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yZWN0LCBwYWRkaW5nKTsgfSk7CiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgcmVjdHNXaXRoUGFkZGluZy5sZW5ndGggLSBpbnRlcnZhbDsgaSArPSBpbnRlcnZhbCkgewogICAgICAgICAgICAgICAgdmFyIGN1cnJSZWN0ID0gcmVjdHNXaXRoUGFkZGluZ1tpXTsKICAgICAgICAgICAgICAgIHZhciBuZXh0UmVjdCA9IHJlY3RzV2l0aFBhZGRpbmdbaSArIGludGVydmFsXTsKICAgICAgICAgICAgICAgIGlmICh1dGlscyQxLkRPTS5jbGllbnRSZWN0c092ZXJsYXAoY3VyclJlY3QsIG5leHRSZWN0KSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICB9OwogICAgICAgIE51bWVyaWMucHJvdG90eXBlLmludmFsaWRhdGVDYWNoZSA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgX3N1cGVyLnByb3RvdHlwZS5pbnZhbGlkYXRlQ2FjaGUuY2FsbCh0aGlzKTsKICAgICAgICAgICAgdGhpcy5fbWVhc3VyZXIucmVzZXQoKTsKICAgICAgICB9OwogICAgICAgIHJldHVybiBOdW1lcmljOwogICAgfShheGlzJDIuQXhpcykpOwogICAgZXhwb3J0cy5OdW1lcmljID0gTnVtZXJpYzsKICAgIH0pOwoKICAgIHZhciB0aWNrR2VuZXJhdG9ycyA9IGNyZWF0ZUNvbW1vbmpzTW9kdWxlKGZ1bmN0aW9uIChtb2R1bGUsIGV4cG9ydHMpIHsKICAgIC8qKgogICAgICogQ29weXJpZ2h0IDIwMTQtcHJlc2VudCBQYWxhbnRpciBUZWNobm9sb2dpZXMKICAgICAqIEBsaWNlbnNlIE1JVAogICAgICovCiAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgIl9fZXNNb2R1bGUiLCB7IHZhbHVlOiB0cnVlIH0pOwoKICAgIC8qKgogICAgICogQ3JlYXRlcyBhIFRpY2tHZW5lcmF0b3IgdXNpbmcgdGhlIHNwZWNpZmllZCBpbnRlcnZhbC4KICAgICAqCiAgICAgKiBHZW5lcmF0ZXMgdGlja3MgYXQgbXVsdGlwbGVzIG9mIHRoZSBpbnRlcnZhbCB3aGlsZSBhbHNvIGluY2x1ZGluZyB0aGUgZG9tYWluIGJvdW5kYXJpZXMuCiAgICAgKgogICAgICogQHBhcmFtIHtudW1iZXJ9IGludGVydmFsCiAgICAgKiBAcmV0dXJucyB7VGlja0dlbmVyYXRvcn0KICAgICAqLwogICAgZnVuY3Rpb24gaW50ZXJ2YWxUaWNrR2VuZXJhdG9yKGludGVydmFsKSB7CiAgICAgICAgaWYgKGludGVydmFsIDw9IDApIHsKICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCJpbnRlcnZhbCBtdXN0IGJlIHBvc2l0aXZlIG51bWJlciIpOwogICAgICAgIH0KICAgICAgICByZXR1cm4gZnVuY3Rpb24gKHMpIHsKICAgICAgICAgICAgdmFyIGRvbWFpbiA9IHMuZG9tYWluKCk7CiAgICAgICAgICAgIHZhciBsb3cgPSBNYXRoLm1pbihkb21haW5bMF0sIGRvbWFpblsxXSk7CiAgICAgICAgICAgIHZhciBoaWdoID0gTWF0aC5tYXgoZG9tYWluWzBdLCBkb21haW5bMV0pOwogICAgICAgICAgICB2YXIgZmlyc3RUaWNrID0gTWF0aC5jZWlsKGxvdyAvIGludGVydmFsKSAqIGludGVydmFsOwogICAgICAgICAgICB2YXIgbnVtVGlja3MgPSBNYXRoLmZsb29yKChoaWdoIC0gZmlyc3RUaWNrKSAvIGludGVydmFsKSArIDE7CiAgICAgICAgICAgIHZhciBsb3dUaWNrcyA9IGxvdyAlIGludGVydmFsID09PSAwID8gW10gOiBbbG93XTsKICAgICAgICAgICAgdmFyIG1pZGRsZVRpY2tzID0gdXRpbHMkMS5NYXRoLnJhbmdlKDAsI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3JlIGRvbmUKICAgICAgICBpZiAobWluRG9tYWluVmFsdWUgPT0gbnVsbCAmJiBtYXhEb21haW5WYWx1ZSA9PSBudWxsKSB7CiAgICAgICAgICAgIHJldHVybiB7IGNlbnRlclBvaW50OiBjZW50ZXJQb2ludCwgem9vbUFtb3VudDogem9vbUFtb3VudCB9OwogICAgICAgIH0KICAgICAgICB2YXIgcmFuZ2VSZXZlcnNlZCA9IGlzUmFuZ2VSZXZlcnNlZChzY2FsZSk7CiAgICAgICAgdmFyIGRvbWFpblJldmVyc2VkID0gaXNEb21haW5SZXZlcnNlZChzY2FsZSk7CiAgICAgICAgdmFyIGRlZmF1bHREb21haW5NaW4gPSBkb21haW5SZXZlcnNlZCA/IEluZmluaXR5IDogLUluZmluaXR5OwogICAgICAgIHZhciBkZWZhdWx0RG9tYWluTWF4ID0gZG9tYWluUmV2ZXJzZWQgPyAtSW5maW5pdHkgOiBJbmZpbml0eTsKICAgICAgICBtaW5Eb21haW5WYWx1ZSA9IG1pbkRvbWFpblZhbHVlID09IG51bGwgPyBkZWZhdWx0RG9tYWluTWluIDogbWluRG9tYWluVmFsdWU7CiAgICAgICAgbWF4RG9tYWluVmFsdWUgPSBtYXhEb21haW5WYWx1ZSA9PSBudWxsID8gZGVmYXVsdERvbWFpbk1heCA6IG1heERvbWFpblZhbHVlOwogICAgICAgIHZhciBfYSA9IHNjYWxlLmdldFRyYW5zZm9ybWF0aW9uRG9tYWluKCksIHNjYWxlRG9tYWluTWluID0gX2FbMF0sIHNjYWxlRG9tYWluTWF4ID0gX2FbMV07CiAgICAgICAgdmFyIG1heFJhbmdlID0gc2NhbGUuc2NhbGVUcmFuc2Zvcm1hdGlvbihtYXhEb21haW5WYWx1ZSk7CiAgICAgICAgdmFyIGN1cnJlbnRNYXhSYW5nZSA9IHNjYWxlLnNjYWxlVHJhbnNmb3JtYXRpb24oc2NhbGVEb21haW5NYXgpOwogICAgICAgIHZhciBuZXdNYXhSYW5nZSA9IHpvb21PdXQoY3Vyc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G1heFJhbmdlKTsKICAgICAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAgICAgY2VudGVyUG9pbnQ6IHdhbnRlZENlbnRlclBvaW50LAogICAgICAgICAgICAgICAgICAgIHpvb21BbW91bnQ6IHdhbnRlZFpvb21BbW91bnQsCiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgLy8gdGhlIGNlbnRlclBvaW50IGRvZXNuJ3QgbWF0dGVyIGF0IGFsbCBoZXJlIGJ1dCB3ZSBtdXN0IGluY2x1ZGUgaXQKICAgICAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAgICAgY2VudGVyUG9pbnQ6IGNlbnRlclBvaW50LAogICAgICAgICAgICAgICAgICAgIHpvb21BbW91bnQ6IHdhbnRlZFpvb21BbW91bnQsCiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICAvLyB0aGUgem9vbSBkb2VzIGZpdCwgYnV0IG9uZSBlbmQgaXMgb3V0c2lkZS4gSW4gdGhpcyBjYXNlIGp1c3QgbnVkZ2UgdGhlIGVkZ2UgaW4KICAgICAgICAgICAgaWYgKG5ld01heFJhbmdlID4gbWF4UmFuZ2UgIT0gcmFuZ2VSZXZlcnNlZCkgewogICAgICAgICAgICAgICAgLy8gcHJldmVudCBvdXQgb2YgYm91bmRzIG9uIG1heCBlZGdlLgogICAgICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgICAgICBjZW50ZXJQb2ludDogZ2V0Wm9vbU91dENlbnRlcihjdXJyZW50TWF4UmFuZ2UsIHpvb21BbW91bnQsIG1heFJhbmdlKSwKICAgICAgICAgICAgICAgICAgICB6b29tQW1vdW50OiB6b29tQW1vdW50LAogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChuZXdNaW5SYW5nZSA8IG1pblJhbmdlICE9IHJhbmdlUmV2ZXJzZWQpIHsKICAgICAgICAgICAgICAgIC8vIHByZXZlbnQgb3V0IG9mIGJvdW5kcyBvbiBtaW4gZWRnZS4KICAgICAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAgICAgY2VudGVyUG9pbnQ6IGdldFpvb21PdXRDZW50ZXIoY3VycmVudE1pblJhbmdlLCB6b29tQW1vdW50LCBtaW5SYW5nZSksCiAgICAgICAgICAgICAgICAgICAgem9vbUFtb3VudDogem9vbUFtb3VudCwKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICByZXR1cm4geyBjZW50ZXJQb2ludDogY2VudGVyUG9pbnQsIHpvb21BbW91bnQ6IHpvb21BbW91bnQgfTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIGV4cG9ydHMuY29uc3RyYWluWm9vbVZhbHVlcyA9IGNvbnN0cmFpblpvb21WYWx1ZXM7CiAgICAvKioKICAgICAqIFJldHVybnMgYSBuZXcgdHJhbnNsYXRpb24gdmFsdWUgdGhhdCByZXNwZWN0cyBkb21haW4gbWluL21heCB2YWx1ZQogICAgICogY29uc3RyYWludHMuCiAgICAgKi8KICAgIGZ1bmN0aW9uIGNvbnN0cmFpbmVkVHJhbnNsYXRpb24oc2NhbGUsIHRyYW5zbGF0aW9uLCBtaW5Eb21haW5WYWx1ZSwgbWF4RG9tYWluVmFsdWUpIHsKICAgICAgICB2YXIgX2EgPSBzY2FsZS5nZXRUcmFuc2Zvcm1hdGlvbkRvbWFpbigpLCBzY2FsZURvbWFpbk1pbiA9IF9hWzBdLCBzY2FsZURvbWFpbk1heCA9IF9hWzFdOwogICAgICAgIHZhciByZXZlcnNlZCA9IGlzUmFuZ2VSZXZlcnNlZChzY2FsZSk7CiAgICAgICAgaWYgKHRyYW5zbGF0aW9uID4gMCAhPT0gcmV2ZXJzZWQpIHsKICAgICAgICAgICAgdmFyIGJvdW5kID0gbWF4RG9tYWluVmFsdWU7CiAgICAgICAgICAgIGlmIChib3VuZCAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICB2YXIgY3VycmVudE1heFJhbmdlID0gc2NhbGUuc2NhbGVUcmFuc2Zvcm1hdGlvbihzY2FsZURvbWFpbk1heCk7CiAgICAgICAgICAgICAgICB2YXIgbWF4UmFuZ2UgPSBzY2FsZS5zY2FsZVRyYW5zZm9ybWF0aW9uKGJvdW5kKTsKICAgICAgICAgICAgICAgIHRyYW5zbGF0aW9uID0gKHJldmVyc2VkID8gTWF0aC5tYXggOiBNYXRoLm1pbikoY3VycmVudE1heFJhbmdlICsgdHJhbnNsYXRpb24sIG1heFJhbmdlKSAtIGN1cnJlbnRNYXhSYW5nZTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgdmFyIGJvdW5kID0gbWluRG9tYWluVmFsdWU7CiAgICAgICAgICAgIGlmIChib3VuZCAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICB2YXIgY3VycmVudE1pblJhbmdlID0gc2NhbGUuc2NhbGVUcmFuc2Zvcm1hdGlvbihzY2FsZURvbWFpbk1pbik7CiAgICAgICAgICAgICAgICB2YXIgbWluUmFuZ2UgPSBzY2FsZS5zY2FsZVRyYW5zZm9ybWF0aW9uKGJvdW5kKTsKICAgICAgICAgICAgICAgIHRyYW5zbGF0aW9uID0gKHJldmVyc2VkID8gTWF0aC5taW4gOiBNYXRoLm1heCkoY3VycmVudE1pblJhbmdlICsgdHJhbnNsYXRpb24sIG1pblJhbmdlKSAtIGN1cnJlbnRNaW5SYW5nZTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gdHJhbnNsYXRpb247CiAgICB9CiAgICBleHBvcnRzLmNvbnN0cmFpbmVkVHJhbnNsYXRpb24gPSBjb25zdHJhaW5lZFRyYW5zbGF0aW9uOwogICAgLyoqCiAgICAgKiBSZXR1cm5zIHRydWUgaWZmIHRoZSBzY2FsZS5yYW5nZVsxXSA8IHNjYWxlLnJhbmdlWzBdLgogICAgICovCiAgICBmdW5jdGlvbiBpc1JhbmdlUmV2ZXJzZWQoc2NhbGUpIHsKICAgICAgICB2YXIgcmFuZ2UgPSBzY2FsZS5yYW5nZSgpOwogICAgICAgIHJldHVybiByYW5nZVsxXSA8IHJhbmdlWzBdOwogICAgfQogICAgZnVuY3Rpb24gaXNEb21haW5SZXZlcnNlZChzY2FsZSkgewogICAgICAgIHZhciBkb21haW4gPSBzY2FsZS5nZXRUcmFuc2Zvcm1hdGlvbkRvbWFpbigpOwogICAgICAgIHJldHVybiBkb21haW5bMV0gPCBkb21haW5bMF07CiAgICB9CiAgICB9KTsKCiAgICB2YXIgc2NhbGUgPSBjcmVhdGVDb21tb25qc01vZHVsZShmdW5jdGlvbiAobW9kdWxlLCBleHBvcnRzKSB7CiAgICAvKioKICAgICAqIENvcHlyaWdodCAyMDE0LXByZXNlbnQgUGFsYW50aXIgVGVjaG5vbG9naWVzCiAgICAgKiBAbGljZW5zZSBNSVQKICAgICAqLwogICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsKCiAgICB2YXIgU2NhbGUgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7CiAgICAgICAgLyoqCiAgICAgICAgICogQSBTY2FsZSBpcyBhIGZ1bmN0aW9uIChpbiB0aGUgbWF0aGVtYXRpY2FsIHNlbnNlKSB0aGF0IG1hcHMgdmFsdWVzIGZyb20gYSBkb21haW4gdG8gYSByYW5nZS4KICAgICAgICAgKgogICAgICAgICAqIEBjb25zdHJ1Y3RvcgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIFNjYWxlKCkgewogICAgICAgICAgICB0aGlzLl9hdXRvRG9tYWluQXV0b21hdGljYWxseSA9IHRydWU7CiAgICAgICAgICAgIHRoaXMu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gICAgICAgICAgICAgICB2YXIgZXh0ZW50cyA9IHByb3ZpZGVyKF90aGlzLCBpZ25vcmVBdHRhY2hTdGF0ZSk7CiAgICAgICAgICAgICAgICBwcm92aWRlckFycmF5ID0gcHJvdmlkZXJBcnJheS5jb25jYXQoZXh0ZW50cyk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICByZXR1cm4gcHJvdmlkZXJBcnJheTsKICAgICAgICB9OwogICAgICAgIFNjYWxlLnByb3RvdHlwZS5fZ2V0RXh0ZW50ID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICByZXR1cm4gW107IC8vIHRoaXMgc2hvdWxkIGJlIG92ZXJ3cml0dGVuCiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBBZGRzIGEgY2FsbGJhY2sgdG8gYmUgY2FsbGVkIHdoZW4gdGhlIFNjYWxlIHVwZGF0ZXMuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0ge1NjYWxlQ2FsbGJhY2t9IGNhbGxiYWNrLgogICAgICAgICAqIEByZXR1cm5zIHtTY2FsZX0gVGhlIGNhbGxpbmcgU2NhbGUuCiAgICAgICAgICovCiAgICAgICAgU2NhbGUucHJvdG90eXBlLm9uVXBkYXRlID0gZnVuY3Rpb24gKGNhbGxiYWNrKSB7CiAgICAgICAgICAgIHRoaXMuX2NhbGxiYWNrcy5hZGQoY2FsbGJhY2spOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIFJlbW92ZXMgYSBjYWxsYmFjayB0aGF0IHdvdWxkIGJlIGNhbGxlZCB3aGVuIHRoZSBTY2FsZSB1cGRhdGVzLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtTY2FsZUNhbGxiYWNrfSBjYWxsYmFjay4KICAgICAgICAgKiBAcmV0dXJucyB7U2NhbGV9IFRoZSBjYWxsaW5nIFNjYWxlLgogICAgICAgICAqLwogICAgICAgIFNjYWxlLnByb3Rvd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gICAgICAgICAgdGhpcy5hdXRvRG9tYWluKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIENvbXB1dGVzIHRoZSByYW5nZSB2YWx1ZSBjb3JyZXNwb25kaW5nIHRvIGEgZ2l2ZW4gZG9tYWluIHZhbHVlLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtEfSB2YWx1ZQogICAgICAgICAqIEByZXR1cm5zIHtSfSBUaGUgcmFuZ2UgdmFsdWUgY29ycmVzcG9uZGluZyB0byB0aGUgc3VwcGxpZWQgZG9tYWluIHZhbHVlLgogICAgICAgICAqLwogICAgICAgIFNjYWxlLnByb3RvdHlwZS5zY2FsZSA9IGZ1bmN0aW9uICh2YWx1ZSkgewogICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoIlN1YmNsYXNzZXMgc2hvdWxkIG92ZXJyaWRlIHNjYWxlIik7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIGFuIGFycmF5IG9mIHRpY2sgdmFsdWVzIHNwYW5uaW5nIHRoZSBkb21haW4uCiAgICAgICAgICoKICAgICAgICAgKiBAcmV0dXJucyB7RFtdfQogICAgICAgICAqLwogICAgICAgIFNjYWxlLnByb3RvdHlwZS50aWNrcyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuZG9tYWluKCk7CiAgICAgICAgfTsKICAgICAgICBTY2FsZS5wcm90b3R5cGUuZG9tYWluID0gZnVuY3Rpb24gKHZhbHVlcykgewogICAgICAgICAgICBpZiAodmFsdWVzID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9nZXREb21haW4oKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuX2F1dG9Eb21haW5BdXRvbWF0aWNhbGx5ID0gZmFsc2U7CiAgICAgICAgICAgICAgICB0aGlzLl9zZXREb21haW4odmFsdWVzKTsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBTY2FsZS5wcm90b3R5cGUuX2dldERvbWFpbiA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCJTdWJjbGFzc2VzIHNob3VsZCBvdmVycmlkZSBfZ2V0RG9tYWluIik7CiAgICAgICAgfTsKICAgICAgICBTY2FsZS5wcm90b3R5cGUuX3NldERvbWFpbiA9IGZ1bmN0aW9uICh2YWx1ZXMpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLl9kb21haW5Nb2RpZmljYXRpb25JblByb2dyZXNzKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9kb21haW5Nb2RpZmljYXRpb25JblByb2dyZXNzID0gdHJ1ZTsKICAgICAgICAgICAgICAgIHRoaXMuX2JhY2tpbmdTY2FsZURvbWFpbih2YWx1ZXMpOwogICAgICAgICAgICAgICAgdGhpcy5fZGlzcGF0Y2hVcGRhdGUoKTsKICAgICAgICAgICAgICAgIHRoaXMuX2RvbWFpbk1vZGlmaWNhdGlvbkluUHJvZ3Jlc3MgPSBmYWxzZTsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgU2NhbGUucHJvdG90eXBlLl9iYWNraW5nU2NhbGVEb21haW4gPSBmdW5jdGlvbiAodmFsdWVzKSB7CiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigiU3ViY2xhc3NlcyBzaG91bGQgb3ZlcnJpZGUgX2JhY2tpbmdEb21haW4iKTsKICAgICAgICB9OwogICAgICAgIFNjYWxlLnByb3RvdHlwZS5yYW5nZSA9IGZ1bmN0aW9uICh2YWx1ZXMpIHsKICAgICAgICAgICAgaWYgKHZhbHVlcyA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fZ2V0UmFuZ2UoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuX3NldFJhbmdlKHZhbHVlcyk7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgU2NhbGUucHJvdG90eXBlLl9nZXRSYW5nZSA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCJTdWJjbGFzc2VzIHNob3VsZCBvdmVycmlkZSBfZ2V0UmFuZ2UiKTsKICAgICAgICB9OwogICAgICAgIFNjYWxlLnByb3RvdHlwZS5fc2V0UmFuZ2UgPSBmdW5jdGlvbiAodmFsdWVzKSB7CiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigiU3ViY2xhc3NlcyBzaG91bGQgb3ZlcnJpZGUgX3NldFJhbmdlIik7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBBZGRzIGFuIEluY2x1ZGVkVmFsdWVzUHJvdmlkZXIgdG8gdGhlIFNjYWxlLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtTY2FsZXMuSW5jbHVkZWRWYWx1ZXNQcm92aWRlcn0gcHJvdmlkZXIKICAgICAgICAgKiBAcmV0dXJucyB7U2NhbGV9IFRoZSBjYWxsaW5nIFNjYWxlLgogICAgICAgICAqLwogICAgICAgIFNjYWxlLnByb3RvdHlwZS5hZGRJbmNsdWRlZFZhbHVlc1Byb3ZpZGVyID0gZnVuY3Rpb24gKHByb3ZpZGVyKSB7CiAgICAgICAgICAgIHRoaXMuX2luY2x1ZGVkVmFsdWVzUHJvdmlkZXJzLmFkZChwcm92aWRlcik7CiAgICAgICAgICAgIHRoaXMuYXV0b0RvbWFpbklmQXV0b21hdGljTW9kZSgpOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIFJlbW92ZXMgdGhlIEluY2x1ZGVkVmFsdWVzUHJvdmlkZXIgZnJvbSB0aGUgU2NhbGUuCiAgICAgICAgIC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c2FtZSBwYW4vem9vbSwgcGFkZGluZywgZG9tYWluIGFuZCByYW5nZSwgYnV0CiAgICAgICAgICogd2l0aG91dCBhbnkgaW5jbHVkZWQgdmFsdWVzIHByb3ZpZGVycy4KICAgICAgICAgKi8KICAgICAgICBDYXRlZ29yeS5wcm90b3R5cGUuY2xvbmVXaXRob3V0UHJvdmlkZXJzID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB2YXIgc2NhbGUgPSBuZXcgQ2F0ZWdvcnkoKQogICAgICAgICAgICAgICAgLmRvbWFpbih0aGlzLmRvbWFpbigpKQogICAgICAgICAgICAgICAgLnJhbmdlKHRoaXMucmFuZ2UoKSkKICAgICAgICAgICAgICAgIC5pbm5lclBhZGRpbmcodGhpcy5pbm5lclBhZGRpbmcoKSkKICAgICAgICAgICAgICAgIC5vdXRlclBhZGRpbmcodGhpcy5vdXRlclBhZGRpbmcoKSk7CiAgICAgICAgICAgIHNjYWxlLl9kM1RyYW5zZm9ybWF0aW9uU2NhbGUuZG9tYWluKHRoaXMuX2QzVHJhbnNmb3JtYXRpb25TY2FsZS5kb21haW4oKSk7CiAgICAgICAgICAgIHJldHVybiBzY2FsZTsKICAgICAgICB9OwogICAgICAgIENhdGVnb3J5LnByb3RvdHlwZS5leHRlbnRPZlZhbHVlcyA9IGZ1bmN0aW9uICh2YWx1ZXMpIHsKICAgICAgICAgICAgcmV0dXJuIHV0aWxzJDEuQXJyYXkudW5pcSh2YWx1ZXMpOwogICAgICAgIH07CiAgICAgICAgQ2F0ZWdvcnkucHJvdG90eXBlLl9nZXRFeHRlbnQgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHJldHVybiB1dGlscyQxLkFycmF5LnVuaXEodGhpcy5fZ2V0QWxsSW5jbHVkZWRWYWx1ZXMoKSk7CiAgICAgICAgfTsKICAgICAgICBDYXRlZ29yeS5wcm90b3R5cGUuZG9tYWluID0gZnVuY3Rpb24gKHZhbHVlcykgewogICAgICAgICAgICByZXR1cm4gX3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ChkKSB7IHJldHVybiBfdGhpcy5fZDNTY2FsZShkKSArIHJhbmdlQmFuZCAvIDI7IH0pOwogICAgICAgICAgICB2YXIgZG9tYWluU3RhcnQgPSBkMy5iaXNlY3Qobm9ybWFsaXplZERvbWFpbiwgZG9tYWluU3RhcnROb3JtYWxpemVkKTsKICAgICAgICAgICAgdmFyIGRvbWFpbkVuZCA9IGQzLmJpc2VjdChub3JtYWxpemVkRG9tYWluLCBkb21haW5FbmROb3JtYWxpemVkKTsKICAgICAgICAgICAgcmV0dXJuIGRvbWFpbi5zbGljZShkb21haW5TdGFydCwgZG9tYWluRW5kKTsKICAgICAgICB9OwogICAgICAgIENhdGVnb3J5LnByb3RvdHlwZS5yYW5nZSA9IGZ1bmN0aW9uICh2YWx1ZXMpIHsKICAgICAgICAgICAgcmV0dXJuIF9zdXBlci5wcm90b3R5cGUucmFuZ2UuY2FsbCh0aGlzLCB2YWx1ZXMpOwogICAgICAgIH07CiAgICAgICAgQ2F0ZWdvcnkuX2NvbnZlcnRUb1Bsb3R0YWJsZUlubmVyUGFkZGluZyA9IGZ1bmN0aW9uIChkM0lubmVyUGFkZGluZykgewogICAgICAgICAgICByZXR1cm4gMSAvICgxIC0gZDNJbm5lclBhZGRpbmcpIC0gMTsKICAgICAgICB9OwogICAgICAgIENhdGVnb3J5Ll9jb252ZXJ0VG9QbG90dGFibGVPdXRlclBhZGRpbmcgPSBmdW5jdGlvbiAoZDNPdXRlclBhZGRpbmcsIGQzSW5uZXJQYWRkaW5nKSB7CiAgICAgICAgICAgIHJldHVybiBkM091dGVyUGFkZGluZyAvICgxIC0gZDNJbm5lclBhZGRpbmcpOwogICAgICAgIH07CiAgICAgICAgQ2F0ZWdvcnkucHJvdG90eXBlLl9zZXRCYW5kcyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIGQzSW5uZXJQYWRkaW5nID0gMSAtIDEgLyAoMSArIHRoaXMuaW5uZXJQYWRkaW5nKCkpOwogICAgICAgICAgICB2Y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kd2lkdGgoKSAqICgxICsgdGhpcy5pbm5lclBhZGRpbmcoKSkpOwogICAgICAgIH07CiAgICAgICAgQ2F0ZWdvcnkucHJvdG90eXBlLnRpY2tzID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5kb21haW4oKTsKICAgICAgICB9OwogICAgICAgIENhdGVnb3J5LnByb3RvdHlwZS5pbm5lclBhZGRpbmcgPSBmdW5jdGlvbiAoaW5uZXJQYWRkaW5nKSB7CiAgICAgICAgICAgIGlmIChpbm5lclBhZGRpbmcgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2lubmVyUGFkZGluZzsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9pbm5lclBhZGRpbmcgPSBpbm5lclBhZGRpbmc7CiAgICAgICAgICAgIHRoaXMucmFuZ2UodGhpcy5yYW5nZSgpKTsKICAgICAgICAgICAgdGhpcy5fZGlzcGF0Y2hVcGRhdGUoKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBDYXRlZ29yeS5wcm90b3R5cGUub3V0ZXJQYWRkaW5nID0gZnVuY3Rpb24gKG91dGVyUGFkZGluZykgewogICAgICAgICAgICBpZiAob3V0ZXJQYWRkaW5nID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9vdXRlclBhZGRpbmc7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fb3V0ZXJQYWRkaW5nID0gb3V0ZXJQYWRkaW5nOwogICAgICAgICAgICB0aGlzLnJhbmdlKHRoaXMucmFuZ2UoKSk7CiAgICAgICAgICAgIHRoaXMuX2Rpc3BhdGNoVXBkYXRlKCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgQ2F0ZWdvcnkucHJvdG90eXBlLnNjYWxlID0gZnVuY3Rpb24gKHZhbHVlKSB7CiAgICAgICAgICAgIC8vIER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YXRlZ29yeS5wcm90b3R5cGUuc2V0VHJhbnNmb3JtYXRpb25Eb21haW4gPSBmdW5jdGlvbiAoZG9tYWluKSB7CiAgICAgICAgICAgIHRoaXMuX2QzVHJhbnNmb3JtYXRpb25TY2FsZS5kb21haW4oZG9tYWluKTsKICAgICAgICAgICAgdGhpcy5fZGlzcGF0Y2hVcGRhdGUoKTsKICAgICAgICB9OwogICAgICAgIENhdGVnb3J5LnByb3RvdHlwZS5fZ2V0RG9tYWluID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fYmFja2luZ1NjYWxlRG9tYWluKCk7CiAgICAgICAgfTsKICAgICAgICBDYXRlZ29yeS5wcm90b3R5cGUuX2JhY2tpbmdTY2FsZURvbWFpbiA9IGZ1bmN0aW9uICh2YWx1ZXMpIHsKICAgICAgICAgICAgaWYgKHZhbHVlcyA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fZDNTY2FsZS5kb21haW4oKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuX2QzU2NhbGUuZG9tYWluKHZhbHVlcyk7CiAgICAgICAgICAgICAgICB0aGlzLl9zZXRCYW5kcygpOwogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIENhdGVnb3J5LnByb3RvdHlwZS5fZ2V0UmFuZ2UgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9yYW5nZTsKICAgICAgICB9OwogICAgICAgIENhdGVnb3J5LnByb3RvdHlwZS5fc2V0UmFuZ2UgPSBmdW5jdGlvbiAodmFsdWVzKSB7CiAgICAgICAgICAgIHRoaXMuX3JhbmdlID0gdmFsdWVzOwogICAgICAgICAgICB0aGlzLl9kM1RyYW5zZm9ybWF0aW9uU2NhbGUucmFuZ2UodmFsdWVzKTsKICAgICAgICAgICAgdG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aWxsIGltcGxpY2l0bHkgYWRkIG5ldwogICAgICogdmFsdWVzIHRvIHRoZSBkb21haW4uCiAgICAgKgogICAgICogVGhlc2Ugc2lkZS1lZmZlY3RzIGNhdXNlIHVzIHRvIHJlbHkgb24gbG9va2luZyB1cCB0aGUgY3VycmVudCBzY2FsZSBzdGF0ZQogICAgICogd2l0aCB0aGUgYC5kb21haW4oKWAgYW5kIGAucmFuZ2UoKWAgbWV0aG9kcy4gSG93ZXZlciwgdGhlc2UgbWV0aG9kcyBoYXZlIHBvb3IKICAgICAqIHBlcmZvcm1hbmNlIGltcGxpY2F0aW9ucyBzaW5jZSB0aGV5IHdpbGwgYWx3YXlzIHNsaWNlIHRoZWlyIGludGVybmFsIHZhbHVlcwogICAgICogYmVmb3JlIHJldHVybmluZy4gSW5zaWRlIHRoZSBpbm5lciByZW5kZXIgbG9vcCBvZiBjb2xvciBzY2F0dGVyIHBsb3QgcG9pbnRzLAogICAgICogdGhlc2Ugc2xpY2VzIGFkZCB1cC4KICAgICAqLwogICAgdmFyIEltcGxpY2l0U2VyaWVzVHJhY2tlciA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uICgpIHsKICAgICAgICBmdW5jdGlvbiBJbXBsaWNpdFNlcmllc1RyYWNrZXIoKSB7CiAgICAgICAgICAgIHRoaXMuY291bnQgPSAwOwogICAgICAgICAgICB0aGlzLnRyYWNrZXIgPSB7fTsKICAgICAgICB9CiAgICAgICAgSW1wbGljaXRTZXJpZXNUcmFja2VyLnByb3RvdHlwZS5nZXRJbmRleCA9IGZ1bmN0aW9uICh2YWx1ZSkgewogICAgICAgICAgICBpZiAodGhpcy50cmFja2VyW3ZhbHVlXSAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy50cmFja2VyW3ZhbHVlXTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHZhciBpZHggPSB0aGlzLmNvdW50OwogICAgICAgICAgICAgICAg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lKSB7CiAgICAgICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMpIHx8IHRoaXM7CiAgICAgICAgICAgIC8vIENhY2hlIHRoZSBudW1iZXIgb2YgcmFuZ2UgdmFsdWUgdG8gYXZvaWQgY2FsbGluZyBgc2NhbGUucmFuZ2UoKS5sZW5ndGhgCiAgICAgICAgICAgIF90aGlzLl9yYW5nZUxlbmd0aCA9IDE7CiAgICAgICAgICAgIF90aGlzLl90cmFja2VyID0gbmV3IEltcGxpY2l0U2VyaWVzVHJhY2tlcigpOwogICAgICAgICAgICB2YXIgc2NhbGU7CiAgICAgICAgICAgIHN3aXRjaCAoc2NhbGVUeXBlKSB7CiAgICAgICAgICAgICAgICBjYXNlIG51bGw6CiAgICAgICAgICAgICAgICBjYXNlIHVuZGVmaW5lZDoKICAgICAgICAgICAgICAgICAgICBpZiAoQ29sb3IuX3Bsb3R0YWJsZUNvbG9yQ2FjaGUgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgICAgICBDb2xvci5fcGxvdHRhYmxlQ29sb3JDYWNoZSA9IENvbG9yLl9nZXRQbG90dGFibGVDb2xvcnMoKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgc2NhbGUgPSBkMy5zY2FsZU9yZGluYWwoKS5yYW5nZShDb2xvci5fcGxvdHRhYmxlQ29sb3JDYWNoZSk7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBjYXNlICJDYXRlZ29yeTEwIjoKICAgICAgICAgICAgICAgIGNhc2UgImNhdGVnb3J5MTAiOgogICAgICAgICAgICAgICAgY2FzZSAiMTAiOgogICAgICAgICAgICAgICAgICAgIHNjYWxlID0gZDMuc2NhbGVPcmRpbmFsKGQzLnNjaGVtZUNhdGVnb3J5MTApOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgY2FzZSAiQ2F0ZWdvcnkyMCI6CiAgICAgICAgICAgICAgICBjYXNlICJjYXRlZ29yeTIwIjoKICAgICAgICAgICAgICAgIGNhc2UgIjIwIjoKICAgICAgICAgICAgICAgICAgICBzY2FsZSA9IGQzLnNjYWxlT3JkaW5hbChkMy5zY2hlbWVDYXRlZ29yeTIwKTsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIGNhc2UgIkNhdGVnb3J5MjBiIjoKICAgICAgICAgICAgICAgIGNhc2UgImNhdGVnb3J5MjBiIjoKICAgICAgICAgICAgICAgIGNhc2UgIjIwYiI6CiAgICAgICAgICAgICAgICAgICAgc2NhbGUgPSBkMy5zY2FsZU9yZGluYWwoZDMuc2NoZW1lQ2F0ZWdvcnkyMGIpOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgY2FzZSAiQ2F0ZWdvcnkyMGMiOgogICAgICAgICAgICAgICAgY2FzZSAiY2F0ZWdvcnkyMGMiOgogICAgICAgICAgICAgICAgY2FzZSAiMjBjIjoKICAgICAgICAgICAgICAgICAgICBzY2FsZSA9IGQzLnNjYWxlT3JkaW5hbChkMy5zY2hlbWVDYXRlZ29yeTIwYyk7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigiVW5zdXBwb3J0ZWQgQ29sb3JTY2FsZSB0eXBlIik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgX3RoaXMuX2QzU2NhbGUgPSBzY2FsZTsKICAgICAgICAgICAgX3RoaXMuX3JhbmdlTGVuZ3RoID0gX3RoaXMuX2QzU2NhbGUucmFuZ2UoKS5sZW5ndGg7CiAgICAgICAgICAgIHJldHVybiBfdGhpczsKICAgICAgICB9CiAgICAgICAgQ29sb3IucHJvdG90eXBlLmV4dGVudE9mVmFsdWVzID0gZnVuY3Rpb24gKHZhbHVlcykgewogICAgICAgICAgICByZXR1cm4gdXRpbHMkMS5Bcn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YgY29sb3JIZXggPT09IHBsb3R0YWJsZURlZmF1bHRDb2xvcnNbcGxvdHRhYmxlRGVmYXVsdENvbG9ycy5sZW5ndGggLSAxXSkgewogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcGxvdHRhYmxlRGVmYXVsdENvbG9ycy5wdXNoKGNvbG9ySGV4KTsKICAgICAgICAgICAgICAgIGkrKzsKICAgICAgICAgICAgICAgIGNvbG9ySGV4ID0gdXRpbHMkMS5Db2xvci5jb2xvclRlc3QoY29sb3JUZXN0ZXIsICJwbG90dGFibGUtY29sb3JzLSIgKyBpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBjb2xvclRlc3Rlci5yZW1vdmUoKTsKICAgICAgICAgICAgcmV0dXJuIHBsb3R0YWJsZURlZmF1bHRDb2xvcnM7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBSZXR1cm5zIHRoZSBjb2xvci1zdHJpbmcgY29ycmVzcG9uZGluZyB0byBhIGdpdmVuIHN0cmluZy4KICAgICAgICAgKgogICAgICAgICAqIElmIHRoZXJlIGFyZSBub3QgZW5vdWdoIGNvbG9ycyBpbiB0aGUgcmFuZ2UoKSwgYSBsaWdodGVuZWQgdmVyc2lvbiBvZiBhbgogICAgICAgICAqIGV4aXN0aW5nIGNvbG9yIHdpbGwgYmUgdXNlZC4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSB2YWx1ZQogICAgICAgICAqIEByZXR1cm5zIHtzdHJpbmd9CiAgICAgICAgICovCiAgICAgICAgQ29sb3IucHJvdG90eXBlLnNjYWxlID0gZnVuY3Rpb24gKHZhbHVlKSB7CiAgICAgICAgICAgIHZhciBjb2xvciA9IHRoaXMuX2QzU2NhbGUodmFsdWUpOwogICAgICAgICAgICB2YXIgaW5kZXggPSB0aGlzLl90cmFja2VyLmdldEluZGV4KHZhbHVlKTsKICAgICAgICAgICAgdmFyIG51bUxvb3BlZCA9IE1hdGguZmxvb3IoaW5kZXggLyB0aGlzLl9yYW5nZUxlbmd0aCk7CiAgICAgICAgICAgIGlmIChudW1Mb29wZWQgPT09IDApIHsKICAgICAgICAgICAgICAgIHJldHVybiBjb2xvcjsKICAgICAgICAgICAgfQogICAgICAgICAgICB2YXIgbW9kaWZ5RmFjdG9yID0gTWF0aC5sb2cobnVtTG9vcGVkICogQ29sb3IuX0xPT1BfTElHSFRFTl9GQUNUT1IgKyAxKTsKICAgICAgICAgICAgcmV0dXJuIHV0aWxzJDEuQ29sb3IubGlnaHRlbkNvbG9yKGNvbG9yLCBtb2RpZnlGYWN0b3IpOwogICAgICAgIH07CiAgICAgICAgQ29sb3IucHJvdG90eXBlLl9nZXREb21haW4gPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9iYWNraW5nU2NhbGVEb21haW4oKTsKICAgICAgICB9OwogICAgICAgIENvbG9yLnByb3RvdHlwZS5fYmFja2luZ1NjYWxlRG9tYWluID0gZnVuY3Rpb24gKHZhbHVlcykgewogICAgICAgICAgICBpZiAodmFsdWVzID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9kM1NjYWxlLmRvbWFpbigpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fZDNTY2FsZS5kb21haW4odmFsdWVzKTsKICAgICAgICAgICAgICAgIHRoaXMuX3RyYWNrZXIuY2xlYXIoKTsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBDb2xvci5wcm90b3R5cGUuX2dldFJhbmdlID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fZDNTY2FsZS5yYW5nZSgpOwogICAgICAgIH07CiAgICAgICAgQ29sb3IucHJvdG90eXBlLl9zZXRSYW5nZSA9IGZ1bmN0aW9uICh2YWx1ZXMpI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ICAgICogQHBhcmFtIHtzdHJpbmd9IFtzY2FsZVR5cGU9ImxpbmVhciJdIE9uZSBvZiAibGluZWFyIi8ibG9nIi8ic3FydCIvInBvdyIuCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gSW50ZXJwb2xhdGVkQ29sb3Ioc2NhbGVUeXBlKSB7CiAgICAgICAgICAgIGlmIChzY2FsZVR5cGUgPT09IHZvaWQgMCkgeyBzY2FsZVR5cGUgPSAibGluZWFyIjsgfQogICAgICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzKSB8fCB0aGlzOwogICAgICAgICAgICBzd2l0Y2ggKHNjYWxlVHlwZSkgewogICAgICAgICAgICAgICAgY2FzZSAibGluZWFyIjoKICAgICAgICAgICAgICAgICAgICBfdGhpcy5fY29sb3JTY2FsZSA9IGQzLnNjYWxlTGluZWFyKCk7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBjYXNlICJsb2ciOgogICAgICAgICAgICAgICAgICAgIF90aGlzLl9jb2xvclNjYWxlID0gZDMuc2NhbGVMb2coKTsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIGNhc2UgInNxcnQiOgogICAgICAgICAgICAgICAgICAgIF90aGlzLl9jb2xvclNjYWxlID0gZDMuc2NhbGVTcXJ0KCk7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBjYXNlICJwb3ciOgogICAgICAgICAgICAgICAgICAgIF90aGlzLl9jb2xvclNjYWxlID0gZDMuc2NhbGVQb3coKTsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoX3RoaXMuX2NvbG9yU2NhbGUgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCJ1bmtub3duIFF1YW50aXRhdGl2ZVNjYWxlIHNjYWxlIHR5cGUgIiArIHNjYWxlVHlwZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgX3RoaXMucmFuZ2UoSW50ZXJwb2xhdGVkQ29sb3IuUkVEUyk7CiAgICAgICAgICAgIHJldHVybiBfdGhpczsKICAgICAgICB9CiAgICAgICAgSW50ZXJwb2xhdGVkQ29sb3IucHJvdG90eXBlLmV4dGVudE9mVmFsdWVzID0gZnVuY3Rpb24gKHZhbHVlcykgewogICAgICAgICAgICB2YXIgZXh0ZW50ID0gZDMuZXh0ZW50KHZhbHVlcyk7CiAgICAgICAgICAgIGlmIChleHRlbnRbMF0gPT0gbnVsbCB8fCBleHRlbnRbMV0gPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIFtdOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIGV4dGVudDsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogR2VuZXJhdGVzIHRoZSBjb252ZXJ0ZWQgUXVhbnRpdGF0aXZlU2NhbGUuCiAgICAgICAgICovCiAgICAgICAgSW50ZXJwb2xhdGVkQ29sb3IucHJvdG90eXBlLl9kM0ludGVycG9sYXRlZFNjYWxlID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fY29sb3JTY2FsZS5yYW5nZShbMCwgMV0pLmludGVycG9sYXRlKHRoaXMuX2ludGVycG9sYXRlQ29sb3JzKCkpOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogR2VuZXJhdGVzIHRoZSBkMyBpbnRlcnBvbGF0b3IgZm9yIGNvbG9ycy4KICAgICAgICAgKi8KICAgICAgICBJbnRlcnBvbGF0ZWRDb2xvci5wcm90b3R5cGUuX2ludGVycG9sYXRlQ29sb3JzID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB2YXIgY29sb3JzID0gdGhpcy5fY29sb3JSYW5nZTsKICAgICAgICAgICAgaWYgKGNvbG9ycy5sZW5ndGggPCAyKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoIkNvbG9yIHNjYWxlIGFycmF5cyBtdXN0IGhhdmUgYXQgbGVhc3QgdHdvIGVsZW1lbnRzLiIpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoYSwgYikgewogICAgICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uICh0KSB7CiAgICAgICAgICAgICAgICAgICAgLy8gQ2xhbXAgdCBwYXJhbWV0ZXIgdG8gWzAsMV0KICAgICAgICAgICAgICAgICAgICB0ID0gTWF0aC5tYXgoMCwgTWF0aC5taW4oMSwgdCkpOwogICAgICAgICAgICAgICAgICAgIC8vIERldGVybWluZSBpbmRpY2VzIGZvciBjb2xvcnMKICAgICAgICAgICAgICAgICAgICB2YXIgdFNjYWxlZCA9IHQgKiAoY29sb3JzLmxlbmd0aCAtIDEpOwogICAgICAgICAgICAgICAgICAgIHZhciBpMCA9IE1hdGguZmxvb3IodFNjYWxlZCk7CiAgICAgICAgICAgICAgICAgICAgdmFyIGkxID0gTWF0aC5jZWlsKHRTY2FsZWQpOwogICAgICAgICAgICAgICAgICAgIHZhciBmcmFjID0gKHRTY2FsZWQgLSBpMCk7CiAgICAgICAgICAgICAgICAgICAgLy8gSW50ZXJwb2xhdGUgaW4gdGhlIEwqYSpiIGNvbG9yIHNwYWNlCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGQzLmludGVycG9sYXRlTGFiKGNvbG9yc1tpMF0sIGNvbG9yc1tpMV0pKGZyYWMpOwogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgfTsKICAgICAgICB9OwogICAgICAgIEludGVycG9sYXRlZENvbG9yLnByb3RvdHlwZS5fcmVzZXRTY2FsZSA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdGhpcy5fZDNTY2FsZSA9IHRoaXMuX2QzSW50ZXJwb2xhdGVkU2NhbGUoKTsKICAgICAgICAgICAgdGhpc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tYWluKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLl9kM1NjYWxlLmRvbWFpbih2YWx1ZXMpOwogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIEludGVycG9sYXRlZENvbG9yLnByb3RvdHlwZS5fZ2V0UmFuZ2UgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9jb2xvclJhbmdlOwogICAgICAgIH07CiAgICAgICAgSW50ZXJwb2xhdGVkQ29sb3IucHJvdG90eXBlLl9zZXRSYW5nZSA9IGZ1bmN0aW9uIChyYW5nZSkgewogICAgICAgICAgICB0aGlzLl9jb2xvclJhbmdlID0gcmFuZ2U7CiAgICAgICAgICAgIHRoaXMuX3Jlc2V0U2NhbGUoKTsKICAgICAgICB9OwogICAgICAgIEludGVycG9sYXRlZENvbG9yLlJFRFMgPSBbCiAgICAgICAgICAgICIjRkZGRkZGIiwKICAgICAgICAgICAgIiNGRkY2RTEiLAogICAgICAgICAgICAiI0ZFRjRDMCIsCiAgICAgICAgICAgICIjRkVEOTc2IiwKICAgICAgICAgICAgIiNGRUIyNEMiLAogICAgICAgICAgICAiI0ZEOEQzQyIsCiAgICAgICAgICAgICIjRkM0RTJBIiwKICAgICAgICAgICAgIiNFMzFBMUMiLAogICAgICAgICAgICAiI0IxMDAyNiIsCiAgICAgICAgXTsKICAgICAgICBJbnRlcnBvbGF0ZWRDb2xvci5CTFVFUyA9IFsKICAgICAgICAgICAgIiNGRkZGRkYiLAogICAgICAgICAgICAiI0NDRkZGRiIsCiAgICAgICAgICAgICIjQTVGRkZEIiwKICAgICAgICAgICAgIiM4NUY3RkIiLAogICAgICAgICAgICAiIzZFRDNFRiIsCiAgICAgICAgICAgICIjNTVBN0UwIiwKICAgICAgICAgICAgIiM0MTdGRDAiLAogICAgICAgICAgICAiIzI1NDVEMyIsCiAgICAgICAgICAgICIjMEIwMkUxIiwKICAgICAgICBdOwogICAgICAgIEludGVycG9sYXRlZENvbG9yLlBPU05FRyA9IFsKICAgICAgICAgICAgIiMwQjAyRTEiLAogICAgICAgICAgICAiIzI1NDVEMyIsCiAgICAgICAgICAgICIjNDE3RkQwIiwKICAgICAgICAgICAgIiM1NUE3RTAiLAogICAgICAgICAgICAiIzZFRDNFRiIsCiAgICAgICAgICAgICIjODVGN0ZCIiwKICAgICAgICAgICAgIiNBNUZGRkQiLAogICAgICAgICAgICAiI0NDRkZGRiIsCiAgICAgICAgICAgICIjRkZGRkZGIiwKICAgICAgICAgICAgIiNGRkY2RTEiLAogICAgICAgICAgICAiI0ZFRjRDMCIsCiAgICAgICAgICAgICIjRkVEOTc2IiwKICAgICAgICAgICAgIiNGRUIyNEMiLAogICAgICAgICAgICAiI0ZEOEQzQyIsCiAgICAgICAgICAgICIjRkM0RTJBIiwKICAgICAgICAgICAgIiNFMzFBMUMiLAogICAgICAgICAgICAiI0IxMDAyNiIsCiAgICAgICAgXTsKICAgICAgICByZXR1cm4gSW50ZXJwb2xhdGVkQ29sb3I7CiAgICB9KHNjYWxlLlNjYWxlKSk7CiAgICBleHBvcnRzLkludGVycG9sYXRlZENvbG9yID0gSW50ZXJwb2xhdGVkQ29sb3I7CiAgICB9KTsKCiAgICB2YXIgcXVhbnRpdGF0aXZlU2NhbGUgPSBjcmVhdGVDb21tb25qc01vZHVsZShmdW5jdGlvbiAobW9kdWxlLCBleHBvcnRzKSB7CiAgICAvKioKICAgICAqIENvcHlyaWdodCAyMDE0LXByZXNlbnQgUGFsYW50aXIgVGVjaG5vbG9naWVzCiAgICAgKiBAbGljZW5zZSBNSVQKICAgICAqLwogICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsKCgoKCgogICAgdmFyIFF1YW50aXRhdGl2ZVNjYWxlID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikgewogICAgICAgIHRzbGliX2VzNi5fX2V4dGVuZHMoUXVhbnRpdGF0aXZlU2NhbGUsIF9zdXBlcik7CiAgICAgICAgLyoqCiAgICAgICAgICogQSBRdWFudGl0YXRpdmVTY2FsZSBpcyBhIFNjYWxlIHRoYXQgbWFwcyBudW1iZXItbGlrZSB2YWx1ZXMgdG8gbnVtYmVycy4KICAgICAgICAgKiBJdCBpcyBpbnZlcnRpYmxlIGFuZCBjb250aW51b3VzLgogICAgICAgICAqCiAgICAgICAgICogQGNvbnN0cnVjdG9yCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gUXVhbnRpdGF0aXZlU2NhbGUoKSB7CiAgICAgICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMpIHx8IHRoaXM7CiAgICAgICAgICAgIF90aGlzLl90aWNrR2VuZXJhdG9yID0gZnVuY3Rpb24gKHNjYWxlKSB7IHJldHVybiBzY2FsZS5kZWZhdWx0VGlja3MoKTsgfTsKICAgICAgICAgICAgX3RoaXMuX3BhZFByb3BvcnRpb24gPSAwLjA1OwogICAgICAgICAgICBfdGhpcy5fc25hcHBpbmdEb21haW5FbmFibGVkID0gdHJ1ZTsKICAgICAgICAgICAgX3RoaXMuX3BhZGRpbmdFeGNlcHRpb25zUHJvdmlkZXJzID0gbmV3IHV0aWxzJDEuU2V0KCk7CiAgICAgICAgICAgIHJldHVybiBfdGhpczsKICAgICAgICB9CiAgICAgICAgUXVhbnRpdGF0aXZlU2NhbGUucHJvdG90eXBlLmF1dG9Eb21haW4gPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHRoaXMuX2RvbWFpbk1pbiA9IG51bGw7CiAgICAgICAgICAgIHRoaXMuX2RvbWFpbk1heCA9IG51bGw7CiAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUuYXV0b0RvbWFpbi5jYWxsKHRoaXMpOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIFF1YW50aXRhdGl2ZVNjYWxlLnByb3RvdHlwZS5hdXRvRG9tYWluSWZBdXRvbWF0aWNNb2RlID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICBpZiAodGhpcy5fZG9tYWluTWluICE9IG51bGwgJiYgdGhpcy5fZG9tYWluTWF4ICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3NldERvbWFpbihbdGhpcy5fZG9tYWluTWluLCB0aGlzLl9kb21haW5NYXhdKTsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICB2YXIgY29tcHV0ZWRFeHRlbnQgPSB0aGlzLl9nZXRFeHRlbnQoKTsKICAgICAgICAgICAgaWYgKHRoaXMuX2RvbWFpbk1pbiAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICB2YXIgbWF4VmFsdWUgPSBjb21wdXRlZEV4dGVudFsxXTsKICAgICAgICAgICAgICAgIGlmICh0aGlzLl9kb21haW5NaW4gPj0gbWF4VmFsdWUpIHsKICAgICAgICAgICAgICAgICAgICBtYXhWYWx1ZSA9IHRoaXMuX2V4cGFuZFNpbmdsZVZhbHVlRG9tYWluKFt0aGlzLl9kb21haW5NaW4sIHRoaXMuX2RvbWFpbk1pbl0pWzFdOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdGhpcy5fc2V0RG9tYWluKFt0aGlzLl9kb21haW5NaW4sIG1heFZhbHVlXSk7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHRoaXMuX2RvbWFpbk1heCAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICB2YXIgbWluVmFsdWUgPSBjb21wdXRlZEV4dGVudFswXTsKICAgICAgICAgICAgICAgIGlmICh0aGlzLl9kb21haW5NYXggPD0gbWluVmFsdWUpIHsKICAgICAgICAgICAgICAgICAgICBtaW5WYWx1ZSA9IHRoaXMuX2V4cGFuZFNpbmdsZVZhbHVlRG9tYWluKFt0aGlzLl9kb21haW5NYXgsIHRoaXMuX2RvbWFpbk1heF0pWzBdOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdGhpcy5fc2V0RG9tYWluKFttaW5WYWx1ZSwgdGhpcy5fZG9tYWluTWF4XSk7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgX3N1cGVyLnByb3RvdHlwZS5hdXRvRG9tYWluSWZBdXRvbWF0aWNNb2RlLmNhbGwodGhpcyk7CiAgICAgICAgfTsKICAgICAgICBRdWFudGl0YXRpdmVTY2FsZS5wcm90b3R5cGUuX2dldFVuYm91bmRlZEV4dGVudCA9IGZ1bmN0aW9uIChpZ25vcmVBdHRhY2hTdGF0ZSkgewogICAgICAgICAgICBpZiAoaWdub3JlQXR0YWNoU3RhdGUgPT09IHZvaWQgMCkgeyBpZ25vcmVBdHRhY2hTdGF0ZSA9IGZhbHNlOyB9CiAgICAgICAgICAgIHZhciBpbmNsdWRlZFZhbHVlcyA9IHRoaXMuX2dldEFsbEluY2x1ZGVkVmFsdWVzKGlnbm9yZUF0dGFjaFN0YXRlKTsKICAgICAgICAgICAgdmFyIGV4dGVudCA9IHRoaXMuX2RlZmF1bHRFeHRlbnQoKTsKICAgICAgICAgICAgaWYgKGluY2x1ZGVkVmFsdWVzLmxlbmd0aCAhPT0gMCkgewogICAgICAgICAgICAgICAgdmFyIGNvbWJpbmVkRXh0ZW50ID0gWwogICAgICAgICAgICAgICAgICAgIHV0aWxzJDEuTWF0aC5taW4oaW5jbHVkZWRWYWx1ZXMsIGV4dGVudFswXSksCiAgICAgICAgICAgICAgICAgICAgdXRpbHMkMS5NYXRoLm1heChpbmNsdWRlZFZhbHVlcywgZXh0ZW50WzFdKSwKICAgICAgICAgICAgICAgIF07CiAgICAgICAgICAgICAgICBleHRlbnQgPSB0aGlzLl9wYWREb21haW4oY29tYmluZWRFeHRlbnQpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBleHRlbnQ7CiAgICAgICAgfTsKICAgICAgICBRdWFudGl0YXRpdmVTY2FsZS5wcm90b3R5cGUuX2dldEV4dGVudCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIGV4dGVudCA9IHRoaXMuX2dldFVuYm91bmRlZEV4dGVudCgpOwogICAgICAgICAgICBpZiAodGhpcy5fZG9tYWluTWluICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIGV4dGVudFswXSA9IHRoaXMuX2RvbWFpbk1pbjsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5fZG9tYWluTWF4ICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIGV4dGVudFsxXSA9IHRoaXMuX2RvbWFpbk1heDsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gZXh0ZW50OwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogQWRkcyBhIHBhZGRpbmcgZXhjZXB0aW9uIHByb3ZpZGVyLgogICAgICAgICAqIElmIG9uZSBlbmQgb2YgdGhlIGRvbWFpbiBpcyBzZXQgdG8gYW4gZXhjZXB0ZWQgdmFsdWUgYXMgYSByZXN1bHQgb2YgYXV0b0RvbWFpbigpLWluZywKICAgICAgICAgKiB0aGF0IGVuZCBvZiB0aGUgZG9tYWluIHdpbGwgbm90IGJlIHBhZGRlZC4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7U2NhbGVzLlBhZGRpbmdFeGNlcHRpb25Qcm92aWRlcjxEPn0gcHJvdmlkZXIgVGhlIHByb3ZpZGVyIGZ1bmN0aW9uLgogICAgICAgICAqIEByZXR1cm5zIHtRdWFudGl0YXRpdmVTY2FsZX0gVGhlIGNhbGxpbmcgUXVhbnRpdGF0aXZlU2NhbGUuCiAgICAgICAgICovCiAgICAgICAgUXVhbnRpdGF0aXZlU2NhbGUucHJvdG90eXBlLmFkZFBhZGRpbmdFeGNlcHRpb25zUHJvdmlkZXIgPSB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b3BvcnRpb24gPCAwKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoInBhZFByb3BvcnRpb24gbXVzdCBiZSBub24tbmVnYXRpdmUiKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9wYWRQcm9wb3J0aW9uID0gcGFkUHJvcG9ydGlvbjsKICAgICAgICAgICAgdGhpcy5hdXRvRG9tYWluSWZBdXRvbWF0aWNNb2RlKCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgUXVhbnRpdGF0aXZlU2NhbGUucHJvdG90eXBlLl9wYWREb21haW4gPSBmdW5jdGlvbiAoZG9tYWluKSB7CiAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7CiAgICAgICAgICAgIGlmIChkb21haW5bMF0udmFsdWVPZigpID09PSBkb21haW5bMV0udmFsdWVPZigpKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fZXhwYW5kU2luZ2xlVmFsdWVEb21haW4oZG9tYWluKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5fcGFkUHJvcG9ydGlvbiA9PT0gMCkgewogICAgICAgICAgICAgICAgcmV0dXJuIGRvbWFpbjsKICAgICAgICAgICAgfQogICAgICAgICAgICB2YXIgcCA9IHRoaXMuX3BhZFByb3BvcnRpb24gLyAyOwogICAgICAgICAgICB2YXIgbWluID0gZG9tYWluWzBdOwogICAgICAgICAgICB2YXIgbWF4ID0gZG9tYWluWzFdOwogICAgICAgICAgICB2YXIgbWluRXhpc3RzSW5FeGNlcHRpb25zID0gZmFsc2U7CiAgICAgICAgICAgIHZhciBtYXhFeGlzdHNJbkV4Y2VwdGlvbnMgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5fcGFkZGluZ0V4Y2VwdGlvbnNQcm92aWRlcnMuZm9yRWFjaChmdW5jdGlvbiAocHJvdmlkZXIpIHsKICAgICAgICAgICAgICAgIHZhciB2YWx1ZXMgPSBwcm92aWRlcihfdGhpcyk7CiAgICAgICAgICAgICAgICB2YWx1ZXMuZm9yRWFjaChmdW5jdGlvbiAodmFsdWUpIHsKICAgICAgICAgICAgICAgICAgICBpZiAodmFsdWUudmFsdWVPZigpID09PSBtaW4udmFsdWVPZigpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG1pbkV4aXN0c0luRXhjZXB0aW9ucyA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGlmICh2YWx1ZS52YWx1ZU9mKCkgPT09IG1heC52YWx1ZU9mKCkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgbWF4RXhpc3RzSW5FeGNlcHRpb25zID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHZhciBvcmlnaW5hbERvbWFpbiA9IHRoaXMuX2JhY2tpbmdTY2FsZURvbWFpbigpOwogICAgICAgICAgICB0aGlzLl9iYWNraW5nU2NhbGVEb21haW4oZG9tYWluKTsKICAgICAgICAgICAgdmFyIG5ld01pbiA9IG1pbkV4aXN0c0luRXhjZXB0aW9ucyA/IG1pbiA6IHRoaXMuaW52ZXJ0KHRoaXMuc2NhbGUobWluKSAtICh0aGlzLnNjYWxlKG1heCkgLSB0aGlzLnNjYWxlKG1pbikpICogcCk7CiAgICAgICAgICAgIHZhciBuZXdNYXggPSBtYXhFeGlzdHNJbkV4Y2VwdGlvbnMgPyBtYXggOiB0aGlzLmludmVydCh0aGlzLnNjYWxlKG1heCkgKyAodGhpcy5zY2FsZShtYXgpIC0gdGhpcy5zY2FsZShtaW4pKSAqIHApOwogICAgICAgICAgICB0aGlzLl9iYWNraW5nU2NhbGVEb21haW4ob3JpZ2luYWxEb21haW4pOwogICAgICAgICAgICBpZiAodGhpcy5fc25hcHBpbmdEb21haW5FbmFibGVkKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fbmljZURvbWFpbihbbmV3TWluLCBuZXdNYXhdKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gKFtuZXdNaW4sIG5ld01heF0pOwogICAgICAgIH07CiAgICAgICAgUXVhbnRpdGF0aXZlU2NhbGUucHJvdG90eXBlLnNuYXBwaW5nRG9tYWluRW5hYmxlZCA9IGZ1bmN0aW9uIChzbmFwcGluZ0RvbWFpbkVuYWJsZWQpIHsKICAgICAgICAgICAgaWYgKHNuYXBwaW5nRG9tYWluRW5hYmxlZCA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fc25hcHBpbmdEb21haW5FbmFibGVkOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX3NuYXBwaW5nRG9tYWluRW5hYmxlZCA9IHNuYXBwaW5nRG9tYWluRW5hYmxlZDsKICAgICAgICAgICAgdGhpcy5hdXRvRG9tYWluSWZBdXRvbWF0aWNNb2RlKCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgUXVhbnRpdGF0aXZlU2NhbGUucHJvdG90eXBlLl9leHBhbmRTaW5nbGVWYWx1ZURvbWFpbiA9IGZ1bmN0aW9uIChzaW5nbGVWYWx1ZURvbWFpbikgewogICAgICAgICAgICByZXR1cm4gc2luZ2xlVmFsdWVEb21haW47CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBDb21wdXRlcyB0aGUgZG9tYWluIHZhbHVlIGNvcnJlc3BvbmRpbmcgdG8gYSBzdXBwbGllZCByYW5nZSB2YWx1ZS4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSB2YWx1ZTogQSB2YWx1ZSBmcm9tIHRoZSBTY2FsZSdzIHJhbmdlLgogICAgICAgICAqIEByZXR1cm5zIHtEfSBUaGUgZG9tYWluIHZhbHVlIGNvcnJlc3BvbmRpbmcgdG8gdGhlIHN1cHBsaWVkIHJhbmdlIHZhbHVlLgogICAgICAgICAqLwogICAgICAgIFF1YW50aXRhdGl2ZVNjYWxlLnByb3RvdHlwZS5pbnZlcnQgPSBmdW5jdGlvbiAodmFsdWUpIHsKICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCJTdWJjbGFzc2VzIHNob3VsZCBvdmVycmlkZSBpbnZlcnQiKTsKICAgICAgICB9OwogICAgICAgIFF1YW50aXRhdGl2ZVNjYWxlLnByb3RvdHlwZS5kb21haW4gPSBmdW5jdGlvbiAodmFsdWVzKSB7CiAgICAgICAgICAgIGlmICh2YWx1ZXMgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5fZG9tYWluTWluID0gdmFsdWVzWzBdOwogICAgICAgICAgICAgICAgdGhpcy5fZG9tYWluTWF4ID0gdmFsdWVzWzFdOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBfc3VwZXIucHJvdG90eXBlLmRvbWFpbi5jYWxsKHRoaXMsIHZhbHVlcyk7CiAgICAgICAgfTsKICAgICAgICBRdWFudGl0YXRpdmVTY2FsZS5wcm90b3R5cGUuZG9tYWluTWluID0gZnVuY3Rpb24gKGRvbWFpbk1pbikgewogICAgICAgICAgICBpZiAoZG9tYWluTWluID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmRvbWFpbigpWzBdOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2RvbWFpbk1pbiA9IGRvbWFpbk1pbjsKICAgICAgICAgICAgdGhpcy5hdXRvRG9tYWluSWZBdXRvbWF0aWNNb2RlKCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgUXVhbnRpdGF0aXZlU2NhbGUucHJvdG90eXBlLmRvbWFpbk1heCA9IGZ1bmN0aW9uIChkb21haW5NYXgpIHsKICAgICAgICAgICAgaWYgKGRvbWFpbk1heCA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5kb21haW4oKVsxXTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9kb21haW5NYXggPSBkb21haW5NYXg7CiAgICAgICAgICAgIHRoaXMuYXV0b0RvbWFpbklmQXV0b21hdGljTW9kZSgpOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIFF1YW50aXRhdGl2ZVNjYWxlLnByb3RvdHlwZS5leHRlbnRPZlZhbHVlcyA9IGZ1bmN0aW9uICh2YWx1ZXMpIHsKICAgICAgICAgICAgLy8gSEFDS0hBQ0s6IFRTMS40IGRvZXNuJ3QgY29uc2lkZXIgbnVtYmVycyB0byBiZSBOdW1iZXItbGlrZSAodmFsdWVPZigpIHJldHVybmluZyBudW1iZXIpLCBzbyBEIGNhbid0IGJlIHR5cGVkIGNvcnJlY3RseQogICAgICAgICAgICB2YXIgZXh0ZW50ID0gZDMuZXh0ZW50KHZhbHVlcy5maWx0ZXIoZnVuY3Rpb24gKHZhbHVlKSB7IHJldHVybiB1dGlscyQxLk1hdGguaXNWYWxpZE51bWJlcigrdmFsdWUpOyB9KSk7CiAgICAgICAgICAgIGlmIChleHRlbnRbMF0gPT0gbnVsbCB8fCBleHRlbnRbMV0gPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIFtdOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIGV4dGVudDsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgUXVhbnRpdGF0aXZlU2NhbGUucHJvdG90eXBlLnpvb20gPSBmdW5jdGlvbiAobWFnbmlmeUFtb3VudCwgY2VudGVyVmFsdWUpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgdmFyIG1hZ25pZnlUcmFuc2Zvcm0gPSBmdW5jdGlvbiAocmFuZ2VWYWx1ZSkgeyByZXR1cm4gX3RoaXMuaW52ZXJ0KHBhblpvb21Db25zdHJhaW50cy56b29tT3V0KHJhbmdlVmFsdWU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AgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLl9zZXREb21haW4uY2FsbCh0aGlzLCB2YWx1ZXMpOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogR2V0cyB0aGUgYXJyYXkgb2YgdGljayB2YWx1ZXMgZ2VuZXJhdGVkIGJ5IHRoZSBkZWZhdWx0IGFsZ29yaXRobS4KICAgICAgICAgKi8KICAgICAgICBRdWFudGl0YXRpdmVTY2FsZS5wcm90b3R5cGUuZGVmYXVsdFRpY2tzID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoIlN1YmNsYXNzZXMgc2hvdWxkIG92ZXJyaWRlIF9nZXREZWZhdWx0VGlja3MiKTsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIEdldHMgYW4gYXJyYXkgb2YgdGljayB2YWx1ZXMgc3Bhbm5pbmcgdGhlIGRvbWFpbi4KICAgICAgICAgKgogICAgICAgICAqIEByZXR1cm5zIHtEW119CiAgICAgICAgICovCiAgICAgICAgUXVhbnRpdGF0aXZlU2NhbGUucHJvdG90eXBlLnRpY2tzID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fdGlja0dlbmVyYXRvcih0aGlzKTsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIEdpdmVuIGEgZG9tYWluLCBleHBhbmRzIGl0cyBkb21haW4gb250byAibmljZSIgdmFsdWVzLCBlLmcuIHdob2xlCiAgICAgICAgICogbnVtYmVycy4KICAgICAgICAgKi8KICAgICAgICBRdWFudGl0YXRpdmVTY2FsZS5wcm90b3R5cGUuX25pY2VEb21haW4gPSBmdW5jdGlvbiAoZG9tYWluLCBjb3VudCkgewogICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoIlN1YmNsYXNzZXMgc2hvdWxkIG92ZXJyaWRlIF9uaWNlRG9tYWluIik7CiAgICAgICAgfTsKICAgICAgICBRdWFudGl0YXRpdmVTY2FsZS5wcm90b3R5cGUuX2RlZmF1bHRFeHRlbnQgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigiU3ViY2xhc3NlcyBzaG91bGQgb3ZlcnJpZGUgX2RlZmF1bHRFeHRlbnQiKTsKICAgICAgICB9OwogICAgICAgIFF1YW50aXRhdGl2ZVNjYWxlLnByb3RvdHlwZS50aWNrR2VuZXJhdG9yID0gZnVuY3Rpb24gKGdlbmVyYXRvcikgewogICAgICAgICAgICBpZiAoZ2VuZXJhdG9yID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl90aWNrR2VuZXJhdG9yOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fdGlja0dlbmVyYXRvciA9IGdlbmVyYXRvcjsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBRdWFudGl0YXRpdmVTY2FsZS5fREVGQVVMVF9OVU1fVElDS1MgPSAxMDsKICAgICAgICByZXR1cm4gUXVhbnRpdGF0aXZlU2NhbGU7CiAgICB9KHNjYWxlLlNjYWxlKSk7CiAgICBleHBvcnRzLlF1YW50aXRhdGl2ZVNjYWxlID0gUXVhbnRpdGF0aXZlU2NhbGU7CiAgICB9KTsKCiAgICB2YXIgbGluZWFyU2NhbGUgPSBjcmVhdGVDb21tb25qc01vZHVsZShmdW5jdGlvbiAobW9kdWxlLCBleHBvcnRzKSB7CiAgICAvKioKICAgICAqIENvcHlyaWdodCAyMDE0LXByZXNlbnQgUGFsYW50aXIgVGVjaG5vbG9naWVzCiAgICAgKiBAbGljZW5zZSBNSVQKICAgICAqLwogICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsKCgoKICAgIHZhciBMaW5lYXIgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7CiAgICAgICAgdHNsaWJfZXM2Ll9fZXh0ZW5kcyhMaW5lYXIsIF9zdXBlcik7CiAgICAgICAgLyoqCiAgICAgICAgICogQGNvbnN0cnVjdG9yCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gTGluZWFyKCkgewogICAgICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzKSB8fCB0aGlzOwogICAgICAgICAgICBfdGhpcy5fZDNTY2FsZSA9IGQzLnNjYWxlTGluZWFyKCk7CiAgICAgICAgICAgIHJldHVybiBfdGhpczsKICAgICAgICB9CiAgICAgICAgTGluZWFyLnByb3RvdHlwZS5fZGVmYXVsdEV4dGVudCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgcmV0dXJuIFswLCAxXTsKICAgICAgICB9OwogICAgICAgIExpbmVhci5wcm90b3R5cGUuX2V4cGFuZFNpbmdsZVZhbHVlRG9tYWluID0gZnVuY3Rpb24gKHNpbmdsZVZhbHVlRG9tYWluKSB7CiAgICAgICAgICAgIGlmIChzaW5nbGVWYWx1ZURvbWFpblswXSA9PT0gc2luZ2xlVmFsdWVEb21haW5bMV0pIHsKICAgICAgICAgICAgICAgIHJldHVybiBbc2luZ2xlVmFsdWVEb21haW5bMF0gLSAxLCBzaW5nbGVWYWx1ZURvbWFpblsxXSArIDFdOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBzaW5nbGVWYWx1ZURvbWFpbjsKICAgICAgICB9OwogICAgICAgIExpbmVhci5wcm90b3R5cGUuc2NhbGUgPSBmdW5jdGlvbiAodmFsdWUpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2QzU2NhbGUodmFsdWUpOwogICAgICAgIH07CiAgICAgICAgTGluZWFyLnByb3RvdHlwZS5zY2FsZVRyYW5zZm9ybWF0aW9uID0gZnVuY3Rpb24gKHZhbHVlKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLnNjYWxlKHZhbHVlKTsKICAgICAgICB9OwogICAgICAgIExpbmVhci5wcm90b3R5cGUuaW52ZXJ0ZWRUcmFuc2Zvcm1hdGlvbiA9IGZ1bmN0aW9uICh2YWx1ZSkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5pbnZlcnQodmFsdWUpOwogICAgICAgIH07CiAgICAgICAgTGluZWFyLnByb3RvdHlwZS5nZXRUcmFuc2Zvcm1hdGlvbkV4dGVudCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2dldFVuYm91bmRlZEV4dGVudCh0cnVlKTsKICAgICAgICB9OwogICAgICAgIExpbmVhci5wcm90b3R5cGUuZ2V0VHJhbnNmb3JtYXRpb25Eb21haW4gPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmRvbWFpbigpOwogICAgICAgIH07CiAgICAgICAgTGluZWFyLnByb3RvdHlwZS5zZXRUcmFuc2Zvcm1hdGlvbkRvbWFpbiA9IGZ1bmN0aW9uIChkb21haW4pIHsKICAgICAgICAgICAgdGhpcy5kb21haW4oZG9tYWluKTsKICAgICAgICB9OwogICAgICAgIExpbmVhci5wcm90b3R5cGUuX2dldERvbWFpbiA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2JhY2tpbmdTY2FsZURvbWFpbigpOwogICAgICAgIH07CiAgICAgICAgTGluZWFyLnByb3RvdHlwZS5fYmFja2luZ1NjYWxlRG9tYWluID0gZnVuY3Rpb24gKHZhbHVlcykgewogICAgICAgICAgICBpZiAodmFsdWVzID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9kM1NjYWxlLmRvbWFpbigpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fZDNTY2FsZS5kb21haW4odmFsdWVzKTsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBMaW5lYXIucHJvdG90eXBlLl9nZXRSYW5nZSA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2QzU2NhbGUucmFuZ2UoKTsKICAgICAgICB9OwogICAgICAgIExpbmVhci5wcm90b3R5cGUuX3NldFJhbmdlID0gZnVuY3Rpb24gKHZhbHVlcykgewogICAgICAgICAgICB0aGlzLl9kM1NjYWxlLnJhbmdlKHZhbHVlcyk7CiAgICAgICAgfTsKICAgICAgICBMaW5lYXIucHJvdG90eXBlLmludmVydCA9IGZ1bmN0aW9uICh2YWx1ZSkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fZDNTY2FsZS5pbnZlcnQodmFsdWUpOwogICAgICAgIH07CiAgICAgICAgTGluZWFyLnByb3RvdHlwZS5kZWZhdWx0VGlja3MgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9kM1NjYWxlLnRpY2tzKExpbmVhci5fREVGQVVMVF9OVU1fVElDS1MpOwogICAgICAgIH07CiAgICAgICAgTGluZWFyLnByb3RvdHlwZS5fbmljZURvbWFpbiA9IGZ1bmN0aW9uIChkb21haW4sIGNvdW50KSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9kM1NjYWxlLmNvcHkoKS5kb21haW4oZG9tYWluKS5uaWNlKGNvdW50KS5kb21haW4oKTsKICAgICAgICB9OwogICAgICAgIHJldHVybiBMaW5lYXI7CiAgICB9KHF1YW50aXRhdGl2ZVNjYWxlLlF1YW50aXRhdGl2ZVNjYWxlKSk7CiAgICBleHBvcnRzLkxpbmVhciA9IExpbmVhcjsKICAgIH0pOwoKICAgIHZhciBsb2dTY2FsZSA9IGNyZWF0ZUNvbW1vbmpzTW9kdWxlKGZ1bmN0aW9uIChtb2R1bGUsIGV4cG9ydHMpIHsKICAgIC8qKgogICAgICogQ29weXJpZ2h0IDIwMTQtcHJlc2VudCBQYWxhbnRpciBUZWNobm9sb2dpZXMKICAgICAqIEBsaWNlbnNlIE1JVAogICAgICovCiAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgIl9fZXNNb2R1bGUiLCB7IHZhbHVlOiB0cnVlIH0pOwoKCgogICAgdmFyIExvZyA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHsKICAgICAgICB0c2xpYl9lczYuX19leHRlbmRzKExvZywgX3N1cGVyKTsKICAgICAgICAvKioKICAgICAgICAgKiBAY29uc3RydWN0b3IKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBMb2coYmFzZSkgewogICAgICAgICAgICBpZiAoYmFzZSA9PT0gdm9pZCAwKSB7IGJhc2UgPSAxMDsgfQogICAgICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzKSB8fCB0aGlzOwogICAgICAgICAgICBfdGhpcy5fZDNTY2FsZSA9IGQzLnNjYWxlTG9nKCkuYmFzZShiYXNlKTsKICAgICAgICAgICAgX3RoaXMuX3NldERvbWFpbihfdGhpcy5fZGVmYXVsdEV4dGVudCgpKTsKICAgICAgICAgICAgcmV0dXJuIF90aGlzOwogICAgICAgIH0KICAgICAgICBMb2cucHJvdG90eXBlLl9kZWZhdWx0RXh0ZW50ID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICByZXR1cm4gWzEsIHRoaXMuX2QzU2NhbGUuYmFzZSgpXTsKICAgICAgICB9OwogICAgICAgIExvZy5wcm90b3R5cGUuX2V4cGFuZFNpbmdsZVZhbHVlRG9tYWluID0gZnVuY3Rpb24gKHNpbmdsZVZhbHVlRG9tYWluKSB7CiAgICAgICAgICAgIGlmIChzaW5nbGVWYWx1ZURvbWFpblswXSA9PT0gc2luZ2xlVmFsdWVEb21haW5bMV0pIHsKICAgICAgICAgICAgICAgIHJldHVybiBbc2luZ2xlVmFsdWVEb21haW5bMF0gLyB0aGlzLl9kM1NjYWxlLmJhc2UoKSwKICAgICAgICAgICAgICAgICAgICBzaW5nbGVWYWx1ZURvbWFpblsxXSAqIHRoaXMuX2QzU2NhbGUuYmFzZSgpXTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gc2luZ2xlVmFsdWVEb21haW47CiAgICAgICAgfTsKICAgICAgICBMb2cucHJvdG90eXBlLnNjYWxlID0gZnVuY3Rpb24gKHZhbHVlKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9kM1NjYWxlKHZhbHVlKTsKICAgICAgICB9OwogICAgICAgIExvZy5wcm90b3R5cGUuc2NhbGVUcmFuc2Zvcm1hdGlvbiA9IGZ1bmN0aW9uICh2YWx1ZSkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5zY2FsZSh2YWx1ZSk7CiAgICAgICAgfTsKICAgICAgICBMb2cucHJvdG90eXBlLmludmVydGVkVHJhbnNmb3JtYXRpb24gPSBmdW5jdGlvbiAodmFsdWUpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuaW52ZXJ0KHZhbHVlKTsKICAgICAgICB9OwogICAgICAgIExvZy5wcm90b3R5cGUuZ2V0VHJhbnNmb3JtYXRpb25FeHRlbnQgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9nZXRVbmJvdW5kZWRFeHRlbnQodHJ1ZSk7CiAgICAgICAgfTsKICAgICAgICBMb2cucHJvdG90eXBlLmdldFRyYW5zZm9ybWF0aW9uRG9tYWluID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5kb21haW4oKTsKICAgICAgICB9OwogICAgICAgIExvZy5wcm90b3R5cGUuc2V0VHJhbnNmb3JtYXRpb25Eb21haW4gPSBmdW5jdGlvbiAoZG9tYWluKSB7CiAgICAgICAgICAgIHRoaXMuZG9tYWluKGRvbWFpbik7CiAgICAgICAgfTsKICAgICAgICBMb2cucHJvdG90eXBlLl9nZXREb21haW4gPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9iYWNraW5nU2NhbGVEb21haW4oKTsKICAgICAgICB9OwogICAgICAgIExvZy5wcm90b3R5cGUuX2JhY2tpbmdTY2FsZURvbWFpbiA9IGZ1bmN0aW9uICh2YWx1ZXMpIHsKICAgICAgICAgICAgaWYgKHZhbHVlcyA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fZDNTY2FsZS5kb21haW4oKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuX2QzU2NhbGUuZG9tYWluKHZhbHVlcyk7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgTG9nLnByb3RvdHlwZS5fZ2V0UmFuZ2UgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9kM1NjYWxlLnJhbmdlKCk7CiAgICAgICAgfTsKICAgICAgICBMb2cucHJvdG90eXBlLl9zZXRSYW5nZSA9IGZ1bmN0aW9uICh2YWx1ZXMpIHsKICAgICAgICAgICAgdGhpcy5fZDNTY2FsZS5yYW5nZSh2YWx1ZXMpOwogICAgICAgIH07CiAgICAgICAgTG9nLnByb3RvdHlwZS5pbnZlcnQgPSBmdW5jdGlvbiAodmFsdWUpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2QzU2NhbGUuaW52ZXJ0KHZhbHVlKTsKICAgICAgICB9OwogICAgICAgIExvZy5wcm90b3R5cGUuZGVmYXVsdFRpY2tzID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fZDNTY2FsZS50aWNrcyhMb2cuX0RFRkFVTFRfTlVNX1RJQ0tTKTsKICAgICAgICB9OwogICAgICAgIExvZy5wcm90b3R5cGUuX25pY2VEb21haW4gPSBmdW5jdGlvbiAoZG9tYWluLCBjb3VudCkgewogICAgICA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A8IGJhc2UsIHNjYWxlKHgpIHdpbGwgYmVjb21lIG1vcmUgYW5kIG1vcmUKICAgICAgICAgKiBsaW5lYXIgYXMgaXQgYXBwcm9hY2hlcyAwLgogICAgICAgICAqCiAgICAgICAgICogQXQgeCA9PSAwLCBzY2FsZSh4KSA9PSAwLgogICAgICAgICAqCiAgICAgICAgICogRm9yIG5lZ2F0aXZlIHZhbHVlcywgc2NhbGUoLXgpID0gLXNjYWxlKHgpLgogICAgICAgICAqCiAgICAgICAgICogVGhlIHJhbmdlIGFuZCBkb21haW4gZm9yIHRoZSBzY2FsZSBzaG91bGQgYWxzbyBiZSBzZXQsIHVzaW5nIHRoZQogICAgICAgICAqIHJhbmdlKCkgYW5kIGRvbWFpbigpIGFjY2Vzc29ycywgcmVzcGVjdGl2ZWx5LgogICAgICAgICAqCiAgICAgICAgICogRm9yIGByYW5nZWAsIHByb3ZpZGUgYSB0d28tZWxlbWVudCBhcnJheSBnaXZpbmcgdGhlIG1pbmltdW0gYW5kCiAgICAgICAgICogbWF4aW11bSBvZiB2YWx1ZXMgcHJvZHVjZWQgd2hlbiBzY2FsaW5nLgogICAgICAgICAqCiAgICAgICAgICogRm9yIGBkb21haW5gIHByb3ZpZGUgYSB0d28tZWxlbWVudCBhcnJheSBnaXZpbmcgdGhlIG1pbmltdW0gYW5kCiAgICAgICAgICogbWF4aW11bSBvZiB0aGUgdmFsdWVzIHRoYXQgd2lsbCBiZSBzY2FsZWQuCiAgICAgICAgICoKICAgICAgICAgKiBAY29uc3RydWN0b3IKICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gW2Jhc2U9MTBdCiAgICAgICAgICogICAgICAgIFRoZSBiYXNlIG9mIHRoZSBsb2cuIE11c3QgYmUgPiAxLgogICAgICAgICAqCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gTW9kaWZpZWRMb2coYmFzZSkgewogICAgICAgICAgICBpZiAoYmFzZSA9PT0gdm9pZCAwKSB7IGJhc2UgPSAxMDsgfQogICAgICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzKSB8fCB0aGlzOwogICAgICAgICAgICBfdGhpcy5fbG9nVGlja0dlbmVyYXRvciA9IGZ1bmN0aW9uIChzY2FsZSkgewogICAgICAgICAgICAgICAgLy8gU2F5IHlvdXIgZG9tYWluIGlzIFstMTAwLCAxMDBdIGFuZCB5b3VyIHBpdm90IGlzIDEwLgogICAgICAgICAgICAgICAgLy8gdGhlbiB3ZSdyZSBnb2luZyB0byBkcmF3IG5lZ2F0aXZlIGxvZyB0aWNrcyBmcm9tIC0xMDAgdG8gLTEwLAogICAgICAgICAgICAgICAgLy8gbGluZWFyIHRpY2tzIGZyb20gLTEwIHRvIDEwLCBhbmQgcG9zaXRpdmUgbG9nIHRpY2tzIGZyb20gMTAgdG8gMTAwLgogICAgICAgICAgICAgICAgdmFyIG1pZGRsZSA9IGZ1bmN0aW9uICh4LCB5LCB6KSB7IHJldHVybiBbeCwgeSwgel0uc29ydChmdW5jdGlvbiAoYSwgYikgeyByZXR1cm4gYSAtIGI7IH0pWzFdOyB9OwogICAgICAgICAgICAgICAgdmFyIG1pbiA9IHV0aWxzJDEuTWF0aC5taW4oX3RoaXMuX3VudHJhbnNmb3JtZWREb21haW4sIDApOwogICAgICAgICAgICAgICAgdmFyIG1heCA9IHV0aWxzJDEuTWF0aC5tYXgoX3RoaXMuX3VudHJhbnNmb3JtZWREb21haW4sIDApOwogICAgICAgICAgICAgICAgdmFyIG5lZ2F0aXZlTG93ZXIgPSBtaW47CiAgICAgICAgICAgICAgICB2YXIgbmVnYXRpdmVVcHBlciA9IG1pZGRsZShtaW4sIG1heCwgLV90aGlzLl9waXZvdCk7CiAgICAgICAgICAgICAgICB2YXIgcG9zaXRpdmVMb3dlciA9IG1pZGRsZShtaW4sIG1heCwgX3RoaXMuX3Bpdm90KTsKICAgICAgICAgICAgICAgIHZhciBwb3NpdGl2ZVVwcGVyID0gbWF4OwogICAgICAgICAgICAgICAgdmFyI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AwLgogICAgICAgICAqLwogICAgICAgIE1vZGlmaWVkTG9nLnByb3RvdHlwZS5fYWRqdXN0ZWRMb2cgPSBmdW5jdGlvbiAoeCkgewogICAgICAgICAgICB2YXIgbmVnYXRpb25GYWN0b3IgPSB4IDwgMCA/IC0xIDogMTsKICAgICAgICAgICAgeCAqPSBuZWdhdGlvbkZhY3RvcjsKICAgICAgICAgICAgaWYgKHggPCB0aGlzLl9waXZvdCkgewogICAgICAgICAgICAgICAgeCArPSAodGhpcy5fcGl2b3QgLSB4KSAvIHRoaXMuX3Bpdm90OwogICAgICAgICAgICB9CiAgICAgICAgICAgIHggPSBNYXRoLmxvZyh4KSAvIE1hdGgubG9nKHRoaXMuX2Jhc2UpOwogICAgICAgICAgICB4ICo9IG5lZ2F0aW9uRmFjdG9yOwogICAgICAgICAgICByZXR1cm4geDsKICAgICAgICB9OwogICAgICAgIE1vZGlmaWVkTG9nLnByb3RvdHlwZS5faW52ZXJ0ZWRBZGp1c3RlZExvZyA9IGZ1bmN0aW9uICh4KSB7CiAgICAgICAgICAgIHZhciBuZWdhdGlvbkZhY3RvciA9IHggPCAwID8gLTEgOiAxOwogICAgICAgICAgICB4ICo9IG5lZ2F0aW9uRmFjdG9yOwogICAgICAgICAgICB4ID0gTWF0aC5wb3codGhpcy5fYmFzZSwgeCk7CiAgICAgICAgICAgIGlmICh4IDwgdGhpcy5fcGl2b3QpIHsKICAgICAgICAgICAgICAgIHggPSAodGhpcy5fcGl2b3QgKiAoeCAtIDEpKSAvICh0aGlzLl9waXZvdCAtIDEpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHggKj0gbmVnYXRpb25GYWN0b3I7CiAgICAgICAgICAgIHJldHVybiB4OwogICAgICAgIH07CiAgICAgICAgTW9kaWZpZWRMb2cucHJvdG90eXBlLnNjYWxlID0gZnVuY3Rpb24gKHgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2QzU2NhbGUodGhpcy5fYWRqdXN0ZWRMb2coeCkpOwogICAgICAgIH07CiAgICAgICAgTW9kaWZpZWRMb2cucHJvdG90eXBlLmludmVydCA9IGZ1bmN0aW9uICh4KSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9pbnZlcnRlZEFkanVzdGVkTG9nKHRoaXMuX2QzU2NhbGUuaW52ZXJ0KHgpKTsKICAgICAgICB9OwogICAgICAgIE1vZGlmaWVkTG9nLnByb3RvdHlwZS5zY2FsZVRyYW5zZm9ybWF0aW9uID0gZnVuY3Rpb24gKHZhbHVlKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLnNjYWxlKHZhbHVlKTsKICAgICAgICB9OwogICAgICAgIE1vZGlmaWVkTG9nLnByb3RvdHlwZS5pbnZlcnRlZFRyYW5zZm9ybWF0aW9uID0gZnVuY3Rpb24gKHZhbHVlKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmludmVydCh2YWx1ZSk7CiAgICAgICAgfTsKICAgICAgICBNb2RpZmllZExvZy5wcm90b3R5cGUuZ2V0VHJhbnNmb3JtYXRpb25FeHRlbnQgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9nZXRVbmJvdW5kZWRFeHRlbnQodHJ1ZSk7CiAgICAgICAgfTsKICAgICAgICBNb2RpZmllZExvZy5wcm90b3R5cGUuZ2V0VHJhbnNmb3JtYXRpb25Eb21haW4gPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmRvbWFpbigpOwogICAgICAgIH07CiAgICAgICAgTW9kaWZpZWRMb2cucHJvdG90eXBlLnNldFRyYW5zZm9ybWF0aW9uRG9tYWluID0gZnVuY3Rpb24gKGRvbWFpbikgewogICAgICAgICAgICB0aGlzLmRvbWFpbihkb21haW4pOwogICAgICAgIH07CiAgICAgICAgTW9kaWZpZWRMb2cucHJvdG90eXBlLl9nZXREb21haW4gPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl91bnRyYW5zZm9ybWVkRG9tYWluOwogICAgICAgIH07CiAgICAgICAgTW9kaWZpZWRMb2cucHJvdG90eXBlLl9zZXREb21haW4gPSBmdW5jdGlvbiAodmFsdWVzKSB7CiAgICAgICAgICAgIHRoaXMuX3VudHJhbnNmb3JtZWREb21haW4gPSB2YWx1ZXM7CiAgICAgICAgICAgIHZhciB0cmFuc2Zvcm1lZERvbWFpbiA9IFt0aGlzLl9hZGp1c3RlZExvZyh2YWx1ZXNbMF0pLCB0aGlzLl9hZGp1c3RlZExvZyh2YWx1ZXNbMV0pXTsKICAgICAgICAgICAgX3N1cGVyLnByb3RvdHlwZS5fc2V0RG9tYWluLmNhbGwodGhpcywgdHJhbnNmb3JtZWREb21haW4pOwogICAgICAgIH07CiAgICAgICAgTW9kaWZpZWRMb2cucHJvdG90eXBlLl9iYWNraW5nU2NhbGVEb21haW4gPSBmdW5jdGlvbiAodmFsdWVzKSB7CiAgICAgICAgICAgIGlmICh2YWx1ZXMgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2QzU2NhbGUuZG9tYWluKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLl9kM1NjYWxlLmRvbWFpbih2YWx1ZXMpOwogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybiBhbiBhcHByb3ByaWF0ZSBudW1iZXIgb2YgdGlja3MgZnJvbSBsb3dlciB0byB1cHBlci4KICAgICAgICAgKgogICAgICAgICAqIFRoaXMgd2lsbCBmaXJzdCB0cnkgdG8gZml0IGFzIG1hbnkgcG93ZXJzIG9mIHRoaXMuYmFzZSBhcyBpdCBjYW4gZnJvbQogICAgICAgICAqIGxvd2VyIHRvIHVwcGVyLgogICAgICAgICAqCiAgICAgICAgICogSWYgaXQgc3RpbGwgaGFzIHRpY2tzIGFmdGVyIHRoYXQ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gIE1vZGlmaWVkTG9nLnByb3RvdHlwZS5fZXhwYW5kU2luZ2xlVmFsdWVEb21haW4gPSBmdW5jdGlvbiAoc2luZ2xlVmFsdWVEb21haW4pIHsKICAgICAgICAgICAgaWYgKHNpbmdsZVZhbHVlRG9tYWluWzBdID09PSBzaW5nbGVWYWx1ZURvbWFpblsxXSkgewogICAgICAgICAgICAgICAgdmFyIHNpbmdsZVZhbHVlID0gc2luZ2xlVmFsdWVEb21haW5bMF07CiAgICAgICAgICAgICAgICBpZiAoc2luZ2xlVmFsdWUgPiAwKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFtzaW5nbGVWYWx1ZSAvIHRoaXMuX2Jhc2UsIHNpbmdsZVZhbHVlICogdGhpcy5fYmFzZV07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmIChzaW5nbGVWYWx1ZSA9PT0gMCkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBbLXRoaXMuX2Jhc2UsIHRoaXMuX2Jhc2VdOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFtzaW5nbGVWYWx1ZSAqIHRoaXMuX2Jhc2UsIHNpbmdsZVZhbHVlIC8gdGhpcy5fYmFzZV07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHNpbmdsZVZhbHVlRG9tYWluOwogICAgICAgIH07CiAgICAgICAgTW9kaWZpZWRMb2cucHJvdG90eXBlLl9nZXRSYW5nZSA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2QzU2NhbGUucmFuZ2UoKTsKICAgICAgICB9OwogICAgICAgIE1vZGlmaWVkTG9nLnByb3RvdHlwZS5fc2V0UmFuZ2UgPSBmdW5jdGlvbiAodmFsdWVzKSB7CiAgICAgICAgICAgIHRoaXMuX2QzU2NhbGUucmFuZ2Uodm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XApOwogICAgICAgICAgICB0ZW1wU2NhbGUuZG9tYWluKHRoaXMuZG9tYWluKCkpOwogICAgICAgICAgICB0ZW1wU2NhbGUucmFuZ2UodGhpcy5yYW5nZSgpKTsKICAgICAgICAgICAgcmV0dXJuIHRlbXBTY2FsZS50aWNrcyhkM0ludGVydmFsKTsKICAgICAgICB9OwogICAgICAgIFRpbWUucHJvdG90eXBlLl9zZXREb21haW4gPSBmdW5jdGlvbiAodmFsdWVzKSB7CiAgICAgICAgICAgIGlmICh2YWx1ZXNbMV0gPCB2YWx1ZXNbMF0pIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigiU2NhbGUuVGltZSBkb21haW4gdmFsdWVzIG11c3QgYmUgaW4gY2hyb25vbG9naWNhbCBvcmRlciIpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBfc3VwZXIucHJvdG90eXBlLl9zZXREb21haW4uY2FsbCh0aGlzLCB2YWx1ZXMpOwogICAgICAgIH07CiAgICAgICAgVGltZS5wcm90b3R5cGUuX2RlZmF1bHRFeHRlbnQgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHJldHVybiBbbmV3IERhdGUoIjE5NzAtMDEtMDEiKSwgbmV3IERhdGUoIjE5NzAtMDEtMDIiKV07CiAgICAgICAgfTsKICAgICAgICBUaW1lLnByb3RvdHlwZS5fZXhwYW5kU2luZ2xlVmFsdWVEb21haW4gPSBmdW5jdGlvbiAoc2luZ2xlVmFsdWVEb21haW4pIHsKICAgICAgICAgICAgdmFyIHN0YXJ0VGltZSA9IHNpbmdsZVZhbHVlRG9tYWluWzBdLmdldFRpbWUoKTsKICAgICAgICAgICAgdmFyIGVuZFRpbWUgPSBzaW5nbGVWYWx1ZURvbWFpblsxXS5nZXRUaW1lKCk7CiAgICAgICAgICAgIGlmIChzdGFydFRpbWUgPT09IGVuZFRpbWUpIHsKICAgICAgICAgICAgICAgIHZhciBzdGFydERhdGUgPSBuZXcgRGF0ZShzdGFydFRpbWUpOwogICAgICAgICAgICAgICAgc3RhcnREYXRlLnNldERhdGUoc3RhcnREYXRlLmdldERhdGUoKSAtIDEpOwogICAgICAgICAgICAgICAgdmFyIGVuZERhdGUgPSBuZXcgRGF0ZShlbmRUaW1lKTsKICAgICAgICAgICAgICAgIGVuZERhdGUuc2V0RGF0ZShlbmREYXRlLmdldERhdGUoKSArIDEpOwogICAgICAgICAgICAgICAgcmV0dXJuIFtzdGFydERhdGUsIGVuZERhdGVdOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBzaW5nbGVWYWx1ZURvbWFpbjsKICAgICAgICB9OwogICAgICAgIFRpbWUucHJvdG90eXBlLnNjYWxlID0gZnVuY3Rpb24gKHZhbHVlKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9kM1NjYWxlKHZhbHVlKTsKICAgICAgICB9OwogICAgICAgIFRpbWUucHJvdG90eXBlLnNjYWxlVHJhbnNmb3JtYXRpb24gPSBmdW5jdGlvbiAodmFsdWUpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuc2NhbGUobmV3IERhdGUodmFsdWUpKTsKICAgICAgICB9OwogICAgICAgIFRpbWUucHJvdG90eXBlLmludmVydGVkVHJhbnNmb3JtYXRpb24gPSBmdW5jdGlvbiAodmFsdWUpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuaW52ZXJ0KHZhbHVlKS5nZXRUaW1lKCk7CiAgICAgICAgfTsKICAgICAgICBUaW1lLnByb3RvdHlwZS5nZXRUcmFuc2Zvcm1hdGlvbkV4dGVudCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIGV4dGVudCA9IHRoaXMuX2dldFVuYm91bmRlZEV4dGVudCh0cnVlKTsKICAgICAgICAgICAgcmV0dXJuIFtleHRlbnRbMF0udmFsdWVPZigpLCBleHRlbnRbMV0udmFsdWVPZigpXTsKICAgICAgICB9OwogICAgICAgIFRpbWUucHJvdG90eXBlLmdldFRyYW5zZm9ybWF0aW9uRG9tYWluID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB2YXIgZGF0ZXMgPSB0aGlzLmRvbWFpbigpOwogICAgICAgICAgICByZXR1cm4gW2RhdGVzWzBdLnZhbHVlT2YoKSwgZGF0ZXNbMV0udmFsdWVPZigpXTsKICAgICAgICB9OwogICAgICAgIFRpbWUucHJvdG90eXBlLnNldFRyYW5zZm9ybWF0aW9uRG9tYWluID0gZnVuY3Rpb24gKF9hKSB7CiAgICAgICAgICAgIHZhciBkb21haW5NaW4gPSBfYVswXSwgZG9tYWluTWF4ID0gX2FbMV07CiAgICAgICAgICAgIHRoaXMuZG9tYWluKFtuZXcgRGF0ZShkb21haW5NaW4pLCBuZXcgRGF0ZShkb21haW5NYXgpXSk7CiAgICAgICAgfTsKICAgICAgICBUaW1lLnByb3RvdHlwZS5fZ2V0RG9tYWluID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fYmFja2luZ1NjYWxlRG9tYWluKCk7CiAgICAgICAgfTsKICAgICAgICBUaW1lLnByb3RvdHlwZS5fYmFja2luZ1NjYWxlRG9tYWluID0gZnVuY3Rpb24gKHZhbHVlcykgewogICAgICAgICAgICBpZiAodmFsdWVzID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9kM1NjYWxlLmRvbWFpbigpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fZDNTY2FsZS5kb21haW4odmFsdWVzKTsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBUaW1lLnByb3RvdHlwZS5fZ2V0UmFuZ2UgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9kM1NjYWxlLnJhbmdlKCk7CiAgICAgICAgfTsKICAgICAgICBUaW1lLnByb3RvdHlwZS5fc2V0UmFuZ2UgPSBmdW5jdGlvbiAodmFsdWVzKSB7CiAgICAgICAgICAgIHRoaXMuX2QzU2NhbGUucmFuZ2UodmFsdWVzKTsKICAgICAgICB9OwogICAgICAgIFRpbWUucHJvdG90eXBlLmludmVydCA9IGZ1bmN0aW9uICh2YWx1ZSkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fZDNTY2FsZS5pbnZlcnQodmFsdWUpOwogICAgICAgIH07CiAgICAgICAgVGltZS5wcm90b3R5cGUuZGVmYXVsdFRpY2tzID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fZDNTY2FsZS50aWNrcyhUaW1lLl9ERUZBVUxUX05VTV9USUNLUyk7CiAgICAgICAgfTsKICAgICAgICBUaW1lLnByb3RvdHlwZS5fbmljZURvbWFpbiA9IGZ1bmN0aW9uIChkb21haW4pIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2QzU2NhbGUuY29weSgpLmRvbWFpbihkb21haW4pLm5pY2UoKS5kb21haW4oKTsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIFRyYW5zZm9ybXMgdGhlIFBsb3R0YWJsZSBUaW1lSW50ZXJ2YWwgc3RyaW5nIGludG8gYSBkMyB0aW1lIGludGVydmFsIGVxdWl2YWxlbnQuCiAgICAgICAgICogSWYgdGhlIHByb3ZpZGVkIFRpbWVJbnRlcnZhbCBpcyBpbmNvcnJlY3QsIHRoZSBkZWZhdWx0IGlzIGQzLnRpbWVZZWFyCiAgICAgICAgICovCiAgICAgICAgVGltZS50aW1lSW50ZXJ2YWxUb0QzVGltZSA9IGZ1bmN0aW9uICh0aW1lSW50ZXJ2YWwsIHVzZVVUQykgewogICAgICAgICAgICBzd2l0Y2ggKHRpbWVJbnRlcnZhbCkgewogICAgICAgICAgICAgICAgY2FzZSB0aW1lQXhpcy5UaW1lSW50ZXJ2YWwuc2Vjb25kOgogICAgICAgICAgICAgICAgICAgIHJldHVybiB1c2VVVEMgPyBkMy51dGNTZWNvbmQgOiBkMy50aW1lU2Vjb25kOwogICAgICAgICAgICAgICAgY2FzZSB0aW1lQXhpcy5UaW1lSW50ZXJ2YWwubWludXRlOgogICAgICAgICAgICAgICAgICAgIHJldHVybiB1c2VVVEMgPyBkMy51dGNNaW51dGUgOiBkMy50aW1lTWludXRlOwogICAgICAgICAgICAgICAgY2FzZSB0aW1lQXhpcy5UaW1lSW50ZXJ2YWwuaG91cjoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdXNlVVRDID8gZDMudXRjSG91ciA6IGQzLnRpbWVIb3VyOwogICAgICAgICAgICAgICAgY2FzZSB0aW1lQXhpcy5UaW1lSW50ZXJ2YWwuZGF5OgogICAgICAgICAgICAgICAgICAgIHJldHVybiB1c2VVVEMgPyBkMy51dGNEYXkgOiBkMy50aW1lRGF5OwogICAgICAgICAgICAgICAgY2FzZSB0aW1lQXhpcy5UaW1lSW50ZXJ2YWwud2VlazoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdXNlVVRDID8gZDMudXRjV2VlayA6IGQzLnRpbWVXZWVrOwogICAgICAgICAgICAgICAgY2FzZSB0aW1lQXhpcy5UaW1lSW50ZXJ2YWwubW9udGg6CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVzZVVUQyA/IGQzLnV0Y01vbnRoIDogZDMudGltZU1vbnRoOwogICAgICAgICAgICAgICAgY2FzZSB0aW1lQXhpcy5UaW1lSW50ZXJ2YWwueWVhcjoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdXNlVVRDID8gZDMudXRjWWVhciA6IGQzLnRpbWVZZWFyOwogICAgICAgICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgICAgICAgICB0aHJvdyBFcnJvcigiVGltZUludGVydmFsIHNwZWNpZmllZCBkb2VzIG5vdCBleGlzdDogIiArIHRpbWVJbnRlcnZhbCk7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIHJldHVybiBUaW1lOwogICAgfShxdWFudGl0YXRpdmVTY2FsZS5RdWFudGl0Y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AgICAid2VlayIsCiAgICAgICAgIm1vbnRoIiwKICAgICAgICAieWVhciIsCiAgICBdKTsKICAgIC8qKgogICAgICogUG9zc2libGUgb3JpZW50YXRpb25zIGZvciBhIFRpbWUgQXhpcy4KICAgICAqLwogICAgZXhwb3J0cy5UaW1lQXhpc09yaWVudGF0aW9uID0gbWFrZUVudW1fMS5tYWtlRW51bShbInRvcCIsICJib3R0b20iXSk7CiAgICBleHBvcnRzLlRpZXJMYWJlbFBvc2l0aW9uID0gbWFrZUVudW1fMS5tYWtlRW51bShbImJldHdlZW4iLCAiY2VudGVyIl0pOwogICAgdmFyIFRpbWUgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7CiAgICAgICAgdHNsaWJfZXM2Ll9fZXh0ZW5kcyhUaW1lLCBfc3VwZXIpOwogICAgICAgIC8qKgogICAgICAgICAqIENvbnN0cnVjdHMgYSBUaW1lIEF4aXMuCiAgICAgICAgICoKICAgICAgICAgKiBBIFRpbWUgQXhpcyBpcyBhIHZpc3VhbCByZXByZXNlbnRhdGlvbiBvZiBhIFRpbWUgU2NhbGUuCiAgICAgICAgICoKICAgICAgICAgKiBAY29uc3RydWN0b3IKICAgICAgICAgKiBAcGFyYW0ge1NjYWxlcy5UaW1lfSBzY2FsZQogICAgICAgICAqIEBwYXJhbSB7QXhpc09yaWVudGF0aW9ufSBvcmllbnRhdGlvbiBPcmllbnRhdGlvbiBvZiB0aGlzIFRpbWUgQXhpcy4gVGltZSBBeGVzIGNhbiBvbmx5IGhhdmUgInRvcCIgb3IgImJvdHRvbSIKICAgICAgICAgKiBAcGFyYW0ge2Jvb2xlYW59IHVzZVVUQyBEaXNwbGF5cyBkYXRlIG9iamVjdCBpbiBVVEMgaWYgdHJ1ZSwgbG9jYWwgdGltZSBpZiBmYWxzZS4gRGVmYXVsdHMgdG8gZmFsc2UuCiAgICAgICAgICogb3JpZW50YXRpb25zLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIFRpbWUoc2NhbGUsIG9yaWVudGF0aW9uLCB1c2VVVEMpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcywgc2NhbGUsIG9yaWVudGF0aW9uKSB8fCB0aGlzOwogICAgICAgICAgICBfdGhpcy5fbWF4VGltZUludGVydmFsUHJlY2lzaW9uID0gbnVsbDsKICAgICAgICAgICAgX3RoaXMuX3RpZXJMYWJlbFBvc2l0aW9ucyA9IFtdOwogICAgICAgICAgICBfdGhpcy5fdXNlVVRDID0gdXNlVVRDOwogICAgICAgICAgICBfdGhpcy5hZGRDbGFzcygidGltZS1heGlzIik7CiAgICAgICAgICAgIF90aGlzLnRpY2tMYWJlbFBhZGRpbmcoNSk7CiAgICAgICAgICAgIF90aGlzLmF4aXNDb25maWd1cmF0aW9ucyhUaW1lLl9ERUZBVUxUX1RJTUVfQVhJU19DT05GSUdVUkFUSU9OUyhfdGhpcy5fdXNlVVRDKSk7CiAgICAgICAgICAgIF90aGlzLmFubm90YXRpb25Gb3JtYXR0ZXIoZm9ybWF0dGVycy50aW1lKCIlYSAlYiAlZCwgJVkiLCBfdGhpcy5fdXNlVVRDKSk7CiAgICAgICAgICAgIHJldHVybiBfdGhpczsKICAgICAgICB9CiAgICAgICAgVGltZS5wcm90b3R5cGUudGllckxhYmVsUG9zaXRpb25zID0gZnVuY3Rpb24gKG5ld1Bvc2l0aW9ucykgewogICAgICAgICAgICBpZiAobmV3UG9zaXRpb25zID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl90aWVyTGFiZWxQb3NpdGlvbnM7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBpZiAoIW5ld1Bvc2l0aW9ucy5ldmVyeShmdW5jdGlvbiAocG9zKSB7IHJldHVybiBwb3MudG9Mb3dlckNhc2UoKSA9PT0gImJldHdlZW4iIHx8IHBvcy50b0xvd2VyQ2FzZSgpID09PSAiY2VudGVyIjsgfSkpIHsKICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoIlVuc3VwcG9ydGVkIHBvc2l0aW9uIGZvciB0aWVyIGxhYmVscyIpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdGhpcy5fdGllckxhYmVsUG9zaXRpb25zID0gbmV3UG9zaXRpb25zOwogICAgICAgICAgICAgICAgdGhpcy5yZWRyYXcoKTsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBUaW1lLnByb3RvdHlwZS5tYXhUaW1lSW50ZXJ2YWxQcmVjaXNpb24gPSBmdW5jdGlvbiAobmV3UHJlY2lzaW9uKSB7CiAgICAgICAgICAgIGlmIChuZXdQcmVjaXNpb24gPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX21heFRpbWVJbnRlcnZhbFByZWNpc2lvbjsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuX21heFRpbWVJbnRlcnZhbFByZWNpc2lvbiA9IG5ld1ByZWNpc2lvbjsKICAgICAgICAgICAgICAgIHRoaXMucmVkcmF3KCk7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0dXJucyB0aGUgY3VycmVudCBgVGltZUF4aXNDb25maWd1cmF0aW9uYCB1c2VkIHRvIHJlbmRlciB0aGUgYXhlcy4KICAgICAgICAgKgogICAgICAgICAqIE5vdGUgdGhhdCB0aGlzIGlzIG9ubHkgdmFsaWQgYWZ0ZXIgdGhlIGF4aXMgaGFkIGJlZW4gcmVuZGVyZWQgYW5kIHRoZQogICAgICAgICAqIG1vc3QgcHJlY2lzZSB2YWxpZCBjb25maWd1cmF0aW9uIGlzIGRldGVybWluZWQgZnJvbSB0aGUgYXZhaWxhYmxlIHNwYWNlCiAgICAgICAgICogYW5kIG1heGltdW0gcHJlY2lzaW9uIGNvbnN0cmFpbnRzLgogICAgICAgICAqCiAgICAgICAgICogQHJldHVybnMge1RpbWVBeGlzQ29uZmlndXJhdGlvbn0gVGhlIGN1cnJlbnRseSB1c2VkIGBUaW1lQXhpc0NvbmZpZ3VyYXRpb25gIG9yIGB1bmRlZmluZWRgLgogICAgICAgICAqLwogICAgICAgIFRpbWUucHJvdG90eXBlLmN1cnJlbnRBeGlzQ29uZmlndXJhdGlvbiA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3Bvc3NpYmxlVGltZUF4aXNDb25maWd1cmF0aW9uc1t0aGlzLl9tb3N0UHJlY2lzZUNvbmZpZ0luZGV4XTsKICAgICAgICB9OwogICAgICAgIFRpbWUucHJvdG90eXBlLmF4aXNDb25maWd1cmF0aW9ucyA9IGZ1bmN0aW9uIChjb25maWd1cmF0aW9ucykgewogICAgICAgICAgICBpZiAoY29uZmlndXJhdGlvbnMgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3Bvc3NpYmxlVGltZUF4aXNDb25maWd1cmF0aW9uczsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9wb3NzaWJsZVRpbWVBeGlzQ29uZmlndXJhdGlvbnMgPSBjb25maWd1cmF0aW9uczsKICAgICAgICAgICAgdGhpcy5fbnVtVGllcnMgPSB1dGlscyQxLk1hdGgubWF4KHRoaXMuX3Bvc3NpYmxlVGltZUF4aXNDb25maWd1cmF0aW9ucy5tYXAoZnVuY3Rpb24gKGNvbmZpZykgeyByZXR1cm4gY29uZmlnLmxlbmd0aDsgfSksIDApOwogICAgICAgICAgICBpZiAodGhpcy5faXNBbmNob3JlZCkgewogICAgICAgICAgICAgICAgdGhpcy5fc2V0dXBEb21FbGVtZW50cygpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciBvbGRMYWJlbFBvc2l0aW9ucyA9IHRoaXMudGllckxhYmVsUG9zaXRpb25zKCk7CiAgICAgICAgICAgIHZhciBuZXdMYWJlbFBvc2l0aW9ucyA9IFtdOwogICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRoaXMuX251bVRpZXJzOyBpKyspIHsKICAgICAgICAgICAgICAgIG5ld0xhYmVsUG9zaXRpb25zLnB1c2gob2xkTGFiZWxQb3NpdGlvbnNbaV0gfHwgImJldHdlZW4iKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLnRpZXJMYWJlbFBvc2l0aW9ucyhuZXdMYWJlbFBvc2l0aW9ucyk7CiAgICAgICAgICAgIHRoaXMucmVkcmF3KCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogR2V0cyB0aGUgaW5kZXggb2YgdGhlIG1vc3QgcHJlY2lzZSBUaW1lQXhpc0NvbmZpZ3VyYXRpb24gdGhhdCB3aWxsIGZpdCBpbiB0aGUgY3VycmVudCB3aWR0aC4KICAgICAgICAgKi8KICAgICAgICBUaW1lLnByb3RvdHlwZS5fZ2V0TW9zdFByZWNpc2VDb25maWd1cmF0aW9uSW5kZXggPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7CiAgICAgICAgICAgIHZhciBtb3N0UHJlY2lzZUluZGV4ID0gdGhpcy5fcG9zc2libGVUaW1lQXhpc0NvbmZpZ3VyYXRpb25zLmxlbmd0aDsKICAgICAgICAgICAgdGhpcy5fcG9zc2libGVUaW1lQXhpc0NvbmZpZ3VyYXRpb25zLmZvckVhY2goZnVuY3Rpb24gKGludGVydmFsLCBpbmRleCkgewogICAgICAgICAgICAgICAgaWYgKGluZGV4IDwgbW9zdFByZWNpc2VJbmRleCAmJiBpbnRlcnZhbC5ldmVyeShmdW5jdGlvbiAodGllcikgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBfdGhpcy5fY2hlY2tUaW1lQXhpc1RpZXJDb25maWd1cmF0aW9uKHRpZXIpOwogICAgICAgICAgICAgICAgfSkpIHsKICAgICAgICAgICAgICAgICAgICBtb3N0UHJlY2lzZUluZGV4ID0gaW5kZXg7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBpZiAobW9zdFByZWNpc2VJbmRleCA9PT0gdGhpcy5fcG9zc2libGVUaW1lQXhpc0NvbmZpZ3VyYXRpb25zLmxlbmd0aCkgewogICAgICAgICAgICAgICAgdXRpbHMkMS5XaW5kb3cud2Fybigiem9vbWVkIG91dCB0b28gZmFyOiBjb3VsZCBub3QgZmluZCBzdWl0YWJsZSBpbnRlcnZhbCB0byBkaXNwbGF5IGxhYmVscyIpOwogICAgICAgICAgICAgICAgLS1tb3N0UHJlY2lzZUluZGV4OwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBtb3N0UHJlY2lzZUluZGV4OwogICAgICAgIH07CiAgICAgICAgVGltZS5wcm90b3R5cGUub3JpZW50YXRpb24gPSBmdW5jdGlvbiAob3JpZW50YXRpb24pIHsKICAgICAgICAgICAgaWYgKG9yaWVudGF0aW9uICYmIChvcmllbnRhdGlvbi50b0xvd2VyQ2FzZSgpID09PSAicmlnaHQiIHx8IG9yaWVudGF0aW9uLnRvTG93ZXJDYXNlKCkgPT09ICJsZWZ0IikpIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihvcmllbnRhdGlvbiArICIgaXMgbm90IGEgc3VwcG9ydGVkIG9yaWVudGF0aW9uIGZvciBUaW1lQXhpcyAtIG9ubHkgaG9yaXpvbnRhbCBvcmllbnRhdGlvbnMgYXJlIHN1cHBvcnRlZCIpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBfc3VwZXIucHJvdG90eXBlLm9yaWVudGF0aW9uLmNhbGwodGhpcywgb3JpZW50YXRpb24pOyAvLyBtYWludGFpbnMgZ2V0dGVyLXNldHRlciBmdW5jdGlvbmFsaXR5CiAgICAgICAgfTsKICAgICAgICBUaW1lLnByb3RvdHlwZS5fY29tcHV0ZUhlaWdodCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIHRleHRIZWlnaHQgPSB0aGlzLl9tZWFzdXJlci5tZWFzdXJlKCkuaGVpZ2h0OwogICAgICAgICAgICB0aGlzLl90aWVySGVpZ2h0cyA9IFtdOwogICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRoaXMuX251bVRpZXJzOyBpKyspIHsKICAgICAgICAgICAgICAgIHRoaXMuX3RpZXJIZWlnaHRzLnB1c2godGV4dEhlaWdodCArIHRoaXMudGlja0xhYmVsUGFkZGluZygpICsKICAgICAgICAgICAgICAgICAgICAoKHRoaXMuX3RpZXJMYWJlbFBvc2l0aW9uc1tpXSkgPT09ICJiZXR3ZWVuIiA/IDAgOiB0aGlzLl9tYXhMYWJlbFRpY2tMZW5ndGgoKSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBkMy5zdW0odGhpcy5fdGllckhlaWdodHMpOwogICAgICAgIH07CiAgICAgICAgVGltZS5wcm90b3R5cGUuX2dldEludGVydmFsTGVuZ3RoID0gZnVuY3Rpb24gKGNvbmZpZykgewogICAgICAgICAgICB2YXIgc3RhcnREYXRlID0gdGhpcy5fc2NhbGUuZG9tYWluKClbMF07CiAgICAgICAgICAgIHZhciBkM0ludGVydmFsID0gc2NhbGVzLlRpbWUudGltZUludGVydmFsVG9EM1RpbWUoY29uZmlnLmludGVydmFsLCB0aGlzLl91c2VVVEMpOwogICAgICAgICAgICB2YXIgZW5kRGF0ZSA9IGQzSW50ZXJ2YWwub2Zmc2V0KHN0YXJ0RGF0ZSwgY29uZmlnLnN0ZXApOwogICAgICAgICAgICBpZiAoZW5kRGF0ZSA+IHRoaXMuX3NjYWxlLmRvbWFpbigpWzFdKSB7CiAgICAgICAgICAgICAgICAvLyB0aGlzIG9mZnNldCBpcyB0b28gbGFyZ2UsIHNvIGp1c3QgcmV0dXJuIGF2YWlsYWJsZSB3aWR0aAogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMud2lkdGgoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBtZWFzdXJlIGhvdyBtdWNoIHNwYWNlIG9uZSBkYXRlIGNhbiBnZXQKICAgICAgICAgICAgdmFyIHN0ZXBMZW5ndGggPSBNYXRoLmFicyh0aGlzLl9zY2FsZS5zY2FsZShlbmREYXRlKSAtIHRoaXMuX3NjYWxlLnNjYWxlKHN0YXJ0RGF0ZSkpOwogICAgICAgICAgICByZXR1cm4gc3RlcExlbmd0aDsKICAgICAgICB9OwogICAgICAgIFRpbWUucHJvdG90eXBlLl9tYXhXaWR0aEZvckludGVydmFsID0gZnVuY3Rpb24gKGNvbmZpZykgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fbWVhc3VyZXIubWVhc3VyZShjb25maWcuZm9ybWF0dGVyKFRpbWUuX0xPTkdfREFURSkpLndpZHRoOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogQ2hlY2sgaWYgdGllciBjb25maWd1cmF0aW9uIGZpdHMgaW4gdGhlIGN1cnJlbnQgd2lkdGggYW5kIHNhdGlzZmllZCB0aGUKICAgICAgICAgKiBtYXggVGltZUludGVydmFsIHByZWNpc2lvbiBsaW1pdC4KICAgICAgICAgKi8KICAgICAgICBUaW1lLnByb3RvdHlwZS5fY2hlY2tUaW1lQXhpc1RpZXJDb25maWd1cmF0aW9uID0gZnVuY3Rpb24gKGNvbmZpZykgewogICAgICAgICAgICAvLyBVc2UgdGhlIHNvcnRlZCBpbmRleCB0byBkZXRlcm1pbmUgaWYgdGhlIHRlaXIgY29uZmlndXJhdGlvbiBjb250YWlucyBhCiAgICAgICAgICAgIC8vIHRpbWUgaW50ZXJ2YWwgdGhhdCBpcyB0b28gcHJlY2lzZSBmb3IgdGhlIG1heFRpbWVJbnRlcnZhbFByZWNpc2lvbgogICAgICAgICAgICAvLyBzZXR0aW5nIChpZiBzZXQpLgogICAgICAgICAgICBpZiAodGhpcy5fbWF4VGltZUludGVydmFsUHJlY2lzaW9uICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIHZhciBwcmVjaXNpb25MaW1pdCA9IFRpbWUuX1NPUlRFRF9USU1FX0lOVEVSVkFMX0lOREVYW3RoaXMuX21heFRpbWVJbnRlcnZhbFByZWNpc2lvbl07CiAgICAgICAgICAgICAgICB2YXIgY29uZmlnUHJlY2lzaW9uID0gVGltZS5fU09SVEVEX1RJTUVfSU5URVJWQUxfSU5ERVhbY29uZmlnLmludGVydmFsXTsKICAgICAgICAgICAgICAgIGlmIChwcmVjaXNpb25MaW1pdCAhPSBudWxsICYmIGNvbmZpZ1ByZWNpc2lvbiAhPSBudWxsICYmIGNvbmZpZ1ByZWNpc2lvbiA8IHByZWNpc2lvbkxpbWl0KSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciB3b3JzdFdpZHRoID0gdGhpcy5fbWF4V2lkdGhGb3JJbnRlcnZhbChjb25maWcpICsgMiAqIHRoaXMudGlja0xhYmVsUGFkZGluZygpOwogICAgICAgICAgICByZXR1cm4gTWF0aC5taW4odGhpcy5fZ2V0SW50ZXJ2YWxMZW5ndGgoY29uZmlnKSwgdGhpcy53aWR0aCgpKSA+PSB3b3JzdFdpZHRoOwogICAgICAgIH07CiAgICAgICAgVGltZS5wcm90b3R5cGUuX3NpemVGcm9tT2ZmZXIgPSBmdW5jdGlvbiAoYXZhaWxhYmxlV2lkdGgsIGF2YWlsYWJsZUhlaWdodCkgewogICAgICAgICAgICAvLyBNYWtlcyBzdXJlIHRoYXQgdGhlIHNpemUgaXQgcmVxdWlyZXMgaXMgYSBtdWx0aXBsZSBvZiB0aWVyIHNpemVzLCBzdWNoIHRoYXQKICAgICAgICAgICAgLy8gd2UgaGF2ZSBubyBsZWZ0b3ZlciB0aWVycwogICAgICAgICAgICB2YXIgc2l6ZSA9IF9zdXBlci5wcm90b3R5cGUuX3NpemVGcm9tT2ZmZXIuY2FsbCh0aGlzLCBhdmFpbGFibGVXaWR0aCwgYXZhaWxhYmxlSGVpZ2h0KTsKICAgICAgICAgICAgdmFyIHRpZXJIZWlnaHRzID0gdGhpcy5fdGllckhlaWdodHMucmVkdWNlKGZ1bmN0aW9uIChwcmV2VmFsdWUsIGN1cnJWYWx1ZSwgaW5kZXgsIGFycikgewogICAgICAgICAgICAgICAgcmV0dXJuIChwcmV2VmFsdWUgKyBjdXJyVmFsdWUgPiBzaXplLmhlaWdodCkgPyBwcmV2VmFsdWUgOiAocHJldlZhbHVlICsgY3VyclZhbHVlKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHZhciBub25Db3JlSGVpZ2h0ID0gdGhpcy5tYXJnaW4oKSArICh0aGlzLmFubm90YXRpb25zRW5hYmxlZCgpID8gdGhpcy5hbm5vdGF0aW9uVGllckNvdW50KCkgKiB0aGlzLl9hbm5vdGF0aW9uVGllckhlaWdodCgpIDogMCk7CiAgICAgICAgICAgIHNpemUuaGVpZ2h0ID0gTWF0aC5taW4oc2l6ZS5oZWlnaHQsIHRpZXJIZWlnaHRzICsgbm9uQ29yZUhlaWdodCk7CiAgICAgICAgICAgIHJldHVybiBzaXplOwogICAgICAgIH07CiAgICAgICAgVGltZS5wcm90b3R5cGUuX3NldHVwID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLl9zZXR1cC5jYWxsKHRoaXMpOwogICAgICAgICAgICB0aGlzLl9zZXR1cERvbUVsZW1lbnRzKCk7CiAgICAgICAgfTsKICAgICAgICBUaW1lLnByb3RvdHlwZS5fc2V0dXBEb21FbGVtZW50cyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdGhpcy5jb250ZW50KCkuc2VsZWN0QWxsKCIuIiArIFRpbWUuVElNRV9BWElTX1RJRVJfQ0xBU1MpLnJlbW92ZSgpOwogICAgICAgICAgICB0aGlzLl90aWVyTGFiZWxDb250YWluZXJzID0gW107CiAgICAgICAgICAgIHRoaXMuX3RpZXJNYXJrQ29udGFpbmVycyA9IFtdOwogICAgICAgICAgICB0aGlzLl90aWVyQmFzZWxpbmVzID0gW107CiAgICAgICAgICAgIHRoaXMuX3RpY2tMYWJlbENvbnRhaW5lci5yZW1vdmUoKTsKICAgICAgICAgICAgdGhpcy5fYmFzZWxpbmUucmVtb3ZlKCk7CiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdGhpcy5fbnVtVGllcnM7ICsraSkgewogICAgICAgICAgICAgICAgdmFyIHRpZXJDb250YWluZXIgPSB0aGlzLmNvbnRlbnQoKS5hcHBlbmQoImciKS5jbGFzc2VkKFRpbWUuVElNRV9BWElTX1RJRVJfQ0xBU1MsIHRydWUpOwogICAgICAgICAgICAgICAgdGhpcy5fdGllckxhYmVsQ29udGFpbmVycy5wdXNoKHRpZXJDb250YWluZXIuYXBwZW5kKCJnIikuY2xhc3NlZChheGlzJDIuQXhpcy5USUNLX0xBQkVMX0NMQVNTICsgIi1jb250YWluZXIiLCB0cnVlKSk7CiAgICAgICAgICAgICAgICB0aGlzLl90aWVyTWFya0NvbnRhaW5lcnMucHVzaCh0aWVyQ29udGFpbmVyLmFwcGVuZCgiZyIpLmNsYXNzZWQoYXhpcyQyLkF4aXMuVElDS19NQVJLX0NMQVNTICsgIi1jb250YWluZXIiLCB0cnVlKSk7CiAgICAgICAgICAgICAgICB0aGlzLl90aWVyQmFzZWxpbmVzLnB1c2godGllckNvbnRhaW5lci5hcHBlbmQoImxpbmUiKS5jbGFzc2VkKCJiYXNlbGluZSIsIHRydWUpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB2YXIgY29udGV4dCA9IG5ldyBzcmMkMS5TdmdDb250ZXh0KHRoaXMuX3RpZXJMYWJlbENvbnRhaW5lcnNbMF0ubm9kZSgpKTsKICAgICAgICAgICAgdGhpcy5fbWVhc3VyZXIgPSBuZXcgc3JjJDEuQ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ICAgICB0aGlzLl90aWVyQmFzZWxpbmVzW2luZGV4XS5zdHlsZSgidmlzaWJpbGl0eSIsICJoaWRkZW4iKTsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgVGltZS5wcm90b3R5cGUuX2dldFRpY2tWYWx1ZXNGb3JDb25maWd1cmF0aW9uID0gZnVuY3Rpb24gKGNvbmZpZykgewogICAgICAgICAgICB2YXIgdGlja1BvcyA9IHRoaXMuX3NjYWxlLnRpY2tJbnRlcnZhbChjb25maWcuaW50ZXJ2YWwsIGNvbmZpZy5zdGVwLCB0aGlzLl91c2VVVEMpOwogICAgICAgICAgICB2YXIgZG9tYWluID0gdGhpcy5fc2NhbGUuZG9tYWluKCk7CiAgICAgICAgICAgIHZhciB0aWNrUG9zVmFsdWVzID0gdGlja1Bvcy5tYXAoZnVuY3Rpb24gKGQpIHsgcmV0dXJuIGQudmFsdWVPZigpOyB9KTsgLy8gY2FuJ3QgaW5kZXhPZiB3aXRoIG9iamVjdHMKICAgICAgICAgICAgaWYgKHRpY2tQb3NWYWx1ZXMuaW5kZXhPZihkb21haW5bMF0udmFsdWVPZigpKSA9PT0gLTEpIHsKICAgICAgICAgICAgICAgIHRpY2tQb3MudW5zaGlmdChkb21haW5bMF0pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0aWNrUG9zVmFsdWVzLmluZGV4T2YoZG9tYWluWzFdLnZhbHVlT2YoKSkgPT09IC0xKSB7CiAgICAgICAgICAgICAgICB0aWNrUG9zLnB1c2goZG9tYWluWzFdKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGlja1BvczsKICAgICAgICB9OwogICAgICAgIFRpbWUucHJvdG90eXBlLl9yZW5kZXJUaWVyTGFiZWxzID0gZnVuY3Rpb24gKGNvbnRhaW5lciwgY29uZmlnLCBpbmRleCkgewogICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwogICAgICAgICAgICB2YXIgdGlja1BvcyA9IHRoaXMuX2dldFRpY2tWYWx1ZXNGb3JDb25maWd1cmF0aW9uKGNvbmZpZyk7CiAgICAgICAgICAgIHZhciBsYWJlbFBvcyA9IFtdOwogICAgICAgICAgICBpZiAodGhpcy5fdGllckxhYmVsUG9zaXRpb25zW2luZGV4XSA9PT0gImJldHdlZW4iICYmIGNvbmZpZy5zdGVwID09PSAxKSB7CiAgICAgICAgICAgICAgICB0aWNrUG9zLm1hcChmdW5jdGlvbiAoZGF0dW0sIGkpIHsKICAgICAgICAgICAgICAgICAgICBpZiAoaSArIDEgPj0gdGlja1Bvcy5sZW5ndGgpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBsYWJlbFBvcy5wdXNoKG5ldyBEYXRlKCh0aWNrUG9zW2kgKyAxXS52YWx1ZU9mKCkgLSB0aWNrUG9zW2ldLnZhbHVlT2YoKSkgLyAyICsgdGlja1Bvc1tpXS52YWx1ZU9mKCkpKTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgbGFiZWxQb3MgPSB0aWNrUG9zOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciB0aWNrTGFiZWxzVXBkYXRlID0gY29udGFpbmVyLnNlbGVjdEFsbCgiLiIgKyBheGlzJDIuQXhpcy5USUNLX0xBQkVMX0NMQVNTKS5kYXRhKGxhYmVsUG9zLCBmdW5jdGlvbiAoZCkgeyByZXR1cm4gU3RyaW5nKGQudmFsdWVPZigpKTsgfSk7CiAgICAgICAgICAgIHZhciB0aWNrTGFiZWxzRW50ZXIgPSB0aWNrTGFiZWxzVXBkYXRlCiAgICAgICAgICAgICAgICAuZW50ZXIoKQogICAgICAgICAgICAgICAgLmFwcGVuZCgiZyIpCiAgICAgICAgICAgICAgICAuY2xhc3NlZChheGlzJDIuQXhpcy5USUNLX0xBQkVMX0NMQVNTLCB0cnVlKTsKICAgICAgICAgICAgdGlja0xhYmVsc0VudGVyLmFwcGVuZCgidGV4dCIpOwogICAgICAgICAgICB2YXIgeFRyYW5zbGF0ZSA9ICh0aGlzLl90aWVyTGFiZWxQb3NpdGlvbnNbaW5kZXhdID09PSAiY2VudGVyIiB8fCBjb25maWcuc3RlcCA9PT0gMSkgPyAwIDogdGhpcy50aWNrTGFiZWxQYWRkaW5nKCk7CiAgICAgICAgICAgIHZhciB5VHJhbnNsYXRlOwogICAgICAgICAgICBpZiAodGhpcy5vcmllbnRhdGlvbigpID09PSAiYm90dG9tIikgewogICAgICAgICAgICAgICAgeVRyYW5zbGF0ZSA9IGQzLnN1bSh0aGlzLl90aWVySGVpZ2h0cy5zbGljZSgwLCBpbmRleCArIDEpKSAtIHRoaXMudGlja0xhYmVsUGFkZGluZygpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgaWYgKHRoaXMuX3RpZXJMYWJlbFBvc2l0aW9uc1tpbmRleF0gPT09ICJjZW50ZXIiKSB7CiAgICAgICAgICAgICAgICAgICAgeVRyYW5zbGF0ZSA9IHRoaXMuaGVpZ2h0KCkgLSBkMy5zdW0odGhpcy5fdGllckhlaWdodHMuc2xpY2UoMCwgaW5kZXgpKSAtIHRoaXMudGlja0xhYmVsUGFkZGluZygpIC0gdGhpcy5fbWF4TGFiZWxUaWNrTGVuZ3RoKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICB5VHJhbnNsYXRlID0gdGhpcy5oZWlnaHQoKSAtIGQzLnN1bSh0aGlzLl90aWVySGVpZ2h0cy5zbGljZSgwLCBpbmRleCkpIC0gdGhpcy50aWNrTGFiZWxQYWRkaW5nKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIHRpY2tMYWJlbHMgPSB0aWNrTGFiZWxzVXBkYXRlLm1lcmdlKHRpY2tMYWJlbHNF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mtzVXBkYXRlCiAgICAgICAgICAgICAgICAuZW50ZXIoKQogICAgICAgICAgICAgICAgLmFwcGVuZCgibGluZSIpCiAgICAgICAgICAgICAgICAuY2xhc3NlZChheGlzJDIuQXhpcy5USUNLX01BUktfQ0xBU1MsIHRydWUpCiAgICAgICAgICAgICAgICAubWVyZ2UodGlja01hcmtzVXBkYXRlKTsKICAgICAgICAgICAgdmFyIGF0dHIgPSB0aGlzLl9nZW5lcmF0ZVRpY2tNYXJrQXR0ckhhc2goKTsKICAgICAgICAgICAgdmFyIG9mZnNldCA9IHRoaXMuX3RpZXJIZWlnaHRzLnNsaWNlKDAsIGluZGV4KS5yZWR1Y2UoZnVuY3Rpb24gKHRyYW5zbGF0ZSwgaGVpZ2h0KSB7IHJldHVybiB0cmFuc2xhdGUgKyBoZWlnaHQ7IH0sIDApOwogICAgICAgICAgICBpZiAodGhpcy5vcmllbnRhdGlvbigpID09PSAiYm90dG9tIikgewogICAgICAgICAgICAgICAgYXR0clsieTEiXSA9IG9mZnNldDsKICAgICAgICAgICAgICAgIGF0dHJbInkyIl0gPSBvZmZzZXQgKyAodGhpcy5fdGllckxhYmVsUG9zaXRpb25zW2luZGV4XSA9PT0gImNlbnRlciIgPyB0aGlzLmlubmVyVGlja0xlbmd0aCgpIDogdGhpcy5fdGllckhlaWdodHNbaW5kZXhdKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIGF0dHJbInkxIl0gPSB0aGlzLmhlaWdodCgpIC0gb2Zmc2V0OwogICAgICAgICAgICAgICAgYXR0clsieTIiXSA9IHRoaXMuaGVpZ2h0KCkgLSAob2Zmc2V0ICsgKHRoaXMuX3RpZXJMYWJlbFBvc2l0aW9uc1tpbmRleF0gPT09ICJjZW50ZXIiID8KICAgICAgICAgICAgICAgICAgICB0aGlzLmlubmVyVGlja0xlbmd0aCgpIDogdGhpcy5fdGllckhlaWdodHNbaW5kZXhdKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGlja01hcmtzLmF0dHJzKGF0dHIpOwogICAgICAgICAgICBpZiAodGhpcy5vcmllbnRhdGlvbigpID09PSAiYm90dG9tIikgewogICAgICAgICAgICAgICAgYXR0clsieTEiXSA9IG9mZnNldDsKICAgICAgICAgICAgICAgIGF0dHJbInkyIl0gPSBvZmZzZXQgKyAodGhpcy5fdGllckxhYmVsUG9zaXRpb25zW2luZGV4XSA9PT0gImNlbnRlciIgPyB0aGlzLmVuZFRpY2tMZW5ndGgoKSA6IHRoaXMuX3RpZXJIZWlnaHRzW2luZGV4XSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBhdHRyWyJ5MSJdID0gdGhpcy5oZWlnaHQoKSAtIG9mZnNldDsKICAgICAgICAgICAgICAgIGF0dHJbInkyIl0gPSB0aGlzLmhlaWdodCgpIC0gKG9mZnNldCArICh0aGlzLl90aWVyTGFiZWxQb3NpdGlvbnNbaW5kZXhdID09PSAiY2VudGVyIiA/CiAgICAgICAgICAgICAgICAgICAgdGhpcy5lbmRUaWNrTGVuZ3RoKCkgOiB0aGlzLl90aWVySGVpZ2h0c1tpbmRleF0pKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBkMy5zZWxlY3QodGlja01hcmtzLm5vZGVzKClbMF0pLmF0dHJzKGF0dHIpOwogICAgICAgICAgICBkMy5zZWxlY3QodGlja01hcmtzLm5vZGVzKClbdGlja01hcmtzLnNpemUoKSAtIDFdKS5hdHRycyhhdHRyKTsKICAgICAgICAgICAgLy8gQWRkIGVuZC10aWNrIGNsYXNzZXMgdG8gZmlyc3QgYW5kIGxhc3QgdGljayBmb3IgQ1NTIGN1c3RvbWl6YXRpb24gcHVycG9zZXMKICAgICAgICAgICAgZDMuc2VsZWN0KHRpY2tNYXJrcy5ub2RlcygpWzBdKS5jbGFzc2VkKGF4aXMkMi5BeGlzLkVORF9USUNLX01BUktfQ0xBU1MsIHRydWUpOwogICAgICAgICAgICBkMy5zZWxlY3QodGlja01hcmtzLm5vZGVzKClbdGlja01hcmtzLnNpemUoKSAtIDFdKS5jbGFzc2VkKGF4aXMkMi5BeGlzLkVORF9USUNLX01BUktfQ0xBU1MsIHRydWUpOwogICAgICAgICAgICB0aWNrTWFya3NVcGRhdGUuZXhpdCgpLnJlbW92ZSgpOwogICAgICAgIH07CiAgICAgICAgVGltZS5wcm90b3R5cGUuX3JlbmRlckxhYmVsbGVzc1RpY2tNYXJrcyA9IGZ1bmN0aW9uICh0aWNrVmFsdWVzKSB7CiAgICAgICAgICAgIHZhciB0aWNrTWFya3NVcGRhdGUgPSB0aGlzLl90aWNrTWFya0NvbnRhaW5lci5zZWxlY3RBbGwoIi4iICsgYXhpcyQyLkF4aXMuVElDS19NQVJLX0NMQVNTKS5kYXRhKHRpY2tWYWx1ZXMpOwogICAgICAgICAgICB2YXIgdGlja01hcmtzID0gdGlja01hcmtzVXBkYXRlCiAgICAgICAgICAgICAgICAuZW50ZXIoKQogICAgICAgICAgICAgICAgLmFwcGVuZCgibGluZSIpCiAgICAgICAgICAgICAgICAuY2xhc3NlZChheGlzJDIuQXhpcy5USUNLX01BUktfQ0xBU1MsIHRydWUpCiAgICAgICAgICAgICAgICAubWVyZ2UodGlja01hcmtzVXBkYXRlKTsKICAgICAgICAgICAgdmFyIGF0dHIgPSB0aGlzLl9nZW5lcmF0ZVRpY2tNYXJrQXR0ckhhc2goKTsKICAgICAgICAgICAgYXR0clsieTIiXSA9ICh0aGlzLm9yaWVudGF0aW9uKCkgPT09ICJib3R0b20iKSA/IHRoaXMudGlja0xhYmVsUGFkZGluZygpIDogdGhpcy5oZWlnaHQoKSAtIHRoaXMudGlja0xhYmVsUGFkZGluZygpOwogICAgICAgICAgICB0aWNrTWFya3MuYXR0cnMoYXR0cik7CiAgICAgICAgICAgIHRpY2tNYXJrc1VwZGF0ZS5leGl0KCkucmVtb3ZlKCk7CiAgICAgICAgfTsKICAgICAgICBUaW1lLnByb3RvdHlwZS5fZ2VuZXJhdGVMYWJlbGxlc3NUaWNrcyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX21vc3RQcmVjaXNlQ29uZmlnSW5kZXggPCAxKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gW107CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2dldFRpY2tJbnRlcnZhbFZhbHVlcyh0aGlzLl9wb3NzaWJsZVRpbWVBeGlzQ29uZmlndXJhdGlvbnNbdGhpcy5fbW9zdFByZWNpc2VDb25maWdJbmRleCAtIDFdWzBdKTsKICAgICAgICB9OwogICAgICAgIFRpbWUucHJvdG90eXBlLnJlbmRlckltbWVkaWF0ZWx5ID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwogICAgICAgICAgICB0aGlzLl9tb3N0UHJlY2lzZUNvbmZpZ0luZGV4ID0gdGhpcy5fZ2V0TW9zdFByZWNpc2VDb25maWd1cmF0aW9uSW5kZXgoKTsKICAgICAgICAgICAgdmFyIHRpZXJDb25maWdzID0gdGhpcy5fcG9zc2libGVUaW1lQXhpc0NvbmZpZ3VyYXRpb25zW3RoaXMuX21vc3RQcmVjaXNlQ29uZmlnSW5kZXhdOwogICAgICAgICAgICB0aGlzLl9jbGVhblRpZXJzKCk7CiAgICAgICAgICAgIHRpZXJDb25maWdzLmZvckVhY2goZnVuY3Rpb24gKGNvbmZpZywgaSkgewogICAgICAgICAgICAgICAgcmV0dXJuIF90aGlzLl9yZW5kZXJUaWVyTGFiZWxzKF90aGlzLl90aWVyTGFiZWxDb250YWluZXJzW2ldLCBjb25maWcsIGkpOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdmFyIHRpZXJUaWNrcyA9IHRpZXJDb25maWdzLm1hcChmdW5jdGlvbiAoY29uZmlnLCBpKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gX3RoaXMuX2dldFRpY2tWYWx1ZXNGb3JDb25maWd1cmF0aW9uKGNvbmZpZyk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICB2YXIgYmFzZWxpbmVPZmZzZXQgPSAwOwogICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IE1hdGgubWF4KHRpZXJDb25maWdzLmxlbmd0aCwgMSk7ICsraSkgewogICAgICAgICAgICAgICAgdmFyIGF0dHIgPSB0aGlzLl9nZW5lcmF0ZUJhc2VsaW5lQXR0ckhhc2goKTsKICAgICAgICAgICAgICAgIGF0dHJbInkxIl0gKz0gKHRoaXMub3JpZW50YXRpb24oKSA9PT0gImJvdHRvbSIpID8gYmFzZWxpbmVPZmZzZXQgOiAtYmFzZWxpbmVPZmZzZXQ7CiAgICAgICAgICAgICAgICBhdHRyWyJ5MiJdID0gYXR0clsieTEiXTsKICAgICAgICAgICAgICAgIHRoaXMuX3RpZXJCYXNlbGluZXNbaV0uYXR0cnMoYXR0cikuc3R5bGUoInZpc2liaWxpdHkiLCAiaW5oZXJpdCIpOwogICAgICAgICAgICAgICAgYmFzZWxpbmVPZmZzZXQgKz0gdGhpcy5fdGllckhlaWdodHNbaV07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIGxhYmVsTGVzc1RpY2tzID0gW107CiAgICAgICAgICAgIHZhciBkb21haW4gPSB0aGlzLl9zY2FsZS5kb21haW4oKTsKICAgICAgICAgICAgdmFyIHRvdGFsTGVuZ3RoID0gdGhpcy5fc2NhbGUuc2NhbGUoZG9tYWluWzFdKSAtIHRoaXMuX3NjYWxlLnNjYWxlKGRvbWFpblswXSk7CiAgICAgICAgICAgIGlmICh0aGlzLl9nZXRJbnRlcnZhbExlbmd0aCh0aWVyQ29uZmlnc1swXSkgKiAxLjUgPj0gdG90YWxMZW5ndGgpIHsKICAgICAgICAgICAgICAgIGxhYmVsTGVzc1RpY2tzID0gdGhpcy5fZ2VuZXJhdGVMYWJlbGxlc3NUaWNrcygpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX3JlbmRlckxhYmVsbGVzc1RpY2tNYXJrcyhsYWJlbExlc3NUaWNrcyk7CiAgICAgICAgICAgIHRoaXMuX2hpZGVPdmVyZmxvd2luZ1RpZXJzKCk7CiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdGllckNvbmZpZ3MubGVuZ3RoOyArK2kpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3JlbmRlclRpY2tNYXJrcyh0aWVyVGlja3NbaV0sIGkpOwogICAgICAgICAgICAgICAgdGhpcy5faGlkZU92ZXJsYXBwaW5nQW5kQ3V0T2ZmTGFiZWxzKGkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0aGlzLmFubm90YXRpb25zRW5hYmxlZCgpKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9kcmF3QW5ub3RhdGlvbnMoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuX3JlbW92ZUFubm90YXRpb25zKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBUaW1lLnByb3RvdHlwZS5faGlkZU92ZXJmbG93aW5nVGllcnMgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7CiAgICAgICAgICAgIHZhciBhdmFpbGFibGVIZWlnaHQgPSB0aGlzLmhlaWdodCgpOwogICAgICAgICAgICB2YXIgdXNlZEhlaWdodCA9IDA7CiAgICAgICAgICAgIHRoaXMuY29udGVudCgpCiAgICAgICAgICAgICAgICAuc2VsZWN0QWxsKCIuIiArIFRpbWUuVElNRV9BWElTX1RJRVJfQ0xBU1MpCiAgICAgICAgICAgICAgICAuYXR0cigidmlzaWJpbGl0eSIsIGZ1bmN0aW9uIChkLCBpKSB7CiAgICAgICAgICAgICAgICB1c2VkSGVpZ2h0ICs9IF90aGlzLl90aWVySGVpZ2h0c1tpXTsKICAgICAgICAgICAgICAgIHJldHVybiB1c2VkSGVpZ2h0IDw9IGF2YWlsYWJsZUhlaWdodCA/ICJpbmhlcml0IiA6ICJoaWRkZW4iOwogICAgICAgICAgICB9KTsKICAgICAgICB9OwogICAgICAgIFRpbWUucHJvdG90eXBlLl9oaWRlT3ZlcmxhcHBpbmdBbmRDdXRPZmZMYWJlbHMgPSBmdW5jdGlvbiAoaW5kZXgpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgdmFyIGJvdW5kaW5nQm94ID0gdGhpcy5lbGVtZW50KCkubm9kZSgpLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpOwogICAgICAgICAgICB2YXIgaXNJbnNpZGVCQm94ID0gZnVuY3Rpb24gKHRpY2tCb3gpIHsKICAgICAgICAgICAgICAgIHJldHVybiAoTWF0aC5mbG9vcihib3VuZGluZ0JveC5sZWZ0KSA8PSBNYXRoLmNlaWwodGlja0JveC5sZWZ0KSAmJgogICAgICAgICAgICAgICAgICAgIE1hdGguZmxvb3IoYm91bmRpbmdCb3gudG9wKSA8PSBNYXRoLmNlaWwodGlja0JveC50b3ApICYmCiAgICAgICAgICAgICAgICAgICAgTWF0aC5mbG9vcih0aWNrQm94LnJpZ2h0KSA8PSBNYXRoLmNlaWwoYm91bmRpbmdCb3gubGVmdCArIF90aGlzLndpZHRoKCkpICYmCiAgICAgICAgICAgICAgICAgICAgTWF0aC5mbG9vcih0aWNrQm94LmJvdHRvbSkgPD0gTWF0aC5jZWlsKGJvdW5kaW5nQm94LnRvcCArIF90aGlzLmhlaWdodCgpKSk7CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIHZhciB2aXNpYmxlVGlja01hcmtzID0gdGhpcy5fdGllck1hcmtDb250YWluZXJzW2luZGV4XQogICAgICAgICAgICAgICAgLnNlbGVjdEFsbCgiLiIgKyBheGlzJDIuQXhpcy5USUNLX01BUktfQ0xBU1MpCiAgICAgICAgICAgICAgICAuZmlsdGVyKGZ1bmN0aW9uIChkLCBpKSB7CiAgICAgICAgICAgICAgICB2YXIgdmlzaWJpbGl0eSA9IGQzLnNlbGVjdCh0aGlzKS5zdHlsZSgidmlzaWJpbGl0eSIpOwogICAgICAgICAgICAgICAgcmV0dXJuIHZpc2liaWxpdHkgPT09ICJ2aXNpYmxlIiB8fCB2aXNpYmlsaXR5ID09PSAiaW5oZXJpdCI7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICAvLyBXZSB1c2UgdGhlIENsaWVudFJlY3RzIGJlY2F1c2UgeDEveDIgYXR0cmlidXRlcyBhcmUgbm90IGNvbXBhcmFibGUgdG8gQ2xpZW50UmVjdHMgb2YgbGFiZWxzCiAgICAgICAgICAgIHZhciB2aXNpYmxlVGlja01hcmtSZWN0cyA9IHZpc2libGVUaWNrTWFya3Mubm9kZXMoKS5tYXAoZnVuY3Rpb24gKG1hcmspIHsgcmV0dXJuIG1hcmsuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCk7IH0pOwogICAgICAgICAgICB2YXIgdmlzaWJsZVRpY2tMYWJlbHMgPSB0aGlzLl90aWVyTGFiZWxDb250YWluZXJzW2luZGV4XQogICAgICAgICAgICAgICAgLnNlbGVjdEFsbCgiLiIgKyBheGlzJDIuQXhpcy5USUNLX0xBQkVMX0NMQVNTKQogICAgICAgICAgICAgICAgLmZpbHRlcihmdW5jdGlvbiAoZCwgaSkgewogICAgICAgICAgICAgICAgdmFyIHZpc2liaWxpdHkgPSBkMy5zZWxlY3QodGhpcykuc3R5bGUoInZpc2liaWxpdHkiKTsKICAgICAgICAgICAgICAgIHJldHVybiB2aXNpYmlsaXR5ID09PSAidmlzaWJsZSIgfHwgdmlzaWJpbGl0eSA9PT0gImluaGVyaXQiOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdmFyIGxhc3RMYWJlbENsaWVudFJlY3Q7CiAgICAgICAgICAgIHZpc2libGVUaWNrTGFiZWxzLmVhY2goZnVuY3Rpb24gKGQsIGkpIHsKICAgICAgICAgICAgICAgIHZhciBjbG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saXR5IiwgImhpZGRlbiIpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgbGFzdExhYmVsQ2xpZW50UmVjdCA9IGNsaWVudFJlY3Q7CiAgICAgICAgICAgICAgICAgICAgdGlja0xhYmVsLnN0eWxlKCJ2aXNpYmlsaXR5IiwgImluaGVyaXQiKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgfTsKICAgICAgICBUaW1lLnByb3RvdHlwZS5pbnZhbGlkYXRlQ2FjaGUgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUuaW52YWxpZGF0ZUNhY2hlLmNhbGwodGhpcyk7CiAgICAgICAgICAgIHRoaXMuX21lYXN1cmVyLnJlc2V0KCk7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBUaGUgQ1NTIGNsYXNzIGFwcGxpZWQgdG8gZWFjaCBUaW1lIEF4aXMgdGllcgogICAgICAgICAqLwogICAgICAgIFRpbWUuVElNRV9BWElTX1RJRVJfQ0xBU1MgPSAidGltZS1heGlzLXRpZXIiOwogICAgICAgIFRpbWUuX1NPUlRFRF9USU1FX0lOVEVSVkFMX0lOREVYID0gKF9hID0ge30sCiAgICAgICAgICAgIF9hW2V4cG9ydHMuVGltZUludGVydmFsLnNlY29uZF0gPSAwLAogICAgICAgICAgICBfYVtleHBvcnRzLlRpbWVJbnRlcnZhbC5taW51dGVdID0gMSwKICAgICAgICAgICAgX2FbZXhwb3J0cy5UaW1lSW50ZXJ2YWwuaG91cl0gPSAyLAogICAgICAgICAgICBfYVtleHBvcnRzLlRpbWVJbnRlcnZhbC5kYXldID0gMywKICAgICAgICAgICAgX2FbZXhwb3J0cy5UaW1lSW50ZXJ2YWwud2Vla10gPSA0LAogICAgICAgICAgICBfYVtleHBvcnRzLlRpbWVJbnRlcnZhbC5tb250aF0gPSA1LAogICAgICAgICAgICBfYVtleHBvcnRzLlRpbWVJbnRlcnZhbC55ZWFyXSA9IDYsCiAgICAgICAgICAgIF9hKTsKICAgICAgICBUaW1lLl9ERUZBVUxUX1RJTUVfQVhJU19DT05GSUdVUkFUSU9OUyA9IGZ1bmN0aW9uICh1c2VVVEMpIHsKICAgICAgICAgICAgdmFyIGZvcm1hdHRlciA9IGZ1bmN0aW9uIChzcGVjaWZpZXIpIHsgcmV0dXJuIGZvcm1hdHRlcnMudGltZShzcGVjaWZpZXIsIHVzZVVUQyk7IH07CiAgICAgICAgICAgIHJldHVybiBbCiAgICAgICAgICAgICAgICBbCiAgICAgICAgICAgICAgICAgICAgeyBpbnRlcnZhbDogZXhwb3J0cy5UaW1lSW50ZXJ2YWwuc2Vjb25kLCBzdGVwOiAxLCBmb3JtYXR0ZXI6IGZvcm1hdHRlcigiJUk6JU06JVMgJXAiKSB9LAogICAgICAgICAgICAgICAgICAgIHsgaW50ZXJ2YWw6IGV4cG9ydHMuVGltZUludGVydmFsLmRheSwgc3RlcDogMSwgZm9ybWF0dGVyOiBmb3JtYXR0ZXIoIiVCICVlLCAlWSIpIH0sCiAgICAgICAgICAgICAgICBdLAogICAgICAgICAgICAgICAgWwogICAgICAgICAgICAgICAgICAgIHsgaW50ZXJ2YWw6IGV4cG9ydHMuVGltZUludGVydmFsLnNlY29uZCwgc3RlcDogNSwgZm9ybWF0dGVyOiBmb3JtYXR0ZXIoIiVJOiVNOiVTICVwIikgfSwKICAgICAgICAgICAgICAgICAgICB7IGludGVydmFsOiBleHBvcnRzLlRpbWVJbnRlcnZhbC5kYXksIHN0ZXA6IDEsIGZvcm1hdHRlcjogZm9ybWF0dGVyKCIlQiAlZSwgJVkiKSB9LAogICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgIFsKICAgICAgICAgICAgICAgICAgICB7IGludGVydmFsOiBleHBvcnRzLlRpbWVJbnRlcnZhbC5zZWNvbmQsIHN0ZXA6IDEwLCBmb3JtYXR0ZXI6IGZvcm1hdHRlcigiJUk6JU06JVMgJXAiKSB9LAogICAgICAgICAgICAgICAgICAgIHsgaW50ZXJ2YWw6IGV4cG9ydHMuVGltZUludGVydmFsLmRheSwgc3RlcDogMSwgZm9ybWF0dGVyOiBmb3JtYXR0ZXIoIiVCICVlLCAlWSIpIH0sCiAgICAgICAgICAgICAgICBdLAogICAgICAgICAgICAgICAgWwogICAgICAgICAgICAgICAgICAgIHsgaW50ZXJ2YWw6IGV4cG9ydHMuVGltZUludGVydmFsLnNlY29uZCwgc3RlcDogMTUsIGZvcm1hdHRlcjogZm9ybWF0dGVyKCIlSTolTTolUyAlcCIpIH0sCiAgICAgICAgICAgICAgICAgICAgeyBpbnRlcnZhbDogZXhwb3J0cy5UaW1lSW50ZXJ2YWwuZGF5LCBzdGVwOiAxLCBmb3JtYXR0ZXI6IGZvcm1hdHRlcigiJUIgJWUsICVZIikgfSwKICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICBbCiAgICAgICAgICAgICAgICAgICAgeyBpbnRlcnZhbDogZXhwb3J0cy5UaW1lSW50ZXJ2YWwuc2Vjb25kLCBzdGVwOiAzMCwgZm9ybWF0dGVyOiBmb3JtYXR0ZXIoIiVJOiVNOiVTICVwIikgfSwKICAgICAgICAgICAgICAgICAgICB7IGludGVydmFsOiBleHBvcnRzLlRpbWVJbnRlcnZhbC5kYXksIHN0ZXA6IDEsIGZvcm1hdHRlcjogZm9ybWF0dGVyKCIlQiAlZSwgJVkiKSB9LAogICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgIFsKICAgICAgICAgICAgICAgICAgICB7IGludGVydmFsOiBleHBvcnRzLlRpbWVJbnRlcnZhbC5taW51dGUsIHN0ZXA6IDEsIGZvcm1hdHRlcjogZm9ybWF0dGVyKCIlSTolTSAlcCIpIH0sCiAgICAgICAgICAgICAgICAgICAgeyBpbnRlcnZhbDogZXhwb3J0cy5UaW1lSW50ZXJ2YWwuZGF5LCBzdGVwOiAxLCBmb3JtYXR0ZXI6IGZvcm1hdHRlcigiJUIgJWUsICVZIikgfSwKICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICBbCiAgICAgICAgICAgICAgICAgICAgeyBpbnRlcnZhbDogZXhwb3J0cy5UaW1lSW50ZXJ2YWwubWludXRlLCBzdGVwOiA1LCBmb3JtYXR0ZXI6IGZvcm1hdHRlcigiJUk6JU0gJXAiKSB9LAogICAgICAgICAgICAgICAgICAgIHsgaW50ZXJ2YWw6IGV4cG9ydHMuVGltZUludGVydmFsLmRheSwgc3RlcDogMSwgZm9ybWF0dGVyOiBmb3JtYXR0ZXIoIiVCICVlLCAlWSIpIH0sCiAgICAgICAgICAgICAgICBdLAogICAgICAgICAgICAgICAgWwogICAgICAgICAgICAgICAgICAgIHsgaW50ZXJ2YWw6IGV4cG9ydHMuVGltZUludGVydmFsLm1pbnV0ZSwgc3RlcDogMTAsIGZvcm1hdHRlcjogZm9ybWF0dGVyKCIlSTolTSAlcCIpIH0sCiAgICAgICAgICAgICAgICAgICAgeyBpbnRlcnZhbDogZXhwb3J0cy5UaW1lSW50ZXJ2YWwuZGF5LCBzdGVwOiAxLCBmb3JtYXR0ZXI6IGZvcm1hdHRlcigiJUIgJWUsICVZIikgfSwKICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICBbCiAgICAgICAgICAgICAgICAgICAgeyBpbnRlcnZhbDogZXhwb3J0cy5UaW1lSW50ZXJ2YWwubWludXRlLCBzdGVwOiAxNSwgZm9ybWF0dGVyOiBmb3JtYXR0ZXIoIiVJOiVNICVwIikgfSwKICAgICAgICAgICAgICAgICAgICB7IGludGVydmFsOiBleHBvcnRzLlRpbWVJbnRlcnZhbC5kYXksIHN0ZXA6IDEsIGZvcm1hdHRlcjogZm9ybWF0dGVyKCIlQiAlZSwgJVkiKSB9LAogICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgIFsKICAgICAgICAgICAgICAgICAgICB7IGludGVydmFsOiBleHBvcnRzLlRpbWVJbnRlcnZhbC5taW51dGUsIHN0ZXA6IDMwLCBmb3JtYXR0ZXI6IGZvcm1hdHRlcigiJUk6JU0gJXAiKSB9LAogICAgICAgICAgICAgICAgICAgIHsgaW50ZXJ2YWw6IGV4cG9ydHMuVGltZUludGVydmFsLmRheSwgc3RlcDogMSwgZm9ybWF0dGVyOiBmb3JtYXR0ZXIoIiVCICVlLCAlWSIpIH0sCiAgICAgICAgICAgICAgICBdLAogICAgICAgICAgICAgICAgWwogICAgICAgICAgICAgICAgICAgIHsgaW50ZXJ2YWw6IGV4cG9ydHMuVGltZUludGVydmFsLmhvdXIsIHN0ZXA6IDEsIGZvcm1hdHRlcjogZm9ybWF0dGVyKCIlSSAlcCIpIH0sCiAgICAgICAgICAgICAgICAgICAgeyBpbnRlcnZhbDogZXhwb3J0cy5UaW1lSW50ZXJ2YWwuZGF5LCBzdGVwOiAxLCBmb3JtYXR0ZXI6IGZvcm1hdHRlcigiJUIgJWUsICVZIikgfSwKICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICBbCiAgICAgICAgICAgICAgICAgICAgeyBpbnRlcnZhbDogZXhwb3J0cy5UaW1lSW50ZXJ2YWwuaG91ciwgc3RlcDogMywgZm9ybWF0dGVyOiBmb3JtYXR0ZXIoIiVJICVwIikgfSwKICAgICAgICAgICAgICAgICAgICB7IGludGVydmFsOiBleHBvcnRzLlRpbWVJbnRlcnZhbC5kYXksIHN0ZXA6IDEsIGZvcm1hdHRlcjogZm9ybWF0dGVyKCIlQiAlZSwgJVkiKSB9LAogICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgIFsKICAgICAgICAgICAgICAgICAgICB7IGludGVydmFsOiBleHBvcnRzLlRpbWVJbnRlcnZhbC5ob3VyLCBzdGVwOiA2LCBmb3JtYXR0ZXI6IGZvcm1hdHRlcigiJUkgJXAiKSB9LAogICAgICAgICAgICAgICAgICAgIHsgaW50ZXJ2YWw6IGV4cG9ydHMuVGltZUludGVydmFsLmRheSwgc3RlcDogMSwgZm9ybWF0dGVyOiBmb3JtYXR0ZXIoIiVCICVlLCAlWSIpIH0sCiAgICAgICAgICAgICAgICBdLAogICAgICAgICAgICAgICAgWwogICAgICAgICAgICAgICAgICAgIHsgaW50ZXJ2YWw6IGV4cG9ydHMuVGltZUludGVydmFsLmhvdXIsIHN0ZXA6IDEyLCBmb3JtYXR0ZXI6IGZvcm1hdHRlcigiJUkgJXAiKSB9LAogICAgICAgICAgICAgICAgICAgIHsgaW50ZXJ2YWw6IGV4cG9ydHMuVGltZUludGVydmFsLmRheSwgc3RlcDogMSwgZm9ybWF0dGVyOiBmb3JtYXR0ZXIoIiVCICVlLCAlWSIpIH0sCiAgICAgICAgICAgICAgICBdLAogICAgICAgICAgICAgICAgWwogICAgICAgICAgICAgICAgICAgIHsgaW50ZXJ2YWw6IGV4cG9ydHMuVGltZUludGVydmFsLmRheSwgc3RlcDogMSwgZm9ybWF0dGVyOiBmb3JtYXR0ZXIoIiVhICVlIikgfSwKICAgICAgICAgICAgICAgICAgICB7IGludGVydmFsOiBleHBvcnRzLlRpbWVJbnRlcnZhbC5tb250aCwgc3RlcDogMSwgZm9ybWF0dGVyOiBmb3JtYXR0ZXIoIiVCICVZIikgfSwKICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICBbCiAgICAgICAgICAgICAgICAgICAgeyBpbnRlcnZhbDogZXhwb3J0cy5UaW1lSW50ZXJ2YWwuZGF5LCBzdGVwOiAxLCBmb3JtYXR0ZXI6IGZvcm1hdHRlcigiJWUiKSB9LAogICAgICAgICAgICAgICAgICAgIHsgaW50ZXJ2YWw6IGV4cG9ydHMuVGltZUludGVydmFsLm1vbnRoLCBzdGVwOiAxLCBmb3JtYXR0ZXI6IGZvcm1hdHRlcigiJUIgJVkiKSB9LAogICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgIFsKICAgICAgICAgICAgICAgICAgICB7IGludGVydmFsOiBleHBvcnRzLlRpbWVJbnRlcnZhbC5tb250aCwgc3RlcDogMSwgZm9ybWF0dGVyOiBmb3JtYXR0ZXIoIiVCIikgfSwKICAgICAgICAgICAgICAgICAgICB7IGludGVydmFsOiBleHBvcnRzLlRpbWVJbnRlcnZhbC55ZWFyLCBzdGVwOiAxLCBmb3JtYXR0ZXI6IGZvcm1hdHRlcigiJVkiKSB9LAogICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgIFsKICAgICAgICAgICAgICAgICAgICB7IGludGVydmFsOiBleHBvcnRzLlRpbWVJbnRlcnZhbC5tb250aCwgc3RlcDogMSwgZm9ybWF0dGVyOiBmb3JtYXR0ZXIoIiViIikgfSwKICAgICAgICAgICAgICAgICAgICB7IGludGVydmFsOiBleHBvcnRzLlRpbWVJbnRlcnZhbC55ZWFyLCBzdGVwOiAxLCBmb3JtYXR0ZXI6IGZvcm1hdHRlcigiJVkiKSB9LAogICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgIFsKICAgICAgICAgICAgICAgICAgICB7IGludGVydmFsOiBleHBvcnRzLlRpbWVJbnRlcnZhbC5tb250aCwgc3RlcDogMywgZm9ybWF0dGVyOiBmb3JtYXR0ZXIoIiViIikgfSwKICAgICAgICAgICAgICAgICAgICB7IGludGVydmFsOiBleHBvcnRzLlRpbWVJbnRlcnZhbC55ZWFyLCBzdGVwOiAxLCBmb3JtYXR0ZXI6IGZvcm1hdHRlcigiJVkiKSB9LAogICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgIFsKICAgICAgICAgICAgICAgICAgICB7IGludGVydmFsOiBleHBvcnRzLlRpbWVJbnRlcnZhbC5tb250aCwgc3RlcDogNiwgZm9ybWF0dGVyOiBmb3JtYXR0ZXIoIiViIikgfSwKICAgICAgICAgICAgICAgICAgICB7IGludGVydmFsOiBleHBvcnRzLlRpbWVJbnRlcnZhbC55ZWFyLCBzdGVwOiAxLCBmb3JtYXR0ZXI6IGZvcm1hdHRlcigiJVkiKSB9LAogICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgIFsKICAgICAgICAgICAgICAgICAgICB7IGludGVydmFsOiBleHBvcnRzLlRpbWVJbnRlcnZhbC55ZWFyLCBzdGVwOiAxLCBmb3JtYXR0ZXI6IGZvcm1hdHRlcigiJVkiKSB9LAogICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgIFsKICAgICAgICAgICAgICAgICAgICB7IGludGVydmFsOiBleHBvcnRzLlRpbWVJbnRlcnZhbC55ZWFyLCBzdGVwOiAxLCBmb3JtYXR0ZXI6IGZvcm1hdHRlcigiJXkiKSB9LAogICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgIFsKICAgICAgICAgICAgICAgICAgICB7IGludGVydmFsOiBleHBvcnRzLlRpbWVJbnRlcnZhbC55ZWFyLCBzdGVwOiA1LCBmb3JtYXR0ZXI6IGZvcm1hdHRlcigiJVkiKSB9LAogICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgIFsKICAgICAgICAgICAgICAgICAgICB7IGludGVydmFsOiBleHBvcnRzLlRpbWVJbnRlcnZhbC55ZWFyLCBzdGVwOiAyNSwgZm9ybWF0dGVyOiBmb3JtYXR0ZXIoIiVZIikgfSwKICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICBbCiAgICAgICAgICAgICAgICAgICAgeyBpbnRlcnZhbDogZXhwb3J0cy5UaW1lSW50ZXJ2YWwueWVhciwgc3RlcDogNTAsIGZvcm1hdHRlcjogZm9ybWF0dGVyKCIlWSIpIH0sCiAgICAgICAgICAgICAgICBdLAogICAgICAgICAgICAgICAgWwogICAgICAgICAgICAgICAgICAgIHsgaW50ZXJ2YWw6IGV4cG9ydHMuVGltZUludGVydmFsLnllYXIsIHN0ZXA6IDEwMCwgZm9ybWF0dGVyOiBmb3JtYXR0ZXIoIiVZIikgfSwKICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICBbCiAgICAgICAgICAgICAgICAgICAgeyBpbnRlcnZhbDogZXhwb3J0cy5UaW1lSW50ZXJ2YWwueWVhciwgc3RlcDogMjAwLCBmb3JtYXR0ZXI6IGZvcm1hdHRlcigiJVkiKSB9LAogICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgIFsKICAgICAgICAgICAgICAgICAgICB7IGludGVydmFsOiBleHBvcnRzLlRpbWVJbnRlcnZhbC55ZWFyLCBzdGVwOiA1MDAsIGZvcm1hdHRlcjogZm9ybWF0dGVyKCIlWSIpIH0sCiAgICAgICAgICAgICAgICBdLAogICAgICAgICAgICAgICAgWwogICAgICAgICAgICAgICAgICAgIHsgaW50ZXJ2YWw6IGV4cG9ydHMuVGltZUludGVydmFsLnllYXIsIHN0ZXA6IDEwMDAsIGZvcm1hdHRlcjogZm9ybWF0dGVyKCIlWSIpIH0sCiAgICAgICAgICAgICAgICBdLAogICAgICAgICAgICBdOwogICAgICAgIH07CiAgICAgICAgVGltZS5fTE9OR19EQVRFID0gbmV3IERhdGUoOTk5OSwgOCwgMjksIDEyLCA1OSwgOTk5OSk7CiAgICAgICAgcmV0dXJuIFRpbWU7CiAgICB9KGF4aXMkMi5BeGlzKSk7CiAgICBleHBvcnRzLlRpbWUgPSBUaW1lOwogICAgdmFyIF9hOwogICAgfSk7CgogICAgdmFyIGF4ZXMgPSBjcmVhdGVDb21tb25qc01vZHVsZShmdW5jdGlvbiAobW9kdWxlLCBleHBvcnRzKSB7CiAgICAvKioKICAgICAqIENvcHlyaWdodCAyMDE0LXByZXNlbnQgUGFsYW50aXIgVGVjaG5vbG9naWVzCiAgICAgKiBAbGljZW5zZSBNSVQKICAgICAqLwogICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsKCiAgICB0c2xpYl9lczYuX19leHBvcnRTdGFyKGNhdGVnb3J5QXhpcywgZXhwb3J0cyk7CiAgICB0c2xpYl9lczYuX19leHBvcnRTdGFyKG51bWVyaWNBeGlzLCBleHBvcnRzKTsKICAgIHRzbGliX2VzNi5fX2V4cG9ydFN0YXIodGltZUF4aXMsIGV4cG9ydHMpOwogICAgfSk7CgogICAgdmFyIGRpc3BhdGNoZXIgPSBjcmVhdGVDb21tb25qc01vZHVsZShmdW5jdGlvbiAobW9kdWxlLCBleHBvcnRzKSB7CiAgICAvKioKICAgICAqIENvcHlyaWdodCAyMDE0LXByZXNlbnQgUGFsYW50aXIgVGVjaG5vbG9naWVzCiAgICAgKiBAbGljZW5zZSBNSVQKICAgICAqLwogICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsKCiAgICB2YXIgRGlzcGF0Y2hlciA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uICgpIHsKICAgICAgICBmdW5jdGlvbiBEaXNwYXRjaGVyKCkgewogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogU3ViY2xhc3NlcyBzZXQgdGhlc2UgaW4gY29uc3RydWN0b3IuIFRoZW4sIHRoZXNlIGdldCBhdHRhY2hlZCB0byB0aGUgZXZlbnQKICAgICAgICAgICAgICogdGFyZ2V0IGluIF9jb25uZWN0CiAgICAgICAgICAgICAqCiAgICAgICAgICAgICAqIGV2ZW50bmFtZSBpcyBhIERPTSBldmVudCBuYW1lIGxpa2UgIm1vdXNldXAiLCAidG91Y2hzdGFydCIsIGV0Yy4gVGhlCiAgICAgICAgICAgICAqIGNhbGxiYWNrIGlzIHNpbXBseSByZWdpc3RlcmVkIHRvIHRoZSBldmVudCBjYWxsYmFjayB3aXRoIGJ1YmJsaW5nLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fZXZlbnRUb1Byb2Nlc3NpbmdGdW5jdGlvbiA9IHt9OwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQWxsIGxpc3RlbmVycyBhcmUgcmVnaXN0ZXJlZCB0byB0aGlzIGBFdmVudFRhcmdldGAgYW5kIGV2ZW50cyBhcmUgdGhlbgogICAgICAgICAgICAgKiBkaXNwYXRjaGVkIHRvIGNhbGxiYWNrcyBmcm9tIGBfZXZlbnROYW1lVG9DYWxsYmFja1NldGAgbWFudWFsbHkuCiAgICAgICAgICAgICAqCiAgICAgICAgICAgICAqIFN1YmNsYXNzZXMgc2V0IHRoZWlyIG93biBldmVudCB0YXJnZXQgaW5zdGVhZCBvZiBgZG9jdW1lbnRgLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fZXZlbnRUYXJnZXQgPSBkb2N1bWVudDsKICAgICAgICAgICAgdGhpcy5fZXZlbnROYW1lVG9DYWxsYmFja1NldCA9IHt9OwogICAgICAgICAgICB0aGlzLl9jb25uZWN0ZWQgPSBmYWxzZTsKICAgICAgICB9CiAgICAgICAgRGlzcGF0Y2hlci5wcm90b3R5cGUuX2hhc05vQ2FsbGJhY2tzID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB2YXIgZXZlbnROYW1lcyA9IE9iamVjdC5rZXlzKHRoaXMuX2V2ZW50TmFtZVRvQ2FsbGJhY2tTZXQpOwogICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGV2ZW50TmFtZXMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIGlmICh0aGlzLl9ldmVudE5hbWVUb0NhbGxiYWNrU2V0W2V2ZW50TmFtZXNbaV1dLnNpemUgIT09IDApIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgfTsKICAgICAgICBEaXNwYXRjaGVyLnByb3RvdHlwZS5fY29ubmVjdCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgaWYgKHRoaXMuX2Nvbm5lY3RlZCkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIE9iamVjd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tCiAgICAgICAgICogQHJldHVybiB7RGlzcGF0Y2hlcnMuTW91c2V9CiAgICAgICAgICovCiAgICAgICAgTW91c2UuZ2V0RGlzcGF0Y2hlciA9IGZ1bmN0aW9uIChjb21wb25lbnQpIHsKICAgICAgICAgICAgdmFyIGVsZW1lbnQgPSBjb21wb25lbnQucm9vdCgpLnJvb3RFbGVtZW50KCk7CiAgICAgICAgICAgIHZhciBkaXNwYXRjaGVyID0gZWxlbWVudFtNb3VzZS5fRElTUEFUQ0hFUl9LRVldOwogICAgICAgICAgICBpZiAoZGlzcGF0Y2hlciA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICBkaXNwYXRjaGVyID0gbmV3IE1vdXNlKGNvbXBvbmVudCk7CiAgICAgICAgICAgICAgICBlbGVtZW50W01vdXNlLl9ESVNQQVRDSEVSX0tFWV0gPSBkaXNwYXRjaGVyOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBkaXNwYXRjaGVyOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogUmVnaXN0ZXJzIGEgY2FsbGJhY2sgdG8gYmUgY2FsbGVkIHdoZW4gdGhlIG1vdXNlIHBvc2l0aW9uIGNoYW5nZXMuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0ge01vdXNlQ2FsbGJhY2t9IGNhbGxiYWNrCiAgICAgICAgICogQHJldHVybiB7RGlzcGF0Y2hlcnMuTW91c2V9IFRoZSBjYWxsaW5nIE1vdXNlIERpc3BhdGNoZXIuCiAgICAgICAgICovCiAgICAgICAgTW91c2UucHJvdG90eXBlLm9uTW91c2VNb3ZlID0gZnVuY3Rpb24gKGNhbGxiYWNrKSB7CiAgICAgICAgICAgIHRoaXMuX2FkZENhbGxiYWNrRm9yRXZlbnQoTW91c2UuX01PVVNFTU9WRV9FVkVOVF9OQU1FLCBjYWxsYmFjayk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICog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gd2hlbiBhIG1vdXNlZG93biBvY2N1cnMuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0ge01vdXNlQ2FsbGJhY2t9IGNhbGxiYWNrCiAgICAgICAgICogQHJldHVybiB7RGlzcGF0Y2hlcnMuTW91c2V9IFRoZSBjYWxsaW5nIE1vdXNlIERpc3BhdGNoZXIuCiAgICAgICAgICovCiAgICAgICAgTW91c2UucHJvdG90eXBlLm9mZk1vdXNlRG93biA9IGZ1bmN0aW9uIChjYWxsYmFjaykgewogICAgICAgICAgICB0aGlzLl9yZW1vdmVDYWxsYmFja0ZvckV2ZW50KE1vdXNlLl9NT1VTRURPV05fRVZFTlRfTkFNRSwgY2FsbGJhY2spOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIFJlZ2lzdGVycyBhIGNhbGxiYWNrIHRvIGJlIGNhbGxlZCB3aGVuIGEgbW91c2V1cCBvY2N1cnMuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0ge01vdXNlQ2FsbGJhY2t9IGNhbGxiYWNrCiAgICAgICAgICogQHJldHVybiB7RGlzcGF0Y2hlcnMuTW91c2V9IFRoZSBjYWxsaW5nIE1vdXNlIERpc3BhdGNoZXIuCiAgICAgICAgICovCiAgICAgICAgTW91c2UucHJvdG90eXBlLm9uTW91c2VVcCA9IGZ1bmN0aW9uIChjYWxsYmFjaykgewogICAgICAgICAgICB0aGlzLl9hZGRDYWxsYmFja0ZvckV2ZW50KE1vdXNlLl9NT1VTRVVQX0VWRU5UX05BTUUsIGNhbGxiYWNrKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBSZW1vdmVzIGEgY2FsbGJhY2sgdGhhdCB3b3VsZCBiZSBjYWxsZWQgd2hlbiBhIG1vdXNldXAgb2NjdXJzLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtNb3VzZUNhbGxi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cGUub2ZmRGJsQ2xpY2sgPSBmdW5jdGlvbiAoY2FsbGJhY2spIHsKICAgICAgICAgICAgdGhpcy5fcmVtb3ZlQ2FsbGJhY2tGb3JFdmVudChNb3VzZS5fREJMQ0xJQ0tfRVZFTlRfTkFNRSwgY2FsbGJhY2spOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIENvbXB1dGVzIHRoZSBtb3VzZSBwb3NpdGlvbiBmcm9tIHRoZSBnaXZlbiBldmVudCwgYW5kIGlmIHN1Y2Nlc3NmdWwKICAgICAgICAgKiBjYWxscyBhbGwgdGhlIGNhbGxiYWNrcyBpbiB0aGUgcHJvdmlkZWQgY2FsbGJhY2tTZXQuCiAgICAgICAgICovCiAgICAgICAgTW91c2UucHJvdG90eXBlLl9tZWFzdXJlQW5kRGlzcGF0Y2ggPSBmdW5jdGlvbiAoY29tcG9uZW50LCBldmVudCwgZXZlbnROYW1lLCBzY29wZSkgewogICAgICAgICAgICBpZiAoc2NvcGUgPT09IHZvaWQgMCkgeyBzY29wZSA9ICJlbGVtZW50IjsgfQogICAgICAgICAgICBpZiAoc2NvcGUgIT09ICJwYWdlIiAmJiBzY29wZSAhPT0gImVsZW1lbnQiKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoIkludmFsaWQgc2NvcGUgJyIgKyBzY29wZSArICInLCBtdXN0IGJlICdlbGVtZW50JyBvciAncGFnZSciKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoc2NvcGUgPT09ICJwYWdlIiB8fCB0aGlzLmV2ZW50SW5zaWRlKGNvbXBvbmVudCwgZXZlbnQpKSB7CiAgICAgICAgICAgICAgICB2YXIgcG9zaXRpb24gPSB0aGlzLl90cmFuc2xhdG9yLmNvbXB1dGVQb3NpdGlvbihldmVudC5jbGllbnRYLCBldmVudC5jbGllbnRZKTsKICAgICAgICAgICAgICAgIHRoaXMuX2xhc3RNb3VzZVBvc2l0aW9uID0gcG9zaXRpb247CiAgICAgICAgICAgICAgICB0aGlzLl9jYWxsQ2FsbGJhY2tzRm9yRXZlbnQoZXZlbnROYW1lLCB0aGlzLmxhc3RNb3VzZVBvc2l0aW9uKCksIGV2ZW50KTsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgTW91c2UucHJvdG90eXBlLmV2ZW50SW5zaWRlID0gZnVuY3Rpb24gKGNvbXBvbmVudCwgZXZlbnQpIHsKICAgICAgICAgICAgcmV0dXJuIHV0aWxzJDEuVHJhbnNsYXRvci5pc0V2ZW50SW5zaWRlKGNvbXBvbmVudCwgZXZlbnQpOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0dXJucyB0aGUgbGFzdCBjb21wdXRlZCBtb3VzZSBwb3NpdGlvbiBpbiA8c3ZnPiBjb29yZGluYXRlIHNwYWNlLgogICAgICAgICAqCiAgICAgICAgICogQHJldHVybiB7UG9pbnR9CiAgICAgICAgICovCiAgICAgICAgTW91c2UucHJvdG90eXBlLmxhc3RNb3VzZVBvc2l0aW9uID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fbGFzdE1vdXNlUG9zaXRpb247CiAgICAgICAgfTsKICAgICAgICBNb3VzZS5fRElTUEFUQ0hFUl9LRVkgPSAiX19QbG90dGFibGVfRGlzcGF0Y2hlcl9Nb3VzZSI7CiAgICAgICAgTW91c2UuX01PVVNFT1ZFUl9FVkVOVF9OQU1FID0gIm1vdXNlb3ZlciI7CiAgICAgICAgTW91c2UuX01PVVNFTU9WRV9FVkVOVF9OQU1FID0gIm1vdXNlbW92ZSI7CiAgICAgICAgTW91c2UuX01PVVNFT1VUX0VWRU5UX05BTUUgPSAibW91c2VvdXQiOwogICAgICAgIE1vdXNlLl9NT1VTRURPV05fRVZFTlRfTkFNRSA9ICJtb3VzZWRvd24iOwogICAgICAgIE1vdXNlLl9NT1VTRVVQX0VWRU5UX05BTUUgPSAibW91c2V1cCI7C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qIEdldHMgYSBUb3VjaCBEaXNwYXRjaGVyIGZvciB0aGUgY29tcG9uZW50LgogICAgICAgICAqIElmIG9uZSBhbHJlYWR5IGV4aXN0cywgaXQgd2lsbCBiZSByZXR1cm5lZDsgb3RoZXJ3aXNlLCBhIG5ldyBvbmUgd2lsbCBiZSBjcmVhdGVkLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIGNvbXBvbmVudAogICAgICAgICAqIEByZXR1cm4ge0Rpc3BhdGNoZXJzLlRvdWNofQogICAgICAgICAqLwogICAgICAgIFRvdWNoLmdldERpc3BhdGNoZXIgPSBmdW5jdGlvbiAoY29tcG9uZW50KSB7CiAgICAgICAgICAgIHZhciBzdmcgPSBjb21wb25lbnQucm9vdCgpLnJvb3RFbGVtZW50KCk7CiAgICAgICAgICAgIHZhciBkaXNwYXRjaGVyID0gc3ZnW1RvdWNoLl9ESVNQQVRDSEVSX0tFWV07CiAgICAgICAgICAgIGlmIChkaXNwYXRjaGVyID09IG51bGwpIHsKICAgICAgICAgICAgICAgIGRpc3BhdGNoZXIgPSBuZXcgVG91Y2goY29tcG9uZW50KTsKICAgICAgICAgICAgICAgIHN2Z1tUb3VjaC5fRElTUEFUQ0hFUl9LRVldID0gZGlzcGF0Y2hlcjsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gZGlzcGF0Y2hlcjsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIFJlZ2lzdGVycyBhIGNhbGxiYWNrIHRvIGJlIGNhbGxlZCB3aGVuIGEgdG91Y2ggc3RhcnRzLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtUb3VjaENhbGxiYWNrfSBjYWxsYmFjawogICAgICAgICAqIEByZXR1cm4ge0Rpc3BhdGNoZXJzLlRvdWNofSBUaGUgY2FsbGluZyBUb3VjaCBEaXNwYXRjaGVyLgogICAgICAgICAqLwogICAgICAgIFRvdWNoLnByb3RvdHlwZS5vblRvdWNoU3RhcnQgPSBmdW5jdGl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AgICAgIC8qKgogICAgICAgICAqIFJlbW92ZXMgYSBjYWxsYmFjayB0aGF0IHdvdWxkIGJlIGNhbGxlZCB3aGVuIGEgdG91Y2ggaXMgY2FuY2VsbGVkLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtUb3VjaENhbGxiYWNrfSBjYWxsYmFjawogICAgICAgICAqIEByZXR1cm4ge0Rpc3BhdGNoZXJzLlRvdWNofSBUaGUgY2FsbGluZyBUb3VjaCBEaXNwYXRjaGVyLgogICAgICAgICAqLwogICAgICAgIFRvdWNoLnByb3RvdHlwZS5vZmZUb3VjaENhbmNlbCA9IGZ1bmN0aW9uIChjYWxsYmFjaykgewogICAgICAgICAgICB0aGlzLl9yZW1vdmVDYWxsYmFja0ZvckV2ZW50KFRvdWNoLl9UT1VDSENBTkNFTF9FVkVOVF9OQU1FLCBjYWxsYmFjayk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogQ29tcHV0ZXMgdGhlIFRvdWNoIHBvc2l0aW9uIGZyb20gdGhlIGdpdmVuIGV2ZW50LCBhbmQgaWYgc3VjY2Vzc2Z1bAogICAgICAgICAqIGNhbGxzIGFsbCB0aGUgY2FsbGJhY2tzIGluIHRoZSBwcm92aWRlZCBjYWxsYmFja1NldC4KICAgICAgICAgKi8KICAgICAgICBUb3VjaC5wcm90b3R5cGUuX21lYXN1cmVBbmREaXNwYXRjaCA9IGZ1bmN0aW9uIChjb21wb25lbnQsIGV2ZW50LCBldmVudE5hbWUsIHNjb3BlKSB7CiAgICAgICAgICAgIGlmIChzY29wZSA9PT0gdm9pZCAwKSB7IHNjb3BlID0gImVsZW1lbnQiOyB9CiAgICAgICAgICAgIGlmIChzY29wZSAhPT0gInBhZ2UiICYmIHNjb3BlICE9PSAiZWxlbWVudCIpIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigiSW52YWxpZCBzY29wZSAnIiArIHNjb3BlICsgIicsIG11c3QgYmUgJ2VsZW1lbnQnIG9yICdwYWdlJyIpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChzY29wZSA9PT0gImVsZW1lbnQiICYmICF0aGlzLmV2ZW50SW5zaWRlKGNvbXBvbmVudCwgZXZlbnQpKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIHRvdWNoZXMgPSBldmVudC5jaGFuZ2VkVG91Y2hlczsKICAgICAgICAgICAgdmFyIHRvdWNoUG9zaXRpb25zID0ge307CiAgICAgICAgICAgIHZhciB0b3VjaElkZW50aWZpZXJzID0gW107CiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdG91Y2hlcy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgdmFyIHRvdWNoID0gdG91Y2hlc1tpXTsKICAgICAgICAgICAgICAgIHZhciB0b3VjaElEID0gdG91Y2guaWRlbnRpZmllcjsKICAgICAgICAgICAgICAgIHZhciBuZXdUb3VjaFBvc2l0aW9uID0gdGhpcy5fdHJhbnNsYXRvci5jb21wdXRlUG9zaXRpb24odG91Y2guY2xpZW50WCwgdG91Y2guY2xpZW50WSk7CiAgICAgICAgICAgICAgICBpZiAobmV3VG91Y2hQb3NpdGlvbiAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgdG91Y2hQb3NpdGlvbnNbdG91Y2hJRF0gPSBuZXdUb3VjaFBvc2l0aW9uOwogICAgICAgICAgICAgICAgICAgIHRvdWNoSWRlbnRpZmllcnMucHVzaCh0b3VjaElEKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodG91Y2hJZGVudGlmaWVycy5sZW5ndGggPiAwKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9jYWxsQ2FsbGJhY2tzRm9yRXZlbnQoZXZlbnROYW1lLCB0b3VjaElkZW50aWZpZXJzLCB0b3VjaFBvc2l0aW9ucywgZXZlbnQpO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zIHtJbnRlcmFjdGlvbn0gVGhlIGNhbGxpbmcgSW50ZXJhY3Rpb24uCiAgICAgICAgICovCiAgICAgICAgSW50ZXJhY3Rpb24ucHJvdG90eXBlLmF0dGFjaFRvID0gZnVuY3Rpb24gKGNvbXBvbmVudCkgewogICAgICAgICAgICB0aGlzLl9kaXNjb25uZWN0KCk7CiAgICAgICAgICAgIHRoaXMuX2NvbXBvbmVudEF0dGFjaGVkVG8gPSBjb21wb25lbnQ7CiAgICAgICAgICAgIHRoaXMuX2Nvbm5lY3QoKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBAZGVwcmVjYXRlZCByZW5hbWVkIHRvIC5kZXRhY2goKS4KICAgICAgICAgKi8KICAgICAgICBJbnRlcmFjdGlvbi5wcm90b3R5cGUuZGV0YWNoRnJvbSA9IGZ1bmN0aW9uIChfY29tcG9uZW50KSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmRldGFjaCgpOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogRGV0YWNoZXMgdGhpcyBJbnRlcmFjdGlvbiBmcm9tIHdoYXRldmVyIGNvbXBvbmVudCBpdCB3YXMgYXR0YWNoZWQgdG8uCiAgICAgICAgICogVGhpcyBJbnRlcmFjdGlvbiBjYW4gYmUgcmV1c2VkLgogICAgICAgICAqCiAgICAgICAgICogQHJldHVybnMge0ludGVyYWN0aW9ufSBUaGUgY2FsbGluZyBJbnRlcmFjdGlvbi4KICAgICAgICAgKi8KICAgICAgICBJbnRlcmFjdGlvbi5wcm90b3R5cGUuZGV0YWNoID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB0aGlzLl9kaXNjb25uZWN0KCk7CiAgICAgICAgICAgIHRoaXMuX2NvbXBvbmVudEF0dGFjaGVkVG8gPSBudWxsOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIEludGVyYWN0aW9uLnByb3RvdHlwZS5lbmFibGVkID0gZnVuY3Rpb24gKGVuYWJsZWQpIHsKICAgICAgICAgICAgaWYgKGVuYWJsZWQgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2VuYWJsZWQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fZW5hYmxlZCA9IGVuYWJsZWQ7CiAgICAgICAgICAgIGlmICh0aGlzLl9lbmFibGVkKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9jb25uZWN0KCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLl9kaXNjb25uZWN0KCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBJbnRlcmFjdGlvbi5wcm90b3R5cGUuX2FuY2hvciA9IGZ1bmN0aW9uIChjb21wb25lbnQpIHsKICAgICAgICAgICAgdGhpcy5faXNBbmNob3JlZCA9IHRydWU7CiAgICAgICAgfTsKICAgICAgICBJbnRlcmFjdGlvbi5wcm90b3R5cGUuX3VuYW5jaG9yID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB0aGlzLl9pc0FuY2hvcmVkID0gZmFsc2U7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBUcmFuc2xhdGVzIGFuIDxzdmc+LWNvb3JkaW5hdGUtc3BhY2UgcG9pbnQgdG8gQ29tcG9uZW50LXNwYWNlIGNvb3JkaW5hdGVzLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtQb2ludH0gcCBBIFBvaW50IGluIDxzdmc+LXNwYWNlIGNvb3JkaW5hdGVzLgogICAgICAgICAqIEByZXR1cm4ge1BvaW50fSBUaGUgc2FtZSBsb2NhdGlvbiBpbiBDb21wb25lbnQtc3BhY2UgY29vcmRpbmF0ZXMuCiAgICAgICAgICovCiAgICAgICAgSW50ZXJhY3Rpb24ucHJvdG90eXBlLl90cmFuc2xhdGVUb0NvbXBvbmVudFNwYWNlID0gZnVuY3Rpb24gKHApIHsKICAgICAgICAgICAgdmFyIG9yaWdpbiA9IHRoaXMuX2NvbXBvbmVudEF0dGFjaGVkVG8ub3JpZ2luVG9Sb290KCk7CiAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICB4OiBwLnggLSBvcmlnaW4ueCwKICAgICAgICAgICAgICAgIHk6IHAueSAtIG9yaWdpbi55LAogICAgICAgICAgICB9OwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogQ2hlY2tzIHdoZXRoZXIgYSBDb21wb25lbnQtY29vcmRpbmF0ZS1zcGFjZSBQb2ludCBpcyBpbnNpZGUgdGhlIENvbXBvbmVudC4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7UG9pbnR9IHAgQSBQb2ludCBpbiBDb21wb2VubnQtc3BhY2UgY29vcmRpbmF0ZXMuCiAgICAgICAgICogQHJldHVybiB7Ym9vbGVhbn0gV2hldGhlciBvciBub3QgdGhlIHBvaW50IGlzIGluc2lkZSB0aGUgQ29tcG9uZW50LgogICAgICAgICAqLwogICAgICAgIEludGVyYWN0aW9uLnByb3RvdHlwZS5faXNJbnNpZGVDb21wb25lbnQgPSBmdW5jdGlvbiAocCkgewogICAgICAgICAgICByZXR1cm4gMCA8PSBwLnggJiYgMCA8PSBwLnkKICAgICAgICAgICAgICAgICYmIHAueCA8PSB0aGlzLl9jb21wb25lbnRBdHRhY2hlZFRvLndpZHRoKCkKICAgICAgICAgICAgICAgICYmIHAueSA8PSB0aGlzLl9jb21wb25lbnRBdHRhY2hlZFRvLmhlaWdodCgpOwogICAgICAgIH07CiAgICAgICAgSW50ZXJhY3Rpb24ucHJvdG90eXBlLl9jb25uZWN0ID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICBpZiAodGhpcy5lbmFibGVkKCkgJiYgdGhpcy5fY29tcG9uZW50QXR0YWNoZWRUbyAhPSBudWxsICYmICF0aGlzLl9pc0FuY2hvcmVkKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9jb21wb25lbnRBdHRhY2hlZFRvLm9uQW5jaG9yKHRoaXMuX2FuY2hvckNhbGxiYWNrKTsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgSW50ZXJhY3Rpb24ucHJvdG90eXBlLl9kaXNjb25uZWN0ID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICBpZiAodGhpcy5faXNBbmNob3JlZCkgewogICAgICAgICAgICAgICAgdGhpcy5fdW5hbmNob3IoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5fY29tcG9uZW50QXR0YWNoZWRUbyAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9jb21wb25lbnRBdHRhY2hlZFRvLm9mZkFuY2hvcih0aGlzLl9hbmNob3JDYWxsYmFjayk7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIHJldHVybiBJbnRlcmFjdGlvbjsKICAgIH0oKSk7CiAgICBleHBvcnRzLkludGVyYWN0aW9uID0gSW50ZXJhY3Rpb247CiAgICB9KTsKCiAgICB2YXIgY2xpY2tJbnRlcmFjdGlvbiA9IGNyZWF0ZUNvbW1vbmpzTW9kdWxlKGZ1bmN0aW9uIChtb2R1bGUsIGV4cG9ydHMpIHsKICAgIC8qKgogICAgICogQ29weXJpZ2h0IDIwMTQtcHJlc2VudCBQYWxhbnRpciBUZWNobm9sb2dpZXMKICAgICAqIEBsaWNlbnNlIE1JVAogICAgICovCiAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgIl9fZXNNb2R1bGUiLCB7IHZhbHVlOiB0cnVlIH0pOwoKCgoKICAgIHZhciBDbGljayA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHsKICAgICAgICB0c2xpYl9lczYuX19leHRlbmRzKENsaWNrLCBfc3VwZXIpOwogICAgICAgIGZ1bmN0aW9uIENsaWNrKCkgewogIC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9OwogICAgICAgICAgICBfdGhpcy5fdG91Y2hTdGFydENhbGxiYWNrID0gZnVuY3Rpb24gKGlkcywgaWRUb1BvaW50LCBldmVudCkgeyByZXR1cm4gX3RoaXMuX2hhbmRsZUNsaWNrRG93bihpZFRvUG9pbnRbaWRzWzBdXSwgZXZlbnQpOyB9OwogICAgICAgICAgICBfdGhpcy5fdG91Y2hFbmRDYWxsYmFjayA9IGZ1bmN0aW9uIChpZHMsIGlkVG9Qb2ludCwgZXZlbnQpIHsgcmV0dXJuIF90aGlzLl9oYW5kbGVDbGlja1VwKGlkVG9Qb2ludFtpZHNbMF1dLCBldmVudCk7IH07CiAgICAgICAgICAgIF90aGlzLl90b3VjaENhbmNlbENhbGxiYWNrID0gZnVuY3Rpb24gKGlkcywgaWRUb1BvaW50KSB7IHJldHVybiBfdGhpcy5fY2xpY2tlZERvd24gPSBmYWxzZTsgfTsKICAgICAgICAgICAgcmV0dXJuIF90aGlzOwogICAgICAgIH0KICAgICAgICBDbGljay5wcm90b3R5cGUuX2FuY2hvciA9IGZ1bmN0aW9uIChjb21wb25lbnQpIHsKICAgICAgICAgICAgX3N1cGVyLnByb3RvdHlwZS5fYW5jaG9yLmNhbGwodGhpcywgY29tcG9uZW50KTsKICAgICAgICAgICAgdGhpcy5fbW91c2VEaXNwYXRjaGVyID0gZGlzcGF0Y2hlcnMuTW91c2UuZ2V0RGlzcGF0Y2hlcihjb21wb25lbnQpOwogICAgICAgICAgICB0aGlzLl9tb3VzZURpc3BhdGNoZXIub25Nb3VzZURvd24odGhpcy5fbW91c2VEb3duQ2FsbGJhY2spOwogICAgICAgICAgICB0aGlzLl9tb3VzZURpc3BhdGNoZXIub25Nb3VzZVVwKHRoaXMuX21vdXNlVXBDYWxsYmFjayk7CiAgICAgICAgICAgIHRoaXMuX21vdXNlRGlzcGF0Y2hlci5vbkRibENsaWNrKHRoaXMuX2RibENsaWNrQ2FsbGJhY2spOwogICAgICAgICAgICB0aGlzLl90b3VjaERpc3BhdGNo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jZWwodGhpcy5fdG91Y2hDYW5jZWxDYWxsYmFjayk7CiAgICAgICAgICAgIHRoaXMuX3RvdWNoRGlzcGF0Y2hlciA9IG51bGw7CiAgICAgICAgfTsKICAgICAgICBDbGljay5wcm90b3R5cGUuX2hhbmRsZUNsaWNrRG93biA9IGZ1bmN0aW9uIChwLCBldmVudCkgewogICAgICAgICAgICB2YXIgdHJhbnNsYXRlZFAgPSB0aGlzLl90cmFuc2xhdGVUb0NvbXBvbmVudFNwYWNlKHApOwogICAgICAgICAgICBpZiAodGhpcy5faXNJbnNpZGVDb21wb25lbnQodHJhbnNsYXRlZFApKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9jbGlja2VkRG93biA9IHRydWU7CiAgICAgICAgICAgICAgICB0aGlzLl9jbGlja2VkUG9pbnQgPSB0cmFuc2xhdGVkUDsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgQ2xpY2sucHJvdG90eXBlLl9oYW5kbGVDbGlja1VwID0gZnVuY3Rpb24gKHAsIGV2ZW50KSB7CiAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7CiAgICAgICAgICAgIHZhciB0cmFuc2xhdGVkUCA9IHRoaXMuX3RyYW5zbGF0ZVRvQ29tcG9uZW50U3BhY2UocCk7CiAgICAgICAgICAgIGlmICh0aGlzLl9jbGlja2VkRG93biAmJiBDbGljay5fcG9pbnRzRXF1YWwodHJhbnNsYXRlZFAsIHRoaXMuX2NsaWNrZWRQb2ludCkpIHsKICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgICAgIGlmICghX3RoaXMuX2RvdWJsZUNsaWNraW5nKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLl9vbkNsaWNrQ2FsbGJhY2tzLmNhbGxDYWxsYmFja3ModHJhbnNsYXRlZFAsIGV2ZW50KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9LCAwKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9jbGlja2VkRG93biA9IGZhbHNlOwogICAgICAgIH07CiAgICAgICAgQ2xpY2sucHJvdG90eXBlLl9oYW5kbGVEYmxDbGljayA9IGZ1bmN0aW9uIChwLCBldmVudCkgewogICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwogICAgICAgICAgICB2YXIgdHJhbnNsYXRlZFAgPSB0aGlzLl90cmFuc2xhdGVUb0NvbXBvbmVudFNwYWNlKHApOwogICAgICAgICAgICB0aGlzLl9kb3VibGVDbGlja2luZyA9IHRydWU7CiAgICAgICAgICAgIHRoaXMuX29uRG91YmxlQ2xpY2tDYWxsYmFja3MuY2FsbENhbGxiYWNrcyh0cmFuc2xhdGVkUCwgZXZlbnQpOwogICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHsgcmV0dXJuIF90aGlzLl9kb3VibGVDbGlja2luZyA9IGZhbHNlOyB9LCAwKTsKICAgICAgICB9OwogICAgICAgIENsaWNrLl9wb2ludHNFcXVhbCA9IGZ1bmN0aW9uIChwMSwgcDIpIHsKICAgICAgICAgICAgcmV0dXJuIHAxLnggPT09IHAyLnggJiYgcDEueSA9PT0gcDIueTsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIEFkZHMgYSBjYWxsYmFjayB0byBiZSBjYWxsZWQgd2hlbiB0aGUgQ29tcG9uZW50IGlzIGNsaWNrZWQuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0ge0NsaWNrQ2FsbGJhY2t9IGNhbGxiYWNrCiAgICAgICAgICogQHJldHVybiB7SW50ZXJhY3Rpb25zLkNsaWNrfSBUaGUgY2FsbGluZyBDbGljayBJbnRlcmFjdGlvbi4KICAgICAgICAgKi8KICAgICAgICBDbGljay5wcm90b3R5cGUub25DbGljayA9IGZ1bmN0aW9uIChjYWxsYmFjaykgewogICAgICAgICAgICB0aGlzLl9vbkNsaWNrQ2FsbGJhY2tzLmFkZChjYWxsYmFjayk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogUmVtb3ZlcyBhIGNhbGxiYWNrIHRoYXQgd291bGQgYmUgY2FsbGVkIHdoZW4gdGhlIENvbXBvbmVudCBpcyBjbGlja2VkLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtDbGlja0NhbGxiYWNrfSBjYWxsYmFjawogICAgICAgICAqIEByZXR1cm4ge0ludGVyYWN0aW9ucy5DbGlja30gVGhlIGNhbGxpbmcgQ2xpY2sgSW50ZXJhY3Rpb24uCiAgICAgICAgICovCiAgICAgICAgQ2xpY2sucHJvdG90eXBlLm9mZkNsaWNrID0gZnVuY3Rpb24gKGNhbGxiYWNrKSB7CiAgICAgICAgICAgIHRoaXMuX29uQ2xpY2tDYWxsYmFja3MuZGVsZXRlKGNhbGxiYWNrKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBBZGRzIGEgY2FsbGJhY2sgdG8gYmUgY2FsbGVkIHdoZW4gdGhlIENvbXBvbmVudCBpcyBkb3VibGUtY2xpY2tlZC4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7Q2xpY2tDYWxsYmFja30gY2FsbGJhY2sKICAgICAg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Q29uc3RyYWluKHBvaW50KSk7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIERyYWcucHJvdG90eXBlLl9lbmREcmFnID0gZnVuY3Rpb24gKHBvaW50LCBldmVudCkgewogICAgICAgICAgICBpZiAoZXZlbnQgaW5zdGFuY2VvZiBNb3VzZUV2ZW50ICYmIGV2ZW50LmJ1dHRvbiAhPT0gdGhpcy5fbW91c2VCdXR0b24pIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5fZHJhZ2dpbmcpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2RyYWdnaW5nID0gZmFsc2U7CiAgICAgICAgICAgICAgICB0aGlzLl9kcmFnRW5kQ2FsbGJhY2tzLmNhbGxDYWxsYmFja3ModGhpcy5fZHJhZ09yaWdpbiwgdGhpcy5fdHJhbnNsYXRlQW5kQ29uc3RyYWluKHBvaW50KSk7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIERyYWcucHJvdG90eXBlLmNvbnN0cmFpbmVkVG9Db21wb25lbnQgPSBmdW5jdGlvbiAoY29uc3RyYWluZWRUb0NvbXBvbmVudCkgewogICAgICAgICAgICBpZiAoY29uc3RyYWluZWRUb0NvbXBvbmVudCA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fY29uc3RyYWluZWRUb0NvbXBvbmVudDsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9jb25zdHJhaW5lZFRvQ29tcG9uZW50ID0gY29uc3RyYWluZWRUb0NvbXBvbmVudDsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBEcmFnLnByb3RvdHlwZS5tb3VzZUZpbHRlciA9IGZ1bmN0aW9uIChmaWx0ZXIpIHsKICAgICAgICAgICAgaWYgKGFyZ3VtZW50cy5sZW5ndGggPT09IDApIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9tb3VzZUZpbHRlcjsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9tb3VzZUZpbHRlciA9IGZpbHRlcjsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBBZGRzIGEgY2FsbGJhY2sgdG8gYmUgY2FsbGVkIHdoZW4gZHJhZ2dpbmcgc3RhcnRzLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtEcmFnQ2FsbGJhY2t9IGNhbGxiYWNrCiAgICAgICAgICogQHJldHVybnMge0RyYWd9IFRoZSBjYWxsaW5nIERyYWcgSW50ZXJhY3Rpb24uCiAgICAgICAgICovCiAgICAgICAgRHJhZy5wcm90b3R5cGUub25EcmFnU3RhcnQgPSBmdW5jdGlvbiAoY2FsbGJhY2spIHsKICAgICAgICAgICAgdGhpcy5fZHJhZ1N0YXJ0Q2FsbGJhY2tzLmFkZChjYWxsYmFjayk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogUmVtb3ZlcyBhIGNhbGxiYWNrIHRoYXQgd291bGQgYmUgY2FsbGVkIHdoZW4gZHJhZ2dpbmcgc3RhcnRzLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtEcmFnQ2FsbGJhY2t9IGNhbGxiYWNrCiAgICAgICAgICogQHJldHVybnMge0RyYWd9IFRoZSBjYWxsaW5nIERyYWcgSW50ZXJhY3Rpb24uCiAgICAgICAgICovCiAgICAgICAgRHJhZy5wcm90b3R5cGUub2ZmRHJhZ1N0YXJ0ID0gZnVuY3Rpb24gKGNhbGxiYWNrKSB7CiAgICAgICAgICAgIHRoaXMuX2RyYWdTdGFydENhbGxiYWNrcy5kZWxldGUoY2FsbGJhY2spOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIEFkZHMgYSBjYWxsYmFjayB0byBiZSBjYWxsZWQgZHVyaW5nIGRyYWdnaW5nLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtEcmFnQ2FsbGJhY2t9IGNhbGxiYWNrCiAgICAgICAgICogQHJldHVybnMge0RyYWd9IFRoZSBjYWxsaW5nIERyYWcgSW50ZXJhY3Rpb24uCiAgICAgICAgICovCiAgICAgICAgRHJhZy5wcm90b3R5cGUub25EcmFnID0gZnVuY3Rpb24gKGNhbGxiYWNrKSB7CiAgICAgICAgICAgIHRoaXMuX2RyYWdDYWxsYmFja3MuYWRkKGNhbGxiYWNrKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBSZW1vdmVzIGEgY2FsbGJhY2sgdGhhdCB3b3VsZCBiZSBjYWxsZWQgZHVyaW5nIGRyYWdnaW5nLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtEcmFnQ2FsbGJhY2t9IGNhbGxiYWNrCiAgICAgICAgICogQHJldHVybnMge0RyYWd9IFRoZSBjYWxsaW5nIERyYWcgSW50ZXJhY3Rpb24uCiAgICAgICAgICovCiAgICAgICAgRHJhZy5wcm90b3R5cGUub2ZmRHJhZyA9IGZ1bmN0aW9uIChjYWxsYmFjaykgewogICAgICAgICAgICB0aGlzLl9kcmFnQ2FsbGJhY2tzLmRlbGV0ZShjYWxsYmFjayk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogQWRkcyBhIGNhbGxiYWNrIHRvIGJlIGNhbGxlZCB3aGVuIGRyYWdnaW5nIGVuZHMuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0ge0RyYWdDYWxsYmFja30gY2FsbGJhY2sKICAgICAgICAgKiBAcmV0dXJucyB7RHJhZ30gVGhlIGNhbGxpbmcgRHJhZyBJbnRlcmFjdGlvbi4KICAgICAgICAgKi8KICAgICAgICBEcmFnLnByb3RvdHlwZS5vbkRyYW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vd25FdmVudCA9IGZ1bmN0aW9uIChrZXlDb2RlLCBldmVudCkgewogICAgICAgICAgICB2YXIgcCA9IHRoaXMuX3RyYW5zbGF0ZVRvQ29tcG9uZW50U3BhY2UodGhpcy5fcG9zaXRpb25EaXNwYXRjaGVyLmxhc3RNb3VzZVBvc2l0aW9uKCkpOwogICAgICAgICAgICBpZiAodGhpcy5faXNJbnNpZGVDb21wb25lbnQocCkgJiYgIWV2ZW50LnJlcGVhdCkgewogICAgICAgICAgICAgICAgaWYgKHRoaXMuX2tleVByZXNzQ2FsbGJhY2tzW2tleUNvZGVdKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fa2V5UHJlc3NDYWxsYmFja3Nba2V5Q29kZV0uY2FsbENhbGxiYWNrcyhrZXlDb2RlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuX2Rvd25lZEtleXMuYWRkKGtleUNvZGUpOwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBLZXkucHJvdG90eXBlLl9oYW5kbGVLZXlVcEV2ZW50ID0gZnVuY3Rpb24gKGtleUNvZGUpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX2Rvd25lZEtleXMuaGFzKGtleUNvZGUpICYmIHRoaXMuX2tleVJlbGVhc2VDYWxsYmFja3Nba2V5Q29kZV0pIHsKICAgICAgICAgICAgICAgIHRoaXMuX2tleVJlbGVhc2VDYWxsYmFja3Nba2V5Q29kZV0uY2FsbENhbGxiYWNrcyhrZXlDb2RlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9kb3duZWRLZXlzLmRlbGV0ZShrZXlDb2RlKTsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIEFkZHMgYSBjYWxsYmFjayB0byBiZSBjYWxsZWQgd2hlbiB0aGUga2V5IHdpdGggdGhlIGdpdmVuIGtleUNvZGUgaXMKICAgICAgICAgKiBwcmVzc2VkIGFuZCB0aGUgdXNlciBpcyBtb3VzZWQgb3ZlciB0aGUgQ29tcG9uZW50LgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IGtleUNvZGUKICAgICAgICAgKiBAcGFyYW0ge0tleUNhbGxiYWNrfSBjYWxsYmFjawogICAgICAgICAqIEByZXR1cm5zIHtJbnRlcmFjdGlvbnMuS2V5fSBUaGUgY2FsbGluZyBLZXkgSW50ZXJhY3Rpb24uCiAgICAgICAgICovCiAgICAgICAgS2V5LnByb3RvdHlwZS5vbktleVByZXNzID0gZnVuY3Rpb24gKGtleUNvZGUsIGNhbGxiYWNrKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5fa2V5UHJlc3NDYWxsYmFja3Nba2V5Q29kZV0pIHsKICAgICAgICAgICAgICAgIHRoaXMuX2tleVByZXNzQ2FsbGJhY2tzW2tleUNvZGVdID0gbmV3IHV0aWxzJDEuQ2FsbGJhY2tTZXQoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9rZXlQcmVzc0NhbGxiYWNrc1trZXlDb2RlXS5hZGQoY2FsbGJhY2spOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIFJlbW92ZXMgYSBjYWxsYmFjayB0aGF0IHdvdWxkIGJlIGNhbGxlZCB3aGVuIHRoZSBrZXkgd2l0aCB0aGUgZ2l2ZW4ga2V5Q29kZSBpcwogICAgICAgICAqIHByZXNzZWQgYW5kIHRoZSB1c2VyIGlzIG1vdXNlZCBvdmVyIHRoZSBDb21wb25lbnQuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0ga2V5Q29kZQogICAgICAgICAqIEBwYXJhbSB7S2V5Q2FsbGJhY2t9IGNhbGxiYWNrCiAgICAgICAgICogQHJldHVybnMge0ludGVyYWN0aW9ucy5LZXl9IFRoZSBjYWxsaW5nIEtleSBJbnRlcmFjdGlvbi4KICAgICAgICAgKi8KICAgICAgICBLZXkucHJvdG90eXBlLm9mZktleVByZXNzID0gZnVuY3Rpb24gKGtleUNvZGUsIGNhbGxiYWNrKSB7CiAgICAgICAgICAgIHRoaXMuX2tleVByZXNzQ2FsbGJhY2tzW2tleUNvZGVdLmRlbGV0ZShjYWxsYmFjayk7CiAgICAgICAgICAgIGlmICh0aGlzLl9rZXlQcmVzc0NhbGxiYWNrc1trZXlDb2RlXS5zaXplID09PSAwKSB7CiAgICAgICAgICAgICAgICBkZWxldGUgdGhpcy5fa2V5UHJlc3NDYWxsYmFja3Nba2V5Q29kZV07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBBZGRzIGEgY2FsbGJhY2sgdG8gYmUgY2FsbGVkIHdoZW4gdGhlIGtleSB3aXRoIHRoZSBnaXZlbiBrZXlDb2RlIGlzCiAgICAgICAgICogcmVsZWFzZWQgaWYgdGhlIGtleSB3YXMgcHJlc3NlZCB3aXRoIHRoZSBtb3VzZSBpbnNpZGUgb2YgdGhlIENvbXBvbmVudC4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBrZXlDb2RlCiAgICAgICAgICogQHBhcmFtIHtLZXlDYWxsYmFja30gY2FsbGJhY2sKICAgICAgICAgKiBAcmV0dXJucyB7SW50ZXJhY3Rpb25zLktleX0gVGhlIGNhbGxpbmcgS2V5IEludGVyYWN0aW9uLgogICAgICAgICAqLwogICAgICAgIEtleS5wcm90b3R5cGUub25LZXlSZWxlYXNlID0gZnVuY3Rpb24gKGtleUNvZGUsIGNhbGxiYWNrKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5fa2V5UmVsZWFzZUNhbGxiYWNrc1trZXlDb2RlXSkgewogICAgICAgICAgICAgICAgdGhpcy5fa2V5UmVsZWFzZUNhbGxiYWNrc1trZXlDb2RlXSA9IG5ldyB1dGlscyQxLkNhbGxiYWNrU2V0KCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fa2V5UmVsZWFzZUNhbGxiYWNrc1trZXlDb2RlXS5hZGQoY2FsbGJhY2spOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIFJlbW92ZXMgYSBjYWxsYmFjayB0aGF0IHdvdWxkIGJlIGNhbGxlZCB3aGVuIHRoZSBrZXkgd2l0aCB0aGUgZ2l2ZW4ga2V5Q29kZSBpcwogICAgICAgICAqIHJlbGVhc2VkIGlmIHRoZSBrZXkgd2FzIHByZXNzZWQgd2l0aCB0aGUgbW91c2UgaW5zaWRlIG9mIHRoZSBDb21wb25lbnQuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0ga2V5Q29kZQogICAgICAgICAqIEBwYXJhbSB7S2V5Q2FsbGJhY2t9IGNhbGxiYWNrCiAgICAgICAgICogQHJldHVybnMge0ludGVyYWN0aW9ucy5LZXl9IFRoZSBjYWxsaW5nIEtleSBJbnRlcmFjdGlvbi4KICAgICAgICAgKi8KICAgICAgICBLZXkucHJvdG90eXBlLm9mZktleVJlbGVhc2UgPSBmdW5jdGlvbiAoa2V5Q29kZSwgY2FsbGJhY2spIHsKICAgICAgICAgICAgdGhpcy5fa2V5UmVsZWFzZUNhbGxiYWNrc1trZXlDb2RlXS5kZWxldGUoY2FsbGJhY2spOwogICAgICAgICAgICBpZiAodGhpcy5fa2V5UmVsZWFzZUNhbGxiYWNrc1trZXlDb2RlXS5zaXplID09PSAwKSB7CiAgICAgICAgICAgICAgICBkZWxldGUgdGhpcy5fa2V5UmVsZWFzZUNhbGxiYWNrc1trZXlDb2RlXTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIHJldHVybiBLZXk7CiAgICB9KGludGVyYWN0aW9uLkludGVyYWN0aW9uKSk7CiAgICBleHBvcnRzLktleSA9IEtleTsKICAgIH0pOwoKICAgIHZhciBwYW5ab29tSW50ZXJhY3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V3IHV0aWxzJDEuU2V0KCk7CiAgICAgICAgICAgIF90aGlzLl95U2NhbGVzID0gbmV3IHV0aWxzJDEuU2V0KCk7CiAgICAgICAgICAgIF90aGlzLl9kcmFnSW50ZXJhY3Rpb24gPSBuZXcgaW50ZXJhY3Rpb25zLkRyYWcoKTsKICAgICAgICAgICAgX3RoaXMuX3NldHVwRHJhZ0ludGVyYWN0aW9uKCk7CiAgICAgICAgICAgIF90aGlzLl90b3VjaElkcyA9IGQzLm1hcCgpOwogICAgICAgICAgICBfdGhpcy5fbWluRG9tYWluRXh0ZW50cyA9IG5ldyB1dGlscyQxLk1hcCgpOwogICAgICAgICAgICBfdGhpcy5fbWF4RG9tYWluRXh0ZW50cyA9IG5ldyB1dGlscyQxLk1hcCgpOwogICAgICAgICAgICBfdGhpcy5fbWluRG9tYWluVmFsdWVzID0gbmV3IHV0aWxzJDEuTWFwKCk7CiAgICAgICAgICAgIF90aGlzLl9tYXhEb21haW5WYWx1ZXMgPSBuZXcgdXRpbHMkMS5NYXAoKTsKICAgICAgICAgICAgaWYgKHhTY2FsZSAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICBfdGhpcy5hZGRYU2NhbGUoeFNjYWxlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoeVNjYWxlICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIF90aGlzLmFkZFlTY2FsZSh5U2NhbGUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBfdGhpczsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogR2V0IHRoZSBiYWNraW5nIGRyYWcgaW50ZXJhY3Rpb24uIFVzZWZ1bCB0byBjdXN0b21pemUgdGhlIHBhbnpvb20gaW50ZXJhY3Rpb24uCiAgICAgICAgICogQHJldHVybnMge0RyYWd9CiAgICAgICAgICovCiAgICAgICAgUGFuWm9vbS5wcm90b3R5cGUuZHJhZ0ludGVyYWN0aW9uID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fZHJhZ0ludGVyYWN0aW9uOwogICAgICAgIH07CiAgICAgICAgUGFuWm9vbS5wcm90b3R5cGUud2hlZWxGaWx0ZXIgPSBmdW5jdGlvbiAoZmlsdGVyKSB7CiAgICAgICAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoID09PSAwKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fd2hlZWxGaWx0ZXI7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fd2hlZWxGaWx0ZXIgPSBmaWx0ZXI7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogUGFucyB0aGUgY2hhcnQgYnkgYSBzcGVjaWZpZWQgYW1vdW50CiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0ge1Bsb3R0YWJsZS5Qb2ludH0gW3RyYW5zbGF0ZUFtb3VudF0gVGhlIGFtb3VudCBieSB3aGljaCB0byB0cmFuc2xhdGUgdGhlIHggYW5kIHkgc2NhbGVzLgogICAgICAgICAqLwogICAgICAgIFBhblpvb20ucHJvdG90eXBlLnBhbiA9IGZ1bmN0aW9uICh0cmFuc2xhdGVBbW91bnQpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgdGhpcy54U2NhbGVzKCkuZm9yRWFjaChmdW5jdGlvbiAoeFNjYWxlKSB7CiAgICAgICAgICAgICAgICB4U2NhbGUucGFuKF90aGlzLl9jb25zdHJhaW5lZFRyYW5zbGF0aW9uKHhTY2FsZSwgdHJhbnNsYXRlQW1vdW50LngpKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHRoaXMueVNjYWxlcygpLmZvckVhY2goZnVuY3Rpb24gKHlTY2FsZSkgewogICAgICAgICAgICAgICAgeVNjYWxlLnBhbihfdGhpcy5fY29uc3RyYWluZWRUcmFuc2xhdGlvbih5U2NhbGUsIHRyYW5zbGF0ZUFtb3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bnN0cmFpbmVkID09PSB2b2lkIDApIHsgY29uc3RyYWluZWQgPSB0cnVlOyB9CiAgICAgICAgICAgIHZhciBjZW50ZXJYOwogICAgICAgICAgICB2YXIgY2VudGVyWTsKICAgICAgICAgICAgaWYgKGNlbnRlclZhbHVlICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIGNlbnRlclggPSBjZW50ZXJWYWx1ZS54OwogICAgICAgICAgICAgICAgY2VudGVyWSA9IGNlbnRlclZhbHVlLnk7CiAgICAgICAgICAgICAgICBpZiAoY29uc3RyYWluZWQpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLnhTY2FsZXMoKS5mb3JFYWNoKGZ1bmN0aW9uICh4U2NhbGUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGNvbnN0cmFpbmVkID0gX3RoaXMuX2NvbnN0cmFpbmVkWm9vbSh4U2NhbGUsIHpvb21BbW91bnQsIGNlbnRlclgpOwogICAgICAgICAgICAgICAgICAgICAgICBjZW50ZXJYID0gY29uc3RyYWluZWQuY2VudGVyUG9pbnQ7CiAgICAgICAgICAgICAgICAgICAgICAgIHpvb21BbW91bnQgPSBjb25zdHJhaW5lZC56b29tQW1vdW50OwogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgIHRoaXMueVNjYWxlcygpLmZvckVhY2goZnVuY3Rpb24gKHlTY2FsZSkgewogICAgICAgICAgICAgICAgICAgICAgICB2YXIgY29uc3RyYWluZWQgPSBfdGhpcy5fY29uc3RyYWluZWRab29tKHlTY2FsZSwgem9vbUFtb3VudCwgY2VudGVyWSk7CiAgICAgICAgICAgICAgICAgICAgICAgIGNlbnRlclkgPSBjb25zdHJhaW5lZC5jZW50ZXJQb2ludDsKICAgICAgICAgICAgICAgICAgICAgICAgem9vbUFtb3VudCA9IGNvbnN0cmFpbmVkLnpvb21BbW91bnQ7CiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy54U2NhbGVzKCkuZm9yRWFjaChmdW5jdGlvbiAoeFNjYWxlKSB7CiAgICAgICAgICAgICAgICB2YXIgcmFuZ2UgPSB4U2NhbGUucmFuZ2UoKTsKICAgICAgICAgICAgICAgIHZhciB4Q2VudGVyID0gY2VudGVyWCA9PSBudWxsCiAgICAgICAgICAgICAgICAgICAgPyAocmFuZ2VbMV0gKyByYW5nZVswXSkgLyAyCiAgICAgICAgICAgICAgICAgICAgOiBjZW50ZXJYOwogICAgICAgICAgICAgICAgeFNjYWxlLnpvb20oem9vbUFtb3VudCwgeENlbnRlcik7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICB0aGlzLnlTY2FsZXMoKS5mb3JFYWNoKGZ1bmN0aW9uICh5U2NhbGUpIHsKICAgICAgICAgICAgICAgIHZhciByYW5nZSA9IHlTY2FsZS5yYW5nZSgpOwogICAgICAgICAgICAgICAgdmFyIHlDZW50ZXIgPSBjZW50ZXJZID09IG51bGwKICAgICAgICAgICAgICAgICAgICA/IChyYW5nZVsxXSArIHJhbmdlWzBdKSAvIDIKICAgICAgICAgICAgICAgICAgICA6IGNlbnRlclk7CiAgICAgICAgICAgICAgICB5U2NhbGUuem9vbSh6b29tQW1vdW50LCB5Q2VudGVyKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHRoaXMuX3Bhblpvb21VcGRhdGVDYWxsYmFja3MuY2FsbENhbGxiYWNrcygpOwogICAgICAgICAgICByZXR1cm4geyB6b29tQW1vdW50OiB6b29tQW1vdW50LCBjZW50ZXJWYWx1ZTogeyBjZW50ZXJYOiBjZW50ZXJYLCBjZW50ZXJZOiBjZW50ZXJZIH0gfTsKICAgICAgICB9OwogICAgICAgIFBhblpvb20ucHJvdG90eXBlLl9hbmNob3IgPSBmdW5jdGlvbiAoY29tcG9uZW50KSB7CiAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUuX2FuY2hvci5jYWxsKHRoaXMsIGNvbXBvbmVudCk7Ci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ZSgpIDwgMikgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciBvbGRQb2ludHMgPSB0aGlzLl90b3VjaElkcy52YWx1ZXMoKTsKICAgICAgICAgICAgaWYgKCF0aGlzLl9pc0luc2lkZUNvbXBvbmVudCh0aGlzLl90cmFuc2xhdGVUb0NvbXBvbmVudFNwYWNlKG9sZFBvaW50c1swXSkpIHx8ICF0aGlzLl9pc0luc2lkZUNvbXBvbmVudCh0aGlzLl90cmFuc2xhdGVUb0NvbXBvbmVudFNwYWNlKG9sZFBvaW50c1sxXSkpKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIG9sZENvcm5lckRpc3RhbmNlID0gUGFuWm9vbS5fcG9pbnREaXN0YW5jZShvbGRQb2ludHNbMF0sIG9sZFBvaW50c1sxXSk7CiAgICAgICAgICAgIGlmIChvbGRDb3JuZXJEaXN0YW5jZSA9PT0gMCkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlkcy5mb3JFYWNoKGZ1bmN0aW9uIChpZCkgewogICAgICAgICAgICAgICAgaWYgKF90aGlzLl90b3VjaElkcy5oYXMoaWQudG9TdHJpbmcoKSkpIHsKICAgICAgICAgICAgICAgICAgICBfdGhpcy5fdG91Y2hJZHMuc2V0KGlkLnRvU3RyaW5nKCksIF90aGlzLl90cmFuc2xhdGVUb0NvbXBvbmVudFNwYWNlKGlkVG9Qb2ludFtpZF0pKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHZhciBwb2ludHMgPSB0aGlzLl90b3VjaElkcy52YWx1ZXMoKTsKICAgICAgICAgICAgdmFyIG5ld0Nvcm5lckRpc3RhbmNlID0gUGFuWm9vbS5fcG9pbnREaXN0YW5jZShwb2ludHNbMF0sIHBvaW50c1sxXSk7CiAgICAgICAgICAgIGlmIChuZXdDb3JuZXJEaXN0YW5jZSA9PT0gMCkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciBpbml0TWFnbmlmeUFtb3VudCA9IG9sZENvcm5lckRpc3RhbmNlIC8gbmV3Q29ybmVyRGlzdGFuY2U7CiAgICAgICAgICAgIHZhciBub3JtYWxpemVkUG9pbnREaWZmcyA9IHBvaW50cy5tYXAoZnVuY3Rpb24gKHBvaW50LCBpKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgICAgIHg6IChwb2ludC54IC0gb2xkUG9pbnRzW2ldLngpIC8gaW5pdE1hZ25pZnlBbW91bnQsCiAgICAgICAgICAgICAgICAgICAgeTogKHBvaW50LnkgLSBvbGRQb2ludHNbaV0ueSkgLyBpbml0TWFnbmlmeUFtb3VudCwKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICB2YXIgb2xkQ2VudGVyUG9pbnQgPSBQYW5ab29tLmNlbnRlclBvaW50KG9sZFBvaW50c1swXSwgb2xkUG9pbnRzWzFdKTsKICAgICAgICAgICAgdmFyIF9hID0gdGhpcy56b29tKGluaXRNYWduaWZ5QW1vdW50LCBvbGRDZW50ZXJQb2ludCksIGNlbnRlclZhbHVlID0gX2EuY2VudGVyVmFsdWUsIHpvb21BbW91bnQgPSBfYS56b29tQW1vdW50OwogICAgICAgICAgICB2YXIgY2VudGVyWCA9IGNlbnRlclZhbHVlLmNlbnRlclgsIGNlbnRlclkgPSBjZW50ZXJWYWx1ZS5jZW50ZXJZOwogICAgICAgICAgICB2YXIgY29uc3RyYWluZWRQb2ludHMgPSBvbGRQb2ludHMubWFwKGZ1bmN0aW9uIChvbGRQb2ludCwgaSkgewogICAgICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgICAgICB4OiBub3JtYWxpemVkUG9pbnREaWZmc1tpXS54ICogem9vbUFtb3VudCArIG9sZFBvaW50LngsCiAgICAgICAgICAgICAgICAgICAgeTogbm9ybWFsaXplZFBvaW50RGlmZnNbaV0ueSAqIHpvb21BbW91bnQgKyBvbGRQb2ludC55LAogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHZhciB0cmFuc2xhdGVBbW91bnQgPSB7CiAgICAgICAgICAgICAgICB4OiBjZW50ZXJYIC0gKChjb25zdHJhaW5lZFBvaW50c1swXS54ICsgY29uc3RyYWluZWRQb2ludHNbMV0ueCkgLyAyKSwKICAgICAgICAgICAgICAgIHk6IGNlbnRlclkgLSAoKGNvbnN0cmFpbmVkUG9pbnRzWzBdLnkgKyBjb25zdHJhaW5lZFBvaW50c1sxXS55KSAvIDIpLAogICAgICAgICAgICB9OwogICAgICAgICAgICB0aGlzLnBhbih0cmFuc2xhdGVBbW91bnQpOwogICAgICAgIH07CiAgICAgICAgUGFuWm9vbS5jZW50ZXJQb2ludCA9IGZ1bmN0aW9uIChwb2ludDEsIHBvaW50MikgewogICAgICAgICAgICB2YXIgbGVmdFggPSBNYXRoLm1pbihwb2ludDEueCwgcG9pbnQyLngpOwogICAgICAgICAgICB2YXIgcmlnaHRYID0gTWF0aC5tYXgocG9pbnQxLngsIHBvaW50Mi54KTsKICAgICAgICAgICAgdmFyIHRvcFkgPSBNYXRoLm1pbihwb2ludDEueSwgcG9pbnQyLnkpOwogICAgICAgICAgICB2YXIgYm90dG9tWSA9IE1hdGgubWF4KHBvaW50MS55LCBwb2ludDIueSk7CiAgICAgICAgICAgIHJldHVybiB7IHg6IChsZWZ0WCArIHJpZ2h0WCkgLyAyLCB5OiAoYm90dG9tWSArIHRvcFkpIC8gMiB9OwogICAgICAgIH07CiAgICAgICAgUGFuWm9vbS5fcG9pbnREaXN0YW5jZSA9IGZ1bmN0aW9uIChwb2ludDEsIHBvaW50MikgewogICAgICAgICAgICB2YXIgbGVmdFggPSBNYXRoLm1pbihwb2ludDEueCwgcG9pbnQyLngpOwogICAgICAgICAgICB2YXIgcmlnaHRYID0gTWF0aC5tYXgocG9pbnQxLngsIHBvaW50Mi54KTsKICAgICAgICAgICAgdmFyIHRvcFkgPSBNYXRoLm1pbihwb2ludDEueSwgcG9pbnQyLnkpOwogICAgICAgICAgICB2YXIgYm90dG9tWSA9IE1hdGgubWF4KHBvaW50MS55LCBwb2ludDIueSk7CiAgICAgICAgICAgIHJldHVybiBNYXRoLnNxcnQoTWF0aC5wb3cocmlnaHRYIC0gbGVmdFgsIDIpICsgTWF0aC5wb3coYm90dG9tWSAtIHRvcFksIDIpKTsKICAgICAgICB9OwogICAgICAgIFBhblpvb20ucHJvdG90eXBlLl9oYW5kbGVUb3VjaEVuZCA9IGZ1bmN0aW9uIChpZHMsIGlkVG9Qb2ludCwgZSkgewogICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwogICAgICAgICAgICBpZHMuZm9yRWFjaChmdW5jdGlvbiAoaWQpIHsKICAgICAgICAgICAgICAgIF90aGlzLl90b3VjaElkcy5yZW1vdmUoaWQudG9TdHJpbmcoKSk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBpZiAodGhpcy5fdG91Y2hJZHMuc2l6ZSgpID4gMCkgewogICAgICAgICAgICAgICAgdGhpcy5fem9vbUVuZENhbGxiYWNrcy5jYWxsQ2FsbGJhY2tzKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIFBhblpvb20ucHJvdG90eXBlLl9oYW5kbGVXaGVlbEV2ZW50ID0gZnVuY3Rpb24gKHAsIGUpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLl93aGVlbEZpbHRlcihlKSkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciB0cmFuc2xhdGVkUCA9IHRoaXMuX3RyYW5zbGF0ZVRvQ29tcG9uZW50U3BhY2UocCk7CiAgICAgICAgICAgIGlmICh0aGlzLl9pc0luc2lkZUNvbXBvbmVudCh0cmFuc2xhdGVkUCkpIHsKICAgICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTsKICAgICAgICAgICAgICAgIC8vIGluIGNhc2VzIHdoZXJlIG9ubHkgaG9yaXpvbnRhbCBzY3JvbGwgaXMgcHJlc2VudCwgdXNlIHRoYXQgaW4gbGlldSBvZiBub3RoaW5nLgogICAgICAgICAgICAgICAgdmFyIGRlbHRhQW1vdW50ID0gZS5kZWx0YVkgIT09IDAgPyBlLmRlbHRhWSA6IGUuZGVsdGFYOwogICAgICAgICAgICAgICAgdmFyIGRlbHRhUGl4ZWxBbW91bnQgPSBkZWx0YUFtb3VudCAqIChlLmRlbHRhTW9kZSA/IFBhblpvb20uX1BJWEVMU19QRVJfTElORSA6IDEpOwogICAgICAgICAgICAgICAgdmFyIHpvb21BbW91bnQgPSBNYXRoLnBvdygyLCBkZWx0YVBpeGVsQW1vdW50ICogLjAwMik7CiAgICAgICAgICAgICAgICB0aGlzLnpvb20oem9vbUFtb3VudCwgdHJhbnNsYXRlZFApOwogICAgICAgICAgICAgICAgdGhpcy5fem9vbUVuZENhbGxiYWNrcy5jYWxsQ2FsbGJhY2tzKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIFBhblpvb20ucHJvdG90eXBlLl9jb25zdHJhaW5lZFpvb20gPSBmdW5jdGlvbiAoc2NhbGUsIHpvb21BbW91bnQsIGNlbnRlclBvaW50KSB7CiAgICAgICAgICAgIHJldHVybiBwYW5ab29tQ29uc3RyYWludHMuY29uc3RyYWluZWRab29tKHNjYWxlLCB6b29tQW1vdW50LCBjZW50ZXJQb2ludCwgdGhpcy5taW5Eb21haW5FeHRlbnQoc2NhbGUpLCB0aGlzLm1heERvbWFpbkV4dGVudChzY2FsZSksIHRoaXMubWluRG9tYWluVmFsdWUoc2NhbGUpLCB0aGlzLm1heERvbWFpblZhbHVlKHNjYWxlKSk7CiAgICAgICAgfTsKICAgICAgICBQYW5ab29tLnByb3RvdHlwZS5fY29uc3RyYWluZWRUcmFuc2xhdGlvbiA9IGZ1bmN0aW9uIChzY2FsZSwgdHJhbnNsYXRpb24pIHsKICAgICAgICAgICAgcmV0dXJuIHBhblpvb21Db25zdHJhaW50cy5jb25zdHJhaW5lZFRyYW5zbGF0aW9uKHNjYWxlLCB0cmFuc2xhdGlvbiwgdGhpcy5taW5Eb21haW5WYWx1ZShzY2FsZSksIHRoaXMubWF4RG9tYWluVmFsdWUoc2NhbGUpKTsKICAgICAgICB9OwogICAgICAgIFBhblpvb20ucHJvdG90eXBlLl9zZXR1cERyYWdJbnRlcmFjdGlvbiA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgdGhpcy5fZHJhZ0ludGVyYWN0aW9uLmNvbnN0cmFpbmVkVG9Db21wb25lbnQoZmFsc2UpOwogICAgICAgICAgICB2YXIgbGFzdERyYWdQb2ludDsKICAgICAgICAgICAgdGhpcy5fZHJhZ0ludGVyYWN0aW9uLm9uRHJhZ1N0YXJ0KGZ1bmN0aW9uICgpIHsgcmV0dXJuIGxhc3REcmFnUG9pbnQgPSBudWxsOyB9KTsKICAgICAgICAgICAgdGhpcy5fZHJhZ0ludGVyYWN0aW9uLm9uRHJhZyhmdW5jdGlvbiAoc3RhcnRQb2ludCwgZW5kUG9pbnQpIHsKICAgICAgICAgICAgICAgIGlmIChfdGhpcy5fdG91Y2hJZHMuc2l6ZSgpID49IDIpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB2YXIgdHJhbnNsYXRlQW1vdW50ID0gewogICAgICAgICAgICAgICAgICAgIHg6IChsYXN0RHJhZ1BvaW50ID09IG51bGwgPyBzdGFydFBvaW50LnggOiBsYXN0RHJhZ1BvaW50LngpIC0gZW5kUG9pbnQueCwKICAgICAgICAgICAgICAgICAgICB5OiAobGFzdERyYWdQb2ludCA9PSBudWxsID8gc3RhcnRQb2ludC55IDogbGFzdERyYWdQb2ludC55KSAtIGVuZFBvaW50LnksCiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgX3RoaXMucGFuKHRyYW5zbGF0ZUFtb3VudCk7CiAgICAgICAgICAgICAgICBsYXN0RHJhZ1BvaW50ID0gZW5kUG9pbnQ7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICB0aGlzLl9kcmFnSW50ZXJhY3Rpb24ub25EcmFnRW5kKGZ1bmN0aW9uICgpIHsgcmV0dXJuIF90aGlzLl9wYW5FbmRDYWxsYmFja3MuY2FsbENhbGxiYWNrcygpOyB9KTsKICAgICAgICB9OwogICAgICAgIFBhblpvb20ucHJvdG90eXBlLl9ub25MaW5lYXJTY2FsZVdpdGhFeHRlbnRzID0gZnVuY3Rpb24gKHNjYWxlKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLm1pbkRvbWFpbkV4dGVudChzY2FsZSkgIT0gbnVsbCAmJiB0aGlzLm1heERvbWFpbkV4dGVudChzY2FsZSkgIT0gbnVsbCAmJiAhKHNjYWxlIGluc3RhbmNlb2Ygc2NhbGVzLkxpbmVhcikgJiYgIShzY2FsZSBpbnN0YW5jZW9mIHNjYWxlcy5UaW1lKTsKICAgICAgICB9OwogICAgICAgIFBhblpvb20ucHJvdG90eXBlLnhTY2FsZXMgPSBmdW5jdGlvbiAoeFNjYWxlcykgewogICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwogICAgICAgICAgICBpZiAoeFNjYWxlcyA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICB2YXIgc2NhbGVzXzEgPSBbXTsKICAgICAgICAgICAgICAgIHRoaXMuX3hTY2FsZXMuZm9yRWFjaChmdW5jdGlvbiAoeFNjYWxlKSB7CiAgICAgICAgICAgICAgICAgICAgc2NhbGVzXzEucHVzaCh4U2NhbGUpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICByZXR1cm4gc2NhbGVzXzE7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5feFNjYWxlcyA9IG5ldyB1dGlscyQxLlNldCgpOwogICAgICAgICAgICB4U2NhbGVzLmZvckVhY2goZnVuY3Rpb24gKHhTY2FsZSkgewogICAgICAgICAgICAgICAgX3RoaXMuYWRkWFNjYWxlKHhTY2FsZSk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIFBhblpvb20ucHJvdG90eXBlLnlTY2FsZXMgPSBmdW5jdGlvbiAoeVNjYWxlcykgewogICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwogICAgICAgICAgICBpZiAoeVNjYWxlcyA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICB2YXIgc2NhbGVzXzIgPSBbXTsKICAgICAgICAgICAgICAgIHRoaXMuX3lTY2FsZXMuZm9yRWFjaChmdW5jdGlvbiAoeVNjYWxlKSB7CiAgICAgICAgICAgICAgICAgICAgc2NhbGVzXzIucHVzaCh5U2NhbGUpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICByZXR1cm4gc2NhbGVzXzI7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5feVNjYWxlcyA9IG5ldyB1dGlscyQxLlNldCgpOwogICAgICAgICAgICB5U2NhbGVzLmZvckVhY2goZnVuY3Rpb24gKHlTY2FsZSkgewogICAgICAgICAgICAgICAgX3RoaXMuYWRkWVNjYWxlKHlTY2FsZSk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIEFkZHMgYW4geCBzY2FsZSB0byB0aGlzIFBhblpvb20gSW50ZXJhY3Rpb24KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7VHJhbnNmb3JtYWJsZVNjYWxlfSBBbiB4IHNjYWxlIHRvIGFkZAogICAgICAgICAqIEByZXR1cm5zIHtJbnRlcmFjdGlvbnMuUGFuWm9vbX0gVGhlIGNhbGxpbmcgUGFuWm9vbSBJbnRlcmFjdGlvbi4KICAgICAgICAgKi8KICAgICAgICBQYW5ab29tLnByb3RvdHlwZS5hZGRYU2NhbGUgPSBmdW5jdGlvbiAoeFNjYWxlKSB7CiAgICAgICAgICAgIHRoaXMuX3hTY2FsZXMuYWRkKHhTY2FsZSk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogUmVtb3ZlcyBhbiB4IHNjYWxlIGZyb20gdGhpcyBQYW5ab29tIEludGVyYWN0aW9uCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0ge1RyYW5zZm9ybWFibGVTY2FsZX0gQW4geCBzY2FsZSB0byByZW1vdmUKICAgICAgICAgKiBAcmV0dXJucyB7SW50ZXJhY3Rpb25zLlBhblpvb219IFRoZSBjYWxsaW5nIFBhblpvb20gSW50ZXJhY3Rpb24uCiAgICAgICAgICovCiAgICAgICAgUGFuWm9vbS5wcm90b3R5cGUucmVtb3ZlWFNjYWxlID0gZnVuY3Rpb24gKHhTY2FsZSkgewogICAgICAgICAgICB0aGlzLl94U2NhbGVzLmRlbGV0ZSh4U2NhbGUpOwogICAgICAgICAgICB0aGlzLl9taW5Eb21haW5FeHRlbnRzLmRlbGV0ZSh4U2NhbGUpOwogICAgICAgICAgICB0aGlzLl9tYXhEb21haW5FeHRlbnRzLmRlbGV0ZSh4U2NhbGUpOwogICAgICAgICAgICB0aGlzLl9taW5Eb21haW5WYWx1ZXMuZGVsZXRlKHhTY2FsZSk7CiAgICAgICAgICAgIHRoaXMuX21heERvbWFpblZhbHVlcy5kZWxldGUoeFNjYWxlKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBBZGRzIGEgeSBzY2FsZSB0byB0aGlzIFBhblpvb20gSW50ZXJhY3Rpb24KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7VHJhbnNmb3JtYWJsZVNjYWxlfSBBIHkgc2NhbGUgdG8gYWRkCiAgICAgICAgICogQHJldHVybnMge0ludGVyYWN0aW9ucy5QYW5ab29tfSBUaGUgY2FsbGluZyBQYW5ab29tIEludGVyYWN0aW9uLgogICAgICAgICAqLwogICAgICAgIFBhblpvb20ucHJvdG90eXBlLmFkZFlTY2FsZSA9IGZ1bmN0aW9uICh5U2NhbGUpIHsKICAgICAgICAgICAgdGhpcy5feVNjYWxlcy5hZGQoeVNjYWxlKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBSZW1vdmVzIGEgeSBzY2FsZSBmcm9tIHRoaXMgUGFuWm9vbSBJbnRlcmFjdGlvbgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtUcmFuc2Zvcm1hYmxlU2NhbGV9IEEgeSBzY2FsZSB0byByZW1vdmUKICAgICAgICAgKiBAcmV0dXJucyB7SW50ZXJhY3Rpb25zLlBhblpvb219IFRoZSBjYWxsaW5nIFBhblpvb20gSW50ZXJhY3Rpb24uCiAgICAgICAgICovCiAgICAgICAgUGFuWm9vbS5wcm90b3R5cGUucmVtb3ZlWVNjYWxlID0gZnVuY3Rpb24gKHlTY2FsZSkgewogICAgICAgICAgICB0aGlzLl95U2NhbGVzLmRlbGV0ZSh5U2NhbGUpOwogICAgICAgICAgICB0aGlzLl9taW5Eb21haW5FeHRlbnRzLmRlbGV0ZSh5U2NhbGUpOwogICAgICAgICAgICB0aGlzLl9tYXhEb21haW5FeHRlbnRzLmRlbGV0ZSh5U2NhbGUpOwogICAgICAgICAgICB0aGlzLl9taW5Eb21haW5WYWx1ZXMuZGVsZXRlKHlTY2FsZSk7CiAgICAgICAgICAgIHRoaXMuX21heERvbWFpblZhbHVlcy5kZWxldGUoeVNjYWxlKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBQYW5ab29tLnByb3RvdHlwZS5taW5Eb21haW5FeHRlbnQgPSBmdW5jdGlvbiAoc2NhbGUsIG1pbkRvbWFpbkV4dGVudCkgewogICAgICAgICAgICBpZiAobWluRG9tYWluRXh0ZW50ID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9taW5Eb21haW5FeHRlbnRzLmdldChzY2FsZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKG1pbkRvbWFpbkV4dGVudC52YWx1ZU9mKCkgPCAwKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoImV4dGVudCBtdXN0IGJlIG5vbi1uZWdhdGl2ZSIpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciBtYXhFeHRlbnRGb3JTY2FsZSA9IHRoaXMubWF4RG9tYWluRXh0ZW50KHNjYWxlKTsKICAgICAgICAgICAgaWYgKG1heEV4dGVudEZvclNjYWxlICE9IG51bGwgJiYgbWF4RXh0ZW50Rm9yU2NhbGUudmFsdWVPZigpIDwgbWluRG9tYWluRXh0ZW50LnZhbHVlT2YoKSkgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCJtaW5Eb21haW5FeHRlbnQgbXVzdCBiZSBzbWFsbGVyIHRoYW4gbWF4RG9tYWluRXh0ZW50IGZvciB0aGUgc2FtZSBTY2FsZSIpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0aGlzLl9ub25MaW5lYXJTY2FsZVdpdGhFeHRlbnRzKHNjYWxlKSkgewogICAgICAgICAgICAgICAgdXRpbHMkMS5XaW5kb3cud2FybigiUGFubmluZyBhbmQgem9vbWluZyB3aXRoIGV4dGVudHMgb24gYSBub25saW5lYXIgc2NhbGUgbWF5IGhhdmUgdW5pbnRlbmRlZCBiZWhhdmlvci4iKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9taW5Eb21haW5FeHRlbnRzLnNldChzY2FsZSwgbWluRG9tYWluRXh0ZW50KTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBQYW5ab29tLnByb3RvdHlwZS5tYXhEb21haW5FeHRlbnQgPSBmdW5jdGlvbiAoc2NhbGUsIG1heERvbWFpbkV4dGVudCkgewogICAgICAgICAgICBpZiAobWF4RG9tYWluRXh0ZW50ID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9tYXhEb21haW5FeHRlbnRzLmdldChzY2FsZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKG1heERvbWFpbkV4dGVudC52YWx1ZU9mKCkgPD0gMCkgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCJleHRlbnQgbXVzdCBiZSBwb3NpdGl2ZSIpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciBtaW5FeHRlbnRGb3JTY2FsZSA9IHRoaXMubWluRG9tYWluRXh0ZW50KHNjYWxlKTsKICAgICAgICAgICAgaWYgKG1pbkV4dGVudEZvclNjYWxlICE9IG51bGwgJiYgbWF4RG9tYWluRXh0ZW50LnZhbHVlT2YoKSA8IG1pbkV4dGVudEZvclNjYWxlLnZhbHVlT2YoKSkgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCJtYXhEb21haW5FeHRlbnQgbXVzdCBiZSBsYXJnZXIgdGhhbiBtaW5Eb21haW5FeHRlbnQgZm9yIHRoZSBzYW1lIFNjYWxlIik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHRoaXMuX25vbkxpbmVhclNjYWxlV2l0aEV4dGVudHMoc2NhbGUpKSB7CiAgICAgICAgICAgICAgICB1dGlscyQxLldpbmRvdy53YXJuKCJQYW5uaW5nIGFuZCB6b29taW5nIHdpdGggZXh0ZW50cyBvbiBhIG5vbmxpbmVhciBzY2FsZSBtYXkgaGF2ZSB1bmludGVuZGVkIGJlaGF2aW9yLiIpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX21heERvbWFpbkV4dGVudHMuc2V0KHNjYWxlLCBtYXhEb21haW5FeHRlbnQpOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIFBhblpvb20ucHJvdG90eXBlLm1pbkRvbWFpblZhbHVlID0gZnVuY3Rpb24gKHNjYWxlLCBtaW5Eb21haW5WYWx1ZSkgewogICAgICAgICAgICBpZiAobWluRG9tYWluVmFsdWUgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX21pbkRvbWFpblZhbHVlcy5nZXQoc2NhbGUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX21pbkRvbWFpblZhbHVlcy5zZXQoc2NhbGUsIG1pbkRvbWFpblZhbHVlKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBQYW5ab29tLnByb3RvdHlwZS5tYXhEb21haW5WYWx1ZSA9IGZ1bmN0aW9uIChzY2FsZSwgbWF4RG9tYWluVmFsdWUpIHsKICAgICAgICAgICAgaWYgKG1heERvbWFpblZhbHVlID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9tYXhEb21haW5WYWx1ZXMuZ2V0KHNjYWxlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9tYXhEb21haW5WYWx1ZXMuc2V0KHNjYWxlLCBtYXhEb21haW5WYWx1ZSk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogVXNlcyB0aGUgY3VycmVudCBkb21haW4gb2YgdGhlIHNjYWxlIHRvIGFwcGx5IGEgbWluaW11bSBhbmQgbWF4aW11bQogICAgICAgICAqIGRvbWFpbiB2YWx1ZSBmb3IgdGhhdCBzY2FsZS4KICAgICAgICAgKgogICAgICAgICAqIFRoaXMgY29uc3RyYWlucyB0aGUgcGFuL3pvb20gaW50ZXJhY3Rpb24gdG8gc2hvdyBubyBtb3JlIHRoYW4gdGhlIGRvbWFpbgogICAgICAgICAqIG9mIHRoZSBzY2FsZS4KICAgICAgICAgKi8KICAgICAgICBQYW5ab29tLnByb3RvdHlwZS5zZXRNaW5NYXhEb21haW5WYWx1ZXNUbyA9IGZ1bmN0aW9uIChzY2FsZSkgewogICAgICAgICAgICB0aGlzLl9taW5Eb21haW5WYWx1ZXMuZGVsZXRlKHNjYWxlKTsKICAgICAgICAgICAgdGhpcy5fbWF4RG9tYWluVmFsdWVzLmRlbGV0ZShzY2FsZSk7CiAgICAgICAgICAgIHZhciBfYSA9IHNjYWxlLmdldFRyYW5zZm9ybWF0aW9uRG9tYWluKCksIGRvbWFpbk1pbiA9IF9hWzBdLCBkb21haW5NYXggPSBfYVsxXTsKICAgICAgICAgICAgdGhpcy5taW5Eb21haW5WYWx1ZShzY2FsZSwgZG9tYWluTWluKTsKICAgICAgICAgICAgdGhpcy5tYXhEb21haW5WYWx1ZShzY2FsZSwgZG9tYWluTWF4KTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBBZGRzIGEgY2FsbGJhY2sgdG8gYmUgY2FsbGVkIHdoZW4gcGFubmluZyBlbmRzLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtQYW5DYWxsYmFja30gY2FsbGJhY2sKICAgICAgICAgKiBAcmV0dXJucyB7dGhpc30gVGhlIGNhbGxpbmcgUGFuWm9vbSBJbnRlcmFjdGlvbi4KICAgICAgICAgKi8KICAgICAgICBQYW5ab29tLnByb3RvdHlwZS5vblBhbkVuZCA9IGZ1bmN0aW9uIChjYWxsYmFjaykgewogICAgICAgICAgICB0aGlzLl9wYW5FbmRDYWxsYmFja3MuYWRkKGNhbGxiYWNrKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBSZW1vdmVzIGEgY2FsbGJhY2sgdGhhdCB3b3VsZCBiZSBjYWxsZWQgd2hlbiBwYW5uaW5nIGVuZHMuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0ge1BhbkNhbGxiYWNrfSBjYWxsYmFjawogICAgICAgICAqIEByZXR1cm5zIHt0aGlzfSBUaGUgY2FsbGluZyBQYW5ab29tIEludGVyYWN0aW9uLgogICAgICAgICAqLwogICAgICAgIFBhblpvb20ucHJvdG90eXBlLm9mZlBhbkVuZCA9IGZ1bmN0aW9uIChjYWxsYmFjaykgewogICAgICAgICAgICB0aGlzLl9wYW5FbmRDYWxsYmFja3MuZGVsZXRlKGNhbGxiYWNrKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBBZGRzIGEgY2FsbGJhY2sgdG8gYmUgY2FsbGVkIHdoZW4gem9vbWluZyBlbmRzLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtab29tQ2FsbGJhY2t9IGNhbGxiYWNrCiAgICAgICAgICogQHJldHVybnMge3RoaXN9IFRoZSBjYWxsaW5nIFBhblpvb20gSW50ZXJhY3Rpb24uCiAgICAgICAgICovCiAgICAgICAgUGFuWm9vbS5wcm90b3R5cGUub25ab29tRW5kID0gZnVuY3Rpb24gKGNhbGxiYWNrKSB7CiAgICAgICAgICAgIHRoaXMuX3pvb21FbmRDYWxsYmFja3MuYWRkKGNhbGxiYWNrKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBSZW1vdmVzIGEgY2FsbGJhY2sgdGhhdCB3b3VsZCBiZSBjYWxsZWQgd2hlbiB6b29taW5nIGVuZHMuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0ge1pvb21DYWxsYmFja30gY2FsbGJhY2sKICAgICAgICAgKiBAcmV0dXJucyB7dGhpc30gVGhlIGNhbGxpbmcgUGFuWm9vbSBJbnRlcmFjdGlvbi4KICAgICAgICAgKi8KICAgICAgICBQYW5ab29tLnByb3RvdHlwZS5vZmZab29tRW5kID0gZnVuY3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jdGlvbiAoY2FsbGJhY2spIHsKICAgICAgICAgICAgdGhpcy5fcGFuWm9vbVVwZGF0ZUNhbGxiYWNrcy5kZWxldGUoY2FsbGJhY2spOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBudW1iZXIgb2YgcGl4ZWxzIG9jY3VwaWVkIGluIGEgbGluZS4KICAgICAgICAgKi8KICAgICAgICBQYW5ab29tLl9QSVhFTFNfUEVSX0xJTkUgPSAxMjA7CiAgICAgICAgcmV0dXJuIFBhblpvb207CiAgICB9KGludGVyYWN0aW9uLkludGVyYWN0aW9uKSk7CiAgICBleHBvcnRzLlBhblpvb20gPSBQYW5ab29tOwogICAgfSk7CgogICAgdmFyIHBvaW50ZXJJbnRlcmFjdGlvbiA9IGNyZWF0ZUNvbW1vbmpzTW9kdWxlKGZ1bmN0aW9uIChtb2R1bGUsIGV4cG9ydHMpIHsKICAgIC8qKgogICAgICogQ29weXJpZ2h0IDIwMTQtcHJlc2VudCBQYWxhbnRpciBUZWNobm9sb2dpZXMKICAgICAqIEBsaWNlbnNlIE1JVAogICAgICovCiAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgIl9fZXNNb2R1bGUiLCB7IHZhbHVlOiB0cnVlIH0pOwoKCgoKICAgIHZhciBQb2ludGVyID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikgewogICAgICAgIHRzbGliX2VzNi5fX2V4dGVuZHMoUG9pbnRlciwgX3N1cGVyKTsKICAgICAgICBmdW5jdGlvbiBQb2ludGVyKCkgewogICAgICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIgIT09IG51bGwgJiYgX3N1cGVyLmFwcGx5KHRoaXMsIGFyZ3VtZW50cykgfHwgdGhpczsKICAgICAgICAgICAgX3RoaXMuX292ZXJDb21wb25lbnQgPSBmYWxzZTsKICAgICAgICAgICAgX3RoaXMuX3BvaW50ZXJFbnR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GVyRXZlbnQocCwgaW5zaWRlU1ZHKTsKICAgICAgICB9OwogICAgICAgIFBvaW50ZXIucHJvdG90eXBlLl9oYW5kbGVQb2ludGVyRXZlbnQgPSBmdW5jdGlvbiAocCwgaW5zaWRlU1ZHKSB7CiAgICAgICAgICAgIHZhciB0cmFuc2xhdGVkUCA9IHRoaXMuX3RyYW5zbGF0ZVRvQ29tcG9uZW50U3BhY2UocCk7CiAgICAgICAgICAgIHZhciBvdmVyQ29tcG9uZW50ID0gdGhpcy5faXNJbnNpZGVDb21wb25lbnQodHJhbnNsYXRlZFApOwogICAgICAgICAgICBpZiAob3ZlckNvbXBvbmVudCAmJiBpbnNpZGVTVkcpIHsKICAgICAgICAgICAgICAgIGlmICghdGhpcy5fb3ZlckNvbXBvbmVudCkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX3BvaW50ZXJFbnRlckNhbGxiYWNrcy5jYWxsQ2FsbGJhY2tzKHRyYW5zbGF0ZWRQKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuX3BvaW50ZXJNb3ZlQ2FsbGJhY2tzLmNhbGxDYWxsYmFja3ModHJhbnNsYXRlZFApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKHRoaXMuX292ZXJDb21wb25lbnQpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3BvaW50ZXJFeGl0Q2FsbGJhY2tzLmNhbGxDYWxsYmFja3ModHJhbnNsYXRlZFApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX292ZXJDb21wb25lbnQgPSBvdmVyQ29tcG9uZW50ICYmIGluc2lkZVNWRzsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIEFkZHMgYSBjYWxsYmFjayB0byBiZSBjYWxsZWQgd2hlbiB0aGUgcG9pbnRlciBlbnRlcnMgdGhlIENvbXBvbmVudC4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7UG9pbnRlckNhbGxiYWNrfSBjYWxsYmFjawogICAgICAgICAqIEByZXR1cm4ge0ludGVyYWN0aW9ucy5Qb2ludGVyfSBUaGUgY2FsbGluZyBQb2ludGVyIEludGVyYWN0aW9uLgogICAgICAgICAqLwogICAgICAgIFBvaW50ZXIucHJvdG90eXBlLm9uUG9pbnRlckVudGVyID0gZnVuY3Rpb24gKGNhbGxiYWNrKSB7CiAgICAgICAgICAgIHRoaXMuX3BvaW50ZXJFbnRlckNhbGxiYWNrcy5hZGQoY2FsbGJhY2spOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIFJlbW92ZXMgYSBjYWxsYmFjayB0aGF0IHdvdWxkIGJlIGNhbGxlZCB3aGVuIHRoZSBwb2ludGVyIGVudGVycyB0aGUgQ29tcG9uZW50LgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtQb2ludGVyQ2FsbGJhY2t9IGNhbGxiYWNrCiAgICAgICAgICogQHJldHVybiB7SW50ZXJhY3Rpb25zLlBvaW50ZXJ9IFRoZSBjYWxsaW5nIFBvaW50ZXIgSW50ZXJhY3Rpb24uCiAgICAgICAgICovCiAgICAgICAgUG9pbnRlci5wcm90b3R5cGUub2ZmUG9pbnRlckVudGVyID0gZnVuY3Rpb24gKGNhbGxiYWNrKSB7CiAgICAgICAgICAgIHRoaXMuX3BvaW50ZXJFbnRlckNhbGxiYWNrcy5kZWxldGUoY2FsbGJhY2spOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIEFkZHMgYSBjYWxsYmFjayB0byBiZSBjYWxsZWQgd2hlbiB0aGUgcG9pbnRlciBtb3ZlcyB3aXRoaW4gdGhlIENvbXBvbmVudC4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7UG9pbnRlckNhbGxiYWNrfSBjYWxsYmFjawogICAgICAgICAqIEByZXR1cm4ge0ludGVyYWN0aW9ucy5Qb2ludGVyfSBU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HwgKGV4cG9ydHMuUHJvcGVydHlNb2RlID0ge30pKTsKICAgIHZhciBTZWxlY3Rpb25Cb3hMYXllciA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHsKICAgICAgICB0c2xpYl9lczYuX19leHRlbmRzKFNlbGVjdGlvbkJveExheWVyLCBfc3VwZXIpOwogICAgICAgIGZ1bmN0aW9uIFNlbGVjdGlvbkJveExheWVyKCkgewogICAgICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzKSB8fCB0aGlzOwogICAgICAgICAgICBfdGhpcy5fYm94VmlzaWJsZSA9IGZhbHNlOwogICAgICAgICAgICBfdGhpcy5fYm94Qm91bmRzID0gewogICAgICAgICAgICAgICAgdG9wTGVmdDogeyB4OiAwLCB5OiAwIH0sCiAgICAgICAgICAgICAgICBib3R0b21SaWdodDogeyB4OiAwLCB5OiAwIH0sCiAgICAgICAgICAgIH07CiAgICAgICAgICAgIF90aGlzLl94Qm91bmRzTW9kZSA9IFByb3BlcnR5TW9kZS5QSVhFTDsKICAgICAgICAgICAgX3RoaXMuX3lCb3VuZHNNb2RlID0gUHJvcGVydHlNb2RlLlBJWEVMOwogICAgICAgICAgICBfdGhpcy5hZGRDbGFzcygic2VsZWN0aW9uLWJveC1sYXllciIpOwogICAgICAgICAgICBfdGhpcy5fYWRqdXN0Qm91bmRzQ2FsbGJhY2sgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICBfdGhpcy5yZW5kZXIoKTsKICAgICAgICAgICAgfTsKICAgICAgICAgICAgX3RoaXMuX292ZXJmbG93SGlkZGVuID0gdHJ1ZTsKICAgICAgICAgICAgX3RoaXMuX3hFeHRlbnQgPSBbdW5kZWZpbmVkLCB1bmRlZmluZWRdOwogICAgICAgICAgICBfdGhpcy5feUV4dGVudCA9IFt1bmRlZmluZWQsIHVuZGVmaW5lZF07CiAgICAgICAgICAgIHJldHVybiBfdGhpczsKICAgICAgICB9CiAgICAgICAgU2VsZWN0aW9uQm94TGF5ZXIucHJvdG90eXBlLl9zZXR1cCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgX3N1cGVyLnByb3RvdHlwZS5fc2V0dXAuY2FsbCh0aGlzKTsKICAgICAgICAgICAgdGhpcy5fYm94ID0gdGhpcy5jb250ZW50KCkuYXBwZW5kKCJnIikuY2xhc3NlZCgic2VsZWN0aW9uLWJveCIsIHRydWUpLnJlbW92ZSgpOwogICAgICAgICAgICB0aGlzLl9ib3hBcmVhID0gdGhpcy5fYm94LmFwcGVuZCgicmVjdCIpLmNsYXNzZWQoInNlbGVjdGlvbi1hcmVhIiwgdHJ1ZSk7CiAgICAgICAgfTsKICAgICAgICBTZWxlY3Rpb25Cb3hMYXllci5wcm90b3R5cGUuX3NpemVGcm9tT2ZmZXIgPSBmdW5jdGlvbiAoYXZhaWxhYmxlV2lkdGgsIGF2YWlsYWJsZUhlaWdodCkgewogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgd2lkdGg6IGF2YWlsYWJsZVdpZHRoLAogICAgICAgICAgICAgICAgaGVpZ2h0OiBhdmFpbGFibGVIZWlnaHQsCiAgICAgICAgICAgIH07CiAgICAgICAgfTsKICAgICAgICBTZWxlY3Rpb25Cb3hMYXllci5wcm90b3R5cGUuYm91bmRzID0gZnVuY3Rpb24gKG5ld0JvdW5kcykgewogICAgICAgICAgICBpZiAobmV3Qm91bmRzID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9nZXRCb3VuZHMoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9zZXRCb3VuZHMobmV3Qm91bmRzKTsKICAgICAgICAgICAgdGhpcy5feEJvdW5kc01vZGUgPSBQcm9wZXJ0eU1vZGUuUElYRUw7CiAgICAgICAgICAgIHRoaXMuX3lCb3VuZHNNb2RlID0gUHJvcGVydHlNb2RlLlBJWEVMOwogICAgICAgICAgICB0aGlzLnJlbmRlcigpOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIFNlbGVjdGlvbkJveExheWVyLnByb3RvdHlwZS5fc2V0Qm91bmRzID0gZnVuY3Rpb24gKG5ld0JvdW5kcykgewogICAgICAgICAgICB2YXIgdG9wTGVmdCA9IHsKICAgICAgICAgICAgICAgIHg6IE1hdGgubWluKG5ld0JvdW5kcy50b3BMZWZ0LngsIG5ld0JvdW5kcy5ib3R0b21SaWdodC54KSwKICAgICAgICAgICAgICAgIHk6IE1hdGgubWluKG5ld0JvdW5kcy50b3BMZWZ0LnksIG5ld0JvdW5kcy5ib3R0b21SaWdodC55KSwKICAgICAgICAgICAgfTsKICAgICAgICAgICAgdmFyIGJvdHRvbVJpZ2h0ID0gewogICAgICAgICAgICAgICAgeDogTWF0aC5tYXgobmV3Qm91bmRzLnRvcExlZnQueCwgbmV3Qm91bmRzLmJvdHRvbVJpZ2h0LngpLAogICAgICAgICAgICAgICAgeTogTWF0aC5tYXgobmV3Qm91bmRzLnRvcExlZnQueSwgbmV3Qm91bmRzLmJvdHRvbVJpZ2h0LnkpLAogICAgICAgICAgICB9OwogICAgICAgICAgICB0aGlzLl9ib3hCb3VuZHMgPSB7CiAgICAgICAgICAgICAgICB0b3BMZWZ0OiB0b3BMZWZ0LAogICAgICAgICAgICAgICAgYm90dG9tUmlnaHQ6IGJvdHRvbVJpZ2h0LAogICAgICAgICAgICB9OwogICAgICAgIH07CiAgICAgICAgU2VsZWN0aW9uQm94TGF5ZXIucHJvdG90eXBlLl9nZXRCb3VuZHMgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICB0b3BMZWZ0OiB7CiAgICAgICAgICAgICAgICAgICAgeDogdGhpcy5feEJvdW5kc01vZGUgPT09IFByb3BlcnR5TW9kZS5QSVhFTCA/CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2JveEJvdW5kcy50b3BMZWZ0LnggOgogICAgICAgICAgICAgICAgICAgICAgICAodGhpcy5feFNjYWxlID09IG51bGwgPwogICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA6CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBNYXRoLm1pbih0aGlzLnhTY2FsZSgpLnNjYWxlKHRoaXMueEV4dGVudCgpWzBdKSwgdGhpcy54U2NhbGUoKS5zY2FsZSh0aGlzLnhFeHRlbnQoKVsxXSkpKSwKICAgICAgICAgICAgICAgICAgICB5OiB0aGlzLl95Qm91bmRzTW9kZSA9PT0gUHJvcGVydHlNb2RlLlBJWEVMID8KICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fYm94Qm91bmRzLnRvcExlZnQueSA6CiAgICAgICAgICAgICAgICAgICAgICAgICh0aGlzLl95U2NhbGUgPT0gbnVsbCA/CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1hdGgubWluKHRoaXMueVNjYWxlKCkuc2NhbGUodGhpcy55RXh0ZW50KClbMF0pLCB0aGlzLnlTY2FsZSgpLnNjYWxlKHRoaXMueUV4dGVudCgpWzFdKSkpLAogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIGJvdHRvbVJpZ2h0OiB7CiAgICAgICAgICAgICAgICAgICAgeDogdGhpcy5feEJvdW5kc01vZGUgPT09IFByb3BlcnR5TW9kZS5QSVhFTCA/CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2JveEJvdW5kcy5ib3R0b21SaWdodC54IDoKICAgICAgICAgICAgICAgICAgICAgICAgKHRoaXMuX3hTY2FsZSA9PSBudWxsID8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgTWF0aC5tYXgodGhpcy54U2NhbGUoKS5zY2FsZSh0aGlzLnhFeHRlbnQoKVswXSksIHRoaXMueFNjYWxlKCkuc2NhbGUodGhpcy54RXh0ZW50KClbMV0pKSksCiAgICAgICAgICAgICAgICAgICAgeTogdGhpcy5feUJvdW5kc01vZGUgPT09IFByb3BlcnR5TW9kZS5QSVhFTCA/CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2JveEJvdW5kcy5ib3R0b21SaWdodC55IDoKICAgICAgICAgICAgICAgICAgICAgICAgKHRoaXMuX3lTY2FsZSA9PSBudWxsID8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgTWF0aC5tYXgodGhpcy55U2NhbGUoKS5zY2FsZSh0aGlzLnlFeHRlbnQoKVswXSksIHRoaXMueVNjYWxlKCkuc2NhbGUodGhpcy55RXh0ZW50KClbMV0pKSksCiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICB9OwogICAgICAgIH07CiAgICAgICAgU2VsZWN0aW9uQm94TGF5ZXIucHJvdG90eXBlLnJlbmRlckltbWVkaWF0ZWx5ID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLnJlbmRlckltbWVkaWF0ZWx5LmNhbGwodGhpcyk7CiAgICAgICAgICAgIGlmICh0aGlzLl9ib3hWaXNpYmxlKSB7CiAgICAgICAgICAgICAgICB2YXIgYm91bmRzID0gdGhpcy5ib3VuZHMoKTsKICAgICAgICAgICAgICAgIHZhciB0ID0gYm91bmRzLnRvcExlZnQueTsKICAgICAgICAgICAgICAgIHZhciBiID0gYm91bmRzLmJvdHRvbVJpZ2h0Lnk7CiAgICAgICAgICAgICAgICB2YXIgbCA9IGJvdW5kcy50b3BMZWZ0Lng7CiAgICAgICAgICAgICAgICB2YXIgciA9IGJvdW5kcy5ib3R0b21SaWdodC54OwogICAgICAgICAgICAgICAgaWYgKCEodXRpbHMkMS5NYXRoLmlzVmFsaWROdW1iZXIodCkgJiYKICAgICAgICAgICAgICAgICAgICB1dGlscyQxLk1hdGguaXNWYWxpZE51bWJlcihiKSAmJgogICAgICAgICAgICAgICAgICAgIHV0aWxzJDEuTWF0aC5pc1ZhbGlkTnVtYmVyKGwpICYmCiAgICAgICAgICAgICAgICAgICAgdXRpbHMkMS5NYXRoLmlzVmFsaWROdW1iZXIocikpKSB7CiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCJib3VuZHMgaGF2ZSBub3QgYmVlbiBwcm9wZXJseSBzZXQiKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuX2JveEFyZWEuYXR0cnMoewogICAgICAgICAgICAgICAgICAgIHg6IGwsIHk6IHQsIHdpZHRoOiByIC0gbCwgaGVpZ2h0OiBiIC0gdCwKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgdGhpcy5jb250ZW50KCkubm9kZSgpLmFwcGVuZENoaWxkKHRoaXMuX2JveC5ub2RlKCkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fYm94LnJlbW92ZSgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgU2VsZWN0aW9uQm94TGF5ZXIucHJvdG90eXBlLmJveFZpc2libGUgPSBmdW5jdGlvbiAoc2hvdykgewogICAgICAgICAgICBpZiAoc2hvdyA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fYm94VmlzaWJsZTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9ib3hWaXNpYmxlID0gc2hvdzsKICAgICAgICAgICAgdGhpcy5yZW5kZXIoKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBTZWxlY3Rpb25Cb3hMYXllci5wcm90b3R5cGUuZml4ZWRXaWR0aCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgfTsKICAgICAgICBTZWxlY3Rpb25Cb3hMYXllci5wcm90b3R5cGUuZml4ZWRIZWlnaHQgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgIH07CiAgICAgICAgU2VsZWN0aW9uQm94TGF5ZXIucHJvdG90eXBlLnhTY2FsZSA9IGZ1bmN0aW9uICh4U2NhbGUpIHsKICAgICAgICAgICAgaWYgKHhTY2FsZSA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5feFNjYWxlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0aGlzLl94U2NhbGUgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5feFNjYWxlLm9mZlVwZGF0ZSh0aGlzLl9hZGp1c3RCb3VuZHNDYWxsYmFjayk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5feFNjYWxlID0geFNjYWxlOwogICAgICAgICAgICB0aGlzLl94Qm91bmRzTW9kZSA9IFByb3BlcnR5TW9kZS5WQUxVRTsKICAgICAgICAgICAgdGhpcy5feFNjYWxlLm9uVXBkYXRlKHRoaXMuX2FkanVzdEJvdW5kc0NhbGxiYWNrKTsKICAgICAgICAgICAgdGhpcy5yZW5kZXIoKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBTZWxlY3Rpb25Cb3hMYXllci5wcm90b3R5cGUueVNjYWxlID0gZnVuY3Rpb24gKHlTY2FsZSkgewogICAgICAgICAgICBpZiAoeVNjYWxlID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl95U2NhbGU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHRoaXMuX3lTY2FsZSAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICB0aGlzLl95U2NhbGUub2ZmVXBkYXRlKHRoaXMuX2FkanVzdEJvdW5kc0NhbGxiYWNrKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl95U2NhbGUgPSB5U2NhbGU7CiAgICAgICAgICAgIHRoaXMuX3lCb3VuZHNNb2RlID0gUHJvcGVydHlNb2RlLlZBTFVFOwogICAgICAgICAgICB0aGlzLl95U2NhbGUub25VcGRhdGUodGhpcy5fYWRqdXN0Qm91bmRzQ2FsbGJhY2spOwogICAgICAgICAgICB0aGlzLnJlbmRlcigpOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIFNlbGVjdGlvbkJveExheWVyLnByb3RvdHlwZS54RXh0ZW50ID0gZnVuY3Rpb24gKHhFeHRlbnQpIHsKICAgICAgICAgICAgLy8gRXhwbGljaXQgdHlwaW5nIGZvciBUeXBlc2NyaXB0IDEuNAogICAgICAgICAgICBpZiAoeEV4dGVudCA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fZ2V0WEV4dGVudCgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX3NldFhFeHRlbnQoeEV4dGVudCk7CiAgICAgICAgICAgIHRoaXMuX3hCb3VuZHNNb2RlID0gUHJvcGVydHlNb2RlLlZBTFVFOwogICAgICAgICAgICB0aGlzLnJlbmRlcigpOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIFNlbGVjdGlvbkJveExheWVyLnByb3RvdHlwZS5fZ2V0WEV4dGVudCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3hCb3VuZHNNb2RlID09PSBQcm9wZXJ0eU1vZGUuVkFMVUUgPwogICAgICAgICAgICAgICAgdGhpcy5feEV4dGVudCA6CiAgICAgICAgICAgICAgICAodGhpcy5feFNjYWxlID09IG51bGwgPwogICAgICAgICAgICAgICAgICAgIFt1bmRlZmluZWQsIHVuZGVmaW5lZF0gOgogICAgICAgICAgICAgICAgICAgIFsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5feFNjYWxlLmludmVydCh0aGlzLl9ib3hCb3VuZHMudG9wTGVmdC54KSwKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5feFNjYWxlLmludmVydCh0aGlzLl9ib3hCb3VuZHMuYm90dG9tUmlnaHQueCksCiAgICAgICAgICAgICAgICAgICAgXSk7CiAgICAgICAgfTsKICAgICAgICBTZWxlY3Rpb25Cb3hMYXllci5wcm90b3R5cGUuX3NldFhFeHRlbnQgPSBmdW5jdGlvbiAoeEV4dGVudCkgewogICAgICAgICAgICB0aGlzLl94RXh0ZW50ID0geEV4dGVudDsKICAgICAgICB9OwogICAgICAgIFNlbGVjdGlvbkJveExheWVyLnByb3RvdHlwZS55RXh0ZW50ID0gZnVuY3Rpb24gKHlFeHRlbnQpIHsKICAgICAgICAgICAgLy8gRXhwbGljaXQgdHlwaW5nIGZvciBUeXBlc2NyaXB0IDEuNAogICAgICAgICAgICBpZiAoeUV4dGVudCA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fZ2V0WUV4dGVudCgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX3NldFlFeHRlbnQoeUV4dGVudCk7CiAgICAgICAgICAgIHRoaXMuX3lCb3VuZHNNb2RlID0gUHJvcGVydHlNb2RlLlZBTFVFOwogICAgICAgICAgICB0aGlzLnJlbmRlcigpOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIFNlbGVjdGlvbkJveExheWVyLnByb3RvdHlwZS5fZ2V0WUV4dGVudCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3lCb3VuZHNNb2RlID09PSBQcm9wZXJ0eU1vZGUuVkFMVUUgPwogICAgICAgICAgICAgICAgdGhpcy5feUV4dGVudCA6CiAgICAgICAgICAgICAgICAodGhpcy5feVNjYWxlID09IG51bGwgPwogICAgICAgICAgICAgICAgICAgIFt1bmRlZmluZWQsIHVuZGVmaW5lZF0gOgogICAgICAgICAgICAgICAgICAgIFsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5feVNjYWxlLmludmVydCh0aGlzLl9ib3hCb3VuZHMudG9wTGVmdC55KSwKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5feVNjYWxlLmludmVydCh0aGlzLl9ib3hCb3VuZHMuYm90dG9tUmlnaHQueSksCiAgICAgICAgICAgICAgICAgICAgXSk7CiAgICAgICAgfTsKICAgICAgICBTZWxlY3Rpb25Cb3hMYXllci5wcm90b3R5cGUuX3NldFlFeHRlbnQgPSBmdW5jdGlvbiAoeUV4dGVudCkgewogICAgICAgICAgICB0aGlzLl95RXh0ZW50ID0geUV4dGVudDsKICAgICAgICB9OwogICAgICAgIFNlbGVjdGlvbkJveExheWVyLnByb3RvdHlwZS5kZXN0cm95ID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLmRlc3Ryb3kuY2FsbCh0aGlzKTsKICAgICAgICAgICAgaWYgKHRoaXMuX3hTY2FsZSAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICB0aGlzLnhTY2FsZSgpLm9mZlVwZGF0ZSh0aGlzLl9hZGp1c3RCb3VuZHNDYWxsYmFjayk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHRoaXMuX3lTY2FsZSAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICB0aGlzLnlTY2FsZSgpLm9mZlVwZGF0ZSh0aGlzLl9hZGp1c3RCb3VuZHNDYWxsYmFjayk7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIHJldHVybiBTZWxlY3Rpb25Cb3hMYXllcjsKICAgIH0oY29tcG9uZW50LkNvbXBvbmVudCkpOwogICAgZXhwb3J0cy5TZWxlY3Rpb25Cb3hMYXllciA9IFNlbGVjdGlvbkJveExheWVyOwogICAgfSk7CgogICAgdmFyIGRyYWdCb3hMYXllciA9IGNyZWF0ZUNvbW1vbmpzTW9kdWxlKGZ1bmN0aW9uIChtb2R1bGUsIGV4cG9ydHMpIHsKICAgIC8qKgogICAgICogQ29weXJpZ2h0IDIwMTQtcHJlc2VudCBQYWxhbnRpciBUZWNobm9sb2dpZXMKICAgICAqIEBsaWNlbnNlIE1JVAogICAgICovCiAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgIl9fZXNNb2R1bGUiLCB7IHZhbHVlOiB0cnVlIH0pOwoKCgoKCgogICAgdmFyIERyYWdCb3hMYXllciA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHsKICAgICAgICB0c2xpYl9lczYuX19leHRlbmRzKERyYWdCb3hMYXllciwgX3N1cGVyKTsKICAgICAgICAvKioKICAgICAgICAgKiBDb25zdHJ1Y3RzIGEgRHJhZ0JveExheWVyLgogICAgICAgICAqCiAgICAgICAgICogQSBEcmFnQm94TGF5ZXIgaXMgYSBTZWxlY3Rpb25Cb3hMYXllciB3aXRoIGEgYnVpbHQtaW4gRHJhZyBJbnRlcmFjdGlvbi4KICAgICAgICAgKiBBIGRyYWcgZ2VzdHVyZSB3aWxsIHNldCB0aGUgQm91bmRzIG9mIHRoZSBib3guCiAgICAgICAgICogSWYgcmVzaXppbmcgaXMgZW5hYmxlZCB1c2luZyByZXNpemFibGUodHJ1ZSksIHRoZSBlZGdlcyBvZiBib3ggY2FuIGJlIHJlcG9zaXRpb25lZC4KICAgICAgICAgKgogICAgICAgICAqIEBjb25zdHJ1Y3RvcgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIERyYWdCb3hMYXllcigpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcykgfHwgdGhpczsKICAgICAgICAgICAgX3RoaXMuX2RldGVjdGlvblJhZGl1cyA9IDM7CiAgICAgICAgICAgIF90aGlzLl9yZXNpemFibGUgPSBmYWxzZTsKICAgICAgICAgICAgX3RoaXMuX21vdmFibGUgPSBmYWxzZTsKICAgICAgICAgICAgX3RoaXMuX2hhc0Nvcm5lcnMgPSB0cnVlOwogICAgICAgICAgICBfdGhpcy5hZGRDbGFzcygiZHJhZy1ib3gtbGF5ZXIiKTsKICAgICAgICAgICAgX3RoaXMuX2RyYWdJbnRlcmFjdGlvbiA9IG5ldyBpbnRlcmFjdGlvbnMuRHJhZygpOwogICAgICAgICAgICBfdGhpcy5fc2V0VXBDYWxsYmFja3MoKTsKICAgICAgICAgICAgX3RoaXMuX2RyYWdJbnRlcmFjdGlvbi5hdHRhY2hUbyhfdGhpcyk7CiAgICAgICAgICAgIF90aGlzLl9kcmFnU3RhcnRDYWxsYmFja3MgPSBuZXcgdXRpbHMkMS5DYWxsYmFja1NldCgpOwogICAgICAgICAgICBfdGhpcy5fZHJhZ0NhbGxiYWNrcyA9IG5ldyB1dGlscyQxLkNhbGxiYWNrU2V0KCk7CiAgICAgICAgICAgIF90aGlzLl9kcmFnRW5kQ2FsbGJhY2tzID0gbmV3IHV0aWxzJDEuQ2FsbGJhY2tTZXQoKTsKICAgICAgICAgICAgcmV0dXJuIF90aGlzOwogICAgICAgIH0KICAgICAgICBEcmFnQm94TGF5ZXIucHJvdG90eXBlLl9zZXRVcENhbGxiYWNrcyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgdmFyIHJlc2l6aW5nRWRnZXM7CiAgICAgICAgICAgIHZhciB0b3BMZWZ0OwogICAgICAgICAgICB2YXIgYm90dG9tUmlnaHQ7CiAgICAgICAgICAgIHZhciBsYXN0RW5kUG9pbnQ7CiAgICAgICAgICAgIHZhciBEUkFHX01PREVTID0gewogICAgICAgICAgICAgICAgbmV3Qm94OiAwLAogICAgICAgICAgICAgICAgcmVzaXplOiAxLAogICAgICAgICAgICAgICAgbW92ZTogMiwKICAgICAgICAgICAgfTsKICAgICAgICAgICAgdmFyIG1vZGUgPSBEUkFHX01PREVTLm5ld0JveDsKICAgICAgICAgICAgdmFyIG9uRHJhZ1N0YXJ0Q2FsbGJhY2sgPSBmdW5jdGlvbiAoc3RhcnRQb2ludCkgewogICAgICAgICAgICAgICAgcmVzaXppbmdFZGdlcyA9IF90aGlzLl9nZXRSZXNpemluZ0VkZ2VzKHN0YXJ0UG9pbnQpOwogICAgICAgICAgICAgICAgdmFyIGJvdW5kcyA9IF90aGlzLmJvdW5kcygpOwogICAgICAgICAgICAgICAgdmFyIGlzSW5zaWRlQm94ID0gYm91bmRzLnRvcExlZnQueCA8PSBzdGFydFBvaW50LnggJiYgc3RhcnRQb2ludC54IDw9IGJvdW5kcy5ib3R0b21SaWdodC54ICYmCiAgICAgICAgICAgICAgICAgICAgYm91bmRzLnRvcExlZnQueSA8PSBzdGFydFBvaW50LnkgJiYgc3RhcnRQb2ludC55IDw9IGJvdW5kcy5ib3R0b21SaWdodC55OwogICAgICAgICAgICAgICAgaWYgKF90aGlzLmJveFZpc2libGUoKSAmJiAocmVzaXppbmdFZGdlcy50b3AgfHwgcmVzaXppbmdFZGdlcy5ib3R0b20gfHwgcmVzaXppbmdFZGdlcy5sZWZ0IHx8IHJlc2l6aW5nRWRnZXMucmlnaHQpKSB7CiAgICAgICAgICAgICAgICAgICAgbW9kZSA9IERSQUdfTU9ERVMucmVzaXplOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAoX3RoaXMuYm94VmlzaWJsZSgpICYmIF90aGlzLm1vdmFibGUoKSAmJiBpc0luc2lkZUJveCkgewogICAgICAgICAgICAgICAgICAgIG1vZGUgPSBEUkFHX01PREVTLm1vdmU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBtb2RlID0gRFJBR19NT0RFUy5uZXdCb3g7CiAgICAgICAgICAgICAgICAgICAgX3RoaXMuX3NldEJvdW5kcyh7CiAgICAgICAgICAgICAgICAgICAgICAgIHRvcExlZnQ6IHN0YXJ0UG9pbnQsCiAgICAgICAgICAgICAgICAgICAgICAgIGJvdHRvbVJpZ2h0OiBzdGFydFBvaW50LAogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgIGlmIChfdGhpcy5feEJvdW5kc01vZGUgPT09IGNvbXBvbmVudHMuUHJvcGVydHlNb2RlLlZBTFVFICYmIF90aGlzLnhTY2FsZSgpICE9IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICAgICAgX3RoaXMuX3NldFhFeHRlbnQoW190aGlzLnhTY2FsZSgpLmludmVydChzdGFydFBvaW50LngpLCBfdGhpcy54U2NhbGUoKS5pbnZlcnQoc3RhcnRQb2ludC54KV0pOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBpZiAoX3RoaXMuX3lCb3VuZHNNb2RlID09PSBjb21wb25lbnRzLlByb3BlcnR5TW9kZS5WQUxVRSAmJiBfdGhpcy55U2NhbGUoKSAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLl9zZXRZRXh0ZW50KFtfdGhpcy55U2NhbGUoKS5pbnZlcnQoc3RhcnRQb2ludC55KSwgX3RoaXMueVNjYWxlKCkuaW52ZXJ0KHN0YXJ0UG9pbnQueSldKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgX3RoaXMucmVuZGVyKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBfdGhpcy5ib3hWaXNpYmxlKHRydWUpOwogICAgICAgICAgICAgICAgYm91bmRzID0gX3RoaXMuYm91bmRzKCk7CiAgICAgICAgICAgICAgICAvLyBjb3B5IHBvaW50cyBzbyBjaGFuZ2VzIHRvIHRvcExlZnQgYW5kIGJvdHRvbVJpZ2h0IGRvbid0IG11dGF0ZSBib3VuZHMKICAgICAgICAgICAgICAgIHRvcExlZnQgPSB7IHg6IGJvdW5kcy50b3BMZWZ0LngsIHk6IGJvdW5kcy50b3BMZWZ0LnkgfTsKICAgICAgICAgICAgICAgIGJvdHRvbVJpZ2h0ID0geyB4OiBib3VuZHMuYm90dG9tUmlnaHQueCwgeTogYm91bmRzLmJvdHRvbVJpZ2h0LnkgfTsKICAgICAgICAgICAgICAgIGxhc3RFbmRQb2ludCA9IHN0YXJ0UG9pbnQ7CiAgICAgICAgICAgICAgICBfdGhpcy5fZHJhZ1N0YXJ0Q2FsbGJhY2tzLmNhbGxDYWxsYmFja3MoYm91bmRzKTsKICAgICAgICAgICAgfTsKICAgICAgICAgICAgdmFyIG9uRHJhZ0NhbGxiYWNrID0gZnVuY3Rpb24gKHN0YXJ0UG9pbnQsIGVuZFBvaW50KSB7CiAgICAgICAgICAgICAgICBzd2l0Y2ggKG1vZGUpIHsKICAgICAgICAgICAgICAgICAgICBjYXNlIERSQUdfTU9ERVMubmV3Qm94OgogICAgICAgICAgICAgICAgICAgICAgICBib3R0b21SaWdodC54ID0gZW5kUG9pbnQueDsKICAgICAgICAgICAgICAgICAgICAgICAgYm90dG9tUmlnaHQueSA9IGVuZFBvaW50Lnk7CiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgIGNhc2UgRFJBR19NT0RFUy5yZXNpemU6CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXNpemluZ0VkZ2VzLmJvdHRvbSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm90dG9tUmlnaHQueSA9IGVuZFBvaW50Lnk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAocmVzaXppbmdFZGdlcy50b3ApIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvcExlZnQueSA9IGVuZFBvaW50Lnk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlc2l6aW5nRWRnZXMucmlnaHQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvdHRvbVJpZ2h0LnggPSBlbmRQb2ludC54OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHJlc2l6aW5nRWRnZXMubGVmdCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdG9wTGVmdC54ID0gZW5kUG9pbnQueDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICBjYXNlIERSQUdfTU9ERVMubW92ZToKICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGR4ID0gZW5kUG9pbnQueCAtIGxhc3RFbmRQb2ludC54OwogICAgICAgICAgICAgICAgICAgICAgICB2YXIgZHkgPSBlbmRQb2ludC55IC0gbGFzdEVuZFBvaW50Lnk7CiAgICAgICAgICAgICAgICAgICAgICAgIHRvcExlZnQueCArPSBkeDsKICAgICAgICAgICAgICAgICAgICAgICAgdG9wTGVmdC55ICs9IGR5OwogICAgICAgICAgICAgICAgICAgICAgICBib3R0b21SaWdodC54ICs9IGR4OwogICAgICAgICAgICAgICAgICAgICAgICBib3R0b21SaWdodC55ICs9IGR5OwogICAgICAgICAgICAgICAgICAgICAgICBsYXN0RW5kUG9pbnQgPSBlbmRQb2ludDsKICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBfdGhpcy5fc2V0Qm91bmRzKHsKICAgICAgICAgICAgICAgICAgICB0b3BMZWZ0OiB0b3BMZWZ0LAogICAgICAgICAgICAgICAgICAgIGJvdHRvbVJpZ2h0OiBib3R0b21SaWdodCwKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgaWYgKF90aGlzLl94Qm91bmRzTW9kZSA9PT0gY29tcG9uZW50cy5Qcm9wZXJ0eU1vZGUuVkFMVUUgJiYgX3RoaXMueFNjYWxlKCkgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIF90aGlzLl9zZXRYRXh0ZW50KFtfdGhpcy54U2NhbGUoKS5pbnZlcnQodG9wTGVmdC54KSwgX3RoaXMueFNjYWxlKCkuaW52ZXJ0KGJvdHRvbVJpZ2h0LngpXSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAoX3RoaXMuX3lCb3VuZHNNb2RlID09PSBjb21wb25lbnRzLlByb3BlcnR5TW9kZS5WQUxVRSAmJiBfdGhpcy55U2NhbGUoKSAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgX3RoaXMuX3NldFlFeHRlbnQoW190aGlzLnlTY2FsZSgpLmludmVydCh0b3BMZWZ0LnkpLCBfdGhpcy55U2NhbGUoKS5pbnZlcnQoYm90dG9tUmlnaHQueSldKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIF90aGlzLnJlbmRlcigpOwogICAgICAgICAgICAgICAgX3RoaXMuX2RyYWdDYWxsYmFja3MuY2FsbENhbGxiYWNrcyhfdGhpcy5ib3VuZHMoKSk7CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIHZhciBvbkRyYWdFbmRDYWxsYmFjayA9IGZ1bmN0aW9uIChzdGFydFBvaW50LCBlbmRQb2ludCkgewogICAgICAgICAgICAgICAgaWYgKG1vZGUgPT09IERSQUdfTU9ERVMubmV3Qm94ICYmIHN0YXJ0UG9pbnQueCA9PT0gZW5kUG9pbnQueCAmJiBzdGFydFBvaW50LnkgPT09IGVuZFBvaW50LnkpIHsKICAgICAgICAgICAgICAgICAgICBfdGhpcy5ib3hWaXNpYmxlKGZhbHNlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIF90aGlzLl9kcmFnRW5kQ2FsbGJhY2tzLmNhbGxDYWxsYmFja3MoX3RoaXMuYm91bmRzKCkpOwogICAgICAgICAgICB9OwogICAgICAgICAgICB0aGlzLl9kcmFnSW50ZXJhY3Rpb24ub25EcmFnU3RhcnQob25EcmFnU3RhcnRDYWxsYmFjayk7CiAgICAgICAgICAgIHRoaXMuX2RyYWdJbnRlcmFjdGlvbi5vbkRyYWcob25EcmFnQ2FsbGJhY2spOwogICAgICAgICAgICB0aGlzLl9kcmFnSW50ZXJhY3Rpb24ub25EcmFnR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k7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIERyYWdCb3hMYXllci5wcm90b3R5cGUuX2dldFJlc2l6aW5nRWRnZXMgPSBmdW5jdGlvbiAocCkgewogICAgICAgICAgICB2YXIgZWRnZXMgPSB7CiAgICAgICAgICAgICAgICB0b3A6IGZhbHNlLAogICAgICAgICAgICAgICAgYm90dG9tOiBmYWxzZSwKICAgICAgICAgICAgICAgIGxlZnQ6IGZhbHNlLAogICAgICAgICAgICAgICAgcmlnaHQ6IGZhbHNlLAogICAgICAgICAgICB9OwogICAgICAgICAgICBpZiAoIXRoaXMucmVzaXphYmxlKCkpIHsKICAgICAgICAgICAgICAgIHJldHVybiBlZGdlczsKICAgICAgICAgICAgfQogICAgICAgICAgICB2YXIgYm91bmRzID0gdGhpcy5ib3VuZHMoKTsKICAgICAgICAgICAgdmFyIHQgPSBib3VuZHMudG9wTGVmdC55OwogICAgICAgICAgICB2YXIgYiA9IGJvdW5kcy5ib3R0b21SaWdodC55OwogICAgICAgICAgICB2YXIgbCA9IGJvdW5kcy50b3BMZWZ0Lng7CiAgICAgICAgICAgIHZhciByID0gYm91bmRzLmJvdHRvbVJpZ2h0Lng7CiAgICAgICAgICAgIHZhciByYWQgPSB0aGlzLl9kZXRlY3Rpb25SYWRpdXM7CiAgICAgICAgICAgIGlmIChsIC0gcmFkIDw9IHAueCAmJiBwLnggPD0gciArIHJhZCkgewogICAgICAgICAgICAgICAgZWRnZXMudG9wID0gKHQgLSByYWQgPD0gcC55ICYmIHAueSA8PSB0ICsgcmFkKTsKICAgICAgICAgICAgICAgIGVkZ2VzLmJvdHRvbSA9IChiIC0gcmFkIDw9IHAueSAmJiBwLnkgPD0gYiArIHJhZCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHQgLSByYWQgPD0gcC55ICYmIHAueSA8PSBiICsgcmFkKSB7CiAgICAgICAgICAgICAgICBlZGdlcy5sZWZ0ID0gKGwgLSByYWQgPD0gcC54ICYmIHAueCA8PSBsICsgcmFkKTsKICAgICAgICAgICAgICAgIGVkZ2VzLnJpZ2h0ID0gKHIgLSByYWQgPD0gcC54ICYmIHAueCA8PSByICsgcmFkKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gZWRnZXM7CiAgICAgICAgfTsKICAgICAgICBEcmFnQm94TGF5ZXIucHJvdG90eXBlLnJlbmRlckltbWVkaWF0ZWx5ID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLnJlbmRlckltbWVkaWF0ZWx5LmNhbGwodGhpcyk7CiAgICAgICAgICAgIGlmICh0aGlzLmJveFZpc2libGUoKSkgewogICAgICAgICAgICAgICAgdmFyIGJvdW5kcyA9IHRoaXMuYm91bmRzKCk7CiAgICAgICAgICAgICAgICB2YXIgdCA9IGJvdW5kcy50b3BMZWZ0Lnk7CiAgICAgICAgICAgICAgICB2YXIgYiA9IGJvdW5kcy5ib3R0b21SaWdodC55OwogICAgICAgICAgICAgICAgdmFyIGwgPSBib3VuZHMudG9wTGVmdC54OwogICAgICAgICAgICAgICAgdmFyIHIgPSBib3VuZHMuYm90dG9tUmlnaHQueDsKICAgICAgICAgICAgICAgIHRoaXMuX2RldGVjdGlvbkVkZ2VULmF0dHJzKHsKICAgICAgICAgICAgICAgICAgICB4MTogbCwgeTE6IHQsIHgyOiByLCB5MjogdCwKICAgICAgICAgICAgICAgICAgICAic3Ryb2tlLXdpZHRoIjogdGhpcy5fZGV0ZWN0aW9uUmFkaXVzICogMiwKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgdGhpcy5fZGV0ZWN0aW9uRWRnZUIuYXR0cnMoewogICAgICAgICAgICAgICAgICAgIHgxOiBsLCB5MTogYiwgeDI6IHIsIHkyOiBiLAogICAgICAgICAgICAgICAgICAgICJzdHJva2Utd2lkdGgiOiB0aGlzLl9kZXRlY3Rpb25SYWRpdXMgKiAyLAogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB0aGlzLl9kZXRlY3Rpb25FZGdlTC5hdHRycyh7CiAgICAgICAgICAgICAgICAgICAgeDE6IGwsIHkxOiB0LCB4MjogbCwgeTI6IGIsCiAgICAgICAgICAgICAgICAgICAgInN0cm9rZS13aWR0aCI6IHRoaXMuX2RldGVjdGlvblJhZGl1cyAqIDIsCiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIHRoaXMuX2RldGVjdGlvbkVkZ2VSLmF0dHJzKHsKICAgICAgICAgICAgICAgICAgICB4MTogciwgeTE6IHQsIHgyOiByLCB5MjogYiwKICAgICAgICAgICAgICAgICAgICAic3Ryb2tlLXdpZHRoIjogdGhpcy5fZGV0ZWN0aW9uUmFkaXVzICogMiwKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgaWYgKHRoaXMuX2hhc0Nvcm5lcnMpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9kZXRlY3Rpb25Db3JuZXJUTC5hdHRycyh7IGN4OiBsLCBjeTogdCwgcjogdGhpcy5fZGV0ZWN0aW9uUmFkaXVzIH0pOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX2RldGVjdGlvbkNvcm5lclRSLmF0dHJzKHsgY3g6IHIsIGN5OiB0LCByOiB0aGlzLl9kZXRlY3Rpb25SYWRpdXMgfSk7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fZGV0ZWN0aW9uQ29ybmVyQkwuYXR0cnMoeyBjeDogbCwgY3k6IGIsIHI6IHRoaXMuX2RldGVjdGlvblJhZGl1cyB9KTsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9kZXRlY3Rpb25Db3JuZXJCUi5hdHRycyh7IGN4OiByLCBjeTogYiwgcjogdGhpcy5fZGV0ZWN0aW9uUmFkaXVzIH0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgRHJhZ0JveExheWVyLnByb3RvdHlwZS5kZXRlY3Rpb25SYWRpdXMgPSBmdW5jdGlvbiAocikgewogICAgICAgICAgICBpZiAociA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fZGV0ZWN0aW9uUmFkaXVzOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChyIDwgMCkgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCJkZXRlY3Rpb24gcmFkaXVzIGNhbm5vdCBiZSBuZWdhdGl2ZS4iKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9kZXRlY3Rpb25SYWRpdXMgPSByOwogICAgICAgICAgICB0aGlzLnJlbmRlcigpOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIERyYWdCb3hMYXllci5wcm90b3R5cGUucmVzaXphYmxlID0gZnVuY3Rpb24gKGNhblJlc2l6ZSkgewogICAgICAgICAgICBpZiAoY2FuUmVzaXplID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9yZXNpemFibGU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fcmVzaXphYmxlID0gY2FuUmVzaXplOwogICAgICAgICAgICB0aGlzLl9zZXRSZXNpemFibGVDbGFzc2VzKGNhblJlc2l6ZSk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgLy8gU2V0cyByZXNpemFibGUgY2xhc3Nlcy4gT3ZlcnJpZGRlbiBieSBzdWJjbGFzc2VzIHRoYXQgb25seSByZXNpemUgaW4gb25lIGRpbWVuc2lvbi4KICAgICAgICBEcmFnQm94TGF5ZXIucHJvdG90eXBlLl9zZXRSZXNpemFibGVDbGFzc2VzID0gZnVuY3Rpb24gKGNhblJlc2l6ZSkgewogICAgICAgICAgICBpZiAoY2FuUmVzaXplICYmIHRoaXMuZW5hYmxlZCgpKSB7CiAgICAgICAgICAgICAgICB0aGlzLmFkZENsYXNzKCJ4LXJlc2l6YWJsZSIpOwogICAgICAgICAgICAgICAgdGhpcy5hZGRDbGFzcygieS1yZXNpemFibGUiKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMucmVtb3ZlQ2xhc3MoIngtcmVzaXphYmxlIik7CiAgICAgICAgICAgICAgICB0aGlzLnJlbW92ZUNsYXNzKCJ5LXJlc2l6YWJsZSIpOwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBEcmFnQm94TGF5ZXIucHJvdG90eXBlLm1vdmFibGUgPSBmdW5jdGlvbiAobW92YWJsZSkgewogICAgICAgICAgICBpZiAobW92YWJsZSA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fbW92YWJsZTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9tb3ZhYmxlID0gbW92YWJsZTsKICAgICAgICAgICAgdGhpcy5fc2V0TW92YWJsZUNsYXNzKCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgRHJhZ0JveExheWVyLnByb3RvdHlwZS5fc2V0TW92YWJsZUNsYXNzID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICBpZiAodGhpcy5tb3ZhYmxlKCkgJiYgdGhpcy5lbmFibGVkKCkpIHsKICAgICAgICAgICAgICAgIHRoaXMuYWRkQ2xhc3MoIm1vdmFibGUiKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMucmVtb3ZlQ2xhc3MoIm1vdmFibGUiKTsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogU2V0cyB0aGUgY2FsbGJhY2sgdG8gYmUgY2FsbGVkIHdoZW4gZHJhZ2dpbmcgc3RhcnRzLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtEcmFnQm94Q2FsbGJhY2t9IGNhbGxiYWNrCiAgICAgICAgICogQHJldHVybnMge0RyYWdCb3hMYXllcn0gVGhlIGNhbGxpbmcgRHJhZ0JveExheWVyLgogICAgICAgICAqLwogICAgICAgIERyYWdCb3hMYXllci5wcm90b3R5cGUub25EcmFnU3RhcnQgPSBmdW5jdGlvbiAoY2FsbGJhY2spIHsKICAgICAgICAgICAgdGhpcy5fZHJhZ1N0YXJ0Q2FsbGJhY2tzLmFkZChjYWxsYmFjayk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogUmVtb3ZlcyBhIGNhbGxiYWNrIHRvIGJlIGNhbGxlZCB3aGVuIGRyYWdnaW5nIHN0YXJ0cy4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7RHJhZ0JveENhbGxiYWNrfSBjYWxsYmFjawogICAgICAgICAqIEByZXR1cm5zIHtEcmFnQm94TGF5ZXJ9IFRoZSBjYWxsaW5nIERyYWdCb3hMYXllci4KICAgICAgICAgKi8KICAgICAgICBEcmFnQm94TGF5ZXIucHJvdG90eXBlLm9mZkRyYWdTdGFydCA9IGZ1bmN0aW9uIChjYWxsYmFjaykgewogICAgICAgICAgICB0aGlzLl9kcmFnU3RhcnRDYWxsYmFja3MuZGVsZXRlKGNhbGxiYWNrKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIGEgY2FsbGJhY2sgdG8gYmUgY2FsbGVkIGR1cmluZyBkcmFnZ2luZy4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7RHJhZ0JveENhbGxiYWNrfSBjYWxsYmFjawogICAgICAgICAqIEByZXR1cm5zIHtEcmFnQm94TGF5ZXJ9IFRoZSBjYWxsaW5nIERyYWdCb3hMYXllci4KICAgICAgICAgKi8KICAgICAgICBEcmFnQm94TGF5ZXIucHJvdG90eXBlLm9uRHJhZyA9IGZ1bmN0aW9uIChjYWxsYmFjaykgewogICAgICAgICAgICB0a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HMuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0ge0RyYWdCb3hDYWxsYmFja30gY2FsbGJhY2sKICAgICAgICAgKiBAcmV0dXJucyB7RHJhZ0JveExheWVyfSBUaGUgY2FsbGluZyBEcmFnQm94TGF5ZXIuCiAgICAgICAgICovCiAgICAgICAgRHJhZ0JveExheWVyLnByb3RvdHlwZS5vZmZEcmFnRW5kID0gZnVuY3Rpb24gKGNhbGxiYWNrKSB7CiAgICAgICAgICAgIHRoaXMuX2RyYWdFbmRDYWxsYmFja3MuZGVsZXRlKGNhbGxiYWNrKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIHRoZSBpbnRlcm5hbCBJbnRlcmFjdGlvbnMuRHJhZyBvZiB0aGUgRHJhZ0JveExheWVyLgogICAgICAgICAqLwogICAgICAgIERyYWdCb3hMYXllci5wcm90b3R5cGUuZHJhZ0ludGVyYWN0aW9uID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fZHJhZ0ludGVyYWN0aW9uOwogICAgICAgIH07CiAgICAgICAgRHJhZ0JveExheWVyLnByb3RvdHlwZS5lbmFibGVkID0gZnVuY3Rpb24gKGVuYWJsZWQpIHsKICAgICAgICAgICAgaWYgKGVuYWJsZWQgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2RyYWdJbnRlcmFjdGlvbi5lbmFibGVkKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fZHJhZ0ludGVyYWN0aW9uLmVuYWJsZWQoZW5hYmxlZCk7CiAgICAgICAgICAgIHRoaXMuX3NldFJlc2l6YWJsZUNsYXNzZXModGhpcy5yZXNpemFibGUoKSk7CiAgICAgICAgICAgIHRoaXMuX3NldE1vdmFibGVDbGFzcygpOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIERyYWdCb3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AgICAgIGVsc2UgewogICAgICAgICAgICAgICAgX3RoaXMuYWRkQ2xhc3MoImhvcml6b250YWwiKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBfdGhpcy5fc2NhbGVVcGRhdGVDYWxsYmFjayA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgIF90aGlzLl9zeW5jUGl4ZWxQb3NpdGlvbkFuZFZhbHVlKCk7CiAgICAgICAgICAgICAgICBfdGhpcy5yZW5kZXIoKTsKICAgICAgICAgICAgfTsKICAgICAgICAgICAgcmV0dXJuIF90aGlzOwogICAgICAgIH0KICAgICAgICBHdWlkZUxpbmVMYXllci5wcm90b3R5cGUuX3NldHVwID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLl9zZXR1cC5jYWxsKHRoaXMpOwogICAgICAgICAgICB0aGlzLl9ndWlkZUxpbmUgPSB0aGlzLmNvbnRlbnQoKS5hcHBlbmQoImxpbmUiKS5jbGFzc2VkKCJndWlkZS1saW5lIiwgdHJ1ZSk7CiAgICAgICAgfTsKICAgICAgICBHdWlkZUxpbmVMYXllci5wcm90b3R5cGUuX3NpemVGcm9tT2ZmZXIgPSBmdW5jdGlvbiAoYXZhaWxhYmxlV2lkdGgsIGF2YWlsYWJsZUhlaWdodCkgewogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgd2lkdGg6IGF2YWlsYWJsZVdpZHRoLAogICAgICAgICAgICAgICAgaGVpZ2h0OiBhdmFpbGFibGVIZWlnaHQsCiAgICAgICAgICAgIH07CiAgICAgICAgfTsKICAgICAgICBHdWlkZUxpbmVMYXllci5wcm90b3R5cGUuX2lzVmVydGljYWwgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9vcmllbnRhdGlvbiA9PT0gR3VpZGVMaW5lTGF5ZXIuT1JJRU5UQVRJT05fVkVSVElDQUw7CiAgICAgICAgfTsKICAgICAgICBHdWlkZUxpbmVMYXllci5wcm90b3R5cGUuZml4ZWRXaWR0aCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgfTsKICAgICAgICBHdWlkZUxpbmVMYXllci5wcm90b3R5cGUuZml4ZWRIZWlnaHQgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgIH07CiAgICAgICAgR3VpZGVMaW5lTGF5ZXIucHJvdG90eXBlLmNvbXB1dGVMYXlvdXQgPSBmdW5jdGlvbiAob3JpZ2luLCBhdmFpbGFibGVXaWR0aCwgYXZhaWxhYmxlSGVpZ2h0KSB7CiAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUuY29tcHV0ZUxheW91dC5jYWxsKHRoaXMsIG9yaWdpbiwgYXZhaWxhYmxlV2lkdGgsIGF2YWlsYWJsZUhlaWdodCk7CiAgICAgICAgICAgIGlmICh0aGlzLnNjYWxlKCkgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgaWYgKHRoaXMuX2lzVmVydGljYWwoKSkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuc2NhbGUoKS5yYW5nZShbMCwgdGhpcy53aWR0aCgpXSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLnNjYWxlKCkucmFuZ2UoW3RoaXMuaGVpZ2h0KCksIDBdKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIEd1aWRlTGluZUxheWVyLnByb3RvdHlwZS5yZW5kZXJJbW1lZGlhdGVseSA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgX3N1cGVyLnByb3RvdHlwZS5yZW5kZXJJbW1lZGlhdGVseS5jYWxsKHRoaXMpOwogICAgICAgICAgICB0aGlzLl9zeW5jUGl4ZWxQb3NpdGlvbkFuZFZhbHVlKCk7CiAgICAgICAgICAgIHRoaXMuX2d1aWRlTGluZS5hdHRycyh7CiAgICAgICAgICAgICAgICB4MTogdGhpcy5faXNWZXJ0aWNhbCgpID8gdGhpcy5waXhlbFBvc2l0aW9uKCkgOiAwLAogICAgICAgICAgICAgICAgeTE6IHRoaXMuX2lzVmVydGljYWwoKSA/IDAgOiB0aGlzLnBpeGVsUG9zaXRpb24oKSwKICAgICAgICAgICAgICAgIHgyOiB0aGlzLl9pc1ZlcnRpY2FsKCkgPyB0aGlzLnBpeGVsUG9zaXRpb24oKSA6IHRoaXMud2lkdGgoKSwKICAgICAgICAgICAgICAgIHkyOiB0aGlzLl9pc1ZlcnRpY2FsKCkgPyB0aGlzLmhlaWdodCgpIDogdGhpcy5waXhlbFBvc2l0aW9uKCksCiAgICAgICAgICAgIH0pOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIC8vIHNldHMgcGl4ZWxQb3NpdGlvbigpIG9yIHZhbHVlKCkgYmFzZWQgb24gdGhlIG90aGVyLCBkZXBlbmRpbmcgb24gd2hpY2ggd2FzIHRoZSBsYXN0IG9uZSBzZXQKICAgICAgICBHdWlkZUxpbmVMYXllci5wcm90b3R5cGUuX3N5bmNQaXhlbFBvc2l0aW9uQW5kVmFsdWUgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLnNjYWxlKCkgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0aGlzLl9tb2RlID09PSBQcm9wZXJ0eU1vZGUuVkFMVUUgJiYgdGhpcy52YWx1ZSgpICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3BpeGVsUG9zaXRpb24gPSB0aGlzLnNjYWxlKCkuc2NhbGUodGhpcy52YWx1ZSgpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmICh0aGlzLl9tb2RlID09PSBQcm9wZXJ0eU1vZGUuUElYRUwgJiYgdGhpcy5waXhlbFBvc2l0aW9uKCkgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5fdmFsdWUgPSB0aGlzLnNjYWxlKCkuaW52ZXJ0KHRoaXMucGl4ZWxQb3NpdGlvbigpKTsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgR3VpZGVMaW5lTGF5ZXIucHJvdG90eXBlLl9zZXRQaXhlbFBvc2l0aW9uV2l0aG91dENoYW5naW5nTW9kZSA9IGZ1bmN0aW9uIChwaXhlbFBvc2l0aW9uKSB7CiAgICAgICAgICAgIHRoaXMuX3BpeGVsUG9zaXRpb24gPSBwaXhlbFBvc2l0aW9uOwogICAgICAgICAgICBpZiAodGhpcy5zY2FsZSgpICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3ZhbHVlID0gdGhpcy5zY2FsZSgpLmludmVydCh0aGlzLnBpeGVsUG9zaXRpb24oKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5yZW5kZXIoKTsKICAgICAgICB9OwogICAgICAgIEd1aWRlTGluZUxheWVyLnByb3RvdHlwZS5zY2FsZSA9IGZ1bmN0aW9uIChzY2FsZSkgewogICAgICAgICAgICBpZiAoc2NhbGUgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3NjYWxlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciBwcmV2aW91c1NjYWxlID0gdGhpcy5fc2NhbGU7CiAgICAgICAgICAgIGlmIChwcmV2aW91c1NjYWxlICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIHByZXZpb3VzU2NhbGUub2ZmVXBkYXRlKHRoaXMuX3NjYWxlVXBkYXRlQ2FsbGJhY2spOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX3NjYWxlID0gc2NhbGU7CiAgICAgICAgICAgIHRoaXMuX3NjYWxlLm9uVXBkYXRlKHRoaXMuX3NjYWxlVXBkYXRlQ2FsbGJhY2spOwogICAgICAgICAgICB0aGlzLl9zeW5jUGl4ZWxQb3NpdGlvbkFuZFZhbHVlKCk7CiAgICAgICAgICAgIHRoaXMucmVkcmF3KCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgR3VpZGVMaW5lTGF5ZXIucHJvdG90eXBlLnZhbHVlID0gZnVuY3Rpb24gKHZhbHVlKSB7CiAgICAgICAgICAgIGlmICh2YWx1ZSA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fdmFsdWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fdmFsdWUgPSB2YWx1ZTsKICAgICAgICAgICAgdGhpcy5fbW9kZSA9IFByb3BlcnR5TW9kZS5WQUxVRTsKICAgICAgICAgICAgdGhpcy5fc3luY1BpeGVsUG9zaXRpb25BbmRWYWx1ZSgpOwogICAgICAgICAgICB0aGlzLnJlbmRlcigpOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIEd1aWRlTGluZUxheWVyLnByb3RvdHlwZS5waXhlbFBvc2l0aW9uID0gZnVuY3Rpb24gKHBpeGVsUG9zaXRpb24pIHsKICAgICAgICAgICAgaWYgKHBpeGVsUG9zaXRpb24gPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3BpeGVsUG9zaXRpb247CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKCF1dGlscyQxLk1hdGguaXNWYWxpZE51bWJlcihwaXhlbFBvc2l0aW9uKSkgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCJwaXhlbFBvc2l0aW9uIG11c3QgYmUgYSBmaW5pdGUgbnVtYmVyIik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fcGl4ZWxQb3NpdGlvbiA9IHBpeGVsUG9zaXRpb247CiAgICAgICAgICAgIHRoaXMuX21vZGUgPSBQcm9wZX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EcmFnTGluZUxheWVyID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikgewogICAgICAgIHRzbGliX2VzNi5fX2V4dGVuZHMoRHJhZ0xpbmVMYXllciwgX3N1cGVyKTsKICAgICAgICBmdW5jdGlvbiBEcmFnTGluZUxheWVyKG9yaWVudGF0aW9uKSB7CiAgICAgICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMsIG9yaWVudGF0aW9uKSB8fCB0aGlzOwogICAgICAgICAgICBfdGhpcy5fZGV0ZWN0aW9uUmFkaXVzID0gMzsKICAgICAgICAgICAgX3RoaXMuX2VuYWJsZWQgPSB0cnVlOwogICAgICAgICAgICBfdGhpcy5hZGRDbGFzcygiZHJhZy1saW5lLWxheWVyIik7CiAgICAgICAgICAgIF90aGlzLmFkZENsYXNzKCJlbmFibGVkIik7CiAgICAgICAgICAgIF90aGlzLl9kcmFnSW50ZXJhY3Rpb24gPSBuZXcgaW50ZXJhY3Rpb25zLkRyYWcoKTsKICAgICAgICAgICAgX3RoaXMuX2RyYWdJbnRlcmFjdGlvbi5hdHRhY2hUbyhfdGhpcyk7CiAgICAgICAgICAgIHZhciBvbkxpbmUgPSBmdW5jdGlvbiAocCkgewogICAgICAgICAgICAgICAgcmV0dXJuIChfdGhpcy5faXNWZXJ0aWNhbCgpICYmCiAgICAgICAgICAgICAgICAgICAgX3RoaXMucGl4ZWxQb3NpdGlvbigpIC0gX3RoaXMuZGV0ZWN0aW9uUmFkaXVzKCkgPD0gcC54ICYmCiAgICAgICAgICAgICAgICAgICAgcC54IDw9IF90aGlzLnBpeGVsUG9zaXRpb24oKSArIF90aGlzLmRldGVjdGlvblJhZGl1cygpKSB8fAogICAgICAgICAgICAgICAgICAgICghX3RoaXMuX2lzVmVydGljYWwoKSAmJgogICAgICAgICAgICAgICAgICAgICAgICBfdGhpcy5waXhlbFBvc2l0aW9uKCkgLSBfdGhpcy5kZXRlY3Rpb25SYWRpdXMoKSA8PSBwLnkgJiYKICAgICAgICAgICAgICAgICAgICAgICAgcC55IDw9IF90aGlzLnBpeGVsUG9zaXRpb24oKSArIF90aGlzLmRldGVjdGlvblJhZGl1cygpKTsKICAgICAgICAgICAgfTsKICAgICAgICAgICAgdmFyIGRyYWdnaW5nID0gZmFsc2U7CiAgICAgICAgICAgIHZhciBpbnRlcmFjdGlvbkRyYWdTdGFydENhbGxiYWNrID0gZnVuY3Rpb24gKHN0YXJ0KSB7CiAgICAgICAgICAgICAgICBpZiAob25MaW5lKHN0YXJ0KSkgewogICAgICAgICAgICAgICAgICAgIGRyYWdnaW5nID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICBfdGhpcy5fZHJhZ1N0YXJ0Q2FsbGJhY2tzLmNhbGxDYWxsYmFja3MoX3RoaXMpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9OwogICAgICAgICAgICBfdGhpcy5fZHJhZ0ludGVyYWN0aW9uLm9uRHJhZ1N0YXJ0KGludGVyYWN0aW9uRHJhZ1N0YXJ0Q2FsbGJhY2spOwogICAgICAgICAgICB2YXIgaW50ZXJhY3Rpb25EcmFnQ2FsbGJhY2sgPSBmdW5jdGlvbiAoc3RhcnQsIGVuZCkgewogICAgICAgICAgICAgICAgaWYgKGRyYWdnaW5nKSB7CiAgICAgICAgICAgICAgICAgICAgX3RoaXMuX3NldFBpeGVsUG9zaXRpb25XaXRob3V0Q2hhbmdpbmdNb2RlKF90aGlzLl9pc1ZlcnRpY2FsKCkgPyBlbmQueCA6IGVuZC55KTsKICAgICAgICAgICAgICAgICAgICBfdGhpcy5fZHJhZ0NhbGxiYWNrcy5jYWxsQ2FsbGJhY2tzKF90aGlzKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfTsKICAgICAgICAgICAgX3RoaXMuX2RyYWdJbnRlcmFjdGlvbi5vbkRyYWcoaW50ZXJhY3Rpb25EcmFnQ2FsbGJhY2spOwogICAgICAgICAgICB2YXIgaW50ZXJhY3Rpb25Ecm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ICAgICAgICAgICAgcmV0dXJuIF90aGlzOwogICAgICAgIH0KICAgICAgICBEcmFnTGluZUxheWVyLnByb3RvdHlwZS5fc2V0dXAgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUuX3NldHVwLmNhbGwodGhpcyk7CiAgICAgICAgICAgIHRoaXMuX2RldGVjdGlvbkVkZ2UgPSB0aGlzLmNvbnRlbnQoKS5hcHBlbmQoImxpbmUiKS5zdHlsZXMoewogICAgICAgICAgICAgICAgb3BhY2l0eTogMCwKICAgICAgICAgICAgICAgIHN0cm9rZTogInBpbmsiLAogICAgICAgICAgICAgICAgInBvaW50ZXItZXZlbnRzIjogInZpc2libGVTdHJva2UiLAogICAgICAgICAgICB9KS5jbGFzc2VkKCJkcmFnLWVkZ2UiLCB0cnVlKTsKICAgICAgICB9OwogICAgICAgIERyYWdMaW5lTGF5ZXIucHJvdG90eXBlLnJlbmRlckltbWVkaWF0ZWx5ID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLnJlbmRlckltbWVkaWF0ZWx5LmNhbGwodGhpcyk7CiAgICAgICAgICAgIHRoaXMuX2RldGVjdGlvbkVkZ2UuYXR0cnMoewogICAgICAgICAgICAgICAgeDE6IHRoaXMuX2lzVmVydGljYWwoKSA/IHRoaXMucGl4ZWxQb3NpdGlvbigpIDogMCwKICAgICAgICAgICAgICAgIHkxOiB0aGlzLl9pc1ZlcnRpY2FsKCkgPyAwIDogdGhpcy5waXhlbFBvc2l0aW9uKCksCiAgICAgICAgICAgICAgICB4MjogdGhpcy5faXNWZXJ0aWNhbCgpID8gdGhpcy5waXhlbFBvc2l0aW9uKCkgOiB0aGlzLndpZHRoKCksCiAgICAgICAgICAgICAgICB5MjogdGhpcy5faXNWZXJ0aWNhbCgpID8gdGhpcy5oZWlnaHQoKSA6IHRoaXMucGl4ZWxQb3NpdGlvbigpLAogICAgICAgICAgICAgICAgInN0cm9rZS13aWR0aCI6IHRoaXMuX2RldGVjdGlvblJhZGl1cyAqIDIsCiAgICAgICAgICAgIH0pOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIERyYWdMaW5lTGF5ZXIucHJvdG90eXBlLmRldGVjdGlvblJhZGl1cyA9IGZ1bmN0aW9uIChkZXRlY3Rpb25SYWRpdXMpIHsKICAgICAgICAgICAgaWYgKGRldGVjdGlvblJhZGl1cyA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fZGV0ZWN0aW9uUmFkaXVzOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChkZXRlY3Rpb25SYWRpdXMgPCAwKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoImRldGVjdGlvbiByYWRpdXMgY2Fubm90IGJlIG5lZ2F0aXZlLiIpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2RldGVjdGlvblJhZGl1cyA9IGRldGVjdGlvblJhZGl1czsKICAgICAgICAgICAgdGhpcy5yZW5kZXIoKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBEcmFnTGluZUxheWVyLnByb3RvdHlwZS5lbmFibGVkID0gZnVuY3Rpb24gKGVuYWJsZWQpIHsKICAgICAgICAgICAgaWYgKGVuYWJsZWQgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2VuYWJsZWQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fZW5hYmxlZCA9IGVuYWJsZWQ7CiAgICAgICAgICAgIGlmIChlbmFibGVkKSB7CiAgICAgICAgICAgICAgICB0aGlzLmFkZENsYXNzKCJlbmFibGVkIik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLnJlbW92ZUNsYXNzKCJlbmFibGVkIik7CiAgICAgICAgICAgIH0KICAgICAgICAgICA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Y2tzLmRlbGV0ZShjYWxsYmFjayk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogU2V0cyBhIGNhbGxiYWNrIHRvIGJlIGNhbGxlZCBkdXJpbmcgZHJhZ2dpbmcuCiAgICAgICAgICogVGhlIGNhbGxiYWNrIHdpbGwgYmUgcGFzc2VkIHRoZSBjYWxsaW5nIERyYWdMaW5lTGF5ZXIuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0ge0RyYWdMaW5lQ2FsbGJhY2s8RD59IGNhbGxiYWNrCiAgICAgICAgICogQHJldHVybnMge0RyYWdMaW5lTGF5ZXI8RD59IFRoZSBjYWxsaW5nIERyYWdMaW5lTGF5ZXIuCiAgICAgICAgICovCiAgICAgICAgRHJhZ0xpbmVMYXllci5wcm90b3R5cGUub25EcmFnID0gZnVuY3Rpb24gKGNhbGxiYWNrKSB7CiAgICAgICAgICAgIHRoaXMuX2RyYWdDYWxsYmFja3MuYWRkKGNhbGxiYWNrKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBSZW1vdmVzIGEgY2FsbGJhY2sgdGhhdCB3b3VsZCBiZSBjYWxsZWQgZHVyaW5nIGRyYWdnaW5nLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtEcmFnTGluZUNhbGxiYWNrPEQ+fSBjYWxsYmFjawogICAgICAgICAqIEByZXR1cm5zIHtEcmFnTGluZUxheWVyPEQ+fSBUaGUgY2FsbGluZyBEcmFnTGluZUxheWVyLgogICAgICAgICAqLwogICAgICAgIERyYWdMaW5lTGF5ZXIucHJvdG90eXBlLm9mZkRyYWcgPSBmdW5jdGlvbiAoY2FsbGJhY2spIHsKICAgICAgICAgICAgdGhpcy5fZHJhZ0NhbGxiYWNrcy5kZWxldGUoY2FsbGJhY2spOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgYSBjYWxsYmFjayB0byBiZSBjYWxsZWQgd2hlbiBkcmFnZ2luZyBlbmRzLgogICAgICAgICAqIFRoZSBjYWxsYmFjayB3aWxsIGJlIHBhc3NlZCB0aGUgY2FsbGluZyBEcmFnTGluZUxheWVyLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtEcmFnTGluZUNhbGxiYWNrPEQ+fSBjYWxsYmFjawogICAgICAgICAqIEByZXR1cm5zIHtEcmFnTGluZUxheWVyPEQ+fSBUaGUgY2FsbGluZyBEcmFnTGluZUxheWVyLgogICAgICAgICAqLwogICAgICAgIERyYWdMaW5lTGF5ZXIucHJvdG90eXBlLm9uRHJhZ0VuZCA9IGZ1bmN0aW9uIChjYWxsYmFjaykgewogICAgICAgICAgICB0aGlzLl9kcmFnRW5kQ2FsbGJhY2tzLmFkZChjYWxsYmFjayk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogUmVtb3ZlcyBhIGNhbGxiYWNrIHRoYXQgd291bGQgYmUgY2FsbGVkIHdoZW4gZHJhZ2dpbmcgZW5kcy4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7RHJhZ0xpbmVDYWxsYmFjazxEPn0gY2FsbGJhY2sKICAgICAgICAgKiBAcmV0dXJucyB7RHJhZ0xpbmVMYXllcjxEPn0gVGhlIGNhbGxpbmcgRHJhZ0xpbmVMYXllci4KICAgICAgICAgKi8KICAgICAgICBEcmFnTGluZUxheWVyLnByb3RvdHlwZS5vZmZEcmFnRW5kID0gZnVuY3Rpb24gKGNhbGxiYWNrKSB7CiAgICAgICAgICAgIHRoaXMuX2RyYWdFbmRDYWxsYmFja3MuZGVsZXRlKGNhbGxiYWNrKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBEcmFnTGluZUxheWVyLnByb3RvdHlwZS5kZXN0cm95ID0gZ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pb247CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIGdyaWRQb3NpdGlvbjsKICAgICAgICAgICAgdmFyIHByZXZpb3VzUG9zaXRpb24gPSBwcmV2aW91c1RpY2tbdGlja1ZhbF0gPT09IHVuZGVmaW5lZAogICAgICAgICAgICAgICAgPyB1bmRlZmluZWQKICAgICAgICAgICAgICAgIDogc2NhbGUuc2NhbGUocHJldmlvdXNUaWNrW3RpY2tWYWxdKTsKICAgICAgICAgICAgaWYgKHByZXZpb3VzUG9zaXRpb24gIT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICAgICAgZ3JpZFBvc2l0aW9uID0gcHJldmlvdXNQb3NpdGlvbiArIChwb3NpdGlvbiAtIHByZXZpb3VzUG9zaXRpb24pIC8gMjsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gZ3JpZFBvc2l0aW9uOwogICAgICAgIH07CiAgICB9CiAgICB2YXIgR3JpZGxpbmVzID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikgewogICAgICAgIHRzbGliX2VzNi5fX2V4dGVuZHMoR3JpZGxpbmVzLCBfc3VwZXIpOwogICAgICAgIC8qKgogICAgICAgICAqIEBjb25zdHJ1Y3RvcgogICAgICAgICAqIEBwYXJhbSB7U2NhbGV9IHhTY2FsZSBUaGUgc2NhbGUgdG8gYmFzZSB0aGUgeCBncmlkbGluZXMgb24uIFBhc3MgbnVsbCBpZiBubyBncmlkbGluZXMgYXJlIGRlc2lyZWQuCiAgICAgICAgICogQHBhcmFtIHtTY2FsZX0geVNjYWxlIFRoZSBzY2FsZSB0byBiYXNlIHRoZSB5IGdyaWRsaW5lcyBvbi4gUGFzcyBudWxsIGlmIG5vIGdyaWRsaW5lcyBhcmUgZGVzaXJlZC4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBHcmlkbGluZXMoeFNjYWxlLCB5U2NhbGUpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcykgfHwgdGhpczsKICAgICAgICAgICAgX3RoaXMuYWRkQ2xhc3MoImdyaWRsaW5lcyIpOwogICAgICAgICAgICBfdGhpcy5feFNjYWxlID0geFNjYWxlOwogICAgICAgICAgICBfdGhpcy5feVNjYWxlID0geVNjYWxlOwogICAgICAgICAgICBfdGhpcy5fcmVuZGVyQ2FsbGJhY2sgPSBmdW5jdGlvbiAoc2NhbGUpIHsgcmV0dXJuIF90aGlzLnJlbmRlcigpOyB9OwogICAgICAgICAgICBpZiAoX3RoaXMuX3hTY2FsZSkgewogICAgICAgICAgICAgICAgX3RoaXMuX3hTY2FsZS5vblVwZGF0ZShfdGhpcy5fcmVuZGVyQ2FsbGJhY2spOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChfdGhpcy5feVNjYWxlKSB7CiAgICAgICAgICAgICAgICBfdGhpcy5feVNjYWxlLm9uVXBkYXRlKF90aGlzLl9yZW5kZXJDYWxsYmFjayk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIF90aGlzOwogICAgICAgIH0KICAgICAgICBHcmlkbGluZXMucHJvdG90eXBlLmJldHdlZW5YID0gZnVuY3Rpb24gKF9iZXR3ZWVuWCkgewogICAgICAgICAgICBpZiAoX2JldHdlZW5YID09PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9iZXR3ZWVuWDsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoX2JldHdlZW5YICE9PSB0aGlzLl9iZXR3ZWVuWCkgewogICAgICAgICAgICAgICAgdGhpcy5fYmV0d2VlblggPSBfYmV0d2Vlblg7CiAgICAgICAgICAgICAgICB0aGlzLnJlbmRlcigpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgR3JpZGxpbmVzLnByb3RvdHlwZS5iZXR3ZWVuWSA9IGZ1bmN0aW9uIChfYmV0d2VlblkpIHsKICAgICAgICAgICAgaWYgKF9iZXR3ZWVuWSA9PT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fYmV0d2Vlblk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKF9iZXR3ZWVuWSAhPT0gdGhpcy5fYmV0d2VlblkpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2JldHdlZW5ZID0gX2JldHdlZW5ZOwogICAgICAgICAgICAgICAgdGhpcy5yZW5kZXIoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIEdyaWRsaW5lcy5wcm90b3R5cGUuZGVzdHJveSA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgX3N1cGVyLnByb3RvdHlwZS5kZXN0cm95LmNhbGwodGhpcyk7CiAgICAgICAgICAgIGlmICh0aGlzLl94U2NhbGUpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3hTY2FsZS5vZmZVcGRhdGUodGhpcy5fcmVuZGVyQ2FsbGJhY2spOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0aGlzLl95U2NhbGUpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3lTY2FsZS5vZmZVcGRhdGUodGhpcy5fcmVuZGVyQ2FsbGJhY2spOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgR3JpZGxpbmVzLnByb3RvdHlwZS5fc2V0dXAgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUuX3NldHVwLmNhbGwodGhpcyk7CiAgICAgICAgICAgIHRoaXMuX3hMaW5lc0NvbnRhaW5lciA9IHRoaXMuY29udGVudCgpLmFwcGVuZCgiZyIpLmNsYXNzZWQoIngtZ3JpZGxpbmVzIiwgdHJ1ZSk7CiAgICAgICAgICAgIHRoaXMuX3lMaW5lc0NvbnRhaW5lciA9IHRoaXMuY29udGVudCgpLmFwcGVuZCgiZyIpLmNsYXNzZWQoInktZ3JpZGxpbmVzIiwgdHJ1ZSk7CiAgICAgICAgfTsKICAgICAgICBHcmlkbGluZXMucHJvdG90eXBlLnJlbmRlckltbWVkaWF0ZWx5ID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLnJlbmRlckltbWVkaWF0ZWx5LmNhbGwodGhpcyk7CiAgICAgICAgICAgIHRoaXMuX3JlZHJhd1hMaW5lcygpOwogICAgICAgICAgICB0aGlzLl9yZWRyYXdZTGluZXMoKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBHcmlkbGluZXMucHJvdG90eXBlLmNvbXB1dGVMYXlvdXQgPSBmdW5jdGlvbiAob3JpZ2luLCBhdmFpbGFibGVXaWR0aCwgYXZhaWxhYmxlSGVpZ2h0KSB7CiAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUuY29tcHV0ZUxheW91dC5jYWxsKHRoaXMsIG9yaWdpbiwgYXZhaWxhYmxlV2lkdGgsIGF2YWlsYWJsZUhlaWdodCk7CiAgICAgICAgICAgIGlmICh0aGlzLl94U2NhbGUgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5feFNjYWxlLnJhbmdlKFswLCB0aGlzLndpZHRoKCldKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5feVNjYWxlICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3lTY2FsZS5yYW5nZShbdGhpcy5oZWlnaHQoKSwgMF0pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgR3JpZGxpbmVzLnByb3RvdHlwZS5fcmVkcmF3WExpbmVzID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICBpZiAodGhpcy5feFNjYWxlKSB7CiAgICAgICAgICAgICAgICB2YXIgYmV0d2VlbiA9IHRoaXMuYmV0d2VlblgoKTsKICAgICAgICAgICAgICAgIHZhciB4VGlja3MgPSB0aGlzLl94U2NhbGUudGlja3MoKS5zbGljZShiZXR3ZWVuID8gMSA6IDApOwogICAgICAgICAgICAgICAgdmFyIHhMaW5lc1VwZGF0ZSA9IHRoaXMuX3hMaW5lc0NvbnRhaW5lci5zZWxlY3RBbGwoImxpbmUiKS5kYXRhKHhUaWNrcyk7CiAgICAgICAgICAgICAgICB2YXIgeExpbmVzID0geExpbmVzVXBkYXRlLmVudGVyKCkuYXBwZW5kKCJsaW5lIikubWVyZ2UoeExpbmVzVXBkYXRlKTsKICAgICAgICAgICAgICAgIHhMaW5lcy5hdHRyKCJ4MSIsIGdyaWRQb3NpdGlvbkZhY3RvcnkodGhpcy5feFNjYWxlLCBiZXR3ZWVuLCB0aGlzLl94U2NhbGUudGlja3MoKSkpCiAgICAgICAgICAgICAgICAgICAgLmF0dHIoInkxIiwgMCkKICAgICAgICAgICAgICAgICAgICAuYXR0cigieDIiLCBncmlkUG9zaXRpb25GYWN0b3J5KHRoaXMuX3hTY2FsZSwgYmV0d2VlbiwgdGhpcy5feFNjYWxlLnRpY2tzKCkpKQogICAgICAgICAgICAgICAgICAgIC5hdHRyKCJ5MiIsIHRoaXMuaGVpZ2h0KCkpCiAgICAgICAgICAgICAgICAgICAgLmNsYXNzZWQoImJldHdlZW5saW5lIiwgYmV0d2VlbikKICAgICAgICAgICAgICAgICAgICAuY2xhc3NlZCgiemVyb2xpbmUiLCBmdW5jdGlvbiAodCkgeyByZXR1cm4gdCA9PT0gMDsgfSk7CiAgICAgICAgICAgICAgICB4TGluZXNVcGRhdGUuZXhpdCgpLnJlbW92ZSgpOwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBHcmlkbGluZXMucHJvdG90eXBlLl9yZWRyYXdZTGluZXMgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl95U2NhbGUpIHsKICAgICAgICAgICAgICAgIHZhciBiZXR3ZWVuID0gdGhpcy5iZXR3ZWVuWSgpOwogICAgICAgICAgICAgICAgdmFyIHlUaWNrcyA9IHRoaXMuX3lTY2FsZS50aWNrcygpLnNsaWNlKGJldHdlZW4gPyAxIDogMCk7CiAgICAgICAgICAgICAgICB2YXIgeUxpbmVzVXBkYXRlID0gdGhpcy5feUxpbmVzQ29udGFpbmVyLnNlbGVjdEFsbCgibGluZSIpLmRhdGEoeVRpY2tzKTsKICAgICAgICAgICAgICAgIHZhciB5TGluZXMgPSB5TGluZXNVcGRhdGUuZW50ZXIoKS5hcHBlbmQoImxpbmUiKS5tZXJnZSh5TGluZXNVcGRhdGUpOwogICAgICAgICAgICAgICAgeUxpbmVzLmF0dHIoIngxIiwgMCkKICAgICAgICAgICAgICAgICAgICAuYXR0cigieTEiLCBncmlkUG9zaXRpb25GYWN0b3J5KHRoaXMuX3lTY2FsZSwgYmV0d2VlbiwgdGhpcy5feVNjYWxlLnRpY2tzKCkpKQogICAgICAgICAgICAgICAgICAgIC5hdHRyKCJ4MiIsIHRoaXMud2lkdGgoKSkKICAgICAgICAgICAgICAgICAgICAuYXR0cigieTIiLCBncmlkUG9zaXRpb25GYWN0b3J5KHRoaXMuX3lTY2FsZSwgYmV0d2VlbiwgdGhpcy5feVNjYWxlLnRpY2tzKCkpKQogICAgICAgICAgICAgICAgICAgIC5jbGFzc2VkKCJiZXR3ZWVubGluZSIsIGJldHdlZW4pCiAgICAgICAgICAgICAgICAgICAgLmNsYXNzZWQoInplcm9saW5lIiwgZnVuY3Rpb24gKHQpIHsgcmV0dXJuIHQgPT09IDA7IH0pOwogICAgICAgICAgICAgICAgeUxpbmVzVXBkYXRlLmV4aXQoKS5yZW1vdmUoKTsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgcmV0dXJuIEdyaWRsaW5lczsKICAgIH0oY29tcG9uZW50LkNvbXBvbmVudCkpOwogICAgZXhwb3J0cy5HcmlkbGluZXMgPSBHcmlkbGluZXM7CiAgICB9KTsKCiAgICB2YXIgY29tcG9uZW50Q29udGFpbmVyID0gY3JlYXRlQ29tbW9uanNNb2R1bGUoZnVuY3Rpb24gKG1vZHVsZSwgZXhwb3J0cykgewogICAgLyoqCiAgICAgKiBDb3B5cmlnaHQgMjAxNC1wcmVzZW50IFBhbGFudGlyIFRlY2hub2xvZ2llcwogICAgICogQGxpY2Vuc2UgTUlUCiAgICAgKi8KICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCAiX19lc01vZHVsZSIsIHsgdmFsdWU6IHRydWUgfSk7CgoKCiAgICAvKgogICAgICogQ29tcG9uZW50Q29udGFpbmVyIGNsYXNzIGVuY2Fwc3VsYXRlcyBUYWJsZSBhbmQgQ29tcG9uZW50R3JvdXAncyBzaGFyZWQgZnVuY3Rpb25hbGl0eS4KICAgICAqIEl0IHdpbGwgbm90IGRvIGFueXRoaW5nIGlmIGluc3RhbnRpYXRlZCBkaXJlY3RseS4KICAgICAqLwogICAgdmFyIENvbXBvbmVudENvbnRhaW5lciA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHsKICAgICAgICB0c2xpYl9lczYuX19leHRlbmRzKENvbXBvbmVudENvbnRhaW5lciwgX3N1cGVyKTsKICAgICAgICBmdW5jdGlvbiBDb21wb25lbnRDb250YWluZXIoKSB7CiAgICAgICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMpIHx8IHRoaXM7CiAgICAgICAgICAgIF90aGlzLl9kZXRhY2hDYWxsYmFjayA9IGZ1bmN0aW9uIChjb21wb25lbnQpIHsgcmV0dXJuIF90aGlzLnJlbW92ZShjb21wb25lbnQpOyB9OwogICAgICAgICAgICByZXR1cm4gX3RoaXM7CiAgICAgICAgfQogICAgICAgIENvbXBvbmVudENvbnRhaW5lci5wcm90b3R5cGUuYW5jaG9yID0gZnVuY3Rpb24gKHNlbGVjdGlvbikgewogICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwogICAgICAgICAgICBzZWxlY3Rpb24gPSBjb2VyY2VEMy5jb2VyY2VFeHRlcm5hbEQzKHNlbGVjdGlvbik7CiAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUuYW5jaG9yLmNhbGwodGhpcywgc2VsZWN0aW9uKTsKICAgICAgICAgICAgdGhpcy5fZm9yRWFjaChmdW5jdGlvbiAoYykgeyByZXR1cm4gYy5hbmNob3IoX3RoaXMuZWxlbWVudCgpKTsgfSk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgQ29tcG9uZW50Q29udGFpbmVyLnByb3RvdHlwZS5yZW5kZXIgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHRoaXMuX2ZvckVhY2goZnVuY3Rpb24gKGMpIHsgcmV0dXJuIGMucmVuZGVyKCk7IH0pOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIENoZWNrcyB3aGV0aGVyIHRoZSBzcGVjaWZpZWQgQ29tcG9uZW50IGlzIGluIHRoZSBDb21wb25lbnRDb250YWluZXIuCiAgICAgICAgICovCiAgICAgICAgQ29tcG9uZW50Q29udGFpbmVyLnByb3RvdHlwZS5oYXMgPSBmdW5jdGlvbiAoY29tcG9uZW50KSB7CiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigiaGFzKCkgaXMgbm90IGltcGxlbWVudGVkIG9uIENvbXBvbmVudENvbnRhaW5lciIpOwogICAgICAgIH07CiAgICAgICAgQ29tcG9uZW50Q29udGFpbmVyLnByb3RvdHlwZS5fYWRvcHRBbmRBbmNob3IgPSBmdW5jdGlvbiAoY29tcG9uZW50KSB7CiAgICAgICAgICAgIGNvbXBvbmVudC5wYXJlbnQodGhpcyk7CiAgICAgICAgICAgIGNvbXBvbmVudC5vbkRldGFjaCh0aGlzLl9kZXRhY2hDYWxsYmFjayk7CiAgICAgICAgICAgIGlmICh0aGlzLl9pc0FuY2hvcmVkKSB7CiAgICAgICAgICAgICAgICBjb21wb25lbnQuYW5jaG9yKHRoaXMuZWxlbWVudCgpKTsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogUmVtb3ZlcyB0aGUgc3BlY2lmaWVkIENvbXBvbmVudCBmcm9tIHRoZSBDb21wb25lbnRDb250YWluZXIuCiAgICAgICAgICovCiAgICAgICAgQ29tcG9uZW50Q29udGFpbmVyLnByb3RvdHlwZS5yZW1vdmUgPSBmdW5jdGlvbiAoY29tcG9uZW50KSB7CiAgICAgICAgICAgIGlmICh0aGlzLmhhcyhjb21wb25lbnQpKSB7CiAgICAgICAgICAgICAgICBjb21wb25lbnQub2ZmRGV0YWNoKHRoaXMuX2RldGFjaENhbGxiYWNrKTsKICAgICAgICAgICAgICAgIHRoaXMuX3JlbW92ZShjb21wb25lbnQpOwogICAgICAgICAgICAgICAgY29tcG9uZW50LmRldGFjaCgpOwogICAgICAgICAgICAgICAgdGhpcy5yZWRyYXcoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIENhcnJ5IG91dCB0aGUgYWN0dWFsIHJlbW92YWwgb2YgYSBDb21wb25lbnQuCiAgICAgICAgICogSW1wbGVtZW50YXRpb24gZGVwZW5kZW50IG9uIHRoZSB0eXBlIG9mIGNvbnRhaW5lci4KICAgICAgICAgKgogICAgICAgICAqIEByZXR1cm4ge2Jvb2xlYW59IHRydWUgaWYgdGhlIENvbXBvbmVudCB3YXMgc3VjY2Vzc2Z1bGx5IHJlbW92ZWQsIGZhbHNlIG90aGVyd2lzZS4KICAgICAgICAgKi8KICAgICAgICBDb21wb25lbnRDb250YWluZXIucHJvdG90eXBlLl9yZW1vdmUgPSBmdW5jdGlvbiAoY29tcG9uZW50KSB7CiAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIEludm9rZXMgYSBjYWxsYmFjayBvbiBlYWNoIENvbXBvbmVudCBpbiB0aGUgQ29tcG9uZW50Q29udGFpbmVyLgogICAgICAgICAqLwogICAgICAgIENvbXBvbmVudENvbnRhaW5lci5wcm90b3R5cGUuX2ZvckVhY2ggPSBmdW5jdGlvbiAoY2FsbGJhY2spIHsKICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCJfZm9yRWFjaCgpIGlzIG5vdCBpbXBsZW1lbnRlZCBvbiBDb21wb25lbnRDb250YWluZXIiKTsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIERlc3Ryb3lzIHRoZSBDb21wb25lbnRDb250YWluZXIgYW5kIGFsbCBDb21wb25lbnRzIHdpdGhpbiBpdC4KICAgICAgICAgKi8KICAgICAgICBDb21wb25lbnRDb250YWluZXIucHJvdG90eXBlLmRlc3Ryb3kgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUuZGVzdHJveS5jYWxsKHRoaXMpOwogICAgICAgICAgICB0aGlzLl9mb3JFYWNoKGZ1bmN0aW9uIChjKSB7IHJldHVybiBjLmRlc3Ryb3koKTsgfSk7CiAgICAgICAgfTsKICAgICAgICBDb21wb25lbnRDb250YWluZXIucHJvdG90eXBlLmludmFsaWRhdGVDYWNoZSA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdGhpcy5fZm9yRWFjaChmdW5jdGlvbiAoYykgeyByZXR1cm4gYy5pbnZhbGlkYXRlQ2FjaGUoKTsgfSk7CiAgICAgICAgfTsKICAgICAgICByZXR1cm4gQ29tcG9uZW50Q29udGFpbmVyOwogICAgfShjb21wb25lbnQuQ29tcG9uZW50KSk7CiAgICBleHBvcnRzLkNvbXBvbmVudENvbnRhaW5lciA9IENvbXBvbmVudENvbnRhaW5lcjsKICAgIH0pOwoKICAgIHZhciBncm91cCA9IGNyZWF0ZUNvbW1vbmpzTW9kdWxlKGZ1bmN0aW9uIChtb2R1bGUsIGV4cG9ydHMpIHsKICAgIC8qKgogICAgICogQ29weXJpZ2h0IDIwMTQtcHJlc2VudCBQYWxhbnRpciBUZWNobm9sb2dpZXMKICAgICAqIEBsaWNlbnNlIE1JVAogICAgICovCiAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgIl9fZXNNb2R1bGUiLCB7IHZhbHVlOiB0cnVlIH0pOwoKCgogICAgdmFyIEdyb3VwID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikgewogICAgICAgIHRzbGliX2VzNi5fX2V4dGVuZHMoR3JvdXAsIF9zdXBlcik7CiAgICAgICAgLyoqCiAgICAgICAgICogQ29uc3RydWN0cyBhIEdyb3VwLgogICAgICAgICAqCiAgICAgICAgICogQSBHcm91cCBjb250YWlucyBDb21wb25lbnRzIHRoYXQgd2lsbCBiZSByZW5kZXJlZCBvbiB0b3Agb2YgZWFjaCBvdGhlci4KICAgICAgICAgKiBDb21wb25lbnRzIGFkZGVkIGxhdGVyIHdpbGwgYmUgcmVuZGVyZWQgYWJvdmUgQ29tcG9uZW50cyBhbHJlYWR5IGluIHRoZSBHcm91cC4KICAgICAgICAgKgogICAgICAgICAqIEBjb25zdHJ1Y3RvcgogICAgICAgICAqIEBwYXJhbSB7Q29tcG9uZW50W119IFtjb21wb25lbnRzPVtdXSBDb21wb25lbnRzIHRvIGJlIGFkZGVkIHRvIHRoZSBHcm91cC4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBHcm91cChjb21wb25lbnRzKSB7CiAgICAgICAgICAgIGlmIChjb21wb25lbnRzID09PSB2b2lkIDApIHsgY29tcG9uZW50cyA9IFtdOyB9CiAgICAgICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMpIHx8IHRoaXM7CiAgICAgICAgICAgIF90aGlzLl9jb21wb25lbnRzID0gW107CiAgICAgICAgICAgIF90aGlzLmFkZENsYXNzKCJjb21wb25lbnQtZ3JvdXAiKTsKICAgICAgICAgICAgY29tc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cmVxdWVzdC5taW5IZWlnaHQ7IH0sIDApLAogICAgICAgICAgICB9OwogICAgICAgIH07CiAgICAgICAgR3JvdXAucHJvdG90eXBlLmNvbXB1dGVMYXlvdXQgPSBmdW5jdGlvbiAob3JpZ2luLCBhdmFpbGFibGVXaWR0aCwgYXZhaWxhYmxlSGVpZ2h0KSB7CiAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7CiAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUuY29tcHV0ZUxheW91dC5jYWxsKHRoaXMsIG9yaWdpbiwgYXZhaWxhYmxlV2lkdGgsIGF2YWlsYWJsZUhlaWdodCk7CiAgICAgICAgICAgIHRoaXMuX2ZvckVhY2goZnVuY3Rpb24gKGNvbXBvbmVudCkgewogICAgICAgICAgICAgICAgY29tcG9uZW50LmNvbXB1dGVMYXlvdXQoeyB4OiAwLCB5OiAwIH0sIF90aGlzLndpZHRoKCksIF90aGlzLmhlaWdodCgpKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgR3JvdXAucHJvdG90eXBlLl9zaXplRnJvbU9mZmVyID0gZnVuY3Rpb24gKGF2YWlsYWJsZVdpZHRoLCBhdmFpbGFibGVIZWlnaHQpIHsKICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIHdpZHRoOiBhdmFpbGFibGVXaWR0aCwKICAgICAgICAgICAgICAgIGhlaWdodDogYXZhaWxhYmxlSGVpZ2h0LAogICAgICAgICAgICB9OwogICAgICAgIH07CiAgICAgICAgR3JvdXAucHJvdG90eXBlLmZpeGVkV2lkdGggPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9jb21wb25lbnRzLmV2ZXJ5KGZ1bmN0aW9uIChjKSB7IHJldHVybiBjLmZpeGVkV2lkdGgoKTsgfSk7CiAgICAgICAgfTsKICAgICAgICBHcm91cC5wcm90b3R5cGUuZml4ZWRIZWlnaHQgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9jb21wb25lbnRzLmV2ZXJ5KGZ1bmN0aW9uIChjKSB7IHJldHVybiBjLmZpeGVkSGVpZ2h0KCk7IH0pOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7Q29tcG9uZW50W119IFRoZSBDb21wb25lbnRzIGluIHRoaXMgR3JvdXAuCiAgICAgICAgICovCiAgICAgICAgR3JvdXAucHJvdG90eXBlLmNvbXBvbmVudHMgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9jb21wb25lbnRzLnNsaWNlKCk7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBBZGRzIGEgQ29tcG9uZW50IHRvIHRoaXMgR3JvdXAuCiAgICAgICAgICogVGhlIGFkZGVkIENvbXBvbmVudCB3aWxsIGJlIHJlbmRlcmVkIGFib3ZlIENvbXBvbmVudHMgYWxyZWFkeSBpbiB0aGUgR3JvdXAuCiAgICAgICAgICovCiAgICAgICAgR3JvdXAucHJvdG90eXBlLmFwcGVuZCA9IGZ1bmN0aW9uIChjb21wb25lbnQpIHsKICAgICAgICAgICAgaWYgKGNvbXBvbmVudCAhPSBudWxsICYmICF0aGlzLmhhcyhjb21wb25lbnQpKSB7CiAgICAgICAgICAgICAgICBjb21wb25lbnQuZGV0YWNoKCk7CiAgICAgICAgICAgICAgICB0aGlzLl9jb21wb25lbnRzLnB1c2goY29tcG9uZW50KTsKICAgICAgICAgICAgICAgIHRoaXMuX2Fkb3B0QW5kQW5jaG9yKGNvbXBvbmVudCk7CiAgICAgICAgICAgICAgICB0aGlzLnJlZHJhdygpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgR3JvdXAucHJvdG90eXBlLl9yZW1vdmUgPSBmdW5jdGlvbiAoY29tcG9uZW50KSB7CiAgICAgICAgICAgIHZhciByZW1vdmVJbmRleCA9IHRoaXMuX2NvbXBvbmVudHMuaW5kZXhPZihjb21wb25lbnQpOwogICAgICAgICAgICBpZiAocmVtb3ZlSW5kZXggPj0gMCkgewogICAgICAgICAgICAgICAgdGhpcy5fY29tcG9uZW50cy5zcGxpY2UocmVtb3ZlSW5kZXgsIDEpOwogICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgIH07CiAgICAgICAgcmV0dXJuIEdyb3VwOwogICAgfShjb21wb25lbnRDb250YWluZXIuQ29tcG9uZW50Q29udGFpbmVyKSk7CiAgICBleHBvcnRzLkdyb3VwID0gR3JvdXA7CiAgICB9KTsKCiAgICB2YXIgaW50ZXJwb2xhdGVkQ29sb3JMZWdlbmQgPSBjcmVhdGVDb21tb25qc01vZHVsZShmdW5jdGlvbiAobW9kdWxlLCBleHBvcnRzKSB7CiAgICAvKioKICAgICAqIENvcHlyaWdodCAyMDE0LXByZXNlbnQgUGFsYW50aXIgVGVjaG5vbG9naWVzCiAgICAgKiBAbGljZW5zZSBNSVQKICAgICAqLwogICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsKCgoKCgoKICAgIHZhciBJbnRlcnBvbGF0ZWRDb2xvckxlZ2VuZCA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHsKICAgICAgICB0c2xpYl9lczYuX19leHRlbmRzKEludGVycG9sYXRlZENvbG9yTGVnZW5kLCBfc3VwZXIpOwogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYW4gSW50ZXJwb2xhdGVkQ29sb3JMZWdlbmQuCiAgICAgICAgICoKICAgICAgICAgKiBUaGUgSW50ZXJwb2xhdGVkQ29sb3JMZWdlbmQgY29uc2lzdHMgb2YgYSBzZXF1ZW5jZSBvZi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SBmb3JtYXR0ZXJzLmdlbmVyYWwoKTsKICAgICAgICAgICAgX3RoaXMuX29yaWVudGF0aW9uID0gImhvcml6b250YWwiOwogICAgICAgICAgICBfdGhpcy5fZXhwYW5kcyA9IGZhbHNlOwogICAgICAgICAgICBfdGhpcy5hZGRDbGFzcygibGVnZW5kIik7CiAgICAgICAgICAgIF90aGlzLmFkZENsYXNzKCJpbnRlcnBvbGF0ZWQtY29sb3ItbGVnZW5kIik7CiAgICAgICAgICAgIHJldHVybiBfdGhpczsKICAgICAgICB9CiAgICAgICAgSW50ZXJwb2xhdGVkQ29sb3JMZWdlbmQucHJvdG90eXBlLmRlc3Ryb3kgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUuZGVzdHJveS5jYWxsKHRoaXMpOwogICAgICAgICAgICB0aGlzLl9zY2FsZS5vZmZVcGRhdGUodGhpcy5fcmVkcmF3Q2FsbGJhY2spOwogICAgICAgIH07CiAgICAgICAgSW50ZXJwb2xhdGVkQ29sb3JMZWdlbmQucHJvdG90eXBlLmZvcm1hdHRlciA9IGZ1bmN0aW9uIChmb3JtYXR0ZXIpIHsKICAgICAgICAgICAgaWYgKGZvcm1hdHRlciA9PT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fZm9ybWF0dGVyOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2Zvcm1hdHRlciA9IGZvcm1hdHRlcjsKICAgICAgICAgICAgdGhpcy5yZWRyYXcoKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBJbnRlcnBvbGF0ZWRDb2xvckxlZ2VuZC5wcm90b3R5cGUuZXhwYW5kcyA9IGZ1bmN0aW9uIChleHBhbmRzKSB7CiAgICAgICAgICAgIGlmIChleHBhbmRzID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9leHBhbmRzOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2V4cGFuZHMgPSBleHBhbmRzOwogICAgICAgICAgICB0aGlzLnJlZHJhdygpOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIEludGVycG9sYXRlZENvbG9yTGVnZW5kLl9lbnN1cmVPcmllbnRhdGlvbiA9IGZ1bmN0aW9uIChvcmllbnRhdGlvbikgewogICAgICAgICAgICBvcmllbnRhdGlvbiA9IG9yaWVudGF0aW9uLnRvTG93ZXJDYXNlKCk7CiAgICAgICAgICAgIGlmIChvcmllbnRhdGlvbiA9PT0gImhvcml6b250YWwiIHx8IG9yaWVudGF0aW9uID09PSAibGVmdCIgfHwgb3JpZW50YXRpb24gPT09ICJyaWdodCIpIHsKICAgICAgICAgICAgICAgIHJldHVybiBvcmllbnRhdGlvbjsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigiXCIiICsgb3JpZW50YXRpb24gKyAiXCIgaXMgbm90IGEgdmFsaWQgb3JpZW50YXRpb24gZm9yIEludGVycG9sYXRlZENvbG9yTGVnZW5kIik7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIEludGVycG9sYXRlZENvbG9yTGVnZW5kLnByb3RvdHlwZS5vcmllbnRhdGlvbiA9IGZ1bmN0aW9uIChvcmllbnRhdGlvbikgewogICAgICAgICAgICBpZiAob3JpZW50YXRpb24gPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX29yaWVudGF0aW9uOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fb3JpZW50YXRpb24gPSBJbnRlcnBvbGF0ZWRDb2xvckxlZ2VuZC5fZW5zdXJlT3JpZW50YXRpb24ob3JpZW50YXRpb24pOwogICAgICAgICAgICAgICAgdGhpcy5yZWRyYXcoKTsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBJbnRlcnBvbGF0ZWRDb2xvckxlZ2VuZC5wcm90b3R5cGUuZml4ZWRXaWR0aCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgcmV0dXJuICF0aGlzLmV4cGFuZHMoKSB8fCB0aGlzLl9pc1ZlcnRpY2FsKCk7CiAgICAgICAgfTsKICAgICAgICBJbnRlcnBvbGF0ZWRDb2xvckxlZ2VuZC5wcm90b3R5cGUuZml4ZWRIZWlnaHQgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHJldHVybiAhdGhpcy5leHBhbmRzKCkgfHwgIXRoaXMuX2lzVmVydGljYWwoKTsKICAgICAgICB9OwogICAgICAgIEludGVycG9sYXRlZENvbG9yTGVnZW5kLnByb3RvdHlwZS5fZ2VuZXJhdGVUaWNrcyA9IGZ1bmN0aW9uIChudW1Td2F0Y2hlcykgewogICAgICAgICAgICBpZiAobnVtU3dhdGNoZXMgPT09IHZvaWQgMCkgeyBudW1Td2F0Y2hlcyA9IEludGVycG9sYXRlZENvbG9yTGVnZW5kLl9ERUZBVUxUX05VTV9TV0FUQ0hFUzsgfQogICAgICAgICAgICB2YXIgZG9tYWluID0gdGhpcy5fc2NhbGUuZG9tYWluKCk7CiAgICAgICAgICAgIGlmIChudW1Td2F0Y2hlcyA9PT0gMSkgewogICAgICAgICAgICAgICAgcmV0dXJuIFtkb21haW5bMF1dOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciBzbG9wZSA9IChkb21haW5bMV0gLSBkb21haW5bMF0pIC8gKG51bVN3YXRjaGVzIC0gMSk7CiAgICAgICAgICAgIHZhciB0aWNrcyA9IFtdOwogICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IG51bVN3YXRjaGVzOyBpKyspIHsKICAgICAgICAgICAgICAgIHRpY2tzLnB1c2goZG9tYWluWzBdICsgc2xvcGUgKiBpKTsKICAgICAgICAgICAgfQogICAgICAgIC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QogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIGRlc2lyZWRIZWlnaHQgPSBwYWRkaW5nICsgdGV4dEhlaWdodCArIHBhZGRpbmc7CiAgICAgICAgICAgICAgICBkZXNpcmVkV2lkdGggPSB0aGlzLl90ZXh0UGFkZGluZyArIGxhYmVsV2lkdGhzWzBdICsgbnVtU3dhdGNoZXMgKiB0ZXh0SGVpZ2h0CiAgICAgICAgICAgICAgICAgICAgKyBsYWJlbFdpZHRoc1sxXSArIHRoaXMuX3RleHRQYWRkaW5nOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICBtaW5XaWR0aDogZGVzaXJlZFdpZHRoLAogICAgICAgICAgICAgICAgbWluSGVpZ2h0OiBkZXNpcmVkSGVpZ2h0LAogICAgICAgICAgICB9OwogICAgICAgIH07CiAgICAgICAgSW50ZXJwb2xhdGVkQ29sb3JMZWdlbmQucHJvdG90eXBlLl9pc1ZlcnRpY2FsID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fb3JpZW50YXRpb24gIT09ICJob3Jpem9udGFsIjsKICAgICAgICB9OwogICAgICAgIEludGVycG9sYXRlZENvbG9yTGVnZW5kLnByb3RvdHlwZS5yZW5kZXJJbW1lZGlhdGVseSA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgX3N1cGVyLnByb3RvdHlwZS5yZW5kZXJJbW1lZGlhdGVseS5jYWxsKHRoaXMpOwogICAgICAgICAgICB2YXIgZG9tYWluID0gdGhpcy5fc2NhbGUuZG9tYWluKCk7CiAgICAgICAgICAgIHZhciB0ZXh0MCA9IHRoaXMuX2Zvcm1hdHRlcihkb21haW5bMF0pOwogICAgICAgICAgICB2YXIgdGV4dDBXaWR0aCA9IHRoaXMuX21lYXN1cmVyLm1lYXN1cmUodGV4dDApLndpZHRoOwogICAgICAgICAgICB2YXIgdGV4dDEgPSB0aGlzLl9mb3JtYXR0ZXIoZG9tYWluWzFdKTsKICAgICAgICAgICAgdmFyIHRleHQxV2lkdGggPSB0aGlzLl9tZWFzdXJlci5tZWFzdXJlKHRleHQxKS53aWR0aDsKICAgICAgICAgICAgdmFyIHRleHRIZWlnaHQgPSB0aGlzLl9tZWFzdXJlci5tZWFzdXJlKCkuaGVpZ2h0OwogICAgICAgICAgICB2YXIgdGV4dFBhZGRpbmcgPSB0aGlzLl90ZXh0UGFkZGluZzsKICAgICAgICAgICAgdmFyIHVwcGVyTGFiZWxTaGlmdCA9IHsgeDogMCwgeTogMCB9OwogICAgICAgICAgICB2YXIgbG93ZXJMYWJlbFNoaWZ0ID0geyB4OiAwLCB5OiAwIH07CiAgICAgICAgICAgIHZhciBsb3dlcldyaXRlT3B0aW9ucyA9IHsKICAgICAgICAgICAgICAgIHhBbGlnbjogImNlbnRlciIsCiAgICAgICAgICAgICAgICB5QWxpZ246ICJjZW50ZXIiLAogICAgICAgICAgICAgICAgdGV4dFJvdGF0aW9uOiAwLAogICAgICAgICAgICB9OwogICAgICAgICAgICB2YXIgdXBwZXJXcml0ZU9wdGlvbnMgPSB7CiAgICAgICAgICAgICAgICB4QWxpZ246ICJjZW50ZXIiLAogICAgICAgICAgICAgICAgeUFsaWduOiAiY2VudGVyIiwKICAgICAgICAgICAgICAgIHRleHRSb3RhdGlvbjogMCwKICAgICAgICAgICAgfTsKICAgICAgICAgICAgdmFyIHN3YXRjaFdpZHRoOwogICAgICAgICAgICB2YXIgc3dhdGNoSGVpZ2h0OwogICAgICAgICAgICB2YXIgc3dhdGNoWDsKICAgICAgICAgICAgdmFyIHN3YXRjaFk7CiAgICAgICAgICAgIHZhciBib3VuZGluZ0JveEF0dHIgPSB7CiAgICAgICAgICAgICAgICB4OiAwLAogICAgICAgICAgICAgICAgeTogMCwKICAgICAgICAgICAgICAgIHdpZHRoOiAwLAogICAgICAgICAgICAgICAgaGVpZ2h0OiAwLAogICAgICAgICAgICB9OwogICAgICAgICAgICB2YXIgcGFkZGluZzsKICAgICAgICAgICAgdmFyIG51bVN3YXRjaGVzOwogICAgICAgICAgICBpZiAodGhpcy5faXNWZXJ0aWNhbCgpKSB7CiAgICAgICAgICAgICAgICBudW1Td2F0Y2hlcyA9IE1hdGguZmxvb3IodGhpcy5oZWlnaHQoKSk7CiAgICAgICAgICAgICAgICB2YXIgbG9uZ2VzdFRleHRXaWR0aF8xID0gTWF0aC5tYXgodGV4dDBXaWR0aCwgdGV4dDFXaWR0aCk7CiAgICAgICAgICAgICAgICBwYWRkaW5nID0gKHRoaXMud2lkdGgoKSAtIGxvbmdlc3RUZXh0V2lkdGhfMSAtIDIgKiB0aGlzLl90ZXh0UGFkZGluZykgLyAyOwogICAgICAgICAgICAgICAgc3dhdGNoV2lkdGggPSBNYXRoLm1heCh0aGlzLndpZHRoKCkgLSBwYWRkaW5nIC0gMiAqIHRleHRQYWRkaW5nIC0gbG9uZ2VzdFRleHRXaWR0aF8xLCAwKTsKICAgICAgICAgICAgICAgIHN3YXRjaEhlaWdodCA9IDE7CiAgICAgICAgICAgICAgICBzd2F0Y2hZID0gZnVuY3Rpb24gKGQsIGkpIHsgcmV0dXJuIF90aGlzLmhlaWdodCgpIC0gKGkgKyAxKTsgfTsKICAgICAgICAgICAgICAgIHVwcGVyV3JpdGVPcHRpb25zLnlBbGlnbiA9ICJ0b3AiOwogICAgICAgICAgICAgICAgdXBwZXJMYWJlbFNoaWZ0LnkgPSAwOwogICAgICAgICAgICAgICAgbG93ZXJXcml0ZU9wdGlvbnMueUFsaWduID0gImJvdHRvbSI7CiAgICAgICAgICAgICAgICBsb3dlckxhYmVsU2hpZnQueSA9IDA7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5fb3JpZW50YXRpb24gPT09ICJsZWZ0IikgewogICAgICAgICAgICAgICAgICAgIHN3YXRjaFggPSBmdW5jdGlvbiAoZCwgaSkgeyByZXR1cm4gdGV4dFBhZGRpbmcgKyBsb25nZXN0VGV4dFdpZHRoXzEgKyB0ZXh0UGFkZGluZzsgfTsKICAgICAgICAgICAgICAgICAgICB1cHBlcldyaXRlT3B0aW9ucy54QWxpZ24gPSAicmlnaHQiOwogICAgICAgICAgICAgICAgICAgIHVwcGVyTGFiZWxTaGlmdC54ID0gLShwYWRkaW5nICsgc3dhdGNoV2lkdGggKyB0ZXh0UGFkZGluZyk7CiAgICAgICAgICAgICAgICAgICAgbG93ZXJXcml0ZU9wdGlvbnMueEFsaWduID0gInJpZ2h0IjsKICAgICAgICAgICAgICAgICAgICBsb3dlckxhYmVsU2hpZnQueCA9IC0ocGFkZGluZyArIHN3YXRjaFdpZHRoICsgdGV4dFBhZGRpbmcpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgc3dhdGNoWCA9IGZ1bmN0aW9uIChkLCBpKSB7IHJldHVybiBwYWRkaW5nOyB9OwogICAgICAgICAgICAgICAgICAgIHVwcGVyV3JpdGVPcHRpb25zLnhBbGlnbiA9ICJsZWZ0IjsKICAgICAgICAgICAgICAgICAgICB1cHBlckxhYmVsU2hpZnQueCA9IHBhZGRpbmcgKyBzd2F0Y2hXaWR0aCArIHRleHRQYWRkaW5nOwogICAgICAgICAgICAgICAgICAgIGxvd2VyV3JpdGVPcHRpb25zLnhBbGlnbiA9ICJsZWZ0IjsKICAgICAgICAgICAgICAgICAgICBsb3dlckxhYmVsU2hpZnQueCA9IHBhZGRpbmcgKyBzd2F0Y2hXaWR0aCArIHRleHRQYWRkaW5nOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgYm91bmRpbmdCb3hBdHRyWyJ3aWR0aCJdID0gc3dhdGNoV2lkdGg7CiAgICAgICAgICAgICAgICBib3VuZGluZ0JveEF0dHJbImhlaWdodCJdID0gbnVtU3dhdGNoZXMgKiBzd2F0Y2hIZWlnaHQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBwYWRkaW5nID0gTWF0aC5tYXgodGV4dFBhZGRpbmcsICh0aGlzLmhlaWdodCgpIC0gdGV4dEhlaWdodCkgLyAyKTsKICAgICAgICAgICAgICAgIG51bVN3YXRjaGVzID0gTWF0aC5tYXgoTWF0aC5mbG9vcih0aGlzLndpZHRoKCkgLSB0ZXh0UGFkZGluZyAqIDQgLSB0ZXh0MFdpZHRoIC0gdGV4dDFXaWR0aCksIDApOwogICAgICAgICAgICAgICAgc3dhdGNoV2lkdGggPSAxOwogICAgICAgICAgICAgICAgc3dhdGNoSGVpZ2h0ID0gTWF0aC5tYXgoKHRoaXMuaGVpZ2h0KCkgLSAyICogcGFkZGluZyksIDApOwogICAgICAgICAgICAgICAgc3dhdGNoWCA9IGZ1bmN0aW9uIChkLCBpKSB7IHJldHVybiBNYXRoLmZsb29yKHRleHQwV2lkdGggKyAyICogdGV4dFBhZGRpbmcpICsgaTsgfTsKICAgICAgICAgICAgICAgIHN3YXRjaFkgPSBmdW5jdGlvbiAoZCwgaSkgeyByZXR1cm4gcGFkZGluZzsgfTsKICAgICAgICAgICAgICAgIHVwcGVyV3JpdGVPcHRpb25zLnhBbGlnbiA9ICJyaWdodCI7CiAgICAgICAgICAgICAgICB1cHBlckxhYmVsU2hpZnQueCA9IC10ZXh0UGFkZGluZzsKICAgICAgICAgICAgICAgIGxvd2VyV3JpdGVPcHRpb25zLnhBbGlnbiA9ICJsZWZ0IjsKICAgICAgICAgICAgICAgIGxvd2VyTGFiZWxTaGlmdC54ID0gdGV4dFBhZGRpbmc7CiAgICAgICAgICAgICAgICBib3VuZGluZ0JveEF0dHJbInkiXSA9IHBhZGRpbmc7CiAgICAgICAgICAgICAgICBib3VuZGluZ0JveEF0dHJbIndpZHRoIl0gPSBudW1Td2F0Y2hlcyAqIHN3YXRjaFdpZHRoOwogICAgICAgICAgICAgICAgYm91bmRpbmdCb3hBdHRyWyJoZWlnaHQiXSA9IHN3YXRjaEhlaWdodDsKICAgICAgICAgICAgfQogICAgICAgIC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dHRycyhib3VuZGluZ0JveEF0dHIpOwogICAgICAgICAgICB2YXIgdGlja3MgPSB0aGlzLl9nZW5lcmF0ZVRpY2tzKG51bVN3YXRjaGVzKTsKICAgICAgICAgICAgdmFyIHN3YXRjaGVzVXBkYXRlID0gdGhpcy5fc3dhdGNoQ29udGFpbmVyLnNlbGVjdEFsbCgicmVjdC5zd2F0Y2giKS5kYXRhKHRpY2tzKTsKICAgICAgICAgICAgdmFyIHJlY3RzID0gc3dhdGNoZXNVcGRhdGUuZW50ZXIoKS5hcHBlbmQoInJlY3QiKS5jbGFzc2VkKCJzd2F0Y2giLCB0cnVlKTsKICAgICAgICAgICAgdmFyIHN3YXRjaGVzID0gc3dhdGNoZXNVcGRhdGUubWVyZ2UocmVjdHMpOwogICAgICAgICAgICBzd2F0Y2hlc1VwZGF0ZS5leGl0KCkucmVtb3ZlKCk7CiAgICAgICAgICAgIHN3YXRjaGVzLmF0dHJzKHsKICAgICAgICAgICAgICAgIGZpbGw6IGZ1bmN0aW9uIChkLCBpKSB7IHJldHVybiBfdGhpcy5fc2NhbGUuc2NhbGUoZCk7IH0sCiAgICAgICAgICAgICAgICB3aWR0aDogc3dhdGNoV2lkdGgsCiAgICAgICAgICAgICAgICBoZWlnaHQ6IHN3YXRjaEhlaWdodCwKICAgICAgICAgICAgICAgIHg6IHN3YXRjaFgsCiAgICAgICAgICAgICAgICB5OiBzd2F0Y2hZLAogICAgICAgICAgICAgICAgInNoYXBlLXJlbmRlcmluZyI6ICJjcmlzcEVkZ2VzIiwKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGlmIChjb25maWckMS5BRERfVElUTEVfRUxFTUVOVFMpIHsKICAgICAgICAgICAgICAgIHJlY3RzLmFwcGVuZCgidGl0bGUiKS50ZXh0KGZ1bmN0aW9uIChkKSB7IHJldHVybiBfdGhpcy5fZm9ybWF0dGVyKGQpOyB9KTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogIC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AgICAgICAgICAgIHZhciBkZXNpcmVkSGVpZ2h0ID0gKHRoaXMuYW5nbGUoKSA9PT0gMCA/IGRlc2lyZWRXSC5oZWlnaHQgOiBkZXNpcmVkV0gud2lkdGgpICsgMiAqIHRoaXMucGFkZGluZygpOwogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgbWluV2lkdGg6IGRlc2lyZWRXaWR0aCwKICAgICAgICAgICAgICAgIG1pbkhlaWdodDogZGVzaXJlZEhlaWdodCwKICAgICAgICAgICAgfTsKICAgICAgICB9OwogICAgICAgIExhYmVsLnByb3RvdHlwZS5fc2V0dXAgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUuX3NldHVwLmNhbGwodGhpcyk7CiAgICAgICAgICAgIHRoaXMuX3RleHRDb250YWluZXIgPSB0aGlzLmNvbnRlbnQoKS5hcHBlbmQoImciKTsKICAgICAgICAgICAgdmFyIGNvbnRleHQgPSBuZXcgc3JjJDEuU3ZnQ29udGV4dCh0aGlzLl90ZXh0Q29udGFpbmVyLm5vZGUoKSk7CiAgICAgICAgICAgIHRoaXMuX21lYXN1cmVyID0gbmV3IHNyYyQxLkNhY2hlTWVhc3VyZXIoY29udGV4dCk7CiAgICAgICAgICAgIHRoaXMuX3dyYXBwZXIgPSBuZXcgc3JjJDEuV3JhcHBlcigpOwogICAgICAgICAgICB0aGlzLl93cml0ZXIgPSBuZXcgc3JjJDEuV3JpdGVyKHRoaXMuX21lYXN1cmVyLCBjb250ZXh0LCB0aGlzLl93cmFwcGVyKTsKICAgICAgICAgICAgdGhpcy50ZXh0KHRoaXMuX3RleHQpOwogICAgICAgIH07CiAgICAgICAgTGFiZWwucHJvdG90eXBlLnRleHQgPSBmdW5jdGlvbiAoZGlzcGxheVRleHQpIHsKICAgICAgICAgICAgaWYgKGRpc3BsYXlUZXh0ID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl90ZXh0OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBkaXNwbGF5VGV4dCAhPT0gInN0cmluZyIpIHsKICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoIkxhYmVsLnRleHQoKSBvbmx5IHRha2VzIHN0cmluZ3MgYXMgaW5wdXQiKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuX3RleHQgPSBkaXNwbGF5VGV4dDsKICAgICAgICAgICAgICAgIHRoaXMucmVkcmF3KCk7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgTGFiZWwucHJvdG90eXBlLmFuZ2xlID0gZnVuY3Rpb24gKGFuZ2xlKSB7CiAgICAgICAgICAgIGlmIChhbmdsZSA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fYW5nbGU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBhbmdsZSAlPSAzNjA7CiAgICAgICAgICAgICAgICBpZiAoYW5nbGUgPiAxODApIHsKICAgICAgICAgICAgICAgICAgICBhbmdsZSAtPSAzNjA7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmIChhbmdsZSA8IC0xODApIHsKICAgICAgICAgICAgICAgICAgICBhbmdsZSArPSAzNjA7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAoYW5nbGUgPT09IC05MCB8fCBhbmdsZSA9PT0gMCB8fCBhbmdsZSA9PT0gOTApIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9hbmdsZSA9IGFuZ2xlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGFuZ2xlICsgIiBpcyBub3QgYSB2YWxpZCBhbmdsZSBmb3IgTGFiZWwiKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMucmVkcmF3KCk7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgTGFiZWwucHJvdG90eXBlLnBhZGRpbmcgPSBmdW5jdGlvbiAocGFkQW1vdW50KSB7CiAgICAgICAgICAgIGlmIChwYWRBbW91bnQgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3BhZGRpbmc7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBwYWRBbW91bnQgPSArcGFkQW1vdW50OwogICAgICAgICAgICAgICAgaWYgKHBhZEFtb3VudCA8IDApIHsKICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IocGFkQW1vdW50ICsgIiBpcyBub3QgYSB2YWxpZCBwYWRkaW5nIHZhbHVlLiBDYW5ub3QgYmUgbGVzcyB0aGFuIDAuIik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLl9wYWRkaW5nID0gcGFkQW1vdW50OwogICAgICAgICAgICAgICAgdGhpcy5yZWRyYXcoKTsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBMYWJlbC5wcm90b3R5cGUuZml4ZWRXaWR0aCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgfTsKICAgICAgICBMYWJlbC5wcm90b3R5cGUuZml4ZWRIZWlnaHQgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgIH07CiAgICAgICAgTGFiZWwucHJvdG90eXBlLnJlbmRlckltbWVkaWF0ZWx5ID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLnJlbmRl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GF0aW9uOiB0aGlzLmFuZ2xlKCksCiAgICAgICAgICAgIH07CiAgICAgICAgICAgIHRoaXMuX3dyaXRlci53cml0ZSh0aGlzLl90ZXh0LCB3cml0ZVdpZHRoLCB3cml0ZUhlaWdodCwgd3JpdGVPcHRpb25zKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBMYWJlbC5wcm90b3R5cGUuaW52YWxpZGF0ZUNhY2hlID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLmludmFsaWRhdGVDYWNoZS5jYWxsKHRoaXMpOwogICAgICAgICAgICB0aGlzLl9tZWFzdXJlci5yZXNldCgpOwogICAgICAgIH07CiAgICAgICAgcmV0dXJuIExhYmVsOwogICAgfShjb21wb25lbnQuQ29tcG9uZW50KSk7CiAgICBleHBvcnRzLkxhYmVsID0gTGFiZWw7CiAgICB2YXIgVGl0bGVMYWJlbCA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHsKICAgICAgICB0c2xpYl9lczYuX19leHRlbmRzKFRpdGxlTGFiZWwsIF9zdXBlcik7CiAgICAgICAgLyoqCiAgICAgICAgICogQGNvbnN0cnVjdG9yCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IFt0ZXh0XQogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBbYW5nbGVdIE9uZSBvZiAtOTAvMC85MC4gMCBpcyBob3Jpem9udGFsLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIFRpdGxlTGFiZWwodGV4dCwgYW5nbGUpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcywgdGV4dCwgYW5nbGUpIHx8IHRoaXM7CiAgICAgICAgICAgIF90aGlzLmFkZENsYXNzKFRpdGxlTGFiZWwuVElUTEVfTEFCRUxfQ0xBU1MpOwogICAgICAgICAgICByZXR1cm4gX3RoaXM7CiAgICAgICAg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B0aGUgc3BhY2luZyBiZXR3ZWVuIHJvd3MuIERlZmF1bHRzIHRvIDAuCiAgICAgICAgICogQHBhcmFtIHtib3R0b21QYWRkaW5nfSBudW1iZXIKICAgICAgICAgKi8KICAgICAgICBib3R0b21QYWRkaW5nLCAKICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIHRoZSBtYXhpbXVtIGFsbG93YWJsZSB3aWR0aCBvZiB0aGlzIGNvbHVtbi4KICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gbWF4V2lkdGgKICAgICAgICAgKi8KICAgICAgICBtYXhXaWR0aCkgewogICAgICAgICAgICBpZiAoY29sdW1ucyA9PT0gdm9pZCAwKSB7IGNvbHVtbnMgPSBbXTsgfQogICAgICAgICAgICBpZiAoYm90dG9tUGFkZGluZyA9PT0gdm9pZCAwKSB7IGJvdHRvbVBhZGRpbmcgPSAwOyB9CiAgICAgICAgICAgIGlmIChtYXhXaWR0aCA9PT0gdm9pZCAwKSB7IG1heFdpZHRoID0gSW5maW5pdHk7IH0KICAgICAgICAgICAgdGhpcy5jb2x1bW5zID0gY29sdW1uczsKICAgICAgICAgICAgdGhpcy5ib3R0b21QYWRkaW5nID0gYm90dG9tUGFkZGluZzsKICAgICAgICAgICAgdGhpcy5tYXhXaWR0aCA9IG1heFdpZHRoOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBZGRzIGEgY29sdW1uIHRvIHRoZSBsaXN0IG9mIGNvbHVtbnMgd2l0aGluIHRoZSByb3cuIE1heSByZWFkanVzdCB0aGUgc2l6ZSBvZiB0aGUKICAgICAgICAgKiBjb2x1bW4gdG8gZml0IHdpdGhpbiB0aGUgcm93CiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0ge0xlZ2VuZENvbHVtbjxhbnk+fSBjb2x1bW4KICAgICAgICAgKi8KICAgICAgICBMZWdlbmRSb3cucHJvdG90eXBlLmFkZENvbHVtbiA9IGZ1bmN0aW9uIChjb2x1bW4pIHsKICAgICAgICAgICAgdmFyIGRlc2lyZWRDb2x1bW5XaWR0aCA9IGNvbHVtbi53aWR0aDsKICAgICAgICAgICAgLy8gY2hvb3NlIHRoZSBzbWFsbGVyIG9mIDEpIHJlbWFpbmluZyBzcGFjZSwgMikgZGVzaXJlZCB3aWR0aAogICAgICAgICAgICB2YXIgd2lkdGhSZW1haW5pbmcgPSB0aGlzLmdldFdpZHRoQXZhaWxhYmxlKCk7CiAgICAgICAgICAgIGNvbHVtbi53aWR0aCA9IE1hdGgubWluKHdpZHRoUmVtYWluaW5nLCBkZXNpcmVkQ29sdW1uV2lkdGgpOwogICAgICAgICAgICB0aGlzLmNvbHVtbnMucHVzaChjb2x1bW4pOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0dXJucyB0aGUgYm91bmRzIHRoZSBjb2x1bW4sIHJlbGF0aXZlIHRvIHRoZSByb3cuCiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IGNvbHVtbkluZGV4IFRoZSBpbmRleCBvZiB0aGUgY29sdW1uIGluIHF1ZXN0aW9uCiAgICAgICAgICogQHJldHVybnMge0JvdW5kc30gYm91bmRzCiAgICAgICAgICovCiAgICAgICAgTGVnZW5kUm93LnByb3RvdHlwZS5nZXRCb3VuZHMgPSBmdW5jdGlvbiAoY29sdW1uSW5kZXgpIHsKICAgICAgICAgICAgdmFyIGNvbHVtbiA9IHRoaXMuY29sdW1uc1tjb2x1bW5JbmRleF07CiAgICAgICAgICAgIHZhciBjb2x1bW5YT2Zmc2V0ID0gMDsKICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjb2x1bW5JbmRleDsgaSsrKSB7CiAgICAgICAgICAgICAgICBjb2x1bW5YT2Zmc2V0ICs9IHRoaXMuY29sdW1uc1tpXS53aWR0aDsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgdG9wTGVmdDogeyB4OiBjb2x1bW5YT2Zmc2V0LCB5OiAwIH0sCiAgICAgICAgICAgICAgICBib3R0b21SaWdodDogewogICAgICAgICAgICAgICAgICAgIHg6IGNvbHVtblhPZmZzZXQgKyBjb2x1bW4ud2lkdGgsCiAgICAgICAgICAgICAgICAgICAgeTogY29sdW1uLmhlaWdodCwKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgIH07CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBSZXR1cm5zIHRoZSBoZWlnaHQgb2YgdGhlIHJvdywgaW5jbHVkaW5nIHRoZSBib3R0b21QYWRkaW5nLgogICAgICAgICAqIEByZXR1cm4ge251bWJlcn0gaGVpZ2h0CiAgICAgICAgICovCiAgICAgICAgTGVnZW5kUm93LnByb3RvdHlwZS5nZXRIZWlnaHQgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHJldHVybiB1dGlscyQxLk1hdGgubWF4KHRoaXMuY29sdW1ucy5tYXAoZnVuY3Rpb24gKF9hKSB7CiAgICAgICAgICAgICAgICB2YXIgaGVpZ2h0ID0gX2EuaGVpZ2h0OwogICAgICAgICAgICAgICAgcmV0dXJuIGhlaWdodDsKICAgICAgICAgICAgfSksIDApICsgdGhpcy5ib3R0b21QYWRkaW5nOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0dXJucyB0aGUgY3VycmVudCB3aWR0aCBvZiB0aGUgcm93IGNvbnN0cmFpbmVkIGJ5IG1heFdpZHRoLCBpZiBzZXQuCiAgICAgICAgICogQHJldHVybnMge251bWJlcn0gd2lkdGgKICAgICAgICAgKi8KICAgICAgICBMZWdlbmRSb3cucHJvdG90eXBlLmdldFdpZHRoID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICByZXR1cm4gTWF0aC5taW4odGhpcy5jb2x1bW5zLnJlZHVjZShmdW5jdGlvbiAoc3VtLCBfYSkgewogICAgICAgICAgICAgICAgdmFyIHdpZHRoID0gX2Eud2lkdGg7CiAgICAgICAgICAgICAgICByZXR1cm4gc3VtICsgd2lkdGg7CiAgICAgICAgICAgIH0sIDApLCB0aGlzLm1heFdpZHRoKTsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgdGhlIHJlbWFpbmluZyB3aWR0aCBhdmFpbGFibGUgaW4gdGhlIHJvdyBiYXNlZCBvbiB0aGUgbWF4aW11bQogICAgICAgICAqIHdpZHRoIG9mIHRoaXMgcm93LgogICAgICAgICAqIEByZXR1cm5zIHtudW1iZXJ9IHdpZHRoUmVtYWluaW5nCiAgICAgICAgICovCiAgICAgICAgTGVnZW5kUm93LnByb3RvdHlwZS5nZXRXaWR0aEF2YWlsYWJsZSA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIHdpZHRoQ29uc3VtZWQgPSB0aGlzLmdldFdpZHRoKCk7CiAgICAgICAgICAgIHJldHVybiBNYXRoLm1heCh0aGlzLm1heFdpZHRoIC0gd2lkdGhDb25zdW1lZCwgMCk7CiAgICAgICAgfTsKICAgICAgICByZXR1cm4gTGVnZW5kUm93OwogICAgfSgpKTsKICAgIC8qKgogICAgICogU3RvcmVzIExlZ2VuZFJvd3MuIFVzZWZ1bCBmb3IgY2FsY3VsYXRpbmcgYW5kIG1haW50YWluaW5nCiAgICAgKiBwb3NpdGlvbmluZyBpbmZvcm1hdGlvbiBhYm91dCB0aGUgTGVnZW5kLgogICAgICovCiAgICB2YXIgTGVnZW5kVGFibGUgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7CiAgICAgICAgZnVuY3Rpb24gTGVnZW5kVGFibGUobWF4V2lkdGgsIG1heEhlaWdodCwgcGFkZGluZywgcm93cykgewogICAgICAgICAgICBpZiAobWF4V2lkdGggPT09IHZvaWQgMCkgeyBtYXhXaWR0aCA9IEluZmluaXR5OyB9CiAgICAgICAgICAgIGlmIChtYXhIZWlnaHQgPT09IHZvaWQgMCkgeyBtYXhIZWlnaHQgPSBJbmZpbml0eTsgfQogICAgICAgICAgICBpZiAocGFkZGluZyA9PT0gdm9pZCAwKSB7IHBhZGRpbmcgPSAwOyB9CiAgICAgICAgICAgIGlmIChyb3dzID09PSB2b2lkIDApIHsgcm93cyA9IFtdOyB9CiAgICAgICAgICAgIHRoaXMubWF4V2lkdGggPSBtYXhXaWR0aDsKICAgICAgICAgICAgdGhpcy5tYXhIZWlnaHQgPSBtYXhIZWlnaHQ7CiAgICAgICAgICAgIHRoaXMucGFkZGluZyA9IHBhZGRpbmc7CiAgICAgICAgICAgIHRoaXMucm93cyA9IHJvd3M7CiAgICAgICAgfQogICAgICAgIExlZ2VuZFRhYmxlLnByb3RvdHlwZS5hZGRSb3cgPSBmdW5jdGlvbiAocm93KSB7CiAgICAgICAgICAgIHJvdy5tYXhXaWR0aCA9IHRoaXMubWF4V2lkdGggLSB0aGlzLnBhZGRpbmcgKiAyOwogICAgICAgICAgICB0aGlzLnJvd3MucHVzaChyb3cpOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0dXJucyB0aGUgYm91bmRzIG9mIHRoZSBjb2x1bW4gcmVsYXRpdmUgdG8gdGhlIHBhcmVudCBhbmQgc2libGluZ3Mgb2YgdGhlCiAgICAgICAgICogY29sdW1uLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IHJvd0luZGV4IFRoZSBwYXJlbnQgcm93IGNvbnRhaW5pbmcgdGhlIGRlc2lyZWQgY29sdW1uLgogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBjb2x1bW5JbmRleCBUaGUgY29sdW1uIHRvIGNhbGN1bGF0ZSBib3VuZHMuCiAgICAgICAgICogQHJldHVybnMge0JvdW5kc30KICAgICAgICAgKi8KICAgICAgICBMZWdlbmRUYWJsZS5wcm90b3R5cGUuZ2V0Q29sdW1uQm91bmRzID0gZnVuY3Rpb24gKHJvd0luZGV4LCBjb2x1bW5JbmRleCkgewogICAgICAgICAgICB2YXIgcm93Qm91bmRzID0gdGhpcy5nZXRSb3dCb3VuZHMocm93SW5kZXgpOwogICAgICAgICAgICB2YXIgY29sdW1uQm91bmRzID0gdGhpcy5yb3dzW3Jvd0luZGV4XS5nZXRCb3VuZHMoY29sdW1uSW5kZXgpOwogICAgICAgICAgICBjb2x1bW5Cb3VuZHMudG9wTGVmdC54ICs9IHJvd0JvdW5kcy50b3BMZWZ0Lng7CiAgICAgICAgICAgIGNvbHVtbkJvdW5kcy5ib3R0b21SaWdodC54ICs9IHJvd0JvdW5kcy50b3BMZWZ0Lng7CiAgICAgICAgICAgIGNvbHVtbkJvdW5kcy50b3BMZWZ0LnkgKz0gcm93Qm91bmRzLnRvcExlZnQueTsKICAgICAgICAgICAgY29sdW1uQm91bmRzLmJvdHRvbVJpZ2h0LnkgKz0gcm93Qm91bmRzLnRvcExlZnQueTsKICAgICAgICAgICAgcmV0dXJuIGNvbHVtbkJvdW5kczsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgdGhlIGJvdW5kcyByZWxhdGl2ZSB0byB0aGUgcGFyZW50IGFuZCBzaWJsaW5ncyBvZiB0aGUgcm93LgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IHJvd0luZGV4IFRoZSByb3cgdG8gY2FsY3VsYXRlIGJvdW5kcwogICAgICAgICAqIEByZXR1cm5zIHtCb3VuZHN9CiAgICAgICAgICovCiAgICAgICAgTGVnZW5kVGFibGUucHJvdG90eXBlLmdldFJvd0JvdW5kcyA9IGZ1bmN0aW9uIChyb3dJbmRleCkgewogICAgICAgICAgICB2YXIgcm93WE9mZnNldCA9IHRoaXMucGFkZGluZzsKICAgICAgICAgICAgdmFyIHJvd1lPZmZzZXQgPSB0aGlzLnBhZGRpbmc7CiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgcm93SW5kZXg7IGkrKykgewogICAgICAgICAgICAgICAgcm93WU9mZnNldCArPSB0aGlzLnJvd3NbaV0uZ2V0SGVpZ2h0KCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIHJvd0JvdW5kcyA9IHsKICAgICAgICAgICAgICAgIHRvcExlZnQ6IHsgeDogcm93WE9mZnNldCwgeTogcm93WU9mZnNldCB9LAogICAgICAgICAgICAgICAgYm90dG9tUmlnaHQ6IHsKICAgICAgICAgICAgICAgICAgICB4OiByb3dYT2Zmc2V0ICsgdGhpcy5yb3dzW3Jvd0luZGV4XS5nZXRXaWR0aCgpLAogICAgICAgICAgICAgICAgICAgIHk6IHJvd1lPZmZzZXQgKyB0aGlzLnJvd3Nbcm93SW5kZXhdLmdldEhlaWdodCgpLAogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgfTsKICAgICAgICAgICAgcmV0dXJuIHJvd0JvdW5kczsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgdGhlIGhlaWdodCBvZiB0aGUgVGFibGUsIGNvbnN0cmFpbmVkIGJ5IGEgbWF4aW11bSBoZWlnaHQsIGlmIHNldC4KICAgICAgICAgKiBUaGUgaGVpZ2h0IGluY2x1ZGVzIHRoZSBwYWRkaW5nLCBpZiBzZXQuCiAgICAgICAgICogQHJldHVybnMge251bWJlcn0gaGVpZ2h0CiAgICAgICAgICovCiAgICAgICAgTGVnZW5kVGFibGUucHJvdG90eXBlLmdldEhlaWdodCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgcmV0dXJuIE1hdGgubWluKHRoaXMucm93cy5yZWR1Y2UoZnVuY3Rpb24gKHN1bSwgcm93KSB7IHJldHVybiBzdW0gKyByb3cuZ2V0SGVpZ2h0KCk7IH0sIDApICsgdGhpcy5wYWRkaW5nICogMiwgdGhpcy5tYXhIZWlnaHQpOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0dXJucyB0aGUgd2lkdGggb2YgdGhlIHRhYmxlLCBjb25zdHJhaW5lZCBieSB0aGUgbWF4aW11bSB3aWR0aCwgaWYgc2V0LgogICAgICAgICAqIFRoZSB3aWR0aCBpbmNsdWRlcyB0aGUgcGFkZGluZywgaWYgc2V0LgogICAgICAgICAqIEByZXR1cm5zIHtudW1iZXJ9IHdpZHRoCiAgICAgICAgICovCiAgICAgICAgTGVnZW5kVGFibGUucHJvdG90eXBlLmdldFdpZHRoID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICByZXR1cm4gTWF0aC5taW4odXRpbHMkMS5NYXRoLm1heCh0aGlzLnJvd3MubWFwKGZ1bmN0aW9uIChyb3cpIHsgcmV0dXJuIHJvdy5nZXRXaWR0aCgpOyB9KSwgMCkgKyB0aGlzLnBhZGRpbmcgKiAyLCB0aGlzLm1heFdpZHRoKTsKICAgICAgICB9OwogICAgICAgIHJldHVybiBMZWdlbmRUYWJsZTsKICAgIH0oKSk7CiAgICB2YXIgTGVnZW5kID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikgewogICAgICAgIHRzbGliX2VzNi5fX2V4dGVuZHMoTGVnZW5kLCBfc3VwZXIpOwogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBMZWdlbmQgY29uc2lzdHMgb2YgYSBzZXJpZXMgb2YgZW50cmllcywgZWFjaCB3aXRoIGEgY29sb3IgYW5kIGxhYmVsIHRha2VuIGZyb20gdGhlIENvbG9yIFNjYWxlLgogICAgICAgICAqCiAgICAgICAgICogQGNvbnN0cnVjdG9yCiAgICAgICAgICogQHBhcmFtIHtTY2FsZS5Db2xvcn0gc2NhbGUKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBMZWdlbmQoY29sb3JTY2FsZSkgewogICAgICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzKSB8fCB0aGlzOwogICAgICAgICAgICBfdGhpcy5fcGFkZGluZyA9IDU7CiAgICAgICAgICAgIF90aGlzLl9yb3dCb3R0b21QYWRkaW5nID0gMzsKICAgICAgICAgICAgX3RoaXMuYWRkQ2xhc3MoImxlZ2VuZCIpOwogICAgICAgICAgICBfdGhpcy5tYXhFbnRyaWVzUGVyUm93KDEpOwogICAgICAgIC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WYgKGZvcm1hdHRlciA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fZm9ybWF0dGVyOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2Zvcm1hdHRlciA9IGZvcm1hdHRlcjsKICAgICAgICAgICAgdGhpcy5yZWRyYXcoKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBMZWdlbmQucHJvdG90eXBlLm1heEVudHJpZXNQZXJSb3cgPSBmdW5jdGlvbiAobWF4RW50cmllc1BlclJvdykgewogICAgICAgICAgICBpZiAobWF4RW50cmllc1BlclJvdyA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fbWF4RW50cmllc1BlclJvdzsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuX21heEVudHJpZXNQZXJSb3cgPSBtYXhFbnRyaWVzUGVyUm93OwogICAgICAgICAgICAgICAgdGhpcy5yZWRyYXcoKTsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBMZWdlbmQucHJvdG90eXBlLm1heExpbmVzUGVyRW50cnkgPSBmdW5jdGlvbiAobWF4TGluZXNQZXJFbnRyeSkgewogICAgICAgICAgICBpZiAobWF4TGluZXNQZXJFbnRyeSA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fbWF4TGluZXNQZXJFbnRyeTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuX21heExpbmVzUGVyRW50cnkgPSBtYXhMaW5lc1BlckVudHJ5OwogICAgICAgICAgICAgICAgdGhpcy5yZWRyYXcoKTsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBMZWdlbmQucHJvdG90eXBlLm1heFdpZHRoID0gZnVuY3Rpb24gKG1heFdpZHRoKSB7CiAgICAgICAgICAgIGlmIChtYXhXaWR0aCA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fbWF4V2lkdGg7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLl9tYXhXaWR0aCA9IG1heFdpZHRoOwogICAgICAgICAgICAgICAgdGhpcy5yZWRyYXcoKTsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBMZWdlbmQucHJvdG90eXBlLmNvbXBhcmF0b3IgPSBmdW5jdGlvbiAoY29tcGFyYXRvcikgewogICAgICAgICAgICBpZiAoY29tcGFyYXRvciA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fY29tcGFyYXRvcjsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuX2NvbXBhcmF0b3IgPSBjb21wYXJhdG9yOwogICAgICAgICAgICAgICAgdGhpcy5yZWRyYXcoKTsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBMZWdlbmQucHJvdG90eXBlLmNvbG9yU2NhbGUgPSBmdW5jdGlvbiAoY29sb3JTY2FsZSkgewogICAgICAgICAgICBpZiAoY29sb3JTY2FsZSAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9jb2xvclNjYWxlLm9mZlVwZGF0ZSh0aGlzLl9yZWRyYXdDYWxsYmFjayk7CiAgICAgICAgICAgICAgICB0aGlzLl9jb2xvclNjYWxlID0gY29sb3JTY2FsZTsKICAgICAgICAgICAgICAgIHRoaXMuX2NvbG9yU2NhbGUub25VcGRhdGUodGhpcy5fcmVkcmF3Q2FsbGJhY2spOwogICAgICAgICAgICAgICAgdGhpcy5yZWRyYXcoKTsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2NvbG9yU2NhbGU7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIExlZ2VuZC5wcm90b3R5cGUuZGVzdHJveSA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgX3N1cGVyLnByb3RvdHlwZS5kZXN0cm95LmNhbGwodGhpcyk7CiAgICAgICAgICAgIHRoaXMuX2NvbG9yU2NhbGUub2ZmVXBkYXRlKHRoaXMuX3JlZHJhd0NhbGxiYWNrKTsKICAgICAgICB9OwogICAgICAgIExlZ2VuZC5wcm90b3R5cGUuX2J1aWxkTGVnZW5kVGFibGUgPSBmdW5jdGlvbiAod2lkdGgsIGhlaWdodCkgewogICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwogICAgICAgICAgICB2YXIgdGV4dEhlaWdodCA9IHRoaXMuX21lYXN1cmVyLm1lYXN1cmUoKS5oZWlnaHQ7CiAgICAgICAgICAgIHZhciB0YWJsZSA9IG5ldyBMZWdlbmRUYWJsZSh3aWR0aCwgaGVpZ2h0LCB0aGlzLl9wYWRkaW5nKTsKICAgICAgICAgICAgdmFyIGVudHJ5TmFtZXMgPSB0aGlzLl9jb2xvclNjYWxlLmRvbWFpbigpLnNsaWNlKCkuc29ydChmdW5jdGlvbiAoYSwgYikgeyByZXR1cm4gX3RoaXMuX2NvbXBhcmF0b3IoX3RoaXMuX2Zvcm1hdHRlcihhKSwgX3RoaXMuX2Zvcm1hdHRlcihiKSk7IH0pOwogICAgICAgICAgICB2YXIgcm93ID0gbmV3IExlZ2VuZFJvdygpOwogICAgICAgICAgICB0YWJsZS5hZGRSb3cocm93KTsKICAgICAgICAgICAgcm93LmJvdHRvbVBhZGRpbmcgPSB0aGlzLl9yb3dCb3R0b21QYWRkaW5nOwogICAgICAgICAgICBlbnRyeU5hbWVzLmZvckVhY2goZnVuY3Rpb24gKG5hbWUsIGluZGV4KSB7CiAgICAgICAgICAgICAgICBpZiAocm93LmNvbHVtbnMubGVuZ3RoIC8gMiA9PT0gX3RoaXMubWF4RW50cmllc1BlclJvdygpKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gd2UgYWRkIHR3byBjb2x1bW5zIHBlciBlbnRyeSwgYSBzeW1ib2wgY29sdW1uIGFuZCBhIG5hbWUgY29sdW1uCiAgICAgICAgICAgICAgICAgICAgLy8gaWYgdGhlIGN1cnJlbnQgcm93IGlzIGZ1bGwsIGFjY29yZGluZyB0byB0aGUgbnVtYmVyIG9mIGVudHJpZXMKICAgICAgICAgICAgICAgICAgICAvLyB3ZSdyZSBhbGxvd2VkIHRvIGhhdmUgcGVyIHJvdywgd2UgbmVlZCB0byBhbGxvY2F0ZSBuZXcgc3BhY2UKICAgICAgICAgICAgICAgICAgICByb3cgPSBuZXcgTGVnZW5kUm93KCk7CiAgICAgICAgICAgICAgICAgICAgcm93LmJvdHRvbVBhZGRpbmcgPSBfdGhpcy5fcm93Qm90dG9tUGFkZGluZzsKICAgICAgICAgICAgICAgICAgICB0YWJsZS5hZGRSb3cocm93KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHZhciBhdmFpbGFibGVXaWR0aCA9IHJvdy5nZXRXaWR0aEF2YWlsYWJsZSgpOwogICAgICAgICAgICAgICAgdmFyIGZvcm1hdHRlZE5hbWUgPSBfdGhpcy5fZm9ybWF0dGVyKG5hbWUpOwogICAgICAgICAgICAgICAgLy8gdGhpcyBpcyB0aGUgd2lkdGggb2YgdGhlIHNlcmllcyBuYW1lIHdpdGhvdXQgYW55IGxpbmUgd3JhcHBpbmcKICAgICAgICAgICAgICAgIC8vIGl0IGlzIHRoZSBtb3N0IG9wdGltYWwgcHJlc2VudGF0aW9uIG9mIHRoZSBuYW1lCiAgICAgICAgICAgICAgICB2YXIgdW53cmFwcGVkTmFtZVdpZHRoID0gX3RoaXMuX21lYXN1cmVyLm1lYXN1cmUoZm9ybWF0dGVkTmFtZSkud2lkdGg7CiAgICAgICAgICAgICAgICB2YXIgd2lsbEJlU3F1aXNoZWQgPSAoYXZhaWxhYmxlV2lkdGggLSB0ZXh0SGVpZ2h0IC0gdW53cmFwcGVkTmFtZVdpZHRoKSA8IDA7CiAgICAgICAgICAgICAgICBpZiAod2lsbEJlU3F1aXNoZWQgJiYgcm93LmNvbHVtbnMubGVuZ3RoID4gMSkgewogICAgICAgICAgICAgICAgICAgIC8vIGFkZGluZyB0aGUgZW50cnkgdG8gdGhpcyByb3cgd2lsbCBzcXVpc2ggdGhpcwogICAgICAgICAgICAgICAgICAgIC8vIGVudHJ5LiBUaGUgcm93IGFscmVhZHkgY29udGFpbnMgZW50cmllcyBzbyBjcmVhdGUKICAgICAgICAgICAgICAgICAgICAvLyBhIG5ldyByb3cgdG8gYWRkIHRoaXMgZW50cnkgdG8gZm9yIG9wdGltYWwgZGlzcGxheQogICAgICAgICAgICAgICAgICAgIHJvdyA9IG5ldyBMZWdlbmRSb3coKTsKICAgICAgICAgICAgICAgICAgICByb3cuYm90dG9tUGFkZGluZyA9IF90aGlzLl9yb3dCb3R0b21QYWRkaW5nOwogICAgICAgICAgICAgICAgICAgIHRhYmxlLmFkZFJvdyhyb3cpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdmFyIHN5bWJvbENvbHVtbiA9IHsgd2lkdGg6IHRleHRIZWlnaHQsIGhlaWdodDogdGV4dEhlaWdodCwgZGF0YTogeyBuYW1lOiBuYW1lLCB0eXBlOiAic3ltYm9sIiB9IH07CiAgICAgICAgICAgICAgICByb3cuYWRkQ29sdW1uKHN5bWJvbENvbHVtbik7CiAgICAgICAgICAgICAgICAvLyB0aGUgc3BhY2UgY29uc3VtZWQgYnkgdGhlIG5hbWUgZmllbGQgaXMgdGhlIG1pbmltdW0gb2YgdGhlIHNwYWNlIGF2YWlsYWJsZSBpbiB0aGUgdGFibGUKICAgICAgICAgICAgIC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gbWF4IHdpZHRoIGlzIG5vdCBzZXQsIHRoZSB0YWJsZSB3aWxsIGJlIGFzIHdpZGUgYXMgdGhlIGxvbmdlc3QgdW50cnVuY2F0ZWQgcm93CiAgICAgICAgICAgIHZhciB0YWJsZSA9IHRoaXMuX2J1aWxkTGVnZW5kVGFibGUodXRpbHMkMS5NYXRoLm1pbihbdGhpcy5tYXhXaWR0aCgpLCBvZmZlcmVkV2lkdGhdLCBvZmZlcmVkV2lkdGgpLCBvZmZlcmVkSGVpZ2h0KTsKICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIG1pbkhlaWdodDogdGFibGUuZ2V0SGVpZ2h0KCksCiAgICAgICAgICAgICAgICBtaW5XaWR0aDogdGFibGUuZ2V0V2lkdGgoKSwKICAgICAgICAgICAgfTsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIEdldHMgdGhlIEVudGl0aWVzIChyZXByZXNlbnRpbmcgTGVnZW5kIGVudHJpZXMpIGF0IGEgcGFydGljdWxhciBwb2ludC4KICAgICAgICAgKiBSZXR1cm5zIGFuIGVtcHR5IGFycmF5IGlmIG5vIEVudGl0aWVzIGFyZSBwcmVzZW50IGF0IHRoYXQgbG9jYXRpb24uCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0ge1BvaW50fSBwCiAgICAgICAgICogQHJldHVybnMge0VudGl0eTxMZWdlbmQ+W119CiAgICAgICAgICovCiAgICAgICAgTGVnZW5kLnByb3RvdHlwZS5lbnRpdGllc0F0ID0gZnVuY3Rpb24gKHApIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgaWYgKCF0aGlzLl9pc1NldHVwKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gW107CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIHRhYmxlID0gdGhpcy5fYnVpbGRMZWdlbmRUYWJsZSh0aGlzLndpZHRoKCksIHRoaXMuaGVpZ2h0KCkpOwogICAgICAgICAgICByZXR1cm4gdGFibGUucm93cy5yZWR1Y2UoZnVuY3Rpb24gKGVudGl0eSwgcm93LCByb3dJbmRleCkgewogICAgICAgICAgICAgICAgaWYgKGVudGl0eS5sZW5ndGggIT09IDApIHsKICAgICAgICAgICAgICAgICAgICAvLyB3ZSd2ZSBhbHJlYWR5IGZvdW5kIHRoZSBuZWFyZXN0IGVudGl0eTsganVzdCByZXR1cm4gaXQuCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGVudGl0eTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHZhciByb3dCb3VuZHMgPSB0YWJsZS5nZXRSb3dCb3VuZHMocm93SW5kZXgpOwogICAgICAgICAgICAgICAgdmFyIHdpdGhpblJvdyA9IHV0aWxzJDEuTWF0aC53aXRoaW4ocCwgcm93Qm91bmRzKTsKICAgICAgICAgICAgICAgIGlmICghd2l0aGluUm93KSB7CiAgICAgICAgICAgICAgICAgICAgLy8gdGhlIG5lYXJlc3QgZW50aXR5IGlzbid0IHdpdGhpbiB0aGlzIHJvdywgY29udGludWU7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGVudGl0eTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiByb3cuY29sdW1ucy5yZWR1Y2UoZnVuY3Rpb24gKGVudGl0eSwgY29sdW1uLCBjb2x1bW5JbmRleCkgewogICAgICAgICAgICAgICAgICAgIHZhciBjb2x1bW5Cb3VuZHMgPSB0YWJsZS5nZXRDb2x1bW5Cb3VuZHMocm93SW5kZXgsIGNvbHVtbkluZGV4KTsKICAgICAgICAgICAgICAgICAgICB2YXIgd2l0aGluQ29sdW1uID0gdXRpbHMkMS5NYXRoLndpdGhpbihwLCBjb2x1bW5Cb3VuZHMpOwogICAgICAgICAgICAgICAgICAgIGlmICh3aXRoaW5Db2x1bW4pIHsKICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHJvd0VsZW1lbnQgPSBfdGhpcy5jb250ZW50KCkuc2Vs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bewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvdW5kczogdXRpbHMkMS5ET00uZWxlbWVudEJCb3goZDMuc2VsZWN0KHJvd0VsZW1lbnQpKSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXR1bTogY29sdW1uLmRhdGEubmFtZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbjogewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB4OiByb3dUcmFuc2xhdGVbMF0gKyBzeW1ib2xUcmFuc2xhdGVbMF0sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHk6IHJvd1RyYW5zbGF0ZVsxXSArIHN5bWJvbFRyYW5zbGF0ZVsxXSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbjogZDMuc2VsZWN0KGVudHJ5RWxlbWVudCksCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tcG9uZW50OiBfdGhpcywKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1dOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gZW50aXR5OwogICAgICAgICAgICAgICAgfSwgZW50aXR5KTsKICAgICAgICAgICAgfSwgW10pOwogICAgICAgIH07CiAgICAgICAgTGVnZW5kLnByb3RvdHlwZS5yZW5kZXJJbW1lZGlhdGVseSA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgX3N1cGVyLnByb3RvdHlwZS5yZW5kZXJJbW1lZGlhdGVseS5jYWxsKHRoaXMpOwogICAgICAgICAgICB2YXIgdGFibGUgPSB0aGlzLl9idWlsZExlZ2VuZFRhYmxlKHRoaXMud2lkdGgoKSwgdGhpcy5oZWlnaHQoKSk7CiAgICAgICAgICAgIC8vIGNsZWFyIGNvbnRlbnQgZnJvbSBwcmV2aW91cyByZW5kZXJzCiAgICAgICAgICAgIHRoaXMuY29udGVudCgpLnNlbGVjdEFsbCgiKiIpLnJlbW92ZSgpOwogICAgICAgICAgICB2YXIgcm93c1VwZGF0ZSA9IHRoaXMuY29udGVudCgpLnNlbGVjdEFsbCgiZy4iICsgTGVnZW5kLkxFR0VORF9ST1dfQ0xBU1MpLmRhdGEodGFibGUucm93cyk7CiAgICAgICAgICAgIHZhciByb3dzID0gcm93c1VwZGF0ZQogICAgICAgICAgICAgICAgLmVudGVyKCkKICAgICAgICAgICAgICAgIC5hcHBlbmQoImciKQogICAgICAgICAgICAgICAgLmNsYXNzZWQoTGVnZW5kLkxFR0VORF9ST1dfQ0xBU1MsIHRydWUpCiAgICAgICAgICAgICAgICAubWVyZ2Uocm93c1VwZGF0ZSk7CiAgICAgICAgICAgIHJvd3NVcGRhdGUuZXhpdCgpLnJlbW92ZSgpOwogICAgICAgICAgICByb3dzLmF0dHIoInRyYW5zZm9ybSIsIGZ1bmN0aW9uIChyb3csIHJvd0luZGV4KSB7CiAgICAgICAgICAgICAgICB2YXIgcm93Qm91bmRzID0gdGFibGUuZ2V0Um93Qm91bmRzKHJvd0luZGV4KTsKICAgICAgICAgICAgICAgIHJldHVybiAidHJhbnNsYXRlKCIgKyByb3dCb3VuZHMudG9wTGVmdC54ICsgIiwgIiArIHJvd0JvdW5kcy50b3BMZWZ0LnkgKyAiKSI7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXM7CiAgICAgICAgICAgIHJvd3MuZWFjaChmdW5jdGlvbiAocm93LCByb3dJbmRleCkgewogICAgICAgICAgICAgICAgdmFyIHN5bWJvbEVudHJ5UGFpcnMgPSBbXTsKICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgcm93LmNvbHVtbnMubGVuZ3RoOyBpICs9IDIpIHsKICAgICAgICAgICAgICAgICAgICBzeW1ib2xFbnRyeVBhaXJzLnB1c2goW3Jvdy5jb2x1bW5zW2ldLCByb3cuY29sdW1uc1tpICsgMV1dKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHZhciBlbnRyaWVzVXBkYXRlID0gZDMuc2VsZWN0KHRoaXMpLnNlbGVjdEFsbCgiZy4iICsgTGVnZW5kLkxFR0VORF9FTlRSWV9DTEFTUykuZGF0YShzeW1ib2xFbnRyeVBhaXJzKTsKICAgICAgICAgICAgICAgIHZhciBlbnRyaWVzRW50ZXIgPSBlbnRyaWVzVXBkYXRlCiAgICAgICAgICAgICAgICAgICAgLmVudGVyKCkKICAgICAgICAgICAgICAgICAgICAuYXBwZW5kKCJnIikKICAgICAgICAgICAgICAgICAgICAuY2xhc3NlZChMZWdlbmQuTEVHRU5EX0VOVFJZX0NMQVNTLCB0cnVlKQogICAgICAgICAgICAgICAgICAgIC5tZXJnZShlbnRyaWVzVXBkYXRlKTsKICAgICAgICAgICAgICAgIGVudHJpZXNFbnRlci5hcHBlbmQoInBhdGgiKQogICAgICAgICAgICAgICAgICAgIC5hdHRyKCJkIiwgZnVuY3Rpb24gKHN5bWJvbEVudHJ5UGFpciwgY29sdW1uSW5kZXgpIHsKICAgICAgICAgICAgICAgICAgICB2YXIgc3ltYm9sID0gc3ltYm9sRW50cnlQYWlyWzBdOwogICAgICAgICAgICAgICAgICAgIHJldHVybiBzZWxmLnN5bWJvbCgpKHN5bWJvbC5kYXRhLm5hbWUsIHJvd0luZGV4KShzeW1ib2wuaGVpZ2h0ICogMC42KShudWxsKTsKICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgLmF0dHIoInRyYW5zZm9ybSIsIGZ1bmN0aW9uIChzeW1ib2xFbnRyeVBhaXIsIGkpIHsKICAgICAgICAgICAgICAgICAgICB2YXIgc3ltYm9sID0gc3ltYm9sRW50cnlQYWlyWzBdOwogICAgICAgICAgICAgICAgICAgIHZhciBjb2x1bW5JbmRleCA9IHRhYmxlLnJvd3Nbcm93SW5kZXhdLmNvbHVtbnMuaW5kZXhPZihzeW1ib2wpOwogICAgICAgICAgICAgICAgICAgIHZhciBjb2x1bW5Cb3VuZHMgPSB0YWJsZS5nZXRDb2x1bW5Cb3VuZHMocm93SW5kZXgsIGNvbHVtbkluZGV4KTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gInRyYW5zbGF0ZSgiICsgKGNvbHVtbkJvdW5kcy50b3BMZWZ0LnggKyBzeW1ib2wud2lkdGggLyAyKSArICIsICIgKyBzeW1ib2wuaGVpZ2h0IC8gMiArICIpIjsKICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgLmF0dHIoImZpbGwiLCBmdW5jdGlvbiAoc3ltYm9sRW50cnlQYWlyKSB7IHJldHVybiBzZWxmLl9jb2xvclNjYWxlLnNjYWxlKHN5bWJvbEVudHJ5UGFpclswXS5kYXRhLm5hbWUpOyB9KQogICAgICAgICAgICAgICAgICAgIC5hdHRyKCJvcGFjaXR5IiwgZnVuY3Rpb24gKHN5bWJvbEVudHJ5UGFpciwgX2NvbHVtbkluZGV4KSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNlbGYuc3ltYm9sT3BhY2l0eSgpKHN5bWJvbEVudHJ5UGFpclswXS5kYXRhLm5hbWUsIHJvd0luZGV4KTsKICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgLmNsYXNzZWQoTGVnZW5kLkxFR0VORF9TWU1CT0xfQ0xBU1MsIHRydWUpOwogICAgICAgICAgICAgICAgZW50cmllc0VudGVyLmFwcGVuZCgiZyIpLmNsYXNzZWQoInRleHQtY29udGFpbmVyIiwgdHJ1ZSkKICAgICAgICAgICAgICAgICAgICAuYXR0cigidHJhbnNmb3JtIiwgZnVuY3Rpb24gKHN5bWJvbEVudHJ5UGFpciwgaSkgewogICAgICAgICAgICAgICAgICAgIHZhciBlbnRyeSA9IHN5bWJvbEVudHJ5UGFpclsxXTsKICAgICAgICAgICAgICAgICAgICB2YXIgY29sdW1uSW5kZXggPSB0YWJsZS5yb3dzW3Jvd0luZGV4XS5jb2x1bW5zLmluZGV4T2YoZW50cnkpOwogICAgICAgICAgICAgICAgICAgIHZhciBjb2x1bW5Cb3VuZHMgPSB0YWJsZS5nZXRDb2x1bW5Cb3VuZHMocm93SW5kZXgsIGNvbHVtbkluZGV4KTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gInRyYW5zbGF0ZSgiICsgY29sdW1uQm91bmRzLnRvcExlZnQueCArICIsIDApIjsKICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgLmVhY2goZnVuY3Rpb24gKHN5bWJvbEVudHJ5UGFpciwgaSwgcm93SW5kZXgpIHsKICAgICAgICAgICAgICAgICAgICB2YXIgdGV4dENvbnRhaW5lciA9IGQzLnNlbGVjdCh0aGlzKTsKICAgICAgICAgICAgICAgICAgICB2YXIgY29sdW1uID0gc3ltYm9sRW50cnlQYWlyWzFdOwogICAgICAgICAgICAgICAgICAgIHZhciB3cml0ZU9wdGlvbnMgPSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHhBbGlnbjogImxlZnQiLAogICAgICAgICAgICAgICAgICAgICAgICB5QWxpZ246ICJ0b3AiLAogICAgICAgICAgICAgICAgICAgICAgICB0ZXh0Um90YXRpb246IDAsCiAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgICAgICBzZWxmLl93cml0ZXIud3JpdGUoc2VsZi5fZm9ybWF0dGVyKGNvbHVtbi5kYXRhLm5hbWUpLCBjb2x1bW4ud2lkdGgsIHNlbGYuaGVpZ2h0KCksIHdyaXRlT3B0aW9ucywgdGV4dENvbnRhaW5lci5ub2RlKCkpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBlbnRyaWVzVXBkYXRlLmV4aXQoKS5yZW1vdmUoKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgTGVnZW5kLnByb3RvdHlwZS5zeW1ib2wgPSBmdW5jdGlvbiAoc3ltYm9sKSB7CiAgICAgICAgICAgIGlmIChzeW1ib2wgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3N5bWJvbEZhY3RvcnlBY2Nlc3NvcjsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuX3N5bWJvbEZhY3RvcnlBY2Nlc3NvciA9IHN5bWJvbDsKICAgICAgICAgICAgICAgIHRoaXMucmVuZGVyKCk7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgTGVnZW5kLnByb3RvdHlwZS5zeW1ib2xPcGFjaXR5ID0gZnVuY3Rpb24gKHN5bWJvbE9wYWNpdHkpIHsKICAgICAgICAgICAgaWYgKHN5bWJvbE9wYWNpdHkgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3N5bWJvbE9wYWNpdHlBY2Nlc3NvcjsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmICh0eXBlb2Ygc3ltYm9sT3BhY2l0eSA9PT0gIm51bWJlciIpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3N5bWJvbE9wYWNpdHlBY2Nlc3NvciA9IGZ1bmN0aW9uICgpIHsgcmV0dXJuIHN5bWJvbE9wYWNpdHk7IH07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLl9zeW1ib2xPcGFjaXR5QWNjZXNzb3IgPSBzeW1ib2xPcGFjaXR5OwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMucmVuZGVyKCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgTGVnZW5kLnByb3RvdHlwZS5maXhlZFdpZHRoID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICB9OwogICAgICAgIExlZ2VuZC5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0YSBhbmQgc29tZSBtZXRhZGF0YS4KICAgICAgICAgKiBDaGFuZ2VzIHRvIHRoZSBkYXRhIG9yIG1ldGFkYXRhIHdpbGwgY2F1c2UgYW55dGhpbmcgc3Vic2NyaWJlZCB0byB0aGUgRGF0YXNldCB0byB1cGRhdGUuCiAgICAgICAgICoKICAgICAgICAgKiBAY29uc3RydWN0b3IKICAgICAgICAgKiBAcGFyYW0ge2FueVtdfSBbZGF0YT1bXV0gVGhlIGRhdGEgZm9yIHRoaXMgRGF0YXNldC4KICAgICAgICAgKiBAcGFyYW0ge2FueX0gW21ldGFkYXRhPXt9XSBBbiBvYmplY3QgY29udGFpbmluZyBhZGRpdGlvbmFsIGluZm9ybWF0aW9uLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIERhdGFzZXQoZGF0YSwgbWV0YWRhdGEpIHsKICAgICAgICAgICAgaWYgKGRhdGEgPT09IHZvaWQgMCkgeyBkYXRhID0gW107IH0KICAgICAgICAgICAgaWYgKG1ldGFkYXRhID09PSB2b2lkIDApIHsgbWV0YWRhdGEgPSB7fTsgfQogICAgICAgICAgICB0aGlzLl91cGRhdGVJZCA9IFVQREFURV9NT05PVE9OSUMrKzsKICAgICAgICAgICAgdGhpcy5fZGF0YSA9IGRhdGE7CiAgICAgICAgICAgIHRoaXMuX21ldGFkYXRhID0gbWV0YWRhdGE7CiAgICAgICAgICAgIHRoaXMuX2NhbGxiYWNrcyA9IG5ldyB1dGlscyQxLkNhbGxiYWNrU2V0KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEFkZHMgYSBjYWxsYmFjayB0byBiZSBjYWxsZWQgd2hlbiB0aGUgRGF0YXNldCB1cGRhdGVzLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtEYXRhc2V0Q2FsbGJhY2t9IGNhbGxiYWNrLgogICAgICAgICAqIEByZXR1cm5zIHtEYXRhc2V0fSBUaGUgY2FsbGluZyBEYXRhc2V0LgogICAgICAgICAqLwogICAgICAgIERhdGFzZXQucHJvdG90eXBlLm9uVXBkYXRlID0gZnVuY3Rpb24gKGNhbGxiYWNrKSB7CiAgICAgICAgICAgIHRoaXMuX2NhbGxiYWNrcy5hZGQoY2FsbGJhY2spOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIFJlbW92ZXMgYSBjYWxsYmFjayB0aGF0IHdvdWxkIGJlIGNhbGxlZCB3aGVuIHRoZSBEYXRhc2V0IHVwZGF0ZXMuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0ge0RhdGFzZXRDYWxsYmFja30gY2FsbGJhY2sKICAgICAgICAgKiBAcmV0dXJucyB7RGF0YXNldH0gVGhlIGNhbGxpbmcgRGF0YXNldC4KICAgICAgICAgKi8KICAgICAgICBEYXRhc2V0LnByb3RvdHlwZS5vZmZVcGRhdGUgPSBmdW5jdGlvbiAoY2FsbGJhY2spIHsKICAgICAgICAgICAgdGhpcy5fY2FsbGJhY2tzLmRlbGV0ZShjYWxsYmFjayk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgRGF0YXNldC5wcm90b3R5cGUuZGF0YSA9IGZ1bmN0aW9uIChkYXRhKSB7CiAgICAgICAgICAgIGlmIChkYXRhID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9kYXRhOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fZGF0YSA9IGRhdGE7CiAgICAgICAgICAgICAgICB0aGlzLl9kaXNwYXRjaFVwZGF0ZSgpOwogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIERhdGFzZXQucHJvdG90eXBlLm1ldGFkYXRhID0gZnVuY3Rpb24gKG1ldGFkYXRhKSB7CiAgICAgICAgICAgIGlmIChtZXRhZGF0YSA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fbWV0YWRhdGE7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLl9tZXRhZGF0YSA9IG1ldGFkYXRhOwogICAgICAgICAgICAgICAgdGhpcy5fZGlzcGF0Y2hVcGRhdGUoKTsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBEYXRhc2V0LnByb3RvdHlwZS51cGRhdGVJZCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3VwZGF0ZUlkOwogICAgICAgIH07CiAgICAgICAgRGF0YXNldC5wcm90b3R5cGUuX2Rpc3BhdGNoVXBkYXRlID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB0aGlzLl91cGRhdGVJZCA9IFVQREFURV9NT05PVE9OSUMrKzsKICAgICAgICAgICAgdGhpcy5fY2FsbGJhY2tzLmNhbGxDYWxsYmFja3ModGhpcyk7CiAgICAgICAgfTsKICAgICAgICByZXR1cm4gRGF0YXNldDsKICAgIH0oKSk7CiAgICBleHBvcnRzLkRhdGFzZXQgPSBEYXRhc2V0OwogICAgfSk7CgogICAgdmFyIHNpZ25hdHVyZSA9IGNyZWF0ZUNvbW1vbmpzTW9kdWxlKGZ1bmN0aW9uIChtb2R1bGUsIGV4cG9ydHMpIHsKICAgIC8qKgogICAgICogQ29weXJpZ2h0IDIwMTQtcHJlc2VudCBQYWxhbnRpciBUZWNobm9sb2dpZXMKICAgICAqIEBsaWNlbnNlIE1JVAogICAgICogQGZpbGVvdmVydmlldyBJbXBsZW1lbnRzIHRoZSBTaWduYXR1cmUgQVBJIHRvIGhlbHAgaW4gY29tcGFyaW5nIHdoZW4gdHdvCiAgICAgKiBQbG90dGFibGUgb2JqZWN0cyBoYXZlICJjaGFuZ2VkIi4KICAgICAqCiAgICAgKiBNZW1vaXphdGlvbiBpbi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gICAgKiBJZiB0aGUgaW5wdXQgaXMgYWxyZWFkeSBhIHNpZ25hdHVyZSwgc2ltcGx5IHJldHVybiBpdC4KICAgICAqCiAgICAgKiBAcGFyYW0gYQogICAgICogQHJldHVybnMge1NpZ25hdHVyZX0KICAgICAqLwogICAgZnVuY3Rpb24gc2lnbihhKSB7CiAgICAgICAgaWYgKGEgaW5zdGFuY2VvZiBTaWduYXR1cmUpIHsKICAgICAgICAgICAgcmV0dXJuIGE7CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYgKGEgaW5zdGFuY2VvZiBEYXRlKSB7CiAgICAgICAgICAgIHJldHVybiBzaWduUmVmKGEudmFsdWVPZigpKTsKICAgICAgICB9CiAgICAgICAgZWxzZSBpZiAoYSBpbnN0YW5jZW9mIHNjYWxlLlNjYWxlKSB7CiAgICAgICAgICAgIHJldHVybiBzaWduU2NhbGUoYSk7CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYgKGEgaW5zdGFuY2VvZiBkYXRhc2V0LkRhdGFzZXQpIHsKICAgICAgICAgICAgcmV0dXJuIHNpZ25EYXRhc2V0KGEpOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChpc1BsYWluT2JqZWN0KGEpKSB7CiAgICAgICAgICAgIHJldHVybiBzaWduT2JqKGEpOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChBcnJheS5pc0FycmF5KGEpKSB7CiAgICAgICAgICAgIHJldHVybiBzaWduQXJyYXkoYSk7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICByZXR1cm4gc2lnblJlZihhKTsKICAgICAgICB9CiAgICB9CiAgICBleHBvcnRzLnNpZ24gPSBzaWduOwogICAgZnVuY3Rpb24gc2lnblNjYWxlKHNjYWxlKSB7CiAgICAgICAgdmFyIHNjYWxlT2JqID0gewogICAgICAgICAgICAvLyByZXF1aXJlZCBpbiBjYXNlIHRoZSBkb21haW4gaGFzIGNoYW5nZWQgd2l0aG91dCB0aGUgdXBkYXRlSWQ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hdGFzZXRPYmopOwogICAgfQogICAgZXhwb3J0cy5zaWduRGF0YXNldCA9IHNpZ25EYXRhc2V0OwogICAgZnVuY3Rpb24gc2lnblJlZihhKSB7CiAgICAgICAgcmV0dXJuIG5ldyBSZWZlcmVuY2VTaWduYXR1cmUoYSk7CiAgICB9CiAgICBleHBvcnRzLnNpZ25SZWYgPSBzaWduUmVmOwogICAgZnVuY3Rpb24gc2lnbkFycmF5KGEpIHsKICAgICAgICByZXR1cm4gbmV3IEFycmF5U2lnbmF0dXJlKGEubWFwKGZ1bmN0aW9uIChlbGVtZW50KSB7IHJldHVybiBzaWduKGVsZW1lbnQpOyB9KSk7CiAgICB9CiAgICBleHBvcnRzLnNpZ25BcnJheSA9IHNpZ25BcnJheTsKICAgIGZ1bmN0aW9uIHNpZ25PYmoob2JqKSB7CiAgICAgICAgdmFyIHNpZ25hdHVyZVJlY29yZCA9IHt9OwogICAgICAgIGZvciAodmFyIGtleSBpbiBvYmopIHsKICAgICAgICAgICAgaWYgKG9iai5oYXNPd25Qcm9wZXJ0eShrZXkpKSB7CiAgICAgICAgICAgICAgICBzaWduYXR1cmVSZWNvcmRba2V5XSA9IHNpZ24ob2JqW2tleV0pOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiBuZXcgT2JqZWN0U2lnbmF0dXJlKHNpZ25hdHVyZVJlY29yZCk7CiAgICB9CiAgICBleHBvcnRzLnNpZ25PYmogPSBzaWduT2JqOwogICAgLyoqCiAgICAgKiBCYXNlIHNpZ25hdHVyZS4gU3ViY2xhc3NlcyBzaG91bGQgaW1wbGVtZW50IGlzU2lnbmF0dXJlRGlmZmVyZW50LiBBbGwgY2xhc3NlcwogICAgICogc2hvdWxkIGJlIGltbXV0YWJsZS4KICAgICAqCiAgICAgKiBVc2VycyBzaG91bGQgb25seSBjYWxsIGBpc0RpZmZlcmVudGAsIG5vdCBgaXNTaWduYXR1cmVEaWZmZXJlbnRgLgogICAgICovCiAgICB2YXIgU2lnbmF0dXJlID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKCkgewogICAgICAgIGZ1bmN0aW9uIFNpZ25hdHVyZSgpIHsKICAgICAgICB9CiAgICAgICAgU2lnbmF0dXJlLnByb3RvdHlwZS5pc0RpZmZlcmVudCA9IGZ1bmN0aW9uIChvdGhlcikgewogICAgICAgICAgICBpZiAob3RoZXIgaW5zdGFuY2VvZiB0aGlzLmNvbnN0cnVjdG9yKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5pc1NpZ25hdHVyZURpZmZlcmVudChvdGhlcik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgcmV0dXJuIFNpZ25hdHVyZTsKICAgIH0oKSk7CiAgICBleHBvcnRzLlNpZ25hdHVyZSA9IFNpZ25hdHVyZTsKICAgIC8qKgogICAgICogQSBzaWduYXR1cmUgZm9yIGFuIGFycmF5LgogICAgICovCiAgICB2YXIgQXJyYXlTaWduYXR1cmUgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7CiAgICAgICAgdHNsaWJfZXM2Ll9fZXh0ZW5kcyhBcnJheVNpZ25hdHVyZSwgX3N1cGVyKTsKICAgICAgICBmdW5jdGlvbiBBcnJheVNpZ25hdHVyZShhcnJheSkgewogICAgICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzKSB8fCB0aGlzOwogICAgICAgICAgICBfdGhpcy5hcnJheSA9IGFycmF5OwogICAgICAgICAgICByZXR1cm4gX3RoaXM7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEFuIGFycmF5IG9mIHNpZ25hdHVyZXMgaXMgZGlmZmVyZW50IGlmIGFueSBvZiB0aGUgZWxlbWVudHMgaXNEaWZmZXJlbnQuCiAgICAgICAgICovCiAgICAgICAgQXJyYXlTaWduYXR1cmUucHJvdG90eXBlLmlzU2lnbmF0dXJlRGlmZmVyZW50ID0gZnVuY3Rpb24gKG90aGVyKSB7CiAgICAgICAgICAgIGlmIChvdGhlci5hcnJheS5sZW5ndGggIT09IHRoaXMuYXJyYXkubGVuZ3RoKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdGhpcy5hcnJheS5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmFycmF5W2ldLmlzRGlmZmVyZW50KG90aGVyLmFycmF5W2ldKSkgewogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIHJldHVybiBBcnJheVNpZ25hdHVyZTsKICAgIH0oU2lnbmF0dXJlKSk7CiAgICBleHBvcnRzLkFycmF5U2lnbmF0dXJlID0gQXJyYXlTaWduYXR1cmU7CiAgICB2YXIgUmVmZXJlbmNlU2lnbmF0dXJlID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikgewogICAgICAgIHRzbGliX2VzNi5fX2V4dGVuZHMoUmVmZXJlbmNlU2lnbmF0dXJlLCBfc3VwZXIpOwogICAgICAgIGZ1bmN0aW9uIFJlZmVyZW5jZVNpZ25hdHVyZShyZWYpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcykgfHwgdGhpczsKICAgICAgICAgICAgX3RoaXMucmVmID0gcmVmOwogICAgICAgICAgICByZXR1cm4gX3RoaXM7CiAgICAgICAgfQogICAgICAgIFJlZmVyZW5jZVNpZ25hdHVyZS5wcm90b3R5cGUuaXNTaWduYXR1cmVEaWZmZXJlbnQgPSBmdW5jdGlvbiAob3RoZXIpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMucmVmICE9PSBvdGhlci5yZWY7CiAgICAgICAgfTsKICAgICAgICByZXR1cm4gUmVmZXJlbmNlU2lnbmF0dXJlOwogICAgfShTaWduYXR1cmUpKTsKICAgIGV4cG9ydHMuUmVmZXJlbmNlU2lnbmF0dXJlID0gUmVmZXJlbmNlU2lnbmF0dXJlOwogICAgLyoqCiAgICAgKiBBIHNpZ25hdHVyZSBmb3IgYSBwbGFpbiBqcyBvYmplY3QuCiAgICAgKi8KICAgIHZhciBPYmplY3RTaWduYXR1cmUgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7CiAgICAgICAgdHNsaWJfZXM2Ll9fZXh0ZW5kcyhPYmplY3RTaWduYXR1cmUsIF9zdXBlcik7CiAgICAgICAgZnVuY3Rpb24gT2JqZWN0U2lnbmF0dXJlKG9iaikgewogICAgICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzKSB8fCB0aGlzOwogICAgICAgICAgICBfdGhpcy5vYmogPSBvYmo7CiAgICAgICAgICAgIHJldHVybiBfdGhpczsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQW4gb2JqZWN0IHNpZ25hdHVyZSBpcyBkaWZmZXJlbnQgaWYgYW55IG9mIHRoZSBlbGVtZW50cyBpc0RpZmZlcmVudC4KICAgICAgICAgKi8KICAgICAgICBPYmplY3RTaWduYXR1cmUucHJvdG90eXBlLmlzU2lnbmF0dXJlRGlmZmVyZW50ID0gZnVuY3Rpb24gKG90aGVyKSB7CiAgICAgICAgICAgIHZhciBteUtleXMgPSBPYmplY3Qua2V5cyh0aGlzLm9iaik7CiAgICAgICAgICAgIHZhciBvdGhlcktleXMgPSBPYmplY3Qua2V5cyhvdGhlci5vYmopOwogICAgICAgICAgICBpZiAobXlLZXlzLmxlbmd0aCAhPT0gb3RoZXJLZXlzLmxlbmd0aCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZm9yICh2YXIgX2kgPSAwLCBteUtleXNfMSA9IG15S2V5czsgX2kgPCBteUtleXNfMS5sZW5ndGg7IF9pKyspIHsKICAgICAgICAgICAgICAgIHZhciBrZXkgPSBteUtleXNfMVtfaV07CiAgICAgICAgICAgICAgICBpZiAoIW90aGVyLm9iai5oYXNPd25Qcm9wZXJ0eShrZXkpKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAodGhpcy5vYmpba2V5XS5pc0RpZmZlcmVudChvdGhlci5vYmpba2V5XSkpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgfTsKICAgICAgICByZXR1cm4gT2JqZWN0U2lnbmF0dXJlOwogICAgfShTaWduYXR1cmUpKTsKICAgIGV4cG9ydHMuT2JqZWN0U2lnbmF0dXJlID0gT2JqZWN0U2lnbmF0dXJlOwogICAgfSk7CgogICAgdmFyIG1lbW9pemVfMSA9IGNyZWF0ZUNvbW1vbmpzTW9kdWxlKGZ1bmN0aW9uIChtb2R1bGUsIGV4cG9ydHMpIHsKICAgIC8qKgogICAgICogQ29weXJpZ2h0IDIwMTQtcHJlc2VudCBQYWxhbnRpciBUZWNobm9sb2dpZXMKICAgICAqIEBsaWNlbnNlIE1JVAogICAgICogQGZpbGVvdmVydmlldyBJbXBsZW1lbnRzIGEgZnVuY3Rpb24gbWVtb2l6ZXIgdXNpbmcgdGhlIFNpZ25hdHVyZSBBUEkuCiAgICAgKi8KICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCAiX19lc01vZHVsZSIsIHsgdmFsdWU6IHRydWUgfSk7CgogICAgLyoqCiAg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2lnbmF0dXJlIEFQSSBmb3IgbW9yZSBpbmZvcm1hdGlvbi4KICAgICAqCiAgICAgKiBAcGFyYW0ge0Z9IGNvbXB1dGUKICAgICAqIEByZXR1cm5zIHtNZW1vaXplZEZ1bmN0aW9uPEYgZXh0ZW5kcyBGdW5jdGlvbj59CiAgICAgKi8KICAgIGZ1bmN0aW9uIG1lbW9pemUoY29tcHV0ZSkgewogICAgICAgIHZhciBsYXN0U2lnbmF0dXJlID0gdW5kZWZpbmVkOwogICAgICAgIHZhciBsYXN0VmFsdWU7CiAgICAgICAgdmFyIGxvY2tlZCA9IGZhbHNlOwogICAgICAgIHZhciBsb2dQZXJmb3JtYW5jZSA9IGZhbHNlOwogICAgICAgIHZhciBtZW1vaXplRm4gPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHZhciBhcmdzID0gW107CiAgICAgICAgICAgIGZvciAodmFyIF9pID0gMDsgX2kgPCBhcmd1bWVudHMubGVuZ3RoOyBfaSsrKSB7CiAgICAgICAgICAgICAgICBhcmdzW19pXSA9IGFyZ3VtZW50c1tfaV07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGxvY2tlZCkgewogICAgICAgICAgICAgICAgcmV0dXJuIGxhc3RWYWx1ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICB2YXIgaW5wdXRTaWduYXR1cmUgPSBzaWduYXR1cmUuc2lnbkFycmF5KGFyZ3MpOwogICAgICAgICAgICBpZiAobGFzdFNpZ25hdHVyZSA9PT0gdW5kZWZpbmVkCiAgICAgICAgICAgICAgICB8fCBsYXN0U2lnbmF0dXJlLmlzRGlmZmVyZW50KGlucHV0U2lnbmF0dXJlKSkgewogICAgICAgICAgICAgICAgaWYgKGxvZ1BlcmZvcm1hbmNlKSB7CiAgICAgICAgICAgICAgICAgICAgY29uc29sZS53YXJuKCJjYWNoZSBtaXNzISBjb21wdXRpbmciKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGxhc3RTaWduYXR1cmUgPSBpbnB1dFNpZ25hdHVyZTsKICAgICAgICAgICAgICAgIGxhc3RWYWx1ZSA9IGNvbXB1dGUuYXBwbHkodGhpcywgYXJncyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBpZiAobG9nUGVyZm9ybWFuY2UpIHsKICAgICAgICAgICAgICAgICAgICBjb25zb2xlLndhcm4oImNhY2hlIGhpdCEiKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gbGFzdFZhbHVlOwogICAgICAgIH07CiAgICAgICAgbWVtb2l6ZUZuLmRvTG9ja2VkID0gZnVuY3Rpb24gKGNiKSB7CiAgICAgICAgICAgIGlmIChsb2NrZWQpIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigiTG9ja2luZyBhbiBhbHJlYWR5IGxvY2tlZCBtZW1vaXplIGZ1bmN0aW9uISIpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGxvY2tlZCA9IHRydWU7CiAgICAgICAgICAgIHZhciByZXRWYWwgPSBjYi5hcHBseSh0aGlzKTsKICAgICAgICAgICAgbG9ja2VkID0gZmFsc2U7CiAgICAgICAgICAgIHJldHVybiByZXRWYWw7CiAgICAgICAgfTsKICAgICAgICBtZW1vaXplRm4ubG9nUGVyZm9ybWFuY2UgPSBmdW5jdGlvbiAobG9nKSB7CiAgICAgICAgICAgIGlmIChsb2cgPT09IHZvaWQgMCkgeyBsb2cgPSB0cnVlOyB9CiAgICAgICAgICAgIGxvZ1BlcmZvcm1hbmNlID0gbG9nOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIHJldHVybiBtZW1vaXplRm47CiAgICB9CiAgICBleHBvcnRzLm1lbW9pemUgPSBtZW1vaXplOwogICAgfSk7CgogICAgdmFyIG1lbW9pemVQcm9qZWN0b3JzXzEgPSBjcmVhdGVDb21tb25qc01vZHVsZShmdW5jdGlvbiAobW9kdWxlLCBleHBvcnRzKSB7CiAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgIl9fZXNNb2R1bGUiLCB7IHZhbHVlOiB0cnVlIH0pOwoKICAgIC8qKgogICAgICogQW4gaW5kZXggdGhhdCBzdG9yZXMgdmFsdWVzIGJ5IG51bWVyaWMga2V5LgogICAgICoKICAgICAqIEludGVybmFsbHkgdGhpcyB1c2VzIHByb3RvdHlwZS1sZXNzIG9iamVjdHMgYXMga2V5IGxvb2t1cHMgYXJlIG1hcmdpbmFsbHkKICAgICAqIGZhc3RlciB0aGFuIGB7fWBzLgogICAgICovCiAgICB2YXIgSW5kZXhNYXAgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7CiAgICAgICAgZnVuY3Rpb24gSW5kZXhNYXAoKSB7CiAgICAgICAgICAgIHRoaXMubWFwID0gT2JqZWN0LmNyZWF0ZShudWxsKTsKICAgICAgICAgICAgdGhpcy5leGlzdHMgPSBPYmplY3QuY3JlYXRlKG51bGwpOwogICAgICAgIH0KICAgICAgICBJbmRleE1hcC5wcm90b3R5cGUuZGVsZXRlID0gZnVuY3Rpb24gKGtleSkgewogICAgICAgICAgICBkZWxldGUgdGhpcy5tYXBba2V5XTsKICAgICAgICAgICAgZGVsZXRlIHRoaXMuZXhpc3RzW2tleV07CiAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgIH07CiAgICAgICAgSW5kZXhNYXAucHJvdG90eXBlLmdldCA9IGZ1bmN0aW9uIChrZXkpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMubWFwW2tleV07CiAgICAgICAgfTsKICAgICAgICBJbmRleE1hcC5wcm90b3R5cGUuaGFzID0gZnVuY3Rpb24gKGtleSkgewogICAgICAgICAgICByZXR1cm4gISF0aGlzLmV4aXN0c1trZXldOwogICAgICAgIH07CiAgICAgICAgSW5kZXhNYXAucHJvdG90eXBlLnNldCA9IGZ1bmN0aW9uIChrZXksIHZhbHVlKSB7CiAgICA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goc3R5bGUpIHsKICAgICAgICByZXR1cm4gc3R5bGVbInN0cm9rZS13aWR0aCJdICE9IG51bGwgPyBwYXJzZUZsb2F0KHN0eWxlWyJzdHJva2Utd2lkdGgiXSkgOiAxOwogICAgfQogICAgZXhwb3J0cy5nZXRTdHJva2VXaWR0aCA9IGdldFN0cm9rZVdpZHRoOwogICAgZnVuY3Rpb24gZ2V0U3Ryb2tlRGFzaEFycmF5KHN0eWxlKSB7CiAgICAgICAgdmFyIHJhd1ZhbHVlID0gc3R5bGVbInN0cm9rZS1kYXNoYXJyYXkiXTsKICAgICAgICBpZiAocmF3VmFsdWUgIT0gbnVsbCkgewogICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgcmV0dXJuIHJhd1ZhbHVlLnNwbGl0KC9bICxdKy8pLm1hcChmdW5jdGlvbiAoeCkgeyByZXR1cm4gcGFyc2VJbnQoeCwgMTApOyB9KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBjYXRjaCAoZSkgewogICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcigiZ2V0U3Ryb2tlRGFzaEFycmF5IGZhaWxlZCB3aXRoOiAiICsgZSk7CiAgICAgICAgICAgICAgICByZXR1cm4gW107CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIFtdOwogICAgfQogICAgZXhwb3J0cy5nZXRTdHJva2VEYXNoQXJyYXkgPSBnZXRTdHJva2VEYXNoQXJyYXk7CiAgICBmdW5jdGlvbiByZW5kZXJBcmVhKGNvbnRleHQsIGQzQXJlYSwgZGF0YSwgc3R5bGUpIHsKICAgICAgICBjb250ZXh0LnNhdmUoKTsKICAgICAgICBjb250ZXh0LmJlZ2luUGF0aCgpOwogICAgICAgIGQzQXJlYS5jb250ZXh0KGNvbnRleHQpOwogICAgICAgIGQzQXJlYShkYXRhKTsKICAgICAgICBjb250ZXh0LmxpbmVKb2luID0gInJvdW5kIjsKICAgICAgICByZW5kZXJQYXRoV2l0aFN0eWxlKGNvbnRleHQsIHN0eWxlKTsKICAgICAgICBjb250ZXh0LnJlc3RvcmUoKTsKICAgIH0KICAgIGV4cG9ydHMucmVuZGVyQXJlYSA9IHJlbmRlckFyZWE7CiAgICBmdW5jdGlvbiByZW5kZXJMaW5lKGNvbnRleHQsIGQzTGluZSwgZGF0YSwgc3R5bGUpIHsKICAgICAgICBjb250ZXh0LnNhdmUoKTsKICAgICAgICBjb250ZXh0LmJlZ2luUGF0aCgpOwogICAgICAgIGQzTGluZS5jb250ZXh0KGNvbnRleHQpOwogICAgICAgIGQzTGluZShkYXRhKTsKICAgICAgICBjb250ZXh0LmxpbmVKb2luID0gInJvdW5kIjsKICAgICAgICByZW5kZXJQYXRoV2l0aFN0eWxlKGNvbnRleHQsIHN0eWxlKTsKICAgICAgICBjb250ZXh0LnJlc3RvcmUoKTsKICAgIH0KICAgIGV4cG9ydHMucmVuZGVyTGluZSA9IHJlbmRlckxpbmU7CiAgICBmdW5jdGlvbiByZW5kZXJQYXRoV2l0aFN0eWxlKGNvbnRleHQsIHN0eWxlKSB7CiAgICAgICAgaWYgKHN0eWxlWyJzdHJva2UiXSkgewogICAgICAgICAgICBjb250ZXh0LmxpbmVXaWR0aCA9IGdldFN0cm9rZVdpZHRoKHN0eWxlKTsKICAgICAgICAgICAgdmFyIHN0cm9rZUNvbG9yID0gZDMuY29sb3Ioc3R5bGVbInN0cm9rZSJdKTsKICAgICAgICAgICAgdmFyIHN0cm9rZURhc2hBcnJheSA9IGdldFN0cm9rZURhc2hBcnJheShzdHlsZSk7CiAgICAgICAgICAgIGNvbnRleHQuc2V0TGluZURhc2goc3Ryb2tlRGFzaEFycmF5KTsKICAgICAgICAgICAgc3Ryb2tlQ29sb3Iub3BhY2l0eSAqPSBnZXRTdHJva2VPcGFjaXR5KHN0eWxlKTsKICAgICAgICAgICAgY29udGV4dC5zdHJva2VTdHlsZSA9IHN0cm9rZUNvbG9yLnRvU3RyaW5nKCk7CiAgICAgICAgICAgIGNvbnRleHQuc3Ryb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dlcjsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIFJlbW92ZSB0aGUgb2xkIGRyYXdlciBhbmQgdXNlIENhbnZhcyByZW5kZXJpbmcgZnJvbSBub3cgb24uCiAgICAgICAgICovCiAgICAgICAgUHJveHlEcmF3ZXIucHJvdG90eXBlLnVzZUNhbnZhcyA9IGZ1bmN0aW9uIChjYW52YXMpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX2N1cnJlbnREcmF3ZXIgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5fY3VycmVudERyYXdlci5yZW1vdmUoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9jdXJyZW50RHJhd2VyID0gdGhpcy5fY2FudmFzRHJhd2VyRmFjdG9yeShjYW52YXMubm9kZSgpLmdldENvbnRleHQoIjJkIikpOwogICAgICAgIH07CiAgICAgICAgLy8gcHVibGljIGZvciB0ZXN0aW5nCiAgICAgICAgUHJveHlEcmF3ZXIucHJvdG90eXBlLmdldERyYXdlciA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2N1cnJlbnREcmF3ZXI7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBSZW1vdmVzIHRoaXMgRHJhd2VyJ3MgcmVuZGVyQXJlYQogICAgICAgICAqLwogICAgICAgIFByb3h5RHJhd2VyLnByb3RvdHlwZS5yZW1vdmUgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9jdXJyZW50RHJhd2VyICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2N1cnJlbnREcmF3ZXIucmVtb3ZlKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIFByb3h5RHJhd2VyLnByb3RvdHlwZS5kcmF3ID0gZnVuY3Rpb24gKGRhdGEsIGRyYXdTdGVwcykgewogICAgICAgICAgICB0aGlzLl9jdXJyZW50RHJhd2VyLmRyYXc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WF0b3IsIHdoaWNoIHdpbGwgc2V0IHRoZQogICAgICAgICAgICAgKiBhcHByb3ByaWF0ZSBhdHRyaWJ1dGVzIG9uIHRoZSBET00uCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9jcmVhdGVBbmREZXN0cm95RE9NRWxlbWVudHMoZGF0YSk7CiAgICAgICAgICAgIHZhciBkZWxheSA9IDA7CiAgICAgICAgICAgIHZhciBkcmF3TGVuZ3RoID0gYXBwbGllZERyYXdTdGVwcy5sZW5ndGg7CiAgICAgICAgICAgIHZhciBfbG9vcF8xID0gZnVuY3Rpb24gKGkpIHsKICAgICAgICAgICAgICAgIHZhciBkcmF3U3RlcCA9IGFwcGxpZWREcmF3U3RlcHNbaV07CiAgICAgICAgICAgICAgICB1dGlscyQxLldpbmRvdy5zZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHsgcmV0dXJuIF90aGlzLl9kcmF3U3RlcChkcmF3U3RlcCk7IH0sIGRlbGF5KTsKICAgICAgICAgICAgICAgIGRlbGF5ICs9IGRyYXdTdGVwLmFuaW1hdG9yLnRvdGFsVGltZShkYXRhLmxlbmd0aCk7CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZHJhd0xlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICBfbG9vcF8xKGkpOwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBTVkdEcmF3ZXIucHJvdG90eXBlLmdldFZpc3VhbFByaW1pdGl2ZXMgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9jYWNoZWRWaXN1YWxQcmltaXRpdmVzTm9kZXMgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5fY2FjaGVkVmlzdWFsUHJpbWl0aXZlc05vZGVzID0gdGhpcy5fc2VsZWN0aW9uLm5vZGVzKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2NhY2hlZFZpc3VhbFByaW1pdGl2ZXNOb2RlczsKICAgICAgICB9OwogICAgICAgIFNWR0RyYXdlci5wcm90b3R5cGUuZ2V0VmlzdWFsUHJpbWl0aXZlQXRJbmRleCA9IGZ1bmN0aW9uIChpbmRleCkgewogICAgICAgICAgICBpZiAodGhpcy5fY2FjaGVkVmlzdWFsUHJpbWl0aXZlc05vZGVNYXAgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2NhY2hlZFZpc3VhbFByaW1pdGl2ZXNOb2RlTWFwLmdldChpbmRleCk7CiAgICAgICAgfTsKICAgICAgICBTVkdEcmF3ZXIucHJvdG90eXBlLnJlbW92ZSA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdGhpcy5fcm9vdC5yZW1vdmUoKTsKICAgICAgICB9OwogICAgICAgIFNWR0RyYXdlci5wcm90b3R5cGUuYXR0YWNoVG8gPSBmdW5jdGlvbiAocGFyZW50KSB7CiAgICAgICAgICAgIHBhcmVudC5ub2RlKCkuYXBwZW5kQ2hpbGQodGhpcy5fcm9vdC5ub2RlKCkpOwogICAgICAgIH07CiAgICAgICAgLy8gcHVibGljIGZvciB0ZXN0aW5nCiAgICAgICAgU1ZHRHJhd2VyLnByb3RvdHlwZS5nZXRSb290ID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fcm9vdDsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgdGhlIENTUyBzZWxlY3RvciBmb3IgdGhpcyBEcmF3ZXIncyB2aXN1YWwgZWxlbWVudHMuCiAgICAgICAgICovCiAgICAgICAgU1ZHRHJhd2VyLnByb3RvdHlwZS5zZWxlY3RvciA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3N2Z0VsZW1lbnROYW1lOwogICAgICAgIH07CiAgICAg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bDsKICAgICAgICAgICAgLy8gdW53cmFwIGRhdGEgbm93IHRoYXQgZWxlbWVudHMgbWF0Y2ggdGhlaXIgb3JpZ2luYWwgZGF0YSBpbmRleAogICAgICAgICAgICB0aGlzLl9zZWxlY3Rpb24uZGF0YSh0aGlzLl9zZWxlY3Rpb24uZGF0YSgpLm1hcChmdW5jdGlvbiAoX2EpIHsKICAgICAgICAgICAgICAgIHZhciBkID0gX2EuZDsKICAgICAgICAgICAgICAgIHJldHVybiBkOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIGlmICh0aGlzLl9jbGFzc05hbWUgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5fc2VsZWN0aW9uLmNsYXNzZWQodGhpcy5fY2xhc3NOYW1lLCB0cnVlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9hcHBseURlZmF1bHRBdHRyaWJ1dGVzKHRoaXMuX3NlbGVjdGlvbik7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBEcmF3cyBkYXRhIHVzaW5nIG9uZSBzdGVwCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW17QXBwbGllZERyYXdTdGVwfSBzdGVwIFRoZSBzdGVwLCBob3cgZGF0YSBzaG91bGQgYmUgZHJhd24uCiAgICAgICAgICovCiAgICAgICAgU1ZHRHJhd2VyLnByb3RvdHlwZS5fZHJhd1N0ZXAgPSBmdW5jdGlvbiAoc3RlcCkgewogICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwogICAgICAgICAgICB2YXIgY29sb3JBdHRyaWJ1dGVzID0gWyJmaWxsIiwgInN0cm9rZSJdOwogICAgICAgICAgICBjb2xvckF0dHJpYnV0ZXMuZm9yRWFjaChmdW5jdGlvbiAoY29sb3JBdHRyaWJ1dGUpIHsKICAgICAgICAgICAgICAgIGlmIChzdGVwLmF0dHJUb0FwcGxpZWRQcm9qZWN0b3JbY29sb3JBdHRyaWJ1dGVdICE9IG51bGwpIHsKIC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HsKICAgICAgICAgICAgICAgICAgICBfdGhpcy5yZW5kZXJDYWxsYmFjaygpOwogICAgICAgICAgICAgICAgfSwgRGVmZXJyZWRSZW5kZXJlci5ERUZFUlJFRF9SRU5ERVJJTkdfREVMQVkpOwogICAgICAgICAgICB9OwogICAgICAgIH0KICAgICAgICBEZWZlcnJlZFJlbmRlcmVyLnByb3RvdHlwZS5zZXREb21haW5zID0gZnVuY3Rpb24gKHNjYWxlWCwgc2NhbGVZKSB7CiAgICAgICAgICAgIGlmIChzY2FsZVgpIHsKICAgICAgICAgICAgICAgIHRoaXMuZG9tYWluVHJhbnNmb3JtWC5zZXREb21haW4oc2NhbGVYKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoc2NhbGVZKSB7CiAgICAgICAgICAgICAgICB0aGlzLmRvbWFpblRyYW5zZm9ybVkuc2V0RG9tYWluKHNjYWxlWSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5yZW5kZXJEZWZlcnJlZCgpOwogICAgICAgIH07CiAgICAgICAgRGVmZXJyZWRSZW5kZXJlci5wcm90b3R5cGUudXBkYXRlRG9tYWlucyA9IGZ1bmN0aW9uIChzY2FsZVgsIHNjYWxlWSkgewogICAgICAgICAgICBpZiAoc2NhbGVYKSB7CiAgICAgICAgICAgICAgICB0aGlzLmRvbWFpblRyYW5zZm9ybVgudXBkYXRlRG9tYWluKHNjYWxlWCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHNjYWxlWSkgewogICAgICAgICAgICAgICAgdGhpcy5kb21haW5UcmFuc2Zvcm1ZLnVwZGF0ZURvbWFpbihzY2FsZVkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMucmVuZGVyRGVmZXJyZWQoKTsKICAgICAgICB9OwogICAgICAgIERlZmVycmVkUmVuZGVyZXIucHJvdG90eXBlLnJlc2V0VHJhbnNmb3JtcyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdGhpcy5kb21haW5Uc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pb24gKGRhdHVtLCBpbmRleCkgeyByZXR1cm4gYXR0clRvUHJvamVjdG9yW2F0dHJdKGRhdHVtLCBpbmRleCwgZGF0YXNldCk7IH07CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAgICAgYXR0clRvQXBwbGllZFByb2plY3RvcjogYXR0clRvQXBwbGllZFByb2plY3RvciwKICAgICAgICAgICAgICAgICAgICBhbmltYXRvcjogZHJhd1N0ZXAuYW5pbWF0b3IsCiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgcmV0dXJuIGFwcGxpZWREcmF3U3RlcHM7CiAgICAgICAgfTsKICAgICAgICBQbG90LnByb3RvdHlwZS5hbmNob3IgPSBmdW5jdGlvbiAoc2VsZWN0aW9uKSB7CiAgICAgICAgICAgIHNlbGVjdGlvbiA9IGNvZXJjZUQzLmNvZXJjZUV4dGVybmFsRDMoc2VsZWN0aW9uKTsKICAgICAgICAgICAgX3N1cGVyLnByb3RvdHlwZS5hbmNob3IuY2FsbCh0aGlzLCBzZWxlY3Rpb24pOwogICAgICAgICAgICB0aGlzLl9kYXRhQ2hhbmdlZCA9IHRydWU7CiAgICAgICAgICAgIHRoaXMuX3Jlc2V0RW50aXR5U3RvcmUoKTsKICAgICAgICAgICAgdGhpcy5fdXBkYXRlRXh0ZW50cygpOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIFBsb3QucHJvdG90eXBlLl9zZXR1cCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgaWYgKHRoaXMuX2lzU2V0dXApIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLl9zZXR1cC5jYWxsKHRoaXMpOwogICAgICAgICAgICBpZiAodGhpcy5fY2FudmFzICE9IG51bGw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50cygpOwogICAgICAgICAgICBpZiAodGhpcy5fY2FudmFzICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIGlmICh0aGlzLl9idWZmZXJDYW52YXMgJiYgIXRoaXMuX2J1ZmZlckNhbnZhc1ZhbGlkKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gY29weSBjdXJyZW50IGNhbnZhcyB0byBidWZmZXIgMToxCiAgICAgICAgICAgICAgICAgICAgLy8KICAgICAgICAgICAgICAgICAgICAvLyBXaHkgdXNlIGEgYnVmZmVyIGNhbnZhcz8KICAgICAgICAgICAgICAgICAgICAvLyBBcyBzb29uIGFzIHdlIGNoYW5nZSB0aGUgc2l6ZSBvZiBhIGNhbnZhcyB3aXRoIGNzcyBvciBhdHRyaWJ1dGVzLCBpdAogICAgICAgICAgICAgICAgICAgIC8vIGNsZWFycyB0aGUgY29udGVudHMuIFdpdGhvdXQgYSBidWZmZXIgY2FudmFzLCB0aGlzIHJlcXVpcmVzCiAgICAgICAgICAgICAgICAgICAgLy8gZHJhZy1yZXNpemFibGUgY2hhcnRzIHRvIGltbWVkaWF0ZWx5IGRvIGEgZnVsbCByZWRyYXcgd2hpbGUgeW91CiAgICAgICAgICAgICAgICAgICAgLy8gZHJhZy1yZXNpemUsIHdoaWNoIGNhbiBjYXVzZSBqYW5rLiBUbyBhdm9pZCB0aGF0LCB0aGlzIGJ1ZmZlciBjYW52YXMKICAgICAgICAgICAgICAgICAgICAvLyBzdG9yZXMgdGhlIGN1cnJlbnQgY2FudmFzIGNvbnRlbnRzIHdoZW4gdGhlIHJlc2l6ZSBzdGFydHMgYW5kIHJlZHJhd3MKICAgICAgICAgICAgICAgICAgICAvLyBpdCBpbnRvIHRoZSByZXNpemVkIGNhbnZhcy4gRXZlbnR1YWxseSwgdGhlIGRlZmVycmVkIHJlbmRlcmluZwogICAgICAgICAgICAgICAgICAgIC8vIGNhbGxiYWNrIHdpbGwgdHJpZ2dlciBhbmQgZG8gYSBmdWxsLXJleiByZWRyYXcuIElmIGRlZmVycmVkIHJlbmRlcmluZwogICAgICAgICAgICAgICAgICAgIC8vIGlzIGRpc2FibGVkLCB0aGUgYnVmZmVyIGNvcHkgd2lsbCBiZSBvdmVyd3JpdHRlbiBpbW1lZGlhdGVseSBieSBhCiAgICAgICAgICAgICAgICAgICAgLy8gZnVsbCByZWRyYXcuCiAgICAgICAgICAgICAgICAgICAgdGhpcy5fYnVmZmVyQ2FudmFzLmF0dHIoIndpZHRoIiwgdGhpcy5fY2FudmFzLmF0dHIoIndpZHRoIikpOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX2J1ZmZlckNhbnZhcy5hdHRyKCJoZWlnaHQiLCB0aGlzLl9jYW52YXMuYXR0cigiaGVpZ2h0IikpOwogICAgICAgICAgICAgICAgICAgIHZhciBidHggPSB0aGlzLl9idWZmZXJDYW52YXMubm9kZSgpLmdldENvbnRleHQoIjJkIik7CiAgICAgICAgICAgICAgICAgICAgLy8gZm9yIGhlYWRsZXNzIHRlc3QgY29tcGF0IChqZXN0KQogICAgICAgICAgICAgICAgICAgIGlmIChidHgpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG9yaWdpbmFsQ2FudmFzID0gdGhpcy5fY2FudmFzLm5vZGUoKTsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG9yaWdpbmFsQ2FudmFzLndpZHRoID4gMCAmJiBvcmlnaW5hbENhbnZhcy5oZWlnaHQgPiAwKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoYnR4LmNhbnZhcy53aWR0aCA+IDAgJiYgYnR4LmNhbnZhcy5oZWlnaHQgPiAwKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnR4LmRyYXdJbWFnZShvcmlnaW5hbENhbnZhcywgMCwgMCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLndhcm4oIkZhaWxlZCB0byBmaWxsIGJ1ZmZlciBjYW52YXMgd2l0aCB3aXRoIDB4MCBjYW52YXMiKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB0aGlzLl9idWZmZXJDYW52YXNWYWxpZCA9IHRydWU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvLyB1cGRhdGUgY2FudmFzIHNpemUKICAgICAgICAgICAgICAgIHZhciByYXRpbyA9ICh3aW5kb3cuZGV2aWNlUGl4ZWxSYXRpbyAhPSBudWxsKSA/IHdpbmRvdy5kZXZpY2VQaXhlbFJhdGlvIDogMTsKICAgICAgICAgICAgICAgIC8vIHVwZGF0ZSBjYW52YXMgd2lkdGgvaGVpZ2h0IHRha2luZyBpbnRvIGFjY291bnQgcmV0aW5hIGRpc3BsYXlzLgogICAgICAgICAgICAgICAgLy8gVGhpcyB3aWxsIGFsc28gY2xlYXIgdGhlIGNhbnZhcyBvZiBhbnkgZHJhd24gZWxlbWVudHMgc28gd2Ugc2hvdWxkCiAgICAgICAgICAgICAgICAvLyBiZSBzdXJlIG5vdCB0byBjb21wdXRlTGF5b3V0KCkgd2l0aG91dCBhIHJlbmRlcigpIGluIHRoZSBmdXR1cmUuCiAgICAgICAgICAgICAgICB0aGlzLl9jYW52YXMuYXR0cigid2lkdGgiLCB3aWR0aCAqIHJhdGlvKTsKICAgICAgICAgICAgICAgIHRoaXMuX2NhbnZhcy5hdHRyKCJoZWlnaHQiLCBoZWlnaHQgKiByYXRpbyk7CiAgICAgICAgICAgICAgICAvLyByZXNldCB0aGUgdHJhbnNmb3JtIHRoZW4gc2V0IHRoZSBzY2FsZSBmYWN0b3IKICAgICAgICAgICAgICAgIHZhciBjdHggPSB0aGlzLl9jYW52YXMubm9kZSgpLmdldENvbnRleHQoIjJkIik7CiAgICAgICAgICAgICAgICAvLyBudWxsIGNoZWNrIGZvciBoZWFkbGVzcyB0ZXN0IGNvbXBhdCAoamVzdCkKICAgICAgICAgICAgICAgIGlmIChjdHgpIHsKICAgICAgICAgICAgICAgICAgICBjdHguc2V0VHJhbnNmb3JtKHJhdGlvLCAwLCAwLCByYXRpbywgMCwgMCk7CiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX2J1ZmZlckNhbnZhcykgewogICAgICAgICAgICAgICAgICAgICAgICB2YXIgYnVmZmVyQ2FudmFzID0gdGhpcy5fYnVmZmVyQ2FudmFzLm5vZGUoKTsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGJ1ZmZlckNhbnZhcy53aWR0aCA+IDAgJiYgYnVmZmVyQ2FudmFzLmhlaWdodCA+IDApIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjdHguY2FudmFzLndpZHRoID4gMCAmJiBjdHguY2FudmFzLmhlaWdodCA+IDApIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBkcmF3IGJ1ZmZlciB0byBjdXJyZW50IGNhbnZhcyBhdCBuZXcgc2l6ZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoYnVmZmVyQ2FudmFzLCAwLCAwLCB3aWR0aCwgaGVpZ2h0KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUud2FybigiRmFpbGVkIHRvIGZpbGwgY2FudmFzIHdpdGggMHgwIGJ1ZmZlciBjYW52YXMiKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIFBsb3QucHJvdG90eXBlLmRlc3Ryb3kgPSBmdW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dWxsKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIFBsb3QucHJvdG90eXBlLl9vbkRhdGFzZXRVcGRhdGUgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHRoaXMuX3VwZGF0ZUV4dGVudHMoKTsKICAgICAgICAgICAgdGhpcy5fZGF0YUNoYW5nZWQgPSB0cnVlOwogICAgICAgICAgICB0aGlzLl9yZXNldEVudGl0eVN0b3JlKCk7CiAgICAgICAgICAgIHRoaXMucmVuZGVyTG93UHJpb3JpdHkoKTsKICAgICAgICB9OwogICAgICAgIFBsb3QucHJvdG90eXBlLmF0dHIgPSBmdW5jdGlvbiAoYXR0ciwgYXR0clZhbHVlLCBzY2FsZSkgewogICAgICAgICAgICBpZiAoYXR0clZhbHVlID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9hdHRyQmluZGluZ3MuZ2V0KGF0dHIpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2JpbmRBdHRyKGF0dHIsIGF0dHJWYWx1ZSwgc2NhbGUpOwogICAgICAgICAgICB0aGlzLnJlbmRlcigpOyAvLyBxdWV1ZSBhIHJlLXJlbmRlciB1cG9uIGNoYW5naW5nIHByb2plY3RvcgogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIFBsb3QucHJvdG90eXBlLl9iaW5kUHJvcGVydHkgPSBmdW5jdGlvbiAocHJvcGVydHksIHZhbHVlT3JGbiwgc2NhbGUsIHBvc3RTY2FsZSkgewogICAgICAgICAgICB2YXIgYmluZGluZyA9IHRoaXMuX3Byb3BlcnR5QmluZGluZ3MuZ2V0KHByb3BlcnR5KTsKICAgICAgICAgICAgdmFyIG9sZFNjYWxlID0gYmluZGluZyAhPSBudWxsID8gYmluZGluZy5zY2FsZSA6IG51bGw7CiAgICAgICAgICAgIHZhciBhY2Nlc3NvciA9IHR5cGVvZiB2YWx1ZU9yRm4gPT09ICJmdW5jdGlv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AgICAgaWYgKG9sZFNjYWxlICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3VuaW5zdGFsbFNjYWxlRm9yS2V5KG9sZFNjYWxlLCBhdHRyKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoc2NhbGUgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5faW5zdGFsbFNjYWxlRm9yS2V5KHNjYWxlLCBhdHRyKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9jbGVhckF0dHJUb1Byb2plY3RvckNhY2hlKCk7CiAgICAgICAgfTsKICAgICAgICBQbG90LnByb3RvdHlwZS5fY2xlYXJBdHRyVG9Qcm9qZWN0b3JDYWNoZSA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgZGVsZXRlIHRoaXMuX2NhY2hlZEF0dHJUb1Byb2plY3RvcjsKICAgICAgICB9OwogICAgICAgIFBsb3QucHJvdG90eXBlLl9nZXRBdHRyVG9Qcm9qZWN0b3IgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9jYWNoZWRBdHRyVG9Qcm9qZWN0b3IgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgdmFyIHByb2plY3RvcnMgPSB0aGlzLl9nZW5lcmF0ZUF0dHJUb1Byb2plY3RvcigpOwogICAgICAgICAgICAgICAgaWYgKFBsb3QuT1BUSU1JWkVfTUVNT0laRV9QUk9KRUNUT1JTKSB7CiAgICAgICAgICAgICAgICAgICAgcHJvamVjdG9ycyA9IG1lbW9pemUubWVtb2l6ZVByb2plY3RvcnMocHJvamVjdG9ycyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLl9jYWNoZWRBdHRyVG9Qcm9qZWN0b3IgPSBwcm9qZWN0b3JzOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIHJldHVybiBzaGFsbG93IGNsb25lIG9mIGNhY2hlZCBwcm9qZWN0b3IKICAgICAgICAgICAgcmV0dXJuIHV0aWxzJDEuYXNzaWduKHt9LCB0aGlzLl9jYWNoZWRBdHRyVG9Qcm9qZWN0b3IpOwogICAgICAgIH07CiAgICAgICAgUGxvdC5wcm90b3R5cGUuX2dlbmVyYXRlQXR0clRvUHJvamVjdG9yID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB2YXIgaCA9IHt9OwogICAgICAgICAgICB0aGlzLl9hdHRyQmluZGluZ3MuZWFjaChmdW5jdGlvbiAoYmluZGluZywgYXR0cikgewogICAgICAgICAgICAgICAgaFthdHRyXSA9IFBsb3QuX3NjYWxlZEFjY2Vzc29yKGJpbmRpbmcpOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdmFyIHByb3BlcnR5UHJvamVjdG9ycyA9IHRoaXMuX3Byb3BlcnR5UHJvamVjdG9ycygpOwogICAgICAgICAgICBPYmplY3Qua2V5cyhwcm9wZXJ0eVByb2plY3RvcnMpLmZvckVhY2goZnVuY3Rpb24gKGtleSkgewogICAgICAgICAgICAgICAgaWYgKGhba2V5XSA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgaFtrZXldID0gcHJvcGVydHlQcm9qZWN0b3JzW2tleV07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICByZXR1cm4gaDsKICAgICAgICB9OwogICAgICAgIFBsb3QucHJvdG90eXBlLnJlbmRlckltbWVkaWF0ZWx5ID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLnJlbmRlckltbWVkaWF0ZWx5LmNhbGwodGhpcyk7CiAgICAgICAgICAgIGlmICh0aGlzLl9pc0FuY2hvcmVkKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9wYWludCgpOwogICAgICAgICAgICAgICAgdGhpcy5fZGF0YUNoYW5nZWQgPSBmYWxzZTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIFBsb3QucHJvdG90eXBlLnJlbmRlckxvd1ByaW9yaXR5ID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB0aGlzLl9yZW5kZXJDYWxsYmFjaygpOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIFBsb3QucHJvdG90eXBlLmFuaW1hdGVkID0gZnVuY3Rpb24gKHdpbGxBbmltYXRlKSB7CiAgICAgICAgICAgIGlmICh3aWxsQW5pbWF0ZSA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fYW5pbWF0ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9hbmltYXRlID0gd2lsbEFuaW1hdGU7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgUGxvdC5wcm90b3R5cGUuZGV0YWNoID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLmRldGFjaC5jYWxsKHRoaXMpOwogICAgICAgICAgICAvLyBtYWtlIHRoZSBkb21haW4gcmVzaXplCiAgICAgICAgICAgIHRoaXMuX3VwZGF0ZUV4dGVudHMoKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJucyB7U2NhbGVbXX0gQSB1bmlxdWUgYXJyYXkgb2YgYWxsIHNjYWxlcyBjdXJyZW50bHkgdXNlZCBieSB0aGUgUGxvdC4KICAgICAgICAgKi8KICAgICAgICBQbG90LnByb3RvdHlwZS5fc2NhbGVzID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB2YXIgc2NhbGVzID0gW107CiAgICAgICAgICAgIHRoaXMuX2F0dHJCaW5kaW5ncy5lYWNoKGZ1bmN0aW9uIChiaW5kaW5nLCBhdHRyKSB7CiAgICAgICAgICAgICAgICB2YXIgc2NhbGUgPSBiaW5kaW5nLnNjYWxlOwogICAgICAgICAgICAgICAgaWYgKHNjYWxlICE9IG51bGwgJiYgc2NhbGVzLmluZGV4T2Yoc2NhbGUpID09PSAtMSkgewogICAgICAgICAgICAgICAgICAgIHNjYWxlcy5wdXNoKHNjYWxlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHRoaXMuX3Byb3BlcnR5QmluZGluZ3MuZWFjaChmdW5jdGlvbiAoYmluZGluZywgcHJvcGVydHkpIHsKICAgICAgICAgICAgICAgIHZhciBzY2FsZSA9IGJpbmRpbmcuc2NhbGU7CiAgICAgICAgICAgICAgICBpZiAoc2NhbGUgIT0gbnVsbCAmJiBzY2FsZXMuaW5kZXhPZihzY2FsZSkgPT09IC0xKSB7CiAgICAgICAgICAgICAgICAgICAgc2NhbGVzLnB1c2goc2NhbGUpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICAgICAgcmV0dXJuIHNjYWxlczsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIFVwZGF0ZXMgdGhlIGV4dGVudHMgYXNzb2NpYXRlZCB3aXRoIGVhY2ggYXR0cmlidXRlLCB0aGVuIGF1dG9kb21haW5zIGFsbCBzY2FsZXMgdGhlIFBsb3QgdXNlcy4KICAgICAgICAgKi8KICAgICAgICBQbG90LnByb3RvdHlwZS5fdXBkYXRlRXh0ZW50cyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgdGhpcy5fcmVzZXRFbnRpdHlTdG9yZSgpOwogICAgICAgICAgICB0aGlzLl9zY2FsZXMoKS5mb3JFYWNoKGZ1bmN0aW9uIChzY2FsZSkgeyByZXR1cm4gc2NhbGUuYWRkSW5jbHVkZWRWYWx1ZXNQcm92aWRlcihfdGhpcy5faW5jbHVkZWRWYWx1ZXNQcm92aWRlcik7IH0pOwogICAgICAgIH07CiAgICAgICAgUGxvdC5wcm90b3R5cGUuX2ZpbHRlckZvclByb3BlcnR5ID0gZnVuY3Rpb24gKHByb3BlcnR5KSB7CiAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgIH07CiAgICAgICAgUGxvdC5wcm90b3R5cGUuZ2V0RXh0ZW50c0ZvckF0dHIgPSBmdW5jdGlvbiAoYXR0cikgewogICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwogICAgICAgICAgICBpZiAodGhpcy5fYXR0ckV4dGVudHNbYXR0cl0gPT0gbnVsbCkgewogICAgICAgICAgICAgICAgdmFyIHRodW5rID0gbWVtb2l6ZS5tZW1UaHVuayhmdW5jdGlvbiAoKSB7IHJldHVybiBfdGhpcy5kYXRhc2V0cygpOyB9LCBmdW5jdGlvbiAoKSB7IHJldHVybiBfdGhpcy5fYXR0ckJpbmRpbmdzLmdldChhdHRyKTsgfSwgZnVuY3Rpb24gKGRhdGFzZXRzLCBhY2NTY2FsZUJpbmRpbmcpIHsKICAgICAgICAgICAgICAgICAgICBpZiAoYWNjU2NhbGVCaW5kaW5nID09IG51bGwgfHwgYWNjU2NhbGVCaW5kaW5nLmFjY2Vzc29yID09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHJldHVybiBkYXRhc2V0cy5tYXAoZnVuY3Rpb24gKGRhdGFzZXQpIHsgcmV0dXJuIGNvbXB1dGVFeHRlbnQoZGF0YXNldCwgYWNjU2NhbGVCaW5kaW5nLCBudWxsKTsgfSk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIHRoaXMuX2F0dHJFeHRlbnRzW2F0dHJdID0gdGh1bms7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2F0dHJFeHRlbnRzW2F0dHJdKCk7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBPdmVycmlkZSBpbiBzdWJjbGFzcyB0byBhZGQgc3BlY2lhbCBleHRlbnRzLCBzdWNoIGFz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4dGVudHNbcHJvcGVydHldKCk7CiAgICAgICAgfTsKICAgICAgICBQbG90LnByb3RvdHlwZS5faW5jbHVkZWRWYWx1ZXNGb3JTY2FsZSA9IGZ1bmN0aW9uIChzY2FsZSwgaWdub3JlQXR0YWNoU3RhdGUpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgaWYgKCF0aGlzLl9pc0FuY2hvcmVkICYmICFpZ25vcmVBdHRhY2hTdGF0ZSkgewogICAgICAgICAgICAgICAgcmV0dXJuIFtdOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciBpbmNsdWRlZFZhbHVlcyA9IFtdOwogICAgICAgICAgICB0aGlzLl9hdHRyQmluZGluZ3MuZWFjaChmdW5jdGlvbiAoYmluZGluZywgYXR0cikgewogICAgICAgICAgICAgICAgaWYgKGJpbmRpbmcuc2NhbGUgPT09IHNjYWxlKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIGV4dGVudHMgPSBfdGhpcy5nZXRFeHRlbnRzRm9yQXR0cihhdHRyKTsKICAgICAgICAgICAgICAgICAgICBpZiAoZXh0ZW50cyAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGluY2x1ZGVkVmFsdWVzID0gaW5jbHVkZWRWYWx1ZXMuY29uY2F0KGQzLm1lcmdlKGV4dGVudHMpKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICB0aGlzLl9wcm9wZXJ0eUJpbmRpbmdzLmVhY2goZnVuY3Rpb24gKGJpbmRpbmcsIHByb3BlcnR5KSB7CiAgICAgICAgICAgICAgICBpZiAoYmluZGluZy5zY2FsZSA9PT0gc2NhbGUpIHsKICAgICAgICAgICAgICAgICAgICB2YXIgZXh0ZW50cyA9IF90aGlzLmdldEV4dGVudHNGb3JQcm9wZXJ0eShwcm9wZXJ0eSk7CiAgICAgICAgICAgICAgICAgICAgaWYgKGV4dGVudHMgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgICAgICBpbmNsdWRlZFZhbHVlcyA9IGluY2x1ZGVkVmFsdWVzLmNvbmNhdChkMy5tZXJnZShleHRlbnRzKSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICAgICAgcmV0dXJuIGluY2x1ZGVkVmFsdWVzOwogICAgICAgIH07CiAgICAgICAgUGxvdC5wcm90b3R5cGUuYW5pbWF0b3IgPSBmdW5jdGlvbiAoYW5pbWF0b3JLZXksIGFuaW1hdG9yKSB7CiAgICAgICAgICAgIGlmIChhbmltYXRvciA9PT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fYW5pbWF0b3JzW2FuaW1hdG9yS2V5XTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuX2FuaW1hdG9yc1thbmltYXRvcktleV0gPSBhbmltYXRvcjsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBQbG90LnByb3RvdHlwZS5yZW5kZXJlciA9IGZ1bmN0aW9uIChyZW5kZXJlcikgewogICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwogICAgICAgICAgICBpZiAocmVuZGVyZXIgPT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2NhbnZhcyA9PSBudWxsID8gInN2ZyIgOiAiY2FudmFzIjsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIGlmICh0aGlzLl9jYW52YXMgPT0gbnVsbCAmJiByZW5kZXJlciA9PT0gImNhbnZhcyIpIHsKICAgICAgICAgICAgICAgICAgICAvLyBjb25zdHJ1Y3QgdGhlIGNhbnZhcywgcmVtb3ZlIGRyYXdlcidzIHJlbmRlckFyZWFzLCBzZXQgZHJhd2VyJ3MgY2FudmFzCiAgICAgICAgICAgICAgICAgICAgdGhpcy5fY2FudmFzID0gZDMuc2VsZWN0KGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoImNhbnZhcyIpKS5jbGFzc2VkKCJwbG90LWNhbnZhcyIsIHRydWUpOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX2J1ZmZlckNhbnZhcyA9IGQzLnNlbGVjdChkb2N1bWVudC5jcmVhdGVFbGVtZW50KCJjYW52YXMiKSk7CiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuZWxlbWVudCgpICE9IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fYXBwZW5kQ2FudmFzTm9kZSgpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB0aGlzLl9kYXRhc2V0VG9EcmF3ZXIuZm9yRWFjaChmdW5jdGlvbiAoZHJhd2VyKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGRyYXdlci51c2VDYW52YXMoX3RoaXMuX2NhbnZhcyk7CiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5yZW5kZXIoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKHRoaXMuX2NhbnZhcyAhPSBudWxsICYmIHJlbmRlcmVyID09ICJzdmciKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fY2FudmFzLnJlbW92ZSgpOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX2NhbnZhcyA9IG51bGw7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fYnVmZmVyQ2FudmFzID0gbnVsbDsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9kYXRhc2V0VG9EcmF3ZXIuZm9yRWFjaChmdW5jdGlvbiAoZHJhd2VyKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGRyYXdlci51c2VTVkcoX3RoaXMuX3JlbmRlckFyZWEpOwogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgIHRoaXMucmVuZGVyKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogQWRkcyBhIERhdGFzZXQgdG8gdGhlIFBsb3QuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0ge0RhdGFzZXR9IGRhdGFzZXQKICAgICAgICAgKiBAcmV0dXJucyB7UGxvdH0gVGhlIGNhbGxpbmcgUGxvdC4KICAgICAgICAgKi8KICAgICAgICBQbG90LnByb3RvdHlwZS5hZGREYXRhc2V0ID0gZnVuY3Rpb24gKGRhdGFzZXQpIHsKICAgICAgICAgICAgdGhpcy5fYWRkRGF0YXNldChkYXRhc2V0KTsKICAgICAgICAgICAgdGhpcy5fb25EYXRhc2V0VXBkYXRlKCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgUGxvdC5wcm90b3R5cGUuX2FkZERhdGFzZXQgPSBmdW5jdGlvbiAoZGF0YXNldCkgewogICAgICAgICAgICB0aGlzLl9yZW1vdmVEYXRhc2V0KGRhdGFzZXQpOwogICAgICAgICAgICB2YXIgZHJhd2VyID0gdGhpcy5fY3JlYXRlRHJhd2VyKGRhdGFzZXQpOwogICAgICAgICAgICB0aGlzLl9kYXRhc2V0VG9EcmF3ZXIuc2V0KGRhdGFzZXQsIGRyYXdlcik7CiAgICAgICAgICAgIGlmICh0aGlzLl9pc1NldHVwKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9jcmVhdGVOb2Rlc0ZvckRhdGFzZXQoZGF0YXNldCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZGF0YXNldC5vblVwZGF0ZSh0aGlzLl9vbkRhdGFzZXRVcGRhdGVDYWxsYmFjayk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogUmVtb3ZlcyBhIERhdGFzZXQgZnJvbSB0aGUgUGxvdC4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7RGF0YXNldH0gZGF0YXNldAogICAgICAgICAqIEByZXR1cm5zIHtQbG90fSBUaGUgY2FsbGluZyBQbG90LgogICAgICAgICAqLwogICAgICAgIFBsb3QucHJvdG90eXBlLnJlbW92ZURhdGFzZXQgPSBmdW5jdGlvbiAoZGF0YXNldCkgewogICAgICAgICAgICB0aGlzLl9yZW1vdmVEYXRhc2V0KGRhdGFzZXQpOwogICAgICAgICAgICB0aGlzLl9vbkRhdGFzZXRVcGRhdGUoKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBQbG90LnByb3RvdHlwZS5fcmVtb3ZlRGF0YXNldCA9IGZ1bmN0aW9uIChkYXRhc2V0KSB7CiAgICAgICAgICAgIGlmICh0aGlzLmRhdGFzZXRzKCkuaW5kZXhPZihkYXRhc2V0KSA9PT0gLTEpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX3JlbW92ZURhdGFzZXROb2RlcyhkYXRhc2V0KTsKICAgICAgICAgICAgZGF0YXNldC5vZmZVcGRhdGUodGhpcy5fb25EYXRhc2V0VXBkYXRlQ2FsbGJhY2spOwogICAgICAgICAgICB0aGlzLl9kYXRhc2V0VG9EcmF3ZXIuZGVsZXRlKGRhdGFzZXQpOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIFBsb3QucHJvdG90eXBlLl9yZW1vdmVEYXRhc2V0Tm9kZXMgPSBmdW5jdGlvbiAoZGF0YXNldCkgewogICAgICAgICAgICB2YXIgZHJhd2VyID0gdGhpcy5fZGF0YXNldFRvRHJhd2VyLmdldChkYXRhc2V0KTsKICAgICAgICAgICAgZHJhd2VyLnJlbW92ZSgpOwogICAgICAgIH07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gICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBfYnVpbGRMaWdodHdlaWdodFBsb3RFbnRpdGllcyBjb25zdHVjdHMge0xpZ2h0d2VpZ2h0UGxvdEVudGl0eVtdfSBmcm9tCiAgICAgICAgICogYWxsIHRoZSBlbnRpdGllcyBpbiB0aGUgcGxvdAogICAgICAgICAqIEBwYXJhbSB7RGF0YXNldFtdfSBbZGF0YXNldHNdIC0gZGF0YXNldHMgY29tcHJpc2luZyB0aGlzIHBsb3QKICAgICAgICAgKi8KICAgICAgICBQbG90LnByb3RvdHlwZS5fYnVpbGRMaWdodHdlaWdodFBsb3RFbnRpdGllcyA9IGZ1bmN0aW9uIChkYXRhc2V0cykgewogICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwogICAgICAgICAgICB2YXIgbGlnaHR3ZWlnaHRQbG90RW50aXRpZXMgPSBbXTsKICAgICAgICAgICAgZGF0YXNldHMuZm9yRWFjaChmdW5jdGlvbiAoZGF0YXNldCwgZGF0YXNldEluZGV4KSB7CiAgICAgICAgICAgICAgICB2YXIgZHJhd2VyID0gX3RoaXMuX2RhdGFzZXRUb0RyYXdlci5nZXQoZGF0YXNldCk7CiAgICAgICAgICAgICAgICB2YXIgdmFsaWREYXR1bUluZGV4ID0gMDsKICAgICAgICAgICAgICAgIHZhciBkYXRhID0gZGF0YXNldC5kYXRhKCk7CiAgICAgICAgICAgICAgICB2YXIgZGF0YUxlbiA9IGRhdGEubGVuZ3RoOwogICAgICAgICAgICAgICAgdmFyIF9sb29wXzEgPSBmdW5jdGlvbiAoZGF0dW1JbmRleCkgewogICAgICAgICAgICAgICAgICAgIHZhciBkYXR1bSA9IGRhdGFbZGF0dW1JbmRleF07CiAgICAgICAgICAgICAgICAgICAgdmFyIHBvc2l0aW9uID0gX3RoaXMuX3BpeGVsUG9pbnQoZGF0dW0sIGRhdHVtSW5kZXgsIGRhdGFzZXQpOwogICAgICAgICAgICAgICAgICAgIGlmICh1dGlscyQxLk1hdGguaXNOYU4ocG9zaXRpb24ueCkgfHwgdXRpbHMkMS5NYXRoLmlzTmFOKHBvc2l0aW9uLnkpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAiY29udGludWUiOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB2YXIgcGxvdCA9IF90aGlzOwogICAgICAgICAgICAgICAgICAgIGxpZ2h0d2VpZ2h0UGxvdEVudGl0aWVzLnB1c2goewogICAgICAgICAgICAgICAgICAgICAgICBkYXR1bTogZGF0dW0sCiAgICAgICAgICAgICAgICAgICAgICAgIGdldCBwb3NpdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIG9ubHkgY2FsY3VsYXRlIHBvc2l0aW9uIHdoZW4gbmVlZGluZyB0byBpbXByb3ZlIHBhbiB6b29tIHBlcmZvcm1hbmNlICMzMTU5CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcGxvdC5fcGl4ZWxQb2ludC5jYWxsKHBsb3QsIGRhdHVtLCBkYXR1bUluZGV4LCBkYXRhc2V0KTsKICAgICAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXg6IGRhdHVtSW5kZXgsCiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFzZXQ6IGRhdGFzZXQsCiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFzZXRJbmRleDogZGF0YXNldEluZGV4LAogICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnQ6IF90aGlzLAogICAgICAgICAgICAgICAgICAgICAgICBkcmF3ZXI6IGRyYXdlciwKICAgICAgICAgICAgICAgICAgICAgICAgdmFsaWREYXR1bUluZGV4OiB2YWxpZERhdHVtSW5kZXgsCiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICAgICAgdmFsaWREYXR1bUluZGV4Kys7CiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgZm9yICh2Y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ICAgICAgICAgIHZhciBjYW52YXMgPSB0aGlzLl9jYW52YXMubm9kZSgpOwogICAgICAgICAgICAgICAgdmFyIGNvbnRleHRfMSA9IGNhbnZhcy5nZXRDb250ZXh0KCIyZCIpOwogICAgICAgICAgICAgICAgY29udGV4dF8xLmNsZWFyUmVjdCgwLCAwLCBjYW52YXMuY2xpZW50V2lkdGgsIGNhbnZhcy5jbGllbnRIZWlnaHQpOwogICAgICAgICAgICAgICAgdGhpcy5fYnVmZmVyQ2FudmFzVmFsaWQgPSBmYWxzZTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLmRhdGFzZXRzKCkuZm9yRWFjaChmdW5jdGlvbiAoZHMsIGkpIHsKICAgICAgICAgICAgICAgIHZhciBhcHBsaWVkRHJhd1N0ZXBzID0gUGxvdC5hcHBseURyYXdTdGVwcyhkcmF3U3RlcHMsIGRzKTsKICAgICAgICAgICAgICAgIGRyYXdlcnNbaV0uZHJhdyhkYXRhVG9EcmF3LmdldChkcyksIGFwcGxpZWREcmF3U3RlcHMpOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdmFyIHRpbWVzID0gdGhpcy5kYXRhc2V0cygpLm1hcChmdW5jdGlvbiAoZHMsIGkpIHsgcmV0dXJuIFBsb3QuZ2V0VG90YWxEcmF3VGltZShkYXRhVG9EcmF3LmdldChkcyksIGRyYXdTdGVwcyk7IH0pOwogICAgICAgICAgICB2YXIgbWF4VGltZSA9IHV0aWxzJDEuTWF0aC5tYXgodGltZXMsIDApOwogICAgICAgICAgICB0aGlzLl9hZGRpdGlvbmFsUGFpbnQobWF4VGltZSk7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBSZXRyaWV2ZXMgdGhlIGRyYXduIHZpc3VhbCBlbGVtZW50cyBmb3IgdGhlIHNwZWNpZmllZCBEYXRhc2V0cyBhcyBhIGQzIFNlbGVjdGlvbi4KICAgICAgICAgKiBOb3Qgc3VwcG9ydGVkIG9uIGNhbnZhcyByZW5kZXJlci4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7RGF0YXNldFtdfSBbZGF0YXNldHNdIFRoZSBEYXRhc2V0cyB0byByZXRyaWV2ZSB0aGUgU2VsZWN0aW9ucyBmb3IuCiAgICAgICAgICogICBJZiBub3QgcHJvdmlkZWQsIFNlbGVjdGlvbnMgd2lsbCBiZSByZXRyaWV2ZWQgZm9yIGFsbCBEYXRhc2V0cyBvbiB0aGUgUGxvdC4KICAgICAgICAgKiBAcmV0dXJucyB7ZDMuU2VsZWN0aW9ufQogICAgICAgICAqLwogICAgICAgIFBsb3QucHJvdG90eXBlLnNlbGVjdGlvbnMgPSBmdW5jdGlvbiAoZGF0YXNldHMpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgaWYgKGRhdGFzZXRzID09PSB2b2lkIDApIHsgZGF0YXNldHMgPSB0aGlzLmRhdGFzZXRzKCk7IH0KICAgICAgICAgICAgaWYgKHRoaXMucmVuZGVyZXIoKSA9PT0gImNhbnZhcyIpIHsKICAgICAgICAgICAgICAgIC8vIHJldHVybiBlbXB0eSBzZWxlY3Rpb24KICAgICAgICAgICAgICAgIHJldHVybiBkMy5zZWxlY3RBbGwoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHZhciBzZWxlY3Rpb25zXzEgPSBbXTsKICAgICAgICAgICAgICAgIGRhdGFzZXRzLmZvckVhY2goZnVuY3Rpb24gKGRhdGFzZXQpIHsKICAgICAgICAgICAgICAgICAgICB2YXIgZHJhd2VyID0gX3RoaXMuX2RhdGFzZXRUb0RyYXdlci5nZXQoZGF0YXNldCk7CiAgICAgICAgICAgICAgICAgICAgaWYgKGRyYXdlciA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgdmFyIHZpc3VhbFByaW1pdGl2ZXMgPSBkcmF3ZXIuZ2V0VmlzdWFsUHJpbWl0aXZlcygpOwogICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbnNfMS5wdXNoLmFwcGx5KHNlbGVjdGlvbnNfMSwgdmlzdWFsUHJpbWl0aXZlcyk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIHJldHVybiBkMy5zZWxlY3RBbGwoc2VsZWN0aW9uc18xKTsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogR2V0cyB0aGUgRW50aXRpZXMgYXNzb2NpYXRlZCB3aXRoIHRoZSBzcGVjaWZpZWQgRGF0YXNldHMuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0ge0RhdGFzZXRbXX0gZGF0YXNldHMgVGhlIERhdGFzZXRzIHRvIHJldHJpZXZlIHRoZSBFbnRpdGllcyBmb3IuCiAgICAgICAgICogICBJZiBub3QgcHJvdmlkZWQsIHJldHVybnMgZGVmYXVsdHMgdG8gYWxsIERhdGFzZXRzIG9uIHRoZSBQbG90LgogICAgICAgICAqIEByZXR1cm4ge1Bsb3RzLlBsb3RFbnRpdHlbXX0KICAgICAgICAgKi8KICAgICAgICBQbG90LnByb3RvdHlwZS5lbnRpdGllcyA9IGZ1bmN0aW9uIChkYXRhc2V0cykgewogICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwogICAgICAgICAgICByZXR1cm4gdGhpcy5fZ2V0RW50aXR5U3RvcmUoZGF0YXNldHMpLmVudGl0aWVzKCkubWFwKGZ1bmN0aW9uIChlbnRpdHkpIHsgcmV0dXJuIF90aGlzLl9saWdodHdlaWdodFBsb3RFbnRpdHlUb1Bsb3RFbnRpdHkoZW50aXR5KTsgfSk7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIHRoZSBgUGxvdHMuUGxvdEVudGl0eWBzIGluIHRoZSBwbG90LCB3aGVyZWJ5IHRoZQogICAgICAgICAqIGBQbG90cy5JTGlnaHR3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ygpKSwgZW50aXR5Qm91bmRzRmFjdG9yeSwgdGhpcy5fbG9jYWxPcmlnaW5Cb3VuZHMoKSk7CiAgICAgICAgICAgICAgICB0aGlzLl9jYWNoZWRFbnRpdHlTdG9yZSA9IGVudGl0eVN0b3JlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9jYWNoZWRFbnRpdHlTdG9yZTsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIF9sb2NhbE9yaWdpbkJvdW5kcyByZXR1cm5zIGJvdW5kcyBvZiB0aGUgcGxvdCBmcm9tIGl0cyBvd24gb3JpZ2luLCByYXRoZXIgdGhhbiBmcm9tIHBhcmVudCBvcmlnaW4gKGFzIHByb3ZpZGVkIGJ5IGB0aGlzLmJvdW5kcygpYCkKICAgICAgICAgKgogICAgICAgICAqIEByZXR1cm4ge0JvdW5kc30KICAgICAgICAgKi8KICAgICAgICBQbG90LnByb3RvdHlwZS5fbG9jYWxPcmlnaW5Cb3VuZHMgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICB0b3BMZWZ0OiB7IHg6IDAsIHk6IDAgfSwKICAgICAgICAgICAgICAgIGJvdHRvbVJpZ2h0OiB7IHg6IHRoaXMud2lkdGgoKSwgeTogdGhpcy5oZWlnaHQoKSB9LAogICAgICAgICAgICB9OwogICAgICAgIH07CiAgICAgICAgUGxvdC5wcm90b3R5cGUuX2VudGl0eUJvdW5kcyA9IGZ1bmN0aW9uIChlbnRpdHkpIHsKICAgICAgICAgICAgdmFyIGRhdHVtID0gZW50aXR5LmRhdHVtLCBpbmRleCA9IGVudGl0eS5pbmRleCwgZGF0YXNldCA9IGVudGl0eS5kYXRhc2V0OwogICAgICAgICAgICB2YXIgX2EgPSB0aGlzLl9waXhlbFBvaW50KGRhdHVtLCBpbmRleCwgZGF0YXNldCksIHggPSBfYS54LCB5ID0gX2EueTsKICAgICAgICAgICAgcmV0dXJuIHsgeDogeCwgeTogeSwgd2lkdGg6IDAsIGhlaWdodDogMCB9OwogICAgICAgIH07CiAgICAgICAgUGxvdC5wcm90b3R5cGUuX2xpZ2h0d2VpZ2h0UGxvdEVudGl0eVRvUGxvdEVudGl0eSA9IGZ1bmN0aW9uIChlbnRpdHkpIHsKICAgICAgICAgICAgdmFyIHBsb3RFbnRpdHkgPSB7CiAgICAgICAgICAgICAgICBib3VuZHM6IHRoaXMuX2VudGl0eUJvdW5kcyhlbnRpdHkpLAogICAgICAgICAgICAgICAgY29tcG9uZW50OiBlbnRpdHkuY29tcG9uZW50LAogICAgICAgICAgICAgICAgZGF0YXNldDogZW50aXR5LmRhdGFzZXQsCiAgICAgICAgICAgICAgICBkYXRhc2V0SW5kZXg6IGVudGl0eS5kYXRhc2V0SW5kZXgsCiAgICAgICAgICAgICAgICBkYXR1bTogZW50aXR5LmRhdHVtLAogICAgICAgICAgICAgICAgaW5kZXg6IGVudGl0eS5pbmRleCwKICAgICAgICAgICAgICAgIHBvc2l0aW9uOiBlbnRpdHkucG9zaXRpb24sCiAgICAgICAgICAgICAgICBzZWxlY3Rpb246IGQzLnNlbGVjdChlbnRpdHkuZHJhd2VyLmdldFZpc3VhbFByaW1pdGl2ZUF0SW5kZXgoZW50aXR5LnZhbGlkRGF0dW1JbmRleCkpLAogICAgICAgICAgICB9OwogICAgICAgICAgICByZXR1cm4gcGxvdEVudGl0eTsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIEdldHMgdGhlIFBsb3RFbnRpdGllcyBhdCBhIHBhcnRpY3VsYXIgUG9pbnQuCiAgICAgICAgICoKICAgICAgICAgKiBFYWNoIHBsb3QgdHlwZSBkZXRlcm1pbmVzIGhvdyB0byBsb2NhdGUgZW50aXRpZXMgYXQgb3IgbmVhciB0aGUgcXVlcnkKICAgICAgICAgKiBwb2ludC4gRm9yIGV4YW1wbGUsIGxpbmUgYW5kIGFyZWEgY2hhcnRzIHdpbGwgcmV0dXJuIHRoZSBuZWFyZXN0IGVudGl0eSwKICAgICAgICAgKiBidXQgYmFyIGNoYXJ0cyB3aWxsIG9ubHkgcmV0dXJuIHRoZSBlbnRpdGllcyB0aGF0IGZ1bGx5IGNvbnRhaW4gdGhlIHF1ZXJ5CiAgICAgICAgICogcG9pbnQuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0ge1BvaW50fSBwb2ludCBUaGUgcG9pbnQgdG8gcXVlcnkuCiAgICAgICAgICogQHJldHVybnMge1Bsb3RFbnRpdHlbXX0gVGhlIFBsb3RFbnRpdGllcyBhdCB0aGUgcGFydGljdWxhciBwb2ludAogICAgICAgICAqLwogICAgICAgIFBsb3QucHJvdG90eXBlLmVudGl0aWVzQXQgPSBmdW5jdGlvbiAocG9pbnQpIHsKICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCJwbG90cyBtdXN0IGltcGxlbWVudCBlbnRpdGllc0F0Iik7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBSZXR1cm5zIHRoZSB7UGxvdHMuUGxvdEVudGl0eX0gbmVhcmVzdCB0byB0aGUgcXVlcnkgcG9pbnQsCiAgICAgICAgICogb3IgdW5kZWZpbmVkIGlmIG5vIHtQbG90cy5QbG90RW50aXR5fSBjYW4gYmUgZm91bmQuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0ge1BvaW50fSBxdWVyeVBvaW50CiAgICAgICAgICogQHJldHVybnMge1Bsb3RzLlBsb3RFbnRpdHl9IFRoZSBuZWFyZXN0IFBsb3RFbnRpdHksIG9yIHVuZGVmaW5lZCBpZiBubyB7UGxvdHMuUGxvdEVudGl0eX0gY2FuIGJlIGZvdW5kLgogICAgICAgICAqLwogICAgICAgIFBsb3QucHJvdG90eXBlLmVudGl0eU5lYXJlc3QgPSBmdW5jdGlvbiAocXVlcnlQb2ludCkgewogICAgICAgICAgICB2YXIgbmVhcmVzdCA9IHRoaXMuX2dldEVudGl0eVN0b3JlKCkuZW50aXR5TmVhcmVzdChxdWVyeVBvaW50KTsKICAgICAgICAgICAgcmV0dXJuIG5lYXJlc3QgPT09IHVuZGVmaW5lZCA/IHVuZGVmaW5lZCA6IHRoaXMuX2xpZ2h0d2VpZ2h0UGxvdEVudGl0eVRvUGxvdEVudGl0eShuZWFyZXN0KTsKICAgICAgICB9OwogICAgICAgIFBsb3QucHJvdG90eXBlLmVudGl0aWVzSW4gPSBmdW5jdGlvbiAoeFJhbmdlT3JCb3VuZHMsIHlSYW5nZSkgewogICAgICAgICAgICB2YXIgcXVlcnlCb3VuZHM7CiAgICAgICAgICAgIGlmICh5UmFuZ2UgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgdmFyIGJvdW5kcyA9IHhSYW5nZU9yQm91bmRzOwogICAgICAgICAgICAgICAgcXVlcnlCb3VuZHMgPSB7CiAgICAgICAgICAgICAgICAgICAgeDogYm91bmRzLnRvcExlZnQueCwKICAgICAgICAgICAgICAgICAgICB5OiBib3VuZHMudG9wTGVmdC55LAogICAgICAgICAgICAgICAgICAgIHdpZHRoOiBib3VuZHMuYm90dG9tUmlnaHQueCAtIGJvdW5kcy50b3BMZWZ0LngsCiAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiBib3VuZHMuYm90dG9tUmlnaHQueSAtIGJvdW5kcy50b3BMZWZ0LnksCiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdmFyIHhSYW5nZSA9IHhSYW5nZU9yQm91bmRzOwogICAgICAgICAgICAgICAgcXVlcnlCb3VuZHMgPSB7CiAgICAgICAgICAgICAgICAgICAgeDogeFJhbmdlLm1pbiwKICAgICAgICAgICAgICAgICAgICB5OiB5UmFuZ2UubWluLAogICAgICAgICAgICAgICAgICAgIHdpZHRoOiB4UmFuZ2UubWF4IC0geFJhbmdlLm1pbiwKICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IHlSYW5nZS5tYXggLSB5UmFuZ2UubWluLAogICAgICAgICAgICAgIC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Zyb20gdGhlIG9yaWdpbiBvZiB0aGlzIHBsb3QuCiAgICAgICAgICovCiAgICAgICAgUGxvdC5wcm90b3R5cGUuZW50aXRpZXNJblhCb3VuZHMgPSBmdW5jdGlvbiAocXVlcnlCb3VuZHMpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgdmFyIGZvdW5kID0gdGhpcy5fZ2V0RW50aXR5U3RvcmUoKS5lbnRpdGllc0luWEJvdW5kcyhxdWVyeUJvdW5kcyk7CiAgICAgICAgICAgIGlmICghZm91bmQpIHsKICAgICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIGZvdW5kLm1hcChmdW5jdGlvbiAoZW50aXR5KSB7IHJldHVybiBfdGhpcy5fbGlnaHR3ZWlnaHRQbG90RW50aXR5VG9QbG90RW50aXR5KGVudGl0eSk7IH0pOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0dXJucyB0aGUgZW50aXRlcyB3aG9zZSBib3VuZGluZyBib3hlcyBvdmVybGFwIHRoZSBgcXVlcnlCb3VuZHNgCiAgICAgICAgICogcGFyYW1ldGVyIG9uIHRoZSB5LWF4aXMuCiAgICAgICAgICoKICAgICAgICAgKiBgcXVlcnlCb3VuZHNgIGFyZSBpbiBwaXhlbCBzcGFjZSwgbWVhc3VyZWQgZnJvbSB0aGUgb3JpZ2luIG9mIHRoaXMgcGxvdC4KICAgICAgICAgKi8KICAgICAgICBQbG90LnByb3RvdHlwZS5lbnRpdGllc0luWUJvdW5kcyA9IGZ1bmN0aW9uIChxdWVyeUJvdW5kcykgewogICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwogICAgICAgICAgICB2YXIgZm91bmQgPSB0aGlzLl9nZXRFbnRpdHlTdG9yZSgpLmVudGl0aWVzSW5ZQm91bmRzKHF1ZXJ5Qm91bmRzKTsKICAgICAgICAgICAgaWYgKCFmb3VuZCk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lMgPSBmYWxzZTsKICAgICAgICBQbG90Ll9BTklNQVRJT05fTUFYX0RVUkFUSU9OID0gNjAwOwogICAgICAgIHJldHVybiBQbG90OwogICAgfShjb21wb25lbnQuQ29tcG9uZW50KSk7CiAgICBleHBvcnRzLlBsb3QgPSBQbG90OwogICAgZnVuY3Rpb24gY29tcHV0ZUV4dGVudChkYXRhc2V0LCBhY2NTY2FsZUJpbmRpbmcsIGZpbHRlcikgewogICAgICAgIHZhciBhY2Nlc3NvciA9IGFjY1NjYWxlQmluZGluZy5hY2Nlc3NvcjsKICAgICAgICB2YXIgc2NhbGUgPSBhY2NTY2FsZUJpbmRpbmcuc2NhbGU7CiAgICAgICAgaWYgKHNjYWxlID09IG51bGwpIHsKICAgICAgICAgICAgcmV0dXJuIFtdOwogICAgICAgIH0KICAgICAgICB2YXIgZGF0YSA9IGRhdGFzZXQuZGF0YSgpOwogICAgICAgIGlmIChmaWx0ZXIgIT0gbnVsbCkgewogICAgICAgICAgICBkYXRhID0gZGF0YS5maWx0ZXIoZnVuY3Rpb24gKGQsIGkpIHsgcmV0dXJuIGZpbHRlcihkLCBpLCBkYXRhc2V0KTsgfSk7CiAgICAgICAgfQogICAgICAgIHZhciBhcHBsaWVkQWNjZXNzb3IgPSBmdW5jdGlvbiAoZCwgaSkgeyByZXR1cm4gYWNjZXNzb3IoZCwgaSwgZGF0YXNldCk7IH07CiAgICAgICAgdmFyIG1hcHBlZERhdGEgPSBkYXRhLm1hcChhcHBsaWVkQWNjZXNzb3IpOwogICAgICAgIHJldHVybiBzY2FsZS5leHRlbnRPZlZhbHVlcyhtYXBwZWREYXRhKTsKICAgIH0KICAgIH0pOwoKICAgIHZhciBwbG90R3JvdXAgPSBjcmVhdGVDb21tb25qc01vZHVsZShmdW5jdGlvbiAobW9kdWxlLCBleHBvcnRzKSB7CiAgICAvKioKICAgICAqIENvcHlyaWdodCAyMDE0LXByZXNlbnQgUGFsYW50aXIgVGVjaG5vbG9naWVzCiAgICAgKiBAbGljZW5zZSBNSVQKICAgICAqLwogICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsKCgoKCiAgICB2YXIgUGxvdEdyb3VwID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikgewogICAgICAgIHRzbGliX2VzNi5fX2V4dGVuZHMoUGxvdEdyb3VwLCBfc3VwZXIpOwogICAgICAgIGZ1bmN0aW9uIFBsb3RHcm91cCgpIHsKICAgICAgICAgICAgcmV0dXJuIF9zdXBlciAhPT0gbnVsbCAmJiBfc3VwZXIuYXBwbHkodGhpcywgYXJndW1lbnRzKSB8fCB0aGlzOwogICAgICAgIH0KICAgICAgICBQbG90R3JvdXAucHJvdG90eXBlLmVudGl0eU5lYXJlc3QgPSBmdW5jdGlvbiAocG9pbnQpIHsKICAgICAgICAgICAgdmFyIGNsb3Nlc3RQbG90RW50aXR5OwogICAgICAgICAgICB2YXIgbWluRGlzdFNxdWFyZWQgPSBJbmZpbml0eTsKICAgICAgICAgICAgdGhpcy5jb21wb25lbnRzKCkuZm9yRWFjaChmdW5jdGlvbiAocGxvdENvbXBvbmVudCkgewogICAgICAgICAgICAgICAgLy8gd2Uga25vdyBpdCdzIGEgUGxvdCBzaW5jZSAuYXBwZW5kKCkgdGhyb3dzIGEgcnVudGltZSBlcnJvciBvdGhlcndpc2UKICAgICAgICAgICAgICAgIHZhciBwbG90ID0gcGxvdENvbXBvbmVudDsKICAgICAgICAgICAgICAgIHZhciBjYW5kaWRhdGVQbG90RW50aXR5ID0gcGxvdC5lbnRpdHlOZWFyZXN0KHBvaW50KTsKICAgICAgICAgICAgICAgIGlmIChjYW5kaWRhdGVQbG90RW50aXR5ID09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB2YXIgZGlzdFNxdWFyZWQgPSB1dGlscyQxLk1hdGguZGlzdGFuY2VTcXVhcmVkKGNhbmRpZGF0ZVBsb3RFbnRpdHkucG9zaXRpb24sIHBvaW50KTsKICAgICAgICAgICAgICAgIGlmIChkaXN0U3F1YXJlZCA8PSBtaW5EaXN0U3F1YXJlZCkgewogICAgICAgICAgICAgICAgICAgIG1pbkRpc3RTcXVhcmVkID0gZGlzdFNxdWFyZWQ7CiAgICAgICAgICAgICAgICAgICAgY2xvc2VzdFBsb3RFbnRpdHkgPSBjYW5kaWRhdGVQbG90RW50aXR5OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICAgICAgcmV0dXJuIGNsb3Nlc3RQbG90RW50aXR5OwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogQWRkcyBhIFBsb3QgdG8gdGhpcyBQbG90IEdyb3VwLgogICAgICAgICAqIFRoZSBhZGRlZCBQbG90IHdpbGwgYmUgcmVuZGVyZWQgYWJvdmUgUGxvdHMgYWxyZWFkeSBpbiB0aGUgR3JvdXAuCiAgICAgICAgICovCiAgICAgICAgUGxvdEdyb3VwLnByb3RvdHlwZS5hcHBlbmQgPSBmdW5jdGlvbiAocGxvdCQxKSB7CiAgICAgICAgICAgIGlmIChwbG90JDEgIT0gbnVsbCAmJiAhKHBsb3QkMSBpbnN0YW5jZW9mIHBsb3QuUGxvdCkpIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigiUGxvdCBHcm91cCBvbmx5IGFjY2VwdHMgcGxvdHMiKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLmFwcGVuZC5jYWxsKHRoaXMsIHBsb3QkMSk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgcmV0dXJuIFBsb3RHcm91cDsKICAgIH0oZ3JvdXAuR3JvdXApKTsKICAgIGV4cG9ydHMuUGxvdEdyb3VwID0gUGxvdEdyb3VwOwogICAgfSk7CgogICAgdmFyIHRhYmxlID0gY3JlYXRlQ29tbW9uanNNb2R1bGUoZnVuY3Rpb24gKG1vZHVsZSwgZXhwb3J0cykgewogICAgLyoqCiAgICAgKiBDb3B5cmlnaHQgMjAxNC1wcmVzZW50IFBhbGFudGlyIFRlY2hub2xvZ2llcwogICAgICogQGxpY2Vuc2UgTUlUCiAgICAgKi8KICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCAiX19lc01vZHVsZSIsIHsgdmFsdWU6IHRydWUgfSk7CgoKCgogICAgdmFyIFRhYmxlID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikgewogICAgICAgIHRzbGliX2VzNi5fX2V4dGVuZHMoVGFibGUsIF9zdXBlcik7CiAgICAgICAgLyoqCiAgICAgICAgICogQSBUYWJsZSBjb21iaW5lcyBDb21wb25lbnRzIGluIHRoZSBmb3JtIG9mIGEgZ3JpZC4gQQogICAgICAgICAqIGNvbW1vbiBjYXNlIGlzIGNvbWJpbmluZyBhIHktYXhpcywgeC1heGlzLCBhbmQgdGhlIHBsb3R0ZWQgZGF0YSB2aWEKICAgICAgICAgKiBgYGB0eXBlc2NyaXB0CiAgICAgICAgICogbmV3IFRhYmxlKFtbeUF4aXMsIHBsb3RdLAogICAgICAgICAqICAgICAgICAgICAgW251bGwsICB4QXhpc11dKTsKICAgICAgICAgKiBgYGAKICAgICAgICAgKgogICAgICAgICAqIEBjb25zdHJ1Y3RvcgogICAgICAgICAqIEBwYXJhbSB7KENvbXBvbmVudHxudWxsfHVuZGVmaW5lZClbXVtdfSBbcm93cz1bXV0gQSAyLUQgYXJyYXkgb2YgQ29tcG9uZW50cyB0byBiZSBhZGRlZCB0byB0aGUgVGFibGUuCiAgICAgICAgICogICBudWxsIGNhbiBiZSB1c2VkIGlmIGEgY2VsbCBpcyBlbXB0eS4KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBUYWJsZShyb3dzKSB7CiAgICAgICAgICAgIGlmIChyb3dzID09PSB2b2lkIDApIHsgcm93cyA9IFtdOyB9CiAgICAgICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMpIHx8IHRoaXM7CiAgICAgICAgICAgIF90aGlzLl9yb3dQYWRkaW5nID0gMDsKICAgICAgICAgICAgX3RoaXMuX2NvbHVtblBhZGRpbmcgPSAwOwogICAgICAgICAgICBfdGhpcy5fcm93cyA9IFtdOwogICAgICAgICAgICBfdGhpcy5fcm93V2VpZ2h0cyA9IFtdOwogICAgICAgICAgICBfdGhpcy5fY29sdW1uV2VpZ2h0cyA9IFtdOwogICAgICAgICAgICBfdGhpcy5fblJvd3MgPSAwOwogICAgICAgICAgICBfdGhpcy5fbkNvbHMgPSAwOwogICAgICAgICAgICBfdGhpcy5fY2FsY3VsYXRlZExheW91dCA9IG51bGw7CiAgICAgICAgICAgIF90aGlzLmFkZENsYXNzKCJ0YWJsZSIpOwogICAgICAgICAgICByb3dzLmZvckVhY2goZnVuY3Rpb24gKHJvdywgcm93SW5kZXgpIHsKICAgICAgICAgICAgICAgIHJvdy5mb3JFYWNoKGZ1bmN0aW9uIChjb21wb25lbnQsIGNvbEluZGV4KSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKGNvbXBvbmVudCAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLmFkZChjb21wb25lbnQsIHJvd0luZGV4LCBjb2xJbmRleCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICByZXR1cm4gX3RoaXM7CiAgICAgICAgfQogICAgICAgIFRhYmxlLnByb3RvdHlwZS5fZm9yRWFjaCA9IGZ1bmN0aW9uIChjYWxsYmFjaykgewogICAgICAgICAgICBmb3IgKHZhciByID0gMDsgciA8IHRoaXMuX25Sb3dzOyByKyspIHsKICAgICAgICAgICAgICAgIGZvciAodmFyIGMgPSAwOyBjIDwgdGhpcy5fbkNvbHM7IGMrKykgewogICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLl9yb3dzW3JdW2NdICE9IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICAgICAgY2FsbGJhY2sodGhpcy5fcm93c1tyXVtjXSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBDaGVja3Mgd2hldGhlciB0aGUgc3BlY2lmaWVkIENvbXBvbmVudCBpcyBpbiB0aGUgVGFibGUuCiAgICAgICAgICovCiAgICAgICAgVGFibGUucHJvdG90eXBlLmhhcyA9IGZ1bmN0aW9uIChjb21wb25lbnQpIHsKICAgICAgICAgICAgZm9yICh2YXIgciA9IDA7IHIgPCB0aGlzLl9uUm93czsgcisrKSB7CiAgICAgICAgICAgICAgICBmb3IgKHZhciBjID0gMDsgYyA8IHRoaXMuX25Db2xzOyBjKyspIHsKICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5fcm93c1tyXVtjXSA9PT0gY29tcG9uZW50KSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBSZXR1cm5zIHRoZSBDb21wb25lbnQgYXQgdGhlIHNwZWNpZmllZCByb3cgYW5kIGNvbHVtbiBpbmRleC4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSByb3dJbmRleAogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBjb2x1bW5JbmRleAogICAgICAgICAqIEByZXR1cm5zIHtDb21wb25lbnR9IFRoZSBDb21wb25lbnQgYXQgdGhlIHNwZWNpZmllZCBwb3NpdGlvbiwgb3IgbnVsbCBpZiBubyBDb21wb25lbnQgaXMgdGhlcmUuCiAgICAgICAgICovCiAgICAgICAgVGFibGUucHJvdG90eXBlLmNvbXBvbmVudEF0ID0gZnVuY3Rpb24gKHJvd0luZGV4LCBjb2x1bW5JbmRleCkgewogICAgICAgICAgICBpZiAocm93SW5kZXggPCAwIHx8IHJvd0luZGV4ID49IHRoaXMuX25Sb3dzIHx8IGNvbHVtbkluZGV4IDwgMCB8fCBjb2x1bW5JbmRleCA+PSB0aGlzLl9uQ29scykgewogICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3Jvd3Nbcm93SW5kZXhdW2NvbHVtbkluZGV4XTsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIEFkZHMgYSBDb21wb25lbnQgaW4gdGhlIHNwZWNpZmllZCByb3cgYW5kIGNvbHVtbiBwb3NpdGlvbi4KICAgICAgICAgKgogICAgICAgICAqIEZvciBleGFtcGxlLCBpbnN0ZWFkIG9mIGNhbGxpbmcgYG5ldyBUYWJsZShbW2EsIGJdLCBbbnVsbCwgY11dKWAsIHlvdQogICAgICAgICAqIGNvdWxkIGNhbGwKICAgICAgICAgKiB2YXIgdGFibGUgPSBuZXcgUGxvdHRhYmxlLkNvbXBvbmVudHMuVGFibGUoKTsKICAgICAgICAgKiB0YWJsZS5hZGQoYSwgMCwgMCk7CiAgICAgICAgICogdGFibGUuYWRkKGIsIDAsIDEpOwogICAgICAgICAqIHRhYmxlLmFkZChjLCAxLCAxKTsKICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7Q29tcG9uZW50fSBjb21wb25lbnQgVGhlIENvbXBvbmVudCB0byBiZSBhZGRlZC4KICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gcm93CiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IGNvbAogICAgICAgICAqIEByZXR1cm5zIHtUYWJsZX0gVGhlIGNhbGxpbmcgVGFibGUuCiAgICAgICAgICovCiAgICAgICAgVGFibGUucHJvdG90eXBlLmFkZCA9IGZ1bmN0aW9uIChjb21wb25lbnQsIHJvdywgY29sKSB7CiAgICAgICAgICAgIGlmIChjb21wb25lbnQgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhyb3cgRXJyb3IoIkNhbm5vdCBhZGQgbnVsbCB0byBhIHRhYmxlIGNlbGwiKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoIXRoaXMuaGFzKGNvbXBvbmVudCkpIHsKICAgICAgICAgICAgICAgIHZhciBjdXJyZW50Q29tcG9uZW50ID0gdGhpcy5fcm93c1tyb3ddICYmIHRoaXMuX3Jvd3Nbcm93XVtjb2xdOwogICAgICAgICAgICAgICAgaWYgKGN1cnJlbnRDb21wb25lbnQgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigiY2VsbCBpcyBvY2N1cGllZCIpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgY29tcG9uZW50LmRldGFjaCgpOwogICAgICAgICAgICAgICAgdGhpcy5fblJvd3MgPSBNYXRoLm1heChyb3cgKyAxLCB0aGlzLl9uUm93cyk7CiAgICAgICAgICAgICAgICB0aGlzLl9uQ29scyA9IE1hdGgubWF4KGNvbCArIDEsIHRoaXMuX25Db2xzKTsKICAgICAgICAgICAgICAgIHRoaXMuX3BhZFRhYmxlVG9TaXplKHRoaXMuX25Sb3dzLCB0aGlzLl9uQ29scyk7CiAgICAgICAgICAgICAgICB0aGlzLl9yb3dzW3Jvd11bY29sXSA9IGNvbXBvbmVudDsKICAgICAgICAgICAgICAgIHRoaXMuX2Fkb3B0QW5kQW5jaG9yKGNvbXBvbmVudCk7CiAgICAgICAgICAgICAgICB0aGlzLnJlZHJhdygpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgVGFibGUucHJvdG90eXBlLl9yZW1vdmUgPSBmdW5jdGlvbiAoY29tcG9uZW50KSB7CiAgICAgICAgICAgIGZvciAodmFyIHIgPSAwOyByIDwgdGhpcy5fblJvd3M7IHIrKykgewogICAgICAgICAgICAgICAgZm9yICh2YXIgYyA9IDA7IGMgPCB0aGlzLl9uQ29sczsgYysrKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX3Jvd3Nbcl1bY10gPT09IGNvbXBvbmVudCkgewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9yb3dzW3JdW2NdID0gbnVsbDsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICB9OwogICAgICAgIFRhYmxlLnByb3RvdHlwZS5faXRlcmF0ZUxheW91dCA9IGZ1bmN0aW9uIChhdmFpbGFibGVXaWR0aCwgYXZhaWxhYmxlSGVpZ2h0LCBpc0ZpbmFsT2ZmZXIpIHsKICAgICAgICAgICAgaWYgKGlzRmluYWxPZmZlciA9PT0gdm9pZCAwKSB7IGlzRmluYWxPZmZlciA9IGZhbHNlOyB9CiAgICAgICAgICAgIC8qCiAgICAgICAgICAgICAqIEdpdmVuIGF2YWlsYWJsZVdpZHRoIGFuZCBhdmFpbGFibGVIZWlnaHQsIGZpZ3VyZSBvdXQgaG93IHRvIGFsbG9jYXRlIGl0IGJldHdlZW4gcm93cyBhbmQgY29sdW1ucyB1c2luZyBhbiBpdGVyYXRpdmUgYWxnb3JpdGhtLgogICAgICAgICAgICAgKgogICAgICAgICAgICAgKiBGb3IgYm90aCBkaW1lbnNpb25zLCBrZWVwcyB0cmFjayBvZiAiZ3VhcmFudGVlZFNwYWNlIiwgd2hpY2ggdGhlIGZpeGVkLXNpemUgY29tcG9uZW50cyBoYXZlIHJlcXVlc3RlZCwgYW5kCiAgICAgICAgICAgICAqICJwcm9wb3J0aW9uYWxTcGFjZSIsIHdoaWNoIGlzIGJlaW5nIGdpdmVuIHRvIHByb3BvcnRpb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zID0gZ3VhcmFudGVlcy53YW50c1dpZHRoQXJyLm1hcChmdW5jdGlvbiAoeCkgeyByZXR1cm4geCA/IDAuMSA6IDA7IH0pOwogICAgICAgICAgICAgICAgICAgIHhXZWlnaHRzID0gdXRpbHMkMS5BcnJheS5hZGQoeFdlaWdodHMsIGNvbFdlaWdodHMpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgeFdlaWdodHMgPSBjb2xXZWlnaHRzOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdmFyIHlXZWlnaHRzID0gdm9pZCAwOwogICAgICAgICAgICAgICAgaWYgKHdhbnRzSGVpZ2h0KSB7CiAgICAgICAgICAgICAgICAgICAgeVdlaWdodHMgPSBndWFyYW50ZWVzLndhbnRzSGVpZ2h0QXJyLm1hcChmdW5jdGlvbiAoeCkgeyByZXR1cm4geCA/IDAuMSA6IDA7IH0pOwogICAgICAgICAgICAgICAgICAgIHlXZWlnaHRzID0gdXRpbHMkMS5BcnJheS5hZGQoeVdlaWdodHMsIHJvd1dlaWdodHMpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgeVdlaWdodHMgPSByb3dXZWlnaHRzOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgY29sUHJvcG9ydGlvbmFsU3BhY2UgPSBUYWJsZS5fY2FsY1Byb3BvcnRpb25hbFNwYWNlKHhXZWlnaHRzLCBmcmVlV2lkdGgpOwogICAgICAgICAgICAgICAgcm93UHJvcG9ydGlvbmFsU3BhY2UgPSBUYWJsZS5fY2FsY1Byb3BvcnRpb25hbFNwYWNlKHlXZWlnaHRzLCBmcmVlSGVpZ2h0KTsKICAgICAgICAgICAgICAgIG5JdGVyYXRpb25zKys7CiAgICAgICAgICAgICAgICB2YXIgY2FuSW1wcm92ZVdpZHRoQWxsb2NhdGlvbiA9IGZyZWVXaWR0aCA+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h0ID0gdXRpbHMkMS5BcnJheS5jcmVhdGVGaWxsZWRBcnJheShmYWxzZSwgdGhpcy5fblJvd3MpOwogICAgICAgICAgICB0aGlzLl9yb3dzLmZvckVhY2goZnVuY3Rpb24gKHJvdywgcm93SW5kZXgpIHsKICAgICAgICAgICAgICAgIHJvdy5mb3JFYWNoKGZ1bmN0aW9uIChjb21wb25lbnQsIGNvbEluZGV4KSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIHNwYWNlUmVxdWVzdDsKICAgICAgICAgICAgICAgICAgICBpZiAoY29tcG9uZW50ICE9IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICAgICAgc3BhY2VSZXF1ZXN0ID0gY29tcG9uZW50LnJlcXVlc3RlZFNwYWNlKG9mZmVyZWRXaWR0aHNbY29sSW5kZXhdLCBvZmZlcmVkSGVpZ2h0c1tyb3dJbmRleF0pOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgc3BhY2VSZXF1ZXN0ID0gewogICAgICAgICAgICAgICAgICAgICAgICAgICAgbWluV2lkdGg6IDAsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtaW5IZWlnaHQ6IDAsCiAgICAgICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHZhciBjb2x1bW5XaWR0aCA9IGlzRmluYWxPZmZlciA/IE1hdGgubWluKHNwYWNlUmVxdWVzdC5taW5XaWR0aCwgb2ZmZXJlZFdpZHRoc1tjb2xJbmRleF0pIDogc3BhY2VSZXF1ZXN0Lm1pbldpZHRoOwogICAgICAgICAgICAgICAgICAgIHJlcXVlc3RlZFdpZHRoc1tjb2xJbmRleF0gPSBNYXRoLm1heChyZXF1ZXN0ZWRXaWR0aHNbY29sSW5kZXhdLCBjb2x1bW5XaWR0aCk7CiAgICAgICAgICAgICAgICAgICAgdmFyIHJvd0hlaWdodCA9I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YXRlZExheW91dDsKICAgICAgICAgICAgaWYgKGxhc3RMYXlvdXRXaWR0aCA+IHRoaXMud2lkdGgoKSB8fCBsYXN0TGF5b3V0SGVpZ2h0ID4gdGhpcy5oZWlnaHQoKSkgewogICAgICAgICAgICAgICAgbGF5b3V0ID0gdGhpcy5faXRlcmF0ZUxheW91dCh0aGlzLndpZHRoKCksIHRoaXMuaGVpZ2h0KCksIHRydWUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciBjaGlsZFlPcmlnaW4gPSAwOwogICAgICAgICAgICB2YXIgcm93SGVpZ2h0cyA9IHV0aWxzJDEuQXJyYXkuYWRkKGxheW91dC5yb3dQcm9wb3J0aW9uYWxTcGFjZSwgbGF5b3V0Lmd1YXJhbnRlZWRIZWlnaHRzKTsKICAgICAgICAgICAgdmFyIGNvbFdpZHRocyA9IHV0aWxzJDEuQXJyYXkuYWRkKGxheW91dC5jb2xQcm9wb3J0aW9uYWxTcGFjZSwgbGF5b3V0Lmd1YXJhbnRlZWRXaWR0aHMpOwogICAgICAgICAgICB0aGlzLl9yb3dzLmZvckVhY2goZnVuY3Rpb24gKHJvdywgcm93SW5kZXgpIHsKICAgICAgICAgICAgICAgIHZhciBjaGlsZFhPcmlnaW4gPSAwOwogICAgICAgICAgICAgICAgcm93LmZvckVhY2goZnVuY3Rpb24gKGNvbXBvbmVudCwgY29sSW5kZXgpIHsKICAgICAgICAgICAgICAgICAgICAvLyByZWN1cnNpdmVseSBjb21wdXRlIGxheW91dAogICAgICAgICAgICAgICAgICAgIGlmIChjb21wb25lbnQgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnQuY29tcHV0ZUxheW91dCh7IHg6IGNoaWxkWE9yaWdpbiwgeTogY2hpbGRZT3JpZ2luIH0sIGNvbFdpZHRoc1tjb2xJbmRleF0sIHJvd0hlaWdodHNbcm93SW5kZXhdKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgY2hpbGRYT3JpZ2luICs9IGNvbFdpZHRoc1tjb2xJbmRleF0gKyBfdGhpcy5fY29sdW1uUGFkZGluZzsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgY2hpbGRZT3JpZ2luICs9IHJvd0hlaWdodHNbcm93SW5kZXhdICsgX3RoaXMuX3Jvd1BhZGRpbmc7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIFRhYmxlLnByb3RvdHlwZS5yb3dQYWRkaW5nID0gZnVuY3Rpb24gKHJvd1BhZGRpbmcpIHsKICAgICAgICAgICAgaWYgKHJvd1BhZGRpbmcgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3Jvd1BhZGRpbmc7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKCF1dGlscyQxLk1hdGguaXNWYWxpZE51bWJlcihyb3dQYWRkaW5nKSB8fCByb3dQYWRkaW5nIDwgMCkgewogICAgICAgICAgICAgICAgdGhyb3cgRXJyb3IoInJvd1BhZGRpbmcgbXVzdCBiZSBhIG5vbi1uZWdhdGl2ZSBmaW5pdGUgdmFsdWUiKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9yb3dQYWRkaW5nID0gcm93UGFkZGluZzsKICAgICAgICAgICAgdGhpcy5yZWRyYXcoKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBUYWJsZS5wcm90b3R5cGUuY29sdW1uUGFkZGluZyA9IGZ1bmN0aW9uIChjb2x1bW5QYWRkaW5nKSB7CiAgICAgICAgICAgIGlmIChjb2x1bW5QYWRkaW5nID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9jb2x1bW5QYWRkaW5nOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICghdXRpbHMkMS5NYXRoLmlzVmFsaWROdW1iZXIoY29sdW1uUGFkZGluZykgfHwgY29sdW1uUGFkZGluZyA8IDApIHsKICAgICAgICAgICAgICAgIHRocm93IEVycm9yKCJjb2x1bW5QYWRkaW5nIG11c3QgYmUgYSBub24tbmVnYXRpdmUgZmluaXRlIHZhbHVlIik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fY29sdW1uUGFkZGluZyA9IGNvbHVtblBhZGRpbmc7CiAgICAgICAgICAgIHRoaXMucmVkcmF3KCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgVGFibGUucHJvdG90eXBlLnJvd1dlaWdodCA9IGZ1bmN0aW9uIChpbmRleCwgd2VpZ2h0KSB7CiAgICAgICAgICAgIGlmICh3ZWlnaHQgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3Jvd1dlaWdodHNbaW5kZXhdOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICghdXRpbHMkMS5NYXRoLmlzVmFsaWROdW1iZXIod2VpZ2h0KSB8fCB3ZWlnaHQgPCAwKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBFcnJvcigicm93V2VpZ2h0IG11c3QgYmUgYSBub24tbmVnYXRpdmUgZmluaXRlIHZhbHVlIik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fcm93V2VpZ2h0c1tpbmRleF0gPSB3ZWlnaHQ7CiAgICAgICAgICAgIHRoaXMucmVkcmF3KCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgVGFibGUucHJvdG90eXBlLmNvbHVtbldlaWdodCA9IGZ1bmN0aW9uIChpbmRleCwgd2VpZ2h0KSB7CiAgICAgICAgICAgIGlmICh3ZWlnaHQgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2NvbHVtbldlaWdodHNbaW5kZXhdOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICghdXRpbHMkMS5NYXRoLmlzVmFsaWROdW1iZXIod2VpZ2h0KSB8fCB3ZWlnaHQgPCAwKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBFcnJvcigiY29sdW1uV2VpZ2h0IG11c3QgYmUgYSBub24tbmVnYXRpdmUgZmluaXRlIHZhbHVlIik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fY29sdW1uV2VpZ2h0c1tpbmRleF0gPSB3ZWlnaHQ7CiAgICAgICAgICAgIHRoaXMucmVkcmF3KCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgVGFibGUucHJvdG90eXBlLmZpeGVkV2lkdGggPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHZhciBjb2xzID0gZDMudHJhbnNwb3NlKHRoaXMuX3Jvd3MpOwogICAgICAgICAgICByZXR1cm4gVGFibGUuX2ZpeGVkU3BhY2UoY29scywgZnVuY3Rpb24gKGMpIHsgcmV0dXJuIChjID09IG51bGwpIHx8IGMuZml4ZWRXaWR0aCgpOyB9KTsKICAgICAgICB9OwogICAgICAgIFRhYmxlLnByb3RvdHlwZS5maXhlZEhlaWdodCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgcmV0dXJuIFRhYmxlLl9maXhlZFNwYWNlKHRoaXMuX3Jvd3MsIGZ1bmN0aW9uIChjKSB7IHJldHVybiAoYyA9PSBudWxsKSB8fCBjLmZpeGVkSGVpZ2h0KCk7IH0pOwogICAgICAgIH07CiAgICAgICAgVGFibGUucHJvdG90eXBlLl9wYWRUYWJsZVRvU2l6ZSA9IGZ1bmN0aW9uIChuUm93cywgbkNvbHMpIHsKICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBuUm93czsgaSsrKSB7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5fcm93c1tpXSA9PT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fcm93c1tpXSA9IFtdOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX3Jvd1dlaWdodHNbaV0gPSBudWxsOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBuQ29sczsgaisrKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX3Jvd3NbaV1bal0gPT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9yb3dzW2ldW2pdID0gbnVsbDsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBuQ29sczsgaisrKSB7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5fY29sdW1uV2VpZ2h0c1tqXSA9PT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fY29sdW1uV2VpZ2h0c1tqXSA9IG51bGw7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIFRhYmxlLl9jYWxjQ29tcG9uZW50V2VpZ2h0cyA9IGZ1bmN0aW9uIChzZXRXZWlnaHRzLCBjb21wb25lbnRHcm91cHMsIGZpeGl0eUFjY2Vzc29yKSB7CiAgICAgICAgICAgIC8vIElmIHRoZSByb3cvY29sIHdlaWdodCB3YXMgZXhwbGljaXRseSBzZXQsIHRoZW4gcmV0dXJuIGl0IG91dHJpZ2h0CiAgICAgICAgICAgIC8vIElmIHRoZSB3ZWlnaHQgd2FzIG5vdCBleHBsaWNpdGx5IHNldCwgdGhlbiBndWVzcyBpdCB1c2luZyB0aGUgaGV1cmlzdGljIHRoYXQgaWYgYWxsIGNvbXBvbmVudHMgYXJlIGZpeGVkLXNwYWNlCiAgICAgICAgICAgIC8vIHRoZW4gd2VpZ2h0IGlzIDAsIG90aGVyd2lzZSB3ZWlnaHQgaXMgMQogICAgICAgICAgICByZXR1cm4gc2V0V2VpZ2h0cy5tYXAoZnVuY3Rpb24gKHcsIGkpIHsKICAgICAgICAgICAgICAgIGlmICh3ICE9IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdzsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHZhciBmaXhpdGllcyA9IGNvbXBvbmVudEdyb3Vwc1tpXS5tYXAoZml4aXR5QWNjZXNzb3IpOwogICAgICAgICAgICAgICAgdmFyIGFsbEZpeGVkID0gZml4aXRpZXMucmVkdWNlKGZ1bmN0aW9uIChhLCBiKSB7IHJldHVybiBhICYmIGI7IH0sIHRydWUpOwogICAgICAgICAgICAgICAgcmV0dXJuIGFsbEZpeGVkID8gMCA6IDE7CiAgICAgICAgICAgIH0pOwogICAgICAgIH07CiAgICAgICAgVGFibGUuX2NhbGNQcm9wb3J0aW9uYWxTcGFjZSA9IGZ1bmN0aW9uICh3ZWlnaHRzLCBmcmVlU3BhY2UpIHsKICAgICAgICAgICAgdmFyIHdlaWdodFN1bSA9IGQzLnN1bSh3ZWlnaHRzKTsKICAgICAgICAgICAgaWYgKHdlaWdodFN1bSA9PT0gMCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHV0aWxzJDEuQXJyYXkuY3JlYXRlRmlsbGVkQXJyYXkoMCwgd2VpZ2h0cy5sZW5ndGgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIHdlaWdodHMubWFwKGZ1bmN0aW9uICh3KSB7IHJldHVybiBmcmVlU3BhY2UgKiB3IC8gd2VpZ2h0U3VtOyB9KTsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgVGFibGUuX2ZpeGVkU3BhY2UgPSBmdW5jdGlvbiAoY29tcG9uZW50R3JvdXAsIGZpeGl0eUFjY2Vzc29yKSB7CiAgICAgICAgICAgIHZhciBhbGwgPSBmdW5jdGlvbiAoYm9vbHMpIHsgcmV0dXJuIGJvb2xzLnJlZHVjZShmdW5jdGlvbiAoYSwgYikgeyByZXR1cm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AgICAgICBXcmFwcGVkTGFiZWwucHJvdG90eXBlLm1heExpbmVzID0gZnVuY3Rpb24gKG1heExpbmVzKSB7CiAgICAgICAgICAgIC8vIGFsbG93IHVzZXIgdG8gdW4tc2V0IGJ5IHBhc3NpbmcgaW4gbnVsbCBvciB1bmRlZmluZWQgZXhwbGljaXRseQogICAgICAgICAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA9PT0gMCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX21heExpbmVzOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX21heExpbmVzID0gbWF4TGluZXM7CiAgICAgICAgICAgIHRoaXMucmVkcmF3KCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgcmV0dXJuIFdyYXBwZWRMYWJlbDsKICAgIH0obGFiZWwuTGFiZWwpKTsKICAgIGV4cG9ydHMuV3JhcHBlZExhYmVsID0gV3JhcHBlZExhYmVsOwogICAgfSk7CgogICAgdmFyIHhEcmFnQm94TGF5ZXIgPSBjcmVhdGVDb21tb25qc01vZHVsZShmdW5jdGlvbiAobW9kdWxlLCBleHBvcnRzKSB7CiAgICAvKioKICAgICAqIENvcHlyaWdodCAyMDE0LXByZXNlbnQgUGFsYW50aXIgVGVjaG5vbG9naWVzCiAgICAgKiBAbGljZW5zZSBNSVQKICAgICAqLwogICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsKCgogICAgdmFyIFhEcmFnQm94TGF5ZXIgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7CiAgICAgICAgdHNsaWJfZXM2Ll9fZXh0ZW5kcyhYRHJhZ0JveExheWVyLCBfc3VwZXIpOwogICAgICAgIC8qKgogICAgICAgICAqIEFuIFhEcmFnQm94TGF5ZXIgaXMgYSBEcmFnQm94TGF5ZXIgd2hvc2Ugc2l6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hpcywgewogICAgICAgICAgICAgICAgdG9wTGVmdDogeyB4OiBuZXdCb3VuZHMudG9wTGVmdC54LCB5OiAwIH0sCiAgICAgICAgICAgICAgICBib3R0b21SaWdodDogeyB4OiBuZXdCb3VuZHMuYm90dG9tUmlnaHQueCwgeTogdGhpcy5oZWlnaHQoKSB9LAogICAgICAgICAgICB9KTsKICAgICAgICB9OwogICAgICAgIFhEcmFnQm94TGF5ZXIucHJvdG90eXBlLl9zZXRSZXNpemFibGVDbGFzc2VzID0gZnVuY3Rpb24gKGNhblJlc2l6ZSkgewogICAgICAgICAgICBpZiAoY2FuUmVzaXplICYmIHRoaXMuZW5hYmxlZCgpKSB7CiAgICAgICAgICAgICAgICB0aGlzLmFkZENsYXNzKCJ4LXJlc2l6YWJsZSIpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5yZW1vdmVDbGFzcygieC1yZXNpemFibGUiKTsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgWERyYWdCb3hMYXllci5wcm90b3R5cGUueVNjYWxlID0gZnVuY3Rpb24gKHlTY2FsZSkgewogICAgICAgICAgICBpZiAoeVNjYWxlID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiBfc3VwZXIucHJvdG90eXBlLnlTY2FsZS5jYWxsKHRoaXMpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigieVNjYWxlcyBjYW5ub3QgYmUgc2V0IG9uIGFuIFhEcmFnQm94TGF5ZXIiKTsKICAgICAgICB9OwogICAgICAgIFhEcmFnQm94TGF5ZXIucHJvdG90eXBlLnlFeHRlbnQgPSBmdW5jdGlvbiAoeUV4dGVudCkgewogICAgICAgICAgICBpZiAoeUV4dGVudCA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gX3N1cGVyLnByb3RvdHlwZS55RXh0ZW50LmNhbGwodGhpcyk7CiAgICAgICAgICAgIH0KICAgIC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UpIHsKICAgICAgICAgICAgaWYgKGNhblJlc2l6ZSAmJiB0aGlzLmVuYWJsZWQoKSkgewogICAgICAgICAgICAgICAgdGhpcy5hZGRDbGFzcygieS1yZXNpemFibGUiKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMucmVtb3ZlQ2xhc3MoInktcmVzaXphYmxlIik7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIFlEcmFnQm94TGF5ZXIucHJvdG90eXBlLnhTY2FsZSA9IGZ1bmN0aW9uICh4U2NhbGUpIHsKICAgICAgICAgICAgaWYgKHhTY2FsZSA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gX3N1cGVyLnByb3RvdHlwZS54U2NhbGUuY2FsbCh0aGlzKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoInhTY2FsZXMgY2Fubm90IGJlIHNldCBvbiBhbiBZRHJhZ0JveExheWVyIik7CiAgICAgICAgfTsKICAgICAgICBZRHJhZ0JveExheWVyLnByb3RvdHlwZS54RXh0ZW50ID0gZnVuY3Rpb24gKHhFeHRlbnQpIHsKICAgICAgICAgICAgaWYgKHhFeHRlbnQgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIF9zdXBlci5wcm90b3R5cGUueEV4dGVudC5jYWxsKHRoaXMpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigiWURyYWdCb3hMYXllciBoYXMgbm8geEV4dGVudCIpOwogICAgICAgIH07CiAgICAgICAgcmV0dXJuIFlEcmFnQm94TGF5ZXI7CiAgICB9KGRyYWdCb3hMYXllci5EcmFnQm94TGF5ZXIpKTsKICAgIGV4cG9ydHMuWURyYWdCb3hMYXllciA9IFlEcmFnQm94TGF5ZXI7CiAgICB9KTsKCiAgICB2YXIgY29tcG9uZW50cyA9IGNyZWF0ZUNvbW1vbmpzTW9kdWxlKGZ1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b3IgPSBzaXplUHJvamVjdG9yKCk7CiAgICAgICAgICAgIHZhciBwcmV2QXR0cnMgPSBudWxsOwogICAgICAgICAgICB2YXIgcHJldlN5bWJvbEdlbmVyYXRvciA9IG51bGw7CiAgICAgICAgICAgIHZhciBwcmV2U3ltYm9sU2l6ZSA9IG51bGw7CiAgICAgICAgICAgIGZvciAodmFyIGluZGV4ID0gMDsgaW5kZXggPCBkYXRhLmxlbmd0aDsgaW5kZXgrKykgewogICAgICAgICAgICAgICAgdmFyIGRhdHVtID0gZGF0YVtpbmRleF07CiAgICAgICAgICAgICAgICBpZiAoZGF0dW0gPT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLy8gY2hlY2sgc3ltYm9sIGlzIGluIHZpZXdwb3J0CiAgICAgICAgICAgICAgICB2YXIgYXR0cnMgPSBjYW52YXNEcmF3ZXIucmVzb2x2ZUF0dHJpYnV0ZXMoYXR0clRvQXBwbGllZFByb2plY3RvciwgU1lNQk9MX0FUVFJTLCBkYXR1bSwgaW5kZXgpOwogICAgICAgICAgICAgICAgdmFyIHN5bWJvbFNpemUgPSBzaXplQWNjZXNzb3IoZGF0dW0sIGluZGV4LCBkYXRhc2V0KTsKICAgICAgICAgICAgICAgIGlmICghc3F1YXJlT3ZlcmxhcHNCb3VuZHMoY2xpZW50V2lkdGgsIGNsaWVudEhlaWdodCwgYXR0cnNbIngiXSwgYXR0cnNbInkiXSwgc3ltYm9sU2l6ZSkpIHsKICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vIGNoZWNrIGF0dHJpYnV0ZXMgYW5kIHN5bWJvbCB0eXBlCiAgICAgICAgICAgICAgICB2YXIgYXR0cnNTYW1lID0gaXNBdHRyaWJ1dGVWYWx1ZXNFcXVhbChwcmV2QXR0cnMsIGF0dHJzLCBjYW52YXNEcmF3ZXIuQ29udGV4dFN0eWxlQXR0cnMpOwogICAgICAgICAgICAgICAgdmFyIHN5bWJvbEdlbmVyYXRvciA9IHN5bWJvbEFjY2Vzc29yKGRhdHVtLCBpbmRleCwgX3RoaXMuX2RhdGFzZXQpOwogICAgICAgICAgICAgICAgaWYgKGF0dHJzU2FtZSAmJiBwcmV2U3ltYm9sU2l6ZSA9PSBzeW1ib2xTaXplICYmIHByZXZTeW1ib2xHZW5lcmF0b3IgPT0gc3ltYm9sR2VuZXJhdG9yKSA7CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAvLyBtYWtlIHJvb20gZm9yIGJpZ2dlciBzeW1ib2wgaWYgbmVlZGVkCiAgICAgICAgICAgICAgICAgICAgdmFyIHN0cm9rZVdpZHRoID0gY2FudmFzRHJhd2VyLmdldFN0cm9rZVdpZHRoKGF0dHJzKTsKICAgICAgICAgICAgICAgICAgICAvLyArMSB0byBhY2NvdW50IGZvciBzdWJwaXhlbCBhbGlhc2luZwogICAgICAgICAgICAgICAgICAgIHZhciB3YW50ZWRCdWZmZXJTaXplID0gc3ltYm9sU2l6ZSArIHN0cm9rZVdpZHRoICsgMTsKICAgICAgICAgICAgICAgICAgICBpZiAod2FudGVkQnVmZmVyU2l6ZSA+IGJ1ZmZlci5zY3JlZW5XaWR0aCB8fCB3YW50ZWRCdWZmZXJTaXplID4gYnVmZmVyLnNjcmVlbkhlaWdodCkgewogICAgICAgICAgICAgICAgICAgICAgICBidWZmZXIucmVzaXplKHdhbnRlZEJ1ZmZlclNpemUsIHdhbnRlZEJ1ZmZlclNpemUsIHRydWUpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAvLyBkcmF3IGFjdHVhbCBzeW1ib2wgaW50byBidWZmZXIKICAgICAgICAgICAgICAgICAgICBidWZmZXIuY2xlYXIoKTsKICAgICAgICAgICAgICAgICAgICB2YXIgYnVmZmVyQ3R4ID0gYnVmZmVyLmN0eDsKICAgICAgICAgICAgICAgICAgICBidWZmZXJDdHguYmVnaW5QYXRoKCk7CiAgICAgICAgICAgICAgICAgICAgc3ltYm9sR2VuZXJhdG9yKHN5bWJvbFNpemUpLmNvbnRleHQoYnVmZmVyQ3R4KShudWxsKTsKICAgICAgICAgICAgICAgICAgICBidWZmZXJDdHguY2xvc2VQYXRoKCk7CiAgICAgICAgICAgICAgICAgICAgY2FudmFzRHJhd2VyLnJlbmRlclBhdGhXaXRoU3R5bGUoYnVmZmVyQ3R4LCBhdHRycyk7CiAgICAgICAgICAgICAgICAgICAgLy8gc2F2ZSB0aGUgdmFsdWVzIHRoYXQgYXJlIGluIHRoZSBidWZmZXIKICAgICAgICAgICAgICAgICAgICBwcmV2U3ltYm9sR2VuZXJhdG9yID0gc3ltYm9sR2VuZXJhdG9yOwogICAgICAgICAgICAgICAgICAgIHByZXZTeW1ib2xTaXplID0gc3ltYm9sU2l6ZTsKICAgICAgICAgICAgICAgICAgICBwcmV2QXR0cnMgPSBhdHRyczsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vIGJsaXQgdGhlIGJ1ZmZlciB0byB0aGUgY2FudmFzCiAgICAgICAgICAgICAgICBidWZmZXIuYmxpdENlbnRlcihjb250ZXh0LCBhdHRyc1sieCJdLCBhdHRyc1sieSJdKTsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICB9CiAgICBleHBvcnRzLm1ha2VTeW1ib2xDYW52YXNEcmF3U3RlcCA9IG1ha2VTeW1ib2xDYW52YXNEcmF3U3RlcDsKICAgIGZ1bmN0aW9uIHNxdWFyZU92ZXJsYXBzQm91bmRzKHdpZHRoLCBoZWlnaHQsIHgsIHksIHNpemUpIHsKICAgICAgICByZXR1cm4gKHggKyBzaXplID49IDAgJiYgeCAtIHNpemUgPD0gd2lkdGggJiYKICAgICAgICAgICAgeSArIHNpemUgPj0gMCAmJiB5IC0gc2l6ZSA8PSBoZWlnaHQpOwogICAgfQogICAgZnVuY3Rpb24gaXNBdHRyaWJ1dGVWYWx1ZXNFcXVhbChwcmV2QXR0cnMsIGF0dHJzLCBhdHRyS2V5cykgewogICAgICAgIGlmIChwcmV2QXR0cnMgPT0gbnVsbCkgewogICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgfQogICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgYXR0cktleXMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgdmFyIGF0dHJLZXkgPSBhdHRyS2V5c1tpXTsKICAgICAgICAgICAgaWYgKHByZXZBdHRyc1thdHRyS2V5XSAhPSBhdHRyc1thdHRyS2V5XSkgewogICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiB0cnVlOwogICAgfQogICAgfSk7CgogICAgdmFyIGRyYXdlcnMgPSBjcmVhdGVDb21tb25qc01vZHVsZShmdW5jdGlvbiAobW9kdWxlLCBleHBvcnRzKSB7CiAgICAvKioKICAgICAqIENvcHlyaWdodCAyMDE0LXByZXNlbnQgUGFsYW50aXIgVGVjaG5vbG9naWVzCiAgICAgKiBAbGljZW5zZSBNSVQKICAgICAqLwogICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsKCiAgICB0c2xpYl9lczYuX19leHBvcnRTdGFyKGFyY0RyYXdlciwgZXhwb3J0cyk7CiAgICB0c2xpYl9lczYuX19leHBvcnRTdGFyKGFyY091dGxpbmVEcmF3ZXIsIGV4cG9ydHMpOwogICAgdHNsaWJfZXM2Ll9fZXhwb3J0U3RhcihhcmVhRHJhd2VyLCBleHBvcnRzKTsKICAgIHRzbGliX2VzNi5fX2V4cG9ydFN0YXIoY2FudmFzRHJhd2VyLCBleHBvcnRzKTsKICAgIHRzbGliX2VzNi5fX2V4cG9ydFN0YXIoZHJhd2VyLCBleHBvcnRzKTsKICAgIHRzbGliX2VzNi5fX2V4cG9ydFN0Y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Y3Rpb24gWFlQbG90KCkgewogICAgICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzKSB8fCB0aGlzOwogICAgICAgICAgICBfdGhpcy5fYXV0b0FkanVzdFhTY2FsZURvbWFpbiA9IGZhbHNlOwogICAgICAgICAgICBfdGhpcy5fYXV0b0FkanVzdFlTY2FsZURvbWFpbiA9IGZhbHNlOwogICAgICAgICAgICBfdGhpcy5fZGVmZXJyZWRSZW5kZXJpbmcgPSBmYWxzZTsKICAgICAgICAgICAgX3RoaXMuX2FwcGx5RGVmZXJyZWRSZW5kZXJpbmdUcmFuc2Zvcm0gPSBmdW5jdGlvbiAodHgsIHR5LCBzeCwgc3kpIHsKICAgICAgICAgICAgICAgIGlmICghX3RoaXMuX2lzQW5jaG9yZWQpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAoX3RoaXMuX3JlbmRlckFyZWEgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIF90aGlzLl9yZW5kZXJBcmVhLmF0dHIoInRyYW5zZm9ybSIsICJ0cmFuc2xhdGUoIiArIHR4ICsgIiwgIiArIHR5ICsgIikgc2NhbGUoIiArIHN4ICsgIiwgIiArIHN5ICsgIikiKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChfdGhpcy5fY2FudmFzICE9IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICBfdGhpcy5fY2FudmFzLnN0eWxlKCJ0cmFuc2Zvcm0iLCAidHJhbnNsYXRlKCIgKyB0eCArICJweCwgIiArIHR5ICsgInB4KSBzY2FsZSgiICsgc3ggKyAiLCAiICsgc3kgKyAiKSIpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9OwogICAgICAgICAgICBfdGhpcy5hZGRDbGFzcygieHktcGxvdCIpOwogICAgICAgICAgICBfdGhpcy5fYWRqdXN0WURvbWFpbk9uQ2hhbmdlRnJvbVhDYWxsYmFjayA9IGZ1bmN0aW9uIChzY2FsZSkgeyByZXR1cm4gX3RoaXMuX2FkanVzdFlEb21haW5PbkNoYW5nZUZyb21YKCk7IH07CiAgICAgICAgICAgIF90aGlzLl9hZGp1c3RYRG9tYWluT25DaGFuZ2VGcm9tWUNhbGxiYWNrID0gZnVuY3Rpb24gKHNjYWxlKSB7IHJldHVybiBfdGhpcy5fYWRqdXN0WERvbWFpbk9uQ2hhbmdlRnJvbVkoKTsgfTsKICAgICAgICAgICAgX3RoaXMuX3JlbmRlckNhbGxiYWNrID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgaWYgKF90aGlzLmRlZmVycmVkUmVuZGVyaW5nKCkpIHsKICAgICAgICAgICAgICAgICAgICB2YXIgc2NhbGVYID0gX3RoaXMueCgpICYmIF90aGlzLngoKS5zY2FsZTsKICAgICAgICAgICAgICAgICAgICB2YXIgc2NhbGVZID0gX3RoaXMueSgpICYmIF90aGlzLnkoKS5zY2FsZTsKICAgICAgICAgICAgICAgICAgICBfdGhpcy5fZGVmZXJyZWRSZW5kZXJlci51cGRhdGVEb21haW5zKHNjYWxlWCwgc2NhbGVZKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIF90aGlzLnJlbmRlcigpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9OwogICAgICAgICAgICBfdGhpcy5fZGVmZXJyZWRSZW5kZXJlciA9IG5ldyBkZWZlcnJlZFJlbmRlcmVyLkRlZmVycmVkUmVuZGVyZXIoZnVuY3Rpb24gKCkgeyByZXR1cm4gX3RoaXMucmVuZGVyKCk7IH0sIF90aGlzLl9hcHBseURlZmVycmVkUmVuZGVyaW5nVHJhbnNmb3JtKTsKICAgICAgICAgICAgcmV0dXJuIF90aGlzOwogICAgICAgIH0KICAgICAgICBYWVBsb3QucHJvdG90eXBlLnJlbmRlciA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgaWYgKHRoaXMuZGVmZXJyZWRSZW5kZXJpbmcoKSkgewogICAgICAgICAgICAgICAgdGhpcy5fZGVmZXJyZWRSZW5kZXJlci5yZXNldFRyYW5zZm9ybXMoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gX3N1cGVyLnByb3RvdHlwZS5yZW5kZXIuY2FsbCh0aGlzKTsKICAgICAgICB9OwogICAgICAgIFhZUGxvdC5wcm90b3R5cGUuZGVmZXJyZWRSZW5kZXJpbmcgPSBmdW5jdGlvbiAoZGVmZXJyZWRSZW5kZXJpbmcpIHsKICAgICAgICAgICAgaWYgKGRlZmVycmVkUmVuZGVyaW5nID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9kZWZlcnJlZFJlbmRlcmluZzsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoZGVmZXJyZWRSZW5kZXJpbmcpIHsKICAgICAgICAgICAgICAgIHZhciBzY2FsZVggPSB0aGlzLngoKSAmJiB0aGlzLngoKS5zY2FsZTsKICAgICAgICAgICAgICAgIHZhciBzY2FsZVkgPSB0aGlzLnkoKSAmJiB0aGlzLnkoKS5zY2FsZTsKICAgICAgICAgICAgICAgIHRoaXMuX2RlZmVycmVkUmVuZGVyZXIuc2V0RG9tYWlucyhzY2FsZVgsIHNjYWxlWSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fZGVmZXJyZWRSZW5kZXJpbmcgPSBkZWZlcnJlZFJlbmRlcmluZzsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBYWVBsb3QucHJvdG90eXBlLnggPSBmdW5jdGlvbiAoeCwgeFNjYWxlLCBwb3N0U2NhbGUpIHsKICAgICAgICAgICAgaWYgKHggPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3Byb3BlcnR5QmluZGluZ3MuZ2V0KFhZUGxvdC5fWF9LRVkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2JpbmRQcm9wZXJ0eShYWVBsb3QuX1hfS0VZLCB4LCB4U2NhbGUsIHBvc3RTY2FsZSk7CiAgICAgICAgICAgIHZhciB3aWR0aCA9IHRoaXMud2lkdGgoKTsKICAgICAgICAgICAgaWYgKHhTY2FsZSAhPSBudWxsICYmIHdpZHRoICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIHhTY2FsZS5yYW5nZShbMCwgd2lkdGhdKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5fYXV0b0FkanVzdFlTY2FsZURvbWFpbikgewogICAgICAgICAgICAgICAgdGhpcy5fdXBkYXRlWUV4dGVudHNBbmRBdXRvZG9tYWluKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5yZW5kZXIoKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBYWVBsb3QucHJvdG90eXBlLnkgPSBmdW5jdGlvbiAoeSwgeVNjYWxlLCBwb3N0U2NhbGUpIHsKICAgICAgICAgICAgaWYgKHkgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3Byb3BlcnR5QmluZGluZ3MuZ2V0KFhZUGxvdC5fWV9LRVkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2JpbmRQcm9wZXJ0eShYWVBsb3QuX1lfS0VZLCB5LCB5U2NhbGUsIHBvc3RTY2FsZSk7CiAgICAgICAgICAgIHZhciBoZWlnaHQgPSB0aGlzLmhlaWdodCgpOwogICAgICAgICAgICBpZiAoeVNjYWxlICE9IG51bGwgJiYgaGVpZ2h0ICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIGlmICh5U2NhbGUgaW5zdGFuY2VvZiBzY2FsZXMuQ2F0ZWdvcnkpIHsKICAgICAgICAgICAgICAgICAgICB5U2NhbGUucmFuZ2UoWzAsIGhlaWdodF0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgeVNjYWxlLnJhbmdlKFtoZWlnaHQsIDBdKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5fYXV0b0FkanVzdFhTY2FsZURvbWFpbikgewogICAgICAgICAgICAgICAgdGhpcy5fdXBkYXRlWEV4dGVudHNBbmRBdXRvZG9tYWluKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5yZW5kZXIoKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBYWVBsb3QucHJvdG90eXBlLl9maWx0ZXJGb3JQcm9wZXJ0eSA9IGZ1bmN0aW9uIChwcm9wZXJ0eSkgewogICAgICAgICAgICBpZiAocHJvcGVydHkgPT09ICJ4IiAmJiB0aGlzLl9hdXRvQWRqdXN0WFNjYWxlRG9tYWluKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fbWFrZUZpbHRlckJ5UHJvcGVydHkoInkiKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmICgocHJvcGVydHkgPT09ICJ5IiB8fCBwcm9wZXJ0eSA9PT0gInkwIikgJiYgdGhpcy5fYXV0b0FkanVzdFlTY2FsZURvbWFpbikgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX21ha2VGaWx0ZXJCeVByb3BlcnR5KCJ4Iik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgfTsKICAgICAgICBYWVBsb3QucHJvdG90eXBlLl9tYWtlRmlsdGVyQnlQcm9wZXJ0eSA9IGZ1bmN0aW9uIChwcm9wZXJ0eSkgewogICAgICAgICAgICB2YXIgYmluZGluZyA9IHRoaXMuX3Byb3BlcnR5QmluZGluZ3MuZ2V0KHByb3BlcnR5KTsKICAgICAgICAgICAgaWYgKGJpbmRpbmcgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgdmFyIGFjY2Vzc29yXzEgPSBiaW5kaW5nLmFjY2Vzc29yOwogICAgICAgICAgICAgICAgdmFyIHNjYWxlXzEgPSBiaW5kaW5nLnNjYWxlOwogICAgICAgICAgICAgICAgaWYgKHNjYWxlXzEgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoZGF0dW0sIGluZGV4LCBkYXRhc2V0KSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHZhciByYW5nZSA9IHNjYWxlXzEucmFuZ2UoKTsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHV0aWxzJDEuTWF0aC5pblJhbmdlKHNjYWxlXzEuc2NhbGUoYWNjZXNzb3JfMShkYXR1bSwgaW5kZXgsIGRhdGFzZXQpKSwgcmFuZ2VbMF0sIHJhbmdlWzFdKTsKICAgICAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgIH07CiAgICAgICAgWFlQbG90LnByb3RvdHlwZS5fdW5pbnN0YWxsU2NhbGVGb3JLZXkgPSBmdW5jdGlvbiAoc2NhbGUsIGtleSkgewogICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLl91bmluc3RhbGxTY2FsZUZvcktleS5jYWxsKHRoaXMsIHNjYWxlLCBrZXkpOwogICAgICAgICAgICB2YXIgYWRqdXN0Q2FsbGJhY2sgPSBrZXkgPT09IFhZUGxvdC5fWF9LRVkgPyB0aGlzLl9hZGp1c3RZRG9tYWluT25DaGFuZ2VGcm9tWENhbGxiYWNrCiAgICAgICAgICAgICAgICA6IHRoaXMuX2FkanVzdFhEb21haW5PbkNoYW5nZUZyb21ZQ2FsbGJhY2s7CiAgICAgICAgICAgIHNjYWxlLm9mZlVwZGF0ZShhZGp1c3RDYWxsYmFjayk7CiAgICAgICAgfTsKICAgICAgICBYWVBsb3QucHJvdG90eXBlLl9pbnN0YWxsU2NhbGVGb3JLZXkgPSBmdW5jdGlvbiAoc2NhbGUsIGtleSkgewogICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLl9pbnN0YWxsU2NhbGVGb3JLZXkuY2FsbCh0aGlzLCBzY2FsZSwga2V5KTsKICAgICAgICAgICAgdmFyIGFkanVzdENhbGxiYWNrID0ga2V5ID09PSBYWVBsb3QuX1hfS0VZID8gdGhpcy5fYWRqdXN0WURvbWFpbk9uQ2hhbmdlRnJvbVhDYWxsYmFjawogICAgICAgICAgICAgICAgOiB0aGlzLl9hZGp1c3RYRG9tYWluT25DaGFuZ2VGcm9tWUNhbGxiYWNrOwogICAgICAgICAgICBzY2FsZS5vblVwZGF0ZShhZGp1c3RDYWxsYmFjayk7CiAgICAgICAgfTsKICAgICAgICBYWVBsb3QucHJvdG90eXBlLmRlc3Ryb3kgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUuZGVzdHJveS5jYWxsKHRoaXMpOwogICAgICAgICAgICBpZiAodGhpcy54KCkuc2NhbGUpIHsKICAgICAgICAgICAgICAgIHRoaXMueCgpLnNjYWxlLm9mZlVwZGF0ZSh0aGlzLl9hZGp1c3RZRG9tYWluT25DaGFuZ2VGcm9tWENhbGxiYWNrKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy55KCkuc2NhbGUpIHsKICAgICAgICAgICAgICAgIHRoaXMueSgpLnNjYWxlLm9mZlVwZGF0ZSh0aGlzLl9hZGp1c3RYRG9tYWluT25DaGFuZ2VGcm9tWUNhbGxiYWNrKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIFhZUGxvdC5wcm90b3R5cGUuYXV0b3JhbmdlTW9kZSA9IGZ1bmN0aW9uIChhdXRvcmFuZ2VNb2RlKSB7CiAgICAgICAgICAgIGlmIChhdXRvcmFuZ2VNb2RlID09IG51bGwpIHsKICAgICAgICAgICAgICAgIGlmICh0aGlzLl9hdXRvQWRqdXN0WFNjYWxlRG9tYWluKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICJ4IjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmICh0aGlzLl9hdXRvQWRqdXN0WVNjYWxlRG9tYWluKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICJ5IjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiAibm9uZSI7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgc3dpdGNoIChhdXRvcmFuZ2VNb2RlKSB7CiAgICAgICAgICAgICAgICBjYXNlICJ4IjoKICAgICAgICAgICAgICAgICAgICB0aGlzLl9hdXRvQWRqdXN0WFNjYWxlRG9tYWluID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9hdXRvQWRqdXN0WVNjYWxlRG9tYWluID0gZmFsc2U7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fYWRqdXN0WERvbWFpbk9uQ2hhbmdlRnJvbVkoKTsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIGNhc2UgInkiOgogICAgICAgICAgICAgICAgICAgIHRoaXMuX2F1dG9BZGp1c3RYU2NhbGVEb21haW4gPSBmYWxzZTsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9hdXRvQWRqdXN0WVNjYWxlRG9tYWluID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9hZGp1c3RZRG9tYWluT25DaGFuZ2VGcm9tWCgpOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgY2FzZSAibm9uZSI6CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fYXV0b0FkanVzdFhTY2FsZURvbWFpbiA9IGZhbHNlOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX2F1dG9BZGp1c3RZU2NhbGVEb21haW4gPSBmYWxzZTsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCJJbnZhbGlkIHNjYWxlIG5hbWUgJyIgKyBhdXRvcmFuZ2VNb2RlICsgIicsIG11c3QgYmUgJ3gnLCAneScgb3IgJ25vbmUnIik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBYWVBsb3QucHJvdG90eXBlLmNvbXB1dGVMYXlvdXQgPSBmdW5jdGlvbiAob3JpZ2luLCBhdmFpbGFibGVXaWR0aCwgYXZhaWxhYmxlSGVpZ2h0KSB7CiAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUuY29tcHV0ZUxheW91dC5jYWxsKHRoaXMsIG9yaWdpbiwgYXZhaWxhYmxlV2lkdGgsIGF2YWlsYWJsZUhlaWdodCk7CiAgICAgICAgICAgIHZhciB4QmluZGluZyA9IHRoaXMueCgpOwogICAgICAgICAgICB2YXIgeFNjYWxlID0geEJpbmRpbmcgJiYgeEJpbmRpbmcuc2NhbGU7CiAgICAgICAgICAgIGlmICh4U2NhbGUgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgeFNjYWxlLnJhbmdlKFswLCB0aGlzLndpZHRoKCldKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB2YXIgeUJpbmRpbmcgPSB0aGlzLnkoKTsKICAgICAgICAgICAgdmFyIHlTY2FsZSA9IHlCaW5kaW5nICYmIHlCaW5kaW5nLnNjYWxlOwogICAgICAgICAgICBpZiAoeVNjYWxlICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIGlmICh5U2NhbGUgaW5zdGFuY2VvZiBzY2FsZXMuQ2F0ZWdvcnkpIHsKICAgICAgICAgICAgICAgICAgICB5U2NhbGUucmFuZ2UoWzAsIHRoaXMuaGVpZ2h0KCldKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIHlTY2FsZS5yYW5nZShbdGhpcy5oZWlnaHQoKSwgMF0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgWFlQbG90LnByb3RvdHlwZS5fdXBkYXRlWEV4dGVudHNBbmRBdXRvZG9tYWluID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB2YXIgeFNjYWxlID0gdGhpcy54KCkuc2NhbGU7CiAgICAgICAgICAgIGlmICh4U2NhbGUgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgeFNjYWxlLmF1dG9Eb21haW4oKTsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgWFlQbG90LnByb3RvdHlwZS5fdXBkYXRlWUV4dGVudHNBbmRBdXRvZG9tYWluID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB2YXIgeVNjYWxlID0gdGhpcy55KCkuc2NhbGU7CiAgICAgICAgICAgIGlmICh5U2NhbGUgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgeVNjYWxlLmF1dG9Eb21haW4oKTsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogQWRqdXN0cyB0aGUgZG9tYWlucyBvZiBib3RoIFggYW5kIFkgc2NhbGVzIHRvIHNob3cgYWxsIGRhdGEuCiAgICAgICAgICogVGhpcyBjYWxsIGRvZXMgbm90IG92ZXJyaWRlIHRoZSBhdXRvcmFuZ2UoKSBiZWhhdmlvci4KICAgICAgICAgKgogICAgICAgICAqIEByZXR1cm5zIHtYWVBsb3R9IFRoZSBjYWxsaW5nIFhZUGxvdC4KICAgICAgICAgKi8KICAgICAgICBYWVBsb3QucHJvdG90eXBlLnNob3dBbGxEYXRhID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB0aGlzLl91cGRhdGVYRXh0ZW50c0FuZEF1dG9kb21haW4oKTsKICAgICAgICAgICAgdGhpcy5fdXBkYXRlWUV4dGVudHNBbmRBdXRvZG9tYWluKCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgWFlQbG90LnByb3RvdHlwZS5fYWRqdXN0WURvbWFpbk9uQ2hhbmdlRnJvbVggPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5fcHJvamVjdG9yc1JlYWR5KCkpIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5fYXV0b0FkanVzdFlTY2FsZURvbWFpbikgewogICAgICAgICAgICAgICAgdGhpcy5fdXBkYXRlWUV4dGVudHNBbmRBdXRvZG9tYWluKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIFhZUGxvdC5wcm90b3R5cGUuX2FkanVzdFhEb21haW5PbkNoYW5nZUZyb21ZID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICBpZiAoIXRoaXMuX3Byb2plY3RvcnNSZWFkeSgpKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHRoaXMuX2F1dG9BZGp1c3RYU2NhbGVEb21haW4pIHsKICAgICAgICAgICAgICAgIHRoaXMuX3VwZGF0ZVhFeHRlbnRzQW5kQXV0b2RvbWFpbigpOwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBYWVBsb3QucHJvdG90eXBlLl9wcm9qZWN0b3JzUmVhZHkgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHZhciB4QmluZGluZyA9IHRoaXMueCgpOwogICAgICAgICAgICB2YXIgeUJpbmRpbmcgPSB0aGlzLnkoKTsKICAgICAgICAgICAgcmV0dXJuIHhCaW5kaW5nICE9IG51bGwgJiYKICAgICAgICAgICAgICAgIHhCaW5kaW5nLmFjY2Vzc29yICE9IG51bGwgJiYKICAgICAgICAgICAgICAgIHlCaW5kaW5nICE9IG51bGwgJiYKICAgICAgICAgICAgICAgIHlCaW5kaW5nLmFjY2Vzc29yICE9IG51bGw7CiAgICAgICAgfTsKICAgICAgICBYWVBsb3QucHJvdG90eXBlLl9waXhlbFBvaW50ID0gZnVuY3Rpb24gKGRhdHVtLCBpbmRleCwgZGF0YXNldCkgewogICAgICAgICAgICB2YXIgeFByb2plY3RvciA9IHBsb3QuUGxvdC5fc2NhbGVkQWNjZXNzb3IodGhpcy54KCkpOwogICAgICAgICAgICB2YXIgeVByb2plY3RvciA9IHBsb3QuUGxvdC5fc2NhbGVkQWNjZXNzb3IodGhpcy55KCkpOwogICAgICAgICAgICByZXR1cm4geyB4OiB4UHJvamVjdG9yKGRhdHVtLCBpbmRleCwgZGF0YXNldCksIHk6IHlQcm9qZWN0b3IoZGF0dW0sIGluZGV4LCBkYXRhc2V0KSB9OwogICAgICAgIH07CiAgICAgICAgWFlQbG90LnByb3RvdHlwZS5fZ2V0RGF0YVRvRHJhdyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgdmFyIGRhdGFUb0RyYXcgPSBfc3VwZXIucHJvdG90eXBlLl9nZXREYXRhVG9EcmF3LmNhbGwodGhpcyk7CiAgICAgICAgICAgIHZhciBkZWZpbmVkQXR0ciA9IHRoaXMuYXR0cigiZGVmaW5lZCIpOwogICAgICAgICAgICB2YXIgZGVmaW5lZEZ1bmN0aW9uID0gZnVuY3Rpb24gKGQsIGksIGRhdGFzZXQpIHsKICAgICAgICAgICAgICAgIHZhciBwb3NpdGlvblggPSBwbG90LlBsb3QuX3NjYWxlZEFjY2Vzc29yKF90aGlzLngoKSkoZCwgaSwgZGF0YXNldCk7CiAgICAgICAgICAgICAgICB2YXIgcG9zaXRpb25ZID0gcGxvdC5QbG90Ll9zY2FsZWRBY2Nlc3NvcihfdGhpcy55KCkpKGQsIGksIGRhdGFzZXQpOwogICAgICAgICAgICAgICAgaWYgKGRlZmluZWRBdHRyICYmIGRlZmluZWRBdHRyLmFjY2Vzc29yKGQsIGksIGRhdGFzZXQpID09PSBmYWxzZSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiB1dGlscyQxLk1hdGguaXNWYWxpZE51bWJlcihwb3NpdGlvblgpICYmCiAgICAgICAgICAgICAgICAgICAgdXRpbHMkMS5NYXRoLmlzVmFsaWROdW1iZXIocG9zaXRpb25ZKTsKICAgICAgICAgICAgfTsKICAgICAgICAgICAgdGhpcy5kYXRhc2V0cygpLmZvckVhY2goZnVuY3Rpb24gKGRhdGFzZXQpIHsKICAgICAgICAgICAgICAgIGRhdGFUb0RyYXcuc2V0KGRhdGFzZXQsIGRhdGFUb0RyYXcuZ2V0KGRhdGFzZXQpLmZpbHRlcihmdW5jdGlvbiAoZCwgaSkgeyByZXR1cm4gZGVmaW5lZEZ1bmN0aW9uKGQsIGksIGRhdGFzZXQpOyB9KSk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICByZXR1cm4gZGF0YVRvRHJhdzsKICAgICAgICB9OwogICAgICAgIFhZUGxvdC5fWF9LRVkgPSAieCI7CiAgICAgICAgWFlQbG90Ll9ZX0tFWSA9ICJ5IjsKICAgICAgICByZXR1cm4gWFlQbG90OwogICAgfShwbG90LlBsb3QpKTsKICAgIGV4cG9ydHMuWFlQbG90ID0gWFlQbG90OwogICAgfSk7CgogICAgdmFyIGxpbmVQbG90ID0gY3JlYXRlQ29tbW9uanNNb2R1bGUoZnVuY3Rpb24gKG1vZHVsZSwgZXhwb3J0cykgewogICAgLyoqCiAgICAgKiBDb3B5cmlnaHQgMjAxNC1wcmVzZW50IFBhbGFudGlyIFRlY2hub2xvZ2llcwogICAgICogQGxpY2Vuc2UgTUlUCiAgICAgKi8KICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCAiX19lc01vZHVsZSIsIHsgdmFsdWU6IHRydWUgfSk7CgoKCgoKCgoK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CiAgICAgICAgImJ1bmRsZSIsCiAgICAgICAgImNhcmRpbmFsIiwKICAgICAgICAiY2FyZGluYWxPcGVuIiwKICAgICAgICAiY2FyZGluYWxDbG9zZWQiLAogICAgICAgICJtb25vdG9uZSIsCiAgICBdKTsKICAgIHZhciBMaW5lID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikgewogICAgICAgIHRzbGliX2VzNi5fX2V4dGVuZHMoTGluZSwgX3N1cGVyKTsKICAgICAgICAvKioKICAgICAgICAgKiBBIExpbmUgUGxvdCBkcmF3cyBsaW5lIHNlZ21lbnRzIHN0YXJ0aW5nIGZyb20gdGhlIGZpcnN0IGRhdGEgcG9pbnQgdG8gdGhlIG5leHQuCiAgICAgICAgICoKICAgICAgICAgKiBAY29uc3RydWN0b3IKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBMaW5lKCkgewogICAgICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzKSB8fCB0aGlzOwogICAgICAgICAgICBfdGhpcy5fY3VydmUgPSAibGluZWFyIjsKICAgICAgICAgICAgX3RoaXMuX2F1dG9yYW5nZVNtb290aCA9IGZhbHNlOwogICAgICAgICAgICBfdGhpcy5fY3JvcHBlZFJlbmRlcmluZ0VuYWJsZWQgPSB0cnVlOwogICAgICAgICAgICBfdGhpcy5fY29sbGFwc2VEZW5zZVZlcnRpY2FsTGluZXNFbmFibGVkID0gZmFsc2U7CiAgICAgICAgICAgIF90aGlzLl9kb3duc2FtcGxpbmdFbmFibGVkID0gZmFsc2U7CiAgICAgICAgICAgIF90aGlzLmFkZENsYXNzKCJsaW5lLXBsb3QiKTsKICAgICAgICAgICAgdmFyIGFuaW1hdG9yID0gbmV3IGFuaW1hdG9ycy5FYXNpbmcoKTsKICAgICAgICAgICAgYW5pbWF0b3Iuc3RlcER1cmF0aW9uKHBsb3QuUGxvdC5fQU5JTUFUSU9OX01BWF9EVVJBVElPTik7CiAgICAgICAgICAgIGFuaW1hdG9yLmVhc2luZ01vZGUoImV4cEluT3V0Iik7CiAgICAgICAgICAgIGFuaW1hdG9yLm1heFRvdGFsRHVyYXRpb24ocGxvdC5QbG90Ll9BTklNQVRJT05fTUFYX0RVUkFUSU9OKTsKICAgICAgICAgICAgX3RoaXMuYW5pbWF0b3IocGxvdHMuQW5pbWF0b3IuTUFJTiwgYW5pbWF0b3IpOwogICAgICAgICAgICBfdGhpcy5hdHRyKCJzdHJva2UiLCBuZXcgc2NhbGVzLkNvbG9yKCkucmFuZ2UoKVswXSk7CiAgICAgICAgICAgIF90aGlzLmF0dHIoInN0cm9rZS13aWR0aCIsICIycHgiKTsKICAgICAgICAgICAgcmV0dXJuIF90aGlzOwogICAgICAgIH0KICAgICAgICBMaW5lLnByb3RvdHlwZS54ID0gZnVuY3Rpb24gKHgsIHhTY2FsZSwgcG9zdFNjYWxlKSB7CiAgICAgICAgICAgIGlmICh4ID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiBfc3VwZXIucHJvdG90eXBlLnguY2FsbCh0aGlzKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUueC5jYWxsKHRoaXMsIHgsIHhTY2FsZSwgcG9zdFNjYWxlKTsKICAgICAgICAgICAgICAgIHRoaXMuX3NldFNjYWxlU25hcHBpbmcoKTsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBMaW5lLnByb3RvdHlwZS55ID0gZnVuY3Rpb24gKHksIHlTY2FsZSwgcG9zdFNjYWxlKSB7CiAgICAgICAgICAgIGlmICh5ID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiBfc3VwZXIucHJvdG90eXBlLnkuY2FsbCh0aGlzKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUueS5jYWxsKHRoaXMsIHksIHlTY2FsZSwgcG9zdFNjYWxlKTsKICAgICAgICAgICAgICAgIHRoaXMuX3NldFNjYWxlU25hcHBpbmcoKTsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBMaW5lLnByb3RvdHlwZS5hdXRvcmFuZ2VNb2RlID0gZnVuY3Rpb24gKGF1dG9yYW5nZU1vZGUpIHsKICAgICAgICAgICAgaWYgKGF1dG9yYW5nZU1vZGUgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIF9zdXBlci5wcm90b3R5cGUuYXV0b3JhbmdlTW9kZS5jYWxsKHRoaXMpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUuYXV0b3JhbmdlTW9kZS5jYWxsKHRoaXMsIGF1dG9yYW5nZU1vZGUpOwogICAgICAgICAgICB0aGlzLl9zZXRTY2FsZVNuYXBwaW5nKCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgTGluZS5wcm90b3R5cGUuYXV0b3JhbmdlU21vb3RoID0gZnVuY3Rpb24gKGF1dG9yYW5nZVNtb290aCkgewogICAgICAgICAgICBpZiAoYXV0b3JhbmdlU21vb3RoID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9hdXRvcmFuZ2VTbW9vdGg7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fYXV0b3JhbmdlU21vb3RoID0gYXV0b3JhbmdlU21vb3RoOwogICAgICAgICAgICB0aGlzLl9zZXRTY2FsZVNuYXBwaW5nKCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgTGluZS5wcm90b3R5cGUuX3NldFNjYWxlU25hcHBpbmcgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmF1dG9yYW5nZU1vZGUoKSA9PT0gIngiICYmIHRoaXMueCgpICYmIHRoaXMueCgpLnNjYWxlICYmIHRoaXMueCgpLnNjYWxlIGluc3RhbmNlb2YgcXVhbnRpdGF0aXZlU2NhbGUuUXVhbnRpdGF0aXZlU2NhbGUpIHsKICAgICAgICAgICAgICAgIHRoaXMueCgpLnNjYWxlLnNuYXBwaW5nRG9tYWluRW5hYmxlZCghdGhpcy5hdXRvcmFuZ2VTbW9vdGgoKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHRoaXMuYXV0b3JhbmdlTW9kZSgpID09PSAieSIgJiYgdGhpcy55KCkgJiYgdGhpcy55KCkuc2NhbGUgJiYgdGhpcy55KCkuc2NhbGUgaW5zdGFuY2VvZiBxdWFudGl0YXRpdmVTY2FsZS5RdWFudGl0YXRpdmVTY2FsZSkgewogICAgICAgICAgICAgICAgdGhpcy55KCkuc2NhbGUuc25hcHBpbmdEb21haW5FbmFibGVkKCF0aGlzLmF1dG9yYW5nZVNtb290aCgpKTsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgTGluZS5wcm90b3R5cGUuY3VydmUgPSBmdW5jdGlvbiAoY3VydmUpIHsKICAgICAgICAgICAgaWYgKGN1cnZlID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9jdXJ2ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9jdXJ2ZSA9IGN1cnZlOwogICAgICAgICAgICB0aGlzLnJlbmRlcigpOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIExpbmUucHJvdG90eXBlLmRvd25zYW1wbGluZ0VuYWJsZWQgPSBmdW5jdGlvbiAoZG93bnNhbXBsaW5nKSB7CiAgICAgICAgICAgIGlmIChkb3duc2FtcGxpbmcgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2Rvd25zYW1wbGluZ0VuYWJsZWQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fZG93bnNhbXBsaW5nRW5hYmxlZCA9IGRvd25zYW1wbGluZzsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBMaW5lLnByb3RvdHlwZS5jcm9wcGVkUmVuZGVyaW5nRW5hYmxlZCA9IGZ1bmN0aW9uIChjcm9wcGVkUmVuZGVyaW5nKSB7CiAgICAgICAgICAgIGlmIChjcm9wcGVkUmVuZGVyaW5nID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9jcm9wcGVkUmVuZGVyaW5nRW5hYmxlZDsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9jcm9wcGVkUmVuZGVyaW5nRW5hYmxlZCA9IGNyb3BwZWRSZW5kZXJpbmc7CiAgICAgICAgICAgIHRoaXMucmVuZGVyKCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgTGluZS5wcm90b3R5cGUuY29sbGFwc2VEZW5zZUxpbmVzRW5hYmxlZCA9IGZ1bmN0aW9uIChjb2xsYXBzZURlbnNlTGluZXMpIHsKICAgICAgICAgICAgaWYgKGNvbGxhcHNlRGVuc2VMaW5lcyA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fY29sbGFwc2VEZW5zZVZlcnRpY2FsTGluZXNFbmFibGVkOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2NvbGxhcHNlRGVuc2VWZXJ0aWNhbExpbmVzRW5hYmxlZCA9IGNvbGxhcHNlRGVuc2VMaW5lczsKICAgICAgICAgICAgdGhpcy5yZW5kZXIoKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBMaW5lLnByb3RvdHlwZS5fY3JlYXRlRHJhd2VyID0gZnVuY3Rpb24gKGRhdGFzZXQpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgcmV0dXJuI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dG9yYW5nZU1vZGUoKSA9PT0gInkiKSB7CiAgICAgICAgICAgICAgICBpbmNsdWRlZFZhbHVlcyA9IGVkZ2VJbnRlcnNlY3Rpb25Qb2ludHMubGVmdC5jb25jYXQoZWRnZUludGVyc2VjdGlvblBvaW50cy5yaWdodCkubWFwKGZ1bmN0aW9uIChwb2ludCkgeyByZXR1cm4gcG9pbnQueTsgfSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBpbmNsdWRlZFZhbHVlcyA9IGVkZ2VJbnRlcnNlY3Rpb25Qb2ludHMudG9wLmNvbmNhdChlZGdlSW50ZXJzZWN0aW9uUG9pbnRzLmJvdHRvbSkubWFwKGZ1bmN0aW9uIChwb2ludCkgeyByZXR1cm4gcG9pbnQueDsgfSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIGV4dGVudHMubWFwKGZ1bmN0aW9uIChleHRlbnQpIHsgcmV0dXJuIGQzLmV4dGVudChkMy5tZXJnZShbZXh0ZW50LCBpbmNsdWRlZFZhbHVlc10pKTsgfSk7CiAgICAgICAgfTsKICAgICAgICBMaW5lLnByb3RvdHlwZS5fZ2V0RWRnZUludGVyc2VjdGlvblBvaW50cyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgaWYgKCEodGhpcy55KCkuc2NhbGUgaW5zdGFuY2VvZiBxdWFudGl0YXRpdmVTY2FsZS5RdWFudGl0YXRpdmVTY2FsZSAmJiB0aGlzLngoKS5zY2FsZSBpbnN0YW5jZW9mIHF1YW50aXRhdGl2ZVNjYWxlLlF1YW50aXRhdGl2ZVNjYWxlKSkgewogICAgICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgICAgICBsZWZ0OiBbXSwKICAgICAgICAgICAgICAgICAgICByaWdodDogW10sCiAgICAgICAgICAgICAgICAgICAgdG9wOiBbXSwKICAgICAgICAgICAgICAgICAgICBib3R0b206IFtdLAogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgfQogICAgICAgICAgICB2YXIgeVNjYWxlID0gdGhpcy55KCkuc2NhbGU7CiAgICAgICAgICAgIHZhciB4U2NhbGUgPSB0aGlzLngoKS5zY2FsZTsKICAgICAgICAgICAgdmFyIGludGVyc2VjdGlvblBvaW50cyA9IHsKICAgICAgICAgICAgICAgIGxlZnQ6IFtdLAogICAgICAgICAgICAgICAgcmlnaHQ6IFtdLAogICAgICAgICAgICAgICAgdG9wOiBbXSwKICAgICAgICAgICAgICAgIGJvdHRvbTogW10sCiAgICAgICAgICAgIH07CiAgICAgICAgICAgIHZhciBsZWZ0WCA9IHhTY2FsZS5zY2FsZSh4U2NhbGUuZG9tYWluKClbMF0pOwogICAgICAgICAgICB2YXIgcmlnaHRYID0geFNjYWxlLnNjYWxlKHhTY2FsZS5kb21haW4oKVsxXSk7CiAgICAgICAgICAgIHZhciBib3R0b21ZID0geVNjYWxlLnNjYWxlKHlTY2FsZS5kb21haW4oKVswXSk7CiAgICAgICAgICAgIHZhciB0b3BZID0geVNjYWxlLnNjYWxlKHlTY2FsZS5kb21haW4oKVsxXSk7CiAgICAgICAgICAgIHRoaXMuZGF0YXNldHMoKS5mb3JFYWNoKGZ1bmN0aW9uIChkYXRhc2V0KSB7CiAgICAgICAgICAgICAgICB2YXIgZGF0YSA9IGRhdGFzZXQuZGF0YSgpOwogICAgICAgICAgICAgICAgdmFyIHgxLCB4MiwgeTEsIHkyOwogICAgICAgICAgICAgICAgdmFyIHByZXZYLCBwcmV2WSwgY3VyclgsIGN1cnJZOwogICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDE7IGkgPCBkYXRhLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgcHJldlggPSBjdXJyWCB8fCB4U2NhbGUuc2NhbGUoX3RoaXMueCgpLmFjY2Vzc29yKGRhdGFbaSAtIDFdLCBpIC0gMSwgZGF0YXNldCkpOwogICAgICAgICAgICAgICAgICAgIHByZXZZID0gY3VyclkgfHwgeVNjYWxlLnNjYWxlKF90aGlzLnkoKS5hY2Nlc3NvcihkYXRhW2kgLSAxXSwgaSAtIDEsIGRhdGFzZXQpKTsKICAgICAgICAgICAgICAgICAgICBjdXJyWCA9IHhTY2FsZS5zY2FsZShfdGhpcy54KCkuYWNjZXNzb3IoZGF0YVtpXSwgaSwgZGF0YXNldCkpOwogICAgICAgICAgICAgICAgICAgIGN1cnJZID0geVNjYWxlLnNjYWxlKF90aGlzLnkoKS5hY2Nlc3NvcihkYXRhW2ldLCBpLCBkYXRhc2V0KSk7CiAgICAgICAgICAgICAgICAgICAgLy8gSWYgdmFsdWVzIGNyb3NzZWQgbGVmdCBlZGdlCiAgICAgICAgICAgICAgICAgICAgaWYgKChwcmV2WCA8IGxlZnRYKSA9PT0gKGxlZnRYIDw9IGN1cnJYKSkgewogICAgICAgICAgICAgICAgICAgICAgICB4MSA9IGxlZnRYIC0gcHJldlg7CiAgICAgICAgICAgICAgICAgICAgICAgIHgyID0gY3VyclggLSBwcmV2WDsKICAgICAgICAgICAgICAgICAgICAgICAgeTIgPSBjdXJyWSAtIHByZXZZOwogICAgICAgICAgICAgICAgICAgICAgICB5MSA9IHgxICogeTIgLyB4MjsKICAgICAgICAgICAgICAgICAgICAgICAgaW50ZXJzZWN0aW9uUG9pbnRzLmxlZnQucHVzaCh7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB4OiBsZWZ0WCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHk6IHlTY2FsZS5pbnZlcnQocHJldlkgKyB5MSksCiAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAvLyBJZiB2YWx1ZXMgY3Jvc3NlZCByaWdodCBlZGdlCiAgICAgICAgICAgICAgICAgICAgaWYgKChwcmV2WCA8IHJpZ2h0WCkgPT09IChyaWdodFggPD0gY3VyclgpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHgxID0gcmlnaHRYIC0gcHJldlg7CiAgICAgICAgICAgICAgICAgICAgICAgIHgyID0gY3VyclggLSBwcmV2WDsKICAgICAgICAgICAgICAgICAgICAgICAgeTIgPSBjdXJyWSAtIHByZXZZOwogICAgICAgICAgICAgICAgICAgICAgICB5MSA9IHgxICogeTIgLyB4MjsKICAgICAgICAgICAgICAgICAgICAgICAgaW50ZXJzZWN0aW9uUG9pbnRzLnJpZ2h0LnB1c2goewogICAgICAgICAgICAgICAgICAgICAgICAgICAgeDogcmlnaHRYLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgeTogeVNjYWxlLmludmVydChwcmV2WSArIHkxKSwKICAgICAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIC8vIElmIHZhbHVlcyBjcm9zc2VkIHVwcGVyIGVkZ2UKICAgICAgICAgICAgICAgICAgICBpZiAoKHByZXZZIDwgdG9wWSkgPT09ICh0b3BZIDw9IGN1cnJZKSkgewogICAgICAgICAgICAgICAgICAgICAgICB4MiA9IGN1cnJYIC0gcHJldlg7CiAgICAgICAgICAgICAgICAgICAgICAgIHkxID0gdG9wWSAtIHByZXZZOwogICAgICAgICAgICAgICAgICAgICAgICB5MiA9IGN1cnJZIC0gcHJldlk7CiAgICAgICAgICAgICAgICAgICAgICAgIHgxID0geTEgKiB4MiAvIHkyOwogICAgICAgICAgICAgICAgICAgICAgICBpbnRlcnNlY3Rpb25Qb2ludHMudG9wLnB1c2goewogICAgICAgICAgICAgICAgICAgICAgICAgICAgeDogeFNjYWxlLmludmVydChwcmV2WCArIHgxKSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHk6IHRvcFksCiAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAvLyBJZiB2YWx1ZXMgY3Jvc3NlZCBsb3dlciBlZGdlCiAgICAgICAgICAgICAgICAgICAgaWYgKChwcmV2WSA8IGJvdHRvbVkpID09PSAoYm90dG9tWSA8PSBjdXJyWSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgeDIgPSBjdXJyWCAtIHByZXZYOwogICAgICAgICAgICAgICAgICAgICAgICB5MSA9IGJvdHRvbVkgLSBwcmV2WTsKICAgICAgICAgICAgICAgICAgICAgICAgeTIgPSBjdXJyWSAtIHByZXZZOwogICAgICAgICAgICAgICAgICAgICAgICB4MSA9IHkxICogeDIgLyB5MjsKICAgICAgICAgICAgICAgICAgICAgICAgaW50ZXJzZWN0aW9uUG9pbnRzLmJvdHRvbS5wdXNoKHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHg6IHhTY2FsZS5pbnZlcnQocHJldlggKyB4MSksCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB5OiBib3R0b21ZLAogICAgICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICByZXR1cm4gaW50ZXJzZWN0aW9uUG9pbnRzOwogICAgICAgIH07CiAgICAgICAgTGluZS5wcm90b3R5cGUuX2dldFJlc2V0WUZ1bmN0aW9uID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICAvLyBnZXRzIHRoZSB5LXZhbHVlIGdlbmVyYXRvciBmb3IgdGhlIGFuaW1hdGlvbiBzdGFydCBwb2ludAogICAgICAgICAgICB2YXIgeURvbWFpbiA9IHRoaXMueSgpLnNjYWxlLmRvbWFpbigpOwogICAgICAgICAgICB2YXIgZG9tYWluTWF4ID0gTWF0aC5tYXgoeURvbWFpblswXSwgeURvbWFpblsxXSk7CiAgICAgICAgICAgIHZhciBkb21haW5NaW4gPSBNYXRoLm1pbih5RG9tYWluWzBdLCB5RG9tYWluWzFdKTsKICAgICAgICAgICAgLy8gc3RhcnQgZnJvbSB6ZXJvLCBvciB0aGUgY2xvc2VzdCBkb21haW4gd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b2plY3RvcjogdGhpcy5fZ2V0QXR0clRvUHJvamVjdG9yKCksCiAgICAgICAgICAgICAgICBhbmltYXRvcjogdGhpcy5fZ2V0QW5pbWF0b3IocGxvdHMuQW5pbWF0b3IuTUFJTiksCiAgICAgICAgICAgIH0pOwogICAgICAgICAgICByZXR1cm4gZHJhd1N0ZXBzOwogICAgICAgIH07CiAgICAgICAgTGluZS5wcm90b3R5cGUuX2dlbmVyYXRlQXR0clRvUHJvamVjdG9yID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB2YXIgYXR0clRvUHJvamVjdG9yID0gX3N1cGVyLnByb3RvdHlwZS5fZ2VuZXJhdGVBdHRyVG9Qcm9qZWN0b3IuY2FsbCh0aGlzKTsKICAgICAgICAgICAgT2JqZWN0LmtleXMoYXR0clRvUHJvamVjdG9yKS5mb3JFYWNoKGZ1bmN0aW9uIChhdHRyaWJ1dGUpIHsKICAgICAgICAgICAgICAgIGlmIChhdHRyaWJ1dGUgPT09ICJkIikgewogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHZhciBwcm9qZWN0b3IgPSBhdHRyVG9Qcm9qZWN0b3JbYXR0cmlidXRlXTsKICAgICAgICAgICAgICAgIGF0dHJUb1Byb2plY3RvclthdHRyaWJ1dGVdID0gZnVuY3Rpb24gKGRhdGEsIGksIGRhdGFzZXQpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGF0YS5sZW5ndGggPiAwID8gcHJvamVjdG9yKGRhdGFbMF0sIGksIGRhdGFzZXQpIDogbnVsbDsKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICByZXR1cm4gYXR0clRvUHJvamVjdG9yOwogICAgICAgIH07CiAgICAgICAgTGluZS5wcm90b3R5cGUuZW50aXRpZXNBdCA9IGZ1bmN0aW9uIChwb2ludCkgewogICAgICAgICAgICB2YXIgZW50aXR5ID0gdGhpcy5lbnRpdHlOZWFyZXN0QnlYVGhlblkocG9pbnQpOwogICAgICAgICAgICBpZiAoZW50aXR5ICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiBbZW50aXR5XTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHJldHVybiBbXTsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0dXJucyB0aGUgUGxvdEVudGl0eSBuZWFyZXN0IHRvIHRoZSBxdWVyeSBwb2ludCBieSBYIHRoZW4gYnkgWSwgb3IgdW5kZWZpbmVkIGlmIG5vIFBsb3RFbnRpdHkgY2FuIGJlIGZvdW5kLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtQb2ludH0gcXVlcnlQb2ludAogICAgICAgICAqIEByZXR1cm5zIHtQbG90RW50aXR5fSBUaGUgbmVhcmVzdCBQbG90RW50aXR5LCBvciB1bmRlZmluZWQgaWYgbm8gUGxvdEVudGl0eSBjYW4gYmUgZm91bmQuCiAgICAgICAgICovCiAgICAgICAgTGluZS5wcm90b3R5cGUuZW50aXR5TmVhcmVzdEJ5WFRoZW5ZID0gZnVuY3Rpb24gKHF1ZXJ5UG9pbnQpIHsKICAgICAgICAgICAgdmFyIG1pblhEaXN0ID0gSW5maW5pdHk7CiAgICAgICAgICAgIHZhciBtaW5ZRGlzdCA9IEluZmluaXR5OwogICAgICAgICAgICB2YXIgY2xvc2VzdDsKICAgICAgICAgICAgdmFyIGNoYXJ0Qm91bmRzID0gdGhpcy5ib3VuZHMoKTsKICAgICAgICAgICAgdmFyIGVudGl0aWVzID0gdGhpcy5lbnRpdGllcygpOwogICAgICAgICAgICB2YXIgZW50aXR5TGVuID0gZW50aXRpZXMubGVuZ3RoOwogICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGVudGl0eUxlbjsgaSsrKSB7CiAgICAgICAgICAgICAgICB2YXIgZW50aXR5ID0gZW50aXRpZXNbaV07CiAgICAgICAgICAgICAgICBpZiAoIXV0aWxzJDEuTWF0aC53aXRoaW4oZW50aXR5LnBvc2l0aW9uLCBjaGFydEJvdW5kcykpIHsKICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHZhciB4RGlzdCA9IE1hdGguYWJzKHF1ZXJ5UG9pbnQueCAtIGVudGl0eS5wb3NpdGlvbi54KTsKICAgICAgICAgICAgICAgIHZhciB5RGlzdCA9IE1hdGguYWJzKHF1ZXJ5UG9pbnQueSAtIGVudGl0eS5wb3NpdGlvbi55KTsKICAgICAgICAgICAgICAgIGlmICh4RGlzdCA8IG1pblhEaXN0IHx8IHhEaXN0ID09PSBtaW5YRGlzdCAmJiB5RGlzdCA8IG1pbllEaXN0KSB7CiAgICAgICAgICAgICAgICAgICAgY2xvc2VzdCA9IGVudGl0eTsKICAgICAgICAgICAgICAgICAgICBtaW5YRGlzdCA9IHhEaXN0OwogICAgICAgICAgICAgICAgICAgIG1pbllEaXN0ID0geURpc3Q7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIGNsb3Nlc3Q7CiAgICAgICAgfTsKICAgICAgICBMaW5lLnByb3RvdHlwZS5fcHJvcGVydHlQcm9qZWN0b3JzID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB2YXIgcHJvcGVydHlUb1Byb2plY3RvcnMgPSBfc3VwZXIucHJvdG90eXBlLl9wcm9wZXJ0eVByb2plY3RvcnMuY2FsbCh0aGlzKTsKICAgICAgICAgICAgcHJvcGVydHlUb1Byb2plY3RvcnNbImQiXSA9IHRoaXMuX2NvbnN0cnVjdExpbmVQcm9qZWN0b3IocGxvdC5QbG90Ll9zY2FsZWRBY2Nlc3Nvcih0aGlzLngoKSksIHBsb3QuUGxvdC5fc2NhbGVkQWNjZXNzb3IodGhpcy55KCkpKTsKICAgICAgICAgICAgcmV0dXJuIHByb3BlcnR5VG9Qcm9qZWN0b3JzOwogICAgICAgIH07CiAgICAgICAgTGluZS5wcm90b3R5cGUuX2NvbnN0cnVjdExpbmVQcm9qZWN0b3IgPSBmdW5jdGlvbiAoeFByb2plY3RvciwgeVByb2plY3RvcikgewogICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwogICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24gKGRhdHVtLCBpbmRleCwgZGF0YXNldCkgewogICAgICAgICAgICAgICAgcmV0dXJuIF90aGlzLl9kM0xpbmVGYWN0b3J5KGRhdGFzZXQsIHhQcm9qZWN0b3IsIHlQcm9qZWN0b3IpKGRhdHVtKTsKICAgICAgICAgICAgfTsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybiBhIGQzLkxpbmUgd2hvc2UgLngsIC55LCBhbmQgLmRlZmluZWQgYWNjZXNzb3JzIGFyZSBob29rZWQgdXAgdG8gdGhlIHhQcm9qZWN0b3IgYW5kIHlQcm9qZWN0b3IKICAgICAgICAgKiBhZnRlciB0aGV5J3ZlIGJlZW4gZmVkIHRoZSBkYXRhc2V0LCBhbmQgd2hvc2UgY3VydmUgaXMgY29uZmlndXJlZCB0byB0aGlzIHBsb3QncyBjdXJ2ZS4KICAgICAgICAgKiBAcGFyYW0gZGF0YXNldAogICAgICAgICAqIEBwYXJhbSB4UHJvamVjdG9yCiAgICAgICAgICogQHBhcmFtIHlQcm9qZWN0b3IKICAgICAgICAgKiBAcmV0dXJucyB7TGluZTxbbnVtYmVyLG51bWJlcl0+fQogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICovCiAgICAgICAgTGluZS5wcm90b3R5cGUuX2QzTGluZUZhY3RvcnkgPSBmdW5jdGlvbiAoZGF0YXNldCwgeFByb2plY3RvciwgeVByb2plY3RvcikgewogICAgICAgICAgICBpZiAoeFByb2plY3RvciA9PT0gdm9pZCAwKSB7IHhQcm9qZWN0b3IgPSBwbG90LlBsb3QuX3NjYWxlZEFjY2Vzc29yKHRoaXMueCgpKTsgfQogICAgICAgICAgICBpZiAoeVByb2plY3RvciA9PT0gdm9pZCAwKSB7IHlQcm9qZWN0b3IgPSBwbG90LlBsb3QuX3NjYWxlZEFjY2Vzc29yKHRoaXMueSgpKTsgfQogICAgICAgICAgICB2YXIgZGVmaW5lZFByb2plY3RvciA9IGZ1bmN0aW9uIChkLCBpLCBkYXRhc2V0KSB7CiAgICAgICAgICAgICAgICB2YXIgcG9zaXRpb25YID0geFByb2plY3RvcihkLCBpLCBkYXRhc2V0KTsKICAgICAgICAgICAgICAgIHZhciBwb3NpdGlvblkgPSB5UHJvamVjdG9yKGQsIGksIGRhdGFzZXQpOwogICAgICAgICAgICAgICAgcmV0dXJuIHV0aWxzJDEuTWF0aC5pc1ZhbGlkTnVtYmVyKHBvc2l0aW9uWCkgJiYgdXRpbHMkMS5NYXRoLmlzVmFsaWROdW1iZXIocG9zaXRpb25ZKTsKICAgICAgICAgICAgfTsKICAgICAgICAgICAgcmV0dXJuIGQzLmxpbmUoKQogICAgICAgICAgICAgICAgLngoZnVuY3Rpb24gKGlubmVyRGF0dW0sIGlubmVySW5kZXgpIHsgcmV0dXJuIHhQcm9qZWN0b3IoaW5uZXJEYXR1bSwgaW5uZXJJbmRleCwgZGF0YXNldCk7IH0pCiAgICAgICAgICAgICAgICAueShmdW5jdGlvbiAoaW5uZXJEYXR1bSwgaW5uZXJJbmRleCkgeyByZXR1cm4geVByb2plY3Rvcihpbm5lckRhdHVtLCBpbm5lckluZGV4LCBkYXRhc2V0KTsgfSkKICAgICAgICAgICAgICAgIC5jdXJ2ZSh0aGlzLl9nZXRDdXJ2ZUZhY3RvcnkoKSkKICAgICAgICAgICAgICAgIC5kZWZpbmVkKGZ1bmN0aW9uIChpbm5lckRhdHVtLCBpbm5lckluZGV4KSB7IHJldHVybiBkZWZpbmVkUHJvamVjdG9yKGlubmVyRGF0dW0sIGlubmVySW5kZXgsIGRhdGFzZXQpOyB9KTsKICAgICAgICB9OwogICAgICAgIExpbmUucHJvdG90eXBlLl9nZXRDdXJ2ZUZhY3RvcnkgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHZhciBjdXJ2ZSA9IHRoaXMuY3VydmUoKTsKICAgICAgICAgICAgaWYgKHR5cGVvZiBjdXJ2ZSA9PT0gInN0cmluZyIpIHsKICAgICAgICAgICAgICAgIHZhciBtYXliZUN1cnZlRnVuY3Rpb24gPSBDVVJWRV9OQU1FX01BUFBJTkdbY3VydmVdOwogICAgICAgICAgICAgICAgaWYgKG1heWJlQ3VydmVGdW5jdGlvbiA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gb29wczsgbmFtZSBpcyB3cm9uZyAtIGRlZmF1bHQgdG8gbGluZWFyIGluc3RlYWQKICAgICAgICAgICAgICAgICAgICByZXR1cm4gQ1VSVkVfTkFNRV9NQVBQSU5HWyJsaW5lYXIiXTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBtYXliZUN1cnZlRnVuY3Rpb247CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICByZXR1cm4gY3VydmU7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIExpbmUgcGxvdHMgcmVwcmVzZW50IGVhY2ggZGF0YXNldCB3aXRoIGEgc2luZ2xlIDxwYXRoPiBlbGVtZW50LCBzbyB3ZSB3cmFwIHRoZSBkYXRhc2V0IGRhdGEgaW4gYSBzaW5nbGUgZWxlbWVudCBhcnJheS4KICAgICAgICAgKiBAcmV0dXJucyB7TWFwPERhdGFzZXQsIGFueVtdPn0KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqLwogICAgICAgIExpbmUucHJvdG90eXBlLl9nZXREYXRhVG9EcmF3ID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwogICAgICAgICAgICB2YXIgZGF0YVRvRHJhdyA9IG5ldyB1dGlscyQxLk1hcCgpOwogICAgICAgICAgICB0aGlzLmRhdGFzZXRzKCkuZm9yRWFjaChmdW5jdGlvbiAoZGF0YXNldCkgewogICAgICAgICAgICAgICAgdmFyIGRhdGEgPSBkYXRhc2V0LmRhdGEoKTsKICAgICAgICAgICAgICAgIGlmICghX3RoaXMuX2Nyb3BwZWRSZW5kZXJpbmdFbmFibGVkICYmICFfdGhpcy5fZG93bnNhbXBsaW5nRW5hYmxlZCkgewogICAgICAgICAgICAgICAgICAgIGRhdGFUb0RyYXcuc2V0KGRhdGFzZXQsIFtkYXRhXSk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdmFyIGZpbHRlcmVkRGF0YUluZGljZXMgPSBbXTsKICAgICAgICAgICAgICAgIHZhciBkYXRhTGVuID0gZGF0YS5sZW5ndGg7CiAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGRhdGFMZW47IGkrKykgewogICAgICAgICAgICAgICAgICAgIGZpbHRlcmVkRGF0YUluZGljZXNbaV0gPSBpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKF90aGlzLl9jcm9wcGVkUmVuZGVyaW5nRW5hYmxlZCkgewogICAgICAgICAgICAgICAgICAgIGZpbHRlcmVkRGF0YUluZGljZXMgPSBfdGhpcy5fZmlsdGVyQ3JvcHBlZFJlbmRlcmluZyhkYXRhc2V0LCBmaWx0ZXJlZERhdGFJbmRpY2VzKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChfdGhpcy5fZG93bnNhbXBsaW5nRW5hYmxlZCkgewogICAgICAgICAgICAgICAgICAgIGZpbHRlcmVkRGF0YUluZGljZXMgPSBfdGhpcy5fZmlsdGVyRG93bnNhbXBsaW5nKGRhdGFzZXQsIGZpbHRlcmVkRGF0YUluZGljZXMpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKF90aGlzLl9jb2xsYXBzZURlbnNlVmVydGljYWxMaW5lc0VuYWJsZWQpIHsKICAgICAgICAgICAgICAgICAgICBmaWx0ZXJlZERhdGFJbmRpY2VzID0gX3RoaXMuX2ZpbHRlckRlbnNlTGluZXMoZGF0YXNldCwgZmlsdGVyZWREYXRhSW5kaWNlcyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB2YXIgZmlsdGVyZWREYXRhID0gW107CiAgICAgICAgICAgICAgICB2YXIgZmlsdGVyZWRJbmRpY2VzTGVuID0gZmlsdGVyZWREYXRhSW5kaWNlcy5sZW5ndGg7CiAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGZpbHRlcmVkSW5kaWNlc0xlbjsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIGluZGV4ID0gZmlsdGVyZWREYXRhSW5kaWNlc1tpXTsKICAgICAgICAgICAgICAgICAgICBmaWx0ZXJlZERhdGFbaV0gPSBkYXRhW2luZGV4XTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGRhdGFUb0RyYXcuc2V0KGRhdGFzZXQsIFtmaWx0ZXJlZERhdGFdKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHJldHVybiBkYXRhVG9EcmF3OwogICAgICAgIH07CiAgICAgICAgTGluZS5wcm90b3R5cGUuX2ZpbHRlckNyb3BwZWRSZW5kZXJpbmcgPSBmdW5jdGlvbiAoZGF0YXNldCwgaW5kaWNlcykgewogICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwogICAgICAgICAgICB2YXIgeFByb2plY3RvciA9IHBsb3QuUGxvdC5fc2NhbGVkQWNjZXNzb3IodGhpcy54KCkpOwogICAgICAgICAgICB2YXIgeVByb2plY3RvciA9IHBsb3QuUGxvdC5fc2NhbGVkQWNjZXNzb3IodGhpcy55KCkpOwogICAgICAgICAgICB2YXIgZGF0YSA9IGRhdGFzZXQuZGF0YSgpOwogICAgICAgICAgICB2YXIgZmlsdGVyZWREYXRhSW5kaWNlcyA9IFtdOwogICAgICAgICAgICB2YXIgcG9pbnRJblZpZXdwb3J0ID0gZnVuY3Rpb24gKHgsIHkpIHsKICAgICAgICAgICAgICAgIHJldHVybiB1dGlscyQxLk1hdGguaW5SYW5nZSh4LCAwLCBfdGhpcy53aWR0aCgpKSAmJgogICAgICAgICAgICAgICAgICAgIHV0aWxzJDEuTWF0aC5pblJhbmdlKHksIDAsIF90aGlzLmhlaWdodCgpKTsKICAgICAgICAgICAgfTsKICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBpbmRpY2VzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICB2YXIgY3VyclhQb2ludCA9IHhQcm9qZWN0b3IoZGF0YVtpbmRpY2VzW2ldXSwgaW5kaWNlc1tpXSwgZGF0YXNldCk7CiAgICAgICAgICAgICAgICB2YXIgY3VycllQb2ludCA9IHlQcm9qZWN0b3IoZGF0YVtpbmRpY2VzW2ldXSwgaW5kaWNlc1tpXSwgZGF0YXNldCk7CiAgICAgICAgICAgICAgICB2YXIgc2hvdWxkU2hvdyA9IHBvaW50SW5WaWV3cG9ydChjdXJyWFBvaW50LCBjdXJyWVBvaW50KTsKICAgICAgICAgICAgICAgIGlmICghc2hvdWxkU2hvdyAmJiBpbmRpY2VzW2kgLSAxXSAhPSBudWxsICYmIGRhdGFbaW5kaWNlc1tpIC0gMV1dICE9IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICB2YXIgcHJldlhQb2ludCA9IHhQcm9qZWN0b3IoZGF0YVtpbmRpY2VzW2kgLSAxXV0sIGluZGljZXNbaSAtIDFdLCBkYXRhc2V0KTsKICAgICAgICAgICAgICAgICAgICB2YXIgcHJldllQb2ludCA9IHlQcm9qZWN0b3IoZGF0YVtpbmRpY2VzW2kgLSAxXV0sIGluZGljZXNbaSAtIDFdLCBkYXRhc2V0KTsKICAgICAgICAgICAgICAgICAgICBzaG91bGRTaG93ID0gc2hvdWxkU2hvdyB8fCBwb2ludEluVmlld3BvcnQocHJldlhQb2ludCwgcHJldllQb2ludCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAoIXNob3VsZFNob3cgJiYgaW5kaWNlc1tpICsgMV0gIT0gbnVsbCAmJiBkYXRhW2luZGljZXNbaSArIDFdXSAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIG5leHRYUG9pbnQgPSB4UHJvamVjdG9yKGRhdGFbaW5kaWNlc1tpICsgMV1dLCBpbmRpY2VzW2kgKyAxXSwgZGF0YXNldCk7CiAgICAgICAgICAgICAgICAgICAgdmFyIG5leHRZUG9pbnQgPSB5UHJvamVjdG9yKGRhdGFbaW5kaWNlc1tpICsgMV1dLCBpbmRpY2VzW2kgKyAxXSwgZGF0YXNldCk7CiAgICAgICAgICAgICAgICAgICAgc2hvdWxkU2hvdyA9IHNob3VsZFNob3cgfHwgcG9pbnRJblZpZXdwb3J0KG5leHRYUG9pbnQsIG5leHRZUG9pbnQpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKHNob3VsZFNob3cpIHsKICAgICAgICAgICAgICAgICAgICBmaWx0ZXJlZERhdGFJbmRpY2VzLnB1c2goaW5kaWNlc1tpXSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIGZpbHRlcmVkRGF0YUluZGljZXM7CiAgICAgICAgfTsKICAgICAgICBMaW5lLnByb3RvdHlwZS5fZmlsdGVyRG93bnNhbXBsaW5nID0gZnVuY3Rpb24gKGRhdGFzZXQsIGluZGljZXMpIHsKICAgICAgICAgICAgaWYgKGluZGljZXMubGVuZ3RoID09PSAwKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gW107CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIGRhdGEgPSBkYXRhc2V0LmRhdGEoKTsKICAgICAgICAgICAgdmFyIHNjYWxlZFhBY2Nlc3NvciA9IHBsb3QuUGxvdC5fc2NhbGVkQWNjZXNzb3IodGhpcy54KCkpOwogICAgICAgICAgICB2YXIgc2NhbGVkWUFjY2Vzc29yID0gcGxvdC5QbG90Ll9zY2FsZWRBY2Nlc3Nvcih0aGlzLnkoKSk7CiAgICAgICAgICAgIHZhciBmaWx0ZXJlZEluZGljZXMgPSBbaW5kaWNlc1swXV07CiAgICAgICAgICAgIHZhciBpbmRleE9uQ3VycmVudFNsb3BlID0gZnVuY3Rpb24gKGksIGN1cnJlbnRTbG9wZSkgewogICAgICAgICAgICAgICAgdmFyIHAxeCA9IHNjYWxlZFhBY2Nlc3NvcihkYXRhW2luZGljZXNbaV1dLCBpbmRpY2VzW2ldLCBkYXRhc2V0KTsKICAgICAgICAgICAgICAgIHZhciBwMXkgPSBzY2FsZWRZQWNjZXNzb3IoZGF0YVtpbmRpY2VzW2ldXSwgaW5kaWNlc1tpXSwgZGF0YXNldCk7CiAgICAgICAgICAgICAgICB2YXIgcDJ4ID0gc2NhbGVkWEFjY2Vzc29yKGRhdGFbaW5kaWNlc1tpICsgMV1dLCBpbmRpY2VzW2kgKyAxXSwgZGF0YXNldCk7CiAgICAgICAgICAgICAgICB2YXIgcDJ5ID0gc2NhbGVkWUFjY2Vzc29yKGRhdGFbaW5kaWNlc1tpICsgMV1dLCBpbmRpY2VzW2kgKyAxXSwgZGF0YXNldCk7CiAgICAgICAgICAgICAgICBpZiAoY3VycmVudFNsb3BlID09PSBJbmZpbml0eSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBNYXRoLmZsb29yKHAxeCkgPT09IE1hdGguZmxvb3IocDJ4KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIHZhciBleHBlY3RlZFAyeSA9IHAxeSArIChwMnggLSBwMXgpICogY3VycmVudFNsb3BlOwogICAgICAgICAgICAgICAgICAgIHJldHVybiBNYXRoLmZsb29yKHAyeSkgPT09IE1hdGguZmxvb3IoZXhwZWN0ZWRQMnkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9OwogICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGluZGljZXMubGVuZ3RoIC0gMTspIHsKICAgICAgICAgICAgICAgIHZhciBpbmRleEZpcnN0ID0gaW5kaWNlc1tpXTsKICAgICAgICAgICAgICAgIHZhciBwMXggPSBzY2FsZWRYQWNjZXNzb3IoZGF0YVtpbmRpY2VzW2ldXSwgaW5kaWNlc1tpXSwgZGF0YXNldCk7CiAgICAgICAgICAgICAgICB2YXIgcDF5ID0gc2NhbGVkWUFjY2Vzc29yKGRhdGFbaW5kaWNlc1tpXV0sIGluZGljZXNbaV0sIGRhdGFzZXQpOwogICAgICAgICAgICAgICAgdmFyIHAyeCA9IHNjYWxlZFhBY2Nlc3NvcihkYXRhW2luZGljZXNbaSArIDFdXSwgaW5kaWNlc1tpICsgMV0sIGRhdGFzZXQpOwogICAgICAgICAgICAgICAgdmFyIHAyeSA9IHNjYWxlZFlBY2Nlc3NvcihkYXRhW2luZGljZXNbaSArIDFdXSwgaW5kaWNlc1tpICsgMV0sIGRhdGFzZXQpOwogICAgICAgICAgICAgICAgdmFyIGN1cnJlbnRTbG9wZSA9IChNYXRoLmZsb29yKHAxeCkgPT09IE1hdGguZmxvb3IocDJ4KSkgPyBJbmZpbml0eSA6IChwMnkgLSBwMXkpIC8gKHAyeCAtIHAxeCk7CiAgICAgICAgICAgICAgICB2YXIgaW5kZXhNaW4gPSBpbmRpY2VzW2ldOwogICAgICAgICAgICAgICAgdmFyIG1pblNjYWxlZFZhbHVlID0gKGN1cnJlbnRTbG9wZSA9PT0gSW5maW5pdHkpID8gcDF5IDogcDF4OwogICAgICAgICAgICAgICAgdmFyIGluZGV4TWF4ID0gaW5kZXhNaW47CiAgICAgICAgICAgICAgICB2YXIgbWF4U2NhbGVkVmFsdWUgPSBtaW5TY2FsZWRWYWx1ZTsKICAgICAgICAgICAgICAgIHZhciBmaXJzdEluZGV4T25DdXJyZW50U2xvcGUgPSB0cnVlOwogICAgICAgICAgICAgICAgd2hpbGUgKGkgPCBpbmRpY2VzLmxlbmd0aCAtIDEgJiYgKGZpcnN0SW5kZXhPbkN1cnJlbnRTbG9wZSB8fCBpbmRleE9uQ3VycmVudFNsb3BlKGksIGN1cnJlbnRTbG9wZSkpKSB7CiAgICAgICAgICAgICAgICAgICAgaSsrOwogICAgICAgICAgICAgICAgICAgIGZpcnN0SW5kZXhPbkN1cnJlbnRTbG9wZSA9IGZhbHNlOwogICAgICAgICAgICAgICAgICAgIHZhciBjdXJyU2NhbGVkVmFsdWUgPSBjdXJyZW50U2xvcGUgPT09IEluZmluaXR5ID8gc2NhbGVkWUFjY2Vzc29yKGRhdGFbaW5kaWNlc1tpXV0sIGluZGljZXNbaV0sIGRhdGFzZXQpIDoKICAgICAgICAgICAgICAgICAgICAgICAgc2NhbGVkWEFjY2Vzc29yKGRhdGFbaW5kaWNlc1tpXV0sIGluZGljZXNbaV0sIGRhdGFzZXQpOwogICAgICAgICAgICAgICAgICAgIGlmIChjdXJyU2NhbGVkVmFsdWUgPiBtYXhTY2FsZWRWYWx1ZSkgewogICAgICAgICAgICAgICAgICAgICAgICBtYXhTY2FsZWRWYWx1ZSA9IGN1cnJTY2FsZWRWYWx1ZTsKICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXhNYXggPSBpbmRpY2VzW2ldOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBpZiAoY3VyclNjYWxlZFZhbHVlIDwgbWluU2NhbGVkVmFsdWUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgbWluU2NhbGVkVmFsdWUgPSBjdXJyU2NhbGVkVmFsdWU7CiAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4TWluID0gaW5kaWNlc1tpXTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB2YXIgaW5kZXhMYXN0ID0gaW5kaWNlc1tpXTsKICAgICAgICAgICAgICAgIGlmIChpbmRleE1pbiAhPT0gaW5kZXhGaXJzdCkgewogICAgICAgICAgICAgICAgICAgIGZpbHRlcmVkSW5kaWNlcy5wdXNoKGluZGV4TWluKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChpbmRleE1heCAhPT0gaW5kZXhNaW4gJiYgaW5kZXhNYXggIT09IGluZGV4Rmlyc3QpIHsKICAgICAgICAgICAgICAgICAgICBmaWx0ZXJlZEluZGljZXMucHVzaChpbmRleE1heCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAoaW5kZXhMYXN0ICE9PSBpbmRleEZpcnN0ICYmIGluZGV4TGFzdCAhPT0gaW5kZXhNaW4gJiYgaW5kZXhMYXN0ICE9PSBpbmRleE1heCkgewogICAgICAgICAgICAgICAgICAgIGZpbHRlcmVkSW5kaWNlcy5wdXNoKGluZGV4TGFzdCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIGZpbHRlcmVkSW5kaWNlczsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIENvbGxhcHNlIGxpbmUgZ2VvbWV0cnkKICAgICAgICAgKgogICAgICAgICAqIEFzc3VtaW5nIHRoYXQgdGhlcmUgYXJlIG1hbnkgcG9pbnRzIHRoYXQgYXJlIGRyYXduIG9uIHRoZSBzYW1lIGNvb3JkaW5hdGUsCiAgICAgICAgICogd2UgY2FuIHNhdmUgYSBsb3Qgb2YgcmVuZGVyIHRpbWUgYnkganVzdCBkcmF3aW5nIG9uZSBsaW5lIGZyb20gdGhlIG1pbiB0bwogICAgICAgICAqIG1heCB5LWNvb3JkaW5hdGUgb2YgYWxsIHRob3NlIHBvaW50cy4KICAgICAgICAgKi8KICAgICAgICBMaW5lLnByb3RvdHlwZS5fZmlsdGVyRGVuc2VMaW5lcyA9IGZ1bmN0a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PbmNlIGFsbCB0aGUgcG9pbnRzIHdpdGggdGhlIHNhbWUgeCBjb29yZGluYXRlIGFyZSBkZXRlY3RlZCwgd2UgZHJhdyBhCiAgICAgICAgICogc2luZ2xlIGxpbmUgZnJvbSB0aGUgbWluIHRvIG1heCB5IGNvb3JpbmRhdGUuCiAgICAgICAgICoKICAgICAgICAgKiBUaGUgImVudHJhbmNlIiBhbmQgImV4aXQiIGxpbmVzIHRvL2Zyb20gdGhpcyBjb2xsYXBzZWQgdmVydGljYWwgbGluZSBhcmUKICAgICAgICAgKiBhbHNvIGRyYXduLiBUaGlzIGFsbG93cyBsaW5lcyB3aXRoIG5vIGNvbGxhcHNlZCBzZWdtZW50cyB0byByZW5kZXIKICAgICAgICAgKiBjb3JyZWN0bHkuCiAgICAgICAgICovCiAgICAgICAgTGluZS5wcm90b3R5cGUuX2J1Y2tldEJ5WCA9IGZ1bmN0aW9uIChkYXRhc2V0LCBpbmRpY2VzLCB4Rm4sIHlGbikgewogICAgICAgICAgICB2YXIgZmlsdGVyZWRJbmRpY2VzID0gW107CiAgICAgICAgICAgIHZhciBkYXRhID0gZGF0YXNldC5kYXRhKCk7CiAgICAgICAgICAgIHZhciBidWNrZXQgPSBudWxsOwogICAgICAgICAgICB2YXIgaW5kaWNlc0xlbmd0aCA9IGluZGljZXMubGVuZ3RoOwogICAgICAgICAgICBmb3IgKHZhciBpaSA9IDA7IGlpIDw9IGluZGljZXNMZW5ndGg7ICsraWkpIHsKICAgICAgICAgICAgICAgIHZhciBpID0gaW5kaWNlc1tpaV07CiAgICAgICAgICAgICAgICBpZiAoZGF0YVtpXSA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgY29udGludWU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB2YXIgeCA9IE1hdGguZmxvb3IoeEZuKGkpKTsKICAgICAgICAgICAgICAgIHZhciB5ID0geUZuKGkpOwogICAgICAgICAgICAgICAgaWYgKGJ1Y2tldCA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgYnVja2V0ID0gbmV3IHV0aWxzJDEuQnVja2V0KGksIHgsIHkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAoYnVja2V0LmlzSW5CdWNrZXQoeCkpIHsKICAgICAgICAgICAgICAgICAgICBidWNrZXQuYWRkVG9CdWNrZXQoeSwgaSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBmaWx0ZXJlZEluZGljZXMucHVzaC5hcHBseShmaWx0ZXJlZEluZGljZXMsIGJ1Y2tldC5nZXRVbmlxdWVJbmRpY2VzKCkpOwogICAgICAgICAgICAgICAgICAgIGJ1Y2tldCA9IG5ldyB1dGlscyQxLkJ1Y2tldChpLCB4LCB5KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoYnVja2V0ICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIGZpbHRlcmVkSW5kaWNlcy5wdXNoLmFwcGx5KGZpbHRlcmVkSW5kaWNlcywgYnVja2V0LmdldFVuaXF1ZUluZGljZXMoKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIGZpbHRlcmVkSW5kaWNlczsKICAgICAgICB9OwogICAgICAgIHJldHVybiBMaW5lOwogICAgfSh4eVBsb3QuWFlQbG90KSk7CiAgICBleHBvcnRzLkxpbmUgPSBMaW5lOwogICAgfSk7CgogICAgdmFyIGFyZWFQbG90ID0gY3JlYXRlQ29tbW9uanNNb2R1bGUoZnVuY3Rpb24gKG1vZHVsZSwgZXhwb3J0cykgewogICAgLyoqCiAgICAgKiBDb3B5cmlnaHQgMjAxNC1wcmVzZW50IFBhbGFudGlyIFRlY2hub2xvZ2llcwogICAgICogQGxpY2Vuc2UgTUlUCiAgICAgKi8KICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCAiX19lc01vZHVsZSIsIHsgdmFsdWU6IHRydWUgfSk7CgoKCgoKCgoKCgoKICAgIHZhciBBcmVhID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikgewogICAgICAgIHRzbGliX2VzNi5fX2V4dGVuZHMoQXJlYSwgX3N1cGVyKTsKICAgICAgICAvKioKICAgICAgICAgKiBBbiBBcmVhIFBsb3QgZHJhd3MgYSBmaWxsZWQgcmVnaW9uIChhcmVhKSBiZXR3ZWVuIFkgYW5kIFkwLgogICAgICAgICAqCiAgICAgICAgICogQGNvbnN0cnVjdG9yCiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gQXJlYSgpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcykgfHwgdGhpczsKICAgICAgICAgICAgX3RoaXMuYWRkQ2xhc3MoImFyZWEtcGxvdCIpOwogICAgICAgICAgICBfdGhpcy55MCgwKTsgLy8gZGVmYXVsdAogICAgICAgICAgICBfdGhpcy5hdHRyKCJmaWxsLW9wYWNpdHkiLCAwLjI1KTsKICAgICAgICAgICAgX3RoaXMuYXR0cigiZmlsbCIsIG5ldyBzY2FsZXMuQ29sb3IoKS5yYW5nZSgpWzBdKTsKICAgICAgICAgICAgX3RoaXMuX2xpbmVEcmF3ZXJzID0gbmV3IHV0aWxzJDEuTWFwKCk7CiAgICAgICAgICAgIHJldHVybiBfdGhpczsKICAgICAgICB9CiAgICAgICAgQXJlYS5wcm90b3R5cGUueSA9IGZ1bmN0aW9uICh5LCB5U2NhbGUpIHsKICAgICAgICAgICAgaWYgKHkgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIF9zdXBlci5wcm90b3R5cGUueS5jYWxsKHRoaXMpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh5U2NhbGUgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgX3N1cGVyLnByb3RvdHlwZS55LmNhbGwodGhpcywgeSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLnkuY2FsbCh0aGlzLCB5LCB5U2NhbGUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh5U2NhbGUgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgdmFyIHkwID0gdGhpcy55MCgpLmFjY2Vzc29yOwogICAgICAgICAgICAgICAgaWYgKHkwICE9IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9iaW5kUHJvcGVydHkoQXJlYS5fWTBfS0VZLCB5MCwgeVNjYWxlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuX3VwZGF0ZVlTY2FsZSgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgQXJlYS5wcm90b3R5cGUueTAgPSBmdW5jdGlvbiAoeTApIHsKICAgICAgICAgICAgaWYgKHkwID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9wcm9wZXJ0eUJpbmRpbmdzLmdldChBcmVhLl9ZMF9LRVkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciB5QmluZGluZyA9IHRoaXMueSgpOwogICAgICAgICAgICB2YXIgeVNjYWxlID0geUJpbmRpbmcgJiYgeUJpbmRpbmcuc2NhbGU7CiAgICAgICAgICAgIHRoaXMuX2JpbmRQcm9wZXJ0eShBcmVhLl9ZMF9LRVksIHkwLCB5U2NhbGUpOwogICAgICAgICAgICB0aGlzLl91cGRhdGVZU2NhbGUoKTsKICAgICAgICAgICAgdGhpcy5yZW5kZXIoKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBBcmVhLnByb3RvdHlwZS5fb25EYXRhc2V0VXBkYXRlID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLl9vbkRhdGFzZXRVcGRhdGUuY2F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bCh0aGlzLCBkYXRhc2V0KTsKICAgICAgICAgICAgdmFyIGRyYXdlciA9IHRoaXMuX2xpbmVEcmF3ZXJzLmdldChkYXRhc2V0KTsKICAgICAgICAgICAgaWYgKHRoaXMucmVuZGVyZXIoKSA9PT0gInN2ZyIpIHsKICAgICAgICAgICAgICAgIGRyYXdlci51c2VTVkcodGhpcy5fcmVuZGVyQXJlYSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBkcmF3ZXIudXNlQ2FudmFzKHRoaXMuX2NhbnZhcyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIGRyYXdlcjsKICAgICAgICB9OwogICAgICAgIEFyZWEucHJvdG90eXBlLl9yZW1vdmVEYXRhc2V0Tm9kZXMgPSBmdW5jdGlvbiAoZGF0YXNldCkgewogICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLl9yZW1vdmVEYXRhc2V0Tm9kZXMuY2FsbCh0aGlzLCBkYXRhc2V0KTsKICAgICAgICAgICAgdGhpcy5fbGluZURyYXdlcnMuZ2V0KGRhdGFzZXQpLnJlbW92ZSgpOwogICAgICAgIH07CiAgICAgICAgQXJlYS5wcm90b3R5cGUuX2FkZGl0aW9uYWxQYWludCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgdmFyIGRyYXdTdGVwcyA9IHRoaXMuX2dlbmVyYXRlTGluZURyYXdTdGVwcygpOwogICAgICAgICAgICB2YXIgZGF0YVRvRHJhdyA9IHRoaXMuX2dldERhdGFUb0RyYXcoKTsKICAgICAgICAgICAgdGhpcy5kYXRhc2V0cygpLmZvckVhY2goZnVuY3Rpb24gKGRhdGFzZXQpIHsKICAgICAgICAgICAgICAgIHZhciBhcHBsaWVkRHJhd1N0ZXBzID0gcGxvdC5QbG90LmFwcGx5RHJhd1N0ZXBzKGRyYXdTdGVwcywgZGF0YXNldCk7CiAgICAgICAgICAgICAgICBfdGhpcy5fbGluZURyYXdlcnMuZ2V0KGRhdGFzZXQpLmRyYXcoZGF0YVRvRHJhdy5nZXQoZGF0YXNldCksIGFwcGxpZWREcmF3U3RlcHMpOwogICAgICAgICAgICB9KTsKICAgICAgICB9OwogICAgICAgIEFyZWEucHJvdG90eXBlLl9nZW5lcmF0ZUxpbmVEcmF3U3RlcHMgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHZhciBkcmF3U3RlcHMgPSBbXTsKICAgICAgICAgICAgaWYgKHRoaXMuX2FuaW1hdGVPbk5leHRSZW5kZXIoKSkgewogICAgICAgICAgICAgICAgdmFyIGF0dHJUb1Byb2plY3RvciA9IHRoaXMuX2dlbmVyYXRlTGluZUF0dHJUb1Byb2plY3RvcigpOwogICAgICAgICAgICAgICAgYXR0clRvUHJvamVjdG9yWyJkIl0gPSB0aGlzLl9jb25zdHJ1Y3RMaW5lUHJvamVjdG9yKHBsb3QuUGxvdC5fc2NhbGVkQWNjZXNzb3IodGhpcy54KCkpLCB0aGlzLl9nZXRSZXNldFlGdW5jdGlvbigpKTsKICAgICAgICAgICAgICAgIGRyYXdTdGVwcy5wdXNoKHsgYXR0clRvUHJvamVjdG9yOiBhdHRyVG9Qcm9qZWN0b3IsIGFuaW1hdG9yOiB0aGlzLl9nZXRBbmltYXRvcihwbG90cy5BbmltYXRvci5SRVNFVCkgfSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZHJhd1N0ZXBzLnB1c2goewogICAgICAgICAgICAgICAgYXR0clRvUHJvamVjdG9yOiB0aGlzLl9nZW5lcmF0ZUxpbmVBdHRyVG9Qcm9qZWN0b3IoKSwKICAgICAgICAgICAgICAgIGFuaW1hdG9yOiB0aGlzLl9nZXRBbmltYXRvcihwbG90cy5BbmltYXRvci5NQUlOKSwKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHJldHVybiBkcmF3U3RlcHM7CiAgICAgICAgfTsKICAgICAgICBBcmVhLnByb3RvdHl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gICAgICAgICAgICAgICAgICAgcmV0dXJuIF90aGlzLl9jcmVhdGVBcmVhR2VuZXJhdG9yKHhQcm9qZWN0b3IsIHlQcm9qZWN0b3IsIHkwUHJvamVjdG9yLCBkZWZpbmVkUHJvamVjdG9yLCBkYXRhc2V0KTsKICAgICAgICAgICAgICAgIH0sIGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgICAgICB2YXIgX2EgPSBfdGhpcy5fY29vcmRpbmF0ZVByb2plY3RvcnMoKSwgeFByb2plY3RvciA9IF9hWzBdLCB5UHJvamVjdG9yID0gX2FbMV07CiAgICAgICAgICAgICAgICAgICAgdmFyIGRlZmluZWRQcm9qZWN0b3IgPSBfdGhpcy5fY3JlYXRlRGVmaW5lZFByb2plY3Rvcih4UHJvamVjdG9yLCB5UHJvamVjdG9yKTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gX3RoaXMuX2NyZWF0ZVRvcExpbmVHZW5lcmF0b3IoeFByb2plY3RvciwgeVByb2plY3RvciwgZGVmaW5lZFByb2plY3RvciwgZGF0YXNldCk7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH07CiAgICAgICAgQXJlYS5wcm90b3R5cGUuX2dlbmVyYXRlRHJhd1N0ZXBzID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB2YXIgZHJhd1N0ZXBzID0gW107CiAgICAgICAgICAgIGlmICh0aGlzLl9hbmltYXRlT25OZXh0UmVuZGVyKCkpIHsKICAgICAgICAgICAgICAgIHZhciBhdHRyVG9Qcm9qZWN0b3IgPSB0aGlzLl9nZXRBdHRyVG9Qcm9qZWN0b3IoKTsKICAgICAgICAgICAgICAgIGF0dHJUb1Byb2plY3RvclsiZCJdID0gdGhpcy5fY29uc3RydWN0QXJlYVByb2plY3RvcihwbG90LlBsb3QuX3NjYWxlZEFjY2Vzc29yKHRoaXMueCgpKSwgdGhpcy5fZ2V0UmVzZXRZRnVuY3Rpb24oKSwgcGxvdC5QbG90Ll9zY2FsZWRBY2Nlc3Nvcih0aGlzLnkwKCkpKTsKICAgICAgICAgICAgICAgIGRyYXdTdGVwcy5wdXNoKHsgYXR0clRvUHJvamVjdG9yOiBhdHRyVG9Qcm9qZWN0b3IsIGFuaW1hdG9yOiB0aGlzLl9nZXRBbmltYXRvcihwbG90cy5BbmltYXRvci5SRVNFVCkgfSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZHJhd1N0ZXBzLnB1c2goewogICAgICAgICAgICAgICAgYXR0clRvUHJvamVjdG9yOiB0aGlzLl9nZXRBdHRyVG9Qcm9qZWN0b3IoKSwKICAgICAgICAgICAgICAgIGFuaW1hdG9yOiB0aGlzLl9nZXRBbmltYXRvcihwbG90cy5BbmltYXRvci5NQUlOKSwKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHJldHVybiBkcmF3U3RlcHM7CiAgICAgICAgfTsKICAgICAgICBBcmVhLnByb3RvdHlwZS5fdXBkYXRlWVNjYWxlID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB2YXIgZXh0ZW50cyA9IHRoaXMuZ2V0RXh0ZW50c0ZvclByb3BlcnR5KCJ5MCIpOwogICAgICAgICAgICB2YXIgZXh0ZW50ID0gdXRpbHMkMS5BcnJheS5mbGF0dGVuKGV4dGVudHMpOwogICAgICAgICAgICB2YXIgdW5pcUV4dGVudFZhbHMgPSB1dGlscyQxLkFycmF5LnVuaXEoZXh0ZW50KTsKICAgICAgICAgICAgdmFyIGNvbnN0YW50QmFzZWxpbmUgPSB1bmlxRXh0ZW50VmFscy5sZW5ndGggPT09IDEgPyB1bmlxRXh0ZW50VmFsc1swXSA6IG51bGw7CiAgICAgICAgICAgIHZhciB5QmluZGluZyA9IHRoaXMueSgpOwogICAgICAgICAgICB2YXIgeVNjYWxlID0gKHlCaW5kaW5nICYmIHlCaW5kaW5nLnNjYWxlKTsKICAgICAgICAgICAgaWYgKHlTY2FsZSA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZX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UGxvdC5fc2NhbGVkQWNjZXNzb3IodGhpcy55MCgpKSwKICAgICAgICAgICAgXTsKICAgICAgICB9OwogICAgICAgIEFyZWEucHJvdG90eXBlLl9wcm9wZXJ0eVByb2plY3RvcnMgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHZhciBwcm9wZXJ0eVRvUHJvamVjdG9ycyA9IF9zdXBlci5wcm90b3R5cGUuX3Byb3BlcnR5UHJvamVjdG9ycy5jYWxsKHRoaXMpOwogICAgICAgICAgICB2YXIgX2EgPSB0aGlzLl9jb29yZGluYXRlUHJvamVjdG9ycygpLCB4UHJvamVjdCA9IF9hWzBdLCB5UHJvamVjdG9yID0gX2FbMV0sIHkwUHJvamVjdG9yID0gX2FbMl07CiAgICAgICAgICAgIHByb3BlcnR5VG9Qcm9qZWN0b3JzWyJkIl0gPSB0aGlzLl9jb25zdHJ1Y3RBcmVhUHJvamVjdG9yKHhQcm9qZWN0LCB5UHJvamVjdG9yLCB5MFByb2plY3Rvcik7CiAgICAgICAgICAgIHJldHVybiBwcm9wZXJ0eVRvUHJvamVjdG9yczsKICAgICAgICB9OwogICAgICAgIEFyZWEucHJvdG90eXBlLnNlbGVjdGlvbnMgPSBmdW5jdGlvbiAoZGF0YXNldHMpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgaWYgKGRhdGFzZXRzID09PSB2b2lkIDApIHsgZGF0YXNldHMgPSB0aGlzLmRhdGFzZXRzKCk7IH0KICAgICAgICAgICAgaWYgKHRoaXMucmVuZGVyZXIoKSA9PT0gImNhbnZhcyIpIHsKICAgICAgICAgICAgICAgIHJldHVybiBkMy5zZWxlY3RBbGwoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB2YXIgYWxsU2VsZWN0aW9ucyA9IF9zdXBlci5wcm90b3R5cGUuc2VsZWN0aW9ucy5jYWxsKHRoaXMsIGRhdGFzZXRzKS5ub2RlcygpOwogICAgICAgICAgICB2YXIgbGluZURyYXdlc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7CiAgICAgICAgICAgIH07CiAgICAgICAgfTsKICAgICAgICBBcmVhLnByb3RvdHlwZS5fY3JlYXRlRGVmaW5lZFByb2plY3RvciA9IGZ1bmN0aW9uICh4UHJvamVjdG9yLCB5UHJvamVjdG9yKSB7CiAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoZCwgaSwgZGF0YXNldCkgewogICAgICAgICAgICAgICAgdmFyIHBvc2l0aW9uWCA9IHhQcm9qZWN0b3IoZCwgaSwgZGF0YXNldCk7CiAgICAgICAgICAgICAgICB2YXIgcG9zaXRpb25ZID0geVByb2plY3RvcihkLCBpLCBkYXRhc2V0KTsKICAgICAgICAgICAgICAgIHJldHVybiB1dGlscyQxLk1hdGguaXNWYWxpZE51bWJlcihwb3NpdGlvblgpICYmIHV0aWxzJDEuTWF0aC5pc1ZhbGlkTnVtYmVyKHBvc2l0aW9uWSk7CiAgICAgICAgICAgIH07CiAgICAgICAgfTsKICAgICAgICBBcmVhLnByb3RvdHlwZS5fY3JlYXRlQXJlYUdlbmVyYXRvciA9IGZ1bmN0aW9uICh4UHJvamVjdG9yLCB5UHJvamVjdG9yLCB5MFByb2plY3RvciwgZGVmaW5lZFByb2plY3RvciwgZGF0YXNldCkgewogICAgICAgICAgICAvLyBqdXN0IHJ1bnRpbWUgZXJyb3IgaWYgdXNlciBwYXNzZXMgY3VydmVCdW5kbGUgdG8gYXJlYSBwbG90CiAgICAgICAgICAgIHZhciBjdXJ2ZUZhY3RvcnkgPSB0aGlzLl9nZXRDdXJ2ZUZhY3RvcnkoKTsKICAgICAgICAgICAgdmFyIGFyZWFHZW5lcmF0b3IgPSBkMy5hcmVhKCkKICAgICAgICAgICAgICAgIC54KGZ1bmN0aW9uIChpbm5lckRhdHVtLCBpbm5lckluZGV4KSB7IHJldHVybiB4UHJvamVjdG9yKGlubmVyRGF0dW0sIGlubmVySW5kZXgsIGRhdGFzZXQpOyB9KQogICAgICAgICAgICAgICAgLnkxKGZ1bmN0aW9uIChpbm5lckRhdHVtLCBpbm5lckluZGV4KSB7IHJldHVybiB5UHJvamVjdG9yKGlubmVyRGF0dW0sIGlubmVySW5kZXgsIGRhdGFzZXQpOyB9KQogICAgICAgICAgICAgICAgLnkwKGZ1bmN0aW9uIChpbm5lckRhdHVtLCBpbm5lckluZGV4KSB7IHJldHVybiB5MFByb2plY3Rvcihpbm5lckRhdHVtLCBpbm5lckluZGV4LCBkYXRhc2V0KTsgfSkKICAgICAgICAgICAgICAgIC5jdXJ2ZShjdXJ2ZUZhY3RvcnkpCiAgICAgICAgICAgICAgICAuZGVmaW5lZChmdW5jdGlvbiAoaW5uZXJEYXR1bSwgaW5uZXJJbmRleCkgeyByZXR1cm4gZGVmaW5lZFByb2plY3Rvcihpbm5lckRhdHVtLCBpbm5lckluZGV4LCBkYXRhc2V0KTsgfSk7CiAgICAgICAgICAgIHJldHVybiBhcmVhR2VuZXJhdG9yOwogICAgICAgIH07CiAgICAgICAgQXJlYS5wcm90b3R5cGUuX2NyZWF0ZVRvcExpbmVHZW5lcmF0b3IgPSBmdW5jdGlvbiAoeFByb2plY3RvciwgeVByb2plY3RvciwgZGVmaW5lZFByb2plY3RvciwgZGF0YXNldCkgewogICAgICAgICAgICB2YXIgY3VydmVGYWN0b3J5ID0gdGhpcy5fZ2V0Q3VydmVGYWN0b3J5KCk7CiAgICAgICAgICAgIHZhciBhcmVhR2VuZXJhdG9yID0gZDMubGluZSgpCiAgICAgICAgICAgICAgICAueChmdW5jdGlvbiAoaW5uZXJEYXR1bSwgaW5uZXJJbmRleCkgeyByZXR1cm4geFByb2plY3Rvcihpbm5lckRhdHVtLCBpbm5lckluZGV4LCBkYXRhc2V0KTsgfSkKICAgICAgICAgICAgICAgIC55KGZ1bmN0aW9uIChpbm5lckRhdHVtLCBpbm5lckluZGV4KSB7IHJldHVybiB5UHJvamVjdG9yKGlubmVyRGF0dW0sIGlubmVySW5kZXgsIGRhdGFzZXQpOyB9KQogICAgICAgICAgICAgICAgLmN1cnZlKGN1cnZlRm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4KICAgICAgICAgICAgICogSWYgc28sIHVzZSB0aGUgX2JhclBpeGVsVGhpY2tuZXNzIHByb3BlcnR5IHRvIGFjY2VzcyB0aGUgdGhpY2tuZXNzLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgX3RoaXMuX2ZpeGVkQmFyUGl4ZWxUaGlja25lc3MgPSB0cnVlOwogICAgICAgICAgICBfdGhpcy5hZGRDbGFzcygiYmFyLXBsb3QiKTsKICAgICAgICAgICAgaWYgKG9yaWVudGF0aW9uICE9PSAidmVydGljYWwiICYmIG9yaWVudGF0aW9uICE9PSAiaG9yaXpvbnRhbCIpIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihvcmllbnRhdGlvbiArICIgaXMgbm90IGEgdmFsaWQgb3JpZW50YXRpb24gZm9yIFBsb3RzLkJhciIpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIF90aGlzLl9pc1ZlcnRpY2FsID0gb3JpZW50YXRpb24gPT09ICJ2ZXJ0aWNhbCI7CiAgICAgICAgICAgIF90aGlzLmFuaW1hdG9yKCJiYXNlbGluZSIsIG5ldyBhbmltYXRvcnMuTnVsbCgpKTsKICAgICAgICAgICAgX3RoaXMuYXR0cigiZmlsbCIsIG5ldyBzY2FsZXMuQ29sb3IoKS5yYW5nZSgpWzBdKTsKICAgICAgICAgICAgX3RoaXMuYXR0cihCYXIuX0JBUl9USElDS05FU1NfS0VZLCBmdW5jdGlvbiAoKSB7IHJldHVybiBfdGhpcy5fYmFyUGl4ZWxUaGlja25lc3MoKTsgfSk7CiAgICAgICAgICAgIF90aGlzLl9sYWJlbENvbmZpZyA9IG5ldyB1dGlscyQxLk1hcCgpOwogICAgICAgICAgICBfdGhpcy5fYmFzZWxpbmVWYWx1ZVByb3ZpZGVyID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gW190aGlzLmJhc2VsaW5lVmFsdWUoKV07IH07CiAgICAgICAgICAgIHJldHVybiBfdGhpczsKICAgICAgICB9CiAgICAgICAgQmFyLnByb3RvdHlwZS5jb21wdXRlTGF5b3V0ID0gZnVuY3Rpb24gKG9yaWdpbiwgYXZhaWxhYmxlV2lkdGgsIGF2YWlsYWJsZUhlaWdodCkgewogICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLmNvbXB1dGVMYXlvdXQuY2FsbCh0aGlzLCBvcmlnaW4sIGF2YWlsYWJsZVdpZHRoLCBhdmFpbGFibGVIZWlnaHQpOwogICAgICAgICAgICB0aGlzLl91cGRhdGVFeHRlbnRzKCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgQmFyLnByb3RvdHlwZS54ID0gZnVuY3Rpb24gKHgsIHhTY2FsZSkgewogICAgICAgICAgICBpZiAoeCA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gX3N1cGVyLnByb3RvdHlwZS54LmNhbGwodGhpcyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHhTY2FsZSA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLnguY2FsbCh0aGlzLCB4KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUueC5jYWxsKHRoaXMsIHgsIHhTY2FsZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fdXBkYXRlVGhpY2tuZXNzQXR0cigpOwogICAgICAgICAgICB0aGlzLl91cGRhdGVMZW5ndGhTY2FsZSgpOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIEJhci5wcm90b3R5cGUueSA9IGZ1bmN0aW9uICh5LCB5U2NhbGUpIHsKICAgICAgICAgICAgaWYgKHkgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIF9zdXBlci5wcm90b3R5cGUueS5jYWxsKHRoaXMpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh5U2NhbGUgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgX3N1cGVyLnByb3RvdHlwZS55LmNhbGwodGhpcywgeSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLnkuY2FsbCh0aGlzLCB5LCB5U2NhbGUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX3VwZGF0ZUxlbmd0aFNjYWxlKCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIGJpbmRpbmcgYXNzb2NpYXRlZCB3aXRoIGJhciBsZW5ndGguIExlbmd0aCBpcyB0aGUgY291bnQgb3IgdmFsdWUgdGhlIGJhciBpcyB0cnlpbmcgdG8gc2hvdy4KICAgICAgICAgKiBUaGlzIGlzIHRoZSAueSgpIGZvciBhIHZlcnRpY2FsIHBsb3QgYW5kIC54KCkgZm9yIGEgaG9yaXpvbnRhbCBwbG90LgogICAgICAgICAqLwogICAgICAgIEJhci5wcm90b3R5cGUubGVuZ3RoID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5faXNWZXJ0aWNhbCA/IHRoaXMueSgpIDogdGhpcy54KCk7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBUaGUgYmluZGluZyBhc3NvY2lhdGVkIHdpdGggYmFyIHBvc2l0aW9uLiBQb3NpdGlvbiBzZXBhcmF0ZXMgdGhlIGRpZmZlcmVudCBiYXIgY2F0ZWdvcmllcy4KICAgICAgICAgKiBUaGlzIGlzIHRoZSAueCgpIGZvciBhIHZlcnRpY2FsIHBsb3QgYW5kIC55KCkgZm9yIGEgaG9yaXpvbnRhbCBwbG90LgogICAgICAgICAqLwogICAgICAgIEJhci5wcm90b3R5cGUucG9zaXRpb24gPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9pc1ZlcnRpY2FsID8gdGhpcy54KCkgOiB0aGlzLnkoKTsKICAgICAgICB9OwogICAgICAgIEJhci5wcm90b3R5cGUuYmFyRW5kID0gZnVuY3Rpb24gKGVuZCkgewogICAgICAgICAgICBpZiAoZW5kID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9wcm9wZXJ0eUJpbmRpbmdzLmdldChCYXIuX0JBUl9FTkRfS0VZKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB2YXIgYmluZGluZyA9IHRoaXMucG9zaXRpb24oKTsKICAgICAgICAgICAgdmFyIHNjYWxlID0gYmluZGluZyAmJiBiaW5kaW5nLnNjYWxlOwogICAgICAgICAgICB0aGlzLl9iaW5kUHJvcGVydHkoQmFyLl9CQVJfRU5EX0tFWSwgZW5kLCBzY2FsZSk7CiAgICAgICAgICAgIHRoaXMuX3VwZGF0ZVRoaWNrbmVzc0F0dHIoKTsKICAgICAgICAgICAgdGhpcy5fdXBkYXRlTGVuZ3RoU2NhbGUoKTsKICAgICAgICAgICAgdGhpcy5yZW5kZXIoKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBCYXIucHJvdG90eXBlLmJhckFsaWdubWVudCA9IGZ1bmN0aW9uIChhbGlnbikgewogICAgICAgICAgICBpZiAoYWxpZ24gPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2JhckFsaWdubWVudDsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9iYXJBbGlnbm1lbnQgPSBhbGlnbjsKICAgICAgICAgICAgdGhpcy5fY2xlYXJBdHRyVG9Qcm9qZWN0b3JDYWNoZSgpOwogICAgICAgICAgICB0aGlzLnJlbmRlcigpOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIEdldHMgdGhlIG9yaWVudGF0aW9uIG9mIHRoZSBwbG90CiAgICAgICAgICoKICAgICAgICAgKiBA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H0KICAgICAgICAgICAgICAgIGlmICghdGhpcy5fcHJvamVjdG9yc1JlYWR5KCkpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gMDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHZhciBsZW5ndGhTY2FsZSA9IHRoaXMubGVuZ3RoKCkuc2NhbGU7CiAgICAgICAgICAgICAgICBpZiAoIWxlbmd0aFNjYWxlKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDA7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAobGVuZ3RoU2NhbGUgaW5zdGFuY2VvZiBzY2FsZXMuVGltZSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRGF0ZSgwKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiAwOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2Jhc2VsaW5lVmFsdWUgPSB2YWx1ZTsKICAgICAgICAgICAgdGhpcy5fdXBkYXRlTGVuZ3RoU2NhbGUoKTsKICAgICAgICAgICAgdGhpcy5fY2xlYXJBdHRyVG9Qcm9qZWN0b3JDYWNoZSgpOwogICAgICAgICAgICB0aGlzLnJlbmRlcigpOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIEJhci5wcm90b3R5cGUuYWRkRGF0YXNldCA9IGZ1bmN0aW9uIChkYXRhc2V0KSB7CiAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUuYWRkRGF0YXNldC5jYWxsKHRoaXMsIGRhdGFzZXQpOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIEJhci5wcm90b3R5cGUuX2FkZERhdGFzZXQgPSBmdW5jdGlvbiAoZGF0YXNldCkgewogICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLl9hZGREYXRhc2V0LmNhbGwodGhpcywgZGF0YXNldCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgQmFyLnByb3RvdHlwZS5yZW1vdmVEYXRhc2V0ID0gZnVuY3Rpb24gKGRhdGFzZXQpIHsKICAgICAgICAgICAgX3N1cGVyLnByb3RvdHlwZS5yZW1vdmVEYXRhc2V0LmNhbGwodGhpcywgZGF0YXNldCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgQmFyLnByb3RvdHlwZS5fcmVtb3ZlRGF0YXNldCA9IGZ1bmN0aW9uIChkYXRhc2V0KSB7CiAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUuX3JlbW92ZURhdGFzZXQuY2FsbCh0aGlzLCBkYXRhc2V0KTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBCYXIucHJvdG90eXBlLmRhdGFzZXRzID0gZnVuY3Rpb24gKGRhdGFzZXRzKSB7CiAgICAgICAgICAgIGlmIChkYXRhc2V0cyA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gX3N1cGVyLnByb3RvdHlwZS5kYXRhc2V0cy5jYWxsKHRoaXMpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUuZGF0YXNldHMuY2FsbCh0aGlzLCBkYXRhc2V0cyk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgQmFyLnByb3RvdHlwZS5sYWJlbHNFbmFibGVkID0gZnVuY3Rpb24gKGVuYWJsZWQsIGxhYmVsc1Bvc2l0aW9uKSB7CiAgICAgICAgICAgIGlmIChlbmFibGVkID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9sYWJlbHNFbmFibGVkOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fbGFiZWxzRW5hYmxlZCA9IGVuYWJsZWQ7CiAgICAgICAgICAgICAgICBpZiAobGFiZWxzUG9zaXRpb24gIT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX2xhYmVsc1Bvc2l0aW9uID0gbGFiZWxzUG9zaXRpb247CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLl9jbGVhckF0dHJUb1Byb2plY3RvckNhY2hlKCk7CiAgICAgICAgICAgICAgICB0aGlzLnJlbmRlcigpOwogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIEJhci5wcm90b3R5cGUubGFiZWxGb3JtYXR0ZXIgPSBmdW5jdGlvbiAoZm9ybWF0dGVyKSB7CiAgICAgICAgICAgIGlmIChmb3JtYXR0ZXIgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2xhYmVsRm9ybWF0dGVyOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fbGFiZWxGb3JtYXR0ZXIgPSBmb3JtYXR0ZXI7CiAgICAgICAgICAgICAgICB0aGlzLl9jbGVhckF0dHJUb1Byb2plY3RvckNhY2hlKCk7CiAgICAgICAgICAgICAgICB0aGlzLnJlbmRlcigpOwogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIEJhci5wcm90b3R5cGUuX2NyZWF0ZU5vZGVzRm9yRGF0YXNldCA9IGZ1bmN0aW9uIChkYXRhc2V0KSB7CiAgICAgICAgICAgIHZhciBkcmF3ZXIgPSBfc3VwZXIucHJvdG90eXBlLl9jcmVhdGVOb2Rlc0ZvckRhdGFzZXQuY2FsbCh0aGlzLCBkYXRhc2V0KTsKICAgICAgICAgICAgdmFyIGxhYmVsQXJlYSA9IHRoaXMuX3JlbmRlckFyZWEuYXBwZW5kKCJnIikuY2xhc3NlZChCYXIuX0xBQkVMX0FSRUFfQ0xBU1MsIHRydWUpOwogICAgICAgIC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oaXMuX2xpZ2h0d2VpZ2h0UGxvdEVudGl0eVRvUGxvdEVudGl0eShuZWFyZXN0KTsKICAgICAgICAgICAgfTsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2ZpeGVkQmFyUGl4ZWxUaGlja25lc3MgPyB0aGlzLl9jb21wdXRlQmFyUGl4ZWxUaGlja25lc3MuZG9Mb2NrZWQod29ya2VyKSA6IHdvcmtlcigpOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogR2V0cyB0aGUgRW50aXRpZXMgYXQgYSBwYXJ0aWN1bGFyIFBvaW50LgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtQb2ludH0gcAogICAgICAgICAqIEByZXR1cm5zIHtQbG90RW50aXR5W119CiAgICAgICAgICovCiAgICAgICAgQmFyLnByb3RvdHlwZS5lbnRpdGllc0F0ID0gZnVuY3Rpb24gKHApIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgdmFyIHdvcmtlciA9IGZ1bmN0aW9uICgpIHsgcmV0dXJuIF90aGlzLl9lbnRpdGllc0ludGVyc2VjdGluZyhwLngsIHAueSk7IH07CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9maXhlZEJhclBpeGVsVGhpY2tuZXNzID8gdGhpcy5fY29tcHV0ZUJhclBpeGVsVGhpY2tuZXNzLmRvTG9ja2VkKHdvcmtlcikgOiB3b3JrZXIoKTsKICAgICAgICB9OwogICAgICAgIEJhci5wcm90b3R5cGUuZW50aXRpZXNJbkJvdW5kcyA9IGZ1bmN0aW9uIChxdWVyeUJvdW5kcykgewogICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwogICAgICAgICAgICB2YXIgd29ya2VyID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gX3N1cGVyLnByb3RvdHlwZS5lbnRpdGllc0luQm91bmRzLmNhbGwoX3RoaXMsIHF1ZXJ5Qm91bmRzKTsgfTsKICAgICAgICAgICAgcmV0dXJuIHRoa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UpIHsKICAgICAgICAgICAgdmFyIGludGVyc2VjdGVkID0gW107CiAgICAgICAgICAgIHZhciBlbnRpdGllcyA9IHRoaXMuX2dldEVudGl0eVN0b3JlKCkuZW50aXRpZXMoKTsKICAgICAgICAgICAgdmFyIGVudGl0aWVzTGVuID0gZW50aXRpZXMubGVuZ3RoOwogICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGVudGl0aWVzTGVuOyBpKyspIHsKICAgICAgICAgICAgICAgIHZhciBlbnRpdHkgPSBlbnRpdGllc1tpXTsKICAgICAgICAgICAgICAgIGlmICh1dGlscyQxLkRPTS5pbnRlcnNlY3RzQkJveCh4VmFsT3JSYW5nZSwgeVZhbE9yUmFuZ2UsIHRoaXMuX2VudGl0eUJvdW5kcyhlbnRpdHkpKSkgewogICAgICAgICAgICAgICAgICAgIGludGVyc2VjdGVkLnB1c2godGhpcy5fbGlnaHR3ZWlnaHRQbG90RW50aXR5VG9QbG90RW50aXR5KGVudGl0eSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBpbnRlcnNlY3RlZDsKICAgICAgICB9OwogICAgICAgIEJhci5wcm90b3R5cGUuX3VwZGF0ZUxlbmd0aFNjYWxlID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICBpZiAoIXRoaXMuX3Byb2plY3RvcnNSZWFkeSgpKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIGxlbmd0aFNjYWxlID0gdGhpcy5sZW5ndGgoKS5zY2FsZTsKICAgICAgICAgICAgaWYgKGxlbmd0aFNjYWxlIGluc3RhbmNlb2YgcXVhbnRpdGF0aXZlU2NhbGUuUXVhbnRpdGF0aXZlU2NhbGUpIHsKICAgICAgICAgICAgICAgIGxlbmd0aFNjYWxlLmFkZFBhZGRpbmdFeGNlcHRpb25zUHJvdmlkZXIodGhpcy5fYmFzZWxpbmVWYWx1ZVByb3ZpZGV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uX2lzVmVydGljYWwpIHsKICAgICAgICAgICAgICAgIGFjY1NjYWxlQmluZGluZyA9IHRoaXMueCgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKHByb3BlcnR5ID09PSAieSIgJiYgIXRoaXMuX2lzVmVydGljYWwpIHsKICAgICAgICAgICAgICAgIGFjY1NjYWxlQmluZGluZyA9IHRoaXMueSgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIGV4dGVudHM7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKCEoYWNjU2NhbGVCaW5kaW5nICYmIGFjY1NjYWxlQmluZGluZy5zY2FsZSAmJiBhY2NTY2FsZUJpbmRpbmcuc2NhbGUgaW5zdGFuY2VvZiBxdWFudGl0YXRpdmVTY2FsZS5RdWFudGl0YXRpdmVTY2FsZSkpIHsKICAgICAgICAgICAgICAgIHJldHVybiBleHRlbnRzOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciBzY2FsZSA9IGFjY1NjYWxlQmluZGluZy5zY2FsZTsKICAgICAgICAgICAgdmFyIHdpZHRoID0gdGhpcy5fYmFyUGl4ZWxUaGlja25lc3MoKTsKICAgICAgICAgICAgLy8gVG8gYWNjb3VudCBmb3IgaW52ZXJ0ZWQgZG9tYWlucwogICAgICAgICAgICBleHRlbnRzID0gZXh0ZW50cy5tYXAoZnVuY3Rpb24gKGV4dGVudCkgeyByZXR1cm4gZDMuZXh0ZW50KFsKICAgICAgICAgICAgICAgIHNjYWxlLmludmVydChfdGhpcy5fZ2V0UG9zaXRpb25BdHRyKHNjYWxlLnNjYWxlKGV4dGVudFswXSksIHdpZHRoKSksCiAgICAgICAgICAgICAgICBzY2FsZS5pbnZlcnQoX3RoaXMuX2dldFBvc2l0aW9uQXR0cihzY2FsZS5zY2FsZShleHRlbnRbMF0pLCB3aWR0aCkgKyB3aWR0aCksCiAgICAgICAgICAgICAgICBzY2FsZS5pbnZlcnQoX3RoaXMuX2dldFBvc2l0aW9uQXR0cihzY2FsZS5zY2FsZShleHRlbnRbMV0pLCB3aWR0aCkpLAogICAgICAgICAgICAgICAgc2NhbGUuaW52ZXJ0KF90aGlzLl9nZXRQb3NpdGlvbkF0dHIoc2NhbGUuc2NhbGUoZXh0ZW50WzFdKSwgd2lkdGgpICsgd2lkdGgpLAogICAgICAgICAgICBdKTsgfSk7CiAgICAgICAgICAgIHJldHVybiBleHRlbnRzOwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0dXJuIHRoZSA8cmVjdD4ncyB4IG9yIHkgYXR0ciB2YWx1ZSBnaXZlbiB0aGUgcG9zaXRpb24gYW5kIHRoaWNrbmVzcyBvZgogICAgICAgICAqIHRoYXQgYmFyLiBUaGlzIG1ldGhvZCBpcyByZXNwb25zaWJsZSBmb3IgYWNjb3VudCBmb3IgYmFyQWxpZ25tZW50LCBpbiBwYXJ0aWN1bGFyLgogICAgICAgICAqLwogICAgICAgIEJhci5wcm90b3R5cGUuX2dldFBvc2l0aW9uQXR0ciA9IGZ1bmN0aW9uIChwb3NpdGlvbiwgdGhpY2tuZXNzKSB7CiAgICAgICAgICAgIC8vIGFjY291bnQgZm9yIGZsaXBwZWQgdmVydGljYWwgYXhpcwogICAgICAgICAgICBpZiAoIXRoaXMuX2lzVmVydGljYWwpIHsKICAgICAgICAgICAgICAgIHBvc2l0aW9uIC09IHRoaWNrbmVzczsKICAgICAgICAgICAgICAgIHRoaWNrbmVzcyAqPSAtMTsKICAgICAgICAgICAgfQogICAgICAgICAgICBzd2l0Y2ggKHRoaXMuX2JhckFsaWdubWVudCkgewogICAgICAgICAgICAgICAgY2FzZSAic3RhcnQiOgogICAgICAgICAgICAgICAgICAgIHJldHVybiBwb3NpdGlvbjsKICAgICAgICAgICAgICAgIGNhc2UgImVuZCI6CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHBvc2l0aW9uIC0gdGhpY2tuZXNzOwogICAgICAgICAgICAgICAgY2FzZSAibWlkZGxlIjoKICAgICAgICAgICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHBvc2l0aW9uIC0gdGhpY2tuZXNzIC8gMjsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgQmFyLnByb3RvdHlwZS5fZHJhd0xhYmVscyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgdmFyIGRhdGFUb0RyYXcgPSB0aGlzLl9nZXREYXRhVG9EcmF3KCk7CiAgICAgICAgICAgIHZhciBhdHRyVG9Qcm9qZWN0b3IgPSB0aGlzLl9nZXRBdHRyVG9Qcm9qZWN0b3IoKTsKICAgICAgICAgICAgdmFyIGFueUxhYmVsVG9vV2lkZSA9IHRoaXMuZGF0YXNldHMoKS5zb21lKGZ1bmN0aW9uIChkYXRhc2V0KSB7CiAgICAgICAgICAgICAgICByZXR1cm4gZGF0YVRvRHJhdy5nZXQoZGF0YXNldCkuc29tZShmdW5jdGlvbiAoZGF0dW0sIGluZGV4KSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKGRhdHVtID09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gX3RoaXMuX2RyYXdMYWJlbChkYXR1bSwgaW5kZXgsIGRhdGFzZXQsIGF0dHJUb1Byb2plY3Rvcik7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGlmICh0aGlzLl9oaWRlQmFyc0lmQW55QXJlVG9vV2lkZSAmJiBhbnlMYWJlbFRvb1dpZGUpIHsKICAgICAgICAgICAgICAgIHRoaXMuZGF0YXNldHMoKS5mb3JFYWNoKGZ1bmN0aW9uIChkYXRhc2V0KSB7IHJldHVybiBfdGhpcy5fbGFiZWxDb25maWcuZ2V0KGRh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GFsaWdubWVudCA9IF9iLmFsaWdubWVudDsKICAgICAgICAgICAgdmFyIGNvbG9yID0gYXR0clRvUHJvamVjdG9yWyJmaWxsIl0oZGF0dW0sIGluZGV4LCBkYXRhc2V0KTsKICAgICAgICAgICAgdmFyIGxhYmVsQ29udGFpbmVyID0gdGhpcy5fY3JlYXRlTGFiZWxDb250YWluZXIobGFiZWxBcmVhLCBsYWJlbENvbnRhaW5lck9yaWdpbiwgbGFiZWxPcmlnaW4sIG1lYXN1cmVtZW50LCBzaG93TGFiZWxPbkJhciwgY29sb3IpOwogICAgICAgICAgICB2YXIgd3JpdGVPcHRpb25zID0geyB4QWxpZ246IGFsaWdubWVudC54LCB5QWxpZ246IGFsaWdubWVudC55IH07CiAgICAgICAgICAgIHdyaXRlci53cml0ZSh0ZXh0LCBjb250YWluZXJEaW1lbnNpb25zLndpZHRoLCBjb250YWluZXJEaW1lbnNpb25zLmhlaWdodCwgd3JpdGVPcHRpb25zLCBsYWJlbENvbnRhaW5lci5ub2RlKCkpOwogICAgICAgICAgICB2YXIgdG9vV2lkZSA9IHRoaXMuX2lzVmVydGljYWwKICAgICAgICAgICAgICAgID8gYmFyRGltZW5zaW9ucy53aWR0aCA8IChtZWFzdXJlbWVudC53aWR0aCkKICAgICAgICAgICAgICAgIDogYmFyRGltZW5zaW9ucy5oZWlnaHQgPCAobWVhc3VyZW1lbnQuaGVpZ2h0KTsKICAgICAgICAgICAgcmV0dXJuIHRvb1dpZGU7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBMYWJlbHMgYXJlICJvbi1iYXIiIGJ5IGRlZmF1bHQsIGJ1dCBpZiB0aGUgYmFyIGlzIG5vdCBsb25nIGVub3VnaCB0byBmaXQgdGhlIHRleHQsCiAgICAgICAgICogd2UgY2FuIHRyeSBwdXR0aW5nIHRoZSBsYWJlbCAib2ZmLWJhciIsIGlmIHRoZXJlJ3MgZW5vdWdoIHNwYWNlIG91dHNpZGUgb2YgdGhlIGJhcgogICA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bHNlIGlmIChiYXJTdGFydCA8IDApIHsKICAgICAgICAgICAgICAgIGJhckxlbmd0aFZpc2libGVPblNjcmVlbiA9IGJhckVuZDsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gKGxhYmVsTGVuZ3RoICsgQmFyLl9MQUJFTF9NQVJHSU5fSU5TSURFX0JBUiA8PSBiYXJMZW5ndGhWaXNpYmxlT25TY3JlZW4pOwogICAgICAgIH07CiAgICAgICAgQmFyLnByb3RvdHlwZS5fY2FsY3VsYXRlTGFiZWxQcm9wZXJ0aWVzID0gZnVuY3Rpb24gKGJhckNvb3JkaW5hdGVzLCBiYXJEaW1lbnNpb25zLCBtZWFzdXJlbWVudCwgc2hvd0xhYmVsT25CYXIsIGFib3ZlT3JMZWZ0T2ZCYXNlbGluZSkgewogICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwogICAgICAgICAgICB2YXIgYmFyQ29vcmRpbmF0ZSA9IHRoaXMuX2lzVmVydGljYWwgPyBiYXJDb29yZGluYXRlcy55IDogYmFyQ29vcmRpbmF0ZXMueDsKICAgICAgICAgICAgdmFyIGJhckRpbWVuc2lvbiA9IHRoaXMuX2lzVmVydGljYWwgPyBiYXJEaW1lbnNpb25zLmhlaWdodCA6IGJhckRpbWVuc2lvbnMud2lkdGg7CiAgICAgICAgICAgIHZhciBtZWFzdXJlbWVudERpbWVuc2lvbiA9IHRoaXMuX2lzVmVydGljYWwgPyBtZWFzdXJlbWVudC5oZWlnaHQgOiBtZWFzdXJlbWVudC53aWR0aDsKICAgICAgICAgICAgdmFyIGFsaWdubWVudERpbWVuc2lvbiA9ICJjZW50ZXIiOwogICAgICAgICAgICB2YXIgY29udGFpbmVyRGltZW5zaW9uID0gYmFyRGltZW5zaW9uOwogICAgICAgICAgICB2YXIgbGFiZWxDb250YWluZXJPcmlnaW5Db29yZGluYXRlID0gYmFyQ29vcmRpbmF0ZTsKICAgICAgICAgICAgdmFyIGxhYmVsT3JpZ2luQ29vcmRpbmF0ZSA9IGJhckNvb3JkaW5hdGU7CiAgICAgICAgICAgIHZhciB1cGRhdGVDb29yZGluYXRlcyA9IGZ1bmN0aW9uIChwb3NpdGlvbikgewogICAgICAgICAgICAgICAgc3dpdGNoIChwb3NpdGlvbikgewogICAgICAgICAgICAgICAgICAgIGNhc2UgInRvcExlZnQiOgogICAgICAgICAgICAgICAgICAgICAgICBhbGlnbm1lbnREaW1lbnNpb24gPSBfdGhpcy5faXNWZXJ0aWNhbCA/ICJ0b3AiIDogImxlZnQiOwogICAgICAgICAgICAgICAgICAgICAgICBsYWJlbENvbnRhaW5lck9yaWdpbkNvb3JkaW5hdGUgKz0gQmFyLl9MQUJFTF9NQVJHSU5fSU5TSURFX0JBUjsKICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWxPcmlnaW5Db29yZGluYXRlICs9IEJhci5fTEFCRUxfTUFSR0lOX0lOU0lERV9CQVI7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICBjYXNlICJjZW50ZXIiOgogICAgICAgICAgICAgICAgICAgICAgICBsYWJlbE9yaWdpbkNvb3JkaW5hdGUgKz0gKGJhckRpbWVuc2lvbiArIG1lYXN1cmVtZW50RGltZW5zaW9uKSAvIDI7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICBjYXNlICJib3R0b21SaWdodCI6CiAgICAgICAgICAgICAgICAgICAgICAgIGFsaWdubWVudERpbWVuc2lvbiA9IF90aGlzLl9pc1ZlcnRpY2FsID8gImJvdHRvbSIgOiAicmlnaHQiOwogICAgICAgICAgICAgICAgICAgICAgICBsYWJlbENvbnRhaW5lck9yaWdpbkNvb3JkaW5hdGUgLT0gQmFyLl9MQUJFTF9NQVJHSU5fSU5TSURFX0JBUjsKICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWxPcmlnaW5Db29yZGluYXRlICs9IGNvbnRhaW5lckRpbWVuc2lvbiAtIEJhci5fTEFCRUxfTUFSR0lOX0lOU0lERV9CQVIgLSBtZWFzdXJlbWVudERpbWVuc2lvbjsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9OwogICAgICAgICAgICBpZiAoc2hvd0xhYmVsT25CYXIpIHsKICAgICAgICAgICAgICAgIHN3aXRjaCAodGhpcy5fbGFiZWxzUG9zaXRpb24pIHsKICAgICAgICAgICAgICAgICAgICBjYXNlIGV4cG9ydHMuTGFiZWxzUG9zaXRpb24uc3RhcnQ6CiAgICAgICAgICAgICAgICAgICAgICAgIGFib3ZlT3JMZWZ0T2ZCYXNlbGluZSA/IHVwZGF0ZUNvb3JkaW5hdGVzKCJib3R0b21SaWdodCIpIDogdXBkYXRlQ29vcmRpbmF0ZXMoInRvcExlZnQiKTsKICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgY2FzZSBleHBvcnRzLkxhYmVsc1Bvc2l0aW9uLm1pZGRsZToKICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlQ29vcmRpbmF0ZXMoImNlbnRlciIpOwogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICBjYXNlIGV4cG9ydHMuTGFiZWxzUG9zaXRpb24uZW5kOgogICAgICAgICAgICAgICAgICAgICAgICBhYm92ZU9yTGVmdE9mQmFzZWxpbmUgPyB1cGRhdGVDb29yZGluYXRlcygidG9wTGVmdCIpIDogdXBkYXRlQ29vcmRpbmF0ZXMoImJvdHRvbVJpZ2h0Iik7CiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgaWYgKGFib3ZlT3JMZWZ0T2ZCYXNlbGluZSkgewogICAgICAgICAgICAgICAgICAgIGFsaWdubWVudERpbWVuc2lvbiA9IHRoaXMuX2lzVmVydGljYWwgPyAidG9wIiA6ICJsZWZ0IjsKICAgICAgICAgICAgICAgICAgICBjb250YWluZXJEaW1lbnNpb24gPSBiYXJEaW1lbnNpb24gKyBCYXIuX0xBQkVMX01BUkdJTl9JTlNJREVfQkFSICsgbWVhc3VyZW1lbnREaW1lbnNpb247CiAgICAgICAgICAgICAgICAgICAgbGFiZWxDb250YWluZXJPcmlnaW5Db29yZGluYXRlIC09IEJhci5fTEFCRUxfTUFSR0lOX0lOU0lERV9CQVIgKyBtZWFzdXJlbWVudERpbWVuc2lvbjsKICAgICAgICAgICAgICAgICAgICBsYWJlbE9yaWdpbkNvb3JkaW5hdGUgLT0gQmFyLl9MQUJFTF9NQVJHSU5fSU5TSURFX0JBUiArIG1lYXN1cmVtZW50RGltZW5zaW9uOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgYWxpZ25tZW50RGltZW5zaW9uID0gdGhpcy5faXNWZXJ0aWNhbCA/ICJib3R0b20iIDogInJpZ2h0IjsKICAgICAgICAgICAgICAgICAgICBjb250YWluZXJEaW1lbnNpb24gPSBiYXJEaW1lbnNpb24gKyBCYXIuX0xBQkVMX01BUkdJTl9JTlNJREVfQkFSICsgbWVhc3VyZW1lbnREaW1lbnNpb247CiAgICAgICAgICAgICAgICAgICAgbGFiZWxPcmlnaW5Db29yZGluYXRlICs9IGJhckRpbWVuc2lvbiArIEJhci5fTEFCRUxfTUFSR0lOX0lOU0lERV9CQVI7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIGNvbnRhaW5lckRpbWVuc2lvbnM6IHsKICAgICAgICAgICAgICAgICAgICB3aWR0aDogdGhpcy5faXNWZXJ0aWNhbCA/IGJhckRpbWVuc2lvbnMud2lkdGggOiBjb250YWluZXJEaW1lbnNpb24sCiAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiB0aGlzLl9pc1ZlcnRpY2FsID8gY29udGFpbmVyRGltZW5zaW9uIDogYmFyRGltZW5zaW9ucy5oZWlnaHQsCiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgbGFiZWxDb250YWluZXJPcmlnaW46IHsKICAgICAgICAgICAgICAgICAgICB4OiB0aGlzLl9pc1ZlcnRpY2FsID8gYmFyQ29vcmRpbmF0ZXMueCA6IGxhYmVsQ29udGFpbmVyT3JpZ2luQ29vcmRpbmF0ZSwKICAgICAgICAgICAgICAgICAgICB5OiB0aGlzLl9pc1ZlcnRpY2FsID8gbGFiZWxDb250YWluZXJPcmlnaW5Db29yZGluYXRlIDogYmFyQ29vcmRpbmF0ZXMueSwKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICBsYWJlbE9yaWdpbjogewogICAgICAgICAgICAgICAgICAgIHg6IHRoaXMuX2lzVmVydGljYWwgPyAoYmFyQ29vcmRpbmF0ZXMueCArIGJhckRpbWVuc2lvbnMud2lkdGggLyAyIC0gbWVhc3VyZW1lbnQud2lkdGggLyAyKSA6IGxhYmVsT3JpZ2luQ29vcmRpbmF0ZSwKICAgICAgICAgICAgICAgICAgICB5OiB0aGlzLl9pc1ZlcnRpY2FsID8gbGFiZWxPcmlnaW5Db29yZGluYXRlIDogKGJhckNvb3JkaW5hdGVzLnkgKyBiYXJEaW1lbnNpb25zLmhlaWdodCAvIDIgLSBtZWFzdXJlbWVudC5oZWlnaHQgLyAyKSwKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICBhbGlnbm1lbnQ6IHsKICAgICAgICAgICAgICAgICAgICB4OiB0aGlzLl9pc1ZlcnRpY2FsID8gImNlbnRlciIgOiBhbGlnbm1lbnREaW1lbnNpb24sCiAgICAgICAgICAgICAgICAgICAgeTogdGhpcy5faXNWZXJ0aWNhbCA/IGFsaWdubWVudERpbWVuc2lvbiA6ICJjZW50ZXIiLAogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgfTsKICAgICAgICB9OwogIC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gICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgdmFyIHN0YXJ0UHJvaiA9IHRoaXMucG9zaXRpb24oKTsKICAgICAgICAgICAgdmFyIGVuZFByb2ogPSB0aGlzLmJhckVuZCgpOwogICAgICAgICAgICBpZiAoc3RhcnRQcm9qICE9IG51bGwgJiYgZW5kUHJvaiAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9maXhlZEJhclBpeGVsVGhpY2tuZXNzID0gZmFsc2U7CiAgICAgICAgICAgICAgICB0aGlzLmF0dHIoQmFyLl9CQVJfVEhJQ0tORVNTX0tFWSwgZnVuY3Rpb24gKGQsIGksIGRhdGEpIHsKICAgICAgICAgICAgICAgICAgICB2YXIgdjEgPSBzdGFydFByb2ouYWNjZXNzb3IoZCwgaSwgZGF0YSk7CiAgICAgICAgICAgICAgICAgICAgdmFyIHYyID0gZW5kUHJvai5hY2Nlc3NvcihkLCBpLCBkYXRhKTsKICAgICAgICAgICAgICAgICAgICB2MSA9IHN0YXJ0UHJvai5zY2FsZSA/IHN0YXJ0UHJvai5zY2FsZS5zY2FsZSh2MSkgOiB2MTsKICAgICAgICAgICAgICAgICAgICB2MiA9IGVuZFByb2ouc2NhbGUgPyBlbmRQcm9qLnNjYWxlLnNjYWxlKHYyKSA6IHYyOwogICAgICAgICAgICAgICAgICAgIHJldHVybiBNYXRoLmFicyh2MiAtIHYxKTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fZml4ZWRCYXJQaXhlbFRoaWNrbmVzcyA9IHRydWU7CiAgICAgICAgICAgICAgICB0aGlzLmF0dHIoQmFyLl9CQVJfVEhJQ0tORVNTX0tFWSwgZnVuY3Rpb24gKCkgeyByZXR1cm4gX3RoaXMuX2JhclBpeGVsVGhpY2tuZXNzKCk7IH0pOwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBCYXIucHJvdG90eXBlLl9iYXJQaXhlbFRoaWNrbmVzcyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX2ZpeGVkQmFyUGl4ZWxUaGlja25lc3MpIHsKICAgICAgICAgICAgICAgIGlmICh0aGlzLl9wcm9qZWN0b3JzUmVhZHkoKSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9jb21wdXRlQmFyUGl4ZWxUaGlja25lc3ModGhpcy5wb3NpdGlvbigpLCB0aGlzLmRhdGFzZXRzKCksIHRoaXMuX2lzVmVydGljYWwgPyB0aGlzLndpZHRoKCkgOiB0aGlzLmhlaWdodCgpKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIHJldHVybiAwOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIDA7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIEJhci5wcm90b3R5cGUuZW50aXRpZXMgPSBmdW5jdGlvbiAoZGF0YXNldHMpIHsKICAgICAgICAgICAgaWYgKGRhdGFzZXRzID09PSB2b2lkIDApIHsgZGF0YXNldHMgPSB0aGlzLmRhdGFzZXRzKCk7IH0KICAgICAgICAgICAgaWYgKCF0aGlzLl9wcm9qZWN0b3JzUmVhZHkoKSkgewogICAgICAgICAgICAgICAgcmV0dXJuIFtdOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciBlbnRpdGllcyA9IF9zdXBlci5wcm90b3R5cGUuZW50aXRpZXMuY2FsbCh0aGlzLCBkYXRhc2V0cyk7CiAgICAgICAgICAgIHJldHVybiBlbnRpdGllczsKICAgICAgICB9OwogICAgICAgIEJhci5wcm90b3R5cGUuX2VudGl0eUJvdW5kcyA9IGZ1bmN0aW9uIChlbnRpdHkpIHsKICAgICAgICAgICAgdmFyIGRhdHVtID0gZW50aXR5LmRhdHVtLCBpbmRleCA9IGVudGl0eS5pbmRleCwgZGF0YXNldCA9IGVudGl0eS5kYXRhc2V0OwogICAgICAgICAgICByZXR1cm4gdGhpcy5fcGl4ZWxCb3VuZHMoZGF0dW0sIGluZGV4LCBkYXRhc2V0KTsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIFRoZSByZWN0YW5ndWxhciBib3VuZHMgb2YgYSBiYXIuIE5vdGUgdGhhdCB0aGUgeC95IGNvb3JkaW5hdGVzIGFyZSBub3QgdGhlCiAgICAgICAgICogc2FtZSBhcyB0aGUgInBpeGVsIHBvaW50IiBiZWNhdXNlIHRoZXkgYXJlIGFsd2F5cyBhdCB0aGUgdG9wL2xlZnQgb2YgdGhlCiAgICAgICAgICogYmFyLgogICAgICAgICAqLwogICAgICAgIEJhci5wcm90b3R5cGUuX3BpeGVsQm91bmRzID0gZnVuY3Rpb24gKGRhdHVtLCBpbmRleCwgZGF0YXNldCkgewogICAgICAgICAgICB2YXIgYXR0clRvUHJvamVjdG9yID0gdGhpcy5fZ2V0QXR0clRvUHJvamVjdG9yKCk7CiAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICB4OiBhdHRyVG9Qcm9qZWN0b3JbIngiXShkYXR1bSwgaW5kZXgsIGRhdGFzZXQpLAogICAgICAgICAgICAgICAgeTogYXR0clRvUHJvamVjdG9yWyJ5Il0oZGF0dW0sIGluZGV4LCBkYXRhc2V0KSwKICAgICAgICAgICAgICAgIHdpZHRoOiBhdHRyVG9Qcm9qZWN0b3JbIndpZHRoIl0oZGF0dW0sIGluZGV4LCBkYXRhc2V0KSwKICAgICAgICAgICAgICAgIGhlaWdodDogYXR0clRvUHJvamVjdG9yWyJoZWlnaHQiXShkYXR1bSwgaW5kZXgsIGRhdGFzZXQpLAogICAgICAgICAgICB9OwogICAgICAgIH07CiAgICAgICAgLyoqCiAgICAgICAgICogVGhlICJwaXhlbCBwb2ludCIgb2YgYSBiYXIgaXMgdGhlIGZhcnRoZXN0I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uLCBzY2FsZWRCYXNlbGluZSwgcmVjdCkgewogICAgICAgICAgICB2YXIgeCwgeTsKICAgICAgICAgICAgaWYgKHRoaXMuX2lzVmVydGljYWwpIHsKICAgICAgICAgICAgICAgIHggPSByZWN0LnggKyByZWN0LndpZHRoIC8gMjsKICAgICAgICAgICAgICAgIHkgPSBvcmlnaW5hbFBvc2l0aW9uIDw9IHNjYWxlZEJhc2VsaW5lID8gcmVjdC55IDogcmVjdC55ICsgcmVjdC5oZWlnaHQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB4ID0gb3JpZ2luYWxQb3NpdGlvbiA+PSBzY2FsZWRCYXNlbGluZSA/IHJlY3QueCArIHJlY3Qud2lkdGggOiByZWN0Lng7CiAgICAgICAgICAgICAgICB5ID0gcmVjdC55ICsgcmVjdC5oZWlnaHQgLyAyOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB7IHg6IHgsIHk6IHkgfTsKICAgICAgICB9OwogICAgICAgIEJhci5wcm90b3R5cGUuX3VuaW5zdGFsbFNjYWxlRm9yS2V5ID0gZnVuY3Rpb24gKHNjYWxlLCBrZXkpIHsKICAgICAgICAgICAgX3N1cGVyLnByb3RvdHlwZS5fdW5pbnN0YWxsU2NhbGVGb3JLZXkuY2FsbCh0aGlzLCBzY2FsZSwga2V5KTsKICAgICAgICB9OwogICAgICAgIEJhci5wcm90b3R5cGUuX2dldERhdGFUb0RyYXcgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7CiAgICAgICAgICAgIHZhciBkYXRhVG9EcmF3ID0gbmV3IHV0aWxzJDEuTWFwKCk7CiAgICAgICAgICAgIHZhciBhdHRyVG9Qcm9qZWN0b3IgPSB0aGlzLl9nZXRBdHRyVG9Qcm9qZWN0b3IoKTsKICAgICAgICAgICAgdmFyIHBsb3RXaWR0aCA9IHRoaXMud2lkdGgoKTsKICAgICAgICAgICAgdm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ogQ29weXJpZ2h0IDIwMTQtcHJlc2VudCBQYWxhbnRpciBUZWNobm9sb2dpZXMKICAgICAqIEBsaWNlbnNlIE1JVAogICAgICovCiAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgIl9fZXNNb2R1bGUiLCB7IHZhbHVlOiB0cnVlIH0pOwoKCgoKCgoKCgoKCgogICAgdmFyIFBpZSA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHsKICAgICAgICB0c2xpYl9lczYuX19leHRlbmRzKFBpZSwgX3N1cGVyKTsKICAgICAgICAvKioKICAgICAgICAgKiBAY29uc3RydWN0b3IKICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBQaWUoKSB7CiAgICAgICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMpIHx8IHRoaXM7CiAgICAgICAgICAgIF90aGlzLl9zdGFydEFuZ2xlID0gMDsKICAgICAgICAgICAgX3RoaXMuX2VuZEFuZ2xlID0gMiAqIE1hdGguUEk7CiAgICAgICAgICAgIF90aGlzLl9sYWJlbEZvcm1hdHRlciA9IGZvcm1hdHRlcnMuaWRlbnRpdHkoKTsKICAgICAgICAgICAgX3RoaXMuX2xhYmVsc0VuYWJsZWQgPSBmYWxzZTsKICAgICAgICAgICAgX3RoaXMuaW5uZXJSYWRpdXMoMCk7CiAgICAgICAgICAgIF90aGlzLm91dGVyUmFkaXVzKGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgIHZhciBwaWVDZW50ZXIgPSBfdGhpcy5fcGllQ2VudGVyKCk7CiAgICAgICAgICAgICAgICByZXR1cm4gTWF0aC5taW4oTWF0aC5tYXgoX3RoaXMud2lkdGgoKSAtIHBpZUNlbnRlci54LCBwaWVDZW50ZXIueCksIE1hdGgubWF4KF90aGlzLmhlaWdodCgpIC0gcGllQ2VudGVyLnksIHBpZUNlbnRlci55KSk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBfdG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ZUNlbnRlci54LCBwaWVDZW50ZXIueCksIE1hdGgubWF4KHRoaXMuaGVpZ2h0KCkgLSBwaWVDZW50ZXIueSwgcGllQ2VudGVyLnkpKTsKICAgICAgICAgICAgaWYgKHRoaXMuaW5uZXJSYWRpdXMoKS5zY2FsZSAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICB0aGlzLmlubmVyUmFkaXVzKCkuc2NhbGUucmFuZ2UoWzAsIHJhZGl1c0xpbWl0XSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHRoaXMub3V0ZXJSYWRpdXMoKS5zY2FsZSAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICB0aGlzLm91dGVyUmFkaXVzKCkuc2NhbGUucmFuZ2UoWzAsIHJhZGl1c0xpbWl0XSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBQaWUucHJvdG90eXBlLmFkZERhdGFzZXQgPSBmdW5jdGlvbiAoZGF0YXNldCkgewogICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLmFkZERhdGFzZXQuY2FsbCh0aGlzLCBkYXRhc2V0KTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBQaWUucHJvdG90eXBlLl9hZGREYXRhc2V0ID0gZnVuY3Rpb24gKGRhdGFzZXQpIHsKICAgICAgICAgICAgaWYgKHRoaXMuZGF0YXNldHMoKS5sZW5ndGggPT09IDEpIHsKICAgICAgICAgICAgICAgIHV0aWxzJDEuV2luZG93Lndhcm4oIk9ubHkgb25lIGRhdGFzZXQgaXMgc3VwcG9ydGVkIGluIFBpZSBwbG90cyIpOwogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fdXBkYXRlUGllQW5nbGVzKCk7CiAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUuX2FkZERhdGFzZXQuY2FsbCh0aGlzLCBkYXRhc2V0KTsKICAgICAgICAgICAgdmFyIHN0cm9rZURyYXdlciA9IG5ldyBhcmNPdXRsaW5lRHJhd2VyLkFyY091dGxpbmVTVkdEcmF3ZXIoKTsKICAgICAgICAgICAgaWYgKHRoaXMuX2lzU2V0dXApIHsKICAgICAgICAgICAgICAgIHN0cm9rZURyYXdlci5hdHRhY2hUbyh0aGlzLl9yZW5kZXJBcmVhKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9zdHJva2VEcmF3ZXJzLnNldChkYXRhc2V0LCBzdHJva2VEcmF3ZXIpOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIFBpZS5wcm90b3R5cGUucmVtb3ZlRGF0YXNldCA9IGZ1bmN0aW9uIChkYXRhc2V0KSB7CiAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUucmVtb3ZlRGF0YXNldC5jYWxsKHRoaXMsIGRhdGFzZXQpOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIFBpZS5wcm90b3R5cGUuX3JlbW92ZURhdGFzZXROb2RlcyA9IGZ1bmN0aW9uIChkYXRhc2V0KSB7CiAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUuX3JlbW92ZURhdGFzZXROb2Rlcy5jYWxsKHRoaXMsIGRhdGFzZXQpOwogICAgICAgICAgICB0aGlzLl9zdHJva2VEcmF3ZXJzLmdldChkYXRhc2V0KS5yZW1vdmUoKTsKICAgICAgICB9OwogICAgICAgIFBpZS5wcm90b3R5cGUuX3JlbW92ZURhdGFzZXQgPSBmdW5jdGlvbiAoZGF0YXNldCkgewogICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLl9yZW1vdmVEYXRhc2V0LmNhbGwodGhpcywgZGF0YXNldCk7CiAgICAgICAgICAgIHRoaXMuX3N0cm9rZURyYXdlcnMuZGVsZXRlKGRhdGFzZXQpOwogICAgICAgICAgICB0aGlzLl9zdGFydEFuZ2xlcyA9IFtdOwogICAgICAgICAgICB0aGlzLl9lbmRBbmdsZXMgPSBbXTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBQaWUucHJvdG90eXBlLnNlbGVjdGlvbnMgPSBmdW5jdGlvbiAoZGF0YXNldHMpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgaWYgKGRhdGFzZXRzID09PSB2b2lkIDApIHsgZGF0YXNldHMgPSB0aGlzLmRhdGFzZXRzKCk7IH0KICAgICAgICAgICAgdmFyIGFsbFNlbGVjdGlvbnMgPSBfc3VwZXIucHJvdG90eXBlLnNlbGVjdGlvbnMuY2FsbCh0aGlzLCBkYXRhc2V0cykubm9kZXMoKTsKICAgICAgICAgICAgZGF0YXNldHMuZm9yRWFjaChmdW5jdGlvbiAoZGF0YXNldCkgewogICAgICAgICAgICAgICAgdmFyIGRyYXdlciA9IF90aGlzLl9zdHJva2VEcmF3ZXJzLmdldChkYXRhc2V0KTsKICAgICAgICAgICAgICAgIGlmIChkcmF3ZXIgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGFsbFNlbGVjdGlvbnMucHVzaC5hcHBseShhbGxTZWxlY3Rpb25zLCBkcmF3ZXIuZ2V0VmlzdWFsUHJpbWl0aXZlcygpKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHJldHVybiBkMy5zZWxlY3RBbGwoYWxsU2VsZWN0aW9ucyk7CiAgICAgICAgfTsKICAgICAgICBQaWUucHJvdG90eXBlLl9vbkRhdGFzZXRVcGRhdGUgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUuX29uRGF0YXNldFVwZGF0ZS5jYWxsKHRoaXMpOwogICAgICAgICAgICB0aGlzLl91cGRhdGVQaWVBbmdsZXMoKTsKICAgICAgICAgICAgdGhpcy5yZW5kZXIoKTsKICAgICAgICB9OwogICAgICAgIFBpZS5wcm90b3R5cGUuX2NyZWF0ZURyYXdlciA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgcmV0dXJuIG5ldyBkcmF3ZXIuUHJveHlEcmF3ZXIoZnVuY3Rpb24gKCkgeyByZXR1cm4gbmV3IGFyY0RyYXdlci5BcmNTVkdEcmF3ZXIoKTsgfSwgZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgd2luZG93VXRpbHMud2FybigiY2FudmFzIHJlbmRlcmVyIGlzIG5vdCBzdXBwb3J0ZWQgb24gUGllIFBsb3QhIik7CiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICAgICAgfSk7CiAgICAgICAgfTsKICAgICAgICBQaWUucHJvdG90eXBlLmVudGl0aWVzID0gZnVuY3Rpb24gKGRhdGFzZXRzKSB7CiAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7CiAgICAgICAgICAgIGlmIChkYXRhc2V0cyA9PT0gdm9pZCAwKSB7IGRhdGFzZXRzID0gdGhpcy5kYXRhc2V0cygpOyB9CiAgICAgICAgICAgIHZhciBlbnRpdGllcyA9IF9zdXBlci5wcm90b3R5cGUuZW50aXRpZXMuY2FsbCh0aGlzLCBkYXRhc2V0cyk7CiAgICAgICAgICAgIHJldHVybiBlbnRpdGllcy5tYXAoZnVuY3Rpb24gKGVudGl0eSkgewogICAgICAgICAgICAgICAgZW50aXR5LnBvc2l0aW9uLnggKz0gX3RoaXMud2lkdGgoKSAvIDI7CiAgICAgICAgICAgICAgICBlbnRpdHkucG9zaXRpb24ueSArPSBfdGhpcy5oZWlnaHQoKSAvIDI7CiAgICAgICAgICAgICAgICB2YXIgc3Ryb2tlID0gZDMuc2VsZWN0KF90aGlzLl9zdHJva2VEcmF3ZXJzLmdldChlbnRpdHkuZGF0YXNldCkuZ2V0VmlzdWFsUHJpbWl0aXZlQXRJbmRleChlbnRpdHkuaW5kZXgpKTsKICAgICAgICAgICAgICAgIHZhciBwaWVQbG90RW50aXR5ID0gZW50aXR5OwogICAgICAgICAgICAgICAgcGllUGxvdEVudGl0eS5zdHJva2VTZWxlY3Rpb24gPSBzdHJva2U7CiAgICAgICAgICAgICAgICByZXR1cm4gcGllUGxvdEVudGl0eTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfTsKICAgICAgICBQaWUucHJvdG90eXBlLnNlY3RvclZhbHVlID0gZnVuY3Rpb24gKHNlY3RvclZhbHVlLCBzY2FsZSkgewogICAgICAgICAgICBpZiAoc2VjdG9yVmFsdWUgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3Byb3BlcnR5QmluZGluZ3MuZ2V0KFBpZS5fU0VDVE9SX1ZBTFVFX0tFWSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fYmluZFByb3BlcnR5KFBpZS5fU0VDVE9SX1ZBTFVFX0tFWSwgc2VjdG9yVmFsdWUsIHNjYWxlKTsKICAgICAgICAgICAgdGhpcy5fdXBkYXRlUGllQW5nbGVzKCk7CiAgICAgICAgICAgIHRoaXMucmVuZGVyKCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgUGllLnByb3RvdHlwZS5pbm5lclJhZGl1cyA9IGZ1bmN0aW9uIChpbm5lclJhZGl1cywgc2NhbGUpIHsKICAgICAgICAgICAgaWYgKGlubmVyUmFkaXVzID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9wcm9wZXJ0eUJpbmRpbmdzLmdldChQaWUuX0lOTkVSX1JBRElVU19LRVkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2JpbmRQcm9wZXJ0eShQaWUuX0lOTkVSX1JBRElVU19LRVksIGlubmVyUmFkaXVzLCBzY2FsZSk7CiAgICAgICAgICAgIHRoaXMucmVuZGVyKCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgUGllLnByb3RvdHlwZS5vdXRlclJhZGl1cyA9IGZ1bmN0aW9uIChvdXRlclJhZGl1cywgc2NhbGUpIHsKICAgICAgICAgICAgaWYgKG91dGVyUmFkaXVzID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9wcm9wZXJ0eUJpbmRpbmdzLmdldChQaWUuX09VVEVSX1JBRElVU19LRVkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2JpbmRQcm9wZXJ0eShQaWUuX09VVEVSX1JBRElVU19LRVksIG91dGVyUmFkaXVzLCBzY2FsZSk7CiAgICAgICAgICAgIHRoaXMucmVuZGVyKCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgUGllLnByb3RvdHlwZS5zdGFydEFuZ2xlID0gZnVuY3Rpb24gKGFuZ2xlKSB7CiAgICAgICAgICAgIGlmIChhbmdsZSA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fc3RhcnRBbmdsZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuX3N0YXJ0QW5nbGUgPSBhbmdsZTsKICAgICAgICAgICAgICAgIHRoaXMuX3VwZGF0ZVBpZUFuZ2xlcygpOwogICAgICAgICAgICAgICAgdGhpcy5yZW5kZXIoKTsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBQaWUucHJvdG90eXBlLmVuZEFuZ2xlID0gZnVuY3Rpb24gKGFuZ2xlKSB7CiAgICAgICAgICAgIGlmIChhbmdsZSA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fZW5kQW5nbGU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLl9lbmRBbmdsZSA9IGFuZ2xlOwogICAgICAgICAgICAgICAgdGhpcy5fdXBkYXRlUGllQW5nbGVzKCk7CiAgICAgICAgICAgICAgICB0aGlzLnJlbmRlcigpOwogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIFBpZS5wcm90b3R5cGUubGFiZWxzRW5hYmxlZCA9IGZ1bmN0aW9uIChlbmFibGVkKSB7CiAgICAgICAgICAgIGlmIChlbmFibGVkID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9sYWJlbHNFbmFibGVkOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fbGFiZWxzRW5hYmxlZCA9IGVuYWJsZWQ7CiAgICAgICAgICAgICAgICB0aGlzLnJlbmRlcigpOwogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIFBpZS5wcm90b3R5cGUubGFiZWxGb3JtYXR0ZXIgPSBmdW5jdGlvbiAoZm9ybWF0dGVyKSB7CiAgICAgICAgICAgIGlmIChmb3JtYXR0ZXIgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2xhYmVsRm9ybWF0dGVyOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fbGFiZWxGb3JtYXR0ZXIgPSBmb3JtYXR0ZXI7CiAgICAgICAgICAgICAgICB0aGlzLnJlbmRlcigpOwogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIC8qCiAgICAgICAgICogR2V0cyB0aGUgRW50aXRpZXMgYXQgYSBwYXJ0aWN1bGFyIFBvaW50LgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHtQb2ludH0gcAogICAgICAgICAqIEBwYXJhbSB7UGxvdEVudGl0eVtdfQogICAgICAgICAqLwogICAgIC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0FjY2Vzc29yKGRhdHVtLCBpbmRleCwgZHMpKQogICAgICAgICAgICAgICAgICAgIC5vdXRlclJhZGl1cyhvdXRlclJhZGl1c0FjY2Vzc29yKGRhdHVtLCBpbmRleCwgZHMpKQogICAgICAgICAgICAgICAgICAgIC5zdGFydEFuZ2xlKF90aGlzLl9zdGFydEFuZ2xlc1tpbmRleF0pCiAgICAgICAgICAgICAgICAgICAgLmVuZEFuZ2xlKF90aGlzLl9lbmRBbmdsZXNbaW5kZXhdKShkYXR1bSwgaW5kZXgpOwogICAgICAgICAgICB9OwogICAgICAgICAgICByZXR1cm4gYXR0clRvUHJvamVjdG9yOwogICAgICAgIH07CiAgICAgICAgUGllLnByb3RvdHlwZS5fdXBkYXRlUGllQW5nbGVzID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICBpZiAodGhpcy5zZWN0b3JWYWx1ZSgpID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5kYXRhc2V0cygpLmxlbmd0aCA9PT0gMCkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciBzZWN0b3JWYWx1ZUFjY2Vzc29yID0gcGxvdC5QbG90Ll9zY2FsZWRBY2Nlc3Nvcih0aGlzLnNlY3RvclZhbHVlKCkpOwogICAgICAgICAgICB2YXIgZGF0YXNldCA9IHRoaXMuZGF0YXNldHMoKVswXTsKICAgICAgICAgICAgdmFyIGRhdGEgPSB0aGlzLl9nZXREYXRhVG9EcmF3KCkuZ2V0KGRhdGFzZXQpOwogICAgICAgICAgICB2YXIgcGllID0gZDMucGllKCkuc29ydChudWxsKS5zdGFydEFuZ2xlKHRoaXMuX3N0YXJ0QW5nbGUpLmVuZEFuZ2xlKHRoaXMuX2VuZEFuZ2xlKQogICAgICAgICAgICAgICAgLnZhbHVlKGZ1bmN0aW9uIChkLCBpKSB7IHJldHVybiBzZWN0b3JWYWx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AgICAgICAgICAqICBUaGUgc2luZSBpbmRpY2F0ZXMgd2hldGhlciB0aGUgc3RhcnQgYW5kIGVuZCBmYWxsIG9uIHRoZSByaWdodCBoYWxmIG9yIHRoZSBsZWZ0IGhhbGYgb2YgdGhlIHBpZQogICAgICAgICAgICAgKiAgVGhlIGNvc2luZSBpbmRpY2F0ZXMgd2hldGhlciB0aGUgc3RhcnQgYW5kIGVuZCBmYWxsIG9uIHRoZSB0b3Agb3IgdGhlIGJvdHRvbSBoYWxmIG9mIHRoZSBwaWUKICAgICAgICAgICAgICogIERpZmZlcmVudCBjb21iaW5hdGlvbnMgcHJvdmlkZSB0aGUgZGlmZmVyZW50IGhlaWdodHMgYW5kIHdpZHRocyB0aGUgcGllIG5lZWRzIGZyb20gdGhlIGNlbnRlciB0byB0aGUgc2lkZXMKICAgICAgICAgICAgICovCiAgICAgICAgICAgIGlmIChzaW5BID49IDAgJiYgc2luQiA+PSAwKSB7CiAgICAgICAgICAgICAgICBpZiAoY29zQSA+PSAwICYmIGNvc0IgPj0gMCkgewogICAgICAgICAgICAgICAgICAgIGhUb3AgPSBjb3NBOwogICAgICAgICAgICAgICAgICAgIGhCb3R0b20gPSAwOwogICAgICAgICAgICAgICAgICAgIHdMZWZ0ID0gMDsKICAgICAgICAgICAgICAgICAgICB3UmlnaHQgPSBzaW5COwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAoY29zQSA8IDAgJiYgY29zQiA8IDApIHsKICAgICAgICAgICAgICAgICAgICBoVG9wID0gMDsKICAgICAgICAgICAgICAgICAgICBoQm90dG9tID0gLWNvc0I7CiAgICAgICAgICAgICAgICAgICAgd0xlZnQgPSAwOwogICAgICAgICAgICAgICAgICAgIHdSaWdodCA9IHNpbkE7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmIChjb3NBID49IDAgJiYgY29zQiA8IDApIHsKICAgICAgICAgICAgICAgICAgICBoVG9wID0gY29zQTsKICAgICAgICAgICAgICAgICAgICBoQm90dG9tID0gLWNvc0I7CiAgICAgICAgICAgICAgICAgICAgd0xlZnQgPSAwOwogICAgICAgICAgICAgICAgICAgIHdSaWdodCA9IHNpbkE7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmIChjb3NBIDwgMCAmJiBjb3NCID49IDApIHsKICAgICAgICAgICAgICAgICAgICBoVG9wID0gMTsKICAgICAgICAgICAgICAgICAgICBoQm90dG9tID0gMTsKICAgICAgICAgICAgICAgICAgICB3TGVmdCA9IDE7CiAgICAgICAgICAgICAgICAgICAgd1JpZ2h0ID0gTWF0aC5tYXgoc2luQSwgc2luQik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoc2luQSA+PSAwICYmIHNpbkIgPCAwKSB7CiAgICAgICAgICAgICAgICBpZiAoY29zQSA+PSAwICYmIGNvc0IgPj0gMCkgewogICAgICAgICAgICAgICAgICAgIGhUb3AgPSBNYXRoLm1heChjb3NBLCBjb3NCKTsKICAgICAgICAgICAgICAgICAgICBoQm90dG9tID0gMTsKICAgICAgICAgICAgICAgICAgICB3TGVmdCA9IDE7CiAgICAgICAgICAgICAgICAgICAgd1JpZ2h0ID0gMTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKGNvc0EgPCAwICYmIGNvc0IgPCAwKSB7CiAgICAgICAgICAgICAgICAgICAgaFRvcCA9IDA7CiAgICAgICAgICAgICAgICAgICAgaEJvdHRvbSA9IDE7CiAgICAgICAgICAgICAgICAgICAgd0xlZnQgPSAtc2luQjsKICAgICAgICAgICAgICAgICAgICB3UmlnaHQgPSBzaW5BOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAoY29zQSA+PSAwICYmIGNvc0IgPCAwKSB7CiAgICAgICAgICAgICAgICAgICAgaFRvcCA9IGNvc0E7CiAgICAgICAgICAgICAgICAgICAgaEJvdHRvbSA9IDE7CiAgICAgICAgICAgICAgICAgICAgd0xlZnQgPSAtc2luQjsKICAgICAgICAgICAgICAgICAgICB3UmlnaHQgPSAxOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAoY29zQSA8IDAgJiYgY29zQiA+PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgaFRvcCA9IGNvc0I7CiAgICAgICAgICAgICAgICAgICAgaEJvdHRvbSA9IDE7CiAgICAgICAgICAgICAgICAgICAgd0xlZnQgPSAxOwogICAgICAgICAgICAgICAgICAgIHdSaWdodCA9IHNpbkE7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoc2luQSA8IDAgJiYgc2luQiA+PSAwKSB7CiAgICAgICAgICAgICAgICBpZiAoY29zQSA+PSAwICYmIGNvc0IgPj0gMCkgewogICAgICAgICAgICAgICAgICAgIGhUb3AgPSAxOwogICAgICAgICAgICAgICAgICAgIGhCb3R0b20gPSAwOwogICAgICAgICAgICAgICAgICAgIHdMZWZ0ID0gLXNpbkE7CiAgICAgICAgICAgICAgICAgICAgd1JpZ2h0ID0gc2luQjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKGNvc0EgPCAwICYmIGNvc0IgPCAwKSB7CiAgICAgICAgICAgICAgICAgICAgaFRvcCA9IDE7CiAgICAgICAgICAgICAgICAgICAgaEJvdHRvbSA9IE1hdGgubWF4KC1jb3NBLCAtY29zQik7CiAgICAgICAgICAgICAgICAgICAgd0xlZnQgPSAxOwogICAgICAgICAgICAgICAgICAgIHdSaWdodCA9IDE7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmIChjb3NBID49IDAgJiYgY29zQiA8IDApIHsKICAgICAgICAgICAgICAgICAgICBoVG9wID0gMTsKICAgICAgICAgICAgICAgICAgICBoQm90dG9tID0gLWNvc0I7CiAgICAgICAgICAgICAgICAgICAgd0xlZnQgPSAtc2luQTsKICAgICAgICAgICAgICAgICAgICB3UmlnaHQgPSAxOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAoY29zQSA8IDAgJiYgY29zQiA+PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgaFRvcCA9IDE7CiAgICAgICAgICAgICAgICAgICAgaEJvdHRvbSA9IC1jb3NBOwogICAgICAgICAgICAgICAgICAgIHdMZWZ0ID0gMTsKICAgICAgICAgICAgICAgICAgICB3UmlnaHQgPSBzaW5COwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKHNpbkEgPCAwICYmIHNpbkIgPCAwKSB7CiAgICAgICAgICAgICAgICBpZiAoY29zQSA+PSAwICYmIGNvc0IgPj0gMCkgewogICAgICAgICAgICAgICAgICAgIGhUb3AgPSBjb3NCOwogICAgICAgICAgICAgICAgICAgIGhCb3R0b20gPSAwOwogICAgICAgICAgICAgICAgICAgIHdMZWZ0ID0gLXNpbkE7CiAgICAgICAgICAgICAgICAgICAgd1JpZ2h0ID0gMDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKGNvc0EgPCAwICYmIGNvc0IgPCAwKSB7CiAgICAgICAgICAgICAgICAgICAgaFRvcCA9IDA7CiAgICAgICAgICAgICAgICAgICAgaEJvdHRvbSA9IC1jb3NBOwogICAgICAgICAgICAgICAgICAgIHdMZWZ0ID0gLXNpbkI7CiAgICAgICAgICAgICAgICAgICAgd1JpZ2h0ID0gMDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKGNvc0EgPj0gMCAmJiBjb3NCIDwgMCkgewogICAgICAgICAgICAgICAgICAgIGhUb3AgPSAxOwogICAgICAgICAgICAgICAgICAgIGhCb3R0b20gPSAxOwogICAgICAgICAgICAgICAgICAgIHdMZWZ0ID0gTWF0aC5tYXgoY29zQSwgLWNvc0IpOwogICAgICAgICAgICAgICAgICAgIHdSaWdodCA9IDE7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmIChjb3NBIDwgMCAmJiBjb3NCID49IDApIHsKICAgICAgICAgICAgICAgICAgICBoVG9wID0gY29zQjsKICAgICAgICAgICAgICAgICAgICBoQm90dG9tID0gLWNvc0E7CiAgICAgICAgICAgICAgICAgICAgd0xlZnQgPSAxOwogICAgICAgICAgICAgICAgICAgIHdSaWdodCA9IDA7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIHg6IHdMZWZ0ICsgd1JpZ2h0ID09IDAgPyAwIDogKHdMZWZ0IC8gKHdMZWZ0ICsgd1JpZ2h0KSkgKiB0aGlzLndpZHRoKCksCiAgICAgICAgICAgICAgICB5OiBoVG9wICsgaEJvdHRvbSA9PSAwID8gMCA6IChoVG9wIC8gKGhUb3AgKyBoQm90dG9tKSkgKiB0aGlzLmhlaWdodCgpLAogICAgICAgICAgICB9OwogICAgICAgIH07CiAgICAgICAgUGllLnByb3RvdHlwZS5fZ2V0RGF0YVRvRHJhdyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIGRhdGFUb0RyYXcgPSBfc3VwZXIucHJvdG90eXBlLl9nZXREYXRhVG9EcmF3LmNhbGwodGhpcyk7CiAgICAgICAgICAgIGlmICh0aGlzLmRhdGFzZXRzKCkubGVuZ3RoID09PSAwKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gZGF0YVRvRHJhdzsKICAgICAgICAgICAgfQogICAgICAgICAgICB2YXIgc2VjdG9yVmFsdWVBY2Nlc3NvciA9IHBsb3QuUGxvdC5fc2NhbGVkQWNjZXNzb3IodGhpcy5zZWN0b3JWYWx1ZSgpKTsKICAgICAgICAgICAgdmFyIGRzID0gdGhpcy5kYXRhc2V0cygpWzBdOwogICAgICAgICAgICB2YXIgZGF0YSA9IGRhdGFUb0RyYXcuZ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DIpKTsKICAgICAgICAgICAgdmFyIHBvaW50QW5nbGUgPSBNYXRoLmFjb3MoLXAueSAvIHBvaW50UmFkaXVzKTsKICAgICAgICAgICAgaWYgKHAueCA8IDApIHsKICAgICAgICAgICAgICAgIHBvaW50QW5nbGUgPSBNYXRoLlBJICogMiAtIHBvaW50QW5nbGU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIGluZGV4OwogICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRoaXMuX3N0YXJ0QW5nbGVzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5fc3RhcnRBbmdsZXNbaV0gPCBwb2ludEFuZ2xlICYmIHRoaXMuX2VuZEFuZ2xlc1tpXSA+IHBvaW50QW5nbGUpIHsKICAgICAgICAgICAgICAgICAgICBpbmRleCA9IGk7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGluZGV4ICE9PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgICAgIHZhciBkYXRhc2V0ID0gdGhpcy5kYXRhc2V0cygpWzBdOwogICAgICAgICAgICAgICAgdmFyIGRhdHVtID0gZGF0YXNldC5kYXRhKClbaW5kZXhdOwogICAgICAgICAgICAgICAgdmFyIGlubmVyUmFkaXVzID0gdGhpcy5pbm5lclJhZGl1cygpLmFjY2Vzc29yKGRhdHVtLCBpbmRleCwgZGF0YXNldCk7CiAgICAgICAgICAgICAgICB2YXIgb3V0ZXJSYWRpdXMgPSB0aGlzLm91dGVyUmFkaXVzKCkuYWNjZXNzb3IoZGF0dW0sIGluZGV4LCBkYXRhc2V0KTsKICAgICAgICAgICAgICAgIGlmIChwb2ludFJhZGl1cyA+IGlubmVyUmFkaXVzICYmIHBvaW50UmFkaXVzIDwgb3V0ZXJSYWRpdXMpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gaW5kZXg7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgfTsKICAgICAgICBQaWUucHJvdG90eXBlLl9kcmF3TGFiZWxzID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwogICAgICAgICAgICB2YXIgYXR0clRvUHJvamVjdG9yID0gdGhpcy5fZ2V0QXR0clRvUHJvamVjdG9yKCk7CiAgICAgICAgICAgIHZhciBsYWJlbEFyZWEgPSB0aGlzLl9yZW5kZXJBcmVhLmFwcGVuZCgiZyIpLmNsYXNzZWQoImxhYmVsLWFyZWEiLCB0cnVlKTsKICAgICAgICAgICAgdmFyIGNvbnRleHQgPSBuZXcgc3JjJDEuU3ZnQ29udGV4dChsYWJlbEFyZWEubm9kZSgpKTsKICAgICAgICAgICAgdmFyIG1lYXN1cmVyID0gbmV3IHNyYyQxLkNhY2hlTWVhc3VyZXIoY29udGV4dCk7CiAgICAgICAgICAgIHZhciB3cml0ZXIgPSBuZXcgc3JjJDEuV3JpdGVyKG1lYXN1cmVyLCBjb250ZXh0KTsKICAgICAgICAgICAgdmFyIGRhdGFzZXQgPSB0aGlzLmRhdGFzZXRzKClbMF07CiAgICAgICAgICAgIHZhciBkYXRhID0gdGhpcy5fZ2V0RGF0YVRvRHJhdygpLmdldChkYXRhc2V0KTsKICAgICAgICAgICAgdmFyIGRhdGFMZW4gPSBkYXRhLmxlbmd0aDsKICAgICAgICAgICAgdmFyIF9sb29wXzEgPSBmdW5jdGlvbiAoZGF0dW1JbmRleCkgewogICAgICAgICAgICAgICAgdmFyIGRhdHVtID0gZGF0YVtkYXR1bUluZGV4XTsKICAgICAgICAgICAgICAgIHZhciB2YWx1ZSA9IHRoaXNfMS5zZWN0b3JWYWx1ZSgpLmFjY2Vzc29yKGRhdHVtLCBkYXR1bUluZGV4LCBkYXRhc2V0KTsKICAgICAgICAgICAgICAgIGlmICghdXRpbHMkMS5NYXRoLmlzVmFsaWROdW1iZXIodmFsdWUpKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICJjb250aW51ZSI7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB2YWx1ZSA9IHRoaXNfMS5fbGFiZWxGb3JtYXR0ZXIodmFsdWUsIGRhdHVtLCBkYXR1bUluZGV4LCBkYXRhc2V0KTsKICAgICAgICAgICAgICAgIHZhciBtZWFzdXJlbWVudCA9IG1lYXN1cmVyLm1lYXN1cmUodmFsdWUpOwogICAgICAgICAgICAgICAgdmFyIHRoZXRhID0gKHRoaXNfMS5fZW5kQW5nbGVzW2RhdHVtSW5kZXhdICsgdGhpc18xLl9zdGFydEFuZ2xlc1tkYXR1bUluZGV4XSkgLyAyOwogICAgICAgICAgICAgICAgdmFyIG91dGVyUmFkaXVzID0gdGhpc18xLm91dGVyUmFkaXVzKCkuYWNjZXNzb3IoZGF0dW0sIGRhdHVtSW5kZXgsIGRhdGFzZXQpOwogICAgICAgICAgICAgICAgaWYgKHRoaXNfMS5vdXRlclJhZGl1cygpLnNjYWxlKSB7CiAgICAgICAgICAgICAgICAgICAgb3V0ZXJSYWRpdXMgPSB0aGlzXzEub3V0ZXJSYWRpdXMoKS5zY2FsZS5zY2FsZShvdXRlclJhZGl1cyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB2YXIgaW5uZXJSYWRpdXMgPSB0aGlzXzEuaW5uZXJSYWRpdXMoKS5hY2Nlc3NvcihkYXR1bSwgZGF0dW1JbmRleCwgZGF0YXNldCk7CiAgICAgICAgICAgICAgICBpZiAodGhpc18xLmlubmVyUmFkaXVzKCkuc2NhbGUpIHsKICAgICAgICAgICAgICAgICAgICBpbm5lclJhZGl1cyA9IHRoaXNfMS5pbm5lclJhZGl1cygpLnNjYWxlLnNjYWxlKGlubmVyUmFkaXVzKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHZhciBsYWJlbFJhZGl1cyA9IChvdXRlclJhZGl1cyArIGlubmVyUmFkaXVzKSAvIDI7CiAgICAgICAgICAgICAgICB2YXIgeCA9IE1hdGguc2luKHRoZXRhKSAqIGxhYmVsUmFkaXVzIC0gbWVhc3VyZW1lbnQud2lkdGggLyAyOwogICAgICAgICAgICAgICAgdmFyIHkgPSAtTWF0aC5jb3ModGhldGEpICogbGFiZWxSYWRpdXMgLSBtZWFzdXJlbWVudC5oZWlnaHQgLyAyOwogICAgICAgICAgICAgICAgdmFyIGNvcm5lcnMgPSBbCiAgICAgICAgICAgICAgICAgICAgeyB4OiB4LCB5OiB5IH0sCiAgICAgICAgICAgICAgICAgICAgeyB4OiB4LCB5OiB5ICsgbWVhc3VyZW1lbnQuaGVpZ2h0IH0sCiAgICAgICAgICAgICAgICAgICAgeyB4OiB4ICsgbWVhc3VyZW1lbnQud2lkdGgsIHk6IHkgfSwKICAgICAgICAgICAgICAgICAgICB7IHg6IHggKyBtZWFzdXJlbWVudC53aWR0aCwgeTogeSArIG1lYXN1cmVtZW50LmhlaWdodCB9LAogICAgICAgICAgICAgICAgXTsKICAgICAgICAgICAgICAgIHZhciBzaG93TGFiZWwgPSBjb3JuZXJzLmV2ZXJ5KGZ1bmN0aW9uIChjb3JuZXIpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gTWF0aC5hYnMoY29ybmVyLngpIDw9IF90aGlzLndpZHRoKCkgLyAyICYmIE1hdGguYWJzKGNvcm5lci55KSA8PSBfdGhpcy5oZWlnaHQoKSAvIDI7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIGlmIChzaG93TGFiZWwpIHsKICAgICAgICAgICAgICAgICAgICB2YXIgc2xpY2VJbmRpY2VzID0gY29ybmVycy5tYXAoZnVuY3Rpb24gKGNvcm5lcikgeyByZXR1cm4gX3RoaXMuX3NsaWNlSW5kZXhGb3JQb2ludChjb3JuZXIpOyB9KTsKICAgICAgICAgICAgICAgICAgICBzaG93TGFiZWwgPSBzbGljZUluZGljZXMuZXZlcnkoZnVuY3Rpb24gKGluZGV4KSB7IHJldHVybiBpbmRleCA9PT0gZGF0dW1JbmRleDsgfSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB2YXIgY29sb3IgPSBhdHRyVG9Qcm9qZWN0b3JbImZpbGwiXShkYXR1bSwgZGF0dW1JbmRleCwgZGF0YXNldCk7CiAgICAgICAgICAgICAgICB2YXIgZGFyayA9IHV0aWxzJDEuQ29sb3IuY29udHJhc3QoIndoaXRlIiwgY29sb3IpICogMS42IDwgdXRpbHMkMS5Db2xvci5jb250cmFzdCgiYmxhY2siLCBjb2xvcik7CiAgICAgICAgICAgICAgICB2YXIgZyA9IGxhYmVsQXJlYS5hcHBlbmQoImciKS5hdHRyKCJ0cmFuc2Zvcm0iLCAidHJhbnNsYXRlKCIgKyB4ICsgIiwiICsgeSArICIpIik7CiAgICAgICAgICAgICAgICB2YXIgY2xhc3NOYW1lID0gZGFyayA/ICJkYXJrLWxhYmVsIiA6ICJsaWdodC1sYWJlbCI7CiAgICAgICAgICAgICAgICBnLmNsYXNzZWQoY2xhc3NOYW1lLCB0cnVlKTsKICAgICAgICAgICAgICAgIGcuc3R5bGUoInZpc2liaWxpdHkiLCBzaG93TGFiZWwgPyAiaW5oZXJpdCIgOiAiaGlkZGVuIik7CiAgICAgICAgICAgICAgICB3cml0ZXIud3JpdGUodmFsdWUsIG1lYXN1cmVtZW50LndpZHRoLCBtZWFzdXJlbWVudC5oZWlnaHQsIHsKICAgICAgICAgICAgICAgICAgICB4QWxpZ246ICJjZW50ZXIiLAogICAgICAgICAgICAgICAgICAgIHlBbGlnbjogImNlbnRlciIsCiAgICAgICAgICAgICAgICB9LCBnLm5vZGUoKSk7CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIHZhciB0aGlzXzEgPSB0aGlzOwogICAgICAgICAgICBmb3IgKHZhciBkYXR1bUluZGV4ID0gMDsgZGF0dW1JbmRleCA8IGRhdGFMZW47IGRhdHVtSW5kZXgrKykgewogICAgICAgICAgICAgIC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Rpb24gKHByb3BlcnR5KSB7CiAgICAgICAgICAgIGlmIChwcm9wZXJ0eSA9PT0gIngyIikgewogICAgICAgICAgICAgICAgcmV0dXJuIF9zdXBlci5wcm90b3R5cGUuX2ZpbHRlckZvclByb3BlcnR5LmNhbGwodGhpcywgIngiKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChwcm9wZXJ0eSA9PT0gInkyIikgewogICAgICAgICAgICAgICAgcmV0dXJuIF9zdXBlci5wcm90b3R5cGUuX2ZpbHRlckZvclByb3BlcnR5LmNhbGwodGhpcywgInkiKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gX3N1cGVyLnByb3RvdHlwZS5fZmlsdGVyRm9yUHJvcGVydHkuY2FsbCh0aGlzLCBwcm9wZXJ0eSk7CiAgICAgICAgfTsKICAgICAgICBSZWN0YW5nbGUucHJvdG90eXBlLnggPSBmdW5jdGlvbiAoeCwgeFNjYWxlLCBwb3N0U2NhbGUpIHsKICAgICAgICAgICAgaWYgKHggPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIF9zdXBlci5wcm90b3R5cGUueC5jYWxsKHRoaXMpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh4U2NhbGUgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgX3N1cGVyLnByb3RvdHlwZS54LmNhbGwodGhpcywgeCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLnguY2FsbCh0aGlzLCB4LCB4U2NhbGUsIHBvc3RTY2FsZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHhTY2FsZSAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICB2YXIgeDJCaW5kaW5nID0gdGhpcy54MigpOwogICAgICAgICAgICAgICAgdmFyIHgyID0geDJCaW5kaW5nICYmIHgyQmluZGluZy5hY2Nlc3NvcjsKICAgICAgICAgICAgICAgIGlmICh4MiAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fYmluZFByb3BlcnR5KFJlY3RhbmdsZS5fWDJfS0VZLCB4MiwgeFNjYWxlLCB4MkJpbmRpbmcucG9zdFNjYWxlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBUaGUgeCBhbmQgeSBzY2FsZXMgc2hvdWxkIHJlbmRlciBpbiBiYW5kcyB3aXRoIG5vIHBhZGRpbmcgZm9yIGNhdGVnb3J5IHNjYWxlcwogICAgICAgICAgICBpZiAoeFNjYWxlIGluc3RhbmNlb2Ygc2NhbGVzLkNhdGVnb3J5KSB7CiAgICAgICAgICAgICAgICB4U2NhbGUuaW5uZXJQYWRkaW5nKDApLm91dGVyUGFkZGluZygwKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIFJlY3RhbmdsZS5wcm90b3R5cGUueDIgPSBmdW5jdGlvbiAoeDIsIHBvc3RTY2FsZSkgewogICAgICAgICAgICBpZiAoeDIgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3Byb3BlcnR5QmluZGluZ3MuZ2V0KFJlY3RhbmdsZS5fWDJfS0VZKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB2YXIgeEJpbmRpbmcgPSB0aGlzLngoKTsKICAgICAgICAgICAgdmFyIHhTY2FsZSA9IHhCaW5kaW5nICYmIHhCaW5kaW5nLnNjYWxlOwogICAgICAgICAgICB0aGlzLl9iaW5kUHJvcGVydHkoUmVjdGFuZ2xlLl9YMl9LRVksIHgyLCB4U2NhbGUsIHBvc3RTY2FsZSk7CiAgICAgICAgICAgIHRoaXMucmVuZGVyKCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgUmVjdGFuZ2xlLnByb3RvdHlwZS55ID0gZnVuY3Rpb24gKHksIHlTY2FsZSwgcG9zdFNjYWxlKSB7CiAgICAgICAgICAgIGlmICh5ID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiBfc3VwZXIucHJvdG90eXBlLnkuY2FsbCh0aGlzKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoeVNjYWxlID09IG51bGwpIHsKICAgICAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUueS5jYWxsKHRoaXMsIHkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgX3N1cGVyLnByb3RvdHlwZS55LmNhbGwodGhpcywgeSwgeVNjYWxlLCBwb3N0U2NhbGUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh5U2NhbGUgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgdmFyIHkyQmluZGluZyA9IHRoaXMueTIoKTsKICAgICAgICAgICAgICAgIHZhciB5MiA9IHkyQmluZGluZyAmJiB5MkJpbmRpbmcuYWNjZXNzb3I7CiAgICAgICAgICAgICAgICBpZiAoeTIgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX2JpbmRQcm9wZXJ0eShSZWN0YW5nbGUuX1kyX0tFWSwgeTIsIHlTY2FsZSwgeTJCaW5kaW5nLnBvc3RTY2FsZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gVGhlIHggYW5kIHkgc2NhbGVzIHNob3VsZCByZW5kZXIgaW4gYmFuZHMgd2l0aCBubyBwYWRkaW5nIGZvciBjYXRlZ29yeSBzY2FsZXMKICAgICAgICAgICAgaWYgKHlTY2FsZSBpbnN0YW5jZW9mIHNjYWxlcy5DYXRlZ29yeSkgewogICAgICAgICAgICAgICAgeVNjYWxlLmlubmVyUGFkZGluZygwKS5vdXRlclBhZGRpbmcoMCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBSZWN0YW5nbGUucHJvdG90eXBlLnkyID0gZnVuY3Rpb24gKHkyLCBwb3N0U2NhbGUpIHsKICAgICAgICAgICAgaWYgKHkyID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9wcm9wZXJ0eUJpbmRpbmdzLmdldChSZWN0YW5nbGUuX1kyX0tFWSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIHlCaW5kaW5nID0gdGhpcy55KCk7CiAgICAgICAgICAgIHZhciB5U2NhbGUgPSB5QmluZGluZyAmJiB5QmluZGluZy5zY2FsZTsKICAgICAgICAgICAgdGhpcy5fYmluZFByb3BlcnR5KFJlY3RhbmdsZS5fWTJfS0VZLCB5MiwgeVNjYWxlLCBwb3N0U2NhbGUpOwogICAgICAgICAgICB0aGlzLnJlbmRlcigpOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIEdldHMgdGhlIFBsb3RFbnRpdGllcyBhdCBhIHBhcnRpY3VsYXIgUG9pbnQuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0ge1BvaW50fSBwb2ludCBUaGUgcG9pbnQgdG8gcXVlcnkuCiAgICAgICAgICogQHJldHVybnMge1Bsb3RFbnRpdHlbXX0gVGhlIFBsb3RFbnRpdGllcyBhdCB0aGUgcGFydGljdWxhciBwb2ludAogICAgICAgICAqLwogICAgICAgIFJlY3RhbmdsZS5wcm90b3R5cGUuZW50aXRpZXNBdCA9IGZ1bmN0aW9uIChwb2ludCkgewogICAgICAgICAgICB2YXIgYXR0clRvUHJvamVjdG9yID0gdGhpcy5fZ2V0QXR0clRvUHJvamVjdG9yKCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmVudGl0aWVzKCkuZmlsdGVyKGZ1bmN0aW9uIChlbnRpdHkpIHsKICAgICAgICAgICAgICAgIHZhciBkYXR1bSA9IGVudGl0eS5kYXR1bTsKICAgICAgICAgICAgICAgIHZhciBpbmRleCA9IGVudGl0eS5pbmRleDsKICAgICAgICAgICAgICAgIHZhciBkYXRhc2V0ID0gZW50aXR5LmRhdGFzZXQ7CiAgICAgICAgICAgICAgICB2YXIgeCA9IGF0dHJUb1Byb2plY3RvclsieCJdKGRhdHVtLCBpbmRleCwgZGF0YXNldCk7CiAgICAgICAgICAgICAgICB2YXIgeSA9IGF0dHJUb1Byb2plY3RvclsieSJdKGRhdHVtLCBpbmRleCwgZGF0YXNldCk7CiAgICAgICAgICAgICAgICB2YXIgd2lkdGggPSBhdHRyVG9Qcm9qZWN0b3JbIndpZHRoIl0oZGF0dW0sIGluZGV4LCBkYXRhc2V0KTsKICAgICAgICAgICAgICAgIHZhciBoZWlnaHQgPSBhdHRyVG9Qcm9qZWN0b3JbImhlaWdodCJdKGRhdHVtLCBpbmRleCwgZGF0YXNldCk7CiAgICAgICAgICAgICAgICByZXR1cm4geCA8PSBwb2ludC54ICYmIHBvaW50LnggPD0geCArIHdpZHRoICYmIHkgPD0gcG9pbnQueSAmJiBwb2ludC55IDw9IHkgKyBoZWlnaHQ7CiAgICAgICAgICAgIH0pOwogICAgICAgIH07CiAgICAgICAgUmVjdGFuZ2xlLnByb3RvdHlwZS5fZW50aXR5Qm91bmRzID0gZnVuY3Rpb24gKGVudGl0eSkgewogICAgICAgICAgICB2YXIgZGF0dW0gPSBlbnRpdHkuZGF0dW0sIGluZGV4ID0gZW50aXR5LmluZGV4LCBkYXRhc2V0ID0gZW50aXR5LmRhdGFzZXQ7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9lbnRpdHlCQm94KGRhdHVtLCBpbmRleCwgZGF0YXNldCwgdGhpcy5fZ2V0QXR0clRvUHJvamVjdG9yKCkpOwogICAgICAgIH07CiAgICAgICAgUmVjdGFuZ2xlLnByb3RvdHlwZS5fZW50aXR5QkJveCA9IGZ1bmN0aW9uIChkYXR1bSwgaW5kZXgsIGRhdGFzZXQsIGF0dHJUb1Byb2plY3RvcikgewogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgeDogYXR0clRvUHJvamVjdG9yWyJ4Il0oZGF0dW0sIGluZGV4LCBkYXRhc2V0KSwKICAgICAgICAgICAgICAgIHk6IGF0dHJUb1Byb2plY3RvclsieSJdKGRhdHVtLCBpbmRleCwgZGF0YXNldCksCiAgICAgICAgICAgICAgICB3aWR0aDogYXR0clRvUHJvamVjdG9yWyJ3aWR0aCJdKGRhdHVtLCBpbmRleCwgZGF0YXNldCksCiAgICAgICAgICAgICAgICBoZWlnaHQ6IGF0dHJUb1Byb2plY3RvclsiaGVpZ2h0Il0oZGF0dW0sIGluZGV4LCBkYXRhc2V0KSwKICAgICAgICAgICAgfTsKICAgICAgICB9OwogICAgICAgIFJlY3RhbmdsZS5wcm90b3R5cGUubGFiZWwgPSBmdW5jdGlvbiAobGFiZWwpIHsKICAgICAgICAgICAgaWYgKGxhYmVsID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9sYWJlbDsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9sYWJlbCA9IGxhYmVsOwogICAgICAgICAgICB0aGlzLnJlbmRlcigpOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIFJlY3RhbmdsZS5wcm90b3R5cGUubGFiZWxzRW5hYmxlZCA9IGZ1bmN0aW9uIChlbmFibGVkKSB7CiAgICAgICAgICAgIGlmIChlbmFibGVkID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9sYWJlbHNFbmFibGVkOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fbGFiZWxzRW5hYmxlZCA9IGVuYWJsZWQ7CiAgICAgICAgICAgICAgICB0aGlzLnJlbmRlcigpOwogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIFJlY3RhbmdsZS5wcm90b3R5cGUuX3Byb3BlcnR5UHJvamVjdG9ycyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIGF0dHJUb1Byb2plY3RvciA9IF9zdXBlci5wcm90b3R5cGUuX3Byb3BlcnR5UHJvamVjdG9ycy5jYWxsKHRoaXMpOwogICAgICAgICAgICBpZiAodGhpcy54MigpICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIGF0dHJUb1Byb2plY3RvclsieDIiXSA9IHBsb3QuUGxvdC5fc2NhbGVkQWNjZXNzb3IodGhpcy54MigpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy55MigpICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIGF0dHJUb1Byb2plY3RvclsieTIiXSA9IHBsb3QuUGxvdC5fc2NhbGVkQWNjZXNzb3IodGhpcy55MigpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gYXR0clRvUHJvamVjdG9yOwogICAgICAgIH07CiAgICAgICAgUmVjdGFuZ2xlLnByb3RvdHlwZS5fcGl4ZWxQb2ludCA9IGZ1bmN0aW9uIChkYXR1bSwgaW5kZXgsIGRhdGFzZXQpIHsKICAgICAgICAgICAgdmFyIGF0dHJUb1Byb2plY3RvciA9IHRoaXMuX2dldEF0dHJUb1Byb2plY3RvcigpOwogICAgICAgICAgICB2YXIgcmVjdFggPSBhdHRyVG9Qcm9qZWN0b3JbIngiXShkYXR1bSwgaW5kZXgsIGRhdGFzZXQpOwogICAgICAgICAgICB2YXIgcmVjdFkgPSBhdHRyVG9Qcm9qZWN0b3JbInkiXShkYXR1bSwgaW5kZXgsIGRhdGFzZXQpOwogICAgICAgICAgICB2YXIgcmVjdFdpZHRoID0gYXR0clRvUHJvamVjdG9yWyJ3aWR0aCJdKGRhdHVtLCBpbmRleCwgZGF0YXNldCk7CiAgICAgICAgICAgIHZhciByZWN0SGVpZ2h0ID0gYXR0clRvUHJvamVjdG9yWyJoZWlnaHQiXShkYXR1bSwgaW5kZXgsIGRhdGFzZXQpOwogICAgICAgICAgICB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ICAgIHZhciBtYXggPSB1dGlscyQxLk1hdGgubWF4KGFjY2Vzc29yRGF0YSwgMCk7CiAgICAgICAgICAgICAgICB2YXIgc2NhbGVkTWluID0gc2NhbGUuc2NhbGUobWluKTsKICAgICAgICAgICAgICAgIHZhciBzY2FsZWRNYXggPSBzY2FsZS5zY2FsZShtYXgpOwogICAgICAgICAgICAgICAgcmV0dXJuIChzY2FsZWRNYXggLSBzY2FsZWRNaW4pIC8gTWF0aC5hYnMobWF4IC0gbWluKTsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgUmVjdGFuZ2xlLnByb3RvdHlwZS5fZ2V0RGF0YVRvRHJhdyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIGRhdGFUb0RyYXcgPSBuZXcgdXRpbHMkMS5NYXAoKTsKICAgICAgICAgICAgdmFyIGF0dHJUb1Byb2plY3RvciA9IHRoaXMuX2dldEF0dHJUb1Byb2plY3RvcigpOwogICAgICAgICAgICB0aGlzLmRhdGFzZXRzKCkuZm9yRWFjaChmdW5jdGlvbiAoZGF0YXNldCkgewogICAgICAgICAgICAgICAgdmFyIGRhdGEgPSBkYXRhc2V0LmRhdGEoKS5tYXAoZnVuY3Rpb24gKGQsIGkpIHsKICAgICAgICAgICAgICAgICAgICB2YXIgaXNWYWxpZCA9ICh1dGlscyQxLk1hdGguaXNWYWxpZE51bWJlcihhdHRyVG9Qcm9qZWN0b3JbIngiXShkLCBpLCBkYXRhc2V0KSkgJiYKICAgICAgICAgICAgICAgICAgICAgICAgdXRpbHMkMS5NYXRoLmlzVmFsaWROdW1iZXIoYXR0clRvUHJvamVjdG9yWyJ5Il0oZCwgaSwgZGF0YXNldCkpICYmCiAgICAgICAgICAgICAgICAgICAgICAgIHV0aWxzJDEuTWF0aC5pc1ZhbGlkTnVtYmVyKGF0dHJUb1Byb2plY3Rvclsid2lkdGgiXShkLCBpLCBkYXRhc2V0KSkgJiYKICAgICAgICAgICAgICAgICAgICAgICAgdXRpb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yICh2YXIgZGF0dW1JbmRleCA9IDA7IGRhdHVtSW5kZXggPCBkYXRhTGVuZ3RoOyBkYXR1bUluZGV4KyspIHsKICAgICAgICAgICAgICAgIHZhciBkYXR1bSA9IGRhdGFbZGF0dW1JbmRleF07CiAgICAgICAgICAgICAgICBpZiAoZGF0dW0gPT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdmFyIGxhYmVsID0gIiIgKyB0aGlzLmxhYmVsKCkoZGF0dW0sIGRhdHVtSW5kZXgsIGRhdGFzZXQpOwogICAgICAgICAgICAgICAgdmFyIG1lYXN1cmVtZW50ID0gbWVhc3VyZXIubWVhc3VyZShsYWJlbCk7CiAgICAgICAgICAgICAgICB2YXIgeCA9IGF0dHJUb1Byb2plY3RvclsieCJdKGRhdHVtLCBkYXR1bUluZGV4LCBkYXRhc2V0KTsKICAgICAgICAgICAgICAgIHZhciB5ID0gYXR0clRvUHJvamVjdG9yWyJ5Il0oZGF0dW0sIGRhdHVtSW5kZXgsIGRhdGFzZXQpOwogICAgICAgICAgICAgICAgdmFyIHdpZHRoID0gYXR0clRvUHJvamVjdG9yWyJ3aWR0aCJdKGRhdHVtLCBkYXR1bUluZGV4LCBkYXRhc2V0KTsKICAgICAgICAgICAgICAgIHZhciBoZWlnaHQgPSBhdHRyVG9Qcm9qZWN0b3JbImhlaWdodCJdKGRhdHVtLCBkYXR1bUluZGV4LCBkYXRhc2V0KTsKICAgICAgICAgICAgICAgIGlmIChtZWFzdXJlbWVudC5oZWlnaHQgPD0gaGVpZ2h0ICYmIG1lYXN1cmVtZW50LndpZHRoIDw9IHdpZHRoKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIGhvcml6b250YWxPZmZzZXQgPSAod2lkdGggLSBtZWFzdXJlbWVudC53aWR0aCkgLyAyOwogICAgICAgICAgICAgICAgICAgIHZhciB2ZXJ0aWNhbE9mZnNldCA9IChoZWlnaHQgLSBtZWFzdXJlbWVudC5oZWlnaHQpIC8gMjsKICAgICAgICAgICAgICAgICAgICB4ICs9IGhvcml6b250YWxPZmZzZXQ7CiAgICAgICAgICAgICAgICAgICAgeSArPSB2ZXJ0aWNhbE9mZnNldDsKICAgICAgICAgICAgICAgICAgICB2YXIgeExhYmVsUmFuZ2UgPSB7IG1pbjogeCwgbWF4OiB4ICsgbWVhc3VyZW1lbnQud2lkdGggfTsKICAgICAgICAgICAgICAgICAgICB2YXIgeUxhYmVsUmFuZ2UgPSB7IG1pbjogeSwgbWF4OiB5ICsgbWVhc3VyZW1lbnQuaGVpZ2h0IH07CiAgICAgICAgICAgICAgICAgICAgaWYgKHhMYWJlbFJhbmdlLm1pbiA8IHhNaW4gfHwgeExhYmVsUmFuZ2UubWF4ID4geE1heCB8fCB5TGFiZWxSYW5nZS5taW4gPCB5TWluIHx8IHlMYWJlbFJhbmdlLm1heCA+IHlNYXgpIHsKICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLl9vdmVybGF5TGFiZWwoeExhYmVsUmFuZ2UsIHlMYWJlbFJhbmdlLCBkYXR1bUluZGV4LCBkYXRhc2V0SW5kZXgsIGRhdGFUb0RyYXcpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB2YXIgY29sb3IgPSBhdHRyVG9Qcm9qZWN0b3JbImZpbGwiXShkYXR1bSwgZGF0dW1JbmRleCwgZGF0YXNldCk7CiAgICAgICAgICAgICAgICAgICAgdmFyIGRhcmsgPSB1dGlscyQxLkNvbG9yLmNvbnRyYXN0KCJ3aGl0ZSIsIGNvbG9yKSAqIDEuNiA8IHV0aWxzJDEuQ29sb3IuY29udHJhc3QoImJsYWNrIiwgY29sb3IpOwogICAgICAgICAgICAgICAgICAgIHZhciBnID0gbGFiZWxBcmVhLmFwcGVuZCgiZyIpLmF0dHIoInRyYW5zZm9ybSIsICJ0cmFuc2xhdGUoIiArIHggKyAiLCIgKyB5ICsgIikiKTsKICAgICAgICAgICAgICAgICAgICB2YXIgY2xhc3NOYW1lID0gZGFyayA/ICJkYXJrLWxhYmVsIiA6ICJsaWdodC1sYWJlbCI7CiAgICAgICAgICAgICAgICAgICAgZy5jbGFzc2VkKGNsYXNzTmFtZSwgdHJ1ZSk7CiAgICAgICAgICAgICAgICAgICAgd3JpdGVyLndyaXRlKGxhYmVsLCBtZWFzdXJlbWVudC53aWR0aCwgbWVhc3VyZW1lbnQuaGVpZ2h0LCB7CiAgICAgICAgICAgICAgICAgICAgICAgIHhBbGlnbjogImNlbnRlciIsCiAgICAgICAgICAgICAgICAgICAgICAgIHlBbGlnbjogImNlbnRlciIsCiAgICAgICAgICAgICAgICAgICAgfSwgZy5ub2RlKCkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBSZWN0YW5nbGUucHJvdG90eXBlLl9vdmVybGF5TGFiZWwgPSBmdW5jdGlvbiAobGFiZWxYUmFuZ2UsIGxhYmVsWVJhbmdlLCBkYXR1bUluZGV4LCBkYXRhc2V0SW5kZXgsIGRhdGFUb0RyYXcpIHsKICAgICAgICAgICAgdmFyIGF0dHJUb1Byb2plY3RvciA9IHRoaXMuX2dldEF0dHJUb1Byb2plY3RvcigpOwogICAgICAgICAgICB2YXIgZGF0YXNldHMgPSB0aGlzLmRhdGFzZXRzKCk7CiAgICAgICAgICAgIGZvciAodmFyIGkgPSBkYXRhc2V0SW5kZXg7IGkgPCBkYXRhc2V0cy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgdmFyIGRhdGFzZXQgPSBkYXRhc2V0c1tpXTsKICAgICAgICAgICAgICAgIHZhciBkYXRhID0gZGF0YVRvRHJhdy5nZXQoZGF0YXNldCk7CiAgICAgICAgICAgICAgICB2YXIgZGF0YUxlbiA9IGRhd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ICAgICAgIGFuaW1hdG9yOiB0aGlzLl9nZXRBbmltYXRvcihwbG90cy5BbmltYXRvci5NQUlOKSwKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHJldHVybiBkcmF3U3RlcHM7CiAgICAgICAgfTsKICAgICAgICBTY2F0dGVyLnByb3RvdHlwZS5fcHJvcGVydHlQcm9qZWN0b3JzID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB2YXIgcHJvcGVydHlUb1Byb2plY3RvcnMgPSBfc3VwZXIucHJvdG90eXBlLl9wcm9wZXJ0eVByb2plY3RvcnMuY2FsbCh0aGlzKTsKICAgICAgICAgICAgdmFyIHhQcm9qZWN0b3IgPSBwbG90LlBsb3QuX3NjYWxlZEFjY2Vzc29yKHRoaXMueCgpKTsKICAgICAgICAgICAgdmFyIHlQcm9qZWN0b3IgPSBwbG90LlBsb3QuX3NjYWxlZEFjY2Vzc29yKHRoaXMueSgpKTsKICAgICAgICAgICAgcHJvcGVydHlUb1Byb2plY3RvcnNbIngiXSA9IHhQcm9qZWN0b3I7CiAgICAgICAgICAgIHByb3BlcnR5VG9Qcm9qZWN0b3JzWyJ5Il0gPSB5UHJvamVjdG9yOwogICAgICAgICAgICBwcm9wZXJ0eVRvUHJvamVjdG9yc1sidHJhbnNmb3JtIl0gPSBmdW5jdGlvbiAoZGF0dW0sIGluZGV4LCBkYXRhc2V0KSB7CiAgICAgICAgICAgICAgICByZXR1cm4gInRyYW5zbGF0ZSgiICsgeFByb2plY3RvcihkYXR1bSwgaW5kZXgsIGRhdGFzZXQpICsgIiwiICsgeVByb2plY3RvcihkYXR1bSwgaW5kZXgsIGRhdGFzZXQpICsgIikiOwogICAgICAgICAgICB9OwogICAgICAgICAgICBwcm9wZXJ0eVRvUHJvamVjdG9yc1siZCJdID0gdGhpcy5fY29uc3RydWN0U3ltYm9sR2VuZXJhdG9yKCk7CiAgICAgICAgICAgIHJldHVybiBwcm9wZXJ0eVRvUHJvamVjdG9yczsKICAgICAgICB9OwogICAgICAgIFNjYXR0ZXIucHJvdG90eXBlLl9jb25zdHJ1Y3RTeW1ib2xHZW5lcmF0b3IgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHZhciBzeW1ib2xQcm9qZWN0b3IgPSBwbG90LlBsb3QuX3NjYWxlZEFjY2Vzc29yKHRoaXMuc3ltYm9sKCkpOwogICAgICAgICAgICB2YXIgc2l6ZVByb2plY3RvciA9IHBsb3QuUGxvdC5fc2NhbGVkQWNjZXNzb3IodGhpcy5zaXplKCkpOwogICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24gKGRhdHVtLCBpbmRleCwgZGF0YXNldCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHN5bWJvbFByb2plY3RvcihkYXR1bSwgaW5kZXgsIGRhdGFzZXQpKHNpemVQcm9qZWN0b3IoZGF0dW0sIGluZGV4LCBkYXRhc2V0KSkobnVsbCk7CiAgICAgICAgICAgIH07CiAgICAgICAgfTsKICAgICAgICBTY2F0dGVyLnByb3RvdHlwZS5fZW50aXR5Qm91bmRzID0gZnVuY3Rpb24gKGVudGl0eSkgewogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgeDogZW50aXR5LnBvc2l0aW9uLnggLSBlbnRpdHkuZGlhbWV0ZXIgLyAyLAogICAgICAgICAgICAgICAgeTogZW50aXR5LnBvc2l0aW9uLnkgLSBlbnRpdHkuZGlhbWV0ZXIgLyAyLAogICAgICAgICAgICAgICAgd2lkdGg6IGVudGl0eS5kaWFtZXRlciwKICAgICAgICAgICAgICAgIGhlaWdodDogZW50aXR5LmRpYW1ldGVyLAogICAgICAgICAgICB9OwogICAgICAgIH07CiAgICAgICAgU2NhdHRlci5wcm90b3R5cGUuX2VudGl0eVZpc2libGVPblBsb3QgPSBmdW5jdGlvbiAoZW50aXR5LCBib3VuZHMpIHsKICAgICAgICAgICAgdmFyIHhSYW5nZSA9IHsgbWluOiBib3VuZHMudG9wTGVmdC54LCBtYXg6IGJvdW5kcy5ib3R0b21SaWdodC54IH07CiAgICAgICAgICAgIHZhciB5UmFuZ2UgPSB7IG1pbjogYm91bmRzLnRvcExlZnQueSwgbWF4OiBib3VuZHMuYm90dG9tUmlnaHQueSB9OwogICAgICAgICAgICB2YXIgdHJhbnNsYXRlZEJib3ggPSB0aGlzLl9lbnRpdHlCb3VuZHMoZW50aXR5KTsKICAgICAgICAgICAgcmV0dXJuIHV0aWxzJDEuRE9NLmludGVyc2VjdHNCQm94KHhSYW5nZSwgeVJhbmdlLCB0cmFuc2xhdGVkQmJveCk7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIHRoZSBFbnRpdGllcyBhdCBhIHBhcnRpY3VsYXIgUG9pbnQuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0ge1BvaW50fSBwCiAgICAgICAgICogQHJldHVybnMge1Bsb3RFbnRpdHlbXX0KICAgICAgICAgKi8KICAgICAgICBTY2F0dGVyLnByb3RvdHlwZS5lbnRpdGllc0F0ID0gZnVuY3Rpb24gKHApIHsKICAgICAgICAgICAgdmFyIHhQcm9qZWN0b3IgPSBwbG90LlBsb3QuX3NjYWxlZEFjY2Vzc29yKHRoaXMueCgpKTsKICAgICAgICAgICAgdmFyIHlQcm9qZWN0b3IgPSBwbG90LlBsb3QuX3NjYWxlZEFjY2Vzc29yKHRoaXMueSgpKTsKICAgICAgICAgICAgdmFyIHNpemVQcm9qZWN0b3IgPSBwbG90LlBsb3QuX3NjYWxlZEFjY2Vzc29yKHRoaXMuc2l6ZSgpKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuZW50aXRpZXMoKS5maWx0ZXIoZnVuY3Rpb24gKGVudGl0eSkgewogICAgICAgICAgICAgICAgdmFyIGRhdHVtID0gZW50aXR5LmRhdHVtOwogICAgICAgICAgICAgICAgdmFyIGluZGV4ID0gZW50aXR5LmluZGV4OwogICAgICAgICAgICAgICAgdmFyIGRhdGFzZXQgPSBlbnRpdHkuZGF0YXNldDsKICAgICAgICAgICAgICAgIHZhciB4ID0geFByb2plY3RvcihkYXR1bSwgaW5kZXgsIGRhdGFzZXQpOwogICAgICAgICAgICAgICAgdmFyIHkgPSB5UHJvamVjdG9yKGRhdHVtLCBpbmRleCwgZGF0YXNldCk7CiAgICAgICAgICAgICAgICB2YXIgc2l6ZSA9IHNpemVQcm9qZWN0b3IoZGF0dW0sIGluZGV4LCBkYXRhc2V0KTsKICAgICAgICAgICAgICAgIHJldHVybiB4IC0gc2l6ZSAvIDIgPD0gcC54ICYmIHAueCA8PSB4ICsgc2l6ZSAvIDIgJiYgeSAtIHNpemUgLyAyIDw9IHAueSAmJiBwLnkgPD0geSArIHNpemUgLyAyOwogICAgICAgICAgICB9KTsKICAgICAgICB9OwogICAgICAgIFNjYXR0ZXIucHJvdG90eXBlLmxhYmVsc0VuYWJsZWQgPSBmdW5jdGlvbiAoZW5hYmxlZCkgewogICAgICAgICAgICBpZiAoZW5hYmxlZCA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fbGFiZWxzRW5hYmxlZDsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuX2xhYmVsc0VuYWJsZWQgPSBlbmFibGVkOwogICAgICAgICAgICAgICAgdGhpcy5fY2xlYXJBdHRyVG9Qcm9qZWN0b3JDYWNoZSgpOwogICAgICAgICAgICAgICAgdGhpcy5yZW5kZXIoKTsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBTY2F0dGVyLnByb3RvdHlwZS5fY3JlYXRlTm9kZXNGb3JEYXRhc2V0ID0gZnVuY3Rpb24gKGRhdGFzZXQpIHsKICAgICAgICAgICAgdmFyIGRyYXdlciA9IF9zdXBlci5wcm90b3R5cGUuX2NyZWF0ZU5vZGVzRm9yRGF0YXNldC5jYWxsKHRoaXMsIGRhdGFzZXQpOwogICAgICAgICAgICB2YXIgbGFiZWxBcmVh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gICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgdGhpcy5kYXRhc2V0cygpLmZvckVhY2goZnVuY3Rpb24gKGRhdGFzZXQpIHsgcmV0dXJuIF90aGlzLl9sYWJlbENvbmZpZy5nZXQoZGF0YXNldCkubGFiZWxBcmVhLnNlbGVjdEFsbCgiZyIpLnJlbW92ZSgpOyB9KTsKICAgICAgICAgICAgaWYgKHRoaXMuX2xhYmVsc0VuYWJsZWQpIHsKICAgICAgICAgICAgICAgIHV0aWxzJDEuV2luZG93LnNldFRpbWVvdXQoZnVuY3Rpb24gKCkgeyByZXR1cm4gX3RoaXMuX2RyYXdMYWJlbHMoKTsgfSwgdGltZSk7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIFNjYXR0ZXIucHJvdG90eXBlLl9kcmF3TGFiZWxzID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwogICAgICAgICAgICB2YXIgZGF0YVRvRHJhdyA9IHRoaXMuX2dldERhdGFUb0RyYXcoKTsKICAgICAgICAgICAgdmFyIGF0dHJUb1Byb2plY3RvciA9IHRoaXMuX2dldEF0dHJUb1Byb2plY3RvcigpOwogICAgICAgICAgICB0aGlzLmRhdGFzZXRzKCkuZm9yRWFjaChmdW5jdGlvbiAoZGF0YXNldCkgewogICAgICAgICAgICAgICAgdmFyIGRhdGEgPSBkYXRhVG9EcmF3LmdldChkYXRhc2V0KTsKICAgICAgICAgICAgICAgIHZhciBkYXRhTGVuID0gZGF0YS5sZW5ndGg7CiAgICAgICAgICAgICAgICBmb3IgKHZhciBpbmRleCA9IDA7IGluZGV4IDwgZGF0YUxlbjsgaW5kZXgrKykgewogICAgICAgICAgICAgICAgICAgIHZhciBkYXR1bSA9IGRhdGFbaW5kZXhdOwogICAgICAgICAgICAgICAgICAgIGlmIChkYXR1bSA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICA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MiArIFNjYXR0ZXIuX0xBQkVMX01BUkdJTl9GUk9NX0JVQkJMRSA6IDA7CiAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICBjb250YWluZXJEaW1lbnNpb25zOiB7CiAgICAgICAgICAgICAgICAgICAgd2lkdGg6IG1lYXN1cmVtZW50LndpZHRoLAogICAgICAgICAgICAgICAgICAgIGhlaWdodDogbWVhc3VyZW1lbnQuaGVpZ2h0LAogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIGxhYmVsQ29udGFpbmVyT3JpZ2luOiB7CiAgICAgICAgICAgICAgICAgICAgeDogcG9pbnRDb29yZGluYXRlcy54IC0gbWVhc3VyZW1lbnQud2lkdGggLyAyLAogICAgICAgICAgICAgICAgICAgIHk6IHBvaW50Q29vcmRpbmF0ZXMueSAtIG1lYXN1cmVtZW50LmhlaWdodCAvIDIgKyBsYWJlbFNoaWZ0LAogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIGxhYmVsT3JpZ2luOiB7CiAgICAgICAgICAgICAgICAgICAgeDogcG9pbnRDb29yZGluYXRlcy54LAogICAgICAgICAgICAgICAgICAgIHk6IHBvaW50Q29vcmRpbmF0ZXMueSwKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICBhbGlnbm1lbnQ6IHsKICAgICAgICAgICAgICAgICAgICB4OiAiY2VudGVyIiwKICAgICAgICAgICAgICAgICAgICB5OiAiY2VudGVyIiwKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgIH07CiAgICAgICAgfTsKICAgICAgICBTY2F0dGVyLnByb3RvdHlwZS5fY3JlYXRlTGFiZWxDb250YWluZXIgPSBmdW5jdGlvbiAobGFiZWxBcmVhLCBsYWJlbENvbnRhaW5lck9yaWdpbiwgbGFiZWxPcmlnaW4sIG1lYXN1cmVtZW50KSB7CiAgICAgICAgICAgIHZhciBsYWJlbENvbnRhaW5lciA9IGxhYmVsQXJlYS5hcHBlbmQoImciKQogICAgICA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2plY3RvcigpLCBhbmltYXRvcjogbmV3IGFuaW1hdG9ycy5OdWxsKCkgfV07CiAgICAgICAgfTsKICAgICAgICBTZWdtZW50LnByb3RvdHlwZS5fZmlsdGVyRm9yUHJvcGVydHkgPSBmdW5jdGlvbiAocHJvcGVydHkpIHsKICAgICAgICAgICAgaWYgKHByb3BlcnR5ID09PSAieDIiKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gX3N1cGVyLnByb3RvdHlwZS5fZmlsdGVyRm9yUHJvcGVydHkuY2FsbCh0aGlzLCAieCIpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKHByb3BlcnR5ID09PSAieTIiKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gX3N1cGVyLnByb3RvdHlwZS5fZmlsdGVyRm9yUHJvcGVydHkuY2FsbCh0aGlzLCAieSIpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBfc3VwZXIucHJvdG90eXBlLl9maWx0ZXJGb3JQcm9wZXJ0eS5jYWxsKHRoaXMsIHByb3BlcnR5KTsKICAgICAgICB9OwogICAgICAgIFNlZ21lbnQucHJvdG90eXBlLnggPSBmdW5jdGlvbiAoeCwgeFNjYWxlKSB7CiAgICAgICAgICAgIGlmICh4ID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiBfc3VwZXIucHJvdG90eXBlLnguY2FsbCh0aGlzKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoeFNjYWxlID09IG51bGwpIHsKICAgICAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUueC5jYWxsKHRoaXMsIHgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgX3N1cGVyLnByb3RvdHlwZS54LmNhbGwodGhpcywgeCwgeFNjYWxlKTsKICAgICAgICAgICAgICAgIHZhciB4MkJpbmRpbmcgPSB0aGlzLngyKCk7CiAgICAgICAgICAgICAgICB2YXIgeDIgPSB4MkJpbmRpbmcgJiYgeDJCaW5kaW5nLmFjY2Vzc29yOwogICAgICAgICAgICAgICAgaWYgKHgyICE9IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9iaW5kUHJvcGVydHkoU2VnbWVudC5fWDJfS0VZLCB4MiwgeFNjYWxlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIFNlZ21lbnQucHJvdG90eXBlLngyID0gZnVuY3Rpb24gKHgyKSB7CiAgICAgICAgICAgIGlmICh4MiA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fcHJvcGVydHlCaW5kaW5ncy5nZXQoU2VnbWVudC5fWDJfS0VZKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB2YXIgeEJpbmRpbmcgPSB0aGlzLngoKTsKICAgICAgICAgICAgdmFyIHhTY2FsZSA9IHhCaW5kaW5nICYmIHhCaW5kaW5nLnNjYWxlOwogICAgICAgICAgICB0aGlzLl9iaW5kUHJvcGVydHkoU2VnbWVudC5fWDJfS0VZLCB4MiwgeFNjYWxlKTsKICAgICAgICAgICAgdGhpcy5yZW5kZXIoKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBTZWdtZW50LnByb3RvdHlwZS55ID0gZnVuY3Rpb24gKHksIHlTY2FsZSkgewogICAgICAgICAgICBpZiAoeSA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gX3N1cGVyLnByb3RvdHlwZS55LmNhbGwodGhpcyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHlTY2FsZSA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLnkuY2FsbCh0aGlzLCB5KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUueS5jYWxsKHRoaXMsIHksIHlTY2FsZSk7CiAgICAgICAgICAgICAgICB2YXIgeTJCaW5kaW5nID0gdGhpcy55MigpOwogICAgICAgICAgICAgICAgdmFyIHkyID0geTJCaW5kaW5nICYmIHkyQmluZGluZy5hY2Nlc3NvcjsKICAgICAgICAgICAgICAgIGlmICh5MiAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fYmluZFByb3BlcnR5KFNlZ21lbnQuX1kyX0tFWSwgeTIsIHlTY2FsZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBTZWdtZW50LnByb3RvdHlwZS55MiA9IGZ1bmN0aW9uICh5MikgewogICAgICAgICAgICBpZiAoeTIgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3Byb3BlcnR5QmluZGluZ3MuZ2V0KFNlZ21lbnQuX1kyX0tFWSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIHlCaW5kaW5nID0gdGhpcy55KCk7CiAgICAgICAgICAgIHZhciB5U2NhbGUgPSB5QmluZGluZyAmJiB5QmluZGluZy5zY2FsZTsKICAgICAgICAgICAgdGhpcy5fYmluZFByb3BlcnR5KFNlZ21lbnQuX1kyX0tFWSwgeTIsIHlTY2FsZSk7CiAgICAgICAgICAgIHRoaXMucmVuZGVyKCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgU2VnbWVudC5wcm90b3R5cGUuX3Byb3BlcnR5UHJvamVjdG9ycyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIGF0dHJUb1Byb2plY3RvciA9IF9zdXBlci5wcm90b3R5cGUuX3Byb3BlcnR5UHJvamVjdG9ycy5jYWxsKHRoaXMpOwogICAgICAgICAgICBhdHRyVG9Qcm9qZWN0b3JbIngxIl0gPSBwbG90LlBsb3QuX3NjYWxlZEFjY2Vzc29yKHRoaXMueCgpKTsKICAgICAgICAgICAgYXR0clRvUHJvamVjdG9yWyJ4MiJdID0gdGhpcy54MigpID09IG51bGwgPyBwbG90LlBsb3QuX3NjYWxlZEFjY2Vzc29yKHRoaXMueCgpKSA6IHBsb3QuUGxvdC5fc2NhbGVkQWNjZXNzb3IodGhpcy54MigpKTsKICAgICAgICAgICAgYXR0clRvUHJvamVjdG9yWyJ5MSJdID0gcGxvdC5QbG90Ll9zY2FsZWRBY2Nlc3Nvcih0aGlzLnkoKSk7CiAgICAgICAgICAgIGF0dHJUb1Byb2plY3RvclsieTIiXSA9IHRoaXMueTIoKSA9PSBudWxsID8gcGxvdC5QbG90Ll9zY2FsZWRBY2Nlc3Nvcih0aGlzLnkoKSkgOiBwbG90LlBsb3QuX3NjYWxlZEFjY2Vzc29yKHRoaXMueTIoKSk7CiAgICAgICAgICAgIHJldHVybiBhdHRyVG9Qcm9qZWN0b3I7CiAgICAgICAgfTsKICAgICAgICBTZWdtZW50LnByb3RvdHlwZS5lbnRpdGllc0F0ID0gZnVuY3Rpb24gKHBvaW50KSB7CiAgICAgICAgICAgIHZhciBlbnRpdHkgPSB0aGlzLmVudGl0eU5lYXJlc3QocG9pbnQpOwogICAgICAgICAgICBpZiAoZW50aXR5ICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiBbZW50aXR5XTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHJldHVybiBbXTsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgU2VnbWVudC5wcm90b3R5cGUuZW50aXRpZXNJbiA9IGZ1bmN0aW9uICh4UmFuZ2VPckJvdW5kcywgeVJhbmdlKSB7CiAgICAgICAgICAgIHZhciBkYXRhWFJhbmdlOwogICAgICAgICAgICB2YXIgZGF0YVlSYW5nZTsKICAgICAgICAgICAgaWYgKHlSYW5nZSA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICB2YXIgYm91bmRzID0geFJhbmdlT3JCb3VuZHM7CiAgICAgICAgICAgICAgICBkYXRhWFJhbmdlID0geyBtaW46IGJvdW5kcy50b3BMZWZ0LngsIG1heDogYm91bmRzLmJvdHRvbVJpZ2h0LnggfTsKICAgICAgICAgICAgICAgIGRhdGFZUmFuZ2UgPSB7IG1pbjogYm91bmRzLnRvcExlZnQueSwgbWF4OiBib3VuZHMuYm90dG9tUmlnaHQueSB9OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgZGF0YVhSYW5nZSA9IHhSYW5nZU9yQm91bmRzOwogICAgICAgICAgICAgICAgZGF0YVlSYW5nZSA9IHlSYW5nZTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpcy5fZW50aXRpZXNJbnRlcnNlY3RpbmcoZGF0YVhSYW5nZSwgZGF0YVlSYW5nZSk7CiAgICAgICAgfTsKICAgICAgICBTZWdtZW50LnByb3RvdHlwZS5fZW50aXRpZXNJbnRlcnNlY3RpbmcgPSBmdW5jdGlvbiAoeFJhbmdlLCB5UmFuZ2UpIHsKICAgICAgICAgICAgdmFyIGludGVyc2VjdGVkID0gW107CiAgICAgICAgICAgIHZhciBhdHRyVG9Qcm9qZWN0b3IgPSB0aGlzLl9nZXRBdHRyVG9Qcm9qZWN0b3IoKTsKICAgICAgICAgICAgdmFyIGVudGl0aWVzID0gdGhpcy5lbnRpdGllcygpOwogICAgICAgICAgICB2YXIgZW50aXRpZXNMZW4gPSBlbnRpdGllcy5sZW5ndGg7CiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZW50aXRpZXNMZW47IGkrKykgewogICAgICAgICAgICAgICAgdmFyIGVudGl0eSA9IGVudGl0aWVzW2ldOwogICAgICAgICAgICAgICAgaWYgKHRoaXMuX2xpbmVJbnRlcnNlY3RzQm94KGVudGl0eSwgeFJhbmdlLCB5UmFuZ2UsIGF0dHJUb1Byb2plY3RvcikpIHsKICAgICAgICAgICAg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IHkyIDw9IHlSYW5nZS5tYXgpKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICB2YXIgc3RhcnRQb2ludCA9IHsgeDogeDEsIHk6IHkxIH07CiAgICAgICAgICAgIHZhciBlbmRQb2ludCA9IHsgeDogeDIsIHk6IHkyIH07CiAgICAgICAgICAgIHZhciBjb3JuZXJzID0gWwogICAgICAgICAgICAgICAgeyB4OiB4UmFuZ2UubWluLCB5OiB5UmFuZ2UubWluIH0sCiAgICAgICAgICAgICAgICB7IHg6IHhSYW5nZS5taW4sIHk6IHlSYW5nZS5tYXggfSwKICAgICAgICAgICAgICAgIHsgeDogeFJhbmdlLm1heCwgeTogeVJhbmdlLm1heCB9LAogICAgICAgICAgICAgICAgeyB4OiB4UmFuZ2UubWF4LCB5OiB5UmFuZ2UubWluIH0sCiAgICAgICAgICAgIF07CiAgICAgICAgICAgIHZhciBpbnRlcnNlY3Rpb25zID0gY29ybmVycy5maWx0ZXIoZnVuY3Rpb24gKHBvaW50LCBpbmRleCkgewogICAgICAgICAgICAgICAgaWYgKGluZGV4ICE9PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gcmV0dXJuIHRydWUgaWYgYm9yZGVyIGZvcm1lZCBieSBjb25lY3RpbmcgY3VycmVudCBjb3JuZXIgYW5kIHByZXZpb3VzIGNvcm5lciBpbnRlcnNlY3RzIHdpdGggdGhlIHNlZ21lbnQKICAgICAgICAgICAgICAgICAgICByZXR1cm4gX3RoaXMuX2xpbmVJbnRlcnNlY3RzU2VnbWVudChzdGFydFBvaW50LCBlbmRQb2ludCwgcG9pbnQsIGNvcm5lcnNbaW5kZXggLSAxXSkgJiYKICAgICAgICAgICAgICAgICAgICAgICAgX3RoaXMuX2xpbmVJbnRlcnNlY3RzU2VnbWVudChwb2ludCwgY29ybmVyc1tpbmRleCAtIDFdLCBzdGFydFBvaW50LCBlbmRQb2ludCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICByZXR1cm4gaW50ZXJzZWN0aW9ucy5sZW5ndGggPiAwOwogICAgICAgIH07CiAgICAgICAgU2VnbWVudC5wcm90b3R5cGUuX2xpbmVJbnRlcnNlY3RzU2VnbWVudCA9IGZ1bmN0aW9uIChwb2ludDEsIHBvaW50MiwgcG9pbnQzLCBwb2ludDQpIHsKICAgICAgICAgICAgLy8gdHNsaW50OmRpc2FibGUtbmV4dC1saW5lOm5vLXNoYWRvd2VkLXZhcmlhYmxlCiAgICAgICAgICAgIHZhciBjYWxjT3JpZW50YXRpb24gPSBmdW5jdGlvbiAocG9pbnQxLCBwb2ludDIsIHBvaW50KSB7CiAgICAgICAgICAgICAgICByZXR1cm4gKHBvaW50Mi54IC0gcG9pbnQxLngpICogKHBvaW50LnkgLSBwb2ludDIueSkgLSAocG9pbnQyLnkgLSBwb2ludDEueSkgKiAocG9pbnQueCAtIHBvaW50Mi54KTsKICAgICAgICAgICAgfTsKICAgICAgICAgICAgLy8gcG9pbnQzIGFuZCBwb2ludDQgYXJlIG9uIGRpZmZlcmVudCBzaWRlcyBvZiBsaW5lIGZvcm1lZCBieSBwb2ludDEgYW5kIHBvaW50MgogICAgICAgICAgICByZXR1cm4gY2FsY09yaWVudGF0aW9uKHBvaW50MSwgcG9pbnQyLCBwb2ludDMpICogY2FsY09yaWVudGF0aW9uKHBvaW50MSwgcG9pbnQyLCBwb2ludDQpIDwgMDsKICAgICAgICB9OwogICAgICAgIFNlZ21lbnQuX1gyX0tFWSA9ICJ4MiI7CiAgICAgICAgU2VnbWVudC5fWTJfS0VZID0gInkyIjsKICAgICAgICByZXR1cm4gU2VnbWVudDsKICAgIH0oeHlQbG90LlhZUGxvdCkpOwogICAgZXhwb3J0cy5TZWdtZW50ID0gU2VnbWVudDsKICAgIH0pOwoKICAgIHZhciBzdGFja2VkQXJlYVBsb3QgPSBjcmVhdGVDb21tb25q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mNyb3BwZWRSZW5kZXJpbmdFbmFibGVkLmNhbGwodGhpcyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGNyb3BwZWRSZW5kZXJpbmcpIHsKICAgICAgICAgICAgICAgIC8vIEhBQ0tIQUNLICMzMDMyOiBjcm9wcGVkIHJlbmRlcmluZyBkb2Vzbid0IGN1cnJlbnRseSB3b3JrIGNvcnJlY3RseSBvbiBTdGFja2VkQXJlYQogICAgICAgICAgICAgICAgdXRpbHMkMS5XaW5kb3cud2FybigiV2FybmluZzogU3RhY2tlZCBBcmVhIFBsb3QgZG9lcyBub3Qgc3VwcG9ydCBjcm9wcGVkIHJlbmRlcmluZy4iKTsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBfc3VwZXIucHJvdG90eXBlLmNyb3BwZWRSZW5kZXJpbmdFbmFibGVkLmNhbGwodGhpcywgY3JvcHBlZFJlbmRlcmluZyk7CiAgICAgICAgfTsKICAgICAgICBTdGFja2VkQXJlYS5wcm90b3R5cGUuX2dldEFuaW1hdG9yID0gZnVuY3Rpb24gKGtleSkgewogICAgICAgICAgICByZXR1cm4gbmV3IGFuaW1hdG9ycy5OdWxsKCk7CiAgICAgICAgfTsKICAgICAgICBTdGFja2VkQXJlYS5wcm90b3R5cGUuX3NldHVwID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLl9zZXR1cC5jYWxsKHRoaXMpOwogICAgICAgICAgICB0aGlzLl9iYXNlbGluZSA9IHRoaXMuX3JlbmRlckFyZWEuYXBwZW5kKCJsaW5lIikuY2xhc3NlZCgiYmFzZWxpbmUiLCB0cnVlKTsKICAgICAgICB9OwogICAgICAgIFN0YWNrZWRBcmVhLnByb3RvdHlwZS54ID0gZnVuY3Rpb24gKHgsIHhTY2FsZSkgewogICAgICAgICAgICBpZiAoeCA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gX3N1cGVyLnByb3RvdHlwZS54LmNhbGwodGhpcyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHhTY2FsZSA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLnguY2FsbCh0aGlzLCB4KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUueC5jYWxsKHRoaXMsIHgsIHhTY2FsZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fY2hlY2tTYW1lRG9tYWluKCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH07CiAgICAgICAgU3RhY2tlZEFyZWEucHJvdG90eXBlLnkgPSBmdW5jdGlvbiAoeSwgeVNjYWxlKSB7CiAgICAgICAgICAgIGlmICh5ID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiBfc3VwZXIucHJvdG90eXBlLnkuY2FsbCh0aGlzKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoeVNjYWxlID09IG51bGwpIHsKICAgICAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUueS5jYWxsKHRoaXMsIHkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgX3N1cGVyLnByb3RvdHlwZS55LmNhbGwodGhpcywgeSwgeVNjYWxlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9jaGVja1NhbWVEb21haW4oKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIHRoZSBvZmZzZXQgb2YgdGhlIHkgdmFsdWUgY29ycmVzcG9uZGluZyB0byBhbiB4IHZhbHVlIG9mIGEgZ2l2ZW4gZGF0YXNldC4gVGhpcyBhbGxvd3Mgb3RoZXIgcGxvdHMgdG8gcGxvdAogICAgICAgICAqIHBvaW50cyBjb3JyZXNwb25kaW5nIHRvIHRoZWlyIHN0YWNrZWQgdmFsdWUgaW4gdGhlIGdyYXBoLgogICAgICAgICAqIEBwYXJhbSBkYXRhc2V0IFRoZSBkYXRhc2V0IGZyb20gd2hpY2ggdG8gcmV0cmlldmUgdGhlIHkgdmFsdWUgb2Zmc2V0CiAgICAgICAgICogQHBhcmFtIHggVGhlIHggdmFsdWUgY29ycmVzcG9uZGluZyB0byB0aGUgeS12YWx1ZSBvZiBpbnRlcmVzdC4KICAgICAgICAgKi8KICAgICAgICBTdGFja2VkQXJlYS5wcm90b3R5cGUueU9mZnNldCA9IGZ1bmN0aW9uIChkYXRhc2V0LCB4KSB7CiAgICAgICAgICAgIHZhciBzdGFja2luZ1Jlc3VsdCA9IHRoaXMuX3N0YWNraW5nUmVzdWx0KCk7CiAgICAgICAgICAgIGlmIChzdGFja2luZ1Jlc3VsdCA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciBkYXRhc2V0U3RhY2tpbmdSZXN1bHQgPSBzdGFja2luZ1Jlc3VsdC5nZXQoZGF0YXNldCk7CiAgICAgICAgICAgIGlmIChkYXRhc2V0U3RhY2tpbmdSZXN1bHQgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDsKICAgICAgICAgICAgfQogICAgICAgICAgICB2YXIgcmVzdWx0ID0gZGF0YXNldFN0YWNraW5nUmVzdWx0LmdldChTdHJpbmcoeCkpOwogICAgICAgICAgICBpZiAocmVzdWx0ID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHJlc3VsdC5vZmZzZXQ7CiAgICAgICAgfTsKICAgICAgICBTdGFja2VkQXJlYS5wcm90b3R5cGUuc3RhY2tpbmdPcmRlciA9IGZ1bmN0aW9uIChzdGFja2luZ09yZGVyKSB7CiAgICAgICAgICAgIGlmIChzdGFja2luZ09yZGVyID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9zdGFja2luZ09yZGVyOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX3N0YWNraW5nT3JkZXIgPSBzdGFja2luZ09yZGVyOwogICAgICAgICAgICB0aGlzLl9vbkRhdGFzZXRVcGRhdGUoKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBTdGFja2VkQXJlYS5wcm90b3R5cGUuZG93bnNhbXBsaW5nRW5hYmxlZCA9IGZ1bmN0aW9uIChkb3duc2FtcGxpbmcpIHsKICAgICAgICAgICAgaWYgKGRvd25zYW1wbGluZyA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gX3N1cGVyLnByb3RvdHlwZS5kb3duc2FtcGxpbmdFbmFibGVkLmNhbGwodGhpcyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdXRpbHMkMS5XaW5kb3cud2FybigiV2FybmluZzogU3RhY2tlZCBBcmVhIFBsb3QgZG9lcyBub3Qgc3VwcG9ydCBkb3duc2FtcGxpbmciKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBTdGFja2VkQXJlYS5wcm90b3R5cGUuX2FkZGl0aW9uYWxQYWludCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIHNjYWxlZEJhc2VsaW5lID0gdGhpcy55KCkuc2NhbGUuc2NhbGUodGhpcy5fYmFzZWxpbmVWYWx1ZSk7CiAgICAgICAgICAgIHZhciBiYXNlbGluZUF0dHIgPSB7CiAgICAgICAgICAgICAgICB4MTogMCwKICAgICAgICAgICAgICAgIHkxOiBzY2FsZWRCYXNlbGluZSwKICAgICAgICAgICAgICAgIHgyOiB0aGlzLndpZHRoKCksCiAgICAgICAgICAgICAgICB5Mjogc2NhbGVkQmFzZWxpbmUsCiAgICAgICAgICAgIH07CiAgICAgICAgICAgIHRoaXMuX2dldEFuaW1hdG9yKCJiYXNlbGluZSIpLmFuaW1hdGUodGhpcy5fYmFzZWxpbmUsIGJhc2VsaW5lQXR0cik7CiAgICAgICAgfTsKICAgICAgICBTdGFja2VkQXJlYS5wcm90b3R5cGUuX3VwZGF0ZVlTY2FsZSA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIHlCaW5kaW5nID0gdGhpcy55KCk7CiAgICAgICAgICAgIHZhciBzY2FsZSA9ICh5QmluZGluZyAmJiB5QmluZGluZy5zY2FsZSk7CiAgICAgICAgICAgIGlmIChzY2FsZSA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgc2NhbGUuYWRkUGFkZGluZ0V4Y2VwdGlvbnNQcm92aWRlcih0aGlzLl9iYXNlbGluZVZhbHVlUHJvdmlkZXIpOwogICAgICAgICAgICBzY2FsZS5hZGRJbmNsdWRlZFZhbHVlc1Byb3ZpZGVyKHRoaXMuX2Jhc2VsaW5lVmFsdWVQcm92aWRlcik7CiAgICAgICAgfTsKICAgICAgICBTdGFja2VkQXJlYS5wcm90b3R5cGUuX29uRGF0YXNldFVwZGF0ZSA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdGhpcy5fY2hlY2tTYW1lRG9tYWluKCk7CiAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUuX29uRGF0YXNldFVwZGF0ZS5jYWxsKHRoaXMpOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIFN0YWNrZWRBcmVhLnByb3RvdHlwZS5nZXRFeHRlbnRzRm9yUHJvcGVydHkgPSBmdW5jdGlvbiAoYXR0cikgewogICAgICAgICAgICB2YXIgcHJpbWFyeUF0dHIgPSAieSI7CiAgICAgICAgICAgIGlmIChhdHRyID09PSBwcmltYXJ5QXR0cikgewogICAgICAgICAgICAgICAgcmV0dXJuIFt0aGlzLl9zdGFja2VkRXh0ZW50KCldOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIF9zdXBlci5wcm90b3R5cGUuZ2V0RXh0ZW50c0ZvclByb3BlcnR5LmNhbGwodGhpcywgYXR0cik7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgICAgIFN0YWNrZWRBcmVhLnByb3RvdHlwZS5fY2hlY2tTYW1lRG9tYWluID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICBpZiAoIXRoaXMuX3Byb2plY3RvcnNSZWFkeSgpKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIGRhdGFzZXRzID0gdGhpcy5kYXRhc2V0cygpOwogICAgICAgICAgICB2YXIga2V5QWNjZXNzb3IgPSB0aGlzLngoKS5hY2Nlc3NvcjsKICAgICAgICAgICAgdmFyIGtleVNldHMgPSBkYXRhc2V0cy5tYXAoZnVuY3Rpb24gKGRhdGFzZXQpIHsKICAgICAgICAgICAgICAgIHJldHVybiBkMy5zZXQoZGF0YXNldC5kYXRhKCkubWFwKGZ1bmN0aW9uIChkYXR1bSwgaSkgeyByZXR1cm4gdXRpbHMkMS5TdGFja2luZy5ub3JtYWxpemVLZXkoa2V5QWNjZXNzb3IoZGF0dW0sIGksIGRhdGFzZXQpKTsgfSkpLnZhbHVlcygpOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdmFyIGRvbWFpbktleXMgPSBTdGFja2VkQXJlYS5fZG9tYWluS2V5cyhkYXRhc2V0cywga2V5QWNjZXNzb3IpOwogICAgICAgICAgICBpZiAoa2V5U2V0cy5zb21lKGZ1bmN0aW9uIChrZXlTZXQpIHsgcmV0dXJuIGtleVNldC5sZW5ndGggIT09IGRvbWFpbktleXMubGVuZ3RoOyB9KSkgewogICAgICAgICAgICAgICAgdXRpbHMkMS5XaW5kb3cud2FybigidGhlIGRvbWFp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AgICAgICAgZm9yICh2YXIgaW5kZXggPSAwOyBpbmRleCA8IGRhdGFMZW47IGluZGV4KyspIHsKICAgICAgICAgICAgICAgICAgICB2YXIgZGF0dW0gPSBkYXRhW2luZGV4XTsKICAgICAgICAgICAgICAgICAgICBkb21haW5LZXlzLmFkZChrZXlBY2Nlc3NvcihkYXR1bSwgaW5kZXgsIGRhdGFzZXQpKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHJldHVybiBkb21haW5LZXlzLnZhbHVlcygpOwogICAgICAgIH07CiAgICAgICAgU3RhY2tlZEFyZWEucHJvdG90eXBlLl9jb29yZGluYXRlUHJvamVjdG9ycyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgdmFyIHhQcm9qZWN0b3IgPSBwbG90LlBsb3QuX3NjYWxlZEFjY2Vzc29yKHRoaXMueCgpKTsKICAgICAgICAgICAgdmFyIHlBY2Nlc3NvciA9IHRoaXMueSgpLmFjY2Vzc29yOwogICAgICAgICAgICB2YXIgeEFjY2Vzc29yID0gdGhpcy54KCkuYWNjZXNzb3I7CiAgICAgICAgICAgIHZhciBub3JtYWxpemVkWEFjY2Vzc29yID0gZnVuY3Rpb24gKGRhdHVtLCBpbmRleCwgZGF0YXNldCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHV0aWxzJDEuU3RhY2tpbmcubm9ybWFsaXplS2V5KHhBY2Nlc3NvcihkYXR1bSwgaW5kZXgsIGRhdGFzZXQpKTsKICAgICAgICAgICAgfTsKICAgICAgICAgICAgdmFyIHN0YWNraW5nUmVzdWx0ID0gdGhpcy5fc3RhY2tpbmdSZXN1bHQoKTsKICAgICAgICAgICAgdmFyIHN0YWNrWVByb2plY3RvciA9IGZ1bmN0aW9uIChkLCBpLCBkYXRhc2V0KSB7CiAgICAgICAgICAgICAgICB2YXIgeSA9ICt5QWNjZXNzb3IoZCwgaSwgZGF0YXNldCk7CiAgICAgICAgICAgICAgICB2YXIgb2Zmc2V0ID0gc3RhY2tpbmdSZXN1bHQuZ2V0KGRhdGFzZXQpLmdldChub3JtYWxpemVkWEFjY2Vzc29yKGQsIGksIGRhdGFzZXQpKS5vZmZzZXQ7CiAgICAgICAgICAgICAgICByZXR1cm4gX3RoaXMueSgpLnNjYWxlLnNjYWxlKHkgKyBvZmZzZXQpOwogICAgICAgICAgICB9OwogICAgICAgICAgICB2YXIgc3RhY2tZMFByb2plY3RvciA9IGZ1bmN0aW9uIChkLCBpLCBkYXRhc2V0KSB7CiAgICAgICAgICAgICAgICB2YXIgb2Zmc2V0ID0gc3RhY2tpbmdSZXN1bHQuZ2V0KGRhdGFzZXQpLmdldChub3JtYWxpemVkWEFjY2Vzc29yKGQsIGksIGRhdGFzZXQpKS5vZmZzZXQ7CiAgICAgICAgICAgICAgICByZXR1cm4gX3RoaXMueSgpLnNjYWxlLnNjYWxlKG9mZnNldCk7CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIHJldHVybiBbCiAgICAgICAgICAgICAgICB4UHJvamVjdG9yLAogICAgICAgICAgICAgICAgc3RhY2tZUHJvamVjdG9yLAogICAgICAgICAgICAgICAgc3RhY2tZMFByb2plY3RvciwKICAgICAgICAgICAgXTsKICAgICAgICB9OwogICAgICAgIFN0YWNrZWRBcmVhLnByb3RvdHlwZS5fcHJvcGVydHlQcm9qZWN0b3JzID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB2YXIgcHJvcGVydHlUb1Byb2plY3RvcnMgPSBfc3VwZXIucHJvdG90eXBlLl9wcm9wZXJ0eVByb2plY3RvcnMuY2FsbCh0aGlzKTsKICAgICAgICAgICAgdmFyIF9hID0gdGhpcy5fY29vcmRpbmF0ZVByb2plY3RvcnMoKSwgeFByb2plY3RvciA9IF9hWzBdLCBzdGFja1lQcm9qZWN0b3IgPSBfYVsxXSwgc3RhY2tZMFByb2plY3RvciA9IF9hWzJdOwogICAgICAgICAgICBwcm9wZXJ0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nVuY3Rpb24gKHN0YWNraW5nUmVzdWx0LCBwb3NpdGlvbkFjY2Vzc29yLCBmaWx0ZXIpIHsKICAgICAgICAgICAgICAgIHJldHVybiB1dGlscyQxLlN0YWNraW5nLnN0YWNrZWRFeHRlbnQoc3RhY2tpbmdSZXN1bHQsIHBvc2l0aW9uQWNjZXNzb3IsIGZpbHRlcik7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBfdGhpcy5hZGRDbGFzcygic3RhY2tlZC1iYXItcGxvdCIpOwogICAgICAgICAgICBfdGhpcy5fc3RhY2tpbmdPcmRlciA9ICJib3R0b211cCI7CiAgICAgICAgICAgIHJldHVybiBfdGhpczsKICAgICAgICB9CiAgICAgICAgU3RhY2tlZEJhci5wcm90b3R5cGUuc3RhY2tpbmdPcmRlciA9IGZ1bmN0aW9uIChzdGFja2luZ09yZGVyKSB7CiAgICAgICAgICAgIGlmIChzdGFja2luZ09yZGVyID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9zdGFja2luZ09yZGVyOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX3N0YWNraW5nT3JkZXIgPSBzdGFja2luZ09yZGVyOwogICAgICAgICAgICB0aGlzLl9vbkRhdGFzZXRVcGRhdGUoKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBTdGFja2VkQmFyLnByb3RvdHlwZS5leHRyZW1hRm9ybWF0dGVyID0gZnVuY3Rpb24gKGZvcm1hdHRlcikgewogICAgICAgICAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA9PT0gMCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2V4dHJlbWFGb3JtYXR0ZXI7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLl9leHRyZW1hRm9ybWF0dGVyID0gZm9ybWF0dGVyOwogICAgICAgICAgICAgICAgdGhpcy5yZW5kZXIo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lOwogICAgICAgICAgICB2YXIgbGVuZ3RoU2NhbGUgPSB0aGlzLmxlbmd0aCgpLnNjYWxlOwogICAgICAgICAgICB2YXIgX2EgPSB1dGlscyQxLlN0YWNraW5nLnN0YWNrZWRFeHRlbnRzKHRoaXMuX3N0YWNraW5nUmVzdWx0KCkpLCBtYXhpbXVtRXh0ZW50cyA9IF9hLm1heGltdW1FeHRlbnRzLCBtaW5pbXVtRXh0ZW50cyA9IF9hLm1pbmltdW1FeHRlbnRzOwogICAgICAgICAgICB2YXIgYW55VG9vV2lkZSA9IFtdOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogVHJ5IGRyYXdpbmcgdGhlIHRleHQgYXQgdGhlIGNlbnRlciBvZiB0aGUgYm91bmRzLiBUaGlzIG1ldGhvZCBkb2VzIG5vdCBkcmF3CiAgICAgICAgICAgICAqIHRoZSB0ZXh0IGlmIHRoZSB0ZXh0IHdvdWxkIG92ZXJmbG93IG91dHNpZGUgb2YgdGhlIHBsb3QuCiAgICAgICAgICAgICAqCiAgICAgICAgICAgICAqIEBwYXJhbSB0ZXh0CiAgICAgICAgICAgICAqIEBwYXJhbSBib3VuZHMKICAgICAgICAgICAgICogQHJldHVybnMge2Jvb2xlYW59CiAgICAgICAgICAgICAqLwogICAgICAgICAgICB2YXIgbWF5YmVEcmF3TGFiZWwgPSBmdW5jdGlvbiAodGV4dCwgYm91bmRzLCBiYXJUaGlja25lc3MpIHsKICAgICAgICAgICAgICAgIHZhciBfYSA9IGJvdW5kcy50b3BMZWZ0LCB4ID0gX2EueCwgeSA9IF9hLnk7CiAgICAgICAgICAgICAgICB2YXIgd2lkdGggPSBib3VuZHMuYm90dG9tUmlnaHQueCAtIGJvdW5kcy50b3BMZWZ0Lng7CiAgICAgICAgICAgICAgICB2YXIgaGVpZ2h0ID0gYm91bmRzLmJvdHRvbVJpZ2h0LnkgLSBib3VuZHMudG9wTGVmdC55OwogICAgICAgICAgICAgICAgdmFyIHRleHRUb29Mb25nID0gX3RoaXMuX2lzVmVydGljYWwKICAgICAgICAgICAgICAgICAgICA/IHdpZHRoID4gYmFyVGhpY2tuZXNzCiAgICAgICAgICAgICAgICAgICAgOiBoZWlnaHQgPiBiYXJUaGlja25lc3M7CiAgICAgICAgICAgICAgICBpZiAoIXRleHRUb29Mb25nKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIGxhYmVsQ29udGFpbmVyID0gX3RoaXMuX2xhYmVsQXJlYS5hcHBlbmQoImciKS5hdHRyKCJ0cmFuc2Zvcm0iLCAidHJhbnNsYXRlKCIgKyB4ICsgIiwgIiArIHkgKyAiKSIpOwogICAgICAgICAgICAgICAgICAgIGxhYmVsQ29udGFpbmVyLmNsYXNzZWQoInN0YWNrZWQtYmFyLWxhYmVsIiwgdHJ1ZSk7CiAgICAgICAgICAgICAgICAgICAgdmFyIHdyaXRlT3B0aW9ucyA9IHsKICAgICAgICAgICAgICAgICAgICAgICAgeEFsaWduOiAiY2VudGVyIiwKICAgICAgICAgICAgICAgICAgICAgICAgeUFsaWduOiAiY2VudGVyIiwKICAgICAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgICAgIF90aGlzLl93cml0ZXIud3JpdGUodGV4dCwgd2lkdGgsIGhlaWdodCwgd3JpdGVPcHRpb25zLCBsYWJlbENvbnRhaW5lci5ub2RlKCkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIHRleHRUb29Mb25nOwogICAgICAgICAgICB9OwogICAgICAgICAgICB2YXIgZHJhd0xhYmVsc0ZvckV4dGVudHMgPSBmdW5jdGlvbiAoc3RhY2tzLCBjb21wdXRlTGFiZWxUb3BMZWZ0KSB7CiAgICAgICAgICAgICAgICB2YXIgYXR0clRvUHJvamVjdG9yID0gX3RoaXMuX2dlbmVyYXRlQXR0clRvUHJvamVjdG9yKCk7CiAgICAgICAgICAgICAgICB2YXIgcGxvdFdpZHRoID0gX3RoaXMud2lkdGgoKTsKICAgICAgICAgICAgICAgIHZhciBwbG90SGVpZ2h0ID0gX3RoaXMuaGVpZ2h0KCk7CiAgICAgICAgICAgICAgICBzdGFja3MuZm9yRWFjaChmdW5jdGlvbiAoc3RhY2spIHsKICAgICAgICAgICAgICAgICAgICBpZiAoc3RhY2suZXh0ZW50ICE9PSBiYXNlbGluZVZhbHVlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIG9ubHkgZHJhdyBzdW1zIGZvciB2YWx1ZXMgbm90IGF0IHRoZSBiYXNlbGluZQogICAgICAgICAgICAgICAgICAgICAgICB2YXIgdGV4dCA9IF90aGlzLmV4dHJlbWFGb3JtYXR0ZXIoKShzdGFjay5leHRlbnQpOwogICAgICAgICAgICAgICAgICAgICAgICB2YXIgdGV4dERpbWVuc2lvbnMgPSBfdGhpcy5fbWVhc3VyZXIubWVhc3VyZSh0ZXh0KTsKICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHN0YWNrZWREYXR1bSA9IHN0YWNrLnN0YWNrZWREYXR1bTsKICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG9yaWdpbmFsRGF0dW0gPSBzdGFja2VkRGF0dW0ub3JpZ2luYWxEYXR1bSwgb3JpZ2luYWxJbmRleCA9IHN0YWNrZWREYXR1bS5vcmlnaW5hbEluZGV4LCBvcmlnaW5hbERhdGFzZXQgPSBzdGFja2VkRGF0dW0ub3JpZ2luYWxEYXRhc2V0OwogICAgICAgICAgICAgICAgICAgICAgICAvLyBvbmx5IGNvbnNpZGVyIHN0YWNrIGV4dGVudHMgdGhhdCBhcmUgb24gdGhlIHNjcmVlbgogICAgICAgICAgICAgICAgICAgICAgICBpZiAoIV90aGlzLl9pc0RhdHVtT25TY3JlZW4oYXR0clRvUHJvamVjdG9yLCBwbG90V2lkdGgsIHBsb3RIZWlnaHQsIG9yaWdpbmFsRGF0dW0sIG9yaWdpbmFsSW5kZXgsIG9yaWdpbmFsRGF0YXNldCkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB2YXIgYmFyVGhpY2tuZXNzID0gcGxvdC5QbG90Ll9zY2FsZWRBY2Nlc3NvcihfdGhpcy5hdHRyKGJhclBsb3QuQmFyLl9CQVJfVEhJQ0tORVNTX0tFWSkpKG9yaWdpbmFsRGF0dW0sIG9yaWdpbmFsSW5kZXgsIG9yaWdpbmFsRGF0YXNldCk7CiAgICAgICAgICAgICAgICAgICAgICAgIC8qCiAgICAgICAgICAgICAgICAgICAgICAgICAqIFRoZSBzdGFja0VkZ2UgaXMgYWxpZ25lZCBhdCB0aGUgZWRnZSBvZiB0aGUgc3RhY2sgaW4gdGhlIGxlbmd0aCBkaW1lbnNpb24sCiAgICAgICAgICAgICAgICAgICAgICAgICAqIGFuZCBpbiB0aGUgY2VudGVyIG9mIHRoZSBzdGFjayBpbiB0aGUgdGhpY2tuZXNzIGRpbWVuc2lvbi4KICAgICAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzdGFja0VkZ2VMZW5ndGggPSBsZW5ndGhTY2FsZS5zY2FsZShzdGFjay5leHRlbnQpOwogICAgICAgICAgICAgICAgICAgICAgICB2YXIgc3RhY2tDZW50ZXJQb3NpdGlvbiA9IF90aGlzLl9nZXRQb3NpdGlvbkF0dHIocG9zaXRpb25TY2FsZS5zY2FsZShzdGFjay5heGlzVmFsdWUpLCBiYXJUaGlja25lc3MpICsgYmFyVGhpY2tuZXNzIC8gMjsKICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHN0YWNrRWRnZSA9IF90aGlzLl9pc1ZlcnRpY2FsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB4OiBzdGFja0NlbnRlclBvc2l0aW9uLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHk6IHN0YWNrRWRnZUxlbmd0aCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHg6IHN0YWNrRWRnZUxlbmd0aCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB5OiBzdGFja0NlbnRlclBvc2l0aW9uLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRvcExlZnQgPSBjb21wdXRlTGFiZWxUb3BMZWZ0KHN0YWNrRWRnZSwgdGV4dERpbWVuc2lvbnMsIGJhclRoaWNrbmVzcyk7CiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBpc1Rvb1dpZGUgPSBtYXliZURyYXdMYWJlbCh0ZXh0LCB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b3BMZWZ0OiB0b3BMZWZ0LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm90dG9tUmlnaHQ6IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB4OiB0b3BMZWZ0LnggKyB0ZXh0RGltZW5zaW9ucy53aWR0aCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB5OiB0b3BMZWZ0LnkgKyB0ZXh0RGltZW5zaW9ucy5oZWlnaHQsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgICAgICB9LCBiYXJUaGlja25lc3MpOwogICAgICAgICAgICAgICAgICAgICAgICBhbnlUb29XaWRlLnB1c2goaXNUb29XaWRlKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfTsKICAgICAgICAgICAgZHJhd0xhYmVsc0ZvckV4dGVudHMobWF4aW11bUV4dGVudHMsIGZ1bmN0aW9uIChzdGFja0VkZ2UsIG1lYXN1cmVtZW50LCB0aGlja25lc3MpIHsKICAgICAgICAgICAgICAgIHZhciBwcmltYXJ5VGV4dE1lYXN1cmVtZW50ID0gX3RoaXMuX2lzVmVydGljYWwgPyBtZWFzdXJlbWVudC53aWR0aCA6IG1lYXN1cmVtZW50LmhlaWdodDsKICAgICAgICAgICAgICAgIHZhciBzZWNvbmRhcnlUZXh0TWVhc3VyZW1lbnQgPSBfdGhpcy5faXNWZXJ0aWNhbCA/IG1lYXN1cmVtZW50LmhlaWdodCA6IG1lYXN1cmVtZW50LndpZHRoOwogICAgICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgICAgICB4OiBfdGhpcy5faXNWZXJ0aWNhbAogICAgICAgICAgICAgICAgICAgICAgICA/IHN0YWNrRWRnZS54IC0gcHJpbWFyeVRleHRNZWFzdXJlbWVudCAvIDIKICAgICAgICAgICAgICAgICAgICAgICAgOiBzdGFja0VkZ2UueCArIFN0YWNrZWRCYXIuX0VYVFJFTUFfTEFCRUxfTUFSR0lOX0ZST01fQkFSLAogICAgICAgICAgICAgICAgICAgIHk6IF90aGlzLl9pc1ZlcnRpY2FsCiAgICAgICAgICAgICAgICAgICAgICAgID8gc3RhY2tFZGdlLnkgLSBzZWNvbmRhcnlUZXh0TWVhc3VyZW1lbnQKICAgICAgICAgICAgICAgICAgICAgICAgOiBzdGFja0VkZ2UueSAtIHByaW1hcnlUZXh0TWVhc3VyZW1lbnQgLyAyLAogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGRyYXdMYWJlbHNGb3JFeHRlbnRzKG1pbmltdW1FeHRlbnRzLCBmdW5jdGlvbiAoc3RhY2tFZGdlLCBtZWFzdXJlbWVudCwgdGhpY2tuZXNzKSB7CiAgICAgICAgICAgICAgICB2YXIgcHJpbWFyeVRleHRNZWFzdXJlbWVudCA9IF90aGlzLl9pc1ZlcnRpY2FsID8gbWVhc3VyZW1lbnQud2lkdGggOiBtZWFzdXJlbWVudC5oZWlnaHQ7CiAgICAgICAgICAgICAgICB2YXIgc2Vjb25kYXJ5VGV4dE1lYXN1cmVtZW50ID0gX3RoaXMuX2lzVmVydGljYWwgPyBtZWFzdXJlbWVudC5oZWlnaHQgOiBtZWFzdXJlbWVudC53aWR0aDsKICAgICAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAgICAgeDogX3RoaXMuX2lzVmVydGljYWwKICAgICAgICAgICAgICAgICAgICAgICAgPyBzdGFja0VkZ2UueCAtIHByaW1hcnlUZXh0TWVhc3VyZW1lbnQgLyAyCiAgICAgICAgICAgICAgICAgICAgICAgIDogc3RhY2tFZGdlLnggLSBzZWNvbmRhcnlUZXh0TWVhc3VyZW1lbnQsCiAgICAgICAgICAgICAgICAgICAgeTogX3RoaXMuX2lzVmVydGljYWwKICAgICAgICAgICAgICAgICAgICAgICAgPyBzdGFja0VkZ2UueSArIFN0YWNrZWRCYXIuX0VYVFJFTUFfTEFCRUxfTUFSR0lOX0ZST01fQkFSCiAgICAgICAgICAgICAgICAgICAgICAgIDogc3RhY2tFZGdlLnkgLSBwcmltYXJ5VGV4dE1lYXN1cmVtZW50IC8gMiwKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBpZiAoYW55VG9vV2lkZS5zb21lKGZ1bmN0aW9uIChkKSB7IHJldHVybiBkOyB9KSkgewogICAgICAgICAgICAgICAgdGhpcy5fbGFiZWxBcmVhLnNlbGVjdEFsbCgiZyIpLnJlbW92ZSgpOwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgICBTdGFja2VkQmFyLnByb3RvdHlwZS5fZ2VuZXJhdGVBdHRyVG9Qcm9qZWN0b3IgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7CiAgICAgICAgICAgIHZhciBhdHRyVG9Qcm9qZWN0b3IgPSBfc3VwZXIucHJvdG90eXBlLl9nZW5lcmF0ZUF0dHJUb1Byb2plY3Rvci5jYWxsKHRoaXMpOwogICAgICAgICAgICB2YXIgdmFsdWVBdHRyID0gdGhpcy5faXNWZXJ0aWNhbCA/ICJ5IiA6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aWYgKGF0dHIgPT09IHByaW1hcnlBdHRyKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gW3RoaXMuX3N0YWNrZWRFeHRlbnQoKV07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICByZXR1cm4gX3N1cGVyLnByb3RvdHlwZS5nZXRFeHRlbnRzRm9yUHJvcGVydHkuY2FsbCh0aGlzLCBhdHRyKTsKICAgICAgICAgICAgfQogICAgICAgIH07CiAgICAgICAgU3RhY2tlZEJhci5wcm90b3R5cGUuaW52YWxpZGF0ZUNhY2hlID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLmludmFsaWRhdGVDYWNoZS5jYWxsKHRoaXMpOwogICAgICAgICAgICB0aGlzLl9tZWFzdXJlci5yZXNldCgpOwogICAgICAgIH07CiAgICAgICAgU3RhY2tlZEJhci5fRVhUUkVNQV9MQUJFTF9NQVJHSU5fRlJPTV9CQVIgPSA1OwogICAgICAgIHJldHVybiBTdGFja2VkQmFyOwogICAgfShiYXJQbG90LkJhcikpOwogICAgZXhwb3J0cy5TdGFja2VkQmFyID0gU3RhY2tlZEJhcjsKICAgIH0pOwoKICAgIHZhciB3YXRlcmZhbGxQbG90ID0gY3JlYXRlQ29tbW9uanNNb2R1bGUoZnVuY3Rpb24gKG1vZHVsZSwgZXhwb3J0cykgewogICAgLyoqCiAgICAgKiBDb3B5cmlnaHQgMjAxNC1wcmVzZW50IFBhbGFudGlyIFRlY2hub2xvZ2llcwogICAgICogQGxpY2Vuc2UgTUlUCiAgICAgKi8KICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCAiX19lc01vZHVsZSIsIHsgdmFsdWU6IHRydWUgfSk7CgoKCgogICAgdmFyIFdhdGVyZmFsbCA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHsKICAgICAgICB0c2xpYl9lczYuX19leHRlbmRzKFdhdGVyZmFsbCwgX3N1cGVyKTsKICAgICAgICBmdW5jdGlvbiBXYXRlcmZhbGwoKSB7CiAgICAgICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMpIHx8IHRoaXM7CiAgICAgICAgICAgIF90aGlzLl9jb25uZWN0b3JzRW5hYmxlZCA9IGZhbHNlOwogICAgICAgICAgICBfdGhpcy5hZGRDbGFzcygid2F0ZXJmYWxsLXBsb3QiKTsKICAgICAgICAgICAgcmV0dXJuIF90aGlzOwogICAgICAgIH0KICAgICAgICBXYXRlcmZhbGwucHJvdG90eXBlLmNvbm5lY3RvcnNFbmFibGVkID0gZnVuY3Rpb24gKGVuYWJsZWQpIHsKICAgICAgICAgICAgaWYgKGVuYWJsZWQgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2Nvbm5lY3RvcnNFbmFibGVkOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2Nvbm5lY3RvcnNFbmFibGVkID0gZW5hYmxlZDsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBXYXRlcmZhbGwucHJvdG90eXBlLnRvdGFsID0gZnVuY3Rpb24gKHRvdGFsKSB7CiAgICAgICAgICAgIGlmICh0b3RhbCA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fcHJvcGVydHlCaW5kaW5ncy5nZXQoV2F0ZXJmYWxsLl9UT1RBTF9LRVkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2JpbmRQcm9wZXJ0eShXYXRlcmZhbGwuX1RPVEFMX0tFWSwgdG90YWwsIG51bGwpOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9OwogICAgICAgIFdhdGVyZmFsbC5wcm90b3R5cGUuX2FkZGl0aW9uYWxQYWludCA9IGZ1bmN0aW9uICh0aW1lKSB7CiAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7Ci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ICAgICB9CiAgICAgICAgfTsKICAgICAgICBXYXRlcmZhbGwucHJvdG90eXBlLl9nZW5lcmF0ZUF0dHJUb1Byb2plY3RvciA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKICAgICAgICAgICAgdmFyIGF0dHJUb1Byb2plY3RvciA9IF9zdXBlci5wcm90b3R5cGUuX2dlbmVyYXRlQXR0clRvUHJvamVjdG9yLmNhbGwodGhpcyk7CiAgICAgICAgICAgIHZhciB5U2NhbGUgPSB0aGlzLnkoKS5zY2FsZTsKICAgICAgICAgICAgdmFyIHRvdGFsQWNjZXNzb3IgPSBwbG90LlBsb3QuX3NjYWxlZEFjY2Vzc29yKHRoaXMudG90YWwoKSk7CiAgICAgICAgICAgIHZhciB5QXR0ciA9IHRoaXMuYXR0cigieSIpOwogICAgICAgICAgICBpZiAoeUF0dHIgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgYXR0clRvUHJvamVjdG9yWyJ5Il0gPSBmdW5jdGlvbiAoZCwgaSwgZGF0YXNldCkgewogICAgICAgICAgICAgICAgICAgIHZhciBjdXJyZW50VmFsdWUgPSBfdGhpcy55KCkuYWNjZXNzb3IoZCwgaSwgZGF0YXNldCk7CiAgICAgICAgICAgICAgICAgICAgdmFyIGlzVG90YWwgPSB0b3RhbEFjY2Vzc29yKGQsIGksIGRhdGFzZXQpOwogICAgICAgICAgICAgICAgICAgIGlmIChpc1RvdGFsKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBNYXRoLm1pbih5U2NhbGUuc2NhbGUoY3VycmVudFZhbHVlKSwgeVNjYWxlLnNjYWxlKDApKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjdXJyZW50U3VidG90YWwgPSBfdGhpcy5fc3VidG90YWxzW2ldOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAoaSA9PT0gMCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGN1cnJlbnRWYWx1ZSA8IDApIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4geVNjYWxlLnNjYWxlKGN1cnJlbnRTdWJ0b3RhbCAtIGN1cnJlbnRWYWx1ZSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4geVNjYWxlLnNjYWxlKGN1cnJlbnRTdWJ0b3RhbCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHByaW9yU3VidG90YWwgPSBfdGhpcy5fc3VidG90YWxzW2kgLSAxXTsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGN1cnJlbnRTdWJ0b3RhbCA+IHByaW9yU3VidG90YWwpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB5U2NhbGUuc2NhbGUoY3VycmVudFN1YnRvdGFsKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB5U2NhbGUuc2NhbGUocHJpb3JTdWJ0b3RhbCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciBoZWlnaHRBdHRyID0gdGhpcy5hdHRyKCJoZWlnaHQiKTsKICAgICAgICAgICAgaWYgKGhlaWdodEF0dHIgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgYXR0clRvUHJvamVjdG9yWyJoZWlnaHQiXSA9IGZ1bmN0aW9uIChkLCBpLCBkYXRhc2V0KSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIGlzVG90YWwgPSB0b3RhbEFjY2Vzc29yKGQsIGksIGRhdGFzZXQpOwogICAgICAgICAgICAgICAgICAgIHZhciBjdXJyZW50VmFsdWUgPSBfdGhpcy55KCkuYWNjZXNzb3IoZCwgaSwgZGF0YXNldCk7CiAgICAgICAgICAgICAgICAgICAgaWYgKGlzVG90YWwpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIE1hdGguYWJzKHlTY2FsZS5zY2FsZShjdXJyZW50VmFsdWUpIC0geVNjYWxlLnNjYWxlKDApKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjdXJyZW50U3VidG90YWwgPSBfdGhpcy5fc3VidG90YWxzW2ldOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAoaSA9PT0gMCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIE1hdGguYWJzKHlTY2FsZS5zY2FsZShjdXJyZW50U3VidG90YWwpIC0geVNjYWxlLnNjYWxlKGN1cnJlbnRTdWJ0b3RhbCAtIGN1cnJlbnRWYWx1ZSkpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHByaW9yU3VidG90YWwgPSBfdGhpcy5fc3VidG90YWxzW2kgLSAxXTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBNYXRoLmFicyh5U2NhbGUuc2NhbGUoY3VycmVudFN1YnRvdGFsKSAtIHlTY2FsZS5zY2FsZShwcmlvclN1YnRvdGFsKSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGF0dHJUb1Byb2plY3RvclsiY2xhc3MiXSA9IGZ1bmN0aW9uIChkLCBpLCBkYXRhc2V0KSB7CiAgICAgICAgICAgICAgICB2YXIgYmFzZUNsYXNzID0gIiI7CiAgICAgICAgICAgICAgICBpZiAoX3RoaXMuYXR0cigiY2xhc3MiKSAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgYmFzZUNsYXNzID0gX3RoaXMuYXR0cigiY2xhc3MiKS5hY2Nlc3NvcihkLCBpLCBkYXRhc2V0KSArICIgIjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHZhciBpc1RvdGFsID0gdG90YWxBY2Nlc3NvcihkLCBpLCBkYXRhc2V0KTsKICAgICAgICAgICAgICAgIGlmIChpc1RvdGFsKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGJhc2VDbGFzcyArIFdhdGVyZmFsbC5fQkFSX1RPVEFMX0NMQVNTOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIGRlbHRhID0gX3RoaXMueSgpLmFjY2Vzc29yKGQsIGksIGRhdGFzZXQpOwogICAgICAgICAgICAgICAgICAgIHJldHVybiBiYXNlQ2xhc3MgKyAoZGVsdGEgPiAwID8gV2F0ZXJmYWxsLl9CQVJfR1JPV1RIX0NMQVNTIDogV2F0ZXJmYWxsLl9CQVJfREVDTElORV9DTEFTUyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIHJldHVybiBhdHRyVG9Qcm9qZWN0b3I7CiAgICAgICAgfTsKICAgICAgICBXYXRlcmZhbGwucHJvdG90eXBlLl9vbkRhdGFzZXRVcGRhdGUgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHRoaXMuX3VwZGF0ZVN1YnRvdGFscygpOwogICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLl9vbkRhdGFzZXRVcGRhdGUuY2FsbCh0aGlzKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfTsKICAgICAgICBXYXRlcmZhbGwucHJvdG90eXBlLl9jYWxjdWxhdGVTdWJ0b3RhbHNBbmRFeHRlbnQgPSBmdW5jdGlvbiAoZGF0YXNldCkgewogICAgICAgICAgICB2YXIgbWluID0gTnVtYmVyLk1BWF9WQUxVRTsKICAgICAgICAgICAgdmFyIG1heCA9IE51bWJlci5NSU5fVkFMVUU7CiAgICAgICAgICAgIHZhciB0b3RhbCA9IDA7CiAgICAgICAgICAgIHZhciBoYXNTdGFydGVkID0gZmFsc2U7CiAgICAgICAgICAgIHZhciBkYXRhID0gZGF0YXNldC5kYXRhKCk7CiAgICAgICAgICAgIHZhciBkYXRhTGVuID0gZGF0YS5sZW5ndGg7CiAgICAgICAgICAgIGZvciAodmFyIGluZGV4ID0gMDsgaW5kZXggPCBkYXRhTGVuOyBpbmRleCsrKSB7CiAgICAgICAgICAgICAgICB2YXIgZGF0dW0gPSBkYXRhW2luZGV4XTsKICAgICAgICAgICAgICAgIHZhciBjdXJyZW50VmFsdWUgPSB0aGlzLnkoKS5hY2Nlc3NvcihkYXR1bSwgaW5kZXgsIGRhdGFzZXQpOwogICAgICAgICAgICAgICAgdmFyIGlzVG90YWwgPSB0aGlzLnRvdGFsKCkuYWNjZXNzb3IoZGF0dW0sIGluZGV4LCBkYXRhc2V0KTsKICAgICAgICAgICAgICAgIGlmICghaXNUb3RhbCB8fCBpbmRleCA9PT0gMCkgewogICAgICAgICAgICAgICAgICAgIHRvdGFsICs9IGN1cnJlbnRWYWx1ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuX3N1YnRvdGFscy5wdXNoKHRvdGFsKTsKICAgICAgICAgICAgICAgIGlmICh0b3RhbCA8IG1pbikgewogICAgICAgICAgICAgICAgICAgIG1pbiA9IHRvdGFsOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKHRvdGFsID4gbWF4KSB7CiAgICAgICAgICAgICAgICAgICAgbWF4ID0gdG90YWw7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAoaXNUb3RhbCkgewogICAgICAgICAgICAgICAgICAgIGlmIChjdXJyZW50VmFsdWUgPCBtaW4pIHsKICAgICAgICAgICAgICAgICAgICAgICAgbWluID0gY3VycmVudFZhbHVlOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBpZiAoY3VycmVudFZhbHVlID4gbWF4KSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG1heCA9IGN1cnJlbnRWYWx1ZTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAoIWhhc1N0YXJ0ZWQgJiYgaXNUb3RhbCkgewogICAgICAgICAgICAgICAgICAgIHZhciBzdGFydFRvdGFsID0gY3VycmVudFZhbHVlIC0gdG90YWw7CiAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0aGlzLl9zdWJ0b3RhbHMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fc3VidG90YWxzW2ldICs9IHN0YXJ0VG90YWw7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGhhc1N0YXJ0ZWQgPSB0cnVlOwogICAgICAgICAgICAgICAgICAgIHRvdGFsICs9IHN0YXJ0VG90YWw7CiAgICAgICAgICAgICAgICAgICAgbWluICs9IHN0YXJ0VG90YWw7CiAgICAgICAgICAgICAgICAgICAgbWF4ICs9IHN0YXJ0VG90YWw7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fZXh0ZW50ID0gW21pbiwgbWF4XTsKICAgICAgICB9OwogICAgICAgIFdhdGVyZmFsbC5wcm90b3R5cGUuX2RyYXdDb25uZWN0b3JzID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICB2YXIgYXR0clRvUHJvamVjdG9yID0gdGhpcy5fZ2V0QXR0clRvU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ByZXNlbnRhdGlvbgogICAgICAgICAgICAgICAgYWJzdiA9IDA7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgbGV0IGY7CiAgICAgICAgICAgIGlmIChhYnN2ID49IDEwMDAwKSB7CiAgICAgICAgICAgICAgICBmID0gZm9ybWF0KCcuJyArIGRpZ2l0cyArICd+ZScpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKGFic3YgPiAwICYmIGFic3YgPCAwLjAxKSB7CiAgICAgICAgICAgICAgICBmID0gZm9ybWF0KCcuJyArIGRpZ2l0cyArICd+ZScpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgZiA9IGZvcm1hdCgnLicgKyBkaWdpdHMgKyAnfmcnKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gZih2KTsKICAgICAgICB9OwogICAgfQogICAgY29uc3Qgc3RlcEZvcm1hdHRlciA9IGZvcm1hdChgLiR7U1RFUF9GT1JNQVRURVJfUFJFQ0lTSU9OfX5zYCk7CiAgICBmdW5jdGlvbiBzdGVwWCgpIHsKICAgICAgICBsZXQgc2NhbGUgPSBuZXcgc3JjJDIuU2NhbGVzLkxpbmVhcigpOwogICAgICAgIHNjYWxlLnRpY2tHZW5lcmF0b3Ioc3JjJDIuU2NhbGVzLlRpY2tHZW5lcmF0b3JzLmludGVnZXJUaWNrR2VuZXJhdG9yKCkpOwogICAgICAgIGxldCBheGlzID0gbmV3IHNyYyQyLkF4ZXMuTnVtZXJpYyhzY2FsZSwgJ2JvdHRvbScpOwogICAgICAgIGF4aXMuZm9ybWF0dGVyKHN0ZXBGb3JtYXR0ZXIpOwogICAgICAgIHJldHVybiB7CiAgICAgICAgICAgIHNjYWxlOiBzY2FsZSwKICAgICAgICAgICAgYXhpczogYXhpcywKICAgICAgICAgICAgYWNjZXNzb3I6IChkKSA9PiBkLnN0ZXAsCiAgICAgICAgfTsKICAgIH0KICAgIGxldCB0aW1lRm9ybWF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XRhLmxlbmd0aCA+IDAgPyArZGF0YVswXS53YWxsX3RpbWUgOiAwOwogICAgICAgIHJldHVybiAoK2Qud2FsbF90aW1lIC0gZmlyc3QpIC8gKDYwICogNjAgKiAxMDAwKTsgLy8gbXMgdG8gaG91cnMKICAgIH07CiAgICBsZXQgcmVsYXRpdmVGb3JtYXR0ZXIgPSAobikgPT4gewogICAgICAgIC8vIHdlIHdpbGwgYWx3YXlzIHNob3cgMiB1bml0cyBvZiBwcmVjaXNpb24sIGUuZyBkYXlzIGFuZCBob3Vycywgb3IKICAgICAgICAvLyBtaW51dGVzIGFuZCBzZWNvbmRzLCBidXQgbm90IGhvdXJzIGFuZCBtaW51dGVzIGFuZCBzZWNvbmRzCiAgICAgICAgbGV0IHJldCA9ICcnOwogICAgICAgIGxldCBkYXlzID0gTWF0aC5mbG9vcihuIC8gMjQpOwogICAgICAgIG4gLT0gZGF5cyAqIDI0OwogICAgICAgIGlmIChkYXlzKSB7CiAgICAgICAgICAgIHJldCArPSBkYXlzICsgJ2QgJzsKICAgICAgICB9CiAgICAgICAgbGV0IGhvdXJzID0gTWF0aC5mbG9vcihuKTsKICAgICAgICBuIC09IGhvdXJzOwogICAgICAgIG4gKj0gNjA7CiAgICAgICAgaWYgKGhvdXJzIHx8IGRheXMpIHsKICAgICAgICAgICAgcmV0ICs9IGhvdXJzICsgJ2ggJzsKICAgICAgICB9CiAgICAgICAgbGV0IG1pbnV0ZXMgPSBNYXRoLmZsb29yKG4pOwogICAgICAgIG4gLT0gbWludXRlczsKICAgICAgICBuICo9IDYwOwogICAgICAgIGlmIChtaW51dGVzIHx8IGhvdXJzIHx8IGRheXMpIHsKICAgICAgICAgICAgcmV0ICs9IG1pbnV0ZXMgKyAnbSAnOwogICAgICAgIH0KICAgICAgICBsZXQgc2Vjb25kcyA9IE1hdGguZmxvb3Iobik7CiAgICAgICAgcmV0dXJuIHJldCArIHNlY29uZHMgKyAncyc7CiAgICB9OwogICAgZnVuY3Rpb24gcmVsYXRp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iAgICAgICAgcmV0dXJuIGNsYXNzIERhdGFMb2FkZXJCZWhhdmlvckltcGwgZXh0ZW5kcyBzdXBlckNsYXNzIHsKICAgICAgICAgICAgY29uc3RydWN0b3IoKSB7CiAgICAgICAgICAgICAgICBzdXBlciguLi5hcmd1bWVudHMpOwogICAgICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAgICAgKiBBIHVuaXF1ZSBpZGVudGlmaWFibGUgc3RyaW5nLiBXaGVuIGNoYW5nZXMsIGl0IGV4cHVuZ2VzIHRoZSBkYXRhCiAgICAgICAgICAgICAgICAgKiBjYWNoZS4KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgdGhpcy5sb2FkS2V5ID0gJyc7CiAgICAgICAgICAgICAgICAvLyBMaXN0IG9mIGl0ZW1zIHRvIGJlIGxvYWRlZC4gQnkgZGVmYXVsdCwgaXRlbXMgYXJlIHBhc3NlZCB0bwogICAgICAgICAgICAgICAgLy8gYHJlcXVlc3REYXRhYCB0byBmZXRjaCBkYXRhLiBXaGVuIHRoZSByZXF1ZXN0IHJlc29sdmVzLCBpbnZva2VzCiAgICAgICAgICAgICAgICAvLyBgbG9hZERhdGFDYWxsYmFja2Agd2l0aCB0aGUgZGF0dW0gYW5kIGl0cyByZXNwb25zZS4KICAgICAgICAgICAgICAgIHRoaXMuZGF0YVRvTG9hZCA9IFtdOwogICAgICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAgICAgKiBBIGZ1bmN0aW9uIHRoYXQgdGFrZXMgYW4gaXRlbSBhcyBhbiBpbnB1dCBhbmQgcmV0dXJucyBhIHVuaXF1ZQogICAgICAgICAgICAgICAgICogaWRlbnRpZmlhYmxlIHN0cmluZy4gVXNlZCBmb3IgY2FjaGluZyBwdXJwb3Nlcy4KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgdGhpcy5nZXREYXRhTG9hZE5hbWUgPSAoaXRlbSkgPT4gU3RyaW5nKGl0ZW0pOwogICAgICAgICAgICAgICAgdGhpcy5kYXRhTG9hZGluZyA9IGZhbHNlOwogICAgICAgICAgICAgICAgLy8gVGhlIHN0YW5kYXJkIE5vZGUuaXNDb25uZWN0ZWQgZG9lc24ndCBzZWVtIHRvIGJlIHNldCByZWxpYWJseSwgc28gd2UKICAgICAgICAgICAgICAgIC8vIHdpcmUgdXAgb3VyIG93biBwcm9wZXJ0eSBtYW51YWxseS4KICAgICAgICAgICAgICAgIHRoaXMuX2lzQ29ubmVjdGVkID0gZmFsc2U7CiAgICAgICAgICAgICAgICAvKgogICAgICAgICAgICAgICAgICogQSBtYXAgb2YgYSBjYWNoZSBrZXkgdG8gTG9hZFN0YXRlLiBJZiBhIGNhY2hlS2V5IGRvZXMgbm90IGV4aXN0IGluIHRoZQogICAgICAgICAgICAgICAgICogbWFwLCBpdCBpcyBjb25zaWRlcmVkIE5PVF9MT0FERUQuCiAgICAgICAgICAgICAgICAgKiBJbnZva2luZyBgcmVsb2FkYCBvciBhIGNoYW5nZSBpbiBgbG9hZEtleWAgY2xlYXJzIHRoZSBjYWNoZS4KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgdGhpcy5fZGF0YUxvYWRTdGF0ZSA9IG5ldyBNYXAoKTsKICAgICAgICAgICAgICAgIHRoaXMuX2NhbmNlbGxlciA9IG5ldyBDYW5jZWxsZXIoKTsKICAgICAgICAgICAgICAgIHRoaXMuX2xvYWREYXRhQXN5bmMgPSBudWxsOwogICAgICAgICAgICAgICAgdGhpcy5fbG9hZERhdGEgPSBsb2Rhc2gudGhyb3R0bGUodGhpcy5fbG9hZERhdGFJbXBsLCAxMDAsIHsKICAgICAgICAgICAgICAgICAgICBsZWFkaW5nOiB0cnVlLAogICAgICAgICAgICAgICAgICAgIHRyYWlsaW5nOiB0cnVlLAogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY29ubmVjdGVkQ2FsbGJhY2soKSB7CiAgICAgICAgICAgICAgICBzdXBlci5jb25uZWN0ZWRDYWxsYmFjaygpOwogICAgICAgICAgICAgICAgdGhpcy5faXNDb25uZWN0ZWQgPSB0cnVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGRpc2Nvbm5lY3RlZENhbGxiYWNrKCkgewogICAgICAgICAgICAgICAgc3VwZXIuZGlzY29ubmVjdGVkQ2FsbGJhY2soKTsKICAgICAgICAgICAgICAgIHRoaXMuX2lzQ29ubmVjdGVkID0gZmFsc2U7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgc3RhdGljIGdldCBwcm9wZXJ0aWVzKCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgICAgICBhY3RpdmU6IHsKICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogQm9vbGVhbiwKICAgICAgICAgICAgICAgICAgICAgICAgb2JzZXJ2ZXI6ICdfbG9hZERhdGFJZkFjdGl2ZScsCiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICBfaXNDb25uZWN0ZWQ6IHsgdHlwZTogQm9vbGVhbiB9LAogICAgICAgICAgICAgICAgICAgIGxvYWRLZXk6IHsgdHlwZTogU3RyaW5nIH0sCiAgICAgICAgICAgICAgICAgICAgZGF0YVRvTG9hZDogeyB0eXBlOiBBcnJheSB9LAogICAgICAgICAgICAgICAgICAgIGdldERhdGFMb2FkTmFtZTogeyB0eXBlOiBPYmplY3QgfSwKICAgICAgICAgICAgICAgICAgICBsb2FkRGF0YUNhbGxiYWNrOiB7IHR5cGU6IE9iamVjdCB9LAogICAgICAgICAgICAgICAgICAgIHJlcXVlc3REYXRhOiB7IHR5cGU6IE9iamVjdCB9LAogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgfQogICAgICAgICAgICBzdGF0aWMgZ2V0IG9ic2VydmVycygpIHsKICAgICAgICAgICAgICAgIHJldHVybiBbJ19kYXRhVG9Mb2FkQ2hhbmdlZChfaXNDb25uZWN0ZWQsIGRhdGFUb0xvYWQuKiknXTsKICAgICAgICAgICAgfQogICAgICAgICAgICBvbkxvYWRGaW5pc2goKSB7CiAgICAgICAgICAgICAgICAvLyBPdmVycmlkZSB0byBkbyBzb21ldGhpbmcgdXNlZnVsLgogICAgICAgICAgICB9CiAgICAgICAgICAgIHJlbG9hZCgpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2RhdGFMb2FkU3RhdGUuY2xlYXIoKTsKICAgICAgICAgICAgICAgIHRoaXMuX2xvYWREYXRhKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmVzZXQoKSB7CiAgICAgICAgICAgICAgICAvLyBodHRwczovL2dpdGh1Yi5jb20vdGVuc29yZmxvdy90ZW5zb3Jib2FyZC9pc3N1ZXMvMTQ5OQogICAgICAgICAgICAgICAgLy8gQ2Fubm90IHVzZSB0aGUgb2JzZXJ2ZXIgdG8gb2JzZXJ2ZSBgbG9hZEtleWAgY2hhbmdlcyBkaXJlY3RseS4KICAgICAgICAgICAgICAgIGlmICh0aGlzLl9sb2FkRGF0YUFzeW5jICE9IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQodGhpcy5fbG9hZERhdGFBc3luYyk7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fbG9hZERhdGFBc3luYyA9IG51bGw7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAodGhpcy5fY2FuY2VsbGVyKQogICAgICAgICAgICAgICAgICAgIHRoaXMuX2NhbmNlbGxlci5jYW5jZWxBbGwoKTsKICAgICAgICAgICAgICAgIGlmICh0aGlzLl9kYXRhTG9hZFN0YXRlKQogICAgICAgICAgICAgICAgICAgIHRoaXMuX2RhdGFMb2FkU3RhdGUuY2xlYXIoKTsKICAgICAgICAgICAgICAgIGlmICh0aGlzLl9pc0Nvbm5lY3RlZCkKICAgICAgICAgICAgICAgICAgICB0aGlzLl9sb2FkRGF0YSgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIF9kYXRhVG9Mb2FkQ2hhbmdlZCgpIHsKICAgICAgICAgICAgICAgIGlmICh0aGlzLl9pc0Nvbm5lY3RlZCkKICAgICAgICAgICAgICAgICAgICB0aGlzLl9sb2FkRGF0YSgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGRldGFjaGVkKCkgewogICAgICAgICAgICAgICAgLy8gTm90ZTogQ2Fubm90IGNhbGwgY2FuY2VsbGVyLmNhbmNlbEFsbCBzaW5jZSBpdCB3aWxsIHBvaXNvbiB0aGUgY2FjaGUuCiAgICAgICAgICAgICAgICAvLyBkZXRhY2hlZCBnZXRzIGNhbGxlZCB3aGVuIGEgY29tcG9uZW50IGdldHMgdW5tb3VudGVkIGZyb20gdGhlIGRvY3VtZW50CiAgICAgICAgICAgICAgICAvLyBidXQgaXQgY2FuIGJlIHJlLW1vdW50ZWQuIFdoZW4gcmVtb3VudGVkLCBwb2lzb25lZCBjYWNoZSB3aWxsIG1hbmlmZXN0LgogICAgICAgICAgICAgICAgLy8gdD0wOiBkYXRhTG9hZFN0YXRlOiAnYScgPSBsb2FkaW5nCiAgICAgICAgICAgICAgICAvLyB0PTEwOiB1bm1vdW50CiAgICAgICAgICAgICAgICAvLyB0PTIwOiByZXF1ZXN0IGZvciAnYScgcmVzb2x2ZXMgYnV0IHdlIGRvIG5vdCBjaGFuZ2UgdGhlIGxvYWRTdGF0ZQogICAgICAgICAgICAgICAgLy8gYmVjYXVzZSB3ZSBkbyBub3Qgd2FudCB0byBzZXQgb25lIGlmLCBpbnN0ZWFkLCBpdCB3YXMgcmVzZXR0ZWQgYXQgdD0xMC4KICAgICAgICAgICAgICAgIGlmICh0aGlzLl9sb2FkRGF0YUFzeW5jICE9IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQodGhpcy5fbG9hZERhdGFBc3luYyk7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fbG9hZERhdGFBc3luYyA9IG51bGw7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgX2xvYWREYXRhSWZBY3RpdmUoKSB7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5hY3RpdmUpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9sb2FkRGF0YSgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIF9sb2FkRGF0YUltcGwoKSB7CiAgICAgICAgICAgICAgICBpZiAoIXRoaXMuYWN0aXZlKQogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgIGlmICh0aGlzLl9sb2FkRGF0YUFzeW5jICE9PSBudWxsKQogICAgICAgICAgICAgICAgICAgIGNsZWFyVGltZW91dCh0aGlzLl9sb2FkRGF0YUFzeW5jKTsKICAgICAgICAgICAgICAgIHRoaXMuX2xvYWREYXRhQXN5bmMgPSBzZXRUaW1lb3V0KHRoaXMuX2NhbmNlbGxlci5jYW5jZWxsYWJsZSgocmVzdWx0KSA9PiB7CiAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3VsdC5jYW5jZWxsZWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB0aGlzLmRhdGFMb2FkaW5nID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICBjb25zdCBkaXJ0eUl0ZW1zID0gdGhpcy5kYXRhVG9Mb2FkLmZpbHRlcigoZGF0dW0pID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgY2FjaGVLZXkgPSB0aGlzLmdldERhdGFMb2FkTmFtZShkYXR1bSk7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAhdGhpcy5fZGF0YUxvYWRTdGF0ZS5oYXMoY2FjaGVLZXkpOwogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgIGZvciAoY29uc3QgaXRlbSBvZiBkaXJ0eUl0ZW1zKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGNhY2hlS2V5ID0gdGhpcy5nZXREYXRhTG9hZE5hbWUoaXRlbSk7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2RhdGFMb2FkU3RhdGUuc2V0KGNhY2hlS2V5LCBMb2FkU3RhdGUuTE9BRElORyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGNvbnN0IG9uTG9hZCA9IHRoaXMuX2NhbmNlbGxlci5jYW5jZWxsYWJsZSgocmVzdWx0KSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXN1bHQuY2FuY2VsbGVkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgeyBpdGVtLCBkYXRhIH0gPSByZXN1bHQudmFsdWU7CiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGNhY2hlS2V5ID0gdGhpcy5nZXREYXRhTG9hZE5hbWUoaXRlbSk7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2RhdGFMb2FkU3RhdGUuc2V0KGNhY2hlS2V5LCBMb2FkU3RhdGUuTE9BREVEKTsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5sb2FkRGF0YUNhbGxiYWNrKHRoaXMsIGl0ZW0sIGRhdGEpOwogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgIGNvbnN0IG9uRmluaXNoID0gdGhpcy5fY2FuY2VsbGVyLmNhbmNlbGxhYmxlKChyZXN1bHQpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gT25seSBub3RpZnkgb2YgZGF0YSBsb2FkIGlmIHRoZSBsb2FkIHdhcyBub3QgY2FuY2VsbGVkLgogICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXJlc3VsdC5jYW5jZWxsZWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGtleXNGZXRjaGVkID0gcmVzdWx0LnZhbHVlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZmV0Y2hlZCA9IG5ldyBTZXQoZGlydHlJdGVtcy5tYXAoKGl0ZW0pID0+IHRoaXMuZ2V0RGF0YUxvYWROYW1lKGl0ZW0pKSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzaG91bGROb3RpZnkgPSB0aGlzLmRhdGFUb0xvYWQuc29tZSgoZGF0dW0pID0+IGZldGNoZWQuaGFzKHRoaXMuZ2V0RGF0YUxvYWROYW1lKGRhdHVtKSkpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNob3VsZE5vdGlmeSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMub25Mb2FkRmluaXNoKCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9sb2FkRGF0YUFzeW5jID0gbnVsbDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBpc0RhdGFGZXRjaFBlbmRpbmcgPSBBcnJheS5mcm9tKHRoaXMuX2RhdGFMb2FkU3RhdGUudmFsdWVzKCkpLmluY2x1ZGVzKExvYWRTdGF0ZS5MT0FESU5HKTsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFpc0RhdGFGZXRjaFBlbmRpbmcpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZGF0YUxvYWRpbmcgPSBmYWxzZTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgIHRoaXMucmVxdWVzdERhdGEoZGlydHlJdGVtcywgb25Mb2FkLCAoKSA9PiBvbkZpbmlzaCh1bmRlZmluZWQpKTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfQogICAgICAgIH07CiA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lbnQgPSBudWxsOwogICAgICAgIGZvciAoY29uc3QgZWxlbSBvZiBlbGVtcykgewogICAgICAgICAgICAvLyBhcHBseSBjc3MgdHJhbnNmb3JtIGZyb20gYW55IGFuY2VzdG9yIGVsZW1lbnQKICAgICAgICAgICAgY29uc3QgZWxlbWVudFRyYW5zZm9ybSA9IHNyYyQyLlV0aWxzLkRPTS5nZXRFbGVtZW50VHJhbnNmb3JtKGVsZW0pOwogICAgICAgICAgICBpZiAoZWxlbWVudFRyYW5zZm9ybSAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICBjb25zdCBtaWRYID0gZWxlbS5jbGllbnRXaWR0aCAvIDI7CiAgICAgICAgICAgICAgICBjb25zdCBtaWRZID0gZWxlbS5jbGllbnRIZWlnaHQgLyAyOwogICAgICAgICAgICAgICAgdHJhbnNmb3JtID0gc3JjJDIuVXRpbHMuTWF0aC5tdWx0aXBseVRyYW5zbGF0ZSh0cmFuc2Zvcm0sIFsKICAgICAgICAgICAgICAgICAgICBtaWRYLAogICAgICAgICAgICAgICAgICAgIG1pZFksCiAgICAgICAgICAgICAgICBdKTsKICAgICAgICAgICAgICAgIHRyYW5zZm9ybSA9IHNyYyQyLlV0aWxzLk1hdGgubXVsdGlwbHlNYXRyaXgodHJhbnNmb3JtLCBzcmMkMi5VdGlscy5NYXRoLmludmVydE1hdHJpeChlbGVtZW50VHJhbnNmb3JtKSk7CiAgICAgICAgICAgICAgICB0cmFuc2Zvcm0gPSBzcmMkMi5VdGlscy5NYXRoLm11bHRpcGx5VHJhbnNsYXRlKHRyYW5zZm9ybSwgWwogICAgICAgICAgICAgICAgICAgIC1taWRYLAogICAgICAgICAgICAgICAgICAgIC1taWRZLAogICAgICAgICAgICAgICAgXSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gYXBwbHkgc2Nyb2xsIG9mZnNldHMgZnJvbSBhbnkgYW5jZXN0b3IgZWxlbWVudAogICAgICAgICAgICBsZXQgb2Zmc2V0WCA9IGVsZW0uc2Nyb2xsTGVmdDsKICAgICAgICAgICAgbGV0IG9mZnNldFkgPSBlbGVtLnNjcm9sbFRvcDsKICAgICAgICAgICAgLy8gYXBwbHkgY2xpZW50K29mZnNldCBmcm9tIG9ubHkgYWNlbnN0b3IgIm9mZnNldFBhcmVudCIKICAgICAgICAgICAgaWYgKG9mZnNldFBhcmVudCA9PT0gbnVsbCB8fCBlbGVtID09PSBvZmZzZXRQYXJlbnQpIHsKICAgICAgICAgICAgICAgIG9mZnNldFggLT0gZWxlbS5vZmZzZXRMZWZ0ICsgZWxlbS5jbGllbnRMZWZ0OwogICAgICAgICAgICAgICAgb2Zmc2V0WSAtPSBlbGVtLm9mZnNldFRvcCArIGVsZW0uY2xpZW50VG9wOwogICAgICAgICAgICAgICAgb2Zmc2V0UGFyZW50ID0gZWxlbS5vZmZzZXRQYXJlbnQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdHJhbnNmb3JtID0gc3JjJDIuVXRpbHMuTWF0aC5tdWx0aXBseVRyYW5zbGF0ZSh0cmFuc2Zvcm0sIFsKICAgICAgICAgICAgICAgIG9mZnNldFgsCiAgICAgICAgICAgICAgICBvZmZzZXRZLAogICAgICAgICAgICBdKTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIHRyYW5zZm9ybTsKICAgIH0KICAgIGNsYXNzIEN1c3RvbVRyYW5zbGF0b3IgZXh0ZW5kcyBzcmMkMi5VdGlscy5UcmFuc2xhdG9yIHsKICAgICAgICBjb21wdXRlUG9zaXRpb24oY2xpZW50WCwgY2xpZW50WSkgewogICAgICAgICAgICBjb25zdCBjbGllbnRQb3NpdGlvbiA9IHsKICAgICAgICAgICAgICAgIHg6IGNsaWVudFgsCiAgICAgICAgICAgICAgICB5OiBjbGllbnRZLAogICAgICAgICAgICB9OwogICAgICAgICAgICBjb25zdCB0cmFuc2Zvcm0gPSBnZXRDdW11bGF0aXZlVHJhbnNmb3JtKHRoaXMuX3Jvb3RFbGVtZW50KTsKICAgICAgICAgICAgaWYgKHRyYW5zZm9ybSA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gY2xpZW50UG9zaXRpb247CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY29uc3QgdHJhbnNmb3JtZWQgPSBzcmMkMi5VdGlscy5NYXRoLmFwcGx5VHJhbnNmb3JtKHRyYW5zZm9ybSwgY2xpZW50UG9zaXRpb24pOwogICAgICAgICAgICByZXR1cm4gdHJhbnNmb3JtZWQ7CiAgICAgICAgfQogICAgfQogICAgY2xhc3MgTW91c2VEaXNwYXRjaGVyIGV4dGVuZHMgc3JjJDIuRGlzcGF0Y2hlcnMuTW91c2UgewogICAgICAgIGNvbnN0cnVjdG9yKGNvbXBvbmVudCkgewogICAgICAgICAgICBzdXBlcihjb21wb25lbnQpOwogICAgICAgICAgICAvLyBldmVudFRhcmdldCBpcyBgZG9jdW1lbnRgIGJ5IGRlZmF1bHQuIENoYW5nZSBpdCB0byB0aGUgcm9vdCBvZiBjaGFydC4KICAgICAgICAgICAgdGhpcy5fZXZlbnRUYXJnZXQgPSBjb21wb25lbnQucm9vdCgpLnJvb3RFbGVtZW50KCkubm9kZSgpOwogICAgICAgICAgICAvLyBSZXF1aXJlcyBjdXN0b20gdHJhbnNsYXRvciB0aGF0IHVzZXMgY29ycmVjdCBET00gdHJhdmVyc2FsICh3aXRoCiAgICAgICAgICAgIC8vIFdlYkNvbXBvbmVudHMpIHRvIGNoYW5nZSBwb2ludGVyIHBvc2l0aW9uIHRvIHJlbGF0aXZlIHRvIHRoZSByb290IG5vZGUuCiAgICAgICAgICAgIHRoaXMuX3RyYW5zbGF0b3IgPSBuZXcgQ3VzdG9tVHJhbnNsYXRvcihjb21wb25lbnQucm9vdCgpLnJvb3RFbGVtZW50KCkubm9kZSgpKTsKICAgICAgICB9CiAgICAgICAgc3RhdGljIGdldERpc3BhdGNoZXIoY29tcG9uZW50KSB7CiAgICAgICAgICAgIGNvbnN0IGVsZW1lbnQgPSBjb21wb25lbnQucm9vd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Bvc2l0aW9uWyJCT1RUT00iXSA9ICJib3R0b20iOwogICAgICAgIC8qKgogICAgICAgICAqIFBvc2l0aW9ucyB0aGUgdG9vbHRpcCB0byB0aGUgcmlnaHQgb2YgdGhlIGNoYXJ0LgogICAgICAgICAqLwogICAgICAgIFRvb2x0aXBQb3NpdGlvblsiUklHSFQiXSA9ICJyaWdodCI7CiAgICB9KShUb29sdGlwUG9zaXRpb24gfHwgKFRvb2x0aXBQb3NpdGlvbiA9IHt9KSk7CiAgICBjb25zdCBERUZBVUxUX1RPT0xUSVBfU1RZTEUgPSB7CiAgICAgICAgYm94U2hhZG93OiAnMCAxcHggNHB4IHJnYmEoMCwgMCwgMCwgLjMpJywKICAgICAgICBvcGFjaXR5OiAwLAogICAgICAgIHBvc2l0aW9uOiAnZml4ZWQnLAogICAgICAgIHdpbGxDaGFuZ2U6ICd0cmFuc2Zvcm0nLAogICAgICAgIHpJbmRleDogNSwKICAgIH07CiAgICBsZXQgVnpDaGFydFRvb2x0aXAgPSBjbGFzcyBWekNoYXJ0VG9vbHRpcCBleHRlbmRzIExlZ2FjeUVsZW1lbnRNaXhpbihQb2x5bWVyRWxlbWVudCkgewogICAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgICAgICBzdXBlciguLi5hcmd1bWVudHMpOwogICAgICAgICAgICB0aGlzLnBvc2l0aW9uID0gVG9vbHRpcFBvc2l0aW9uLkFVVE87CiAgICAgICAgICAgIHRoaXMubWluRGlzdEZyb21FZGdlID0gMTU7CiAgICAgICAgICAgIHRoaXMuX3N0eWxlQ2FjaGUgPSBudWxsOwogICAgICAgICAgICB0aGlzLl9yYWYgPSBudWxsOwogICAgICAgICAgICB0aGlzLl90dW5uZWwgPSBudWxsOwogICAgICAgIH0KICAgICAgICByZWFkeSgpIHsKICAgICAgICAgICAgdGhpcy5fc3R5bGVDYWNoZSA9IG51bGw7CiAgICAgICAgICAgIHRoaXMuX3JhZiA9IG51bGw7CiAgICAgICAgICAgIHRoaXMuX3R1bm5lbCA9IG51bGw7CiAgICAgICAgfQogICAgICAgIGF0dGFjaGVkKCkgewogICAgICAgICAgICB0aGlzLl90dW5uZWwgPSB0aGlzLl9jcmVhdGVUdW5uZWwoKTsKICAgICAgICAgICAgdGhpcy5faGlkZU9uQmx1ciA9ICgpID0+IHsKICAgICAgICAgICAgICAgIGlmIChkb2N1bWVudC5oaWRkZW4pCiAgICAgICAgICAgICAgICAgICAgdGhpcy5oaWRlKCk7CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKCd2aXNpYmlsaXR5Y2hhbmdlJywgdGhpcy5faGlkZU9uQmx1cik7CiAgICAgICAgfQogICAgICAgIGRldGFjaGVkKCkgewogICAgICAgICAgICB0aGlzLmhpZGUoKTsKICAgICAgICAgICAgdGhpcy5fcmVtb3ZlVHVubmVsKHRoaXMuX3R1bm5lbCk7CiAgICAgICAgICAgIHRoaXMuX3R1bm5lbCA9IG51bGw7CiAgICAgICAgICAgIHdpbmRvdy5yZW1vdmVFdmVudExpc3RlbmVyKCd2aXNpYmlsaXR5Y2hhbmdlJywgdGhpcy5faGlkZU9uQmx1cik7CiAgICAgICAgfQogICAgICAgIGNvbnRlbnQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl90dW5uZWwuc2hhZG93Um9vdDsKICAgICAgICB9CiAgICAgICAgaGlkZSgpIHsKICAgICAgICAgICAgd2luZG93LmNhbmNlbEFuaW1hdGlvbkZyYW1lKHRoaXMuX3JhZik7CiAgICAgICAgICAgIHRoaXMuX3N0eWxlQ2FjaGUgPSBudWxsOwogICAgICAgICAgICB0aGlzLl90dW5uZWwuc3R5bGUub3BhY2l0eSA9IDA7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENTUyBTY29wZXMgdGhlIG5ld2x5IGFkZGVkIERPTSAoaW4gbW9zdCB0b29sdGlwIHdoZXJlIGNvbHVtbnMgYXJlCiAgICAgICAgICogaW52YXJpYWJsZSwgb25seSBuZXdseSBhZGRlZCByb3dzIGFyZSBuZWNlc3NhcnkgdG8gYmUgc2NvcGVkKSBhbmQgcG9zaXRpb25zCiAgICAgICAgICogdGhlIHRvb2x0aXAgd2l0aCByZXNwZWN0IHRvIHRoZSBhbmNob3JOb2RlLgogICAgICAgICAqLwogICAgICAgIHVwZGF0ZUFuZFBvc2l0aW9uKGFuY2hvck5vZGUpIHsKICAgICAgICAgICAgd2luZG93LmNhbmNlbEFuaW1hdGlvbkZyYW1lKHRoaXMuX3JhZik7CiAgICAgICAgICAgIHRoaXMuX3JhZiA9IHdpbmRvdy5yZXF1ZXN0QW5pbWF0aW9uRnJhbWUoKCkgPT4gewogICAgICAgICAgICAgICAgaWYgKCF0aGlzLmlzQXR0YWNoZWQpCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgdGhpcy5fcmVwb3NpdGlvbkltcGwoYW5jaG9yTm9kZSk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICBfcmVwb3NpdGlvbkltcGwoYW5jaG9yTm9kZSkgewogICAgICAgICAgICBjb25zdCB0b29sdGlwQ29udGVudCA9IHRoaXMuX3R1bm5lbDsKICAgICAgICAgICAgY29uc3Qgbm9kZVJlY3QgPSBhbmNob3JOb2RlLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpOwogICAgICAgICAgICBjb25zdCB0b29sdGlwUmVjdCA9IHRvb2x0aXBDb250ZW50LmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpOwogICAgICAgICAgICBjb25zdCB2aWV3cG9ydEhlaWdodCA9IHdpbmRvdy5pbm5lckhlaWdodDsKICAgICAgICAgICAgY29uc3QgZG9jdW1lbnRXaWR0aCA9IGRvY3VtZW50LmJvZHkuY2xpZW50V2lkdGg7CiAgICAgICAgICAgIGNvbnN0IGFuY2hvclRvcCA9IG5vZGVSZWN0LnRvcDsKICAgICAgICAgICAgY29uc3QgYW5jaG9yQm90dG9tID0gYW5jaG9yVG9wICsgbm9kZVJlY3QuaGVpZ2h0OwogICAgICAgICAgICBjb25zdCBlZmZlY3RpdmVUb29sdGlwSGVpZ2h0ID0gdG9vbHRpcFJlY3QuaGVpZ2h0ICsgVE9PTFRJUF9ZX1BJWEVMX09GRlNFVDsKICAgICAgICAgICAgbGV0IGJvdHRvbSA9IG51bGw7CiAgICAgICAgICAgIGxldCBsZWZ0ID0gTWF0aC5tYXgodGhpcy5taW5EaXN0RnJvbUVkZ2UsIG5vZGVSZWN0LmxlZnQpOwogICAgICAgICAgICBsZXQgcmlnaHQgPSBudWxsOwogICAgICAgICAgICBsZXQgdG9wID0gYW5jaG9yVG9wOwogICAgICAgICAgICBpZiAodGhpcy5wb3NpdGlvbiA9PSBUb29sdGlwUG9zaXRpb24uUklHSFQpIHsKICAgICAgICAgICAgICAgIGxlZnQgPSBub2RlUmVjdC5yaWdodDsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRvcCA9IGFuY2hvckJvdHRvbSArIFRPT0xUSVBfWV9QSVhFTF9PRkZTRVQ7CiAgICAgICAgICAgICAgICAvLyBwcmV2ZW50IGl0IGZyb20gZmFsbGluZyBvZmYgdGhlIHJpZ2h0IHNpZGUgb2YgdGhlIHNjcmVlbi4KICAgICAgICAgICAgICAgIGlmIChkb2N1bWVudFdpZHRoIDwgbGVmdCArIHRvb2x0aXBSZWN0LndpZHRoICsgdGhpcy5taW5EaXN0RnJvbUVkZ2UpIHsKICAgICAgICAgICAgICAgICAgICBsZWZ0ID0gbnVsbDsKICAgICAgICAgICAgICAgICAgICByaWdodCA9IHRoaXMubWluRGlzdEZyb21FZGdlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIElmIHRoZXJlIGlzIG5vdCBlbm91Z2ggc3BhY2UgdG8gcmVuZGVyIHRvb2x0aXAgYmVsb3cgdGhlIGFuY2hvck5vZGUgaW4KICAgICAgICAgICAgLy8gdGhlIHZpZXdwb3J0IGFuZCB0aGVyZSBpcyBlbm91Z2ggc3BhY2UgYWJvdmUsIHBsYWNlIGl0IGFib3ZlIHRoZQogICAgICAgICAgICAvLyBhbmNob3JOb2RlLgogICAgICAgICAgICBpZiAodGhpcy5wb3NpdGlvbiA9PSBUb29sdGlwUG9zaXRpb24uQVVUTyAmJgogICAgICAgICAgICAgICAgbm9kZVJlY3QudG9wIC0gZWZmZWN0aXZlVG9vbHRpcEhlaWdodCA+IDAgJiYKICAgICAgICAgICAgICAgIHZpZXdwb3J0SGVpZ2h0IDwgbm9kZVJlY3QudG9wICsgbm9kZVJlY3QuaGVpZ2h0ICsgZWZmZWN0aXZlVG9vbHRpcEhlaWdodCkgewogICAgICAgICAgICAgICAgdG9wID0gbnVsbDsKICAgICAgICAgICAgICAgIGJvdHRvbSA9IHZpZXdwb3J0SGVpZ2h0IC0gYW5jaG9yVG9wICsgVE9PTFRJUF9ZX1BJWEVMX09GRlNFVDsKICAgICAgICAgICAgfQogICAgICAgICAgICBjb25zdCBuZXdTdHlsZSA9IHsKICAgICAgICAgICAgICAgIGNvbnRhaW46ICdjb250ZW50JywKICAgICAgICAgICAgICAgIG9wYWNpdHk6IDEsCiAgICAgICAgICAgICAgICBsZWZ0OiBsZWZ0ID8gYCR7bGVmdH1weGAgOiBudWxsLAogICAgICAgICAgICAgICAgcmlnaHQ6IHJpZ2h0ID8gYCR7cmlnaHR9cHhgIDogbnVsbCwKICAgICAgICAgICAgICAgIHRvcDogdG9wID8gYCR7dG9wfXB4YCA6IG51bGwsCiAgICAgICAgICAgICAgICBib3R0b206IGJvdHRvbSA/IGAke2JvdHRvbX1weGAgOiBudWxsLAogICAgICAgICAgICB9OwogICAgICAgICAgICAvLyBEbyBub3QgdXBkYXRlIHRoZSBzdHlsZSAod2hpY2ggY2FuIGNhdXNlIHJlLWxheW91dCkgaWYgaXQgaGFzIG5vdAogICAgICAgICAgICAvLyBjaGFuZ2VkLgogICAgICAgICAgICBpZiAoIWxvZGFzaC5pc0VxdWFsKHRoaXMuX3N0eWxlQ2FjaGUsIG5ld1N0eWxlKSkgewogICAgICAgICAgICAgICAgT2JqZWN0LmFzc2lnbih0b29sdGlwQ29udGVudC5zdHlsZSwgbmV3U3R5bGUpOwogICAgICAgICAgICAgICAgdGhpcy5fc3R5bGVDYWNoZSA9IG5ld1N0eWxlOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIF9jcmVhdGVUdW5uZWwoKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5jb250ZW50Q29tcG9uZW50TmFtZSkgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IFJhbmdlRXJyb3IoJ1JlcXVpcmUgYGNvbnRlbnRDb21wb25lbnROYW1lYCB0byBiZSBhIG5hbWUgb2YgYSBQb2x5bWVyIGNvbXBvbmVudCcpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNvbnN0IHR1bm5lbCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQodGhpcy5jb250ZW50Q29tcG9uZW50TmFtZSk7CiAgICAgICAgICAgIE9iamVjdC5hc3NpZ24odHVubmVsLnN0eWxlLCBERUZBVUxUX1RPT0xUSVBfU1RZTEUpOwogICAgICAgICAgICBkb2N1bWVudC5ib2R5LmFwcGVuZENoaWxkKHR1bm5lbCk7CiAgICAgICAgICAgIHJldHVybiB0dW5uZWw7CiAgICAgICAgfQogICAgICAgIF9yZW1vdmVUdW5uZWwodHVubmVsKSB7CiAgICAgICAgICAgIGRvY3VtZW50LmJvZHkucmVtb3ZlQ2hpbGQodHVubmVsKTsKICAgICAgICB9CiAgICB9OwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoeyB0eXBlOiBTdHJpbmcgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBTdHJpbmcpCiAgICBdLCBWekNoYXJ0VG9vbHRpcC5wcm90b3R5cGUsICJjb250ZW50Q29tcG9uZW50TmFtZSIsIHZvaWQgMCk7C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aXN0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiAiQVMgSVMiIEJBU0lTLAogICAgV0lUSE9VVCBXQVJSQU5USUVTIE9SIENPTkRJVElPTlMgT0YgQU5ZIEtJTkQsIGVpdGhlciBleHByZXNzIG9yIGltcGxpZWQuCiAgICBTZWUgdGhlIExpY2Vuc2UgZm9yIHRoZSBzcGVjaWZpYyBsYW5ndWFnZSBnb3Zlcm5pbmcgcGVybWlzc2lvbnMgYW5kCiAgICBsaW1pdGF0aW9ucyB1bmRlciB0aGUgTGljZW5zZS4KICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCiAgICBjbGFzcyBMaW5lYXJTY2FsZSBleHRlbmRzIHNyYyQyLlNjYWxlcy5MaW5lYXIgewogICAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgICAgICBzdXBlcigpOwogICAgICAgICAgICB0aGlzLl9pZ25vcmVPdXRsaWVyID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMucGFkUHJvcG9ydGlvbigwLjIpOwogICAgICAgIH0KICAgICAgICBzZXRWYWx1ZVByb3ZpZGVyRm9yRG9tYWluKHByb3ZpZGVyKSB7CiAgICAgICAgICAgIHRoaXMuX3ZhbHVlUHJvdmlkZXJGb3JEb21haW4gPSBwcm92aWRlcjsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFRPRE8obmlja2ZlbHQpOiBFeGFtaW5lIHdoZXRoZXIgd2UgdHJ1bHkgcmVxdWlyZSBgY2AuCiAgICAgICAgICogQWRkcyBzb21lIHBhZGRpbmcgdG8gYSBnaXZlbiBkb21haW4uIFNwZWNpZmljYWxseSwgaXQ6CiAgICAgICAgICogLSByZXR1cm5zIGFib3V0IFstMC4xYSAtIGMsIDIuMWEgKyBjXSB3aGVuIGEgPSBiIGFuZCBhID49IDAuCiAgICAgICAgICogLSByZXR1cm5zIGFib3V0IFstMi4xfGF8IC0gYywgLTAuMXxhfCArIGNdIHdoZW4gYSA9IGIgYW5kIGEgPCAwLgogICAgICAgICAqIC0gcmV0dXJucyBbLTAuMWIsIGIgKyBwYWRQcm9wb3J0aW9uICogKGItYSldIGlmIGIgPiAyYSBhbmQgYSA+IDAKICAgICAgICAgKiAtIGVsc2UsIHBhZHMgYnkgYHBhZFByb3BvcnRpb25gCiAgICAgICAgICogTm90ZSB0aGF0IGBjYCBpcyBhIGNvbnN0YW50IG9mZnNldCB3aGljaCBzcGVjaWZpY2FsbHkgaXMgMS4xLiBQbGVhc2UgcmVmZXIKICAgICAgICAgKiB0byBbMV0gZm9yIGl0cyByYXRpb25hbGUuCiAgICAgICAgICogQG92ZXJyaWRlCiAgICAgICAgICovCiAgICAgICAgX25pY2VEb21haW4oZG9tYWluLCBjb3VudCkgewogICAgICAgICAgICBjb25zdCBbYSwgYl0gPSBkb21haW47CiAgICAgICAgICAgIGxldCBwYWRkaW5nOwogICAgICAgICAgICBjb25zdCBzcGFuID0gYiAtIGE7CiAgICAgICAgICAgIGlmIChzcGFuID09PSAwKSB7CiAgICAgICAgICAgICAgICAvLyBJZiBiPT09YSwgd2Ugd291bGQgY3JlYXRlIGFuIGVtcHR5IHJhbmdlLiBXZSBpbnN0ZWFkIHNlbGVjdCB0aGUgcmFuZ2UKICAgICAgICAgICAgICAgIC8vIFswLCAyKmFdIGlmIGEgPiAwLCBvciBbLTIqYSwgMF0gaWYgYSA8IDAsIHBsdXMgYSBsaXR0bGUgYml0IG9mCiAgICAgICAgICAgICAgICAvLyBleHRyYSBwYWRkaW5nIG9uIHRoZSB0b3AgYW5kIGJvdHRvbSBvZiB0aGUgcGxvdC4KICAgICAgICAgICAgICAgIHBhZGRpbmcgPSBNYXRoLmFicyhhKSAqIDEuMSArIDEuMTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHBhZGRpbmcgPSBzcGFuICogdGhpcy5wYWRQcm9wb3J0aW9uKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgbGV0IGxvd2VyOwogICAgICAgICAgICBpZiAoYSA+PSAwICYmIGEgPCBzcGFuKSB7CiAgICAgICAgICAgICAgICAvLyBbMV06IFdlIGluY2x1ZGUgdGhlIGludGVyY2VwdCAoeSA9IDApIGlmIGRvaW5nIHNvIGxlc3MgdGhhbiBkb3VibGVzIHRoZQogICAgICAgICAgICAgICAgLy8gc3BhbiBvZiB0aGUgeS1heGlzLiAoV2UgYWN0dWFsbHkgc2VsZWN0IGEgbG93ZXIgYm91bmQgdGhhdCdzIHNsaWdodGx5CiAgICAgICAgICAgICAgICAvLyBsZXNzIHRoYW4gMCBzbyB0aGF0IDAuMDAgd2lsbCBjbGVhcmx5IGJlIHdyaXR0ZW4gb24gdGhlIGxvd2VyIGVkZ2Ugb2YKICAgICAgICAgICAgICAgIC8vIHRoZSBjaGFydC4gVGhlIGxhYmVsIG9uIHRoZSBsb3dlc3QgdGljayBpcyBvZnRlbiBmaWx0ZXJlZCBvdXQuKQogICAgICAgICAgICAgICAgbG93ZXIgPSAtMC4xICogYjsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIGxvd2VyID0gYSAtIHBhZGRpbmc7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHN1cGVyLl9uaWNlRG9tYWluKFtsb3dlciwgYiArIHBhZGRpbmddLCBjb3VudCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBvdmVycmlkZSB0byByZW1vdmUgZGVmYXVsdCBwYWRkaW5nIGxvZ2ljLgogICAgICAgICAqLwogICAgICAgIF9nZXRVbmJvdW5kZWRFeHRlbnQoaWdub3JlQXR0YWNoU3RhdGUpIHsKICAgICAgICAgICAgY29uc3QgaW5jbHVkZWRWYWx1ZXMgPSB0aGlzLl9nZXRBbGxJbmNsdWRlZFZhbHVlcyhpZ25vcmVBdHRhY2hTdGF0ZSk7CiAgICAgICAgICAgIGxldCBleHRlbnQgPSB0aGlzLl9kZWZhdWx0RXh0ZW50KCk7CiAgICAgICAgICAgIGlmIChpbmNsdWRlZFZhbHVlcy5sZW5ndGggIT09IDApIHsKICAgICAgICAgICAgICAgIGNvbnN0IGNvbWJpbmVkRXh0ZW50ID0gWwogICAgICAgICAgICAgICAgICAgIHNyYyQyLlV0aWxzLk1hdGgubWluKGluY2x1ZGVkVmFsdWVzLCBleHRlbnRbMF0pLAogICAgICAgICAgICAgICAgICAgIHNyYyQyLlV0aWxzLk1hdGgubWF4KGluY2x1ZGVkVmFsdWVzLCBleHRlbnRbMV0pLAogICAgICAgICAgICAgICAgXTsKICAgICAgICAgICAgICAgIGV4dGVudCA9IHRoaXMuX25pY2VEb21haW4oY29tYmluZWRFeHRlbnQpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBleHRlbnQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBvdmVycmlkZQogICAgICAgICAqLwogICAgICAgIF9nZXRBbGxJbmNsdWRlZFZhbHVlcyhpZ25vcmVBdHRhY2hTdGF0ZSA9IGZhbHNlKSB7CiAgICAgICAgICAgIGNvbnN0IHZhbHVlcyA9IHRoaXMuX3ZhbHVlUHJvdmlkZXJGb3JEb21haW4KICAgICAgICAgICAgICAgID8gdGhpcy5fdmFsdWVQcm92aWRlckZvckRvbWFpbigpCiAgICAgICAgICAgICAgICA6IFtdOwogICAgICAgICAgICByZXR1cm4gdGhpcy5leHRlbnRPZlZhbHVlcyh2YWx1ZXMpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAb3ZlcnJpZGUgdG8gYXBwbHkgdGhlIG91dGxpZXIgbG9naWMuCiAgICAgICAgICovCiAgICAgICAgZXh0ZW50T2ZWYWx1ZXModmFsdWVzKSB7CiAgICAgICAgICAgIGNvbnN0IGxlZ2FsVmFsdWVzID0gdmFsdWVzLmZpbHRlcigoeCkgPT4gc3JjJDIuVXRpbHMuTWF0aC5pc1ZhbGlkTnVtYmVyKHgpKTsKICAgICAgICAgICAgbGV0IGZpbHRlcmVkVmFsdWVzID0gbGVnYWxWYWx1ZXM7CiAgICAgICAgICAgIGlmICh0aGlzLmlnbm9yZU91dGxpZXIoKSkgewogICAgICAgICAgICAgICAgY29uc3Qgc29ydGVkVmFsdWVzID0gbGVnYWxWYWx1ZXMuc29ydCgoYSwgYikgPT4gYSAtIGIpOwogICAgICAgICAgICAgICAgY29uc3QgYSA9IHRocmVzaG9sZChzb3J0ZWRWYWx1ZXMsIDAuMDUpOwogICAgICAgICAgICAgICAgY29uc3QgYiA9IHRocmVzaG9sZChzb3J0ZWRWYWx1ZXMsIDAuOTUpOwogICAgICAgICAgICAgICAgZmlsdGVyZWRWYWx1ZXMgPSBsZWdhbFZhbHVlcy5maWx0ZXIoKHgpID0+IHggPj0gYSAmJiB4IDw9IGIpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNvbnN0IGV4dGVudCQxID0gZXh0ZW50KGZpbHRlcmVkVmFsdWVzKTsKICAgICAgICAgICAgcmV0dXJuIGV4dGVudCQxWzBdID09IG51bGwgfHwgZXh0ZW50JDFbMV0gPT0gbnVsbCA/IFtdIDogZXh0ZW50JDE7CiAgICAgICAgfQogICAgICAgIGlnbm9yZU91dGxpZXIoaWdub3JlKSB7CiAgICAgICAgICAgIGlmICh0eXBlb2YgaWdub3JlID09ICdib29sZWFuJykgewogICAgICAgICAgICAgICAgdGhpcy5faWdub3JlT3V0bGllciA9IGlnbm9yZTsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9pZ25vcmVPdXRsaWVyOwogICAgICAgIH0KICAgIH0KCiAgICAvKiBDb3B5cmlnaHQgMjAxOCBUaGUgVGVuc29yRmxvdyBBdXRob3JzLiBBbGwgUmlnaHRzIFJl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dWVQcm92aWRlckZvckRvbWFpbihwcm92aWRlcikgewogICAgICAgICAgICB0aGlzLl92YWx1ZVByb3ZpZGVyRm9yRG9tYWluID0gcHJvdmlkZXI7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH0KICAgICAgICBpZ25vcmVPdXRsaWVyKGlnbm9yZSkgewogICAgICAgICAgICBpZiAodHlwZW9mIGlnbm9yZSA9PSAnYm9vbGVhbicpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2lnbm9yZU91dGxpZXIgPSBpZ25vcmU7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpcy5faWdub3JlT3V0bGllcjsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0dXJucyBwb3NzaWJsZSBgZXh0ZW50YHMgZm9yIGEgZGF0YXNldC4gTm90ZSB0aGF0IGEgZGF0YXNldCBjYW4gY29udGFpbgogICAgICAgICAqIG11bHRpcGxlIHNlcmllcy4gVW5saWtlIHRoZSBtZXRob2QgbmFtZSBzdWdnZXN0cywgaXQgdXNlcyB2YWx1ZXMgZnJvbSBlYWNoCiAgICAgICAgICogc2VyaWVzIHRvIHJldHVybiBgZXh0ZW50YHMuCiAgICAgICAgICogQG92ZXJyaWRlCiAgICAgICAgICovCiAgICAgICAgX2dldEFsbEluY2x1ZGVkVmFsdWVzKGlnbm9yZUF0dGFjaFN0YXRlID0gZmFsc2UpIHsKICAgICAgICAgICAgY29uc3QgdmFsdWVzID0gdGhpcy5fdmFsdWVQcm92aWRlckZvckRvbWFpbgogICAgICAgICAgICAgICAgPyB0aGlzLl92YWx1ZVByb3ZpZGVyRm9yRG9tYWluKCkKICAgICAgICAgICAgICAgIDogW107CiAgICAgICAgICAgIHJldHVybiB0aGlzLmV4dGVudE9mVmFsdWVzKHZhbHVlcyk7CiAgICAgICAgfQogICAgfQoKICAgIC8qIENvcHlyaWdodCAyMDE4IFRoZSBU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gICAgLy8gUmV0dXJuaW5nIE5hTiBtYWtlcyBzdXJlIGxpbmUgcGxvdCBkb2VzIG5vdCBwbG90IGlsbGVnYWwgdmFsdWVzLgogICAgICAgICAgICBpZiAoeCA8PSAwKQogICAgICAgICAgICAgICAgcmV0dXJuIE5hTjsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2QzTG9nU2NhbGUoeCk7CiAgICAgICAgfQogICAgICAgIGludmVydCh4KSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9kM0xvZ1NjYWxlLmludmVydCh4KTsKICAgICAgICB9CiAgICAgICAgc2NhbGVUcmFuc2Zvcm1hdGlvbih2YWx1ZSkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5zY2FsZSh2YWx1ZSk7CiAgICAgICAgfQogICAgICAgIGludmVydGVkVHJhbnNmb3JtYXRpb24odmFsdWUpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuaW52ZXJ0KHZhbHVlKTsKICAgICAgICB9CiAgICAgICAgZ2V0VHJhbnNmb3JtYXRpb25Eb21haW4oKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmRvbWFpbigpOwogICAgICAgIH0KICAgICAgICBzZXRUcmFuc2Zvcm1hdGlvbkRvbWFpbihkb21haW4pIHsKICAgICAgICAgICAgdGhpcy5kb21haW4oZG9tYWluKTsKICAgICAgICB9CiAgICAgICAgZ2V0VHJhbnNmb3JtYXRpb25FeHRlbnQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9nZXRVbmJvdW5kZWRFeHRlbnQodHJ1ZSk7CiAgICAgICAgfQogICAgICAgIF9nZXREb21haW4oKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl91bnRyYW5zZm9ybWVkRG9tYWluOwogICAgICAgIH0KICAgICAgICBfc2V0RG9tYWluKHZhbHVlcykgewogICAgICAgICAgICB0aGlzLl91bnRyYW5zZm9ybWVkRG9tYWluID0gdmFsdWVzOwogICAgICAgICAgICBjb25zdCBbbWluLCBtYXhdID0gdmFsdWVzOwogICAgICAgICAgICBzdXBlci5fc2V0RG9tYWluKFtNYXRoLm1heChNSU5fUE9TSVRJVkVfVkFMVUUsIG1pbiksIG1heF0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBHaXZlbiBhIGRvbWFpbiwgcGFkIGl0IGFuZCBjbGlwIHRoZSBsb3dlciBib3VuZCB0byBNSU5fUE9TSVRJVkVfVkFMVUUuCiAgICAgICAgICovCiAgICAgICAgX25pY2VEb21haW4oZG9tYWluLCBjb3VudCkgewogICAgICAgICAgICBjb25zdCBbbG93LCBoaWdoXSA9IGRvbWFpbjsKICAgICAgICAgICAgY29uc3QgYWRqdXN0ZWRMb2dMb3cgPSBNYXRoLm1heChsb2ckNChNSU5fUE9TSVRJVkVfVkFMVUUpLCBsb2ckNChsb3cpKTsKICAgICAgICAgICAgY29uc3QgbG9nSGlnaCA9IGxvZyQ0KGhpZ2gpOwogICAgICAgICAgICBjb25zdCBzcHJlYWQgPSBsb2dIaWdoIC0gYWRqdXN0ZWRMb2dMb3c7CiAgICAgICAgICAgIGNvbnN0IHBhZCA9IHNwcmVhZCA/IHNwcmVhZCAqIHRoaXMucGFkUHJvcG9ydGlvbigpIDogMTsKICAgICAgICAgICAgcmV0dXJuIFsKICAgICAgICAgICAgICAgIHBvdyQ0KE1hdGgubWF4KGxvZyQ0KE1JTl9QT1NJVElWRV9WQUxVRSksIGFkanVzdGVkTG9nTG93IC0gcGFkKSksCiAgICAgICAgICAgICAgICBwb3ckNChsb2dIaWdoICsgcGFkKSwKICAgICAgICAgICAgXTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogR2VuZXJhdGVzIGEgcG9zc2libGUgZXh0ZW50IGJhc2VkIG9uIGRhdGEgZnJvbSBhbGwgcGxvdHMgdGhlIHNjYWxlIGlzCiAgICAgICAgICogY29ubmVjdGVkIHRvIGJ5IHRha2luZyB0aGUgbWluaW11bSBhbmQgbWF4aW11bSB2YWx1ZXMgb2YgYWxsIGV4dGVudHMgZm9yCiAgICAgICAgICogbG93ZXIgYW5kIHVwcGVyIGJvdW5kLCByZXNwZWN0aXZlbHkuCiAgICAgICAgICogQG92ZXJyaWRlIHRvIHJlbW92ZSBkZWZhdWx0IHBhZGRpbmcgbG9naWMuCiAgICAgICAgICovCiAgICAgICAgX2dldFVuYm91bmRlZEV4dGVudChpZ25vcmVBdHRhY2hTdGF0ZSkgewogICAgICAgICAgICBjb25zdCBpbmNsdWRlZFZhbHVlcyA9IHRoaXMuX2dldEFsbEluY2x1ZGVkVmFsdWVzKGlnbm9yZUF0dGFjaFN0YXRlKTsKICAgICAgICAgICAgbGV0IGV4dGVudCA9IHRoaXMuX2RlZmF1bHRFeHRlbnQoKTsKICAgICAgICAgICAgaWYgKGluY2x1ZGVkVmFsdWVzLmxlbmd0aCAhPT0gMCkgewogICAgICAgICAgICAgICAgY29uc3QgY29tYmluZWRFeHRlbnQgPSBbCiAgICAgICAgICAgICAgICAgICAgc3JjJDIuVXRpbHMuTWF0aC5taW4oaW5jbHVkZWRWYWx1ZXMsIGV4dGVudFswXSksCiAgICAgICAgICAgICAgICAgICAgc3JjJDIuVXRpbHMuTWF0aC5tYXgoaW5jbHVkZWRWYWx1ZXMsIGV4dGVudFsxXSksCiAgICAgICAgICAgICAgICBdOwogICAgICAgICAgICAgICAgZXh0ZW50ID0gdGhpcy5fbmljZURvbWFpbihjb21iaW5lZEV4dGVudCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIGV4dGVudDsKICAgICAgICB9CiAgICAgICAgX2dldEFsbEluY2x1ZGVkVmFsdWVzKGlnbm9yZUF0dGFjaFN0YXRlID0gZmFsc2UpIHsKICAgICAgICAgICAgY29uc3QgdmFsdWVzID0gc3VwZXIuX2dldEFsbEluY2x1ZGVkVmFsdWVzKCk7CiAgICAgICAgICAgIC8vIEZvciBsb2cgc2NhbGUsIHRoZSB2YWx1ZSBjYW5ub3QgYmUgc21hbGxlciBvciBlcXVhbCB0byAwLiBUaGV5IGFyZQogICAgICAgICAgICAvLyBuZWdhdGl2ZSBpbmZpbml0eS4KICAgICAgICAgICAgcmV0dXJuIHZhbHVlcy5tYXAoKHgpID0+ICh4ID4gMCA/IHggOiBNSU5fUE9TSVRJVkVfVkFMVUUpKTsKICAgICAgICB9CiAgICAgICAgX2RlZmF1bHRFeHRlbnQoKSB7CiAgICAgICAgICAgIHJldHVybiBbMSwgMTBdOwogICAgICAgIH0KICAgICAgICBfYmFja2luZ1NjYWxlRG9tYWluKHZhbHVlcykgewogICAgICAgICAgICBpZiAodmFsdWVzID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9kM0xvZ1NjYWxlLmRvbWFpbigpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fZDNMb2dTY2FsZS5kb21haW4odmFsdWVzKTsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIF9nZXRSYW5nZSgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2QzTG9nU2NhbGUucmFuZ2UoKTsKICAgICAgICB9CiAgICAgICAgX3NldFJhbmdlKHZhbHVlcykgewogICAgICAgICAgICB0aGlzLl9kM0xvZ1NjYWxlLnJhbmdlKHZhbHVlcyk7CiAgICAgICAgfQogICAgICAgIGRlZmF1bHRUaWNrcygpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2QzTG9nU2NhbGUudGlja3MoMSk7CiAgICAgICAgfQogICAgICAgIHRpY2tzKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fZDNMb2dTY2FsZS50aWNrcygpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZXR1cm5zIGFuIGBleHRlbnRgIGZvciBhIGRhdGEgc2VyaWVzLiBJbiBsb2ctc2NhbGUsIHdlIG11c3Qgb21pdCBhbGwKICAgICAgICAgKiBub24tcG9zaXRpdmUgdmFsdWVzIHdoZW4gY29tcHV0aW5nIGEgYGRvbWFpbmAuCiAgICAgICAgICogQG92ZXJyaWRlCiAgICAgICAgICovCiAgICAgICAgZXh0ZW50T2ZWYWx1ZXModmFsdWVzKSB7CiAgICAgICAgICAgIC8vIExvZyBjYW4gb25seSB0YWtlIHBvc2l0aXZlIHZhbHVlcy4KICAgICAgICAgICAgY29uc3QgbGVnYWxWYWx1ZXMgPSB2YWx1ZXMuZmlsdGVyKCh4KSA9PiBzcmMkMi5VdGlscy5NYXRoLmlzVmFsaWROdW1iZXIoeCkgJiYgeCA+IDApOwogICAgICAgICAgICBsZXQgZmlsdGVyZWRWYWx1ZXMgPSBsZWdhbFZhbHVlczsKICAgICAgICAgICAgaWYgKHRoaXMuaWdub3JlT3V0bGllcigpKSB7CiAgICAgICAgICAgICAgICBjb25zdCBsb2dWYWx1ZXMgPSBsZWdhbFZhbHVlcy5tYXAobG9nJDQpOwogICAgICAgICAgICAgICAgY29uc3Qgc29ydGVkTG9nVmFsdWVzID0gbG9nVmFsdWVzLnNvcnQoKGEsIGIpID0+IGEgLSBiKTsKICAgICAgICAgICAgICAgIGNvbnN0IGEgPSB0aHJlc2hvbGQoc29ydGVkTG9nVmFsdWVzLCAwLjA1KTsKICAgICAgICAgICAgICAgIGNvbnN0IGIgPSB0aHJlc2hvbGQoc29ydGVkTG9nVmFsdWVzLCAwLjk1KTsKICAgICAgICAgICAgICAgIGZpbHRlcmVkVmFsdWVzID0gc29ydGVkTG9nVmFsdWVzLmZpbHRlcigoeCkgPT4geCA+PSBhICYmIHggPD0gYikubWFwKHBvdyQ0KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBjb25zdCBleHRlbnQkMSA9IGV4dGVudChmaWx0ZXJlZFZhbHVlcyk7CiAgICAgICAgICAgIHJldHVybiBleHRlbnQkMVswXSA9PSBudWxsIHx8IGV4dGVudCQxWzFdID09IG51bGwgPyBbXSA6IGV4dGVudCQxOwogICAgICAgIH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sZSk7CiAgICAgICAgICAgIHRoaXMuX2RyYWdJbnRlcmFjdGlvbiA9IG5ldyBzcmMkMi5JbnRlcmFjdGlvbnMuRHJhZygpOwogICAgICAgICAgICB0aGlzLl9kb3VibGVDbGlja0ludGVyYWN0aW9uID0gbmV3IHNyYyQyLkludGVyYWN0aW9ucy5DbGljaygpOwogICAgICAgICAgICB0aGlzLnNldHVwQ2FsbGJhY2tzKCk7CiAgICAgICAgICAgIHRoaXMudW56b29tTWV0aG9kID0gdW56b29tTWV0aG9kOwogICAgICAgICAgICAvLyBBY3RpdmF0ZSBpbnRlcmFjdGlvbiBvbmx5IHdoZW4gdGhlIGNvbXBvbmVudCBpcyBtb3VudGVkIG9udG8gRE9NLgogICAgICAgICAgICB0aGlzLm9uRGV0YWNoKCgpID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuX2RvdWJsZUNsaWNrSW50ZXJhY3Rpb24uZGV0YWNoRnJvbSh0aGlzKTsKICAgICAgICAgICAgICAgIHRoaXMuX2RyYWdJbnRlcmFjdGlvbi5kZXRhY2hGcm9tKHRoaXMpOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdGhpcy5vbkFuY2hvcigoKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLl9kb3VibGVDbGlja0ludGVyYWN0aW9uLmF0dGFjaFRvKHRoaXMpOwogICAgICAgICAgICAgICAgdGhpcy5fZHJhZ0ludGVyYWN0aW9uLmF0dGFjaFRvKHRoaXMpOwogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmVnaXN0ZXIgYSBtZXRob2QgdGhhdCBjYWxscyB3aGVuIHRoZSBEcmFnWm9vbSBpbnRlcmFjdGlvbiBzdGFydHMuCiAgICAgICAgICovCiAgICAgICAgaW50ZXJhY3Rpb25TdGFydChjYikgewogICAgICAgICAgICB0aGlzLm9uU3RhcnQgPSBjYjsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmVnaXN0ZXIgYSBtZXRob2QgdGhhdCBjYWxscyB3aGVuIHRoZSBEcmFnWm9vbSBpbnRlcmFjdGlvbiBlbmRzLgogICAgICAgICAqLwogICAgICAgIGludGVyYWN0aW9uRW5kKGNiKSB7CiAgICAgICAgICAgIHRoaXMub25FbmQgPSBjYjsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0dXJucyBiYWNraW5nIGRyYWcgaW50ZXJhY3Rpb24uIFVzZWZ1bCBmb3IgY3VzdG9taXphdGlvbiB0byB0aGUKICAgICAgICAgKiBpbnRlcmFjdGlvbi4KICAgICAgICAgKi8KICAgICAgICBkcmFnSW50ZXJhY3Rpb24oKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9kcmFnSW50ZXJhY3Rpb247CiAgICAgICAgfQogICAgICAgIHNldHVwQ2FsbGJhY2tzKCkgewogICAgICAgICAgICBsZXQgZHJhZ2dpbmcgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5fZHJhZ0ludGVyYWN0aW9uLm9uRHJhZ1N0YXJ0KChzdGFydFBvaW50KSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLmJvdW5kcyh7CiAgICAgICAgICAgICAgICAgICAgdG9wTGVmdDogc3RhcnRQb2ludCwKICAgICAgICAgICAgICAgICAgICBib3R0b21SaWdodDogc3RhcnRQb2ludCwKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgdGhpcy5vblN0YXJ0KCk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICB0aGlzLl9kcmFnSW50ZXJhY3Rpb24ub25EcmFnKChzdGFydFBvaW50LCBlbmRQb2ludCkgPT4gewogICAgICAgICAgICAgICAgdGhpcy5ib3VuZHMoeyB0b3BMZWZ0OiBzdGFydFBvaW50LCBib3R0b21SaWdodDogZW5kUG9pbnQgfSk7CiAgICAgICAgICAgICAgICB0aGlzLmJveFZpc2libGUodHJ1ZSk7CiAgICAgICAgICAgICAgICBkcmFnZ2luZyA9IHRydWU7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICB0aGlzLl9kcmFnSW50ZXJhY3Rpb24ub25EcmFnRW5kKChzdGFydFBvaW50LCBlbmRQb2ludCkgPT4gewogICAgICAgICAgICAgICAgdGhpcy5ib3hWaXNpYmxlKGZhbHNlKTsKICAgICAgICAgICAgICAgIHRoaXMuYm91bmRzKHsgdG9wTGVmdDogc3RhcnRQb2ludCwgYm90dG9tUmlnaHQ6IGVuZFBvaW50IH0pOwogICAgICAgICAgICAgICAgaWYgKGRyYWdnaW5nKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy56b29tKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLm9uRW5kKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBkcmFnZ2luZyA9IGZhbHNlOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdGhpcy5fZG91YmxlQ2xpY2tJbnRlcmFjdGlvbi5vbkRvdWJsZUNsaWNrKHRoaXMudW56b29tLmJpbmQodGhpcykpOwogICAgICAgIH0KICAgICAgICBhbmltYXRpb25UaW1lKGFuaW1hdGlvblRpbWUpIHsKICAgICAgICAgICAgaWYgKGFuaW1hdGlvblRpbWUgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2FuaW1hdGlvblRpbWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGFuaW1hdGlvblRpbWUgPCAwKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ2FuaW1hdGlvblRpbWUgY2Fubm90IGJlIG5lZ2F0aXZlJyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fYW5pbWF0aW9uVGltZSA9IGFuaW1hdGlvblRpbWU7CiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZXQgdGhlIGVhc2luZyBmdW5jdGlvbiwgd2hpY2ggZGV0ZXJtaW5lcyBob3cgdGhlIHpvb20gaW50ZXJwb2xhdGVzCiAgICAgICAgICogb3ZlciB0aW1lLgogICAgICAgICAqLwogICAgICAgIGVhc2UoZm4pIHsKICAgICAgICAgICAgaWYgKHR5cGVvZiBmbiAhPT0gJ2Z1bmN0aW9uJykgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdlYXNlIGZ1bmN0aW9uIG11c3QgYmUgYSBmdW5jdGlvbicpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChmbigwKSAhPT0gMCB8fCBmbigxKSAhPT0gMSkgewogICAgICAgICAgICAgICAgc3JjJDIuVXRpbHMuV2luZG93Lndhcm4oJ0Vhc2luZyBmdW5jdGlvbiBkb2VzIG5vdCBtYWludGFpbiBpbnZhcmlhbnQgJyArCiAgICAgICAgICAgICAgICAgICAgJ2YoMCk9PTAgJiYgZigxKT09MS4gQmFkIGJlaGF2aW9yIG1heSByZXN1bHQuJyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5lYXNlRm4gPSBmbjsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfQogICAgICAgIC8vIFpvb20gaW50byBleHRlbnQgb2YgdGhlIHNlbGVjdGlvbiBib3ggYm91bmRzCiAgICAgICAgem9vbSgpIHsKICAgICAgICAgICAgbGV0IHgwID0gdGhpcy54RXh0ZW50KClbMF0udmFsdWVPZigpOwogICAgICAgICAgICBsZXQgeDEgPSB0aGlzLnhFeHRlbnQoKVsxXS52YWx1ZU9mKCk7CiAgICAgICAgICAgIGxldCB5MCA9IHRoaXMueUV4dGVudCgpWzFdLnZhbHVlT2YoKTsKICAgICAgICAgICAgbGV0IHkxID0gdGhpcy55RXh0ZW50KClbMF0udmFsdWVPZigpOwogICAgICAgICAgICBpZiAoeDAgPT09IHgxIHx8IHkwID09PSB5MSkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuaW50ZXJwb2xhdGVab29tKHgwLCB4MSwgeTAsIHkxKTsKICAgICAgICB9CiAgICAgICAgLy8gUmVzdG9yZSB0aGUgc2NhbGVzIHRvIHRoZWlyIHN0YXRlIGJlZm9yZSBhbnkgem9vbQogICAgICAgIHVuem9vbSgpIHsKICAgICAgICAgICAgLy8gV2UgbmVlZCB0byByZXNldCB0aGUgem9vbSBkb21haW4gdW5jb25kaXRpb25hbGx5LCBhcyB0aGUgZGF0YSBvciB0aGUKICAgICAgICAgICAgLy8gc21vb3RoaW5nIG1heSBoYXZlIHVwZGF0ZWQsIHN1Y2ggdGhhdCB3ZSBhcmUgbm90IGxvbmdlciBmdWxseSB6b29tZWQgb3V0LgogICAgICAgICAgICBsZXQgeFNjYWxlID0gdGhpcy54U2NhbGUoKTsKICAgICAgICAgICAgeFNjYWxlLl9kb21haW5NaW4gPSBudWxsOwogICAgICAgICAgICB4U2NhbGUuX2RvbWFpbk1heCA9IG51bGw7CiAgICAgICAgICAgIGxldCB4RG9tYWluID0geFNjYWxlLl9nZXRFeHRlbnQoKTsKICAgICAgICAgICAgdGhpcy54U2NhbGUoKS5kb21haW4oeERvbWFpbik7CiAgICAgICAgICAgIHRoaXMudW56b29tTWV0aG9kKCk7CiAgICAgICAgfQogICAgICAgIC8vIElmIHdlIGFyZSB6b29taW5nLCBkaXNhYmxlIGludGVyYWN0aW9ucywgdG8gYXZvaWQgY29udGVudGlvbgogICAgICAgIGlzWm9vbWluZyhpc1pvb21pbmcpIHsKICAgICAgICAgICAgdGhpcy5fZHJhZ0ludGVyYWN0aW9uLmVuYWJsZWQoIWlzWm9vbWluZyk7CiAgICAgICAgICAgIHRoaXMuX2RvdWJsZUNsaWNrSW50ZXJhY3Rpb24uZW5hYmxlZCghaXNab29taW5nKTsKICAgICAgICB9CiAgICAgICAgaW50ZXJwb2xhdGVab29tKHgwZiwgeDFmLCB5MGYsIHkxZikgewogICAgICAgICAgICBsZXQgeDBzID0gdGhpcy54U2NhbGUoKS5kb21haW4oKVswXS52YWx1ZU9mKCk7CiAgICAgICAgICAgIGxldCB4MXMgPSB0aGlzLnhTY2FsZSgpLmRvbWFpbigpWzFdLnZhbHVlT2YoKTsKICAgICAgICAgICAgbGV0IHkwcyA9IHRoaXMueVNjYWxlKCkuZG9tYWluKClbMF0udmFsdWVPZigpOwogICAgICAgICAgICBsZXQgeTFzID0gdGhpcy55U2NhbGUoKS5kb21haW4oKVsxXS52YWx1ZU9mKCk7CiAgICAgICAgICAgIC8vIENvcHkgYSByZWYgdG8gdGhlIGVhc2UgZm4sIHNvIHRoYXQgY2hhbmdpbmcgZWFzZSB3b250IGFmZmVjdCB6b29tcyBpbgogICAgICAgICAgICAvLyBwcm9ncmVzcy4KICAgICAgICAgICAgbGV0IGVhc2UgPSB0aGlzLmVhc2VGbjsKICAgICAgICAgICAgbGV0IGludGVycG9sYXRvciA9IChhLCBiLCBwKSA9PiBpbnRlcnBvbGF0ZU51bWJlcihhLCBiKShlYXNlKHApKTsKICAgICAgICAgICAgdGhpcy5pc1pvb21pbmcodHJ1ZSk7CiAgICAgICAgICAgIGxldCBzdGFydCA9IERhdGUubm93KCk7CiAgICAgICAgICAgIGxldCBkcmF3ID0gKCkgPT4gewogICAgICAgICAgICAgICAgbGV0IG5vdyA9IERhdGUubm93KCk7CiAgICAgICAgICAgICAgICBsZXQgcGFzc2VkID0gbm93IC0gc3RhcnQ7CiAgICAgICAgICAgICAgICBsZXQgcCA9IHRoaXMuX2FuaW1hdGlvblRpbWUgPT09IDAKICAgICAgICAgICAgICAgICAgICA/IDEKICAgICAgICAgICAgICAgICAgICA6IE1hdGgubWluKDEsIHBhc3NlZCAvIHRoaXMuX2FuaW1hdGlvblRpbWUpOwogICAgICAgICAgICAgICAgbGV0IHgwID0gaW50ZXJwb2xhdG9yKHgwcywgeDBmLCBwKTsKICAgICAgICAgICAgICAgIGxldCB4MSA9IGludGVycG9sYXRvcih4MXMsIHgxZiwgcCk7CiAgICAgICAgICAgICAgICBsZXQgeTAgPSBpbnRlcnBvbGF0b3IoeTBzLCB5MGYsIHApOwogICAgICAgICAgICAgICAgbGV0IHkxID0gaW50ZXJwb2xhdG9yKHkxcywgeTFmLCBwKTsKICAgICAgICAgICAgICAgIHRoaXMueFNjYWxlKCkuZG9tYWluKFt4MCwgeDFdKTsKICAgICAgICAgICAgICAgIHRoaXMueVNjYWxlKCkuZG9tYWluKFt5MCwgeTFdKTsKICAgICAgICAgICAgICAgIGlmIChwIDwgMSkgewogICAgICAgICAgICAgICAgICAgIHNyYyQyLlV0aWxzLkRPTS5yZXF1ZXN0QW5pbWF0aW9uRnJhbWVQb2x5ZmlsbChkcmF3KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIHRoaXMub25FbmQoKTsKICAgICAgICAgICAgICAgICAgICB0aGlzLmlzWm9vbWluZyhmYWxzZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIGRyYXcoKTsKICAgICAgICB9CiAgICB9CgogICAgLyogQ29weXJpZ2h0IDIwMTggVGhlIFRlbnNvckZsb3cgQXV0aG9ycy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4KCiAgICBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsKICAgIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4KICAgIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdAoKICAgICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjAKCiAgICBVbmxlc3MgcmVxdWlyZWQgYnkgYXBwbGljYWJsZSBsYXcgb3IgYWdyZWVk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XIgPSBuZXcgRHJhZ1pvb21MYXllcih4U2NhbGUsIHlTY2FsZSwgdW56b29tTWV0aG9kKTsKICAgICAgICAgICAgdGhpcy5kcmFnWm9vbUxheWVyLmRyYWdJbnRlcmFjdGlvbigpLm1vdXNlRmlsdGVyKChldmVudCkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuICFQYW5ab29tRHJhZ0xheWVyLmlzUGFuS2V5KGV2ZW50KSAmJiBldmVudC5idXR0b24gPT09IDA7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICB0aGlzLmFwcGVuZCh0aGlzLmRyYWdab29tTGF5ZXIpOwogICAgICAgICAgICBjb25zdCBvbldoZWVsID0gdGhpcy5vbldoZWVsLmJpbmQodGhpcyk7CiAgICAgICAgICAgIHRoaXMub25BbmNob3IoKCkgPT4gewogICAgICAgICAgICAgICAgdGhpcy5fbW91c2VEaXNwYXRjaGVyID0gc3JjJDIuRGlzcGF0Y2hlcnMuTW91c2UuZ2V0RGlzcGF0Y2hlcih0aGlzKTsKICAgICAgICAgICAgICAgIHRoaXMuX21vdXNlRGlzcGF0Y2hlci5vbldoZWVsKG9uV2hlZWwpOwogICAgICAgICAgICAgICAgdGhpcy5wYW5ab29tLmF0dGFjaFRvKHRoaXMpOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdGhpcy5vbkRldGFjaCgoKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLnBhblpvb20uZGV0YWNoRnJvbSh0aGlzKTsKICAgICAgICAgICAgICAgIC8vIG9uRGV0YWNoIGNhbiBiZSBpbnZva2VkIGJlZm9yZSBvbkFuY2hvcgogICAgICAgICAgICAgICAgaWYgKHRoaXMuX21vdXNlRGlzcGF0Y2hlcikgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX21vdXNlRGlzcGF0Y2hlci5vZmZXaGVlbChvbldoZWVsKTsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9tb3VzZURpc3BhdGNoZXIgPSBudWxsOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdGhpcy5wYW5ab29tLmRyYWdJbnRlcmFjdGlvbigpLm9uRHJhZ1N0YXJ0KCgpID0+IHsKICAgICAgICAgICAgICAgIGlmICh0aGlzLnN0YXRlID09IFN0YXRlLk5PTkUpCiAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXRTdGF0ZShTdGF0ZS5QQU5OSU5HKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHRoaXMucGFuWm9vbS5kcmFnSW50ZXJhY3Rpb24oKS5vbkRyYWdFbmQoKCkgPT4gewogICAgICAgICAgICAgICAgaWYgKHRoaXMuc3RhdGUgPT0gU3RhdGUuUEFOTklORykKICAgICAgICAgICAgICAgICAgICB0aGlzLnNldFN0YXRlKFN0YXRlLk5PTkUpOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdGhpcy5kcmFnWm9vbUxheWVyLmRyYWdJbnRlcmFjdGlvbigpLm9uRHJhZ1N0YXJ0KCgpID0+IHsKICAgICAgICAgICAgICAgIGlmICh0aGlzLnN0YXRlID09IFN0YXRlLk5PTkUpCiAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXRTdGF0ZShTdGF0ZS5EUkFHX1pPT01JTkcpOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdGhpcy5kcmFnWm9vbUxheWVyLmRyYWdJbnRlcmFjdGlvbigpLm9uRHJhZ0VuZCgoKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5zdGF0ZSA9PSBTdGF0ZS5EUkFHX1pPT01JTkcpCiAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXRTdGF0ZShTdGF0ZS5OT05FKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIG9uV2hlZWwoXywgZXZlbnQpIHsKICAgICAgICAgICAgaWYgKHRoaXMuY2FuU2Nyb2xsWm9vbShldmVudCkpCiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIGN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gICAgICB0aGlzLnJvb3QoKS5hZGRDbGFzcyh0aGlzLnN0YXRlQ2xhc3NOYW1lKG5leHRTdGF0ZSkpOwogICAgICAgICAgICBpZiAocHJldlN0YXRlID09IFN0YXRlLlBBTk5JTkcpIHsKICAgICAgICAgICAgICAgIHRoaXMucGFuRW5kQ2FsbGJhY2suY2FsbENhbGxiYWNrcygpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChuZXh0U3RhdGUgPT0gU3RhdGUuUEFOTklORykgewogICAgICAgICAgICAgICAgdGhpcy5wYW5TdGFydENhbGxiYWNrLmNhbGxDYWxsYmFja3MoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBzdGF0ZUNsYXNzTmFtZShzdGF0ZSkgewogICAgICAgICAgICBzd2l0Y2ggKHN0YXRlKSB7CiAgICAgICAgICAgICAgICBjYXNlIFN0YXRlLlBBTk5JTkc6CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdwYW5uaW5nJzsKICAgICAgICAgICAgICAgIGNhc2UgU3RhdGUuRFJBR19aT09NSU5HOgogICAgICAgICAgICAgICAgICAgIHJldHVybiAnZHJhZy16b29taW5nJzsKICAgICAgICAgICAgICAgIGNhc2UgU3RhdGUuTk9ORToKICAgICAgICAgICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICcnOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIG9uUGFuU3RhcnQoY2IpIHsKICAgICAgICAgICAgdGhpcy5wYW5TdGFydENhbGxiYWNrLmFkZChjYik7CiAgICAgICAgfQogICAgICAgIG9uUGFuRW5kKGNiKSB7CiAgICAgICAgICAgIHRoaXMucGFuRW5kQ2FsbGJhY2suYWRkKGNiKTsKICAgICAgICB9CiAgICAgICAgb25TY3JvbGxab29tKGNiKSB7CiAgICAgICAgICAgIHRoaXMucGFuWm9vbS5vblpvb21FbmQoY2IpOwogICAgICAgIH0KICAgICAgICBvbkRyYWdab29tU3Rhcn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lKTsKICAgICAgICAgICAgdGhpcy55U2NhbGUuc2V0VmFsdWVQcm92aWRlckZvckRvbWFpbigoKSA9PiB0aGlzLmdldFZhbHVlc0ZvcllBeGlzRG9tYWluQ29tcHV0ZSgpKTsKICAgICAgICAgICAgdGhpcy55QXhpcyA9IG5ldyBzcmMkMi5BeGVzLk51bWVyaWModGhpcy55U2NhbGUsICdsZWZ0Jyk7CiAgICAgICAgICAgIGxldCB5Rm9ybWF0dGVyID0gbXVsdGlzY2FsZUZvcm1hdHRlcihZX0FYSVNfRk9STUFUVEVSX1BSRUNJU0lPTik7CiAgICAgICAgICAgIHRoaXMueUF4aXMubWFyZ2luKDApCiAgICAgICAgICAgICAgICAudGlja0xhYmVsUGFkZGluZyg1KQogICAgICAgICAgICAgICAgLmZvcm1hdHRlcih5Rm9ybWF0dGVyKTsKICAgICAgICAgICAgdGhpcy55QXhpcy51c2VzVGV4dFdpZHRoQXBwcm94aW1hdGlvbih0cnVlKTsKICAgICAgICAgICAgdGhpcy5maWxsQXJlYSA9IGZpbGxBcmVhOwogICAgICAgICAgICBjb25zdCBwYW5ab29tTGF5ZXIgPSBuZXcgUGFuWm9vbURyYWdMYXllcih0aGlzLnhTY2FsZSwgdGhpcy55U2NhbGUsICgpID0+IHRoaXMucmVzZXREb21haW4oKSk7CiAgICAgICAgICAgIHRoaXMudG9vbHRpcEludGVyYWN0aW9uID0gdGhpcy5jcmVhdGVUb29sdGlwSW50ZXJhY3Rpb24ocGFuWm9vbUxheWVyKTsKICAgICAgICAgICAgdGhpcy50b29sdGlwUG9pbnRzQ29tcG9uZW50ID0gbmV3IHNyYyQyLkNvbXBvbmVudCgpOwogICAgICAgICAgICBjb25zdCBwbG90ID0gdGhpcy5idWlsZFBsb3QodGhpcy54U2NhbGUsIHRoaXMueVNjYWxlLCBmaWxsQXJlYSk7CiAgICAgICAgICAgIHRoaXMuZ3JpZGxpbmVzID0gbmV3IHNyYyQyLkNvbXBvbmVudHMuR3JpZGxpbmVzKHRoaXMueFNjYWxlLCB0aGlzLnlTY2FsZSk7CiAgICAgICAgICAgIGxldCB4WmVyb0xpbmUgPSBudWxsOwogICAgICAgICAgICBpZiAoeVNjYWxlVHlwZSAhPT0gWVNjYWxlVHlwZS5MT0cpIHsKICAgICAgICAgICAgICAgIHhaZXJvTGluZSA9IG5ldyBzcmMkMi5Db21wb25lbnRzLkd1aWRlTGluZUxheWVyKCdob3Jpem9udGFsJyk7CiAgICAgICAgICAgICAgICB4WmVyb0xpbmUuc2NhbGUodGhpcy55U2NhbGUpLnZhbHVlKDApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGxldCB5WmVyb0xpbmUgPSBuZXcgc3JjJDIuQ29tcG9uZW50cy5HdWlkZUxpbmVMYXllcigndmVydGljYWwnKTsKICAgICAgICAgICAgeVplcm9MaW5lLnNjYWxlKHRoaXMueFNjYWxlKS52YWx1ZSgwKTsKICAgICAgICAgICAgdGhpcy5jZW50ZXIgPSBuZXcgc3JjJDIuQ29tcG9uZW50cy5Hcm91cChbCiAgICAgICAgICAgICAgICB0aGlzLmdyaWRsaW5lcywKICAgICAgICAgICAgICAgIHhaZXJvTGluZSwKICAgICAgICAgICAgICAgIHlaZXJvTGluZSwKICAgICAgICAgICAgICAgIHBsb3QsCiAgICAgICAgICAgICAgICB0aGlzLnRvb2x0aXBQb2ludHNDb21wb25lbnQsCiAgICAgICAgICAgICAgICBwYW5ab29tTGF5ZXIsCiAgICAgICAgICAgIF0pOwogICAgICAgICAgICB0aGlzLmNlbnRlci5hZGRDbGFzcygnbWFpbicpOwogICAgICAgICAgICB0aGlzLm91dGVyID0gbmV3IHNyYyQyLkNvbXBvbmVudHMuVGFibGUoWwogICAgICAgICAgICAgICAgW3RoaXMueUF4aXMsIHRoaXMuY2VudGVyXSwKICAgICAgICAgICAgICAgIFtudWxsLCB0aGlzLnhBeGlzXSwKICAgICAgICAgICAgXSk7CiAgICAgICAgfQogICAgICAgIGJ1aWxkUGxvdCh4U2NhbGUsIHlTY2FsZ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W5EaXNwbGF5LCBzY2F0dGVyUGxvdCwgc21vb3RoTGluZVBsb3QsIGxpbmVQbG90XTsKICAgICAgICAgICAgaWYgKHRoaXMubWFyZ2luQXJlYVBsb3QpIHsKICAgICAgICAgICAgICAgIGdyb3Vwcy5wdXNoKHRoaXMubWFyZ2luQXJlYVBsb3QpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0aGlzLm1hcmtlcnNTY2F0dGVyUGxvdCkgewogICAgICAgICAgICAgICAgZ3JvdXBzLnB1c2godGhpcy5tYXJrZXJzU2NhdHRlclBsb3QpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBuZXcgc3JjJDIuQ29tcG9uZW50cy5Hcm91cChncm91cHMpOwogICAgICAgIH0KICAgICAgICBpZ25vcmVZT3V0bGllcnMoaWdub3JlWU91dGxpZXJzKSB7CiAgICAgICAgICAgIGlmIChpZ25vcmVZT3V0bGllcnMgIT09IHRoaXMuX2lnbm9yZVlPdXRsaWVycykgewogICAgICAgICAgICAgICAgdGhpcy5faWdub3JlWU91dGxpZXJzID0gaWdub3JlWU91dGxpZXJzOwogICAgICAgICAgICAgICAgdGhpcy51cGRhdGVTcGVjaWFsRGF0YXNldHMoKTsKICAgICAgICAgICAgICAgIHRoaXMueVNjYWxlLmlnbm9yZU91dGxpZXIoaWdub3JlWU91dGxpZXJzKTsKICAgICAgICAgICAgICAgIHRoaXMucmVzZXRZRG9tYWluKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgZ2V0VmFsdWVzRm9yWUF4aXNEb21haW5Db21wdXRlKCkgewogICAgICAgICAgICBjb25zdCBhY2Nlc3NvcnMgPSB0aGlzLmdldEFjY2Vzc29yc0ZvckNvbXB1dGluZ1lSYW5nZSgpOwogICAgICAgICAgICBsZXQgZGF0YXNldFRvVmFsdWVzID0gKGQpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiBhY2Nlc3NvcnMubWFwKChhY2Nlc3NvcikgPT4gZC5kY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b3IoeCwgLTEsIGQpKSk7CiAgICAgICAgICAgICAgICBpZiAobm9uTmFuRGF0YS5sZW5ndGggPiAwKSB7CiAgICAgICAgICAgICAgICAgICAgbGV0IGlkeCA9IG5vbk5hbkRhdGEubGVuZ3RoIC0gMTsKICAgICAgICAgICAgICAgICAgICBkYXR1bSA9IG5vbk5hbkRhdGFbaWR4XTsKICAgICAgICAgICAgICAgICAgICBkYXR1bS5uYW1lID0gZC5tZXRhZGF0YSgpLm5hbWU7CiAgICAgICAgICAgICAgICAgICAgZGF0dW0ucmVsYXRpdmUgPSByZWxhdGl2ZUFjY2Vzc29yKGRhdHVtLCAtMSwgZCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gZGF0dW07CiAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAuZmlsdGVyKCh4KSA9PiB4ICE9IG51bGwpOwogICAgICAgICAgICB0aGlzLmxhc3RQb2ludHNEYXRhc2V0LmRhdGEobGFzdFBvaW50c0RhdGEpOwogICAgICAgICAgICBpZiAodGhpcy5tYXJrZXJzU2NhdHRlclBsb3QpIHsKICAgICAgICAgICAgICAgIHRoaXMubWFya2Vyc1NjYXR0ZXJQbG90LmRhdGFzZXRzKHRoaXMuZGF0YXNldHMubWFwKHRoaXMuY3JlYXRlU2FtcGxlZERhdGFzZXRGb3JNYXJrZXJzKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gVGFrZSBhIGRhdGFzZXQsIHJldHVybiBhbiBhcnJheSBvZiBOYU4gZGF0YSBwb2ludHMKICAgICAgICAgICAgLy8gdGhlIE5hTiBwb2ludHMgd2lsbCBoYXZlIGEgImRpc3BsYXlZIiBwcm9wZXJ0eSB3aGljaCBpcyB0aGUKICAgICAgICAgICAgLy8geS12YWx1ZSBvZiBhIG5lYXJieSBwb2ludCB0aGF0IHdhcyBub3QgTmFOICgwIGlmIGFsbCBwb2ludHMgYXJlIE5hTikKICAgICAgICAgICAgbGV0IGRhdGFzZXRUb05hTkRhdGEgPSAoZCkgPT4gewogICAgICAgICAgICAgICAgbGV0IGRpc3BsYXlZID0gbnVsbDsKICAgICAgICAgICAgICAgIGxldCBkYXRhID0gZC5kYXRhKCk7CiAgICAgICAgICAgICAgICBsZXQgaSA9IDA7CiAgICAgICAgICAgICAgICB3aGlsZSAoaSA8IGRhdGEubGVuZ3RoICYmIGRpc3BsYXlZID09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICBpZiAoIWlzTmFOKGFjY2Vzc29yKGRhdGFbaV0sIC0xLCBkKSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheVkgPSBhY2Nlc3NvcihkYXRhW2ldLCAtMSwgZCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGkrKzsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChkaXNwbGF5WSA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgZGlzcGxheVkgPSAwOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgbGV0IG5hbkRhdGEgPSBbXTsKICAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBkYXRhLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKCFpc05hTihhY2Nlc3NvcihkYXRhW2ldLCAtMSwgZCkpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXlZID0gYWNjZXNzb3IoZGF0YVtpXSwgLTEsIGQpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgZGF0YVtpXS5uYW1lID0gZC5tZXRhZGF0YSgpLm5hbWU7CiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFbaV0uZGlzcGxheVkgPSBkaXNwbGF5WTsKICAgICAgICAgICAgICAgICAgICAgICAgZGF0YVtpXS5yZWxhdGl2ZSA9IHJlbGF0aXZlQWNjZXNzb3IoZGF0YVtpXSwgLTEsIGQpOwogICAgICAgICAgICAgICAgICAgICAgICBuYW5EYXRhLnB1c2goZGF0YVtpXSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIG5hbkRhdGE7CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIGxldCBuYW5EYXRhID0gbG9kYXNoLmZsYXR0ZW4odGhpcy5kYXRhc2V0cy5tYXAoZGF0YXNldFRvTmFORGF0YSkpOwogICAgICAgICAgICB0aGlzLm5hbkRhdGFzZXQuZGF0YShuYW5EYXRhKTsKICAgICAgICB9CiAgICAgICAgcmVzZXREb21haW4oKSB7CiAgICAgICAgICAgIHRoaXMucmVzZXRYRG9tYWluKCk7CiAgICAgICAgICAgIHRoaXMucmVzZXRZRG9tYWluKCk7CiAgICAgICAgfQogICAgICAgIHJlc2V0WERvbWFpbigpIHsKICAgICAgICAgICAgbGV0IHhEb21haW47CiAgICAgICAgICAgIGlmICh0aGlzLl9kZWZhdWx0WFJhbmdlICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIC8vIFVzZSB0aGUgcmFuZ2Ugc3BlY2lmaWVkIGJ5IHRoZSBjYWxsZXIuCiAgICAgICAgICAgICAgICB4RG9tYWluID0gdGhpcy5fZGVmYXVsdFhSYW5nZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIC8vIChDb3BpZWQgZnJvbSB2el9saW5lX2NoYXJ0LkRyYWdab29tTGF5ZXIudW56b29tLikKICAgICAgICAgICAgICAgIGNvbnN0IHhTY2FsZSA9IHRoaXMueFNjYWxlOwogICAgICAgICAgICAgICAgeFNjYWxlLl9kb21haW5NaW4gPSBudWxsOwogICAgICAgICAgICAgICAgeFNjYWxlLl9kb21haW5NYXggPSBudWxsOwogICAgICAgICAgICAgICAgeERvbWFpbiA9IHhTY2FsZS5fZ2V0RXh0ZW50KCk7CiAgIC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aGlzLnlTY2FsZS5kb21haW4odGhpcy55U2NhbGUuZG9tYWluKCkpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGdldEFjY2Vzc29yc0ZvckNvbXB1dGluZ1lSYW5nZSgpIHsKICAgICAgICAgICAgY29uc3QgYWNjZXNzb3JzID0gW3RoaXMuZ2V0WUF4aXNBY2Nlc3NvcigpXTsKICAgICAgICAgICAgaWYgKHRoaXMuZmlsbEFyZWEpIHsKICAgICAgICAgICAgICAgIC8vIE1ha2UgdGhlIFkgZG9tYWluIHRha2UgbWFyZ2lucyBpbnRvIGFjY291bnQuCiAgICAgICAgICAgICAgICBhY2Nlc3NvcnMucHVzaCh0aGlzLmZpbGxBcmVhLmxvd2VyQWNjZXNzb3IsIHRoaXMuZmlsbEFyZWEuaGlnaGVyQWNjZXNzb3IpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBhY2Nlc3NvcnM7CiAgICAgICAgfQogICAgICAgIGdldFlBeGlzQWNjZXNzb3IoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLnNtb290aGluZ0VuYWJsZWQgPyB0aGlzLnNtb290aGVkQWNjZXNzb3IgOiB0aGlzLnlWYWx1ZUFjY2Vzc29yOwogICAgICAgIH0KICAgICAgICBjcmVhdGVUb29sdGlwSW50ZXJhY3Rpb24ocHpkbCkgewogICAgICAgICAgICBjb25zdCBwaSA9IG5ldyBQb2ludGVySW50ZXJhY3Rpb24oKTsKICAgICAgICAgICAgLy8gRGlzYWJsZSBpbnRlcmFjdGlvbiB3aGlsZSBkcmFnIHpvb21pbmcuCiAgICAgICAgICAgIGNvbnN0IGRpc2FibGVUb29sdGlwVXBkYXRlID0gKCkgPT4gewogICAgICAgICAgICAgICAgcGkuZW5hYmxlZChmYWxzZSk7CiAgICAgICAgICAgICAgICB0aGlzLmhpZGVUb29sdGlwcygpOwogICAgICAgICAgICB9OwogICAgICAgICAgICBjb25zdCBlbmFibGVUb29sdGlwVXBkYXRlID0gKCkgPT4gcGkuZW5hYmxlZCh0cnVlKTsKICAgICAgICAgICAgcHpkbC5vblBhblN0YXJ0KGRpc2FibGVUb29sdGlwVXBkYXRlKTsKICAgICAgICAgICAgcHpkbC5vbkRyYWdab29tU3RhcnQoZGlzYWJsZVRvb2x0aXBVcGRhdGUpOwogICAgICAgICAgICBwemRsLm9uUGFuRW5kKGVuYWJsZVRvb2x0aXBVcGRhdGUpOwogICAgICAgICAgICBwemRsLm9uRHJhZ1pvb21FbmQoZW5hYmxlVG9vbHRpcFVwZGF0ZSk7CiAgICAgICAgICAgIC8vIFdoZW4gdXNpbmcgd2hlZWwsIGN1cnNvciBwb3NpdGlvbiBkb2VzIG5vdCBjaGFuZ2UuIFJlZHJhdyB0aGUgdG9vbHRpcAogICAgICAgICAgICAvLyB1c2luZyB0aGUgbGFzdCBrbm93biBtb3VzZSBwb3NpdGlvbi4KICAgICAgICAgICAgcHpkbC5vblNjcm9sbFpvb20oKCkgPT4gdGhpcy51cGRhdGVUb29sdGlwQ29udGVudCh0aGlzLl9sYXN0TW91c2VQb3NpdGlvbikpOwogICAgICAgICAgICBwaS5vblBvaW50ZXJNb3ZlKChwKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLl9sYXN0TW91c2VQb3NpdGlvbiA9IHA7CiAgICAgICAgICAgICAgICB0aGlzLnVwZGF0ZVRvb2x0aXBDb250ZW50KHApOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgcGkub25Qb2ludGVyRXhpdCgoKSA9PiB0aGlzLmhpZGVUb29sdGlwcygpKTsKICAgICAgICAgICAgcmV0dXJuIHBpOwogICAgICAgIH0KICAgICAgICB1cGRhdGVUb29sdGlwQ29udGVudChwKSB7CiAgICAgICAgICAgIC8vIExpbmUgcGxvdCBtdXN0IGJlIGluaXRpYWxpemVkIHRvIGRyYXcuCiAgICAgICAgICAgIGlmICghdGhpcy5saW5lUGxvdCkKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgd2luZG93LmNhbmNlbEFuaW1hdGlvbkZyYW1lKHRoaXMuX3Rvb2x0aXBVcGRhdGVBbmltYXRpb25GcmFtZSk7CiAgICAgICAgICAgIHRoaXMuX3Rvb2x0aXBVcGRhdGVBbmltYXRpb25GcmFtZSA9IHdpbmRvdy5yZXF1ZXN0QW5pbWF0aW9uRnJhbWUoKCkgPT4gewogICAgICAgICAgICAgICAgbGV0IHRhcmdldCA9IHsKICAgICAgICAgICAgICAgICAgICB4OiBwLngsCiAgICAgICAgICAgICAgICAgICAgeTogcC55LAogICAgICAgICAgICAgICAgICAgIGRhdHVtOiBudWxsLAogICAgICAgICAgICAgICAgICAgIGRhdGFzZXQ6IG51bGwsCiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgbGV0IGJib3ggPSB0aGlzLmdyaWRsaW5lcy5jb250ZW50KCkubm9kZSgpLmdldEJCb3goKTsKICAgICAgICAgICAgICAgIC8vIHB0cyBpcyB0aGUgY2xvc2V0cyBwb2ludCB0byB0aGUgdG9vbHRpcCBmb3IgZWFjaCBkYXRhc2V0CiAgICAgICAgICAgICAgICBsZXQgcHRzID0gdGhpcy5saW5lUGxvdAogICAgICAgICAgICAgICAgICAgIC5kYXRhc2V0cygpCiAgICAgICAgICAgICAgICAgICAgLm1hcCgoZGF0YXNldCkgPT4gdGhpcy5maW5kQ2xvc2VzdFBvaW50KHRhcmdldCwgZGF0YXNldCkpCiAgICAgICAgICAgICAgICAgICAgLmZpbHRlcihCb29sZWFuKTsKICAgICAgICAgICAgICAgIGxldCBpbnRlcnNlY3RzQkJveCA9IHNyYyQyLlV0aWxzLkRPTS5pbnRlcnNlY3RzQkJveDsKICAgICAgICAgICAgICAgIC8vIFdlIGRyYXcgdG9vbHRpcHMgZm9yIHBvaW50cyB0aGF0IGFyZSBOYU4sIG9yIGFyZSBjdXJyZW50bHkgdmlzaWJsZQogICAgICAgICAgICAgICAgbGV0IHB0c0ZvclRvb2x0aXBzID0gcHRzLmZpbHRlcigocCkgPT4gaW50ZXJzZWN0c0JCb3gocC54LCBwLnksIGJib3gpIHx8CiAgICAgICAgICAgICAgICAgICAgaXNOYU4odGhpcy55VmFsdWVBY2Nlc3NvcihwLmRhdHVtLCAwLCBwLmRhdGFzZXQpKSk7CiAgICAgICAgICAgICAgICAvLyBPbmx5IGRyYXcgbGl0dGxlIGluZGljYXRvciBjaXJjbGVzIGZvciB0aGUgbm9uLU5hTiBwb2ludHMKICAgICAgICAgICAgICAgIGxldCBwdHNUb0NpcmNsZSA9IHB0c0ZvclRvb2x0aXBzLmZpbHRlcigocCkgPT4gIWlzTmFOKHRoaXMueVZhbHVlQWNjZXNzb3IocC5kYXR1bSwgMCwgcC5kYXRhc2V0KSkpOwogICAgICAgICAgICAgICAgaWYgKHB0cy5sZW5ndGggIT09IDApIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLnNjYXR0ZXJQbG90LmF0dHIoJ2Rpc3BsYXknLCAnbm9uZScpOwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHB0c1NlbGVjdGlvbiA9IHRoaXMudG9vbHRpcFBvaW50c0NvbXBvbmVudAogICAgICAgICAgICAgICAgICAgICAgICAuY29udGVudCgpCiAgICAgICAgICAgICAgICAgICAgICAgIC5zZWxlY3RBbGwoJy5wb2ludCcpCiAgICAgICAgICAgICAgICAgICAgICAgIC5kYXRhKHB0c1RvQ2lyY2xlLCAocCkgPT4gcC5kYXRhc2V0Lm1ldGFkYXRhKCkubmFtZSk7CiAgICAgICAgICAgICAgICAgICAgcHRzU2VsZWN0aW9uLmVudGVyKCkuYXBwZW5kKCdjaXJjbGUnKS5jbGFzc2VkKCdwb2ludCcsIHRydWUpOwogICAgICAgICAgICAgICAgICAgIHB0c1NlbGVjdGlvbgogICAgICAgICAgICAgICAgICAgICAgICAuYXR0cigncicsIFRPT0xUSVBfQ0lSQ0xFX1NJWkUpCiAgICAgICAgICAgICAgICAgICAgICAgIC5hdHRyKCdjeCcsIChwKSA9PiBwLngpCiAgICAgICAgICAgICAgICAgICAgICAgIC5hdHRyKCdjeScsIChwKSA9PiBwLnkpCiAgICAgICAgICAgICAgICAgICAgICAgIC5zdHlsZSgnc3Ryb2tlJywgJ25vbmUnKQogICAgICAgICAgICAgICAgICAgICAgICAuYXR0cignZmlsbCcsIChwKSA9PiB0aGlzLmNvbG9yU2NhbGUuc2NhbGUocC5kYXRhc2V0Lm1ldGFkYXRhKCkubmFtZSkpOwogICAgICAgICAgICAgICAgICAgIHB0c1NlbGVjdGlvbi5leGl0KCkucmVtb3ZlKCk7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5kcmF3VG9vbHRpcHMocHRzRm9yVG9vbHRpcHMsIHRhcmdldCwgdGhpcy50b29sdGlwQ29sdW1ucyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLmhpZGVUb29sdGlwcygpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgaGlkZVRvb2x0aXBzKCkgewogICAgICAgICAgICB3aW5kb3cuY2FuY2VsQW5pbWF0aW9uRnJhbWUodGhpcy5fdG9vbHRpcFVwZGF0ZUFuaW1hdGlvbkZyYW1lKTsKICAgICAgICAgICAgdGhpcy50b29sdGlwLmhpZGUoKTsKICAgICAgICAgICAgdGhpcy5zY2F0dGVyUGxvdC5hdHRyKCdkaXNwbGF5JywgJ2Jsb2NrJyk7CiAgICAgICAgICAgIHRoaXMudG9vbHRpcFBvaW50c0NvbXBvbmVudC5jb250ZW50KCkuc2VsZWN0QWxsKCcucG9pbnQnKS5yZW1vdmUoKTsKICAgICAgICB9CiAgICAgICAgc2V0dXBUb29sdGlwcyhwbG90KSB7CiAgICAgICAgICAgIHBsb3Qub25EZXRhY2goKCkgPT4gewogICAgICAgICAgICAgICAgdGhpcy50b29sdGlwSW50ZXJhY3Rpb24uZGV0YWNoRnJvbShwbG90KTsKICAgICAgICAgICAgICAgIHRoaXMudG9vbHRpcEludGVyYWN0aW9uLmVuYWJsZWQoZmFsc2UpOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgcGxvdC5vbkFuY2hvcigoKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLnRvb2x0aXBJbnRlcmFjdGlvbi5hdHRhY2hUbyhwbG90KTsKICAgICAgICAgICAgICAgIHRoaXMudG9vbHRpcEludGVyYWN0aW9uLmVuYWJsZWQodHJ1ZSk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICBkcmF3VG9vbHRpcHMocG9pbnRzLCB0YXJnZXQsIHRvb2x0aXBDb2x1bW5zKSB7CiAgICAgICAgICAgIGlmICghcG9pbnRzLmxlbmd0aCkgewogICAgICAgICAgICAgICAgdGhpcy50b29sdGlwLmhpZGUoKTsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICBjb25zdCB7IGNvbG9yU2NhbGUgfSA9IHRoaXM7CiAgICAgICAgICAgIGNvbnN0IHN3YXRjaENvbCA9IHsKICAgICAgICAgICAgICAgIHRpdGxlOiAnJywKICAgICAgICAgICAgICAgIHN0YXRpYzogZmFsc2UsCiAgICAgICAgICAgICAgICBldmFsVHlwZTogVG9vbHRpcENvbHVtbkV2YWxUeXBlLkRPTSwKICAgICAgICAgICAgICAgIGV2YWx1YXRlKGQpIHsKICAgICAgICAgICAgICAgICAgICBzZWxlY3QodGhpcykKICAgICAgICAgICAgICAgICAgICAgICAgLnNlbGVjdCgnc3BhbicpCiAgICAgICAgICAgICAgICAgICAgICAgIC5zdHlsZSgnYmFja2dyb3VuZC1jb2xvcicsICgpID0+IGNvbG9yU2NhbGUuc2NhbGUoZC5kYXRhc2V0Lm1ldGFkYXRhKCkubmFtZSkpOwogICAgICAgICAgICAgICAgICAgIHJldHVybiAnJzsKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICBlbnRlcihkKSB7CiAgICAgICAgICAgICAgICAgICAgc2VsZWN0KHRoaXMpCiAgICAgICAgICAgICAgICAgICAgICAgIC5hcHBlbmQoJ3NwYW4nKQogICAgICAgICAgICAgICAgICAgICAgICAuY2xhc3NlZCgnc3dhdGNoJywgdHJ1ZSkKICAgICAgICAgICAgICAgICAgICAgICAgLnN0eWxlKCdiYWNrZ3JvdW5kLWNvbG9yJywgKCkgPT4gY29sb3JTY2FsZS5zY2FsZShkLmRhdGFzZXQubWV0YWRhdGEoKS5uYW1lKSk7CiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICB9OwogICAgICAgICAgICB0b29sdGlwQ29sdW1ucyA9IFtzd2F0Y2hDb2wsIC4uLnRvb2x0aXBDb2x1bW5zXTsKICAgICAgICAgICAgY29uc3QgZGlzdCA9IChwKSA9PiBNYXRoLnBvdyhwLnggLSB0YXJnZXQueCwgMikgKyBNYXRoLnBvdyhwLnkgLSB0YXJnZXQueSwgMik7CiAgICAgICAgICAgIGNvbnN0IGNsb3Nlc3REaXN0ID0gbG9kYXNoLm1pbihwb2ludHMubWFwKGRpc3QpKTsKICAgICAgICAgICAgY29uc3QgdmFsdWVTb3J0TWV0aG9kID0gdGhpcy5zbW9vdGhpbmdFbmFibGVkCiAgICAgICAgICAgICAgICA/IHRoaXMuc21vb3RoZWRBY2Nlc3NvcgogICAgICAgICAgICAgICAgOiB0aGlzLnlWYWx1ZUFjY2Vzc29yOwogICAgICAgICAgICBpZiAodGhpcy50b29sdGlwU29ydGluZ01ldGhvZCA9PT0gJ2FzY2VuZGluZycpIHsKICAgICAgICAgICAgICAgIHBvaW50cyA9IGxvZGFzaC5zb3J0QnkocG9pbnRzLCAoZCkgPT4gdmFsdWVTb3J0TWV0aG9kKGQuZGF0dW0sIC0xLCBkLmRhdGFzZXQpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmICh0aGlzLnRvb2x0aXBTb3J0aW5nTWV0aG9kID09PSAnZGVzY2VuZGluZycpIHsKICAgICAgICAgICAgICAgIHBvaW50cyA9IGxvZGFzaC5zb3J0QnkocG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bW4udGl0bGU7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBoZWFkZXIKICAgICAgICAgICAgICAgIC5lbnRlcigpCiAgICAgICAgICAgICAgICAuYXBwZW5kKCd0aCcpCiAgICAgICAgICAgICAgICAudGV4dCgoY29sKSA9PiBjb2wudGl0bGUpCiAgICAgICAgICAgICAgICAubm9kZXMoKTsKICAgICAgICAgICAgaGVhZGVyLmV4aXQoKS5yZW1vdmUoKTsKICAgICAgICAgICAgY29uc3Qgcm93cyA9IHRhYmxlCiAgICAgICAgICAgICAgICAuc2VsZWN0KCd0Ym9keScpCiAgICAgICAgICAgICAgICAuc2VsZWN0QWxsKCd0cicpCiAgICAgICAgICAgICAgICAuZGF0YShwb2ludHMsIChwdCwgXywgX18pID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiBwdC5kYXRhc2V0Lm1ldGFkYXRhKCkubmFtZTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHJvd3MKICAgICAgICAgICAgICAgIC5jbGFzc2VkKCdkaXN0YW50JywgKGQpID0+IHsKICAgICAgICAgICAgICAgIC8vIEdyZXkgb3V0IHRoZSBwb2ludCBpZiBhbnkgb2YgdGhlIGZvbGxvd2luZyBhcmUgdHJ1ZToKICAgICAgICAgICAgICAgIC8vIC0gVGhlIGN1cnNvciBpcyBvdXRzaWRlIG9mIHRoZSB4LWV4dGVudCBvZiB0aGUgZGF0YXNldAogICAgICAgICAgICAgICAgLy8gLSBUaGUgcG9pbnQncyB5IHZhbHVlIGlzIE5hTgogICAgICAgICAgICAgICAgbGV0IGZpcnN0UG9pbnQgPSBkLmRhdGFzZXQuZGF0YSgpWzBdOwogICAgICAgICAgICAgICAgbGV0IGxhc3RQb2ludCA9IGxvZGFzaC5sYXN0KGQuZGF0YXNldC5kYXRhKCkpOwogICAgICAgICAgICAgICAgbGV0IGZpcnN0WCA9IHRoaXMueFNjYWxlLnNjYWxlKHRoaXMueEFjY2Vzc29yKGZpcnN0UG9pbnQsIDAsIGQuZGF0YXNldCkpOwogICAgICAgICAgICAgICAgbGV0IGxhc3RYID0gdGhpcy54U2NhbGUuc2NhbGUodGhpcy54QWNjZXNzb3IobGFzdFBvaW50LCAwLCBkLmRhdGFzZXQpKTsKICAgICAgICAgICAgICAgIGxldCBzID0gdGhpcy5zbW9vdGhpbmdFbmFibGVkCiAgICAgICAgICAgICAgICAgICAgPyBkLmRhdHVtLnNtb290aGVkCiAgICAgICAgICAgICAgICAgICAgOiB0aGlzLnlWYWx1ZUFjY2Vzc29yKGQuZGF0dW0sIDAsIGQuZGF0YXNldCk7CiAgICAgICAgICAgICAgICByZXR1cm4gdGFyZ2V0LnggPCBmaXJzdFggfHwgdGFyZ2V0LnggPiBsYXN0WCB8fCBpc05hTihzKTsKICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgIC5jbGFzc2VkKCdjbG9zZXN0JywgKHApID0+IGRpc3QocCkgPT09IGNsb3Nlc3REaXN0KQogICAgICAgICAgICAgICAgLmVhY2goZnVuY3Rpb24gKHBvaW50KSB7CiAgICAgICAgICAgICAgICBzZWxmLmRyYXdUb29sdGlwUm93KHRoaXMsIHRvb2x0aXBDb2x1bW5zLCBwb2ludCk7CiAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAvLyByZW9yZGVycyBET00gdG8gbWF0Y2ggdGhlIG9yZGVyaW5nIG9mIHRoZSBgZGF0YWAuCiAgICAgICAgICAgICAgICAub3JkZXIoKTsKICAgICAgICAgICAgcm93cy5leGl0KCkucmVtb3ZlKCk7CiAgICAgICAgICAgIHJvd3MKICAgICAgICAgICAgICAgIC5lbnRlcigpCiAgICAgICAgICAgICAgICAuYXBwZW5kKCd0cicpCiAgICAgICAgICAgICAgICAuZWFjaChmdW5jdGlvbiAocG9pbnQpIHsKICAgICAgICAgICAgICAgIHNlbGYuZHJhd1Rvb2x0aXBSb3codGhpcywgdG9vbHRpcENvbHVtbnMsIHBvaW50KTsKICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgIC5ub2RlcygpOwogICAgICAgICAgICB0aGlzLnRvb2x0aXAudXBkYXRlQW5kUG9zaXRpb24odGhpcy50YXJnZXRTVkcubm9kZSgpKTsKICAgICAgICB9CiAgICAgICAgZHJhd1Rvb2x0aXBSb3cocm93LCB0b29sdGlwQ29sdW1ucywgcG9pbnQpIHsKICAgICAgICAgICAgY29uc3Qgc2VsZiA9IHRoaXM7CiAgICAgICAgICAgIGNvbnN0IGNvbHVtbnMgPSBzZWxlY3Qocm93KS5zZWxlY3RBbGwoJ3RkJykuZGF0YSh0b29sdGlwQ29sdW1ucyk7CiAgICAgICAgICAgIGNvbHVtbnMuZWFjaChmdW5jdGlvbiAoY29sKSB7CiAgICAgICAgICAgICAgICAvLyBTa2lwIGNvbHVtbiB2YWx1ZSB1cGRhdGUgd2hlbiB0aGUgY29sdW1uIGlzIHN0YXRpYy4KICAgICAgICAgICAgICAgIGlmIChjb2wuc3RhdGljKQogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgIHNlbGYuZHJhd1Rvb2x0aXBDb2x1bW4uY2FsbChzZWxmLCB0aGlzLCBjb2wsIHBvaW50KTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGNvbHVtbnMuZXhpdCgpLnJlbW92ZSgpOwogICAgICAgICAgICBjb2x1bW5zCiAgICAgICAgICAgICAgICAuZW50ZXIoKQogICAgICAgICAgICAgICAgLmFwcGVuZCgndGQnKQogICAgICAgICAgICAgICAgLmVhY2goZnVuY3Rpb24gKGNvbCkgewogICAgICAgICAgICAgICAgaWYgKCdlbnRlcicgaW4gY29sICYmIGNvbC5lbnRlcikgewogICAgICAgICAgICAgICAgICAgIGNvbnN0IGN1c3RvbVRvb2x0aXAgPSBjb2w7CiAgICAgICAgICAgICAgICAgICAgY3VzdG9tVG9vbHRpcC5lbnRlci5jYWxsKHRoaXMsIHBvaW50KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHNlbGYuZHJhd1Rvb2x0aXBDb2x1bW4uY2FsbChzZWxmLCB0aGlzLCBjb2wsIHBvaW50KTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIGRyYXdUb29sdGlwQ29sdW1uKGNvbHVtbiwgdG9vbHRpcENvbCwgcG9pbnQpIHsKICAgICAgICAgICAgY29uc3QgeyBzbW9vdGhpbmdFbmFibGVkIH0gPSB0aGlzOwogICAgICAgICAgICBpZiAoJ2V2YWxUeXBlJyBpbiB0b29sdGlwQ29sICYmCiAgICAgICAgICAgICAgICB0b29sdGlwQ29sLmV2YWxUeXBlID09IFRvb2x0aXBDb2x1bW5FdmFsVHlwZS5ET00pIHsKICAgICAgICAgICAgICAgIHRvb2x0aXBDb2wuZXZhbHVhdGUuY2FsbChjb2x1bW4sIHBvaW50LCB7IHNtb290aGluZ0VuYWJsZWQgfSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBzZWxlY3QoY29sdW1uKS50ZXh0KHRvb2x0aXBDb2wuZXZhbHVhdGUuY2FsbChjb2x1bW4sIHBvaW50LCB7IHNtb290aGluZ0VuYWJsZWQgfSkpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGZpbmRDbG9zZXN0UG9pbnQodGFyZ2V0LCBkYXRhc2V0KSB7CiAgICAgICAgICAgIGNvbnN0IHhQb2ludHMgPSBkYXRhc2V0CiAgICAgICAgICAgICAgICAuZGF0YSgpCiAgICAgICAgICAgICAgICAubWFwKChkLCBpKSA9PiB0aGlzLnhTY2FsZS5zY2FsZSh0aGlzLnhBY2Nlc3NvcihkLCBpLCBkYXRhc2V0KSkpOwogICAgICAgICAgICBsZXQgaWR4ID0gbG9kYXNoLnNvcnRlZEluZGV4KHhQb2ludHMsIHRhcmdldC54KTsKICAgICAgICAgICAgaWYgKHhQb2ludHMubGVuZ3RoID09IDApCiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICAgICAgaWYgKGlkeCA9PT0geFBvaW50cy5sZW5ndGgpIHsKICAgICAgICAgICAgICAgIGlkeCA9IGlkeCAtIDE7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoaWR4ICE9PSAwKSB7CiAgICAgICAgICAgICAgICBjb25zdCBwcmV2RGlzdCA9IE1hdGguYWJzKHhQb2ludHNbaWR4IC0gMV0gLSB0YXJnZXQueCk7CiAgICAgICAgICAgICAgICBjb25zdCBuZXh0RGlzdCA9IE1hdGguYWJzKHhQb2ludHNbaWR4XSAtIHRhcmdldC54KTsKICAgICAgICAgICAgICAgIGlkeCA9IHByZXZEaXN0IDwgbmV4dERpc3QgPyBpZHggLSAxIDogaWR4OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNvbnN0IGRhdHVtID0gZGF0YXNldC5kYXRhKClbaWR4XTsKICAgICAgICAgICAgY29uc3QgeSA9IHRoaXMuc21vb3RoaW5nRW5hYmxlZAogICAgICAgICAgICAgICAgPyB0aGlzLnNtb290aGVkQWNjZXNzb3IoZGF0dW0sIGlkeCwgZGF0YXNldCkKICAgICAgICAgICAgICAgIDogdGhpcy55VmFsdWVBY2Nlc3NvcihkYXR1bSwgaWR4LCBkYXRhc2V0KTsKICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIHg6IHhQb2ludHNbaWR4XSwKICAgICAgICAgICAgICAgIHk6IHRoaXMueVNjYWxlLnNjYWxlKHkpLAogICAgICAgICAgICAgICAgZGF0dW0sCiAgICAgICAgICAgICAgICBkYXRhc2V0LAogICAgICAgICAgICB9OwogICAgICAgIH0KICAgICAgICByZXNtb290aERhdGFzZXQoZGF0YXNldCkgewogICAgICAgICAgICBsZXQgZGF0YSA9IGRhdGFzZXQuZGF0YSgpOwogICAgICAgICAgICBjb25zdCBzbW9vdGhpbmdXZWlnaHQgPSB0aGlzLnNtb290aGluZ1dlaWdodDsKICAgICAgICAgICAgLy8gMXN0LW9yZGVyIElJUiBsb3ctcGFzcyBmaWx0ZXIgdG8gYXR0ZW51YXRlIHRoZSBoaWdoZXItCiAgICAgICAgICAgIC8vIGZyZXF1ZW5jeSBjb21wb25lbnRzIG9mIHRoZSB0aW1lLXNlcmllcy4KICAgICAgICAgICAgbGV0IGxhc3QgPSBkYXRhLmxlbmd0aCA+IDAgPyAwIDogTmFOOwogICAgICAgICAgICBsZXQgbnVtQWNjdW0gPSAwOwogICAgICAgICAgICBjb25zdCB5VmFsdWVzID0gZGF0YS5tYXAoKGQsIGkpID0+IHRoaXMueVZhbHVlQWNjZXNzb3IoZCwgaSwgZGF0YXNldCkpOwogICAgICAgICAgICAvLyBTZWUgIzc4Ni4KICAgICAgICAgICAgY29uc3QgaXNDb25zdGFudCA9IHlWYWx1ZXMuZXZlcnkoKHYpID0+IHYgPT0geVZhbHVlc1swXSk7CiAgICAgICAgICAgIGRhdGEuZm9yRWFjaCgoZCwgaSkgPT4gewogICAgICAgICAgICAgICAgY29uc3QgbmV4dFZhbCA9IHlWYWx1ZXNbaV07CiAgICAgICAgICAgICAgICBpZiAoaXNDb25zdGFudCB8fCAhTnVtYmVyLmlzRmluaXRlKG5leHRWYWwpKSB7CiAgICAgICAgICAgICAgICAgICAgZC5zbW9vdGhlZCA9IG5leHRWYWw7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBsYXN0ID0gbGFzdCAqIHNtb290aGluZ1dlaWdodCArICgxIC0gc21vb3RoaW5nV2VpZ2h0KSAqIG5leHRWYWw7CiAgICAgICAgICAgICAgICAgICAgbnVtQWNjdW0rKzsKICAgICAgICAgICAgICAgICAgICAvLyBUaGUgdW5jb3JyZWN0ZWQgbW92aW5nIGF2ZXJhZ2UgaXMgYmlhc2VkIHRvd2FyZHMgdGhlIGluaXRpYWwgdmFsdWUuCiAgICAgICAgICAgICAgICAgICAgLy8gRm9yIGV4YW1wbGUsIGlmIGluaXRpYWxpemVkIHdpdGggYDBgLCB3aXRoIHNtb290aGluZ1dlaWdodCBgc2AsIHdoZXJlCiAgICAgICAgICAgICAgICAgICAgLy8gZXZlcnkgZGF0YSBwb2ludCBpcyBgY2AsIGFmdGVyIGB0YCBzdGVwcyB0aGUgbW92aW5nIGF2ZXJhZ2UgaXMKICAgICAgICAgICAgICAgICAgICAvLyBgYGAKICAgICAgICAgICAgICAgICAgICAvLyAgIEVNQSA9IDAqc14odCkgKyBjKigxIC0gcykqc14odC0xKSArIGMqKDEgLSBzKSpzXih0LTIpICsgLi4uCiAgICAgICAgICAgICAgICAgICAgLy8gICAgICAgPSBjKigxIC0gc150KQogICAgICAgICAgICAgICAgICAgIC8vIGBgYAogICAgICAgICAgICAgICAgICAgIC8vIElmIGluaXRpYWxpemVkIHdpdGggYDBgLCBkaXZpZGluZyBieSAoMSAtIHNedCkgaXMgZW5vdWdoIHRvIGRlYmlhcwogICAgICAgICAgICAgICAgICAgIC8vIHRoZSBtb3ZpbmcgYXZlcmFnZS4gV2UgY291bnQgdGhlIG51bWJlciBvZiBmaW5pdGUgZGF0YSBwb2ludHMgYW5kCiAgICAgICAgICAgICAgICAgICAgLy8gZGl2aWRlIGFwcHJvcHJpYXRlbHkgYmVmb3JlIHN0b3JpbmcgdGhlIGRhdGEuCiAgICAgICAgICAgICAgICAgICAgbGV0IGRlYmlhc1dlaWdodCA9IDE7CiAgICAgICAgICAgICAgICAgICAgaWYgKHNtb290aGluZ1dlaWdodCAhPT0gMSkgewogICAgICAgICAgICAgICAgICAgICAgICBkZWJpYXNXZWlnaHQgPSAxIC0gTWF0aC5wb3coc21vb3RoaW5nV2VpZ2h0LCBudW1BY2N1bSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGQuc21vb3RoZWQgPSBsYXN0IC8gZGViaWFzV2VpZ2h0OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgZ2V0RGF0YXNldChuYW1lKSB7CiAgICAgICAgICAgIGlmICh0aGlzLm5hbWUyZGF0YXNldHNbbmFtZV0gPT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICAgICAgdGhpcy5uYW1lMmRhdGFzZXRzW25hbWVdID0gbmV3IHNyYyQyLkRhdGFzZXQoW10sIHsKICAgICAgICAgICAgICAgICAgICBuYW1lLAogICAgICAgICAgICAgICAgICAgIG1ldGE6IG51bGwsCiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpcy5uYW1lMmRhdGFzZXRzW25hbWVdOwogICAgICAgIH0KICAgICAgICBzdGF0aWMgZ2V0WVNjYWxlRnJvbVR5cGUoeVNjYWxlVHlwZSkgewogICAgICAgICAgICBpZiAoeVNjYWxlVHlwZSA9PT0gWVNjYWxlVHlwZS5MT0cpIHsKICAgICAgICAgICAgICAgIHJldHVybiBuZXcgTG9nU2NhbGUoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmICh5U2NhbGVUeXBlID09PSBZU2NhbGVUeXBlLkxJTkVBUikgewogICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBMaW5lYXJTY2FsZSgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdVbnJlY29nbml6ZWQgeVNjYWxlIHR5cGUgJyArIHlTY2FsZVR5cGUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFN0YWdlcyB1cGRhdGUgb2YgdmlzaWJsZSBzZXJpZXMgb24gdGhlIGNoYXJ0LgogICAgICAgICAqCiAgICAgICAgICogUGxlYXNlIGNhbGwgYGNvbW1pdENoYW5nZXNgIGZvciB0aGUgY2hhbmdlcyB0byBiZSByZWZsZWN0ZWQgb24gdGhlIGNoYXJ0CiAgICAgICAgICogYWZ0ZXIgbWFraW5nIGFsbCB0aGUgY2hhbmdlcy4KICAgICAgICAgKi8KICAgICAgICBzZXRWaXNpYmxlU2VyaWVzKG5hbWVzKSB7CiAgICAgICAgICAgIHRoaXMuZGlzYWJsZUNoYW5nZXMoKTsKICAgICAgICAgICAgbmFtZXMgPSBuYW1lcy5zb3J0KCk7CiAgICAgICAgICAgIG5hbWVzLnJldmVyc2UoKTsgLy8gZHJhdyBmaXJzdCBzZXJpZXMgb24gdG9wCiAgICAgICAgICAgIHRoaXMuc2VyaWVzTmFtZXMgPSBuYW1lczsKICAgICAgICB9CiAgICAgICAgZGlzYWJsZUNoYW5nZXMoKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5kaXJ0eURhdGFzZXRzLnNpemUpIHsKICAgICAgICAgICAgICAgIC8vIFByZXZlbnQgcGxvdHMgZnJvbSByZWFjdGluZyB0byB0aGUgZGF0YXNldCBjaGFuZ2VzLgogICAgICAgICAgICAgICAgdGhpcy5saW5lUGxvdC5kYXRhc2V0cyhbXSk7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5zbW9vdGhMaW5lUGxvdCkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuc21vb3RoTGluZVBsb3QuZGF0YXNldHMoW10pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKHRoaXMubWFyZ2luQXJlYVBsb3QpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLm1hcmdpbkFyZWFQbG90LmRhdGFzZXRzKFtdKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBjb21taXRDaGFuZ2VzKCkgewogICAgICAgICAgICB0aGlzLmRhdGFzZXRzID0gdGhpcy5zZXJpZXNOYW1lcy5tYXAoKHIpID0+IHRoaXMuZ2V0RGF0YXNldChyKSk7CiAgICAgICAgICAgIFsuLi50aGlzLmRpcnR5RGF0YXNldHNdLmZvckVhY2goKGQpID0+IHsKICAgICAgICAgICAgICAgIGlmICh0aGlzLnNtb290aGluZ0VuYWJsZWQpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLnJlc21vb3RoRGF0YXNldCh0aGlzLmdldERhdGFzZXQoZCkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdGhpcy51cGRhdGVTcGVjaWFsRGF0YXNldHMoKTsKICAgICAgICAgICAgdGhpcy5saW5lUGxvdC5kYXRhc2V0cyh0aGlzLmRhdGFzZXRzKTsKICAgICAgICAgICAgaWYgKHRoaXMuc21vb3RoaW5nRW5hYmxlZCkgewogICAgICAgICAgICAgICAgdGhpcy5zbW9vdGhMaW5lUGxvdC5kYXRhc2V0cyh0aGlzLmRhdGFzZXRzKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5tYXJnaW5BcmVhUGxvdCkgewogICAgICAgICAgICAgICAgdGhpcy5tYXJnaW5BcmVhUGxvdC5kYXRhc2V0cyh0aGlzLmRhdGFzZXRzKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLm1lYXN1cmVCQm94QW5kTWF5YmVJbnZhbGlkYXRlTGF5b3V0SW5SYWYoKTsKICAgICAgICAgICAgdGhpcy5kaXJ0eURhdGFzZXRzLmNsZWFyKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNhbXBsZXMgYSBkYXRhc2V0IHNvIHRoYXQgaXQgY29udGFpbnMgbm8gbW9yZSB0aGFuIF9NQVhfTUFSS0VSUyBudW1iZXIgb2YKICAgICAgICAgKiBkYXRhIHBvaW50cy4gVGhpcyBmdW5jdGlvbiByZXR1cm5zIHRoZSBvcmlnaW5hbCBkYXRhc2V0IGlmIGl0IGRvZXMgbm90CiAgICAgICAgICogZXhjZWVkIHRoYXQgbWFueSBwb2ludHMuCiAgICAgICAgICovCiAgICAgICAgY3JlYXRlU2FtcGxlZERhdGFzZXRGb3JNYXJrZXJzKG9yaWdpbmFsKSB7CiAgICAgICAgICAgIGNvbnN0IG9yaWdpbmFsRGF0YSA9IG9yaWdpbmFsLmRhdGEoKTsKICAgICAgICAgICAgaWYgKG9yaWdpbmFsRGF0YS5sZW5ndGggPD0gX01BWF9NQVJLRVJTKSB7CiAgICAgICAgICAgICAgICAvLyBUaGlzIGRhdGFzZXQgaXMgc21hbGwgZW5vdWdoLiBEbyBub3Qgc2FtcGxlLgogICAgICAgICAgICAgICAgcmV0dXJuIG9yaWdpbmFsOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIERvd25zYW1wbGUgdGhlIGRhdGEuIE90aGVyd2lzZSwgdG9vIG1hbnkgbWFya2VycyBjbHV0dGVyIHRoZSBjaGFydC4KICAgICAgICAgICAgY29uc3Qgc2tpcExlbmd0aCA9IE1hdGguY2VpbChvcmlnaW5hbERhdGEubGVuZ3RoIC8gX01BWF9NQVJLRVJTKTsKICAgICAgICAgICAgY29uc3QgZGF0YSA9IG5ldyBBcnJheShNYXRoLmZsb29yKG9yaWdpbmFsRGF0YS5sZW5ndGggLyBza2lwTGVuZ3RoKSk7CiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwLCBqID0gMDsgaSA8IGRhdGEubGVuZ3RoOyBpKyssIGogKz0gc2tpcExlbmd0aCkgewogICAgICAgICAgICAgICAgZGF0YVtpXSA9IG9yaWdpbmFsRGF0YVtqXTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gbmV3IHNyYyQyLkRhdGFzZXQoZGF0YSwgb3JpZ2luYWwubWV0YWRhdGEoKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFN0YWdlcyBhIGRhdGEgY2hhbmdlIG9mIGEgc2VyaWVzIG9uIHRoZSBjaGFydC4KICAgICAgICAgKgogICAgICAgICAqIFBsZWFzZSBjYWxsIGBjb21taXRDaGFuZ2VzYCBmb3IgdGhlIGNoYW5nZXMgdG8gYmUgcmVmbGVjdGVkIG9uIHRoZSBjaGFydAogICAgICAgICAqIGFmdGVyIG1ha2luZyBhbGwgdGhlIGNoYW5nZXMuCiAgICAgICAgICovCiAgICAgICAgc2V0U2VyaWVzRGF0YShuYW1lLCBkYXRhKSB7CiAgICAgICAgICAgIHRo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gICAgICB0aGlzLnNjYXR0ZXJQbG90LnkodGhpcy5zbW9vdGhlZEFjY2Vzc29yLCB0aGlzLnlTY2FsZSk7CiAgICAgICAgICAgICAgICB0aGlzLnNtb290aGluZ0VuYWJsZWQgPSB0cnVlOwogICAgICAgICAgICAgICAgdGhpcy5zbW9vdGhMaW5lUGxvdC5kYXRhc2V0cyh0aGlzLmRhdGFzZXRzKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5tYXJrZXJzU2NhdHRlclBsb3QpIHsKICAgICAgICAgICAgICAgIC8vIFVzZSB0aGUgY29ycmVjdCBhY2Nlc3NvciBmb3IgbWFya2VyIHBvc2l0aW9uaW5nLgogICAgICAgICAgICAgICAgdGhpcy5tYXJrZXJzU2NhdHRlclBsb3QueSh0aGlzLmdldFlBeGlzQWNjZXNzb3IoKSwgdGhpcy55U2NhbGUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMudXBkYXRlU3BlY2lhbERhdGFzZXRzKCk7CiAgICAgICAgfQogICAgICAgIHNtb290aGluZ0Rpc2FibGUoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLnNtb290aGluZ0VuYWJsZWQpIHsKICAgICAgICAgICAgICAgIHRoaXMubGluZVBsb3QucmVtb3ZlQ2xhc3MoJ2dob3N0Jyk7CiAgICAgICAgICAgICAgICB0aGlzLnNjYXR0ZXJQbG90LnkodGhpcy55VmFsdWVBY2Nlc3NvciwgdGhpcy55U2NhbGUpOwogICAgICAgICAgICAgICAgdGhpcy5zbW9vdGhMaW5lUGxvdC5kYXRhc2V0cyhbXSk7CiAgICAgICAgICAgICAgICB0aGlzLnNtb290aGluZ0VuYWJsZWQgPSBmYWxzZTsKICAgICAgICAgICAgICAgIHRoaXMudXBkYXRlU3BlY2lhbERhdGFzZXRzKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHRoaXMubWFya2Vyc1NjYXR0ZXJQbG90KSB7CiAgICAgICAgICAgICAgICAvLyBVc2UgdGhlIGNvcnJlY3QgYWNjZXNzb3IgKHdoaWNoIGRlcGVuZHMgb24gd2hldGhlciBzbW9vdGhpbmcgaXMKICAgICAgICAgICAgICAgIC8vIGVuYWJsZWQpIGZvciBtYXJrZXIgcG9zaXRpb25pbmcuCiAgICAgICAgICAgICAgICB0aGlzLm1hcmtlcnNTY2F0dGVyUGxvdC55KHRoaXMuZ2V0WUF4aXNBY2Nlc3NvcigpLCB0aGlzLnlTY2FsZSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgc2V0Q29sb3JTY2FsZShjb2xvclNjYWxlKSB7CiAgICAgICAgICAgIHRoaXMuY29sb3JTY2FsZSA9IGNvbG9yU2NhbGU7CiAgICAgICAgfQogICAgICAgIHNldFRvb2x0aXBDb2x1bW5zKHRvb2x0aXBDb2x1bW5zKSB7CiAgICAgICAgICAgIHRoaXMudG9vbHRpcENvbHVtbnMgPSB0b29sdGlwQ29sdW1uczsKICAgICAgICB9CiAgICAgICAgc2V0VG9vbHRpcFNvcnRpbmdNZXRob2QobWV0aG9kKSB7CiAgICAgICAgICAgIHRoaXMudG9vbHRpcFNvcnRpbmdNZXRob2QgPSBtZXRob2Q7CiAgICAgICAgfQogICAgICAgIHJlbmRlclRvKHRhcmdldFNWRykgewogICAgICAgICAgICB0aGlzLnRhcmdldFNWRyA9IHRhcmdldFNWRzsKICAgICAgICAgICAgdGhpcy5vdXRlci5yZW5kZXJUbyh0YXJnZXRTVkcpOwogICAgICAgICAgICBpZiAodGhpcy5fZGVmYXVsdFhSYW5nZSAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICAvLyBBIGhpZ2hlci1sZXZlbCBjb21wb25lbnQgcHJvdmlkZWQgYSBkZWZhdWx0IHJhbmdlIGZvciB0aGUgWCBheGlzLgogICAgICAgICAgICAgICAgLy8gU3RhcnQgd2l0aCB0aGF0IHJhbmdlLgogICAgICAgICAgICAgICAgdGhpcy5yZXNldFhEb21haW4oKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5fZGVmYXVsdFlSYW5nZSAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICAvLyBBIGhpZ2hlci1sZXZlbCBjb21wb25lbnQgcHJvdmlkZWQgYSBkZWZhdWx0IHJhbmdlIGZvciB0aGUgWSBheGlzLgogICAgICAgICAgICAgICAgLy8gU3RhcnQgd2l0aCB0aGF0IHJhbmdlLgogICAgICAgICAgICAgICAgdGhpcy5yZXNldFlEb21haW4oKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLm1lYXN1cmVCQm94QW5kTWF5YmVJbnZhbGlkYXRlTGF5b3V0SW5SYWYoKTsKICAgICAgICB9CiAgICAgICAgcmVkcmF3KCkgewogICAgICAgICAgICB3aW5kb3cuY2FuY2VsQW5pbWF0aW9uRnJhbWUodGhpcy5fcmVkcmF3UmFmKTsKICAgICAgICAgICAgdGhpcy5fcmVkcmF3UmFmID0gd2luZG93LnJlcXVlc3RBbmltYXRpb25GcmFtZSgoKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLm1lYXN1cmVCQm94QW5kTWF5YmVJbnZhbGlkYXRlTGF5b3V0KCk7CiAgICAgICAgICAgICAgICB0aGlzLm91dGVyLnJlZHJhdygpOwogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgbWVhc3VyZUJCb3hBbmRNYXliZUludmFsaWRhdGVMYXlvdXRJblJhZigpIHsKICAgICAgICAgICAgd2luZG93LmNhbmNlbEFuaW1hdGlvbkZyYW1lKHRoaXMuX2ludmFsaWRhdGVMYXlvdXRSYWYpOwogICAgICAgICAgICB0aGlzLl9pbnZhbGlkYXRlTGF5b3V0UmFmID0gd2luZG93LnJlcXVlc3RBbmltYXRpb25GcmFtZSgoKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLm1lYXN1cmVCQm94QW5kTWF5YmVJbnZhbGlkYXRlTGF5b3V0KCk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICAvKioKIC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gICAgICAgfQogICAgICAgIGRlc3Ryb3koKSB7CiAgICAgICAgICAgIC8vIERlc3Ryb3lpbmcgb3V0ZXIgZGVzdHJveXMgYWxsIHN1YmNvbXBvbmVudHMgcmVjdXJzaXZlbHkuCiAgICAgICAgICAgIHdpbmRvdy5jYW5jZWxBbmltYXRpb25GcmFtZSh0aGlzLl9yZWRyYXdSYWYpOwogICAgICAgICAgICB3aW5kb3cuY2FuY2VsQW5pbWF0aW9uRnJhbWUodGhpcy5faW52YWxpZGF0ZUxheW91dFJhZik7CiAgICAgICAgICAgIGlmICh0aGlzLm91dGVyKQogICAgICAgICAgICAgICAgdGhpcy5vdXRlci5kZXN0cm95KCk7CiAgICAgICAgfQogICAgICAgIG9uQW5jaG9yKGZuKSB7CiAgICAgICAgICAgIGlmICh0aGlzLm91dGVyKQogICAgICAgICAgICAgICAgdGhpcy5vdXRlci5vbkFuY2hvcihmbik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgd2hldGhlciB0aGUgZXh0ZW50IG9mIHJlbmRlcmVkIGRhdGEgdmFsdWVzIGZpdHMgdGhlIGN1cnJlbnQKICAgICAgICAgKiBjaGFydCB2aWV3cG9ydCBkb21haW4gKGluY2x1ZGVzIHNtb290aGluZyBhbmQgb3V0bGllciBkZXRlY3Rpb24pLgogICAgICAgICAqCiAgICAgICAgICogVGhpcyBpcyB0cnVlIHdoZW4gdGhlcmUgaXMgbm8gZGF0YSwgYW5kIGZhbHNlIHdoZW4gdGhlIGRvbWFpbiBoYXMgYmVlbgogICAgICAgICAqIHRyYW5zZm9ybWVkIGZyb20gdGhlIGV4dGVudCB2aWEgdHJhbnNmb3JtYXRpb25zIChwYW4sIHpvb20pLgogICAgICAgICAqLwogICAgICAgIGlzRGF0YUZpdFRvRG9tYWluKCkgewogICAgICAgICAgICByZXR1cm4gKGlzRGF0YUZpdFRvRG9tYWluKHRoaXMueEF4aXMuZ2V0U2NhbGUoKSkgJiYKICAgICAgICAgICAgICAgIGlzRGF0YUZpdFRvRG9tYWluKHRoaXMueUF4aXMuZ2V0U2NhbGUoKSkpOwogICAgICAgICAgICBmdW5jdGlvbiBpc0RhdGFGaXRUb0RvbWFpbihzY2FsZSkgewogICAgICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAgICAgKiBEb21haW4gcmVwcmVzZW50cyB0aGUgY3VycmVudGx5IGRpc3BsYXllZCByZWdpb24sIHBvc3NpYmx5IGEgem9vbWVkCiAgICAgICAgICAgICAgICAgKiBpbiBvciB6b29tZWQgb3V0IHZpZXcgb2YgdGhlIGRhdGEuCiAgICAgICAgICAgICAgICAgKgogICAgICAgICAgICAgICAgICogRXh0ZW50IHJlcHJlc2VudHMgdGhlIGV4dGVudCBvZiB0aGUgZGF0YSwgdGhlIHJhbmdlIG9mIGFsbCBwcm92aWRlZAogICAgICAgICAgICAgICAgICogZGF0dW0gdmFsdWVzLgogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBjb25zdCBkb21haW4gPSBzY2FsZS5nZXRUcmFuc2Zvcm1hdGlvbkRvbWFpbigpOwogICAgICAgICAgICAgICAgY29uc3QgZXh0ZW50ID0gc2NhbGUuZ2V0VHJhbnNmb3JtYXRpb25FeHRlbnQoKTsKICAgICAgICAgICAgICAgIHJldHVybiBleHRlbnRbMF0gPT09IGRvbWFpblswXSAmJiBleHRlbnRbMV0gPT09IGRvbWFpblsxXTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KCiAgICAvKiBDb3B5cmlnaHQgMjAxOCBUaGUgVGVuc29yRmxvdyBBdXRob3JzLiBBbGwgUmlnaHRzIFJlc2VydmVkLgoKICAgIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSAiTGljZW5zZSIpOwogICAgeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLgogICAgW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A9IHJvb3RFbDsKICAgICAgICB9CiAgICAgICAgZXhwb3J0QXNTdHJpbmcoKSB7CiAgICAgICAgICAgIGNvbnN0IGNvbnZlcnRlZE5vZGVzID0gdGhpcy5jb252ZXJ0KHRoaXMucm9vdCk7CiAgICAgICAgICAgIGlmICghY29udmVydGVkTm9kZXMpCiAgICAgICAgICAgICAgICByZXR1cm4gJyc7CiAgICAgICAgICAgIGNvbnN0IHN2ZyA9IHRoaXMuY3JlYXRlUm9vdFN2ZygpOwogICAgICAgICAgICBzdmcuYXBwZW5kQ2hpbGQoY29udmVydGVkTm9kZXMpOwogICAgICAgICAgICByZXR1cm4gc3ZnLm91dGVySFRNTDsKICAgICAgICB9CiAgICAgICAgY3JlYXRlVW5pcXVlSWQocHJlZml4KSB7CiAgICAgICAgICAgIHJldHVybiBgJHtwcmVmaXh9XyR7dGhpcy51bmlxdWVJZCsrfWA7CiAgICAgICAgfQogICAgICAgIGdldFNpemUoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLnJvb3QuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCk7CiAgICAgICAgfQogICAgICAgIGNyZWF0ZVJvb3RTdmcoKSB7CiAgICAgICAgICAgIGNvbnN0IHN2ZyA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ3N2ZycpOwogICAgICAgICAgICBjb25zdCByZWN0ID0gdGhpcy5nZXRTaXplKCk7CiAgICAgICAgICAgIC8vIGNhc2Ugb24gYHZpZXdCb3hgIGlzIHNlbnNpdGl2ZS4KICAgICAgICAgICAgc3ZnLnNldEF0dHJpYnV0ZU5TKCdzdmcnLCAndmlld0JveCcsIGAwIDAgJHtyZWN0LndpZHRofSAke3JlY3QuaGVpZ2h0fWApOwogICAgICAgICAgICBzdmcuc2V0QXR0cmlidXRlKCd4bWxucycsICdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZycpOwogICAgICAgICAgICByZXR1cm4gc3ZnOwogICAgICAgIH0KICAgICAgICBjb252ZX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MCk7CiAgICAgICAgICAgICAgICAgICAgY29uc3QgcmVjdCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ3JlY3QnKTsKICAgICAgICAgICAgICAgICAgICByZWN0LnNldEF0dHJpYnV0ZSgnd2lkdGgnLCBTdHJpbmcod2lkdGgpKTsKICAgICAgICAgICAgICAgICAgICByZWN0LnNldEF0dHJpYnV0ZSgnaGVpZ2h0JywgU3RyaW5nKGhlaWdodCkpOwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGNsaXBQYXRoID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudE5TKCdzdmcnLCAnY2xpcFBhdGgnKTsKICAgICAgICAgICAgICAgICAgICBjbGlwUGF0aC5pZCA9IGNsaXBJZDsKICAgICAgICAgICAgICAgICAgICBjbGlwUGF0aC5hcHBlbmRDaGlsZChyZWN0KTsKICAgICAgICAgICAgICAgICAgICBuZXdOb2RlLmFwcGVuZENoaWxkKGNsaXBQYXRoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIG5ld05vZGUgPSBub2RlLmNsb25lTm9kZSgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIEFycmF5LmZyb20obm9kZS5jaGlsZE5vZGVzKQogICAgICAgICAgICAgICAgLm1hcCgobm9kZSkgPT4gdGhpcy5jb252ZXJ0KG5vZGUpKQogICAgICAgICAgICAgICAgLmZpbHRlcihCb29sZWFuKQogICAgICAgICAgICAgICAgLmZvckVhY2goKGVsKSA9PiBuZXdOb2RlLmFwcGVuZENoaWxkKGVsKSk7CiAgICAgICAgICAgIC8vIFJlbW92ZSBlbXB0eSBncm91cGluZy4gVGhleSBhZGQgdG9vIG11Y2ggbm9pc2UuCiAgICAgICAgICAgIGNvbnN0IHNob3VsZE9taXQgPSAobmV3Tm9kZS5ub2RlTmFtZS50b1VwcGVyQ2FzZSgpID09IE5vZGVOYW1lLkdST1VQICYmCiAgICAgICAgICAgICAgICAhbmV3Tm9kZS5oYXNDaGlsZE5vZGVzKCkpIHx8CiAgICAgICAgICAgICAgICB0aGlzLnNob3VsZE9taXROb2RlKG5vZGUpOwogICAgICAgICAgICBpZiAoc2hvdWxkT21pdCkKICAgICAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgICAgICByZXR1cm4gdGhpcy5zdHJpcENsYXNzKHRoaXMudHJhbnNmZXJTdHlsZShub2RlLCBuZXdOb2RlKSk7CiAgICAgICAgfQogICAgICAgIHN0cmlwQ2xhc3Mobm9kZSkgewogICAgICAgICAgICBpZiAobm9kZS5ub2RlVHlwZSA9PSBOb2RlLkVMRU1FTlRfTk9ERSkgewogICAgICAgICAgICAgICAgbm9kZS5yZW1vdmVBdHRyaWJ1dGUoJ2NsYXNzJyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIG5vZGU7CiAgICAgICAgfQogICAgICAgIHRyYW5zZmVyU3R5bGUob3JpZ05vZGUsIG5vZGUpIHsKICAgICAgICAgICAgaWYgKG5vZGUubm9kZVR5cGUgIT0gTm9kZS5FTEVNRU5UX05PREUpCiAgICAgICAgICAgICAgICByZXR1cm4gbm9kZTsKICAgICAgICAgICAgY29uc3QgZWwgPSBub2RlOwogICAgICAgICAgICBjb25zdCBub2RlTmFtZSA9IG5vZGUubm9kZU5hbWUudG9VcHBlckNhc2UoKTsKICAgICAgICAgICAgY29uc3Qgc3R5bGUgPSB3aW5kb3cuZ2V0Q29tcHV0ZWRTdHlsZShvcmlnTm9kZSk7CiAgICAgICAgICAgIGlmIChub2RlTmFtZSA9PSBOb2RlTmFtZS5URVhUKSB7CiAgICAgICAgICAgICAgICBPYmplY3QuYXNzaWduKGVsLnN0eWxlLCB7CiAgICAgICAgICAgICAgICAgICAgZm9udEZhbWlseTogc3R5bGUuZm9udEZhbWlseSwKICAgICAgICAgICAgICAgICAgICBmb250U2l6ZTogc3R5bGUuZm9udFNpemUsCiAgICAgICAgICAgICAgICAgICAgZm9udFdlaWdodDogc3R5bGUuZm9udFdlaWdodCwKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChub2RlTmFtZSAhPSBOb2RlTmFtZS5HUk9VUCkgewogICAgICAgICAgICAgICAgZWwuc2V0QXR0cmlidXRlKCdmaWxsJywgc3R5bGUuZmlsbCk7CiAgICAgICAgICAgICAgICBlbC5zZXRBdHRyaWJ1dGUoJ3N0cm9rZScsIHN0eWxlLnN0cm9rZSk7CiAgICAgICAgICAgICAgICBlbC5zZXRBdHRyaWJ1dGUoJ3N0cm9rZS13aWR0aCcsIHN0eWxlLnN0cm9rZVdpZHRoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoc3R5bGUub3BhY2l0eSAhPSAnMScpCiAgICAgICAgICAgICAgICBlbC5zZXRBdHRyaWJ1dGUoJ29wYWNpdHknLCBzdHlsZS5vcGFjaXR5KTsKICAgICAgICAgICAgcmV0dXJuIG5vZGU7CiAgICAgICAgfQogICAgICAgIHNob3VsZE9taXROb2RlKG5vZGUpIHsKICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgIH0KICAgIH0KICAgIGNsYXNzIExpbmVDaGFydEV4cG9ydGVyIGV4dGVuZHMgUGxvdHRhYmxlRXhwb3J0ZXIgewogICAgICAgIHNob3VsZE9taXROb2RlKG5vZGUpIHsKICAgICAgICAgICAgLy8gU2NhdHRlciBwbG90IGlzIHVzZWZ1bCBmb3IgdG9vbHRpcC4gVG9vbHRpcCBpcyBtZWFuaW5nbGVzcyBpbiB0aGUKICAgICAgICAgICAgLy8gZXhwb3J0ZWQgc3ZnLgogICAgICAgICAgICBpZiAobm9kZS5ub2RlVHlwZSA9PSBOb2RlLkVMRU1FTlRfTk9ERSkgewogICAgICAgICAgICAgICAgcmV0dXJuIG5vZGUuY2xhc3NMaXN0LmNvbnRhaW5zKCdzY2F0dGVyLXBsb3QnKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4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NvbnRlbnQ6IGAKICAgIC5oZWxwIHsKICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICAgICAgYW5pbWF0aW9uLWRlbGF5OiAxczsKICAgICAgYW5pbWF0aW9uLWR1cmF0aW9uOiAxczsKICAgICAgYW5pbWF0aW9uLW5hbWU6IGZhZGUtb3V0OwogICAgICBiYWNrZ3JvdW5kOiByZ2JhKDMwLCAzMCwgMzAsIDAuNik7CiAgICAgIGJvdHRvbTogMDsKICAgICAgY29sb3I6ICNmZmY7CiAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgIGp1c3RpZnktY29udGVudDogY2VudGVyOwogICAgICBsZWZ0OiAwOwogICAgICBvcGFjaXR5OiAxOwogICAgICBwYWRkaW5nOiAyMHB4OwogICAgICBwb2ludGVyLWV2ZW50czogbm9uZTsKICAgICAgcG9zaXRpb246IGFic29sdXRlOwogICAgICByaWdodDogMDsKICAgICAgdG9wOiAwOwogICAgfQoKICAgIC5oZWxwID4gc3BhbiB7CiAgICAgIHdoaXRlLXNwYWNlOiBub3JtYWw7CiAgICB9CgogICAgQGtleWZyYW1lcyBmYWRlLW91dCB7CiAgICAgIDAlIHsKICAgICAgICBvcGFjaXR5OiAxOwogICAgICB9CgogICAgICAxMDAlIHsKICAgICAgICBvcGFjaXR5OiAwOwogICAgICB9CiAgICB9CiAgYCwKICAgIH0pOwoKICAgIGNvbnN0IHZhbHVlRm9ybWF0dGVyID0gbXVsdGlzY2FsZUZvcm1hdHRlcihZX1RPT0xUSVBfRk9STUFUVEVSX1BSRUNJU0lPTik7CiAgICBjb25zdCBmb3JtYXRWYWx1ZU9yTmFOID0gKHgpID0+IChpc05hTih4KSA/ICdOYU4nIDogdmFsdWVGb3JtYXR0ZXIoeCkpOwogICAgY29uc3QgREVGQVVMVF9UT09MVElQX0NPTFVNTlMgPSBbCiAgICAgICAgewogICAgICAgICAgICB0aXRsZTogJ05hbWUnLAogICAgICAgICAgICBldmFsdWF0ZTogKGQpID0+IGQuZGF0YXNldC5tZXRhZGF0YSgpLm5hbWUsCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAgIHRpdGxlOiAnU21vb3RoZWQnLAogICAgICAgICAgICBldmFsdWF0ZShkLCBzdGF0dXNPYmplY3QpIHsKICAgICAgICAgICAgICAgIGNvbnN0IHsgc21vb3RoaW5nRW5hYmxlZCB9ID0gc3RhdHVzT2JqZWN0OwogICAgICAgICAgICAgICAgcmV0dXJuIGZvcm1hdFZhbHVlT3JOYU4oc21vb3RoaW5nRW5hYmxlZCA/IGQuZGF0dW0uc21vb3RoZWQgOiBkLmRhdHVtLnNjYWxhcik7CiAgICAgICAgICAgIH0sCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAgIHRpdGxlOiAnVmFsdWUnLAogICAgICAgICAgICBldmFsdWF0ZTogKGQpID0+IGZvcm1hdFZhbHVlT3JOYU4oZC5kYXR1bS5zY2FsYXIpLAogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgICB0aXRsZTogJ1N0ZXAnLAogICAgICAgICAgICBldmFsdWF0ZTogKGQpID0+IHN0ZXBGb3JtYXR0ZXIoZC5kYXR1bS5zdGVwKSwKICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICAgdGl0bGU6ICdUaW1lJywKICAgICAgICAgICAgZXZhbHVhdGU6IChkKSA9PiB0aW1lRm9ybWF0dGVyKGQuZGF0dW0ud2FsbF90aW1lKSwKICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICAgdGl0bGU6ICdSZWxhdGl2ZScsCiAgICAgICAgICAgIGV2YWx1YXRlOiAoZCkgPT4gcmVsYXRpdmVGb3JtYXR0ZXIocmVsYXRpdmVBY2Nlc3NvcihkLmRhdHVtLCAtMSwgZC5kYXRhc2V0KSksCiAgICAgICAgfSwKICAgIF07CiAgICBsZXQgVnpMaW5lQ2hhcnQyID0gY2xhc3MgVnpMaW5lQ2hhcnQyIGV4dGVuZHMgTGVnYWN5RWxlbWVudE1peGluKFBvbHltZXJFbGVtZW50KSB7CiAgICAgICAgY29uc3RydWN0b3IoKSB7CiAgICAgICAgICAgIHN1cGVyKC4uLmFyZ3VtZW50cyk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBTY2FsZSB0aGF0IG1hcHMgc2VyaWVzIG5hbWVzIHRvIGNvbG9ycy4gVGhlIGRlZmF1bHQgY29sb3JzIGFyZSBmcm9tCiAgICAgICAgICAgICAqIGQzLnNjaGVtZUNhdGVnb3J5MTAuIFVzZSB0aGlzIHByb3BlcnR5IHRvIHJlcGxhY2UgdGhlIGRlZmF1bHQgbGluZQogICAgICAgICAgICAgKiBjb2xvcnMgd2l0aCBjb2xvcnMgb2YgeW91ciBvd24gY2hvaWNlLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5jb2xvclNjYWxlID0gbmV3IHNyYyQyLlNjYWxlcy5Db2xvcigpLnJhbmdlKGNhdGVnb3J5MTAuc2xpY2UoMCkpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogV2hldGhlciBzbW9vdGhpbmcgaXMgZW5hYmxlZCBvciBub3QuIElmIHRydWUsIHNtb290aGVkIGxpbmVzIHdpbGwgYmUKICAgICAgICAgICAgICogcGxvdHRlZCBpbiB0aGUgY2hhcnQgd2hpbGUgdGhlIHVuc21vb3RoZWQgbGluZXMgd2lsbCBiZSBnaG9zdGVkIGluCiAgICAgICAgICAgICAqIHRoZSBiYWNrZ3JvdW5kLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5zbW9vdGhpbmdFbmFibGVkID0gZmFsc2U7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBXZWlnaHQgKGJldHdlZW4gMC4wIGFuZCAxLjApIG9mIHRoZSBzbW9vdGhpbmcuIEEgdmFsdWUgb2YgMC4wCiAgICAgICAgICAgICAqIG1lYW5zIHZlcnkgbGl0dGxlIHNtb290aGluZywgcG9zc2libHkgbm8gc21vb3RoaW5nIGF0IGFsbC4gQQogICA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AgICAgKi8KICAgICAgICAgICAgdGhpcy55VmFsdWVBY2Nlc3NvciA9IChkKSA9PiBkLnNjYWxhcjsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEFuIGFycmF5IG9mIENoYXJ0SGVscGVyLlRvb2x0aXBDb2x1bW4gb2JqZWN0cy4gVXNlZCB0byBwb3B1bGF0ZSB0aGUgdGFibGUKICAgICAgICAgICAgICogd2l0aGluIHRoZSB0b29sdGlwLiBUaGUgdGFibGUgY29udGFpbnMgMSByb3cgcGVyIHJ1bi4KICAgICAgICAgICAgICoKICAgICAgICAgICAgICogTm90ZSB0aGF0IHRoaXMgZnVuY3Rpb24gcmV0dXJucyBhIGZ1bmN0aW9uIGJlY2F1c2UgcG9seW1lciBjYWxscyB0aGUKICAgICAgICAgICAgICogb3V0ZXIgZnVuY3Rpb24gdG8gY29tcHV0ZSB0aGUgdmFsdWUuIFdlIGFjdHVhbGx5IHdhbnQgdGhlIHZhbHVlIG9mIHRoaXMKICAgICAgICAgICAgICogcHJvcGVydHkgdG8gYmUgdGhlIGlubmVyIGZ1bmN0aW9uLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy50b29sdGlwQ29sdW1ucyA9IERFRkFVTFRfVE9PTFRJUF9DT0xVTU5TOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogVGhlIHNjYWxlIGZvciB0aGUgeS1heGlzLiBBbGxvd3M6CiAgICAgICAgICAgICAqIC0gImxpbmVhciIgLSBsaW5lYXIgc2NhbGUgKFBsb3R0YWJsZS5TY2FsZXMuTGluZWFyKQogICAgICAgICAgICAgKiAtICJsb2ciIC0gbW9kaWZpZWQtbG9nIHNjYWxlIChQbG90dGFibGUuU2NhbGVzLk1vZGlmaWVkTG9nKQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy55U2NhbGVUeXBlID0gWVNjYWxlVHlwZS5MSU5FQVI7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBXaGV0aGVyIHRvIGlnbm9yZSBvdXRsaWVyIGRhdGEgd2hlbiBjb21wdXRpbmcgdGhlIHlTY2FsZSBkb21haW4uCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmlnbm9yZVlPdXRsaWVycyA9IGZhbHNlOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQ2hhbmdlIGhvdyB0aGUgdG9vbHRpcCBpcyBzb3J0ZWQuIEFsbG93czoKICAgICAgICAgICAgICogLSAiZGVmYXVsdCIgLSBTb3J0IHRoZSB0b29sdGlwIGJ5IGlucHV0IG9yZGVyLgogICAgICAgICAgICAgKiAtICJhc2NlbmRpbmciIC0gU29ydCB0aGUgdG9vbHRpcCBieSBhc2NlbmRpbmcgdmFsdWUuCiAgICAgICAgICAgICAqIC0gImRlc2NlbmRpbmciIC0gU29ydCB0aGUgdG9vbHRpcCBieSBkZXNjZW5kaW5nIHZhbHVlLgogICAgICAgICAgICAgKiAtICJuZWFyZXN0IiAtIFNvcnQgdGhlIHRvb2x0aXAgYnkgY2xvc2VzdCB0byBjdXJzb3IuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLnRvb2x0aXBTb3J0aW5nTWV0aG9kID0gJ2RlZmF1bHQnOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQ2hhbmdlcyBob3cgdGhlIHRvb2x0aXAgaXMgcG9zaXRpb25lZC4gQWxsb3dzOgogICAgICAgICAgICAgKiAtICJib3R0b20iIC0gUG9zaXRpb24gdGhlIHRvb2x0aXAgb24gdGhlIGJvdHRvbSBvZiB0aGUgY2hhcnQuCiAgICAgICAgICAgICAqIC0gInJpZ2h0IiAtIFBvc2l0aW9uIHRoZSB0b29sdGlwIHRvIHRoZSByaWdodCBvZiB0aGUgY2hhcnQuCiAgICAgICAgICAgICAqIC0gImF1dG8iIC0gUG9zaXRpb24gdGhlIHRvb2x0aXAgdG8gdGhlIGJvdHRvbSBvZiB0aGUgY2hhcnQgaW4gbW9zdCBjYXNlLgogICAgIC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XMuX2xpc3Rlbih0aGlzLCAnbW91c2Vkb3duJywgdGhpcy5fb25Nb3VzZURvd24uYmluZCh0aGlzKSwgb3B0aW9uKTsKICAgICAgICAgICAgdGhpcy5fbGlzdGVuKHRoaXMsICdtb3VzZXVwJywgdGhpcy5fb25Nb3VzZVVwLmJpbmQodGhpcyksIG9wdGlvbik7CiAgICAgICAgICAgIHRoaXMuX2xpc3Rlbih3aW5kb3csICdrZXlkb3duJywgdGhpcy5fb25LZXlEb3duLmJpbmQodGhpcyksIG9wdGlvbik7CiAgICAgICAgICAgIHRoaXMuX2xpc3Rlbih3aW5kb3csICdrZXl1cCcsIHRoaXMuX29uS2V5VXAuYmluZCh0aGlzKSwgb3B0aW9uKTsKICAgICAgICB9CiAgICAgICAgZGV0YWNoZWQoKSB7CiAgICAgICAgICAgIHRoaXMuY2FuY2VsQXN5bmModGhpcy5fbWFrZUNoYXJ0QXN5bmNDYWxsYmFja0lkKTsKICAgICAgICAgICAgaWYgKHRoaXMuX2NoYXJ0KSB7CiAgICAgICAgICAgICAgICB0aGlzLl9jaGFydC5kZXN0cm95KCk7CiAgICAgICAgICAgICAgICB0aGlzLl9jaGFydCA9IHVuZGVmaW5lZDsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5fbGlzdGVuZXJzKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9saXN0ZW5lcnMuZm9yRWFjaCgoeyBub2RlLCBldmVudE5hbWUsIGZ1bmMsIG9wdGlvbiB9KSA9PiB7CiAgICAgICAgICAgICAgICAgICAgbm9kZS5yZW1vdmVFdmVudExpc3RlbmVyKGV2ZW50TmFtZSwgZnVuYywgb3B0aW9uKTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgdGhpcy5fbGlzdGVuZXJzLmNsZWFyKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgX2xpc3Rlbihub2RlLCBldmVudE5hbWUsIGZ1bmMsIG9wdGlvbiA9IHt9KSB7CiAgICAgICAgICAgIGlmICghdGhpcy5fbGlzdGVuZXJzKQogICAgICAgICAgICAgICAgdGhpcy5fbGlzdGVuZXJzID0gbmV3IFNldCgpOwogICAgICAgICAgICB0aGlzLl9saXN0ZW5lcnMuYWRkKHsgbm9kZSwgZXZlbnROYW1lLCBmdW5jLCBvcHRpb24gfSk7CiAgICAgICAgICAgIG5vZGUuYWRkRXZlbnRMaXN0ZW5lcihldmVudE5hbWUsIGZ1bmMsIG9wdGlvbik7CiAgICAgICAgfQogICAgICAgIF9vbktleURvd24oZXZlbnQpIHsKICAgICAgICAgICAgdGhpcy50b2dnbGVDbGFzcygncGFua2V5JywgUGFuWm9vbURyYWdMYXllci5pc1BhbktleShldmVudCkpOwogICAgICAgIH0KICAgICAgICBfb25LZXlVcChldmVudCkgewogICAgICAgICAgICB0aGlzLnRvZ2dsZUNsYXNzKCdwYW5rZXknLCBQYW5ab29tRHJhZ0xheWVyLmlzUGFuS2V5KGV2ZW50KSk7CiAgICAgICAgfQogICAgICAgIF9vbk1vdXNlRG93bihldmVudCkgewogICAgICAgICAgICB0aGlzLnRvZ2dsZUNsYXNzKCdtb3VzZWRvd24nLCB0cnVlKTsKICAgICAgICB9CiAgICAgICAgX29uTW91c2VVcChldmVudCkgewogICAgICAgICAgICB0aGlzLnRvZ2dsZUNsYXNzKCdtb3VzZWRvd24nLCBmYWxzZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgd2hldGhlciB0aGUgZXh0ZW50IG9mIHJlbmRlcmVkIGRhdGEgdmFsdWVzIGZpdHMgdGhlIGN1cnJlbnQKICAgICAgICAgKiBjaGFydCB2aWV3cG9ydCBkb21haW4gKGluY2x1ZGVzIHNtb290aGluZyBhbmQgb3V0bGllciBkZXRlY3Rpb24pLgogICAgICAgICAqCiAgICAgICAgICogVGhpcyBpcyB0cnVlIHdoZW4gdGhlcmUgaXMgbm8gZGF0YSwgYW5kIGZhbHNlIHdoZW4gdGhlIGRvbWFpbiBoYXMgYmVlbgogICAgICAgICAqIHRyYW5zZm9ybWVkIGZyb20gdGhlIGV4dGVudCB2aWEgdHJhbnNmb3JtYXRpb25zIChwYW4sIHpvb20pLgogICAgICAgICAqLwogICAgICAgIGlzRGF0YUZpdFRvRG9tYWluKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fY2hhcnQgPyB0aGlzLl9jaGFydC5pc0RhdGFGaXRUb0RvbWFpbigpIDogdHJ1ZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU2V0cyB0aGUgc2VyaWVzIHRoYXQgdGhlIGNoYXJ0IGRpc3BsYXlzLiBTZXJpZXMgd2l0aCBvdGhlciBuYW1lcyB3aWxsCiAgICAgICAgICogbm90IGJlIGRpc3BsYXllZC4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7QXJyYXk8U3RyaW5nPn0gbmFtZXMgQXJyYXkgd2l0aCB0aGUgbmFtZXMgb2YgdGhlIHNlcmllcyB0bwogICAgICAgICAqIGRpc3BsYXkuCiAgICAgICAgICovCiAgICAgICAgc2V0VmlzaWJsZVNlcmllcyhuYW1lcykgewogICAgICAgICAgICBpZiAobG9kYXNoLmlzRXF1YWwodGhpcy5fdmlzaWJsZVNlcmllc0NhY2hlLCBuYW1lcykpCiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIHRoaXMuX3Zpc2libGVTZXJpZXNDYWNoZSA9IG5hbWVzOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIHRoZSBkYXRhIG9mIG9uZSBvZiB0aGUgc2VyaWVzLiBOb3RlIHRoYXQgdG8gZGlzcGxheSB0aGlzIHNlcmllcwogICAgICAgICAqIGl0cyBuYW1lIG11c3QgYmUgaW4gdGhlIHNldFZpc2libGVTZXJpZXMoKSBhcnJheS4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBuYW1lIE5hbWUgb2YgdGhlIHNlcmllcy4KICAgIC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BpZiAodGhpcy5fY2hhcnQpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2NoYXJ0LnNldFNlcmllc01ldGFkYXRhKG5hbWUsIG1ldGEpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGNvbW1pdENoYW5nZXMoKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5fY2hhcnQpCiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIHRoaXMuX2NoYXJ0LmNvbW1pdENoYW5nZXMoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmVzZXQgdGhlIGNoYXJ0IGRvbWFpbi4gSWYgdGhlIGNoYXJ0IGhhcyBub3QgcmVuZGVyZWQgeWV0LCBhIGNhbGwgdG8gdGhpcwogICAgICAgICAqIG1ldGhvZCBuby1vcHMuCiAgICAgICAgICovCiAgICAgICAgcmVzZXREb21haW4oKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9jaGFydCkgewogICAgICAgICAgICAgICAgdGhpcy5fY2hhcnQucmVzZXREb21haW4oKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZS1yZW5kZXJzIHRoZSBjaGFydC4gVXNlZnVsIGlmIGUuZy4gdGhlIGNvbnRhaW5lciBzaXplIGNoYW5nZWQuCiAgICAgICAgICovCiAgICAgICAgcmVkcmF3KCkgewogICAgICAgICAgICBpZiAodGhpcy5fY2hhcnQpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2NoYXJ0LnJlZHJhdygpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYSBjaGFydCwgYW5kIGFzeW5jaHJvbm91c2x5IHJlbmRlcnMgaXQuIEZpcmVzIGEgY2hhcnQtcmVuZGVyZWQKICAgICAgICAgKiBldmVudCBhZnRlciB0aGUgY2hhcnQgaXMgcmVuZGVyZWQuCiAgICAgICAgICovCiAgICAgICAgX21ha2VDaGFydCgpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX21ha2VDaGFydEFzeW5jQ2FsbGJhY2tJZCAhPT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5jYW5jZWxBc3luYyh0aGlzLl9tYWtlQ2hhcnRBc3luY0NhbGxiYWNrSWQpOwogICAgICAgICAgICAgICAgdGhpcy5fbWFrZUNoYXJ0QXN5bmNDYWxsYmFja0lkID0gbnVsbDsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9tYWtlQ2hhcnRBc3luY0NhbGxiYWNrSWQgPSB0aGlzLmFzeW5jKGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgIHRoaXMuX21ha2VDaGFydEFzeW5jQ2FsbGJhY2tJZCA9IG51bGw7CiAgICAgICAgICAgICAgICAvLyBGaW5kIHRoZSBhY3R1YWwgeENvbXBvbmVudHNDcmVhdGlvbk1ldGhvZC4KICAgICAgICAgICAgICAgIGxldCBub3JtYWxYQ29tcG9uZW50c0NyZWF0aW9uTWV0aG9kID0gdGhpcy54Q29tcG9uZW50c0NyZWF0aW9uTWV0aG9kOwogICAgICAgICAgICAgICAgaWYgKCF0aGlzLnhUeXBlICYmICFub3JtYWxYQ29tcG9uZW50c0NyZWF0aW9uTWV0aG9kKSB7CiAgICAgICAgICAgICAgICAgICAgbm9ybWFsWENvbXBvbmVudHNDcmVhdGlvbk1ldGhvZCA9IHN0ZXBYOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAodGhpcy54VHlwZSkgewogICAgICAgICAgICAgICAgICAgIG5vcm1hbFhDb21wb25lbnRzQ3JlYXRpb25NZXRob2QgPSAoKSA9PiBnZXRYQ29tcG9uZW50cyh0aGlzLnhUeXBlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmICghbm9ybWFsWENvbXBvbmVudHNDcmVhdGlvbk1ldGhvZCB8fAogICAgICAgICAgICAgICAgICAgICF0aGlzLnlWYWx1Z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bmNob3IoKCkgPT4gdGhpcy5maXJlKCdjaGFydC1hdHRhY2hlZCcpKTsKICAgICAgICAgICAgfSwgMzUwKTsKICAgICAgICB9CiAgICAgICAgX3JlbG9hZEZyb21DYWNoZSgpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLl9jaGFydCkKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgdGhpcy5fdmlzaWJsZVNlcmllc0NhY2hlLmZvckVhY2goKG5hbWUpID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuX2NoYXJ0LnNldFNlcmllc0RhdGEobmFtZSwgdGhpcy5fc2VyaWVzRGF0YUNhY2hlW25hbWVdIHx8IFtdKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHRoaXMuX3Zpc2libGVTZXJpZXNDYWNoZQogICAgICAgICAgICAgICAgLmZpbHRlcigobmFtZSkgPT4gdGhpcy5fc2VyaWVzTWV0YWRhdGFDYWNoZVtuYW1lXSkKICAgICAgICAgICAgICAgIC5mb3JFYWNoKChuYW1lKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLl9jaGFydC5zZXRTZXJpZXNNZXRhZGF0YShuYW1lLCB0aGlzLl9zZXJpZXNNZXRhZGF0YUNhY2hlW25hbWVdKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHRoaXMuX2NoYXJ0LnNldFZpc2libGVTZXJpZXModGhpcy5fdmlzaWJsZVNlcmllc0NhY2hlKTsKICAgICAgICAgICAgdGhpcy5fY2hhcnQuY29tbWl0Q2hhbmdlcygpOwogICAgICAgIH0KICAgICAgICBfc21vb3RoaW5nQ2hhbmdlZCgpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLl9jaGFydCkKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgaWYgKHRoaXMuc21vb3RoaW5nRW5hYmxlZCkgewogICAgICAgICAgICAgICAgdGhpcy5fY2hhcnQuc21vb3RoaW5nVXBkYXRlKHRoaXMuc21vb3RoaW5nV2VpZ2h0KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuX2NoYXJ0LnNtb290aGluZ0Rpc2FibGUoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBfb3V0bGllcnNDaGFuZ2VkKCkgewogICAgICAgICAgICBpZiAoIXRoaXMuX2NoYXJ0KQogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB0aGlzLl9jaGFydC5pZ25vcmVZT3V0bGllcnModGhpcy5pZ25vcmVZT3V0bGllcnMpOwogICAgICAgIH0KICAgICAgICBfY29sb3JTY2FsZUNoYW5nZWQoKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5fY2hhcnQpCiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIHRoaXMuX2NoYXJ0LnNldENvbG9yU2NhbGUodGhpcy5jb2xvclNjYWxlKTsKICAgICAgICAgICAgdGhpcy5fY2hhcnQucmVkcmF3KCk7CiAgICAgICAgfQogICAgICAgIF90b29sdGlwQ29sdW1uc0NoYW5nZWQoKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5fY2hhcnQpCiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIHRoaXMuX2NoYXJ0LnNldFRvb2x0aXBDb2x1bW5zKHRoaXMudG9vbHRpcENvbHVtbnMpOwogICAgICAgIH0KICAgICAgICBfdG9vbHRpcFNvcnRpbmdNZXRob2RDaGFuZ2VkKCkgewogICAgICAgICAgICBpZiAoIXRoaXMuX2NoYXJ0KQogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB0aGlzLl9jaGFydC5zZXRUb29sdGlwU29ydGluZ01ldGhvZCh0aGlzLnRvb2x0aXBTb3J0aW5nTWV0aG9kKTsKICAgICAgICB9CiAgICAgICAgZ2V0RXhwb3J0ZXIoKSB7CiAgICAgICAgICAgIHJldHVybiBuZXcgTGluZUNoYXJ0RXhwb3J0ZXIodGhpcy4kLmNoYXJ0ZGl2KTsKICAgICAgICB9CiAgICB9OwogICAgVnpMaW5lQ2hhcnQyLnRlbXBsYXRlID0gaHRtbCBgCiAgICA8ZGl2IGlkPSJjaGFydGRpdiI+PC9kaXY+CiAgICA8dnotY2hhcnQtdG9vbHRpcAogICAgICBpZD0idG9vbHRpcCIKICAgICAgcG9zaXRpb249IltbdG9vbHRpcFBvc2l0aW9uXV0iCiAgICAgIGNvbnRlbnQtY29tcG9uZW50LW5hbWU9InZ6LWxpbmUtY2hhcnQtdG9vbHRpcCIKICAgID48L3Z6LWNoYXJ0LXRvb2x0aXA+CiAgICA8c3R5bGUgaW5jbHVkZT0icGxvdHRhYmxlLXN0eWxlIj48L3N0eWxlPgogICAgPHN0eWxlIGluY2x1ZGU9InZ6LXBhbi16b29tLXN0eWxlIj48L3N0eWxlPgogICAgPHN0eWxlPgogICAgICA6aG9zdCB7CiAgICAgICAgLW1vei11c2VyLXNlbGVjdDogbm9uZTsKICAgICAgICAtd2Via2l0LXVzZXItc2VsZWN0OiBub25lOwogICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjsKICAgICAgICBmbGV4LWdyb3c6IDE7CiAgICAgICAgZmxleC1zaHJpbms6IDE7CiAgICAgICAgb3V0bGluZTogbm9uZTsKICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7CiAgICAgICAgd2hpdGUtc3BhY2U6IG5vd3JhcDsKICAgICAgfQogICAgICBkaXYgewogICAgICAgIC13ZWJraXQtdXNlci1zZWxlY3Q6IG5vbmU7CiAgICAgICAgLW1vei11c2VyLXNlbGVjdDogbm9uZTsKICAgICAgICBmbGV4LWdyb3c6IDE7CiAgICAgICAgZmxleC1zaHJpbms6IDE7CiAgICAgIH0KCiAgICAgICNjaGFydGRpdiAubWFpbiB7CiAgICAgICAgY29udGFpbjogc3RyaWN0OwogICAgICAgIGN1cnNvcjogY3Jvc3NoYWlyOwogICAgICB9CgogICAgICA6aG9zdCgucGFua2V5KSAjY2hhcnRkaXYgOm5vdCguZHJhZy16b29taW5nKSAubWFpbiB7CiAgICAgICAgY3Vyc29yOiAtd2Via2l0LWdyYWI7CiAgICAgICAgY3Vyc29yOiBncmFiOwogICAgICB9CgogICAgICA6aG9zdCgubW91c2Vkb3duKSAjY2hhcnRkaXYgLnBhbm5pbmcgLm1haW4gewogICAgICAgIGN1cnNvcjogLXdlYmtpdC1ncmFiYmluZzsKICAgICAgICBjdXJzb3I6IGdyYWJiaW5nOwogICAgICB9CgogICAgICAjY2hhcnRkaXYgewogICAgICAgIGNvbnRhaW46IHN0cmljdDsKICAgICAgfQoKICAgICAgI2NoYXJ0ZGl2IGxpbmUuZ3VpZGUtbGluZSB7CiAgICAgICAgc3Ryb2tlOiAjOTk5OwogICAgICAgIHN0cm9rZS13aWR0aDogMS41cHg7CiAgICAgIH0KICAgICAgI2NoYXJ0ZGl2OmhvdmVyIC5tYWluIHsKICAgICAgICB3aWxsLWNoYW5nZTogdHJhbnNmb3JtOwogICAgICB9CgogICAgICAuZ2hvc3QgewogICAgICAgIG9wYWNpdHk6IDAuMjsKICAgICAgICBzdHJva2Utd2lkdGg6IDFweDsKICAgICAgfQogICAgPC9zdHlsZT4KICBgOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoeyB0eXBlOiBPYmplY3QgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBzcmMkMi5TY2FsZXMuQ29sb3IpCiAgICBdLCBWekxpbmVDaGFydDIucHJvdG90eXBlLCAiY29sb3JTY2FsZSIsIHZvaWQgMCk7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7IHR5cGU6IE9iamVjdCB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIEZ1bmN0aW9uKQogICAgXSwgVnpMaW5lQ2hhcnQyLnByb3RvdHlwZSwgInN5bWJvbEZ1bmN0aW9uI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yKTsKICAgIGxldCBWekxpbmVDaGFydFRvb2x0aXAgPSBjbGFzcyBWekxpbmVDaGFydFRvb2x0aXAgZXh0ZW5kcyBQb2x5bWVyRWxlbWVudCB7CiAgICB9OwogICAgVnpMaW5lQ2hhcnRUb29sdGlwLnRlbXBsYXRlID0gaHRtbCBgCiAgICA8ZGl2IGNsYXNzPSJjb250ZW50Ij4KICAgICAgPHRhYmxlPgogICAgICAgIDx0aGVhZD48L3RoZWFkPgogICAgICAgIDx0Ym9keT48L3Rib2R5PgogICAgICA8L3RhYmxlPgogICAgPC9kaXY+CiAgICA8c3R5bGU+CiAgICAgIDpob3N0IHsKICAgICAgICBwb2ludGVyLWV2ZW50czogbm9uZTsKICAgICAgfQoKICAgICAgLmNvbnRlbnQgewogICAgICAgIGJhY2tncm91bmQ6IHJnYmEoMCwgMCwgMCwgMC44KTsKICAgICAgICBib3JkZXItcmFkaXVzOiA0cHg7CiAgICAgICAgY29sb3I6ICNmZmY7CiAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjsKICAgICAgICBwb2ludGVyLWV2ZW50czogbm9uZTsKICAgICAgfQoKICAgICAgdGFibGUgewogICAgICAgIGZvbnQtc2l6ZTogMTNweDsKICAgICAgICBsaW5lLWhlaWdodDogMS40ZW07CiAgICAgICAgbWFyZ2luLXRvcDogMTBweDsKICAgICAgICBwYWRkaW5nOiA4cHg7CiAgICAgIH0KCiAgICAgIHRoZWFkIHsKICAgICAgICBmb250LXNpemU6IDE0cHg7CiAgICAgIH0KCiAgICAgIHRib2R5IHsKICAgICAgICBmb250LXNpemU6IDEzcHg7CiAgICAgICAgbGluZS1oZWlnaHQ6IDIxcHg7CiAgICAgICAgd2hpdGUtc3BhY2U6IG5vd3JhcDsKICAgICAgfQoKICAgICAgdGQgewogICAgICAgIHBhZGRpbmc6IDAgNXB4OwogICAgICB9CgogICAgICAuc3dhdGNoIHsKICAgICAgICBib3JkZXItcmFkaXVzOiA1MCU7CiAgICAgICAgZGlzcGxheTogYm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gICAgdGhpcy5yZWRyYXcoKTsKICAgICAgICB9CiAgICAgICAgZGlzY29ubmVjdGVkQ2FsbGJhY2soKSB7CiAgICAgICAgICAgIHN1cGVyLmRpc2Nvbm5lY3RlZENhbGxiYWNrKCk7CiAgICAgICAgICAgIGlmICh0aGlzLl9yZWRyYXdSYWYgIT09IG51bGwpCiAgICAgICAgICAgICAgICBjYW5jZWxBbmltYXRpb25GcmFtZSh0aGlzLl9yZWRyYXdSYWYpOwogICAgICAgIH0KICAgICAgICBleHBvcnRBc1N2Z1N0cmluZygpIHsKICAgICAgICAgICAgY29uc3QgZXhwb3J0ZXIgPSB0aGlzLmdldENoYXJ0KCkuZ2V0RXhwb3J0ZXIoKTsKICAgICAgICAgICAgcmV0dXJuIGV4cG9ydGVyLmV4cG9ydEFzU3RyaW5nKCk7CiAgICAgICAgfQogICAgICAgIGdldENoYXJ0KCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy4kLmNoYXJ0OwogICAgICAgIH0KICAgICAgICByZXNldERvbWFpbigpIHsKICAgICAgICAgICAgdGhpcy5nZXRDaGFydCgpLnJlc2V0RG9tYWluKCk7CiAgICAgICAgfQogICAgICAgIHNldFNlcmllc0RhdGEobmFtZSwgZGF0YSkgewogICAgICAgICAgICB0aGlzLmdldENoYXJ0KCkuc2V0U2VyaWVzRGF0YShuYW1lLCBkYXRhKTsKICAgICAgICB9CiAgICAgICAgc2V0U2VyaWVzTWV0YWRhdGEobmFtZSwgbWV0YWRhdGEpIHsKICAgICAgICAgICAgdGhpcy5nZXRDaGFydCgpLnNldFNlcmllc01ldGFkYXRhKG5hbWUsIG1ldGFkYXRhKTsKICAgICAgICB9CiAgICAgICAgY29tbWl0Q2hhbmdlcygpIHsKICAgICAgICAgICAgdGhpcy5nZXRDaGFydCgpLmNvbW1pdENoYW5nZXMoKTsKICAgICAgICB9CiAgICAgICAgcmVkcmF3KCkgewogICAgICAgICAgICBpZiAodGhpcy5fcmVkcmF3UmFmICE9PSBudWxsKQogICAgICAgICAgICAgICAgY2FuY2VsQW5pbWF0aW9uRnJhbWUodGhpcy5fcmVkcmF3UmFmKTsKICAgICAgICAgICAgdGhpcy5fcmVkcmF3UmFmID0gd2luZG93LnJlcXVlc3RBbmltYXRpb25GcmFtZSgoKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5hY3RpdmUpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLmdldENoYXJ0KCkucmVkcmF3KCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAvLyBJZiB3ZSByZWFjaGVkIGEgcG9pbnQgd2hlcmUgd2Ugc2hvdWxkIHJlbmRlciB3aGlsZSB0aGUgcGFnZQogICAgICAgICAgICAgICAgICAgIC8vIGlzIG5vdCBhY3RpdmUsIHdlJ3ZlIGdvdHRlbiBpbnRvIGEgYmFkIHN0YXRlLgogICAgICAgICAgICAgICAgICAgIHRoaXMuX21heWJlUmVuZGVyZWRJbkJhZFN0YXRlID0gdHJ1ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIF9sb2FkS2V5Q2hhbmdlZCgpIHsKICAgICAgICAgICAgdGhpcy5yZXNldCgpOwogICAgICAgICAgICB0aGlzLl9yZXNldERvbWFpbk9uTmV4dExvYWQgPSB0cnVlOwogICAgICAgIH0KICAgICAgICBfZGF0YVNlcmllc0NoYW5nZWQoKSB7CiAgICAgICAgICAgIC8vIFNldHRpbmcgdmlzaWJsZSBzZXJpZXMgcmVkcmF3cyB0aGUgY2hhcnQuCiAgICAgICAgICAgIHRoaXMuZ2V0Q2hhcnQoKS5zZXRWaXNpYmxlU2VyaWVzKHRoaXMuZGF0YVNlcmllcyk7CiAgICAgICAgfQogICAgICAgIF9sb2dTY2FsZUNoYW5nZWQobG9nU2NhbGVBY3RpdmUpIHsKICAgICAgICAgICAgY29uc3QgY2hhcnQgPSB0aGlzLmdldENoYXJ0K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XJ0Mj4KICAgICAgPHRlbXBsYXRlIGlzPSJkb20taWYiIGlmPSJbW2RhdGFMb2FkaW5nXV0iPgogICAgICAgIDxkaXYgaWQ9ImxvYWRpbmctc3Bpbm5lci1jb250YWluZXIiPgogICAgICAgICAgPHBhcGVyLXNwaW5uZXItbGl0ZSBhY3RpdmU9IiI+PC9wYXBlci1zcGlubmVyLWxpdGU+CiAgICAgICAgPC9kaXY+CiAgICAgIDwvdGVtcGxhdGU+CiAgICA8L2Rpdj4KICAgIDxzdHlsZT4KICAgICAgOmhvc3QgewogICAgICAgIGhlaWdodDogMTAwJTsKICAgICAgICB3aWR0aDogMTAwJTsKICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47CiAgICAgIH0KCiAgICAgIDpob3N0KFtfbWF5YmUtcmVuZGVyZWQtaW4tYmFkLXN0YXRlXSkgdnotbGluZS1jaGFydCB7CiAgICAgICAgdmlzaWJpbGl0eTogaGlkZGVuOwogICAgICB9CgogICAgICAjY2hhcnQtYW5kLXNwaW5uZXItY29udGFpbmVyIHsKICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgIGZsZXgtZ3JvdzogMTsKICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7CiAgICAgIH0KCiAgICAgICNsb2FkaW5nLXNwaW5uZXItY29udGFpbmVyIHsKICAgICAgICBhbGlnbi1pdGVtczogY2VudGVyOwogICAgICAgIGJvdHRvbTogMDsKICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7CiAgICAgICAgbGVmdDogMDsKICAgICAgICBwb2ludGVyLWV2ZW50czogbm9uZTsKICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7CiAgICAgICAgcmlnaHQ6IDA7CiAgICAgICAgdG9wOiAwOwogICAgICB9CgogICAgICB2ei1saW5lLWNoYXJ0MiB7CiAgICAgICAgLXdlYmtpdC11c2VyLXNlbGVjdDogbm9uZTsKICAgICAgICAtbW96LXVzZXItc2VsZWN0OiBub25lOwogICAgICB9CgogICAgICB2ei1saW5lLWNoYXJ0MltkYXRhLWxvYWRpbmddIHsKICAgICAgICBvcGFjaXR5OiAwLjM7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgYDsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsKICAgICAgICAgICAgdHlwZTogQm9vbGVhbiwKICAgICAgICAgICAgb2JzZXJ2ZXI6ICdfZml4QmFkU3RhdGVXaGVuQWN0aXZlJywKICAgICAgICB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIEJvb2xlYW4pCiAgICBdLCBfVGZMaW5lQ2hhcnREYXRhTG9hZGVyLnByb3RvdHlwZSwgImFjdGl2ZSIsIHZvaWQgMCk7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7IHR5cGU6IEFycmF5IH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgQXJyYXkpCiAgICBdLCBfVGZMaW5lQ2hhcnREYXRhTG9hZGVyLnByb3RvdHlwZSwgImRhdGFTZXJpZXMiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoeyB0eXBlOiBPYmplY3QgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBSZXF1ZXN0TWFuYWdlcikKICAgIF0sIF9UZkxpbmVDaGFydERhdGFMb2FkZXIucHJvdG90eXBlLCAicmVxdWVzdE1hbmFnZXIiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBCb29sZWFuLAogICAgICAgICAgICBvYnNlcnZlcjogJ19sb2dTY2FsZUNoYW5nZWQnLAogICAgICAgIH0pLAogICAgICAgIF9fb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VyU3R5bGVEb21Nb2R1bGUoewogICAgICAgIG1vZHVsZU5hbWU6ICd0Zi1jdXN0b20tc2NhbGFyLWNhcmQtc3R5bGUnLAogICAgICAgIHN0eWxlQ29udGVudDogYAogICAgOmhvc3QgewogICAgICBtYXJnaW46IDVweCAxMHB4OwogICAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7CiAgICAgIHdpZHRoOiAzMzBweDsKICAgICAgdmVydGljYWwtYWxpZ246IHRleHQtdG9wOwogICAgfQoKICAgIDpob3N0KFtfZXhwYW5kZWRdKSB7CiAgICAgIHdpZHRoOiAxMDAlOwogICAgfQoKICAgIDpob3N0KFtfZXhwYW5kZWRdKSAjdGYtbGluZS1jaGFydC1kYXRhLWxvYWRlci1jb250YWluZXIgewogICAgICBoZWlnaHQ6IDQwMHB4OwogICAgfQoKICAgIGgxIHsKICAgICAgZm9udC1zaXplOiAxOXB4OwogICAgICBmb250LXdlaWdodDogbm9ybWFsOwogICAgfQoKICAgICN0Zi1saW5lLWNoYXJ0LWRhdGEtbG9hZGVyLWNvbnRhaW5lciB7CiAgICAgIGhlaWdodDogMjAwcHg7CiAgICAgIHdpZHRoOiAxMDAlOwogICAgfQoKICAgICNidXR0b25zIHsKICAgICAgZGlzcGxheTogZmxleDsKICAgICAgZmxleC1kaXJlY3Rpb246IHJvdzsKICAgIH0KCiAgICBwYXBlci1pY29uLWJ1dHRvbiB7CiAgICAgIGNvbG9yOiAjMjE5NmYzOwogICAgICBib3JkZXItcmFkaXVzOiAxMDAlOwogICAgICB3aWR0aDogMzJweDsKICAgICAgaGVpZ2h0OiAzMnB4OwogICAgICBwYWRkaW5nOiA0cHg7CiAgICB9CgogICAgcGFwZXItaWNvbi1idXR0b25bc2VsZWN0ZWRdIHsKICAgICAgYmFja2dyb3VuZDogdmFyKC0tdGItdWktbGlnaHQtYWNjZW50KTsKICAgIH0KCiAgICAuZG93bmxvYWQtbGlua3MgewogICAgICBkaXNwbGF5OiBmbGV4OwogICAgICBoZWl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GIEFOWSBLSU5ELCBlaXRoZXIgZXhwcmVzcyBvciBpbXBsaWVkLgogICAgU2VlIHRoZSBMaWNlbnNlIGZvciB0aGUgc3BlY2lmaWMgbGFuZ3VhZ2UgZ292ZXJuaW5nIHBlcm1pc3Npb25zIGFuZAogICAgbGltaXRhdGlvbnMgdW5kZXIgdGhlIExpY2Vuc2UuCiAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwogICAgLyoqCiAgICAgKiBBIGNsYXNzIHRoYXQgcmVwcmVzZW50cyBhIGRhdGEgc2VyaWVzIGZvciBhIGN1c3RvbSBzY2FsYXJzIGNoYXJ0LgogICAgICovCiAgICBjbGFzcyBEYXRhU2VyaWVzIHsKICAgICAgICBjb25zdHJ1Y3RvcihydW4sIHRhZywgbmFtZSwgc2NhbGFyRGF0YSwgc3ltYm9sKSB7CiAgICAgICAgICAgIHRoaXMucnVuID0gcnVuOwogICAgICAgICAgICB0aGlzLnRhZyA9IHRhZzsKICAgICAgICAgICAgdGhpcy5uYW1lID0gbmFtZTsKICAgICAgICAgICAgdGhpcy5zY2FsYXJEYXRhID0gc2NhbGFyRGF0YTsKICAgICAgICAgICAgdGhpcy5zeW1ib2wgPSBzeW1ib2w7CiAgICAgICAgfQogICAgICAgIGdldE5hbWUoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLm5hbWU7CiAgICAgICAgfQogICAgICAgIHNldERhdGEoc2NhbGFyRGF0YSkgewogICAgICAgICAgICB0aGlzLnNjYWxhckRhdGEgPSBzY2FsYXJEYXRhOwogICAgICAgIH0KICAgICAgICBnZXREYXRhKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5zY2FsYXJEYXRhOwogICAgICAgIH0KICAgICAgICBnZXRSdW4oKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLnJ1bjsKICAgICAgICB9CiAgICAgICAgZ2V0VGFnKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy50YWc7CiAgICAgICAgfQogICAgICAgIGdldFN5bWJvbCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuc3ltYm9sOwogICAgICAgIH0KICAgIH0KICAgIGZ1bmN0aW9uIGdlbmVyYXRlRGF0YVNlcmllc05hbWUocnVuLCB0YWcpIHsKICAgICAgICByZXR1cm4gYCR7dGFnfSAoJHtydW59KWA7CiAgICB9CiAgICAvKioKICAgICAqIEEgY29sb3Igc2NhbGUgdGhhdCB3cmFwcyB0aGUgdXN1YWwgY29sb3Igc2NhbGUgdGhhdCByZWxpZXMgb24gcnVucy4gVGhpcwogICAgICogcGFydGljdWxhciBjb2xvciBzY2FsZSBwYXJzZXMgdGhlIHJ1biBmcm9tIGEgc2VyaWVzIG5hbWUgYW5kIGRlZmVycyB0byB0aGF0CiAgICAgKiBmb3JtZXIgY29sb3Igc2NhbGUuCiAgICAgKi8KICAgIGNsYXNzIERhdGFTZXJpZXNDb2xvclNjYWxlIHsKICAgICAgICBjb25zdHJ1Y3RvcihydW5CYXNlZENvbG9yU2NhbGUpIHsKICAgICAgICAgICAgdGhpcy5ydW5CYXNlZENvbG9yU2NhbGUgPSBydW5CYXNlZENvbG9yU2NhbGU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIE9idGFpbnMgdGhlIGNvcnJlY3QgY29sb3IgYmFzZWQgb24gdGhlIHJ1bi4KICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gZGF0YVNlcmllcwogICAgICAgICAqIEByZXR1cm4ge3N0cmluZ30gVGhlIGNvbG9yLgogICAgICAgICAqLwogICAgICAgIHNjYWxlKGRhdGFTZXJpZXMpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMucnVuQmFzZWRDb2xvclNjYWxlLnNjYWxlKHRoaXMucGFyc2VSdW5OYW1lKGRhdGFTZXJpZXMpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUGFyc2VzIHRoZSByd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FsbChpdGVtcy5tYXAoKGl0ZW0pID0+IHsKICAgICAgICAgICAgICAgICAgICBjb25zdCBydW4gPSBpdGVtOwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHRhZyA9IHRoaXMuX3RhZ0ZpbHRlcjsKICAgICAgICAgICAgICAgICAgICBjb25zdCB1cmwgPSBhZGRQYXJhbXMoYmFzZVVybCwgeyB0YWcsIHJ1biB9KTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5yZXF1ZXN0TWFuYWdlcgogICAgICAgICAgICAgICAgICAgICAgICAucmVxdWVzdCh1cmwpCiAgICAgICAgICAgICAgICAgICAgICAgIC50aGVuKChkYXRhKSA9PiB2b2lkIG9uTG9hZCh7IGl0ZW0sIGRhdGEgfSkpOwogICAgICAgICAgICAgICAgfSkpLmZpbmFsbHkoKCkgPT4gdm9pZCBvbkZpbmlzaCgpKTsKICAgICAgICAgICAgfTsKICAgICAgICAgICAgdGhpcy5fcnVuVG9OZXh0QXZhaWxhYmxlU3ltYm9sSW5kZXggPSB7fTsKICAgICAgICAgICAgdGhpcy5fbWF0Y2hlc0xpc3RPcGVuZWQgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5fZmlsbEFyZWEgPSB7CiAgICAgICAgICAgICAgICBsb3dlckFjY2Vzc29yOiAoZCkgPT4gZC5sb3dlciwKICAgICAgICAgICAgICAgIGhpZ2hlckFjY2Vzc29yOiAoZCkgPT4gZC51cHBlciwKICAgICAgICAgICAgfTsKICAgICAgICAgICAgdGhpcy5fdG9vbHRpcENvbHVtbnMgPSAoKCkgPT4gewogICAgICAgICAgICAgICAgY29uc3QgdmFsdWVGb3JtYXR0ZXIgPSBtdWx0aXNjYWxlRm9ybWF0dGVyKFlfVE9PTFRJUF9GT1JNQVRURVJfUFJFQ0lTSU9OKTsKICAgICAgICAgICAgICAgIGNvbnN0IGZvcm1hdFZhbHVlT3JOYU4gPSAoeCkgPT4gKGlzTmFOKHgpID8gJ05hTicgOiB2YWx1ZUZvcm1hdHRlcih4KSk7CiAgICAgICAgICAgICAgICByZXR1cm4gWwogICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICdOYW1lJywKICAgICAgICAgICAgICAgICAgICAgICAgZXZhbHVhdGU6IChkKSA9PiBkLmRhdGFzZXQubWV0YWRhdGEoKS5uYW1lLAogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ1ZhbHVlJywKICAgICAgICAgICAgICAgICAgICAgICAgZXZhbHVhdGU6IChkKSA9PiBmb3JtYXRWYWx1ZU9yTmFOKGQuZGF0dW0uc2NhbGFyKSwKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICdMb3dlciBNYXJnaW4nLAogICAgICAgICAgICAgICAgICAgICAgICBldmFsdWF0ZTogKGQpID0+IGZvcm1hdFZhbHVlT3JOYU4oZC5kYXR1bS5sb3dlciksCiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAnVXBwZXIgTWFyZ2luJywKICAgICAgICAgICAgICAgICAgICAgICAgZXZhbHVhdGU6IChkKSA9PiBmb3JtYXRWYWx1ZU9yTmFOKGQuZGF0dW0udXBwZXIpLAogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ1N0ZXAnLAogICAgICAgICAgICAgICAgICAgICAgICBldmFsdWF0ZTogKGQpID0+IHN0ZXBGb3JtYXR0ZXIoZC5kYXR1bS5zdGVwKSwKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICdUaW1lJywKICAgICAgICAgICAgICAgICAgICAgICAgZXZhbHVhdGU6IChkKSA9PiB0aW1lRm9ybWF0dGVyKGQuZGF0dW0ud2FsbF90aW1lKSwKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICdSZWxhdGl2ZScsCiAgICAgICAgICAgICAgICAgICAgICAgIGV2YWx1YXRlOiAoZCkgPT4gcmVsYXRpdmVGb3JtYXR0ZXIocmVsYXRpdmVBY2Nlc3NvcihkLmRhdHVtLCAtMSwgZC5kYXRhc2V0KSksCiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIF07CiAgICAgICAgICAgIH0pKCk7CiAgICAgICAgICAgIHRoaXMuX21pc3NpbmdUYWdzID0gW107CiAgICAgICAgICAgIHRoaXMuX21pc3NpbmdUYWdzQ29sbGFwc2libGVPcGVuZWQgPSBmYWxzZTsKICAgICAgICB9CiAgICAgICAgcmVsb2FkKCkgewogICAgICAgICAgICB0aGlzLiQubG9hZGVyLnJlbG9hZCgpOwogICAgICAgIH0KICAgICAgICByZWRyYXcoKSB7CiAgICAgICAgICAgIHRoaXMuJC5sb2FkZXIucmVkcmF3KCk7CiAgICAgICAgfQogICAgICAgIF90b2dnbGVFeHBhbmRlZChlKSB7CiAgICAgICAgICAgIHRoaXMuc2V0KCdfZXhwYW5kZWQnLCAhdGhpcy5fZXhwYW5kZWQpOwogICAgICAgICAgICB0aGlzLnJlZHJhdygpOwogICAgICAgIH0KICAgICAgICBfdG9nZ2xlTG9nU2NhbGUoKSB7CiAgICAgICAgICAgIHRoaXMuc2V0KCdfbG9nU2NhbGVBY3RpdmUnLCAhdGhpcy5fbG9nU2NhbGVBY3RpdmUpOwogICAgICAgIH0KICAgICAgICBfcmVzZXREb21haW4oKSB7CiAgICAgICAgICAgIGNvbnN0IGNoYXJ0ID0gdGhpcy4kLmxvYWRlcjsKICAgICAgICAgICAgaWYgKGNoYXJ0KSB7CiAgICAgICAgICAgICAgICBjaGFydC5yZXNldERvbWFpbigpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIF9jc3ZVcmwoX25hbWVUb0RhdGFTZXJpZXMsIGRhdGFTZXJpZXNOYW1lKSB7CiAgICAgICAgICAgIGlmICghZGF0YVNlcmllc05hbWUpCiAgICAgICAgICAgICAgICByZXR1cm4gJyc7CiAgICAgICAgICAgIGNvbnN0IGJhc2VVcmwgPSB0aGlzLl9kb3dubG9hZERhdGFVcmwoX25hbWVUb0RhdGFTZXJpZXMsIGRhdGFTZXJpZXNOYW1lKTsKICAgICAgICAgICAgcmV0dXJuIGFkZFBhcmFtcyhiYXNlVXJsLCB7IGZvcm1hdDogJ2NzdicgfSk7CiAgICAgICAgfQogICAgICAgIF9qc29uVXJsKF9uYW1lVG9EYXRhU2VyaWVzLCBkYXRhU2VyaWVzTmFtZSkgewogICAgICAgICAgICBpZiAoIWRhdGFTZXJpZXNOYW1lKQogICAgICAgICAgICAgICAgcmV0dXJuICcnOwogICAgICAgICAgICBjb25zdCBiYXNlVXJsID0gdGhpcy5fZG93bmxvYWREYXRhVXJsKF9uYW1lVG9EYXRhU2VyaWVzLCBkYXRhU2VyaWVzTmFtZSk7CiAgICAgICAgICAgIHJldHVybiBhZGRQYXJhbXMoYmFzZVVybCwgeyBmb3JtYXQ6ICdqc29uJyB9KTsKICAgICAgICB9CiAgICAgICAgX2Rvd25sb2FkRGF0YVVybChfbmFtZVRvRGF0YVNlcmllcywgZGF0YVNlcmllc05hbWUpIHsKICAgICAgICAgICAgY29uc3QgZGF0YVNlcmllcyA9IF9uYW1lVG9EYXRhU2VyaWVzW2RhdGFTZXJpZXNOYW1lXTsKICAgICAgICAgICAgY29uc3QgZ2V0VmFycyA9IHsKICAgICAgICAgICAgICAgIHRhZzogZGF0YVNlcmllcy5nZXRUYWcoKSwKICAgICAgICAgICAgICAgIHJ1bjogZGF0YVNlcmllcy5nZXRSdW4oKSwKICAgICAgICAgICAgfTsKICAgICAg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h0aGlzLl9uYW1lVG9EYXRhU2VyaWVzKTsKICAgICAgICAgICAgICAgIGNvbnN0IHRhZ3NOb3RGb3VuZCA9IFtdOwogICAgICAgICAgICAgICAgbG9kYXNoLmZvckVhY2gobWFyZ2luQ2hhcnRTZXJpZXMsICh0YWdzT2JqZWN0KSA9PiB7CiAgICAgICAgICAgICAgICAgICAgbGV0IHRhZ05vdEZvdW5kID0gZmFsc2U7CiAgICAgICAgICAgICAgICAgICAgY29uc3Qgc2NhbGFyRXZlbnRzID0gZGF0YS50YWdfdG9fZXZlbnRzW3RhZ3NPYmplY3QudmFsdWVdOwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGxvd2VyQm91bmRzID0gZGF0YS50YWdfdG9fZXZlbnRzW3RhZ3NPYmplY3QubG93ZXJdOwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHVwcGVyQm91bmRzID0gZGF0YS50YWdfdG9fZXZlbnRzW3RhZ3NPYmplY3QudXBwZXJdOwogICAgICAgICAgICAgICAgICAgIC8vIE1ha2Ugc3VyZSB0aGF0IGRhdGEgaXMgZm91bmQgZm9yIGVhY2ggb2YgdGhlIHRhZ3MuCiAgICAgICAgICAgICAgICAgICAgaWYgKGxvZGFzaC5pc1VuZGVmaW5lZChzY2FsYXJFdmVudHMpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRhZ3NOb3RGb3VuZC5wdXNoKHRhZ3NPYmplY3QudmFsdWUpOwogICAgICAgICAgICAgICAgICAgICAgICB0YWdOb3RGb3VuZCA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGlmIChsb2Rhc2guaXNVbmRlZmluZWQobG93ZXJCb3VuZHMpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRhZ3NOb3RGb3VuZC5wdXNoKHRhZ3NPYmplY3QubG93ZXIpOwogICAgICAgICAgICAgICAgICAgICAgICB0YWdOb3RGb3VuZCA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGlmIChsb2Rhc2guaXNVbmRlZmluZWQodXBwZXJCb3VuZHMpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRhZ3NOb3RGb3VuZC5wdXNoKHRhZ3NPYmplY3QudXBwZXIpOwogICAgICAgICAgICAgICAgICAgICAgICB0YWdOb3RGb3VuZCA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIC8vIEF0IGxlYXN0IG9uZSBvZiB0aGUgdGFncyBsYWNrcyBkYXRhLiBXZSB0ZXJtaW5hdGUgZWFybHkgYmVjYXVzZQogICAgICAgICAgICAgICAgICAgIC8vIHRoZSBsaW5lIGNoYXJ0IHJlcXVpcmVzIGFsbCAzIHBpZWNlcyBvZiBkYXRhICh2YWx1ZSwgbG93ZXIgYm91bmQsCiAgICAgICAgICAgICAgICAgICAgLy8gYW5kIHVwcGVyIGJvdW5kKS4KICAgICAgICAgICAgICAgICAgICBpZiAodGFnTm90Rm91bmQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAvLyBNYWtlIHN1cmUgdGhhdCBzdGVwcyBmb3IgYWxsIHRoZSBsaXN0cyBjb3JyZXNwb25kIHdpdGggZWFjaAogICAgICAgICAgICAgICAgICAgIC8vIG90aGVyLiBPdGhlcndpc2UsIGRpc3BsYXkgYW4gZXJyb3IgbWVzc2FnZS4KICAgICAgICAgICAgICAgICAgICBjb25zdCBvYnRhaW5TdGVwID0gKGRhdHVtKSA9PiBkYXR1bVsxXTsKICAgICAgICAgICAgICAgICAgICBjb25zdCBzdGVwc01pc21hdGNoID0gdGhpcy5fZmluZFN0ZXBNaXNtYXRjaCh0YWdzT2JqZWN0LCBzY2FsYXJFdmVudHMubWFwKG9idGFpblN0ZXApLCBsb3dlckJvdW5kcy5tYXAob2J0YWluU3RlcCksIHVwcGVyQm91bmRzLm1hcChvYnRhaW5TdGVwKSk7CiAgICAgICAgICAgICAgICAgICAgaWYgKHN0ZXBzTWlzbWF0Y2gpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXQoJ19zdGVwc01pc21hdGNoJywgc3RlcHNNaXNtYXRjaCk7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgLy8gQ3JlYXRlIGRhdGEgcG9pbnRzIHRoYXQgdGhlIGxpbmUgY2hhcnQgY2FuIHBhcnNlLgogICAgICAgICAgICAgICAgICAgIGNvbnN0IG9idGFpbk51bWJlciA9IChkYXR1bSkgPT4gZGF0dW1bMl07CiAgICAgICAgICAgICAgICAgICAgY29uc3QgZGF0YVBvaW50cyA9IHNjYWxhckV2ZW50cy5tYXAoKGRhdHVtLCBpKSA9PiAoewogICAgICAgICAgICAgICAgICAgICAgICB3YWxsX3RpbWU6IG5ldyBEYXRlKGRhdHVtWzBdICogMTAwMCksCiAgICAgICAgICAgICAgICAgICAgICAgIHN0ZXA6IG9idGFpblN0ZXAoZGF0dW0pLAogICAgICAgICAgICAgICAgICAgICAgICBzY2FsYXI6IG9idGFpbk51bWJlcihkYXR1bSksCiAgICAgICAgICAgICAgICAgICAgICAgIGxvd2VyOiBvYnRhaW5OdW1iZXIobG93ZXJCb3VuZHNbaV0pLAogICAgICAgICAgICAgICAgICAgICAgICB1cHBlcjogb2J0YWluTnVtYmVyKHVwcGVyQm91bmRzW2ldKSwKICAgICAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICAgICAgLy8gQ29tcHV0ZSB0aGUgc2VyaWVzIG5hbWUsIHdoaWNoIGlzIGJhc2VkIG9uIGJvdGggdGhlIHJ1biBhbmQgdGhlCiAgICAgICAgICAgICAgICAgICAgLy8gdGFnIG9mIHRoZSB2YWx1ZS4KICAgICAgICAgICAgICAgICAgICBjb25zdCBzZXJpZXNOYW1lID0gZ2VuZXJhdGVEYXRhU2VyaWVzTmFtZShydW4sIHRhZ3NPYmplY3QudmFsdWUpOwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHNlcmllcyA9IG5ld01hcHBpbmdbc2VyaWVzTmFtZV07CiAgICAgICAgICAgICAgICAgICAgaWYgKHNlcmllcykgewogICAgICAgICAgICAgICAgICAgICAgICAvLyBUaGlzIHNlcmllcyBhbHJlYWR5IGV4aXN0cy4KICAgICAgICAgICAgICAgICAgICAgICAgc2VyaWVzLnNldERhdGEoZGF0YVBvaW50cyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzZXJpZXMgPSB0aGlzLl9jcmVhdGVOZXdEYXRhU2VyaWVzKHJ1biwgdGFnc09iamVjdC52YWx1ZSwgc2VyaWVzTmFtZSwgZGF0YVBvaW50cyk7CiAgICAgICAgICAgICAgICAgICAgICAgIG5ld01hcHBpbmdbc2VyaWVzTmFtZV0gPSBzZXJpZXM7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB0aGlzLnNldCgnX25hbWVUb0RhdGFTZXJpZXMnLCBuZXdNYXBwaW5nKTsKICAgICAgICAgICAgICAgIGNvbnN0IGVudHJ5SW5kZXggPSBsb2Rhc2guZmluZEluZGV4KHRoaXMuX21pc3NpbmdUYWdzLCAoZW50cnkpID0+IHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gZW50cnkucnVuID09PSBydW47CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIGlmICh0YWdzTm90Rm91bmQubGVuZ3RoICYmIHRhZ3NOb3RGb3VuZC5sZW5ndGggIT0gMykgewogICAgICAgICAgICAgICAgICAgIC8vIFNvbWUgYnV0IG5vdCBhbGwgdGFncyB3ZXJlIGZvdW5kLiBTaG93IGEgd2FybmluZyBtZXNzYWdlLgogICAgICAgICAgICAgICAgICAgIGNvbnN0IGVudHJ5ID0gewogICAgICAgICAgICAgICAgICAgICAgICBydW46IHJ1biwKICAgICAgICAgICAgICAgICAgICAgICAgdGFnczogdGFnc05vdEZvdW5kLAogICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICAgICAgaWYgKGVudHJ5SW5kZXggPj0gMCkgewogICAgICAgICAgICAgICAgICAgICAgICAvLyBSZW1vdmUgdGhlIHByZXZpb3VzIGVudHJ5LiBJbnNlcnQgdGhlIG5ldyBvbmUuCiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc3BsaWNlKCdfbWlzc2luZ1RhZ3MnLCBlbnRyeUluZGV4LCAxLCBlbnRyeSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAvLyBJbnNlcnQgYSBuZXcgZW50cnkuCiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucHVzaCgnX21pc3NpbmdUYWdzJywgZW50cnkpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKGVudHJ5SW5kZXggPj0gMCkgewogICAgICAgICAgICAgICAgICAgIC8vIFJlbW92ZSB0aGUgcHJldmlvdXMgZW50cnkgaWYgaXQgZXhpc3RzLgogICAgICAgICAgICAgICAgICAgIHRoaXMuc3BsaWNlKCdfbWlzc2luZ1RhZ3MnLCBlbnRyeUluZGV4LCAxKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfTsKICAgICAgICB9CiAgICAgICAgX2ZpbmRTdGVwTWlzbWF0Y2godGFnc09iamVjdCwgdmFsdWVTdGVwcywgbG93ZXJTdGVwcywgdXBwZXJTdGVwcykgewogICAgICAgICAgICBpZiAobG9kYXNoLmlzRXF1YWwobG93ZXJTdGVwcywgdmFsdWVTdGVwcykgJiYKICAgICAgICAgICAgICAgIGxvZGFzaC5pc0VxdWFsKHVwcGVyU3RlcH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pOwogICAgICAgICAgICAvLyBMb29wIGJhY2sgdG8gdGhlIGJlZ2lubmluZyBpZiB3ZSBhcmUgb3V0IG9mIHN5bWJvbHMuCiAgICAgICAgICAgIGNvbnN0IG51bVN5bWJvbHMgPSBTWU1CT0xTX0xJU1QubGVuZ3RoOwogICAgICAgICAgICB0aGlzLl9ydW5Ub05leHRBdmFpbGFibGVTeW1ib2xJbmRleFtydW5dID0KICAgICAgICAgICAgICAgICh0aGlzLl9ydW5Ub05leHRBdmFpbGFibGVTeW1ib2xJbmRleFtydW5dICsgMSkgJSBudW1TeW1ib2xzOwogICAgICAgICAgICByZXR1cm4gc2VyaWVzOwogICAgICAgIH0KICAgICAgICBfdXBkYXRlQ2hhcnQoKSB7CiAgICAgICAgICAgIHZhciBfbmFtZVRvRGF0YVNlcmllcyA9IHRoaXMuX25hbWVUb0RhdGFTZXJpZXM7CiAgICAgICAgICAgIC8vIEFkZCBuZXcgZGF0YSBzZXJpZXMuCiAgICAgICAgICAgIGxvZGFzaC5mb3JPd24oX25hbWVUb0RhdGFTZXJpZXMsIChkYXRhU2VyaWVzKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLiQubG9hZGVyLnNldFNlcmllc0RhdGEoZGF0YVNlcmllcy5nZXROYW1lKCksIGRhdGFTZXJpZXMuZ2V0RGF0YSgpKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHRoaXMuJC5sb2FkZXIuY29tbWl0Q2hhbmdlcygpOwogICAgICAgIH0KICAgICAgICBnZXQgX3Nlcmllc05hbWVzKCkgewogICAgICAgICAgICBjb25zdCBydW5Mb29rdXAgPSBuZXcgU2V0KHRoaXMucnVucyk7CiAgICAgICAgICAgIHJldHVybiBPYmplY3QuZW50cmllcyh0aGlzLl9uYW1lVG9EYXRhU2VyaWVzKQogICAgICAgICAgICAgICAgLmZpbHRlcigoW18sIHNlcmllc10pID0+IHJ1bkxvb2t1cC5oYXMoc2VyaWVzLnJ1bikpCiAgICAgICAgICAgICAgICAubWFwKChbbmFtZV0pID0+IG5hbWUpOwogICAgICAgIH0KICAgICAgICBfZGV0ZXJtaW5lQ29sb3IoY29sb3JTY2FsZSwgc2VyaWVzTmFtZSkgewogICAgICAgICAgICByZXR1cm4gY29sb3JTY2FsZS5zY2FsZShzZXJpZXNOYW1lKTsKICAgICAgICB9CiAgICAgICAgX3JlZnJlc2hEYXRhU2VyaWVzKCkgewogICAgICAgICAgICB2YXIgX3RhZ0ZpbHRlciA9IHRoaXMuX3RhZ0ZpbHRlcjsKICAgICAgICAgICAgdGhpcy5zZXQoJ19uYW1lVG9EYXRhU2VyaWVzJywge30pOwogICAgICAgIH0KICAgICAgICBfY3JlYXRlU3ltYm9sRnVuY3Rpb24oKSB7CiAgICAgICAgICAgIHJldHVybiAoc2VyaWVzTmFtZSkgPT4gdGhpcy5fbmFtZVRvRGF0YVNlcmllc1tzZXJpZXNOYW1lXS5nZXRTeW1ib2woKS5tZXRob2QoKTsKICAgICAgICB9CiAgICAgICAgX2RldGVybWluZVN5bWJvbChfbmFtZVRvRGF0YVNlcmllcywgc2VyaWVzTmFtZSkgewogICAgICAgICAgICByZXR1cm4gX25hbWVUb0RhdGFTZXJpZXNbc2VyaWVzTmFtZV0uZ2V0U3ltYm9sKCkuY2hhcmFjdGVyOwogICAgICAgIH0KICAgICAgICBnZXQgX3RhZ0ZpbHRlcigpIHsKICAgICAgICAgICAgdmFyIG1hcmdpbkNoYXJ0U2VyaWVzID0gdGhpcy5tYXJnaW5DaGFydFNlcmllczsKICAgICAgICAgICAgY29uc3QgdGFncyA9IGxvZGFzaC5mbGF0dGVuKG1hcmdpbkNoYXJ0U2VyaWVzLm1hcCgoc2VyaWVzKSA9PiBbCiAgICAgICAgICAgICAgICBzZXJpZXMudmFsdWUsCiAgICAgICAgICAgICAgICBzZXJpZXMubG93ZXIsCiAgICAgICAgICAgICAgICBzZXJpZXMudXBwZXIsCiAgICAgICAgICAgIF0pKTsKICAgICAgICAgICAgY29uc3QgZXNjYXBlZFR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KICAgIDxkaXYgaWQ9ImJ1dHRvbnMiPgogICAgICA8cGFwZXItaWNvbi1idXR0b24KICAgICAgICBzZWxlY3RlZCQ9IltbX2V4cGFuZGVkXV0iCiAgICAgICAgaWNvbj0iZnVsbHNjcmVlbiIKICAgICAgICBvbi10YXA9Il90b2dnbGVFeHBhbmRlZCIKICAgICAgPjwvcGFwZXItaWNvbi1idXR0b24+CiAgICAgIDxwYXBlci1pY29uLWJ1dHRvbgogICAgICAgIHNlbGVjdGVkJD0iW1tfbG9nU2NhbGVBY3RpdmVdXSIKICAgICAgICBpY29uPSJsaW5lLXdlaWdodCIKICAgICAgICBvbi10YXA9Il90b2dnbGVMb2dTY2FsZSIKICAgICAgICB0aXRsZT0iVG9nZ2xlIHktYXhpcyBsb2cgc2NhbGUiCiAgICAgID48L3BhcGVyLWljb24tYnV0dG9uPgogICAgICA8cGFwZXItaWNvbi1idXR0b24KICAgICAgICBpY29uPSJzZXR0aW5ncy1vdmVyc2NhbiIKICAgICAgICBvbi10YXA9Il9yZXNldERvbWFpbiIKICAgICAgICB0aXRsZT0iRml0IGRvbWFpbiB0byBkYXRhIgogICAgICA+PC9wYXBlci1pY29uLWJ1dHRvbj4KICAgICAgPHNwYW4gc3R5bGU9ImZsZXgtZ3JvdzogMSI+PC9zcGFuPgogICAgICA8dGVtcGxhdGUgaXM9ImRvbS1pZiIgaWY9Iltbc2hvd0Rvd25sb2FkTGlua3NdXSI+CiAgICAgICAgPGRpdiBjbGFzcz0iZG93bmxvYWQtbGlua3MiPgogICAgICAgICAgPHBhcGVyLWRyb3Bkb3duLW1lbnUKICAgICAgICAgICAgbm8tbGFiZWwtZmxvYXQ9InRydWUiCiAgICAgICAgICAgIGxhYmVsPSJzZXJpZXMgdG8gZG93bmxvYWQiCiAgICAgICAgICAgIHNlbGVjdGVkLWl0ZW0tbGFiZWw9Int7X2RhdGFTZXJpZXNOYW1lVG9Eb3dubG9hZH19IgogICAgICAgICAgPgogICAgICAgICAgICA8cGFwZXItbGlzdGJveCBjbGFzcz0iZHJvcGRvd24tY29udGVudCIgc2xvdD0iZHJvcGRvd24tY29udGVudCI+CiAgICAgICAgICAgICAgPHRlbXBsYXRlCiAgICAgICAgICAgICAgICBpcz0iZG9tLXJlcGVhdCIKICAgICAgICAgICAgICAgIGl0ZW1zPSJbW19zZXJpZXNOYW1lc11dIgogICAgICAgICAgICAgICAgYXM9ImRhdGFTZXJpZXNOYW1lIgogICAgICAgICAgICAgID4KICAgICAgICAgICAgICAgIDxwYXBlci1pdGVtIG5vLWxhYmVsLWZsb2F0PSJ0cnVlIgogICAgICAgICAgICAgICAgICA+W1tkYXRhU2VyaWVzTmFtZV1dPC9wYXBlci1pdGVtCiAgICAgICAgICAgICAgICA+CiAgICAgICAgICAgICAgPC90ZW1wbGF0ZT4KICAgICAgICAgICAgPC9wYXBlci1saXN0Ym94PgogICAgICAgICAgPC9wYXBlci1kcm9wZG93bi1tZW51PgogICAgICAgICAgPGEKICAgICAgICAgICAgZG93bmxvYWQ9IltbX2RhdGFTZXJpZXNOYW1lVG9Eb3dubG9hZF1dLmNzdiIKICAgICAgICAgICAgaHJlZj0iW1tfY3N2VXJsKF9uYW1lVG9EYXRhU2VyaWVzLCBfZGF0YVNlcmllc05hbWVUb0Rvd25sb2FkKV1dIgogICAgICAgICAgICA+Q1NWPC9hCiAgICAgICAgICA+CiAgICAgICAgICA8YQogICAgICAgICAgICBkb3dubG9hZD0iW1tfZGF0YVNlcmllc05hbWVUb0Rvd25sb2FkXV0uanNvbiIKICAgICAgICAgICAgaHJlZj0iW1tfanNvblVybChfbmFtZVRvRGF0YVNlcmllcywgX2RhdGFTZXJpZXNOYW1lVG9Eb3dubG9hZCldXSIKICAgICAgICAgICAgPkpTT048L2EKICAgICAgICAgID4KICAgICAgICA8L2Rpdj4KICAgICAgPC90ZW1wbGF0ZT4KICAgIDwvZGl2PgoKICAgIDwhLS0gaGVyZSAtLT4KICAgIDx0ZW1wbGF0ZSBpcz0iZG9tLWlmIiBpZ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YW4+CiAgICAgICAgICAgICAgICBbW3Nlcmllc05hbWVdXQogICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICA8L3RlbXBsYXRlPgogICAgICAgICAgPC9kaXY+CiAgICAgICAgPC9pcm9uLWNvbGxhcHNlPgogICAgICA8L3RlbXBsYXRlPgogICAgPC9kaXY+CgogICAgPHN0eWxlIGluY2x1ZGU9InRmLWN1c3RvbS1zY2FsYXItY2FyZC1zdHlsZSI+PC9zdHlsZT4KICAgIDxzdHlsZT4KICAgICAgLmVycm9yLWNvbnRlbnQgewogICAgICAgIGJhY2tncm91bmQ6ICNmMDA7CiAgICAgICAgYm9yZGVyLXJhZGl1czogNXB4OwogICAgICAgIGNvbG9yOiAjZmZmOwogICAgICAgIG1hcmdpbjogMTBweCAwIDAgMDsKICAgICAgICBwYWRkaW5nOiAxMHB4OwogICAgICB9CgogICAgICAuZXJyb3ItaWNvbiB7CiAgICAgICAgZGlzcGxheTogYmxvY2s7CiAgICAgICAgZmlsbDogI2ZmZjsKICAgICAgICBtYXJnaW46IDAgYXV0byA1cHggYXV0bzsKICAgICAgfQoKICAgICAgLmludmFsaWQtcmVnZXggewogICAgICAgIGZvbnQtd2VpZ2h0OiBib2xkOwogICAgICB9CgogICAgICAuZXJyb3ItY29udGVudCB1bCB7CiAgICAgICAgbWFyZ2luOiAxcHggMCAwIDA7CiAgICAgICAgcGFkZGluZzogMCAwIDAgMTlweDsKICAgICAgfQoKICAgICAgLnRhZy1uYW1lIHsKICAgICAgICBmb250LXdlaWdodDogYm9sZDsKICAgICAgfQoKICAgICAgLmNvbGxhcHNpYmxlLWxpc3QtdGl0bGUgewogICAgICAgIG1hcmdpbjogMTBweCAwIDVweCAwOwogICAgICB9CgogICAgICAuY29sbGFwc2libGUtdGl0bGUtdGV4dCB7CiAgICAgICAgdmVydGljYWwtYWxpZ246IG1pZGRsZTsKICAgICAgfQoKICAgICAgI21hdGNoZXMtbGlzdCB7CiAgICAgICAgbWF4LWhlaWdodDogMjAwcHg7CiAgICAgICAgb3ZlcmZsb3cteTogYXV0bzsKICAgICAgfQoKICAgICAgLm1hdGNoLWxpc3QtZW50cnkgewogICAgICAgIG1hcmdpbjogMCAwIDVweCAwOwogICAgICB9CgogICAgICAubWF0Y2gtZW50cnktc3ltYm9sIHsKICAgICAgICBmb250LWZhbWlseTogYXJpYWwsIHNhbnMtc2VyaWY7CiAgICAgICAgZGlzcGxheTogaW5saW5lLWJsb2NrOwogICAgICAgIHdpZHRoOiAxMHB4OwogICAgICB9CgogICAgICAubWlzc2luZy10YWdzLWZvci1ydW4tY29udGFpbmVyIHsKICAgICAgICBtYXJnaW46IDhweCAwIDAgMDsKICAgICAgfQogICAgPC9zdHlsZT4KICBgOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoeyB0eXBlOiBBcnJheSB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIEFycmF5KQogICAgXSwgX1RmQ3VzdG9tU2NhbGFyTWFyZ2luQ2hhcnRDYXJkLnByb3RvdHlwZSwgInJ1bnMiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoeyB0eXBlOiBTdHJpbmcgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBTdHJpbmcpCiAgICBdLCBfVGZDdXN0b21TY2FsYXJNYXJnaW5DaGFydENhcmQucHJvdG90eXBlLCAieFR5cGUiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoeyB0eXBlOiBCb29sZWFuIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgQm9vbGVhbikKICAgIF0sIF9UZkN1c3RvbVNjYWxhck1hcmdpbkNoYXJ0Q2FyZC5wcm90b3R5cGUsICJhY3RpdmUiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoeyB0eXBlOiBT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yKCkgewogICAgICAgICAgICBzdXBlciguLi5hcmd1bWVudHMpOwogICAgICAgICAgICB0aGlzLmFjdGl2ZSA9IHRydWU7CiAgICAgICAgICAgIHRoaXMuX2NvbG9yU2NhbGUgPSBuZXcgRGF0YVNlcmllc0NvbG9yU2NhbGUoewogICAgICAgICAgICAgICAgc2NhbGU6IHJ1bnNDb2xvclNjYWxlLAogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdGhpcy5fbmFtZVRvRGF0YVNlcmllcyA9IHt9OwogICAgICAgICAgICB0aGlzLl9leHBhbmRlZCA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLl9yZXF1ZXN0RGF0YSA9IChpdGVtcywgb25Mb2FkLCBvbkZpbmlzaCkgPT4gewogICAgICAgICAgICAgICAgY29uc3Qgcm91dGVyID0gZ2V0Um91dGVyKCk7CiAgICAgICAgICAgICAgICBjb25zdCBiYXNlVXJsID0gcm91dGVyLnBsdWdpblJvdXRlKCdjdXN0b21fc2NhbGFycycsICcvc2NhbGFycycpOwogICAgICAgICAgICAgICAgUHJvbWlzZS5hbGwoaXRlbXMubWFwKChpdGVtKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgY29uc3QgcnVuID0gaXRlbTsKICAgICAgICAgICAgICAgICAgICBjb25zdCB0YWcgPSB0aGlzLl90YWdGaWx0ZXI7CiAgICAgICAgICAgICAgICAgICAgY29uc3QgdXJsID0gYWRkUGFyYW1zKGJhc2VVcmwsIHsgdGFnLCBydW4gfSk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMucmVxdWVzdE1hbmFnZXIKICAgICAgICAgICAgICAgICAgICAgICAgLnJlcXVlc3QodXJsKQogICAgICAgICAgICAgICAgICAgICAgICAudGhlbigoZGF0YSkgPT4gdm9pZCBvbkxvYWQoeyBpdGVtLCBkYXRhIH0pKTsKICAgICAgICAgICAgICAgIH0pKS5maW5hbGx5KCgpID0+IHZvaWQgb25GaW5pc2goKSk7CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIHRoaXMuX3J1blRvTmV4dEF2YWlsYWJsZVN5bWJvbEluZGV4ID0ge307CiAgICAgICAgICAgIHRoaXMuX21hdGNoZXNMaXN0T3BlbmVkID0gZmFsc2U7CiAgICAgICAgfQogICAgICAgIHJlbG9hZCgpIHsKICAgICAgICAgICAgdGhpcy4kLmxvYWRlci5yZWxvYWQoKTsKICAgICAgICB9CiAgICAgICAgcmVkcmF3KCkgewogICAgICAgICAgICB0aGlzLiQubG9hZGVyLnJlZHJhdygpOwogICAgICAgIH0KICAgICAgICBfdG9nZ2xlRXhwYW5kZWQoZSkgewogICAgICAgICAgICB0aGlzLnNldCgnX2V4cGFuZGVkJywgIXRoaXMuX2V4cGFuZGVkKTsKICAgICAgICAgICAgdGhpcy5yZWRyYXcoKTsKICAgICAgICB9CiAgICAgICAgX3RvZ2dsZUxvZ1NjYWxlKCkgewogICAgICAgICAgICB0aGlzLnNldCgnX2xvZ1NjYWxlQWN0aXZlJywgIXRoaXMuX2xvZ1NjYWxlQWN0aXZlKTsKICAgICAgICB9CiAgICAgICAgX3Jlc2V0RG9tYWluKCkgewogICAgICAgICAgICBjb25zdCBjaGFydCA9IHRoaXMuJC5sb2FkZXI7CiAgICAgICAgICAgIGlmIChjaGFydCkgewogICAgICAgICAgICAgICAgY2hhcnQucmVzZXREb21haW4oKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBfY3N2VXJsKG5hbWVUb1NlcmllcywgZGF0YVNlcmllc05hbWUpIHsKICAgICAgICAgICAgaWYgKCFkYXRhU2VyaWVzTmFtZSkKICAgICAgICAgICAgICAgIHJldHVybiAnJzsKICAgICAgICAgICAgY29uc3QgYmFzZVVybCA9IHRoaXMuX2Rvd25sb2FkRGF0YVVybChuYW1lVG9TZXJpZXMsIGRhdGFTZXJpZXNOYW1lKTsKICAgICAgICAgICAgcmV0dXJuIGFkZFBhcmFtcyhiYXNlVXJsLCB7IGZvcm1hdDogJ2NzdicgfSk7CiAgICAgICAgfQogICAgICAgIF9qc29uVXJsKG5hbWVUb1NlcmllcywgZGF0YVNlcmllc05hbWUpIHsKICAgICAgICAgICAgaWYgKCFkYXRhU2VyaWVzTmFtZSkKICAgICAgICAgICAgICAgIHJldHVybiAnJzsKICAgICAgICAgICAgY29uc3QgYmFzZVVybCA9IHRoaXMuX2Rvd25sb2FkRGF0YVVybChuYW1lVG9TZXJpZXMsIGRhdGFTZXJpZXNOYW1lKTsKICAgICAgICAgICAgcmV0dXJuIGFkZFBhcmFtcyhiYXNlVXJsLCB7IGZvcm1hdDogJ2pzb24nIH0pOwogICAgICAgIH0KICAgICAgICBfZG93bmxvYWREYXRhVXJsKG5hbWVUb1NlcmllcywgZGF0YVNlcmllc05hbWUpIHsKICAgICAgICAgICAgY29uc3QgZGF0YVNlcmllcyA9IG5hbWVUb1Nlcmllc1tkYXRhU2VyaWVzTmFtZV07CiAgICAgICAgICAgIGNvbnN0IGdldFZhcnMgPSB7CiAgICAgICAgICAgICAgICB0YWc6IGRhdGFTZXJpZXMuZ2V0VGFnKCksCiAgICAgICAgICAgICAgICBydW46IGRhdGFTZXJpZXMuZ2V0UnVuKCksCiAgICAgICAgICAgIH07CiAgICAgICAgICAgIHJldHVybiBhZGRQYXJhbXMoZ2V0Um91dGVyKCkucGx1Z2luUm91dGUoJ2N1c3RvbV9zY2FsYXJzJywgJy9kb3dubG9hZF9kYXRhJyksIGdldFZhcnMpOwogICAgICAgIH0KICAgICAgICBfY3JlYXRlUHJvY2Vzc0RhdGFGdW5jdGlvbigpIHsKICAgICAgICAgICAgLy8gVGhpcyBmdW5jdGlvbiBpcyBjYWxsZWQgd2hlbiBkYXRhIGlzIHJlY2VpdmVkIGZyb20gdGhlIGJhY2tlbmQuCiAgICAgICAgICAgIHJldHVybiAoc2NhbGFyQ2hhcnQsIHJ1biwgZGF0YSkgPT4gewogICAgICAgICAgICAgICAgaWYgKGRhdGEucmVnZXhfdmFsaWQpIHsKICAgICAgICAgICAgICAgICAgICAvLyBUaGUgdXNlcidzIHJlZ3VsYXIgZXhwcmVzc2lvbiB3YXMgdmFsaWQuCiAgICAgICAgICAgICAgICAgICAgLy8gSW5jb3Jwb3JhdGUgdGhlc2UgbmV3bHkgbG9hZGVkIHZhbHVlcy4KICAgICAgICAgICAgICAgICAgICBjb25zdCBuZXdNYXBwaW5nID0gbG9kYXNoLmNsb25lKHRoaXMuX25hbWVUb0RhdGFTZXJpZXMpOwogICAgICAgICAgICAgICAgICAgIGxvZGFzaC5mb3JPd24oZGF0YS50YWdfdG9fZXZlbnRzLCAoc2NhbGFyRXZlbnRzLCB0YWcpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZGF0YSA9IHNjYWxhckV2ZW50cy5tYXAoKGRhdHVtKSA9PiAoewogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2FsbF90aW1lOiBuZXcgRGF0ZShkYXR1bVswXSAqIDEwMDApLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RlcDogZGF0dW1bMV0sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY2FsYXI6IGRhdHVtWzJdLAogICAgICAgICAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHNlcmllc05hbWUgPSBnZW5lcmF0ZURhdGFTZXJpZXNOYW1lKHJ1biwgdGFnKTsKICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZGF0dW0gPSBuZXdNYXBwaW5nW3Nlcmllc05hbWVdOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGF0dW0pIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFRoaXMgc2VyaWVzIGFscmVhZHkgZXhpc3RzLgogICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0dW0uc2V0RGF0YShkYXRhKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChsb2Rhc2guaXNVbmRlZmluZWQodGhpcy5fcnVuVG9OZXh0QXZhaWxhYmxlU3ltYm9sSW5kZXhbcnVuXSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBUaGUgcnVuIGhhcyBub3QgYmVlbiBzZWVuIGJlZm9yZS4gRGVmaW5lIHRoZSBuZXh0IGF2YWlsYWJsZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIG1hcmtlciBpbmRleC4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9ydW5Ub05leHRBdmFpbGFibGVTeW1ib2xJbmRleFtydW5dID0gMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEV2ZXJ5IGRhdGEgc2VyaWVzIHdpdGhpbiBhIHJ1biBoYXMgYSB1bmlxdWUgc3ltYm9sLgogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbGluZUNoYXJ0U3ltYm9sID0gU1lNQk9MU19MSVNUW3RoaXMuX3J1blRvTmV4dEF2YWlsYWJsZVN5bWJvbEluZGV4W3J1bl1dOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQ3JlYXRlIGEgc2VyaWVzIHdpdGggdGhpcyBuYW1lLgogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc2VyaWVzID0gbmV3IERhdGFTZXJpZXMocnVuLCB0YWcsIHNlcmllc05hbWUsIGRhdGEsIGxpbmVDaGFydFN5bWJvbCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdNYXBwaW5nW3Nlcmllc05hbWVdID0gc2VyaWVzOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gTG9vcCBiYWNrIHRvIHRoZSBiZWdpbm5pbmcgaWYgd2UgYXJlIG91dCBvZiBzeW1ib2xzLgogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbnVtU3ltYm9scyA9IFNZTUJPTFNfTElTVC5sZW5ndGg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9ydW5Ub05leHRBdmFpbGFibGVTeW1ib2xJbmRleFtydW5dID0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodGhpcy5fcnVuVG9OZXh0QXZhaWxhYmxlU3ltYm9sSW5kZXhbcnVuXSArIDEpICUgbnVtU3ltYm9sczsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0KCdfbmFtZVRvRGF0YVNlcmllcycsIG5ld01hcHBpbmcpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9OwogICAgICAgIH0KICAgICAgICBfdXBkYXRlQ2hhcnQoKSB7CiAgICAgICAgICAgIHZhciBfbmFtZVRvRGF0YVNlcmllcyA9IHRoaXMuX25hbWVUb0RhdGFTZXJpZXM7CiAgICAgICAgICAgIC8vIEFkZCBuZXcgZGF0YSBzZXJpZXMuCiAgICAgICAgICAgIE9iamVjdC5lbnRyaWVzKF9uYW1lVG9EYXRhU2VyaWVzKS5mb3JFYWNoKChbbmFtZSwgc2VyaWVzXSkgPT4gewogICAgICAgICAgICAgICAgdGhpcy4kLmxvYWRlci5zZXRTZXJpZXNEYXRhKG5hbWUsIHNlcmllcy5nZXREYXRhKCkpOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdGhpcy4kLmxvYWRlci5jb21taXRDaGFuZ2VzKCk7CiAgICAgICAgfQogICAgICAgIF9jb21wdXRlU2VsZWN0ZWRSdW5zU2V0KHJ1bnMpIHsKICAgICAgICAgICAgY29uc3QgbWFwcGluZyA9IHt9OwogICAgICAgICAgICBsb2Rhc2guZm9yRWFjaChydW5zLCAocnVuKSA9PiB7CiAgICAgICAgICAgICAgICBtYXBwaW5nW3J1bl0gPSAxOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgcmV0dXJuIG1hcHBpbmc7CiAgICAgICAgfQogICAgICAgIGdldCBfc2VyaWVzTmFtZXMoKSB7CiAgICAgICAgICAgIGNvbnN0IHJ1bkxvb2t1cCA9IG5ldyBTZXQodGhpcy5ydW5zKTsKICAgICAgICAgICAgcmV0dXJuIE9iamVjdC5lbnRyaWVzKHRoaXMuX25hbWVUb0RhdGFTZXJpZXMpCiAgICAgICAgICAgICAgICAuZmlsdGVyKChbXywgc2VyaWVzXSkgPT4gcnVuTG9va3VwLmhhcyhzZXJpZXMucnVuKSkKICAgICAgICAgICAgICAgIC5tYXAoKFtuYW1lXSkgPT4gbmFtZSk7CiAgICAgICAgfQogICAgICAgIF9kZXRlcm1pbmVDb2xvcihjb2xvclNjYWxlLCBzZXJpZXNOYW1lKSB7CiAgICAgICAgICAgIHJldHVybiBjb2xvclNjYWxlLnNjYWxlKHNlcmllc05hbWUpOwogICAgICAgIH0KICAgICAgICBfcmVmcmVzaERhdGFTZXJpZXMoKSB7CiAgICAgICAgICAgIHZhciBfdGFnRmlsdGVyID0gdGhpcy5fdGFnRmlsdGVyOwogICAgICAgICAgICB0aGlzLnNldCgnX25hbWVUb0RhdGFTZXJpZXMnLCB7fSk7CiAgICAgICAgfQogICAgICAgIF9jcmVhdGVTeW1ib2xGdW5jdGlvbigpIHsKICAgICAgICAgICAgcmV0dXJuIChzZXJpZXNOYW1lKSA9PiB0aGlzLl9uYW1lVG9EYXRhU2VyaWVzW3Nlcmllc05hbWVdLmdldFN5bWJvbCgpLm1ldGhvZCgpOwogICAgICAgIH0KICAgICAgICBfZGV0ZXJtaW5lU3ltYm9sKG5hbWVUb1Nlcmllcywgc2VyaWVzTmFtZSkgewogICAgICAgICAgICByZXR1cm4gbmFtZVRvU2VyaWVzW3Nlcmllc05hbWVdLmdldFN5bWJvbCgpLmNoYXJhY3RlcjsKICAgICAgICB9CiAgICAgICAgZ2V0IF90YWdGaWx0ZXIoKSB7CiAgICAgICAgICAgIHZhciB0YWdSZWdleGVzID0gdGhpcy50YWdSZWdleGVzOwogICAgICAgICAgICBpZiAodGFnUmVnZXhlcy5sZW5ndGggPT09IDEpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0YWdSZWdleGVzWzBdOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIENvbWJpbmUgdGhlIGRpZmZlcmVudCByZWdleGVzIGludG8gYSBzaW5nbGUgcmVnZXguCiAgICAgICAgICAgIHJldHVybiB0YWdSZWdleGVzLm1hcCgocikgPT4gJygnICsgciArICcpJykuam9pbignfCcpOwogICAgICAgIH0KICAgICAgICBfZ2V0VG9nZ2xlTWF0Y2hlc0ljb24obWF0Y2hlc0xpc3RPcGVuZWQpIHsKICAgICAgICAgICAgcmV0dXJuIG1hdGNoZXNMaXN0T3BlbmVkID8gJ2V4cGFuZC1sZXNzJyA6ICdleHBhbmQtbW9yZSc7CiAgICAgICAgfQogICAgICAgIF90b2dnbGVNYXRjaGVzT3BlbigpIHsKICAgICAgICAgICAgdGhpcy5zZXQoJ19tYXRjaGVzTGlzdE9wZW5lZCcsICF0aGlzLl9tYXRjaGVzTGlzdE9wZW5lZCk7CiAgICAgICAgfQogICAgICAgIGdldCBfdGl0bGVEaXNwbGF5U3RyaW5nKCkgewogICAgICAgICAgICB2YXIgdGl0bGUgPSB0aGlzLnRpdGxlOwogICAgICAgICAgICAvLyBJZiBubyB0aXRsZSBpcyBwcm92aWRlZCwgdXNlIGEgcGxhY2Vob2xkZXIgc3RyaW5nLgogICAgICAgICAgICByZXR1cm4gdGl0bGUgfHwgJ3VudGl0bGVkJzsKICAgICAgICB9CiAgICAgICAgX21hdGNoTGlzdEVudHJ5Q29sb3JVcGRhdGVkKGV2ZW50KSB7CiAgICAgICAgICAgIGNvbnN0IGRvbVJlcGVhdCA9IHRoaXMuJCQoJyNtYXRjaC1saXN0LXJlcGVhdCcpOwogICAgICAgICAgICBpZiAoIWRvbVJlcGVhdCkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMucm9vdAogICAgIC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ICAgICAgb24tdGFwPSJfcmVzZXREb21haW4iCiAgICAgICAgdGl0bGU9IkZpdCBkb21haW4gdG8gZGF0YSIKICAgICAgPjwvcGFwZXItaWNvbi1idXR0b24+CiAgICAgIDxzcGFuIHN0eWxlPSJmbGV4LWdyb3c6IDEiPjwvc3Bhbj4KICAgICAgPHRlbXBsYXRlIGlzPSJkb20taWYiIGlmPSJbW3Nob3dEb3dubG9hZExpbmtzXV0iPgogICAgICAgIDxkaXYgY2xhc3M9ImRvd25sb2FkLWxpbmtzIj4KICAgICAgICAgIDxwYXBlci1kcm9wZG93bi1tZW51CiAgICAgICAgICAgIG5vLWxhYmVsLWZsb2F0PSJ0cnVlIgogICAgICAgICAgICBsYWJlbD0ic2VyaWVzIHRvIGRvd25sb2FkIgogICAgICAgICAgICBzZWxlY3RlZC1pdGVtLWxhYmVsPSJ7e19kYXRhU2VyaWVzTmFtZVRvRG93bmxvYWR9fSIKICAgICAgICAgID4KICAgICAgICAgICAgPHBhcGVyLWxpc3Rib3ggY2xhc3M9ImRyb3Bkb3duLWNvbnRlbnQiIHNsb3Q9ImRyb3Bkb3duLWNvbnRlbnQiPgogICAgICAgICAgICAgIDx0ZW1wbGF0ZQogICAgICAgICAgICAgICAgaXM9ImRvbS1yZXBlYXQiCiAgICAgICAgICAgICAgICBpdGVtcz0iW1tfc2VyaWVzTmFtZXNdXSIKICAgICAgICAgICAgICAgIGFzPSJkYXRhU2VyaWVzTmFtZSIKICAgICAgICAgICAgICA+CiAgICAgICAgICAgICAgICA8cGFwZXItaXRlbSBuby1sYWJlbC1mbG9hdD0idHJ1ZSIKICAgICAgICAgICAgICAgICAgPltbZGF0YVNlcmllc05hbWVdXTwvcGFwZXItaXRlbQogICAgICAgICAgICAgICAgPgogICAgICAgICAgICAgIDwvdGVtcGxhdGU+CiAgICAgICAgICAgIDwvcGFwZXItbGlzdGJveD4KICAgICAgICAgIDwvcGFwZXItZHJvcGRvd24tbWVudT4KICAgICAgICAgIDxhCiAgICAgICA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ICA8L2Rpdj4KICAgICAgPHRlbXBsYXRlIGlzPSJkb20taWYiIGlmPSJbW19zZXJpZXNOYW1lcy5sZW5ndGhdXSI+CiAgICAgICAgPGlyb24tY29sbGFwc2Ugb3BlbmVkPSJbW19tYXRjaGVzTGlzdE9wZW5lZF1dIj4KICAgICAgICAgIDxkaXYgaWQ9Im1hdGNoZXMtbGlzdCI+CiAgICAgICAgICAgIDx0ZW1wbGF0ZQogICAgICAgICAgICAgIGlzPSJkb20tcmVwZWF0IgogICAgICAgICAgICAgIGl0ZW1zPSJbW19zZXJpZXNOYW1lc11dIgogICAgICAgICAgICAgIGFzPSJzZXJpZXNOYW1lIgogICAgICAgICAgICAgIGlkPSJtYXRjaC1saXN0LXJlcGVhdCIKICAgICAgICAgICAgICBvbi1kb20tY2hhbmdlPSJfbWF0Y2hMaXN0RW50cnlDb2xvclVwZGF0ZWQiCiAgICAgICAgICAgID4KICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJtYXRjaC1saXN0LWVudHJ5Ij4KICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPSJtYXRjaC1lbnRyeS1zeW1ib2wiPgogICAgICAgICAgICAgICAgICBbW19kZXRlcm1pbmVTeW1ib2woX25hbWVUb0RhdGFTZXJpZXMsIHNlcmllc05hbWUpXV0KICAgICAgICAgICAgICAgIDwvc3Bhbj4KICAgICAgICAgICAgICAgIFtbc2VyaWVzTmFtZV1dCiAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgIDwvdGVtcGxhdGU+CiAgICAgICAgICA8L2Rpdj4KICAgICAgICA8L2lyb24tY29sbGFwc2U+CiAgICAgIDwvdGVtcGxhdGU+CiAgICA8L2Rpdj4KCiAgICA8c3R5bGUgaW5jbHVkZT0idGYtY3VzdG9tLXNjYWxhci1jYXJkLXN0eWxlIj48L3N0eWxlPgogICAgPHN0eWxlPgogICAgICAjbWF0Y2hlcy1saXN0LXRpdGxlIHsKICAgICAgICBtYXJnaW46IDEwcHggMCA1cHggMDsKICAgICAgfQoKICAgICAgI21hdGNoZXMtbGlzdCB7CiAgICAgICAgbWF4LWhlaWdodDogMjAwcHg7CiAgICAgICAgb3ZlcmZsb3cteTogYXV0bzsKICAgICAgfQoKICAgICAgLm1hdGNoLWxpc3QtZW50cnkgewogICAgICAgIG1hcmdpbjogMCAwIDVweCAwOwogICAgICB9CgogICAgICAubWF0Y2gtZW50cnktc3ltYm9sIHsKICAgICAgICBmb250LWZhbWlseTogYXJpYWwsIHNhbnMtc2VyaWY7CiAgICAgICAgZGlzcGxheTogaW5saW5lLWJsb2NrOwogICAgICAgIHdpZHRoOiAxMHB4OwogICAgICB9CgogICAgICAubWF0Y2hlcy10ZXh0IHsKICAgICAgICB2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlOwogICAgICB9CiAgICA8L3N0eWxlPgogIGA7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7IHR5cGU6IEFycmF5IH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgQXJyYXkpCiAgICBdLCBfVGZDdXN0b21TY2FsYXJNdWx0aUxpbmVDaGFydENhcmQucHJvdG90eXBlLCAicnVucyIsIHZvaWQgMCk7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7IHR5cGU6IFN0cmluZyB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIFN0cmluZykKICAgIF0sIF9UZkN1c3RvbVNjYWxhck11bHRpTGluZUNoYXJ0Q2FyZC5wcm90b3R5cGUsICJ4VHlwZSIsIHZvaWQgMCk7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7IHR5cGU6IEJvb2xlYW4gfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBCb29sZWFuKQogICAgXSwgX1RmQ3VzdG9tU2NhbGFyTXVsdGlMaW5lQ2hhcnRDYXJkLnByb3RvdHlwZSw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09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwogICAgbGV0IFRmQ3VzdG9tU2NhbGFyRGFzaGJvYXJkID0gY2xhc3MgVGZDdXN0b21TY2FsYXJEYXNoYm9hcmQgZXh0ZW5kcyBQb2x5bWVyRWxlbWVudCB7CiAgICAgICAgY29uc3RydWN0b3IoKSB7CiAgICAgICAgICAgIHN1cGVyKC4uLmFyZ3VtZW50cyk7CiAgICAgICAgICAgIHRoaXMuX3JlcXVlc3RNYW5hZ2VyID0gbmV3IFJlcXVlc3RNYW5hZ2VyKDUwKTsKICAgICAgICAgICAgdGhpcy5fY2FuY2VsbGVyID0gbmV3IENhbmNlbGxlcigpOwogICAgICAgICAgICB0aGlzLl9zaG93RG93bmxvYWRMaW5rcyA9IGdldEJvb2xlYW5Jbml0aWFsaXplcignX3Nob3dEb3dubG9hZExpbmtzJywgewogICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiBmYWxzZSwKICAgICAgICAgICAgICAgIHVzZUxvY2FsU3RvcmFnZTogdHJ1ZSwKICAgICAgICAgICAgfSkuY2FsbCh0aGlzKTsKICAgICAgICAgICAgdGhpcy5fc21vb3RoaW5nV2VpZ2h0ID0gZ2V0TnVtYmVySW5pdGlhbGl6ZXIoJ19zbW9vdGhpbmdXZWlnaHQnLCB7CiAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWU6IDAuNiwKICAgICAgICAgICAgfSkuY2FsbCh0aGlzKTsKICAgICAgICAgICAgdGhpcy5faWdub3JlWU91dGxpZXJzID0gZ2V0Qm9vbGVhbkluaXRpYWxpemVyKCdfaWdub3JlWU91dGxpZXJzJywgewogICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiB0cnVlLAogICAgICAgICAgICAgICAgdXNlTG9jYWxTdG9yYWdlOiB0cnVlLAogICAgICAgICAgICB9KS5jYWxsKHRoaXMpOwogICAgICAgICAgICB0aGlzLl94VHlwZSA9ICdzdGVwJzsKICAgICAgICAgICAgdGhpcy5fYWN0aXZlID0gdHJ1ZTsKICAgICAgICAgICAgdGhpcy5yZWxvYWRPblJlYWR5ID0gdHJ1ZTsKICAgICAgICAgICAgdGhpcy5fc2hvd0Rvd25sb2FkTGlua3NPYnNlcnZlciA9IGdldEJvb2xlYW5PYnNlcnZlcignX3Nob3dEb3dubG9hZExpbmtzJywgewogICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiBmYWxzZSwKICAgICAgICAgICAgICAgIHVzZUxvY2FsU3RvcmFnZTogdHJ1ZSwKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHRoaXMuX3Ntb290aGluZ1dlaWdodE9ic2VydmVyID0gZ2V0TnVtYmVyT2JzZXJ2ZXIoJ19zbW9vdGhpbmdXZWlnaHQnLCB7CiAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWU6IDAuNiwKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHRoaXMuX2lnbm9yZVlPdXRsaWVyc09ic2VydmVyID0gZ2V0Qm9vbGVhbk9ic2VydmVyKCdfaWdub3JlWU91dGxpZXJzJywgewogICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiB0cnVlLAogICAgICAgICAgICAgICAgdXNlTG9jYWxTdG9yYWdlOiB0cnVlLAogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgcmVhZHkoKSB7CiAgICAgICAgICAgIHN1cGVyLnJlYWR5KCk7CiAgICAgICAgICAgIGlmICh0aGlzLnJlbG9hZE9uUmVhZHkpCiAgICAgICAgICAgICAgICB0aGlzLnJlbG9hZCgpOwogICAgICAgIH0KICAgICAgICByZWxvYWQoKSB7CiAgICAgICAgICAgIGNvbnN0IHVybCA9IGdldFJvdXRlcigpLnBsdWdpbnNMaXN0aW5nKCk7CiAgICAgICAgICAgIGNvbnN0IGhhbmRsZVBsdWdpbnNMaXN0aW5nUmVzcG9uc2UgPSB0aGlzLl9jYW5jZWxsZXIuY2FuY2VsbGFibGUoKHJlc3VsdCkgPT4gewogICAgICAgICAgICAgICAgaWYgKHJlc3VsdC5jYW5jZWxsZWQpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLnNldCgnX2RhdGFOb3RGb3VuZCcsICFyZXN1bHQudmFsdWVbJ2N1c3RvbV9zY2FsYXJzJ10pOwogICAgICAgICAgICAgICAgaWYgKHRoaXMuX2RhdGFOb3RGb3VuZCkgewogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuX3JldHJpZXZlTGF5b3V0QW5kRGF0YSgpOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdGhpcy5fcmVxdWVzdE1hbmFnZXIucmVxdWVzdCh1cmwpLnRoZW4oaGFuZGxlUGx1Z2luc0xpc3RpbmdSZXNwb25zZSk7CiAgICAgICAgfQogICAgICAgIF9yZWxvYWRDaGFydHMoKSB7CiAgICAgICAgICAgIGNvbnN0IGNoYXJ0cyA9IHRoaXMucm9vdC5xdWVyeVNlbGVjdG9yQWxsKCd0Zi1jdXN0b20tc2NhbGFyLW1hcmdpbi1jaGFydC1jYXJkLCAnICsKICAgICAgICAgICAgICAgICd0Zi1jdXN0b20tc2NhbGFyLW11bHRpLWxpbmUtY2hhcnQtY2FyZCcpOwogICAgICAgICAgICBjaGFydHMuZm9yRWFjaCgoY2hhcnQpID0+IHsKICAgICAgICAgICAgICAgIGNoYXJ0LnJlbG9hZCgpOwogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgX3JldHJpZXZlTGF5b3V0QW5kRGF0YSgpIHsKICAgICAgICAgICAgY29uc3QgdXJsID0gZ2V0Um91dGVyKCkucGx1Z2luUm91dGUoJ2N1c3RvbV9zY2FsYXJzJywgJy9sYXlvdXQnKTsKICAgICAgICAgICAgY29uc3QgdXBkYXRlID0gdGhpcy5fY2FuY2VsbGVyLmNhbmNlbGxhYmxlKChyZXN1bHQpID0+IHsKICAgICAgICAgICAgICAgIGlmIChyZXN1bHQuY2FuY2VsbGVkKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLy8gVGhpcyBwbHVnaW4gaXMgb25seSBhY3RpdmUgaWYgZGF0YSBpcyBhdmFpbGFibGUuCiAgICAgICAgICAgICAgICB0aGlzLnNldCgnX2xheW91dCcsIHJlc3VsdC52YWx1ZSk7CiAgICAgICAgICAgICAgICBpZiAoIXRoaXMuX2RhdGFOb3RGb3VuZCkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX3JlbG9hZENoYXJ0cygpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdGhpcy5fcmVxdWVzdE1hbmFnZXIucmVxdWVzdCh1cmwpLnRoZW4odXBkYXRlKTsKICAgICAgICB9CiAgICAgICAgZ2V0IF9zbW9vdGhpbmdFbmFibGVkKCkgewogICAgICAgICAgICB2YXIgX3Ntb290aGluZ1dlaWdodCA9IHRoaXMuX3Ntb290aGluZ1dlaWdodDsKICAgICAgICAgICAgcmV0dXJuIF9zbW9vdGhpbmdXZWlnaHQgPiAwOwogICAgICAgIH0KICAgICAgICBnZXQgX2NhdGVnb3JpZXMoKSB7CiAgICAgICAgICAgIHZhciBsYXlvdXQgPSB0aGlzLl9sYXlvdXQ7CiAgICAgICAgICAgIGlmICghbGF5b3V0LmNhdGVnb3J5KSB7CiAgICAgICAgICAgICAgICByZXR1cm4gW107CiAgICAgICAgICAgIH0KICAgICAgICAgICAgbGV0IGZpcnN0VGltZUxvYWQgPSBmYWxzZTsKICAgICAgICAgICAgaWYgKCF0aGlzLl9vcGVuZWRDYXRlZ29yaWVzKSB7CiAgICAgICAgICAgICAgICAvLyBUaGlzIGlzIHRoZSBmaXJzdCB0aW1lIHRoZSB1c2VyIGxvYWRzIHRoZSBjYXRlZ29yaWVzLiBTdGFydCBzdG9yaW5nCiAgICAgICAgICAgICAgICAvLyB3aGljaCBjYXRlZ29yaWVzIGFyZSBvcGVuLgogICAgICAgICAgICAgICAgZmlyc3RUaW1lTG9hZCA9IHRydWU7CiAgICAgICAgICAgICAgICB0aGlzLl9vcGVuZWRDYXRlZ29yaWVzID0ge307CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY29uc3QgY2F0ZWdvcmllcyA9IGxheW91dC5jYXRlZ29yeS5tYXAoKGNhdGVnb3J5KSA9PiB7CiAgICAgICAgICAgICAgICBpZiAoZmlyc3RUaW1lTG9hZCAmJiAhY2F0ZWdvcnkgLyogPz8/ICovLmNsb3NlZCkgewogICAgICAgICAgICAgICAgICAgIC8vIFJlbWVtYmVyIHdoZXRoZXIgdGhpcyBjYXRlZ29yeSBpcyBjdXJyZW50bHkgb3Blbi4KICAgICAgICAgICAgICAgICAgICB0aGlzLl9vcGVuZWRDYXRlZ29yaWVzW2NhdGVnb3J5LnRpdGxlXSA9IHRydWU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgICAgIG5hbWU6IGNhdGVnb3J5LnRpdGxlLAogICAgICAgICAgICAgICAgICAgIGl0ZW1zOiBjYXRlZ29yeS5jaGFydCwKICAgICAgICAgICAgICAgICAgICBtZXRhZGF0YTogewogICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBDYXRlZ29yeVR5cGUuUFJFRklYX0dST1VQLAogICAgICAgICAgICAgICAgICAgICAgICBvcGVuZWQ6ICEhdGhpcy5fb3BlbmVkQ2F0ZWdvcmllc1tjYXRlZ29yeS50aXRsZV0sCiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICByZXR1cm4gY2F0ZWdvcmllczsKICAgICAgICB9CiAgICAgICAgX2NhdGVnb3J5T3BlbmVkVG9nZ2xlZChldmVudCkgewogICAgICAgICAgICBjb25zdCBwYW5lID0gZXZlbnQudGFyZ2V0OwogICAgICAgICAgICBpZiAocGFuZS5vcGVuZWQpIHsKICAgICAgICAgICAgICAgIHRoaXMuX29wZW5lZENhdGVnb3JpZXNbcGFuZS5jYXRlZ29yeS5uYW1lXSA9IHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBkZWxldGUgdGhpcy5fb3BlbmVkQ2F0ZWdvcmllc1twYW5lLmNhdGVnb3J5Lm5hbWVdOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfTsKICAgIFRmQ3VzdG9tU2NhbGFyRGFzaGJvYXJkLnRlbXBsYXRlID0gaHRtbCBgCiAgICA8dGYtZGFzaGJvYXJkLWxheW91dD4KICAgICAgPGRpdiBjbGFzcz0ic2lkZWJhciIgc2xvdD0ic2lkZWJhciI+CiAgICAgICAgPGRpdiBjbGFzcz0ic2V0dGluZ3MiPgogICAgICAgICAgPGRpdiBjbGFzcz0ic2lkZWJhci1zZWN0aW9uIj4KICAgICAgICAgICAgPGRpdiBjbGFzcz0ibGluZS1pdGVtIj4KICAgICAgICAgICAgICA8cGFwZXItY2hlY2tib3ggY2hlY2tlZD0ie3tfc2hvd0Rvd25sb2FkTGlua3N9fSIKICAgICAgICAgICAgICAgID5TaG93IGRhdGEgZG93bmxvYWQgbGlua3M8L3BhcGVyLWNoZWNrYm94CiAgICAgICAgICAgICAgPgogICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgPGRpdiBjbGFzcz0ibGluZS1pdGVtIj4KICAgICAgICAgICAgICA8cGFwZXItY2hlY2tib3ggY2hlY2tlZD0ie3tfaWdub3JlWU91dGxpZXJzfX0iCiAgICAgICAgICAgICAgICA+SWdub3JlIG91dGxpZXJzIGluIGNoYXJ0IHNjYWxpbmc8L3BhcGVyLWNoZWNrYm94CiAgICAgICAgICAgICAgPgogICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgPGRpdiBpZD0idG9vbHRpcC1zb3J0aW5nIj4KICAgICAgICAgICAgICA8ZGl2IGlkPSJ0b29sdGlwLXNvcnRpbmctbGFiZWwiPlRvb2x0aXAgc29ydGluZyBtZXRob2Q6PC9kaXY+CiAgICAgICAgICAgICAgPHBhcGVyLWRyb3Bkb3duLW1lbnUKICAgICAgICAgICAgICAgIG5vLWxhYmVsLWZsb2F0PSIiCiAgICAgICAgICAgICAgICBzZWxlY3RlZC1pdGVtLWxhYmVsPSJ7e190b29sdGlwU29ydGluZ01ldGhvZH19IgogICAgICAgICAgICAgID4KICAgICAgICAgICAgICAgIDxwYXBlci1saXN0Ym94CiAgICAgICAgICAgICAgICAgIGNsYXNzPSJkcm9wZG93bi1jb250ZW50IgogICAgICAgICAgICAgICAgICBzZWxlY3RlZD0iMCIKICAgICAgICAgICAgICAgICAgc2xvdD0iZHJvcGRvd24tY29udGVudCIKICAgICAgICAgICAgICAgID4KICAgICAgICAgICAgICAgICAgPHBhcGVyLWl0ZW0+ZGVmYXVsdDwvcGFwZXItaXRlbT4KICAgICAgICAgICAgICAgICAgPHBhcGVyLWl0ZW0+ZGVzY2VuZGluZzwvcGFwZXItaXRlbT4KICAgICAgICAgICAgICAgICAgPHBhcGVyLWl0ZW0+YXNjZW5kaW5nPC9wYXBlci1pdGVtPgogICAgICAgICAgICAgICAgICA8cGFwZXItaXRlbT5uZWFyZXN0PC9wYXBlci1pdGVtPgogICAgICAgICAgICAgICAgPC9wYXBlci1saXN0Ym94PgogICAgICAgICAgICAgIDwvcGFwZXItZHJvcGRvd24tbWVudT4KICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICA8L2Rpdj4KICAgICAgICAgIDxkaXYgY2xhc3M9InNpZGViYXItc2VjdGlvbiI+CiAgICAgICAgICAgIDx0Zi1zbW9vdGhpbmctaW5wdXQKICAgICAgICAgICAgICB3ZWlnaHQ9Int7X3Ntb290aGluZ1dlaWdodH19IgogICAgICAgICAgICAgIHN0ZXA9IjAuMDAxIgogICAgICAgICAgICAgIG1pbj0iMCIKICAgICAgICAgICAgICBtYXg9IjEiCiAg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FyX3BiKGxheW91dF9wYjIuTGF5b3V0KAogIGNhdGVnb3J5PVsKICAgIGxheW91dF9wYjIuQ2F0ZWdvcnkoCiAgICAgIHRpdGxlPSdsb3NzZXMnLAogICAgICBjaGFydD1bCiAgICAgICAgICBsYXlvdXRfcGIyLkNoYXJ0KAogICAgICAgICAgICAgIHRpdGxlPSdsb3NzZXMnLAogICAgICAgICAgICAgIG11bHRpbGluZT1sYXlvdXRfcGIyLk11bHRpbGluZUNoYXJ0Q29udGVudCgKICAgICAgICAgICAgICAgIHRhZz1bcidsb3NzLionXSwKICAgICAgICAgICAgICApKSwKICAgICAgICAgIGxheW91dF9wYjIuQ2hhcnQoCiAgICAgICAgICAgICAgdGl0bGU9J2JheicsCiAgICAgICAgICAgICAgbWFyZ2luPWxheW91dF9wYjIuTWFyZ2luQ2hhcnRDb250ZW50KAogICAgICAgICAgICAgICAgc2VyaWVzPVsKICAgICAgICAgICAgICAgICAgbGF5b3V0X3BiMi5NYXJnaW5DaGFydENvbnRlbnQuU2VyaWVzKAogICAgICAgICAgICAgICAgICAgIHZhbHVlPSdsb3NzL2Jhei9zY2FsYXJfc3VtbWFyeScsCiAgICAgICAgICAgICAgICAgICAgbG93ZXI9J2Jhel9sb3dlci9iYXovc2NhbGFyX3N1bW1hcnknLAogICAgICAgICAgICAgICAgICAgIHVwcGVyPSdiYXpfdXBwZXIvYmF6L3NjYWxhcl9zdW1tYXJ5JyksCiAgICAgICAgICAgICAgICBdLAogICAgICAgICAgICAgICkpLAogICAgICBdKSwKICAgIGxheW91dF9wYjIuQ2F0ZWdvcnkoCiAgICAgIHRpdGxlPSd0cmlnIGZ1bmN0aW9ucycsCiAgICAgIGNoYXJ0PVsKICAgICAgICAgIGxheW91dF9wYjIuQ2hhcnQoCiAgICAgICAgICAgICAgdGl0bGU9J3dhdmUgdHJpZyBmdW5jdGlvbnMnLAogICAgICAgICAgICAgIG11bHRpbGluZT1sYXlvdXRfcGIyLk11bHRpbGluZUNoYXJ0Q29udGVudCgKICAgICAgICAgICAgICAgIHRhZz1bcid0cmlnRnVuY3Rpb25zL2Nvc2luZScsIHIndHJpZ0Z1bmN0aW9ucy9zaW5lJ10sCiAgICAgICAgICAgICAgKSksCiAgICAgICAgICAjIFRoZSByYW5nZSBvZiB0YW5nZW50IGlzIGRpZmZlcmVudC4gTGV0J3MgZ2l2ZSBpdCBpdHMgb3duIGNoYXJ0LgogICAgICAgICAgbGF5b3V0X3BiMi5DaGFydCgKICAgICAgICAgICAgICB0aXRsZT0ndGFuJywKICAgICAgICAgICAgICBtdWx0aWxpbmU9bGF5b3V0X3BiMi5NdWx0aWxpbmVDaGFydENvbnRlbnQoCiAgICAgICAgICAgICAgICB0YWc9W3IndHJpZ0Z1bmN0aW9ucy90YW5nZW50J10sCiAgICAgICAgICAgICAgKSksCiAgICAgIF0sCiAgICAgICMgVGhpcyBjYXRlZ29yeSB3ZSBjYXJlIGxlc3MgYWJvdXQuIExldCdzIG1ha2UgaXQgaW5pdGlhbGx5IGNsb3NlZC4KICAgICAgY2xvc2VkPVRydWUpLAogIF0pKQp3cml0ZXIuYWRkX3N1bW1hcnkobGF5b3V0X3N1bW1hcnkpCjwvcHJlCiAgICAgICAgICAgID4KICAgICAgICAgICAgPHA+CiAgICAgICAgICAgICAgSWYgeW914oCZcmUgbmV3IHRvIHVzaW5nIFRlbnNvckJvYXJkLCBhbmQgd2FudCB0byBmaW5kIG91dCBob3cgdG8KICAgICAgICAgICAgICBhZGQgZGF0YSBhbmQgc2V0IHVwIHlvdXIgZXZlbnQgZmlsZXMsIGNoZWNrIG91dCB0aGUKICAgICAgICAgICAgICA8YQogICAgICAgICAgICAgICAgaHJlZj0iaHR0cHM6Ly9naXRodWIuY29tL3RlbnNvcmZsb3cvdGVuc29yYm9hcmQvYmxvYi9tYXN0ZXIvUkVBRE1FLm1kIgogICAgICAgICAgICAgICAgPlJFQURNRTwvYQogICAgICAgICAgICAgID4KICAgICAgICAgICAgICBhbmQgcGVyaGFwcyB0aGUKIC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CiAgICAgICAgICAgICAgICAgICAgdGl0bGU9IltbY2hhcnQudGl0bGVdXSIKICAgICAgICAgICAgICAgICAgICB4LXR5cGU9IltbX3hUeXBlXV0iCiAgICAgICAgICAgICAgICAgICAgc21vb3RoaW5nLWVuYWJsZWQ9IltbX3Ntb290aGluZ0VuYWJsZWRdXSIKICAgICAgICAgICAgICAgICAgICBzbW9vdGhpbmctd2VpZ2h0PSJbW19zbW9vdGhpbmdXZWlnaHRdXSIKICAgICAgICAgICAgICAgICAgICB0b29sdGlwLXNvcnRpbmctbWV0aG9kPSJbW3Rvb2x0aXBTb3J0aW5nTWV0aG9kXV0iCiAgICAgICAgICAgICAgICAgICAgaWdub3JlLXktb3V0bGllcnM9IltbX2lnbm9yZVlPdXRsaWVyc11dIgogICAgICAgICAgICAgICAgICAgIHNob3ctZG93bmxvYWQtbGlua3M9IltbX3Nob3dEb3dubG9hZExpbmtzXV0iCiAgICAgICAgICAgICAgICAgICAgdGFnLXJlZ2V4ZXM9IltbY2hhcnQubXVsdGlsaW5lLnRhZ11dIgogICAgICAgICAgICAgICAgICA+PC90Zi1jdXN0b20tc2NhbGFyLW11bHRpLWxpbmUtY2hhcnQtY2FyZD4KICAgICAgICAgICAgICAgIDwvdGVtcGxhdGU+CiAgICAgICAgICAgICAgICA8dGVtcGxhdGUgaXM9ImRvbS1pZiIgaWY9IltbY2hhcnQubWFyZ2luXV0iPgogICAgICAgICAgICAgICAgICA8dGYtY3VzdG9tLXNjYWxhci1tYXJnaW4tY2hhcnQtY2FyZAogICAgICAgICAgICAgICAgICAgIGFjdGl2ZT0iW1thY3RpdmVdXSIKICAgICAgICAgICAgICAgICAgICByZXF1ZXN0LW1hbmFnZXI9IltbX3JlcXVlc3RNYW5hZ2VyXV0iCiAgICAgICAgICAgICAgICAgICAgcnVucz0iW1tfc2VsZWN0ZWRSdW5zXV0iCiAgICAgICAgICAgICAgICAgICAgdGl0bGU9IltbY2hhcnQudGl0bGVdXSIKICAgICAgICAgICAgICAgICAgICB4LXR5cGU9IltbX3hUeXBlXV0iCiAgICAgICAgICAgICAgICAgICAgdG9vbHRpcC1zb3J0aW5nLW1ldGhvZD0iW1t0b29sdGlwU29ydGluZ01ldGhvZF1dIgogICAgICAgICAgICAgICAgICAgIGlnbm9yZS15LW91dGxpZXJzPSJbW19pZ25vcmVZT3V0bGllcnNdXSIKICAgICAgICAgICAgICAgICAgICBzaG93LWRvd25sb2FkLWxpbmtzPSJbW19zaG93RG93bmxvYWRMaW5rc11dIgogICAgICAgICAgICAgICAgICAgIG1hcmdpbi1jaGFydC1zZXJpZXM9IltbY2hhcnQubWFyZ2luLnNlcmllc11dIgogICAgICAgICAgICAgICAgICA+PC90Zi1jdXN0b20tc2NhbGFyLW1hcmdpbi1jaGFydC1jYXJkPgogICAgICAgICAgICAgICAgPC90ZW1wbGF0ZT4KICAgICAgICAgICAgICA8L3RlbXBsYXRlPgogICAgICAgICAgICA8L3RmLWNhdGVnb3J5LXBhZ2luYXRlZC12aWV3PgogICAgICAgICAgPC90ZW1wbGF0ZT4KICAgICAgICA8L3RlbXBsYXRlPgogICAgICA8L2Rpdj4KICAgIDwvdGYtZGFzaGJvYXJkLWxheW91dD4KCiAgICA8c3R5bGUgaW5jbHVkZT0iZGFzaGJvYXJkLXN0eWxlIj48L3N0eWxlPgogICAgPHN0eWxlPgogICAgICAjdG9vbHRpcC1zb3J0aW5nIHsKICAgICAgICBhbGlnbi1pdGVtczogY2VudGVyOwogICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAgZm9udC1zaXplOiAxNHB4OwogICAgICAgIG1hcmdpbi10b3A6IDE1cHg7CiAgICAgIH0KICAgICAgI3Rvb2x0aXAtc29ydGluZyBwYXBlci1kcm9wZG93bi1tZW51IHsKICAgICAgICBtYXJnaW4tbGVmdDogMTBweDsKICAgICAgICAtLXBhcGVyLWlucHV0LWNvbnRhaW5lci1mb2N1cy1jb2xvcjogdmFyKC0tdGItb3JhbmdlLXN0cm9uZyk7CiAgICAg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bGF3IG9yIGFncmVlZCB0byBpbiB3cml0aW5nLCBzb2Z0d2FyZQogICAgZGlzdHJpYnV0ZWQgdW5kZXIgdGhlIExpY2Vuc2UgaXMgZGlzdHJpYnV0ZWQgb24gYW4gIkFTIElTIiBCQVNJUywKICAgIFdJVEhPVVQgV0FSUkFOVElFUyBPUiBDT05ESVRJT05TIE9GIEFOWSBLSU5ELCBlaXRoZXIgZXhwcmVzcyBvciBpbXBsaWVkLgogICAgU2VlIHRoZSBMaWNlbnNlIGZvciB0aGUgc3BlY2lmaWMgbGFuZ3VhZ2UgZ292ZXJuaW5nIHBlcm1pc3Npb25zIGFuZAogICAgbGltaXRhdGlvbnMgdW5kZXIgdGhlIExpY2Vuc2UuCiAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwogICAgY2xhc3MgRGlzdHJpYnV0aW9uQ2hhcnQgewogICAgICAgIGNvbnN0cnVjdG9yKHhUeXBlLCBjb2xvclNjYWxlKSB7CiAgICAgICAgICAgIHRoaXMucnVuMmRhdGFzZXRzID0ge307CiAgICAgICAgICAgIHRoaXMuY29sb3JTY2FsZSA9IGNvbG9yU2NhbGU7CiAgICAgICAgICAgIHRoaXMuYnVpbGRDaGFydCh4VHlwZSk7CiAgICAgICAgfQogICAgICAgIGdldERhdGFzZXQocnVuKSB7CiAgICAgICAgICAgIGlmICh0aGlzLnJ1bjJkYXRhc2V0c1tydW5dID09PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgICAgIHRoaXMucnVuMmRhdGFzZXRzW3J1bl0gPSBuZXcgc3JjJDIuRGF0YXNldChbXSwgeyBydW46IHJ1biB9KTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpcy5ydW4yZGF0YXNldHNbcnVuXTsKICAgICAgICB9CiAgICAgICAgYnVpbGRDaGFydCh4VHlwZSkgewogICAgICAgICAgICBpZiAodGhpcy5vdXRlcikgewogICAgICAgICAgICAgICAgdGhpcy5vdXRlci5kZXN0cm95KCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgbGV0IHhDb21wb25lbnRzID0gZ2V0WENvbXBvbmVudHMoeFR5cGUpOwogICAgICAgICAgICB0aGlzLnhBY2Nlc3NvciA9IHhDb21wb25lbnRzLmFjY2Vzc29yOwogICAgICAgICAgICB0aGlzLnhTY2FsZSA9IHhDb21wb25lbnRzLnNjYWxlOwogICAgICAgICAgICB0aGlzLnhBeGlzID0geENvbXBvbmVudHMuYXhpczsKICAgICAgICAgICAgdGhpcy54QXhpcy5tYXJnaW4oMCk7CiAgICAgICAgICAgIHRoaXMueEF4aXMudGlja0xhYmVsUGFkZGluZygzKTsKICAgICAgICAgICAgdGhpcy55U2NhbGUgPSBuZXcgc3JjJDIuU2NhbGVzLkxpbmVhcigpOwogICAgICAgICAgICB0aGlzLnlBeGlzID0gbmV3IHNyYyQyLkF4ZXMuTnVtZXJpYyh0aGlzLnlTY2FsZSwgJ2xlZnQnKTsKICAgICAgICAgICAgbGV0IHlGb3JtYXR0ZXIgPSBtdWx0aXNjYWxlRm9ybWF0dGVyKFlfQVhJU19GT1JNQVRURVJfUFJFQ0lTSU9OKTsKICAgICAgICAgICAgdGhpcy55QXhpcy5tYXJnaW4oMCkudGlja0xhYmVsUGFkZGluZyg1KS5mb3JtYXR0ZXIoeUZvcm1hdHRlcik7CiAgICAgICAgICAgIHRoaXMueUF4aXMudXNlc1RleHRXaWR0aEFwcHJveGltYXRpb24odHJ1ZSk7CiAgICAgICAgICAgIGxldCBjZW50ZXIgPSB0aGlzLmJ1aWxkUGxvdCh0aGlzLnhBY2Nlc3NvciwgdGhpcy54U2NhbGUsIHRoaXMueVNjYWxlKTsKICAgICAgICAgICAgdGhpcy5ncmlkbGluZXMgPSBuZXcgc3JjJDIuQ29tcG9uZW50cy5HcmlkbGluZXModGhpcy54U2NhbGUsIHRoaXMueVNjYWxlKTsKICAgICAgICAgICAgdGhpcy5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JzW2kgKyAxXTsKICAgICAgICAgICAgICAgIGxldCB5ID0gaSA+IG1lZGlhbiA/IGFjY2Vzc29yc1tpICsgMV0gOiBhY2Nlc3NvcnNbaV07CiAgICAgICAgICAgICAgICBwLnkoeSwgeVNjYWxlKTsKICAgICAgICAgICAgICAgIHAueTAoeTApOwogICAgICAgICAgICAgICAgcC5hdHRyKCdmaWxsJywgKGQsIGksIGRhdGFzZXQpID0+IHRoaXMuY29sb3JTY2FsZS5zY2FsZShkYXRhc2V0Lm1ldGFkYXRhKCkucnVuKSk7CiAgICAgICAgICAgICAgICBwLmF0dHIoJ3N0cm9rZScsIChkLCBpLCBkYXRhc2V0KSA9PiB0aGlzLmNvbG9yU2NhbGUuc2NhbGUoZGF0YXNldC5tZXRhZGF0YSgpLnJ1bikpOwogICAgICAgICAgICAgICAgcC5hdHRyKCdzdHJva2Utd2VpZ2h0JywgKGQsIGksIG0pID0+ICcwLjVweCcpOwogICAgICAgICAgICAgICAgcC5hdHRyKCdzdHJva2Utb3BhY2l0eScsICgpID0+IG9wYWNpdGllc1tpXSk7CiAgICAgICAgICAgICAgICBwLmF0dHIoJ2ZpbGwtb3BhY2l0eScsICgpID0+IG9wYWNpdGllc1tpXSk7CiAgICAgICAgICAgICAgICByZXR1cm4gcDsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGxldCBtZWRpYW5QbG90ID0gbmV3IHNyYyQyLlBsb3RzLkxpbmUoKTsKICAgICAgICAgICAgbWVkaWFuUGxvdC54KHhBY2Nlc3NvciwgeFNjYWxlKTsKICAgICAgICAgICAgbWVkaWFuUGxvdC55KG1lZGlhbkFjY2Vzc29yLCB5U2NhbGUpOwogICAgICAgICAgICBtZWRpYW5QbG90LmF0dHIoJ3N0cm9rZScsIChkLCBpLCBtKSA9PiB0aGlzLmNvbG9yU2NhbGUuc2NhbGUobS5ydW4pKTsKICAgICAgICAgICAgdGhpcy5wbG90cyA9IHBsb3RzOwogICAgICAgICAgICByZXR1cm4gbmV3IHNyYyQyLkNvbXBvbmVudHMuR3JvdXAocGxvdHMpOwogICAgICAgIH0KICAgICAgICBzZXRWaXNpYmxlU2VyaWVzKHJ1bnMpIHsKICAgICAgICAgICAgdGhpcy5ydW5zID0gcnVuczsKICAgICAgICAgICAgbGV0IGRhdGFzZXRzID0gcnVucy5tYXAoKHIpID0+IHRoaXMuZ2V0RGF0YXNldChyKSk7CiAgICAgICAgICAgIHRoaXMucGxvdHMuZm9yRWFjaCgocCkgPT4gcC5kYXRhc2V0cyhkYXRhc2V0cykpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZXQgdGhlIGRhdGEgb2YgYSBzZXJpZXMgb24gdGhlIGNoYXJ0LgogICAgICAgICAqLwogICAgICAgIHNldFNlcmllc0RhdGEobmFtZSwgZGF0YSkgewogICAgICAgICAgICB0aGlzLmdldERhdGFzZXQobmFtZSkuZGF0YShkYXRhKTsKICAgICAgICB9CiAgICAgICAgcmVuZGVyVG8odGFyZ2V0U1ZHKSB7CiAgICAgICAgICAgIHRoaXMudGFyZ2V0U1ZHID0gdGFyZ2V0U1ZHOwogICAgICAgICAgICB0aGlzLm91dGVyLnJlbmRlclRvKHRhcmdldFNWRyk7CiAgICAgICAgfQogICAgICAgIHJlZHJhdygpIHsKICAgICAgICAgICAgdGhpcy5vdXRlci5yZWRyYXcoKTsKICAgICAgICB9CiAgICAgICAgZGVzdHJveSgpIHsKICAgICAgICAgICAgdGhpcy5vdXRlci5kZXN0cm95KCk7CiAgICAgICAgfQogICAgfQogICAgbGV0IF9WekRpc3RyaWJ1dGlvbkNoYXJ0ID0gY2xhc3MgX1Z6RGlzdHJpYnV0aW9uQ2hhcnQgZXh0ZW5kcyBMZWdhY3lFbGVtZW50TWl4aW4oUG9seW1lckVsZW1lbnQpIHsKICAgICAgICBjb25zdHJ1Y3RvcigpIHsKICAgICAgICAgICAgc3VwZXIoLi4uYXJndW1lbnRzKTsKICAgICAgICAgICAgdGhpcy5jb2xvclNjYWxlID0gbmV3IHNyYyQyLlNjYWxlcy5Db2xvcigpLnJhbmdlKGNhdGVnb3J5MTAuc2xpY2UoKSk7CiAgICAgICAgICAgIHRoaXMueFR5cGUgPSAnc3RlcCc7CiAgICAgICAgICAgIHRoaXMuX3Zpc2libGVTZXJpZXNDYWNoZSA9IFtdOwogICAgICAgICAgICB0aGlzLl9zZXJpZXNEYXRhQ2FjaGUgPSB7fTsKICAgICAgICAgICAgdGhpcy5fbWFrZUNoYXJ0QXN5bmNDYWxsYmFja0lkID0gbnVsbDsKICAgICAgICB9CiAgICAgICAgc2V0VmlzaWJsZVNlcmllcyhuYW1lcykgewogICAgICAgICAgICB0aGlzLl92aXNpYmxlU2VyaWVzQ2FjaGUgPSBuYW1lczsKICAgICAgICAgICAgaWYgKHRoaXMuX2NoYXJ0KSB7CiAgICAgICAgICAgICAgICB0aGlzLl9jaGFydC5zZXRWaXNpYmxlU2VyaWVzKG5hbWVzKTsKICAgICAgICAgICAgICAgIHRoaXMucmVkcmF3KCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgc2V0U2VyaWVzRGF0YShuYW1lLCBkYXRhKSB7CiAgICAgICAgICAgIHRoaXMuX3Nlcmllc0RhdGFDYWNoZVtuYW1lXSA9IGRhdGE7CiAgICAgICAgICAgIGlmICh0aGlzLl9jaGFydCkgewogICAgICAgICAgICAgICAgdGhpcy5fY2hhcnQuc2V0U2VyaWVzRGF0YShuYW1lLCBkYXRhKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZWRyYXcoKSB7CiAgICAgICAgICAgIHRoaXMuX2NoYXJ0LnJlZHJhdygpOwogICAgICAgIH0KICAgICAgICBfbWFrZUNoYXJ0KCkgewogICAgICAgICAgICB2YXIgeFR5cGUgPSB0aGlzLnhUeXBlOwogICAgICAgICAgICB2YXIgY29sb3JTY2FsZSA9IHRoaXMuY29sb3JTY2FsZTsKICAgICAgICAgICAgdmFyIF9hdHRhY2hlZCA9IHRoaXMuX2F0dGFjaGVkOwogICAgICAgICAgICBpZiAodGhpcy5fbWFrZUNoYXJ0QXN5bmNDYWxsYmFja0lkID09PSBudWxsKSB7CiAgICAgICAgICAgICAgICB0aGlzLmNhbmNlbEFzeW5jKHRoaXMuX21ha2VDaGFydEFzeW5jQ2FsbGJhY2tJZCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fbWFrZUNoYXJ0QXN5bmNDYWxsYmFja0lkID0gdGhpcy5hc3luYyhmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9tYWtlQ2hhcnRBc3luY0NhbGxiYWNrSWQgPSBudWxsOwogICAgICAgICAgICAgICAgaWYgKCFfYXR0YWNoZWQpCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgaWYgKHRoaXMuX2NoYXJ0KQogICAgICAgICAgICAgICAgICAgIHRoaXMuX2NoYXJ0LmRlc3Ryb3koKTsKICAgICAgICAgICAgICAgIHZhciBjaGFydCA9IG5ldyBEaXN0cmlidXRpb25DaGFydCh4VHlwZSwgY29sb3JTY2FsZSk7CiAgICAgICAgICAgICAgICB2YXIgc3ZnID0gc2VsZWN0KHRoaXMuJC5jaGFydGRpdik7CiAgICAgICAgICAgICAgICBjaGFydC5yZW5kZXJUbyhzdmcpOwogICAgICAgICAgICAgICAgdGhpcy5fY2hhcnQgPSBjaGFydDsKICAgICAgICAgICAgfSwgMzUwKTsKICAgICAgICB9CiAgICAgICAgX3JlbG9hZEZyb21DYWNoZSgpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX2NoYXJ0KSB7CiAgICAgICAgICAgICAgICB0aGlzLl9jaGFydC5zZXRWaXNpYmxlU2VyaWVzKHRoaXMuX3Zpc2libGVTZXJpZXNDYWNoZSk7CiAgICAgICAgICAgICAgICB0aGlzLl92aXNpYmxlU2VyaWVzQ2FjaGUuZm9yRWFjaChmdW5jdGlvbiAobmFtZSkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX2NoYXJ0LnNldFNlcmllc0RhdGEobmFtZSwgdGhpcy5fc2VyaWVzRGF0YUNhY2hlW25hbWVdIHx8IFtdKTsKICAgICAgICAgICAgICAgIH0uYmluZCh0aGlzKSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgYXR0YWNoZWQoKSB7CiAgICAgICAgICAgIHRoaXMuX2F0dGFjaGVkID0gdHJ1ZTsKICAgICAgICB9CiAgICAgICAgZGV0YWNoZWQoKSB7CiAgICAgICAgICAgIHRoaXMuX2F0dGFjaGVkID0gZmFsc2U7CiAgICAgICAgfQogICAgfTsKICAgIF9WekRpc3RyaWJ1dGlvbkNoYXJ0LnRlbXBsYXRlID0gaHRtbCBgCiAgICA8c3R5bGUgaW5jbHVkZT0icGxvdHRhYmxlLXN0eWxlIj48L3N0eWxlPgogICAgPGRpdiBpZD0iY2hhcnRkaXYiPjwvZGl2PgogICAgPHN0eWxlPgogICAgICA6aG9zdCB7CiAgICAgICAgLXdlYmtpdC11c2VyLXNlbGVjdDogbm9uZTsKICAgICAgICAtbW96LXVzZXItc2VsZWN0OiBub25lOwogICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjsKICAgICAgICBmbGV4LWdyb3c6IDE7CiAgICAgICAgZmxleC1zaHJpbms6IDE7CiAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlOwogICAgICB9CiAgICAgICNjaGFydGRpdiB7CiAgICAgICAgLXdlYmtpdC11c2VyLXNlbGVjdDogbm9uZTsKICAgICAgICAtbW96LXVzZXItc2VsZWN0OiBub25lOwogICAgICAgIGZsZXgtZ3JvdzogMTsKICAgICAgICBmbGV4LXNocmluazogMTsKICAgICAgfQogICAgPC9zdHlsZT4KICBgOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoeyB0eXBlOiBPYmplY3QgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBzcmMkMi5TY2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ICAgICBUZW5zb3JCb2FyZCBiYWNrZW5kLCBhbmQgcmVuZGVycyBpdCBpbnRvIGEgdnotZGlzdHJpYnV0aW9uLWNoYXJ0LgogICAgKi8KICAgIGxldCBfVGZEaXN0cmlidXRpb25Mb2FkZXIgPSBjbGFzcyBfVGZEaXN0cmlidXRpb25Mb2FkZXIgZXh0ZW5kcyBEYXRhTG9hZGVyQmVoYXZpb3IoTGVnYWN5RWxlbWVudE1peGluKFBvbHltZXJFbGVtZW50KSkgewogICAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgICAgICBzdXBlciguLi5hcmd1bWVudHMpOwogICAgICAgICAgICB0aGlzLmdldERhdGFMb2FkTmFtZSA9ICh7IHJ1biB9KSA9PiBydW47CiAgICAgICAgICAgIHRoaXMucmVxdWVzdERhdGEgPSAoaXRlbXMsIG9uTG9hZCwgb25GaW5pc2gpID0+IHsKICAgICAgICAgICAgICAgIGNvbnN0IHJvdXRlciA9IGdldFJvdXRlcigpOwogICAgICAgICAgICAgICAgY29uc3QgYmFzZVVybCA9IHJvdXRlci5wbHVnaW5Sb3V0ZSgnZGlzdHJpYnV0aW9ucycsICcvZGlzdHJpYnV0aW9ucycpOwogICAgICAgICAgICAgICAgUHJvbWlzZS5hbGwoaXRlbXMubWFwKChpdGVtKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgY29uc3QgdXJsID0gYWRkUGFyYW1zKGJhc2VVcmwsIHsgdGFnOiBpdGVtLnRhZywgcnVuOiBpdGVtLnJ1biB9KTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5yZXF1ZXN0TWFuYWdlcgogICAgICAgICAgICAgICAgICAgICAgICAucmVxdWVzdCh1cmwpCiAgICAgICAgICAgICAgICAgICAgICAgIC50aGVuKChkYXRhKSA9PiB2b2lkIG9uTG9hZCh7IGl0ZW0sIGRhdGEgfSkpOwogICAgICAgICAgICAgICAgfSkpLmZpbmFsbHkoKCkgPT4gdm9pZCBvbkZpbmlzaCgpKTsKICAgICAgICAgICAgfTsKICAgICAgICAgICAgdGhpcy5sb2FkRGF0YUNhbGxiYWNrID0gKF8sIGRhdHVtLCBiYWNrZW5kRGF0YSkgPT4gewogICAgICAgICAgICAgICAgY29uc3QgZGF0YSA9IGJhY2tlbmREYXRhLm1hcCgoZGF0dW0pID0+IHsKICAgICAgICAgICAgICAgICAgICAvLyBgdnotZGlzdHJpYnV0aW9uLWNoYXJ0YCB3YW50cyBlYWNoIGRhdHVtIGFzIGFuIGFycmF5IHdpdGgKICAgICAgICAgICAgICAgICAgICAvLyBleHRyYSBgd2FsbF90aW1lYCBhbmQgYHN0ZXBgIHByb3BlcnRpZXMuCiAgICAgICAgICAgICAgICAgICAgY29uc3QgW3dhbGxfdGltZSwgc3RlcCwgYmluc10gPSBkYXR1bTsKICAgICAgICAgICAgICAgICAgICBiaW5zLndhbGxfdGltZSA9IG5ldyBEYXRlKHdhbGxfdGltZSAqIDEwMDApOwogICAgICAgICAgICAgICAgICAgIGJpbnMuc3RlcCA9IHN0ZXA7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGJpbnM7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIGNvbnN0IG5hbWUgPSB0aGlzLmdldERhdGFMb2FkTmFtZShkYXR1bSk7CiAgICAgICAgICAgICAgICB0aGlzLiQuY2hhcnQuc2V0U2VyaWVzRGF0YShuYW1lLCBkYXRhKTsKICAgICAgICAgICAgICAgIHRoaXMuJC5jaGFydC5zZXRWaXNpYmxlU2VyaWVzKFtuYW1lXSk7CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIHRoaXMuX2NvbG9yU2NhbGUgPSB7IHNjYWxlOiBydW5zQ29sb3JTY2FsZSB9OwogICAgICAgICAgICB0aGlzLl9leHBhbmRlZCA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLl9jYW5jZWxsZXIgPSBuZXcgQ2FuY2VsbGVyKCk7CiAgICAgICAgfQogICAgICAgIF9yZWxvYWRPblJ1blRhZ0NoYW5nZSgpIHsKICAgICAgICAgICAgdGhpcy5yZWxvYWQoKTsKICAgICAgICB9CiAgICAgICAgX3VwZGF0ZURhdGFUb0xvYWQoKSB7CiAgICAgICAgICAgIHZhciBydW4gPSB0aGlzLnJ1bjsKICAgICAgICAgICAgdmFyIHRhZyA9IHRoaXMudGFnOwogICAgICAgICAgICB0aGlzLmRhdGFUb0xvYWQgPSBbeyBydW4sIHRhZyB9XTsKICAgICAgICB9CiAgICAgICAgZ2V0IF9ydW5Db2xvcigpIHsKICAgICAgICAgICAgdmFyIHJ1biA9IHRoaXMucnVuOwogICAgICAgICAgICByZXR1cm4gdGhpcy5fY29sb3JTY2FsZS5zY2FsZShydW4pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBc2sgdGhlIGRpc3RyaWJ1dGlvbiBjaGFydCB0byByZWRyYXcgaXRzZWxmLiBUaGlzIHNob3VsZCBiZQogICAgICAgICAqIGNhbGxlZCB3aGVuZXZlciB0aGUgZGltZW5zaW9ucyBvZiB0aGUgdmlldyBjaGFuZ2UgKGUuZy4sIHdoZW4KICAgICAgICAgKiB0aGUgY2FyZCBpcyBleHBhbmRlZCksIGFzIHRoZSBkaXN0cmlidXRpb24gY2hhcnQgd2lsbCBuZWVkIHRvCiAgICAgICAgICogcmVjYWxjdWxhdGUgaXRzIGxheW91dC4KICAgICAgICAgKi8KICAgICAgICByZWRyYXcoKSB7CiAgICAgICAgICAgIHRoaXMuJC5jaGFydC5yZWRyYXcoKTsKICAgICAgICB9CiAgICAgICAgX3RvZ2dsZUV4cGFuZGVkKGUpIHsKICAgICAgICAgICAgdGhpcy5zZXQoJ19leHBhbmRlZCcsICF0aGlzLl9leHBhbmRlZCk7CiAgICAgICAgICAgIHRoaXMucmVkcmF3KCk7CiAgICAgICAgfQogICAgfTsKICAgIF9UZkRpc3RyaWJ1dGlvbkxvYWRlci50ZW1wbGF0ZSA9IGh0bWwgYAogICAgPHRmLWNhcmQtaGVhZGluZwogICAgICB0Y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IG1hcmdpbi1ib3R0b206IDE1cHg7CiAgICAgIH0KICAgICAgOmhvc3QoW19leHBhbmRlZF0pIHsKICAgICAgICB3aWR0aDogNzAwcHg7CiAgICAgICAgaGVpZ2h0OiA1MDBweDsKICAgICAgfQoKICAgICAgdnotaGlzdG9ncmFtLXRpbWVzZXJpZXMgewogICAgICAgIC1tb3otdXNlci1zZWxlY3Q6IG5vbmU7CiAgICAgICAgLXdlYmtpdC11c2VyLXNlbGVjdDogbm9uZTsKICAgICAgfQoKICAgICAgcGFwZXItaWNvbi1idXR0b24gewogICAgICAgIGNvbG9yOiAjMjE5NmYzOwogICAgICAgIGJvcmRlci1yYWRpdXM6IDEwMCU7CiAgICAgICAgd2lkdGg6IDMycHg7CiAgICAgICAgaGVpZ2h0OiAzMnB4OwogICAgICAgIHBhZGRpbmc6IDRweDsKICAgICAgfQogICAgICBwYXBlci1pY29uLWJ1dHRvbltzZWxlY3RlZF0gewogICAgICAgIGJhY2tncm91bmQ6IHZhcigtLXRiLXVpLWxpZ2h0LWFjY2VudCk7CiAgICAgIH0KCiAgICAgIHRmLWNhcmQtaGVhZGluZyB7CiAgICAgICAgbWFyZ2luLWJvdHRvbTogMTBweDsKICAgICAgfQogICAgPC9zdHlsZT4KICBgOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoeyB0eXBlOiBTdHJpbmcgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBTdHJpbmcpCiAgICBdLCBfVGZEaXN0cmlidXRpb25Mb2FkZXIucHJvdG90eXBlLCAicnVuIiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsgdHlwZTogU3RyaW5nIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgU3RyaW5nKQogICAgXSwgX1RmRGlzdHJpYnV0aW9uTG9hZGVyLnByb3RvdHlwZSwgInRhZyIsIHZvaWQgMCk7CiAgIC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AgICAgICB0aGlzLnJlbG9hZE9uUmVhZHkgPSB0cnVlOwogICAgICAgICAgICB0aGlzLl94VHlwZSA9ICdzdGVwJzsKICAgICAgICAgICAgdGhpcy5fcmVxdWVzdE1hbmFnZXIgPSBuZXcgUmVxdWVzdE1hbmFnZXIoKTsKICAgICAgICB9CiAgICAgICAgcmVhZHkoKSB7CiAgICAgICAgICAgIHN1cGVyLnJlYWR5KCk7CiAgICAgICAgICAgIGlmICh0aGlzLnJlbG9hZE9uUmVhZHkpCiAgICAgICAgICAgICAgICB0aGlzLnJlbG9hZCgpOwogICAgICAgIH0KICAgICAgICByZWxvYWQoKSB7CiAgICAgICAgICAgIHRoaXMuX2ZldGNoVGFncygpLnRoZW4oKCkgPT4gewogICAgICAgICAgICAgICAgdGhpcy5fcmVsb2FkRGlzdHJpYnV0aW9ucygpOwogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgX2ZldGNoVGFncygpIHsKICAgICAgICAgICAgY29uc3QgdXJsID0gZ2V0Um91dGVyKCkucGx1Z2luUm91dGUoJ2Rpc3RyaWJ1dGlvbnMnLCAnL3RhZ3MnKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3JlcXVlc3RNYW5hZ2VyLnJlcXVlc3QodXJsKS50aGVuKChydW5Ub1RhZ0luZm8pID0+IHsKICAgICAgICAgICAgICAgIGlmIChsb2Rhc2guaXNFcXVhbChydW5Ub1RhZ0luZm8sIHRoaXMuX3J1blRvVGFnSW5mbykpIHsKICAgICAgICAgICAgICAgICAgICAvLyBObyBuZWVkIHRvIHVwZGF0ZSBhbnl0aGluZyBpZiB0aGVyZSBhcmUgbm8gY2hhbmdlcy4KICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjb25zdCBydW5Ub1RhZyA9IGxvZGFzaC5tYXBWYWx1ZXMocnVuVG9UYWdJbmZvLCAoeCkgPT4gT2JqZWN0LmtleXMoeCkpOwogICAgICAgICAgICAgICAgY29uc3QgdGFncyA9IGdldFRhZ3MocnVuVG9UYWcpOwogICAgICAgICAgICAgICAgdGhpcy5zZXQoJ19kYXRhTm90Rm91bmQnLCB0YWdzLmxlbmd0aCA9PT0gMCk7CiAgICAgICAgICAgICAgICB0aGlzLnNldCgnX3J1blRvVGFnJywgcnVuVG9UYWcpOwogICAgICAgICAgICAgICAgdGhpcy5zZXQoJ19ydW5Ub1RhZ0luZm8nLCBydW5Ub1RhZ0luZm8pOwogICAgICAgICAgICAgICAgdGhpcy5hc3luYygoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgLy8gU2VlIHRoZSBjb21tZW50IGFib3ZlIGBfY2F0ZWdvcmllc0RvbVJlYWR5YC4KICAgICAgICAgICAgICAgICAgICB0aGlzLnNldCgnX2NhdGVnb3JpZXNEb21SZWFkeScsIHRydWUpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICBfcmVsb2FkRGlzdHJpYnV0aW9ucygpIHsKICAgICAgICAgICAgdGhpcy5yb290LnF1ZXJ5U2VsZWN0b3JBbGwoJ3RmLWRpc3RyaWJ1dGlvbi1sb2FkZXInKS5mb3JFYWNoKChsb2FkZXIpID0+IHsKICAgICAgICAgICAgICAgIGxvYWRlci5yZWxvYWQoKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIF9zaG91bGRPcGVuKGluZGV4KSB7CiAgICAgICAgICAgIHJldHVybiBpbmRleCA8PSAyOwogICAgICAgIH0KICAgICAgICBnZXQgX2NhdGVnb3JpZXMoKSB7CiAgICAgICAgICAgIHZhciBydW5Ub1RhZyA9IHRoaXMuX3J1blRvVGFnOwogICAgICAgICAgICB2YXIgc2VsZWN0ZWRSdW5zID0gdGhpcy5fc2VsZWN0ZWRSdW5zOwogICAgICAgICAgICB2YXIgdGFnRmlsdGVyID0gdGhpcy5fdGFnRmlsdGVyOwogICAgICAgICAgICB2YXIgY2F0ZWdvcmllc0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CBzZXQgdXAgeW91ciBldmVudCBmaWxlcywgY2hlY2sgb3V0IHRoZQogICAgICAgICAgICAgIDxhCiAgICAgICAgICAgICAgICBocmVmPSJodHRwczovL2dpdGh1Yi5jb20vdGVuc29yZmxvdy90ZW5zb3Jib2FyZC9ibG9iL21hc3Rlci9SRUFETUUubWQiCiAgICAgICAgICAgICAgICA+UkVBRE1FPC9hCiAgICAgICAgICAgICAgPgogICAgICAgICAgICAgIGFuZCBwZXJoYXBzIHRoZQogICAgICAgICAgICAgIDxhCiAgICAgICAgICAgICAgICBocmVmPSJodHRwczovL3d3dy50ZW5zb3JmbG93Lm9yZy9nZXRfc3RhcnRlZC9zdW1tYXJpZXNfYW5kX3RlbnNvcmJvYXJkIgogICAgICAgICAgICAgICAgPlRlbnNvckJvYXJkIHR1dG9yaWFsPC9hCiAgICAgICAgICAgICAgPi4KICAgICAgICAgICAgPC9wPgoKICAgICAgICAgICAgPHA+CiAgICAgICAgICAgICAgSWYgeW91IHRoaW5rIFRlbnNvckJvYXJkIGlzIGNvbmZpZ3VyZWQgcHJvcGVybHksIHBsZWFzZSBzZWUKICAgICAgICAgICAgICA8YQogICAgICAgICAgICAgICAgaHJlZj0iaHR0cHM6Ly9naXRodWIuY29tL3RlbnNvcmZsb3cvdGVuc29yYm9hcmQvYmxvYi9tYXN0ZXIvUkVBRE1FLm1kI215LXRlbnNvcmJvYXJkLWlzbnQtc2hvd2luZy1hbnktZGF0YS13aGF0cy13cm9uZyIKICAgICAgICAgICAgICAgID50aGUgc2VjdGlvbiBvZiB0aGUgUkVBRE1FIGRldm90ZWQgdG8gbWlzc2luZyBkYXRhIHByb2JsZW1zPC9hCiAgICAgICAgICAgICAgPgogICAgICAgICAgICAgIGFuZCBjb25zaWRlciBmaWxpbmcgYW4gaXNzdWUgb24gR2l0SHViLgogICAgICAgICAgICA8L3A+CiAgICAgICAgICA8L2Rpdj4KICAgICAgICA8L3RlbXBsYXRlPgogICAgICAgIDx0ZW1wbGF0ZSBpcz0iZG9tLWlmIiBpZj0iW1shX2RhdGFOb3RGb3VuZF1dIj4KICAgICAgICAgIDx0Zi10YWctZmlsdGVyZXIgdGFnLWZpbHRlcj0ie3tfdGFnRmlsdGVyfX0iPjwvdGYtdGFnLWZpbHRlcmVyPgogICAgICAgICAgPHRlbXBsYXRlIGlzPSJkb20tcmVwZWF0IiBpdGVtcz0iW1tfY2F0ZWdvcmllc11dIiBhcz0iY2F0ZWdvcnkiPgogICAgICAgICAgICA8dGYtY2F0ZWdvcnktcGFnaW5hdGVkLXZpZXcKICAgICAgICAgICAgICBjYXRlZ29yeT0iW1tjYXRlZ29yeV1dIgogICAgICAgICAgICAgIGluaXRpYWwtb3BlbmVkPSJbW19zaG91bGRPcGVuKGluZGV4KV1dIgogICAgICAgICAgICA+CiAgICAgICAgICAgICAgPHRlbXBsYXRlPgogICAgICAgICAgICAgICAgPHRmLWRpc3RyaWJ1dGlvbi1sb2FkZXIKICAgICAgICAgICAgICAgICAgYWN0aXZlPSJbW2FjdGl2ZV1dIgogICAgICAgICAgICAgICAgICBydW49IltbaXRlbS5ydW5dXSIKICAgICAgICAgICAgICAgICAgdGFnPSJbW2l0ZW0udGFnXV0iCiAgICAgICAgICAgICAgICAgIHRhZy1tZXRhZGF0YT0iW1tfdGFnTWV0YWRhdGEoX3J1blRvVGFnSW5mbywgaXRlbS5ydW4sIGl0ZW0udGFnKV1dIgogICAgICAgICAgICAgICAgICB4LXR5cGU9IltbX3hUeXBlXV0iCiAgICAgICAgICAgICAgICAgIHJlcXVlc3QtbWFuYWdlcj0iW1tfcmVxdWVzdE1hbmFnZXJdXSIKICAgICAgICAgICAgICAgID48L3RmLWRpc3RyaWJ1dGlvbi1sb2FkZXI+CiAgICAgICAgICAgICAgPC90ZW1wbGF0ZT4KICAgICAgICAgICAgPC90Zi1jYXRlZ29yeS1wYWdpbmF0ZWQtdmlldz4KICAgICAgICAgIDwvdGVtcGxhdGU+CiAgICAgICAgPC90ZW1wbGF0ZT4KICAgICAgP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dHJ1Y3R1cmFsJywKICAgICAgICB9LAogICAgICAgIEFubm90YXRpb246IHsKICAgICAgICAgICAgT1VUQk9YOiAnb3V0LWFubm90YXRpb25zJywKICAgICAgICAgICAgSU5CT1g6ICdpbi1hbm5vdGF0aW9ucycsCiAgICAgICAgICAgIEdST1VQOiAnYW5ub3RhdGlvbicsCiAgICAgICAgICAgIE5PREU6ICdhbm5vdGF0aW9uLW5vZGUnLAogICAgICAgICAgICBFREdFOiAnYW5ub3RhdGlvbi1lZGdlJywKICAgICAgICAgICAgQ09OVFJPTF9FREdFOiAnYW5ub3RhdGlvbi1jb250cm9sLWVkZ2UnLAogICAgICAgICAgICBMQUJFTDogJ2Fubm90YXRpb24tbGFiZWwnLAogICAgICAgICAgICBFTExJUFNJUzogJ2Fubm90YXRpb24tZWxsaXBzaXMnLAogICAgICAgIH0sCiAgICAgICAgU2NlbmU6IHsKICAgICAgICAgICAgR1JPVVA6ICdzY2VuZScsCiAgICAgICAgICAgIENPUkU6ICdjb3JlJywKICAgICAgICAgICAgRlVOQ1RJT05fTElCUkFSWTogJ2Z1bmN0aW9uLWxpYnJhcnknLAogICAgICAgICAgICBJTkVYVFJBQ1Q6ICdpbi1leHRyYWN0JywKICAgICAgICAgICAgT1VURVhUUkFDVDogJ291dC1leHRyYWN0JywKICAgICAgICB9LAogICAgICAgIFN1YnNjZW5lOiB7IEdST1VQOiAnc3Vic2NlbmUnIH0sCiAgICAgICAgT1BOT0RFOiAnb3AnLAogICAgICAgIE1FVEFOT0RFOiAnbWV0YScsCiAgICAgICAgU0VSSUVTTk9ERTogJ3NlcmllcycsCiAgICAgICAgQlJJREdFTk9ERTogJ2JyaWRnZScsCiAgICAgICAgRUxMSVBTSVNOT0RFOiAnZWxsaXBzaXMnLAogICAgfTsKICAgIGNvbnN0IFNWR19OQU1FU1BBQ0UgPSAnaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnOwogICAgLyoqCiAgICAgKiBHaXZlbiBhIGNvbnRhaW5lci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sQ2xhc3NlcyAmJiBjaGlsZC5jbGFzc0xpc3QuY29udGFpbnMoY2xhc3NOYW1lW2pdKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgaWYgKGhhc0FsbENsYXNzZXMpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNlbGVjdChjaGlsZCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAoIWNsYXNzTmFtZSB8fCBjaGlsZC5jbGFzc0xpc3QuY29udGFpbnMoY2xhc3NOYW1lKSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBzZWxlY3QoY2hpbGQpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiBzZWxlY3QobnVsbCk7CiAgICB9CiAgICAvKioKICAgICAqIEdpdmVuIGEgY29udGFpbmVyIGQzIHNlbGVjdGlvbiwgc2VsZWN0IGEgY2hpbGQgc3ZnIGVsZW1lbnQgb2YgYSBnaXZlbiB0YWcKICAgICAqIGFuZCBjbGFzcyBpZiBleGlzdHMgb3IgYXBwZW5kIC8gaW5zZXJ0IG9uZSBvdGhlcndpc2UuICBJZiBtdWx0aXBsZSBjaGlsZHJlbgogICAgICogbWF0Y2hlcyB0aGUgdGFnIGFuZCBjbGFzcyBuYW1lLCByZXR1cm5zIG9ubHkgdGhlIGZpcnN0IG9uZS4KICAgICAqCiAgICAgKiBAcGFyYW0gY29udGFpbmVyCiAgICAgKiBAcGFyYW0gdGFnTmFtZSB0YWcgbmFtZS4KICAgICAqIEBwYXJhbSBjbGFzc05hbWUgKG9wdGlvbmFsKSBDbGFzcyBuYW1lIG9yIGEgbGlzdCBvZiBjbGFzcyBuYW1lcy4KICAgICAqIEBwYXJhbSBiZWZvcmUgKG9wdGlvbmFsKSByZWZlcmVuY2UgRE9NIG5vZGUgZm9yIGluc2VydGlvbi4KICAgICAqIEByZXR1cm4gc2VsZWN0aW9uIG9mIHRoZSBlbGVtZW50CiAgICAgKi8KICAgIGZ1bmN0aW9uIHNlbGVjdE9yQ3JlYXRlQ2hpbGQoY29udGFpbmVyLCB0YWdOYW1lLCBjbGFzc05hbWUsIGJlZm9yZSkgewogICAgICAgIGxldCBjaGlsZCA9IHNlbGVjdENoaWxkKGNvbnRhaW5lciwgdGFnTmFtZSwgY2xhc3NOYW1lKTsKICAgICAgICBpZiAoIWNoaWxkLmVtcHR5KCkpIHsKICAgICAgICAgICAgcmV0dXJuIGNoaWxkOwogICAgICAgIH0KICAgICAgICBsZXQgbmV3RWxlbWVudCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnROUygnaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnLCB0YWdOYW1lKTsKICAgICAgICBpZiAoY2xhc3NOYW1lIGluc3RhbmNlb2YgQXJyYXkpIHsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBjbGFzc05hbWUubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIG5ld0VsZW1lbnQuY2xhc3NMaXN0LmFkZChjbGFzc05hbWVbaV0pOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICBuZXdFbGVtZW50LmNsYXNzTGlzdC5hZGQoY2xhc3NOYW1lKTsKICAgICAgICB9CiAgICAgICAgaWYgKGJlZm9yZSkgewogICAgICAgICAgICAvLyBpZiBiZWZvcmUgZXhpc3RzLCBpbnNlcnQKICAgICAgICAgICAgY29udGFpbmVyLm5vZGUoKS5pbnNlcnRCZWZvcmUobmV3RWxlbWVudCwgYmVmb3JlKTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIC8vIG90aGVyd2lzZSwgYXBwZW5kCiAgICAgICAgICAgIGNvbnRhaW5lci5ub2RlKCkuYXBwZW5kQ2hpbGQobmV3RWxlbWVudCk7CiAgICAgICAgfQogICAgICAgIHJldHVybiAoc2VsZWN0KG5ld0VsZW1lbnQpCiAgICAgICAgICAgIC8vIG5lZWQgdG8gYmluZCBkYXRhIHRvIGVtdWxhdGUgZDNfc2VsZWN0aW9uLmFwcGVuZAogICAgICAgICAgICAuZGF0dW0oY29udGFpbmVyLmRhdHVtKCkpKTsKICAgIH0KICAgIC8qKgogICAgICogRXhlY3V0aW9uIHN0YXRzIGZvciB0aGUgbm9kZS4KICAgICAqLwogICAgY2xhc3MgTm9kZVN0YXRzIHsKICAgICAgICBjb25zdHJ1Y3RvcihvdXRwdXRTaXplKSB7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBUb3RhbCBudW1iZXIgb2YgYnl0ZXMgdXNlZCBmb3IgdGhlIG5vZGUuIFN1bSBvZiBhbGwgY2hpbGRyZW4KICAgICAgICAgICAgICogaWYgaXQgaXMgYSBHcm91cCBub2RlLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy50b3RhbEJ5dGVzID0gMDsKICAgICAgICAgICAgdGhpcy5vdXRwdXRTaXplID0gb3V0cHV0U2l6ZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQWRkIHRoZSBzdGFydCBhbmQgZW5kIHRpbWUgZm9yIGEgcGFydGljdWxhciBrZXJuZWwgZXhlY3V0aW9uIG9mIHRoaXMgb3AuCiAgICAgICAgICogT3BzIGNhbiBoYXZlIG11bHRpcGxlIGtlcm5lbCBleGVjdXRpb25zIHdpdGhpbiB0aGUgc2FtZSBzZXNzaW9uIHJ1bi4KICAgICAgICAgKi8KICAgICAgICBhZGRFeGVjdXRpb25UaW1lKHN0YXJ0VGltZSwgZW5kVGltZSkgewogICAgICAgICAgICBpZiAodGhpcy5zdGFydFRpbWUgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5zdGFydFRpbWUgPSBNYXRoLm1pbih0aGlzLnN0YXJ0VGltZSwgc3RhcnRUaW1lKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuc3RhcnRUaW1lID0gc3RhcnRUaW1lOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0aGlzLmVuZFRpbWUgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5lbmRUaW1lID0gTWF0aC5tYXgodGhpcy5lbmRUaW1lLCBlbmRUaW1lKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuZW5kVGltZSA9IGVuZFRpbWU7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQWRkIHRoZSBieXRlcyBhbGxvY2F0ZWQgZm9yIGEgcGFydGljdWxhciBrZXJuZWwgZXhlY3V0aW9uIG9mIHRoaXMgb3AuCiAgICAgICAgICogT3BzIGNhbiBoYXZlIG11bHRpcGxlIGtlcm5lbCBleGVjdXRpb25zIHdpdGhpbiB0aGUgc2FtZSBzZXNzaW9uIHJ1bi4KICAgICAgICAgKi8KICAgICAgICBhZGRCeXRlc0FsbG9jYXRpb24odG90YWxCeXRlcykgewogICAgICAgICAgICBpZiAodGhpcy50b3RhbEJ5dGVzICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIHRoaXMudG90YWxCeXRlcyA9IE1hdGgubWF4KHRoaXMudG90YWxCeXRlcywgdG90YWxCeXRlcyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLnRvdGFsQnl0ZXMgPSB0b3RhbEJ5dGVzOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENvbWJpbmVzIHRoZSBzcGVjaWZpZWQgc3RhdHMgd2l0aCB0aGUgY3VycmVudCBzdGF0cy4KICAgICAgICAgKiBNb2RpZmllcyB0aGUgY3VycmVudCBvYmplY3QuIFRoaXMgbWV0aG9kIGlzIHVzZWQgdG8KICAgICAgICAgKiBjb21wdXRlIGFnZ3JlZ2F0ZSBzdGF0cyBmb3IgZ3JvdXAgbm9kZXMuCiAgICAgICAgICovCiAgICAgICAgY29tYmluZShzdGF0cykgewogICAgICAgICAgICBpZiAoc3RhdHMudG90YWxCeXRlcyAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICB0aGlzLnRvdGFsQnl0ZXMgKz0gc3RhdHMudG90YWxCeXRlczsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoc3RhdHMuZ2V0VG90YWxNaWNyb3MoKSAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICB0aGlzLmFkZEV4ZWN1dGlvblRpbWUoc3RhdHMuc3RhcnRUaW1lLCBzdGF0cy5lbmRUaW1lKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBUb3RhbCBudW1iZXIgb2YgY29tcHV0ZSB0aW1lIGluIG1pY3Jvc2Vjb25kcyB1c2VkIGZvciB0aGUgbm9kZS4KICAgICAgICAgKiBTdW0gb2YgYWxsIGNoaWxkcmVuIGlmIGl0IGlzIGEgR3JvdXAgbm9kZS4gTnVsbCBpZiBpdCBpcyB1bmtub3duLgogICAgICAgICAqIFRoaXMgbWV0aG9kIGNhbiBub3QgYmUgc2NhZmZvbGRlZCB1bmRlciBhIGdldHRlciBhdHRyaWJ1dGUgYmVjYXVzZQogICAgICAgICAqIEVDTUFTY3JpcHQgNSBkb2VzIG5vdCBzdXBwb3J0IGdldHRlciBhdHRyaWJ1dGVzLgogICAgICAgICAqLwogICAgICAgIGdldFRvdGFsTWljcm9zKCkgewogICAgICAgICAgICBpZiAodGhpcy5zdGFydFRpbWUgPT0gbnVsbCB8fCB0aGlzLmVuZFRpbWUgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXMuZW5kVGltZSAtIHRoaXMuc3RhcnRUaW1lOwogICAgICAgIH0KICAgIH0KICAgIC8qKi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hciA9IGxpc3RDYWNoZUNsZWFyOwoKICAgIC8qKgogICAgICogUGVyZm9ybXMgYQogICAgICogW2BTYW1lVmFsdWVaZXJvYF0oaHR0cDovL2VjbWEtaW50ZXJuYXRpb25hbC5vcmcvZWNtYS0yNjIvNy4wLyNzZWMtc2FtZXZhbHVlemVybykKICAgICAqIGNvbXBhcmlzb24gYmV0d2VlbiB0d28gdmFsdWVzIHRvIGRldGVybWluZSBpZiB0aGV5IGFyZSBlcXVpdmFsZW50LgogICAgICoKICAgICAqIEBzdGF0aWMKICAgICAqIEBtZW1iZXJPZiBfCiAgICAgKiBAc2luY2UgNC4wLjAKICAgICAqIEBjYXRlZ29yeSBMYW5nCiAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBjb21wYXJlLgogICAgICogQHBhcmFtIHsqfSBvdGhlciBUaGUgb3RoZXIgdmFsdWUgdG8gY29tcGFyZS4KICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiB0aGUgdmFsdWVzIGFyZSBlcXVpdmFsZW50LCBlbHNlIGBmYWxzZWAuCiAgICAgKiBAZXhhbXBsZQogICAgICoKICAgICAqIHZhciBvYmplY3QgPSB7ICdhJzogMSB9OwogICAgICogdmFyIG90aGVyID0geyAnYSc6IDEgfTsKICAgICAqCiAgICAgKiBfLmVxKG9iamVjdCwgb2JqZWN0KTsKICAgICAqIC8vID0+IHRydWUKICAgICAqCiAgICAgKiBfLmVxKG9iamVjdCwgb3RoZXIpOwogICAgICogLy8gPT4gZmFsc2UKICAgICAqCiAgICAgKiBfLmVxKCdhJywgJ2EnKTsKICAgICAqIC8vID0+IHRydWUKICAgICAqCiAgICAgKiBfLmVxKCdhJywgT2JqZWN0KCdhJykpOwogICAgICogLy8gPT4gZmFsc2UKICAgICAqCiAgICAgKiBfLmVxKE5hTiwgTmFOKTsKICAgICAqIC8vID0+IHRydWUKICAgICAqLwogICAgZnVuY3Rpb24gZXEodmFsd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ZSB0byBzZXQuCiAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBzZXQuCiAgICAgKiBAcmV0dXJucyB7T2JqZWN0fSBSZXR1cm5zIHRoZSBsaXN0IGNhY2hlIGluc3RhbmNlLgogICAgICovCiAgICBmdW5jdGlvbiBsaXN0Q2FjaGVTZXQoa2V5LCB2YWx1ZSkgewogICAgICB2YXIgZGF0YSA9IHRoaXMuX19kYXRhX18sCiAgICAgICAgICBpbmRleCA9IF9hc3NvY0luZGV4T2YoZGF0YSwga2V5KTsKCiAgICAgIGlmIChpbmRleCA8IDApIHsKICAgICAgICArK3RoaXMuc2l6ZTsKICAgICAgICBkYXRhLnB1c2goW2tleSwgdmFsdWVdKTsKICAgICAgfSBlbHNlIHsKICAgICAgICBkYXRhW2luZGV4XVsxXSA9IHZhbHVlOwogICAgICB9CiAgICAgIHJldHVybiB0aGlzOwogICAgfQoKICAgIHZhciBfbGlzdENhY2hlU2V0ID0gbGlzdENhY2hlU2V0OwoKICAgIC8qKgogICAgICogQ3JlYXRlcyBhbiBsaXN0IGNhY2hlIG9iamVjdC4KICAgICAqCiAgICAgKiBAcHJpdmF0ZQogICAgICogQGNvbnN0cnVjdG9yCiAgICAgKiBAcGFyYW0ge0FycmF5fSBbZW50cmllc10gVGhlIGtleS12YWx1ZSBwYWlycyB0byBjYWNoZS4KICAgICAqLwogICAgZnVuY3Rpb24gTGlzdENhY2hlKGVudHJpZXMpIHsKICAgICAgdmFyIGluZGV4ID0gLTEsCiAgICAgICAgICBsZW5ndGggPSBlbnRyaWVzID09IG51bGwgPyAwIDogZW50cmllcy5sZW5ndGg7CgogICAgICB0aGlzLmNsZWFyKCk7CiAgICAgIHdoaWxlICgrK2luZGV4IDwgbGVuZ3RoKSB7CiAgICAgICAgdmFyIGVudHJ5ID0gZW50cmllc1tpbmRleF07CiAgICAgICAgdGhpcy5zZXQoZW50cnlbMF0sIGVudHJ5WzFdKTsKICAgICAgfQogICAgfQoKICAg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XlgIHRvIGB2YWx1ZWAuCiAgICAgKgogICAgICogQHByaXZhdGUKICAgICAqIEBuYW1lIHNldAogICAgICogQG1lbWJlck9mIEhhc2gKICAgICAqIEBwYXJhbSB7c3RyaW5nfSBrZXkgVGhlIGtleSBvZiB0aGUgdmFsdWUgdG8gc2V0LgogICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gc2V0LgogICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyB0aGUgaGFzaCBpbnN0YW5jZS4KICAgICAqLwogICAgZnVuY3Rpb24gaGFzaFNldChrZXksIHZhbHVlKSB7CiAgICAgIHZhciBkYXRhID0gdGhpcy5fX2RhdGFfXzsKICAgICAgdGhpcy5zaXplICs9IHRoaXMuaGFzKGtleSkgPyAwIDogMTsKICAgICAgZGF0YVtrZXldID0gKF9uYXRpdmVDcmVhdGUgJiYgdmFsdWUgPT09IHVuZGVmaW5lZCkgPyBIQVNIX1VOREVGSU5FRCQxIDogdmFsdWU7CiAgICAgIHJldHVybiB0aGlzOwogICAgfQoKICAgIHZhciBfaGFzaFNldCA9IGhhc2hTZXQ7CgogICAgLyoqCiAgICAgKiBDcmVhdGVzIGEgaGFzaCBvYmplY3QuCiAgICAgKgogICAgICogQHByaXZhdGUKICAgICAqIEBjb25zdHJ1Y3RvcgogICAgICogQHBhcmFtIHtBcnJheX0gW2VudHJpZXNdIFRoZSBrZXktdmFsdWUgcGFpcnMgdG8gY2FjaGUuCiAgICAgKi8KICAgIGZ1bmN0aW9uIEhhc2goZW50cmllcykgewogICAgICB2YXIgaW5kZXggPSAtMSwKICAgICAgICAgIGxlbmd0aCA9IGVudHJpZXMgPT0gbnVsbCA/IDAgOiBlbnRyaWVzLmxlbmd0aDsKCiAgICAgIHRoaXMuY2xlYXIoKTsKICAgICAgd2hpbGUgKCsraW5kZXggPCBsZW5ndGgpIHsKICAgICAgICB2YXIgZW50cnkgPSBlbnRyaWVzW2luZGV4XTsKICAgICAgICB0aGlzL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bmVQcm9wZXJ0eSkgewogICAgICAgIF9kZWZpbmVQcm9wZXJ0eShvYmplY3QsIGtleSwgewogICAgICAgICAgJ2NvbmZpZ3VyYWJsZSc6IHRydWUsCiAgICAgICAgICAnZW51bWVyYWJsZSc6IHRydWUsCiAgICAgICAgICAndmFsdWUnOiB2YWx1ZSwKICAgICAgICAgICd3cml0YWJsZSc6IHRydWUKICAgICAgICB9KTsKICAgICAgfSBlbHNlIHsKICAgICAgICBvYmplY3Rba2V5XSA9IHZhbHVlOwogICAgICB9CiAgICB9CgogICAgdmFyIF9iYXNlQXNzaWduVmFsdWUgPSBiYXNlQXNzaWduVmFsdWU7CgogICAgLyoqIFVzZWQgZm9yIGJ1aWx0LWluIG1ldGhvZCByZWZlcmVuY2VzLiAqLwogICAgdmFyIG9iamVjdFByb3RvJDUgPSBPYmplY3QucHJvdG90eXBlOwoKICAgIC8qKiBVc2VkIHRvIGNoZWNrIG9iamVjdHMgZm9yIG93biBwcm9wZXJ0aWVzLiAqLwogICAgdmFyIGhhc093blByb3BlcnR5JDQgPSBvYmplY3RQcm90byQ1Lmhhc093blByb3BlcnR5OwoKICAgIC8qKgogICAgICogQXNzaWducyBgdmFsdWVgIHRvIGBrZXlgIG9mIGBvYmplY3RgIGlmIHRoZSBleGlzdGluZyB2YWx1ZSBpcyBub3QgZXF1aXZhbGVudAogICAgICogdXNpbmcgW2BTYW1lVmFsdWVaZXJvYF0oaHR0cDovL2VjbWEtaW50ZXJuYXRpb25hbC5vcmcvZWNtYS0yNjIvNy4wLyNzZWMtc2FtZXZhbHVlemVybykKICAgICAqIGZvciBlcXVhbGl0eSBjb21wYXJpc29ucy4KICAgICAqCiAgICAgKiBAcHJpdmF0ZQogICAgICogQHBhcmFtIHtPYmplY3R9IG9iamVjdCBUaGUgb2JqZWN0IHRvIG1vZGlmeS4KICAgICAqIEBwYXJhbSB7c3RyaW5nfSBrZXkgVGhlIGtleSBvZiB0aGUgcHJvcGVydHkgdG8gYXNzaWduLgogICAg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cnR5SXNFbnVtZXJhYmxlLmNhbGwodmFsdWUsICdjYWxsZWUnKTsKICAgIH07CgogICAgdmFyIGlzQXJndW1lbnRzXzEgPSBpc0FyZ3VtZW50czsKCiAgICAvKioKICAgICAqIENoZWNrcyBpZiBgdmFsdWVgIGlzIGNsYXNzaWZpZWQgYXMgYW4gYEFycmF5YCBvYmplY3QuCiAgICAgKgogICAgICogQHN0YXRpYwogICAgICogQG1lbWJlck9mIF8KICAgICAqIEBzaW5jZSAwLjEuMAogICAgICogQGNhdGVnb3J5IExhbmcKICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIGNoZWNrLgogICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIGB2YWx1ZWAgaXMgYW4gYXJyYXksIGVsc2UgYGZhbHNlYC4KICAgICAqIEBleGFtcGxlCiAgICAgKgogICAgICogXy5pc0FycmF5KFsxLCAyLCAzXSk7CiAgICAgKiAvLyA9PiB0cnVlCiAgICAgKgogICAgICogXy5pc0FycmF5KGRvY3VtZW50LmJvZHkuY2hpbGRyZW4pOwogICAgICogLy8gPT4gZmFsc2UKICAgICAqCiAgICAgKiBfLmlzQXJyYXkoJ2FiYycpOwogICAgICogLy8gPT4gZmFsc2UKICAgICAqCiAgICAgKiBfLmlzQXJyYXkoXy5ub29wKTsKICAgICAqIC8vID0+IGZhbHNlCiAgICAgKi8KICAgIHZhciBpc0FycmF5ID0gQXJyYXkuaXNBcnJheTsKCiAgICB2YXIgaXNBcnJheV8xID0gaXNBcnJheTsKCiAgICAvKioKICAgICAqIFRoaXMgbWV0aG9kIHJldHVybnMgYGZhbHNlYC4KICAgICAqCiAgICAgKiBAc3RhdGljCiAgICAgKiBAbWVtYmVyT2YgXwogICAgICogQHNpbmNlIDQuMTMuMAogICAgICogQGNhdGVnb3J5IFV0aWwKICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGBmYWxzZWAuCiAgICAgKiBAZ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qZWN0IEJvb2xlYW5dJywKICAgICAgICBkYXRlVGFnID0gJ1tvYmplY3QgRGF0ZV0nLAogICAgICAgIGVycm9yVGFnID0gJ1tvYmplY3QgRXJyb3JdJywKICAgICAgICBmdW5jVGFnJDEgPSAnW29iamVjdCBGdW5jdGlvbl0nLAogICAgICAgIG1hcFRhZyA9ICdbb2JqZWN0IE1hcF0nLAogICAgICAgIG51bWJlclRhZyA9ICdbb2JqZWN0IE51bWJlcl0nLAogICAgICAgIG9iamVjdFRhZyA9ICdbb2JqZWN0IE9iamVjdF0nLAogICAgICAgIHJlZ2V4cFRhZyA9ICdbb2JqZWN0IFJlZ0V4cF0nLAogICAgICAgIHNldFRhZyA9ICdbb2JqZWN0IFNldF0nLAogICAgICAgIHN0cmluZ1RhZyA9ICdbb2JqZWN0IFN0cmluZ10nLAogICAgICAgIHdlYWtNYXBUYWcgPSAnW29iamVjdCBXZWFrTWFwXSc7CgogICAgdmFyIGFycmF5QnVmZmVyVGFnID0gJ1tvYmplY3QgQXJyYXlCdWZmZXJdJywKICAgICAgICBkYXRhVmlld1RhZyA9ICdbb2JqZWN0IERhdGFWaWV3XScsCiAgICAgICAgZmxvYXQzMlRhZyA9ICdbb2JqZWN0IEZsb2F0MzJBcnJheV0nLAogICAgICAgIGZsb2F0NjRUYWcgPSAnW29iamVjdCBGbG9hdDY0QXJyYXldJywKICAgICAgICBpbnQ4VGFnID0gJ1tvYmplY3QgSW50OEFycmF5XScsCiAgICAgICAgaW50MTZUYWcgPSAnW29iamVjdCBJbnQxNkFycmF5XScsCiAgICAgICAgaW50MzJUYWcgPSAnW29iamVjdCBJbnQzMkFycmF5XScsCiAgICAgICAgdWludDhUYWcgPSAnW29iamVjdCBVaW50OEFycmF5XScsCiAgICAgICAgdWludDhDbGFtcGVkVGFnID0gJ1tvYmplY3QgVWludDhDbGFtcGVkQXJyYXldJywKICAgICAgICB1aW50MTZUYWcgPSAnW29iamVjdCBVaW50MTZBcnJheV0nLAogICAgICAgIHVpb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XRpYwogICAgICogQHNpbmNlIDAuMS4wCiAgICAgKiBAbWVtYmVyT2YgXwogICAgICogQGNhdGVnb3J5IE9iamVjdAogICAgICogQHBhcmFtIHtPYmplY3R9IG9iamVjdCBUaGUgb2JqZWN0IHRvIHF1ZXJ5LgogICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBhcnJheSBvZiBwcm9wZXJ0eSBuYW1lcy4KICAgICAqIEBleGFtcGxlCiAgICAgKgogICAgICogZnVuY3Rpb24gRm9vKCkgewogICAgICogICB0aGlzLmEgPSAxOwogICAgICogICB0aGlzLmIgPSAyOwogICAgICogfQogICAgICoKICAgICAqIEZvby5wcm90b3R5cGUuYyA9IDM7CiAgICAgKgogICAgICogXy5rZXlzKG5ldyBGb28pOwogICAgICogLy8gPT4gWydhJywgJ2InXSAoaXRlcmF0aW9uIG9yZGVyIGlzIG5vdCBndWFyYW50ZWVkKQogICAgICoKICAgICAqIF8ua2V5cygnaGknKTsKICAgICAqIC8vID0+IFsnMCcsICcxJ10KICAgICAqLwogICAgZnVuY3Rpb24ga2V5cyQyKG9iamVjdCkgewogICAgICByZXR1cm4gaXNBcnJheUxpa2VfMShvYmplY3QpID8gX2FycmF5TGlrZUtleXMob2JqZWN0KSA6IF9iYXNlS2V5cyhvYmplY3QpOwogICAgfQoKICAgIHZhciBrZXlzXzEgPSBrZXlzJDI7CgogICAgLyoqCiAgICAgKiBUaGUgYmFzZSBpbXBsZW1lbnRhdGlvbiBvZiBgXy5hc3NpZ25gIHdpdGhvdXQgc3VwcG9ydCBmb3IgbXVsdGlwbGUgc291cmNlcwogICAgICogb3IgYGN1c3RvbWl6ZXJgIGZ1bmN0aW9ucy4KICAgICAqCiAgICAgKiBAcHJpdmF0ZQogICAgICogQHBhcmFtIHtPYmplY3R9IG9iamVjdCBUaGUgZGVzdGluYXRpb24gb2JqZWN0LgogICAgICogQHBhcmFtIHtPYmplY3R9IHNvdXJjZSBUaGUgc291cmNlIG9iamVjdC4KICAgIC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vJGEgPSBPYmplY3QucHJvdG90eXBlOwoKICAgIC8qKiBVc2VkIHRvIGNoZWNrIG9iamVjdHMgZm9yIG93biBwcm9wZXJ0aWVzLiAqLwogICAgdmFyIGhhc093blByb3BlcnR5JDggPSBvYmplY3RQcm90byRhLmhhc093blByb3BlcnR5OwoKICAgIC8qKgogICAgICogVGhlIGJhc2UgaW1wbGVtZW50YXRpb24gb2YgYF8ua2V5c0luYCB3aGljaCBkb2Vzbid0IHRyZWF0IHNwYXJzZSBhcnJheXMgYXMgZGVuc2UuCiAgICAgKgogICAgICogQHByaXZhdGUKICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvYmplY3QgVGhlIG9iamVjdCB0byBxdWVyeS4KICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyB0aGUgYXJyYXkgb2YgcHJvcGVydHkgbmFtZXMuCiAgICAgKi8KICAgIGZ1bmN0aW9uIGJhc2VLZXlzSW4ob2JqZWN0KSB7CiAgICAgIGlmICghaXNPYmplY3RfMShvYmplY3QpKSB7CiAgICAgICAgcmV0dXJuIF9uYXRpdmVLZXlzSW4ob2JqZWN0KTsKICAgICAgfQogICAgICB2YXIgaXNQcm90byA9IF9pc1Byb3RvdHlwZShvYmplY3QpLAogICAgICAgICAgcmVzdWx0ID0gW107CgogICAgICBmb3IgKHZhciBrZXkgaW4gb2JqZWN0KSB7CiAgICAgICAgaWYgKCEoa2V5ID09ICdjb25zdHJ1Y3RvcicgJiYgKGlzUHJvdG8gfHwgIWhhc093blByb3BlcnR5JDguY2FsbChvYmplY3QsIGtleSkpKSkgewogICAgICAgICAgcmVzdWx0LnB1c2goa2V5KTsKICAgICAgICB9CiAgICAgIH0KICAgICAgcmV0dXJuIHJlc3VsdDsKICAgIH0KCiAgICB2YXIgX2Jhc2VLZXlzSW4gPSBiYXNlS2V5c0luOwoKICAgIC8qKgogICAgICogQ3JlYXRlcyBhbiBhcnJheSBvZiB0aGUgb3duIGFuZCBpbmhlcml0ZWQgZW51bW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wKICAgICAgICAgIHJlc0luZGV4ID0gMCwKICAgICAgICAgIHJlc3VsdCA9IFtdOwoKICAgICAgd2hpbGUgKCsraW5kZXggPCBsZW5ndGgpIHsKICAgICAgICB2YXIgdmFsdWUgPSBhcnJheVtpbmRleF07CiAgICAgICAgaWYgKHByZWRpY2F0ZSh2YWx1ZSwgaW5kZXgsIGFycmF5KSkgewogICAgICAgICAgcmVzdWx0W3Jlc0luZGV4KytdID0gdmFsdWU7CiAgICAgICAgfQogICAgICB9CiAgICAgIHJldHVybiByZXN1bHQ7CiAgICB9CgogICAgdmFyIF9hcnJheUZpbHRlciA9IGFycmF5RmlsdGVyOwoKICAgIC8qKgogICAgICogVGhpcyBtZXRob2QgcmV0dXJucyBhIG5ldyBlbXB0eSBhcnJheS4KICAgICAqCiAgICAgKiBAc3RhdGljCiAgICAgKiBAbWVtYmVyT2YgXwogICAgICogQHNpbmNlIDQuMTMuMAogICAgICogQGNhdGVnb3J5IFV0aWwKICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyB0aGUgbmV3IGVtcHR5IGFycmF5LgogICAgICogQGV4YW1wbGUKICAgICAqCiAgICAgKiB2YXIgYXJyYXlzID0gXy50aW1lcygyLCBfLnN0dWJBcnJheSk7CiAgICAgKgogICAgICogY29uc29sZS5sb2coYXJyYXlzKTsKICAgICAqIC8vID0+IFtbXSwgW11dCiAgICAgKgogICAgICogY29uc29sZS5sb2coYXJyYXlzWzBdID09PSBhcnJheXNbMV0pOwogICAgICogLy8gPT4gZmFsc2UKICAgICAqLwogICAgZnVuY3Rpb24gc3R1YkFycmF5KCkgewogICAgICByZXR1cm4gW107CiAgICB9CgogICAgdmFyIHN0dWJBcnJheV8xID0gc3R1YkFycmF5OwoKICAgIC8qKiBVc2VkIGZvciBidWlsdC1pbiBtZXRob2QgcmVmZXJlbmNlcy4gKi8KICAgIHZhciBvYmplY3RQcm90byRiID0gT2JqZWN0LnByb3RvdHlwZTsKCiAgICAvKiogQnVpbHQtaW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YXBUYWckMTsKICAgICAgICAgICAgY2FzZSBwcm9taXNlQ3RvclN0cmluZzogcmV0dXJuIHByb21pc2VUYWc7CiAgICAgICAgICAgIGNhc2Ugc2V0Q3RvclN0cmluZzogcmV0dXJuIHNldFRhZyQxOwogICAgICAgICAgICBjYXNlIHdlYWtNYXBDdG9yU3RyaW5nOiByZXR1cm4gd2Vha01hcFRhZyQxOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICB9OwogICAgfQoKICAgIHZhciBfZ2V0VGFnID0gZ2V0VGFnOwoKICAgIC8qKiBVc2VkIGZvciBidWlsdC1pbiBtZXRob2QgcmVmZXJlbmNlcy4gKi8KICAgIHZhciBvYmplY3RQcm90byRjID0gT2JqZWN0LnByb3RvdHlwZTsKCiAgICAvKiogVXNlZCB0byBjaGVjayBvYmplY3RzIGZvciBvd24gcHJvcGVydGllcy4gKi8KICAgIHZhciBoYXNPd25Qcm9wZXJ0eSQ5ID0gb2JqZWN0UHJvdG8kYy5oYXNPd25Qcm9wZXJ0eTsKCiAgICAvKioKICAgICAqIEluaXRpYWxpemVzIGFuIGFycmF5IGNsb25lLgogICAgICoKICAgICAqIEBwcml2YXRlCiAgICAgKiBAcGFyYW0ge0FycmF5fSBhcnJheSBUaGUgYXJyYXkgdG8gY2xvbmUuCiAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIGluaXRpYWxpemVkIGNsb25lLgogICAgICovCiAgICBmdW5jdGlvbiBpbml0Q2xvbmVBcnJheShhcnJheSkgewogICAgICB2YXIgbGVuZ3RoID0gYXJyYXkubGVuZ3RoLAogICAgICAgICAgcmVzdWx0ID0gbmV3IGFycmF5LmNvbnN0cnVjdG9yKGxlbmd0aCk7CgogICAgICAvLyBBZGQgcHJvcGVydGllcyBhc3NpZ25lZCBieSBgUmVnRXhwI2V4ZWNgLgogICAgICBpZiAobGVuZ3RoICYmIHR5cGVvZiBhcnJheVswXSA9PSAnc3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KG9iamVjdCk7CgogICAgICAgIGNhc2UgcmVnZXhwVGFnJDE6CiAgICAgICAgICByZXR1cm4gX2Nsb25lUmVnRXhwKG9iamVjdCk7CgogICAgICAgIGNhc2Ugc2V0VGFnJDI6CiAgICAgICAgICByZXR1cm4gbmV3IEN0b3I7CgogICAgICAgIGNhc2Ugc3ltYm9sVGFnOgogICAgICAgICAgcmV0dXJuIF9jbG9uZVN5bWJvbChvYmplY3QpOwogICAgICB9CiAgICB9CgogICAgdmFyIF9pbml0Q2xvbmVCeVRhZyA9IGluaXRDbG9uZUJ5VGFnOwoKICAgIC8qKiBCdWlsdC1pbiB2YWx1ZSByZWZlcmVuY2VzLiAqLwogICAgdmFyIG9iamVjdENyZWF0ZSA9IE9iamVjdC5jcmVhdGU7CgogICAgLyoqCiAgICAgKiBUaGUgYmFzZSBpbXBsZW1lbnRhdGlvbiBvZiBgXy5jcmVhdGVgIHdpdGhvdXQgc3VwcG9ydCBmb3IgYXNzaWduaW5nCiAgICAgKiBwcm9wZXJ0aWVzIHRvIHRoZSBjcmVhdGVkIG9iamVjdC4KICAgICAqCiAgICAgKiBAcHJpdmF0ZQogICAgICogQHBhcmFtIHtPYmplY3R9IHByb3RvIFRoZSBvYmplY3QgdG8gaW5oZXJpdCBmcm9tLgogICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyB0aGUgbmV3IG9iamVjdC4KICAgICAqLwogICAgdmFyIGJhc2VDcmVhdGUgPSAoZnVuY3Rpb24oKSB7CiAgICAgIGZ1bmN0aW9uIG9iamVjdCgpIHt9CiAgICAgIHJldHVybiBmdW5jdGlvbihwcm90bykgewogICAgICAgIGlmICghaXNPYmplY3RfMShwcm90bykpIHsKICAgICAgICAgIHJldHVybiB7fTsKICAgICAgICB9CiAgICAgICAgaWYgKG9iamVjdENyZWF0ZSkgewogICAgICAgICAgcmV0dXJuIG9iamVjdENyZWF0ZShwcm90byk7CiAgICAgICAgfQogICAgICAgIG9iamVjdC5wcm90b3R5cGUgPSBwcm90bzsKICAgICAgICB2YXIgcmVzdWx0ID0gbmV3IG9iamVjdDsKICAgICAgICBvYmplY3QucHJvdG90eXBlID0gdW5kZWZpbmVkOwogICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgIH07CiAgICB9KCkpOwoKICAgIHZhciBfYmFzZUNyZWF0ZSA9IGJhc2VDcmVhdGU7CgogICAgLyoqCiAgICAgKiBJbml0aWFsaXplcyBhbiBvYmplY3QgY2xvbmUuCiAgICAgKgogICAgICogQHByaXZhdGUKICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvYmplY3QgVGhlIG9iamVjdCB0byBjbG9uZS4KICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgdGhlIGluaXRpYWxpemVkIGNsb25lLgogICAgICovCiAgICBmdW5jdGlvbiBpbml0Q2xvbmVPYmplY3Qob2JqZWN0KSB7CiAgICAgIHJldHVybiAodHlwZW9mIG9iamVjdC5jb25zdHJ1Y3RvciA9PSAnZnVuY3Rpb24nICYmICFfaXNQcm90b3R5cGUob2JqZWN0KSkKICAgICAgICA/IF9iYXNlQ3JlYXRlKF9nZXRQcm90b3R5cGUob2JqZWN0KSkKICAgICAgICA6IHt9OwogICAgfQoKICAgIHZhciBfaW5pdENsb25lT2JqZWN0ID0gaW5pdENsb25lT2JqZWN0OwoKICAgIC8qKiBgT2JqZWN0I3RvU3RyaW5nYCByZXN1bHQgcmVmZXJlbmNlcy4gKi8KICAgIHZhciBtYXBUYWckMyA9ICdbb2JqZWN0IE1hcF0nOwoKICAgIC8qKgogICAgICogVGhlIGJhc2UgaW1wbGVtZW50YXRpb24gb2YgYF8uaXNNYXBgIHdpdGhvdXQgTm9kZS5qcyBvcHRpbWl6YXRpb25zLgogICAgICoKICAgICAqIEBwcml2YXRlCiAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBjaGVjay4KICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiBg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aXZhdGUKICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IGVhY2hGdW5jIFRoZSBmdW5jdGlvbiB0byBpdGVyYXRlIG92ZXIgYSBjb2xsZWN0aW9uLgogICAgICogQHBhcmFtIHtib29sZWFufSBbZnJvbVJpZ2h0XSBTcGVjaWZ5IGl0ZXJhdGluZyBmcm9tIHJpZ2h0IHRvIGxlZnQuCiAgICAgKiBAcmV0dXJucyB7RnVuY3Rpb259IFJldHVybnMgdGhlIG5ldyBiYXNlIGZ1bmN0aW9uLgogICAgICovCiAgICBmdW5jdGlvbiBjcmVhdGVCYXNlRWFjaChlYWNoRnVuYywgZnJvbVJpZ2h0KSB7CiAgICAgIHJldHVybiBmdW5jdGlvbihjb2xsZWN0aW9uLCBpdGVyYXRlZSkgewogICAgICAgIGlmIChjb2xsZWN0aW9uID09IG51bGwpIHsKICAgICAgICAgIHJldHVybiBjb2xsZWN0aW9uOwogICAgICAgIH0KICAgICAgICBpZiAoIWlzQXJyYXlMaWtlXzEoY29sbGVjdGlvbikpIHsKICAgICAgICAgIHJldHVybiBlYWNoRnVuYyhjb2xsZWN0aW9uLCBpdGVyYXRlZSk7CiAgICAgICAgfQogICAgICAgIHZhciBsZW5ndGggPSBjb2xsZWN0aW9uLmxlbmd0aCwKICAgICAgICAgICAgaW5kZXggPSBmcm9tUmlnaHQgPyBsZW5ndGggOiAtMSwKICAgICAgICAgICAgaXRlcmFibGUgPSBPYmplY3QoY29sbGVjdGlvbik7CgogICAgICAgIHdoaWxlICgoZnJvbVJpZ2h0ID8gaW5kZXgtLSA6ICsraW5kZXggPCBsZW5ndGgpKSB7CiAgICAgICAgICBpZiAoaXRlcmF0ZWUoaXRlcmFibGVbaW5kZXhdLCBpbmRleCwgaXRlcmFibGUpID09PSBmYWxzZSkgewogICAgICAgICAgICBicmVhazsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIGNvbGxlY3Rpb247CiAgICAgIH07CiAgICB9CgogICAgdmFyIF9jcmVhdGVCYXNlRWFjaCA9IGNyZWF0ZUJhc2VFYWNoOwoKICAgIC8qKgogICAgICogVGhlIGJhc2UgaW1wbGVtZW50YXRpb24gb2YgYF8uZm9yRWFjaGAgd2l0aG91dCBzdXBwb3J0IGZvciBpdGVyYXRlZSBzaG9ydGhhbmRzLgogICAgICoKICAgICAqIEBwcml2YXRlCiAgICAgKiBAcGFyYW0ge0FycmF5fE9iamVjdH0gY29sbGVjdGlvbiBUaGUgY29sbGVjdGlvbiB0byBpdGVyYXRlIG92ZXIuCiAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufSBpdGVyYXRlZSBUaGUgZnVuY3Rpb24gaW52b2tlZCBwZXIgaXRlcmF0aW9uLgogICAgICogQHJldHVybnMge0FycmF5fE9iamVjdH0gUmV0dXJucyBgY29sbGVjdGlvbmAuCiAgICAgKi8KICAgIHZhciBiYXNlRWFjaCA9IF9jcmVhdGVCYXNlRWFjaChfYmFzZUZvck93bik7CgogICAgdmFyIF9iYXNlRWFjaCA9IGJhc2VFYWNoOwoKICAgIC8qKgogICAgICogVGhpcyBtZXRob2QgcmV0dXJucyB0aGUgZmlyc3QgYXJndW1lbnQgaXQgcmVjZWl2ZXMuCiAgICAgKgogICAgICogQHN0YXRpYwogICAgICogQHNpbmNlIDAuMS4wCiAgICAgKiBAbWVtYmVyT2YgXwogICAgICogQGNhdGVnb3J5IFV0aWwKICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgQW55IHZhbHVlLgogICAgICogQHJldHVybnMgeyp9IFJldHVybnMgYHZhbHVlYC4KICAgICAqIEBleGFtcGxlCiAgICAgKgogICAgICogdmFyIG9iamVjdCA9IHsgJ2EnOiAxIH07CiAgICAgKgogICAgICogY29uc29sZS5sb2coXy5pZGVudGl0eShvYmplY3QpID09PSBvYmplY3QpOwogICAgICogLy8gPT4gdHJ1ZQogICAgICovCiAgICBmdW5jdGlvbiBpZGVudGl0eSRuKHZhbHVlKSB7CiAgICAgIHJldHVybiB2YWx1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XNQYXJ0aWFsID0gYml0bWFzayAmIENPTVBBUkVfUEFSVElBTF9GTEFHLAogICAgICAgICAgYXJyTGVuZ3RoID0gYXJyYXkubGVuZ3RoLAogICAgICAgICAgb3RoTGVuZ3RoID0gb3RoZXIubGVuZ3RoOwoKICAgICAgaWYgKGFyckxlbmd0aCAhPSBvdGhMZW5ndGggJiYgIShpc1BhcnRpYWwgJiYgb3RoTGVuZ3RoID4gYXJyTGVuZ3RoKSkgewogICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgfQogICAgICAvLyBBc3N1bWUgY3ljbGljIHZhbHVlcyBhcmUgZXF1YWwuCiAgICAgIHZhciBzdGFja2VkID0gc3RhY2suZ2V0KGFycmF5KTsKICAgICAgaWYgKHN0YWNrZWQgJiYgc3RhY2suZ2V0KG90aGVyKSkgewogICAgICAgIHJldHVybiBzdGFja2VkID09IG90aGVyOwogICAgICB9CiAgICAgIHZhciBpbmRleCA9IC0xLAogICAgICAgICAgcmVzdWx0ID0gdHJ1ZSwKICAgICAgICAgIHNlZW4gPSAoYml0bWFzayAmIENPTVBBUkVfVU5PUkRFUkVEX0ZMQUcpID8gbmV3IF9TZXRDYWNoZSA6IHVuZGVmaW5lZDsKCiAgICAgIHN0YWNrLnNldChhcnJheSwgb3RoZXIpOwogICAgICBzdGFjay5zZXQob3RoZXIsIGFycmF5KTsKCiAgICAgIC8vIElnbm9yZSBub24taW5kZXggcHJvcGVydGllcy4KICAgICAgd2hpbGUgKCsraW5kZXggPCBhcnJMZW5ndGgpIHsKICAgICAgICB2YXIgYXJyVmFsdWUgPSBhcnJheVtpbmRleF0sCiAgICAgICAgICAgIG90aFZhbHVlID0gb3RoZXJbaW5kZXhdOwoKICAgICAgICBpZiAoY3VzdG9taXplcikgewogICAgICAgICAgdmFyIGNvbXBhcmVkID0gaXNQYXJ0aWFsCiAgICAgICAgICAgID8gY3VzdG9taXplcihvdGhWYWx1ZSwgYXJyVmFsdWUsIGluZGV4LCBvdGhlciwgYXJyYXksIHN0YWNrKQogICAgICAgICAgICA6IGN1c3RvbWl6ZXIoYXJyVmFsdWUsIG90aFZhbHVlLCBpbmRleCwgYXJyYXksIG90aGVyLCBzdGFjayk7CiAgICAgICAgfQogICAgICAgIGlmIChjb21wYXJlZCAhPT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICBpZiAoY29tcGFyZWQpIHsKICAgICAgICAgICAgY29udGludWU7CiAgICAgICAgICB9CiAgICAgICAgICByZXN1bHQgPSBmYWxzZTsKICAgICAgICAgIGJyZWFrOwogICAgICAgIH0KICAgICAgICAvLyBSZWN1cnNpdmVseSBjb21wYXJlIGFycmF5cyAoc3VzY2VwdGlibGUgdG8gY2FsbCBzdGFjayBsaW1pdHMpLgogICAgICAgIGlmIChzZWVuKSB7CiAgICAgICAgICBpZiAoIV9hcnJheVNvbWUob3RoZXIsIGZ1bmN0aW9uKG90aFZhbHVlLCBvdGhJbmRleCkgewogICAgICAgICAgICAgICAgaWYgKCFfY2FjaGVIYXMoc2Vlbiwgb3RoSW5kZXgpICYmCiAgICAgICAgICAgICAgICAgICAgKGFyclZhbHVlID09PSBvdGhWYWx1ZSB8fCBlcXVhbEZ1bmMoYXJyVmFsdWUsIG90aFZhbHVlLCBiaXRtYXNrLCBjdXN0b21pemVyLCBzdGFjaykpKSB7CiAgICAgICAgICAgICAgICAgIHJldHVybiBzZWVuLnB1c2gob3RoSW5kZXgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIH0pKSB7CiAgICAgICAgICAgIHJlc3VsdCA9IGZhbHNlOwogICAgICAgICAgICBicmVhazsKICAgICAgICAgIH0KICAgICAgICB9IGVsc2UgaWYgKCEoCiAgICAgICAgICAgICAgYXJyVmFsdWUgPT09IG90aFZhbHVlIHx8CiAgICAgICAgICAgICAgICBlcXVhbEZ1bmMoYXJyVmFsdWUsIG90aFZhbHVlLCBiaXRtYXNrLCBjdXN0b21pemVyLCBzdGFjaykKICAgICAgICAgICAgKSkgewogICAgICAgICAgcmVzdWx0ID0gZmFsc2U7CiAgICAgICAgICBicmVhazsKICAgICAgICB9CiAgICAgIH0KICAgICAgc3RhY2tbJ2RlbGV0ZSddKGFycmF5KTsKICAgICAgc3RhY2tbJ2RlbGV0ZSddKG90aGVyKTsKICAgICAgcmV0dXJuIHJlc3VsdDsKICAgIH0KCiAgICB2YXIgX2VxdWFsQXJyYXlzID0gZXF1YWxBcnJheXM7CgogICAgLyoqCiAgICAgKiBDb252ZXJ0cyBgbWFwYCB0byBpdHMga2V5LXZhbHVlIHBhaXJzLgogICAgICoKICAgICAqIEBwcml2YXRlCiAgICAgKiBAcGFyYW0ge09iamVjdH0gbWFwIFRoZSBtYXAgdG8gY29udmVydC4KICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyB0aGUga2V5LXZhbHVlIHBhaXJzLgogICAgICovCiAgICBmdW5jdGlvbiBtYXBUb0FycmF5KG1hcCkgewogICAgICB2YXIgaW5kZXggPSAtMSwKICAgICAgICAgIHJlc3VsdCA9IEFycmF5KG1hcC5zaXplKTsKCiAgICAgIG1hcC5mb3JFYWNoKGZ1bmN0aW9uKHZhbHVlLCBrZXkpIHsKICAgICAgICByZXN1bHRbKytpbmRleF0gPSBba2V5LCB2YWx1ZV07CiAgICAgIH0pOwogICAgICByZXR1cm4gcmVzdWx0OwogICAgfQoKICAgIHZhciBfbWFwVG9BcnJheSA9IG1hcFRvQXJyYXk7CgogICAgLyoqCiAgICAgKiBDb252ZXJ0cyBgc2V0YCB0byBhbiBhcnJheSBvZiBpdHMgdmFsdWVzLgogICAgICoKICAgICAqIEBwcml2YXRlCiAgICAgKiBAcGFyYW0ge09iamVjdH0gc2V0IFRoZSBzZXQgdG8gY29udmVydC4KICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyB0aGUgdmFsdWVzLgogICAgICovCiAgICBmdW5jdGlvbiBzZXRUb0FycmF5KHNldCkgewogICAgICB2YXIgaW5kZXggPSAtMSwKICAgICAgICAgIHJlc3VsdCA9IEFyc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5zaXplICYmICFpc1BhcnRpYWwpIHsKICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgfQogICAgICAgICAgLy8gQXNzdW1lIGN5Y2xpYyB2YWx1ZXMgYXJlIGVxdWFsLgogICAgICAgICAgdmFyIHN0YWNrZWQgPSBzdGFjay5nZXQob2JqZWN0KTsKICAgICAgICAgIGlmIChzdGFja2VkKSB7CiAgICAgICAgICAgIHJldHVybiBzdGFja2VkID09IG90aGVyOwogICAgICAgICAgfQogICAgICAgICAgYml0bWFzayB8PSBDT01QQVJFX1VOT1JERVJFRF9GTEFHJDE7CgogICAgICAgICAgLy8gUmVjdXJzaXZlbHkgY29tcGFyZSBvYmplY3RzIChzdXNjZXB0aWJsZSB0byBjYWxsIHN0YWNrIGxpbWl0cykuCiAgICAgICAgICBzdGFjay5zZXQob2JqZWN0LCBvdGhlcik7CiAgICAgICAgICB2YXIgcmVzdWx0ID0gX2VxdWFsQXJyYXlzKGNvbnZlcnQob2JqZWN0KSwgY29udmVydChvdGhlciksIGJpdG1hc2ssIGN1c3RvbWl6ZXIsIGVxdWFsRnVuYywgc3RhY2spOwogICAgICAgICAgc3RhY2tbJ2RlbGV0ZSddKG9iamVjdCk7CiAgICAgICAgICByZXR1cm4gcmVzdWx0OwoKICAgICAgICBjYXNlIHN5bWJvbFRhZyQyOgogICAgICAgICAgaWYgKHN5bWJvbFZhbHVlT2YkMSkgewogICAgICAgICAgICByZXR1cm4gc3ltYm9sVmFsdWVPZiQxLmNhbGwob2JqZWN0KSA9PSBzeW1ib2xWYWx1ZU9mJDEuY2FsbChvdGhlcik7CiAgICAgICAgICB9CiAgICAgIH0KICAgICAgcmV0dXJuIGZhbHNlOwogICAgfQoKICAgIHZhciBfZXF1YWxCeVRhZyA9IGVxdWFsQnlUYWc7CgogICAgLyoqIFVzZWQgdG8gY29tcG9zZSBiaXRtYXNrcyBmb3IgdmFsdWUgY29tcGFyaXNvbnMuICovCiAgICB2YXIgQ09NUEFSRV9QQV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MgYHRydWVgIGlmIHRoZSBvYmplY3RzIGFyZSBlcXVpdmFsZW50LCBlbHNlIGBmYWxzZWAuCiAgICAgKi8KICAgIGZ1bmN0aW9uIGVxdWFsT2JqZWN0cyhvYmplY3QsIG90aGVyLCBiaXRtYXNrLCBjdXN0b21pemVyLCBlcXVhbEZ1bmMsIHN0YWNrKSB7CiAgICAgIHZhciBpc1BhcnRpYWwgPSBiaXRtYXNrICYgQ09NUEFSRV9QQVJUSUFMX0ZMQUckMiwKICAgICAgICAgIG9ialByb3BzID0gX2dldEFsbEtleXMob2JqZWN0KSwKICAgICAgICAgIG9iakxlbmd0aCA9IG9ialByb3BzLmxlbmd0aCwKICAgICAgICAgIG90aFByb3BzID0gX2dldEFsbEtleXMob3RoZXIpLAogICAgICAgICAgb3RoTGVuZ3RoID0gb3RoUHJvcHMubGVuZ3RoOwoKICAgICAgaWYgKG9iakxlbmd0aCAhPSBvdGhMZW5ndGggJiYgIWlzUGFydGlhbCkgewogICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgfQogICAgICB2YXIgaW5kZXggPSBvYmpMZW5ndGg7CiAgICAgIHdoaWxlIChpbmRleC0tKSB7CiAgICAgICAgdmFyIGtleSA9IG9ialByb3BzW2luZGV4XTsKICAgICAgICBpZiAoIShpc1BhcnRpYWwgPyBrZXkgaW4gb3RoZXIgOiBoYXNPd25Qcm9wZXJ0eSRhLmNhbGwob3RoZXIsIGtleSkpKSB7CiAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgfQogICAgICB9CiAgICAgIC8vIEFzc3VtZSBjeWNsaWMgdmFsdWVzIGFyZSBlcXVhbC4KICAgICAgdmFyIHN0YWNrZWQgPSBzdGFjay5nZXQob2JqZWN0KTsKICAgICAgaWYgKHN0YWNrZWQgJiYgc3RhY2suZ2V0KG90aGVyKSkgewogICAgICAgIHJldHVybiBzdGFja2VkID09IG90aGVyOwogICAgICB9CiAgICAgIHZhciByZXN1bHQgPSB0cnVlOwogICAgICBzdGFjay5zZXQob2JqZWN0LCBvdGhlcik7CiAgICAgIHN0YWNrLnNldChvdGhlciwgb2JqZWN0KTsKCiAgICAgIHZhciBza2lwQ3RvciA9IGlzUGFydGlhbDsKICAgICAgd2hpbGUgKCsraW5kZXggPCBvYmpMZW5ndGgpIHsKICAgICAgICBrZXkgPSBvYmpQcm9wc1tpbmRleF07CiAgICAgICAgdmFyIG9ialZhbHVlID0gb2JqZWN0W2tleV0sCiAgICAgICAgICAgIG90aFZhbHVlID0gb3RoZXJba2V5XTsKCiAgICAgICAgaWYgKGN1c3RvbWl6ZXIpIHsKICAgICAgICAgIHZhciBjb21wYXJlZCA9IGlzUGFydGlhbAogICAgICAgICAgICA/IGN1c3RvbWl6ZXIob3RoVmFsdWUsIG9ialZhbHVlLCBrZXksIG90aGVyLCBvYmplY3QsIHN0YWNrKQogICAgICAgICAgICA6IGN1c3RvbWl6ZXIob2JqVmFsdWUsIG90aFZhbHVlLCBrZXksIG9iamVjdCwgb3RoZXIsIHN0YWNrKTsKICAgICAgICB9CiAgICAgICAgLy8gUmVjdXJzaXZlbHkgY29tcGFyZSBvYmplY3RzIChzdXNjZXB0aWJsZSB0byBjYWxsIHN0YWNrIGxpbWl0cykuCiAgICAgICAgaWYgKCEoY29tcGFyZWQgPT09IHVuZGVmaW5lZAogICAgICAgICAgICAgID8gKG9ialZhbHVlID09PSBvdGhWYWx1ZSB8fCBlcXVhbEZ1bmMob2JqVmFsdWUsIG90aFZhbHVlLCBiaXRtYXNrLCBjdXN0b21pemVyLCBzdGFjaykpCiAgICAgICAgICAgICAgOiBjb21wYXJlZAogICAgICAgICAgICApKSB7CiAgICAgICAgICByZXN1bHQgPSBmYWxzZTsKICAgICAgICAgIGJyZWFrOwogICAgICAgIH0KICAgICAgICBza2lwQ3RvciB8fCAoc2tpcEN0b3IgPSBrZXkgPT0gJ2NvbnN0cnVjdG9yJyk7CiAgICAgIH0KICAgICAgaWYgKHJlc3VsdCAmJiAhc2tpcEN0b3IpIHsKICAgICAgICB2YXIgb2JqQ3RvciA9IG9iamVjdC5jb25zdHJ1Y3RvciwKICAgICAgICAgICAgb3RoQ3RvciA9IG90aGVyLmNvbnN0cnVjdG9yOwoKICAgICAgICAvLyBOb24gYE9iamVjdGAgb2JqZWN0IGluc3RhbmNlcyB3aXRoIGRpZmZlcmVudCBjb25zdHJ1Y3RvcnMgYXJlIG5vdCBlcXVhbC4KICAgICAgICBpZiAob2JqQ3RvciAhPSBvdGhDdG9yICYmCiAgICAgICAgICAgICgnY29uc3RydWN0b3InIGluIG9iamVjdCAmJiAnY29uc3RydWN0b3InIGluIG90aGVyKSAmJgogICAgICAgICAgICAhKHR5cGVvZiBvYmpDdG9yID09ICdmdW5jdGlvbicgJiYgb2JqQ3RvciBpbnN0YW5jZW9mIG9iakN0b3IgJiYKICAgICAgICAgICAgICB0eXBlb2Ygb3RoQ3RvciA9PSAnZnVuY3Rpb24nICYmIG90aEN0b3IgaW5zdGFuY2VvZiBvdGhDdG9yKSkgewogICAgICAgICAgcmVzdWx0ID0gZmFsc2U7CiAgICAgICAgfQogICAgICB9CiAgICAgIHN0YWNrWydkZWxldGUnXShvYmplY3QpOwogICAgICBzdGFja1snZGVsZXRlJ10ob3RoZXIpOwogICAgICByZXR1cm4gcmVzdWx0OwogICAgfQoKICAgIHZhciBfZXF1YWxPYmplY3RzID0gZXF1YWxPYmplY3RzOwoKICAgIC8qKiBVc2VkIHRvIGNvbXBvc2UgYml0bWFza3MgZm9yIHZhbHVlIGNvbXBhcmlzb25zLiAqLwogICAgdmFyIENPTVBBUkVfUEFSVElBTF9GTEFHJDMgPSAxOwoKICAgIC8qKiBgT2JqZWN0I3RvU3RyaW5nYCByZXN1bHQgcmVmZXJlbmNlcy4gKi8KICAgIHZhciBhcmdzVGFnJDMgPSAnW29iamVjdCBBcmd1bWVudHNdJywKICAgICAgICBhcnJheVRhZyQyID0gJ1tvYmplY3QgQXJyYXldJywKICAgICAgICBvYmplY3RUYWckMyA9ICdbb2JqZWN0IE9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10gVHJhY2tzIHRyYXZlcnNlZCBgb2JqZWN0YCBhbmQgYG90aGVyYCBvYmplY3RzLgogICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIHRoZSBvYmplY3RzIGFyZSBlcXVpdmFsZW50LCBlbHNlIGBmYWxzZWAuCiAgICAgKi8KICAgIGZ1bmN0aW9uIGJhc2VJc0VxdWFsRGVlcChvYmplY3QsIG90aGVyLCBiaXRtYXNrLCBjdXN0b21pemVyLCBlcXVhbEZ1bmMsIHN0YWNrKSB7CiAgICAgIHZhciBvYmpJc0FyciA9IGlzQXJyYXlfMShvYmplY3QpLAogICAgICAgICAgb3RoSXNBcnIgPSBpc0FycmF5XzEob3RoZXIpLAogICAgICAgICAgb2JqVGFnID0gb2JqSXNBcnIgPyBhcnJheVRhZyQyIDogX2dldFRhZyhvYmplY3QpLAogICAgICAgICAgb3RoVGFnID0gb3RoSXNBcnIgPyBhcnJheVRhZyQyIDogX2dldFRhZyhvdGhlcik7CgogICAgICBvYmpUYWcgPSBvYmpUYWcgPT0gYXJnc1RhZyQzID8gb2JqZWN0VGFnJDMgOiBvYmpUYWc7CiAgICAgIG90aFRhZyA9IG90aFRhZyA9PSBhcmdzVGFnJDMgPyBvYmplY3RUYWckMyA6IG90aFRhZzsKCiAgICAgIHZhciBvYmpJc09iaiA9IG9ialRhZyA9PSBvYmplY3RUYWckMywKICAgICAgICAgIG90aElzT2JqID0gb3RoVGFnID09IG9iamVjdFRhZyQzLAogICAgICAgICAgaXNTYW1lVGFnID0gb2JqVGFnID09IG90aFRhZzsKCiAgICAgIGlmIChpc1NhbWVUYWcgJiYgaXNCdWZmZXJfMShvYmplY3QpKSB7CiAgICAgICAgaWYgKCFpc0J1ZmZlcl8xKG90aGVyKSkgewogICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgIH0KICAgICAgICBvYmpJc0FyciA9IHRydWU7CiAgICAgICAgb2JqSXNPYmogPSBmYWxzZTsKICAgICAgfQogICAgICBpZiAoaXNTYW1lVGFnICYmICFvYmpJc09iaikgewogICAgICAgIHN0YWNrIHx8IChzdGFjayA9IG5ldyBfU3RhY2spOwogICAgICAgIHJldHVybiAob2JqSXNBcnIgfHwgaXNUeXBlZEFycmF5XzEob2JqZWN0KSkKICAgICAgICAgID8gX2VxdWFsQXJyYXlzKG9iamVjdCwgb3RoZXIsIGJpdG1hc2ssIGN1c3RvbWl6ZXIsIGVxdWFsRnVuYywgc3RhY2spCiAgICAgICAgICA6IF9lcXVhbEJ5VGFnKG9iamVjdCwgb3RoZXIsIG9ialRhZywgYml0bWFzaywgY3VzdG9taXplciwgZXF1YWxGdW5jLCBzdGFjayk7CiAgICAgIH0KICAgICAgaWYgKCEoYml0bWFzayAmIENPTVBBUkVfUEFSVElBTF9GTEFHJDMpKSB7CiAgICAgICAgdmFyIG9iaklzV3JhcHBlZCA9IG9iaklzT2JqICYmIGhhc093blByb3BlcnR5JGIuY2FsbChvYmplY3QsICdfX3dyYXBwZWRfXycpLAogICAgICAgICAgICBvdGhJc1dyYXBwZWQgPSBvdGhJc09iaiAmJiBoYXNPd25Qcm9wZXJ0eSRiLmNhbGwob3RoZXIsICdfX3dyYXBwZWRfXycpOwoKICAgICAgICBpZiAob2JqSXNXcmFwcGVkIHx8IG90aElzV3JhcHBlZCkgewogICAgICAgICAgdmFyIG9ialVud3JhcHBlZCA9IG9iaklzV3JhcHBlZCA/IG9iamVjdC52YWx1ZSgpIDogb2JqZWN0LAogICAgICAgICAgICAgIG90aFVud3JhcHBlZCA9IG90aElzV3JhcHBlZCA/IG90aGVyLnZhbHVlKCkgOiBvdGhlcjsKCiAgICAgICAgICBzdGFjayB8fCAoc3RhY2sgPSBuZXcgX1N0YWNrKTsKICAgICAgICAgIHJldHVybiBlcXVhbEZ1bmMob2JqVW53cmFwcGVkLCBvdGhVbndyYXBwZWQsIGJpdG1hc2ssIGN1c3RvbWl6ZXIsIHN0YWNrKTsKICAgICAgICB9CiAgICAgIH0KICAgICAga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2tleV0sCiAgICAgICAgICAgIHNyY1ZhbHVlID0gZGF0YVsxXTsKCiAgICAgICAgaWYgKG5vQ3VzdG9taXplciAmJiBkYXRhWzJdKSB7CiAgICAgICAgICBpZiAob2JqVmFsdWUgPT09IHVuZGVmaW5lZCAmJiAhKGtleSBpbiBvYmplY3QpKSB7CiAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgIH0KICAgICAgICB9IGVsc2UgewogICAgICAgICAgdmFyIHN0YWNrID0gbmV3IF9TdGFjazsKICAgICAgICAgIGlmIChjdXN0b21pemVyKSB7CiAgICAgICAgICAgIHZhciByZXN1bHQgPSBjdXN0b21pemVyKG9ialZhbHVlLCBzcmNWYWx1ZSwga2V5LCBvYmplY3QsIHNvdXJjZSwgc3RhY2spOwogICAgICAgICAgfQogICAgICAgICAgaWYgKCEocmVzdWx0ID09PSB1bmRlZmluZWQKICAgICAgICAgICAgICAgID8gX2Jhc2VJc0VxdWFsKHNyY1ZhbHVlLCBvYmpWYWx1ZSwgQ09NUEFSRV9QQVJUSUFMX0ZMQUckNCB8IENPTVBBUkVfVU5PUkRFUkVEX0ZMQUckMiwgY3VzdG9taXplciwgc3RhY2spCiAgICAgICAgICAgICAgICA6IHJlc3VsdAogICAgICAgICAgICAgICkpIHsKICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgICByZXR1cm4gdHJ1ZTsKICAgIH0KCiAgICB2YXIgX2Jhc2VJc01hdGNoID0gYmFzZUlzTWF0Y2g7CgogICAgLyoqCiAgICAgKiBDaGVja3MgaWYgYHZhbHVlYCBpcyBzdWl0YWJsZSBmb3Igc3RyaWN0IGVxdWFsaXR5IGNvbXBhcmlzb25zLCBpLmUuIGA9PT1gLgogICAgICoKICAgICAqIEBwcml2YXRlCiAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBjaGVjay4KICAgICAqIEByZXR1cm5zIHtib29sZWFuf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Vyc2l2ZWx5IGNvbnZlcnQgdmFsdWVzIChzdXNjZXB0aWJsZSB0byBjYWxsIHN0YWNrIGxpbWl0cykuCiAgICAgICAgcmV0dXJuIF9hcnJheU1hcCh2YWx1ZSwgYmFzZVRvU3RyaW5nKSArICcnOwogICAgICB9CiAgICAgIGlmIChpc1N5bWJvbF8xKHZhbHVlKSkgewogICAgICAgIHJldHVybiBzeW1ib2xUb1N0cmluZyA/IHN5bWJvbFRvU3RyaW5nLmNhbGwodmFsdWUpIDogJyc7CiAgICAgIH0KICAgICAgdmFyIHJlc3VsdCA9ICh2YWx1ZSArICcnKTsKICAgICAgcmV0dXJuIChyZXN1bHQgPT0gJzAnICYmICgxIC8gdmFsdWUpID09IC1JTkZJTklUWSkgPyAnLTAnIDogcmVzdWx0OwogICAgfQoKICAgIHZhciBfYmFzZVRvU3RyaW5nID0gYmFzZVRvU3RyaW5nOwoKICAgIC8qKgogICAgICogQ29udmVydHMgYHZhbHVlYCB0byBhIHN0cmluZy4gQW4gZW1wdHkgc3RyaW5nIGlzIHJldHVybmVkIGZvciBgbnVsbGAKICAgICAqIGFuZCBgdW5kZWZpbmVkYCB2YWx1ZXMuIFRoZSBzaWduIG9mIGAtMGAgaXMgcHJlc2VydmVkLgogICAgICoKICAgICAqIEBzdGF0aWMKICAgICAqIEBtZW1iZXJPZiBfCiAgICAgKiBAc2luY2UgNC4wLjAKICAgICAqIEBjYXRlZ29yeSBMYW5nCiAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBjb252ZXJ0LgogICAgICogQHJldHVybnMge3N0cmluZ30gUmV0dXJucyB0aGUgY29udmVydGVkIHN0cmluZy4KICAgICAqIEBleGFtcGxlCiAgICAgKgogICAgICogXy50b1N0cmluZyhudWxsKTsKICAgICAqIC8vID0+ICcnCiAgICAgKgogICAgICogXy50b1N0cmluZygtMCk7CiAgICAgKiAvLyA9PiAnLTAnCiAgICAgKgogICAgICogXy50b1N0cmluZyhbMSwgMi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IHRoZSBzdHJpbmcgc2l6ZS4KICAgICAqLwogICAgZnVuY3Rpb24gdW5pY29kZVNpemUoc3RyaW5nKSB7CiAgICAgIHZhciByZXN1bHQgPSByZVVuaWNvZGUubGFzdEluZGV4ID0gMDsKICAgICAgd2hpbGUgKHJlVW5pY29kZS50ZXN0KHN0cmluZykpIHsKICAgICAgICArK3Jlc3VsdDsKICAgICAgfQogICAgICByZXR1cm4gcmVzdWx0OwogICAgfQoKICAgIHZhciBfdW5pY29kZVNpemUgPSB1bmljb2RlU2l6ZTsKCiAgICAvKioKICAgICAqIEdldHMgdGhlIG51bWJlciBvZiBzeW1ib2xzIGluIGBzdHJpbmdgLgogICAgICoKICAgICAqIEBwcml2YXRlCiAgICAgKiBAcGFyYW0ge3N0cmluZ30gc3RyaW5nIFRoZSBzdHJpbmcgdG8gaW5zcGVjdC4KICAgICAqIEByZXR1cm5zIHtudW1iZXJ9IFJldHVybnMgdGhlIHN0cmluZyBzaXplLgogICAgICovCiAgICBmdW5jdGlvbiBzdHJpbmdTaXplKHN0cmluZykgewogICAgICByZXR1cm4gX2hhc1VuaWNvZGUoc3RyaW5nKQogICAgICAgID8gX3VuaWNvZGVTaXplKHN0cmluZykKICAgICAgICA6IF9hc2NpaVNpemUoc3RyaW5nKTsKICAgIH0KCiAgICB2YXIgX3N0cmluZ1NpemUgPSBzdHJpbmdTaXplOwoKICAgIC8qKiBgT2JqZWN0I3RvU3RyaW5nYCByZXN1bHQgcmVmZXJlbmNlcy4gKi8KICAgIHZhciBtYXBUYWckNyA9ICdbb2JqZWN0IE1hcF0nLAogICAgICAgIHNldFRhZyQ3ID0gJ1tvYmplY3QgU2V0XSc7CgogICAgLyoqCiAgICAgKiBHZXRzIHRoZSBzaXplIG9mIGBjb2xsZWN0aW9uYCBieSByZXR1cm5pbmcgaXRzIGxlbmd0aCBmb3IgYXJyYXktbGlrZQogICAgICogdmFsdWVzIG9yIHRoZSBudW1iZXIgb2Ygb3duIGVudW1lcmFibGUgc3RyaW5nIGtleWVkIHByb3BlcnRpZXMgZm9yIG9iamVjdHMuCiAgICAgKgogICAgICogQHN0YXRpYwogICAgICogQG1lbWJlck9mIF8KICAgICAqIEBzaW5jZSAwLjEuMAogICAgICogQGNhdGVnb3J5IENvbGxlY3Rpb24KICAgICAqIEBwYXJhbSB7QXJyYXl8T2JqZWN0fHN0cmluZ30gY29sbGVjdGlvbiBUaGUgY29sbGVjdGlvbiB0byBpbnNwZWN0LgogICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgY29sbGVjdGlvbiBzaXplLgogICAgICogQGV4YW1wbGUKICAgICAqCiAgICAgKiBfLnNpemUoWzEsIDIsIDNdKTsKICAgICAqIC8vID0+IDMKICAgICAqCiAgICAgKiBfLnNpemUoeyAnYSc6IDEsICdiJzogMiB9KTsKICAgICAqIC8vID0+IDIKICAgICAqCiAgICAgKiBfLnNpemUoJ3BlYmJsZXMnKTsKICAgICAqIC8vID0+IDcKICAgICAqLwogICAgZnVuY3Rpb24gc2l6ZShjb2xsZWN0aW9uKSB7CiAgICAgIGlmIChjb2xsZWN0aW9uID09IG51bGwpIHsKICAgICAgICByZXR1cm4gMDsKICAgICAgfQogICAgICBpZiAoaXNBcnJheUxpa2VfMShjb2xsZWN0aW9uKSkgewogICAgICAgIHJldHVybiBpc1N0cmluZ18xKGNvbGxlY3Rpb24pID8gX3N0cmluZ1NpemUoY29sbGVjdGlvbikgOiBjb2xsZWN0aW9uLmxlbmd0aDsKICAgICAgfQogICAgICB2YXIgdGFnID0gX2dldFRhZyhjb2xsZWN0aW9uKTsKICAgICAgaWYgKHRhZyA9PSBtYXBUYWckNyB8fCB0YWcgPT0gc2V0VGFnJDcpIHsKICAgICAgICByZXR1cm4gY29sbGVjdGlvbi5zaXplOwogICAgICB9CiAgICAgIHJldHVybiBfYmFzZUtleXMoY29sbGVjdGlvbikubGVuZ3RoOwogICAgfQoKICAgIHZhciBzaXplXzEgPSBzaXplOwoKICAgIC8qKgogICAgICogQW4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HVlID0gYXJyYXlbaW5kZXhdLAogICAgICAgICAgICBjb21wdXRlZCA9IGl0ZXJhdGVlID8gaXRlcmF0ZWUodmFsdWUpIDogdmFsdWU7CgogICAgICAgIHZhbHVlID0gKGNvbXBhcmF0b3IgfHwgdmFsdWUgIT09IDApID8gdmFsdWUgOiAwOwogICAgICAgIGlmIChpc0NvbW1vbiAmJiBjb21wdXRlZCA9PT0gY29tcHV0ZWQpIHsKICAgICAgICAgIHZhciBzZWVuSW5kZXggPSBzZWVuLmxlbmd0aDsKICAgICAgICAgIHdoaWxlIChzZWVuSW5kZXgtLSkgewogICAgICAgICAgICBpZiAoc2VlbltzZWVuSW5kZXhdID09PSBjb21wdXRlZCkgewogICAgICAgICAgICAgIGNvbnRpbnVlIG91dGVyOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICBpZiAoaXRlcmF0ZWUpIHsKICAgICAgICAgICAgc2Vlbi5wdXNoKGNvbXB1dGVkKTsKICAgICAgICAgIH0KICAgICAgICAgIHJlc3VsdC5wdXNoKHZhbHVlKTsKICAgICAgICB9CiAgICAgICAgZWxzZSBpZiAoIWluY2x1ZGVzKHNlZW4sIGNvbXB1dGVkLCBjb21wYXJhdG9yKSkgewogICAgICAgICAgaWYgKHNlZW4gIT09IHJlc3VsdCkgewogICAgICAgICAgICBzZWVuLnB1c2goY29tcHV0ZWQpOwogICAgICAgICAgfQogICAgICAgICAgcmVzdWx0LnB1c2godmFsdWUpOwogICAgICAgIH0KICAgICAgfQogICAgICByZXR1cm4gcmVzdWx0OwogICAgfQoKICAgIHZhciBfYmFzZVVuaXEgPSBiYXNlVW5pcTsKCiAgICAvKioKICAgICAqIFRoaXMgbWV0aG9kIGlzIGxpa2UgYF8uaXNBcnJheUxpa2VgIGV4Y2VwdCB0aGF0IGl0IGFsc28gY2hlY2tzIGlmIGB2YWx1ZWAKICAgICAqIGlzIGFuIG9iamVjdC4KICAgICAqCiAgICAgKiBAc3RhdGljCiAgICAgKiBAbWVt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sdWVzJDIob2JqZWN0KSB7CiAgICAgIHJldHVybiBvYmplY3QgPT0gbnVsbCA/IFtdIDogX2Jhc2VWYWx1ZXMob2JqZWN0LCBrZXlzXzEob2JqZWN0KSk7CiAgICB9CgogICAgdmFyIHZhbHVlc18xID0gdmFsdWVzJDI7CgogICAgLyogZ2xvYmFsIHdpbmRvdyAqLwoKICAgIHZhciBsb2Rhc2gkMTsKCiAgICBpZiAodHlwZW9mIGNvbW1vbmpzUmVxdWlyZSA9PT0gImZ1bmN0aW9uIikgewogICAgICB0cnkgewogICAgICAgIGxvZGFzaCQxID0gewogICAgICAgICAgY2xvbmU6IGNsb25lXzEsCiAgICAgICAgICBjb25zdGFudDogY29uc3RhbnRfMSwKICAgICAgICAgIGVhY2g6IGVhY2gsCiAgICAgICAgICBmaWx0ZXI6IGZpbHRlcl8xLAogICAgICAgICAgaGFzOiAgaGFzXzEsCiAgICAgICAgICBpc0FycmF5OiBpc0FycmF5XzEsCiAgICAgICAgICBpc0VtcHR5OiBpc0VtcHR5XzEsCiAgICAgICAgICBpc0Z1bmN0aW9uOiBpc0Z1bmN0aW9uXzEsCiAgICAgICAgICBpc1VuZGVmaW5lZDogaXNVbmRlZmluZWRfMSwKICAgICAgICAgIGtleXM6IGtleXNfMSwKICAgICAgICAgIG1hcDogbWFwXzEsCiAgICAgICAgICByZWR1Y2U6IHJlZHVjZV8xLAogICAgICAgICAgc2l6ZTogc2l6ZV8xLAogICAgICAgICAgdHJhbnNmb3JtOiB0cmFuc2Zvcm1fMSwKICAgICAgICAgIHVuaW9uOiB1bmlvbl8xLAogICAgICAgICAgdmFsdWVzOiB2YWx1ZXNfMQogICAgICAgIH07CiAgICAgIH0gY2F0Y2ggKGUpIHsKICAgICAgICAvLyBjb250aW51ZSByZWdhcmRsZXNzIG9mIGVycm9yCiAgICAgIH0KICAgIH0KCiAgICBpZiAoIWxvZGFzaCQxKSB7CiAgICAgIGxvZGFzaCQxID0gd2luZG93Ll87CiAgICB9CgogICAgdm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GhpczsKICAgIH07CgogICAgR3JhcGgucHJvdG90eXBlLmdyYXBoID0gZnVuY3Rpb24oKSB7CiAgICAgIHJldHVybiB0aGlzLl9sYWJlbDsKICAgIH07CgoKICAgIC8qID09PSBOb2RlIGZ1bmN0aW9ucyA9PT09PT09PT09ICovCgogICAgR3JhcGgucHJvdG90eXBlLnNldERlZmF1bHROb2RlTGFiZWwgPSBmdW5jdGlvbihuZXdEZWZhdWx0KSB7CiAgICAgIGlmICghbG9kYXNoXzEuaXNGdW5jdGlvbihuZXdEZWZhdWx0KSkgewogICAgICAgIG5ld0RlZmF1bHQgPSBsb2Rhc2hfMS5jb25zdGFudChuZXdEZWZhdWx0KTsKICAgICAgfQogICAgICB0aGlzLl9kZWZhdWx0Tm9kZUxhYmVsRm4gPSBuZXdEZWZhdWx0OwogICAgICByZXR1cm4gdGhpczsKICAgIH07CgogICAgR3JhcGgucHJvdG90eXBlLm5vZGVDb3VudCA9IGZ1bmN0aW9uKCkgewogICAgICByZXR1cm4gdGhpcy5fbm9kZUNvdW50OwogICAgfTsKCiAgICBHcmFwaC5wcm90b3R5cGUubm9kZXMgPSBmdW5jdGlvbigpIHsKICAgICAgcmV0dXJuIGxvZGFzaF8xLmtleXModGhpcy5fbm9kZXMpOwogICAgfTsKCiAgICBHcmFwaC5wcm90b3R5cGUuc291cmNlcyA9IGZ1bmN0aW9uKCkgewogICAgICB2YXIgc2VsZiA9IHRoaXM7CiAgICAgIHJldHVybiBsb2Rhc2hfMS5maWx0ZXIodGhpcy5ub2RlcygpLCBmdW5jdGlvbih2KSB7CiAgICAgICAgcmV0dXJuIGxvZGFzaF8xLmlzRW1wdHkoc2VsZi5faW5bdl0pOwogICAgICB9KTsKICAgIH07CgogICAgR3JhcGgucHJvdG90eXBlLnNpbmtzID0gZnVuY3Rpb24oKSB7CiAgICAgIHZhciBzZWxmID0gdGhpczsKICAgICAgcmV0dXJuIGxvZGFzaF8xLmZpbHRlcih0aGlzLm5vZGVzKCksIGZ1bmN0aW9uKHYpIHsKICAgICAgICByZXR1cm4gbG9kYXNoXzEuaXNFbXB0eShzZWxmLl9vdXRbdl0pOwogICAgICB9KTsKICAgIH07CgogICAgR3JhcGgucHJvdG90eXBlLnNldE5vZGVzID0gZnVuY3Rpb24odnMsIHZhbHVlKSB7CiAgICAgIHZhciBhcmdzID0gYXJndW1lbnRzOwogICAgICB2YXIgc2VsZiA9IHRoaXM7CiAgICAgIGxvZGFzaF8xLmVhY2godnMsIGZ1bmN0aW9uKHYpIHsKICAgICAgICBpZiAoYXJncy5sZW5ndGggPiAxKSB7CiAgICAgICAgICBzZWxmLnNldE5vZGUodiwgdmFsdWUpOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICBzZWxmLnNldE5vZGUodik7CiAgICAgICAgfQogICAgICB9KTsKICAgICAgcmV0dXJuIHRoaXM7CiAgICB9OwoKICAgIEdyYXBoLnByb3RvdHlwZS5zZXROb2RlID0gZnVuY3Rpb24odiwgdmFsdWUpIHsKICAgICAgaWYgKGxvZGFzaF8xLmhhcyh0aGlzLl9ub2RlcywgdikpIHsKICAgICAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA+IDEpIHsKICAgICAgICAgIHRoaXMuX25vZGVzW3ZdID0gdmFsdWU7CiAgICAgICAgfQogICAgICAgIHJldHVybiB0aGlzOwogICAgICB9CgogICAgICB0aGlzLl9ub2Rlc1t2XSA9IGFyZ3VtZW50cy5sZW5ndGggPiAxID8gdmFsdWUgOiB0aGlzLl9kZWZhdWx0Tm9kZUxhYmVsRm4odik7CiAgICAgIGlmICh0aGlzLl9pc0NvbXBvdW5kKSB7CiAgICAgICAgdGhpcy5fcGFyZW50W3ZdID0gR1JBUEhfTk9ERTsKICAgICAgICB0aGlzLl9jaGlsZHJlblt2XSA9IHt9OwogICAgICAgIHRoaXMuX2NoaWxkcmVuW0dSQVBIX05PREVdW3ZdID0gdHJ1ZTsKICAgICAgfQogICAgICB0aGlzLl9pblt2XSA9IHt9OwogICAgICB0aGlzLl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dmVFZGdlKTsKICAgICAgICBkZWxldGUgdGhpcy5faW5bdl07CiAgICAgICAgZGVsZXRlIHRoaXMuX3ByZWRzW3ZdOwogICAgICAgIGxvZGFzaF8xLmVhY2gobG9kYXNoXzEua2V5cyh0aGlzLl9vdXRbdl0pLCByZW1vdmVFZGdlKTsKICAgICAgICBkZWxldGUgdGhpcy5fb3V0W3ZdOwogICAgICAgIGRlbGV0ZSB0aGlzLl9zdWNzW3ZdOwogICAgICAgIC0tdGhpcy5fbm9kZUNvdW50OwogICAgICB9CiAgICAgIHJldHVybiB0aGlzOwogICAgfTsKCiAgICBHcmFwaC5wcm90b3R5cGUuc2V0UGFyZW50ID0gZnVuY3Rpb24odiwgcGFyZW50KSB7CiAgICAgIGlmICghdGhpcy5faXNDb21wb3VuZCkgewogICAgICAgIHRocm93IG5ldyBFcnJvcigiQ2Fubm90IHNldCBwYXJlbnQgaW4gYSBub24tY29tcG91bmQgZ3JhcGgiKTsKICAgICAgfQoKICAgICAgaWYgKGxvZGFzaF8xLmlzVW5kZWZpbmVkKHBhcmVudCkpIHsKICAgICAgICBwYXJlbnQgPSBHUkFQSF9OT0RFOwogICAgICB9IGVsc2UgewogICAgICAgIC8vIENvZXJjZSBwYXJlbnQgdG8gc3RyaW5nCiAgICAgICAgcGFyZW50ICs9ICIiOwogICAgICAgIGZvciAodmFyIGFuY2VzdG9yID0gcGFyZW50OwogICAgICAgICAgIWxvZGFzaF8xLmlzVW5kZWZpbmVkKGFuY2VzdG9yKTsKICAgICAgICAgIGFuY2VzdG9yID0gdGhpcy5wYXJlbnQoYW5jZXN0b3IpKSB7CiAgICAgICAgICBpZiAoYW5jZXN0b3IgPT09IHYpIHsKICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCJTZXR0aW5nICIgKyBwYXJlbnQrICIgYXMgcGFyZW50IG9mICIgKyB2ICsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICIgd291bGQgY3JlYXRlIGEgY3ljbGUiKTsKICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIHRoaXMuc2V0Tm9kZShwYXJlbnQpOwogICAgICB9CgogICAgICB0aGlzLnNldE5vZGUodik7CiAgICAgIHRoaXMuX3JlbW92ZUZyb21QYXJlbnRzQ2hpbGRMaXN0KHYpOwogICAgICB0aGlzLl9wYXJlbnRbdl0gPSBwYXJlbnQ7CiAgICAgIHRoaXMuX2NoaWxkcmVuW3BhcmVudF1bdl0gPSB0cnVlOwogICAgICByZXR1cm4gdGhpczsKICAgIH07CgogICAgR3JhcGgucHJvdG90eXBlLl9yZW1vdmVGcm9tUGFyZW50c0NoaWxkTGlzdCA9IGZ1bmN0aW9uKHYpIHsKICAgICAgZGVsZXRlIHRoaXMuX2NoaWxkcmVuW3RoaXMuX3BhcmVudFt2XV1bdl07CiAgICB9OwoKICAgIEdyYXBoLnByb3RvdHlwZS5wYXJlbnQgPSBmdW5jdGlvbih2KSB7CiAgICAgIGlmICh0aGlzLl9pc0NvbXBvdW5kKSB7CiAgICAgICAgdmFyIHBhcmVudCA9IHRoaXMuX3BhcmVudFt2XTsKICAgICAgICBpZiAocGFyZW50ICE9PSBHUkFQSF9OT0RFKSB7CiAgICAgICAgICByZXR1cm4gcGFyZW50OwogICAgICAgIH0KICAgICAgfQogICAgfTsKCiAgICBHcmFwaC5wcm90b3R5cGUuY2hpbGRyZW4gPSBmdW5jdGlvbih2KSB7CiAgICAgIGlmIChsb2Rhc2hfMS5pc1VuZGVmaW5lZCh2KSkgewogICAgICAgIHYgPSBHUkFQSF9OT0RFOwogICAgICB9CgogICAgICBpZiAodGhpcy5faXNDb21wb3VuZCkgewogICAgICAgIHZhciBjaGlsZHJlbiA9IHRoaXMuX2NoaWxkcmVuW3ZdOwogICAgICAgIGlmIChjaGlsZHJlbikgewogICAgICAgICAgcmV0dXJuIGxvZGFzaF8xLmtleXMoY2hpbGRyZW4pOwogICAgICAgIH0KICAgICAgfSBlbHNlIGlmICh2ID09PSBHUkFQSF9OT0RFKSB7CiAgICAgICA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vdG90eXBlLmZpbHRlck5vZGVzID0gZnVuY3Rpb24oZmlsdGVyKSB7CiAgICAgIHZhciBjb3B5ID0gbmV3IHRoaXMuY29uc3RydWN0b3IoewogICAgICAgIGRpcmVjdGVkOiB0aGlzLl9pc0RpcmVjdGVkLAogICAgICAgIG11bHRpZ3JhcGg6IHRoaXMuX2lzTXVsdGlncmFwaCwKICAgICAgICBjb21wb3VuZDogdGhpcy5faXNDb21wb3VuZAogICAgICB9KTsKCiAgICAgIGNvcHkuc2V0R3JhcGgodGhpcy5ncmFwaCgpKTsKCiAgICAgIHZhciBzZWxmID0gdGhpczsKICAgICAgbG9kYXNoXzEuZWFjaCh0aGlzLl9ub2RlcywgZnVuY3Rpb24odmFsdWUsIHYpIHsKICAgICAgICBpZiAoZmlsdGVyKHYpKSB7CiAgICAgICAgICBjb3B5LnNldE5vZGUodiwgdmFsdWUpOwogICAgICAgIH0KICAgICAgfSk7CgogICAgICBsb2Rhc2hfMS5lYWNoKHRoaXMuX2VkZ2VPYmpzLCBmdW5jdGlvbihlKSB7CiAgICAgICAgaWYgKGNvcHkuaGFzTm9kZShlLnYpICYmIGNvcHkuaGFzTm9kZShlLncpKSB7CiAgICAgICAgICBjb3B5LnNldEVkZ2UoZSwgc2VsZi5lZGdlKGUpKTsKICAgICAgICB9CiAgICAgIH0pOwoKICAgICAgdmFyIHBhcmVudHMgPSB7fTsKICAgICAgZnVuY3Rpb24gZmluZFBhcmVudCh2KSB7CiAgICAgICAgdmFyIHBhcmVudCA9IHNlbGYucGFyZW50KHYpOwogICAgICAgIGlmIChwYXJlbnQgPT09IHVuZGVmaW5lZCB8fCBjb3B5Lmhhc05vZGUocGFyZW50KSkgewogICAgICAgICAgcGFyZW50c1t2XSA9IHBhcmVudDsKICAgICAgICAgIHJldHVybiBwYXJlbnQ7CiAgICAgICAgfSBlbHNlIGlmIChwYXJlbnQgaW4gcGFyZW50cykgewogICAgICAgICAgcmV0dXJuIHBhcmVudHNbcGFyZW50XTsKICAgIC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W5jdGlvbih2LCB3KSB7CiAgICAgICAgaWYgKGFyZ3MubGVuZ3RoID4gMSkgewogICAgICAgICAgc2VsZi5zZXRFZGdlKHYsIHcsIHZhbHVlKTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgc2VsZi5zZXRFZGdlKHYsIHcpOwogICAgICAgIH0KICAgICAgICByZXR1cm4gdzsKICAgICAgfSk7CiAgICAgIHJldHVybiB0aGlzOwogICAgfTsKCiAgICAvKgogICAgICogc2V0RWRnZSh2LCB3LCBbdmFsdWUsIFtuYW1lXV0pCiAgICAgKiBzZXRFZGdlKHsgdiwgdywgW25hbWVdIH0sIFt2YWx1ZV0pCiAgICAgKi8KICAgIEdyYXBoLnByb3RvdHlwZS5zZXRFZGdlID0gZnVuY3Rpb24oKSB7CiAgICAgIHZhciB2LCB3LCBuYW1lLCB2YWx1ZTsKICAgICAgdmFyIHZhbHVlU3BlY2lmaWVkID0gZmFsc2U7CiAgICAgIHZhciBhcmcwID0gYXJndW1lbnRzWzBdOwoKICAgICAgaWYgKHR5cGVvZiBhcmcwID09PSAib2JqZWN0IiAmJiBhcmcwICE9PSBudWxsICYmICJ2IiBpbiBhcmcwKSB7CiAgICAgICAgdiA9IGFyZzAudjsKICAgICAgICB3ID0gYXJnMC53OwogICAgICAgIG5hbWUgPSBhcmcwLm5hbWU7CiAgICAgICAgaWYgKGFyZ3VtZW50cy5sZW5ndGggPT09IDIpIHsKICAgICAgICAgIHZhbHVlID0gYXJndW1lbnRzWzFdOwogICAgICAgICAgdmFsdWVTcGVjaWZpZWQgPSB0cnVlOwogICAgICAgIH0KICAgICAgfSBlbHNlIHsKICAgICAgICB2ID0gYXJnMDsKICAgICAgICB3ID0gYXJndW1lbnRzWzFdOwogICAgICAgIG5hbWUgPSBhcmd1bWVudHNbM107CiAgICAgICAgaWYgKGFyZ3VtZW50cy5sZW5ndGggPiAyKSB7CiAgICAgICAgICB2YWx1ZSA9IGFyZ3VtZW50c1syXTsKICAgICAgICAgIHZhbHVl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BncmFwaCwKICAgICAgdmVyc2lvbjogdmVyc2lvbiQ0CiAgICB9OwoKICAgIHZhciBqc29uJDIgPSB7CiAgICAgIHdyaXRlOiB3cml0ZSwKICAgICAgcmVhZDogcmVhZAogICAgfTsKCiAgICBmdW5jdGlvbiB3cml0ZShnKSB7CiAgICAgIHZhciBqc29uID0gewogICAgICAgIG9wdGlvbnM6IHsKICAgICAgICAgIGRpcmVjdGVkOiBnLmlzRGlyZWN0ZWQoKSwKICAgICAgICAgIG11bHRpZ3JhcGg6IGcuaXNNdWx0aWdyYXBoKCksCiAgICAgICAgICBjb21wb3VuZDogZy5pc0NvbXBvdW5kKCkKICAgICAgICB9LAogICAgICAgIG5vZGVzOiB3cml0ZU5vZGVzKGcpLAogICAgICAgIGVkZ2VzOiB3cml0ZUVkZ2VzKGcpCiAgICAgIH07CiAgICAgIGlmICghbG9kYXNoXzEuaXNVbmRlZmluZWQoZy5ncmFwaCgpKSkgewogICAgICAgIGpzb24udmFsdWUgPSBsb2Rhc2hfMS5jbG9uZShnLmdyYXBoKCkpOwogICAgICB9CiAgICAgIHJldHVybiBqc29uOwogICAgfQoKICAgIGZ1bmN0aW9uIHdyaXRlTm9kZXMoZykgewogICAgICByZXR1cm4gbG9kYXNoXzEubWFwKGcubm9kZXMoKSwgZnVuY3Rpb24odikgewogICAgICAgIHZhciBub2RlVmFsdWUgPSBnLm5vZGUodik7CiAgICAgICAgdmFyIHBhcmVudCA9IGcucGFyZW50KHYpOwogICAgICAgIHZhciBub2RlID0geyB2OiB2IH07CiAgICAgICAgaWYgKCFsb2Rhc2hfMS5pc1VuZGVmaW5lZChub2RlVmFsdWUpKSB7CiAgICAgICAgICBub2RlLnZhbHVlID0gbm9kZVZhbHVlOwogICAgICAgIH0KICAgICAgICBpZiAoIWxvZGFzaF8xLmlzVW5kZWZpbmVkKHBhcmVudCkpIHsKICAgICAgICAgIG5vZGUucGFyZW50ID0gcGFyZW50OwogICAgICAgIH0KICAgICAgICByZXR1cm4gbm9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A9IGNvbXBvbmVudHMkMTsKCiAgICBmdW5jdGlvbiBjb21wb25lbnRzJDEoZykgewogICAgICB2YXIgdmlzaXRlZCA9IHt9OwogICAgICB2YXIgY21wdHMgPSBbXTsKICAgICAgdmFyIGNtcHQ7CgogICAgICBmdW5jdGlvbiBkZnModikgewogICAgICAgIGlmIChsb2Rhc2hfMS5oYXModmlzaXRlZCwgdikpIHJldHVybjsKICAgICAgICB2aXNpdGVkW3ZdID0gdHJ1ZTsKICAgICAgICBjbXB0LnB1c2godik7CiAgICAgICAgbG9kYXNoXzEuZWFjaChnLnN1Y2Nlc3NvcnModiksIGRmcyk7CiAgICAgICAgbG9kYXNoXzEuZWFjaChnLnByZWRlY2Vzc29ycyh2KSwgZGZzKTsKICAgICAgfQoKICAgICAgbG9kYXNoXzEuZWFjaChnLm5vZGVzKCksIGZ1bmN0aW9uKHYpIHsKICAgICAgICBjbXB0ID0gW107CiAgICAgICAgZGZzKHYpOwogICAgICAgIGlmIChjbXB0Lmxlbmd0aCkgewogICAgICAgICAgY21wdHMucHVzaChjbXB0KTsKICAgICAgICB9CiAgICAgIH0pOwoKICAgICAgcmV0dXJuIGNtcHRzOwogICAgfQoKICAgIHZhciBwcmlvcml0eVF1ZXVlID0gUHJpb3JpdHlRdWV1ZTsKCiAgICAvKioKICAgICAqIEEgbWluLXByaW9yaXR5IHF1ZXVlIGRhdGEgc3RydWN0dXJlLiBUaGlzIGFsZ29yaXRobSBpcyBkZXJpdmVkIGZyb20gQ29ybWVuLAogICAgICogZXQgYWwuLCAiSW50cm9kdWN0aW9uIHRvIEFsZ29yaXRobXMiLiBUaGUgYmFzaWMgaWRlYSBvZiBhIG1pbi1wcmlvcml0eQogICAgICogcXVldWUgaXMgdGhhdCB5b3UgY2FuIGVmZmljaWVudGx5IChpbiBPKDEpIHRpbWUpIGdldCB0aGUgc21hbGxlc3Qga2V5IGluCiAgICAgKiB0aGUgcXVldWUuIEFkZGluZyBhbmQgcmVtb3ZpbmcgZWxlbWV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AgaWYgKGwgPCBhcnIubGVuZ3RoKSB7CiAgICAgICAgbGFyZ2VzdCA9IGFycltsXS5wcmlvcml0eSA8IGFycltsYXJnZXN0XS5wcmlvcml0eSA/IGwgOiBsYXJnZXN0OwogICAgICAgIGlmIChyIDwgYXJyLmxlbmd0aCkgewogICAgICAgICAgbGFyZ2VzdCA9IGFycltyXS5wcmlvcml0eSA8IGFycltsYXJnZXN0XS5wcmlvcml0eSA/IHIgOiBsYXJnZXN0OwogICAgICAgIH0KICAgICAgICBpZiAobGFyZ2VzdCAhPT0gaSkgewogICAgICAgICAgdGhpcy5fc3dhcChpLCBsYXJnZXN0KTsKICAgICAgICAgIHRoaXMuX2hlYXBpZnkobGFyZ2VzdCk7CiAgICAgICAgfQogICAgICB9CiAgICB9OwoKICAgIFByaW9yaXR5UXVldWUucHJvdG90eXBlLl9kZWNyZWFzZSA9IGZ1bmN0aW9uKGluZGV4KSB7CiAgICAgIHZhciBhcnIgPSB0aGlzLl9hcnI7CiAgICAgIHZhciBwcmlvcml0eSA9IGFycltpbmRleF0ucHJpb3JpdHk7CiAgICAgIHZhciBwYXJlbnQ7CiAgICAgIHdoaWxlIChpbmRleCAhPT0gMCkgewogICAgICAgIHBhcmVudCA9IGluZGV4ID4+IDE7CiAgICAgICAgaWYgKGFycltwYXJlbnRdLnByaW9yaXR5IDwgcHJpb3JpdHkpIHsKICAgICAgICAgIGJyZWFrOwogICAgICAgIH0KICAgICAgICB0aGlzLl9zd2FwKGluZGV4LCBwYXJlbnQpOwogICAgICAgIGluZGV4ID0gcGFyZW50OwogICAgICB9CiAgICB9OwoKICAgIFByaW9yaXR5UXVldWUucHJvdG90eXBlLl9zd2FwID0gZnVuY3Rpb24oaSwgaikgewogICAgICB2YXIgYXJyID0gdGhpcy5fYXJyOwogICAgICB2YXIga2V5SW5kaWNlcyA9IHRoaXMuX2tleUluZGljZXM7CiAgICAgIHZhciBvcmlnQXJySSA9IGFycltpXTsKICAgICAgdmFyIG9yaWdBcnJKID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hyb3cgbmV3IEVycm9yKCJkaWprc3RyYSBkb2VzIG5vdCBhbGxvdyBuZWdhdGl2ZSBlZGdlIHdlaWdodHMuICIgKwogICAgICAgICAgICAgICAgICAgICAgICAgICJCYWQgZWRnZTogIiArIGVkZ2UgKyAiIFdlaWdodDogIiArIHdlaWdodCk7CiAgICAgICAgfQoKICAgICAgICBpZiAoZGlzdGFuY2UgPCB3RW50cnkuZGlzdGFuY2UpIHsKICAgICAgICAgIHdFbnRyeS5kaXN0YW5jZSA9IGRpc3RhbmNlOwogICAgICAgICAgd0VudHJ5LnByZWRlY2Vzc29yID0gdjsKICAgICAgICAgIHBxLmRlY3JlYXNlKHcsIGRpc3RhbmNlKTsKICAgICAgICB9CiAgICAgIH07CgogICAgICBnLm5vZGVzKCkuZm9yRWFjaChmdW5jdGlvbih2KSB7CiAgICAgICAgdmFyIGRpc3RhbmNlID0gdiA9PT0gc291cmNlID8gMCA6IE51bWJlci5QT1NJVElWRV9JTkZJTklUWTsKICAgICAgICByZXN1bHRzW3ZdID0geyBkaXN0YW5jZTogZGlzdGFuY2UgfTsKICAgICAgICBwcS5hZGQodiwgZGlzdGFuY2UpOwogICAgICB9KTsKCiAgICAgIHdoaWxlIChwcS5zaXplKCkgPiAwKSB7CiAgICAgICAgdiA9IHBxLnJlbW92ZU1pbigpOwogICAgICAgIHZFbnRyeSA9IHJlc3VsdHNbdl07CiAgICAgICAgaWYgKHZFbnRyeS5kaXN0YW5jZSA9PT0gTnVtYmVyLlBPU0lUSVZFX0lORklOSVRZKSB7CiAgICAgICAgICBicmVhazsKICAgICAgICB9CgogICAgICAgIGVkZ2VGbih2KS5mb3JFYWNoKHVwZGF0ZU5laWdoYm9ycyk7CiAgICAgIH0KCiAgICAgIHJldHVybiByZXN1bHRzOwogICAgfQoKICAgIHZhciBkaWprc3RyYUFsbF8xID0gZGlqa3N0cmFBbGw7CgogICAgZnVuY3Rpb24gZGlqa3N0cmFBbGwoZywgd2VpZ2h0RnVuYywgZWRnZUZ1bmMpIHsKICAgICAgcmV0dXJuIGxvZGFzaF8xLnRyYW5zZm9ybShnLm5vZGVzKCksIGZ1bmN0aW9uKGFjYywgdikgewogICAgICAgIGFjY1t2XSA9IGRpamtzdHJhXzEoZywgdiwgd2VpZ2h0RnVuYywgZWRnZUZ1bmMpOwogICAgICB9LCB7fSk7CiAgICB9CgogICAgdmFyIHRhcmphbl8xID0gdGFyamFuOwoKICAgIGZ1bmN0aW9uIHRhcmphbihnKSB7CiAgICAgIHZhciBpbmRleCA9IDA7CiAgICAgIHZhciBzdGFjayA9IFtdOwogICAgICB2YXIgdmlzaXRlZCA9IHt9OyAvLyBub2RlIGlkIC0+IHsgb25TdGFjaywgbG93bGluaywgaW5kZXggfQogICAgICB2YXIgcmVzdWx0cyA9IFtdOwoKICAgICAgZnVuY3Rpb24gZGZzKHYpIHsKICAgICAgICB2YXIgZW50cnkgPSB2aXNpdGVkW3ZdID0gewogICAgICAgICAgb25TdGFjazogdHJ1ZSwKICAgICAgICAgIGxvd2xpbms6IGluZGV4LAogICAgICAgICAgaW5kZXg6IGluZGV4KysKICAgICAgICB9OwogICAgICAgIHN0YWNrLnB1c2godik7CgogICAgICAgIGcuc3VjY2Vzc29ycyh2KS5mb3JFYWNoKGZ1bmN0aW9uKHcpIHsKICAgICAgICAgIGlmICghbG9kYXNoXzEuaGFzKHZpc2l0ZWQsIHcpKSB7CiAgICAgICAgICAgIGRmcyh3KTsKICAgICAgICAgICAgZW50cnkubG93bGluayA9IE1hdGgubWluKGVudHJ5Lmxvd2xpbmssIHZpc2l0ZWRbd10ubG93bGluayk7CiAgICAgICAgICB9IGVsc2UgaWYgKHZpc2l0ZWRbd10ub25TdGFjaykgewogICAgICAgICAgICBlbnRyeS5sb3dsaW5rID0gTWF0aC5taW4oZW50cnkubG93bGluaywgdmlzaXRlZFt3XS5pbmRleCk7CiAgICAgICAgICB9CiAgICAgICAgfSk7CgogICAgICAgIGlmIChlbnRyeS5sb3dsaW5rID09PSBlbnRyeS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ICAgICAgdmFyIGtqID0gcm93S1tqXTsKICAgICAgICAgICAgdmFyIGlqID0gcm93SVtqXTsKICAgICAgICAgICAgdmFyIGFsdERpc3RhbmNlID0gaWsuZGlzdGFuY2UgKyBrai5kaXN0YW5jZTsKICAgICAgICAgICAgaWYgKGFsdERpc3RhbmNlIDwgaWouZGlzdGFuY2UpIHsKICAgICAgICAgICAgICBpai5kaXN0YW5jZSA9IGFsdERpc3RhbmNlOwogICAgICAgICAgICAgIGlqLnByZWRlY2Vzc29yID0ga2oucHJlZGVjZXNzb3I7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0pOwogICAgICAgIH0pOwogICAgICB9KTsKCiAgICAgIHJldHVybiByZXN1bHRzOwogICAgfQoKICAgIHZhciB0b3Bzb3J0XzEgPSB0b3Bzb3J0OwogICAgdG9wc29ydC5DeWNsZUV4Y2VwdGlvbiA9IEN5Y2xlRXhjZXB0aW9uOwoKICAgIGZ1bmN0aW9uIHRvcHNvcnQoZykgewogICAgICB2YXIgdmlzaXRlZCA9IHt9OwogICAgICB2YXIgc3RhY2sgPSB7fTsKICAgICAgdmFyIHJlc3VsdHMgPSBbXTsKCiAgICAgIGZ1bmN0aW9uIHZpc2l0KG5vZGUpIHsKICAgICAgICBpZiAobG9kYXNoXzEuaGFzKHN0YWNrLCBub2RlKSkgewogICAgICAgICAgdGhyb3cgbmV3IEN5Y2xlRXhjZXB0aW9uKCk7CiAgICAgICAgfQoKICAgICAgICBpZiAoIWxvZGFzaF8xLmhhcyh2aXNpdGVkLCBub2RlKSkgewogICAgICAgICAgc3RhY2tbbm9kZV0gPSB0cnVlOwogICAgICAgICAgdmlzaXRlZFtub2RlXSA9IHRydWU7CiAgICAgICAgICBsb2Rhc2hfMS5lYWNoKGcucHJlZGVjZXNzb3JzKG5vZGUpLCB2aXNpdCk7CiAgICAgICAgICBkZWxldGUgc3RhY2tbbm9kZV07CiAgICAgICAgICByZXN1bHRzLnB1c2gobm9kZSk7CiAgICAgICAgfQogICAgICB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HZhciBndWFyZCA9IGxlbmd0aCA+IDIgPyBzb3VyY2VzWzJdIDogdW5kZWZpbmVkOwoKICAgICAgaWYgKGd1YXJkICYmIF9pc0l0ZXJhdGVlQ2FsbChzb3VyY2VzWzBdLCBzb3VyY2VzWzFdLCBndWFyZCkpIHsKICAgICAgICBsZW5ndGggPSAxOwogICAgICB9CgogICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkgewogICAgICAgIHZhciBzb3VyY2UgPSBzb3VyY2VzW2luZGV4XTsKICAgICAgICB2YXIgcHJvcHMgPSBrZXlzSW5fMShzb3VyY2UpOwogICAgICAgIHZhciBwcm9wc0luZGV4ID0gLTE7CiAgICAgICAgdmFyIHByb3BzTGVuZ3RoID0gcHJvcHMubGVuZ3RoOwoKICAgICAgICB3aGlsZSAoKytwcm9wc0luZGV4IDwgcHJvcHNMZW5ndGgpIHsKICAgICAgICAgIHZhciBrZXkgPSBwcm9wc1twcm9wc0luZGV4XTsKICAgICAgICAgIHZhciB2YWx1ZSA9IG9iamVjdFtrZXldOwoKICAgICAgICAgIGlmICh2YWx1ZSA9PT0gdW5kZWZpbmVkIHx8CiAgICAgICAgICAgICAgKGVxXzEodmFsdWUsIG9iamVjdFByb3RvJGhba2V5XSkgJiYgIWhhc093blByb3BlcnR5JGUuY2FsbChvYmplY3QsIGtleSkpKSB7CiAgICAgICAgICAgIG9iamVjdFtrZXldID0gc291cmNlW2tleV07CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CgogICAgICByZXR1cm4gb2JqZWN0OwogICAgfSk7CgogICAgdmFyIGRlZmF1bHRzXzEgPSBkZWZhdWx0czsKCiAgICAvKioKICAgICAqIENyZWF0ZXMgYSBgXy5maW5kYCBvciBgXy5maW5kTGFzdGAgZnVuY3Rpb24uCiAgICAgKgogICAgICogQHByaXZhdGUKICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IGZpbmRJbmRleEZ1bmMgVGhlIGZ1bmN0aW9uIHRvIGZpbmQgdGhlI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B2YWx1ZSA6IDA7CiAgICB9CgogICAgdmFyIHRvRmluaXRlXzEgPSB0b0Zpbml0ZTsKCiAgICAvKioKICAgICAqIENvbnZlcnRzIGB2YWx1ZWAgdG8gYW4gaW50ZWdlci4KICAgICAqCiAgICAgKiAqKk5vdGU6KiogVGhpcyBtZXRob2QgaXMgbG9vc2VseSBiYXNlZCBvbgogICAgICogW2BUb0ludGVnZXJgXShodHRwOi8vd3d3LmVjbWEtaW50ZXJuYXRpb25hbC5vcmcvZWNtYS0yNjIvNy4wLyNzZWMtdG9pbnRlZ2VyKS4KICAgICAqCiAgICAgKiBAc3RhdGljCiAgICAgKiBAbWVtYmVyT2YgXwogICAgICogQHNpbmNlIDQuMC4wCiAgICAgKiBAY2F0ZWdvcnkgTGFuZwogICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gY29udmVydC4KICAgICAqIEByZXR1cm5zIHtudW1iZXJ9IFJldHVybnMgdGhlIGNvbnZlcnRlZCBpbnRlZ2VyLgogICAgICogQGV4YW1wbGUKICAgICAqCiAgICAgKiBfLnRvSW50ZWdlcigzLjIpOwogICAgICogLy8gPT4gMwogICAgICoKICAgICAqIF8udG9JbnRlZ2VyKE51bWJlci5NSU5fVkFMVUUpOwogICAgICogLy8gPT4gMAogICAgICoKICAgICAqIF8udG9JbnRlZ2VyKEluZmluaXR5KTsKICAgICAqIC8vID0+IDEuNzk3NjkzMTM0ODYyMzE1N2UrMzA4CiAgICAgKgogICAgICogXy50b0ludGVnZXIoJzMuMicpOwogICAgICogLy8gPT4gMwogICAgICovCiAgICBmdW5jdGlvbiB0b0ludGVnZXIodmFsdWUpIHsKICAgICAgdmFyIHJlc3VsdCA9IHRvRmluaXRlXzEodmFsdWUpLAogICAgICAgICAgcmVtYWluZGVyID0gcmVzdWx0ICUgMTsKCiAgICAgIHJldHVybiByZXN1bHQgPT09IHJlc3VsdCA/IChyZW1haW5kZXIgPyByZXN1bHQgLSByZW1haW5kZXIgOiByZX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zogZmFsc2UgfSwKICAgICAqICAgeyAndXNlcic6ICdwZWJibGVzJywgJ2FnZSc6IDEsICAnYWN0aXZlJzogdHJ1ZSB9CiAgICAgKiBdOwogICAgICoKICAgICAqIF8uZmluZCh1c2VycywgZnVuY3Rpb24obykgeyByZXR1cm4gby5hZ2UgPCA0MDsgfSk7CiAgICAgKiAvLyA9PiBvYmplY3QgZm9yICdiYXJuZXknCiAgICAgKgogICAgICogLy8gVGhlIGBfLm1hdGNoZXNgIGl0ZXJhdGVlIHNob3J0aGFuZC4KICAgICAqIF8uZmluZCh1c2VycywgeyAnYWdlJzogMSwgJ2FjdGl2ZSc6IHRydWUgfSk7CiAgICAgKiAvLyA9PiBvYmplY3QgZm9yICdwZWJibGVzJwogICAgICoKICAgICAqIC8vIFRoZSBgXy5tYXRjaGVzUHJvcGVydHlgIGl0ZXJhdGVlIHNob3J0aGFuZC4KICAgICAqIF8uZmluZCh1c2VycywgWydhY3RpdmUnLCBmYWxzZV0pOwogICAgICogLy8gPT4gb2JqZWN0IGZvciAnZnJlZCcKICAgICAqCiAgICAgKiAvLyBUaGUgYF8ucHJvcGVydHlgIGl0ZXJhdGVlIHNob3J0aGFuZC4KICAgICAqIF8uZmluZCh1c2VycywgJ2FjdGl2ZScpOwogICAgICogLy8gPT4gb2JqZWN0IGZvciAnYmFybmV5JwogICAgICovCiAgICB2YXIgZmluZCQyID0gX2NyZWF0ZUZpbmQoZmluZEluZGV4XzEpOwoKICAgIHZhciBmaW5kXzEgPSBmaW5kJDI7CgogICAgLyoqCiAgICAgKiBGbGF0dGVucyBgYXJyYXlgIGEgc2luZ2xlIGxldmVsIGRlZXAuCiAgICAgKgogICAgICogQHN0YXRpYwogICAgICogQG1lbWJlck9mIF8KICAgICAqIEBzaW5jZSAwLjEuMAogICAgICogQGNhdGVnb3J5IEFycmF5CiAgICAgKiBAcGFyYW0ge0FycmF5fSBhcnJheSBUaGUgYXJyYXkgdG8gZmxhdHRlbi4KICAgICAqIEByZXR1cm5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mdW5jdGlvbiBpbnZva2VkIHBlciBpdGVyYXRpb24uCiAgICAgKiBAcmV0dXJucyB7T2JqZWN0fSBSZXR1cm5zIGBvYmplY3RgLgogICAgICogQHNlZSBfLmZvckluUmlnaHQKICAgICAqIEBleGFtcGxlCiAgICAgKgogICAgICogZnVuY3Rpb24gRm9vKCkgewogICAgICogICB0aGlzLmEgPSAxOwogICAgICogICB0aGlzLmIgPSAyOwogICAgICogfQogICAgICoKICAgICAqIEZvby5wcm90b3R5cGUuYyA9IDM7CiAgICAgKgogICAgICogXy5mb3JJbihuZXcgRm9vLCBmdW5jdGlvbih2YWx1ZSwga2V5KSB7CiAgICAgKiAgIGNvbnNvbGUubG9nKGtleSk7CiAgICAgKiB9KTsKICAgICAqIC8vID0+IExvZ3MgJ2EnLCAnYicsIHRoZW4gJ2MnIChpdGVyYXRpb24gb3JkZXIgaXMgbm90IGd1YXJhbnRlZWQpLgogICAgICovCiAgICBmdW5jdGlvbiBmb3JJbihvYmplY3QsIGl0ZXJhdGVlKSB7CiAgICAgIHJldHVybiBvYmplY3QgPT0gbnVsbAogICAgICAgID8gb2JqZWN0CiAgICAgICAgOiBfYmFzZUZvcihvYmplY3QsIF9jYXN0RnVuY3Rpb24oaXRlcmF0ZWUpLCBrZXlzSW5fMSk7CiAgICB9CgogICAgdmFyIGZvckluXzEgPSBmb3JJbjsKCiAgICAvKioKICAgICAqIEdldHMgdGhlIGxhc3QgZWxlbWVudCBvZiBgYXJyYXlgLgogICAgICoKICAgICAqIEBzdGF0aWMKICAgICAqIEBtZW1iZXJPZiBfCiAgICAgKiBAc2luY2UgMC4xLjAKICAgICAqIEBjYXRlZ29yeSBBcnJheQogICAgICogQHBhcmFtIHtBcnJheX0gYXJyYXkgVGhlIGFycmF5IHRvIHF1ZXJ5LgogICAgICogQHJldHVybnMgeyp9IFJldHVybnMgdGhlIGxhc3QgZWxlbWVudCBvZiBgYXJyYXlgLgogICAgICogQGV4YW1wbGUKICAgICAqCiAgICAgKiBfL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bXBhcmF0b3JgIHRvIGRldGVybWluZSB0aGUgZXh0cmVtdW0gdmFsdWUuCiAgICAgKgogICAgICogQHByaXZhdGUKICAgICAqIEBwYXJhbSB7QXJyYXl9IGFycmF5IFRoZSBhcnJheSB0byBpdGVyYXRlIG92ZXIuCiAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufSBpdGVyYXRlZSBUaGUgaXRlcmF0ZWUgaW52b2tlZCBwZXIgaXRlcmF0aW9uLgogICAgICogQHBhcmFtIHtGdW5jdGlvbn0gY29tcGFyYXRvciBUaGUgY29tcGFyYXRvciB1c2VkIHRvIGNvbXBhcmUgdmFsdWVzLgogICAgICogQHJldHVybnMgeyp9IFJldHVybnMgdGhlIGV4dHJlbXVtIHZhbHVlLgogICAgICovCiAgICBmdW5jdGlvbiBiYXNlRXh0cmVtdW0oYXJyYXksIGl0ZXJhdGVlLCBjb21wYXJhdG9yKSB7CiAgICAgIHZhciBpbmRleCA9IC0xLAogICAgICAgICAgbGVuZ3RoID0gYXJyYXkubGVuZ3RoOwoKICAgICAgd2hpbGUgKCsraW5kZXggPCBsZW5ndGgpIHsKICAgICAgICB2YXIgdmFsdWUgPSBhcnJheVtpbmRleF0sCiAgICAgICAgICAgIGN1cnJlbnQgPSBpdGVyYXRlZSh2YWx1ZSk7CgogICAgICAgIGlmIChjdXJyZW50ICE9IG51bGwgJiYgKGNvbXB1dGVkID09PSB1bmRlZmluZWQKICAgICAgICAgICAgICA/IChjdXJyZW50ID09PSBjdXJyZW50ICYmICFpc1N5bWJvbF8xKGN1cnJlbnQpKQogICAgICAgICAgICAgIDogY29tcGFyYXRvcihjdXJyZW50LCBjb21wdXRlZCkKICAgICAgICAgICAgKSkgewogICAgICAgICAgdmFyIGNvbXB1dGVkID0gY3VycmVudCwKICAgICAgICAgICAgICByZXN1bHQgPSB2YWx1ZTsKICAgICAgICB9CiAgICAgIH0KICAgICAgcmV0dXJuIHJlc3VsdDsKICAgIH0KCiAgICB2YXIgX2Jhc2VFeHR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cyBhIHBsYWluIG9iamVjdCwgZWxzZSBgZmFsc2VgLgogICAgICogQGV4YW1wbGUKICAgICAqCiAgICAgKiBmdW5jdGlvbiBGb28oKSB7CiAgICAgKiAgIHRoaXMuYSA9IDE7CiAgICAgKiB9CiAgICAgKgogICAgICogXy5pc1BsYWluT2JqZWN0KG5ldyBGb28pOwogICAgICogLy8gPT4gZmFsc2UKICAgICAqCiAgICAgKiBfLmlzUGxhaW5PYmplY3QoWzEsIDIsIDNdKTsKICAgICAqIC8vID0+IGZhbHNlCiAgICAgKgogICAgICogXy5pc1BsYWluT2JqZWN0KHsgJ3gnOiAwLCAneSc6IDAgfSk7CiAgICAgKiAvLyA9PiB0cnVlCiAgICAgKgogICAgICogXy5pc1BsYWluT2JqZWN0KE9iamVjdC5jcmVhdGUobnVsbCkpOwogICAgICogLy8gPT4gdHJ1ZQogICAgICovCiAgICBmdW5jdGlvbiBpc1BsYWluT2JqZWN0JDEodmFsdWUpIHsKICAgICAgaWYgKCFpc09iamVjdExpa2VfMSh2YWx1ZSkgfHwgX2Jhc2VHZXRUYWcodmFsdWUpICE9IG9iamVjdFRhZyQ0KSB7CiAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICB9CiAgICAgIHZhciBwcm90byA9IF9nZXRQcm90b3R5cGUodmFsdWUpOwogICAgICBpZiAocHJvdG8gPT09IG51bGwpIHsKICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgfQogICAgICB2YXIgQ3RvciA9IGhhc093blByb3BlcnR5JGYuY2FsbChwcm90bywgJ2NvbnN0cnVjdG9yJykgJiYgcHJvdG8uY29uc3RydWN0b3I7CiAgICAgIHJldHVybiB0eXBlb2YgQ3RvciA9PSAnZnVuY3Rpb24nICYmIEN0b3IgaW5zdGFuY2VvZiBDdG9yICYmCiAgICAgICAgZnVuY1RvU3RyaW5nJDIuY2FsbChDdG9yKSA9PSBvYmplY3RDdG9yU3RyaW5nOwogICAgfQoKICAgIHZhciBpc1BsYWluT2JqZWN0Xz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ICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyB0aGUgY29udmVydGVkIHBsYWluIG9iamVjdC4KICAgICAqIEBleGFtcGxlCiAgICAgKgogICAgICogZnVuY3Rpb24gRm9vKCkgewogICAgICogICB0aGlzLmIgPSAyOwogICAgICogfQogICAgICoKICAgICAqIEZvby5wcm90b3R5cGUuYyA9IDM7CiAgICAgKgogICAgICogXy5hc3NpZ24oeyAnYSc6IDEgfSwgbmV3IEZvbyk7CiAgICAgKiAvLyA9PiB7ICdhJzogMSwgJ2InOiAyIH0KICAgICAqCiAgICAgKiBfLmFzc2lnbih7ICdhJzogMSB9LCBfLnRvUGxhaW5PYmplY3QobmV3IEZvbykpOwogICAgICogLy8gPT4geyAnYSc6IDEsICdiJzogMiwgJ2MnOiAzIH0KICAgICAqLwogICAgZnVuY3Rpb24gdG9QbGFpbk9iamVjdCh2YWx1ZSkgewogICAgICByZXR1cm4gX2NvcHlPYmplY3QodmFsdWUsIGtleXNJbl8xKHZhbHVlKSk7CiAgICB9CgogICAgdmFyIHRvUGxhaW5PYmplY3RfMSA9IHRvUGxhaW5PYmplY3Q7CgogICAgLyoqCiAgICAgKiBBIHNwZWNpYWxpemVkIHZlcnNpb24gb2YgYGJhc2VNZXJnZWAgZm9yIGFycmF5cyBhbmQgb2JqZWN0cyB3aGljaCBwZXJmb3JtcwogICAgICogZGVlcCBtZXJnZXMgYW5kIHRyYWNrcyB0cmF2ZXJzZWQgb2JqZWN0cyBlbmFibGluZyBvYmplY3RzIHdpdGggY2lyY3VsYXIKICAgICAqIHJlZmVyZW5jZXMgdG8gYmUgbWVyZ2VkLgogICAgICoKICAgICAqIEBwcml2YXRlCiAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBkZXN0aW5hdGlvbiBvYmplY3QuCiAgICAgKiBAcGFyYW0ge09iamVjdH0gc291cmNlIFRoZSBzb3VyY2Ugb2JqZWN0LgogICAgICogQHBhcmFtIHtzdHJpbmd9IGtleSBUaG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YmplY3QuCiAgICAgKiBAZXhhbXBsZQogICAgICoKICAgICAqIF8uemlwT2JqZWN0KFsnYScsICdiJ10sIFsxLCAyXSk7CiAgICAgKiAvLyA9PiB7ICdhJzogMSwgJ2InOiAyIH0KICAgICAqLwogICAgZnVuY3Rpb24gemlwT2JqZWN0KHByb3BzLCB2YWx1ZXMpIHsKICAgICAgcmV0dXJuIF9iYXNlWmlwT2JqZWN0KHByb3BzIHx8IFtdLCB2YWx1ZXMgfHwgW10sIF9hc3NpZ25WYWx1ZSk7CiAgICB9CgogICAgdmFyIHppcE9iamVjdF8xID0gemlwT2JqZWN0OwoKICAgIC8qIGdsb2JhbCB3aW5kb3cgKi8KCiAgICB2YXIgbG9kYXNoJDI7CgogICAgaWYgKHR5cGVvZiBjb21tb25qc1JlcXVpcmUgPT09ICJmdW5jdGlvbiIpIHsKICAgICAgdHJ5IHsKICAgICAgICBsb2Rhc2gkMiA9IHsKICAgICAgICAgIGNsb25lRGVlcDogY2xvbmVEZWVwXzEsCiAgICAgICAgICBjb25zdGFudDogY29uc3RhbnRfMSwKICAgICAgICAgIGRlZmF1bHRzOiBkZWZhdWx0c18xLAogICAgICAgICAgZWFjaDogZWFjaCwKICAgICAgICAgIGZpbHRlcjogZmlsdGVyXzEsCiAgICAgICAgICBmaW5kOiBmaW5kXzEsCiAgICAgICAgICBmbGF0dGVuOiBmbGF0dGVuXzEsCiAgICAgICAgICBmb3JFYWNoOiBmb3JFYWNoXzEsCiAgICAgICAgICBmb3JJbjogZm9ySW5fMSwKICAgICAgICAgIGhhczogIGhhc18xLAogICAgICAgICAgaXNVbmRlZmluZWQ6IGlzVW5kZWZpbmVkXzEsCiAgICAgICAgICBsYXN0OiBsYXN0XzEsCiAgICAgICAgICBtYXA6IG1hcF8xLAogICAgICAgICAgbWFwVmFsdWVzOiBtYXBWYWx1ZXNfMSwKICAgICAgICAgIG1heDogbWF4XzEsCiAgICAgICAgICBtZXJnZTogbWVyZ2VfMSwKICAgICAgICAgIG1pbjogbWluXzEsCiAgICAgICAgICBtaW5CeTogbWluQnlfMSwKICAgICAgICAgIG5vdzogbm93XzEsCiAgICAgICAgICBwaWNrOiBwaWNrXzEsCiAgICAgICAgICByYW5nZTogcmFuZ2VfMSwKICAgICAgICAgIHJlZHVjZTogcmVkdWNlXzEsCiAgICAgICAgICBzb3J0Qnk6IHNvcnRCeV8xLAogICAgICAgICAgdW5pcXVlSWQ6IHVuaXF1ZUlkXzEsCiAgICAgICAgICB2YWx1ZXM6IHZhbHVlc18xLAogICAgICAgICAgemlwT2JqZWN0OiB6aXBPYmplY3RfMSwKICAgICAgICB9OwogICAgICB9IGNhdGNoIChlKSB7CiAgICAgICAgLy8gY29udGludWUgcmVnYXJkbGVzcyBvZiBlcnJvcgogICAgICB9CiAgICB9CgogICAgaWYgKCFsb2Rhc2gkMikgewogICAgICBsb2Rhc2gkMiA9IHdpbmRvdy5fOwogICAgfQoKICAgIHZhciBsb2Rhc2hfMSQxID0gbG9kYXNoJDI7CgogICAgLyoKICAgICAqIFNpbXBsZSBkb3VibHkgbGlua2VkIGxpc3QgaW1wbGVtZW50YXRpb24gZGVyaXZlZCBmcm9tIENvcm1lbiwgZXQgYWwuLAogICAgICogIkludHJvZHVjdGlvbiB0byBBbGdvcml0aG1zIi4KICAgICAqLwoKICAgIHZhciBsaXN0ID0gTGlzdDsKCiAgICBmdW5jdGlvbiBMaXN0KCkgewogICAgICB2YXIgc2VudGluZWwgPSB7fTsKICAgICAgc2VudGluZWwuX25leHQgPSBzZW50aW5lbC5fcHJldiA9IHNlbnRpbmVsOwogICAgICB0aGlzLl9zZW50aW5lbCA9IHNlbnRpbmVsOwogICAgfQoKICAgIExpc3QucHJvdG90eXBlLmRlcXVldWUgPSBmdW5jdGlvbigpIHsKICAgICAgdmFyIHNlbnRpbmVsID0gdGhpcy5fc2VudGluZWw7CiAgICAgIHZhciBlbnRyeSA9IHNlbnRpbmVsLl9wcmV2OwogICAgICBpZiAoZW50cnkgIT09IHNlbnRpbmVsKSB7CiAgICAgICAgdW5saW5rKGVudHJ5KTsKICAgICAgICByZXR1cm4gZW50cnk7CiAgICAgIH0KICAgIH07CgogICAgTGlzdC5wcm90b3R5cGUuZW5xdWV1ZSA9IGZ1bmN0aW9uKGVudHJ5KSB7CiAgICAgIHZhciBzZW50aW5lbCA9IHRoaXMuX3NlbnRpbmVsOwogICAgICBpZiAoZW50cnkuX3ByZXYgJiYgZW50cnkuX25leHQpIHsKICAgICAgICB1bmxpbmsoZW50cnkpOwogICAgICB9CiAgICAgIGVudHJ5Ll9uZXh0ID0gc2VudGluZWwuX25leHQ7CiAgICAgIHNlbnRpbmVsLl9uZXh0Ll9wcmV2ID0gZW50cnk7CiAgICAgIHNlbnRpbmVsLl9uZXh0ID0gZW50cnk7CiAgICAgIGVudHJ5Ll9wcmV2ID0gc2VudGluZWw7CiAgICB9OwoKICAgIExpc3QucHJvdG90eXBlLnRvU3RyaW5nID0gZnVuY3Rpb24oKSB7CiAgICAgIHZhciBzdHJzID0gW107CiAgICAgIHZhciBzZW50aW5lbCA9IHRoaXMuX3NlbnRpbmVsOwogICAgICB2YXIgY3VyciA9IHNlbnRpbmVsLl9wcmV2OwogICAgICB3aGlsZSAoY3VyciAhPT0gc2VudGluZWwpIHsKICAgICAgICBzdHJzLnB1c2goSlNPTi5zdHJpbmdpZnkoY3VyciwgZmlsdGVyT3V0TGlua3MpKTsKICAgICAgICBjdXJyID0gY3Vyci5fcHJldjsKICAgICAgfQogICAgICByZXR1cm4gIlsiICsgc3Rycy5qb2luKCIsICIpICsgIl0iOwogICAgfTsKCiAgICBmdW5jdGlvbiB1bmxpbmsoZW50cnkpIHsKICAgICAgZW50cnkuX3ByZXYuX25leHQgPSBlbnRyeS5fbmV4dDsKICAgICAgZW50cnkuX25leHQuX3ByZXYgPSBlbnRyeS5fcHJldjsKICAgICAgZGVsZXRlIGVudHJ5Ll9uZXh0OwogICAgICBkZWxldGUgZW50cnkuX3ByZXY7CiAgICB9CgogICAgZnVuY3R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kpOwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CgogICAgICByZXR1cm4gcmVzdWx0czsKICAgIH0KCiAgICBmdW5jdGlvbiByZW1vdmVOb2RlKGcsIGJ1Y2tldHMsIHplcm9JZHgsIGVudHJ5LCBjb2xsZWN0UHJlZGVjZXNzb3JzKSB7CiAgICAgIHZhciByZXN1bHRzID0gY29sbGVjdFByZWRlY2Vzc29ycyA/IFtdIDogdW5kZWZpbmVkOwoKICAgICAgbG9kYXNoXzEkMS5mb3JFYWNoKGcuaW5FZGdlcyhlbnRyeS52KSwgZnVuY3Rpb24oZWRnZSkgewogICAgICAgIHZhciB3ZWlnaHQgPSBnLmVkZ2UoZWRnZSk7CiAgICAgICAgdmFyIHVFbnRyeSA9IGcubm9kZShlZGdlLnYpOwoKICAgICAgICBpZiAoY29sbGVjdFByZWRlY2Vzc29ycykgewogICAgICAgICAgcmVzdWx0cy5wdXNoKHsgdjogZWRnZS52LCB3OiBlZGdlLncgfSk7CiAgICAgICAgfQoKICAgICAgICB1RW50cnkub3V0IC09IHdlaWdodDsKICAgICAgICBhc3NpZ25CdWNrZXQoYnVja2V0cywgemVyb0lkeCwgdUVudHJ5KTsKICAgICAgfSk7CgogICAgICBsb2Rhc2hfMSQxLmZvckVhY2goZy5vdXRFZGdlcyhlbnRyeS52KSwgZnVuY3Rpb24oZWRnZSkgewogICAgICAgIHZhciB3ZWlnaHQgPSBnLmVkZ2UoZWRnZSk7CiAgICAgICAgdmFyIHcgPSBlZGdlLnc7CiAgICAgICAgdmFyIHdFbnRyeSA9IGcubm9kZSh3KTsKICAgICAgICB3RW50cnlbImluIl0gLT0gd2VpZ2h0OwogICAgICAgIGFzc2lnbkJ1Y2tldChidWNrZXRzLCB6ZXJvSWR4LCB3RW50cnkpOwogICAgICB9KTsKCiAgICAgIGcucmVtb3ZlTm9kZShlbnRyeS52KTsKCiAgICAgIHJldHVybiByZXN1bHRz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igpIHsgcmV0dXJuIG5ldyBsaXN0KCk7IH0pOwogICAgICB2YXIgemVyb0lkeCA9IG1heEluICsgMTsKCiAgICAgIGxvZGFzaF8xJDEuZm9yRWFjaChmYXNHcmFwaC5ub2RlcygpLCBmdW5jdGlvbih2KSB7CiAgICAgICAgYXNzaWduQnVja2V0KGJ1Y2tldHMsIHplcm9JZHgsIGZhc0dyYXBoLm5vZGUodikpOwogICAgICB9KTsKCiAgICAgIHJldHVybiB7IGdyYXBoOiBmYXNHcmFwaCwgYnVja2V0czogYnVja2V0cywgemVyb0lkeDogemVyb0lkeCB9OwogICAgfQoKICAgIGZ1bmN0aW9uIGFzc2lnbkJ1Y2tldChidWNrZXRzLCB6ZXJvSWR4LCBlbnRyeSkgewogICAgICBpZiAoIWVudHJ5Lm91dCkgewogICAgICAgIGJ1Y2tldHNbMF0uZW5xdWV1ZShlbnRyeSk7CiAgICAgIH0gZWxzZSBpZiAoIWVudHJ5WyJpbiJdKSB7CiAgICAgICAgYnVja2V0c1tidWNrZXRzLmxlbmd0aCAtIDFdLmVucXVldWUoZW50cnkpOwogICAgICB9IGVsc2UgewogICAgICAgIGJ1Y2tldHNbZW50cnkub3V0IC0gZW50cnlbImluIl0gKyB6ZXJvSWR4XS5lbnF1ZXVlKGVudHJ5KTsKICAgICAgfQogICAgfQoKICAgIHZhciBhY3ljbGljID0gewogICAgICBydW46IHJ1biwKICAgICAgdW5kbzogdW5kbwogICAgfTsKCiAgICBmdW5jdGlvbiBydW4oZykgewogICAgICB2YXIgZmFzID0gKGcuZ3JhcGgoKS5hY3ljbGljZXIgPT09ICJncmVlZHkiCiAgICAgICAgPyBncmVlZHlGYXMoZywgd2VpZ2h0Rm4oZykpCiAgICAgICAgOiBkZnNGQVMoZykpOwogICAgICBsb2Rhc2hfMSQxLmZvckVhY2goZmFzLCBmdW5jdGlvbihlKSB7CiAgICAgICAgdmFyIGxhYmVsID0gZy5lZGdlKGUpOwogICAgICAgIGcucmVtb3ZlRWRnZShlKTsKICAgICAgICBsYWJlbC5mb3J3YXJkTmFtZSA9IGUubmFtZTsKICAgICAgICBsYWJlbC5yZXZlcnNlZCA9IHRydWU7CiAgICAgICAgZy5zZXRFZGdlKGUudywgZS52LCBsYWJlbCwgbG9kYXNoXzEkMS51bmlxdWVJZCgicmV2IikpOwogICAgICB9KTsKCiAgICAgIGZ1bmN0aW9uIHdlaWdodEZuKGcpIHsKICAgICAgICByZXR1cm4gZnVuY3Rpb24oZSkgewogICAgICAgICAgcmV0dXJuIGcuZWRnZShlKS53ZWlnaHQ7CiAgICAgICAgfTsKICAgICAgfQogICAgfQoKICAgIGZ1bmN0aW9uIGRmc0ZBUyhnKSB7CiAgICAgIHZhciBmYXMgPSBbXTsKICAgICAgdmFyIHN0YWNrID0ge307CiAgICAgIHZhciB2aXNpdGVkID0ge307CgogICAgICBmdW5jdGlvbiBkZnModikgewogICAgICAgIGlmIChsb2Rhc2hfMSQxLmhhcyh2aXNpdGVkLCB2KSkgewogICAgICAgICAgcmV0dXJuOwogICAgICAgIH0KICAgICAgICB2aXNpdGVkW3ZdID0gdHJ1ZTsKICAgICAgICBzdGFja1t2XSA9IHRydWU7CiAgICAgICAgbG9kYXNoXzEkMS5mb3JFYWNoKGcub3V0RWRnZXModiksIGZ1bmN0aW9uKGUpIHsKICAgICAgICAgIGlmIChsb2Rhc2hfMSQxLmhhcyhzdGFjaywgZS53KSkgewogICAgICAgICAgICBmYXMucHVzaChlKTsKICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIGRmcyhlLncpOwogICAgICAgICAgfQogICAgICAgIH0pOwogICAgICAgIGRlbGV0ZSBzdGFja1t2XTsKICAgICAgfQoKICAgICAgbG9kYXNoXzEkMS5mb3JFYWNoKGcubm9kZXMoKSwgZGZzKTsKICAgICAgcmV0dXJuIGZhczsKICAgIH0KCiAgICBmdW5jdGlvbiB1bmRvKGcpIHsKICAgICAgbG9kYXNoXzEkMS5mb3JFYWNoKGcuZWRnZXMoKSwgZnVuY3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wb2ludC55IC0geTsKICAgICAgdmFyIHcgPSByZWN0LndpZHRoIC8gMjsKICAgICAgdmFyIGggPSByZWN0LmhlaWdodCAvIDI7CgogICAgICBpZiAoIWR4ICYmICFkeSkgewogICAgICAgIHRocm93IG5ldyBFcnJvcigiTm90IHBvc3NpYmxlIHRvIGZpbmQgaW50ZXJzZWN0aW9uIGluc2lkZSBvZiB0aGUgcmVjdGFuZ2xlIik7CiAgICAgIH0KCiAgICAgIHZhciBzeCwgc3k7CiAgICAgIGlmIChNYXRoLmFicyhkeSkgKiB3ID4gTWF0aC5hYnMoZHgpICogaCkgewogICAgICAgIC8vIEludGVyc2VjdGlvbiBpcyB0b3Agb3IgYm90dG9tIG9mIHJlY3QuCiAgICAgICAgaWYgKGR5IDwgMCkgewogICAgICAgICAgaCA9IC1oOwogICAgICAgIH0KICAgICAgICBzeCA9IGggKiBkeCAvIGR5OwogICAgICAgIHN5ID0gaDsKICAgICAgfSBlbHNlIHsKICAgICAgICAvLyBJbnRlcnNlY3Rpb24gaXMgbGVmdCBvciByaWdodCBvZiByZWN0LgogICAgICAgIGlmIChkeCA8IDApIHsKICAgICAgICAgIHcgPSAtdzsKICAgICAgICB9CiAgICAgICAgc3ggPSB3OwogICAgICAgIHN5ID0gdyAqIGR5IC8gZHg7CiAgICAgIH0KCiAgICAgIHJldHVybiB7IHg6IHggKyBzeCwgeTogeSArIHN5IH07CiAgICB9CgogICAgLyoKICAgICAqIEdpdmVuIGEgREFHIHdpdGggZWFjaCBub2RlIGFzc2lnbmVkICJyYW5rIiBhbmQgIm9yZGVyIiBwcm9wZXJ0aWVzLCB0aGlzCiAgICAgKiBmdW5jdGlvbiB3aWxsIHByb2R1Y2UgYSBtYXRyaXggd2l0aCB0aGUgaWRzIG9mIGVhY2ggbm9kZS4KICAgICAqLwogICAgZnVuY3Rpb24gYnVpbGRMYXllck1hdHJpeChnKSB7CiAgICAgIHZhciBsYXllcmluZyA9IGxvZGFzaF8xJDEubWFwKGxvZGFzaF8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bmVlZCB0byBvZmZzZXQgdGhlbQogICAgICB2YXIgb2Zmc2V0ID0gbG9kYXNoXzEkMS5taW4obG9kYXNoXzEkMS5tYXAoZy5ub2RlcygpLCBmdW5jdGlvbih2KSB7IHJldHVybiBnLm5vZGUodikucmFuazsgfSkpOwoKICAgICAgdmFyIGxheWVycyA9IFtdOwogICAgICBsb2Rhc2hfMSQxLmZvckVhY2goZy5ub2RlcygpLCBmdW5jdGlvbih2KSB7CiAgICAgICAgdmFyIHJhbmsgPSBnLm5vZGUodikucmFuayAtIG9mZnNldDsKICAgICAgICBpZiAoIWxheWVyc1tyYW5rXSkgewogICAgICAgICAgbGF5ZXJzW3JhbmtdID0gW107CiAgICAgICAgfQogICAgICAgIGxheWVyc1tyYW5rXS5wdXNoKHYpOwogICAgICB9KTsKCiAgICAgIHZhciBkZWx0YSA9IDA7CiAgICAgIHZhciBub2RlUmFua0ZhY3RvciA9IGcuZ3JhcGgoKS5ub2RlUmFua0ZhY3RvcjsKICAgICAgbG9kYXNoXzEkMS5mb3JFYWNoKGxheWVycywgZnVuY3Rpb24odnMsIGkpIHsKICAgICAgICBpZiAobG9kYXNoXzEkMS5pc1VuZGVmaW5lZCh2cykgJiYgaSAlIG5vZGVSYW5rRmFjdG9yICE9PSAwKSB7CiAgICAgICAgICAtLWRlbHRhOwogICAgICAgIH0gZWxzZSBpZiAoZGVsdGEpIHsKICAgICAgICAgIGxvZGFzaF8xJDEuZm9yRWFjaCh2cywgZnVuY3Rpb24odikgeyBnLm5vZGUodikucmFuayArPSBkZWx0YTsgfSk7CiAgICAgICAgfQogICAgICB9KTsKICAgIH0KCiAgICBmdW5jdGlvbiBhZGRCb3JkZXJOb2RlKGcsIHByZWZpeCwgcmFuaywgb3JkZXIpIHsKICAgICAgdmFyIG5vZGUgPSB7CiAgICAgICAgd2lkdGg6IDAsCiAgICAgICAgaGVpZ2h0OiAwCiAgICAgIH07CiAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoID49IDQpIHsKICAgICAgICBub2RlLnJhbmsgPSByYW5rOwogICAgICAgIG5vZGUub3JkZXIgPSBvcmRlcjsKICAgICAgfQogICAgICByZXR1cm4gYWRkRHVtbXlOb2RlKGcsICJib3JkZXIiLCBub2RlLCBwcmVmaXgpOwogICAgfQoKICAgIGZ1bmN0aW9uIG1heFJhbmsoZykgewogICAgICByZXR1cm4gbG9kYXNoXzEkMS5tYXgobG9kYXNoXzEkMS5tYXAoZy5ub2RlcygpLCBmdW5jdGlvbih2KSB7CiAgICAgICAgdmFyIHJhbmsgPSBnLm5vZGUodikucmFuazsKICAgICAgICBpZiAoIWxvZGFzaF8xJDEuaXNVbmRlZmluZWQocmFuaykpIHsKICAgICAgICAgIHJldHVybiByYW5rOwogICAgICAgIH0KICAgICAgfSkpOwogICAgfQoKICAgIC8qCiAgICAgKiBQYXJ0aXRpb24gYSBjb2xsZWN0aW9uIGludG8gdHdvIGdyb3VwczogYGxoc2AgYW5kIGByaHNgLiBJZiB0aGUgc3VwcGxpZWQKICAgICAqIGZ1bmN0aW9uIHJldHVybnMgdHJ1ZSBmb3IgYW4gZW50cnkgaXQgZ29lcyBpbnRvIGBsaHNgLiBPdGhlcndpc2UgaXQgZ29lcwogICAgICogaW50byBgcmhzLgogICAgICovCiAgICBmdW5jdGlvbiBwYXJ0aXRpb24kMihjb2xsZWN0aW9uLCBmbikgewogICAgICB2YXIgcmVzdWx0ID0geyBsaHM6IFtdLCByaHM6IFtdIH07CiAgICAgIGxvZGFzaF8xJDEuZm9yRWFjaChjb2xsZWN0aW9uLCBmdW5jdGlvbih2YWx1ZSkgewogICAgICAgIGlmIChmbih2YWx1ZSkpIHsKICAgICAgICAgIHJlc3VsdC5saHMucHVzaCh2YWx1ZSk7CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgIHJlc3VsdC5yaHMucHVzaCh2YWx1ZSk7CiAgICAgICAgfQogICAgICB9KTsKICAgICAgcmV0dXJuIHJlc3VsdDsKICAgIH0KCiAgICAvKgogICAgICogUmV0dXJucyBhIG5ldyBmdW5jdGlvbiB0aGF0IHdyYXBzIGBmbmAgd2l0aCBhIHRpbWVyLiBUaGUgd3JhcHBlciBsb2dzIHRoZQogICAgICogdGltZSBpdCB0YWtlcyB0byBleGVjdXRlIHRoZSBmdW5jdGlvbi4KICAgICAqLwogICAgZnVuY3Rpb24gdGltZSQyKG5hbWUsIGZuKSB7CiAgICAgIHZhciBzdGFydCA9IGxvZGFzaF8xJDEubm93KCk7CiAgICAgIHRyeSB7CiAgICAgICAgcmV0dXJuIGZuKCk7CiAgICAgIH0gZmluYWxseSB7CiAgICAgICAgY29uc29sZS5sb2cobmFtZSArICIgdGltZTogIiArIChsb2Rhc2hfMSQxLm5vdygpIC0gc3RhcnQpICsgIm1zIik7CiAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiBub3RpbWUobmFtZSwgZm4pIHsKICAgICAgcmV0dXJuIGZuKCk7CiAgICB9CgogICAgdmFyIG5vcm1hbGl6ZSQyID0gewogICAgICBydW46IHJ1biQxLAogICAgICB1bmRvOiB1bmRvJDEKICAgIH07CgogICAgLyoKICAgICAqIEJyZWFrcyBhbnkgbG9uZyBlZGdlcyBpbiB0aGUgZ3JhcGggaW50byBzaG9ydCBzZWdtZW50cyB0aGF0IHNwYW4gMSBsYXllcgogICAgICogZWFjaC4gVGhpcyBvcGVyYXRpb24gaXMgdW5kb2FibGUgd2l0aCB0aGUgZGVub3JtYWxpemUgZnVuY3Rpb24uCiAgICAgKgogICAgICogUHJlLWNvbmRpdGlvbnM6CiAgICAgKgogICAgICogICAgMS4gVGhlIGlucHV0IGdyYXBoIGlzIGEgREFHLgogICAgICogICAgMi4gRWFjaCBub2RlIGluIHRoZSBncmFwaCBoYXMgYSAicmFuayIgcHJvcGVydHkuCiAgICAgKgogICAgICogUG9zdC1jb25kaXRpb246CiAgICAgKgogICAgICogICAgMS4gQWxsIGVkZ2VzIGluIHRoZSBncmFwaCBoYXZlIGEgbGVuZ3RoIG9mIDEuCiAgICAgK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sIGhlaWdodDogMCwKICAgICAgICAgIGVkZ2VMYWJlbDogZWRnZUxhYmVsLCBlZGdlT2JqOiBlLAogICAgICAgICAgcmFuazogdlJhbmsKICAgICAgICB9OwogICAgICAgIGR1bW15ID0gdXRpbC5hZGREdW1teU5vZGUoZywgImVkZ2UiLCBhdHRycywgIl9kIik7CiAgICAgICAgaWYgKHZSYW5rID09PSBsYWJlbFJhbmspIHsKICAgICAgICAgIGF0dHJzLndpZHRoID0gZWRnZUxhYmVsLndpZHRoOwogICAgICAgICAgYXR0cnMuaGVpZ2h0ID0gZWRnZUxhYmVsLmhlaWdodDsKICAgICAgICAgIGF0dHJzLmR1bW15ID0gImVkZ2UtbGFiZWwiOwogICAgICAgICAgYXR0cnMubGFiZWxwb3MgPSBlZGdlTGFiZWwubGFiZWxwb3M7CiAgICAgICAgfQogICAgICAgIGcuc2V0RWRnZSh2LCBkdW1teSwgeyB3ZWlnaHQ6IGVkZ2VMYWJlbC53ZWlnaHQgfSwgbmFtZSk7CiAgICAgICAgaWYgKGkgPT09IDApIHsKICAgICAgICAgIGcuZ3JhcGgoKS5kdW1teUNoYWlucy5wdXNoKGR1bW15KTsKICAgICAgICB9CiAgICAgICAgdiA9IGR1bW15OwogICAgICB9CgogICAgICBnLnNldEVkZ2UodiwgdywgeyB3ZWlnaHQ6IGVkZ2VMYWJlbC53ZWlnaHQgfSwgbmFtZSk7CiAgICB9CgogICAgZnVuY3Rpb24gdW5kbyQxKGcpIHsKICAgICAgbG9kYXNoXzEkMS5mb3JFYWNoKGcuZ3JhcGgoKS5kdW1teUNoYWlucywgZnVuY3Rpb24odikgewogICAgICAgIHZhciBub2RlID0gZy5ub2RlKHYpOwogICAgICAgIHZhciBvcmlnTGFiZWwgPSBub2RlLmVkZ2VMYWJlbDsKICAgICAgICB2YXIgdzsKICAgICAgICBnLnNldEVkZ2Uobm9kZS5lZGdlT2JqLCBvcmlnTGFiZWwpOwogICAgICAgIHdoaWxlIChub2RlLmR1bW15KSB7CiA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IGVkZ2VWOwogICAgICAgICAgaWYgKCF0Lmhhc05vZGUodykgJiYgIXNsYWNrJDEoZywgZSkpIHsKICAgICAgICAgICAgdC5zZXROb2RlKHcsIHt9KTsKICAgICAgICAgICAgdC5zZXRFZGdlKHYsIHcsIHt9KTsKICAgICAgICAgICAgZGZzKHcpOwogICAgICAgICAgfQogICAgICAgIH0pOwogICAgICB9CgogICAgICBsb2Rhc2hfMSQxLmZvckVhY2godC5ub2RlcygpLCBkZnMpOwogICAgICByZXR1cm4gdC5ub2RlQ291bnQoKTsKICAgIH0KCiAgICAvKgogICAgICogRmluZHMgdGhlIGVkZ2Ugd2l0aCB0aGUgc21hbGxlc3Qgc2xhY2sgdGhhdCBpcyBpbmNpZGVudCBvbiB0cmVlIGFuZCByZXR1cm5zCiAgICAgKiBpdC4KICAgICAqLwogICAgZnVuY3Rpb24gZmluZE1pblNsYWNrRWRnZSh0LCBnKSB7CiAgICAgIHJldHVybiBsb2Rhc2hfMSQxLm1pbkJ5KGcuZWRnZXMoKSwgZnVuY3Rpb24oZSkgewogICAgICAgIGlmICh0Lmhhc05vZGUoZS52KSAhPT0gdC5oYXNOb2RlKGUudykpIHsKICAgICAgICAgIHJldHVybiBzbGFjayQxKGcsIGUpOwogICAgICAgIH0KICAgICAgfSk7CiAgICB9CgogICAgZnVuY3Rpb24gc2hpZnRSYW5rcyh0LCBnLCBkZWx0YSkgewogICAgICBsb2Rhc2hfMSQxLmZvckVhY2godC5ub2RlcygpLCBmdW5jdGlvbih2KSB7CiAgICAgICAgZy5ub2RlKHYpLnJhbmsgKz0gZGVsdGE7CiAgICAgIH0pOwogICAgfQoKICAgIHZhciBzbGFjayQyID0gdXRpbCQxLnNsYWNrOwogICAgdmFyIGluaXRSYW5rID0gdXRpbCQxLmxvbmdlc3RQYXRoOwogICAgdmFyIHByZW9yZGVyJDEgPSBncmFwaGxpYl8xLmFsZy5wcmVvcmRlcjsKICAgIHZhciBwb3N0b3JkZXIkMSA9IGdyYXBobGliXz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7CiAgICAgICAgdmFyIHBhdGhJZHggPSAwOwogICAgICAgIHZhciBwYXRoViA9IHBhdGhbcGF0aElkeF07CiAgICAgICAgdmFyIGFzY2VuZGluZyA9IHRydWU7CgogICAgICAgIHdoaWxlICh2ICE9PSBlZGdlT2JqLncpIHsKICAgICAgICAgIG5vZGUgPSBnLm5vZGUodik7CgogICAgICAgICAgaWYgKGFzY2VuZGluZykgewogICAgICAgICAgICB3aGlsZSAoKHBhdGhWID0gcGF0aFtwYXRoSWR4XSkgIT09IGxjYSAmJgogICAgICAgICAgICAgICAgICAgZy5ub2RlKHBhdGhWKS5tYXhSYW5rIDwgbm9kZS5yYW5rKSB7CiAgICAgICAgICAgICAgcGF0aElkeCsrOwogICAgICAgICAgICB9CgogICAgICAgICAgICBpZiAocGF0aFYgPT09IGxjYSkgewogICAgICAgICAgICAgIGFzY2VuZGluZyA9IGZhbHNlOwogICAgICAgICAgICB9CiAgICAgICAgICB9CgogICAgICAgICAgaWYgKCFhc2NlbmRpbmcpIHsKICAgICAgICAgICAgd2hpbGUgKHBhdGhJZHggPCBwYXRoLmxlbmd0aCAtIDEgJiYKICAgICAgICAgICAgICAgICAgIGcubm9kZShwYXRoViA9IHBhdGhbcGF0aElkeCArIDFdKS5taW5SYW5rIDw9IG5vZGUucmFuaykgewogICAgICAgICAgICAgIHBhdGhJZHgrKzsKICAgICAgICAgICAgfQogICAgICAgICAgICBwYXRoViA9IHBhdGhbcGF0aElkeF07CiAgICAgICAgICB9CgogICAgICAgICAgZy5zZXRQYXJlbnQodiwgcGF0aFYpOwogICAgICAgICAgdiA9IGcuc3VjY2Vzc29ycyh2KVswXTsKICAgICAgICB9CiAgICAgIH0pOwogICAgfQoKICAgIC8vIEZpbmQgYSBwYXRoIGZyb20gdiB0byB3IHRocm91Z2ggdGhlIGxvd2VzdCBjb21tb24gYW5jZXN0b3IgKExDQSkuIFJldHVybiB0aGUKICAgIC8vIGZ1bGwgcGF0aCBhbmQgdGhlIExDQS4KICAgIGZ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gICAgfSk7CiAgICAgIH0pOwoKICAgICAgaWYgKCFnLnBhcmVudCh2KSkgewogICAgICAgIGcuc2V0RWRnZShyb290LCB0b3AsIHsgd2VpZ2h0OiAwLCBtaW5sZW46IGhlaWdodCArIGRlcHRoc1t2XSB9KTsKICAgICAgfQogICAgfQoKICAgIGZ1bmN0aW9uIHRyZWVEZXB0aHMoZykgewogICAgICB2YXIgZGVwdGhzID0ge307CiAgICAgIGZ1bmN0aW9uIGRmcyh2LCBkZXB0aCkgewogICAgICAgIHZhciBjaGlsZHJlbiA9IGcuY2hpbGRyZW4odik7CiAgICAgICAgaWYgKGNoaWxkcmVuICYmIGNoaWxkcmVuLmxlbmd0aCkgewogICAgICAgICAgbG9kYXNoXzEkMS5mb3JFYWNoKGNoaWxkcmVuLCBmdW5jdGlvbihjaGlsZCkgewogICAgICAgICAgICBkZnMoY2hpbGQsIGRlcHRoICsgMSk7CiAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgZGVwdGhzW3ZdID0gZGVwdGg7CiAgICAgIH0KICAgICAgbG9kYXNoXzEkMS5mb3JFYWNoKGcuY2hpbGRyZW4oKSwgZnVuY3Rpb24odikgeyBkZnModiwgMSk7IH0pOwogICAgICByZXR1cm4gZGVwdGhzOwogICAgfQoKICAgIGZ1bmN0aW9uIHN1bVdlaWdodHMoZykgewogICAgICByZXR1cm4gbG9kYXNoXzEkMS5yZWR1Y2UoZy5lZGdlcygpLCBmdW5jdGlvbihhY2MsIGUpIHsKICAgICAgICByZXR1cm4gYWNjICsgZy5lZGdlKGUpLndlaWdodDsKICAgICAgfSwgMCk7CiAgICB9CgogICAgZnVuY3Rpb24gY2xlYW51cChnKSB7CiAgICAgIHZhciBncmFwaExhYmVsID0gZy5ncmFwaCgpOwogICAgICBnLnJlbW92ZU5vZGUoZ3JhcGhMYWJlbC5uZXN0aW5nUm9vdCk7CiAgICAgIGRlbGV0ZSBncmFwaExhYmVsLm5lc3RpbmdSb290OwogICAgICBsb2Rhc2hfMSQxLmZvckVhY2goZy5lZGdlcygpLCBmdW5jdGlvbihlKSB7CiAgICAgICAgdmFyIGVkZ2UgPSBnLmVkZ2UoZSk7CiAgICAgICAgaWYgKGVkZ2UubmVzdGluZ0VkZ2UpIHsKICAgICAgICAgIGcucmVtb3ZlRWRnZShlKTsKICAgICAgICB9CiAgICAgIH0pOwogICAgfQoKICAgIHZhciBhZGRCb3JkZXJTZWdtZW50c18xID0gYWRkQm9yZGVyU2VnbWVudHM7CgogICAgZnVuY3Rpb24gYWRkQm9yZGVyU2VnbWVudHMoZykgewogICAgICBmdW5jdGlvbiBkZnModikgewogICAgICAgIHZhciBjaGlsZHJlbiA9IGcuY2hpbGRyZW4odik7CiAgICAgICAgdmFyIG5vZGUgPSBnLm5vZGUodik7CiAgICAgICAgaWYgKGNoaWxkcmVuLmxlbmd0aCkgewogICAgICAgICAgbG9kYXNoXzEkMS5mb3JFYWNoKGNoaWxkcmVuLCBkZnMpOwogICAgICAgIH0KCiAgICAgICAgaWYgKGxvZGFzaF8xJDEuaGFzKG5vZGUsICJtaW5SYW5rIikpIHsKICAgICAgICAgIG5vZGUuYm9yZGVyTGVmdCA9IFtdOwogICAgICAgICAgbm9kZS5ib3JkZXJSaWdodCA9IFtdOwogICAgICAgICAgZm9yICh2YXIgcmFuayA9IG5vZGUubWluUmFuaywgbWF4UmFuayA9IG5vZGUubWF4UmFuayArIDE7CiAgICAgICAgICAgIHJhbmsgPCBtYXhSYW5rOwogICAgICAgICAgICArK3JhbmspIHsKICAgICAgICAgICAgYWRkQm9yZGVyTm9kZSQxKGcsICJib3JkZXJMZWZ0IiwgIl9ibCIsIHYsIG5vZGUsIHJhbmspOwogICAgICAgICAgICBhZGRCb3JkZXJOb2RlJDEoZywgImJvcmRlclJpZ2h0IiwgIl9iciIsIHYsIG5vZGUsIHJhbmspOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQoKICAgICAgbG9kYXNoXzEkMS5mb3JFYWNoKGcuY2hpbGRyZW4oKS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5hbCBpbmRleCBvZiBhbnkgb2YgdGhlCiAgICAgKiAgICBlbGVtZW50cyBpbiBgdnNgLgogICAgICovCiAgICBmdW5jdGlvbiByZXNvbHZlQ29uZmxpY3RzKGVudHJpZXMsIGNnKSB7CiAgICAgIHZhciBtYXBwZWRFbnRyaWVzID0ge307CiAgICAgIGxvZGFzaF8xJDEuZm9yRWFjaChlbnRyaWVzLCBmdW5jdGlvbihlbnRyeSwgaSkgewogICAgICAgIHZhciB0bXAgPSBtYXBwZWRFbnRyaWVzW2VudHJ5LnZdID0gewogICAgICAgICAgaW5kZWdyZWU6IDAsCiAgICAgICAgICAiaW4iOiBbXSwKICAgICAgICAgIG91dDogW10sCiAgICAgICAgICB2czogW2VudHJ5LnZdLAogICAgICAgICAgaTogaQogICAgICAgIH07CiAgICAgICAgaWYgKCFsb2Rhc2hfMSQxLmlzVW5kZWZpbmVkKGVudHJ5LmJhcnljZW50ZXIpKSB7CiAgICAgICAgICB0bXAuYmFyeWNlbnRlciA9IGVudHJ5LmJhcnljZW50ZXI7CiAgICAgICAgICB0bXAud2VpZ2h0ID0gZW50cnkud2VpZ2h0OwogICAgICAgIH0KICAgICAgfSk7CgogICAgICBsb2Rhc2hfMSQxLmZvckVhY2goY2cuZWRnZXMoKSwgZnVuY3Rpb24oZSkgewogICAgICAgIHZhciBlbnRyeVYgPSBtYXBwZWRFbnRyaWVzW2Uudl07CiAgICAgICAgdmFyIGVudHJ5VyA9IG1hcHBlZEVudHJpZXNbZS53XTsKICAgICAgICBpZiAoIWxvZGFzaF8xJDEuaXNVbmRlZmluZWQoZW50cnlWKSAmJiAhbG9kYXNoXzEkMS5pc1VuZGVmaW5lZChlbnRyeVcpKSB7CiAgICAgICAgICBlbnRyeVcuaW5kZWdyZWUrKzsKICAgICAgICAgIGVudHJ5Vi5vdXQucHVzaChtYXBwZWRFbnRyaWVzW2Uud10pOwogICAgICAgIH0KICAgICAgfSk7CgogICAgICB2YXIgc291cmNlU2V0ID0gbG9kYXNoXzEkMS5maWx0ZXIobWFwcGVkRW50cmllcywgZnVuY3Rpb24oZW50cnkpIHsKICAgICAgICByZXR1cm4gIWVudHJ5LmluZGVncmVlOwogICAgICB9KTsKCiAgICAgIHJldHVybiBkb1Jlc29sdmVDb25mbGljdHMoc291cmNlU2V0KTsKICAgIH0KCiAgICBmdW5jdGlvbiBkb1Jlc29sdmVDb25mbGljdHMoc291cmNlU2V0KSB7CiAgICAgIHZhciBlbnRyaWVzID0gW107CgogICAgICBmdW5jdGlvbiBoYW5kbGVJbih2RW50cnkpIHsKICAgICAgICByZXR1cm4gZnVuY3Rpb24odUVudHJ5KSB7CiAgICAgICAgICBpZiAodUVudHJ5Lm1lcmdlZCkgewogICAgICAgICAgICByZXR1cm47CiAgICAgICAgICB9CiAgICAgICAgICBpZiAobG9kYXNoXzEkMS5pc1VuZGVmaW5lZCh1RW50cnkuYmFyeWNlbnRlcikgfHwKICAgICAgICAgICAgICBsb2Rhc2hfMSQxLmlzVW5kZWZpbmVkKHZFbnRyeS5iYXJ5Y2VudGVyKSB8fAogICAgICAgICAgICAgIHVFbnRyeS5iYXJ5Y2VudGVyID49IHZFbnRyeS5iYXJ5Y2VudGVyKSB7CiAgICAgICAgICAgIG1lcmdlRW50cmllcyh2RW50cnksIHVFbnRyeSk7CiAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgfQoKICAgICAgZnVuY3Rpb24gaGFuZGxlT3V0KHZFbnRyeSkgewogICAgICAgIHJldHVybiBmdW5jdGlvbih3RW50cnkpIHsKICAgICAgICAgIHdFbnRyeVsiaW4iXS5wdXNoKHZFbnRyeSk7CiAgICAgICAgICBpZiAoLS13RW50cnkuaW5kZWdyZWUgPT09IDApIHsKICAgICAgICAgICAgc291cmNlU2V0LnB1c2god0VudHJ5KTsKICAgICAgICAgIH0KICAgICAgICB9OwogICAgICB9CgogICAgICB3aGlsZSAoc291cmNlU2V0Lmxlbmd0aCkgewogICAgICAgIHZhciBlbnRyeSA9IHNvdXJjZVNldC5w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J5Y2VudGVycywgY2cpOwogICAgICBleHBhbmRTdWJncmFwaHMoZW50cmllcywgc3ViZ3JhcGhzKTsKCiAgICAgIHZhciByZXN1bHQgPSBzb3J0XzEoZW50cmllcywgYmlhc1JpZ2h0KTsKCiAgICAgIGlmIChibCkgewogICAgICAgIHJlc3VsdC52cyA9IGxvZGFzaF8xJDEuZmxhdHRlbihbYmwsIHJlc3VsdC52cywgYnJdLCB0cnVlKTsKICAgICAgICBpZiAoZy5wcmVkZWNlc3NvcnMoYmwpLmxlbmd0aCkgewogICAgICAgICAgdmFyIGJsUHJlZCA9IGcubm9kZShnLnByZWRlY2Vzc29ycyhibClbMF0pLAogICAgICAgICAgICBiclByZWQgPSBnLm5vZGUoZy5wcmVkZWNlc3NvcnMoYnIpWzBdKTsKICAgICAgICAgIGlmICghbG9kYXNoXzEkMS5oYXMocmVzdWx0LCAiYmFyeWNlbnRlciIpKSB7CiAgICAgICAgICAgIHJlc3VsdC5iYXJ5Y2VudGVyID0gMDsKICAgICAgICAgICAgcmVzdWx0LndlaWdodCA9IDA7CiAgICAgICAgICB9CiAgICAgICAgICByZXN1bHQuYmFyeWNlbnRlciA9IChyZXN1bHQuYmFyeWNlbnRlciAqIHJlc3VsdC53ZWlnaHQgKwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmxQcmVkLm9yZGVyICsgYnJQcmVkLm9yZGVyKSAvIChyZXN1bHQud2VpZ2h0ICsgMik7CiAgICAgICAgICByZXN1bHQud2VpZ2h0ICs9IDI7CiAgICAgICAgfQogICAgICB9CgogICAgICByZXR1cm4gcmVzdWx0OwogICAgfQoKICAgIGZ1bmN0aW9uIGV4cGFuZFN1YmdyYXBocyhlbnRyaWVzLCBzdWJncmFwaHMpIHsKICAgICAgbG9kYXNoXzEkMS5mb3JFYWNoKGVudHJpZXMsIGZ1bmN0aW9uKGVudHJ5KSB7CiAgICAgICAgZW50cnkudnMgPSBsb2Rhc2hfMSQxLmZsYXR0ZW4oZW50cnkudnMubW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KICAgICAgdmFyIHY7CiAgICAgIHdoaWxlIChnLmhhc05vZGUoKHYgPSBsb2Rhc2hfMSQxLnVuaXF1ZUlkKCJfcm9vdCIpKSkpOwogICAgICByZXR1cm4gdjsKICAgIH0KCiAgICB2YXIgYWRkU3ViZ3JhcGhDb25zdHJhaW50c18xID0gYWRkU3ViZ3JhcGhDb25zdHJhaW50czsKCiAgICBmdW5jdGlvbiBhZGRTdWJncmFwaENvbnN0cmFpbnRzKGcsIGNnLCB2cykgewogICAgICB2YXIgcHJldiA9IHt9LAogICAgICAgIHJvb3RQcmV2OwoKICAgICAgbG9kYXNoXzEkMS5mb3JFYWNoKHZzLCBmdW5jdGlvbih2KSB7CiAgICAgICAgdmFyIGNoaWxkID0gZy5wYXJlbnQodiksCiAgICAgICAgICBwYXJlbnQsCiAgICAgICAgICBwcmV2Q2hpbGQ7CiAgICAgICAgd2hpbGUgKGNoaWxkKSB7CiAgICAgICAgICBwYXJlbnQgPSBnLnBhcmVudChjaGlsZCk7CiAgICAgICAgICBpZiAocGFyZW50KSB7CiAgICAgICAgICAgIHByZXZDaGlsZCA9IHByZXZbcGFyZW50XTsKICAgICAgICAgICAgcHJldltwYXJlbnRdID0gY2hpbGQ7CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICBwcmV2Q2hpbGQgPSByb290UHJldjsKICAgICAgICAgICAgcm9vdFByZXYgPSBjaGlsZDsKICAgICAgICAgIH0KICAgICAgICAgIGlmIChwcmV2Q2hpbGQgJiYgcHJldkNoaWxkICE9PSBjaGlsZCkgewogICAgICAgICAgICBjZy5zZXRFZGdlKHByZXZDaGlsZCwgY2hpbGQpOwogICAgICAgICAgICByZXR1cm47CiAgICAgICAgICB9CiAgICAgICAgICBjaGlsZCA9IHBhcmVudDsKICAgICAgICB9CiAgICAgIH0pOwoKICAgICAgLyoKICAgICAgZnVuY3Rpb24gZGZzKHYpIHsKICAgICAgICB2YXIgY2hpbGRyZW4gPSB2ID8gZy5jaGlsZHJlbih2KSA6IGcuY2hpbGRyZW4oKTsKICAgICAgICBpZiAoY2hpbGRyZW4ubGVuZ3RoKSB7CiAgICAgICAgICB2YXIgbWluID0gTnVtYmVyLlBPU0lUSVZFX0lORklOSVRZLAogICAgICAgICAgICAgIHN1YmdyYXBocyA9IFtdOwogICAgICAgICAgXy5lYWNoKGNoaWxkcmVuLCBmdW5jdGlvbihjaGlsZCkgewogICAgICAgICAgICB2YXIgY2hpbGRNaW4gPSBkZnMoY2hpbGQpOwogICAgICAgICAgICBpZiAoZy5jaGlsZHJlbihjaGlsZCkubGVuZ3RoKSB7CiAgICAgICAgICAgICAgc3ViZ3JhcGhzLnB1c2goeyB2OiBjaGlsZCwgb3JkZXI6IGNoaWxkTWluIH0pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIG1pbiA9IE1hdGgubWluKG1pbiwgY2hpbGRNaW4pOwogICAgICAgICAgfSk7CiAgICAgICAgICBfLnJlZHVjZShfLnNvcnRCeShzdWJncmFwaHMsICJvcmRlciIpLCBmdW5jdGlvbihwcmV2LCBjdXJyKSB7CiAgICAgICAgICAgIGNnLnNldEVkZ2UocHJldi52LCBjdXJyLnYpOwogICAgICAgICAgICByZXR1cm4gY3VycjsKICAgICAgICAgIH0pOwogICAgICAgICAgcmV0dXJuIG1pbjsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGcubm9kZSh2KS5vcmRlcjsKICAgICAgfQogICAgICBkZnModW5kZWZpbmVkKTsKICAgICAgKi8KICAgIH0KCiAgICB2YXIgR3JhcGgkNSA9IGdyYXBobGliXzEuR3JhcGg7CgoKICAgIHZhciBvcmRlcl8xID0gb3JkZXI7CgogICAgLyoKICAgICAqIEFwcGxpZXMgaGV1cmlzdGljcyB0byBtaW5pbWl6ZSBlZGdlIGNyb3NzaW5ncyBpbiB0aGUgZ3JhcGggYW5kIHNldHMgdGhlIGJlc3QKICAgICAqIG9yZGVyIHNvbHV0aW9uIGFzIGFuIG9yZGVyIGF0dHJpYnV0ZSBvbiBlYWNo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AgICAgbG9kYXNoXzEkMS5mb3JFYWNoKGxheWVyLnNsaWNlKHNjYW5Qb3MsIGkgKzEpLCBmdW5jdGlvbihzY2FuTm9kZSkgewogICAgICAgICAgICAgIGxvZGFzaF8xJDEuZm9yRWFjaChnLnByZWRlY2Vzc29ycyhzY2FuTm9kZSksIGZ1bmN0aW9uKHUpIHsKICAgICAgICAgICAgICAgIHZhciB1TGFiZWwgPSBnLm5vZGUodSksCiAgICAgICAgICAgICAgICAgIHVQb3MgPSB1TGFiZWwub3JkZXI7CiAgICAgICAgICAgICAgICBpZiAoKHVQb3MgPCBrMCB8fCBrMSA8IHVQb3MpICYmCiAgICAgICAgICAgICAgICAgICAgISh1TGFiZWwuZHVtbXkgJiYgZy5ub2RlKHNjYW5Ob2RlKS5kdW1teSkpIHsKICAgICAgICAgICAgICAgICAgYWRkQ29uZmxpY3QoY29uZmxpY3RzLCB1LCBzY2FuTm9kZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBzY2FuUG9zID0gaSArIDE7CiAgICAgICAgICAgIGswID0gazE7CiAgICAgICAgICB9CiAgICAgICAgfSk7CgogICAgICAgIHJldHVybiBsYXllcjsKICAgICAgfQoKICAgICAgbG9kYXNoXzEkMS5yZWR1Y2UobGF5ZXJpbmcsIHZpc2l0TGF5ZXIpOwogICAgICByZXR1cm4gY29uZmxpY3RzOwogICAgfQoKICAgIGZ1bmN0aW9uIGZpbmRUeXBlMkNvbmZsaWN0cyhnLCBsYXllcmluZykgewogICAgICB2YXIgY29uZmxpY3RzID0ge307CgogICAgICBmdW5jdGlvbiBzY2FuKHNvdXRoLCBzb3V0aFBvcywgc291dGhFbmQsIHByZXZOb3J0aEJvcmRlciwgbmV4dE5vcnRoQm9yZGVyKSB7CiAgICAgICAgdmFyIHY7CiAgICAgICAgbG9kYXNoXzEkMS5mb3JFYWNoKGxvZGFzaF8xJDEucmFuZ2Uoc291dGhQb3MsIHNvdXRoRW5kKSwgZnVuY3Rpb24oaSkgewogICAgICAgICAgdiA9IHNvdXRoW2ldOwogICAgICAgICAgaWYgKGcubm9kZSh2KS5kdW1teSkgewogICAgICAgICAgICBsb2Rhc2hfMSQxLmZvckVhY2goZy5wcmVkZWNlc3NvcnModiksIGZ1bmN0aW9uKHUpIHsKICAgICAgICAgICAgICB2YXIgdU5vZGUgPSBnLm5vZGUodSk7CiAgICAgICAgICAgICAgaWYgKHVOb2RlLmR1bW15ICYmCiAgICAgICAgICAgICAgICAgICh1Tm9kZS5vcmRlciA8IHByZXZOb3J0aEJvcmRlciB8fCB1Tm9kZS5vcmRlciA+IG5leHROb3J0aEJvcmRlcikpIHsKICAgICAgICAgICAgICAgIGFkZENvbmZsaWN0KGNvbmZsaWN0cywgdSwgdik7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICAgIH0KICAgICAgICB9KTsKICAgICAgfQoKCiAgICAgIGZ1bmN0aW9uIHZpc2l0TGF5ZXIobm9ydGgsIHNvdXRoKSB7CiAgICAgICAgdmFyIHByZXZOb3J0aFBvcyA9IC0xLAogICAgICAgICAgbmV4dE5vcnRoUG9zLAogICAgICAgICAgc291dGhQb3MgPSAwOwoKICAgICAgICBsb2Rhc2hfMSQxLmZvckVhY2goc291dGgsIGZ1bmN0aW9uKHYsIHNvdXRoTG9va2FoZWFkKSB7CiAgICAgICAgICBpZiAoZy5ub2RlKHYpLmR1bW15ID09PSAiYm9yZGVyIikgewogICAgICAgICAgICB2YXIgcHJlZGVjZXNzb3JzID0gZy5wcmVkZWNlc3NvcnModik7CiAgICAgICAgICAgIGlmIChwcmVkZWNlc3NvcnMubGVuZ3RoKSB7CiAgICAgICAgICAgICAgbmV4dE5vcnRoUG9zID0gZy5ub2RlKHByZWRlY2Vzc29yc1swXSkub3JkZXI7CiAgICAgICAgICAgICAgc2Nhbihzb3V0aCwgc291dGhQb3MsIHNvdXRoTG9va2FoZWFkLCBwcmV2Tm9ydGhQb3MsIG5leHROb3J0aFBvcyk7CiAgICAgICAgICAgICAgc291dGhQb3MgPSBzb3V0aExvb2thaGVhZDsKICAgICAgICAgICAgICBwcmV2Tm9ydGhQb3MgPSBuZXh0Tm9ydGhQb3M7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICAgIHNjYW4oc291dGgsIHNvdXRoUG9zLCBzb3V0aC5sZW5ndGgsIG5leHROb3J0aFBvcywgbm9ydGgubGVuZ3RoKTsKICAgICAgICB9KTsKCiAgICAgICAgcmV0dXJuIHNvdXRoOwogICAgICB9CgogICAgICBsb2Rhc2hfMSQxLnJlZHVjZShsYXllcmluZywgdmlzaXRMYXllcik7CiAgICAgIHJldHVybiBjb25mbGljdHM7CiAgICB9CgogICAgZnVuY3Rpb24gZmluZE90aGVySW5uZXJTZWdtZW50Tm9kZShnLCB2KSB7CiAgICAgIGlmIChnLm5vZGUodikuZHVtbXkpIHsKICAgICAgICByZXR1cm4gbG9kYXNoXzEkMS5maW5kKGcucHJlZGVjZXNzb3JzKHYpLCBmdW5jdGlvbih1KSB7CiAgICAgICAgICByZXR1cm4gZy5ub2RlKHUpLmR1bW15OwogICAgICAgIH0pOwogICAgICB9CiAgICB9CgogICAgZnVuY3Rpb24gYWRkQ29uZmxpY3QoY29uZmxpY3RzLCB2LCB3KSB7CiAgICAgIGlmICh2ID4gdykgewogICAgICAgIHZhciB0bXAgPSB2OwogICAgICAgIHYgPSB3OwogICAgICAgIHcgPSB0bXA7CiAgICAgIH0KCiAgICAgIHZhciBjb25mbGljdHNWID0gY29uZmxpY3RzW3ZdOwogICAgICBpZiAoIWNvbmZsaWN0c1YpIHsKICAgICAgICBjb25mbGljdHNbdl0gPSBjb25mbGljdHNWID0ge307CiAgICAgIH0KICAgICAgY29uZmxpY3RzVlt3XSA9IHRydWU7CiAgICB9CgogICAgZnVuY3Rpb24gaGFzQ29uZmxpY3QoY29uZmxpY3RzLCB2LCB3KSB7CiAgICAgIGlmICh2ID4gdykgewogICAg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FRoZSBsYXllcmluZyBtYXRyaXggaXMgbWFuaXB1bGF0ZWQgdG8KICAgICAgLy8gZ2VuZXJhdGUgZGlmZmVyZW50IGV4dHJlbWUgYWxpZ25tZW50cy4KICAgICAgbG9kYXNoXzEkMS5mb3JFYWNoKGxheWVyaW5nLCBmdW5jdGlvbihsYXllcikgewogICAgICAgIGxvZGFzaF8xJDEuZm9yRWFjaChsYXllciwgZnVuY3Rpb24odiwgb3JkZXIpIHsKICAgICAgICAgIHJvb3Rbdl0gPSB2OwogICAgICAgICAgYWxpZ25bdl0gPSB2OwogICAgICAgICAgcG9zW3ZdID0gb3JkZXI7CiAgICAgICAgfSk7CiAgICAgIH0pOwoKICAgICAgbG9kYXNoXzEkMS5mb3JFYWNoKGxheWVyaW5nLCBmdW5jdGlvbihsYXllcikgewogICAgICAgIHZhciBwcmV2SWR4ID0gLTE7CiAgICAgICAgbG9kYXNoXzEkMS5mb3JFYWNoKGxheWVyLCBmdW5jdGlvbih2KSB7CiAgICAgICAgICB2YXIgd3MgPSBuZWlnaGJvckZuKHYpOwogICAgICAgICAgaWYgKHdzLmxlbmd0aCkgewogICAgICAgICAgICB3cyA9IGxvZGFzaF8xJDEuc29ydEJ5KHdzLCBmdW5jdGlvbih3KSB7IHJldHVybiBwb3Nbd107IH0pOwogICAgICAgICAgICB2YXIgbXAgPSAod3MubGVuZ3RoIC0gMSkgLyAyOwogICAgICAgICAgICBmb3IgKHZhciBpID0gTWF0aC5mbG9vcihtcCksIGlsID0gTWF0aC5jZWlsKG1wKTsgaSA8PSBpbDsgKytpKSB7CiAgICAgICAgICAgICAgdmFyIHcgPSB3c1tpXTsKICAgICAgICAgICAgICBpZiAoYWxpZ25bdl0gPT09IHYgJiYKICAgICAgICAgICAgICAgICAgcHJldklkeCA8IHBvc1t3XSAmJgogICAgICAgICAgICAgICAgICAhaGFzQ29uZmxpY3QoY29uZmxpY3RzLCB2LCB3KSkgewogICAgICAgICAgICAgICAgYWxpZ25bd10gPSB2OwogICA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BibG9ja0dyYXBoLnNldE5vZGUodlJvb3QpOwogICAgICAgICAgaWYgKHUpIHsKICAgICAgICAgICAgdmFyIHVSb290ID0gcm9vdFt1XSwKICAgICAgICAgICAgICBwcmV2TWF4ID0gYmxvY2tHcmFwaC5lZGdlKHVSb290LCB2Um9vdCk7CiAgICAgICAgICAgIGJsb2NrR3JhcGguc2V0RWRnZSh1Um9vdCwgdlJvb3QsIE1hdGgubWF4KHNlcEZuKGcsIHYsIHUpLCBwcmV2TWF4IHx8IDApKTsKICAgICAgICAgIH0KICAgICAgICAgIHUgPSB2OwogICAgICAgIH0pOwogICAgICB9KTsKCiAgICAgIHJldHVybiBibG9ja0dyYXBoOwogICAgfQoKICAgIC8qCiAgICAgKiBSZXR1cm5zIHRoZSBhbGlnbm1lbnQgdGhhdCBoYXMgdGhlIHNtYWxsZXN0IHdpZHRoIG9mIHRoZSBnaXZlbiBhbGlnbm1lbnRzLgogICAgICovCiAgICBmdW5jdGlvbiBmaW5kU21hbGxlc3RXaWR0aEFsaWdubWVudChnLCB4c3MpIHsKICAgICAgcmV0dXJuIGxvZGFzaF8xJDEubWluQnkobG9kYXNoXzEkMS52YWx1ZXMoeHNzKSwgZnVuY3Rpb24gKHhzKSB7CiAgICAgICAgdmFyIG1heCA9IE51bWJlci5ORUdBVElWRV9JTkZJTklUWTsKICAgICAgICB2YXIgbWluID0gTnVtYmVyLlBPU0lUSVZFX0lORklOSVRZOwoKICAgICAgICBsb2Rhc2hfMSQxLmZvckluKHhzLCBmdW5jdGlvbiAoeCwgdikgewogICAgICAgICAgdmFyIGhhbGZXaWR0aCA9IHdpZHRoKGcsIHYpIC8gMjsKCiAgICAgICAgICBtYXggPSBNYXRoLm1heCh4ICsgaGFsZldpZHRoLCBtYXgpOwogICAgICAgICAgbWluID0gTWF0aC5taW4oeCAtIGhhbGZXaWR0aCwgbWluKTsKICAgICAgICB9KTsKCiAgICAgICAgcmV0dXJuIG1heCAtIG1pbjsKICAgICAgfSk7CiAgICB9C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XpdID0geHM7CiAgICAgICAgfSk7CiAgICAgIH0pOwoKICAgICAgdmFyIHNtYWxsZXN0V2lkdGggPSBmaW5kU21hbGxlc3RXaWR0aEFsaWdubWVudChnLCB4c3MpOwogICAgICBhbGlnbkNvb3JkaW5hdGVzKHhzcywgc21hbGxlc3RXaWR0aCk7CiAgICAgIHJldHVybiBiYWxhbmNlKHhzcywgZy5ncmFwaCgpLmFsaWduKTsKICAgIH0KCiAgICBmdW5jdGlvbiBzZXAobm9kZVNlcCwgZWRnZVNlcCwgcmV2ZXJzZVNlcCkgewogICAgICByZXR1cm4gZnVuY3Rpb24oZywgdiwgdykgewogICAgICAgIHZhciB2TGFiZWwgPSBnLm5vZGUodik7CiAgICAgICAgdmFyIHdMYWJlbCA9IGcubm9kZSh3KTsKICAgICAgICB2YXIgc3VtID0gMDsKICAgICAgICB2YXIgZGVsdGE7CgogICAgICAgIHN1bSArPSB2TGFiZWwud2lkdGggLyAyOwogICAgICAgIGlmIChsb2Rhc2hfMSQxLmhhcyh2TGFiZWwsICJsYWJlbHBvcyIpKSB7CiAgICAgICAgICBzd2l0Y2ggKHZMYWJlbC5sYWJlbHBvcy50b0xvd2VyQ2FzZSgpKSB7CiAgICAgICAgICBjYXNlICJsIjogZGVsdGEgPSAtdkxhYmVsLndpZHRoIC8gMjsgYnJlYWs7CiAgICAgICAgICBjYXNlICJyIjogZGVsdGEgPSB2TGFiZWwud2lkdGggLyAyOyBicmVhazsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaWYgKGRlbHRhKSB7CiAgICAgICAgICBzdW0gKz0gcmV2ZXJzZVNlcCA/IGRlbHRhIDogLWRlbHRhOwogICAgICAgIH0KICAgICAgICBkZWx0YSA9IDA7CgogICAgICAgIHN1bSArPSAodkxhYmVsLmR1bW15ID8gZWRnZVNlcCA6IG5vZGVTZXApIC8gMjsKICAgICAgICBzdW0gKz0gKHdMYWJlbC5kdW1teSA/IGVkZ2VTZXAgOiBub2RlU2VwKSAvIDI7CgogICAgICAgIHN1bSArPSB3TGFiZWwud2lkdGggLyAyOwogICAgICAgIGlmIChsb2Rhc2hfMSQxLmhhcyh3TGFiZWwsICJsYWJlbHBvcyIpKSB7CiAgICAgICAgICBzd2l0Y2ggKHdMYWJlbC5sYWJlbHBvcy50b0xvd2VyQ2FzZSgpKSB7CiAgICAgICAgICBjYXNlICJsIjogZGVsdGEgPSB3TGFiZWwud2lkdGggLyAyOyBicmVhazsKICAgICAgICAgIGNhc2UgInIiOiBkZWx0YSA9IC13TGFiZWwud2lkdGggLyAyOyBicmVhazsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaWYgKGRlbHRhKSB7CiAgICAgICAgICBzdW0gKz0gcmV2ZXJzZVNlcCA/IGRlbHRhIDogLWRlbHRhOwogICAgICAgIH0KICAgICAgICBkZWx0YSA9IDA7CgogICAgICAgIHJldHVybiBzdW07CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gd2lkdGgoZywgdikgewogICAgICByZXR1cm4gZy5ub2RlKHYpLndpZHRoOwogICAgfQoKICAgIHZhciBwb3NpdGlvblgkMSA9IGJrLnBvc2l0aW9uWDsKCiAgICB2YXIgcG9zaXRpb25fMSA9IHBvc2l0aW9uOwoKICAgIGZ1bmN0aW9uIHBvc2l0aW9uKGcpIHsKICAgICAgZyA9IHV0aWwuYXNOb25Db21wb3VuZEdyYXBoKGcpOwoKICAgICAgcG9zaXRpb25ZKGcpOwogICAgICBsb2Rhc2hfMSQxLmZvckVhY2gocG9zaXRpb25YJDEoZyksIGZ1bmN0aW9uKHgsIHYpIHsKICAgICAgICBnLm5vZGUodikueCA9IHg7CiAgICAgIH0pOwogICAgfQoKICAgIGZ1bmN0aW9uIHBvc2l0aW9uWShnKSB7CiAgICAgIHZhciBsYXllcmluZyA9IHV0aWwuYnVpbGRMYXllck1hdHJpeChnKTsKICAgICAgdmFyIHJhbmtTZXAgPSBnLmdyYXBoKCkucmFua3NlcDsKICAgICAgdmFyIHByZXZZID0gM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AgICAgICBpZiAoZWRnZS53aWR0aCAmJiBlZGdlLmhlaWdodCkgewogICAgICAgICAgdmFyIHYgPSBnLm5vZGUoZS52KTsKICAgICAgICAgIHZhciB3ID0gZy5ub2RlKGUudyk7CiAgICAgICAgICB2YXIgbGFiZWwgPSB7IHJhbms6ICh3LnJhbmsgLSB2LnJhbmspIC8gMiArIHYucmFuaywgZTogZSB9OwogICAgICAgICAgdXRpbCQyLmFkZER1bW15Tm9kZShnLCAiZWRnZS1wcm94eSIsIGxhYmVsLCAiX2VwIik7CiAgICAgICAgfQogICAgICB9KTsKICAgIH0KCiAgICBmdW5jdGlvbiBhc3NpZ25SYW5rTWluTWF4KGcpIHsKICAgICAgdmFyIG1heFJhbmsgPSAwOwogICAgICBsb2Rhc2hfMSQxLmZvckVhY2goZy5ub2RlcygpLCBmdW5jdGlvbih2KSB7CiAgICAgICAgdmFyIG5vZGUgPSBnLm5vZGUodik7CiAgICAgICAgaWYgKG5vZGUuYm9yZGVyVG9wKSB7CiAgICAgICAgICBub2RlLm1pblJhbmsgPSBnLm5vZGUobm9kZS5ib3JkZXJUb3ApLnJhbms7CiAgICAgICAgICBub2RlLm1heFJhbmsgPSBnLm5vZGUobm9kZS5ib3JkZXJCb3R0b20pLnJhbms7CiAgICAgICAgICBtYXhSYW5rID0gbG9kYXNoXzEkMS5tYXgobWF4UmFuaywgbm9kZS5tYXhSYW5rKTsKICAgICAgICB9CiAgICAgIH0pOwogICAgICBnLmdyYXBoKCkubWF4UmFuayA9IG1heFJhbms7CiAgICB9CgogICAgZnVuY3Rpb24gcmVtb3ZlRWRnZUxhYmVsUHJveGllcyhnKSB7CiAgICAgIGxvZGFzaF8xJDEuZm9yRWFjaChnLm5vZGVzKCksIGZ1bmN0aW9uKHYpIHsKICAgICAgICB2YXIgbm9kZSA9IGcubm9kZSh2KTsKICAgICAgICBpZiAobm9kZS5kdW1teSA9PT0gImVkZ2UtcHJveHkiKSB7CiAgICAgICAgICBnLmVkZ2Uobm9kZS5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A9IGcubm9kZShlLnYpOwogICAgICAgIHZhciBub2RlVyA9IGcubm9kZShlLncpOwogICAgICAgIHZhciBwMSwgcDI7CiAgICAgICAgaWYgKCFlZGdlLnBvaW50cykgewogICAgICAgICAgZWRnZS5wb2ludHMgPSBbXTsKICAgICAgICAgIHAxID0gbm9kZVc7CiAgICAgICAgICBwMiA9IG5vZGVWOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICBwMSA9IGVkZ2UucG9pbnRzWzBdOwogICAgICAgICAgcDIgPSBlZGdlLnBvaW50c1tlZGdlLnBvaW50cy5sZW5ndGggLSAxXTsKICAgICAgICB9CiAgICAgICAgZWRnZS5wb2ludHMudW5zaGlmdCh1dGlsJDIuaW50ZXJzZWN0UmVjdChub2RlViwgcDEpKTsKICAgICAgICBlZGdlLnBvaW50cy5wdXNoKHV0aWwkMi5pbnRlcnNlY3RSZWN0KG5vZGVXLCBwMikpOwogICAgICB9KTsKICAgIH0KCiAgICBmdW5jdGlvbiBmaXh1cEVkZ2VMYWJlbENvb3JkcyhnKSB7CiAgICAgIGxvZGFzaF8xJDEuZm9yRWFjaChnLmVkZ2VzKCksIGZ1bmN0aW9uKGUpIHsKICAgICAgICB2YXIgZWRnZSA9IGcuZWRnZShlKTsKICAgICAgICBpZiAobG9kYXNoXzEkMS5oYXMoZWRnZSwgIngiKSkgewogICAgICAgICAgaWYgKGVkZ2UubGFiZWxwb3MgPT09ICJsIiB8fCBlZGdlLmxhYmVscG9zID09PSAiciIpIHsKICAgICAgICAgICAgZWRnZS53aWR0aCAtPSBlZGdlLmxhYmVsb2Zmc2V0OwogICAgICAgICAgfQogICAgICAgICAgc3dpdGNoIChlZGdlLmxhYmVscG9zKSB7CiAgICAgICAgICBjYXNlICJsIjogZWRnZS54IC09IGVkZ2Uud2lkdGggLyAyICsgZWRnZS5sYWJlbG9mZnNldDsgYnJlYWs7CiAgICAgICAgICBjYXNlICJyIjogZWRnZS54ICs9IGVkZ2Uud2lkdGggLyAyICsgZWRnZS5sYWJlbG9mZnNldDsgYnJlYWs7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9KTsKICAgIH0KCiAgICBmdW5jdGlvbiByZXZlcnNlUG9pbnRzRm9yUmV2ZXJzZWRFZGdlcyhnKSB7CiAgICAgIGxvZGFzaF8xJDEuZm9yRWFjaChnLmVkZ2VzKCksIGZ1bmN0aW9uKGUpIHsKICAgICAgICB2YXIgZWRnZSA9IGcuZWRnZShlKTsKICAgICAgICBpZiAoZWRnZS5yZXZlcnNlZCkgewogICAgICAgICAgZWRnZS5wb2ludHMucmV2ZXJzZSgpOwogICAgICAgIH0KICAgICAgfSk7CiAgICB9CgogICAgZnVuY3Rpb24gcmVtb3ZlQm9yZGVyTm9kZXMoZykgewogICAgICBsb2Rhc2hfMSQxLmZvckVhY2goZy5ub2RlcygpLCBmdW5jdGlvbih2KSB7CiAgICAgICAgaWYgKGcuY2hpbGRyZW4odikubGVuZ3RoKSB7CiAgICAgICAgICB2YXIgbm9kZSA9IGcubm9kZSh2KTsKICAgICAgICAgIHZhciB0ID0gZy5ub2RlKG5vZGUuYm9yZGVyVG9wKTsKICAgICAgICAgIHZhciBiID0gZy5ub2RlKG5vZGUuYm9yZGVyQm90dG9tKTsKICAgICAgICAgIHZhciBsID0gZy5ub2RlKGxvZGFzaF8xJDEubGFzdChub2RlLmJvcmRlckxlZnQpKTsKICAgICAgICAgIHZhciByID0gZy5ub2RlKGxvZGFzaF8xJDEubGFzdChub2RlLmJvcmRlclJpZ2h0KSk7CgogICAgICAgICAgbm9kZS53aWR0aCA9IE1hdGguYWJzKHIueCAtIGwueCk7CiAgICAgICAgICBub2RlLmhlaWdodCA9IE1hdGguYWJzKGIueSAtIHQueSk7CiAgICAgICAgICBub2RlLnggPSBsLnggKyBub2RlLndpZHRoIC8gMjsKICAgICAgICAgIG5vZGUueSA9IHQueSArIG5vZGUuaGVpZ2h0IC8gMjsKICAgICAgICB9CiAgICAgIH0pOwoKICAgICAgbG9kYXNoXzEkMS5mb3JFYWNoKGcubm9kZXMoKSwgZnVuY3Rpb24odikgewogICAgICAgIGlmIChnLm5vZGUodikuZHVtbXkgPT09ICJib3JkZXIiKSB7CiAgICAgICAgICBnLnJlbW92ZU5vZGUodik7CiAgICAgICAgfQogICAgICB9KTsKICAgIH0KCiAgICBmdW5jdGlvbiByZW1vdmVTZWxmRWRnZXMoZykgewogICAgICBsb2Rhc2hfMSQxLmZvckVhY2goZy5lZGdlcygpLCBmdW5jdGlvbihlKSB7CiAgICAgICAgaWYgKGUudiA9PT0gZS53KSB7CiAgICAgICAgICB2YXIgbm9kZSA9IGcubm9kZShlLnYpOwogICAgICAgICAgaWYgKCFub2RlLnNlbGZFZGdlcykgewogICAgICAgICAgICBub2RlLnNlbGZFZGdlcyA9IFtdOwogICAgICAgICAgfQogICAgICAgICAgbm9kZS5zZWxmRWRnZXMucHVzaCh7IGU6IGUsIGxhYmVsOiBnLmVkZ2UoZSkgfSk7CiAgICAgICAgICBnLnJlbW92ZUVkZ2UoZSk7CiAgICAgICAgfQogICAgICB9KTsKICAgIH0KCiAgICBmdW5jdGlvbiBpbnNlcnRTZWxmRWRnZXMoZykgewogICAgICB2YXIgbGF5ZXJzID0gdXRpbCQyLmJ1aWxkTGF5ZXJNYXRyaXgoZyk7CiAgICAgIGxvZGFzaF8xJDEuZm9yRWFjaChsYXllcnMsIGZ1bmN0aW9uKGxheWVyKSB7CiAgICAgICAgdmFyIG9yZGVyU2hpZnQgPSAwOwogICAgICAgIGxvZGFzaF8xJDEuZm9yRWFjaChsYXllciwgZnVuY3Rpb24odiwgaSkgewogICAgICAgICAgdmFyIG5vZGUgPSBnLm5vZGUodik7CiAgICAgICAgICBub2RlLm9yZGVyID0gaSArIG9yZGVyU2hpZnQ7CiAgICAgICAgICBsb2Rhc2hfMSQxLmZvckVhY2gobm9kZS5zZWxmRWRnZXMsIGZ1bmN0aW9uKHNlbGZFZGdlKSB7CiAgICAgICAgICAgIHV0aWwkMi5hZGREdW1teU5vZGUoZywgInNlbGZlZGdlIiwgewogICAgICAgICAgICAgIHdpZHRoOiBzZWxmRWRnZS5sYWJlbC53aWR0aCwKICAgICAgICAgICAgICBoZWlnaHQ6IHNlbGZFZGdlLmxhYmVsLmhlaWdodCwKICAgICAgICAgICAgICByYW5rOiBub2RlLnJhbmssCiAgICAgICAgICAgICAgb3JkZXI6IGkgKyAoKytvcmRlclNoaWZ0KSwKICAgICAgICAgICAgICBlOiBzZWxmRWRnZS5lLAogICAgICAgICAgICAgIGxhYmVsOiBzZWxmRWRnZS5sYWJlbAogICAgICAgICAgICB9LCAiX3NlIik7CiAgICAgICAgICB9KTsKICAgICAgICAgIGRlbGV0ZSBub2RlLnNlbGZFZGdlczsKICAgICAgICB9KTsKICAgICAgfSk7CiAgICB9CgogICAgZnVuY3Rpb24gcG9zaXRpb25TZWxmRWRnZXMoZykgewogICAgICBsb2Rhc2hfMSQxLmZvckVhY2goZy5ub2RlcygpLCBmdW5jdGlvbih2KSB7CiAgICAgICAgdmFyIG5vZGUgPSBnLm5vZGUodik7CiAgICAgICAgaWYgKG5vZGUuZHVtbXkgPT09ICJzZWxmZWRnZSIpIHsKICAgICAgICAgIHZhciBzZWxmTm9kZSA9IGcubm9kZShub2RlLmUudik7CiAgICAgICAgICB2YXIgeCA9IHNlbGZOb2RlLnggKyBzZWxmTm9kZS53aWR0aCAvIDI7CiAgICAgICAgICB2YXIgeSA9IHNlbGZOb2RlLnk7CiAgICAgICAgICB2YXIgZHggPSBub2RlLnggLSB4OwogICAgICAgICAgdmFyIGR5ID0gc2VsZk5vZGUuaGVpZ2h0IC8gMjsKICAgICAgICAgIGcuc2V0RWRnZShub2RlLmUsIG5vZGUubGFiZWwpOwogICAgICAgICAgZy5yZW1vdmVOb2RlKHYpOwogICAgICAgICAgbm9kZS5sYWJlbC5wb2ludHMgPSBbCiAgICAgICAgICAgIHsgeDogeCArIDIgKiBkeCAvIDMsIHk6IHkgLSBkeSB9LAogICAgICAgICAgICB7IHg6IHggKyA1ICogZ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ovCiAgICBmdW5jdGlvbiBnZXRUcmFja2VyKHBvbHltZXJDb21wb25lbnQpIHsKICAgICAgICByZXR1cm4gewogICAgICAgICAgICBzZXRNZXNzYWdlOiBmdW5jdGlvbiAobXNnKSB7CiAgICAgICAgICAgICAgICBwb2x5bWVyQ29tcG9uZW50LnNldCgncHJvZ3Jlc3MnLCB7CiAgICAgICAgICAgICAgICAgICAgdmFsdWU6IHBvbHltZXJDb21wb25lbnQucHJvZ3Jlc3MudmFsdWUsCiAgICAgICAgICAgICAgICAgICAgbXNnOiBtc2csCiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfSwKICAgICAgICAgICAgdXBkYXRlUHJvZ3Jlc3M6IGZ1bmN0aW9uICh2YWx1ZSkgewogICAgICAgICAgICAgICAgcG9seW1lckNvbXBvbmVudC5zZXQoJ3Byb2dyZXNzJywgewogICAgICAgICAgICAgICAgICAgIHZhbHVlOiBwb2x5bWVyQ29tcG9uZW50LnByb2dyZXNzLnZhbHVlICsgdmFsdWUsCiAgICAgICAgICAgICAgICAgICAgbXNnOiBwb2x5bWVyQ29tcG9uZW50LnByb2dyZXNzLm1zZywKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICB9LAogICAgICAgICAgICByZXBvcnRFcnJvcjogZnVuY3Rpb24gKG1zZywgZXJyKSB7CiAgICAgICAgICAgICAgICAvLyBMb2cgdGhlIHN0YWNrIHRyYWNlIGluIHRoZSBjb25zb2xlLgogICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihlcnIuc3RhY2spOwogICAgICAgICAgICAgICAgLy8gQW5kIHNlbmQgYSB1c2VyLWZyaWVuZGx5IG1lc3NhZ2UgdG8gdGhlIFVJLgogICAgICAgICAgICAgICAgcG9seW1lckNvbXBvbmVudC5zZXQoJ3Byb2dyZXNzJywgewogICAgICAgICAgICAgICAgICAgIHZhbHVlOiBwb2x5bWVyQ29tcG9uZW50LnByb2dyZXNzLnZhbHVlLAogICAgICAgICAgICAgICAgICAgIG1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SwgdGFzaywgdHJhY2tlcikgewogICAgICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7CiAgICAgICAgICAgIC8vIFVwZGF0ZSB0aGUgcHJvZ3Jlc3MgbWVzc2FnZSB0byBzYXkgdGhlIGN1cnJlbnQgcnVubmluZyB0YXNrLgogICAgICAgICAgICB0cmFja2VyLnNldE1lc3NhZ2UobXNnKTsKICAgICAgICAgICAgLy8gUnVuIHRoZSBleHBlbnNpdmUgdGFzayB3aXRoIGEgZGVsYXkgdGhhdCBnaXZlcyBlbm91Z2ggdGltZSBmb3IgdGhlCiAgICAgICAgICAgIC8vIFVJIHRvIHVwZGF0ZS4KICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgICAgIGxldCByZXN1bHQgPSB0aW1lJDMobXNnLCB0YXNrKTsKICAgICAgICAgICAgICAgICAgICAvLyBVcGRhdGUgdGhlIHByb2dyZXNzIHZhbHVlLgogICAgICAgICAgICAgICAgICAgIHRyYWNrZXIudXBkYXRlUHJvZ3Jlc3MoaW5jUHJvZ3Jlc3NWYWx1ZSk7CiAgICAgICAgICAgICAgICAgICAgLy8gUmV0dXJuIHRoZSByZXN1bHQgdG8gYmUgdXNlZCBieSBvdGhlciB0YXNrcy4KICAgICAgICAgICAgICAgICAgICByZXNvbHZlKHJlc3VsdCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjYXRjaCAoZSkgewogICAgICAgICAgICAgICAgICAgIC8vIEVycm9ycyB0aGF0IGhhcHBlbiBpbnNpZGUgYXN5bmNocm9ub3VzIHRhc2tzIGFyZQogICAgICAgICAgICAgICAgICAgIC8vIHJlcG9ydGVkIHRvIHRoZSB0cmFja2VyIHVzaW5nIGEgdXNlci1mcmllbmRseSBtZXNzYWdlLgogICAgICAgICAgICAgICAgICAgIHRyYWNrZXIucmVwb3J0RXJyb3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7CiAgICAgICAgICAgIC8vIFJ1biB0aGUgZXhwZW5zaXZlIHRhc2sgd2l0aCBhIGRlbGF5IHRoYXQgZ2l2ZXMgZW5vdWdoIHRpbWUgZm9yIHRoZQogICAgICAgICAgICAvLyBVSSB0byB1cGRhdGUuCiAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICBsZXQgc3RhcnQgPSBEYXRlLm5vdygpOwogICAgICAgICAgICAgICAgICAgIHRhc2soKQogICAgICAgICAgICAgICAgICAgICAgICAudGhlbihmdW5jdGlvbiAodmFsdWUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgLyogdHNsaW50OmRpc2FibGUgKi8KICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2cobXNnLCAnOicsIERhdGUubm93KCkgLSBzdGFydCwgJ21zJyk7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFVwZGF0ZSB0aGUgcHJvZ3Jlc3MgdmFsdWUuCiAgICAgICAgICAgICAgICAgICAgICAgIHRyYWNrZXIudXBkYXRlUHJvZ3Jlc3MoaW5jUHJvZ3Jlc3NWYWx1ZSk7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFJldHVybiB0aGUgcmVzdWx0IHRvIGJlIHVzZWQgYnkgb3RoZXIgdGFza3MuCiAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmUodmFsdWUpOwogICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgICAgIC5jYXRjaChoYW5kbGVFcnJvcik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjYXRjaCAoZSkgewogICAgICAgICAgICAgICAgICAgIGhhbmRsZUVycm9yKGUpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9LCBBU1lOQ19UQVNLX0RFTEFZKTsKICAgICAgICB9KTsKICAgIH0KICAgIC8qKgogICAgICogUmV0dXJuc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lucy4KICAgICAgICB7IHN5bWJvbDogJ21zJywgbnVtVW5pdHM6IDEwMDAgfSwKICAgICAgICB7IHN5bWJvbDogJ3MnLCBudW1Vbml0czogMTAwMCB9LAogICAgICAgIHsgc3ltYm9sOiAnbWluJywgbnVtVW5pdHM6IDYwIH0sCiAgICAgICAgeyBzeW1ib2w6ICdocicsIG51bVVuaXRzOiA2MCB9LAogICAgICAgIHsgc3ltYm9sOiAnZGF5cycsIG51bVVuaXRzOiAyNCB9LAogICAgXTsKICAgIC8qKgogICAgICogUmV0dXJucyB0aGUgaHVtYW4gcmVhZGFibGUgdmVyc2lvbiBvZiB0aGUgdW5pdC4KICAgICAqIChlLmcuIDEuMzUgR0IsIDIzIE1CLCAzNCBtcywgNi41MyBtaW4gZXRjKS4KICAgICAqLwogICAgZnVuY3Rpb24gY29udmVydFVuaXRzVG9IdW1hblJlYWRhYmxlKHZhbHVlLCB1bml0cywgdW5pdEluZGV4ID0gMCkgewogICAgICAgIGlmICh1bml0SW5kZXggKyAxIDwgdW5pdHMubGVuZ3RoICYmIHZhbHVlID49IHVuaXRzW3VuaXRJbmRleCArIDFdLm51bVVuaXRzKSB7CiAgICAgICAgICAgIHJldHVybiBjb252ZXJ0VW5pdHNUb0h1bWFuUmVhZGFibGUodmFsdWUgLyB1bml0c1t1bml0SW5kZXggKyAxXS5udW1Vbml0cywgdW5pdHMsIHVuaXRJbmRleCArIDEpOwogICAgICAgIH0KICAgICAgICAvLyB0b1ByZWNpc2lvbigpIGhhcyB0aGUgdGVuZGVuY3kgdG8gcmV0dXJuIGEgbnVtYmVyIGluIHNjaWVudGlmaWMKICAgICAgICAvLyBub3RhdGlvbiBhbmQgY2FzdGluZyBiYWNrIHRvIGEgbnVtYmVyIGJyaW5ncyBpdCBiYWNrIHRvIG5vcm1hbCBub3RhdGlvbi4KICAgICAgICAvLyBlLmcuLAogICAgICAgIC8vICAgPiB2YWx1ZSA9IDIxMzsgdmFsdWUudG9QcmVjaXNpb24oMSkKICAgIC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AgICAgbGV0IG1pbkxlbmd0aCA9IGxvZGFzaC5taW4obG9kYXNoLm1hcChzdHJpbmdzLCAoc3RyKSA9PiBzdHIubGVuZ3RoKSk7CiAgICAgICAgd2hpbGUgKHRydWUpIHsKICAgICAgICAgICAgaW5kZXgrKzsKICAgICAgICAgICAgbGV0IHByZWZpeGVzID0gbG9kYXNoLm1hcChzdHJpbmdzLCAoc3RyKSA9PiBzdHIuc3Vic3RyaW5nKDAsIGluZGV4KSk7CiAgICAgICAgICAgIGxldCBhbGxUaGVTYW1lID0gcHJlZml4ZXMuZXZlcnkoKHByZWZpeCwgaSkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIGkgPT09IDAgPyB0cnVlIDogcHJlZml4ID09PSBwcmVmaXhlc1tpIC0gMV07CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBpZiAoYWxsVGhlU2FtZSkgewogICAgICAgICAgICAgICAgaWYgKGluZGV4ID49IG1pbkxlbmd0aCkgewogICAgICAgICAgICAgICAgICAgIC8vIFRoZXJlIGlzIGEgc3RyaW5nIHdob3NlIHdob2xlIG5hbWUgaXMgYSBwcmVmaXggdG8gb3RoZXIgc3RyaW5nLgogICAgICAgICAgICAgICAgICAgIC8vIEluIHRoaXMgY2FzZSwgd2UgcmV0dXJuIHRoZSBvcmlnaW5hbCBsaXN0IG9mIHN0cmluZy4KICAgICAgICAgICAgICAgICAgICByZXR1cm4gc3RyaW5nczsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGxhcmdlc3RJbmRleCA9IGluZGV4OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIGxvZGFzaC5tYXAoc3RyaW5ncywgKHN0cikgPT4gc3RyLnN1YnN0cmluZyhsYXJnZXN0SW5kZXgpKTsKICAgIH0KICAgIC8qKgogICAgICogR2l2ZW4gYSB0aW1lc3Rh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ZC4KICAgICAqLwogICAgY2xhc3MgU2xpbUdyYXBoIHsKICAgICAgICBjb25zdHJ1Y3RvcigpIHsKICAgICAgICAgICAgdGhpcy5ub2RlcyA9IHt9OwogICAgICAgICAgICB0aGlzLmVkZ2VzID0gW107CiAgICAgICAgfQogICAgfQogICAgY2xhc3MgRWxsaXBzaXNOb2RlSW1wbCB7CiAgICAgICAgLyoqCiAgICAgICAgICogQ29uc3RydWN0cyBhIG5ldyBlbGxpcHNpcyBhbm5vdGF0aW9uIG5vZGUuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gbnVtTm9kZXMgVGhlIG51bWJlciBvZiBhZGRpdGlvbmFsIGFubm90YXRpb25zIHRoaXMgbm9kZSByZXByZXNlbnRzLgogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKG51bU5vZGVzKSB7CiAgICAgICAgICAgIHRoaXMudHlwZSA9IE5vZGVUeXBlLkVMTElQU0lTOwogICAgICAgICAgICB0aGlzLmlzR3JvdXBOb2RlID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuY2FyZGluYWxpdHkgPSAxOwogICAgICAgICAgICB0aGlzLnBhcmVudE5vZGUgPSBudWxsOwogICAgICAgICAgICB0aGlzLnN0YXRzID0gbnVsbDsKICAgICAgICAgICAgdGhpcy5zZXROdW1Nb3JlTm9kZXMobnVtTm9kZXMpOwogICAgICAgICAgICB0aGlzLmluY2x1ZGUgPSBJbmNsdXNpb25UeXBlLlVOU1BFQ0lGSUVEOwogICAgICAgIH0KICAgICAgICBzZXROdW1Nb3JlTm9kZXMobnVtTm9kZXMpIHsKICAgICAgICAgICAgdGhpcy5udW1Nb3JlTm9kZXMgPSBudW1Ob2RlczsKICAgICAgICAgICAgdGhpcy5uYW1lID0gJy4uLiAnICsgbnVtTm9kZXMgKyAnIG1vcmUnOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQSBsYWJlbCBvYmplY3QgZm9yIG5vZGVzIGluIHRoZSBmdWxsIGd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HRoaXMuY29tcGF0aWJsZSA9IGZhbHNlOwogICAgICAgICAgICAvLyBhZGRpdGlvbmFsIHByb3BlcnRpZXMKICAgICAgICAgICAgdGhpcy50eXBlID0gTm9kZVR5cGUuT1A7CiAgICAgICAgICAgIHRoaXMuaXNHcm91cE5vZGUgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5jYXJkaW5hbGl0eSA9IDE7CiAgICAgICAgICAgIHRoaXMuaW5FbWJlZGRpbmdzID0gW107CiAgICAgICAgICAgIHRoaXMub3V0RW1iZWRkaW5ncyA9IFtdOwogICAgICAgICAgICB0aGlzLnBhcmVudE5vZGUgPSBudWxsOwogICAgICAgICAgICB0aGlzLmluY2x1ZGUgPSBJbmNsdXNpb25UeXBlLlVOU1BFQ0lGSUVEOwogICAgICAgICAgICB0aGlzLm93bmluZ1NlcmllcyA9IG51bGw7CiAgICAgICAgfQogICAgfQogICAgZnVuY3Rpb24gY3JlYXRlTWV0YW5vZGUobmFtZSwgb3B0ID0ge30pIHsKICAgICAgICByZXR1cm4gbmV3IE1ldGFub2RlSW1wbChuYW1lLCBvcHQpOwogICAgfQogICAgLyoqCiAgICAgKiBKb2lucyB0aGUgaW5mb3JtYXRpb24gZnJvbSB0aGUgc3RhdHMgZmlsZSAobWVtb3J5LCBjb21wdXRlIHRpbWUpIHdpdGggdGhlCiAgICAgKiBncmFwaCBpbmZvcm1hdGlvbi4KICAgICAqLwogICAgZnVuY3Rpb24gam9pblN0YXRzSW5mb1dpdGhHcmFwaChncmFwaCwgc3RhdHMsIGRldmljZXNGb3JTdGF0cykgewogICAgICAgIC8vIFJlc2V0IHN0YXRzIGZvciBlYWNoIG5vZGUuCiAgICAgICAgbG9kYXNoLmVhY2goZ3JhcGgubm9kZXMsIChub2RlKSA9PiB7CiAgICAgICAgICAgIG5vZGUuc3RhdHMgPSBudWxsOwogICAgICAgIH0pOwogICAgICAgIGxvZGFzaC5lYWNoKHN0YXRzLmRldl9zdGF0cywgKGRldlN0YXRzKSA9PiB7CiAgICAgICAgICAgIC8vIElnbm9yZSBkZXZpY2VzIHRoYXQgYXJlIG5vdCBzZWxlY3RlZC4KICAgICAgICAgICAgaWYgKGRldmljZXNGb3JTdGF0cyAmJiAhZGV2aWNlc0ZvclN0YXRzW2RldlN0YXRzLmRldmljZV0pIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICBsb2Rhc2guZWFjaChkZXZTdGF0cy5ub2RlX3N0YXRzLCAobm9kZVN0YXRzKSA9PiB7CiAgICAgICAgICAgICAgICAvLyBMb29rdXAgdGhlIG5vZGUgaW4gdGhlIGdyYXBoIGJ5IGl0cyBvcmlnaW5hbCBuYW1lLCBlLmcuIEEvQi4gSWYgbm90CiAgICAgICAgICAgICAgICAvLyBmb3VuZCwgbG9va3VwIGJ5IHRoZSByZXdyaXR0ZW4gbmFtZSBBL0IvKEIpIGluIGNhc2UgdGhlIG5hbWUgaXMgYm90aAogICAgICAgICAgICAgICAgLy8gYSBuYW1lc3BhY2UgYW5kIGEgbm9kZSBuYW1lLgogICAgICAgICAgICAgICAgbGV0IG5vZGVOYW1lID0gbm9kZVN0YXRzLm5vZGVfbmFtZSBpbiBncmFwaC5ub2RlcwogICAgICAgICAgICAgICAgICAgID8gbm9kZVN0YXRzLm5vZGVfbmFtZQogICAgICAgICAgICAgICAgICAgIDogZ2V0U3RyaWN0TmFtZShub2RlU3RhdHMubm9kZV9uYW1lKTsKICAgICAgICAgICAgICAgIC8vIENvdWxkbid0IGZpbmQgYSBtYXRjaGluZyBub2RlLgogICAgICAgICAgICAgICAgaWYgKCEobm9kZU5hbWUgaW4gZ3JhcGgubm9kZXMpKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLy8gQ29tcHV0ZSB0aGUgdG90YWwgYnl0ZXMgdXNlZC4KICAgICAgICAgICAgICAgIGxldCB0b3RhbEJ5dGVzID0gMDsKICAgICAgICAgICAgICAgIGlmIChub2RlU3RhdHMubWVtb3J5KSB7CiAgICAgICAgICAgICAgICAgICAgbG9kYXNoLmVhY2gobm9kZVN0YXRzLm1lbW9yeSwgKGFsbG9jKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhbGxvYy50b3RhbF9ieXRlcykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGFsbG9jLnRvdGFsX2J5dGVzID4gMCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvdGFsQnl0ZXMgKz0gTnVtYmVyKGFsbG9jLnRvdGFsX2J5dGVzKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIHRzbGludDpkaXNhYmxlICovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ2lnbm9yaW5nIG5lZ2F0aXZlIG1lbW9yeSBhbGxvY2F0aW9uIGZvciAnICsgbm9kZU5hbWUpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIHRzbGludDplbmFibGUgKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgbGV0IG91dHB1dFNpemUgPSBudWxsOwogICAgICAgICAgICAgICAgaWYgKG5vZGVTdGF0cy5vdXRwdXQpIHsKICAgICAgICAgICAgICAgICAgICBvdXRwdXRTaXplID0gbG9kYXNoLm1hcChub2RlU3RhdHMub3V0cHV0LCAob3V0cHV0KSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBsb2Rhc2gubWFwKG91dHB1dC50ZW5zb3JfZGVzY3JpcHRpb24uc2hhcGUuZGltLCAoZGltKSA9PiBOdW1iZXIoZGltLnNpemUpKTsKICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGdyYXBoLm5vZGVzW25vZGVOYW1lXS5kZXZpY2UgPSBkZXZTdGF0cy5kZXZpY2U7CiAgICAgICAgICAgICAgICBpZiAoZ3JhcGgubm9kZXNbbm9kZU5hbWVdLnN0YXRzID09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICBncmFwaC5ub2Rlc1tub2RlTmFtZV0uc3RhdHMgPSBuZXcgTm9kZVN0YXRzKG91dHB1dFNpemUpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZ3JhcGgubm9kZXNbbm9kZU5hbWVdLnN0YXRzLmFkZEJ5dGVzQWxsb2NhdGlvbih0b3RhbEJ5dGVzKTsKICAgICAgICAgICAgICAgIGlmIChub2RlU3RhdHMuYWxsX2VuZF9yZWxfbWljcm9zKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKG5vZGVTdGF0cy5hbGxfZW5kX3JlbF9taWNyb3MgPiAwKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGdyYXBoLm5vZGVzW25vZGVOYW1lXS5zdGF0cy5hZGRFeGVjdXRpb25UaW1lKG5vZGVTdGF0cy5hbGxfc3RhcnRfbWljcm9zLCBub2RlU3RhdHMuYWxsX3N0YXJ0X21pY3JvcyArIG5vZGVTdGF0cy5hbGxfZW5kX3JlbF9taWNyb3MpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgLyogdHNsaW50OmRpc2FibGUgKi8KICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ2lnbm9yaW5nIG5lZ2F0aXZlIHJ1bnRpbWUgZm9yICcgKyBub2RlTmFtZSk7CiAgICAgICAgICAgICAgICAgICAgICAgIC8qIHRzbGludDplbmFibGUgKi8KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiA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ZGUuaXNHcm91cE5vZGUpIHsKICAgICAgICAgICAgICAgICAgICBtZXRhZ3JhcGggPSBub2RlLm1ldGFncmFwaDsKICAgICAgICAgICAgICAgICAgICBsb2Rhc2guZWFjaChtZXRhZ3JhcGgubm9kZXMoKSwgKG5hbWUpID0+IHF1ZXVlLnB1c2gobWV0YWdyYXBoLm5vZGUobmFtZSkpKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIGxlYXZlcy5wdXNoKG5vZGUubmFtZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIGxlYXZlczsKICAgICAgICB9CiAgICB9CiAgICBmdW5jdGlvbiBjcmVhdGVNZXRhZWRnZSh2LCB3KSB7CiAgICAgICAgcmV0dXJuIG5ldyBNZXRhZWRnZUltcGwodiwgdyk7CiAgICB9CiAgICAvKioKICAgICAqIEEgbGFiZWwgb2JqZWN0IGZvciBlZGdlcyBiZXR3ZWVuIG1ldGFub2RlcyBvZiBzdWJncmFwaHMgaW4gdGhlIHJlbmRlciBncmFwaC4KICAgICAqLwogICAgY2xhc3MgTWV0YWVkZ2VJbXBsIHsKICAgICAgICBjb25zdHJ1Y3Rvcih2LCB3KSB7CiAgICAgICAgICAgIHRoaXMudiA9IHY7CiAgICAgICAgICAgIHRoaXMudyA9IHc7CiAgICAgICAgICAgIHRoaXMuYmFzZUVkZ2VMaXN0ID0gW107CiAgICAgICAgICAgIHRoaXMuaW5ib3VuZCA9IG51bGw7CiAgICAgICAgICAgIHRoaXMubnVtUmVndWxhckVkZ2VzID0gMDsKICAgICAgICAgICAgdGhpcy5udW1Db250cm9sRWRnZXMgPSAwOwogICAgICAgICAgICB0aGlzLm51bVJlZkVkZ2VzID0gMDsKICAgICAgICAgICAgdGhpcy50b3RhbFNpemUgPSAwOwogICAgICAgIH0KICAgICAgICBhZGRCYXNlRWRnZShlZGdlLCBoKSB7CiAgICAgICAgICAgIHRoaXMuYmFzZUVkZ2VMaXN0LnB1c2goZWRnZSk7CiAgICAgICAgICAgIGlmIChlZGdlLmlzQ29udHJvbERlcGVuZGVuY3kpIHsKICAgICAgICAgICAgICAgIHRoaXMubnVtQ29udHJvbEVkZ2VzICs9IDE7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLm51bVJlZ3VsYXJFZGdlcyArPSAxOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChlZGdlLmlzUmVmZXJlbmNlRWRnZSkgewogICAgICAgICAgICAgICAgdGhpcy5udW1SZWZFZGdlcyArPSAxOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIENvbXB1dGUgdGhlIHNpemUgb2YgdGhlIHRlbnNvciBmbG93aW5nIHRocm91Z2ggdGhpcwogICAgICAgICAgICAvLyBiYXNlIGVkZ2UuCiAgICAgICAgICAgIHRoaXMudG90YWxTaXplICs9IE1ldGFlZGdlSW1wbC5jb21wdXRlU2l6ZU9mRWRnZShlZGdlLCBoKTsKICAgICAgICAgICAgaC5tYXhNZXRhRWRnZVNpemUgPSBNYXRoLm1heChoLm1heE1ldGFFZGdlU2l6ZSwgdGhpcy50b3RhbFNpemUpOwogICAgICAgIH0KICAgICAgICBzdGF0aWMgY29tcHV0ZVNpemVPZkVkZ2UoZWRnZSwgaCkgewogICAgICAgICAgICBsZXQgb3BOb2RlID0gaC5ub2RlKGVkZ2Uudik7CiAgICAgICAgICAgIGlmICghb3BOb2RlLm91dHB1dFNoYXBlcykgewogICAgICAgICAgICAgICAgLy8gTm8gc2hhcGUgaW5mb3JtYXRpb24uIEFzc3N1bWUgYSBzaW5nbGUgbnVtYmVyLiBUaGlzIGdpdmVzCiAgICAgICAgICAgICAgICAvLyBhIGxvd2VyIGJvdW5kIGZvciB0aGUgdG90YWwgc2l6ZS4KICAgICAgICAgICAgICAgIHJldHVybiAxOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGguaGFzU2hhcGVJbmZvID0gdHJ1ZTsKICAgICAgICAgICAgLy8gU3VtIHRoZSBzaXplcyBvZiBhbGwgb3V0cHV0IHRlbnNvcnMuCiAgICAgICAgICAgIC8vIFRPRE8oc3RlcGhhbndsZWUpOiBVc2UgT2JqZWN0LnZhbHVlcyBhZnRlciBlczIwMTcuCiAgICAgICAgICAgIGNvbnN0IHZhbHVlcyA9IE9iamVjdC5rZXlzKG9wTm9kZS5vdXRwdXRTaGFwZXMpCiAgICAgICAgICAgICAgICAubWFwKChrKSA9PiBvcE5vZGUub3V0cHV0U2hhcGVzW2tdKQogICAgICAgICAgICAgICAgLm1hcCgoc2hhcGUpID0+IHsKICAgICAgICAgICAgICAgIC8vIElmIHRoZSBzaGFwZSBpcyB1bmtub3duLCB0cmVhdCBpdCBhcyAxIHdoZW4gY29tcHV0aW5nCiAgICAgICAgICAgICAgICAvLyB0b3RhbCBzaXplLiBUaGlzIGdpdmVzIGEgbG93ZXIgYm91bmQgZm9yIHRoZSB0b3RhbCBzaXplLgogICAgICAgICAgICAgICAgaWYgKHNoYXBlID09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gMTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vIE11bHRpcGx5IGFsbCBzaGFwZXMgdG8gZ2V0IHRoZSB0b3RhbCBzaXplIG9mIHRoZSB0ZW5zb3IuCiAgICAgICAgICAgICAgICAvLyBFLmcuIFRoZSB0b3RhbCBzaXplIG9mIFs0LCAyLCAxXSBpcyA0ICogMiAqIDEuCiAgICAgICAgICAgICAgICByZXR1cm4gc2hhcGUucmVkdWNlKChhY2N1bXVsYXRlZCwgY3VyclNpemUpID0+IHsKICAgICAgICAgICAgICAgICAgICAvLyBJZiB0aGlzIHBhcnRpY3VsYXIgZGltZW5zaW9uIGlzIHVua25vd24sIHRyZWF0CiAgICAgICAgICAgICAgICAgICAgLy8gaXQgYXMgMSB3aGVuIGNvbXB1dGluZyB0b3RhbCBzaXplLiBUaGlzIGdpdmVzIGEgbG93ZXIgYm91bmQKICAgICAgICAgICAgICAgICAgICAvLyBmb3IgdGhlIHRvdGFsIHNpemUuCiAgICAgICAgICAgICAgICAgICAgaWYgKGN1cnJTaXplID09PSAtMSkgewogICAgICAgICAgICAgICAgICAgICAgICBjdXJyU2l6ZSA9IDE7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHJldHVybiBhY2N1bXVsYXRlZCAqIGN1cnJTaXplOwogICAgICAgICAgICAgICAgfSwgMSk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICByZXR1cm4gbG9kYXNoLnN1bSh2YWx1ZXMpOwogICAgICAgIH0KICAgIH0KICAgIGZ1bmN0aW9uIGNyZWF0ZVNlcmllc05vZGUocHJlZml4LCBzdWZmaXgsIHBhcmVudCwgY2x1c3RlcklkLCBuYW1lLCBncmFwaE9wdGlvbnMpIHsKICAgICAgICByZXR1cm4gbmV3IFNlcmllc05vZGVJbXBsKHByZWZpeCwgc3VmZml4LCBwYXJlbnQsIGNsdXN0ZXJJZCwgbmFtZSwgZ3JhcGhPcHRpb25zKTsKICAgIH0KICAgIGZ1bmN0aW9uIGdldFNlcmllc05vZGVOYW1lKHByZWZpeCwgc3VmZml4LCBwYXJlbnQsIHN0YXJ0SWQsIGVuZElkKSB7CiAgICAgICAgbGV0IG51bVJlcHJlc2VudGF0aW9uID0gdHlwZW9mIHN0YXJ0SWQgIT09ICd1bmRlZmluZWQnICYmIHR5cGVvZiBlbmRJZCAhPT0gJ3VuZGVmaW5lZCcKICAgICAgICAgICAgPyAnWycgKyBzdGFydElkICsgJy0nICsgZW5kSWQgKyAnXScKICAgICAgICAgICAgOiAnIyc7CiAgICAgICAgbGV0IHBhdHRlcm4gPSBwcmVmaXggKyBudW1SZXByZXNlbnRhdGlvbiArIHN1ZmZpeDsKICAgICAgICByZXR1cm4gKHBhcmVudCA/IHBhcmVudCArICcvJyA6ICcnKSArIHBhdHRlcm47CiA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dGliaWxpdHlIaXN0b2dyYW0gPSB7IGNvbXBhdGlibGU6IDAsIGluY29tcGF0aWJsZTogMCB9OwogICAgICAgICAgICB0aGlzLmhhc05vbkNvbnRyb2xFZGdlcyA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLmluY2x1ZGUgPSBJbmNsdXNpb25UeXBlLlVOU1BFQ0lGSUVEOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogRXh0cmFjdHMgdGhlIHNoYXBlcyBvZiB0aGUgb3V0cHV0IHRlbnNvcnMgZnJvbSB0aGUgYXR0ciBwcm9wZXJ0eSBpbiB0aGUKICAgICAqIG5vZGUgcHJvdG8uCiAgICAgKi8KICAgIC8vIHRzbGludDpkaXNhYmxlLW5leHQtbGluZTpuby1hbnkKICAgIGZ1bmN0aW9uIGV4dHJhY3RPdXRwdXRTaGFwZXMoYXR0cikgewogICAgICAgIC8vIFdlIGRvbid0IGtub3cgYW55dGhpbmcgYWJvdXQgdGhlIG91dHB1dCB0ZW5zb3JzLgogICAgICAgIGlmICghYXR0cikgewogICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICB9CiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBhdHRyLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgIGxldCB7IGtleSwgdmFsdWUgfSA9IGF0dHJbaV07CiAgICAgICAgICAgIGlmIChrZXkgPT09IE9VVFBVVF9TSEFQRVNfS0VZKSB7CiAgICAgICAgICAgICAgICBpZiAoIXZhbHVlLmxpc3Quc2hhcGUpIHsKICAgICAgICAgICAgICAgICAgICAvLyBUaGUgT1VUUFVUX1NIQVBFU19LRVkgbGFja3MgYSB2YWx1ZS4gV2Uga25vdyBub3RoaW5nIGFib3V0IHRoZSBzaGFwZS4KICAgICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vIE1hcCBhbGwgb3V0cHV0IHRlbnNvcnMgaW50byBhcnJheSBvZiBudW1iZXJzIGRlbm90aW5nIHRoZWlyIHNoYXBlLgogICAgICAgICAgICAgICAgbGV0IHJlc3VsdCA9IHZhbHVlLmxpc3Quc2hhcGUubWFwKChzaGFwZSkgPT4gewogICAgICAgICAgICAgICAgICAgIGlmIChzaGFwZS51bmtub3duX3JhbmspIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gVGhpcyBvdXRwdXQgdGVuc29yIGlzIG9mIHVua25vd24gcmFuay4gV2UgZG9uJ3Qga25vdyBpZiBpdCBpcyBhCiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHNjYWxhciwgb3IgYSB0ZW5zb3IsIG9yIG9mIHdoYXQgc2hhcGUgaXQgaXMuCiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBpZiAoc2hhcGUuZGltID09IG51bGwgfHwKICAgICAgICAgICAgICAgICAgICAgICAgKHNoYXBlLmRpbS5sZW5ndGggPT09IDEgJiYgc2hhcGUuZGltWzBdLnNpemUgPT0gbnVsbCkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gVGhpcyBvdXRwdXQgdGVuc29yIGlzIGEgc2NhbGFyLgogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gW107CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIC8vIFRoaXMgb3V0cHV0IHRlbnNvciBoYXMgYSBrbm93biByYW5rLiBNYXAgZWFjaCBkaW1lbnNpb24gc2l6ZQogICAgICAgICAgICAgICAgICAgIC8vIGludG8gYSBudW1iZXIuCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNoYXBlLmRpbS5tYXAoKGRpbSkgPT4gewogICAgICAgICAgICAgICAgICAgICAgICAvLyBTaXplIGNhbiBiZSAtMSBpZiB0aGlzIHBhcnRpY3VsYXIgZGltZW5zaW9uIGlzIHVua25vd24uCiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBkaW0uc2l6ZTsKICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgLy8gU2luY2Ugd2UgYWxyZWFkeSBwcm9jZXNzZWQgaXQsIHJlbW92ZSB0aGUgZW50cnkgZnJvbSB0aGUgYXR0cmlidXRlCiAgICAgICAgICAgICAgICAvLyBsaXN0IChzYXZlcyBtZW1vcnkpLgogICAgICAgICAgICAgICAgYXR0ci5zcGxpY2UoaSwgMSk7CiAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8vIFdlIGRpZG4ndCBmaW5kIE9VVFBVVF9TSEFQRVNfS0VZIGluIGF0dHJpYnV0ZXMsIHNvIHdlIGRvbid0IGtub3cgYW55dGhpbmcKICAgICAgICAvLyBhYm91dCB0aGUgb3V0cHV0IHRlbnNvcnMuCiAgICAgICAgcmV0dXJuIG51bGw7CiAgICB9CiAgICAvKioKICAgICAqIEV4dHJhY3RzIHRoZSBYTEEgQ2x1c3RlciB0aGF0IGFuIG9wIHJ1bnMgb24gZnJvbSB0aGUgYXR0cnMgb2YgdGhlIE9wTm9kZS4KICAgICAqIEBwYXJhbSBhdHRyIFRoZSBhdHRyIHByb3BlcnR5LgogICAgICogQHJldHVybiBBIHN0cmluZyB0aGF0IGlzIHRoZSBuYW1lIG9mIHRoZSBjbHVzdGVyLiBPciBudWxsIGlmIGl0IGNvdWxkIG5vdCBiZQogICAgICogICAgIGRldGVybWluZWQuCiAgICAgKi8KICAgIC8vIHRzbGludDpkaXNhYmxlLW5leHQtbGluZTpuby1hbnkKICAgIGZ1bmN0aW9uIGV4dHJhY3RYbGFDbHVzdGVyKGF0dHIpIHsKICAgICAgICBpZiAoIWF0dHIpIHsKICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgfQogICAgICAgIC8vIEZpbmQgdGhlIGF0dHJpYnV0ZSBmb3IgWExBIGN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hbGl6ZUlucHV0cyhpbnB1dHMpIHsKICAgICAgICBsZXQgbm9ybWFsaXplZElucHV0cyA9IFtdOwogICAgICAgIGxvZGFzaC5lYWNoKGlucHV0cywgKGlucHV0TmFtZSkgPT4gewogICAgICAgICAgICBsZXQgaXNDb250cm9sRGVwZW5kZW5jeSA9IGlucHV0TmFtZVswXSA9PT0gJ14nOwogICAgICAgICAgICBpZiAoaXNDb250cm9sRGVwZW5kZW5jeSkgewogICAgICAgICAgICAgICAgLy8gVGhlIGNhcmF0IG1lcmVseSBpbmRpY2F0ZXMgd2hldGhlciB0aGlzIGlucHV0IGlzIGEgY29udHJvbCBkZXBlbmRlbmN5LgogICAgICAgICAgICAgICAgLy8gSXQgc2hvdWxkIG5vdCBiZSBwYXJ0IG9mIHRoZSBuYW1lLgogICAgICAgICAgICAgICAgaW5wdXROYW1lID0gaW5wdXROYW1lLnN1YnN0cmluZygxKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBsZXQgbmFtZSA9IGlucHV0TmFtZTsKICAgICAgICAgICAgbGV0IG91dHB1dFRlbnNvcktleSA9ICcwJzsKICAgICAgICAgICAgbGV0IG1hdGNoID0gaW5wdXROYW1lLm1hdGNoKC8oLiopOihcdys6XGQrKSQvKTsKICAgICAgICAgICAgaWYgKG1hdGNoKSB7CiAgICAgICAgICAgICAgICAvLyBUaGUgb3V0cHV0IHN0cmluZyBjb25zaXN0cyBvZiBzZXZlcmFsIGNoYXJhY3RlcnMgYW5kIGEgbnVtYmVyIHNlcGFyYXRlZAogICAgICAgICAgICAgICAgLy8gYnkgYSBjb2xvbi4KICAgICAgICAgICAgICAgIG5hbWUgPSBtYXRjaFsxXTsKICAgICAgICAgICAgICAgIG91dHB1dFRlbnNvcktleSA9IG1hdGNoWzJdOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgbWF0Y2ggPSBpbnB1dE5hbWUubWF0Y2goLyguKik6KFxkKykkLyk7CiAgICAgICAgICAgICAgICBpZiAobWF0Y2gpIHsKICAgICAgICAgICAgICAgICAgICAvLyBUaGUgb3V0cHV0IHN0cmluZyBjb25zaXN0cyBvZiBhIHNpbmdsZSBudW1iZXIuCiAgICAgICAgICAgICAgICAgICAgbmFtZSA9IG1hdGNoWzFdOwogICAgICAgICAgICAgICAgICAgIG91dHB1dFRlbnNvcktleSA9IG1hdGNoWzJdOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChub3JtYWxpemVkSW5wdXRzLmxlbmd0aCA9PT0gMCB8fAogICAgICAgICAgICAgICAgbmFtZSAhPT0gbm9ybWFsaXplZElucHV0c1tub3JtYWxpemVkSW5wdXRzLmxlbmd0aCAtIDFdLm5hbWUpIHsKICAgICAgICAgICAgICAgIG5vcm1hbGl6ZWRJbnB1dHMucHVzaCh7CiAgICAgICAgICAgICAgICAgICAgbmFtZTogbmFtZSwKICAgICAgICAgICAgICAgICAgICBvdXRwdXRUZW5zb3JLZXk6IG91dHB1dFRlbnNvcktleSwKICAgICAgICAgICAgICAgICAgICBpc0NvbnRyb2xEZXBlbmRlbmN5OiBpc0NvbnRyb2xEZXBlbmRlbmN5LAogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0KICAgICAgICB9KTsKICAgICAgICByZXR1cm4gbm9ybWFsaXplZElucHV0czsKICAgIH0KICAgIGZ1bmN0aW9uIGFkZEVkZ2VUb0dyYXBoKGdyYXBoLCBpbnB1dE5hbWUsIG91dHB1dE5vZGUsIGlucHV0LCBwYXJhbXMsIGluZGV4KSB7CiAgICAgICAgLy8gRG9uJ3QgYWxsb3cgbG9vcHMgaW4gdGhlIGdyYXBoLgogICAgICAgIGlmIChpbnB1dE5hbWUgPT09IG91dHB1dE5vZGUubmFtZSkgewogICAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIC8vIENoZWNrIGlmIHRoaXMgb3AgdHlwZSBhbmQgaW5wdXQgbnVtYmVyIGNvcnJlc3BvbmR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gICAgICAgICAgICdBc3NpZ25BZGQgMCc6IHRydWUsCiAgICAgICAgICAgICdBc3NpZ25TdWIgMCc6IHRydWUsCiAgICAgICAgICAgICdhc3NpZ24gMCc6IHRydWUsCiAgICAgICAgICAgICdhc3NpZ25fYWRkIDAnOiB0cnVlLAogICAgICAgICAgICAnYXNzaWduX3N1YiAwJzogdHJ1ZSwKICAgICAgICAgICAgJ2NvdW50X3VwX3RvIDAnOiB0cnVlLAogICAgICAgICAgICAnU2NhdHRlckFkZCAwJzogdHJ1ZSwKICAgICAgICAgICAgJ1NjYXR0ZXJTdWIgMCc6IHRydWUsCiAgICAgICAgICAgICdTY2F0dGVyVXBkYXRlIDAnOiB0cnVlLAogICAgICAgICAgICAnc2NhdHRlcl9hZGQgMCc6IHRydWUsCiAgICAgICAgICAgICdzY2F0dGVyX3N1YiAwJzogdHJ1ZSwKICAgICAgICAgICAgJ3NjYXR0ZXJfdXBkYXRlIDAnOiB0cnVlLAogICAgICAgIH0sCiAgICB9OwogICAgZnVuY3Rpb24gYnVpbGQoZ3JhcGhEZWYsIHBhcmFtcywgdHJhY2tlcikgewogICAgICAgIC8qKgogICAgICAgICAqIEEgZGljdGlvbmFyeSB0aGF0IG1hcHMgZWFjaCBpbi1lbWJlZGRpbmcgbm9kZSBuYW1lIHRvIHRoZSBub2RlCiAgICAgICAgICogb2JqZWN0LgogICAgICAgICAqLwogICAgICAgIGxldCBpbkVtYmVkZGluZyA9IHt9OwogICAgICAgIC8qKgogICAgICAgICAqIEEgZGljdGlvbmFyeSB0aGF0IG1hcHMgZWFjaCBvdXQtZW1iZWRkaW5nIG5vZGUgbmFtZSB0byB0aGUgbm9kZQogICAgICAgICAqIG9iamVjdC4KICAgICAgICAgKi8KICAgICAgICBsZXQgb3V0RW1iZWRkaW5nID0ge307CiAgICAgICAgLyoqCiAgICAgICAgICogQSBkaWN0aW9uYXJ5IHRoYXQgbWFwcyBlYWNoIG5vZGUgbmFtZSB0byBhbiBhcnJheSBvZiB0aG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cyA9IG5ldyBBcnJheShyYXdOb2Rlcy5sZW5ndGgpOwogICAgICAgIHJldHVybiBydW5Bc3luY1Rhc2soJ05vcm1hbGl6aW5nIG5hbWVzJywgMzAsICgpID0+IHsKICAgICAgICAgICAgbGV0IG9wTm9kZXMgPSBuZXcgQXJyYXkocmF3Tm9kZXMubGVuZ3RoKTsKICAgICAgICAgICAgbGV0IGluZGV4ID0gMDsKICAgICAgICAgICAgY29uc3QgcHJvY2Vzc1Jhd05vZGUgPSAocmF3Tm9kZSkgPT4gewogICAgICAgICAgICAgICAgbGV0IG9wTm9kZSA9IG5ldyBPcE5vZGVJbXBsKHJhd05vZGUpOwogICAgICAgICAgICAgICAgaWYgKGlzSW5FbWJlZGRlZFByZWQob3BOb2RlKSkgewogICAgICAgICAgICAgICAgICAgIGVtYmVkZGluZ05vZGVOYW1lcy5wdXNoKG9wTm9kZS5uYW1lKTsKICAgICAgICAgICAgICAgICAgICBpbkVtYmVkZGluZ1tvcE5vZGUubmFtZV0gPSBvcE5vZGU7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9wTm9kZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChpc091dEVtYmVkZGVkUHJlZChvcE5vZGUpKSB7CiAgICAgICAgICAgICAgICAgICAgZW1iZWRkaW5nTm9kZU5hbWVzLnB1c2gob3BOb2RlLm5hbWUpOwogICAgICAgICAgICAgICAgICAgIG91dEVtYmVkZGluZ1tvcE5vZGUubmFtZV0gPSBvcE5vZGU7CiAgICAgICAgICAgICAgICAgICAgbG9kYXNoLmVhY2gob3BOb2RlLmlucHV0cywgKGlucHV0KSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpbnB1dE5hbWUgPSBpbnB1dC5uYW1lOwogICAgICAgICAgICAgICAgICAgICAgICBvdXRFbWJlZGRpbmdzW2lucHV0TmFtZV0gPSBvdXRFbWJlZGRpbmdzW2lucHV0TmFtZV0gfHwgW107CiAgICAgICAgICAgICAgICAgICAgICAgIG91dEVtYmVkZGluZ3NbaW5wdXROYW1lXS5wdXNoKG9wTm9kZSk7CiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9wTm9kZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vIFRoZSBub2RlIGlzIG5vdCBhbiBlbWJlZGRpbmcsIHNvIGFkZCBpdCB0byB0aGUgbmFtZXMgYW5kIG5vZGVzCiAgICAgICAgICAgICAgICAvLyBsaXN0cy4KICAgICAgICAgICAgICAgIG9wTm9kZXNbaW5kZXhdID0gb3BOb2RlOwogICAgICAgICAgICAgICAgbm9kZU5hbWVzW2luZGV4XSA9IG9wTm9kZS5uYW1lOwogICAgICAgICAgICAgICAgaW5kZXgrKzsKICAgICAgICAgICAgICAgIHJldHVybiBvcE5vZGU7CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIGxvZGFzaC5lYWNoKHJhd05vZGVzLCBwcm9jZXNzUmF3Tm9kZSk7CiAgICAgICAgICAgIGNvbnN0IHByb2Nlc3NGdW5jdGlvbiA9IChmdW5jKSA9PiB7CiAgICAgICAgICAgICAgICAvLyBHaXZlIHRoZSBmdW5jdGlvbiBpdHNlbGYgYSBub2RlLgogICAgICAgICAgICAgICAgY29uc3QgZnVuY3Rpb25Ob2RlTmFtZSA9IEZVTkNUSU9OX0xJQlJBUllfTk9ERV9QUkVGSVggKyBmdW5jLnNpZ25hdHVyZS5uYW1lOwogICAgICAgICAgICAgICAgLy8gQ3JlYXRlIGFuIG9wIG5vZGUgZm9yIHRoZSBmdW5jdGlvbi4gTWFyayBpdCBhcyBwYXJ0IG9mIGEKICAgICAgICAgICAgICAgIC8vIGZ1bmN0aW9uIGxpYnJhcnkuCiAgICAgICAgICAgICAgICBwcm9jZXNzUmF3Tm9kZSh7CiAgICAgICAgICAgICAgICAgICAgbmFtZTogZnVuY3Rpb25Ob2RlTmFtZSwKICAgICAgICAgICAgICAgICAgICBpbnB1dDogW10sCiAgICAgICAgICAgICAgICAgICAgZGV2aWNlOiAnJywKICAgICAgICAgICAgICAgICAgICBvcDogJycsCiAgICAgICAgICAgICAgICAgICAgYXR0cjogW10sCiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIC8vIElmIHRoZSBmdW5jdGlvbiBoYXMgaW5wdXRzLCBtYWtlIG5vZGVzIG91dCBvZiB0aGVtLgogICAgICAgICAgICAgICAgaWYgKGZ1bmMuc2lnbmF0dXJlLmlucHV0X2FyZykgewogICAgICAgICAgICAgICAgICAgIC8vIE1ha2VzIGFuIE9wTm9kZSBvdXQgb2YgZWl0aGVyIGFuIGlucHV0X2FyZyBvZiBhIGxpYnJhcnkKICAgICAgICAgICAgICAgICAgICAvLyBmdW5jdGlvbi4KICAgICAgICAgICAgICAgICAgICBsZXQgY3VycmVudElucHV0SW5kZXggPSAwOwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHByb2Nlc3NJbnB1dCA9IChhcmcpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgb3BOb2RlID0gcHJvY2Vzc1Jhd05vZGUoewogICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTogZnVuY3Rpb25Ob2RlTmFtZSArIE5BTUVTUEFDRV9ERUxJTSArIGFyZy5uYW1lLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXQ6IFtdLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgZGV2aWNlOiAnJywKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wOiAnaW5wdXRfYXJnJywKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGF0dHI6IFsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleTogJ1QnLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogYXJnLnR5cGUsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgICAgICBvcE5vZGUuZnVuY3Rpb25JbnB1dEluZGV4ID0gY3VycmVudElucHV0SW5kZXg7CiAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRJbnB1dEluZGV4Kys7CiAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgICAgICAvLyBNYWtlIG5vZGVzIGZvciBpbnB1dCBhcmdzIG9mIHRoZSBmdW5jdGlvbi4gVW5mb3J0dW5hdGVseSwgdGhlCiAgICAgICAgICAgICAgICAgICAgLy8gcGJ0eHQgY29uZmlndXJhdGlvbiBsYW5ndWFnZSBpcyBub3QgcmljaCBlbm91Z2ggdG8KICAgICAgICAgICAgICAgICAgICAvLyBkaWZmZXJlbnRpYXRlIGJldHdlZW4gYW4gYXJyYXkgd2l0aCAxIGl0ZW0gdnMgMSBvYmplY3QKICAgICAgICAgICAgICAgICAgICAvLyBwcm9wZXJ0eS4KICAgICAgICAgICAgICAgICAgICBpZiAoZnVuYy5zaWduYXR1cmUuaW5wdXRfYXJnWyduYW1lJ10pIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gVGhlcmUgaXMgb25seSAxIGlucHV0IGFyZy4KICAgICAgICAgICAgICAgICAgICAgICAgcHJvY2Vzc0lucHV0KGZ1bmMuc2lnbmF0dXJlLmlucHV0X2FyZyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAvLyBUaGVyZSBhcmUgc2V2ZXJhbCBpbnB1dCBhcmdzLgogICAgICAgICAgICAgICAgICAgICAgICBsb2Rhc2guZWFjaChmdW5jLnNpZ25hdHVyZS5pbnB1dF9hcmcsIHByb2Nlc3NJbnB1dCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLy8gTWFrZSBub2RlcyBmb3Igb3V0cHV0IGFyZ3Mgb2YgdGhlIGZ1bmN0aW9uLiBUcmFjayB0aGUgbmFtZXMgb2YKICAgICAgICAgICAgICAgIC8vIG91dHB1dCBhcmdzIHdpdGhpbiB0aGUga2V5cyBvZiB0aGlzIG9iamVjdC4gVW5saWtlIHRoZQogICAgICAgICAgICAgICAgLy8gaW5wdXRfYXJncywgdGhlIG91dHB1dF9hcmdzIGFyZSBhbHJlYWR5IGRlZmluZWQgd2l0aGluIHRoZQogICAgICAgICAgICAgICAgLy8gbm9kZV9kZWZzIG9mIHRoZSBsaWJyYXJ5IGZ1bmN0aW9uLgogICAgICAgICAgICAgICAgbGV0IGN1cnJlbnRPdXRwdXRJbmRleCA9IDA7CiAgICAgICAgICAgICAgICBjb25zdCBvdXRwdXRBcmdOYW1lcyA9IHt9OwogICAgICAgICAgICAgICAgLy8gSWYgdGhlIGZ1bmN0aW9uIGhhcyBvdXRwdXRzLCBtYWtlIG5vZGVzIG91dCBvZiB0aGVtLgogICAgICAgICAgICAgICAgaWYgKGZ1bmMuc2lnbmF0dXJlLm91dHB1dF9hcmcpIHsKICAgICAgICAgICAgICAgICAgICBjb25zdCBwcm9jZXNzT3V0cHV0ID0gKGFyZykgPT4gewogICAgICAgICAgICAgICAgICAgICAgICBvdXRwdXRBcmdOYW1lc1tmdW5jdGlvbk5vZGVOYW1lICsgTkFNRVNQQUNFX0RFTElNICsgYXJnLm5hbWVdID0gY3VycmVudE91dHB1dEluZGV4OwogICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50T3V0cHV0SW5kZXgrKzsKICAgICAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgICAgIGlmIChmdW5jLnNpZ25hdHVyZS5vdXRwdXRfYXJnWyduYW1lJ10pIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gVGhlcmUgaXMgb25seSAxIG91dHB1dCBhcmcuCiAgICAgICAgICAgICAgICAgICAgICAgIHByb2Nlc3NPdXRwdXQoZnVuYy5zaWduYXR1cmUub3V0cHV0X2FyZyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAvLyBUaGVyZSBhcmUgc2V2ZXJhbCBvdXRwdXQgYXJncy4KICAgICAgICAgICAgICAgICAgICAgICAgbG9kYXNoLmVhY2goZnVuYy5zaWduYXR1cmUub3V0cHV0X2FyZywgcHJvY2Vzc091dHB1dCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgbG9kYXNoLmVhY2goZnVuYy5ub2RlX2RlZiwgKHJhd05vZGUpID0+IHsKICAgICAgICAgICAgICAgICAgICAvLyBQcmVmaXggd2l0aCB0aGUgbmFtZSBvZiB0aGUgZnVuY3Rpb24gc28gdGhhdCB0aGUgZ3JhcGgKICAgICAgICAgICAgICAgICAgICAvLyBjb3JyZWN0bHkgY29tcHV0ZXMgdGhlIGhpZXJhcmNoeSAoYW5kIG1ha2VzIG1ldGFub2RlcykuCiAgICAgICAgICAgICAgICAgICAgcmF3Tm9kZS5uYW1lID0gZnVuY3Rpb25Ob2RlTmFtZSArICcvJyArIHJhd05vZGUubmFtZTsKICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHJhd05vZGUuaW5wdXQgPT09ICdzdHJpbmcnKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJhd05vZGUuaW5wdXQgPSBbcmF3Tm9kZS5pbnB1dF07CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGNvbnN0IG9wTm9kZSA9IHByb2Nlc3NSYXdOb2RlKHJhd05vZGUpOwogICAgICAgICAgICAgICAgICAgIGlmIChsb2Rhc2guaXNOdW1iZXIob3V0cHV0QXJnTmFtZXNbcmF3Tm9kZS5uYW1lXSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gTWFyayB0aGUgbm9kZSBhcyBvbmUgb2YgdGhlIG91dHB1dHMgb2YgdGhlIGZ1bmN0aW9uLgogICAgICAgICAgICAgICAgICAgICAgICBvcE5vZGUuZnVuY3Rpb25PdXRwdXRJbmRleCA9IG91dHB1dEFyZ05hbWVzW3Jhd05vZGUubmFtZV07CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGxvZGFzaC5lYWNoKG9wTm9kZS5pbnB1dHMsIChub3JtYWxpemVkSW5wdXQpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgbm9ybWFsaXplZElucHV0Lm5hbWUgPQogICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb25Ob2RlTmFtZSArIE5BTUVTUEFDRV9ERUxJTSArIG5vcm1hbGl6ZWRJbnB1dC5uYW1lOwogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIGlmIChncmFwaERlZi5saWJyYXJ5ICYmIGdyYXBoRGVmLmxpYnJhcnkuZnVuY3Rpb24pIHsKICAgICAgICAgICAgICAgIC8vIFRoaXMgZ3JhcGggY29udGFpbnMgZnVuY3Rpb25zLgogICAgICAgICAgICAgICAgbG9kYXNoLmVhY2goZ3JhcGhEZWYubGlicmFyeS5mdW5jdGlvbiwgcHJvY2Vzc0Z1bmN0aW9uKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBvcE5vZGVzLnNwbGljZShpbmRleCk7CiAgICAgICAgICAgIG5vZGVOYW1lcy5zcGxpY2UoaW5kZXgpOwogICAgICAgICAgICByZXR1cm4gb3BOb2RlczsKICAgICAgICB9LCB0cmFja2VyKQogICAgICAgICAgICAudGhlbigob3BOb2RlcykgPT4gewogICAgICAgICAgICAvLyBDcmVhdGUgdGhlIGdyYXBoIGRhdGEgc3RydWN0dXJlIGZyb20gdGhlIGdyYXBobGliIGxpYnJhcnkuCiAgICAgICAgICAgIHJldHVybiBydW5Bc3luY1Rhc2soJ0J1aWxkaW5nIHRoZSBkYXRhIHN0cnVjdHVyZScsIDcwLCAoKSA9PiB7CiAgICAgICAgICAgICAgICBsZXQgbm9ybWFsaXplZE5hbWVEaWN0ID0gbWFwU3RyaWN0SGllcmFyY2h5KG5vZGVOYW1lcywgZW1iZWRkaW5nTm9kZU5hbWVzKTsKICAgICAgICAgICAgICAgIGxldCBncmFwaCA9IG5ldyBTbGltR3JhcGgoKTsKICAgICAgICAgICAgICAgIC8vIEFkZCB0aGUgbm9kZXMgdG8gdGhlIGdyYXBoLgogICAgICAgICAgICAgICAgbG9kYXNoLmVhY2gob3BOb2RlcywgKG9wTm9kZSkgPT4gewogICAgICAgICAgICAgICAgICAgIGxldCBub3JtYWxpemVkTmFtZSA9IG5vcm1hbGl6ZWROYW1lRGljdFtvcE5vZGUubmFtZV0gfHwgb3BOb2RlLm5hbWU7CiAgICAgICAgICAgICAgICAgICAgZ3JhcGgubm9kZXNbbm9ybWFsaXplZE5hbWVdID0gb3BOb2RlOwogICAgICAgICAgICAgICAgICAgIC8vIENoZWNrIGlmIHRoZSBub2RlIGhhcyBvdXQtZW1iZWRkaW5ncy4gSWYgeWVzLCBhZGQgdGhlbSB0byB0aGUKICAgICAgICAgICAgICAgICAgICAvLyBub2RlLgogICAgICAgICAgICAgICAgICAgIGlmIChvcE5vZGUubmFtZSBpbiBvdXRFbWJlZGRpbmdzKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG9wTm9kZS5vdXRFbWJlZGRpbmdzID0gb3V0RW1iZWRkaW5nc1tvcE5vZGUubmFtZV07CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIE5vcm1hbGl6ZSB0aGUgbmFtZXMgb2YgdGhlIG91dC1lbWJlZGRpbmdzLgogICAgICAgICAgICAgICAgICAgICAgICBsb2Rhc2guZWFjaChvcE5vZGUub3V0RW1iZWRkaW5ncywgKG5vZGUpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vZGUubmFtZSA9IG5vcm1hbGl6ZWROYW1lRGljdFtub2RlLm5hbWVdIHx8IG5vZGUubmFtZTsKICAgICAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIC8vIFVwZGF0ZSB0aGUgbmFtZSBvZiB0aGUgbm9kZS4KICAgICAgICAgICAgICAgICAgICBvcE5vZGUubmFtZSA9IG5vcm1hbGl6ZWROYW1lOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICAvLyBWaXNpdCBlYWNoIG5vZGUncyBpbnB1dHMgdG8gYWRkIHRoZSBlZGdlcyB0byB0aGUgZ3JhcGguIElmIHRoZQogICAgICAgICAgICAgICAgLy8gaW5wdXQKICAgICAgICAgICAgICAgIC8vIGlzIGFuIGluLWVtYmVkZGluZywgdGhlbiBhZGQgaXQgdG8gdGhlIG5vZGUncyBpbi1lbWJlZGRpbmdzCiAgICAgICAgICAgICAgICAvLyBpbnN0ZWFkLgogICAgICAgICAgICAgICAgbG9kYXNoLmVhY2gob3BOb2RlcywgKG9wTm9kZSkgPT4gewogICAgICAgICAgICAgICAgICAgIGxvZGFzaC5lYWNoKG9wTm9kZS5pbnB1dHMsIChpbnB1dCwgaSkgPT4gewogICAgICAgICAgICAgICAgICAgICAgICBsZXQgaW5wdXROYW1lID0gaW5wdXQubmFtZTsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0TmFtZSBpbiBpbkVtYmVkZGluZykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGluRW1iZWROb2RlID0gaW5FbWJlZGRpbmdbaW5wdXROYW1lXTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wTm9kZS5pbkVtYmVkZGluZ3MucHVzaChpbkVtYmVkTm9kZSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBNb3ZlIHRoZSBpbnB1dHMgb2YgdGhlIGluLWVtYmVkZGluZyBub2RlIGludG8gaW5jb21pbmcKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGVkZ2VzIG9mCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyB0aGUgbWFpbiBub2RlLiBFLmcuIHRoZSBjb250cm9sIGRlcGVuZGVuY3kgb2YgYSBjb25zdGFudAogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbm9kZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gc2hvdWxkIGJlIG1vdmVkIHRvIHRoZSBvcCBub2RlIHdoZXJlIHRoZSBjb25zdGFudCBpcwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gZW1iZWRkZWQuCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBlbWJlZElucHV0IG9mIGluRW1iZWROb2RlLmlucHV0cykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZEVkZ2VUb0dyYXBoKGdyYXBoLCBub3JtYWxpemVkTmFtZURpY3RbZW1iZWRJbnB1dC5uYW1lXSB8fCBlbWJlZElucHV0Lm5hbWUsIG9wTm9kZSwgZW1iZWRJbnB1dCwgcGFyYW1zLCBpKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChpbnB1dE5hbWUgaW4gb3V0RW1iZWRkaW5nKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBNb3ZlIHRoZSBpbnB1dHMgb2YgdGhlIG91dC1lbWJlZGRpbmcgbm9kZSBpbnRvIGlucHV0cyBvZgogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gdGhlIG1haW4gbm9kZSB3aGVyZSB0aGUgb3V0LWVtYmVkZGluZyBwb2ludHMgdG8uCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgb3V0RW1iZWROb2RlID0gb3V0RW1iZWRkaW5nW2lucHV0TmFtZV07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBlbWJlZElucHV0IG9mIG91dEVtYmVkTm9kZS5pbnB1dHMpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRFZGdlVG9HcmFwaChncmFwaCwgbm9ybWFsaXplZE5hbWVEaWN0W2VtYmVkSW5wdXQubmFtZV0gfHwgZW1iZWRJbnB1dC5uYW1lLCBvcE5vZGUsIGlucHV0LCBwYXJhbXMsIGkpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkRWRnZVRvR3JhcGgoZ3JhcGgsIG5vcm1hbGl6ZWROYW1lRGljdFtpbnB1dE5hbWVdIHx8IGlucHV0TmFtZSwgb3BOb2RlLCBpbnB1dCwgcGFyYW1zLCBpKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICAvLyBOb3JtYWxpemUgdGhlIG5hbWVzIG9mIGluLWVtYmVkZGluZ3MuCiAgICAgICAgICAgICAgICBsb2Rhc2guZWFjaChpbkVtYmVkZGluZywgKG5vZGUsIG5hbWUpID0+IHsKICAgICAgICAgICAgICAgICAgICBub2RlLm5hbWUgPSBub3JtYWxpemVkTmFtZURpY3Rbbm9kZS5uYW1lXSB8fCBub2RlLm5hbWU7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIHJldHVybiBncmFwaDsKICAgICAgICAgICAgfSwgdHJhY2tlcik7CiAgICAgICAgfSk7CiAgICB9CiAgICAvKioKICAgICAqIENyZWF0ZSBhIG5ldyBncmFwaGxpYi5HcmFwaCgpIGluc3RhbmNlIHdpdGggZGVm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lYWNoKGdldEhpZXJhcmNoaWNhbFBhdGgoYSkuc2xpY2UoMCwgLTEpLCAobnMpID0+IHsKICAgICAgICAgICAgICAgIG5hbWVzcGFjZVNldFtuc10gPSB0cnVlOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgZm9yIChsZXQgaiA9IGkgKyAxOyBqIDwgbm9kZU5hbWVzLmxlbmd0aDsgKytqKSB7CiAgICAgICAgICAgICAgICBsZXQgYiA9IG5vZGVOYW1lc1tqXTsKICAgICAgICAgICAgICAgIGlmIChsb2Rhc2guc3RhcnRzV2l0aChiLCBhKSkgewogICAgICAgICAgICAgICAgICAgIGlmIChiLmxlbmd0aCA+IGEubGVuZ3RoICYmIGIuY2hhckF0KGEubGVuZ3RoKSA9PT0gTkFNRVNQQUNFX0RFTElNKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG5ld05hbWVEaWN0aW9uYXJ5W2FdID0gZ2V0U3RyaWN0TmFtZShhKTsKICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLy8gR28gdGhyb3VnaCBhbGwgdGhlIGVtYmVkZGluZyBub2RlIG5hbWVzIGFuZCByZW5hbWUgdGhlbSBpbiBjYXNlIHRoZXkKICAgICAgICAvLyBjb2xsaWRlIHdpdGggbmFtZXNwYWNlcy4KICAgICAgICBsb2Rhc2guZWFjaChlbWJlZGRpbmdOb2RlTmFtZXMsIChlbWJlZGRpbmdOYW1lKSA9PiB7CiAgICAgICAgICAgIGlmIChlbWJlZGRpbmdOYW1lIGluIG5hbWVzcGFjZVNldCkgewogICAgICAgICAgICAgICAgLy8gUmVuYW1lIHRvIGZvbGxvdyBzdHJpY3QgaGllcmFyY2h5LgogICAgICAgICAgICAgIC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AgIFdJVEhPVVQgV0FSUkFOVElFUyBPUiBDT05ESVRJT05TIE9GIEFOWSBLSU5ELCBlaXRoZXIgZXhwcmVzcyBvciBpbXBsaWVkLgogICAgU2VlIHRoZSBMaWNlbnNlIGZvciB0aGUgc3BlY2lmaWMgbGFuZ3VhZ2UgZ292ZXJuaW5nIHBlcm1pc3Npb25zIGFuZAogICAgbGltaXRhdGlvbnMgdW5kZXIgdGhlIExpY2Vuc2UuCiAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwogICAgLyoqCiAgICAgKiBDb2xvciBwYXJhbWV0ZXJzIGZvciBvcCBub2Rlcy4KICAgICAqLwogICAgbGV0IE9wTm9kZUNvbG9ycyA9IHsKICAgICAgICBERUZBVUxUX0ZJTEw6ICcjZmZmZmZmJywKICAgICAgICBERUZBVUxUX1NUUk9LRTogJyNiMmIyYjInLAogICAgICAgIENPTVBBVElCTEU6ICcjMGY5ZDU4JywKICAgICAgICBJTkNPTVBBVElCTEU6ICcjZGI0NDM3JywKICAgIH07CiAgICAvKioKICAgICAqIENvbG9yIHBhcmFtZXRlcnMgZm9yIG5vZGUgZW5jb2RpbmcuCiAgICAgKiBAdHlwZSB7T2JqZWN0fQogICAgICovCiAgICBsZXQgTWV0YW5vZGVDb2xvcnMgPSB7CiAgICAgICAgLyoqCiAgICAgICAgICogRGVmYXVsdCBmaWxsIGFuZCBzdHJva2UgdG8gdXNlIHdoZW4gbm8gb3RoZXIgaW5mb3JtYXRpb24gaXMgYXZhaWxhYmxlLgogICAgICAgICAqLwogICAgICAgIERFRkFVTFRfRklMTDogJyNkOWQ5ZDknLAogICAgICAgIERFRkFVTFRfU1RST0tFOiAnI2E2YTZhNicsCiAgICAgICAgU0FUVVJBVElPTjogMC42LAogICAgICAgIExJR0hUTkVTUzogMC44NSwKICAgICAgICAvKioKICAgICAgICAgKiBOZXV0cmFsIGNvbG9yIHR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GZyb20gYmVpbmcgZXh0cmFjdGVkIGZyb20gc21hbGwgZ3JhcGhzLgogICAgICAgICAqLwogICAgICAgIG1pbk5vZGVDb3VudEZvckV4dHJhY3Rpb246IDE1LAogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBtaW5pbXVtIGluIG9yIG91dCBkZWdyZWUgYSBub2RlIG11c3QgaGF2ZSBpbiBvcmRlciB0byBiZSBwb3NzaWJseQogICAgICAgICAqIGV4dHJhY3RlZC4KICAgICAgICAgKi8KICAgICAgICBtaW5EZWdyZWVGb3JFeHRyYWN0aW9uOiA1LAogICAgICAgIC8qKgogICAgICAgICAqIE1heGltdW0gbnVtYmVyIG9mIGNvbnRyb2wgZWRnZXMgYSBub2RlIGNhbiBoYXZlIGJlZm9yZSB0aGV5IGFyZW4ndAogICAgICAgICAqIGRpc3BsYXllZC4KICAgICAgICAgKi8KICAgICAgICBtYXhDb250cm9sRGVncmVlOiA0LAogICAgICAgIC8qKgogICAgICAgICAqIE1heGltdW0gaW4gKGZvciBvdXRib3VuZCBicmlkZ2UgcGF0aHMpIG9yIG91dCAoZm9yIGluYm91bmQgYnJpZGdlIHBhdGhzKQogICAgICAgICAqIGRlZ3JlZSBvZiBhIG5vZGUgYWxsb3dlZCBmb3IgYSBicmlkZ2UgcGF0aCB0byBiZSByZW5kZXJlZCB0byBpdCBmcm9tIGEKICAgICAgICAgKiBzdWJoaWVyYXJjaHkgb2Ygbm9kZXMuIEhhdmluZyBhIG1heCBwcmV2ZW50cyBoYXZpbmcgdG9vIG1hbnkgbm9kZXMgZW1hbmF0ZQogICAgICAgICAqIGZyb20gYSBzdWJoaWVyYXJjaHkgYW5kIGNyb3dkaW5nIHVwLgogICAgICAgICAqLwogICAgICAgIG1heEJyaWRnZVBhdGhEZWdyZWU6IDQsCiAgICAgICAgLyoqCiAgICAgICAgICogVHlwZXMgcGF0dGVybnMgZm9yIHByZWRlZmluZWQgb3V0LWV4dHJhY3Qgbm9kZXMsIHdoaWNoIGFyZQogIC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bG9ycy5YTEFfQ0xVU1RFUl9QQUxFVFRFKSk7CiAgICAgICAgICAgIGxldCB0b3BMZXZlbEdyYXBoID0gdGhpcy5oaWVyYXJjaHkucm9vdC5tZXRhZ3JhcGg7CiAgICAgICAgICAgIC8vIEZpbmQgdGhlIG1heGltdW0gbWVtb3J5IHVzYWdlLiBVc2UgMCBhcyB0aGUgbWluaW11bS4KICAgICAgICAgICAgbGV0IG1heE1lbW9yeSA9IG1heCh0b3BMZXZlbEdyYXBoLm5vZGVzKCksIChub2RlTmFtZSwgaW5kZXgpID0+IHsKICAgICAgICAgICAgICAgIGxldCBub2RlID0gdG9wTGV2ZWxHcmFwaC5ub2RlKG5vZGVOYW1lKTsKICAgICAgICAgICAgICAgIC8vIFNvbWUgb3BzIGRvbid0IGhhdmUgc3RhdHMgYXQgYWxsLgogICAgICAgICAgICAgICAgaWYgKG5vZGUuc3RhdHMgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBub2RlLnN0YXRzLnRvdGFsQnl0ZXM7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICB0aGlzLm1lbW9yeVVzYWdlU2NhbGUgPSBsaW5lYXIkMigpCiAgICAgICAgICAgICAgICAuZG9tYWluKFswLCBtYXhNZW1vcnldKQogICAgICAgICAgICAgICAgLnJhbmdlKFBBUkFNUy5taW5NYXhDb2xvcnMpOwogICAgICAgICAgICAvLyBGaW5kIHRoZSBtYXhpbXVtIGNvbXB1dGUgdGltZS4gVXNlIDAgYXMgdGhlIG1pbmltdW0uCiAgICAgICAgICAgIGxldCBtYXhDb21wdXRlVGltZSA9IG1heCh0b3BMZXZlbEdyYXBoLm5vZGVzKCksIChub2RlTmFtZSwgaW5kZXgpID0+IHsKICAgICAgICAgICAgICAgIGxldCBub2RlID0gdG9wTGV2ZWxHcmFwaC5ub2RlKG5vZGVOYW1lKTsKICAgICAgICAgICAgICAgIC8vIFNvbWUgb3BzIGRvbid0IGhhdmUgc3RhdHMgYXQgYWxsLgogICAgICAgICAgICAgICAgaWYgKG5vZGUuc3RhdHMgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBub2RlLnN0YXRzLmdldFRvdGFsTWljcm9zKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICB0aGlzLmNvbXB1dGVUaW1lU2NhbGUgPSBsaW5lYXIkMigpCiAgICAgICAgICAgICAgICAuZG9tYWluKFswLCBtYXhDb21wdXRlVGltZV0pCiAgICAgICAgICAgICAgICAucmFuZ2UoUEFSQU1TLm1pbk1heENvbG9ycyk7CiAgICAgICAgICAgIHRoaXMuZWRnZVdpZHRoU2l6ZWRCYXNlZFNjYWxlID0gdGhpcy5oaWVyYXJjaHkuaGFzU2hhcGVJbmZvCiAgICAgICAgICAgICAgICA/IEVER0VfV0lEVEhfU0laRV9CQVNFRF9TQ0FMRQogICAgICAgICAgICAgICAgOiBsaW5lYXIkMigpCiAgICAgICAgICAgICAgICAgICAgLmRvbWFpbihbMSwgdGhpcy5oaWVyYXJjaHkubWF4TWV0YUVkZ2VTaXplXSkKICAgICAgICAgICAgICAgICAgICAucmFuZ2UoWwogICAgICAgICAgICAgICAgICAgIE1JTl9FREdFX1dJRFRILAogICAgICAgICAgICAgICAgICAgIE1BWF9FREdFX1dJRFRILAogICAgICAgICAgICAgICAgXSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEdldCBhIHByZXZpb3VzbHkgY3JlYXRlZCBSZW5kZXJOb2RlSW5mbyBieSBpdHMgbm9kZSBuYW1lLgogICAgICAgICAqLwogICAgICAgIGdldFJlbmRlck5vZGVCeU5hbWUobm9kZU5hbWUpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuaW5kZXhbbm9kZU5hbWVdOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBHZXQgdGhlIHVuZGVybHlpbmcgbm9kZSBpbiB0aGUgaGllcmFyY2hpY2FsIGdyYXBoIGJ5IGl0cyBuYW1lLgogICAgICAgICAqLwogICAgICAgIGdldE5vZGVCeU5hbWUobm9kZU5hbWUpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuaGllcmFyY2h5Lm5vZGUobm9kZU5hbWUpOwogICAgICAgIH0KICAgICAgICBjb2xvckhpc3RvZ3JhbShoaXN0b2dyYW0sIGNvbG9ycykgewogICAgICAgICAgICBpZiAoT2JqZWN0LmtleXMoaGlzdG9ncmFtKS5sZW5ndGggPiAwKSB7CiAgICAgICAgICAgICAgICAvLyBDb21wdXRlIHRoZSB0b3RhbCAjIG9mIGl0ZW1zLgogICAgICAgICAgICAgICAgY29uc3QgbnVtSXRlbXMgPSBsb2Rhc2guc3VtKE9iamVjdC5rZXlzKGhpc3RvZ3JhbSkubWFwKChrZXkpID0+IGhpc3RvZ3JhbVtrZXldKSk7CiAgICAgICAgICAgICAgICByZXR1cm4gT2JqZWN0LmtleXMoaGlzdG9ncmFtKS5tYXAoKGtleSkgPT4gKHsKICAgICAgICAgICAgICAgICAgICBjb2xvcjogY29sb3JzKGtleSksCiAgICAgICAgICAgICAgICAgICAgLy8gTm9ybWFsaXplIHRvIGEgcHJvcG9ydGlvbiBvZiB0b3RhbCAjIG9mIGl0ZW1zLgogICAgICAgICAgICAgICAgICAgIHByb3BvcnRpb246IGhpc3RvZ3JhbVtrZXldIC8gbnVtSXRlbXMsCiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY29uc29sZS5pbmZvKCdubyBwYWlycyBmb3VuZCEnKTsKICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEdldCBhIHByZXZpb3VzbHkgY3JlYXRlZCBSZW5kZXJOb2RlSW5mbyBmb3IgdGhlIHNwZWNpZmllZCBub2RlIG5hbWUsCiAgICAgICAgICogb3IgY3JlYXRlIG9uZSBpZiBpdCBoYXNuJ3QgYmVlbiBjcmVhdGVkIHlldC4KICAgICAgICAgKi8KICAgICAgICBnZXRPckNyZWF0ZVJlbmRlck5vZGVCeU5hbWUobm9kZU5hbWUpIHsKICAgICAgICAgICAgLy8gUG9seW1lciBtYXkgaW52b2tlIHRoaXMgd2l0aCBudWxsLgogICAgICAgICAgICBpZiAoIW5vZGVOYW1lKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAobm9kZU5hbWUgaW4gdGhpcy5pbmRleCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuaW5kZXhbbm9kZU5hbWVdOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGxldCBub2RlID0gdGhpcy5oaWVyYXJjaHkubm9kZShub2RlTmFtZSk7CiAgICAgICAgICAgIC8vIEV4aXQgZWFybHkgaWYgdGhlIG5vZGUgZG9lcyBub3QgZXhpc3QgaW4gdGhlIGhpZXJhcmNoeS4gVGhpcyBjYW4gaGFwcGVuCiAgICAgICAgICAgIC8vIHdoZW4gYSBncmFwaCBpcyByZWxvYWRlZCB3aGlsZSB0aGUgaW5mb2NhcmQgcG9pbnRzIHRvIGEgbm9kZSBub3QgdmlzaWJsZQogICAgICAgICAgICAvLyBhdCB0aGUgdG9wLWxldmVsLgogICAgICAgICAgICBpZiAoIW5vZGUpIHsKICAgICAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGxldCByZW5kZXJJbmZvID0gbm9kZS5pc0dyb3VwTm9kZQogICAgICAgICAgICAgICAgPyBuZXcgUmVuZGVyR3JvdXBOb2RlSW5mbyhub2RlLCB0aGlzLmhpZXJhcmNoeS5ncmFwaE9wdGlvbnMpCiAgICAgICAgICAgICAgICA6IG5ldyBSZW5kZXJOb2RlSW5mbyhub2RlKTsKICAgICAgICAgICAgdGhpcy5pbmRleFtub2RlTmFtZV0gPSByZW5kZXJJbmZvOwogICAgICAgICAgICB0aGlzLnJlbmRlcm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aWxpdHlIaXN0b2dyYW0uaW5jb21wYXRpYmxlOwogICAgICAgICAgICAgICAgaWYgKGNvbXBhdCAhPSAwIHx8IGluY29tcGF0ICE9IDApIHsKICAgICAgICAgICAgICAgICAgICBvcENvbXBhdGliaWxpdHkgPSBjb21wYXQgLyAoY29tcGF0ICsgaW5jb21wYXQpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgbGV0IGRldmljZSA9IHJlbmRlckluZm8ubm9kZS5kZXZpY2U7CiAgICAgICAgICAgICAgICBpZiAoZGV2aWNlKSB7CiAgICAgICAgICAgICAgICAgICAgZGV2aWNlSGlzdG9ncmFtID0geyBbZGV2aWNlXTogMSB9OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgbGV0IHhsYUNsdXN0ZXIgPSByZW5kZXJJbmZvLm5vZGUueGxhQ2x1c3RlcjsKICAgICAgICAgICAgICAgIGlmICh4bGFDbHVzdGVyKSB7CiAgICAgICAgICAgICAgICAgICAgeGxhQ2x1c3Rlckhpc3RvZ3JhbSA9IHsgW3hsYUNsdXN0ZXJdOiAxIH07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAocmVuZGVySW5mby5ub2RlLnR5cGUgPT09IE5vZGVUeXBlLk9QKSB7CiAgICAgICAgICAgICAgICAgICAgb3BDb21wYXRpYmlsaXR5ID0gcmVuZGVySW5mby5ub2RlLmNvbXBhdGlibGUgPyAxIDogMDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoZGV2aWNlSGlzdG9ncmFtKSB7CiAgICAgICAgICAgICAgICByZW5kZXJJbmZvLmRldmljZUNvbG9ycyA9IHRoaXMuY29sb3JIaXN0b2dyYW0oZGV2aWNlSGlzdG9ncmFtLCB0aGlzLmRldmljZUNvbG9yTWFwKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoeGxhQ2x1c3Rlckhpc3RvZ3JhbSkgewogICAgICAgICAgICAgICAgcmVuZGVySW5mby54bGFDbHVzdGVyQ29sb3JzID0gdGhpcy5jb2xvckhpc3RvZ3JhbSh4bGFDbHVzdGVySGlzdG9ncmFtLCB0aGlzLnhsYUNsdXN0ZXJDb2xvck1hcCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKG9wQ29tcGF0aWJpbGl0eSAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICByZW5kZXJJbmZvLmNvbXBhdGliaWxpdHlDb2xvcnMgPSBbCiAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICBjb2xvcjogT3BOb2RlQ29sb3JzLkNPTVBBVElCTEUsCiAgICAgICAgICAgICAgICAgICAgICAgIHByb3BvcnRpb246IG9wQ29tcGF0aWJpbGl0eSwKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I6IE9wTm9kZUNvbG9ycy5JTkNPTVBBVElCTEUsCiAgICAgICAgICAgICAgICAgICAgICAgIHByb3BvcnRpb246IDEgLSBvcENvbXBhdGliaWxpdHksCiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIF07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXMuaW5kZXhbbm9kZU5hbWVdOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZXR1cm4gdGhlIG5lYXJlc3QgYW5jZXN0b3Igbm9kZSwgaW5jbHVkaW5nIGl0c2VsZiwgdGhhdCBpcyB2aXNpYmxlCiAgICAgICAgICogaW4gdGhlIHZpc3VhbGl6YXRpb24uIFRoaXMgbWV0aG9kIGlzIHVzZWQgc28gdGhhdCB3ZSBjYW4gc2VsZWN0CiAgICAgICAgICogKGhpZ2hsaWdodCkgYSBub2RlIHRoYXQgaXNuJ3QgZHJhd24geWV0LCBieSBzZWxlY3RpbmcgKGhpZ2hsaWdodGluZykKICAgICAgICAgKiBpdHMgbmVhcmVzdCBhbmNlc3RvciB0aGF0IGhhcyBiZWVuIGRyYXduLgogICAgICAgICAqLwogICAgICAgIGdldE5lYXJlc3RWaXNpYmxlQW5jZXN0b3IobmFtZSkgewogICAgICAgICAgICBsZXQgcGF0aCA9IGdldEhpZXJhcmNoaWNhbFBhdGgobmFtZSk7CiAgICAgICAgICAgIGxldCBpID0gMDsKICAgICAgICAgICAgbGV0IHJlbmRlck5vZGUgPSBudWxsOwogICAgICAgICAgICAvLyBGYWxsdGhyb3VnaC4gSWYgZXZlcnl0aGluZyB3YXMgZXhwYW5kZWQgcmV0dXJuIHRoZSBub2RlLgogICAgICAgICAgICBsZXQgbm9kZU5hbWUgPSBuYW1lOwogICAgICAgICAgICBmb3IgKDsgaSA8IHBhdGgubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIG5vZGVOYW1lID0gcGF0aFtpXTsKICAgICAgICAgICAgICAgIHJlbmRlck5vZGUgPSB0aGlzLmdldFJlbmRlck5vZGVCeU5hbWUobm9kZU5hbWUpOwogICAgICAgICAgICAgICAgLy8gT3Agbm9kZXMgaGF2ZSBleHBhbmRlZCBzZXQgdG8gZmFsc2UgYnkgZGVmYXVsdC4KICAgICAgICAgICAgICAgIGlmICghcmVuZGVyTm9kZS5leHBhbmRlZCkgewogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIENoZWNrIGNhc2Ugd2hlcmUgaGlnaGxpZ2h0ZWQgbm9kZSBpcyBhbiBlbWJlZGRlZCBub2RlIHdob3NlIHBhcmVudCBub2RlCiAgICAgICAgICAgIC8vIGlzIGFsc28gaXRzIGhpZXJhcmNoaWNhbCBwYXJlbnQuIEluIHRoaXMgY2FzZSwgd2Ugd2FudCB0byByZXR1cm4gdGhlCiAgICAgICAgICAgIC8vIGVtYmVkZGVkIG5vZGUgbmFtZSwgYXMgaXQgaXMgYWxzbyBkaXNwbGF5ZWQgaWYgaXRzIHBhcmVudCBoYXMgYmVlbgogICAgICAgICAgICAvLyBkaXNwbGF5ZWQuCiAgICAgICAgICAgIGlmIChpID09IHBhdGgubGVuZ3RoIC0gMikgewogICAgICAgICAgICAgICAgbGV0IG5leHROYW1lID0gcGF0aFtpICsgMV07CiAgICAgICAgICAgICAgICBpZiAocmVuZGVyTm9kZS5pbkFubm90YXRpb25zLm5vZGVOYW1lc1tuZXh0TmFtZV0pIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV4dE5hbWU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAocmVuZGVyTm9kZS5vdXRBbm5vdGF0aW9ucy5ub2RlTmFtZXNbbmV4dE5hbWVdKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5leHROYW1lOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBub2RlTmFtZTsKICAgICAgICB9CiAgICAgICAgLy8gVE9ETzogRGVsZXRlIHRoaXMgYW4gYW55IGNvZGUgaXQgdG91Y2hlcyAoYWxsIGRlcHJlY2F0ZWQpLgogICAgICAgIHNldERlcHRoKGRlcHRoKSB7CiAgICAgICAgICAgIHNldEdyb3VwTm9kZURlcHRoKHRoaXMucm9vdCwgK2RlcHRoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0dXJucyB0cnVlIGlmIHRoZSByZW5kZXJOb2RlIGlzIGFuIGlzb2xhdGVkIG5vZGUgd2l0aGluIGl0cyBwYXJlbnQgbm9kZS4KICAgICAgICAgKi8KICAgICAgICBpc05vZGVBdXhpbGlhcnkocmVuZGVyTm9kZSkgewogICAgICAgICAgICBsZXQgcGFyZW50Tm9kZSA9ICh0aGlzLmdldFJlbmRlck5vZGVCeU5hbWUocmVuZGVyTm9kZS5ub2RlLnBhcmVudE5vZGUubmFtZSkpOwogICAgICAgICAgICBsZXQgZm91bmQgPSBsb2Rhc2guZmluZChwYXJlbnROb2RlLmlzb2xhdGVkSW5FeHRyYWN0LCAobm9kZSkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIG5vZGUubm9kZS5uYW1lID09PSByZW5kZXJOb2RlLm5vZGUubmFtZTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGlmIChmb3VuZCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZm91bmQgPSBsb2Rhc2guZmluZChwYXJlbnROb2RlLmlzb2xhdGVkT3V0RXh0cmFjdCwgKG5vZGUpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiBub2RlLm5vZGUubmFtZSA9PT0gcmVuZGVyTm9kZS5ub2RlLm5hbWU7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICByZXR1cm4gISFmb3VuZDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0dXJucyBhIGxpc3Qgb2Ygb3BzIHRoYXQgaGF2ZSBiZWVuIHJlbmRlcmVkIHNvIGZhciBmb3IgdGhpcyBncmFwaC4gTW9yZQogICAgICAgICAqIG9wcyBtYXkgbGF0ZXIgYmUgcmVuZGVyZWQgaWYgdGhlIHVzZXIgZXhwYW5kcyBub2RlcyBmb3IgaW5zdGFuY2UuIFRoZSBsaXN0CiAgICAgICAgICogcmV0dXJuZWQgaGVyZSBjYW4gb25seSBzdGF5IHRoZSBzYW1lIHNpemUgb3IgZ3JvdyBvbiBzdWNjZXNzaXZlIGNhbGxzLgogICAgICAgICAqLwogICAgICAgIGdldE5hbWVzT2ZSZW5kZXJlZE9wcygpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMucmVuZGVyZWRPcE5hbWVzOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDbG9uZXMgYW4gb3Agbm9kZSBhbmQgYWRkcyBpdCB0byBhIG1ldGFncmFwaC4gRG9lcyBub3RoaW5nIGlmIGF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hcnlGdW5jdGlvbk5vZGVOYW1lLCBuZXdQcmVmaXgpOwogICAgICAgICAgICBsZXQgbmV3T3BOb2RlID0gcGFyZW50TWV0YW5vZGUubWV0YWdyYXBoLm5vZGUobmV3TmFtZSk7CiAgICAgICAgICAgIGlmIChuZXdPcE5vZGUpIHsKICAgICAgICAgICAgICAgIC8vIFRoaXMgbm9kZSBoYWQgYWxyZWFkeSBiZWVuIGNyZWF0ZWQgYW5kIGFkZGVkIHRvIHRoZSBncmFwaC4KICAgICAgICAgICAgICAgIHJldHVybiBuZXdPcE5vZGU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gQ3JlYXRlIGEgbmV3IG9wIG5vZGUuCiAgICAgICAgICAgIG5ld09wTm9kZSA9IG5ldyBPcE5vZGVJbXBsKHsKICAgICAgICAgICAgICAgIG5hbWU6IG5ld05hbWUsCiAgICAgICAgICAgICAgICBpbnB1dDogW10sCiAgICAgICAgICAgICAgICBkZXZpY2U6IG5vZGUuZGV2aWNlLAogICAgICAgICAgICAgICAgb3A6IG5vZGUub3AsCiAgICAgICAgICAgICAgICBhdHRyOiBsb2Rhc2guY2xvbmVEZWVwKG5vZGUuYXR0ciksCiAgICAgICAgICAgIH0pOwogICAgICAgICAgICAvLyBVcGRhdGUgdmFyaW91cyBwcm9wZXJ0aWVzLgogICAgICAgICAgICBuZXdPcE5vZGUuY2FyZGluYWxpdHkgPSBub2RlLmNhcmRpbmFsaXR5OwogICAgICAgICAgICBuZXdPcE5vZGUuaW5jbHVkZSA9IG5vZGUuaW5jbHVkZTsKICAgICAgICAgICAgbmV3T3BOb2RlLm91dHB1dFNoYXBlcyA9IGxvZGFzaC5jbG9uZURlZXAobm9kZS5vdXRwdXRTaGFwZXMpOwogICAgICAgICAgICBuZXdPcE5vZGUueGxhQ2x1c3RlciA9IG5vZGUueGxhQ2x1c3RlcjsKICAgICAgICAgICAgbmV3T3BOb2RlLmZ1bmN0aW9uSW5wdXRJbmRleCA9IG5vZGUuZnVuY3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ZXcgbm9kZSB0byB0aGUgZ3JhcGguCiAgICAgICAgICAgICAgICAgICAgICAgIG5ld05vZGUucGFyZW50Tm9kZSA9IG5ld01ldGFub2RlOwogICAgICAgICAgICAgICAgICAgICAgICBuZXdNZXRhbm9kZS5tZXRhZ3JhcGguc2V0Tm9kZShuZXdOb2RlLm5hbWUsIG5ld05vZGUpOwogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmhpZXJhcmNoeS5zZXROb2RlKG5ld05vZGUubmFtZSwgbmV3Tm9kZSk7CiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgIGNhc2UgTm9kZVR5cGUuT1A6CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIER1cGxpY2F0ZSB0aGUgb3Agbm9kZS4KICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbmV3T3BOb2RlID0gdGhpcy5jbG9uZUFuZEFkZEZ1bmN0aW9uT3BOb2RlKG5ld01ldGFub2RlLCBvbGRQcmVmaXgsIG5vZGUsIG5ld1ByZWZpeCk7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChsb2Rhc2guaXNOdW1iZXIobmV3T3BOb2RlLmZ1bmN0aW9uSW5wdXRJbmRleCkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFRoaXMgbm9kZSByZXByZXNlbnRzIGFuIGlucHV0X2FyZyBvZiB0aGUgbGlicmFyeSBmdW5jdGlvbi4gR2l2ZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaXQgZWRnZXMgc28gdGhhdCBpdHMgYnJpZGdlIGVkZ2VzIGFyZSBjcmVhdGVkIGNvcnJlY3RseS4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGF0Y2hFZGdlc0ludG9GdW5jdGlvbklucHV0cyhvcE5vZGVUb1JlcGxhY2UsIG5ld09wTm9kZSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGxvZGFzaC5pc051bWJlcihuZXdPcE5vZGUuZnVuY3Rpb25PdXRwdXRJbmRleCkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uT3V0cHV0SW5kZXhUb05vZGVbbmV3T3BOb2RlLmZ1bmN0aW9uT3V0cHV0SW5kZXhdID0gbmV3T3BOb2RlOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFRoaXMgbG9naWMgc2hvdWxkIG5ldmVyIHJ1biBiZWNhdXNlIHRoZSBtZXRhIGdyYXBoIHNob3VsZCBvbmx5CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGNvbnRhaW4gbWV0YSBhbmQgb3Agbm9kZXMuCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUud2Fybihub2RlLm5hbWUgKyAnIGlzIG9kZGx5IG5laXRoZXIgYSBtZXRhbm9kZSBub3IgYW4gb3Bub2RlLicpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICAgICAgLy8gQ2xvbmUgdGhlIGVkZ2VzIHdpdGhpbiB0aGUgZnVuY3Rpb24gbGlicmFyeSBtZXRhbm9kZS4KICAgICAgICAgICAgdGhpcy5jbG9uZUxpYnJhcnlNZXRhbm9kZUVkZ2VzKGxpYnJhcnlNZXRhbm9kZSwgbmV3TWV0YW5vZGUsIG9sZFByZWZpeCwgbmV3UHJlZml4KTsKICAgICAgICAgICAgcmV0dXJuIG5ld01ldGFub2RlOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDbG9uZXMgdGhlIGVkZ2VzIHdpdGhpbiBgbGlicmFyeU1ldGFub2RlYCBhbmQgYWRkcyB0aGVtIHRvIGBuZXdNZXRhbm9kZWAuCiAgICAgICAgICogVGhlIG5hbWVzIG9mIGVkZ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XRzIGRlc3RpbmF0aW9uIGlzIHdpdGhpbiB0aGUgbWV0YWdyYXBoLgogICAgICAgICAgICAgICAgaWYgKG5ld01ldGFub2RlLm1ldGFncmFwaC5ub2RlKG5ld1cpKSB7CiAgICAgICAgICAgICAgICAgICAgbmV3TWV0YW5vZGUubWV0YWdyYXBoLnNldEVkZ2UobmV3ViwgbmV3VywgbmV3TWV0YUVkZ2UpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgbmV3TWV0YW5vZGUubWV0YWdyYXBoLnNldEVkZ2UobmV3VywgbmV3ViwgbmV3TWV0YUVkZ2UpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogV2hlbiBhIG1ldGFub2RlIHJlcHJlc2VudGluZyBhIGZ1bmN0aW9uIGlzIGNsb25lZCBhbmQgcGxhY2VkIGludG8gdGhlCiAgICAgICAgICogZ3JhcGgsIHdlIG11c3QgY3JlYXRlIGVkZ2VzIGJldHdlZW4gaW5wdXRzIGludG8gdGhlIGZ1bmN0aW9uIGNhbGwgYW5kIHRoZQogICAgICAgICAqIGlucHV0IG9wcyB3aXRoaW4gdGhlIGZ1bmN0aW9uLiBUaGlzIGZ1bmN0aW9uIHBlcmZvcm1zIHRoYXQgcGF0Y2hpbmcuCiAgICAgICAgICovCiAgICAgICAgcGF0Y2hFZGdlc0ludG9GdW5jdGlvbklucHV0cyhvcE5vZGVUb1JlcGxhY2UsIG5ld09wTm9kZSkgewogICAgICAgICAgICAvLyBJZiB0aGUgbGFzdCBmZXcgcmF3IGlucHV0cyBhcmUgdGhlIHNhbWUgbm9kZSwgcHJldmlvdXMgZ3JhcGggbG9naWMKICAgICAgICAgICAgLy8gY29sbGFwc2VzIHRoZW0gaW50byBhIHNpbmdsZSBub3JtYWxpemVkIGlucHV0LgogICAgICAgICAgICBsZXQgaW5wdXRJbmRleCA9IE1h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Rm9yIGluc3RhbmNlLAogICAgICAgICAgICAvLyBhbiBlZGdlIG1heSBlbnRlciBhIHNlcmllcyBub2RlLgogICAgICAgICAgICBsZXQgb3JpZ2luYWxNZXRhRWRnZTsKICAgICAgICAgICAgbGV0IHJlZ3VsYXJFZGdlQ291bnQgPSAwOwogICAgICAgICAgICBsb2Rhc2guZWFjaChvcmlnaW5hbE1ldGFFZGdlcy5yZWd1bGFyLCAobWV0YUVkZ2UpID0+IHsKICAgICAgICAgICAgICAgIHJlZ3VsYXJFZGdlQ291bnQgKz0gbWV0YUVkZ2UubnVtUmVndWxhckVkZ2VzOwogICAgICAgICAgICAgICAgaWYgKHJlZ3VsYXJFZGdlQ291bnQgPiBpbnB1dEluZGV4KSB7CiAgICAgICAgICAgICAgICAgICAgb3JpZ2luYWxNZXRhRWRnZSA9IG1ldGFFZGdlOwogICAgICAgICAgICAgICAgICAgIC8vIFRlcm1pbmF0ZSB0aGUgbG9vcC4KICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICAvLyBBbHNvIGNoYW5nZSBhbnkgYmFzZSBlZGdlcyB0aGF0IHBvaW50IGludG8gdGhlIG9yaWdpbmFsIG5vZGUgdG8KICAgICAgICAgICAgLy8gcG9pbnQgdG8gdGhlIGlucHV0IGFyZyB3aXRoaW4gdGhlIGZ1bmN0aW9uLiBUaGVzZSBhcmUgdXNlZCB0bwogICAgICAgICAgICAvLyBtYWtlIGJyaWRnZSBlZGdlcy4KICAgICAgICAgICAgbG9kYXNoLmVhY2gob3JpZ2luYWxNZXRhRWRnZS5iYXNlRWRnZUxpc3QsIChlZGdlKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAoZWRnZS53ID09PSBvcE5vZGVUb1JlcGxhY2UubmFtZSkgewogICAgICAgICAgICAgICAgICAgIGVkZ2UudyA9IG5ld09wTm9kZS5uYW1lOwogICAgICAgICAgICAgICAgfQogICA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2VMaXN0LCAoYmFzZUVkZ2UpID0+IHsKICAgICAgICAgICAgICAgICAgICAvLyBEZXN0aW5hdGlvbiBub2RlcyB3aXRoaW4gcmVndWxhciBiYXNlIGVkZ2VzIGFyZSBvcCBub2Rlcy4KICAgICAgICAgICAgICAgICAgICBjb25zdCBkZXN0aW5hdGlvbk5vZGUgPSB0aGlzLmhpZXJhcmNoeS5ub2RlKGJhc2VFZGdlLncpOwogICAgICAgICAgICAgICAgICAgIGxvZGFzaC5lYWNoKGRlc3RpbmF0aW9uTm9kZS5pbnB1dHMsIChub3JtYWxpemVkSW5wdXQpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gSWYgYW4gb3V0cHV0IG9mIHRoZSBmdW5jdGlvbiBpcyBhbiBpbnB1dCBpbnRvIHRoZSBvcCwgbWFwIGl0IGJhY2sKICAgICAgICAgICAgICAgICAgICAgICAgLy8gdG8gdGhlIG91dHB1dCB3aXRoaW4gdGhlIGZ1bmN0aW9uIHNvIGJyaWRnZSBlZGdlcyBhcmUgY29tcHV0ZWQuCiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChub3JtYWxpemVkSW5wdXQubmFtZSA9PT0gb3BOb2RlVG9SZXBsYWNlLm5hbWUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIE1hcCB0aGUgb3V0cHV0IHRlbnNvciBpbmRleCAod2hpY2ggaW4gdGhpcyBjYXNlIGlzIGZvciBzdXJlCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBudW1lcmljIGJlY2F1c2UgaXQgaXMgYW4gb3V0cHV0IG9mIGEgbWV0YW5vZGUpIHRvIHRoZSBjb3JyZWN0CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBmdW5jdGlvbiBvdXRwdXQuCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBvdXRwdXROb2RlID0gZnVuY3Rpb25PdXRwdXRJbmRleFRvRGVzdGluYXRpb25Ob2RlW25vcm1hbGl6ZWRJbnB1dC5vdXRwdXRUZW5zb3JLZXldOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgbm9ybWFsaXplZElucHV0Lm5hbWUgPSBvdXRwdXROb2RlLm5hbWU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBub3JtYWxpemVkSW5wdXQub3V0cHV0VGVuc29yS2V5ID0gYmFzZUVkZ2Uub3V0cHV0VGVuc29yS2V5OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIC8vIE1vZGlmeSB0aGUgbGlzdCBvZiBiYXNlIGVkZ2VzIHRvIHBvaW50IGZyb20gdGhlIG91dHB1dCBzbyB0aGF0IGJyaWRnZQogICAgICAgICAgICAgICAgLy8gZWRnZXMgYXJlIGNvcnJlY3QuCiAgICAgICAgICAgICAgICBsb2Rhc2guZWFjaChtZXRhZWRnZS5iYXNlRWRnZUxpc3QsIChiYXNlRWRnZSkgPT4gewogICAgICAgICAgICAgICAgICAgIGJhc2VFZGdlLnYgPQogICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbk91dHB1dEluZGV4VG9EZXN0aW5hdGlvbk5vZGVbYmFzZUVkZ2Uub3V0cHV0VGVuc29yS2V5XS5uYW1lOwogICAgICAgICAgICAgICAgICAgIGJhc2VFZGdlLm91dHB1dFRlbnNvcktleSA9ICcwJzsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgYnVpbGRTdWJoaWVyYXJjaHkobm9kZU5hbWUpIHsKICAgICAgICAgICAgLy8gVGVybWluYXRlIGlmIHRoZSByZW5kZXJpbmcgaGllcmFyY2h5IHdhcyBhbHJlYWR5IGNvbnN0cnVjdGVkCiAgICAgICAgICAgIC8vIGZvciB0aGlzIG5vZGUuCiAgICAgICAgICAgIGlmIChub2RlTmFtZSBpbiB0aGlzLmhhc1N1YmhpZXJhcmNoeSkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIFJlY29yZCB0aGF0IHdlIGNvbnN0cnVjdGVkIHRoZSByZW5kZXJpbmcgaGllcmFyY2h5IGZvciB0aGlzIG5vZGUsIHNvIHdlCiAgICAgICAgICAgIC8vIGRvbid0IGNvbnN0cnVjdCBpdCBhbm90aGVyIHRpbWUuCiAgICAgICAgICAgIHRoaXMuaGFzU3ViaGllcmFyY2h5W25vZGVOYW1lXSA9IHRydWU7CiAgICAgICAgICAgIGxldCByZW5kZXJOb2RlSW5mbyA9IHRoaXMuaW5kZXhbbm9kZU5hbWVdOwogICAgICAgICAgICAvLyBJZiBpdCBpcyBub3QgYSBtZXRhIG5vZGUgb3IgYSBzZXJpZXMgbm9kZSwgZG9uJ3QgZG8gYW55dGhpbmcuCiAgICAgICAgICAgIGlmIChyZW5kZXJOb2RlSW5mby5ub2RlLnR5cGUgIT09IE5vZGVUeXBlLk1FVEEgJiYKICAgICAgICAgICAgICAgIHJlbmRlck5vZGVJbmZvLm5vZGUudHlwZSAhPT0gTm9kZVR5cGUuU0VSSUVTKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gQXQgdGhpcyBwb2ludCB3ZSBrbm93IHRoZSByZW5kZXJpbmcgaW5mb3JtYXRpb24gaXMgYWJvdXQgYSBncm91cCBub2RlLgogICAgICAgICAgICBsZXQgcmVuZGVyR3JvdXBOb2RlSW5mbyA9IHJlbmRlck5vZGVJbmZvOwogICAgICAgICAgICBsZXQgbWV0YWdyYXBoID0gcmVuZGVyR3JvdXBOb2RlSW5mby5ub2RlLm1ldGFncmFwaDsKICAgICAgICAgICAgbGV0IGNvcmVHcmFwaCA9IHJlbmRlckdyb3VwTm9kZUluZm8uY29yZUdyYXBoOwogICAgICAgICAgICBjb25zdCBub2Rlc1RoYXRHb3RDbG9uZWQgPSBbXTsKICAgICAgICAgICAgY29uc3QgZnVuY3Rpb25DYWxsTWV0YW5vZGVzVG9BZGQgPSBbXTsKICAgICAgICAgICAgaWYgKCFsb2Rhc2guaXNFbXB0eSh0aGlzLmhpZXJhcmNoeS5saWJyYXJ5RnVuY3Rpb25zKSkgewogICAgICAgICAgICAgICAgLy8gVGhpcyBncmFwaCBoYXMgbGlicmFyeSBmdW5jdGlvbnMuIEFkZCB0aGVtIHRvIHRoZSBjdXJyZW50CiAgICAgICAgICAgICAgICAvLyBzdWItaGllcmFyY2h5IGlmIG5lY2Vzc2FyeS4KICAgICAgICAgICAgICAgIGxvZGFzaC5lYWNoKG1ldGFncmFwaC5ub2RlcygpLCAoY2hpbGROYW1lKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgLy8gV2h5IGlzIHRoaXMgc28gb2Z0ZW4gdW5kZWZpbmVkPwogICAgICAgICAgICAgICAgICAgIGNvbnN0IG9yaWdpbmFsTm9kZSA9IG1ldGFncmFwaC5ub2RlKGNoaWxkTmFtZSk7CiAgICAgICAgICAgICAgICAgICAgY29uc3QgbGlicmFyeUZ1bmN0aW9uRGF0YSA9IHRoaXMuaGllcmFyY2h5LmxpYnJhcnlGdW5jdGlvbnNbb3JpZ2luYWxOb2RlLm9wXTsKICAgICAgICAgICAgICAgICAgICBpZiAoIWxpYnJhcnlGdW5jdGlvbkRhdGEpIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gVGhpcyBub2RlIGlzIG5vdCBhIGZ1bmN0aW9uIGNhbGwuCiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgaWYgKGNoaWxkTmFtZS5pbmRleE9mKEZVTkNUSU9OX0xJQlJBUllfTk9ERV9QUkVGSVgpID09PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIERvIG5vdCByZXBsYWNlIGxpYnJhcnkgZnVuY3Rpb25zIGluIHRoZSBncmFwaC4gVGhlIGxpYnJhcnkKICAgICAgICA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lR3JhcGguc2V0Tm9kZShjaGlsZE5hbWUsIGNoaWxkUmVuZGVySW5mbyk7CiAgICAgICAgICAgICAgICBpZiAoIWNoaWxkTm9kZS5pc0dyb3VwTm9kZSkgewogICAgICAgICAgICAgICAgICAgIGxvZGFzaC5lYWNoKGNoaWxkTm9kZS5pbkVtYmVkZGluZ3MsIChlbWJlZGRpbmcpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJlbmRlck1ldGFlZGdlSW5mbyA9IG5ldyBSZW5kZXJNZXRhZWRnZUluZm8obnVsbCk7CiAgICAgICAgICAgICAgICAgICAgICAgIGxldCByZW5kZXJOb2RlSW5mbyA9IG5ldyBSZW5kZXJOb2RlSW5mbyhlbWJlZGRpbmcpOwogICAgICAgICAgICAgICAgICAgICAgICBhZGRJbkFubm90YXRpb24oY2hpbGRSZW5kZXJJbmZvLCBlbWJlZGRpbmcsIHJlbmRlck5vZGVJbmZvLCByZW5kZXJNZXRhZWRnZUluZm8sIEFubm90YXRpb25UeXBlLkNPTlNUQU5UKTsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5pbmRleFtlbWJlZGRpbmcubmFtZV0gPSByZW5kZXJOb2RlSW5mbzsKICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgICAgICBsb2Rhc2guZWFjaChjaGlsZE5vZGUub3V0RW1iZWRkaW5ncywgKGVtYmVkZGluZykgPT4gewogICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVuZGVyTWV0YWVkZ2VJbmZvID0gbmV3IFJlbmRlck1ldGFlZGdlSW5mbyhudWxsKTsKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJlbmRlck5vZGVJbmZvID0gbmV3IFJlbmRlck5vZGVJbmZvKGVtYmVkZGluZyk7CiAgICAgICAgICAgICAgICAgICAgICAgIGFkZE91dEFubm90YXRpb24oY2hpbGRSZW5kZXJJbmZvLCBlbWJlZGRpbmcsIHJlbmRlck5vZGVJbmZvLCByZW5kZXJNZXRhZWRnZUluZm8sIEFubm90YXRpb25UeXBlLlNVTU1BUlkpOwogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmluZGV4W2VtYmVkZGluZy5uYW1lXSA9IHJlbmRlck5vZGVJbmZvOwogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICAgICAgLy8gQWRkIHJlbmRlciBtZXRhZWRnZSBpbmZvIGZvciBlZGdlcyBpbiB0aGUgbWV0YWdyYXBoLgogICAgICAgICAgICBsb2Rhc2guZWFjaChtZXRhZ3JhcGguZWRnZXMoKSwgKGVkZ2VPYmopID0+IHsKICAgICAgICAgICAgICAgIGxldCBtZXRhZWRnZSA9IG1ldGFncmFwaC5lZGdlKGVkZ2VPYmopOwogICAgICAgICAgICAgICAgbGV0IHJlbmRlck1ldGFlZGdlSW5mbyA9IG5ldyBSZW5kZXJNZXRhZWRnZUluZm8obWV0YWVkZ2UpOwogICAgICAgICAgICAgICAgcmVuZGVyTWV0YWVkZ2VJbmZvLmlzRmFkZWRPdXQgPQogICAgICAgICAgICAgICAgICAgIHRoaXMuaW5kZXhbZWRnZU9iai52XS5pc0ZhZGVkT3V0IHx8IHRoaXMuaW5kZXhbZWRnZU9iai53XS5pc0ZhZGVkT3V0OwogICAgICAgICAgICAgICAgY29yZUdyYXBoLnNldEVkZ2UoZWRnZU9iai52LCBlZGdlT2JqLncsIHJlbmRlck1ldGFlZGdlSW5mbyk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBpZiAoCiAgICAgICAgICAgICAgICByZW5kZXJHcm91cE5vZGVJbmZvLm5vZGUudHlwZSA9PT0gTm9kZVR5cGUuTUVUQSkgewogICAgICAgICAgICAgICAgZXh0cmFjdEhpZ2hEZWdyZWVzKHJlbmRlckdyb3VwTm9kZUluZm8pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIElmIHRoZXJlIGFyZSBmdW5jdGlvbnMsIGl0IGlzIHBvc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VwTm9kZUluZm8ubGlicmFyeUZ1bmN0aW9uc0V4dHJhY3QucHVzaChjaGlsZFJlbmRlckluZm8pOwogICAgICAgICAgICAgICAgICAgIC8vIERvIG5vdCByZW5kZXIgZnVuY3Rpb24gZGVmaW5pdGlvbnMgaW4gdGhlIGNvcmUgZ3JhcGguCiAgICAgICAgICAgICAgICAgICAgY2hpbGRSZW5kZXJJbmZvLm5vZGUuaW5jbHVkZSA9IEluY2x1c2lvblR5cGUuRVhDTFVERTsKICAgICAgICAgICAgICAgICAgICBjb3JlR3JhcGgucmVtb3ZlTm9kZShub2RlLm5hbWUpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gTG9vayB1cCB0aGUgcGFyZW50IG5vZGUncyByZW5kZXIgaW5mb3JtYXRpb24gYW5kIHNob3J0IGNpcmN1aXQgaWYgbm9uZS4KICAgICAgICAgICAgbGV0IHBhcmVudE5vZGUgPSByZW5kZXJHcm91cE5vZGVJbmZvLm5vZGUucGFyZW50Tm9kZTsKICAgICAgICAgICAgaWYgKCFwYXJlbnROb2RlKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgbGV0IHBhcmVudE5vZGVJbmZvID0gdGhpcy5pbmRleFtwYXJlbnROb2RlLm5hbWVdOwogICAgICAgICAgICAvLyBVdGlsaXR5IGZ1bmN0aW9uIGZvciBjb21wdXRpbmcgdGhlIG5hbWUgb2YgYSBicmlkZ2Ugbm9kZS4KICAgICAgICAgICAgbGV0IGdldEJyaWRnZU5vZGVOYW1lID0gKGluYm91bmQsIC4uLnJlc3QpID0+IHJlc3QuY29uY2F0KFtpbmJvdW5kID8gJ0lOJyA6ICdPVVQnXSkuam9pbignfn4nKTsKICAgICAgICAgICAgLy8gQnVpbGQgb3V0IHRoZSBicmlkZ2VncmFwaC4KICAgICAgICAgICAgbGV0IGJyaWRnZWdyYXBoID0gdGhpcy5oaWVyYXJjaHkuZ2V0QnJpZGdlZ3JhcGgobm9kZU5hbWUpOwogICAgICAgICAgICAvLyBMb29rIGZvciBwb3B1bGFyIG5vZGVzIHNvIHdlIGNhbiBtYWtlIGFubm90YXRpb25zIGluc3RlYWQgb2YgcGF0aHMuCiAgICAgICAgICAgIGxldCBvdGhlckNvdW50cyA9IHsKICAgICAgICAgICAgICAgIC8vIENvdW50cyBvZiBlZGdlcyBjb21pbmcgSU5UTyBvdGhlciBub2RlcyBieSBuYW1lIChvdXRnb2luZyBmcm9tIHNlbGYpLgogICAgICAgICAgICAgICAgaW46IHt9LAogICAgICAgICAgICAgICAgLy8gQ291bnRzIG9mIGVkZ2VzIGdvaW5nIE9VVCBmcm9tIG90aGVyIG5vZGVzIGJ5IG5hbWUgKGNvbWluZyBpbnRvIHNlbGYpLgogICAgICAgICAgICAgICAgb3V0OiB7fSwKICAgICAgICAgICAgICAgIC8vIENvdW50cyBvZiBhbGwgY29udHJvbCBlZGdlcyBpbnZvbHZpbmcgb3RoZXIgbm9kZXMgYnkgbmFtZS4KICAgICAgICAgICAgICAgIGNvbnRyb2w6IHt9LAogICAgICAgICAgICB9OwogICAgICAgICAgICBsb2Rhc2guZWFjaChicmlkZ2VncmFwaC5lZGdlcygpLCAoZSkgPT4gewogICAgICAgICAgICAgICAgLy8gQW4gZWRnZSBpcyBpbmJvdW5kIGlmIGl0cyBkZXN0aW5hdGlvbiBub2RlIGlzIGluIHRoZSBtZXRhZ3JhcGguCiAgICAgICAgICAgICAgICBsZXQgaW5ib3VuZCA9ICEhbWV0YWdyYXBoLm5vZGUoZS53KTsKICAgICAgICAgICAgICAgIGxldCBvdGhlck5hbWUgPSBpbmJvdW5kID8gZS52IDogZS53OwogICAgICAgICAgICAgICAgbGV0IG1ldGFlZGdlID0gYnJpZGdlZ3JhcGguZWRnZShlKTsKICAgICAgICAgICAgICAgIGlmICghbWV0YWVkZ2UubnVtUmVndWxhckVkZ2VzKSB7CiAgICAgICAgICAgICAgICAgICAgb3RoZXJDb3VudHMuY29udHJvbFtvdGhlck5hbWVdID0KICAgICAgICAgICAgICAgICAgICAgICAgKG90aGVyQ291bnRzLmNvbnRyb2xbb3RoZXJOYW1lXSB8fCAwKSArIDE7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmIChpbmJvdW5kKSB7CiAgICAgICAgICAgICAgICAgICAgb3RoZXJDb3VudHMub3V0W290aGVyTmFtZV0gPSAob3RoZXJDb3VudHMub3V0W290aGVyTmFtZV0gfHwgMCkgKyAxOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgb3RoZXJDb3VudHMuaW5bb3RoZXJOYW1lXSA9IChvdGhlckNvdW50cy5pbltvdGhlck5hbWVdIHx8IDApICsgMTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIC8vIEFkZCBhbm5vdGF0aW9ucyBhbmQgZWRnZXMgZm9yIGJyaWRnZWdyYXBoIHJlbGF0aW9uc2hpcHMuCiAgICAgICAgICAgIGxldCBoaWVyYXJjaHlOb2RlTWFwID0gdGhpcy5oaWVyYXJjaHkuZ2V0Tm9kZU1hcCgpOwogICAgICAgICAgICBsb2Rhc2guZWFjaChicmlkZ2VncmFwaC5lZGdlcygpLCAoYnJpZGdlRWRnZU9iaikgPT4gewogICAgICAgICAgICAgICAgbGV0IGJyaWRnZU1ldGFlZGdlID0gYnJpZGdlZ3JhcGguZWRnZShicmlkZ2VFZGdlT2JqKTsKICAgICAgICAgICAgICAgIC8vIERldGVybWluZSB3aGV0aGVyIHRoaXMgYnJpZGdlIGVkZ2UgaXMgaW5jb21pbmcgYnkgY2hlY2tpbmcgdGhlCiAgICAgICAgICAgICAgICAvLyBtZXRhZ3JhcGggZm9yIGEgbm9kZSB0aGF0IG1hdGNoZXMgdGhlIGRlc3RpbmF0aW9uIGVuZC4KICAgICAgICAgICAgICAgIGxldCBpbmJvdW5kID0gISFtZXRhZ3JhcGgubm9kZShicmlkZ2VFZGdlT2JqLncpOwogICAgICAgICAgICAgICAgLy8gQmFzZWQgb24gdGhlIGRpcmVjdGlvbiBvZiB0aGUgZWRnZSwgb25lIGVuZHBvaW50IHdpbGwgYmUgYW4gaW1tZWRpYXRlCiAgICAgICAgICAgICAgICAvLyBjaGlsZCBvZiB0aGlzIHJlbmRlck5vZGVJbmZvLCBhbmQgdGhlIG90aGVyIGVuZHBvaW50IHdpbGwgYmUgYSBzaWJsaW5nCiAgICAgICAgICAgICAgICAvLyBvZiB0aGUgcGFyZW50IChvciBhbiBhbmNlc3RvciBmdXJ0aGVyIHVwKS4KICAgICAgICAgICAgICAgIGxldCBbY2hpbGROYW1lLCBvdGhlck5hbWVdID0gaW5ib3VuZAogICAgICAgICAgICAgICAgICAgID8gW2JyaWRnZUVkZ2VPYmoudywgYnJpZGdlRWRnZU9iai52XQogICAgICAgICAgICAgICAgICAgIDogW2JyaWRnZUVkZ2VPYmoudiwgYnJpZGdlRWRnZU9iai53XTsKICAgICAgICAgICAgICAgIGxldCBjaGlsZFJlbmRlckluZm8gPSB0aGlzLmluZGV4W2NoaWxkTmFtZV07CiAgICAgICAgICAgICAgICBsZXQgb3RoZXJSZW5kZXJJbmZvID0gdGhpcy5pbmRleFtvdGhlck5hbWVdOwogICAgICAgICAgICAgICAgbGV0IG90aGVyTm9kZSA9IG90aGVyUmVuZGVySW5mbwogICAgICAgICAgICAgICAgICAgID8gb3RoZXJSZW5kZXJJbmZvLm5vZGUKICAgICAgICAgICAgICAgICAgICA6IGhpZXJhcmNoeU5vZGVNYXBbb3RoZXJOYW1lXTsKICAgICAgICAgICAgICAgIC8vIERldGVybWluZSB3aGV0aGVyIHRoaXMgZWRnZSBpcyBhIGNvbnRyb2wgZWRnZSBiZXR3ZWVuIG5vZGVzIHdoZXJlCiAgICAgICAgICAgICAgICAvLyBlaXRoZXIgbm9kZSBpcyBoaWdoLWRlZ3JlZSB3aXRoIHJlc3BlY3QgdG8gY29udHJvbCBlZGdlcy4gVGhpcyB3aWxsCiAgICAgICAgICAgICAgICAvLyBiZSBhIHNpZ25hbCB0byBzaG93IGl0IGFzIGFuIGFubm90YXRpb24gaW5zdGVhZCBvZiBhIGJyaWRnZSBlZGdlLgogICAgICAgICAgICAgICAgbGV0IGlzSGlnaERlZ3JlZUNvbnRyb2xFZGdlID0gIWJyaWRnZU1ldGFlZGdlLm51bVJlZ3VsYXJFZGdlcyAmJgogICAgICAgICAgICAgICAgICAgIG90aGVyQ291bnRzLmNvbnRyb2xbb3RoZXJOYW1lXSA+IFBBUkFNUy5tYXhDb250cm9sRGVncmVlOwogICAgICAgICAgICAgICAgbGV0IFssIGNoaWxkQW5ub3RhdGlvbnNdID0gaW5ib3VuZAogICAgICAgICAgICAgICAgICAgID8gW3JlbmRlck5vZGVJbmZvLmluQW5ub3RhdGlvbnMsIGNoaWxkUmVuZGVySW5mby5pbkFubm90YXRpb25zXQogICAgICAgICAgICAgICAgICAgIDogW3JlbmRlck5vZGVJbmZvLm91dEFubm90YXRpb25zLCBjaGlsZFJlbmRlckluZm8ub3V0QW5ub3RhdGlvbnNdOwogICAgICAgICAgICAgICAgLy8gRG9uJ3QgcmVuZGVyIGEgYnJpZGdlIHBhdGggaWYgdGhlIG90aGVyIG5vZGUgaGFzIGluIG9yIG91dCBkZWdyZWUgYWJvdmUKICAgICAgICAgICAgICAgIC8vIGEgdGhyZXNob2xkLCBsZXN0IGJyaWRnZSBwYXRocyBlbWFuYXRpbmcgb3V0IG9mIGEgbWV0YWdyYXBoIGNyb3dkIHVwLAogICAgICAgICAgICAgICAgLy8gYXMgd2FzIHRoZSBjYXNlIGZvciB0aGUgRmF0Y2F0IExTVE0gbHN0bV8xID4gbHN0bV8xIG1ldGFncmFwaC4KICAgICAgICAgICAgICAgIGxldCBvdGhlckRlZ3JlZUNvdW50ID0gKGluYm91bmQgPyBvdGhlckNvdW50cy5vdXQgOiBvdGhlckNvdW50cy5pbilbb3RoZXJOYW1lXTsKICAgICAg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bGV0IGNhbkRyYXdCcmlkZ2VQYXRoID0gZmFsc2U7CiAgICAgICAgICAgICAgICBpZiAoCiAgICAgICAgICAgICAgICAgICAgIWlzT3RoZXJIaWdoRGVncmVlICYmCiAgICAgICAgICAgICAgICAgICAgIWlzSGlnaERlZ3JlZUNvbnRyb2xFZGdlICYmCiAgICAgICAgICAgICAgICAgICAgY2hpbGRSZW5kZXJJbmZvLmlzSW5Db3JlKCkpIHsKICAgICAgICAgICAgICAgICAgICAvLyBVdGlsaXR5IGZ1bmN0aW9uIGZvciBmaW5kaW5nIGFuIGFkam9pbmluZyBtZXRhZWRnZS4KICAgICAgICAgICAgICAgICAgICBsZXQgZmluZEFkam9pbmluZ01ldGFlZGdlID0gKHRhcmdldE5hbWUpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGFkam9pbmluZ0VkZ2VPYmogPSBpbmJvdW5kCiAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IHsgdjogdGFyZ2V0TmFtZSwgdzogbm9kZU5hbWUgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgOiB7IHY6IG5vZGVOYW1lLCB3OiB0YXJnZXROYW1lIH07CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAocGFyZW50Tm9kZUluZm8uY29yZUdyYXBoLmVkZ2UoYWRqb2luaW5nRWRnZU9iaikpOwogICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICAgICAgYWRqb2luaW5nTWV0YWVkZ2UgPSBmaW5kQWRqb2luaW5nTWV0YWVkZ2Uob3RoZXJOYW1lKTsKICAgICAgICAgICAgICAgICAgICBpZiAoIWFkam9pbmluZ01ldGFlZGdlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGFkam9pbmluZ01ldGFlZGdlID0gZmluZEFkam9pbmluZ01ldGFlZGdlKGdldEJyaWRnZU5vZGVOYW1lKGluYm91bmQsIG90aGVyTmFtZSwgcGFyZW50Tm9kZS5uYW1lKSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGNhbkRyYXdCcmlkZ2VQYXRoID0gISFhZGpvaW5pbmdNZXRhZWRnZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vIEFsdGhvdWdoIGRhdGFmbG93IGVkZ2VzIGFyZSBhY3ljbGljLCBjb250cm9sIGRlcGVuZGVuY3kgZWRnZXMgbWF5CiAgICAgICAgICAgICAgICAvLyBhY3R1YWxseSBwb2ludCAnYmFja3dhcmRzJyBpbiB0aGUgZ3JhcGguIElmIHRoaXMgYnJpZGdlTWV0YWVkZ2UgaXMKICAgICAgICAgICAgICAgIC8vIGEgY29udHJvbCBkZXBlbmRlbmN5LCB3ZSBuZWVkIHRvIGRldGVybWluZSB3aGV0aGVyIGl0J3MgYmFja3dhcmRzCiAgICAgICAgICAgICAgICAvLyBwb2ludGluZyBzbyB0aGF0IHdlIHJlbmRlciBpdCBhcHByb3ByaWF0ZWx5LgogICAgICAgICAgICAgICAgLy8KICAgICAgICAgICAgICAgIC8vIEZvciBpbnN0YW5jZSwgc2F5IHdlJ3JlIHJlbmRlcmluZyBhIGdyYXBoIHdpdGggbm9kZXMgbmFtZWQgQS9CIGFuZCBaL1ksCiAgICAgICAgICAgICAgICAvLyBhbmQgd2UncmUgY3VycmVudGx5IHJlbmRlcmluZyB0aGUgYnJpZGdlZ3JhcGggZm9yIEEuIEZ1cnRoZXIsIGxldCdzIHNheQogICAgICAgICAgICAgICAgLy8gdGhhdCB0aGVyZSB3YXMgYW4gb3JpZ2luYWwgQmFzZUVkZ2UgZnJvbSBBL0ItPlovWSBhbmQgYSBDT05UUk9MIEVER0UKICAgICAgICAgICAgICAgIC8vIGZyb20gWi9ZPT5BL0IuCiAgICAgICAgICAgICAgICAvLwogICAgICAgICAgICAgICAgLy8gICAgICstLS0tLS0tLS0tLS0tLS0tKwogICAgICAgICAgICAgICAgLy8gICAgIHwgQSAgICAgICAgICAgICAgfAogICAgICAgICAgICAgICAgLy8gICAgIHwgICstLS0tLSsgICAgICAgfCAgICAgICAgICstLS0tLS0rCiAgICAgICAgICAgICAgICAvLyAgICAgfCAgfCBCICAgfD4tLS0tLT58Pi0tLS0tLS0+fCBaICAgIHwKICAgICAgICAgICAgICAgIC8vICAgICB8ICB8ICAgICB8ICAgICAgIHwgICAgICAgICB8ICAgICAgfAogICAgICAgICAgICAgICAgLy8gICAgIHwgIHwgICAgIHwgICAqICAgfCAgICAgICAgIHwgICAgICB8CiAgICAgICAgICAgICAgICAvLyAgICAgfCAgfCAgICAgfDw9PT09PTx8PD09PT09PT08fCAgICAgIHwKICAgICAgICAgICAgICAgIC8vICAgICB8ICArLS0tLS0rICAgICAgIHwgICAgICAgICArLS0tLS0tKwogICAgICAgICAgICAgICAgLy8gICAgICstLS0tLS0tLS0tLS0tLS0tKwogICAgICAgICAgICAgICAgLy8KICAgICAgICAgICAgICAgIC8vIFdoZW4gd2UgcmVuZGVyIHRoZSBzdWJoaWVyYXJjaHkgZm9yIE1ldGFub2RlIEEsIHdlJ2xsIGNvbWUgYWNyb3NzIGEKICAgICAgICAgICAgICAgIC8vIGNvbnRyb2wtb25seSBNZXRhZWRnZSBpbiB0aGUgYnJpZGdlZ3JhcGggZnJvbSBaPT5BL0IgKCopLiBUaGUgcXVlc3Rpb24KICAgICAgICAgICAgICAgIC8vIGlzIHdoZXRoZXIgdGhpcyBlZGdlIGlzIGJhY2t3YXJkcy4KICAgICAgICAgICAgICAgIC8vCiAgICAgICAgICAgICAgICAvLyBUbyBhbnN3ZXIgdGhhdCBxdWVzdGlvbiwgd2UgZm9sbG93IHRoZSBjaGFpbiBvZiBhZGpvaW5pbmcgbWV0YWVkZ2VzCiAgICAgICAgICAgICAgICAvLyB1bnRpbCB3ZSByZWFjaCB0aGUgdG9wbW9zdCBvbmUuIEluIHRoaXMgY2FzZSwgdGhhdCdzIHRoZSBjb250cm9sLW9ubHkKICAgICAgICAgICAgICAgIC8vIE1ldGFlZGdlIFo9PkEgaW4gdGhlI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ncmFwaCBtdXN0IGNvbnRhaW4gdGhlIGFzc29jaWF0ZWQgbWV0YWVkZ2UuCiAgICAgICAgICAgICAgICAgICAgbGV0IHRvcEFkam9pbmluZ01ldGFlZGdlID0gYWRqb2luaW5nTWV0YWVkZ2U7CiAgICAgICAgICAgICAgICAgICAgbGV0IHRvcEdyb3VwTm9kZSA9IHBhcmVudE5vZGVJbmZvLm5vZGU7CiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKHRvcEFkam9pbmluZ01ldGFlZGdlLmFkam9pbmluZ01ldGFlZGdlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRvcEFkam9pbmluZ01ldGFlZGdlID0gdG9wQWRqb2luaW5nTWV0YWVkZ2UuYWRqb2luaW5nTWV0YWVkZ2U7CiAgICAgICAgICAgICAgICAgICAgICAgIHRvcEdyb3VwTm9kZSA9IHRvcEdyb3VwTm9kZS5wYXJlbnROb2RlOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAvLyBDaGVjayBhZ2FpbnN0IHRoZSB0b3BvbG9naWNhbCBvcmRlcmluZyBmb3IgdGhlIHRvcCBub2RlLiBUaGUgY3VycmVudAogICAgICAgICAgICAgICAgICAgIC8vIGJyaWRnZSBtZXRhZWRnZSB3ZSdyZSBldmFsdWF0aW5nIGlzIGJhY2t3YXJkcyBpZiBpdHMgc291cmNlIGNvbWVzCiAgICAgICAgICAgICAgICAgICAgLy8gYWZ0ZXIgaXRzIGRlc3RpbmF0aW9uLgogICAgICAgICAgICAgICAgICAgIGxldCBvcmRlcmluZyA9IHRoaXMuaGllcmFyY2h5LmdldFRvcG9sb2dpY2FsT3JkZXJpbmcodG9wR3JvdXBOb2RlLm5hbWUpOwogICAgICAgICAgICAgICAgICAgIGxldCBlID0gdG9wQWRqb2luaW5nTWV0YWVkZ2UubWV0YWVkZ2U7CiAgICAgICAgICAgICAgICAgICAgYmFja3dhcmRzID0gb3JkZXJpbmdbZS52XSA+IG9yZGVyaW5nW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gb3RoZXJOYW1lLCBub2RlTmFtZSk7CiAgICAgICAgICAgICAgICBsZXQgYnJpZGdlTm9kZVJlbmRlckluZm8gPSBjb3JlR3JhcGgubm9kZShicmlkZ2VOb2RlTmFtZSk7CiAgICAgICAgICAgICAgICBpZiAoIWJyaWRnZU5vZGVSZW5kZXJJbmZvKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gRmluZCBvciBjcmVhdGUgdGhlIGRpcmVjdGlvbmFsIGNvbnRhaW5lciBmb3IgdGhlIGJyaWRnZSBub2RlLgogICAgICAgICAgICAgICAgICAgIGxldCBicmlkZ2VDb250YWluZXJJbmZvID0gY29yZUdyYXBoLm5vZGUoYnJpZGdlQ29udGFpbmVyTmFtZSk7CiAgICAgICAgICAgICAgICAgICAgaWYgKCFicmlkZ2VDb250YWluZXJJbmZvKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBicmlkZ2VDb250YWluZXJOb2RlID0gewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gSW1wb3J0YW50IG5vZGUgcHJvcGVydGllcy4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IGJyaWRnZUNvbnRhaW5lck5hbWUsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBOb2RlVHlwZS5CUklER0UsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBVbnVzZWQgbm9kZSBwcm9wZXJ0aWVzLgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaXNHcm91cE5vZGU6IGZhbHNlLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FyZGluYWxpdHk6IDAsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJlbnROb2RlOiBudWxsLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdHM6IG51bGwsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmNsdWRlOiBJbmNsdXNpb25UeXBlLlVOU1BFQ0lGSUVELAogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQnJpZGdlTm9kZSBwcm9wZXJ0aWVzLgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5ib3VuZDogaW5ib3VuZCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vZGVBdHRyaWJ1dGVzOiB7fSwKICAgICAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgICAgICAgICAgYnJpZGdlQ29udGFpbmVySW5mbyA9IG5ldyBSZW5kZXJOb2RlSW5mbyhicmlkZ2VDb250YWluZXJOb2RlKTsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5pbmRleFticmlkZ2VDb250YWluZXJOYW1lXSA9IGJyaWRnZUNvbnRhaW5lckluZm87CiAgICAgICAgICAgICAgICAgICAgICAgIGNvcmVHcmFwaC5zZXROb2RlKGJyaWRnZUNvbnRhaW5lck5hbWUsIGJyaWRnZUNvbnRhaW5lckluZm8pOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBsZXQgYnJpZGdlTm9kZSA9IHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gSW1wb3J0YW50IG5vZGUgcHJvcGVydGllcy4KICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTogYnJpZGdlTm9kZU5hbWUsCiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IE5vZGVUeXBlLkJSSURHRSwKICAgICAgICAgICAgICAgICAgICAgICAgLy8gVW5pbXBvcnRhbnQgbm9kZSBwcm9wZXJ0aWVzLgogICAgICAgICAgICAgICAgICAgICAgICBpc0dyb3VwTm9kZTogZmFsc2UsCiAgICAgICAgICAgICAgICAgICAgICAgIGNhcmRpbmFsaXR5OiAxLAogICAgICAgICAgICAgICAgICAgICAgICBwYXJlbnROb2RlOiBudWxsLAogICAgICAgICAgICAgICAgICAgICAgICBzdGF0czogbnVsbCwKICAgICAgICAgICAgICAgICAgICAgICAgaW5jbHVkZTogSW5jbHVzaW9uVHlwZS5VTlNQRUNJRklFRCwKICAgICAgICAgICAgICAgICAgICAgICAgLy8gQnJpZGdlTm9kZSBwcm9wZXJ0aWVzLgogICAgICAgICAgICAgICAgICAgICAgICBpbmJvdW5kOiBpbmJvdW5kLAogICAgICAgICAgICAgICAgICAgICAgICBub2RlQXR0cmlidXRlczoge30sCiAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgICAgICBicmlkZ2VOb2RlUmVuZGVySW5mbyA9IG5ldyBSZW5kZXJOb2RlSW5mbyhicmlkZ2VOb2RlKTsKICAgICAgICAgICAgICAgICAgICB0aGlzLmluZGV4W2JyaWRnZU5vZGVOYW1lXSA9IGJyaWRnZU5vZGVSZW5kZXJJbmZvOwogICAgICAgICAgICAgICAgICAgIGNvcmVHcmFwaC5zZXROb2RlKGJyaWRnZU5vZGVOYW1lLCBicmlkZ2VOb2RlUmVuZGVySW5mbyk7CiAgICAgICAgICAgICAgICAgICAgLy8gU2V0IGJyaWRnZU5vZGUgdG8gYmUgYSBncmFwaGxpYiBjaGlsZCBvZiB0aGUgY29udGFpbmVyIG5vZGUuCiAgICAgICAgICAgICAgICAgICAgY29yZUdyYXBoLnNldFBhcmVudChicmlkZ2VOb2RlTmFtZSwgYnJpZGdlQ29udGFpbmVyTmFtZSk7CiAgICAgICAgICAgICAgICAgICAgYnJpZGdlQ29udGFpbmVySW5mby5ub2RlLmNhcmRpbmFsaXR5Kys7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvLyBDcmVhdGUgYW5kIGFkZCBhIGJyaWRnZSByZW5kZXIgbWV0YWVkZ2UuCiAgICAgICAgICAgICAgICBsZXQgYnJpZGdlUmVuZGVyTWV0YWVkZ2UgPSBuZXcgUmVuZGVyTWV0YWVkZ2VJbmZvKGJyaWRnZU1ldGFlZGdlKTsKICAgICAgICAgICAgICAgIGJyaWRnZVJlbmRlck1ldGFlZGdlLmFkam9pbmluZ01ldGFlZGdlID0gYWRqb2luaW5nTWV0YWVkZ2U7CiAgICAgICAgICAgIC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AgICAvLyBpbmNvbWluZyBicmlkZ2Ugbm9kZXMuIFdlJ3ZlIGFsc28gYWRkZWQgYSBicmlkZ2Ugbm9kZSBaJyAod2l0aCBwYXJlbnQgSU4pCiAgICAgICAgICAgIC8vIHRvIEEsIGFuZCBhIGJyaWRnZSBlZGdlIGZyb20gWictPkMuCiAgICAgICAgICAgIC8vCiAgICAgICAgICAgIC8vICAgICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKICAgICAgICAgICAgLy8gICAgIHwgQSAgICAgICAgICArLS0tKyAgICAgfAogICAgICAgICAgICAvLyAgICAgfCAgICArLS0tLS0tPnwgQyB8ICAgICB8CiAgICAgICAgICAgIC8vICAgICB8ICAgIHwgICAgICAgKy0tLSsgICAgIHwKICAgICAgICAgICAgLy8gICAgIHwgICAgfCAgICAgICAgIF4gICAgICAgfAogICAgICAgICAgICAvLyAgICAgfCAgICB8ICAgICAgICAgfCAgICAgICB8CiAgICAgICAgICAgIC8vICAgICB8ICAgIHwgICAgKy0tLS18LS0tLSsgIHwKICAgICAgICAgICAgLy8gICAgIHwgICAgfCAgICB8IElOIHwgICAgfCAgfAogICAgICAgICAgICAvLyAgICAgfCAgKy0tLSsgIHwgICstLS0rICB8ICB8CiAgICAgICAgICAgIC8vICAgICB8ICB8IEIgfCAgfCAgfCBaJ3wgIHwgIHwKICAgICAgICAgICAgLy8gICAgIHwgICstLS0rICB8ICArLS0tKyAgfCAgfAogICAgICAgICAgICAvLyAgICAgfCAgICAgICAgICstLS0tLS0tLS0rICB8CiAgICAgICAgICAgIC8vICAgICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKICAgICAgICAgICAgLy8KICAgICAgICAgICAgLy8gV2l0aCBubyBvdGhlciBoZWxwLCBkYWdyZSB3b3VsZCBsYXkgb3V0IEIgYW5kIFonIG9uIHRoZSBzYW1lIGxldmVsLAogICAgICAgICAgICAvLyBiZWNhdXNlIGJvdGggb2YgdGhlbSBoYXZlIG5vIGluY29taW5nIGVkZ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LS0tKyAgICBeICAgICAgIHwKICAgICAgICAgICAgLy8gICAgIHwgICAgIHwgQiB8ICAgIHwgICAgICAgfAogICAgICAgICAgICAvLyAgICAgfCAgICAgKy0tLSsgICAgfCAgICAgICB8CiAgICAgICAgICAgIC8vICAgICB8ICAgICAgIF4gICAgICB8ICAgICAgIHwKICAgICAgICAgICAgLy8gICAgIHwgICAgICAgfCAgICAgIHwgICAgICAgfAogICAgICAgICAgICAvLyAgICAgfCAgKy0tLS18LS0tLS0tfC0tLS0rICB8CiAgICAgICAgICAgIC8vICAgICB8ICB8SU4gIHwgICAgICB8ICAgIHwgIHwKICAgICAgICAgICAgLy8gICAgIHwgIHwgICstLS0rICArLS0tKyAgfCAgfAogICAgICAgICAgICAvLyAgICAgfCAgfCAgfCBTIHwgIHwgWid8ICB8ICB8CiAgICAgICAgICAgIC8vICAgICB8ICB8ICArLS0tKyAgKy0tLSsgIHwgIHwKICAgICAgICAgICAgLy8gICAgIHwgICstLS0tLS0tLS0tLS0tLS0tKyAgfAogICAgICAgICAgICAvLyAgICAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCiAgICAgICAgICAgIC8vCiAgICAgICAgICAgIC8vIFRoaXMgZW5zdXJlcyB0aGF0IGRhZ3JlIHdpbGwgbGF5IG91dCB0aGUgYnJpZGdlIGNvbnRhaW5lcnMgc3RyaWN0bHkgYXQKICAgICAgICAgICAgLy8gdGhlIGVuZHMgb2YgdGhlIGdyYXBoLiBUaGUgc3RydWN0dXJhbCBlZGdlcyB3aWxsIG5ldmVyIGJlIHNlZW4gaW4gdGhlCiAgICAgICAgICAgIC8vIHZpc3VhbGl6YXRpb24gZXhjZXB0IGFzIGEgZGVidWdnaW5nIGFpZC4KICAgICAgICAgICAgbG9kYXNoLmVhY2goW3RydWUsIGZhbHNlXSwgKGluYm91bmQpID0+IHsKICAgICAgICAgICAgICAgIGxldCBicmlkZ2VDb250YWluZXJOYW1lID0gZ2V0QnJpZGdlTm9kZU5hbWUoaW5ib3VuZCwgbm9kZU5hbWUpOwogICAgICAgICAgICAgICAgbGV0IGJyaWRnZUNvbnRhaW5lckluZm8gPSBjb3JlR3JhcGgubm9kZShicmlkZ2VDb250YWluZXJOYW1lKTsKICAgICAgICAgICAgICAgIGlmICghYnJpZGdlQ29udGFpbmVySW5mbykgewogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGxvZGFzaC5lYWNoKGNvcmVHcmFwaC5ub2RlcygpLCAoY2hpbGROYW1lKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgLy8gU2hvcnQtY2lyY3VpdCBpZiB0aGlzIGNoaWxkIGlzIGEgYnJpZGdlIG5vZGUgb3IgaXQncyBub3QgYSB0ZXJtaW5hbAogICAgICAgICAgICAgICAgICAgIC8vIG5vZGUgaW4gdGhlIGRpcmVjdGlvbiB3ZSdyZSBpbnRlcmVzdGVkIGluLgogICAgICAgICAgICAgICAgICAgIGxldCBjaGlsZE5vZGVJbmZvID0gY29yZUdyYXBoLm5vZGUoY2hpbGROYW1lKTsKICAgICAgICAgICAgICAgICAgICBpZiAoY2hpbGROb2RlSW5mby5ub2RlLnR5cGUgPT09IE5vZGVUeXBlLkJSSURHRSkgewogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGxldCBpc1Rlcm1pbmFsID0gaW5ib3VuZAogICAgICAgICAgICAgICAgICAgICAgICA/ICFjb3JlR3JhcGgucHJlZGVjZXNzb3JzKGNoaWxkTmFtZSkubGVuZ3RoCiAgICAgICAgICAgICAgICAgICAgICAgIDogIWNvcmVHcmFwaC5zdWNjZXNzb3JzKGNoaWxkTmFtZSkubGVuZ3RoOwogICAgICAgICAgICAgICAgICAgIGlmICghaXNUZXJtaW5hbCkgewogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIC8vIEZpbmQgb3IgY3JlYXRlIGEgYnJpZGdlIG5vZGUgaW4gdGhlIGNvbnRhaW5lciBmb3IgYWxsIHN0cnVjdHVyYWwKICAgICAgICAgICAgICAgICAgICAvLyBtZXRhZWRnZXMuIEl0IHdvdWxkIGhhdmUgYmVlbiBuaWNlIHRvIHNraXAgdGhpcyBzdGVwIGFuZCBzaW1wbHkKICAgICAgICAgICAgICAgICAgICAvLyBzZXQgYSBtZXRhZWRnZSBiZXR3ZWVuIHRoZSB0ZXJtaW5hbCBub2RlIGFuZCB0aGUgY29udGFpbmVyIG5vZGUsIGJ1dAogICAgICAgICAgICAgICAgICAgIC8vIGluIHRoYXQgY2FzZSwgc29tZXRoaW5nIGFib3V0IHRoZSBncmFwaCB1cHNldHMgZGFncmUubGF5b3V0KCkncwogICAgICAgICAgICAgICAgICAgIC8vIGxvbmdlc3RQYXRoIGFsZ29yaXRobSAod2FzIGdldHRpbmcgZXJyb3JzIGR1ZSB0byBhbiB1bmRlZmluZWQpLgogICAgICAgICAgICAgICAgICAgIGxldCBzdHJ1Y3R1cmFsTm9kZU5hbWUgPSBnZXRCcmlkZ2VOb2RlTmFtZShpbmJvdW5kLCBub2RlTmFtZSwgJ1NUUlVDVFVSQUxfVEFSR0VUJyk7CiAgICAgICAgICAgICAgICAgICAgbGV0IHN0cnVjdHVyYWxSZW5kZXJJbmZvID0gY29yZUdyYXBoLm5vZGUoc3RydWN0dXJhbE5vZGVOYW1lKTsKICAgICAgICAgICAgICAgICAgICBpZiAoIXN0cnVjdHVyYWxSZW5kZXJJbmZvKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBicmlkZ2VOb2RlID0gewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gSW1wb3J0YW50IE5vZGUgcHJvcGVydGllcy4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IHN0cnVjdHVyYWxOb2RlTmFtZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IE5vZGVUeXBlLkJSSURHRSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFVuaW1wb3J0YW50IE5vZGUgcHJvcGVydGllcy4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzR3JvdXBOb2RlOiBmYWxzZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhcmRpbmFsaXR5OiAxLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyZW50Tm9kZTogbnVsbCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRzOiBudWxsLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5jbHVkZTogSW5jbHVzaW9uVHlwZS5VTlNQRUNJRklFRCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEJyaWRnZU5vZGUgcHJvcGVydGllcy4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluYm91bmQ6IGluYm91bmQsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBub2RlQXR0cmlidXRlczoge30sCiAgICAgICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdHVyYWxSZW5kZXJJbmZvID0gbmV3IFJlbmRlck5vZGVJbmZvKGJyaWRnZU5vZGUpOwogICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3R1cmFsUmVuZGVySW5mby5zdHJ1Y3R1cmFsID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5pbmRleFtzdHJ1Y3R1cmFsTm9kZU5hbWVdID0gc3RydWN0dXJhbFJlbmRlckluZm87CiAgICAgICAgICAgICAgICAgICAgICAgIGNvcmVHcmFwaC5zZXROb2RlKHN0cnVjdHVyYWxOb2RlTmFtZSwgc3RydWN0dXJhbFJlbmRlckluZm8pOwogICAgICAgICAgICAgICAgICAgICAgICBicmlkZ2VDb250YWluZXJJbmZvLm5vZGUuY2FyZGluYWxpdHkrKzsKICAgICAgICAgICAgICAgICAgICAgICAg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gICAgICAgIGNvbnN0IG5vZGUgPSB0aGlzLmhpZXJhcmNoeS5ub2RlKGZyb21CZWdpbm5pbmdQYXRoTGlzdC5qb2luKE5BTUVTUEFDRV9ERUxJTSkpOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAobm9kZSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG5vZGUudHlwZSA9PT0gTm9kZVR5cGUuT1AgJiYKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmhpZXJhcmNoeS5saWJyYXJ5RnVuY3Rpb25zW25vZGUub3BdKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaiA9IDE7IGogPCBmcm9tQmVnaW5uaW5nUGF0aExpc3QubGVuZ3RoOyBqKyspIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gRXhwYW5kIGFsbCBoaWVyYXJjaGllcyBpbmNsdWRpbmcgdGhlIHBhcmVudC4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgY3VycmVudE5vZGVOYW1lID0gZnJvbUJlZ2lubmluZ1BhdGhMaXN0CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuc2xpY2UoMCwgaikKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5qb2luKE5BTUVTUEFDRV9ERUxJTSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghY3VycmVudE5vZGVOYW1lKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBCdWlsZCB0aGUgaGllcmFyY2h5IGZvciB0aGlzIGN1cnJlbnQgbGV2ZWwuCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuYnVpbGRTdWJoaWVyYXJjaHkoY3VycmVudE5vZGVOYW1lKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBObyBuZWVkIHRvIGFuYWx5emUgdGhlIG90aGVyIGhpZ2hlciBoaWVyYXJjaGllcy4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQSBjbGFzcyBmb3IgcmVuZGVyaW5nIGFubm90YXRpb24gb2JqZWN0IHdoaWNoIGNvbnRhaW5zIGxhYmVsCiAgICAgKiBhYm91dCB0aGUgbm9kZSBlbWJlZGRlZCBhcyBhbm5vdGF0aW9uLCB0eXBlIG9mIGFubm90YXRpb24gYW5kIHRoZSBsb2NhdGlvbgogICAgICogb2YgYm90aCB0aGUgYW5ub3RhdGlvbidzIG5vZGUgYW5kIGVkZ2UuCiAgICAgKgogICAgICogQW5ub3RhdGlvbiBvYmplY3RzIGluY2x1ZGUgZW1iZWRkZWQgY29uc3RhbnRzLCBlbWJlZGRlZCBzdW1tYXJ5LCBhbmQKICAgICAqIGVkZ2Ugc2hvcnRjdXRzLgogICAgICovCiAgICBjbGFzcyBBbm5vdGF0aW9uIHsKICAgICAgICAvKioKICAgICAgICAgKiBDcmVhdGVzIGEgbmV3IEFubm90YXRpb24uCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gbm9kZSBUaGUgdW5kZXJseWluZyBub2RlIHRoaXMgYW5ub3RhdGlvbiBwb2ludHMgdG8uCiAgICAgICAgICogQHBhcmFtIHJlbmRlck5vZGVJbmZvIFRoZSByZW5kZXIgaW5mb3JtYXRpb24gZm9yIHRoZSB1bmRlcmx5aW5nI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gICAgICAgIHRoaXMud2lkdGggPSAwOwogICAgICAgICAgICB0aGlzLmhlaWdodCA9IDA7CiAgICAgICAgICAgIC8vIFByb3BlcnRpZXMgbmVlZGVkIGZvciBnZW5lcmF0aW5nIGFuIElEIGZvciB0aGUgZWRnZSdzIHBhdGggZWxlbWVudCBpZgogICAgICAgICAgICAvLyB0aGlzIGFubm90YXRpb24gaXMgYXNzb2NpYXRlZCB3aXRoIGEgbWV0YWVkZ2UuCiAgICAgICAgICAgIGlmIChyZW5kZXJNZXRhZWRnZUluZm8gJiYgcmVuZGVyTWV0YWVkZ2VJbmZvLm1ldGFlZGdlKSB7CiAgICAgICAgICAgICAgICB0aGlzLnYgPSByZW5kZXJNZXRhZWRnZUluZm8ubWV0YWVkZ2UudjsKICAgICAgICAgICAgICAgIHRoaXMudyA9IHJlbmRlck1ldGFlZGdlSW5mby5tZXRhZWRnZS53OwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuaXNJbiA9IGlzSW47CiAgICAgICAgICAgIHRoaXMucG9pbnRzID0gW107CiAgICAgICAgfQogICAgfQogICAgdmFyIEFubm90YXRpb25UeXBlOwogICAgKGZ1bmN0aW9uIChBbm5vdGF0aW9uVHlwZSkgewogICAgICAgIEFubm90YXRpb25UeXBlW0Fubm90YXRpb25UeXBlWyJTSE9SVENVVCJdID0gMF0gPSAiU0hPUlRDVVQiOwogICAgICAgIEFubm90YXRpb25UeXBlW0Fubm90YXRpb25UeXBlWyJDT05TVEFOVCJdID0gMV0gPSAiQ09OU1RBTlQiOwogICAgICAgIEFubm90YXRpb25UeXBlW0Fubm90YXRpb25UeXBlWyJTVU1NQVJZIl0gPSAyXSA9ICJTVU1NQVJZIjsKICAgICAgICBBbm5vdGF0aW9uVHlwZVtBbm5vdGF0aW9uVHlwZVsiRUxMSVBTSVMiXSA9IDNdID0gIkVMTElQU0lTIjsKICAgIH0pKEFubm90YXRpb25UeXBlIHx8IChBbm5vdGF0aW9uVHlwZSA9IHt9KSk7CiAgICAvKioKICAgICAqIE1hbmFnZXMgYSBsaXN0IG9mIGFubm90YXRpb25zLiBUd28gd2lsbCBiZSB1c2VkIGZvciBlYWNoCiAgICAgKiBSZW5kZXJOb2RlSW5mbywgb25lIGZvciBpbiBhbm5vdGF0aW9ucyBhbmQgb25lIGZvciBvdXQgYW5ub3RhdGlvbnMuCiAgICAgKi8KICAgIGNsYXNzIEFubm90YXRpb25MaXN0IHsKICAgICAgICBjb25zdHJ1Y3RvcigpIHsKICAgICAgICAgICAgdGhpcy5saXN0ID0gW107CiAgICAgICAgICAgIHRoaXMubm9kZU5hbWVzID0ge307CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEFwcGVuZCBhbiBhbm5vdGF0aW9uIHRvIHRoZSBsaXN0LCBvciBhIHN0YW5kLWluIGVsbGlwc2lzIGFubm90YXRpb24gaW5zdGVhZAogICAgICAgICAqIGlmIHRoaXMgd291bGQgbWFrZSBpdCB0b28gbWFueS4KICAgICAgICAgKi8KICAgICAgICBwdXNoKGFubm90YXRpb24pIHsKICAgICAgICAgICAgaWYgKGFubm90YXRpb24ubm9kZS5uYW1lIGluIHRoaXMubm9kZU5hbWVzKSB7CiAgICAgICAgICAgICAgICByZXR1cm47IC8vIFNraXAgZHVwbGljYXRlIGFubm90YXRpb24uCiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5ub2RlTmFtZXNbYW5ub3RhdGlvbi5ub2RlLm5hbWVdID0gdHJ1ZTsKICAgICAgICAgICAgaWYgKHRoaXMubGlzdC5sZW5ndGggPCBQQVJBTVMubWF4QW5ub3RhdGlvbnMpIHsKICAgICAgICAgICAgICAgIHRoaXMubGlzdC5wdXNoKGFubm90YXRpb24pOwogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGxldCBsYXN0QW5ub3RhdGlvbiA9IHRoaXMubGlzdFt0aGlzLmxpc3QubGVuZ3RoIC0gMV07CiAgICAgICAgICAgIGlmIChsYXN0QW5ub3RhdGlvbi5hbm5vdGF0aW9uVHlwZSA9PT0gQW5ub3RhdGlvblR5cGUuRUxMSVBTSVMpIHsKICAgICAgICAgICAgICAgIGxldCBlbGxpcHNpc05vZGUgPSBsYXN0QW5ub3RhdGlvbi5ub2RlOwogICAgICAgICAgICAgICAgZWxsaXBzaXNOb2RlLnNldE51bU1vcmVOb2RlcygrK2VsbGlwc2lzTm9kZS5udW1Nb3JlTm9kZXMpOwogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGxldCBlbGxpcHNpc05vZGUgPSBuZXcgRWxsaXBzaXNOb2RlSW1wbCgxKTsKICAgICAgICAgICAgdGhpcy5saXN0LnB1c2gobmV3IEFubm90YXRpb24oZWxsaXBzaXNOb2RlLCBuZXcgUmVuZGVyTm9kZUluZm8oZWxsaXBzaXNOb2RlKSwgbnVsbCwgQW5ub3RhdGlvblR5cGUuRUxMSVBTSVMsIGFubm90YXRpb24uaXNJbikpOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQ29udGFpbnMgcmVuZGVyaW5nIGluZm9ybWF0aW9uIGFib3V0IGEgbm9kZSBpbiB0aGUgaGllcmFyY2hpY2FsIGdyYXBoLgogICAgICovCiAgICBjbGFzcyBSZW5kZXJOb2RlSW5mbyB7CiAgICAgICAgY29uc3RydWN0b3Iobm9kZSkgewogICAgICAgICAgICB0aGlzLm5vZGUgPSBub2RlOwogICAgICAgICAgICB0aGlzLmV4cGFuZGVkID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuaW5Bbm5vdGF0aW9ucyA9IG5ldyBBbm5vdGF0aW9uTGlzdCgpOwogICAgICAgICAgICB0aGlzLm91dEFubm90YXRpb25zID0gbmV3IEFubm90YXRpb25MaXN0KCk7CiAgICAgICAgICAgIC8vIFBhcmFtcyBzcGVjaWZpZWQgYnkgbGF5b3V0CiAgICAgICAgICAgIHRoaXMueCA9IDA7CiAgICAgICAgICAgIHRoaXMueSA9IDA7CiAgICAgICAgICAgIHRoaXMud2lkdGggPSAwOwogICAgICAgICAgICB0aGlzLmhlaWdodCA9IDA7CiAgICAgICAgICAgIHRoaXMuaW5ib3hXaWR0aCA9IDA7CiAgICAgICAgICAgIHRoaXMub3V0Ym94V2lkdGggPSAwOwogICAgICAgICAgICB0aGlzLmV4Y2x1ZGVkID0gZmFsc2U7CiAgICAgICAgICAgIC8vIFBhcmFtcyBmb3IgYnJpZGdlIHBhdGhzLgogICAgICAgICAgICB0aGlzLnN0cnVjdHVyYWwgPSBmYWxzZTsKICAgICAgICAgICAgLy8gUGFyYW1zIGZvciBub2RlIGJveC4KICAgICAgICAgICAgdGhpcy5sYWJlbE9mZnNldCA9IDA7CiAgICAgICAgICAgIHRoaXMucmFkaXVzID0gMDsKICAgICAgICAgICAgLy8gUGFyYW1zIGZvciBleHBhbmRlZCBub2RlCiAgICAgICAgICAgIHRoaXMubGFiZWxIZWlnaHQgPSAwOwogICAgICAgICAgICB0aGlzLnBhZGRpbmdUb3AgPSAwOwogICAgICAgICAgICB0aGlzLnBhZGRpbmdMZWZ0ID0gMDsKICAgICAgICAgICAgdGhpcy5wYWRkaW5nUmlnaHQgPSAwOwogICAgICAgICAgICB0aGlzLnBhZGRpbmdCb3R0b20gPSAwOwogICAgICAgICAgICB0aGlzLmlzSW5FeHRyYWN0ID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuaXNPdXRFeHRyYWN0ID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuY29yZUJveCA9IHsgd2lkdGg6IDAsIGhlaWdodDogMCB9OwogICAgICAgICAgICAvLyBCeSBkZWZhdWx0LCB3ZSBkb24ndCBmYWRlIG5vZGVzIG91dC4gRGVmYXVsdCB0byBmYWxzZSBmb3Igc2FmZXR5LgogICAgICAgICAgICB0aGlzLmlzRmFkZWRPdXQgPSBmYWxzZTsKICAgICAgICAgICAgLy8gT25seSB1c2UgdGhlIHBvcnRpb24gYmV5b25kIHRoZSBsYXN0IGRlb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dGhpbgogICAgICAgICAgICAgICAgLy8gdGhlIGZ1bmN0aW9ucyBzY2VuZSBncm91cC4KICAgICAgICAgICAgICAgIGNvbnN0IG1hdGNoID0gdGhpcy5kaXNwbGF5TmFtZS5tYXRjaChub2RlRGlzcGxheU5hbWVSZWdleCk7CiAgICAgICAgICAgICAgICBpZiAobWF0Y2gpIHsKICAgICAgICAgICAgICAgICAgICAvLyBUaGUgZGlzcGxheSBuYW1lIGhhZCBiZWVuIHN1Y2Nlc3NmdWxseSBleHRyYWN0ZWQuIFRoaXMgaXMgdGhlIG1vc3QKICAgICAgICAgICAgICAgICAgICAvLyBjb21tb24gc2NlbmFyaW8uCiAgICAgICAgICAgICAgICAgICAgdGhpcy5kaXNwbGF5TmFtZSA9IG1hdGNoWzFdOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAobG9kYXNoLnN0YXJ0c1dpdGgodGhpcy5kaXNwbGF5TmFtZSwgRlVOQ1RJT05fTElCUkFSWV9OT0RFX1BSRUZJWCkpIHsKICAgICAgICAgICAgICAgICAgICAvLyBUaGUgc3RyaW5nIGRvZXMgbm90IG1hdGNoIHRoZSB1c3VhbCBwYXR0ZXJuIGZvciBob3cgZnVuY3Rpb25zIGFyZQogICAgICAgICAgICAgICAgICAgIC8vIG5hbWVkLiBKdXN0IHVzZSB0aGUgZW50aXJlIHNlY29uZCBwb3J0aW9uIG9mIHRoZSBzdHJpbmcgYXMgdGhlIG5hbWUKICAgICAgICAgICAgICAgICAgICAvLyBpZiB3ZSBjYW4gc3VjY2Vzc2Z1bGx5IHJlbW92ZSB0aGUgcHJlZml4LgogICAgICAgICAgICAgICAgICAgIHRoaXMuZGlzcGxheU5hbWUgPSB0aGlzLmRpc3BsYXlOYW1lLnN1YnN0cmluZyhGVU5DVElPTl9MSUJSQVJZX05PREVfUFJFRklYLmxlbmd0aCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaXN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JSZW5kZXJJbmZvLCBlZGdlLCB0eXBlKSB7CiAgICAgICAgbGV0IGFubm90YXRpb24gPSBuZXcgQW5ub3RhdGlvbihzdWNjZXNzb3IsIHN1Y2Nlc3NvclJlbmRlckluZm8sIGVkZ2UsIHR5cGUsIGZhbHNlKTsKICAgICAgICBub2RlLm91dEFubm90YXRpb25zLnB1c2goYW5ub3RhdGlvbik7CiAgICB9CiAgICBmdW5jdGlvbiBzZXRHcmFwaERlcHRoKGdyYXBoLCBkZXB0aCkgewogICAgICAgIGxvZGFzaC5lYWNoKGdyYXBoLm5vZGVzKCksIChub2RlTmFtZSkgPT4gewogICAgICAgICAgICBsZXQgY2hpbGQgPSBncmFwaC5ub2RlKG5vZGVOYW1lKTsKICAgICAgICAgICAgY2hpbGQuZXhwYW5kZWQgPSBkZXB0aCA+IDE7IC8vIHNldCBhbGwgY2hpbGQgb2YgZGVwdGggMSB0byBjb2xsYXBzZWQKICAgICAgICAgICAgaWYgKGRlcHRoID4gMCkgewogICAgICAgICAgICAgICAgc3dpdGNoIChjaGlsZC5ub2RlLnR5cGUpIHsKICAgICAgICAgICAgICAgICAgICBjYXNlIE5vZGVUeXBlLk1FVEE6CiAgICAgICAgICAgICAgICAgICAgY2FzZSBOb2RlVHlwZS5TRVJJRVM6CiAgICAgICAgICAgICAgICAgICAgICAgIHNldEdyb3VwTm9kZURlcHRoKGNoaWxkLCBkZXB0aCAtIDEpOwogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICAvLyBEbyBub3RoaW5nIGZvciBsZWFmCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9KTsKICAgIH0KICAgIGNsYXNzIFJlbmRlckdyb3VwTm9kZUluZm8gZXh0ZW5kcyBSZW5kZXJOb2RlSW5mbyB7CiAgICAgICAgY29uc3RydWN0b3IoZ3JvdXBOb2RlLCBncmFwaE9wdGlvbnMpIHsKICAgICAgICAgICAgc3VwZXIoZ3JvdX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CiAgICAgICAgewogICAgICAgICAgICBsb2Rhc2guZWFjaChncmFwaC5wcmVkZWNlc3NvcnMobiksIChwLCBpbmRleCkgPT4gewogICAgICAgICAgICAgICAgY3JlYXRlU2hvcnRjdXQoZ3JhcGgsIHAsIG4pOwogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgLy8gUmVtb3ZlIHRoZSBub2RlIGZyb20gdGhlIGNvcmUgZ3JhcGggaWYgaXQgbm8gbG9uZ2VyIGhhcyBuZWlnaGJvcnMuCiAgICAgICAgaWYgKGdyYXBoLm5laWdoYm9ycyhuKS5sZW5ndGggPT09IDApIHsKICAgICAgICAgICAgY2hpbGQubm9kZS5pbmNsdWRlID0gSW5jbHVzaW9uVHlwZS5FWENMVURFOwogICAgICAgICAgICByZW5kZXJOb2RlLmlzb2xhdGVkSW5FeHRyYWN0LnB1c2goY2hpbGQpOwogICAgICAgICAgICBncmFwaC5yZW1vdmVOb2RlKG4pOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQ2hlY2sgd2hldGhlciB0aGUgbm9kZSdzIHR5cGUgaXMgYSBtZW1iZXIgb2YgdGhlIGdpdmVuIGxpc3Qgb2YgdHlwZXMuCiAgICAgKgogICAgICogQHBhcmFtIG5vZGUgTm9kZS4KICAgICAqIEBwYXJhbSB0eXBlcyBMaXN0IG9mIHR5cGUgdG8gbWF0Y2guCiAgICAgKi8KICAgIGZ1bmN0aW9uIGhhc1R5cGVJbihub2RlLCB0eXBlcykgewogICAgICAgIGlmIChub2RlLnR5cGUgPT09IE5vZGVUeXBlLk9QKSB7CiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgdHlwZXMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIGlmIChub2RlLm9wID09PSB0eXBlc1tpXSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYgKG5vZGUudHlwZSA9PT0gTm9kZVR5cGUuTUVUQSkgewogICAgICAgICAgICBsZXQgcm9vdE9wTm9kZSA9IG5vZGUuZ2V0Um9vdE9wKCk7CiAgICAgICAgICAgIGlmIChyb290T3BOb2RlKSB7CiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHR5cGVzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKHJvb3RPcE5vZGUub3AgPT09IHR5cGVzW2ldKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gZmFsc2U7CiAgICB9CiAgICAvKiogTW92ZSBub2RlcyB0aGF0IGFyZSBzcGVjaWZpZWQgdG8gYmUgZXhjbHVkZWQgb3V0IG9mIHRoZSBjb3JlIGdyYXBoLiAqLwogICAgZnVuY3Rpb24gZXh0cmFjdFNwZWNpZmllZE5vZGVzKHJlbmRlck5vZGUpIHsKICAgICAgICBsZXQgZ3JhcGggPSByZW5kZXJOb2RlLmNvcmVHcmFwaDsKICAgICAgICBsb2Rhc2guZWFjaChncmFwaC5ub2RlcygpLCAobikgPT4gewogICAgICAgICAgICBsZXQgcmVuZGVySW5mbyA9IGdyYXBoLm5vZGUobik7CiAgICAgICAgICAgIGlmIChyZW5kZXJJbmZvLm5vZGUuaW5jbHVkZSA9PT0gSW5jbHVzaW9uVHlwZS5FWENMVURFICYmCiAgICAgICAgICAgICAgICAhbi5zdGFydHNXaXRoKEZVTkNUSU9OX0xJQlJBUllfTk9ERV9QUkVGSVgpKSB7CiAgICAgICAgICAgICAgICAvLyBNb3ZlIHRoZSBub2RlIGlmIHRoZSBub2RlIGlzIGV4Y2x1ZGVkIGFuZCBub3QgcGFydCBvZiB0aGUgbGlicmFyeQogICAgICAgICAgICAgICAgLy8gZnVuY3Rpb24gc2NlbmUgZ3JvdXAsIHdoaWNoIGNvbnRhaW5zIG5vZGVzIHRoYXQgZG8gbm90IHJlcHJlc2VudCBvcHMgaW4KICAgICAgICAgICAgICAgIC8vIHRoZSBncmFwaCBhbmQgc2hvdWxkIHRodXMgbmV2ZXIgaGF2ZSBpdHMgbm9kZXMgYWRkZWQgdG8gdGhlIGNvcmUgZ3JhcGguCiAgICAgICAgICAgICAgICBpZiAocmVuZGVyTm9kZS5jb3JlR3JhcGgub3V0RWRnZXMobikubGVuZ3RoID4KICAgICAgICAgICAgICAgICAgICByZW5kZXJOb2RlLmNvcmVHcmFwaC5pbkVkZ2VzKG4pLmxlbmd0aCkgewogICAgICAgICAgICAgICAgICAgIG1ha2VPdXRFeHRyYWN0KHJlbmRlck5vZGUsIG4pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgbWFrZUluRXh0cmFjdChyZW5kZXJOb2RlLCBuKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0pOwogICAgfQogICAgLyoqIFJlbW92ZSBlZGdlcyBmcm9tIHByZS1kZWZpbmVkIG91dC1leHRyYWN0IHBhdHRlcm5zICovCiAgICBmdW5jdGlvbiBleHRyYWN0UHJlZGVmaW5lZFNpbmsocmVuZGVyTm9kZSkgewogICAgICAgIGxldCBncmFwaCA9IHJlbmRlck5vZGUuY29yZUdyYXBoOwogICAgICAgIGxvZGFzaC5lYWNoKGdyYXBoLm5vZGVzKCksIChuKSA9PiB7CiAgICAgICAgICAgIGxldCByZW5kZXJJbmZvID0gZ3JhcGgubm9kZShuKTsKICAgICAgICAgICAgaWYgKHJlbmRlckluZm8ubm9kZS5pbmNsdWRlICE9PSBJbmNsdXNpb25UeXBlLlVOU1BFQ0lGSUVEKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGhhc1R5cGVJbihyZW5kZXJJbm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gewogICAgICAgICAgICAgICAgbGV0IG1ldGFlZGdlID0gZ3JhcGguZWRnZShwcmVkLCBjdXJyZW50Tm9kZSkubWV0YWVkZ2U7CiAgICAgICAgICAgICAgICByZXR1cm4gaW5EZWdyZWUgKyAobWV0YWVkZ2UubnVtUmVndWxhckVkZ2VzID8gMSA6IDApOwogICAgICAgICAgICB9LCAwKTsKICAgICAgICAgICAgaWYgKGluRGVncmVlID09PSAwICYmIGdyYXBoLnByZWRlY2Vzc29ycyhjdXJyZW50Tm9kZSkubGVuZ3RoID4gMCkgewogICAgICAgICAgICAgICAgaW5EZWdyZWUgPSBncmFwaC5wcmVkZWNlc3NvcnMoY3VycmVudE5vZGUpLmxlbmd0aDsKICAgICAgICAgICAgfQogICAgICAgICAgICBsZXQgb3V0RGVncmVlID0gbG9kYXNoLnJlZHVjZShncmFwaC5zdWNjZXNzb3JzKGN1cnJlbnROb2RlKSwgKG91dERlZ3JlZSwgc3VjYykgPT4gewogICAgICAgICAgICAgICAgbGV0IG1ldGFlZGdlID0gZ3JhcGguZWRnZShjdXJyZW50Tm9kZSwgc3VjYykubWV0YWVkZ2U7CiAgICAgICAgICAgICAgICByZXR1cm4gb3V0RGVncmVlICsgKG1ldGFlZGdlLm51bVJlZ3VsYXJFZGdlcyA/IDEgOiAwKTsKICAgICAgICAgICAgfSwgMCk7CiAgICAgICAgICAgIGlmIChvdXREZWdyZWUgPT09IDAgJiYgZ3JhcGguc3VjY2Vzc29ycyhjdXJyZW50Tm9kZSkubGVuZ3RoID4gMCkgewogICAgICAgICAgICAgICAgb3V0RGVncmVlID0gZ3JhcGguc3VjY2Vzc29ycyhjdXJyZW50Tm9kZSkubGVuZ3RoOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIFN0b3JlIHRoZSBpbiBhbmQgb3V0IGRlZ3JlZXMgb2YgdGhpcyBub2RlIHRvIGF2b2lkIHJlY29tcHV0aW5nLgogICAgICAgICAgICBub2RlVG9JbkRlZ3JlZVtjdXJyZW50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dGlvbnMgPSBjaGlsZC5pbkFubm90YXRpb25zLmxpc3QubGVuZ3RoID4gMDsKICAgICAgICAgICAgICAgIGlmIChjaGlsZC5pc0luRXh0cmFjdCkgewogICAgICAgICAgICAgICAgICAgIC8vIElzIHNvdXJjZS1saWtlLgogICAgICAgICAgICAgICAgICAgIC8vIFRoaXMgY2FzZSBvbmx5IGhhcHBlbnMgaWYgZGV0YWNoQWxsRWRnZXNGb3JIaWdoRGVncmVlIGlzIGZhbHNlLgogICAgICAgICAgICAgICAgICAgIC8vIChPdGhlcndpc2UgYWxsIHNvdXJjZS1saWtlIG5vZGVzIGFyZSBhbGwgaXNvbGF0ZWQgYWxyZWFkeS4pCiAgICAgICAgICAgICAgICAgICAgcmVuZGVyTm9kZS5pc29sYXRlZEluRXh0cmFjdC5wdXNoKGNoaWxkKTsKICAgICAgICAgICAgICAgICAgICBjaGlsZC5ub2RlLmluY2x1ZGUgPSBJbmNsdXNpb25UeXBlLkVYQ0xVREU7CiAgICAgICAgICAgICAgICAgICAgZ3JhcGgucmVtb3ZlTm9kZShuKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKGNoaWxkLmlzT3V0RXh0cmFjdCkgewogICAgICAgICAgICAgICAgICAgIC8vIElzIHNpbmstbGlrZS4KICAgICAgICAgICAgICAgICAgICAvLyBUaGlzIGNhc2Ugb25seSBoYXBwZW5zIGlmIGRldGFjaEFsbEVkZ2VzRm9ySGlnaERlZ3JlZSBpcyBmYWxzZS4KICAgICAgICAgICAgICAgICAgICAvLyAvLyAoT3RoZXJ3aXNlIGFsbCBzaW5rLWxpa2Ugbm9kZXMgYXJlIGFsbCBpc29sYXRlZCBhbHJlYWR5LikKICAgICAgICAgICAgICAgICAgICByZW5kZXJOb2RlLmlzb2xhdGVkT3V0RXh0cmFjdC5wdXNoKGNoaWxkKTsKICAgICAgICAgICAgICAgICAgICBjaGlsZC5ub2RlLmluY2x1ZGUgPSBJbmNsdXNpb25UeXBlLkVYQ0xVREU7CiAgICAgICAgICAgICAgICAgICAgZ3JhcGgucmVtb3ZlTm9kZShuKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIGlmIChoYXNPdXRBbm5vdGF0aW9ucyAmJiAhaGFzSW5Bbm5vdGF0aW9ucykgewogICAgICAgICAgICAgICAgICAgICAgICBjaGlsZC5pc0luRXh0cmFjdCA9IHRydWU7IC8vIGZvciBvbmVzIHdpdGggaGlnaCBvdXQtYW5ub3RhdGlvbnMKICAgICAgICAgICAgICAgICAgICAgICAgcmVuZGVyTm9kZS5pc29sYXRlZEluRXh0cmFjdC5wdXNoKGNoaWxkKTsKICAgICAgICAgICAgICAgICAgICAgICAgY2hpbGQubm9kZS5pbmNsdWRlID0gSW5jbHVzaW9uVHlwZS5FWENMVURFOwogICAgICAgICAgICAgICAgICAgICAgICBncmFwaC5yZW1vdmVOb2RlKG4pOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChoYXNJbkFubm90YXRpb25zICYmICFoYXNPdXRBbm5vdGF0aW9ucykgewogICAgICAgICAgICAgICAgICAgICAgICBjaGlsZC5pc091dEV4dHJhY3QgPSB0cnVlOyAvLyBmb3Igb25lcyB3aXRoIGhpZ2ggaW4tYW5ub3RhdGlvbnMKICAgICAgICAgICAgICAgICAgICAgICAgcmVuZGVyTm9kZS5pc29sYXRlZE91dEV4dHJhY3QucHVzaChjaGlsZCk7CiAgICAgICAgICAgICAgICAgICAgICAgIGNoaWxkLm5vZGUuaW5jbHVkZSA9IEluY2x1c2lvblR5cGUuRVhDTFVERTsKICAgICAgICAgICAgICAgICAgICAgICAgZ3JhcGgucmVtb3ZlTm9kZShuKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSA7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9KTsKICAgIH0KICA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AgICB9LAogICAgICAgIGdyYXBoOiB7CiAgICAgICAgICAgIC8qKiBHcmFwaCBwYXJhbWV0ZXIgZm9yIG1ldGFub2RlLiAqLwogICAgICAgICAgICBtZXRhOiB7CiAgICAgICAgICAgICAgICAvKioKICAgICAgICAgICAgICAgICAqIERhZ3JlJ3Mgbm9kZXNlcCBwYXJhbSAtIG51bWJlciBvZiBwaXhlbHMgdGhhdAogICAgICAgICAgICAgICAgICogc2VwYXJhdGUgbm9kZXMgaG9yaXpvbnRhbGx5IGluIHRoZSBsYXlvdXQuCiAgICAgICAgICAgICAgICAgKgogICAgICAgICAgICAgICAgICogU2VlIGh0dHBzOi8vZ2l0aHViLmNvbS9jcGV0dGl0dC9kYWdyZS93aWtpI2NvbmZpZ3VyaW5nLXRoZS1sYXlvdXQKICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgbm9kZVNlcDogNSwKICAgICAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgICAgICogRGFncmUncyByYW5rc2VwIHBhcmFtIC0gbnVtYmVyIG9mIHBpeGVscwogICAgICAgICAgICAgICAgICogYmV0d2VlbiBlYWNoIHJhbmsgaW4gdGhlIGxheW91dC4KICAgICAgICAgICAgICAgICAqCiAgICAgICAgICAgICAgICAgKiBTZWUgaHR0cHM6Ly9naXRodWIuY29tL2NwZXR0aXR0L2RhZ3JlL3dpa2kjY29uZmlndXJpbmctdGhlLWxheW91dAogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICByYW5rU2VwOiAyNSwKICAgICAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgICAgICogRGFncmUncyBlZGdlc2VwIHBhcmFtIC0gbnVtYmVyIG9mIHBpeGVscyB0aGF0IHNlcGFyYXRlCiAgICAgICAgICAgICAgICAgKiBlZGdlcyBob3Jpem9udGFsbHkgaW4gdGhlIGxheW91dC4KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgZWRnZVNlcDogNSwKICAgICAgICAgICAgfSwKICAgICAgICAgICAgLyoqIEdyYXBoIHBhcmFtZXRlciBmb3IgbWV0YW5vZGUuICovCiAgICAgICAgICAgIHNlcmllczogewogICAgICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAgICAgKiBEYWdyZSdzIG5vZGVzZXAgcGFyYW0gLSBudW1iZXIgb2YgcGl4ZWxzIHRoYXQKICAgICAgICAgICAgICAgICAqIHNlcGFyYXRlIG5vZGVzIGhvcml6b250YWxseSBpbiB0aGUgbGF5b3V0LgogICAgICAgICAgICAgICAgICoKICAgICAgICAgICAgICAgICAqIFNlZSBodHRwczovL2dpdGh1Yi5jb20vY3BldHRpdHQvZGFncmUvd2lraSNjb25maWd1cmluZy10aGUtbGF5b3V0CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIG5vZGVTZXA6IDUsCiAgICAgICAgICAgICAgICAvKioKICAgICAgICAgICAgICAgICAqIERhZ3JlJ3MgcmFua3NlcCBwYXJhbSAtIG51bWJlciBvZiBwaXhlbHMKICAgICAgICAgICAgICAgICAqIGJldHdlZW4gZWFjaCByYW5rIGluIHRoZSBsYXlvdXQuCiAgICAgICAgICAgICAgICAgKgogICAgICAgICAgICAgICAgICogU2VlIGh0dHBzOi8vZ2l0aHViLmNvbS9jcGV0dGl0dC9kYWdyZS93aWtpI2NvbmZpZ3VyaW5nLXRoZS1sYXlvdXQKICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgcmFua1NlcDogMjUsCiAgICAgICAgICAgICAgICAvKioKICAgICAgICAgICAgICAgICAqIERhZ3JlJ3MgZWRnZXNlcCBwYXJhbSAtIG51bWJlciBvZiBwaXhlbHMgdGhhdCBzZXBhcmF0ZQogICAgICAgICAgICAgICAgICogZWRnZXMgaG9yaXpvbnRhbGx5IGluIHRoZSBsYXlvdXQuCiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIGVkZ2VTZXA6IDUsCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBQYWRkaW5nIGlzIHVzZWQgdG8gY29ycmVjdGx5IHBvc2l0aW9uIHRoZSBncmFwaCBTVkcgaW5zaWRlIG9mIGl0cyBwYXJlbnQKICAgICAgICAgICAgICogZWxlbWVudC4gVGhlIHBhZGRpbmcgYW1vdW50cyBhcmUgYXBwbGllZCB1c2luZyBhbiBTVkcgdHJhbnNmb3JtIG9mIFggYW5kCiAgICAgICAgICAgICAqIFkgY29vcmRpbmF0ZXMuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICBwYWRkaW5nOiB7IHBhZGRpbmdUb3A6IDQwLCBwYWRkaW5nTGVmdDogMjAgfSwKICAgICAgICB9LAogICAgICAgIHN1YnNjZW5lOiB7CiAgICAgICAgICAgIG1ldGE6IHsKICAgICAgICAgICAgICAgIHBhZGRpbmdUb3A6IDEwLAogICAgICAgICAgICAgICAgcGFkZGluZ0JvdHRvbTogMTAsCiAgICAgICAgICAgICAgICBwYWRkaW5nTGVmdDogMTAsCiAgICAgICAgICAgICAgICBwYWRkaW5nUmlnaHQ6IDEwLAogICAgICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAgICAgKiBVc2VkIHRvIGxlYXZlIHJvb20gZm9yIHRoZSBsYWJlbCBvbiB0b3Agb2YgdGhlIGhpZ2hlc3Qgbm9kZSBpbgogICAgICAgICAgICAgICAgICogdGhlIGNvcmUgZ3JhcGguCiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIGxhYmVsSGVpZ2h0OiAyMCwKICAgICAgICAgICAgICAgIC8qKiBYLXNwYWNlIGJldHdlZW4gZWFjaCBleHRyYWN0ZWQgbm9kZSBhbmQgdGhlIGNvcmUgZ3JhcGguICovCiAgICAgICAgICAgICAgICBleHRyYWN0WE9mZnNldDogMTUsCiAgICAgICAgICAgICAgICAvKiogWS1zcGFjZSBiZXR3ZWVuIGVhY2ggZXh0cmFjdGVkIG5vZGUuICovCiAgICAgICAgICAgICAgICBleHRyYWN0WU9mZnNldDogMjAsCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHNlcmllczogewogICAgICAgICAgICAgICAgcGFkZGluZ1RvcDogMTAsCiAgICAgICAgICAgICAgICBwYWRkaW5nQm90dG9tOiAxMCwKICAgICAgICAgICAgICAgIHBhZGRpbmdMZWZ0OiAxMCwKICAgICAgICAgICAgICAgIHBhZGRpbmdSaWdodDogMTAsCiAgICAgICAgICAgICAgICBsYWJlbEhlaWdodDogMTAsCiAgICAgICAgICAgIH0sCiAgICAgICAgfSwKICAgICAgICBub2RlU2l6ZTogewogICAgICAgICAgICAvKiogU2l6ZSBvZiBtZXRhIG5vZGVzLiAqLwogICAgICAgICAgICBtZXRhOiB7CiAgICAgICAgICAgICAgICByYWRpdXM6IDUsCiAgICAgICAgICAgICAgICB3aWR0aDogNjAsCiAgICAgICAgICAgICAgICBtYXhMYWJlbFdpZHRoOiA1MiwKICAgICAgICAgICAgICAgIC8qKiBBIHNjYWxlIGZvciB0aGUgbm9kZSdzIGhlaWdodCBiYXNlZCBvbiBudW1iZXIgb2Ygbm9kZXMgaW5zaWRlICovCiAgICAgICAgICAgICAgICAvLyBIYWNrIC0gc2V0IHRoaXMgYXMgYW4gYW55IHR5cGUgdG8gYXZvaWQgaXNzdWVzIGluIGV4cG9ydGluZyBhIHR5cGUKICAgICAgICAgICAgICAgIC8vIGZyb20gYW4gZXh0ZXJuYWwgbW9kdWxlLgogICAgICAgICAgICAgICAgaGVpZ2h0OiBsaW5lYXIkMigpCiAgICAgICAgICAgICAgICAgICAgLmRvbWFpbihbMSwgMjAwXSkKICAgICAgICAgICAgICAgICAgICAucmFuZ2UoWzE1LCA2MF0pCiAgICAgICAgICAgICAgICAgICAgLmNsYW1wKHRydWUpLAogICAgICAgICAgICAgICAgLyoqIFRoZSByYWRpdXMgb2YgdGhlIGNpcmNsZSBkZW5vdGluZyB0aGUgZXhwYW5kIGJ1dHRvbi4gKi8KICAgICAgICAgICAgICAgIGV4cGFuZEJ1dHRvblJhZGl1czogMywKICAgICAgICAgICAgfSwKICAgICAgICAgICAgLyoqIFNpemUgb2Ygb3Agbm9kZXMuICovCiAgICAgICAgICAgIG9wOiB7CiAgICAgICAgICAgICAgICB3aWR0aDogMTUsCiAgICAgICAgICAgICAgICBoZWlnaHQ6IDYsCiAgICAgICAgICAgICAgICByYWRpdXM6IDMsCiAgICAgICAgICAgICAgICBsYWJlbE9mZnNldDogLTgsCiAgICAgICAgICAgICAgICBtYXhMYWJlbFdpZHRoOiAzMCwKICAgICAgICAgICAgfSwKICAgICAgICAgICAgLyoqIFNpemUgb2Ygc2VyaWVzIG5vZGVzLiAqLwogICAgICAgICAgICBzZXJpZXM6IHsKICAgICAgICAgICAgICAgIGV4cGFuZGVkOiB7CiAgICAgICAgICAgICAgICAgICAgLy8gRm9yIGV4cGFuZGVkIHNlcmllcyBub2Rlcywgd2lkdGggYW5kIGhlaWdodCB3aWxsIGJlCiAgICAgICAgICAgICAgICAgICAgLy8gY29tcHV0ZWQgdG8gYWNjb3VudCBmb3IgdGhlIHN1YnNjZW5lLgogICAgICAgICAgICAgICAgICAgIHJhZGl1czogMTAsCiAgICAgICAgICAgICAgICAgICAgbGFiZWxPZmZzZXQ6IDAsCiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgdmVydGljYWw6IHsKICAgICAgICAgICAgICAgICAgICAvLyBXaGVuIHVuZXhwYW5kZWQsIHNlcmllcyB3aG9zZSB1bmRlcmx5aW5nIG1ldGFncmFwaHMgY29udGFpbgogICAgICAgICAgICAgICAgICAgIC8vIG9uZSBvciBtb3JlIG5vbi1jb250cm9sIGVkZ2VzIHdpbGwgc2hvdyBhcyBhIHZlcnRpY2FsIHN0YWNrCiAgICAgICAgICAgICAgICAgICAgLy8gb2YgZWxsaXBzZXMuCiAgICAgICAgICAgICAgICAgICAgd2lkdGg6IDE2LAogICAgICAgICAgICAgICAgICAgIGhlaWdodDogMTMsCiAgICAgICAgICAgICAgICAgICAgbGFiZWxPZmZzZXQ6IC0xMywKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICBob3Jpem9udGFsOiB7CiAgICAgICAgICAgICAgICAgICAgLy8gV2hlbiB1bmV4cGFuZGVkLCBzZXJpZXMgd2hvc2UgdW5kZXJseWluZyBtZXRhZ3JhcGhzIGNvbnRhaW4KICAgICAgICAgICAgICAgICAgICAvLyBubyBub24tY29udHJvbCBlZGdlcyB3aWxsIHNob3cgYXMgYSBob3Jpem9udGFsIHN0YWNrIG9mCiAgICAgICAgICAgICAgICAgICAgLy8gZWxsaXBzZXMuCiAgICAgICAgICAgICAgICAgICAgd2lkdGg6IDI0LAogICAgICAgICAgICAgICAgICAgIGhlaWdodDogOCwKICAgICAgICAgICAgICAgICAgICByYWRpdXM6IDEwLAogICAgICAgICAgICAgICAgICAgIGxhYmVsT2Zmc2V0OiAtMTAsCiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICB9LAogICAgICAgICAgICAvKiogU2l6ZSBvZiBicmlkZ2Ugbm9kZXMuICovCiAgICAgICAgICAgIGJyaWRnZTogewogICAgICAgICAgICAgICAgLy8gTk9URTogYnJpZGdlIG5vZGVzIHdpbGwgbm9ybWFsbHkgYmUgaW52aXNpYmxlLCBidXQgdGhleSBtdXN0CiAgICAgICAgICAgICAgICAvLyB0YWtlIHVwIHNvbWUgc3BhY2Ugc28gdGhhdCB0aGUgbGF5b3V0IHN0ZXAgbGVhdmVzIHJvb20gZm9yCiAgICAgICAgICAgICAgICAvLyB0aGVpciBlZGdlcy4KICAgICAgICAgICAgICAgIHdpZHRoOiAyMCwKICAgICAgICAgICAgICAgIGhlaWdodDogMjAsCiAgICAgICAgICAgICAgICByYWRpdXM6IDIsCiAgICAgICAgICAgICAgICBsYWJlbE9mZnNldDogMCwKICAgICAgICAgICAgfSwKICAgICAgICB9LAogICAgICAgIHNob3J0Y3V0U2l6ZTogewogICAgICAgICAgICAvKiogU2l6ZSBvZiBzaG9ydGN1dHMgZm9yIG9wIG5vZGVzICovCiAgICAgICAgICAgIG9wOiB7IHdpZHRoOiAxMCwgaGVpZ2h0OiA0IH0sCiAgICAgICAgICAgIC8qKiBTaXplIG9mIHNob3J0Y3V0cyBmb3IgbWV0YSBub2RlcyAqLwogICAgICAgICAgICBtZXRhOiB7IHdpZHRoOiAxMiwgaGVpZ2h0OiA0LCByYWRpdXM6IDEgfSwKICAgICAgICAgICAgLyoqIFNpemUgb2Ygc2hvcnRjdXRzIGZvciBzZXJpZXMgbm9kZXMgKi8KICAgICAgICAgICAgc2VyaWVzOiB7CiAgICAgICAgICAgICAgICB3aWR0aDogMTQsCiAgICAgICAgICAgICAgICBoZWlnaHQ6IDQsCiAgICAgICAgICAgIH0sCiAgICAgICAgfSwKICAgICAgICBhbm5vdGF0aW9uczogewogICAgICAgICAgICAvKiogTWF4aW11bSBwb3NzaWJsZSB3aWR0aCBvZiB0aGUgYm91bmRpbmcgYm94IGZvciBpbiBhbm5vdGF0aW9ucyAqLwogICAgICAgICAgICBpbmJveFdpZHRoOiA1MCwKICAgICAgICAgICAgLyoqIE1heGltdW0gcG9zc2libGUgd2lkdGggb2YgdGhlIGJvdW5kaW5nIGJveCBmb3Igb3V0IGFubm90YXRpb25zICovCiAgICAgICAgICAgIG91dGJveFdpZHRoOiA1MCwKICAgICAgICAgICAgLyoqIFgtc3BhY2UgYmV0d2VlbiB0aGUgc2hhcGUgYW5kIGVhY2ggYW5ub3RhdGlvbi1ub2RlLiAqLwogICAgICAgICAgICB4T2Zmc2V0OiAxMCwKICAgICAgICAgICAgLyoqIFktc3BhY2UgYmV0d2VlbiBlYWNoIGFubm90YXRpb24tbm9kZS4gKi8KICAgICAgICAgICAgeU9mZnNldDogMywKICAgICAgICAgICAgLyoqIFgtc3BhY2UgYmV0d2VlbiBlYWNoIGFubm90YXRpb24tbm9kZSBhbmQgaXRzIGxhYmVsLiAqLwogICAgICAgICAgICBsYWJlbE9mZnNldDogMiwKICAgICAgICAgICAgLyoqIERlZmluZXMgdGhlIG1heCB3aWR0aCBmb3IgYW5ub3RhdGlvbiBsYWJlbCAqLwogICAgICAgICAgICBtYXhMYWJlbFdpZHRoOiAxMjAsCiAgICAgICAgfSwKICAgICAgICBjb25zdGFudDogeyBzaXplOiB7IHdpZHRoOiA0LCBoZWlnaHQ6IDQgfSB9LAogICAgICAgIHNlcmllczogewogICAgICAgICAgICAvKiogTWF4aW11bSBudW1iZXIgb2YgcmVwZWF0ZWQgaXRlbSBmb3IgdW5leHBhbmRlZCBzZXJpZXMgbm9kZS4gKi8KICAgICAgICAgICAgbWF4U3RhY2tDb3VudDogMywKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFBvc2l0aW9uaW5nIG9mZnNldCByYXRpbyBmb3IgY29sbGFwc2VkIHN0YWNrCiAgICAgICAgICAgICAqIG9mIHBhcmFsbGVsIHNlcmllcyAoc2VyaWVzIHdpdGhvdXQgZWRnZXMgYmV0d2VlbiBpdHMgbWVtYmVycykuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICBwYXJhbGxlbFN0YWNrT2Zmc2V0UmF0aW86IDAuMiwKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFBvc2l0aW9uaW5nIG9mZnNldCByYXRpbyBmb3IgY29sbGFwc2VkIHN0YWNrCiAgICAgICAgICAgICAqIG9mIHRvd2VyIHNlcmllcyAoc2VyaWVzIHdpdGggZWRnZXMgYmV0d2VlbiBpdHMgbWVtYmVycykuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0b3dlclN0YWNrT2Zmc2V0UmF0aW86IDAuNSwKICAgICAgICB9LAogICAgICAgIG1pbmltYXA6IHsKICAgICAgICAgICAgLyoqIFRoZSBtYXhpbXVtIHdpZHRoL2hlaWdodCB0aGUgbWluaW1hcCBjYW4gaGF2ZS4gKi8KICAgICAgICAgICAgc2l6ZTogMTUwLAogICAgICAgIH0sCiAgICB9OwogICAgLyoqCiAgICAgKiBUaGUgbWluaW11bSB3aWR0aCB3ZSBjb25mZXIgdXBvbiB0aGUgYXV4aWxpY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lID09PSBOb2RlVHlwZS5TRVJJRVMpIHsKICAgICAgICAgICAgbGF5b3V0U2VyaWVzTm9kZShyZW5kZXJOb2RlSW5mbyk7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBVcGRhdGVzIHRoZSB0b3RhbCB3aWR0aCBvZiBhbiB1bmV4cGFuZGVkIG5vZGUgd2hpY2ggaW5jbHVkZXMgdGhlIHNpemUgb2YgaXRzCiAgICAgKiBpbiBhbmQgb3V0IGFubm90YXRpb25zLgogICAgICovCiAgICBmdW5jdGlvbiB1cGRhdGVUb3RhbFdpZHRoT2ZOb2RlKHJlbmRlckluZm8pIHsKICAgICAgICByZW5kZXJJbmZvLmluYm94V2lkdGggPQogICAgICAgICAgICByZW5kZXJJbmZvLmluQW5ub3RhdGlvbnMubGlzdC5sZW5ndGggPiAwCiAgICAgICAgICAgICAgICA/IFBBUkFNUyQxLmFubm90YXRpb25zLmluYm94V2lkdGgKICAgICAgICAgICAgICAgIDogMDsKICAgICAgICByZW5kZXJJbmZvLm91dGJveFdpZHRoID0KICAgICAgICAgICAgcmVuZGVySW5mby5vdXRBbm5vdGF0aW9ucy5saXN0Lmxlbmd0aCA+IDAKICAgICAgICAgICAgICAgID8gUEFSQU1TJDEuYW5ub3RhdGlvbnMub3V0Ym94V2lkdGgKICAgICAgICAgICAgICAgIDogMDsKICAgICAgICAvLyBBc3NpZ24gdGhlIHdpZHRoIG9mIHRoZSBjb3JlIGJveCAodGhlIG1haW4gc2hhcGUgb2YgdGhlIG5vZGUpLgogICAgICAgIHJlbmRlckluZm8uY29yZUJveC53aWR0aCA9IHJlbmRlckluZm8ud2lkdGg7CiAgICAgICAgcmVuZGVySW5mby5jb3JlQm94LmhlaWdodCA9IHJlbmRlckluZm8uaGVpZ2h0OwogICAgICAgIC8vIFRPRE86IEFjY291bnQgZm9yIGZvbnQgd2lkdGggcmF0aGVyIHRoYW4gdXNpbmcgYSBtYWdpYyBudW1iZXIuCiAgICAgICAgbGV0IGxhYmV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RlSW5mby5ub2RlLnR5cGUpIHsKICAgICAgICAgICAgICAgIGNhc2UgTm9kZVR5cGUuT1A6CiAgICAgICAgICAgICAgICAgICAgbG9kYXNoLmV4dGVuZChjaGlsZE5vZGVJbmZvLCBQQVJBTVMkMS5ub2RlU2l6ZS5vcCk7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBjYXNlIE5vZGVUeXBlLkJSSURHRToKICAgICAgICAgICAgICAgICAgICBsb2Rhc2guZXh0ZW5kKGNoaWxkTm9kZUluZm8sIFBBUkFNUyQxLm5vZGVTaXplLmJyaWRnZSk7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBjYXNlIE5vZGVUeXBlLk1FVEE6CiAgICAgICAgICAgICAgICAgICAgaWYgKCFjaGlsZE5vZGVJbmZvLmV4cGFuZGVkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFNldCBmaXhlZCB3aWR0aCBhbmQgc2NhbGFibGUgaGVpZ2h0IGJhc2VkIG9uIGNhcmRpbmFsaXR5CiAgICAgICAgICAgICAgICAgICAgICAgIGxvZGFzaC5leHRlbmQoY2hpbGROb2RlSW5mbywgUEFSQU1TJDEubm9kZVNpemUubWV0YSk7CiAgICAgICAgICAgICAgICAgICAgICAgIGNoaWxkTm9kZUluZm8uaGVpZ2h0ID0gUEFSQU1TJDEubm9kZVNpemUubWV0YS5oZWlnaHQoY2hpbGROb2RlSW5mby5ub2RlLmNhcmRpbmFsaXR5KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjaGlsZEdyb3VwTm9kZUluZm8gPSBjaGlsZE5vZGVJbmZvOwogICAgICAgICAgICAgICAgICAgICAgICBsYXlvdXRTY2VuZShjaGlsZEdyb3VwTm9kZUluZm8pOyAvLyBSZWN1cnNpdmVseSBsYXlvdXQgaXRzIHN1YnNjZW5lLgogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIGNhc2UgTm9kZVR5cGUuU0VSSUVTOgogICAgICAgICAgICAgICAgICAgIGlmIChjaGlsZE5vZGVJbmZvLmV4cGFuZGVkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGxvZGFzaC5leHRlbmQoY2hpbGROb2RlSW5mbywgUEFSQU1TJDEubm9kZVNpemUuc2VyaWVzLmV4cGFuZGVkKTsKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNoaWxkR3JvdXBOb2RlSW5mbyA9IGNoaWxkTm9kZUluZm87CiAgICAgICAgICAgICAgICAgICAgICAgIGxheW91dFNjZW5lKGNoaWxkR3JvdXBOb2RlSW5mbyk7IC8vIFJlY3Vyc2l2ZWx5IGxheW91dCBpdHMgc3Vic2NlbmUuCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICBsZXQgY2hpbGRHcm91cE5vZGVJbmZvID0gY2hpbGROb2RlSW5mbzsKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHNlcmllc1BhcmFtcyA9IGNoaWxkR3JvdXBOb2RlSW5mby5ub2RlLmhhc05vbkNvbnRyb2xFZGdlcwogICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBQQVJBTVMkMS5ub2RlU2l6ZS5zZXJpZXMudmVydGljYWwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogUEFSQU1TJDEubm9kZVNpemUuc2VyaWVzLmhvcml6b250YWw7CiAgICAgICAgICAgICAgICAgICAgICAgIGxvZGFzaC5leHRlbmQoY2hpbGROb2RlSW5mbywgc2VyaWVzUGFyYW1zKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICAgICAgIHRocm93IEVycm9yKCdVbnJlY29nbml6ZWQgbm9kZSB0eXBlOiAnICsgY2hpbGROb2RlSW5mby5ub2RlLnR5cGUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIENvbXB1dGUgdG90YWwgd2lkdGggb2YgdW4tZXhwYW5kZWQgbm9kZXMuIFdpZHRoIG9mIGV4cGFuZGVkIG5vZGVzCiAgICAgICAgICAgIC8vIGhhcyBhbHJlYWR5IGJlZW4gY29tcHV0ZWQuCiAgICAgICAgICAgIGlmICghY2hpbGROb2RlSW5mby5leHBhbmRlZCkgewogICAgICAgICAgICAgICAgdXBkYXRlVG90YWxXaWR0aE9mTm9kZShjaGlsZE5vZGVJbmZvKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBMYXlvdXQgZWFjaCBjaGlsZCdzIGFubm90YXRpb25zCiAgICAgICAgICAgIGxheW91dEFubm90YXRpb24oY2hpbGROb2RlSW5mbyk7CiAgICAgICAgfSk7CiAgICB9CiAgICAvKioKICAgICAqIENhbGN1bGF0ZSBsYXlvdXQgZm9yIGEgZ3JhcGggdXNpbmcgZGFncmUKICAgICAqIEBwYXJhbSBncmFwaCB0aGUgZ3JhcGggdG8gYmUgbGFpZCBvdXQKICAgICAqIEBwYXJhbSBwYXJhbXMgbGF5b3V0IHBhcmFtZXRlcnMKICAgICAqIEByZXR1cm4gd2lkdGggYW5kIGhlaWdodCBvZiB0aGUgY29yZSBncmFwaAogICAgICovCiAgICBmdW5jdGlvbiBkYWdyZUxheW91dChncmFwaCwgcGFyYW1zKSB7CiAgICAgICAgbG9kYXNoLmV4dGVuZChncmFwaC5ncmFwaCgpLCB7CiAgICAgICAgICAgIG5vZGVzZXA6IHBhcmFtcy5ub2RlU2VwLAogICAgICAgICAgICByYW5rc2VwOiBwYXJhbXMucmFua1NlcCwKICAgICAgICAgICAgZWRnZXNlcDogcGFyYW1zLmVkZ2VTZXAsCiAgICAgICAgfSk7CiAgICAgICAgbGV0IG5vbkJyaWRnZU5vZGVOYW1lcyA9I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ZGUgYnJpZGdlIG5vZGVzIGFuZCBicmlkZ2UgZWRnZXMsIGFuZCBhbGxvdyBmb3IKICAgICAgICAvLyBhbm5vdGF0aW9uIGJveGVzIGFuZCBsYWJlbHMuCiAgICAgICAgbGV0IG1pblggPSBJbmZpbml0eTsKICAgICAgICBsZXQgbWluWSA9IEluZmluaXR5OwogICAgICAgIGxldCBtYXhYID0gLUluZmluaXR5OwogICAgICAgIGxldCBtYXhZID0gLUluZmluaXR5OwogICAgICAgIGxvZGFzaC5lYWNoKG5vbkJyaWRnZU5vZGVOYW1lcywgKG5vZGVOYW1lKSA9PiB7CiAgICAgICAgICAgIGxldCBub2RlSW5mbyA9IGdyYXBoLm5vZGUobm9kZU5hbWUpOwogICAgICAgICAgICBsZXQgdyA9IDAuNSAqIG5vZGVJbmZvLndpZHRoOwogICAgICAgICAgICBsZXQgeDEgPSBub2RlSW5mby54IC0gdzsKICAgICAgICAgICAgbGV0IHgyID0gbm9kZUluZm8ueCArIHc7CiAgICAgICAgICAgIG1pblggPSB4MSA8IG1pblggPyB4MSA6IG1pblg7CiAgICAgICAgICAgIG1heFggPSB4MiA+IG1heFggPyB4MiA6IG1heFg7CiAgICAgICAgICAgIC8vIFRPRE86IEFjY291bnQgZm9yIHRoZSBoZWlnaHQgb2YgbGFiZWxzIGFib3ZlIG9wIG5vZGVzIGhlcmUuCiAgICAgICAgICAgIGxldCBoID0gMC41ICogbm9kZUluZm8uaGVpZ2h0OwogICAgICAgICAgICBsZXQgeTEgPSBub2RlSW5mby55IC0gaDsKICAgICAgICAgICAgbGV0IHkyID0gbm9kZUluZm8ueSArIGg7CiAgICAgICAgICAgIG1pblkgPSB5MSA8IG1pblkgPyB5MSA6IG1pblk7CiAgICAgICAgICAgIG1heFkgPSB5MiA+IG1heFkgPyB5MiA6IG1heFk7CiAgICAgICAgfSk7CiAgICAgICAgbG9kYXNoLmVhY2goZ3JhcGguZWRnZXMoKSwgKGVkZ2VPYmopID0+IHsKICAgICAgICAgICAgbG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JyZWN0aW9uLiBUbyBrZWVwIHRoZW0gc3RyYWlnaHQsIHdlIHJlbW92ZSB0aGUgbWlkIHBvaW50CiAgICAgICAgICAgIC8vIGFuZCBjb3JyZWN0IHRoZSBmaXJzdCBhbmQgdGhlIGxhc3QgcG9pbnQgdG8gYmUgdGhlIGNlbnRlciBvZiB0aGUKICAgICAgICAgICAgLy8gc291cmNlIGFuZCBkZXN0aW5hdGlvbiBub2RlIHJlc3BlY3RpdmVseS4KICAgICAgICAgICAgaWYgKGVkZ2VJbmZvLnBvaW50cy5sZW5ndGggPT09IDMgJiYgaXNTdHJhaWdodExpbmUoZWRnZUluZm8ucG9pbnRzKSkgewogICAgICAgICAgICAgICAgaWYgKHNvdXJjZU5vZGUgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIGxldCBjeFNvdXJjZSA9IHNvdXJjZU5vZGUuZXhwYW5kZWQKICAgICAgICAgICAgICAgICAgICAgICAgPyBzb3VyY2VOb2RlLngKICAgICAgICAgICAgICAgICAgICAgICAgOiBjb21wdXRlQ1hQb3NpdGlvbk9mTm9kZVNoYXBlKHNvdXJjZU5vZGUpOwogICAgICAgICAgICAgICAgICAgIGVkZ2VJbmZvLnBvaW50c1swXS54ID0gY3hTb3VyY2U7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAoZGVzdE5vZGUgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIGxldCBjeERlc3QgPSBkZXN0Tm9kZS5leHBhbmRlZAogICAgICAgICAgICAgICAgICAgICAgICA/IGRlc3ROb2RlLngKICAgICAgICAgICAgICAgICAgICAgICAgOiBjb21wdXRlQ1hQb3NpdGlvbk9mTm9kZVNoYXBlKGRlc3ROb2RlKTsKICAgICAgICAgICAgICAgICAgICBlZGdlSW5mby5wb2ludHNbMl0ueCA9IGN4RGVzdDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vIFJlbW92ZSB0aGUgbWlkZGxlIHBvaW50IHNv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50cywgKHBvaW50KSA9PiB7CiAgICAgICAgICAgICAgICBtaW5YID0gcG9pbnQueCA8IG1pblggPyBwb2ludC54IDogbWluWDsKICAgICAgICAgICAgICAgIG1heFggPSBwb2ludC54ID4gbWF4WCA/IHBvaW50LnggOiBtYXhYOwogICAgICAgICAgICAgICAgbWluWSA9IHBvaW50LnkgPCBtaW5ZID8gcG9pbnQueSA6IG1pblk7CiAgICAgICAgICAgICAgICBtYXhZID0gcG9pbnQueSA+IG1heFkgPyBwb2ludC55IDogbWF4WTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfSk7CiAgICAgICAgLy8gU2hpZnQgYWxsIG5vZGVzIGFuZCBlZGdlIHBvaW50cyB0byBhY2NvdW50IGZvciB0aGUgbGVmdC1wYWRkaW5nIGFtb3VudCwKICAgICAgICAvLyBhbmQgdGhlIGludmlzaWJsZSBicmlkZ2Ugbm9kZXMuCiAgICAgICAgbG9kYXNoLmVhY2goZ3JhcGgubm9kZXMoKSwgKG5vZGVOYW1lKSA9PiB7CiAgICAgICAgICAgIGxldCBub2RlSW5mbyA9IGdyYXBoLm5vZGUobm9kZU5hbWUpOwogICAgICAgICAgICBub2RlSW5mby54IC09IG1pblg7CiAgICAgICAgICAgIG5vZGVJbmZvLnkgLT0gbWluWTsKICAgICAgICB9KTsKICAgICAgICBsb2Rhc2guZWFjaChncmFwaC5lZGdlcygpLCAoZWRnZU9iaikgPT4gewogICAgICAgICAgICBsb2Rhc2guZWFjaChncmFwaC5lZGdlKGVkZ2VPYmopLnBvaW50cywgKHBvaW50KSA9PiB7CiAgICAgICAgICAgICAgICBwb2ludC54IC09IG1pblg7CiAgICAgICAgICAgICAgICBwb2ludC55IC09IG1pblk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0pOwogICAgICAgIHJldHVybiB7CiAgICAgICAgICAgIHdpZHRoOiBtYXhYIC0gbWluWCwKICAgICAgICAgICAgaGVpZ2h0OiBtYXhZIC0gbWluWSwKICAgICAgICB9OwogICAgfQogICA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jYWxlcyBmb3IgdG91Y2ggcG9pbnQgYmV0d2VlbiB0aGUgaW4tYW5ub3RhdGlvbiBlZGdlcwogICAgICAgIC8vIGFuZCB0aGVpciBob3N0cy4KICAgICAgICBsZXQgaW5Ub3VjaEhlaWdodCA9IE1hdGgubWluKHJlbmRlck5vZGVJbmZvLmhlaWdodCAvIDIgLSByZW5kZXJOb2RlSW5mby5yYWRpdXMsIGluYm94SGVpZ2h0IC8gMik7CiAgICAgICAgaW5Ub3VjaEhlaWdodCA9IGluVG91Y2hIZWlnaHQgPCAwID8gMCA6IGluVG91Y2hIZWlnaHQ7CiAgICAgICAgbGV0IGluWSA9IGxpbmVhciQyKCkKICAgICAgICAgICAgLmRvbWFpbihbMCwgaW5Bbm5vdGF0aW9ucy5sZW5ndGggLSAxXSkKICAgICAgICAgICAgLnJhbmdlKFstaW5Ub3VjaEhlaWdodCwgaW5Ub3VjaEhlaWdodF0pOwogICAgICAgIC8vIENhbGN1bGF0ZSBhbm5vdGF0aW9uIGVkZ2UgcG9zaXRpb24KICAgICAgICBsb2Rhc2guZWFjaChpbkFubm90YXRpb25zLCAoYSwgaSkgPT4gewogICAgICAgICAgICBhLnBvaW50cyA9IFsKICAgICAgICAgICAgICAgIC8vIFRoZSBhbm5vdGF0aW9uIG5vZGUgZW5kCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgZHg6IGEuZHggKyBhLndpZHRoIC8gMiwKICAgICAgICAgICAgICAgICAgICBkeTogYS5keSwKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAvLyBUaGUgaG9zdCBub2RlIGVuZAogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgIGR4OiAtcmVuZGVyTm9kZUluZm8uY29yZUJveC53aWR0aCAvIDIsCiAgICAgICAgICAgICAgICAgICAgLy8gb25seSB1c2Ugc2NhbGUgaWYgdGhlcmUgYXJlIG1vcmUgdGhhbiBvbmUsCiAgICAgICAgICAgICAgICAgICAgLy8gb3RoZXJ3aXNlIGNlbnRlciBpdCB2ZXJ0aWNhbGx5CiAgICAgICAgICAgICAgICAgICAgZHk6IGluQW5ub3RhdGlvbnMubGVuZ3RoID4gMSA/IGluWShpKSA6IDAsCiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICBdOwogICAgICAgIH0pOwogICAgICAgIC8vIENyZWF0aW5nIHNjYWxlcyBmb3IgdG91Y2ggcG9pbnQgYmV0d2VlbiB0aGUgb3V0LWFubm90YXRpb24gZWRnZXMKICAgICAgICAvLyBhbmQgdGhlaXIgaG9zdHMuCiAgICAgICAgbGV0IG91dFRvdWNoSGVpZ2h0ID0gTWF0aC5taW4ocmVuZGVyTm9kZUluZm8uaGVpZ2h0IC8gMiAtIHJlbmRlck5vZGVJbmZvLnJhZGl1cywgb3V0Ym94SGVpZ2h0IC8gMik7CiAgICAgICAgb3V0VG91Y2hIZWlnaHQgPSBvdXRUb3VjaEhlaWdodCA8IDAgPyAwIDogb3V0VG91Y2hIZWlnaHQ7CiAgICAgICAgbGV0IG91dFkgPSBsaW5lYXIkMigpCiAgICAgICAgICAgIC5kb21haW4oWzAsIG91dEFubm90YXRpb25zLmxlbmd0aCAtIDFdKQogICAgICAgICAgICAucmFuZ2UoWy1vdXRUb3VjaEhlaWdodCwgb3V0VG91Y2hIZWlnaHRdKTsKICAgICAgICBsb2Rhc2guZWFjaChvdXRBbm5vdGF0aW9ucywgKGEsIGkpID0+IHsKICAgICAgICAgICAgLy8gQWRkIHBvaW50IGZyb20gdGhlIGJvcmRlciBvZiB0aGUgYW5ub3RhdGlvbiBub2RlCiAgICAgICAgICAgIGEucG9pbnRzID0gWwogICAgICAgICAgICAgICAgLy8gVGhlIGhvc3Qgbm9kZSBlbmQKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICBkeDogcmVuZGVyTm9kZUluZm8uY29yZUJveC53aWR0aCAvIDIsCiAgICAgICAgICAgICAgICAgICAgLy8gb25seSB1c2Ugc2NhbGUgaWYgdGhlcmUgYXJlIG1vcmUgdGhhbiBvbmUsCiAgICAgICAgICAgICAgICAgICAgLy8gb3RoZXJ3aXNlIGNlbnRlciBpdCB2ZXJ0aWNhbGx5CiAgICAgICAgICAgICAgICAgICAgZHk6IG91dEFubm90YXRpb25zLmxlbmd0aCA+IDEgPyBvdXRZKGkpIDogMCwKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAvLyBUaGUgYW5ub3RhdGlvbiBub2RlIGVuZAogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgIGR4OiBhLmR4IC0gYS53aWR0aCAvIDIsCiAgICAgICAgICAgICAgICAgICAgZHk6IGEuZHksCiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICBdOwogICAgICAgIH0pOwogICAgICAgIHJlbmRlck5vZGVJbmZvLmhlaWdodCA9IE1hdGgubWF4KHJlbmRlck5vZGVJbmZvLmhlaWdodCwgaW5ib3hIZWlnaHQsIG91dGJveEhlaWdodCk7CiAgICB9CiAgICAvKioKICAgICAqIFNldCBzaXplIG9mIGFuIGFubm90YXRpb24gbm9kZS4KICAgICAqLwogICAgZnVuY3Rpb24gc2l6ZUFubm90YXRpb24oYSkgewogICAgICAgIHN3aXRjaCAoYS5hbm5vdGF0aW9uVHlwZSkgewogICAgICAgICAgICBjYXNlIEFubm90YXRpb25UeXBlLkNPTlNUQU5UOgogICAgICAgICAgICAgICAgbG9kYXNoLmV4dGVuZChhLCBQQVJBTVMkMS5jb25zdGFudC5zaXplKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlIEFubm90YXRpb25UeXBlLlNIT1JUQ1VUOgogICAgICAgICAgICAgICAgaWYgKGEubm9kZS50eXBlID09PSBOb2RlVHlwZS5PUCkgewogICAgICAgICAgICAgICAgICAgIGxvZGFzaC5leHRlbmQoYSwgUEFSQU1TJDEuc2hvcnRjdXRTaXplLm9wKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKGEubm9kZS50eXBlID09PSBOb2RlVHlwZS5NRVRBKSB7CiAgICAgICAgICAgICAgICAgICAgbG9kYXNoLmV4dGVuZChhLCBQQVJBTVMkMS5zaG9ydGN1dFNpemUubWV0YSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmIChhLm5vZGUudHlwZSA9PT0gTm9kZVR5cGUuU0VSSUVTKSB7CiAgICAgICAgICAgICAgICAgICAgbG9kYXNoLmV4dGVuZChhLCBQQVJBTVMkMS5zaG9ydGN1dFNpemUuc2VyaWVzKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIHRocm93IEVycm9yKCdJbnZhbGlkIG5vZGUgdHlwZTogJyArIGEubm9kZS50eXBlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlIEFubm90YXRpb25UeXBlLlNVTU1BUlk6CiAgICAgICAgICAgICAgICBsb2Rhc2guZXh0ZW5kKGEsIFBBUkFNUyQxLmNvbnN0YW50LnNpemUpOwogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBEZXRlcm1pbmVzIHRoZSBjZW50ZXIgcG9zaXRpb24gb2YgdGhlIG5vZGUncyBzaGFwZS4gVGhlIHBvc2l0aW9uIGRlcGVuZHMKICAgICAqIG9uIGlmIHRoZSBub2RlIGhhcyBpbiBhbmQgb3V0LWFubm90YXRpb25zLgogICAgICovCiAgICBmdW5jdGlvbiBjb21wdXRlQ1hQb3NpdGlvbk9mTm9kZVNoYXBlKHJlbmRlckluZm8pIHsKICAgICAgICBpZiAocmVuZGVySW5mby5leHBhbmRlZCkgewogICAgICAgICAgICByZXR1cm4gcmVuZGVySW5mby54OwogICAgICAgIH0KICAgICAgICBsZXQgZHggPSByZW5kZXJJbmZvLmluQW5ub3RhdGlvbnMubGlzdC5sZW5ndGggPyByZW5kZXJJbmZvLmluYm94V2lkdGggOiAwOwogICAgICAgIHJldHVybiAocmVuZGVySW5mby54IC0gcmVuZGVySW5mby53aWR0aCAvIDIgKyBkeCArIHJlbmRlckluZm8uY29yZUJveC53aWR0aCAvIDIpOwogICAgfQogICAgLyoqIFJldHVybnMgdGhlIGFuZ2xlIChpbiBkZWdyZWVzKSBiZXR3ZWVuIHR3byBwb2ludHMuICovCiAgICBmdW5jdGlvbiBhbmdsZUJldHdlZW5Ud29Qb2ludHMoYSwgYikgewogICAgICAgIGxldCBkeCA9IGIueCAtIGEueDsKICAgICAgICBsZXQgZHkgPSBiLnkgLSBhLnk7CiAgICAgICAgcmV0dXJuICgxODAgKiBNYXRoLmF0YW4oZHkgLyBkeCkpIC8gTWF0aC5QSTsKICAgIH0KICAgIC8qKgogICAgICogUmV0dXJucyBpZiBhIGxpbmUgZ29pbmcgdGhyb3VnaCB0aGUgc3BlY2lmaWVkIHBvaW50cyBpcyBhIHN0cmFpZ2h0IGxpbmUuCiAgICAgKi8KICAgIGZ1bmN0aW9uIGlzU3RyYWlnaHRMaW5lKHBvaW50cykgewogICAgICAgIGxldCBhbmdsZSA9IGFuZ2xlQmV0d2VlblR3b1BvaW50cyhwb2ludHNbMF0sIHBvaW50c1sxXSk7CiAgICAgICAgZm9yIChsZXQgaSA9IDE7IGkgPCBwb2ludHMubGVuZ3RoIC0gMTsgaSsrKSB7CiAgICAgICAgICAgIGxldCBuZXdBbmdsZSA9IGFuZ2xlQmV0d2VlblR3b1BvaW50cyhwb2ludHNbaV0sIHBvaW50c1tpICsgMV0pOwogICAgICAgICAgICAvLyBIYXZlIGEgdG9sZXJhbmNlIG9mIDEgZGVncmVlLgogICAgICAgICAgICBpZiAoTWF0aC5hYnMobmV3QW5nbGUgLSBhbmdsZSkgPiAxKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgYW5nbGUgPSBuZXdBbmdsZTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIHRydWU7CiAgICB9CiAgICAvKioKICAgICAqIFJldHVybnMgdGhlIGludGVyc2VjdGlvbiBvZiBhIGxpbmUgYmV0d2VlbiB0aGUgcHJvdmlkZWQgcG9pbnQKICAgICAqIGFuZCB0aGUgcHJvdmlkZWQgcmVjdGFuZ2xlLgogICAgICovCiAgICBmdW5jdGlvbiBpbnRlcnNlY3RQb2ludEFuZE5vZGUocG9pbnQsIG5vZGUpIHsKICAgICAgICAvLyBjeCBhbmQgY3kgYXJlIHRoZSBjZW50ZXIgb2YgdGhlIHJlY3RhbmdsZS4KICAgICAgICBsZXQgY3ggPSBub2RlLmV4cGFuZGVkID8gbm9kZS54IDogY29tcHV0ZUNYUG9zaXRpb25PZk5vZGVTaGFwZShub2RlKTsKICAgICAgICBsZXQgY3kgPSBub2RlLnk7CiAgICAgICAgLy8gQ2FsY3VsYXRlIHRoZSBzbG9wZQogICAgICAgIGxldCBkeCA9IHBvaW50LnggLSBjeDsKICAgICAgICBsZXQgZHkgPSBwb2ludC55IC0gY3k7CiAgICAgICAgbGV0IHcgPSBub2RlLmV4cGFuZGVkID8gbm9kZS53aWR0aCA6IG5vZGUuY29yZUJveC53aWR0aDsKICAgICAgICBsZXQgaCA9IG5vZGUuZXhwYW5kZWQgPyBub2RlLmhlaWdodCA6IG5vZGUuY29yZUJveC5oZWlnaHQ7CiAgICAgICAgbGV0IGRlbHRhWCwgZGVsdGFZOwogICAgICAgIGlmICgoTWF0aC5hYnMoZHkpICogdykgLyAyID4gKE1hdGguYWJzKGR4KSAqIGgpIC8gMikgewogICAgICAgICAgICAvLyBUaGUgaW50ZXJzZWN0aW9uIGlzIGFib3ZlIG9yIGJlbG93IHRoZSByZWN0YW5nbGUuCiAgICAgICAgICAgIGlmIChkeSA8IDApIHsKICAgICAgICAgICAgICAgIGggPSAtaDsKICAgICAgICAgICAgfQogICAgICAgICAgICBkZWx0YVggPSBkeSA9PT0gMCA/IDAgOiAoKG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iBDT05ESVRJT05TIE9GIEFOWSBLSU5ELCBlaXRoZXIgZXhwcmVzcyBvciBpbXBsaWVkLgogICAgU2VlIHRoZSBMaWNlbnNlIGZvciB0aGUgc3BlY2lmaWMgbGFuZ3VhZ2UgZ292ZXJuaW5nIHBlcm1pc3Npb25zIGFuZAogICAgbGltaXRhdGlvbnMgdW5kZXIgdGhlIExpY2Vuc2UuCiAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwogICAgY29uc3Qgc2VsZWN0Q2hpbGQkMSA9IHNlbGVjdENoaWxkOwogICAgY29uc3QgQ2xhc3MkMiA9IENsYXNzJDE7CiAgICAvKioKICAgICAqIFRoZSBkaW1lbnNpb25zIG9mIHRoZSBtaW5pbWFwIGluY2x1ZGluZyBwYWRkaW5nIGFuZCBtYXJnaW4uCiAgICAgKi8KICAgIGNvbnN0IE1JTklNQVBfQk9YX1dJRFRIID0gMzIwOwogICAgY29uc3QgTUlOSU1BUF9CT1hfSEVJR0hUID0gMTUwOwogICAgbGV0IGhlYWx0aFBpbGxFbnRyaWVzID0gWwogICAgICAgIHsKICAgICAgICAgICAgYmFja2dyb3VuZF9jb2xvcjogJyNDQzJGMkMnLAogICAgICAgICAgICBsYWJlbDogJ05hTicsCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAgIGJhY2tncm91bmRfY29sb3I6ICcjRkY4RDAwJywKICAgICAgICAgICAgbGFiZWw6ICct4oieJywKICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICAgYmFja2dyb3VuZF9jb2xvcjogJyNFQUVBRUEnLAogICAgICAgICAgICBsYWJlbDogJy0nLAogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgICBiYWNrZ3JvdW5kX2NvbG9yOiAnI0E1QTVBNScsCiAgICAgICAgICAgIGxhYmVsOiAnMCcsCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAgIGJhY2tncm91bmRfY29sb3I6ICcjMjYyNjI2JywKICAgICAgICAgICAgbGFiZWw6ICcrJywKICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICAgYmFja2dyb3VuZF9jb2xvcjogJyMwMDNFRDQnLAogICAgICAgICAgICBsYWJlbDogJyviiJ4nLAogICAgICAgIH0sCiAgICBdOwogICAgLyoqCiAgICAgKiBIZWxwZXIgbWV0aG9kIGZvciBmaXR0aW5nIHRoZSBncmFwaCBpbiB0aGUgc3ZnIHZpZXcuCiAgICAgKgogICAgICogQHBhcmFtIHN2ZyBUaGUgbWFpbiBzdmcuCiAgICAgKiBAcGFyYW0gem9vbUcgVGhlIHN2ZyBncm91cCB1c2VkIGZvciBwYW5uaW5nIGFuZCB6b29taW5nLgogICAgICogQHBhcmFtIGQzem9vbSBUaGUgem9vbSBiZWhhdmlvci4KICAgICAqIEBwYXJhbSBjYWxsYmFjayBDYWxsZWQgd2hlbiB0aGUgZml0dGluZyBpcyBkb25lLgogICAgICovCiAgICBmdW5jdGlvbiBmaXQkMihzdmcsIHpvb21HLCBkM3pvb20sIGNhbGxiYWNrKSB7CiAgICAgICAgbGV0IHN2Z1JlY3QgPSBzdmcuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCk7CiAgICAgICAgbGV0IHNjZW5lU2l6ZSA9IG51bGw7CiAgICAgICAgdHJ5IHsKICAgICAgICAgICAgc2NlbmVTaXplID0gem9vbUcuZ2V0QkJveCgpOwogICAgICAgICAgICBpZiAoc2NlbmVTaXplLndpZHRoID09PSAwKSB7CiAgICAgICAgICAgICAgICAvLyBUaGVyZSBpcyBubyBzY2VuZSBhbnltb3JlLiBXZSBoYXZlIGJlZW4gZGV0YWNoZWQgZnJvbSB0aGUgZG9tLgogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGNhdGNoIChlKSB7CiAgICAgICAgICAgIC8vIEZpcmVmb3ggcHJvZHVjZWQgTlNfRVJST1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gICBpZiAoaGFzSW5FeHRyYWN0KSB7CiAgICAgICAgICAgIGF1eFdpZHRoICs9IHJlbmRlck5vZGUub3V0RXh0cmFjdEJveC53aWR0aDsKICAgICAgICB9CiAgICAgICAgaWYgKGhhc091dEV4dHJhY3QpIHsKICAgICAgICAgICAgYXV4V2lkdGggKz0gcmVuZGVyTm9kZS5vdXRFeHRyYWN0Qm94LndpZHRoOwogICAgICAgIH0KICAgICAgICBpZiAoaGFzSW5FeHRyYWN0KSB7CiAgICAgICAgICAgIGxldCBpbkV4dHJhY3RYID0gcmVuZGVyTm9kZS5jb3JlQm94LndpZHRoOwogICAgICAgICAgICBpZiAoYXV4V2lkdGggPCBNSU5fQVVYX1dJRFRIKSB7CiAgICAgICAgICAgICAgICBpbkV4dHJhY3RYID0KICAgICAgICAgICAgICAgICAgICBpbkV4dHJhY3RYIC0gTUlOX0FVWF9XSURUSCArIHJlbmRlck5vZGUuaW5FeHRyYWN0Qm94LndpZHRoIC8gMjsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIGluRXh0cmFjdFggPQogICAgICAgICAgICAgICAgICAgIGluRXh0cmFjdFggLQogICAgICAgICAgICAgICAgICAgICAgICByZW5kZXJOb2RlLmluRXh0cmFjdEJveC53aWR0aCAvIDIgLQogICAgICAgICAgICAgICAgICAgICAgICByZW5kZXJOb2RlLm91dEV4dHJhY3RCb3gud2lkdGggLQogICAgICAgICAgICAgICAgICAgICAgICAoaGFzT3V0RXh0cmFjdCA/IG9mZnNldCA6IDApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGluRXh0cmFjdFggPQogICAgICAgICAgICAgICAgaW5FeHRyYWN0WCAtCiAgICAgICAgICAgICAgICAgICAgcmVuZGVyTm9kZS5saWJyYXJ5RnVuY3Rpb25zQm94LndpZHRoIC0KICAgICAgICAgICAgICAgICAgICAoaGFzTGlicmFyeUZ1bmN0aW9ucyA/IG9mZnNldCA6IDApOwogICAgICAgICAgICB0cmFuc2xhdGUkMShzZWxlY3RDaGlsZCQxKHNjZW5lR3JvdXAsICdnJywgQ2xhc3MkMi5TY2VuZS5JTkVYVFJBQ1QpLCBpbkV4dHJhY3RYLCB5VHJhbnNsYXRlKTsKICAgICAgICB9CiAgICAgICAgLy8gb3V0LWV4dHJhY3QKICAgICAgICBpZiAoaGFzT3V0RXh0cmFjdCkgewogICAgICAgICAgICBsZXQgb3V0RXh0cmFjdFggPSByZW5kZXJOb2RlLmNvcmVCb3gud2lkdGg7CiAgICAgICAgICAgIGlmIChhdXhXaWR0aCA8IE1JTl9BVVhfV0lEVEgpIHsKICAgICAgICAgICAgICAgIG91dEV4dHJhY3RYID0KICAgICAgICAgICAgICAgICAgICBvdXRFeHRyYWN0WCAtIE1JTl9BVVhfV0lEVEggKyByZW5kZXJOb2RlLm91dEV4dHJhY3RCb3gud2lkdGggLyAyOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgb3V0RXh0cmFjdFggLT0gcmVuZGVyTm9kZS5vdXRFeHRyYWN0Qm94LndpZHRoIC8gMjsKICAgICAgICAgICAgfQogICAgICAgICAgICBvdXRFeHRyYWN0WCA9CiAgICAgICAgICAgICAgICBvdXRFeHRyYWN0WCAtCiAgICAgICAgICAgICAgICAgICAgcmVuZGVyTm9kZS5saWJyYXJ5RnVuY3Rpb25zQm94LndpZHRoIC0KICAgICAgICAgICAgICAgICAgICAoaGFzTGlicmFyeUZ1bmN0aW9ucyA/IG9mZnNldCA6IDApOwogICAgICAgICAgICB0cmFuc2xhdGUkMShzZWxlY3RDaGlsZCQxKHNjZW5lR3JvdXAsICdnJywgQ2xhc3MkMi5TY2VuZS5PVVRFWFRSQUNUKSwgb3V0RXh0cmFjdFgsIHlUcmFuc2xhdGUpOwogICAgICAgIH0KICAgICAgICBpZiAoaGFzTGlicmFyeUZ1bmN0aW9ucykgewogICAgICAgICAgICBsZXQgbGlicmFyeUZ1bmN0aW9uc0V4dHJhY3RYID0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MCArICcsJyArIHkwICsgJyknKTsKICAgIH0KICAgIC8qKgogICAgICogSGVscGVyIGZvciBzZXR0aW5nIHBvc2l0aW9uIG9mIGEgc3ZnIHJlY3QKICAgICAqIEBwYXJhbSByZWN0IEEgZDMgc2VsZWN0aW9uIG9mIHJlY3QocykgdG8gc2V0IHBvc2l0aW9uIG9mLgogICAgICogQHBhcmFtIGN4IENlbnRlciB4LgogICAgICogQHBhcmFtIGN5IENlbnRlciB4LgogICAgICogQHBhcmFtIHdpZHRoIFdpZHRoIHRvIHNldC4KICAgICAqIEBwYXJhbSBoZWlnaHQgSGVpZ2h0IHRvIHNldC4KICAgICAqLwogICAgZnVuY3Rpb24gcG9zaXRpb25SZWN0KHJlY3QsIGN4LCBjeSwgd2lkdGgsIGhlaWdodCkgewogICAgICAgIHJlY3QKICAgICAgICAgICAgLnRyYW5zaXRpb24oKQogICAgICAgICAgICAuYXR0cigneCcsIGN4IC0gd2lkdGggLyAyKQogICAgICAgICAgICAuYXR0cigneScsIGN5IC0gaGVpZ2h0IC8gMikKICAgICAgICAgICAgLmF0dHIoJ3dpZHRoJywgd2lkdGgpCiAgICAgICAgICAgIC5hdHRyKCdoZWlnaHQnLCBoZWlnaHQpOwogICAgfQogICAgLyoqCiAgICAgKiBQb3NpdGlvbnMgYSB0cmlhbmdsZSBhbmQgc2l6ZXMgaXQuCiAgICAgKiBAcGFyYW0gcG9seWdvbiBwb2x5Z29uIHRvIHNldCBwb3NpdGlvbiBvZi4KICAgICAqIEBwYXJhbSBjeCBDZW50ZXIgeC4KICAgICAqIEBwYXJhbSBjeSBDZW50ZXIgeS4KICAgICAqIEBwYXJhbSB3aWR0aCBXaWR0aCBvZiBib3VuZGluZyBib3ggZm9yIHRyaWFuZ2xlLgogICAgICogQHBhcmFtIGhlaWdodCBIZWlnaHQgb2YgYm91bmRpbmcgYm94IGZvciB0cmlhbmdsZS4KICAgICAqLwogICAgZnVuY3Rpb24gcG9zaXRpb25UcmlhbmdsZShwb2x5Z29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vd25JdGVtcyA9IFtdOwogICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZWxlbWVudHNCcmVha2Rvd24ubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgaWYgKGVsZW1lbnRzQnJlYWtkb3duW2ldID4gMCkgewogICAgICAgICAgICAgICAgYnJlYWtkb3duSXRlbXMucHVzaCgnIygnICsgaGVhbHRoUGlsbEVudHJpZXNbaV0ubGFiZWwgKyAnKTogJyArIGVsZW1lbnRzQnJlYWtkb3duW2ldKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICB0ZXh0ICs9IGJyZWFrZG93bkl0ZW1zLmpvaW4oJywgJykgKyAnXG5cbic7CiAgICAgICAgLy8gSW4gc29tZSBjYXNlcyAoZS5nLiwgc2l6ZS0wIHRlbnNvcnM7IGFsbCBlbGVtZW50cyBhcmUgbmFuIG9yIGluZikgdGhlCiAgICAgICAgLy8gbWluL21heCBhbmQgbWVhbi9zdGRkZXYgc3RhdHMgYXJlIG1lYW5pbmdsZXNzLgogICAgICAgIGlmIChudW1lcmljU3RhdHMubWF4ID49IG51bWVyaWNTdGF0cy5taW4pIHsKICAgICAgICAgICAgdGV4dCArPSAnbWluOiAnICsgbnVtZXJpY1N0YXRzLm1pbiArICcsIG1heDogJyArIG51bWVyaWNTdGF0cy5tYXggKyAnXG4nOwogICAgICAgICAgICB0ZXh0ICs9ICdtZWFuOiAnICsgbnVtZXJpY1N0YXRzLm1lYW4gKyAnLCBzdGRkZXY6ICcgKyBudW1lcmljU3RhdHMuc3RkZGV2OwogICAgICAgIH0KICAgICAgICByZXR1cm4gdGV4dDsKICAgIH0KICAgIC8qKgogICAgICogUmVuZGVycyBhIGhlYWx0aCBwaWxsIGZvciBhbiBvcCBhdG9wIGEgbm9kZS4KICAgICAqIG5vZGVHcm91cEVsZW1lbnQ6IFRoZSBTVkcgZWxlbWVudCBpbiB3aGljaCB0byByZW5kZXIuCiAgICAgKiBoZWFsdGhQaWxsOiBBIGxpc3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ICBpZiAoYXR0cmlidXRlcyAmJiBhdHRyaWJ1dGVzLmxlbmd0aCkgewogICAgICAgICAgICAgICAgICAgIC8vIEZpbmQgdGhlIGF0dHJpYnV0ZSBmb3Igb3V0cHV0IHR5cGUgaWYgdGhlcmUgaXMgb25lLgogICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgYXR0cmlidXRlcy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgICAgICAgICBpZiAoYXR0cmlidXRlc1tpXS5rZXkgPT09ICdUJykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gTm90ZSB3aGV0aGVyIHRoZSBvdXRwdXQgdHlwZSBpcyBhbiBpbnRlZ2VyLgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG91dHB1dFR5cGUgPSBhdHRyaWJ1dGVzW2ldLnZhbHVlWyd0eXBlJ107CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaG91bGRSb3VuZE9uZXNEaWdpdCA9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3V0cHV0VHlwZSAmJiAvXkRUXyhCT09MfElOVHxVSU5UKS8udGVzdChvdXRwdXRUeXBlKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGxldCBzdGF0c1N2ZyA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnROUyhTVkdfTkFNRVNQQUNFLCAndGV4dCcpOwogICAgICAgIGlmIChOdW1iZXIuaXNGaW5pdGUobnVtZXJpY1N0YXRzLm1pbikgJiYgTnVtYmVyLmlzRmluaXRlKG51bWVyaWNTdGF0cy5tYXgpKSB7CiAgICAgICAgICAgIGNvbnN0IG1pblN0cmluZyA9IGh1bWFuaXplSGVhbHRoUGlsbFN0YXQobnVtZXJpY1N0YXRzLm1pbiwgc2hvdWxkUm91bmRPbmVzRGlnaXQpOwogICAgICAgICAgICBjb25zdCBtYXhTdHJpbmcgPSBodW1hbml6ZUhlYWx0aFBpbGxTdGF0KG51bWVyaWNTdGF0cy5tYXgsIHNob3VsZFJvdW5kT25lc0RpZ2l0KTsKICAgICAgICAgICAgaWYgKHRvdGFsQ291bnQgPiAxKSB7CiAgICAgICAgICAgICAgICBzdGF0c1N2Zy50ZXh0Q29udGVudCA9IG1pblN0cmluZyArICcgfiAnICsgbWF4U3RyaW5nOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgc3RhdHNTdmcudGV4dENvbnRlbnQgPSBtaW5TdHJpbmc7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKG5hbkNvdW50ID4gMCB8fCBuZWdJbmZDb3VudCA+IDAgfHwgcG9zSW5mQ291bnQgPiAwKSB7CiAgICAgICAgICAgICAgICBzdGF0c1N2Zy50ZXh0Q29udGVudCArPSAnICgnOwogICAgICAgICAgICAgICAgY29uc3QgYmFkVmFsdWVTdHJpbmdzID0gW107CiAgICAgICAgICAgICAgICBpZiAobmFuQ291bnQgPiAwKSB7CiAgICAgICAgICAgICAgICAgICAgYmFkVmFsdWVTdHJpbmdzLnB1c2goYE5hTsOXJHtuYW5Db3VudH1gKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChuZWdJbmZDb3VudCA+IDApIHsKICAgICAgICAgICAgICAgICAgICBiYWRWYWx1ZVN0cmluZ3MucHVzaChgLeKInsOXJHtuZWdJbmZDb3VudH1gKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChwb3NJbmZDb3VudCA+IDApIHsKICAgICAgICAgICAgICAgICAgICBiYWRWYWx1ZVN0cmluZ3MucHVzaChgK+KInsOXJHtwb3NJbmZDb3VudH1gKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHN0YXRzU3Zn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PT09PT09PT09PT09PT09PT09PSovCiAgICBsZXQgVGZHcmFwaERlYnVnZ2VyRGF0YUNhcmQgPSBjbGFzcyBUZkdyYXBoRGVidWdnZXJEYXRhQ2FyZCBleHRlbmRzIExlZ2FjeUVsZW1lbnRNaXhpbihQb2x5bWVyRWxlbWVudCkgewogICAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgICAgICBzdXBlciguLi5hcmd1bWVudHMpOwogICAgICAgICAgICAvLyBPbmx5IHJlbGV2YW50IGlmIHdlIGFyZSBpbiBhbGwgc3RlcHMgbW9kZSwgaW4gd2hpY2ggY2FzZSB0aGUgdXNlciBtYXkgd2FudCB0byB2aWV3IGhlYWx0aAogICAgICAgICAgICAvLyBwaWxscyBmb3IgYSBzcGVjaWZpYyBzdGVwLgogICAgICAgICAgICB0aGlzLnNwZWNpZmljSGVhbHRoUGlsbFN0ZXAgPSAwOwogICAgICAgICAgICB0aGlzLmhlYWx0aFBpbGxFbnRyaWVzID0gaGVhbHRoUGlsbEVudHJpZXM7CiAgICAgICAgfQogICAgICAgIHJlYWR5KCkgewogICAgICAgICAgICBzdXBlci5yZWFkeSgpOwogICAgICAgICAgICB2YXIgbWFpbkNvbnRhaW5lciA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdtYWluQ29udGFpbmVyJyk7CiAgICAgICAgICAgIHZhciBzY3JvbGxiYXJDb250YWluZXIgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCd0Zi1kYXNoYm9hcmQtbGF5b3V0IC5zY3JvbGxiYXInKTsKICAgICAgICAgICAgaWYgKG1haW5Db250YWluZXIgJiYgc2Nyb2xsYmFyQ29udGFpbmVyKSB7CiAgICAgICAgICAgICAgICAvLyBJZiB0aGlzIGNvbXBvbmVudCBpcyBiZWluZyB1c2VkIGluc2lkZSBvZiBUZW5zb3JCb2FyZCdzIGRhc2hib2FyZCBsYXlvdXQsIGl0IG1heSBlYXNpbHkKICAgICAgICAgICAgICAgIC8vIGNhdXNl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ICAgICAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICghc2VsZWN0ZWROb2RlKSB7CiAgICAgICAgICAgICAgICAvLyBObyBub2RlIGlzIHNlbGVjdGVkLgogICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY29uc3QgaGVhbHRoUGlsbHMgPSBub2RlTmFtZXNUb0hlYWx0aFBpbGxzW3NlbGVjdGVkTm9kZV07CiAgICAgICAgICAgIGlmICghaGVhbHRoUGlsbHMpIHsKICAgICAgICAgICAgICAgIC8vIFRoaXMgbm9kZSBsYWNrcyBhIGhlYWx0aCBwaWxsLgogICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gSWYgYWxsIHN0ZXBzIG1vZGUgaXMgZW5hYmxlZCwgd2UgdXNlIHRoZSBmaXJzdCBoZWFsdGggcGlsbCBpbiB0aGUgbGlzdCBiZWNhdXNlIHRoZSBKU09OCiAgICAgICAgICAgIC8vIHJlc3BvbnNlIGZyb20gdGhlIHNlcnZlciBpcyBhIG1hcHBpbmcgYmV0d2VlbiBub2RlIG5hbWUgYW5kIGEgbGlzdCBvZiAxIGhlYWx0aCBwaWxsLgogICAgICAgICAgICBjb25zdCBoZWFsdGhQaWxsID0gaGVhbHRoUGlsbHNbYWxsU3RlcHNNb2RlRW5hYmxlZCA/IDAgOiBoZWFsdGhQaWxsU3RlcEluZGV4XTsKICAgICAgICAgICAgaWYgKCFoZWFsdGhQaWxsKSB7CiAgICAgICAgICAgICAgICAvLyBUaGlzIG5vZGUgbGFja3MgYSBoZWFsdGggcGlsbCBhdCB0aGUgY3VycmVudCBzdGVwLgogICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gVGhlIGhlYWx0aCBwaWxsIGNvdW50IHZhbHVlcyBzdGFydCBhdCAyLiBFYW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LiBUZW5zb3Jib2FyZCBiYWNrZW5kIGxvZ2ljIGd1YXJhbnRlZXMgdGhhdCB0aGUgbGVuZ3RoCiAgICAgICAgICAgICAgICAvLyBvZiB0aGUgYXJyYXkgd2lsbCBiZSBncmVhdGVyIHRoYW4gMS4KICAgICAgICAgICAgICAgIHJldHVybiBub2RlTmFtZXNUb0hlYWx0aFBpbGxzW25vZGVOYW1lXS5sZW5ndGggLSAxOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIFJldHVybiBhIGZhbHN5IHZhbHVlLiBUaGUgc2xpZGVyIHNob3VsZCBiZSBoaWRkZW4uCiAgICAgICAgICAgIHJldHVybiAwOwogICAgICAgIH0KICAgICAgICBfaGFzRGVidWdnZXJOdW1lcmljQWxlcnRzKGRlYnVnZ2VyTnVtZXJpY0FsZXJ0cykgewogICAgICAgICAgICByZXR1cm4gZGVidWdnZXJOdW1lcmljQWxlcnRzICYmIGRlYnVnZ2VyTnVtZXJpY0FsZXJ0cy5sZW5ndGg7CiAgICAgICAgfQogICAgICAgIF91cGRhdGVBbGVydHNMaXN0KCkgewogICAgICAgICAgICB2YXIgZGVidWdnZXJOdW1lcmljQWxlcnRzID0gdGhpcy5kZWJ1Z2dlck51bWVyaWNBbGVydHM7CiAgICAgICAgICAgIHZhciBhbGVydEJvZHkgPSB0aGlzLiQkKCcjbnVtZXJpYy1hbGVydHMtYm9keScpOwogICAgICAgICAgICBpZiAoIWFsZXJ0Qm9keSkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGFsZXJ0Qm9keS5pbm5lclRleHQgPSAnJzsKICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBkZWJ1Z2dlck51bWVyaWNBbGVydHMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIHZhciBhbGVydCA9IGRlYnVnZ2VyTnVtZXJpY0FsZXJ0c1tpXTsKICAgICAgICAgICAgICAgIHZhciB0YWJsZVJv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TZWN0aW9uKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChhbGVydC5uYW5fZXZlbnRfY291bnQpIHsKICAgICAgICAgICAgICAgICAgICB2YXIgbmFuQ291bnRTZWN0aW9uID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnZGl2Jyk7CiAgICAgICAgICAgICAgICAgICAgbmFuQ291bnRTZWN0aW9uLmNsYXNzTGlzdC5hZGQoJ25hbi1taW5pLWhlYWx0aC1waWxsLXNlY3Rpb24nKTsKICAgICAgICAgICAgICAgICAgICBuYW5Db3VudFNlY3Rpb24uaW5uZXJUZXh0ID0gYWxlcnQubmFuX2V2ZW50X2NvdW50OwogICAgICAgICAgICAgICAgICAgIG5hbkNvdW50U2VjdGlvbi5zZXRBdHRyaWJ1dGUoJ3RpdGxlJywgYWxlcnQubmFuX2V2ZW50X2NvdW50ICsgJyBldmVudHMgd2l0aCBOYU4nKTsKICAgICAgICAgICAgICAgICAgICBtaW5pSGVhbHRoUGlsbC5hcHBlbmRDaGlsZChuYW5Db3VudFNlY3Rpb24pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZG9tKGFsZXJ0Qm9keSkuYXBwZW5kQ2hpbGQodGFibGVSb3cpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8vIEFkZHMgYSBsaXN0ZW5lciB0byBhbiBlbGVtZW50LCBzbyB0aGF0IHdoZW4gdGhhdCBlbGVtZW50IGlzIGNsaWNrZWQsIHRoZSB0ZW5zb3Igd2l0aAogICAgICAgIC8vIHRlbnNvck5hbWUgZXhwYW5kcy4KICAgICAgICBfYWRkT3BFeHBhbnNpb25MaXN0ZW5lcihjbGlja2FibGVFbGVtZW50LCB0ZW5zb3JOYW1lKSB7CiAgICAgICAgICAgIGNsaWNrYWJsZUVsZW1lbnQuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLCAoKSA9PiB7CiAgICAgICAgICAgICAgICAvLyBXaGVuIHRoZSB1c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AgICAgICAgICAgICAgICAgICAgICBzY3JvbGxUb09yaWdpbmFsTG9jYXRpb24oKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIEdpdmUgc29tZSB0aW1lIGZvciB0aGUgRE9NIG9mIHRoZSBpbmZvIGNhcmQgdG8gYmUgY3JlYXRlZCBiZWZvcmUgc2Nyb2xsaW5nIGRvd24uCiAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5zZXRUaW1lb3V0KHNjcm9sbFRvT3JpZ2luYWxMb2NhdGlvbiwgMjApOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgfTsKICAgIFRmR3JhcGhEZWJ1Z2dlckRhdGFDYXJkLnRlbXBsYXRlID0gaHRtbCBgCiAgICA8c3R5bGU+CiAgICAgIDpob3N0IHsKICAgICAgICBmb250LXNpemU6IDEycHg7CiAgICAgICAgbWFyZ2luOiAwOwogICAgICAgIHBhZGRpbmc6IDA7CiAgICAgICAgZGlzcGxheTogYmxvY2s7CiAgICAgIH0KCiAgICAgIGgyIHsKICAgICAgICBwYWRkaW5nOiAwOwogICAgICAgIHRleHQtYWxpZ246IGNlbnRlcjsKICAgICAgICBtYXJnaW46IDA7CiAgICAgIH0KCiAgICAgIC5oZWFsdGgtcGlsbC1sZWdlbmQgewogICAgICAgIHBhZGRpbmc6IDE1cHg7CiAgICAgIH0KCiAgICAgIC5oZWFsdGgtcGlsbC1sZWdlbmQgaDIgewogICAgICAgIHRleHQtYWxpZ246IGxlZnQ7CiAgICAgIH0KCiAgICAgIC5oZWFsdGgtcGlsbC1lbnRyeSB7CiAgICAgICAgbWFyZ2luOiAxMHB4IDEwcHggMTBweCAwOwogICAgICB9CgogICAgICAuaGVhbHRoLXBpbGwtZW50cnkgLmNvbG9yLXByZXZpZXcgewogICAgICAgIHdpZHRoOi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GVyIGxhY2tzIGEgbWl4aW4gZm9yIHRob3NlIHBhZGRpbmcgdmFsdWVzLiAqLwogICAgICAgIHdpZHRoOiBjYWxjKDEwMCUgKyAzMXB4KTsKICAgICAgfQoKICAgICAgI2hlYWx0aC1waWxscy1sb2FkaW5nLXNwaW5uZXIgewogICAgICAgIHdpZHRoOiAyMHB4OwogICAgICAgIGhlaWdodDogMjBweDsKICAgICAgICB2ZXJ0aWNhbC1hbGlnbjogdG9wOwogICAgICB9CgogICAgICAjaGVhbHRoLXBpbGwtc3RlcC1udW1iZXItaW5wdXQgewogICAgICAgIHRleHQtYWxpZ246IGNlbnRlcjsKICAgICAgICB2ZXJ0aWNhbC1hbGlnbjogdG9wOwogICAgICB9CgogICAgICAjbnVtZXJpYy1hbGVydHMtdGFibGUtY29udGFpbmVyIHsKICAgICAgICBtYXgtaGVpZ2h0OiA0MDBweDsKICAgICAgICBvdmVyZmxvdy14OiBoaWRkZW47CiAgICAgICAgb3ZlcmZsb3cteTogYXV0bzsKICAgICAgfQoKICAgICAgI251bWVyaWMtYWxlcnRzLXRhYmxlIHsKICAgICAgICB0ZXh0LWFsaWduOiBsZWZ0OwogICAgICB9CgogICAgICAjbnVtZXJpYy1hbGVydHMtdGFibGUgdGQgewogICAgICAgIHZlcnRpY2FsLWFsaWduOiB0b3A7CiAgICAgIH0KCiAgICAgICNudW1lcmljLWFsZXJ0cy10YWJsZSAuZmlyc3Qtb2ZmZW5zZS10ZCB7CiAgICAgICAgZGlzcGxheTogaW5saW5lLWJsb2NrOwogICAgICB9CgogICAgICAuZmlyc3Qtb2ZmZW5zZS10ZCB7CiAgICAgICAgd2lkdGg6IDgwcHg7CiAgICAgIH0KCiAgICAgIC50ZW5zb3ItZGV2aWNlLXRkIHsKICAgICAgICBtYXgtd2lkdGg6IDE0MHB4OwogICAgICAgIHdvcmQtd3JhcDogYnJlYWstd29yZDsKICAgICAgfQoKICAgICAgLnRlbnNvci1zZWN0aW9uLXdpdGhpbi10YWJsZSB7CiAgICAgICAgY29sb3I6ICMyNjYyMzY7CiAgICAgICAgY3Vyc29yOiBwb2ludGVyOwogICAgICAgIG9wYWNpdHk6IDAuODsKICAgICAgICB0ZXh0LWRlY29yYXRpb246IHVuZGVybGluZTsKICAgICAgfQoKICAgICAgLnRlbnNvci1zZWN0aW9uLXdpdGhpbi10YWJsZTpob3ZlciB7CiAgICAgICAgb3BhY2l0eTogMTsKICAgICAgfQoKICAgICAgLmRldmljZS1zZWN0aW9uLXdpdGhpbi10YWJsZSB7CiAgICAgICAgY29sb3I6ICM2NjY7CiAgICAgIH0KCiAgICAgIC5taW5pLWhlYWx0aC1waWxsIHsKICAgICAgICB3aWR0aDogMTMwcHg7CiAgICAgIH0KCiAgICAgIC5taW5pLWhlYWx0aC1waWxsID4gZGl2IHsKICAgICAgICBoZWlnaHQ6IDEwMCU7CiAgICAgICAgd2lkdGg6IDYwcHg7CiAgICAgICAgYm9yZGVyLXJhZGl1czogM3B4OwogICAgICB9CgogICAgICAjZXZlbnQtY291bnRzLXRoIHsKICAgICAgICBwYWRkaW5nOiAwIDAgMCAxMHB4OwogICAgICB9CgogICAgICAubmVnYXRpdmUtaW5mLW1pbmktaGVhbHRoLXBpbGwtc2VjdGlvbiB7CiAgICAgICAgYmFja2dyb3VuZDogcmdiKDI1NSwgMTQxLCAwKTsKICAgICAgICB3aWR0aDogMjBweDsKICAgICAgfQoKICAgICAgLnBvc2l0aXZlLWluZi1taW5pLWhlYWx0aC1waWxsLXNlY3Rpb24gewogICAgICAgIGJhY2tncm91bmQ6IHJnYigwLCA2MiwgMjEyKTsKICAgICAgICB3aWR0aDogMjBweDsKICAgICAgfQoKICAgICAgLm5hbi1taW5pLWhlYWx0aC1waWxsLXNlY3Rpb24gewogICAgICAgIGJhY2tncm91bmQ6IHJnYigyMDQsIDQ3LCA0NCk7CiAgICAgICAgd2lkdGg6IDIwcHg7CiAgICAgIH0KCiAgICAgIC5uZWdhdGl2ZS1pbmYtbWluaS1oZWFsdGgtcGl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bGU9ImJhY2tncm91bmQ6W1tpdGVtLmJhY2tncm91bmRfY29sb3JdXSIKICAgICAgICAgID48L2Rpdj4KICAgICAgICAgIDxkaXYgY2xhc3M9ImNvbG9yLWxhYmVsIj5bW2l0ZW0ubGFiZWxdXTwvZGl2PgogICAgICAgICAgPGRpdiBjbGFzcz0idGVuc29yLWNvdW50Ij4KICAgICAgICAgICAgW1tfY29tcHV0ZVRlbnNvckNvdW50U3RyaW5nKGhlYWx0aFBpbGxWYWx1ZXNGb3JTZWxlY3RlZE5vZGUsCiAgICAgICAgICAgIGluZGV4KV1dCiAgICAgICAgICA8L2Rpdj4KICAgICAgICA8L2Rpdj4KICAgICAgPC90ZW1wbGF0ZT4KICAgICAgPGRpdiBoaWRkZW4kPSJbWyFfaGFzRGVidWdnZXJOdW1lcmljQWxlcnRzKGRlYnVnZ2VyTnVtZXJpY0FsZXJ0cyldXSI+CiAgICAgICAgPGgyIGlkPSJudW1lcmljLWFsZXJ0cy1oZWFkZXIiPk51bWVyaWMgQWxlcnRzPC9oMj4KICAgICAgICA8cD5BbGVydHMgYXJlIHNvcnRlZCBmcm9tIHRvcCB0byBib3R0b20gYnkgaW5jcmVhc2luZyB0aW1lc3RhbXAuPC9wPgogICAgICAgIDxkaXYgaWQ9Im51bWVyaWMtYWxlcnRzLXRhYmxlLWNvbnRhaW5lciI+CiAgICAgICAgICA8dGFibGUgaWQ9Im51bWVyaWMtYWxlcnRzLXRhYmxlIj4KICAgICAgICAgICAgPHRoZWFkPgogICAgICAgICAgICAgIDx0cj4KICAgICAgICAgICAgICAgIDx0aD5GaXJzdCBPZmZlbnNlPC90aD4KICAgICAgICAgICAgICAgIDx0aD5UZW5zb3IgKERldmljZSk8L3RoPgogICAgICAgICAgICAgICAgPHRoIGlkPSJldmVudC1jb3VudHMtdGgiPkV2ZW50IENvdW50czwvdGg+CiAgICAgICAgICAgICAgPC90cj4KICAgICAgICAgICAgPC90aGVhZD4KICAgICAgICAgICAgPHRib2R5IGlkPSJ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QSJdID0gIk1FVEEiOwogICAgICAgIEdyYXBoSWNvblR5cGVbIk9QIl0gPSAiT1AiOwogICAgICAgIEdyYXBoSWNvblR5cGVbIlNFUklFUyJdID0gIlNFUklFUyI7CiAgICAgICAgR3JhcGhJY29uVHlwZVsiU1VNTUFSWSJdID0gIlNVTU1BUlkiOwogICAgfSkoR3JhcGhJY29uVHlwZSB8fCAoR3JhcGhJY29uVHlwZSA9IHt9KSk7CiAgICBsZXQgVGZHcmFwaEljb24gPSBjbGFzcyBUZkdyYXBoSWNvbiBleHRlbmRzIExlZ2FjeUVsZW1lbnRNaXhpbihQb2x5bWVyRWxlbWVudCkgewogICAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgICAgICBzdXBlciguLi5hcmd1bWVudHMpOwogICAgICAgICAgICB0aGlzLnZlcnRpY2FsID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuZmlsbE92ZXJyaWRlID0gbnVsbDsKICAgICAgICAgICAgdGhpcy5zdHJva2VPdmVycmlkZSA9IG51bGw7CiAgICAgICAgICAgIHRoaXMuaGVpZ2h0ID0gMjA7CiAgICAgICAgICAgIHRoaXMuZmFkZWQgPSBmYWxzZTsKICAgICAgICB9CiAgICAgICAgZ2V0U3ZnRGVmaW5hYmxlRWxlbWVudCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuJC5zdmdEZWZzOwogICAgICAgIH0KICAgICAgICBnZXQgX2ZpbGwoKSB7CiAgICAgICAgICAgIHZhciB0eXBlID0gdGhpcy50eXBlOwogICAgICAgICAgICB2YXIgZmlsbE92ZXJyaWRlID0gdGhpcy5maWxsT3ZlcnJpZGU7CiAgICAgICAgICAgIGlmIChmaWxsT3ZlcnJpZGUgIT0gbnVsbCkKICAgICAgICAgICAgICAgIHJldHVybiBmaWxsT3ZlcnJpZGU7CiAgICAgICAgICAgIHN3aXRjaCAodHlwZSkgewogICAgICAgICAgICAgICAgY2FzZSBHcmFwaEljb25UeXBlLk1FVEE6CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIE1ldGFub2RlQ29sb3JzLkRFRkFVTFRfRklMTDsKICAgICAgICAgICAgICAgIGNhc2UgR3JhcGhJY29uVHlwZS5TRVJJRVM6CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFNlcmllc05vZGVDb2xvcnMuREVGQVVMVF9GSUxMOwogICAgICAgICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gT3BOb2RlQ29sb3JzLkRFRkFVTFRfRklMTDsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBnZXQgX3N0cm9rZSgpIHsKICAgICAgICAgICAgdmFyIHR5cGUgPSB0aGlzLnR5cGU7CiAgICAgICAgICAgIHZhciBzdHJva2VPdmVycmlkZSA9IHRoaXMuc3Ryb2tlT3ZlcnJpZGU7CiAgICAgICAgICAgIGlmIChzdHJva2VPdmVycmlkZSAhPSBudWxsKQogICAgICAgICAgICAgICAgcmV0dXJuIHN0cm9rZU92ZXJyaWRlOwogICAgICAgICAgICBzd2l0Y2ggKHR5cGUpIHsKICAgICAgICAgICAgICAgIGNhc2UgR3JhcGhJY29uVHlwZS5NRVRBOgogICAgICAgICAgICAgICAgICAgIHJldHVybiBNZXRhbm9kZUNvbG9ycy5ERUZBVUxUX1NUUk9LRTsKICAgICAgICAgICAgICAgIGNhc2UgR3JhcGhJY29uVHlwZS5TRVJJRVM6CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFNlcmllc05vZGVDb2xvcnMuREVGQVVMVF9TVFJPS0U7CiAgICAgICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICAgICAgIHJldHVybiBPcE5vZGVDb2xvcnMuREVGQVVMVF9TVFJPS0U7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVGVzdCB3aGV0aGVyIHRoZSBzcGVjaWZpZWQgbm9kZSdzIHR5cGUsIG9yIHRoZSBsaXRlcmFsIHR5cGUgc3RyaW5nLAogICAgICAgICAqIG1hdGNoIGEgcGFydGljdWxhciBvdGhlciB0eXBlLgogICAgICAgICAqLwogICAgICAgIF9pc1R5cGUodHlwZSwgdGFyZ2V0VHlwZSkgewogICAgICAgICAgICByZXR1cm4gdHlwZSA9PT0gdGFyZ2V0VHlwZTsKICAgICAgICB9CiAgICAgICAgX2ZhZGVkQ2xhc3MoZmFkZWQsIHNoYXBlKSB7CiAgICAgICAgICAgIHJldHVybiBmYWRlZCA/ICdmYWRlZC0nICsgc2hhcGUgOiAnJzsKICAgICAgICB9CiAgICB9OwogICAgVGZHcmFwaEljb24udGVtcGxhdGUgPSBodG1sIGAKICAgIDxzdHlsZT4KICAgICAgOmhvc3QgewogICAgICAgIGZvbnQtc2l6ZTogMDsKICAgICAgfQoKICAgICAgLmZhZGVkLXJlY3QgewogICAgICAgIGZpbGw6IHVybCgjcmVjdEhhdGNoKTsKICAgICAgfQoKICAgICAgLmZhZGVkLWVsbGlwc2UgewogICAgICAgIGZpbGw6IHVybCgjZWxsaXBzZUhhdGNoKTsKICAgICAgfQoKICAgICAgLmZhZGVkLXJlY3QsCiAgICAgIC5mYWRlZC1lbGxpcHNlLAogICAgICAuZmFkZWQtc2VyaWVzIHsKICAgICAgICBzdHJva2U6IHZhcigtLXRiLWdyYXBoLWZhZGVkKSAhaW1wb3J0YW50OwogICAgICB9CiAgICAgICNyZWN0SGF0Y2ggbGluZSwKICAgICAgI2VsbGlwc2VIYXRjaCBsaW5lIHsKICAgICAgICBjb2xvcjogI2UwZDRiMyAhaW1wb3J0YW50OwogICAgICAgIGZpbGw6IHdoaXRlOwogICAgICAgIHN0cm9rZTogI2UwZDRiMyAhaW1wb3J0YW50OwogICAgICB9CiAgICA8L3N0eWxlPgogICAgPCEtLSBTVkcgZm9yIGRlZmluaXRpb25zIC0tPgogICAgPHN2ZyBoZWlnaHQ9IjAiIHdpZHRoPSIwIiBpZD0ic3ZnRGVmcyI+CiAgICAgIDxkZWZzPgogICAgICAgIDwh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RhdGlvbiBlbGxpcHNlIChzbWFsbGVyKS4gLS0+CiAgICAgICAgPGVsbGlwc2UKICAgICAgICAgIGlkPSJvcC1ub2RlLWFubm90YXRpb24tc3RhbXAiCiAgICAgICAgICByeD0iNSIKICAgICAgICAgIHJ5PSIyIgogICAgICAgICAgc3Ryb2tlPSJpbmhlcml0IgogICAgICAgICAgZmlsbD0iaW5oZXJpdCIKICAgICAgICA+PC9lbGxpcHNlPgogICAgICAgIDwhLS0gVmVydGljYWxseSBzdGFja2VkIHNlcmllcyBvZiBPcCBub2RlcyB3aGVuIHVuZXhwYW5kZWQuIC0tPgogICAgICAgIDxnIGlkPSJvcC1zZXJpZXMtdmVydGljYWwtc3RhbXAiPgogICAgICAgICAgPHVzZSB4bGluazpocmVmPSIjb3Atbm9kZS1zdGFtcCIgeD0iOCIgeT0iOSI+PC91c2U+CiAgICAgICAgICA8dXNlIHhsaW5rOmhyZWY9IiNvcC1ub2RlLXN0YW1wIiB4PSI4IiB5PSI2Ij48L3VzZT4KICAgICAgICAgIDx1c2UgeGxpbms6aHJlZj0iI29wLW5vZGUtc3RhbXAiIHg9IjgiIHk9IjMiPjwvdXNlPgogICAgICAgIDwvZz4KICAgICAgICA8ZyBpZD0ib3Atc2VyaWVzLWhvcml6b250YWwtc3RhbXAiPgogICAgICAgICAgPHVzZSB4bGluazpocmVmPSIjb3Atbm9kZS1zdGFtcCIgeD0iMTYiIHk9IjQiPjwvdXNlPgogICAgICAgICAgPHVzZSB4bGluazpocmVmPSIjb3Atbm9kZS1zdGFtcCIgeD0iMTIiIHk9IjQiPjwvdXNlPgogICAgICAgICAgPHVzZSB4bGluazpocmVmPSIjb3Atbm9kZS1zdGFtcCIgeD0iOCIgeT0iNCI+PC91c2U+CiAgICAgICAgPC9nPgogICAgICAgIDxnCiAgICAgICAgICBpZD0ic3VtbWFyeS1pY29uIgogICAgICAgICAgZmlsbD0iIzg0ODQ4NCIKICAgICAgICAgIGhlaWdodD0iMTIiCiAgICAgICAgICB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B5PSIxIgogICAgICAgICAgZmlsbCQ9IltbX2ZpbGxdXSIKICAgICAgICAgIHN0cm9rZSQ9IltbX3N0cm9rZV1dIgogICAgICAgICAgY2xhc3MkPSJ7e19mYWRlZENsYXNzKGZhZGVkLCAncmVjdCcpfX0iCiAgICAgICAgICBzdHJva2Utd2lkdGg9IjJweCIKICAgICAgICAgIGhlaWdodD0iMTQiCiAgICAgICAgICB3aWR0aD0iMzUiCiAgICAgICAgICByeD0iNSIKICAgICAgICAgIHJ5PSI1IgogICAgICAgID48L3JlY3Q+CiAgICAgIDwvc3ZnPgogICAgPC90ZW1wbGF0ZT4KICAgIDx0ZW1wbGF0ZSBpcz0iZG9tLWlmIiBpZj0iW1tfaXNUeXBlKHR5cGUsICdTRVJJRVMnKV1dIj4KICAgICAgPHRlbXBsYXRlIGlzPSJkb20taWYiIGlmPSJbW3ZlcnRpY2FsXV0iPgogICAgICAgIDxzdmcKICAgICAgICAgIGhlaWdodCQ9IltbaGVpZ2h0XV0iCiAgICAgICAgICBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWluWU1pZCBtZWV0IgogICAgICAgICAgdmlld0JveD0iMCAwIDE2IDE1IgogICAgICAgID4KICAgICAgICAgIDx1c2UKICAgICAgICAgICAgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiCiAgICAgICAgICAgIHhsaW5rOmhyZWY9IiNvcC1zZXJpZXMtdmVydGljYWwtc3RhbXAiCiAgICAgICAgICAgIGZpbGwkPSJbW19maWxsXV0iCiAgICAgICAgICAgIHN0cm9rZSQ9IltbX3N0cm9rZV1dIgogICAgICAgICAgICBjbGFzcyQ9Int7X2ZhZGVkQ2xhc3MoZmFkZWQsICdzZXJpZXMnKX19IgogICAgICAgICAgICB4PSIwIgogICAgICAgICAgICB5PSIyIgogICAgICAgICAgPjwvdXNlPgogICAgICAgIDwvc3ZnPgogICAgICA8L3RlbXBsYXRlPgogICAgICA8dGVtcGxhdGUg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AgIHByb3BlcnR5KHsKICAgICAgICAgICAgdHlwZTogU3RyaW5nLAogICAgICAgIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgU3RyaW5nKQogICAgXSwgVGZHcmFwaEljb24ucHJvdG90eXBlLCAiZmlsbE92ZXJyaWRlIiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsKICAgICAgICAgICAgdHlwZTogU3RyaW5nLAogICAgICAgIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgU3RyaW5nKQogICAgXSwgVGZHcmFwaEljb24ucHJvdG90eXBlLCAic3Ryb2tlT3ZlcnJpZGUiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBOdW1iZXIsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBOdW1iZXIpCiAgICBdLCBUZkdyYXBoSWNvbi5wcm90b3R5cGUsICJoZWlnaHQiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBCb29sZWFuLAogICAgICAgIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgQm9vbGVhbikKICAgIF0sIFRmR3JhcGhJY29uLnByb3RvdHlwZSwgImZhZGVkIiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIGNvbXB1dGVkKCd0eXBlJywgJ2ZpbGxPdmVycmlkZScpLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgU3RyaW5nKSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246cGFyYW10eXBlcyIsIFtdKQogICAgXSwgVGZHcmFwaEljb24ucHJvdG90eXBlLCAiX2ZpbGwiLCBudWxsKTsKICAgIF9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2Rpc3BsYXknLCAnYmxvY2snKQogICAgICAgICAgICAgICAgLnN0eWxlKCdsZWZ0JywgZXZlbnQkMS5jbGllbnRYIC0gc2NlbmVPZmZzZXQubGVmdCArIDEgKyAncHgnKQogICAgICAgICAgICAgICAgLnN0eWxlKCd0b3AnLCBldmVudCQxLmNsaWVudFkgLSBzY2VuZU9mZnNldC50b3AgKyAxICsgJ3B4Jyk7CiAgICAgICAgICAgIC8vIFN0b3AgdGhlIGV2ZW50IGZyb20gcHJvcGFnYXRpbmcgZnVydGhlci4KICAgICAgICAgICAgZXZlbnQkMS5wcmV2ZW50RGVmYXVsdCgpOwogICAgICAgICAgICBldmVudCQxLnN0b3BQcm9wYWdhdGlvbigpOwogICAgICAgICAgICBmdW5jdGlvbiBtYXliZUNsb3NlTWVudShldmVudCkgewogICAgICAgICAgICAgICAgaWYgKGV2ZW50ICYmIGV2ZW50LmNvbXBvc2VkUGF0aCgpLmluY2x1ZGVzKG1lbnVOb2RlKSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIG1lbnVTZWxlY3Rpb24uc3R5bGUoJ2Rpc3BsYXknLCAnbm9uZScpOwogICAgICAgICAgICAgICAgZG9jdW1lbnQuYm9keS5yZW1vdmVFdmVudExpc3RlbmVyKCdtb3VzZWRvd24nLCBtYXliZUNsb3NlTWVudSwgewogICAgICAgICAgICAgICAgICAgIGNhcHR1cmU6IHRydWUsCiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBEaXNtaXNzIGFuZCByZW1vdmUgdGhlIGNsaWNrIGxpc3RlbmVyIGFzIHNvb24gYXMgdGhlcmUgaXMgYSBtb3VzZWRvd24KICAgICAgICAgICAgLy8gb24gdGhlIGRvY3VtZW50LiBXZSB1c2UgY2FwdHVyZSBsaXN0ZW5lciBzbyBubyBjb21wb25lbnQgY2FuIHN0b3AKICAgICAgICAgICAgLy8gY29udGV4dCBtZW51IGZyb20gZGlzbWlzc2luZyBkdWUgdG8gc3RvcHBlZCBwcm9wYWdhdGlvbi4KICAgICAgICAgICAgZG9jdW1lbnQuYm9keS5hZGRFdmVudExpc3RlbmVyKCdtb3VzZWRvd24nLCBtYXliZUNsb3NlTWVudSwgewogICAgICAgICAgICAgICAgY2FwdHVyZTogdHJ1ZSwKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIC8vIEFkZCBwcm92aWRlZCBpdGVtcyB0byB0aGUgY29udGV4dCBtZW51LgogICAgICAgICAgICBtZW51U2VsZWN0aW9uLmh0bWwoJycpOwogICAgICAgICAgICBsZXQgbGlzdCA9IG1lbnVTZWxlY3Rpb24uYXBwZW5kKCd1bCcpOwogICAgICAgICAgICBsaXN0CiAgICAgICAgICAgICAgICAuc2VsZWN0QWxsKCdsaScpCiAgICAgICAgICAgICAgICAuZGF0YShtZW51KQogICAgICAgICAgICAgICAgLmVudGVyKCkKICAgICAgICAgICAgICAgIC5hcHBlbmQoJ2xpJykKICAgICAgICAgICAgICAgIC5vbignY2xpY2snLCAoZCwgaSkgPT4gewogICAgICAgICAgICAgICAgZC5hY3Rpb24odGhpcywgZGF0YSwgaW5kZXgpOwogICAgICAgICAgICAgICAgbWF5YmVDbG9zZU1lbnUoKTsKICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgIC5odG1sKGZ1bmN0aW9uIChkKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gZC50aXRsZShkYXRhKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfTsKICAgIH0KCiAgICAvKiBDb3B5cmlnaHQgMjAxNSBUaGUgVGVuc29yRmxvdyBBdXRob3JzLiBBbGwgUmlnaHRzIFJlc2VydmVkLgoKICAgIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSAnTGljZW5zZScpOwogICAgeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tc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2VHcm91cDsKICAgICAgICAgICAgLy8gaW5kZXggbm9kZSBncm91cCBmb3IgcXVpY2sgaGlnaGxpZ2h0aW5nCiAgICAgICAgICAgIHNjZW5lQ29tcG9uZW50Ll9lZGdlR3JvdXBJbmRleFtnZXRFZGdlS2V5KGQpXSA9IGVkZ2VHcm91cDsKICAgICAgICAgICAgaWYgKHNjZW5lQ29tcG9uZW50LmhhbmRsZUVkZ2VTZWxlY3RlZCkgewogICAgICAgICAgICAgICAgLy8gVGhlIHVzZXIgb3Igc29tZSBoaWdoZXItbGV2ZWwgY29tcG9uZW50IGhhcyBvcHRlZCB0byBtYWtlIGVkZ2VzIHNlbGVjdGFibGUuCiAgICAgICAgICAgICAgICBlZGdlR3JvdXAub24oJ2NsaWNrJywgKGQpID0+IHsKICAgICAgICAgICAgICAgICAgICAvLyBTdG9wIHRoaXMgZXZlbnQncyBwcm9wYWdhdGlvbiBzbyB0aGF0IGl0IGlzbid0IGFsc28gY29uc2lkZXJlZAogICAgICAgICAgICAgICAgICAgIC8vIGEgZ3JhcGgtc2VsZWN0LgogICAgICAgICAgICAgICAgICAgIGV2ZW50LnN0b3BQcm9wYWdhdGlvbigpOwogICAgICAgICAgICAgICAgICAgIHNjZW5lQ29tcG9uZW50LmZpcmUoJ2VkZ2Utc2VsZWN0JywgewogICAgICAgICAgICAgICAgICAgICAgICBlZGdlRGF0YTogZCwKICAgICAgICAgICAgICAgICAgICAgICAgZWRnZUdyb3VwOiBlZGdlR3JvdXAsCiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBBZGQgbGluZSBkdXJpbmcgZW50ZXIgYmVjYXVzZSB3ZSdyZSBhc3N1bWluZyB0aGF0IHR5cGUgb2YgbGluZQogICAgICAgICAgICAvLyBub3JtYWxseSBkb2VzIG5vdCBjaGFuZ2UuCiAgICAgICAgICAgIGFwcGVuZEVkZ2UoZWRnZUdyb3VwLCBkLCBz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QgZnJhY3Rpb25TdGlja2luZ091dCA9IDEgLSByZWZYIC8gdmlld0JveFdpZHRoOwogICAgICAgICAgICBjb25zdCBsZW5ndGggPSBwYXRoTm9kZS5nZXRUb3RhbExlbmd0aCgpIC0gbWFya2VyV2lkdGggKiBmcmFjdGlvblN0aWNraW5nT3V0OwogICAgICAgICAgICBjb25zdCBwb2ludCA9IHBhdGhOb2RlLmdldFBvaW50QXRMZW5ndGgobGVuZ3RoKTsKICAgICAgICAgICAgLy8gRmlndXJlIG91dCBob3cgbWFueSBzZWdtZW50cyBvZiB0aGUgcGF0aCB3ZSBuZWVkIHRvIHJlbW92ZSBpbiBvcmRlcgogICAgICAgICAgICAvLyB0byBzaG9ydGVuIHRoZSBwYXRoLgogICAgICAgICAgICBjb25zdCBzZWdJbmRleCA9IGdldFBhdGhTZWdtZW50SW5kZXhBdExlbmd0aChwb2ludHMsIGxlbmd0aCwgbGluZUZ1bmMpOwogICAgICAgICAgICAvLyBVcGRhdGUgdGhlIHZlcnkgbGFzdCBzZWdtZW50LgogICAgICAgICAgICBwb2ludHNbc2VnSW5kZXhdID0geyB4OiBwb2ludC54LCB5OiBwb2ludC55IH07CiAgICAgICAgICAgIC8vIElnbm9yZSBldmVyeSBwb2ludCBhZnRlciBzZWdJbmRleC4KICAgICAgICAgICAgcmV0dXJuIHBvaW50cy5zbGljZSgwLCBzZWdJbmRleCArIDEpOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogRm9yIGEgZ2l2ZW4gZDMgc2VsZWN0aW9uIGFuZCBkYXRhIG9iamVjdCwgY3JlYXRlIGEgcGF0aCB0byByZXByZXNlbnQgdGhlCiAgICAgKiBlZGdlIGRlc2NyaWJlZCBpbiBkLmxhYmVsLgogICAgICoKICAgICAqIElmIGQubGFiZWwgaXMgZGVmaW5lZCwgaXQgd2lsbCBiZSBhIFJlbmRlck1ldGFlZGdlSW5mbyBpbnN0YW5jZS4gSXQKICAgICAqIHdpbGwgc29tZXRpbWVzIGJlI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dHJva2Utd2lkdGgnLCBzdHJva2VXaWR0aCArICdweCcpOwogICAgICAgIC8vIENoZWNrIGlmIHRoZXJlIGlzIGEgcmVmZXJlbmNlIGVkZ2UgYW5kIGFkZCBhbiBhcnJvd2hlYWQgb2YgdGhlIHJpZ2h0IHNpemUuCiAgICAgICAgaWYgKGQubGFiZWwgJiYgZC5sYWJlbC5tZXRhZWRnZSkgewogICAgICAgICAgICBpZiAoZC5sYWJlbC5tZXRhZWRnZS5udW1SZWZFZGdlcykgewogICAgICAgICAgICAgICAgLy8gV2UgaGF2ZSBhIHJlZmVyZW5jZSBlZGdlLgogICAgICAgICAgICAgICAgY29uc3QgbWFya2VySWQgPSBgcmVmZXJlbmNlLWFycm93aGVhZC0ke2Fycm93aGVhZE1hcChzdHJva2VXaWR0aCl9YDsKICAgICAgICAgICAgICAgIHBhdGguc3R5bGUoJ21hcmtlci1zdGFydCcsIGB1cmwoIyR7bWFya2VySWR9KWApOwogICAgICAgICAgICAgICAgZC5sYWJlbC5zdGFydE1hcmtlcklkID0gbWFya2VySWQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAvLyBXZSBoYXZlIGEgZGF0YWZsb3cgZWRnZS4KICAgICAgICAgICAgICAgIGNvbnN0IG1hcmtlcklkID0gYGRhdGFmbG93LWFycm93aGVhZC0ke2Fycm93aGVhZE1hcChzdHJva2VXaWR0aCl9YDsKICAgICAgICAgICAgICAgIHBhdGguc3R5bGUoJ21hcmtlci1lbmQnLCBgdXJsKCMke21hcmtlcklkfSlgKTsKICAgICAgICAgICAgICAgIGQubGFiZWwuZW5kTWFya2VySWQgPSBtYXJrZXJJZDsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBpZiAoZC5sYWJlbCA9PSBudWxsIHx8IGQubGFiZWwubWV0YWVkZ2UgPT0gbnVsbCkgewogICAgICAgICAgICAvLyBUaGVyZSBpcyBubyBhc3NvY2lhdGVkIG1ldGFlZGdlLCB0aHVzIG5vIHRleHQuCiAgICAgICAgICAgIC8vIFRoaXMgaGFwcGVucyBmb3IgYW5ub3RhdGlvbiBlZGdlcy4KICAgICAgICAgICAgcmV0dXJuOwogICAgICAgIH0KICAgICAgICBsZXQgbGFiZWxGb3JFZGdlID0gZ2V0TGFiZWxGb3JFZGdlKGQubGFiZWwubWV0YWVkZ2UsIHNjZW5lRWxlbWVudC5yZW5kZXJIaWVyYXJjaHkpOwogICAgICAgIGlmIChsYWJlbEZvckVkZ2UgPT0gbnVsbCkgewogICAgICAgICAgICAvLyBXZSBoYXZlIG5vIGluZm9ybWF0aW9uIHRvIHNob3cgb24gdGhpcyBlZGdlLgogICAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIGVkZ2VHcm91cAogICAgICAgICAgICAuYXBwZW5kKCd0ZXh0JykKICAgICAgICAgICAgLmFwcGVuZCgndGV4dFBhdGgnKQogICAgICAgICAgICAuYXR0cigneGxpbms6aHJlZicsICcjJyArIHBhdGhJZCkKICAgICAgICAgICAgLmF0dHIoJ3N0YXJ0T2Zmc2V0JywgJzUwJScpCiAgICAgICAgICAgIC5hdHRyKCd0ZXh0LWFuY2hvcicsICdtaWRkbGUnKQogICAgICAgICAgICAuYXR0cignZG9taW5hbnQtYmFzZWxpbmUnLCAnY2VudHJhbCcpCiAgICAgICAgICAgIC50ZXh0KGxhYmVsRm9yRWRnZSk7CiAgICB9CiAgICBsZXQgaW50ZXJwb2xhdGUkNyA9IGxpbmUoKQogICAgICAgIC5jdXJ2ZShiYXNpcyQyKQogICAgICAgIC54KChkKSA9PiB7CiAgICAgICAgcmV0dXJuIGQueDsKICAgIH0pCiAgICAgICAgLnkoKGQpID0+IHsKICAgICAgICByZXR1cm4gZC55OwogICAgfSk7CiAgICAvKioKICAgICAqIFJldHVybnMgYSB0d2VlbiBpbnRlcnBvbGF0b3IgZm9yIHRoZSBlbmRwb2ludCBvZiBhbiBlZGdlIHBhdGguCiAgICAgKi8KICAgIGZ1bmN0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PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwogICAgLyoqCiAgICAgKiBTZWxlY3Qgb3IgQ3JlYXRlIGEgJ2cubm9kZXMnIGdyb3VwIHRvIGEgZ2l2ZW4gc2NlbmVHcm91cAogICAgICogYW5kIGJ1aWxkcyBhIG51bWJlciBvZiAnZy5ub2RlJyBncm91cHMgaW5zaWRlIHRoZSBncm91cC4KICAgICAqCiAgICAgKiBTdHJ1Y3R1cmUgUGF0dGVybjoKICAgICAqCiAgICAgKiA8ZyBjbGFzcz0nbm9kZXMnPgogICAgICogICA8ZyBjbGFzcz0nbm9kZSc+CiAgICAgKiAgICAgPGcgY2xhc3M9J2luLWFubm90YXRpb25zJz4KICAgICAqICAgICAgIC4uLgogICAgICogICAgIDwvZz4KICAgICAqICAgICA8ZyBjbGFzcz0nb3V0LWFubm90YXRpb25zJz4KICAgICAqICAgICAgIC4uLgogICAgICogICAgIDwvZz4KICAgICAqICAgICA8ZyBjbGFzcz0nbm9kZXNoYXBlJz4KICAgICAqICAgICAgPCEtLQogICAgICogICAgICBDb250ZW50IG9mIHRoZSBub2RlIHNoYXBlIHNob3VsZCBiZSBmb3IgdGhlIG5vZGUgaXRzZWxmLiBGb3IgZXhhbXBsZSBhCiAgICAgKiAgICAgIE1ldGFub2RlIHdvdWxkIGhhdmUgYSA8cmVjdD4gd2l0aCByb3VuZGVkIGVkZ2VzLCBhbiBvcCB3b3VsZCBoYXZlIGFuCiAgICAgKiAgICAgIDxlbGxpcHNlPi4gTW9yZSBjb21wbGV4IG5vZGVzIGxpa2Ugc2VyaWVzIG1heSBjb250YWluIG11bHRpcGxlCiAgICAgKiAgICAgIGVsZW1lbnRzIHdoaWNoIGFyZSBjb25kaXRpb25hbGx5IHZpc2libGUgYmFzZWQgb24gd2hldGhlciB0aGUgbm9kZSBpcwogICAgICogICAgICBleHBhbmRlZC4KICAgICAqICAgICAgLS0+CiAgICAgKiAgICAgPC9nPgogICAgICogICAgIDx0ZXh0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IGNvbnRhaW5lciA9IHNlbGVjdE9yQ3JlYXRlQ2hpbGQoc2NlbmVHcm91cCwgJ2cnLCBDbGFzcyQxLk5vZGUuQ09OVEFJTkVSKTsKICAgICAgICAvLyBTZWxlY3QgYWxsIGNoaWxkcmVuIGFuZCBqb2luIHdpdGggZGF0YS4KICAgICAgICAvLyAoTm90ZSB0aGF0IGFsbCBjaGlsZHJlbiBvZiBnLm5vZGVzIGFyZSBnLm5vZGUpCiAgICAgICAgbGV0IG5vZGVHcm91cHMgPSBjb250YWluZXIKICAgICAgICAgICAgLnNlbGVjdEFsbChmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmNoaWxkTm9kZXM7CiAgICAgICAgfSkKICAgICAgICAgICAgLmRhdGEobm9kZURhdGEsIChkKSA9PiB7CiAgICAgICAgICAgIC8vIG1ha2Ugc3VyZSB0aGF0IHdlIGRvbid0IGhhdmUgdG8gc3dhcCBzaGFwZSB0eXBlCiAgICAgICAgICAgIHJldHVybiBkLm5vZGUubmFtZSArICc6JyArIGQubm9kZS50eXBlOwogICAgICAgIH0pOwogICAgICAgIC8vIEVOVEVSCiAgICAgICAgbm9kZUdyb3VwcwogICAgICAgICAgICAuZW50ZXIoKQogICAgICAgICAgICAuYXBwZW5kKCdnJykKICAgICAgICAgICAgLmF0dHIoJ2RhdGEtbmFtZScsIChkKSA9PiB7CiAgICAgICAgICAgIHJldHVybiBkLm5vZGUubmFtZTsKICAgICAgICB9KQogICAgICAgICAgICAuZWFjaChmdW5jdGlvbiAoZCkgewogICAgICAgICAgICBsZXQgbm9kZUdyb3VwID0gc2VsZWN0KHRoaXMpOwogICAgICAgICAgICAvLyBpbmRleCBub2RlIGdyb3VwIGZvciBxdWljayBzdHlsaXppbmcKICAgICAgICAgICAgc2NlbmVFbGVtZW50LmFkZE5vZGVHcm91cChkLm5vZGUubmFtZSwgbm9kZUdyb3VwKTsKICAgICAgICB9KQogICAgICAgICAgICAubWVyZ2Uobm9kZUdyb3VwcykKICAgICAgICAgICAgLy8gRU5URVIgKyBVUERBVEUKICAgICAgICAgICAgLmF0dHIoJ2NsYXNzJywgKGQpID0+IHsKICAgICAgICAgICAgcmV0dXJuIENsYXNzJDEuTm9kZS5HUk9VUCArICcgJyArIG5vZGVDbGFzcyhkKTsKICAgICAgICB9KQogICAgICAgICAgICAuZWFjaChmdW5jdGlvbiAoZCkgewogICAgICAgICAgICBsZXQgbm9kZUdyb3VwID0gc2VsZWN0KHRoaXMpOwogICAgICAgICAgICAvLyBBZGQgZy5pbi1hbm5vdGF0aW9ucyAoYWx3YXlzIGFkZCAtLSB0byBrZWVwIGxheWVyIG9yZGVyCiAgICAgICAgICAgIC8vIGNvbnNpc3RlbnQuKQogICAgICAgICAgICBsZXQgaW5Bbm5vdGF0aW9uQm94ID0gc2VsZWN0T3JDcmVhdGVDaGlsZChub2RlR3JvdXAsICdnJywgQ2xhc3MkMS5Bbm5vdGF0aW9uLklOQk9YKTsKICAgICAgICAgICAgYnVpbGRHcm91cEZvckFubm90YXRpb24oaW5Bbm5vdGF0aW9uQm94LCBkLmluQW5ub3RhdGlvbnMsIGQsIHNjZW5lRWxlbWVudCk7CiAgICAgICAgICAgIC8vIEFkZCBnLm91dC1hbm5vdGF0aW9ucyAgKGFsd2F5cyBhZGQgLS0gdG8ga2VlcCBsYXllciBvcmRlcgogICAgICAgICAgICAvLyBjb25zaXN0ZW50LikKICAgICAgICAgICAgbGV0IG91dEFubm90YXRpb25Cb3ggPSBzZWxlY3RPckNyZWF0ZUNoaWxkKG5vZGVHcm91cCwgJ2cnLCBDbGFzcyQxLkFubm90YXRpb24uT1VUQk9YKTsKICAgICAgICAgICAgYnVpbGRHcm91cEZvckFubm90YXRpb24ob3V0QW5ub3RhdGlvbkJveCwgZC5vdXRBbm5vdGF0aW9ucywgZCwgc2NlbmVFbGVtZW50KTsKICAgICAgICAgICAgLy8gQnVpbGQgLnNoYXBlIGZpcnN0IChiYWNrZ3JvdW5kIG9mIHRoZSB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gICAgICAuZXhpdCgpCiAgICAgICAgICAgIC5lYWNoKGZ1bmN0aW9uIChkKSB7CiAgICAgICAgICAgIC8vIHJlbW92ZSBhbGwgaW5kaWNlcyBvbiByZW1vdmUKICAgICAgICAgICAgc2NlbmVFbGVtZW50LnJlbW92ZU5vZGVHcm91cChkLm5vZGUubmFtZSk7CiAgICAgICAgICAgIGxldCBub2RlR3JvdXAgPSBzZWxlY3QodGhpcyk7CiAgICAgICAgICAgIGlmIChkLmluQW5ub3RhdGlvbnMubGlzdC5sZW5ndGggPiAwKSB7CiAgICAgICAgICAgICAgICBub2RlR3JvdXAKICAgICAgICAgICAgICAgICAgICAuc2VsZWN0KCcuJyArIENsYXNzJDEuQW5ub3RhdGlvbi5JTkJPWCkKICAgICAgICAgICAgICAgICAgICAuc2VsZWN0QWxsKCcuJyArIENsYXNzJDEuQW5ub3RhdGlvbi5HUk9VUCkKICAgICAgICAgICAgICAgICAgICAuZWFjaCgoYSkgPT4gewogICAgICAgICAgICAgICAgICAgIHNjZW5lRWxlbWVudC5yZW1vdmVBbm5vdGF0aW9uR3JvdXAoYSwgZCk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoZC5vdXRBbm5vdGF0aW9ucy5saXN0Lmxlbmd0aCA+IDApIHsKICAgICAgICAgICAgICAgIG5vZGVHcm91cAogICAgICAgICAgICAgICAgICAgIC5zZWxlY3QoJy4nICsgQ2xhc3MkMS5Bbm5vdGF0aW9uLk9VVEJPWCkKICAgICAgICAgICAgICAgICAgICAuc2VsZWN0QWxsKCcuJyArIENsYXNzJDEuQW5ub3RhdGlvbi5HUk9VUCkKICAgICAgICAgICAgICAgICAgICAuZWFjaCgoYSkgPT4gewogICAgICAgICAgICAgICAgICAgIHNjZW5lRWxlbWVudC5yZW1vdmVBbm5vdGF0aW9uR3JvdXAoYSwgZCk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfQogICAgICAgIH0pCiAgICAgICA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gfSk7CiAgICAgICAgfSkKICAgICAgICAgICAgLm9uKCdtb3VzZW92ZXInLCAoZCkgPT4gewogICAgICAgICAgICAvLyBkb24ndCBzZW5kIG1vdXNlb3ZlciBvdmVyIGV4cGFuZGVkIGdyb3VwLAogICAgICAgICAgICAvLyBvdGhlcndpc2UgaXQgaXMgY2F1c2luZyB0b28gbXVjaCBnbGl0Y2hlcwogICAgICAgICAgICBpZiAoc2NlbmVFbGVtZW50LmlzTm9kZUV4cGFuZGVkKGQpKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgc2NlbmVFbGVtZW50LmZpcmUoJ25vZGUtaGlnaGxpZ2h0JywgeyBuYW1lOiBkLm5vZGUubmFtZSB9KTsKICAgICAgICB9KQogICAgICAgICAgICAub24oJ21vdXNlb3V0JywgKGQpID0+IHsKICAgICAgICAgICAgLy8gZG9uJ3Qgc2VuZCBtb3VzZW92ZXIgb3ZlciBleHBhbmRlZCBncm91cCwKICAgICAgICAgICAgLy8gb3RoZXJ3aXNlIGl0IGlzIGNhdXNpbmcgdG9vIG11Y2ggZ2xpdGNoZXMKICAgICAgICAgICAgaWYgKHNjZW5lRWxlbWVudC5pc05vZGVFeHBhbmRlZChkKSkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHNjZW5lRWxlbWVudC5maXJlKCdub2RlLXVuaGlnaGxpZ2h0JywgeyBuYW1lOiBkLm5vZGUubmFtZSB9KTsKICAgICAgICB9KQogICAgICAgICAgICAub24oJ2NsaWNrJywgKGQpID0+IHsKICAgICAgICAgICAgLy8gU3RvcCB0aGlzIGV2ZW50J3MgcHJvcGFnYXRpb24gc28gdGhhdCBpdCBpc24ndCBhbHNvIGNvbnNpZGVyZWQKICAgICAgICAgICAgLy8gYSBncmFwaC1zZWxlY3QuCiAgICAgICAgICAgIGV2ZW50LnN0b3BQcm9wYWdhdGlvbigpOwogICAgICAgICAgICBzY2VuZUVsZW1lbnQuZmlyZSgnbm9kZS1zZWxlY3QnLCB7IG5hbWU6IGQubm9kZS5uYW1lIH0pOwogICAgICAgIH0pCiAgICAgICAgICAgIC5vbignY29udGV4dG1lbnUnLCAoZCwgaSkgPT4gewogICAgICAgICAgICBzY2VuZUVsZW1lbnQuZmlyZSgnbm9kZS1zZWxlY3QnLCB7IG5hbWU6IGQubm9kZS5uYW1lIH0pOwogICAgICAgICAgICBjb250ZXh0TWVudUZ1bmN0aW9uLmNhbGwoZCwgaSk7CiAgICAgICAgfSk7CiAgICB9CiAgICAvKioKICAgICAqIFJldHVybnMgdGhlIGQzIGNvbnRleHQgbWVudSBzcGVjaWZpY2F0aW9uIGZvciB0aGUgcHJvdmlkZWQgbm9kZS4KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0Q29udGV4dE1lbnUobm9kZSwgc2NlbmVFbGVtZW50KSB7CiAgICAgICAgbGV0IG1lbnUgPSBbCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgIHRpdGxlOiAoZCkgPT4gewogICAgICAgICAgICAgICAgICAgIHJldHVybiBnZXRJbmNsdWRlTm9kZUJ1dHRvblN0cmluZyhub2RlLmluY2x1ZGUpOwogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIGFjdGlvbjogKGVsbSwgZCwgaSkgPT4gewogICAgICAgICAgICAgICAgICAgIHNjZW5lRWxlbWVudC5maXJlKCdub2RlLXRvZ2dsZS1leHRyYWN0JywgeyBuYW1lOiBub2RlLm5hbWUgfSk7CiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICB9LAogICAgICAgIF07CiAgICAgICAgaWYgKHNjZW5lRWxlbWVudC5ub2RlQ29udGV4dE1lbnVJdGVtcykgewogICAgICAgICAgICAvLyBBZGQgdGhlc2UgYWRkaXRpb25hbCBjb250ZXh0IG1lbnUgaXRlbXMuCiAgICAgICAgICAgIG1lbnUgPSBtZW51LmNvbmNhdChzY2VuZUVsZW1lbnQubm9kZUNvbnRleHRNZW51SXRlbXMpOwogICAgICAgIH0KICAgICAgICBpZiAoY2FuQmVJblNlcmllcyhub2RlKSkgewogICAgICAgICAgICBtZW51LnB1c2goewogICAgICAgICAgICAgICAgdGl0bGU6IChkKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGdldEdyb3VwU2V0dGluZ0xhYmVsKG5vZGUpOwogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIGFjdGlvbjogKGVsbSwgZCwgaSkgPT4gewogICAgICAgICAgICAgICAgICAgIHNjZW5lRWxlbWVudC5maXJlKCdub2RlLXRvZ2dsZS1zZXJpZXNncm91cCcsIHsKICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTogZ2V0U2VyaWVzTmFtZShub2RlKSwKICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICByZXR1cm4gbWVudTsKICAgIH0KICAgIC8qKiBSZXR1cm5zIGlmIGEgbm9kZSBjYW4gYmUgcGFydCBvZiBhIGdyb3VwZWQgc2VyaWVzICovCiAgICBmdW5jdGlvbiBjYW5CZUluU2VyaWVzKG5vZGUpIHsKICAgICAgICByZXR1cm4gZ2V0U2VyaWVzTmFtZShub2RlKSAhPT0gbnVsbDsKICAgIH0KICAgIC8qKgogICAgICogUmV0dXJucyB0aGUgbmFtZSBvZiB0aGUgcG9zc2libGUgZ3JvdXBlZCBzZXJpZXMgY29udGFpbmluZyB0aGlzIG5vZGUuCiAgICAgKiBSZXR1cm5zIG51bGwgaWYgdGhlIG5vZGUgY2Fubm90IGJlIHBhcnQgb2YgYSBncm91cGVkIHNlcmllcyBvZiBub2Rlcy4KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0U2VyaWVzTmFtZShub2RlKSB7CiAgICAgICAgaWYgKCFub2RlKSB7CiAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgIH0KICAgICAgICBpZiAobm9kZS50eXBlID09PSBOb2RlVHlwZS5TRVJJRVMpIHsKICAgICAgICAgICAgcmV0dXJuIG5vZGUubmFtZTsKICAgICAgICB9CiAgICAgICAgaWYgKG5vZGUudHlwZSA9PT0gTm9kZVR5cGUuT1ApIHsKICAgICAgICAgICAgbGV0IG9wID0gbm9kZTsKICAgICAgICAgICAgcmV0dXJuIG9wLm93bmluZ1NlcmllczsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIG51bGw7CiAgICB9CiAgICAvKioKICAgICAqIFJldHVybnMgdGhlIFNlcmllc05vZGUgdGhhdCByZXByZXNlbnRzIHRoZSBzZXJpZXMgdGhhdCB0aGUgcHJvdmlkZWQgbm9kZQogICAgICogaXMgY29udGFpbmVkIGluIChvciBpdHNlbGYgaWYgdGhlIHByb3ZpZGVkIG5vZGUgaXMgaXRzZWxmIGEgU2VyaWVzTm9kZSkuCiAgICAgKiBSZXR1cm5zIG51bGwgaWYgdGhlIG5vZGUgaXMgbm90IHJlbmRlcmVkIGFzIHBhcnQgb2YgYSBzZXJpZXMuCiAgICAgKi8KICAgIGZ1bmN0aW9uIGdldENvbnRhaW5pbmdTZXJpZXMobm9kZSkgewogICAgICAgIGxldCBzID0gbnVsbDsKICAgICAgICBpZiAoIW5vZGUpIHsKICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYgKG5vZGUudHlwZSA9PT0gTm9kZVR5cGUuU0VSSUVTKSB7CiAgICAgICAgICAgIHMgPSBub2RlOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChub2RlLnBhcmVudE5vZGUgJiYgbm9kZS5wYXJlbnROb2RlLnR5cGUgPT09IE5vZGVUeXBlLlNFUklFUykgewogICAgICAgICAgICBzID0gbm9kZS5wYXJlbnROb2RlOwogICAgICAgIH0KICAgICAgICByZXR1cm4gczsKICAgIH0KICAgIC8qKgogICAgICogUmV0dXJucyB0aGUgbGFiZWwgZm9yIGEgYnV0dG9uIHRvIHRvZ2dsZSB0aGUg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29udGVudCA9IHR4dE5vZGUudGV4dENvbnRlbnQ7CiAgICAgICAgLy8gR2V0IG1heGltdW0gbGVuZ3RoIGZyb20gc2V0dGluZ3MuCiAgICAgICAgbGV0IG1heExlbmd0aCA9IG51bGw7CiAgICAgICAgc3dpdGNoIChub2RlVHlwZSkgewogICAgICAgICAgICBjYXNlIE5vZGVUeXBlLk1FVEE6CiAgICAgICAgICAgICAgICBpZiAocmVuZGVyTm9kZUluZm8gJiYgIXJlbmRlck5vZGVJbmZvLmV4cGFuZGVkKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gT25seSB0cmltIHRleHQgaWYKICAgICAgICAgICAgICAgICAgICAvLyBub2RlIGV4cGFuZGVkLgogICAgICAgICAgICAgICAgICAgIG1heExlbmd0aCA9IFBBUkFNUyQxLm5vZGVTaXplLm1ldGEubWF4TGFiZWxXaWR0aDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlIE5vZGVUeXBlLk9QOgogICAgICAgICAgICAgICAgbWF4TGVuZ3RoID0gUEFSQU1TJDEubm9kZVNpemUub3AubWF4TGFiZWxXaWR0aDsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlIC0xOgogICAgICAgICAgICAgICAgbWF4TGVuZ3RoID0gUEFSQU1TJDEuYW5ub3RhdGlvbnMubWF4TGFiZWxXaWR0aDsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgIH0KICAgICAgICAvLyBSZXR1cm4gaWYgbm8gbWF4IGxlbmd0aCBwcm92aWRlZCBmb3Igbm9kZSB0eXBlLCBvciBjdXJyZW50IGxhYmVsIGxlbmd0aCBpcwogICAgICAgIC8vIGxlc3MgdGhhbiBvciBlcXVhbCB0byB0aGUgcHJvdmlkZWQgbGVuZ3RoIGxpbWl0LgogICAgICAgIGlmIChtYXhMZW5ndGggPT09IG51bGwgfHwgY29tcHV0ZWRUeHRMZW5ndGggPD0gbWF4TGVu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UudGV4dENvbnRlbnQgPSBiYXNlVGV4dCArICcuLi4nOwogICAgICAgICAgICBjb21wdXRlZFR4dExlbmd0aCA9IHR4dE5vZGUuZ2V0Q29tcHV0ZWRUZXh0TGVuZ3RoKCk7CiAgICAgICAgfSB3aGlsZSAoY29tcHV0ZWRUeHRMZW5ndGggPiBtYXhMZW5ndGggJiYgYmFzZVRleHQubGVuZ3RoID4gMCk7CiAgICAgICAgLy8gQWRkIHRvb2x0aXAgd2l0aCBmdWxsIG5hbWUgYW5kIHJldHVybi4KICAgICAgICByZXR1cm4gdHh0RWxlbWVudFNlbGVjdGlvbi5hcHBlbmQoJ3RpdGxlJykudGV4dChsYWJlbENvbnRlbnQpOwogICAgfQogICAgLyoqCiAgICAgKiBkMyBzY2FsZSB1c2VkIGZvciBzaXppbmcgZm9udCBvZiBsYWJlbHMsIHVzZWQgYnkgbGFiZWxCdWlsZCwKICAgICAqIGluaXRpYWxpemVkIG9uY2UgYnkgZ2V0TGFiZWxGb250U2NhbGUuCiAgICAgKi8KICAgIGxldCBmb250U2NhbGUgPSBudWxsOwogICAgZnVuY3Rpb24gZ2V0TGFiZWxGb250U2NhbGUoc2NlbmVFbGVtZW50KSB7CiAgICAgICAgaWYgKCFmb250U2NhbGUpIHsKICAgICAgICAgICAgZm9udFNjYWxlID0gbGluZWFyJDIoKQogICAgICAgICAgICAgICAgLmRvbWFpbihbCiAgICAgICAgICAgICAgICBzY2VuZUVsZW1lbnQubWF4TWV0YW5vZGVMYWJlbExlbmd0aExhcmdlRm9udCwKICAgICAgICAgICAgICAgIHNjZW5lRWxlbWVudC5tYXhNZXRhbm9kZUxhYmVsTGVuZ3RoLAogICAgICAgICAgICBdKQogICAgICAgICAgICAgICAgLnJhbmdlKFsKICAgICAgICAgICAgICAgIHNjZW5lRWxlbWVudC5tYXhNZXRhbm9kZUxhYmVsTGVuZ3RoRm9udFNpemUsCiAgICAgICAgICAgICAgICBzY2VuZUVsZW1lbnQubWluTWV0YW5vZGVMYWJl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N0YW1wVHlwZSA9ICdhbm5vdGF0aW9uJzsKICAgICAgICAgICAgICAgIGxldCBncm91cE5vZGVJbmZvID0gZDsKICAgICAgICAgICAgICAgIGlmIChncm91cE5vZGVJbmZvLmNvcmVHcmFwaCkgewogICAgICAgICAgICAgICAgICAgIHN0YW1wVHlwZSA9IGdyb3VwTm9kZUluZm8ubm9kZS5oYXNOb25Db250cm9sRWRnZXMKICAgICAgICAgICAgICAgICAgICAgICAgPyAndmVydGljYWwnCiAgICAgICAgICAgICAgICAgICAgICAgIDogJ2hvcml6b250YWwnOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgbGV0IGNsYXNzTGlzdCA9IFtDbGFzcyQxLk5vZGUuQ09MT1JfVEFSR0VUXTsKICAgICAgICAgICAgICAgIGlmIChncm91cE5vZGVJbmZvLmlzRmFkZWRPdXQpIHsKICAgICAgICAgICAgICAgICAgICBjbGFzc0xpc3QucHVzaCgnZmFkZWQtZWxsaXBzZScpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgc2VsZWN0T3JDcmVhdGVDaGlsZChzaGFwZUdyb3VwLCAndXNlJywgY2xhc3NMaXN0KQogICAgICAgICAgICAgICAgICAgIC5hdHRyKCd4bGluazpocmVmJywgJyNvcC1zZXJpZXMtJyArIHN0YW1wVHlwZSArICctc3RhbXAnKTsKICAgICAgICAgICAgICAgIHNlbGVjdE9yQ3JlYXRlQ2hpbGQoc2hhcGVHcm91cCwgJ3JlY3QnLCBDbGFzcyQxLk5vZGUuQ09MT1JfVEFSR0VUKQogICAgICAgICAgICAgICAgICAgIC5hdHRyKCdyeCcsIGQucmFkaXVzKQogICAgICAgICAgICAgICAgICAgIC5hdHRyKCdyeScsIGQucmFkaXVzKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlIE5vZGVUeXBlLkJSSURHRToKICAgICAgICAgICAgICAgIHNlbGVjdE9yQ3JlYXRlQ2hpbGQoc2hhcGVHcm91cCwgJ3JlY3QnLCBDbGFzcyQxLk5vZGUuQ09MT1JfVEFSR0VUKQogICAgICAgICAgICAgICAgICAgIC5hdHRyKCdyeCcsIGQucmFkaXVzKQogICAgICAgICAgICAgICAgICAgIC5hdHRyKCdyeScsIGQucmFkaXVzKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlIE5vZGVUeXBlLk1FVEE6CiAgICAgICAgICAgICAgICBzZWxlY3RPckNyZWF0ZUNoaWxkKHNoYXBlR3JvdXAsICdyZWN0JywgQ2xhc3MkMS5Ob2RlLkNPTE9SX1RBUkdFVCkKICAgICAgICAgICAgICAgICAgICAuYXR0cigncngnLCBkLnJhZGl1cykKICAgICAgICAgICAgICAgICAgICAuYXR0cigncnknLCBkLnJhZGl1cyk7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgICAgIHRocm93IEVycm9yKCdVbnJlY29nbml6ZWQgbm9kZSB0eXBlOiAnICsgZC5ub2RlLnR5cGUpOwogICAgICAgIH0KICAgICAgICByZXR1cm4gc2hhcGVHcm91cDsKICAgIH0KICAgIGZ1bmN0aW9uIG5vZGVDbGFzcyhkKSB7CiAgICAgICAgc3dpdGNoIChkLm5vZGUudHlwZSkgewogICAgICAgICAgICBjYXNlIE5vZGVUeXBlLk9QOgogICAgICAgICAgICAgICAgcmV0dXJuIENsYXNzJDEuT1BOT0RFOwogICAgICAgICAgICBjYXNlIE5vZGVUeXBlLk1FVEE6CiAgICAgICAgICAgICAgICByZXR1cm4gQ2xhc3MkMS5NRVRBTk9ERTsKICAgICAgICAgICAgY2FzZSBOb2RlVHlwZS5TRVJJRVM6CiAgICAgICAgICAgICAgICByZXR1cm4gQ2xhc3MkMS5TRVJJRVNOT0RFOwogICAgICAgICAgICBjYXNlIE5vZGVUeXBlLkJSSURHRToKICAgICAgICAgICAgICAgIHJldHVybiBDbGFzcyQxLkJSSURHRU5PREU7CiAgICAgICAgICAgIGNhc2UgTm9kZVR5cGUuRUxMSVBTSVM6CiAgICAgICAgICAgICAgICByZXR1cm4gQ2xhc3MkMS5FTExJUFNJU05PREU7CiAgICAgICAgfQogICAgICAgIHRocm93IEVycm9yKCdVbnJlY29nbml6ZWQgbm9kZSB0eXBlOiAnICsgZC5ub2RlLnR5cGUpOwogICAgfQogICAgLyoqIE1vZGlmeSBub2RlIGFuZCBpdHMgc3Vic2NlbmUgYW5kIGl0cyBsYWJlbCdzIHBvc2l0aW9uYWwgYXR0cmlidXRlcyAqLwogICAgZnVuY3Rpb24gcG9zaXRpb24kMyhub2RlR3JvdXAsIGQpIHsKICAgICAgICBsZXQgc2hhcGVHcm91cCA9IHNlbGVjdENoaWxkJDEobm9kZUdyb3VwLCAnZycsIENsYXNzJDEuTm9kZS5TSEFQRSk7CiAgICAgICAgbGV0IGN4ID0gY29tcHV0ZUNYUG9zaXRpb25PZk5vZGVTaGFwZShkKTsKICAgICAgICBzd2l0Y2ggKGQubm9kZS50eXBlKSB7CiAgICAgICAgICAgIGNhc2UgTm9kZVR5cGUuT1A6IHsKICAgICAgICAgICAgICAgIC8vIHBvc2l0aW9uIHNoYXBlCiAgICAgICAgICAgICAgICBjb25zdCBvcE5vZGUgPSBkLm5vZGU7CiAgICAgICAgICAgICAgICBpZiAobG9kYXNoLmlzTnVtYmVyKG9wTm9kZS5mdW5jdGlvbklucHV0SW5kZXgpIHx8CiAgICAgICAgICAgICAgICAgICAgbG9kYXNoLmlzTnVtYmVyKG9wTm9kZS5mdW5jdGlvbk91dHB1dEluZGV4KSkgewogICAgICAgICAgICAgICAgICAgIC8vIFRoaXMgc2hhcGUgcmVwcmVzZW50cyB0aGUgaW5wdXQgaW50byBvciBvdXRwdXQgb3V0IG9mIGEgVGVuc29yRmxvdwogICAgICAgICAgICAgICAgICAgIC8vIGZ1bmN0aW9uLgogICAgICAgICAgICAgICAgICAgIGxldCBzaGFwZSA9IHNlbGVjdENoaWxkJDEoc2hhcGVHcm91cCwgJ3BvbHlnb24nKTsKICAgICAgICAgICAgICAgICAgICBwb3NpdGlvblRyaWFuZ2xlKHNoYXBlLCBkLngsIGQueSwgZC5jb3JlQm94LndpZHRoLCBkLmNvcmVCb3guaGVpZ2h0KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIGxldCBzaGFwZSA9IHNlbGVjdENoaWxkJDEoc2hhcGVHcm91cCwgJ2VsbGlwc2UnKTsKICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbkVsbGlwc2Uoc2hhcGUsIGN4LCBkLnksIGQuY29yZUJveC53aWR0aCwgZC5jb3JlQm94LmhlaWdodCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBsYWJlbFBvc2l0aW9uKG5vZGVHcm91cCwgY3gsIGQueSwgZC5sYWJlbE9mZnNldCk7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQogICAgICAgICAgICBjYXNlIE5vZGVUeXBlLk1FVEE6IHsKICAgICAgICAgICAgICAgIC8vIHBvc2l0aW9uIHNoYXBlCiAgICAgICAgICAgICAgICBsZXQgc2hhcGVzID0gc2hhcGVHcm91cC5zZWxlY3RBbGwoJ3JlY3QnKTsKICAgICAgICAgICAgICAgIGlmIChkLmV4cGFuZGVkKSB7CiAgICAgICAgICAgICAgICAgICAgcG9zaXRpb25SZWN0KHNoYXBlcywgZC54LCBkLnksIGQud2lkdGgsIGQuaGVpZ2h0KTsKICAgICAgICAgICAgICAgICAgICBzdWJzY2VuZVBvc2l0aW9uKG5vZGVHcm91cCwgZCk7CiAgICAgICAgICAgICAgICAgICAgLy8gUHV0IHRoZSBsYWJlbCBvbiB0b3AuCiAgICAgICAgICAgICAgICAgICAgbGFiZWxQb3NpdGlvbihub2RlR3JvdXAsIGN4LCBkLnksIC1kLmhlaWdodCAvIDIgKyBkLmxhYmVsSGVpZ2h0IC8gMik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBwb3NpdGlvblJlY3Qoc2hhcGVzLCBjeCwgZC55LCBkLmNvcmVCb3gud2lkdGgsIGQuY29yZUJveC5oZWlnaHQpOwogICAgICAgICAgICAgICAgICAgIC8vIFBsYWNlIHRoZSBsYWJlbCBpbiB0aGUgbWlkZGxlLgogICAgICAgICAgICAgICAgICAgIGxhYmVsUG9zaXRpb24obm9kZUdyb3VwLCBjeCwgZC55LCAwKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNhc2UgTm9kZVR5cGUuU0VSSUVTOiB7CiAgICAgICAgICAgICAgICBsZXQgc2hhcGUgPSBzZWxlY3RDaGlsZCQxKHNoYXBlR3JvdXAsICd1c2UnKTsKICAgICAgICAgICAgICAgIGlmIChkLmV4cGFuZGVkKSB7CiAgICAgICAgICAgICAgICAgICAgcG9zaXRpb25SZWN0KHNoYXBlLCBkLngsIGQueSwgZC53aWR0aCwgZC5oZWlnaHQpOwogICAgICAgICAgICAgICAgICAgIHN1YnNjZW5lUG9zaXRpb24obm9kZUdyb3VwLCBkKTsKICAgICAgICAgICAgICAgICAgICAvLyBwdXQgbGFiZWwgb24gdG9wCiAgICAgICAgICAgICAgICAgICAgbGFiZWxQb3NpdGlvbihub2RlR3JvdXAsIGN4LCBkLnksIC1kLmhlaWdodCAvIDIgKyBkLmxhYmVsSGVpZ2h0IC8gMik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBwb3NpdGlvblJlY3Qoc2hhcGUsIGN4LCBkLnksIGQuY29yZUJveC53aWR0aCwgZC5jb3JlQm94LmhlaWdodCk7CiAgICAgICAgICAgICAgICAgICAgbGFiZWxQb3NpdGlvbihub2RlR3JvdXAsIGN4LCBkLnksIGQubGFiZWxPZmZzZXQpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAg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HRyKCdpZCcsIGlkKTsKICAgICAgICAgICAgLy8gUmUtY3JlYXRlIHRoZSBzdG9wcyBvZiB0aGUgbGluZWFyIGdyYWRpZW50LgogICAgICAgICAgICBsaW5lYXJHcmFkaWVudC5zZWxlY3RBbGwoJyonKS5yZW1vdmUoKTsKICAgICAgICAgICAgbGV0IGN1bXVsYXRpdmVQcm9wb3J0aW9uID0gMDsKICAgICAgICAgICAgLy8gRm9yIGVhY2ggY29sb3IsIGNyZWF0ZSBhIHN0b3AgdXNpbmcgdGhlIHByb3BvcnRpb24gb2YgdGhhdCBkZXZpY2UuCiAgICAgICAgICAgIGxvZGFzaC5lYWNoKGNvbG9ycywgKGQpID0+IHsKICAgICAgICAgICAgICAgIGxldCBjb2xvciA9IGQuY29sb3I7CiAgICAgICAgICAgICAgICBsaW5lYXJHcmFkaWVudAogICAgICAgICAgICAgICAgICAgIC5hcHBlbmQoJ3N0b3AnKQogICAgICAgICAgICAgICAgICAgIC5hdHRyKCdvZmZzZXQnLCBjdW11bGF0aXZlUHJvcG9ydGlvbikKICAgICAgICAgICAgICAgICAgICAuYXR0cignc3RvcC1jb2xvcicsIGNvbG9yKTsKICAgICAgICAgICAgICAgIGxpbmVhckdyYWRpZW50CiAgICAgICAgICAgICAgICAgICAgLmFwcGVuZCgnc3RvcCcpCiAgICAgICAgICAgICAgICAgICAgLmF0dHIoJ29mZnNldCcsIGN1bXVsYXRpdmVQcm9wb3J0aW9uICsgZC5wcm9wb3J0aW9uKQogICAgICAgICAgICAgICAgICAgIC5hdHRyKCdzdG9wLWNvbG9yJywgY29sb3IpOwogICAgICAgICAgICAgICAgY3VtdWxhdGl2ZVByb3BvcnRpb24gKz0gZC5wcm9wb3J0aW9uOwogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGB1cmwoIyR7ZXNjYXBlZElkfSlgOwogICAgfQogICAgZnVuY3Rpb24gcmVtb3ZlR3JhZGllbnREZWZpbml0aW9ucyhzdmdSb290KSB7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ICBlbHNlIGlmIChyZW5kZXJJbmZvLm5vZGUudHlwZSA9PT0gTm9kZVR5cGUuU0VSSUVTKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gSWYgZXhwYW5kZWQsIHdlJ3JlIHNob3dpbmcgdGhlIGJhY2tncm91bmQgcmVjdCwgd2hpY2ggd2Ugd2FudCB0bwogICAgICAgICAgICAgICAgICAgIC8vIGFwcGVhciBncmF5LiBPdGhlcndpc2Ugd2UncmUgc2hvd2luZyBhIHN0YWNrIG9mIGVsbGlwc2VzIHdoaWNoIHdlCiAgICAgICAgICAgICAgICAgICAgLy8gd2FudCB0byBzaG93IHdoaXRlLgogICAgICAgICAgICAgICAgICAgIHJldHVybiBpc0V4cGFuZGVkID8gY29sb3JQYXJhbXMuRVhQQU5ERURfQ09MT1IgOiAnd2hpdGUnOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAocmVuZGVySW5mby5ub2RlLnR5cGUgPT09IE5vZGVUeXBlLkJSSURHRSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiByZW5kZXJJbmZvLnN0cnVjdHVyYWwKICAgICAgICAgICAgICAgICAgICAgICAgPyAnI2YwZScKICAgICAgICAgICAgICAgICAgICAgICAgOiByZW5kZXJJbmZvLm5vZGUuaW5ib3VuZAogICAgICAgICAgICAgICAgICAgICAgICAgICAgPyAnIzBlZicKICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogJyNmZTAnOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAobG9kYXNoLmlzTnVtYmVyKHJlbmRlckluZm8ubm9kZS5mdW5jdGlvbklucHV0SW5kZXgpKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gVGhpcyBpcyBhbiBpbnB1dCBvZiBhIFRlbnNvckZsb3cgZnVuY3Rpb24uCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICcjNzk1NTQ4JzsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKGxvZGFzaC5pc051bWJlcihyZW5kZXJJbmZvLm5vZGUuZnVuY3Rpb25PdXRwdXRJbmRleCkpIHsKICAgICAgICAgICAgICAgICAgICAvLyBUaGlzIGlzIGFuIG91dHB1dCBvZiBhIFRlbnNvckZsb3cgZnVuY3Rpb24uCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICcjMDA5Njg4JzsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIC8vIE9wIG5vZGVzIGFyZSB3aGl0ZS4KICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3doaXRlJzsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgY2FzZSBDb2xvckJ5LkRFVklDRToKICAgICAgICAgICAgICAgIGlmIChyZW5kZXJJbmZvLmRldmljZUNvbG9ycyA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gUmV0dXJuIHRoZSBodWUgZm9yIHVua25vd24gZGV2aWNlLgogICAgICAgICAgICAgICAgICAgIHJldHVybiBjb2xvclBhcmFtcy5VTktOT1dOOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIGlzRXhwYW5kZWQKICAgICAgICAgICAgICAgICAgICA/IGNvbG9yUGFyYW1zLkVYUEFOREVEX0NPTE9SCiAgICAgICAgICAgICAgICAgICAgOiBnZXRHcmFkaWVudCgnZGV2aWNlLScgKyByZW5kZXJJbmZvLm5vZGUubmFtZSwgcmVuZGVySW5mby5kZXZpY2VDb2xvcnMsIHN2Z1Jvb3QpOwogICAgICAgICAgICBjYXNlIENvbG9yQnkuWExBX0NMVVNURVI6CiAgICAgICAgICAgICAgICBpZiAocmVuZGVySW5mby54bGFDbHVzdGVyQ29sb3JzID09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICAvLyBSZXR1cm4gdGhlIGh1ZSBmb3IgdW5rbm93biB4bGFDbHVzdGVyLgogICAgICAgICAgICAgICAgICAgIHJldHVybiBjb2xvclBhcmFtcy5VTktOT1dOOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIGlzRXhwYW5kZWQKICAgICAgICAgICAgICAgICAgICA/IGNvbG9yUGFyYW1zLkVYUEFOREVEX0NPTE9SCiAgICAgICAgICAgICAgICAgICAgOiBnZXRHcmFkaWVudCgneGxhLScgKyByZW5kZXJJbmZvLm5vZGUubmFtZSwgcmVuZGVySW5mby54bGFDbHVzdGVyQ29sb3JzLCBzdmdSb290KTsKICAgICAgICAgICAgY2FzZSBDb2xvckJ5LkNPTVBVVEVfVElNRToKICAgICAgICAgICAgICAgIHJldHVybiBpc0V4cGFuZGVkCiAgICAgICAgICAgICAgICAgICAgPyBjb2xvclBhcmFtcy5FWFBBTkRFRF9DT0xPUgogICAgICAgICAgICAgICAgICAgIDogcmVuZGVySW5mby5jb21wdXRlVGltZUNvbG9yIHx8IGNvbG9yUGFyYW1zLlVOS05PV047CiAgICAgICAgICAgIGNhc2UgQ29sb3JCeS5NRU1PUlk6CiAgICAgICAgICAgICAgICByZXR1cm4gaXNFeHBhbmRlZAogICAgICAgICAgICAgICAgICAgID8gY29sb3JQYXJhbXMuRVhQQU5ERURfQ09MT1IKICAgICAgICAgICAgICAgICAgICA6IHJlbmRlckluZm8ubWVtb3J5Q29sb3IgfHwgY29sb3JQYXJhbXMuVU5LTk9XTjsKICAgICAgICAgICAgY2FzZSBDb2xvckJ5Lk9QX0NPTVBBVElCSUxJVFk6CiAgICAgICAgICAgICAgICBpZiAocmVuZGVySW5mby5jb21wYXRpYmlsaXR5Q29sb3JzID09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICAvLyBSZXR1cm4gdGhlIGh1ZSBmb3IgdW5rbm93biBjb21wYXRpYmlsaXR5IGluZm8uCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNvbG9yUGFyYW1zLlVOS05PV047CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR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dmlzaWJsZUlucHV0cyA9IHt9OwogICAgICAgIGxvZGFzaC5lYWNoKGlucHV0cywgZnVuY3Rpb24gKG5vZGVJbnN0YW5jZSkgewogICAgICAgICAgICBsZXQgcmVzb2x2ZWROb2RlID0gcmVuZGVyR3JhcGhJbmZvLmdldE5vZGVCeU5hbWUobm9kZUluc3RhbmNlLm5hbWUpOwogICAgICAgICAgICBpZiAocmVzb2x2ZWROb2RlID09PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgICAgIC8vIE5vZGUgY291bGQgbm90IGJlIGZvdW5kIGluIHJlbmRlcmVkIEhpZXJhcmNoeSwgd2hpY2ggaGFwcGVucyB3aGVuCiAgICAgICAgICAgICAgICAvLyB0cmFjaW5nIGlucHV0cyBvZiBhIFN1bW1hcnlOb2RlLgogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIEVuc3VyZSBub2RlIGlzIHJlc29sdmVkIHRvIE9wTm9kZSBpZiBuYW1lIGNvbGxpc2lvbiB3aXRoIE1ldGFub2RlIGV4aXN0cy4KICAgICAgICAgICAgaWYgKHJlc29sdmVkTm9kZSBpbnN0YW5jZW9mIE1ldGFub2RlSW1wbCkgewogICAgICAgICAgICAgICAgbGV0IHJlc29sdmVkTm9kZU5hbWUgPSBnZXRTdHJpY3ROYW1lKHJlc29sdmVkTm9kZS5uYW1lKTsKICAgICAgICAgICAgICAgIHJlc29sdmVkTm9kZSA9IHJlbmRlckdyYXBoSW5mby5nZXROb2RlQnlOYW1lKHJlc29sdmVkTm9kZU5hbWUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGxldCB2aXNpYmxlUGFyZW50ID0gZ2V0VmlzaWJsZVBhcmVudChyZW5kZXJHcmFwaEluZm8sIHJlc29sdmVkTm9kZSk7CiAgICAgICAgICAgIC8vIEFwcGVuZCBPcE5vZGUgdG8gdmlzaWJsZSBwYXJlbnQgZW50cnkuCiAgICAgICAgICAgIGxldCB2aXNpYmxlSW5wdXRzRW50cnkgPSB2aXNpYmxlSW5wdXRzW3Zpc2libGVQYXJlbnQubmFtZV07CiAgICAgICAgICAgIGlmICh2aXNpYmxlSW5wdXRzRW50cnkpIHsKICAgICAgICAgICAgICAgIHZpc2libGVJbnB1dHNFbnRyeS5vcE5vZGVzLnB1c2gocmVzb2x2ZWROb2RlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIC8vIENyZWF0ZSBuZXcgZW50cnkuCiAgICAgICAgICAgICAgICB2aXNpYmxlSW5wdXRzW3Zpc2libGVQYXJlbnQubmFtZV0gPSB7CiAgICAgICAgICAgICAgICAgICAgdmlzaWJsZVBhcmVudDogdmlzaWJsZVBhcmVudCwKICAgICAgICAgICAgICAgICAgICBvcE5vZGVzOiBbcmVzb2x2ZWROb2RlXSwKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgIH0KICAgICAgICB9KTsKICAgICAgICAvLyBGaW5kIGFsbCBwYXJlbnRzIG9mIHRoZSBzdGFydCBub2RlLgogICAgICAgIGxldCBzdGFydE5vZGVQYXJlbnRzID0ge307CiAgICAgICAgbGV0IGluZGV4ZWRTdGFydE5vZGVQYXJlbnRzID0gW2N1cnJlbnRWaXNpYmxlUGFyZW50XTsKICAgICAgICBzdGFydE5vZGVQYXJlbnRzW2N1cnJlbnRWaXNpYmxlUGFyZW50Lm5hbWVdID0gewogICAgICAgICAgICB0cmFjZWQ6IGZhbHNlLAogICAgICAgICAgICBpbmRleDogMCwKICAgICAgICAgICAgY29ubmVjdGlvbkVuZHBvaW50czogW10sCiAgICAgICAgfTsKICAgICAgICBsZXQgY3VycmVudE5vZGUgPSBjdXJyZW50VmlzaWJsZVBhcmVudDsKICAgICAgICBmb3IgKGxldCBpbmRleCA9IDE7IGN1cnJlbnROb2RlLm5hbWUgIT09IFJPT1RfTkFNRTsgaW5kZXgrKykgewogICAgICAgICAgICBjdXJyZW50Tm9kZSA9IGN1cnJlbnROb2RlLnBhcmVudE5vZGU7CiAgICAgICAgICAgIHN0YXJ0Tm9kZVBhcmVudHNbY3VycmVudE5vZGUubmFtZV0gPSB7CiAgICAgICAgICAgICAgICB0cmFjZWQ6IGZhbHNlLAogICAgICAgICAgICAgICAgaW5kZXg6IGluZGV4LAogICAgICAgICAgICAgICAgY29ubmVjdGlvbkVuZHBvaW50czogW10sCiAgICAgICAgICAgIH07CiAgICAgICAgICAgIGluZGV4ZWRTdGFydE5vZGVQYXJlbnRzW2luZGV4XSA9IGN1cnJlbnROb2RlOwogICAgICAgIH0KICAgICAgICAvLyBGaW5kIGZpcnN0IG11dHVhbCBwYXJlbnQgb2YgZWFjaCBpbnB1dCBub2RlIGFuZCBoaWdobGlnaHQgY29ubmVjdGlvbi4KICAgICAgICBsb2Rhc2guZm9yT3duKHZpc2libGVJbnB1dHMsIGZ1bmN0aW9uICh2aXNpYmxlUGFyZW50SW5mbywga2V5KSB7CiAgICAgICAgICAgIGxldCBub2RlSW5zdGFuY2UgPSB2aXNpYmxlUGFyZW50SW5mby52aXNpYmxlUGFyZW50OwogICAgICAgICAgICAvLyBNYWtlIHJlY3Vyc2l2ZSBjYWxsIGZvciBlYWNoIGlucHV0LU9wTm9kZSBjb250YWluZWQgYnkgdGhlIHZpc2libGUKICAgICAgICAgICAgLy8gcGFyZW50LgogICAgICAgICAgICBsb2Rhc2guZWFjaCh2aXNpYmxlUGFyZW50SW5mby5vcE5vZGVzLCBmdW5jdGlvbiAob3BOb2RlKSB7CiAgICAgICAgICAgICAgICBhbGxUcmFjZWROb2RlcyA9IHRyYWNlQWxsSW5wdXRzT2ZPcE5vZGUoc3ZnUm9vdCwgcmVuZGVyR3JhcGhJbmZvLCBvcE5vZGUsIGFsbFRyYWNlZE5vZGVzKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGlmIChub2RlSW5zdGFuY2UubmFtZSAhPT0gY3VycmVudFZpc2libGVQYXJlbnQubmFtZSkgewogICAgICAgICAgICAgICAgX2NyZWF0Z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RhcnQgbm9kZS4KICAgICAqIFRoaXMgaXMgcmVxdWlyZWQgdG8gZmluZCB0aGUgY2hpbGQgb2YgdGhlIG11dHVhbCBwYXJlbnQgd2hpY2ggaXMgYSBwYXJlbnQKICAgICAqIG9mIHRoZSBzdGFydCBub2RlLgogICAgICogQHByaXZhdGUKICAgICAqLwogICAgZnVuY3Rpb24gX2NyZWF0ZVZpc2libGVUcmFjZShzdmdSb290LCBub2RlSW5zdGFuY2UsIHN0YXJ0Tm9kZVBhcmVudHMsIGluZGV4ZWRTdGFydE5vZGVQYXJlbnRzKSB7CiAgICAgICAgbGV0IGN1cnJlbnROb2RlID0gbm9kZUluc3RhbmNlOwogICAgICAgIGxldCBwcmV2aW91c05vZGUgPSBub2RlSW5zdGFuY2U7CiAgICAgICAgLy8gQXNjZW5kIHRocm91Z2ggcGFyZW50cyB1bnRpbCBhIG11dHVhbCBwYXJlbnQgaXMgZm91bmQgd2l0aCB0aGUgc3RhcnQKICAgICAgICAvLyBub2RlLgogICAgICAgIGxldCBkZXN0aW5hdGlvblBhcmVudFBhaXJzID0gW107CiAgICAgICAgd2hpbGUgKCFzdGFydE5vZGVQYXJlbnRzW2N1cnJlbnROb2RlLm5hbWVdKSB7CiAgICAgICAgICAgIGlmIChwcmV2aW91c05vZGUubmFtZSAhPT0gY3VycmVudE5vZGUubmFtZSkgewogICAgICAgICAgICAgICAgZGVzdGluYXRpb25QYXJlbnRQYWlycy5wdXNoKFtwcmV2aW91c05vZGUsIGN1cnJlbnROb2RlXSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcHJldmlvdXNOb2RlID0gY3VycmVudE5vZGU7CiAgICAgICAgICAgIGN1cnJlbnROb2RlID0gY3VycmVudE5vZGUucGFyZW50Tm9kZTsKICAgICAgICB9CiAgICAgICAgLy8gQ29ubmVjdGlvbiBiZXR3ZWVuIG5vZGVzIGlzIGRyYXduIGJldHdlZW4gdGhlIHBhcmVudHMgb2YgZWFjaAogICAgICAgIC8vIHJlc3B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Pd24odmlzaWJsZU5vZGVzLCBmdW5jdGlvbiAobm9kZUluc3RhbmNlKSB7CiAgICAgICAgICAgIC8vIE1hcmsgYWxsIHBhcmVudHMgb2YgdGhlIG5vZGUgYXMgaW5wdXQtcGFyZW50cy4KICAgICAgICAgICAgbGV0IGN1cnJlbnROb2RlID0gbm9kZUluc3RhbmNlOwogICAgICAgICAgICB3aGlsZSAoY3VycmVudE5vZGUubmFtZSAhPT0gUk9PVF9OQU1FKSB7CiAgICAgICAgICAgICAgICBjb25zdCByZW5kZXJlZEVsZW1lbnRTZWxlY3Rpb24gPSBzZWxlY3Qoc3ZnUm9vdCkKICAgICAgICAgICAgICAgICAgICAuc2VsZWN0KGAubm9kZVtkYXRhLW5hbWU9IiR7Y3VycmVudE5vZGUubmFtZX0iXWApOwogICAgICAgICAgICAgICAgLy8gT25seSBtYXJrIHRoZSBlbGVtZW50IGFzIGEgcGFyZW50IG5vZGUgdG8gYW4gaW5wdXQgaWYgaXQgaXMgbm90CiAgICAgICAgICAgICAgICAvLyBtYXJrZWQgYXMgaW5wdXQgbm9kZSBpdHNlbGYuCiAgICAgICAgICAgICAgICBpZiAocmVuZGVyZWRFbGVtZW50U2VsZWN0aW9uLm5vZGVzKCkubGVuZ3RoICYmCiAgICAgICAgICAgICAgICAgICAgIXJlbmRlcmVkRWxlbWVudFNlbGVjdGlvbi5jbGFzc2VkKCdpbnB1dC1oaWdobGlnaHQnKSAmJgogICAgICAgICAgICAgICAgICAgICFyZW5kZXJlZEVsZW1lbnRTZWxlY3Rpb24uY2xhc3NlZCgnc2VsZWN0ZWQnKSAmJgogICAgICAgICAgICAgICAgICAgIC8vIE9wTm9kZSBvbmx5IHBhcmVudCBpZiBzdGFydCBub2RlIGlzIGVtYmVkZGVkIG5vZGUsIGluIHdoaWNoIGNhc2UKICAgICAgICAgICAgICAgICAgICAvLyB0aGUgT3BOb2RlIHNob3VsZCBiZSBmYWRlZCBhcyB3ZWxsLgogICAgICAgICAgICAgICAgICAgICFy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gICAgICAvLyBHZXQgcGFyZW50IGVsZW1lbnQsIHRvIGV4dHJhY3QgbmFtZS4KICAgICAgICAgICAgY3VycmVudE5vZGUgPSBjdXJyZW50UGFyZW50OwogICAgICAgICAgICBjdXJyZW50UGFyZW50ID0gY3VycmVudE5vZGUucGFyZW50Tm9kZTsKICAgICAgICAgICAgaWYgKGN1cnJlbnRQYXJlbnQgPT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICAgICAgZm91bmQgPSB0cnVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgbGV0IHJlbmRlck5vZGUgPSByZW5kZXJHcmFwaEluZm8uZ2V0UmVuZGVyTm9kZUJ5TmFtZShjdXJyZW50UGFyZW50Lm5hbWUpOwogICAgICAgICAgICAgICAgLy8gRm91bmQgaWYgbm9kZSBpcyByZW5kZXJlZCBvbiB0aGUgc2NyZWVuIChyZW5kZXJOb2RlIHRydXRoeSksIGFuZAogICAgICAgICAgICAgICAgLy8gdGhlIHBhcmVudCBpcyBlaXRoZXIgZXhwYW5kZWQgKGkuZS4gaXQgaXMgYSBtZXRhbm9kZSBvciBzZXJpZXNub2RlKQogICAgICAgICAgICAgICAgLy8gb3IgdGhlIHBhcmVudCBpcyBhbiBPcE5vZGUgaW4gd2hpY2ggY2FzZSBjdXJyZW50Tm9kZSBpcyBhbiBlbWJlZGRlZAogICAgICAgICAgICAgICAgLy8gbm9kZSB3aGljaCBoYXMgYW5vdGhlciBPcE5vZGUgYXMgcGFyZW50LgogICAgICAgICAgICAgICAgaWYgKHJlbmRlck5vZGUgJiYKICAgICAgICAgICAgICAgICAgICAocmVuZGVyTm9kZS5leHBhbmRlZCB8fCBjdXJyZW50UGFyZW50IGluc3RhbmNlb2YgT3BOb2RlSW1wbCkpIHsKICAgICAgICAgICAgICAgICAgICBmb3VuZCA9IHRydWU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9IC8vIENsb3NlIHdoaWxlIGxvb3AuCiAgICAgICAgcmV0dXJuIGN1cnJlbnROb2RlOwogICAgfQogICAgLyoqCiAgICAgKiBBbm5vdGF0aW9ucy4KICAgICAqLwogICAgZnVuY3Rpb24gYnVpbGRHcm91cEZvckFubm90YXRpb24oY29udGFpbmVyLCBhbm5vdGF0aW9uRGF0YSwgZCwgc2NlbmVFbGVtZW50KSB7CiAgICAgICAgLy8gU2VsZWN0IGFsbCBjaGlsZHJlbiBhbmQgam9pbiB3aXRoIGRhdGEuCiAgICAgICAgbGV0IGFubm90YXRpb25Hcm91cHMgPSBjb250YWluZXIKICAgICAgICAgICAgLnNlbGVjdEFsbChmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIC8vIHVzaW5nIGQzJ3Mgc2VsZWN0b3IgZnVuY3Rpb24KICAgICAgICAgICAgLy8gU2VlIGh0dHBzOi8vZ2l0aHViLmNvbS9tYm9zdG9jay9kMy9yZWxlYXNlcy90YWcvdjIuMC4wCiAgICAgICAgICAgIC8vIChJdCdzIG5vdCBsaXN0ZWQgaW4gdGhlIGQzIHdpa2kuKQogICAgICAgICAgICByZXR1cm4gdGhpcy5jaGlsZE5vZGVzOwogICAgICAgIH0pCiAgICAgICAgICAgIC5kYXRhKGFubm90YXRpb25EYXRhLmxpc3QsIChkKSA9PiB7CiAgICAgICAgICAgIHJldHVybiBkLm5vZGUubmFtZTsKICAgICAgICB9KTsKICAgICAgICBhbm5vdGF0aW9uR3JvdXBzCiAgICAgICAgICAgIC5lbnRlcigpCiAgICAgICAgICAgIC5hcHBlbmQoJ2cnKQogICAgICAgICAgICAuYXR0cignZGF0YS1uYW1lJywgKGEpID0+IHsKICAgICAgICAgICAgcmV0dXJuIGEubm9kZS5uYW1lOwogICAgICAgIH0pCiAgICAgICAgICAgIC5lYWNoKGZ1bmN0aW9uIChhKSB7CiAgICAgICAgICAgIGxldCBhR3JvdXAgPSBzZWxlY3QodGhpcyk7CiAgICAgICAgICAgIC8vIEFkZCBhbm5vdGF0aW9uIHRvIHRoZSBpbmRleCBpbiB0aGUgc2NlbmUKICAgICAgICAgICAgc2NlbmVFbGVtZW50LmFkZEFubm90YXRpb25Hcm91cChhLCBkLCBhR3JvdXApOwogICAgICAgICAgICAvLyBBcHBlbmQgYW5ub3RhdGlvbiBlZGdlCiAgICAgICAgICAgIGxldCBlZGdlVHlwZSA9IENsYXNzJDEuQW5ub3RhdGlvbi5FREdFOwogICAgICAgICAgICBsZXQgbWV0YWVkZ2UgPSBhLnJlbmRlck1ldGFlZGdlSW5mbyAmJiBhLnJlbmRlck1ldGFlZGdlSW5mby5tZXRhZWRnZTsKICAgICAgICAgICAgaWYgKG1ldGFlZGdlICYmICFtZXRhZWRnZS5udW1SZWd1bGFyRWRnZXMpIHsKICAgICAgICAgICAgICAgIGVkZ2VUeXBlICs9ICcgJyArIENsYXNzJDEuQW5ub3RhdGlvbi5DT05UUk9MX0VER0U7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gSWYgYW55IGVkZ2VzIGFyZSByZWZlcmVuY2UgZWRnZXMsIGFkZCB0aGUgcmVmZXJlbmNlIGVkZ2UgY2xhc3MuCiAgICAgICAgICAgIGlmIChtZXRhZWRnZSAmJiBtZXRhZWRnZS5udW1SZWZFZGdlcykgewogICAgICAgICAgICAgICAgZWRnZVR5cGUgKz0gJyAnICsgQ2xhc3MkMS5FZGdlLlJFRl9MSU5FOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGFwcGVuZEVkZ2UoYUdyb3VwLCBhLCBzY2VuZUVsZW1lbnQsIGVkZ2VUeXBlKTsKICAgICAgICAgICAgaWYgKGEuYW5ub3RhdGlvblR5cGUgIT09IEFubm90YXRpb25UeXBlLkVMTElQU0lTKSB7CiAgICAgICAgICAgICAgICBhZGRBbm5vdGF0aW9uTGFiZWxGcm9tTm9kZShhR3JvdXAsIGEpOwogICAgICAgICAgICAgICAgYnVpbGRTaGFwZUZvckFubm90YXRpb24oYUdyb3VwLCBhKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIGFkZEFubm90YXRpb25MYWJlbChhR3JvdXAsIGEubm9kZS5uYW1lLCBhLCBDbGFzcyQxLkFubm90YXRpb24uRUxMSVBTSVMpOwogICAgICAgICAgICB9CiAgICAgICAgfSkKICAgICAgICAgICAgLm1lcmdlKGFubm90YXRpb25Hcm91cHMpCiAgICAgICAgICAgIC5hdHRyKCdjbGFzcycsIChhKSA9PiB7CiAgICAgICAgICAgIHJldHVybiAoQ2xhc3MkMS5Bbm5vdGF0aW9uLkdST1VQICsKICAgICAgICAgICAgICAgICcgJyArCiAgICAgICAgICAgICAgICBhbm5vdGF0aW9uVG9DbGFzc05hbWUoYS5hbm5vdGF0aW9uVHlwZSkgKwogICAgICAgICAgICAgICAgJyAnICsKICAgICAgICAgICAgICAgIG5vZGVDbGFzcyhhKSk7CiAgICAgICAgfSkKICAgICAgICAgICAgLmVhY2goZnVuY3Rpb24gKGEpIHsKICAgICAgICAgICAgbGV0IGFHcm91cCA9IHNlbGVjdCh0aGlzKTsKICAgICAgICAgICAgdXBkYXRlKGFHcm91cCwgZCwgYSwgc2NlbmVFbGVtZW50KTsKICAgICAgICAgICAgaWYgKGEuYW5ub3RhdGlvblR5cGUgIT09IEFubm90YXRpb25UeXBlLkVMTElQU0lTKSB7CiAgICAgICAgICAgICAgICBhZGRJbnRlcmFjdGlvbkZvckFubm90YXRpb24oYUdyb3VwLCBkLCBhLCBzY2VuZUVsZW1lbnQpOwogICAgICAgICAgICB9CiAgICAgICAgfSk7CiAgICAgICAgYW5ub3RhdGlvbkdyb3VwcwogICAgICAgICAgICAuZXhpdCgpCiAgICAgICAgICAgIC5lYWNoKGZ1bmN0aW9uIChhKSB7CiAgICAgICAgICAgIGxldCBhR3JvdXAgPSBzZWxlY3QodGhpcyk7CiAgICAgICAgICAgIC8vIFJlbW92ZSBhbm5vdGF0aW9uIGZyb20gdGhlIGluZGV4IGluIHRoZSBzY2VuZQogICAgICAgICAgICBzY2Vu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HNjZW5lRWxlbWVudCkgewogICAgICAgIHNlbGVjdGlvbgogICAgICAgICAgICAub24oJ21vdXNlb3ZlcicsIChhKSA9PiB7CiAgICAgICAgICAgIHNjZW5lRWxlbWVudC5maXJlKCdhbm5vdGF0aW9uLWhpZ2hsaWdodCcsIHsKICAgICAgICAgICAgICAgIG5hbWU6IGEubm9kZS5uYW1lLAogICAgICAgICAgICAgICAgaG9zdE5hbWU6IGQubm9kZS5uYW1lLAogICAgICAgICAgICB9KTsKICAgICAgICB9KQogICAgICAgICAgICAub24oJ21vdXNlb3V0JywgKGEpID0+IHsKICAgICAgICAgICAgc2NlbmVFbGVtZW50LmZpcmUoJ2Fubm90YXRpb24tdW5oaWdobGlnaHQnLCB7CiAgICAgICAgICAgICAgICBuYW1lOiBhLm5vZGUubmFtZSwKICAgICAgICAgICAgICAgIGhvc3ROYW1lOiBkLm5vZGUubmFtZSwKICAgICAgICAgICAgfSk7CiAgICAgICAgfSkKICAgICAgICAgICAgLm9uKCdjbGljaycsIChhKSA9PiB7CiAgICAgICAgICAgIC8vIFN0b3AgdGhpcyBldmVudCdzIHByb3BhZ2F0aW9uIHNvIHRoYXQgaXQgaXNuJ3QgYWxzbyBjb25zaWRlcmVkIGEKICAgICAgICAgICAgLy8gZ3JhcGgtc2VsZWN0LgogICAgICAgICAgICBldmVudC5zdG9wUHJvcGFnYXRpb24oKTsKICAgICAgICAgICAgc2NlbmVFbGVtZW50LmZpcmUoJ2Fubm90YXRpb24tc2VsZWN0JywgewogICAgICAgICAgICAgICAgbmFtZTogYS5ub2RlLm5hbWUsCiAgICAgICAgICAgICAgICBob3N0TmFtZTogZC5ub2RlLm5hbWUsCiAgICAgICAgICAgIH0pOwogICAgICAgIH0pOwogICAgICAgIGlmIChhbm5vdGF0aW9uLmFubm90YXRpb25UeXBlICE9PSBBbm5vdGF0aW9uVHlwZS5TVU1NQVJZICYmCiAgICAgICAgICAgIGFubm90YXRpb24uYW5ub3RhdGlvblR5cGUgIT09IEFubm90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VkIGJldHdlZW4gdGhlIGFycm93IGFuZCB0aGUKICAgICAgICAvLyB0ZXh0IGxhYmVsLgogICAgICAgIGFHcm91cAogICAgICAgICAgICAuc2VsZWN0KCd1c2Uuc3VtbWFyeScpCiAgICAgICAgICAgIC50cmFuc2l0aW9uKCkKICAgICAgICAgICAgLmF0dHIoJ3gnLCBjeCArIGEuZHggLSAzKQogICAgICAgICAgICAuYXR0cigneScsIGQueSArIGEuZHkgLSA2KTsKICAgICAgICAvLyBOb2RlIHBvc2l0aW9uIChvbmx5IG9uZSBvZiB0aGUgc2hhcGUgc2VsZWN0aW9uIHdpbGwgYmUgbm9uLWVtcHR5LikKICAgICAgICBwb3NpdGlvbkVsbGlwc2UoYUdyb3VwLnNlbGVjdCgnLicgKyBDbGFzcyQxLkFubm90YXRpb24uTk9ERSArICcgZWxsaXBzZScpLCBjeCArIGEuZHgsIGQueSArIGEuZHksIGEud2lkdGgsIGEuaGVpZ2h0KTsKICAgICAgICBwb3NpdGlvblJlY3QoYUdyb3VwLnNlbGVjdCgnLicgKyBDbGFzcyQxLkFubm90YXRpb24uTk9ERSArICcgcmVjdCcpLCBjeCArIGEuZHgsIGQueSArIGEuZHksIGEud2lkdGgsIGEuaGVpZ2h0KTsKICAgICAgICBwb3NpdGlvblJlY3QoYUdyb3VwLnNlbGVjdCgnLicgKyBDbGFzcyQxLkFubm90YXRpb24uTk9ERSArICcgdXNlJyksIGN4ICsgYS5keCwgZC55ICsgYS5keSwgYS53aWR0aCwgYS5oZWlnaHQpOwogICAgICAgIC8vIEVkZ2UgcG9zaXRpb24KICAgICAgICBhR3JvdXAKICAgICAgICAgICAgLnNlbGVjdCgncGF0aC4nICsgQ2xhc3MkMS5Bbm5vdGF0aW9uLkVER0UpCiAgICAgICAgICAgIC50cmFuc2l0aW9uKCkKICAgICAgICAgICAgLmF0dHIoJ2QnLCAoYSkgPT4gewogICAgICAgICAgICAvLyBtYXAgcmVsYXRpdmUgcG9zaXRpb24gdG8gYWJzb2x1dGUgcG9zaXRpb24KICAgICAgICAgICAgbGV0IHBvaW50cyA9IGEucG9pbnRzLm1hcCgocCkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIHsgeDogcC5keCArIGN4LCB5OiBwLmR5ICsgZC55IH07CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICByZXR1cm4gaW50ZXJwb2xhdGUkNyhwb2ludHMpOwogICAgICAgIH0pOwogICAgfQogICAgLyoqCiAgICAgKiBTY2VuZS4KICAgICAqLwogICAgLyoqCiAgICAgKiBTZWxlY3Qgb3IgY3JlYXRlIGEgc2NlbmVHcm91cCBhbmQgYnVpbGQvdXBkYXRlIGl0cyBub2RlcyBhbmQgZWRnZXMuCiAgICAgKgogICAgICogU3RydWN0dXJlIFBhdHRlcm46CiAgICAgKgogICAgICogPGcgY2xhc3M9J3NjZW5lJz4KICAgICAqICAgPGcgY2xhc3M9J2NvcmUnPgogICAgICogICAgIDxnIGNsYXNzPSdlZGdlcyc+CiAgICAgKiAgICAgICAuLi4gc3R1ZmYgZnJvbSB0Zi5ncmFwaC5zY2VuZS5lZGdlcy5idWlsZCAuLi4KICAgICAqICAgICA8L2c+CiAgICAgKiAgICAgPGcgY2xhc3M9J25vZGVzJz4KICAgICAqICAgICAgIC4uLiBzdHVmZiBmcm9tIHRmLmdyYXBoLnNjZW5lLm5vZGVzLmJ1aWxkIC4uLgogICAgICogICAgIDwvZz4KICAgICAqICAgPC9nPgogICAgICogICA8ZyBjbGFzcz0naW4tZXh0cmFjdCc+CiAgICAgKiAgICAgPGcgY2xhc3M9J25vZGVzJz4KICAgICAqICAgICAgIC4uLiBzdHVmZiBmcm9tIHRmLmdyYXBoLnNjZW5lLm5vZGVzLmJ1aWxkIC4uLgogICAgICogICAgIDwvZz4KICAgICAqICAgPC9nPgogICAgICogICA8ZyBjbGFzcz0nb3V0LWV4dHJhY3QnPgogICAgICogICAgIDxnIGNsYXNzPSdub2Rlcyc+CiAgICAgKiAgICAgICAuLi4gc3R1ZmYgZn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G8gaW4gd3JpdGluZywgc29mdHdhcmUKICAgIGRpc3RyaWJ1dGVkIHVuZGVyIHRoZSBMaWNlbnNlIGlzIGRpc3RyaWJ1dGVkIG9uIGFuICJBUyBJUyIgQkFTSVMsCiAgICBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC4KICAgIFNlZSB0aGUgTGljZW5zZSBmb3IgdGhlIHNwZWNpZmljIGxhbmd1YWdlIGdvdmVybmluZyBwZXJtaXNzaW9ucyBhbmQKICAgIGxpbWl0YXRpb25zIHVuZGVyIHRoZSBMaWNlbnNlLgogICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KICAgIGxldCBUZk5vZGVJY29uID0gY2xhc3MgVGZOb2RlSWNvbiBleHRlbmRzIExlZ2FjeUVsZW1lbnRNaXhpbihQb2x5bWVyRWxlbWVudCkgewogICAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgICAgICBzdXBlciguLi5hcmd1bWVudHMpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogTm9kZSB0byByZXByZXNlbnQgd2l0aCBhbiBpY29uLiBPcHRpb25hbCwgYnV0IGlmIHNwZWNpZmllZCwgaXRzCiAgICAgICAgICAgICAqIHByb3BlcnRpZXMgb3ZlcnJpZGUgdGhvc2UgZGVmaW5lZCBpbiB0aGUgdHlwZSwgdmVydGljYWwsIGNvbnN0IGFuZAogICAgICAgICAgICAgKiBzdW1tYXJ5IHByb3BlcnRpZXMuCiAgICAgICAgICAgICAqIFRoaXMgcHJvcGVydHkgaXMgYSB0Zi5ncmFwaC5Ob2RlLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5ub2RlID0gbnVsbDsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFJlbmRlciBub2RlIGluZm9ybWF0aW9uIGFzc29jaWF0ZWQgd2l0aCB0aGlzIG5vZGUuIE9wdGlvbmFsLiBJZgogICAgICAgICAgICAgKiBzcGVjaWZpZWQsIHRoaXMgaXMgb25seSB1c2VkIHdoZW4gY29tcHV0aW5nIHRoZSBmaWxsIG9mIHRoZSBpY29uCiAgICAgICAgICAgICAqIGVsZW1lbnQuCiAgICAgICAgICAgICAqIFRoaXMgcHJvcGVydHkgaXMgYSB0Zi5ncmFwaC5yZW5kZXIuUmVuZGVyTm9kZUluZm8uCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLnJlbmRlckluZm8gPSBudWxsOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogU3RyaW5nIGluZGljYXRpbmcgdGhlIHR5cGUgb2YgY29sb3JpbmcgdG8gdXNlIGZvciB0aGlzIG5vZGUsIHVzZWQKICAgICAgICAgICAgICogb25seSBmb3IgZGV0ZXJtaW5pbmcgdGhlIGZpbGwuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmNvbG9yQnkgPSAnc3RydWN0dXJhbCc7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBGdW5jdGlvbiB1c2VkIGJ5IHN0cnVjdHVyYWwgY29sb3JpbmcgYWxnb3JpdGhtIHRvIGRldGVybWluZSB3aGljaAogICAgICAgICAgICAgKiBjb2xvciB0byB1c2UgYmFzZWQgb24gdGhlIHRlbXBsYXRlIElEIG9mIHRoZSBub2RlLiBPcHRpb25hbC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMudGVtcGxhdGVJbmRleCA9IG51bGw7CiAgICAgICAgICAgIC8qKiBUeXBlIG9mIG5vZGUgdG8gZHJhdyAoaWdub3JlZCBpZiBub2RlIGlzIHNldCkuICovCiAgICAgICAgICAgIHRoaXMudHlwZSA9IG51bGw7CiAgICAgICAgICAgIC8qKiBEaXJlY3Rpb24gZm9yIHNlcmllcyAoaWdub3JlZCBmb3Igb3RoZXIgdH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gaXNTdW1tYXJ5LCBpc0NvbnN0LCBpbnB1dFR5cGUpIHsKICAgICAgICAgICAgY29uc3QgeyBHcmFwaEljb25UeXBlIH0gPSB0Zl9ncmFwaF9pY29uOwogICAgICAgICAgICBpZiAoaW5wdXROb2RlKSB7CiAgICAgICAgICAgICAgICBzd2l0Y2ggKGlucHV0Tm9kZS50eXBlKSB7CiAgICAgICAgICAgICAgICAgICAgY2FzZSBOb2RlVHlwZS5PUDogewogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBvcE5hbWUgPSBpbnB1dE5vZGUub3A7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFRPRE8odGVuc29yYm9hcmFkLXRlYW0pOiBgb3BgIHNob3VsZCBoYXZlIGEgcHJlZGljdGFibGUgdHlwZS4KICAgICAgICAgICAgICAgICAgICAgICAgLy8gUmVtb3ZlIHRoZSB0eXBlIGNoZWNrLgogICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG9wTmFtZSAhPT0gJ3N0cmluZycpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gR3JhcGhJY29uVHlwZS5PUDsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG9wTmFtZSA9PT0gJ0NvbnN0JyB8fCBpc0NvbnN0KQogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEdyYXBoSWNvblR5cGUuQ09OU1Q7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChvcE5hbWUuZW5kc1dpdGgoJ1N1bW1hcnknKSB8fCBpc1N1bW1hcnkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBHcmFwaEljb25UeXBlLlNVTU1BUlk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEdyYXBoSWNvblR5cGUuT1A7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGNhc2UgTm9kZVR5cGUuTUVUQToKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEdyYXBoSWNvblR5cGUuTUVUQTsKICAgICAgICAgICAgICAgICAgICBjYXNlIE5vZGVUeXBlLlNFUklFUzoKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEdyYXBoSWNvblR5cGUuU0VSSUVTOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBpbnB1dFR5cGU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFRlc3Qgd2hldGhlciB0aGUgc3BlY2lmaWVkIG5vZGUgc2hvdWxkIGJlIHJlcHJlc2VudGVkIGFzIGEgdmVydGljYWwKICAgICAgICAgKiBzZXJpZXMuIERlZmF1bHRzIHRvIHRoZSB2YWx1ZSBvZiB0aGUgdmVydGljYWwgcHJvcGVydHkgaWYgbm9kZSBpcwogICAgICAgICAqIG5vdCBzcGVjaWZpZWQuCiAgICAgICAgICovCiAgICAgICAgX2lzVmVydGljYWwoaW5wdXROb2RlLCBpbnB1dFZlcnRpY2FsKSB7CiAgICAgICAgICAgIGlmIChpbnB1dE5vZGUpIHsKICAgICAgICAgICAgICAgIHJldHVybiBpbnB1dE5vZGUuaGFzTm9uQ29udHJvbEVkZ2VzOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiAhIWlucHV0VmVydGljYWw7CiAgICAgICAgfQogICAgICAgIF9nZXRGYWRlZChpdGVtUmVuZGVySW5mbykgewogICAgICAgICAgICByZXR1cm4gaXRlbVJlbmRlckluZm8gJiYgaXRlbVJlbmRlckluZm8uaXNGYWRlZE91dDsKICAgICAgICB9CiAgICAgICAgX29uRmlsbE92ZXJyaWRlQ2hhbmdlZChuZXdGaWxsLCBvbGRGaWxsKSB7CiAgICAgICAgICAgIGNvbnN0IHsgbm9kZSwgcmVuZGVySW5mbywgY29sb3JCeSwgdGVtcGxhdGVJbmRleCB9ID0gdGhpczsKICAgICAgICAgICAgY29uc3QgbnMgP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AgIHZlcnRpY2FsPSJbW19pc1ZlcnRpY2FsKG5vZGUsIHZlcnRpY2FsKV1dIgogICAgPjwvdGYtZ3JhcGgtaWNvbj4KICBgOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBPYmplY3QsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBPYmplY3QpCiAgICBdLCBUZk5vZGVJY29uLnByb3RvdHlwZSwgIm5vZGUiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBPYmplY3QsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBPYmplY3QpCiAgICBdLCBUZk5vZGVJY29uLnByb3RvdHlwZSwgInJlbmRlckluZm8iLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBPYmplY3QsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBPYmplY3QpCiAgICBdLCBUZk5vZGVJY29uLnByb3RvdHlwZSwgImNvbG9yQnkiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBPYmplY3QsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBPYmplY3QpCiAgICBdLCBUZk5vZGVJY29uLnByb3RvdHlwZSwgInRlbXBsYXRlSW5kZXgiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBTdHJpbmcsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBTdHJpbmcpCiAgICBdLCBUZk5vZGVJY29uLnByb3RvdHlwZSwgInR5cGUiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBCb29sZWFuLAogICAgICAgIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgQm9vbGVhbikKICAgIF0sIFRmTm9kZUljb24ucHJvdG90eXBlLCAidmVydGljYWwiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBCb29sZWFuLAogICAgICAgIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgQm9vbGVhbikKICAgIF0sIFRmTm9kZUljb24ucHJvdG90eXBlLCAiY29uc3QiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBCb29sZWFuLAogICAgICAgIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgQm9vbGVhbikKICAgIF0sIFRmTm9kZUljb24ucHJvdG90eXBlLCAic3VtbWFyeSIsIHZvaWQgMCk7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7CiAgICAgICAgICAgIHR5cGU6IFN0cmluZywKICAgICAgICB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIFN0cmluZykKICAgIF0sIFRmTm9kZUljb24ucHJvdG90eXBlLCAiZmlsbCIsIHZvaWQgMCk7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7CiAgICAgICAgICAgIHR5cGU6IE51bWJlciwKICAgICAgICB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIE51bWJlcikKICAgIF0sIFRmTm9kZUljb24ucHJvdG90eXBlLCAiaGVpZ2h0Iiwgdm9pZCAwKTsKICAg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WQgb24gYW4gIkFTIElTIiBCQVNJUywKICAgIFdJVEhPVVQgV0FSUkFOVElFUyBPUiBDT05ESVRJT05TIE9GIEFOWSBLSU5ELCBlaXRoZXIgZXhwcmVzcyBvciBpbXBsaWVkLgogICAgU2VlIHRoZSBMaWNlbnNlIGZvciB0aGUgc3BlY2lmaWMgbGFuZ3VhZ2UgZ292ZXJuaW5nIHBlcm1pc3Npb25zIGFuZAogICAgbGltaXRhdGlvbnMgdW5kZXIgdGhlIExpY2Vuc2UuCiAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwogICAgbGV0IFRmR3JhcGhPcENvbXBhdExpc3RJdGVtID0gY2xhc3MgVGZHcmFwaE9wQ29tcGF0TGlzdEl0ZW0gZXh0ZW5kcyBMZWdhY3lFbGVtZW50TWl4aW4oUG9seW1lckVsZW1lbnQpIHsKICAgICAgICBfaXRlbVR5cGVDaGFuZ2VkKCkgewogICAgICAgICAgICBpZiAodGhpcy5pdGVtVHlwZSAhPT0gJ3N1Ym5vZGUnKSB7CiAgICAgICAgICAgICAgICB0aGlzLiRbJ2xpc3QtaXRlbSddLmNsYXNzTGlzdC5hZGQoJ2NsaWNrYWJsZScpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy4kWydsaXN0LWl0ZW0nXS5jbGFzc0xpc3QucmVtb3ZlKCdjbGlja2FibGUnKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBfbm9kZUxpc3RlbmVyKGV2ZW50KSB7CiAgICAgICAgICAgIC8vIGZpcmUgbm9kZS5jbGljay9tb3VzZW92ZXIvbW91c2VvdXQKICAgICAgICAgICAgdGhpcy5maXJlKCdub2RlLWxpc3QtaXRlbS0nICsgZXZlbnQudHlwZSwgewogICAgICAgICAgICAgICAgbm9kZU5hbWU6IHRoaXMubmFtZSwKICAgICAgICAgICA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T4gewogICAgICAgICAgICBvYmpba2V5XSA9IHRlbXBsYXRlc1trZXldOwogICAgICAgICAgICByZXR1cm4gb2JqOwogICAgICAgIH0sIHt9KTsKICAgIH0KICAgIC8qKgogICAgICogQHJldHVybiBVbmlxdWUgc3RyaW5nIGZvciBhIG1ldGFub2RlIGJhc2VkIG9uIGRlcHRoLCB8VnwsIHxFfCBhbmQKICAgICAqIG9wIHR5cGUgaGlzdG9ncmFtLgogICAgICovCiAgICBmdW5jdGlvbiBnZXRTaWduYXR1cmUobWV0YW5vZGUpIHsKICAgICAgICAvLyBkZXB0aD08bnVtYmVyPiB8Vnw9PG51bWJlcj4gfEV8PTxudW1iZXI+CiAgICAgICAgbGV0IHByb3BzID0gbG9kYXNoLm1hcCh7CiAgICAgICAgICAgIGRlcHRoOiBtZXRhbm9kZS5kZXB0aCwKICAgICAgICAgICAgJ3xWfCc6IG1ldGFub2RlLm1ldGFncmFwaC5ub2RlcygpLmxlbmd0aCwKICAgICAgICAgICAgJ3xFfCc6IG1ldGFub2RlLm1ldGFncmFwaC5lZGdlcygpLmxlbmd0aCwKICAgICAgICB9LCBmdW5jdGlvbiAodiwgaykgewogICAgICAgICAgICByZXR1cm4gayArICc9JyArIHY7CiAgICAgICAgfSkuam9pbignICcpOwogICAgICAgIC8vIG9wdHlwZTE9Y291bnQxLG9wdHlwZTI9Y291bnQyCiAgICAgICAgbGV0IG9wcyA9IGxvZGFzaC5tYXAobWV0YW5vZGUub3BIaXN0b2dyYW0sIGZ1bmN0aW9uIChjb3VudCwgb3ApIHsKICAgICAgICAgICAgcmV0dXJuIG9wICsgJz0nICsgY291bnQ7CiAgICAgICAgfSkuam9pbignLCcpOwogICAgICAgIHJldHVybiBwcm9wcyArICcgW29wc10gJyArIG9wczsKICAgIH0KICAgIC8qKgogICAgICogR2VuZXJhdGUgYSBuZWFyZXN0IG5laWdoYm9yIGhhc2ggb2YgbWV0YW5vZGVzCiAgICAgKiBiYXNlZCBvbiBkZXB0aCwgfFZ8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lnbmF0dXJlXSB8fCB7CiAgICAgICAgICAgICAgICBub2RlczogW10sCiAgICAgICAgICAgICAgICBsZXZlbDogbGV2ZWxPZk1ldGFOb2RlLAogICAgICAgICAgICB9OwogICAgICAgICAgICByZWR1Y2VkW3NpZ25hdHVyZV0gPSB0ZW1wbGF0ZUluZm87CiAgICAgICAgICAgIHRlbXBsYXRlSW5mby5ub2Rlcy5wdXNoKG5vZGUpOwogICAgICAgICAgICBpZiAodGVtcGxhdGVJbmZvLmxldmVsID4gbGV2ZWxPZk1ldGFOb2RlKSB7CiAgICAgICAgICAgICAgICB0ZW1wbGF0ZUluZm8ubGV2ZWwgPSBsZXZlbE9mTWV0YU5vZGU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHJlZHVjZWQ7CiAgICAgICAgfSwge30pOwogICAgICAgIHJldHVybiBPYmplY3Qua2V5cyhoYXNoRGljdCkKICAgICAgICAgICAgLm1hcCgoa2V5KSA9PiBba2V5LCBoYXNoRGljdFtrZXldXSkKICAgICAgICAgICAgLmZpbHRlcigoW18sIHN1YkdyYXBoXSkgPT4gewogICAgICAgICAgICBjb25zdCB7IG5vZGVzIH0gPSBzdWJHcmFwaDsKICAgICAgICAgICAgaWYgKG5vZGVzLmxlbmd0aCA+IDEpIHsKICAgICAgICAgICAgICAgIC8vIFRoZXJlIGlzIG1vcmUgdGhhbiAxIG5vZGUgd2l0aCB0aGlzIHRlbXBsYXRlLiBJdCBpcyB3b3J0aCBhc3NpZ25pbmcKICAgICAgICAgICAgICAgIC8vIGEgdW5pcXVlIGNvbG9yIHRvIHRoaXMgdGVtcGxhdGUuCiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBJZiB0aGVyZSBpcyBvbmx5IDEgbm9kZSB3aXRoIHRoaXMgdGVtcGxhdGUsIG9ubHkgbWFrZSBhIHRlbXBsYXRlIGZvcgogICAgICAgICAgICAvLyBpdCBpZiBpdCByZ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RWFjaChmdW5jdGlvbiAobWV0YW5vZGUpIHsKICAgICAgICAgICAgICAgIC8vIGNoZWNrIHdpdGggZWFjaCBleGlzdGluZyBjbHVzdGVyCiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGNsdXN0ZXJzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgbGV0IHNpbWlsYXIgPSAhdmVyaWZ5VGVtcGxhdGUgfHwKICAgICAgICAgICAgICAgICAgICAgICAgaXNTaW1pbGFyU3ViZ3JhcGgoY2x1c3RlcnNbaV0ubWV0YW5vZGUubWV0YWdyYXBoLCBtZXRhbm9kZS5tZXRhZ3JhcGgpOwogICAgICAgICAgICAgICAgICAgIC8vIGlmIHNpbWlsYXIsIGp1c3QgYWRkIHRoaXMgbWV0YW5vZGUgdG8gdGhlIGNsdXN0ZXIKICAgICAgICAgICAgICAgICAgICBpZiAoc2ltaWxhcikgewogICAgICAgICAgICAgICAgICAgICAgICAvLyBnZXQgdGVtcGxhdGUgZnJvbSB0aGUgZmlyc3Qgb25lCiAgICAgICAgICAgICAgICAgICAgICAgIG1ldGFub2RlLnRlbXBsYXRlSWQgPSBjbHVzdGVyc1tpXS5tZXRhbm9kZS50ZW1wbGF0ZUlkOwogICAgICAgICAgICAgICAgICAgICAgICBjbHVzdGVyc1tpXS5tZW1iZXJzLnB1c2gobWV0YW5vZGUubmFtZSk7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvLyBvdGhlcndpc2UgY3JlYXRlIGEgbmV3IGNsdXN0ZXIgd2l0aCBpZCAnc2lnbmF0dXJlIFtjb3VudF0gJwogICAgICAgICAgICAgICAgbWV0YW5vZGUudGVtcGxhdGVJZCA9IHNpZ25hdHVyZSArICdbJyArIGNsdXN0ZXJzLmxlbmd0aCArICddJzsKICAgICAgICAgICAgICAgIGNsdXN0ZXJzLnB1c2goewogICAgICAgICAgICAgICAgICAgIG1ldGFub2RlOiBtZXRhbm9kZSwKICAgICAgICAgICAgICAgICAgICBtZW1iZXJzOiBbbWV0YW5vZGUubmFtZV0sCiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGNsdXN0ZXJzLmZvckVhY2goZnVuY3Rpb24gKGMpIHsKICAgICAgICAgICAgICAgIHRlbXBsYXRlc1tjLm1ldGFub2RlLnRlbXBsYXRlSWRdID0gewogICAgICAgICAgICAgICAgICAgIGxldmVsOiBubkdyb3VwUGFpclsxXS5sZXZlbCwKICAgICAgICAgICAgICAgICAgICBub2RlczogYy5tZW1iZXJzLAogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHJldHVybiB0ZW1wbGF0ZXM7CiAgICAgICAgfSwgcmVzdWx0KTsKICAgIH0KICAgIGZ1bmN0aW9uIHNvcnROb2RlcyhuYW1lcywgZ3JhcGgsIHByZWZpeCkgewogICAgICAgIHJldHVybiBsb2Rhc2guc29ydEJ5KG5hbWVzLCBbCiAgICAgICAgICAgIChuYW1lKSA9PiBncmFwaC5ub2RlKG5hbWUpLm9wLAogICAgICAgICAgICAobmFtZSkgPT4gZ3JhcGgubm9kZShuYW1lKS50ZW1wbGF0ZUlkLAogICAgICAgICAgICAobmFtZSkgPT4gZ3JhcGgubmVpZ2hib3JzKG5hbWUpLmxlbmd0aCwKICAgICAgICAgICAgKG5hbWUpID0+IGdyYXBoLnByZWRlY2Vzc29ycyhuYW1lKS5sZW5ndGgsCiAgICAgICAgICAgIChuYW1lKSA9PiBncmFwaC5zdWNjZXNzb3JzKG5hbWUpLmxlbmd0aCwKICAgICAgICAgICAgKG5hbWUpID0+IG5hbWUuc3Vic3RyKHByZWZpeC5sZW5ndGgpLAogICAgICAgIF0pOwogICAgfQogICAgZnVuY3Rpb24gaXNTaW1pbGFyU3ViZ3JhcGgoZzEsIGcyKSB7CiAgICAgICAgaWYgKCFoYXNTaW1pbGFyRGVncmVlU2VxdWVuY2UoZzEsIGcyKSkgewogICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgfQogICAgICAgIC8vIGlmIHdlIHdhbnQgdG8gc2tpcCwganVzdCByZXR1cm4gdHJ1ZSBoZXJlLgogICAgICAgIC8vIHJldHVybiB0cnVlOwogICAgICAgIC8vIFZlcmlmeSBzZXF1ZW5jZSBieSBydW5uaW5nIERGUwogICAgICAgIGxldCBnMXByZWZpeCA9IGcxLmdyYXBoKCkubmFtZTsKICAgICAgICBsZXQgZzJwcmVmaXggPSBnMi5ncmFwaCgpLm5hbWU7CiAgICAgICAgbGV0IHZpc2l0ZWQxID0ge307CiAgICAgICAgbGV0IHZpc2l0ZWQyID0ge307CiAgICAgICAgbGV0IHN0YWNrID0gW107CiAgICAgICAgLyoqCiAgICAgICAgICogcHVzaCBzb3VyY2VzIG9yIHN1Y2Nlc3NvcnMgaW50byB0aGUgc3RhY2sKICAgICAgICAgKiBpZiB0aGUgdmlzaXRpbmcgcGF0dGVybiBoYXMgYmVlbiBzaW1pbGFyLgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHN0YWNrUHVzaElmTm90RGlmZmVyZW50KG4xLCBuMikgewogICAgICAgICAgICBsZXQgc3ViMSA9IG4xLnN1YnN0cihnMXByZWZpeC5sZW5ndGgpLCBzdWIyID0gbjIuc3Vic3RyKGcycHJlZml4Lmxlbmd0aCk7CiAgICAgICAgICAgIC8qIHRzbGludDpkaXNhYmxlICovCiAgICAgICAgICAgIGlmICh2aXNpdGVkMVtzdWIxXSBeIHZpc2l0ZWQyW3N1YjJdKSB7CiAgICAgICAgICAgICAgICBjb25zb2xlLndhcm4oJ2RpZmZlcmVudCB2aXNpdCBwYXR0ZXJuJywgJ1snICsgZzFwcmVmaXggKyAnXScsIHN1YjEsICdbJyArIGcycHJlZml4ICsgJ10nLCBzdWIyKTsKICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qIHRzbGludDplbmFibGUgKi8KICAgICAgICAgICAgaWYgKCF2aXNpdGVkMVtzdWIxXSkgewogICAgICAgICAgICAgICAgLy8gaW1wbGllZCAmJiAhdmlzaXRlZDJbc3ViMl0KICAgICAgICAgICAgICAgIHZpc2l0ZWQxW3N1YjFdID0gdmlzaXRlZDJbc3ViMl0gPSB0cnVlOwogICAgICAgICAgICAgICAgc3RhY2sucHVzaCh7IG4xOiBuMSwgbjI6IG4yIH0pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICB9CiAgICAgICAgLy8gY2hlY2sgaWYgaGF2ZSBzYW1lICMgb2Ygc291cmNlcyB0aGVuIHNvcnQgYW5kIHB1c2gKICAgICAgICBsZXQgc291cmNlczEgPSBnMS5zb3VyY2VzKCk7CiAgICAgICAgbGV0IHNvdXJjZXMyID0gZzIuc291cmNlcygpOwogICAgICAgIGlmIChzb3VyY2VzMS5sZW5ndGggIT09IHNvdXJjZXMyLmxlbmd0aCkgewogICAgICAgICAgICAvKiB0c2xpbnQ6ZGlzYWJsZSAqLwogICAgICAgICAgICBjb25zb2xlLmxvZygnZGlmZmVyZW50IHNvdXJjZSBsZW5ndGgnKTsKICAgICAgICAgICAgLyogdHNsaW50OmVuYWJsZSAqLwogICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgfQogICAgICAgIHNvdXJjZXMxID0gc29ydE5vZGVzKHNvdXJjZXMxLCBnMSwgZzFwcmVmaXgpOwogICAgICAgIHNvdXJjZXMyID0gc29ydE5vZGVzKHNvdXJjZXMyLCBnMiwgZzJwcmVmaXgpOwogICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgc291cmNlczEubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgbGV0IGRpZmZlcmVudCA9IHN0YWNrUHVzaElmTm90RGlmZmVyZW50KHNvdXJjZXMxW2ldLCBzb3VyY2VzMltpXSk7CiAgICA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Y2MxLmxlbmd0aDsgaisrKSB7CiAgICAgICAgICAgICAgICBsZXQgZGlmZmVyZW50ID0gc3RhY2tQdXNoSWZOb3REaWZmZXJlbnQoc3VjYzFbal0sIHN1Y2MyW2pdKTsKICAgICAgICAgICAgICAgIGlmIChkaWZmZXJlbnQpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIHRydWU7CiAgICB9CiAgICAvKioKICAgICAqIFJldHVybnMgaWYgdHdvIG5vZGVzIGhhdmUgaWRlbnRpY2FsIHN0cnVjdHVyZS4KICAgICAqLwogICAgZnVuY3Rpb24gaXNTaW1pbGFyTm9kZShuMSwgbjIpIHsKICAgICAgICBpZiAobjEudHlwZSA9PT0gTm9kZVR5cGUuTUVUQSkgewogICAgICAgICAgICAvLyBjb21wYXJlIG1ldGFub2RlCiAgICAgICAgICAgIGxldCBtZXRhbm9kZTEgPSBuMTsKICAgICAgICAgICAgbGV0IG1ldGFub2RlMiA9IG4yOwogICAgICAgICAgICByZXR1cm4gKG1ldGFub2RlMS50ZW1wbGF0ZUlkICYmCiAgICAgICAgICAgICAgICBtZXRhbm9kZTIudGVtcGxhdGVJZCAmJgogICAgICAgICAgICAgICAgbWV0YW5vZGUxLnRlbXBsYXRlSWQgPT09IG1ldGFub2RlMi50ZW1wbGF0ZUlkKTsKICAgICAgICB9CiAgICAgICAgZWxzZSBpZiAobjEudHlwZSA9PT0gTm9kZVR5cGUuT1AgJiYgbjIudHlwZSA9PT0gTm9kZVR5cGUuT1ApIHsKICAgICAgICAgICAgLy8gY29tcGFyZSBsZWFmIG5vZGUKICAgICAgICAgICAgcmV0dXJuIG4xLm9wID09PSBuMi5vcDsKICAgICAgICB9CiAgICAgICAgZWxzZSBpZiAobjEudHlwZSA9PT0gTm9kZVR5cGUuU0VSSUVTICYmIG4yLnR5cGUgPT09IE5vZGVUeXBlLlNFUklFUykgewogICAgICAgICAgICAvLyBjb21wYXJlIHNlcmllcyBub2RlIHNpemVzIGFuZCBvcGVyYXRpb25zCiAgICAgICAgICAgIC8vIChvbmx5IG5lZWQgdG8gY2hlY2sgb25lIG9wIGFzIGFsbCBvcCBub2RlcyBhcmUgaWRlbnRpY2FsIGluIHNlcmllcykKICAgICAgICAgICAgbGV0IHNuMSA9IG4xOwogICAgICAgICAgICBsZXQgc24yID0gbjI7CiAgICAgICAgICAgIGxldCBzZXJpZXNub2RlMUNvdW50ID0gc24xLm1ldGFncmFwaC5ub2RlQ291bnQoKTsKICAgICAgICAgICAgcmV0dXJuIChzZXJpZXNub2RlMUNvdW50ID09PSBzbjIubWV0YWdyYXBoLm5vZGVDb3VudCgpICYmCiAgICAgICAgICAgICAgICAoc2VyaWVzbm9kZTFDb3VudCA9PT0gMCB8fAogICAgICAgICAgICAgICAgICAgIHNuMS5tZXRhZ3JhcGgubm9kZShzbjEubWV0YWdyYXBoLm5vZGVzKClbMF0pLm9wID09PQogICAgICAgICAgICAgICAgICAgICAgICBzbjIubWV0YWdyYXBoLm5vZGUoc24yLm1ldGFncmFwaC5ub2RlcygpWzBdKS5vcCkpOwogICAgICAgIH0KICAgICAgICByZXR1cm4gZmFsc2U7CiAgICB9CgogICAgLyogQ29weXJpZ2h0IDIwMTUgVGhlIFRlbnNvckZsb3cgQXV0aG9ycy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4KCiAgICBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgJ0xpY2Vuc2UnKTsKICAgIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4KICAgIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdAoKICAgICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElD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gPSAxOwogICAgICAgICAgICB0aGlzLmdyYXBoT3B0aW9ucyA9IGdyYXBoT3B0aW9ucyB8fCB7fTsKICAgICAgICAgICAgdGhpcy5ncmFwaE9wdGlvbnMuY29tcG91bmQgPSB0cnVlOwogICAgICAgICAgICB0aGlzLnJvb3QgPSBjcmVhdGVNZXRhbm9kZShST09UX05BTUUsIHRoaXMuZ3JhcGhPcHRpb25zKTsKICAgICAgICAgICAgdGhpcy5saWJyYXJ5RnVuY3Rpb25zID0ge307CiAgICAgICAgICAgIHRoaXMudGVtcGxhdGVzID0gbnVsbDsKICAgICAgICAgICAgdGhpcy5kZXZpY2VzID0gbnVsbDsKICAgICAgICAgICAgdGhpcy54bGFDbHVzdGVycyA9IG51bGw7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBAdHlwZSB7T2JqZWN0fSBEaWN0aW9uYXJ5IG9iamVjdCB0aGF0IG1hcHMgbm9kZSBuYW1lIHRvIHRoZSBub2RlCiAgICAgICAgICAgICAqIChjb3VsZCBiZSBvcC1ub2RlLCBtZXRhbm9kZSwgb3Igc2VyaWVzLW5vZGUpCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmluZGV4ID0ge307CiAgICAgICAgICAgIHRoaXMuaW5kZXhbUk9PVF9OQU1FXSA9IHRoaXMucm9vdDsKICAgICAgICAgICAgdGhpcy5vcmRlcmluZ3MgPSB7fTsKICAgICAgICB9CiAgICAgICAgZ2V0Tm9kZU1hcCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuaW5kZXg7CiAgICAgICAgfQogICAgICAgIG5vZGUobmFtZSkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5pbmRleFtuYW1lXTsKICAgICAgICB9CiAgICAgICAgc2V0Tm9kZShuYW1lLCBub2RlKSB7CiAgICAgICAgICAgIHRoaXMuaW5kZXhbbmFtZV0gPSBub2RlOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBHaXZlbiB0aGUgbmFtZSBvZiBhIG5vZGUgaW4gdGhpcyBoaWVyYXJjaHksIGdldCBpdHMgYnJpZGdlZ3JhcGgsIGNyZWF0aW5nCiAgICAgICAgICogaXQgb24gdGhlIGZseSBpZiBuZWNlc3NhcnkuIElmIHRoZSBub2RlIGlzIG5vdCBhIEdyb3VwTm9kZSwgdGhlbiB0aGlzCiAgICAgICAgICogbWV0aG9kIHJldHVybnMgbnVsbC4gSWYgdGhlIHByb3ZpZGVkIG5hbWUgZG9lcyBub3QgbWFwIHRvIGEgbm9kZSBpbiB0aGUKICAgICAgICAgKiBoaWVyYXJjaHksIGFuIGVycm9yIHdpbGwgYmUgdGhyb3duLgogICAgICAgICAqLwogICAgICAgIGdldEJyaWRnZWdyYXBoKG5vZGVOYW1lKSB7CiAgICAgICAgICAgIGxldCBub2RlID0gdGhpcy5pbmRleFtub2RlTmFtZV07CiAgICAgICAgICAgIGlmICghbm9kZSkgewogICAgICAgICAgICAgICAgdGhyb3cgRXJyb3IoJ0NvdWxkIG5vdCBmaW5kIG5vZGUgaW4gaGllcmFyY2h5OiAnICsgbm9kZU5hbWUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICghKCdtZXRhZ3JhcGgnIGluIG5vZGUpKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICAgICAgfQogICAgICAgICAgICBsZXQgZ3JvdXBOb2RlID0gbm9kZTsKICAgICAgICAgICAgaWYgKGdyb3VwTm9kZS5icmlkZ2VncmFwaCkgewogICAgICAgICAgICAgICAgcmV0dXJuIGdyb3VwTm9kZS5icmlkZ2VncmFwaDsKICAgICAgICAgICAgfQogICAgICAgICAgICBsZXQgYnJpZGdlZ3JhcGggPSAoZ3JvdXBOb2RlLmJyaWRnZWdyYXBoID0gY3JlYXRlR3JhcGgoJ0JSSURHRUdSQVBIJywgR3JhcGhUeXBlLkJSSURHRSwgdGhpcy5ncmFwaE9wdGlvbnMpKTsKICAgICAgICAgICAgaWYgKCFub2RlLnBhcmVudE5vZGUgfHwgISgnbWV0YWdyYXBoJyBpbiBub2RlLnBhcmVudE5vZGUpKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gYnJpZGdlZ3JhcGg7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgbGV0IHBhcmVudE5vZGUgPSBub2RlLnBhcmVudE5vZGU7CiAgICAgICAgICAgIGxldCBwYXJlbnRNZXRhZ3JhcGggPSBwYXJlbnROb2RlLm1ldGFncmFwaDsKICAgICAgICAgICAgbGV0IHBhcmVudEJyaWRnZWdyYXBoID0gdGhpcy5nZXRCcmlkZ2VncmFwaChwYXJlbnROb2RlLm5hbWUpOwogICAgICAgICAgICAvLyBGb3IgZWFjaCBvZiB0aGUgcGFyZW50IG5vZGUncyB0d28gTWV0YWVkZ2UgY29udGFpbmluZyBncmFwaHMsIHByb2Nlc3MKICAgICAgICAgICAgLy8gZWFjaCBNZXRhZWRnZSBpbnZvbHZpbmcgdGhpcyBub2RlLgogICAgICAgICAgICBsb2Rhc2guZWFjaChbcGFyZW50TWV0YWdyYXBoLCBwYXJlbnRCcmlkZ2VncmFwaF0sIChwYXJlbnRHcmFwaCkgPT4gewogICAgICAgICAgICAgICAgcGFyZW50R3JhcGgKICAgICAgICAgICAgICAgICAgICAuZWRnZXMoKQogICAgICAgICAgICAgICAgICAgIC5maWx0ZXIoKGUpID0+IGUudiA9PT0gbm9kZU5hbWUgfHwgZS53ID09PSBub2RlTmFtZSkKICAgICAgICAgICAgICAgICAgICAuZm9yRWFjaCgocGFyZW50RWRnZU9iaikgPT4gewogICAgICAgICAgICAgICAgICAgIGxldCBpbmJvdW5kID0gcGFyZW50RWRnZU9iai53ID09PSBub2RlTmFtZTsKICAgICAgICAgICAgICAgICAgICBsZXQgcGFyZW50TWV0YWVkZ2UgPSBwYXJlbnRHcmFwaC5lZGdlKHBhcmVudEVkZ2VPYmopOwogICAgICAgICAgICAgICAgICAgIC8vIFRoZSBwYXJlbnQncyBNZXRhZWRnZSByZXByZXNlbnRzIHNvbWUgbnVtYmVyIG9mIHVuZGVybHlpbmcKICAgICAgICAgICAgICAgICAgICAvLyBCYXNlRWRnZXMgZnJvbSB0aGUgb3JpZ2luYWwgZnVsbCBncmFwaC4gRm9yIGVhY2ggb2YgdGhvc2UsIHdlIG5lZWQKICAgICAgICAgICAgICAgICAgICAvLyB0byBkZXRlcm1pbmUgd2hpY2ggaW1tZWRpYXRlIGNoaWxkIGlzIGludm9sdmVkIGFuZCBtYWtlIHN1cmUKICAgICAgICAgICAgICAgICAgICAvLyB0aGVyZSdzIGEgTWV0YWVkZ2UgaW4gdGhlIGJyaWRnZWdyYXBoIHRoYXQgY292ZXJzIGl0LgogICAgICAgICAgICAgICAgICAgIGxvZGFzaC5lYWNoKHBhcmVudE1ldGFlZGdlLmJhc2VFZGdlTGlzdCwgKGJhc2VFZGdlKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIEJhc2VkIG9uIHRoZSBkaXJlY3Rpb24sIGZpZ3VyZSBvdXQgd2hpY2ggaXMgdGhlIGRlc2NlbmRhbnQgbm9kZQogICAgICAgICAgICAgICAgICAgICAgICAvLyBhbmQgd2hpY2ggaXMgdGhlICdvdGhlcicgbm9kZSAoc2libGluZyBvZiBwYXJlbnQgb3IgYW5jZXN0b3IpLgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgW2Rlc2NlbmRhbnROYW1lLCBvdGhlck5hbWVdID0gaW5ib3VuZAogICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBbYmFzZUVkZ2UudywgcGFyZW50RWRnZU9iai52XQogICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBbYmFzZUVkZ2UudiwgcGFyZW50RWRnZU9iai53XTsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gRGV0ZXJtaW5lIHRoZSBpbW1lZGlhdGUgY2hpbGQgY29udGFpbmluZyB0aGlzIGRlc2NlbmRhbnQgbm9kZS4KICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNoaWxkTmFtZSA9IHRoaXMuZ2V0Q2hpbGROYW1lKG5vZGVOYW1lLCBkZXNjZW5kYW50TmFtZSk7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIExvb2sgZm9yIGFuIGV4aXN0aW5nIE1ldGFlZGdlIGluIHRoZSBicmlkZ2VncmFwaCAob3IgY3JlYXRlIGEKICAgICAgICAgICAgICAgICAgICAgICAgLy8gbmV3IG9uZSkgdGhhdCBjb3ZlcnMgdGhlIHJlbGF0aW9uc2hpcCBiZXR3ZWVuIGNoaWxkIGFuZCBvdGhlci4KICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGJyaWRnZUVkZ2VPYmogPSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2OiBpbmJvdW5kID8gb3RoZXJOYW1lIDogY2hpbGROYW1lLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgdzogaW5ib3VuZCA/IGNoaWxkTmFtZSA6IG90aGVyTmFtZSwKICAgICAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGJyaWRnZU1ldGFlZGdlID0gYnJpZGdlZ3JhcGguZWRnZShicmlkZ2VFZGdlT2JqKTsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFicmlkZ2VNZXRhZWRnZSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJpZGdlTWV0YWVkZ2UgPSBjcmVhdGVNZXRhZWRnZShicmlkZ2VFZGdlT2JqLnYsIGJyaWRnZUVkZ2VPYmoudyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmlkZ2VNZXRhZWRnZS5pbmJvdW5kID0gaW5ib3VuZDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyaWRnZWdyYXBoLnNldEVkZ2UoYnJpZGdlRWRnZU9iai52LCBicmlkZ2VFZGdlT2JqLncsIGJyaWRnZU1ldGFlZGdlKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAvLyBDb3B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1cnJlbnROb2RlLm5hbWU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjdXJyZW50Tm9kZSA9IGN1cnJlbnROb2RlLnBhcmVudE5vZGU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhyb3cgRXJyb3IoJ0NvdWxkIG5vdCBmaW5kIGltbWVkaWF0ZSBjaGlsZCBmb3IgZGVzY2VuZGFudDogJyArIGRlc2NlbmRhbnROYW1lKTsKICAgICAgICB9CiAgICAgICAgLyoqIEdpdmVuIHRoZSBuYW1lIG9mIGEgbm9kZSwgcmV0dXJuIGl0cyBpbmNvbWluZyBtZXRhZWRnZXMuICovCiAgICAgICAgZ2V0UHJlZGVjZXNzb3JzKG5vZGVOYW1lKSB7CiAgICAgICAgICAgIGxldCBub2RlID0gdGhpcy5pbmRleFtub2RlTmFtZV07CiAgICAgICAgICAgIGlmICghbm9kZSkgewogICAgICAgICAgICAgICAgdGhyb3cgRXJyb3IoJ0NvdWxkIG5vdCBmaW5kIG5vZGUgd2l0aCBuYW1lOiAnICsgbm9kZU5hbWUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGxldCBwcmVkZWNlc3NvcnMgPSB0aGlzLmdldE9uZVdheUVkZ2VzKG5vZGUsIHRydWUpOwogICAgICAgICAgICAvLyBBZGQgZW1iZWRkZWQgcHJlZGVjZXNzb3JzLCBzdWNoIGFzIGNvbnN0YW50cy4KICAgICAgICAgICAgaWYgKCFub2RlLmlzR3JvdXBOb2RlKSB7CiAgICAgICAgICAgICAgICBsb2Rhc2guZWFjaChub2RlLmluRW1iZWRkaW5ncywgKGVtYmVkZGVkTm9kZSkgPT4gewogICAgICAgICAgICAgICAgICAgIGxvZGFzaC5lYWNoKG5vZGUuaW5wdXRzLCAoaW5wdXQpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0Lm5hbWUgPT09IGVtYmVkZGVkTm9kZS5uYW1lKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBNYWtlIGEgbmV3IG1ldGFlZGdlIGhvbGRpbmcgdGhlIGVkZ2UgYmV0d2VlbiB0aGUKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIG5vZGUgYW5kIHRoZSBpbi1lbWJlZGRpbmcuCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbWV0YWVkZ2UgPSBuZXcgTWV0YWVkZ2VJbXBsKGVtYmVkZGVkTm9kZS5uYW1lLCBub2RlTmFtZSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXRhZWRnZS5hZGRCYXNlRWRnZSh7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXNDb250cm9sRGVwZW5kZW5jeTogaW5wdXQuaXNDb250cm9sRGVwZW5kZW5jeSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdXRwdXRUZW5zb3JLZXk6IGlucHV0Lm91dHB1dFRlbnNvcktleSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpc1JlZmVyZW5jZUVkZ2U6IGZhbHNlLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHY6IGVtYmVkZGVkTm9kZS5uYW1lLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHc6IG5vZGVOYW1lLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgdGhpcyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmVkZWNlc3NvcnMucmVndWxhci5wdXNoKG1ldGFlZGdlKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHByZWRlY2Vzc29yczsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogR2l2ZW4gdGhlIG5hbWUgb2YgYSBub2RlLCByZXR1cm4gaXRzIG91dGdvaW5nIG1ldGFlZGdlcy4KICAgICAgICAgKgogICAgICAgICAqIFRoaXMgaXMgdGhlIGludmVyc2Ugb2YgZ2V0UHJlZGVjZXNzb3JzKCkuIFNlZSB0aGF0IG1ldGhvZCdzIGRvY3VtZW50YXRpb24KICAgICAgICAgKiBmb3IgYW4gaW4tZGVwdGggZXhhbXBsZS4KICAgICAgICAgKi8KICAgICAgICBnZXRTdWNjZXNzb3JzKG5vZGVOYW1lKSB7CiAgICAgICAgICAgIGxldCBub2RlID0gdGhpcy5pbmRleFtub2RlTmFtZV07CiAgICAgICAgICAgIGlmICghbm9kZSkgewogICAgICAgICAgICAgICAgdGhyb3cgRXJyb3IoJ0NvdWxkIG5vdCBmaW5kIG5vZGUgd2l0aCBuYW1lOiAnICsgbm9kZU5hbWUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGxldCBzdWNjZXNzb3JzID0gdGhpcy5nZXRPbmVXYXlFZGdlcyhub2RlLCBmYWxzZSk7CiAgICAgICAgICAgIC8vIEFkZCBlbWJlZGRlZCBzdWNjZXNzb3JzLCBzdWNoIGFzIHN1bW1hcmllcy4KICAgICAgICAgICAgaWYgKCFub2RlLmlzR3JvdXBOb2RlKSB7CiAgICAgICAgICAgICAgICBsb2Rhc2guZWFjaChub2RlLm91dEVtYmVkZGluZ3MsIChlbWJlZGRlZE5vZGUpID0+IHsKICAgICAgICAgICAgICAgICAgICBsb2Rhc2guZWFjaChlbWJlZGRlZE5vZGUuaW5wdXRzLCAoaW5wdXQpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0Lm5hbWUgPT09IG5vZGVOYW1lKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBNYWtlIGEgbmV3IG1ldGFlZGdlIGhvbGRpbmcgdGhlIGVkZ2UgYmV0d2VlbiB0aGUKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIG5vZGUgYW5kIHRoZSBvdXQtZW1iZWRkaW5nLgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG1ldGFlZGdlID0gbmV3IE1ldGFlZGdlSW1wbChub2RlTmFtZSwgZW1iZWRkZWROb2RlLm5hbWUpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgbWV0YWVkZ2UuYWRkQmFzZUVkZ2UoewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzQ29udHJvbERlcGVuZGVuY3k6IGlucHV0LmlzQ29udHJvbERlcGVuZGVuY3ksCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3V0cHV0VGVuc29yS2V5OiBpbnB1dC5vdXRwdXRUZW5zb3JLZXksCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXNSZWZlcmVuY2VFZGdlOiBmYWxzZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2OiBub2RlTmFtZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3OiBlbWJlZGRlZE5vZGUubmFtZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHRoaXMpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgc3VjY2Vzc29ycy5yZWd1bGFyLnB1c2gobWV0YWVkZ2UpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gc3VjY2Vzc29yczsKICAgICAgICB9CiAgICAgICAgLyoqIEhlbHBlciBtZXRob2QgZm9yIGdldFByZWRlY2Vzc29ycyBhbmQgZ2V0U3VjY2Vzc29ycyAqLwogICAgICAgIGdldE9uZVdheUVkZ2VzKG5vZGUsIGluRWRnZXMpIHsKICAgICAgICAgICAgbGV0IGVkZ2VzID0geyBjb250cm9sOiBbXSwgcmVndWxhcjogW10gfTsKICAgICAgICAgICAgLy8gQSBub2RlIHdpdGggbm8gcGFyZW50IGNhbm5vdCBoYXZlIGFueSBlZGdlcy4KICAgICAgICAgICAgaWYgKCFub2RlLnBhcmVudE5vZGUgfHwg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GggdGhlIHNwZWNpZmllZCBuYW1lLCBhbiBlcnJvciBpcyB0aHJvd24uIElmIHRoZQogICAgICAgICAqIG5vZGUgd2l0aCB0aGUgc3BlY2lmaWVkIG5hbWUgaXMgbm90IGEgZ3JvdXAgbm9kZSwgbnVsbCBpcyByZXR1cm5lZC4KICAgICAgICAgKi8KICAgICAgICBnZXRUb3BvbG9naWNhbE9yZGVyaW5nKG5vZGVOYW1lKSB7CiAgICAgICAgICAgIGxldCBub2RlID0gdGhpcy5pbmRleFtub2RlTmFtZV07CiAgICAgICAgICAgIGlmICghbm9kZSkgewogICAgICAgICAgICAgICAgdGhyb3cgRXJyb3IoJ0NvdWxkIG5vdCBmaW5kIG5vZGUgd2l0aCBuYW1lOiAnICsgbm9kZU5hbWUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICghbm9kZS5pc0dyb3VwTm9kZSkgewogICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKG5vZGVOYW1lIGluIHRoaXMub3JkZXJpbmdzKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5vcmRlcmluZ3Nbbm9kZU5hbWVdOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIE1hcHBpbmcgb2YgYSBjaGlsZCBub2RlIG5hbWVzIHRvIGxpc3RzIG9mIHRoZWlyIHN1Y2Nlc3NvcnMuCiAgICAgICAgICAgIGxldCBzdWNjZXNzb3JzID0ge307CiAgICAgICAgICAgIC8vIFNldCBvZiBub2RlIG5hbWVzIHdoaWNoIGhhdmUgYXBwZWFyZWQgYXMgYSBkZXN0aW5hdGlvbi4KICAgICAgICAgICAgbGV0IGRlc3RpbmF0aW9ucyA9IHt9OwogICAgICAgICAgICBsZXQgbWV0YWdyYXBoID0gbm9kZS5tZXRhZ3JhcGg7CiAgICAgICAgICAgIGxvZGFzaC5lYWNoKG1ldGFncmFwaC5lZGdlcygpLCAoZSkgPT4gewogICAgICAgICAgICAgICAgaWYgKCFtZXRhZ3JhcGguZWRnZShlKS5udW1SZWd1bGFyRWRnZXMpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm47IC8vIFNraXAgY29udHJvbCBlZGdlcy4KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vIEtlZXAgdHJhY2sgb2Ygc3VjY2Vzc29ycyBhbmQgZGVzdGluYXRpb25zLgogICAgICAgICAgICAgICAgaWYgKCEoZS52IGluIHN1Y2Nlc3NvcnMpKSB7CiAgICAgICAgICAgICAgICAgICAgc3VjY2Vzc29yc1tlLnZdID0gW107CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBzdWNjZXNzb3JzW2Uudl0ucHVzaChlLncpOwogICAgICAgICAgICAgICAgZGVzdGluYXRpb25zW2Uud10gPSB0cnVlOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgLy8gU2VlZCB0aGUgcXVldWUgd2l0aCB0cnVlIHNvdXJjZXMgKHRob3NlIHRoYXQgYXJlIG5vdCBkZXN0aW5hdGlvbnMpLgogICAgICAgICAgICBsZXQgcXVldWUgPSBsb2Rhc2guZGlmZmVyZW5jZShsb2Rhc2gua2V5cyhzdWNjZXNzb3JzKSwgbG9kYXNoLmtleXMoZGVzdGluYXRpb25zKSk7CiAgICAgICAgICAgIC8vIFByb2R1Y2UgYW4gb3JkZXJpbmcgYnkgdHJhdmVyc2luZyB0aGUgZ3JhcGggYnJlYWR0aCBmaXJzdC4KICAgICAgICAgICAgbGV0IG9yZGVyaW5nID0gKHRoaXMub3JkZXJpbmdzW25vZGVOYW1lXSA9IHt9KTsKICAgICAgICAgICAgbGV0IGluZGV4ID0gMDsKICAgICAgICAgICAgd2hpbGUgKHF1ZXVlLmxlbmd0aCkgewogICAgICAgICAgICAgICAgbGV0IGNoaWxkTmFtZSA9IHF1ZXVlLnNoaWZ0KCk7CiAgICAgICAgICAgICAgICBvcmRlcmluZ1tjaGlsZE5hbWVdID0gaW5kZXgrKzs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ICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChub2RlLnhsYUNsdXN0ZXIpIHsKICAgICAgICAgICAgICAgICAgICB4bGFDbHVzdGVyTmFtZXNbbm9kZS54bGFDbHVzdGVyXSA9IHRydWU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBoLmRldmljZXMgPSBsb2Rhc2gua2V5cyhkZXZpY2VOYW1lcyk7CiAgICAgICAgICAgIGgueGxhQ2x1c3RlcnMgPSBsb2Rhc2gua2V5cyh4bGFDbHVzdGVyTmFtZXMpOwogICAgICAgICAgICBhZGROb2RlcyhoLCBncmFwaCk7CiAgICAgICAgfSwgdHJhY2tlcikKICAgICAgICAgICAgLnRoZW4oKCkgPT4gewogICAgICAgICAgICByZXR1cm4gcnVuQXN5bmNUYXNrKCdEZXRlY3Qgc2VyaWVzJywgMjAsICgpID0+IHsKICAgICAgICAgICAgICAgIGlmIChwYXJhbXMuc2VyaWVzTm9kZU1pblNpemUgPiAwKSB7CiAgICAgICAgICAgICAgICAgICAgZ3JvdXBTZXJpZXMoaC5yb290LCBoLCBzZXJpZXNOYW1lcywgcGFyYW1zLnNlcmllc05vZGVNaW5TaXplLCBwYXJhbXMuc2VyaWVzTWFwLCBwYXJhbXMudXNlR2VuZXJhbGl6ZWRTZXJpZXNQYXR0ZXJucyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0sIHRyYWNrZXIpOwogICAgICAgIH0pCiAgICAgICAgICAgIC50aGVuKCgpID0+IHsKICAgICAgICAgICAgcmV0dXJuIHJ1bkFzeW5jVGFzaygnQWRkaW5nIGVkZ2VzJywgMzAsICgpID0+IHsKICAgICAgICAgICAgICAgIGFkZEVkZ2VzKGgsIGdyYXBoKTsKICAgICAgICAgICAgfSwgdHJhY2tlcik7CiAgICAgICAgfSkKICAgICAgICAgICAgLnRoZW4oKCkgPT4gewogICAgICAgICAgICByZXR1cm4gcnVuQXN5bmNUYXNrKCdG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iAgICAgICAgbG9kYXNoLmVhY2goaC5nZXROb2RlTWFwKCksIChub2RlLCBub2RlTmFtZSkgPT4gewogICAgICAgICAgICBpZiAobm9kZS5pc0dyb3VwTm9kZSkgewogICAgICAgICAgICAgICAgbm9kZS5zdGF0cyA9IG5ldyBOb2RlU3RhdHMobnVsbCk7CiAgICAgICAgICAgICAgICBub2RlLmRldmljZUhpc3RvZ3JhbSA9IHt9OwogICAgICAgICAgICB9CiAgICAgICAgfSk7CiAgICAgICAgLy8gQnViYmxlLXVwIHRoZSBzdGF0cyBhbmQgZGV2aWNlIGRpc3RyaWJ1dGlvbiBmcm9tIGxlYXZlcyB0byBwYXJlbnRzLgogICAgICAgIGxvZGFzaC5lYWNoKGgucm9vdC5sZWF2ZXMoKSwgKG5vZGVOYW1lKSA9PiB7CiAgICAgICAgICAgIGxldCBsZWFmID0gaC5ub2RlKG5vZGVOYW1lKTsKICAgICAgICAgICAgbGV0IG5vZGUgPSBsZWFmOwogICAgICAgICAgICB3aGlsZSAobm9kZS5wYXJlbnROb2RlICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIGlmIChsZWFmLmRldmljZSAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgbGV0IGRldmljZUhpc3RvZ3JhbSA9IG5vZGUucGFyZW50Tm9kZS5kZXZpY2VIaXN0b2dyYW07CiAgICAgICAgICAgICAgICAgICAgZGV2aWNlSGlzdG9ncmFtW2xlYWYuZGV2aWNlXSA9IChkZXZpY2VIaXN0b2dyYW1bbGVhZi5kZXZpY2VdIHx8IDApICsgMTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChsZWFmLnhsYUNsdXN0ZXIgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIGxldCB4bGFDbHVzdGVySGlzdG9ncmFtID0gbm9kZS5wYXJlbnROb2RlCiAgICAgICAgICAgICAgICAgICAgICAgIC54bGFDbHVzdGVySGlzdG9ncmFtOwogICAgICAgICAgICAgICAgICAgIHhsYUNsdXN0ZXJIaXN0b2dyYW1bbGVhZi54bGFDbHVzdGVyXSA9CiAgICAgICAgICAgICAgICAgICAgICAgICh4bGFDbHVzdGVySGlzdG9ncmFtW2xlYWYueGxhQ2x1c3Rlcl0gfHwgMCkgKyAxOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKGxlYWYuc3RhdHMgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIG5vZGUucGFyZW50Tm9kZS5zdGF0cy5jb21iaW5lKGxlYWYuc3RhdHMpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgbm9kZSA9IG5vZGUucGFyZW50Tm9kZTsKICAgICAgICAgICAgfQogICAgICAgIH0pOwogICAgfQogICAgZnVuY3Rpb24gZ2V0SW5jb21wYXRpYmxlT3BzKGhpZXJhcmNoeSwgaGllcmFyY2h5UGFyYW1zKSB7CiAgICAgICAgbGV0IG5vZGVzID0gW107CiAgICAgICAgbGV0IGFkZGVkU2VyaWVzTm9kZXMgPSB7fTsKICAgICAgICBsb2Rhc2guZWFjaChoaWVyYXJjaHkucm9vdC5sZWF2ZXMoKSwgKGxlYWYpID0+IHsKICAgICAgICAgICAgbGV0IG5vZGUgPSBoaWVyYXJjaHkubm9kZShsZWFmKTsKICAgICAgICAgICAgaWYgKG5vZGUudHlwZSA9PSBOb2RlVHlwZS5PUCkgewogICAgICAgICAgICAgICAgbGV0IG9wTm9kZSA9IG5vZGU7CiAgICAgICAgICAgICAgICBpZiAoIW9wTm9kZS5jb21wYXRpYmxlKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKG9wTm9kZS5vd25pbmdTZXJpZXMpIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGhpZXJhcmNoeVBhcmFtcyAmJgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaGllcmFyY2h5UGFyYW1zLnNlcmllc01hcFtvcE5vZGUub3duaW5nU2VyaWVzXSA9PT0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTZXJpZXNHcm91cGluZ1R5cGUuVU5HUk9VUCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gRm9yIHVuLWdyb3VwZWQgc2VyaWVzIG5vZGUsIGFkZCBlYWNoIG5vZGUgaW5kaXZpZHVhbGx5CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBub2Rlcy5wdXNoKG9wTm9kZSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWFkZGVkU2VyaWVzTm9kZXNbb3BOb2RlLm93bmluZ1Nlcmllc10pIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc2VyaWVzID0gaGllcmFyY2h5Lm5vZGUob3BOb2RlLm93bmluZ1Nlcmllcyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNlcmllcykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRlZFNlcmllc05vZGVzW29wTm9kZS5vd25pbmdTZXJpZXNdID0gc2VyaWVzOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBub2Rlcy5wdXNoKHNlcmllcyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICBub2Rlcy5wdXNoKG9wTm9kZSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLy8gQ2hlY2sgdGhlIGVtYmVkZGluZ3MgZm9yIGludmFsaWQgb3BlcmF0aW9ucwogICAgICAgICAgICAgICAgbG9kYXNoLmVhY2gob3BOb2RlLmluRW1iZWRkaW5ncywgKGluTm9kZSkgPT4gewogICAgICAgICAgICAgICAgICAgIGlmICghaW5Ob2RlLmNvbXBhdGlibGUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgbm9kZXMucHVzaChpbk5vZGUpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgbG9kYXNoLmVhY2gob3BOb2RlLm91dEVtYmVkZGluZ3MsIChvdXROb2RlKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgaWYgKCFvdXROb2RlLmNvbXBhdGlibGUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgbm9kZXMucHVzaChvdXROb2RlKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfQogICAgICAgIH0pOwogICAgICAgIHJldHVybiBub2RlczsKICAgIH0KICAgIC8qKgogICAgICogQ3JlYXRlcyB0aGUgbWV0YW5vZGVzIGluIHRoZSBoaWVyYXJjaGljYWwgZ3JhcGggYW5kIGFzc2lnbnMgcGFyZW50LWNoaWxkCiAgICAgKiByZWxhdGlvbnNoaXAgYmV0d2VlbiB0aGVtLiBBbHNvIGFzc2lnbnMgcmVsYXRpb25zaGlwcyBiZXR3ZWVuIGxpYnJhcnkKICAgICAqIGZ1bmN0aW9ucyBhbmQgdGhlaXIgdXNhZ2VzIHRocm91Z2hvdXQgdGhlIGdyYXBoLgogICAgICovCiAgICBmdW5jdGlvbiBhZGROb2RlcyhoLCBncmFwaCkgewogICAgICAgIC8vIE1hcHMgdGhlIG9wIG9mIGEgbm9kZSB0byBuYW1lcyBvZiBub2RlcyB0aGF0IGhhdmUgdGhlIG9wLiBVc2VkIHRvIHBvcHVsYXRlCiAgICAgICAgLy8gdGhlIGxpYnJhcnlGdW5jdGlvbnMgZmllbGQgb2YgdGhlIGhpZXJhcmNoeS4KICAgICAgICBjb25zdCBvcFRvTm9kZSA9IHt9OwogICAgICAgIGxvZGFzaC5lYWNoKGdyYXBoLm5vZGVzLCAobm9kZSwgbm9kZU5hbWUpID0+IHsKICAgICAgICAgICAgbGV0IHBhdGggPSBnZXRIaWVyYXJjaGljYWxQYXRoKG5vZGUubmFtZSk7CiAgICAgICAgICAgIGxldCBwYXJlbnQgPSBoLnJvb3Q7CiAgICAgICAgICAgIHBhcmVudC5kZXB0aCA9IE1hdGgubWF4KHBhdGgubGVuZ3RoLCBwYXJlbnQuZGVwdGgpOwogICAgICAgICAgICAvLyBUcmFjayB3aGljaCBub2RlcyBhcmUgYXNzb2NpYXRlZCB3aXRoIHdoaWNoIG9wcy4KICAgICAgICAgICAgaWYgKCFvcFRvTm9kZVtub2RlLm9wXSkgewogICAgICAgICAgICAgICAgb3BUb05vZGVbbm9kZS5vcF0gPSBbXTsKICAgICAgICAgICAgfQogICAgICAgICAgICBvcFRvTm9kZVtub2RlLm9wXS5wdXNoKG5vZGUpOwogICAgICAgICAgICAvLyBDcmVhdGUgcGFyZW50IG1ldGFub2RlcyBmb3IgZWFjaCBkZXB0aC4gRm9yIGV4YW1wbGUgaWYgdGhlIG5vZGUgbmFtZQogICAgICAgICAgICAvLyBpcyAnYS9iL2MnLCB0aGVuIGNyZWF0ZSBtZXRhbm9kZXMgJ2EnIGFuZCAnYS9iJywgd2hlcmUgJ2EvYicgaXMgYSBjaGlsZAogICAgICAgICAgICAvLyBvZiBhLgogICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHBhdGgubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIHBhcmVudC5kZXB0aCA9IE1hdGgubWF4KHBhcmVudC5kZXB0aCwgcGF0aC5sZW5ndGggLSBpKTsKICAgICAgICAgICAgICAgIHBhcmVudC5jYXJkaW5hbGl0eSArPSBub2RlLmNhcmRpbmFsaXR5OwogICAgICAgICAgICAgICAgcGFyZW50Lm9wSGlzdG9ncmFtW25vZGUub3BdID0gKHBhcmVudC5vcEhpc3RvZ3JhbVtub2RlLm9wXSB8fCAwKSArIDE7CiAgICAgICAgICAgICAgICBpZiAobm9kZS5kZXZpY2UgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIHBhcmVudC5kZXZpY2VIaXN0b2dyYW1bbm9kZS5kZXZpY2VdID0KICAgICAgICAgICAgICAgICAgICAgICAgKHBhcmVudC5kZXZpY2VIaXN0b2dyYW1bbm9kZS5kZXZpY2VdIHx8IDApICsgMTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChub2RlLnhsYUNsdXN0ZXIgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIHBhcmVudC54bGFDbHVzdGVySGlzdG9ncmFtW25vZGUueGxhQ2x1c3Rlcl0gPQogICAgICAgICAgICAgICAgICAgICAgICAocGFyZW50LnhsYUNsdXN0ZXJIaXN0b2dyYW1bbm9kZS54bGFDbHVzdGVyXSB8fCAwKSArIDE7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvLyBJbmNyZW1lbnQgcGFyZW50cyBhcHByb3ByaWF0ZSBjb21wYXRpYmlsaXR5IGNvdW50CiAgICAgICAgICAgICAgICBpZiAobm9kZS5jb21wYXRpYmxlKSB7CiAgICAgICAgICAgICAgICAgICAgcGFyZW50LmNvbXBhdGliaWxpdHlIaXN0b2dyYW0uY29tcGF0aWJsZSA9CiAgICAgICAgICAgICAgICAgICAgICAgIChwYXJlbnQuY29tcGF0aWJpbGl0eUhpc3RvZ3JhbS5jb21wYXRpYmxlIHx8IDApICsgMTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIHBhcmVudC5jb21wYXRpYmlsaXR5SGlzdG9ncmFtLmluY29tcGF0aWJsZSA9CiAgICAgICAgICAgICAgICAgICAgICAgIChwYXJlbnQuY29tcGF0aWJpbGl0eUhpc3RvZ3JhbS5pbmNvbXBhdGlibGUgfHwgMCkgKyAxOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLy8gSW5jcmVtZW50IGNhcGFiaWxpdHkgY291bnRzIGZvciBpbiBhbmQgb3V0IGVtYmVkZGluZ3MKICAgICAgICAgICAgICAgIGxvZGFzaC5lYWNoKG5vZGUuaW5FbWJlZGRpbmdzLCAoaW5Ob2RlKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgaWYgKGluTm9kZS5jb21wYXRpYmxlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmVudC5jb21wYXRpYmlsaXR5SGlzdG9ncmFtLmNvbXBhdGlibGUgPQogICAgICAgICAgICAgICAgICAgICAgICAgICAgKHBhcmVudC5jb21wYXRpYmlsaXR5SGlzdG9ncmFtLmNvbXBhdGlibGUgfHwgMCkgKyAxOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgcGFyZW50LmNvbXBhdGliaWxpdHlIaXN0b2dyYW0uaW5jb21wYXRpYmxlID0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIChwYXJlbnQuY29tcGF0aWJpbGl0eUhpc3RvZ3JhbS5pbmNvbXBhdGlibGUgfHwgMCkgKyAxOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgbG9kYXNoLmVhY2gobm9kZS5vdXRFbWJlZGRpbmdzLCAob3V0Tm9kZSkgPT4gewogICAgICAgICAgICAgICAgICAgIGlmIChvdXROb2RlLmNvbXBhdGlibGUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcGFyZW50LmNvbXBhdGliaWxpdHlIaXN0b2dyYW0uY29tcGF0aWJsZSA9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAocGFyZW50LmNvbXBhdGliaWxpdHlIaXN0b2dyYW0uY29tcGF0aWJsZSB8fCAwKSArIDE7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICBwYXJlbnQuY29tcGF0aWJpbGl0eUhpc3RvZ3JhbS5pbmNvbXBhdGlibGUgPQogICAgICAgICAgICAgICAgICAgICAgICAgICAgKHBhcmVudC5jb21wYXRpYmlsaXR5SGlzdG9ncmFtLmluY29tcGF0aWJsZSB8fCAwKSArIDE7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBpZiAoaSA9PT0gcGF0aC5sZW5ndGggLSAxKSB7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBsZXQgbmFtZSA9IHBhdGhbaV07CiAgICAgICAgICAgICAgICBsZXQgY2hpbGQgPSBoLm5vZGUobmFtZSk7CiAgICAgICAgICAgICAgICBpZiAoIWNoaWxkKSB7CiAgICAgICAgICAgICAgICAgICAgY2hpbGQgPSBjcmVhdGVNZXRhbm9kZShuYW1lLCBoLmdyYXBoT3B0aW9ucyk7CiAgICAgICAgICAgICAgICAgICAgY2hpbGQucGFyZW50Tm9kZSA9IHBhcmVudDsKICAgICAgICAgICAgICAgICAgICBoLnNldE5vZGUobmFtZSwgY2hpbGQpOwogICAgICAgICAgICAgICAgICAgIHBhcmVudC5tZXRhZ3JhcGguc2V0Tm9kZShuYW1lLCBjaGlsZCk7CiAgICAgICAgICAgICAgICAgICAgaWYgKG5hbWUuaW5kZXhPZihGVU5DVElPTl9MSUJSQVJZX05PREVfUFJFRklYKSA9PT0gMCAmJgogICAgICAgICAgICAgICAgICAgICAgICBwYXJlbnQubmFtZSA9PT0gUk9PVF9OQU1FKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFRoaXMgbWV0YW5vZGUgcmVwcmVzZW50cyBhIGZ1bmN0aW9uIGluIHRoZSBMaWJyYXJ5LiBXZSBsYXRlciBjb3B5CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGl0cyBjb250ZW50cyB0byBkeW5hbWljYWxseSBpbmplY3QgZnVuY3Rpb24gZGF0YSBpbnRvIHRoZSBncmFwaAogICAgICAgICAgICAgICAgICAgICAgICAvLyB3aGVuIHRoZSBzdWJoaWVyYXJjaHkgb2YgYSBtZXRhbm9kZSBpcyBidWlsdCAodXBvbiBpdHMgZXhwYW5zaW9uKS4KICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZnVuY3Rpb25OYW1lID0gbmFtZS5zdWJzdHJpbmcoRlVOQ1RJT05fTElCUkFSWV9OT0RFX1BSRUZJWC5sZW5ndGgpOwogICAgICAgICAgICAgICAgICAgICAgICAvLyBGb3Igbm93LCByZW1lbWJlciB0aGUgbWV0YW5vZGUgdGhhdCByZXByZXNlbnRzIHRoZSBmdW5jdGlvbiB3aXRoCiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHRoaXMgbmFtZS4KICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFvcFRvTm9kZVtmdW5jdGlvbk5hbWVdKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcFRvTm9kZVtmdW5jdGlvbk5hbWVdID0gW107CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgaC5saWJyYXJ5RnVuY3Rpb25zW2Z1bmN0aW9uTmFtZV0gPSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBub2RlOiBjaGlsZCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVzYWdlczogb3BUb05vZGVbZnVuY3Rpb25OYW1lXSwKICAgICAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgICAgICAgICAgY2hpbGQuYXNzb2NpYXRlZEZ1bmN0aW9uID0gZnVuY3Rpb25OYW1lOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHBhcmVudCA9IGNoaWxkOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIEFzc3VtaW5nIG5vZGUgbmFtZSBpcyAnYS9iL2MnLCBhc3NpZ24gdGhlIE9wTm9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V4XSkgewogICAgICAgICAgICAgICAgc291cmNlQW5jZXN0b3JJbmRleC0tOwogICAgICAgICAgICAgICAgZGVzdEFuY2VzdG9ySW5kZXgtLTsKICAgICAgICAgICAgICAgIGlmIChzb3VyY2VBbmNlc3RvckluZGV4IDwgMCB8fCBkZXN0QW5jZXN0b3JJbmRleCA8IDApIHsKICAgICAgICAgICAgICAgICAgICAvLyBUaGlzIHdvdWxkIG9ubHkgb2NjdXIgaWYgdGhlIHR3byBub2RlcyB3ZXJlIHRoZSBzYW1lIChhIGN5Y2xlIGluIHRoZQogICAgICAgICAgICAgICAgICAgIC8vIGdyYXBoKSwgb3IgaWYgb25lIGVuZHBvaW50IHdhcyBhIHN0cmljdCBhbmNlc3RvciBvZiB0aGUgb3RoZXIuIFRoZQogICAgICAgICAgICAgICAgICAgIC8vIGxhdHRlciBzaG91bGRuJ3QgaGFwcGVuIGJlY2F1c2Ugd2UgcmVuYW1lIG5vZGVzIHdoaWNoIGFyZSBib3RoCiAgICAgICAgICAgICAgICAgICAgLy8gbWV0YW5vZGVzIGFuZCBvcCBub2Rlcy4gRS5nLiAnQS9CJyBiZWNvbWVzICdBL0IvKEIpJy4KICAgICAgICAgICAgICAgICAgICB0aHJvdyBFcnJvcignTm8gZGlmZmVyZW5jZSBmb3VuZCBiZXR3ZWVuIGFuY2VzdG9yIHBhdGhzLicpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGxldCBzaGFyZWRBbmNlc3Rvck5vZGUgPSAobm9kZUluZGV4W3NvdXJjZVBhdGhbc291cmNlQW5jZXN0b3JJbmRleCArIDFdXSk7CiAgICAgICAgICAgIGxldCBzb3VyY2VBbmNlc3Rvck5hbWUgPSBzb3VyY2VQYXRoW3NvdXJjZUFuY2VzdG9ySW5kZXhdOwogICAgICAgICAgICBsZXQgZGVzdEFuY2VzdG9yTmFtZSA9IGRlc3RQYXRoW2Rlc3RBbmNlc3RvckluZGV4XTsKICAgICAgICAgICAgLy8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IGFuZCBhZGQgaXRzIGdyb3VwZWQgY2hpbGRyZW4gdG8gaXRzIG93bgogICAgICAgIC8vIG1ldGFncmFwaC4KICAgICAgICBsb2Rhc2guZWFjaChzZXJpZXNEaWN0LCBmdW5jdGlvbiAoc2VyaWVzTm9kZSwgc2VyaWVzTmFtZSkgewogICAgICAgICAgICBsZXQgbm9kZU1lbWJlck5hbWVzID0gc2VyaWVzTm9kZS5tZXRhZ3JhcGgubm9kZXMoKTsKICAgICAgICAgICAgbG9kYXNoLmVhY2gobm9kZU1lbWJlck5hbWVzLCAobikgPT4gewogICAgICAgICAgICAgICAgbGV0IGNoaWxkID0gbWV0YWdyYXBoLm5vZGUobik7CiAgICAgICAgICAgICAgICBpZiAoIWNoaWxkLm93bmluZ1NlcmllcykgewogICAgICAgICAgICAgICAgICAgIGNoaWxkLm93bmluZ1NlcmllcyA9IHNlcmllc05hbWU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICAvLyBJZiB0aGUgc2VyaWVzIGNvbnRhaW5zIGxlc3MgdGhhbiB0aGUgdGhyZXNob2xkIG51bWJlciBvZiBub2RlcyBhbmQKICAgICAgICAgICAgLy8gdGhpcyBzZXJpZXMgaGFzIG5vdCBiZWVuIGFkZGluZyB0byB0aGUgc2VyaWVzIG1hcCwgdGhlbiBzZXQgdGhpcwogICAgICAgICAgICAvLyBzZXJpZXMgdG8gYmUgc2hvd24gdW5ncm91cGVkIGluIHRoZSBtYXAuCiAgICAgICAgICAgIGlmIChub2RlTWVtYmVyTmFtZXMubGVuZ3RoIDwgdGhyZXNob2xkICYmICEoc2VyaWVzTm9kZS5uYW1lIGluIG1hcCkpIHsKICAgICAgICAgICAgICAgIG1hcFtzZXJpZXNOb2RlLm5hbWVdID0gU2VyaWVzR3JvdXBpbmdUeXBlLlVOR1JPVVA7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gSWYgdGhlIHNlcmllcyBpcyBpbiB0aGUgbWFwIGFzIHVuZ3JvdXBlZCB0aGVuIGRvIG5vdCBncm91cCB0aGUgc2VyaWVzLgogICAgICAgICAgICBpZiAoc2VyaWVzTm9kZS5uYW1lIGluIG1hcCAmJgogICAgICAgICAgICAgICAgbWFwW3Nlcmllc05vZGUubmFtZV0gPT09IFNlcmllc0dyb3VwaW5nVHlwZS5VTkdST1VQKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaGllcmFyY2h5LnNldE5vZGUoc2VyaWVzTmFtZSwgc2VyaWVzTm9kZSk7IC8vIGFkZCB0byB0aGUgaW5kZXgKICAgICAgICAgICAgbWV0YWdyYXBoLnNldE5vZGUoc2VyaWVzTmFtZSwgc2VyaWVzTm9kZSk7CiAgICAgICAgICAgIGxvZGFzaC5lYWNoKG5vZGVNZW1iZXJOYW1lcywgKG4pID0+IHsKICAgICAgICAgICAgICAgIGxldCBjaGlsZCA9IG1ldGFncmFwaC5ub2RlKG4pOwogICAgICAgICAgICAgICAgc2VyaWVzTm9kZS5tZXRhZ3JhcGguc2V0Tm9kZShuLCBjaGlsZCk7CiAgICAgICAgICAgICAgICBzZXJpZXNOb2RlLnBhcmVudE5vZGUgPSBjaGlsZC5wYXJlbnROb2RlOwogICAgICAgICAgICAgICAgc2VyaWVzTm9kZS5jYXJkaW5hbGl0eSsrOwogICAgICAgICAgICAgICAgaWYgKGNoaWxkLmRldmljZSAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgc2VyaWVzTm9kZS5kZXZpY2VIaXN0b2dyYW1bY2hpbGQuZGV2aWNlXSA9CiAgICAgICAgICAgICAgICAgICAgICAgIChzZXJpZXNOb2RlLmRldmljZUhpc3RvZ3JhbVtjaGlsZC5kZXZpY2VdIHx8IDApICsgMTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChjaGlsZC54bGFDbHVzdGVyICE9IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICBzZXJpZXNOb2RlLnhsYUNsdXN0ZXJIaXN0b2dyYW1bY2hpbGQueGxhQ2x1c3Rlcl0gPQogICAgICAgICAgICAgICAgICAgICAgICAoc2VyaWVzTm9kZS54bGFDbHVzdGVySGlzdG9ncmFtW2NoaWxkLnhsYUNsdXN0ZXJdIHx8IDApICsgMTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vIEluY3JlbWVudCBwYXJlbnRzIGFwcHJvcHJpYXRlIGNvbXBhdGliaWxpdHkgY291bnQKICAgICAgICAgICAgICAgIGlmIChjaGlsZC5jb21wYXRpYmxlKSB7CiAgICAgICAgICAgICAgICAgICAgc2VyaWVzTm9kZS5jb21wYXRpYmlsaXR5SGlzdG9ncmFtLmNvbXBhdGlibGUgPQogICAgICAgICAgICAgICAgICAgICAgICAoc2VyaWVzTm9kZS5jb21wYXRpYmlsaXR5SGlzdG9ncmFtLmNvbXBhdGlibGUgfHwgMCkgKyAxOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgc2VyaWVzTm9kZS5jb21wYXRpYmlsaXR5SGlzdG9ncmFtLmluY29tcGF0aWJsZSA9CiAgICAgICAgICAgICAgICAgICAgICAgIChzZXJpZXNOb2RlLmNvbXBhdGliaWxpdHlIaXN0b2dyYW0uaW5jb21wYXRpYmxlIHx8IDApICsgMTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vIEluY3JlbWVudCBjYXBhYmlsaXR5IGNvdW50cyBmb3IgaW4gYW5kIG91dCBlbWJlZGRpbmdzCiAgICAgICAgICAgICAgICBsb2Rhc2guZWFjaChjaGlsZC5pbkVtYmVkZGluZ3MsIChpbk5vZGUpID0+IHsKICAgICAgICAgICAgICAgICAgICBpZiAoaW5Ob2RlLmNvbXBhdGlibGUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgc2VyaWVzTm9kZS5jb21wYXRpYmlsaXR5SGlzdG9ncmFtLmNvbXBhdGlibGUgPQogICAgICAgICAgICAgICAgICAgICAgICAgICAgKHNlcmllc05vZGUuY29tcGF0aWJpbGl0eUhpc3RvZ3JhbS5jb21wYXRpYmxlIHx8IDApICsgMTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHNlcmllc05vZGUuY29tcGF0aWJpbGl0eUhpc3RvZ3JhbS5pbmNvbXBhdGlibGUgPQogICAgICAgICAgICAgICAgICAgICAgICAgICAgKHNlcmllc05vZGUuY29tcGF0aWJpbGl0eUhpc3RvZ3JhbS5pbmNvbXBhdGlibGUgfHwgMCkgKyAxOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgbG9kYXNoLmVhY2goY2hpbGQub3V0RW1iZWRkaW5ncywgKG91dE5vZGUpID0+IHsKICAgICAgICAgICAgICAgICAgICBpZiAob3V0Tm9kZS5jb21wYXRpYmxlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHNlcmllc05vZGUuY29tcGF0aWJpbGl0eUhpc3RvZ3JhbS5jb21wYXRpYmxlID0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzZXJpZXNOb2RlLmNvbXBhdGliaWxpdHlIaXN0b2dyYW0uY29tcGF0aWJsZSB8fCAwKSArIDE7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICBzZXJpZXNOb2RlLmNvbXBhdGliaWxpdHlIaXN0b2dyYW0uaW5jb21wYXRpYmxlID0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzZXJpZXNOb2RlLmNvbXBhdGliaWxpdHlIaXN0b2dyYW0uaW5jb21wYXRpYmxlIHx8IDApICsgMTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIGNoaWxkLnBhcmVudE5vZGUgPSBzZXJpZXNOb2RlOwogICAgICAgICAgICAgICAgc2VyaWVzTmFtZXNbbl0gPSBzZXJpZXNOYW1lOwogICAgICAgICAgICAgICAgLy8gUmVtb3ZlIG5vdy1ncm91cGVkIG5vZGUgZnJvbSBpdHMgb3JpZ2luYWwgcGFyZW50J3MgbWV0YWdyYXBoLgogICAgICAgICAgICAgICAgbWV0YWdyYXBoLnJlbW92ZU5vZGUobik7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0pOwogICAgfQogICAgLyoqIGNsdXN0ZXIgb3Atbm9kZXMgd2l0aCBzaW1pbGFyIG9wICovCiAgICBmdW5jdGlvbiBjbHVzdGVyTm9kZXMobWV0YWdyYXBoKSB7CiAgICAgICAgbGV0IHJlc3VsdCA9IHt9OwogICAgICAgIHJldHVybiBsb2Rhc2gucmVkdWNlKG1ldGFncmFwaC5ub2RlcygpLCAoY2x1c3RlcnMsIG4pID0+IHsKICAgICAgICAgICAgbGV0IGNoaWxkID0gbWV0YWdyYXBoLm5vZGUobik7CiAgICAgICAgICAgIGlmIChjaGlsZC50eXBlID09PSBOb2RlVHlwZS5NRVRBKSB7CiAgICAgICAgICAgICAgICAvLyBza2lwIG1ldGFub2RlcwogICAgICAgICAgICAgICAgcmV0dXJuIGNsdXN0ZXJzOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGxldCB0ZW1wbGF0ZSA9IGNoaWxkLm9wOwogICAgICAgICAgICBpZiAodGVtcGxhdGUpIHsKICAgICAgICAgICAgICAgIGNsdXN0ZXJzW3RlbXBsYXRlXSA9IGNsdXN0ZXJzW3RlbXBsYXRlXSB8fCBbXTsKICAgICAgICAgICAgICAgIGNsdXN0ZXJzW3RlbXBsYXRlXS5wdXNoKGNoaWxkLm5hbWUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBjbHVzdGVyczsKICAgICAgICB9LCByZXN1bHQpOwogICAgfQogICAgLyoqCiAgICAgKiBGb3IgZWFjaCBjbHVzdGVyIG9mIG9wLW5vZGVz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BsZXQgY2FuZGlkYXRlc0RpY3QgPSB7fTsKICAgICAgICAgICAgLy8gR3JvdXAgYWxsIG5vZGVzIHRoYXQgaGF2ZSB0aGUgc2FtZSBuYW1lLCB3aXRoIHRoZSBleGNlcHRpb24gb2YgYQogICAgICAgICAgICAvLyBudW1iZXIgYXQgdGhlIGVuZCBvZiB0aGUgbmFtZSBhZnRlciBhbiB1bmRlcnNjb3JlLCB3aGljaCBpcyBhbGxvd2VkIHRvCiAgICAgICAgICAgIC8vIHZhcnkuCiAgICAgICAgICAgIGxvZGFzaC5lYWNoKG1lbWJlcnMsIGZ1bmN0aW9uIChuYW1lKSB7CiAgICAgICAgICAgICAgICBsZXQgaXNHcm91cCA9IG5hbWUuY2hhckF0KG5hbWUubGVuZ3RoIC0gMSkgPT09ICcqJzsKICAgICAgICAgICAgICAgIGxldCBuYW1lcGF0aCA9IG5hbWUuc3BsaXQoJy8nKTsKICAgICAgICAgICAgICAgIGxldCBsZWFmID0gbmFtZXBhdGhbbmFtZXBhdGgubGVuZ3RoIC0gMV07CiAgICAgICAgICAgICAgICBsZXQgcGFyZW50ID0gbmFtZXBhdGguc2xpY2UoMCwgbmFtZXBhdGgubGVuZ3RoIC0gMSkuam9pbignLycpOwogICAgICAgICAgICAgICAgbGV0IG1hdGNoZXMgPSBsZWFmLm1hdGNoKC9eKFxEKilfKFxkKykkLyk7CiAgICAgICAgICAgICAgICBsZXQgcHJlZml4OwogICAgICAgICAgICAgICAgbGV0IGlkOwogICAgICAgICAgICAgICAgbGV0IHN1ZmZpeCA9ICcnOwogICAgICAgICAgICAgICAgaWYgKG1hdGNoZXMpIHsKICAgICAgICAgICAgICAgICAgICAvLyBpZiBmb3VuZCAnPG51bWJlcj4nIGluIHRoZSBuYW1lLCBhc3NpZ24gaWQuCiAgICAgICAgICAgICAgICAgICAgcHJlZml4ID0gbWF0Y2hlc1sxXTsgLy8gdGhlIGZyb250IG5vbi1udW1lcmljIGNoYXJhY3RlcnMKICAgICAgICAgICAgICAgICAgICBpZCA9IG1hdGNoZXNbMl07IC8vIHRoZSBkaWdpdHMKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIC8vIGZvciBub2RlIHdpdGhvdXQgJ188bnVtYmVyPicsIG1ha2UgdGhlbSB6ZXJvLXRoIGl0ZW1zLgogICAgICAgICAgICAgICAgICAgIHByZWZpeCA9IGlzR3JvdXAgPyBsZWFmLnN1YnN0cigwLCBsZWFmLmxlbmd0aCAtIDEpIDogbGVhZjsKICAgICAgICAgICAgICAgICAgICBpZCA9IDA7CiAgICAgICAgICAgICAgICAgICAgc3VmZml4ID0gaXNHcm91cCA/ICcqJyA6ICcnOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgbGV0IHNlcmllc05hbWUgPSBnZXRTZXJpZXNOb2RlTmFtZShwcmVmaXgsIHN1ZmZpeCwgcGFyZW50KTsKICAgICAgICAgICAgICAgIGNhbmRpZGF0ZXNEaWN0W3Nlcmllc05hbWVdID0gY2FuZGlkYXRlc0RpY3Rbc2VyaWVzTmFtZV0gfHwgW107CiAgICAgICAgICAgICAgICBsZXQgc2VyaWVzTm9kZSA9IGNyZWF0ZVNlcmllc05vZGUocHJlZml4LCBzdWZmaXgsIHBhcmVudCwgK2lkLCBuYW1lLCBncmFwaE9wdGlvbnMpOwogICAgICAgICAgICAgICAgY2FuZGlkYXRlc0RpY3Rbc2VyaWVzTmFtZV0ucHVzaChzZXJpZXNOb2RlKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIC8vIEluIGVhY2ggZ3JvdXAgb2Ygbm9kZXMsIGdyb3VwIG5vZGVzIGluIGJ1bmNoZXMgdGhhdCBoYXZlIG1vbm90b25pY2FsbHkKICAgICAgICAgICAgLy8gaW5jcmVhc2luZyBudW1iZXJzIGluIHRoZWlyIG5hbWVzLiAgRWFjaCBvZiB0aGVzZSBidW5jaGVzIGlzIGEgc2VyaWVzLgogICAgICAgICAgICBsb2Rhc2guZWFjaChjYW5kaWRhdGVzRGljdCwgZnVuY3Rpb24gKHNlcmllc0luZm9BcnJheSwgc2VyaWVzTmFtZSkgewogICAgICAgICAgICAgICAgaWYgKHNlcmllc0luZm9BcnJheS5sZW5ndGggPCAyKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgc2VyaWVzSW5mb0FycmF5LnNvcnQoZnVuY3Rpb24gKGEsIGIpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gK2EuY2x1c3RlcklkIC0gK2IuY2x1c3RlcklkOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICAvLyBMb29wIHRocm91Z2ggdGhlIG5vZGVzIHNvcnRlZCBieSBpdHMgZGV0ZWN0ZWQgc2VyaWVzIG51bWJlciwgZ3JvdXBpbmcKICAgICAgICAgICAgICAgIC8vIGFsbCBub2RlcyB3aXRoIG1vbm90b25pY2FsbHktaW5jcmVhc2luZyBzZXJpZXMgbnVtYmVycy4KICAgICAgICAgICAgICAgIGxldCBzZXJpZXNOb2RlcyA9IFtzZXJpZXNJbmZvQXJyYXlbMF1dOwogICAgICAgICAgICAgICAgZm9yIChsZXQgaW5kZXggPSAxOyBpbmRleCA8IHNlcmllc0luZm9BcnJheS5sZW5ndGg7IGluZGV4KyspIHsKICAgICAgICAgICAgICAgICAgICBsZXQgbmV4dE5vZGUgPSBzZXJpZXNJbmZvQXJyYXlbaW5kZXhdOwogICAgICAgICAgICAgICAgICAgIGlmIChuZXh0Tm9kZS5jbHVzdGVySWQgPT09CiAgICAgICAgICAgICAgICAgICAgICAgIHNlcmllc05vZGVzW3Nlcmllc05vZGVzLmxlbmd0aCAtIDFdLmNsdXN0ZXJJZCArIDEpIHsKICAgICAgICAgICAgICAgICAgICAgICAgc2VyaWVzTm9kZXMucHVzaChuZXh0Tm9kZSk7CiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgIC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uIChtZW1iZXJzLCBjbHVzdGVySWQpIHsKICAgICAgICAgICAgaWYgKG1lbWJlcnMubGVuZ3RoIDw9IDEpIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfSAvLyBpc29sYXRlZCBjbHVzdGVycyBjYW4ndCBtYWtlIHNlcmllcwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQHR5cGUge09iamVjdH0gIEEgZGljdGlvbmFyeSBtYXBwaW5nIGEgc2VyaWVzIG5hbWUgdG8gYSBTZXJpZXNOb2RlLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgbGV0IGZvcndhcmREaWN0ID0ge307CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBAdHlwZSB7T2JqZWN0fSAgQSBkaWN0aW9uYXJ5IG1hcHBpbmcgbWVtYmVyIG5hbWUgdG8gYW4gYXJyYXkgb2Ygc2VyaWVzCiAgICAgICAgICAgICAqIG5hbWVzIHRoaXMgbWVtYmVyIGNvdWxkIHBvdGVudGlhbGx5IGJlIGdyb3VwZWQgdW5kZXIgYW5kIHRoZQogICAgICAgICAgICAgKiBjb3JyZXNwb25kaW5nIGlkcy4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGxldCByZXZlcnNlRGljdCA9IHt9OwogICAgICAgICAgICAvLyBHcm91cCBhbGwgbm9kZXMgdGhhdCBoYXZlIHRoZSBzYW1lIG5hbWUsIHdpdGggdGhlIGV4Y2VwdGlvbiBvZiBhCiAgICAgICAgICAgIC8vIG51bWJlciBhdCB0aGUgZW5kIG9mIHRoZSBuYW1lIGFmdGVyIGFuIHVuZGVyc2NvcmUsIHdoaWNoIGlzIGFsbG93ZWQgdG8KICAgICAgICAgICAgLy8gdmFyeS4KICAgICAgICAgICAgbG9kYXNoLmVhY2gobWVtYmVycywgZnVuY3Rpb24gKG5hbWUpIHsKICAgICAgICAgICAgICAgIGxldCBpc0dyb3VwID0gbmFtZS5jaGFyQXQobmFtZS5sZW5ndGggLSAxKSA9PT0gJyonOwogICAgICAgICAgICAgICAgbGV0IG5hbWVwYXRoID0gbmFtZS5zcGxpdCgnLycpOwogICAgICAgICAgICAgICAgbGV0IGxlYWYgPSBuYW1lcGF0aFtuYW1lcGF0aC5sZW5ndGggLSAxXTsKICAgICAgICAgICAgICAgIGxldCBwYXJlbnQgPSBuYW1lcGF0aC5zbGljZSgwLCBuYW1lcGF0aC5sZW5ndGggLSAxKS5qb2luKCcvJyk7CiAgICAgICAgICAgICAgICBjb25zdCBudW1SZWdleCA9IC8oXGQrKS9nOwogICAgICAgICAgICAgICAgbGV0IG1hdGNoUmVzdWx0OwogICAgICAgICAgICAgICAgbGV0IHByZWZpeDsKICAgICAgICAgICAgICAgIGxldCBpZDsKICAgICAgICAgICAgICAgIGxldCBzdWZmaXg7CiAgICAgICAgICAgICAgICBsZXQgc2VyaWVzTmFtZTsKICAgICAgICAgICAgICAgIGxldCBtYXRjaGVkID0gMDsKICAgICAgICAgICAgICAgIC8vIFNjYW4gb3ZlciB0aGUgZW50aXJlIGxlYWYgbmFtZSBhbmQgbWF0Y2ggYW55IHBvc3NpYmxlIG51bWJlcnMsCiAgICAgICAgICAgICAgICAvLyBhbmQgcHV0IHRoZSByZXN1bHRzIGludG8gY29ycmVzcG9uZGluZyBkaWN0aW9uYXJpZXMuCiAgICAgICAgICAgICAgICB3aGlsZSAoKG1hdGNoUmVzdWx0ID0gbnVtUmVnZXguZXhlYyhsZWFmKSkpIHsKICAgICAgICAgICAgICAgICAgICArK21hdGNoZWQ7CiAgICAgICAgICAgICAgICAgICAgcHJlZml4ID0gbGVhZi5zbGljZSgwLCBtYXRjaFJlc3VsdC5pbmRleCk7CiAgICAgICAgICAgICAgICAgICAgaWQgPSBtYXRjaFJlc3VsdFswXTsKICAgICAgICAgICAgICAgICAgICBzdWZmaXggPSBsZWFmLnNsaWNlKG1hdGNoUmVzdWx0LmluZGV4ICsgbWF0Y2hSZXN1bHRbMF0ubGVuZ3RoKTsKICAgICAgICAgICAgICAgICAgICBzZXJpZXNOYW1lID0gZ2V0U2VyaWVzTm9kZU5hbWUocHJlZml4LCBzdWZmaXgsIHBhcmVudCk7CiAgICAgICAgICAgICAgICAgICAgZm9yd2FyZERpY3Rbc2VyaWVzTmFtZV0gPSBmb3J3YXJkRGljdFtzZXJpZXNOYW1lXTsKICAgICAgICAgICAgICAgICAgICBpZiAoIWZvcndhcmREaWN0W3Nlcmllc05hbWVdKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGZvcndhcmREaWN0W3Nlcmllc05hbWVdID0gY3JlYXRlU2VyaWVzTm9kZShwcmVmaXgsIHN1ZmZpeCwgcGFyZW50LCAraWQsIG5hbWUsIGdyYXBoT3B0aW9ucyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGZvcndhcmREaWN0W3Nlcmllc05hbWVdLmlkcy5wdXNoKGlkKTsKICAgICAgICAgICAgICAgICAgICByZXZlcnNlRGljdFtuYW1lXSA9IHJldmVyc2VEaWN0W25hbWVdIHx8IFtdOwogICAgICAgICAgICAgICAgICAgIHJldmVyc2VEaWN0W25hbWVdLnB1c2goW3Nlcmllc05hbWUsIGlkXSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAobWF0Y2hlZCA8IDEpIHsKICAgICAgICAgICAgICAgICAgICBwcmVmaXggPSBpc0dyb3VwID8gbGVhZi5zdWJzdHIoMCwgbGVhZi5sZW5ndGggLSAxKSA6IGxlYWY7CiAgICAgICAgICAgICAgICAgICAgaWQgPSAwOwogICAgICAgICAgICAgICAgICAgIHN1ZmZpeCA9IGlzR3JvdXAgPyAnKicgOiAnJzsKICAgICAgICAgICAgICAgICAgICBzZXJpZXNOYW1lID0gZ2V0U2VyaWVzTm9kZU5hbWUocHJlZml4LCBzdWZmaXgsIHBhcmVudCk7CiAgICAgICAgICAgICAgICAgICAgZm9yd2FyZERpY3Rbc2VyaWVzTmFtZV0gPSBmb3J3YXJkRGljdFtzZXJpZXNOYW1lXTsKICAgICAgICAgICAgICAgICAgICBpZiAoIWZvcndhcmREaWN0W3Nlcmllc05hbWVdKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGZvcndhcmREaWN0W3Nlcmllc05hbWVdID0gY3JlYXRlU2VyaWVzTm9kZShwcmVmaXgsIHN1ZmZpeCwgcGFyZW50LCAraWQsIG5hbWUsIGdyYXBoT3B0aW9ucyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGZvcndhcmREaWN0W3Nlcmllc05hbWVdLmlkcy5wdXNoKGlkKTsKICAgICAgICAgICAgICAgICAgICByZXZlcnNlRGljdFtuYW1lXSA9IHJldmVyc2VEaWN0W25hbWVdIHx8IFtdOwogICAgICAgICAgICAgICAgICAgIHJldmVyc2VEaWN0W25hbWVdLnB1c2goW3Nlcmllc05hbWUsIGlkXSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICAvKiogQHR5cGUge09iamVjdH0gIEEgZGljdGlvbmFyeSBtYXBwaW5nIHNlcmllc05hbWUgdG8gc2VyaWVzSW5mb0FycmF5LAogICAgICAgICAgICAgKiB3aGljaCBpcyBhbiBhcnJheSB0aGF0IGNvbnRhaW5zIG9iamVjdHMgd2l0aCBuYW1lLCBpZCwgcHJlZml4LCBzdWZmaXgsCiAgICAgICAgICAgICAqIGFuZCBwYXJlbnQgcHJvcGVydGllcy4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHZhciBjYW5kaWRhdGVzRGljdCA9IHt9OwogICAgICAgICAgICAvLyBGb3IgZWFjaCBvZiB0aGUgbWVtYmVyLCBwdXQgaXQgaW50byB0aGUgbWF4aW11bSBwb3NzaWJsZSBzZXJpZXMsCiAgICAgICAgICAgIC8vIGFuZCBjcmVhdGUgY2FuZGlkYXRlc0RpY3QgYWNjb3JkaW5nbHkuCiAgICAgICAgICAgIGxvZGFzaC5lYWNoKHJldmVyc2VEaWN0LCBmdW5jdGlvbiAoc2VyaWV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4gYnVuY2hlcyB0aGF0IGhhdmUgbW9ub3RvbmljYWxseQogICAgICAgICAgICAvLyBpbmNyZWFzaW5nIG51bWJlcnMgaW4gdGhlaXIgbmFtZXMuICBFYWNoIG9mIHRoZXNlIGJ1bmNoZXMgaXMgYSBzZXJpZXMuCiAgICAgICAgICAgIGxvZGFzaC5lYWNoKGNhbmRpZGF0ZXNEaWN0LCBmdW5jdGlvbiAoc2VyaWVzSW5mb0FycmF5LCBzZXJpZXNOYW1lKSB7CiAgICAgICAgICAgICAgICBpZiAoc2VyaWVzSW5mb0FycmF5Lmxlbmd0aCA8IDIpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBzZXJpZXNJbmZvQXJyYXkuc29ydChmdW5jdGlvbiAoYSwgYikgewogICAgICAgICAgICAgICAgICAgIHJldHVybiArYS5jbHVzdGVySWQgLSArYi5jbHVzdGVySWQ7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIC8vIExvb3AgdGhyb3VnaCB0aGUgbm9kZXMgc29ydGVkIGJ5IGl0cyBkZXRlY3RlZCBzZXJpZXMgbnVtYmVyLCBncm91cGluZwogICAgICAgICAgICAgICAgLy8gYWxsIG5vZGVzIHdpdGggbW9ub3RvbmljYWxseS1pbmNyZWFzaW5nIHNlcmllcyBudW1iZXJzLgogICAgICAgICAgICAgICAgbGV0IHNlcmllc05vZGVzID0gW3Nlcmllc0luZm9BcnJheVswXV07CiAgICAgICAgICAgICAgICBmb3IgKGxldCBpbmRleCA9IDE7IGluZGV4IDwgc2VyaWVzSW5mb0FycmF5Lmxlbmd0aDsgaW5kZXgrKykgewogICAgICAgICAgICAgICAgICAgIGxldCBuZXh0Tm9kZSA9IHNlcmllc0luZm9BcnJheVtpbmRleF07CiAgICAgICAgICAgICAgICAgICAgaWYgKG5leHROb2RlLmNsdXN0ZXJJZCA9PT0KICAgICAgICAgICAgICAgICAgICAgICAgc2VyaWVzTm9kZXNbc2VyaWVzTm9kZXMubGVuZ3RoIC0gMV0uY2x1c3RlcklkICsgMSkgewogICAgICAgICAgICAgICAgICAgICAgICBzZXJpZXNOb2Rlcy5wdXNoKG5leHROb2RlKTsKICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGFkZFNlcmllc1RvRGljdChzZXJpZXNOb2Rlcywgc2VyaWVzRGljdCwgK2NsdXN0ZXJJZCwgbWV0YWdyYXBoLCBncmFwaE9wdGlvbnMpOwogICAgICAgICAgICAgICAgICAgIHNlcmllc05vZGVzID0gW25leHROb2RlXTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGFkZFNlcmllc1RvRGljdChzZXJpZXNOb2Rlcywgc2VyaWVzRGljdCwgK2NsdXN0ZXJJZCwgbWV0YWdyYXBoLCBncmFwaE9wdGlvbnMpOwogICAgICAgICAgICB9KTsKICAgICAgICB9KTsKICAgICAgICByZXR1cm4gc2VyaWVzRGljdDsKICAgIH0KICAgIC8qKgogICAgICogQWRkIGEgc2VyaWVzIHRvIHRoZSBwcm92aWRlZCBkaWN0aW9uYXJ5IG1hcHBpbmcgc2VyaWVzIG5hbWVzIHRvIHNlcmllcy4KICAgICAqCiAgICAgKiBAcGFyYW0gc2VyaWVzTm9kZXMgdGhlIG5vZGVzIGluIHRoZSBzZXJpZXMuIENvbnRhaW5zCiAgICAgKiAgICAgbmFtZSwgaWQsIHByZWZpeCwgc3VmZml4IGFuZCBwYXJlbnQgcHJvcGVydGllcyBvZiB0aGUgbm9kZS4KICAgICAqIEBwYXJhbSBzZXJpZXNEaWN0IHRoZSBkaWN0aW9uYXJ5IG9mIHNlcmllcwogICAgICogQHBhcmFtIGNsdXN0ZXJJZCBJRCBvZiB0aGUgdGVtcGxhdGUgb2YgdGhlIG5vZGVzIG9mIHRoZSBzZXJpZXMKICAgICAqIEBwYXJhbSBtZXRhZ3JhcGgKICAgICAq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4uYXJndW1lbnRzKTsKICAgICAgICAgICAgdGhpcy5fZXhwYW5kZWQgPSB0cnVlOwogICAgICAgICAgICB0aGlzLl9vcENvbXBhdENvbG9yID0gT3BOb2RlQ29sb3JzLkNPTVBBVElCTEU7CiAgICAgICAgICAgIHRoaXMuX29wSW5jb21wYXRDb2xvciA9IE9wTm9kZUNvbG9ycy5JTkNPTVBBVElCTEU7CiAgICAgICAgfQogICAgICAgIGdldCBfdGVtcGxhdGVJbmRleCgpIHsKICAgICAgICAgICAgdmFyIGdyYXBoSGllcmFyY2h5ID0gdGhpcy5ncmFwaEhpZXJhcmNoeTsKICAgICAgICAgICAgcmV0dXJuIGdyYXBoSGllcmFyY2h5LmdldFRlbXBsYXRlSW5kZXgoKTsKICAgICAgICB9CiAgICAgICAgX2dldE5vZGUobm9kZU5hbWUsIGdyYXBoSGllcmFyY2h5KSB7CiAgICAgICAgICAgIHJldHVybiBncmFwaEhpZXJhcmNoeS5ub2RlKG5vZGVOYW1lKTsKICAgICAgICB9CiAgICAgICAgX2dldFJlbmRlckluZm8obm9kZU5hbWUsIHJlbmRlckhpZXJhcmNoeSkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5yZW5kZXJIaWVyYXJjaHkuZ2V0T3JDcmVhdGVSZW5kZXJOb2RlQnlOYW1lKG5vZGVOYW1lKTsKICAgICAgICB9CiAgICAgICAgX3RvZ2dsZUV4cGFuZGVkKCkgewogICAgICAgICAgICB0aGlzLl9leHBhbmRlZCA9ICF0aGlzLl9leHBhbmRlZDsKICAgICAgICB9CiAgICAgICAgX2dldFRvZ2dsZUljb24oZXhwYW5kZWQpIHsKICAgICAgICAgICAgcmV0dXJuIGV4cGFuZGVkID8gJ2V4cGFuZC1sZXNzJyA6ICdleHBhbmQtbW9yZSc7CiAgICAgICAgfQogICAgICAgIF9yZXNpemVMaXN0KHNlbGVjdG9yKSB7CiAgICAgICAgICAgIHZhciBsaXN0ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcihzZWxlY3Rvcik7CiAgICAgICAgICAgIGlmIChsaXN0KSB7CiAgICAgICAgICAgICAgICBsaXN0LmZpcmUoJ2lyb24tcmVzaXplJyk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgZ2V0IF9pbmNvbXBhdGlibGVPcE5vZGVzKCkgewogICAgICAgICAgICB2YXIgZ3JhcGhIaWVyYXJjaHkgPSB0aGlzLmdyYXBoSGllcmFyY2h5OwogICAgICAgICAgICB2YXIgaGllcmFyY2h5UGFyYW1zID0gdGhpcy5oaWVyYXJjaHlQYXJhbXM7CiAgICAgICAgICAgIGlmIChncmFwaEhpZXJhcmNoeSAmJiBncmFwaEhpZXJhcmNoeS5yb290KSB7CiAgICAgICAgICAgICAgICB0aGlzLmFzeW5jKHRoaXMuX3Jlc2l6ZUxpc3QuYmluZCh0aGlzLCAnI2luY29tcGF0aWJsZU9wc0xpc3QnKSk7CiAgICAgICAgICAgICAgICByZXR1cm4gZ2V0SW5jb21wYXRpYmxlT3BzKGdyYXBoSGllcmFyY2h5LCBoaWVyYXJjaHlQYXJhbXMpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGdldCBfb3BDb21wYXRTY29yZSgpIHsKICAgICAgICAgICAgdmFyIGdyYXBoSGllcmFyY2h5ID0gdGhpcy5ncmFwaEhpZXJhcmNoeTsKICAgICAgICAgICAgaWYgKGdyYXBoSGllcmFyY2h5ICYmIGdyYXBoSGllcmFyY2h5LnJvb3QpIHsKICAgICAgICAgICAgICAgIHZhciByb290ID0gZ3JhcGhIaWVyYXJjaHkucm9vdDsKICAgICAgICAgICAgICAgIHZhciBudW1Db21wYXQgPSByb290LmNvbXBhdGliaWxpdHlIaXN0b2dyYW0uY29tcGF0aWJsZTsKICAgICAgICAgICAgICAgIHZhciBudW1JbmNvbXBhdCA9IHJvb3QuY29tcGF0aWJpbGl0eUhpc3RvZ3JhbS5pbmNvbXBhdGlibGU7CiAgICAgICAgICAgICAgICBpZiAobnVtQ29tcGF0ID09IDAgJiYgbnVtSW5jb21wYXQgPT0gMCkKICAgICAgICAgICAgICAgICAgICByZXR1cm4gMDsKICAgICAgICAgICAgICAgIHZhciBudW1Ub3RhbCA9IG51bUNvbXBhdCArIG51bUluY29tcGF0OwogICAgICAgICAgICAgICAgLy8gUm91bmQgdGhlIHJhdGlvIHRvd2FyZHMgbmVnYXRpdmUgaW5maW5pdHkuCiAgICAgICAgICAgICAgICByZXR1cm4gTWF0aC5mbG9vcigoMTAwICogbnVtQ29tcGF0KSAvIG51bVRvdGFsKSAvIDEwMDsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gMDsKICAgICAgICB9CiAgICAgICAgZ2V0IF9vcENvbXBhdFNjb3JlTGFiZWwoKSB7CiAgICAgICAgICAgIHZhciBvcENvbXBhdFNjb3JlID0gdGhpcy5fb3BDb21wYXRTY29yZTsKICAgICAgICAgICAgcmV0dXJuIGZvcm1hdCgnLjAlJykob3BDb21wYXRTY29yZSk7CiAgICAgICAgfQogICAgICAgIGdldCBfdG90YWxJbmNvbXBhdE9wcygpIHsKICAgICAgICAgICAgdmFyIGdyYXBoSGllcmFyY2h5ID0gdGhpcy5ncmFwaEhpZXJhcmNoeTsKICAgICAgICAgICAgaWYgKGdyYXBoSGllcmFyY2h5ICYmIGdyYXBoSGllcmFyY2h5LnJvb3QpIHsKICAgICAgICAgICAgICAgIHJldHVybiBncmFwaEhpZXJhcmNoeS5yb290LmNvbXBhdGliaWxpdHlIaXN0b2dyYW0uaW5jb21wYXRpYmxlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiAwOwogICAgICAgIH0KICAgIH07CiAgICBUZkdyYXBoT3BDb21wYXRDYXJkLnRlbXBsYXRlID0gaHRtbCBgCiAgICA8c3R5bGU+CiAgICAgIDpob3N0IHsKICAgICAgICBtYXgtaGVpZ2h0OiA1MDBweDsKICAgICAgfQoKICAgICAgLmluY29tcGF0aWJsZS1vcHMtbGlzdCB7CiAgICAgICAgaGVpZ2h0OiAzNTBweDsKICAgICAgICBtYXgtaGVpZ2h0OiA0MDBweDsKICAgICAgICBvdmVyZmxvdy15OiBzY3JvbGw7CiAgICAgICAgZGlzcGxheTogZmxleDsKICAgICAgICBmbGV4LWRpcmVjdGlvbjogY29sdW1uOwogICAgICB9CgogICAgICBpcm9uLWxpc3QgewogICAgICAgIGZsZXg6IDEgMSBhdXRvOwogICAgICB9CgogICAgICBwYXBlci1pdGVtIHsKICAgICAgICBwYWRkaW5nOiAwOwogICAgICAgIGJhY2tncm91bmQ6ICNlOWU5ZTk7CiAgICAgIH0KCiAgICAgIHBhcGVyLWl0ZW0tYm9keVt0d28tbGluZV0gewogICAgICAgIG1pbi1oZWlnaHQ6IDA7CiAgICAgICAgcGFkZGluZzogOHB4IDEycHggNHB4OwogICAgICB9CgogICAgICAuZXhwYW5kZWRJbmZvIHsKICAgICAgICBwYWRkaW5nOiA4cHggMTJweDsKICAgICAgICBmb250LXdlaWdodDogNTAwOwogICAgICAgIGZvbnQtc2l6ZTogMTJwdDsKICAgICAgICB3aWR0aDogMTAwJTsKICAgICAgfQoKICAgICAgLm5vZGUtbmFtZSB7CiAgICAgICAgd2hpdGUtc3BhY2U6IG5vcm1hbDsKICAgICAgICB3b3JkLXdyYXA6IGJyZWFrLXdvcmQ7CiAgICAgICAgZm9udC1zaXplOiAxNHB0OwogICAgICAgIGZvbnQtd2VpZ2h0OiA1MDA7CiAgICAgIH0KCiAgICAgIC5zdWJ0aXRsZSB7CiAgICAgICAgZm9udC1zaXplOiAxMnB0OwogICAgICAgIGNvbG9yOiAjNWU1ZTVlOwogICAgICB9CgogICAgICAudG9nZ2xlLWJ1dHRvbiB7CiAgICAgICAgZmxvYXQ6IHJpZ2h0OwogICAgICAgIG1heC1oZWlnaHQ6IDIwcHg7CiAgICAgICAgbWF4LXdpZHRoOiAyMHB4OwogICAgICAgIHBhZGRpbmc6IDA7CiAgICAgIH0KCiAgICAgIC5ub24tY29udHJvbC1saXN0LWl0ZW0gewogICAgICAgIHBhZGRpbmctbGVmdDogMTBweDsKICAgICAgfQoKICAgICAgZGl2Lm9wLWNvbXBhdC1kaXNwbGF5IHsKICAgICAgICBtYXJnaW4tdG9wOiAxMHB4OwogICAgICAgIGRpc3BsYXk6IGlubGluZS1ibG9jazsKICAgICAgfQoKICAgICAgc3ZnLm9wLWNvbXBhdCB7CiAgICAgICAgd2lkdGg6IDI1MHB4OwogICAgICAgIGhlaWdodDogMjVweDsKICAgICAgICBmbG9hdDogbGVmdDsKICAgICAgfQoKICAgICAgZGl2Lm9wLWNvbXBhdC12YWx1ZSB7CiAgICAgICAgZmxvYXQ6IHJpZ2h0OwogICAgICAgIGhlaWdodDogMTAwJTsKICAgICAgICBmb250LXNpemU6IDE0cHg7CiAgICAgICAgY29sb3I6IGJsYWNrOwogICAgICAgIG1hcmdpbi1sZWZ0OiAxMHB4OwogICAgICB9CiAgICA8L3N0eWxlPgoKICAgIDxwYXBlci1pdGVtPgogICAgICA8cGFwZXItaXRlbS1ib2R5IHR3by1saW5lPgogICAgICAgIDxkaXY+CiAgICAgICAgICA8cGFwZXItaWNvbi1idXR0b24KICAgICAgICAgICAgaWNvbj0ie3tfZ2V0VG9nZ2xlSWNvbihfZXhwYW5kZWQpfX0iCiAgICAgICAgICAgIG9uLWNsaWNrPSJfdG9nZ2xlRXhwYW5kZWQiCiAgICAgICAgICAgIGNsYXNzPSJ0b2dnbGUtYnV0dG9uIgogICAgICAgICAgPgogICAgICAgICAgPC9wYXBlci1pY29uLWJ1dHRvbj4KICAgICAgICAgIDxkaXYgY2xhc3M9Im5vZGUtbmFtZSIgaWQ9Im5vZGV0aXRsZSI+W1tub2RlVGl0bGVdXTwvZGl2PgogICAgICAgIDwvZGl2PgogICAgICAgIDxkaXYgc2Vjb25kYXJ5PgogICAgICAgICAgPGRpdiBjbGFzcz0ic3VidGl0bGUiPgogICAgICAgICAgICA8ZGl2IGNsYXNzPSJvcC1jb21wYXQtZGlzcGxheSI+CiAgICAgICAgICAgICAgPHN2ZwogICAgICAgICAgICAgICAgY2xhc3M9Im9wLWNvbXBhdCIKICAgICAgICAgICAgICAgIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaW5ZTWlkIG1lZXQiCiAgICAgICAgICAgICAgICB2aWV3Qm94PSIwIDAgMjUwIDI1IgogICAgICAgICAgICAgID4KICAgICAgICAgICAgICAgIDxkZWZzPgogICAgICAgICAgICAgICAgICA8bGluZWFyR3JhZGllbnQgaWQ9Im9wLWNvbXBhdC1maWxsIj4KICAgICAgICAgICAgICAgICAgICA8c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3IkPSJbW19vcENvbXBhdENvbG9yXV0iPjwvc3RvcD4KICAgICAgICAgICAgICAgICAgICA8c3RvcAogICAgICAgICAgICAgICAgICAgICAgb2Zmc2V0JD0iW1tfb3BDb21wYXRTY29yZV1dIgogICAgICAgICAgICAgICAgICAgICAgc3RvcC1jb2xvciQ9IltbX29wQ29tcGF0Q29sb3JdXSIKICAgICAgICAgICAgICAgICAgICA+PC9zdG9wPgogICAgICAgICAgICAgICAgICAgIDxzdG9wCiAgICAgICAgICAgICAgICAgICAgICBvZmZzZXQkPSJbW19vcENvbXBhdFNjb3JlXV0iCiAgICAgICAgICAgICAgICAgICAgICBzdG9wLWNvbG9yJD0iW1tfb3BJbmNvbXBhdENvbG9yXV0iCiAgICAgICAgICAgICAgICAgICAgPjwvc3RvcD4KICAgICAgICAgICAgICAgICAgICA8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3IkPSJbW19vcEluY29tcGF0Q29sb3IgXV0iPjwvc3RvcD4KICAgICAgICAgICAgICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgICAgICAgICAgICAgIDwvZGVmcz4KICAgICAgICAgICAgICAgIDxyZWN0CiAgICAgICAgICAgICAgICAgIGhlaWdodD0iMjUiCiAgICAgICAgICAgICAgICAgIHdpZHRoPSIyNTAiCiAgICAgICAgICAgICAgICAgIHJ4PSI1IgogICAgICAgICAgICAgICAgICByeT0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JbmZvKGl0ZW0ubmFtZSwgcmVuZGVySGllcmFyY2h5KV1dIgogICAgICAgICAgICAgICAgbmFtZT0iW1tpdGVtLm5hbWVdXSIKICAgICAgICAgICAgICAgIHRlbXBsYXRlLWluZGV4PSJbW190ZW1wbGF0ZUluZGV4XV0iCiAgICAgICAgICAgICAgICBjb2xvci1ieT0iW1tjb2xvckJ5XV0iCiAgICAgICAgICAgICAgICBpdGVtLXR5cGU9ImluY29tcGF0aWJsZS1vcHMiCiAgICAgICAgICAgICAgPgogICAgICAgICAgICAgIDwvdGYtZ3JhcGgtb3AtY29tcGF0LWxpc3QtaXRlbT4KICAgICAgICAgICAgPC90ZW1wbGF0ZT4KICAgICAgICAgIDwvaXJvbi1saXN0PgogICAgICAgIDwvZGl2PgogICAgICA8L3RlbXBsYXRlPgogICAgPC9pcm9uLWNvbGxhcHNlPgogIGA7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7IHR5cGU6IE9iamVjdCB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIE9iamVjdCkKICAgIF0sIFRmR3JhcGhPcENvbXBhdENhcmQucHJvdG90eXBlLCAiZ3JhcGhIaWVyYXJjaHkiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoeyB0eXBlOiBPYmplY3QgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBPYmplY3QpCiAgICBdLCBUZkdyYXBoT3BDb21wYXRDYXJkLnByb3RvdHlwZSwgImhpZXJhcmNoeVBhcmFtcyIsIHZvaWQgMCk7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7IHR5cGU6IE9iamVjdCB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIE9iamVjdCkKICAgIF0sIFRmR3JhcGhPcENvbXBhdENhcmQucHJvdG90eXBlLCAicmVuZGVySGllcmFyY2h5Iiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsgdHlwZTogU3RyaW5nIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgU3RyaW5nKQogICAgXSwgVGZHcmFwaE9wQ29tcGF0Q2FyZC5wcm90b3R5cGUsICJub2RlVGl0bGUiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBCb29sZWFuLAogICAgICAgIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgQm9vbGVhbikKICAgIF0sIFRmR3JhcGhPcENvbXBhdENhcmQucHJvdG90eXBlLCAiX2V4cGFuZGVkIiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsKICAgICAgICAgICAgdHlwZTogU3RyaW5nLAogICAgICAgIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgU3RyaW5nKQogICAgXSwgVGZHcmFwaE9wQ29tcGF0Q2FyZC5wcm90b3R5cGUsICJfb3BDb21wYXRDb2xvciIsIHZvaWQgMCk7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7CiAgICAgICAgICAgIHR5cGU6IFN0cmluZywKICAgICAgICB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIFN0cmluZykKICAgIF0sIFRmR3JhcGhPcENvbXBhdENhcmQucHJvdG90eXBlLCAiX29wSW5jb21wYXRDb2xvciIsIHZvaWQgMCk7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBjb21wdXRlZCgnZ3JhcGhIaWVyYXJjaHknKSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIE9iamVjdCksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnBhcmFtdHlwZXMiLCBbX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dW5kZXIgdGhlIExpY2Vuc2UuCiAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwogICAgbGV0IFRmTm9kZUxpc3RJdGVtID0gY2xhc3MgVGZOb2RlTGlzdEl0ZW0gZXh0ZW5kcyBMZWdhY3lFbGVtZW50TWl4aW4oUG9seW1lckVsZW1lbnQpIHsKICAgICAgICBfaXRlbVR5cGVDaGFuZ2VkKCkgewogICAgICAgICAgICBpZiAodGhpcy5pdGVtVHlwZSAhPT0gJ3N1Ym5vZGUnKSB7CiAgICAgICAgICAgICAgICB0aGlzLiRbJ2xpc3QtaXRlbSddLmNsYXNzTGlzdC5hZGQoJ2NsaWNrYWJsZScpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy4kWydsaXN0LWl0ZW0nXS5jbGFzc0xpc3QucmVtb3ZlKCdjbGlja2FibGUnKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBfbm9kZUxpc3RlbmVyKGV2ZW50KSB7CiAgICAgICAgICAgIC8vIGZpcmUgbm9kZS5jbGljay9tb3VzZW92ZXIvbW91c2VvdXQKICAgICAgICAgICAgdGhpcy5maXJlKCdub2RlLWxpc3QtaXRlbS0nICsgZXZlbnQudHlwZSwgewogICAgICAgICAgICAgICAgY2FyZE5vZGU6IHRoaXMuY2FyZE5vZGUubmFtZSwKICAgICAgICAgICAgICAgIG5vZGVOYW1lOiB0aGlzLm5hbWUsCiAgICAgICAgICAgICAgICB0eXBlOiB0aGlzLml0ZW1UeXBlLAogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgX2ZhZGVkQ2xhc3MoaXRlbVJlbmRlckluZm8pIHsKICAgICAgICAgICAgcmV0dXJuIGl0ZW1SZW5kZXJJbmZvICYmIGl0ZW1SZW5kZXJJbmZvLmlzRmFkZWRPdXQgPyAnZmFkZWQnIDogJyc7CiAgICAgICAgfQogICAgfTsKICAgIFRmTm9kZUxpc3RJdGVtLnRlbXBsYXRlID0gaHRtbCBgCiAgICA8c3R5bGU+CiAgICAgICNsaXN0LWl0ZW0gewogICAgICAgIHdpZHRoOiAxMDAlOwogICAgICAgIGNvbG9yOiAjNTY1NjU2OwogICAgICAgIGZvbnQtc2l6ZTogMTFwdDsKICAgICAgICBmb250LXdlaWdodDogNDAwOwogICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTsKICAgICAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7CiAgICAgIH0KCiAgICAgICNsaXN0LWl0ZW06aG92ZXIgewogICAgICAgIGJhY2tncm91bmQtY29sb3I6IHZhcigtLWdvb2dsZS15ZWxsb3ctMTAwKTsKICAgICAgfQoKICAgICAgLmNsaWNrYWJsZSB7CiAgICAgICAgY3Vyc29yOiBwb2ludGVyOwogICAgICB9CgogICAgICAjbGlzdC1pdGVtIHNwYW4gewogICAgICAgIG1hcmdpbi1sZWZ0OiA0MHB4OwogICAgICB9CgogICAgICAjbGlzdC1pdGVtLmV4Y2x1ZGVkIHNwYW4gewogICAgICAgIGNvbG9yOiAjOTk5OwogICAgICB9CgogICAgICAjbGlzdC1pdGVtIHNwYW4uZWRnZS1sYWJlbCB7CiAgICAgICAgZmxvYXQ6IHJpZ2h0OwogICAgICAgIGZvbnQtc2l6ZTogMTBweDsKICAgICAgICBtYXJnaW4tbGVmdDogM3B4OwogICAgICAgIG1hcmdpbi1yaWdodDogNXB4OwogICAgICB9CgogICAgICAubm9kZS1pY29uIHsKICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7CiAgICAgICAgdG9wOiAxcHg7CiAgICAgICAgbGVmdDogMnB4OwogICAgICB9CgogICAgICAuZmFkZWQgc3BhbiB7CiAgICAgICAgY29sb3I6IHZhcigtLXRiLWdyYXBoLWZhZGVkKTsKICAgICAgfQogICAgPC9zdHlsZT4KICAgIDxkaXYKICAgICAgaWQ9Imxpc3Qta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NvZnR3YXJlCiAgICBkaXN0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiAiQVMgSVMiIEJBU0lTLAogICAgV0lUSE9VVCBXQVJSQU5USUVTIE9SIENPTkRJVElPTlMgT0YgQU5ZIEtJTkQsIGVpdGhlciBleHByZXNzIG9yIGltcGxpZWQuCiAgICBTZWUgdGhlIExpY2Vuc2UgZm9yIHRoZSBzcGVjaWZpYyBsYW5ndWFnZSBnb3Zlcm5pbmcgcGVybWlzc2lvbnMgYW5kCiAgICBsaW1pdGF0aW9ucyB1bmRlciB0aGUgTGljZW5zZS4KICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCiAgICBsZXQgVGZOb2RlSW5mbyA9IGNsYXNzIFRmTm9kZUluZm8gZXh0ZW5kcyBMZWdhY3lFbGVtZW50TWl4aW4oUG9seW1lckVsZW1lbnQpIHsKICAgICAgICBjb25zdHJ1Y3RvcigpIHsKICAgICAgICAgICAgc3VwZXIoLi4uYXJndW1lbnRzKTsKICAgICAgICAgICAgdGhpcy5fZXhwYW5kZWQgPSB0cnVlOwogICAgICAgICAgICB0aGlzLl9vcGVuZWRDb250cm9sUHJlZCA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLl9vcGVuZWRDb250cm9sU3VjYyA9IGZhbHNlOwogICAgICAgIH0KICAgICAgICBleHBhbmROb2RlKCkgewogICAgICAgICAgICB0aGlzLmZpcmUoJ19ub2RlLmV4cGFuZCcsIHRoaXMubm9kZSk7CiAgICAgICAgfQogICAgICAgIGdldCBfdGVtcGxhdGVJbmRleCgpIHsKICAgICAgICAgICAgdmFyIGdyYXBoSGllcmFyY2h5ID0gdGhpcy5ncmFwaEhpZXJhcmNoeTsKICAgICAgICAgICAgcmV0dXJuIGdyYXBoSGllcmFyY2h5LmdldFRlbXBsYXRlSW5kZXgoKTsKICAgICAgIC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ICAgIH0KICAgICAgICBnZXQgX25vZGVTdGF0c0Zvcm1hdHRlZENvbXB1dGVUaW1lKCkgewogICAgICAgICAgICB2YXIgc3RhdHMgPSB0aGlzLl9ub2RlU3RhdHM7CiAgICAgICAgICAgIGlmICghc3RhdHMgfHwgIXN0YXRzLmdldFRvdGFsTWljcm9zKCkpIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gY29udmVydFVuaXRzVG9IdW1hblJlYWRhYmxlKHN0YXRzLmdldFRvdGFsTWljcm9zKCksIFRJTUVfVU5JVFMpOwogICAgICAgIH0KICAgICAgICBnZXQgX25vZGVTdGF0c0Zvcm1hdHRlZE91dHB1dFNpemVzKCkgewogICAgICAgICAgICB2YXIgc3RhdHMgPSB0aGlzLl9ub2RlU3RhdHM7CiAgICAgICAgICAgIGlmICghc3RhdHMgfHwgIXN0YXRzLm91dHB1dFNpemUgfHwgIXN0YXRzLm91dHB1dFNpemUubGVuZ3RoKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIGxvZGFzaC5tYXAoc3RhdHMub3V0cHV0U2l6ZSwgZnVuY3Rpb24gKHNoYXBlKSB7CiAgICAgICAgICAgICAgICBpZiAoc2hhcGUubGVuZ3RoID09PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdzY2FsYXInOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuICdbJyArIHNoYXBlLmpvaW4oJywgJykgKyAnXSc7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICBfZ2V0UmVuZGVySW5mbyhncmFwaE5vZGVOYW1lLCByZW5kZXJIaWVyYXJjaHkpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMucmVuZGVySGllcmFyY2h5LmdldE9yQ3JlYXRlUmVuZGVyTm9kZUJ5TmFtZShncmFwaE5vZGVOYW1lKTsKICAgICAgICB9CiAgICAgICAgZ2V0IF9hdHRyaWJ1dGVzKCkgewogICAgICAgICAgICB2YXIgbm9kZSA9IHRoaXMuX25vZGU7CiAgICAgICAgICAgIHRoaXMuYXN5bmModGhpcy5fcmVzaXplTGlzdC5iaW5kKHRoaXMsICcjYXR0cmlidXRlc0xpc3QnKSk7CiAgICAgICAgICAgIGlmICghbm9kZSB8fCAhbm9kZS5hdHRyKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gW107CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIGF0dHJzID0gW107CiAgICAgICAgICAgIGxvZGFzaC5lYWNoKG5vZGUuYXR0ciwgZnVuY3Rpb24gKGVudHJ5KSB7CiAgICAgICAgICAgICAgICAvLyBVbnBhY2sgdGhlICJ0b28gbGFyZ2UiIGF0dHJpYnV0ZXMgaW50byBzZXBhcmF0ZSBhdHRyaWJ1dGVzCiAgICAgICAgICAgICAgICAvLyBpbiB0aGUgaW5mbyBjYXJkLCB3aXRoIHZhbHVlcyAidG9vIGxhcmdlIHRvIHNob3ciLgogICAgICAgICAgICAgICAgaWYgKGVudHJ5LmtleSA9PT0gTEFSR0VfQVRUUlNfS0VZKSB7CiAgICAgICAgICAgICAgICAgICAgYXR0cnMgPSBhdHRycy5jb25jYXQoZW50cnkudmFsdWUubGlzdC5zLm1hcChmdW5jdGlvbiAoa2V5KSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7IGtleToga2V5LCB2YWx1ZTogJ1RvbyBsYXJnZSB0byBzaG93Li4uJyB9OwogICAgICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIGF0dHJzLnB1c2goewogICAgICAgICAgICAgICAgICAgICAgICBrZXk6IGVudHJ5LmtleSwKICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IEpTT04uc3RyaW5naWZ5KGVudHJ5LnZhbHVlKSwKICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHJldHVybiBhdHRyczsKICAgICAgICB9CiAgICAgICAgZ2V0IF9kZXZpY2UoKSB7CiAgICAgICAgICAgIHZhciBub2RlID0gdGhpcy5fbm9kZTsKICAgICAgICAgICAgcmV0dXJuIG5vZGUgPyBub2RlLmRldmljZSA6IG51bGw7CiAgICAgICAgfQogICAgICAgIGdldCBfc3VjY2Vzc29ycygpIHsKICAgICAgICAgICAgdmFyIG5vZGUgPSB0aGlzLl9ub2RlOwogICAgICAgICAgICB2YXIgaGllcmFyY2h5ID0gdGhpcy5ncmFwaEhpZXJhcmNoeTsKICAgICAgICAgICAgdGhpcy5fcmVmcmVzaE5vZGVJdGVtTGlzdCgnaW5wdXRzTGlzdCcpOwogICAgICAgICAgICBpZiAoIW5vZGUpIHsKICAgICAgICAgICAgICAgIHJldHVybiB7IHJlZ3VsYXI6IFtdLCBjb250cm9sOiBbXSB9OwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9jb252ZXJ0RWRnZUxpc3RUb0VkZ2VJbmZvTGlzdChoaWVyYXJjaHkuZ2V0U3VjY2Vzc29ycyhub2RlLm5hbWUpLCBmYWxzZSwgbm9kZS5pc0dyb3VwTm9kZSk7CiAgICAgICAgfQogICAgICAgIGdldCBfcHJlZGVjZXNzb3JzKCkgewogICAgICAgICAgICB2YXIgbm9kZSA9IHRoaXMuX25vZGU7CiAgICAgICAgICAgIHZhciBoaWVyYXJjaHkgPSB0aGlzLmdyYXBoSGllcmFyY2h5OwogICAgICAgICAgICB0aGlzLl9yZWZyZXNoTm9kZUl0ZW1MaXN0KCdvdXRwdXRzTGlzdCcpOwogICAgICAgICAgICBpZiAoIW5vZGUpIHsKICAgICAgICAgICAgICAgIHJldHVybiB7IHJlZ3VsYXI6IFtdLCBjb250cm9sOiBbXSB9OwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldH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AgICAgbm9kZTogdGhpcy5fZ2V0Tm9kZShuYW1lLCB0aGlzLmdyYXBoSGllcmFyY2h5KSwKICAgICAgICAgICAgICAgICAgICAgICAgZWRnZUxhYmVsOiBnZXRMYWJlbEZvckJhc2VFZGdlKGJhc2VFZGdlLCB0aGlzLnJlbmRlckhpZXJhcmNoeSksCiAgICAgICAgICAgICAgICAgICAgICAgIHJlbmRlckluZm86IHRoaXMuX2dldFJlbmRlckluZm8obmFtZSwgdGhpcy5yZW5kZXJIaWVyYXJjaHkpLAogICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIENvbnZlcnRzIGEgbGlzdCBvZiBtZXRhZWRnZXMgdG8gYSBsaXN0IG9mIGVkZ2UgaW5mb3JtYXRpb24KICAgICAgICAgICAgICogdGhhdCBjYW4gYmUgcmVuZGVyZWQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB2YXIgdG9FZGdlSW5mb0xpc3QgPSBmdW5jdGlvbiAoZWRnZXMpIHsKICAgICAgICAgICAgICAgIHZhciBlZGdlSW5mb0xpc3QgPSBbXTsKICAgICAgICAgICAgICAgIGxvZGFzaC5lYWNoKGVkZ2VzLCAobWV0YWVkZ2UpID0+IHsKICAgICAgICAgICAgICAgICAgICB2YXIgbmFtZSA9IGlzUHJlZGVjZXNzb3IgPyBtZXRhZWRnZS52IDogbWV0YWVkZ2UudzsKICAgICAgICAgICAgICAgICAgICAvLyBFbnVtZXJhdGUgYWxsIHRoZSBiYXNlIGVkZ2VzIGlmIHRoZSBub2RlIGlzIGFuIE9wTm9kZSwgb3IgdGhlCiAgICAgICAgICAgICAgICAgICAgLy8gbWV0YWVkZ2UgaGFzIG9ubHkgMSBlZGdlIGluIGl0LgogICAgICAgICAgICAgICAgICAgIGlmICghaXNHcm91cE5vZGUgfHwgbWV0YWVkZ2UuYmFzZUVkZ2VMaXN0Lmxlbmd0aCA9PSAxKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGVkZ2VJbmZvTGlzdCA9IGVkZ2VJbmZvTGlzdC5jb25jYXQodW5wYWNrTWV0YWVkZ2UobWV0YWVkZ2UpKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGVkZ2VJbmZvTGlzdC5wdXNoKHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IG5hbWUsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBub2RlOiB0aGlzLl9nZXROb2RlKG5hbWUsIHRoaXMuZ3JhcGhIaWVyYXJjaHkpLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgZWRnZUxhYmVsOiBnZXRMYWJlbEZvckVkZ2UobWV0YWVkZ2UsIHRoaXMucmVuZGVySGllcmFyY2h5KSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlbmRlckluZm86IHRoaXMuX2dldFJlbmRlckluZm8obmFtZSwgdGhpcy5yZW5kZXJIaWVyYXJjaHkpLAogICAgICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIHJldHVybiBlZGdlSW5mb0xpc3Q7CiAgICAgICAgICAgIH0uYmluZCh0aGlzKTsKICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIHJlZ3VsYXI6IHRvRWRnZUluZm9MaXN0KGxpc3QucmVndWxhciksCiAgICAgICAgICAgICAgICBjb250cm9sOiB0b0VkZ2VJbmZvTGlzdChsaXN0LmNvbnRyb2wpLAogICAgICAgICAgICB9OwogICAgICAgIH0KICAgICAgICBnZXQgX3N1Ym5vZGVzKCkgewogICAgICAgICAgICB2YXIgbm9kZSA9IHRoaXMuX25vZGU7CiAgICAgICAgICAgIHJldHVybiBub2RlICYmIG5vZGUubWV0YWdyYXBoID8gbm9kZS5tZXRhZ3JhcGgubm9kZXMoKSA6IG51bGw7CiAgICAgICAgfQogICAgICAgIGdldCBfdG90YWxQcmVkZWNlc3NvcnMoKSB7CiAgICAgICAgICAgIHZhciBwcmVkZWNlc3NvcnMgPSB0aGlzLl9wcmVkZWNlc3NvcnM7CiAgICAgICAgICAgIHJldHVybiBwcmVkZWNlc3NvcnMucmVndWxhci5sZW5ndGggKyBwcmVkZWNlc3NvcnMuY29udHJvbC5sZW5ndGg7CiAgICAgICAgfQogICAgICAgIGdldCBfdG90YWxTdWNjZXNzb3JzKCkgewogICAgICAgICAgICB2YXIgc3VjY2Vzc29ycyA9IHRoaXMuX3N1Y2Nlc3NvcnM7CiAgICAgICAgICAgIHJldHVybiBzdWNjZXNzb3JzLnJlZ3VsYXIubGVuZ3RoICsgc3VjY2Vzc29ycy5jb250cm9sLmxlbmd0aDsKICAgICAgICB9CiAgICAgICAgX3RvZ2dsZUNvbnRyb2xQcmVkKCkgewogICAgICAgICAgICB0aGlzLl9vcGVuZWRDb250cm9sUHJlZCA9ICF0aGlzLl9vcGVuZWRDb250cm9sUHJlZDsKICAgICAgICB9CiAgICAgICAgX3RvZ2dsZUNvbnRyb2xTdWNjKCkgewogICAgICAgICAgICB0aGlzLl9vcGVuZWRDb250cm9sU3VjYyA9ICF0aGlzLl9vcGVuZWRDb250cm9sU3VjYzsKICAgICAgICB9CiAgICAgICAgX3RvZ2dsZUV4cGFuZGVkKCkgewogICAgICAgICAgICB0aGlzLl9leHBhbmRlZCA9ICF0aGlzLl9leHBhbmRlZDsKICAgICAgICB9CiAgICAgICAgX2dldFRvZ2dsZUljb24oZXhwYW5kZWQpIHsKICAgICAgICAgICAgcmV0dXJuIGV4cGFuZGVkID8gJ2V4cGFuZC1sZXNzJyA6ICdleHBhbmQtbW9yZSc7CiAgICAgICAgfQogICAgICAgIF9yZXNldFN0YXRlKCkgewogICAgICAgICAgICB0aGlzLl9vcGVuZWRDb250cm9sUHJlZCA9IGZhbHNlOwogICAgICAgICA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h0OiA0MDA7CiAgICAgIH0KCiAgICAgIC5hdHRyLXJpZ2h0IHsKICAgICAgICBtYXJnaW4tbGVmdDogMzAlOwogICAgICAgIHdvcmQtd3JhcDogYnJlYWstd29yZDsKICAgICAgICBjb2xvcjogIzU2NTY1NjsKICAgICAgICBmb250LXdlaWdodDogNDAwOwogICAgICB9CgogICAgICAuc3ViLWxpc3QtdGFibGUgewogICAgICAgIGRpc3BsYXk6IHRhYmxlOwogICAgICAgIHdpZHRoOiAxMDAlOwogICAgICB9CgogICAgICAuc3ViLWxpc3QtdGFibGUtcm93IHsKICAgICAgICBkaXNwbGF5OiB0YWJsZS1yb3c7CiAgICAgIH0KCiAgICAgIC5zdWItbGlzdC10YWJsZS1yb3cgLnN1Yi1saXN0LXRhYmxlLWNlbGw6bGFzdC1jaGlsZCB7CiAgICAgICAgdGV4dC1hbGlnbjogcmlnaHQ7CiAgICAgIH0KCiAgICAgIC5zdWItbGlzdC10YWJsZS1jZWxsIHsKICAgICAgICBjb2xvcjogIzU2NTY1NjsKICAgICAgICBkaXNwbGF5OiB0YWJsZS1jZWxsOwogICAgICAgIGZvbnQtc2l6ZTogMTFwdDsKICAgICAgICBmb250LXdlaWdodDogNDAwOwogICAgICAgIG1heC13aWR0aDogMjAwcHg7CiAgICAgICAgcGFkZGluZzogMCA0cHg7CiAgICAgIH0KCiAgICAgIHBhcGVyLWl0ZW0gewogICAgICAgIHBhZGRpbmc6IDA7CiAgICAgICAgYmFja2dyb3VuZDogI2U5ZTllOTsKICAgICAgfQoKICAgICAgcGFwZXItaXRlbS1ib2R5W3R3by1saW5lXSB7CiAgICAgICAgbWluLWhlaWdodDogMDsKICAgICAgICBwYWRkaW5nOiA4cHggMTJweCA0cHg7CiAgICAgIH0KCiAgICAgIC5leHBhbmRlZEluZm8gewogICAgICAgIHBhZGRpbmc6IDhweCAxMnB4OwogICAgICB9CgogICAgICAuY29udHJvbERlcHMgewogICAgICAgIHBhZGRpbmc6IDAgMCAwIDhweDsKICAgICAgfQoKICAgICAgLm5vZGUtbmFtZSB7CiAgICAgICAgd2hpdGUtc3BhY2U6IG5vcm1hbDsKICAgICAgICB3b3JkLXdyYXA6IGJyZWFrLXdvcmQ7CiAgICAgICAgZm9udC1zaXplOiAxNHB0OwogICAgICAgIGZvbnQtd2VpZ2h0OiA1MDA7CiAgICAgIH0KCiAgICAgIC5ub2RlLWljb24gewogICAgICAgIGZsb2F0OiByaWdodDsKICAgICAgfQoKICAgICAgLnN1YnRpdGxlIHsKICAgICAgICBmb250LXNpemU6IDEycHQ7CiAgICAgICAgY29sb3I6ICM1ZTVlNWU7CiAgICAgIH0KCiAgICAgIC5jb250cm9sTGluZSB7CiAgICAgICAgZm9udC1zaXplOiAxMXB0OwogICAgICAgIGZvbnQtd2VpZ2h0OiA0MDA7CiAgICAgIH0KCiAgICAgIC50b2dnbGUtYnV0dG9uIHsKICAgICAgICBmbG9hdDogcmlnaHQ7CiAgICAgICAgbWF4LWhlaWdodDogMjBweDsKICAgICAgICBtYXgtd2lkdGg6IDIwcHg7CiAgICAgICAgcGFkZGluZzogMDsKICAgICAgfQoKICAgICAgLmNvbnRyb2wtdG9nZ2xlLWJ1dHRvbiB7CiAgICAgICAgZmxvYXQ6IGxlZnQ7CiAgICAgICAgbWF4LWhlaWdodDogMjBweDsKICAgICAgICBtYXgtd2lkdGg6IDIwcHg7CiAgICAgICAgcGFkZGluZzogMDsKICAgICAgfQoKICAgICAgLnRvZ2dsZS1pbmNsdWRlLWdyb3VwIHsKICAgICAgICBwYWRkaW5nLXRvcDogNHB4OwogICAgICB9CgogICAgICAudG9nZ2xlLWluY2x1ZGUgewogICAgICAgIG1hcmdpbjogNXB4IDZweDsKICAgICAgICB0ZXh0LXRyYW5zZm9ybTogbm9uZTsKICAgICAgICBwYWRkaW5nOiA0cHggNnB4OwogICAgICAgIGZvbnQtc2l6ZTogMTBwdDsKICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjZmFmYWZhOwogICAgICAgIGNvbG9yOiAjNjY2OwogICAgICB9CgogICAgICAudG9nZ2xlLWluY2x1ZGU6aG92ZXIgewogICAgICAgIGJhY2tncm91bmQtY29sb3I6IHZhcigtLWdvb2dsZS15ZWxsb3ctMTAwKTsKICAgICAgfQoKICAgICAgLm5vbi1jb250cm9sLWxpc3QtaXRlbSB7CiAgICAgICAgcGFkZGluZy1sZWZ0OiAxMHB4OwogICAgICB9CiAgICA8L3N0eWxlPgogICAgPHBhcGVyLWl0ZW0+CiAgICAgIDxwYXBlci1pdGVtLWJvZHkgdHdvLWxpbmU+CiAgICAgICAgPGRpdj4KICAgICAgICAgIDxwYXBlci1pY29uLWJ1dHRvbgogICAgICAgICAgICBpY29uPSJ7e19nZXRUb2dnbGVJY29uKF9leHBhbmRlZCl9fSIKICAgICAgICAgICAgb24tY2xpY2s9Il90b2dnbGVFeHBhbmRlZCIKICAgICAgICAgICAgY2xhc3M9InRvZ2dsZS1idXR0b24iCiAgICAgICAgICA+CiAgICAgICAgICA8L3BhcGVyLWljb24tYnV0dG9uPgogICAgICAgICAgPGRpdiBjbGFzcz0ibm9kZS1uYW1lIj4KICAgICAgICAgICAgPHRmLXdici1zdHJpbmcgdmFsdWU9IltbX25vZGUubmFtZV1dIiBkZWxpbWl0ZXItcGF0dGVybj0iLyI+CiAgICAgICAgICAgIDwvdGYtd2JyLXN0cmluZz4KICAgICAgICAgIDwvZGl2PgogICAgICAgIDwvZGl2PgogICAgICAgIDxkaXYgc2Vjb25kYXJ5PgogICAgICAgICAgPHRmLW5vZGUtaWNvbgogICAgICAgICAgICBjbGFzcz0ibm9kZS1pY29uIgogICAgICAgICAgICBub2RlPSJbW19ub2RlXV0iCiAgICAgICAgICAgIHJlbmRlci1pbmZvPSJbW19nZXRSZW5kZXJJbmZvKGdyYXBoTm9kZU5hbWUsIHJlbmRlckhpZXJhcmNoeSldXSIKICAgICAgICAgICAgY29sb3ItYnk9IltbY29sb3JCeV1dIgogICAgICAgICAgICB0ZW1wbGF0ZS1pbmRleD0i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lc0xpc3QiCiAgICAgICAgICAgICAgaXRlbXM9IltbX2F0dHJpYnV0ZXNdXSIKICAgICAgICAgICAgPgogICAgICAgICAgICAgIDx0ZW1wbGF0ZT4KICAgICAgICAgICAgICAgIDxkaXY+CiAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImF0dHItbGVmdCI+W1tpdGVtLmtleV1dPC9kaXY+CiAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImF0dHItcmlnaHQiPltbaXRlbS52YWx1ZV1dPC9kaXY+CiAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICA8L3RlbXBsYXRlPgogICAgICAgICAgICA8L2lyb24tbGlzdD4KICAgICAgICAgIDwvZGl2PgoKICAgICAgICAgIDx0ZW1wbGF0ZSBpcz0iZG9tLWlmIiBpZj0ie3tfZGV2aWNlfX0iPgogICAgICAgICAgICA8ZGl2IGNsYXNzPSJzdWItbGlzdC1ncm91cCBkZXZpY2UiPgogICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImF0dHItbGVmdCI+RGV2aWNlPC9kaXY+CiAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iYXR0ci1yaWdodCI+W1tfZGV2aWNlXV08L2Rpdj4KICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICA8L3RlbXBsYXRlPgoKICAgICAgICAgIDxkaXYgY2xhc3M9InN1Yi1saXN0LWdyb3VwIHByZWRlY2Vzc29ycyI+CiAgICAgICAgICAgIElucHV0cyAoPHNwYW4+W1tfdG90YWxQcmVkZWNlc3NvcnNdXTwvc3Bhbj4pCiAgICAgICAgICAgIDxpcm9uLWxpc3QKICAgICAgICAgICAgICBjbGFzcz0ic3ViLWxpc3QiCiAgICAgICAgICAgICAgaWQ9ImlucHV0c0xpc3QiCiAgICAgICAgICAgICAgaXRlbXM9IltbX3ByZWRlY2Vzc29ycy5yZWd1bGFyXV0iCiAgICAgICAgICAgID4KICAgICAgICAgICAgICA8dGVtcGxhdGU+CiAgICAgICAgICAgICAgICA8dGYtbm9kZS1saXN0LWl0ZW0KICAgICAgICAgICAgICAgICAgY2xhc3M9Im5vbi1jb250cm9sLWxpc3QtaXRlbSIKICAgICAgICAgICAgICAgICAgY2FyZC1ub2RlPSJbW19ub2RlXV0iCiAgICAgICAgICAgICAgICAgIGl0ZW0tbm9kZT0iW1tpdGVtLm5vZGVdXSIKICAgICAgICAgICAgICAgICAgZWRnZS1sYWJlbD0iW1tpdGVtLmVkZ2VMYWJlbF1dIgogICAgICAgICAgICAgICAgICBpdGVtLXJlbmRlci1pbmZvPSJbW2l0ZW0ucmVuZGVySW5mb11dIgogICAgICAgICAgICAgICAgICBuYW1lPSJbW2l0ZW0ubmFtZV1dIgogICAgICAgICAgICAgICAgICBpdGVtLXR5cGU9InByZWRlY2Vzc29ycyIKICAgICAgICAgICAgICAgICAgY29sb3ItYnk9IltbY29sb3JCeV1dIgogICAgICAgICAgICAgICAgICB0ZW1wbGF0ZS1pbmRleD0iW1tfdGVtcGxhdGVJbmRleF1dIgogICAgICAgICAgICAgICAgPgogICAgICAgICAgICAgICAgPC90Zi1ub2RlLWxpc3QtaXRlbT4KICAgICAgICAgICAgICA8L3RlbXBsYXRlPgogICAgICAgICAgICA8L2lyb24tbGlzdD4KICAgICAgICAgICAgPHRlbXBsYXRlIGlzPSJkb20taWYiIGlmPSJbW19wcmVkZWNlc3NvcnMuY29udHJvbC5sZW5ndGhdXSI+CiAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iY29udHJvbERlcHMiPgogICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iY29udHJvbExpbmUiPgogICAgICAgICAgICAgICAgICA8cGFwZXItaWNvbi1idXR0b24KICAgICAgICAgICAgICAgICAgICBpY29uPSJ7e19nZXRUb2dnbGVJY29uKF9vcGVuZWRDb250cm9sUHJlZCl9fSIKICAgICAgICAgICAgICAgICAgICBvbi1jbGljaz0iX3RvZ2dsZUNvbnRyb2xQcmVkIgogICAgICAgICAgICAgICAgICAgIGNsYXNzPSJjb250cm9sLXRvZ2dsZS1idXR0b24iCiAgICAgICAgICAgICAgICAgID4KICAgICAgICAgICAgICAgICAgPC9wYXBlci1pY29uLWJ1dHRvbj4KICAgICAgICAgICAgICAgICAgQ29udHJvbCBkZXBlbmRlbmNpZXMKICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgPGlyb24tY29sbGFwc2Ugb3BlbmVkPSJ7e19vcGVuZWRDb250cm9sUHJlZH19IiBuby1hbmltYXRpb24+CiAgICAgICAgICAgICAgICAgIDx0ZW1wbGF0ZQogICAgICAgICAgICAgICAgICAgIGlzPSJkb20taWYiCiAgICAgICAgICAgICAgICAgICAgaWY9Int7X29wZW5lZENvbnRyb2xQcmVkfX0iCiAgICAgICAgICAgICAgICAgICAgcmVzdGFtcD0idHJ1ZSIKICAgICAgICAgICAgICAgICAgPgogICAgICAgICAgICAgICAgICAgIDxpcm9uLWxpc3QKICAgICAgICAgICAgICAgICAgICAgIGNsYXNzPSJzdWItbGlzdCIKICAgICAgICAgICAgICAgICAgICAgIGl0ZW1zPSJbW19wcmVkZWNlc3NvcnMuY29udHJvbF1dIgogICAgICAgICAgICAgICAgICAgID4KICAgICAgICAgICAgICAgICAgICAgIDx0ZW1wbGF0ZT4KICAgICAgICAgICAgICAgICAgICAgICAgPHRmLW5vZGUtbGlzdC1pdGVtCiAgICAgICAgICAgICAgICAgICAgICAgICAgY2FyZC1ub2RlPSJbW19ub2RlXV0iCiAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS1ub2RlPSJbW2l0ZW0ubm9kZV1dIgogICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0tcmVuZGVyLWluZm89IltbaXRlbS5yZW5kZXJJbmZvXV0iCiAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZT0iW1tpdGVtLm5hbWVdXSIKICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLXR5cGU9InByZWRlY2Vzc29ycyIKICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvci1ieT0iW1tjb2xvckJ5XV0iCiAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGUtaW5kZXg9IltbX3RlbXBsYXRlSW5kZXhdXSIKICAgICAgICAgICAgICAgICAgICAgICAgPgogICAgICAgICAgICAgICAgICAgICAgICA8L3RmLW5vZGUtbGlzdC1pdGVtPgogICAgICAgICAgICAgICAgICAgICAgPC90ZW1wbGF0ZT4KICAgICAgICAgICAgICAgICAgICA8L2lyb24tbGlzdD4KICAgICAgICAgICAgICAgICAgPC90ZW1wbGF0ZT4KICAgICAgICAgICAgICAgIDwvaXJvbi1jb2xsYXBzZT4KICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgPC90ZW1wbGF0ZT4KICAgICAgICAgIDwvZGl2PgoKICAgICAgICAgIDxkaXYgY2xhc3M9InN1Yi1saXN0LWdyb3VwIHN1Y2Nlc3NvcnMiPgogICAgICAgICAgICBPdXRwdXRzICg8c3Bhbj5bW190b3RhbFN1Y2Nlc3NvcnNdXTwvc3Bhbj4pCiAgICAgICAgICAgIDxpcm9uLWxpc3QKICAgICAgICAgICAgICBjbGFzcz0ic3ViLWxpc3QiCiAgICAgICAgICAgICAgaWQ9Im91dHB1dHNMaXN0IgogICAgICAgICAgICAgIGl0ZW1zPSJbW19zdWNjZXNzb3JzLnJlZ3VsYXJdXSIKICAgICAgICAgICAgPgogICAgICAgICAgICAgIDx0ZW1wbGF0ZT4KICAgICAgICAgICAgICAgIDx0Zi1ub2RlLWxpc3QtaXRlbQogICAgICAgICAgICAgICAgICBjbGFzcz0ibm9uLWNvbnRyb2wtbGlzdC1pdGVtIgogICAgICAgICAgICAgICAgICBjYXJkLW5vZGU9IltbX25vZGVdXSIKICAgICAgICAgICAgICAgICAgaXRlbS1ub2RlPSJbW2l0ZW0ubm9kZV1dIgogICAgICAgICAgICAgICAgICBlZGdlLWxhYmVsPSJbW2l0ZW0uZWRnZUxhYmVsXV0iCiAgICAgICAgICAgICAgICAgIGl0ZW0tcmVuZGVyLWluZm89IltbaXRlbS5yZW5kZXJJbmZvXV0iCiAgICAgICAgICAgICAgICAgIG5hbWU9IltbaXRlbS5uYW1lXV0iCiAgICAgICAgICAgICAgICAgIGl0ZW0tdHlwZT0ic3VjY2Vzc29yIgogICAgICAgICAgICAgICAgICBjb2xvci1ieT0iW1tjb2xvckJ5XV0iCiAgICAgICAgICAgICAgICAgIHRlbXBsYXRlLWluZGV4PSJbW190ZW1wbGF0ZUluZGV4XV0iCiAgICAgICAgICAgICAgICA+CiAgICAgICAgICAgICAgICA8L3RmLW5vZGUtbGlzdC1pdGVtPgogICAgICAgICAgICAgIDwvdGVtcGxhdGU+CiAgICAgICAgICAgIDwvaXJvbi1saXN0PgogICAgICAgICAgICA8dGVtcGxhdGUgaXM9ImRvbS1pZiIgaWY9IltbX3N1Y2Nlc3NvcnMuY29udHJvbC5sZW5ndGhdXSI+CiAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iY29udHJvbERlcHMiPgogICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iY29udHJvbExpbmUiPgogICAgICAgICAgICAgICAgICA8cGFwZXItaWNvbi1idXR0b24KICAgICAgICAgICAgICAgICAgICBpY29uPSJ7e19nZXRUb2dnbGVJY29uKF9vcGVuZWRDb250cm9sU3VjYyl9fSIKICAgICAgICAgICAgICAgICAgICBvbi1jbGljaz0iX3RvZ2dsZUNvbnRyb2xTdWNjIgogICAgICAgICAgICAgICAgICAgIGNsYXNzPSJjb250cm9sLXRvZ2dsZS1idXR0b24iCiAgICAgICAgICAgICAgICAgID4KICAgICAgICAgICAgICAgICAgPC9wYXBlci1pY29uLWJ1dHRvbj4KICAgICAgICAgICAgICAgICAgQ29udHJvbCBkZXBlbmRlbmNpZXMKICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgPGlyb24tY29sbGFwc2Ugb3BlbmVkPSJ7e19vcGVuZWRDb250cm9sU3VjY319IiBuby1hbmltYXRpb24+CiAgICAgICAgICAgICAgICAgIDx0ZW1wbGF0ZQogICAgICAgICAgICAgICAgICAgIGlzPSJkb20taWYiCiAgICAgICAgICAgICAgICAgICAgaWY9Int7X29wZW5lZENvbnRyb2xTdWNjfX0iCiAgICAgICAgICAgICAgICAgICAgcmVzdGFtcD0idHJ1ZSIKICAgICAgICAgICAgICAgICAgPgogICAgICAgICAgICAgICAgICAgIDxpcm9uLWxpc3QgY2xhc3M9InN1Yi1saXN0IiBpdGVtcz0iW1tfc3VjY2Vzc29ycy5jb250cm9sXV0iPgogICAgICAgICAgICAgICAgICAgICAgPHRlbXBsYXRlPgogICAgICAgICAgICAgICAgICAgICAgICA8dGYtbm9kZS1saXN0LWl0ZW0KICAgICAgICAgICAgICAgICAgICAgICAgICBjYXJkLW5vZGU9IltbX25vZGVdXSIKICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLW5vZGU9IltbaXRlbS5ub2RlXV0iCiAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS1yZW5kZXItaW5mbz0iW1tpdGVtLnJlbmRlckluZm9dXSIKICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lPSJbW2l0ZW0ubmFtZV1dIgogICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0tdHlwZT0ic3VjY2Vzc29ycyIKICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvci1ieT0iW1tjb2xvckJ5XV0iCiAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGUtaW5kZXg9IltbX3RlbXBsYXRlSW5kZXhdXSIKICAgICAgICAgICAgICAgICAgICAgICAgPgogICAgICAgICAgICAgICAgICAgICAgICA8L3RmLW5vZGUtbGlzdC1pdGVtPgogICAgICAgICAgICAgICAgICAgICAgPC90ZW1wbGF0ZT4KICAgICAgICAgICAgICAgICAgICA8L2lyb24tbGlzdD4KICAgICAgICAgICAgICAgICAgPC90ZW1wbGF0ZT4KICAgICAgICAgICAgICAgIDwvaXJvbi1jb2xsYXBzZT4KIC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pdiBjbGFzcz0ic3ViLWxpc3QtdGFibGUtY2VsbCI+CiAgICAgICAgICAgICAgICAgICAgICBbW19ub2RlU3RhdHNGb3JtYXR0ZWRDb21wdXRlVGltZV1dCiAgICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgPC90ZW1wbGF0ZT4KICAgICAgICAgICAgICAgIDx0ZW1wbGF0ZSBpcz0iZG9tLWlmIiBpZj0ie3tfbm9kZVN0YXRzLm91dHB1dFNpemV9fSI+CiAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InN1Yi1saXN0LXRhYmxlLXJvdyI+CiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0ic3ViLWxpc3QtdGFibGUtY2VsbCI+VGVuc29yIE91dHB1dCBTaXplczwvZGl2PgogICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InN1Yi1saXN0LXRhYmxlLWNlbGwiPgogICAgICAgICAgICAgICAgICAgICAgPHRlbXBsYXRlCiAgICAgICAgICAgICAgICAgICAgICAgIGlzPSJkb20tcmVwZWF0IgogICAgICAgICAgICAgICAgICAgICAgICBpdGVtcz0ie3tfbm9kZVN0YXRzRm9ybWF0dGVkT3V0cHV0U2l6ZXN9fSIKICAgICAgICAgICAgICAgICAgICAgID4KICAgICAgICAgICAgICAgICAgICAgICAgW1tpdGVtXV0gPGJyIC8+CiAgICAgICAgICAgICAgICAgICAgICA8L3RlbXBsYXRlPgogICAgICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgIDwvdGVtcGxhdGU+CiAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgPC90ZW1wbGF0ZT4KCiAgICAgICAgICA8dGVtcGxhdGUgaXM9ImRvbS1pZiIgaWY9IltbX2Z1bmN0aW9uVXNhZ2VzLmxlbmd0aF1dIj4KICAgICAgICAgICAgPGRpdiBjbGFzcz0ic3ViLWxpc3QtZ3JvdXAgcHJlZGVjZXNzb3JzIj4KICAgICAgICAgICAgICBVc2FnZXMgb2YgdGhlIEZ1bmN0aW9uICg8c3Bhbj5bW19mdW5jdGlvblVzYWdlcy5sZW5ndGhdXTwvc3Bhbj4pCiAgICAgICAgICAgICAgPGlyb24tbGlzdAogICAgICAgICAgICAgICAgY2xhc3M9InN1Yi1saXN0IgogICAgICAgICAgICAgICAgaWQ9ImZ1bmN0aW9uVXNhZ2VzTGlzdCIKICAgICAgICAgICAgICAgIGl0ZW1zPSJbW19mdW5jdGlvblVzYWdlc11dIgogICAgICAgICAgICAgID4KICAgICAgICAgICAgICAgIDx0ZW1wbGF0ZT4KICAgICAgICAgICAgICAgICAgPHRmLW5vZGUtbGlzdC1pdGVtCiAgICAgICAgICAgICAgICAgICAgY2xhc3M9Im5vbi1jb250cm9sLWxpc3QtaXRlbSIKICAgICAgICAgICAgICAgICAgICBjYXJkLW5vZGU9IltbX25vZGVdXSIKICAgICAgICAgICAgICAgICAgICBpdGVtLW5vZGU9IltbaXRlbV1dIgogICAgICAgICAgICAgICAgICAgIG5hbWU9IltbaXRlbS5uYW1lXV0iCiAgICAgICAgICAgICAgICAgICAgaXRlbS10eXBlPSJmdW5jdGlvblVzYWdlcyIKICAgICAgICAgICAgICAgICAgICBjb2xvci1ieT0iW1tjb2xvckJ5XV0iCiAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGUtaW5kZXg9IltbX3RlbXBsYXRlSW5kZXhdXSIKICAgICAgICAgICAgICAgICAgPgogICAgICAgICAgICAgICAgICA8L3RmLW5vZGUtbGlzdC1pdGVtPgogICAgICAgICAgICAgICAgPC90ZW1wbGF0ZT4KICAgICAgICAgICAgICA8L2lyb24tbGlzdD4KICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICA8L3RlbXBsYXRlPgoKICAgICAgICAgIDx0ZW1wbGF0ZSBpcz0iZG9tLWlmIiBpZj0iW1shX2lzTGlicmFyeUZ1bmN0aW9uKF9ub2RlKV1dIj4KICAgICAgICAgICAgPGRpdiBjbGFzcz0idG9nZ2xlLWluY2x1ZGUtZ3JvdXAiPgogICAgICAgICAgICAgIDxwYXBlci1idXR0b24KICAgICAgICAgICAgICAgIHJhaXNlZAogICAgICAgICAgICAgICAgY2xhc3M9InRvZ2dsZS1pbmNsdWRlIgogICAgICAgICAgICAgICAgb24tY2xpY2s9Il90b2dnbGVJbmNsdWRlIgogICAgICAgICAgICAgID4KICAgICAgICAgICAgICAgIDxzcGFuPltbX2F1eEJ1dHRvblRleHRdXTwvc3Bhbj4KICAgICAgICAgICAgICA8L3BhcGVyLWJ1dHRvbj4KICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICA8L3RlbXBsYXRlPgoKICAgICAgICAgIDx0ZW1wbGF0ZSBpcz0iZG9tLWlmIiBpZj0ie3tfaXNJblNlcmllcyhfbm9kZSl9fSI+CiAgICAgICAgICAgIDxkaXYgY2xhc3M9InRvZ2dsZS1pbmNsdWRlLWdyb3VwIj4KICAgICAgICAgICAgICA8cGFwZXItYnV0dG9uCiAgICAgICAgICAgICAgICByYWlzZWQKICAgICAgICAgICAgICAgIGNsYXNzPSJ0b2dnbGUtaW5jbHVkZSIKICAgICAgICAgICAgICAgIG9uLWNsaWNrPSJfdG9nZ2xlR3JvdXAiCiAgICAgICAgICAgICAgPgogICAgICAgICAgICAgICAgPHNwYW4+W1tfZ3JvdXBCdXR0b25UZXh0XV08L3NwYW4+CiAgICAgICAgICAgICAgPC9wYXBlci1idXR0b24+CiAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgPC90ZW1wbGF0ZT4KICAgICAgICA8L2Rpdj4KICAgICAgPC90ZW1wbGF0ZT4KICAgIDwvaXJvbi1jb2xsYXBzZT4KICBgOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoeyB0eXBlOiBTdHJpbmcgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVz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HlwZTogT2JqZWN0LAogICAgICAgICAgICBjb21wdXRlZDogJ19nZXROb2RlU3RhdHMoZ3JhcGhOb2RlTmFtZSwgZ3JhcGhIaWVyYXJjaHkpJywKICAgICAgICAgICAgb2JzZXJ2ZXI6ICdfcmVzZXRTdGF0ZScsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBPYmplY3QpCiAgICBdLCBUZk5vZGVJbmZvLnByb3RvdHlwZSwgIl9ub2RlU3RhdHMiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBOdW1iZXIsCiAgICAgICAgICAgIG9ic2VydmVyOiAnX25vZGVJbmNsdWRlU3RhdGVDaGFuZ2VkJywKICAgICAgICB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIE51bWJlcikKICAgIF0sIFRmTm9kZUluZm8ucHJvdG90eXBlLCAibm9kZUluY2x1ZGUiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBCb29sZWFuLAogICAgICAgIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgQm9vbGVhbikKICAgIF0sIFRmTm9kZUluZm8ucHJvdG90eXBlLCAiX2V4cGFuZGVkIiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsKICAgICAgICAgICAgdHlwZTogQm9vbGVhbiwKICAgICAgICB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIEJvb2xlYW4pCiAgICBdLCBUZk5vZGVJbmZvLnByb3RvdHlwZSwgIl9vcGVuZWRDb250cm9sUHJlZCIsIHZvaWQgMCk7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7CiAgICAgICAgICAgIHR5cGU6IEJ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mCiAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyhub2RlTmFtZXNUb0hlYWx0aFBpbGxzKS5sZW5ndGggPiAwKTsKICAgICAgICB9CiAgICAgICAgX2VxdWFscyhhLCBiKSB7CiAgICAgICAgICAgIHJldHVybiBhID09PSBiOwogICAgICAgIH0KICAgIH07CiAgICBUZkdyYXBoSW5mby50ZW1wbGF0ZSA9IGh0bWwgYAogICAgPHN0eWxlPgogICAgICA6aG9zdCB7CiAgICAgICAgZm9udC1zaXplOiAxMnB4OwogICAgICAgIG1hcmdpbjogMDsKICAgICAgICBwYWRkaW5nOiAwOwogICAgICAgIGRpc3BsYXk6IGJsb2NrOwogICAgICAgIG1heC1oZWlnaHQ6IDY1MHB4OwogICAgICAgIG92ZXJmbG93LXg6IGhpZGRlbjsKICAgICAgICBvdmVyZmxvdy15OiBhdXRvOwogICAgICB9CgogICAgICBoMiB7CiAgICAgICAgcGFkZGluZzogMDsKICAgICAgICB0ZXh0LWFsaWduOiBjZW50ZXI7CiAgICAgICAgbWFyZ2luOiAwOwogICAgICB9CiAgICA8L3N0eWxlPgogICAgPHRlbXBsYXRlIGlzPSJkb20taWYiIGlmPSJ7e3NlbGVjdGVkTm9kZX19Ij4KICAgICAgPHBhcGVyLW1hdGVyaWFsIGVsZXZhdGlvbj0iMSIgY2xhc3M9ImNhcmQiPgogICAgICAgIDx0Zi1ub2RlLWluZm8KICAgICAgICAgIGdyYXBoLWhpZXJhcmNoeT0iW1tncmFwaEhpZXJhcmNoeV1dIgogICAgICAgICAgcmVuZGVyLWhpZXJhcmNoeT0iW1tyZW5kZXJIaWVyYXJjaHldXSIKICAgICAgICAgIGZsYXQtZ3JhcGg9IltbZ3JhcGhdXSIKICAgICAgICAgIGdyYXBoLW5vZGUtbmFtZT0iW1tzZWxlY3RlZE5vZGVdXSIKICAgICAgICAgIG5vZGUtaW5jbHVkZT0iW1tzZWxlY3RlZE5vZGVJbmNsdWRlXV0iCiAgICAgICAgICBoaWdobGlnaHRl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YXRlKFsKICAgICAgICBwcm9wZXJ0eSh7CiAgICAgICAgICAgIHR5cGU6IFN0cmluZywKICAgICAgICAgICAgbm90aWZ5OiB0cnVlLAogICAgICAgIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgU3RyaW5nKQogICAgXSwgVGZHcmFwaEluZm8ucHJvdG90eXBlLCAic2VsZWN0ZWROb2RlIiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsKICAgICAgICAgICAgdHlwZTogU3RyaW5nLAogICAgICAgICAgICBub3RpZnk6IHRydWUsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBTdHJpbmcpCiAgICBdLCBUZkdyYXBoSW5mby5wcm90b3R5cGUsICJoaWdobGlnaHRlZE5vZGUiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBOdW1iZXIsCiAgICAgICAgICAgIG5vdGlmeTogdHJ1ZSwKICAgICAgICB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIE51bWJlcikKICAgIF0sIFRmR3JhcGhJbmZvLnByb3RvdHlwZSwgInNlbGVjdGVkTm9kZUluY2x1ZGUiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoeyB0eXBlOiBCb29sZWFuIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgQm9vbGVhbikKICAgIF0sIFRmR3JhcGhJbmZvLnByb3RvdHlwZSwgImRlYnVnZ2VyRGF0YUVuYWJsZWQiLCB2b2lkIDApOwogICAgVGZHcmFwaEluZm8gPSBfX2RlY29yYXRlKFsKICAgICAgICBjdXN0b21FbGVtZW50KCd0Zi1ncmFwaC1pbmZvJykKICAgIF0sIFRmR3JhcGhJbmZvKTsKCiAgICAvKiB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BjdXJyZW50bHkgem9vbWVkL3Bhbm5lZCB2aWV3cG9pbnQuCiAgICAgICAgICAgIGxldCAkbWluaW1hcFN2ZyA9ICRzaGFkb3dSb290LnNlbGVjdCgnc3ZnJyk7CiAgICAgICAgICAgIC8vIE1ha2UgdGhlIHZpZXdwb2ludCByZWN0YW5nbGUgZHJhZ2dhYmxlLgogICAgICAgICAgICBsZXQgJHZpZXdwb2ludCA9ICRtaW5pbWFwU3ZnLnNlbGVjdCgncmVjdCcpOwogICAgICAgICAgICBsZXQgZHJhZ21vdmUgPSAoZCkgPT4gewogICAgICAgICAgICAgICAgdGhpcy52aWV3cG9pbnRDb29yZC54ID0gZXZlbnQueDsKICAgICAgICAgICAgICAgIHRoaXMudmlld3BvaW50Q29vcmQueSA9IGV2ZW50Lnk7CiAgICAgICAgICAgICAgICB0aGlzLnVwZGF0ZVZpZXdwb2ludCgpOwogICAgICAgICAgICB9OwogICAgICAgICAgICB0aGlzLnZpZXdwb2ludENvb3JkID0geyB4OiAwLCB5OiAwIH07CiAgICAgICAgICAgIGxldCBkcmFnJDEgPSBkcmFnKCkuc3ViamVjdChPYmplY3QpLm9uKCdkcmFnJywgZHJhZ21vdmUpOwogICAgICAgICAgICAkdmlld3BvaW50LmRhdHVtKHRoaXMudmlld3BvaW50Q29vcmQpLmNhbGwoZHJhZyQxKTsKICAgICAgICAgICAgLy8gTWFrZSB0aGUgbWluaW1hcCBjbGlja2FibGUuCiAgICAgICAgICAgICRtaW5pbWFwU3ZnLm9uKCdjbGljaycsICgpID0+IHsKICAgICAgICAgICAgICAgIGlmIChldmVudC5kZWZhdWx0UHJldmVudGVkKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gVGhpcyBjbGljayB3YXMgcGFydCBvZiBhIGRyYWcgZXZlbnQsIHNvIHN1cHByZXNzIGl0LgogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vIFVwZGF0ZSB0aGUgY29vcmRpbmF0ZXMgb2YgdGhlIHZpZXdwb2ludC4KICAgICAgICAgICAgICAgIGxldCB3aWR0aCA9IE51bWJlcigkdmlld3BvaW50LmF0dHIoJ3dpZHRoJykpOwogICAgICAgICAgICAgICAgbGV0IGhlaWdodCA9IE51bWJlcigkdmlld3BvaW50LmF0dHIoJ2hlaWdodCcpKTsKICAgICAgICAgICAgICAgIGxldCBjbGlja0Nvb3JkcyA9IG1vdXNlKCRtaW5pbWFwU3ZnLm5vZGUoKSk7CiAgICAgICAgICAgICAgICB0aGlzLnZpZXdwb2ludENvb3JkLnggPSBjbGlja0Nvb3Jkc1swXSAtIHdpZHRoIC8gMjsKICAgICAgICAgICAgICAgIHRoaXMudmlld3BvaW50Q29vcmQueSA9IGNsaWNrQ29vcmRzWzFdIC0gaGVpZ2h0IC8gMjsKICAgICAgICAgICAgICAgIHRoaXMudXBkYXRlVmlld3BvaW50KCk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICB0aGlzLnZpZXdwb2ludCA9ICR2aWV3cG9pbnQubm9kZSgpOwogICAgICAgICAgICB0aGlzLm1pbmltYXBTdmcgPSAkbWluaW1hcFN2Zy5ub2RlKCk7CiAgICAgICAgICAgIHRoaXMubWluaW1hcCA9IG1pbmltYXA7CiAgICAgICAgICAgIHRoaXMuY2FudmFzID0gJHNoYWRvd1Jvb3Quc2VsZWN0KCdjYW52YXMuZmlyc3QnKS5ub2RlKCk7CiAgICAgICAgICAgIHRoaXMuY2FudmFzQnVmZmVyID0gKCRzaGFkb3dSb290LnNlbGVjdCgnY2FudmFzLnNlY29uZCcpLm5vZGUoKSk7CiAgICAgICAgICAgIHRoaXMuZG93bmxvYWRDYW52YXMgPSAoJHNoYWRvd1Jvb3Quc2VsZWN0KCdjYW52YXMuZG93bmxvYWQnKS5ub2RlKCkpOwogICAgICAgICAgICBzZWxlY3QodGhpcy5kb3dubG9hZENhbnZhcykuc3R5bGUoJ2Rpc3BsYXknLCAnbm9uZScpOwogICAgICAgICAgICB0aGlzLnVwZGF0ZSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBVcGRhdGVzIHRoZSBwb3NpdGlvbiBhbmQgdGhlIHNpemUgb2YgdGhlIHZpZXdwb2ludCByZWN0YW5nbGUuCiAgICAgICAgICogSXQgYWxzbyBub3RpZmllcyB0aGUgbWFpbiBzdmcgYWJvdXQgdGhlIG5ldyBwYW5uZWQgcG9zaXRpb24uCiAgICAgICAgICovCiAgICAgICAgdXBkYXRlVmlld3BvaW50KCkgewogICAgICAgICAgICAvLyBVcGRhdGUgdGhlIGNvb3JkaW5hdGVzIG9mIHRoZSB2aWV3cG9pbnQgcmVjdGFuZ2xlLgogICAgICAgICAgICBzZWxlY3QodGhpcy52aWV3cG9pbnQpCiAgICAgICAgICAgICAgICAuYXR0cigneCcsIHRoaXMudmlld3BvaW50Q29vcmQueCkKICAgICAgICAgICAgICAgIC5hdHRyKCd5JywgdGhpcy52aWV3cG9pbnRDb29yZC55KTsKICAgICAgICAgICAgLy8gVXBkYXRlIHRoZSB0cmFuc2xhdGlvbiB2ZWN0b3Igb2YgdGhlIG1haW4gc3ZnIHRvIHJlZmxlY3QgdGhlCiAgICAgICAgICAgIC8vIG5ldyB2aWV3cG9pbnQuCiAgICAgICAgICAgIGxldCBtYWluWCA9ICgtdGhpcy52aWV3cG9pbnRDb29yZC54ICogdGhpcy5zY2FsZU1haW4pIC8gdGhpcy5zY2FsZU1pbmltYXA7CiAgICAgICAgICAgIGxldCBtYWluWSA9ICgtdGhpcy52aWV3cG9pbnRDb29yZC55ICogdGhpcy5zY2FsZU1haW4pIC8gdGhpcy5zY2FsZU1pbmltYXA7CiAgICAgICAgICAgIHNlbGVjdCh0aGlzLnN2ZykuY2FsbCh0aGlzLm1haW5ab29tLnRyYW5zZm9ybSwgaWRlbnRpdHkkOS50cmFuc2xhdGUobWFpblgsIG1haW5ZKS5zY2FsZSh0aGlzLnNjYWxlTWFpbikpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZWRyYXdzIHRoZSBtaW5pbWFwLiBTaG91bGQgYmUgY2FsbGVkIHdoZW5ldmVyIHRoZSBtYWluIHN2ZwogICAgICAgICAqIHdhcyB1cGRhdGVkIChlLmcuIHdoZW4gYSBub2RlIHdhcyBleHBhbmRlZCkuCiAgICAgICAgICovCiAgICAgICAgdXBkYXRlKCkgewogICAgICAgICAgICBsZXQgc2NlbmVTaXplID0gbnVsbDsKICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgIC8vIEdldCB0aGUgc2l6ZSBvZiB0aGUgZW50aXJlIHNjZW5lLgogICAgICAgICAgICAgICAgc2NlbmVTaXplID0gdGhpcy56b29tRy5nZXRCQm94KCk7CiAgICAgICAgICAgICAgICBpZiAoc2NlbmVTaXplLndpZHRoID09PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gVGhlcmUgaXMgbm8gc2NlbmUgYW55bW9yZS4gV2UgaGF2ZSBiZWVuIGRldGFjaGVkIGZyb20gdGhlIGRvbS4KICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY2F0Y2ggKGUpIHsKICAgICAgICAgICAgICAgIC8vIEZpcmVmb3ggcHJvZHVjZWQgTlNfRVJST1JfRkFJTFVSRSBpZiB3ZSBoYXZlIGJlZW4KICAgICAgICAgICAgICAgIC8vIGRldGFjaGVkIGZyb20gdGhlIGRvbS4KICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICBsZXQgJGRvd25sb2FkID0gc2VsZWN0KCcjZ3JhcGhkb3dubG9hZCcpOwogICAgICAgICAgICB0aGlzLmRvd25sb2FkID0gJGRvd25sb2FkLm5vZGUoKTsKICAgICAgICAgICAgJGRvd25sb2FkLm9uKCdjbGljaycsIChkKSA9PiB7CiAgICAgICAgICAgICAgICAvLyBSZXZva2UgdGhlIG9sZCBVUkwsIGlmIGFueS4gVGhlbiwgZ2VuZXJhdGUgYSBuZXcgVVJMLgogICAgICAgICAgICAgICAgVVJMLnJldm9rZU9iamVjdFVSTCh0aGlzLmRvd25sb2FkLmhyZWYpOwogICAgICAgICAgICAgICAgLy8gV2UgY2FuJ3QgdXNlIHRoZSBgSFRNTENhbnZhc0VsZW1lbnQudG9CbG9iYCBBUEkgYmVjYXVzZSBpdCBkb2VzCiAgICAgICAgICAgICAgICAvLyBub3QgaGF2ZSBhIHN5bmNocm9ub3VzIHZhcmlhbnQsIGFuZCB3ZSBuZWVkIHRvIHVwZGF0ZSB0aGlzIGhyZWYKICAgICAgICAgICAgICAgIC8vIHN5bmNocm9ub3VzbHkuIEluc3RlYWQsIHdlIGNyZWF0ZSBhIGJsb2IgbWFudWFsbHkgZnJvbSB0aGUgZGF0YQogICAgICAgICAgICAgICAgLy8gVVJMLgogICAgICAgICAgICAgICAgY29uc3QgZGF0YVVybCA9IHRoaXMuZG93bmxvYWRDYW52YXMudG9EYXRhVVJMKCdpbWFnZS9wbmcnKTsKICAgICAgICAgICAgICAgIGNvbnN0IHByZWZpeCA9IGRhdGFVcmwuc2xpY2UoMCwgZGF0YVVybC5pbmRleE9mKCcsJykpOwogICAgICAgICAgICAgICAgaWYgKCFwcmVmaXguZW5kc1dpdGgoJztiYXNlNjQnKSkgewogICAgICAgICAgICAgICAgICAgIGNvbnNvbGUud2Fybihgbm9uLWJhc2U2NCBkYXRhIFVSTCAoJHtwcmVmaXh9KTsgY2Fubm90IHVzZSBibG9iIGRvd25sb2FkYCk7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5kb3dubG9hZC5ocmVmID0gZGF0YVVybDsKICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjb25zdCBkYXRhID0gYXRvYihkYXRhVXJsLnNsaWNlKGRhdGFVcmwuaW5kZXhPZignLCcpICsgMSkpOwogICAgICAgICAgICAgICAgY29uc3QgYnl0ZXMgPSBuZXcgVW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IGFueVN2Zy5nZXRSb290Tm9kZSgpCiAgICAgICAgICAgICAgICA6IHRoaXMuc3ZnLnBhcmVudE5vZGU7CiAgICAgICAgICAgIGNvbnN0IHN0eWxlU2hlZXRzID0gcm9vdE5vZGUuc3R5bGVTaGVldHM7CiAgICAgICAgICAgIGZvciAobGV0IGsgPSAwOyBrIDwgc3R5bGVTaGVldHMubGVuZ3RoOyBrKyspIHsKICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgbGV0IGNzc1J1bGVzID0gc3R5bGVTaGVldHNba10uY3NzUnVsZXMgfHwgc3R5bGVTaGVldHNba10ucnVsZXM7CiAgICAgICAgICAgICAgICAgICAgaWYgKGNzc1J1bGVzID09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgY3NzUnVsZXMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gUmVtb3ZlIHRmLSogc2VsZWN0b3JzIGZyb20gdGhlIHN0eWxlcy4KICAgICAgICAgICAgICAgICAgICAgICAgc3R5bGVzVGV4dCArPQogICAgICAgICAgICAgICAgICAgICAgICAgICAgY3NzUnVsZXNbaV0uY3NzVGV4dC5yZXBsYWNlKC8gP3RmLVtcdy1dKyA/L2csICcnKSArICdcbic7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgY2F0Y2ggKGUpIHsKICAgICAgICAgICAgICAgICAgICBpZiAoZS5uYW1lICE9PSAnU2VjdXJpdHlFcnJvcicpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgZTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gVGVtcG9yYXJpbHkgYWRkIHRoZSBjc3MgcnVsZXM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gICAgLy8gSGlkZSB0aGUgb2xkIGNhbnZhcyBhbmQgc2hvdyB0aGUgbmV3IGJ1ZmZlciBjYW52YXMuCiAgICAgICAgICAgICAgICAgICAgc2VsZWN0KHRoaXMuY2FudmFzQnVmZmVyKS5zdHlsZSgnZGlzcGxheScsIG51bGwpOwogICAgICAgICAgICAgICAgICAgIHNlbGVjdCh0aGlzLmNhbnZhcykuc3R5bGUoJ2Rpc3BsYXknLCAnbm9uZScpOwogICAgICAgICAgICAgICAgICAgIC8vIFN3YXAgdGhlIHR3byBjYW52YXNlcy4KICAgICAgICAgICAgICAgICAgICBbdGhpcy5jYW52YXMsIHRoaXMuY2FudmFzQnVmZmVyXSA9IFt0aGlzLmNhbnZhc0J1ZmZlciwgdGhpcy5jYW52YXNdOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBsZXQgZG93bmxvYWRDb250ZXh0ID0gdGhpcy5kb3dubG9hZENhbnZhcy5nZXRDb250ZXh0KCcyZCcpOwogICAgICAgICAgICAgICAgZG93bmxvYWRDb250ZXh0LmNsZWFyUmVjdCgwLCAwLCB0aGlzLmRvd25sb2FkQ2FudmFzLndpZHRoLCB0aGlzLmRvd25sb2FkQ2FudmFzLmhlaWdodCk7CiAgICAgICAgICAgICAgICBkb3dubG9hZENvbnRleHQuZHJhd0ltYWdlKGltYWdlLCAwLCAwLCB0aGlzLmRvd25sb2FkQ2FudmFzLndpZHRoLCB0aGlzLmRvd25sb2FkQ2FudmFzLmhlaWdodCk7CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIGltYWdlLm9uZXJyb3IgPSAoKSA9PiB7CiAgICAgICAgICAgICAgICBsZXQgYmxvYiA9IG5ldyBCbG9iKFtzdmdYbWxdLCB7IHR5cGU6ICdpbWFnZS9zdmcreG1sO2NoYXJzZXQ9dXRmLTgnIH0pOwogICAgICAgICAgICAgICAgaW1hZ2Uuc3JjID0gVVJMLmNyZWF0ZU9iamVjdFVSTChibG9iKTsKICAgICAgICAgIC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gICAgICAgICAgIHRoaXMuc2NhbGVNYWluID0gdHJhbnNmb3JtLms7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gVXBkYXRlIHRoZSBsb2NhdGlvbiBvZiB0aGUgdmlld3BvaW50IHJlY3RhbmdsZS4KICAgICAgICAgICAgbGV0IHN2Z1JlY3QgPSB0aGlzLnN2Zy5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKTsKICAgICAgICAgICAgbGV0ICR2aWV3cG9pbnQgPSBzZWxlY3QodGhpcy52aWV3cG9pbnQpOwogICAgICAgICAgICB0aGlzLnZpZXdwb2ludENvb3JkLnggPQogICAgICAgICAgICAgICAgKC10aGlzLnRyYW5zbGF0ZVswXSAqIHRoaXMuc2NhbGVNaW5pbWFwKSAvIHRoaXMuc2NhbGVNYWluOwogICAgICAgICAgICB0aGlzLnZpZXdwb2ludENvb3JkLnkgPQogICAgICAgICAgICAgICAgKC10aGlzLnRyYW5zbGF0ZVsxXSAqIHRoaXMuc2NhbGVNaW5pbWFwKSAvIHRoaXMuc2NhbGVNYWluOwogICAgICAgICAgICBsZXQgdmlld3BvaW50V2lkdGggPSAoc3ZnUmVjdC53aWR0aCAqIHRoaXMuc2NhbGVNaW5pbWFwKSAvIHRoaXMuc2NhbGVNYWluOwogICAgICAgICAgICBsZXQgdmlld3BvaW50SGVpZ2h0ID0gKHN2Z1JlY3QuaGVpZ2h0ICogdGhpcy5zY2FsZU1pbmltYXApIC8gdGhpcy5zY2FsZU1haW47CiAgICAgICAgICAgICR2aWV3cG9pbnQKICAgICAgICAgICAgICAgIC5hdHRyKCd4JywgdGhpcy52aWV3cG9pbnRDb29yZC54KQogICAgICAgICAgICAgICAgLmF0dHIoJ3knLCB0aGlzLnZpZXdwb2ludENvb3JkLnkpCiAgICAgICAgICAgICAgICAuYXR0cignd2lkdGgnLCB2aWV3cG9pbnRXaWR0aCkKICAgICAgICAgICAgICAgIC5hdHRyKCdoZWlnaHQnLCB2aWV3cG9pbnRIZWlnaHQpOwogICAgICAgICAgICAvLyBTaG93L2hpZGUgdGhlIG1pbmltYXAgZGVwZW5kaW5nIG9uIHRoZSB2aWV3cG9pbnQgYXJlYSBhcyBmcmFjdGlvbiBvZiB0aGUKICAgICAgICAgICAgLy8gd2hvbGUgbWluaW1hcC4KICAgICAgICAgICAgbGV0IG1hcFdpZHRoID0gdGhpcy5taW5pbWFwU2l6ZS53aWR0aDsKICAgICAgICAgICAgbGV0IG1hcEhlaWdodCA9IHRoaXMubWluaW1hcFNpemUuaGVpZ2h0OwogICAgICAgICAgICBsZXQgeCA9IHRoaXMudmlld3BvaW50Q29vcmQueDsKICAgICAgICAgICAgbGV0IHkgPSB0aGlzLnZpZXdwb2ludENvb3JkLnk7CiAgICAgICAgICAgIGxldCB3ID0gTWF0aC5taW4oTWF0aC5tYXgoMCwgeCArIHZpZXdwb2ludFdpZHRoKSwgbWFwV2lkdGgpIC0KICAgICAgICAgICAgICAgIE1hdGgubWluKE1hdGgubWF4KDAsIHgpLCBtYXBXaWR0aCk7CiAgICAgICAgICAgIGxldCBoID0gTWF0aC5taW4oTWF0aC5tYXgoMCwgeSArIHZpZXdwb2ludEhlaWdodCksIG1hcEhlaWdodCkgLQogICAgICAgICAgICAgICAgTWF0aC5taW4oTWF0aC5tYXgoMCwgeSksIG1hcEhlaWdodCk7CiAgICAgICAgICAgIGxldCBmcmFjSW50ZXJzZWN0ID0gKHcgKiBoKSAvIChtYXBXaWR0aCAqIG1hcEhlaWdodCk7CiAgICAgICAgICAgIGlmIChmcmFjSW50ZXJzZWN0IDwgRlJBQ19WSUVXUE9JTlRfQVJFQSkgewogICAgICAgICAgICAgICAgdGhpcy5taW5pbWFwLmNsYXNzTGlzdC5yZW1vdmUoJ2hpZGRlbicpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5taW5pbWFwLmNsYXNzTGlzdC5hZGQoJ2hpZGRlbicpOwogICAgICAgICAgICB9CiAgICAgICAgfQogIC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ogbm9uZTsKICAgICAgfQoKICAgICAgY2FudmFzIHsKICAgICAgICBib3JkZXI6IDFweCBzb2xpZCAjOTk5OwogICAgICB9CgogICAgICByZWN0IHsKICAgICAgICBmaWxsOiB3aGl0ZTsKICAgICAgICBzdHJva2U6ICMxMTExMTE7CiAgICAgICAgc3Ryb2tlLXdpZHRoOiAxcHg7CiAgICAgICAgZmlsbC1vcGFjaXR5OiAwOwogICAgICAgIGZpbHRlcjogdXJsKCNtaW5pbWFwRHJvcFNoYWRvdyk7CiAgICAgICAgY3Vyc29yOiBtb3ZlOwogICAgICB9CgogICAgICBzdmcgewogICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTsKICAgICAgfQogICAgPC9zdHlsZT4KICAgIDxzdmc+CiAgICAgIDxkZWZzPgogICAgICAgIDxmaWx0ZXIKICAgICAgICAgIGlkPSJtaW5pbWFwRHJvcFNoYWRvdyIKICAgICAgICAgIHg9Ii0yMCUiCiAgICAgICAgICB5PSItMjAlIgogICAgICAgICAgd2lkdGg9IjE1MCUiCiAgICAgICAgICBoZWlnaHQ9IjE1MCUiCiAgICAgICAgPgogICAgICAgICAgPGZlT2Zmc2V0IHJlc3VsdD0ib2ZmT3V0IiBpbj0iU291cmNlR3JhcGhpYyIgZHg9IjEiIGR5PSIxIj48L2ZlT2Zmc2V0PgogICAgICAgICAgPGZlQ29sb3JNYXRyaXgKICAgICAgICAgICAgcmVzdWx0PSJtYXRyaXhPdXQiCiAgICAgICAgICAgIGluPSJvZmZPdXQiCiAgICAgICAgICAgIHR5cGU9Im1hdHJpeCIKICAgICAgICAgICAgdmFsdWVzPSIwLjEgMCAwIDAgMCAwIDAuMSAwIDAgMCAwIDAgMC4xIDAgMCAwIDAgMCAwLjUgMCIKICAgICAgICAgID48L2ZlQ29sb3JNYXRyaXg+CiAgICAgICAgICA8ZmVHYXVzc2lhbkJsdXIKICAgICAgICAgICAgcmVzdWx0PSJibHVyT3V0IgogICAgICAgICAgICBpbj0ibWF0cml4T3V0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W9uLmNvbnN0YW50ID4gLmFubm90YXRpb24tbm9kZSA+ICogewogICAgICBzdHJva2Utd2lkdGg6IDE7CiAgICAgIHN0cm9rZS1kYXNoYXJyYXk6IG5vbmU7CiAgICB9CgogICAgLmFubm90YXRpb24gPiAuYW5ub3RhdGlvbi1lZGdlIHsKICAgICAgZmlsbDogbm9uZTsKICAgICAgc3Ryb2tlOiAjYWFhOwogICAgICBzdHJva2Utd2lkdGg6IDAuNTsKICAgICAgbWFya2VyLWVuZDogdXJsKCNhbm5vdGF0aW9uLWFycm93aGVhZCk7CiAgICB9CgogICAgLmZhZGVkIC5hbm5vdGF0aW9uID4gLmFubm90YXRpb24tZWRnZSB7CiAgICAgIG1hcmtlci1lbmQ6IHVybCgjYW5ub3RhdGlvbi1hcnJvd2hlYWQtZmFkZWQpOwogICAgfQoKICAgIC5hbm5vdGF0aW9uID4gLmFubm90YXRpb24tZWRnZS5yZWZsaW5lIHsKICAgICAgbWFya2VyLXN0YXJ0OiB1cmwoI3JlZi1hbm5vdGF0aW9uLWFycm93aGVhZCk7CiAgICB9CgogICAgLmZhZGVkIC5hbm5vdGF0aW9uID4gLmFubm90YXRpb24tZWRnZS5yZWZsaW5lIHsKICAgICAgbWFya2VyLXN0YXJ0OiB1cmwoI3JlZi1hbm5vdGF0aW9uLWFycm93aGVhZC1mYWRlZCk7CiAgICB9CgogICAgLmFubm90YXRpb24gPiAuYW5ub3RhdGlvbi1jb250cm9sLWVkZ2UgewogICAgICBzdHJva2UtZGFzaGFycmF5OiAxLCAxOwogICAgfQoKICAgICNhbm5vdGF0aW9uLWFycm93aGVhZCB7CiAgICAgIGZpbGw6ICNhYWE7CiAgICB9CgogICAgI2Fubm90YXRpb24tYXJyb3doZWFkLWZhZGVkIHsKICAgICAgZmlsbDogI2UwZDRiMzsKICAgIH0KCiAgICAjcmVmLWFubm90YXRpb24tYXJyb3doZWFkIHsKICAgICAgZmlsbDogI2FhYTsKICAgIH0KCiAgICAjcmVmLWFubm90YXRpb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CiAgICAgICAgPHVzZSB4bGluazpocmVmPSIjcmVmZXJlbmNlLWFycm93aGVhZC1wYXRoIj48L3VzZT4KICAgICAgPC9tYXJrZXI+CiAgICAgIDxtYXJrZXIKICAgICAgICBjbGFzcz0icmVmZXJlbmNlLWFycm93aGVhZCIKICAgICAgICBpZD0icmVmZXJlbmNlLWFycm93aGVhZC1sYXJnZSIKICAgICAgICB2aWV3Qm94PSIwIDAgMTAgMTAiCiAgICAgICAgbWFya2VyV2lkdGg9IjE2IgogICAgICAgIG1hcmtlckhlaWdodD0iMTYiCiAgICAgICAgcmVmWD0iMiIKICAgICAgICByZWZZPSI1IgogICAgICAgIG9yaWVudD0iYXV0by1zdGFydC1yZXZlcnNlIgogICAgICAgIG1hcmtlclVuaXRzPSJ1c2VyU3BhY2VPblVzZSIKICAgICAgPgogICAgICAgIDx1c2UgeGxpbms6aHJlZj0iI3JlZmVyZW5jZS1hcnJvd2hlYWQtcGF0aCI+PC91c2U+CiAgICAgIDwvbWFya2VyPgogICAgICA8bWFya2VyCiAgICAgICAgY2xhc3M9InJlZmVyZW5jZS1hcnJvd2hlYWQiCiAgICAgICAgaWQ9InJlZmVyZW5jZS1hcnJvd2hlYWQteGxhcmdlIgogICAgICAgIHZpZXdCb3g9IjAgMCAxMCAxMCIKICAgICAgICBtYXJrZXJXaWR0aD0iMjAiCiAgICAgICAgbWFya2VySGVpZ2h0PSIyMCIKICAgICAgICByZWZYPSIyIgogICAgICAgIHJlZlk9IjUiCiAgICAgICAgb3JpZW50PSJhdXRvLXN0YXJ0LXJldmVyc2UiCiAgICAgICAgbWFya2VyVW5pdHM9InVzZXJTcGFjZU9uVXNlIgogICAgICA+CiAgICAgICAgPHVzZSB4bGluazpocmVmPSIjcmVmZXJlbmNlLWFycm93aGVhZC1wYXRoIj48L3VzZT4KICAgICAgPC9tYXJrZXI+CgogICAgICA8IS0tIEFycm93IGhlYWRzIGZvciBkYXRhZmxvdyBlZGdlIHBhdGhzIG9mIGRpZmZlcmVudCBwcmVkZWZpbmVkIHNpemVzIHBlciBjb2xvci4gLS0+CiAgICAgIDxwYXRoCiAgICAgICAgaWQ9ImRhdGFmbG93LWFycm93aGVhZC1wYXRoIgogICAgICAgIGQ9Ik0gMCwwIEwgMTAsNSBMIDAsMTAgQyAzLDcgMywzIDAsMCIKICAgICAgPjwvcGF0aD4KICAgICAgPG1hcmtlcgogICAgICAgIGNsYXNzPSJkYXRhZmxvdy1hcnJvd2hlYWQiCiAgICAgICAgaWQ9ImRhdGFmbG93LWFycm93aGVhZC1zbWFsbCIKICAgICAgICB2aWV3Qm94PSIwIDAgMTAgMTAiCiAgICAgICAgbWFya2VyV2lkdGg9IjUiCiAgICAgICAgbWFya2VySGVpZ2h0PSI1IgogICAgICAgIHJlZlg9IjIiCiAgICAgICAgcmVmWT0iNSIKICAgICAgICBvcmllbnQ9ImF1dG8tc3RhcnQtcmV2ZXJzZSIKICAgICAgICBtYXJrZXJVbml0cz0idXNlclNwYWNlT25Vc2UiCiAgICAgID4KICAgICAgICA8dXNlIHhsaW5rOmhyZWY9IiNkYXRhZmxvdy1hcnJvd2hlYWQtcGF0aCI+PC91c2U+CiAgICAgIDwvbWFya2VyPgogICAgICA8bWFya2VyCiAgICAgICAgY2xhc3M9ImRhdGFmbG93LWFycm93aGVhZCIKICAgICAgICBpZD0iZGF0YWZsb3ctYXJyb3doZWFkLW1lZGl1bSIKICAgICAgICB2aWV3Qm94PSIwIDAgMTAgMTAiCiAgICAgICAgbWFya2VyV2lkdGg9IjEzIgogICAgICAgIG1hcmtlckhlaWdodD0iMTMiCiAgICAgICAgcmVmWD0iMiIKICAgICAgICByZWZZPSI1IgogICAgICAgIG9yaWVudD0iYXV0by1zdGFydC1yZXZlcnNlIgogICAgICAgIG1hcmtlclVuaXRzPSJ1c2VyU3BhY2VPblVzZSIKICAgICAgPgogICAgICAgIDx1c2UgeGxpbms6aHJlZj0iI2RhdGFmbG93LWFycm93aGVhZC1wYXRoIj48L3VzZT4KICAgICAgPC9tYXJrZXI+CiAgICAgIDxtYXJrZXIKICAgICAgICBjbGFzcz0iZGF0YWZsb3ctYXJyb3doZWFkIgogICAgICAgIGlkPSJkYXRhZmxvdy1hcnJvd2hlYWQtbGFyZ2UiCiAgICAgICAgdmlld0JveD0iMCAwIDEwIDEwIgogICAgICAgIG1hcmtlcldpZHRoPSIxNiIKICAgICAgICBtYXJrZXJIZWlnaHQ9IjE2IgogICAgICAgIHJlZlg9IjIiCiAgICAgICAgcmVmWT0iNSIKICAgICAgICBvcmllbnQ9ImF1dG8tc3RhcnQtcmV2ZXJzZSIKICAgICAgICBtYXJrZXJVbml0cz0idXNlclNwYWNlT25Vc2UiCiAgICAgID4KICAgICAgICA8dXNlIHhsaW5rOmhyZWY9IiNkYXRhZmxvdy1hcnJvd2hlYWQtcGF0aCI+PC91c2U+CiAgICAgIDwvbWFya2VyPgogICAgICA8bWFya2VyCiAgICAgICAgY2xhc3M9ImRhdGFmbG93LWFycm93aGVhZCIKICAgICAgICBpZD0iZGF0YWZsb3ctYXJyb3doZWFkLXhsYXJnZSIKICAgICAgICB2aWV3Qm94PSIwIDAgMTAgMTAiCiAgICAgICAgbWFya2VyV2lkdGg9IjIwIgogICAgICAgIG1hcmtlckhlaWdodD0iMjAiCiAgICAgICAgcmVmWD0iMiIKICAgICAgICByZWZZPSI1IgogICAgICAgIG9yaWVudD0iYXV0by1zdGFydC1yZXZlcnNlIgogICAgICAgIG1hcmtlclVuaXRzPSJ1c2VyU3BhY2VPblVzZSIKICAgICAgPgogICAgICAgIDx1c2UgeGxpbms6aHJlZj0iI2RhdGFmbG93LWFycm93aGVhZC1wYXRoIj48L3VzZT4KICAgICAgPC9tYXJrZXI+CgogICAgICA8IS0tIEFycm93IGhlYWQgZm9yIGFubm90YXRpb24gZWRnZSBwYXRocy4gLS0+CiAgICAgIDxtYXJrZXIKICAgICAgICBpZD0iYW5ub3RhdGlvbi1hcnJvd2hlYWQiCiAgICAgICAgbWFya2VyV2lkdGg9IjUiCiAgICAgICAgbWFya2VySGVpZ2h0PSI1IgogICAgICAgIHJlZlg9IjUiCiAgICAgICAgcmVmWT0iMi41IgogICAgICAgIG9yaWVudD0iYXV0byIKICAgICAgPgogICAgICAgIDxwYXRoIGQ9Ik0gMCwwIEwgNSwyLjUgTCAwLDUgTCAwLDAiPjwvcGF0aD4KICAgICAgPC9tYXJrZXI+CiAgICAgIDxtYXJrZXIKICAgICAgICBpZD0iYW5ub3RhdGlvbi1hcnJvd2hlYWQtZmFkZWQiCiAgICAgICAgbWFya2VyV2lkdGg9IjUiCiAgICAgICAgbWFya2VySGVpZ2h0PSI1IgogICAgICAgIHJlZlg9IjUiCiAgICAgICAgcmVmWT0iMi41IgogICAgICAgIG9yaWVudD0iYXV0byIKICAgICAgPgogICAgICAgIDxwYXRoIGQ9Ik0gMCwwIEwgNSwyLjUgTCAwLDUgTCAwLDAiPjwvcGF0aD4KICAgICAgPC9tYXJrZXI+CiAgICAgIDxtYXJrZXIKICAgICAgICBpZD0icmVmLWFubm90YXRpb24tYXJyb3doZWFkIgogICAgICAgIG1hcmtlcldpZHRoPSI1IgogICAgICAgIG1hcmtlckhlaWdodD0iNSIKICAgICAgICByZWZYPSIwIgogICAgICAgIHJlZlk9IjIuNSIKICAgICAgICBvcmllbnQ9ImF1dG8iCiAgICAgID4KICAgICAgICA8cGF0aCBkPSJNIDUsMCBMIDAsMi41IEwgNSw1IEwgNSwwIj48L3BhdGg+CiAgICAgIDwvbWFya2VyPgogICAgICA8bWFya2VyCiAgICAgICAgaWQ9InJlZi1hbm5vdGF0aW9uLWFycm93aGVhZC1mYWRlZCIKICAgICAgICBtYXJrZXJXaWR0aD0iNSIKICAgICAgICBtYXJrZXJIZWlnaHQ9IjUiCiAgICAgICAgcmVmWD0iMCIKICAgICAgICByZWZZPSIyLjUiCiAgICAgICAgb3JpZW50PSJhdXRvIgogICAgICA+CiAgICAgICAgPHBhdGggZD0iTSA1LDAgTCAwLDIuNSBMIDUsNSBMIDUsMCI+PC9wYXR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CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBLZWVwcyB0cmFjayBvZiB0aGUgc3RhcnRpbmcgY29vcmRpbmF0ZXMgb2YgYSBncmFwaCB6b29tL3Bhbi4KICAgICAgICAgICAgICoKICAgICAgICAgICAgICogQHByaXZhdGUge3t4OiBudW1iZXIsIHk6IG51bWJlcn0/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fem9vbVN0YXJ0Q29vcmRzID0gbnVsbDsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEtlZXBzIHRyYWNrIG9mIHRoZSBjdXJyZW50IGNvb3JkaW5hdGVzIG9mIGEgZ3JhcGggem9vbS9wYW4KICAgICAgICAgICAgICoKICAgICAgICAgICAgICogQHByaXZhdGUge3t4OiBudW1iZXIsIHk6IG51bWJlcn0/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fem9vbVRyYW5zZm9ybSA9IG51bGw7CiAgICAgICAgICAgIC8qKiBNYXhpbXVtIGRpc3RhbmNlIG9mIGEgem9vbSBldmVudCBmb3IgaXQgdG8gYmUgaW50ZXJwcmV0ZWQgYXMgYSBjbGljayAqLwogICAgICAgICAgICB0aGlzLl9tYXhab29tRGlzdGFuY2VGb3JDbGljayA9IDIwOwogICAgICAgICAgICAvKgogICAgICAgICAgICAgKiBEaWN0aW9uYXJ5IGZvciBlYXNpbHkgc3R5bGl6aW5nIG5vZGVzIHdoZW4gc3RhdGUgY2hhbmdlcy4KICAgICAgICAgICAgICogX25vZGVHcm91cEluZGV4W25vZGVOYW1lXSA9IGQzX3NlbGVjdGlvbiBvZiB0aGUgbm9kZUdyb3VwCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9ub2RlR3JvdXBJbmRleCA9IHt9OwogICAgICAgICAgICAvKgogICAgICAgICAgICAgKiBEaWN0aW9uYXJ5IGZvciBlYXNpbHkgc3R5bGl6aW5nIGFubm90YXRpb24gbm9kZXMgd2hlbiBzdGF0ZSBjaGFuZ2VzLgogICAgICAgICAgICAgKiBfYW5ub3RhdGlvbkdyb3VwSW5kZXhbbm9kZU5hbWVdW2hvc3ROb2RlTmFtZV0gPQogICAgICAgICAgICAgKiAgIGQzX3NlbGVjdGlvbiBvZiB0aGUgYW5ub3RhdGlvbkdyb3VwCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9hbm5vdGF0aW9uR3JvdXBJbmRleCA9IHt9OwogICAgICAgICAgICAvKgogICAgICAgICAgICAgKiBEaWN0aW9uYXJ5IGZvciBlYXNpbHkgc3R5bGl6aW5nIGVkZ2VzIHdoZW4gc3RhdGUgY2hhbmdlcy4KICAgICAgICAgICAgICogX2VkZ2VHcm91cEluZGV4W2VkZ2VOYW1lXSA9IGQzX3NlbGVjdGlvbiBvZiB0aGUgZWRnZUdyb3VwCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9lZGdlR3JvdXBJbmRleCA9IHt9OwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogTWF4IGZvbnQgc2l6ZSBmb3IgbWV0YW5vZGUgbGFiZWwgc3RyaW5ncy4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMubWF4TWV0YW5vZGVMYWJlbExlbmd0aEZvbnRTaXplID0gOTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIE1pbiBmb250IHNpemUgZm9yIG1ldGFub2RlIGxhYmVsIHN0cmluZ3MuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLm1pbk1ldGFub2RlTGFiZWxMZW5ndGhGb250U2l6ZSA9IDY7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBNZXRhbm9kZSBsYWJlbCBzdHJpbmdzIGxvbmdlciB0aGFuIHRoaXMgYXJlIGdpdmVuIHNtYWxsZXIgZm9udHMuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLm1heE1ldGFub2RlTGFiZWxMZW5ndGhMYXJnZUZvbnQgPSAxMTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIE1ldGFub2RlIGxhYmVsIHN0cmluZ3MgbG9uZ2VyIHRoYW4gdGhpcyBhcmUgdHJ1bmNhdGVkIHdpdGggZWxsaXBzZXMuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLm1heE1ldGFub2RlTGFiZWxMZW5ndGggPSAxODsKICAgICAgICB9CiAgICAgICAgZ2V0Tm9kZShub2RlTmFtZSkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5yZW5kZXJIaWVyYXJjaHkuZ2V0UmVuZGVyTm9kZUJ5TmFtZShub2RlTmFtZSk7CiAgICAgICAgfQogICAgICAgIGlzTm9kZUV4cGFuZGVkKG5vZGUpIHsKICAgICAgICAgICAgcmV0dXJuIG5vZGUuZXhwYW5kZWQ7CiAgICAgICAgfQogICAgICAgIHNldE5vZGVFeHBhbmRlZChyZW5kZXJOb2RlKSB7CiAgICAgICAgICAgIHRoaXMuX2J1aWxkKHRoaXMucmVuZGVySGllcmFyY2h5KTsKICAgICAgICAgICAgdGhpcy5fdXBkYXRlTGFiZWxzKCF0aGlzLl96b29tZWQpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBQYW5zIHRvIGEgbm9kZS4gQXNzdW1lcyB0aGF0IHRoZSBub2RlIGV4aXN0cy4KICAgICAgICAgKiBAcGFyYW0gbm9kZU5hbWUge3N0cmluZ30gVGhlIG5hbWUgb2YgdGhlIG5vZGUgdG8gcGFuIHRvLgogICAgICAgICAqLwogICAgICAgIHBhblRvTm9kZShub2RlTmFtZSkgewogICAgICAgICAgICBjb25zdCB6b29tZWQgPSBwYW5Ub05vZGUobm9kZU5hbWUsIHRoaXMuJC5zdmcsIHRoaXMuJC5yb290LCB0aGlzLl96b29tKTsKICAgICAgICAgICAgaWYgKHpvb21lZCkgewogICAgICAgICAgICAgICAgdGhpcy5fem9vbWVkID0gdHJ1ZTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZXR1cm5zIHRoZSBvdXRlci1tb3N0IFNWRyB0aGF0IHJlbmRlcnMgdGhlIGdyYXBoLgogICAgICAgICAqLwogICAgICAgIGdldEdyYXBoU3ZnUm9vdCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuJC5zdmc7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm5zIHshSFRNTEVsZW1lbnR9CiAgICAgICAgICovCiAgICAgICAgZ2V0Q29udGV4dE1lbnUoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLiQuY29udGV4dE1lbnU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJlc2V0cyB0aGUgc3RhdGUgb2YgdGhlIGNvbXBvbmVudC4gQ2FsbGVkIHdoZW5ldmVyIHRoZSB3aG9sZSBncmFwaAogICAgICAgICAqIChkYXRhc2V0KSBjaGFuZ2VzLgogICAgICAgICAqLwogICAgICAgIF9yZXNldFN0YXRlKCkgewogICAgICAgICAgICAvLyBSZXNldCB0aGUgc3RhdGUgb2YgdGhlIGNvbXBvbmVudC4KICAgICAgICAgICAgdGhpcy5fbm9kZUdyb3VwSW5kZXggPSB7fTsKICAgICAgICAgICAgdGhpcy5fYW5ub3RhdGlvbkdyb3VwSW5kZXggPSB7fTsKICAgICAgICAgICAgdGhpcy5fZWRnZUdyb3VwSW5kZXggPSB7fTsKICAgICAgICAgICAgdGhpcy5fdXBkYXRlTGFiZWxzKGZhbHNlKTsKICAgICAgICAgICAgLy8gUmVtb3ZlIGFsbCBzdmcgZWxlbWVudHMgdW5kZXIgdGhlICdyb290JyBzdmcgZ3JvdXAuCiAgICAgICAgICAgIHNlbGVjdCh0aGlzLiQuc3ZnKS5zZWxlY3QoJyNyb290Jykuc2VsZWN0QWxsKCcqJykucmVtb3ZlKCk7CiAgICAgICAgICAgIC8vIEFuZCB0aGUgZGVmcy4KICAgICAgICAgICAgcmVtb3ZlR3JhZGllbnREZW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lYWx0aFBpbGxzLCB0aGlzLmhlYWx0aFBpbGxTdGVwSW5kZXgpOwogICAgICAgICAgICAgICAgdGhpcy5taW5pbWFwLnVwZGF0ZSgpOwogICAgICAgICAgICB9LmJpbmQodGhpcyksIFBBUkFNUyQxLmFuaW1hdGlvbi5kdXJhdGlvbik7CiAgICAgICAgfQogICAgICAgIHJlYWR5KCkgewogICAgICAgICAgICBzdXBlci5yZWFkeSgpOwogICAgICAgICAgICB0aGlzLl96b29tID0gem9vbSgpCiAgICAgICAgICAgICAgICAub24oJ2VuZCcsIGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgIGlmICh0aGlzLl96b29tU3RhcnRDb29yZHMpIHsKICAgICAgICAgICAgICAgICAgICAvLyBDYWxjdWxhdGUgdGhlIHRvdGFsIGRpc3RhbmNlIGRyYWdnZWQgZHVyaW5nIHRoZSB6b29tIGV2ZW50LgogICAgICAgICAgICAgICAgICAgIC8vIElmIGl0IGlzIHN1ZmZpY2llbnRseSBzbWFsbCwgdGhlbiBmaXJlIGFuIGV2ZW50IGluZGljYXRpbmcKICAgICAgICAgICAgICAgICAgICAvLyB0aGF0IHpvb21pbmcgaGFzIGVuZGVkLiBPdGhlcndpc2Ugd2FpdCB0byBmaXJlIHRoZSB6b29tIGVuZAogICAgICAgICAgICAgICAgICAgIC8vIGV2ZW50LCBzbyB0aGF0IGEgbW91c2UgY2xpY2sgcmVnaXN0ZXJlZCBhcyBwYXJ0IG9mIHRoaXMgem9vbWluZwogICAgICAgICAgICAgICAgICAgIC8vIGlzIGlnbm9yZWQgKGFzIHRoaXMgbW91c2UgY2xpY2sgd2FzIHBhcnQgb2YgYSB6b29taW5nLCBhbmQgc2hvdWxkCiAgICAgICAgICAgICAgICAgICAgLy8gbm90IGJlIHVzZWQgdG8gaW5kaWNhdGUgYW4gYWN0dWFsIGNsaWNrIG9uIHRoZSBncmFwaCkuCiAgICAgICAgICAgICAgICAgICAgdmFyIGRyYWdEaXN0YW5jZSA9IE1hdGguc3FydChNYXRoLnBvdyh0aGlzLl96b29tU3RhcnRDb29yZHMueCAtIHRoaXMuX3pvb21UcmFuc2Zvcm0ueCwgMikgKwogICAgICAgICAgICAgICAgICAgICAgICBNYXRoLnBvdyh0aGlzLl96b29tU3RhcnRDb29yZHMueSAtIHRoaXMuX3pvb21UcmFuc2Zvcm0ueSwgMikpOwogICAgICAgICAgICAgICAgICAgIGlmIChkcmFnRGlzdGFuY2UgPCB0aGlzLl9tYXhab29tRGlzdGFuY2VGb3JDbGljaykgewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9maXJlRW5hYmxlQ2xpY2soKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQodGhpcy5fZmlyZUVuYWJsZUNsaWNrLmJpbmQodGhpcyksIDUwKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLl96b29tU3RhcnRDb29yZHMgPSBudWxsOwogICAgICAgICAgICB9LmJpbmQodGhpcykpCiAgICAgICAgICAgICAgICAub24oJ3pvb20nLCBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICAvLyBTdG9yZSB0aGUgY29vcmRpbmF0ZXMgb2YgdGhlIHpvb20gZXZlbnQuCiAgICAgICAgICAgICAgICB0aGlzLl96b29tVHJhbnNmb3JtID0gZXZlbnQudHJhbnNmb3JtOwogICAgICAgICAgICAgICAgLy8gSWYgdGhpcyBpcyB0aGUgZmlyc3Qgem9vbSBldmVudCBhZnRlciBhIHpvb20tZW5kLCB0aGVuCiAgICAgICAgICAgICAgICAvLyBzdG9yZSB0aGUgY29vcmRpbmF0ZXMgYXMgdGhlIHN0YXJ0IGNvb3JkaW5hdGVzIGFzIHdlbGwsCiAgICAgICAgICAgICAgICAvLyBhbmQgZmlyZSBhbiBldmVudCB0byBpbmRpY2F0ZSB0aGF0IHpvb21pbmcgaGFzIHN0YXJ0ZWQuCiAgICAgICAgICAgICAgICAvLyBUaGlzIGRvZXNuJ3QgdXNlIHRoZSB6b29tc3RhcnQgZXZlbnQsIGFzIGQzIHNlbmRzIHRoaXMKICAgICAgICAgICAgICAgIC8vIGV2ZW50IG9uIG1vdXNlLWRvd24sIGV2ZW4gaWYgdGhlcmUgaGFzIGJlZW4gbm8gZHJhZ2dpbmcKICAgICAgICAgICAgICAgIC8vIGRvbmUgdG8gdHJhbnNsYXRlIHRoZSBncmFwaCBhcm91bmQuCiAgICAgICAgICAgICAgICBpZiAoIXRoaXMuX3pvb21TdGFydENvb3JkcykgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX3pvb21TdGFydENvb3JkcyA9IHRoaXMuX3pvb21UcmFuc2Zvcm07CiAgICAgICAgICAgICAgICAgICAgdGhpcy5maXJlKCdkaXNhYmxlLWNsaWNrJyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLl96b29tZWQgPSB0cnVlOwogICAgICAgICAgICAgICAgc2VsZWN0KHRoaXMuJC5yb290KS5hdHRyKCd0cmFuc2Zvcm0nLCBldmVudC50cmFuc2Zvcm0pOwogICAgICAgICAgICAgICAgLy8gTm90aWZ5IHRoZSBtaW5pbWFwLgogICAgICAgICAgICAgICAgdGhpcy5taW5pbWFwLnpvb20oZXZlbnQudHJhbnNmb3JtKTsKICAgICAgICAgICAgfS5iaW5kKHRoaXMpKTsKICAgICAgICAgICAgc2VsZWN0KHRoaXMuJC5zdmcpCiAgICAgICAgICAgICAgICAuY2FsbCh0aGlzLl96b29tKQogICAgICAgICAgICAgICAgLm9uKCdkYmxjbGljay56b29tJywgbnVsbCk7CiAgICAgICAgICAgIHNlbGVjdCh3aW5kb3cpLm9uKCdyZXNpemUnLCBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICAvLyBOb3RpZnkgdGhlIG1pbmltYXAgdGhhdCB0aGUgdXNlcidzIHdpbmRvdyB3YX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aXRsZVN0eWxlID0gbWFpbkdyYXBoVGl0bGVFbGVtZW50LnN0eWxlOwogICAgICAgICAgICB2YXIgYXV4VGl0bGVFbGVtZW50ID0gdGhpcy4kJCgnLmF1eFRpdGxlJyk7CiAgICAgICAgICAgIHZhciBhdXhUaXRsZVN0eWxlID0gYXV4VGl0bGVFbGVtZW50LnN0eWxlOwogICAgICAgICAgICB2YXIgZnVuY3Rpb25MaWJyYXJ5VGl0bGVTdHlsZSA9IHRoaXMuJCQoJy5mdW5jdGlvbkxpYnJhcnlUaXRsZScpLnN0eWxlOwogICAgICAgICAgICBjb25zdCByb290ID0gc2VsZWN0KHRoaXMuJC5zdmcpOwogICAgICAgICAgICB2YXIgY29yZSA9IHJvb3QKICAgICAgICAgICAgICAgIC5zZWxlY3QoJy4nICsKICAgICAgICAgICAgICAgIENsYXNzJDIuU2NlbmUuR1JPVVAgKwogICAgICAgICAgICAgICAgJz4uJyArCiAgICAgICAgICAgICAgICBDbGFzcyQyLlNjZW5lLkNPUkUpCiAgICAgICAgICAgICAgICAubm9kZSgpOwogICAgICAgICAgICAvLyBPbmx5IHNob3cgbGFiZWxzIGlmIHRoZSBncmFwaCBpcyBmdWxseSBsb2FkZWQuCiAgICAgICAgICAgIGlmIChzaG93TGFiZWxzICYmIGNvcmUgJiYgdGhpcy5wcm9ncmVzcyAmJiB0aGlzLnByb2dyZXNzLnZhbHVlID09PSAxMDApIHsKICAgICAgICAgICAgICAgIHZhciBhdXggPSByb290CiAgICAgICAgICAgICAgICAgICAgLnNlbGVjdCgnLicgKwogICAgICAgICAgICAgICAgICAgIENsYXNzJDIuU2NlbmUuR1JPVVAgKwogICAgICAgICAgICAgICAgICAgICc+LicgKwogICAgICAgICAgICAgICAgICAgIENsYXNzJDIuU2NlbmUuSU5FWFRSQUNUKQogICAgICAgICAgICAgICAgICAgIC5ub2RlKCkgfHwKICAgICAgICAgICAgICAgICAgICByb290CiAgICAgICAgICAgICAgICAgICAgICAgIC5zZWxlY3QoJy4nICsKICAgICAgICAgICAgICAgICAgICAgICAgQ2xhc3MkMi5TY2VuZS5HUk9VUCArCiAgICAgICAgICAgICAgICAgICAgICAgICc+LicgKwogICAgICAgICAgICAgICAgICAgICAgICBDbGFzcyQyLlNjZW5lLk9VVEVYVFJBQ1QpCiAgICAgICAgICAgICAgICAgICAgICAgIC5ub2RlKCk7CiAgICAgICAgICAgICAgICB2YXIgY29yZVggPSBjb3JlLmdldENUTSgpLmU7CiAgICAgICAgICAgICAgICB2YXIgYXV4WCA9IGF1eCA/IGF1eC5nZXRDVE0oKS5lIDogbnVsbDsKICAgICAgICAgICAgICAgIHRpdGxlU3R5bGUuZGlzcGxheSA9ICdpbmxpbmUnOwogICAgICAgICAgICAgICAgdGl0bGVTdHlsZS5sZWZ0ID0gY29yZVggKyAncHgnOwogICAgICAgICAgICAgICAgaWYgKGF1eFggIT09IG51bGwgJiYgYXV4WCAhPT0gY29yZVgpIHsKICAgICAgICAgICAgICAgICAgICBhdXhUaXRsZVN0eWxlLmRpc3BsYXkgPSAnaW5saW5lJzsKICAgICAgICAgICAgICAgICAgICAvLyBNYWtlIHN1cmUgdGhhdCB0aGUgYXV4IHRpdGxlIGlzIHBvc2l0aW9uZWQgcmlnaHR3YXJkcyBlbm91Z2ggc28gYXMgdG8KICAgICAgICAgICAgICAgICAgICAvLyBwcmV2ZW50IG92ZXJsYXAgd2l0aCB0aGUgbWFpbiBncmFwaCB0aXRsZS4KICAgICAgICAgICAgICAgICAgICBhdXhYID0gTWF0aC5tYXgoY29yZVggKyBtYWluR3JhcGhUaXRsZUVsZW1lbnQuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCkud2lkdGgsIGF1eFgpOwogICAgICAgICAgICAgICAgICAgIGF1eFRpdGxlU3R5bGUubGVmdCA9IGF1eFggKyAncHgnOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgYXV4VGl0bGVTdHlsZS5kaXNwbGF5ID0gJ25vbmUnOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgbGV0IGZ1bmN0aW9uTGlicmFyeSA9IHJvb3QKICAgICAgICAgICAgICAgICAgICAuc2VsZWN0KCcuJyArCiAgICAgICAgICAgICAgICAgICAgQ2xhc3MkMi5TY2VuZS5HUk9VUCArCiAgICAgICAgICAgICAgICAgICAgJz4uJyArCiAgICAgICAgICAgICAgICAgICAgQ2xhc3MkMi5TY2VuZS5GVU5DVElPTl9MSUJSQVJZKQogICAgICAgICAgICAgICAgICAgIC5ub2RlKCk7CiAgICAgICAgICAgICAgICBsZXQgZnVuY3Rpb25MaWJyYXJ5WCA9IGZ1bmN0aW9uTGlicmFyeQogICAgICAgICAgICAgICAgICAgID8gZnVuY3Rpb25MaWJyYXJ5LmdldENUTSgpLmUKICAgICAgICAgICAgICAgICAgICA6IG51bGw7CiAgICAgICAgICAgICAgICBpZiAoZnVuY3Rpb25MaWJyYXJ5WCAhPT0gbnVsbCAmJiBmdW5jdGlvbkxpYnJhcnlYICE9PSBhdXhYKSB7CiAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb25MaWJyYXJ5VGl0bGVTdHlsZS5kaXNwbGF5ID0gJ2lubGluZSc7CiAgICAgICAgICAgICAgICAgICAgLy8gTWFrZSBzdXJlIHRoYXQgdGhlIGZ1bmN0aW9uIGxpYnJhcnkgdGl0bGUgaXMgcG9zaXRpb25lZCByaWdodHdhcmRzCiAgICAgICAgICAgICAgICAgICAgLy8gZW5vdWdoIHNvIGFzIHRvIHByZXZlbnQgb3ZlcmxhcCB3aXRoIG90aGVyIGNvbnRlbnQuCiAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb25MaWJyYXJ5WCA9IE1hdGgubWF4KGF1eFggKyBhdXhUaXRsZUVsZW1lbnQuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCkud2lkdGgsIGZ1bmN0aW9uTGlicmFyeVgpOwogICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uTGlicmFyeVRpdGxlU3R5bGUubGVmdCA9IGZ1bmN0aW9uTGlicmFyeVggKyAncHgnOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb25MaWJyYXJ5VGl0bGVTdHlsZS5kaXNwbGF5ID0gJ25vbmUnOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGl0bGVTdHlsZS5kaXNwbGF5ID0gJ25vbmUnOwogICAgICAgICAgICAgICAgYXV4VGl0bGVTdHlsZS5kaXNwbGF5ID0gJ25vbmUnOwogICAgICAgICAgICAgICAgZnVuY3Rpb25MaWJyYXJ5VGl0bGVTdHlsZS5kaXNwbGF5ID0gJ25vbmUnOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENhbGxlZCB3aGVuZXZlciB0aGUgdXNlciBjaGFuZ2VkIHRoZSAnY29sb3IgYnknIG9wdGlvbiBpbiB0aGUKICAgICAgICAgKiBVSSBjb250cm9scy4KICAgICAgICAgKi8KICAgICAgICBfY29sb3JCeUNoYW5nZWQoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLnJlbmRlckhpZXJhcmNoeSAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICAvLyBXZSBpdGVyYXRlIHRocm91Z2ggZWFjaCBzdmcgbm9kZSBhbmQgdXBkYXRlIGl0cyBzdGF0ZS4KICAgICAgICAgICAgICAgIGxvZGFzaC5lYWNoKHRoaXMuX25vZGVHcm91cEluZGV4LCAobm9kZUdyb3VwLCBub2RlTmFtZSkgPT4gewogICAgICAgICAgICAgICAgICAgIHRoaXMuX3VwZGF0ZU5vZGVTdGF0ZShub2RlTmFtZSk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIC8vIE5vdGlmeSBhbHNvIHRoZSBtaW5pbWFwLgogICAgICAgICAgICAgICAgdGhpcy5taW5pbWFwLnVwZGF0ZSgpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGZpdCgpIHsKICAgICAgICAgICAgdGhpcy5faGFzUmVuZGVySGllcmFyY2h5QmVlbkZpdE9uY2UgPSB0cnVlOwogICAgICAgICAgICBmaXQkMih0aGlzLiQuc3ZnLCB0aGlzLiQucm9vdCwgdGhpcy5fem9vbSwgZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgdGhpcy5fem9vbWVkID0gZmFsc2U7CiAgICAgICAgICAgIH0uYmluZCh0aGlzKSk7CiAgICAgICAgfQogICAgICAgIGlzTm9kZVNlbGVjdGVkKG4pIHsKICAgICAgICAgICAgcmV0dXJuIG4gPT09IHRoaXMuc2VsZWN0ZWROb2RlOwogICAgICAgIH0KICAgICAgICBpc05vZGVIaWdobGlnaHRlZChuKSB7CiAgICAgICAgICAgIHJldHVybiBuID09PSB0aGlzLmhpZ2hsaWdodGVkTm9kZTsKICAgICAgICB9CiAgICAgICAgYWRkQW5ub3RhdGlvbkdyb3VwKGEsIGQsIHNlbGVjdGlvbikgewogICAgICAgICAgICB2YXIgYW4gPSBhLm5vZGUubmFtZTsKICAgICAgICAgICAgdGhpcy5fYW5ub3RhdGlvbkdyb3VwSW5kZXhbYW5dID0gdGhpcy5fYW5ub3RhdGlvbkdyb3VwSW5kZXhbYW5dIHx8IHt9OwogICAgICAgICAgICB0aGlzLl9hbm5vdGF0aW9uR3JvdXBJbmRleFthbl1bZC5ub2RlLm5hbWVdID0gc2VsZWN0aW9uOwogICAgICAgIH0KICAgICAgICBnZXRBbm5vdGF0aW9uR3JvdXBzSW5kZXgoYSkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fYW5ub3RhdGlvbkdyb3VwSW5kZXhbYV07CiAgICAgICAgfQogICAgICAgIHJlbW92ZUFubm90YXRpb25Hcm91cChhLCBkKSB7CiAgICAgICAgICAgIGRlbGV0ZSB0aGlzLl9hbm5vdGF0aW9uR3JvdXBJbmRleFthLm5vZGUubmFtZV1bZC5ub2RlLm5hbWVdOwogICAgICAgIH0KICAgICAgICBhZGROb2RlR3JvdXAobiwgc2VsZWN0aW9uKSB7CiAgICAgICAgICAgIHRoaXMuX25vZGVHcm91cEluZGV4W25dID0gc2VsZWN0aW9uOwogICAgICAgIH0KICAgICAgICBnZXROb2RlR3JvdXAobikgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fbm9kZUdyb3VwSW5kZXhbbl07CiAgICAgICAgfQogICAgICAgIHJlbW92ZU5vZGVHcm91cChuKSB7CiAgICAgICAgICAgIGRlbGV0ZSB0aGlzLl9ub2RlR3JvdXBJbmRleFtuXTsKICAgICAgICB9CiAgICAgICAgYWRkRWRnZUdyb3VwKG4sIHNlbGVjdGlvbikgewogICAgICAgICAgICB0aGlzLl9lZGdlR3JvdXBJbmRleFtuXSA9IHNlbGVjdGlvbjsKICAgICAgICB9CiAgICAgICAgZ2V0RWRnZUdyb3VwKGUpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2VkZ2VHcm91cEluZGV4W2VdOwogICAgICAgIH0KICAgICAgICBfdXBkYXRlSGVhbHRoUGlsbHMoKSB7CiAgICAgICAgICAgIHZhciBub2RlTmFtZXNUb0hlYWx0aFBpbGxzID0gdGhpcy5ub2RlTmFtZXNUb0hlYWx0aFBpbGxzOwogICAgICAgICAgICB2YXIgaGVhbHRoUGlsbFN0ZXBJbmRleCA9IHRoaXMuaGVhbHRoUGlsbFN0ZXBJbmRleDsKICAgICAgICAgICAgYWRkSGVhbHRoUGlsbHModGhpcy4kLnN2Zywgbm9kZU5hbWVzVG9IZWFsdGhQaWxscywgaGVhbHRoUGlsbFN0ZXBJbmRleCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFVwZGF0ZSBub2RlIGFuZCBhbm5vdGF0aW9uIG5vZGUgb2YgdGhlIGdpdmVuIG5hbWUuCiAgICAgICAgICogQHBhcmFtICB7U3RyaW5nfSBuIG5vZGUgbmFtZQogICAgICAgICAqLwogICAgICAgIF91cGRhdGVOb2RlU3RhdGUobikgewogICAgICAgICAgICB2YXIgbm9kZSA9IHRoaXMuZ2V0Tm9kZShuKTsKICAgICAgICAgICAgdmFyIG5vZGVHcm91cCA9IHRoaXMuZ2V0Tm9kZUdyb3VwKG4pOwogICAgICAgICAgICBpZiAobm9kZUdyb3VwKSB7CiAgICAgICAgICAgICAgICBzdHlsaXplJDEobm9kZUdyb3VwLCBub2RlLCB0aGlzKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAobm9kZS5ub2RlLnR5cGUgPT09IE5vZGVUeXBlLk1FVEEgJiYKICAgICAgICAgICAgICAgIG5vZGUubm9kZS5hc3NvY2lhdGVkRnVuY3Rpb24gJiYKICAgICAgICAgICAgICAgICFub2RlLmlzTGlicmFyeUZ1bmN0aW9uKSB7CiAgICAgICAgICAgICAgICAvLyBUaGUgbm9kZSBpcyB0aGF0IG9mIGEgZnVuY3Rpb24gY2FsbC4gQWxzbyBsaW5rIHRoZSBub2RlIHdpdGhpbiB0aGUKICAgICAgICAgICAgICAgIC8vIGZ1bmN0aW9uIGxpYnJhcnkuIFRoaXMgY2xhcmlmaWVzIHRvIHRoZSB1c2VyIHRoYXQgdGhlIGxpYnJhcnkgZnVuY3Rpb24KICAgICAgICAgICAgICAgIC8vIGlzIGJlaW5nIHVzZWQuCiAgICAgICAgICAgICAgICB2YXIgbGlicmFyeUZ1bmN0aW9uTm9kZU5hbWUgPSBGVU5DVElPTl9MSUJSQVJZX05PREVfUFJFRklYICsKICAgICAgICAgICAgICAgICAgICBub2RlLm5vZGUuYXNzb2NpYXRlZEZ1bmN0aW9uOwogICAgICAgICAgICAgICAgdmFyIGZ1bmN0aW9uR3JvdXAgPSBzZWxlY3QoJy4nICsKICAgICAgICAgICAgICAgICAgICBDbGFzcyQyLlNjZW5lLkdST1VQICsKICAgICAgICAgICAgICAgICAgICAnPi4nICsKICAgICAgICAgICAgICAgICAgICBDbGFzcyQyLlNjZW5lLkZVTkNUSU9OX0xJQlJBUlkgKwogICAgICAgICAgICAgICAgICAgICcgZ1tkYXRhLW5hbWU9IicgKwogICAgICAgICAgICAgICAgICAgIGxpYnJhcnlGdW5jdGlvbk5vZGVOYW1lICsKICAgICAgICAgICAgICAgICAgICAnIl0nKTsKICAgICAgICAgICAgICAgIHN0eWxpemUkMShmdW5jdGlvbkdyb3VwLCBub2RlLCB0aGlzKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB2YXIgYW5ub3RhdGlvbkdyb3VwSW5kZXggPSB0aGlzLmdldEFubm90YXRpb25Hcm91cHNJbmRleChuKTsKICAgICAgICAgICAgbG9kYXNoLmVhY2goYW5ub3RhdGlvbkdyb3VwSW5kZXgsIChhR3JvdXAsIGhvc3ROYW1lKSA9PiB7CiAgICAgICAgICAgICAgICBzdHlsaXplJDEoYUdyb3VwLCBub2RlLCB0aGlzLCBDbGFzcyQyLkFubm90YXRpb24uTk9ERSk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBIYW5kbGVzIG5ldyBub2RlIHNlbGVjdGlvbi4gMSkgVXBkYXRlcyB0aGUgc2VsZWN0ZWQtc3RhdGUgb2YgZWFjaCBub2RlLAogICAgICAgICAqIDIpIHRyaWdnZXJzIGlucHV0IHRyYWNpbmcuCiAgICAgICAgICogQHBhcmFtIHNlbGVjdGVkTm9kZSB7c3RyaW5nfSBUaGUgbmFtZSBvZiB0aGUgbmV3bHkgc2VsZWN0ZWQgbm9kZS4KICAgICAgICAgKiBAcGFyYW0gb2xkU2VsZWN0ZWROb2RlIHtzdHJpbmd9IFRoZSBuYW1lIG9mIHRoZSBwcmV2aW91c2x5IHNlbGVjdGVkIG5vZGUuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKi8KICAgICAgICBfc2VsZWN0ZWROb2RlQ2hhbmdlZChzZWxlY3RlZE5vZGUsIG9sZFNlbGVjdGVkTm9kZSkgewogICAgICAgICAgICBpZiAoc2VsZWN0ZWROb2RlID09PSBvbGRTZWxlY3RlZE5vZGUpIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAob2xkU2VsZWN0ZWROb2RlKSB7CiAgICAgICAgICAgICAgICB0aGlzLl91cGRhdGVOb2RlU3RhdGUob2xkU2VsZWN0ZWROb2RlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoIXNlbGVjdGVkTm9kZSkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIFVwZGF0ZSB0aGUgbWluaW1hcCB0byByZWZsZWN0IHRoZSBoaWdobGlnaHRlZCAoc2VsZWN0ZWQpIG5vZGUuCiAgICAgICAgICAgIHRoaXMubWluaW1hcC51cGRhdGUoKTsKICAgICAgICAgICAgdmFyIG5vZGUgPSB0aGlzLnJlbmRlckhpZXJhcmNoeS5oaWVyYXJjaHkubm9kZShzZWxlY3RlZE5vZGUpOwogICAgICAgICAgICB2YXIgbm9kZVBhcmVudHMgPSBbXTsKICAgICAgICAgICAgLy8gQ3JlYXRlIGxpc3Qgb2YgYWxsIG1ldGFub2RlIHBhcmVudHMgb2YgdGhlIHNlbGVjdGVkIG5vZGUuCiAgICAgICAgICAgIHdoaWxlIChub2RlLnBhcmVudE5vZGUgIT0gbnVsbCAmJgogICAgICAgICAgICAgICAgbm9kZS5wYXJlbnROb2RlLm5hbWUgIT0gUk9PVF9OQU1FKSB7CiAgICAgICAgICAgICAgICBub2RlID0gbm9kZS5wYXJlbnROb2RlOwogICAgICAgICAgICAgICAgbm9kZVBhcmVudHMucHVzaChub2RlLm5hbWUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIEVuc3VyZSBlYWNoIHBhcmVudCBtZXRhbm9kZSBpcyBidWlsdCBhbmQgZXhwYW5kZWQuCiAgICAgICAgICAgIHZhciB0b3BQYXJlbnROb2RlVG9CZUV4cGFuZGVkOwogICAgICAgICAgICBsb2Rhc2guZm9yRWFjaFJpZ2h0KG5vZGVQYXJlbnRzLCAocGFyZW50TmFtZSkgPT4gewogICAgICAgICAgICAgICAgdGhpcy5yZW5kZXJIaWVyYXJjaHkuYnVpbGRTdWJoaWVyYXJjaHkocGFyZW50TmFtZSk7CiAgICAgICAgICAgICAgICB2YXIgcmVuZGVyTm9kZSA9IHRoaXMucmVuZGVySGllcmFyY2h5LmdldFJlbmRlck5vZGVCeU5hbWUocGFyZW50TmFtZSk7CiAgICAgICAgICAgICAgICBpZiAocmVuZGVyTm9kZS5ub2RlLmlzR3JvdXBOb2RlICYmICFyZW5kZXJOb2RlLmV4cGFuZGVkKSB7CiAgICAgICAgICAgICAgICAgICAgcmVuZGVyTm9kZS5leHBhbmRlZCA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgaWYgKCF0b3BQYXJlbnROb2RlVG9CZUV4cGFuZGVkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRvcFBhcmVudE5vZGVUb0JlRXhwYW5kZWQgPSByZW5kZXJOb2RlOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIC8vIElmIGFueSBleHBhbnNpb24gd2FzIG5lZWRlZCB0byBkaXNwbGF5IHRoaXMgc2VsZWN0ZWQgbm9kZSwgdGhlbgogICAgICAgICAgICAvLyBpbmZvcm0gdGhlIHNjZW5lIG9mIHRoZSB0b3AtbW9zdCBleHBhbnNpb24uCiAgICAgICAgICAgIGlmICh0b3BQYXJlbnROb2RlVG9CZUV4cGFuZGVkKSB7CiAgICAgICAgICAgICAgICB0aGlzLnNldE5vZGVFeHBhbmRlZCh0b3BQYXJlbnROb2RlVG9CZUV4cGFuZGVkKTsKICAgICAgICAgICAgICAgIHRoaXMuX3pvb21lZCA9IHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHNlbGVjdGVkTm9kZSkgewogICAgICAgICAgICAgICAgdGhpcy5fdXBkYXRlTm9kZVN0YXRlKHNlbGVjdGVkTm9kZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gR2l2ZSB0aW1lIGZvciBhbnkgZXhwYW5kaW5nIHRvIGZpbmlzaCBiZWZvcmUgcGFubmluZyB0byBhIG5vZGUuCiAgICAgICAgICAgIC8vIE90aGVyd2lzZSwgdGhlIHBhbiB3aWxsIGJlIGNvbXB1dGVkIGZyb20gaW5jb3JyZWN0IG1lYXN1cmVtZW50cy4KICAgICAgICAgICAgc2V0VGltZW91dCgoKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLnBhblRvTm9kZShzZWxlY3RlZE5vZGUpOwogICAgICAgICAgICB9LCBQQVJBTVMkMS5hbmltYXRpb24uZHVyYXRpb24pOwogICAgICAgIH0KICAgICAgICBfaGlnaGxpZ2h0ZWROb2RlQ2hhbmdlZChoaWdobGlnaHRlZE5vZGUsIG9sZEhpZ2hsaWdodGVkTm9kZSkgewogICAgICAgICAgICBpZiAoaGlnaGxpZ2h0ZWROb2RlID09PSBvbGRIaWdobGlnaHRlZE5vZGUpIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoaGlnaGxpZ2h0ZWROb2RlKSB7CiAgICAgICAgICAgICAgICB0aGlzLl91cGRhdGVOb2RlU3RhdGUoaGlnaGxpZ2h0ZWROb2RlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAob2xkSGlnaGxpZ2h0ZWROb2RlKSB7CiAgICAgICAgICAgICAgICB0aGlzLl91cGRhdGVOb2RlU3RhdGUob2xkSGlnaGxpZ2h0ZWROb2RlKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBfb25ab29tQ2hhbmdlZCgpIHsKICAgICAgICAgICAgdGhpcy5fdXBkYXRlTGFiZWxzKCF0aGlzLl96b29tZWQpOwogICAgICAgIH0KICAgICAgICBfZmlyZUVuYWJsZUNsaWNrKCkgewogICAgICAgICAgICB0aGlzLmZ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CIsIHZvaWQgMCk7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7CiAgICAgICAgICAgIHR5cGU6IE9iamVjdCwKICAgICAgICB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIE9iamVjdCkKICAgIF0sIFRmR3JhcGhTY2VuZTIucHJvdG90eXBlLCAiX2Fubm90YXRpb25Hcm91cEluZGV4Iiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsKICAgICAgICAgICAgdHlwZTogT2JqZWN0LAogICAgICAgIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgT2JqZWN0KQogICAgXSwgVGZHcmFwaFNjZW5lMi5wcm90b3R5cGUsICJfZWRnZUdyb3VwSW5kZXgiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBOdW1iZXIsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBOdW1iZXIpCiAgICBdLCBUZkdyYXBoU2NlbmUyLnByb3RvdHlwZSwgIm1heE1ldGFub2RlTGFiZWxMZW5ndGhGb250U2l6ZSIsIHZvaWQgMCk7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7CiAgICAgICAgICAgIHR5cGU6IE51bWJlciwKICAgICAgICB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIE51bWJlcikKICAgIF0sIFRmR3JhcGhTY2VuZTIucHJvdG90eXBlLCAibWluTWV0YW5vZGVMYWJlbExlbmd0aEZvbnRTaXplIiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsKICAgICAgICAgICAgdHlwZTogTnVtYmVyLAogICAgICAgIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2ln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N0aW9uOwogICAgICAgICAgICAgICAgLy8gUHJvZHVjaW5nIHRoZSAnY29sb3IgYnknIHBhcmFtZXRlcnMgdG8gYmUgY29uc3VtZWQKICAgICAgICAgICAgICAgIC8vIGJ5IHRoZSB0Zi1ncmFwaC1jb250cm9scyBwYW5lbC4gSXQgY29udGFpbnMgaW5mb3JtYXRpb24gYWJvdXQgdGhlCiAgICAgICAgICAgICAgICAvLyBtaW4gYW5kIG1heCB2YWx1ZXMgYW5kIHRoZWlyIHJlc3BlY3RpdmUgY29sb3JzLCBhcyB3ZWxsIGFzIGxpc3QKICAgICAgICAgICAgICAgIC8vIG9mIGRldmljZXMgd2l0aCB0aGVpciByZXNwZWN0aXZlIGNvbG9ycy4KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGdldENvbG9yUGFyYW1zRnJvbVNjYWxlKHNjYWxlKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgICAgICAgICAgbWluVmFsdWU6IHNjYWxlLmRvbWFpbigpWzBdLAogICAgICAgICAgICAgICAgICAgICAgICBtYXhWYWx1ZTogc2NhbGUuZG9tYWluKClbMV0sCiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0Q29sb3I6IHNjYWxlLnJhbmdlKClbMF0sCiAgICAgICAgICAgICAgICAgICAgICAgIGVuZENvbG9yOiBzY2FsZS5yYW5nZSgpWzFdLAogICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLl9zZXRDb2xvckJ5UGFyYW1zKHsKICAgICAgICAgICAgICAgICAgICBjb21wdXRlX3RpbWU6IGdldENvbG9yUGFyYW1zRnJvbVNjYWxlKHJlbmRlckdyYXBoLmNvbXB1dGVUaW1lU2NhbGUpLAogICAgICAgICAgICAgICAgICAgIG1lbW9yeTogZ2V0Q29sb3JQYXJhbXNGcm9tU2NhbGUocmVuZGVyR3JhcGgubWVtb3J5VXNhZ2VTY2FsZSksCiAgICAgICAgICAgICAgICAgICAgZGV2aWNlOiBsb2Rhc2gubWFwKHJlbmRlckdyYXBoLmRldmljZUNvbG9yTWFwLmRvbWFpbigpLCBmdW5jdGlvbiAoZGV2aWNlTmFtZSkgewogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZGV2aWNlOiBkZXZpY2VOYW1lLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I6IHJlbmRlckdyYXBoLmRldmljZUNvbG9yTWFwKGRldmljZU5hbWUpLAogICAgICAgICAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgICAgIH0pLAogICAgICAgICAgICAgICAgICAgIHhsYV9jbHVzdGVyOiBsb2Rhc2gubWFwKHJlbmRlckdyYXBoLnhsYUNsdXN0ZXJDb2xvck1hcC5kb21haW4oKSwgZnVuY3Rpb24gKHhsYUNsdXN0ZXJOYW1lKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB4bGFfY2x1c3RlcjogeGxhQ2x1c3Rlck5hbWUsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvcjogcmVuZGVyR3JhcGgueGxhQ2x1c3RlckNvbG9yTWFwKHhsYUNsdXN0ZXJOYW1lKSwKICAgICAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgICAgICB9KSwKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgdGhpcy5fc2V0UmVuZGVySGllcmFyY2h5KHJlbmRlckdyYXBoKTsKICAgICAgICAgICAgICAgIHRoaXMuYXN5bmMoZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuZmlyZSgncmVuZGVyZWQnKTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICB9LmJpbmQodGhpcykpOwogICAgICAgIH0KICAgICAgICBfZ2V0VmlzaWJsZShuYW1lKSB7Ci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Y2x1c2lvblR5cGUuSU5DTFVERTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHJlbmRlck5vZGUubm9kZS5pbmNsdWRlID0gdGhpcy5yZW5kZXJIaWVyYXJjaHkuaXNOb2RlQXV4aWxpYXJ5KHJlbmRlck5vZGUpCiAgICAgICAgICAgICAgICAgICAgPyBJbmNsdXNpb25UeXBlLklOQ0xVREUKICAgICAgICAgICAgICAgICAgICA6IEluY2x1c2lvblR5cGUuRVhDTFVERTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBSZWJ1aWxkIHRoZSByZW5kZXIgaGllcmFyY2h5LgogICAgICAgICAgICB0aGlzLl9idWlsZFJlbmRlckhpZXJhcmNoeSh0aGlzLmdyYXBoSGllcmFyY2h5KTsKICAgICAgICB9CiAgICAgICAgX25vZGVUb2dnbGVTZXJpZXNHcm91cChldmVudCkgewogICAgICAgICAgICAvLyBUb2dnbGUgdGhlIGdyb3VwIHNldHRpbmcgb2YgdGhlIHNwZWNpZmllZCBub2RlIGFwcHJvcHJpYXRlbHkuCiAgICAgICAgICAgIHZhciBub2RlTmFtZSA9IGV2ZW50LmRldGFpbC5uYW1lOwogICAgICAgICAgICB0aGlzLm5vZGVUb2dnbGVTZXJpZXNHcm91cChub2RlTmFtZSk7CiAgICAgICAgfQogICAgICAgIG5vZGVUb2dnbGVTZXJpZXNHcm91cChub2RlTmFtZSkgewogICAgICAgICAgICAvLyBUb2dnbGUgdGhlIGdyb3VwIHNldHRpbmcgb2YgdGhlIHNwZWNpZmllZCBub2RlIGFwcHJvcHJpYXRlbHkuCiAgICAgICAgICAgIHRvZ2dsZU5vZGVTZXJpZXNHcm91cCh0aGlzLmhpZXJhcmNoeVBhcmFtcy5zZXJpZXNNYXAsIG5vZGVOYW1lKTsKICAgICAgICAgICAgLy8gUmVidWlsZCB0aGUgcmVuZGVyIGhpZXJhcmNoeSB3aXRoIHRoZSB1cGRhdGVkIHNlcmllcyBncm91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B7CiAgICAgICAgICAgICAgICAvLyBSZXNldCBpdHMgbWFya2VyLgogICAgICAgICAgICAgICAgaWYgKGQubGFiZWwpIHsKICAgICAgICAgICAgICAgICAgICBjb25zdCBwYXRocyA9IHNlbGVjdCh0aGlzKS5zZWxlY3RBbGwoJ3BhdGguZWRnZWxpbmUnKTsKICAgICAgICAgICAgICAgICAgICBpZiAoZC5sYWJlbC5zdGFydE1hcmtlcklkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHBhdGhzLnN0eWxlKCdtYXJrZXItc3RhcnQnLCBgdXJsKCMke2QubGFiZWwuc3RhcnRNYXJrZXJJZH0pYCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGlmIChkLmxhYmVsLmVuZE1hcmtlcklkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHBhdGhzLnN0eWxlKCdtYXJrZXItZW5kJywgYHVybCgjJHtkLmxhYmVsLmVuZE1hcmtlcklkfSlgKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICBfdXBkYXRlTWFya2VyT2ZTZWxlY3RlZEVkZ2Uoc2VsZWN0ZWRFZGdlKSB7CiAgICAgICAgICAgIGlmIChzZWxlY3RlZEVkZ2UubGFiZWwpIHsKICAgICAgICAgICAgICAgIC8vIFRoZSBtYXJrZXIgd2lsbCB2YXJ5IGJhc2VkIG9uIHRoZSBkaXJlY3Rpb24gb2YgdGhlIGVkZ2UuCiAgICAgICAgICAgICAgICBjb25zdCBtYXJrZXJJZCA9IHNlbGVjdGVkRWRnZS5sYWJlbC5zdGFydE1hcmtlcklkIHx8IHNlbGVjdGVkRWRnZS5sYWJlbC5lbmRNYXJrZXJJZDsKICAgICAgICAgICAgICAgIGlmIChtYXJrZXJJZCkgewogICAgICAgICAgICAgICAgICAgIC8vIEZpbmQgdGhlIGNvcnJlc3BvbmRpbmcgbWFya2VyIGZvciBhIHNlbGVjdGVkIGVkZ2UuCiAgICAgICAgICAgICAgICAgICAgY29uc3Qgc2VsZWN0ZWRNYXJrZXJJZCA9IG1hcmtlcklkLnJlcGxhY2UoJ2RhdGFmbG93LScsICdzZWxlY3RlZC0nKTsKICAgICAgICAgICAgICAgICAgICBsZXQgc2VsZWN0ZWRNYXJrZXIgPSB0aGlzLiQkKCcjJyArIHNlbGVjdGVkTWFya2VySWQpOwogICAgICAgICAgICAgICAgICAgIGlmICghc2VsZWN0ZWRNYXJrZXIpIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gVGhlIG1hcmtlciBmb3IgYSBzZWxlY3RlZCBlZGdlIG9mIHRoaXMgc2l6ZSBkb2VzIG5vdCBleGlzdCB5ZXQuIENyZWF0ZSBpdC4KICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgb3JpZ2luYWxNYXJrZXIgPSB0aGlzLiQuc2NlbmUucXVlcnlTZWxlY3RvcignIycgKyBtYXJrZXJJZCk7CiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkTWFya2VyID0gb3JpZ2luYWxNYXJrZXIuY2xvbmVOb2RlKHRydWUpOwogICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZE1hcmtlci5zZXRBdHRyaWJ1dGUoJ2lkJywgc2VsZWN0ZWRNYXJrZXJJZCk7CiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkTWFya2VyLmNsYXNzTGlzdC5hZGQoJ3NlbGVjdGVkLWFycm93aGVhZCcpOwogICAgICAgICAgICAgICAgICAgICAgICBvcmlnaW5hbE1hcmtlci5wYXJlbnROb2RlLmFwcGVuZENoaWxkKHNlbGVjdGVkTWFya2VyKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgLy8gTWFrZSB0aGUgcGF0aCB1c2UgdGhpcyBuZXcgbWFya2VyIHdoaWxlIGl0IGlzIHNlbGVjdGVkLgogICAgICAgICAgICAgICAgICAgIGNvbnN0IG1hcmtlckF0dHJpYnV0ZSA9IHNlbGVjdGVkRWRnZS5sYWJlbC5zdGFydE1hcmtlcklkCiAgICAgICAgICAgICAgICAgICAgICAgID8gJ21hcmtlci1zdGFydCcKICAgICAgICAgICAgICAgICAgICAgICAgOiAnbWFya2VyLWVuZCc7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fbGFzdFNlbGVjdGVkRWRnZUdyb3VwCiAgICAgICAgICAgICAgICAgICAgICAgIC5zZWxlY3RBbGwoJ3BhdGguZWRnZWxpbmUnKQogICAgICAgICAgICAgICAgICAgICAgICAuc3R5bGUobWFya2VyQXR0cmlidXRlLCBgdXJsKCMke3NlbGVjdGVkTWFya2VySWR9KWApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIG5vdCh4KSB7CiAgICAgICAgICAgIHJldHVybiAheDsKICAgICAgICB9CiAgICB9OwogICAgVGZHcmFwaC50ZW1wbGF0ZSA9IGh0bWwgYAogICAgPHN0eWxlPgogICAgICAuY29udGFpbmVyIHsKICAgICAgICB3aWR0aDogMTAwJTsKICAgICAgICBoZWlnaHQ6IDEwMCU7CiAgICAgICAgYmFja2dyb3VuZDogd2hpdGU7CiAgICAgICAgYm94LXNoYWRvdzogMCAxcHggNXB4IHJnYmEoMCwgMCwgMCwgMC4yKTsKICAgICAgfQoKICAgICAgLnZlcnRpY2FsIHsKICAgICAgICB3aWR0aDogMTAwJTsKICAgICAgICBoZWlnaHQ6IDEwMCU7CiAgICAgICAgQGFwcGx5IC0tbGF5b3V0LXZlcnRpY2FsOwogICAgICB9CgogICAgICAuYXV0byB7CiAgICAgICAgQGFwcGx5IC0tbGF5b3V0LWZsZXgtYXV0bzsKICAgICAgICBAYXBwbHkgLS1sYXlvdXQtdmVydGljYWw7CiAgICAgIH0KCiAgICAgIGgyIHsKICAgICAgICB0ZXh0LWFsaWduOiBjZW50ZXI7CiAgICAgIH0KCiAgICAgIHBhcGVyLWJ1dHRvbiB7CiA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JhcmNoeVBhcmFtcyIsIHZvaWQgMCk7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7CiAgICAgICAgICAgIHR5cGU6IE9iamVjdCwKICAgICAgICAgICAgbm90aWZ5OiB0cnVlLAogICAgICAgIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgT2JqZWN0KQogICAgXSwgVGZHcmFwaC5wcm90b3R5cGUsICJwcm9ncmVzcyIsIHZvaWQgMCk7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7IHR5cGU6IFN0cmluZyB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIFN0cmluZykKICAgIF0sIFRmR3JhcGgucHJvdG90eXBlLCAidGl0bGUiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBTdHJpbmcsCiAgICAgICAgICAgIG5vdGlmeTogdHJ1ZSwKICAgICAgICB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIFN0cmluZykKICAgIF0sIFRmR3JhcGgucHJvdG90eXBlLCAic2VsZWN0ZWROb2RlIiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsKICAgICAgICAgICAgdHlwZTogT2JqZWN0LAogICAgICAgICAgICBub3RpZnk6IHRydWUsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBPYmplY3QpCiAgICBdLCBUZkdyYXBoLnByb3RvdHlwZSwgInNlbGVjdGVkRWRnZSIsIHZvaWQgMCk7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7IHR5cGU6IE9iamVjdCB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIE9iamVjdCkKICAgIF0sIFRmR3JhcGgucHJvdG90eXBlLCAiX2xhc3RTZWxlY3RlZEVkZ2VHcm91cCIsIHZvaWQgMCk7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7CiAgICAgICAgICAgIHR5cGU6IFN0cmluZywKICAgICAgICAgICAgbm90aWZ5OiB0cnVlLAogICAgICAgIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgU3RyaW5nKQogICAgXSwgVGZHcmFwaC5wcm90b3R5cGUsICJoaWdobGlnaHRlZE5vZGUiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoeyB0eXBlOiBTdHJpbmcgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBTdHJpbmcpCiAgICBdLCBUZkdyYXBoLnByb3RvdHlwZSwgImNvbG9yQnkiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBPYmplY3QsCiAgICAgICAgICAgIG5vdGlmeTogdHJ1ZSwKICAgICAgICAgICAgcmVhZE9ubHk6IHRydWUsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBPYmplY3QpCiAgICBdLCBUZkdyYXBoLnByb3RvdHlwZSwgImNvbG9yQnlQYXJhbXMiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBPYmplY3QsCiAgICAgICAgICAgIHJlYWRPbmx5OiB0cnVlLAogICAgICAgICAgICBub3RpZnk6IHRydWUsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBPYmplY3QpCiAgICBdLCBUZkdyYXBoLnByb3RvdHlwZSwgInJlbmRlckhpZXJhcmNoeSIsIHZvaWQgMCk7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwc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ZhbnQgaWYgYWxsU3RlcHNNb2RlRW5hYmxlZC4gVGhlIHNwZWNpZmljIHN0ZXAgZm9yIHdoaWNoIHRvIGZldGNoIGhlYWx0aCBwaWxscyBmcm9tIHRoZQogICAgICAgICAgICAvLyBzZXJ2ZXIgZm9yLgogICAgICAgICAgICB0aGlzLnNwZWNpZmljSGVhbHRoUGlsbFN0ZXAgPSAwOwogICAgICAgICAgICB0aGlzLmNvbXBhdE5vZGVUaXRsZSA9ICdUUFUgQ29tcGF0aWJpbGl0eSc7CiAgICAgICAgfQogICAgICAgIGZpdCgpIHsKICAgICAgICAgICAgdGhpcy4kLmdyYXBoLmZpdCgpOwogICAgICAgIH0KICAgICAgICAvKiogVHJ1ZSBpZiB0aGUgcHJvZ3Jlc3MgaXMgbm90IGNvbXBsZXRlIHlldCAoPCAxMDAgJSkuICovCiAgICAgICAgX2lzTm90Q29tcGxldGUocHJvZ3Jlc3MpIHsKICAgICAgICAgICAgcmV0dXJuIHByb2dyZXNzLnZhbHVlIDwgMTAwOwogICAgICAgIH0KICAgICAgICBfZ2V0Q29udGFpbmVyQ2xhc3MocHJvZ3Jlc3MpIHsKICAgICAgICAgICAgdmFyIHJlc3VsdCA9ICdjb250YWluZXInOwogICAgICAgICAgICBpZiAocHJvZ3Jlc3MuZXJyb3IpIHsKICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnIGVycm9yJzsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5faXNOb3RDb21wbGV0ZShwcm9ncmVzcykpIHsKICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnIGxvYWRpbmcnOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgfQogICAgICAgIF9vbk5vZGVJbmNsdXNpb25Ub2dnbGVkKGV2ZW50KSB7CiAgICAgICAgICAgIHRoaXMuJC5ncmFwaC5ub2RlVG9nZ2xlRXh0cmFjdChldmVudC5kZXRhaWwubmFtZSk7CiAgICAgICAgfQogICAgICAgIF9vbk5vZGVTZXJpZXNHcm91cFRvZ2dsZWQoZXZlbnQpIHsKICAgICAgICAgICAgdGhpcy4kLmdyYXBoLm5vZGVUb2dnbGVTZXJpZXNHcm91cChldmVudC5kZXRhaWwubmFtZSk7CiAgICAgICAgfQogICAgICAgIF91cGRhdGVOb2RlSW5jbHVkZSgpIHsKICAgICAgICAgICAgY29uc3Qgbm9kZSA9ICF0aGlzLnJlbmRlckhpZXJhcmNoeQogICAgICAgICAgICAgICAgPyBudWxsCiAgICAgICAgICAgICAgICA6IHRoaXMucmVuZGVySGllcmFyY2h5LmdldE5vZGVCeU5hbWUodGhpcy5zZWxlY3RlZE5vZGUpOwogICAgICAgICAgICB0aGlzLl9zZWxlY3RlZE5vZGVJbmNsdWRlID0gbm9kZQogICAgICAgICAgICAgICAgPyBub2RlLmluY2x1ZGUKICAgICAgICAgICAgICAgIDogSW5jbHVzaW9uVHlwZS5VTlNQRUNJRklFRDsKICAgICAgICB9CiAgICB9OwogICAgVGZHcmFwaEJvYXJkLnRlbXBsYXRlID0gaHRtbCBgCiAgICA8c3R5bGU+CiAgICAgIDo6aG9zdCB7CiAgICAgICAgZGlzcGxheTogYmxvY2s7CiAgICAgIH0KCiAgICAgIC9kZWVwLyAuY2xvc2UgewogICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTsKICAgICAgICBjdXJzb3I6IHBvaW50ZXI7CiAgICAgICAgbGVmdDogMTVweDsKICAgICAgICBib3R0b206IDE1cHg7CiAgICAgIH0KCiAgICAgIC5jb250YWluZXIgewogICAgICAgIHdpZHRoOiAxMDAlOwogICAgICAgIGhlaWdodDogMTAwJTsKICAgICAgICBvcGFjaXR5OiAxOwogICAgICB9CgogICAgICAuY29udGFpbmVyLmxvYWRpbmcgewogICAgICAgIGN1cnNvcjogcHJvZ3Jlc3M7CiAgICAgICAgb3BhY2l0eTogMC4xOwogICAgICB9CgogICAgICAuY29udGFpbmVyLmxvYWRpbmcuZXJyb3IgewogICAgICAgIGN1cnNvcjogYXV0bzsKICAgICAgfQoKICAgICAgI2luZm8gewogICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTsKICAgICAgICByaWdodDogNXB4OwogICAgICAgIHRvcDogNXB4OwogICAgICAgIHBhZGRpbmc6IDBweDsKICAgICAgICBtYXgtd2lkdGg6IDM4MHB4OwogICAgICAgIG1pbi13aWR0aDogMzIwcHg7CiAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogcmdiYSgyNTUsIDI1NSwgMjU1LCAwLjkpOwogICAgICAgIEBhcHBseSAtLXNoYWRvdy1lbGV2YXRpb24tMmRwOwogICAgICB9CgogICAgICAjbWFpbiB7CiAgICAgICAgd2lkdGg6IDEwMCU7CiAgICAgICAgaGVpZ2h0OiAxMDAlOwogICAgICB9CgogICAgICAjcHJvZ3Jlc3MtYmFyIHsKICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47CiAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjsKICAgICAgICB3aWR0aDogMTAwJTsKICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7CiAgICAgICAgdG9wOiA0MHB4OwogICAgICAgIGxlZnQ6IDA7CiAgICAgICAgZm9udC1zaXplOiAxM3B4OwogICAgICB9CgogICAgICAjcHJvZ3Jlc3MtbXNnIHsKICAgICAgICBtYXJnaW4tYm90dG9tOiA1cHg7CiAgICAgICAgd2hpdGUtc3BhY2U6IHByZS13cmFwOwogICAgICAgIHdpZHRoOiA0MDBweDsKICAgICAgfQoKICAgICAgcGFwZXItcHJvZ3Jlc3MgewogICAgICAgIHdpZHRoOiA0MDBweDsKICAgICAgICAtLXBhcGVyLXByb2dyZXNzLWhlaWdodDogNnB4OwogICAgICAgIC0tcGFwZXItcHJvZ3Jlc3MtYWN0aXZlLWNvbG9yOiAjZjM5MTNlOwogICAgICB9CgogICAgICAuY29udGV4dC1tZW51IHsKICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7CiAgICAgICAgZGlzcGxheTogbm9uZTsKICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjZTJlMmUyOwogICAgICAgIGJvcmRlci1yYWRpdXM6IDJweDsKICAgICAgICBmb250LXNpemU6IDE0cHg7CiAgICAgICAgbWluLXdpZHRoOiAxNTBweDsKICAgICAgICBib3JkZXI6IDFweCBzb2xpZCAjZDRkNGQ0OwogICAgICB9CgogICAgICAvZGVlcC8gLmNvbnRleHQtbWVudSB1bCB7CiAgICAgICAgbGlzdC1zdHlsZS10eXBlOiBub25lOwogICAgICAgIG1hcmdpbjogMDsKICAgICAgICBwYWRkaW5nOiAwOwogICAgICAgIGN1cnNvcjogZGVmYXVsdDsKICAgICAgfQoKICAgICAgL2RlZXAvIC5jb250ZXh0LW1lbnUgdWwgbGkgewogICAgICAgIHBhZGRpbmc6IDRweCAxNnB4OwogICAgICB9CgogICAgICAvZGVlcC8gLmNvbnRleHQtbWVudSB1bCBsaTpob3ZlciB7CiAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogI2YzOTEzZTsKICAgICAgICBjb2xvcjogd2hpdGU7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgICA8dGVtcGxhdGUgaXM9ImRvbS1pZiIgaWY9IltbX2lzTm90Q29tcGxldGUocHJvZ3Jlc3MpXV0iPgogICAgICA8ZGl2IGlkPSJwcm9ncmVzcy1iYXIiPgogICAgICAgIDxkaXYgaWQ9InByb2dyZXNzLW1zZyI+W1twcm9ncmVzcy5tc2ddXTwvZGl2PgogICAgICAgIDxwYXBlci1wcm9ncmVzcyB2YWx1ZT0iW1twcm9ncmVzcy52YWx1ZV1dIj48L3BhcGVyLXByb2dyZXNzPgogICAgICA8L2Rpdj4KICAgIDwvdGVtcGxhdGU+CiAgICA8ZGl2IGNsYXNzJD0iW1tfZ2V0Q29udGFpbmVyQ2xhc3MocHJvZ3Jl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AgICAgICBub3RpZnk6IHRydWUsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBCb29sZWFuKQogICAgXSwgVGZHcmFwaEJvYXJkLnByb3RvdHlwZSwgImFsbFN0ZXBzTW9kZUVuYWJsZWQiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBOdW1iZXIsCiAgICAgICAgICAgIG5vdGlmeTogdHJ1ZSwKICAgICAgICB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIE51bWJlcikKICAgIF0sIFRmR3JhcGhCb2FyZC5wcm90b3R5cGUsICJzcGVjaWZpY0hlYWx0aFBpbGxTdGVwIiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsgdHlwZTogTnVtYmVyIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgTnVtYmVyKQogICAgXSwgVGZHcmFwaEJvYXJkLnByb3RvdHlwZSwgImhlYWx0aFBpbGxTdGVwSW5kZXgiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBTdHJpbmcsCiAgICAgICAgICAgIG5vdGlmeTogdHJ1ZSwKICAgICAgICB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIFN0cmluZykKICAgIF0sIFRmR3JhcGhCb2FyZC5wcm90b3R5cGUsICJzZWxlY3RlZE5vZGUiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBTdHJpbmcsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBTdHJpbmcpCiAgICBdLCBUZkdyYXBoQm9hcmQucHJvdG90eXBlLC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VkIGlucHV0LgogICAgICAgIGdldCBfcmVnZXhJbnB1dCgpIHsKICAgICAgICAgICAgdmFyIHJlbmRlckhpZXJhcmNoeSA9IHRoaXMucmVuZGVySGllcmFyY2h5OwogICAgICAgICAgICB2YXIgcmF3UmVnZXhJbnB1dCA9IHRoaXMuX3Jhd1JlZ2V4SW5wdXQ7CiAgICAgICAgICAgIHJldHVybiByYXdSZWdleElucHV0LnRyaW0oKTsKICAgICAgICB9CiAgICAgICAgX3JlZ2V4SW5wdXRDaGFuZ2VkKCkgewogICAgICAgICAgICB2YXIgcmVnZXhJbnB1dCA9IHRoaXMuX3JlZ2V4SW5wdXQ7CiAgICAgICAgICAgIHRoaXMuX3JlcXVlc3RTZWFyY2goKTsKICAgICAgICB9CiAgICAgICAgX2NsZWFyU2VhcmNoUmVzdWx0cygpIHsKICAgICAgICAgICAgdGhpcy5zZXQoJ19yZWdleE1hdGNoZXMnLCBbXSk7CiAgICAgICAgfQogICAgICAgIF9yZXF1ZXN0U2VhcmNoKCkgewogICAgICAgICAgICBpZiAodGhpcy5fc2VhcmNoUGVuZGluZykgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0aGlzLl9yZWdleElucHV0ID09PSB0aGlzLl9wcmV2aW91c1JlZ2V4SW5wdXQpIHsKICAgICAgICAgICAgICAgIC8vIE5vIG5ldyBzZWFyY2ggaXMgbmVlZGVkLgogICAgICAgICAgICAgICAgdGhpcy5fc2VhcmNoUGVuZGluZyA9IGZhbHNlOwogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX3NlYXJjaFBlbmRpbmcgPSB0cnVlOwogICAgICAgICAgICB0aGlzLl9leGVjdXRlU2VhcmNoKCk7CiAgICAgICAgICAgIC8vIEFmdGVyIHNvbWUgdGltZSwgcGVyaGFwcyBleGVjdXRlIGFub3RoZXIgc2VhcmNoLgogICAgICAgICAgICB0aGlzLmFzeW5jKCgpID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuX3NlYXJjaFBlbmRpbmcgPSBmYWxzZTsKICAgICAgICAgICAgICAgIHRoaXMuX3JlcXVlc3RTZWFyY2goKTsKICAgICAgICAgICAgfSwgdGhpcy5fc2VhcmNoVGltZW91dERlbGF5KTsKICAgICAgICB9CiAgICAgICAgX2V4ZWN1dGVTZWFyY2goKSB7CiAgICAgICAgICAgIHRoaXMuX3ByZXZpb3VzUmVnZXhJbnB1dCA9IHRoaXMuX3JlZ2V4SW5wdXQ7CiAgICAgICAgICAgIGlmICghdGhpcy5fcmVnZXhJbnB1dCkgewogICAgICAgICAgICAgICAgdGhpcy5fY2xlYXJTZWFyY2hSZXN1bHRzKCk7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgIHZhciByZWdleCA9IG5ldyBSZWdFeHAodGhpcy5fcmVnZXhJbnB1dCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY2F0Y2ggKGUpIHsKICAgICAgICAgICAgICAgIC8vIFRoZSByZWd1bGFyIGV4cHJlc3Npb24gaXMgaW52YWxpZC4KICAgICAgICAgICAgICAgIHRoaXMuX2NsZWFyU2VhcmNoUmVzdWx0cygpOwogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNvbnN0IG1hdGNoZWROb2RlcyA9IFtdOwogICAgICAgICAgICBjb25zdCBub2RlTWFwID0gdGhpcy5yZW5kZXJIaWVyYXJjaHkuaGllcmFyY2h5LmdldE5vZGVNYXAoKTsKICAgICAgICAgICAgbG9kYXNoLmVhY2gobm9kZU1hcCwgKF8sIG5vZGVOYW1lKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAobWF0Y2hlZE5vZGVzLmxlbmd0aCA+PSB0aGlzLl9tYXhSZWdleFJlc3VsdHMpIHsKICAgICAgICAgICAgICAgICAgICAvLyBUZXJtaW5hdGUuCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKCFyZWdleC50ZXN0KG5vZGVOYW1lKSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIG1hdGNoZWROb2Rlcy5wdXNoKG5vZGVOYW1lKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHRoaXMuc2V0KCdfcmVnZXhNYXRjaGVzJywgbWF0Y2hlZE5vZGVzKTsKICAgICAgICB9CiAgICAgICAgX21hdGNoQ2xpY2tlZChlKSB7CiAgICAgICAgICAgIGNvbnN0IG5vZGUgPSBlLm1vZGVsLml0ZW07CiAgICAgICAgICAgIHRoaXMuc2V0KCdzZWxlY3RlZE5vZGUnLCBub2RlKTsKICAgICAgICB9CiAgICB9OwogICAgVGZHcmFwaE5vZGVTZWFyY2gudGVtcGxhdGUgPSBodG1sIGAKICAgIDxkaXYgaWQ9InNlYXJjaC1jb250YWluZXIiPgogICAgICA8cGFwZXItaW5wdXQKICAgICAgICBpZD0icnVucy1yZWdleCIKICAgICAgICBsYWJlbD0iU2VhcmNoIG5vZGVzLiBSZWdleGVzIHN1cHBvcnRlZC4iCiAgICAgICAgdmFsdWU9Int7X3Jhd1JlZ2V4SW5wdXR9fSIKICAgICAgPgogICAgICA8L3BhcGVyLWlucHV0PgogICAgICA8ZGl2IGlkPSJzZWFyY2gtcmVzdWx0cy1hbmNob3IiPgogICAgICAgIDxkaXYgaWQ9InNlYXJjaC1yZXN1bHRzIj4KICAgICAgICAgIDx0ZW1wbGF0ZSBpcz0iZG9tLXJlcGVhdCIgaXRlbXM9IltbX3JlZ2V4TWF0Y2hlc11dIj4KICAgICAgICAgICAgPGRpdiBpZD0ic2VhcmNoLW1hdGNoIiBvbi1jbGljaz0iX21hdGNoQ2xpY2tlZCI+W1tpdGVtXV08L2Rpdj4KICAgICAgICAgIDwvdGVtcGxhdGU+CiAgICAgICAgPC9kaXY+CiAgICAgIDwvZGl2PgogICAgPC9kaXY+CiAgICA8c3R5bGU+CiAgICAgICNzZWFyY2gtY29udGFpbmVyIHsKICAgICAgICB3aWR0aDogMTAwJTsKICAgICAgICBvdmVyZmxvdzogdmlzaWJsZTsKICAgICAgfQoKICAgICAgI3J1bnMtcmVnZXggewogICAgICAgIHdpZHRoOiAxMDAlOwogICAgICB9CgogICAgICAjc2VhcmNoLXJlc3VsdHMtYW5jaG9yIHsKICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7CiAgICAgIH0KCiAgICAgICNzZWFyY2gtcmVzdWx0cyB7CiAgICAgICAgY29sb3I6ICNmZmY7CiAgICAgICAgcG9zaXRpb246IGFic29sdXRlOwogICAgICAgIG1heC1oZWlnaHQ6IDIwMHB4OwogICAgICAgIG92ZXJmbG93LXg6IGhpZGRlbjsKICAgICAgICBvdmVyZmxvdy15OiBhdXRvOwogICAgICAgIHRleHQtYWxpZ246IHJpZ2h0OwogICAgICAgIG1heC13aWR0aDogMTAwJTsKICAgICAgICBib3gtc2l6aW5nOiBib3JkZXItYm94OwogICAgICB9CgogICAgICAjc2VhcmNoLW1hdGNoIHsKICAgICAgICBiYWNrZ3JvdW5kOiB2YXIoLS10Yi1vcmFuZ2Utc3Ryb25nKTsKICAgICAgICBwYWRkaW5nOiAzcHg7CiAgICAgICAgZmxvYXQ6IHJpZ2h0OwogICAgICAgIHdpZHRoOiAxMDAlOwogICAgICAgIGJveC1zaXppbmc6IGJvcmRlci1ib3g7CiAgICAgICAgZGlyZWN0aW9uOiBydGw7CiAgICAgIH0KCiAgICAgICNzZWFyY2gtbWF0Y2g6aG92ZXIgewogICAgICAgIGJhY2tncm91bmQ6IHZhcigtLXRiLW9yYW5nZS13ZWFrKTsKICAgICAgICBjdXJzb3I6IHBvaW50ZXI7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgYDsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsgdHlwZTogT2JqZWN0IH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgT2JqZWN0KQogICAgXSwgVGZHcmFwaE5vZGVTZWFyY2gucHJvdG90eXBlLCAicmVuZGVySGllcmFyY2h5Iiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsKICAgICAgICAgICAgdHlwZTogU3RyaW5nLAogICAgICAgICAgICBub3RpZnk6IHRydWUsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBTdHJpbmcpCiAgICBdLCBUZkdyYXBoTm9kZVNlYXJjaC5wcm90b3R5cGUsICJzZWxlY3RlZE5vZGUiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBTdHJpbmcsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBTdHJpbmcpCiAgICBdLCBUZkdyYXBoTm9kZVNlYXJjaC5wcm90b3R5cGUsICJfcmF3UmVnZXhJbnB1dCIsIHZvaWQgMCk7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7CiAgICAgICAgICAgIHR5cGU6IFN0cmluZywKICAgICAgICB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIFN0cmluZykKICAgIF0sIFRmR3JhcGhOb2RlU2VhcmNoLnByb3RvdHlwZSwgIl9wcmV2aW91c1JlZ2V4SW5wdXQiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBOdW1iZXIsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBOdW1iZXIpCiAgICBdLCBUZkdyYXBoTm9kZVNlYXJjaC5wcm90b3R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vuc2UgZm9yIHRoZSBzcGVjaWZpYyBsYW5ndWFnZSBnb3Zlcm5pbmcgcGVybWlzc2lvbnMgYW5kCiAgICBsaW1pdGF0aW9ucyB1bmRlciB0aGUgTGljZW5zZS4KICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCiAgICBjb25zdCBERVZJQ0VfTkFNRV9SRUdFWCA9IC9kZXZpY2U6KFteOl0rOlswLTldKykkLzsKICAgIC8qKgogICAgICogRGlzcGxheSBvbmx5IGRldmljZXMgbWF0Y2hpbmcgb25lIG9mIHRoZSBmb2xsb3dpbmcgcmVnZXguCiAgICAgKi8KICAgIGNvbnN0IERFVklDRV9OQU1FU19JTkNMVURFID0gWwogICAgICAgIHsKICAgICAgICAgICAgLy8gRG9uJ3QgaW5jbHVkZSBHUFUgc3RyZWFtLCBtZW1jcHksIGV0Yy4gZGV2aWNlcwogICAgICAgICAgICByZWdleDogREVWSUNFX05BTUVfUkVHRVgsCiAgICAgICAgfSwKICAgIF07CiAgICAvKioKICAgICAqIFN0YXRzIGZyb20gZGV2aWNlIG5hbWVzIHRoYXQgbWF0Y2ggdGhlc2UgcmVnZXhlcyB3aWxsIGJlIGRpc2FibGVkIGJ5IGRlZmF1bHQuCiAgICAgKiBUaGUgdXNlciBjYW4gc3RpbGwgdHVybiBvbiBhIGRldmljZSBieSBzZWxlY3RpbmcgdGhlIGNoZWNrYm94IGluIHRoZSBkZXZpY2UgbGlzdC4KICAgICAqLwogICAgY29uc3QgREVWSUNFX1NUQVRTX0RFRkFVTFRfT0ZGID0gW107CiAgICB2YXIgQ29sb3JCeSQxOwogICAgKGZ1bmN0aW9uIChDb2xvckJ5KSB7CiAgICAgICAgQ29sb3JCeVsiQ09NUFVURV9USU1FIl0gPSAiY29tcHV0ZV90aW1lIjsKICAgICAgICBDb2xvckJ5WyJNRU1PUlkiXSA9ICJtZW1vcnkiOwogICAgICAgIENvbG9yQnlbIlNUUlVDVFVSRSJdID0gInN0cnVjdHVyZSI7CiAgICAgICAgQ29sb3JCeVsiWExBX0NMVVNURVIiXSA9ICJ4bGFfY2x1c3RlciI7CiAgICAgICAgQ29sb3JCeVsiT1BfQ09NUEFUSUJJTElUWSJdID0gIm9wX2NvbXBhdGliaWxpdHkiOwogICAgfSkoQ29sb3JCeSQxIHx8IChDb2xvckJ5JDEgPSB7fSkpOwogICAgY29uc3QgR1JBRElFTlRfQ09NUEFUSUJMRV9DT0xPUl9CWSA9IG5ldyBTZXQoWwogICAgICAgIENvbG9yQnkkMS5DT01QVVRFX1RJTUUsCiAgICAgICAgQ29sb3JCeSQxLk1FTU9SWSwKICAgIF0pOwogICAgbGV0IFRmR3JhcGhDb250cm9scyA9IGNsYXNzIFRmR3JhcGhDb250cm9scyBleHRlbmRzIExlZ2FjeUVsZW1lbnRNaXhpbihQb2x5bWVyRWxlbWVudCkgewogICAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgICAgICBzdXBlciguLi5hcmd1bWVudHMpOwogICAgICAgICAgICAvLyBQdWJsaWMgQVBJLgogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQHR5cGUgez90Zl9ncmFwaF9wcm90by5TdGVwU3RhdHN9CiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLnN0YXRzID0gbnVsbDsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEB0eXBlIHs/T2JqZWN0PHN0cmluZywgYm9vbGVhbj59CiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmRldmljZXNGb3JTdGF0cyA9IG51bGw7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBAdHlwZSB7IUNvbG9yQnl9CiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmNvbG9yQnkgPSBDb2xvckJ5JDEuU1RSVUNUVVJFOwogICAgICAgICAgICB0aGlzLmRhdGFzZXRzID0gW107CiAgICAgICAgICAgIHRoaXMuX3NlbGVjdGVkUnVuSW5kZXggPSAwOwogICAgICAgICAgICB0aGlzLnRyYWNlSW5wdXRzID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuX3NlbGVjdGVkVGFnSW5kZXggPSAwOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQHR5cGUge3RmX2dyYXBoX2NvbW1vbi5TZWxlY3Rpb25UeXBlfQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fc2VsZWN0ZWRHcmFwaFR5cGUgPSBTZWxlY3Rpb25UeXBlLk9QX0dSQVBIOwogICAgICAgICAgICB0aGlzLnNob3dTZXNzaW9uUnVuc0Ryb3Bkb3duID0gdHJ1ZTsKICAgICAgICAgICAgdGhpcy5zaG93VXBsb2FkQnV0dG9uID0gdHJ1ZTsKICAgICAgICAgICAgdGhpcy5fbGVnZW5kT3BlbmVkID0gdHJ1ZTsKICAgICAgICB9CiAgICAgICAgX3hsYUNsdXN0ZXJzUHJvdmlkZWQocmVuZGVySGllcmFyY2h5KSB7CiAgICAgICAgICAgIHJldHVybiAocmVuZGVySGllcmFyY2h5ICYmCiAgICAgICAgICAgICAgICByZW5kZXJIaWVyYXJjaHkuaGllcmFyY2h5ICYmCiAgICAgICAgICAgICAgICByZW5kZXJIaWVyYXJjaHkuaGllcmFyY2h5LnhsYUNsdXN0ZXJzLmxlbmd0aCA+IDApOwogICAgICAgIH0KICAgICAgICBfc3RhdHNDaGFuZ2VkKHN0YXRzKSB7CiAgICAgICAgICAgIGlmIChzdGF0cyA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIGRldmljZXNGb3JTdGF0cyA9IHt9OwogICAgICAgICAgICB2YXIgZGV2aWNlcyA9IGxvZGFzaC5lYWNoKHN0YXRzLmRldl9zdGF0cywgZnVuY3Rpb24gKGQpIHsKICAgICAgICAgICAgICAgIC8vIE9ubHkgY29uc2lkZXJlZCBpbmNsdWRlZCBkZXZpY2VzLgogICAgICAgICAgICAgICAgdmFyIGluY2x1ZGUgPSBsb2Rhc2guc29tZShERVZJQ0VfTkFNRVNfSU5DTFVERSwgZnVuY3Rpb24gKHJ1bGUpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gcnVsZS5yZWdleC50ZXN0KGQuZGV2aWNlKTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgLy8gRXhjbHVkZSBkZXZpY2UgbmFtZXMgdGhhdCBhcmUgaWdub3JlZCBieSBkZWZhdWx0LgogICAgICAgICAgICAgICAgdmFyIGV4Y2x1ZGUgPSBsb2Rhc2guc29tZShERVZJQ0VfU1RBVFNfREVGQVVMVF9PRkYsIGZ1bmN0aW9uIChydWxlKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJ1bGUucmVnZXgudGVzdChkLmRldmljZSk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIGlmIChpbmNsdWRlICYmICFleGNsdWRlKSB7CiAgICAgICAgICAgICAgICAgICAgZGV2aWNlc0ZvclN0YXRzW2QuZGV2aWNlXSA9IHRydWU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICB0aGlzLnNldCgnZGV2aWNlc0ZvclN0YXRzJywgZGV2aWNlc0ZvclN0YXRzKTsKICAgICAgICB9CiAgICAgICAgZ2V0IF9jdXJyZW50RGV2aWNlcygpIHsKICAgICAgICAgICAgdmFyIGRldmljZXNGb3JTdGF0cyA9IHRoaXMuZGV2aWNlc0ZvclN0YXRzOwogICAgICAgICAgICBjb25zdCBzdGF0cyA9IHRoaXMuc3RhdHM7CiAgICAgICAgICAgIGNvbnN0IGRldlN0YXRzID0gc3RhdHMgPyBzdGF0cy5kZXZfc3RhdHMgOiBbXTsKICAgICAgICAgICAgY29uc3QgYWxsRGV2aWNlcyA9IGRldlN0YXRzLm1hcCgoZCkgPT4gZC5kZXZpY2UpOwogICAgICAgICAgICBjb25zdCBkZXZpY2VzID0gYWxsRGV2aWNlcy5maWx0ZXIoKGRldmljZU5hbWUpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiBERVZJQ0VfTkFNRVNfSU5DTFVERS5zb21lKChydWxlKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJ1bGUucmVnZXgudGVzdChkZXZpY2VOYW1lKTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgLy8gRGV2aWNlcyBuYW1lcyBjYW4gYmUgbG9uZyBzbyB3ZSByZW1vdmUgdGhlIGxvbmdlc3QgY29tbW9uIHByZWZpeAogICAgICAgICAgICAvLyBiZWZvcmUgc2hvd2luZyB0aGUgZGV2aWNlcyBpbiBhIGxpc3QuCiAgICAgICAgICAgIGNvbnN0IHN1ZmZpeGVzID0gcmVtb3ZlQ29tbW9uUHJlZml4KGRldmljZXMpOwogICAgICAgICAgICBpZiAoc3VmZml4ZXMubGVuZ3RoID09IDEpIHsKICAgICAgICAgICAgICAgIGNvbnN0IGZvdW5kID0gc3VmZml4ZXNbMF0ubWF0Y2goREVWSUNFX05BTUVfUkVHRVgpOwogICAgICAgICAgICAgICAgaWYgKGZvdW5kKSB7CiAgICAgICAgICAgICAgICAgICAgc3VmZml4ZXNbMF0gPSBmb3VuZFsxXTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gZGV2aWNlcy5tYXAoKGRldmljZSwgaSkgPT4gewogICAgICAgICAgICAgICAgbGV0IGlnbm9yZWRNc2cgPSBudWxsOwogICAgICAgICAgICAgICAgLy8gVE9ETyhzdGVwaGFud2xlZSk6IHRoaXMgc2hvdWxkIHByb2JhYmx5IGJhaWwgb24gdGhlIGZpcnN0IG1hdGNoIG9yCiAgICAgICAgICAgICAgICAvLyBkbyBzb21ldGhpbmcgdXNlZnVsIHdpdGggbXVsdGlwbGUgcnVsZS5tc2dzLgogICAgICAgICAgICAgICAgREVWSUNFX1NUQVRTX0RFRkFVTFRfT0ZGLmZvckVhY2goKHJ1bGUpID0+IHsKICAgICAgICAgICAgICAgICAgICBpZiAocnVsZS5yZWdleC50ZXN0KGRldmljZSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWdub3JlZE1zZyA9IHJ1bGUubXNnOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgICAgICBkZXZpY2U6IGRldmljZSwKICAgICAgICAgICAgICAgICAgICBzdWZmaXg6IHN1ZmZpeGVzW2ldLAogICAgICAgICAgICAgICAgICAgIHVzZWQ6IGRldmljZXNGb3JTdGF0c1tkZXZpY2VdLAogICAgICAgICAgICAgICAgICAgIGlnbm9yZWRNc2c6IGlnbm9yZWRNc2csCiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgX2RldmljZUNoZWNrYm94Q2xpY2tlZChldmVudCkgewogICAgICAgICAgICAvLyBVcGRhdGUgdGhlIGRldmljZSBtYXAuCiAgICAgICAgICAgIGNvbnN0IGlucHV0ID0gZXZlbnQudGFyZ2V0OwogICAgICAgICAgICBjb25zdCBkZXZpY2VzRm9yU3RhdHMgPSBPYmplY3QuYXNzaWduKHt9LCB0aGlzLmRldmljZXNGb3JTdGF0cyk7CiAgICAgICAgICAgIGNvbnN0IGRldmljZSA9IGlucHV0LnZhbHVlOwogICAgICAgICAgICBpZiAoaW5wdXQuY2hlY2tlZCkgewogICAgICAgICAgICAgICAgZGV2aWNlc0ZvclN0YXRzW2RldmljZV0gPSB0cnVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgZGVsZXRlIGRldmljZXNGb3JTdGF0c1tkZXZpY2VdOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuc2V0KCdkZXZpY2VzRm9yU3RhdHMnLCBkZXZpY2VzRm9yU3RhdHMpOwogICAgICAgIH0KICAgICAgICBfbnVtVGFncyhkYXRhc2V0cywgX3NlbGVjdGVkUnVuSW5kZXgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2dldFRhZ3MoZGF0YXNldHMsIF9zZWxlY3RlZFJ1bkluZGV4KS5sZW5ndGg7CiAgICAgICAgfQogICAgICAgIF9nZXRUYWdzKGRhdGFzZXRzLCBfc2VsZWN0ZWRSdW5JbmRleCkgewogICAgICAgICAgICBpZiAoIWRhdGFzZXRzIHx8ICFkYXRhc2V0c1tfc2VsZWN0ZWRSdW5JbmRleF0pIHsKICAgICAgICAgICAgICAgIHJldHVybiBbXTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gZGF0YXNldHNbX3NlbGVjdGVkUnVuSW5kZXhdLnRhZ3M7CiAgICAgICAgfQogICAgICAgIF9maXQoKSB7CiAgICAgICAgICAgIHRoaXMuZmlyZSgnZml0LXRhcCcpOwogICAgICAgIH0KICAgICAgICBfaXNHcmFkaWVudENvbG9yaW5nKHN0YXRzLCBjb2xvckJ5KSB7CiAgICAgICAgICAgIHJldHVybiBHUkFESUVOVF9DT01QQVRJQkxFX0NPTE9SX0JZLmhhcyhjb2xvckJ5KSAmJiBzdGF0cyAhPSBudWxsOwogICAgICAgIH0KICAgICAgICBfZXF1YWxzKGEsIGIpIHsKICAgICAgICAgICAgcmV0dXJuIGEgPT09IGI7CiAgICAgICAgfQogICAgICAgIGdldCBfY3VycmVudERldmljZVBhcmFtcygpIHsKICAgICAgICAgICAgdmFyIGNvbG9yQnlQYXJhbXMgPSB0aGlzLmNvbG9yQnlQYXJhbXM7CiAgICAgICAgICAgIGNvbnN0IGRldmljZVBhcmFtcyA9IGNvbG9yQnlQYXJhbXMuZGV2aWNlLmZpbHRlcigocGFyYW0pID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiBERVZJQ0VfTkFNRVNfSU5DTFVERS5zb21lKChydWxlKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJ1bGUucmVnZXgudGVzdChwYXJhbS5kZXZpY2UpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICAvLyBSZW1vdmUgY29tbW9uIHByZWZpeCBhbmQgbWVyZ2UgYmFjayBjb3JyZXNwb25kaW5nIGNvbG9yLiBJZgogICAgICAgICAgICAvLyB0aGVyZSBpcyBvbmx5IG9uZSBkZXZpY2UgdGhlbiByZW1vdmUgZXZlcnl0aGluZyB1cCB0byAiL2RldmljZToiLgogICAgICAgICAgICBjb25zdCBzdWZmaXhlcyA9IHJlbW92ZUNvbW1vblByZWZpeChkZXZpY2VQYXJhbXMubWFwKChkKSA9PiBkLmRldmljZSkpOwogICAgICAgICAgICBpZiAoc3VmZml4ZXMubGVuZ3RoID09IDEpIHsKICAgICAgICAgICAgICAgIHZhciBmb3VuZCA9IHN1ZmZpeGVzWzBdLm1hdGNoKERFVklDRV9OQU1FX1JFR0VYKTsKICAgICAgICAgICAgICAgIGlmIChmb3VuZCkgewogICAgICAgICAgICAgICAgICAgIHN1ZmZpeGVzWzBdID0gZm91bmRbMV07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIGRldmljZVBhcmFtcy5tYXAoKGQsIGkpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiB7IGRldmljZTogc3VmZml4ZXNbaV0sIGNvbG9yOiBkLmNvbG9yIH07CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICBnZXQgX2N1cnJlbnRYbGFDbHVzdGVyUGFyYW1zKCkgewogICAgICAgICAgICB2YXIgY29sb3JCeVBhcmFtcyA9IHRoaXMuY29sb3JCeVBhcmFtczsKICAgICAgICAgICAgcmV0dXJuIGNvbG9yQnlQYXJhbXMueGxhX2NsdXN0ZXI7CiAgICAgICAgfQogICAgICAgIGdldCBfY3VycmVudEdyYWRpZW50UGFyYW1zKCkgewogICAgICAgICAgICB2YXIgY29sb3JCeVBhcmFtcyA9IHRoaXMuY29sb3JCeVBhcmFtczsKICAgICAgICAgICAgdmFyIGNvbG9yQnkgPSB0aGlzLmNvbG9yQnk7CiAgICAgICAgICAgIGlmICghdGhpcy5faXNHcmFkaWVudENvbG9yaW5nKHRoaXMuc3RhdHMsIGNvbG9yQnkpKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY29uc3QgcGFyYW1zID0gY29sb3JCeVBhcmFtc1tjb2xvckJ5XTsKICAgICAgICAgICAgbGV0IG1pblZhbHVlID0gcGFyYW1zLm1pblZhbHVlOwogICAgICAgICAgICBsZXQgbWF4VmFsdWUgPSBwYXJhbXMubWF4VmFsdWU7CiAgICAgICAgICAgIGlmIChjb2xvckJ5ID09PSBDb2xvckJ5JDEuTUVNT1JZKSB7CiAgICAgICAgICAgICAgICBtaW5WYWx1ZSA9IGNvbnZlcnRVbml0c1RvSHVtYW5SZWFkYWJsZShtaW5WYWx1ZSwgTUVNT1JZX1VOSVRTKTsKICAgICAgICAgICAgICAgIG1heFZhbHVlID0gY29udmVydFVuaXRzVG9IdW1hblJlYWRhYmxlKG1heFZhbHVlLCBNRU1PUllfVU5JVFMpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKGNvbG9yQnkgPT09IENvbG9yQnkkMS5DT01QVVRFX1RJTUUpIHsKICAgICAgICAgICAgICAgIG1pblZhbHVlID0gY29udmVydFVuaXRzVG9IdW1hblJlYWRhYmxlKG1pblZhbHVlLCBUSU1FX1VOSVRTKTsKICAgICAgICAgICAgICAgIG1heFZhbHVlID0gY29udmVydFVuaXRzVG9IdW1hblJlYWRhYmxlKG1heFZhbHVlLCBUSU1FX1VOSVRTKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgbWluVmFsdWUsCiAgICAgICAgICAgICAgICBtYXhWYWx1ZSwKICAgICAgICAgICAgICAgIHN0YXJ0Q29sb3I6IHBhcmFtcy5zdGFydENvbG9yLAogICAgICAgICAgICAgICAgZW5kQ29sb3I6IHBhcmFtcy5lbmRDb2xvciwKICAgICAgICAgICAgfTsKICAgICAgICB9CiAgICAgICAgZG93bmxvYWQoKSB7CiAgICAgICAgICAgIHRoaXMuJC5ncmFwaGRvd25sb2FkLmNsaWNrKCk7CiAgICAgICAgfQogICAgICAgIF91cGRhdGVGaWxlSW5wdXQoZSkgewogICAgICAgICAgICBjb25zdCBmaWxlID0gZS50YXJnZXQuZmlsZXNbMF07CiAgICAgICAgICAgIGlmICghZmlsZSkKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgLy8gU3RyaXAgb2ZmIGV2ZXJ5dGhpbmcgYmVmb3JlIHRoZSBsYXN0ICIvIiBhbmQgc3RyaXAgb2ZmIHRoZSBmaWxlCiAgICAgICAgICAgIC8vIGV4dGVuc2lvbiBpbiBvcmRlciB0byBnZXQgdGhlIG5hbWUgb2YgdGhlIFBORyBmb3IgdGhlIGdyYXBoLgogICAgICAgICAgICBsZXQgZmlsZVBhdGggPSBmaWxlLm5hbWU7CiAgICAgICAgICAgIGNvbnN0IGRvdEluZGV4ID0gZmlsZVBhdGgubGFzdEluZGV4T2YoJy4nKTsKICAgICAgICAgICAgaWYgKGRvdEluZGV4ID49IDApIHsKICAgICAgICAgICAgICAgIGZpbGVQYXRoID0gZmlsZVBhdGguc3Vic3RyaW5nKDAsIGRvdEluZGV4KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBjb25zdCBsYXN0U2xhc2hJbmRleCA9IGZpbGVQYXRoLmxhc3RJbmRleE9mKCcvJyk7CiAgICAgICAgICAgIGlmIChsYXN0U2xhc2hJbmRleCA+PSAwKSB7CiAgICAgICAgICAgICAgICBmaWxlUGF0aCA9IGZpbGVQYXRoLnN1YnN0cmluZyhsYXN0U2xhc2hJbmRleCArIDEpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX3NldERvd25sb2FkRmlsZW5hbWUoZmlsZVBhdGgpOwogICAgICAgICAgICB0aGlzLnNldCgnc2VsZWN0ZWRGaWxlJywgZSk7CiAgICAgICAgfQogICAgICAgIF9kYXRhc2V0c0NoYW5nZWQobmV3RGF0YXNldHMsIG9sZERhdGFzZXRzKSB7CiAgICAgICAgICAgIGlmIChvbGREYXRhc2V0cyAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICAvLyBTZWxlY3QgdGhlIGZpcnN0IGRhdGFzZXQgYnkgZGVmYXVsdC4KICAgICAgICAgICAgICAgIHRoaXMuX3NlbGVjdGVkUnVuSW5kZXggPSAwOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIF9jb21wdXRlU2VsZWN0aW9uKGRhdGFzZXRzLCBfc2VsZWN0ZWRSdW5JbmRleCwgX3NlbGVjdGVkVGFnSW5kZXgsIF9zZWxlY3RlZEdyYXBoVHlwZSkgewogICAgICAgICAgICBpZiAoIWRhdGFzZXRzW19zZWxlY3RlZFJ1bkluZGV4XSB8fAogICAgICAgICAgICAgICAgIWRhdGFzZXRzW19zZWxlY3RlZFJ1bkluZGV4XS50YWdzW19zZWxlY3RlZFRhZ0luZGV4XSkgewogICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIHJ1bjogZGF0YXNldHNbX3NlbGVjdGVkUnVuSW5kZXhdLm5hbWUsCiAgICAgICAgICAgICAgICB0YWc6IGRhdGFzZXRzW19zZWxlY3RlZFJ1bkluZGV4XS50YWdzW19zZWxlY3RlZFRhZ0luZGV4XS50YWcsCiAgICAgICAgICAgICAgICB0eXBlOiBfc2VsZWN0ZWRHcmFwaFR5cGUsCiAgICAgICAgICAgIH07CiAgICAgICAgfQogICAgICAgIF9zZWxlY3RlZFJ1bkluZGV4Q2hhbmdlZChydW5JbmRleCkgewogICAgICAgICAgICBpZiAoIXRoaXMuZGF0YXNldHMpCiAgICAgICAgICAgICAg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ZWN0aW9uVHlwZS5PUF9HUkFQSDsKICAgICAgICAgICAgfQogICAgICAgICAgICBjb25zdCBkYXRhc2V0Rm9yUnVuID0gZGF0YXNldHNbcnVuXTsKICAgICAgICAgICAgaWYgKGRhdGFzZXRGb3JSdW4udGFnc1t0YWddLnByb2ZpbGUpIHsKICAgICAgICAgICAgICAgIHJldHVybiBTZWxlY3Rpb25UeXBlLlBST0ZJTEU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGRhdGFzZXRGb3JSdW4udGFnc1t0YWddLmNvbmNlcHR1YWxHcmFwaCkgewogICAgICAgICAgICAgICAgcmV0dXJuIFNlbGVjdGlvblR5cGUuQ09OQ0VQVFVBTF9HUkFQSDsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gU2VsZWN0aW9uVHlwZS5PUF9HUkFQSDsKICAgICAgICB9CiAgICAgICAgX2dldEZpbGUoKSB7CiAgICAgICAgICAgIHRoaXMuJCQoJyNmaWxlJykuY2xpY2soKTsKICAgICAgICB9CiAgICAgICAgX3NldERvd25sb2FkRmlsZW5hbWUobmFtZSkgewogICAgICAgICAgICB0aGlzLiQuZ3JhcGhkb3dubG9hZC5zZXRBdHRyaWJ1dGUoJ2Rvd25sb2FkJywgbmFtZSArICcucG5nJyk7CiAgICAgICAgfQogICAgICAgIF9zdGF0c05vdE51bGwoc3RhdHMpIHsKICAgICAgICAgICAgcmV0dXJuIHN0YXRzICE9PSBudWxsOwogICAgICAgIH0KICAgICAgICBfdG9nZ2xlTGVnZW5kT3BlbigpIHsKICAgICAgICAgICAgdGhpcy5zZXQoJ19sZWdlbmRPcGVuZWQnLCAhdGhpcy5fbGVnZW5kT3BlbmVkKTsKICAgICAgICB9CiAgICAgICAgX2dldFRvZ2dsZVRleHQobGVnZW5kT3BlbmVkKSB7CiAgICAgICAgICAgIHJldHVybiBsZWdlbmRPcGVuZWQgPyAnQ2xvc2UgbGVnZW5kLicgOiAnRXhwYW5kIGxlZ2VuZC4nOwogIC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YXBlci1kcm9wZG93bi1tZW51LWlucHV0OiB7CiAgICAgICAgICBwYWRkaW5nOiAwOwogICAgICAgICAgY29sb3I6IGdyYXk7CiAgICAgICAgfQogICAgICAgIC0taXJvbi1pY29uLXdpZHRoOiAxNXB4OwogICAgICAgIC0taXJvbi1pY29uLWhlaWdodDogMTVweDsKICAgICAgICAtLXByaW1hcnktdGV4dC1jb2xvcjogZ3JheTsKICAgICAgICAtLXBhcGVyLWl0ZW0tbWluLWhlaWdodDogMzBweDsKICAgICAgfQoKICAgICAgcGFwZXItYnV0dG9uW3JhaXNlZF0ua2V5Ym9hcmQtZm9jdXMgewogICAgICAgIGZvbnQtd2VpZ2h0OiBub3JtYWw7CiAgICAgIH0KCiAgICAgIC5ydW4tZHJvcGRvd24gewogICAgICAgIC0tcGFwZXItaW5wdXQtY29udGFpbmVyOiB7CiAgICAgICAgICBwYWRkaW5nOiA4cHggMCA4cHggMTBweDsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIC5jb2xvci1kcm9wZG93biB7CiAgICAgICAgLS1wYXBlci1pbnB1dC1jb250YWluZXI6IHsKICAgICAgICAgIHBhZGRpbmc6IDlweCAwIDAgMTNweDsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIHRhYmxlIHsKICAgICAgICBib3JkZXItY29sbGFwc2U6IGNvbGxhcHNlOwogICAgICAgIGJvcmRlci1zcGFjaW5nOiAwOwogICAgICB9CgogICAgICB0YWJsZSB0ZCB7CiAgICAgICAgcGFkZGluZzogMDsKICAgICAgICBtYXJnaW46IDA7CiAgICAgIH0KCiAgICAgIC5hbGxjb250cm9scyB7CiAgICAgICAgcGFkZGluZzogMCAyMHB4IDIwcHg7CiAgICAgICAgZmxleC1ncm93OiAxOwogICAgICAgIG92ZXJmbG93LXk6IGF1dG87CiAgICAgIH0KCiAgICAgIC5sZWdlbmQtaG9sZGVyIHsKICAgICAgICBiYWNrZ3JvdW5kOiAjZTllOWU5OwogICAgICAgIGJvcmRlci10b3A6IDFweCBzb2xpZCAjY2NjOwogICAgICAgIGJveC1zaXppbmc6IGJvcmRlci1ib3g7CiAgICAgICAgY29sb3I6ICM1NTU7CiAgICAgICAgcGFkZGluZzogMTVweCAyMHB4OwogICAgICAgIHdpZHRoOiAxMDAlOwogICAgICB9CgogICAgICAudG9nZ2xlLWxlZ2VuZC1idXR0b24gewogICAgICAgIG1heC1oZWlnaHQ6IDIwcHg7CiAgICAgICAgbWF4LXdpZHRoOiAyMHB4OwogICAgICAgIHBhZGRpbmc6IDA7CiAgICAgIH0KCiAgICAgIC50b2dnbGUtbGVnZW5kLXRleHQgewogICAgICAgIHZlcnRpY2FsLWFsaWduOiBtaWRkbGU7CiAgICAgIH0KCiAgICAgIHBhcGVyLXJhZGlvLWJ1dHRvbiB7CiAgICAgICAgZGlzcGxheTogYmxvY2s7CiAgICAgICAgcGFkZGluZzogNXB4OwogICAgICB9CiAgICAgIHN2Zy5pY29uLAogICAgICB0Zi1ncmFwaC1pY29uIHsKICAgICAgICB3aWR0aDogNjBweDsKICAgICAgICBoZWlnaHQ6IDE4cHg7CiAgICAgIH0KICAgICAgLmRvbWFpblZhbHVlcyB7CiAgICAgICAgbWFyZ2luLWJvdHRvbTogMTBweDsKICAgICAgICB3aWR0aDogMTY1cHg7CiAgICAgIH0KICAgICAgLmRvbWFpblN0YXJ0IHsKICAgICAgICBmbG9hdDogbGVmdDsKICAgICAgfQogICAgICAuZG9tYWluRW5kIHsKICAgICAgICBmbG9hdDogcmlnaHQ7CiAgICAgIH0KICAgICAgLmNvbG9yQm94IHsKICAgICAgICB3aWR0aDogMjBweDsKICAgICAgfQoKICAgICAgLmltYWdlLWljb24gewogICAgICAgIHdpZHRoOiAyNHB4OwogICAgICAgIGhlaWdodDogMjRweDsKICAgICAgfQoKICAgICAgLmhlbHAtaWNvbiB7CiAgICAgICAgaGVpZ2h0OiAxNXB4OwogICAgICAgIG1hcmdpbjogMDsKICAgICAgICBwYWRkaW5nOiAwOwogICAgICB9CgogICAgICAuZ3JheSB7CiAgICAgICAgY29sb3I6ICM2NjY7CiAgICAgIH0KCiAgICAgIC50aXRsZSB7CiAgICAgICAgZm9udC1zaXplOiAxNnB4OwogICAgICAgIG1hcmdpbjogOHB4IDVweCA4cHggMDsKICAgICAgICBjb2xvcjogYmxhY2s7CiAgICAgIH0KICAgICAgLnRpdGxlIHNtYWxsIHsKICAgICAgICBmb250LXdlaWdodDogbm9ybWFsOwogICAgICB9CiAgICAgIC5kZXZpY2VMaXN0LAogICAgICAueGxhQ2x1c3Rlckxpc3QgewogICAgICAgIG1heC1oZWlnaHQ6IDIwMHB4OwogICAgICAgIG92ZXJmbG93LXk6IGF1dG87CiAgICAgIH0KCiAgICAgICNmaWxlIHsKICAgICAgICBwYWRkaW5nOiA4cHggMDsKICAgICAgfQoKICAgICAgLmNvbG9yLWxlZ2VuZC1yb3cgewogICAgICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgICAgY2xlYXI6IGJvdGg7CiAgICAgICAgZGlzcGxheTogZmxleDsKICAgICAgICBoZWlnaHQ6IDIwcHg7CiAgICAgICAgbWFyZ2luLXRvcDogNXB4OwogICAgICB9CgogICAgICAuY29sb3ItbGVnZW5kLXJvdyAubGFiZWwsCiAgICAgIC5jb2xvci1sZWdlbmQtcm93IHN2ZywKICAgICAgLmNvbG9yLWxlZ2VuZC1yb3cgdGYtZ3JhcGgtaWNvbiB7CiAgICAgICAgZmxleDogMCAwIDQwcHg7CiAgICAgICAgbWFyZ2luLXJpZ2h0OiAyMHB4OwogICAgICB9CgogICAgICAuZGV2aWNlcy1jaGVja2JveCBpbnB1dCB7CiAgICAgICAgdGV4dC1hbGlnbjogbGVmdDsKICAgICAgICB2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlOwogICAgICB9CgogICAgICAuY29udHJvbC1ob2xkZXIgLmljb24tYnV0dG9uIHsKICAgICAgICBmb250LXNpemU6IDE0cHg7CiAgICAgICAgbWFyZ2luOiAwIC01cHg7CiAgICAgICAgcGFkZGluZzogNXB4OwogICAgICB9CgogICAgICAuYnV0dG9uLXRleHQgewogICAgICAgIHBhZGRpbmctbGVmdDogMjBweDsKICAgICAgICB0ZXh0LXRyYW5zZm9ybTogbm9uZTsKICAgICAgfQoKICAgICAgLnVwbG9hZC1idXR0b24gewogICAgICAgIHdpZHRoOiAxNjVweDsKICAgICAgICBoZWlnaHQ6IDI1cHg7CiAgICAgICAgdGV4dC10cmFuc2Zvcm06IG5vbmU7CiAgICAgICAgbWFyZ2luLXRvcDogNHB4OwogICAgICB9CgogICAgICAuYnV0dG9uLWljb24gewogICAgICAgIHdpZHRoOiAyNnB4OwogICAgICAgIGhlaWdodDogMjZweDsKICAgICAgICBjb2xvcjogdmFyKC0tcGFwZXItb3JhbmdlLTUwMCk7CiAgICAgIH0KCiAgICAgIC5oaWRkZW4taW5wdXQgewogICAgICAgIGhlaWdodDogMHB4OwogICAgICAgIHdpZHRoOiAwcHg7CiAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjsKICAgICAgfQoKICAgICAgLmFsbGNvbnRyb2xzIC5jb250cm9sLWhvbGRlciB7CiAgICAgICAgY2xlYXI6IGJvdGg7CiAgICAgICAgZGlzcGxheTogZmxleDsKICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47CiAgICAgIH0KCiAgICAgIC5hbGxjb250cm9scyAuY29udHJvbC1ob2xkZXIgcGFwZXItcmFkaW8tZ3JvdXAgewogICAgICAgIG1hcmdpbi10b3A6IDVweDsKICAgICAgfQoKICAgICAgc3Bhbi5jb3VudGVyIHsKICAgICAgICBmb250LXNpemU6IDEzcHg7CiAgICAgICAgY29sb3I6IGdyYXk7CiAgICAgIH0KCiAgICAgIC5ydW5zIHBhcGVyLWl0ZW0gewogICAgICAgIC0tcGFwZXItaXRlbTogewogICAgICAgICAgd2hpdGUtc3BhY2U6IG5vd3JhcDsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIHRhYmxlLmNvbnRyb2wtaG9sZGVyIHsKICAgICAgICBib3JkZXI6IDA7CiAgICAgICAgYm9yZGVyLWNvbGxhcHNlOiBjb2xsYXBzZTsKICAgICAgfQoKICAgICAgdGFibGUudGYtZ3JhcGgtY29udHJvbHMgdGQuaW5wdXQtZWxlbWVudC10YWJsZS1kYXRhIHsKICAgICAgICBwYWRkaW5nOiAwIDAgMCAyMHB4OwogICAgICB9CgogICAgICAuc3BhY2VyIHsKICAgICAgICBmbGV4LWdyb3c6IDE7CiAgICAgIH0KCiAgICAgIC5jb2xvci10ZXh0IHsKICAgICAgICBvdmVyZmxvdzogaGlkZGVuOwogICAgICB9CgogICAgICAvKiogT3ZlcnJpZGUgaW5saW5lIHN0eWxlcyB0aGF0IHN1cHByZXNzIHBvaW50ZXIgZXZlbnRzIGZvciBkaXNhYmxlZCBidXR0b25zLiBPdGhlcndpc2UsIHRoZSAqLwogICAgICAvKiAgdG9vbHRpcHMgZG8gbm90IGFwcGVhci4gKi8KICAgICAgcGFwZXItcmFkaW8tZ3JvdXAgcGFwZXItcmFkaW8tYnV0dG9uIHsKICAgICAgICBwb2ludGVyLWV2ZW50czogYXV0byAhaW1wb3J0YW50OwogICAgICB9CgogICAgICAubGVnZW5kLWNsYXJpZmllciB7CiAgICAgICAgY29sb3I6ICMyNjYyMzY7CiAgICAgICAgY3Vyc29yOiBoZWxwOwogICAgICAgIGRpc3BsYXk6IGlubGluZS1ibG9jazsKICAgICAgICB0ZXh0LWRlY29yYXRpb246IHVuZGVybGluZTsKICAgICAgfQoKICAgICAgLmxlZ2VuZC1jbGFyaWZpZXIgcGFwZXItdG9vbHRpcCB7CiAgICAgICAgd2lkdGg6IDE1MHB4OwogICAgICB9CgogICAgICAvKiogT3RoZXJ3aXNlLCBwb2x5bWVyIFVJIGNvbnRyb2xzIGFwcGVhciBhdG9wIG5vZGUgc2VhcmNoLiAqLwogICAgICB0Zi1ncmFwaC1ub2RlLXNlYXJjaCB7CiAgICAgICAgei1pbmRleDogMTsKICAgICAgICB3aWR0aDogM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gIDxzcGFuIGNsYXNzPSJidXR0b24tdGV4dCI+RG93bmxvYWQgUE5HPC9zcGFuPgogICAgICAgIDwvcGFwZXItYnV0dG9uPgogICAgICAgIDxhIGhyZWY9IiMiIGlkPSJncmFwaGRvd25sb2FkIiBjbGFzcz0idGl0bGUiIGRvd25sb2FkPSJncmFwaC5wbmciPjwvYT4KICAgICAgPC9kaXY+CiAgICAgIDxkaXYgY2xhc3M9ImNvbnRyb2wtaG9sZGVyIHJ1bnMiPgogICAgICAgIDxkaXYgY2xhc3M9InRpdGxlIj4KICAgICAgICAgIFJ1biA8c3BhbiBjbGFzcz0iY291bnRlciI+KFtbZGF0YXNldHMubGVuZ3RoXV0pPC9zcGFuPgogICAgICAgIDwvZGl2PgogICAgICAgIDxwYXBlci1kcm9wZG93bi1tZW51CiAgICAgICAgICBuby1sYWJlbC1mbG9hdAogICAgICAgICAgbm8tYW5pbWF0aW9ucwogICAgICAgICAgbm9pbmsKICAgICAgICAgIGhvcml6b250YWwtYWxpZ249ImxlZnQiCiAgICAgICAgICBjbGFzcz0icnVuLWRyb3Bkb3duIgogICAgICAgID4KICAgICAgICAgIDxwYXBlci1saXN0Ym94CiAgICAgICAgICAgIGNsYXNzPSJkcm9wZG93bi1jb250ZW50IgogICAgICAgICAgICBzZWxlY3RlZD0ie3tfc2VsZWN0ZWRSdW5JbmRleH19IgogICAgICAgICAgICBzbG90PSJkcm9wZG93bi1jb250ZW50IgogICAgICAgICAgPgogICAgICAgICAgICA8dGVtcGxhdGUgaXM9ImRvbS1yZXBlYXQiIGl0ZW1zPSJbW2RhdGFzZXRzXV0iPgogICAgICAgICAgICAgIDxwYXBlci1pdGVtPltbaXRlbS5uYW1lXV08L3BhcGVyLWl0ZW0+CiAgICAgICAgICAgIDwvdGVtcGxhdGU+CiAgICAgICAgICA8L3BhcGVyLWxpc3Rib3g+CiAgICAgICAgPC9wYXBlci1kcm9wZG93bi1tZW51PgogICAgICA8L2Rpdj4KICAgICAgPHRlbXBsYXRlIGlzPSJkb20taWYiIGlmPSJbW3Nob3dTZXNzaW9uUnVuc0Ryb3Bkb3duXV0iPgogICAgICAgIDxkaXYgY2xhc3M9ImNvbnRyb2wtaG9sZGVyIj4KICAgICAgICAgIDxkaXYgY2xhc3M9InRpdGxlIj4KICAgICAgICAgICAgVGFnCiAgICAgICAgICAgIDxzcGFuIGNsYXNzPSJjb3VudGVyIgogICAgICAgICAgICAgID4oW1tfbnVtVGFncyhkYXRhc2V0cywgX3NlbGVjdGVkUnVuSW5kZXgpXV0pPC9zcGFuCiAgICAgICAgICAgID4KICAgICAgICAgIDwvZGl2PgogICAgICAgICAgPHBhcGVyLWRyb3Bkb3duLW1lbnUKICAgICAgICAgICAgbm8tbGFiZWwtZmxvYXQKICAgICAgICAgICAgbm8tYW5pbWF0aW9ucwogICAgICAgICAgICBob3Jpem9udGFsLWFsaWduPSJsZWZ0IgogICAgICAgICAgICBub2luawogICAgICAgICAgICBjbGFzcz0icnVuLWRyb3Bkb3duIgogICAgICAgICAgPgogICAgICAgICAgICA8cGFwZXItbGlzdGJveAogICAgICAgICAgICAgIGNsYXNzPSJkcm9wZG93bi1jb250ZW50IgogICAgICAgICAgICAgIHNlbGVjdGVkPSJ7e19zZWxlY3RlZFRhZ0luZGV4fX0iCiAgICAgICAgICAgICAgc2xvdD0iZHJvcGRvd24tY29udGVudCIKICAgICAgICAgICAgPgogICAgICAgICAgICAgIDx0ZW1wbGF0ZQogICAgICAgICAgICAgICAgaXM9ImRvbS1yZXBlYXQiCiAgICAgICAgICAgICAgICBpdGVtcz0iW1tfZ2V0VGFncyhkYXRhc2V0cywgX3NlbGVjdGVkUnVuSW5kZXgpXV0iCiAgICAgICAgICAgICAgPgogICAgICAgICAgICAgICAgPHBhcGVyLWl0ZW0+W1tpdGVtLmRpc3BsYXlOYW1lXV08L3BhcGVyLWl0ZW0+CiAgICAgICAgICAgICAgPC90ZW1wbGF0ZT4KICAgICAgICAgICAgPC9wYXBlci1saXN0Ym94PgogICAgICAgICAgPC9wYXBlci1kcm9wZG93bi1tZW51PgogICAgICAgIDwvZGl2PgogICAgICA8L3RlbXBsYXRlPgogICAgICA8dGVtcGxhdGUgaXM9ImRvbS1pZiIgaWY9Iltbc2hvd1VwbG9hZEJ1dHRvbl1dIj4KICAgICAgICA8ZGl2IGNsYXNzPSJjb250cm9sLWhvbGRlciI+CiAgICAgICAgICA8ZGl2IGNsYXNzPSJ0aXRsZSI+VXBsb2FkPC9kaXY+CiAgICAgICAgICA8cGFwZXItYnV0dG9uCiAgICAgICAgICAgIHJhaXNlZAogICAgICAgICAgICBjbGFzcz0idXBsb2FkLWJ1dHRvbiIKICAgICAgICAgICAgb24tY2xpY2s9Il9nZXRGaWxlIgogICAgICAgICAgICB0aXRsZT0iVXBsb2FkIGEgZ3JhcGggcGJ0eHQgZmlsZSB0byB2aWV3IHRoZSBncmFwaCIKICAgICAgICAgID4KICAgICAgICAgICAgQ2hvb3NlIEZpbGUKICAgICAgICAgIDwvcGFwZXItYnV0dG9uPgogICAgICAgICAgPGRpdiBjbGFzcz0iaGlkZGVuLWlucHV0Ij4KICAgICAgICAgICAgPGlucHV0CiAgICAgICAgICAgICAgdHlwZT0iZmlsZSIKICAgICAgICAgICAgICBpZD0iZmlsZSIKICAgICAgICAgICAgICBuYW1lPSJmaWxlIgogICAgICAgICAgICAgIG9uLWNoYW5nZT0iX3VwZGF0ZUZpbGVJbnB1dCIKICAgICAgICAgICAgICBhY2NlcHQ9Ii5wYnR4dCIKICAgICAgICAgICAgLz4KICAgICAgICAgIDwvZGl2PgogICAgICAgIDwvZGl2PgogICAgICA8L3RlbXBsYXRlPgogICAgICA8ZGl2IGNsYXNzPSJjb250cm9sLWhvbGRlciI+CiAgICAgICAgPHBhcGVyLXJhZGlvLWdyb3VwIHNlbGVjdGVkPSJ7e19zZWxlY3RlZEdyYXBoVHlwZX19Ij4KICAgICAgICAgIDwhLS0gTm90ZSB0aGF0IHRoZSBuYW1lIGhhcyB0byBtYXRjaCB0aGF0IG9mIHRmX2dyYXBoX2NvbW1vbi5TZWxlY3Rpb25UeXBlLiAtLT4KICAgICAgICAgIDxwYXBlci1yYWRpby1idXR0b24KICAgICAgICAgICAgbmFtZT0ib3BfZ3JhcGgiCiAgICAgICAgICAgIGRpc2FibGVkPSJbW19nZXRTZWxlY3Rpb25PcEdyYXBoRGlzYWJsZWQoZGF0YXNldHMsIF9zZWxlY3RlZFJ1bkluZGV4LCBfc2VsZWN0ZWRUYWdJbmRleCldXSIKICAgICAgICAgICAgPkdyYXBoPC9wYXBlci1yYWRpby1idXR0b24KICAgICAgICAgID4KICAgICAgICAgIDxwYXBlci1yYWRpby1idXR0b24KICAgICAgICAgICAgbmFtZT0iY29uY2VwdHVhbF9ncmFwaCIKICAgICAgICAgICAgZGlzYWJsZWQ9IltbX2dldFNlbGVjdGlvbkNvbmNlcHR1YWxHcmFwaERpc2FibGVkKGRhdGFzZXRzLCBfc2VsZWN0ZWRSdW5JbmRleCwgX3NlbGVjdGVkVGFnSW5kZXgpXV0iCiAgICAgICAgICAgID5Db25jZXB0dWFsIEdyYXBoPC9wYXBlci1yYWRpby1idXR0b24KICAgICAgICAgID4KICAgICAgICAgIDxwYXBlci1yYWRpby1idXR0b24KICAgICAgICAgICAgbmFtZT0icHJvZmlsZSIKICAgICAgICAgICAgZGlzYWJsZWQ9IltbX2dldFNlbGVjdGlvblByb2ZpbGVEaXNhYmxlZChkYXRhc2V0cywgX3NlbGVjdGVkUnVuSW5kZXgsIF9zZWxlY3RlZFRhZ0luZGV4KV1dIgogICAgICAgICAgICA+UHJvZmlsZTwvcGFwZXItcmFkaW8tYnV0dG9uCiAgICAgICAgICA+CiAgICAgICAgPC9wYXBlci1yYWRpby1ncm91cD4KICAgICAgPC9kaXY+CiAgICAgIDxkaXYgY2xhc3M9ImNvbnRyb2wtaG9sZGVyIj4KICAgICAgICA8ZGl2PgogICAgICAgICAgPHBhcGVyLXRvZ2dsZS1idXR0b24gY2hlY2tlZD0ie3t0cmFjZUlucHV0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ogICAgICAgICAgPgogICAgICAgICAgICBYTEEgQ2x1c3RlcgogICAgICAgICAgPC9wYXBlci1yYWRpby1idXR0b24+CiAgICAgICAgICA8cGFwZXItdG9vbHRpcAogICAgICAgICAgICBhbmltYXRpb24tZGVsYXk9IjAiCiAgICAgICAgICAgIGZvcj0ieGxhLWNsdXN0ZXItcmFkaW8tYnV0dG9uIgogICAgICAgICAgICBwb3NpdGlvbj0icmlnaHQiCiAgICAgICAgICAgIG9mZnNldD0iMCIKICAgICAgICAgID4KICAgICAgICAgICAgQ29sb3JpbmcgYnkgWExBIGNsdXN0ZXIgaXMgb25seSBlbmFibGVkIGlmIGF0IGxlYXN0IDEgb3Agc3BlY2lmaWVzCiAgICAgICAgICAgIGFuIFhMQSBjbHVzdGVyLgogICAgICAgICAgPC9wYXBlci10b29sdGlwPgoKICAgICAgICAgIDxwYXBlci1yYWRpby1idXR0b24KICAgICAgICAgICAgaWQ9ImNvbXB1dGUtdGltZS1yYWRpby1idXR0b24iCiAgICAgICAgICAgIG5hbWU9ImNvbXB1dGVfdGltZSIKICAgICAgICAgICAgZGlzYWJsZWQ9IltbIXN0YXRzXV0iCiAgICAgICAgICA+CiAgICAgICAgICAgIENvbXB1dGUgdGltZQogICAgICAgICAgPC9wYXBlci1yYWRpby1idXR0b24+CiAgICAgICAgICA8cGFwZXItdG9vbHRpcAogICAgICAgICAgICBhbmltYXRpb24tZGVsYXk9IjAiCiAgICAgICAgICAgIGZvcj0iY29tcHV0ZS10aW1lLXJhZGlvLWJ1dHRvbiIKICAgICAgICAgICAgcG9zaXRpb249InJpZ2h0IgogICAgICAgICAgICBvZmZzZXQ9IjAiCiAgICAgICAgICA+CiAgICAgICAgICAgIENvbG9yaW5nIGJ5IGNvbXB1dGUgdGltZSBpcyBvbmx5IGVuYWJsZWQgaWYgdGhlIFJ1bk1ldGFkYXRhIHByb3RvIGlzCiAgICAgICAgICAgIHBhc3NlZCB0byB0aGUgRmlsZVdyaXRlciB3aGVuIGEgc3BlY2lmaWMgc2Vzc2lvbiBpcyBydW4uCiAgICAgICAgICA8L3BhcGVyLXRvb2x0aXA+CgogICAgICAgICAgPHBhcGVyLXJhZGlvLWJ1dHRvbgogICAgICAgICAgICBpZD0ibWVtb3J5LXJhZGlvLWJ1dHRvbiIKICAgICAgICAgICAgbmFtZT0ibWVtb3J5IgogICAgICAgICAgICBkaXNhYmxlZD0iW1shc3RhdHNdXSIKICAgICAgICAgID4KICAgICAgICAgICAgTWVtb3J5CiAgICAgICAgICA8L3BhcGVyLXJhZGlvLWJ1dHRvbj4KICAgICAgICAgIDxwYXBlci10b29sdGlwCiAgICAgICAgICAgIGFuaW1hdGlvbi1kZWxheT0iMCIKICAgICAgICAgICAgZm9yPSJtZW1vcnktcmFkaW8tYnV0dG9uIgogICAgICAgICAgICBwb3NpdGlvbj0icmlnaHQiCiAgICAgICAgICAgIG9mZnNldD0iMCIKICAgICAgICAgID4KICAgICAgICAgICAgQ29sb3JpbmcgYnkgbWVtb3J5IGlzIG9ubHkgZW5hYmxlZCBpZiB0aGUgUnVuTWV0YWRhdGEgcHJvdG8gaXMKICAgICAgICAgICAgcGFzc2VkIHRvIHRoZSBGaWxlV3JpdGVyIHdoZW4gYSBzcGVjaWZpYyBzZXNzaW9uIGlzIHJ1bi4KICAgICAgICAgIDwvcGFwZXItdG9vbHRpcD4KCiAgICAgICAgICA8cGFwZXItcmFkaW8tYnV0dG9uCiAgICAgICAgICAgIGlkPSJ0cHUtY29tcGF0aWJpbGl0eS1yYWRpby1idXR0b24iCiAgICAgICAgICAgIG5hbWU9Im9wX2NvbXBhdGliaWxpdHkiCiAgICAgICAgICA+CiAgICAgICAgICAgIFRQVSBDb21wYXRpYmlsaXR5CiAgICAgICAgICA8L3BhcGVyLXJhZGlvLWJ1dHRvbj4KICAgICAgICAgIDxwYXBlci10b29sdGlwCiAgICAgICAgICAgIGFuaW1hdGlvbi1kZWxheT0iMCIKICAgICAgICAgICAgZm9yPSJ0cHUtY29tcGF0aWJpbGl0eS1yYWRpby1idXR0b24iCiAgICAgICAgICAgIHBvc2l0aW9uPSJyaWdodCIKICAgICAgICAgICAgb2Zmc2V0PSIwIgogICAgICAgICAgPgogICAgICAgICAgICBDb2xvcmluZyBieSB3aGV0aGVyIGFuIG9wZXJhdGlvbiBpcyBjb21wYXRpYmxlIGZvciB0aGUgVFBVIGRldmljZS4KICAgICAgICAgIDwvcGFwZXItdG9vbHRpcD4KICAgICAgICA8L3BhcGVyLXJhZGlvLWdyb3VwPgogICAgICAgIDxzcGFuIGNsYXNzPSJzcGFjZXIiPjwvc3Bhbj4KICAgICAgPC9kaXY+CiAgICAgIDxkaXY+CiAgICAgICAgPHRlbXBsYXRlIGlzPSJkb20taWYiIGlmPSJbW19pc0dyYWRpZW50Q29sb3Jpbmcoc3RhdHMsIGNvbG9yQnkpXV0iPgogICAgICAgICAgPHN2ZyB3aWR0aD0iMTQwIiBoZWlnaHQ9IjIwIiBzdHlsZT0ibWFyZ2luOiAwIDVweCIgY2xhc3M9ImNvbG9yLXRleHQiPgogICAgICAgICAgICA8ZGVmcz4KICAgICAgICAgICAgICA8bGluZWFyR3JhZGllbnQKICAgICAgICAgICAgICAgIGlkPSJsaW5lYXJHcmFkaWVudCIKICAgICAgICAgICAgICAgIHgxPSIwJSIKICAgICAgICAgICAgICAgIHkxPSIwJSIKICAgICAgICAgICAgICAgIHgyPSIxMDAlIgogICAgICAgICAgICAgICAgeTI9IjAlIgogICAgICAgICAgICAgID4KICAgICAgICAgICAgICAgIDxzdG9wCiAgICAgICAgICAgICAgICAgIGNsYXNzPSJzdGFydCIKICAgICAgICAgICAgICAgICAgb2Zmc2V0PSIwJSIKICAgICAgICAgICAgICAgICAgc3RvcC1jb2xvciQ9IltbX2N1cnJlbnRHcmFkaWVudFBhcmFtcy5zdGFydENvbG9yXV0iCiAgICAgICAgICAgICAgICA+PC9zdG9wPgogICAgICAgICAgICAgICAgPHN0b3AKICAgICAgICAgICAgICAgICAgY2xhc3M9ImVuZCIKICAgICAgICAgICAgICAgICAgb2Zmc2V0PSIxMDAlIgogICAgICAgICAgICAgICAgICBzdG9wLWNvbG9yJD0iW1tfY3VycmVudEdyYWRpZW50UGFyYW1zLmVuZENvbG9yXV0iCiAgICAgICAgICAgICAgICA+PC9zdG9wPgogICAgICAgICAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICAgICAgICAgIDwvZGVmcz4KICAgICAgICAgICAgPHJlY3QKICAgICAgICAgICAgICB4PSIwIgogICAgICAgICAgICAgIHk9IjAiCiAgICAgICAgICAgICAgd2lkdGg9IjEzNSIKICAgICAgICAgICAgICBoZWlnaHQ9IjIwIgogICAgICAgICAgICAgIGZpbGw9InVybCgjbGluZWFyR3JhZGllbnQpIgogICAgICAgICAgICAgIHN0cm9rZT0iYmxhY2siCiAgICAgICAgICAgID48L3JlY3Q+CiAgICAgICAgICA8L3N2Zz4KICAgICAgICAgIDxkaXYgY2xhc3M9ImRvbWFpblZhbHVlcyBjb2xvci10ZXh0Ij4KICAgICAgICAgICAgPGRpdiBjbGFzcz0iZG9tYWluU3RhcnQiPltbX2N1cnJlbnRHcmFkaWVudFBhcmFtcy5taW5WYWx1ZV1dPC9kaXY+CiAgICAgICAgICAgIDxkaXYgY2xhc3M9ImRvbWFpbkVuZCI+W1tfY3VycmVudEdyYWRpZW50UGFyYW1zLm1heFZhbHVlXV08L2Rpdj4KICAgICAgICAgIDwvZGl2PgogICAgICAgICAgPGJyIHN0eWxlPSJjbGVhcjogYm90aCIgLz4KICAgICAgICAgIDxkaXY+RGV2aWNlcyBpbmNsdWRlZCBpbiBzdGF0czo8L2Rpdj4KICAgICAgICAgIDxkaXYgY2xhc3M9ImRldmljZUxpc3QiPgogICAgICAgICAgICA8dGVtcGxhdGUgaXM9ImRvbS1yZXBlYXQiIGl0ZW1zPSJbW19jdXJyZW50RGV2aWNlc11dIj4KICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJjb2xvci1sZWdlbmQtcm93IGRldmljZXMtY2hlY2tib3giPgogICAgICAgICAgICAgICAgPHNwYW4KICAgICAgICAgICAgICAgICAgPjxpbnB1dAogICAgICAgICAgICAgICAgICAgIHR5cGU9ImNoZWNrYm94IgogICAgICAgICAgICAgICAgICAgIHZhbHVlJD0iW1tpdGVtLmRldmljZV1dIgogICAgICAgICAgICAgICAgICAgIGNoZWNrZWQkPSJbW2l0ZW0udXNlZF1dIgogICAgICAgICAgICAgICAgICAgIG9uLWNsaWNrPSJfZGV2aWNlQ2hlY2tib3hDbGlja2VkIgogICAgICAgICAgICAgICAgLz48L3NwYW4+CiAgICAgICAgICAgICAgICA8c3Bhbj5bW2l0ZW0uc3VmZml4XV08L3NwYW4+CiAgICAgICAgICAgICAgICA8dGVtcGxhdGUgaXM9ImRvbS1pZiIgaWY9IltbaXRlbS5pZ25vcmVkTXNnXV0iPgogICAgICAgICAgICAgICAgICA8cGFwZXItaWNvbi1idXR0b24KICAgICAgICAgICAgICAgICAgICBpY29uPSJoZWxwIgogICAgICAgICAgICAgICAgICAgIGNsYXNzPSJoZWxwLWljb24iCiAgICAgICAgICAgICAgICAgID48L3BhcGVyLWljb24tYnV0dG9uPgogICAgICAgICAgICAgICAgICA8cGFwZXItdG9vbHRpcCBwb3NpdGlvbj0icmlnaHQiIG9mZnNldD0iMCIgYW5pbWF0aW9uLWRlbGF5PSIwIgogICAgICAgICAgICAgICAgICAgID5bW2l0ZW0uaWdub3JlZE1zZ11dPC9wYXBlci10b29sdGlwCiAgICAgICAgICAgICAgICAgID4KICAgICAgICAgICAgICAgIDwvdGVtcGxhdGU+CiAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgIDwvdGVtcGxhdGU+CiAgICAgICAgICA8L2Rpdj4KICAgICAgICA8L3RlbXBsYXRlPgogICAgICAgIDx0ZW1wbGF0ZSBpcz0iZG9tLWlmIiBpZj0iW1tfZXF1YWxzKGNvbG9yQnksICdzdHJ1Y3R1cmUnKV1dIj4KICAgICAgICAgIDxkaXYgY2xhc3M9ImNvbG9yLXRleHQiPgogICAgICAgICAgICA8ZGl2IGNsYXNzPSJjb2xvci1sZWdlbmQtcm93Ij4KICAgICAgICAgICAgICA8c3BhbiBjbGFzcz0ibGFiZWwiPiBjb2xvcnMgPC9zcGFuPgogICAgICAgICAgICAgIDxzcGFuIGNsYXNzPSJjb2xvci1sZWdlbmQtdmFsdWUiPnNhbWUgc3Vic3RydWN0dXJlPC9zcGFuPgogICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgPGRpdiBjbGFzcz0iY29sb3ItbGVnZW5kLXJvdyI+CiAgICAgICAgICAgICAgPHRmLWdyYXBoLWljb24KICAgICAgICAgICAgICAgIHR5cGU9Ik1FVEEiCiAgICAgICAgICAgICAgICBoZWlnaHQ9IjE2IgogICAgICAgICAgICAgICAgZmlsbC1vdmVycmlkZT0iI2VlZSIKICAgICAgICAgICAgICAgIHN0cm9rZS1vdmVycmlkZT0iI2E2YTZhNiIKICAgICAgICAgICAgICA+PC90Zi1ncmFwaC1pY29uPgogICAgICAgICAgICAgIDxzcGFuIGNsYXNzPSJjb2xvci1sZWdlbmQtdmFsdWUiPnVuaXF1ZSBzdWJzdHJ1Y3R1cmU8L3NwYW4+CiAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgPC9kaXY+CiAgICAgICAgPC90ZW1wbGF0ZT4KICAgICAgICA8dGVtcGxhdGUgaXM9ImRvbS1pZiIgaWY9IltbX2VxdWFscyhjb2xvckJ5LCAnZGV2aWNlJyldXSI+CiAgICAgICAgICA8ZGl2PgogICAgICAgICAgICA8dGVtcGxhdGUgaXM9ImRvbS1yZXBlYXQiIGl0ZW1zPSJbW19jdXJyZW50RGV2aWNlUGFyYW1zXV0iPgogICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImNvbG9yLWxlZ2VuZC1yb3ciPgogICAgICAgICAgICAgICAgPHRmLWdyYXBoLWljb24KICAgICAgICAgICAgICAgICAgdHlwZT0iTUVUQSIKICAgICAgICAgICAgICAgICAgaGVpZ2h0PSIxNiIKICAgICAgICAgICAgICAgICAgZmlsbC1vdmVycmlkZT0iW1tpdGVtLmNvbG9yXV0iCiAgICAgICAgICAgICAgICAgIHN0cm9rZS1vdmVycmlkZT0iI2E2YTZhNiIKICAgICAgICAgICAgICAgID48L3RmLWdyYXBoLWljb24+CiAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz0iY29sb3ItbGVnZW5kLXZhbHVlIj5bW2l0ZW0uZGV2aWNlXV08L3NwYW4+CiAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgIDwvdGVtcGxhdGU+CiAgICAgICAgICAgIDxkaXYgY2xhc3M9ImNvbG9yLWxlZ2VuZC1yb3ciPgogICAgICAgICAgICAgIDx0Zi1ncmFwaC1pY29uCiAgICAgICAgICAgICAgICB0eXBlPSJNRVRBIgogICAgICAgICAgICAgICAgaGVpZ2h0PSIxNiIKICAgICAgICAgICAgICAgIGZpbGwtb3ZlcnJpZGU9IiNlZWUiCiAgICAgICAgICAgICAgICBzdHJva2Utb3ZlcnJpZGU9IiNhNmE2YTYiCiAgICAgICAgICAgICAgPjwvdGYtZ3JhcGgtaWNvbj4KICAgICAgICAgICAgICA8c3BhbiBjbGFzcz0iY29sb3ItbGVnZW5kLXZhbHVlIj51bmtub3duIGRldmljZTwvc3Bhbj4KICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICA8L2Rpdj4KICAgICAgICA8L3RlbXBsYXRlPgogICAgICAgIDx0ZW1wbGF0ZSBpcz0iZG9tLWlmIiBpZj0iW1tfZXF1YWxzKGNvbG9yQnksICd4bGFfY2x1c3RlcicpXV0iPgogICAgICAgICAgPGRpdj4KICAgICAgICAgICAgPHRlbXBsYXRlIGlzPSJkb20tcmVwZWF0IiBpdGVtcz0iW1tfY3VycmVudFhsYUNsdXN0ZXJQYXJhbXNdXSI+CiAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iY29sb3ItbGVnZW5kLXJvdyI+CiAgICAgICAgICAgICAgICA8c3ZnPgogICAgICAgICAgICAgICAgICA8dXNlCiAgICAgICAgICAgICAgICAgICAgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiCiAgICAgICAgICAgICAgICAgICAgeGxpbms6aHJlZj0iI3VuZmlsbGVkLXJlY3QiCiAgICAgICAgICAgICAgICAgICAgeD0iMCIKICAgICAgICAgICAgICAgICAgICB5PSIwIgogICAgICAgICAgICAgICAgICAgIHN0eWxlPSJmaWxsOltbaXRlbS5jb2xvcl1dIgogICAgICAgICAgICAgICAgICA+PC91c2U+CiAgICAgICAgICAgICAgICA8L3N2Zz4KICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPSJjb2xvci1sZWdlbmQtdmFsdWUiPltbaXRlbS54bGFfY2x1c3Rlcl1dPC9zcGFuPgogICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICA8L3RlbXBsYXRlPgogICAgICAgICAgICA8ZGl2IGNsYXNzPSJjb2xvci1sZWdlbmQtcm93Ij4KICAgICAgICAgICAgICA8c3ZnPgogICAgICAgICAgICAgICAgPHVzZQogICAgICAgICAgICAgICAgICB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIKICAgICAgICAgICAgICAgICAgeGxpbms6aHJlZj0iI2dyZXktcmVjdCIKICAgICAgICAgICAgICAgICAgeD0iMCIKICAgICAgICAgICAgICAgICAgeT0iMCIKICAgICAgICAgICAgICAgID48L3VzZT4KICAgICAgICAgICAgICA8L3N2Zz4KICAgICAgICAgICAgICA8c3BhbiBjbGFzcz0iY29sb3ItbGVnZW5kLXZhbHVlIj51bmtub3duIFhMQSBjbHVzdGVyPC9zcGFuPgogICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgIDwvZGl2PgogICAgICAgIDwvdGVtcGxhdGU+CiAgICAgICAgPHRlbXBsYXRlIGlzPSJkb20taWYiIGlmPSJbW19lcXVhbHMoY29sb3JCeSwgJ29wX2NvbXBhdGliaWxpdHknKV1dIj4KICAgICAgICAgIDxkaXYgY2xhc3M9ImNvbG9yLXRleHQiPgogICAgICAgICAgICA8ZGl2IGNsYXNzPSJjb2xvci1sZWdlbmQtcm93Ij4KICAgICAgICAgICAgICA8dGYtZ3JhcGgtaWNvbgogICAgICAgICAgICAgICAgdHlwZT0iT1AiCiAgICAgICAgICAgICAgICBoZWlnaHQ9IjE2IgogICAgICAgICAgICAgICAgZmlsbC1vdmVycmlkZT0iIzBmOWQ1OCIKICAgICAgICAgICAgICAgIHN0cm9rZS1vdmVycmlkZT0iI2NjYyIKICAgICAgICAgICAgICA+PC90Zi1ncmFwaC1pY29uPgogICAgICAgICAgICAgIDxzcGFuIGNsYXNzPSJjb2xvci1sZWdlbmQtdmFsdWUiPlZhbGlkIE9wPC9zcGFuPgogICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgPGRpdiBjbGFzcz0iY29sb3ItbGVnZW5kLXJvdyI+CiAgICAgICAgICAgICAgPHRmLWdyYXBoLWljb24KICAgICAgICAgICAgICAgIHR5cGU9Ik9QIgogICAgICAgICAgICAgICAgaGVpZ2h0PSIxNiIKICAgICAgICAgICAgICAgIGZpbGwtb3ZlcnJpZGU9IiNkYjQ0MzciCiAgICAgICAgICAgICAgICBzdHJva2Utb3ZlcnJpZGU9IiNjY2MiCiAgICAgICAgICAgICAgPjwvdGYtZ3JhcGgtaWNvbj4KICAgICAgICAgICAgICA8c3BhbiBjbGFzcz0iY29sb3ItbGVnZW5kLXZhbHVlIj5JbnZhbGlkIE9wPC9zcGFuPgogICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgIDwvZGl2PgogICAgICAgIDwvdGVtcGxhdGU+CiAgICAgICAgPHRlbXBsYXRlIGlzPSJkb20taWYiIGlmPSJbW19zdGF0c05vdE51bGwoc3RhdHMpXV0iPgogICAgICAgICAgPGRpdiBjbGFzcz0iY29sb3ItbGVnZW5kLXJvdyI+CiAgICAgICAgICAgIDx0Zi1ncmFwaC1pY29uIHR5cGU9Ik1FVEEiIGhlaWdodD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AgICAgaGVpZ2h0PSIxNiIKICAgICAgICAgICAgICAgICAgICBmaWxsLW92ZXJyaWRlPSIjZDlkOWQ5IgogICAgICAgICAgICAgICAgICAgIHN0cm9rZS1vdmVycmlkZT0iI2NjYyIKICAgICAgICAgICAgICAgICAgPjwvdGYtZ3JhcGgtaWNvbj4KICAgICAgICAgICAgICAgIDwvdGQ+CiAgICAgICAgICAgICAgICA8dGQ+CiAgICAgICAgICAgICAgICAgIE5hbWVzcGFjZTxzcGFuIGNsYXNzPSJncmF5Ij4qPC9zcGFuPgogICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJsZWdlbmQtY2xhcmlmaWVyIj4KICAgICAgICAgICAgICAgICAgICA8c3Bhbj4/PC9zcGFuPgogICAgICAgICAgICAgICAgICAgIDxwYXBlci10b29sdGlwCiAgICAgICAgICAgICAgICAgICAgICBhbmltYXRpb24tZGVsYXk9IjAiCiAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbj0icmlnaHQiCiAgICAgICAgICAgICAgICAgICAgICBvZmZzZXQ9IjAiCiAgICAgICAgICAgICAgICAgICAgPgogICAgICAgICAgICAgICAgICAgICAgRW5jYXBzdWxhdGVzIGEgc2V0IG9mIG5vZGVzLiBOYW1lc3BhY2UgaXMgaGllcmFyY2hpY2FsIGFuZAogICAgICAgICAgICAgICAgICAgICAgYmFzZWQgb24gc2NvcGUuCiAgICAgICAgICAgICAgICAgICAgPC9wYXBlci10b29sdGlwPgogICAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgIDwvdGQ+CiAgICAgICAgICAgICAgPC90cj4KICAgICAgICAgICAgICA8dHI+CiAgICAgICAgICAgICAgICA8dGQ+CiAgICAgICAgICAgICAgICAgIDx0Zi1ncmFwaC1pY29uIHR5cGU9Ik9QIiBoZWlnaHQ9IjE2Ij48L3RmLWdyYXBoLWljb24+CiAgICAgICAgICAgICAgICA8L3RkPgogICAgICAgICAgICAgICAgPHRkPgogICAgICAgICAgICAgICAgICBPcE5vZGUKICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0ibGVnZW5kLWNsYXJpZmllciI+CiAgICAgICAgICAgICAgICAgICAgPHNwYW4+Pzwvc3Bhbj4KICAgICAgICAgICAgICAgICAgICA8cGFwZXItdG9vbHRpcAogICAgICAgICAgICAgICAgICAgICAgYW5pbWF0aW9uLWRlbGF5PSIwIgogICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb249InJpZ2h0IgogICAgICAgICAgICAgICAgICAgICAgb2Zmc2V0PSIwIgogICAgICAgICAgICAgICAgICAgID4KICAgICAgICAgICAgICAgICAgICAgIE5vZGUgdGhhdCBwZXJmb3JtcyBhbiBvcGVyYXRpb24uIFRoZXNlIG5vZGVzIGNhbm5vdAogICAgICAgICAgICAgICAgICAgICAgZXhwYW5kLgogICAgICAgICAgICAgICAgICAgIDwvcGFwZXItdG9vbHRpcD4KICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgICA8L3RkPgogICAgICAgICAgICAgIDwvdHI+CiAgICAgICAgICAgICAgPHRyPgogICAgICAgICAgICAgICAgPHRkPgogICAgICAgICAgICAgICAgICA8dGYtZ3JhcGgtaWNvbiB0eXBlPSJTRVJJRVMiIGhlaWdodD0iMTYiPjwvdGYtZ3JhcGgtaWNvbj4KICAgICAgICAgICAgICAgIDwvdGQ+CiAgICAgICAgICAgICAgICA8dGQ+CiAgICAgICAgICAgICAgICAgIFVuY29ubmVjdGVkIHNlcmllczxzcGFuIGNsYXNzPSJncmF5Ij4qPC9zcGFuPgogICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJsZWdlbmQtY2xhcmlmaWVyIj4KICAgICAgICAgICAgICAgICAgICA8c3Bhbj4/PC9zcGFuPgogICAgICAgICAgICAgICAgICAgIDxwYXBlci10b29sdGlwCiAgICAgICAgICAgICAgICAgICAgICBhbmltYXRpb24tZGVsYXk9IjAiCiAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbj0icmlnaHQiCiAgICAgICAgICAgICAgICAgICAgICBvZmZzZXQ9IjAiCiAgICAgICAgICAgICAgICAgICAgPgogICAgICAgICAgICAgICAgICAgICAgU2VxdWVuY2Ugb2YgbnVtYmVyZWQgbm9kZXMgdGhhdCBhcmUgbm90IGNvbm5lY3RlZCB0byBlYWNoCiAgICAgICAgICAgICAgICAgICAgICBvdGhlci4KICAgICAgICAgICAgICAgICAgICA8L3BhcGVyLXRvb2x0aXA+CiAgICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgPC90ZD4KICAgICAgICAgICAgICA8L3RyPgogICAgICAgICAgICAgIDx0cj4KICAgICAgICAgICAgICAgIDx0ZD4KICAgICAgICAgICAgICAgICAgPHRmLWdyYXBoLWljb24KICAgICAgICAgICAgICAgICAgICB0eXBlPSJTRVJJRVMiCiAgICAgICAgICAgICAgICAgICAgaGVpZ2h0PSIxNiIKICAgICAgICAgICAgICAgICAgICB2ZXJ0aWNhbAogICAgICAgICAgICAgICAgICA+PC90Zi1ncmFwaC1pY29uPgogICAgICAgICAgICAgICAgPC90ZD4KICAgICAgICAgICAgICAgIDx0ZD4KICAgICAgICAgICAgICAgICAgQ29ubmVjdGVkIHNlcmllczxzcGFuIGNsYXNzPSJncmF5Ij4qPC9zcGFuPgogICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJsZWdlbmQtY2xhcmlmaWVyIj4KICAgICAgICAgICAgICAgICAgICA8c3Bhbj4/PC9zcGFuPgogICAgICAgICAgICAgICAgICAgIDxwYXBlci10b29sdGlwCiAgICAgICAgICAgICAgICAgICAgICBhbmltYXRpb24tZGVsYXk9IjAiCiAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbj0icmlnaHQiCiAgICAgICAgICAgICAgICAgICAgICBvZmZzZXQ9IjAiCiAgICAgICAgICAgICAgICAgICAgPgogICAgICAgICAgICAgICAgICAgICAgU2VxdWVuY2Ugb2YgbnVtYmVyZWQgbm9kZXMgdGhhdCBhcmUgY29ubmVjdGVkIHRvIGVhY2gKICAgICAgICAgICAgICAgICAgICAgIG90aGVyLgogICAgICAgICAgICAgICAgICAgIDwvcGFwZXItdG9vbHRpcD4KICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgICA8L3RkPgogICAgICAgICAgICAgIDwvdHI+CiAgICAgICAgICAgICAgPHRyPgogICAgICAgICAgICAgICAgPHRkPgogICAgICAgICAgICAgICAgICA8c3ZnIGNsYXNzPSJpY29uIj4KICAgICAgICAgICAgICAgICAgICA8Y2lyY2xlCiAgICAgICAgICAgICAgICAgICAgICBmaWxsPSJ3aGl0ZSIKICAgICAgICAgICAgICAgICAgICAgIHN0cm9rZT0iIzg0ODQ4NCIKICAgICAgICAgICAgICAgICAgICAgIGN4PSIxMCIKICAgICAgICAgICAgICAgICAgICAgIGN5PSIxMCIKICAgICAgICAgICAgICAgICAgICAgIHI9IjUiCiAgICAgICAgICAgICAgICAgICAgPjwvY2lyY2xlPgogICAgICAgICAgICAgICAgICA8L3N2Zz4KICAgICAgICAgICAgICAgIDwvdGQ+CiAgICAgICAgICAgICAgICA8dGQ+CiAgICAgICAgICAgICAgICAgIENvbnN0YW50CiAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImxlZ2VuZC1jbGFyaWZpZXIiPgogICAgICAgICAgICAgICAgICAgIDxzcGFuPj88L3NwYW4+CiAgICAgICAgICAgICAgICAgICAgPHBhcGVyLXRvb2x0aXAKICAgICAgICAgICAgICAgICAgICAgIGFuaW1hdGlvbi1kZWxheT0iMCIKICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uPSJyaWdodCIKICAgICAgICAgICAgICAgICAgICAgIG9mZnNldD0iMCIKICAgICAgICAgICAgICAgICAgICA+CiAgICAgICAgICAgICAgICAgICAgICBOb2RlIHRoYXQgb3V0cHV0cyBhIGNvbnN0YW50IHZhbHVlLgogICAgICAgICAgICAgICAgICAgIDwvcGFwZXItdG9vbHRpcD4KICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgICA8L3RkPgogICAgICAgICAgICAgIDwvdHI+CiAgICAgICAgICAgICAgPHRyPgogICAgICAgICAgICAgICAgPHRkPgogICAgICAgICAgICAgICAgICA8dGYtZ3JhcGgtaWNvbiB0eXBlPSJTVU1NQVJZIiBoZWlnaHQ9IjIwIj48L3RmLWdyYXBoLWljb24+CiAgICAgICAgICAgICAgICA8L3RkPgogICAgICAgICAgICAgICAgPHRkPgogICAgICAgICAgICAgICAgICBTdW1tYXJ5CiAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImxlZ2VuZC1jbGFyaWZpZXIiPgogICAgICAgICAgICAgICAgICAgIDxzcGFuPj88L3NwYW4+CiAgICAgICAgICAgICAgICAgICAgPHBhcGVyLXRvb2x0aXAKICAgICAgICAgICAgICAgICAgICAgIGFuaW1hdGlvbi1kZWxheT0iMCIKICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uPSJyaWdodCIKICAgICAgICAgICAgICAgICAgICAgIG9mZnNldD0iMCIKICAgICAgICAgICAgICAgICAgICA+CiAgICAgICAgICAgICAgICAgICAgICBOb2RlIHRoYXQgY29sbGVjdHMgZGF0YSBmb3IgdmlzdWFsaXphdGlvbiB3aXRoaW4KICAgICAgICAgICAgICAgICAgICAgIFRlbnNvckJvYXJkLgogICAgICAgICAgICAgICAgICAgIDwvcGFwZXItdG9vbHRpcD4KICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgICA8L3RkPgogICAgICAgICAgICAgIDwvdHI+CiAgICAgICAgICAgICAgPHRyPgogICAgICAgICAgICAgICAgPHRkPgogICAgICAgICAgICAgICAgICA8c3ZnCiAgICAgICAgICAgICAgICAgICAgY2xhc3M9Imljb24iCiAgICAgICAgICAgICAgICAgICAgaGVpZ2h0PSIxNXB4IgogICAgICAgICAgICAgICAgICAgIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaW5ZTWlkIG1lZXQiCiAgICAgICAgICAgICAgICAgICAgdmlld0JveD0iMCAwIDE1IDE1IgogICAgICAgICAgICAgICAgICA+CiAgICAgICAgICAgICAgICAgICAgPGRlZnM+CiAgICAgICAgICAgICAgICAgICAgICA8bWFya2VyCiAgICAgICAgICAgICAgICAgICAgICAgIGlkPSJkYXRhZmxvdy1hcnJvd2hlYWQtbGVnZW5kIgogICAgICAgICAgICAgICAgICAgICAgICBmaWxsPSIjYmJiIgogICAgICAgICAgICAgICAgICAgICAgICBtYXJrZXJXaWR0aD0iMTAiCiAgICAgICAgICAgICAgICAgICAgICAgIG1hcmtlckhlaWdodD0iMTAiCiAgICAgICAgICAgICAgICAgICAgICAgIHJlZlg9IjkiCiAgICAgICAgICAgICAgICAgICAgICAgIHJlZlk9IjUiCiAgICAgICAgICAgICAgICAgICAgICAgIG9yaWVudD0iYXV0by1zdGFydC1yZXZlcnNlIgogICAgICAgICAgICAgICAgICAgICAgPgogICAgICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNIDAsMCBMIDEwLDUgTCAwLDEwIEMgMyw3IDMsMyAwLDAiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICAgIDwvbWFya2VyPgogICAgICAgICAgICAgICAgICAgIDwvZGVmcz4KICAgICAgICAgICAgICAgICAgICA8cGF0aAogICAgICAgICAgICAgICAgICAgICAgbWFya2VyLWVuZD0idXJsKCNkYXRhZmxvdy1hcnJvd2hlYWQtbGVnZW5kKSIKICAgICAgICAgICAgICAgICAgICAgIHN0cm9rZT0iI2JiYiIKICAgICAgICAgICAgICAgICAgICAgIGQ9Ik0yIDkgbCAyOSAwIgogICAgICAgICAgICAgICAgICAgICAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogICAgICAgICAgICAgICAgICAgID48L3BhdGg+CiAgICAgICAgICAgICAgICAgIDwvc3ZnPgogICAgICAgICAgICAgICAgPC90ZD4KICAgICAgICAgICAgICAgIDx0ZD4KICAgICAgICAgICAgICAgICAgRGF0YWZsb3cgZWRnZQogICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJsZWdlbmQtY2xhcmlmaWVyIj4KICAgICAgICAgICAgICAgICAgICA8c3Bhbj4/PC9zcGFuPgogICAgICAgICAgICAgICAgICAgIDxwYXBlci10b29sdGlwCiAgICAgICAgICAgICAgICAgICAgICBhbmltYXRpb24tZGVsYXk9IjAiCiAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbj0icmlnaHQiCiAgICAgICAgICAgICAgICAgICAgICBvZmZzZXQ9IjAiCiAgICAgICAgICAgICAgICAgICAgPgogICAgICAgICAgICAgICAgICAgICAgRWRnZSBzaG93aW5nIHRoZSBkYXRhIGZsb3cgYmV0d2VlbiBvcGVyYXRpb25zLiBFZGdlcyBmbG93CiAgICAgICAgICAgICAgICAgICAgICB1cHdhcmRzIHVubGVzcyBhcnJvd2hlYWRzIHNwZWNpZnkgb3RoZXJ3aXNlLgogICAgICAgICAgICAgICAgICAgIDwvcGFwZXItdG9vbHRpcD4KICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgICA8L3RkPgogICAgICAgICAgICAgIDwvdHI+CiAgICAgICAgICAgICAgPHRyPgogICAgICAgICAgICAgICAgPHRkPgogICAgICAgICAgICAgICAgICA8c3ZnCiAgICAgICAgICAgICAgICAgICAgY2xhc3M9Imljb24iCiAgICAgICAgICAgICAgICAgICAgaGVpZ2h0PSIxNXB4IgogICAgICAgICAgICAgICAgICAgIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaW5ZTWlkIG1lZXQiCiAgICAgICAgICAgICAgICAgICAgdmlld0JveD0iMCAwIDE1IDE1IgogICAgICAgICAgICAgICAgICA+CiAgICAgICAgICAgICAgICAgICAgPHBhdGgKICAgICAgICAgICAgICAgICAgICAgIHN0cm9rZT0iI2JiYiIKICAgICAgICAgICAgICAgICAgICAgIGQ9Ik0yIDkgbCAyOSAwIgogICAgICAgICAgICAgICAgICAgICAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogICAgICAgICAgICAgICAgICAgICAgc3Ryb2tlLWRhc2hhcnJheT0iMiwgMiIKICAgICAgICAgICAgICAgICAgICA+PC9wYXRoPgogICAgICAgICAgICAgICAgICA8L3N2Zz4KICAgICAgICAgICAgICAgIDwvdGQ+CiAgICAgICAgICAgICAgICA8dGQ+CiAgICAgICAgICAgICAgICAgIENvbnRyb2wgZGVwZW5kZW5jeSBlZGdlCiAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImxlZ2VuZC1jbGFyaWZpZXIiPgogICAgICAgICAgICAgICAgICAgIDxzcGFuPj88L3NwYW4+CiAgICAgICAgICAgICAgICAgICAgPHBhcGVyLXRvb2x0aXAKICAgICAgICAgICAgICAgICAgICAgIGFuaW1hdGlvbi1kZWxheT0iMCIKICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uPSJyaWdodCIKICAgICAgICAgICAgICAgICAgICAgIG9mZnNldD0iMCIKICAgICAgICAgICAgICAgICAgICA+CiAgICAgICAgICAgICAgICAgICAgICBFZGdlIHNob3dpbmcgdGhlIGNvbnRyb2wgZGVwZW5kZW5jeSBiZXR3ZWVuIG9wZXJhdGlvbnMuCiAgICAgICAgICAgICAgICAgICAgPC9wYXBlci10b29sdGlwPgogICAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgIDwvdGQ+CiAgICAgICAgICAgICAgPC90cj4KICAgICAgICAgICAgICA8dHI+CiAgICAgICAgICAgICAgICA8dGQ+CiAgICAgICAgICAgICAgICAgIDxzdmcKICAgICAgICAgICAgICAgICAgICBjbGFzcz0iaWNvbiIKICAgICAgICAgICAgICAgICAgICBoZWlnaHQ9IjE1cHgiCiAgICAgICAgICAgICAgICAgICAgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pbllNaWQgbWVldCIKICAgICAgICAgICAgICAgICAgICB2aWV3Qm94PSIwIDAgMTUgMTUiCiAgICAgICAgICAgICAgICAgID4KICAgICAgICAgICAgICAgICAgICA8ZGVmcz4KICAgICAgICAgICAgICAgICAgICAgIDxtYXJrZXIKICAgICAgICAgICAgICAgICAgICAgICAgaWQ9InJlZmVyZW5jZS1hcnJvd2hlYWQtbGVnZW5kIgogICAgICAgICAgICAgICAgICAgICAgICBmaWxsPSIjRkZCNzREIgogICAgICAgICAgICAgICAgICAgICAgICBtYXJrZXJXaWR0aD0iMTAiCiAgICAgICAgICAgICAgICAgICAgICAgIG1hcmtlckhlaWdodD0iMTAiCiAgICAgICAgICAgICAgICAgICAgICAgIHJlZlg9IjkiCiAgICAgICAgICAgICAgICAgICAgICAgIHJlZlk9IjUiCiAgICAgICAgICAgICAgICAgICAgICAgIG9yaWVudD0iYXV0by1zdGFydC1yZXZlcnNlIgogICAgICAgICAgICAgICAgICAgICAgPgogICAgICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNIDAsMCBMIDEwLDUgTCAwLDEwIEMgMyw3IDMsMyAwLDAiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICAgIDwvbWFya2VyPgogICAgICAgICAgICAgICAgICAgIDwvZGVmcz4KICAgICAgICAgICAgICAgICAgICA8cGF0aAogICAgICAgICAgICAgICAgICAgICAgbWFya2VyLWVuZD0idXJsKCNyZWZlcmVuY2UtYXJyb3doZWFkLWxlZ2VuZCkiCiAgICAgICAgICAgICAgICAgICAgICBzdHJva2U9IiNGRkI3NEQiCiAgICAgICAgICAgICAgICAgICAgICBkPSJNMiA5IGwgMjkgMCIKICAgICAgICAgICAgICAgICAgICAgIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIKICAgICAgICAgICAgICAgICAgICA+PC9wYXRoPgogICAgICAgICAgICAgICAgICA8L3N2Zz4KICAgICAgICAgICAgICAgIDwvdGQ+CiAgICAgICAgICAgICAgICA8dGQ+CiAgICAgICAgICAgICAgICAgIFJlZmVyZW5jZSBlZGdlCiAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImxlZ2VuZC1jbGFyaWZpZXIiPgogICAgICAgICAgICAgICAgICAgIDxzcGFuPj88L3NwYW4+CiAgICAgICAgICAgICAgICAgICAgPHBhcGVyLXRvb2x0aXAKICAgICAgICAgICAgICAgICAgICAgIGFuaW1hdGlvbi1kZWxheT0iMCIKICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uPSJyaWdodCIKICAgICAgICAgICAgICAgICAgICAgIG9mZnNldD0iMCIKICAgICAgICAgICAgICAgICAgICA+CiAgICAgICAgICAgICAgICAgICAgICBFZGdlIHNob3dpbmcgdGhhdCB0aGUgb3V0Z29pbmcgb3BlcmF0aW9uIG5vZGUgY2FuIG11dGF0ZQogICAgICAgICAgICAgICAgICAgICAgdGhlIGluY29taW5nIHRlbnNvci4KICAgICAgICAgICAgICAgICAgICA8L3BhcGVyLXRvb2x0aXA+CiAgICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgPC90ZD4KICAgICAgICAgICAgICA8L3RyPgogICAgICAgICAgICA8L3Rib2R5PgogICAgICAgICAgPC90YWJsZT4KICAgICAgICA8L2Rpdj4KICAgICAgPC9pcm9uLWNvbGxhcHNlPgogICAgPC9kaXY+CiAgYDsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsKICAgICAgICAgICAgdHlwZTogT2JqZWN0LAogICAgICAgICAgICBvYnNlcnZlcjogJ19zdGF0c0NoYW5nZWQnLAogICAgICAgIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgT2JqZWN0KQogICAgXSwgVGZHcmFwaENvbnRyb2xzLnByb3RvdHlwZSwgInN0YXRzIiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsKICAgICAgICAgICAgdHlwZTogT2JqZWN0LAogICAgICAgICAgICBub3RpZnk6IHRydWUsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBPYmplY3QpCiAgICBdLCBUZkdyYXBoQ29udHJvbHMucHJvdG90eXBlLCAiZGV2aWNlc0ZvclN0YXRzIiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsKICAgICAgICAgICAgdHlwZTogU3RyaW5nLAogICAgICAgICAgICBub3RpZnk6IHRydWUsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBTdHJpbmcpCiAgICBdLCBUZkdyYXBoQ29udHJvbHMucHJvdG90eXBlLCAiY29sb3JCeSIsIHZvaWQgMCk7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7CiAgICAgICAgICAgIHR5cGU6IE9iamVjdCwKICAgICAgICAgICAgbm90aWZ5OiB0cnVlLAogICAgICAgIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgT2JqZWN0KQogICAgXSwgVGZHcmFwaENvbnRyb2xzLnByb3RvdHlwZSwgImNvbG9yQnlQYXJhbXMiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBBcnJheSwKICAgICAgICAgICAgb2JzZXJ2ZXI6ICdfZGF0YXNldHNDaGFuZ2VkJywKICAgICAgICB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIE9iamVjdCkKICAgIF0sIFRmR3JhcGhDb250cm9scy5wcm90b3R5cGUsICJkYXRhc2V0cyIsIHZvaWQgMCk7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7CiAgICAgICAgICAgIHR5cGU6IE9iamVjdCwKICAgICAgICB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIE9iamVjdCkKICAgIF0sIFRmR3JhcGhDb250cm9scy5wcm90b3R5cGUsICJyZW5kZXJIaWVyYXJjaHkiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBPYmplY3QsCiAgICAgICAgICAgIG5vdGlmeTogdHJ1ZSwKICAgICAgICAgICAgcmVhZE9ubHk6IHRydWUsCiAgICAgICAgICAgIGNvbXB1dGVkOiAnX2NvbXB1dGVTZWxlY3Rpb24oZGF0YXNldHMsIF9zZWxlY3RlZFJ1bkluZGV4LCBfc2VsZWN0ZWRUYWdJbmRleCwgX3NlbGVjdGVkR3JhcGhUeXBlKScsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBPYmplY3QpCiAgICBdLCBUZkdyYXBoQ29udHJvbHMucHJvdG90eXBlLCAic2VsZWN0aW9uIiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsKICAgICAgICAgICAgdHlwZTogT2JqZWN0LAogICAgICAgICAgICBub3RpZnk6IHRydWUsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBPYmplY3QpCiAgICBdLCBUZkdyYXBoQ29udHJvbHMucHJvdG90eXBlLCAic2VsZWN0ZWRGaWxlIiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsKICAgICAgICAgICAgdHlwZTogTnVtYmVyLAogICAgICAgICAgICBvYnNlcnZlcjogJ19zZWxlY3RlZFJ1bkluZGV4Q2hhbmdlZCcsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBOdW1iZXIpCiAgICBdLCBUZkdyYXBoQ29udHJvbHMucHJvdG90eXBlLCAiX3NlbGVjdGVkUnVuSW5kZXgiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBCb29sZWFuLAogICAgICAgICAgICBub3RpZnk6IHRydWUsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBCb29sZWFuKQogICAgXSwgVGZHcmFwaENvbnRyb2xzLnByb3RvdHlwZSwgInRyYWNlSW5wdXRzIiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsKICAgICAgICAgICAgdHlwZTogTnVtYmVyLAogICAgICAgICAgICBvYnNlcnZlcjogJ19zZWxlY3RlZFRhZ0luZGV4Q2hhbmdlZCcsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBOdW1iZXIpCiAgICBdLCBUZkdyYXBoQ29udHJvbHMucHJvdG90eXBlLCAiX3NlbGVjdGVkVGFnSW5kZXgiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBTdHJpbmcsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBTdHJpbmcpCiAgICBdLCBUZkdyYXBoQ29udHJvbHMucHJvdG90eXBlLCAiX3NlbGVjdGVkR3JhcGhUeXBlIiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsKICAgICAgICAgICAgdHlwZTogU3RyaW5nLAogICAgICAgICAgICBub3RpZnk6IHRydWUsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBTdHJpbmcpCiAgICBdLCBUZkdyYXBoQ29udHJvbHMucHJvdG90eXBlLCAic2VsZWN0ZWROb2RlIiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsKICAgICAgICAgICAgdHlwZTogQm9vbGVhbiwKICAgICAgICB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIEJvb2xlYW4pCiAgICBdLCBUZkdyYXBoQ29udHJvbHMucHJvdG90eXBlLCAic2hvd1Nlc3Npb25SdW5zRHJvcGRvd24iLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBCb29sZWFuLAogICAgICAgIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgQm9vbGVhbikKICAgIF0sIFRmR3JhcGhDb250cm9scy5wcm90b3R5cGUsICJzaG93VXBsb2FkQnV0dG9uIiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsgdHlwZTogQm9vbGVhbiB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIEJvb2xlYW4pCiAgICBdLCBUZkdyYXBoQ29udHJvbHMucHJvdG90eXBlLCAiaGVhbHRoUGlsbHNGZWF0dXJlRW5hYmxlZCIsIHZvaWQgMCk7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7CiAgICAgICAgICAgIHR5cGU6IEJvb2xlYW4sCiAgICAgICAgICAgIG5vdGlmeTogdHJ1ZSwKICAgICAgICB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIEJvb2xlYW4pCiAgICBdLCBUZkdyYXBoQ29udHJvbHMucHJvdG90eXBlLCAiaGVhbHRoUGlsbHNUb2dnbGVkT24iLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBCb29sZWFuLAogICAgICAgIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgQm9vbGVhbikKICAgIF0sIFRmR3JhcGhDb250cm9scy5wcm90b3R5cGUsICJfbGVnZW5kT3BlbmVkIiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIGNvbXB1dGVkKCdkZXZpY2VzRm9yU3RhdHMnKSwKICAgICAgICBfX21ldGFkYXRhKCJkZX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aWNlIGlzIG5vdCB0aGUgVFBVLgogICAgICAgICAqIE5vdGUgdGhhdCB0aGlzIGlzIG9ubHkgYSBiZXN0LWVmZm9ydCBjaGVjay4KICAgICAgICAgKi8KICAgICAgICBpc05vdFRwdU9wKG9wRGV2aWNlKSB7CiAgICAgICAgICAgIGlmIChvcERldmljZS50b0xvd2VyQ2FzZSgpLnNlYXJjaCgnY3B1OicpICE9IC0xKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAob3BEZXZpY2UudG9Mb3dlckNhc2UoKS5zZWFyY2goJ2dwdTonKSAhPSAtMSkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIG9wRGV2aWNlLnRvTG93ZXJDYXNlKCkuc2VhcmNoKCd0cHUnKSA9PSAtMTsKICAgICAgICB9CiAgICAgICAgb3BWYWxpZChvcE5vZGUpIHsKICAgICAgICAgICAgLy8gRnVuY3Rpb24gbGlicmFyeSBub2RlcyBhcmUgZ2VuZXJhbGx5IGZvciBpbnRlcm5hbCB1c2UuCiAgICAgICAgICAgIGlmIChvcE5vZGUubmFtZS5zZWFyY2goRlVOQ1RJT05fTElCUkFSWV9OT0RFX1BSRUZJWCkgPT0gMCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gTm9kZXMgdGhhdCBsYWNrIG9wIHR5cGVzIHNob3VsZCBiZSBpZ25vcmVkLgogICAgICAgICAgICBpZiAoIW9wTm9kZS5vcCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gSWYgYXNzaWduZWQgYSBkZXZpY2UgdGhhdCBpcyBub3QgVFBVLXJlbGF0ZWQgYXNzdW1lIG9wIGlzIHZhbGlkLgogICAgICAgICAgICBpZiAob3BOb2RlLmRldmljZSAmJiB0aGlzLmlzTm90VHB1T3Aob3BOb2RlLmRldmljZSkpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIElmIGFzc2lnbmVkIHRvIHRoZSBUUFVfU1lTVEVNIGRldmljZSwgYXNzdW1lIG9wIGlzIHZhbGlkLgogICAgICAgICAgICBpZiAob3BOb2RlLmRldmljZSAmJiBvcE5vZGUuZGV2aWNlLnNlYXJjaCgnVFBVX1NZU1RFTScpICE9IC0xKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gbG9kYXNoLmluY2x1ZGVzKFRwdUNvbXBhdGliaWxpdHlQcm92aWRlci5XSElURUxJU1QsIG9wTm9kZS5vcCk7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBBbGxvd2VkIGxpc3Qgb2YgY3VycmVudCBUZW5zb3JmbG93IG9wcyB2YWxpZCBvbiB0aGUgVFBVLgogICAgICogTm90ZSB0aGF0IHNvbWUgZGF0YSB0eXBlcyBtYXkgYmUgdW5zdXBwb3J0ZWQuCiAgICAgKi8KICAgIFRwdUNvbXBhdGliaWxpdHlQcm92aWRlci5XSElURUxJU1QgPSBbCiAgICAgICAgJ0FicycsCiAgICAgICAgJ0Fjb3MnLAogICAgICAgICdBY29zaCcsCiAgICAgICAgJ0FkZCcsCiAgICAgICAgJ0FkZE4nLAogICAgICAgICdBZGRWMicsCiAgICAgICAgJ0FkanVzdENvbnRyYXN0djInLAogICAgICAgICdBZGp1c3RIdWUnLAogICAgICAgICdBZGp1c3RTYXR1cmF0aW9uJywKICAgICAgICAnQWxsJywKICAgICAgICAnQWxsVG9BbGwnLAogICAgICAgICdBbmdsZScsCiAgICAgICAgJ0FueScsCiAgICAgICAgJ0FwcHJveGltYXRlRXF1YWwnLAogICAgICAgICdBcmdNYXgnLAogICAgICAgICdBcmdNaW4nLAogICAgICAgICdBc2luJywKICAgICAgICAnQXNpbmgnLAogICAgICAgICdBc3NlcnQnLAogICAgICAgICdBc3NpZ25BZGRWYXJpYWJsZU9wJywKICAgICAgICAnQXNzaWduU3ViVmFyaWFibGVPcCcsCiAgICAgICAgJ0Fzc2lnblZhcmlhYmxlT3AnLAogICAgICAgICdBdGFuJywKICAgICAgICAnQXRhbjInLAogICAgICAgICdBdGFuaCcsCiAgICAgICAgJ0F2Z1Bvb2wnLAogICAgICAgICdBdmdQb29sM0QnLAogICAgICAgICdBdmdQb29sM0RHcmFkJywKICAgICAgICAnQXZnUG9vbEdyYWQnLAogICAgICAgICdCYXRjaE1hdE11bCcsCiAgICAgICAgJ0JhdGNoTWF0TXVsVjInLAogICAgICAgICdCYXRjaFRvU3BhY2UnLAogICAgICAgICdCYXRjaFRvU3BhY2VORCcsCiAgICAgICAgJ0Jlc3NlbEkwZScsCiAgICAgICAgJ0Jlc3NlbEkxZScsCiAgICAgICAgJ0JldGFpbmMnLAogICAgICAgICdCaWFzQWRkJywKICAgICAgICAnQmlhc0FkZEdyYWQnLAogICAgICAgICdCaWFzQWRkVjEnLAogICAgICAgICdCaXRjYXN0JywKICAgICAgICAnQml0d2lzZUFuZCcsCiAgICAgICAgJ0JpdHdpc2VPcicsCiAgICAgICAgJ0JpdHdpc2VYb3InLAogICAgICAgICdCcm9hZGNhc3RBcmdzJywKICAgICAgICAnQnJvYWRjYXN0R3JhZGllbnRBcmdzJywKICAgICAgICAnQnJvYWRjYXN0VG8nLAogICAgICAgICdCdWNrZXRpemUnLAogICAgICAgICdDYXNlJywKICAgICAgICAnQ2FzdCcsCiAgICAgICAgJ0NlaWwnLAogICAgICAgICdDaGVja051bWVyaWNzJywKICAgICAgICAnQ2hvbGVza3knLAogICAgICAgICdDbGlwQnlWYWx1ZScsCiAgICAgICAgJ0NvbGxlY3RpdmVQZXJtdXRlJywKICAgICAgICAnQ29tcGxleCcsCiAgICAgICAgJ0NvbXBsZXhBYnMnLAogICAgICAgICdDb25jYXQnLAogICAgICAgICdDb25jYXRPZmZzZXQnLAogICAgICAgICdDb25jYXRWMicsCiAgICAgICAgJ0NvbmonLAogICAgICAgICdDb25qdWdhdGVUcmFuc3Bvc2UnLAogICAgICAgICdDb25zdCcsCiAgICAgICAgJ0NvbnRyb2xUcmlnZ2VyJywKICAgICAgICAnQ29udjJEJywKICAgICAgICAnQ29udjJEQmFja3Byb3BGaWx0ZXInLAogICAgICAgICdDb252MkRCYWNrcHJvcElucHV0JywKICAgICAgICAnQ29udjNEJywKICAgICAgICAnQ29udjNEQmFja3Byb3BGaWx0ZXJWMicsCiAgICAgICAgJ0NvbnYzREJhY2twcm9wSW5wdXRWMicsCiAgICAgICAgJ0NvcycsCiAgICAgICAgJ0Nvc2gnLAogICAgICAgICdDcm9zcycsCiAgICAgICAgJ0Nyb3NzUmVwbGljYVN1bScsCiAgICAgICAgJ0N1bXByb2QnLAogICAgICAgICdDdW1zdW0nLAogICAgICAgICdEYXRhRm9ybWF0RGltTWFwJywKICAgICAgICAnRGF0YUZvcm1hdFZlY1Blcm11dGUnLAogICAgICAgICdEYXRhRm9ybWF0VmVjUGVybXV0ZScsCiAgICAgICAgJ0RlcHRoVG9TcGFjZScsCiAgICAgICAgJ0RlcHRod2lzZUNvbnYyZE5hdGl2ZScsCiAgICAgICAgJ0RlcHRod2lzZUNvbnYyZE5hdGl2ZUJhY2twcm9wRmlsdGVyJywKICAgICAgICAnRGVwdGh3aXNlQ29udjJkTmF0aXZlQmFja3Byb3BJbnB1dCcsCiAgICAgICAgJ0RlcXVhbnRpemUnLAogICAgICAgICdEZXZpY2VJbmRleCcsCiAgICAgICAgJ0RpYWcnLAogICAgICAgICdEaWFnUGFydCcsCiAgICAgICAgJ0RpZ2FtbWEnLAogICAgICAgICdEaXYnLAogICAgICAgICdEaXZOb05hbicsCiAgICAgICAgJ0R5bmFtaWNTdGl0Y2gnLAogICAgICAgICdFaW5zdW0nLAogICAgICAgICdFbHUnLAogICAgICAgICdFbHVHcmFkJywKICAgICAgICAnRW1wdHknLAogICAgICAgICdFbXB0eVRlbnNvckxpc3QnLAogICAgICAgICdFbnN1cmVTaGFwZScsCiAgICAgICAgJ0VxdWFsJywKICAgICAgICAnRXJmJywKICAgICAgICAnRXJmYycsCiAgICAgICAgJ0VyZmludicsCiAgICAgICAgJ0V4cCcsCiAgICAgICAgJ0V4cGFuZERpbXMnLAogICAgICAgICdFeHBtMScsCiAgICAgICAgJ0V4dHJhY3RJbWFnZVBhdGNoZXMnLAogICAgICAgICdGRlQnLAogICAgICAgICdGRlQyRCcsCiAgICAgICAgJ0ZGVDNEJywKICAgICAgICAnRmFrZVBhcmFtJywKICAgICAgICAnRmFrZVF1YW50V2l0aE1pbk1heEFyZ3MnLAogICAgICAgICdGYWtlUXVhbnRXaXRoTWluTWF4QXJnc0dyYWRpZW50JywKICAgICAgICAnRmFrZVF1YW50V2l0aE1pbk1heFZhcnMnLAogICAgICAgICdGYWtlUXVhbnRXaXRoTWluTWF4VmFyc0dyYWRpZW50JywKICAgICAgICAnRmlsbCcsCiAgICAgICAgJ0Zsb29yJywKICAgICAgICAnRmxvb3JEaXYnLAogICAgICAgICdGbG9vck1vZCcsCiAgICAgICAgJ0Z1c2VkQmF0Y2hOb3JtJywKICAgICAgICAnRnVzZWRCYXRjaE5vcm1HcmFkJywKICAgICAgICAnRnVzZWRCYXRjaE5vcm1HcmFkVjInLAogICAgICAgICdGdXNlZEJhdGNoTm9ybUdyYWRWMycsCiAgICAgICAgJ0Z1c2VkQmF0Y2hOb3JtVjInLAogICAgICAgICdGdXNlZEJhdGNoTm9ybVYzJywKICAgICAgICAnR2F0aGVyJywKICAgICAgICAnR2F0aGVyTmQnLAogICAgICAgICdHYXRoZXJWMicsCiAgICAgICAgJ0dldEl0ZW0nLAogICAgICAgICdHcmVhdGVyJywKICAgICAgICAnR3JlYXRlckVxdWFsJywKICAgICAgICAnSFNWVG9SR0InLAogICAgICAgICdJRkZUJywKICAgICAgICAnSUZGVDJEJywKICAgICAgICAnSUZGVDNEJywKICAgICAgICAnSVJGRlQnLAogICAgICAgICdJUkZGVDJEJywKICAgICAgICAnSVJGRlQzRCcsCiAgICAgICAgJ0lkZW50aXR5JywKICAgICAgICAnSWRlbnRpdHlOJywKICAgICAgICAnSWYnLAogICAgICAgICdJZ2FtbWEnLAogICAgICAgICdJZ2FtbWFHcmFkQScsCiAgICAgICAgJ0lnYW1tYWMnLAogICAgICAgICdJbWFnJywKICAgICAgICAnSW5Ub3BLVjInLAogICAgICAgICdJbmZlZWREZXF1ZXVlJywKICAgICAgICAnSW5mZWVkRGVxdWV1ZVR1cGxlJywKICAgICAgICAnSW5wbGFjZUFkZCcsCiAgICAgICAgJ0lucGxhY2VVcGRhdGUnLAogICAgICAgICdJbnYnLAogICAgICAgICdJbnZlcnQnLAogICAgICAgICdJbnZlcnRQZXJtdXRhdGlvbicsCiAgICAgICAgJ0lzRmluaXRlJywKICAgICAgICAnSXNJbmYnLAogICAgICAgICdJc05hbicsCiAgICAgICAgJ0t0aE9yZGVyU3RhdGlzdGljJywKICAgICAgICAnTDJMb3NzJywKICAgICAgICAnTFJOJywKICAgICAgICAnTFJOR3JhZCcsCiAgICAgICAgJ0xlYWt5UmVsdScsCiAgICAgICAgJ0xlYWt5UmVsdUdyYWQnLAogICAgICAgICdMZWZ0U2hpZnQnLAogICAgICAgICdMZXNzJywKICAgICAgICAnTGVzc0VxdWFsJywKICAgICAgICAnTGdhbW1hJywKICAgICAgICAnTGluU3BhY2UnLAogICAgICAgICdMaXN0RGlmZicsCiAgICAgICAgJ0xvZycsCiAgICAgICAgJ0xvZzFwJywKICAgICAgICAnTG9nU29mdG1heCcsCiAgICAgICAgJ0xvZ2ljYWxBbmQnLAogICAgICAgICdMb2dpY2FsTm90JywKICAgICAgICAnTG9naWNhbE9yJywKICAgICAgICAnTG93ZXJCb3VuZCcsCiAgICAgICAgJ01ha2VVbmlxdWUnLAogICAgICAgICdNYXRNdWwnLAogICAgICAgICdNYXRyaXhCYW5kUGFydCcsCiAgICAgICAgJ01hdHJpeERpYWcnLAogICAgICAgICdNYXRyaXhEaWFnUGFydCcsCiAgICAgICAgJ01hdHJpeERpYWdQYXJ0VjInLAogICAgICAgICdNYXRyaXhEaWFnUGFydFYzJywKICAgICAgICAnTWF0cml4RGlhZ1YyJywKICAgICAgICAnTWF0cml4RGlhZ1YzJywKICAgICAgICAnTWF0cml4SW52ZXJzZScsCiAgICAgICAgJ01hdHJpeFNldERpYWcnLAogICAgICAgICdNYXRyaXhTZXREaWFnVjInLAogICAgICAgICdNYXRyaXhTZXREaWFnVjMnLAogICAgICAgICdNYXRyaXhTb2x2ZScsCiAgICAgICAgJ01hdHJpeFRyaWFuZ3VsYXJTb2x2ZScsCiAgICAgICAgJ01heCcsCiAgICAgICAgJ01heFBvb2wnLAogICAgICAgICdNYXhQb29sM0QnLAogICAgICAgICdNYXhQb29sM0RHcmFkJywKICAgICAgICAnTWF4UG9vbDNER3JhZEdyYWQnLAogICAgICAgICdNYXhQb29sR3JhZCcsCiAgICAgICAgJ01heFBvb2xHcmFkR3JhZCcsCiAgICAgICAgJ01heFBvb2xHcmFkR3JhZFYyJywKICAgICAgICAnTWF4UG9vbEdyYWRWMicsCiAgICAgICAgJ01heFBvb2xWMicsCiAgICAgICAgJ01heGltdW0nLAogICAgICAgICdNZWFuJywKICAgICAgICAnTWluJywKICAgICAgICAnTWluaW11bScsCiAgICAgICAgJ01pcnJvclBhZCcsCiAgICAgICAgJ01vZCcsCiAgICAgICAgJ011bCcsCiAgICAgICAgJ011bE5vTmFuJywKICAgICAgICAnTXVsdGlub21pYWwnLAogICAgICAgICdOZHRyaScsCiAgICAgICAgJ05lZycsCiAgICAgICAgJ05leHRBZnRlcicsCiAgICAgICAgJ05vT3AnLAogICAgICAgICdOb25NYXhTdXBwcmVzc2lvblY0JywKICAgICAgICAnTm90RXF1YWwnLAogICAgICAgICdPbmVIb3QnLAogICAgICAgICdPbmVzTGlrZScsCiAgICAgICAgJ091dGZlZWRFbnF1ZXVlJywKICAgICAgICAnT3V0ZmVlZEVucXVldWVUdXBsZScsCiAgICAgICAgJ1BhY2snLAogICAgICAgICdQYWQnLAogICAgICAgICdQYWRWMicsCiAgICAgICAgJ1BhcmFsbGVsRHluYW1pY1N0aXRjaCcsCiAgICAgICAgJ1BhcmFtZXRlcml6ZWRUcnVuY2F0ZWROb3JtYWwnLAogICAgICAgICdQYXJ0aXRpb25lZENhbGwnLAogICAgICAgICdQbGFjZWhvbGRlcldpdGhEZWZhdWx0JywKICAgICAgICAnUG9wdWxhdGlvbkNvdW50JywKICAgICAgICAnUG93JywKICAgICAgICAnUHJldmVudEdyYWRpZW50JywKICAgICAgICAnUHJvZCcsCiAgICAgICAgJ1FyJywKICAgICAgICAnUXVhbnRpemVBbmREZXF1YW50aXplVjInLAogICAgICAgICdRdWFudGl6ZUFuZERlcXVhbnRpemVWMycsCiAgICAgICAgJ1JGRlQnLAogICAgICAgICdSRkZUMkQnLAogICAgICAgICdSRkZUM0QnLAogICAgICAgICdSR0JUb0hTVicsCiAgICAgICAgJ1JhbmRvbUdhbW1hR3JhZCcsCiAgICAgICAgJ1JhbmRvbVNodWZmbGUnLAogICAgICAgICdSYW5kb21TdGFuZGFyZE5vcm1hbCcsCiAgICAgICAgJ1JhbmRvbVVuaWZvcm0nLAogICAgICAgICdSYW5kb21Vbmlmb3JtSW50JywKICAgICAgICAnUmFuZ2UnLAogICAgICAgICdSYW5rJywKICAgICAgICAnUmVhZFZhcmlhYmxlT3AnLAogICAgICAgICdSZWFsJywKICAgICAgICAnUmVhbERpdicsCiAgICAgICAgJ1JlY2lwcm9jYWwnLAogICAgICAgICdSZWNpcHJvY2FsR3JhZCcsCiAgICAgICAgJ1JlbHUnLAogICAgICAgICdSZWx1NicsCiAgICAgICAgJ1JlbHU2R3JhZCcsCiAgICAgICAgJ1JlbHVHcmFkJywKICAgICAgICAnUmVzaGFwZScsCiAgICAgICAgJ1Jlc2l6ZUJpbGluZWFyJywKICAgICAgICAnUmVzaXplQmlsaW5lYXJHcmFkJywKICAgICAgICAnUmVzaXplTmVhcmVzdE5laWdoYm9yJywKICAgICAgICAnUmVzaXplTmVhcmVzdE5laWdoYm9yR3JhZCcsCiAgICAgICAgJ1Jlc291cmNlQXBwbHlBZGFNYXgnLAogICAgICAgICdSZXNvdXJjZUFwcGx5QWRhZGVsdGEnLAogICAgICAgICdSZXNvdXJjZUFwcGx5QWRhZ3JhZCcsCiAgICAgICAgJ1Jlc291cmNlQXBwbHlBZGFncmFkREEnLAogICAgICAgICdSZXNvdXJjZUFwcGx5QWRhZ3JhZFYyJywKICAgICAgICAnUmVzb3VyY2VBcHBseUFkYW0nLAogICAgICAgICdSZXNvdXJjZUFwcGx5QWRkU2lnbicsCiAgICAgICAgJ1Jlc291cmNlQXBwbHlDZW50ZXJlZFJNU1Byb3AnLAogICAgICAgICdSZXNvdXJjZUFwcGx5RnRybCcsCiAgICAgICAgJ1Jlc291cmNlQXBwbHlGdHJsVjInLAogICAgICAgICdSZXNvdXJjZUFwcGx5R3JhZGllbnREZXNjZW50JywKICAgICAgICAnUmVzb3VyY2VBcHBseUtlcmFzTW9tZW50dW0nLAogICAgICAgICdSZXNvdXJjZUFwcGx5TW9tZW50dW0nLAogICAgICAgICdSZXNvdXJjZUFwcGx5UG93ZXJTaWduJywKICAgICAgICAnUmVzb3VyY2VBcHBseVByb3hpbWFsQWRhZ3JhZCcsCiAgICAgICAgJ1Jlc291cmNlQXBwbHlQcm94aW1hbEdyYWRpZW50RGVzY2VudCcsCiAgICAgICAgJ1Jlc291cmNlQXBwbHlSTVNQcm9wJywKICAgICAgICAnUmVzb3VyY2VHYXRoZXInLAogICAgICAgICdSZXNvdXJjZVNjYXR0ZXJBZGQnLAogICAgICAgICdSZXNvdXJjZVNjYXR0ZXJEaXYnLAogICAgICAgICdSZXNvdXJjZVNjYXR0ZXJNYXgnLAogICAgICAgICdSZXNvdXJjZVNjYXR0ZXJNaW4nLAogICAgICAgICdSZXNvdXJjZVNjYXR0ZXJNdWwnLAogICAgICAgICdSZXNvdXJjZVNjYXR0ZXJOZEFkZCcsCiAgICAgICAgJ1Jlc291cmNlU2NhdHRlck5kU3ViJywKICAgICAgICAnUmVzb3VyY2VTY2F0dGVyTmRVcGRhdGUnLAogICAgICAgICdSZXNvdXJjZVNjYXR0ZXJTdWInLAogICAgICAgICdSZXNvdXJjZVNjYXR0ZXJVcGRhdGUnLAogICAgICAgICdSZXNvdXJjZVN0cmlkZWRTbGljZUFzc2lnbicsCiAgICAgICAgJ1JldmVyc2UnLAogICAgICAgICdSZXZlcnNlU2VxdWVuY2UnLAogICAgICAgICdSZXZlcnNlVjInLAogICAgICAgICdSaWdodFNoaWZ0JywKICAgICAgICAnUmludCcsCiAgICAgICAgJ1JvbGwnLAogICAgICAgICdSb3VuZCcsCiAgICAgICAgJ1JzcXJ0JywKICAgICAgICAnUnNxcnRHcmFkJywKICAgICAgICAnU2NhdHRlck5kJywKICAgICAgICAnU2VsZWN0JywKICAgICAgICAnU2VsZWN0VjInLAogICAgICAgICdTZWxmQWRqb2ludEVpZ1YyJywKICAgICAgICAnU2VsdScsCiAgICAgICAgJ1NlbHVHcmFkJywKICAgICAgICAnU2hhcGUnLAogICAgICAgICdTaGFwZU4nLAogICAgICAgICdTaWdtb2lkJywKICAgICAgICAnU2lnbW9pZEdyYWQnLAogICAgICAgICdTaWduJywKICAgICAgICAnU2luJywKICAgICAgICAnU2luaCcsCiAgICAgICAgJ1NpemUnLAogICAgICAgICdTbGljZScsCiAgICAgICAgJ1NuYXBzaG90JywKICAgICAgICAnU29mdG1heCcsCiAgICAgICAgJ1NvZnRtYXhDcm9zc0VudHJvcHlXaXRoTG9naXRzJywKICAgICAgICAnU29mdHBsdXMnLAogICAgICAgICdTb2Z0cGx1c0dyYWQnLAogICAgICAgICdTb2Z0c2lnbicsCiAgICAgICAgJ1NvZnRzaWduR3JhZCcsCiAgICAgICAgJ1NwYWNlVG9CYXRjaCcsCiAgICAgICAgJ1NwYWNlVG9CYXRjaE5EJywKICAgICAgICAnU3BhY2VUb0RlcHRoJywKICAgICAgICAnU3BhcnNlTWF0TXVsJywKICAgICAgICAnU3BhcnNlU29mdG1heENyb3NzRW50cm9weVdpdGhMb2dpdHMnLAogICAgICAgICdTcGFyc2VUb0RlbnNlJywKICAgICAgICAnU3BsaXQnLAogICAgICAgICdTcGxpdFYnLAogICAgICAgICdTcXJ0JywKICAgICAgICAnU3FydEdyYWQnLAogICAgICAgICdTcXVhcmUnLAogICAgICAgICdTcXVhcmVkRGlmZmVyZW5jZScsCiAgICAgICAgJ1NxdWVlemUnLAogICAgICAgICdTdGFja0Nsb3NlVjInLAogICAgICAgICdTdGFja1BvcFYyJywKICAgICAgICAnU3RhY2tQdXNoVjInLAogICAgICAgICdTdGFja1YyJywKICAgICAgICAnU3RhdGVmdWxQYXJ0aXRpb25lZENhbGwnLAogICAgICAgICdTdGF0ZWZ1bFN0YW5kYXJkTm9ybWFsVjInLAogICAgICAgICdTdGF0ZWZ1bFRydW5jYXRlZE5vcm1hbCcsCiAgICAgICAgJ1N0YXRlZnVsVW5pZm9ybScsCiAgICAgICAgJ1N0YXRlZnVsVW5pZm9ybUZ1bGxJbnQnLAogICAgICAgICdTdGF0ZWZ1bFVuaWZvcm1JbnQnLAogICAgICAgICdTdGF0ZWxlc3NDYXNlJywKICAgICAgICAnU3RhdGVsZXNzSWYnLAogICAgICAgICdTdGF0ZWxlc3NNdWx0aW5vbWlhbCcsCiAgICAgICAgJ1N0YXRlbGVzc1JhbmRvbU5vcm1hbCcsCiAgICAgICAgJ1N0YXRlbGVzc1JhbmRvbVVuaWZvcm0nLAogICAgICAgICdTdGF0ZWxlc3NSYW5kb21Vbmlmb3JtRnVsbEludCcsCiAgICAgICAgJ1N0YXRlbGVzc1JhbmRvbVVuaWZvcm1JbnQnLAogICAgICAgICdTdGF0ZWxlc3NUcnVuY2F0ZWROb3JtYWwnLAogICAgICAgICdTdGF0ZWxlc3NXaGlsZScsCiAgICAgICAgJ1N0b3BHcmFkaWVudCcsCiAgICAgICAgJ1N0cmlkZWRTbGljZScsCiAgICAgICAgJ1N0cmlkZWRTbGljZUdyYWQnLAogICAgICAgICdTdWInLAogICAgICAgICdTdW0nLAogICAgICAgICdTdmQnLAogICAgICAgICdTeW1ib2xpY0dyYWRpZW50JywKICAgICAgICAnVFBVRW1iZWRkaW5nQWN0aXZhdGlvbnMnLAogICAgICAgICdUYW4nLAogICAgICAgICdUYW5oJywKICAgICAgICAnVGFuaEdyYWQnLAogICAgICAgICdUZW5zb3JBcnJheUNsb3NlVjMnLAogICAgICAgICdUZW5zb3JBcnJheUNvbmNhdFYzJywKICAgICAgICAnVGVuc29yQXJyYXlHYXRoZXJWMycsCiAgICAgICAgJ1RlbnNvckFycmF5R3JhZFYzJywKICAgICAgICAnVGVuc29yQXJyYXlSZWFkVjMnLAogICAgICAgICdUZW5zb3JBcnJheVNjYXR0ZXJWMycsCiAgICAgICAgJ1RlbnNvckFycmF5U2l6ZVYzJywKICAgICAgICAnVGVuc29yQXJyYXlTcGxpdFYzJywKICAgICAgICAnVGVuc29yQXJyYXlWMycsCiAgICAgICAgJ1RlbnNvckFycmF5V3JpdGVWMycsCiAgICAgICAgJ1RlbnNvckxpc3RDb25jYXRWMicsCiAgICAgICAgJ1RlbnNvckxpc3RFbGVtZW50U2hhcGUnLAogICAgICAgICdUZW5zb3JMaXN0RnJvbVRlbnNvcicsCiAgICAgICAgJ1RlbnNvckxpc3RHYXRoZXInLAogICAgICAgICdUZW5zb3JMaXN0R2V0SXRlbScsCiAgICAgICAgJ1RlbnNvckxpc3RMZW5ndGgnLAogICAgICAgICdUZW5zb3JMaXN0UG9wQmFjaycsCiAgICAgICAgJ1RlbnNvckxpc3RQdXNoQmFjaycsCiAgICAgICAgJ1RlbnNvckxpc3RSZXNlcnZlJywKICAgICAgICAnVGVuc29yTGlzdFNldEl0ZW0nLAogICAgICAgICdUZW5zb3JMaXN0U3BsaXQnLAogICAgICAgICdUZW5zb3JMaXN0U3RhY2snLAogICAgICAgICdUZW5zb3JTY2F0dGVyQWRkJywKICAgICAgICAnVGVuc29yU2NhdHRlclN1YicsCiAgICAgICAgJ1RlbnNvclNjYXR0ZXJVcGRhdGUnLAogICAgICAgICdUaWxlJywKICAgICAgICAnVG9wS1VuaXF1ZScsCiAgICAgICAgJ1RvcEtWMicsCiAgICAgICAgJ1RvcEtXaXRoVW5pcXVlJywKICAgICAgICAnVHJhbnNwb3NlJywKICAgICAgICAnVHJpZGlhZ29uYWxTb2x2ZScsCiAgICAgICAgJ1RydW5jYXRlRGl2JywKICAgICAgICAnVHJ1bmNhdGVNb2QnLAogICAgICAgICdUcnVuY2F0ZWROb3JtYWwnLAogICAgICAgICdVbnBhY2snLAogICAgICAgICdVbnNvcnRlZFNlZ21lbnRNYXgnLAogICAgICAgICdVbnNvcnRlZFNlZ21lbnRNaW4nLAogICAgICAgICdVbnNvcnRlZFNlZ21lbnRQcm9kJywKICAgICAgICAnVW5zb3J0ZWRTZWdtZW50U3VtJywKICAgICAgICAnVXBwZXJCb3VuZCcsCiAgICAgICAgJ1ZhcklzSW5pdGlhbGl6ZWRPcCcsCiAgICAgICAgJ1ZhcmlhYmxlU2hhcGUnLAogICAgICAgICdXaGVyZScsCiAgICAgICAgJ1doaWxlJywKICAgICAgICAnWGRpdnknLAogICAgICAgICdYbGFCcm9hZGNhc3RIZWxwZXInLAogICAgICAgICdYbGFDb252JywKICAgICAgICAnWGxhRGVxdWFudGl6ZScsCiAgICAgICAgJ1hsYURvdCcsCiAgICAgICAgJ1hsYUR5bmFtaWNTbGljZScsCiAgICAgICAgJ1hsYUR5bmFtaWNVcGRhdGVTbGljZScsCiAgICAgICAgJ1hsYUVpbnN1bScsCiAgICAgICAgJ1hsYUdhdGhlcicsCiAgICAgICAgJ1hsYUhvc3RDb21wdXRlJywKICAgICAgICAnWGxhSWYnLAogICAgICAgICdYbGFLZXlWYWx1ZVNvcnQnLAogICAgICAgICdYbGFQYWQnLAogICAgICAgICdYbGFSZWN2JywKICAgICAgICAnWGxhUmVjdkZyb21Ib3N0JywKICAgICAgICAnWGxhUmVkdWNlJywKICAgICAgICAnWGxhUmVkdWNlV2luZG93JywKICAgICAgICAnWGxhUmVwbGljYUlkJywKICAgICAgICAnWGxhU2NhdHRlcicsCiAgICAgICAgJ1hsYVNlbGVjdEFuZFNjYXR0ZXInLAogICAgICAgICdYbGFTZWxmQWRqb2ludEVpZycsCiAgICAgICAgJ1hsYVNlbmQnLAogICAgICAgICdYbGFTZW5kVG9Ib3N0JywKICAgICAgICAnWGxhU2hhcmRpbmcnLAogICAgICAgICdYbGFTb3J0JywKICAgICAgICAnWGxhU3BtZEZ1bGxUb1NoYXJkU2hhcGUnLAogICAgICAgICdYbGFTcG1kU2hhcmRUb0Z1bGxTaGFwZScsCiAgICAgICAgJ1hsYVN2ZCcsCiAgICAgICAgJ1hsYVdoaWxlJywKICAgICAgICAnWGxvZzFweScsCiAgICAgICAgJ1hsb2d5JywKICAgICAgICAnWmVyb3NMaWtlJywKICAgICAgICAvLyBPcHMgYmVsb3cgYXJlIG1hbnVhbGx5IHdoaXRlbGlzdGVkIGFuZCBzaG91bGQgbm90IGJlIGV2YWx1YXRlZCBmb3IKICAgICAgICAvLyBjb21wYXRpYmlsaXR5IGZvciB2YXJpb3VzIHJlYXNvbnMuCiAgICAgICAgLy8gQ29udHJvbCBmbG93IG9wcy4KICAgICAgICAnRW50ZXInLAogICAgICAgICdFeGl0JywKICAgICAgICAnTG9vcENvbmQnLAogICAgICAgICdNZXJnZScsCiAgICAgICAgJ05leHRJdGVyYXRpb24nLAogICAgICAgICdTd2l0Y2gnLAogICAgICAgIC8vIE9wcyBiZWxvdyBhcmUgaW5zZXJ0ZWQgYnkgdGhlIGNvbXBpbGVyLgogICAgICAgICdfQXJnJywKICAgICAgICAnX0FycmF5VG9MaXN0JywKICAgICAgICAnX0Z1c2VkQmF0Y2hOb3JtRXgnLAogICAgICAgICdfTGlzdFRvQXJyYXknLAogICAgICAgICdfUGFyYWxsZWxDb25jYXRVcGRhdGUnLAogICAgICAgICdfUmVjdlRQVUVtYmVkZGluZ0FjdGl2YXRpb25zJywKICAgICAgICAnX1JlY3ZUUFVFbWJlZGRpbmdEZWR1cGxpY2F0aW9uRGF0YScsCiAgICAgICAgJ19SZXR2YWwnLAogICAgICAgICdfU2VuZFRQVUVtYmVkZGluZ0dyYWRpZW50cycsCiAgICAgICAgJ19UUFVDb21waWxlJywKICAgICAgICAnX1RQVUV4ZWN1dGUnLAogICAgICAgICdfVW5hcnlPcHNDb21wb3NpdGlvbicsCiAgICAgICAgLy8gRGlzdHJpYnV0ZWQgVFBVIG9wcy4KICAgICAgICAnVFBVQ29tcGlsYXRpb25SZXN1bHQnLAogICAgICAgICdUUFVSZXBsaWNhdGVkSW5wdXQnLAogICAgICAgICdUUFVSZXBsaWNhdGVkT3V0cHV0JywKICAgICAgICAnVFBVUmVwbGljYXRlTWV0YWRhdGEnLAogICAgICAgIC8vIENoZWNrcG9pbnRpbmcgb3BzLgogICAgICAgICdNZXJnZVYyQ2hlY2twb2ludHMnLAogICAgICAgICdSZXN0b3JlVjInLAogICAgICAgICdTYXZlVjInLAogICAgICAgIC8vIE1pc2NlbGxhbmVvdXMgQ1BVIG9wcy4KICAgICAgICAnQWJvcnQnLAogICAgICAgICdBc3NlcnQnLAogICAgICAgICdBc3NpZ24nLAogICAgICAgICdQbGFjZWhvbGRlcicsCiAgICAgICAgJ1BsYWNlaG9sZGVyVjInLAogICAgICAgICdTaGFyZGVkRmlsZW5hbWUnLAogICAgICAgICdTdHJpbmdKb2luJywKICAgICAgICAnVmFyaWFibGUnLAogICAgICAgICdWYXJpYWJsZVYyJywKICAgICAgICAnVmFySGFuZGxlT3AnLAogICAgICAgIC8vIFN1bW1hcnkgb3BzLgogICAgICAgICdBdWRpb1N1bW1hcnknLAogICAgICAgICdBdWRpb1N1bW1hcnlWMicsCiAgICAgICAgJ0RlYnVnTnVtZXJpY1N1bW1hcnknLAogICAgICAgICdIaXN0b2dyYW1TdW1tYXJ5JywKICAgICAgICAnSW1hZ2VTdW1tYXJ5JywKICAgICAgICAnTWVyZ2VTdW1tYXJ5JywKICAgICAgICAnU2NhbGFyU3VtbWFyeScsCiAgICAgICAgJ1N0YXRzQWdncmVnYXRvclN1bW1hcnknLAogICAgXTsKICAgIGZ1bmN0aW9uIGNoZWNrT3BzRm9yQ29tcGF0aWJpbGl0eShncmFwaCwgcHJvdmlkZXIpIHsKICAgICAgICBpZiAocHJvdmlkZXIgPT09IG51bGwpIHsKICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdDb21wYXRpYmlsaXR5IHByb3ZpZGVyIHJlcXVpcmVkLCBidXQgZ290OiAnICsgcHJvdmlkZXIpOwogICAgICAgIH0KICAgICAgICBsb2Rhc2guZWFjaChncmFwaC5ub2RlcywgKG5vZGUpID0+IHsKICAgICAgICAgICAgbm9kZS5jb21wYXRpYmxlID0gcHJvdmlkZXIub3BWYWxpZChub2RlKTsKICAgICAgICAgICAgbG9kYXNoLmVhY2gobm9kZS5pbkVtYmVkZGluZ3MsIChub2RlKSA9PiB7CiAgICAgICAgICAgICAgICBub2RlLmNvbXBhdGlibGUgPSBwcm92aWRlci5vcFZhbGlkKG5vZGUpOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgbG9kYXNoLmVhY2gobm9kZS5vdXRFbWJlZGRpbmdzLCAobm9kZSkgPT4gewogICAgICAgICAgICAgICAgbm9kZS5jb21wYXRpYmxlID0gcHJvdmlkZXIub3BWYWxpZChub2RlKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfSk7CiAgICB9CgogICAgZnVuY3Rpb24gcGFyc2VWYWx1ZSh2YWx1ZSkgewogICAgICAgIGlmICh2YWx1ZSA9PT0gJ3RydWUnKSB7CiAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgIH0KICAgICAgICBpZiAodmFsdWUgPT09ICdmYWxzZScpIHsKICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgIH0KICAgICAgICBsZXQgZmlyc3RDaGFyID0gdmFsdWVbMF07CiAgICAgICAgaWYgKGZpcnN0Q2hhciA9PT0gJyInKSB7CiAgICAgICAgICAgIHJldHVybiB2YWx1ZS5zdWJzdHJpbmcoMSwgdmFsdWUubGVuZ3RoIC0gMSk7CiAgICAgICAgfQogICAgICAgIGxldCBudW0gPSBwYXJzZUZsb2F0KHZhbHVlKTsKICAgICAgICByZXR1cm4gaXNOYU4obnVtKSA/IHZhbHVlIDogbnVtOwogICAgfQogICAgLyoqCiAgICAgKiBGZXRjaGVzIGEgdGV4dCBmaWxlIGFuZCByZXR1cm5zIGEgcHJvbWlzZSBvZiB0aGUgcmVzdWx0LgogICAgICovCiAgICBmdW5jdGlvbiBmZXRjaFBiVHh0KGZpbGVwYXRoKSB7CiAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHsKICAgICAgICAgICAgZmV0Y2goZmlsZXBhdGgpLnRoZW4oKHJlcykgPT4gewogICAgICAgICAgICAgICAgLy8gRmV0Y2ggZG9lcyBub3QgcmVqZWN0IGZvciA0MDArLgogICAgICAgICAgICAgICAgaWYgKHJlcy5vaykgewogICAgICAgICAgICAgICAgICAgIHJlcy5hcnJheUJ1ZmZlcigpLnRoZW4ocmVzb2x2ZSwgcmVqZWN0KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIHJlcy50ZXh0KCkudGhlbihyZWplY3QsIHJlamVjdCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgIH0pOwogICAgfQogICAgLyoqCiAgICAgKiBGZXRjaGVzIHRoZSBtZXRhZGF0YSBmaWxlLCBwYXJzZXMgaXQgYW5kIHJldHVybnMgYSBwcm9taXNlIG9mIHRoZSByZXN1bHQuCiAgICAgKi8KICAgIGZ1bmN0aW9uIGZldGNoQW5kUGFyc2VNZXRhZGF0YShwYXRoLCB0cmFja2VyKSB7CiAgICAgICAgcmV0dXJuIHJ1blRhc2soJ1JlYWRpbmcgbWV0YWRhdGEgcGJ0eHQnLCA0MCwgKCkgPT4gewogICAgICAgICAgICBpZiAocGF0aCA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gUHJvbWlzZS5yZXNvbHZlKG51bGwpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBmZXRjaFBiVHh0KHBhdGgpOwogICAgICAgIH0sIHRyYWNrZXIpCiAgICAgICAgICAgIC50aGVuKChhcnJheUJ1ZmZlcikgPT4gewogICAgICAgICAgICByZXR1cm4gcnVuQXN5bmNQcm9taXNlVGFzaygnUGFyc2luZyBtZXRhZGF0YS5wYnR4dCcsIDYwLCAoKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gYXJyYXlCdWZmZXIgIT0gbnVsbAogICAgICAgICAgICAgICAgICAgID8gcGFyc2VTdGF0c1BiVHh0KGFycmF5QnVmZmVyKQogICAgICAgICAgICAgICAgICAgIDogUHJvbWlzZS5yZXNvbHZlKG51bGwpOwogICAgICAgICAgICB9LCB0cmFja2VyKTsKICAgICAgICB9KTsKICAgIH0KICAgIC8qKgogICAgICogRmV0Y2hlcyB0aGUgZ3JhcGggZmlsZSwgcGFyc2VzIGl0IGFuZCByZXR1cm5zIGEgcHJvbWlzZSBvZiB0aGUgcmVzdWx0LiBUaGUKICAgICAqIHJlc3VsdCB3aWxsIGJlIHVuZGVmaW5lZCBpZiB0aGUgZ3JhcGggaXMgZW1wdHkuCiAgICAgKi8KICAgIGZ1bmN0aW9uIGZldGNoQW5kUGFyc2VHcmFwaERhdGEocGF0aCwgcGJUeHRGaWxlLCB0cmFja2VyKSB7CiAgICAgICAgcmV0dXJuIHJ1bkFzeW5jUHJvbWlzZVRhc2soJ1JlYWRpbmcgZ3JhcGggcGJ0eHQnLCA0MCwgKCkgPT4gewogICAgICAgICAgICBpZiAocGJUeHRGaWxlKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IFByb21pc2UoZnVuY3Rpb24gKHJlc29sdmUsIHJlamVjdCkgewogICAgICAgICAgICAgICAgICAgIGxldCBmaWxlUmVhZGVyID0gbmV3IEZpbGVSZWFkZXIoKTsKICAgICAgICAgICAgICAgICAgICBmaWxlUmVhZGVyLm9ubG9hZCA9ICgpID0+IHJlc29sdmUoZmlsZVJlYWRlci5yZXN1bHQpOwogICAgICAgICAgICAgICAgICAgIGZpbGVSZWFkZXIub25lcnJvciA9ICgpID0+IHJlamVjdChmaWxlUmVhZGVyLmVycm9yKTsKICAgICAgICAgICAgICAgICAgICBmaWxlUmVhZGVyLnJlYWRBc0FycmF5QnVmZmVyKHBiVHh0RmlsZSk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHJldHVybiBmZXRjaFBiVHh0KHBhdGgpOwogICAgICAgICAgICB9CiAgICAgICAgfSwgdHJhY2tlcikKICAgICAgICAgICAgLnRoZW4oKGFycmF5QnVmZmVyKSA9PiB7CiAgICAgICAgICAgIHJldHVybiBydW5Bc3luY1Byb21pc2VUYXNrKCdQYXJzaW5nIGdyYXBoLnBidHh0JywgNjAsICgpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiBwYXJzZUdyYXBoUGJUeHQoYXJyYXlCdWZmZXIpOwogICAgICAgICAgICB9LCB0cmFja2VyKTsKICAgICAgICB9KTsKICAgIH0KICAgIC8qKgogICAgICogUGFyc2UgYSBmaWxlIG9iamVjdCBpbiBhIHN0cmVhbWluZyBmYXNoaW9uIGxpbmUgYnkgbGluZSAob3IgY3VzdG9tIGRlbGltKS4KICAgICAqIENhbiBoYW5kbGUgdmVyeSBsYXJnZSBmaWxlcy4KICAgICAqIEBwYXJhbSBpbnB1dCBUaGUgZmlsZSBvYmplY3QgYXMgYW4gYXJyYXkgYnVmZmVyLgogICAgICogQHBhcmFtIGNhbGxiYWNrIFRoZSBjYWxsYmFjayBjYWxsZWQgb24gZWFjaCBsaW5lCiAgICAgKiBAcGFyYW0gY2h1bmtTaXplIFRoZSBzaXplIG9mIGVhY2ggcmVhZCBjaHVuay4gKG9wdGlvbmFsKQogICAgICogQHBhcmFtIGRlbGltIFRoZSBkZWxpbWl0ZXIgdXNlZCB0byBzcGxpdCBhIGxpbmUuIChvcHRpb25hbCkKICAgICAqIEByZXR1cm5zIFByb21pc2UgdGhhdCByZXNvbHZlcyB3aXRoIHRydWUgd2hlbiBpdCBpcyBmaW5pc2hlZC4KICAgICAqLwogICAgZnVuY3Rpb24gc3RyZWFtUGFyc2UoYXJyYXlCdWZmZXIsIGNhbGxiYWNrLCBjaHVua1NpemUgPSAxMDAwMDAwLCBkZWxpbSA9ICdcbicpIHsKICAgICAgICByZXR1cm4gbmV3IFByb21pc2UoZnVuY3Rpb24gKHJlc29sdmUsIHJlamVjdCkgewogICAgICAgICAgICBmdW5jdGlvbiByZWFkQ2h1bmsob2xkRGF0YSwgbmV3RGF0YSwgb2Zmc2V0KSB7CiAgICAgICAgICAgICAgICBjb25zdCBkb25lUmVhZGluZyA9IG9mZnNldCA+PSBhcnJheUJ1ZmZlci5ieXRlTGVuZ3RoOwogICAgICAgICAgICAgICAgY29uc3QgcGFydHMgPSBuZXdEYXRhLnNwbGl0KGRlbGltKTsKICAgICAgICAgICAgICAgIHBhcnRzWzBdID0gb2xkRGF0YSArIHBhcnRzWzBdOwogICAgICAgICAgICAgICAgLy8gVGhlIGxhc3QgcGFydCBtYXkgYmUgcGFydCBvZiBhIGxvbmdlciBzdHJpbmcgdGhhdCBnb3QgY3V0IG9mZgogICAgICAgICAgICAgICAgLy8gZHVlIHRvIHRoZSBjaHVua2luZy4KICAgICAgICAgICAgICAgIGNvbnN0IHJlbWFpbmRlciA9IGRvbmVSZWFkaW5nID8gJycgOiBwYXJ0cy5wb3AoKTsKICAgICAgICAgICAgICAgIGZvciAobGV0IHBhcnQgb2YgcGFydHMpIHsKICAgICAgICAgICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgICAgICAgICBjYWxsYmFjayhwYXJ0KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgY2F0Y2ggKGUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0KGUpOwogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKGRvbmVSZWFkaW5nKSB7CiAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZSh0cnVlKTsKICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjb25zdCBuZXh0Q2h1bmsgPSBuZXcgQmxvYihbCiAgICAgICAgICAgICAgICAgICAgYXJyYXlCdWZmZXIuc2xpY2Uob2Zmc2V0LCBvZmZzZXQgKyBjaHVua1NpemUpLAogICAgICAgICAgICAgICAgXSk7CiAgICAgICAgICAgICAgICBjb25zdCBmaWxlID0gbmV3IEZpbGVSZWFkZXIoKTsKICAgICAgICAgICAgICAgIGZpbGUub25sb2FkID0gZnVuY3Rpb24gKGUpIHsKICAgICAgICAgICAgICAgICAgICByZWFkQ2h1bmsocmVtYWluZGVyLCBlLnRhcmdldC5yZXN1bHQsIG9mZnNldCArIGNodW5rU2l6ZSk7CiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgZmlsZS5yZWFkQXNUZXh0KG5leHRDaHVuayk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmVhZENodW5rKCcnLCAnJywgMCk7CiAgICAgICAgfSk7CiAgICB9CiAgICAvKioKICAgICAqIFNpbmNlIHByb3RvLXR4dCBkb2Vzbid0IGV4cGxpY2l0bHkgc2F5IHdoZXRoZXIgYW4gYXR0cmlidXRlIGlzIHJlcGVhdGVkCiAgICAgKiAoYW4gYXJyYXkpIG9yIG5vdCwgd2Uga2VlcCBhIGhhcmQtY29kZWQgbGl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Y3Rpb24gcGFyc2VQYnR4dEZpbGUoaW5wdXQsIHJlcGVhdGVkRmllbGRzKSB7CiAgICAgICAgbGV0IG91dHB1dCA9IHt9OwogICAgICAgIGxldCBzdGFjayA9IFtdOwogICAgICAgIGxldCBwYXRoID0gW107CiAgICAgICAgbGV0IGN1cnJlbnQgPSBvdXRwdXQ7CiAgICAgICAgZnVuY3Rpb24gc3BsaXROYW1lQW5kVmFsdWVJbkF0dHJpYnV0ZShsaW5lKSB7CiAgICAgICAgICAgIGxldCBjb2xvbkluZGV4ID0gbGluZS5pbmRleE9mKCc6Jyk7CiAgICAgICAgICAgIGxldCBuYW1lID0gbGluZS5zdWJzdHJpbmcoMCwgY29sb25JbmRleCkudHJpbSgpOwogICAgICAgICAgICBsZXQgdmFsdWUgPSBwYXJzZVZhbHVlKGxpbmUuc3Vic3RyaW5nKGNvbG9uSW5kZXggKyAyKS50cmltKCkpOwogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgbmFtZTogbmFtZSwKICAgICAgICAgICAgICAgIHZhbHVlOiB2YWx1ZSwKICAgICAgICAgICAgfTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQWRkcyBhIHZhbHVlLCBnaXZlbiB0aGUgYXR0cmlidXRlIG5hbWUgYW5kIHRoZSBob3N0IG9iamVjdC4gSWYgdGhlCiAgICAgICAgICogYXR0cmlidXRlIGFscmVhZHkgZXhpc3RzLCBidXQgaXMgbm90IGFuIGFycmF5LCBpdCB3aWxsIGNvbnZlcnQgaXQgdG8gYW4KICAgICAgICAgKiBhcnJheSBvZiB2YWx1ZXMuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gb2JqIFRoZSBob3N0IG9iamVjdCB0aGF0IGhvbGRzIHRoZSBhdHRyaWJ1dGUuCiAgICAgICAgICogQHBhcmFtIG5hbWUgVGhlIGF0dHJpYnV0ZSBuYW1lIChrZXkpLgogICAgICAgICAqIEBwYXJhbSB2YWx1ZSBUaGUgYXR0cmlidXRlIHZhbHVlLgogICAgICAgICAqIEBwYXJhbSBwYXRoIEEgcGF0aCB0aGF0IGlkZW50aWZpZXMgdGhlIGF0dHJpYnV0ZS4gVXNlZCB0byBjaGVjayBpZgogICAgICAgICAqICAgICBhbiBhdHRyaWJ1dGUgaXMgYW4gYXJyYXkgb3Igbm90LgogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIGFkZEF0dHJpYnV0ZShvYmosIG5hbWUsIHZhbHVlLCBwYXRoKSB7CiAgICAgICAgICAgIC8vIFdlIHRyZWF0ICdub2RlJyBzcGVjaWFsbHkgc2luY2UgaXQgaXMgZG9uZSBzbyBvZnRlbi4KICAgICAgICAgICAgbGV0IGV4aXN0aW5nVmFsdWUgPSBvYmpbbmFtZV07CiAgICAgICAgICAgIGlmIChleGlzdGluZ1ZhbHVlID09IG51bGwpIHsKICAgICAgICAgICAgICAgIG9ialtuYW1lXSA9IHBhdGguam9pbignLicpIGluIHJlcGVhdGVkRmllbGRzID8gW3ZhbHVlXSA6IHZhbHVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKEFycmF5LmlzQXJyYXkoZXhpc3RpbmdWYWx1ZSkpIHsKICAgICAgICAgICAgICAgIGV4aXN0aW5nVmFsdWUucHVzaCh2YWx1ZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBvYmpbbmFtZV0gPSBbZXhpc3RpbmdWYWx1ZSwgdmFsdWVdOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8vIFJ1biB0aHJvdWdoIHRoZSBmaWxlIGEgbGluZSBhdCBhIHRpbWUuCiAgICAgICAgcmV0dXJuIHN0cmVhbVBhcnNlKGlucHV0LCBmdW5jdGlvbiAobGluZSkgewogICAgICAgICAgICBpZiAoIWxpbmUpIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICBsaW5lID0gbGluZS50cmltKCk7CiAgICAgICAgICAgIHN3aXRjaCAobGluZVtsaW5lLmxlbmd0aCAtIDFdKSB7CiAgICAgICAgICAgICAgICBjYXNlICd7JzogLy8gY3JlYXRlIG5ldyBvYmplY3QKICAgICAgICAgICAgICAgICAgICBsZXQgbmFtZSA9IGxpbmUuc3Vic3RyaW5nKDAsIGxpbmUubGVuZ3RoIC0gMikudHJpbSgpOwogICAgICAgICAgICAgICAgICAgIGxldCBuZXdWYWx1ZSA9IHt9OwogICAgICAgICAgICAgICAgICAgIHN0YWNrLnB1c2goY3VycmVudCk7CiAgICAgICAgICAgICAgICAgICAgcGF0aC5wdXNoKG5hbWUpOwogICAgICAgICAgICAgICAgICAgIGFkZEF0dHJpYnV0ZShjdXJyZW50LCBuYW1lLCBuZXdWYWx1ZSwgcGF0aCk7CiAgICAgICAgICAgICAgICAgICAgY3VycmVudCA9IG5ld1ZhbHVlOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgY2FzZSAnfSc6CiAgICAgICAgICAgICAgICAgICAgY3VycmVudCA9IHN0YWNrLnBvcCgpOwogICAgICAgICAgICAgICAgICAgIHBhdGgucG9wKCk7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICAgICAgIGxldCB4ID0gc3BsaXROYW1lQW5kVmFsdWVJbkF0dHJpYnV0ZShsaW5lKTsKICAgICAgICAgICAgICAgICAgICBhZGRBdHRyaWJ1dGUoY3VycmVudCwgeC5uYW1lLCB4LnZhbHVlLCBwYXRoLmNvbmNhdCh4Lm5hbWUpKTsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQogICAgICAgIH0pLnRoZW4oZnVuY3Rpb24gKCkgewogICAgICAgICAgICByZXR1cm4gb3V0cHV0OwogICAgICAgIH0pOwogICAgfQoKICAgIGZ1bmN0aW9uIGZldGNoQW5kQ29uc3RydWN0SGllcmFyY2hpY2FsR3JhcG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JhcmNoeVBhcmFtczsKICAgICAgICAgICAgdGhpcy5fdGVtcGxhdGUgPSBudWxsOwogICAgICAgIH0KICAgICAgICBfc2VsZWN0aW9uQ2hhbmdlZCgpIHsKICAgICAgICAgICAgLy8gc2VsZWN0aW9uIGNhbiBjaGFuZ2UgYSBsb3Qgd2l0aGluIGEgbWljcm90YXNrLgogICAgICAgICAgICAvLyBEb24ndCBmZXRjaCB0b28gbXVjaCB0b28gZmFzdCBhbmQgaW50cm9kdWNlIHJhY2UgY29uZGl0aW9uLgogICAgICAgICAgICB0aGlzLmRlYm91bmNlKCdzZWxlY3Rpb25jaGFuZ2UnLCAoKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLl9sb2FkKHRoaXMuc2VsZWN0aW9uKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIF9sb2FkKHNlbGVjdGlvbikgewogICAgICAgICAgICBjb25zdCB7IHJ1biwgdGFnLCB0eXBlOiBzZWxlY3Rpb25UeXBlIH0gPSBzZWxlY3Rpb247CiAgICAgICAgICAgIHN3aXRjaCAoc2VsZWN0aW9uVHlwZSkgewogICAgICAgICAgICAgICAgY2FzZSBTZWxlY3Rpb25UeXBlLk9QX0dSQVBIOgogICAgICAgICAgICAgICAgY2FzZSBTZWxlY3Rpb25UeXBlLkNPTkNFUFRVQUxfR1JBUEg6IHsKICAgICAgICAgICAgICAgICAgICAvLyBDbGVhciBzdGF0cyBhYm91dCB0aGUgcHJldmlvdXMgZ3JhcGguCiAgICAgICAgICAgICAgICAgICAgKGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fc2V0T3V0U3RhdHMobnVsbCk7CiAgICAgICAgICAgICAgICAgICAgfS5iaW5kKHRoaXMpKCkpOwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHBhcmFtcyA9IG5ldyBVUkxTZWFyY2hQYXJhbXMoKTsKICAgICAgICAgICAgICAgICAgICBwYXJhbXMuc2V0KCdydW4nLCBydW4pOwogICAgICAgICAgICAgICAgICAgIHBhcmFtcy5zZXQoJ2NvbmNlcHR1YWwnLCBTdHJpbmcoc2VsZWN0aW9uVHlwZSA9PT0gU2VsZWN0aW9uVHlwZS5DT05DRVBUVUFMX0dSQVBIKSk7CiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZykKICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLnNldCgndGFnJywgdGFnKTsKICAgICAgICAgICAgICAgICAgICBjb25zdCBncmFwaFBhdGggPSBnZXRSb3V0ZXIoKS5wbHVnaW5Sb3V0ZSgnZ3JhcGhzJywgJy9ncmFwaCcsIHBhcmFtcyk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2ZldGNoQW5kQ29uc3RydWN0SGllcmFyY2hpY2FsR3JhcGgoZ3JhcGhQYXRoKS50aGVuKCgpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fZ3JhcGhSdW5UYWcgPSB7IHJ1biwgdGFnIH07CiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjYXNlIFNlbGVjdGlvblR5cGUuUFJPRklMRTogewogICAgICAgICAgICAgICAgICAgIGNvbnN0IHsgdGFncyB9ID0gdGhpcy5kYXRhc2V0cy5maW5kKCh7IG5hbWUgfSkgPT4gbmFtZSA9PT0gcnVuKTsKICAgICAgICAgICAgICAgICAgICBjb25zdCB0YWdNZXRhID0gdGFncy5maW5kKCh0KSA9PiB0LnRhZyA9PT0gdGFnKTsKICAgICAgICAgICAgICAgICAgICAvLyBJbiBjYXNlIGN1cnJlbnQgdGFnIG1pc3NlcyBvcEdyYXBoIGJ1dCBoYXMgcHJvZmlsZSBpbmZvcm1hdGlvbiwKICAgICAgICAgICAgICAgICAgICAvLyB3ZSBmYWxsYmFjayB0byB0aGUgdjEgYmVoYXZpb3Igb2YgZmV0Y2hpbmcgdGhlIHJ1biBncmFwaC4KICAgICAgICAgICAgICAgICAgICBjb25zdCByZXF1aXJlZE9wR3JhcGhUYWcgPSB0YWdNZXRhLm9wR3JhcGggPyB0YWcgOiBudWxsOwogICAgICAgICAgICAgICAgICAgIGNvbnNvbGUuYXNzZXJ0KHRhZ3MuZmluZCgodCkgPT4gdC50YWcgPT09IHJlcXVpcmVkT3BHcmFwaFRhZyksIGBSZXF1aXJlZCB0YWcgKCR7cmVxdWlyZWRPcEdyYXBoVGFnfSkgaXMgbWlzc2luZy5gKTsKICAgICAgICAgICAgICAgICAgICBjb25zdCBzaG91bGRGZXRjaEdyYXBoID0gIXRoaXMuX2dyYXBoUnVuVGFnIHx8CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2dyYXBoUnVuVGFnLnJ1biAhPT0gcnVuIHx8CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2dyYXBoUnVuVGFnLnRhZyAhPT0gcmVxdWlyZWRPcEdyYXBoVGFnOwogICAgICAgICAgICAgICAgICAgIGNvbnN0IG1heWJlRmV0Y2hHcmFwaFByb21pc2UgPSBzaG91bGRGZXRjaEdyYXBoCiAgICAgICAgICAgICAgICAgICAgICAgID8gdGhpcy5fbG9hZCh7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBydW4sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YWc6IHJlcXVpcmVkT3BHcmFwaFRhZywKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IFNlbGVjdGlvblR5cGUuT1BfR1JBUEgsCiAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgICAgIDogUHJvbWlzZS5yZXNvbHZlKCk7CiAgICAgICAgICAgICAgICAgICAgY29uc3QgcGFyYW1zID0gbmV3IFVSTFNlYXJjaFBhcmFtcygpOwogICAgICAgICAgICAgICAgICAgIHBhcmFtcy5zZXQoJ3RhZycsIHRhZyk7CiAgICAgICAgICAgICAgICAgICAgcGFyYW1zLnNldCgncnVuJywgcnVuKTsKICAgICAgICAgICAgICAgICAgICBjb25zdCBtZXRhZGF0YVBhdGggPSBnZXRSb3V0ZXIoKS5wbHVnaW5Sb3V0ZSgnZ3JhcGhzJywgJy9ydW5fbWV0YWRhdGEnLCBwYXJhbXMpOwogICAgICAgICAgICAgICAgICAgIHJldHVybiBtYXliZUZldGNoR3JhcGhQcm9taXNlLnRoZW4oKCkgPT4gdGhpcy5fcmVhZEFuZFBhcnNlTWV0YWRhdGEobWV0YWRhdGFQYXRoKSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICAgICAgIHJldHVybiBQcm9taXNlLnJlamVjdChuZXcgRXJyb3IoYFVua25vd24gc2VsZWN0aW9uIHR5cGU6ICR7c2VsZWN0aW9uVHlwZX1gKSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgX3JlYWRBbmRQYXJzZU1ldGFkYXRhKHBhdGgpIHsKICAgICAgICAgICAgLy8gUmVzZXQgdGhlIHByb2dyZXNzIGJhciB0byAwLgogICAgICAgICAgICB0aGlzLnNldCgncHJvZ3Jlc3MnLCB7CiAgICAgICAgICAgICAgICB2YWx1ZTogMCwKICAgICAgICAgICAgICAgIG1zZzogJycsCiAgICAgICAgICAgIH0pOwogICAgICAgICAgICB2YXIgdHJhY2tlciA9IGdldFRyYWNrZXIodGhpcyk7CiAgICAgICAgICAgIGZldGNoQW5kUGFyc2VNZXRhZGF0YShwYXRoLCB0cmFja2VyKS50aGVuKGZ1bmN0aW9uIChzdGF0cykgewogICAgICAgICAgICAgICAgdGhpcy5fc2V0T3V0U3RhdHMoc3RhdHMpOwogICAgICAgICAgICB9LmJpbmQodGhpcykpOwogICAgICAgIH0KICAgICAgICBfZmV0Y2hBbmRDb25zdHJ1Y3RIaWVyYXJjaGljYWxHcmFwaChwYXRoLCBwYlR4dEZpbGUpIHsKICAgICAgICAgICAgLy8gUmVzZXQgdGhlIHByb2dyZXNzIGJhciB0byAwLgogICAgICAgICAgICB0aGlzLnNldCgncHJvZ3Jlc3MnLCB7CiAgICAgICAgICAgICAgICB2YWx1ZTogMCwKICAgICAgICAgICAgICAgIG1zZzogJycsCiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBjb25zdCB0cmFja2VyID0gZ2V0VHJhY2tlcih0aGlzKTsKICAgICAgICAgICAgcmV0dXJuIGZldGNoQW5kQ29uc3RydWN0SGllcmFyY2hpY2FsR3JhcGgodHJhY2tlciwgcGF0aCwgcGJUeHRGaWxlLCB0aGlzLmNvbXBhdGliaWxpdHlQcm92aWRlciwgdGhpcy5oaWVyYXJjaHlQYXJhbXMpCiAgICAgICAgICAgICAgICAudGhlbihmdW5jdGlvbiAoeyBncmFwaCwgZ3JhcGhIaWVyYXJjaHkgfSkgewogICAgICAgICAgICAgICAgdGhpcy5fc2V0T3V0R3JhcGgoZ3JhcGgpOwogICAgICAgICAgICAgICAgdGhpcy5fc2V0T3V0R3JhcGhIaWVyYXJjaHkoZ3JhcGhIaWVyYXJjaHkpOwogICAgICAgICAgICB9LmJpbmQodGhpcykpOwogICAgICAgIH0KICAgICAgICBfc2VsZWN0ZWRGaWxlQ2hhbmdlZCgpIHsKICAgICAgICAgICAgdmFyIGUgPSB0aGlzLnNlbGVjdGVkRmlsZTsKICAgICAgICAgICAgaWYgKCFlKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY29uc3QgdGFyZ2V0ID0gZS50YXJnZXQ7CiAgICAgICAgICAgIGNvbnN0IGZpbGUgPSB0YXJnZXQuZmlsZXNbMF07CiAgICAgICAgICAgIGlmICghZmlsZSkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIENsZWFyIG91dCB0aGUgdmFsdWUgb2YgdGhlIGZpbGUgY2hvb3Nlci4gVGhpcyBlbnN1cmVzIHRoYXQgaWYgdGhlIHVzZXIKICAgICAgICAgICAgLy8gc2VsZWN0cyB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gICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBPYmplY3QsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBPYmplY3QpCiAgICBdLCBUZkdyYXBoRGFzaGJvYXJkTG9hZGVyLnByb3RvdHlwZSwgImNvbXBhdGliaWxpdHlQcm92aWRlciIsIHZvaWQgMCk7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7CiAgICAgICAgICAgIHR5cGU6IE9iamVjdCwKICAgICAgICB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIE9iamVjdCkKICAgIF0sIFRmR3JhcGhEYXNoYm9hcmRMb2FkZXIucHJvdG90eXBlLCAiaGllcmFyY2h5UGFyYW1zIiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsKICAgICAgICAgICAgdHlwZTogT2JqZWN0LAogICAgICAgICAgICByZWFkT25seTogdHJ1ZSwKICAgICAgICAgICAgbm90aWZ5OiB0cnVlLAogICAgICAgIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgT2JqZWN0KQogICAgXSwgVGZHcmFwaERhc2hib2FyZExvYWRlci5wcm90b3R5cGUsICJvdXRHcmFwaEhpZXJhcmNoeSIsIHZvaWQgMCk7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7CiAgICAgICAgICAgIHR5cGU6IE9iamVjdCwKICAgICAgICAgICAgcmVhZE9ubHk6IHRydWUsCiAgICAgICAgICAgIG5vdGlmeTogdHJ1ZSwKICAgICAgICB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIE9iamVjdCkKICAgIF0sIFRmR3JhcGhEYXNoYm9hcmRMb2FkZXIucHJvdG90eXBlLCAib3V0R3JhcGgiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgIC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ihQb2x5bWVyRWxlbWVudCkgewogICAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgICAgICBzdXBlciguLi5hcmd1bWVudHMpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQHR5cGUgeyFBcnJheTwhUnVuSXRlbT59CiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9kYXRhc2V0cyA9IFtdOwogICAgICAgICAgICB0aGlzLl9kYXRhc2V0c0ZldGNoZWQgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5fc2VsZWN0ZWREYXRhc2V0ID0gMDsKICAgICAgICAgICAgdGhpcy5fcmVxdWVzdE1hbmFnZXIgPSBuZXcgUmVxdWVzdE1hbmFnZXIoKTsKICAgICAgICAgICAgdGhpcy5fY2FuY2VsbGVyID0gbmV3IENhbmNlbGxlcigpOwogICAgICAgICAgICB0aGlzLnNwZWNpZmljSGVhbHRoUGlsbFN0ZXAgPSAwOwogICAgICAgICAgICB0aGlzLmhlYWx0aFBpbGxzVG9nZ2xlZE9uID0gZmFsc2U7CiAgICAgICAgICAgIC8vIEFuIGFycmF5IG9mIGFsZXJ0cyAoaW4gY2hyb25vbG9naWNhbCBvcmRlcikgcHJvdmlkZWQgYnkgZGVidWdnaW5nIGxpYnJhcmllcyBvbiB3aGVuIGJhZAogICAgICAgICAgICAvLyB2YWx1ZXMgKE5hTiwgKy8tIEluZikgYXBwZWFyLgogICAgICAgICAgICB0aGlzLl9kZWJ1Z2dlck51bWVyaWNBbGVydHMgPSBbXTsKICAgICAgICAgICAgLy8gTWFwcyB0aGUgbmFtZXMgb2Ygbm9kZXMgdG8gYW4gYXJyYXkgb2YgaGVhbHRoIHBpbGxzIChIZWFsdGhQaWxsRGF0dW1zKS4KICAgICAgICAgICAgdGhpcy5fbm9kZU5hbWVzVG9IZWFsdGhQaWxscyA9IHt9OwogICAgICAgICAgICAvLyBBIHN0cmljdGx5IGluY3JlYXNpbmcgSUQuIEVhY2ggcmVxdWVzdCBmb3Iga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lZCcsIHRydWUpOwogICAgICAgIH0KICAgICAgICBkZXRhY2hlZCgpIHsKICAgICAgICAgICAgdGhpcy5zZXQoJ19pc0F0dGFjaGVkJywgZmFsc2UpOwogICAgICAgIH0KICAgICAgICByZWFkeSgpIHsKICAgICAgICAgICAgc3VwZXIucmVhZHkoKTsKICAgICAgICAgICAgdGhpcy5hZGRFdmVudExpc3RlbmVyKCdub2RlLXRvZ2dsZS1leHBhbmQnLCB0aGlzLl9oYW5kbGVOb2RlVG9nZ2xlRXhwYW5kLmJpbmQodGhpcykpOwogICAgICAgIH0KICAgICAgICByZWxvYWQoKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5fZGVidWdnZXJEYXRhRW5hYmxlZCkgewogICAgICAgICAgICAgICAgLy8gQ2hlY2sgaWYgdGhlIGRlYnVnZ2VyIHBsdWdpbiBpcyBlbmFibGVkIG5vdy4KICAgICAgICAgICAgICAgIHRoaXMuX3JlcXVlc3RNYW5hZ2VyLnJlcXVlc3QoZ2V0Um91dGVyKCkucGx1Z2luc0xpc3RpbmcoKSkudGhlbih0aGlzLl9jYW5jZWxsZXIuY2FuY2VsbGFibGUoKHJlc3VsdCkgPT4gewogICAgICAgICAgICAgICAgICAgIGlmIChyZXN1bHQuY2FuY2VsbGVkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3VsdC52YWx1ZVsnZGVidWdnZXInXSkgewogICAgICAgICAgICAgICAgICAgICAgICAvLyBUaGUgZGVidWdnZXIgcGx1Z2luIGlzIGVuYWJsZWQuIFJlcXVlc3QgZGVidWdnZXItcmVsYXRlZAogICAgICAgICAgICAgICAgICAgICAgICAvLyBkYXRhLiBQZXJoYXBzIHRoZSBkZWJ1Z2dlciBwbHVnaW4gaGFkIGJlZW4gZGlzYWJsZWQKICAgICAgICAgICAgICAgICAgICAgICAgLy8gYmVmb3JlaGFuZCBiZWNhdXNlIG5vIGJhZCB2YWx1ZXMgKE5hTiwgLS8rIEluZikgaGFkIGJlZW4KICAgICAgICAgICAgICAgICAgICAgICAgLy8gZm91bmQgYW5kIG11dGVkX2lmX2hlYWx0aHkgaGFkIGJlZW4gb24uCiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0KCdfZGVidWdnZXJEYXRhRW5hYmxlZCcsIHRydWUpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9tYXliZUZldGNoSGVhbHRoUGlsbHMoKTsKICAgICAgICB9CiAgICAgICAgX2ZpdCgpIHsKICAgICAgICAgICAgdGhpcy4kJCgnI2dyYXBoYm9hcmQnKS5maXQoKTsKICAgICAgICB9CiAgICAgICAgX2ZldGNoRGF0YXNldCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3JlcXVlc3RNYW5hZ2VyLnJlcXVlc3QoZ2V0Um91dGVyKCkucGx1Z2luUm91dGUoJ2dyYXBocycsICcvaW5mbycpKTsKICAgICAgICB9CiAgICAgICAgLyoKICAgICAgICAgKiBTZWUgYWxzbyBfbWF5YmVGZXRjaEhlYWx0aFBpbGxzLCBfaW5pdGlhdGVOZXR3b3JrUmVxdWVzdEZvckhlYWx0aFBpbGxzLgogICAgICAgICAqIFRoaXMgZnVuY3Rpb24gcmV0dXJucyBhIHByb21pc2Ugd2l0aCB0aGUgcmF3IGhlYWx0aCBwaWxsIGRhdGEuCiAgICAgICAgICovCiAgICAgICAgX2ZldGNoSGVhbHRoUGlsbHMobm9kZU5hbWVzLCBzdGVwKSB7CiAgICAgICAgICAgIGNvbnN0IHBvc3REYXRhID0gewogICAgICAgICAgICAgICAgbm9kZV9uYW1lczogSlNPTi5zdHJpbmdpZnkobm9kZU5hbWVzKSwKICAgICAgICAgICAgICAgIC8vIEV2ZW50cyBmaWxlcyB3aXRoIGRlYnVnZ2VyIGRhdGEgZmFsbCB1bmRl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pYWxpemVkIC4uLiBvciB3ZSBhcmUgbm90IHlldCByZWFkeSB0byBpbml0aWFsaXplLgogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuc2V0KCdfY29tcGF0aWJpbGl0eVByb3ZpZGVyJywgbmV3IFRwdUNvbXBhdGliaWxpdHlQcm92aWRlcigpKTsKICAgICAgICAgICAgLy8gU2V0IHRoaXMgdG8gdHJ1ZSBzbyB3ZSBvbmx5IGluaXRpYWxpemUgb25jZS4KICAgICAgICAgICAgdGhpcy5faW5pdGlhbGl6ZWQgPSB0cnVlOwogICAgICAgICAgICB0aGlzLl9mZXRjaERhdGFzZXQoKS50aGVuKChkYXRhc2V0KSA9PiB7CiAgICAgICAgICAgICAgICBjb25zdCBydW5OYW1lcyA9IE9iamVjdC5rZXlzKGRhdGFzZXQpOwogICAgICAgICAgICAgICAgLy8gVHJhbnNmb3JtIHJhdyBkYXRhIGludG8gVUkgZnJpZW5kbHkgZGF0YS4KICAgICAgICAgICAgICAgIHRoaXMuX2RhdGFzZXRzID0gcnVuTmFtZXMKICAgICAgICAgICAgICAgICAgICAuc29ydChjb21wYXJlVGFnTmFtZXMpCiAgICAgICAgICAgICAgICAgICAgLm1hcCgocnVuTmFtZSkgPT4gewogICAgICAgICAgICAgICAgICAgIGNvbnN0IHJ1bkRhdGEgPSBkYXRhc2V0W3J1bk5hbWVdOwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHRhZ05hbWVzID0gT2JqZWN0LmtleXMocnVuRGF0YS50YWdzKS5zb3J0KGNvbXBhcmVUYWdOYW1lcyk7CiAgICAgICAgICAgICAgICAgICAgY29uc3QgdGFncyA9IHRhZ05hbWVzCiAgICAgICAgICAgICAgICAgICAgICAgIC5tYXAoKG5hbWUpID0+IHJ1bkRhdGEudGFnc1tuYW1lXSkKICAgICAgICAgICAgICAgICAgICAgICAgLm1hcCgoeyB0YWcsIGNvbmNlcHR1YWxfZ3JhcGgsIG9wX2dyYXBoLCBwcm9maWxlIH0pID0+ICh7CiAgICAgICAgICAgICAgICAgICAgICAgIHRhZywKICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheU5hbWU6IHRhZywKICAgICAgICAgICAgICAgICAgICAgICAgY29uY2VwdHVhbEdyYXBoOiBjb25jZXB0dWFsX2dyYXBoLAogICAgICAgICAgICAgICAgICAgICAgICBvcEdyYXBoOiBvcF9ncmFwaCwKICAgICAgICAgICAgICAgICAgICAgICAgcHJvZmlsZSwKICAgICAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICAgICAgLy8gVHJhbnNsYXRlIGEgcnVuLXdpZGUgR3JhcGhEZWYgaW50byBzcGVjaWFsbHkgbmFtZWQgKHdpdGhvdXQgYSB0YWcpIG9wIGdyYXBoCiAgICAgICAgICAgICAgICAgICAgLy8gdG8gYWJzdHJhY3QgdGhlIGRpZmZlcmVuY2UgYmV0d2VlbiBydW5fZ3JhcGggdnMuIG9wX2dyYXBoIGZyb20gb3RoZXIKICAgICAgICAgICAgICAgICAgICAvLyBjb21wb25lbnRzLgogICAgICAgICAgICAgICAgICAgIGNvbnN0IHRhZ3NXaXRoVjFHcmFwaCA9IHJ1bkRhdGEucnVuX2dyYXBoCiAgICAgICAgICAgICAgICAgICAgICAgID8gWwogICAgICAgICAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhZzogbnVsbCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5TmFtZTogJ0RlZmF1bHQnLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmNlcHR1YWxHcmFwaDogZmFsc2UsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3BHcmFwaDogdHJ1ZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm9maWxlOiBmYWxzZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAuLi50YWdzLAogICAgICAgICAgICAgICAgICAgICAgICBdCiAgICAgICAgICAgICAgICAgICAgICAgIDogdGFnczsKICAgICAgICAgICAgICAgICAgICByZXR1cm4geyBuYW1lOiBydW5OYW1lLCB0YWdzOiB0YWdzV2l0aFYxR3JhcGggfTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgdGhpcy5fZGF0YXNldHNGZXRjaGVkID0gdHJ1ZTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIF9kZXRlcm1pbmVTZWxlY3RlZERhdGFzZXQoKSB7CiAgICAgICAgICAgIHZhciBkYXRhc2V0c0ZldGNoZWQgPSB0aGlzLl9kYXRhc2V0c0ZldGNoZWQ7CiAgICAgICAgICAgIHZhciBkYXRhc2V0cyA9IHRoaXMuX2RhdGFzZXRzOwogICAgICAgICAgICB2YXIgcnVuID0gdGhpcy5ydW47CiAgICAgICAgICAgIC8vIEJ5IGRlZmF1bHQsIGxvYWQgdGhlIGZpcnN0IGRhdGFzZXQuCiAgICAgICAgICAgIGlmICghcnVuKSB7CiAgICAgICAgICAgICAgICAvLyBCeSBkZWZhdWx0LCBsb2FkIHRoZSBmaXJzdCBkYXRhc2V0LgogICAgICAgICAgICAgICAgdGhpcy5zZXQoJ19zZWxlY3RlZERhdGFzZXQnLCAwKTsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBJZiB0aGUgVVJMIHNwZWNpZmllcyBhIGRhdGFzZXQsIGxvYWQgaXQuCiAgICAgICAgICAgIGNvbnN0IGRhdGFzZXQgPSBkYXRhc2V0cy5maW5kSW5kZXgoKGQpID0+IGQubmFtZSA9PT0gcnVuKTsKICAgICAgICAgICAgaWYgKGRhdGFzZXQgPT09IC0xKSB7CiAgICAgICAgICAgICAgICBpZiAoZGF0YXNldHNGZXRjaGVkKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gVGVsbCB0aGUgdXNlciBpZiB0aGUgZGF0YXNldCBjYW5ub3QgYmUgZm91bmQgdG8gYXZvaWQgbWlzbGVhZGluZwogICAgICAgICAgICAgICAgICAgIC8vIHRoZSB1c2VyLgogICAgICAgICAgICAgICAgICAgIGNvbnN0IGRpYWxvZyA9IHRoaXMuJCQoJyNlcnJvci1kaWFsb2cnKTsKICAgICAgICAgICAgICAgICAgICBkaWFsb2cudGV4dENvbnRlbnQgPSBgTm8gZGF0YXNldCBuYW1lZCAiJHtydW59IiBjb3VsZCBiZSBmb3VuZC5gOwogICAgICAgICAgICAgICAgICAgIGRpYWxvZy5vcGVuKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5zZXQoJ19zZWxlY3RlZERhdGFzZXQnLCBkYXRhc2V0KTsKICAgICAgICB9CiAgICAgICAgX3VwZGF0ZVNlbGVjdGVkRGF0YXNldE5hbWUoKSB7CiAgICAgICAgICAgIHZhciBkYXRhc2V0c0ZldGNoZWQgPSB0aGlzLl9kYXRhc2V0c0ZldGNoZWQ7CiAgICAgICAgICAgIHZhciBkYXRhc2V0cyA9IHRoaXMuX2RhdGFzZXRzOwogICAgICAgICAgICB2YXIgc2VsZWN0ZWREYXRhc2V0ID0gdGhpcy5fc2VsZWN0ZWREYXRhc2V0OwogICAgICAgICAgICBpZiAoIWRhdGFzZXRzRmV0Y2hlZCkKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgLy8gQ2Fubm90IHVwZGF0ZSBgcnVuYCB0byB1cGRhdGUgdGhlIGhhc2ggaW4gY2FzZSBkYXRhc2V0cyBmb3IgZ3JhcGggaXMgZW1wdHkuCiAgICAgICAgICAgIGlmIChkYXRhc2V0cy5sZW5ndGggPD0gc2VsZWN0ZWREYXRhc2V0KQogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB0aGlzLnNldCgncnVuJywgZGF0YXNldHNbc2VsZWN0ZWREY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AgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAocmVxdWVzdElkICE9PSB0aGlzLl9oZWFsdGhQaWxsUmVxdWVzdElkKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gVGhpcyByZXNwb25zZSBpcyBubyBsb25nZXIgcmVsZXZhbnQuCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLy8gU2V0IHRoZSBpbmRleCBmb3Igd2hpY2ggc3RlcCB0byBzaG93IGZvciB0aGUgaGVhbHRoIHBpbGxzLiBCeSBkZWZhdWx0LCBzaG93IHRoZSBsYXN0IHN0ZXAuCiAgICAgICAgICAgICAgICAvLyBBIHByZWNvbmRpdGlvbiB3ZSBhc3N1bWUgKHRoYXQgVGVuc29yYm9hcmQncyByZXNlcnZvaXIgc2FtcGxpbmcgZ3VhcmFudGVlcykgaXMgdGhhdCBhbGwKICAgICAgICAgICAgICAgIC8vIG5vZGUgbmFtZXMgc2hvdWxkIGJlIG1hcHBlZCB0byB0aGUgc2FtZSBudW1iZXIgb2Ygc3RlcHMuCiAgICAgICAgICAgICAgICBmb3IgKHZhciBub2RlTmFtZSBpbiBoZWFsdGhQaWxsc1Jlc3VsdCkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0KCdfaGVhbHRoUGlsbFN0ZXBJbmRleCcsIGhlYWx0aFBpbGxzUmVzdWx0W25vZGVOYW1lXS5sZW5ndGggLSAxKTsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuc2V0KCdfZGVidWdnZXJOdW1lcmljQWxlcnRzJywgYWxlcnRzUmVzdWx0KTsKICAgICAgICAgICAgICAgIHRoaXMuc2V0KCdfbm9kZU5hbWVzVG9IZWFsdGhQaWxscycsIGhlYWx0aFBpbGxzUmVzdWx0KTsKICAgICAgICAgICAgICAgI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GVwcy1tb2RlLWVuYWJsZWQ9Int7YWxsU3RlcHNNb2RlRW5hYmxlZH19IgogICAgICAgICAgICBzcGVjaWZpYy1oZWFsdGgtcGlsbC1zdGVwPSJ7e3NwZWNpZmljSGVhbHRoUGlsbFN0ZXB9fSIKICAgICAgICAgICAgaGVhbHRoLXBpbGwtc3RlcC1pbmRleD0iW1tfaGVhbHRoUGlsbFN0ZXBJbmRleF1dIgogICAgICAgICAgICByZW5kZXItaGllcmFyY2h5PSJ7e19yZW5kZXJIaWVyYXJjaHl9fSIKICAgICAgICAgICAgc2VsZWN0ZWQtbm9kZT0ie3tfc2VsZWN0ZWROb2RlfX0iCiAgICAgICAgICAgIHN0YXRzPSJbW19zdGF0c11dIgogICAgICAgICAgICB0cmFjZS1pbnB1dHM9IltbX3RyYWNlSW5wdXRzXV0iCiAgICAgICAgICA+PC90Zi1ncmFwaC1ib2FyZD4KICAgICAgICA8L2Rpdj4KICAgICAgPC90Zi1kYXNoYm9hcmQtbGF5b3V0PgogICAgPC90ZW1wbGF0ZT4KICAgIDxzdHlsZT4KICAgICAgOmhvc3QgL2RlZXAvIHsKICAgICAgICBmb250LWZhbWlseTogJ1JvYm90bycsIHNhbnMtc2VyaWY7CiAgICAgIH0KCiAgICAgIC5zaWRlYmFyIHsKICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgIGhlaWdodDogMTAwJTsKICAgICAgfQoKICAgICAgLmNlbnRlciB7CiAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlOwogICAgICAgIGhlaWdodDogMTAwJTsKICAgICAgfQoKICAgICAgcGFwZXItZGlhbG9nIHsKICAgICAgICBwYWRkaW5nOiAyMHB4OwogICAgICB9CiAgICA8L3N0eWxlPgogIGA7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7CiAgICAgICAgICAgIHR5cGU6IEFycmF5LAogICAgICAgIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgQXJy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U2NhbGUgPSBkMyQxLnNjYWxlT3JkaW5hbChkMyQxLnNjaGVtZUNhdGVnb3J5MTApOwogICAgICAgICAgICB0aGlzLm1vZGVUcmFuc2l0aW9uRHVyYXRpb24gPSA1MDA7CiAgICAgICAgICAgIHRoaXMuX25hbWUgPSBudWxsOwogICAgICAgICAgICB0aGlzLl9kYXRhID0gbnVsbDsKICAgICAgICB9CiAgICAgICAgcmVhZHkoKSB7CiAgICAgICAgICAgIHN1cGVyLnJlYWR5KCk7CiAgICAgICAgICAgIC8vIFBvbHltZXIncyB3YXkgb2Ygc2NvcGluZyBzdHlsZXMgb24gbm9kZXMgdGhhdCBkMyBjcmVhdGVkCiAgICAgICAgICAgIHRoaXMuc2NvcGVTdWJ0cmVlKHRoaXMuJC5zdmcsIHRydWUpOwogICAgICAgIH0KICAgICAgICBhdHRhY2hlZCgpIHsKICAgICAgICAgICAgdGhpcy5fYXR0YWNoZWQgPSB0cnVlOwogICAgICAgIH0KICAgICAgICBkZXRhY2hlZCgpIHsKICAgICAgICAgICAgdGhpcy5fYXR0YWNoZWQgPSBmYWxzZTsKICAgICAgICB9CiAgICAgICAgc2V0U2VyaWVzRGF0YShuYW1lLCBkYXRhKSB7CiAgICAgICAgICAgIHRoaXMuX25hbWUgPSBuYW1lOwogICAgICAgICAgICB0aGlzLl9kYXRhID0gZGF0YTsKICAgICAgICAgICAgdGhpcy5yZWRyYXcoKTsKICAgICAgICB9CiAgICAgICAgX3JlZHJhd09uQ2hhbmdlKCkgewogICAgICAgICAgICB0aGlzLnJlZHJhdygpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZWRyYXdzIHRoZSBjaGFydC4gVGhpcyBpcyBvbmx5IGNhbGxlZCBpZiB0aGUgY2hhcnQgaXMgYXR0YWNoZWQgdG8gdGhlCiAgICAgICAgICogc2NyZWVuIGFuZCBpZiB0aGUgY2hhcnQgaGFzIGRhdGEuCiAgICAgICAgICovCiAgICAgICAgcmVkcmF3KCkgewogICAgICAgICAgICB0aGlzLl9kcmF3KDApOwogICAgICAgIH0KICAgICAgICBfbW9kZVJlZHJhdygpIHsKICAgICAgICAgICAgdGhpcy5fZHJhdyh0aGlzLm1vZGVUcmFuc2l0aW9uRHVyYXRpb24pOwogICAgICAgIH0KICAgICAgICBfZHJhdyhkdXJhdGlvbikgewogICAgICAgICAgICBpZiAoIXRoaXMuX2F0dGFjaGVkIHx8ICF0aGlzLl9kYXRhKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8KICAgICAgICAgICAgLy8gRGF0YSB2ZXJpZmljYXRpb24KICAgICAgICAgICAgLy8KICAgICAgICAgICAgaWYgKGR1cmF0aW9uID09PSB1bmRlZmluZWQpCiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ3Z6LWhpc3RvZ3JhbS10aW1lc2VyaWVzIF9kcmF3IG5lZWRzIGR1cmF0aW9uJyk7CiAgICAgICAgICAgIGlmICh0aGlzLl9kYXRhLmxlbmd0aCA8PSAwKQogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdOb3QgZW5vdWdoIHN0ZXBzIGluIHRoZSBkYXRhJyk7CiAgICAgICAgICAgIGlmICghdGhpcy5fZGF0YVswXS5oYXNPd25Qcm9wZXJ0eSh0aGlzLmJpbnMpKQogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCJObyBiaW5zIHByb3BlcnR5IG9mICciICsgdGhpcy5iaW5zICsgIicgaW4gZGF0YSIpOwogICAgICAgICAgICBpZiAodGhpcy5fZGF0YVswXVt0aGlzLmJpbnNdLmxlbmd0aCA8PSAwKQogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdNdXN0IGhhdmUgYXQgbGVhc3Qgb25lIGJpbiBpbiBiaW5zIGluIGRhdGEnKTsKICAgICAgICAgICAgaWYgKCF0aGlzLl9kYXRhWzBdW3RoaXMuYmluc11bMF0uaGFzT3duUHJvcGVydHkodGhpcy54KSkKICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigiTm8geCBwcm9wZXJ0eSAnIiArIHRoaXMueCArICInIG9uIGJpbnMgZGF0YSIpOwogICAgICAgICAgICBpZiAoIXRoaXMuX2RhdGFbMF1bdGhpcy5iaW5zXVswXS5oYXNPd25Qcm9wZXJ0eSh0aGlzLmR4KSkKICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigiTm8gZHggcHJvcGVydHkgJyIgKyB0aGlzLmR4ICsgIicgb24gYmlucyBkYXRhIik7CiAgICAgICAgICAgIGlmICghdGhpcy5fZGF0YVswXVt0aGlzLmJpbnNdWzBdLmhhc093blByb3BlcnR5KHRoaXMueSkpCiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoIk5vIHkgcHJvcGVydHkgJyIgKyB0aGlzLnkgKyAiJyBvbiBiaW5zIGRhdGEiKTsKICAgICAgICAgICAgLy8KICAgICAgICAgICAgLy8gSW5pdGlhbGl6YXRpb24KICAgICAgICAgICAgLy8KICAgICAgICAgICAgdmFyIHRpbWVQcm9wID0gdGhpcy50aW1lUHJvcGVydHk7CiAgICAgICAgICAgIHZhciB4UHJvcCA9IHRoaXMueDsKICAgICAgICAgICAgdmFyIGJpbnNQcm9wID0gdGhpcy5iaW5zOwogICAgICAgICAgICB2YXIgZHhQcm9wID0gdGhpcy5keDsKICAgICAgICAgICAgdmFyIHlQcm9wID0gdGhpcy55OwogICAgICAgICAgICB2YXIgZGF0YSA9IHRoaXMuX2RhdGE7CiAgICAgICAgICAgIHZhciBuYW1lID0gdGhpcy5fbmFtZTsKICAgICAgICAgICAgdmFyIG1vZGUgPSB0aGlzLm1vZGU7CiAgICAgICAgICAgIHZhciBjb2xvciA9IGQzJDEuaGNsKHRoaXMuY29sb3JTY2FsZShuYW1lKSk7CiAgICAgICAgICAgIHZhciB0b29sdGlwID0gZDMkMS5zZWxlY3QodGhpcy4kLnRvb2x0aXApOwogICAgICAgICAgICB2YXIgeEFjY2Vzc29yID0gZnVuY3Rpb24gKGQpIHsKICAgICAgICAgICAgICAgIHJldHVybiBkW3hQcm9wXTsKICAgICAgICAgICAgfTsKICAgICAgICAgICAgdmFyIHlBY2Nlc3NvciA9IGZ1bmN0aW9uIChkKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gZFt5UHJvcF07CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIHZhciB4UmlnaHRBY2Nlc3NvciA9IGZ1bmN0aW9uIChkKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gZFt4UHJvcF0gKyBkW2R4UHJvcF07CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIHZhciB0aW1lQWNjZXNzb3IgPSBmdW5jdGlvbiAoZCkgewogICAgICAgICAgICAgICAgcmV0dXJuIGRbdGltZVByb3BdOwogICAgICAgICAgICB9OwogICAgICAgICAgICBpZiAodGltZVByb3AgPT09ICdyZWxhdGl2ZScpIHsKICAgICAgICAgICAgICAgIHRpbWVBY2Nlc3NvciA9IGZ1bmN0aW9uIChkKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGQud2FsbF90aW1lIC0gZGF0YVswXS53YWxsX3RpbWU7CiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciBicmVjdCA9IHRoaXMuJC5zdmcuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCk7CiAgICAgICAgICAgIHZhciBvdXRlcldpZHRoID0gYnJlY3Qud2lkdGgsIG91dGVySGVpZ2h0ID0gYnJlY3QuaGVpZ2h0OwogICAgICAgICAgICB2YXIgc2xpY2VIZWlnaHQsIG1hcmdpbiA9IHsgdG9wOiA1LCByaWdodDogNjAsIGJvdHRvbTogMjAsIGxlZnQ6IDI0IH07CiAgICAgICAgICAgIGlmIChtb2RlID09PSAnb2Zmc2V0JykgewogICAgICAgICAgICAgICAgc2xpY2VIZWlnaHQgPSBvdXRlckhlaWdodCAvIDIuNTsKICAgICAgICAgICAgICAgIG1hcmdpbi50b3AgPSBzbGljZUhlaWdodCArIDU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBzbGljZUhlaWdodCA9IG91dGVySGVpZ2h0IC0gbWFyZ2luLnRvcCAtIG1hcmdpbi5ib3R0b207CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIHdpZHRoID0gb3V0ZXJXaWR0aCAtIG1hcmdpbi5sZWZ0IC0gbWFyZ2luLnJpZ2h0LCBoZWlnaHQgPSBvdXRlckhlaWdodCAtIG1hcmdpbi50b3AgLSBtYXJnaW4uYm90dG9tOwogICAgICAgICAgICB2YXIgbGVmdE1pbiA9IGQzJDEubWluKGRhdGEsIHhBY2Nlc3NvciksIHJpZ2h0TWF4ID0gZDMkMS5tYXgoZGF0YSwgeFJpZ2h0QWNjZXNzb3IpOwogICAgICAgICAgICAvLwogICAgICAgICAgICAvLyBUZXh0IGZvcm1hdHRlcnMKICAgICAgICAgICAgLy8KICAgICAgICAgICAgdmFyIGZvcm1hdCA9IGQzJDEuZm9ybWF0KCcuM24nKTsKICAgICAgICAgICAgdmFyIHlBeGlzRm9ybWF0ID0gZDMkMS5mb3JtYXQoJy4wZicpOwogICAgICAgICAgICBpZiAodGltZVByb3AgPT09ICd3YWxsX3RpbWUnKSB7CiAgICAgICAgICAgICAgICB5QXhpc0Zvcm1hdCA9IGQzJDEudGltZUZvcm1hdCgnJW0vJWQgJVgnKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmICh0aW1lUHJvcCA9PT0gJ3JlbGF0aXZlJykgewogICAgICAgICAgICAgICAgeUF4aXNGb3JtYXQgPSBmdW5jdGlvbiAoZCkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBkMyQxLmZvcm1hdCgnLjFyJykoZCAvIDMuNmU2KSArICdoJzsgLy8gQ29udmVydCB0byBob3Vycy4KICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8KICAgICAgICAgICAgLy8gQ2FsY3VsYXRlIHRoZSBleHRlbnRzCiAgICAgICAgICAgIC8vCiAgICAgICAgICAgIHZhciB4RXh0ZW50cyA9IGRhdGEubWFwKGZ1bmN0aW9uIChkLCBpKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gWwogICAgICAgICAgICAgICAgICAgIGQzJDEubWluKGRbYmluc1Byb3BdLCB4QWNjZXNzb3IpLAogICAgICAgICAgICAgICAgICAgIGQzJDEubWF4KGRbYmluc1Byb3BdLCB4UmlnaHRBY2Nlc3NvciksCiAgICAgICAgICAgICAgICBdOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdmFyIHlFeHRlbnRzID0gZGF0YS5tYXAoZnVuY3Rpb24gKGQpIHsKICAgICAgICAgICAgICAgIHJldHVybiBkMyQxLmV4dGVudChkW2JpbnNQcm9wXSwgeUFjY2Vzc29yKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIC8vCiAgICAgICAgICAgIC8vIFNjYWxlcyBhbmQgYXhpcwogICAgICAgICAgICAvLwogICAgICAgICAgICB2YXIgb3V0bGluZUNhbnZhc1NpemUgPSA1MDA7CiAgICAgICAgICAgIHZhciBleHRlbnQgPSBkMyQxLmV4dGVudChkYXRhLCB0aW1lQWNjZXNzb3IpOwogICAgICAgICAgICB2YXIgeVNjYWxlID0gKHRpbWVQcm9wID09PSAnd2FsbF90aW1lJyA/IGQzJDEuc2NhbGVUaW1lKCkgOiBkMyQxLnNjYWxlTGluZWFyKCkpCiAgICAgICAgICAgICAgICAuZG9tYWluKGV4dGVudCkKICAgICAgICAgICAgICAgIC5yYW5nZShbMCwgbW9kZSA9PT0gJ29mZnNldCcgPyBoZWlnaHQgOiAwXSk7CiAgICAgICAgICAgIHZhciB5U2xpY2VTY2FsZSA9IGQzJDEKICAgICAgICAgICAgICAgIC5zY2FsZUxpbmVhcigpCiAgICAgICAgICAgICAgICAuZG9tYWluKFsKICAgICAgICAgICAgICAgIDAsCiAgICAgICAgICAgICAgICBkMyQxLm1heChkYXRhLCBmdW5jdGlvbiAoZCwgaSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiB5RXh0ZW50c1tpXVsxXTsKICAgICAgICAgICAgICAgIH0pLAogICAgICAgICAgICBdKQogICAgICAgICAgICAgICAgLnJhbmdlKFtzbGljZUhlaWdodCwgMF0pOwogICAgICAgICAgICB2YXIgeUxpbmVTY2FsZSA9IGQzJDEKICAgICAgICAgICAgICAgIC5zY2FsZUxpbmVhcigpCiAgICAgICAgICAgICAgICAuZG9tYWluKHlTbGljZVNjYWxlLmRvbWFpbigpKQogICAgICAgICAgICAgICAgLnJhbmdlKFtvdXRsaW5lQ2FudmFzU2l6ZSwgMF0pOwogICAgICAgICAgICB2YXIgeFNjYWxlID0gZDMkMQogICAgICAgICAgICAgICAgLnNjYWxlTGluZWFyKCkKICAgICAgICAgICAgICAgIC5kb21haW4oWwogICAgICAgICAgICAgICAgZDMkMS5taW4oZGF0YSwgZnVuY3Rpb24gKGQsIGkpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4geEV4dGVudHNbaV1bMF07CiAgICAgICAgICAgICAgICB9KSwKICAgICAgICAgICAgICAgIGQzJDEubWF4KGRhdGEsIGZ1bmN0aW9uIChkLCBpKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHhFeHRlbnRzW2ldWzFdOwogICAgICAgICAgICAgICAgfSksCiAgICAgICAgICAgIF0pCiAgICAgICAgICAgICAgICAubmljZSgpCiAgICAgICAgICAgICAgICAucmFuZ2UoWzAsIHdpZHRoXSk7CiAgICAgICAgICAgIHZhciB4TGluZVNjYWxlID0gZDMkMQogICAgICAgICAgICAgICAgLnNjYWxlTGluZWFyKCkKICAgICAgICAgICAgICAgIC5kb21haW4oeFNjYWxlLmRvbWFpbigpKQogICAgICAgICAgICAgICAgLnJhbmdlKFswLCBvdXRsaW5lQ2FudmFzU2l6ZV0pOwogICAgICAgICAgICB2YXIgb3V0bGluZUNvbG9yID0gZDMkMQogICAgICAgICAgICAgICAgLnNjYWxlTGluZWFyKCkKICAgICAgICAgICAgICAgIC5kb21haW4oZDMkMS5leHRlbnQoZGF0YSwgdGltZUFjY2Vzc29yKSkKICAgICAgICAgICAgICAgIC5yYW5nZShbY29sb3IuZGFya2VyKCksIGNvbG9yLmJyaWdodGVyKCldKQogICAgICAgICAgICAgICAgLmludGVycG9sYXRlKGQzJDEuaW50ZXJwb2xhdGVIY2wpOwogICAgICAgICAgICB2YXIgeEF4aXMgPSBkMyQxLmF4aXNCb3R0b20oeFNjYWxlKS50aWNrcyhNYXRoLm1heCgyLCB3aWR0aCAvIDIwKSk7CiAgICAgICAgICAgIHZhciB5QXhpcyA9IGQzJDEKICAgICAgICAgICAgICAgIC5heGlzUmlnaHQoeVNjYWxlKQogICAgICAgICAgICAgICAgLnRpY2tzKE1hdGgubWF4KDIsIGhlaWdodCAvIDE1KSkKICAgICAgICAgICAgICAgIC50aWNrRm9ybWF0KHlBeGlzRm9ybWF0KTsKICAgICAgICAgICAgdmFyIHlTbGljZUF4aXMgPSBkMyQxCiAgICAgICAgICAgICAgICAuYXhpc1JpZ2h0KHlTbGljZVNjYWxlKQogICAgICAgICAgICAgICAgLnRpY2tzKE1hdGgubWF4KDIsIGhlaWdodCAvIDE1KSkKICAgICAgICAgICAgICAgIC50aWNrU2l6ZSh3aWR0aCArIDUpCiAgICAgICAgICAgICAgICAudGlja0Zvcm1hdChmb3JtYXQpOwogICAgICAgICAgICB2YXIgeEJpbkNlbnRyb2lkID0gZnVuY3Rpb24gKGQpIHsKICAgICAgICAgICAgICAgIHJldHVybiBkW3hQcm9wXSArIGRbZHhQcm9wXSAvIDI7CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIHZhciBsaW5lUGF0aCA9IGQzJDEKICAgICAgICAgICAgICAgIC5saW5lKCkKICAgICAgICAgICAgICAgIC54KGZ1bmN0aW9uIChkKSB7CiAgICAgICAgICAgICAgICByZXR1cm4geExpbmVTY2FsZSh4QmluQ2VudHJvaWQoZCkpOwogICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgLnkoZnVuY3Rpb24gKGQpIHsKICAgICAgICAgICAgICAgIHJldHVybiB5TGluZVNjYWxlKGRbeVByb3BdKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHZhciBwYXRoID0gZnVuY3Rpb24gKGQpIHsKICAgICAgICAgICAgICAgIC8vIERyYXcgYSBsaW5lIGZyb20gMCB0byB0aGUgZmlyc3QgcG9pbnQgYW5kIGZyb20gdGhlIGxhc3QgcG9pbnQgdG8gMC4KICAgICAgICAgICAgICAgIHJldHVybiAoJ00nICsKICAgICAgICAgICAgICAgICAgICB4TGluZVNjYWxlKHhCaW5DZW50cm9pZChkWzBdKSkgKwogICAgICAgICAgICAgICAgICAgICcsJyArCiAgICAgICAgICAgICAgICAgICAgeUxpbmVTY2FsZSgwKSArCiAgICAgICAgICAgICAgICAgICAgJ0wnICsKICAgICAgICAgICAgICAgICAgICBsaW5lUGF0aChkKS5zbGljZSgxKSArCiAgICAgICAgICAgICAgICAgICAgJ0wnICsKICAgICAgICAgICAgICAgICAgICB4TGluZVNjYWxlKHhCaW5DZW50cm9pZChkW2QubGVuZ3RoIC0gMV0pKSArCiAgICAgICAgICAgICAgICAgICAgJywnICsKICAgICAgICAgICAgICAgICAgICB5TGluZVNjYWxlKDApKTsKICAgICAgICAgICAgfTsKICAgICAgICAgICAgLy8KICAgICAgICAgICAgLy8gUmVuZGVyCiAgICAgICAgICAgIC8vCiAgICAgICAgICAgIHZhciBzdmdOb2RlID0gdGhpcy4kLnN2ZzsKICAgICAgICAgICAgdmFyIHN2ZyA9IGQzJDEuc2VsZWN0KHN2Z05vZGUpOwogICAgICAgICAgICB2YXIgc3ZnVHJhbnNpdGlvbiA9IHN2Zy50cmFuc2l0aW9uKCkuZHVyYXRpb24oZHVyYXRpb24pOwogICAgICAgICAgICB2YXIgZyA9IHN2ZwogICAgICAgICAgICAgICAgLnNlbGVjdCgnZycpCiAgICAgICAgICAgICAgICAuY2xhc3NlZCgnc21hbGwnLCBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gd2lkdGggPiAwICYmIHdpZHRoIDw9IDE1MDsKICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgIC5jbGFzc2VkKCdtZWRpdW0nLCBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gd2lkdGggPiAxNTAgJiYgd2lkdGggPD0gMzAwOwogICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgLmNsYXNzZWQoJ2xhcmdlJywgZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHdpZHRoID4gMzAwOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdmFyIGdUcmFuc2l0aW9uID0gc3ZnVHJhbnNpdGlvbgogICAgICAgICAgICAgICAgLnNlbGVjdCgnZycpCiAgICAgICAgICAgICAgICAuYXR0cigndHJhbnNmb3JtJywgJ3RyYW5zbGF0ZSgnICsgbWFyZ2luLmxlZnQgKyAnLCcgKyBtYXJnaW4udG9wICsgJyknKTsKICAgICAgICAgICAgdmFyIGJpc2VjdCA9IGQzJDEuYmlzZWN0b3IoeFJpZ2h0QWNjZXNzb3IpLmxlZnQ7CiAgICAgICAgICAgIHZhciBzdGFnZSA9IGcKICAgICAgICAgICAgICAgIC5zZWxlY3QoJy5zdGFnZScpCiAgICAgICAgICAgICAgICAub24oJ21vdXNlb3ZlcicsIGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgIGhvdmVyVXBkYXRlLnN0eWxlKCdvcGFjaXR5JywgMSk7CiAgICAgICAgICAgICAgICB4QXhpc0hvdmVyVXBkYXRlLnN0eWxlKCdvcGFjaXR5JywgMSk7CiAgICAgICAgICAgICAgICB5QXhpc0hvdmVyVXBkYXRlLnN0eWxlKCdvcGFjaXR5JywgMSk7CiAgICAgICAgICAgICAgICB5U2xpY2VBeGlzSG92ZXJVcGRhdGUuc3R5bGUoJ29wYWNpdHknLCAxKTsKICAgICAgICAgICAgICAgIHRvb2x0aXAuc3R5bGUoJ29wYWNpdHknLCAxKTsKICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgIC5vbignbW91c2VvdXQnLCBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICBob3ZlclVwZGF0ZS5zdHlsZSgnb3BhY2l0eScsIDApOwogICAgICAgICAgICAgICAgeEF4aXNIb3ZlclVwZGF0ZS5zdHlsZSgnb3BhY2l0eScsIDApOwogICAgICAgICAgICAgICAgeUF4aXNIb3ZlclVwZGF0ZS5zdHlsZSgnb3BhY2l0eScsIDApOwogICAgICAgICAgICAgICAgeVNsaWNlQXhpc0hvdmVyVXBkYXRlLnN0eWxlKCdvcGFjaXR5JywgMCk7CiAgICAgICAgICAgICAgICBob3ZlclVwZGF0ZS5jbGFzc2VkKCdob3Zlci1jbG9zZXN0JywgZmFsc2UpOwogICAgICAgICAgICAgICAgb3V0bGluZVVwZGF0ZS5jbGFzc2VkKCdvdXRsaW5lLWhvdmVyJywgZmFsc2UpOwogICAgICAgICAgICAgICAgdG9vbHRpcC5zdHlsZSgnb3BhY2l0eScsIDApOwogICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgLm9uKCdtb3VzZW1vdmUnLCBvbk1vdXNlTW92ZSk7CiAgICAgICAgICAgIHZhciBiYWNrZ3JvdW5kID0gc3RhZ2UKICAgICAgICAgICAgICAgIC5zZWxlY3QoJy5iYWNrZ3JvdW5kJykKICAgICAgICAgICAgICAgIC5hdHRyKCd0cmFuc2Zvcm0nLCAndHJhbnNsYXRlKCcgKyAtbWFyZ2luLmxlZnQgKyAnLCcgKyAtbWFyZ2luLnRvcCArICcpJykKICAgICAgICAgICAgICAgIC5hdHRyKCd3aWR0aCcsIG91dGVyV2lkdGgpCiAgICAgICAgICAgICAgICAuYXR0cignaGVpZ2h0Jywgb3V0ZXJIZWlnaHQpOwogICAgICAgICAgICB2YXIgaGlzdG9ncmFtID0gc3RhZ2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0dXJuIG1vZGUgPT09ICdvZmZzZXQnID8gMC4xIDogMDsKICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgIC5hdHRyKCd5MScsIHNsaWNlSGVpZ2h0KQogICAgICAgICAgICAgICAgLmF0dHIoJ3kyJywgc2xpY2VIZWlnaHQpCiAgICAgICAgICAgICAgICAuYXR0cigneDInLCB3aWR0aCk7CiAgICAgICAgICAgIHZhciBvdXRsaW5lRW50ZXIgPSBoaXN0b2dyYW1FbnRlci5hcHBlbmQoJ3BhdGgnKS5hdHRyKCdjbGFzcycsICdvdXRsaW5lJyksIG91dGxpbmVVcGRhdGUgPSBoaXN0b2dyYW1VcGRhdGUKICAgICAgICAgICAgICAgIC5zZWxlY3QoJy5vdXRsaW5lJykKICAgICAgICAgICAgICAgIC5hdHRyKCd2ZWN0b3ItZWZmZWN0JywgJ25vbi1zY2FsaW5nLXN0cm9rZScpCiAgICAgICAgICAgICAgICAuYXR0cignZCcsIGZ1bmN0aW9uIChkKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gcGF0aChkW2JpbnNQcm9wXSk7CiAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAuc3R5bGUoJ3N0cm9rZS13aWR0aCcsIDEpLCBvdXRsaW5lVHJhbnNpdGlvbiA9IGhpc3RvZ3JhbVRyYW5zaXRpb24KICAgICAgICAgICAgICAgIC5zZWxlY3QoJy5vdXRsaW5lJykKICAgICAgICAgICAgICAgIC5hdHRyKCd0cmFuc2Zvcm0nLCAnc2NhbGUoJyArCiAgICAgICAgICAgICAgICB3aWR0aCAvIG91dGxpbmVDYW52YXNTaXplICsKICAgICAgICAgICAgICAgICcsICcgKwogICAgICAgICAgICAgICAgc2xpY2VIZWlnaHQgLyBvdXRsaW5lQ2FudmFzU2l6ZSArCiAgICAgICAgICAgICAgICAnKScpCiAgICAgICAgICAgICAgICAuc3R5bGUoJ3N0cm9rZScsIGZ1bmN0aW9uIChkKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gb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wcGVuZCgnZycpLmF0dHIoJ2NsYXNzJywgJ2xhYmVsJyksIHhBeGlzSG92ZXJVcGRhdGUgPSB4QXhpc0hvdmVyLm1lcmdlKHhBeGlzSG92ZXJFbnRlcik7CiAgICAgICAgICAgIHhBeGlzSG92ZXJFbnRlcgogICAgICAgICAgICAgICAgLmFwcGVuZCgncmVjdCcpCiAgICAgICAgICAgICAgICAuYXR0cigneCcsIC0yMCkKICAgICAgICAgICAgICAgIC5hdHRyKCd5JywgNikKICAgICAgICAgICAgICAgIC5hdHRyKCd3aWR0aCcsIDQwKQogICAgICAgICAgICAgICAgLmF0dHIoJ2hlaWdodCcsIDE0KTsKICAgICAgICAgICAgeEF4aXNIb3ZlckVudGVyCiAgICAgICAgICAgICAgICAuYXBwZW5kKCdsaW5lJykKICAgICAgICAgICAgICAgIC5hdHRyKCd4MScsIDApCiAgICAgICAgICAgICAgICAuYXR0cigneDInLCAwKQogICAgICAgICAgICAgICAgLmF0dHIoJ3kxJywgMCkKICAgICAgICAgICAgICAgIC5hdHRyKCd5MicsIDYpOwogICAgICAgICAgICB4QXhpc0hvdmVyRW50ZXIuYXBwZW5kKCd0ZXh0JykuYXR0cignZHknLCAxOCk7CiAgICAgICAgICAgIHZhciB5QXhpc0hvdmVyID0gZy5zZWxlY3QoJy55LWF4aXMtaG92ZXInKS5zZWxlY3RBbGwoJy5sYWJlbCcpLmRhdGEoWyd5J10pLCB5QXhpc0hvdmVyRW50ZXIgPSB5QXhpc0hvdmVyLmVudGVyKCkuYXBwZW5kKCdnJykuYXR0cignY2xhc3MnLCAnbGFiZWwnKSwgeUF4aXNIb3ZlclVwZGF0ZSA9IHlBeGlzSG92ZXIubWVyZ2UoeUF4aXNIb3ZlckVudGVyKTsKICAgICAgICAgICAgeUF4aXNIb3ZlckVudGVyCiAgICAgICAgICAgICAgICAuYXBwZW5kKCdyZWN0JykKICAgICAgICAgICAgICAgIC5hdHRyKCd4JywgOCkKICAgICAgICAgICAgICAgIC5hdHRyKCd5JywgLTYpCiAgICAgICAgICAgICAgICAuYXR0cignd2lkdGgnLCA0MCkKICAgICAgICAgICAgICAgIC5hdHRyKCdoZWlnaHQnLCAxNCk7CiAgICAgICAgICAgIHlBeGlzSG92ZXJFbnRlcgogICAgICAgICAgICAgICAgLmFwcGVuZCgnbGluZScpCiAgICAgICAgICAgICAgICAuYXR0cigneDEnLCAwKQogICAgICAgICAgICAgICAgLmF0dHIoJ3gyJywgNikKICAgICAgICAgICAgICAgIC5hdHRyKCd5MScsIDApCiAgICAgICAgICAgICAgICAuYXR0cigneTInLCAwKTsKICAgICAgICAgICAgeUF4aXNIb3ZlckVudGVyLmFwcGVuZCgndGV4dCcpLmF0dHIoJ2R4JywgOCkuYXR0cignZHknLCA0KTsKICAgICAgICAgICAgdmFyIHlTbGljZUF4aXNIb3ZlciA9IGcKICAgICAgICAgICAgICAgIC5zZWxlY3QoJy55LXNsaWNlLWF4aXMtaG92ZXInKQogICAgICAgICAgICAgICAgLnNlbGVjdEFsbCgnLmxhYmVsJykKICAgICAgICAgICAgICAgIC5kYXRhKFsneSddKSwgeVNsaWNlQXhpc0hvdmVyRW50ZXIgPSB5U2xpY2VBeGlzSG92ZXIKICAgICAgICAgICAgICAgIC5lbnRlcigpCiAgICAgICAgICAgICAgICAuYXBwZW5kKCdnJykKICAgICAgICAgICAgICAgIC5hdHRyKCdjbGFzcycsICdsYWJlbCcpLCB5U2xpY2VBeGlzSG92ZXJVcGRhdGUgPSB5U2xpY2VBeGlzSG92ZXIubWVyZ2UoeVNsaWNlQXhpc0hvdmVyRW50ZXIpOwogICAgICAgICAgICB5U2xpY2VBeGlzSG92ZXJFbnRlcgogICAgICAgICAgICAgICAgLmFwcGVuZCgncmVjdCcpCiAgICAgICAgICAgICAgICAuYXR0cigneCcsIDgpCiAgICAgICAgICAgICAgICAuYXR0cigneScsIC02KQogICAgICAgICAgICAgICAgLmF0dHIoJ3dpZHRoJywgNDApCiAgICAgICAgICAgICAgICAuYXR0cignaGVpZ2h0JywgMTQpOwogICAgICAgICAgICB5U2xpY2VBeGlzSG92ZXJFbnRlcgogICAgICAgICAgICAgICAgLmFwcGVuZCgnbGluZScpCiAgICAgICAgICAgICAgICAuYXR0cigneDEnLCAwKQogICAgICAgICAgICAgICAgLmF0dHIoJ3gyJywgNikKICAgICAgICAgICAgICAgIC5hdHRyKCd5MScsIDApCiAgICAgICAgICAgICAgICAuYXR0cigneTInLCAwKTsKICAgICAgICAgICAgeVNsaWNlQXhpc0hvdmVyRW50ZXIuYXBwZW5kKCd0ZXh0JykuYXR0cignZHgnLCA4KS5hdHRyKCdkeScsIDQpOwogICAgICAgICAgICBnVHJhbnNpdGlvbgogICAgICAgICAgICAgICAgLnNlbGVjdCgnLnkuYXhpcy5zbGljZScpCiAgICAgICAgICAgICAgICAuc3R5bGUoJ29wYWNpdHknLCBtb2RlID09PSAnb2Zmc2V0JyA/IDAgOiAxKQogICAgICAgICAgICAgICAgLmF0dHIoJ3RyYW5zZm9ybScsICd0cmFuc2xhdGUoMCwgJyArIChtb2RlID09PSAnb2Zmc2V0JyA/IC1zbGljZUhlaWdodCA6IDApICsgJyknKQogICAgICAgICAgICAgICAgLmNhbGwoeVNsaWNlQXhpcyk7CiAgICAgICAgICAgIGdUcmFuc2l0aW9uCiAgICAgICAgICAgICAgICAuc2VsZWN0KCcueC5heGlzJykKICAgICAgICAgICAgICAgIC5hdHRyKCd0cmFuc2Zvcm0nLCAndHJhbnNsYXRlKDAsICcgKyBoZWlnaHQgKyAnKScpCiAgICAgICAgICAgICAgICAuY2FsbCh4QXhpcyk7CiAgICAgICAgICAgIGdUcmFuc2l0aW9uCiAgICAgICAgICAgICAgICAuc2VsZWN0KCcueS5heGlzJykKICAgICAgICAgICAgICAgIC5zdHlsZSgnb3BhY2l0eScsIG1vZGUgPT09ICdvZmZzZXQnID8gMSA6IDApCiAgICAgICAgICAgICAgICAuYXR0cigndHJhbnNmb3JtJywgJ3RyYW5zbGF0ZSgnICsgd2lkdGggKyAnLCAnICsgKG1vZGUgPT09ICdvZmZzZXQnID8gMCA6IGhlaWdodCkgKyAnKScpCiAgICAgICAgICAgICAgICAuY2FsbCh5QXhpcyk7CiAgICAgICAgICAgIGdUcmFuc2l0aW9uLnNlbGVjdEFsbCgnLnRpY2sgdGV4dCcpLmF0dHIoJ2ZpbGwnLCAnI2FhYScpOwogICAgICAgICAgICBnVHJhbnNpdGlvbi5zZWxlY3RBbGwoJy5heGlzIHBhdGguZG9tYWluJykuYXR0cignc3Ryb2tlJywgJ25vbmUnKTsKICAgICAgICAgICAgZnVuY3Rpb24gb25Nb3VzZU1vdmUoKSB7CiAgICAgICAgICAgICAgICB2YXIgbSA9IGQzJDEubW91c2UodGhpcyksIHYgPSB4U2NhbGUuaW52ZXJ0KG1bMF0pLCB0ID0geVNjYWxlLmludmVydChtWzFdKTsKICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGhvdmVyWEluZGV4KGQpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gTWF0aC5taW4oZFtiaW5zUHJvcF0ubGVuZ3RoIC0gMSwgYmlzZWN0KGRbYmluc1Byb3BdLCB2KSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB2YXIgY2xvc2VzdFNsaWNlRGF0YTsKICAgICAgICAgICAgICAgIHZhciBjbG9zZXN0U2xpY2VEaXN0YW5jZSA9IEluZmluaXR5OwogICAgICAgICAgICAgICAgdmFyIGxhc3RTbGljZURhdGE7CiAgICAgICAgICAgICAgICBob3ZlclVwZGF0ZS5hdHRyKCd0cmFuc2Zvcm0nLCBmdW5jdGlvbiAoZCwgaSkgewogICAgICAgICAgICAgICAgICAgIHZhciBpbmRleCA9IGhvdmVyWEluZGV4KGQpOwogICAgICAgICAgICAgICAgICAgIGxhc3RTbGljZURhdGEgPSBkOwogICAgICAgICAgICAgICAgICAgIHZhciB4ID0geFNjYWxlKGRbYmluc1Byb3BdW2luZGV4XVt4UHJvcF0gKyBkW2JpbnNQcm9wXVtpbmRleF1bZHhQcm9wXSAvIDIpOwogICAgICAgICAgICAgICAgICAgIHZhciB5ID0geVNsaWNlU2NhbGUoZFtiaW5zUHJvcF1baW5kZXhdW3lQcm9wXSk7CiAgICAgICAgICAgICAgICAgICAgdmFyIGdsb2JhbFkgPSBtb2RlID09PSAnb2Zmc2V0JyA/IHlTY2FsZSh0aW1lQWNjZXNzb3IoZCkpIC0gKHNsaWNlSGVpZ2h0IC0geSkgOiB5OwogICAgICAgICAgICAgICAgICAgIHZhciBkaXN0ID0gTWF0aC5hYnMobVsxXSAtIGdsb2JhbFkpOwogICAgICAgICAgICAgICAgICAgIGlmIChkaXN0IDwgY2xvc2VzdFNsaWNlRGlzdGFuY2UpIHsKICAgICAgICAgICAgICAgICAgICAgICAgY2xvc2VzdFNsaWNlRGlzdGFuY2UgPSBkaXN0OwogICAgICAgICAgICAgICAgICAgICAgICBjbG9zZXN0U2xpY2VEYXRhID0gZDsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0cmFuc2xhdGUoJyArIHggKyAnLCcgKyB5ICsgJyknOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBob3ZlclVwZGF0ZS5zZWxlY3QoJ3RleHQnKS50ZXh0KGZ1bmN0aW9uIChkKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIGluZGV4ID0gaG92ZXJYSW5kZXgoZCk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGRbYmluc1Byb3BdW2luZGV4XVt5UHJvcF07CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIGhvdmVyVXBkYXRlLmNsYXNzZWQoJ2hvdmVyLWNsb3Nlc3QnLCBmdW5jdGlvbiAoZCkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBkID09PSBjbG9zZXN0U2xpY2VEYXRhOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBvdXRsaW5lVXBkYXRlLmNsYXNzZWQoJ291dGxpbmUtaG92ZXInLCBmdW5jdGlvbiAoZCkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBkID09PSBjbG9zZXN0U2xpY2VEYXRhOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB2YXIgaW5kZXggPSBob3ZlclhJbmRleChsYXN0U2xpY2VEYXRhKTsKICAgICAgICAgICAgICAgIHhBeGlzSG92ZXJVcGRhdGUKICAgICAgICAgICAgICAgICAgICAuYXR0cigndHJhbnNmb3JtJywgZnVuY3Rpb24gKGQpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gKCd0cmFuc2xhdGUoJyArCiAgICAgICAgICAgICAgICAgICAgICAgIHhTY2FsZShsYXN0U2xpY2VEYXRhW2JpbnNQcm9wXVtpbmRleF1beFByb3BdICsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RTbGljZURhdGFbYmluc1Byb3BdW2luZGV4XVtkeFByb3BdIC8gMikgKwogICAgICAgICAgICAgICAgICAgICAgICAnLCAnICsKICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0ICsKICAgICAgICAgICAgICAgICAgICAgICAgJyknKTsKICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgLnNlbGVjdCgndGV4dCcpCiAgICAgICAgICAgICAgICAgICAgLnRleHQoZnVuY3Rpb24gKGQpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gZm9ybWF0KGxhc3RTbGljZURhdGFbYmluc1Byb3BdW2luZGV4XVt4UHJvcF0gKwogICAgICAgICAgICAgICAgICAgICAgICBsYXN0U2xpY2VEYXRhW2JpbnNQcm9wXVtpbmRleF1bZHhQcm9wXSAvIDIpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB2YXIgZnkgPSB5QXhpcy50aWNrRm9ybWF0KCk7CiAgICAgICAgICAgICAgICB5QXhpc0hvdmVyVXBkYXRlCiAgICAgICAgICAgICAgICAgICAgLmF0dHIoJ3RyYW5zZm9ybScsIGZ1bmN0aW9uIChkKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICgndHJhbnNsYXRlKCcgKwogICAgICAgICAgICAgICAgICAgICAgICB3aWR0aCArCiAgICAgICAgICAgICAgICAgICAgICAgICcsICcgKwogICAgICAgICAgICAgICAgICAgICAgICAobW9kZSA9PT0gJ29mZnNldCcgPyB5U2NhbGUodGltZUFjY2Vzc29yKGNsb3Nlc3RTbGljZURhdGEpKSA6IDApICsKICAgICAgICAgICAgICAgICAgICAgICAgJyknKTsKICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgLnN0eWxlKCdkaXNwbGF5JywgbW9kZSA9PT0gJ29mZnNldCcgPyAnJyA6ICdub25lJykKICAgICAgICAgICAgICAgICAgICAuc2VsZWN0KCd0ZXh0JykKICAgICAgICAgICAgICAgICAgICAudGV4dChmdW5jdGlvbiAoZCkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBmeSh0aW1lQWNjZXNzb3IoY2xvc2VzdFNsaWNlRGF0YSkpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB2YXIgZnN5ID0geVNsaWNlQXhpcy50aWNrRm9ybWF0KCk7CiAgICAgICAgICAgICAgICB5U2xpY2VBeGlzSG92ZXJVcGRhdGUKICAgICAgICAgICAgICAgICAgICAuYXR0cigndHJhbnNmb3JtJywgZnVuY3Rpb24gKGQpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gKCd0cmFuc2xhdGUoJyArCiAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoICsKICAgICAgICAgICAgICAgICAgICAgICAgJywgJyArCiAgICAgICAgICAgICAgICAgICAgICAgIChtb2RlID09PSAnb2Zmc2V0JwogICAgICAgICAgICAgICAgICAgICAgICAgICAgPyAwCiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IHlTbGljZVNjYWxlKGNsb3Nlc3RTbGljZURhdGFbYmluc1Byb3BdW2luZGV4XVt5UHJvcF0pKSArCiAgICAgICAgICAgICAgICAgICAgICAgICcpJyk7CiAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgICAgIC5zdHlsZSgnZGlzcGxheScsIG1vZGUgPT09ICdvZmZzZXQnID8gJ25vbmUnIDogJycpCiAgICAgICAgICAgICAgICAgICAgLnNlbGVjdCgndGV4dCcpCiAgICAgICAgICAgICAgICAgICAgLnRleHQoZnVuY3Rpb24gKGQpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gZnN5KGNsb3Nlc3RTbGljZURhdGFbYmluc1Byb3BdW2luZGV4XVt5UHJvcF0pOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB2YXIgc3ZnTW91c2UgPSBkMyQxLm1vdXNlKHN2Z05vZGUpOwogICAgICAgICAgICAgICAgdG9vbHRpcAogICAgICAgICAgICAgICAgICAgIC5zdHlsZSgndHJhbnNmb3JtJywgJ3RyYW5zbGF0ZSgnICsgKHN2Z01vdXNlWzBdICsgMTUpICsgJ3B4LCcgKyAoc3ZnTW91c2VbMV0gLSAxNSkgKyAncHgpJykKICAgICAgICAgICAgICAgICAgICAuc2VsZWN0KCdzcGFuJykKICAgICAgICAgICAgICAgICAgICAudGV4dChtb2RlID09PSAnb2Zmc2V0JwogICAgICAgICAgICAgICAgICAgID8gZnN5KGNsb3Nlc3RTbGljZURhdGFbYmluc1Byb3BdW2luZGV4XVt5UHJvcF0pCiAgICAgICAgICAgICAgICAgICAgOiAodGltZVByb3AgPT09ICdzdGVwJyA/ICdzdGVwICcgOiAnJykgKwogICAgICAgICAgICAgICAgICAgICAgICBmeSh0aW1lQWNjZXNzb3IoY2xvc2VzdFNsaWNlRGF0YSkpKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH07CiAgICBfVnpIaXN0b2dyYW1UaW1lc2VyaWVzLnRlbXBsYXRlID0gaHRtbCBgCiAgICA8ZGl2IGlkPSJ0b29sdGlwIj48c3Bhbj48L3NwYW4+PC9kaXY+CiAgICA8c3ZnIGlkPSJzdmciPgogICAgICA8Zz4KICAgICAgICA8ZyBjbGFzcz0iYXhpcyB4Ij48L2c+CiAgICAgICAgPGcgY2xhc3M9ImF4aXMgeSI+PC9nPgogICAgICAgIDxnIGNsYXNzPSJheGlzIHkgc2xpY2UiPjwvZz4KICAgICAgICA8ZyBjbGFzcz0ic3RhZ2UiPgogICAgICAgICAgPHJlY3QgY2xhc3M9ImJhY2tncm91bmQiPjwvcmVjdD4KICAgICAgICA8L2c+CiAgICAgICAgPGcgY2xhc3M9IngtYXhpcy1ob3ZlciI+PC9nPgogICAgICAgIDxnIGNsYXNzPSJ5LWF4aXMtaG92ZXIiPjwvZz4KICAgICAgICA8ZyBjbGFzcz0ieS1zbGljZS1heGlzLWhvdmVyIj48L2c+CiAgICAgIDwvZz4KICAgIDwvc3ZnPgoKICAgIDxzdHlsZT4KICAgICAgOmhvc3QgewogICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjsKICAgICAgICBmbGV4LWdyb3c6IDE7CiAgICAgICAgZmxleC1zaHJpbms6IDE7CiAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlOwogICAgICB9CgogICAgICBzdmcgewogICAgICAgIGZvbnQtZmFtaWx5OiByb2JvdG8sIHNhbnMtc2VyaWY7CiAgICAgICAgb3ZlcmZsb3c6IHZpc2libGU7CiAgICAgICAgZGlzcGxheTogYmxvY2s7CiAgICAgICAgd2lkdGg6IDEwMCU7CiAgICAgICAgZmxleC1ncm93OiAxOwogICAgICAgIGZsZXgtc2hyaW5rOiAxOwogICAgICB9CgogICAgICAjdG9vbHRpcCB7CiAgICAgICAgcG9zaXRpb246IGFic29sdXRlOwogICAgICAgIGRpc3BsYXk6IGJsb2NrOwogICAgICAgIG9wYWNpdHk6IDA7CiAgICAgICAgZm9udC13ZWlnaHQ6IGJvbGQ7CiAgICAgICAgZm9udC1zaXplOiAxMXB4OwogICAgICB9CgogICAgICAuYmFja2dyb3VuZCB7CiAgICAgICAgZmlsbC1vcGFjaXR5OiAwOwogICAgICAgIGZpbGw6IHJlZDsKICAgICAgfQoKICAgICAgLmhpc3RvZ3JhbSB7CiAgICAgICAgcG9pbnRlci1ldmVudHM6IG5vbmU7CiAgICAgIH0KCiAgICAgIC5ob3ZlciB7CiAgICAgICAgZm9udC1zaXplOiA5cHg7CiAgICAgICAgZG9taW5hbnQtYmFzZWxpbmU6IG1pZGRsZTsKICAgICAgICBvcGFjaXR5OiAwOwogICAgICB9CgogICAgICAuaG92ZXIgY2lyY2xlIHsKICAgICAgICBzdHJva2U6IHdoaXRlOwogICAgICAgIHN0cm9rZS1vcGFjaXR5OiAwLjU7CiAgICAgICAgc3Ryb2tlLXdpZHRoOiAxcHg7CiAgICAgIH0KCiAgICAgIC5ob3ZlciB0ZXh0IHsKICAgICAgICBmaWxsOiBibGFjazsKICAgICAgICBvcGFjaXR5OiAwOwogICAgICB9CgogICAgICAuaG92ZXIuaG92ZXItY2xvc2VzdCBjaXJjbGUgewogICAgICAgIGZpbGw6IGJsYWNrICFpbXBvcnRhbnQ7CiAgICAgIH0KCiAgICAgIC5ob3Zlci5ob3Zlci1jbG9zZXN0IHRleHQgewogICAgICAgIG9wYWNpdHk6IDE7CiAgICAgIH0KCiAgICAgIC5iYXNlbGluZSB7CiAgICAgICAgc3Ryb2tlOiBibGFjazsKICAgICAgICBzdHJva2Utb3BhY2l0eTogMC4xOwogICAgICB9CgogICAgICAub3V0bGluZSB7CiAgICAgICAgZmlsbDogbm9uZTsKICAgICAgICBzdHJva2U6IHdoaXRlOwogICAgICAgIHN0cm9rZS1vcGFjaXR5OiAwLjU7CiAgICAgIH0KCiAgICAgIC5vdXRsaW5lLm91dGxpbmUtaG92ZXIgewogICAgICAgIHN0cm9rZTogYmxhY2sgIWltcG9ydGFudDsKICAgICAgICBzdHJva2Utb3BhY2l0eTogMTsKICAgICAgfQoKICAgICAgLngtYXhpcy1ob3ZlciwKICAgICAgLnktYXhpcy1ob3ZlciwKICAgICAgLnktc2xpY2UtYXhpcy1ob3ZlciB7CiAgICAgICAgcG9pbnRlci1ldmVudHM6IG5vbmU7CiAgICAgIH0KCiAgICAgIC54LWF4aXMtaG92ZXIgLmxhYmVsLAogICAgICAueS1heGlzLWhvdmVyIC5sYWJlbCwKICAgICAgLnktc2xpY2UtYXhpcy1ob3ZlciAubGFiZWwgewogICAgICAgIG9wYWNpdHk6IDA7CiAgICAgICAgZm9udC13ZWlnaHQ6IGJvbGQ7CiAgICAgICAgZm9udC1zaXplOiAxMXB4OwogICAgICAgIHRleHQtYW5jaG9yOiBlbmQ7CiAgICAgIH0KCiAgICAgIC54LWF4aXMtaG92ZXIgdGV4dCB7CiAgICAgICAgdGV4dC1hbmNob3I6IG1pZGRsZTsKICAgICAgfQoKICAgICAgLnktYXhpcy1ob3ZlciB0ZXh0LAogICAgICAueS1zbGljZS1heGlzLWhvdmVyIHRleHQgewogICAgICAgIHRleHQtYW5jaG9yOiBzdGFydDsKICAgICAgfQoKICAgICAgLngtYXhpcy1ob3ZlciBsaW5lLAogICAgICAueS1heGlzLWhvdmVyIGxpbmUsCiAgICAgIC55LXNsaWNlLWF4aXMtaG92ZXIgbGluZSB7CiAgICAgICAgc3Ryb2tlOiBibGFjazsKICAgICAgfQoKICAgICAgLngtYXhpcy1ob3ZlciByZWN0LAogICAgICAueS1heGlzLWhvdmVyIHJlY3QsCiAgICAgIC55LXNsaWNlLWF4aXMtaG92ZXIgcmVjdCB7CiAgICAgICAgZmlsbDogd2hpdGU7CiAgICAgIH0KCiAgICAgIC5heGlzIHsKICAgICAgICBmb250LXNpemU6IDExcHg7CiAgICAgIH0KCiAgICAgIC5heGlzIHBhdGguZG9tYWluIHsKICAgICAgICBmaWxsOiBub25lOwogICAgICB9CgogICAgICAuYXhpcyAudGljayBsaW5lIHsKICAgICAgICBzdHJva2U6ICNkZGQ7CiAgICAgIH0KCiAgICAgIC5heGlzLnNsaWNlIHsKICAgICAgICBvcGFjaXR5OiAwOwogICAgICB9CgogICAgICAuYXhpcy5zbGljZSAudGljayBsaW5lIHsKICAgICAgICBzdHJva2UtZGFzaGFycmF5OiAyOwogICAgICB9CgogICAgICAuc21hbGwgLmF4aXMgdGV4dCB7CiAgICAgICAgZGlzcGxheTogbm9uZTsKICAgICAgfQogICAgICAuc21hbGwgLmF4aXMgLnRpY2s6Zmlyc3Qtb2YtdHlwZSB0ZXh0IHsKICAgICAgICBkaXNwbGF5OiBibG9jazsKICAgICAgfQogICAgICAuc21hbGwgLmF4aXMgLnRpY2s6bGFzdC1vZi10eXBlIHRleHQgewogICAgICAgIGRpc3BsYXk6IGJsb2NrOwogICAgICB9CiAgICAgIC5tZWRpdW0gLmF4aXMgdGV4dCB7CiAgICAgICAgZGlzcGxheTogbm9uZTsKICAgICAgfQogICAgICAubWVkaXVtIC5heGlzIC50aWNrOm50aC1jaGlsZCgybiArIDEpIHRleHQgewogICAgICAgIGRpc3BsYXk6IGJsb2NrOwogICAgICB9CiAgICAgIC5sYXJnZSAuYXhpcyB0ZXh0IHsKICAgICAgICBkaXNwbGF5OiBub25lOwogICAgICB9CiAgICAgIC5sYXJnZSAuYXhpcyAudGljazpudGgtY2hpbGQoMm4gKyAxKSB0ZXh0IHsKICAgICAgICBkaXNwbGF5OiBibG9jazsKICAgICAgfQogICAgPC9zdHlsZT4KICBgOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoeyB0eXBlOiBTdHJpbmcgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBTdHJpbmcpCiAgICBdLCBfVnpIaXN0b2dyYW1UaW1lc2VyaWVzLnByb3RvdHlwZSwgIm1vZGUiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoeyB0eXBlOiBTdHJpbmcgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBTdHJpbmcpCiAgICBdLCBfVnpIaXN0b2dyYW1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YXMgdGhlCiAgICAgICAgICAgIC8vIGNvdW50IGZvciB0aGUgbmV3IGJpbi4gSWYgbm8gb3ZlcmxhcCwgd2lsbCBhZGQgdG8gemVybzsgaWYgMTAwJQogICAgICAgICAgICAvLyBvdmVybGFwLCB3aWxsIGluY2x1ZGUgdGhlIGZ1bGwgY291bnQgaW50byBuZXcgYmluLgogICAgICAgICAgICBsZXQgYmluWSA9IDA7CiAgICAgICAgICAgIHdoaWxlIChidWNrZXRJbmRleCA8IGhpc3RvZ3JhbS5idWNrZXRzLmxlbmd0aCkgewogICAgICAgICAgICAgICAgLy8gQ2xpcCB0aGUgcmlnaHQgZWRnZSBiZWNhdXNlIHJpZ2h0LW1vc3QgZWRnZSBjYW4gYmUKICAgICAgICAgICAgICAgIC8vIGluZmluaXRlLXNpemVkLgogICAgICAgICAgICAgICAgY29uc3QgYnVja2V0UmlnaHQgPSBNYXRoLm1pbihtYXgsIGhpc3RvZ3JhbS5idWNrZXRzW2J1Y2tldEluZGV4XS5yaWdodCk7CiAgICAgICAgICAgICAgICBjb25zdCBidWNrZXRMZWZ0ID0gTWF0aC5tYXgobWluLCBoaXN0b2dyYW0uYnVja2V0c1tidWNrZXRJbmRleF0ubGVmdCk7CiAgICAgICAgICAgICAgICBjb25zdCBpbnRlcnNlY3QgPSBNYXRoLm1pbihidWNrZXRSaWdodCwgYmluUmlnaHQpIC0gTWF0aC5tYXgoYnVja2V0TGVmdCwgYmluTGVmdCk7CiAgICAgICAgICAgICAgICBjb25zdCBjb3VudCA9IChpbnRlcnNlY3QgLyAoYnVja2V0UmlnaHQgLSBidWNrZXRMZWZ0KSkgKgogICAgICAgICAgICAgICAgICAgIGhpc3RvZ3JhbS5idWNrZXRzW2J1Y2tldEluZGV4XS5jb3VudDsKICAgICAgICAgICAgICAgIGJpblkgKz0gaW50ZXJzZWN0ID4gMCA/IGNvdW50IDogMDsKICAgICAgICAgICAgICAgIC8vIElmIGBidWNrZXRSaWdodGAgaXMgYmlnZ2VyIHRoYW4gYGJpblJpZ2h0YCwgdGhlbiB0aGlzIGJpbiBpcwogICAgICAgICAgICAgICAgLy8gZmluaXNoZWQgYW5kIHRoZXJlIGlzIGRhdGEgZm9yIHRoZSBuZXh0IGJpbiwgc28gZG9uJ3QgaW5jcmVtZW50CiAgICAgICAgICAgICAgICAvLyBgYnVja2V0SW5kZXhgLgogICAgICAgICAgICAgICAgaWYgKGJ1Y2tldFJpZ2h0ID4gYmluUmlnaHQpIHsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGJ1Y2tldEluZGV4Kys7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHsgeDogYmluTGVmdCwgZHg6IGJpbldpZHRoLCB5OiBiaW5ZIH07CiAgICAgICAgfSk7CiAgICB9CiAgICBmdW5jdGlvbiBiYWNrZW5kVG9WeihoaXN0b2dyYW1zKSB7CiAgICAgICAgY29uc3QgaW50ZXJtZWRpYXRlSGlzdG9ncmFtcyA9IGhpc3RvZ3JhbXMubWFwKGJhY2tlbmRUb0ludGVybWVkaWF0ZSk7CiAgICAgICAgY29uc3QgbWlubWluID0gbWluKGludGVybWVkaWF0ZUhpc3RvZ3JhbXMsIChoKSA9PiBoLm1pbik7CiAgICAgICAgY29uc3QgbWF4bWF4ID0gbWF4KGludGVybWVkaWF0ZUhpc3RvZ3JhbXMsIChoKSA9PiBoLm1heCk7CiAgICAgICAgcmV0dXJuIGludGVybWVkaWF0ZUhpc3RvZ3JhbXMubWFwKChoKSA9PiAoewogICAgICAgICAgICB3YWxsX3RpbWU6IGgud2FsbF90aW1lLAogICAgICAgICAgICBzdGVwOiBoLnN0ZXAsCiAgICAgICAgICAgIGJpbnM6IGludGVybWVkaWF0ZVRvRDMoaCwgbWlubWluLCBtYXhtYXgpLAogICAgICAgIH0pKTsKICAgIH0KCiAgICAvKiBDb3B5cmlnaHQgMjAxNiBUaGUgVGVuc29yRmxvdyBBdXRob3JzLiBB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guLi5hcmd1bWVudHMpOwogICAgICAgICAgICB0aGlzLmdldERhdGFMb2FkTmFtZSA9ICh7IHJ1biB9KSA9PiBydW47CiAgICAgICAgICAgIHRoaXMucmVxdWVzdERhdGEgPSAoaXRlbXMsIG9uTG9hZCwgb25GaW5pc2gpID0+IHsKICAgICAgICAgICAgICAgIGNvbnN0IHJvdXRlciA9IGdldFJvdXRlcigpOwogICAgICAgICAgICAgICAgY29uc3QgYmFzZVVybCA9IHJvdXRlci5wbHVnaW5Sb3V0ZSgnaGlzdG9ncmFtcycsICcvaGlzdG9ncmFtcycpOwogICAgICAgICAgICAgICAgUHJvbWlzZS5hbGwoaXRlbXMubWFwKChpdGVtKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgY29uc3QgdXJsID0gYWRkUGFyYW1zKGJhc2VVcmwsIHsgdGFnOiBpdGVtLnRhZywgcnVuOiBpdGVtLnJ1biB9KTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5yZXF1ZXN0TWFuYWdlcgogICAgICAgICAgICAgICAgICAgICAgICAucmVxdWVzdCh1cmwpCiAgICAgICAgICAgICAgICAgICAgICAgIC50aGVuKChkYXRhKSA9PiB2b2lkIG9uTG9hZCh7IGl0ZW0sIGRhdGEgfSkpOwogICAgICAgICAgICAgICAgfSkpLmZpbmFsbHkoKCkgPT4gdm9pZCBvbkZpbmlzaCgpKTsKICAgICAgICAgICAgfTsKICAgICAgICAgICAgdGhpcy5sb2FkRGF0YUNhbGxiYWNrID0gKF8sIGRhdHVtLCBkYXRhKSA9PiB7CiAgICAgICAgICAgICAgICBjb25zdCBkM0RhdGEgPSBiYWNrZW5kVG9WeihkYXRhKTsKICAgICAgICAgICAgICAgIGNvbnN0IG5hbWUgPSB0aGlzLmdldERhdGFMb2FkTmFtZShkYXR1bSk7CiAgICAgICAgICAgICAgICB0aGlzLiQuY2hhcnQuc2V0U2VyaWVzRGF0YShuYW1lLCBkM0RhdGEpOwogICAgICAgICAgICB9OwogICAgICAg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Z2h0OiA1MDBweDsKICAgICAgfQoKICAgICAgdnotaGlzdG9ncmFtLXRpbWVzZXJpZXMgewogICAgICAgIC1tb3otdXNlci1zZWxlY3Q6IG5vbmU7CiAgICAgICAgLXdlYmtpdC11c2VyLXNlbGVjdDogbm9uZTsKICAgICAgICB3aWxsLWNoYW5nZTogdHJhbnNmb3JtOwogICAgICB9CgogICAgICBwYXBlci1pY29uLWJ1dHRvbiB7CiAgICAgICAgY29sb3I6ICMyMTk2ZjM7CiAgICAgICAgYm9yZGVyLXJhZGl1czogMTAwJTsKICAgICAgICB3aWR0aDogMzJweDsKICAgICAgICBoZWlnaHQ6IDMycHg7CiAgICAgICAgcGFkZGluZzogNHB4OwogICAgICB9CgogICAgICBwYXBlci1pY29uLWJ1dHRvbltzZWxlY3RlZF0gewogICAgICAgIGJhY2tncm91bmQ6IHZhcigtLXRiLXVpLWxpZ2h0LWFjY2VudCk7CiAgICAgIH0KCiAgICAgIHRmLWNhcmQtaGVhZGluZyB7CiAgICAgICAgbWFyZ2luLWJvdHRvbTogMTBweDsKICAgICAgICB3aWR0aDogOTAlOwogICAgICB9CiAgICA8L3N0eWxlPgogIGA7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7IHR5cGU6IFN0cmluZyB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIFN0cmluZykKICAgIF0sIF9UZkhpc3RvZ3JhbUxvYWRlci5wcm90b3R5cGUsICJydW4iLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoeyB0eXBlOiBTdHJpbmcgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBTdHJpbmcpCiAgICBdLCBfVGZIaXN0b2dyYW1Mb2FkZXIucHJvdG90eXBlLCAidGFnIiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsgdHlwZTogT2JqZWN0IH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AgICAgICAgICAgICAgICAucXVlcnlTZWxlY3RvckFsbCgndGYtaGlzdG9ncmFtLWxvYWRlcicpCiAgICAgICAgICAgICAgICAuZm9yRWFjaCgoaGlzdG9ncmFtKSA9PiBoaXN0b2dyYW0ucmVkcmF3KCkpOwogICAgICAgIH0KICAgICAgICByZWFkeSgpIHsKICAgICAgICAgICAgc3VwZXIucmVhZHkoKTsKICAgICAgICAgICAgaWYgKHRoaXMucmVsb2FkT25SZWFkeSkKICAgICAgICAgICAgICAgIHRoaXMucmVsb2FkKCk7CiAgICAgICAgfQogICAgICAgIHJlbG9hZCgpIHsKICAgICAgICAgICAgdGhpcy5fZmV0Y2hUYWdzKCkudGhlbigoKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLl9yZWxvYWRIaXN0b2dyYW1zKCk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICBfZmV0Y2hUYWdzKCkgewogICAgICAgICAgICBjb25zdCB1cmwgPSBnZXRSb3V0ZXIoKS5wbHVnaW5Sb3V0ZSgnaGlzdG9ncmFtcycsICcvdGFncycpOwogICAgICAgICAgICByZXR1cm4gdGhpcy5fcmVxdWVzdE1hbmFnZXIucmVxdWVzdCh1cmwpLnRoZW4oKHJ1blRvVGFnSW5mbykgPT4gewogICAgICAgICAgICAgICAgaWYgKGxvZGFzaC5pc0VxdWFsKHJ1blRvVGFnSW5mbywgdGhpcy5fcnVuVG9UYWdJbmZvKSkgewogICAgICAgICAgICAgICAgICAgIC8vIE5vIG5lZWQgdG8gdXBkYXRlIGFueXRoaW5nIGlmIHRoZXJlIGFyZSBubyBjaGFuZ2VzLgogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGNvbnN0IHJ1blRvVGFnID0gbG9kYXNoLm1hcFZhbHVlcyhydW5Ub1RhZ0luZm8sICh4KSA9PiBPYmplY3Qua2V5cyh4KSk7CiAgICAgICAgICAgICAgICBjb25zdCB0YWdzID0gZ2V0VGFncyhydW5Ub1RhZyk7CiAgICAgICAgICAgICAgICB0aGlzLnNldCgnX2RhdGFOb3RGb3VuZCcsIHRhZ3MubGVuZ3RoID09PSAwKTsKICAgICAgICAgICAgICAgIHRoaXMuc2V0KCdfcnVuVG9UYWcnLCBydW5Ub1RhZyk7CiAgICAgICAgICAgICAgICB0aGlzLnNldCgnX3J1blRvVGFnSW5mbycsIHJ1blRvVGFnSW5mbyk7CiAgICAgICAgICAgICAgICB0aGlzLmFzeW5jKCgpID0+IHsKICAgICAgICAgICAgICAgICAgICAvLyBTZWUgdGhlIGNvbW1lbnQgYWJvdmUgYF9jYXRlZ29yaWVzRG9tUmVhZHlgLgogICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0KCdfY2F0ZWdvcmllc0RvbVJlYWR5JywgdHJ1ZSk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIF9yZWxvYWRIaXN0b2dyYW1zKCkgewogICAgICAgICAgICB0aGlzLnJvb3QucXVlcnlTZWxlY3RvckFsbCgndGYtaGlzdG9ncmFtLWxvYWRlcicpLmZvckVhY2goKGhpc3RvZ3JhbSkgPT4gewogICAgICAgICAgICAgICAgaGlzdG9ncmFtLnJlbG9hZCgpOwogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgX3Nob3VsZE9wZW4oaW5kZXgpIHsKICAgICAgICAgICAgcmV0dXJuIGluZGV4IDw9IDI7CiAgICAgICAgfQogICAgICAgIGdldCBfY2F0ZWdvcmllcygpIHsKICAgICAgICAgICAgdmFyIHJ1blRvVGFnID0gdGhpcy5fcnVuVG9UYWc7CiAgICAgICAgICAgIHZhciBzZWxlY3RlZFJ1bnMgPSB0aGlzLl9zZWxlY3RlZFJ1bnM7CiAgICAgICAgICAgIHZhciB0YWdGaWx0ZXIgPSB0aGlzLl90YWdGaWx0ZXI7CiAgICAgICAgICAgIHZhciBjYXRlZ29yaWVzRG9tUmVhZHkg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3JhbSBkYXRhIHRvIHlvdXIgZXZlbnQgZmlsZXMuCiAgICAgICAgICAgICAgPC9saT4KICAgICAgICAgICAgICA8bGk+VGVuc29yQm9hcmQgY2Fu4oCZdCBmaW5kIHlvdXIgZXZlbnQgZmlsZXMuPC9saT4KICAgICAgICAgICAgPC91bD4KCiAgICAgICAgICAgIDxwPgogICAgICAgICAgICAgIElmIHlvdeKAmXJlIG5ldyB0byB1c2luZyBUZW5zb3JCb2FyZCwgYW5kIHdhbnQgdG8gZmluZCBvdXQgaG93IHRvCiAgICAgICAgICAgICAgYWRkIGRhdGEgYW5kIHNldCB1cCB5b3VyIGV2ZW50IGZpbGVzLCBjaGVjayBvdXQgdGhlCiAgICAgICAgICAgICAgPGEKICAgICAgICAgICAgICAgIGhyZWY9Imh0dHBzOi8vZ2l0aHViLmNvbS90ZW5zb3JmbG93L3RlbnNvcmJvYXJkL2Jsb2IvbWFzdGVyL1JFQURNRS5tZCIKICAgICAgICAgICAgICAgID5SRUFETUU8L2EKICAgICAgICAgICAgICA+CiAgICAgICAgICAgICAgYW5kIHBlcmhhcHMgdGhlCiAgICAgICAgICAgICAgPGEKICAgICAgICAgICAgICAgIGhyZWY9Imh0dHBzOi8vd3d3LnRlbnNvcmZsb3cub3JnL2dldF9zdGFydGVkL3N1bW1hcmllc19hbmRfdGVuc29yYm9hcmQiCiAgICAgICAgICAgICAgICA+VGVuc29yQm9hcmQgdHV0b3JpYWw8L2EKICAgICAgICAgICAgICA+LgogICAgICAgICAgICA8L3A+CgogICAgICAgICAgICA8cD4KICAgICAgICAgICAgICBJZiB5b3UgdGhpbmsgVGVuc29yQm9hcmQgaXMgY29uZmlndXJlZCBwcm9wZXJseSwgcGxlYXNlIHNlZQogICAgICAgICAgICAgIDxhCiAgICAgICAgICAgICAgICBocmVmPSJodHRwczovL2dpdGh1Yi5jb20vdGVuc29yZmxvdy90ZW5zb3Jib2FyZC9ibG9iL21hc3Rlci9SRUFETUUubWQjbXktdGVuc29yYm9hcmQ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uCiAgICBmdW5jdGlvbiBocGFyYW1OYW1lKGhwYXJhbUluZm8pIHsKICAgICAgICBpZiAoaHBhcmFtSW5mby5kaXNwbGF5TmFtZSAhPT0gJycgJiYgaHBhcmFtSW5mby5kaXNwbGF5TmFtZSAhPT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgIHJldHVybiBocGFyYW1JbmZvLmRpc3BsYXlOYW1lOwogICAgICAgIH0KICAgICAgICByZXR1cm4gaHBhcmFtSW5mby5uYW1lOwogICAgfQogICAgLy8gQ29tcHV0ZXMgdGhlIG5hbWUgdG8gZGlzcGxheSBmb3IgdGhlIGdpdmVuIG1ldHJpY0luZm8gb2JqZWN0LgogICAgZnVuY3Rpb24gbWV0cmljTmFtZShtZXRyaWNJbmZvKSB7CiAgICAgICAgaWYgKG1ldHJpY0luZm8uZGlzcGxheU5hbWUgIT09ICcnICYmIG1ldHJpY0luZm8uZGlzcGxheU5hbWUgIT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICByZXR1cm4gbWV0cmljSW5mby5kaXNwbGF5TmFtZTsKICAgICAgICB9CiAgICAgICAgbGV0IGdyb3VwID0gbWV0cmljSW5mby5uYW1lLmdyb3VwOwogICAgICAgIGxldCB0YWcgPSBtZXRyaWNJbmZvLm5hbWUudGFnOwogICAgICAgIGlmIChncm91cCA9PT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgIGdyb3VwID0gJyc7CiAgICAgICAgfQogICAgICAgIGlmICh0YWcgPT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICB0YWcgPSAnJzsKICAgICAgICB9CiAgICAgICAgaWYgKGdyb3VwID09PSAnJykgewogICAgICAgICAgICByZXR1cm4gdGFnOwogICAgICAgIH0KICAgICAgICByZXR1cm4gZ3JvdXAgKyAnLicgKyB0YWc7CiAgICB9CiAgICBmdW5jdGlvbiBzY2hlbWFDb2x1bW5OYW1lKHNjaGVtYSwgY29sdW1uSW5kZXgpIHsKICAgICAgICBpZiAoY29sdW1uSW5kZX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QoeCwgeSwgeDAsIHkwLCB4MSwgeTEpIHsKICAgICAgICBpZiAoeCA8IHgwICYmIHkgPCB5MCkgewogICAgICAgICAgICByZXR1cm4gZXVjbGlkZWFuRGlzdCh4LCB5LCB4MCwgeTApOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmICh4MCA8PSB4ICYmIHggPCB4MSAmJiB5IDwgeTApIHsKICAgICAgICAgICAgcmV0dXJuIHkwIC0geTsKICAgICAgICB9CiAgICAgICAgZWxzZSBpZiAoeDEgPD0geCAmJiB5IDwgeTApIHsKICAgICAgICAgICAgcmV0dXJuIGV1Y2xpZGVhbkRpc3QoeCwgeSwgeDEsIHkwKTsKICAgICAgICB9CiAgICAgICAgZWxzZSBpZiAoeCA8IHgwICYmIHkwIDw9IHkgJiYgeSA8IHkxKSB7CiAgICAgICAgICAgIHJldHVybiB4MCAtIHg7CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYgKHgwIDw9IHggJiYgeCA8IHgxICYmIHkwIDw9IHkgJiYgeSA8IHkxKSB7CiAgICAgICAgICAgIHJldHVybiAwOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmICh4MSA8PSB4ICYmIHkwIDw9IHkgJiYgeSA8IHkxKSB7CiAgICAgICAgICAgIHJldHVybiB4IC0geDE7CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYgKHggPCB4MCAmJiB5MSA8PSB5KSB7CiAgICAgICAgICAgIHJldHVybiBldWNsaWRlYW5EaXN0KHgsIHksIHgwLCB5MSk7CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYgKHgwIDw9IHggJiYgeCA8IHgxICYmIHkxIDw9IHkpIHsKICAgICAgICAgICAgcmV0dXJuIHkgLSB5MTsKICAgICAgICB9CiAgICAgICAgZWxzZSBpZiAoeDEgPD0geCAmJiB5MSA8PSB5KSB7CiAgICAgICAgICAgIHJldHVybiBldWNsaWRlYW5EaXN0KHgsIHksIHgxLCB5MSk7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICA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Zpc2l0KChub2RlLCBueDAsIG55MCwgbngxLCBueTEpID0+IHsKICAgICAgICAgICAgLy8gUmVwcmVzZW50cyB0aGUgc2V0IG9mIHBvaW50cyBbbngwLCBueDEpIHggW255MCwgbnkxKS4KICAgICAgICAgICAgaWYgKG5vZGUubGVuZ3RoID09PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgICAgIGRvIHsKICAgICAgICAgICAgICAgICAgICBjb25zdCB4ID0gcXVhZFRyZWUueCgpKG5vZGUuZGF0YSk7CiAgICAgICAgICAgICAgICAgICAgY29uc3QgeSA9IHF1YWRUcmVlLnkoKShub2RlLmRhdGEpOwogICAgICAgICAgICAgICAgICAgIGlmICh4MCA8PSB4ICYmIHggPCB4MSAmJiB5MCA8PSB5ICYmIHkgPCB5MSkgewogICAgICAgICAgICAgICAgICAgICAgICBjYWxsYmFjayhub2RlLmRhdGEpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0gd2hpbGUgKChub2RlID0gbm9kZS5uZXh0KSk7CiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBTa2lwIHRoaXMgbm9kZSBpZiBJbnRlcnNlY3Rpb24oW254MCwgbngxKSB4IFtueTAsIG55MSksCiAgICAgICAgICAgIC8vICBbeDAsIHgxKSB4IFt5MCwgeTEpKSBpcyBlbXB0eSwgb3IgZXF1aXZhbGVudGx5LCBpZgogICAgICAgICAgICAvLyBlaXRoZXIgSW50ZXJzZWN0aW9uKFtueDAsIG54MSksIFt4MCwgeDEpKSBvcgogICAgICAgICAgICAvLyBJbnRlcnNlY3Rpb24oW255MCwgbnkxKSwgW3kwLCB5MSkpIGlzIGVtcHR5LgogICAgICAgICAgICByZXR1cm4gbngwID49IHgxIHx8IG54MSA8PSB4MCB8fCBueTAgPj0geTEgfHwgbnkxIDw9IHkwOwogICAgICAgIH0pOwogICAgfQogICAgLy8gR2l2ZW4gYSBkMy5xdWFkVHJ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jayhub2RlLmRhdGEsIGNlbnRlckRpc3QpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0gd2hpbGUgKChub2RlID0gbm9kZS5uZXh0KSk7CiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBTa2lwIG5vZGVzIHRoYXQgcmVwcmVzZW50IGEgcmVjdGFuZ2xlIHRoYXQgZG9lcyBub3QgaW50ZXJzZWN0IHRoZQogICAgICAgICAgICAvLyBkaXNrLiBFcXVpdmFsZW50bHksIHNraXAgbm9kZXMgdGhhdCByZXByZXNlbnQgYSByZWN0YW5nbGUgd2hvc2UKICAgICAgICAgICAgLy8gZGlzdGFuY2UgdG8gKGNlbnRlclgsIGNlbnRlclkpIGlzIGxhcmdlciB0aGFuIHJhZGl1cy4KICAgICAgICAgICAgcmV0dXJuIHBvaW50VG9SZWN0YW5nbGVEaXN0KGNlbnRlclgsIGNlbnRlclksIHgwLCB5MCwgeDEsIHkxKSA+IHJhZGl1czsKICAgICAgICB9KTsKICAgIH0KICAgIC8vIFJldHVybnMgYSBTZXQgY29uc2lzdGluZyBvZiBhbGwgZWxlbWVudHMgaW4gJ3NldCcgZm9yIHdoaWNoCiAgICAvLyBwcmVkaWNhdGVGbiBldmFsdWF0ZXMgdG8gYSB0cnV0aHkgdmFsdWUuCiAgICBmdW5jdGlvbiBmaWx0ZXJTZXQoc2V0LCBwcmVkaWNhdGVGbikgewogICAgICAgIGNvbnN0IHJlc3VsdCA9IG5ldyBTZXQoKTsKICAgICAgICBzZXQuZm9yRWFjaCgodmFsKSA9PiB7CiAgICAgICAgICAgIGlmIChwcmVkaWNhdGVGbih2YWwpKSB7CiAgICAgICAgICAgICAgICByZXN1bHQuYWRkKHZhbCk7CiAgICAgICAgICAgIH0KICAgICAgICB9KTsKICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgfQogICAgLy8gU2V0cyB0aGUgYXJyYXkgcHJvcGVydHkg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T09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KICAgIGxldCBIcGFyYW1zU3BsaXRMYXlvdXQgPSBjbGFzcyBIcGFyYW1zU3BsaXRMYXlvdXQgZXh0ZW5kcyBQb2x5bWVyRWxlbWVudCB7CiAgICAgICAgY29uc3RydWN0b3IoKSB7CiAgICAgICAgICAgIHN1cGVyKC4uLmFyZ3VtZW50cyk7CiAgICAgICAgICAgIHRoaXMub3JpZW50YXRpb24gPSAnaG9yaXpvbnRhbCc7CiAgICAgICAgfQogICAgfTsKICAgIEhwYXJhbXNTcGxpdExheW91dC50ZW1wbGF0ZSA9IGh0bWwgYAogICAgPHNsb3QgbmFtZT0iY29udGVudCI+PC9zbG90PgoKICAgIDxzdHlsZT4KICAgICAgOmhvc3QgewogICAgICAgIGRpc3BsYXk6IGJsb2NrOwogICAgICB9CgogICAgICA6aG9zdCBzbG90IHsKICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgIGhlaWdodDogMTAwJTsKICAgICAgICB3aWR0aDogMTAwJTsKICAgICAgfQoKICAgICAgOmhvc3QgOjpzbG90dGVkKCopIHsKICAgICAgICBmbGV4OiAwIDAgYXV0bzsKICAgICAgfQoKICAgICAgOmhvc3QoW29yaWVudGF0aW9uPSdob3Jpem9udGFsJ10pIHNsb3QgewogICAgICAgIGZsZXgtZGlyZWN0aW9uOiByb3c7CiAgICAgICAgb3ZlcmZsb3cteDogYXV0bzsKICAgICAgfQoKICAgICAgOmhvc3QoW29yaWVudGF0aW9uPSd2ZXJ0aWNhbCddKSBzbG90IHsKICAgICAgICBmbGV4LWRpcmVjdGlvbjogY29sdW1uOwogICAgICAgIG92ZXJmbG93LXk6IGF1dG87CiAgICAgIH0KCiAgICAgIDpob3N0IDo6c2xvdHRlZCgqOm5vdCg6bGFzdC1jaGlsZCkpIHsKICAgICAgICBib3JkZXI6IDAgc29saWQgdmFyKC0tZGl2a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AgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgICAgICBzdXBlciguLi5hcmd1bWVudHMpOwogICAgICAgICAgICAvLyBDb250YWlucyB0aGUgc2NoZW1hIGFuZCBjb2x1bW5zIHZpc2liaWxpdHkgc3RhdHVzLgogICAgICAgICAgICAvLyBXZSB1c2UgYSBzaW5nbGUgb2JqZWN0IHdlIGNhbGwgJ2NvbmZpZ3VyYXRpb24nIHRvIGhvbGQgYm90aCBvZgogICAgICAgICAgICAvLyB0aGVzZSBwcm9wZXJ0aWVzLCBzaW5jZSBQb2x5bWVyICh2MSkgZG9lc24ndCBhbGxvdyBhdG9taWMKICAgICAgICAgICAgLy8gY2hhbmdlcyB0byBtdWx0aXBsZSBwcm9wZXJ0aWVzICh0aGF0IGlzLCBzZW5kaW5nIHRoZSBub3RpZmljYXRpb24KICAgICAgICAgICAgLy8gdG8gZG93bnN0cmVhbSBjb25zdW1lcnMgb25seSBhZnRlciBhbGwgcHJvcGVydGllcyBoYXZlIGJlZW4gdXBkYXRlZCkuCiAgICAgICAgICAgIC8vCiAgICAgICAgICAgIC8vIFByb3BlcnRpZXM6CiAgICAgICAgICAgIC8vIC0tLS0tLS0tLS0tCiAgICAgICAgICAgIC8vIHNjaGVtYS5ocGFyYW1Db2x1bW5zW2ldLmhwYXJhbUluZm8gY29udGFpbnMgdGhlIEhQYXJhbUluZm8gcHJvdG9jb2wKICAgICAgICAgICAgLy8gYnVmZmVyIHJlcHJlc2VudGluZyB0aGUgaXRoIGhwYXJhbS4KICAgICAgICAgICAgLy8gc2NoZW1hLm1ldHJpY0NvbHVtbnNbaV0ubWV0cmljSW5mbyBjb250YWlucyB0aGUgTWV0cmljSW5mbyBwcm90b2NvbAogICAgICAgICAgICAvLyBidWZmZXIgcmVwcmVzZW50aW5nIHRoZSBpdGggbWV0cmljLgogICAgICAgICAgICAvLwogICAgICAgICAgICAvLyBjb2x1bW5zVmlzaWJpbGl0eVtdLgogICAgICAgICAgICAvLyBBIGJvb2xlY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mVzcGVjdGl2ZWx5LgogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQHR5cGUge3sKICAgICAgICAgICAgICogICAgc2NoZW1hOiB7CiAgICAgICAgICAgICAqICAgICAgaHBhcmFtQ29sdW1uczogQXJyYXk8e2hwYXJhbUluZm86IE9iamVjdH0+LAogICAgICAgICAgICAgKiAgICAgIG1ldHJpY0NvbHVtbnM6IEFycmF5PHttZXRyaWNJbmZvOiBPYmplY3R9PiwKICAgICAgICAgICAgICogICAgfSwKICAgICAgICAgICAgICogICAgY29sdW1uc1Zpc2liaWxpdHk6IEFycmF5PEJvb2xlYW4+LAogICAgICAgICAgICAgKiAgICB2aXNpYmxlU2NoZW1hOiB7CiAgICAgICAgICAgICAqICAgICAgaHBhcmFtSW5mb3M6IEFycmF5PE9iamVjdD4sCiAgICAgICAgICAgICAqICAgICAgbWV0cmljSW5mb3M6IEFycmF5PE9iamVjdD4sCiAgICAgICAgICAgICAqICAgIH0KICAgICAgICAgICAgICogfX0KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuY29uZmlndXJhdGlvbiA9IHsKICAgICAgICAgICAgICAgIHNjaGVtYTogewogICAgICAgICAgICAgICAgICAgIGhwYXJhbUNvbHVtbnM6IFtdLAogICAgICAgICAgICAgICAgICAgIG1ldHJpY0NvbHVtbnM6IFtdLAogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIGNvbHVtbnNWaXNpYmlsaXR5OiBbXSwKICAgICAgICAgICAgICAgIHZpc2libGVTY2hlbWE6IHsKICAgICAgICAgICAgICAgICAgICBocGFyYW1JbmZvczogW10sCiAgICAgICAgICAgICAgICAgICAgbWV0cmljSW5mb3M6IFtdLAogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgfTsKICAgICAgICAgICAgLy8gVGhlIGxhdGVzdCBsaXN0IG9mIHNlc3Npb24gZ3JvdXBzIHJlY2VpdmVkIGZyb20gdGhlIHNlcnZlci4KICAgICAgICAgICAgLy8gU2VlIH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yB0aGUgdG90YWwgbnVtYmVyIG9mIHBhZ2VzIG9yICc/JyBpZiB1bmtub3duLgogICAgICAgICAgICB0aGlzLl9wYWdlQ291bnRTdHIgPSAnPyc7CiAgICAgICAgICAgIHRoaXMuX2hwYXJhbU5hbWUgPSBocGFyYW1OYW1lOwogICAgICAgICAgICB0aGlzLl9tZXRyaWNOYW1lID0gbWV0cmljTmFtZTsKICAgICAgICAgICAgdGhpcy5fcHJldHR5UHJpbnQgPSBwcmV0dHlQcmludDsKICAgICAgICB9CiAgICAgICAgcmVsb2FkKCkgewogICAgICAgICAgICB0aGlzLl9xdWVyeVNlcnZlcigpOwogICAgICAgIH0KICAgICAgICBfY3N2VXJsKHJlcXVlc3QsIGNvbmZpZ3VyYXRpb24pIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2Rvd25sb2FkRGF0YVVybChyZXF1ZXN0LCBjb25maWd1cmF0aW9uLCAnY3N2Jyk7CiAgICAgICAgfQogICAgICAgIF9qc29uVXJsKHJlcXVlc3QsIGNvbmZpZ3VyYXRpb24pIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2Rvd25sb2FkRGF0YVVybChyZXF1ZXN0LCBjb25maWd1cmF0aW9uLCAnanNvbicpOwogICAgICAgIH0KICAgICAgICBfbGF0ZXhVcmwocmVxdWVzdCwgY29uZmlndXJhdGlvbikgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fZG93bmxvYWREYXRhVXJsKHJlcXVlc3QsIGNvbmZpZ3VyYXRpb24sICdsYXRleCcpOwogICAgICAgIH0KICAgICAgICBfZG93bmxvYWREYXRhVXJsKHJlcXVlc3QsIGNvbmZpZ3VyYXRpb24sIGZvcm1hdCkgewogICAgICAgICAgICBjb25zdCB2aXNpYmlsaXR5ID0gY29uZmlndXJhdGlvbi5jb2x1bW5zVmlzaWJpbGl0eTsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuYmFja2VuZC5nZXREb3dubG9hZFVybChmb3JtYXQsIHJlcXVlc3QsIHZpc2liaWxpdHkpOwogICAgICAgIH0KICAgICAgICAvLyBTZW5kcyBhIHJlcXVlc3QgZm9yIGV4cGVyaW1lbnQgdG8gdGhlIHNlcnZlciwgYW5kIHVwZGF0ZXMKICAgICAgICAvLyB0aGUgc3RhdGUgb2YgdGhpcyBlbGVtZW50IGFjY29yZGluZ2x5LiBDdXJyZW50bHksIG9ubHkgY2FsbGVkCiAgICAgICAgLy8gb25jZSBvbiBlbGVtZW50IGluaXRpYWxpemF0aW9uLgogICAgICAgIF9jb21wdXRlRXhwZXJpbWVudEFuZFJlbGF0ZWRQcm9wcygpIHsKICAgICAgICAgICAgY29uc3QgdXRpbHMgPSB0Zl9ocGFyYW1zX3V0aWxzOwogICAgICAgICAgICBpZiAodXRpbHMuaXNOdWxsT3JVbmRlZmluZWQodGhpcy5iYWNrZW5kKSB8fAogICAgICAgICAgICAgICAgdXRpbHMuaXNOdWxsT3JVbmRlZmluZWQodGhpcy5leHBlcmltZW50TmFtZSkpIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICBjb25zdCBleHBlcmltZW50UmVxdWVzdCA9IHsKICAgICAgICAgICAgICAgIGV4cGVyaW1lbnROYW1lOiB0aGlzLmV4cGVyaW1lbnROYW1lLAogICAgICAgICAgICB9OwogICAgICAgICAgICB0aGlzLmJhY2tlbmQKICAgICAgICAgICAgICAgIC5nZXRFeHBlcmltZW50KGV4cGVyaW1lbnRSZXF1ZXN0KQogICAgICAgICAgICAgICAgLnRoZW4oKGV4cGVyaW1lbnQpID0+IHsKICAgICAgICAgICAgICAgIGlmIChsb2Rhc2guaXNFcXVhbChleHBlcmltZW50LCB0aGlzLl9leHBlcmltZW50KSkgewogICAgICAgICAgICAgICAgICAgIC8vIE5vIG5lZWQgdG8gdXBkYXRlIGFueXRoaW5nIGlmIHRoZXJlIGFyZSBubyBjaGFuZ2VzLgogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuc2V0KCdfZXhwZXJpbWVudCcsIGV4cGVyaW1lbnQpOwogICAgICAgICAgICAgICAgdGhpcy5fY29tcHV0ZUhQYXJhbXMoKTsKICAgICAgICAgICAgICAgIHRoaXMuX2NvbXB1dGVNZXRyaWNzKCk7CiAgICAgICAgICAgICAgICB0aGlzLl9xdWVyeVNlcnZlcigpOwogICAgICAgICAgICAgICAgdGhpcy5fcmVzb2x2ZUdldEV4cGVyaW1lbnQoKTsKICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgIC5maW5hbGx5KCgpID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuX2NvbXB1dGVEYXRhRm91bmQoKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIF9jb21wdXRlRGF0YUZvdW5kKCkgewogICAgICAgICAgICBjb25zdCByZXN1bHQgPSBCb29sZWFuKHRoaXMuX2V4cGVyaW1lbnQgJiYKICAgICAgICAgICAgICAgIHRoaXMuX2V4cGVyaW1lbnQuaHBhcmFtSW5mb3MgJiYKICAgICAgICAgICAgICAgIHRoaXMuX2V4cGVyaW1lbnQuaHBhcmFtSW5mb3MubGVuZ3RoID4gMCAmJgogICAgICAgICAgICAgICAgdGhpcy5fZXhwZXJpbWVudC5tZXRyaWNJbmZvcyAmJgogICAgICAgICAgICAgICAgdGhpcy5fZXhwZXJpbWVudC5tZXRyaWNJbmZvcy5sZW5ndGggPiAwKTsKICAgICAgICAgICAgdGhpcy5zZXQoJ2RhdGFMb2FkZWRXaXRoTm9uRW1wdHlIcGFyYW1zJywgcmVzdWx0KTsKICAgICAgICAgICAgdGhpcy5zZXQoJ2RhdGFMb2FkZWRXaXRoRW1wdHlIcGFyYW1zJywgIXJlc3VsdCk7CiAgICAgICAgfQogICAgICAgIC8vIFVwZGF0ZXMgdGhlIF9ocGFyYW1zIHByb3BlcnR5IGZyb20gdGhlIF9leHBlcmltZW50IHByb3BlcnR5LgogICAgICAgIF9jb21wdXRlSFBhcmFtcygpIHsKICAgICAgICAgICAgY29uc3QgcmVzdWx0ID0gW107CiAgICAgICAgICAgIGNvbnN0IGtOdW1IUGFyYW1zVG9EaXNwbGF5QnlEZWZhdWx0ID0gNTsKICAgICAgICAgICAgdGhpcy5fZXhwZXJpbWVudC5ocGFyYW1JbmZvcy5mb3JFYWNoKChhbkluZm8sIGluZGV4KSA9PiB7CiAgICAgICAgICAgICAgICBjb25zdCBocGFyYW0gPSB7CiAgICAgICAgICAgICAgICAgICAgaW5mbzogYW5JbmZvLAogICAgICAgICAgICAgICAgICAgIGRpc3BsYXllZDogaW5kZXggPCBrTnVtSFBhcmFtc1RvRGlzcGxheUJ5RGVmYXVsdCwKICAgICAgICAgICAgICAgICAgICBmaWx0ZXI6IHt9LAogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIGlmIChocGFyYW0uaW5mby5oYXNPd25Qcm9wZXJ0eSgnZG9tYWluRGlzY3JldGUnKSkgewogICAgICAgICAgICAgICAgICAgIGhwYXJhbS5maWx0ZXIuZG9tYWluRGlzY3JldGUgPSBbXTsKICAgICAgICAgICAgICAgICAgICBocGFyYW0uaW5mby5kb21haW5EaXNjcmV0ZS5mb3JFYWNoKCh2YWwpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgaHBhcmFtLmZpbHRlci5kb21haW5EaXNjcmV0ZS5wdXNoKHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiB2YWwsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGVja2VkOiB0cnVlLAogICAgICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKGhwYXJhbS5pbmZvLnR5cGUgPT09ICdEQVRBX1RZUEVfQk9PTCcpIHsKICAgICAgICAgICAgICAgICAgICBocGFyYW0uZmlsdGVyLmRvbWFpbkRpc2NyZXRlID0gWwogICAgICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogZmFsc2UsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGVja2VkOiB0cnVlLAogICAgICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogdHJ1ZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrZWQ6IHRydWUsCiAgICAgICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgXTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKGhwYXJhbS5pbmZvLnR5cGUgPT09ICdEQVRBX1RZUEVfRkxPQVQ2NCcpIHsKICAgICAgICAgICAgICAgICAgICBocGFyYW0uZmlsdGVyLmludGVydmFsID0gewogICAgICAgICAgICAgICAgICAgICAgICBtaW46IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiAnJywKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludmFsaWQ6IGZhbHNlLAogICAgICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgICAgICBtYXg6IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiAnJywKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludmFsaWQ6IGZhbHNlLAogICAgICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmIChocGFyYW0uaW5mby50eXBlID09PSAnREFUQV9UWVBFX1NUUklORycpIHsKICAgICAgICAgICAgICAgICAgICBocGFyYW0uZmlsdGVyLnJlZ2V4cCA9ICcnOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgY29uc29sZS53YXJuKCd1bmtub3duIGhwYXJhbS5pbmZvLnR5cGU6ICVzJywgaHBhcmFtLmluZm8udHlwZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXN1bHQucHVzaChocGFyYW0pOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdGhpcy5zZXQoJ19ocGFyYW1zJywgcmVzdWx0KTsKICAgICAgICB9CiAgICAgICAgLy8gVXBkYXRlcyB0aGUgX21ldHJpY3MgcHJvcGVydHkgZnJvbSB0aGUgX2V4cGVyaW1lbnQgcHJvcGVydHkuCiAgICAgICAgX2NvbXB1dGVNZXRyaWNzKCkgewogICAgICAgICAgICBjb25zdCByZXN1bHQgPSBbXTsKICAgICAgICAgICAgLy8gQnkgZGVmYXVsdCB3ZSBkaXNwbGF5IHRoZSBmaXJzdCBrTnVtTWV0cmljc1RvRGlzcGxheUJ5RGVmYXVsdCBtZXRyaWNzCiAgICAgICAgICAgIC8vIGFuZCBub3QgdGhlIHJlc3QuCiAgICAgICAgICAgIGNvbnN0IGtOdW1NZXRyaWNzVG9EaXNwbGF5QnlEZWZhdWx0ID0gNTsKICAgICAgICAgICAgdGhpcy5fZXhwZXJpbWVudC5tZXRyaWNJbmZvcy5mb3JFYWNoKChpbmZvLCBpbmRleCkgPT4gewogICAgICAgICAgICAgICAgY29uc3QgbWV0cmljID0gewogICAgICAgICAgICAgICAgICAgIGluZm86IGluZm8sCiAgICAgICAgICAgICAgICAgICAgZmlsdGVyOiB7CiAgICAgICAgICAgICAgICAgICAgICAgIGludGVydmFsOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtaW46IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogJycsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW52YWxpZDogZmFsc2UsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF4OiB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6ICcnLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludmFsaWQ6IGZhbHNlLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIGRpc3BsYXllZDogaW5kZXggPCBrTnVtTWV0cmljc1RvRGlzcGxheUJ5RGVmYXVsdCwKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICByZXN1bHQucHVzaChtZXRyaWMpOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdGhpcy5zZXQoJ19tZXRyaWNzJywgcmVzdWx0KTsKICAgICAgICB9CiAgICAgICAgX2NvbXB1dGVTY2hlbWEoKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5faHBhcmFtcyB8fCAhdGhpcy5fbWV0cmljcykgewogICAgICAgICAgICAgICAgcmV0dXJuIHsgaHBhcmFtQ29sdW1uczogW10sIG1ldHJpY0NvbHVtbnM6IFtdIH07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIGhwYXJhbUNvbHVtbnM6IHRoaXMuX2hwYXJhbXMubWFwKChocGFyYW0pID0+ICh7CiAgICAgICAgICAgICAgICAgICAgaHBhcmFtSW5mbzogaHBhcmFtLmluZm8sCiAgICAgICAgICAgICAgICB9KSksCiAgICAgICAgICAgICAgICBtZXRyaWNDb2x1bW5zOiB0aGlzLl9tZXRyaWNzLm1hcCgobWV0cmljKSA9PiAoewogICAgICAgICAgICAgICAgICAgIG1ldHJpY0luZm86IG1ldHJpYy5pbmZvLAogICAgICAgICAgICAgICAgfSkpLAogICAgICAgICAgICB9OwogICAgICAgIH0KICAgICAgICBfdXBkYXRlQ29uZmlndXJhdGlvbigpIHsKICAgICAgICAgICAgdGhpcy5kZWJvdW5jZSgnX3VwZGF0ZUNvbmZpZ3VyYXRpb24nLCAoKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLmNvbmZpZ3VyYXRpb24gPSB7CiAgICAgICAgICAgICAgICAgICAgc2NoZW1hOiB0aGlzLl9jb21wdXRlU2NoZW1hKCksCiAgICAgICAgICAgICAgICAgICAgY29sdW1uc1Zpc2liaWxpdHk6IHRoaXMuX2NvbXB1dGVDb2x1bW5zVmlzaWJpbGl0eSgpLAogICAgICAgICAgICAgICAgICAgIHZpc2libGVTY2hlbWE6IHRoaXMuX2NvbXB1dGVWaXNpYmxlU2NoZW1hKCksCiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgX2NvbXB1dGVDb2x1bW5zVmlzaWJpbGl0eSgpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLl9ocGFyYW1zIHx8ICF0aGlzLl9tZXRyaWNzKQogICAgICAgICAgICAgICAgcmV0dXJuIFtdOwogICAgICAgICAgICByZXR1cm4gdGhpcy5faHBhcmFtcwogICAgICAgICAgICAgICAgLm1hcCgoaHBhcmFtKSA9PiBocGFyYW0uZGlzcGxheWVkKQogICAgICAgICAgICAgICAgLmNvbmNhdCh0aGlzLl9tZXRyaWNzLm1hcCgobWV0cmljKSA9PiBtZXRyaWMuZGlzcGxheWVkKSk7CiAgICAgICAgfQogICAgICAgIF9jb21wdXRlVmlzaWJsZVNjaGVtYSgpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLl9ocGFyYW1zIHx8ICF0aGlzLl9tZXRyaWNzKSB7CiAgICAgICAgICAgICAgICByZXR1cm4geyBocGFyYW1JbmZvczogW10sIG1ldHJpY0luZm9zOiBbXSB9OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNvbnN0IG5ld0hQYXJhbUluZm9zID0gdGhpcy5faHBhcmFtcwogICAgICAgICAgICAgICAgLmZpbHRlcigoaHBhcmFtKSA9PiBocGFyYW0uZGlzcGxheWVkKQogICAgICAgICAgICAgICAgLm1hcCgoaHBhcmFtKSA9PiBocGFyYW0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gICAgaWYgKCF0aGlzLl9ocGFyYW1zIHx8ICF0aGlzLl9tZXRyaWNzKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3NlbmRMaXN0U2Vzc2lvbkdyb3Vwc1JlcXVlc3QoKS50aGVuKHRoaXMuX2xpc3RTZXNzaW9uR3JvdXBzQ2FuY2VsbGVyLmNhbmNlbGxhYmxlKCh7IHZhbHVlLCBjYW5jZWxsZWQgfSkgPT4gewogICAgICAgICAgICAgICAgaWYgKGNhbmNlbGxlZCkgewogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vIFRoZSBzZXJ2ZXIgbWF5IG5vdCBzdXBwb3J0IGEgInRvdGFsU2l6ZSIgZmllbGQgaW4KICAgICAgICAgICAgICAgIC8vIHdoaWNoIGNhc2UgdGhpcyBmaWVsZCB3b3VsZCBiZSBuZWdhdGl2ZSwgYW5kIHdlCiAgICAgICAgICAgICAgICAvLyBwb3B1bGF0ZSB0aGUgcGFnZSBjb3VudCB3aXRoIGEgIj8iLgogICAgICAgICAgICAgICAgaWYgKHZhbHVlLnRvdGFsU2l6ZSA+PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgY29uc3QgcGFnZVNpemUgPSArdGhpcy5fcGFnZVNpemVJbnB1dC52YWx1ZTsKICAgICAgICAgICAgICAgICAgICB0aGlzLnNldCgnX3BhZ2VDb3VudFN0cicsIFN0cmluZyhNYXRoLmNlaWwodmFsdWUudG90YWxTaXplIC8gcGFnZVNpemUpKSk7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXQoJ190b3RhbFNlc3Npb25Hcm91cHNDb3VudFN0cicsIHZhbHVlLnRvdGFsU2l6ZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLnNldCgnX3BhZ2VDb3VudFN0cicsICc/Jyk7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXQoJ190b3RhbFNlc3Npb25Hcm91cHNDb3VudFN0cicsICdVbmtub3duJyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBzZXRBcnJheU9ic2VydmFibHkodGhpcywgJ3Nlc3Npb25Hcm91cHMnLCB2YWx1ZS5zZXNzaW9uR3JvdXBzKTsKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICBfc2VuZExpc3RTZXNzaW9uR3JvdXBzUmVxdWVzdCgpIHsKICAgICAgICAgICAgY29uc3QgcmVxdWVzdCA9IHRoaXMuX2J1aWxkTGlzdFNlc3Npb25Hcm91cHNSZXF1ZXN0KCk7CiAgICAgICAgICAgIGlmIChyZXF1ZXN0ID09PSBudWxsKSB7CiAgICAgICAgICAgICAgICAvLyBJZiBxdWVyeSBjb25maWd1cmF0aW9uIGlzIG5vdCB2YWxpZCBkb24ndCBzZW5kIGEgcmVxdWVzdC4KICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLnNldCgnX3Nlc3Npb25Hcm91cHNSZXF1ZXN0JywgcmVxdWVzdCk7CiAgICAgICAgICAgIC8vIE5vdGUgdGhhdCB0aGUgcmVzcG9uc2VzIHRvIHRoZSBSUENzIHNlbnQKICAgICAgICAgICAgLy8gdG8gdGhlIGJhY2tlbmQgbWF5IHJldHVybiBpbiBhIGRpZmZlcmVudCBvcmRlciB0aGFuIHRoZSBvcmRlciBpbgogICAgICAgICAgICAvLyB3aGljaCB0aGV5IHdlcmUgc2VudC4gSWYgd2UganVzdCB1cGRhdGUgc2Vzc2lvbkdyb3VwcyBpbiB0aGUKICAgICAgICAgICAgLy8gb3JkZXIgb2YgcmVzcG9uc2VzIHJlY2VpdmVkLCB3ZSBjYW4gZW5kIHVwCiAgICAgICAgICAgIC8vIHdpdGggYSBzZXNzaW9uR3JvdXBzIG9iamVjdCB0aGF0IG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5WYWx1ZVN0ciA9PT0gJycgPyAnLUluZmluaXR5JyA6ICttaW5WYWx1ZVN0cjsKICAgICAgICAgICAgICAgIF90aGlzLnNldChpbnB1dEludGVydmFsUGF0aCArICcubWluLmludmFsaWQnLCBpc05hTihtaW5WYWx1ZSkpOwogICAgICAgICAgICAgICAgcXVlcnlWYWxpZCA9IHF1ZXJ5VmFsaWQgJiYgIWlzTmFOKG1pblZhbHVlKTsKICAgICAgICAgICAgICAgIGNvbnN0IG1heFZhbHVlU3RyID0gX3RoaXMuZ2V0KGlucHV0SW50ZXJ2YWxQYXRoICsgJy5tYXgudmFsdWUnKTsKICAgICAgICAgICAgICAgIGNvbnNvbGUuYXNzZXJ0KG1heFZhbHVlU3RyICE9PSB1bmRlZmluZWQpOwogICAgICAgICAgICAgICAgY29uc3QgbWF4VmFsdWUgPSBtYXhWYWx1ZVN0ciA9PT0gJycgPyAnSW5maW5pdHknIDogK21heFZhbHVlU3RyOwogICAgICAgICAgICAgICAgX3RoaXMuc2V0KGlucHV0SW50ZXJ2YWxQYXRoICsgJy5tYXguaW52YWxpZCcsIGlzTmFOKG1heFZhbHVlKSk7CiAgICAgICAgICAgICAgICBxdWVyeVZhbGlkID0gcXVlcnlWYWxpZCAmJiAhaXNOYU4obWF4VmFsdWUpOwogICAgICAgICAgICAgICAgaWYgKGlzTmFOKG1pblZhbHVlKSB8fCBpc05hTihtYXhWYWx1ZSkpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiB7IG1pblZhbHVlOiBtaW5WYWx1ZSwgbWF4VmFsdWU6IG1heFZhbHVlIH07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gUGFyc2VzIHRoZSB2YWx1ZSBvZiBhbiBpbnB1dCBvYmplY3Qgb2YgdGhlIGZvcm06CiAgICAgICAgICAgIC8vIHt2YWx1ZTogc3RyaW5nLCBpbnZhbGlkOiBib29sZWFufS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ICAgICAgICAgICAgICBpZiAodmFsaWRSZXN1bHQpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gQnVpbGQgdGhlIGFsbG93ZWQgc3RhdHVzIGZpbHRlcnMuCiAgICAgICAgICAgIGNvbnN0IGFsbG93ZWRTdGF0dXNlcyA9IHRoaXMuX3N0YXR1c2VzCiAgICAgICAgICAgICAgICAuZmlsdGVyKChzKSA9PiBzLmFsbG93ZWQpCiAgICAgICAgICAgICAgICAubWFwKChzKSA9PiBzLnZhbHVlKTsKICAgICAgICAgICAgbGV0IGNvbFBhcmFtcyA9IFtdOwogICAgICAgICAgICAvLyBCdWlsZCB0aGUgaHBhcmFtcyBmaWx0ZXJzIGluIHRoZSByZXF1ZXN0LgogICAgICAgICAgICB0aGlzLl9ocGFyYW1zLmZvckVhY2goKGhwYXJhbSwgaW5kZXgpID0+IHsKICAgICAgICAgICAgICAgIGxldCBjb2xQYXJhbSA9IHsgaHBhcmFtOiBocGFyYW0uaW5mby5uYW1lIH07CiAgICAgICAgICAgICAgICBpZiAoaHBhcmFtLmZpbHRlci5kb21haW5EaXNjcmV0ZSkgewogICAgICAgICAgICAgICAgICAgIGNvbFBhcmFtLmZpbHRlckRpc2NyZXRlID0gW107CiAgICAgICAgICAgICAgICAgICAgaHBhcmFtLmZpbHRlci5kb21haW5EaXNjcmV0ZS5mb3JFYWNoKChmaWx0ZXJWYWwpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGZpbHRlclZhbC5jaGVja2VkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xQYXJhbS5maWx0ZXJEaXNjcmV0ZS5wdXNoKGZpbHRlclZhbC52YWx1ZSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKGhwYXJhbS5maWx0ZXIuaW50ZXJ2YWwpIHsKICAgICAgICAgICAgICAgICAgICBjb2xQYXJhbS5maWx0ZXJJbnRlcnZhbCA9IHBhcnNlSW5wdXRJbnRlcnZhbCgnX2hwYXJhbXMuJyArIGluZGV4ICsgJy5maWx0ZXIuaW50ZXJ2YWwnKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKGhwYXJhbS5maWx0ZXIucmVnZXhwKSB7CiAgICAgICAgICAgICAgICAgICAgY29sUGFyYW0uZmlsdGVyUmVnZXhwID0gaHBhcmFtLmZpbHRlci5yZWdleHA7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKCdocGFyYW0uZmlsdGVyIHdpdGggbm8gZG9tYWluRGlzY3JldGUsIGludGVydmFsIG9yIHJlZ2V4cCcgKwogICAgICAgICAgICAgICAgICAgICAgICAnIHByb3BlcnRpZXMgc2V0OiAlcycsIGhwYXJhbSk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjb2xQYXJhbXMucHVzaChjb2xQYXJhbSk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICAvLyBCdWlsZCB0aGUgbWV0cmljIGZpbHRlcnMgaW4gdGhlIHJlcXVlc3QuCiAgICAgICAgICAgIHRoaXMuX21ldHJpY3MuZm9yRWFjaCgobWV0cmljLCBpbmRleCkgPT4gewogICAgICAgICAgICAgICAgbGV0IGNvbFBhcmFtID0gewogICAgICAgICAgICAgICAgICAgIG1ldHJpYzogbWV0cmljLmluZm8ubmFtZSwKICAgICAgICAgICAgICAgICAgICBmaWx0ZXJJbnRlcnZhbDogcGFyc2VJbnB1dEludGVydmFsKCdfbWV0cmljcy4nICsgaW5kZXggKyAnLmZpbHRlci5pbnRlcnZhbCcpLAogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIGNvbFBhcmFtcy5wdXNoKGNvbFBhcmFtKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIC8vIFNvcnRpbmcuCiAgICAgICAgICAgIC8vIFRPRE8oZXJleik6IFN1cHBvcnQgc29ydGluZyBieSBtdWx0aXBsZSBjb2x1bW5zLgogICAgICAgICAgICBpZiAodGhpcy5fc29ydEJ5SW5kZXggIT09IHVuZGVmaW5lZCAmJiB0aGlzLl9zb3J0RGlyZWN0aW9uICE9PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgICAgIGlmICghKHRoaXMuX3NvcnRCeUluZGV4IGluIGNvbFBhcmFtcykpIHsKICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKCdObyBjb2x1bW4gaW4gY29sUGFyYW1zIHdpdGggaW5kZXggc29ydEJ5SW5kZXg6ICVzJywgdGhpcy5fc29ydEJ5SW5kZXgpOwogICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgY29sUGFyYW1zW3RoaXMuX3NvcnRCeUluZGV4XS5vcmRlciA9CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fc29ydERpcmVjdGlvbiA9PT0gMCA/ICdPUkRFUl9BU0MnIDogJ09SREVSX0RFU0MnOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIFBhZ2luZy4KICAgICAgICAgICAgY29uc3QgcGFnZU51bSA9IHBhcnNlSW5wdXRBc1Bvc2l0aXZlSW50KCdfcGFnZU51bWJlcklucHV0Jyk7CiAgICAgICAgICAgIGNvbnN0IHBhZ2VTaXplID0gcGFyc2VJbnB1dEFzUG9zaXRpdmVJbnQoJ19wYWdlU2l6ZUlucHV0Jyk7CiAgICAgICAgICAgIGlmICghcXVlcnlWYWxpZCkgewogICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAg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XV0iCiAgICAgICAgICAgICAgPgogICAgICAgICAgICAgICAgPHBhcGVyLWNoZWNrYm94CiAgICAgICAgICAgICAgICAgIGNoZWNrZWQ9Int7aXRlbS5jaGVja2VkfX0iCiAgICAgICAgICAgICAgICAgIGNsYXNzPSJkaXNjcmV0ZS12YWx1ZS1jaGVja2JveCIKICAgICAgICAgICAgICAgICAgb24tY2hhbmdlPSJfcXVlcnlTZXJ2ZXIiCiAgICAgICAgICAgICAgICA+CiAgICAgICAgICAgICAgICAgIFtbX3ByZXR0eVByaW50KGl0ZW0udmFsdWUpXV0KICAgICAgICAgICAgICAgIDwvcGFwZXItY2hlY2tib3g+CiAgICAgICAgICAgICAgPC90ZW1wbGF0ZT4KICAgICAgICAgICAgPC90ZW1wbGF0ZT4KICAgICAgICAgICAgPCEtLSAyLiBBIG51bWVyaWMgaW50ZXJ2YWwgLS0+CiAgICAgICAgICAgIDx0ZW1wbGF0ZSBpcz0iZG9tLWlmIiBpZj0iW1tocGFyYW0uZmlsdGVyLmludGVydmFsXV0iPgogICAgICAgICAgICAgIDxwYXBlci1pbnB1dAogICAgICAgICAgICAgICAgbGFiZWw9Ik1pbiIKICAgICAgICAgICAgICAgIHZhbHVlPSJ7e2hwYXJhbS5maWx0ZXIuaW50ZXJ2YWwubWluLnZhbHVlfX0iCiAgICAgICAgICAgICAgICBhbGxvd2VkX3BhdHRlcm49IlswLTkuZVxcLV0iCiAgICAgICAgICAgICAgICBvbi12YWx1ZS1jaGFuZ2VkPSJfcXVlcnlTZXJ2ZXIiCiAgICAgICAgICAgICAgICBlcnJvci1tZXNzYWdlPSJJbnZhbGlkIGlucHV0IgogICAgICAgICAgICAgICAgaW52YWxpZD0iW1tocGFyYW0uZmlsdGVyLmludGVydmFsLm1pbi5pbnZhbGlkXV0iCiAgICAgICAgICAgICAgICBwbGFjZWhvbGRlcj0iLWluZmluaXR5IgogICAgICAgICAgICAgID4KICAgICAgICAgICAgICA8L3BhcGVyLWlucHV0PgogICAgICAgICAgICAgIDxwYXBlci1pbnB1dAogICAgICAgICAgICAgICAgbGFiZWw9Ik1heCIKICAgICAgICAgICAgICAgIHZhbHVlPSJ7e2hwYXJhbS5maWx0ZXIuaW50ZXJ2YWwubWF4LnZhbHVlfX0iCiAgICAgICAgICAgICAgICBhbGxvd2VkX3BhdHRlcm49IlswLTkuZVxcLV0iCiAgICAgICAgICAgICAgICBvbi12YWx1ZS1jaGFuZ2VkPSJfcXVlcnlTZXJ2ZXIiCiAgICAgICAgICAgICAgICBlcnJvci1tZXNzYWdlPSJJbnZhbGlkIGlucHV0IgogICAgICAgICAgICAgICAgaW52YWxpZD0iW1tocGFyYW0uZmlsdGVyLmludGVydmFsLm1heC5pbnZhbGlkXV0iCiAgICAgICAgICAgICAgICBwbGFjZWhvbGRlcj0iK2luZmluaXR5IgogICAgICAgICAgICAgID4KICAgICAgICAgICAgICA8L3BhcGVyLWlucHV0PgogICAgICAgICAgICA8L3RlbXBsYXRlPgogICAgICAgICAgICA8IS0tIDMuIEEgcmVnZXhwIC0tPgogICAgICAgICAgICA8dGVtcGxhdGUgaXM9ImRvbS1pZiIgaWY9IltbaHBhcmFtLmZpbHRlci5yZWdleHBdXSI+CiAgICAgICAgICAgICAgPHBhcGVyLWlucHV0CiAgICAgICAgICAgICAgICBsYWJlbD0iUmVndWxhciBleHByZXNzaW9uIgogICAgICAgICAgICAgICAgdmFsdWU9Int7aHBhcmFtLmZpbHRlci5yZWdleHB9fSIKICAgICAgICAgICAgICAgIG9uLXZhbHVlLWNoYW5nZWQ9Il9xdWVyeVNlcnZlciIKICAgICAgICAgICAgICA+CiAgICAgICAgICAgICAgPC9wYXBlci1pbnB1dD4KICAgICAgICAgICAgPC90ZW1wbGF0ZT4KICAgICAgICAgIDwvZGl2PgogICAgICAgIDwvdGVtcGxhdGU+CiAgICAgIDwvZGl2PgogICAgICA8ZGl2IHNsb3Q9ImNvbnRlbnQiIGNsYXNzPSJzZWN0aW9uIG1ldHJpY3MiPgogICAgICAgIDxkaXYgY2xhc3M9InNlY3Rpb24tdGl0bGUiPk1ldHJpY3M8L2Rpdj4KICAgICAgICA8dGVtcGxhdGUgaXM9ImRvbS1yZXBlYXQiIGl0ZW1zPSJ7e19tZXRyaWNzfX0iIGFzPSJtZXRyaWMiPgogICAgICAgICAgPGRpdiBjbGFzcz0ibWV0cmljIj4KICAgICAgICAgICAgPCEtLSBUT0RPKGVyZXopOiBNYWtlIGl0IGVhc2llciB0byBoYW5kbGUgYSBsYXJnZSBudW1iZXIgb2YKICAgICAgICAgICAgICAgICAgbWV0cmljczoKICAgICAgICAgICAgICAgICAgMS4gQWRkIGFuICdpc29sYXRvcicgcmFkaW8tYnV0dG9uIHRvIHNlbGVjdCBqdXN0IG9uZQogICAgICAgICAgICAgICAgICBtZXRyaWMgYW5kCiAgICAgICAgICAgICAgICAgIGhpZGUgYWxsIHRoZSByZXN0CiAgICAgICAgICAgICAgICAgIDIuIEFkZCBhICd0b2dnbGUtYWxsJyBidXR0b24gdGhhdCB3aWxsIGhpZGUvdW5oaWRlCiAgICAgICAgICAgICAgICAgICAgYWxsIHRoZQogICAgICAgICAgICAgICAgICBtZXRyaWNzLgogICAgICAgICAgICAgICAgICBVc2Ugc2ltaWxhciBsb2dpYy9hcHBlYXJhbmNlIHRvIHRoZSBydW4tc2VsZWN0b3Igb2YKICAgICAgICAgICAgICAgICAgc2NhbGFycy4tLT4KICAgICAgICAgICAgPHBhcGVyLWNoZWNrYm94CiAgICAgICAgICAgICAgY2hlY2tlZD0ie3ttZXRyaWMuZGlzcGxheWVkfX0iCiAgICAgICAgICAgICAgY2xhc3M9Im1ldHJpYy1jaGVja2JveCIKICAgICAgICAgICAgPgogICAgICAgICAgICAgIFtbX21ldHJpY05hbWUobWV0cmljLmluZm8pXV0KICAgICAgICAgICAgPC9wYXBlci1jaGVja2JveD4KICAgICAgICAgICAgPGRpdiBjbGFzcz0iaW5saW5lLWVsZW1lbnQiPgogICAgICAgICAgICAgIDxwYXBlci1pbnB1dAogICAgICAgICAgICAgICAgbGFiZWw9Ik1pbiIKICAgICAgICAgICAgICAgIHZhbHVlPSJ7e21ldHJpYy5maWx0ZXIuaW50ZXJ2YWwubWluLnZhbHVlfX0iCiAgICAgICAgICAgICAgICBhbGxvd2VkLXBhdHRlcm49IlswLTkuZVxcLV0iCiAgICAgICAgICAgICAgICBvbi12YWx1ZS1jaGFuZ2VkPSJfcXVlcnlTZXJ2ZXIiCiAgICAgICAgICAgICAgICBlcnJvci1tZXNzYWdlPSJJbnZhbGlkIGlucHV0IgogICAgICAgICAgICAgICAgaW52YWxpZD0ie3ttZXRyaWMuZmlsdGVyLmludGVydmFsLm1pbi5pbnZhbGlkfX0iCiAgICAgICAgICAgICAgICBwbGFjZWhvbGRlcj0iLWluZmluaXR5IgogICAgICAgICAgICAgID4KICAgICAgICAgICAgICA8L3BhcGVyLWlucHV0PgogICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgPGRpdiBjbGFzcz0iaW5saW5lLWVsZW1lbnQiPgogICAgICAgICAgICAgIDxwYXBlci1pbnB1dAogICAgICAgICAgICAgICAgbGFiZWw9Ik1heCIKICAgICAgICAgICAgICAgIGFsbG93ZWQtcGF0dGVybj0iWzAtOS5lXFwtXSIKICAgICAgICAgICAgICAgIHZhbHVlPSJ7e21ldHJpYy5maWx0ZXIuaW50ZXJ2YWwubWF4LnZhbHVlfX0iCiAgICAgICAgICAgICAgICBvbi12YWx1ZS1jaGFuZ2VkPSJfcXVlcnlTZXJ2ZXIiCiAgICAgICAgICAgICAgICBlcnJvci1tZXNzYWdlPSJJbnZhbGlkIGlucHV0IgogICAgICAgICAgICAgICAgaW52YWxpZD0ie3ttZXRyaWMuZmlsdGVyLmludGVydmFsLm1heC5pbnZhbGlkfX0iCiAgICAgICAgICAgICAgICBwbGFjZWhvbGRlcj0iK2luZmluaXR5IgogICAgICAgICAgICAgID4KICAgICAgICAgICAgICA8L3BhcGVyLWlucHV0PgogICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgI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AgICAgICAgICA8dGVtcGxhdGUgaXM9ImRvbS1yZXBlYXQiIGl0ZW1zPSJbW19ocGFyYW1zXV0iIGFzPSJocGFyYW0iPgogICAgICAgICAgICAgIDxwYXBlci1pdGVtPiBbW19ocGFyYW1OYW1lKGhwYXJhbS5pbmZvKV1dIDwvcGFwZXItaXRlbT4KICAgICAgICAgICAgPC90ZW1wbGF0ZT4KICAgICAgICAgICAgPHRlbXBsYXRlIGlzPSJkb20tcmVwZWF0IiBpdGVtcz0iW1tfbWV0cmljc11dIiBhcz0ibWV0cmljIj4KICAgICAgICAgICAgICA8cGFwZXItaXRlbT4gW1tfbWV0cmljTmFtZShtZXRyaWMuaW5mbyldXSA8L3BhcGVyLWl0ZW0+CiAgICAgICAgICAgIDwvdGVtcGxhdGU+CiAgICAgICAgICA8L3BhcGVyLWxpc3Rib3g+CiAgICAgICAgPC9wYXBlci1kcm9wZG93bi1tZW51PgogICAgICAgIDxwYXBlci1kcm9wZG93bi1tZW51CiAgICAgICAgICBsYWJlbD0iRGlyZWN0aW9uIgogICAgICAgICAgb24tc2VsZWN0ZWQtaXRlbS1jaGFuZ2VkPSJfcXVlcnlTZXJ2ZXIiCiAgICAgICAgICBob3Jpem9udGFsLWFsaWduPSJsZWZ0IgogICAgICAgID4KICAgICAgICAgIDxwYXBlci1saXN0Ym94CiAgICAgICAgICAgIGNsYXNzPSJkcm9wZG93bi1jb250ZW50IgogICAgICAgICAgICBzbG90PSJkcm9wZG93bi1jb250ZW50IgogICAgICAgICAgICBzZWxlY3RlZD0ie3tfc29ydERpcmVjdGlvbn19IgogICAgICAgICAgPgogICAgICAgICAgICA8cGFwZXItaXRlbT5Bc2NlbmRpbmc8L3BhcGVyLWl0ZW0+CiAgICAgICAgICAgIDxwYXBlci1pdGVtPkRlc2NlbmRpbmc8L3BhcGVyLWl0ZW0+CiAgICAgICAgICA8L3BhcGVyLWxpc3Rib3g+CiAgICAgICAgPC9wYXBlci1kcm9wZG93bi1tZW51PgogICAgICA8L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19IgogICAgICAgICAgICBhbGxvd2VkLXBhdHRlcm49IlswLTldIgogICAgICAgICAgICBlcnJvci1tZXNzYWdlPSJJbnZhbGlkIGlucHV0IgogICAgICAgICAgICBpbnZhbGlkPSJbW19wYWdlU2l6ZUlucHV0LmludmFsaWRdXSIKICAgICAgICAgICAgb24tdmFsdWUtY2hhbmdlZD0iX3F1ZXJ5U2VydmVyIgogICAgICAgICAgPgogICAgICAgICAgPC9wYXBlci1pbnB1dD4KICAgICAgICA8L2Rpdj4KICAgICAgPC9kaXY+CiAgICAgIDxkaXYgc2xvdD0iY29udGVudCIgY2xhc3M9InNlY3Rpb24gZG93bmxvYWQiPgogICAgICAgIDx0ZW1wbGF0ZSBpcz0iZG9tLWlmIiBpZj0iW1tfc2Vzc2lvbkdyb3Vwc1JlcXVlc3RdXSI+CiAgICAgICAgICBEb3dubG9hZCBkYXRhIGFzCiAgICAgICAgICA8c3Bhbj4KICAgICAgICAgICAgPGEKICAgICAgICAgICAgICBpZD0iY3N2TGluayIKICAgICAgICAgICAgICBkb3dubG9hZD0iaHBhcmFtc190YWJsZS5jc3YiCiAgICAgICAgICAgICAgaHJlZj0iW1tfY3N2VXJsKF9zZXNzaW9uR3JvdXBzUmVxdWVzdCwgY29uZmlndXJhdGlvbildXSIKICAgICAgICAgICAgICA+Q1NWPC9hCiAgICAgICAgICAgID4KICAgICAgICAgICAgPGEKICAgICAgICAgICAgICBpZD0ianNvbkxpbmsiCiAgICAgICAgICAgICAgZG93bmxvYWQ9ImhwYXJhbXNfdGFibGUuanNvbiIKICAgICAgICAgICAgICBocmVmPSJbW19qc29uVXJsKF9zZXNzaW9uR3JvdXBzUmVxdWVzdCwgY29uZmlndXJhdGlvbildXSIKICAgICAgICAgICAgICA+SlNPTjwvYQogICAgICAgICAgICA+CiAgICAgICAgICAgIDxhCiAgICAgICAgICAgICAgaWQ9ImxhdGV4TGluayIKICAgICAgICAgICAgICBkb3dubG9hZD0iaHBhcmFtc190YWJsZS50ZXgiCiAgICAgICAgICAgICAgaHJlZj0iW1tfbGF0ZXhVcmwoX3Nlc3Npb25Hcm91cHNSZXF1ZXN0LCBjb25maWd1cmF0aW9uKV1dIgogICAgICAgICAgICAgID5MYVRlWDwvYQogICAgICAgICAgICA+CiAgICAgICAgICA8L3NwYW4+CiAgICAgICAgPC90ZW1wbGF0ZT4KICAgICAgPC9kaXY+CiAgICA8L2hwYXJhbXMtc3BsaXQtbGF5b3V0PgogICAgPHN0eWxlPgogICAgICAuc2VjdGlvbiB7CiAgICAgICAgcGFkZGluZzogMTBweDsKICAgICAgfQogICAgICAuc2VjdGlvbi10aXRsZSB7CiAgICAgICAgZGlzcGxheTogYmxvY2s7CiAgICAgICAgZm9udC13ZWlnaHQ6IGJvbGQ7CiAgICAgICAgdGV4dC1kZWNvcmF0aW9uOiB1bmRlcmxpbmU7CiAgICAgICAgbWFyZ2luLWJvdHRvbTogN3B4OwogICAgICB9CiAgICAgIC5kaXNjcmV0ZS12YWx1ZS1jaGVja2JveCwKICAgICAgLm1ldHJpYy1jaGVja2JveCwKICAgICAgLmhwYXJhbS1jaGVja2JveCB7CiAgICAgICAgZGlzcGxheTogYmxvY2s7CiAgICAgIH0KICAgICAgLmRpc2NyZXRlLXZhbHVlLWNoZWNrYm94IHsKICAgICAgICBtYXJnaW4tbGVmdDogMjBweDsKICAgICAgfQogICAgICAuaHBhcmFtLAogICAgICAubWV0cmljIHsKICAgICAgICBkaXNwbGF5OiBibG9jazsKICAgICAgfQogICAgICAuaW5saW5lLWVsZW1lbnQgewogICAgICAgIGRpc3BsYXk6IGlubGluZS1ibG9jazsKICAgICAgICB3aWR0aDogNDAlOwogICAgICAgIG1hcmdpbi1sZWZ0OiAxMHB4OwogICAgICB9CiAgICAgIC5wYWdlLW51bWJlci1pbnB1dCB7CiAgICAgICAgd2lkdGg6IDIwJTsKICAgICAgfQogICAgICAucGFnZS1zaXplLWlucHV0IHsKICAgICAgICB3aWR0aDogNjAlOwogICAgICB9CiAgICAgIHZhYWRpbi1zcGxpdC1sYXlvdXQgewogICAgICAgIGhlaWdodDogMTAwJTsKICAgICAgfQogICAgICBwYXBlci1saXN0Ym94IHsKICAgICAgICBtYXgtaGVpZ2h0OiAxNWVtOwogICAgICB9CiAgICAgIC5wYWdlLXN1ZmZpeCB7CiAgICAgICAgd2hpdGUtc3BhY2U6IG5vd3JhcDsKICAgICAgfQogICAgPC9zdHlsZT4KICBgOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoeyB0eXBlOiBTdHJpbmcgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBTdHJpbmcpCiAgICBdLCBUZkhwYXJhbXNRdWVyeVBhbmUucHJvdG90eXBlLCAiZXhwZXJpbWVudE5hbWUiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBPYmplY3QsCiAgICAgICAgICAgIG5vdGlmeTogdHJ1ZSwKICAgICAgICB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIE9iamVjdCkKICAgIF0sIFRmSHBhcmFtc1F1ZXJ5UGFuZS5wcm90b3R5cGUsICJjb25maWd1cmF0aW9uIiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsKICAgICAgICAgICAgdHlwZTogQXJyYXksCiAgICAgICAgICAgIG5vdGlmeTogdHJ1ZSwKICAgICAgICB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIE9iamVjdCkKICAgIF0sIFRmSHBhcmFtc1F1ZXJ5UGFuZS5wcm90b3R5cGUsICJzZXNzaW9uR3JvdXBzIiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsKICAgICAgICAgICAgdHlwZTogQm9vbGVhbiwKICAgICAgICAgICAgbm90aWZ5OiB0cnVlLAogICAgICAgIH0pLAog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GNsYXNzIFRmSHBhcmFtc1NjYWxlQW5kQ29sb3JDb250cm9scyBleHRlbmRzIFBvbHltZXJFbGVtZW50IHsKICAgICAgICBjb25zdHJ1Y3RvcigpIHsKICAgICAgICAgICAgc3VwZXIoLi4uYXJndW1lbnRzKTsKICAgICAgICAgICAgdGhpcy5vcHRpb25zID0gbnVsbDsKICAgICAgICB9CiAgICAgICAgLyogUHJpdmF0ZSBtZXRob2RzICovCiAgICAgICAgX2NvbmZpZ3VyYXRpb25DaGFuZ2VkKCkgewogICAgICAgICAgICAvLyBQb3B1bGF0ZSBvcHRpb25zLmNvbHVtbnMgd2l0aCBhIGxpbmVhciBzY2FsZSBmb3IgZWFjaCBjb2x1bW4gKAogICAgICAgICAgICAvLyBocGFyYW0gb3IgbWV0cmljKS4KICAgICAgICAgICAgY29uc3QgdmlzaWJsZVNjaGVtYSA9IHRoaXMuY29uZmlndXJhdGlvbi52aXNpYmxlU2NoZW1hOwogICAgICAgICAgICBjb25zdCBzY2hlbWEgPSB0aGlzLmNvbmZpZ3VyYXRpb24uc2NoZW1hOwogICAgICAgICAgICBjb25zdCBuZXdIUGFyYW1Db2x1bW4gPSAoaW5mbywgaW5kZXgpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAgICAgbmFtZTogaHBhcmFtTmFtZShpbmZvKSwKICAgICAgICAgICAgICAgICAgICBpbmRleDogaW5kZXgsCiAgICAgICAgICAgICAgICAgICAgYWJzb2x1dGVJbmRleDogZ2V0QWJzb2x1dGVDb2x1bW5JbmRleChzY2hlbWEsIHZpc2libGVTY2hlbWEsIGluZGV4KSwKICAgICAgICAgICAgICAgICAgICBzY2FsZTogdGhpcy5faXNOdW1lcmljQ29sdW1uKGluZGV4KSA/ICdMSU5FQVInIDogJ05PTl9OVU1FUklDJywKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIGNvbnN0IG5ld01ldHJpY0NvbHVtbiA9IChpbmZvLCBpbmRleCkgPT4gewogICAgICAgICAgICAgICAgY29uc3QgY29sSW5kZXggPSBpbmRleCArIHZpc2libGVTY2hlbWEuaHBhcmFtSW5mb3MubGVuZ3RoOwogICAgICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgICAgICBzY2FsZTogJ0xJTkVBUicsCiAgICAgICAgICAgICAgICAgICAgbmFtZTogbWV0cmljTmFtZShpbmZvKSwKICAgICAgICAgICAgICAgICAgICBpbmRleDogY29sSW5kZXgsCiAgICAgICAgICAgICAgICAgICAgYWJzb2x1dGVJbmRleDogZ2V0QWJzb2x1dGVDb2x1bW5JbmRleChzY2hlbWEsIHZpc2libGVTY2hlbWEsIGNvbEluZGV4KSwKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIGNvbnN0IG9wdGlvbnMgPSB7CiAgICAgICAgICAgICAgICBjb2x1bW5zOiB2aXNpYmxlU2NoZW1hLmhwYXJhbUluZm9zCiAgICAgICAgICAgICAgICAgICAgLm1hcChuZXdIUGFyYW1Db2x1bW4pCiAgICAgICAgICAgICAgICAgICAgLmNvbmNhdCh2aXNpYmxlU2NoZW1hLm1ldHJpY0luZm9zLm1hcChuZXdNZXRyaWNDb2x1bW4pKSwKICAgICAgICAgICAgICAgIG1pbkNvbG9yOiAnIzAwMDBGRicsCiAgICAgICAgICAgICAgICBtYXhDb2xvcjogJyNGRjAwMDAnLAogICAgICAgICAgICAgICAgY29uZmlndXJhdGlvbjogdGhpcy5jb25maWd1cmF0aW9uLAogICAgICAgICAgICB9OwogICAgICAgICAgICAvLyBTZXQgdGhlIGNvbG9yQnlDb2x1bW5JbmRleCBwcm9wZXJ0eS4KICAgICAgICAgICAgLy8gSWYgd2Ugc2V0IG9wdGlvbnMuY29sb3JCeUNvbHVtbkluZGV4IGF0IHRoZSBzYW1lIHRpbWUgYXMgd2UKICAgICAgICAgICAgLy8gc2V0IHRoZSBvdGhlciBvcHRpb25zLCBQb2x5bWVyIG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AgICAgICAgICBmbHVzaCgpOwogICAgICAgICAgICB0aGlzLnNldCgnb3B0aW9ucy5jb2xvckJ5Q29sdW1uSW5kZXgnLCB0aGlzLl9kZWZhdWx0Q29sb3JCeUNvbHVtbkluZGV4KCkpOwogICAgICAgIH0KICAgICAgICBfdW5zZWxlY3REaXNhYmxlZExvZ1NjYWxlcygpIHsKICAgICAgICAgICAgaWYgKHRoaXMub3B0aW9ucyA9PT0gbnVsbCkgewogICAgICAgICAgICAgICAgLy8gV2UgbWF5IGJlIGNhbGxlZCBiZWZvcmUgdGhlIG9wdGlvbnMgYXJlIGNvbnN0cnVjdGVkIGJ5CiAgICAgICAgICAgICAgICAvLyBfY29uZmlndXJhdGlvbkNoYW5nZWQoKS4gSW4gdGhpcyBjYXNlIHdlIG5lZWQgbm90IHdvcnJ5CiAgICAgICAgICAgICAgICAvLyBhYm91dCBzZWxlY3RlZCBkaXNhYmxlZCBsb2cgc2NhbGVzLgogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMub3B0aW9ucy5jb2x1bW5zLmZvckVhY2goKGNvbCkgPT4gewogICAgICAgICAgICAgICAgY29uc3QgY29sUGF0aCA9ICdvcHRpb25zLmNvbHVtbnMuJyArIGNvbC5pbmRleDsKICAgICAgICAgICAgICAgIGlmICghdGhpcy5fYWxsb3dMb2dTY2FsZShjb2wpICYmIGNvbC5zY2FsZSA9PT0gJ0xPRycpIHsKICAgICAgICAgICAgICAgICAgICAvLyBXZSBuZWVkIHRvIHVzZSBQb2x5bWVyIHBhdGhzIHRvIG1ha2UgdGhlIGNoYW5nZSBvYnNlcnZhYmxlLgogICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0KGNvbFBhdGggKyAnLnNjYWxlJywgJ0xJTkVBUicpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgX2FsbG93TG9nU2NhbGUoY29sdW1uKSB7CiAgICAgICAgICA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IHRoZSBmaXJzdAogICAgICAgIC8vIG51bWVyaWMgaHBhcmFtIGlmIHRoZXJlIGFyZSBocGFyYW1zLiBJZiB0aGVyZSBhcmUgbm8gbnVtZXJpYyBjb2x1bW5zCiAgICAgICAgLy8gcmV0dXJuIHVuZGVmaW5lZC4KICAgICAgICBfZGVmYXVsdENvbG9yQnlDb2x1bW5JbmRleCgpIHsKICAgICAgICAgICAgaWYgKHRoaXMuY29uZmlndXJhdGlvbi52aXNpYmxlU2NoZW1hLm1ldHJpY0luZm9zLmxlbmd0aCA+IDApIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmNvbmZpZ3VyYXRpb24udmlzaWJsZVNjaGVtYS5ocGFyYW1JbmZvcy5sZW5ndGg7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY29uc3QgaSA9IHRoaXMuY29uZmlndXJhdGlvbi52aXNpYmxlU2NoZW1hLmhwYXJhbUluZm9zLmZpbmRJbmRleCgoaW5mbykgPT4gaW5mby50eXBlID09PSAnREFUQV9UWVBFX0ZMT0FUNjQnKTsKICAgICAgICAgICAgaWYgKGkgIT09IC0xKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gaTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkOwogICAgICAgIH0KICAgIH07CiAgICBUZkhwYXJhbXNTY2FsZUFuZENvbG9yQ29udHJvbHMudGVtcGxhdGUgPSBodG1sIGAKICAgIDxkaXYgY2xhc3M9ImNvbnRyb2wtcGFuZWwiPgogICAgICA8IS0tICdDb2xvciBieScgZHJvcCBkb3duIG1lbnUgLS0+CiAgICAgIDxwYXBlci1kcm9wZG93bi1tZW51CiAgICAgICAgbGFiZWw9IkNvbG9yIGJ5IgogICAgICAgIGlkPSJjb2xvckJ5RHJvcERvd25NZW51IgogICAgICAgIGhvcml6b250YWwtYWxpZ249ImxlZnQiCiAgICAgID4KICAgICAgICA8cGFwZXItbGlzdGJveAogICAgICAgICAgY2xhc3M9ImRyb3Bkb3duLWNvbnRlbnQiCiAgICAgICAgICBzbG90PSJkcm9wZG93bi1jb250ZW50IgogICAgICAgICAgc2VsZWN0ZWQ9Int7b3B0aW9ucy5jb2xvckJ5Q29sdW1uSW5kZXh9fSIKICAgICAgICAgIGlkPSJjb2xvckJ5TGlzdEJveCIKICAgICAgICA+CiAgICAgICAgICA8dGVtcGxhdGUKICAgICAgICAgICAgaXM9ImRvbS1yZXBlYXQiCiAgICAgICAgICAgIGl0ZW1zPSJbW29wdGlvbnMuY29sdW1uc11dIgogICAgICAgICAgICBhcz0iY29sdW1uIgogICAgICAgICAgICBpZD0iY29sb3JCeUNvbHVtblRlbXBsYXRlIgogICAgICAgICAgPgogICAgICAgICAgICA8cGFwZXItaXRlbSBkaXNhYmxlZD0iW1shX2lzTnVtZXJpY0NvbHVtbihjb2x1bW4uaW5kZXgpXV0iPgogICAgICAgICAgICAgIFtbY29sdW1uLm5hbWVdXQogICAgICAgICAgICA8L3BhcGVyLWl0ZW0+CiAgICAgICAgICA8L3RlbXBsYXRlPgogICAgICAgIDwvcGFwZXItbGlzdGJveD4KICAgICAgPC9wYXBlci1kcm9wZG93bi1tZW51PgoKICAgICAgPCEtLSBDb2x1bW5zIHNjYWxlcyAtLT4KICAgICAgPGRpdiBjbGFzcz0iY29sdW1ucy1jb250YWluZXIiPgogICAgICAgIDwhLS0gU2NhbGUgb3B0aW9ucyBmb3IgZWFjaCBudW1lcmljIGZlYXR1cmUgLS0+CiAgICAgICAgPHRlbXBsYXRlIGlzPSJkb20tcmVwZWF0IiBpdGVtcz0ie3tvcHRpb25zLmNvbHVtbnN9fSIgYXM9ImNvbHVtbiI+CiAgICAgICAgICA8dGVtcGxhdGUgaXM9ImRvbS1pZiIgaWY9IltbX2lzTnVtZXJpY0NvbHVtbihjb2x1bW4uaW5kZXgpXV0iPgogICAgICAgICAgICA8ZGl2IGNsYXNzPSJjb2x1bW4iPgogICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImNvbHVtbi10aXRsZSI+W1tjb2x1bW4ubmFtZV1dPC9kaXY+CiAgICAgICAgICAgICAgPGRpdj4KICAgICAgICAgICAgICAgIDxwYXBlci1yYWRpby1ncm91cAogICAgICAgICAgICAgICAgICBjbGFzcz0ic2NhbGUtcmFkaW8tZ3JvdXAiCiAgICAgICAgICAgICAgICAgIHNlbGVjdGVkPSJ7e2NvbHVtbi5zY2FsZX19IgogICAgICAgICAgICAgICAgPgogICAgICAgICAgICAgICAgICA8cGFwZXItcmFkaW8tYnV0dG9uIG5hbWU9IkxJTkVBUiI+CiAgICAgICAgICAgICAgICAgICAgTGluZWFyCiAgICAgICAgICAgICAgICAgIDwvcGFwZXItcmFkaW8tYnV0dG9uPgogICAgICAgICAgICAgICAgICA8IS0tIFRoZSBpZCBoZXJlIGlzIHVzZWQgdG8gYWNjZXNzIHRoaXMgYnV0dG9uIGluIHVuaXQKICAgICAgICAgICAgICAgICAgICAgICB0ZXN0cy4tLT4KICAgICAgICAgICAgICAgICAgPHBhcGVyLXJhZGlvLWJ1dHRvbgogICAgICAgICAgICAgICAgICAgIGlkPSJsb2dTY2FsZUJ1dHRvbl9bW2NvbHVtbi5uYW1lXV0iCiAgICAgICAgICAgICAgICAgICAgbmFtZT0iTE9HIgogICAgICAgICAgICAgICAgICAgIGRpc2FibGVkPSJbWyFfYWxsb3dMb2dTY2FsZShjb2x1bW4sIHNlc3Npb25Hcm91cHMuKildXSIKICAgICAgICAgICAgICAgICAgPgogICAgICAgICAgICAgICAgICAgIExvZ2FyaXRobWljCiAgICAgICAgICAgICAgICAgIDwvcGFwZXItcmFkaW8tYnV0dG9uPgogICAgICAgICAgICAgICAgICA8cGFwZXItcmFkaW8tYnV0dG9uIG5hbWU9IlFVQU5USUxFIj4KICAgICAgICAgICAgICAgICAgICBRdWFudGlsZQogICAgICAgICAgICAgICAgICA8L3BhcGVyLXJhZGlvLWJ1dHRvbj4KICAgICAgICAgICAgICAgIDwvcGFwZXItcmFkaW8tZ3JvdXA+CiAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgPC90ZW1wbGF0ZT4KICAgICAgICA8L3RlbXBsYXRlPgogICAgICA8L2Rpdj4KICAgIDwvZGl2PgoKICAgIDxzdHlsZT4KICAgICAgOmhvc3QgewogICAgICAgIGRpc3BsYXk6IGJsb2NrOwogICAgICB9CiAgICAgIC5jb250cm9sLXBhbmVsIHsKICAgICAgICBvdmVyZmxvdzogYXV0bzsKICAgICAgfQogICAgICAuY29sdW1uIHsKICAgICAgICBmbGV4LWdyb3c6IDE7CiAgICAgICAgZmxleC1zaHJpbms6IDE7CiAgICAgICAgbWFyZ2luLXJpZ2h0OiA1cHg7CiAgICAgICAgYm9yZGVyOiBzb2xpZCAxcHggZGFya2dyYXk7CiAgICAgICAgcGFkZGluZzogM3B4OwogICAgICB9CiAgICAgIC5jb2x1bW4tdGl0bGUgewogICAgICAgIC8qIEZpdCBldmVyeSB0aXRsZSBpbiBvbmUgbGluZSBzbyB0aGUgcmFkaW8gYm94ZXMgYWxpZ24gdmVydGljYWxseS4gKi8KICAgICAgICB3aGl0ZS1zcGFjZTogbm93cmFwOwogICAgICAgIHRleHQtZGVjb3JhdGlvbjogdW5kZXJsaW5lOwogICAgICB9CiAgICAgIC5jb2x1bW5zLWNvbnRhaW5lciB7CiAgICAgICAgZGlzcGxheTogZmxleDsKICAgICAgICBmbGV4LWRpcmVjdGlvbjogcm93OwogICAgICB9CiAgICAgIC5zY2FsZS1yYWRpby1ncm91cCBwYXBlci1yYWRpby1idXR0b24gewogICAgICAgIHBhZGRpbmc6IDJweDsKICAgICAgICBkaXNwbGF5OiBibG9jazsKICAgICAgfQogICAgICBwYXBlci1saXN0Ym94IHsKICAgICAgICBtYXgtaGVpZ2h0OiAxNWVtOwogICAgICB9CiAgICA8L3N0eWxlPgogIGA7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7IHR5cGU6IE9iamVjdCB9KSwKICAgICAgICBfX21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6IGhzbGEoMTQ1LCA2NSUsIDQyJSwgMC41KTsKICAgICAgICAtLWx1bW8tc3VjY2Vzcy1jb2xvci0xMHBjdDogaHNsYSgxNDUsIDY1JSwgNDIlLCAwLjEpOwogICAgICAgIC0tbHVtby1zdWNjZXNzLXRleHQtY29sb3I6IGhzbCgxNDUsIDg1JSwgNDclKTsKICAgICAgfQoKICAgICAgaHRtbCB7CiAgICAgICAgY29sb3I6IHZhcigtLWx1bW8tYm9keS10ZXh0LWNvbG9yKTsKICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiB2YXIoLS1sdW1vLWJhc2UtY29sb3IpOwogICAgICB9CgogICAgICBbdGhlbWV+PSJkYXJrIl0gewogICAgICAgIGNvbG9yOiB2YXIoLS1sdW1vLWJvZHktdGV4dC1jb2xvcik7CiAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogdmFyKC0tbHVtby1iYXNlLWNvbG9yKTsKICAgICAgfQoKICAgICAgaDEsCiAgICAgIGgyLAogICAgICBoMywKICAgICAgaDQsCiAgICAgIGg1LAogICAgICBoNiB7CiAgICAgICAgY29sb3I6IHZhcigtLWx1bW8taGVhZGVyLXRleHQtY29sb3IpOwogICAgICB9CgogICAgICBhIHsKICAgICAgICBjb2xvcjogdmFyKC0tbHVtby1wcmltYXJ5LXRleHQtY29sb3IpOwogICAgICB9CgogICAgICBibG9ja3F1b3RlIHsKICAgICAgICBjb2xvcjogdmFyKC0tbHVtby1zZWNvbmRhcnktdGV4dC1jb2xvcik7CiAgICAgIH0KCiAgICAgIGNvZGUsCiAgICAgIHByZSB7CiAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogdmFyKC0tbHVtby1jb250cmFzdC0xMHBjdCk7CiAgICAgICAgYm9yZGVyLXJhZGl1czogdmFyKC0tbHVtby1ib3JkZXItcmFkaXVzLW0pOwogICAgICB9CiAgICA8L3N0eWxlPgogIDwvdGVtcGxhdGU+CjwvZG9tLW1vZHVsZT48ZG9tLW1vZHVsZSBpZD0ibH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ICAgLS1sdW1vLWljb25zLWNoZXZyb24tcmlnaHQ6ICJcXGVhMTIiOwogICAgICAtLWx1bW8taWNvbnMtY2hldnJvbi11cDogIlxcZWExMyI7CiAgICAgIC0tbHVtby1pY29ucy1jbG9jazogIlxcZWExNCI7CiAgICAgIC0tbHVtby1pY29ucy1jb2c6ICJcXGVhMTUiOwogICAgICAtLWx1bW8taWNvbnMtY3Jvc3M6ICJcXGVhMTYiOwogICAgICAtLWx1bW8taWNvbnMtZG93bmxvYWQ6ICJcXGVhMTciOwogICAgICAtLWx1bW8taWNvbnMtZHJvcGRvd246ICJcXGVhMTgiOwogICAgICAtLWx1bW8taWNvbnMtZWRpdDogIlxcZWExOSI7CiAgICAgIC0tbHVtby1pY29ucy1lcnJvcjogIlxcZWExYSI7CiAgICAgIC0tbHVtby1pY29ucy1leWU6ICJcXGVhMWIiOwogICAgICAtLWx1bW8taWNvbnMtZXllLWRpc2FibGVkOiAiXFxlYTFjIjsKICAgICAgLS1sdW1vLWljb25zLW1lbnU6ICJcXGVhMWQiOwogICAgICAtLWx1bW8taWNvbnMtbWludXM6ICJcXGVhMWUiOwogICAgICAtLWx1bW8taWNvbnMtb3JkZXJlZC1saXN0OiAiXFxlYTFmIjsKICAgICAgLS1sdW1vLWljb25zLXBob25lOiAiXFxlYTIwIjsKICAgICAgLS1sdW1vLWljb25zLXBob3RvOiAiXFxlYTIxIjsKICAgICAgLS1sdW1vLWljb25zLXBsYXk6ICJcXGVhMjIiOwogICAgICAtLWx1bW8taWNvbnMtcGx1czogIlxcZWEyMyI7CiAgICAgIC0tbHVtby1pY29ucy1yZWRvOiAiXFxlYTI0IjsKICAgICAgLS1sdW1vLWljb25zLXJlbG9hZDogIlxcZWEyNSI7CiAgICAgIC0tbHVtby1pY29ucy1zZWFyY2g6ICJcXGVhMjYiOwogICAgICAtLWx1bW8taWNvbnMtdW5kbzogIlxcZWEyNyI7CiAgICAgIC0tbHVtby1pY29ucy11bm9yZGVyZWQtbGlzdDogIlxc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5pbm5lckhUTUwgPSBgPGN1c3RvbS1zdHlsZT4KICA8c3R5bGU+CiAgICBodG1sIHsKICAgICAgLyogRm9udCBmYW1pbGllcyAqLwogICAgICAtLWx1bW8tZm9udC1mYW1pbHk6IC1hcHBsZS1zeXN0ZW0sIEJsaW5rTWFjU3lzdGVtRm9udCwgIlJvYm90byIsICJTZWdvZSBVSSIsIEhlbHZldGljYSwgQXJpYWwsIHNhbnMtc2VyaWYsICJBcHBsZSBDb2xvciBFbW9qaSIsICJTZWdvZSBVSSBFbW9qaSIsICJTZWdvZSBVSSBTeW1ib2wiOwoKICAgICAgLyogRm9udCBzaXplcyAqLwogICAgICAtLWx1bW8tZm9udC1zaXplLXh4czogLjc1cmVtOwogICAgICAtLWx1bW8tZm9udC1zaXplLXhzOiAuODEyNXJlbTsKICAgICAgLS1sdW1vLWZvbnQtc2l6ZS1zOiAuODc1cmVtOwogICAgICAtLWx1bW8tZm9udC1zaXplLW06IDFyZW07CiAgICAgIC0tbHVtby1mb250LXNpemUtbDogMS4xMjVyZW07CiAgICAgIC0tbHVtby1mb250LXNpemUteGw6IDEuMzc1cmVtOwogICAgICAtLWx1bW8tZm9udC1zaXplLXh4bDogMS43NXJlbTsKICAgICAgLS1sdW1vLWZvbnQtc2l6ZS14eHhsOiAyLjVyZW07CgogICAgICAvKiBMaW5lIGhlaWdodHMgKi8KICAgICAgLS1sdW1vLWxpbmUtaGVpZ2h0LXhzOiAxLjI1OwogICAgICAtLWx1bW8tbGluZS1oZWlnaHQtczogMS4zNzU7CiAgICAgIC0tbHVtby1saW5lLWhlaWdodC1tOiAxLjYyNTsKICAgIH0KCiAgPC9zdHlsZT4KPC9jdXN0b20tc3R5bGU+PGRvbS1tb2R1bGUgaWQ9Imx1bW8tdHlwb2dyYXBoeSI+CiAgPHRlbXBsYXRlPgogICAgPHN0eWxlPgogICAgICBodG1sIHsKICAgICAgICBmb250LWZhbWlseTogdmFyKC0tbHVtby1mb250LWZhbWlseSk7CiAgICAgICAgZ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XNpemUteHMiXSB7CiAgICAgICAgZm9udC1zaXplOiB2YXIoLS1sdW1vLWZvbnQtc2l6ZS14cyk7CiAgICAgICAgbGluZS1oZWlnaHQ6IHZhcigtLWx1bW8tbGluZS1oZWlnaHQteHMpOwogICAgICB9CgogICAgICBoMSwKICAgICAgaDIsCiAgICAgIGgzLAogICAgICBoNCwKICAgICAgaDUsCiAgICAgIGg2IHsKICAgICAgICBmb250LXdlaWdodDogNjAwOwogICAgICAgIGxpbmUtaGVpZ2h0OiB2YXIoLS1sdW1vLWxpbmUtaGVpZ2h0LXhzKTsKICAgICAgICBtYXJnaW4tdG9wOiAxLjI1ZW07CiAgICAgIH0KCiAgICAgIGgxIHsKICAgICAgICBmb250LXNpemU6IHZhcigtLWx1bW8tZm9udC1zaXplLXh4eGwpOwogICAgICAgIG1hcmdpbi1ib3R0b206IDAuNzVlbTsKICAgICAgfQoKICAgICAgaDIgewogICAgICAgIGZvbnQtc2l6ZTogdmFyKC0tbHVtby1mb250LXNpemUteHhsKTsKICAgICAgICBtYXJnaW4tYm90dG9tOiAwLjVlbTsKICAgICAgfQoKICAgICAgaDMgewogICAgICAgIGZvbnQtc2l6ZTogdmFyKC0tbHVtby1mb250LXNpemUteGwpOwogICAgICAgIG1hcmdpbi1ib3R0b206IDAuNWVtOwogICAgICB9CgogICAgICBoNCB7CiAgICAgICAgZm9udC1zaXplOiB2YXIoLS1sdW1vLWZvbnQtc2l6ZS1sKTsKICAgICAgICBtYXJnaW4tYm90dG9tOiAwLjVlbTsKICAgICAgfQoKICAgICAgaDUgewogICAgICAgIGZvbnQtc2l6ZTogdmFyKC0tbHVtby1mb250LXNpemUtbSk7CiAgICAgICAgbWFyZ2luLWJvdHRvbTogMC4yNWVtOwogICAgICB9CgogICAgICBoNiB7CiAgICAgICAgZm9udC1zaXplOiB2YXIoLS1sdW1vLWZvbnQtc2l6ZS14cyk7CiAgICAgICAgbWFyZ2luLWJvdHRvbTogMDsKICAgICAgICB0ZXh0LXRyYW5zZm9ybTogdXBwZXJjYXNlOwogICAgICAgIGxldHRlci1zcGFjaW5nOiAwLjAzZW07CiAgICAgIH0KCiAgICAgIHAsCiAgICAgIGJsb2NrcXVvdGUgewogICAgICAgIG1hcmdpbi10b3A6IDAuNWVtOwogICAgICAgIG1hcmdpbi1ib3R0b206IDAuNzVlbTsKICAgICAgfQoKICAgICAgYSB7CiAgICAgICAgdGV4dC1kZWNvcmF0aW9uOiBub25lOwogICAgICB9CgogICAgICBhOmhvdmVyIHsKICAgICAgICB0ZXh0LWRlY29yYXRpb246IHVuZGVybGluZTsKICAgICAgfQoKICAgICAgaHIgewogICAgICAgIGRpc3BsYXk6IGJsb2NrOwogICAgICAgIGFsaWduLXNlbGY6IHN0cmV0Y2g7CiAgICAgICAgaGVpZ2h0OiAxcHg7CiAgICAgICAgYm9yZGVyOiAwOwogICAgICAgIHBhZGRpbmc6IDA7CiAgICAgICAgbWFyZ2luOiB2YXIoLS1sdW1vLXNwYWNlLXMpIGNhbGModmFyKC0tbHVtby1ib3JkZXItcmFkaXVzLW0pIC8gMik7CiAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogdmFyKC0tbHVtby1jb250cmFzdC0xMHBjdCk7CiAgICAgIH0KCiAgICAgIGJsb2NrcXVvdGUgewogICAgICAgIGJvcmRlci1sZWZ0OiAycHggc29saWQgdmFyKC0tbHVtby1jb250cmFzdC0zMHBjdCk7CiAgICAgIH0KCiAgICAgIGIsCiAgICAgIHN0cm9uZyB7CiAgICAgICAgZm9udC13ZWlnaHQ6IDYwMDsKICAgICAgfQoKICAgICAgLyogUlRMIHNwZWNpZmljIHN0eWxlcyAqLwoKICAgICAgYmxvY2txdW90ZVtkaXI9InJ0bCJdIHsKICAgICAgICBib3JkZXItbGVmdDogbm9uZTsKICAgICAgICBib3JkZXItcmlnaHQ6IDJweCBzb2xpZCB2YXIoLS1sdW1vLWNvbnRyYXN0LTMwcGN0KTsKICAgICAgfQoKICAgIDwvc3R5bGU+CiAgPC90ZW1wb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kdGg6IGNhbGMoMWVtICsgMnB4KTsKICAgICAgICBoZWlnaHQ6IGNhbGMoMWVtICsgMnB4KTsKICAgICAgICBtYXJnaW46IDAuMTg3NWVtOwogICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTsKICAgICAgICBib3JkZXItcmFkaXVzOiB2YXIoLS1sdW1vLWJvcmRlci1yYWRpdXMtcyk7CiAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogdmFyKC0tbHVtby1jb250cmFzdC0yMHBjdCk7CiAgICAgICAgdHJhbnNpdGlvbjogdHJhbnNmb3JtIDAuMnMgY3ViaWMtYmV6aWVyKC4xMiwgLjMyLCAuNTQsIDIpLCBiYWNrZ3JvdW5kLWNvbG9yIDAuMTVzOwogICAgICAgIHBvaW50ZXItZXZlbnRzOiBub25lOwogICAgICAgIGxpbmUtaGVpZ2h0OiAxLjI7CiAgICAgIH0KCiAgICAgIDpob3N0KFtpbmRldGVybWluYXRlXSkgW3BhcnQ9ImNoZWNrYm94Il0sCiAgICAgIDpob3N0KFtjaGVja2VkXSkgW3BhcnQ9ImNoZWNrYm94Il0gewogICAgICAgIGJhY2tncm91bmQtY29sb3I6IHZhcigtLWx1bW8tcHJpbWFyeS1jb2xvcik7CiAgICAgIH0KCiAgICAgIC8qIE5lZWRlZCB0byBhbGlnbiB0aGUgY2hlY2tib3ggbmljZWx5IG9uIHRoZSBiYXNlbGluZSAqLwogICAgICBbcGFydD0iY2hlY2tib3giXTo6YmVmb3JlIHsKICAgICAgICBjb250ZW50OiAiXFwyMDAzIjsKICAgICAgfQoKICAgICAgLyogQ2hlY2ttYXJrICovCiAgICAgIFtwYXJ0PSJjaGVja2JveCJdOjphZnRlciB7CiAgICAgICAgY29udGVudDogIiI7CiAgICAgICAgZGlzcGxheTogaW5saW5lLWJsb2NrOwogICAgICAgIHdpZHRoOiAwOwogICAgICAgIGhlaWdodDogMDsKICAgICAgICBib3JkZXI6IDAgc29saWQgdmFyKC0tbHVtby1wcmltYXJ5LWNvbnRyYXN0LWNvbG9yKTsKICAgICAgICBib3JkZXItd2lkdGg6IDAuMTg3NWVtIDAgMCAwLjE4NzVlbTsKICAgICAgICBib3gtc2l6aW5nOiBib3JkZXItYm94OwogICAgICAgIHRyYW5zZm9ybS1vcmlnaW46IDAgMDsKICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7CiAgICAgICAgdG9wOiAwLjgxMjVlbTsKICAgICAgICBsZWZ0OiAwLjVlbTsKICAgICAgICB0cmFuc2Zvcm06IHNjYWxlKDAuNTUpIHJvdGF0ZSgtMTM1ZGVnKTsKICAgICAgICBvcGFjaXR5OiAwOwogICAgICB9CgogICAgICA6aG9zdChbY2hlY2tlZF0pIFtwYXJ0PSJjaGVja2JveCJdOjphZnRlciB7CiAgICAgICAgb3BhY2l0eTogMTsKICAgICAgICB3aWR0aDogMC42MjVlbTsKICAgICAgICBoZWlnaHQ6IDEuMDYyNWVtOwogICAgICB9CgogICAgICAvKiBJbmRldGVybWluYXRlIGNoZWNrbWFyayAqLwoKICAgICAgOmhvc3QoW2luZGV0ZXJtaW5hdGVdKSBbcGFydD0iY2hlY2tib3giXTo6YWZ0ZXIgewogICAgICAgIHRyYW5zZm9ybTogbm9uZTsKICAgICAgICBvcGFjaXR5OiAxOwogICAgICAgIHRvcDogNDUlOwogICAgICAgIGhlaWdodDogMTAlOwogICAgICAgIGxlZnQ6IDIyJTsKICAgICAgICByaWdodDogMjIlOwogICAgICAgIHdpZHRoOiBhdXRvOwogICAgICAgIGJvcmRlcjogMDsKICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiB2YXIoLS1sdW1vLXByaW1hcnktY29udHJhc3QtY29sb3IpOwogICAgICAgIHRyYW5zaXRpb246IG9wYWNpdHkgMC4yNXM7CiAgICAgIH0KCiAgICAgIC8qIEZvY3VzIHJpbmcgKi8KCiAgICAgIDpob3N0KFtmb2N1cy1yaW5nXSkgW3BhcnQ9ImNoZWNrYm94Il0gewogICAgICAgIGJveC1zaGFkb3c6ID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2V0IHByb3BlcnRpZXMoKSB7CiAgICAgICAgcmV0dXJuIHsKICAgICAgICAgIC8qKgogICAgICAgICAgICogSGVscGVyIHByb3BlcnR5IHdpdGggdGhlbWUgYXR0cmlidXRlIHZhbHVlIGZhY2lsaXRhdGluZyBwcm9wYWdhdGlvbgogICAgICAgICAgICogaW4gc2hhZG93IERPTS4KICAgICAgICAgICAqCiAgICAgICAgICAgKiBFbmFibGVzIHRoZSBjb21wb25lbnQgaW1wbGVtZW50YXRpb24gdG8gcHJvcGFnYXRlIHRoZSBgdGhlbWVgCiAgICAgICAgICAgKiBhdHRyaWJ1dGUgdmFsdWUgdG8gdGhlIHN1YmNvbXBvbmVudHMgaW4gU2hhZG93IERPTSBieSBiaW5kaW5nCiAgICAgICAgICAgKiB0aGUgc3ViY29tcG9uZW504oCZcyAidGhlbWUiIGF0dHJpYnV0ZSB0byB0aGUgYHRoZW1lYCBwcm9wZXJ0eSBvZgogICAgICAgICAgICogdGhlIGhvc3QuCiAgICAgICAgICAgKgogICAgICAgICAgICogKipOT1RFOioqIEV4dGVuZGluZyB0aGUgbWl4aW4gb25seSBwcm92aWRlcyB0aGUgcHJvcGVydHkgZm9yIGJpbmRpbmcsCiAgICAgICAgICAgKiBhbmQgZG9lcyBub3QgbWFrZSB0aGUgcHJvcGFnYXRpb24gYWxvbmUuCiAgICAgICAgICAgKgogICAgICAgICAgICogU2VlIFtUaGVtZSBBdHRyaWJ1dGUgYW5kIFN1YmNvbXBvbmVudHNdKGh0dHBzOi8vZ2l0aHViLmNvbS92YWFkaW4vdmFhZGluLXRoZW1hYmxlLW1peGluL3dpa2kvNS4tVGhlbWUtQXR0cmlidXRlLWFuZC1TdWJjb21wb25lbnRzKS4KICAgICAgICAgICAqIHBhZ2UgZm9yIG1vcmUgaW5mb3JtYXRpb24uCiAgICAgICAgICAgKgogICAgICAgICAgICogQHByb3RlY3RlZAogICAgICAgICAgICovCiAgICAgICAgICB0aGVtZTogewogICAgICAgICAgICB0eXBlOiB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QgdmFhZGluQiA9IG1vZHVsZU5hbWVCLmluZGV4T2YoJ3ZhYWRpbi0nKSA9PT0gMDsKCiAgICAgICAgICAgIGNvbnN0IHZhYWRpblRoZW1lUHJlZml4ZXMgPSBbJ2x1bW8tJywgJ21hdGVyaWFsLSddOwogICAgICAgICAgICBjb25zdCB2YWFkaW5UaGVtZUEgPSB2YWFkaW5UaGVtZVByZWZpeGVzLmZpbHRlcihwcmVmaXggPT4gbW9kdWxlTmFtZUEuaW5kZXhPZihwcmVmaXgpID09PSAwKS5sZW5ndGggPiAwOwogICAgICAgICAgICBjb25zdCB2YWFkaW5UaGVtZUIgPSB2YWFkaW5UaGVtZVByZWZpeGVzLmZpbHRlcihwcmVmaXggPT4gbW9kdWxlTmFtZUIuaW5kZXhPZihwcmVmaXgpID09PSAwKS5sZW5ndGggPiAwOwoKICAgICAgICAgICAgaWYgKHZhYWRpbkEgIT09IHZhYWRpbkIpIHsKICAgICAgICAgICAgICAvLyBJbmNsdWRlIHZhYWRpbiBjb3JlIHN0eWxlcyBmaXJzdAogICAgICAgICAgICAgIHJldHVybiB2YWFkaW5BID8gLTEgOiAxOwogICAgICAgICAgICB9IGVsc2UgaWYgKHZhYWRpblRoZW1lQSAhPT0gdmFhZGluVGhlbWVCKSB7CiAgICAgICAgICAgICAgLy8gSW5jbHVkZSB2YWFkaW4gdGhlbWUgc3R5bGVzIGFmdGVyIHRoYXQKICAgICAgICAgICAgICByZXR1cm4gdmFhZGluVGhlbWVBID8gLTEgOiAxOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgIC8vIExhc3RseSBpbmNsdWRlIGN1c3RvbSBzdHlsZXMgc28gdGhleSBvdmVycmlkZSBhbGwgdmFhZGluIHN0eWxlcwogICAgICAgICAgICAgIHJldHVybiAwOwogICAgICAgICAgICB9CiAgICAgICAgICB9KQogICAgICAgICAgLmZvckVhY2gobW9kdWxlTmFtZSA9PiB7CiAgICAgICAgICAgIGlmIChtb2R1bGVOYW1lICE9PSBkZWZhdWx0TW9kdWxlTmFtZSkgewogICAgICAgICAgICAgIGNvbnN0IHRoZW1lRm9yID0gbW9kdWxlc1ttb2R1bGVOYW1lXS5nZXRBdHRyaWJ1dGUoJ3RoZW1lLWZvcicpOwogICAgICAgICAgICAgIGlmICh0aGVtZUZvcikgewogICAgICAgICAgICAgICAgdGhlbWVGb3Iuc3BsaXQoJyAnKS5mb3JFYWNoKHRoZW1lRm9yVG9rZW4gPT4gewogICAgICAgICAgICAgICAgICBpZiAobmV3IFJlZ0V4cCgnXicgKyB0aGVtZUZvclRva2VuLnNwbGl0KCcqJykuam9pbignLionKSArICckJykudGVzdCh0aGlzLmlzKSkgewogICAgICAgICAgICAgICAgICAgIGhhc1RoZW1lcyA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5faW5jbHVkZVN0eWxlKG1vZHVsZU5hbWUsIHRlbXBsYXRlKTsKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICB9KTsKCiAgICAgICAgaWYgKCFoYXNUaGVtZXMgJiYgbW9kdWxlc1tkZWZhdWx0TW9kdWxlTmFtZV0pIHsKICAgICAgICAgIC8vIE5vIHRoZW1lIG1vZHVsZXMgZm91bmQsIGluY2x1ZGUgdGhlIGRlZmF1bHQgbW9kdWxlIGlmIGl0IGV4aXN0cwogICAgICAgICAgdGhpcy5faW5jbHVkZVN0eWxlKGRlZmF1bHRNb2R1bGVOYW1lLCB0ZW1wbGF0ZSk7CiAgICAgICAgfQogICAgICB9CgogICAgICAvKiogQHByaXZhdGUgKi8KICAgICAgc3RhdGljIF9pbmNsdWRlU3R5bGUobW9kdWxlTmFtZSwgdGVtcGxhdGUpIHsKICAgICAgICBpZiAodGVtcGxhdGUgJiYgIXRlbXBsYXRlLmNvbnRlbnQucXVlcnlTZWxlY3Rvcihgc3R5bGVbaW5jbHVkZT0iJHttb2R1bGVOYW1lfSJdYCk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ykgewogICAgICBzdGF0aWMgZ2V0IHByb3BlcnRpZXMoKSB7CiAgICAgICAgcmV0dXJuIHsKICAgICAgICAgIC8qKgogICAgICAgICAgICogU3BlY2lmeSB0aGF0IHRoaXMgY29udHJvbCBzaG91bGQgaGF2ZSBpbnB1dCBmb2N1cyB3aGVuIHRoZSBwYWdlIGxvYWRzLgogICAgICAgICAgICovCiAgICAgICAgICBhdXRvZm9jdXM6IHsKICAgICAgICAgICAgdHlwZTogQm9vbGVhbgogICAgICAgICAgfSwKCiAgICAgICAgICAvKioKICAgICAgICAgICAqIFN0b3JlcyB0aGUgcHJldmlvdXMgdmFsdWUgb2YgdGFiaW5kZXggYXR0cmlidXRlIG9mIHRoZSBkaXNhYmxlZCBlbGVtZW50CiAgICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAgICovCiAgICAgICAgICBfcHJldmlvdXNUYWJJbmRleDogewogICAgICAgICAgICB0eXBlOiBOdW1iZXIKICAgICAgICAgIH0sCgogICAgICAgICAgLyoqCiAgICAgICAgICAgKiBJZiB0cnVlLCB0aGUgdXNlciBjYW5ub3QgaW50ZXJhY3Qgd2l0aCB0aGlzIGVsZW1lbnQuCiAgICAgICAgICAgKi8KICAgICAgICAgIGRpc2FibGVkOiB7CiAgICAgICAgICAgIHR5cGU6IEJvb2xlYW4sCiAgICAgICAgICAgIG9ic2VydmVyOiAnX2Rpc2FibGVkQ2hhbmdlZCcsCiAgICAgICAgICAgIHJlZmxlY3RUb0F0dHJpYnV0ZTogdHJ1ZQogICAgICAgICAgfSwKCiAgICAgICAgICAvKioKICAgICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICAgKi8KICAgICAgICAgIF9pc1NoaWZ0VGFiYmluZzogewogICAgICAgICAgICB0eXBlOiBCb29sZWFuCiAgICAgICAgICB9CiAgICAgICAgfTsKICAgICAgfQoKICAgICAgLyoqCiAgICAgICAqIEBwcm90ZWN0ZWQKICAgICAgICovCiAgICAgIHJlYWR5KCkgewogICAgICAgIHR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nVlOwogICAgICAgICAgICAgIEhUTUxFbGVtZW50LnByb3RvdHlwZS5mb2N1cy5hcHBseSh0aGlzKTsKICAgICAgICAgICAgICB0aGlzLl9zZXRGb2N1c2VkKGZhbHNlKTsKICAgICAgICAgICAgICAvLyBFdmVudCBoYW5kbGluZyBpbiBJRSBpcyBhc3luY2hyb25vdXMgYW5kIHRoZSBmbGFnIGlzIHJlbW92ZWQgYXN5bmNocm9ub3VzbHkgYXMgd2VsbAogICAgICAgICAgICAgIHNldFRpbWVvdXQoKCkgPT4gdGhpcy5faXNTaGlmdFRhYmJpbmcgPSBmYWxzZSwgMCk7CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgLy8gV29ya2Fyb3VuZCBmb3IgRkY2My02NSBidWcgdGhhdCBjYXVzZXMgdGhlIGZvY3VzIHRvIGdldCBsb3N0IHdoZW4KICAgICAgICAgICAgICAvLyBibHVycmluZyBhIHNsb3R0ZWQgY29tcG9uZW50IHdpdGggZm9jdXNhYmxlIHNoYWRvdyByb290IGNvbnRlbnQKICAgICAgICAgICAgICAvLyBodHRwczovL2J1Z3ppbGxhLm1vemlsbGEub3JnL3Nob3dfYnVnLmNnaT9pZD0xNTI4Njg2CiAgICAgICAgICAgICAgLy8gVE9ETzogUmVtb3ZlIHdoZW4gc2FmZQogICAgICAgICAgICAgIGNvbnN0IGZpcmVmb3ggPSB3aW5kb3cubmF2aWdhdG9yLnVzZXJBZ2VudC5tYXRjaCgvRmlyZWZveFwvKFxkXGRcLlxkKS8pOwogICAgICAgICAgICAgIGlmIChmaXJlZm94CiAgICAgICAgICAgICAgICAmJiBwYXJzZUZsb2F0KGZpcmVmb3hbMV0pID49IDYzCiAgICAgICAgICAgICAgICAmJiBwYXJzZUZsb2F0KGZpcmVmb3hbMV0pIDwgNjYKICAgICAgICAgICAgICAgICYmIHRoaXMucGFyZW50Tm9kZQogICAgICAgICAgICAgICAgJiYgdGhpcy5uZXh0U2libGluZykgewogICAgICAgICAgICAgIC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SBmYWxzZTsKICAgICAgfQoKICAgICAgLyoqCiAgICAgICAqIEFueSBlbGVtZW50IGV4dGVuZGluZyB0aGlzIG1peGluIGlzIHJlcXVpcmVkIHRvIGltcGxlbWVudCB0aGlzIGdldHRlci4KICAgICAgICogSXQgcmV0dXJucyB0aGUgYWN0dWFsIGZvY3VzYWJsZSBlbGVtZW50IGluIHRoZSBjb21wb25lbnQuCiAgICAgICAqIEByZXR1cm4ge0VsZW1lbnQgfCBudWxsIHwgdW5kZWZpbmVkfQogICAgICAgKi8KICAgICAgZ2V0IGZvY3VzRWxlbWVudCgpIHsKICAgICAgICB3aW5kb3cuY29uc29sZS53YXJuKGBQbGVhc2UgaW1wbGVtZW50IHRoZSAnZm9jdXNFbGVtZW50JyBwcm9wZXJ0eSBpbiA8JHt0aGlzLmxvY2FsTmFtZX0+YCk7CiAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgIH0KCiAgICAgIC8qKgogICAgICAgKiBAcHJvdGVjdGVkCiAgICAgICAqLwogICAgICBfZm9jdXMoKSB7CiAgICAgICAgaWYgKCF0aGlzLmZvY3VzRWxlbWVudCB8fCB0aGlzLl9pc1NoaWZ0VGFiYmluZykgewogICAgICAgICAgcmV0dXJuOwogICAgICAgIH0KCiAgICAgICAgdGhpcy5mb2N1c0VsZW1lbnQuZm9jdXMoKTsKICAgICAgICB0aGlzLl9zZXRGb2N1c2VkKHRydWUpOwogICAgICB9CgogICAgICAvKioKICAgICAgICogTW92aW5nIHRoZSBmb2N1cyBmcm9tIHRoZSBob3N0IGVsZW1lbnQgY2F1c2VzIGZpcmluZyBvZiB0aGUgYmx1ciBldmVudCB3aGF0IGxlYWRzIHRvIHByb2JsZW1zIGluIElFLgogICAgICAgKiBAcHJpdmF0ZQogICAgICAgKi8KICAgICAgZm9jdXMoKSB7CiAgICAgICAgaWYgKCF0aGlzLmZvY3VzRWxlbWVudCB8fCB0aGlzLmRpc2FibGVkKSB7CiAgICAgICAgICByZXR1cm47CiAgICAgICAgfQoKICAgICAgICB0aGlzLmZvY3VzRWxlbWVudC5mb2N1cygpOwogICAgICAgIHRoaXMuX3NldEZvY3VzZWQodHJ1ZSk7CiAgICAgIH0KCiAgICAgIC8qKgogICAgICAgKiBOYXRpdmUgYmx1cmluZyBpbiB0aGUgaG9zdCBlbGVtZW50IGRvZXMgbm90aGluZyBiZWNhdXNlIGl0IGRvZXMgbm90IGhhdmUgdGhlIGZvY3VzLgogICAgICAgKiBJbiBjaHJvbWUgaXQgd29ya3MsIGJ1dCBub3QgaW4gRkYuCiAgICAgICAqIEBwcml2YXRlCiAgICAgICAqLwogICAgICBibHVyKCkgewogICAgICAgIGlmICghdGhpcy5mb2N1c0VsZW1lbnQpIHsKICAgICAgICAgIHJldHVybjsKICAgICAgICB9CiAgICAgICAgdGhpcy5mb2N1c0VsZW1lbnQuYmx1cigpOwogICAgICAgIHRoaXMuX3NldEZvY3VzZWQoZmFsc2UpOwogICAgICB9CgogICAgICAvKioKICAgICAgICogQHBhcmFtIHtib29sZWFufSBkaXNhYmxlZAogICAgICAgKiBAcHJpdmF0ZQogICAgICAgKi8KICAgICAgX2Rpc2FibGVkQ2hhbmdlZChkaXNhYmxlZCkgewogICAgICAgIHRoaXMuZm9jdXNFbGVtZW50LmRpc2FibGVkID0gZGlzYWJsZWQ7CiAgICAgICAgaWYgKGRpc2FibGVkKSB7CiAgICAgICAgICB0aGlzLmJsdXIoKTsKICAgICAgICAgIHRoaXMuX3ByZXZpb3VzVGFiSW5kZXggPSB0aGlzLnRhYmluZGV4OwogICAgICAgICAgdGhpcy50YWJpbmRleCA9IC0xOwogICAgICAgICAgdGhpcy5zZXRBdHRyaWJ1dGUoJ2FyaWEtZGlzYWJsZWQnLCAndHJ1ZScpOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICBpZiAodHlwZW9mIHRoaXMuX3ByZXZpb3VzVGFiSW5kZXggIT09ICd1bmRlZmluZWQnKSB7CiAgICAgICAgICAgIHRoaXMudGFiaW5kZXggPSB0aGlzLl9wcmV2aW91c1RhYkluZGV4OwogICAgICAgICAgfQogICAgICAgICAgdGhpcy5yZW1vdmVBdHRyaWJ1dGUoJ2FyaWEtZGlzYWJsZWQnKTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIC8qKgogICAgICAgKiBAcGFyYW0ge251bWJlciB8IG51bGwgfCB1bmRlZmluZWR9IHRhYmluZGV4CiAgICAgICAqIEBwcml2YXRlCiAgICAgICAqLwogICAgICBfdGFiaW5kZXhDaGFuZ2VkKHRhYmluZGV4KSB7CiAgICAgICAgaWYgKHRhYmluZGV4ICE9PSB1bmRlZmluZWQpIHsKICAgICAgICAgIHRoaXMuZm9jdXNFbGVtZW50LnRhYkluZGV4ID0gdGFiaW5kZXg7CiAgICAgICAgfQoKICAgICAgICBpZiAodGhpcy5kaXNhYmxlZCAmJiB0aGlzLnRhYmluZGV4KSB7CiAgICAgICAgICAvLyBJZiB0YWJpbmRleCBhdHRyaWJ1dGUgd2FzIGNoYW5nZWQgd2hpbGUgY2hlY2tib3ggd2FzIGRpc2FibGVkCiAgICAgICAgICBpZiAodGhpcy50YWJpbmRleCAhPT0gLTEpIHsKICAgICAgICAgICAgdGhpcy5fcHJldmlvdXNUYWJJbmRleCA9IHRoaXMudGFiaW5kZXg7CiAgICAgICAgICB9CiAgICAgICAgICB0aGlzLnRhYmluZGV4ID0gdGFiaW5kZXggPSB1bmRlZmluZWQ7CiAgICAgICAgfQoKICAgICAgICBpZiAod2luZG93LlNoYWR5RE9NKSB7CiAgICAgICAgICB0aGlzLnNldFByb3BlcnRpZXMoe3RhYkluZGV4OiB0YWJpbmRleCwgdGFiaW5kZXg6IHRhYmluZGV4fSk7CiAgICAgICAgfQogICAgICB9CgogICAgICAvKioKICAgICAgICogQHByb3RlY3RlZAogICAgICAgKi8KICAgICAgY2xpY2soKSB7CiAgICAgICAgaWYgKCF0aGlzLmRpc2FibGVkKSB7CiAgICAgICAgICBzdXBlci5jbGljaygpOwogICAgICAgIH0KICAgICAgfQog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VWX01PREVfQ09ERV9SRUdFWFAgPQogICAgICAvXC9cKlwqXHMrdmFhZGluLWRldi1tb2RlOnN0YXJ0KFtcc1xTXSopdmFhZGluLWRldi1tb2RlOmVuZFxzK1wqXCpcLy9pOwoKICAgIGNvbnN0IEZsb3dDbGllbnRzID0gd2luZG93LlZhYWRpbiAmJiB3aW5kb3cuVmFhZGluLkZsb3cgJiYgd2luZG93LlZhYWRpbi5GbG93LmNsaWVudHM7CgogICAgZnVuY3Rpb24gaXNNaW5pZmllZCgpIHsKICAgICAgZnVuY3Rpb24gdGVzdCgpIHsKICAgICAgICAvKiogdmFhZGluLWRldi1tb2RlOnN0YXJ0CiAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgIHZhYWRpbi1kZXYtbW9kZTplbmQgKiovCiAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgIH0KICAgICAgcmV0dXJuIHVuY29tbWVudEFuZFJ1bih0ZXN0KTsKICAgIH0KCiAgICBmdW5jdGlvbiBpc0RldmVsb3BtZW50TW9kZSgpIHsKICAgICAgdHJ5IHsKICAgICAgICBpZiAoaXNGb3JjZWREZXZlbG9wbWVudE1vZGUoKSkgewogICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgfQoKICAgICAgICBpZiAoIWlzTG9jYWxob3N0KCkpIHsKICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICB9CgogICAgICAgIGlmIChGbG93Q2xpZW50cykgewogICAgICAgICAgcmV0dXJuICFpc0Zsb3dQcm9kdWN0aW9uTW9kZSgpOwogICAgICAgIH0KCiAgICAgICAgcmV0dXJuICFpc01pbmlmaWVkKCk7CiAgICAgIH0gY2F0Y2ggKGUpIHsKICAgICAgICAvLyBTb21lIGVycm9yIGluIHRoaXMgY29kZSwgYXNzdW1lIHByb2R1Y3Rpb24gc28gbm8gZnVydGhlciBhY3Rpb25zIHdpbGwgYmUgdGFrZW4KICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgIH0KICAgIH0KC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zdGF0aWNQcm9wcyk7CiAgICAgICAgcmV0dXJuIENvbnN0cnVjdG9yOwogICAgICB9OwogICAgfSgpOwoKICAgIHZhciBnZXRQb2x5bWVyVmVyc2lvbiA9IGZ1bmN0aW9uIGdldFBvbHltZXJWZXJzaW9uKCkgewogICAgICByZXR1cm4gd2luZG93LlBvbHltZXIgJiYgd2luZG93LlBvbHltZXIudmVyc2lvbjsKICAgIH07CgogICAgdmFyIFN0YXRpc3RpY3NHYXRoZXJlciA9IGZ1bmN0aW9uICgpIHsKICAgICAgZnVuY3Rpb24gU3RhdGlzdGljc0dhdGhlcmVyKGxvZ2dlcikgewogICAgICAgIGNsYXNzQ2FsbENoZWNrKHRoaXMsIFN0YXRpc3RpY3NHYXRoZXJlcik7CgogICAgICAgIHRoaXMubm93ID0gbmV3IERhdGUoKS5nZXRUaW1lKCk7CiAgICAgICAgdGhpcy5sb2dnZXIgPSBsb2dnZXI7CiAgICAgIH0KCiAgICAgIGNyZWF0ZUNsYXNzKFN0YXRpc3RpY3NHYXRoZXJlciwgW3sKICAgICAgICBrZXk6ICdmcmFtZXdvcmtWZXJzaW9uRGV0ZWN0b3JzJywKICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZnJhbWV3b3JrVmVyc2lvbkRldGVjdG9ycygpIHsKICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICdGbG93JzogZnVuY3Rpb24gRmxvdygpIHsKICAgICAgICAgICAgICBpZiAod2luZG93LlZhYWRpbiAmJiB3aW5kb3cuVmFhZGluLkZsb3cgJiYgd2luZG93LlZhYWRpbi5GbG93LmNsaWVudHMpIHsKICAgICAgICAgICAgICAgIHZhciBmbG93VmVyc2lvbnMgPSBPYmplY3Qua2V5cyh3aW5kb3cuVmFhZGluLkZsb3cuY2xpZW50cykubWFwKGZ1bmN0aW9uIChrZXkpIHsKICAgICAgICAgICAgICAgICAgcmV0dXJuIHdpbmRvdy5WYWFkaW4uRmxvdy5jbGllbnRzW2tleV07CiAgICAgICAgICAgICAgICB9KS5maWx0ZXIoZnVuY3Rpb24gKGNsaWVudCkgewogICAgICAgICAgICAgICAgICByZXR1cm4gY2xpZW50LmdldFZlcnNpb25JbmZvOwogICAgICAgICAgICAgICAgfSkubWFwKGZ1bmN0aW9uIChjbGllbnQpIHsKICAgICAgICAgICAgICAgICAgcmV0dXJuIGNsaWVudC5nZXRWZXJzaW9uSW5mbygpLmZsb3c7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIGlmIChmbG93VmVyc2lvbnMubGVuZ3RoID4gMCkgewogICAgICAgICAgICAgICAgICByZXR1cm4gZmxvd1ZlcnNpb25zWzBdOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSwKICAgICAgICAgICAgJ1ZhYWRpbiBGcmFtZXdvcmsnOiBmdW5jdGlvbiBWYWFkaW5GcmFtZXdvcmsoKSB7CiAgICAgICAgICAgICAgaWYgKHdpbmRvdy52YWFkaW4gJiYgd2luZG93LnZhYWRpbi5jbGllbnRzKSB7CiAgICAgICAgICAgICAgICB2YXIgZnJhbWV3b3JrVmVyc2lvbnMgPSBPYmplY3QudmFsdWVzKHdpbmRvdy52YWFkaW4uY2xpZW50cykuZmlsdGVyKGZ1bmN0aW9uIChjbGllbnQpIHsKICAgICAgICAgICAgICAgICAgcmV0dXJuIGNsaWVudC5nZXRWZXJzaW9uSW5mbzsKICAgICAgICAgICAgICAgIH0pLm1hcChmdW5jdGlvbiAoY2xpZW50KSB7CiAgICAgICAgICAgICAgICAgIHJldHVybiBjbGllbnQuZ2V0VmVyc2lvbkluZm8oKS52YWFkaW5WZXJzaW9uOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBpZiAoZnJhbWV3b3JrVmVyc2lvbnMubGVuZ3RoID4gMCkgewogICAgICAgICAgICAgICAgICByZXR1cm4gZnJhbWV3b3JrVmVyc2lvbnNbMF07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9LAogICAgICAgICAgICAnQW5ndWxhckpzJzogZnVuY3Rpb24gQW5ndWxhckpzKCkgewogICAgICAgICAgICAgIGlmICh3aW5kb3cuYW5ndWxhciAmJiB3aW5kb3cuYW5ndWxhci52ZXJzaW9uICYmIHdpbmRvdy5hbmd1bGFyLnZlcnNpb24pIHsKICAgICAgICAgICAgICAgIHJldHVybiB3aW5kb3cuYW5ndWxhci52ZXJzaW9uLmZ1bGw7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9LAogICAgICAgICAgICAnQW5ndWxhcic6IGZ1bmN0aW9uIEFuZ3VsYXIoKSB7CiAgICAgICAgICAgICAgaWYgKHdpbmRvdy5uZykgewogICAgICAgICAgICAgICAgdmFyIHRhZ3MgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCJbbmctdmVyc2lvbl0iKTsKICAgICAgICAgICAgICAgIGlmICh0YWdzLmxlbmd0aCA+IDApIHsKICAgICAgICAgICAgICAgICAgcmV0dXJuIHRhZ3NbMF0uZ2V0QXR0cmlidXRlKCJuZy12ZXJzaW9uIik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gIlVua25vd24iOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSwKICAgICAgICAgICAgJ0JhY2tib25lLmpzJzogZnVuY3Rpb24gQmFja2JvbmVKcygpIHsKICAgICAgICAgICAgICBpZiAod2luZG93LkJhY2tib25lKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gd2luZG93LkJhY2tib25lLlZFUlNJT047CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9LAogICAgICAgICAgICAnUmVhY3QnOiBmdW5jdGlvbiBSZWFjdCgpIHsKICAgICAgICAgICAgICB2YXIgcmVhY3RTZWxlY3RvciA9ICdbZGF0YS1yZWFjdHJvb3RdLCBbZGF0YS1yZWFjdGlkXSc7CiAgICAgICAgICAgICAgaWYgKCEhZG9jdW1lbnQucXVlcnlTZWxlY3RvcihyZWFjdFNlbGVjdG9yKSkgewogICAgICAgICAgICAgICAgLy8gUmVhY3QgZG9lcyBub3QgcHVibGlzaCB0aGUgdmVyc2lvbiBieSBkZWZhdWx0CiAgICAgICAgICAgICAgICByZXR1cm4gInVua25vd24iOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSwKICAgICAgICAgICAgJ0VtYmVyJzogZnVuY3Rpb24gRW1iZXIoKSB7CiAgICAgICAgICAgICAgaWYgKHdpbmRvdy5FbSAmJiB3aW5kb3cuRW0uVkVSU0lPTikgewogICAgICAgICAgICAgICAgcmV0dXJuIHdpbmRvdy5FbS5WRVJTSU9OOwogICAgICAgICAgICAgIH0gZWxzZSBpZiAod2luZG93LkVtYmVyICYmIHdpbmRvdy5FbWJlci5WRVJTSU9OKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gd2luZG93LkVtYmVyLlZFUlNJT047CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9LAogICAgICAgICAgICAnalF1ZXJ5JzogZnVuY3Rpb24gKF9qUXVlcnkpIHsKICAgICAgICAgICAgICBmdW5jdGlvbiBqUXVlcnkoKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gX2pRdWVyeS5hcHBseSh0aGlzLCBhcmd1bWVudHMpOwogICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgalF1ZXJ5LnRvU3RyaW5nID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgcmV0dXJuIF9qUXVlcnkudG9TdHJpbmcoKTsKICAgICAgICAgICAgICB9OwoKICAgICAgICAgICAgICByZXR1cm4galF1ZXJ5OwogICAgICAgICAgICB9KGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICBpZiAodHlwZW9mIGpRdWVyeSA9PT0gJ2Z1bmN0aW9uJyAmJiBqUXVlcnkucHJvdG90eXBlLmpxdWVyeSAhPT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgICAgICByZXR1cm4galF1ZXJ5LnByb3RvdHlwZS5qcXVlcnk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSwKICAgICAgICAgICAgJ1BvbHltZXInOiBmdW5jdGlvbiBQb2x5bWVyKCkgewogICAgICAgICAgICAgIHZhciB2ZXJzaW9uID0gZ2V0UG9seW1lclZlcnNpb24oKTsKICAgICAgICAgICAgICBpZiAodmVyc2lvbikgewogICAgICAgICAgICAgICAgcmV0dXJuIHZlcnNpb247CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9LAogICAgICAgICAgICAnTGl0RWxlbWVudCc6IGZ1bmN0aW9uIExpdEVsZW1lbnQoKSB7CiAgICAgICAgICAgICAgdmFyIHZlcnNpb24gPSB3aW5kb3cubGl0RWxlbWVudFZlcnNpb25zICYmIHdpbmRvdy5saXRFbGVtZW50VmVyc2lvbnNbMF07CiAgICAgICAgICAgICAgaWYgKHZlcnNpb24pIHsKICAgICAgICAgICAgICAgIHJldHVybiB2ZXJzaW9uOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSwKICAgICAgICAgICAgJ0xpdEh0bWwnOiBmdW5jdGlvbiBMaXRIdG1sKCkgewogICAgICAgICAgICAgIHZhciB2ZXJzaW9uID0gd2luZG93LmxpdEh0bWxWZXJzaW9ucyAmJiB3aW5kb3cubGl0SHRtbFZlcnNpb25zWzBdOwogICAgICAgICAgICAgIGlmICh2ZXJzaW9uKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdmVyc2lvbjsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0sCiAgICAgICAgICAgICdWdWUuanMnOiBmdW5jdGlvbiBWdWVKcygpIHsKICAgICAgICAgICAgICBpZiAod2luZG93LlZ1ZSkgewogICAgICAgICAgICAgICAgcmV0dXJuIHdpbmRvdy5WdWUudmVyc2lvbjsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgIH07CiAgICAgICAgfQogICAgICB9LCB7CiAgICAgICAga2V5OiAnZ2V0VXNlZFZhYWRpbkVsZW1lbnRzJywKICAg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20gZWxlbWVudCByZWdpc3RyeQogICAgICAgICAgICAgIHRoZW1lID0gY3VzdG9tRWxlbWVudHMuZ2V0KCd2YWFkaW4tJyArIHRoZW1lTmFtZS50b0xvd2VyQ2FzZSgpICsgJy1zdHlsZXMnKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhlbWUgJiYgdGhlbWUudmVyc2lvbikgewogICAgICAgICAgICAgIHRoZW1lc1t0aGVtZU5hbWVdID0geyB2ZXJzaW9uOiB0aGVtZS52ZXJzaW9uIH07CiAgICAgICAgICAgIH0KICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgfSwgewogICAgICAgIGtleTogJ2dldEZyYW1ld29ya3MnLAogICAgICAgIHZhbHVlOiBmdW5jdGlvbiBnZXRGcmFtZXdvcmtzKGZyYW1ld29ya3MpIHsKICAgICAgICAgIHZhciBkZXRlY3RvcnMgPSB0aGlzLmZyYW1ld29ya1ZlcnNpb25EZXRlY3RvcnMoKTsKICAgICAgICAgIE9iamVjdC5rZXlzKGRldGVjdG9ycykuZm9yRWFjaChmdW5jdGlvbiAoZnJhbWV3b3JrKSB7CiAgICAgICAgICAgIHZhciBkZXRlY3RvciA9IGRldGVjdG9yc1tmcmFtZXdvcmtdOwogICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgIHZhciB2ZXJzaW9uID0gZGV0ZWN0b3IoKTsKICAgICAgICAgICAgICBpZiAodmVyc2lvbikgewogICAgICAgICAgICAgICAgZnJhbWV3b3Jrc1tmcmFtZXdvcmtdID0geyB2ZXJzaW9uOiB2ZXJzaW9uIH07CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9IGNhdGNoIChlKSB7fQogICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICB9LCB7CiAgICAgICAga2V5OiAnZ2F0aGVyJywKICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZ2F0aGVyKHN0b3JhZ2UpIHsKICAgICAgICAgIHZhciBzdG9yZWRTdGF0cyA9IHN0b3JhZ2U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ciBsb2NhbFN0b3JhZ2VTdGF0c1N0cmluZyA9IGxvY2FsU3RvcmFnZS5nZXRJdGVtKHRoaXMua2V5KTsKICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgIHJldHVybiBKU09OLnBhcnNlKGxvY2FsU3RvcmFnZVN0YXRzU3RyaW5nID8gbG9jYWxTdG9yYWdlU3RhdHNTdHJpbmcgOiAne30nKTsKICAgICAgICAgIH0gY2F0Y2ggKGUpIHsKICAgICAgICAgICAgcmV0dXJuIHt9OwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfSwgewogICAgICAgIGtleTogJ3dyaXRlJywKICAgICAgICB2YWx1ZTogZnVuY3Rpb24gd3JpdGUoZGF0YSkgewogICAgICAgICAgbG9jYWxTdG9yYWdlLnNldEl0ZW0odGhpcy5rZXksIGRhdGEpOwogICAgICAgIH0KICAgICAgfSwgewogICAgICAgIGtleTogJ2NsZWFyJywKICAgICAgICB2YWx1ZTogZnVuY3Rpb24gY2xlYXIoKSB7CiAgICAgICAgICBsb2NhbFN0b3JhZ2UucmVtb3ZlSXRlbSh0aGlzLmtleSk7CiAgICAgICAgfQogICAgICB9LCB7CiAgICAgICAga2V5OiAnaXNFbXB0eScsCiAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGlzRW1wdHkoKSB7CiAgICAgICAgICB2YXIgc3RvcmVkU3RhdHMgPSB0aGlzLnJlYWQoKTsKICAgICAgICAgIHZhciBlbXB0eSA9IHRydWU7CiAgICAgICAgICBPYmplY3Qua2V5cyhzdG9yZWRTdGF0cykuZm9yRWFjaChmdW5jdGlvbiAoa2V5KSB7CiAgICAgICAgICAgIGlmIChPYmplY3Qua2V5cyhzdG9yZWRTdGF0c1trZXldKS5sZW5ndGggPiAwKSB7CiAgICAgICAgICAgICAgZW1wdHkgPSBmYWxzZTsKICAgICAgICAgICAgfQogICAgICAgICAgfSk7CgogICAgICAgICAgcmV0dXJuIGVtcHR5OwogICAgICAgIH0KICAgICAgfV0pOwogICAgICByZXR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GV4Y2x1ZGVkIGZyb20gcHJvZHVjdGlvbiBidWlsZHMuXG5cbkZvciBkZXRhaWxzIGFuZCB0byBvcHQtb3V0LCBzZWUgaHR0cHM6Ly9naXRodWIuY29tL3ZhYWRpbi92YWFkaW4tdXNhZ2Utc3RhdGlzdGljcy5cblxuXG5cbic7CiAgICAgICAgICB2YXIgc2VsZiA9IHRoaXM7CiAgICAgICAgICB0aGlzLnNlbmRlci5zZW5kKGluZm8gKyBKU09OLnN0cmluZ2lmeShkYXRhKSwgZnVuY3Rpb24gKCkgewogICAgICAgICAgICAvLyBSZXZlcnQgdGhlICdtb250aCBwcm9jZXNzZWQnIGZsYWcKICAgICAgICAgICAgbG9jYWxTdG9yYWdlLnNldEl0ZW0oVXNhZ2VTdGF0aXN0aWNzLm1vbnRoUHJvY2Vzc2VkS2V5LCBzZWxmLmN1cnJlbnRNb250aCgpIC0gMSk7CiAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgIH1dLCBbewogICAgICAgIGtleTogJ3ZlcnNpb24nLAogICAgICAgIGdldDogZnVuY3Rpb24gZ2V0JDEoKSB7CiAgICAgICAgICByZXR1cm4gJzIuMS4wJzsKICAgICAgICB9CiAgICAgIH0sIHsKICAgICAgICBrZXk6ICdmaXJzdFVzZUtleScsCiAgICAgICAgZ2V0OiBmdW5jdGlvbiBnZXQkMSgpIHsKICAgICAgICAgIHJldHVybiAndmFhZGluLnN0YXRpc3RpY3MuZmlyc3R1c2UnOwogICAgICAgIH0KICAgICAgfSwgewogICAgICAgIGtleTogJ21vbnRoUHJvY2Vzc2VkS2V5JywKICAgICAgICBnZXQ6IGZ1bmN0aW9uIGdldCQxKCkgewogICAgICAgICAgcmV0dXJuICd2YWFkaW4uc3RhdGlzdGljcy5tb250aFByb2Nlc3NlZCc7CiAgICAgICAgfQogICAgICB9LCB7CiAgICAgICAga2V5OiAnb3B0T3V0S2V5JywKICAgICAgICBnZXQ6IGZ1bmN0aW9uIGdldCQxKCkgewogICAgICAgICAgc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dpc3RlcmVkLmFkZChpcyk7CgogICAgICAgICAgaWYgKHdpbmRvdy5WYWFkaW4uZGV2ZWxvcG1lbnRNb2RlQ2FsbGJhY2spIHsKICAgICAgICAgICAgc3RhdHNKb2IgPSBEZWJvdW5jZXIuZGVib3VuY2Uoc3RhdHNKb2IsCiAgICAgICAgICAgICAgaWRsZVBlcmlvZCwgKCkgPT4gewogICAgICAgICAgICAgICAgd2luZG93LlZhYWRpbi5kZXZlbG9wbWVudE1vZGVDYWxsYmFja1sndmFhZGluLXVzYWdlLXN0YXRpc3RpY3MnXSgpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgKTsKICAgICAgICAgICAgZW5xdWV1ZURlYm91bmNlcihzdGF0c0pvYik7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CgogICAgICBjb25zdHJ1Y3RvcigpIHsKICAgICAgICBzdXBlcigpOwogICAgICAgIGlmIChkb2N1bWVudC5kb2N0eXBlID09PSBudWxsKSB7CiAgICAgICAgICBjb25zb2xlLndhcm4oCiAgICAgICAgICAgICdWYWFkaW4gY29tcG9uZW50cyByZXF1aXJlIHRoZSAic3RhbmRhcmRzIG1vZGUiIGRlY2xhcmF0aW9uLiBQbGVhc2UgYWRkIDwhRE9DVFlQRSBodG1sPiB0byB0aGUgSFRNTCBkb2N1bWVudC4nCiAgICAgICAgICApOwogICAgICAgIH0KICAgICAgfQogICAgfTsKCiAgICAvKioKICAgIEBsaWNlbnNlCiAgICBDb3B5cmlnaHQgKGMpIDIwMTcgVmFhZGluIEx0ZC4KICAgIFRoaXMgcHJvZ3JhbSBpcyBhdmFpbGFibGUgdW5kZXIgQXBhY2hlIExpY2Vuc2UgVmVyc2lvbiAyLjAsIGF2YWlsYWJsZSBhdCBodHRwczovL3ZhYWRpbi5jb20vbGljZW5zZS8KICAgICovCiAgICAvKioKICAgICAqIGA8dmFhZGluLWNoZWNrYm94PmAgaXMgYSBXZWIgQ29tcG9uZW50IGZvciBjdXN0b21pemVkIGNoZWN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ZW50TGlzdGVuZXJzKFBvbHltZXJFbGVtZW50KSkpKSB7CiAgICAgIHN0YXRpYyBnZXQgdGVtcGxhdGUoKSB7CiAgICAgICAgcmV0dXJuIGh0bWxgCiAgICA8c3R5bGU+CiAgICAgIDpob3N0IHsKICAgICAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7CiAgICAgIH0KCiAgICAgIDpob3N0KFtoaWRkZW5dKSB7CiAgICAgICAgZGlzcGxheTogbm9uZSAhaW1wb3J0YW50OwogICAgICB9CgogICAgICBsYWJlbCB7CiAgICAgICAgZGlzcGxheTogaW5saW5lLWZsZXg7CiAgICAgICAgYWxpZ24taXRlbXM6IGJhc2VsaW5lOwogICAgICAgIG91dGxpbmU6IG5vbmU7CiAgICAgIH0KCiAgICAgIFtwYXJ0PSJjaGVja2JveCJdIHsKICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7CiAgICAgICAgZGlzcGxheTogaW5saW5lLWJsb2NrOwogICAgICAgIGZsZXg6IG5vbmU7CiAgICAgIH0KCiAgICAgIGlucHV0W3R5cGU9ImNoZWNrYm94Il0gewogICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTsKICAgICAgICB0b3A6IDA7CiAgICAgICAgbGVmdDogMDsKICAgICAgICByaWdodDogMDsKICAgICAgICB3aWR0aDogMTAwJTsKICAgICAgICBoZWlnaHQ6IDEwMCU7CiAgICAgICAgb3BhY2l0eTogMDsKICAgICAgICBjdXJzb3I6IGluaGVyaXQ7CiAgICAgICAgbWFyZ2luOiAwOwogICAgICB9CgogICAgICA6aG9zdChbZGlzYWJsZWRdKSB7CiAgICAgICAgLXdlYmtpdC10YXAtaGlnaGxpZ2h0LWNvbG9yOiB0cmFuc3BhcmVudDsKICAgICAgfQogICAgPC9zdHlsZT4KCiAgICA8bGFiZWw+CiAgICAgIDxzcGFuIHBhcnQ9ImNoZWNrYm94Ij4KICAgICAgICA8aW5wdXQgdHlwZT0iY2hlY2tib3giIGNoZWNrZWQ9Int7Y2hlY2tlZDo6Y2hhbmdlfX0iIGRpc2FibGVkXCQ9IltbZGlzYWJsZWRdXSIgaW5kZXRlcm1pbmF0ZT0ie3tpbmRldGVybWluYXRlOjpjaGFuZ2V9fSIgcm9sZT0icHJlc2VudGF0aW9uIiB0YWJpbmRleD0iLTEiPgogICAgICA8L3NwYW4+CgogICAgICA8c3BhbiBwYXJ0PSJsYWJlbCI+CiAgICAgICAgPHNsb3Q+PC9zbG90PgogICAgICA8L3NwYW4+CiAgICA8L2xhYmVsPgpgOwogICAgICB9CgogICAgICBzdGF0aWMgZ2V0IGlzKCkgewogICAgICAgIHJldHVybiAndmFhZGluLWNoZWNrYm94JzsKICAgICAgfQoKICAgICAgc3RhdGljIGdldCB2ZXJzaW9uKCkgewogICAgICAgIHJldHVybiAnMi4zLjAnOwogICAgICB9CgogICAgICBzdGF0aWMgZ2V0IHByb3BlcnRpZXMoKSB7CiAgICAgICAgcmV0dXJuIHsKICAgICAgICAgIC8qKgogICAgICAgICAgICogVHJ1ZSBpZiB0aGUgY2hlY2tib3ggaXMgY2hlY2tlZC4KICAgICAgICAgICAqLwogICAgICAgICAgY2hlY2tlZDogewogICAgICAgICAgICB0eXBlOiBCb29sZWFuLAogICAgICAgICAgICB2YWx1ZTogZmFsc2UsCiAgICAgICAgICAgIG5vdGlmeTogdHJ1ZSwKICAgICAgICAgICAgb2JzZXJ2ZXI6ICdfY2hlY2tlZENoYW5nZWQnLAogICAgICAgICAgICByZWZsZWN0VG9BdHRyaWJ1dGU6IHRydWUKICAgICAgICAgIH0sCgogICAgICAgICAgLyoqCiAgICAgICAgICAgKiBJbmRldGVybWluYXRlIHN0YXRlIG9mIHRoZSBjaGVja2JveCB3aGVuIGl0J3MgbmVpdGhlciBjaGVja2VkIG5vciB1bmNoZWNrZWQsIGJ1dCB1bmRldGVybWluZWQuCiAgICAgICAgICAgKiBodHRwczovL2RldmVsb3Blci5tb3ppbGxhLm9yZy9lbi1VUy9kb2NzL1dlYi9IVE1ML0VsZW1lbnQvaW5wdXQvY2hlY2tib3gjSW5kZXRlcm1pbmF0ZV9zdGF0ZV9jaGVja2JveGVzCiAgICAgICAgICAgKi8KICAgICAgICAgIGluZGV0ZXJtaW5hdGU6IHsKICAgICAgICAgICAgdHlwZTogQm9vbGVhbiwKICAgICAgICAgICAgbm90aWZ5OiB0cnVlLAogICAgICAgICAgICBvYnNlcnZlcjogJ19pbmRldGVybWluYXRlQ2hhbmdlZCcsCiAgICAgICAgICAgIHJlZmxlY3RUb0F0dHJpYnV0ZTogdHJ1ZSwKICAgICAgICAgICAgdmFsdWU6IGZhbHNlCiAgICAgICAgICB9LAoKICAgICAgICAgIC8qKgogICAgICAgICAgICogVGhlIHZhbHVlIGdpdmVuIHRvIHRoZSBkYXRhIHN1Ym1pdHRlZCB3aXRoIHRoZSBjaGVja2JveCdzIG5hbWUgdG8gdGhlIHNlcnZlciB3aGVuIHRoZSBjb250cm9sIGlzIGluc2lkZSBhIGZvcm0uCiAgICAgICAgICAgKi8KICAgICAgICAgIHZhbHVlOiB7CiAgICAgICAgICAgIHR5cGU6IFN0cmluZywKICAgICAgICAgICAgdmFsdWU6ICdvbicKICAgICAgICAgIH0sCgogICAgICAgICAgX25hdGl2ZUNoZWNrYm94OiB7CiAgICAgICAgICAgIHR5cGU6IE9iamVjdAogICAgICAgICAgfQogICAgICAgIH07CiAgICAgIH0KCiAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgIHN1cGVyKCk7CiAgICAgICAgLyoqCiAgICAgICAgICogQHR5cGUge3N0cmluZ30KICAgICAgICAgKiBOYW1lIG9mIHRoZSBlbGVtZW50LgogICAgICAgICAqLwogICAgICAgIHRoaXMubmFtZTsKICAgICAgfQoKICAgICAgZ2V0IG5hbWUoKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuY2hlY2tlZCA/IHRoaXMuX3N0b3JlZE5hbWUgOiAnJzsKICAgICAgfQoKICAgICAgc2V0IG5hbWUobmFtZSkgewogICAgICAgIHRoaXMuX3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nYXJpYS1jaGVja2VkJywgJ21peGVkJyk7CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgIHRoaXMuc2V0QXR0cmlidXRlKCdhcmlhLWNoZWNrZWQnLCB0aGlzLmNoZWNrZWQpOwogICAgICAgIH0KICAgICAgfQoKICAgICAgX2FkZEFjdGl2ZUxpc3RlbmVycygpIHsKICAgICAgICAvLyBET1dOCiAgICAgICAgdGhpcy5fYWRkRXZlbnRMaXN0ZW5lclRvTm9kZSh0aGlzLCAnZG93bicsIChlKSA9PiB7CiAgICAgICAgICBpZiAodGhpcy5fX2ludGVyYWN0aW9uc0FsbG93ZWQoZSkpIHsKICAgICAgICAgICAgdGhpcy5zZXRBdHRyaWJ1dGUoJ2FjdGl2ZScsICcnKTsKICAgICAgICAgIH0KICAgICAgICB9KTsKCiAgICAgICAgLy8gVVAKICAgICAgICB0aGlzLl9hZGRFdmVudExpc3RlbmVyVG9Ob2RlKHRoaXMsICd1cCcsICgpID0+IHRoaXMucmVtb3ZlQXR0cmlidXRlKCdhY3RpdmUnKSk7CgogICAgICAgIC8vIEtFWURPV04KICAgICAgICB0aGlzLmFkZEV2ZW50TGlzdGVuZXIoJ2tleWRvd24nLCBlID0+IHsKICAgICAgICAgIGlmICh0aGlzLl9faW50ZXJhY3Rpb25zQWxsb3dlZChlKSAmJiBlLmtleUNvZGUgPT09IDMyKSB7CiAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTsKICAgICAgICAgICAgdGhpcy5zZXRBdHRyaWJ1dGUoJ2FjdGl2ZScsICcnKTsKICAgICAgICAgIH0KICAgICAgICB9KTsKCiAgICAgICAgLy8gS0VZVVAKICAgICAgICB0aGlzLmFkZEV2ZW50TGlzdGVuZXIoJ2tleXVwJywgZSA9PiB7CiAgICAgICAgICBpZiAodGhpcy5fX2ludGVyYWN0aW9uc0FsbG93ZWQoZSkgJiYgZS5rZXlDb2RlID09PSAzMikgewogICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7CiAgICAgICAgICAgIHRoaXMuX3RvZ2dsZUNoZWNrZWQoKTsKICAgICAgICAgICAgdGhpcy5yZW1vdmVBdHRyaWJ1dGUoJ2FjdGl2ZScpOwoKICAgICAgICAgICAgaWYgKHRoaXMuaW5kZXRlcm1pbmF0ZSkgewogICAgICAgICAgICAgIHRoaXMuaW5kZXRlcm1pbmF0ZSA9IGZhbHNlOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfSk7CiAgICAgIH0KCiAgICAgIC8qKiBAcHJvdGVjdGVkICovCiAgICAgIGdldCBmb2N1c0VsZW1lbnQoKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuc2hhZG93Um9vdC5xdWVyeVNlbGVjdG9yKCdpbnB1dCcpOwogICAgICB9CgogICAgICAvKioKICAgICAgICogVHJ1ZSBpZiB1c2VycycgaW50ZXJhY3Rpb25zIChtb3VzZSBvciBrZXlib2FyZCkKICAgICAgICogc2hvdWxkIHRvZ2dsZSB0aGUgY2hlY2tib3gKICAgICAgICovCiAgICAgIF9faW50ZXJhY3Rpb25zQWxsb3dlZChlKSB7CiAgICAgICAgaWYgKHRoaXMuZGlzYWJsZWQpIHsKICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICB9CgogICAgICAgIC8vIGh0dHBzOi8vZ2l0aHViLmNvbS92YWFkaW4vdmFhZGluLWNoZWNrYm94L2lzc3Vlcy82MwogICAgICAgIGlmIChlLnRhcmdldC5sb2NhbE5hbWUgPT09ICdhJykgewogICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgIH0KCiAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgIH0KCiAgICAgIF9oYW5kbGVDbGljayhlKSB7CiAgICAgICAgaWYgKHRoaXMuX19pbnRlcmFjdGlvbnNBbGxvd2VkKGUpKSB7CiAgICAgICAgICBpZiAoIXRoaXMuaW5kZXRlcm1pbmF0ZSkgewogICAgICAgICAgICBpZiAoZS5jb21wb3NlZFBhdGgoKVswXSAhPT0gdGhpcy5fbmF0aXZlQ2hlY2tib3gpIHsKICAgICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7CiAgICAgICAgICAgICAgdGhpcy5fdG9nZ2xlQ2hlY2tlZCgpOwogICAgICAgICAgICB9CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAvKgogICAgICAgICAgICAgKiBSZXF1aXJlZCBmb3IgSUUgMTEgYW5kIEVkZ2UuCiAgICAgICAgICAgICAqIFNlZSBpc3N1ZSBoZXJlOiBodHRwczovL2RldmVsb3Blci5taWNyb3NvZnQuY29tL2VuLXVzL21pY3Jvc29mdC1lZGdlL3BsYXRmb3JtL2lzc3Vlcy83MzQ0NDE4LwogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5pbmRldGVybWluYXRlID0gZmFsc2U7CiAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTsKICAgICAgICAgICAgdGhpcy5fdG9nZ2xlQ2hlY2tlZCgpOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQoKICAgICAgX3RvZ2dsZUNoZWNrZWQoKSB7CiAgICAgICAgdGhpcy5jaGVja2VkID0gIXRoaXMuY2hlY2tlZDsKICAgICAgICB0aGlzLmRpc3BhdGNoRXZlbnQobmV3IEN1c3RvbUV2ZW50KCdjaGFuZ2UnLCB7Y29tcG9zZWQ6IGZhbHNlLCBidWJibGVzOiB0cnVlfSkpOwogICAgICB9CgogICAgICAvKioKICAgICAgICogRmlyZWQgd2hlbiB0aGUgdXNlciBjb21taXRzIGEgdmFsdWUgY2hhbmdlLgogICAgICAgKgogICAgICAgKiBAZXZlbnQgY2hhbmdlCiAgICAgICAqLwogICAgfQoKICAgIGN1c3RvbUVsZW1lbnRzLmRlZmluZShDaGVja2JveEVsZW1lbnQuaXMsIENoZWNrYm94RWxlbWVudCk7CgogICAgY29uc3QgJF9kb2N1bWVudENvbnRhaW5lciRjID0gaHRtbGA8ZG9tLW1vZHVsZSBpZD0ibHVtby1ncmlkIiB0aGVtZS1mb3I9InZhYWRpbi1ncmlkIj4KICA8dGVtcGxhdGU+CiAgICA8c3R5bGU+CiAgICAgIDpob3N0IHsKICAgICAgICBmb250LWZhbWlseTogdmFyKC0tbHVtby1mb250LWZhbWlseSk7CiAgICAgICAgZm9udC1zaXplOiB2YXIoLS1sdW1vLWZvbnQtc2l6ZS1tKTsKICAgICAgICBsaW5lLWhlaWdodDogdmFyKC0tbHVtby1saW5lLWhlaWdodC1zKTsKICAgICAgICBjb2xvcjogdmFyKC0tbHVtby1ib2R5LXRleHQtY29sb3IpOwogICAgICAgIGJhY2tncm91bmQtY29sb3I6IHZhcigtLWx1bW8tYmFzZS1jb2xvcik7CiAgICAgICAgYm94LXNpemluZzogYm9yZGVyLWJveDsKICAgICAgICAtd2Via2l0LXRleHQtc2l6ZS1hZGp1c3Q6IDEwMCU7CiAgICAgICAgLXdlYmtpdC10YXAtaGlnaGxpZ2h0LWNvbG9yOiB0cmFuc3BhcmVudDsKICAgICAgICAtd2Via2l0LWZvbnQtc21vb3RoaW5nOiBhbnRpYWxpYXNlZDsKICAgICAgICAtbW96LW9zeC1mb250LXNtb290aGluZzogZ3JheXNjYWxlOwoKICAgICAgICAvKiBGb3IgaW50ZXJuYWwgdXNlIG9ubHkgKi8KICAgICAgICAtLV9sdW1vLWdyaWQtYm9yZGVyLWNvbG9yOiB2YXIoLS1sdW1vLWNvbnRyYXN0LTIwcGN0KTsKICAgICAgICAtLV9sdW1vLWdyaWQtc2Vjb25kYXJ5LWJvcmRlci1jb2xvcjogdmFyKC0tbHVtby1jb250cmFzdC0xMHBjdCk7CiAgICAgICAgLS1fbHVtby1ncmlkLWJvcmRlci13aWR0aDogMXB4OwogICAgICAgIC0tX2x1bW8tZ3JpZC1zZWxlY3RlZC1yb3ctY29sb3I6IHZhcigtLWx1bW8tcHJpbWFyeS1jb2xvci0xMHBjdCk7CiAgICAgIH0KCiAgICAgIC8qIE5vIChvdXRlcikgYm9yZGVyICovCgogICAgICA6aG9zdCg6bm90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cnR+PSJkZXRhaWxzLWNlbGwiXSkgewogICAgICAgIGJvcmRlci10b3A6IDA7CiAgICAgICAgbWluLWhlaWdodDogY2FsYyh2YXIoLS1sdW1vLXNpemUtbSkgLSB2YXIoLS1fbHVtby1ncmlkLWJvcmRlci13aWR0aCkpOwogICAgICB9CgogICAgICAvKiBGb2N1cy1yaW5nICovCgogICAgICBbcGFydH49ImNlbGwiXTpmb2N1cyB7CiAgICAgICAgb3V0bGluZTogbm9uZTsKICAgICAgfQoKICAgICAgOmhvc3QoW25hdmlnYXRpbmddKSBbcGFydH49ImNlbGwiXTpmb2N1czo6YmVmb3JlIHsKICAgICAgICBjb250ZW50OiAiIjsKICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7CiAgICAgICAgdG9wOiAwOwogICAgICAgIHJpZ2h0OiAwOwogICAgICAgIGJvdHRvbTogMDsKICAgICAgICBsZWZ0OiAwOwogICAgICAgIHBvaW50ZXItZXZlbnRzOiBub25lOwogICAgICAgIGJveC1zaGFkb3c6IGluc2V0IDAgMCAwIDJweCB2YXIoLS1sdW1vLXByaW1hcnktY29sb3ItNTBwY3QpOwogICAgICB9CgogICAgICAvKiBEcmFnIGFuZCBEcm9wIHN0eWxlcyAqLwogICAgICA6aG9zdChbZHJhZ292ZXJdKTo6YWZ0ZXIgewogICAgICAgIGNvbnRlbnQ6ICIiOwogICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTsKICAgICAgICB6LWluZGV4OiAxMDA7CiAgICAgICAgdG9wOiAwOwogICAgICAgIHJpZ2h0OiAwOwogICAgICAgIGJvdHRvbTogMDsKICAgICAgICBsZWZ0OiAwOwogICAgICAgIHBvaW50ZXItZXZlbnRzOiBub25lOwogICAgICAgIGJveC1zaGFkb3c6IGluc2V0IDAgMCAwIDJweCB2YXIoLS1sdW1vLXByaW1hcnktY29sb3ItNTBwY3QpOwogICAgICB9CgogICAgICBbcGFydH49InJvdyJdW2RyYWdvdmVyXSB7CiAgICAgICAgei1pbmRleD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tKTsKICAgICAgICBmb250LWZhbWlseTogdmFyKC0tbHVtby1mb250LWZhbWlseSk7CiAgICAgICAgZm9udC1zaXplOiB2YXIoLS1sdW1vLWZvbnQtc2l6ZS14eHMpOwogICAgICAgIGxpbmUtaGVpZ2h0OiAxOwogICAgICAgIGZvbnQtd2VpZ2h0OiA1MDA7CiAgICAgICAgdGV4dC10cmFuc2Zvcm06IGluaXRpYWw7CiAgICAgICAgbGV0dGVyLXNwYWNpbmc6IGluaXRpYWw7CiAgICAgICAgbWluLXdpZHRoOiBjYWxjKHZhcigtLWx1bW8tc2l6ZS1zKSAqIDAuNyk7CiAgICAgICAgdGV4dC1hbGlnbjogY2VudGVyOwogICAgICB9CgogICAgICAvKiBIZWFkZXJzIGFuZCBmb290ZXJzICovCgogICAgICBbcGFydH49ImhlYWRlci1jZWxsIl0gOjpzbG90dGVkKHZhYWRpbi1ncmlkLWNlbGwtY29udGVudCksCiAgICAgIFtwYXJ0fj0iZm9vdGVyLWNlbGwiXSA6OnNsb3R0ZWQodmFhZGluLWdyaWQtY2VsbC1jb250ZW50KSwKICAgICAgW3BhcnR+PSJyZW9yZGVyLWdob3N0Il0gewogICAgICAgIGZvbnQtc2l6ZTogdmFyKC0tbHVtby1mb250LXNpemUtcyk7CiAgICAgICAgZm9udC13ZWlnaHQ6IDUwMDsKICAgICAgfQoKICAgICAgW3BhcnR+PSJmb290ZXItY2VsbCJdIDo6c2xvdHRlZCh2YWFkaW4tZ3JpZC1jZWxsLWNvbnRlbnQpIHsKICAgICAgICBmb250LXdlaWdodDogNDAwOwogICAgICB9CgogICAgICBbcGFydD0icm93Il06b25seS1jaGlsZCBbcGFydH49ImhlYWRlci1jZWxsIl0gewogICAgICAgIG1pbi1oZWlnaHQ6IHZhcigtLWx1bW8tc2l6ZS14bCk7CiAgICAgIH0KCiAgICAgIC8qIEhlYWRlciBib3JkZXJzICovCgogICAgICAvKiBIaWRlIGZpcnN0IGhlYWRlciByb3cgdG9wIGJvcmRlciAqLwogICAgICA6aG9zdCg6bm90KFt0aGVtZX49Im5vLXJvdy1ib3JkZXJzIl0pKSBbcGFydD0icm93Il06Zmlyc3QtY2hpbGQgW3BhcnR+PSJoZWFkZXItY2VsbCJdIHsKICAgICAgICBib3JkZXItdG9wOiAwOwogICAgICB9CgogICAgICBbcGFydD0icm93Il06bGFzdC1jaGlsZCBbcGFydH49ImhlYWRlci1jZWxsIl0gewogICAgICAgIGJvcmRlci1ib3R0b206IHZhcigtLV9sdW1vLWdyaWQtYm9yZGVyLXdpZHRoKSBzb2xpZCB0cmFuc3BhcmVudDsKICAgICAgfQoKICAgICAgOmhvc3QoOm5vdChbdGhlbWV+PSJuby1yb3ctYm9yZGVycyJdKSkgW3BhcnQ9InJvdyJdOmxhc3QtY2hpbGQgW3BhcnR+PSJoZWFkZXItY2VsbCJdIHsKICAgICAgICBib3JkZXItYm90dG9tLWNvbG9yOiB2YXIoLS1fbHVtby1ncmlkLXNlY29uZGFyeS1ib3JkZXItY29sb3IpOwogICAgICB9CgogICAgICAvKiBPdmVyZmxvdyB1c2VzIGEgc3Ryb25nZXIgYm9yZGVyIGNvbG9yICovCiAgICAgIDpob3N0KFtvdmVyZmxvd349InRvcCJdKSBbcGFydD0icm93Il06bGFzdC1jaGlsZCBbcGFydH49ImhlYWRlci1jZWxsIl0gewogICAgICAgIGJvcmRlci1ib3R0b20tY29sb3I6IHZhcigtLV9sdW1vLWdyaWQtYm9yZGVyLWNvbG9yKTsKICAgICAgfQoKICAgICAgLyogRm9vdGVyIGJvcmRlcnMgKi8KCiAgICAgIFtwYXJ0PSJyb3ciXTpmaXJzdC1jaGlsZCBbcGFydH49ImZvb3Rlci1jZWxsIl0gewogICAgICAgIGJvcmRlci10b3A6IHZhcigtLV9sdW1vLWdyaWQtYm9yZGVyLXdpZHRoKSBzb2xpZCB0cmFuc3BhcmVudDsKICAgICAgfQoKICAgICAgOmhvc3QoOm5vdChbdGhlbWV+PSJuby1yb3ctYm9yZGVycyJdKSkgW3BhcnQ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GUgdmlld3BvcnQgaW4gdGhlIGNvbnRleHQgb2YgbGlzdC4KICAgICAgICovCiAgICAgIF92aWV3cG9ydEhlaWdodDogMCwKCiAgICAgIC8qKgogICAgICAgKiBUaGUgd2lkdGggb2YgdGhlIGxpc3QuIFRoaXMgaXMgcmVmZXJyZWQgYXMgdGhlIHZpZXdwb3J0IGluIHRoZSBjb250ZXh0IG9mIGxpc3QuCiAgICAgICAqLwogICAgICBfdmlld3BvcnRXaWR0aDogMCwKCiAgICAgIC8qKgogICAgICAgKiBBbiBhcnJheSBvZiBET00gbm9kZXMgdGhhdCBhcmUgY3VycmVudGx5IGluIHRoZSB0cmVlCiAgICAgICAqIEB0eXBlIHs/QXJyYXk8IVRlbXBsYXRpemVyTm9kZT59CiAgICAgICAqLwogICAgICBfcGh5c2ljYWxJdGVtczogbnVsbCwKCiAgICAgIC8qKgogICAgICAgKiBBbiBhcnJheSBvZiBoZWlnaHRzIGZvciBlYWNoIGl0ZW0gaW4gYF9waHlzaWNhbEl0ZW1zYAogICAgICAgKiBAdHlwZSB7P0FycmF5PG51bWJlcj59CiAgICAgICAqLwogICAgICBfcGh5c2ljYWxTaXplczogbnVsbCwKCiAgICAgIC8qKgogICAgICAgKiBBIGNhY2hlZCB2YWx1ZSBmb3IgdGhlIGZpcnN0IHZpc2libGUgaW5kZXguCiAgICAgICAqIFNlZSBgZmlyc3RWaXNpYmxlSW5kZXhgCiAgICAgICAqIEB0eXBlIHs/bnVtYmVyfQogICAgICAgKi8KICAgICAgX2ZpcnN0VmlzaWJsZUluZGV4VmFsOiBudWxsLAoKICAgICAgLyoqCiAgICAgICAqIEEgUG9seW1lciBjb2xsZWN0aW9uIGZvciB0aGUgaXRlbXMuCiAgICAgICAqIEB0eXBlIHs/UG9seW1lci5Db2xsZWN0aW9ufQogICAgICAgKi8KICAgICAgX2NvbGxlY3Rpb246IG51bGwsCgogICAgICAvKioKICAgICAgICogQSBjYWNoZWQgdmFsdWUgZm9yIHRoZSBsYXN0IHZpc2libGUgaW5kZXguCiAgICAgICAqIFNlZSBgbGFzdFZpc2libGVJbmRleGAKICAgICAgICogQHR5cGUgez9udW1iZXJ9CiAgICAgICAqLwogICAgICBfbGFzdFZpc2libGVJbmRleFZhbDogbnVsbCwKCiAgICAgIC8qKgogICAgICAgKiBUaGUgbWF4IG51bWJlciBvZiBwYWdlcyB0byByZW5kZXIuIE9uZSBwYWdlIGlzIGVxdWl2YWxlbnQgdG8gdGhlIGhlaWdodCBvZiB0aGUgbGlzdC4KICAgICAgICovCiAgICAgIF9tYXhQYWdlczogMiwKCiAgICAgIC8qKgogICAgICAgKiBUaGUgdmlydHVhbCBpbmRleCBvZiB0aGUgZm9jdXNlZCBpdGVtLgogICAgICAgKi8KICAgICAgX2ZvY3VzZWRWaXJ0dWFsSW5kZXg6IC0xLAoKICAgICAgLyoqCiAgICAgICAqIFRoZSBtYXhpbXVtIGl0ZW1zIHBlciByb3cKICAgICAgICovCiAgICAgIF9pdGVtc1BlclJvdzogMSwKCiAgICAgIC8qKgogICAgICAgKiBUaGUgaGVpZ2h0IG9mIHRoZSByb3cgaW4gZ3JpZCBsYXlvdXQuCiAgICAgICAqLwogICAgICBfcm93SGVpZ2h0OiAwLAoKICAgICAgLyoqCiAgICAgICAqIFRoZSBjb3N0IG9mIHN0YW1waW5nIGEgdGVtcGxhdGUgaW4gbXMuCiAgICAgICAqLwogICAgICBfdGVtcGxhdGVDb3N0OiAwLAoKICAgICAgLyoqCiAgICAgICAqIFRoZSBib3R0b20gb2YgdGhlIHBoeXNpY2FsIGNvbnRlbnQuCiAgICAgICAqLwogICAgICBnZXQgX3BoeXNpY2FsQm90dG9tKCkgewogICAgICAgIHJldHVybiB0aGlzLl9waHlzaWNhbFRvcCArIHRoaXMuX3BoeXNpY2FsU2l6ZTsKICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgKiBUaGUgYm90dG9tIG9mIHRoZSBzY3JvbGwuCiAgICAgICAqLwogICAgICBnZXQgX3Njcm9sbEJvdHR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gpIHsKICAgICAgICByZXR1cm4gdGhpcy5fdmlld3BvcnRIZWlnaHQgPT09IDAgPyBJbmZpbml0eSA6IHRoaXMuX3ZpZXdwb3J0SGVpZ2h0ICogdGhpcy5fbWF4UGFnZXM7CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogVHJ1ZSBpZiB0aGUgY3VycmVudCBsaXN0IGlzIHZpc2libGUuCiAgICAgICAqLwogICAgICBnZXQgX2lzVmlzaWJsZSgpIHsKICAgICAgICByZXR1cm4gQm9vbGVhbih0aGlzLm9mZnNldFdpZHRoIHx8IHRoaXMub2Zmc2V0SGVpZ2h0KTsKICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgKiBHZXRzIHRoZSBpbmRleCBvZiB0aGUgZmlyc3QgdmlzaWJsZSBpdGVtIGluIHRoZSB2aWV3cG9ydC4KICAgICAgICoKICAgICAgICogQHR5cGUge251bWJlcn0KICAgICAgICovCiAgICAgIGdldCBmaXJzdFZpc2libGVJbmRleCgpIHsKICAgICAgICB2YXIgaWR4ID0gdGhpcy5fZmlyc3RWaXNpYmxlSW5kZXhWYWw7CiAgICAgICAgaWYgKGlkeCA9PSBudWxsKSB7CiAgICAgICAgICB2YXIgcGh5c2ljYWxPZmZzZXQgPSB0aGlzLl9waHlzaWNhbFRvcCArIHRoaXMuX3Njcm9sbE9mZnNldDsKCiAgICAgICAgICBpZHggPSB0aGlzLl9pdGVyYXRlSXRlbXMoZnVuY3Rpb24ocGlkeCwgdmlkeCkgewogICAgICAgICAgICBwaHlzaWNhbE9mZnNldCArPSB0aGlzLl9nZXRQaHlzaWNhbFNpemVJbmNyZW1lbnQocGlkeCk7CgogICAgICAgICAgICBpZiAocGh5c2ljYWxPZmZzZXQgPiB0aGlzLl9zY3JvbGxQb3NpdGlvbikgewogICAgICAgICAgICAgIHJldHVybiB0aGlzLmdyaWQgPyB2aWR4IC0gKHZpZHggJSB0aGlzLl9pdGVtc1BlclJvdykgOiB2aWR4OwogICAgICAgICAgICB9CiAgIC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DsKICAgICAgICAgIG9mZnNldENvbnRlbnQgPSBib3R0b20gLSBzY3JvbGxCb3R0b207CiAgICAgICAgfQogICAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1jb25zdGFudC1jb25kaXRpb24KICAgICAgICB3aGlsZSAodHJ1ZSkgewogICAgICAgICAgcGh5c2ljYWxJdGVtSGVpZ2h0ID0gdGhpcy5fZ2V0UGh5c2ljYWxTaXplSW5jcmVtZW50KGl0aCk7CiAgICAgICAgICBvZmZzZXRDb250ZW50ID0gb2Zmc2V0Q29udGVudCAtIHBoeXNpY2FsSXRlbUhlaWdodDsKICAgICAgICAgIGlmIChpZHhzLmxlbmd0aCA+PSBwaHlzaWNhbENvdW50IHx8IG9mZnNldENvbnRlbnQgPD0gcHJvdGVjdGVkT2Zmc2V0Q29udGVudCkgewogICAgICAgICAgICBicmVhazsKICAgICAgICAgIH0KICAgICAgICAgIGlmIChmcm9tVG9wKSB7CiAgICAgICAgICAgIC8vIENoZWNrIHRoYXQgaW5kZXggaXMgd2l0aGluIHRoZSB2YWxpZCByYW5nZS4KICAgICAgICAgICAgaWYgKHZpcnR1YWxFbmQgKyBpZHhzLmxlbmd0aCArIDEgPj0gdGhpcy5fdmlydHVhbENvdW50KSB7CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gQ2hlY2sgdGhhdCB0aGUgaW5kZXggaXMgbm90IHZpc2libGUuCiAgICAgICAgICAgIGlmICh0b3AgKyBwaHlzaWNhbEl0ZW1IZWlnaHQgPj0gc2Nyb2xsVG9wIC0gdGhpcy5fc2Nyb2xsT2Zmc2V0KSB7CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWR4cy5wdXNoKGl0aCk7CiAgICAgICAgICAgIHRvcCA9IHRvcCArIHBoeXNpY2FsSXRlbUhlaWdodDsKICAgICAgICAgICAgaXRoID0gKGl0aCArIDEpICUgcGh5c2ljYWxDb3VudDsKICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIC8vIENoZWNrIHRoYXQgaW5kZXggaXMgd2l0aGluIHRoZSB2YWxpZCByYW5nZS4KICAgICAgICAgICAgaWYgKHZpcnR1YWxTdGFydCAtIGlkeHMubGVuZ3RoIDw9IDApIHsKICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBDaGVjayB0aGF0IHRoZSBpbmRleCBpcyBub3QgdmlzaWJsZS4KICAgICAgICAgICAgaWYgKHRvcCArIHRoaXMuX3BoeXNpY2FsU2l6ZSAtIHBoeXNpY2FsSXRlbUhlaWdodCA8PSBzY3JvbGxCb3R0b20pIHsKICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZHhzLnB1c2goaXRoKTsKICAgICAgICAgICAgdG9wID0gdG9wIC0gcGh5c2ljYWxJdGVtSGVpZ2h0OwogICAgICAgICAgICBpdGggPSAoaXRoID09PSAwKSA/IHBoeXNpY2FsQ291bnQgLSAxIDogaXRoIC0gMTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIHtpbmRleGVzOiBpZHhzLCBwaHlzaWNhbFRvcDogdG9wIC0gdGhpcy5fc2Nyb2xsT2Zmc2V0fTsKICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgKiBVcGRhdGUgdGhlIGxpc3Qgb2YgaXRlbXMsIHN0YXJ0aW5nIGZyb20gdGhlIGBfdmlydHVhbFN0YXJ0YCBpdGVtLgogICAgICAgKiBAcGFyYW0geyFBcnJheTxudW1iZXI+PX0gaXRlbVNldAogICAgICAgKiBAcGFyYW0geyFBcnJheTxudW1iZXI+PX0gbW92aW5nVXAKICAgICAgICovCiAgICAgIF91cGRhdGU6IGZ1bmN0aW9uKGl0ZW1TZXQsIG1vdmluZ1VwKSB7CiAgICAgICAgaWYgKChpdGVtU2V0ICYmIGl0ZW1TZXQubGVuZ3RoID09PSAwKS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gIGlmICh0aGlzLl92aXJ0dWFsRW5kID49IHRoaXMuX3ZpcnR1YWxDb3VudCAtIDEgfHwgbmV4dEluY3JlYXNlID09PSAwKSA7IGVsc2UgaWYgKCF0aGlzLl9pc0NsaWVudEZ1bGwoKSkgewogICAgICAgICAgdGhpcy5fZGVib3VuY2UoCiAgICAgICAgICAgICdfaW5jcmVhc2VQb29sSWZOZWVkZWQnLAogICAgICAgICAgICB0aGlzLl9pbmNyZWFzZVBvb2xJZk5lZWRlZC5iaW5kKAogICAgICAgICAgICAgIHRoaXMsCiAgICAgICAgICAgICAgbmV4dEluY3JlYXNlCiAgICAgICAgICAgICksIE1JQ1JPX1RBU0spOwogICAgICAgIH0gZWxzZSBpZiAodGhpcy5fcGh5c2ljYWxTaXplIDwgdGhpcy5fb3B0UGh5c2ljYWxTaXplKSB7CiAgICAgICAgICAvLyBZaWVsZCBhbmQgaW5jcmVhc2UgdGhlIHBvb2wgZHVyaW5nIGlkbGUgdGltZSB1bnRpbCB0aGUgcGh5c2ljYWwgc2l6ZSBpcyBvcHRpbWFsLgogICAgICAgICAgdGhpcy5fZGVib3VuY2UoCiAgICAgICAgICAgICdfaW5jcmVhc2VQb29sSWZOZWVkZWQnLAogICAgICAgICAgICB0aGlzLl9pbmNyZWFzZVBvb2xJZk5lZWRlZC5iaW5kKAogICAgICAgICAgICAgIHRoaXMsCiAgICAgICAgICAgICAgdGhpcy5fY2xhbXAoTWF0aC5yb3VuZCg1MCAvIHRoaXMuX3RlbXBsYXRlQ29zdCksIDEsIG5leHRJbmNyZWFzZSkKICAgICAgICAgICAgKSwgSURMRV9USU1FKTsKICAgICAgICB9CiAgICAgIH0sCgogICAgICAvKioKICAgICAgICogUmVuZGVycyB0aGUgYSBuZXcgbGlzdC4KICAgICAgICovCiAgICAgIF9yZW5kZXI6IGZ1bmN0aW9uKCkgewogICAgICAgIGlmICghdGhpcy5pc0F0dGFjaGVkIHx8ICF0aGlzLl9pc1Zpc2libGUpIHsKICAgICAgICAg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h0aGlzLCBwaWR4LCB2aWR4KSkgIT0gbnVsbCkgewogICAgICAgICAgICAgIHJldHVybiBydG47CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICAgIGZvciAocGlkeCA9IDA7IHBpZHggPCB0aGlzLl9waHlzaWNhbFN0YXJ0OyBwaWR4KyssIHZpZHgrKykgewogICAgICAgICAgICBpZiAoKHJ0biA9IGZuLmNhbGwodGhpcywgcGlkeCwgdmlkeCkpICE9IG51bGwpIHsKICAgICAgICAgICAgICByZXR1cm4gcnRuOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9LAoKICAgICAgLyoqCiAgICAgICAqIFJldHVybnMgdGhlIHZpcnR1YWwgaW5kZXggZm9yIGEgZ2l2ZW4gcGh5c2ljYWwgaW5kZXgKICAgICAgICoKICAgICAgICogQHBhcmFtIHtudW1iZXJ9IHBpZHggUGh5c2ljYWwgaW5kZXgKICAgICAgICogQHJldHVybiB7bnVtYmVyfQogICAgICAgKi8KICAgICAgX2NvbXB1dGVWaWR4OiBmdW5jdGlvbihwaWR4KSB7CiAgICAgICAgaWYgKHBpZHggPj0gdGhpcy5fcGh5c2ljYWxTdGFydCkgewogICAgICAgICAgcmV0dXJuIHRoaXMuX3ZpcnR1YWxTdGFydCArIChwaWR4IC0gdGhpcy5fcGh5c2ljYWxTdGFydCk7CiAgICAgICAgfQogICAgICAgIHJldHVybiB0aGlzLl92aXJ0dWFsU3RhcnQgKyAodGhpcy5fcGh5c2ljYWxDb3VudCAtIHRoaXMuX3BoeXNpY2FsU3RhcnQpICsgcGlkeDsKICAgICAgfSwKCiAgICAgIC8qKgogICAgICAgKiBVcGRhdGVzIHRoZSBoZWlnaHQgZm9yIGEgZ2l2ZW4gc2V0IG9mIGl0ZW1zLgogICAgICAgKgogICAgICAgKiBAcGFyYW0geyFBcnJheTxudW1iZXI+PX0gaXRlbVNldAogICAgICAgKi8KICAgICAgX3VwZGF0ZU1ldHJpY3M6IGZ1bm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cmlnaHQgKGMpIDIwMTcgVmFhZGluIEx0ZC4KICAgIFRoaXMgcHJvZ3JhbSBpcyBhdmFpbGFibGUgdW5kZXIgQXBhY2hlIExpY2Vuc2UgVmVyc2lvbiAyLjAsIGF2YWlsYWJsZSBhdCBodHRwczovL3ZhYWRpbi5jb20vbGljZW5zZS8KICAgICovCiAgICAvKioKICAgICAqIFRoaXMgRWxlbWVudCBpcyB1c2VkIGludGVybmFsbHkgYnkgdmFhZGluLWdyaWQuCiAgICAgKgogICAgICogQHByaXZhdGUKICAgICAqLwogICAgY2xhc3MgR3JpZFNjcm9sbGVyRWxlbWVudCBleHRlbmRzIFBvbHltZXJJcm9uTGlzdCB7CgogICAgICBzdGF0aWMgZ2V0IGlzKCkgewogICAgICAgIHJldHVybiAndmFhZGluLWdyaWQtc2Nyb2xsZXInOwogICAgICB9CgogICAgICBzdGF0aWMgZ2V0IHByb3BlcnRpZXMoKSB7CiAgICAgICAgcmV0dXJuIHsKICAgICAgICAgIHNpemU6IHsKICAgICAgICAgICAgdHlwZTogTnVtYmVyLAogICAgICAgICAgICBub3RpZnk6IHRydWUKICAgICAgICAgIH0sCiAgICAgICAgICBfdmlkeE9mZnNldDogewogICAgICAgICAgICB2YWx1ZTogMAogICAgICAgICAgfQogICAgICAgIH07CiAgICAgIH0KCiAgICAgIHN0YXRpYyBnZXQgb2JzZXJ2ZXJzKCkgewogICAgICAgIHJldHVybiBbCiAgICAgICAgICAnX2VmZmVjdGl2ZVNpemVDaGFuZ2VkKF9lZmZlY3RpdmVTaXplKScKICAgICAgICBdOwogICAgICB9CgogICAgICBjb25uZWN0ZWRDYWxsYmFjaygpIHsKICAgICAgICBzdXBlci5jb25uZWN0ZWRDYWxsYmFjaygpOwogICAgICAgIHRoaXMuX3Njcm9sbEhhbmRsZXIoKTsKICAgICAgfQoKICAgICAgLyoqCiAgICAgICogQHByb3RlY3RlZAogICAgICAqLwogICAgICBfdXBkYXRlU2Nyb2xsZXJJdGVtKGl0ZW0sIGluZGV4KSB7fQogICAgICAvKioKICAgICAgKiBAcHJvdGVjdGVkCiAgICAgICovCiAgICAgIF9hZnRlclNjcm9sbCgpIHt9CiAgICAgIC8qKgogICAgICAqIEBwcm90ZWN0ZWQKICAgICAgKi8KICAgICAgX2dldFJvd1RhcmdldCgpIHt9CiAgICAgIC8qKgogICAgICAqIEBwcm90ZWN0ZWQKICAgICAgKi8KICAgICAgX2NyZWF0ZVNjcm9sbGVyUm93cygpIHt9CiAgICAgIC8qKgogICAgICAqIEBwcm90ZWN0ZWQKICAgICAgKi8KICAgICAgX2NhblBvcHVsYXRlKCkge30KCiAgICAgIC8qKgogICAgICAqIEBwcml2YXRlCiAgICAgICovCiAgICAgIHNjcm9sbFRvSW5kZXgoaW5kZXgpIHsKICAgICAgICB0aGlzLl93YXJuUHJpdmF0ZUFQSUFjY2Vzcygnc2Nyb2xsVG9JbmRleCcpOwoKICAgICAgICBpZiAoaW5kZXggPiAwKSB7CiAgICAgICAgICB0aGlzLl9wZW5kaW5nU2Nyb2xsVG9JbmRleCA9IG51bGw7CiAgICAgICAgfQogICAgICAgIGlmICghcGFyc2VJbnQodGhpcy4kLml0ZW1zLnN0eWxlLmJvcmRlclRvcFdpZHRoKSAmJiBpbmRleCA+IDApIHsKICAgICAgICAgIC8vIFNjaGVkdWxlIGFub3RoZXIgc2Nyb2xsIHRvIGJlIGludm9rZWQgb25jZSBpbml0IGlzIGNvbXBsZXRlCiAgICAgICAgICB0aGlzLl9wZW5kaW5nU2Nyb2xsVG9JbmRleCA9IGluZGV4OwogICAgICAgIH0KCiAgICAgICAgdGhpcy5fc2Nyb2xsaW5nVG9JbmRleCA9IHRydWU7CiAgICAgICAgaW5kZXggPSBNYXRoLm1pbihNYXRoLm1heChpbmRleCwgMCksIHRoaXMuX2VmZmVjdGl2ZVNpemUgLSAxKTsKICAgICAgICB0aGlzLiQudGFibGUuc2Nyb2xsVG9wID0gaW5kZXggLyB0aGlzLl9lZmZlY3RpdmVTaXplICogKHRoaX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lc3RpbWF0ZWRNaXNzaW5nUm93Q291bnQgPiAwICYmIHRoaXMuX29wdFBoeXNpY2FsU2l6ZSAhPT0gSW5maW5pdHkpIHsKICAgICAgICAgICAgICAgIHN1cGVyLl9pbmNyZWFzZVBvb2xJZk5lZWRlZChlc3RpbWF0ZWRNaXNzaW5nUm93Q291bnQpOwogICAgICAgICAgICAgICAgLy8gRW5zdXJlIHRoZSByb3dzIGFyZSBpbiBvcmRlciBhZnRlciBpbmNyZWFzaW5nIHBvb2wKICAgICAgICAgICAgICAgIHRoaXMuX19yZW9yZGVyQ2hpbGROb2RlcygpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICB9CgogICAgICBfX3Jlb3JkZXJDaGlsZE5vZGVzKCkgewogICAgICAgIGNvbnN0IGNoaWxkTm9kZXMgPSBBcnJheS5mcm9tKHRoaXMuJC5pdGVtcy5jaGlsZE5vZGVzKTsKICAgICAgICBjb25zdCByb3dzSW5PcmRlciA9ICEhY2hpbGROb2Rlcy5yZWR1Y2UoKGluT3JkZXIsIGN1cnJlbnQsIGN1cnJlbnRJbmRleCwgYXJyYXkpID0+IHsKICAgICAgICAgIGlmIChjdXJyZW50SW5kZXggPT09IDAgfHwgYXJyYXlbY3VycmVudEluZGV4IC0gMV0uaW5kZXggPT09IGN1cnJlbnQuaW5kZXggLSAxKSB7CiAgICAgICAgICAgIHJldHVybiBpbk9yZGVyOwogICAgICAgICAgfQogICAgICAgIH0sIHRydWUpOwoKICAgICAgICBpZiAoIXJvd3NJbk9yZGVyKSB7CiAgICAgICAgICBjaGlsZE5vZGVzLnNvcnQoKHJvdzEsIHJvdzIpID0+IHsKICAgICAgICAgICAgcmV0dXJuIHJvdzEuaW5kZXggLSByb3cyLmluZGV4OwogICAgICAgICAgfSkuZm9yRWFjaChyb3cgPT4gdGhpcy4kLml0ZW1zLmFwcGVuZENoaWxkKHJvdykpOwogICAgICAgIH0KICAgICAgfQoKICAgICAgX2NyZWF0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ZnNldChkZWx0YSkgewogICAgICAgIGlmIChNYXRoLmFicyhkZWx0YSkgPiAxMDAwMCkgewogICAgICAgICAgaWYgKHRoaXMuX25vU2NhbGUpIHsKICAgICAgICAgICAgdGhpcy5fbm9TY2FsZSA9IGZhbHNlOwogICAgICAgICAgICByZXR1cm47CiAgICAgICAgICB9CiAgICAgICAgICBjb25zdCBzY2FsZSA9IHRoaXMuJC50YWJsZS5zY3JvbGxUb3AgLyAodGhpcy4kLnRhYmxlLnNjcm9sbEhlaWdodCAtIHRoaXMuJC50YWJsZS5vZmZzZXRIZWlnaHQpOwogICAgICAgICAgY29uc3Qgb2Zmc2V0ID0gc2NhbGUgKiB0aGlzLl9lZmZlY3RpdmVTaXplOwogICAgICAgICAgdGhpcy5fdmlkeE9mZnNldCA9IE1hdGgucm91bmQob2Zmc2V0IC0gc2NhbGUgKiB0aGlzLl92aXJ0dWFsQ291bnQpOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAvLyBNYWtlIHN1cmUgdXNlciBjYW4gYWx3YXlzIHN3aXBlL3doZWVsIHNjcm9sbCB0byB0aGUgc3RhcnQgYW5kIGVuZAogICAgICAgICAgY29uc3Qgb2xkT2Zmc2V0ID0gdGhpcy5fdmlkeE9mZnNldCB8fCAwOwogICAgICAgICAgY29uc3QgdGhyZXNob2xkID0gMTAwMDsKICAgICAgICAgIGNvbnN0IG1heFNoaWZ0ID0gMTAwOwogICAgICAgICAgLy8gQXQgc3RhcnQKICAgICAgICAgIGlmICh0aGlzLl9zY3JvbGxUb3AgPT09IDApIHsKICAgICAgICAgICAgdGhpcy5fdmlkeE9mZnNldCA9IDA7CiAgICAgICAgICAgIGlmIChvbGRPZmZzZXQgIT09IHRoaXMuX3ZpZHhPZmZzZXQpIHsKICAgICAgICAgICAgICBzdXBlci5zY3JvbGxUb0luZGV4KDApOwogICAgICAgICAgICB9CiAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMuZmlyc3RWaXNpYmxlSW5kZXggPCB0aHJ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X2ExMXlVcGRhdGVHcmlkU2l6ZShzaXplLCBfY29sdW1uVHJlZSkgewogICAgICAgIGlmIChzaXplID09PSB1bmRlZmluZWQgfHwgX2NvbHVtblRyZWUgPT09IHVuZGVmaW5lZCkgewogICAgICAgICAgcmV0dXJuOwogICAgICAgIH0KCiAgICAgICAgY29uc3QgYm9keUNvbHVtbnMgPSBfY29sdW1uVHJlZVtfY29sdW1uVHJlZS5sZW5ndGggLSAxXTsKICAgICAgICB0aGlzLiQudGFibGUuc2V0QXR0cmlidXRlKAogICAgICAgICAgJ2FyaWEtcm93Y291bnQnLAogICAgICAgICAgc2l6ZSArIHRoaXMuX2ExMXlHZXRIZWFkZXJSb3dDb3VudChfY29sdW1uVHJlZSkgKyB0aGlzLl9hMTF5R2V0Rm9vdGVyUm93Q291bnQoX2NvbHVtblRyZWUpCiAgICAgICAgKTsKICAgICAgICB0aGlzLiQudGFibGUuc2V0QXR0cmlidXRlKCdhcmlhLWNvbGNvdW50JywgYm9keUNvbHVtbnMgJiYgYm9keUNvbHVtbnMubGVuZ3RoIHx8IDApOwoKICAgICAgICB0aGlzLl9hMTF5VXBkYXRlSGVhZGVyUm93cygpOwogICAgICAgIHRoaXMuX2ExMXlVcGRhdGVGb290ZXJSb3dzKCk7CiAgICAgIH0KCiAgICAgIF9hMTF5VXBkYXRlSGVhZGVyUm93cygpIHsKICAgICAgICBBcnJheS5mcm9tKHRoaXMuJC5oZWFkZXIuY2hpbGRyZW4pLmZvckVhY2goKGhlYWRlclJvdywgaW5kZXgpID0+CiAgICAgICAgICBoZWFkZXJSb3cuc2V0QXR0cmlidXRlKCdhcmlhLXJvd2luZGV4JywgaW5kZXggKyAxKQogICAgICAgICk7CiAgICAgIH0KCiAgICAgIF9hMTF5VXBkYXRlRm9vdGVyUm93cygpIHsKICAgICAgICBBcnJheS5mcm9tKHRoaXMuJC5mb290ZXIuY2hpbGRyZW4pLmZvckVhY2goKGZvb3RlclJvdywgaW5kZXgpID0+CiAgICAgICAgICB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CA9PiB7CiAgICAgICAgICBpZiAodHlwZW9mIGRldGFpbHNPcGVuZWQgPT09ICdib29sZWFuJykgewogICAgICAgICAgICBjZWxsLnNldEF0dHJpYnV0ZSgnYXJpYS1leHBhbmRlZCcsIGRldGFpbHNPcGVuZWQpOwogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgaWYgKGNlbGwuaGFzQXR0cmlidXRlKCdhcmlhLWV4cGFuZGVkJykpIHsKICAgICAgICAgICAgICBjZWxsLnJlbW92ZUF0dHJpYnV0ZSgnYXJpYS1leHBhbmRlZCcpOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfSk7CiAgICAgIH0KCiAgICAgIF9hMTF5U2V0Um93RGV0YWlsc0NlbGwocm93LCBkZXRhaWxzQ2VsbCkgewogICAgICAgIEFycmF5LmZyb20ocm93LmNoaWxkcmVuKS5mb3JFYWNoKGNlbGwgPT4gewogICAgICAgICAgaWYgKGNlbGwgIT09IGRldGFpbHNDZWxsKSB7CiAgICAgICAgICAgIGNlbGwuc2V0QXR0cmlidXRlKCdhcmlhLWNvbnRyb2xzJywgZGV0YWlsc0NlbGwuaWQpOwogICAgICAgICAgfQogICAgICAgIH0pOwogICAgICB9CgogICAgICBfYTExeVVwZGF0ZUNlbGxDb2xzcGFuKGNlbGwsIGNvbHNwYW4pIHsKICAgICAgICBjZWxsLnNldEF0dHJpYnV0ZSgnYXJpYS1jb2xzcGFuJywgTnVtYmVyKGNvbHNwYW4pKTsKICAgICAgfQoKICAgICAgX2ExMXlVcGRhdGVTb3J0ZXJzKCkgewogICAgICAgIEFycmF5LmZyb20odGhpcy5xdWVyeVNlbGVjdG9yQWxsKCd2YWFkaW4tZ3JpZC1zb3J0ZXInKSkuZm9yRWFjaChzb3J0ZXIgPT4gewogICAgICAgICAgbGV0IGNlbGxDb250ZW50ID0gc29ydGVyLnBhcmVudE5vZGU7CiAgICAgICAgICB3aGlsZSAoY2VsbENvbnRlbnQgJiYgY2VsbENvbnRlbn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c2lvbiAyLjAsIGF2YWlsYWJsZSBhdCBodHRwczovL3ZhYWRpbi5jb20vbGljZW5zZS8KICAgICovCgogICAgLyoqCiAgICAgKiBAcG9seW1lck1peGluCiAgICAgKi8KICAgIGNvbnN0IEFycmF5RGF0YVByb3ZpZGVyTWl4aW4gPSBzdXBlckNsYXNzID0+IGNsYXNzIEFycmF5RGF0YVByb3ZpZGVyTWl4aW4gZXh0ZW5kcyBzdXBlckNsYXNzIHsKCiAgICAgIHN0YXRpYyBnZXQgcHJvcGVydGllcygpIHsKCiAgICAgICAgcmV0dXJuIHsKICAgICAgICAgIC8qKgogICAgICAgICAgICogQW4gYXJyYXkgY29udGFpbmluZyB0aGUgaXRlbXMgd2hpY2ggd2lsbCBiZSBzdGFtcGVkIHRvIHRoZSBjb2x1bW4gdGVtcGxhdGUKICAgICAgICAgICAqIGluc3RhbmNlcy4KICAgICAgICAgICAqLwogICAgICAgICAgaXRlbXM6IEFycmF5CgogICAgICAgIH07CiAgICAgIH0KCiAgICAgIHN0YXRpYyBnZXQgb2JzZXJ2ZXJzKCkgewogICAgICAgIHJldHVybiBbCiAgICAgICAgICAnX2l0ZW1zQ2hhbmdlZChpdGVtcywgaXRlbXMuKiwgaXNBdHRhY2hlZCknCiAgICAgICAgXTsKICAgICAgfQoKICAgICAgX2l0ZW1zQ2hhbmdlZChpdGVtcywgc3BsaWNlcywgaXNBdHRhY2hlZCkgewogICAgICAgIGlmICghaXNBdHRhY2hlZCkgewogICAgICAgICAgcmV0dXJuOwogICAgICAgIH0KICAgICAgICBpZiAoIUFycmF5LmlzQXJyYXkoaXRlbXMpKSB7CiAgICAgICAgICBpZiAoaXRlbXMgPT09IHVuZGVmaW5lZCB8fCBpdGVtcyA9PT0gbnVsbCkgewogICAgICAgICAgICB0aGlzLnNpemUgPSAwOwogICAgICAgICAgfQogICAgICAgICAgaWYgKHRoaXMuZGF0YVByb3ZpZGVyID09PSB0aGlzLl9hcnJheURhdGFQcm92aWRlcikgewogICAgICAg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KHN0YXJ0LCBlbmQpOwogICAgICAgIGNiKHNsaWNlLCBpdGVtcy5sZW5ndGgpOwogICAgICB9CgogICAgICAvKioKICAgICAgICogQ2hlY2sgYXJyYXkgb2YgZmlsdGVycy9zb3J0ZXJzIGZvciBwYXRocyB2YWxpZGl0eSwgY29uc29sZS53YXJuIGludmFsaWQgaXRlbXMKICAgICAgICogQHBhcmFtIHtBcnJheX0gIGFycmF5VG9DaGVjayBUaGUgYXJyYXkgb2YgZmlsdGVycy9zb3J0ZXJzIHRvIGNoZWNrCiAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBhY3Rpb24gICAgICAgVGhlIG5hbWUgb2YgYWN0aW9uIHRvIGluY2x1ZGUgaW4gd2FybmluZyAoZmlsdGVyaW5nLCBzb3J0aW5nKQogICAgICAgKiBAcGFyYW0ge0FycmF5fSAgaXRlbXMKICAgICAgICovCiAgICAgIF9jaGVja1BhdGhzKGFycmF5VG9DaGVjaywgYWN0aW9uLCBpdGVtcykgewogICAgICAgIGlmICghaXRlbXMubGVuZ3RoKSB7CiAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgfQoKICAgICAgICBsZXQgcmVzdWx0ID0gdHJ1ZTsKCiAgICAgICAgZm9yICh2YXIgaSBpbiBhcnJheVRvQ2hlY2spIHsKICAgICAgICAgIGNvbnN0IHBhdGggPSBhcnJheVRvQ2hlY2tbaV0ucGF0aDsKCiAgICAgICAgICAvLyBza2lwIHNpbXBsZSBwYXRocwogICAgICAgICAgaWYgKCFwYXRoIHx8IHBhdGguaW5kZXhPZignLicpID09PSAtMSkgewogICAgICAgICAgICBjb250aW51ZTsKICAgICAgICAgIH0KCiAgICAgICAgICBjb25zdCBwYXJlbnRQcm9wZXJ0eSA9IHBhdGgucmVwbGFjZSgvXC5bXlwuXSokLywgJycpOyAvLyBhLmIuYyAtPiBhLmIKICAgICAgICAgIGlmIChCYXNlLmdldChwYXJlbnRQcm9wZXJ0eSwgaXRlbXNbMF0pID09PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgY29uc29sZS53YXJuKGBQYXRoICIke3BhdGh9IiB1c2VkIGZvciAke2FjdGlvbn0gZG9lcyBub3QgZXhpc3QgaW4gYWxsIG9mIHRoZSBpdGVtcywgJHthY3Rpb259IGlzIGRpc2FibGVkLmApOwogICAgICAgICAgICByZXN1bHQgPSBmYWxzZTsKICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgIH0KCiAgICAgIF9tdWx0aVNvcnQoYSwgYikgewogICAgICAgIHJldHVybiB0aGlzLl9zb3J0ZXJzLm1hcChzb3J0ID0+IHsKICAgICAgICAgIGlmIChzb3J0LmRpcmVjdGlvbiA9PT0gJ2FzYycpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2NvbXBhcmUoQmFzZS5nZXQoc29ydC5wYXRoLCBhKSwgQmFzZS5nZXQoc29ydC5wYXRoLCBiKSk7CiAgICAgICAgICB9IGVsc2UgaWYgKHNvcnQuZGlyZWN0aW9uID09PSAnZGVzYycpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2NvbXBhcmUoQmFzZS5nZXQoc29ydC5wYXRoLCBiKSwgQmFzZS5nZXQoc29ydC5wYXRoLCBhKSk7CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gMDsKICAgICAgICB9KS5yZWR1Y2UoKHAsIG4pID0+IHsKICAgICAgICAgIHJldHVybiBwID8gcCA6IG47CiAgICAgICAgfSwgMCk7CiAgICAgIH0KCiAgICAgIF9ub3JtYWxpemVFbXB0eVZhbHVlKHZhbHVlKSB7CiAgICAgICAgaWYgKFt1bmRlZmluZWQsIG51bGxdLmluZGV4T2YodmFsdWUpID49IDApIHsKICAgICAgICAgIHJldHVybiAnJzsKICAgICAgICB9IGVsc2UgaWYgKGlzTmFOKHZhbHVlKSkgewogICAgICAgICAgcmV0dXJuIHZhbHVlLnRvU3RyaW5nKCk7CiAgICAgICAgfSBlbHNlIHsKICA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dldC5nZXRBdHRyaWJ1dGUoJ3BhcnQnKSA9PT0gJ3Jlc2l6ZS1oYW5kbGUnICYmIGUucHJldmVudERlZmF1bHQoKSk7CiAgICAgIH0KCiAgICAgIF9vbkhlYWRlclRyYWNrKGUpIHsKICAgICAgICBjb25zdCBoYW5kbGUgPSBlLnRhcmdldDsKICAgICAgICBpZiAoaGFuZGxlLmdldEF0dHJpYnV0ZSgncGFydCcpID09PSAncmVzaXplLWhhbmRsZScpIHsKICAgICAgICAgIGNvbnN0IGNlbGwgPSBoYW5kbGUucGFyZW50RWxlbWVudDsKICAgICAgICAgIGxldCBjb2x1bW4gPSBjZWxsLl9jb2x1bW47CgogICAgICAgICAgdGhpcy5fdG9nZ2xlQXR0cmlidXRlKCdjb2x1bW4tcmVzaXppbmcnLCB0cnVlLCB0aGlzLiQuc2Nyb2xsZXIpOwoKICAgICAgICAgIC8vIEdldCB0aGUgdGFyZ2V0IGNvbHVtbiB0byByZXNpemUKICAgICAgICAgIHdoaWxlIChjb2x1bW4ubG9jYWxOYW1lID09PSAndmFhZGluLWdyaWQtY29sdW1uLWdyb3VwJykgewogICAgICAgICAgICBjb2x1bW4gPSBBcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChjb2x1bW4uX2NoaWxkQ29sdW1ucywgMCkKICAgICAgICAgICAgICAuc29ydChmdW5jdGlvbihhLCBiKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gYS5fb3JkZXIgLSBiLl9vcmRlcjsKICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgIC5maWx0ZXIoZnVuY3Rpb24oY29sdW1uKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gIWNvbHVtbi5oaWRkZW47CiAgICAgICAgICAgICAgfSkucG9wKCk7CiAgICAgICAgICB9CgogICAgICAgICAgY29uc3QgY29sdW1uUm93Q2VsbHMgPSBBcnJheS5mcm9tKHRoaXMuJC5oZWFkZXIucXVlcnlTZWxlY3RvckFsbCgnW3BhcnR+PSJyb3ciXTp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gcHJlY2VkaW5nIGNvbHVtbnMKICAgICAgICAgIGNvbHVtblJvd0NlbGxzCiAgICAgICAgICAgIC5zb3J0KAogICAgICAgICAgICAgIGZ1bmN0aW9uKGEsIGIpIHsKICAgICAgICAgICAgICAgIHJldHVybiBhLl9jb2x1bW4uX29yZGVyIC0gYi5fY29sdW1uLl9vcmRlcjsKICAgICAgICAgICAgICB9KQogICAgICAgICAgICAuZm9yRWFjaChmdW5jdGlvbihjZWxsLCBpbmRleCwgYXJyYXkpIHsKICAgICAgICAgICAgICBpZiAoaW5kZXggPCBhcnJheS5pbmRleE9mKHRhcmdldENlbGwpKSB7CiAgICAgICAgICAgICAgICBjZWxsLl9jb2x1bW4ud2lkdGggPSBjZWxsLm9mZnNldFdpZHRoICsgJ3B4JzsKICAgICAgICAgICAgICAgIGNlbGwuX2NvbHVtbi5mbGV4R3JvdyA9IDA7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKCiAgICAgICAgICBpZiAoZS5kZXRhaWwuc3RhdGUgPT09ICdlbmQnKSB7CiAgICAgICAgICAgIHRoaXMuX3RvZ2dsZUF0dHJpYnV0ZSgnY29sdW1uLXJlc2l6aW5nJywgZmFsc2UsIHRoaXMuJC5zY3JvbGxlcik7CiAgICAgICAgICAgIHRoaXMuZGlzcGF0Y2hFdmVudChuZXcgQ3VzdG9tRXZlbnQoJ2NvbHVtbi1yZXNpemUnLCB7CiAgICAgICAgICAgICAgZGV0YWlsOiB7cmVzaXplZENvbHVtbjogY29sdW1ufQogICAgICAgICAgICB9KSk7CiAgICAgICAgICB9CgogICAgICAgICAgLy8gTm90aWZ5IHJlc2l6ZQogICAgICAgICAgdGhpcy5fcmVzaXplSGFuZGxlcigpOwogICAgICAgIH0KICAgICAgfQoKICAgICAgLyoqCiAgICAgICogRmlyZWQgd2hlbiBhIGNvbHVtbiBpbiB0aGUgZ3JpZCBpcyByZXNpemVkIGJ5IHRoZSB1c2VyLgogICAgICAqCiAgICAgICogQGV2ZW50IGN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oKICAgICAgZ2V0Q2FjaGVBbmRJbmRleChpbmRleCkgewogICAgICAgIGxldCB0aGlzTGV2ZWxJbmRleCA9IGluZGV4OwogICAgICAgIGNvbnN0IGtleXMgPSBPYmplY3Qua2V5cyh0aGlzLml0ZW1DYWNoZXMpOwogICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwga2V5cy5sZW5ndGg7IGkrKykgewogICAgICAgICAgY29uc3QgZXhwYW5kZWRJbmRleCA9IE51bWJlcihrZXlzW2ldKTsKICAgICAgICAgIGNvbnN0IHN1YkNhY2hlID0gdGhpcy5pdGVtQ2FjaGVzW2V4cGFuZGVkSW5kZXhdOwogICAgICAgICAgaWYgKHRoaXNMZXZlbEluZGV4IDw9IGV4cGFuZGVkSW5kZXgpIHsKICAgICAgICAgICAgcmV0dXJuIHtjYWNoZTogdGhpcywgc2NhbGVkSW5kZXg6IHRoaXNMZXZlbEluZGV4fTsKICAgICAgICAgIH0gZWxzZSBpZiAodGhpc0xldmVsSW5kZXggPD0gZXhwYW5kZWRJbmRleCArIHN1YkNhY2hlLmVmZmVjdGl2ZVNpemUpIHsKICAgICAgICAgICAgcmV0dXJuIHN1YkNhY2hlLmdldENhY2hlQW5kSW5kZXgodGhpc0xldmVsSW5kZXggLSBleHBhbmRlZEluZGV4IC0gMSk7CiAgICAgICAgICB9CiAgICAgICAgICB0aGlzTGV2ZWxJbmRleCAtPSBzdWJDYWNoZS5lZmZlY3RpdmVTaXplOwogICAgICAgIH0KICAgICAgICByZXR1cm4ge2NhY2hlOiB0aGlzLCBzY2FsZWRJbmRleDogdGhpc0xldmVsSW5kZXh9OwogICAgICB9CgogICAgfTsKCiAgICAvKioKICAgICAqIEBwb2x5bWVyTWl4aW4KICAgICAqLwogICAgY29uc3QgRGF0YVByb3ZpZGVyTWl4aW4gPSBzdXBlckNsYXNzID0+IGNsYXNzIERhdGFQcm92aWRlck1peGluIGV4dGVuZHMgc3VwZXJDbGFzcyB7CgogICAgICBzdGF0aWMgZ2V0IHByb3BlcnRpZXMoKSB7CiAgICAgICAgcmV0dXJuIHsKCiAgICAgICAgICAvKioKICAgICAgICAgICAqIE51bWJlciBvZiBpdGVtcyBmZXRjaGVkIGF0IGEgdGltZSBmcm9tIHRoZSBkYXRhcHJvdmlkZXIuCiAgICAgICAgICAgKi8KICAgICAgICAgIHBhZ2VTaXplOiB7CiAgICAgICAgICAgIHR5cGU6IE51bWJlciwKICAgICAgICAgICAgdmFsdWU6IDUwLAogICAgICAgICAgICBvYnNlcnZlcjogJ19wYWdlU2l6ZUNoYW5nZWQnCiAgICAgICAgICB9LAoKICAgICAgICAgIC8qKgogICAgICAgICAgICogRnVuY3Rpb24gdGhhdCBwcm92aWRlcyBpdGVtcyBsYXppbHkuIFJlY2VpdmVzIGFyZ3VtZW50cyBgcGFyYW1zYCwgYGNhbGxiYWNrYAogICAgICAgICAgICoKICAgICAgICAgICAqIGBwYXJhbXMucGFnZWAgUmVxdWVzdGVkIHBhZ2UgaW5kZXgKICAgICAgICAgICAqCiAgICAgICAgICAgKiBgcGFyYW1zLnBhZ2VTaXplYCBDdXJyZW50IHBhZ2Ugc2l6ZQogICAgICAgICAgICoKICAgICAgICAgICAqIGBwYXJhbXMuZmlsdGVyc2AgQ3VycmVudGx5IGFwcGxpZWQgZmlsdGVycwogICAgICAgICAgICoKICAgICAgICAgICAqIGBwYXJhbXMuc29ydE9yZGVyc2AgQ3VycmVudGx5IGFwcGxpZWQgc29ydGluZyBvcmRlcnMKICAgICAgICAgICAqCiAgICAgICAgICAgKiBgcGFyYW1zLnBhcmVudEl0ZW1gIFdoZW4gdHJlZSBpcyB1c2VkLCBhbmQgc3VibGV2ZWwgaXRlbXMKICAgICAgICAgICAqIGFyZSByZXF1ZXN0ZWQsIHJlZmVyZW5jZSB0byBwYXJlbnQgaXRlbSBvZiB0aGUgcmVxdWVzdGVkIHN1YmxldmVsLgogICAgICAgICAgICogT3RoZXJ3aXNlIGB1bmRlZmluZWRgLgogICAgICAgICAgICoKICAgICAgIC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uZXcgSXRlbUNhY2hlKHRoaXMpOwogICAgICAgICAgICAgIHJldHVybiBjYWNoZTsKICAgICAgICAgICAgfQogICAgICAgICAgfSwKCiAgICAgICAgICAvKioKICAgICAgICAgICAqIFBhdGggdG8gYW4gaXRlbSBzdWItcHJvcGVydHkgdGhhdCBpZGVudGlmaWVzIHRoZSBpdGVtLgogICAgICAgICAgICovCiAgICAgICAgICBpdGVtSWRQYXRoOiB7CiAgICAgICAgICAgIHR5cGU6IFN0cmluZywKICAgICAgICAgICAgdmFsdWU6IG51bGwKICAgICAgICAgIH0sCgogICAgICAgICAgLyoqCiAgICAgICAgICAgKiBBbiBhcnJheSB0aGF0IGNvbnRhaW5zIHRoZSBleHBhbmRlZCBpdGVtcy4KICAgICAgICAgICAqLwogICAgICAgICAgZXhwYW5kZWRJdGVtczogewogICAgICAgICAgICB0eXBlOiBPYmplY3QsCiAgICAgICAgICAgIG5vdGlmeTogdHJ1ZSwKICAgICAgICAgICAgdmFsdWU6ICgpID0+IFtdCiAgICAgICAgICB9CgogICAgICAgIH07CiAgICAgIH0KCiAgICAgIHN0YXRpYyBnZXQgb2JzZXJ2ZXJzKCkgewogICAgICAgIHJldHVybiBbCiAgICAgICAgICAnX3NpemVDaGFuZ2VkKHNpemUpJywKICAgICAgICAgICdfaXRlbUlkUGF0aENoYW5nZWQoaXRlbUlkUGF0aCknLAogICAgICAgICAgJ19leHBhbmRlZEl0ZW1zQ2hhbmdlZChleHBhbmRlZEl0ZW1zLiopJwogICAgICAgIF07CiAgICAgIH0KCiAgICAgIF9zaXplQ2hhbmdlZChzaXplKSB7CiAgICAgICAgY29uc3QgZGVsdGEgPSBzaXplIC0gdGhpcy5fY2FjaGUuc2l6ZTsKICAgICAgICB0aGlzLl9jYWNoZS5zaXplICs9IGRlbHRhOwogICAgICAgIHRoaXMuX2NhY2hlLmVmZmVjdGl2ZVNpemUgKz0gZGVsdGE7CiAgICAgICAgdGhpcy5fZWZmZWN0aXZlU2l6ZSA9IHRoaX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HRoaXMuX2hhc0RhdGEgJiYgdGhpcy5fY29sdW1uVHJlZTsKICAgICAgfQoKICAgICAgX2xvYWRQYWdlKHBhZ2UsIGNhY2hlKSB7CiAgICAgICAgLy8gbWFrZSBzdXJlIHNhbWUgcGFnZSBpc24ndCByZXF1ZXN0ZWQgbXVsdGlwbGUgdGltZXMuCiAgICAgICAgaWYgKCFjYWNoZS5wZW5kaW5nUmVxdWVzdHNbcGFnZV0gJiYgdGhpcy5kYXRhUHJvdmlkZXIpIHsKICAgICAgICAgIHRoaXMuX3NldExvYWRpbmcodHJ1ZSk7CiAgICAgICAgICBjYWNoZS5wZW5kaW5nUmVxdWVzdHNbcGFnZV0gPSB0cnVlOwogICAgICAgICAgY29uc3QgcGFyYW1zID0gewogICAgICAgICAgICBwYWdlLAogICAgICAgICAgICBwYWdlU2l6ZTogdGhpcy5wYWdlU2l6ZSwKICAgICAgICAgICAgc29ydE9yZGVyczogdGhpcy5fbWFwU29ydGVycygpLAogICAgICAgICAgICBmaWx0ZXJzOiB0aGlzLl9tYXBGaWx0ZXJzKCksCiAgICAgICAgICAgIHBhcmVudEl0ZW06IGNhY2hlLnBhcmVudEl0ZW0KICAgICAgICAgIH07CgogICAgICAgICAgdGhpcy5kYXRhUHJvdmlkZXIocGFyYW1zLCAoaXRlbXMsIHNpemUpID0+IHsKICAgICAgICAgICAgaWYgKHNpemUgIT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICAgIGNhY2hlLnNpemUgPSBzaXplOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgIGlmIChwYXJhbXMucGFyZW50SXRlbSkgewogICAgICAgICAgICAgICAgY2FjaGUuc2l6ZSA9IGl0ZW1zLmxlbmd0aDsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIGNvbnN0IGN1cnJlbnRJdGVtcyA9IEFycmF5LmZyb20odGhpcy4kLml0ZW1zLmNoaWxkcmVuKS5tYXAocm93ID0+IHJvdy5faXRl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S4KICAgICAgICAgIHRoaXMuX2xvYWRQYWdlKDAsIHRoaXMuX2NhY2hlLCAoKSA9PiB7CiAgICAgICAgICAgIGNvbnN0IGhhZERhdGEgPSB0aGlzLl9oYXNEYXRhOwogICAgICAgICAgICB0aGlzLl9oYXNEYXRhID0gdHJ1ZTsKICAgICAgICAgICAgaWYgKCFoYWREYXRhKSB7CiAgICAgICAgICAgICAgdGhpcy5ub3RpZnlSZXNpemUoKTsKICAgICAgICAgICAgfQogICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICB9CgogICAgICBfaXRlbXNFcXVhbChpdGVtMSwgaXRlbTIpIHsKICAgICAgICByZXR1cm4gdGhpcy5nZXRJdGVtSWQoaXRlbTEpID09PSB0aGlzLmdldEl0ZW1JZChpdGVtMik7CiAgICAgIH0KCiAgICAgIF9nZXRJdGVtSW5kZXhJbkFycmF5KGl0ZW0sIGFycmF5KSB7CiAgICAgICAgbGV0IHJlc3VsdCA9IC0xOwogICAgICAgIGFycmF5LmZvckVhY2goKGksIGlkeCkgPT4gewogICAgICAgICAgaWYgKHRoaXMuX2l0ZW1zRXF1YWwoaSwgaXRlbSkpIHsKICAgICAgICAgICAgcmVzdWx0ID0gaWR4OwogICAgICAgICAgfQogICAgICAgIH0pOwogICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgIH0KCiAgICB9OwoKICAgIC8qKgogICAgQGxpY2Vuc2UKICAgIENvcHlyaWdodCAoYykgMjAxNyBWYWFkaW4gTHRkLgogICAgVGhpcyBwcm9ncmFtIGlzIGF2YWlsYWJsZSB1bmRlciBBcGFjaGUgTGljZW5zZSBWZXJzaW9uIDIuMCwgYXZhaWxhYmxlIGF0IGh0dHBzOi8vdmFhZGluLmNvbS9saWNlbnNlLwogICAgKi8KCiAgICAvKioKICAgICAqIEBwb2x5bWVyTWl4aW4KICAgICAqLwogICAgY29uc3QgRHluYW1pY0NvbHVtbnNNaXhpbiA9IHN1cGVyQ2xhc3MgPT4gY2xhc3MgRHluYW1pY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ycjJbaV0gaW5zdGFuY2VvZiBBcnJheSkgewogICAgICAgICAgICAvLyByZWN1cnNlIGludG8gdGhlIG5lc3RlZCBhcnJheXMKICAgICAgICAgICAgaWYgKCF0aGlzLl9hcnJheUVxdWFscyhhcnIxW2ldLCBhcnIyW2ldKSkgewogICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgfQogICAgICAgICAgfSBlbHNlIGlmIChhcnIxW2ldICE9IGFycjJbaV0pIHsKICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgfQoKICAgICAgX2NoZWNrSW1wb3J0cygpIHsKICAgICAgICBbCiAgICAgICAgICAndmFhZGluLWdyaWQtY29sdW1uLWdyb3VwJywKICAgICAgICAgICd2YWFkaW4tZ3JpZC1maWx0ZXInLAogICAgICAgICAgJ3ZhYWRpbi1ncmlkLWZpbHRlci1jb2x1bW4nLAogICAgICAgICAgJ3ZhYWRpbi1ncmlkLXRyZWUtdG9nZ2xlJywKICAgICAgICAgICd2YWFkaW4tZ3JpZC1zZWxlY3Rpb24tY29sdW1uJywKICAgICAgICAgICd2YWFkaW4tZ3JpZC1zb3J0LWNvbHVtbicsCiAgICAgICAgICAndmFhZGluLWdyaWQtc29ydGVyJwogICAgICAgIF0uZm9yRWFjaChlbGVtZW50TmFtZSA9PiB7CiAgICAgICAgICB2YXIgZWxlbWVudCA9IHRoaXMucXVlcnlTZWxlY3RvcihlbGVtZW50TmFtZSk7CiAgICAgICAgICBpZiAoZWxlbWVudCAmJiAhKGVsZW1lbnQgaW5zdGFuY2VvZiBQb2x5bWVyRWxlbWVudCkpIHsKICAgICAgICAgICAgY29uc29sZS53YXJuKGBNYWtlIHN1cmUgeW91IGhhdmUgaW1wb3J0ZWQgdGhlIHJlcXVpcmVkIG1vZHVsZSBmb3IgPCR7ZWxlbWVudE5hbWV9PiBlbGVtZW50LmApOwogICAgICAgICAgfQ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AgICBpZiAoIWNlbGwpIHsKICAgICAgICAgIHJldHVybiBjb250ZXh0OwogICAgICAgIH0KCiAgICAgICAgY29udGV4dC5zZWN0aW9uID0gWydib2R5JywgJ2hlYWRlcicsICdmb290ZXInLCAnZGV0YWlscyddCiAgICAgICAgICAuZmlsdGVyKHNlY3Rpb24gPT4gY2VsbC5nZXRBdHRyaWJ1dGUoJ3BhcnQnKS5pbmRleE9mKHNlY3Rpb24pID4gLTEpWzBdOwoKICAgICAgICBpZiAoY2VsbC5fY29sdW1uKSB7CiAgICAgICAgICBjb250ZXh0LmNvbHVtbiA9IGNlbGwuX2NvbHVtbjsKICAgICAgICB9CgogICAgICAgIGlmIChjb250ZXh0LnNlY3Rpb24gPT09ICdib2R5JyB8fCBjb250ZXh0LnNlY3Rpb24gPT09ICdkZXRhaWxzJykgewogICAgICAgICAgT2JqZWN0LmFzc2lnbihjb250ZXh0LCB0aGlzLl9fZ2V0Um93TW9kZWwoY2VsbC5wYXJlbnRFbGVtZW50KSk7CiAgICAgICAgfQoKICAgICAgICByZXR1cm4gY29udGV4dDsKICAgICAgfQoKICAgIH07CgogICAgLyoqCiAgICBAbGljZW5zZQogICAgQ29weXJpZ2h0IChjKSAyMDE3IFZhYWRpbiBMdGQuCiAgICBUaGlzIHByb2dyYW0gaXMgYXZhaWxhYmxlIHVuZGVyIEFwYWNoZSBMaWNlbnNlIFZlcnNpb24gMi4wLCBhdmFpbGFibGUgYXQgaHR0cHM6Ly92YWFkaW4uY29tL2xpY2Vuc2UvCiAgICAqLwogICAgLyoqCiAgICAgKiBAcG9seW1lck1peGluCiAgICAgKi8KICAgIGNvbnN0IEZpbHRlck1peGluID0gc3VwZXJDbGFzcyA9PiBjbGFzcyBGaWx0ZXJNaXhpbiBleHRlbmRzIHN1cGVyQ2xhc3MgewoKICAgICAgc3RhdGljIGdldCBwcm9wZXJ0aWVzKCkgewogICAgICAgIHJldHVybiB7CiAgICAgICAgICBfZmlsdGVyczogewogICAgICAgICAgICB0eXBlOiBBcnJheSwKICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgIHJldHVybiBbXTsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgIH07CiAgICAgIH0KCiAgICAgIHJlYWR5KCkgewogICAgICAgIHN1cGVyLnJlYWR5KCk7CiAgICAgICAgdGhpcy5hZGRFdmVudExpc3RlbmVyKCdmaWx0ZXItY2hhbmdlZCcsIHRoaXMuX2ZpbHRlckNoYW5nZWQuYmluZCh0aGlzKSk7CiAgICAgIH0KCiAgICAgIF9maWx0ZXJDaGFuZ2VkKGUpIHsKICAgICAgICBpZiAodGhpcy5fZmlsdGVycy5pbmRleE9mKGUudGFyZ2V0KSA9PT0gLTEpIHsKICAgICAgICAgIHRoaXMuX2ZpbHRlcnMucHVzaChlLnRhcmdldCk7CiAgICAgICAgfQoKICAgICAgICBlLnN0b3BQcm9wYWdhdGlvbigpOwoKICAgICAgICBpZiAodGhpcy5kYXRhUHJvdmlkZXIpIHsKICAgICAgICAgIHRoaXMuY2xlYXJDYWNoZSgpOwogICAgICAgIH0KICAgICAgfQoKICAgICAgX21hcEZpbHRlcnMoKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuX2ZpbHRlcnMubWFwKGZpbHRlciA9PiB7CiAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICBwYXRoOiBmaWx0ZXIucGF0aCwKICAgICAgICAgICAgdmFsdWU6IGZpbHRlci52YWx1ZQogICAgICAgICAgfTsKICAgICAgICB9KTsKICAgICAgfQogICAgfTsKCiAgICAvKioKICAgIEBsaWNlbnNlCiAgICBDb3B5cmlnaHQgKGMpIDIwMTcgVmFhZGluIEx0ZC4KICAgIFRoaXMgcHJvZ3JhbSBpcyBhdmFpbGFibGUgdW5kZXIgQXBhY2hlIExpY2Vuc2UgVmVyc2lvbiAyLjAsIGF2YWlsYWJsZSBhdCBodHRwczovL3ZhYWRpbi5jb20vbGljZW5zZS8KICAgICovCiAgICAvKioKICAgICAqIGB2YWFkaW4tZ3JpZC10ZW1wbGF0aXplcmAgaXMgYSBoZWxwZXIgZWxlbWVudCBmb3IgdGhlIGB2YWFkaW4tZ3JpZGAgdGhhdCBpcyBwcmVwYXJpbmcgYW5kCiAgICAgKiBzdGFtcGluZyBpbnN0YW5jZXMgb2YgY2VsbHMgYW5kIGNvbHVtbnMgdGVtcGxhdGVzCiAgICAgKgogICAgICogQGV4dGVuZHMgUG9seW1lckVsZW1lbnQKICAgICAqIEBwcml2YXRlCiAgICAgKi8KICAgIGNsYXNzIEdyaWRUZW1wbGF0aXplciBleHRlbmRzIChjbGFzcyBleHRlbmRzIFBvbHltZXJFbGVtZW50IHt9KSB7CiAgICAgIHN0YXRpYyBnZXQgaXMoKSB7CiAgICAgICAgcmV0dXJuICd2YWFkaW4tZ3JpZC10ZW1wbGF0aXplcic7CiAgICAgIH0KCiAgICAgIHN0YXRpYyBnZXQgcHJvcGVydGllcygpIHsKICAgICAgICByZXR1cm4gewogICAgICAgICAgZGF0YUhvc3Q6IE9iamVjdCwKCiAgICAgICAgICB0ZW1wbGF0ZTogT2JqZWN0LAoKICAgICAgICAgIF90ZW1wbGF0ZUluc3RhbmNlczogewogICAgICAgICAgICB0eXBlOiBBcnJheSwKICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgIHJldHVybiBbXTsKICAgICAgICAgICAgfQogICAgICAgICAgfSwKCiAgICAgICAgICBfcGFyZW50UGF0aFZhbHVlczogewogICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgcmV0dXJuIHt9OwogICAgICAgICAgICB9CiAgICAgICAgICB9LAoKICAgICAgICAgIF9ncmlkOiBPYmplY3QKICAgICAgICB9OwogICAgICB9CgogICAgICBzdGF0aWMgZ2V0IG9ic2VydmVycygpIHsKICAgICAgICByZXR1cm4gWwogICAgICAgICAgJ190ZW1wbGF0ZUluc3RhbmNlc0NoYW5nZWQoX3RlbXB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AgICAgIC8vIE5vdGlmeSBmb3Igb25seSB1c2VyLWFjdGlvbiBjaGFuZ2VzLCBub3QgZm9yIHNjcm9sbGluZyB1cGRhdGVzLiBFLiBnLiwKICAgICAgICAgICAgICAvLyBpZiBgZGV0YWlsc09wZW5lZGAgaXMgZGlmZmVyZW50IGZyb20gYF9fZGV0YWlsc09wZW5lZF9fYCwgd2hpY2ggd2FzIHNldCBkdXJpbmcgcmVuZGVyLgogICAgICAgICAgICAgIGlmIChpbnN0W29yaWdpbmFsUHJvcF0gPT09IHZhbHVlKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIGluc3Rbb3JpZ2luYWxQcm9wXSA9IHZhbHVlOwoKICAgICAgICAgICAgICBjb25zdCByb3cgPSBBcnJheS5mcm9tKHRoaXMuX2dyaWQuJC5pdGVtcy5jaGlsZHJlbikuZmlsdGVyKHJvdyA9PiB0aGlzLl9ncmlkLl9pdGVtc0VxdWFsKHJvdy5faXRlbSwgaW5zdC5pdGVtKSlbMF07CiAgICAgICAgICAgICAgaWYgKHJvdykgewogICAgICAgICAgICAgICAgQXJyYXkuZnJvbShyb3cuY2hpbGRyZW4pLmZvckVhY2goY2VsbCA9PiB7CiAgICAgICAgICAgICAgICAgIGlmIChjZWxsLl9pbnN0YW5jZSkgewogICAgICAgICAgICAgICAgICAgIGNlbGwuX2luc3RhbmNlW29yaWdpbmFsUHJvcF0gPSB2YWx1ZTsKICAgICAgICAgICAgICAgICAgICBjZWxsLl9pbnN0YW5jZS5ub3RpZnlQYXRoKHByb3AsIHZhbHVlKTsKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICBjb25zdCBpdGVtUHJlZml4ID0gJ2l0ZW0uJzsKICAgICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheSh0aGlzLl9ncmlkLml0ZW1zKSAmJiBwcm9wLmluZGV4T2Yoa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Sb3dEZXRhaWxzTWl4aW4gZXh0ZW5kcyBzdXBlckNsYXNzIHsKICAgICAgc3RhdGljIGdldCBwcm9wZXJ0aWVzKCkgewogICAgICAgIHJldHVybiB7CiAgICAgICAgICAvKioKICAgICAgICAgICAqIEFuIGFycmF5IGNvbnRhaW5pbmcgcmVmZXJlbmNlcyB0byBpdGVtcyB3aXRoIG9wZW4gcm93IGRldGFpbHMuCiAgICAgICAgICAgKi8KICAgICAgICAgIGRldGFpbHNPcGVuZWRJdGVtczogewogICAgICAgICAgICB0eXBlOiBBcnJheSwKICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgIHJldHVybiBbXTsKICAgICAgICAgICAgfQogICAgICAgICAgfSwKCiAgICAgICAgICBfcm93RGV0YWlsc1RlbXBsYXRlOiBPYmplY3QsCgogICAgICAgICAgLyoqCiAgICAgICAgICAgKiBDdXN0b20gZnVuY3Rpb24gZm9yIHJlbmRlcmluZyB0aGUgY29udGVudCBvZiB0aGUgcm93IGRldGFpbHMuCiAgICAgICAgICAgKiBSZWNlaXZlcyB0aHJlZSBhcmd1bWVudHM6CiAgICAgICAgICAgKgogICAgICAgICAgICogLSBgcm9vdGAgVGhlIHJvdyBkZXRhaWxzIGNvbnRlbnQgRE9NIGVsZW1lbnQuIEFwcGVuZCB5b3VyIGNvbnRlbnQgdG8gaXQuCiAgICAgICAgICAgKiAtIGBncmlkYCBUaGUgYDx2YWFkaW4tZ3JpZD5gIGVsZW1lbnQuCiAgICAgICAgICAgKiAtIGByb3dEYXRhYCBUaGUgb2JqZWN0IHdpdGggdGhlIHByb3BlcnRpZXMgcmVsYXRlZCB3aXRoCiAgICAgICAgICAgKiAgIHRoZSByZW5kZXJlZCBpdGVtLCBjb250YWluczoKICAgICAgICAgICAqICAgLSBgcm93RGF0YS5pbmRleGAgVGhlIGluZGV4IG9mIHRoZSBpdGVtLgogICAgICAgICAgICogICAtIGByb3dEYXRhLml0ZW1gIFRoZSBpdGVt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GlzLCBjZWxsLl9jb250ZW50LCB0aGlzLCB7aW5kZXg6IHJvdy5pbmRleCwgaXRlbTogaXRlbX0pOwogICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMuX3Jvd0RldGFpbHNUZW1wbGF0ZSAmJiAhY2VsbC5faW5zdGFuY2UpIHsKICAgICAgICAgICAgICAvLyBTdGFtcCB0aGUgdGVtcGxhdGUKICAgICAgICAgICAgICBjZWxsLl9pbnN0YW5jZSA9IHRoaXMuX3Jvd0RldGFpbHNUZW1wbGF0ZS50ZW1wbGF0aXplci5jcmVhdGVJbnN0YW5jZSgpOwogICAgICAgICAgICAgIGNlbGwuX2NvbnRlbnQuaW5uZXJIVE1MID0gJyc7CiAgICAgICAgICAgICAgY2VsbC5fY29udGVudC5hcHBlbmRDaGlsZChjZWxsLl9pbnN0YW5jZS5yb290KTsKICAgICAgICAgICAgICB0aGlzLl91cGRhdGVJdGVtKHJvdywgaXRlbSk7CiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIGZsdXNoKCk7CiAgICAgICAgICAgIHJvdy5zdHlsZS5zZXRQcm9wZXJ0eSgncGFkZGluZy1ib3R0b20nLCBgJHtjZWxsLm9mZnNldEhlaWdodH1weGApOwoKICAgICAgICAgICAgcmVxdWVzdEFuaW1hdGlvbkZyYW1lKCgpID0+IHRoaXMubm90aWZ5UmVzaXplKCkpOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBpZiAoaGlkZGVuQ2hhbmdlZCkgewogICAgICAgICAgdGhpcy5fdXBkYXRlTWV0cmljcygpOwogICAgICAgICAgdGhpcy5fcG9zaXRpb25JdGVtcygpOwogICAgICAgIH0KICAgICAgfQoKICAgICAgX3VwZGF0ZURldGFpbHNDZWxsSGVpZ2h0cygpIHsKICAgICAgICBBcnJheS5mcm9tKHRoaXMuJC5pdGVtcy5xdWVyeVNlbGVjdG9yQWxsKCdbcGFydH49ImRldGFpbHMtY2VsbCJdOm5vdChbaGlkZGVuXSknKSkuZm9yRWFja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5DZWxsczogewogICAgICAgICAgICB0eXBlOiBBcnJheSwKICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgIHJldHVybiBbXTsKICAgICAgICAgICAgfSwKICAgICAgICAgIH0sCgogICAgICAgICAgX3Njcm9sbGJhcldpZHRoOiB7CiAgICAgICAgICAgIHR5cGU6IE51bWJlciwKICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgIC8vIENyZWF0ZSB0aGUgbWVhc3VyZW1lbnQgbm9kZQogICAgICAgICAgICAgIHZhciBzY3JvbGxEaXYgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdkaXYnKTsKICAgICAgICAgICAgICBzY3JvbGxEaXYuc3R5bGUud2lkdGggPSAnMTAwcHgnOwogICAgICAgICAgICAgIHNjcm9sbERpdi5zdHlsZS5oZWlnaHQgPSAnMTAwcHgnOwogICAgICAgICAgICAgIHNjcm9sbERpdi5zdHlsZS5vdmVyZmxvdyA9ICdzY3JvbGwnOwogICAgICAgICAgICAgIHNjcm9sbERpdi5zdHlsZS5wb3NpdGlvbiA9ICdhYnNvbHV0ZSc7CiAgICAgICAgICAgICAgc2Nyb2xsRGl2LnN0eWxlLnRvcCA9ICctOTk5OXB4JzsKICAgICAgICAgICAgICBkb2N1bWVudC5ib2R5LmFwcGVuZENoaWxkKHNjcm9sbERpdik7CiAgICAgICAgICAgICAgLy8gR2V0IHRoZSBzY3JvbGxiYXIgd2lkdGgKICAgICAgICAgICAgICB2YXIgc2Nyb2xsYmFyV2lkdGggPSBzY3JvbGxEaXYub2Zmc2V0V2lkdGggLSBzY3JvbGxEaXYuY2xpZW50V2lkdGg7CiAgICAgICAgICAgICAgLy8gRGVsZXRlIHRoZSBESVYKICAgICAgICAgICAgICBkb2N1bWVudC5ib2R5LnJlbW92ZUNoaWxkKHNjcm9sbERpdik7CiAgICAgICAgICAgICAgcmV0dXJuIHNjcm9sbGJhcldpZHRoOwogICAgICAgICAgICB9CiAgICAgICAgICB9LAoKICAgICAgICAgIF9yb3dXaXRoRm9jdXNlZEVsZW1lbnQ6IEVsZW1lbnQsCgogICAgICAgICAgX2RlbHRhWUFjYzogewogICAgICAgICAgICB0eXBlOiBOdW1iZXIsCiAgICAgICAgICAgIHZhbHVlOiAwCiAgICAgICAgICB9CgogICAgICAgIH07CiAgICAgIH0KCiAgICAgIHN0YXRpYyBnZXQgb2JzZXJ2ZXJzKCkgewogICAgICAgIHJldHVybiBbCiAgICAgICAgICAnX3Njcm9sbEhlaWdodFVwZGF0ZWQoX2VzdFNjcm9sbEhlaWdodCknLAogICAgICAgICAgJ19zY3JvbGxWaWV3cG9ydEhlaWdodFVwZGF0ZWQoX3ZpZXdwb3J0SGVpZ2h0KScKICAgICAgICBdOwogICAgICB9CgogICAgICAvLyBPdmVycmlkZSAoZnJvbSBpcm9uLXNjcm9sbC10YXJnZXQtYmVoYXZpb3IpIHRvIGF2b2lkIGRvY3VtZW50IHNjcm9sbAogICAgICBzZXQgX3Njcm9sbFRvcCh0b3ApIHsKICAgICAgICB0aGlzLiQudGFibGUuc2Nyb2xsVG9wID0gdG9wOwogICAgICB9CgogICAgICBnZXQgX3Njcm9sbFRvcCgpIHsKICAgICAgICByZXR1cm4gdGhpcy4kLnRhYmxlLnNjcm9sbFRvcDsKICAgICAgfQoKICAgICAgY29uc3RydWN0b3IoKSB7CiAgICAgICAgc3VwZXIoKTsKICAgICAgICB0aGlzLl9zY3JvbGxMaW5lSGVpZ2h0ID0gdGhpcy5fZ2V0U2Nyb2xsTGluZUhlaWdodCgpOwogICAgICB9CgogICAgICAvKioKICAgICAgICogQHJldHVybnMge051bWJlcnx1bmRlZmluZWR9IC0gVGhlIGJyb3dzZXIncyBkZWZhdWx0IGZvbnQtc2l6ZSBpbiBwaXhlbHMKICAgICAgICovCiAgICAgIF9nZXRTY3JvbGxMaW5lSGVpZ2h0KCkgewogICAgICAgIGNvbnN0IGVsID0gZG9jdW1lbnQuY3JlY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HRyYW5zbGF0ZVkoJHtvdmVyU2Nyb2xsfXB4KWA7CiAgICAgICAgfQoKICAgICAgICB0aGlzLl91cGRhdGVPdmVyZmxvdygpOwogICAgICB9CgogICAgICBfdXBkYXRlT3ZlcmZsb3coKSB7CiAgICAgICAgLy8gU2V0IG92ZXJmbG93IHN0eWxpbmcgYXR0cmlidXRlcwogICAgICAgIGxldCBvdmVyZmxvdyA9ICcnOwogICAgICAgIGNvbnN0IHRhYmxlID0gdGhpcy4kLnRhYmxlOwogICAgICAgIGlmICh0YWJsZS5zY3JvbGxUb3AgPCB0YWJsZS5zY3JvbGxIZWlnaHQgLSB0YWJsZS5jbGllbnRIZWlnaHQpIHsKICAgICAgICAgIG92ZXJmbG93ICs9ICcgYm90dG9tJzsKICAgICAgICB9CgogICAgICAgIGlmICh0YWJsZS5zY3JvbGxUb3AgPiAwKSB7CiAgICAgICAgICBvdmVyZmxvdyArPSAnIHRvcCc7CiAgICAgICAgfQoKICAgICAgICBpZiAodGFibGUuc2Nyb2xsTGVmdCA8IHRhYmxlLnNjcm9sbFdpZHRoIC0gdGFibGUuY2xpZW50V2lkdGgpIHsKICAgICAgICAgIG92ZXJmbG93ICs9ICcgcmlnaHQnOwogICAgICAgIH0KCiAgICAgICAgaWYgKHRhYmxlLnNjcm9sbExlZnQgPiAwKSB7CiAgICAgICAgICBvdmVyZmxvdyArPSAnIGxlZnQnOwogICAgICAgIH0KCiAgICAgICAgdGhpcy5fZGVib3VuY2VPdmVyZmxvdyA9IERlYm91bmNlci5kZWJvdW5jZSgKICAgICAgICAgIHRoaXMuX2RlYm91bmNlT3ZlcmZsb3csCiAgICAgICAgICBhbmltYXRpb25GcmFtZSwKICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgY29uc3QgdmFsdWUgPSBvdmVyZmxvdy50cmltKCk7CiAgICAgICAgICAgIGlmICh2YWx1ZS5sZW5ndGggPiAwICYmIHRoaXMuZ2V0QXR0cmlidXRlKCdvdmVyZmxvdycpICE9PSB2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ICAgICBjZWxsLnN0eWxlLnRyYW5zZm9ybSA9ICcnOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdGhpcy5fZnJvemVuQ2VsbHMgPSBBcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbCh0aGlzLiQudGFibGUucXVlcnlTZWxlY3RvckFsbCgnW2Zyb3plbl0nKSk7CiAgICAgICAgICAgIHRoaXMuX3VwZGF0ZVNjcm9sbGVyTWVhc3VyZW1lbnRzKCk7CiAgICAgICAgICAgIHRoaXMuX3RyYW5zbGF0ZVN0YXRpb25hcnlFbGVtZW50cygpOwogICAgICAgICAgfQogICAgICAgICk7CiAgICAgICAgdGhpcy5fdXBkYXRlTGFzdEZyb3plbigpOwogICAgICB9CgogICAgICBfdXBkYXRlU2Nyb2xsZXJNZWFzdXJlbWVudHMoKSB7CiAgICAgICAgaWYgKHRoaXMuX2Zyb3plbkNlbGxzLmxlbmd0aCA+IDAgJiYgdGhpcy5fX2lzUlRMKSB7CiAgICAgICAgICB0aGlzLl9fc2Nyb2xsZXJNZXRyaWNzID0gewogICAgICAgICAgICBzY3JvbGxXaWR0aDogdGhpcy4kLm91dGVyc2Nyb2xsZXIuc2Nyb2xsV2lkdGgsCiAgICAgICAgICAgIGNsaWVudFdpZHRoOiB0aGlzLiQub3V0ZXJzY3JvbGxlci5jbGllbnRXaWR0aAogICAgICAgICAgfTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIF91cGRhdGVMYXN0RnJvemVuKCkgewogICAgICAgIGlmICghdGhpcy5fY29sdW1uVHJlZSkgewogICAgICAgICAgcmV0dXJuOwogICAgICAgIH0KCiAgICAgICAgY29uc3QgY29sdW1uc1JvdyA9IHRoaXMuX2NvbHVtblRyZWVbdGhpcy5fY29sdW1uVHJlZS5sZW5ndGggLSAxXS5zbGljZSgwKTsKICAgICAgICBjb2x1bW5zUm93LnNvcnQoKGEsIGIpID0+IHsKICAgICAgICAgIHJldHVybiBhLl9vcmRlciAtIGIuX29yZGVyOwogICA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mVyc2lvbiAyLjAsIGF2YWlsYWJsZSBhdCBodHRwczovL3ZhYWRpbi5jb20vbGljZW5zZS8KICAgICovCiAgICAvKioKICAgICAqIEBwb2x5bWVyTWl4aW4KICAgICAqLwogICAgY29uc3QgU2VsZWN0aW9uTWl4aW4gPSBzdXBlckNsYXNzID0+IGNsYXNzIFNlbGVjdGlvbk1peGluIGV4dGVuZHMgc3VwZXJDbGFzcyB7CgogICAgICBzdGF0aWMgZ2V0IHByb3BlcnRpZXMoKSB7CiAgICAgICAgcmV0dXJuIHsKICAgICAgICAgIC8qKgogICAgICAgICAgICogQW4gYXJyYXkgdGhhdCBjb250YWlucyB0aGUgc2VsZWN0ZWQgaXRlbXMuCiAgICAgICAgICAgKi8KICAgICAgICAgIHNlbGVjdGVkSXRlbXM6IHsKICAgICAgICAgICAgdHlwZTogT2JqZWN0LAogICAgICAgICAgICBub3RpZnk6IHRydWUsCiAgICAgICAgICAgIHZhbHVlOiAoKSA9PiBbXQogICAgICAgICAgfQogICAgICAgIH07CiAgICAgIH0KCiAgICAgIHN0YXRpYyBnZXQgb2JzZXJ2ZXJzKCkgewogICAgICAgIHJldHVybiBbCiAgICAgICAgICAnX3NlbGVjdGVkSXRlbXNDaGFuZ2VkKHNlbGVjdGVkSXRlbXMuKiknCiAgICAgICAgXTsKICAgICAgfQoKICAgICAgX2lzU2VsZWN0ZWQoaXRlbSkgewogICAgICAgIHJldHVybiB0aGlzLnNlbGVjdGVkSXRlbXMgJiYgdGhpcy5fZ2V0SXRlbUluZGV4SW5BcnJheShpdGVtLCB0aGlzLnNlbGVjdGVkSXRlbXMpID4gLTE7CiAgICAgIH0KCiAgICAgIC8qKgogICAgICAgKiBTZWxlY3RzIHRoZSBnaXZlbiBpdGVtLgogICAgICAgKgogICAgICAgKiBAbWV0aG9kIHNlbGVjdEl0ZW0KICAgICAgICogQHBhcmFtIHtPYmplY3R9IGl0ZW0gVGhlIGl0ZW0gb2JqZWN0CiAgICAgICAqLwogICAgICBzZWx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AgLyoqCiAgICAgKiBAcG9seW1lck1peGluCiAgICAgKi8KICAgIGNvbnN0IFNvcnRNaXhpbiA9IHN1cGVyQ2xhc3MgPT4gY2xhc3MgU29ydE1peGluIGV4dGVuZHMgc3VwZXJDbGFzcyB7CiAgICAgIHN0YXRpYyBnZXQgcHJvcGVydGllcygpIHsKICAgICAgICByZXR1cm4gewogICAgICAgICAgLyoqCiAgICAgICAgICAgKiBXaGVuIGB0cnVlYCwgYWxsIGA8dmFhZGluLWdyaWQtc29ydGVyPmAgYXJlIGFwcGxpZWQgZm9yIHNvcnRpbmcuCiAgICAgICAgICAgKi8KICAgICAgICAgIG11bHRpU29ydDogewogICAgICAgICAgICB0eXBlOiBCb29sZWFuLAogICAgICAgICAgICB2YWx1ZTogZmFsc2UKICAgICAgICAgIH0sCgogICAgICAgICAgX3NvcnRlcnM6IHsKICAgICAgICAgICAgdHlwZTogQXJyYXksCiAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbigpIHsKICAgICAgICAgICAgICByZXR1cm4gW107CiAgICAgICAgICAgIH0KICAgICAgICAgIH0sCgogICAgICAgICAgX3ByZXZpb3VzU29ydGVyczogewogICAgICAgICAgICB0eXBlOiBBcnJheSwKICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgIHJldHVybiBbXTsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgIH07CiAgICAgIH0KCiAgICAgIHJlYWR5KCkgewogICAgICAgIHN1cGVyLnJlYWR5KCk7CiAgICAgICAgdGhpcy5hZGRFdmVudExpc3RlbmVyKCdzb3J0ZXItY2hhbmdlZCcsIHRoaXMuX29uU29ydGVyQ2hhbmdlZCk7CgogICAgICAgIC8vIFdpdGggUG9seW1lciAyICYgc2hhZHkgdGhlICdzb3J0ZXItY2hhbmdlZCcgbGlzdGVuZXIgaXNuJ3QgZ3VhcmFudGVlZCB0byBiZSByZWdpc3RlcmVkCiAgICAgICAgLy8gYmVmb3JlIGNo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LCBzb3J0ZXIpOwogICAgICAgIHNvcnRlci5fb3JkZXIgPSBudWxsOwoKICAgICAgICBpZiAodGhpcy5tdWx0aVNvcnQpIHsKICAgICAgICAgIGlmIChzb3J0ZXIuZGlyZWN0aW9uKSB7CiAgICAgICAgICAgIHRoaXMuX3NvcnRlcnMudW5zaGlmdChzb3J0ZXIpOwogICAgICAgICAgfQoKICAgICAgICAgIHRoaXMuX3NvcnRlcnMuZm9yRWFjaCgoc29ydGVyLCBpbmRleCkgPT4gc29ydGVyLl9vcmRlciA9IHRoaXMuX3NvcnRlcnMubGVuZ3RoID4gMSA/IGluZGV4IDogbnVsbCwgdGhpcyk7CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgIGlmIChzb3J0ZXIuZGlyZWN0aW9uKSB7CiAgICAgICAgICAgIHRoaXMuX3NvcnRlcnMuZm9yRWFjaChzb3J0ZXIgPT4gewogICAgICAgICAgICAgIHNvcnRlci5fb3JkZXIgPSBudWxsOwogICAgICAgICAgICAgIHNvcnRlci5kaXJlY3Rpb24gPSBudWxsOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdGhpcy5fc29ydGVycyA9IFtzb3J0ZXJdOwogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgZS5zdG9wUHJvcGFnYXRpb24oKTsKCiAgICAgICAgaWYgKHRoaXMuZGF0YVByb3ZpZGVyICYmCiAgICAgICAgICAvLyBObyBuZWVkIHRvIGNsZWFyIGNhY2hlIGlmIHNvcnRlcnMgZGlkbid0IGNoYW5nZQogICAgICAgICAgSlNPTi5zdHJpbmdpZnkodGhpcy5fcHJldmlvdXNTb3J0ZXJzKSAhPT0gSlNPTi5zdHJpbmdpZnkodGhpcy5fbWFwU29ydGVycygpKSkgewogICAgICAgICAgdGhpcy5jbGVhckNhY2hlKCk7CiAgICAgICAgfQoKICAgICAgICB0aGlzLl9hMTF5VXBkYXRlU29ydGVycygpOwoKICAgICAgICB0aGlzLl9wcmV2aW91c1NvcnRlcnMgPSB0aGlzLl9tYXBTb3J0ZXJzKCk7CiAgICAgIH0KCiAgICAgIF9tYXBTb3J0ZXJzKCkgewogICAgICAgIHJldHVybiB0aGlzLl9zb3J0ZXJzLm1hcChzb3J0ZXIgPT4gewogICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgcGF0aDogc29ydGVyLnBhdGgsCiAgICAgICAgICAgIGRpcmVjdGlvbjogc29ydGVyLmRpcmVjdGlvbgogICAgICAgICAgfTsKICAgICAgICB9KTsKICAgICAgfQoKICAgICAgX3JlbW92ZUFycmF5SXRlbShhcnJheSwgaXRlbSkgewogICAgICAgIGNvbnN0IGluZGV4ID0gYXJyYXkuaW5kZXhPZihpdGVtKTsKICAgICAgICBpZiAoaW5kZXggPiAtMSkgewogICAgICAgICAgYXJyYXkuc3BsaWNlKGluZGV4LCAxKTsKICAgICAgICB9CiAgICAgIH0KICAgIH07CgogICAgLyoqCiAgICBAbGljZW5zZQogICAgQ29weXJpZ2h0IChjKSAyMDE4IFZhYWRpbiBMdGQuCiAgICBUaGlzIHByb2dyYW0gaXMgYXZhaWxhYmxlIHVuZGVyIEFwYWNoZSBMaWNlbnNlIFZlcnNpb24gMi4wLCBhdmFpbGFibGUgYXQgaHR0cHM6Ly92YWFkaW4uY29tL2xpY2Vuc2UvCiAgICAqLwogICAgLyoqCiAgICAgKiBAcG9seW1lck1peGluCiAgICAgKi8KICAgIGNvbnN0IFN0eWxpbmdNaXhpbiA9IHN1cGVyQ2xhc3MgPT4gY2xhc3MgU3R5bGluZ01peGluIGV4dGVuZHMgc3VwZXJDbGFzcyB7CgogICAgICBzdGF0aWMgZ2V0IHByb3BlcnRpZXMoKSB7CiAgICAgICAgcmV0dXJuIHsKICAgICAgICAgIC8qKgogICAgICAgICAgICogQSBmdW5jdGlvbiB0aGF0IGFsbG93cyBnZW5lcmF0aW5nIENTUyBjbGFzcyBuYW1lcyBmb3IgZ3JpZCBjZWxscwogICAgICAgICAgICogYmFzZWQgb24gdGhlaXIgcm93IGF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ICAgICAgICAgICB9KTsKICAgICAgICAgIH0KCiAgICAgICAgICBjb25zdCByb3dSZWN0ID0gcm93LmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpOwogICAgICAgICAgaWYgKCF3aW5kb3cuU2hhZHlET00pIHsKICAgICAgICAgICAgaWYgKHRoaXMuX2lvcykgewogICAgICAgICAgICAgIGUuZGF0YVRyYW5zZmVyLnNldERyYWdJbWFnZShyb3cpOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgIGUuZGF0YVRyYW5zZmVyLnNldERyYWdJbWFnZShyb3csIGUuY2xpZW50WCAtIHJvd1JlY3QubGVmdCwgZS5jbGllbnRZIC0gcm93UmVjdC50b3ApOwogICAgICAgICAgICB9CgogICAgICAgICAgfQoKICAgICAgICAgIGxldCByb3dzID0gW3Jvd107CiAgICAgICAgICBpZiAodGhpcy5faXNTZWxlY3RlZChyb3cuX2l0ZW0pKSB7CiAgICAgICAgICAgIHJvd3MgPSB0aGlzLl9fZ2V0Vmlld3BvcnRSb3dzKCkKICAgICAgICAgICAgICAuZmlsdGVyKHJvdyA9PiB0aGlzLl9pc1NlbGVjdGVkKHJvdy5faXRlbSkpCiAgICAgICAgICAgICAgLmZpbHRlcihyb3cgPT4gIXRoaXMuZHJhZ0ZpbHRlciB8fCB0aGlzLmRyYWdGaWx0ZXIodGhpcy5fX2dldFJvd01vZGVsKHJvdykpKTsKICAgICAgICAgIH0KCiAgICAgICAgICAvLyBTZXQgdGhlIGRlZmF1bHQgdHJhbnNmZXIgZGF0YQogICAgICAgICAgZS5kYXRhVHJhbnNmZXIuc2V0RGF0YSgndGV4dCcsIHRoaXMuX19mb3JtYXREZWZhdWx0VHJhbnNmZXJEYXRhKHJvd3MpKTsKCiAgICAgICAgICByb3cuc2V0QXR0cmlidXRlKCdkcmFnc3RhcnQnLCByb3dzLmxlbmd0aCA+IDEgPyByb3dzLmxlbmd0aCA6ICcnKTsKICAgICAgICAgIHRoaXMudXBkYXRlU3R5bGVzKH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AgICAgICByZXR1cm47CiAgICAgICAgICB9CgogICAgICAgICAgZS5zdG9wUHJvcGFnYXRpb24oKTsKICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTsKCiAgICAgICAgICBpZiAodGhpcy5fZHJvcExvY2F0aW9uID09PSBEcm9wTG9jYXRpb24uRU1QVFkpIHsKICAgICAgICAgICAgdGhpcy5fdG9nZ2xlQXR0cmlidXRlKCdkcmFnb3ZlcicsIHRydWUsIHRoaXMpOwogICAgICAgICAgfSBlbHNlIGlmIChyb3cpIHsKICAgICAgICAgICAgdGhpcy5fZHJhZ092ZXJJdGVtID0gcm93Ll9pdGVtOwogICAgICAgICAgICBpZiAocm93LmdldEF0dHJpYnV0ZSgnZHJhZ292ZXInKSAhPT0gdGhpcy5fZHJvcExvY2F0aW9uKSB7CiAgICAgICAgICAgICAgcm93LnNldEF0dHJpYnV0ZSgnZHJhZ292ZXInLCB0aGlzLl9kcm9wTG9jYXRpb24pOwogICAgICAgICAgICB9CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICB0aGlzLl9jbGVhckRyYWdTdHlsZXMoKTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KCiAgICAgIF9fZG5kQXV0b1Njcm9sbChjbGllbnRZKSB7CiAgICAgICAgaWYgKHRoaXMuX19kbmRBdXRvU2Nyb2xsaW5nKSB7CiAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICB9CgogICAgICAgIGNvbnN0IGhlYWRlckJvdHRvbSA9IHRoaXMuJC5oZWFkZXIuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCkuYm90dG9tOwogICAgICAgIGNvbnN0IGZvb3RlclRvcCA9IHRoaXMuJC5mb290ZXIuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCkudG9wOwogICAgICAgIGNvbnN0IHRvcERpZmYgPSBoZWFkZXJCb3R0b20gLSBjbGllbnRZICsgdGhpcy5fX2RuZEF1dG9TY3JvbGxUaHJlc2hvbGQ7CiAgIC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ICAgICB0aGlzLl9jbGVhckRyYWdTdHlsZXMoKTsKCiAgICAgICAgICBjb25zdCBldmVudCA9IG5ldyBDdXN0b21FdmVudCgnZ3JpZC1kcm9wJywgewogICAgICAgICAgICBidWJibGVzOiBlLmJ1YmJsZXMsCiAgICAgICAgICAgIGNhbmNlbGFibGU6IGUuY2FuY2VsYWJsZSwKICAgICAgICAgICAgZGV0YWlsOiB7CiAgICAgICAgICAgICAgZHJvcFRhcmdldEl0ZW06IHRoaXMuX2RyYWdPdmVySXRlbSwKICAgICAgICAgICAgICBkcm9wTG9jYXRpb246IHRoaXMuX2Ryb3BMb2NhdGlvbiwKICAgICAgICAgICAgICBkcmFnRGF0YQogICAgICAgICAgICB9CiAgICAgICAgICB9KTsKICAgICAgICAgIGV2ZW50Lm9yaWdpbmFsRXZlbnQgPSBlOwogICAgICAgICAgdGhpcy5kaXNwYXRjaEV2ZW50KGV2ZW50KTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIF9fZm9ybWF0RGVmYXVsdFRyYW5zZmVyRGF0YShyb3dzKSB7CiAgICAgICAgcmV0dXJuIHJvd3MKICAgICAgICAgIC5tYXAocm93ID0+IHsKICAgICAgICAgICAgcmV0dXJuIEFycmF5LmZyb20ocm93LmNoaWxkcmVuKQogICAgICAgICAgICAgIC5maWx0ZXIoY2VsbCA9PiAhY2VsbC5oaWRkZW4gJiYgY2VsbC5nZXRBdHRyaWJ1dGUoJ3BhcnQnKS5pbmRleE9mKCdkZXRhaWxzLWNlbGwnKSA9PT0gLTEpCiAgICAgICAgICAgICAgLnNvcnQoKGEsIGIpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiBhLl9jb2x1bW4uX29yZGVyID4gYi5fY29sdW1uLl9vcmRlciA/IDEgOiAtMTsKICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgIC5tYXAoY2VsbCA9PiBjZWxsLl9jb250ZW50LnRleHRDb250ZW50LnRyaW0oKSkKICAgICAgICAgICAgICAuZmlsdGVyKGNvb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XQuYmluZCh0aGlzKSk7CgogICAgICAgIHRoaXMuYWRkRXZlbnRMaXN0ZW5lcignbW91c2Vkb3duJywgKCkgPT4gewogICAgICAgICAgdGhpcy5fdG9nZ2xlQXR0cmlidXRlKCduYXZpZ2F0aW5nJywgZmFsc2UsIHRoaXMpOwogICAgICAgICAgdGhpcy5faXNNb3VzZWRvd24gPSB0cnVlOwogICAgICAgIH0pOwogICAgICAgIHRoaXMuYWRkRXZlbnRMaXN0ZW5lcignbW91c2V1cCcsICgpID0+IHRoaXMuX2lzTW91c2Vkb3duID0gZmFsc2UpOwogICAgICB9CgogICAgICBfZm9jdXNhYmxlQ2hhbmdlZChmb2N1c2FibGUsIG9sZEZvY3VzYWJsZSkgewogICAgICAgIGlmIChvbGRGb2N1c2FibGUpIHsKICAgICAgICAgIG9sZEZvY3VzYWJsZS5zZXRBdHRyaWJ1dGUoJ3RhYmluZGV4JywgJy0xJyk7CiAgICAgICAgfQogICAgICAgIGlmIChmb2N1c2FibGUpIHsKICAgICAgICAgIGZvY3VzYWJsZS5zZXRBdHRyaWJ1dGUoJ3RhYmluZGV4JywgJzAnKTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIF9vbktleURvd24oZSkgewogICAgICAgIC8vIEVuc3VyZSBzdGFuZGFyZCBrZXkgdmFsdWUsIHVuaWZpZWQgYWNyb3NzIGJyb3dzZXJzCiAgICAgICAgbGV0IGtleSA9IGUua2V5OwogICAgICAgIGlmIChrZXkgPT09ICdVcCcgfHwga2V5ID09PSAnRG93bicgfHwga2V5ID09PSAnTGVmdCcgfHwga2V5ID09PSAnUmlnaHQnKSB7CiAgICAgICAgICAvLyBNU0lFICYgRWRnZQogICAgICAgICAga2V5ID0gJ0Fycm93JyArIGtleTsKICAgICAgICB9CiAgICAgICAgaWYgKGtleSA9PT0gJ0VzYycpIHsKICAgICAgICAgIC8vIE1TSUUgJiBFZGdlCiAgICAgICAgICBrZXkgPSAnRXNjYXBlJzsKICAgICAgICB9CiAgICAgICAgaWYgKGtleSA9PT0gJ1NwYWNlYmFyJykgewogICAgICAgICAgLy8gTVNJRQogICAgICAgICAga2V5ID0gJyAnOwogICAgICAgIH0KCiAgICAgICAgbGV0IGtleUdyb3VwOwogICAgICAgIHN3aXRjaCAoa2V5KSB7CiAgICAgICAgICBjYXNlICdBcnJvd1VwJzoKICAgICAgICAgIGNhc2UgJ0Fycm93RG93bic6CiAgICAgICAgICBjYXNlICdBcnJvd0xlZnQnOgogICAgICAgICAgY2FzZSAnQXJyb3dSaWdodCc6CiAgICAgICAgICBjYXNlICdQYWdlVXAnOgogICAgICAgICAgY2FzZSAnUGFnZURvd24nOgogICAgICAgICAgY2FzZSAnSG9tZSc6CiAgICAgICAgICBjYXNlICdFbmQnOgogICAgICAgICAgICBrZXlHcm91cCA9ICdOYXZpZ2F0aW9uJzsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICBjYXNlICdFbnRlcic6CiAgICAgICAgICBjYXNlICdFc2NhcGUnOgogICAgICAgICAgY2FzZSAnRjInOgogICAgICAgICAgICBrZXlHcm91cCA9ICdJbnRlcmFjdGlvbic7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgY2FzZSAnVGFiJzoKICAgICAgICAgICAga2V5R3JvdXAgPSAnVGFiJzsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICBjYXNlICcgJzoKICAgICAgICAgICAga2V5R3JvdXAgPSAnU3BhY2UnOwogICAgICAgICAgICBicmVhazsKICAgICAgICB9CgogICAgICAgIHRoaXMuX2RldGVjdEludGVyYWN0aW5nKGUpOwogICAgICAgIGlmICh0aGlzLmhhc0F0dHJpYnV0ZSgnaW50ZXJhY3RpbmcnKSAmJiBrZXlHcm91cCAhPT0gJ0ludGVyYWN0aW9uJykgewogICAgICAgICAgLy8gV2hlbiBpbiB0aGUgaW50ZXJhY3RpbmcgbW9kZSwgb25seSB0aGUg4oCcSW50ZXJhY3Rpb27igJ0ga2V5cyBhcmUgaGFuZGxlZC4KICAgICAgICAgIGtleUdyb3VwID0gdW5kZWZpbmVkOwogICAgICAgIH0KCiAgICAgICAgaWYgKGtleUdyb3VwKSB7CiAgICAgICAgICB0aGlzW2Bfb24ke2tleUdyb3VwfUtleURvd25gXShlLCBrZXkpOwogICAgICAgIH0KICAgICAgfQoKICAgICAgX2Vuc3VyZVNjcm9sbGVkVG9JbmRleChpbmRleCkgewogICAgICAgIGNvbnN0IHRhcmdldFJvd0luRG9tID0gQXJyYXkuZnJvbSh0aGlzLiQuaXRlbXMuY2hpbGRyZW4pLmZpbHRlcihjaGlsZCA9PiBjaGlsZC5pbmRleCA9PT0gaW5kZXgpWzBdOwogICAgICAgIGlmICghdGFyZ2V0Um93SW5Eb20pIHsKICAgICAgICAgIHRoaXMuX3Njcm9sbFRvSW5kZXgoaW5kZXgpOwogICAgICAgIH0KICAgICAgfQoKICAgICAgX29uTmF2aWdhdGlvbktleURvd24oZSwga2V5KSB7CiAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpOwoKICAgICAgICBmdW5jdGlvbiBpbmRleE9mQ2hpbGRFbGVtZW50KGVsKSB7CiAgICAgICAgICByZXR1cm4gQXJyYXkucHJvdG90eXBlLmluZGV4T2YuY2FsbChlbC5wYXJlbnROb2RlLmNoaWxkcmVuLCBlbCk7CiAgICAgICAgfQoKICAgICAgICBjb25zdCB2aXNpYmxlSXRlbXNDb3VudCA9IHRoaXMuX2xhc3RWaXNpYmxlSW5kZXggLSB0aGlzLl9maXJzdFZpc2libGVJbmRleCAtIDE7CgogICAgICAgIGxldCBkeCA9IDAsIGR5ID0gMDsKICAgICAgICBzd2l0Y2ggKGtleSkgewogICAgICAgICAgY2FzZSAnQXJyb3dSaWdodCc6CiAgICAgICAgICAgIGR4ID0gdGhpcy5fX2lzUlRMID8gLTEgOiAxOwogICAgICAgICAgICBicmVhazsKICAgICAgICAgIGNhc2UgJ0Fycm93TGVmdCc6CiAgICAgICAgICAgIGR4ID0gdGhpcy5fX2lzUlRMID8gMSA6IC0xOwogICAgICAgICAgICBicmVhazsKICAgICAgICAgIGNhc2UgJ0hvbWUnOgogICAgICAgICAgICBkeCA9IC1JbmZpbml0eTsKICAgICAgICAgICAgZS5jdHJsS2V5ICYmIChkeSA9IC1JbmZpbml0eSk7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgY2FzZSAnRW5kJzoKICAgICAgICAgICAgZHggPSBJbmZpbml0eTsKICAgICAgICAgICAgZS5jdHJsS2V5ICYmIChkeSA9IEluZmluaXR5KTsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICBjYXNlICdBcnJvd0Rvd24nOgogICAgICAgICAgICBkeSA9IDE7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgY2FzZSAnQXJyb3dVcCc6CiAgICAgICAgICAgIGR5ID0gLTE7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgY2FzZSAnUGFnZURvd24nOgogICAgICAgICAgICBkeSA9IHZpc2libGVJdGVtc0NvdW50OwogICAgICAgICAgICBicmVhazsKICAgICAgICAgIGNhc2UgJ1BhZ2VVcCc6CiAgICAgICAgICAgIGR5ID0gLXZpc2libGVJdGVtc0NvdW50OwogICAgICAgICAgICBicmVhazsKICAgICAgICB9CgogICAgICAgIGNvbnN0IGFjdGl2ZUNlbGwgPSBlLmNvbXBvc2VkUGF0aCgpWzBdOwogICAgICAgIGNvbnN0IGNvbHVtbkluZGV4ID0gaW5kZXhPZkNoaWxkRWxlbWVudChhY3RpdmVDZWxsKTsKICAgICAgICBjb25zdCBpc1Jvd0RldGFpbHMgPSB0aGlzLl9lbGVtZW50TWF0Y2hlcyhhY3RpdmVDZWxsLCAnW3BhcnR+PSJkZXRhaWxzLWNlbGwiXScpOwoKICAgICAgICBjb25zdCBhY3RpdmVSb3cgPSBhY3RpdmVDZWxsLnBhcmVudE5vZGU7CgogICAgICAgIGNvbnN0IGFjdGl2ZVJvd0dyb3VwID0gYWN0aXZlUm93LnBhcmVudE5vZGU7CiAgICAgICAgY29uc3QgbW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hSb3dJbmRleCAmJgogICAgICAgICAgICAgIGFjdGl2ZVJvd0dyb3VwLmNoaWxkcmVuW2RzdFJvd0luZGV4XS5oaWRkZW4KICAgICAgICAgICAgKSB7CiAgICAgICAgICAgICAgZHN0Um93SW5kZXgrKzsKICAgICAgICAgICAgfQogICAgICAgICAgfSBlbHNlIGlmIChkc3RSb3dJbmRleCA8IHJvd0luZGV4KSB7CiAgICAgICAgICAgIHdoaWxlICgKICAgICAgICAgICAgICBkc3RSb3dJbmRleCA+IDAgJiYKICAgICAgICAgICAgICBhY3RpdmVSb3dHcm91cC5jaGlsZHJlbltkc3RSb3dJbmRleF0uaGlkZGVuCiAgICAgICAgICAgICkgewogICAgICAgICAgICAgIGRzdFJvd0luZGV4LS07CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIC8vIF9mb2N1c2VkQ29sdW1uT3JkZXIgaXMgbWVtb2l6ZWQg4oCUIHRoaXMgaXMgdG8gZW5zdXJlIHByZWRpY3RhYmxlCiAgICAgICAgLy8gbmF2aWdhdGlvbiB3aGVuIGVudGVyaW5nIGFuZCBsZWF2aW5nIGRldGFpbCBhbmQgY29sdW1uIGdyb3VwIGNlbGxzLgogICAgICAgIGlmICh0aGlzLl9mb2N1c2VkQ29sdW1uT3JkZXIgPT09IHVuZGVmaW5lZCkgewogICAgICAgICAgaWYgKGlzUm93RGV0YWlscykgewogICAgICAgICAgICB0aGlzLl9mb2N1c2VkQ29sdW1uT3JkZXIgPSAwOwogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgdGhpcy5fZm9jdXNlZENvbHVtbk9yZGVyID0gdGhpcy5fZ2V0Q29sdW1ucyhhY3RpdmVSb3dHcm91cCwgcm93SW5kZXgpLmZpbHRlcihjID0+ICFjLmhpZGRlbilbY29sdW1uSW5kZXhdLl9vcmRlcjsKICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIC8vIEZpbmQgb3JkZXJlZENvbHVtbkluZGV4IOKA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leCA9IHBhdGguaW5kZXhPZih0aGlzLiQudGFibGUpOwogICAgICAgIHJldHVybiB7CiAgICAgICAgICByb3dHcm91cDogcGF0aFt0YWJsZUluZGV4IC0gMV0sCiAgICAgICAgICByb3c6IHBhdGhbdGFibGVJbmRleCAtIDJdLAogICAgICAgICAgY2VsbDogcGF0aFt0YWJsZUluZGV4IC0gM10KICAgICAgICB9OwogICAgICB9CgogICAgICBfb25JbnRlcmFjdGlvbktleURvd24oZSwga2V5KSB7CiAgICAgICAgY29uc3QgbG9jYWxUYXJnZXQgPSBlLmNvbXBvc2VkUGF0aCgpWzBdOwogICAgICAgIGNvbnN0IGxvY2FsVGFyZ2V0SXNUZXh0SW5wdXQgPSBsb2NhbFRhcmdldC5sb2NhbE5hbWUgPT09ICdpbnB1dCcgJiYKICAgICAgICAgICEvXihidXR0b258Y2hlY2tib3h8Y29sb3J8ZmlsZXxpbWFnZXxyYWRpb3xyYW5nZXxyZXNldHxzdWJtaXQpJC9pLnRlc3QobG9jYWxUYXJnZXQudHlwZSk7CgogICAgICAgIGxldCB3YW50SW50ZXJhY3Rpbmc7CiAgICAgICAgc3dpdGNoIChrZXkpIHsKICAgICAgICAgIGNhc2UgJ0VudGVyJzoKICAgICAgICAgICAgd2FudEludGVyYWN0aW5nID0gdGhpcy5oYXNBdHRyaWJ1dGUoJ2ludGVyYWN0aW5nJykgPyAhbG9jYWxUYXJnZXRJc1RleHRJbnB1dCA6IHRydWU7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgY2FzZSAnRXNjYXBlJzoKICAgICAgICAgICAgd2FudEludGVyYWN0aW5nID0gZmFsc2U7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgY2FzZSAnRjInOgogICAgICAgICAgICB3YW50SW50ZXJhY3RpbmcgPSAhdGhpcy5oYXNBdHRyaWJ1dGUoJ2ludGVyYWN0aW5nJyk7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgIH0KCiAgICAgICAgY29uc3Qge2NlbG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UYXJnZXQgPT09IHRoaXMuJC50YWJsZSA/IDEgOiAtMQogICAgICAgICAgKS5mb2N1cygpOwogICAgICAgICAgdGhpcy5fdG9nZ2xlQXR0cmlidXRlKCdpbnRlcmFjdGluZycsIGZhbHNlLCB0aGlzKTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgdGhpcy5fZGV0ZWN0SW50ZXJhY3RpbmcoZSk7CiAgICAgICAgfQogICAgICB9CgogICAgICBfb25Gb2N1c091dChlKSB7CiAgICAgICAgdGhpcy5fdG9nZ2xlQXR0cmlidXRlKCduYXZpZ2F0aW5nJywgZmFsc2UsIHRoaXMpOwogICAgICAgIHRoaXMuX2RldGVjdEludGVyYWN0aW5nKGUpOwogICAgICB9CgogICAgICBfb25DZWxsRm9jdXNJbihlKSB7CiAgICAgICAgdGhpcy5fZGV0ZWN0SW50ZXJhY3RpbmcoZSk7CgogICAgICAgIGlmIChlLmNvbXBvc2VkUGF0aCgpLmluZGV4T2YodGhpcy4kLnRhYmxlKSA9PT0gMykgewogICAgICAgICAgY29uc3QgY2VsbCA9IGUuY29tcG9zZWRQYXRoKClbMF07CiAgICAgICAgICB0aGlzLl9hY3RpdmVSb3dHcm91cCA9IGNlbGwucGFyZW50Tm9kZS5wYXJlbnROb2RlOwogICAgICAgICAgaWYgKHRoaXMuX2FjdGl2ZVJvd0dyb3VwID09PSB0aGlzLiQuaGVhZGVyKSB7CiAgICAgICAgICAgIHRoaXMuX2hlYWRlckZvY3VzYWJsZSA9IGNlbGw7CiAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMuX2FjdGl2ZVJvd0dyb3VwID09PSB0aGlzLiQuaXRlbXMpIHsKICAgICAgICAgICAgdGhpcy5faXRlbXNGb2N1c2FibGUgPSBjZWxsOwogICAgICAgICAgfSBlbHNlIGlmICh0aGlzLl9hY3RpdmVSb3dHcm91cCA9PT0gdGhpcy4kLmZvb3RlcikgewogICAgICAgICAgICB0aGlzLl9mb290ZXJGb2N1c2FibGUgPSBjZWxs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SA9IGRzdENlbGxJbmRleCAtIDE7IGkgPj0gMDsgaS0tKSB7CiAgICAgICAgICBjb25zdCBjZWxsID0gZHN0Um93LmNoaWxkcmVuW2ldOwogICAgICAgICAgaWYgKGNlbGwuaGFzQXR0cmlidXRlKCdoaWRkZW4nKSB8fAogICAgICAgICAgICAgIHRoaXMuX2VsZW1lbnRNYXRjaGVzKGNlbGwsICdbcGFydH49ImRldGFpbHMtY2VsbCJdJykpIHsKICAgICAgICAgICAgY29udGludWU7CiAgICAgICAgICB9CiAgICAgICAgICBpZiAoY2VsbC5oYXNBdHRyaWJ1dGUoJ2Zyb3plbicpKSB7CiAgICAgICAgICAgIGxlZnRCb3VuZGFyeSA9IGNlbGwuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCkucmlnaHQ7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBmb3IgKGxldCBpID0gZHN0Q2VsbEluZGV4ICsgMTsgaSA8IGRzdFJvdy5jaGlsZHJlbi5sZW5ndGg7IGkrKykgewogICAgICAgICAgY29uc3QgY2VsbCA9IGRzdFJvdy5jaGlsZHJlbltpXTsKICAgICAgICAgIGlmIChjZWxsLmhhc0F0dHJpYnV0ZSgnaGlkZGVuJykgfHwKICAgICAgICAgICAgICB0aGlzLl9lbGVtZW50TWF0Y2hlcyhjZWxsLCAnW3BhcnR+PSJkZXRhaWxzLWNlbGwiXScpKSB7CiAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgfQogICAgICAgICAgaWYgKGNlbGwuaGFzQXR0cmlidXRlKCdmcm96ZW4nKSkgewogICAgICAgICAgICByaWdodEJvdW5kYXJ5ID0gY2VsbC5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKS5sZWZ0OwogICAgICAgICAgICBicmVhazsKICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIGlmIChkc3RDZWxsUmVjdC5sZWZ0IDwgbGVmdEJvdW5kYXJ5KSB7CiAgICAgICAgIC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HJ1ZSB0byBhbGxvdyBjb2x1bW4gcmVvcmRlcmluZy4KICAgICAgICAgICAqLwogICAgICAgICAgY29sdW1uUmVvcmRlcmluZ0FsbG93ZWQ6IHsKICAgICAgICAgICAgdHlwZTogQm9vbGVhbiwKICAgICAgICAgICAgdmFsdWU6IGZhbHNlCiAgICAgICAgICB9LAoKICAgICAgICAgIF9vcmRlckJhc2VTY29wZTogewogICAgICAgICAgICB0eXBlOiBOdW1iZXIsCiAgICAgICAgICAgIHZhbHVlOiAxMDAwMDAwMAogICAgICAgICAgfQogICAgICAgIH07CiAgICAgIH0KCiAgICAgIHN0YXRpYyBnZXQgb2JzZXJ2ZXJzKCkgewogICAgICAgIHJldHVybiBbCiAgICAgICAgICAnX3VwZGF0ZU9yZGVycyhfY29sdW1uVHJlZSwgX2NvbHVtblRyZWUuKiknCiAgICAgICAgXTsKICAgICAgfQoKICAgICAgcmVhZHkoKSB7CiAgICAgICAgc3VwZXIucmVhZHkoKTsKICAgICAgICBhZGRMaXN0ZW5lcih0aGlzLCAndHJhY2snLCB0aGlzLl9vblRyYWNrRXZlbnQpOwogICAgICAgIHRoaXMuX3Jlb3JkZXJHaG9zdCA9IHRoaXMuc2hhZG93Um9vdC5xdWVyeVNlbGVjdG9yKCdbcGFydD0icmVvcmRlci1naG9zdCJdJyk7CgogICAgICAgIHRoaXMuYWRkRXZlbnRMaXN0ZW5lcigndG91Y2hzdGFydCcsIHRoaXMuX29uVG91Y2hTdGFydC5iaW5kKHRoaXMpKTsKICAgICAgICB0aGlzLmFkZEV2ZW50TGlzdGVuZXIoJ3RvdWNobW92ZScsIHRoaXMuX29uVG91Y2hNb3ZlLmJpbmQodGhpcykpOwogICAgICAgIHRoaXMuYWRkRXZlbnRMaXN0ZW5lcigndG91Y2hlbmQnLCB0aGlzLl9vblRvdWNoRW5kLmJpbmQodGhpcykpOwogICAgICAgIHRoaXMuYWRkRXZlbnRMaXN0ZW5lcignY29udGV4dG1lbnUnLCB0aGlzLl9vbkNvbnRleHRNZW51LmJpbmQodGhpcykpOwogICAgICB9CgogICAgICBfb25Db250ZXh0TWVudShlKSB7CiAgICAgICAgaWYgKHRoaXMuaGFzQXR0cmlidXRlKCdyZW9yZGVyaW5nJykpIHsKICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIF9vblRvdWNoU3RhcnQoZSkgewogICAgICAgIC8vIFRvdWNoIGV2ZW50LCBkZWxheSBhY3RpdmF0aW9uIGJ5IDEwMG1zCiAgICAgICAgdGhpcy5fc3RhcnRUb3VjaFJlb3JkZXJUaW1lb3V0ID0gc2V0VGltZW91dCgoKSA9PiB7CiAgICAgICAgICB0aGlzLl9vblRyYWNrU3RhcnQoewogICAgICAgICAgICBkZXRhaWw6IHsKICAgICAgICAgICAgICB4OiBlLnRvdWNoZXNbMF0uY2xpZW50WCwKICAgICAgICAgICAgICB5OiBlLnRvdWNoZXNbMF0uY2xpZW50WQogICAgICAgICAgICB9CiAgICAgICAgICB9KTsKICAgICAgICB9LCAxMDApOwogICAgICB9CgogICAgICBfb25Ub3VjaE1vdmUoZSkgewogICAgICAgIGlmICh0aGlzLl9kcmFnZ2VkQ29sdW1uKSB7CiAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7CiAgICAgICAgfQogICAgICAgIGNsZWFyVGltZW91dCh0aGlzLl9zdGFydFRvdWNoUmVvcmRlclRpbWVvdXQpOwogICAgICB9CgogICAgICBfb25Ub3VjaEVuZCgpIHsKICAgICAgICBjbGVhclRpbWVvdXQodGhpcy5fc3RhcnRUb3VjaFJlb3JkZXJUaW1lb3V0KTsKICAgICAgICB0aGlzLl9vblRyYWNrRW5kKCk7CiAgICAgIH0KCiAgICAgIF9vblRyYWNrRXZlbnQoZSkgewogICAgICAgIGlmIChlLmRldGFpbC5zdGF0ZSA9PT0gJ3N0YXJ0JykgewogICAgICAgICAgY29uc3QgcGF0aCA9IGUuY29tcG9zZWRQYXRoKCk7CiAgICAgICAgICBjb25zdCBoZWFkZXJDZWxsID0gcGF0aFtwYXRoLmluZGV4T2YodGhpcy4kLmhlYWRlcikgLSAyXTsKICAgICAgICAgIGlmICghaGVhZGVyQ2VsbCB8fCAhaGVhZGVyQ2VsbC5fY29udGVudCkgewogICAgICAgICAgICAvLyBOb3QgYSBoZWFkZXIgY29sdW1uCiAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgIH0KCiAgICAgICAgICBjb25zdCBhY3RpdmVFbGVtZW50ID0gdGhpcy5nZXRSb290Tm9kZSgpLmFjdGl2ZUVsZW1lbnQ7CiAgICAgICAgICBpZiAoaGVhZGVyQ2VsbC5fY29udGVudC5jb250YWlucyh0aGlzLmdldFJvb3ROb2RlKCkuYWN0aXZlRWxlbWVudCkKICAgICAgICAgICAgICAmJiAoIXRoaXMuX2llIHx8ICF0aGlzLl9pc0ZvY3VzYWJsZShhY3RpdmVFbGVtZW50KSkpIHsKICAgICAgICAgICAgLy8gU29tZXRoaW5nIHdhcyBmb2N1c2VkIGluc2lkZSB0aGUgY2VsbAogICAgICAgICAgICByZXR1cm47CiAgICAgICAgICB9CgogICAgICAgICAgaWYgKHRoaXMuJC5zY3JvbGxlci5oYXNBdHRyaWJ1dGUoJ2NvbHVtbi1yZXNpemluZycpKSB7CiAgICAgICAgICAgIC8vIFJlc2l6aW5nIGlzIGluIHByb2dyZXNzCiAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgIH0KCiAgICAgICAgICBpZiAoIXRoaXMuX3RvdWNoRGV2aWNlKSB7CiAgICAgICAgICAgIC8vIE5vdCBhIHRvdWNoIGRldmljZQogICAgICAgICAgICB0aGlzLl9vblRyYWNrU3RhcnQoZSk7CiAgICAgICAgICB9CiAgICAgICAgfSBlbHNlIGlmIChlLmRldGFpbC5zdGF0ZSA9PT0gJ3RyYWNrJykgewogICAgICAgICAgdGhpcy5fb25UcmFjayhlKTsKICAgICAgICB9IGVsc2UgaWYgKGUuZGV0YWlsLnN0YXRlID09PSAnZW5kJykg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xLl9vcmRlciA9IGNvbHVtbjIuX29yZGVyOwogICAgICAgIGNvbHVtbjIuX29yZGVyID0gX29yZGVyOwogICAgICAgIHRoaXMuX3VwZGF0ZUxhc3RGcm96ZW4oKTsKICAgICAgICB0aGlzLl91cGRhdGVGaXJzdEFuZExhc3RDb2x1bW4oKTsKICAgICAgfQoKICAgICAgX2dldFRhcmdldENvbHVtbih0YXJnZXRDZWxsLCBkcmFnZ2VkQ29sdW1uKSB7CiAgICAgICAgaWYgKHRhcmdldENlbGwgJiYgZHJhZ2dlZENvbHVtbikgewogICAgICAgICAgbGV0IGNhbmRpZGF0ZSA9IHRhcmdldENlbGwuX2NvbHVtbjsKICAgICAgICAgIHdoaWxlIChjYW5kaWRhdGUucGFyZW50RWxlbWVudCAhPT0gZHJhZ2dlZENvbHVtbi5wYXJlbnRFbGVtZW50ICYmIGNhbmRpZGF0ZSAhPT0gdGhpcykgewogICAgICAgICAgICBjYW5kaWRhdGUgPSBjYW5kaWRhdGUucGFyZW50RWxlbWVudDsKICAgICAgICAgIH0KICAgICAgICAgIGlmIChjYW5kaWRhdGUucGFyZW50RWxlbWVudCA9PT0gZHJhZ2dlZENvbHVtbi5wYXJlbnRFbGVtZW50KSB7CiAgICAgICAgICAgIHJldHVybiBjYW5kaWRhdGU7CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICByZXR1cm4gdGFyZ2V0Q2VsbC5fY29sdW1uOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQoKICAgICAgLyoqCiAgICAgICAqIEZpcmVkIHdoZW4gdGhlIGNvbHVtbnMgaW4gdGhlIGdyaWQgYXJlIHJlb3JkZXJlZC4KICAgICAgICoKICAgICAgICogQGV2ZW50IGNvbHVtbi1yZW9yZGVyCiAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBkZXRhaWwKICAgICAgICogQHBhcmFtIHtPYmplY3R9IGRldGFpbC5jb2x1bW5zIHRoZSBjb2x1bW5zIGluIHRoZSBuZXcgb3JkZXIKICAgICAgICovCiAgICB9OwoKICAgIC8qKgogICAgQGxpY2Vuc2UKICAgIENvcHlyaWdodCAoYykgMjAxOCBWYWFkaW4gTHRkLgogICAgVGhpcyBwcm9ncmFtIGlzIGF2YWlsYWJsZSB1bmRlciBBcGFjaGUgTGljZW5zZSBWZXJzaW9uIDIuMCwgYXZhaWxhYmxlIGF0IGh0dHBzOi8vdmFhZGluLmNvbS9saWNlbnNlLwogICAgKi8KCiAgICAvKioKICAgICAqIEBwb2x5bWVyTWl4aW4KICAgICAqLwogICAgY29uc3QgQ29sdW1uQmFzZU1peGluID0gc3VwZXJDbGFzcyA9PiBjbGFzcyBDb2x1bW5CYXNlTWl4aW4gZXh0ZW5kcyBzdXBlckNsYXNzIHsKICAgICAgc3RhdGljIGdldCBwcm9wZXJ0aWVzKCkgewogICAgICAgIHJldHVybiB7CiAgICAgICAgICAvKioKICAgICAgICAgICAqIFdoZW4gc2V0IHRvIHRydWUsIHRoZSBjb2x1bW4gaXMgdXNlci1yZXNpemFibGUuCiAgICAgICAgICAgKiBAZGVmYXVsdCBmYWxzZQogICAgICAgICAgICovCiAgICAgICAgICByZXNpemFibGU6IHsKICAgICAgICAgICAgdHlwZTogQm9vbGVhbiwKICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgIGlmICh0aGlzLmxvY2FsTmFtZSA9PT0gJ3ZhYWRpbi1ncmlkLWNvbHVtbi1ncm91cCcpIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgIGNvbnN0IHBhcmVudCA9IHRoaXMucGFyZW50Tm9kZTsKICAgICAgICAgICAgICBpZiAocGFyZW50ICYmIHBhcmVudC5sb2NhbE5hbWUgPT09ICd2YWFkaW4tZ3JpZC1jb2x1bW4tZ3JvdXAnKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gcGFyZW50LnJlc2l6YWJsZSB8fCBmYWxzZTsKICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgfSwKCiAgICAgICAgICBfaGVhZGVyVGVtcGxhdGU6IHsKICAgICAgICAgICAgdHlwZTogT2JqZWN0CiAgICAgICAgICB9LAoKICAgICAgICAgIF9mb290ZXJUZW1wbGF0ZTogewogICAgICAgICAgICB0eXBlOiBPYmplY3QKICAgICAgICAgIH0sCgogICAgICAgICAgLyoqCiAgICAgICAgICAgKiBXaGVuIHRydWUsIHRoZSBjb2x1bW4gaXMgZnJvemVuLiBXaGVuIGEgY29sdW1uIGluc2lkZSBvZiBhIGNvbHVtbiBncm91cCBpcyBmcm96ZW4sCiAgICAgICAgICAgKiBhbGwgb2YgdGhlIHNpYmxpbmcgY29sdW1ucyBpbnNpZGUgdGhlIGdyb3VwIHdpbGwgZ2V0IGZyb3plbiBhbHNvLgogICAgICAgICAgICovCiAgICAgICAgICBmcm96ZW46IHsKICAgICAgICAgICAgdHlwZTogQm9vbGVhbiwKICAgICAgICAgICAgdmFsdWU6IGZhbHNlCiAgICAgICAgICB9LAoKICAgICAgICAgIC8qKgogICAgICAgICAgICogV2hlbiBzZXQgdG8gdHJ1ZSwgdGhlIGNlbGxzIGZvciB0aGlzIGNvbHVtbiBhcmUgaGlkZGVuLgogICAgICAgICAgICovCiAgICAgICAgICBoaWRkZW46IHsKICAgICAgICAgICAgdHlwZTogQm9vbGVhbgogICAgICAgICAgfSwKCiAgICAgICAgICAvKioKICAgICAgICAgICAqIFRleHQgY29udGVudCB0byBkaXNwbGF5IGluIHRoZSBoZWFkZXIgY2VsbCBvZiB0aGUgY29sdW1uLgogICAgICAgICAgICovCiAgICAgICAgICBoZWFkZXI6IHsKICAgICAgICAgICAgdHlwZTogU3RyaW5nCiAgICAgICAgICB9LAoKICAgICAgICAgIC8qKgogICAgICAgICAgICogQWxpZ25zIHRoZSBjb2x1bW5zIGNlbGwgY29udGVudCBob3Jpem9udGFsbHkuCiAgICAgICAgICAgKiBTdXBwb3J0ZWQgdmFsdWVzOiAic3RhcnQiLCAiY2VudGVyIiBhbmQgImVuZCIuCiAgICAgICAgICAgKi8KICAgICAgICAgIHRleHRBbGlnbjogewogICAgICAgICAgICB0eXBlOiBTdHJpbmcKICAgICAgICAgIH0sCgogICAgICAgICAgX2xhc3RGcm96ZW46IHsKICAgICAgICAgICAgdHlwZTogQm9vbGVhbiwKICAgICAgICAgICAgdmFsdWU6IGZhbHNlCiAgICAgICAgICB9LAoKICAgICAgICAgIF9vcmRlcjogTnVtYmVyLAoKICAgICAgICAgIF9yZW9yZGVyU3RhdHVzOiBCb29sZWFuLAoKICAgICAgICAgIF9lbXB0eUNlbGxzOiBBcnJheSwKCiAgICAgICAgICBfaGVhZGVyQ2VsbDogT2JqZWN0LAoKICAgICAgICAgIF9mb290ZXJDZWxsOiBPYmplY3QsCgogICAgICAgICAgX2dyaWQ6IE9iamVjdCwKCiAgICAgICAgICAvKioKICAgICAgICAgICAqIEN1c3RvbSBmdW5jdGlvbiBmb3IgcmVuZGVyaW5nIHRoZSBoZWFkZXIgY29udGVudC4KICAgICAgICAgICAqIFJlY2VpdmVzIHR3byBhcmd1bWVudHM6CiAgICAgICAgICAgKgogICAgICAgICAgICogLSBgcm9vdGAgVGhlIGhlYWRlciBjZWxsIGNvbnRlbnQgRE9NIGVsZW1lbnQuIEFwcGVuZCB5b3VyIGNvbnRlbnQgdG8gaXQuCiAgICAgICAgICAgKiAtIGBjb2x1bW5gIFRoZSBgPHZhYWRpbi1ncmlkLWNvbHVtbj5gIGVsZW1lbnQuCiAgICAgICAgICAgKi8KICAgICAgICAgIGhlYWRlclJlbmRlcmVyOiBGdW5jdGlvbiwKCiAgICAgICAgICAvKioKICAgICAgICAgICAqIEN1c3RvbSBmdW5jdGlvbiBmb3IgcmVuZGVyaW5nIHRoZSBmb290ZXIgY29udGVudC4KICAgICAgICAgICAqIFJlY2VpdmVzIHR3byBhcmd1bWVudHM6C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gICAgIH0KICAgICAgICB9CgogICAgICAgIGlmIChoZWFkZXJDZWxsKSB7CiAgICAgICAgICB0aGlzLl9ncmlkLl9fdXBkYXRlSGVhZGVyRm9vdGVyUm93VmlzaWJpbGl0eShoZWFkZXJDZWxsLnBhcmVudEVsZW1lbnQpOwogICAgICAgIH0KICAgICAgfQoKICAgICAgX19zZXRUZXh0Q29udGVudChub2RlLCB0ZXh0Q29udGVudCkgewogICAgICAgIG5vZGUudGV4dENvbnRlbnQgIT09IHRleHRDb250ZW50ICYmIChub2RlLnRleHRDb250ZW50ID0gdGV4dENvbnRlbnQpOwogICAgICB9CgogICAgICBfZ2VuZXJhdGVIZWFkZXIocGF0aCkgewogICAgICAgIHJldHVybiBwYXRoCiAgICAgICAgICAuc3Vic3RyKHBhdGgubGFzdEluZGV4T2YoJy4nKSArIDEpCiAgICAgICAgICAucmVwbGFjZSgvKFtBLVpdKS9nLCAnLSQxJykudG9Mb3dlckNhc2UoKQogICAgICAgICAgLnJlcGxhY2UoLy0vZywgJyAnKQogICAgICAgICAgLnJlcGxhY2UoL14uLywgbWF0Y2ggPT4gbWF0Y2gudG9VcHBlckNhc2UoKSk7CiAgICAgIH0KCiAgICAgIF90b2dnbGVBdHRyaWJ1dGUobmFtZSwgYm9vbCwgbm9kZSkgewogICAgICAgIGlmIChub2RlLmhhc0F0dHJpYnV0ZShuYW1lKSA9PT0gIWJvb2wpIHsKICAgICAgICAgIGlmIChib29sKSB7CiAgICAgICAgICAgIG5vZGUuc2V0QXR0cmlidXRlKG5hbWUsICcnKTsKICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIG5vZGUucmVtb3ZlQXR0cmlidXRlKG5hbWUpOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQoKICAgICAgX3Jlb3JkZXJTdGF0dXNDaGFuZ2VkKHJlb3JkZXJTdGF0dXMsIGhlYWRlckNlbGwsIGZvb3RlckNlbGwsIGNlbGxzKSB7CiAgICAgICAgdGhpcy5fYWxsQ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sLCBfZm9vdGVyQ2VsbCkgewogICAgICAgIGlmICh0ZXh0QWxpZ24gPT09IHVuZGVmaW5lZCkgewogICAgICAgICAgcmV0dXJuOwogICAgICAgIH0KICAgICAgICBpZiAoWydzdGFydCcsICdlbmQnLCAnY2VudGVyJ10uaW5kZXhPZih0ZXh0QWxpZ24pID09PSAtMSkgewogICAgICAgICAgY29uc29sZS53YXJuKCd0ZXh0QWxpZ24gY2FuIG9ubHkgYmUgc2V0IGFzICJzdGFydCIsICJlbmQiIG9yICJjZW50ZXIiJyk7CiAgICAgICAgICByZXR1cm47CiAgICAgICAgfQoKICAgICAgICBsZXQgdGV4dEFsaWduRmFsbGJhY2s7CiAgICAgICAgaWYgKGdldENvbXB1dGVkU3R5bGUodGhpcy5fZ3JpZCkuZGlyZWN0aW9uID09PSAnbHRyJykgewogICAgICAgICAgaWYgKHRleHRBbGlnbiA9PT0gJ3N0YXJ0JykgewogICAgICAgICAgICB0ZXh0QWxpZ25GYWxsYmFjayA9ICdsZWZ0JzsKICAgICAgICAgIH0gZWxzZSBpZiAodGV4dEFsaWduID09PSAnZW5kJykgewogICAgICAgICAgICB0ZXh0QWxpZ25GYWxsYmFjayA9ICdyaWdodCc7CiAgICAgICAgICB9CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgIGlmICh0ZXh0QWxpZ24gPT09ICdzdGFydCcpIHsKICAgICAgICAgICAgdGV4dEFsaWduRmFsbGJhY2sgPSAncmlnaHQnOwogICAgICAgICAgfSBlbHNlIGlmICh0ZXh0QWxpZ24gPT09ICdlbmQnKSB7CiAgICAgICAgICAgIHRleHRBbGlnbkZhbGxiYWNrID0gJ2xlZnQnOwogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgdGhpcy5fYWxsQ2VsbHMuZm9yRWFjaChjZWxsID0+IHsKICAgICAgICAgIGNlbGwuX2NvbnRlbnQuc3R5bGUudGV4dEFsaWduID0gdGV4dEFsaWduOwogICAgICAgICAgaWYgKGdldENvbXB1dGVkU3R5bGUoY2VsbC5fY29udGVudCkudGV4dEFsaWduICE9PSB0ZXh0QWxpZ24pIHsKICAgICAgICAgICAgY2VsbC5fY29udGVudC5zdHlsZS50ZXh0QWxpZ24gPSB0ZXh0QWxpZ25GYWxsYmFjazsKICAgICAgICAgIH0KICAgICAgICB9KTsKICAgICAgfQoKICAgICAgX2hpZGRlbkNoYW5nZWQoaGlkZGVuLCBoZWFkZXJDZWxsLCBmb290ZXJDZWxsLCBjZWxscykgewogICAgICAgIGlmICh0aGlzLnBhcmVudEVsZW1lbnQgJiYgdGhpcy5wYXJlbnRFbGVtZW50Ll9jb2x1bW5Qcm9wQ2hhbmdlZCkgewogICAgICAgICAgdGhpcy5wYXJlbnRFbGVtZW50Ll9jb2x1bW5Qcm9wQ2hhbmdlZCgnaGlkZGVuJywgaGlkZGVuKTsKICAgICAgICB9CgogICAgICAgIGlmICghIWhpZGRlbiAhPT0gISF0aGlzLl9wcmV2aW91c0hpZGRlbiAmJiB0aGlzLl9ncmlkKSB7CiAgICAgICAgICBpZiAoaGlkZGVuID09PSB0cnVlKSB7CiAgICAgICAgICAgIHRoaXMuX2FsbENlbGxzLmZvckVhY2goY2VsbCA9PiB7CiAgICAgICAgICAgICAgaWYgKGNlbGwuX2NvbnRlbnQucGFyZW50Tm9kZSkgewogICAgICAgICAgICAgICAgY2VsbC5fY29udGVudC5wYXJlbnROb2RlLnJlbW92ZUNoaWxkKGNlbGwuX2NvbnRlbnQpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgICB9CiAgICAgICAgICB0aGlzLl9ncmlkLl9kZWJvdW5jZXJIaWRkZW5DaGFuZ2VkID0gRGVib3VuY2VyLmRlYm91bmNlKAogICAgICAgICAgICB0aGlzLl9ncmlkLl9kZWJvdW5jZXJIaWRkZW5DaGFuZ2VkLAogICAgICAgICAgICBhbmltYXRpb25GcmFtZSwKICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgIGlmICh0aGlzLl9ncml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4dGVuZHMgQ29sdW1uQmFzZU1peGluKERpck1peGluJDEoUG9seW1lckVsZW1lbnQpKSB7CiAgICAgIHN0YXRpYyBnZXQgaXMoKSB7CiAgICAgICAgcmV0dXJuICd2YWFkaW4tZ3JpZC1jb2x1bW4nOwogICAgICB9CgogICAgICBzdGF0aWMgZ2V0IHByb3BlcnRpZXMoKSB7CiAgICAgICAgcmV0dXJuIHsKICAgICAgICAgIC8qKgogICAgICAgICAgICogV2lkdGggb2YgdGhlIGNlbGxzIGZvciB0aGlzIGNvbHVtbi4KICAgICAgICAgICAqLwogICAgICAgICAgd2lkdGg6IHsKICAgICAgICAgICAgdHlwZTogU3RyaW5nLAogICAgICAgICAgICB2YWx1ZTogJzEwMHB4JwogICAgICAgICAgfSwKCiAgICAgICAgICAvKioKICAgICAgICAgICAqIEZsZXggZ3JvdyByYXRpbyBmb3IgdGhlIGNlbGwgd2lkdGhzLiBXaGVuIHNldCB0byAwLCBjZWxsIHdpZHRoIGlzIGZpeGVkLgogICAgICAgICAgICovCiAgICAgICAgICBmbGV4R3JvdzogewogICAgICAgICAgICB0eXBlOiBOdW1iZXIsCiAgICAgICAgICAgIHZhbHVlOiAxCiAgICAgICAgICB9LAoKICAgICAgICAgIC8qKgogICAgICAgICAgICogQ3VzdG9tIGZ1bmN0aW9uIGZvciByZW5kZXJpbmcgdGhlIGNlbGwgY29udGVudC4KICAgICAgICAgICAqIFJlY2VpdmVzIHRocmVlIGFyZ3VtZW50czoKICAgICAgICAgICAqCiAgICAgICAgICAgKiAtIGByb290YCBUaGUgY2VsbCBjb250ZW50IERPTSBlbGVtZW50LiBBcHBlbmQgeW91ciBjb250ZW50IHRvIGl0LgogICAgICAgICAgICogLSBgY29sdW1uYCBUaGUgYDx2YWFkaW4tZ3JpZC1jb2x1bW4+YCBlbGVtZW50LgogICAgICAgICAgICogLSBgcm93RGF0YWAgVGhlIG9iamVjdCB3aXRoIHRoZSBwcm9wZXJ0aWVzIHJlbGF0ZWQgd2l0aAogICAgICAgICAgICogICB0aGUgcmVuZGVyZWQgaXRlbSwgY29udGFpbnM6CiAgICAgICAgICAgKiAgIC0gYHJvd0RhdGEuaW5kZXhgIFRoZSBpbmRleCBvZiB0aGUgaXRlbS4KICAgICAgICAgICAqICAgLSBgcm93RGF0YS5pdGVtYCBUaGUgaXRlbS4KICAgICAgICAgICAqICAgLSBgcm93RGF0YS5leHBhbmRlZGAgU3VibGV2ZWwgdG9nZ2xlIHN0YXRlLgogICAgICAgICAgICogICAtIGByb3dEYXRhLmxldmVsYCBMZXZlbCBvZiB0aGUgdHJlZSByZXByZXNlbnRlZCB3aXRoIGEgaG9yaXpvbnRhbCBvZmZzZXQgb2YgdGhlIHRvZ2dsZSBidXR0b24uCiAgICAgICAgICAgKiAgIC0gYHJvd0RhdGEuc2VsZWN0ZWRgIFNlbGVjdGVkIHN0YXRlLgogICAgICAgICAgICovCiAgICAgICAgICByZW5kZXJlcjogRnVuY3Rpb24sCgogICAgICAgICAgLyoqCiAgICAgICAgICAgKiBQYXRoIHRvIGFuIGl0ZW0gc3ViLXByb3BlcnR5IHdob3NlIHZhbHVlIGdldHMgZGlzcGxheWVkIGluIHRoZSBjb2x1bW4gYm9keSBjZWxscy4KICAgICAgICAgICAqIFRoZSBwcm9wZXJ0eSBuYW1lIGlzIGFsc28gc2hvd24gaW4gdGhlIGNvbHVtbiBoZWFkZXIgaWYgYW4gZXhwbGljaXQgaGVhZGVyIG9yIHJlbmRlcmVyIGlzbid0IGRlZmluZWQuCiAgICAgICAgICAgKi8KICAgICAgICAgIHBhdGg6IHsKICAgICAgICAgICAgdHlwZTogU3RyaW5nCiAgICAgICAgICB9LAoKICAgICAgICAgIC8qKgogICAgICAgICAgICogQXV0b21hdGljYWxseSBzZXRzIHRoZSB3aWR0aCBvZiB0aGUgY29sdW1uIGJhc2VkIG9uIHRoZSBjb2x1bW4gY29udGVudHMgd2hlbiB0aGlzIGlzIHNldCB0byBgdHJ1ZWAuCiAgICAgICAgICAgKgogICAgICA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BhdXRvOwogICAgICB9CgogICAgICA6aG9zdChbcGFzc3Rocm91Z2hdKSB7CiAgICAgICAgcG9pbnRlci1ldmVudHM6IG5vbmU7CiAgICAgIH0KICAgIDwvc3R5bGU+CgogICAgPHNsb3Q+PC9zbG90PgpgOwogICAgICB9CgogICAgICBzdGF0aWMgZ2V0IGlzKCkgewogICAgICAgIHJldHVybiAndmFhZGluLWdyaWQtb3V0ZXItc2Nyb2xsZXInOwogICAgICB9CgogICAgICBzdGF0aWMgZ2V0IHByb3BlcnRpZXMoKSB7CiAgICAgICAgcmV0dXJuIHsKCiAgICAgICAgICBzY3JvbGxUYXJnZXQ6IHsKICAgICAgICAgICAgdHlwZTogT2JqZWN0CiAgICAgICAgICB9LAoKICAgICAgICAgIHNjcm9sbEhhbmRsZXI6IHsKICAgICAgICAgICAgdHlwZTogT2JqZWN0CiAgICAgICAgICB9LAoKICAgICAgICAgIHBhc3N0aHJvdWdoOiB7CiAgICAgICAgICAgIHR5cGU6IEJvb2xlYW4sCiAgICAgICAgICAgIHJlZmxlY3RUb0F0dHJpYnV0ZTogdHJ1ZSwKICAgICAgICAgICAgdmFsdWU6IHRydWUKICAgICAgICAgIH0sCgogICAgICAgICAgb3V0ZXJTY3JvbGxpbmc6IEJvb2xlYW4sCgogICAgICAgICAgbm9TY3JvbGxiYXJzOiBCb29sZWFuLAoKICAgICAgICAgIF90b3VjaERldmljZTogQm9vbGVhbgogICAgICAgIH07CiAgICAgIH0KCiAgICAgIHJlYWR5KCkgewogICAgICAgIHN1cGVyLnJlYWR5KCk7CiAgICAgICAgdGhpcy5hZGRFdmVudExpc3RlbmVyKCdzY3JvbGwnLCAoKSA9PiB0aGlzLl9zeW5jU2Nyb2xsVGFyZ2V0KCkpOwogICAgICAgIHRoaXMucGFyZW50RWxlbWVudC5hZGRFdmVudExpc3RlbmVyKCdtb3VzZW1vdmUnLCB0aGlzLl9vbk1vdXNlTW92ZS5iaW5kKHRoaXMpKTsKCiAgICAgICAgLy8gZm9y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ICAgZGlzcGxheTogYmxvY2s7CiAgICAgIHdpZHRoOiAxMDAlOwogICAgICBoZWlnaHQ6IDEwMCU7CiAgICAgIG92ZXJmbG93OiBhdXRvOwogICAgICB6LWluZGV4OiAtMjsKICAgICAgcG9zaXRpb246IHJlbGF0aXZlOwogICAgICBvdXRsaW5lOiBub25lOwogICAgfQoKICAgICNoZWFkZXIgewogICAgICBkaXNwbGF5OiBibG9jazsKICAgICAgcG9zaXRpb246IGFic29sdXRlOwogICAgICB0b3A6IDA7CiAgICAgIHdpZHRoOiAxMDAlOwogICAgfQoKICAgIHRoIHsKICAgICAgdGV4dC1hbGlnbjogaW5oZXJpdDsKICAgIH0KCiAgICAvKiBTYWZhcmkgZG9lc24ndCB3b3JrIHdpdGggImluaGVyaXQiICovCiAgICBbc2FmYXJpXSB0aCB7CiAgICAgIHRleHQtYWxpZ246IGluaXRpYWw7CiAgICB9CgogICAgI2Zvb3RlciB7CiAgICAgIGRpc3BsYXk6IGJsb2NrOwogICAgICBwb3NpdGlvbjogYWJzb2x1dGU7CiAgICAgIGJvdHRvbTogMDsKICAgICAgd2lkdGg6IDEwMCU7CiAgICB9CgogICAgI2l0ZW1zIHsKICAgICAgZGlzcGxheTogYmxvY2s7CiAgICAgIHdpZHRoOiAxMDAlOwogICAgICBwb3NpdGlvbjogcmVsYXRpdmU7CiAgICAgIHotaW5kZXg6IC0xOwogICAgfQoKICAgICNpdGVtcywKICAgICNvdXRlcnNpemVyLAogICAgI2ZpeGVkc2l6ZXIgewogICAgICBib3JkZXItdG9wOiAwIHNvbGlkIHRyYW5zcGFyZW50OwogICAgICBib3JkZXItYm90dG9tOiAwIHNvbGlkIHRyYW5zcGFyZW50OwogICAgfQoKICAgIFtwYXJ0fj0icm93Il0gewogICAgICBkaXNwbGF5OiBmbGV4OwogICAgICB3aWR0aDogMTAwJTsKICAgICAgYm94LXNpemluZzogYm9yZGVyLWJveDsKICAgICAgbWFyZ2luOiAwOwogICAgfQoKICAgIFtwYXJ0fj0icm93Il1bbG9hZGluZ10gW3BhcnR+PSJib2R5LWNlbGwiXSA6OnNsb3R0ZWQodmFhZGluLWdyaWQtY2VsbC1jb250ZW50KSB7CiAgICAgIG9wYWNpdHk6IDA7CiAgICB9CgogICAgI2l0ZW1zIFtwYXJ0fj0icm93Il0gewogICAgICBwb3NpdGlvbjogYWJzb2x1dGU7CiAgICB9CgogICAgI2l0ZW1zIFtwYXJ0fj0icm93Il06ZW1wdHkgewogICAgICBoZWlnaHQ6IDFlbTsKICAgIH0KCiAgICBbcGFydH49ImNlbGwiXTpub3QoW3BhcnR+PSJkZXRhaWxzLWNlbGwiXSkgewogICAgICBmbGV4LXNocmluazogMDsKICAgICAgZmxleC1ncm93OiAxOwogICAgICBib3gtc2l6aW5nOiBib3JkZXItYm94OwogICAgICBkaXNwbGF5OiBmbGV4OwogICAgICB3aWR0aDogMTAwJTsKICAgICAgcG9zaXRpb246IHJlbGF0aXZlOwogICAgICBhbGlnbi1pdGVtczogY2VudGVyOwogICAgICBwYWRkaW5nOiAwOwogICAgICB3aGl0ZS1zcGFjZTogbm93cmFwOwogICAgfQoKICAgIFtwYXJ0fj0iZGV0YWlscy1jZWxsIl0gewogICAgICBwb3NpdGlvbjogYWJzb2x1dGU7CiAgICAgIGJvdHRvbTogMDsKICAgICAgd2lkdGg6IDEwMCU7CiAgICAgIGJveC1zaXppbmc6IGJvcmRlci1ib3g7CiAgICAgIHBhZGRpbmc6IDA7CiAgICB9CgogICAgW3BhcnR+PSJjZWxsIl0gOjpzbG90dGVkKHZhYWRpbi1ncmlkLWNlbGwtY29udGVudCkgewogICAgICBkaXNwbGF5OiBibG9jazsKICAgICAgd2lkdGg6IDEwMCU7CiAgICAgIGJveC1zaXppbmc6IGJvcmRlci1ib3g7CiAgICAgIG92ZXJmbG93OiBoaWRkZW47CiAgICAgIHRleHQtb3ZlcmZsb3c6IGVsbGlwc2lzOwogICAgfQoKICAgIFtoaWRkZW5dIHsKICAgICAgZGlzcGxheTogbm9uZSA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JpbmdvJywgJ3N1cm5hbWUnOiAnU3RhcnInLCAncm9sZSc6ICdkcnVtcyd9XTsKICAgICAqCiAgICAgKiBjb25zdCBjb2x1bW5zID0gZ3JpZC5xdWVyeVNlbGVjdG9yQWxsKCd2YWFkaW4tZ3JpZC1jb2x1bW4nKTsKICAgICAqCiAgICAgKiBjb2x1bW5zWzBdLmhlYWRlclJlbmRlcmVyID0gZnVuY3Rpb24ocm9vdCkgewogICAgICogICByb290LnRleHRDb250ZW50ID0gJ05hbWUnOwogICAgICogfTsKICAgICAqIGNvbHVtbnNbMF0ucmVuZGVyZXIgPSBmdW5jdGlvbihyb290LCBjb2x1bW4sIHJvd0RhdGEpIHsKICAgICAqICAgcm9vdC50ZXh0Q29udGVudCA9IHJvd0RhdGEuaXRlbS5uYW1lOwogICAgICogfTsKICAgICAqCiAgICAgKiBjb2x1bW5zWzFdLmhlYWRlclJlbmRlcmVyID0gZnVuY3Rpb24ocm9vdCkgewogICAgICogICByb290LnRleHRDb250ZW50ID0gJ1N1cm5hbWUnOwogICAgICogfTsKICAgICAqIGNvbHVtbnNbMV0ucmVuZGVyZXIgPSBmdW5jdGlvbihyb290LCBjb2x1bW4sIHJvd0RhdGEpIHsKICAgICAqICAgcm9vdC50ZXh0Q29udGVudCA9IHJvd0RhdGEuaXRlbS5zdXJuYW1lOwogICAgICogfTsKICAgICAqCiAgICAgKiBjb2x1bW5zWzJdLmhlYWRlclJlbmRlcmVyID0gZnVuY3Rpb24ocm9vdCkgewogICAgICogICByb290LnRleHRDb250ZW50ID0gJ1JvbGUnOwogICAgICogfTsKICAgICAqIGNvbHVtbnNbMl0ucmVuZGVyZXIgPSBmdW5jdGlvbihyb290LCBjb2x1bW4sIHJvd0RhdGEpIHsKICAgICAqICAgcm9vdC50ZXh0Q29udGVudCA9IHJvd0RhdGEuaXRlbS5yb2xlOwogICAgICogfTsKICAgICAqIGBgYAogICAgICoKICAgICAqIEFsdGVybmF0aXZlbHksIHRoZSBjb250ZW50IGNhb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ICAgICAqICAgdmFyIHVybCA9ICdodHRwczovL2FwaS5leGFtcGxlL2RhdGEnICsKICAgICAqICAgICAgICc/cGFnZT0nICsgcGFyYW1zLnBhZ2UgKyAgICAgICAgLy8gdGhlIHJlcXVlc3RlZCBwYWdlIGluZGV4CiAgICAgKiAgICAgICAnJnBlcl9wYWdlPScgKyBwYXJhbXMucGFnZVNpemU7IC8vIG51bWJlciBvZiBpdGVtcyBvbiB0aGUgcGFnZQogICAgICogICB2YXIgeGhyID0gbmV3IFhNTEh0dHBSZXF1ZXN0KCk7CiAgICAgKiAgIHhoci5vbmxvYWQgPSBmdW5jdGlvbigpIHsKICAgICAqICAgICB2YXIgcmVzcG9uc2UgPSBKU09OLnBhcnNlKHhoci5yZXNwb25zZVRleHQpOwogICAgICogICAgIGNhbGxiYWNrKHJlc3BvbnNlLmVtcGxveWVlcyk7CiAgICAgKiAgIH07CiAgICAgKiAgIHhoci5vcGVuKCdHRVQnLCB1cmwsIHRydWUpOwogICAgICogICB4aHIuc2VuZCgpOwogICAgICogfTsKICAgICAqIGBgYAogICAgICoKICAgICAqICMjIyBTdHlsaW5nCiAgICAgKgogICAgICogVGhlIGZvbGxvd2luZyBzaGFkb3cgRE9NIHBhcnRzIGFyZSBhdmFpbGFibGUgZm9yIHN0eWxpbmc6CiAgICAgKgogICAgICogUGFydCBuYW1lIHwgRGVzY3JpcHRpb24KICAgICAqIC0tLS0tLS0tLS0tLS0tLS18LS0tLS0tLS0tLS0tLS0tLQogICAgICogYHJvd2AgfCBSb3cgaW4gdGhlIGludGVybmFsIHRhYmxlCiAgICAgKiBgY2VsbGAgfCBDZWxsIGluIHRoZSBpbnRlcm5hbCB0YWJsZQogICAgICogYGhlYWRlci1jZWxsYCB8IEhlYWRlciBjZWxsIGluIHRoZSBpbnRlcm5hbCB0YWJsZQogICAgICogYGJvZHktY2VsbGAgfCBCb2R5IGNlbGwgaW4gdGhlIGludGVybmFsIHRhYmxlCiAgICAgKiBgZm9vdGVyLWNlbGx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HcmlkLlNvcnRNaXhpbgogICAgICogQG1peGVzIEdyaWQuS2V5Ym9hcmROYXZpZ2F0aW9uTWl4aW4KICAgICAqIEBtaXhlcyBHcmlkLkNvbHVtblJlb3JkZXJpbmdNaXhpbgogICAgICogQG1peGVzIEdyaWQuRXZlbnRDb250ZXh0TWl4aW4KICAgICAqIEBtaXhlcyBHcmlkLlN0eWxpbmdNaXhpbgogICAgICogQG1peGVzIEdyaWQuRHJhZ0FuZERyb3BNaXhpbgogICAgICogQGRlbW8gZGVtby9pbmRleC5odG1sCiAgICAgKi8KICAgIGNsYXNzIEdyaWRFbGVtZW50IGV4dGVuZHMKICAgICAgRWxlbWVudE1peGluJDEoCiAgICAgICAgVGhlbWFibGVNaXhpbigKICAgICAgICAgIERhdGFQcm92aWRlck1peGluKAogICAgICAgICAgICBBcnJheURhdGFQcm92aWRlck1peGluKAogICAgICAgICAgICAgIER5bmFtaWNDb2x1bW5zTWl4aW4oCiAgICAgICAgICAgICAgICBBY3RpdmVJdGVtTWl4aW4oCiAgICAgICAgICAgICAgICAgIFNjcm9sbE1peGluKAogICAgICAgICAgICAgICAgICAgIFNlbGVjdGlvbk1peGluKAogICAgICAgICAgICAgICAgICAgICAgU29ydE1peGluKAogICAgICAgICAgICAgICAgICAgICAgICBSb3dEZXRhaWxzTWl4aW4oCiAgICAgICAgICAgICAgICAgICAgICAgICAgS2V5Ym9hcmROYXZpZ2F0aW9uTWl4aW4oCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBBMTF5TWl4aW4oCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZpbHRlck1peGluKAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENvbHVtblJlb3JkZXJpbmdNaXhpbigKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENvbHVtblJlc2l6aW5nTWl4aW4oCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEV2ZW50Q29udGV4dE1peGluKAogICAgICAgICAgICAgICA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ICAgIHN0YXRpYyBnZXQgcHJvcGVydGllcygpIHsKICAgICAgICByZXR1cm4gewoKICAgICAgICAgIF90aGlzOiB7CiAgICAgICAgICAgIHR5cGU6IE9iamVjdCwKICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgICB9LAoKICAgICAgICAgIF9zYWZhcmk6IHsKICAgICAgICAgICAgdHlwZTogQm9vbGVhbiwKICAgICAgICAgICAgdmFsdWU6IC9eKCg/IWNocm9tZXxhbmRyb2lkKS4pKnNhZmFyaS9pLnRlc3QobmF2aWdhdG9yLnVzZXJBZ2VudCkKICAgICAgICAgIH0sCgogICAgICAgICAgX2lvczogewogICAgICAgICAgICB0eXBlOiBCb29sZWFuLAogICAgICAgICAgICB2YWx1ZTogKC9pUGFkfGlQaG9uZXxpUG9kLy50ZXN0KG5hdmlnYXRvci51c2VyQWdlbnQpICYmICF3aW5kb3cuTVNTdHJlYW0pCiAgICAgICAgICAgICAgfHwgKG5hdmlnYXRvci5wbGF0Zm9ybSA9PT0gJ01hY0ludGVsJyAmJiBuYXZpZ2F0b3IubWF4VG91Y2hQb2ludHMgPiAxKQogICAgICAgICAgfSwKCiAgICAgICAgICBfZWRnZTogewogICAgICAgICAgICB0eXBlOiBCb29sZWFuLAogICAgICAgICAgICB2YWx1ZTogdHlwZW9mIENTUyAhPT0gJ3VuZGVmaW5lZCcgJiYgQ1NTLnN1cHBvcnRzKCcoLW1zLWltZS1hbGlnbjphdXRvKScpCiAgICAgICAgICB9LAoKICAgICAgICAgIF9pZTogewogICAgICAgICAgICB0eXBlOiBCb29sZWFuLAogICAgICAgICAgICB2YWx1ZTogISEobmF2aWdhdG9yLnVzZXJBZ2VudC5tYXRjaCgvVHJpZGVudC8pICYmICFuYXZpZ2F0b3IudXNlckFnZW50Lm1hdGNoKC9NU0lFLykpCiAgICAgICAgICB9LAoKICAgICAgICAgIF9maXJlZm94O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KICAgICAgICAgIH0sCiAgICAgICAgICBfcmVjYWxjdWxhdGVDb2x1bW5XaWR0aE9uY2VMb2FkaW5nRmluaXNoZWQ6IHsKICAgICAgICAgICAgdHlwZTogQm9vbGVhbiwKICAgICAgICAgICAgdmFsdWU6IHRydWUKICAgICAgICAgIH0KICAgICAgICB9OwogICAgICB9CgogICAgICBjb25zdHJ1Y3RvcigpIHsKICAgICAgICBzdXBlcigpOwogICAgICAgIHRoaXMuYWRkRXZlbnRMaXN0ZW5lcignYW5pbWF0aW9uZW5kJywgdGhpcy5fb25BbmltYXRpb25FbmQpOwogICAgICB9CgogICAgICBjb25uZWN0ZWRDYWxsYmFjaygpIHsKICAgICAgICBzdXBlci5jb25uZWN0ZWRDYWxsYmFjaygpOwogICAgICAgIHRoaXMucmVjYWxjdWxhdGVDb2x1bW5XaWR0aHMoKTsKICAgICAgfQoKICAgICAgYXR0cmlidXRlQ2hhbmdlZENhbGxiYWNrKG5hbWUsIG9sZFZhbHVlLCBuZXdWYWx1ZSkgewogICAgICAgIHN1cGVyLmF0dHJpYnV0ZUNoYW5nZWRDYWxsYmFjayhuYW1lLCBvbGRWYWx1ZSwgbmV3VmFsdWUpOwogICAgICAgIGlmIChuYW1lID09PSAnZGlyJykgewogICAgICAgICAgdGhpcy5fX2lzUlRMID0gbmV3VmFsdWUgPT09ICdydGwnOwogICAgICAgICAgdGhpcy5fdXBkYXRlU2Nyb2xsZXJNZWFzdXJlbWVudHMoKTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIF9faGFzUm93c1dpdGhDbGllbnRIZWlnaHQoKSB7CiAgICAgICAgcmV0dXJuICEhQXJyYXkuZnJvbSh0aGlzLiQuaXRlbXMuY2hpbGRyZW4pLmZpbHRlcihyb3cgPT4gcm93LmNsaWVudEhlaWdodCkubGVuZ3RoOwogICAgICB9CgogICAgICBfX2l0ZW1zUmVjZWl2ZWQoKSB7CiAgICAgICAgaWYgKHRoaXMuX3JlY2FsY3VsYXRlQ29sdW1uV2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uZmxleEdyb3c7CiAgICAgICAgICBjb2wuZmxleEdyb3cgPSAwOwogICAgICAgIH0pOwogICAgICAgIC8vIFtyZWFkXSBNZWFzdXJlIG1heCBjZWxsIHdpZHRoIGluIGVhY2ggY29sdW1uCiAgICAgICAgY29scy5mb3JFYWNoKGNvbCA9PiB7CiAgICAgICAgICBjb2wuX2N1cnJlbnRXaWR0aCA9IDA7CiAgICAgICAgICAvLyBOb3RlOiBfYWxsQ2VsbHMgb25seSBjb250YWlucyBjZWxscyB3aGljaCBhcmUgY3VycmVudGx5IHJlbmRlcmVkIGluIERPTQogICAgICAgICAgY29sLl9hbGxDZWxscy5mb3JFYWNoKGMgPT4gewogICAgICAgICAgICAvLyBBZGQgMXB4IGJ1ZmZlciB0byB0aGUgb2Zmc2V0IHdpZHRoIHRvIGF2b2lkIHRvbyBuYXJyb3cgY29sdW1ucyAoc3ViLXBpeGVsIHJlbmRlcmluZykKICAgICAgICAgICAgY29uc3QgY2VsbFdpZHRoID0gYy5vZmZzZXRXaWR0aCArIDE7CiAgICAgICAgICAgIGNvbC5fY3VycmVudFdpZHRoID0gTWF0aC5tYXgoY29sLl9jdXJyZW50V2lkdGgsIGNlbGxXaWR0aCk7CiAgICAgICAgICB9KTsKICAgICAgICB9KTsKICAgICAgICAvLyBbd3JpdGVdIFNldCBjb2x1bW4gd2lkdGhzIHRvIGZpdCB3aWRlc3QgbWVhc3VyZWQgY29udGVudAogICAgICAgIGNvbHMuZm9yRWFjaChjb2wgPT4gewogICAgICAgICAgY29sLndpZHRoID0gYCR7Y29sLl9jdXJyZW50V2lkdGh9cHhgOwogICAgICAgICAgY29sLmZsZXhHcm93ID0gY29sLl9vcmlnRmxleEdyb3c7CiAgICAgICAgICBjb2wuX2N1cnJlbnRXaWR0aCA9IHVuZGVmaW5lZDsKICAgICAgICAgIGNvbC5fb3JpZ0ZsZXhHcm93ID0gdW5kZWZpbmVkOwogICAgICAgIH0pOwogICAgICB9CgogICAgICAvKioKICAgICAgICogVXB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ZSk7CiAgICAgICAgICB9CiAgICAgICAgICByb3dzLnB1c2gocm93KTsKICAgICAgICB9CgogICAgICAgIGlmICh0aGlzLl9jb2x1bW5UcmVlKSB7CiAgICAgICAgICB0aGlzLl9jb2x1bW5UcmVlW3RoaXMuX2NvbHVtblRyZWUubGVuZ3RoIC0gMV0uZm9yRWFjaChjID0+IGMubm90aWZ5UGF0aCAmJiBjLm5vdGlmeVBhdGgoJ19jZWxscy4qJywgYy5fY2VsbHMpKTsKICAgICAgICB9CgogICAgICAgIGJlZm9yZU5leHRSZW5kZXIodGhpcywgKCkgPT4gewogICAgICAgICAgdGhpcy5fdXBkYXRlRmlyc3RBbmRMYXN0Q29sdW1uKCk7CiAgICAgICAgICB0aGlzLl9yZXNldEtleWJvYXJkTmF2aWdhdGlvbigpOwogICAgICAgIH0pOwogICAgICAgIHJldHVybiByb3dzOwogICAgICB9CgogICAgICBfZ2V0Um93VGFyZ2V0KCkgewogICAgICAgIHJldHVybiB0aGlzLiQuaXRlbXM7CiAgICAgIH0KCiAgICAgIF9jcmVhdGVDZWxsKHRhZ05hbWUpIHsKICAgICAgICBjb25zdCBjb250ZW50SWQgPSB0aGlzLl9jb250ZW50SW5kZXggPSB0aGlzLl9jb250ZW50SW5kZXggKyAxIHx8IDA7CiAgICAgICAgY29uc3Qgc2xvdE5hbWUgPSAndmFhZGluLWdyaWQtY2VsbC1jb250ZW50LScgKyBjb250ZW50SWQ7CgogICAgICAgIGNvbnN0IGNlbGxDb250ZW50ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgndmFhZGluLWdyaWQtY2VsbC1jb250ZW50Jyk7CiAgICAgICAgY2VsbENvbnRlbnQuc2V0QXR0cmlidXRlKCdzbG90Jywgc2xvdE5hbWUpOwoKICAgICAgICBjb25zdCBjZWxsID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCh0YWdOYW1lKTsKICAgICAgICBjZWxsLmlkID0gc2xvdE5hbWUucmVwbGFjZSgnLWNvbnRlbnQ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1lbnQpKSB7CiAgICAgICAgICAgICAgICBjZWxsLmZvY3VzKCk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIC8vIElmIGZvY3VzIGlzIGluIHRoZSBjZWxsIGNvbnRlbnQg4oCUIHJlc3BlY3QgaXQsIGRvIG5vdCBjaGFuZ2UuCiAgICAgICAgICAgICAgZG9jdW1lbnQucmVtb3ZlRXZlbnRMaXN0ZW5lcignbW91c2V1cCcsIG1vdXNlVXBMaXN0ZW5lciwgdHJ1ZSk7CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIGRvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIoJ21vdXNldXAnLCBtb3VzZVVwTGlzdGVuZXIsIHRydWUpOwogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgLy8gRm9jdXMgb24gbW91c2V1cCwgb24gdGhlIG90aGVyIGhhbmQsIHJlbW92ZXMgc2VsZWN0aW9uIG9uIFNhZmFyaS4KICAgICAgICAgICAgLy8gV2F0Y2ggb3V0IHN5bmMgZm9jdXMgcmVtb3ZhbCBpc3N1ZSwgb25seSBhc3luYyBmb2N1cyB3b3JrcyBoZXJlLgogICAgICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHsKICAgICAgICAgICAgICBpZiAoIWNlbGxDb250ZW50LmNvbnRhaW5zKHRoaXMuZ2V0Um9vdE5vZGUoKS5hY3RpdmVFbGVtZW50KSkgewogICAgICAgICAgICAgICAgY2VsbC5mb2N1cygpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgICB9CiAgICAgICAgfSk7CgogICAgICAgIHJldHVybiBjZWxsOwogICAgICB9CgogICAgICBfdXBkYXRlUm93KHJvdywgY29sdW1ucywgc2VjdGlvbiwgaXNDb2x1bW5Sb3csIG5vTm90aWZ5KSB7CiAgICAgICAgc2VjdGlvbiA9IHNlY3Rpb24gfHwgJ2JvZHknOwoKICAgICAgICBjb25zdCBjb250ZW50c0ZyYWdtZW50ID0gZG9jdW1lbnQuY3JlYXRlRG9jdW1lbnRGcmFnbWVudCgpOwoKICAgICAgICBBcnJheS5mcm9tKHJvdy5jaGlsZHJlbikuZm9yRWFjaChjZWxsID0+IGNlbGwuX3ZhY2FudCA9IHRydWUpOwogICAgICAgIHJvdy5pbm5lckhUTUwgPSAnJzsKICAgICAgICBpZiAocm93LmlkICE9PSAnb3V0ZXJzaXplcicgJiYgcm93LmlkICE9PSAnZml4ZWRzaXplcicpIHsKICAgICAgICAgIHJvdy5oaWRkZW4gPSB0cnVlOwogICAgICAgIH0KICAgICAgICBjb2x1bW5zCiAgICAgICAgICAuZmlsdGVyKGNvbHVtbiA9PiAhY29sdW1uLmhpZGRlbikKICAgICAgICAgIC5mb3JFYWNoKChjb2x1bW4sIGluZGV4LCBjb2xzKSA9PiB7CiAgICAgICAgICAgIGxldCBjZWxsOwoKICAgICAgICAgICAgaWYgKHNlY3Rpb24gPT09ICdib2R5JykgewogICAgICAgICAgICAvLyBCb2R5CiAgICAgICAgICAgICAgY29sdW1uLl9jZWxscyA9IGNvbHVtbi5fY2VsbHMgfHwgW107CiAgICAgICAgICAgICAgY2VsbCA9IGNvbHVtbi5fY2VsbHMuZmlsdGVyKGNlbGwgPT4gY2VsbC5fdmFjYW50KVswXTsKICAgICAgICAgICAgICBpZiAoIWNlbGwpIHsKICAgICAgICAgICAgICAgIGNlbGwgPSB0aGlzLl9jcmVhdGVDZWxsKCd0ZCcpOwogICAgICAgICAgICAgICAgY29sdW1uLl9jZWxscy5wdXNoKGNlbGwpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBjZWxsLnNldEF0dHJpYnV0ZSgncGFydCcsICdjZWxsIGJvZHktY2VsbCcpOwogICAgICAgICAgICAgIHJvdy5hcHBlbmRDaGlsZChjZWxsKTsKCiAgICAgICAgICAgICAgaWYgKGluZGV4ID09PSBjb2xzLmxlbmd0aCAtIDEgJiYgKHRoaXMuX3Jvd0RldGFpbHNUZW1wbGF0ZSB8fCB0aGlzLnJvd0RldGFpbHNSZW5kZXJlcikpIHsKICAgICAgICAgICAgICAvLyBBZGQgZGV0YWlscyBjZWxsIGFzIGxhc3QgY2VsbCB0byBib2R5IHJvd3MKICAgICAgICAgICAgICAgIHRoaXMuX2RldGFpbHNDZWxscyA9IHRoaXMuX2RldGFpbHNDZWxscyB8fCBbXTsKICAgICAgICAgICAgICAgIGNvbnN0IGRldGFpbHNDZWxsID0gdGhpcy5fZGV0YWlsc0NlbGxzLmZpbHRlcihjZWxsID0+IGNlbGwuX3ZhY2FudClbMF0gfHwgdGhpcy5fY3JlYXRlQ2VsbCgndGQnKTsKICAgICAgICAgICAgICAgIGlmICh0aGlzLl9kZXRhaWxzQ2VsbHMuaW5kZXhPZihkZXRhaWxzQ2VsbCkgPT09IC0xKSB7CiAgICAgICAgICAgICAgICAgIHRoaXMuX2RldGFpbHNDZWxscy5wdXNoKGRldGFpbHNDZWxsKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmICghZGV0YWlsc0NlbGwuX2NvbnRlbnQucGFyZW50RWxlbWVudCkgewogICAgICAgICAgICAgICAgICBjb250ZW50c0ZyYWdtZW50LmFwcGVuZENoaWxkKGRldGFpbHNDZWxsLl9jb250ZW50KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuX2NvbmZpZ3VyZURldGFpbHNDZWxsKGRldGFpbHNDZWxsKTsKICAgICAgICAgICAgICAgIHJvdy5hcHBlbmRDaGlsZChkZXRhaWxzQ2VsbCk7CiAgICAgICAgICAgICAgICB0aGlzLl9hMTF5U2V0Um93RGV0YWlsc0NlbGwocm93LCBkZXRhaWxzQ2VsbCk7CiAgICAgICAgICAgICAgICBkZXRhaWxzQ2VsbC5fdmFjYW50ID0gZmFsc2U7CiAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICBpZiAoY29sdW1uLm5vdGlmeVBhdGggJiYgIW5vTm90aWZ5KSB7CiAgICAgICAgICAgICAgICBjb2x1bW4ubm90aWZ5UGF0aCgnX2NlbGxzLionLCBjb2x1bW4uX2NlbGxzKTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIC8vIEhlYWRlciAmIGZvb3RlcgogICAgICAgICAgICAgIGNvbnN0IHRhZ05hbWUgPSBzZWN0aW9uID09PSAnaGVhZGVyJyA/ICd0aCcgOiAndGQnOwogICAgICAgICAgICAgIGlmIChpc0NvbHVtblJvdyB8fCBjb2x1bW4ubG9jYWxOYW1lID09PSAndmFhZGluLWdyaWQtY29sdW1uLWdyb3VwJykgewogICAgICAgICAgICAgICAgY2VsbCA9IGNvbHVtbltgXyR7c2VjdGlvbn1DZWxsYF0gfHwgdGhpcy5fY3JlYXRlQ2VsbCh0YWdOYW1lKTsKICAgICAgICAgICAgICAgIGNlbGwuX2NvbHVtbiA9IGNvbHVtbjsKICAgICAgICAgICAgICAgIHJvdy5hcHBlbmRDaGlsZChjZWxsKTsKICAgICAgICAgICAgICAgIGNvbHVtbltgXyR7c2VjdGlvbn1DZWxsYF0gPSBjZWxsOwogICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICBjb2x1bW4uX2VtcHR5Q2VsbHMgPSBjb2x1bW4uX2VtcHR5Q2VsbHMgfHwgW107CiAgICAgICAgICAgICAgICBjZWxsID0gY29sdW1uLl9lbXB0eUNlbGxzLmZpbHRlcihjZWxsID0+IGNlbGwuX3ZhY2FudClbMF0gfHwgdGhpcy5fY3JlYXRlQ2VsbCh0YWdOYW1lKTsKICAgICAgICAgICAgICAgIGNlbGwuX2NvbHVtbiA9IGNvbHVtbjsKICAgICAgICAgICAgICAgIHJvdy5hcHBlbmRDaGlsZChjZWxsKTsKICAgICAgICAgICAgICAgIGlmIChjb2x1bW4uX2VtcHR5Q2VsbHMuaW5kZXhPZihjZWxsKSA9PT0gLTEpIHsKICAgICAgICAgICAgICAgICAgY29sdW1uLl9lbXB0eUNlbGxzLnB1c2goY2VsbCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIGNlbGwuc2V0QXR0cmlidXRlKCdwYXJ0JywgYGNlbGwgJHtzZWN0aW9ufS1jZWxsYCk7CiAgICAgICAgICAgICAgdGhpcy5fX3VwZGF0ZUhlYWRlckZvb3RlclJvd1Zpc2liaWxpdHkocm93KTsKICAgICAgICAgICAgfQoKICAgICAgICAgICAgaWYgKCFjZWxsLl9jb250ZW50LnBhcmVudEVsZW1lbnQpIHsKICAgICAgICAgICAgICBjb250ZW50c0ZyYWdtZW50LmFwcGVuZENoaWxkKGNlbGwuX2NvbnRlbnQpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNlbGwuX3ZhY2FudCA9IGZhbHNlOwogICAgICAgICAgICBjZWxsLl9jb2x1bW4gPSBjb2x1bW47CiAgICAgICAgICB9KTsKCiAgICAgICAgLy8gTWlnaHQgYmUgZW1wdHkgaWYgb25seSBjYWNoZSB3YXMgdXNlZAogICAgICAgIHRoaXMuYXBwZW5kQ2hpbGQoY29udGVudHNGcmFnbWVudCk7CgogICAgICAgIHRoaXMuX2Zyb3plbkNlbGxzQ2hhbmdlZCgpOwogICAgICAgIHRoaXMuX3VwZGF0ZUZpcnN0QW5kTGFzdENvbHVtbkZvclJvdyhyb3cpOwogICAgICB9CgogICAgICBfX3VwZGF0ZUhlYWRlckZvb3RlclJvd1Zpc2liaWxpdHkocm93KSB7CiAgICAgICAgaWYgKCFyb3cpIHsKICAgICAgICAgIHJldHVybjsKICAgICAgICB9CgogICAgICAgIGNvbnN0IHZpc2libGVSb3dDZWxscyA9IEFycmF5LmZyb20ocm93LmNoaWxkcmVuKS5maWx0ZXIoY2VsbCA9PiB7CiAgICAgICAgICBjb25zdCBjb2x1bW4gPSBjZWxsLl9jb2x1bW47CiAgICAgICAgICBpZiAoY29sdW1uLl9lbXB0eUNlbGxzICYmIGNvbHVtbi5fZW1wdHlDZWxscy5pbmRleE9mKGNlbGwpID4gLTEpIHsKICAgICAgICAgICAgLy8gVGhlIGNlbGwgaXMgYW4gImVtcHR5IGNlbGwiICAtPiBkb2Vzbid0IGJsb2NrIGhpZGluZyB0aGUgcm93CiAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgIH0KICAgICAgICAgIGlmIChyb3cucGFyZW50RWxlbWVudCA9PT0gdGhpcy4kLmhlYWRlcikgewogICAgICAgICAgICBpZiAoY29sdW1uLmhlYWRlclJlbmRlcmVyIHx8IGNvbHVtbi5faGVhZGVyVGVtcGxhdGUpIHsKICAgICAgICAgICAgICAvLyBUaGUgY2VsbCBpcyB0aGUgaGVhZGVyIGNlbGwgb2YgYSBjb2x1bW4gdGhhdCBoYXMgYSBoZWFkZXIgcmVuZGVyZXIKICAgICAgICAgICAgICAvLyBvciBhIGhlYWRlciB0ZW1wbGF0ZSAtPiByb3cgc2hvdWxkIGJlIHZpc2libGUKICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoY29sdW1uLmhlYWRlciA9PT0gbnVsbCkgewogICAgICAgICAgICAgIC8vIFRoZSBjb2x1bW4gaGVhZGVyIGlzIGV4cGxpY2lsdHkgc2V0IHRvIG51bGwgLT4gZG9lc24ndCBibG9jayBoaWRpbmcgdGhlIHJvdwogICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoY29sdW1uLnBhdGggfHwgY29sdW1uLmhlYWRlciAhPT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgICAgLy8gVGhlIGNvbHVtbiBoYXMgYW4gZXhwbGljaXQgbm9uLW51bGwgaGVhZGVyIG9yIGEgcGF0aCB0aGF0IGdlbmVyYXRlcyBhIGhlYWRlcgogICAgICAgICAgICAgIC8vIC0+IHJvdyBzaG91bGQgYmUgdmlzaWJsZQogICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgICB9CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICA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YWxsKG93bmVyLCBjZWxsLl9jb250ZW50LCBvd25lciwgbW9kZWwpOwogICAgICAgICAgfSBlbHNlIGlmIChjZWxsLl9pbnN0YW5jZSkgewogICAgICAgICAgICBjZWxsLl9pbnN0YW5jZS5fX2RldGFpbHNPcGVuZWRfXyA9IG1vZGVsLmRldGFpbHNPcGVuZWQ7CiAgICAgICAgICAgIGNlbGwuX2luc3RhbmNlLl9fc2VsZWN0ZWRfXyA9IG1vZGVsLnNlbGVjdGVkOwogICAgICAgICAgICBjZWxsLl9pbnN0YW5jZS5fX2xldmVsX18gPSBtb2RlbC5sZXZlbDsKICAgICAgICAgICAgY2VsbC5faW5zdGFuY2UuX19leHBhbmRlZF9fID0gbW9kZWwuZXhwYW5kZWQ7CiAgICAgICAgICAgIGNlbGwuX2luc3RhbmNlLnNldFByb3BlcnRpZXMobW9kZWwpOwogICAgICAgICAgfQogICAgICAgIH0pOwoKICAgICAgICB0aGlzLl9kZWJvdW5jZXJVcGRhdGVIZWlnaHRzID0gRGVib3VuY2VyLmRlYm91bmNlKHRoaXMuX2RlYm91bmNlclVwZGF0ZUhlaWdodHMsCiAgICAgICAgICB0aW1lT3V0LmFmdGVyKDEpLCAoKSA9PiB7CiAgICAgICAgICAgIHRoaXMuX3VwZGF0ZU1ldHJpY3MoKTsKICAgICAgICAgICAgdGhpcy5fcG9zaXRpb25JdGVtcygpOwogICAgICAgICAgICB0aGlzLl91cGRhdGVTY3JvbGxlclNpemUoKTsKICAgICAgICAgIH0KICAgICAgICApOwogICAgICB9CgogICAgICBfcmVzaXplSGFuZGxlcigpIHsKICAgICAgICB0aGlzLl91cGRhdGVEZXRhaWxzQ2VsbEhlaWdodHMoKTsKICAgICAgICB0aGlzLl9hY2Nlc3NJcm9uTGlzdEFQSShzdXBlci5fcmVzaXplSGFuZGxlciwgdHJ1ZSk7CiAgICAgICAgdGhpcy5fdXBkYXRlU2Nyb2xsZXJNZWFzdXJlbWVudHMoKTsKICAgICAgICB0aGlzLl91cGRh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dG9wUHJvcGFnYXRpb24oKTsKICAgICAgICAgIHRoaXMubm90aWZ5UmVzaXplKCk7CiAgICAgICAgICB0aGlzLl9faXRlbXNSZWNlaXZlZCgpOwogICAgICAgIH0KICAgICAgfQoKICAgICAgX3RvZ2dsZUF0dHJpYnV0ZShuYW1lLCBib29sLCBub2RlKSB7CiAgICAgICAgaWYgKG5vZGUuaGFzQXR0cmlidXRlKG5hbWUpID09PSAhYm9vbCkgewogICAgICAgICAgaWYgKGJvb2wpIHsKICAgICAgICAgICAgbm9kZS5zZXRBdHRyaWJ1dGUobmFtZSwgJycpOwogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgbm9kZS5yZW1vdmVBdHRyaWJ1dGUobmFtZSk7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CgogICAgICBfX2dldFJvd01vZGVsKHJvdykgewogICAgICAgIHJldHVybiB7CiAgICAgICAgICBpbmRleDogcm93LmluZGV4LAogICAgICAgICAgaXRlbTogcm93Ll9pdGVtLAogICAgICAgICAgbGV2ZWw6IHRoaXMuX2dldEluZGV4TGV2ZWwocm93LmluZGV4KSwKICAgICAgICAgIGV4cGFuZGVkOiB0aGlzLl9pc0V4cGFuZGVkKHJvdy5faXRlbSksCiAgICAgICAgICBzZWxlY3RlZDogdGhpcy5faXNTZWxlY3RlZChyb3cuX2l0ZW0pLAogICAgICAgICAgZGV0YWlsc09wZW5lZDoKICAgICAgICAgICAgISEodGhpcy5fcm93RGV0YWlsc1RlbXBsYXRlIHx8IHRoaXMucm93RGV0YWlsc1JlbmRlcmVyKSAmJiB0aGlzLl9pc0RldGFpbHNPcGVuZWQocm93Ll9pdGVtKQogICAgICAgIH07CiAgICAgIH0KCiAgICAgIC8qKgogICAgICAgKiBNYW51YWxseSBpbnZva2UgZXhpc3RpbmcgcmVuZGVyZXJzIGZvciBhbGwgdGhlIGNvbHVtbnMKICAgICAgICogKGhlYWRlciwgZm9vdGVyIGFuZCBib2R5IGNlbGxzKSBhbmQgb3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FuICJBUyBJUyIgQkFTSVMsCiAgICBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC4KICAgIFNlZSB0aGUgTGljZW5zZSBmb3IgdGhlIHNwZWNpZmljIGxhbmd1YWdlIGdvdmVybmluZyBwZXJtaXNzaW9ucyBhbmQKICAgIGxpbWl0YXRpb25zIHVuZGVyIHRoZSBMaWNlbnNlLgogICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KICAgIGxldCBUZkRvd25sb2FkZXIgPSBjbGFzcyBUZkRvd25sb2FkZXIgZXh0ZW5kcyBQb2x5bWVyRWxlbWVudCB7CiAgICAgICAgY29uc3RydWN0b3IoKSB7CiAgICAgICAgICAgIHN1cGVyKC4uLmFyZ3VtZW50cyk7CiAgICAgICAgICAgIHRoaXMuX3J1biA9ICcnOwogICAgICAgIH0KICAgICAgICBfY3N2VXJsKHRhZywgcnVuLCB1cmxGbikgewogICAgICAgICAgICBpZiAoIXJ1bikKICAgICAgICAgICAgICAgIHJldHVybiAnJzsKICAgICAgICAgICAgcmV0dXJuIGFkZFBhcmFtcyh1cmxGbih0YWcsIHJ1biksIHsgZm9ybWF0OiAnY3N2JyB9KTsKICAgICAgICB9CiAgICAgICAgX2pzb25VcmwodGFnLCBydW4sIHVybEZuKSB7CiAgICAgICAgICAgIGlmICghcnVuKQogICAgICAgICAgICAgICAgcmV0dXJuICcnOwogICAgICAgICAgICByZXR1cm4gdXJsRm4odGFnLCBydW4pOwogICAgICAgIH0KICAgICAgICBfY3N2TmFtZSh0YWcsIHJ1bikgewogICAgICAgICAgICBpZiAoIXJ1bikKICAgICAgICAgICAgICAgIHJldHVybiAnJzsKICAgICAgICAgICAgcmV0dXJuIGBydW4tJHtydW59LXRhZy0ke3RhZ30uY3N2YDsKICAgICA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xzdHlsZT4KICAgICAgOmhvc3QgewogICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICAgICAgICBoZWlnaHQ6IDMycHg7CiAgICAgIH0KICAgICAgcGFwZXItZHJvcGRvd24tbWVudSB7CiAgICAgICAgd2lkdGg6IDEwMHB4OwogICAgICAgIC0tcGFwZXItaW5wdXQtY29udGFpbmVyLWxhYmVsOiB7CiAgICAgICAgICBmb250LXNpemU6IDEwcHg7CiAgICAgICAgfQogICAgICAgIC0tcGFwZXItaW5wdXQtY29udGFpbmVyLWlucHV0OiB7CiAgICAgICAgICBmb250LXNpemU6IDEwcHg7CiAgICAgICAgfQogICAgICB9CiAgICAgIGEgewogICAgICAgIGZvbnQtc2l6ZTogMTBweDsKICAgICAgICBtYXJnaW46IDAgMC4yZW07CiAgICAgIH0KICAgICAgcGFwZXItaW5wdXQgewogICAgICAgIGZvbnQtc2l6ZTogMjJweDsKICAgICAgfQogICAgPC9zdHlsZT4KICBgOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoeyB0eXBlOiBTdHJpbmcgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBTdHJpbmcpCiAgICBdLCBUZkRvd25sb2FkZXIucHJvdG90eXBlLCAiX3J1biIsIHZvaWQgMCk7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7IHR5cGU6IEFycmF5IH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgQXJyYXkpCiAgICBdLCBUZkRvd25sb2FkZXIucHJvdG90eXBlLCAicnVucyIsIHZvaWQgMCk7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7IHR5cGU6IFN0cmluZyB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIFN0cmluZykKICAgIF0sIFRmRG93bmxvYWRlci5wcm90b3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gZGV0YWlscy4KICAgICAgICAgICAgdGhpcy5jb2xvclNjYWxlID0gbnVsbDsKICAgICAgICAgICAgLy8gVGhpcyBmdW5jdGlvbiBpcyBjYWxsZWQgd2hlbiBkYXRhIGlzIHJlY2VpdmVkIGZyb20gdGhlIGJhY2tlbmQuCiAgICAgICAgICAgIHRoaXMuX2xvYWREYXRhQ2FsbGJhY2sgPSAoc2NhbGFyQ2hhcnQsIGl0ZW0sIG1heWJlRGF0YSkgPT4gewogICAgICAgICAgICAgICAgaWYgKG1heWJlRGF0YSA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcignRmFpbGVkIHRvIGxvYWQgZGF0YSBmb3I6JywgaXRlbSk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgY29uc3QgZm9ybWF0dGVkRGF0YSA9IG1heWJlRGF0YS5tYXAoKGRhdHVtKSA9PiAoewogICAgICAgICAgICAgICAgICAgIHdhbGxfdGltZTogbmV3IERhdGUoZGF0dW1bMF0gKiAxMDAwKSwKICAgICAgICAgICAgICAgICAgICBzdGVwOiBkYXR1bVsxXSwKICAgICAgICAgICAgICAgICAgICBzY2FsYXI6IGRhdHVtWzJdLAogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgY29uc3QgbmFtZSA9IHRoaXMuX2dldFNlcmllc05hbWVGcm9tRGF0dW0oaXRlbSk7CiAgICAgICAgICAgICAgICBzY2FsYXJDaGFydC5zZXRTZXJpZXNNZXRhZGF0YShuYW1lLCBpdGVtKTsKICAgICAgICAgICAgICAgIHNjYWxhckNoYXJ0LnNldFNlcmllc0RhdGEobmFtZSwgZm9ybWF0dGVkRGF0YSk7CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIHRoaXMuZ2V0RGF0YUxvYWRVcmwgPSAoeyB0YWcsIHJ1biB9KSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gZ2V0Um91d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B0aG91Z2ggcHVibGljIENvbGFiIHN1cHBvcnRzIFBPU1QpLgogICAgICAgICAgICAgICAgLy8gU2VlIGIvMTI2Mzg3MTA2LgogICAgICAgICAgICAgICAgY29uc3QgaW5Db2xhYiA9IGluaXRpYWxVUkxTZWFyY2hQYXJhbXMkMS5nZXQoJ3RlbnNvcmJvYXJkQ29sYWInKSA9PT0gJ3RydWUnOwogICAgICAgICAgICAgICAgaWYgKGluQ29sYWIpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fcmVxdWVzdERhdGFHZXQoaXRlbXMsIG9uTG9hZCwgb25GaW5pc2gpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3JlcXVlc3REYXRhUG9zdChpdGVtcywgb25Mb2FkLCBvbkZpbmlzaCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIHRoaXMuX3JlcXVlc3REYXRhR2V0ID0gKGl0ZW1zLCBvbkxvYWQsIG9uRmluaXNoKSA9PiB7CiAgICAgICAgICAgICAgICBjb25zdCByb3V0ZXIgPSBnZXRSb3V0ZXIoKTsKICAgICAgICAgICAgICAgIGNvbnN0IGJhc2VVcmwgPSByb3V0ZXIucGx1Z2luUm91dGUoJ3NjYWxhcnMnLCAnL3NjYWxhcnMnKTsKICAgICAgICAgICAgICAgIFByb21pc2UuYWxsKGl0ZW1zLm1hcCgoaXRlbSkgPT4gewogICAgICAgICAgICAgICAgICAgIGNvbnN0IHVybCA9IGFkZFBhcmFtcyhiYXNlVXJsLCB7IHRhZzogaXRlbS50YWcsIHJ1bjogaXRlbS5ydW4gfSk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMucmVxdWVzdE1hbmFnZXIKICAgICAgICAgICAgICAgICAgICAgICAgLnJlcXVlc3QodXJsKQogICAgICAgICAgICAgICAgICAgICAgICAudGhlbigoZGF0YSkgPT4gdm9pZCBvbkxvYWQoeyBpdGVtLCBkYXRhIH0pKTsKICAgICAgICAgICAgICAgIH0pKS5maW5hbGx5KCgpID0+IHZvaWQgb25GaW5pc2goKSk7CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIHRoaXMuX3JlcXVlc3REYXRhUG9zdCA9IChpdGVtcywgb25Mb2FkLCBvbkZpbmlzaCkgPT4gewogICAgICAgICAgICAgICAgY29uc3Qgcm91dGVyID0gZ2V0Um91dGVyKCk7CiAgICAgICAgICAgICAgICBjb25zdCB1cmwgPSByb3V0ZXIucGx1Z2luUm91dGUoJ3NjYWxhcnMnLCAnL3NjYWxhcnNfbXVsdGlydW4nKTsKICAgICAgICAgICAgICAgIGNvbnN0IHJ1bnNCeVRhZyA9IG5ldyBNYXAoKTsKICAgICAgICAgICAgICAgIGZvciAoY29uc3QgeyB0YWcsIHJ1biB9IG9mIGl0ZW1zKSB7CiAgICAgICAgICAgICAgICAgICAgbGV0IHJ1bnMgPSBydW5zQnlUYWcuZ2V0KHRhZyk7CiAgICAgICAgICAgICAgICAgICAgaWYgKHJ1bnMgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgICAgICBydW5zQnlUYWcuc2V0KHRhZywgKHJ1bnMgPSBbXSkpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBydW5zLnB1c2gocnVuKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vIFJlcXVlc3QgYXQgbW9zdCB0aGlzIG1hbnkgcnVucyBhdCBvbmNlLgogICAgICAgICAgICAgICAgLy8KICAgICAgICAgICAgICAgIC8vIEJhY2stb2YtdGhlLWVudmVsb3BlIG1hdGg6IGVhY2ggc2NhbGFyIGRhdHVtIEpTT04gdmFsdWUgY29udGFpbnMKICAgICAgICAgICAgICAgIC8vIHR3byBmbG9hdHMgYW5kIGEgc21hbGwtaXNoIGludGVnZXIuIEZsb2F0cyBhcmUgYWJvdXQgMTggYnl0ZXMsCiAgICAgICAgICAgICAgICAvLyBzaW5jZSBmNjRzIGhhdmUgLWxvZ18xMCgyXi01Mykgfj0gMTYgZGlnaXRzIG9mIHByZWNpc2lvbiBwbHVzCiAgICAgICAgICAgICAgICAvLyBkZWNpbWFsIHBvaW50IGFuZCBsZWFkaW5nIHplcm8uIFNtYWxsLWlzaCBpbnRlZ2VycyAoc3RlcHMpIGFyZQogICAgICAgICAgICAgICAgLy8gYWJvdXQgNSBieXRlcy4gQWRkIEpTT04gb3ZlcmhlYWQgYFssLF0sYCBhbmQgeW91J3JlIGxvb2tpbmcgYXQKICAgICAgICAgICAgICAgIC8vIGFib3V0IDQ4IGJ5dGVzIHBlciBkYXR1bS4gV2l0aCBzdGFuZGFyZCBkb3duc2FtcGxpbmcgb2YKICAgICAgICAgICAgICAgIC8vIDEwMDAgcG9pbnRzIHBlciB0aW1lIHNlcmllcywgZXhwZWN0IH41MCBLQiBvZiByZXNwb25zZSBwYXlsb2FkCiAgICAgICAgICAgICAgICAvLyBwZXIgcmVxdWVzdGVkIHRpbWUgc2VyaWVzLgogICAgICAgICAgICAgICAgLy8KICAgICAgICAgICAgICAgIC8vIFJlcXVlc3RpbmcgNjQgdGltZSBzZXJpZXMgd2FycmFudHMgYSB+MyBNQiByZXNwb25zZSwgd2hpY2ggc2VlbXMKICAgICAgICAgICAgICAgIC8vIHJlYXNvbmFibGUuCiAgICAgICAgICAgICAgICBjb25zdCBCQVRDSF9TSVpFID0gNjQ7CiAgICAgICAgICAgICAgICBjb25zdCByZXF1ZXN0R3JvdXBzID0gW107CiAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IFt0YWcsIHJ1bnNdIG9mIHJ1bnNCeVRhZykgewogICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgcnVucy5sZW5ndGg7IGkgKz0gQkFUQ0hfU0laRSkgewogICAgICAgICAgICAgICAgICAgICAgICByZXF1ZXN0R3JvdXBzLnB1c2goeyB0YWcsIHJ1bnM6IHJ1bnMuc2xpY2UoaSwgaSArIEJBVENIX1NJWkUpIH0pOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIFByb21pc2UuYWxsKHJlcXVlc3RHcm91cHMubWFwKCh7IHRhZywgcnVucyB9KSA9PiB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMucmVxdWVzdE1hbmFnZXIucmVxdWVzdCh1cmwsIHsgdGFnLCBydW5zIH0pLnRoZW4oKGFsbERhdGEpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChjb25zdCBydW4gb2YgcnVucykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgaXRlbSA9IHsgdGFnLCBydW4gfTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoYWxsRGF0YSwgcnVuKSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uTG9hZCh7IGl0ZW0sIGRhdGE6IGFsbERhdGFbcnVuXSB9KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uTG9hZCh7IGl0ZW0sIGRhdGE6IG51bGwgfSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIH0pKS5maW5hbGx5KCgpID0+IHZvaWQgb25GaW5pc2goKSk7CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIHRoaXMuX2dldERhdGFMb2FkTmFtZSA9IChkYXR1bSkgPT4gdGhpcy5fZ2V0U2VyaWVzTmFtZUZyb21EYXR1bShkYXR1bSk7CiAgICAgICAgICAgIHRoaXMuX2V4cGFuZGVkID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuX3Rvb2x0aXBDb2x1bW5zID0gKCgpID0+IHsKICAgICAgICAgICAgICAgIGNvbnN0IGNvbHVtbnMgPSBERUZBVUxUX1RPT0xUSVBfQ09MVU1OUy5zbGljZSgpOwogICAgICAgICAgICAgICAgY29uc3QgaW5kID0gY29sdW1ucy5maW5kSW5kZXgoKGMpID0+IGMudGl0bGUgPT0gJ05hbWUnKTsKICAgICAgICAgICAgICAgIGNvbHVtbnMuc3BsaWNlKGluZCwgMSwgewogICAgICAgICAgICAgICAgICAgIHRpdGxlOiAnTmFtZScsCiAgICAgICAgICAgICAgICAgICAgZXZhbHVhdGU6IChkKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGRhdHVtID0gZC5kYXRhc2V0Lm1ldGFkYXRhKCkubWV0YTsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2dldFNlcmllc0Rpc3BsYXlOYW1lRnJvbURhdHVtKGRhdHVtKTsKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICByZXR1cm4gY29sdW1uczsKICAgICAgICAgICAgfSkoKTsKICAgICAgICB9CiAgICAgICAgX2dldENoYXJ0RGF0YUxvYWRlcigpIHsKICAgICAgICAgICAgLy8gdHNsaW50OmRpc2FibGUtbmV4dC1saW5lOm5vLXVubmVjZXNzYXJ5LXR5cGUtYXNzZXJ0aW9uCiAgICAgICAgICAgIHJldHVybiB0aGlzLnNoYWRvd1Jvb3QucXVlcnlTZWxlY3RvcigndGYtbGluZS1jaGFydC1kYXRhLWxvYWRlcicpOyAvLyBUZkxpbmVDaGFydERhdGFMb2FkZXIKICAgICAgICB9CiAgICAgICAgcmVsb2FkKCkgewogICAgICAgICAgICB0aGlzLl9nZXRDaGFydERhdGFMb2FkZXIoKS5yZWxvYWQoKTsKICAgICAgICB9CiAgICAgICAgcmVkcmF3KCkgewogICAgICAgICAgICB0aGlzLl9nZX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AgICAgICByZXR1cm4gdGhpcy5jb2xvclNjYWxlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIElmICdjb2xvclNjYWxlJyBpc24ndCBleHBsaWNpdGx5IHNwZWNpZmllZCwgdXNlIHRoZSBvbmVzCiAgICAgICAgICAgIC8vIGRlZmluZWQgaW4gdGZfY29sb3Jfc2NhbGUuCiAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICBzY2FsZTogKG5hbWUpID0+IHsKICAgICAgICAgICAgICAgICAgICBjb25zdCBbLCBydW5dID0gSlNPTi5wYXJzZShuYW1lKTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gcnVuc0NvbG9yU2NhbGUocnVuKTsKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgIH07CiAgICAgICAgfQogICAgfTsKICAgIFRmU2NhbGFyQ2FyZC50ZW1wbGF0ZSA9IGh0bWwgYAogICAgPHRmLWNhcmQtaGVhZGluZwogICAgICB0YWc9IltbdGFnXV0iCiAgICAgIGRpc3BsYXktbmFtZT0iW1t0YWdNZXRhZGF0YS5kaXNwbGF5TmFtZV1dIgogICAgICBkZXNjcmlwdGlvbj0iW1t0YWdNZXRhZGF0YS5kZXNjcmlwdGlvbl1dIgogICAgPjwvdGYtY2FyZC1oZWFkaW5nPgogICAgPGRpdiBpZD0idGYtbGluZS1jaGFydC1kYXRhLWxvYWRlci1jb250YWluZXIiPgogICAgICA8dGYtbGluZS1jaGFydC1kYXRhLWxvYWRlcgogICAgICAgIGFjdGl2ZT0iW1thY3RpdmVdXSIKICAgICAgICBjb2xvci1zY2FsZT0iW1tfZ2V0Q29sb3JTY2FsZShjb2xvclNjYWxlKV1dIgogICAgICAgIGRhdGEtc2VyaWVzPSJbW19nZXREYXRhU2VyaWVzKGRhdGFUb0xvYWQuKildXSIKICAgICAgICBkYXRhLXRvLWxvYWQ9IltbZGF0YVRvTG9hZF1dIgogICAgICAgIGdldC1kYXRhLWxvYWQtbmFtZT0iW1tfZ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bi1idXR0b24+CiAgICAgIDxwYXBlci1pY29uLWJ1dHRvbgogICAgICAgIHNlbGVjdGVkJD0iW1tfbG9nU2NhbGVBY3RpdmVdXSIKICAgICAgICBpY29uPSJsaW5lLXdlaWdodCIKICAgICAgICBvbi10YXA9Il90b2dnbGVMb2dTY2FsZSIKICAgICAgICB0aXRsZT0iVG9nZ2xlIHktYXhpcyBsb2cgc2NhbGUiCiAgICAgID48L3BhcGVyLWljb24tYnV0dG9uPgogICAgICA8cGFwZXItaWNvbi1idXR0b24KICAgICAgICBpY29uPSJzZXR0aW5ncy1vdmVyc2NhbiIKICAgICAgICBvbi10YXA9Il9yZXNldERvbWFpbiIKICAgICAgICB0aXRsZT0iRml0IGRvbWFpbiB0byBkYXRhIgogICAgICA+PC9wYXBlci1pY29uLWJ1dHRvbj4KICAgICAgPHRlbXBsYXRlIGlzPSJkb20taWYiIGlmPSJbW3Nob3dEb3dubG9hZExpbmtzXV0iPgogICAgICAgIDxwYXBlci1tZW51LWJ1dHRvbiBvbi1wYXBlci1kcm9wZG93bi1vcGVuPSJfdXBkYXRlRG93bmxvYWRMaW5rIj4KICAgICAgICAgIDxwYXBlci1pY29uLWJ1dHRvbgogICAgICAgICAgICBjbGFzcz0iZHJvcGRvd24tdHJpZ2dlciIKICAgICAgICAgICAgc2xvdD0iZHJvcGRvd24tdHJpZ2dlciIKICAgICAgICAgICAgaWNvbj0iZmlsZS1kb3dubG9hZCIKICAgICAgICAgID48L3BhcGVyLWljb24tYnV0dG9uPgogICAgICAgICAgPHBhcGVyLWxpc3Rib3ggY2xhc3M9ImRyb3Bkb3duLWNvbnRlbnQiIHNsb3Q9ImRyb3Bkb3duLWNvbnRlbnQiPgogICAgICAgICAgICA8cGFwZXItaXRlbT4KICAgICAgICAgICAgICA8YSBpZD0ic3ZnTGluayIgZG93bmxvYWQ9IltbdGFnXV0uc3ZnIj4KICAgICAgICAgICAgICAgIERvd25sb2FkIEN1cnJlbnQgQ2hhcnQgYXMgU1ZHCiAgICAgICAgICAgICAgPC9hPgogICAgICAgICAgICA8L3BhcGVyLWl0ZW0+CiAgICAgICAgICA8L3BhcGVyLWxpc3Rib3g+CiAgICAgICAgPC9wYXBlci1tZW51LWJ1dHRvbj4KICAgICAgPC90ZW1wbGF0ZT4KICAgICAgPHNwYW4gc3R5bGU9ImZsZXgtZ3JvdzogMSI+PC9zcGFuPgogICAgICA8dGVtcGxhdGUgaXM9ImRvbS1pZiIgaWY9Iltbc2hvd0Rvd25sb2FkTGlua3NdXSI+CiAgICAgICAgPGRpdiBjbGFzcz0iZG93bmxvYWQtbGlua3MiPgogICAgICAgICAgPHRmLWRvd25sb2FkZXIKICAgICAgICAgICAgcnVucz0iW1tfcnVuc0Zyb21EYXRhKGRhdGFUb0xvYWQpXV0iCiAgICAgICAgICAgIHRhZz0iW1t0YWddXSIKICAgICAgICAgICAgdXJsLWZuPSJbW19kb3dubG9hZFVybEZuXV0iCiAgICAgICAgICA+PC90Zi1kb3dubG9hZGVyPgogICAgICAgIDwvZGl2PgogICAgICA8L3RlbXBsYXRlPgogICAgPC9kaXY+CiAgICA8c3R5bGU+CiAgICAgIDpob3N0IHsKICAgICAgICBtYXJnaW46IDVweDsKICAgICAgICBkaXNwbGF5OiBibG9jazsKICAgICAgICB3aWR0aDogMzMwcHg7CiAgICAgIH0KCiAgICAgIDpob3N0KFtfZXhwYW5kZWRdKSB7CiAgICAgICAgd2lkdGg6IDEwMCU7CiAgICAgIH0KCiAgICAgIDpob3N0KFtfZXhwYW5kZWRdKSAjdGYtbGluZS1jaGFydC1kYXRhLWxvYWRlci1jb250YWluZXIgewogICAgICAgIGhlaWdodDogNDAwcHg7CiAgICAgIH0KCiAgICAgICN0Zi1saW5lLWNoYXJ0LWRhdGEtbG9hZGVyLWNvbnRhaW5lciB7CiAgICAgICAgaGVpZ2h0OiAyMDBweDsKICAgICAgICB3aWR0aDogMTAwJTsKICAgICAgfQoKICAgICAgdGYtY2FyZC1oZWFkaW5nIHsKICAgICAgICBkaXNwbGF5OiBibG9jazsKICAgICAgICBtYXJnaW4tYm90dG9tOiAxMHB4OwogICAgICB9CgogICAgICAjYnV0dG9ucyB7CiAgICAgICAgZGlzcGxheTogZmxleDsKICAgICAgICBmbGV4LWRpcmVjdGlvbjogcm93OwogICAgICB9CgogICAgICBwYXBlci1pY29uLWJ1dHRvbiB7CiAgICAgICAgY29sb3I6ICMyMTk2ZjM7CiAgICAgICAgYm9yZGVyLXJhZGl1czogMTAwJTsKICAgICAgICB3aWR0aDogMzJweDsKICAgICAgICBoZWlnaHQ6IDMycHg7CiAgICAgICAgcGFkZGluZzogNHB4OwogICAgICB9CgogICAgICBwYXBlci1pY29uLWJ1dHRvbltzZWxlY3RlZF0gewogICAgICAgIGJhY2tncm91bmQ6IHZhcigtLXRiLXVpLWxpZ2h0LWFjY2VudCk7CiAgICAgIH0KCiAgICAgIC5kb3dubG9hZC1saW5rcyB7CiAgICAgICAgZGlzcGxheTogZmxleDsKICAgICAgICBoZWlnaHQ6IDMycHg7CiAgICAgIH0KCiAgICAgIC5kb3dubG9hZC1saW5rcyBhIHsKICAgICAgICBhbGlnbi1zZWxmOiBjZW50ZXI7CiAgICAgICAgZm9udC1zaXplOiAxMHB4OwogICAgICAgIG1hcmdpbjogMnB4OwogICAgICB9CgogICAgICAuZG93bmxvYWQtbGlua3MgcGFwZXItZHJvcGRvd24tbWVudSB7CiAgICAgICAgd2lkdGg6IDEwMHB4OwogICAgICAgIC0tcGFwZXItaW5wdXQtY29udGFpbmVyLWxhYmVsOiB7CiAgICAgICAgICBmb250LXNpemU6IDEwcHg7CiAgICAgICAgfQogICAgICAgIC0tcGFwZXItaW5wdXQtY29udGFpbmVyLWlucHV0OiB7CiAgICAgICAgICBmb250LXNpemU6IDEwcHg7CiAgICAgICAgfQogICAgICB9CgogICAgICBwYXBlci1tZW51LWJ1dHRvbiB7CiAgICAgICAgcGFkZGluZzogMDsKICAgICAgfQogICAgICBwYXBlci1pdGVtIGEgewogICAgICAgIGNvbG9y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gIGNvbnN0IHJlcXVlc3QgPSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGV4cGVyaW1lbnROYW1lOiB0aGlzLmV4cGVyaW1lbnROYW1lLAogICAgICAgICAgICAgICAgICAgICAgICBzZXNzaW9uTmFtZTogaXRlbS5ydW4sCiAgICAgICAgICAgICAgICAgICAgICAgIG1ldHJpY05hbWU6IGl0ZW0udGFnLAogICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuYmFja2VuZAogICAgICAgICAgICAgICAgICAgICAgICAubGlzdE1ldHJpY0V2YWxzKHJlcXVlc3QpCiAgICAgICAgICAgICAgICAgICAgICAgIC50aGVuKChkYXRhKSA9PiB2b2lkIG9uTG9hZCh7IGl0ZW0sIGRhdGEgfSkpOwogICAgICAgICAgICAgICAgfSkpLmZpbmFsbHkoKCkgPT4gdm9pZCBvbkZpbmlzaCgpKTsKICAgICAgICAgICAgfTsKICAgICAgICAgICAgdGhpcy5fY29sb3JTY2FsZSA9IHsKICAgICAgICAgICAgICAgIHNjYWxlOiAoc2VyaWVzTmFtZSkgPT4gewogICAgICAgICAgICAgICAgICAgIC8vIFRoZSB0Zi1zY2FsYXItY2FyZCBBUEkgc2VuZHMgYSBzZXJpZXNOYW1lIGFzIGEgSlNPTgogICAgICAgICAgICAgICAgICAgIC8vIHJlcHJlc2VudGF0aW9uIG9mIHRoZSAyLWVsZW1lbnQgYXJyYXkgW2V4cGVyaW1lbnQsIHJ1bl0sCiAgICAgICAgICAgICAgICAgICAgLy8gd2hlcmUgJ3J1bicgaXMgdGhlIHJ1biB3ZSByZXR1cm4gaW4gdGhlICdyZXF1ZXN0RGF0YScKICAgICAgICAgICAgICAgICAgICAvLyBmdW5jdGlvbi0taW4gb3VyIGNhc2UgdGhhdCBpcyB0aGUgc2Vzc2lvbiBuYW1lLCBhbmQKICAgICAgICAgICAgICAgICAgICAvLyAnZXhwZXJpbWVudCcgaXMgbm90IHVzZWQgaGVyZ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ZXQoJ3RhZycpOwogICAgICAgICAgICAgICAgYW55Q2FyZC5zZXQoJ3RhZycsICcnKTsKICAgICAgICAgICAgICAgIGFueUNhcmQuc2V0KCd0YWcnLCB0YWcpOwogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgX2hhdmVNZXRyaWNzKCkgewogICAgICAgICAgICByZXR1cm4gKHRoaXMudmlzaWJsZVNjaGVtYSAmJgogICAgICAgICAgICAgICAgQXJyYXkuaXNBcnJheSh0aGlzLnZpc2libGVTY2hlbWEubWV0cmljSW5mb3MpICYmCiAgICAgICAgICAgICAgICB0aGlzLnZpc2libGVTY2hlbWEubWV0cmljSW5mb3MubGVuZ3RoID4gMCk7CiAgICAgICAgfQogICAgICAgIF9oYXZlTWV0cmljc0FuZFNlc3Npb25Hcm91cCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuc2Vzc2lvbkdyb3VwICYmIHRoaXMuX2hhdmVNZXRyaWNzKCk7CiAgICAgICAgfQogICAgICAgIC8vIFJldHVybnMgYW4gYXJyYXkgb2YgdGhlIHRlbnNvcmJvYXJkICdydW5zJyBhbmQgJ3RhZ3MnIGNvcnJlc3BvbmRpbmcgdG8KICAgICAgICAvLyB0aGUgZ2l2ZW4gbWV0cmljIGluIGVhY2ggb2YgdGhlIHNlc3Npb25zIGluIHRoZSBnaXZlbiBzZXNzaW9uIGdyb3VwLgogICAgICAgIF9jb21wdXRlU2VyaWVzRm9yU2Vzc2lvbkdyb3VwTWV0cmljKHNlc3Npb25Hcm91cCwgbWV0cmljSW5mbykgewogICAgICAgICAgICBpZiAoc2Vzc2lvbkdyb3VwID09PSBudWxsIHx8CiAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyhzZXNzaW9uR3JvdXApLmxlbmd0aCA9PSAwIHx8CiAgICAgICAgICAgICAgICBtZXRyaWNJbmZvID09PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gW107CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0d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zCiAgICAgICAgLy8gcmV0dXJuZWQgYXMgYSBzdHJpbmcgc3VpdGFibGUgZm9yIGRpc3BsYXkuCiAgICAgICAgX3Nlc3Npb25Hcm91cE1ldHJpYyhzZXNzaW9uR3JvdXAsIG1ldHJpY05hbWUpIHsKICAgICAgICAgICAgaWYgKHNlc3Npb25Hcm91cCA9PSBudWxsIHx8IE9iamVjdC5rZXlzKHNlc3Npb25Hcm91cCkubGVuZ3RoID09IDApIHsKICAgICAgICAgICAgICAgIHJldHVybiAnJzsKICAgICAgICAgICAgfQogICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHNlc3Npb25Hcm91cC5tZXRyaWNWYWx1ZXMubGVuZ3RoOyArK2kpIHsKICAgICAgICAgICAgICAgIGxldCBtZXRyaWNWYWwgPSBzZXNzaW9uR3JvdXAubWV0cmljVmFsdWVzW2ldOwogICAgICAgICAgICAgICAgaWYgKG1ldHJpY1ZhbC5uYW1lLmdyb3VwID09PSBtZXRyaWNOYW1lLmdyb3VwICYmCiAgICAgICAgICAgICAgICAgICAgbWV0cmljVmFsLm5hbWUudGFnID09IG1ldHJpY05hbWUudGFnKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHByZXR0eVByaW50KG1ldHJpY1ZhbC52YWx1ZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuICcnOwogICAgICAgIH0KICAgICAgICBfcm93TnVtYmVyKHJvd0luZGV4KSB7CiAgICAgICAgICAgIHJldHVybiByb3dJbmRleCArIDE7CiAgICAgICAgfQogICAgfTsKICAgIFRmSHBhcmFtc1RhYmxlVmlldy50ZW1wbGF0ZSA9IGh0bWwgYAogICAgPHZhYWRpbi1ncmlkCiAgICAgIGNsYXNzPSJzZXNzaW9uLWdyb3VwLXRhYmxlIgogICAgICBpZD0ic2Vzc2lvbkdyb3Vwc1RhYmxlIgogICAgICBjb2x1bW4tcmVvcmRlcmluZy1hbGxvd2VkPSIiC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NlbnRhdGlvbiBvZiB0aGUgdGVuc29yYm9hcmQuaHBhcmFtcy5TZXNzaW9uR3JvdXAKICAgICAgICAgICAgLy8gcHJvdG9jb2wgYnVmZmVyLgogICAgICAgICAgICB0aGlzLnNlc3Npb25Hcm91cCA9IG51bGw7CiAgICAgICAgICAgIC8vIFRoZSB2aXNpYmxlU2NoZW1hIGRlZmluaW5nIHRoZSBjb2x1bW5zIHRvIHVzZS4KICAgICAgICAgICAgLy8gT25seSB0aGUgdmFsdWVzIG9mIGNvbHVtbnMgaW4gdGhlIHZpc2libGVTY2hlbWEgd2lsbCBiZSBkaXNwbGF5ZWQuCiAgICAgICAgICAgIC8vIFNlZSB0Zi1ocGFyYW1zLXF1ZXJ5LXBhbmUgZm9yIHRoZSBkZWZpbml0aW9uIG9mIHRoaXMgb2JqZWN0LgogICAgICAgICAgICB0aGlzLnZpc2libGVTY2hlbWEgPSBudWxsOwogICAgICAgIH0KICAgICAgICBfcHJvcGVydGllc0FyZVBvcHVsYXRlZCh2aXNpYmxlU2NoZW1hLCBzZXNzaW9uR3JvdXApIHsKICAgICAgICAgICAgcmV0dXJuICh2aXNpYmxlU2NoZW1hICE9PSB1bmRlZmluZWQgJiYKICAgICAgICAgICAgICAgIHZpc2libGVTY2hlbWEgIT09IG51bGwgJiYKICAgICAgICAgICAgICAgIHNlc3Npb25Hcm91cCAhPT0gdW5kZWZpbmVkICYmCiAgICAgICAgICAgICAgICBzZXNzaW9uR3JvdXAgIT09IG51bGwpOwogICAgICAgIH0KICAgICAgICBfc2luZ2xldG9uU2Vzc2lvbkdyb3VwcyhzZXNzaW9uR3JvdXApIHsKICAgICAgICAgICAgaWYgKHNlc3Npb25Hcm91cCA9PT0gbnVsbCB8fCBzZXNzaW9uR3JvdXAgPT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICAgICAgcmV0dXJuIFtdOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBbc2Vzc2lvbkdyb3VwXTsKICAgICAgICB9C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pcyBCLgogICAgICAgIC8vIGlmIHRwPj0xLCB0aGUgY2xvc2VzdCBwb2ludCBvbiB0aGUgc2VnbWVudCBpcyBBLgogICAgICAgIC8vIE90aGVyd2lzZSwgdGhlIGNsb3Nlc3QgcG9pbnQgaXMgQit0cChBLUIpLgogICAgICAgIGZ1bmN0aW9uIGRpc3RGbihheCwgYXksIGJ4LCBieSkgewogICAgICAgICAgICBjb25zdCBhYnggPSBheCAtIGJ4OwogICAgICAgICAgICBjb25zdCBhYnkgPSBheSAtIGJ5OwogICAgICAgICAgICBjb25zdCBjYnggPSBjeCAtIGJ4OwogICAgICAgICAgICBjb25zdCBjYnkgPSBjeSAtIGJ5OwogICAgICAgICAgICBjb25zdCB0cCA9IChhYnggKiBjYnggKyBhYnkgKiBjYnkpIC8gKGFieCAqIGFieCArIGFieSAqIGFieSk7CiAgICAgICAgICAgIGlmICh0cCA8PSAwKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gbDJOb3JtU3F1YXJlZChjYngsIGNieSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHRwID49IDEpIHsKICAgICAgICAgICAgICAgIGNvbnN0IGNheCA9IGF4IC0gY3g7CiAgICAgICAgICAgICAgICBjb25zdCBjYXkgPSBheSAtIGN5OwogICAgICAgICAgICAgICAgcmV0dXJuIGwyTm9ybVNxdWFyZWQoY2F4LCBjYXkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBsMk5vcm1TcXVhcmVkKGNieCAtIHRwICogYWJ4LCBjYnkgLSB0cCAqIGFieSk7CiAgICAgICAgfQogICAgICAgIGxldCBtaW5EaXN0ID0gbnVsbDsKICAgICAgICBsZXQgY2xvc2VzdFBhdGggPSBudWxsOwogICAgICAgIHBhdGhzLmZvckVhY2goKHApID0+IHsKICAgICAgICAgICAgY29uc3QgZGlzdCA9IGRpc3RGbihwLmNvbnRyb2xQb2ludHNbYV1bMF0sIHAuY29udHJvbFBvaW50c1thXVsxXSwgcC5jb250cm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4aXNTY2FsZShkb21haW5WYWx1ZXMsIGF4aXNIZWlnaHQsIHNjYWxlVHlwZSkgewogICAgICAgIGZ1bmN0aW9uIGNvbXB1dGVOdW1lcmljRXh0ZW50KCkgewogICAgICAgICAgICBpZiAoZG9tYWluVmFsdWVzLmxlbmd0aCA9PT0gMCkgewogICAgICAgICAgICAgICAgLy8gSWYgdGhlcmUgYXJlIG5vIHZhbHVlcywgdGhlcmUgd29uJ3QgYmUgYW55IHNlc3Npb24gZ3JvdXBzLgogICAgICAgICAgICAgICAgLy8gV2UgY2hvb3NlIGFuIGFyYml0cmFyeSBudW1lcmljIGRvbWFpbiB0aGF0IGRvZXNuJ3QgY29udGFpbiAwCiAgICAgICAgICAgICAgICAvLyAodG8gYWxsb3cgYSBsb2cgc2NhbGUpLgogICAgICAgICAgICAgICAgcmV0dXJuIFsxLCAyXTsKICAgICAgICAgICAgfQogICAgICAgICAgICBjb25zdCBbbWluLCBtYXhdID0gZXh0ZW50KGRvbWFpblZhbHVlcyk7CiAgICAgICAgICAgIGlmIChtaW4gIT09IG1heCkgewogICAgICAgICAgICAgICAgcmV0dXJuIFttaW4sIG1heF07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gV2Ugc2hpZnQgdGhlIG1pbiBhbmQgbWF4IG9mIHRoZSBleHRlbnQgaGVyZSBzaW5jZQogICAgICAgICAgICAvLyBkMy5zY2FsZUxpbmVhcigpIGFuZCBkMy5zY2FsZUxvZygpIGJvdGggZXhwZWN0IHRoZSBkb21haW4KICAgICAgICAgICAgLy8gdG8gYmUgYW4gaW50ZXJ2YWwgd2l0aCBtb3JlIHRoYW4gb25lIHBvaW50LiBTaW5jZSBpbiB0aGlzIGNhc2UKICAgICAgICAgICAgLy8gYWxsIHNlc3Npb24gZ3JvdXBzIHdvdWxkIHBhc3MgdGhyb3VnaCBhIHNpbmdsZSBwb2ludCBpbiB0aGUgYXhpcywKICAgICAgICAgICAgLy8gdGhlIGF4aXMgcmVzb2x1dGlvbiBkb2Vzbid0IG1hdHRlciBtdWNoIHNvIHRoZSBhbW91bnQgd2Ugc2hpZnQgYnkKICAgICAgICAgICAgLy8gZG9lc24ndCBtYXR0ZXIgbXVjaCBhcyB3ZWxsLiBTaW5jZSBmb3IgbG9nIHNjYWxlcyB3ZSBkb24ndCBhbGxvdwogICAgICAgICAgICAvLyB0aGUgZG9tYWluIHRvIGNvbnRhaW4gMCwgd2UgbmVlZCB0byBiZSBjYXJlZnVsIG5vdCB0byBtYWtlIHRoZQogICAgICAgICAgICAvLyBkb21haW4gY29udGFpbiAwIGlmIGl0IGhhZG4ndCBiZWZvcmUuCiAgICAgICAgICAgIGlmIChtaW4gPiAwKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gW21pbiAqIDAuNSwgbWluICogMS41XTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAobWluIDwgMCkgewogICAgICAgICAgICAgICAgcmV0dXJuIFttaW4gKiAxLjUsIG1pbiAqIDAuNV07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIFstMSwgMV07CiAgICAgICAgfQogICAgICAgIGlmIChzY2FsZVR5cGUgPT09ICdMSU5FQVInKSB7CiAgICAgICAgICAgIHJldHVybiBsaW5lYXIkMigpCiAgICAgICAgICAgICAgICAuZG9tYWluKGNvbXB1dGVOdW1lcmljRXh0ZW50KCkpCiAgICAgICAgICAgICAgICAucmFuZ2UoW2F4aXNIZWlnaHQsIDBdKTsKICAgICAgICB9CiAgICAgICAgZWxzZSBpZiAoc2NhbGVUeXBlID09PSAnTE9HJykgewogICAgICAgICAgICBjb25zdCBleHRlbnQgPSBjb21wdXRlTnVtZXJpY0V4dGVudCgpOwogICAgICAgICAgICBpZiAoZXh0ZW50WzBdIDw9IDAgJiYgZXh0ZW50WzFdID49IDApIHsKICAgICAgICAgICAgICAgIC8vIFdlIGNhbid0IGhhdmUgYSBsb2cgc2NhbGUgZm9yIGRhdGEgd2hvc2UgZXh0ZW50IGNvbnRhaW5zIDAuCiAgICAgICAgICAgICAgICAvLyBVc2UgYSBsaW5lYXIgc2NhbGUgaW5zdGVhZC4KICAgICAgICAgICAgICAgIC8vIFRPRE8oZXJleik6IENyZWF0ZSBhIHN5bWxvZyBzY2FsZSBzaW1pbGFyIHRvIE1hdHBsb3RsaWIncwogICAgICAgICAgICAgICAgLy8gc3ltbG9nLiBTZWUgYWxzbyBkMyBpc3N1ZSBoZXJlOgogICAgICAgICAgICAgICAgLy8gaHR0cHM6Ly9naXRodWIuY29tL2QzL2QzLXNjYWxlL2lzc3Vlcy8xMDUKICAgICAgICAgICAgICAgIC8vIGFuZCBiLzExMTc1NTU0MAogICAgICAgICAgICAgICAgcmV0dXJuIGNyZWF0ZUF4aXNTY2FsZShkb21haW5WYWx1ZXMsIGF4aXNIZWlnaHQsICdMSU5FQVInKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gbG9nJDEoKQogICAgICAgICAgICAgICAgLmRvbWFpbihleHRlbnQpCiAgICAgICAgICAgICAgICAucmFuZ2UoW2F4aXNIZWlnaHQsIDBdKTsKICAgICAgICB9CiAgICAgICAgZWxzZSBpZiAoc2NhbGVUeXBlID09PSAnUVVBTlRJTEUnKSB7CiAgICAgICAgICAgIC8vIENvbXB1dGUga051bVF1YW50aWxlcyBxdWFudGlsZXMuCiAgICAgICAgICAgIGNvbnN0IGtOdW1RdWFudGlsZXMgPSAyMDsKICAgICAgICAgICAgLy8gQ29tcHV0ZSB0aGUgc2NhbGUncyByYW5nZSB0byBiZSB0aGUgYXJyYXk6CiAgICAgICAgICAgIC8vIFtheGlzSGVpZ2h0LAogICAgICAgICAgICAvLyAgYXhpc0hlaWdodC0xKmF4aXNIZWlnaHQvKGtOdW1RdWFudGlsZXMtMSksCiAgICAgICAgICAgIC8vICBheGlzSGVpZ2h0LTIqYXhpc0hlaWdodC8oa051bVF1YW50aWxlcy0xKSwgLi4uLAogICAgICAgICAgICAvLyAgMF0uCiAgICAgICAgICAgIC8vIFVuZm9ydHVuYXRsZXksCiAgICAgICAgICAgIC8vIGQzLnJhbmdlKGF4aXNIZWlnaHQsIC1heGlzSGVpZ2h0LyhrTnVtUXVhbnRpbGVzLTEpLAogICAgICAgICAgICAvLyAgICAgICAgICAtYXhpc0hlaWdodC8oa051bVF1YW50aWxlcy0xKSkKICAgICAgICAgICAgLy8gaGFzIG51bWVyaWNhbCBpc3N1ZXMgYW5kIG1heSBwcm9kdWNlIGFuIGV4dHJhIG1lbWJlciwgc28gd2UgdXNlIGEKICAgICAgICAgICAgLy8gZGlmZmVyZW50IHByb2NlZHVyZToKICAgICAgICAgICAgY29uc3Qgc2NhbGVSYW5nZSA9IHNlcXVlbmNlKGtOdW1RdWFudGlsZXMpCiAgICAgICAgICAgICAgICAubWFwKChpKSA9PiBheGlzSGVpZ2h0IC0gKGkgKiBheGlzSGVpZ2h0KSAvIChrTnVtUXVhbnRpbGVzIC0gMSkpOwogICAgICAgICAgICBpZiAoZG9tYWluVmFsdWVzLmxlbmd0aCA9PT0gMCkgewogICAgICAgICAgICAgICAgLy8gTm8gc2Vzc2lvbiBncm91cHMgaW4gdGhpcyBjYXNlLiBXZSB1c2UgYSBkdW1teSB2YWx1ZSBzaW5jZQogICAgICAgICAgICAgICAgLy8gZDMuc2NhbGVRdWFudGlsZSgpIHJlcXVpcmVzIGEgbm9uLWVtcHR5IGRvbWFpbi4KICAgICAgICAgICAgICAgIGRvbWFpblZhbHVlcyA9IFsxXTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gcXVhbnRpbGUoKS5kb21haW4obG9kYXNoLnVuaXEoZG9tYWluVmFsdWVzKSkucmFuZ2Uoc2NhbGVSYW5nZSk7CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYgKHNjYWxlVHlwZSA9PT0gJ05PTl9OVU1FUklDJykgewogICAgICAgICAgICByZXR1cm4gcG9pbnQkMSgpCiAgICAgICAgICAgICAgICAuZG9tYWluKAogICAgICAgICAgICAvLyBXZSBzb3J0IHRoZSBkb21haW4gd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Zyb20gdGhlIERPTS4KICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihzdmdQcm9wcywgc2NoZW1hLCBpbnRlcmFjdGlvbk1hbmFnZXIsIGNvbEluZGV4KSB7CiAgICAgICAgICAgIHRoaXMuX3N2Z1Byb3BzID0gc3ZnUHJvcHM7CiAgICAgICAgICAgIHRoaXMuX3NjaGVtYSA9IHNjaGVtYTsKICAgICAgICAgICAgdGhpcy5faW50ZXJhY3Rpb25NYW5hZ2VyID0gaW50ZXJhY3Rpb25NYW5hZ2VyOwogICAgICAgICAgICB0aGlzLl9jb2xJbmRleCA9IGNvbEluZGV4OwogICAgICAgICAgICB0aGlzLl9pc0Rpc3BsYXllZCA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLl95U2NhbGUgPSBudWxsOwogICAgICAgICAgICB0aGlzLl9zY2FsZVR5cGUgPSBudWxsOwogICAgICAgICAgICB0aGlzLnNldEJydXNoU2VsZWN0aW9uKG51bGwpOwogICAgICAgIH0KICAgICAgICBjb2xJbmRleCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2NvbEluZGV4OwogICAgICAgIH0KICAgICAgICB5U2NhbGUoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl95U2NhbGU7CiAgICAgICAgfQogICAgICAgIHNjYWxlVHlwZSgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3NjYWxlVHlwZTsKICAgICAgICB9CiAgICAgICAgYnJ1c2hTZWxlY3Rpb24oKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9icnVzaFNlbGVjdGlvbjsKICAgICAgICB9CiAgICAgICAgaXNEaXNwbGF5ZWQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9pc0Rpc3BsYXllZDsKICAgICAgICB9CiAgICAgICAgc2V0QnJ1c2hTZWxlY3Rpb24oYnJ1c2hTZWxlY3Rpb24pIHsKICAgICAgICAgICAgdGhpcy5fYnJ1c2hTZWxlY3Rpb24g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pc1BhcmVudFNlbCA9IHNlbGVjdChheGlzUGFyZW50KTsKICAgICAgICAgICAgYXhpc1BhcmVudFNlbC5zZWxlY3RBbGwoJ2cnKS5yZW1vdmUoKTsKICAgICAgICAgICAgYXhpc1BhcmVudFNlbAogICAgICAgICAgICAgICAgLmFwcGVuZCgnZycpCiAgICAgICAgICAgICAgICAuY2xhc3NlZCgnYXhpcycsIHRydWUpCiAgICAgICAgICAgICAgICAuY2FsbChkM0F4aXMpCiAgICAgICAgICAgICAgICAvLyBBZGQgYXhpcyB0aXRsZS4KICAgICAgICAgICAgICAgIC5hcHBlbmQoJ3RleHQnKQogICAgICAgICAgICAgICAgLmNsYXNzZWQoJ2F4aXMtdGl0bGUnLCB0cnVlKQogICAgICAgICAgICAgICAgLnN0eWxlKCdjdXJzb3InLCAnbW92ZScpCiAgICAgICAgICAgICAgICAuc3R5bGUoJ3RleHQtYW5jaG9yJywgJ21pZGRsZScpCiAgICAgICAgICAgICAgICAuYXR0cigneScsIC05KQogICAgICAgICAgICAgICAgLnRleHQoKGNvbEluZGV4KSA9PiBzY2hlbWFDb2x1bW5OYW1lKHRoaXMuX3NjaGVtYSwgY29sSW5kZXgpKTsKICAgICAgICAgICAgLy8gQWRkIGRyYWdnaW5nIGV2ZW50IGhhbmRsZXJzLgogICAgICAgICAgICBheGlzUGFyZW50U2VsLmNhbGwoZHJhZygpCiAgICAgICAgICAgICAgICAub24oJ3N0YXJ0JywgKCkgPT4gewogICAgICAgICAgICAgICAgLy8gV2Ugc2V0IGFuIGF0dHJpYnV0ZSBvbiB0aGUgYXhpcyB0aGF0IHNpZ25hbHMKICAgICAgICAgICAgICAgIC8vIHRoYXQgaXQgaXMgYmVpbmcgZHJhZ2dlZC4gVGhpcyBhbGxvd3MKICAgICAgICAgICAgICAgIC8vIGludGVncmF0aW9uIHRlc3RzIHRvIGtub3cgd2hlbiBkcmFnZ2luZyBpcyBkb25lLgogICAgICAgICAgICAgICAgYXhpc1BhcmVudC5zZXRBdHRyaWJ1dGUoJ2lzLWRyYWdnaW5nJywgJycpOwogICAgICAgICAgICAgICAgdGhpcy5faW50ZXJhY3Rpb25NYW5hZ2VyLm9uRHJhZ1N0YXJ0KHRoaXMuY29sSW5kZXgoKSk7CiAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAub24oJ2RyYWcnLCAoKSA9PiB0aGlzLl9pbnRlcmFjdGlvbk1hbmFnZXIub25EcmFnKGV2ZW50LngpKQogICAgICAgICAgICAgICAgLm9uKCdlbmQnLCAoKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLl9pbnRlcmFjdGlvbk1hbmFnZXIub25EcmFnRW5kKCk7CiAgICAgICAgICAgICAgICBheGlzUGFyZW50LnJlbW92ZUF0dHJpYnV0ZSgnaXMtZHJhZ2dpbmcnKTsKICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAvLyBBZGQgdGhlIGJydXNoLgogICAgICAgICAgICBjb25zdCBkM0JydXNoID0gYnJ1c2hZKCkKICAgICAgICAgICAgICAgIC5leHRlbnQoWwogICAgICAgICAgICAgICAgWy04LCAwXSwKICAgICAgICAgICAgICAgIFs4LCB0aGlzLl9zdmdQcm9wcy5oZWlnaHQgKyAxXSwKICAgICAgICAgICAgXSkKICAgICAgICAgICAgICAgIC8qIERlZmluZSB0aGUgYnJ1c2ggZXZlbnQgaGFuZGxlcnMuIEQzIHdpbGwgY2FsbCB0aGVzZSBib3RoIHdoZW4KICAgICAgICAgICAgICAgICAgICAgICB0aGUgdXNlciBtb3ZlcyB0aGUgYnJ1c2ggc2VsZWN0aW9uIGFuZCB3aGVuIHdlIGNoYW5nZSB0aGUgYnJ1c2gKICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3Rpb24gcHJvZ3JhbW1hdGljYWxseSB1c2luZyBkM0JydXNoLm1vdmUoKS4gV2UnZCBsaWtlIHRvCiAgICAgICAgICAgICAgICAgICAgICAgYXZvaWQgY2FsbGluZyB0aGUgaW50ZXJhY3Rpb25NYW5hZ2VyIGluIHRoZSBsYXR0ZXIgY2FzZTsgdGh1cywKICAgICAgICAgICAgICAgICAgICAgICB3ZSBjYWxsIF9pc0ludGVyYWN0aXZlRDNFdmVudCgpIHRvIGZpbmQgb3V0IGlmIHRoZSBldmVudCB3YXMgZmlyZWQKICAgICAgICAgICAgICAgICAgICAgICBkdWUgdG8gYSBwcm9ncmFtbWV0aWMgY2hhbmdlIG9mIHRoZSBicnVzaCBzZWxlY3Rpb24gLCBhbmQgaWYgc28sCiAgICAgICAgICAgICAgICAgICAgICAgaWdub3JlIHRoZSBldmVudC4gKi8KICAgICAgICAgICAgICAgIC5vbignc3RhcnQnLCAoKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAoIV9pc0ludGVyYWN0aXZlRDNFdmVudChldmVudCkpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvLyBXZSBzZXQgdGhlICdpcy1icnVzaGluZycgYXR0cmlidXRlIG9uIHRoZSBjb250YWluaW5nCiAgICAgICAgICAgICAgICAvLyAnYXhpcy1wYXJlbnQnLWNsYXNzZWQgPGc+IGVsZW1lbnQgdG8gbm90aWZ5IGludGVncmF0aW9uIHRlc3RzCiAgICAgICAgICAgICAgICAvLyB0aGF0IHRoZSBheGlzIGlzIGJ1c3kgYnJ1c2hpbmcuCiAgICAgICAgICAgICAgICBheGlzUGFyZW50LnNldEF0dHJpYnV0ZSgnaXMtYnJ1c2hpbmcnLCAnJyk7CiAgICAgICAgICAgICAgICB0aGlzLl9pbnRlcmFjdGlvbk1hbmFnZXIub25CcnVzaENoYW5nZWQodGhpcy5jb2xJbmRleCgpLCBldmVudC5zZWxlY3Rpb24pOwogICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgLm9uKCdicnVzaCcsICgpID0+IHsKICAgICAgICAgICAgICAgIGlmICghX2lzSW50ZXJhY3RpdmVEM0V2ZW50KGV2ZW50KSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuX2ludGVyYWN0aW9uTWFuYWdlci5vbkJydXNoQ2hhbmdlZCh0aGlzLmNvbEluZGV4KCksIGV2ZW50LnNlbGVjdGlvbik7CiAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAub24oJ2VuZCcsICgpID0+IHsKICAgICAgICAgICAgICAgIGlmICghX2lzSW50ZXJhY3RpdmVEM0V2ZW50KGV2ZW50KSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuX2ludGVyYWN0aW9uTWFuYWdlci5vbkJydXNoQ2hhbmdlZCh0aGlzLmNvbEluZGV4KCksIGV2ZW50LnNlbGVjdGlvbik7CiAgICAgICAgICAgICAgICBheGlzUGFyZW50LnJlbW92ZUF0dHJpYnV0ZSgnaXMtYnJ1c2hpbmcnKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGNvbnN0IGJydXNoRyA9IHNlbGVjdChheGlzUGFyZW50KQogICAgICAgICAgICAgICAgLmFwcGVuZCgnZycpCiAgICAgICAgICAgICAgICAuY2xhc3NlZCgnYnJ1c2gnLCB0cnVlKTsKICAgICAgICAgICAgYnJ1c2hHLmNhbGwoZDNCcnVzaCk7CiAgICAgICAgICAgIC8vIFNldCB0aGUgYnJ1c2ggc2VsZWN0aW9uIHByb2dyYW1tYXRpY2FsbHkuCiAgICAgICAgICAgIC8vIFdlIG5lZWQgdG8gY2FzdCBicnVzaEcgdG8gJ2FueScgaGVyZSBzaW5jZSBUeXBlU2NyaXB0IGRvZXNuJ3QgcmVhbGl6ZQogICAgICAgICAgICAvLyB0aGUgYnJ1c2hHIGlzIGEgPGc+IHNlbGVjdGlvbiBhbmQgY29tcGxhaW5zLgogICAgICAgICAgICBkM0JydXNoLm1vdmUoYnJ1c2hHLCB0aGlzLmJydXNoU2VsZWN0aW9uKCkpOwogICAgICAgIH0KICAgICAgICBzZXREaXNwbGF5ZWQodmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5faXNEaXNwbGF5ZWQgPSB2YWx1ZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB0aGUgYnJ1c2ggZmlsdGVyIGZvciB0aGUgZ2l2ZW4gc2VsZWN0aW9uIHVzaW5nIHRoZSBjdXJyZW50CiAgICAgICAgICogc2NhbGUuCiAgICAgICAgICovCiAgICAgICAgX2J1aWxkQnJ1c2hGaWx0ZXIoYnJ1c2hTZWxlY3Rpb24sIHNjYWxlVHlwZSwgeVNjYWxlIC8qIEQzIHNjYWxlICovKSB7CiAgICAgICAgICAgIGlmIChicnVzaFNlbGVjdGlvbiA9PT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBBbHdheXNQYXNzaW5nQnJ1c2hGaWx0ZXIoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoc2NhbGVUeXBlID09PSBudWxsKSB7CiAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKCJTY2FsZSB0eXBlIGlzIG51bGwsIGJ1dCBicnVzaFNlbGVjdGlvbiBpc24ndDogIiwgYnJ1c2hTZWxlY3Rpb24pOwogICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBBbHdheXNQYXNzaW5nQnJ1c2hGaWx0ZXIoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBzd2l0Y2ggKHNjYWxlVHlwZSkgewogICAgICAgICAgICAgICAgY2FzZSBTY2FsZVR5cGUuTElORUFSOgogICAgICAgICAgICAgICAgY2FzZSBTY2FsZVR5cGUuTE9HOiB7CiAgICAgICAgICAgICAgICAgICAgLyogRmFsbCBUaHJvdWdoICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgW2xvd2VyLCB1cHBlcixdID0gY29udGludW91c1NjYWxlSW52ZXJzZUltYWdlKHlTY2FsZSwgYnJ1c2hTZWxlY3Rpb25bMF0sIGJydXNoU2VsZWN0aW9uWzFdKTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEludGVydmFsQnJ1c2hGaWx0ZXIobG93ZXIsIHVwcGVyLCAKICAgICAgICAgICAgICAgICAgICAvKmxvd2VyT3Blbj0qLyBmYWxzZSwgCiAgICAgICAgICAgICAgICAgICAgLyp1cHBlck9wZW49Ki8gZmFsc2UpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgY2FzZSBTY2FsZVR5cGUuUVVBTlRJTEU6IHsKICAgICAgICAgICAgICAgICAgICBjb25zdCBbbG93ZXIsIHVwcGVyLF0gPSBxdWFudGlsZVNjYWxlSW52ZXJzZUltYWdlKHlTY2FsZSwgYnJ1c2hTZWxlY3Rpb25bMF0sIGJydXNoU2VsZWN0aW9uWzFdKTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEludGVydmFsQnJ1c2hGaWx0ZXIobG93ZXIsIHVwcGVyLCAKICAgICAgICAgICAgICAgICAgICAvKmxvd2VyT3Blbj0qLyBmYWxzZSwgCiAgICAgICAgICAgICAgICAgICAgLyp1cHBlck9wZW49Ki8gdHJ1ZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjYXNlIFNjYWxlVHlwZS5OT05fTlVNRVJJQzoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IFNldEJydXNoRmlsdGVyKHBvaW50U2NhbGVJbnZlcnNlSW1hZ2UoeVNjYWxlLCBicnVzaFNlbGVjdGlvblswXSwgYnJ1c2hTZWxlY3Rpb25bMV0pKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBjb25zb2xlLmVycm9yKCdVbmtub3duIHNjYWxlIHR5cGU6ICcsIHNjYWxlVHlwZSk7CiAgICAgICAgICAgIHJldHVybiBuZXcgQWx3YXlzUGFzc2luZ0JydXNoRmlsdGVyKCk7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBNYW5hZ2VzIHRoZSBjb2xsZWN0aW9uIG9mIGF4ZXMg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2xvci1jb250cm9scy5odG1sKSBhbmQgc2Vzc2lvbkdyb3Vwcy4gU2Vzc2lvbkdyb3VwcwogICAgICAgICAqIGFyZSB1c2VkIHRvIHVwZGF0ZSB0aGUgZG9tYWluIChhbmQgdGh1cyBzY2FsZSkgb2YgdGhlIGF4ZXMuIFRoZSAnb3B0aW9ucycKICAgICAgICAgKiBvYmplY3QgY29udHJvbCB3aGljaCBheGVzIGFyZSB2aXNpYmxlLgogICAgICAgICAqLwogICAgICAgIHVwZGF0ZUF4ZXMob3B0aW9ucywgc2Vzc2lvbkdyb3VwcykgewogICAgICAgICAgICBjb25zb2xlLmFzc2VydCghdGhpcy5pc0F4aXNEcmFnZ2luZygpKTsKICAgICAgICAgICAgLy8gVHJhdmVyc2Ugb3B0aW9ucy5jb2x1bW5zLCBhbmQgdXBkYXRlIGVhY2ggY29ycmVzcG9uZGluZyBheGlzLgogICAgICAgICAgICBjb25zdCB2aXNpYmxlQ29sSW5kaWNlcyA9IG5ldyBTZXQoKTsKICAgICAgICAgICAgb3B0aW9ucy5jb2x1bW5zLmZvckVhY2goKGNvbHVtbikgPT4gewogICAgICAgICAgICAgICAgY29uc3QgY29sSW5kZXggPSBjb2x1bW4uYWJzb2x1dGVJbmRleDsKICAgICAgICAgICAgICAgIGxldCBheGlzID0gdGhpcy5fYXhlc1tjb2xJbmRleF07CiAgICAgICAgICAgICAgICBheGlzLnNldERpc3BsYXllZCh0cnVlKTsKICAgICAgICAgICAgICAgIGNvbnN0IGRvbWFpblZhbHVlcyA9IHNlc3Npb25Hcm91cHMubWFwKChzZykgPT4gY29sdW1uVmFsdWVCeUluZGV4KHRoaXMuX3NjaGVtYSwgc2csIGNvbEluZGV4KSk7CiAgICAgICAgICAgICAgICBheGlzLnNldERvbWFpbkFuZFNjYWxlKGRvbWFpblZhbHVlcywgY29sdW1uLnNjYWxlKTsKICAgICAgICAgICAgICAgIHZpc2libGVDb2xJbmRpY2VzLmFkZChjb2xJbmRleCk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICAvLyBTZXQgdGhlIHZpc2liaWxpdHkgb2YgdGhlIHJlbWFpbmluZyBheGVzIHRvIGZhbHNlLgogICAgICAgICAgICB0aGlzLl9heGVzLmZvckVhY2goKGF4aXMpID0+IHsKICAgICAgICAgICAgICAgIGlmICghdmlzaWJsZUNvbEluZGljZXMuaGFzKGF4aXMuY29sSW5kZXgoKSkpIHsKICAgICAgICAgICAgICAgICAgICBheGlzLnNldERpc3BsYXllZChmYWxzZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICB0aGlzLl91cGRhdGVTdGF0aW9uYXJ5QXhlc1Bvc2l0aW9ucyh2aXNpYmxlQ29sSW5kaWNlcyk7CiAgICAgICAgICAgIC8vIFVwZGF0ZSB0aGUgRE9NLgogICAgICAgICAgICB0aGlzLl9wYXJlbnRzU2VsID0gdGhpcy5fcGFyZW50c1NlbC5kYXRhKEFycmF5LmZyb20odmlzaWJsZUNvbEluZGljZXMpLCAKICAgICAgICAgICAgLyprZXk9Ki8gKGNvbEluZGV4KSA9PiBjb2xJbmRleCk7CiAgICAgICAgICAgIHRoaXMuX3BhcmVudHNTZWwuZXhpdCgpLnJlbW92ZSgpOwogICAgICAgICAgICB0aGlzLl9wYXJlbnRzU2VsID0gdGhpcy5fcGFyZW50c1NlbAogICAgICAgICAgICAgICAgLmVudGVyKCkKICAgICAgICAgICAgICAgIC5hcHBlbmQoJ2cnKQogICAgICAgICAgICAgICAgLmNsYXNzZWQoJ2F4aXMtcGFyZW50JywgdHJ1ZSkKICAgICAgICAgICAgICAgIC5tZXJnZSh0aGlzLl9wYXJlbnRzU2VsKTsKICAgICAgICAgICAgY29uc3QgX3RoaXMgPSB0aGlzOwogICAgICAgICAgICB0aGlzLl9wYXJlbnRzU2VsCiAgICAgICAgICAgICAgICAuY2FsbCgoc2VsKSA9PiB0aGlzLl91cGRhdGVBeGVzUG9zaXRpb25zSW5ET00oc2VsKSkKICAgICAgICAgICAgICAgIC5lYWNoKGZ1bmN0aW9uIChjb2xJbmRleCkgewogICAgICAgICAgICAgICAgLyogSGVyZSAndGhpcycgaXMgdGhlICdheGlzLXBhcmVudCctY2xhc3NlZCA8Zz4gZWxlbWVudCwKICAgICAgICAgICAgICAgICAgICAgYW5kICdfdGhpcycgaXMgdGhlIEF4ZXNDb2xsZWN0aW9uIGVsZW1lbnQuICovCiAgICAgICAgICAgICAgICBfdGhpcy5fYXhlc1tjb2xJbmRleF0udXBkYXRlRE9NKHRoaXMpOwogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogRXhlY3V0ZXMgbWFwRnVuY3Rpb24gb24gZWFjaCB2aXNpYmxlIGF4aXMuIFJldHVybnMgYW4gYXJyYXkgY29udGFpbmluZyB0aGUKICAgICAgICAgKiByZXN1bHQgZnJvbSBlYWNoIGludm9jYXRpb24uIFRoZSBmdW5jdGlvbiBpcyBpbnZva2VkIG9uIHRoZSBheGVzIG9yZGVyZWQKICAgICAgICAgKiBieSB0aGVpciBpbmNyZWFzaW5nIHhQb3NpdGlvbi4KICAgICAgICAgKi8KICAgICAgICBtYXBWaXNpYmxlQXhlcyhtYXBGdW5jdGlvbikgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fc3RhdGlvbmFyeUF4ZXNQb3NpdGlvbnMKICAgICAgICAgICAgICAgIC5kb21haW4oKQogICAgICAgICAgICAgICAgLm1hcCgoY29sSW5kZXgpID0+IG1hcEZ1bmN0aW9uKHRoaXMuZ2V0QXhpc1Bvc2l0aW9uKGNvbEluZGV4KSwgdGhpcy5fYXhlc1tjb2xJbmRleF0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB0cnVlIGlmIHRoZSBnaXZlbiBwcmVkaWNhdGUgcmV0dXJucyB0cnVlIG9uIGV2ZXJ5IHZpc2libGUgYXhpcywKICAgICAgICAgKiAgICAgZmFsc2Ugb3RoZXJ3aXNlLiBOb3Rl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2x1bW4gaW5kaWNlcyBpbiAndmlzaWJsZUNvbEluZGljZXMnLCBidXQgcHJlc2VydmVzCiAgICAgICAgICogdGhlIG9yZGVyIG9mIGF4ZXMgaW5kZXhlZCBieSB2aXNpYmxlQ29sSW5kaWNlcyB0aGF0IGFyZSBhbHJlYWR5IHZpc2libGUuCiAgICAgICAgICovCiAgICAgICAgX3VwZGF0ZVN0YXRpb25hcnlBeGVzUG9zaXRpb25zKHZpc2libGVDb2xJbmRpY2VzKSB7CiAgICAgICAgICAgIGNvbnN0IHZpc2libGVEb21haW4gPSB0aGlzLl9zdGF0aW9uYXJ5QXhlc1Bvc2l0aW9ucwogICAgICAgICAgICAgICAgLmRvbWFpbigpCiAgICAgICAgICAgICAgICAuZmlsdGVyKChjb2xJbmRleCkgPT4gdmlzaWJsZUNvbEluZGljZXMuaGFzKGNvbEluZGV4KSk7CiAgICAgICAgICAgIGNvbnN0IG5ld0RvbWFpbiA9IEFycmF5LmZyb20obmV3IFNldChbLi4udmlzaWJsZURvbWFpbiwgLi4uQXJyYXkuZnJvbSh2aXNpYmxlQ29sSW5kaWNlcyldKSk7CiAgICAgICAgICAgIHRoaXMuX3N0YXRpb25hcnlBeGVzUG9zaXRpb25zLmRvbWFpbihuZXdEb21haW4pOwogICAgICAgIH0KICAgICAgICBfdXBkYXRlQXhlc1Bvc2l0aW9uc0luRE9NKHNlbGVjdGlvbk9yVHJhbnNpdGlvbikgewogICAgICAgICAgICBzZWxlY3Rpb25PclRyYW5zaXRpb24uYXR0cigndHJhbnNmb3JtJywgKGNvbEluZGV4KSA9PiB0cmFuc2xhdGVTdHIodGhpcy5nZXRBeGlzUG9zaXRpb24oY29sSW5kZXgpKSk7CiAgICAgICAgfQogICAgICAgIF9jcmVhdGVBeGVzKGludGVyYWN0aW9uTWFuYWdlcikgewogICAgICAgICAgICByZXR1cm4gc2VxdWVuY2UobnVtQ29sdW1ucyh0aGlzLl9zY2hlbWEpKQogICAgICAgICAgICAgICAgLm1hcCgoY29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pemUoKSA9PT0gMQogICAgICAgICAgICAgICAgPyB0aGlzLl9zZXNzaW9uR3JvdXBTZWwuZGF0dW0oKQogICAgICAgICAgICAgICAgOiBudWxsOwogICAgICAgIH0KICAgICAgICBpc051bGwoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLnNlc3Npb25Hcm91cCgpID09PSBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTaG91bGQgb25seSBiZSBjYWxsZWQgYnkgdGhlICdMaW5lc0NvbGxlY3Rpb24nIGNsYXNzIGJlbG93LgogICAgICAgICAqIEByZXR1cm4gdGhlIGQzLXNlbGVjdGlvbiBnaXZlbiBvbiBjb25zdHJ1Y3Rpb24uCiAgICAgICAgICovCiAgICAgICAgc2VsZWN0aW9uKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fc2Vzc2lvbkdyb3VwU2VsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDb21wYXJlcyB0aGlzIGhhbmRsZSB0byAnb3RoZXJIYW5kbGUnIGFuZCByZXR1cm5zIHRydWUgaWYgYm90aCBhcmUgbnVsbAogICAgICAgICAqIG9yIGJvdGggYXJlIG5vdCBudWxsIGFuZCB0aGV5IHJlZmVyZW5jZSBlcXVhbCBzZXNzaW9uIGdyb3Vwcy4KICAgICAgICAgKiBTZXNzaW9uIGdyb3VwIGVxdWFsaXR5IGlzIGRldGVybWluZWQgYnkgdGhlaXIgbmFtZXMuCiAgICAgICAgICovCiAgICAgICAgZXF1YWxzVG8ob3RoZXJIYW5kbGUpIHsKICAgICAgICAgICAgaWYgKHRoaXMuaXNOdWxsKCkpIHsKICAgICAgICAgICAgICAgIHJldHVybiBvdGhlckhhbmRsZS5pc051bGwoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAob3RoZXJIYW5kbGUuaXNOdWxsKCkpIHsKICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm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PSBMaW5lVHlwZS5GT1JFR1JPVU5EID8gdGhpcy5fZmdQYXRoc1NlbCA6IHRoaXMuX2JnUGF0aHNTZWw7CiAgICAgICAgICAgIHBhdGhTZWwKICAgICAgICAgICAgICAgIC50cmFuc2l0aW9uKCkKICAgICAgICAgICAgICAgIC5kdXJhdGlvbih0cmFuc2l0aW9uRHVyYXRpb24pCiAgICAgICAgICAgICAgICAuYXR0cignZCcsIChzZXNzaW9uR3JvdXApID0+IHRoaXMuX3BhdGhEQXR0cmlidXRlKHNlc3Npb25Hcm91cCkpOwogICAgICAgICAgICBpZiAobGluZVR5cGUgPT09IExpbmVUeXBlLkZPUkVHUk9VTkQpIHsKICAgICAgICAgICAgICAgIC8vIFVwZGF0ZSB0aGUgY29udHJvbCBwb2ludHMgcHJvcGVydHksIGlmIHdlJ3JlIHVwZGF0aW5nIHRoZSBmb3JlZ3JvdW5kCiAgICAgICAgICAgICAgICAvLyBsaW5lcy4KICAgICAgICAgICAgICAgIHdpbmRvdy5zZXRUaW1lb3V0KCgpID0+IHsKICAgICAgICAgICAgICAgICAgICBjb25zdCBfdGhpcyA9IHRoaXM7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fZmdQYXRoc1NlbC5lYWNoKGZ1bmN0aW9uIChzZXNzaW9uR3JvdXApIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gJ190aGlzJyByZWZlcnMgdG8gdGhlICdMaW5lc0NvbGxlY3Rpb24nIGluc3RhbmNlLgogICAgICAgICAgICAgICAgICAgICAgICBfdGhpcy5fc2V0Q29udHJvbFBvaW50c1Byb3BlcnR5KHRoaXMsIHNlc3Npb25Hcm91cCk7CiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZXJlbmRlcnMgdGhlIGZvcmVncm91bmQgbGluZXMgc28gdGhhdCB0aGVpciB2aXNpYmlsaXR5IG1hdGNoZ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gICAgICAgICAgIGlmIChjbG9zZXN0RmdQYXRoID09PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IFNlc3Npb25Hcm91cEhhbmRsZSgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBuZXcgU2Vzc2lvbkdyb3VwSGFuZGxlKHNlbGVjdChjbG9zZXN0RmdQYXRoKSk7CiAgICAgICAgfQogICAgICAgIF9jcmVhdGVMaW5lQ29sb3JGdW5jdGlvbihjb2xvckJ5Q29sdW1uSW5kZXgsIG1pbkNvbG9yLCBtYXhDb2xvcikgewogICAgICAgICAgICBpZiAoY29sb3JCeUNvbHVtbkluZGV4ID09PSBudWxsKSB7CiAgICAgICAgICAgICAgICAvKiBVc2UgYSBkZWZhdWx0IGNvbG9yIGlmIG5vIGNvbG9yLWJ5IGNvbHVtbiBpcyBzZWxlY3RlZC4gKi8KICAgICAgICAgICAgICAgIHJldHVybiAoKSA9PiAncmVkJzsKICAgICAgICAgICAgfQogICAgICAgICAgICBjb25zdCBjb2xvclNjYWxlID0gbGluZWFyJDIoKQogICAgICAgICAgICAgICAgLmRvbWFpbihudW1lcmljQ29sdW1uRXh0ZW50KHRoaXMuX3NjaGVtYSwgdGhpcy5fc2Vzc2lvbkdyb3VwcywgY29sb3JCeUNvbHVtbkluZGV4KSkKICAgICAgICAgICAgICAgIC5yYW5nZShbbWluQ29sb3IsIG1heENvbG9yXSkKICAgICAgICAgICAgICAgIC5pbnRlcnBvbGF0ZShsYWIkMSk7CiAgICAgICAgICAgIHJldHVybiAoc2Vzc2lvbkdyb3VwKSA9PiBjb2xvclNjYWxlKGNvbHVtblZhbHVlQnlJbmRleCh0aGlzLl9zY2hlbWEsIHNlc3Npb25Hcm91cCwgY29sb3JCeUNvbHVtbkluZGV4KSk7CiAgICAgICAgfQogICAgICAgIF9yZWNvbXB1dGVQYXRoU2VsZWN0aW9uKGN1cnJlbnRQYXRoU2VsIC8qIGQzIHNlbGVjdGlvbiAqLykgewog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m9uQ2xpY2soKSkKICAgICAgICAgICAgICAgIC5vbignbW91c2Vtb3ZlIG1vdXNlZW50ZXInLCAoKSA9PiB7CiAgICAgICAgICAgICAgICBjb25zdCBbeCwgeV0gPSBtb3VzZSh0aGlzLl9zdmdQcm9wcy5zdmdHLm5vZGUoKSk7CiAgICAgICAgICAgICAgICB0aGlzLm9uTW91c2VNb3ZlZCh4LCB5KTsKICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgIC5vbignbW91c2VsZWF2ZScsICgpID0+IHRoaXMub25Nb3VzZUxlYXZlKCkpOwogICAgICAgIH0KICAgICAgICBvbkRyYWdTdGFydChjb2xJbmRleCkgewogICAgICAgICAgICB0aGlzLl9heGVzQ29sbGVjdGlvbi5kcmFnU3RhcnQoY29sSW5kZXgpOwogICAgICAgICAgICB0aGlzLl9saW5lc0NvbGxlY3Rpb24uaGlkZUJhY2tncm91bmRMaW5lcygpOwogICAgICAgIH0KICAgICAgICBvbkRyYWcobmV3WCkgewogICAgICAgICAgICB0aGlzLl9heGVzQ29sbGVjdGlvbi5kcmFnKG5ld1gpOwogICAgICAgICAgICB0aGlzLl9saW5lc0NvbGxlY3Rpb24ucmVjb21wdXRlQ29udHJvbFBvaW50cyhMaW5lVHlwZS5GT1JFR1JPVU5EKTsKICAgICAgICB9CiAgICAgICAgb25EcmFnRW5kKCkgewogICAgICAgICAgICB0aGlzLl9heGVzQ29sbGVjdGlvbi5kcmFnRW5kKC8qdHJhbnNpdGlvbkR1cmF0aW9uPSovIDUwMCk7CiAgICAgICAgICAgIHRoaXMuX2xpbmVzQ29sbGVjdGlvbi5yZWNvbXB1dGVDb250cm9sUG9pbnRzKExpbmVUeXBlLkZPUkVHUk9VTkQsIAogICAgICAgICAgICAvKiB0cmFuc2l0aW9uRHVyYXRpb249Ki8gNTAwKTsKICAgICAgICAgICAgd2luZG93LnNldFRpbWVvdXQoKCkgPT4gewogICAgICAgICAgICAgICAgdGhpcy5fbGluZXNDb2xsZWN0aW9uLnJl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N0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiAiQVMgSVMiIEJBU0lTLAogICAgV0lUSE9VVCBXQVJSQU5USUVTIE9SIENPTkRJVElPTlMgT0YgQU5ZIEtJTkQsIGVpdGhlciBleHByZXNzIG9yIGltcGxpZWQuCiAgICBTZWUgdGhlIExpY2Vuc2UgZm9yIHRoZSBzcGVjaWZpYyBsYW5ndWFnZSBnb3Zlcm5pbmcgcGVybWlzc2lvbnMgYW5kCiAgICBsaW1pdGF0aW9ucyB1bmRlciB0aGUgTGljZW5zZS4KICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCiAgICBsZXQgVGZIcGFyYW1zUGFyYWxsZWxDb29yZHNQbG90ID0gY2xhc3MgVGZIcGFyYW1zUGFyYWxsZWxDb29yZHNQbG90IGV4dGVuZHMgTGVnYWN5RWxlbWVudE1peGluKFBvbHltZXJFbGVtZW50KSB7CiAgICAgICAgY29uc3RydWN0b3IoKSB7CiAgICAgICAgICAgIHN1cGVyKC4uLmFyZ3VtZW50cyk7CiAgICAgICAgICAgIC8vIFRoZSBsYXN0IHNlc3Npb24gZ3JvdXAgdGhhdCB3YXMgY2xpY2tlZCBvbiBvciBudWxsIGlmIG5vCiAgICAgICAgICAgIC8vIHNlc3Npb24gZ3JvdXAgd2FzIGNsaWNrZWQgb24geWV0LgogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQHR5cGUgez9PYmplY3R9CiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLnNlbGVjdGVkU2Vzc2lvbkdyb3VwID0gbnVsbDsKICAgICAgICAgICAgLy8gVGhlIHNlc3Npb24gZ3JvdXAgcmVwcmVzZW50ZWQgYnkgdGhlIGN1cnZlICJjbG9zZXN0IiB0byB0aGUgbW91c2UKICAgICAgICAgICAgLy8gcG9pbnRlciAodGhlIGNvcnJlc3BvbmRpbmcgcGF0aCBlbGVtZW50IHdpbGwgaGF2ZSB0aGUgJ3BlYWtlZC1wYXRoJwogICAgICAgICAgICAvLyBjbGFzcykuIElmIHRoZSBjbG9zZXN0IHNlc3Npb24gZ3JvdXAgZGlzdGFuY2UgaXMgbGFyZ2VyIHRoYW4gYQogICAgICAgICAgICAvLyB0aHJlc2hvbGQsIHRoaXMgcHJvcGVydHkgd2lsbCBiZSBudWxsLgogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQHR5cGUgez9PYmplY3R9CiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmNsb3Nlc3RTZXNzaW9uR3JvdXAgPSBudWxsOwogICAgICAgICAgICAvLyBDb3VudHMgdGhlIG51bWJlciBvZiB0aW1lcyB0aGUgZWxlbWVudCBoYXMgYmVlbiByZWRyYXduIHNpbmNlIGl0CiAgICAgICAgICAgIC8vIHdhcyBjcmVhdGVkLiBUaGlzIGlzIGluY3JlbWVudGVkIGF0IHRoZSBlbmQgb2YgYSByZWRyYXcgYW5kIGFsbG93cwogICAgICAgICAgICAvLyBpbnRlZ3JhdGlvbiB0ZXN0cyB0byB3YWl0IGZvciB0aGUgZWxlbWVudCB0byBmaW5pc2ggcmVkcmF3aW5nLgogICAgICAgICAgICB0aGlzLnJlZHJhd0NvdW50ID0gMDsKICAgICAgICB9CiAgICAgICAgX29wdGlvbnNPclNlc3Npb25Hcm91cHNDaGFuZ2VkKCkgewogICAgICAgICAgICBpZiAoIXRoaXMub3B0aW9ucykgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNvbnN0IGNvbmZpZ3VyYXRpb24gPSB0aGlzLm9wdGlvbnMuY29uZmlndXJhdGlvbjsKICAgICAgICAgICAgLy8gU2VlIGlmIHdlIG5lZWQgdG8gcmVkcmF3IGZyb20gc2NyYXRjaC4gV2UgcmVkcmF3IGZyb20gc2NyYXRjaCBpZgogICAgICAgICAgICAvLyB0aGl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ZWQgYXMgd2VsbC4gKFRoaXMgY2FuIGhhcHBlbiBkdXJpbmcgdGVzdGluZyB3aGVuIHdlIGRvbid0IHNldAogICAgICAgIC8vIHRoZSBzZXNzaW9uR3JvdXBzIHByb3BlcnR5KS4KICAgICAgICBfY29tcHV0ZVZhbGlkU2Vzc2lvbkdyb3VwcygpIHsKICAgICAgICAgICAgY29uc3QgdXRpbHMgPSB0Zl9ocGFyYW1zX3V0aWxzOwogICAgICAgICAgICBpZiAodGhpcy5zZXNzaW9uR3JvdXBzID09PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3ZhbGlkU2Vzc2lvbkdyb3VwcyA9IHVuZGVmaW5lZDsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICBjb25zdCBzY2hlbWEgPSB0aGlzLm9wdGlvbnMuY29uZmlndXJhdGlvbi5zY2hlbWE7CiAgICAgICAgICAgIHRoaXMuX3ZhbGlkU2Vzc2lvbkdyb3VwcyA9IHRoaXMuc2Vzc2lvbkdyb3Vwcy5maWx0ZXIoKHNnKSA9PiB7CiAgICAgICAgICAgICAgICBmb3IgKGxldCBjb2xJbmRleCA9IDA7IGNvbEluZGV4IDwgdXRpbHMubnVtQ29sdW1ucyhzY2hlbWEpOyArK2NvbEluZGV4KSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKCF0aGlzLm9wdGlvbnMuY29uZmlndXJhdGlvbi5jb2x1bW5zVmlzaWJpbGl0eVtjb2xJbmRleF0pIHsKICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGlmICh1dGlscy5jb2x1bW5WYWx1ZUJ5SW5kZXgoc2NoZW1hLCBzZywgY29sSW5kZXgpID09PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICB9OwogICAgVGZIcGFyYW1zUGFyYWxsZWxDb29yZHNQbG90LnRlbXBsYXRlID0gaHRtbCBgCiAgICA8ZGl2IGlkPSJjb250YWluZXIiPgogICAgICA8c3ZnIGlkPSJzdmciPjwvc3ZnPgogICAgPC9kaXY+CiAgICA8c3R5bGU+CiAgICAgIDpob3N0IHsKICAgICAgICBkaXNwbGF5OiBibG9jazsKICAgICAgfQogICAgICBzdmcgewogICAgICAgIGZvbnQ6IDEwcHggc2Fucy1zZXJpZjsKICAgICAgfQoKICAgICAgLmJhY2tncm91bmQgcGF0aCB7CiAgICAgICAgZmlsbDogbm9uZTsKICAgICAgICBzdHJva2U6ICNkZGQ7CiAgICAgICAgc2hhcGUtcmVuZGVyaW5nOiBjcmlzcEVkZ2VzOwogICAgICB9CgogICAgICAuZm9yZWdyb3VuZCBwYXRoIHsKICAgICAgICBmaWxsOiBub25lOwogICAgICAgIHN0cm9rZS1vcGFjaXR5OiAwLjc7CiAgICAgICAgc3Ryb2tlLXdpZHRoOiAxOwogICAgICB9CgogICAgICAvKiBXaWxsIGJlIHNldCBvbiBmb3JlZ3JvdW5kIHBhdGhzIHRoYXQgYXJlIG5vdCAiY29udGFpbmVkIiBpbiB0aGUgY3VycmVudAogICAgICAgICBheGVzIGJydXNoZXMuIElmIG5vIGJydXNoZXMgYXJlIHNldCwgbm8gcGF0aCB3aWxsIGhhdmUgdGhpcyBjbGFzcy4gKi8KICAgICAgLmZvcmVncm91bmQgLmludmlzaWJsZS1wYXRoIHsKICAgICAgICBkaXNwbGF5OiBub25lOwogICAgICB9CgogICAgICAvKiBTdHlsZSBmb3IgdGhlIHBhdGggY2xvc2VzdCB0byB0aGUgbW91c2UgcG9pbnRlciAodHlwaWNhbGx5IHdpbGwgYmVjb21lCiAgICAgIHRoZSBzZWxlY3RlZCBwYXRoIHdoZW4gdGhlIH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BiZSBudWxsLgogICAgICAgICAgICB0aGlzLmNsb3Nlc3RTZXNzaW9uR3JvdXAgPSBudWxsOwogICAgICAgICAgICAvLyBUaGUgPGRpdj4gZWxlbWVudCB3aXRoIGlkICJjb250YWluZXIiLgogICAgICAgICAgICB0aGlzLl9jb250YWluZXIgPSBudWxsOwogICAgICAgICAgICAvLyBBIEQzIHNlbGVjdGlvbiBjb250YWluaW5nIGp1c3QgdGhlIHJvb3QgPHN2Zz4gZWxlbWVudC4KICAgICAgICAgICAgdGhpcy5fc3ZnID0gbnVsbDsKICAgICAgICAgICAgdGhpcy53aWR0aCA9IDA7CiAgICAgICAgICAgIHRoaXMuaGVpZ2h0ID0gMDsKICAgICAgICAgICAgLy8gVGhlIGluZGV4IG9mIHRoZSBjZWxsIGNvbnRhaW5pbmcgYSBicnVzaCBzZWxlY3Rpb24gYXMgYW4gYXJyYXkKICAgICAgICAgICAgLy8gb2YgdGhlIGZvcm0gW2NvbCwgbWV0cmljXSBvciBudWxsIGlmIG5vIGNlbGwgaGFzIGFuIGFjdGl2ZSBicnVzaAogICAgICAgICAgICAvLyBzZWxlY3Rpb24uCiAgICAgICAgICAgIHRoaXMuX2JydXNoZWRDZWxsSW5kZXggPSBudWxsOwogICAgICAgICAgICAvLyBUaGUgdGhlIGFjdGl2ZSBicnVzaCBzZWxlY3Rpb24gaW4gdGhlIGZvcm0KICAgICAgICAgICAgLy8gW1t4MCx5MF0sW3gxLHkxXV0gd2hlcmUgdGhlIGNvb3JkaW5hdGVzIGFyZSByZWxhdGl2ZSB0byB0aGUgY2VsbAogICAgICAgICAgICAvLyBpbmRleGVkIGJ5IF9icnVzaGVkQ2VsbEluZGV4LiBTZXQgdG8gbnVsbCwgaWYgdGhlcmUgaXMgbm8gYWN0aXZlCiAgICAgICAgICAgIC8vIGJydXNoLgogICAgICAgICAgICB0aGlzLl9icnVzaFNlbGVjdGlvbiA9IG51bGw7CiAgICAgICAgfQogICAgICAgIHJlYWR5KCkgewogICAgICAgICA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CiAgICAgICAgX3JlZHJhdygpIHsKICAgICAgICAgICAgdGhpcy5kZWJvdW5jZSgnX3JlZHJhdycsICgpID0+IHsKICAgICAgICAgICAgICAgIGNvbnN0IHV0aWxzID0gdGZfaHBhcmFtc191dGlsczsKICAgICAgICAgICAgICAgIGNvbnN0IFBMT1RfTUlOX1dJRFRIID0gMTIwMDsKICAgICAgICAgICAgICAgIGNvbnN0IFBMT1RfTUlOX0hFSUdIVCA9IDAuNCAqIFBMT1RfTUlOX1dJRFRIOwogICAgICAgICAgICAgICAgY29uc3QgQ0VMTF9NSU5fV0lEVEggPSAxNTA7CiAgICAgICAgICAgICAgICBjb25zdCBDRUxMX01JTl9IRUlHSFQgPSAwLjc1ICogQ0VMTF9NSU5fV0lEVEg7CiAgICAgICAgICAgICAgICB0aGlzLndpZHRoID0gTWF0aC5tYXgoQ0VMTF9NSU5fV0lEVEggKiB1dGlscy5udW1WaXNpYmxlQ29sdW1ucyh0aGlzLnZpc2libGVTY2hlbWEpLCBQTE9UX01JTl9XSURUSCk7CiAgICAgICAgICAgICAgICB0aGlzLmhlaWdodCA9IE1hdGgubWF4KENFTExfTUlOX0hFSUdIVCAqIHV0aWxzLm51bVZpc2libGVNZXRyaWNzKHRoaXMudmlzaWJsZVNjaGVtYSksIFBMT1RfTUlOX0hFSUdIVCk7CiAgICAgICAgICAgICAgICB0aGlzLl9jb250YWluZXIuc3R5bGUud2lkdGggPSB0aGlzLndpZHRoICsgJ3B4JzsKICAgICAgICAgICAgICAgIHRoaXMuX2NvbnRhaW5lci5zdHlsZS5oZWlnaHQgPSB0aGlzLmhlaWdodCArICdweCc7CiAgICAgICAgICAgICAgICB0aGlzLl9zdmcuYXR0cignd2lkdGgnLCB0aGlzLndpZHRoKS5hdHRyKCdoZWlnaHQnLCB0aGlzLmhlaWdodCk7CiAgICAgICAgICAgICAgICAvLyBEZWxldGUgYWxsIGVsZW1lbnRzIGluIHRoZSBzdmcgc3VidHJlZQogICAgICAgICAgICAgICAgdGhpcy5fc3ZnLnNlbGVjdEFsbCgnZycpLnJlbW92ZSgpOwogICAgICAgICAgICAgICAgLy8gRHJhdy4KICAgICAgICAgICAgICAgIHRoaXMuX2RyYXcoKTsKICAgICAgICAgICAgfSwgMTAwKTsKICAgICAgICB9CiAgICAgICAgLy8gQ3JlYXRlcyB0aGUgRE9NIGVsZW1lbnRzIGNvbXByaXNpbmcgdGhlIHNjYXR0ZXItcGxvdC1tYXRyaXggcGxvdCBhbmQKICAgICAgICAvLyByZWdpc3RlcnMgZXZlbnQgaGFuZGxlcnMgdG8gaGFuZGxlIHVzZXIgYWN0aW9ucy4KICAgICAgICBfZHJhdygpIHsKICAgICAgICAgICAgY29uc3QgdXRpbHMgPSB0Zl9ocGFyYW1zX3V0aWxzOwogICAgICAgICAgICBjb25zdCBfdGhpcyA9IHRoaXM7CiAgICAgICAgICAgIGlmICghdGhpcy5zZXNzaW9uR3JvdXBzIHx8CiAgICAgICAgICAgICAgICB0aGlzLnNlc3Npb25Hcm91cHMubGVuZ3RoID09IDAgfHwKICAgICAgICAgICAgICAgICF0aGlzLnZpc2libGVTY2hlbWEgfHwKICAgICAgICAgICAgICAgIHRoaXMudmlzaWJsZVNjaGVtYS5tZXRyaWNJbmZvcy5sZW5ndGggPT0gMCkgewogICAgICAgICAgICAgICAgLy8gSWYgdGhlcmUncyBubyBtZXRyaWNzIG9yIHNlc3Npb24gZ3JvdXBzLiBUaGVyZSdzIG5vdGhpbmcgdG8gZHJhdy4KICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBBbiBhcnJheSBjb250YWluaW5nIHRoZSB2aXNpYmxlU2NoZW1hLWNvbHVtbnMgKGhwYXJhbXMgZm9sbG93ZWQgYnkKICAgICAgICAgICAgLy8gbWV0cmljcykgaW5kaWNlcy4gVGhlc2UgaW5kZXggdGhlIGNvbHVtbnMgb2YgdGhlIHNjYXR0ZXIgcGxvdCBtYXRyaXguCiAgICAgICAgICAgIGNvb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Bjb29yZGluYXRlcyBhcmUgcmVsYXRpdmUgdG8gdGhlIGNlbGwgYm91bmRhcnkncyB1cHBlcgogICAgICAgICAgICAvLyBsZWZ0IGNvcm5lci4KICAgICAgICAgICAgY29uc3QgeENvb3JkcyA9IGNvbHMubWFwKChjKSA9PiBfdGhpcy5fY2VsbFNjYWxlKGMsIFswLCBjZWxsV2lkdGggLSAxXSkpOwogICAgICAgICAgICBjb25zdCB5Q29vcmRzID0gbWV0cmljcy5tYXAoKG0pID0+IF90aGlzLl9jZWxsU2NhbGUobSArIHV0aWxzLm51bVZpc2libGVIUGFyYW1zKF90aGlzLnZpc2libGVTY2hlbWEpLCBbCiAgICAgICAgICAgICAgICBjZWxsSGVpZ2h0IC0gMSwKICAgICAgICAgICAgICAgIDAsCiAgICAgICAgICAgIF0pKTsKICAgICAgICAgICAgLy8gLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCiAgICAgICAgICAgIC8vIERyYXcgYXhlcy4KICAgICAgICAgICAgLy8gLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCiAgICAgICAgICAgIC8vIFgtQXhlcyBhbmQgbGFiZWxzLgogICAgICAgICAgICBjb25zdCB4QXhlc0cgPSB0aGlzLl9zdmcKICAgICAgICAgICAgICAgIC5zZWxlY3RBbGwoJy54LWF4aXMnKQogICAgICAgICAgICAgICAgLmRhdGEoY29scykKICAgICAgICAgICAgICAgIC5lbnRlcigpCiAgICAgICAgICAgICAgICAuYXBwZW5kKCdnJykKICAgICAgICAgICAgICAgIC5jbGFzc2VkKCd4LWF4aXMnLCB0cnVlKQogICAgICAgICAgICAgICAgLmF0dHIoJ3RyYW5zZm9ybScsIChjb2wpID0+IHV0aWxzLnRyYW5zbGF0ZVN0cihjZWxsWChjb2wpLCAwKSk7CiAgICAgICAgICAgIGZ1bmN0aW9uIHhBeGlzQ2xpcFBhdGhJZChjb2wpIHsKICAgICAgICAgICAgICAgIHJldHVybiAneC1heGlzLWNsaXAtcGF0aC0nICsgY29sOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGZ1bmN0aW9uIHhMYWJlbENsaXBQYXRoSWQoY29sKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gJ3gtbGFiZWwtY2xpcC1wYXRoLScgKyBjb2w7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgeEF4ZXNHCiAgICAgICAgICAgICAgICAuYXBwZW5kKCdjbGlwUGF0aCcpCiAgICAgICAgICAgICAgICAuYXR0cignaWQnLCB4QXhpc0NsaXBQYXRoSWQpCiAgICAgICAgICAgICAgICAuYXBwZW5kKCdyZWN0JykKICAgICAgICAgICAgICAgIC5hdHRyKCd4JywgLWZyYW1lTWFyZ2luKQogICAgICAgICAgICAgICAgLmF0dHIoJ3knLCAwKQogICAgICAgICAgICAgICAgLmF0dHIoJ3dpZHRoJywgY2VsbFdpZHRoICsgMiAqIGZyYW1lTWFyZ2luKQogICAgICAgICAgICAgICAgLmF0dHIoJ2hlaWdodCcsIF90aGlzLmhlaWdodCAtIHhBeGlzVGV4dE1hcmdpbiAvIDIpOwogICAgICAgICAgICB4QXhlc0cKICAgICAgICAgICAgICAgIC5hcHBlbmQoJ2NsaXBQYXRoJykKICAgICAgICAgICAgICAgIC5hdHRyKCdpZCcsIHhMYWJlbENsaXBQYXRoSWQpCiAgICAgICAgICAgICAgICAuYXBwZW5kKCdyZWN0JykKICAgICAgICAgICAgICAgIC5hdHRyKCd4JywgMCkKICAgICAgICAgICAgICAgIC5hdHRyKCd5JywgX3RoaXMuaGVpZ2h0IC0geEF4aXNUZXh0TWFyZ2luIC8gMikKICAgICAgICAgICAgICAgIC5hdHRyKCd3aWR0aCcsIGNlbGxXaWR0aCkKICAgICAgICAgICAgICAgIC5hdHRyKCdoZWlnaHQnLCB4QXhpc1RleHRNYXJnaW4gLyAyKTsKICAgICAgICAgICAgeEF4ZXNHCiAgICAgICAgICAgICAgICAuYXBwZW5kKCdnJykKICAgICAgICAgICAgICAgIC5hdHRyKCdjbGlwLXBhdGgnLCAoY29sKSA9PiAndXJsKCMnICsgeEF4aXNDbGlwUGF0aElkKGNvbCkgKyAnKScpCiAgICAgICAgICAgICAgICAuZWFjaChmdW5jdGlvbiAoY29sKSB7CiAgICAgICAgICAgICAgICBzZWxlY3QodGhpcykuY2FsbChkcmF3QXhpcywgYXhpc0JvdHRvbSh4Q29vcmRzW2NvbF0pCiAgICAgICAgICAgICAgICAgICAgLnRpY2tTaXplKF90aGlzLmhlaWdodCAtIHhBeGlzVGV4dE1hcmdpbiksIGNlbGxXaWR0aCwgCiAgICAgICAgICAgICAgICAvKiBtaW5MYWJlbFNpemUgKi8gNDAsIF90aGlzLm9wdGlvbnMuY29sdW1uc1tjb2xdLnNjYWxlKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIC8vIERyYXcgYSBsYWJlbCBmb3IgZWFjaCBheGlzLgogICAgICAgICAgICB4QXhlc0cKICAgICAgICAgICAgICAgIC5hcHBlbmQoJ2cnKQogICAgICAgICAgICAgICAgLmNsYXNzZWQoJ3gtYXhpcy1sYWJlbCcsIHRydWUpCiAgICAgICAgICAgICAgICAuYXR0cignY2xpcC1wYXRoJywgKGNvbCkgPT4gJ3VybCgjJyArIHhMYWJlbENsaXBQYXRoSWQoY29sKSArICcpJykKICAgICAgICAgICAgICAgIC5hcHBlbmQoJ3RleHQnKQogICAgICAgICAgICAgICAgLmF0dHIoJ3RleHQtYW5jaG9yJywgJ21pZGRsZScpCiAgICAgICAgICAgICAgICAuYXR0cigneCcsIGNlbGxXaWR0aCAvIDIpCiAgICAgICAgICAgICAgICAuYXR0cigneScsIF90aGlzLmhlaWdodCAtIDEgLSB4QXhpc1RleHRNYXJnaW4gLyA0KQogICAgICAgICAgICAgICAgLnRleHQoKGNvbCkgPT4gdXRpbHMuc2NoZW1hVmlzaWJsZUNvbHVtbk5hbWUoX3RoaXMudmlzaWJsZVNjaGVtYSwgY29sKSkKICAgICAgICAgICAgICAgIC5hcHBlbmQoJ3RpdGxlJykgLy8gU2hvdyBmdWxsIG5hbWUgYXMgYSB0b29sdGlwLgogICAgICAgICAgICAgICAgLnRleHQoKGNvbCkgPT4gdXRpbHMuc2NoZW1hVmlzaWJsZUNvbHVtbk5hbWUoX3RoaXMudmlzaWJsZVNjaGVtYSwgY29sKSk7CiAgICAgICAgICAgIC8vIFktQXhlcyBhbmQgbGFiZWxzLgogICAgICAgICAgICBjb25zdCB5QXhlc0cgPSB0aGlzLl9zdmcKICAgICAgICAgICAgICAgIC5zZWxlY3RBbGwoJy55LWF4aXMnKQogICAgICAgICAgICAgICAgLmRhdGEobWV0cmljcykKICAgICAgICAgICAgICAgIC5lbnRlcigpCiAgICAgICAgICAgICAgICAuYXBwZW5kKCdnJykKICAgICAgICAgICAgICAgIC5jbGFzc2VkKCd5LWF4aXMnLCB0cnVlKQogICAgICAgICAgICAgICAgLmF0dHIoJ3RyYW5zZm9ybScsIChtZXRyaWMpID0+IHV0aWxzLnRyYW5zbGF0ZVN0cihfdGhpcy53aWR0aCAtIDEsIGNlbGxZKG1ldHJpYykpKTsKICAgICAgICAgICAgZnVuY3Rpb24geUF4aXNDbGlwUGF0aElkKG1ldHJpYykgewogICAgICAgICAgICAgICAgcmV0dXJuICd5LWF4aXMtY2xpcC1wYXRoLScgKyBtZXRyaWM7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZnVuY3Rpb24geUxhYmVsQ2xpcFBhdGhJZChtZXRyaWMpIHsKICAgICAgICAgICAgICAgIHJldHVybiAneS1sYWJlbC1jbGlwLXBhdGgtJyArIG1ldHJpYzsKICAgICAgICAgICAgfQogICAgICAgICAgICB5QXhlc0cKICAgICAgICAgICAgICAgIC5hcHBlbmQoJ2NsaXBQYXRoJykKICAgICAgICAgICAgICAgIC5hdHRyKCdpZCcsIHlBeGlzQ2xpcFBhdGhJZCkKICAgICAgICAgICAgICAgIC5hcHBlbmQoJ3JlY3QnKQogICAgICAgICAgICAgICAgLmF0dHIoJ3gnLCAtKF90aGlzLndpZHRoIC0geUF4aXNUZXh0TWFyZ2luIC8gMiAtIDEpKQogICAgICAgICAgICAgICAgLmF0dHIoJ3knLCAtZnJhbWVNYXJnaW4pCiAgICAgICAgICAgICAgICAuYXR0cignd2lkdGgnLCBfdGhpcy53aWR0aCAtIHlBeGlzVGV4dE1hcmdpbiAvIDIpCiAgICAgICAgICAgICAgICAuYXR0cignaGVpZ2h0JywgY2VsbEhlaWdodCArIDIgKiBmcmFtZU1hcmdpbik7CiAgICAgICAgICAgIHlBeGVzRwogICAgICAgICAgICAgICAgLmFwcGVuZCgnY2xpcFBhdGgnKQogICAgICAgICAgICAgICAgLmF0dHIoJ2lkJywgeUxhYmVsQ2xpcFBhdGhJZCkKICAgICAgICAgICAgICAgIC5hcHBlbmQoJ3JlY3QnKQogICAgICAgICAgICAgICAgLmF0dHIoJ3gnLCAtKF90aGlzLndpZHRoIC0gMSkpCiAgICAgICAgICAgICAgICAuYXR0cigneScsIDApCiAgICAgICAgICAgICAgICAuYXR0cignd2lkdGgnLCB5QXhpc1RleHRNYXJnaW4gLyAyKQogICAgICAgICAgICAgICAgLmF0dHIoJ2hlaWdodCcsIGNlbGxIZWlnaHQpOwogICAgICAgICAgICB5QXhlc0cKICAgICAgICAgICAgICAgIC5hcHBlbmQoJ2cnKQogICAgICAgICAgICAgICAgLmF0dHIoJ2NsaXAtcGF0aCcsIChtZXRyaWMpID0+ICd1cmwoIycgKyB5QXhpc0NsaXBQYXRoSWQobWV0cmljKSArICcpJykKICAgICAgICAgICAgICAgIC5lYWNoKGZ1bmN0aW9uIChtZXRyaWMpIHsKICAgICAgICAgICAgICAgIHNlbGVjdCh0aGlzKS5jYWxsKGRyYXdBeGlzLCBheGlzTGVmdCh5Q29vcmRzW21ldHJpY10pCiAgICAgICAgICAgICAgICAgICAg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PSBzY2FsZS5xdWFudGlsZXMoKTsKICAgICAgICAgICAgICAgICAgICBjb25zdCBzdGVwID0gTWF0aC5jZWlsKHF1YW50aWxlcy5sZW5ndGggLyBudW1UaWNrcyk7CiAgICAgICAgICAgICAgICAgICAgcXVhbnRpbGVzID0gc2VxdWVuY2UoMCwgcXVhbnRpbGVzLmxlbmd0aCwgc3RlcCkKICAgICAgICAgICAgICAgICAgICAgICAgLm1hcCgoaSkgPT4gcXVhbnRpbGVzW2ldKTsKICAgICAgICAgICAgICAgICAgICBheGlzR2VuLnRpY2tWYWx1ZXMocXVhbnRpbGVzKS50aWNrRm9ybWF0KGZvcm1hdCgnLS4yZycpKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChzY2FsZVR5cGUgPT09ICdMSU5FQVInIHx8IHNjYWxlVHlwZSA9PT0gJ0xPRycpIHsKICAgICAgICAgICAgICAgICAgICAvLyBUaGUgZm9sbG93aW5nIGlzIGVxdWl2YWxlbnQgdG86IGF4aXNHZW4udGlja3MobnVtVGlja3MpLiBXZQogICAgICAgICAgICAgICAgICAgIC8vIHVzZSB0aGUgZm9ybSBiZWxvdywgc2luY2Ugb3RoZXJ3aXNlIHRoZSBjbG9zdXJlIGNvbXBpbGVyCiAgICAgICAgICAgICAgICAgICAgLy8gZXJyb25lb3VzbHkgZHJvcHMgdGhlIHBhcmFtZXRlciAnbnVtVGlja3MnIGZyb20gdGhlIGNhbGwuIEl0IGRvZXMKICAgICAgICAgICAgICAgICAgICAvLyB0aGlzLCBzaW5jZSBkMyBkZWZpbmVzIHRoZSB2YXJpYWRpYyAndGlja3MnIG1ldGhvZCBhcwogICAgICAgICAgICAgICAgICAgIC8vIGZ1bmN0aW9uKCksIHdoaWNoIGNsb3N1cmUgcmVnYXJkcyBhcyBhIGZ1bmN0aW9uIHRoYXQgdGFrZXMgbm8KICAgICAgICAgICAgICAgICAgICAvLyBwYXJhbWV0ZXJzLgogICAgICAgICAgICAgICAgICAgIGF4aXNHZW5bJ3RpY2tzJ10obnVtVGlja3MpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZy5jYWxsKGF4aXNHZW4pOwogICAgICAgICAgICAgICAgLy8gUmVtb3ZlIHRoZSBhY3R1YWwgYXhpcyBsaW5lLCBhbmQgZ3JleSBvdXQgdGhlIHRpY2sgbGluZXMuCiAgICAgICAgICAgICAgICBnLnNlbGVjdEFsbCgnLmRvbWFpbicpLnJlbW92ZSgpOwogICAgICAgICAgICAgICAgZy5zZWxlY3RBbGwoJy50aWNrIGxpbmUnKS5hdHRyKCdzdHJva2UnLCAnI2RkZCcpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQogICAgICAgICAgICAvLyBEcmF3IGNlbGwgZnJhbWVzLgogICAgICAgICAgICAvLyAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KICAgICAgICAgICAgY29uc3QgY2VsbHMgPSB0aGlzLl9zdmcKICAgICAgICAgICAgICAgIC5zZWxlY3RBbGwoJy5jZWxsJykKICAgICAgICAgICAgICAgIC5kYXRhKGNyb3NzKGNvbHMsIG1ldHJpY3MpKQogICAgICAgICAgICAgICAgLmVudGVyKCkKICAgICAgICAgICAgICAgIC5hcHBlbmQoJ2cnKQogICAgICAgICAgICAgICAgLmNsYXNzZWQoJ2NlbGwnLCB0cnVlKQogICAgICAgICAgICAgICAgLmF0dHIoJ3RyYW5zZm9ybScsIChbY29sLCBtZXRyaWNdKSA9PiB1dGlscy50cmFuc2xhdGVTdHIoY2VsbFgoY29sKSwgY2VsbFkobWV0cmljKSkpOwogICAgICAgICAgICBjb25zdCBmcmFtZXMgPSBjZWxscwogICAgICAgICAgICAgICAgLmFwcGVuZCgnZycpCiAgICAgICAgICAgICAgICAuY2xhc3NlZCgnZnJhbWUnLCB0cnVlKQogICAgICAgICAgICAgICAgLmFwcGVuZCgncmVjdCcpCiAgICAgICAgICAgICAgICAuYXR0cigneCcsIC1mcmFtZU1hcmdpbikKICAgICAgICAgICAgICAgIC5hdHRyKCd5JywgLWZyYW1lTWFyZ2luKQogICAgICAgICAgICAgICAgLmF0dHIoJ3dpZHRoJywgY2VsbFdpZHRoICsgMiAqIGZyYW1lTWFyZ2luKQogICAgICAgICAgICAgICAgLmF0dHIoJ2hlaWdodCcsIGNlbGxIZWlnaHQgKyAyICogZnJhbWVNYXJnaW4pCiAgICAgICAgICAgICAgICAuYXR0cignc3Ryb2tlJywgJyMwMDAnKQogICAgICAgICAgICAgICAgLmF0dHIoJ2ZpbGwnLCAnbm9uZScpCiAgICAgICAgICAgICAgICAuYXR0cignc2hhcGUtcmVuZGVyaW5nJywgJ2NyaXNwRWRnZXMnKTsKICAgICAgICAgICAgLy8gLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCiAgICAgICAgICAgIC8vIERyYXcgZGF0YSBwb2ludCBtYXJrZXJzLgogICAgICAgICAgICAvLyAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KICAgICAgICAgICAgbGV0IGNvbG9yU2NhbGUgPSBudWxsOwogICAgICAgICAgICBpZiAoX3RoaXMub3B0aW9ucy5jb2xvckJ5Q29sdW1uSW5kZXggIT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICAgICAgY29sb3JTY2FsZSA9IGxpbmVhciQyKCkKICAgICAgICAgICAgICAgICAgICAuZG9tYWluKHRoaXMuX2NvbEV4dGVudCh0aGlzLm9wdGlvbnMuY29sb3JCeUNvbHVtbkluZGV4KSkKICA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ICAgLmZpbHRlcigoc2Vzc2lvbkdyb3VwKSA9PiBfdGhpcy5fY29sVmFsdWUoc2Vzc2lvbkdyb3VwLCBjb2wpICE9PSB1bmRlZmluZWQgJiYKICAgICAgICAgICAgICAgICAgICBfdGhpcy5fbWV0cmljVmFsdWUoc2Vzc2lvbkdyb3VwLCBtZXRyaWMpICE9PSB1bmRlZmluZWQpCiAgICAgICAgICAgICAgICAgICAgLm1hcCgoc2Vzc2lvbkdyb3VwKSA9PiAoewogICAgICAgICAgICAgICAgICAgIGNvbDogY29sLAogICAgICAgICAgICAgICAgICAgIG1ldHJpYzogbWV0cmljLAogICAgICAgICAgICAgICAgICAgIHNlc3Npb25Hcm91cDogc2Vzc2lvbkdyb3VwLAogICAgICAgICAgICAgICAgICAgIHg6IG1hcmtlclgoc2Vzc2lvbkdyb3VwLCBjb2wpLAogICAgICAgICAgICAgICAgICAgIHk6IG1hcmtlclkoc2Vzc2lvbkdyb3VwLCBtZXRyaWMpLAogICAgICAgICAgICAgICAgICAgIC8vIFRoaXMgd2lsbCBiZSBwb3B1bGF0ZWQgYnkgdGhlIGNvZGUgYmVsb3cgd2l0aAogICAgICAgICAgICAgICAgICAgIC8vIGEgU2V0IG9mIGFsbCB0aGUgbWFya2VycyByZXByZXNlbnRpbmcgdGhpcyBzZXNzaW9uCiAgICAgICAgICAgICAgICAgICAgLy8gZ3JvdXAuCiAgICAgICAgICAgICAgICAgICAgc2Vzc2lvbkdyb3VwTWFya2VyczogbnVsbCwKICAgICAgICAgICAgICAgIH0pKSkKICAgICAgICAgICAgICAgICAgICAuZW50ZXIoKQogICAgICAgICAgICAgICAgICAgIC5hcHBlbmQoJ2NpcmNsZScpCiAgICAgICAgICAgICAgICAgICAgLmNsYXNzZWQoJ2RhdGEtbWFya2VyJywgdHJ1ZSkKICAgICAgICAgICAgICAgICAgICAuYXR0cignY3gnLCAoeyB4IH0pID0+IHgpCiAgICAgICAgICAgICAgICAgICAgLmF0dHIoJ2N5JywgKHsgeSB9KSA9PiB5KQogICAgICAgICAgICAgICAgICAgIC5hdHRyKCdyJywgMikKICAgICAgICAgICAgICAgICAgICAuYXR0cignZmlsbCcsIGZpbGwpOwogICAgICAgICAgICAgICAgY29uc3Qgc2Vzc2lvbkdyb3VwTWFya2Vyc01hcCA9IG5ldyBNYXAoKTsKICAgICAgICAgICAgICAgIF90aGlzLnNlc3Npb25Hcm91cHMuZm9yRWFjaCgoc2Vzc2lvbkdyb3VwKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgc2Vzc2lvbkdyb3VwTWFya2Vyc01hcC5zZXQoc2Vzc2lvbkdyb3VwLCBbXSk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIG1hcmtlcnMuZWFjaChmdW5jdGlvbiAoZCkgewogICAgICAgICAgICAgICAgICAgIHNlc3Npb25Hcm91cE1hcmtlcnNNYXAuZ2V0KGQuc2Vzc2lvbkdyb3VwKS5wdXNoKHRoaXMpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBtYXJrZXJzLmVhY2goKGQpID0+IHsKICAgICAgICAgICAgICAgICAgICBjb25zdCBzZXNzaW9uR3JvdXBNYXJrZXJzID0gc2Vzc2lvbkdyb3VwTWFya2Vyc01hcC5nZXQoZC5zZXNzaW9uR3JvdXApOwogICAgICAgICAgICAgICAgICAgIGQuc2Vzc2lvbkdyb3VwTWFya2VycyA9IG5ldyBTZXQoc2Vzc2lvbkdyb3VwTWFya2Vycyk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIGNvbnN0IGNlbGxNYXJrZXJzID0gY29scy5tYXAoKGNvbCkgPT4gbWV0cmljcy5tYXAoKG1ldHJpYykgPT4gbWFya2Vycy5maWx0ZXIoKGQpID0+IGQuY29sID09IGNvbCAmJiBkLm1ldHJpYyA9PSBtZXRyaWMpKSk7CiAgICAgICAgICAgICAgICByZXR1cm4gW21hcmtlcnMsIGNlbGxNYXJrZXJzLCBzZXNzaW9uR3JvdXB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vZiB0aGUgbWFya2VycyB3aXRoIHRoZSAoYnJ1c2gpIHNlbGVjdGlvbi4KICAgICAgICAgICAgLy8gVGhlIGZvbGxvd2luZyBmdW5jdGlvbiBjcmVhdGVzIHRoaXMgcXVhZC10cmVlIGZvciB0aGUgY2VsbCBpbmRleGVkIGJ5CiAgICAgICAgICAgIC8vIChjb2wsIG1ldHJpYykuIEVhY2ggcXVhZCB0cmVlIGRhdHVtIGlzIHRoZSBjb3JyZXNwb25kaW5nIG1hcmtlcidzCiAgICAgICAgICAgIC8vIGVsZW1lbnQuCiAgICAgICAgICAgIGZ1bmN0aW9uIGNyZWF0ZUNlbGxRdWFkVHJlZShjb2wsIG1ldHJpYykgewogICAgICAgICAgICAgICAgY29uc3QgZGF0YSA9IFtdOwogICAgICAgICAgICAgICAgY2VsbE1hcmtlcnNbY29sXVttZXRyaWNdLmVhY2goZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgICAgIGRhdGEucHVzaCh0aGlzKTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgcmV0dXJuIHF1YWR0cmVlKCkKICAgICAgICAgICAgICAgICAgICAueCgoZWxlbSkgPT4gc2VsZWN0KGVsZW0pLmRhdHVtKCkueCkKICAgICAgICAgICAgICAgICAgICAueSgoZWxlbSkgPT4gc2VsZWN0KGVsZW0pLmRhdHVtKCkueSkKICAgICAgICAgICAgICAgICAgICAuYWRkQWxsKGRhdGEpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNvbnN0IHF1YWRUcmVlcyA9IGNvbHMubWFwKChjb2wpID0+IG1ldHJpY3MubWFwKChtZXRyaWMpID0+IGNyZWF0ZUNlbGxRdWFkVHJlZShjb2wsIG1ldHJpYykpKTsKICAgICAgICAgICAgLy8gQSBkMy1zZWxlY3Rpb24gb2YgdGhlIGNlbGwgaW4gJ2NlbGxzJyB0aGF0IGhhcyB0aGUgYWN0aXZlCiAgICAgICAgICAgIC8vIGJydXNoIHNlbGVjdGlvbiwg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Y3RpbmcKICAgICAgICAgICAgICAgIC8vIGFsbCBtYXJrZXJzLgogICAgICAgICAgICAgICAgbGV0IG5ld1Zpc2libGVNYXJrZXJzID0gbmV3IFNldChtYXJrZXJzLm5vZGVzKCkpOwogICAgICAgICAgICAgICAgaWYgKCFpc0JydXNoU2VsZWN0aW9uRW1wdHkoKSkgewogICAgICAgICAgICAgICAgICAgIG5ld1Zpc2libGVNYXJrZXJzID0gZmluZE1hcmtlcnNJblNlbGVjdGlvbihfdGhpcy5fYnJ1c2hlZENlbGxJbmRleCwgX3RoaXMuX2JydXNoU2VsZWN0aW9uKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vIEhpZ2hsaWdodCB0aGUgbmV3IHZpc2libGUgbWFya2Vycy4KICAgICAgICAgICAgICAgIHNlbGVjdEFsbChBcnJheS5mcm9tKHV0aWxzLmZpbHRlclNldChuZXdWaXNpYmxlTWFya2VycywgKGVsZW0pID0+ICF2aXNpYmxlTWFya2Vycy5oYXMoZWxlbSkpKSkuYXR0cignZmlsbCcsIG1hcmtlckNvbG9yRm4pOwogICAgICAgICAgICAgICAgLy8gR3JheS1vdXQgdGhlIG5vLWxvbmdlciB2aXNpYmxlIG1hcmtlcnMuCiAgICAgICAgICAgICAgICBzZWxlY3RBbGwoQXJyYXkuZnJvbSh1dGlscy5maWx0ZXJTZXQodmlzaWJsZU1hcmtlcnMsIChlbGVtKSA9PiAhbmV3VmlzaWJsZU1hcmtlcnMuaGFzKGVsZW0pKSkpLmF0dHIoJ2ZpbGwnLCAnI2RkZCcpOwogICAgICAgICAgICAgICAgdmlzaWJsZU1hcmtlcnMgPSBuZXdWaXNpYmxlTWFya2VyczsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBSZXR1cm5zIGEgU2V0IG9mIGFsbCBtYXJrZXIgZWxlbWVudHMgdGhhdCBhcmUgaW4gdGhlCiAgICAgICAgICAgIC8vIHJlY3RhbmdsZSAnc2VsZWN0aW9uJyBnaXZlbiBpbiBjb29yZGluYXRlcyByZWxhdGl2ZSB0byB0aGUKICAgICAgICAgICAgLy8gY2VsbCBpbmRleGVkIGJ5IGNlbGxJbmRleCAuCiAgICAgICAgICAgIGZ1bmN0aW9uIGZpbmRNYXJrZXJzSW5TZWxlY3Rpb24oY2VsbEluZGV4LCBzZWxlY3Rpb24pIHsKICAgICAgICAgICAgICAgIGNvbnNvbGUuYXNzZXJ0KGNlbGxJbmRleCAhPT0gbnVsbCk7CiAgICAgICAgICAgICAgICBjb25zb2xlLmFzc2VydChzZWxlY3Rpb24gIT09IG51bGwpOwogICAgICAgICAgICAgICAgY29uc3QgW2NvbCwgbWV0cmljXSA9IGNlbGxJbmRleDsKICAgICAgICAgICAgICAgIGNvbnN0IHJlc3VsdCA9IG5ldyBTZXQoKTsKICAgICAgICAgICAgICAgIHV0aWxzLnF1YWRUcmVlVmlzaXRQb2ludHNJblJlY3QocXVhZFRyZWVzW2NvbF1bbWV0cmljXSwgc2VsZWN0aW9uWzBdWzBdLCBzZWxlY3Rpb25bMF1bMV0sIHNlbGVjdGlvblsxXVswXSwgc2VsZWN0aW9uWzFdWzFdLCAoZWxlbSkgPT4gewogICAgICAgICAgICAgICAgICAgIGNvbnN0IGRhdGEgPSBzZWxlY3QoZWxlbSkuZGF0dW0oKTsKICAgICAgICAgICAgICAgICAgICBkYXRhLnNlc3Npb25Hcm91cE1hcmtlcnMuZm9yRWFjaCgoc2dfZWxlbSkgPT4gewogICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQuYWRkKHNnX2VsZW0pOwogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNvbnN0IGJydXNoJDEgPSBicnVzaCgpCiAgICAgICAgICAgICAgICAuZXh0ZW50KFsKICAgICAgICAgICAgICAgIFstZnJhbWVNYXJnaW4gKyAxLCAtZnJhbWVNYXJnaW4gKyAxXSwKICAgICAgICAgICAgICAgIFtjZWxsV2lkdGggLSAxICsgZnJhbWVNYXJnaW4gLSAxLCBjZWxsSGVpZ2h0IC0gMSArIGZyYW1lTWFyZ2luIC0gMV0sCiAgICAgICAgICAgIF0pCiAgICAgICAgICAgICAgICAub24oJ3N0YXJ0JywgZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgaWYgKGlzQnJ1c2hBY3RpdmUoKSAmJiBicnVzaGVkQ2VsbEcubm9kZSgpICE9IHRoaXMpIHsKICAgICAgICAgICAgICAgICAgICAvLyBUaGUgYnJ1c2ggaXMgYWN0aXZlIGluIGEgZGlmZmVyZW50IGNlbGwuCiAgICAgICAgICAgICAgICAgICAgLy8gQ2xlYXIgdGhlIHNlbGVjdGlvbiBmaXJzdC4KICAgICAgICAgICAgICAgICAgICAvLyBUaGlzIHdpbGwgcmVjdXJzaXZlbHkgY2FsbCB0aGUgJ3N0YXJ0JywgJ2JydXNoJywgYW5kCiAgICAgICAgICAgICAgICAgICAgLy8gJ2VuZCcgZXZlbnQgbGlzdGVuZXJzIGZvciB0aGUgY2VsbCB3aXRoIHRoZSBzZWxlY3Rpb24KICAgICAgICAgICAgICAgICAgICAvLyBhbmQgd2lsbCB1cGRhdGUgdGhlIG1hcmtlcnMuIFRoZSAnaWYnIGFib3ZlCiAgICAgICAgICAgICAgICAgICAgLy8gcHJldmVudHMgaW5maW5pdGUgcmVjdXJzaW9uLgogICAgICAgICAgICAgICAgICAgIGJydXNoJDEubW92ZShicnVzaGVkQ2VsbEcsIG51bGwpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgYnJ1c2hDaGFuZ2VkKHRoaXMpOwogICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgLm9uKCdicnVzaCcsIGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgIGJydXNoQ2hhbmdlZCh0aGlzKTsKICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgIC5vbignZW5kJywgZnVuY3Rp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AgICAgICAgIH0KICAgICAgICAgICAgICAgIF90aGlzLl9icnVzaFNlbGVjdGlvbiA9IGJydXNoU2VsZWN0aW9uJDE7CiAgICAgICAgICAgICAgICBpZiAoYnJ1c2hTZWxlY3Rpb24kMSAhPT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIGJydXNoZWRDZWxsRyA9IHNlbGVjdChjZWxsR05vZGUpOwogICAgICAgICAgICAgICAgICAgIF90aGlzLl9icnVzaGVkQ2VsbEluZGV4ID0gYnJ1c2hlZENlbGxHLmRhdHVtKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBicnVzaGVkQ2VsbEcgPSBudWxsOwogICAgICAgICAgICAgICAgICAgIF90aGlzLl9icnVzaGVkQ2VsbEluZGV4ID0gbnVsbDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHVwZGF0ZVZpc2libGVNYXJrZXJzKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZnVuY3Rpb24gaXNCcnVzaEFjdGl2ZSgpIHsKICAgICAgICAgICAgICAgIHJldHVybiBfdGhpcy5fYnJ1c2hlZENlbGxJbmRleCAhPT0gbnVsbCAmJiBfdGhpcy5fYnJ1c2hTZWxlY3Rpb24gIT09IG51bGw7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZnVuY3Rpb24gaXNCcnVzaFNlbGVjdGlvbkVtcHR5KCkgewogICAgICAgICAgICAgICAgcmV0dXJuICghaXNCcnVzaEFjdGl2ZSgpIHx8CiAgICAgICAgICAgICAgICAgICAgX3RoaXMuX2JydXNoU2VsZWN0aW9uWzBdWzBdID09PSBfdGhpcy5fYnJ1c2hTZWxlY3Rpb25bMV1bMF0gfHwKICAgICAgICAgICAgICAgICAgICBfdGhpcy5fYnJ1c2hTZWxlY3Rpb25bMF1bMV0gPT09IF90aGlzLl9icnVzaFNlbGVjdGlvblsxXVsxXSk7CiAgICAgICAgICAgIH0KIC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UpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNlbGxzCiAgICAgICAgICAgICAgICAub24oJ2NsaWNrJywgZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgY29uc3QgbmV3U2VsZWN0ZWRNYXJrZXJzID0gY2xvc2VzdE1hcmtlcnMgPT09IHNlbGVjdGVkTWFya2VycyA/IG51bGwgOiBjbG9zZXN0TWFya2VyczsKICAgICAgICAgICAgICAgIGlmIChuZXdTZWxlY3RlZE1hcmtlcnMgPT09IHNlbGVjdGVkTWFya2VycykgewogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChzZWxlY3RlZE1hcmtlcnMgIT09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZE1hcmtlcnMuY2xhc3NlZCgnc2VsZWN0ZWQtbWFya2VyJywgZmFsc2UpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgc2VsZWN0ZWRNYXJrZXJzID0gbmV3U2VsZWN0ZWRNYXJrZXJzOwogICAgICAgICAgICAgICAgaWYgKHNlbGVjdGVkTWFya2VycyAhPT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkTWFya2Vycy5jbGFzc2VkKCdzZWxlY3RlZC1tYXJrZXInLCB0cnVlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGNvbnN0IG5ld1Nlc3Npb25Hcm91cCA9IHNlbGVjdGVkTWFya2VycyA9PT0gbnVsbAogICAgICAgICAgICAgICAgICAgID8gbnVsbAogICAgICAgICAgICAgICAgICAgIDogLy8gQWxsIGVsZW1lbnRzIGluIHNlbGVjdGVkTWFya2VycyBzaG91bGQgaGF2ZSB0aGUgc2FtZQogICAgICAgICAgICAgICAgICAgICAgICAvLyBzZXNzaW9uR3JvdXAuCiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkTWFya2Vycy5kYXR1bSgpLnNlc3Npb25Hcm91cDsKICAgICAgICAgICAgICAgIF90aGlzLnNlbGVjdGVkU2Vzc2lvbkdyb3VwID0gbmV3U2Vzc2lvbkdyb3VwOwogICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgLm9uKCdtb3VzZW1vdmUgbW91c2VlbnRlcicsIGZ1bmN0aW9uIChbY29sLCBtZXRyaWNdKSB7CiAgICAgICAgICAgICAgICBjb25zdCBbeCwgeV0gPSBtb3VzZSh0aGlzKTsKICAgICAgICAgICAgICAgIGNvbnN0IG5ld0Nsb3Nlc3RNYXJrZXJzID0gZmluZENsb3Nlc3RNYXJrZXJzKGNvbCwgbWV0cmljLCB4LCB5LCAKICAgICAgICAgICAgICAgIC8qIHRocmVzaG9sZCAqLyAyMCk7CiAgICAgICAgICAgICAgICBpZiAoY2xvc2VzdE1hcmtlcnMgPT09IG5ld0Nsb3Nlc3RNYXJrZXJzKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKGNsb3Nlc3RNYXJrZXJzICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgY2xvc2VzdE1hcmtlcnMuY2xhc3NlZCgnY2xvc2VzdC1tYXJrZXInLCBmYWxzZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjbG9zZXN0TWFya2VycyA9IG5ld0Nsb3Nlc3RNYXJrZXJzOwogICAgICAgICAgICAgICAgaWYgKGNsb3Nlc3RNYXJrZXJzICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgY2xvc2VzdE1hcmtlcnMuY2xhc3NlZCgnY2xvc2VzdC1tYXJrZXInLCB0cnVlKTsKICAgICAgICAgICAgICAgICAgICAvLyBBbGwgZWxlbWVudHMgaW4gY2xvc2VzdE1hcmtlcnMgc2hvdWxkIGhhdmUgdGhlIHNhbWUKICAgICAgICAgICAgICAgICAgICAvLyBzZXNzaW9uR3JvdXAuCiAgICAgICAgICAgICAgICAgICAgX3RoaXMuY2xvc2VzdFNlc3Npb25Hcm91cCA9IGNsb3Nlc3RNYXJrZXJzLmRhdHVtKCkuc2Vzc2lvbkdyb3VwOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgX3RoaXMuY2xvc2VzdFNlc3Npb25Hcm91cCA9IG51bGw7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAub24oJ21vdXNlbGVhdmUnLCBmdW5jdGlvbiAoW2NvbCwgbWV0cmljXSkgewogICAgICAgICAgICAgICAgaWYgKGNsb3Nlc3RNYXJrZXJzICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgY2xvc2VzdE1hcmtlcnMuY2xhc3NlZCgnY2xvc2VzdC1tYXJrZXInLCBmYWxzZSk7CiAgICAgICAgICAgICAgICAgICAgY2xvc2VzdE1hcmtlcnMgPSBudWxsOwogICAgICAgICAgICAgICAgICAgIF90aGlzLmNsb3Nlc3RTZXNzaW9uR3JvdXAgPSBudWxsOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICAgICAgLy8gRmluZHMgYSBjbG9zZXN0IHZpc2libGUgbWFya2VyIGluIHRoZSBbY29sLG1ldHJpY10gY2VsbCB0byB0aGUgcG9pbnQKICAgICAgICAgICAgLy8gd2l0aCBjZWxsLXJlbGF0aXZlIGNvb3JkaW5hdGVzICh4LHkpLiBJZiB0aGF0IHBvaW50J3MgZGlzdGFuY2UKICAgICAgICAgICAgLy8gdG8gdGhlIHBvaW50IGF0ICh4LHkpIGlzIGxhcmdlciB0aGFuIHRocmVzaG9sZCwgcmV0dXJucyBudWxsOwogICAgICAgICAgICAvLyBvdGhlcndpc2UgcmV0dXJucyB0aGUgZDMtc2VsZWN0aW9uIGNvbnNpc3Rpbmcgb2YgdGhlIG1hcmtlcnMKICAgICAgICAgICAgLy8gcmVwcmVzZW50aW5nIHRoZSBzZXNzaW9uIGdyb3VwIG9mIHRoYXQgY2xvc2VzdCBtYXJrZXIuCiAgICAgICAgICAgIGZ1bmN0aW9uIGZpbmRDbG9zZXN0TWFya2VycyhtZXRyaWMsIGNvbCwgeCwgeSwgdGhyZXNob2xkKSB7CiAgICAgICAgICAgICAgICBsZXQgbWluRGlzdCA9IEluZmluaXR5OwogICAgICAgICAgICAgICAgbGV0IG1pblNlc3Npb25Hcm91cCA9IG51bGw7CiAgICAgICAgICAgICAgICB1dGlscy5xdWFkVHJlZVZpc2l0UG9pbnRzSW5EaXNrKHF1YWRUcmVlc1ttZXRyaWNdW2NvbF0sIHgsIHksIHRocmVzaG9sZCwgKGVsZW0sIGRpc3RhbmNlVG9DZW50ZXIpID0+IHsKICAgICAgICAgICAgICAgICAgICBpZiAodmlzaWJsZU1hcmtlcnMuaGFzKGVsZW0pICYmIGRpc3RhbmNlVG9DZW50ZXIgPCBtaW5EaXN0KSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGRhdGEgPSBzZWxlY3QoZWxlbSkuZGF0dW0oKTsKICAgICAgICAgICAgICAgICAgICAgICAgbWluRGlzdCA9IGRpc3RhbmNlVG9DZW50ZXI7CiAgICAgICAgICAgICAgICAgICAgICAgIG1pblNlc3Npb25Hcm91cCA9IGRhdGEuc2Vzc2lvbkdyb3VwOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgaWYgKG1pblNlc3Npb25Hcm91cCA9PT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIHNlbGVjdEFsbChzZXNzaW9uR3JvdXBNYXJrZXJzTWFwLmdldChtaW5TZXNzaW9uR3JvdXApKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t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gICAgIC8vIG1ldHJpYyBvciBocGFyYW0gdG8gYmUgbWFwcGVkIHNob3VsZCBiZSBzcGVjaWZpZWQgYXMgdGhlCiAgICAgICAgLy8gdmlzaWJsZVNjaGVtYS1jb2x1bW4gaW5kZXhlZCBieSBjb2xJbmRleC4KICAgICAgICBfY2VsbFNjYWxlKGNvbEluZGV4LCByYW5nZSkgewogICAgICAgICAgICBjb25zdCBleHRlbnQgPSB0aGlzLl9jb2xFeHRlbnQoY29sSW5kZXgpOwogICAgICAgICAgICBjb25zdCBsaW5lYXJTY2FsZSA9IGxpbmVhciQyKCkuZG9tYWluKGV4dGVudCkucmFuZ2UocmFuZ2UpOwogICAgICAgICAgICBpZiAodGhpcy5vcHRpb25zLmNvbHVtbnNbY29sSW5kZXhdLnNjYWxlID09PSAnTElORUFSJykgewogICAgICAgICAgICAgICAgcmV0dXJuIGxpbmVhclNjYWxlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKHRoaXMub3B0aW9ucy5jb2x1bW5zW2NvbEluZGV4XS5zY2FsZSA9PT0gJ0xPRycpIHsKICAgICAgICAgICAgICAgIGlmIChleHRlbnRbMF0gPD0gMCAmJiBleHRlbnRbMV0gPj0gMCkgewogICAgICAgICAgICAgICAgICAgIC8vIFdlIGNhbid0IGhhdmUgYSBsb2cgc2NhbGUgZm9yIGRhdGEgd2hvc2UgZXh0ZW50IGNvbnRhaW5zIDAuCiAgICAgICAgICAgICAgICAgICAgLy8gVXNlIGEgbGluZWFyIHNjYWxlIGluc3RlYWQuCiAgICAgICAgICAgICAgICAgICAgLy8gVE9ETyhlcmV6KTogQ3JlYXRlIGEgc3ltbG9nIHNjYWxlIHNpbWlsYXIgdG8gTWF0cGxvdGxpYidzCiAgICAgICAgICAgICAgICAgICAgLy8gc3ltbG9nLiBTZWUgYWxzbyBkMyBpc3N1ZSBoZXJlOgogICAgICAgICAgICAgICAgICAgIC8vIGh0dHBzOi8vZ2l0aHViLmNvbS9kMy9kMy1zY2FsZS9pc3N1ZXMvMTA1CiAgICAgICAgICAgICAgICAgICAgLy8gYW5kIGIvMTExNzU1NTQwCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGxpbmVhclNjYWxlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIGxvZyQxKCkuZG9tYWluKGV4dGVudCkucmFuZ2UocmFuZ2UpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKHRoaXMub3B0aW9ucy5jb2x1bW5zW2NvbEluZGV4XS5zY2FsZSA9PT0gJ1FVQU5USUxFJykgewogICAgICAgICAgICAgICAgLy8gQ29tcHV0ZSAyMC1xdWFudGlsZXM6CiAgICAgICAgICAgICAgICBjb25zdCBzdGVwID0gKHJhbmdlWzFdIC0gcmFuZ2VbMF0pIC8gMTk7CiAgICAgICAgICAgICAgICAvLyBDb21wdXRlIHRoZSBzY2FsZSdzIHJhbmdlIHRvIGJlOgogICAgICAgICAgICAgICAgLy8ge3JhbmdlWzBdLCByYW5nZVswXStzdGVwLCAuLi4sIHJhbmdlWzFdfS4KICAgICAgICAgICAgICAgIC8vIGQzLnJhbmdlKHJhbmdlWzBdLCByYW5nZVsxXStzdGVwLCBzdGVwKSBoYXMgbnVtZXJpY2FsCiAgICAgICAgICAgICAgICAvLyBpc3N1ZXMgYW5kIG1heSBwcm9kdWNlIGFuIGV4dHJhIG1lbWJlciwgc28gd2UgdXNlIGEKICAgICAgICAgICAgICAgIC8vIGRpZmZlcmVudCBwcm9jZWR1cmU6CiAgICAgICAgICAgICAgICBjb25zdCBzY2FsZVJhbmdlID0gc2VxdWVuY2UoMjApLm1hcCgoaSkgPT4gcmFuZ2VbMF0gKyBzdGVwICogaSk7CiAgICAgICAgICAgICAgICByZXR1cm4gcXVhbnRpbGUoKQogICAgICAgICAgICAgICAgICAgIC5kb21haW4obG9kYXNoLnVuaXEodGhpcy5zZXNzaW9uR3JvdXBzLm1hcCgoc2cpID0+IHRoaXMuX2NvbFZhbHVlKHNnLCBjb2xJbmRleCkpKSkKICAgICAgICAgICAgICAgICAgICAucmFuZ2Uoc2NhbGVSYW5nZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAodGhpcy5vcHRpb25zLmNvbHVtbnNbY29sSW5kZXhdLnNjYWxlID09PSAnTk9OX05VTUVSSUMnKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gcG9pbnQkMSgpCiAgICAgICAgICAgICAgICAgICAgLmRvbWFpbigKICAgICAgICAgICAgICAgIC8vIFdlIHNvcnQgdGhlIHNlc3Npb24gZ3JvdXBzIHRvIG1ha2UgdGhlIG9yZGVyCiAgICAgICAgICAgICAgICAvLyBzdGFibGUgYWNyb3NzICdMaXN0U2Vzc2lvbkdyb3VwcycgUlBDcwogICAgICAgICAgICAgICAgbG9kYXNoLnVuaXEodGhpcy5zZXNzaW9uR3JvdXBzLm1hcCgoc2cpID0+IHRoaXMuX2NvbFZhbHVlKHNnLCBjb2xJbmRleCkpLnNvcnQoKSkpCiAgICAgICAgICAgICAgICAgICAgLnJhbmdlKHJhbmdlKQogICAgICAgICAgICAgICAgICAgIC5wYWRkaW5nKDAuMSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aHJvdyAoJ1Vua25vd24gc2NhbGUgZm9yIGNvbHVtbjogJyArIGNvbEluZGV4ICsgJy4gb3B0aW9uczogJyArIHRoaXMub3B0aW9ucyk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgX2NvbFZhbHVlKHNlc3Npb25Hcm91cCwgY29sSW5kZXgpIHsKICAgICAgICAgICAgcmV0dXJuIGNvbHVtblZhbHVlQnlWaXNpYmxlSW5kZXgodGhpcy52aXNpYmxlU2NoZW1hLCBzZXNzaW9uR3JvdXAsIGNvbEluZGV4KTsKICAgICAgICB9CiAgICAgICAgX21ldHJpY1ZhbHVlKHNlc3Npb25Hcm91cCwgbWV0cmljSW5kZXgpIH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cm91cCIsIHZvaWQgMCk7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7CiAgICAgICAgICAgIHR5cGU6IE9iamVjdCwKICAgICAgICAgICAgbm90aWZ5OiB0cnVlLAogICAgICAgIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgT2JqZWN0KQogICAgXSwgVGZIcGFyYW1zU2NhdHRlclBsb3RNYXRyaXhQbG90LnByb3RvdHlwZSwgImNsb3Nlc3RTZXNzaW9uR3JvdXAiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBPYmplY3QsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBIVE1MRWxlbWVudCkKICAgIF0sIFRmSHBhcmFtc1NjYXR0ZXJQbG90TWF0cml4UGxvdC5wcm90b3R5cGUsICJfY29udGFpbmVyIiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsKICAgICAgICAgICAgdHlwZTogT2JqZWN0LAogICAgICAgIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgT2JqZWN0KQogICAgXSwgVGZIcGFyYW1zU2NhdHRlclBsb3RNYXRyaXhQbG90LnByb3RvdHlwZSwgIl9zdmciLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBOdW1iZXIsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBOdW1iZXIpCiAgICBdLCBUZkhwYXJhbXNTY2F0dGVyUGxvdE1hdHJpeFBsb3QucHJvdG90eXBlLCAid2lkdGgiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBOd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gogICAgICAuc2VjdGlvbiB7CiAgICAgICAgcGFkZGluZzogMTBweDsKICAgICAgfQogICAgICAjY29udHJvbHMgewogICAgICAgIGZsZXgtZ3JvdzogMDsKICAgICAgICBmbGV4LXNocmluazogMDsKICAgICAgICBmbGV4LWJhc2lzOiBhdXRvOwogICAgICAgIGhlaWdodDogYXV0bzsKICAgICAgICBvdmVyZmxvdy15OiBhdXRvOwogICAgICAgIG1heC1oZWlnaHQ6IGZpdC1jb250ZW50OwogICAgICB9CiAgICAgICNwbG90IHsKICAgICAgICBmbGV4LWdyb3c6IDE7CiAgICAgICAgZmxleC1zaHJpbms6IDE7CiAgICAgICAgZmxleC1iYXNpczogYXV0bzsKICAgICAgICBoZWlnaHQ6IGF1dG87CiAgICAgICAgb3ZlcmZsb3cteTogYXV0bzsKICAgICAgICBtYXgtaGVpZ2h0OiBmaXQtY29udGVudDsKICAgICAgfQogICAgICAjdmFsdWVzIHsKICAgICAgICBmbGV4LWdyb3c6IDA7CiAgICAgICAgZmxleC1zaHJpbms6IDA7CiAgICAgICAgZmxleC1iYXNpczogYXV0bzsKICAgICAgICBoZWlnaHQ6IDExNXB4OwogICAgICAgIG92ZXJmbG93LXk6IGF1dG87CiAgICAgICAgbWF4LWhlaWdodDogZml0LWNvbnRlbnQ7CiAgICAgIH0KICAgICAgI2RldGFpbHMgewogICAgICAgIGZsZXgtZ3JvdzogMDsKICAgICAgICBmbGV4LXNocmluazogMTsKICAgICAgICBmbGV4LWJhc2lzOiBhdXRvOwogICAgICAgIGhlaWdodDogYXV0bzsKICAgICAgICBvdmVyZmxvdy15OiBhdXRvOwogICAgICAgIG1heC1oZWlnaHQ6IGZpdC1jb250ZW50OwogICAgICB9CiAgICAgIHZhYWRpbi1zcGxpdC1sYXlvdXQgewogICAgICAgIGhlaWdodDogMTAwJTsKICAgICAgfQogICAgPC9zdHlsZT4KICBgOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoeyB0eXBlOiBPYmplY3Qg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dGFiPgogICAgICAgICAgPHBhcGVyLXRhYiB2aWV3LWlkPSJwYXJhbGxlbC1jb29yZHMtdmlldyI+CiAgICAgICAgICAgIFBBUkFMTEVMIENPT1JESU5BVEVTIFZJRVcKICAgICAgICAgIDwvcGFwZXItdGFiPgogICAgICAgICAgPHBhcGVyLXRhYiB2aWV3LWlkPSJzY2F0dGVyLXBsb3QtbWF0cml4LXZpZXciPgogICAgICAgICAgICBTQ0FUVEVSIFBMT1QgTUFUUklYIFZJRVcKICAgICAgICAgIDwvcGFwZXItdGFiPgogICAgICAgICAgPGRpdiBjbGFzcz0iaGVscC1hbmQtZmVlZGJhY2siPgogICAgICAgICAgICA8dGVtcGxhdGUgaXM9ImRvbS1pZiIgaWY9IltbYnVnUmVwb3J0VXJsXV0iPgogICAgICAgICAgICAgIDxhCiAgICAgICAgICAgICAgICBocmVmJD0iW1tidWdSZXBvcnRVcmxdXSIKICAgICAgICAgICAgICAgIHRhcmdldD0iX2JsYW5rIgogICAgICAgICAgICAgICAgcmVsPSJub29wZW5lciBub3JlZmVycmVyIgogICAgICAgICAgICAgID4KICAgICAgICAgICAgICAgIDxwYXBlci1idXR0b24KICAgICAgICAgICAgICAgICAgaWQ9ImJ1Zy1yZXBvcnQiCiAgICAgICAgICAgICAgICAgIHJhaXNlZAogICAgICAgICAgICAgICAgICB0aXRsZT0iU2VuZCBhIGJ1ZyByZXBvcnQgb3IgZmVhdHVyZSByZXF1ZXN0IgogICAgICAgICAgICAgICAgPgogICAgICAgICAgICAgICAgICBCdWcgUmVwb3J0IC8gRmVhdHVyZSBSZXF1ZXN0CiAgICAgICAgICAgICAgICA8L3BhcGVyLWJ1dHRvbj4KICAgICAgICAgICAgICA8L2E+CiAgICAgICAgICAgIDwvdGVtcGxhdGU+CiAgICAgICAgICAgIDx0ZW1wbGF0ZSBpcz0iZG9tLWlmIiBpZj0iW1toZWxwVXJsXV0iPgogICAgICAgICAgICAgIDxhIGhyZWYkPSJbW2hlbHBVcmxdXSIgdGFyZ2V0PSJfYmxhbmsiIHJlbD0ibm9vcGVuZXIgbm9yZWZlcnJlciI+CiAgICAgICAgICAgICAgICA8cGFwZXItaWNvbi1idXR0b24KICAgICAgICAgICAgICAgICAgaWNvbj0iaGVscC1vdXRsaW5lIgogICAgICAgICAgICAgICAgICB0aXRsZT0iVmlldyBkb2N1bWVudGF0aW9uIgogICAgICAgICAgICAgICAgPgogICAgICAgICAgICAgICAgPC9wYXBlci1pY29uLWJ1dHRvbj4KICAgICAgICAgICAgICA8L2E+CiAgICAgICAgICAgIDwvdGVtcGxhdGU+CiAgICAgICAgICA8L2Rpdj4KICAgICAgICA8L3BhcGVyLXRhYnM+CiAgICAgIDwvcGFwZXItdG9vbGJhcj4KICAgICAgPGlyb24tcGFnZXMgc2VsZWN0ZWQ9IltbX3NlbGVjdGVkVGFiXV0iIGNsYXNzPSJmaXQgdGFiLXZpZXciPgogICAgICAgIDxkaXYgaWQ9IjAiIGNsYXNzPSJ0YWIiPgogICAgICAgICAgPHRmLWhwYXJhbXMtdGFibGUtdmlldwogICAgICAgICAgICBiYWNrZW5kPSJbW2JhY2tlbmRdXSIKICAgICAgICAgICAgZXhwZXJpbWVudC1uYW1lPSJbW2V4cGVyaW1lbnROYW1lXV0iCiAgICAgICAgICAgIHZpc2libGUtc2NoZW1hPSJbW2NvbmZpZ3VyYXRpb24udmlzaWJsZVNjaGVtYV1dIgogICAgICAgICAgICBzZXNzaW9uLWdyb3Vwcz0iW1tzZXNzaW9uR3JvdXBzXV0iCiAgICAgICAgICAgIGVuYWJsZS1zaG93LW1ldHJpY3MKICAgICAgICAgID4KICAgICAgICAgIDwvdGYtaHBhcmFtcy10YWJsZS12aWV3PgogICAgICAgIDwvZGl2PgogICAgICAgIDxkaXYgaWQ9IjEiIGNsYXNzPSJ0YWIiPgogICAgICAgICAgPHRmLWhwYXJhbXMtcGFyYWxsZWwtY29vcmRzLXZpZXcKICAgICAgICAgICAgYmFja2VuZD0iW1tiYWNrZW5kXV0iCiAgICAgICAgICAgIGV4cGVyaW1lbnQtbmFtZT0iW1tleHBlcmltZW50TmFtZV1dIgogICAgICAgICAgICBjb25maWd1cmF0aW9uPSJbW2NvbmZpZ3VyYXRpb25dXSIKICAgICAgICAgICAgc2Vzc2lvbi1ncm91cHM9Iltbc2Vzc2lvbkdyb3Vwc11dIgogICAgICAgICAgPgogICAgICAgICAgPC90Zi1ocGFyYW1zLXBhcmFsbGVsLWNvb3Jkcy12aWV3PgogICAgICAgIDwvZGl2PgogICAgICAgIDxkaXYgaWQ9IjIiIGNsYXNzPSJ0YWIiPgogICAgICAgICAgPHRmLWhwYXJhbXMtc2NhdHRlci1wbG90LW1hdHJpeC12aWV3CiAgICAgICAgICAgIGJhY2tlbmQ9IltbYmFja2VuZF1dIgogICAgICAgICAgICBleHBlcmltZW50LW5hbWU9IltbZXhwZXJpbWVudE5hbWVdXSIKICAgICAgICAgICAgY29uZmlndXJhdGlvbj0iW1tjb25maWd1cmF0aW9uXV0iCiAgICAgICAgICAgIHNlc3Npb24tZ3JvdXBzPSJbW3Nlc3Npb25Hcm91cHNdXSIKICAgICAgICAgID4KICAgICAgICAgIDwvdGYtaHBhcmFtcy1zY2F0dGVyLXBsb3QtbWF0cml4LXZpZXc+CiAgICAgICAgPC9kaXY+CiAgICAgIDwvaXJvbi1wYWdlcz4KICAgIDwvcGFwZXItaGVhZGVyLXBhbmVsPgoKICAgIDxzdHlsZT4KICAgICAgLnRhYi12aWV3IHsKICAgICAgICBoZWlnaHQ6IDEwMCU7CiAgICAgIH0KICAgICAgLnRhYi1iYXIgewogICAgICAgIG92ZXJmbG93LXk6IGF1dG87CiAgICAgICAgY29sb3I6IHdoaXRlOwogICAgICAgIGJhY2tncm91bmQtY29sb3I6IHZhcigKICAgICAgICAgIC0tdGItdG9vbGJhci1iYWNrZ3JvdW5kLWNvbG9yLAogICAgICAgICAgdmFyKC0tdGItb3JhbmdlLXN0cm9uZykKICAgICAgICApOwogICAgICB9CiAgICAgIC50YWIgewogICAgICAgIGhlaWdodDogMTAwJTsKICAgICAgfQogICAgICBwYXBlci10YWJzIHsKICAgICAgICBmbGV4LWdyb3c6IDE7CiAgICAgICAgd2lkdGg6IDEwMCU7CiAgICAgICAgaGVpZ2h0OiAxMDAlOwogICAgICAgIC0tcGFwZXItdGFicy1zZWxlY3Rpb24tYmFyLWNvbG9yOiB3aGl0ZTsKICAgICAgICAtLXBhcGVyLXRhYnMtY29udGVudDogewogICAgICAgICAgLXdlYmtpdC1mb250LXNtb290aGluZzogYW50aWFsaWFzZWQ7CiAgICAgICAgfQogICAgICB9CiAgICAgIHRmLWhwYXJhbXMtdGFibGUtdmlldyB7CiAgICAgICAgd2lkdGg6IDEwMCU7CiAgICAgICAgaGVpZ2h0OiAxMDAlOwogICAgICB9CiAgICAgIC5oZWxwLWFuZC1mZWVkYmFjayB7CiAgICAgICAgZGlzcGxheTogaW5saW5lLWZsZXg7IC8qIEVuc3VyZSB0aGF0IGljb25zIHN0YXkgYWxpZ25lZCAqLwogICAgICAgIGp1c3RpZnktY29udGVudDogZmxleC1lbmQ7CiAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICAgICAgICB0ZXh0LWFsaWduOiByaWdodDsKICAgICAgICBjb2xvcjogd2hpdGU7CiAgICAgIH0KICAgICAgI2J1Zy1yZXBvcnQgewogICAgICAgIGJvcmRlcjogc29saWQgYmxhY2s7CiAgICAgICAgYmFja2dyb3VuZDogcmVkOwogICAgICAgIHdoaXRlLXNwYWNlOiBub3JtYWw7CiAgICAgICAgd29yZC1icmVhazogYnJlYWstd29yZHM7CiAgICAgICAgZm9udC1zaXplOiAxMnB4OwogICAgICAgIG1heC13aWR0aDogMTUwcHg7CiAgICAgICAgdGV4dC1hbGlnbjogbGVmdDsKICAgICAgfQogICAgICAuaGVscC1hbmQtZmVlZGJhY2sgYSB7CiAgICAgICAgY29sb3I6IHdoaXRlOwogICAgICAgIHRleHQtZGVjb3JhdGlvbjogbm9uZTsKICAgICAgfQogICAgPC9zd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gICAgICAgICAgICAgPC9saT4KICAgICAgICAgICAgICA8bGk+VGVuc29yQm9hcmQgY2Fu4oCZdCBmaW5kIHlvdXIgZXZlbnQgZmlsZXMuPC9saT4KICAgICAgICAgICAgPC91bD4KCiAgICAgICAgICAgIDxwPgogICAgICAgICAgICAgIElmIHlvdeKAmXJlIG5ldyB0byB1c2luZyBUZW5zb3JCb2FyZCwgYW5kIHdhbnQgdG8gZmluZCBvdXQgaG93IHRvCiAgICAgICAgICAgICAgYWRkIGRhdGEgYW5kIHNldCB1cCB5b3VyIGV2ZW50IGZpbGVzLCBjaGVjayBvdXQgdGhlCiAgICAgICAgICAgICAgPGEKICAgICAgICAgICAgICAgIGhyZWY9Imh0dHBzOi8vZ2l0aHViLmNvbS90ZW5zb3JmbG93L3RlbnNvcmJvYXJkL2Jsb2IvbWFzdGVyL1JFQURNRS5tZCIKICAgICAgICAgICAgICAgID5SRUFETUU8L2EKICAgICAgICAgICAgICA+CiAgICAgICAgICAgICAgYW5kIHBlcmhhcHMgdGhlCiAgICAgICAgICAgICAgPGEKICAgICAgICAgICAgICAgIGhyZWY9Imh0dHBzOi8vd3d3LnRlbnNvcmZsb3cub3JnL2dldF9zdGFydGVkL3N1bW1hcmllc19hbmRfdGVuc29yYm9hcmQiCiAgICAgICAgICAgICAgICA+VGVuc29yQm9hcmQgdHV0b3JpYWw8L2EKICAgICAgICAgICAgICA+LgogICAgICAgICAgICA8L3A+CgogICAgICAgICAgICA8cD4KICAgICAgICAgICAgICBJZiB5b3UgdGhpbmsgVGVuc29yQm9hcmQgaXMgY29uZmlndXJlZCBwcm9wZXJseSwgcGxlYXNlIHNlZQogICAgICAgICAgICAgIDxhCiAgICAgICAgICAgICAgICBocmVmPSJodHRwczovL2dpdGh1Yi5jb20vdGVuc29yZmxvdy90ZW5zb3Jib2FyZC9ibG9iL21hc3Rlci9SRUFETUUubWQjbXktdGVuc29yYm9hcmQtaXNudC1zaG93aW5nLWFueS1kYXRhLXdoYXRzLXdyb25nIgogICAgICAgICAgICAgICAgPnRoZSBzZWN0aW9uIG9mIHRoZSBSRUFETUUgZGV2b3RlZCB0byBtaXNzaW5nIGRhdGEgcHJvYmxlbXM8L2EKICAgICAgICAgICAgICA+CiAgICAgICAgICAgICAgYW5kIGNvbnNpZGVyIGZpbGluZyBhbiBpc3N1ZSBvbiBHaXRIdWIuCiAgICAgICAgICAgIDwvcD4KICAgICAgICAgIDwvZGl2PgogICAgICAgIDwvdGVtcGxhdGU+CgogICAgICAgIDx0ZW1wbGF0ZSBpcz0iZG9tLWlmIiBpZj0iW1tfZGF0YUxvYWRlZFdpdGhOb25FbXB0eUhwYXJhbXNdXSI+CiAgICAgICAgICA8dGYtaHBhcmFtcy1zZXNzaW9ucy1wYW5lCiAgICAgICAgICAgIGlkPSJzZXNzaW9ucy1wYW5lIgogICAgICAgICAgICBiYWNrZW5kPSJbW2JhY2tlbmRdXSIKICAgICAgICAgICAgaGVscC11cmw9IltbaGVscFVybF1dIgogICAgICAgICAgICBidWctcmVwb3J0LXVybD0iW1tidWdSZXBvcnRVcmxdXSIKICAgICAgICAgICAgZXhwZXJpbWVudC1uYW1lPSJbW2V4cGVyaW1lbnROYW1lXV0iCiAgICAgICAgICAgIGNvbmZpZ3VyYXRpb249IltbX2NvbmZpZ3VyYXRpb25dXSIKICAgICAgICAgICAgc2Vzc2lvbi1ncm91cHM9IltbX3Nlc3Npb25Hcm91cHNdXSIKICAgICAgICAgID4KICAgICAgICAgIDwvdGYtaHBhcmFtcy1zZXNzaW9ucy1wYW5lPgogICAgICAgIDwvdGVtcGxhdGU+CiAgICAgIDwvZGl2PgogICAgPC9ocGFyYW1zLXNwbGl0LWxheW91dD4KICAgIDxzdHlsZT4KICAgICAgaHBhcmFtcy1zcGxpdC1sYXlvdXQgewogICAgICAgIHdpZHRoOiAxMDAlOwogICAgICB9CgogICAgICAuc2lkZWJhciB7CiAgICAgICAgd2lkdGg6IDIwJTsKICAgICAgICBoZWlnaHQ6IDEwMCU7CiAgICAgICAgb3ZlcmZsb3c6IGF1dG87CiAgICAgICAgZmxleC1ncm93OiAwOwogICAgICAgIGZsZXgtc2hyaW5rOiAwOwogICAgICAgIG1pbi13aWR0aDogMTAlOwogICAgICB9CgogICAgICAuY2VudGVyIHsKICAgICAgICBoZWlnaHQ6IDEwMCU7CiAgICAgICAgb3ZlcmZsb3cteTogYXV0bzsKICAgICAgICBmbGV4LWdyb3c6IDE7CiAgICAgICAgZmxleC1zaHJpbms6IDE7CiAgICAgICAgd2lkdGg6IDgwJTsKICAgICAgfQoKICAgICAgOmhvc3QgewogICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAgZmxleC1kaXJlY3Rpb246IHJvdzsKICAgICAgICBoZWlnaHQ6IDEwMCU7CiAgICAgICAgd2lkdGg6IDEwMCU7CiAgICAgIH0KCiAgICAgIC5uby1kYXRhLXdhcm5pbmcgewogICAgICAgIG1heC13aWR0aDogNTQwcHg7CiAgICAgICAgbWFyZ2luOiA4MHB4IGF1dG8gMCBhdXRvOwogICAgICB9CiAgICA8L3N0eWxlPgogIGA7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7IHR5cGU6IE9iamVjdCB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIEJhY2tlbmQpCiAgICBdLCBUZkhwYXJhbXNNYWluLnByb3RvdHlwZSwgImJhY2tlbmQiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoeyB0eXBlOiBTdHJpbmcgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBTdHJpbmcpCiAgICBdLCBUZkhwYXJhbXNNYWluLnByb3RvdHlwZSwgImV4cGVyaW1lbnROYW1lIiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsgdHlwZTogU3RyaW5nIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0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hpcy5fbWV0YWRhdGFDYW5jZWxsZXIgPSBuZXcgQ2FuY2VsbGVyKCk7CiAgICAgICAgICAgIHRoaXMuX2ltYWdlQ2FuY2VsbGVyID0gbmV3IENhbmNlbGxlcigpOwogICAgICAgICAgICB0aGlzLl9zdGVwcyA9IFtdOwogICAgICAgICAgICB0aGlzLl9pc0ltYWdlTG9hZGluZyA9IGZhbHNlOwogICAgICAgIH0KICAgICAgICBnZXQgX3J1bkNvbG9yKCkgewogICAgICAgICAgICB2YXIgcnVuID0gdGhpcy5ydW47CiAgICAgICAgICAgIHJldHVybiBydW5zQ29sb3JTY2FsZShydW4pOwogICAgICAgIH0KICAgICAgICBnZXQgX2hhc0F0TGVhc3RPbmVTdGVwKCkgewogICAgICAgICAgICB2YXIgc3RlcHMgPSB0aGlzLl9zdGVwczsKICAgICAgICAgICAgcmV0dXJuICEhc3RlcHMgJiYgc3RlcHMubGVuZ3RoID4gMDsKICAgICAgICB9CiAgICAgICAgZ2V0IF9oYXNNdWx0aXBsZVN0ZXBzKCkgewogICAgICAgICAgICB2YXIgc3RlcHMgPSB0aGlzLl9zdGVwczsKICAgICAgICAgICAgcmV0dXJuICEhc3RlcHMgJiYgc3RlcHMubGVuZ3RoID4gMTsKICAgICAgICB9CiAgICAgICAgZ2V0IF9jdXJyZW50U3RlcCgpIHsKICAgICAgICAgICAgdmFyIHN0ZXBzID0gdGhpcy5fc3RlcHM7CiAgICAgICAgICAgIHZhciBzdGVwSW5kZXggPSB0aGlzLl9zdGVwSW5kZXg7CiAgICAgICAgICAgIHJldHVybiBzdGVwc1tzdGVwSW5kZXhdIHx8IG51bGw7CiAgICAgICAgfQogICAgICAgIGdldCBfc3RlcFZhbHVlKCkgewogICAgICAgICAgICB2YXIgY3VycmVudFN0ZXAgPSB0aGlzLl9jdXJyZW50U3RlcDsKICAgICAgICAgICAgaWYgKCFjdXJyZW50U3RlcCkKICAgICAgICAgICAgICAgIHJldHVybiAwOwogICAgICAgICAgICByZXR1cm4gY3VycmVudFN0ZXAuc3RlcDsKICAgICAgICB9CiAgICAgICAgZ2V0IF9jdXJyZW50V2FsbFRpbWUoKSB7CiAgICAgICAgICAgIHZhciBjdXJyZW50U3RlcCA9IHRoaXMuX2N1cnJlbnRTdGVwOwogICAgICAgICAgICBpZiAoIWN1cnJlbnRTdGVwKQogICAgICAgICAgICAgICAgcmV0dXJuICcnOwogICAgICAgICAgICByZXR1cm4gZm9ybWF0RGF0ZSQxKGN1cnJlbnRTdGVwLndhbGxfdGltZSk7CiAgICAgICAgfQogICAgICAgIGdldCBfbWF4U3RlcEluZGV4KCkgewogICAgICAgICAgICB2YXIgc3RlcHMgPSB0aGlzLl9zdGVwczsKICAgICAgICAgICAgcmV0dXJuIHN0ZXBzLmxlbmd0aCAtIDE7CiAgICAgICAgfQogICAgICAgIGdldCBfc2FtcGxlVGV4dCgpIHsKICAgICAgICAgICAgdmFyIHNhbXBsZSA9IHRoaXMuc2FtcGxlOwogICAgICAgICAgICByZXR1cm4gYCR7c2FtcGxlICsgMX1gOwogICAgICAgIH0KICAgICAgICBnZXQgX2hhc011bHRpcGxlU2FtcGxlcygpIHsKICAgICAgICAgICAgdmFyIG9mU2FtcGxlcyA9IHRoaXMub2ZTYW1wbGVzOwogICAgICAgICAgICByZXR1cm4gb2ZTYW1wbGVzID4gMTsKICAgICAgICB9CiAgICAgICAgX2dldEFyaWFFeHBhbmRlZCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuYWN0dWFsU2l6ZSA/ICd0cnVlJyA6ICdmYWxzZSc7CiAgICAgICAgfQogICAgICAgIGF0dGFjaGVkKCkgewogICAgICAgICAgICB0aGlzLnJlbG9hZCgpOwogICAgICAgIH0KICAgICAgICByZWxvYWQoKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5pc0F0dGFjaGVkKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fbWV0YWRhdGFDYW5jZWxsZXIuY2FuY2VsQWxsKCk7CiAgICAgICAgICAgIGNvbnN0IHJvdXRlciA9IGdldFJvdXRlcigpOwogICAgICAgICAgICBjb25zdCB1cmwgPSBhZGRQYXJhbXMocm91dGVyLnBsdWdpblJvdXRlKCdpbWFnZXMnLCAnL2ltYWdlcycpLCB7CiAgICAgICAgICAgICAgICB0YWc6IHRoaXMudGFnLAogICAgICAgICAgICAgICAgcnVuOiB0aGlzLnJ1biwKICAgICAgICAgICAgICAgIHNhbXBsZTogdGhpcy5zYW1wbGUsCiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBjb25zdCB1cGRhdGVTdGVwcyA9IHRoaXMuX21ldGFkYXRhQ2FuY2VsbGVyLmNhbmNlbGxhYmxlKChyZXN1bHQpID0+IHsKICAgICAgICAgICAgICAgIGlmIChyZXN1bHQuY2FuY2VsbGVkKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgY29uc3QgZGF0YSA9IHJlc3VsdC52YWx1ZTsKICAgICAgICAgICAgICAgIGNvbnN0IHN0ZXBzID0gZGF0YS5tYXAodGhpcy5fY3JlYXRlU3RlcERhdHVtLmJpbmQodGhpcykpOwogICAgICAgICAgICAgICAgdGhpcy5zZXQoJ19zdGVwcycsIHN0ZXBzKTsKICAgICAgICAgICAgICAgIHRoaXMuc2V0KCdfc3RlcEluZGV4Jywgc3RlcHMubGVuZ3RoIC0gMSk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICB0aGlzLnJlcXVlc3RNYW5hZ2VyLnJlcXVlc3QodXJsKS50aGVuKHVwZGF0ZVN0ZXBzKTsKICAgICAgICB9CiAgICAgICAgX2NyZWF0ZVN0ZXBEYXR1bShpbWFnZU1ldGFkYXRhKSB7CiAgICAgICAgICAgIGxldCB1cmwgPSBnZXRSb3V0ZXIoKS5wbHVnaW5Sb3V0ZSgnaW1hZ2VzJywgJy9pbmRpdmlkdWFsSW1hZ2UnKTsKICAgICAgICAg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GVyY2VudGFnZTsKICAgICAgICAgICAgLy8gV2UgbWFudWFsbHkgY2hhbmdlIHRoZSBpbWFnZSBVUkwgKGluc3RlYWQgb2YgYmluZGluZyB0byB0aGUKICAgICAgICAgICAgLy8gaW1hZ2UncyBzcmMgYXR0cmlidXRlKSBiZWNhdXNlIHdlIHdvdWxkIGxpa2UgdG8gbWFuYWdlIHdoYXQKICAgICAgICAgICAgLy8gaGFwcGVucyB3aGVuIHRoZSBpbWFnZSBzdGFydHMgYW5kIHN0b3BzIGxvYWRpbmcuCiAgICAgICAgICAgIGlmICghY3VycmVudFN0ZXApCiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIGNvbnN0IGltZyA9IG5ldyBJbWFnZSgpOwogICAgICAgICAgICB0aGlzLl9pbWFnZUNhbmNlbGxlci5jYW5jZWxBbGwoKTsKICAgICAgICAgICAgaW1nLm9ubG9hZCA9IGltZy5vbmVycm9yID0gdGhpcy5faW1hZ2VDYW5jZWxsZXIKICAgICAgICAgICAgICAgIC5jYW5jZWxsYWJsZSgocmVzdWx0KSA9PiB7CiAgICAgICAgICAgICAgICBpZiAocmVzdWx0LmNhbmNlbGxlZCkgewogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGNvbnN0IG1haW5JbWFnZUNvbnRhaW5lciA9IHRoaXMuJCQoJyNtYWluLWltYWdlLWNvbnRhaW5lcicpOwogICAgICAgICAgICAgICAgbWFpbkltYWdlQ29udGFpbmVyLnRleHRDb250ZW50ID0gJyc7CiAgICAgICAgICAgICAgICBkb20obWFpbkltYWdlQ29udGFpbmVyKS5hcHBlbmRDaGlsZChpbWcpOwogICAgICAgICAgICAgICAgdGhpcy5zZXQoJ19pc0ltYWdlTG9hZGluZycsIGZhbHNlKTsKICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgIC5iaW5kKHRoaXMpOwogICAgICAgICAgICBpbWcuc3R5bGUuZmlsdGVyID0gYG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BvZiBkb3R0ZWQgbGluZSBpbnNpZGUgYnV0dG9uLiAqLwogICAgICBidXR0b246Oi1tb3otZm9jdXMtaW5uZXIgewogICAgICAgIGJvcmRlcjogMDsKICAgICAgICBwYWRkaW5nOiAwOwogICAgICB9CgogICAgICAvKiogRmlyZWZveDogU2ltdWxhdGUgQ2hyb21lJ3Mgb3V0ZXIgZ2xvdyBvbiBidXR0b24gd2hlbiBmb2N1c2VkLiAqLwogICAgICBidXR0b246LW1vei1mb2N1c3JpbmcgewogICAgICAgIG91dGxpbmU6IG5vbmU7CiAgICAgICAgYm94LXNoYWRvdzogMHB4IDBweCAxcHggMnB4IEhpZ2hsaWdodDsKICAgICAgfQoKICAgICAgOmhvc3QgewogICAgICAgIGRpc3BsYXk6IGJsb2NrOwogICAgICAgIHdpZHRoOiAzNTBweDsKICAgICAgICBoZWlnaHQ6IGF1dG87CiAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlOwogICAgICAgIG1hcmdpbjogMCAxNXB4IDQwcHggMDsKICAgICAgICBvdmVyZmxvdy14OiBhdXRvOwogICAgICB9CgogICAgICAvKiogV2hlbiBhY3R1YWwgc2l6ZSBzaG93biBpcyBvbiwgdXNlIHRoZSBhY3R1YWwgaW1hZ2Ugd2lkdGguICovCiAgICAgIDpob3N0KFthY3R1YWwtc2l6ZV0pIHsKICAgICAgICBtYXgtd2lkdGg6IDEwMCU7CiAgICAgICAgd2lkdGg6IGF1dG87CiAgICAgIH0KCiAgICAgIDpob3N0KFthY3R1YWwtc2l6ZV0pICNtYWluLWltYWdlLWNvbnRhaW5lciB7CiAgICAgICAgbWF4LWhlaWdodDogbm9uZTsKICAgICAgICB3aWR0aDogYXV0bzsKICAgICAgfQoKICAgICAgOmhvc3QoW2FjdHVhbC1zaXplXSkgI21haW4taW1hZ2UtY29udGFpbmVyIGltZyB7CiAgICAgICAgd2lkdGg6IGF1dG87CiAgICAgIH0KCiAgICAgIHBhcGVyLXNwaW5uZXItbGl0ZSB7CiAgICAgIC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c3Ryb25nKTsKICAgICAgICAtLXBhcGVyLXNsaWRlci1tYXJrZXJzLWNvbG9yOiB2YXIoLS10Yi1vcmFuZ2Utc3Ryb25nKTsKICAgICAgICAtLXBhcGVyLXNsaWRlci1waW4tY29sb3I6IHZhcigtLXRiLW9yYW5nZS1zdHJvbmcpOwogICAgICAgIC0tcGFwZXItc2xpZGVyLXBpbi1zdGFydC1jb2xvcjogdmFyKC0tdGItb3JhbmdlLXN0cm9uZyk7CiAgICAgIH0KCiAgICAgICNtYWluLWltYWdlLWNvbnRhaW5lciB7CiAgICAgICAgbWF4LWhlaWdodDogMTAyNHB4OwogICAgICAgIG92ZXJmbG93OiBhdXRvOwogICAgICB9CgogICAgICAjbWFpbi1pbWFnZS1jb250YWluZXIgaW1nIHsKICAgICAgICBjdXJzb3I6IHBvaW50ZXI7CiAgICAgICAgZGlzcGxheTogYmxvY2s7CiAgICAgICAgaW1hZ2UtcmVuZGVyaW5nOiAtbW96LWNyaXNwLWVkZ2VzOwogICAgICAgIGltYWdlLXJlbmRlcmluZzogcGl4ZWxhdGVkOwogICAgICAgIHdpZHRoOiAxMDAlOwogICAgICAgIGhlaWdodDogYXV0bzsKICAgICAgfQoKICAgICAgcGFwZXItaWNvbi1idXR0b24gewogICAgICAgIGNvbG9yOiAjMjE5NmYzOwogICAgICAgIGJvcmRlci1yYWRpdXM6IDEwMCU7CiAgICAgICAgd2lkdGg6IDMycHg7CiAgICAgICAgaGVpZ2h0OiAzMnB4OwogICAgICAgIHBhZGRpbmc6IDRweDsKICAgICAgfQogICAgICBwYXBlci1pY29uLWJ1dHRvbltzZWxlY3RlZF0gewogICAgICAgIGJhY2tncm91bmQ6IHZhcigtLXRiLXVpLWxpZ2h0LWFjY2VudCk7CiAgICAgIH0KICAgICAgW2hpZGRlbl0gewogICAgICAgIGRpc3BsYXk6IG5vbmU7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgYDsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR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gIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgT2JqZWN0KQogICAgXSwgVGZJbWFnZUxvYWRlci5wcm90b3R5cGUsICJfaW1hZ2VDYW5jZWxsZXIiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBBcnJheSwKICAgICAgICAgICAgbm90aWZ5OiB0cnVlLAogICAgICAgIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgQXJyYXkpCiAgICBdLCBUZkltYWdlTG9hZGVyLnByb3RvdHlwZSwgIl9zdGVwcyIsIHZvaWQgMCk7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7CiAgICAgICAgICAgIHR5cGU6IE51bWJlciwKICAgICAgICAgICAgbm90aWZ5OiB0cnVlLAogICAgICAgIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgTnVtYmVyKQogICAgXSwgVGZJbWFnZUxvYWRlci5wcm90b3R5cGUsICJfc3RlcEluZGV4Iiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsKICAgICAgICAgICAgdHlwZTogQm9vbGVhbiwKICAgICAgICB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHlwZSIsIEJvb2xlYW4pCiAgICBdLCBUZkltYWdlTG9hZGVyLnByb3RvdHlwZSwgIl9pc0ltYWdlTG9hZGluZyIsIHZvaWQgMCk7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBjb21wdXRlZCgncnVuJyksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBTdHJpbmcpLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjpwYXJhbXR5cGVzIiwgW10pCiAgICBdLCBUZkltYWdlTG9hZGVyLnByb3RvdHlwZSwgIl9ydW5Db2xvciI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WFuYWdlcigpOwogICAgICAgIH0KICAgICAgICByZWFkeSgpIHsKICAgICAgICAgICAgc3VwZXIucmVhZHkoKTsKICAgICAgICAgICAgaWYgKHRoaXMucmVsb2FkT25SZWFkeSkKICAgICAgICAgICAgICAgIHRoaXMucmVsb2FkKCk7CiAgICAgICAgfQogICAgICAgIHJlbG9hZCgpIHsKICAgICAgICAgICAgdGhpcy5fZmV0Y2hUYWdzKCkudGhlbigoKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLl9yZWxvYWRJbWFnZXMoKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIF9mZXRjaFRhZ3MoKSB7CiAgICAgICAgICAgIGNvbnN0IHVybCA9IGdldFJvdXRlcigpLnBsdWdpblJvdXRlKCdpbWFnZXMnLCAnL3RhZ3MnKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3JlcXVlc3RNYW5hZ2VyLnJlcXVlc3QodXJsKS50aGVuKChydW5Ub1RhZ0luZm8pID0+IHsKICAgICAgICAgICAgICAgIGlmIChsb2Rhc2guaXNFcXVhbChydW5Ub1RhZ0luZm8sIHRoaXMuX3J1blRvVGFnSW5mbykpIHsKICAgICAgICAgICAgICAgICAgICAvLyBObyBuZWVkIHRvIHVwZGF0ZSBhbnl0aGluZyBpZiB0aGVyZSBhcmUgbm8gY2hhbmdlcy4KICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjb25zdCBydW5Ub1RhZyA9IGxvZGFzaC5tYXBWYWx1ZXMocnVuVG9UYWdJbmZvLCAoeCkgPT4gT2JqZWN0LmtleXMoeCkpOwogICAgICAgICAgICAgICAgY29uc3QgdGFncyA9IGdldFRhZ3MocnVuVG9UYWcpOwogICAgICAgICAgICAgICAgdGhpcy5zZXQoJ19kYXRhTm90Rm91bmQnLCB0YWdzLmxlbmd0aCA9PT0gMCk7CiAgICAgICAgICAgICAgICB0aGlzLnNldCgnX3J1blRvVGFnSW5mbycsIHJ1blRvVGFnSW5mbyk7CiAgICAgICAgICAgICAgICB0aGlzLmFzeW5jKCgpID0+IHsKICAgICAgICAgICAgICAgICAgICAvLyBTZWUgdGhlIGNvbW1lbnQgYWJvdmUgYF9jYXRlZ29yaWVzRG9tUmVhZHlgLgogICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0KCdfY2F0ZWdvcmllc0RvbVJlYWR5JywgdHJ1ZSk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIF9yZWxvYWRJbWFnZXMoKSB7CiAgICAgICAgICAgIHRoaXMucm9vdC5xdWVyeVNlbGVjdG9yQWxsKCd0Zi1pbWFnZS1sb2FkZXInKS5mb3JFYWNoKChpbWFnZSkgPT4gewogICAgICAgICAgICAgICAgaW1hZ2UucmVsb2FkKCk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICBfc2hvdWxkT3BlbihpbmRleCkgewogICAgICAgICAgICByZXR1cm4gaW5kZXggPD0gMjsKICAgICAgICB9CiAgICAgICAgX3Jlc2V0QnJpZ2h0bmVzcygpIHsKICAgICAgICAgICAgdGhpcy5fYnJpZ2h0bmVzc0FkanVzdG1lbnQgPSB0aGlzLl9kZWZhdWx0QnJpZ2h0bmVzc0FkanVzdG1lbnQ7CiAgICAgICAgfQogICAgICAgIF9yZXNldENvbnRyYXN0KCkgewogICAgICAgICAgICB0aGlzLl9jb250cmFzdFBlcmNlbnRhZ2UgPSB0aGlzLl9kZWZhdWx0Q29udHJhc3RQZXJjZW50YWdlOwogICAgICAgIH0KICAgICAgICBnZXQgX2JyaWdodG5lc3NJc0RlZmF1bHQoKSB7CiAgICAgICAgICAgIHZhciBicmlnaHRuZXNzQWRqdXN0bWVudCA9IHRoaXMuX2JyaWdodG5lc3NBZGp1c3RtZW50OwogICAgICAgICAgICByZXR1cm4gYnJpZ2h0bmVzc0FkanVzdG1lbnQgPT09IHRoaXMuX2RlZmF1b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bSwgewogICAgICAgICAgICAgICAgICAgIHNhbXBsZTogaSwKICAgICAgICAgICAgICAgICAgICBvZlNhbXBsZXM6IHNhbXBsZXMsCiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY29uc3Qgd2l0aFNhbXBsZXMgPSBiYXNlQ2F0ZWdvcmllcy5tYXAoKGNhdGVnb3J5KSA9PiBPYmplY3QuYXNzaWduKHt9LCBjYXRlZ29yeSwgewogICAgICAgICAgICAgICAgaXRlbXM6IFtdLmNvbmNhdC5hcHBseShbXSwgY2F0ZWdvcnkuaXRlbXMubWFwKGV4cGxvZGVJdGVtKSksCiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgcmV0dXJuIHdpdGhTYW1wbGVzOwogICAgICAgIH0KICAgICAgICBfdGFnTWV0YWRhdGEocnVuVG9UYWdJbmZvLCBydW4sIHRhZykgewogICAgICAgICAgICByZXR1cm4gcnVuVG9UYWdJbmZvW3J1bl1bdGFnXTsKICAgICAgICB9CiAgICB9OwogICAgVGZJbWFnZURhc2hib2FyZC50ZW1wbGF0ZSA9IGh0bWwgYAogICAgPHRmLWRhc2hib2FyZC1sYXlvdXQ+CiAgICAgIDxkaXYgY2xhc3M9InNpZGViYXIiIHNsb3Q9InNpZGViYXIiPgogICAgICAgIDxkaXYgY2xhc3M9InNldHRpbmdzIj4KICAgICAgICAgIDxkaXYgY2xhc3M9InNpZGViYXItc2VjdGlvbiI+CiAgICAgICAgICAgIDxkaXYgY2xhc3M9ImxpbmUtaXRlbSI+CiAgICAgICAgICAgICAgPHBhcGVyLWNoZWNrYm94IGNoZWNrZWQ9Int7X2FjdHVhbFNpemV9fSIKICAgICAgICAgICAgICAgID5TaG93IGFjdHVhbCBpbWFnZSBzaXplPC9wYXBlci1jaGVja2JveAogICAgICAgICAgICAgID4KICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICA8L2Rpdj4KICAgICAgICAgIDxkaXYgY2xhc3M9InNpZGViYXItc2VjdGlvbiI+CiAgICAgICAgICAgIDxoMyBjbGFzcz0idG9vbHRpcC1jb250YWluZXIiPkJyaWdodG5lc3MgYWRqdXN0bWVudDwvaDM+CiAgICAgICAgICAgIDxkaXYgY2xhc3M9InJlc2V0dGFibGUtc2xpZGVyLWNvbnRhaW5lciI+CiAgICAgICAgICAgICAgPHBhcGVyLXNsaWRlcgogICAgICAgICAgICAgICAgbWluPSIwIgogICAgICAgICAgICAgICAgbWF4PSIyIgogICAgICAgICAgICAgICAgc25hcHMKICAgICAgICAgICAgICAgIHBpbgogICAgICAgICAgICAgICAgc3RlcD0iMC4wMSIKICAgICAgICAgICAgICAgIHZhbHVlPSJ7e19icmlnaHRuZXNzQWRqdXN0bWVudH19IgogICAgICAgICAgICAgICAgaW1tZWRpYXRlLXZhbHVlPSJ7e19icmlnaHRuZXNzQWRqdXN0bWVudH19IgogICAgICAgICAgICAgID48L3BhcGVyLXNsaWRlcj4KICAgICAgICAgICAgICA8cGFwZXItYnV0dG9uCiAgICAgICAgICAgICAgICBjbGFzcz0ieC1idXR0b24iCiAgICAgICAgICAgICAgICBvbi10YXA9Il9yZXNldEJyaWdodG5lc3MiCiAgICAgICAgICAgICAgICBkaXNhYmxlZD0iW1tfYnJpZ2h0bmVzc0lzRGVmYXVsdF1dIgogICAgICAgICAgICAgICAgPlJlc2V0PC9wYXBlci1idXR0b24KICAgICAgICAgICAgICA+CiAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgPC9kaXY+CiAgICAgICAgICA8ZGl2IGNsYXNzPSJzaWRlYmFyLXNlY3Rpb24iPgogICAgICAgICAgICA8aDMgY2xhc3M9InRvb2x0aXAtY29udGFpbmVyIj5Db250cmFzdCBhZGp1c3RtZW50PC9oMz4KICAgICAgICAgICAgPGRpdiBjbGFzcz0icmVzZXR0YWJsZS1zbGlkZXItY29udGFpbmVyIj4KICAgICAgICAgICAgICA8cGFwZXItc2xpZGVyCiAgICAgICAgICAgICAgICBtaW49IjAiCiAgICAgICAgICAgICAgICBtYXg9IjUwMCIKICAgICAgICAgICAgICAgIHNuYXBzCiAgICAgICAgICAgICAgICBwaW4KICAgICAgICAgICAgICAgIHN0ZXA9IjEiCiAgICAgICAgICAgICAgICB2YWx1ZT0ie3tfY29udHJhc3RQZXJjZW50YWdlfX0iCiAgICAgICAgICAgICAgICBpbW1lZGlhdGUtdmFsdWU9Int7X2NvbnRyYXN0UGVyY2VudGFnZX19IgogICAgICAgICAgICAgID48L3BhcGVyLXNsaWRlcj4KICAgICAgICAgICAgICA8cGFwZXItYnV0dG9uCiAgICAgICAgICAgICAgICBjbGFzcz0ieC1idXR0b24iCiAgICAgICAgICAgICAgICBvbi10YXA9Il9yZXNldENvbnRyYXN0IgogICAgICAgICAgICAgICAgZGlzYWJsZWQ9IltbX2NvbnRyYXN0SXNEZWZhdWx0XV0iCiAgICAgICAgICAgICAgICA+UmVzZXQ8L3BhcGVyLWJ1dHRvbgogICAgICAgICAgICAgID4KICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICA8L2Rpdj4KICAgICAgICA8L2Rpdj4KICAgICAgICA8ZGl2IGNsYXNzPSJzaWRlYmFyLXNlY3Rpb24gcnVucy1zZWxlY3RvciI+CiAgICAgICAgICA8dGYtcnVucy1zZWxlY3RvcgogICAgICAgICAgICBpZD0icnVucy1zZWxlY3RvciIKICAgICAgICAgICAgc2VsZWN0ZWQtcnVucz0ie3tfc2VsZWN0ZWRSdW5zfX0iCiAgICAgICAgICA+PC90Zi1ydW5zLXNlbGVjdG9yPgogICAgICAgIDwvZGl2PgogICAgICA8L2Rpdj4KICAgICAgPGRpdiBjbGFzcz0iY2VudGVyIiBzbG90PSJjZW50ZXIiPgogICAgICAgIDx0ZW1wbGF0ZSBpcz0iZG9tLWlmIiBpZj0iW1tfZGF0YU5vdEZvdW5kXV0iPgogICAgICAgICAgPGRpdiBjbGFzcz0ibm8tZGF0YS13YXJuaW5nIj4KICAgICAgICAgICAgPGgzPk5vIGltYWdlIGRhdGEgd2FzIGZvdW5kLjwvaDM+CiAgICAgICAgICAgIDxwPlByb2JhYmxlIGNhdXNlczo8L3A+CiAgICAgICAgICAgIDx1bD4KICAgICAgICAgICAgICA8bGk+WW91IGhhdmVu4oCZdCB3cml0dGVuIGFueSBpbWFnZSBkYXRhIHRvIHlvdXIgZXZlbnQgZmlsZXMuPC9saT4KICAgICAgICAgICAgICA8bGk+VGVuc29yQm9hcmQgY2Fu4oCZdCBmaW5kIHlvdXIgZXZlbnQgZmlsZXMuPC9saT4KICAgICAgICAgICAgPC91bD4KCiAgICAgICAgICAgIDxwPgogICAgICAgICAgICAgIElmIHlvdeKAmXJlIG5ldyB0byB1c2luZyBUZW5zb3JCb2FyZCwgYW5kIHdhbnQgdG8gZmluZCBvdXQgaG93IHRvCiAgICAgICAgICAgICAgYWRkIGRhdGEgYW5kIHNldCB1cCB5b3VyIGV2ZW50IGZpbGVzLCBjaGVjayBvdXQgdGhlCiAgICAgICAgICAgICAgPGEKICAgICAgICAgICAgICAgIGhyZWY9Imh0dHBzOi8vZ2l0aHViLmNvbS90ZW5zb3JmbG93L3RlbnNvcmJvYXJkL2Jsb2IvbWFzdGVyL1JFQURNRS5tZCIKICAgICAgICAgICAgICAgID5SRUFETUU8L2EKICAgICAgICAgICAgICA+CiAgICAgICAgICAgICAgYW5kIHBlcmhhcHMgdGhlCiAgICAgICAgICAgICAgPGEKICAgICAgICAgICAgICAgIGhyZWY9Imh0dHBzOi8vd3d3LnRlbnNvcmZsb3cub3JnL2dldF9zdGFydGVkL3N1bW1hcmllc19hbmRfdGVuc29yYm9hcmQiCiAgICAgICAgICAgICAgICA+VGVuc29yQm9hcmQgdHV0b3JpYWw8L2EKICAgICAgICAgICAgICA+LgogICAgICAgICAgICA8L3A+CgogICAgICAgICAgICA8cD4KICAgICAgICAgICAgICBJZiB5b3UgdGhpbmsgVGVuc29yQm9hcmQgaXMgY29uZmlndXJlZCBwcm9wZXJseSwgcGxlYXNlIHNlZQogICAgICAgICAgICAgIDxhCiAgICAg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1tpdGVtLnRhZ11dIgogICAgICAgICAgICAgICAgICBzYW1wbGU9IltbaXRlbS5zYW1wbGVdXSIKICAgICAgICAgICAgICAgICAgb2Ytc2FtcGxlcz0iW1tpdGVtLm9mU2FtcGxlc11dIgogICAgICAgICAgICAgICAgICB0YWctbWV0YWRhdGE9IltbX3RhZ01ldGFkYXRhKF9ydW5Ub1RhZ0luZm8sIGl0ZW0ucnVuLCBpdGVtLnRhZyldXSIKICAgICAgICAgICAgICAgICAgcmVxdWVzdC1tYW5hZ2VyPSJbW19yZXF1ZXN0TWFuYWdlcl1dIgogICAgICAgICAgICAgICAgICBhY3R1YWwtc2l6ZT0iW1tfYWN0dWFsU2l6ZV1dIgogICAgICAgICAgICAgICAgICBicmlnaHRuZXNzLWFkanVzdG1lbnQ9IltbX2JyaWdodG5lc3NBZGp1c3RtZW50XV0iCiAgICAgICAgICAgICAgICAgIGNvbnRyYXN0LXBlcmNlbnRhZ2U9IltbX2NvbnRyYXN0UGVyY2VudGFnZV1dIgogICAgICAgICAgICAgICAgPjwvdGYtaW1hZ2UtbG9hZGVyPgogICAgICAgICAgICAgIDwvdGVtcGxhdGU+CiAgICAgICAgICAgIDwvdGYtY2F0ZWdvcnktcGFnaW5hdGVkLXZpZXc+CiAgICAgICAgICA8L3RlbXBsYXRlPgogICAgICAgIDwvdGVtcGxhdGU+CiAgICAgIDwvZGl2PgogICAgPC90Zi1kYXNoYm9hcmQtbGF5b3V0PgogICAgPHN0eWxlIGluY2x1ZGU9ImRhc2hib2FyZC1zdHlsZSI+PC9zdHlsZT4KICAgIDxzdHlsZT4KICAgICAgLnJlc2V0dGFibGUtc2xpZGVyLWNvbnRhaW5lciB7CiAgICAgICAgZGlzcGxheTogZmxleDsKICAgICAgfQogICAgICAucmVzZXR0YWJsZS1zbGlkZXItY29udGFpbmVyIHBhcGVyLXNsaWRlciB7CiAgICAgICAgZmxleC1ncm93OiAxOwogICAgICB9CiAgICAgIC5yZXNldHRhYmxlLXNsaWRlci1jb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W5nIHNlcnZlciByZXF1ZXN0LgogICAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgICAqLwogICAgICAgIF9mZXRjaERhdGFCeVN0ZXAocnVuLCB0YWcsIGNvbnRlbnRfdHlwZSwgc2FtcGxlLCBzdGVwLCBtZXNoRGF0YSkgewogICAgICAgICAgICBjb25zdCB1cmwgPSBnZXRSb3V0ZXIoKS5wbHVnaW5Sb3V0ZSgnbWVzaCcsICcvZGF0YScsIG5ldyBVUkxTZWFyY2hQYXJhbXMoewogICAgICAgICAgICAgICAgdGFnLAogICAgICAgICAgICAgICAgcnVuLAogICAgICAgICAgICAgICAgY29udGVudF90eXBlLAogICAgICAgICAgICAgICAgc2FtcGxlOiBTdHJpbmcoc2FtcGxlKSwKICAgICAgICAgICAgICAgIHN0ZXA6IFN0cmluZyhzdGVwKSwKICAgICAgICAgICAgfSkpOwogICAgICAgICAgICBjb25zdCByZXNoYXBlVG8xeE54MyA9IGZ1bmN0aW9uIChkYXRhKSB7CiAgICAgICAgICAgICAgICBjb25zdCBjaGFubmVsc0NvdW50ID0gMzsKICAgICAgICAgICAgICAgIGxldCBpdGVtcyA9IFtdOwogICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBkYXRhLmxlbmd0aCAvIGNoYW5uZWxzQ291bnQ7IGkrKykgewogICAgICAgICAgICAgICAgICAgIGxldCBkYXRhRW50cnkgPSBbXTsKICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBqID0gMDsgaiA8IGNoYW5uZWxzQ291bnQ7IGorKykgewogICAgICAgICAgICAgICAgICAgICAgICBkYXRhRW50cnkucHVzaChkYXRhW2kgKiBjaGFubmVsc0NvdW50ICsgal0pOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBpdGVtcy5wdXNoKGRhdGFFbnRyeSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gaXRlbXM7CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIGNvbnN0IHByb2Nlc3NEYXRhID0gdGhpcy5fY2FuY2VsbGVyLmNhbmNlbGxhYmxlKChyZXNwb25zZSkgPT4gewogICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLmNhbmNlbGxlZCkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBQcm9taXNlLnJlamVjdCh7CiAgICAgICAgICAgICAgICAgICAgICAgIGNvZGU6IEVycm9yQ29kZXMuQ0FOQ0VMTEVELAogICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlOiAnUmVzcG9uc2Ugd2FzIGludmFsaWRhdGVkLicsCiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBsZXQgYnVmZmVyID0gcmVzcG9uc2UudmFsdWU7CiAgICAgICAgICAgICAgICBzd2l0Y2ggKGNvbnRlbnRfdHlwZSkgewogICAgICAgICAgICAgICAgICAgIGNhc2UgJ1ZFUlRFWCc6CiAgICAgICAgICAgICAgICAgICAgICAgIG1lc2hEYXRhLnZlcnRpY2VzID0gcmVzaGFwZVRvMXhOeDMobmV3IEZsb2F0MzJBcnJheShidWZmZXIpKTsKICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgY2FzZSAnRkFDRSc6CiAgICAgICAgICAgICAgICAgICAgICAgIG1lc2hEYXRhLmZhY2VzID0gcmVzaGFwZVRvMXhOeDMobmV3IEludDMyQXJyYXkoYnVmZmVyKSk7CiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgIGNhc2UgJ0NPTE9SJzoKICAgICAgICAgICAgICAgICAgICAgICAgbWVzaERhdGEuY29sb3JzID0gcmVzaGFwZVRvMXhOeDMobmV3IFVpbnQ4QXJyYXkoYnVmZmVyKSk7CiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIG1lc2hEYXRhOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3JlcXVlc3RNYW5hZ2VyCiAgICAgICAgICAgICAgICAuZmV0Y2godXJsLCB7CiAgICAgICAgICAgICAgICBtZXRob2Q6ICdHRVQnLAogICAgICAgICAgICAgICAgaGVhZGVyczogewogICAgICAgICAgICAgICAgICAgIHJlc3BvbnNlVHlwZTogJ2FycmF5YnVmZmVyJywKICAgICAgICAgICAgICAgICAgICBjb250ZW50VHlwZTogQ29udGVudFR5cGVUb0l0ZW1UeXBlW2NvbnRlbnRfdHlwZV0sCiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgLnRoZW4oKHJlc3BvbnNlKSA9PiByZXNwb25zZS5hcnJheUJ1ZmZlcigpKQogICAgICAgICAgICAgICAgLnRoZW4ocHJvY2Vzc0RhdGEpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZXF1ZXN0cyBuZXcgZGF0YSBmb3IgZWFjaCB0eXBlIG9mIG1ldGFkYXRhIGZyb20gdGhlIHNlcnZlci4KICAgICAgICAgKiBNZXRhZGF0YSBjb25zaXN0cyBvZiB3YWxsX3RpbWUsIHN0ZXAsIHRlbnNvciBzaGFwZSwgY29udGVudCB0eXBlIGFuZCBvdGhlcgogICAgICAgICAqIGluZm8sIGJ1dCBub3QgdGVuc29yIGRhdGEgaXRzZWxmLgogICAgICAgICAqIEBwYXJhbSB7IU9iamVjdH0gc3RlcERhdHVtIERpY3Rpb25hcnkgd2l0aCBtZXNoIGRhdGEgZm9yIGEgY3VycmVudCBzdGVwLgogICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBydW4gTmFtZSBvZiB0aGUgcnVuIHRvIGdldCBkYXRhIGZvci4KICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gdGFnIE5hbWUgb2YgdGhlIHR1ZyB0byBnZXQgZGF0YSBmb3IuCiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IHNhbXBsZSBTYW1wbGUgaW5kZXggZnJvbSBhIGJhdGNoIG9mIGRhdGEuCiAgICAgICAgICogQHJldHVybiB7IU9iamVjdH0gSm9pbnQgcHJvbWlzZSBmb3IgYWxsIHJlcXVlc3RzIGJlaW5nIHNlbnQuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKi8KICAgICAgICBmZXRjaERhdGEoc3RlcERhdHVtLCBydW4sIHRhZywgc2FtcGxlKSB7CiAgICAgICAgICAgIGxldCBwcm9taXNlcyA9IFtdOwogICAgICAgICAgICAvLyBNYXAgdG8gcG9wdWxhdGUgd2l0aCBtZXNoIGRhdGEsIGkuZS4gdmVydGljZXMsIGZhY2VzLCBldGMuCiAgICAgICAgICAgIGxldCBtZXNoRGF0YSA9IG5ldyBNYXAoKTsKICAgICAgICAgICAgT2JqZWN0LmtleXMoQ29udGVudFR5cGUpLmZvckVhY2goKGNvbnRlbnRUeXBlKSA9PiB7CiAgICAgICAgICAgICAgICBjb25zdCBjb21wb25lbnQgPSAxIDw8IENvbnRlbnRUeXBlW2NvbnRlbnRUeXBlXTsKICAgICAgICAgICAgICAgIGlmIChzdGVwRGF0dW0uY29tcG9uZW50cyAmIGNvbXBvbmVudCkgewogICAgICAgICAgICAgICAgICAgIHByb21pc2VzLnB1c2godGhpcy5fZmV0Y2hEYXRhQnlTdGVwKHJ1biwgdGFnLCBjb250ZW50VHlwZSwgc2FtcGxlLCBzdGVwRGF0dW0uc3RlcCwgbWVzaERhdGEpKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHJldHVybiBQcm9taXNlLmFsbChwcm9taXNlcyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJlcXVlc3RzIG5ldyBtZXRhZGF0YSBmcm9tIHRoZSBzZXJ2ZXIKICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gcnVuIE5hbWUgb2YgdGhlIHJ1biB0byBnZXQgZGF0YSBmb3IuCiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IHRhZyBOYW1lIG9mIHRoZSB0dWcgdG8gZ2V0IGRhdGEgZm9yLgogICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBzYW1wbGUgU2FtcGxlIGluZGV4IGZyb20gYSBiYXRjaCBvZiBkYXRhLgogICAgICAgICAqICBjb21wbGV0aW9uLgogICAgICAgICAqIEByZXR1cm4geyFPYmplY3R9IFByb21pc2UgZm9yIHJlcXVlc3RlZCBtZXRhZGF0YS4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqLwogICAgICAgIF9mZXRjaE1ldGFkYXRhKHJ1biwgdGFnLCBzYW1wbGUpIHsKICAgICAgICAgICAgdGhpcy5fY2FuY2VsbGVyLmNhbmNlbEFsbCgpOwogICAgICAgICAgICBjb25zdCB1cmwgPSBnZXRSb3V0ZXIoKS5wbHVnaW5Sb3V0ZSgnbWVzaCcsICcvbWVzaGVzJywgbmV3IFVSTFNlYXJjaFBhcmFtcyh7IHRhZywgcnVuLCBzYW1wbGUgfSkpOwogICAgICAgICAgICBjb25zdCByZXF1ZXN0RGF0YSA9IHRoaXMuX2NhbmNlbGxlci5jYW5jZWxsYWJsZSgocmVzcG9uc2UpID0+IHsKICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZS5jYW5jZWxsZWQpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gUHJvbWlzZS5yZWplY3QoewogICAgICAgICAgICAgICAgICAgICAgICBjb2RlOiBFcnJvckNvZGVzLkNBTkNFTExFRCwKICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZTogJ1Jlc3BvbnNlIHdhcyBpbnZhbGlkYXRlZC4nLAogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIHJlc3BvbnNlLnZhbHVlOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3JlcXVlc3RNYW5hZ2VyCiAgICAgICAgICAgICAgICAuZmV0Y2godXJsKQogICAgICAgICAgICAgICAgLnRoZW4oKHJlc3BvbnNlKSA9PiByZXNwb25zZS5qc29uKCkpCiAgICAgICAgICAgICAgICAudGhlbihyZXF1ZXN0RGF0YSkKICAgICAgICAgICAgICAgIC50aGVuKHRoaXMuX3Byb2Nlc3NNZXRhZGF0YS5iaW5kKHRoaXMpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUHJvY2VzcyBzZXJ2ZXIgcmF3IGRhdGEgaW50byBmcm9udGVuZCBmcmllbmRseSBmb3JtYXQuCiAgICAgICAgICogQHBhcmFtIHshQXJyYXl8dW5kZWZpbmVkfSBkYXRhIGxpc3Qgb2YgcmF3IHNlcnZlciByZWNvcmRzLgogICAgICAgICAqIEByZXR1cm4geyFBcnJheX0gbGlzdCBvZiBzdGVwIGRhdHVtcy4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqLwogICAgICAgIF9wcm9jZXNzTWV0YWRhdGEoZGF0YSkgewogICAgICAgICAgICBpZiAoIWRhdGEpCiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIGNvbnN0IHN0ZXBUb0RhdGEgPSBuZXcgTWFwKCk7CiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZGF0YS5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgbGV0IGRhdGFFbnRyeSA9IGRhdGFbaV07CiAgICAgICAgICAgICAgICBpZiAoIXN0ZXBUb0RhdGEuaGFzKGRhdGFFbnRyeS5zdGVwKSkgewogICAgICAgICAgICAgICAgICAgIHN0ZXBUb0RhdGEuc2V0KGRhdGFFbnRyeS5zdGVwLCBbXSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBzdGVwVG9EYXRhLmdldChkYXRhRW50cnkuc3RlcCkucHVzaChkYXRhRW50cnkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGxldCBkYXR1bXMgPSBbXTsKICAgICAgICAgICAgc3RlcFRvRGF0YS5mb3JFYWNoKChkYXRhKSA9PiB7CiAgICAgICAgICAgICAgICBsZXQgZGF0dW0gPSB0aGlzLl9jcmVhdGVTdGVwRGF0dW0oZGF0YVswXSk7CiAgICAgICAgICAgICAgICBkYXR1bXMucHVzaChkYXR1bSk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICByZXR1cm4gZGF0dW1zOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBQcm9jZXNzIHNpbmdsZSByb3cgb2Ygc2VydmVyLXNpZGUgZGF0YSBhbmQgcHV0cyBpdCBpbiBtb3JlIHN0cnVjdHVyZWQgZm9ybS4KICAgICAgICAgKiBAcGFyYW0geyFPYmplY3R9IG1ldGFkYXRhIE9iamVjdCBkZXNjcmliaW5nIHN0ZXAgc3VtbWFyeS4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4geyFPYmplY3R9IHdpdGggd2FsbF90aW1lLCBzdGVwIG51bWJlciBhbmQgZGF0YSBmb3IgdGhlIHN0ZXAuCiAgICAgICAgICovCiAgICAgICAgX2NyZWF0ZVN0ZXBEYXR1bShtZXRhZGF0YSkgewogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgLy8gVGhlIHdhbGwgdGltZSB3aXRoaW4gdGhlIG1ldGFkYXRhIGlzIGluIHNlY29uZHMuIFRoZSBEYXRlCiAgICAgICAgICAgICAgICAvLyBjb25zdHJ1Y3RvciBhY2NlcHRzIGEgdGltZSBpbiBtaWxsaXNlY29uZHMsIHNvIHdlIG11bHRpcGx5IGJ5IDEwMDAuCiAgICAgICAgICAgICAgICB3YWxsX3RpbWU6IG5ldyBEYXRlKG1ldGFkYXRhLndhbGxfdGltZSAqIDEwMDApLAogICAgICAgICAgICAgICAgc3RlcDogbWV0YWRhdGEuc3RlcCwKICAgICAgICAgICAgICAgIGNvbmZpZzogbWV0YWRhdGEuY29uZml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gbSApICsgbSApICUgbTsKCiAgICAJfSwKCiAgICAJLy8gTGluZWFyIG1hcHBpbmcgZnJvbSByYW5nZSA8YTEsIGEyPiB0byByYW5nZSA8YjEsIGIyPgoKICAgIAltYXBMaW5lYXI6IGZ1bmN0aW9uICggeCwgYTEsIGEyLCBiMSwgYjIgKSB7CgogICAgCQlyZXR1cm4gYjEgKyAoIHggLSBhMSApICogKCBiMiAtIGIxICkgLyAoIGEyIC0gYTEgKTsKCiAgICAJfSwKCiAgICAJLy8gaHR0cHM6Ly9lbi53aWtpcGVkaWEub3JnL3dpa2kvTGluZWFyX2ludGVycG9sYXRpb24KCiAgICAJbGVycDogZnVuY3Rpb24gKCB4LCB5LCB0ICkgewoKICAgIAkJcmV0dXJuICggMSAtIHQgKSAqIHggKyB0ICogeTsKCiAgICAJfSwKCiAgICAJLy8gaHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9TbW9vdGhzdGVwCgogICAgCXNtb290aHN0ZXA6IGZ1bmN0aW9uICggeCwgbWluLCBtYXggKSB7CgogICAgCQlpZiAoIHggPD0gbWluICkgcmV0dXJuIDA7CiAgICAJCWlmICggeCA+PSBtYXggKSByZXR1cm4gMTsKCiAgICAJCXggPSAoIHggLSBtaW4gKSAvICggbWF4IC0gbWluICk7CgogICAgCQlyZXR1cm4geCAqIHggKiAoIDMgLSAyICogeCApOwoKICAgIAl9LAoKICAgIAlzbW9vdGhlcnN0ZXA6IGZ1bmN0aW9uICggeCwgbWluLCBtYXggKSB7CgogICAgCQlpZiAoIHggPD0gbWluICkgcmV0dXJuIDA7CiAgICAJCWlmICggeCA+PSBtYXggKSByZXR1cm4gMTsKCiAgICAJCXggPSAoIHggLSBtaW4gKSAvICggbWF4IC0gbWluICk7CgogICAgCQlyZXR1cm4geCAqIHggKiB4ICogKCB4ICogKCB4ICogNiAtIDE1ICkgKyAxMCApOwoKICAgIAl9LAoKICAgIAkvLyBSYW5kb20gaW50ZWdlciBmcm9tIDxsb3csIGhpZ2g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gICAJCXRoaXMueCAvPSB2Lng7CiAgICAJCXRoaXMueSAvPSB2Lnk7CgogICAgCQlyZXR1cm4gdGhpczsKCiAgICAJfSwKCiAgICAJZGl2aWRlU2NhbGFyOiBmdW5jdGlvbiAoIHNjYWxhciApIHsKCiAgICAJCXJldHVybiB0aGlzLm11bHRpcGx5U2NhbGFyKCAxIC8gc2NhbGFyICk7CgogICAgCX0sCgogICAgCWFwcGx5TWF0cml4MzogZnVuY3Rpb24gKCBtICkgewoKICAgIAkJdmFyIHggPSB0aGlzLngsIHkgPSB0aGlzLnk7CiAgICAJCXZhciBlID0gbS5lbGVtZW50czsKCiAgICAJCXRoaXMueCA9IGVbIDAgXSAqIHggKyBlWyAzIF0gKiB5ICsgZVsgNiBdOwogICAgCQl0aGlzLnkgPSBlWyAxIF0gKiB4ICsgZVsgNCBdICogeSArIGVbIDcgXTsKCiAgICAJCXJldHVybiB0aGlzOwoKICAgIAl9LAoKICAgIAltaW46IGZ1bmN0aW9uICggdiApIHsKCiAgICAJCXRoaXMueCA9IE1hdGgubWluKCB0aGlzLngsIHYueCApOwogICAgCQl0aGlzLnkgPSBNYXRoLm1pbiggdGhpcy55LCB2LnkgKTsKCiAgICAJCXJldHVybiB0aGlzOwoKICAgIAl9LAoKICAgIAltYXg6IGZ1bmN0aW9uICggdiApIHsKCiAgICAJCXRoaXMueCA9IE1hdGgubWF4KCB0aGlzLngsIHYueCApOwogICAgCQl0aGlzLnkgPSBNYXRoLm1heCggdGhpcy55LCB2LnkgKTsKCiAgICAJCXJldHVybiB0aGlzOwoKICAgIAl9LAoKICAgIAljbGFtcDogZnVuY3Rpb24gKCBtaW4sIG1heCApIHsKCiAgICAJCS8vIGFzc3VtZXMgbWluIDwgbWF4LCBjb21wb25lbnR3aXNlCgogICAgCQl0aGlzLnggPSBNYXRoLm1heCggbWluLngsIE1hdGgubWluKCBtYXgueCwgdGhpcy54ICkgKTsKICAgIAkJdGhpcy55ID0gTWF0aC5tYXgoIG1pbi55LCBN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fdyA9IGMxICogYzIgKiBjMyArIHMxICogczIgKiBzMzsKCiAgICAJCX0gZWxzZSBpZiAoIG9yZGVyID09PSAnWlhZJyApIHsKCiAgICAJCQl0aGlzLl94ID0gczEgKiBjMiAqIGMzIC0gYzEgKiBzMiAqIHMzOwogICAgCQkJdGhpcy5feSA9IGMxICogczIgKiBjMyArIHMxICogYzIgKiBzMzsKICAgIAkJCXRoaXMuX3ogPSBjMSAqIGMyICogczMgKyBzMSAqIHMyICogYzM7CiAgICAJCQl0aGlzLl93ID0gYzEgKiBjMiAqIGMzIC0gczEgKiBzMiAqIHMzOwoKICAgIAkJfSBlbHNlIGlmICggb3JkZXIgPT09ICdaWVgnICkgewoKICAgIAkJCXRoaXMuX3ggPSBzMSAqIGMyICogYzMgLSBjMSAqIHMyICogczM7CiAgICAJCQl0aGlzLl95ID0gYzEgKiBzMiAqIGMzICsgczEgKiBjMiAqIHMzOwogICAgCQkJdGhpcy5feiA9IGMxICogYzIgKiBzMyAtIHMxICogczIgKiBjMzsKICAgIAkJCXRoaXMuX3cgPSBjMSAqIGMyICogYzMgKyBzMSAqIHMyICogczM7CgogICAgCQl9IGVsc2UgaWYgKCBvcmRlciA9PT0gJ1laWCcgKSB7CgogICAgCQkJdGhpcy5feCA9IHMxICogYzIgKiBjMyArIGMxICogczIgKiBzMzsKICAgIAkJCXRoaXMuX3kgPSBjMSAqIHMyICogYzMgKyBzMSAqIGMyICogczM7CiAgICAJCQl0aGlzLl96ID0gYzEgKiBjMiAqIHMzIC0gczEgKiBzMiAqIGMzOwogICAgCQkJdGhpcy5fdyA9IGMxICogYzIgKiBjMyAtIHMxICogczIgKiBzMzsKCiAgICAJCX0gZWxzZSBpZiAoIG9yZGVyID09PSAnWFpZJyApIHsKCiAgICAJCQl0aGlzLl94ID0gczEgKiBjMiAqIGMzIC0gYzEgKiBzMiAqIHMzOwogICAgCQkJdGhpcy5feSA9IGMxICogczIgKiBjMyAtIHMxICogYzIgKiBzMzsKICAgIAkJCXRo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oKICAgIAkJcmV0dXJuIHRoaXM7CgogICAgCX0sCgogICAgCWFkZFNjYWxhcjogZnVuY3Rpb24gKCBzICkgewoKICAgIAkJdGhpcy54ICs9IHM7CiAgICAJCXRoaXMueSArPSBzOwogICAgCQl0aGlzLnogKz0gczsKCiAgICAJCXJldHVybiB0aGlzOwoKICAgIAl9LAoKICAgIAlhZGRWZWN0b3JzOiBmdW5jdGlvbiAoIGEsIGIgKSB7CgogICAgCQl0aGlzLnggPSBhLnggKyBiLng7CiAgICAJCXRoaXMueSA9IGEueSArIGIueTsKICAgIAkJdGhpcy56ID0gYS56ICsgYi56OwoKICAgIAkJcmV0dXJuIHRoaXM7CgogICAgCX0sCgogICAgCWFkZFNjYWxlZFZlY3RvcjogZnVuY3Rpb24gKCB2LCBzICkgewoKICAgIAkJdGhpcy54ICs9IHYueCAqIHM7CiAgICAJCXRoaXMueSArPSB2LnkgKiBzOwogICAgCQl0aGlzLnogKz0gdi56ICogczsKCiAgICAJCXJldHVybiB0aGlzOwoKICAgIAl9LAoKICAgIAlzdWI6IGZ1bmN0aW9uICggdiwgdyApIHsKCiAgICAJCWlmICggdyAhPT0gdW5kZWZpbmVkICkgewoKICAgIAkJCWNvbnNvbGUud2FybiggJ1RIUkVFLlZlY3RvcjM6IC5zdWIoKSBub3cgb25seSBhY2NlcHRzIG9uZSBhcmd1bWVudC4gVXNlIC5zdWJWZWN0b3JzKCBhLCBiICkgaW5zdGVhZC4nICk7CiAgICAJCQlyZXR1cm4gdGhpcy5zdWJWZWN0b3JzKCB2LCB3ICk7CgogICAgCQl9CgogICAgCQl0aGlzLnggLT0gdi54OwogICAgCQl0aGlzLnkgLT0gdi55OwogICAgCQl0aGlzLnogLT0gdi56OwoKICAgIAkJcmV0dXJuIHRoaXM7CgogICAgCX0sCgogICAgCXN1YlNjYWxhcjogZnVuY3Rpb24gKCBzICkgewoKICAgIAkJdGhpcy54IC09IHM7CiAgICAJCXRoaXMueSAtPSBzOwogICAgCQl0aGlzLnogL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l0aGlzLnggLz0gdi54OwogICAgCQl0aGlzLnkgLz0gdi55OwogICAgCQl0aGlzLnogLz0gdi56OwoKICAgIAkJcmV0dXJuIHRoaXM7CgogICAgCX0sCgogICAgCWRpdmlkZVNjYWxhcjogZnVuY3Rpb24gKCBzY2FsYXIgKSB7CgogICAgCQlyZXR1cm4gdGhpcy5tdWx0aXBseVNjYWxhciggMSAvIHNjYWxhciApOwoKICAgIAl9LAoKICAgIAltaW46IGZ1bmN0aW9uICggdiApIHsKCiAgICAJCXRoaXMueCA9IE1hdGgubWluKCB0aGlzLngsIHYueCApOwogICAgCQl0aGlzLnkgPSBNYXRoLm1pbiggdGhpcy55LCB2LnkgKTsKICAgIAkJdGhpcy56ID0gTWF0aC5taW4oIHRoaXMueiwgdi56ICk7CgogICAgCQlyZXR1cm4gdGhpczsKCiAgICAJfSwKCiAgICAJbWF4OiBmdW5jdGlvbiAoIHYgKSB7CgogICAgCQl0aGlzLnggPSBNYXRoLm1heCggdGhpcy54LCB2LnggKTsKICAgIAkJdGhpcy55ID0gTWF0aC5tYXgoIHRoaXMueSwgdi55ICk7CiAgICAJCXRoaXMueiA9IE1hdGgubWF4KCB0aGlzLnosIHYueiApOwoKICAgIAkJcmV0dXJuIHRoaXM7CgogICAgCX0sCgogICAgCWNsYW1wOiBmdW5jdGlvbiAoIG1pbiwgbWF4ICkgewoKICAgIAkJLy8gYXNzdW1lcyBtaW4gPCBtYXgsIGNvbXBvbmVudHdpc2UKCiAgICAJCXRoaXMueCA9IE1hdGgubWF4KCBtaW4ueCwgTWF0aC5taW4oIG1heC54LCB0aGlzLnggKSApOwogICAgCQl0aGlzLnkgPSBNYXRoLm1heCggbWluLnksIE1hdGgubWluKCBtYXgueSwgdGhpcy55ICkgKTsKICAgIAkJdGhpcy56ID0gTWF0aC5tYXgoIG1pbi56LCBNYXRoLm1pbiggbWF4LnosIHRoaXMueiApICk7CgogICAgCQlyZXR1cm4gdGhpczsKCiAgICAJfSwKCiAgICAJY2xhbXB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biAoIHYgKSB7CgogICAgCQl0aGlzLnggPSBNYXRoLm1pbiggdGhpcy54LCB2LnggKTsKICAgIAkJdGhpcy55ID0gTWF0aC5taW4oIHRoaXMueSwgdi55ICk7CiAgICAJCXRoaXMueiA9IE1hdGgubWluKCB0aGlzLnosIHYueiApOwogICAgCQl0aGlzLncgPSBNYXRoLm1pbiggdGhpcy53LCB2LncgKTsKCiAgICAJCXJldHVybiB0aGlzOwoKICAgIAl9LAoKICAgIAltYXg6IGZ1bmN0aW9uICggdiApIHsKCiAgICAJCXRoaXMueCA9IE1hdGgubWF4KCB0aGlzLngsIHYueCApOwogICAgCQl0aGlzLnkgPSBNYXRoLm1heCggdGhpcy55LCB2LnkgKTsKICAgIAkJdGhpcy56ID0gTWF0aC5tYXgoIHRoaXMueiwgdi56ICk7CiAgICAJCXRoaXMudyA9IE1hdGgubWF4KCB0aGlzLncsIHYudyApOwoKICAgIAkJcmV0dXJuIHRoaXM7CgogICAgCX0sCgogICAgCWNsYW1wOiBmdW5jdGlvbiAoIG1pbiwgbWF4ICkgewoKICAgIAkJLy8gYXNzdW1lcyBtaW4gPCBtYXgsIGNvbXBvbmVudHdpc2UKCiAgICAJCXRoaXMueCA9IE1hdGgubWF4KCBtaW4ueCwgTWF0aC5taW4oIG1heC54LCB0aGlzLnggKSApOwogICAgCQl0aGlzLnkgPSBNYXRoLm1heCggbWluLnksIE1hdGgubWluKCBtYXgueSwgdGhpcy55ICkgKTsKICAgIAkJdGhpcy56ID0gTWF0aC5tYXgoIG1pbi56LCBNYXRoLm1pbiggbWF4LnosIHRoaXMueiApICk7CiAgICAJCXRoaXMudyA9IE1hdGgubWF4KCBtaW4udywgTWF0aC5taW4oIG1heC53LCB0aGlzLncgKSApOwoKICAgIAkJcmV0dXJuIHRoaXM7CgogICAgCX0sCgogICAgCWNsYW1wU2NhbGFyOiBmdW5jdGlvbiAoIG1pblZhbCwgbWF4VmFsICkgewoKICAgIAkJdGhpcy54ID0gTWF0aC5tYXgoIG1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7CgogICAgCX0sCgogICAgCWxlbmd0aFNxOiBmdW5jdGlvbiAoKSB7CgogICAgCQlyZXR1cm4gdGhpcy54ICogdGhpcy54ICsgdGhpcy55ICogdGhpcy55ICsgdGhpcy56ICogdGhpcy56ICsgdGhpcy53ICogdGhpcy53OwoKICAgIAl9LAoKICAgIAlsZW5ndGg6IGZ1bmN0aW9uICgpIHsKCiAgICAJCXJldHVybiBNYXRoLnNxcnQoIHRoaXMueCAqIHRoaXMueCArIHRoaXMueSAqIHRoaXMueSArIHRoaXMueiAqIHRoaXMueiArIHRoaXMudyAqIHRoaXMudyApOwoKICAgIAl9LAoKICAgIAltYW5oYXR0YW5MZW5ndGg6IGZ1bmN0aW9uICgpIHsKCiAgICAJCXJldHVybiBNYXRoLmFicyggdGhpcy54ICkgKyBNYXRoLmFicyggdGhpcy55ICkgKyBNYXRoLmFicyggdGhpcy56ICkgKyBNYXRoLmFicyggdGhpcy53ICk7CgogICAgCX0sCgogICAgCW5vcm1hbGl6ZTogZnVuY3Rpb24gKCkgewoKICAgIAkJcmV0dXJuIHRoaXMuZGl2aWRlU2NhbGFyKCB0aGlzLmxlbmd0aCgpIHx8IDEgKTsKCiAgICAJfSwKCiAgICAJc2V0TGVuZ3RoOiBmdW5jdGlvbiAoIGxlbmd0aCApIHsKCiAgICAJCXJldHVybiB0aGlzLm5vcm1hbGl6ZSgpLm11bHRpcGx5U2NhbGFyKCBsZW5ndGggKTsKCiAgICAJfSwKCiAgICAJbGVycDogZnVuY3Rpb24gKCB2LCBhbHBoYSApIHsKCiAgICAJCXRoaXMueCArPSAoIHYueCAtIHRoaXMueCApICogYWxwaGE7CiAgICAJCXRoaXMueSArPSAoIHYueSAtIHRoaXMueSApICogYWxwaGE7CiAgICAJCXRoaXMueiArPSAoIHYueiAtIHRoaXMueiApICogYWxwaGE7CiAgICAJCXRoaXMudyArPSAoIHYudyAtIHRoaXMudyApICogYWxwaGE7CgogICAgCQlyZXR1cm4gdGhpczsKCiAgICAJfSwKC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yNCA9IG1lWyAxMyBdLCBuMzQgPSBtZVsgMTQgXSwgbjQ0ID0gbWVbIDE1IF0sCgogICAgCQkJdDExID0gbjIzICogbjM0ICogbjQyIC0gbjI0ICogbjMzICogbjQyICsgbjI0ICogbjMyICogbjQzIC0gbjIyICogbjM0ICogbjQzIC0gbjIzICogbjMyICogbjQ0ICsgbjIyICogbjMzICogbjQ0LAogICAgCQkJdDEyID0gbjE0ICogbjMzICogbjQyIC0gbjEzICogbjM0ICogbjQyIC0gbjE0ICogbjMyICogbjQzICsgbjEyICogbjM0ICogbjQzICsgbjEzICogbjMyICogbjQ0IC0gbjEyICogbjMzICogbjQ0LAogICAgCQkJdDEzID0gbjEzICogbjI0ICogbjQyIC0gbjE0ICogbjIzICogbjQyICsgbjE0ICogbjIyICogbjQzIC0gbjEyICogbjI0ICogbjQzIC0gbjEzICogbjIyICogbjQ0ICsgbjEyICogbjIzICogbjQ0LAogICAgCQkJdDE0ID0gbjE0ICogbjIzICogbjMyIC0gbjEzICogbjI0ICogbjMyIC0gbjE0ICogbjIyICogbjMzICsgbjEyICogbjI0ICogbjMzICsgbjEzICogbjIyICogbjM0IC0gbjEyICogbjIzICogbjM0OwoKICAgIAkJdmFyIGRldCA9IG4xMSAqIHQxMSArIG4yMSAqIHQxMiArIG4zMSAqIHQxMyArIG40MSAqIHQxNDsKCiAgICAJCWlmICggZGV0ID09PSAwICkgewoKICAgIAkJCXZhciBtc2cgPSAiVEhSRUUuTWF0cml4NDogLmdldEludmVyc2UoKSBjYW4ndCBpbnZlcnQgbWF0cml4LCBkZXRlcm1pbmFudCBpcyAwIjsKCiAgICAJCQlpZiAoIHRocm93T25EZWdlbmVyYXRlID09PSB0cnVlICkgewoKICAgIAkJCQl0aHJvdyBuZXcgRXJyb3IoIG1zZyApOwoKICAgIAkJCX0gZWxzZSB7CgogICAgCQkJCWNvbnNvbGUud2FybiggbXNnICk7CgogICAgCQkJfQoKICAgIAkJCXJldHVybiB0aGlzLmlkZW50aXR5KC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iApOwogICAgCQl2YXIgYjEgPSAtIF9kaWZmLmRvdCggX3NlZ0RpciApOwogICAgCQl2YXIgYyA9IF9kaWZmLmxlbmd0aFNxKCk7CiAgICAJCXZhciBkZXQgPSBNYXRoLmFicyggMSAtIGEwMSAqIGEwMSApOwogICAgCQl2YXIgczAsIHMxLCBzcXJEaXN0LCBleHREZXQ7CgogICAgCQlpZiAoIGRldCA+IDAgKSB7CgogICAgCQkJLy8gVGhlIHJheSBhbmQgc2VnbWVudCBhcmUgbm90IHBhcmFsbGVsLgoKICAgIAkJCXMwID0gYTAxICogYjEgLSBiMDsKICAgIAkJCXMxID0gYTAxICogYjAgLSBiMTsKICAgIAkJCWV4dERldCA9IHNlZ0V4dGVudCAqIGRldDsKCiAgICAJCQlpZiAoIHMwID49IDAgKSB7CgogICAgCQkJCWlmICggczEgPj0gLSBleHREZXQgKSB7CgogICAgCQkJCQlpZiAoIHMxIDw9IGV4dERldCApIHsKCiAgICAJCQkJCQkvLyByZWdpb24gMAogICAgCQkJCQkJLy8gTWluaW11bSBhdCBpbnRlcmlvciBwb2ludHMgb2YgcmF5IGFuZCBzZWdtZW50LgoKICAgIAkJCQkJCXZhciBpbnZEZXQgPSAxIC8gZGV0OwogICAgCQkJCQkJczAgKj0gaW52RGV0OwogICAgCQkJCQkJczEgKj0gaW52RGV0OwogICAgCQkJCQkJc3FyRGlzdCA9IHMwICogKCBzMCArIGEwMSAqIHMxICsgMiAqIGIwICkgKyBzMSAqICggYTAxICogczAgKyBzMSArIDIgKiBiMSApICsgYzsKCiAgICAJCQkJCX0gZWxzZSB7CgogICAgCQkJCQkJLy8gcmVnaW9uIDEKCiAgICAJCQkJCQlzMSA9IHNlZ0V4dGVudDsKICAgIAkJCQkJCXMwID0gTWF0aC5tYXgoIDAsIC0gKCBhMDEgKiBzMSArIGIwICkgKTsKICAgIAkJCQkJCXNxckRpc3QgPSAtIHMwICogczAgKyBzMSAqICggczEgKyAyICogYjEgKSArIGM7CgogICAgCQkJCQl9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c3BhdGNoRXZlbnQoIHsgdHlwZTogJ2Rpc3Bvc2UnIH0gKTsKCiAgICAJfQoKICAgIH0gKTsKCiAgICAvKioKICAgICAqIEBhdXRob3IgbXJkb29iIC8gaHR0cDovL21yZG9vYi5jb20vCiAgICAgKiBAYXV0aG9yIGFsdGVyZWRxIC8gaHR0cDovL2FsdGVyZWRxdWFsaWEuY29tLwogICAgICoKICAgICAqIHBhcmFtZXRlcnMgPSB7CiAgICAgKiAgY29sb3I6IDxoZXg+LAogICAgICogIG9wYWNpdHk6IDxmbG9hdD4sCiAgICAgKiAgbWFwOiBuZXcgVEhSRUUuVGV4dHVyZSggPEltYWdlPiApLAogICAgICoKICAgICAqICBsaWdodE1hcDogbmV3IFRIUkVFLlRleHR1cmUoIDxJbWFnZT4gKSwKICAgICAqICBsaWdodE1hcEludGVuc2l0eTogPGZsb2F0PgogICAgICoKICAgICAqICBhb01hcDogbmV3IFRIUkVFLlRleHR1cmUoIDxJbWFnZT4gKSwKICAgICAqICBhb01hcEludGVuc2l0eTogPGZsb2F0PgogICAgICoKICAgICAqICBzcGVjdWxhck1hcDogbmV3IFRIUkVFLlRleHR1cmUoIDxJbWFnZT4gKSwKICAgICAqCiAgICAgKiAgYWxwaGFNYXA6IG5ldyBUSFJFRS5UZXh0dXJlKCA8SW1hZ2U+ICksCiAgICAgKgogICAgICogIGVudk1hcDogbmV3IFRIUkVFLkN1YmVUZXh0dXJlKCBbcG9zeCwgbmVneCwgcG9zeSwgbmVneSwgcG9zeiwgbmVnel0gKSwKICAgICAqICBjb21iaW5lOiBUSFJFRS5NdWx0aXBseSwKICAgICAqICByZWZsZWN0aXZpdHk6IDxmbG9hdD4sCiAgICAgKiAgcmVmcmFjdGlvblJhdGlvOiA8ZmxvYXQ+LAogICAgICoKICAgICAqICBkZXB0aFRlc3Q6IDxib29sPiwKICAgICAqICBkZXB0aFdyaXRlOiA8Ym9vbD4sCiAgICAgKgogICAgICogIHdpcmVmcmFtZTogPGJvb2xlYW4+L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uODcKICAgICAqIEBhdXRob3IgbXJkb29iIC8gaHR0cDovL21yZG9vYi5jb20vCiAgICAgKgogICAgICogVW5pZm9ybXMgb2YgYSBwcm9ncmFtLgogICAgICogVGhvc2UgZm9ybSBhIHRyZWUgc3RydWN0dXJlIHdpdGggYSBzcGVjaWFsIHRvcC1sZXZlbCBjb250YWluZXIgZm9yIHRoZSByb290LAogICAgICogd2hpY2ggeW91IGdldCBieSBjYWxsaW5nICduZXcgV2ViR0xVbmlmb3JtcyggZ2wsIHByb2dyYW0gKScuCiAgICAgKgogICAgICoKICAgICAqIFByb3BlcnRpZXMgb2YgaW5uZXIgbm9kZXMgaW5jbHVkaW5nIHRoZSB0b3AtbGV2ZWwgY29udGFpbmVyOgogICAgICoKICAgICAqIC5zZXEgLSBhcnJheSBvZiBuZXN0ZWQgdW5pZm9ybXMKICAgICAqIC5tYXAgLSBuZXN0ZWQgdW5pZm9ybXMgYnkgbmFtZQogICAgICoKICAgICAqCiAgICAgKiBNZXRob2RzIG9mIGFsbCBub2RlcyBleGNlcHQgdGhlIHRvcC1sZXZlbCBjb250YWluZXI6CiAgICAgKgogICAgICogLnNldFZhbHVlKCBnbCwgdmFsdWUsIFt0ZXh0dXJlc10gKQogICAgICoKICAgICAqIAkJdXBsb2FkcyBhIHVuaWZvcm0gdmFsdWUocykKICAgICAqICAJdGhlICd0ZXh0dXJlcycgcGFyYW1ldGVyIGlzIG5lZWRlZCBmb3Igc2FtcGxlciB1bmlmb3JtcwogICAgICoKICAgICAqCiAgICAgKiBTdGF0aWMgbWV0aG9kcyBvZiB0aGUgdG9wLWxldmVsIGNvbnRhaW5lciAodGV4dHVyZXMgZmFjdG9yaXphdGlvbnMpOgogICAgICoKICAgICAqIC51cGxvYWQoIGdsLCBzZXEsIHZhbHVlcywgdGV4dHVyZXMgKQogICAgICoKICAgICAqIAkJc2V0cyB1bmlmb3JtcyBpbiAnc2VxJyB0byAndmFsdWVzW2lkXS52YWx1ZScKICAgICAqCiAgICAgKiA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wogICAgCQkJdmVydGV4LnogPSB0dWJlICogTWF0aC5zaW4oIHYgKTsKCiAgICAJCQl2ZXJ0aWNlcy5wdXNoKCB2ZXJ0ZXgueCwgdmVydGV4LnksIHZlcnRleC56ICk7CgogICAgCQkJLy8gbm9ybWFsCgogICAgCQkJY2VudGVyLnggPSByYWRpdXMgKiBNYXRoLmNvcyggdSApOwogICAgCQkJY2VudGVyLnkgPSByYWRpdXMgKiBNYXRoLnNpbiggdSApOwogICAgCQkJbm9ybWFsLnN1YlZlY3RvcnMoIHZlcnRleCwgY2VudGVyICkubm9ybWFsaXplKCk7CgogICAgCQkJbm9ybWFscy5wdXNoKCBub3JtYWwueCwgbm9ybWFsLnksIG5vcm1hbC56ICk7CgogICAgCQkJLy8gdXYKCiAgICAJCQl1dnMucHVzaCggaSAvIHR1YnVsYXJTZWdtZW50cyApOwogICAgCQkJdXZzLnB1c2goIGogLyByYWRpYWxTZWdtZW50cyApOwoKICAgIAkJfQoKICAgIAl9CgogICAgCS8vIGdlbmVyYXRlIGluZGljZXMKCiAgICAJZm9yICggaiA9IDE7IGogPD0gcmFkaWFsU2VnbWVudHM7IGogKysgKSB7CgogICAgCQlmb3IgKCBpID0gMTsgaSA8PSB0dWJ1bGFyU2VnbWVudHM7IGkgKysgKSB7CgogICAgCQkJLy8gaW5kaWNlcwoKICAgIAkJCXZhciBhID0gKCB0dWJ1bGFyU2VnbWVudHMgKyAxICkgKiBqICsgaSAtIDE7CiAgICAJCQl2YXIgYiA9ICggdHVidWxhclNlZ21lbnRzICsgMSApICogKCBqIC0gMSApICsgaSAtIDE7CiAgICAJCQl2YXIgYyA9ICggdHVidWxhclNlZ21lbnRzICsgMSApICogKCBqIC0gMSApICsgaTsKICAgIAkJCXZhciBkID0gKCB0dWJ1bGFyU2VnbWVudHMgKyAxICkgKiBqICsgaTsKCiAgICAJCQkvLyBmYWNlcwoKICAgIAkJCWluZGljZXMucHVzaCggYSwgYiwgZCApOwogICAgCQkJaW5kaWNlcy5wd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XJldHVybiBtOwoKICAgIH0KCiAgICAvLyBpbnRlcmxpbmsgcG9seWdvbiBub2RlcyBpbiB6LW9yZGVyCiAgICBmdW5jdGlvbiBpbmRleEN1cnZlKCBzdGFydCwgbWluWCwgbWluWSwgaW52U2l6ZSApIHsKCiAgICAJdmFyIHAgPSBzdGFydDsKICAgIAlkbyB7CgogICAgCQlpZiAoIHAueiA9PT0gbnVsbCApIHAueiA9IHpPcmRlciggcC54LCBwLnksIG1pblgsIG1pblksIGludlNpemUgKTsKICAgIAkJcC5wcmV2WiA9IHAucHJldjsKICAgIAkJcC5uZXh0WiA9IHAubmV4dDsKICAgIAkJcCA9IHAubmV4dDsKCiAgICAJfSB3aGlsZSAoIHAgIT09IHN0YXJ0ICk7CgogICAgCXAucHJldloubmV4dFogPSBudWxsOwogICAgCXAucHJldlogPSBudWxsOwoKICAgIAlzb3J0TGlua2VkKCBwICk7CgogICAgfQoKICAgIC8vIFNpbW9uIFRhdGhhbSdzIGxpbmtlZCBsaXN0IG1lcmdlIHNvcnQgYWxnb3JpdGhtCiAgICAvLyBodHRwOi8vd3d3LmNoaWFyay5ncmVlbmVuZC5vcmcudWsvfnNndGF0aGFtL2FsZ29yaXRobXMvbGlzdHNvcnQuaHRtbAogICAgZnVuY3Rpb24gc29ydExpbmtlZCggbGlzdCApIHsKCiAgICAJdmFyIGksIHAsIHEsIGUsIHRhaWwsIG51bU1lcmdlcywgcFNpemUsIHFTaXplLAogICAgCQlpblNpemUgPSAxOwoKICAgIAlkbyB7CgogICAgCQlwID0gbGlzdDsKICAgIAkJbGlzdCA9IG51bGw7CiAgICAJCXRhaWwgPSBudWxsOwogICAgCQludW1NZXJnZXMgPSAwOwoKICAgIAkJd2hpbGUgKCBwICkgewoKICAgIAkJCW51bU1lcmdlcyArKzsKICAgIAkJCXEgPSBwOwogICAgCQkJcFNpemUgPSAwOwogICAgCQkJZm9yICggaSA9IDA7IGkgPCBpblNpemU7IGkgKysgKSB7CgogICAgCQkJCXBTaXplIC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leHRaOwogICAgCWlmICggcC5uZXh0WiApIHAubmV4dFoucHJldlogPSBwLnByZXZaOwoKICAgIH0KCiAgICBmdW5jdGlvbiBOb2RlJDUoIGksIHgsIHkgKSB7CgogICAgCS8vIHZlcnRleCBpbmRleCBpbiBjb29yZGluYXRlcyBhcnJheQogICAgCXRoaXMuaSA9IGk7CgogICAgCS8vIHZlcnRleCBjb29yZGluYXRlcwogICAgCXRoaXMueCA9IHg7CiAgICAJdGhpcy55ID0geTsKCiAgICAJLy8gcHJldmlvdXMgYW5kIG5leHQgdmVydGV4IG5vZGVzIGluIGEgcG9seWdvbiByaW5nCiAgICAJdGhpcy5wcmV2ID0gbnVsbDsKICAgIAl0aGlzLm5leHQgPSBudWxsOwoKICAgIAkvLyB6LW9yZGVyIGN1cnZlIHZhbHVlCiAgICAJdGhpcy56ID0gbnVsbDsKCiAgICAJLy8gcHJldmlvdXMgYW5kIG5leHQgbm9kZXMgaW4gei1vcmRlcgogICAgCXRoaXMucHJldlogPSBudWxsOwogICAgCXRoaXMubmV4dFogPSBudWxsOwoKICAgIAkvLyBpbmRpY2F0ZXMgd2hldGhlciB0aGlzIGlzIGEgc3RlaW5lciBwb2ludAogICAgCXRoaXMuc3RlaW5lciA9IGZhbHNlOwoKICAgIH0KCiAgICBmdW5jdGlvbiBzaWduZWRBcmVhKCBkYXRhLCBzdGFydCwgZW5kLCBkaW0gKSB7CgogICAgCXZhciBzdW0gPSAwOwogICAgCWZvciAoIHZhciBpID0gc3RhcnQsIGogPSBlbmQgLSBkaW07IGkgPCBlbmQ7IGkgKz0gZGltICkgewoKICAgIAkJc3VtICs9ICggZGF0YVsgaiBdIC0gZGF0YVsgaSBdICkgKiAoIGRhdGFbIGkgKyAxIF0gKyBkYXRhWyBqICsgMSBdICk7CiAgICAJCWogPSBpOwoKICAgIAl9CgogICAgCXJldHVybiBzdW07CgogICAgfQoKICAgIC8qKgogICAgICogQGF1dGhvciB6ejg1IC8gaHR0cDovL3d3dy5sYWI0Z2F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ci5sZW5ndGg7CgogICAgCQlob2xlcy5mb3JFYWNoKCByZW1vdmVEdXBFbmRQdHMgKTsKCiAgICAJCWZvciAoIHZhciBpID0gMDsgaSA8IGhvbGVzLmxlbmd0aDsgaSArKyApIHsKCiAgICAJCQlob2xlSW5kaWNlcy5wdXNoKCBob2xlSW5kZXggKTsKICAgIAkJCWhvbGVJbmRleCArPSBob2xlc1sgaSBdLmxlbmd0aDsKICAgIAkJCWFkZENvbnRvdXIoIHZlcnRpY2VzLCBob2xlc1sgaSBdICk7CgogICAgCQl9CgogICAgCQkvLwoKICAgIAkJdmFyIHRyaWFuZ2xlcyA9IEVhcmN1dC50cmlhbmd1bGF0ZSggdmVydGljZXMsIGhvbGVJbmRpY2VzICk7CgogICAgCQkvLwoKICAgIAkJZm9yICggdmFyIGkgPSAwOyBpIDwgdHJpYW5nbGVzLmxlbmd0aDsgaSArPSAzICkgewoKICAgIAkJCWZhY2VzLnB1c2goIHRyaWFuZ2xlcy5zbGljZSggaSwgaSArIDMgKSApOwoKICAgIAkJfQoKICAgIAkJcmV0dXJuIGZhY2VzOwoKICAgIAl9CgogICAgfTsKCiAgICBmdW5jdGlvbiByZW1vdmVEdXBFbmRQdHMoIHBvaW50cyApIHsKCiAgICAJdmFyIGwgPSBwb2ludHMubGVuZ3RoOwoKICAgIAlpZiAoIGwgPiAyICYmIHBvaW50c1sgbCAtIDEgXS5lcXVhbHMoIHBvaW50c1sgMCBdICkgKSB7CgogICAgCQlwb2ludHMucG9wKCk7CgogICAgCX0KCiAgICB9CgogICAgZnVuY3Rpb24gYWRkQ29udG91ciggdmVydGljZXMsIGNvbnRvdXIgKSB7CgogICAgCWZvciAoIHZhciBpID0gMDsgaSA8IGNvbnRvdXIubGVuZ3RoOyBpICsrICkgewoKICAgIAkJdmVydGljZXMucHVzaCggY29udG91clsgaSBdLnggKTsKICAgIAkJdmVydGljZXMucHVzaCggY29udG91clsgaSBdLnkgKTsKCiAgICAJfQoKICAgIH0KCiAgICAvKioKIC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AqIGludmVyc2VTZWdtZW50cyAqIHBoaUxlbmd0aDsKCiAgICAJCXZhciBzaW4gPSBNYXRoLnNpbiggcGhpICk7CiAgICAJCXZhciBjb3MgPSBNYXRoLmNvcyggcGhpICk7CgogICAgCQlmb3IgKCBqID0gMDsgaiA8PSAoIHBvaW50cy5sZW5ndGggLSAxICk7IGogKysgKSB7CgogICAgCQkJLy8gdmVydGV4CgogICAgCQkJdmVydGV4LnggPSBwb2ludHNbIGogXS54ICogc2luOwogICAgCQkJdmVydGV4LnkgPSBwb2ludHNbIGogXS55OwogICAgCQkJdmVydGV4LnogPSBwb2ludHNbIGogXS54ICogY29zOwoKICAgIAkJCXZlcnRpY2VzLnB1c2goIHZlcnRleC54LCB2ZXJ0ZXgueSwgdmVydGV4LnogKTsKCiAgICAJCQkvLyB1dgoKICAgIAkJCXV2LnggPSBpIC8gc2VnbWVudHM7CiAgICAJCQl1di55ID0gaiAvICggcG9pbnRzLmxlbmd0aCAtIDEgKTsKCiAgICAJCQl1dnMucHVzaCggdXYueCwgdXYueSApOwoKCiAgICAJCX0KCiAgICAJfQoKICAgIAkvLyBpbmRpY2VzCgogICAgCWZvciAoIGkgPSAwOyBpIDwgc2VnbWVudHM7IGkgKysgKSB7CgogICAgCQlmb3IgKCBqID0gMDsgaiA8ICggcG9pbnRzLmxlbmd0aCAtIDEgKTsgaiArKyApIHsKCiAgICAJCQliYXNlID0gaiArIGkgKiBwb2ludHMubGVuZ3RoOwoKICAgIAkJCXZhciBhID0gYmFzZTsKICAgIAkJCXZhciBiID0gYmFzZSArIHBvaW50cy5sZW5ndGg7CiAgICAJCQl2YXIgYyA9IGJhc2UgKyBwb2ludHMubGVuZ3RoICsgMTsKICAgIAkJCXZhciBkID0gYmFzZSArIDE7CgogICAgCQkJLy8gZmFjZXMKCiAgICAJCQlpbmRpY2VzLnB1c2goIGEsIGIsIGQgKTsKICAgIAkJCWluZGljZXMucHVzaCggYiwgYywgZCApOwoKICAgIAkJfQoKICAgIAl9Cg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hpcyBmb2xsb3dpbmcgY3VydmVzIGluaGVyaXQgZnJvbSBUSFJFRS5DdXJ2ZToKICAgICAqCiAgICAgKiAtLSAyRCBjdXJ2ZXMgLS0KICAgICAqIFRIUkVFLkFyY0N1cnZlCiAgICAgKiBUSFJFRS5DdWJpY0JlemllckN1cnZlCiAgICAgKiBUSFJFRS5FbGxpcHNlQ3VydmUKICAgICAqIFRIUkVFLkxpbmVDdXJ2ZQogICAgICogVEhSRUUuUXVhZHJhdGljQmV6aWVyQ3VydmUKICAgICAqIFRIUkVFLlNwbGluZUN1cnZlCiAgICAgKgogICAgICogLS0gM0QgY3VydmVzIC0tCiAgICAgKiBUSFJFRS5DYXRtdWxsUm9tQ3VydmUzCiAgICAgKiBUSFJFRS5DdWJpY0JlemllckN1cnZlMwogICAgICogVEhSRUUuTGluZUN1cnZlMwogICAgICogVEhSRUUuUXVhZHJhdGljQmV6aWVyQ3VydmUzCiAgICAgKgogICAgICogQSBzZXJpZXMgb2YgY3VydmVzIGNhbiBiZSByZXByZXNlbnRlZCBhcyBhIFRIUkVFLkN1cnZlUGF0aC4KICAgICAqCiAgICAgKiovCgogICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgICAgKglBYnN0cmFjdCBDdXJ2ZSBiYXNlIGNsYXNzCiAgICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCgogICAgZnVuY3Rpb24gQ3VydmUoKSB7CgogICAgCXRoaXMudHlwZSA9ICdDdXJ2ZSc7CgogICAgCXRoaXMuYXJjTGVuZ3RoRGl2aXNpb25zID0gMjAwOwoKICAgIH0KCiAgICBPYmplY3QuYXNzaWduKCBDdXJ2ZS5wcm90b3R5cGUsIHsKCiAgICAJLy8gVmlydHVhbCBiYXNlIGNsYXNzIG1ldGhvZCB0byBvdmVyd3JpdGUgYW5kIGltcGxlbWVudCBpbiBzdW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pcy52MCwgdjEgPSB0aGlzLnYxLCB2MiA9IHRoaXMudjIsIHYzID0gdGhpcy52MzsKCiAgICAJcG9pbnQuc2V0KAogICAgCQlDdWJpY0JlemllciggdCwgdjAueCwgdjEueCwgdjIueCwgdjMueCApLAogICAgCQlDdWJpY0JlemllciggdCwgdjAueSwgdjEueSwgdjIueSwgdjMueSApCiAgICAJKTsKCiAgICAJcmV0dXJuIHBvaW50OwoKICAgIH07CgogICAgQ3ViaWNCZXppZXJDdXJ2ZS5wcm90b3R5cGUuY29weSA9IGZ1bmN0aW9uICggc291cmNlICkgewoKICAgIAlDdXJ2ZS5wcm90b3R5cGUuY29weS5jYWxsKCB0aGlzLCBzb3VyY2UgKTsKCiAgICAJdGhpcy52MC5jb3B5KCBzb3VyY2UudjAgKTsKICAgIAl0aGlzLnYxLmNvcHkoIHNvdXJjZS52MSApOwogICAgCXRoaXMudjIuY29weSggc291cmNlLnYyICk7CiAgICAJdGhpcy52My5jb3B5KCBzb3VyY2UudjMgKTsKCiAgICAJcmV0dXJuIHRoaXM7CgogICAgfTsKCiAgICBDdWJpY0JlemllckN1cnZlLnByb3RvdHlwZS50b0pTT04gPSBmdW5jdGlvbiAoKSB7CgogICAgCXZhciBkYXRhID0gQ3VydmUucHJvdG90eXBlLnRvSlNPTi5jYWxsKCB0aGlzICk7CgogICAgCWRhdGEudjAgPSB0aGlzLnYwLnRvQXJyYXkoKTsKICAgIAlkYXRhLnYxID0gdGhpcy52MS50b0FycmF5KCk7CiAgICAJZGF0YS52MiA9IHRoaXMudjIudG9BcnJheSgpOwogICAgCWRhdGEudjMgPSB0aGlzLnYzLnRvQXJyYXkoKTsKCiAgICAJcmV0dXJuIGRhdGE7CgogICAgfTsKCiAgICBDdWJpY0JlemllckN1cnZlLnByb3RvdHlwZS5mcm9tSlNPTiA9IGZ1bmN0aW9uICgganNvbiApIHsKCiAgICAJQ3VydmUucHJvdG90eXBlLmZyb21KU09OLmNhbGwoIHRoaXMsIGpzb24gKTsKCi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QoKICAgIAkJaWYgKCBqc29uLm5hbWUgKSBnZW9tZXRyeS5uYW1lID0ganNvbi5uYW1lOwogICAgCQlpZiAoIGpzb24udXNlckRhdGEgKSBnZW9tZXRyeS51c2VyRGF0YSA9IGpzb24udXNlckRhdGE7CgogICAgCQlyZXR1cm4gZ2VvbWV0cnk7CgogICAgCX0KCiAgICB9ICk7CgogICAgdmFyIFRZUEVEX0FSUkFZUyA9IHsKICAgIAlJbnQ4QXJyYXk6IEludDhBcnJheSwKICAgIAlVaW50OEFycmF5OiBVaW50OEFycmF5LAogICAgCS8vIFdvcmthcm91bmQgZm9yIElFMTEgcHJlIEtCMjkyOTQzNy4gU2VlICMxMTQ0MAogICAgCVVpbnQ4Q2xhbXBlZEFycmF5OiB0eXBlb2YgVWludDhDbGFtcGVkQXJyYXkgIT09ICd1bmRlZmluZWQnID8gVWludDhDbGFtcGVkQXJyYXkgOiBVaW50OEFycmF5LAogICAgCUludDE2QXJyYXk6IEludDE2QXJyYXksCiAgICAJVWludDE2QXJyYXk6IFVpbnQxNkFycmF5LAogICAgCUludDMyQXJyYXk6IEludDMyQXJyYXksCiAgICAJVWludDMyQXJyYXk6IFVpbnQzMkFycmF5LAogICAgCUZsb2F0MzJBcnJheTogRmxvYXQzMkFycmF5LAogICAgCUZsb2F0NjRBcnJheTogRmxvYXQ2NEFycmF5CiAgICB9OwoKICAgIC8qKgogICAgICogQGF1dGhvciBtcmRvb2IgLyBodHRwOi8vbXJkb29iLmNvbS8KICAgICAqLwoKICAgIGZ1bmN0aW9uIE9iamVjdExvYWRlciggbWFuYWdlciApIHsKCiAgICAJTG9hZGVyLmNhbGwoIHRoaXMsIG1hbmFnZXIgKTsKCiAgICB9CgogICAgT2JqZWN0TG9hZGVyLnByb3RvdHlwZSA9IE9iamVjdC5hc3NpZ24oIE9iamVjdC5jcmVhdGUoIExvYWRlci5wcm90b3R5cGUgKSwgewoKICAgIAljb25zdHJ1Y3RvcjogT2JqZWN0TG9hZGVyLAoKICAgI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c29uIGluc3RlYWQuJyApOwogICAgCQkJCWpzb24gPSBKU09OLnBhcnNlKCB0ZXh0LnN1YnN0cmluZyggNjUsIHRleHQubGVuZ3RoIC0gMiApICk7CgogICAgCQkJfQoKICAgIAkJCXZhciBmb250ID0gc2NvcGUucGFyc2UoIGpzb24gKTsKCiAgICAJCQlpZiAoIG9uTG9hZCApIG9uTG9hZCggZm9udCApOwoKICAgIAkJfSwgb25Qcm9ncmVzcywgb25FcnJvciApOwoKICAgIAl9LAoKICAgIAlwYXJzZTogZnVuY3Rpb24gKCBqc29uICkgewoKICAgIAkJcmV0dXJuIG5ldyBGb250KCBqc29uICk7CgogICAgCX0KCiAgICB9ICk7CgogICAgLyoqCiAgICAgKiBAYXV0aG9yIG1yZG9vYiAvIGh0dHA6Ly9tcmRvb2IuY29tLwogICAgICovCgogICAgdmFyIF9jb250ZXh0OwoKICAgIHZhciBBdWRpb0NvbnRleHQgPSB7CgogICAgCWdldENvbnRleHQ6IGZ1bmN0aW9uICgpIHsKCiAgICAJCWlmICggX2NvbnRleHQgPT09IHVuZGVmaW5lZCApIHsKCiAgICAJCQlfY29udGV4dCA9IG5ldyAoIHdpbmRvdy5BdWRpb0NvbnRleHQgfHwgd2luZG93LndlYmtpdEF1ZGlvQ29udGV4dCApKCk7CgogICAgCQl9CgogICAgCQlyZXR1cm4gX2NvbnRleHQ7CgogICAgCX0sCgogICAgCXNldENvbnRleHQ6IGZ1bmN0aW9uICggdmFsdWUgKSB7CgogICAgCQlfY29udGV4dCA9IHZhbHVlOwoKICAgIAl9CgogICAgfTsKCiAgICAvKioKICAgICAqIEBhdXRob3IgUmVlY2UgQWFyb24gTGVjcml2YWluIC8gaHR0cDovL3JlZWNlbm90ZXMuY29tLwogICAgICovCgogICAgZnVuY3Rpb24gQXVkaW9Mb2FkZXIoIG1hbmFnZXIgKSB7CgogICAgCUxvYWRlci5jYWxsKCB0aGlzLCBtYW5hZ2VyICk7CgogICAgfQoKICAgIEF1ZGlvTG9hZGVy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gIEJveEhlbHBlci5wcm90b3R5cGUudXBkYXRlID0gZnVuY3Rpb24gKCBvYmplY3QgKSB7CgogICAgCWlmICggb2JqZWN0ICE9PSB1bmRlZmluZWQgKSB7CgogICAgCQljb25zb2xlLndhcm4oICdUSFJFRS5Cb3hIZWxwZXI6IC51cGRhdGUoKSBoYXMgbm8gbG9uZ2VyIGFyZ3VtZW50cy4nICk7CgogICAgCX0KCiAgICAJaWYgKCB0aGlzLm9iamVjdCAhPT0gdW5kZWZpbmVkICkgewoKICAgIAkJX2JveCQyLnNldEZyb21PYmplY3QoIHRoaXMub2JqZWN0ICk7CgogICAgCX0KCiAgICAJaWYgKCBfYm94JDIuaXNFbXB0eSgpICkgcmV0dXJuOwoKICAgIAl2YXIgbWluID0gX2JveCQyLm1pbjsKICAgIAl2YXIgbWF4ID0gX2JveCQyLm1heDsKCiAgICAJLyoKICAgIAkgIDVfX19fNAogICAgCTEvX19fMC98CiAgICAJfCA2X198XzcKICAgIAkyL19fXzMvCgogICAgCTA6IG1heC54LCBtYXgueSwgbWF4LnoKICAgIAkxOiBtaW4ueCwgbWF4LnksIG1heC56CiAgICAJMjogbWluLngsIG1pbi55LCBtYXguegogICAgCTM6IG1heC54LCBtaW4ueSwgbWF4LnoKICAgIAk0OiBtYXgueCwgbWF4LnksIG1pbi56CiAgICAJNTogbWluLngsIG1heC55LCBtaW4uegogICAgCTY6IG1pbi54LCBtaW4ueSwgbWluLnoKICAgIAk3OiBtYXgueCwgbWluLnksIG1pbi56CiAgICAJKi8KCiAgICAJdmFyIHBvc2l0aW9uID0gdGhpcy5nZW9tZXRyeS5hdHRyaWJ1dGVzLnBvc2l0aW9uOwogICAgCXZhciBhcnJheSA9IHBvc2l0aW9uLmFycmF5OwoKICAgIAlhcnJheVsgMCBdID0gbWF4Lng7IGFycmF5WyAxIF0gPSBtYXgueTsgYXJyYXlbIDIgXSA9IG1heC56OwogICAgCWFycmF5WyAzIF0gPSBtaW4ueDsgYXJyYXlbIDQgXSA9I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AgICAgICAgICAgIHN1cGVyKCk7CiAgICAgICAgICAgIHRoaXMuX2xhc3RNZXNoID0gbnVsbDsKICAgICAgICAgICAgdGhpcy5fY2xvY2sgPSBuZXcgQ2xvY2soKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHshT2JqZWN0fSBDb250YWlucyB3aWR0aCBhbmQgaGVpZ2h0IG9mIHRoZSBjYW52YXMuICovCiAgICAgICAgICAgIHRoaXMuX2NhbnZhc1NpemUgPSBudWxsOwogICAgICAgICAgICAvKiogQHR5cGUgeyFPYmplY3R9IERlc2NyaWJlcyB3aGF0IGxheWVycyBtdXN0IGJlIHJlbmRlcmVkIGluIGFkZGl0aW9uCiAgICAgICAgICAgICB0byBhIG1lc2ggb3IgYSBwb2ludCBjbG91ZCBsYXllcnMuICovCiAgICAgICAgICAgIHRoaXMuX2xheWVyc0NvbmZpZyA9IG51bGw7CiAgICAgICAgICAgIHRoaXMuX3J1bkNvbG9yID0gcnVuQ29sb3I7CiAgICAgICAgfQogICAgICAgIC8vIFRPRE8oYi8xMzAwMzAzMTQpIHJlcGxhY2Ugd2l0aCBzb21lIHRoaXJkcGFydHkgbGlicmFyeSBjYWxsLgogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgdHJ1ZSBpZiB0aGUgc3BlY2lmaWVkIHZhbHVlIGlzIGFuIG9iamVjdC4KICAgICAgICAgKiBAcGFyYW0gez99IHZhbCBWYXJpYWJsZSB0byB0ZXN0LgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7Ym9vbGVhbn0gV2hldGhlciB2YXJpYWJsZSBpcyBhbiBvYmplY3QuCiAgICAgICAgICovCiAgICAgICAgX2lzT2JqZWN0KHZhbCkgewogICAgICAgICAgICB2YXIgdHlwZSA9IHR5cGVvZiB2YWw7CiAgICAgICAgICAgIC8vIFdlJ3JlIGludGVyZXN0ZWQgaW4gb2JqZWN0cyByZXByZXNlbnRpbmcgZGljdGlvbmFyaWVzIG9ubHkuIEV2ZXJ5dGhpbmcKICAgICAgICAgICAgLy8gZWxzZSBpcyAibm90IG1lcmdlYWJsZSIsIHNvIHdlIGNvbnNpZGVyIGl0IGFzIHByaW1pdGl2ZSB0eXBlcy4KICAgICAgICAgICAgcmV0dXJuIHR5cGUgPT0gJ29iamVjdCcgJiYgdmFsICE9IG51bGwgJiYgIUFycmF5LmlzQXJyYXkodmFsKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogTWVyZ2VzIHR3byBjb25maWdzIHRvZ2V0aGVyLgogICAgICAgICAqIEBwYXJhbSB7IU9iamVjdH0gdXNlckNvbmZpZyBVc2VyIGNvbmZpZ3VyYXRpb24gaGFzIGhpZ2hlciBwcmlvcml0eS4KICAgICAgICAgKiBAcGFyYW0geyFPYmplY3R9IGRlZmF1bHRDb25maWcgRGVmYXVsdCBjb25maWd1cmF0aW9uIGhhcyBsb3dlciBwcmlvcml0eSBhbmQKICAgICAgICAgKiAgIHdpbGwgYmUgb3ZlcnJpZGRlbiBieSBhbnkgY29uZmxpY3Rpbmcga2V5cyBmcm9tIHVzZXJDb25maWcuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHshT2JqZWN0fSBNZXJnZWQgZGljdGlvbmFyeSBmcm9tIHR3byBjb25maWd1cmF0aW9uIGRpY3Rpb25hcmllcy4KICAgICAgICAgKi8KICAgICAgICBfYXBwbHlEZWZhdWx0cyh1c2VyQ29uZmlnLCBkZWZhdWx0Q29uZmlnKSB7CiAgICAgICAgICAgIGxldCBtZXJnZWRDb25maWcgPSB7fTsKICAgICAgICAgICAgY29uc3QgY29uZmlncyA9IFt1c2VyQ29uZmlnLCBkZWZhdWx0Q29uZmlnXTsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBjb25maWdzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICBjb25zdCBjb25maWcgPSBjb25maWdzW2ldOwogICAgICAgICAgICAgICAgZm9yIChsZXQga2V5IGluIGNvbmZpZykgewogICAgICAgICAgICAgICAgICAgIGNvbnN0IGlzX2tleV9wcmVzZW50ID0ga2V5IGluIG1lcmdlZENvbmZpZzsKICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5faXNPYmplY3QoY29uZmlnW2tleV0pKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG1lcmdlZENvbmZpZ1trZXldID0gdGhpcy5fYXBwbHlEZWZhdWx0cyhtZXJnZWRDb25maWdba2V5XSB8fCB7fSwgY29uZmlnW2tleV0pOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICghaXNfa2V5X3ByZXNlbnQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgbWVyZ2VkQ29uZmlnW2tleV0gPSBjb25maWdba2V5XTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIG1lcmdlZENvbmZpZzsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhZGRpdGlvbmFsIGxheWVycyB0byByZW5kZXIgb24gdG9wIG9mIGEgbWVzaCBvciBhIHBvaW50IGNsb3VkCiAgICAgICAgICogbGF5ZXJzLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICovCiAgICAgICAgX2NyZWF0ZUxheWVycygpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLl9sYXllcnNDb25maWcgfHwgIXRoaXMuX3NjZW5lIHx8ICF0aGlzLl9sYXN0TWVzaCkKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgaWYgKHRoaXMuX2xheWVyc0NvbmZpZy5zaG93Qm91bmRpbmdCb3gpIHsKICAgICAgICAgICAgICAgIHZhciBib3ggPSBuZXcgQm94SGVscGVyKHRoaXMuX2xhc3RNZXNoLCBuZXcgQ29sb3IkNygncmdiKDAsIDAsIDI1NSknKSk7CiAgICAgICAgICAgICAgICB0aGlzLl9zY2VuZS5hZGQoYm94KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5fbGF5ZXJzQ29uZmlnLnNob3dBeGVzKSB7CiAgICAgICAgICAgICAgICB2YXIgYXhlc0hlbHBlciA9IG5ldyBBeGVzSGVscGVyKDUpOwogICAgICAgICAgICAgICAgdGhpcy5fc2NlbmUuYWRkKGF4ZXNIZWxwZXIpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgbGF5ZXJzIGNvbmZpZy4KICAgICAgICAgKiBAcGFyYW0geyFPYmplY3R9IGxheWVyc0NvbmZpZyBDb25maWcgb2JqZWN0IGRlc2NyaWJpbmcgd2hhdCBsYXllcnMgc2hvdWxkCiAgICAgICAgICogIGJlIHJlbmRlcmVkLgogICAgICAgICAqLwogICAgICAgIHNldExheWVyc0NvbmZpZyhsYXllcnNDb25maWcpIHsKICAgICAgICAgICAgdGhpcy5fbGF5ZXJzQ29uZmlnID0gdGhpcy5fYXBwbHlEZWZhdWx0cyhsYXllcnNDb25maWcsIHRoaXMuX2xheWVyc0NvbmZpZyB8fCB7fSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgc2NlbmUsIGNhbWVyYSBhbmQgcmVuZGVyZXIuCiAgICAgICAgICogQHBhcmFtIHshT2JqZWN0fSBjb25maWcgU2NlbmUgcmVuZGVyaW5nIGNvbmZpZ3VyYXRpb24uCiAgICAgICAgICogQHBhcmFtIHshSFRNTERPTUVsZW1lbnR9IGRvbUVsZW1lbnQgVGhlIEhUTUwgZWxlbWVudCB1c2VkIGZvciBldmVudCBsaXN0ZW5lcnMuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKi8KICAgICAgICBfY3JlYXRlV29ybGQoY29uZmlnLCBkb21FbGVtZW50KSB7CiAgICAgICAgICAgIGlmICh0aGlzLmlzUmVhZHkoKSkgewogICAgICAgICAgICAgICAgLy8ga2VlcCB3b3JsZCBvYmplY3RzIGFzIHNpbmdsZXRvbiBvYmplY3RzLgogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX3NjZW5lID0gbmV3IFNjZW5lKCk7CiAgICAgICAgICAgIHZhciBjYW1lcmEgPSBuZXcgVEhSRUUkMVtjb25maWcuY2FtZXJhLmNsc10oY29uZmlnLmNhbWVyYS5mb3YsIHRoaXMuX2NhbnZhc1NpemUud2lkdGggLyB0aGlzLl9jYW52YXNTaXplLmhlaWdodCwgY29uZmlnLmNhbWVyYS5uZWFyLCBjb25maWcuY2FtZXJhLmZhcik7CiAgICAgICAgICAgIHRoaXMuX2NhbWVyYSA9IGNhbWVyYTsKICAgICAgICAgICAgdmFyIGNhbUNvbnRyb2xzID0gbmV3IE9yYml0Q29udHJvbHMoY2FtZXJhLCBkb21FbGVtZW50KTsKICAgICAgICAgICAgY29uc3QgYW55Q2FtQ29udHJvbHMgPSBjYW1Db250cm9sczsKICAgICAgICAgICAgLy8gVE9ETyh0ZW5zb3Jib2FyZC10ZWFtKTogY2hlY2sgd2hldGhlciB0aGVzZSBhcmUgZGVwcmVhY3RlZDsgdGhleSBubyBsb25nZXIgZXhpc3QKICAgICAgICAgICAgLy8gaW4gQVBJIGRvY3MuCiAgICAgICAgICAgIGFueUNhbUNvbnRyb2xzLmxvb2tTcGVlZCA9IDAuNDsKICAgICAgICAgICAgYW55Q2FtQ29udHJvbHMubW92ZW1lbnRTcGVlZCA9IDIwOwogICAgICAgICAgICBhbnlDYW1Db250cm9scy5ub0ZseSA9IHRydWU7CiAgICAgICAgICAgIGFueUNhbUNvbnRyb2xzLmxvb2tWZXJ0aWNhbCA9IHRydWU7CiAgICAgICAgICAgIGFueUNhbUNvbnRyb2xzLmNvbnN0cmFpblZlcnRpY2FsID0gdHJ1ZTsKICAgICAgICAgICAgYW55Q2FtQ29udHJvbHMudmVydGljYWxNaW4gPSAxOwogICAgICAgICAgICBhbnlDYW1Db250cm9scy52ZXJ0aWNhbE1heCA9IDI7CiAgICAgICAgICAgIGFueUNhbUNvbnRyb2xzLmFkZEV2ZW50TGlzdGVuZXIoJ2NoYW5nZScsIHRoaXMuX29uQ2FtZXJhUG9zaXRpb25DaGFuZ2UuYmluZCh0aGlzKSk7CiAgICAgICAgICAgIHRoaXMuX2NhbWVyYUNvbnRyb2xzID0gY2FtQ29udHJvbHM7CiAgICAgICAgICAgIHRoaXMuX3JlbmRlcmVyID0gbmV3IFdlYkdMUmVuZGVyZXIoeyBhbnRpYWxpYXM6IHRydWUgfSk7CiAgICAgICAgICAgIHRoaXMuX3JlbmRlcmVyLnNldFBpeGVsUmF0aW8od2luZG93LmRldmljZVBpeGVsUmF0aW8pOwogICAgICAgICAgICB0aGlzLl9yZW5kZXJlci5zZXRTaXplKHRoaXMuX2NhbnZhc1NpemUud2lkdGgsIHRoaXMuX2NhbnZhc1NpemUuaGVpZ2h0KTsKICAgICAgICAgICAgdGhpcy5fcmVuZGVyZXIuc2V0Q2xlYXJDb2xvcigweGZmZmZmZiwgMSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENsZWFycyBzY2VuZSBmcm9tIGFueSAzRCBnZW9tZXRyeS4KICAgICAgICAgKi8KICAgICAgICBfY2xlYXJTY2VuZSgpIHsKICAgICAgICAgICAgd2hpbGUgKHRoaXMuX3NjZW5lLmNoaWxkcmVuLmxlbmd0aCA+IDApIHsKICAgICAgICAgICAgICAgIHRoaXMuX3NjZW5lLnJlbW92ZSh0aGlzLl9zY2VuZS5jaGlsZHJlblswXSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0dXJucyB1bmRlcmx5aW5nIHJlbmRlcmVyLgogICAgICAgICAqIEBwdWJsaWMKICAgICAgICAgKi8KICAgICAgICBnZXRSZW5kZXJlcigpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3JlbmRlcmVyOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZXR1cm5zIHVuZGVybHlpbmcgY2FtZXJhIGNvbnRyb2xzLgogICAgICAgICAqIEBwdWJsaWMKICAgICAgICAgKi8KICAgICAgICBnZXRDYW1lcmFDb250cm9scygpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2NhbWVyYUNvbnRyb2xzOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZXR1cm5zIHRydWUgd2hlbiBhbGwgdW5kZXJseWluZyBjb21wb25lbnRzIHdlcmUgaW5pdGlhbGl6ZWQuCiAgICAgICAgICogQHB1YmxpYwogICAgICAgICAqLwogICAgICAgIGlzUmVhZHkoKSB7CiAgICAgICAgICAgIHJldHVybiAhIXRoaXMuX2NhbWVyYSAmJiAhIXRoaXMuX2NhbWVyYUNvbnRyb2xzOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZXR1cm5zIGN1cnJlbnQgY2FtZXJhIHBvc2l0aW9uLgogICAgICAgICAqIEBwdWJsaWMKICAgICAgICAgKi8KICAgICAgICBnZXRDYW1lcmFQb3NpdGlvbigpIHsKICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIGZhcjogdGhpcy5fY2FtZXJhLmZhciwKICAgICAgICAgICAgICAgIHBvc2l0aW9uOiB0aGlzLl9jYW1lcmEucG9zaXRpb24uY2xvbmUoKSwKICAgICAgICAgICAgICAgIHRhcmdldDogdGhpcy5fY2FtZXJhQ29udHJvbHMudGFyZ2V0LmNsb25lKCksCiAgICAgICAgICAgIH07CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgbmV3IGNhbnZhcyBzaXplLgogICAgICAgICAqIEBwYXJhbSB7IU9iamVjdH0gY2FudmFzU2l6ZSBDb250YWlucyBjdXJyZW50IGNhbnZhcyB3aWR0aCBhbmQgaGVpZ2h0LgogICAgICAgICAqIEBwdWJsaWMKICAgICAgICAgKi8KICAgICAgICBzZXRDYW52YXNTaXplKGNhbnZhc1NpemUpIHsKICAgICAgICAgICAgdGhpcy5fY2FudmFzU2l6ZSA9IGNhbnZhc1NpemU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJlbmRlcnMgY29tcG9uZW50IGludG8gdGhlIGJyb3dzZXIuCiAgICAgICAgICogQHB1YmxpYwogICAgICAgICAqLwogICAgICAgIGRyYXcoKSB7CiAgICAgICAgICAgIC8vIENhbmNlbCBhbnkgcHJldmlvdXMgcmVxdWVzdHMgdG8gcGVyZm9ybSByZWRyYXcuCiAgICAgICAgICAgIGlmICh0aGlzLl9hbmltYXRpb25GcmFtZUluZGV4KSB7CiAgICAgICAgICAgICAgICBjYW5jZWxBbmltYXRpb25GcmFtZSh0aGlzLl9hbmltYXRpb25GcmFtZUluZGV4KTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9jYW1lcmEuYXNwZWN0ID0gdGhpcy5fY2FudmFzU2l6ZS53aWR0aCAvIHRoaXMuX2NhbnZhc1NpemUuaGVpZ2h0OwogICAgICAgICAgICB0aGlzLl9jYW1lcmEudXBkYXRlUHJvamVjdGlvbk1hdHJpeCgpOwogICAgICAgICAgICB0aGlzLl9yZW5kZXJlci5zZXRTaXplKHRoaXMuX2NhbnZhc1NpemUud2lkdGgsIHRoaXMuX2NhbnZhc1NpemUuaGVpZ2h0KTsKICAgICAgICAgICAgY29uc3QgYW5pbWF0ZSA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgIHZhciBkZWx0YSA9IHRoaXMuX2Nsb2NrLmdldERlbHRhKCk7CiAgICAgICAgICAgICAgICB0aGlzLl9jYW1lcmFDb250cm9scy51cGRhdGUoZGVsdGEpOwogICAgICAgICAgICAgICAgdGhpcy5fYW5pbWF0aW9uRnJhbWVJbmRleCA9IHJlcXVlc3RBbmltYXRpb25GcmFtZShhbmltYXRlKTsKICAgICAgICAgICAgICAgIHRoaXMuX3JlbmRlcmVyLnJlbmRlcih0aGlzLl9zY2VuZSwgdGhpcy5fY2FtZXJhKTsKICAgICAgICAgICAgfS5iaW5kKHRoaXMpOwogICAgICAgICAgICBhbmltYXRlKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFVwZGF0ZXMgdGhlIHNjZW5lLgogICAgICAgICAqIEBwYXJhbSB7IU9iamVjdH0gY3VycmVudFN0ZXAgU3RlcCBkYXR1bS4KICAgICAgICAgKiBAcGFyYW0geyFIVE1MRE9NRWxlbWVudH0gZG9tRWxlbWVudCBUaGUgSFRNTCBlbGVtZW50IHVzZWQgZm9yIGV2ZW50IGxpc3RlbmVycy4KICAgICAgICAgKiBAcHVibGljCiAgICAgICAgICovCiAgICAgICAgdXBkYXRlU2NlbmUoY3VycmVudFN0ZXAsIGRvbUVsZW1lbnQpIHsKICAgICAgICAgICAgbGV0IGNvbmZpZyA9IHt9OwogICAgICAgICAgICBpZiAoJ2NvbmZpZycgaW4gY3VycmVudFN0ZXAgJiYgY3VycmVudFN0ZXAuY29uZmlnKSB7CiAgICAgICAgICAgICAgICBjb25maWcgPSBKU09OLnBhcnNlKGN1cnJlbnRTdGVwLmNvbmZpZyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gVGhpcyBldmVudCBpcyBhbiBvcHBvcnR1bml0eSBmb3IgVUktcmVzcG9uc2libGUgY29tcG9uZW50IChwYXJlbnQpIHRvIHNldAogICAgICAgICAgICAvLyBwcm9wZXIgY2FudmFzIHNpemUuCiAgICAgICAgICAgIHRoaXMuZGlzcGF0Y2hFdmVudCh7IHR5cGU6ICdiZWZvcmVVcGRhdGVTY2VuZScgfSk7CiAgICAgICAgICAgIGNvbnN0IGRlZmF1bHRfY29uZmlnID0gewogICAgICAgICAgICAgICAgY2FtZXJhOiB7IGNsczogJ1BlcnNwZWN0aXZlQ2FtZXJhJywgZm92OiA3NSwgbmVhcjogMC4xLCBmYXI6IDEwMDAgfSwKICAgICAgICAgICAgICAgIGxpZ2h0czogWwogICAgICAgICAgICAgICAgICAgIHsgY2xzOiAnQW1iaWVudExpZ2h0JywgY29sb3I6ICcjZmZmZmZmJywgaW50ZW5zaXR5OiAwLjc1IH0sCiAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICBjbHM6ICdEaXJlY3Rpb25hbExpZ2h0JywKICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I6ICcjZmZmZmZmJywKICAgICAgICAgICAgICAgICAgICAgICAgaW50ZW5zaXR5OiAwLjc1LAogICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbjogWzAsIC0xLCAyXSwKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgfTsKICAgICAgICAgICAgY29uZmlnID0gdGhpcy5fYXBwbHlEZWZhdWx0cyhjb25maWcsIGRlZmF1bHRfY29uZmlnKTsKICAgICAgICAgICAgdGhpcy5fY3JlYXRlV29ybGQoY29uZmlnLCBkb21FbGVtZW50KTsKICAgICAgICAgICAgdGhpcy5fY2xlYXJTY2VuZSgpOwogICAgICAgICAgICB0aGlzLl9jcmVhdGVMaWdodHModGhpcy5fc2NlbmUsIGNvbmZpZyk7CiAgICAgICAgICAgIHRoaXMuX2NyZWF0ZUdlb21ldHJ5KGN1cnJlbnRTdGVwLCBjb25maWcpOwogICAgICAgICAgICB0aGlzLl9jcmVhdGVMYXllcnMoKTsKICAgICAgICAgICAgdGhpcy5kcmF3KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgY2FtZXJhIHRvIGRlZmF1bHQgcG9zaXRpb24gYW5kIHpvb20uCiAgICAgICAgICogQHBhcmFtIHs/VEhSRUUuTWVzaH0gbWVzaCBNZXNoIHRvIGZpdCBpbnRvIHZpZXdwb3J0LgogICAgICAgICAqIEBwdWJsaWMKICAgICAgICAgKi8KICAgICAgICByZXNldFZpZXcobWVzaCkgewogICAgICAgICAgICBpZiAoIXRoaXMuaXNSZWFkeSgpKQogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB0aGlzLl9jYW1lcmFDb250cm9scy5yZXNldCgpOwogICAgICAgICAgICBsZXQgbmV4dE1lc2g7CiAgICAgICAgICAgIGlmICghbWVzaCAmJiB0aGlzLl9sYXN0TWVzaCkgewogICAgICAgICAgICAgICAgbmV4dE1lc2ggPSB0aGlzLl9sYXN0TWVzaDsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAobmV4dE1lc2gpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2ZpdE9iamVjdFRvVmlld3BvcnQobmV4dE1lc2gpOwogICAgICAgICAgICAgICAgLy8gU3RvcmUgbGFzdCBtZXNoIGluIGNhc2Ugb2YgcmVzZXRWaWV3IG1ldGhvZCBjYWxsZWQgZHVlIHRvIHNvbWUgZXZlbnRzLgogICAgICAgICAgICAgICAgdGhpcy5fbGFzdE1lc2ggPSBuZXh0TWVzaDsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9jYW1lcmFDb250cm9scy51cGRhdGUoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBnZW9tZXRyeSBmb3IgY3VycmVudCBzdGVwIGRhdGEuCiAgICAgICAgICogQHBhcmFtIHshT2JqZWN0fSBjdXJyZW50U3RlcCBTdGVwIGRhdHVtLgogICAgICAgICAqIEBwYXJhbSB7IU9iamVjdH0gY29uZmlnIFNjZW5lIHJlbmRlcmluZyBjb25maWd1cmF0aW9uLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICovCiAgICAgICAgX2NyZWF0ZUdlb21ldHJ5KGN1cnJlbnRTdGVwLCBjb25maWcpIHsKICAgICAgICAgICAgY29uc3QgbWVzaCA9IGN1cnJlbnRTdGVwLm1lc2g7CiAgICAgICAgICAgIGlmIChtZXNoLnZlcnRpY2VzICYmIG1lc2guZmFjZXMgJiYgbWVzaC5mYWNlcy5sZW5ndGgpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2NyZWF0ZU1lc2gobWVzaCwgY29uZmlnKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuX2NyZWF0ZVBvaW50Q2xvdWQobWVzaCwgY29uZmlnKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDcmVhdGVzIHBvaW50IGNsb3VkIGdlb21ldHJ5IGZvciBjdXJyZW50IHN0ZXAgZGF0YS4KICAgICAgICAgKiBAcGFyYW0geyFPYmplY3R9IHBvaW50Q2xvdWREYXRhIE9iamVjdCB3aXRoIHBvaW50IGNsb3VkIGRhdGEuCiAgICAgICAgICogQHBhcmFtIHshT2JqZWN0fSBjb25maWcgU2NlbmUgcmVuZGVyaW5nIGNvbmZpZ3VyYXRpb24uCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKi8KICAgICAgICBfY3JlYXRlUG9pbnRDbG91ZChwb2ludENsb3VkRGF0YSwgY29uZmlnKSB7CiAgICAgICAgICAgIGNvbnN0IHBvaW50cyA9IHBvaW50Q2xvdWREYXRhLnZlcnRpY2VzOwogICAgICAgICAgICBjb25zdCBjb2xvcnMgPSBwb2ludENsb3VkRGF0YS5jb2xvcnM7CiAgICAgICAgICAgIGxldCBkZWZhdWx0Q29uZmlnID0gewogICAgICAgICAgICAgICAgbWF0ZXJpYWw6IHsKICAgICAgICAgICAgICAgICAgICBjbHM6ICdQb2ludHNNYXRlcmlhbCcsCiAgICAgICAgICAgICAgICAgICAgc2l6ZTogMC4wMDUsCiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICB9OwogICAgICAgICAgICAvLyBEZXRlcm1pbmUgd2hhdCBjb2xvcnMgd2lsbCBiZSB1c2VkLgogICAgICAgICAgICBpZiAoY29sb3JzICYmIGNvbG9ycy5sZW5ndGggPT0gcG9pbnRzLmxlbmd0aCkgewogICAgICAgICAgICAgICAgZGVmYXVsdENvbmZpZy5tYXRlcmlhbFsndmVydGV4Q29sb3JzJ10gPSBWZXJ0ZXhDb2xvcnM7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBkZWZhdWx0Q29uZmlnLm1hdGVyaWFsWydjb2xvciddID0gdGhpcy5fcnVuQ29sb3I7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY29uc3QgcGNfY29uZmlnID0gdGhpcy5fYXBwbHlEZWZhdWx0cyhjb25maWcsIGRlZmF1bHRDb25maWcpOwogICAgICAgICAgICB2YXIgZ2VvbWV0cnkgPSBuZXcgR2VvbWV0cnkoKTsKICAgICAgICAgICAgcG9pbnRzLmZvckVhY2goZnVuY3Rpb24gKHBvaW50KSB7CiAgICAgICAgICAgICAgICB2YXIgcCA9IG5ldyBWZWN0b3IzKHBvaW50WzBdLCBwb2ludFsxXSwgcG9pbnRbMl0pOwogICAgICAgICAgICAgICAgY29uc3Qgc2NhbGUgPSAxOwogICAgICAgICAgICAgICAgcC54ID0gcG9pbnRbMF0gKiBzY2FsZTsKICAgICAgICAgICAgICAgIHAueSA9IHBvaW50WzFdICogc2NhbGU7CiAgICAgICAgICAgICAgICBwLnogPSBwb2ludFsyXSAqIHNjYWxlOwogICAgICAgICAgICAgICAgZ2VvbWV0cnkudmVydGljZXMucHVzaChwKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGlmIChjb2xvcnMgJiYgY29sb3JzLmxlbmd0aCA9PSBwb2ludHMubGVuZ3RoKSB7CiAgICAgICAgICAgICAgICBjb2xvcnMuZm9yRWFjaChmdW5jdGlvbiAoY29sb3IpIHsKICAgICAgICAgICAgICAgICAgICBjb25zdCBjID0gbmV3IENvbG9yJDcoY29sb3JbMF0gLyAyNTUsIGNvbG9yWzFdIC8gMjU1LCBjb2xvclsyXSAvIDI1NSk7CiAgICAgICAgICAgICAgICAgICAgZ2VvbWV0cnkuY29sb3JzLnB1c2goYyk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfQogICAgICAgICAgICB2YXIgbWF0ZXJpYWwgPSBuZXcgVEhSRUUkMVtwY19jb25maWcubWF0ZXJpYWwuY2xzXShwY19jb25maWcubWF0ZXJpYWwpOwogICAgICAgICAgICB2YXIgbWVzaCA9IG5ldyBQb2ludHMoZ2VvbWV0cnksIG1hdGVyaWFsKTsKICAgICAgICAgICAgdGhpcy5fc2NlbmUuYWRkKG1lc2gpOwogICAgICAgICAgICB0aGlzLl9sYXN0TWVzaCA9IG1lc2g7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgbWVzaCBnZW9tZXRyeSBmb3IgY3VycmVudCBzdGVwIGRhdGEuCiAgICAgICAgICogQHBhcmFtIHshVEhSRUUuVmVjdG9yM30gcG9zaXRpb24gUG9zaXRpb24gb2YgdGhlIGNhbWVyYS4KICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gZmFyIENhbWVyYSBmcnVzdHVtIGZhciBwbGFuZS4KICAgICAgICAgKiBAcGFyYW0geyFUSFJFRS5WZWN0b3IzfSB0YXJnZXQgUG9pbnQgaW4gc3BhY2UgZm9yIGNhbWVyYSB0byBsb29rIGF0LgogICAgICAgICAqIEBwdWJsaWMKICAgICAgICAgKi8KICAgICAgICBzZXRDYW1lcmFWaWV3cG9pbnQocG9zaXRpb24sIGZhciwgdGFyZ2V0KSB7CiAgICAgICAgICAgIHRoaXMuX3NpbGVudCA9IHRydWU7CiAgICAgICAgICAgIHRoaXMuX2NhbWVyYS5mYXIgPSBmYXI7CiAgICAgICAgICAgIHRoaXMuX2NhbWVyYS5wb3NpdGlvbi5zZXQocG9zaXRpb24ueCwgcG9zaXRpb24ueSwgcG9zaXRpb24ueik7CiAgICAgICAgICAgIHRoaXMuX2NhbWVyYS5sb29rQXQodGFyZ2V0LmNsb25lKCkpOwogICAgICAgICAgICB0aGlzLl9jYW1lcmEudXBkYXRlUHJvamVjdGlvbk1hdHJpeCgpOwogICAgICAgICAgICB0aGlzLl9jYW1lcmFDb250cm9scy50YXJnZXQgPSB0YXJnZXQuY2xvbmUoKTsKICAgICAgICAgICAgdGhpcy5fY2FtZXJhQ29udHJvbHMudXBkYXRlKCk7CiAgICAgICAgICAgIHRoaXMuX3NpbGVudCA9IGZhbHNlOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBUcmlnZ2VyZWQgd2hlbiBjYW1lcmEgcG9zaXRpb24gY2hhbmdlZC4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqLwogICAgICAgIF9vbkNhbWVyYVBvc2l0aW9uQ2hhbmdlKGV2ZW50KSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9zaWxlbnQpCiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIHRoaXMuZGlzcGF0Y2hFdmVudCh7IHR5cGU6ICdjYW1lcmFQb3NpdGlvbkNoYW5nZScsIGV2ZW50OiBldmVudCB9KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUG9zaXRpb25zIGNhbWVyYSBvbiBzdWNoIGRpc3RhbmNlIGZyb20gdGhlIG9iamVjdCB0aGF0IHRoZSB3aG9sZSBvYmplY3QgaXMKICAgICAgICAgKiB2aXNpYmxlLgogICAgICAgICAqIEBwYXJhbSB7IVRIUkVFLk1lc2h9IG1lc2ggTWVzaCB0byBmaXQgaW50byB2aWV3cG9ydC4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqLwogICAgICAgIF9maXRPYmplY3RUb1ZpZXdwb3J0KG1lc2gpIHsKICAgICAgICAgICAgLy8gU21hbGwgb2Zmc2V0IG11bHRpcGxpY2F0b3IgdG8gYXZvaWQgZWRnZXMgb2YgbWVzaCB0b3VjaGluZyBlZGdlcyBvZgogICAgICAgICAgICAvLyB2aWV3cG9ydC4KICAgICAgICAgICAgY29uc3Qgb2Zmc2V0ID0gMS4yNTsKICAgICAgICAgICAgY29uc3QgYm91bmRpbmdCb3ggPSBuZXcgQm94MygpOwogICAgICAgICAgICBjb25zdCBjZW50ZXIgPSBuZXcgVmVjdG9yMygpOwogICAgICAgICAgICBjb25zdCBzaXplID0gbmV3IFZlY3RvcjMoKTsKICAgICAgICAgICAgYm91bmRpbmdCb3guc2V0RnJvbU9iamVjdChtZXNoKTsKICAgICAgICAgICAgYm91bmRpbmdCb3guZ2V0Q2VudGVyKGNlbnRlcik7CiAgICAgICAgICAgIGJvdW5kaW5nQm94LmdldFNpemUoc2l6ZSk7CiAgICAgICAgICAgIGNvbnN0IG1heF9kaW0gPSBNYXRoLm1heChzaXplLngsIHNpemUueSwgc2l6ZS56KTsKICAgICAgICAgICAgY29uc3QgZm92ID0gdGhpcy5fY2FtZXJhLmZvdiAqIChNYXRoLlBJIC8gMTgwKTsKICAgICAgICAgICAgbGV0IGNhbWVyYV96ID0gTWF0aC5hYnMobWF4X2RpbSAvICgyICogTWF0aC50YW4oZm92IC8gMikpKSAqIG9mZnNldDsKICAgICAgICAgICAgY29uc3QgbWluX3ogPSBib3VuZGluZ0JveC5taW4uejsKICAgICAgICAgICAgLy8gTWFrZSBzdXJlIHRoYXQgZXZlbiBhZnRlciBhcmJpdHJhcnkgcm90YXRpb24gbWVzaCB3b24ndCBiZSBjbGlwcGVkLgogICAgICAgICAgICBjb25zdCBjYW1lcmFfdG9fZmFyX2VkZ2UgPSBtaW5feiA8IDAgPyAtbWluX3ogKyBjYW1lcmFfeiA6IGNhbWVyYV96IC0gbWluX3o7CiAgICAgICAgICAgIC8vIFNldCBjYW1lcmEgcG9zaXRpb24gYW5kIG9yaWVudGF0aW9uLgogICAgICAgICAgICB0aGlzLnNldENhbWVyYVZpZXdwb2ludCh7IHg6IGNlbnRlci54LCB5OiBjZW50ZXIueSwgejogY2FtZXJhX3ogfSwgY2FtZXJhX3RvX2Zhcl9lZGdlICogMywgY2VudGVyKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBtZXNoIGdlb21ldHJ5IGZvciBjdXJyZW50IHN0ZXAgZGF0YS4KICAgICAgICAgKiBAcGFyYW0geyFPYmplY3R9IG1lc2hEYXRhIE9iamVjdCB3aXRoIG1lc2ggZGF0YS4KICAgICAgICAgKiBAcGFyYW0geyFPYmplY3R9IGNvbmZpZyBTY2VuZSByZW5kZXJpbmcgY29uZmlndXJhdGlvbi4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqLwogICAgICAgIF9jcmVhdGVNZXNoKG1lc2hEYXRhLCBjb25maWcpIHsKICAgICAgICAgICAgY29uc3QgdmVydGljZXMgPSBtZXNoRGF0YS52ZXJ0aWNlczsKICAgICAgICAgICAgY29uc3QgZmFjZXMgPSBtZXNoRGF0YS5mYWNlczsKICAgICAgICAgICAgY29uc3QgY29sb3JzID0gbWVzaERhdGEuY29sb3JzOwogICAgICAgICAgICBjb25zdCBtZXNoX2NvbmZpZyA9IHRoaXMuX2FwcGx5RGVmYXVsdHMoY29uZmlnLCB7CiAgICAgICAgICAgICAgICBtYXRlcmlhbDogewogICAgICAgICAgICAgICAgICAgIGNsczogJ01lc2hTdGFuZGFyZE1hdGVyaWFsJywKICAgICAgICAgICAgICAgICAgICBjb2xvcjogJyNhMGEwYTAnLAogICAgICAgICAgICAgICAgICAgIHJvdWdobmVzczogMSwKICAgICAgICAgICAgICAgICAgICBtZXRhbG5lc3M6IDAsCiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICB9KTsKICAgICAgICAgICAgbGV0IGdlb21ldHJ5ID0gbmV3IEdlb21ldHJ5KCk7CiAgICAgICAgICAgIHZlcnRpY2VzLmZvckVhY2goZnVuY3Rpb24gKHBvaW50KSB7CiAgICAgICAgICAgICAgICBsZXQgcCA9IG5ldyBWZWN0b3IzKHBvaW50WzBdLCBwb2ludFsxXSwgcG9pbnRbMl0pOwogICAgICAgICAgICAgICAgY29uc3Qgc2NhbGUgPSAxOwogICAgICAgICAgICAgICAgcC54ID0gcG9pbnRbMF0gKiBzY2FsZTsKICAgICAgICAgICAgICAgIHAueSA9IHBvaW50WzFdICogc2NhbGU7CiAgICAgICAgICAgICAgICBwLnogPSBwb2ludFsyXSAqIHNjYWxlOwogICAgICAgICAgICAgICAgZ2VvbWV0cnkudmVydGljZXMucHVzaChwKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGZhY2VzLmZvckVhY2goZnVuY3Rpb24gKGZhY2VfaW5kaWNlcykgewogICAgICAgICAgICAgICAgbGV0IGZhY2UgPSBuZXcgRmFjZTMoZmFjZV9pbmRpY2VzWzBdLCBmYWNlX2luZGljZXNbMV0sIGZhY2VfaW5kaWNlc1syXSk7CiAgICAgICAgICAgICAgICBpZiAoY29sb3JzICYmIGNvbG9ycy5sZW5ndGgpIHsKICAgICAgICAgICAgICAgICAgICBjb25zdCBmYWNlX2NvbG9ycyA9IFsKICAgICAgICAgICAgICAgICAgICAgICAgY29sb3JzW2ZhY2VfaW5kaWNlc1swXV0sCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yc1tmYWNlX2luZGljZXNbMV1dLAogICAgICAgICAgICAgICAgICAgICAgICBjb2xvcnNbZmFjZV9pbmRpY2VzWzJdXSwKICAgICAgICAgICAgICAgICAgICBdOwogICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZmFjZV9jb2xvcnMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgdmVydGV4X2NvbG9yID0gZmFjZV9jb2xvcnNbaV07CiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb2xvciA9IG5ldyBDb2xvciQ3KHZlcnRleF9jb2xvclswXSAvIDI1NSwgdmVydGV4X2NvbG9yWzFdIC8gMjU1LCB2ZXJ0ZXhfY29sb3JbMl0gLyAyNTUpOwogICAgICAgICAgICAgICAgICAgICAgICBmYWNlLnZlcnRleENvbG9ycy5wdXNoKGNvbG9yKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBnZW9tZXRyeS5mYWNlcy5wdXNoKGZhY2UpOwogICAgICAgICAgIC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HJpdmF0ZQogICAgICAgICAqLwogICAgICAgIF9jcmVhdGVMaWdodHMoc2NlbmUsIGNvbmZpZykgewogICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGNvbmZpZy5saWdodHMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIGNvbnN0IGxpZ2h0X2NvbmZpZyA9IGNvbmZpZy5saWdodHNbaV07CiAgICAgICAgICAgICAgICBsZXQgbGlnaHQgPSBuZXcgVEhSRUUkMVtsaWdodF9jb25maWcuY2xzXShsaWdodF9jb25maWcuY29sb3IsIGxpZ2h0X2NvbmZpZy5pbnRlbnNpdHkpOwogICAgICAgICAgICAgICAgaWYgKGxpZ2h0X2NvbmZpZy5wb3NpdGlvbikgewogICAgICAgICAgICAgICAgICAgIGxpZ2h0LnBvc2l0aW9uLnNldChsaWdodF9jb25maWcucG9zaXRpb25bMF0sIGxpZ2h0X2NvbmZpZy5wb3NpdGlvblsxXSwgbGlnaHRfY29uZmlnLnBvc2l0aW9uWzJdKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHNjZW5lLmFkZChsaWdodCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CgogICAgbGV0IFRmTWVzaExvYWRlckltcGwgPSBjbGFzcyBUZk1lc2hMb2FkZXJJbXBsIGV4dGVuZHMgTGVnYWN5RWxlbWVudE1peGluKFBvbHltZXJFbGVtZW50KSB7CiAgICAgICAgY29uc3RydWN0b3IoKSB7CiAgICAgICAgICAgIHN1cGVyKC4uLmFyZ3VtZW50cyk7CiAgICAgICAgICAgIHRoaXMuc2VsZWN0ZWRWaWV3ID0gJ2FsbCc7CiAgICAgICAgICAgIHRoaXMuYWN0aXZlID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuX2NvbG9yU2NhbGVGdW5jdGlvbiA9IHJ1bnNDb2xvclNjYWxlOwogICAgICAgICAgICB0aGlzLl9zdGVwcyA9IFtdOwogICAgICAgICAgICB0aGlzLl9tZX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aGlzKSk7CiAgICAgICAgICAgIG1lc2hWaWV3ZXIuYWRkRXZlbnRMaXN0ZW5lcignY2FtZXJhUG9zaXRpb25DaGFuZ2UnLCB0aGlzLl9vbkNhbWVyYVBvc2l0aW9uQ2hhbmdlLmJpbmQodGhpcykpOwogICAgICAgICAgICB0aGlzLl9tZXNoVmlld2VyID0gbWVzaFZpZXdlcjsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogRnVuY3Rpb24gdG8gY2FsbCB3aGVuIGNvbXBvbmVudCBtdXN0IGJlIHJlbG9hZGVkLgogICAgICAgICAqLwogICAgICAgIHJlbG9hZCgpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLmFjdGl2ZSB8fCAhdGhpcy5fZGF0YVByb3ZpZGVyKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5faXNNZXNoTG9hZGluZyA9IHRydWU7CiAgICAgICAgICAgIHRoaXMuX2RhdGFQcm92aWRlcgogICAgICAgICAgICAgICAgLnJlbG9hZCh0aGlzLnJ1biwgdGhpcy50YWcsIHRoaXMuc2FtcGxlKQogICAgICAgICAgICAgICAgLnRoZW4oKHN0ZXBzKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAoIXN0ZXBzKQogICAgICAgICAgICAgICAgICAgIHJldHVybjsgLy8gSGFwcGVucyB3aGVuIHJlcXVlc3Qgd2FzIGNhbmNlbGxlZCBhdCBzb21lIHBvaW50LgogICAgICAgICAgICAgICAgdGhpcy5fc3RlcHMgPSBzdGVwczsKICAgICAgICAgICAgICAgIHRoaXMuX3N0ZXBJbmRleCA9IHN0ZXBzLmxlbmd0aCAtIDE7CiAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAuY2F0Y2goKGVycm9yKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAoIWVycm9yIHx8ICFlcnJvci5jb2RlIHx8IGVycm9yLmNvZGUgIT0gRXJyb3JDb2Rlcy5DQU5DRUxMRUQpIHsKICAgICAgICAgICAgICAgICAgICBlcnJvciA9IGVycm9yIHx8ICdSZXNwb25zZSBwcm9jZXNzaW5nIGZhaWxlZC4nOwogICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihlcnJvcik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBVcGRhdGVzIHRoZSBzY2VuZS4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqLwogICAgICAgIF91cGRhdGVTY2VuZSgpIHsKICAgICAgICAgICAgY29uc3QgY3VycmVudFN0ZXAgPSB0aGlzLl9jdXJyZW50U3RlcDsKICAgICAgICAgICAgLy8gTWVzaCBkYXRhIGlzIG5vdCBmZXRjaGVkIHlldC4gUGxlYXNlIHNlZSBgX21heWJlRmV0Y2hNZXNoYC4KICAgICAgICAgICAgaWYgKCFjdXJyZW50U3RlcCB8fCAhY3VycmVudFN0ZXAubWVzaCkKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgdGhpcy5fbWVzaFZpZXdlci51cGRhdGVTY2VuZShjdXJyZW50U3RlcCwgdGhpcyk7CiAgICAgICAgICAgIGlmICghdGhpcy5fY2FtZXJhUG9zaXRpb25Jbml0aWFsaXplZCkgewogICAgICAgICAgICAgICAgdGhpcy5fbWVzaFZpZXdlci5yZXNldFZpZXcoKTsKICAgICAgICAgICAgICAgIHRoaXMuX2NhbWVyYVBvc2l0aW9uSW5pdGlhbGl6ZWQgPSB0cnVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICghdGhpcy5fbWVzaFZpZXdlckF0dGFjaGVkKSB7CiAgICAgICAgICAgICAgICAvLyBNZXNoIHZpZXdlciBzaG91bGQgYmUgYWRkZWQgdG8gdGhlIGRvbSBvbmNlLgogICAgICAgICAgICAgICAgdGhpcy5zaGFkb3dSb290LmFwcGVuZENoaWxkKHRoaXMuX21lc2hWaWV3ZXIuZ2V0UmVuZGVyZXIoKS5kb21FbGVtZW50KTsKICAgICAgICAgICAgICAgIHRoaXMuX21lc2hWaWV3ZXJBdHRhY2hlZCA9IHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgX2RlYm91bmNlZEZldGNoTWVzaCgpIHsKICAgICAgICAgICAgdGhpcy5kZWJvdW5jZSgnZmV0Y2hNZXNoJywgKCkgPT4gdGhpcy5fbWF5YmVGZXRjaE1lc2goKSwgMTAwKTsKICAgICAgICB9CiAgICAgICAgX21heWJlRmV0Y2hNZXNoKCkgewogICAgICAgICAgICByZXR1cm4gX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkgewogICAgICAgICAgICAgICAgY29uc3QgY3VycmVudFN0ZXAgPSB0aGlzLl9jdXJyZW50U3RlcDsKICAgICAgICAgICAgICAgIGlmICghY3VycmVudFN0ZXAgfHwgY3VycmVudFN0ZXAubWVzaCB8fCBjdXJyZW50U3RlcC5tZXNoRmV0Y2hpbmcpCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgY3VycmVudFN0ZXAubWVzaEZldGNoaW5nID0gdHJ1ZTsKICAgICAgICAgICAgICAgIHRoaXMuX2lzTWVzaExvYWRpbmcgPSB0cnVlOwogICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICBjb25zdCBtZXNoRGF0YSA9IHlpZWxkIHRoaXMuX2RhdGFQcm92aWRlci5mZXRjaERhdGEoY3VycmVudFN0ZXAsIHRoaXMucnVuLCB0aGlzLnRhZywgdGhpcy5zYW1wbGUpOwogICAgICAgICAgICAgICAgICAgIGN1cnJlbnRTdGVwLm1lc2ggPSBtZXNoRGF0YVswXTsKICAgICAgICAgICAgICAgICAgICB0aGlzLm5vdGlmeVBhdGgoJ19jdXJyZW50U3RlcC5tZXNoJyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjYXRjaCAoZXJyb3IpIHsKICAgICAgICAgICAgICAgICAgICBpZiAoIWVycm9yIHx8ICFlcnJvci5jb2RlIHx8IGVycm9yLmNvZGUgIT0gRXJyb3JDb2Rlcy5DQU5DRUxMRUQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3IgPSBlcnJvciB8fCAnUmVzcG9uc2UgcHJvY2Vzc2luZyBmYWlsZWQuJzsKICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGVycm9yKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmaW5hbGx5IHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9pc01lc2hMb2FkaW5nID0gZmFsc2U7CiAgICAgICAgICAgICAgICAgICAgY3VycmVudFN0ZXAubWVzaEZldGNoaW5nID0gZmFsc2U7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBQcm9wYWdhdGVzIGNhbWVyYSBwb3NpdGlvbiBjaGFuZ2UgZXZlbnQgb3V0c2lkZSBvZiB0aGUgbG9hZGVyLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICovCiAgICAgICAgX29uQ2FtZXJhUG9zaXRpb25DaGFuZ2UoKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5fbWVzaFZpZXdlci5pc1JlYWR5KCkpCiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIGNvbnN0IGV2ZW50ID0gbmV3IEN1c3RvbUV2ZW50KCdjYW1lcmEtcG9zaXRpb24tY2hhbmdlJywgewogICAgICAgICAgICAgICAgZGV0YWlsOiB0aGlzLl9tZXNoVmlld2VyLmdldENhbWVyYVBvc2l0aW9uKCksCiAgICAgICAgICAgIH0pOwogICAgICAgICAgICB0aGlzLmRpc3BhdGNoRXZlbnQoZXZlbnQpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKi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ZXIuc2V0Q2FudmFzU2l6ZShjYW52YXNTaXplKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmUtcmVuZGVycyBjb21wb25lbnQgaW4gdGhlIGJyb3dzZXIuCiAgICAgICAgICovCiAgICAgICAgcmVkcmF3KCkgewogICAgICAgICAgICB0aGlzLl91cGRhdGVDYW52YXNTaXplKCk7CiAgICAgICAgICAgIC8vIERvIG5vdCByZW5kZXIgaWYgbm90IGluIHRoZSBET00uCiAgICAgICAgICAgIGlmICghdGhpcy5pc0Nvbm5lY3RlZCkKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgdGhpcy5fbWVzaFZpZXdlci5kcmF3KCk7CiAgICAgICAgfQogICAgICAgIF9oYXNBdExlYXN0T25lU3RlcChzdGVwcykgewogICAgICAgICAgICByZXR1cm4gISFzdGVwcyAmJiBzdGVwcy5sZW5ndGggPiAwOwogICAgICAgIH0KICAgICAgICBfaGFzTXVsdGlwbGVTdGVwcyhzdGVwcykgewogICAgICAgICAgICByZXR1cm4gISFzdGVwcyAmJiBzdGVwcy5sZW5ndGggPiAxOwogICAgICAgIH0KICAgICAgICBnZXQgX2N1cnJlbnRTdGVwKCkgewogICAgICAgICAgICB2YXIgc3RlcHMgPSB0aGlzLl9zdGVwczsKICAgICAgICAgICAgdmFyIHN0ZXBJbmRleCA9IHRoaXMuX3N0ZXBJbmRleDsKICAgICAgICAgICAgcmV0dXJuIHN0ZXBzW3N0ZXBJbmRleF0gfHwgbnVsbDsKICAgICAgICB9CiAgICAgICAgZ2V0IF9zdGVwVmFsdWUoKSB7CiAgICAgICAgICAgIGNvbnN0IGN1cnJlbnRTdGVwID0gdGhpcy5fY3VycmVudFN0ZXA7CiAgICAgICAgICAgIGlmICghY3VycmVudFN0ZXApCiAgICAgICAgICAgICAgICByZXR1cm4gMDsKICAgICAgICAgICAgcmV0dXJuIGN1cnJlbnRTdGVwLnN0ZXA7CiAgICAgICAgfQogICAgICAgIGdldCBfY3VycmVudFdhbGxUaW1lKCkgewogICAgICAgICAgICBjb25zdCBjdXJyZW50U3RlcCA9IHRoaXMuX2N1cnJlbnRTdGVwOwogICAgICAgICAgICBpZiAoIWN1cnJlbnRTdGVwKQogICAgICAgICAgICAgICAgcmV0dXJuICcnOwogICAgICAgICAgICByZXR1cm4gZm9ybWF0RGF0ZSQxKGN1cnJlbnRTdGVwLndhbGxfdGltZSk7CiAgICAgICAgfQogICAgICAgIF9nZXRNYXhTdGVwSW5kZXgoc3RlcHMpIHsKICAgICAgICAgICAgcmV0dXJuIHN0ZXBzLmxlbmd0aCAtIDE7CiAgICAgICAgfQogICAgICAgIF9nZXRTYW1wbGVUZXh0KHNhbXBsZSkgewogICAgICAgICAgICByZXR1cm4gU3RyaW5nKHNhbXBsZSArIDEpOwogICAgICAgIH0KICAgICAgICBfaGFzTXVsdGlwbGVTYW1wbGVzKG9mU2FtcGxlcykgewogICAgICAgICAgICByZXR1cm4gb2ZTYW1wbGVzID4gMTsKICAgICAgICB9CiAgICAgICAgX3VwZGF0ZVZpZXcoKSB7CiAgICAgICAgICAgIHZhciBzZWxlY3RlZFZpZXcgPSB0aGlzLnNlbGVjdGVkVmlldzsKICAgICAgICAgICAgaWYgKHRoaXMuX21lc2hWaWV3ZXIgJiYgc2VsZWN0ZWRWaWV3ID09ICdhbGwnKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9tZXNoVmlld2VyLnJlc2V0VmlldygpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHRvTG9jYWxlU3RyaW5nXyhudW1iZXIpIHsKICAgICAgICAgICAgLy8gU2hvd3MgY29tbWFzIChvciBsb2NhbGUtYXBwcm9wcmlhdGUgcHVuY3R1YXRpb24pIGZvciBsYXJnZSBudW1iZXJzLgogICAgICAgICAgICByZXR1cm4gbnVtYmVyLnRvTG9jYWxlU3RyaW5nKCk7CiAgICAgICAgfQogICAgfTsKICAgIFRmTWVzaExvYWRlckltcGwudGVtcGxhdGUgPSBodG1s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hcGVyLXNwaW5uZXItbGl0ZT4KICAgICAgICAgIDwvZGl2PgogICAgICAgIDwvZGl2PgogICAgICA8L3RlbXBsYXRlPgogICAgICA8dGVtcGxhdGUgaXM9ImRvbS1pZiIgaWY9IltbX2hhc011bHRpcGxlU3RlcHMoX3N0ZXBzKV1dIj4KICAgICAgICA8ZGl2PgogICAgICAgICAgPHBhcGVyLXNsaWRlcgogICAgICAgICAgICBpZD0ic3RlcHMiCiAgICAgICAgICAgIGltbWVkaWF0ZS12YWx1ZT0ie3tfc3RlcEluZGV4fX0iCiAgICAgICAgICAgIG1heD0iW1tfZ2V0TWF4U3RlcEluZGV4KF9zdGVwcyldXSIKICAgICAgICAgICAgbWF4LW1hcmtlcnM9IltbX2dldE1heFN0ZXBJbmRleChfc3RlcHMpXV0iCiAgICAgICAgICAgIHNuYXBzCiAgICAgICAgICAgIHN0ZXA9IjEiCiAgICAgICAgICAgIHZhbHVlPSJ7e19zdGVwSW5kZXh9fSIKICAgICAgICAgID48L3BhcGVyLXNsaWRlcj4KICAgICAgICA8L2Rpdj4KICAgICAgPC90ZW1wbGF0ZT4KICAgIDwvdGYtY2FyZC1oZWFkaW5nPgogICAgPHN0eWxlPgogICAgICBwYXBlci1zbGlkZXIgewogICAgICAgIHdpZHRoOiAxMDAlOwogICAgICAgIG1hcmdpbi1sZWZ0OiAxcHg7CiAgICAgICAgbWFyZ2luLXJpZ2h0OiAxcHg7CiAgICAgIH0KICAgICAgLnRmLW1lc2gtbG9hZGVyLWhlYWRlciB7CiAgICAgICAgZGlzcGxheTogYmxvY2s7CiAgICAgICAgaGVpZ2h0OiAxMDVweDsKICAgICAgfQogICAgICBbaGlkZGVuXSB7CiAgICAgICAgZGlzcGxheTogbm9uZTsKICAgICAgfQogICAgPC9zdHlsZT4KICBgOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoeyB0eXBlOiBTdHJpbmcgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cG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09PSovCiAgICBsZXQgTWVzaERhc2hib2FyZCA9IGNsYXNzIE1lc2hEYXNoYm9hcmQgZXh0ZW5kcyBQb2x5bWVyRWxlbWVudCB7CiAgICAgICAgY29uc3RydWN0b3IoKSB7CiAgICAgICAgICAgIHN1cGVyKCk7CiAgICAgICAgICAgIHRoaXMucmVsb2FkT25SZWFkeSA9IHRydWU7CiAgICAgICAgICAgIHRoaXMuX3RhZ0ZpbHRlciA9ICcuKic7CiAgICAgICAgICAgIHRoaXMuX3NlbGVjdGVkVmlldyA9ICdhbGwnOwogICAgICAgICAgICB0aGlzLl9yZXF1ZXN0TWFuYWdlciA9IG5ldyBSZXF1ZXN0TWFuYWdlcigpOwogICAgICAgICAgICB3aW5kb3cuYWRkRXZlbnRMaXN0ZW5lcigncmVzaXplJywgKCkgPT4gewogICAgICAgICAgICAgICAgdGhpcy5faGFuZGxlV2luZG93UmVzaXplKCk7CiAgICAgICAgICAgIH0sIGZhbHNlKTsKICAgICAgICAgICAgaWYgKHRoaXMucmVsb2FkT25SZWFkeSkKICAgICAgICAgICAgICAgIHRoaXMucmVsb2FkKCk7CiAgICAgICAgfQogICAgICAgIF9nZXRBbGxDaGlsZHJlbigpIHsKICAgICAgICAgICAgcmV0dXJuIEFycmF5LmZyb20odGhpcy5zaGFkb3dSb290LnF1ZXJ5U2VsZWN0b3JBbGwoJ3RmLW1lc2gtbG9hZGVyJykpOwogICAgICAgIH0KICAgICAgICBfb25DYW1lcmFQb3NpdGlvbkNoYW5nZWQoZXZlbnQpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX3NlbGVjdGVkVmlldyA9PSAnc2hhcmUnKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9nZXRBbGxDaGlsZHJlbigpLmZvckVhY2goKGcpID0+IHsKICAgICAgICAgICAgICAgICAgICBpZiAoZXZlbnQudGFyZ2V0ID09IGcpCiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsgLy8gRG8gbm90IHVwZGF0ZSB0cmlnZ2VyIGNhbWVyYS4KICAgICAgICAgICAgICAgICAgICBnLnNldENhbWVyYVZpZXdwb2ludChldmVudC5kZXRhaWwucG9zaXRpb24sIGV2ZW50LmRldGFpbC5mYXIsIGV2ZW50LmRldGFpbC50YXJnZXQpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgX3Nob3VsZE9wZW4oaW5kZXgpIHsKICAgICAgICAgICAgcmV0dXJuIGluZGV4IDw9IDI7CiAgICAgICAgfQogICAgICAgIHJlbG9hZCgpIHsKICAgICAgICAgICAgdGhpcy5fZmV0Y2hUYWdzKCkudGhlbih0aGlzLl9yZWxvYWRNZXNoZXMuYmluZCh0aGlzKSk7CiAgICAgICAgfQogICAgICAgIF9oYW5kbGVXaW5kb3dSZXNpemUoKSB7CiAgICAgICAgICAgIHRoaXMuX2dldEFsbENoaWxkcmVuKCkuZm9yRWFjaCgoZykgPT4gewogICAgICAgICAgICAgICAgZy5yZWRyYXcoKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIF9mZXRjaFRhZ3MoKSB7CiAgICAgICAgICAgIGNvbnN0IHVybCA9IGdldFJvdXRlcigpLnBsdWdpblJvdXRlKCdtZXNoJywgJy90YWdzJyk7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9yZXF1ZXN0TWFuYWdlci5yZXF1ZXN0KHVybCkudGhlbigocnVuVG9UYWdJbmZvKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAobG9kYXNoLmlzRXF1YWwocnVuVG9UYWdJbmZvLCB0aGlzLl9ydW5Ub1RhZ0luZm8pKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gTm8gbmVlZCB0byB1cGRhdGUgYW55dGhpbmcgaWYgdGhlcmUgYXJlIG5vIGNoYW5nZXMuCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgY29uc3QgcnVuVG9UYWcgPSBsb2Rh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gICAgICAgICAgICAgICByZXR1cm4gbG9kYXNoLnJhbmdlKHNhbXBsZXMpLm1hcCgoaSkgPT4gT2JqZWN0LmFzc2lnbih7fSwgaXRlbSwgewogICAgICAgICAgICAgICAgICAgIHNhbXBsZTogaSwKICAgICAgICAgICAgICAgICAgICBvZlNhbXBsZXM6IHNhbXBsZXMsCiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY29uc3Qgd2l0aFNhbXBsZXMgPSBiYXNlQ2F0ZWdvcmllcy5tYXAoKGNhdGVnb3J5KSA9PiBPYmplY3QuYXNzaWduKHt9LCBjYXRlZ29yeSwgewogICAgICAgICAgICAgICAgaXRlbXM6IFtdLmNvbmNhdC5hcHBseShbXSwgY2F0ZWdvcnkuaXRlbXMubWFwKGV4cGxvZGVJdGVtKSksCiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgcmV0dXJuIHdpdGhTYW1wbGVzOwogICAgICAgIH0KICAgIH07CiAgICBNZXNoRGFzaGJvYXJkLnRlbXBsYXRlID0gaHRtbCBgCiAgICA8dGYtZGFzaGJvYXJkLWxheW91dD4KICAgICAgPGRpdiBzbG90PSJzaWRlYmFyIiBjbGFzcz0iYWxsLWNvbnRyb2xzIj4KICAgICAgICA8ZGl2IGNsYXNzPSJzZXR0aW5ncyI+CiAgICAgICAgICA8ZGl2IGNsYXNzPSJzaWRlYmFyLXNlY3Rpb24gdmlldy1jb250cm9sIj4KICAgICAgICAgICAgPGgzIGNsYXNzPSJ0aXRsZSI+UG9pbnQgb2YgdmlldzwvaDM+CiAgICAgICAgICAgIDxkaXY+CiAgICAgICAgICAgICAgPHBhcGVyLXJhZGlvLWdyb3VwCiAgICAgICAgICAgICAgICBpZD0idmlldy1yYWRpby1ncm91cCIKICAgICAgICAgICAgICAgIHNlbGVjdGVkPSJ7e19zZWxlY3RlZFZpZXd9fSIKICAgICAgICAgICAgICA+CiAgICAgICAgICAgICAgICA8cGFwZXItcmFkaW8tYnV0dG9uIGlkPSJhbGwtcmFkaW8tYnV0dG9uIiBuYW1lPSJhbGwiPgogICAgICAgICAgICAgICAgICBEaXNwbGF5IGFsbCBwb2ludHMKICAgICAgICAgICAgICAgIDwvcGFwZXItcmFkaW8tYnV0dG9uPgogICAgICAgICAgICAgICAgPHBhcGVyLXRvb2x0aXAKICAgICAgICAgICAgICAgICAgYW5pbWF0aW9uLWRlbGF5PSIwIgogICAgICAgICAgICAgICAgICBmb3I9ImFsbC1yYWRpby1idXR0b24iCiAgICAgICAgICAgICAgICAgIHBvc2l0aW9uPSJyaWdodCIKICAgICAgICAgICAgICAgICAgb2Zmc2V0PSIwIgogICAgICAgICAgICAgICAgPgogICAgICAgICAgICAgICAgICBab29tIGFuZCBjZW50ZXIgY2FtZXJhIHRvIGRpc3BsYXkgYWxsIHBvaW50cyBhdCBvbmNlLiBOb3RlLAogICAgICAgICAgICAgICAgICB0aGF0IHNvbWUgcG9pbnRzIGNvdWxkIGJlIHRvbyBmYXIgKGkuZS4gdG9vIHNtYWxsKSB0byBiZQogICAgICAgICAgICAgICAgICB2aXNpYmxlLgogICAgICAgICAgICAgICAgPC9wYXBlci10b29sdGlwPgogICAgICAgICAgICAgICAgPHBhcGVyLXJhZGlvLWJ1dHRvbiBpZD0idXNlci1yYWRpby1idXR0b24iIG5hbWU9InVzZXIiPgogICAgICAgICAgICAgICAgICBDdXJyZW50IHZpZXcKICAgICAgICAgICAgICAgIDwvcGFwZXItcmFkaW8tYnV0dG9uPgogICAgICAgICAgICAgICAgPHBhcGVyLXRvb2x0aXAKICAgICAgICAgICAgICAgICAgYW5pbWF0aW9uLWRlbGF5PSIwIgogICAgICAgICAgICAgICAgICBmb3I9InVzZXItcmFkaW8tYnV0dG9uIgogICAgICAgICAgICAgICAgICBwb3NpdGlvbj0icmlnaHQiCiAgICAgICAgICAgICAgICAgIG9mZnNldD0iMCIKICAgICAgICAgICAgICAgID4KICAgICAgICAgICAgICAgICAgS2VlcCBjdXJyZW50IGNhbWVyYSBwb3NpdGlvbiBhbmQgem9vbSBsZXZlbC4KICAgICAgICAgICAgICAgIDwvcGFwZXItdG9vbHRpcD4KICAgICAgICAgICAgICAgIDxwYXBlci1yYWRpby1idXR0b24gaWQ9InNoYXJlLXJhZGlvLWJ1dHRvbiIgbmFtZT0ic2hhcmUiPgogICAgICAgICAgICAgICAgICBTaGFyZSB2aWV3cG9pbnQKICAgICAgICAgICAgICAgIDwvcGFwZXItcmFkaW8tYnV0dG9uPgogICAgICAgICAgICAgICAgPHBhcGVyLXRvb2x0aXAKICAgICAgICAgICAgICAgICAgYW5pbWF0aW9uLWRlbGF5PSIwIgogICAgICAgICAgICAgICAgICBmb3I9InNoYXJlLXJhZGlvLWJ1dHRvbiIKICAgICAgICAgICAgICAgICAgcG9zaXRpb249InJpZ2h0IgogICAgICAgICAgICAgICAgICBvZmZzZXQ9IjAiCiAgICAgICAgICAgICAgICA+CiAgICAgICAgICAgICAgICAgIFNoYXJlIHZpZXdwb2ludCBhbW9uZyBhbGwgY2FtZXJhcy4KICAgICAgICAgICAgICAgIDwvcGFwZXItdG9vbHRpcD4KICAgICAgICAgICAgICA8L3BhcGVyLXJhZGlvLWdyb3VwPgogICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgIDwvZGl2PgogICAgICAgIDwvZGl2PgogICAgICAgIDxkaXYgY2xhc3M9InNpZGViYXItc2VjdGlvbiBydW5zLXNlbGVjdG9yIj4KICAgICAgICAgIDx0Zi1ydW5zLXNlbGVjdG9yIHNlbGVjdGVkLXJ1bnM9Int7X3NlbGVjdGVkUnVuc319Ij4KICAgICAgICAgIDwvdGYtcnVucy1zZWxlY3Rvcj4KICAgICAgICA8L2Rpdj4KICAgICAgPC9kaXY+CiAgICAgIDxkaXYgc2xvdD0iY2VudGVyIj4KICAgICAgICA8dGVtcGxhdGUgaXM9ImRvbS1pZiIgaWY9IltbX2RhdGFOb3RGb3VuZF1dIj4KICAgICAgICAgIDxkaXYgY2xhc3M9Im5vLWRhdGEtd2FybmluZyI+CiAgICAgICAgICAgIDxoMz5ObyBwb2ludCBjbG91ZCBkYXRhIHdhcyBmb3VuZC48L2gzPgogICAgICAgICAgICA8cD5Qcm9iYWJsZSBjYXVzZXM6PC9wPgogICAgICAgICAgICA8dWw+CiAgICAgICAgICAgICAgPGxpPgogICAgICAgICAgICAgICAgWW91IGhhdmVu4oCZdCB3cml0dGVuIGFueSBwb2ludCBjbG91ZCBkYXRhIHRvIHlvdXIgZXZlbnQgZmlsZXMuCiAgICAgICAgICAgICAgPC9saT4KICAgICAgICAgICAgICA8bGk+VGVuc29yQm9hcmQgY2Fu4oCZdCBmaW5kIHlvdXIgZXZlbnQgZmlsZXMuPC9saT4KICAgICAgICAgICAgPC91bD4KCiAgICAgICAgICAgIDxwPgogICAgICAgICAgICAgIElmIHlvdeKAmXJlIG5ldyB0byB1c2luZyBUZW5zb3JCb2FyZCwgYW5kIHdhbnQgdG8gZmluZCBvdXQgaG93IHRvCiAgICAgICAgICAgICAgYWRkIGRhdGEgYW5kIHNldCB1cCB5b3VyIGV2ZW50IGZpbGVzLCBjaGVjayBvdXQgdGhlCiAgICAgICAgICAgICAgPGEKICAgICAgICAgICAgICAgIGhyZWY9Imh0dHBzOi8vZ2l0aHViLmNvbS90ZW5zb3JmbG93L3RlbnNvcmJvYXJkL2Jsb2IvbWFzdGVyL1JFQURNRS5tZCIKICAgICAgICAgICAgICAgID5SRUFETUU8L2EKICAgICAgICAgICAgICA+CiAgICAgICAgICAgICAgYW5kIHBlcmhhcHMgdGhlCiAgICAgICAgICAgICAgPGEKICAgICAgICAgICAgICAgIGhyZWY9Imh0dHBzOi8vd3d3LnRlbnNvcmZsb3cub3JnL2dldF9zdGFydGVkL3N1bW1hcmllc19hbmRfdGVuc29yYm9hcmQiCiAgICAgICAgICAgICAgICA+VGVuc29yQm9hcmQgdHV0b3JpYWw8L2EKICAgICAgICAgICAgICA+LgogICAgICAgICAgICA8L3A+CgogICAgICAgICAgICA8cD4KICAgICAgICAgICAgICB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N0aXZlPSJbW2FjdGl2ZV1dIgogICAgICAgICAgICAgICAgICBzZWxlY3RlZC12aWV3PSJbW19zZWxlY3RlZFZpZXddXSIKICAgICAgICAgICAgICAgICAgcnVuPSJbW2l0ZW0ucnVuXV0iCiAgICAgICAgICAgICAgICAgIHRhZz0iW1tpdGVtLnRhZ11dIgogICAgICAgICAgICAgICAgICBzYW1wbGU9IltbaXRlbS5zYW1wbGVdXSIKICAgICAgICAgICAgICAgICAgb2Ytc2FtcGxlcz0iW1tpdGVtLm9mU2FtcGxlc11dIgogICAgICAgICAgICAgICAgICByZXF1ZXN0LW1hbmFnZXI9IltbX3JlcXVlc3RNYW5hZ2VyXV0iCiAgICAgICAgICAgICAgICAgIGNsYXNzPSJ0Zi1tZXNoLWxvYWRlci1jb250YWluZXIiCiAgICAgICAgICAgICAgICAgIG9uLWNhbWVyYS1wb3NpdGlvbi1jaGFuZ2U9Il9vbkNhbWVyYVBvc2l0aW9uQ2hhbmdlZCIKICAgICAgICAgICAgICAgID4KICAgICAgICAgICAgICAgIDwvdGYtbWVzaC1sb2FkZXI+CiAgICAgICAgICAgICAgPC90ZW1wbGF0ZT4KICAgICAgICAgICAgPC90Zi1jYXRlZ29yeS1wYWdpbmF0ZWQtdmlldz4KICAgICAgICAgIDwvdGVtcGxhdGU+CiAgICAgICAgPC90ZW1wbGF0ZT4KICAgICAgPC9kaXY+CiAgICA8L3RmLWRhc2hib2FyZC1sYXlvdXQ+CgogICAgPHN0eWxlIGluY2x1ZGU9ImRhc2hib2FyZC1zdHlsZSI+PC9zdHlsZT4KICAgIDxzdHlsZT4KICAgICAgLm5vLWRhdGEtd2FybmluZyB7CiAgICAgICAgbWF4LXdpZHRoOiA1NDBweDsKICAgICAgICBtYXJnaW46IDgwcHggYXV0byAwIGF1dG87CiAgICAgIH0KICAgICAgcGFwZXItcmFkaW8tYnV0dG9uIHsKICAgICAgICBkaXNwbGF5OiBibG9jazsKICAgICAgICBwYWRkaW5nOiA1cHg7CiAgICAgIH0KICAgICAgLnNpZGViYXItc2VjdGlvbiBoMy50aXRsZSB7CiAgICAgICAgY29sb3I6IHZhcigtLXBhcGVyLWdyZXktODAwKTsKICAgICAgICBtYXJnaW46IDA7CiAgICAgICAgZm9udC13ZWlnaHQ6IG5vcm1hbDsKICAgICAgICBmb250LXNpemU6IDE0cHg7CiAgICAgICAgbWFyZ2luLWJvdHRvbTogNXB4OwogICAgICB9CgogICAgICAucnVucy1zZWxlY3RvciB7CiAgICAgICAgZmxleC1ncm93OiAxOwogICAgICB9CgogICAgICB0Zi1ydW5zLXNlbGVjdG9yIHsKICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICB9CgogICAgICAudmlldy1jb250cm9sIHsKICAgICAgICBkaXNwbGF5OiBibG9jayAhaW1wb3J0YW50OwogICAgICB9CgogICAgICAudmlldy1jb250cm9sIGgzLnRpdGxlIHsKICAgICAgICBwYWRkaW5nLXRvcDogMTZweDsKICAgICAgICBwYWRkaW5nLWJvdHRvbTogMTZweDsKICAgICAgfQoKICAgICAgLmFsbGNvbnRyb2xzIC52aWV3LWNvbnRyb2wgcGFwZXItcmFkaW8tZ3JvdXAgewogICAgICAgIG1hcmdpbi10b3A6IDVweDsKICAgICAgfQogICAgICAvKiBMYXlvdXQgbXVzdCBiZSBob3Jpem9udGFsLCBpLmUuIGl0ZW1zIGFycmFuZ2VkIGluIGEgcm93LiBJZiBpdGVtcyBjYW5ub3QgZml0IGluIGEgcm93LAogICAgICAgKiB0aGV5IHNob3VsZCBiZSBtb3ZlZCB0byBuZXh0IGxpbmUuIEFsbCBpdGVtcyBtdXN0IGJlIHNxdWFyZSBhdCBhbGwgdGltZXMuIE1pbmltdW0gc2l6ZSBvZgogICAgICAgKiB0aGUgaXRlbSBpcyA0ODBweC4gVGhpcyBtZWFucyB0aGF0IG1heGltdW0gc2l6ZSBvZiB0aGUgaXRlbSBtdXN0IGJlIDQ4MHB4ICsgNDc5cHggPSA5NTlweC4KICAgICAgICogKi8KICAgICAgLmh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x5bWVyRWxlbWVudCB7CiAgICAgICAgY29uc3RydWN0b3IoKSB7CiAgICAgICAgICAgIHN1cGVyKC4uLmFyZ3VtZW50cyk7CiAgICAgICAgICAgIHRoaXMuX2V4cGFuZGVkID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuX3J1blRvUHJDdXJ2ZUVudHJ5ID0ge307CiAgICAgICAgICAgIHRoaXMuX3ByZXZpb3VzUnVuVG9QckN1cnZlRW50cnkgPSB7fTsKICAgICAgICAgICAgdGhpcy5fY29sb3JTY2FsZUZ1bmN0aW9uID0geyBzY2FsZTogcnVuc0NvbG9yU2NhbGUgfTsKICAgICAgICAgICAgdGhpcy5fY2FuY2VsbGVyID0gbmV3IENhbmNlbGxlcigpOwogICAgICAgICAgICB0aGlzLl94Q29tcG9uZW50c0NyZWF0aW9uTWV0aG9kID0gKCkgPT4gewogICAgICAgICAgICAgICAgY29uc3Qgc2NhbGUgPSBuZXcgc3JjJDIuU2NhbGVzLkxpbmVhcigpOwogICAgICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgICAgICBzY2FsZTogc2NhbGUsCiAgICAgICAgICAgICAgICAgICAgYXhpczogbmV3IHNyYyQyLkF4ZXMuTnVtZXJpYyhzY2FsZSwgJ2JvdHRvbScpLAogICAgICAgICAgICAgICAgICAgIGFjY2Vzc29yOiAoZCkgPT4gZC5yZWNhbGwsCiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9OwogICAgICAgICAgICB0aGlzLl95VmFsdWVBY2Nlc3NvciA9IChkKSA9PiBkLnByZWNpc2lvbjsKICAgICAgICAgICAgdGhpcy5fdG9vbHRpcENvbHVtbnMgPSAoKCkgPT4gewogICAgICAgICAgICAgICAgY29uc3QgdmFsdWVGb3JtYXR0ZXIgPSBtdWx0aXNjYWxlRm9ybWF0dGVyKFlfVE9PTFRJUF9GT1JNQVRURVJfUFJFQ0lTSU9OKTsKICAgICAgICAgICAgICAgIGNvbnN0IGZvcm1hdFZhbHVlT3JOYU4gPSAoeCkgPT4gKGlzTmFOKHgpID8gJ05hTicgOiB2YWx1ZUZvcm1hdHRlcih4KSk7CiAgICAgICAgICAgICAgICByZXR1cm4gWwogICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICdSdW4nLAogICAgICAgICAgICAgICAgICAgICAgICBldmFsdWF0ZTogKGQpID0+IGQuZGF0YXNldC5tZXRhZGF0YSgpLm5hbWUsCiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAnVGhyZXNob2xkJywKICAgICAgICAgICAgICAgICAgICAgICAgZXZhbHVhdGU6IChkKSA9PiBmb3JtYXRWYWx1ZU9yTmFOKGQuZGF0dW0udGhyZXNob2xkcyksCiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAnUHJlY2lzaW9uJywKICAgICAgICAgICAgICAgICAgICAgICAgZXZhbHVhdGU6IChkKSA9PiBmb3JtYXRWYWx1ZU9yTmFOKGQuZGF0dW0ucHJlY2lzaW9uKSwKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICdSZWNhbGwnLAogICAgICAgICAgICAgICAgICAgICAgICBldmFsdWF0ZTogKGQpID0+IGZvcm1hdFZhbHVlT3JOYU4oZC5kYXR1bS5yZWNhbGwpLAogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ1RQJywKICAgICAgICAgICAgICAgICAgICAgICAgZXZhbHVhdGU6IChkKSA9PiBkLmRhdHVtLnRydWVfcG9zaXRpdmVzLAogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ0ZQJywKICAgICAgICAgICAgICAgICAgICAgICAgZXZhbHVhdGU6IChkKSA9PiBkLmRhdHVtLmZhbHNlX3Bvc2l0aXZlcywKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICdUTicsCiAgICAgICAgICAgICAgICAgICAgICAgIGV2YWx1YXRlOiAoZCkgPT4gZC5kYXR1bS50cnVlX25lZ2F0aXZlcywKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICdGTicsCiAgICAgICAgICAgICAgICAgICAgICAgIGV2YWx1YXRlOiAoZCkgPT4gZC5kYXR1bS5mYWxzZV9uZWdhdGl2ZXMsCiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIF07CiAgICAgICAgICAgIH0pKCk7CiAgICAgICAgICAgIHRoaXMuX3Nlcmllc0RhdGFGaWVsZHMgPSBbCiAgICAgICAgICAgICAgICAndGhyZXNob2xkcycsCiAgICAgICAgICAgICAgICAncHJlY2lzaW9uJywKICAgICAgICAgICAgICAgICdyZWNhbGwnLAogICAgICAgICAgICAgICAgJ3RydWVfcG9zaXRpdmVzJywKICAgICAgICAgICAgICAgICdmYWxzZV9wb3NpdGl2ZXMnLAogICAgICAgICAgICAgICAgJ3RydWVfbmVnYXRpdmVzJywKICAgICAgICAgICAgICAgICdmYWxzZV9uZWdhdGl2ZXMnLAogICAgICAgICAgICBdOwogICAgICAgICAgICB0aGlzLl9kZWZhdWx0WFJhbmdlID0gWy0wLjA1LCAxLjA1XTsKICAgICAgICAgICAgdGhpcy5fZGVmYXVsdFlSYW5nZSA9IFstMC4wNSwgMS4wNV07CiAgICAgICAgICAgIHRoaXMuX3JlcXVlc3REYXRhID0gKGl0ZW1zLCBvbkxvYWQsIG9uRmluaXNoKSA9PiB7CiAgICAgICAgICAgICAgICBjb25zdCByb3V0ZXIgPSBnZXRSb3V0ZXIoKTsKICAgICAgICAgICAgICAgIGNvbnN0IGJhc2VVcmwgPSByb3V0ZXIucGx1Z2luUm91dGUoJ3ByX2N1cnZlcycsICcvcHJfY3VydmVzJyk7CiAgICAgICAgICAgICAgICBQcm9taXNlLmFsbChpdGVtcy5tYXAoKGl0ZW0pID0+IHsKICAgICAgICAgICAgICAgICAgICBjb25zdCBydW4gPSBpdGVtOwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHRhZyA9IHRoaXMudGFnOwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHVybCA9IGFkZFBhcmFtcyhiYXNlVXJsLCB7IHRhZywgcnVuIH0pOwogICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLnJlcXVlc3RNYW5hZ2VyCiAgICAgICAgICAgICAgICAgICAgICAgIC5yZXF1ZXN0KHVybCkKICAgICAgICAgICAgICAgICAgICAgICAgLnRoZW4oKGRhdGEpID0+IHZvaWQgb25Mb2FkKHsgaXRlbSwgZGF0YSB9KSk7CiAgICAgICAgICAgICAgICB9KSkuZmluYWxseSgoKSA9PiB2b2lkIG9uRmluaXNoKCkpOwogICAgICAgICAgICB9OwogICAgICAgICAgICB0aGlzLl9zbW9vdGhpbmdFbmFibGVkID0gZmFsc2U7CiAgICAgICAgfQogICAgICAgIF9jcmVhdGVQcm9jZXNzRGF0YUZ1bmN0aW9uKCkgewogICAgICAgICAgICAvLyBUaGlzIGZ1bmN0aW9uIGlzIGNhbGxlZCB3aGVuIGRhdGEgaXMgcmVjZWl2ZWQgZnJvbSB0aGUgYmFja2VuZC4KICAgICAgICAgICAgcmV0dXJuIChjaGFydCwgcnVuLCBkYXRhKSA9PiB7CiAgICAgICAgICAgICAgICAvLyBUaGUgZGF0YSBtYXBzIGEgc2luZ2xlIHJ1biB0byBhIHNlcmllcyBvZiBkYXRhLiBXZSBtZXJnZSB0aGF0IGRhdGEKICAgICAgICAgICAgICAg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pIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5ydW5zLmxlbmd0aCA9PT0gMCkgewogICAgICAgICAgICAgICAgLy8gVGhlcmUgYXJlIG5vIHNlbGVjdGVkIHJ1bnMuCiAgICAgICAgICAgICAgICB0aGlzLnNldCgnX3J1blRvRGF0YU92ZXJUaW1lJywge30pOwogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2dldENoYXJ0RGF0YUxvYWRlcigpLnJlbG9hZCgpOwogICAgICAgIH0KICAgICAgICBfc2V0Q2hhcnREYXRhKCkgewogICAgICAgICAgICB2YXIgcnVuVG9QckN1cnZlRW50cnkgPSB0aGlzLl9ydW5Ub1ByQ3VydmVFbnRyeTsKICAgICAgICAgICAgdmFyIHByZXZpb3VzUnVuVG9QckN1cnZlRW50cnkgPSB0aGlzLl9wcmV2aW91c1J1blRvUHJDdXJ2ZUVudHJ5OwogICAgICAgICAgICB2YXIgc2V0T2ZSZWxldmFudFJ1bnMgPSB0aGlzLl9zZXRPZlJlbGV2YW50UnVuczsKICAgICAgICAgICAgbG9kYXNoLmZvck93bihydW5Ub1ByQ3VydmVFbnRyeSwgKGVudHJ5LCBydW4pID0+IHsKICAgICAgICAgICAgICAgIGNvbnN0IHByZXZpb3VzRW50cnkgPSBwcmV2aW91c1J1blRvUHJDdXJ2ZUVudHJ5W3J1bl07CiAgICAgICAgICAgICAgICBpZiAocHJldmlvdXNFbnRyeSAmJiBydW5Ub1ByQ3VydmVFbnRyeVtydW5dLnN0ZXAgPT09IHByZXZpb3VzRW50cnkuc3RlcCkgewogICAgICAgICAgICAgICAgICAgIC8vIFRoZSBQUiBjdXJ2ZSBmb3IgdGhpcyBydW4gZG9lcyBub3QgbmVlZCB0byBiZSB1cGRhdGVkLgogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgIC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BkYXRhIGZvciBhIHJ1biBpbiB0aGUgY2hhcnQuCiAgICAgICAgICAgIGNvbnN0IGxvYWRlciA9IHRoaXMuX2dldENoYXJ0RGF0YUxvYWRlcigpOwogICAgICAgICAgICBsb2FkZXIuc2V0U2VyaWVzRGF0YShydW4sIFtdKTsKICAgICAgICAgICAgbG9hZGVyLmNvbW1pdENoYW5nZXMoKTsKICAgICAgICB9CiAgICAgICAgX3VwZGF0ZVJ1blRvUHJDdXJ2ZUVudHJ5KCkgewogICAgICAgICAgICB2YXIgcnVuVG9EYXRhT3ZlclRpbWUgPSB0aGlzLl9ydW5Ub0RhdGFPdmVyVGltZTsKICAgICAgICAgICAgdmFyIHJ1blRvU3RlcENhcCA9IHRoaXMucnVuVG9TdGVwQ2FwOwogICAgICAgICAgICBjb25zdCBydW5Ub0VudHJ5ID0ge307CiAgICAgICAgICAgIGxvZGFzaC5mb3JPd24ocnVuVG9EYXRhT3ZlclRpbWUsIChlbnRyaWVzLCBydW4pID0+IHsKICAgICAgICAgICAgICAgIGlmICghZW50cmllcyB8fCAhZW50cmllcy5sZW5ndGgpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBydW5Ub0VudHJ5W3J1bl0gPSB0aGlzLl9jb21wdXRlRW50cnlDbG9zZXN0T3JFcXVhbFRvU3RlcENhcChydW5Ub1N0ZXBDYXBbcnVuXSwgZW50cmllcyk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICAvLyBTZXQgdGhlIHByZXZpb3VzIFBSIGN1cnZlIGVudHJ5IHNvIHdlIGNhbiBsYXRlciBjb21wYXJlIGFuZCBvbmx5CiAgICAgICAgICAgIC8vIHJlZHJhdyBmb3IgcnVucyB0aGF0IGNoYW5nZWQgaW4gc3RlcC4KICAgICAgICAgICAgdGhpcy5zZXQoJ19wcmV2aW91c1J1blRvUHJDdXJ2ZUVudHJ5JywgdGhpcy5fcnVuVG9QckN1cnZlRW50cnkpOwogICAgICAgICAgICB0aGlzLnNldCgnX3J1blRvUHJDdXJ2ZUVudHJ5JywgcnVuVG9FbnRyeSk7CiAgICAgICAgfQogICAgICAgIF9ub3RpZnlEYXRhQ2hhbmdlKCkgewogICAgICAgICAgICB2YXIgcnVuVG9EYXRhT3ZlclRpbWUgPSB0aGlzLl9ydW5Ub0RhdGFPdmVyVGltZTsKICAgICAgICAgICAgaWYgKHRoaXMub25EYXRhQ2hhbmdlKSB7CiAgICAgICAgICAgICAgICB0aGlzLm9uRGF0YUNoYW5nZShydW5Ub0RhdGFPdmVyVGltZSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgX2NvbXB1dGVFbnRyeUNsb3Nlc3RPckVxdWFsVG9TdGVwQ2FwKHN0ZXBDYXAsIGVudHJpZXMpIHsKICAgICAgICAgICAgY29uc3QgZW50cnlJbmRleCA9IE1hdGgubWluKGxvZGFzaC5zb3J0ZWRJbmRleChlbnRyaWVzLm1hcCgoZW50cnkpID0+IGVudHJ5LnN0ZXApLCBzdGVwQ2FwKSwgZW50cmllcy5sZW5ndGggLSAxKTsKICAgICAgICAgICAgcmV0dXJuIGVudHJpZXNbZW50cnlJbmRleF07CiAgICAgICAgfQogICAgICAgIGdldCBfcnVuc1dpdGhTdGVwQXZhaWxhYmxlKCkgewogICAgICAgICAgICB2YXIgcnVucyA9IHRoaXMucnVuczsKICAgICAgICAgICAgdmFyIGFjdHVhbFByQ3VydmVFbnRyeVBlclJ1biA9IHRoaXMuX3J1blRvUHJDdXJ2ZUVudHJ5OwogICAgICAgICAgICByZXR1cm4gbG9kYXNoLmZpbHRlcihydW5zLCAocnVuKSA9PiBhY3R1YWxQckN1cnZlRW50cnlQZXJSdW5bcnVuXSkuc29ydCgpOwogICAgICAgIH0KICAgICAgICBnZXQgX3NldE9mUmVsZXZhbnRSdW5zKCkgewogICAgICAgICAgICB2YXIgcnVuc1dpdGhTdGVwQXZhaWxhYmxlID0gdGhpcy5fcnVuc1dpdGhTd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gogICAgICAgICAgICBpZiAoIWVudHJ5KSB7CiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gbmV3IERhdGUoZW50cnkud2FsbF90aW1lICogMTAwMCkudG9TdHJpbmcoKTsKICAgICAgICB9CiAgICAgICAgX3RvZ2dsZUV4cGFuZGVkKGUpIHsKICAgICAgICAgICAgdGhpcy5zZXQoJ19leHBhbmRlZCcsICF0aGlzLl9leHBhbmRlZCk7CiAgICAgICAgICAgIHRoaXMucmVkcmF3KCk7CiAgICAgICAgfQogICAgICAgIF9yZXNldERvbWFpbigpIHsKICAgICAgICAgICAgdGhpcy5fZ2V0Q2hhcnREYXRhTG9hZGVyKCkucmVzZXREb21haW4oKTsKICAgICAgICB9CiAgICAgICAgcmVkcmF3KCkgewogICAgICAgICAgICB0aGlzLl9nZXRDaGFydERhdGFMb2FkZXIoKS5yZWRyYXcoKTsKICAgICAgICB9CiAgICB9OwogICAgVGZQckN1cnZlQ2FyZC50ZW1wbGF0ZSA9IGh0bWwgYAogICAgPHRmLWNhcmQtaGVhZGluZwogICAgICB0YWc9IltbdGFnXV0iCiAgICAgIGRpc3BsYXktbmFtZT0iW1t0YWdNZXRhZGF0YS5kaXNwbGF5TmFtZV1dIgogICAgICBkZXNjcmlwdGlvbj0iW1t0YWdNZXRhZGF0YS5kZXNjcmlwdGlvbl1dIgogICAgPjwvdGYtY2FyZC1oZWFkaW5nPgoKICAgIDx0Zi1saW5lLWNoYXJ0LWRhdGEtbG9hZGVyCiAgICAgIHgtY29tcG9uZW50cy1jcmVhdGlvbi1tZXRob2Q9IltbX3hDb21wb25lbnRzQ3JlYXRpb25NZXRob2RdXSIKICAgICAgeS12YWx1ZS1hY2Nlc3Nvcj0iW1tfeVZhbHVlQWNjZXNzb3JdXSIKICAgICAgdG9vbHRpcC1jb2x1bW5zPSJbW190b29sdGlwQ29sdW1uc11dIgogICAgICBjb2xvci1zY2FsZT0iW1tfY29sb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aGVpZ2h0OiAzMDBweDsKICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7CiAgICAgIH0KICAgICAgOmhvc3QoW19leHBhbmRlZF0pIHRmLWxpbmUtY2hhcnQtZGF0YS1sb2FkZXIgewogICAgICAgIGhlaWdodDogNjAwcHg7CiAgICAgIH0KICAgICAgI2J1dHRvbnMtcm93IHsKICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgIGZsZXgtZGlyZWN0aW9uOiByb3c7CiAgICAgIH0KICAgICAgI2J1dHRvbnMtcm93IHBhcGVyLWljb24tYnV0dG9uIHsKICAgICAgICBjb2xvcjogIzIxOTZmMzsKICAgICAgICBib3JkZXItcmFkaXVzOiAxMDAlOwogICAgICAgIHdpZHRoOiAzMnB4OwogICAgICAgIGhlaWdodDogMzJweDsKICAgICAgICBwYWRkaW5nOiA0cHg7CiAgICAgIH0KICAgICAgI2J1dHRvbnMtcm93IHBhcGVyLWljb24tYnV0dG9uW3NlbGVjdGVkXSB7CiAgICAgICAgYmFja2dyb3VuZDogdmFyKC0tdGItdWktbGlnaHQtYWNjZW50KTsKICAgICAgfQogICAgICAjc3RlcC1sZWdlbmQgewogICAgICAgIGJveC1zaXppbmc6IGJvcmRlci1ib3g7CiAgICAgICAgZm9udC1zaXplOiAwLjhlbTsKICAgICAgICBtYXgtaGVpZ2h0OiAyMDBweDsKICAgICAgICBvdmVyZmxvdy15OiBhdXRvOwogICAgICAgIHBhZGRpbmc6IDAgMCAwIDEwcHg7CiAgICAgICAgd2lkdGg6IDEwMCU7CiAgICAgIH0KICAgICAgLmxlZ2VuZC1yb3cgewogICAgICAgIG1hcmdpbjogNXB4IDAgNXB4IDA7CiAgICAgICAgd2lkdGg6IDEwMCU7CiAgICAgIH0KICAgICAgLmNvbG9yLWJveCB7CiAgICAgICAgZGlzcGxheTogaW5saW5lLWJsb2NrOwogICAgICAgIGJvcmRlci1yYWRpdXM6IDFweDsKICAgICAgICB3aWR0aDogMTBweDsKICAgICAgICBoZ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pZmljIGxhbmd1YWdlIGdvdmVybmluZyBwZXJtaXNzaW9ucyBhbmQKICAgIGxpbWl0YXRpb25zIHVuZGVyIHRoZSBMaWNlbnNlLgogICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KICAgIGxldCBUZlByQ3VydmVTdGVwc1NlbGVjdG9yID0gCiAgICAvLyB0c2xpbnQ6ZGlzYWJsZS1uZXh0LWxpbmU6bm8tdW51c2VkLXZhcmlhYmxlCiAgICBjbGFzcyBUZlByQ3VydmVTdGVwc1NlbGVjdG9yIGV4dGVuZHMgUG9seW1lckVsZW1lbnQgewogICAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgICAgICBzdXBlciguLi5hcmd1bWVudHMpOwogICAgICAgICAgICB0aGlzLl9ydW5Ub1N0ZXBJbmRleCA9IHt9OwogICAgICAgIH0KICAgICAgICBfY29tcHV0ZUNvbG9yRm9yUnVuKHJ1bikgewogICAgICAgICAgICByZXR1cm4gcnVuc0NvbG9yU2NhbGUocnVuKTsKICAgICAgICB9CiAgICAgICAgX2NvbXB1dGVUaW1lVGV4dEZvclJ1bihydW5Ub0F2YWlsYWJsZVRpbWVFbnRyaWVzLCBydW5Ub1N0ZXBJbmRleCwgcnVuLCB0aW1lRGlzcGxheVR5cGUpIHsKICAgICAgICAgICAgY29uc3Qgc3RlcEluZGV4ID0gcnVuVG9TdGVwSW5kZXhbcnVuXTsKICAgICAgICAgICAgaWYgKCFsb2Rhc2guaXNOdW1iZXIoc3RlcEluZGV4KSkgewogICAgICAgICAgICAgICAgLy8gVGhlIHN0ZXAgaXMgbm90IGtub3duIHlldC4KICAgICAgICAgICAgICAgIHJldHVybiAnJzsKICAgICAgICAgICAgfQogICAgICAgICAgICBjb25zdCBlbnRyaWVzID0gcnVuVG9BdmFpbGFibGVUaW1lRW50cmllc1tydW5dOwogICAgICAgICAgICBpZiAoIWVudHJpZXMpIHsKICAgICAgICAgICAgICAgIC8vIE5vIFBSIGN1cnZlIGRhdGEgaGFzIGJlZW4gcmVjZWl2ZWQgZnJvbSB0aGUgc2VydmVyIHlldC4KICAgICAgICAgICAgICAgIHJldHVybiAnJzsKICAgICAgICAgICAgfQogICAgICAgICAgICBjb25zdCB2YWx1ZSA9IGVudHJpZXNbc3RlcEluZGV4XVt0aW1lRGlzcGxheVR5cGVdOwogICAgICAgICAgICBpZiAodGltZURpc3BsYXlUeXBlID09PSAnc3RlcCcpIHsKICAgICAgICAgICAgICAgIHJldHVybiBgc3RlcCAke3ZhbHVlfWA7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAodGltZURpc3BsYXlUeXBlID09PSAncmVsYXRpdmUnKSB7CiAgICAgICAgICAgICAgICAvLyBSZXR1cm4gdGhlIHRpbWUgdXNpbmcgdGhlIHVuaXRzIHRoYXQgYXJlIG1vc3QgYXB0LgogICAgICAgICAgICAgICAgaWYgKHZhbHVlIDwgMSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBgJHsodmFsdWUgKiAxMDAwKS50b0ZpeGVkKDIpfSBtc2A7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gYCR7dmFsdWUudG9GaXhlZCgyKX0gc2A7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAodGltZURpc3BsYXlUeXBlID09PSAnd2FsbF90aW1lJykgewogICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBEYXRlKHZhbHVlICogMTAwMCkudG9TdHJpbmcoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYFRoZSBkaXNwbGF5IHR5cGUgb2YgJHt0aW1lRGlzcGxheVR5cGV9IGlzIG5vdCByZWNvZ25pemVkLmApOwogICAgICAgIH0KICAgICAgICBfc2xpZGVyVmFsdWVDaGFuZ2VkKGV2ZW50KSB7CiAgICAgICAgICAgIGNvbnN0IHJ1biA9IGV2ZW50LnRhcmdldC5kYXRhc2V0LnJ1bjsKICAgICAgICAgICAgY29uc3QgdmFsID0gZXZlbnQudGFyZ2V0LmltbWVkaWF0ZVZhbHVlOwogICAgICAgICAgICBjb25zdCBuZXdSdW5Ub1N0ZXBJbmRleCA9IE9iamVjdC5hc3NpZ24oe30sIHRoaXMuX3J1blRvU3RlcEluZGV4KTsKICAgICAgICAgICAgLy8gU2xpZGVyIGVtaXRzIGEgY2hhbmdlZCBldmVudCBiZWZvcmUgaXQgZ29lcyBhd2F5IHdpdGggYW4KICAgICAgICAgICAgLy8gaW1tZWRpYXRlVmFsdWUgb2YgTmFOLgogICAgICAgICAgICBpZiAoaXNOYU4odmFsKSkgewogICAgICAgICAgICAgICAgZGVsZXRlIG5ld1J1blRvU3RlcEluZGV4W3J1bl07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBuZXdSdW5Ub1N0ZXBJbmRleFtydW5dID0gZXZlbnQudGFyZ2V0LmltbWVkaWF0ZVZhbHVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX3J1blRvU3RlcEluZGV4ID0gbmV3UnVuVG9TdGVwSW5kZXg7CiAgICAgICAgfQogICAgICAgIF9jb21wdXRlTWF4U3RlcEluZGV4Rm9yUnVuKHJ1blRvQXZhaWxhYmxlVGltZUVudHJpZXMsIHJ1bikgewogICAgICAgICAgICBjb25zdCBlbnRyaWVzID0gcnVuVG9BdmFpbGFibGVUaW1lRW50cmllc1tydW5dOwogICAgICAgICAgICByZXR1cm4gZW50cmllcyAmJiBlbnRyaWVzLmxlbmd0aCA/IGVudHJpZXMubGVuZ3RoIC0gMSA6IDA7CiAgICAgICAgfQogICAgICAgIF91cGRhdGVTdGVwc0Zvck5ld1J1bnMoKSB7CiAgICAgICAgICAgIHZhciBydW5Ub0F2YWlsYWJsZVRpbWVFbnRyaWVzID0gdGhpcy5ydW5Ub0F2YWlsYWJsZVRpbWVFbnRyaWVzOwogICAgICAgICAgICAvLyBUaGUgbWFwcGluZyBmcm9tIHJ1biB0byBhdmFpbGFibGUgdGltZSBlbnRyaWVzIGp1c3QgY2hhbmdlZC4KICAgICAgICAgICAgY29uc3QgbmV3UnVuVG9TdGVwSW5kZXggPSBPYmplY3QuYXNzaWduKHt9LCB0aGlzLl9ydW5Ub1N0ZXBJbmRleCk7CiAgICAgICAgICAgIGxvZGFzaC5mb3JPd24ocnVuVG9BdmFpbGFibGVUaW1lRW50cmllcywgKGVudHJpZXMsIHJ1bikgPT4gewogICAgICAgICAgICAgICAgaWYgKCFsb2Rhc2guaXNOdW1iZXIobmV3UnVuVG9TdGVwSW5kZXhbcnVuXSkpIHsKICAgICAgICAgICAgICAgICAgICAvLyBUaGlzIHJ1biBoYWQgcHJldmlvdXNseSBsYWNrZWQgYSBzbGlkZXIuIEluaXRpYWxseSBzZXQgdGhlIHNsaWRlcgogICAgICAgICAgICAgICAgICAgIC8vIGZvciB0aGUgcnVuIHRvIHBvaW50IHRvIHRoZSBsYXN0IHN0ZXAuCiAgICAgICAgICAgICAgICAgICAgbmV3UnVuVG9TdGVwSW5kZXhbcnVuXSA9IGVudHJpZXMubGVuZ3RoIC0gMTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHRoaXMuX3J1blRvU3RlcEluZGV4ID0gbmV3UnVuVG9TdGVwSW5kZXg7CiAgICAgICAgfQogICAgICAgIF9nZXRTdGVwKHJ1blRvU3RlcEluZGV4LCBydW4pIHsKICAgICAgICAgICAgaWYgKCF0aGlzLl9ydW5Ub1N0ZXBJbmRleCkKICAgICAgICAgICAgICAgIHJldHVybiAwOwogICAgICAgICAgICByZXR1cm4gdGhpcy5fcnVuVG9TdGVwSW5kZXhbcnVuXTsKICAgICAgICB9CiAgICAgICAgX2NvbXB1dGVSdW5Ub1N0ZXAocnVuVG9BdmFpbGFibGVUaW1lRW50cmllcywgcnVuVG9TdGVwSW5kZXgpIHsKICAgICAgICAgICAgY29uc3QgcnVuVG9TdGVwID0ge307CiAgICAgICAgICAgIGxvZGFzaC5mb3JPd24ocnVuVG9TdGVwSW5kZXgsIChpbmRleCwgcnVuKSA9PiB7CiAgICAgICAgICAgICAgICBjb25zdCBlbnRyaWVzID0gcnVuVG9BdmFpbGFibGVUaW1lRW50cmllc1tydW5dOwogICAgICAgICAgICAgICAgaWYgKCFlbnRyaWVzKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcnVuVG9TdGVwW3J1bl0gPSBlbnRyaWVzW2luZGV4XS5zdGVwOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgcmV0dXJuIHJ1blRvU3RlcDsKICAgICAgICB9CiAgICAgICAgZ2V0IF9ydW5zV2l0aFNsaWRlcnMoKSB7CiAgICAgICAgICAgIHZhciBydW5zID0gdGhpcy5ydW5zOwogICAgICAgICAgICB2YXIgcnVuVG9BdmFpbGFibGVUaW1lRW50cmllcyA9IHRoaXMucnVuVG9BdmFpbGFibGVUaW1lRW50cmllczsKICAgICAgICAgICAgLy8gT25seSBjcmVhdGUgc2xpZGVycyBmb3Igc2VsZWN0ZWQgcnVucyB3aXRoIHN0ZXBzIGF2YWlsYWJsZS4KICAgICAgICAgICAgcmV0dXJuIHJ1bnMuZmlsdGVyKChyKSA9PiBydW5Ub0F2YWlsYWJsZVRpbWVFbnRyaWVzW3JdKTsKICAgICAgICB9CiAgICB9OwogICAgVGZQckN1cnZlU3RlcHNTZWxlY3Rvci50ZW1wbGF0ZSA9IGh0bWwgYAogICAgPHRlbXBsYXRlIGlzPSJkb20tcmVwZWF0IiBpdGVtcz0iW1tfcnVuc1dpdGhTbGlkZXJzXV0iIGFzPSJydW4iPgogICAgICA8ZGl2IGNsYXNzPSJydW4td2lkZ2V0Ij4KICAgICAgICA8ZGl2IGNsYXNzPSJydW4tZGlzcGxheS1jb250YWluZXIiPgogICAgICAgICAgPGRpdgogICAgICAgIC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AgICAgfQogICAgICAuc3RlcC1kaXNwbGF5LWNvbnRhaW5lciB7CiAgICAgICAgZm9udC1zaXplOiAwLjllbTsKICAgICAgICBtYXJnaW46IDAgMTVweCAwIDA7CiAgICAgIH0KICAgICAgLnJ1bi10ZXh0IHsKICAgICAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7CiAgICAgIH0KICAgICAgLnJ1bi1jb2xvci1ib3ggewogICAgICAgIHdpZHRoOiAxMnB4OwogICAgICAgIGhlaWdodDogMTJweDsKICAgICAgICBib3JkZXItcmFkaXVzOiAzcHg7CiAgICAgICAgZGlzcGxheTogaW5saW5lLWJsb2NrOwogICAgICB9CiAgICA8L3N0eWxlPgogIGA7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7IHR5cGU6IEFycmF5IH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgQXJyYXkpCiAgICBdLCBUZlByQ3VydmVTdGVwc1NlbGVjdG9yLnByb3RvdHlwZSwgInJ1bnMiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoeyB0eXBlOiBPYmplY3QgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBPYmplY3QpCiAgICBdLCBUZlByQ3VydmVTdGVwc1NlbGVjdG9yLnByb3RvdHlwZSwgInJ1blRvQXZhaWxhYmxlVGltZUVudHJpZXMiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBPYmplY3QsCiAgICAgICAgICAgIG5vdGlmeTogdHJ1ZSwKICAgICAgICAgICAgY29tcHV0ZWQ6ICdfY29tcHV0ZVJ1blRvU3RlcChydW5Ub0F2YWlsYWJsZVRpbWVFbnRyaWVzLCBfcnVuVG9TdGVwSW5kZXgpJywKICAgICAgICB9KSwKICAgICAgICBfX21ldGFkYXRhKCJkZXNpZ246dHl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BlY2lmaWMgbGFuZ3VhZ2UgZ292ZXJuaW5nIHBlcm1pc3Npb25zIGFuZAogICAgbGltaXRhdGlvbnMgdW5kZXIgdGhlIExpY2Vuc2UuCiAgICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwogICAgbGV0IFRmUHJDdXJ2ZURhc2hib2FyZCA9IAogICAgLy8gdHNsaW50OmRpc2FibGUtbmV4dC1saW5lOm5vLXVudXNlZC12YXJpYWJsZQogICAgY2xhc3MgVGZQckN1cnZlRGFzaGJvYXJkIGV4dGVuZHMgTGVnYWN5RWxlbWVudE1peGluKFBvbHltZXJFbGVtZW50KSB7CiAgICAgICAgY29uc3RydWN0b3IoKSB7CiAgICAgICAgICAgIHN1cGVyKC4uLmFyZ3VtZW50cyk7CiAgICAgICAgICAgIHRoaXMucmVsb2FkT25SZWFkeSA9IHRydWU7CiAgICAgICAgICAgIHRoaXMuX3RpbWVEaXNwbGF5VHlwZSA9ICdzdGVwJzsKICAgICAgICAgICAgdGhpcy5fc2VsZWN0ZWRSdW5zID0gW107CiAgICAgICAgICAgIHRoaXMuX3J1blRvVGFnSW5mbyA9IHt9OwogICAgICAgICAgICB0aGlzLl90YWdUb1J1blRvRGF0YSA9IHt9OwogICAgICAgICAgICB0aGlzLl9nZXRDYXRlZ29yeUl0ZW1LZXkgPSAoaXRlbSkgPT4gaXRlbS50YWc7CiAgICAgICAgICAgIHRoaXMuX3JlcXVlc3RNYW5hZ2VyID0gbmV3IFJlcXVlc3RNYW5hZ2VyKCk7CiAgICAgICAgICAgIHRoaXMuX3N0ZXAgPSAwOwogICAgICAgIH0KICAgICAgICByZWFkeSgpIHsKICAgICAgICAgICAgc3VwZXIucmVhZHkoKTsKICAgICAgICAgICAgaWYgKHRoaXMucmVsb2FkT25SZWFkeSkKICAgICAgICAgICAgICAgIHRoaXMucmVsb2FkKCk7CiAgICAgICAgfQogICAgICAgIHJlbG9hZCgpIHsKICAgICAgICAgICAgUHJvbWlzZS5hbGwoW3RoaXMuX2ZldGNoVGFncygpXSkudGhlbigoKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLl9yZWxvYWRDYXJkcygpOwogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgX3Nob3VsZE9wZW4oaW5kZXgpIHsKICAgICAgICAgICAgcmV0dXJuIGluZGV4IDw9IDI7CiAgICAgICAgfQogICAgICAgIF9mZXRjaFRhZ3MoKSB7CiAgICAgICAgICAgIGNvbnN0IHVybCA9IGdldFJvdXRlcigpLnBsdWdpblJvdXRlKCdwcl9jdXJ2ZXMnLCAnL3RhZ3MnKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3JlcXVlc3RNYW5hZ2VyLnJlcXVlc3QodXJsKS50aGVuKChydW5Ub1RhZ0luZm8pID0+IHsKICAgICAgICAgICAgICAgIGlmIChsb2Rhc2guaXNFcXVhbChydW5Ub1RhZ0luZm8sIHRoaXMuX3J1blRvVGFnSW5mbykpIHsKICAgICAgICAgICAgICAgICAgICAvLyBObyBuZWVkIHRvIHVwZGF0ZSBhbnl0aGluZyBpZiB0aGVyZSBhcmUgbm8gY2hhbmdlcy4KICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjb25zdCBydW5Ub1RhZyA9IGxvZGFzaC5tYXBWYWx1ZXMocnVuVG9UYWdJbmZvLCAobykgPT4gbG9kYXNoLmtleXMobykpOwogICAgICAgICAgICAgICAgY29uc3QgdGFncyA9IGdldFRhZ3MocnVuVG9UYWcpOwogICAgICAgICAgICAgICAgdGhpcy5zZXQoJ19kYXRhTm90Rm91bmQnLCB0YWdzLmxlbmd0aCA9PT0gMCk7CiAgICAgICAgICAgICAgICB0aGlzLnNldCgnX3J1blRvVGFnSW5mbycsIHJ1blRvVGFnSW5mbyk7CiAgICAgICAgICAgICAgICB0aGlzLmFzeW5jKCgpID0+IH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5Ub0RhdGEgPSB0aGlzLl90YWdUb1J1blRvRGF0YTsKICAgICAgICAgICAgY29uc3QgY2Fub25pY2FsVGFnID0ge307IC8vIG1hcCBmcm9tIHJ1biB0byBjYW5vbmljYWwgdGFnIG5hbWUKICAgICAgICAgICAgZm9yIChjb25zdCBbdGFnLCBydW5Ub0RhdGFdIG9mIE9iamVjdC5lbnRyaWVzKHRhZ1RvUnVuVG9EYXRhKSkgewogICAgICAgICAgICAgICAgZm9yIChjb25zdCBbcnVuXSBvZiBPYmplY3QuZW50cmllcyhydW5Ub0RhdGEpKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gYXJiaXRyYXJ5IHN0YWJsZSBvcmRlcmluZzogc21hbGxlc3QgdGFnIG5hbWUgaXMgY2Fub25pY2FsCiAgICAgICAgICAgICAgICAgICAgaWYgKGNhbm9uaWNhbFRhZ1tydW5dID09IG51bGwgfHwgdGFnIDwgY2Fub25pY2FsVGFnW3J1bl0pIHsKICAgICAgICAgICAgICAgICAgICAgICAgY2Fub25pY2FsVGFnW3J1bl0gPSB0YWc7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGNvbnN0IHJlc3VsdCA9IHt9OwogICAgICAgICAgICBmb3IgKGNvbnN0IFtydW4sIHRhZ10gb2YgT2JqZWN0LmVudHJpZXMoY2Fub25pY2FsVGFnKSkgewogICAgICAgICAgICAgICAgY29uc3QgZGF0YSA9IHRhZ1RvUnVuVG9EYXRhW3RhZ11bcnVuXTsKICAgICAgICAgICAgICAgIHJlc3VsdFtydW5dID0gZGF0YS5tYXAoKGQpID0+ICh7CiAgICAgICAgICAgICAgICAgICAgc3RlcDogZC5zdGVwLAogICAgICAgICAgICAgICAgICAgIHdhbGxfdGltZTogZC53YWxsX3RpbWUsCiAgICAgICAgICAgICAgICAgICAgcmVsYXRpdmU6IGQud2FsbF90aW1lIC0gZGF0YVswXS53YWxsX3RpbWUsCiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDsKICAgICAgICB9CiAgICB9OwogICAgVGZQckN1cnZlRGFzaGJvYXJkLnRlbXBsYXRlID0gaHRtbCBgCiAgICA8dGYtZGFzaGJvYXJkLWxheW91dD4KICAgICAgPGRpdiBjbGFzcz0ic2lkZWJhciIgc2xvdD0ic2lkZWJhciI+CiAgICAgICAgPGRpdiBjbGFzcz0ic2V0dGluZ3MiPgogICAgICAgICAgPGRpdiBjbGFzcz0ic2lkZWJhci1zZWN0aW9uIj4KICAgICAgICAgICAgPHRmLW9wdGlvbi1zZWxlY3RvcgogICAgICAgICAgICAgIGlkPSJ0aW1lLXR5cGUtc2VsZWN0b3IiCiAgICAgICAgICAgICAgbmFtZT0iVGltZSBEaXNwbGF5IFR5cGUiCiAgICAgICAgICAgICAgc2VsZWN0ZWQtaWQ9Int7X3RpbWVEaXNwbGF5VHlwZX19IgogICAgICAgICAgICA+CiAgICAgICAgICAgICAgPHBhcGVyLWJ1dHRvbiBpZD0ic3RlcCI+c3RlcDwvcGFwZXItYnV0dG9uPgogICAgICAgICAgICAgIDwhLS0KICAgICAgICAgICAgLS0+CiAgICAgICAgICAgICAgPHBhcGVyLWJ1dHRvbiBpZD0icmVsYXRpdmUiPnJlbGF0aXZlPC9wYXBlci1idXR0b24+CiAgICAgICAgICAgICAgPCEtLQogICAgICAgICAgICAtLT4KICAgICAgICAgICAgICA8cGFwZXItYnV0dG9uIGlkPSJ3YWxsX3RpbWUiPndhbGw8L3BhcGVyLWJ1dHRvbj4KICAgICAgICAgICAgPC90Zi1vcHRpb24tc2VsZWN0b3I+CiAgICAgICAgICA8L2Rpdj4KICAgICAgICAgIDx0ZW1wbGF0ZSBpcz0iZG9tLWlmIiBpZj0iW1tfcnVuVG9BdmFpbGFibGVUaW1lRW50cmllc11dIj4KICAgICAgICAgICAgPGRpdiBjbGFzcz0ic2lkZWJhci1zZWN0aW9uIiBpZD0ic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iAgICAgICAgICAgICAgPGxpPgogICAgICAgICAgICAgICAgWW91IGhhdmVu4oCZdCB3cml0dGVuIGFueSBwcmVjaXNpb27igJNyZWNhbGwgZGF0YSB0byB5b3VyIGV2ZW50CiAgICAgICAgICAgICAgICBmaWxlcy4KICAgICAgICAgICAgICA8L2xpPgogICAgICAgICAgICAgIDxsaT5UZW5zb3JCb2FyZCBjYW7igJl0IGZpbmQgeW91ciBldmVudCBmaWxlcy48L2xpPgogICAgICAgICAgICA8L3VsPgogICAgICAgICAgICA8cD4KICAgICAgICAgICAgICBJZiB5b3XigJlyZSBuZXcgdG8gdXNpbmcgVGVuc29yQm9hcmQsIGFuZCB3YW50IHRvIGZpbmQgb3V0IGhvdyB0bwogICAgICAgICAgICAgIGFkZCBkYXRhIGFuZCBzZXQgdXAgeW91ciBldmVudCBmaWxlcywgY2hlY2sgb3V0IHRoZQogICAgICAgICAgICAgIDxhCiAgICAgICAgICAgICAgICBocmVmPSJodHRwczovL2dpdGh1Yi5jb20vdGVuc29yZmxvdy90ZW5zb3Jib2FyZC9ibG9iL21hc3Rlci9SRUFETUUubWQiCiAgICAgICAgICAgICAgICA+UkVBRE1FPC9hCiAgICAgICAgICAgICAgPgogICAgICAgICAgICAgIGFuZCBwZXJoYXBzIHRoZQogICAgICAgICAgICAgIDxhCiAgICAgICAgICAgICAgICBocmVmPSJodHRwczovL3d3dy50ZW5zb3JmbG93Lm9yZy9nZXRfc3RhcnRlZC9zdW1tYXJpZXNfYW5kX3RlbnNvcmJvYXJkIgogICAgICAgICAgICAgICAgPlRlbnNvckJvYXJkIHR1dG9yaWFsPC9hCiAgICAgICAgICAgICAgPi4KICAgICAgICAgICAgPC9wPgoKICAgICAgICAgICAgPHA+CiAgICAgICAgICAgICAgSWYgeW91IHRoaW5rIFRlbnNvckJvYXJkIGlzIGNvbmZpZ3VyZWQgcHJvcGVybHksIHBsZWFzZSBzZWUKICAgICAgICAgICAgICA8YQogICAgICAgICAgICAgICAgaHJlZj0iaHR0cHM6Ly9naXRodWIuY29tL3RlbnNvcmZsb3cvdGVuc29yYm9hcmQvYmxvYi9tYXN0ZXIvUkVBRE1FLm1kI215LXRlbnNvcmJvYXJkLWlzbnQtc2hvd2luZy1hbnktZGF0YS13aGF0cy13cm9uZyIKICAgICAgICAgICAgICAgID50aGUgc2VjdGlvbiBvZiB0aGUgUkVBRE1FIGRldm90ZWQgdG8gbWlzc2luZyBkYXRhIHByb2JsZW1zPC9hCiAgICAgICAgICAgICAgPgogICAgICAgICAgICAgIGFuZCBjb25zaWRlciBmaWxpbmcgYW4gaXNzdWUgb24gR2l0SHViLgogICAgICAgICAgICA8L3A+CiAgICAgICAgICA8L2Rpdj4KICAgICAgICA8L3RlbXBsYXRlPgogICAgICAgIDx0ZW1wbGF0ZSBpcz0iZG9tLWlmIiBpZj0iW1shX2RhdGFOb3RGb3VuZF1dIj4KICAgICAgICAgIDx0Zi10YWctZmlsdGVyZXIgdGFnLWZpbHRlcj0ie3tfdGFnRmlsdGVyfX0iPjwvdGYtdGFnLWZpbHRlcmVyPgogICAgICAgICAgPHRlbXBsYXRlIGlzPSJkb20tcmVwZWF0IiBpdGVtcz0iW1tfY2F0ZWdvcmllc11dIiBhcz0iY2F0ZWdvcnkiPgogICAgICAgICAgICA8dGYtY2F0ZWdvcnktcGFnaW5hdGVkLXZpZXcKICAgICAgICAgICAgICBjYXRlZ29yeT0iW1tjYXRlZ29yeV1dIgogICAgICAgICAgICAgIGluaXRpYWwtb3BlbmVkPSJbW19zaG91bGRPcGVuKGluZGV4KV1dIgogICAgICAgICAgICAgIGdldC1jYXRlZ29yeS1pdGVtLWtleT0iW1tfZ2V0Q2F0ZWdvcnlJdGVtS2V5XV0iCiAgICAgICAgICAgID4KICAgICAgICAgICAgICA8dGVtcGxhdGU+CiAgICAgICAgICAgICAgICA8dGYtcHItY3VydmUtY2FyZAogICAgICAgICAgICAgICAgICBhY3RpdmU9IltbYWN0aXZlXV0iCiAgICAgICAgICAgICAgICAgIHJ1bn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aXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHsKICAgICAgICAgICAgICAgICAgICBjb25zdCB0ZXh0YXJlYSA9IHRoaXMuJC5jb21tYW5kVGV4dGFyZWE7CiAgICAgICAgICAgICAgICAgICAgdGV4dGFyZWEuc2VsZWN0KCk7CiAgICAgICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICAgICAgeWllbGQgbmF2aWdhdG9yLmNsaXBib2FyZC53cml0ZVRleHQodGhpcy5faW5zdGFsbENvbW1hbmQpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBjYXRjaCAoZXJyb3IpIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gRmFsbGJhY2sgYXBwcm9hY2guCiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghZG9jdW1lbnQuZXhlY0NvbW1hbmQoJ2NvcHknKSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFByb21pc2UucmVqZWN0KCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIGNvbnN0IGNvcGllZE1lc3NhZ2VFbGVtZW50ID0gdGhpcy4kLmNvcGllZE1lc3NhZ2U7CiAgICAgICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgICAgIHlpZWxkIGRvQ29weSgpOwogICAgICAgICAgICAgICAgICAgIGNvcGllZE1lc3NhZ2VFbGVtZW50LmlubmVyVGV4dCA9ICdDb3BpZWQuJzsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGNhdGNoIChlKSB7CiAgICAgICAgICAgICAgICAgICAgY29waWVkTWVzc2FnZUVsZW1lbnQuaW5uZXJUZXh0ID0gJ0ZhaWxlZCB0byBjb3B5IHRvIGNsaXBib2FyZC4nOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9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RlcyBhIGNhdGVnb3JpemVyLCBydW4gc2VsZWN0b3IsIGFuZCBhYmNpc3NhIHNlbGVjdG9yLCBieSB3aGljaAogICAgICogdGhlIHVzZXIgY2FuIGN1c3RvbWl6ZSBob3cgZGF0YSBpcyBvcmdhbml6ZWQgYW5kIGRpc3BsYXllZC4KICAgICAqLwogICAgbGV0IFRmU2NhbGFyRGFzaGJvYXJkID0gCiAgICAvLyB0c2xpbnQ6ZGlzYWJsZS1uZXh0LWxpbmU6bm8tdW51c2VkLXZhcmlhYmxlCiAgICBjbGFzcyBUZlNjYWxhckRhc2hib2FyZCBleHRlbmRzIExlZ2FjeUVsZW1lbnRNaXhpbihBcnJheVVwZGF0ZUhlbHBlcikgewogICAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgICAgICBzdXBlciguLi5hcmd1bWVudHMpOwogICAgICAgICAgICB0aGlzLnJlbG9hZE9uUmVhZHkgPSB0cnVlOwogICAgICAgICAgICB0aGlzLl9zaG93RG93bmxvYWRMaW5rcyA9IGdldEJvb2xlYW5Jbml0aWFsaXplcignX3Nob3dEb3dubG9hZExpbmtzJywgewogICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiBmYWxzZSwKICAgICAgICAgICAgICAgIHVzZUxvY2FsU3RvcmFnZTogdHJ1ZSwKICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgIC5jYWxsKHRoaXMpOwogICAgICAgICAgICB0aGlzLl9zbW9vdGhpbmdXZWlnaHQgPSBnZXROdW1iZXJJbml0aWFsaXplcignX3Ntb290aGluZ1dlaWdodCcsIHsKICAgICAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogMC42LAogICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgLmNhbGwodGhpcyk7CiAgICAgICAgICAgIHRoaXMuX2lnbm9yZVlPdXRsaWVycyA9IGdldEJvb2xlYW5Jbml0aWFsaXplcignX2lnbm9yZVlPdXRsaWVycycsIHsKICAgICAgICAgICAgICAgIGRlZmF1bHR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91dGxpZXJzJywgewogICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiB0cnVlLAogICAgICAgICAgICAgICAgdXNlTG9jYWxTdG9yYWdlOiB0cnVlLAogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgZ2V0IF9zbW9vdGhpbmdFbmFibGVkKCkgewogICAgICAgICAgICB2YXIgX3Ntb290aGluZ1dlaWdodCA9IHRoaXMuX3Ntb290aGluZ1dlaWdodDsKICAgICAgICAgICAgcmV0dXJuIF9zbW9vdGhpbmdXZWlnaHQgPiAwOwogICAgICAgIH0KICAgICAgICBfZ2V0Q2F0ZWdvcnlLZXkoY2F0ZWdvcnkpIHsKICAgICAgICAgICAgcmV0dXJuIGNhdGVnb3J5Lm1ldGFkYXRhLnR5cGUgPT0KICAgICAgICAgICAgICAgIENhdGVnb3J5VHlwZS5TRUFSQ0hfUkVTVUxUUwogICAgICAgICAgICAgICAgPyAnJwogICAgICAgICAgICAgICAgOiBjYXRlZ29yeS5uYW1lOwogICAgICAgIH0KICAgICAgICBfc2hvdWxkT3BlbihpbmRleCkgewogICAgICAgICAgICByZXR1cm4gaW5kZXggPD0gMjsKICAgICAgICB9CiAgICAgICAgcmVhZHkoKSB7CiAgICAgICAgICAgIHN1cGVyLnJlYWR5KCk7CiAgICAgICAgICAgIGlmICh0aGlzLnJlbG9hZE9uUmVhZHkpCiAgICAgICAgICAgICAgICB0aGlzLnJlbG9hZCgpOwogICAgICAgIH0KICAgICAgICByZWxvYWQoKSB7CiAgICAgICAgICAgIHRoaXMuX2ZldGNoVGFncygpLnRoZW4oKCkgPT4gewogICAgICAgICAgICAgICAgdGhpcy5fcmVsb2FkQ2hhcnRzKCk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICBfZmV0Y2hUYWdzKCkgewogICAgICAgICAgICBjb25zdCB1cmwgPSBnZXRSb3V0ZXIoKS5wbHVnaW5Sb3V0ZSgnc2NhbGFycycsICcvdGFncycpOwogICAgICAgICAgICByZXR1cm4gdGhpcy5fcmVxdWVzdE1hbmFnZXIucmVxdWVzdCh1cmwpLnRoZW4oKHJ1blRvVGFnSW5mbykgPT4gewogICAgICAgICAgICAgICAgaWYgKGxvZGFzaC5pc0VxdWFsKHJ1blRvVGFnSW5mbywgdGhpcy5fcnVuVG9UYWdJbmZvKSkgewogICAgICAgICAgICAgICAgICAgIC8vIE5vIG5lZWQgdG8gdXBkYXRlIGFueXRoaW5nIGlmIHRoZXJlIGFyZSBubyBjaGFuZ2VzLgogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGNvbnN0IHJ1blRvVGFnID0gbG9kYXNoLm1hcFZhbHVlcyhydW5Ub1RhZ0luZm8sICh4KSA9PiBPYmplY3Qua2V5cyh4KSk7CiAgICAgICAgICAgICAgICBjb25zdCB0YWdzID0gZ2V0VGFncyhydW5Ub1RhZyk7CiAgICAgICAgICAgICAgICB0aGlzLnNldCgnX2RhdGFOb3RGb3VuZCcsIHRhZ3MubGVuZ3RoID09PSAwKTsKICAgICAgICAgICAgICAgIHRoaXMuc2V0KCdfcnVuVG9UYWdJbmZvJywgcnVuVG9UYWdJbmZvKTsKICAgICAgICAgICAgICAgIHRoaXMuYXN5bmMoKCkgPT4gewogICAgICAgICAgICAgICAgICAgIC8vIFNlZSB0aGUgY29tbWVudCBhYm92ZSBgX2NhdGVnb3JpZXNEb21SZWFkeWAuCiAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXQoJ19jYXRlZ29yaWVzRG9tUmVhZHknLCB0cnVlKTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgX3JlbG9hZENoYXJ0cygpIHsKICAgICAgICAgICAgdGhpcy5yb290LnF1ZXJ5U2VsZWN0b3JBbGwoJ3RmLXNjYWxhci1jYXJkJykuZm9yRWFjaCgoY2hhcnQpID0+IHsKICAgICAgICAgICAgICAgIGNoYXJ0LnJlbG9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ICsgJy8nKSkgewogICAgICAgICAgICAgICAgLy8gKyAxIHRvIHN0cmlwIG9mZiB0aGUgc2VwYXJhdG9yLgogICAgICAgICAgICAgICAgZGlzcGxheU5hbWUgPSBkaXNwbGF5TmFtZS5zbGljZShjYXRlZ29yeU5hbWUubGVuZ3RoICsgMSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHsgZGVzY3JpcHRpb24sIGRpc3BsYXlOYW1lIH07CiAgICAgICAgfQogICAgfTsKICAgIFRmU2NhbGFyRGFzaGJvYXJkLnRlbXBsYXRlID0gaHRtbCBgCiAgICA8dGYtZGFzaGJvYXJkLWxheW91dD4KICAgICAgPGRpdiBjbGFzcz0ic2lkZWJhciIgc2xvdD0ic2lkZWJhciI+CiAgICAgICAgPGRpdiBjbGFzcz0ic2V0dGluZ3MiPgogICAgICAgICAgPGRpdiBjbGFzcz0ic2lkZWJhci1zZWN0aW9uIj4KICAgICAgICAgICAgPGRpdiBjbGFzcz0ibGluZS1pdGVtIj4KICAgICAgICAgICAgICA8cGFwZXItY2hlY2tib3gKICAgICAgICAgICAgICAgIGlkPSJzaG93LWRvd25sb2FkLWxpbmtzIgogICAgICAgICAgICAgICAgY2hlY2tlZD0ie3tfc2hvd0Rvd25sb2FkTGlua3N9fSIKICAgICAgICAgICAgICAgID5TaG93IGRhdGEgZG93bmxvYWQgbGlua3M8L3BhcGVyLWNoZWNrYm94CiAgICAgICAgICAgICAgPgogICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgPGRpdiBjbGFzcz0ibGluZS1pdGVtIj4KICAgICAgICAgICAgICA8cGFwZXItY2hlY2tib3gKICAgICAgICAgICAgICAgIGlkPSJpZ25vcmUteS1vdXRsaWVyIgogICAgICAgICAgICAgICAgY2hlY2tlZD0ie3tfaWdub3JlWU91dGxpZXJzfX0iCiAgICAgICAgICAgICAgICA+SWdub3JlIG91dGxpZXJzIGluIGNoYXJ0IHNjYWxpbmc8L3BhcGVyLWNoZWNrYm94CiAgICAgICAgICAgICAgPgogICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgPGRpdiBpZD0idG9vbHRpcC1zb3J0aW5nIj4KICAgICAgICAgICAgICA8ZGl2PlRvb2x0aXAgc29ydGluZyBtZXRob2Q6PC9kaXY+CiAgICAgICAgICAgICAgPHBhcGVyLWRyb3Bkb3duLW1lbnUKICAgICAgICAgICAgICAgIG5vLWxhYmVsLWZsb2F0CiAgICAgICAgICAgICAgICBzZWxlY3RlZC1pdGVtLWxhYmVsPSJ7e190b29sdGlwU29ydGluZ01ldGhvZH19IgogICAgICAgICAgICAgID4KICAgICAgICAgICAgICAgIDxwYXBlci1saXN0Ym94CiAgICAgICAgICAgICAgICAgIGNsYXNzPSJkcm9wZG93bi1jb250ZW50IgogICAgICAgICAgICAgICAgICBzZWxlY3RlZD0iMCIKICAgICAgICAgICAgICAgICAgc2xvdD0iZHJvcGRvd24tY29udGVudCIKICAgICAgICAgICAgICAgID4KICAgICAgICAgICAgICAgICAgPHBhcGVyLWl0ZW0+ZGVmYXVsdDwvcGFwZXItaXRlbT4KICAgICAgICAgICAgICAgICAgPHBhcGVyLWl0ZW0+ZGVzY2VuZGluZzwvcGFwZXItaXRlbT4KICAgICAgICAgICAgICAgICAgPHBhcGVyLWl0ZW0+YXNjZW5kaW5nPC9wYXBlci1pdGVtPgogICAgICAgICAgICAgICAgICA8cGFwZXItaXRlbT5uZWFyZXN0PC9wYXBlci1pdGVtPgogICAgICAgICAgICAgICAgPC9wYXBlci1saXN0Ym94PgogICAgICAgICAgICAgIDwvcGFwZXItZHJvcGRvd24tbWVudT4KICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICA8L2Rpdj4KICAgICAgICAgIDxkaXYgY2xhc3M9InNpZGViYXItc2VjdGlvbiI+CiAgICAgICAgICAgIDx0Zi1zbW9vdGhpbmctaW5wdXQKICAgICAgICAgICAgICB3ZWlnaHQ9Int7X3Ntb290aGluZ1dlaWdodH19IgogICAgICAgICAgICAgIHN0ZXA9IjAuMDAxIgogICAgICAgICAgICAgIG1pbj0iMCIKICAgICAgICAgICAgICBtYXg9IjAuOTk5IgogICAgICAgICAgICA+PC90Zi1zbW9vdGhpbmctaW5wdXQ+CiAgICAgICAgICA8L2Rpdj4KICAgICAgICAgIDxkaXYgY2xhc3M9InNpZGViYXItc2VjdGlvbiI+CiAgICAgICAgICAgIDx0Zi1vcHRpb24tc2VsZWN0b3IKICAgICAgICAgICAgICBpZD0ieC10eXBlLXNlbGVjdG9yIgogICAgICAgICAgICAgIG5hbWU9Ikhvcml6b250YWwgQXhpcyIKICAgICAgICAgICAgICBzZWxlY3RlZC1pZD0ie3tfeFR5cGV9fSIKICAgICAgICAgICAgPgogICAgICAgICAgICAgIDxwYXBlci1idXR0b24gaWQ9InN0ZXAiPnN0ZXA8L3BhcGVyLWJ1dHRvbgogICAgICAgICAgICAgID48IS0tCiAgICAgICAgICAgIC0tPjxwYXBlci1idXR0b24gaWQ9InJlbGF0aXZlIj5yZWxhdGl2ZTwvcGFwZXItYnV0dG9uCiAgICAgICAgICAgICAgPjwhLS0KICAgICAgICAgICAgLS0+PHBhcGVyLWJ1dHRvbiBpZD0id2FsbF90aW1lIj53YWxsPC9wYXBlci1idXR0b24+CiAgICAgICAgICAgIDwvdGYtb3B0aW9uLXNlbGVjdG9yPgogICAgICAgICAgPC9kaXY+CiAgICAgICAgPC9kaXY+CiAgICAgICAgPGRpdiBjbGFzcz0ic2lkZWJhci1zZWN0aW9uIHJ1bnMtc2VsZWN0b3IiPgogICAgICAgICAgPHRmLXJ1bnMtc2VsZWN0b3Igc2VsZWN0ZWQtcnVucz0ie3tfc2VsZWN0ZWRSdW5zfX0iPgogICAgICAgICAgPC90Zi1ydW5zLXNlbGVjdG9yPgogICAgICAgIDwvZGl2PgogICAgICA8L2Rpdj4KICAgICAgPGRpdiBjbGFzcz0iY2VudGVyIiBzbG90PSJjZW50ZXIiPgogICAgICAgIDx0ZW1wbGF0ZSBpcz0iZG9tLWlmIiBpZj0iW1tfZGF0YU5vdEZvdW5kXV0iPgogICAgICAgICAgPGRpdiBjbGFzcz0ibm8tZGF0YS13YXJuaW5nIj4KICAgICAgICAgICAgPGgzPk5vIHNjYWxhciBkYXRhIHdhcyBmb3VuZC48L2gzPgogICAgICAgICAgICA8cD5Qcm9iYWJsZSBjYXVzZXM6PC9wPgogICAgICAgICAgICA8dWw+CiAgICAgICAgICAgICAgPGxpPllvdSBoYXZlbuKAmXQgd3JpdHRlbiBhbnkgc2NhbGFyIGRhdGEgdG8geW91ciBldmVudCBmaWxlcy48L2xpPgogICAgICAgICAgICAgIDxsaT5UZW5zb3JCb2FyZCBjYW7igJl0IGZpbmQgeW91ciBldmVudCBmaWxlcy48L2xpPgogICAgICAgICAgICA8L3VsPgoKICAgICAgICAgICAgPHA+CiAgICAgICAgICAgICAgSWYgeW914oCZcmUgbmV3IHRvIHVzaW5nIFRlbnNvckJvYXJkLCBhbmQgd2FudCB0byBmaW5kIG91dCBob3cgdG8KICAgICAgICAgICAgICBhZGQgZGF0YSBhbmQgc2V0IHVwIHlvdXIgZXZlbnQgZmlsZXMsIGNoZWNrIG91dCB0aGUKICAgICAgICAgICAgICA8YQogICAgICAgICAgICAgICAgaHJlZj0iaHR0cHM6Ly9naXRodWIuY29tL3RlbnNvcmZsb3cvdGVuc29yYm9hcmQvYmxvYi9tYXN0ZXIvUkVBRE1FLm1kIgogICAgICAgICAgICAgICAgPlJFQURNRTwvYQogICAgICAgICAgICAgID4KICAgICAgICAgICAgICBhbmQgcGVyaGFwcyB0aGUKICAgICAgICAgICAgICA8YQogICAgICAgICAgICAgICAgaHJlZj0iaHR0cHM6Ly93d3cudGVuc29yZmxvdy5vcmcvZ2V0X3N0YXJ0ZWQvc3VtbWFyaWVzX2FuZF90ZW5zb3Jib2FyZCIKICAgICAgICAgICAgICAgID5UZW5zb3JCb2FyZCB0dXRvcmlhbDwvYQogICAgICAgICAgICAgID4uCiAgICAgICAgICAgIDwvcD4KCiAgICAgICAgICAgID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gICAgICA+CiAgICAgICAgICAgICAgPHRlbXBsYXRlPgogICAgICAgICAgICAgICAgPHRmLXNjYWxhci1jYXJkCiAgICAgICAgICAgICAgICAgIGFjdGl2ZT0iW1thY3RpdmVdXSIKICAgICAgICAgICAgICAgICAgZGF0YS10by1sb2FkPSJbW2l0ZW0uc2VyaWVzXV0iCiAgICAgICAgICAgICAgICAgIGlnbm9yZS15LW91dGxpZXJzPSJbW19pZ25vcmVZT3V0bGllcnNdXSIKICAgICAgICAgICAgICAgICAgbXVsdGktZXhwZXJpbWVudHM9IltbX2dldE11bHRpRXhwZXJpbWVudHMoZGF0YVNlbGVjdGlvbildXSIKICAgICAgICAgICAgICAgICAgcmVxdWVzdC1tYW5hZ2VyPSJbW19yZXF1ZXN0TWFuYWdlcl1dIgogICAgICAgICAgICAgICAgICBzaG93LWRvd25sb2FkLWxpbmtzPSJbW19zaG93RG93bmxvYWRMaW5rc11dIgogICAgICAgICAgICAgICAgICBzbW9vdGhpbmctZW5hYmxlZD0iW1tfc21vb3RoaW5nRW5hYmxlZF1dIgogICAgICAgICAgICAgICAgICBzbW9vdGhpbmctd2VpZ2h0PSJbW19zbW9vdGhpbmdXZWlnaHRdXSIKICAgICAgICAgICAgICAgICAgdGFnLW1ldGFkYXRhPSJbW190YWdNZXRhZGF0YShjYXRlZ29yeSwgX3J1blRvVGFnSW5mbywgaXRlbSldXSIKICAgICAgICAgICAgICAgICAgdGFnPSJbW2l0ZW0udGFnXV0iCiAgICAgICAgICAgICAgICAgIHRvb2x0aXAtc29ydGluZy1tZXRob2Q9IltbX3Rvb2x0aXBTb3J0aW5nTWV0aG9kXV0iCiAgICAgICAgICAgICAgICAgIHgtdHlwZT0iW1tfeFR5cGVdXSIKICAgICAgICAgICAgICAgID48L3RmLXNjYWxhci1jYXJkPgogICAgICAgICAgICAgIDwvdGVtcGxhdGU+CiAgICAgICAgICAgIDwvdGYtY2F0ZWdvcnktcGFnaW5hdGVkLXZpZXc+CiAgICAgICAgICA8L3RlbXBsYXRlPgogICAgICAgIDwvdGVtcGxhdGU+CiAgICAgIDwvZGl2PgogICAgPC90Zi1kYXNoYm9hcmQtbGF5b3V0PgoKICAgIDxzdHlsZSBpbmNsdWRlPSJkYXNoYm9hcmQtc3R5bGUiPjwvc3R5bGU+CiAgICA8c3R5bGU+CiAgICAgICN0b29sdGlwLXNvcnRpbmcgewogICAgICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgICAgZGlzcGxheTogZmxleDsKICAgICAgICBmb250LXNpemU6IDE0cHg7CiAgICAgICAgbWFyZ2luLXRvcDogMTVweDsKICAgICAgfQoKICAgICAgI3Rvb2x0aXAtc29ydGluZyBwYXBlci1kcm9wZG93bi1tZW51IHsKICAgICAgICBtYXJnaW4tbGVmdDogMTBweDsKICAgICAgICAtLXBhcGVyLWlucHV0LWNvbnRhaW5lci1mb2N1cy1jb2xvcjogdmFyKC0tdGItb3JhbmdlLXN0cm9uZyk7CiAgICAgICAgd2lkdGg6IDEwNXB4OwogICAgICB9CgogICAgICAubGluZS1pdGVtIHsKICAgICAgICBkaXNwbGF5OiBibG9jazsKICAgICAgICBwYWRkaW5nLXRvcDogNXB4OwogICAgICB9CiAgICAgIC5uby1kYXRhLXdhcm5pbmcgewogICAgICAgIG1heC13aWR0aDogNTQwcHg7CiAgICAgICAgbWFyZ2luOiA4MHB4IGF1dG8gMCBhdXRvOwogICAgICB9CiAgICAgIC5jZW50ZXIgewogICAgICAgIG92ZXJmbG93LXg6IGhpZGRlbjsKICAgICAgfQogICAgPC9zdHlsZT4KICBgOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoeyB0eXBlOiBCb29sZWFuIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgQm9vbGVhbikKICAgIF0sIFRmU2NhbGFyRGFzaGJvYXJkLnByb3RvdHlwZSwgInJlbG9hZE9uUmVhZHkiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoewogICAgICAgICAgICB0eXBlOiBCb29sZWFuLAogICAgICAgICAgICBub3RpZnk6IHRydWUsCiAgICAgICAgICAgIG9ic2VydmVyOiAnX3Nob3dEb3dubG9hZExpbmtzT2JzZXJ2ZXInLAogICAgICAgIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgQm9vbGVhbikKICAgIF0sIFRmU2NhbGFyRGFzaGJvYXJkLnByb3RvdHlwZSwgIl9zaG93RG93bmxvYWRMaW5rcyIsIHZvaWQgMCk7CiAgICBfX2RlY29yYXRlKFsKICAgICAgICBwcm9wZXJ0eSh7CiAgICAgICAgICAgIHR5cGU6IE51bWJlciwKICAgICAgICAgICAgbm90aWZ5OiB0cnVlLAogICAgICAgICAgICBvYnNlcnZlcjogJ19zbW9vdGhpbmdXZWlnaHRPYnNlcnZlcicsCiAgICAgICAgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBOdW1iZXIpCiAgICBdLCBUZlNjYWxhckRhc2hib2FyZC5wcm90b3R5cGUsICJfc21vb3RoaW5nV2VpZ2h0Iiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsKICAgICAgICAgICAgdHlwZTogQm9vbGVhbiwKICAgICAgICAgICAgb2JzZXJ2ZXI6ICdfaWdub3JlWU91dGxpZXJzT2JzZXJ2ZXInLAogICAgICAgIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgQm9vbGVhbikKICAgIF0sIFRmU2NhbGFyRGFzaGJvYXJkLnByb3RvdHlwZSwgIl9pZ25vcmVZT3V0bGllcnMiLCB2b2lkIDApOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoeyB0eXBlOiBTdHJpbmcgfSksCiAgICAgICAgX19tZXRhZGF0YSgiZGVzaWduOnR5cGUiLCBTdHJpbmcpCiAgICBdLCBUZlNjYWxhck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yBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC4KICAgIFNlZSB0aGUgTGljZW5zZSBmb3IgdGhlIHNwZWNpZmljIGxhbmd1YWdlIGdvdmVybmluZyBwZXJtaXNzaW9ucyBhbmQKICAgIGxpbWl0YXRpb25zIHVuZGVyIHRoZSBMaWNlbnNlLgogICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KICAgIC8vIHRmLXRleHQtbG9hZGVyIGRpc3BsYXlzIG1hcmtkb3duIHRleHQgZGF0YSBmcm9tIHRoZSBUZXh0IHBsdWdpbi4KICAgIGxldCBUZlRleHRMb2FkZXIgPSBjbGFzcyBUZlRleHRMb2FkZXIgZXh0ZW5kcyBMZWdhY3lFbGVtZW50TWl4aW4oUG9seW1lckVsZW1lbnQpIHsKICAgICAgICBjb25zdHJ1Y3RvcigpIHsKICAgICAgICAgICAgc3VwZXIoLi4uYXJndW1lbnRzKTsKICAgICAgICAgICAgLy8gT3JkZXJlZCBmcm9tIG5ld2VzdCB0byBvbGRlc3QuCiAgICAgICAgICAgIHRoaXMuX3RleHRzID0gW107CiAgICAgICAgICAgIHRoaXMuX2NhbmNlbGxlciA9IG5ldyBDYW5jZWxsZXIoKTsKICAgICAgICB9CiAgICAgICAgZ2V0IF9ydW5Db2xvcigpIHsKICAgICAgICAgICAgdmFyIHJ1biA9IHRoaXMucnVuOwogICAgICAgICAgICByZXR1cm4gcnVuc0NvbG9yU2NhbGUocnVuKTsKICAgICAgICB9CiAgICAgICAgX2NoYW5nZVJ1bkNvbG9yKCkgewogICAgICAgICAgICB2YXIgcnVuQ29sb3IgPSB0aGlzLl9ydW5Db2xvcjsKICAgICAgICAgICAgdGhpcy51cGRhdGVTdHlsZXMoewogICAgICAgICAgICAgICAgJy0tdGItdGV4dC1sb2FkZXItb3V0bGluZSc6IHJ1bkNvbG9yLAogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgYXR0YWNoZWQoKSB7CiAgICAgICAgICAgIHRoaXMucmVsb2FkKCk7CiAgICAgICAgfQogICAgICAgIHJlbG9hZCgpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLmlzQXR0YWNoZWQpIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9jYW5jZWxsZXIuY2FuY2VsQWxsKCk7CiAgICAgICAgICAgIGNvbnN0IHJvdXRlciA9IGdldFJvdXRlcigpOwogICAgICAgICAgICBjb25zdCB1cmwgPSBhZGRQYXJhbXMocm91dGVyLnBsdWdpblJvdXRlKCd0ZXh0JywgJy90ZXh0JyksIHsKICAgICAgICAgICAgICAgIHRhZzogdGhpcy50YWcsCiAgICAgICAgICAgICAgICBydW46IHRoaXMucnVuLAogICAgICAgICAgICB9KTsKICAgICAgICAgICAgY29uc3QgdXBkYXRlVGV4dHMgPSB0aGlzLl9jYW5jZWxsZXIuY2FuY2VsbGFibGUoKHJlc3VsdCkgPT4gewogICAgICAgICAgICAgICAgaWYgKHJlc3VsdC5jYW5jZWxsZWQpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjb25zdCBkYXRhID0gcmVzdWx0LnZhbHVlLm1hcCgoZGF0dW0pID0+ICh7CiAgICAgICAgICAgICAgICAgICAgd2FsbF90aW1lOiBuZXcgRGF0ZShkYXR1bS53YWxsX3RpbWUgKiAxMDAwKSwKICAgICAgICAgICAgICAgICAgICBzdGVwOiBkYXR1bS5zdGVwLAogICAgICAgICAgICAgICAgICAgIHRleHQ6IGRhdHVtLnRleHQsCiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICB0aGlzLnNldCgnX3RleHRzJywgZGF0YS5zbGljZSgpLnJldmVyc2UoKSk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICB0aGlzLnJlcXV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Omhvc3QgewogICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjsKICAgICAgICB3aWR0aDogMTAwJTsKICAgICAgICBoZWlnaHQ6IGF1dG87CiAgICAgICAgbWFyZ2luLXJpZ2h0OiAxMHB4OwogICAgICAgIG1hcmdpbi1ib3R0b206IDE1cHg7CiAgICAgIH0KICAgICAgLnNjcm9sbGJhciB7CiAgICAgICAgd2lsbC1jaGFuZ2U6IHRyYW5zZm9ybTsKICAgICAgfQogICAgICAjc3RlcHMtY29udGFpbmVyIHsKICAgICAgICBib3JkZXItcmFkaXVzOiAzcHg7CiAgICAgICAgYm9yZGVyOiAycHggc29saWQgLyogY29sb3IgY29tcHV0ZWQgYW5kIHNldCBhcyBpbmxpbmUgc3R5bGUgKi87CiAgICAgICAgZGlzcGxheTogYmxvY2s7CiAgICAgICAgbWF4LWhlaWdodDogNTAwcHg7CiAgICAgICAgb3ZlcmZsb3c6IGF1dG87CiAgICAgICAgcGFkZGluZzogMTBweDsKICAgICAgICBib3JkZXItY29sb3I6IHZhcigtLXRiLXRleHQtbG9hZGVyLW91dGxpbmUpOwogICAgICB9CiAgICAgIC50ZXh0IHsKICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiB3aGl0ZTsKICAgICAgICBib3JkZXItcmFkaXVzOiAwIDNweCAzcHggM3B4OwogICAgICAgIHBhZGRpbmc6IDVweDsKICAgICAgICB3b3JkLWJyZWFrOiBicmVhay13b3JkOwogICAgICB9CiAgICAgIC5zdGVwLWNvbnRhaW5lciB7CiAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogdmFyKC0tdGItdWktbGlnaHQtYWNjZW50KTsKICAgICAgICBib3JkZXItYm90dG9tOiBub25lOwogICAgICAgIGJvcmRlci1yYWRpdXM6IDNweCAzcHggMCAwOwogICAgICAgIGJvcmRlcjogMXB4IHNvbGlkICNjY2M7CiAgICAgICAgZGlzcGxheTogaW5saW5lLWJsb2NrOw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VyKCk7CiAgICAgICAgfQogICAgICAgIHJlYWR5KCkgewogICAgICAgICAgICBzdXBlci5yZWFkeSgpOwogICAgICAgICAgICBpZiAodGhpcy5yZWxvYWRPblJlYWR5KQogICAgICAgICAgICAgICAgdGhpcy5yZWxvYWQoKTsKICAgICAgICB9CiAgICAgICAgcmVsb2FkKCkgewogICAgICAgICAgICB0aGlzLl9mZXRjaFRhZ3MoKS50aGVuKCgpID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuX3JlbG9hZFRleHRzKCk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICBfc2hvdWxkT3BlbihpbmRleCkgewogICAgICAgICAgICByZXR1cm4gaW5kZXggPD0gMjsKICAgICAgICB9CiAgICAgICAgX2ZldGNoVGFncygpIHsKICAgICAgICAgICAgY29uc3QgdXJsID0gZ2V0Um91dGVyKCkucGx1Z2luUm91dGUoJ3RleHQnLCAnL3RhZ3MnKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3JlcXVlc3RNYW5hZ2VyLnJlcXVlc3QodXJsKS50aGVuKChydW5Ub1RhZykgPT4gewogICAgICAgICAgICAgICAgaWYgKGxvZGFzaC5pc0VxdWFsKHJ1blRvVGFnLCB0aGlzLl9ydW5Ub1RhZykpIHsKICAgICAgICAgICAgICAgICAgICAvLyBObyBuZWVkIHRvIHVwZGF0ZSBhbnl0aGluZyBpZiB0aGVyZSBhcmUgbm8gY2hhbmdlcy4KICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjb25zdCB0YWdzID0gZ2V0VGFncyhydW5Ub1RhZyk7CiAgICAgICAgICAgICAgICB0aGlzLnNldCgnX2RhdGFOb3RGb3VuZCcsIHRhZ3MubGVuZ3RoID09PSAwKTsKICAgICAgICAgICAgICAgIHRoaXMuc2V0KCdfcnVuVG9UYWcnLCBydW5Ub1RhZyk7CiAgICAgICAgICAgICAgICB0aGlzLmFzeW5jKCgpID0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AgICAgICAgIDwvdGYtcnVucy1zZWxlY3Rvcj4KICAgICAgICA8L2Rpdj4KICAgICAgPC9kaXY+CiAgICAgIDxkaXYgY2xhc3M9ImNlbnRlciIgc2xvdD0iY2VudGVyIj4KICAgICAgICA8dGVtcGxhdGUgaXM9ImRvbS1pZiIgaWY9IltbX2RhdGFOb3RGb3VuZF1dIj4KICAgICAgICAgIDxkaXYgY2xhc3M9Im5vLWRhdGEtd2FybmluZyI+CiAgICAgICAgICAgIDxoMz5ObyB0ZXh0IGRhdGEgd2FzIGZvdW5kLjwvaDM+CiAgICAgICAgICAgIDxwPlByb2JhYmxlIGNhdXNlczo8L3A+CiAgICAgICAgICAgIDx1bD4KICAgICAgICAgICAgICA8bGk+WW91IGhhdmVu4oCZdCB3cml0dGVuIGFueSB0ZXh0IGRhdGEgdG8geW91ciBldmVudCBmaWxlcy48L2xpPgogICAgICAgICAgICAgIDxsaT5UZW5zb3JCb2FyZCBjYW7igJl0IGZpbmQgeW91ciBldmVudCBmaWxlcy48L2xpPgogICAgICAgICAgICA8L3VsPgoKICAgICAgICAgICAgPHA+CiAgICAgICAgICAgICAgSWYgeW914oCZcmUgbmV3IHRvIHVzaW5nIFRlbnNvckJvYXJkLCBhbmQgd2FudCB0byBmaW5kIG91dCBob3cgdG8KICAgICAgICAgICAgICBhZGQgZGF0YSBhbmQgc2V0IHVwIHlvdXIgZXZlbnQgZmlsZXMsIGNoZWNrIG91dCB0aGUKICAgICAgICAgICAgICA8YQogICAgICAgICAgICAgICAgaHJlZj0iaHR0cHM6Ly9naXRodWIuY29tL3RlbnNvcmZsb3cvdGVuc29yYm9hcmQvYmxvYi9tYXN0ZXIvUkVBRE1FLm1kIgogICAgICAgICAgICAgICAgPlJFQURNRTwvYQogICAgICAgICAgICAgID4KICAgICAgICAgICAgICBhbmQgcGVyaGFwcyB0aGUKICAgICAgICAgICAgICA8YQogICAgICAgICAgICAgICAgaHJlZj0iaHR0cHM6Ly93d3cudGVuc29yZmxvdy5vcm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2F0ZWdvcnldXSIKICAgICAgICAgICAgICBpbml0aWFsLW9wZW5lZD0iW1tfc2hvdWxkT3BlbihpbmRleCldXSIKICAgICAgICAgICAgPgogICAgICAgICAgICAgIDx0ZW1wbGF0ZT4KICAgICAgICAgICAgICAgIDx0Zi10ZXh0LWxvYWRlcgogICAgICAgICAgICAgICAgICBhY3RpdmU9IltbYWN0aXZlXV0iCiAgICAgICAgICAgICAgICAgIHRhZz0iW1tpdGVtLnRhZ11dIgogICAgICAgICAgICAgICAgICBydW49IltbaXRlbS5ydW5dXSIKICAgICAgICAgICAgICAgICAgcmVxdWVzdC1tYW5hZ2VyPSJbW19yZXF1ZXN0TWFuYWdlcl1dIgogICAgICAgICAgICAgICAgPjwvdGYtdGV4dC1sb2FkZXI+CiAgICAgICAgICAgICAgPC90ZW1wbGF0ZT4KICAgICAgICAgICAgPC90Zi1jYXRlZ29yeS1wYWdpbmF0ZWQtdmlldz4KICAgICAgICAgIDwvdGVtcGxhdGU+CiAgICAgICAgPC90ZW1wbGF0ZT4KICAgICAgPC9kaXY+CiAgICA8L3RmLWRhc2hib2FyZC1sYXlvdXQ+CiAgICA8c3R5bGUgaW5jbHVkZT0iZGFzaGJvYXJkLXN0eWxlIj48L3N0eWxlPgogICAgPHN0eWxlPgogICAgICAubm8tZGF0YS13YXJuaW5nIHsKICAgICAgICBtYXgtd2lkdGg6IDU0MHB4OwogICAgICAgIG1hcmdpbjogODBweCBhdXRvIDAgYXV0bzsKICAgICAgfQogICAgPC9zdHlsZT4KICBgOwogICAgX19kZWNvcmF0ZShbCiAgICAgICAgcHJvcGVydHkoeyB0eXBlOiBCb29sZWFuIH0pLAogICAgICAgIF9fbWV0YWRhdGEoImRlc2lnbjp0eXBlIiwgQm9vbGVhbikKICAgIF0sIFRmVGV4dERhc2hib2FyZC5wcm90b3R5cGUsICJyZWxvYWRPblJlYWR5Iiwgdm9pZCAwKTsKICAgIF9fZGVjb3JhdGUoWwogICAgICAgIHByb3BlcnR5KHsgdH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0eXBlKTsKICAgICAgICB9CiAgICAgICAgb25NZXNzYWdlKGV2ZW50KSB7CiAgICAgICAgICAgIHJldHVybiBfX2F3YWl0ZXIodGhpcywgdm9pZCAwLCB2b2lkIDAsIGZ1bmN0aW9uKiAoKSB7CiAgICAgICAgICAgICAgICBjb25zdCBtZXNzYWdlID0gSlNPTi5wYXJzZShldmVudC5kYXRhKTsKICAgICAgICAgICAgICAgIC8vIFBsZWFzZSBzZWUgWzFdIGZvciByZWFzb24gd2h5IHdlIHVzZSBzdHJpbmcgdG8gYWNjZXNzIHRoZSBwcm9wZXJ0eS4KICAgICAgICAgICAgICAgIGNvbnN0IHR5cGUgPSBtZXNzYWdlWyd0eXBlJ107CiAgICAgICAgICAgICAgICBjb25zdCBpZCA9IG1lc3NhZ2VbJ2lkJ107CiAgICAgICAgICAgICAgICBjb25zdCBwYXlsb2FkID0gbWVzc2FnZVsncGF5bG9hZCddOwogICAgICAgICAgICAgICAgY29uc3QgZXJyb3IgPSBtZXNzYWdlWydlcnJvciddOwogICAgICAgICAgICAgICAgY29uc3QgaXNSZXBseSA9IG1lc3NhZ2VbJ2lzUmVwbHknXTsKICAgICAgICAgICAgICAgIGlmIChpc1JlcGx5KSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKCF0aGlzLnJlc3BvbnNlV2FpdHMuaGFzKGlkKSkKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHsgcmVzb2x2ZSwgcmVqZWN0IH0gPSB0aGlzLnJlc3BvbnNlV2FpdHMuZ2V0KGlkKTsKICAgICAgICAgICAgICAgICAgICB0aGlzLnJlc3BvbnNlV2FpdHMuZGVsZXRlKGlkKTsKICAgICAgICAgICAgICAgICAgICBpZiAoZXJyb3IpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0KG5ldyBFcnJvcihlcnJvcikpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShwYXlsb2FkKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgbGV0IHJlcGx5UGF5bG9hZCA9IG51bGw7CiAgICAgICAgICAgICAgICBsZXQgcmVwbHlFcnJvciA9IG51bGw7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5saXN0ZW5lcnMuaGFzKHR5cGUpKSB7CiAgICAgICAgICAgICAgICAgICAgY29uc3QgY2FsbGJhY2sgPSB0aGlzLmxpc3RlbmVycy5nZXQodHlwZSk7CiAgICAgICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgcmVzdWx0ID0geWllbGQgY2FsbGJhY2socGF5bG9hZCk7CiAgICAgICAgICAgICAgICAgICAgICAgIHJlcGx5UGF5bG9hZCA9IHJlc3VsdDsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgY2F0Y2ggKGUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmVwbHlFcnJvciA9IGU7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLy8gUGxlYXNlIHNlZSBbMV0gZm9yIHJlYXNvbiB3aHkgd2UgdXNlIHN0cmluZyB0byBhY2Nlc3MgdGhlIHByb3BlcnR5LgogICAgICAgICAgICAgICAgY29uc3QgcmVwbHlNZXNzYWdlID0gewogICAgICAgICAgICAgICAgICAgIFsndHlwZSddOiB0eXBlLAogICAgICAgICAgICAgICAgICAgIFsnaWQnXTogaWQsCiAgICAgICAgICAgICAgICAgICAgWydwYXlsb2FkJ106IHJlcGx5UGF5bG9hZCwKICAgICAgICAgICAgICAgICAgICBbJ2Vycm9yJ106IHJlcGx5RXJyb3IsCiAgICAgICAgICAgICAgICAgICAgWydpc1JlcGx5J106IHRydWUs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ICAgICAgICAgICAgZWxzZSBpZiAoX2VuYWJsZV9zdXBlcl9ncm9zc19tb2RlX3RoYXRfd2lsbF9jYXVzZV9iYWRfdGhpbmdzKSB7CiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygnUnhKUzogQmFjayB0byBhIGJldHRlciBlcnJvciBiZWhhdmlvci4gVGhhbmsgeW91LiA8MycpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIF9lbmFibGVfc3VwZXJfZ3Jvc3NfbW9kZV90aGF0X3dpbGxfY2F1c2VfYmFkX3RoaW5ncyA9IHZhbHVlOwogICAgICAgIH0sCiAgICAgICAgZ2V0IHVzZURlcHJlY2F0ZWRTeW5jaHJvbm91c0Vycm9ySGFuZGxpbmcoKSB7CiAgICAgICAgICAgIHJldHVybiBfZW5hYmxlX3N1cGVyX2dyb3NzX21vZGVfdGhhdF93aWxsX2NhdXNlX2JhZF90aGluZ3M7CiAgICAgICAgfSwKICAgIH07CgogICAgZnVuY3Rpb24gaG9zdFJlcG9ydEVycm9yKGVycikgewogICAgICAgIHNldFRpbWVvdXQoKCkgPT4geyB0aHJvdyBlcnI7IH0sIDApOwogICAgfQoKICAgIGNvbnN0IGVtcHR5ID0gewogICAgICAgIGNsb3NlZDogdHJ1ZSwKICAgICAgICBuZXh0KHZhbHVlKSB7IH0sCiAgICAgICAgZXJyb3IoZXJyKSB7CiAgICAgICAgICAgIGlmIChjb25maWcudXNlRGVwcmVjYXRlZFN5bmNocm9ub3VzRXJyb3JIYW5kbGluZykgewogICAgICAgICAgICAgICAgdGhyb3cgZXJyOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgaG9zdFJlcG9ydEVycm9yKGVycik7CiAgICAgICAgICAgIH0KICAgICAgICB9LAogICAgICAgIGNvbXBsZXRlKCkgeyB9CiAgICB9OwoKICAgIGNvbnN0IGlzQXJyYXkgPSAoKCkgPT4gQXJyYXkuaXNBcnJheSB8fCAoKHgpID0+IHggJiYgdH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oaXMuX3BhcmVudE9yUGFyZW50cyA9IG51bGw7CiAgICAgICAgICAgIHRoaXMuX3N1YnNjcmlwdGlvbnMgPSBudWxsOwogICAgICAgICAgICBpZiAodW5zdWJzY3JpYmUpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3Vuc3Vic2NyaWJlID0gdW5zdWJzY3JpYmU7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgdW5zdWJzY3JpYmUoKSB7CiAgICAgICAgICAgIGxldCBlcnJvcnM7CiAgICAgICAgICAgIGlmICh0aGlzLmNsb3NlZCkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGxldCB7IF9wYXJlbnRPclBhcmVudHMsIF91bnN1YnNjcmliZSwgX3N1YnNjcmlwdGlvbnMgfSA9IHRoaXM7CiAgICAgICAgICAgIHRoaXMuY2xvc2VkID0gdHJ1ZTsKICAgICAgICAgICAgdGhpcy5fcGFyZW50T3JQYXJlbnRzID0gbnVsbDsKICAgICAgICAgICAgdGhpcy5fc3Vic2NyaXB0aW9ucyA9IG51bGw7CiAgICAgICAgICAgIGlmIChfcGFyZW50T3JQYXJlbnRzIGluc3RhbmNlb2YgU3Vic2NyaXB0aW9uKSB7CiAgICAgICAgICAgICAgICBfcGFyZW50T3JQYXJlbnRzLnJlbW92ZSh0aGlzKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChfcGFyZW50T3JQYXJlbnRzICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICBmb3IgKGxldCBpbmRleCA9IDA7IGluZGV4IDwgX3BhcmVudE9yUGFyZW50cy5sZW5ndGg7ICsraW5kZXgpIHsKICAgICAgICAgICAgICAgICAgICBjb25zdCBwYXJlbnQgPSBfcGFyZW50T3JQYXJlbnRzW2luZGV4XTsKICAgICAgICAgICAgICAgICAgICBwYXJlbnQucmVtb3ZlKHRoaXMpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChpc0Z1bmN0aW9uKF91bnN1YnNjcmliZSkpIHsKICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgX3Vuc3Vic2NyaWJlLmNhbGwodGhpcyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjYXRjaCAoZSkgewogICAgICAgICAgICAgICAgICAgIGVycm9ycyA9IGUgaW5zdGFuY2VvZiBVbnN1YnNjcmlwdGlvbkVycm9yID8gZmxhdHRlblVuc3Vic2NyaXB0aW9uRXJyb3JzKGUuZXJyb3JzKSA6IFtlXTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoaXNBcnJheShfc3Vic2NyaXB0aW9ucykpIHsKICAgICAgICAgICAgICAgIGxldCBpbmRleCA9IC0xOwogICAgICAgICAgICAgICAgbGV0IGxlbiA9IF9zdWJzY3JpcHRpb25zLmxlbmd0aDsKICAgICAgICAgICAgICAgIHdoaWxlICgrK2luZGV4IDwgbGVuKSB7CiAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3ViID0gX3N1YnNjcmlwdGlvbnNbaW5kZXhdOwogICAgICAgICAgICAgICAgICAgIGlmIChpc09iamVjdChzdWIpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdWIudW5zdWJzY3JpYmUoKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBjYXRjaCAoZSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JzID0gZXJyb3JzIHx8IFtdOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGUgaW5zdGFuY2VvZiBVbnN1YnNjcmlwdGlvbkVycm9yKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JzID0gZXJyb3JzLmNvbmNhdChmbGF0dGVuVW5zdWJzY3JpcHRpb25FcnJvcnMoZS5lcnJvcnMpKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9ycy5wdXNoKGUpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChlcnJvcnMpIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBVbnN1YnNjcmlwdGlvbkVycm9yKGVycm9ycyk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgYWRkKHRlYXJkb3duKSB7CiAgICAgICAgICAgIGxldCBzdWJzY3JpcHRpb24gPSB0ZWFyZG93bjsKICAgICAgICAgICAgaWYgKCF0ZWFyZG93bikgewogICAgICAgICAgICAgICAgcmV0dXJuIFN1YnNjcmlwdGlvbi5FTVBUWTsKICAgICAgICAgICAgfQogICAgICAgICAgICBzd2l0Y2ggKHR5cGVvZiB0ZWFyZG93bikgewogICAgICAgICAgICAgICAgY2FzZSAnZnVuY3Rpb24nOgogICAgICAgICAgICAgICAgICAgIHN1YnNjcmlwdGlvbiA9IG5ldyBTdWJzY3JpcHRpb24odGVhcmRvd24pOwogICAgICAgICAgICAgICAgY2FzZSAnb2JqZWN0JzoKICAgICAgICAgICAgICAgICAgICBpZiAoc3Vic2NyaXB0aW9uID09PSB0aGlzIHx8IHN1YnNjcmlwdGlvbi5jbG9zZWQgfHwgdHlwZW9mIHN1YnNjcmlwdGlvbi51bnN1YnNjcmliZSAhPT0gJ2Z1bmN0aW9uJykgewogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc3Vic2NyaXB0aW9uOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICh0aGlzLmNsb3NlZCkgewogICAgICAgICAgICAgICAgICAgICAgICBzdWJzY3JpcHRpb24udW5zdWJzY3JpYmUoKTsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHN1YnNjcmlwdGlvbjsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIShzdWJzY3JpcHRpb24gaW5zdGFuY2VvZiBTdWJzY3JpcHRpb24pKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHRtcCA9IHN1YnNjcmlwdGlvbjsKICAgICAgICAgICAgICAgICAgICAgICAgc3Vic2NyaXB0aW9uID0gbmV3IFN1YnNjcmlwdGlvbigpOwogICAgICAgICAgICAgICAgICAgICAgICBzdWJzY3JpcHRpb24uX3N1YnNjcmlwdGlvbnMgPSBbdG1wXTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBkZWZhdWx0OiB7CiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCd1bnJlY29nbml6ZWQgdGVhcmRvd24gJyArIHRlYXJkb3duICsgJyBhZGRlZCB0byBTdWJzY3JpcHRpb24uJyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgbGV0IHsgX3BhcmVudE9yUGFyZW50cyB9ID0gc3Vic2NyaXB0aW9uOwogICAgICAgICAgICBpZiAoX3BhcmVudE9yUGFyZW50cyA9PT0gbnVsbCkgewogICAgICAgICAgICAgICAgc3Vic2NyaXB0aW9uLl9wYXJlbnRPclBhcmVudHMgPSB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKF9wYXJlbnRPclBhcmVudHMgaW5zdGFuY2VvZiBTdWJzY3JpcHRpb24pIHsKICAgICAgICAgICAgICAgIGlmIChfcGFyZW50T3JQYXJlbnRzID09PSB0aGlzKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHN1YnNjcmlwdGlvbjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHN1YnNjcmlwdGlvbi5fcGFyZW50T3JQYXJlbnRzID0gW19wYXJlbnRPclBhcmVudHMsIHRoaXNdOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKF9wYXJlbnRPclBhcmVudHMuaW5kZXhPZih0aGlzKSA9PT0gLTEpIHsKICAgICAgICAgICAgICAgIF9wYXJlbnRPclBhcmVudHMucHVzaCh0aGlzKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHJldHVybiBzdWJzY3JpcHRpb247CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY29uc3Qgc3Vic2NyaXB0aW9ucyA9IHRoaXMuX3N1YnNjcmlwdGlvbnM7CiAgICAgICAgICAgIGlmIChzdWJzY3JpcHRpb25zID09PSBudWxsKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9zdWJzY3JpcHRpb25zID0gW3N1YnNjcmlwdGlvbl07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBzdWJzY3JpcHRpb25zLnB1c2goc3Vic2NyaXB0aW9uKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gc3Vic2NyaXB0aW9uOwogICAgICAgIH0KICAgICAgICByZW1vdmUoc3Vic2NyaXB0aW9uKSB7CiAgICAgICAgICAgIGNvbnN0IHN1YnNjcmlwdGlvbnMgPSB0aGlzLl9zdWJzY3JpcHRpb25zOwogICAgICAgICAgICBpZiAoc3Vic2NyaXB0aW9ucykgewogICAgICAgICAgICAgICAgY29uc3Qgc3Vic2NyaXB0aW9uSW5kZXggPSBzdWJzY3JpcHRpb25zLmluZGV4T2Yoc3Vic2NyaXB0aW9uKTsKICAgICAgICAgICAgICAgIGlmIChzdWJzY3JpcHRpb25JbmRleCAhPT0gLTEpIHsKICAgICAgICAgICAgICAgICAgICBzdWJzY3JpcHRpb25z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ndGgpIHsKICAgICAgICAgICAgICAgIGNhc2UgMDoKICAgICAgICAgICAgICAgICAgICB0aGlzLmRlc3RpbmF0aW9uID0gZW1wdHk7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBjYXNlIDE6CiAgICAgICAgICAgICAgICAgICAgaWYgKCFkZXN0aW5hdGlvbk9yTmV4dCkgewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmRlc3RpbmF0aW9uID0gZW1wdHk7CiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGRlc3RpbmF0aW9uT3JOZXh0ID09PSAnb2JqZWN0JykgewogICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGVzdGluYXRpb25Pck5leHQgaW5zdGFuY2VvZiBTdWJzY3JpYmVyKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnN5bmNFcnJvclRocm93YWJsZSA9IGRlc3RpbmF0aW9uT3JOZXh0LnN5bmNFcnJvclRocm93YWJsZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZGVzdGluYXRpb24gPSBkZXN0aW5hdGlvbk9yTmV4dDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc3RpbmF0aW9uT3JOZXh0LmFkZCh0aGlzKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc3luY0Vycm9yVGhyb3dhYmxlID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZGVzdGluYXRpb24gPSBuZXcgU2FmZVN1YnNjcmliZXIodGhpcywgZGVzdGluYXRpb25Pck5leHQpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgICAgICAgICAgdGhpcy5zeW5jRXJyb3JUaHJvd2FibGUgPSB0cnVlOwogICAgICAgICAgICAgICAgICAgIHRoaXMuZGVzdGluYXRpb24gPSBuZXcgU2FmZVN1YnNjcmliZXIodGhpcywgZGVzdGluYXRpb25Pck5leHQsIGVycm9yLCBjb21wbGV0ZSk7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgW3J4U3Vic2NyaWJlcl0oKSB7IHJldHVybiB0aGlzOyB9CiAgICAgICAgc3RhdGljIGNyZWF0ZShuZXh0LCBlcnJvciwgY29tcGxldGUpIHsKICAgICAgICAgICAgY29uc3Qgc3Vic2NyaWJlciA9IG5ldyBTdWJzY3JpYmVyKG5leHQsIGVycm9yLCBjb21wbGV0ZSk7CiAgICAgICAgICAgIHN1YnNjcmliZXIuc3luY0Vycm9yVGhyb3dhYmxlID0gZmFsc2U7CiAgICAgICAgICAgIHJldHVybiBzdWJzY3JpYmVyOwogICAgICAgIH0KICAgICAgICBuZXh0KHZhbHVlKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5pc1N0b3BwZWQpIHsKICAgICAgICAgICAgICAgIHRoaXMuX25leHQodmFsdWUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVycm9yKGVycikgewogICAgICAgICAgICBpZiAoIXRoaXMuaXNTdG9wcGVkKSB7CiAgICAgICAgICAgICAgICB0aGlzLmlzU3RvcHBlZCA9IHRydWU7CiAgICAgICAgICAgICAgICB0aGlzLl9lcnJvcihlcnIpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGNvbXBsZXRlKCkgewogICAgICAgICAgICBpZiAoIXRoaXMuaXNTdG9wcGVkKSB7CiAgICAgICAgICAgICAgICB0aGlzLmlzU3RvcHBlZCA9IHRydWU7CiAgICAgICAgICAgICAgICB0aGlzLl9jb21wbGV0ZSgpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHVuc3Vic2NyaWJlKCkgewogICAgICAgICAgICBpZiAodGhpcy5jbG9zZWQpIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLmlzU3RvcHBlZCA9IHRydWU7CiAgICAgICAgICAgIHN1cGVyLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgfQogICAgICAgIF9uZXh0KHZhbHVlKSB7CiAgICAgICAgICAgIHRoaXMuZGVzdGluYXRpb24ubmV4dCh2YWx1ZSk7CiAgICAgICAgfQogICAgICAgIF9lcnJvcihlcnIpIHsKICAgICAgICAgICAgdGhpcy5kZXN0aW5hdGlvbi5lcnJvcihlcnIpOwogICAgICAgICAgICB0aGlzLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgfQogICAgICAgIF9jb21wbGV0ZSgpIHsKICAgICAgICAgICAgdGhpcy5kZXN0aW5hdGlvbi5jb21wbGV0ZSgpOwogICAgICAgICAgICB0aGlzLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgfQogICAgICAgIF91bnN1YnNjcmliZUFuZFJlY3ljbGUoKSB7CiAgICAgICAgICAgIGNvbnN0IHsgX3BhcmVudE9yUGFyZW50cyB9ID0gdGhpczsKICAgICAgICAgICAgdGhpcy5fcGFyZW50T3JQYXJlbnRzID0gbnVsbDsKICAgICAgICAgICAgdGhpcy51bnN1YnNjcmliZSgpOwogICAgICAgICAgICB0aGlzLmNsb3NlZCA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLmlzU3RvcHBlZCA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLl9wYXJlbnRPclBhcmVudHMgPSBfcGFyZW50T3JQYXJlbnRzOwogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9CiAgICB9CiAgICBjbGFzcyBTYWZlU3Vic2NyaWJlciBleHRlbmRzIFN1YnNjcmliZXIgewogICAgICAgIGNvbnN0cnVjdG9yKF9wYXJlbnRTdWJzY3JpYmVyLCBvYnNlcnZlck9yTmV4dCwgZXJyb3IsIGNvbXBsZXRlKSB7CiAgICAgICAgICAgIHN1cGVyKCk7CiAgICAgICAgICAgIHRoaXMuX3BhcmVudFN1YnNjcmliZXIgPSBfcGFyZW50U3Vic2NyaWJlcjsKICAgICAgICAgICAgbGV0IG5leHQ7CiAgICAgICAgICAgIGxldCBjb250ZXh0ID0gdGhpczsKICAgICAgICAgICAgaWYgKGlzRnVuY3Rpb24ob2JzZXJ2ZXJPck5leHQpKSB7CiAgICAgICAgICAgICAgICBuZXh0ID0gb2JzZXJ2ZXJPck5leHQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAob2JzZXJ2ZXJPck5leHQpIHsKICAgICAgICAgICAgICAgIG5leHQgPSBvYnNlcnZlck9yTmV4dC5uZXh0OwogICAgICAgICAgICAgICAgZXJyb3IgPSBvYnNlcnZlck9yTmV4dC5lcnJvcjsKICAgICAgICAgICAgICAgIGNvbXBsZXRlID0gb2JzZXJ2ZXJPck5leHQuY29tcGxldGU7CiAgICAgICAgICAgICAgICBpZiAob2JzZXJ2ZXJPck5leHQgIT09IGVtcHR5KSB7CiAgICAgICAgICAgICAgICAgICAgY29udGV4dCA9IE9iamVjdC5jcmVhdGUob2JzZXJ2ZXJPck5leHQpOwogICAgICAgICAgICAgICAgICAgIGlmIChpc0Z1bmN0aW9uKGNvbnRleHQudW5zdWJzY3JpYmUpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuYWRkKGNvbnRleHQudW5zdWJzY3JpYmUuYmluZChjb250ZXh0KSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGNvbnRleHQudW5zdWJzY3JpYmUgPSB0aGlzLnVuc3Vic2NyaWJlLmJpbmQodGhpcyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fY29udGV4dCA9IGNvbnRleHQ7CiAgICAgICAgICAgIHRoaXMuX25leHQgPSBuZXh0OwogICAgICAgICAgICB0aGlzLl9lcnJvciA9IGVycm9yOwogICAgICAgICAgICB0aGlzLl9jb21wbGV0ZSA9IGNvbXBsZXRlOwogICAgICAgIH0KICAgICAgICBuZXh0KHZhbHVlKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5pc1N0b3BwZWQgJiYgdGhpcy5fbmV4dCkgewogICAgICAgICAgICAgICAgY29uc3QgeyBfcGFyZW50U3Vic2NyaWJlciB9ID0gdGhpczsKICAgICAgICAgICAgICAgIGlmICghY29uZmlnLnVzZURlcHJlY2F0ZWRTeW5jaHJvbm91c0Vycm9ySGFuZGxpbmcgfHwgIV9wYXJlbnRTdWJzY3JpYmVyLnN5bmNFcnJvclRocm93YWJsZSkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX190cnlPclVuc3ViKHRoaXMuX25leHQsIHZhbHVlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKHRoaXMuX190cnlPclNldEVycm9yKF9wYXJlbnRTdWJzY3JpYmVyLCB0aGlzLl9uZXh0LCB2YWx1ZSkpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgZXJyb3IoZXJyKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5pc1N0b3BwZWQpIHsKICAgICAgICAgICAgICAgIGNvbnN0IHsgX3BhcmVudFN1YnNjcmliZXIgfSA9IHRoaXM7CiAgICAgICAgICAgICAgICBjb25zdCB7IHVzZURlcHJlY2F0ZWRTeW5jaHJvbm91c0Vycm9ySGFuZGxpbmcgfSA9IGNvbmZpZzsKICAgICAgICAgICAgICAgIGlmICh0aGlzLl9lcnJvcikgewogICAgICAgICAgICAgICAgICAgIGlmICghdXNlRGVwcmVjYXRlZFN5bmNocm9ub3VzRXJyb3JIYW5kbGluZyB8fCAhX3BhcmVudFN1YnNjcmliZXIuc3luY0Vycm9yVGhyb3dhYmxlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX190cnlPclVuc3ViKHRoaXMuX2Vycm9yLCBlcnIpOwogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9fdHJ5T3JTZXRFcnJvcihfcGFyZW50U3Vic2NyaWJlciwgdGhpcy5fZXJyb3IsIGVycik7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudW5zdWJzY3JpYmUoKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmICghX3BhcmVudFN1YnNjcmliZXIuc3luY0Vycm9yVGhyb3dhYmxlKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy51bnN1YnNjcmliZSgpOwogICAgICAgICAgICAgICAgICAgIGlmICh1c2VEZXByZWNhdGVkU3luY2hyb25vdXNFcnJvckhhbmRsaW5nKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IGVycjsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgaG9zdFJlcG9ydEVycm9yKGVycik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBpZiAodXNlRGVwcmVjYXRlZFN5bmNocm9ub3VzRXJyb3JIYW5kbGluZykgewogICAgICAgICAgICAgICAgICAgICAgICBfcGFyZW50U3Vic2NyaWJlci5zeW5jRXJyb3JWYWx1ZSA9IGVycjsKICAgICAgICAgICAgICAgICAgICAgICAgX3BhcmVudFN1YnNjcmliZXIuc3luY0Vycm9yVGhyb3duID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGhvc3RSZXBvcnRFcnJvcihlcnIpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB0aGlzLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgY29tcGxldGUoKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5pc1N0b3BwZWQpIHsKICAgICAgICAgICAgICAgIGNvbnN0IHsgX3BhcmVudFN1YnNjcmliZXIgfSA9IHRoaXM7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5fY29tcGxldGUpIHsKICAgICAgICAgICAgICAgICAgICBjb25zdCB3cmFwcGVkQ29tcGxldGUgPSAoKSA9PiB0aGlzLl9jb21wbGV0ZS5jYWxsKHRoaXMuX2NvbnRleHQpOwogICAgICAgICAgICAgICAgICAgIGlmICghY29uZmlnLnVzZURlcHJlY2F0ZWRTeW5jaHJvbm91c0Vycm9ySGFuZGxpbmcgfHwgIV9wYXJlbnRTdWJzY3JpYmVyLnN5bmNFcnJvclRocm93YWJsZSkgewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9fdHJ5T3JVbnN1Yih3cmFwcGVkQ29tcGxldGUpOwogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9fdHJ5T3JTZXRFcnJvcihfcGFyZW50U3Vic2NyaWJlciwgd3JhcHBlZENvbXBsZXRlKTsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy51bnN1YnNjcmliZSgpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIHRoaXMudW5zdWJzY3JpYmUoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBfX3RyeU9yVW5zdWIoZm4sIHZhbHVlKSB7CiAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICBmbi5jYWxsKHRoaXMuX2NvbnRleHQsIHZhbHVlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBjYXRjaCAoZXJyKSB7CiAgICAgICAgICAgICAgICB0aGlzLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgICAgICAgICBpZiAoY29uZmlnLnVzZURlcHJlY2F0ZWRTeW5jaHJvbm91c0Vycm9ySGFuZGxpbmcpIHsKICAgICAgICAgICAgICAgICAgICB0aHJvdyBlcnI7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBob3N0UmVwb3J0RXJyb3IoZXJyKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBfX3RyeU9yU2V0RXJyb3IocGFyZW50LCBmbiwgdmFsdWUpIHsKICAgICAgICAgICAgaWYgKCFjb25maWcudXNlRGVwcmVjYXRlZFN5bmNocm9ub3VzRXJyb3JIYW5kbGluZykgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdiYWQgY2FsbCcpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICBmbi5jYWxsKHRoaXMuX2NvbnRleHQsIHZhbHVlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBjYXRjaCAoZXJyKSB7CiAgICAgICAgICAgICAgICBpZiAoY29uZmlnLnVzZURlcHJlY2F0ZWRTeW5jaHJvbm91c0Vycm9ySGFuZGxpbmcpIHsKICAgICAgICAgICAgICAgICAgICBwYXJlbnQuc3luY0Vycm9yVmFsdWUgPSBlcnI7CiAgICAgICAgICAgICAgICAgICAgcGFyZW50LnN5bmNFcnJvclRocm93biA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBob3N0UmVwb3J0RXJyb3IoZXJyKTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgfQogICAgICAgIF91bnN1YnNjcmliZSgpIHsKICAgICAgICAgICAgY29uc3QgeyBfcGFyZW50U3Vic2NyaWJlciB9ID0gdGhpczsKICAgICAgICAgICAgdGhpcy5fY29udGV4dCA9IG51bGw7CiAgICAgICAgICAgIHRoaXMuX3BhcmVudFN1YnNjcmliZXIgPSBudWxsOwogICAgICAgICAgICBfcGFyZW50U3Vic2NyaWJlci51bnN1YnNjcmliZSgpOwogICAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiBjYW5SZXBvcnRFcnJvcihvYnNlcnZlcikgewogICAgICAgIHdoaWxlIChvYnNlcnZlcikgewogICAgICAgICAgICBjb25zdCB7IGNsb3NlZCwgZGVzdGluYXRpb24sIGlzU3RvcHBlZCB9ID0gb2JzZXJ2ZXI7CiAgICAgICAgICAgIGlmIChjbG9zZWQgfHwgaXNTdG9wcGVkKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoZGVzdGluYXRpb24gJiYgZGVzdGluYXRpb24gaW5zdGFuY2VvZiBTdWJzY3JpYmVyKSB7CiAgICAgICAgICAgICAgICBvYnNlcnZlciA9IGRlc3RpbmF0aW9uOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgb2JzZXJ2ZXIgPSBudWxsOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiB0cnVlOwogICAgfQoKICAgIGZ1bmN0aW9uIHRvU3Vic2NyaWJlcihuZXh0T3JPYnNlcnZlciwgZXJyb3IsIGNvbXBsZXRlKSB7CiAgICAgICAgaWYgKG5leHRPck9ic2VydmVyKSB7CiAgICAgICAgICAgIGlmIChuZXh0T3JPYnNlcnZlciBpbnN0YW5jZW9mIFN1YnNjcmliZXIpIHsKICAgICAgICAgICAgICAgIHJldHVybiBuZXh0T3JPYnNlcnZlcjsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAobmV4dE9yT2JzZXJ2ZXJbcnhTdWJzY3JpYmVyXSkgewogICAgICAgICAgICAgICAgcmV0dXJuIG5leHRPck9ic2VydmVyW3J4U3Vic2NyaWJlcl0oKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBpZiAoIW5leHRPck9ic2VydmVyICYmICFlcnJvciAmJiAhY29tcGxldGUpIHsKICAgICAgICAgICAgcmV0dXJuIG5ldyBTdWJzY3JpYmVyKGVtcHR5KTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIG5ldyBTdWJzY3JpYmVyKG5leHRPck9ic2VydmVyLCBlcnJvciwgY29tcGxldGUpOwogICAgfQoKICAgIGNvbnN0IG9ic2VydmFibGUgPSAoKCkgPT4gdHlwZW9mIFN5bWJvbCA9PT0gJ2Z1bmN0aW9uJyAmJiBTeW1ib2wub2JzZXJ2YWJsZSB8fCAnQEBvYnNlcnZhYmxlJykoKTsKCiAgICBmdW5jdGlvbiBpZGVudGl0eSh4KSB7CiAgICAgICAgcmV0dXJuIHg7CiAgICB9CgogICAgZnVuY3Rpb24gcGlwZUZyb21BcnJheShmbnMpIHsKICAgICAgICBpZiAoZm5zLmxlbmd0aCA9PT0gMCkgewogICAgICAgICAgICByZXR1cm4gaWRlbnRpdHk7CiAgICAgICAgfQogICAgICAgIGlmIChmbnMubGVuZ3RoID09PSAxKSB7CiAgICAgICAgICAgIHJldHVybiBmbnNbMF07CiAgICAgICAgfQogICAgICAgIHJldHVybiBmdW5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USU9OIFdJVEggVEhFIFVTRSBPUg0KICAgIFBFUkZPUk1BTkNFIE9GIFRISVMgU09GVFdBUkUuDQogICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8NCg0KICAgIGZ1bmN0aW9uIF9fcmVzdChzLCBlKSB7DQogICAgICAgIHZhciB0ID0ge307DQogICAgICAgIGZvciAodmFyIHAgaW4gcykgaWYgKE9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbChzLCBwKSAmJiBlLmluZGV4T2YocCkgPCAwKQ0KICAgICAgICAgICAgdFtwXSA9IHNbcF07DQogICAgICAgIGlmIChzICE9IG51bGwgJiYgdHlwZW9mIE9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMgPT09ICJmdW5jdGlvbiIpDQogICAgICAgICAgICBmb3IgKHZhciBpID0gMCwgcCA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMocyk7IGkgPCBwLmxlbmd0aDsgaSsrKSB7DQogICAgICAgICAgICAgICAgaWYgKGUuaW5kZXhPZihwW2ldKSA8IDAgJiYgT2JqZWN0LnByb3RvdHlwZS5wcm9wZXJ0eUlzRW51bWVyYWJsZS5jYWxsKHMsIHBbaV0pKQ0KICAgICAgICAgICAgICAgICAgICB0W3BbaV1dID0gc1twW2ldXTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgcmV0dXJuIHQ7DQogICAgfQ0KDQogICAgZnVuY3Rpb24gX19kZWNvcmF0ZShkZWNvcmF0b3JzLCB0YXJnZXQsIGtleSwgZGVzYykgew0KICAgICAgICB2YXIgYyA9IGFyZ3VtZW50cy5sZW5ndGgsIHIgPSBjIDwgMyA/IHRhcmdldCA6IGRlc2MgPT09IG51bGwgPyBkZXNjID0gT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcih0YXJnZXQsIGtleSkgOiBkZXNjLCBkOw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dWU6IHYsIGRvbmU6IGQgfSk7IH0sIHJlamVjdCk7IH0NCiAgICB9CgogICAgY2xhc3MgRGVmZXJyZWQgewogICAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgICAgICB0aGlzLnJlc29sdmUgPSBudWxsOwogICAgICAgICAgICB0aGlzLnJlamVjdCA9IG51bGw7CiAgICAgICAgICAgIHRoaXMucHJvbWlzZSA9IG5ldyBQcm9taXNlKChhLCBiKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLnJlc29sdmUgPSBhOwogICAgICAgICAgICAgICAgdGhpcy5yZWplY3QgPSBiOwogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICB9CgogICAgZnVuY3Rpb24gYXN5bmNJdGVyYXRvckZyb20oc291cmNlKSB7CiAgICAgICAgcmV0dXJuIGNvcm91dGluZShzb3VyY2UpOwogICAgfQogICAgZnVuY3Rpb24gY29yb3V0aW5lKHNvdXJjZSkgewogICAgICAgIHJldHVybiBfX2FzeW5jR2VuZXJhdG9yKHRoaXMsIGFyZ3VtZW50cywgZnVuY3Rpb24qIGNvcm91dGluZV8xKCkgewogICAgICAgICAgICBjb25zdCBkZWZlcnJlZHMgPSBbXTsKICAgICAgICAgICAgY29uc3QgdmFsdWVzID0gW107CiAgICAgICAgICAgIGxldCBoYXNFcnJvciA9IGZhbHNlOwogICAgICAgICAgICBsZXQgZXJyb3IgPSBudWxsOwogICAgICAgICAgICBsZXQgY29tcGxldGVkID0gZmFsc2U7CiAgICAgICAgICAgIGNvbnN0IHN1YnMgPSBzb3VyY2Uuc3Vic2NyaWJlKHsKICAgICAgICAgICAgICAgIG5leHQ6IHZhbHVlID0+IHsKICAgICAgICAgICAgICAgICAgICBpZiAoZGVmZXJyZWRzLmxlbmd0aCA+IDApIHsKICAgICAgICAgICAgICAgICAgICAgICAgZGVmZXJyZWRzLnNoaWZ0KCkucmVzb2x2ZSh7IHZhbHVlLCBkb25lOiBmYWxzZSB9KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlcy5wdXNoKHZhbHVlKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgZXJyb3I6IGVyciA9PiB7CiAgICAgICAgICAgICAgICAgICAgaGFzRXJyb3IgPSB0cnVlOwogICAgICAgICAgICAgICAgICAgIGVycm9yID0gZXJyOwogICAgICAgICAgICAgICAgICAgIHdoaWxlIChkZWZlcnJlZHMubGVuZ3RoID4gMCkgewogICAgICAgICAgICAgICAgICAgICAgICBkZWZlcnJlZHMuc2hpZnQoKS5yZWplY3QoZXJyKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgY29tcGxldGU6ICgpID0+IHsKICAgICAgICAgICAgICAgICAgICBjb21wbGV0ZWQgPSB0cnVlOwogICAgICAgICAgICAgICAgICAgIHdoaWxlIChkZWZlcnJlZHMubGVuZ3RoID4gMCkgewogICAgICAgICAgICAgICAgICAgICAgICBkZWZlcnJlZHMuc2hpZnQoKS5yZXNvbHZlKHsgdmFsdWU6IHVuZGVmaW5lZCwgZG9uZTogdHJ1ZSB9KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgIHdoaWxlICh0cnVlKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKHZhbHVlcy5sZW5ndGggPiAwKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHlpZWxkIHlpZWxkIF9fYXdhaXQodmFsdWVzLnNoaWZ0KCkpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChjb21wbGV0ZWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHlpZWxkIF9fYXdhaXQodm9pZCAwKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoaGFzRXJyb3IpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgZXJyb3I7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBkID0gbmV3IERlZmVycmVkKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmVycmVkcy5wdXNoKGQpOwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCByZXN1bHQgPSB5aWVsZCBfX2F3YWl0KGQucHJvbWlzZSk7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXN1bHQuZG9uZSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHlpZWxkIF9fYXdhaXQodm9pZCAwKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHlpZWxkIHlpZWxkIF9fYXdhaXQocmVzdWx0LnZhbHVlKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBjYXRjaCAoZXJyKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZmluYWxseSB7CiAgICAgICAgICAgICAgICBzdWJzLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9KTsKICAgIH0KCiAgICBjbGFzcyBPYnNlcnZhYmxlIHsKICAgICAgICBjb25zdHJ1Y3RvcihzdWJzY3JpYmUpIHsKICAgICAgICAgICAgdGhpcy5faXNTY2FsYXIgPSBmYWxzZTsKICAgICAgICAgICAgaWYgKHN1YnNjcmliZSkgewogICAgICAgICAgICAgICAgdGhpcy5fc3Vic2NyaWJlID0gc3Vic2NyaWJlOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGxpZnQob3BlcmF0b3IpIHsKICAgICAgICAgICAgY29uc3Qgb2JzZXJ2YWJsZSA9IG5ldyBPYnNlcnZhYmxlKCk7CiAgICAgICAgICAgIG9ic2VydmFibGUuc291cmNlID0gdGhpczsKICAgICAgICAgICAgb2JzZXJ2YWJsZS5vcGVyYXRvciA9IG9wZXJhdG9yOwogICAgICAgICAgICByZXR1cm4gb2JzZXJ2YWJsZTsKICAgICAgICB9CiAgICAgICAgc3Vic2NyaWJlKG9ic2VydmVyT3JOZXh0LCBlcnJvciwgY29tcGxldGUpIHsKICAgICAgICAgICAgY29uc3QgeyBvcGVyYXRvciB9ID0gdGhpczsKICAgICAgICAgICAgY29uc3Qgc2luayA9IHRvU3Vic2NyaWJlcihvYnNlcnZlck9yTmV4dCwgZXJyb3IsIGNvbXBsZXRlKTsKICAgICAgICAgICAgaWYgKG9wZXJhdG9yKSB7CiAgICAgICAgICAgICAgICBzaW5rLmFkZChvcGVyYXRvci5jYWxsKHNpbmssIHRoaXMuc291cmNlKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBzaW5rLmFkZCh0aGlzLnNvdXJjZSB8fCAoY29uZmlnLnVzZURlcHJlY2F0ZWRTeW5jaHJvbm91c0Vycm9ySGFuZGxpbmcgJiYgIXNpbmsuc3luY0Vycm9yVGhyb3dhYmxlKSA/CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fc3Vic2NyaWJlKHNpbmspIDoKICAgICAgICAgICAgICAgICAgICB0aGlzLl90cnlTdWJzY3JpYmUoc2luaykpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChjb25maWcudXNlRGVwcmVjYXRlZFN5bmNocm9ub3VzRXJyb3JIYW5kbGluZykgewogICAgICAgICAgICAgICAgaWYgKHNpbmsuc3luY0Vycm9yVGhyb3dhYmxlKSB7CiAgICAgICAgICAgICAgICAgICAgc2luay5zeW5jRXJyb3JUaHJvd2FibGUgPSBmYWxzZTsKICAgICAgICAgICAgICAgICAgICBpZiAoc2luay5zeW5jRXJyb3JUaHJvd24pIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgc2luay5zeW5jRXJyb3JWYWx1ZTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHNpbms7CiAgICAgICAgfQogICAgICAgIF90cnlTdWJzY3JpYmUoc2luaykgewogICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3N1YnNjcmliZShzaW5rKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBjYXRjaCAoZXJyKSB7CiAgICAgICAgICAgICAgICBpZiAoY29uZmlnLnVzZURlcHJlY2F0ZWRTeW5jaHJvbm91c0Vycm9ySGFuZGxpbmcpIHsKICAgICAgICAgICAgICAgICAgICBzaW5rLnN5bmNFcnJvclRocm93biA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgc2luay5zeW5jRXJyb3JWYWx1ZSA9IGVycjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChjYW5SZXBvcnRFcnJvcihzaW5rKSkgewogICAgICAgICAgICAgICAgICAgIHNpbmsuZXJyb3IoZXJyKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIGNvbnNvbGUud2FybihlcnIpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGZvckVhY2gobmV4dCwgcHJvbWlzZUN0b3IpIHsKICAgICAgICAgICAgcHJvbWlzZUN0b3IgPSBnZXRQcm9taXNlQ3Rvcihwcm9taXNlQ3Rvcik7CiAgICAgICAgICAgIHJldHVybiBuZXcgcHJvbWlzZUN0b3IoKHJlc29sdmUsIHJlamVjdCkgPT4gewogICAgICAgICAgICAgICAgbGV0IHN1YnNjcmlwdGlvbjsKICAgICAgICAgICAgICAgIHN1YnNjcmlwdGlvbiA9IHRoaXMuc3Vic2NyaWJlKCh2YWx1ZSkgPT4gewogICAgICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG5leHQodmFsdWUpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBjYXRjaCAoZXJyKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJlamVjdChlcnIpOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3Vic2NyaXB0aW9uKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdWJzY3JpcHRpb24udW5zdWJzY3JpYmUoKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0sIHJlamVjdCwgcmVzb2x2ZSk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICBfc3Vic2NyaWJlKHN1YnNjcmliZXIpIHsKICAgICAgICAgICAgY29uc3QgeyBzb3VyY2UgfSA9IHRoaXM7CiAgICAgICAgICAgIHJldHVybiBzb3VyY2UgJiYgc291cmNlLnN1YnNjcmliZShzdWJzY3JpYmVyKTsKICAgICAgICB9CiAgICAgICAgW29ic2VydmFibGVdKCkgewogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9CiAgICAgICAgcGlwZSguLi5vcGVyYXRpb25zKSB7CiAgICAgICAgICAgIGlmIChvcGVyYXRpb25zLmxlbmd0aCA9PT0gMCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHBpcGVGcm9tQXJyYXkob3BlcmF0aW9ucykodGhpcyk7CiAgICAgICAgfQogICAgICAgIHRvUHJvbWlzZShwcm9taXNlQ3RvcikgewogICAgICAgICAgICBwcm9taXNlQ3RvciA9IGdldFByb21pc2VDdG9yKHByb21pc2VDdG9yKTsKICAgICAgICAgICAgcmV0dXJuIG5ldyBwcm9taXNlQ3RvcigocmVzb2x2ZSwgcmVqZWN0KSA9PiB7CiAgICAgICAgICAgICAgICBsZXQgdmFsdWU7CiAgICAgICAgICAgICAgICB0aGlzLnN1YnNjcmliZSgoeCkgPT4gdmFsdWUgPSB4LCAoZXJyKSA9PiByZWplY3QoZXJyKSwgKCkgPT4gcmVzb2x2ZSh2YWx1ZSkpOwogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICB9CiAgICBPYnNlcnZhYmxlLmNyZWF0ZSA9IChzdWJzY3JpYmUpID0+IHsKICAgICAgICByZXR1cm4gbmV3IE9ic2VydmFibGUoc3Vic2NyaWJlKTsKICAgIH07CiAgICBmdW5jdGlvbiBnZXRQcm9taXNlQ3Rvcihwcm9taXNlQ3RvcikgewogICAgICAgIGlmICghcHJvbWlzZUN0b3IpIHsKICAgICAgICAgICAgcHJvbWlzZUN0b3IgPSAgUHJvbWlzZTsKICAgICAgICB9CiAgICAgICAgaWYgKCFwcm9taXNlQ3RvcikgewogICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ25vIFByb21pc2UgaW1wbCBmb3VuZCcpOwogICAgICAgIH0KICAgICAgICByZXR1cm4gcHJvbWlzZUN0b3I7CiAgICB9CiAgICAoZnVuY3Rpb24gKCkgewogICAgICAgIGlmIChTeW1ib2wgJiYgU3ltYm9sLmFzeW5jSXRlcmF0b3IpIHsKICAgICAgICAgICAgT2JzZXJ2YWJsZS5wcm90b3R5cGVbU3ltYm9sLmFzeW5jSXRlcmF0b3JdID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgcmV0dXJuIGFzeW5jSXRlcmF0b3JGcm9tKHRoaXMpOwogICAgICAgICAgICB9OwogICAgICAgIH0KICAgIH0pKCk7CgogICAgY29uc3QgT2JqZWN0VW5zdWJzY3JpYmVkRXJyb3JJbXBsID0gKCgpID0+IHsKICAgICAgICBmdW5jdGlvbiBPYmplY3RVbnN1YnNjcmliZWRFcnJvckltcGwoKSB7CiAgICAgICAgICAgIEVycm9yLmNhbGwodGhpcyk7CiAgICAgICAgICAgIHRoaXMubWVzc2FnZSA9ICdvYmplY3QgdW5zdWJzY3JpYmVkJzsKICAgICAgICAgICAgdGhpcy5uYW1lID0gJ09iamVjdFVuc3Vic2NyaWJlZEVycm9yJzsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfQogICAgICAgIE9iamVjdFVuc3Vic2NyaWJlZEVycm9ySW1wbC5wcm90b3R5cGUgPSBPYmplY3QuY3JlYXRlKEVycm9yLnByb3RvdHlwZSk7CiAgICAgICAgcmV0dXJuIE9iamVjdFVuc3Vic2NyaWJlZEVycm9ySW1wbDsKICAgIH0pKCk7CiAgICBjb25zdCBPYmplY3RVbnN1YnNjcmliZWRFcnJvciA9IE9iamVjdFVuc3Vic2NyaWJlZEVycm9ySW1wbDsKCiAgICBjbGFzcyBTdWJqZWN0U3Vic2NyaXB0aW9uIGV4dGVuZHMgU3Vic2NyaXB0aW9uIHsKICAgICAgICBjb25zdHJ1Y3RvcihzdWJqZWN0LCBzdWJzY3JpYmVyKSB7CiAgICAgICAgICAgIHN1cGVyKCk7CiAgICAgICAgICAgIHRoaXMuc3ViamVjdCA9IHN1YmplY3Q7CiAgICAgICAgICAgIHRoaXMuc3Vic2NyaWJlciA9IHN1YnNjcmliZXI7CiAgICAgICAgICAgIHRoaXMuY2xvc2VkID0gZmFsc2U7CiAgICAgICAgfQogICAgICAgIHVuc3Vic2NyaWJlKCkgewogICAgICAgICAgICBpZiAodGhpcy5jbG9zZWQpIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLmNsb3NlZCA9IHRydWU7CiAgICAgICAgICAgIGNvbnN0IHN1YmplY3QgPSB0aGlzLnN1YmplY3Q7CiAgICAgICAgICAgIGNvbnN0IG9ic2VydmVycyA9IHN1YmplY3Qub2JzZXJ2ZXJzOwogICAgICAgICAgICB0aGlzLnN1YmplY3QgPSBudWxsOwogICAgICAgICAgICBpZiAoIW9ic2VydmVycyB8fCBvYnNlcnZlcnMubGVuZ3RoID09PSAwIHx8IHN1YmplY3QuaXNTdG9wcGVkIHx8IHN1YmplY3QuY2xvc2VkKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY29uc3Qgc3Vic2NyaWJlckluZGV4ID0gb2JzZXJ2ZXJzLmluZGV4T2YodGhpcy5zdWJzY3JpYmVyKTsKICAgICAgICAgICAgaWYgKHN1YnNjcmliZXJJbmRleCAhPT0gLTEpIHsKICAgICAgICAgICAgICAgIG9ic2VydmVycy5zcGxpY2Uoc3Vic2NyaWJlckluZGV4LCAxKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KCiAgICBjbGFzcyBTdWJqZWN0U3Vic2NyaWJlciBleHRlbmRzIFN1YnNjcmliZXIgewogICAgICAgIGNvbnN0cnVjdG9yKGRlc3RpbmF0aW9uKSB7CiAgICAgICAgICAgIHN1cGVyKGRlc3RpbmF0aW9uKTsKICAgICAgICAgICAgdGhpcy5kZXN0aW5hdGlvbiA9IGRlc3RpbmF0aW9uOwogICAgICAgIH0KICAgIH0KICAgIGNsYXNzIFN1YmplY3QgZXh0ZW5kcyBPYnNlcnZhYmxlIHsKICAgICAgICBjb25zdHJ1Y3RvcigpIHsKICAgICAgICAgICAgc3VwZXIoKTsKICAgICAgICAgICAgdGhpcy5vYnNlcnZlcnMgPSBbXTsKICAgICAgICAgICAgdGhpcy5jbG9zZWQgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5pc1N0b3BwZWQgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5oYXNFcnJvciA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLnRocm93bkVycm9yID0gbnVsbDsKICAgICAgICB9CiAgICAgICAgW3J4U3Vic2NyaWJlcl0oKSB7CiAgICAgICAgICAgIHJldHVybiBuZXcgU3ViamVjdFN1YnNjcmliZXIodGhpcyk7CiAgICAgICAgfQogICAgICAgIGxpZnQob3BlcmF0b3IpIHsKICAgICAgICAgICAgY29uc3Qgc3ViamVjdCA9IG5ldyBBbm9ueW1vdXNTdWJqZWN0KHRoaXMsIHRoaXMpOwogICAgICAgICAgICBzdWJqZWN0Lm9wZXJhdG9yID0gb3BlcmF0b3I7CiAgICAgICAgICAgIHJldHVybiBzdWJqZWN0OwogICAgICAgIH0KICAgICAgICBuZXh0KHZhbHVlKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmNsb3NlZCkgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IE9iamVjdFVuc3Vic2NyaWJlZEVycm9yKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKCF0aGlzLmlzU3RvcHBlZCkgewogICAgICAgICAgICAgICAgY29uc3QgeyBvYnNlcnZlcnMgfSA9IHRoaXM7CiAgICAgICAgICAgICAgICBjb25zdCBsZW4gPSBvYnNlcnZlcnMubGVuZ3RoOwogICAgICAgICAgICAgICAgY29uc3QgY29weSA9IG9ic2VydmVycy5zbGljZSgpOwogICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBsZW47IGkrKykgewogICAgICAgICAgICAgICAgICAgIGNvcHlbaV0ubmV4dCh2YWx1ZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgZXJyb3IoZXJyKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmNsb3NlZCkgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IE9iamVjdFVuc3Vic2NyaWJlZEVycm9yKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5oYXNFcnJvciA9IHRydWU7CiAgICAgICAgICAgIHRoaXMudGhyb3duRXJyb3IgPSBlcnI7CiAgICAgICAgICAgIHRoaXMuaXNTdG9wcGVkID0gdHJ1ZTsKICAgICAgICAgICAgY29uc3QgeyBvYnNlcnZlcnMgfSA9IHRoaXM7CiAgICAgICAgICAgIGNvbnN0IGxlbiA9IG9ic2VydmVycy5sZW5ndGg7CiAgICAgICAgICAgIGNvbnN0IGNvcHkgPSBvYnNlcnZlcnMuc2xpY2UoKTsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBsZW47IGkrKykgewogICAgICAgICAgICAgICAgY29weVtpXS5lcnJvcihlcnIpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMub2JzZXJ2ZXJzLmxlbmd0aCA9IDA7CiAgICAgICAgfQogICAgICAgIGNvbXBsZXRlKCkgewogICAgICAgICAgICBpZiAodGhpcy5jbG9zZWQpIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBPYmplY3RVbnN1YnNjcmliZWRFcnJvcigpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuaXNTdG9wcGVkID0gdHJ1ZTsKICAgICAgICAgICAgY29uc3QgeyBvYnNlcnZlcnMgfSA9IHRoaXM7CiAgICAgICAgICAgIGNvbnN0IGxlbiA9IG9ic2VydmVycy5sZW5ndGg7CiAgICAgICAgICAgIGNvbnN0IGNvcHkgPSBvYnNlcnZlcnMuc2xpY2UoKTsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBsZW47IGkrKykgewogICAgICAgICAgICAgICAgY29weVtpXS5jb21wbGV0ZSgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMub2JzZXJ2ZXJzLmxlbmd0aCA9IDA7CiAgICAgICAgfQogICAgICAgIHVuc3Vic2NyaWJlKCkgewogICAgICAgICAgICB0aGlzLmlzU3RvcHBlZCA9IHRydWU7CiAgICAgICAgICAgIHRoaXMuY2xvc2VkID0gdHJ1ZTsKICAgICAgICAgICAgdGhpcy5vYnNlcnZlcnMgPSBudWxsOwogICAgICAgIH0KICAgICAgICBfdHJ5U3Vic2NyaWJlKHN1YnNjcmliZXIpIHsKICAgICAgICAgICAgaWYgKHRoaXMuY2xvc2VkKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgT2JqZWN0VW5zdWJzY3JpYmVkRXJyb3IoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHJldHVybiBzdXBlci5fdHJ5U3Vic2NyaWJlKHN1YnNjcmliZXIpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIF9zdWJzY3JpYmUoc3Vic2NyaWJlcikgewogICAgICAgICAgICBpZiAodGhpcy5jbG9zZWQpIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBPYmplY3RVbnN1YnNjcmliZWRFcnJvcigpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKHRoaXMuaGFzRXJyb3IpIHsKICAgICAgICAgICAgICAgIHN1YnNjcmliZXIuZXJyb3IodGhpcy50aHJvd25FcnJvcik7CiAgICAgICAgICAgICAgICByZXR1cm4gU3Vic2NyaXB0aW9uLkVNUFRZOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKHRoaXMuaXNTdG9wcGVkKSB7CiAgICAgICAgICAgICAgICBzdWJzY3JpYmVyLmNvbXBsZXRlKCk7CiAgICAgICAgICAgICAgICByZXR1cm4gU3Vic2NyaXB0aW9uLkVNUFRZOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5vYnNlcnZlcnMucHVzaChzdWJzY3JpYmVyKTsKICAgICAgICAgICAgICAgIHJldHVybiBuZXcgU3ViamVjdFN1YnNjcmlwdGlvbih0aGlzLCBzdWJzY3JpYmVyKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBhc09ic2VydmFibGUoKSB7CiAgICAgICAgICAgIGNvbnN0IG9ic2VydmFibGUgPSBuZXcgT2JzZXJ2YWJsZSgpOwogICAgICAgICAgICBvYnNlcnZhYmxlLnNvdXJjZSA9IHRoaXM7CiAgICAgICAgICAgIHJldHVybiBvYnNlcnZhYmxlOwogICAgICAgIH0KICAgIH0KICAgIFN1YmplY3QuY3JlYXRlID0gKGRlc3RpbmF0aW9uLCBzb3VyY2UpID0+IHsKICAgICAgICByZXR1cm4gbmV3IEFub255bW91c1N1YmplY3QoZGVzdGluYXRpb24sIHNvdXJjZSk7CiAgICB9OwogICAgY2xhc3MgQW5vbnltb3VzU3ViamVjdCBleHRlbmRzIFN1YmplY3QgewogICAgICAgIGNvbnN0cnVjdG9yKGRlc3RpbmF0aW9uLCBzb3VyY2UpIHsKICAgICAgICAgICAgc3VwZXIoKTsKICAgICAgICAgICAgdGhpcy5kZXN0aW5hdGlvbiA9IGRlc3RpbmF0aW9uOwogICAgICAgICAgICB0aGlzLnNvdXJjZSA9IHNvdXJjZTsKICAgICAgICB9CiAgICAgICAgbmV4dCh2YWx1ZSkgewogICAgICAgICAgICBjb25zdCB7IGRlc3RpbmF0aW9uIH0gPSB0aGlzOwogICAgICAgICAgICBpZiAoZGVzdGluYXRpb24gJiYgZGVzdGluYXRpb24ubmV4dCkgewogICAgICAgICAgICAgICAgZGVzdGluYXRpb24ubmV4dCh2YWx1ZSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgZXJyb3IoZXJyKSB7CiAgICAgICAgICAgIGNvbnN0IHsgZGVzdGluYXRpb24gfSA9IHRoaXM7CiAgICAgICAgICAgIGlmIChkZXN0aW5hdGlvbiAmJiBkZXN0aW5hdGlvbi5lcnJvcikgewogICAgICAgICAgICAgICAgdGhpcy5kZXN0aW5hdGlvbi5lcnJvcihlcnIpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGNvbXBsZXRlKCkgewogICAgICAgICAgICBjb25zdCB7IGRlc3RpbmF0aW9uIH0gPSB0aGlzOwogICAgICAgICAgICBpZiAoZGVzdGluYXRpb24gJiYgZGVzdGluYXRpb24uY29tcGxldGUpIHsKICAgICAgICAgICAgICAgIHRoaXMuZGVzdGluYXRpb24uY29tcGxldGUoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBfc3Vic2NyaWJlKHN1YnNjcmliZXIpIHsKICAgICAgICAgICAgY29uc3QgeyBzb3VyY2UgfSA9IHRoaXM7CiAgICAgICAgICAgIGlmIChzb3VyY2UpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLnNvdXJjZS5zdWJzY3JpYmUoc3Vic2NyaWJlcik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICByZXR1cm4gU3Vic2NyaXB0aW9uLkVNUFRZOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQoKICAgIGZ1bmN0aW9uIHJlZkNvdW50KCkgewogICAgICAgIHJldHVybiBmdW5jdGlvbiByZWZDb3VudE9wZXJhdG9yRnVuY3Rpb24oc291cmNlKSB7CiAgICAgICAgICAgIHJldHVybiBzb3VyY2UubGlmdChuZXcgUmVmQ291bnRPcGVyYXRvcihzb3VyY2UpKTsKICAgICAgICB9OwogICAgfQogICAgY2xhc3MgUmVmQ291bnRPcGVyYXRvciB7CiAgICAgICAgY29uc3RydWN0b3IoY29ubmVjdGFibGUpIHsKICAgICAgICAgICAgdGhpcy5jb25uZWN0YWJsZSA9IGNvbm5lY3RhYmxlOwogICAgICAgIH0KICAgICAgICBjYWxsKHN1YnNjcmliZXIsIHNvdXJjZSkgewogICAgICAgICAgICBjb25zdCB7IGNvbm5lY3RhYmxlIH0gPSB0aGlzOwogICAgICAgICAgICBjb25uZWN0YWJsZS5fcmVmQ291bnQrKzsKICAgICAgICAgICAgY29uc3QgcmVmQ291bnRlciA9IG5ldyBSZWZDb3VudFN1YnNjcmliZXIoc3Vic2NyaWJlciwgY29ubmVjdGFibGUpOwogICAgICAgICAgICBjb25zdCBzdWJzY3JpcHRpb24gPSBzb3VyY2Uuc3Vic2NyaWJlKHJlZkNvdW50ZXIpOwogICAgICAgICAgICBpZiAoIXJlZkNvdW50ZXIuY2xvc2VkKSB7CiAgICAgICAgICAgICAgICByZWZDb3VudGVyLmNvbm5lY3Rpb24gPSBjb25uZWN0YWJsZS5jb25uZWN0KCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHN1YnNjcmlwdGlvbjsKICAgICAgICB9CiAgICB9CiAgICBjbGFzcyBSZWZDb3VudFN1YnNjcmliZXIgZXh0ZW5kcyBTdWJzY3JpYmVyIHsKICAgICAgICBjb25zdHJ1Y3RvcihkZXN0aW5hdGlvbiwgY29ubmVjdGFibGUpIHsKICAgICAgICAgICAgc3VwZXIoZGVzdGluYXRpb24pOwogICAgICAgICAgICB0aGlzLmNvbm5lY3RhYmxlID0gY29ubmVjdGFibGU7CiAgICAgICAgICAgIHRoaXMuY29ubmVjdGlvbiA9IG51bGw7CiAgICAgICAgfQogICAgICAgIF91bnN1YnNjcmliZSgpIHsKICAgICAgICAgICAgY29uc3QgeyBjb25uZWN0YWJsZSB9ID0gdGhpczsKICAgICAgICAgICAgaWYgKCFjb25uZWN0YWJsZSkgewogICAgICAgICAgICAgICAgdGhpcy5jb25uZWN0aW9uID0gbnVsbDsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLmNvbm5lY3RhYmxlID0gbnVsbDsKICAgICAgICAgICAgY29uc3QgcmVmQ291bnQgPSBjb25uZWN0YWJsZS5fcmVmQ291bnQ7CiAgICAgICAgICAgIGlmIChyZWZDb3VudCA8PSAwKSB7CiAgICAgICAgICAgICAgICB0aGlzLmNvbm5lY3Rpb24gPSBudWxsOwogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNvbm5lY3RhYmxlLl9yZWZDb3VudCA9IHJlZkNvdW50IC0gMTsKICAgICAgICAgICAgaWYgKHJlZkNvdW50ID4gMSkgewogICAgICAgICAgICAgICAgdGhpcy5jb25uZWN0aW9uID0gbnVsbDsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICBjb25zdCB7IGNvbm5lY3Rpb24gfSA9IHRoaXM7CiAgICAgICAgICAgIGNvbnN0IHNoYXJlZENvbm5lY3Rpb24gPSBjb25uZWN0YWJsZS5fY29ubmVjdGlvbjsKICAgICAgICAgICAgdGhpcy5jb25uZWN0aW9uID0gbnVsbDsKICAgICAgICAgICAgaWYgKHNoYXJlZENvbm5lY3Rpb24gJiYgKCFjb25uZWN0aW9uIHx8IHNoYXJlZENvbm5lY3Rpb24gPT09IGNvbm5lY3Rpb24pKSB7CiAgICAgICAgICAgICAgICBzaGFyZWRDb25uZWN0aW9uLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CgogICAgY2xhc3MgQ29ubmVjdGFibGVPYnNlcnZhYmxlIGV4dGVuZHMgT2JzZXJ2YWJsZSB7CiAgICAgICAgY29uc3RydWN0b3Ioc291cmNlLCBzdWJqZWN0RmFjdG9yeSkgewogICAgICAgICAgICBzdXBlcigpOwogICAgICAgICAgICB0aGlzLnNvdXJjZSA9IHNvdXJjZTsKICAgICAgICAgICAgdGhpcy5zdWJqZWN0RmFjdG9yeSA9IHN1YmplY3RGYWN0b3J5OwogICAgICAgICAgICB0aGlzLl9yZWZDb3VudCA9IDA7CiAgICAgICAgICAgIHRoaXMuX2lzQ29tcGxldGUgPSBmYWxzZTsKICAgICAgICB9CiAgICAgICAgX3N1YnNjcmliZShzdWJzY3JpYmVyKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmdldFN1YmplY3QoKS5zdWJzY3JpYmUoc3Vic2NyaWJlcik7CiAgICAgICAgfQogICAgICAgIGdldFN1YmplY3QoKSB7CiAgICAgICAgICAgIGNvbnN0IHN1YmplY3QgPSB0aGlzLl9zdWJqZWN0OwogICAgICAgICAgICBpZiAoIXN1YmplY3QgfHwgc3ViamVjdC5pc1N0b3BwZWQpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3N1YmplY3QgPSB0aGlzLnN1YmplY3RGYWN0b3J5KCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3N1YmplY3Q7CiAgICAgICAgfQogICAgICAgIGNvbm5lY3QoKSB7CiAgICAgICAgICAgIGxldCBjb25uZWN0aW9uID0gdGhpcy5fY29ubmVjdGlvbjsKICAgICAgICAgICAgaWYgKCFjb25uZWN0aW9uKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9pc0NvbXBsZXRlID0gZmFsc2U7CiAgICAgICAgICAgICAgICBjb25uZWN0aW9uID0gdGhpcy5fY29ubmVjdGlvbiA9IG5ldyBTdWJzY3JpcHRpb24oKTsKICAgICAgICAgICAgICAgIGNvbm5lY3Rpb24uYWRkKHRoaXMuc291cmNlCiAgICAgICAgICAgICAgICAgICAgLnN1YnNjcmliZShuZXcgQ29ubmVjdGFibGVTdWJzY3JpYmVyKHRoaXMuZ2V0U3ViamVjdCgpLCB0aGlzKSkpOwogICAgICAgICAgICAgICAgaWYgKGNvbm5lY3Rpb24uY2xvc2VkKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fY29ubmVjdGlvbiA9IG51bGw7CiAgICAgICAgICAgICAgICAgICAgY29ubmVjdGlvbiA9IFN1YnNjcmlwdGlvbi5FTVBUWTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gY29ubmVjdGlvbjsKICAgICAgICB9CiAgICAgICAgcmVmQ291bnQoKSB7CiAgICAgICAgICAgIHJldHVybiByZWZDb3VudCgpKHRoaXMpOwogICAgICAgIH0KICAgIH0KICAgIGNvbnN0IGNvbm5lY3RhYmxlT2JzZXJ2YWJsZURlc2NyaXB0b3IgPSAoKCkgPT4gewogICAgICAgIGNvbnN0IGNvbm5lY3RhYmxlUHJvdG8gPSBDb25uZWN0YWJsZU9ic2VydmFibGUucHJvdG90eXBlOwogICAgICAgIHJldHVybiB7CiAgICAgICAgICAgIG9wZXJhdG9yOiB7IHZhbHVlOiBudWxsIH0sCiAgICAgICAgICAgIF9yZWZDb3VudDogeyB2YWx1ZTogMCwgd3JpdGFibGU6IHRydWUgfSwKICAgICAgICAgICAgX3N1YmplY3Q6IHsgdmFsdWU6IG51bGwsIHdyaXRhYmxlOiB0cnVlIH0sCiAgICAgICAgICAgIF9jb25uZWN0aW9uOiB7IHZhbHVlOiBudWxsLCB3cml0YWJsZTogdHJ1ZSB9LAogICAgICAgICAgICBfc3Vic2NyaWJlOiB7IHZhbHVlOiBjb25uZWN0YWJsZVByb3RvLl9zdWJzY3JpYmUgfSwKICAgICAgICAgICAgX2lzQ29tcGxldGU6IHsgdmFsdWU6IGNvbm5lY3RhYmxlUHJvdG8uX2lzQ29tcGxldGUsIHdyaXRhYmxlOiB0cnVlIH0sCiAgICAgICAgICAgIGdldFN1YmplY3Q6IHsgdmFsdWU6IGNvbm5lY3RhYmxlUHJvdG8uZ2V0U3ViamVjdCB9LAogICAgICAgICAgICBjb25uZWN0OiB7IHZhbHVlOiBjb25uZWN0YWJsZVByb3RvLmNvbm5lY3QgfSwKICAgICAgICAgICAgcmVmQ291bnQ6IHsgdmFsdWU6IGNvbm5lY3RhYmxlUHJvdG8ucmVmQ291bnQgfQogICAgICAgIH07CiAgICB9KSgpOwogICAgY2xhc3MgQ29ubmVjdGFibGVTdWJzY3JpYmVyIGV4dGVuZHMgU3ViamVjdFN1YnNjcmliZXIgewogICAgICAgIGNvbnN0cnVjdG9yKGRlc3RpbmF0aW9uLCBjb25uZWN0YWJsZSkgewogICAgICAgICAgICBzdXBlcihkZXN0aW5hdGlvbik7CiAgICAgICAgICAgIHRoaXMuY29ubmVjdGFibGUgPSBjb25uZWN0YWJsZTsKICAgICAgICB9CiAgICAgICAgX2Vycm9yKGVycikgewogICAgICAgICAgICB0aGlzLl91bnN1YnNjcmliZSgpOwogICAgICAgICAgICBzdXBlci5fZXJyb3IoZXJyKTsKICAgICAgICB9CiAgICAgICAgX2NvbXBsZXRlKCkgewogICAgICAgICAgICB0aGlzLmNvbm5lY3RhYmxlLl9pc0NvbXBsZXRlID0gdHJ1ZTsKICAgICAgICAgICAgdGhpcy5fdW5zdWJzY3JpYmUoKTsKICAgICAgICAgICAgc3VwZXIuX2NvbXBsZXRlKCk7CiAgICAgICAgfQogICAgICAgIF91bnN1YnNjcmliZSgpIHsKICAgICAgICAgICAgY29uc3QgY29ubmVjdGFibGUgPSB0aGlzLmNvbm5lY3RhYmxlOwogICAgICAgICAgICBpZiAoY29ubmVjdGFibGUpIHsKICAgICAgICAgICAgICAgIHRoaXMuY29ubmVjdGFibGUgPSBudWxsOwogICAgICAgICAgICAgICAgY29uc3QgY29ubmVjdGlvbiA9IGNvbm5lY3RhYmxlLl9jb25uZWN0aW9uOwogICAgICAgICAgICAgICAgY29ubmVjdGFibGUuX3JlZkNvdW50ID0gMDsKICAgICAgICAgICAgICAgIGNvbm5lY3RhYmxlLl9zdWJqZWN0ID0gbnVsbDsKICAgICAgICAgICAgICAgIGNvbm5lY3RhYmxlLl9jb25uZWN0aW9uID0gbnVsbDsKICAgICAgICAgICAgICAgIGlmIChjb25uZWN0aW9uKSB7CiAgICAgICAgICAgICAgICAgICAgY29ubmVjdGlvbi51bnN1YnNjcmliZSgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQoKICAgIGZ1bmN0aW9uIGdyb3VwQnkoa2V5U2VsZWN0b3IsIGVsZW1lbnRTZWxlY3RvciwgZHVyYXRpb25TZWxlY3Rvciwgc3ViamVjdFNlbGVjdG9yKSB7CiAgICAgICAgcmV0dXJuIChzb3VyY2UpID0+IHNvdXJjZS5saWZ0KG5ldyBHcm91cEJ5T3BlcmF0b3Ioa2V5U2VsZWN0b3IsIGVsZW1lbnRTZWxlY3RvciwgZHVyYXRpb25TZWxlY3Rvciwgc3ViamVjdFNlbGVjdG9yKSk7CiAgICB9CiAgICBjbGFzcyBHcm91cEJ5T3BlcmF0b3IgewogICAgICAgIGNvbnN0cnVjd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gdGhpcy5zdWJqZWN0U2VsZWN0b3IgPSBzdWJqZWN0U2VsZWN0b3I7CiAgICAgICAgICAgIHRoaXMuZ3JvdXBzID0gbnVsbDsKICAgICAgICAgICAgdGhpcy5hdHRlbXB0ZWRUb1Vuc3Vic2NyaWJlID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuY291bnQgPSAwOwogICAgICAgIH0KICAgICAgICBfbmV4dCh2YWx1ZSkgewogICAgICAgICAgICBsZXQga2V5OwogICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAga2V5ID0gdGhpcy5rZXlTZWxlY3Rvcih2YWx1ZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY2F0Y2ggKGVycikgewogICAgICAgICAgICAgICAgdGhpcy5lcnJvcihlcnIpOwogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2dyb3VwKHZhbHVlLCBrZXkpOwogICAgICAgIH0KICAgICAgICBfZ3JvdXAodmFsdWUsIGtleSkgewogICAgICAgICAgICBsZXQgZ3JvdXBzID0gdGhpcy5ncm91cHM7CiAgICAgICAgICAgIGlmICghZ3JvdXBzKSB7CiAgICAgICAgICAgICAgICBncm91cHMgPSB0aGlzLmdyb3VwcyA9IG5ldyBNYXAoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBsZXQgZ3JvdXAgPSBncm91cHMuZ2V0KGtleSk7CiAgICAgICAgICAgIGxldCBlbGVtZW50OwogICAgICAgICAgICBpZiAodGhpcy5lbGVtZW50U2VsZWN0b3IpIHsKICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgZWxlbWVudCA9IHRoaXMuZWxlbWVudFNlbGVjdG9yKHZhbHVlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGNhdGNoIChlcnIpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLmVycm9yKGVycik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBlbGVtZW50ID0gdmFsdWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKCFncm91cCkgewogICAgICAgICAgICAgICAgZ3JvdXAgPSAodGhpcy5zdWJqZWN0U2VsZWN0b3IgPyB0aGlzLnN1YmplY3RTZWxlY3RvcigpIDogbmV3IFN1YmplY3QoKSk7CiAgICAgICAgICAgICAgICBncm91cHMuc2V0KGtleSwgZ3JvdXApOwogICAgICAgICAgICAgICAgY29uc3QgZ3JvdXBlZE9ic2VydmFibGUgPSBuZXcgR3JvdXBlZE9ic2VydmFibGUoa2V5LCBncm91cCwgdGhpcyk7CiAgICAgICAgICAgICAgICB0aGlzLmRlc3RpbmF0aW9uLm5leHQoZ3JvdXBlZE9ic2VydmFibGUpOwogICAgICAgICAgICAgICAgaWYgKHRoaXMuZHVyYXRpb25TZWxlY3RvcikgewogICAgICAgICAgICAgICAgICAgIGxldCBkdXJhdGlvbjsKICAgICAgICAgICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgICAgICAgICBkdXJhdGlvbiA9IHRoaXMuZHVyYXRpb25TZWxlY3RvcihuZXcgR3JvdXBlZE9ic2VydmFibGUoa2V5LCBncm91cCkpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBjYXRjaCAoZXJyKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZXJyb3IoZXJyKTsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB0aGlzLmFkZChkdXJhdGlvbi5zdWJzY3JpYmUobmV3IEdyb3VwRHVyYXRpb25TdWJzY3JpYmVyKGtleSwgZ3JvdXAsIHRoaXMpKSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKCFncm91cC5jbG9zZWQpIHsKICAgICAgICAgICAgICAgIGdyb3VwLm5leHQoZWxlbWVudCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgX2Vycm9yKGVycikgewogICAgICAgICAgICBjb25zdCBncm91cHMgPSB0aGlzLmdyb3VwczsKICAgICAgICAgICAgaWYgKGdyb3VwcykgewogICAgICAgICAgICAgICAgZ3JvdXBzLmZvckVhY2goKGdyb3VwLCBrZXkpID0+IHsKICAgICAgICAgICAgICAgICAgICBncm91cC5lcnJvcihlcnIpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBncm91cHMuY2xlYXIoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLmRlc3RpbmF0aW9uLmVycm9yKGVycik7CiAgICAgICAgfQogICAgICAgIF9jb21wbGV0ZSgpIHsKICAgICAgICAgICAgY29uc3QgZ3JvdXBzID0gdGhpcy5ncm91cHM7CiAgICAgICAgICAgIGlmIChncm91cHMpIHsKICAgICAgICAgICAgICAgIGdyb3Vwcy5mb3JFYWNoKChncm91cCwga2V5KSA9PiB7CiAgICAgICAgICAgICAgICAgICAgZ3JvdXAuY29tcGxldGUoKTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgZ3JvdXBzLmNsZWFyKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5kZXN0aW5hdGlvbi5jb21wbGV0ZSgpOwogICAgICAgIH0KICAgICAgICByZW1vdmVHcm91cChrZXkpIHsKICAgICAgICAgICAgdGhpcy5ncm91cHMuZGVsZXRlKGtleSk7CiAgICAgICAgfQogICAgICAgIHVuc3Vic2NyaWJlKCkgewogICAgICAgICAgICBpZiAoIXRoaXMuY2xvc2VkKSB7CiAgICAgICAgICAgICAgICB0aGlzLmF0dGVtcHRlZFRvVW5zdWJzY3JpYmUgPSB0cnVlOwogICAgICAgICAgICAgICAgaWYgKHRoaXMuY291bnQgPT09IDApIHsKICAgICAgICAgICAgICAgICAgICBzdXBlci51bnN1YnNjcmliZSgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQogICAgY2xhc3MgR3JvdXBEdXJhdGlvblN1YnNjcmliZXIgZXh0ZW5kcyBTdWJzY3JpYmVyIHsKICAgICAgICBjb25zdHJ1Y3RvcihrZXksIGdyb3VwLCBwYXJlbnQpIHsKICAgICAgICAgICAgc3VwZXIoZ3JvdXApOwogICAgICAgICAgICB0aGlzLmtleSA9IGtleTsKICAgICAgICAgICAgdGhpcy5ncm91cCA9IGdyb3VwOwogICAgICAgICAgICB0aGlzLnBhcmVudCA9IHBhcmVudDsKICAgICAgICB9CiAgICAgICAgX25leHQodmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5jb21wbGV0ZSgpOwogICAgICAgIH0KICAgICAgICBfdW5zdWJzY3JpYmUoKSB7CiAgICAgICAgICAgIGNvbnN0IHsgcGFyZW50LCBrZXkgfSA9IHRoaXM7CiAgICAgICAgICAgIHRoaXMua2V5ID0gdGhpcy5wYXJlbnQgPSBudWxsOwogICAgICAgICAgICBpZiAocGFyZW50KSB7CiAgICAgICAgICAgICAgICBwYXJlbnQucmVtb3ZlR3JvdXAoa2V5KTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIGNsYXNzIEdyb3VwZWRPYnNlcnZhYmxlIGV4dGVuZHMgT2JzZXJ2YWJsZSB7CiAgICAgICAgY29uc3RydWN0b3Ioa2V5LCBncm91cFN1YmplY3QsIHJlZkNvdW50U3Vic2NyaXB0aW9uKSB7CiAgICAgICAgICAgIHN1cGVyKCk7CiAgICAgICAgICAgIHRoaXMua2V5ID0ga2V5OwogICAgICAgICAgICB0aGlzLmdyb3VwU3ViamVjdCA9IGdyb3VwU3ViamVjdDsKICAgICAgICAgICAgdGhpcy5yZWZDb3VudFN1YnNjcmlwdGlvbiA9IHJlZkNvdW50U3Vic2NyaXB0aW9uOwogICAgICAgIH0KICAgICAgICBfc3Vic2NyaWJlKHN1YnNjcmliZXIpIHsKICAgICAgICAgICAgY29uc3Qgc3Vic2NyaXB0aW9uID0gbmV3IFN1YnNjcmlwdGlvbigpOwogICAgICAgICAgICBjb25zdCB7IHJlZkNvdW50U3Vic2NyaXB0aW9uLCBncm91cFN1YmplY3QgfSA9IHRoaXM7CiAgICAgICAgICAgIGlmIChyZWZDb3VudFN1YnNjcmlwdGlvbiAmJiAhcmVmQ291bnRTdWJzY3JpcHRpb24uY2xvc2VkKSB7CiAgICAgICAgICAgICAgICBzdWJzY3JpcHRpb24uYWRkKG5ldyBJbm5lclJlZkNvdW50U3Vic2NyaXB0aW9uKHJlZkNvdW50U3Vic2NyaXB0aW9uKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgc3Vic2NyaXB0aW9uLmFkZChncm91cFN1YmplY3Quc3Vic2NyaWJlKHN1YnNjcmliZXIpKTsKICAgICAgICAgICAgcmV0dXJuIHN1YnNjcmlwdGlvbjsKICAgICAgICB9CiAgICB9CiAgICBjbGFzcyBJbm5lclJlZkNvdW50U3Vic2NyaXB0aW9uIGV4dGVuZHMgU3Vic2NyaXB0aW9uIHsKICAgICAgICBjb25zdHJ1Y3RvcihwYXJlbnQpIHsKICAgICAgICAgICAgc3VwZXIoKTsKICAgICAgICAgICAgdGhpcy5wYXJlbnQgPSBwYXJlbnQ7CiAgICAgICAgICAgIHBhcmVudC5jb3VudCsrOwogICAgICAgIH0KICAgICAgICB1bnN1YnNjcmliZSgpIHsKICAgICAgICAgICAgY29uc3QgcGFyZW50ID0gdGhpcy5wYXJlbnQ7CiAgICAgICAgICAgIGlmICghcGFyZW50LmNsb3NlZCAmJiAhdGhpcy5jbG9zZWQpIHsKICAgICAgICAgICAgICAgIHN1cGVyLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgICAgICAgICBwYXJlbnQuY291bnQgLT0gMTsKICAgICAgICAgICAgICAgIGlmIChwYXJlbnQuY291bnQgPT09IDAgJiYgcGFyZW50LmF0dGVtcHRlZFRvVW5zdWJzY3JpYmUpIHsKICAgICAgICAgICAgICAgICAgICBwYXJlbnQudW5zdWJzY3JpYmUoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KCiAgICBjbGFzcyBCZWhhdmlvclN1YmplY3QgZXh0ZW5kcyBTdWJqZWN0IHsKICAgICAgICBjb25zdHJ1Y3RvcihfdmFsdWUpIHsKICAgICAgICAgICAgc3VwZXIoKTsKICAgICAgICAgICAgdGhpcy5fdmFsdWUgPSBfdmFsdWU7CiAgICAgICAgfQogICAgICAgIGdldCB2YWx1ZSgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuZ2V0VmFsdWUoKTsKICAgICAgICB9CiAgICAgICAgX3N1YnNjcmliZShzdWJzY3JpYmVyKSB7CiAgICAgICAgICAgIGNvbnN0IHN1YnNjcmlwdGlvbiA9IHN1cGVyLl9zdWJzY3JpYmUoc3Vic2NyaWJlcik7CiAgICAgICAgICAgIGlmIChzdWJzY3JpcHRpb24gJiYgIXN1YnNjcmlwdGlvbi5jbG9zZWQpIHsKICAgICAgICAgICAgICAgIHN1YnNjcmliZXIubmV4dCh0aGlzLl92YWx1ZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHN1YnNjcmlwdGlvbjsKICAgICAgICB9CiAgICAgICAgZ2V0VmFsdWUoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmhhc0Vycm9yKSB7CiAgICAgICAgICAgICAgICB0aHJvdyB0aGlzLnRocm93bkVycm9yOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKHRoaXMuY2xvc2VkKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgT2JqZWN0VW5zdWJzY3JpYmVkRXJyb3IoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl92YWx1ZTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBuZXh0KHZhbHVlKSB7CiAgICAgICAgICAgIHN1cGVyLm5leHQodGhpcy5fdmFsdWUgPSB2YWx1ZSk7CiAgICAgICAgfQogICAgfQoKICAgIGNsYXNzIEFjdGlvbiBleHRlbmRzIFN1YnNjcmlwdGlvbiB7CiAgICAgICAgY29uc3RydWN0b3Ioc2NoZWR1bGVyLCB3b3JrKSB7CiAgICAgICAgICAgIHN1cGVyKCk7CiAgICAgICAgfQogICAgICAgIHNjaGVkdWxlKHN0YXRlLCBkZWxheSA9IDApIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfQogICAgfQoKICAgIGNsYXNzIEFzeW5jQWN0aW9uIGV4dGVuZHMgQWN0aW9uIHsKICAgICAgICBjb25zdHJ1Y3RvcihzY2hlZHVsZXIsIHdvcmspIHsKICAgICAgICAgICAgc3VwZXIoc2NoZWR1bGVyLCB3b3JrKTsKICAgICAgICAgICAgdGhpcy5zY2hlZHVsZXIgPSBzY2hlZHVsZXI7CiAgICAgICAgICAgIHRoaXMud29yayA9IHdvcms7CiAgICAgICAgICAgIHRoaXMucGVuZGluZyA9IGZhbHNlOwogICAgICAgIH0KICAgICAgICBzY2hlZHVsZShzdGF0ZSwgZGVsYXkgPSAwKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmNsb3NlZCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5zdGF0ZSA9IHN0YXRlOwogICAgICAgICAgICBjb25zdCBpZCA9IHRoaXMuaWQ7CiAgICAgICAgICAgIGNvbnN0IHNjaGVkdWxlciA9IHRoaXMuc2NoZWR1bGVyOwogICAgICAgICAgICBpZiAoaWQgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5pZCA9IHRoaXMucmVjeWNsZUFzeW5jSWQoc2NoZWR1bGVyLCBpZCwgZGVsYXkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMucGVuZGluZyA9IHRydWU7CiAgICAgICAgICAgIHRoaXMuZGVsYXkgPSBkZWxheTsKICAgICAgICAgICAgdGhpcy5pZCA9IHRoaXMuaWQgfHwgdGhpcy5yZXF1ZXN0QXN5bmNJZChzY2hlZHVsZXIsIHRoaXMuaWQsIGRlbGF5KTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfQogICAgICAgIHJlcXVlc3RBc3luY0lkKHNjaGVkdWxlciwgaWQsIGRlbGF5ID0gMCkgewogICAgICAgICAgICByZXR1cm4gc2V0SW50ZXJ2YWwoc2NoZWR1bGVyLmZsdXNoLmJpbmQoc2NoZWR1bGVyLCB0aGlzKSwgZGVsYXkpOwogICAgICAgIH0KICAgICAgICByZWN5Y2xlQXN5bmNJZChzY2hlZHVsZXIsIGlkLCBkZWxheSA9IDApIHsKICAgICAgICAgICAgaWYgKGRlbGF5ICE9PSBudWxsICYmIHRoaXMuZGVsYXkgPT09IGRlbGF5ICYmIHRoaXMucGVuZGluZyA9PT0gZmFsc2UpIHsKICAgICAgICAgICAgICAgIHJldHVybiBpZDsKICAgICAgICAgICAgfQogICAgICAgICAgICBjbGVhckludGVydmFsKGlkKTsKICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDsKICAgICAgICB9CiAgICAgICAgZXhlY3V0ZShzdGF0ZSwgZGVsYXkpIHsKICAgICAgICAgICAgaWYgKHRoaXMuY2xvc2VkKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEVycm9yKCdleGVjdXRpbmcgYSBjYW5jZWxsZWQgYWN0aW9uJyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5wZW5kaW5nID0gZmFsc2U7CiAgICAgICAgICAgIGNvbnN0IGVycm9yID0gdGhpcy5fZXhlY3V0ZShzdGF0ZSwgZGVsYXkpOwogICAgICAgICAgICBpZiAoZXJyb3IpIHsKICAgICAgICAgICAgICAgIHJldHVybiBlcnJvcjsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmICh0aGlzLnBlbmRpbmcgPT09IGZhbHNlICYmIHRoaXMuaWQgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5pZCA9IHRoaXMucmVjeWNsZUFzeW5jSWQodGhpcy5zY2hlZHVsZXIsIHRoaXMuaWQsIG51bGwpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIF9leGVjdXRlKHN0YXRlLCBkZWxheSkgewogICAgICAgICAgICBsZXQgZXJyb3JlZCA9IGZhbHNlOwogICAgICAgICAgICBsZXQgZXJyb3JWYWx1ZSA9IHVuZGVmaW5lZDsKICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgIHRoaXMud29yayhzdGF0ZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY2F0Y2ggKGUpIHsKICAgICAgICAgICAgICAgIGVycm9yZWQgPSB0cnVlOwogICAgICAgICAgICAgICAgZXJyb3JWYWx1ZSA9ICEhZSAmJiBlIHx8IG5ldyBFcnJvcihlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoZXJyb3JlZCkgewogICAgICAgICAgICAgICAgdGhpcy51bnN1YnNjcmliZSgpOwogICAgICAgICAgICAgICAgcmV0dXJuIGVycm9yVmFsdWU7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgX3Vuc3Vic2NyaWJlKCkgewogICAgICAgICAgICBjb25zdCBpZCA9IHRoaXMuaWQ7CiAgICAgICAgICAgIGNvbnN0IHNjaGVkdWxlciA9IHRoaXMuc2NoZWR1bGVyOwogICAgICAgICAgICBjb25zdCBhY3Rpb25zID0gc2NoZWR1bGVyLmFjdGlvbnM7CiAgICAgICAgICAgIGNvbnN0IGluZGV4ID0gYWN0aW9ucy5pbmRleE9mKHRoaXMpOwogICAgICAgICAgICB0aGlzLndvcmsgPSBudWxsOwogICAgICAgICAgICB0aGlzLnN0YXRlID0gbnVsbDsKICAgICAgICAgICAgdGhpcy5wZW5kaW5nID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuc2NoZWR1bGVyID0gbnVsbDsKICAgICAgICAgICAgaWYgKGluZGV4ICE9PSAtMSkgewogICAgICAgICAgICAgICAgYWN0aW9ucy5zcGxpY2UoaW5kZXgsIDEpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChpZCAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICB0aGlzLmlkID0gdGhpcy5yZWN5Y2xlQXN5bmNJZChzY2hlZHVsZXIsIGlkLCBudWxsKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLmRlbGF5ID0gbnVsbDsKICAgICAgICB9CiAgICB9CgogICAgY2xhc3MgUXVldWVBY3Rpb24gZXh0ZW5kcyBBc3luY0FjdGlvbiB7CiAgICAgICAgY29uc3RydWN0b3Ioc2NoZWR1bGVyLCB3b3JrKSB7CiAgICAgICAgICAgIHN1cGVyKHNjaGVkdWxlciwgd29yayk7CiAgICAgICAgICAgIHRoaXMuc2NoZWR1bGVyID0gc2NoZWR1bGVyOwogICAgICAgICAgICB0aGlzLndvcmsgPSB3b3JrOwogICAgICAgIH0KICAgICAgICBzY2hlZHVsZShzdGF0ZSwgZGVsYXkgPSAwKSB7CiAgICAgICAgICAgIGlmIChkZWxheSA+IDApIHsKICAgICAgICAgICAgICAgIHJldHVybiBzdXBlci5zY2hlZHVsZShzdGF0ZSwgZGVsYXkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuZGVsYXkgPSBkZWxheTsKICAgICAgICAgICAgdGhpcy5zdGF0ZSA9IHN0YXRlOwogICAgICAgICAgICB0aGlzLnNjaGVkdWxlci5mbHVzaCh0aGlzKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfQogICAgICAgIGV4ZWN1dGUoc3RhdGUsIGRlbGF5KSB7CiAgICAgICAgICAgIHJldHVybiAoZGVsYXkgPiAwIHx8IHRoaXMuY2xvc2VkKSA/CiAgICAgICAgICAgICAgICBzdXBlci5leGVjdXRlKHN0YXRlLCBkZWxheSkgOgogICAgICAgICAgICAgICAgdGhpcy5fZXhlY3V0ZShzdGF0ZSwgZGVsYXkpOwogICAgICAgIH0KICAgICAgICByZXF1ZXN0QXN5bmNJZChzY2hlZHVsZXIsIGlkLCBkZWxheSA9IDApIHsKICAgICAgICAgICAgaWYgKChkZWxheSAhPT0gbnVsbCAmJiBkZWxheSA+IDApIHx8IChkZWxheSA9PT0gbnVsbCAmJiB0aGlzLmRlbGF5ID4gMCkpIHsKICAgICAgICAgICAgICAgIHJldHVybiBzdXBlci5yZXF1ZXN0QXN5bmNJZChzY2hlZHVsZXIsIGlkLCBkZWxheSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHNjaGVkdWxlci5mbHVzaCh0aGlzKTsKICAgICAgICB9CiAgICB9CgogICAgY2xhc3MgU2NoZWR1bGVyIHsKICAgICAgICBjb25zdHJ1Y3RvcihTY2hlZHVsZXJBY3Rpb24sIG5vdyA9IFNjaGVkdWxlci5ub3cpIHsKICAgICAgICAgICAgdGhpcy5TY2hlZHVsZXJBY3Rpb24gPSBTY2hlZHVsZXJBY3Rpb247CiAgICAgICAgICAgIHRoaXMubm93ID0gbm93OwogICAgICAgIH0KICAgICAgICBzY2hlZHVsZSh3b3JrLCBkZWxheSA9IDAsIHN0YXRlKSB7CiAgICAgICAgICAgIHJldHVybiBuZXcgdGhpcy5TY2hlZHVsZXJBY3Rpb24odGhpcywgd29yaykuc2NoZWR1bGUoc3RhdGUsIGRlbGF5KTsKICAgICAgICB9CiAgICB9CiAgICBTY2hlZHVsZXIubm93ID0gKCkgPT4gRGF0ZS5ub3coKTsKCiAgICBjbGFzcyBBc3luY1NjaGVkdWxlciBleHRlbmRzIFNjaGVkdWxlciB7CiAgICAgICAgY29uc3RydWN0b3IoU2NoZWR1bGVyQWN0aW9uLCBub3cgPSBTY2hlZHVsZXIubm93KSB7CiAgICAgICAgICAgIHN1cGVyKFNjaGVkdWxlckFjdGlvbiwgKCkgPT4gewogICAgICAgICAgICAgICAgaWYgKEFzeW5jU2NoZWR1bGVyLmRlbGVnYXRlICYmIEFzeW5jU2NoZWR1bGVyLmRlbGVnYXRlICE9PSB0aGlzKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEFzeW5jU2NoZWR1bGVyLmRlbGVnYXRlLm5vdygpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5vdygpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdGhpcy5hY3Rpb25zID0gW107CiAgICAgICAgICAgIHRoaXMuYWN0aXZlID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuc2NoZWR1bGVkID0gdW5kZWZpbmVkOwogICAgICAgIH0KICAgICAgICBzY2hlZHVsZSh3b3JrLCBkZWxheSA9IDAsIHN0YXRlKSB7CiAgICAgICAgICAgIGlmIChBc3luY1NjaGVkdWxlci5kZWxlZ2F0ZSAmJiBBc3luY1NjaGVkdWxlci5kZWxlZ2F0ZSAhPT0gdGhpcykgewogICAgICAgICAgICAgICAgcmV0dXJuIEFzeW5jU2NoZWR1bGVyLmRlbGVnYXRlLnNjaGVkdWxlKHdvcmssIGRlbGF5LCBzdGF0ZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICByZXR1cm4gc3VwZXIuc2NoZWR1bGUod29yaywgZGVsYXksIHN0YXRlKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBmbHVzaChhY3Rpb24pIHsKICAgICAgICAgICAgY29uc3QgeyBhY3Rpb25zIH0gPSB0aGlzOwogICAgICAgICAgICBpZiAodGhpcy5hY3RpdmUpIHsKICAgICAgICAgICAgICAgIGFjdGlvbnMucHVzaChhY3Rpb24pOwogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGxldCBlcnJvcjsKICAgICAgICAgICAgdGhpcy5hY3Rpd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rKykgewogICAgICAgICAgICBzdWJzY3JpYmVyLm5leHQoYXJyYXlbaV0pOwogICAgICAgIH0KICAgICAgICBzdWJzY3JpYmVyLmNvbXBsZXRlKCk7CiAgICB9OwoKICAgIGZ1bmN0aW9uIHNjaGVkdWxlQXJyYXkoaW5wdXQsIHNjaGVkdWxlcikgewogICAgICAgIHJldHVybiBuZXcgT2JzZXJ2YWJsZShzdWJzY3JpYmVyID0+IHsKICAgICAgICAgICAgY29uc3Qgc3ViID0gbmV3IFN1YnNjcmlwdGlvbigpOwogICAgICAgICAgICBsZXQgaSA9IDA7CiAgICAgICAgICAgIHN1Yi5hZGQoc2NoZWR1bGVyLnNjaGVkdWxlKGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgIGlmIChpID09PSBpbnB1dC5sZW5ndGgpIHsKICAgICAgICAgICAgICAgICAgICBzdWJzY3JpYmVyLmNvbXBsZXRlKCk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgc3Vic2NyaWJlci5uZXh0KGlucHV0W2krK10pOwogICAgICAgICAgICAgICAgaWYgKCFzdWJzY3JpYmVyLmNsb3NlZCkgewogICAgICAgICAgICAgICAgICAgIHN1Yi5hZGQodGhpcy5zY2hlZHVsZSgpKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSkpOwogICAgICAgICAgICByZXR1cm4gc3ViOwogICAgICAgIH0pOwogICAgfQoKICAgIGZ1bmN0aW9uIGZyb21BcnJheShpbnB1dCwgc2NoZWR1bGVyKSB7CiAgICAgICAgaWYgKCFzY2hlZHVsZXIpIHsKICAgICAgICAgICAgcmV0dXJuIG5ldyBPYnNlcnZhYmxlKHN1YnNjcmliZVRvQXJyYXkoaW5wdXQpKTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIHJldHVybiBzY2hlZHVsZUFycmF5KGlucHV0LCBzY2hlZHVsZXIpOwogICAgICAgIH0KICAg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ljYXRpb25LaW5kIHx8IChOb3RpZmljYXRpb25LaW5kID0ge30pKTsKICAgIGNsYXNzIE5vdGlmaWNhdGlvbiB7CiAgICAgICAgY29uc3RydWN0b3Ioa2luZCwgdmFsdWUsIGVycm9yKSB7CiAgICAgICAgICAgIHRoaXMua2luZCA9IGtpbmQ7CiAgICAgICAgICAgIHRoaXMudmFsdWUgPSB2YWx1ZTsKICAgICAgICAgICAgdGhpcy5lcnJvciA9IGVycm9yOwogICAgICAgICAgICB0aGlzLmhhc1ZhbHVlID0ga2luZCA9PT0gJ04nOwogICAgICAgIH0KICAgICAgICBvYnNlcnZlKG9ic2VydmVyKSB7CiAgICAgICAgICAgIHN3aXRjaCAodGhpcy5raW5kKSB7CiAgICAgICAgICAgICAgICBjYXNlICdOJzoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gb2JzZXJ2ZXIubmV4dCAmJiBvYnNlcnZlci5uZXh0KHRoaXMudmFsdWUpOwogICAgICAgICAgICAgICAgY2FzZSAnRSc6CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9ic2VydmVyLmVycm9yICYmIG9ic2VydmVyLmVycm9yKHRoaXMuZXJyb3IpOwogICAgICAgICAgICAgICAgY2FzZSAnQyc6CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9ic2VydmVyLmNvbXBsZXRlICYmIG9ic2VydmVyLmNvbXBsZXRlKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgZG8obmV4dCwgZXJyb3IsIGNvbXBsZXRlKSB7CiAgICAgICAgICAgIGNvbnN0IGtpbmQgPSB0aGlzLmtpbmQ7CiAgICAgICAgICAgIHN3aXRjaCAoa2luZCkgewogICAgICAgICAgICAgICAgY2FzZSAnTic6CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5leHQgJiYgbmV4dCh0aGlzLnZhbHVlKTsKICAgICAgICAgICAgICAgIGNhc2UgJ0UnOgogICAgICAgICAgICAgICAgICAgIHJldHVybiBlcnJvciAmJiBlcnJvcih0aGlzLmVycm9yKTsKICAgICAgICAgICAgICAgIGNhc2UgJ0MnOgogICAgICAgICAgICAgICAgICAgIHJldHVybiBjb21wbGV0ZSAmJiBjb21wbGV0ZSgpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGFjY2VwdChuZXh0T3JPYnNlcnZlciwgZXJyb3IsIGNvbXBsZXRlKSB7CiAgICAgICAgICAgIGlmIChuZXh0T3JPYnNlcnZlciAmJiB0eXBlb2YgbmV4dE9yT2JzZXJ2ZXIubmV4dCA9PT0gJ2Z1bmN0aW9uJykgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMub2JzZXJ2ZShuZXh0T3JPYnNlcnZlcik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5kbyhuZXh0T3JPYnNlcnZlciwgZXJyb3IsIGNvbXBsZXRlKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICB0b09ic2VydmFibGUoKSB7CiAgICAgICAgICAgIGNvbnN0IGtpbmQgPSB0aGlzLmtpbmQ7CiAgICAgICAgICAgIHN3aXRjaCAoa2luZCkgewogICAgICAgICAgICAgICAgY2FzZSAnTic6CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9mKHRoaXMudmFsdWUpOwogICAgICAgICAgICAgICAgY2FzZSAnRSc6CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRocm93RXJyb3IodGhpcy5lcnJvcik7CiAgICAgICAgICAgICAgICBjYXNlICdDJzoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gRU1QVFk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCd1bmV4cGVjdGVkIG5vdGlmaWNhdGlvbiBraW5kIHZhbHVlJyk7CiAgICAgICAgfQogICAgICAgIHN0YXRpYyBjcmVhdGVOZXh0KHZhbHVlKSB7CiAgICAgICAgICAgIGlmICh0eXBlb2YgdmFsdWUgIT09ICd1bmRlZmluZWQnKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IE5vdGlmaWNhdGlvbignTicsIHZhbHVlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gTm90aWZpY2F0aW9uLnVuZGVmaW5lZFZhbHVlTm90aWZpY2F0aW9uOwogICAgICAgIH0KICAgICAgICBzdGF0aWMgY3JlYXRlRXJyb3IoZXJyKSB7CiAgICAgICAgICAgIHJldHVybiBuZXcgTm90aWZpY2F0aW9uKCdFJywgdW5kZWZpbmVkLCBlcnIpOwogICAgICAgIH0KICAgICAgICBzdGF0aWMgY3JlYXRlQ29tcGxldGUoKSB7CiAgICAgICAgICAgIHJldHVybiBOb3RpZmljYXRpb24uY29tcGxldGVOb3RpZmljYXRpb247CiAgICAgICAgfQogICAgfQogICAgTm90aWZpY2F0aW9uLmNvbXBsZXRlTm90aWZpY2F0aW9uID0gbmV3IE5vdGlmaWNhdGlvbignQycpOwogICAgTm90aWZpY2F0aW9uLnVuZGVmaW5lZFZhbHVlTm90aWZpY2F0aW9uID0gbmV3IE5vdGlmaWNhdGlvbignTicsIHVuZGVmaW5lZCk7CgogICAgZnVuY3Rpb24gb2JzZXJ2ZU9uKHNjaGVkdWxlciwgZGVsYXkgPSAwKSB7CiAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIG9ic2VydmVPbk9wZXJhdG9yRnVuY3Rpb24oc291cmNlKSB7CiAgICAgICAgICAgIHJldHVybiBzb3VyY2UubGlmdChuZXcgT2JzZXJ2ZU9uT3BlcmF0b3Ioc2NoZWR1bGVyLCBkZWxheSkpOwogICAgICAgIH07CiAgICB9CiAgICBjbGFzcyBPYnNlcnZlT25PcGVyYXRvciB7CiAgICAgICAgY29uc3RydWN0b3Ioc2NoZWR1bGVyLCBkZWxheSA9IDApIHsKICAgICAgICAgICAgdGhpcy5zY2hlZHVsZXIgPSBzY2hlZHVsZXI7CiAgICAgICAgICAgIHRoaXMuZGVsYXkg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ICAgICAgICAgICB0aGlzLnNjaGVkdWxlTWVzc2FnZShOb3RpZmljYXRpb24uY3JlYXRlTmV4dCh2YWx1ZSkpOwogICAgICAgIH0KICAgICAgICBfZXJyb3IoZXJyKSB7CiAgICAgICAgICAgIHRoaXMuc2NoZWR1bGVNZXNzYWdlKE5vdGlmaWNhdGlvbi5jcmVhdGVFcnJvcihlcnIpKTsKICAgICAgICAgICAgdGhpcy51bnN1YnNjcmliZSgpOwogICAgICAgIH0KICAgICAgICBfY29tcGxldGUoKSB7CiAgICAgICAgICAgIHRoaXMuc2NoZWR1bGVNZXNzYWdlKE5vdGlmaWNhdGlvbi5jcmVhdGVDb21wbGV0ZSgpKTsKICAgICAgICAgICAgdGhpcy51bnN1YnNjcmliZSgpOwogICAgICAgIH0KICAgIH0KICAgIGNsYXNzIE9ic2VydmVPbk1lc3NhZ2UgewogICAgICAgIGNvbnN0cnVjdG9yKG5vdGlmaWNhdGlvbiwgZGVzdGluYXRpb24pIHsKICAgICAgICAgICAgdGhpcy5ub3RpZmljYXRpb24gPSBub3RpZmljYXRpb247CiAgICAgICAgICAgIHRoaXMuZGVzdGluYXRpb24gPSBkZXN0aW5hdGlvbjsKICAgICAgICB9CiAgICB9CgogICAgY2xhc3MgUmVwbGF5U3ViamVjdCBleHRlbmRzIFN1YmplY3QgewogICAgICAgIGNvbnN0cnVjdG9yKGJ1ZmZlclNpemUgPSBOdW1iZXIuUE9TSVRJVkVfSU5GSU5JVFksIHdpbmRvd1RpbWUgPSBOdW1iZXIuUE9TSVRJVkVfSU5GSU5JVFksIHNjaGVkdWxlcikgewogICAgICAgICAgICBzdXBlcigpOwogICAgICAgICAgICB0aGlzLnNjaGVkdWxlciA9IHNjaGVkdWxlcjsKICAgICAgICAgICAgdGhpcy5fZXZlbnRzID0gW107CiAgICAgICAgICAgIHRoaXMuX2luZmluaXRlVGltZVdpbmRvdyA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLl9idWZmZXJTaXplID0gYnVmZmVyU2l6ZSA8IDEgPyAxIDogYnVmZmVyU2l6ZTsKICAgICAgICAgICAgdGhpcy5fd2luZG93VGltZSA9IHdpbmRvd1RpbWUgPCAxID8gMSA6IHdpbmRvd1RpbWU7CiAgICAgICAgICAgIGlmICh3aW5kb3dUaW1lID09PSBOdW1iZXIuUE9TSVRJVkVfSU5GSU5JVFkpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2luZmluaXRlVGltZVdpbmRvdyA9IHRydWU7CiAgICAgICAgICAgICAgICB0aGlzLm5leHQgPSB0aGlzLm5leHRJbmZpbml0ZVRpbWVXaW5kb3c7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLm5leHQgPSB0aGlzLm5leHRUaW1lV2luZG93OwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIG5leHRJbmZpbml0ZVRpbWVXaW5kb3codmFsdWUpIHsKICAgICAgICAgICAgY29uc3QgX2V2ZW50cyA9IHRoaXMuX2V2ZW50czsKICAgICAgICAgICAgX2V2ZW50cy5wdXNoKHZhbHVlKTsKICAgICAgICAgICAgaWYgKF9ldmVudHMubGVuZ3RoID4gdGhpcy5fYnVmZmVyU2l6ZSkgewogICAgICAgICAgICAgICAgX2V2ZW50cy5zaGlmdCgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHN1cGVyLm5leHQodmFsdWUpOwogICAgICAgIH0KICAgICAgICBuZXh0VGltZVdpbmRvdyh2YWx1ZSkgewogICAgICAgICAgICB0aGlzLl9ldmVudHMucHVzaChuZXcgUmVwbGF5RXZlbnQodGhpcy5fZ2V0Tm93KCksIHZhbHVlKSk7CiAgICAgICAgICAgIHRoaXMuX3RyaW1CdWZmZXJUaGVuR2V0RXZlbnRzKCk7CiAgICAgICAgICAgIHN1cGVyLm5leHQodmFsdWUpOwogICAgICAgIH0KICAgICAgICBfc3Vic2NyaWJlKHN1YnNjcmliZXIpIHsKICAgICAgICAgICAgY29uc3QgX2luZmluaXRlVGltZVdpbmRvdyA9IHRoaXMuX2luZmluaXRlVGltZVdpbmRvdzsKICAgICAgICAgICAgY29uc3QgX2V2ZW50cyA9IF9pbmZpbml0ZVRpbWVXaW5kb3cgPyB0aGlzLl9ldmVudHMgOiB0aGlzLl90cmltQnVmZmVyVGhlbkdldEV2ZW50cygpOwogICAgICAgICAgICBjb25zdCBzY2hlZHVsZXIgPSB0aGlzLnNjaGVkdWxlcjsKICAgICAgICAgICAgY29uc3QgbGVuID0gX2V2ZW50cy5sZW5ndGg7CiAgICAgICAgICAgIGxldCBzdWJzY3JpcHRpb247CiAgICAgICAgICAgIGlmICh0aGlzLmNsb3NlZCkgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IE9iamVjdFVuc3Vic2NyaWJlZEVycm9yKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAodGhpcy5pc1N0b3BwZWQgfHwgdGhpcy5oYXNFcnJvcikgewogICAgICAgICAgICAgICAgc3Vic2NyaXB0aW9uID0gU3Vic2NyaXB0aW9uLkVNUFRZOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5vYnNlcnZlcnMucHVzaChzdWJzY3JpYmVyKTsKICAgICAgICAgICAgICAgIHN1YnNjcmlwdGlvbiA9IG5ldyBTdWJqZWN0U3Vic2NyaXB0aW9uKHRoaXMsIHN1YnNjcmliZXIpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChzY2hlZHVsZXIpIHsKICAgICAgICAgICAgICAgIHN1YnNjcmliZXIuYWRkKHN1YnNjcmliZXIgPSBuZXcgT2JzZXJ2ZU9uU3Vic2NyaWJlcihzdWJzY3JpYmVyLCBzY2hlZHVsZXIpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoX2luZmluaXRlVGltZVdpbmRvdykgewogICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBsZW4gJiYgIXN1YnNjcmliZXIuY2xvc2VkOyBpKyspIHsKICAgICAgICAgICAgICAgICAgICBzdWJzY3JpYmVyLm5leHQoX2V2ZW50c1tpXSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGxlbiAmJiAhc3Vic2NyaWJlci5jbG9zZWQ7IGkrKykgewogICAgICAgICAgICAgICAgICAgIHN1YnNjcmliZXIubmV4dChfZXZlbnRzW2ldLnZhbHVlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5oYXNFcnJvcikgewogICAgICAgICAgICAgICAgc3Vic2NyaWJlci5lcnJvcih0aGlzLnRocm93bkVycm9yKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmICh0aGlzLmlzU3RvcHBlZCkgewogICAgICAgICAgICAgICAgc3Vic2NyaWJlci5jb21wbGV0ZSgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBzdWJzY3JpcHRpb247CiAgICAgICAgfQogICAgICAgIF9nZXROb3coKSB7CiAgICAgICAgICAgIHJldHVybiAodGhpcy5zY2hlZHVsZXIgfHwgcXVldWUpLm5vdygpOwogICAgICAgIH0KICAgICAgICBfdHJpbUJ1ZmZlclRoZW5HZXRFdmVudHMoKSB7CiAgICAgICAgICAgIGNvbnN0IG5vdyA9IHRoaXMuX2dldE5vdygpOwogICAgICAgICAgICBjb25zdCBfYnVmZmVyU2l6ZSA9IHRoaXMuX2J1ZmZlclNpemU7CiAgICAgICAgICAgIGNvbnN0IF93aW5kb3dUaW1lID0gdGhpcy5fd2luZG93VGltZTsKICAgICAgICAgICAgY29uc3QgX2V2ZW50cyA9IHRoaXMuX2V2ZW50czsKICAgICAgICAgICAgY29uc3QgZXZlbnRzQ291bnQgPSBfZXZlbnRzLmxlbmd0aDsKICAgICAgICAgICAgbGV0IHNwbGljZUNvdW50ID0gMDsKICAgICAgICAgICAgd2hpbGUgKHNwbGljZUNvdW50IDwgZXZlbnRzQ291bnQpIHsKICAgICAgICAgICAgICAgIGlmICgobm93IC0gX2V2ZW50c1tzcGxpY2VDb3VudF0udGltZSkgPCBfd2luZG93VGltZSkgewogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgc3BsaWNlQ291bnQrKzsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoZXZlbnRzQ291bnQgPiBfYnVmZmVyU2l6ZSkgewogICAgICAgICAgICAgICAgc3BsaWNlQ291bnQgPSBNYXRoLm1heChzcGxpY2VDb3VudCwgZXZlbnRzQ291bnQgLSBfYnVmZmVyU2l6ZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHNwbGljZUNvdW50ID4gMCkgewogICAgICAgICAgICAgICAgX2V2ZW50cy5zcGxpY2UoMCwgc3BsaWNlQ291bnQpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBfZXZlbnRzOwogICAgICAgIH0KICAgIH0KICAgIGNsYXNzIFJlcGxheUV2ZW50IHsKICAgICAgICBjb25zdHJ1Y3Rvcih0aW1lLCB2YWx1ZSkgewogICAgICAgICAgICB0aGlzLnRpbWUgPSB0aW1lOwogICAgICAgICAgICB0aGlzLnZhbHVlID0gdmFsdWU7CiAgICAgICAgfQogICAgfQoKICAgIGxldCBuZXh0SGFuZGxlID0gMTsKICAgIGxldCByZXNvbHZlZDsKICAgIGNvbnN0IGFjdGl2ZUhhbmRsZXMgPSB7fTsKICAgIGZ1bmN0aW9uIGZpbmRBbmRDbGVhckhhbmRsZShoYW5kbGUpIHsKICAgICAgICBpZiAoaGFuZGxlIGluIGFjdGl2ZUhhbmRsZXMpIHsKICAgICAgICAgICAgZGVsZXRlIGFjdGl2ZUhhbmRsZXNbaGFuZGxlXTsKICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgfQogICAgICAgIHJldHVybiBmYWxzZTsKICAgIH0KICAgIGNvbnN0IEltbWVkaWF0ZSA9IHsKICAgICAgICBzZXRJbW1lZGlhdGUoY2IpIHsKICAgICAgICAgICAgY29uc3QgaGFuZGxlID0gbmV4dEhhbmRsZSsrOwogICAgICAgICAgICBhY3RpdmVIYW5kbGVzW2hhbmRsZV0gPSB0cnVlOwogICAgICAgICAgICBpZiAoIXJlc29sdmVkKSB7CiAgICAgICAgICAgICAgICByZXNvbHZlZCA9IFByb21pc2UucmVzb2x2ZSgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJlc29sdmVkLnRoZW4oKCkgPT4gZmluZEFuZENsZWFySGFuZGxlKGhhbmRsZSkgJiYgY2IoKSk7CiAgICAgICAgICAgIHJldHVybiBoYW5kbGU7CiAgICAgICAgfSwKICAgICAgICBjbGVhckltbWVkaWF0ZShoYW5kbGUpIHsKICAgICAgICAgICAgZmluZEFuZENsZWFySGFuZGxlKGhhbmRsZSk7CiAgICAgICAgfSwKICAgIH07CgogICAgY2xhc3MgQXNhcEFjdGlvbiBleHRlbmRzIEFzeW5jQWN0aW9uIHsKICAgICAgICBjb25zdHJ1Y3RvcihzY2hlZHVsZXIsIHdvcmspIHsKICAgICAgICAgICAgc3VwZXIoc2NoZWR1bGVyLCB3b3JrKTsKICAgICAgICAgICAgdGhpcy5zY2hlZHVsZXIgPSBzY2hlZHVsZXI7CiAgICAgICAgICAgIHRoaXMud29yayA9IHdvcms7CiAgICAgICAgfQogICAgICAgIHJlcXVlc3RBc3luY0lkKHNjaGVkdWxlciwgaWQsIGRlbGF5ID0gMCkgewogICAgICAgICAgICBpZiAoZGVsYXkgIT09IG51bGwgJiYgZGVsYXkgPiAwKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gc3VwZXIucmVxdWVzdEFzeW5jSWQoc2NoZWR1bGVyLCBpZCwgZGVsYXkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHNjaGVkdWxlci5hY3Rpb25zLnB1c2godGhpcyk7CiAgICAgICAgICAgIHJldHVybiBzY2hlZHVsZXIuc2NoZWR1bGVkIHx8IChzY2hlZHVsZXIuc2NoZWR1bGVkID0gSW1tZWRpYXRlLnNldEltbWVkaWF0ZShzY2hlZHVsZXIuZmx1c2guYmluZChzY2hlZHVsZXIsIHVuZGVmaW5lZCkpKTsKICAgICAgICB9CiAgICAgICAgcmVjeWNsZUFzeW5jSWQoc2NoZWR1bGVyLCBpZCwgZGVsYXkgPSAwKSB7CiAgICAgICAgICAgIGlmICgoZGVsYXkgIT09IG51bGwgJiYgZGVsYXkgPiAwKSB8fCAoZGVsYXkgPT09IG51bGwgJiYgdGhpcy5kZWxheSA+IDApKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gc3VwZXIucmVjeWNsZUFzeW5jSWQoc2NoZWR1bGVyLCBpZCwgZGVsYXkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChzY2hlZHVsZXIuYWN0aW9ucy5sZW5ndGggPT09IDApIHsKICAgICAgICAgICAgICAgIEltbWVkaWF0ZS5jbGVhckltbWVkaWF0ZShpZCk7CiAgICAgICAgICAgICAgICBzY2hlZHVsZXIuc2NoZWR1bGVkID0gdW5kZWZpbmVkOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7CiAgICAgICAgfQogICAgfQoKICAgIGNsYXNzIEFzYXBTY2hlZHVsZXIgZXh0ZW5kcyBBc3luY1NjaGVkdWxlciB7CiAgICAgICAgZmx1c2goYWN0aW9uKSB7CiAgICAgICAgICAgIHRoaXMuYWN0aXZlID0gdHJ1ZTsKICAgICAgICAgICAgdGhpcy5zY2hlZHVsZWQgPSB1bmRlZmluZWQ7CiAgICAgICAgICAgIGNvbnN0IHsgYWN0aW9ucyB9ID0gdGhpczsKICAgICAgICAgICAgbGV0IGVycm9yOwogICAgICAgICAgICBsZXQgaW5kZXggPSAtMTsKICAgICAgICAgICAgbGV0IGNvdW50ID0gYWN0aW9ucy5sZW5ndGg7CiAgICAgICAgICAgIGFjdGlvbiA9IGFjdGlvbiB8fCBhY3Rpb25zLnNoaWZ0KCk7CiAgICAgICAgICAgIGRvIHsKICAgICAgICAgICAgICAgIGlmIChlcnJvciA9IGFjdGlvbi5leGVjdXRlKGFjdGlvbi5zdGF0ZSwgYWN0aW9uLmRlbGF5KSkgewogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9IHdoaWxlICgrK2luZGV4IDwgY291bnQgJiYgKGFjdGlvbiA9IGFjdGlvbnMuc2hpZnQoKSkpOwogICAgICAgICAgICB0aGlzLmFjdGl2ZSA9IGZhbHNlOwogICAgICAgICAgICBpZiAoZXJyb3IpIHsKICAgICAgICAgICAgICAgIHdoaWxlICgrK2luZGV4IDwgY291bnQgJiYgKGFjdGlvbiA9IGFjdGlvbnMuc2hpZnQoKSkpIHsKICAgICAgICAgICAgICAgICAgICBhY3Rpb24udW5zdWJzY3JpYmUoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRocm93IGVycm9yOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQoKICAgIGNvbnN0IGFzYXAgPSBuZXcgQXNhcFNjaGVkdWxlcihBc2FwQWN0aW9uKTsKCiAgICBjb25zdCBhc3luYyA9IG5ldyBBc3luY1NjaGVkdWxlcihBc3luY0FjdGlvbik7CgogICAgY2xhc3MgQW5pbWF0aW9uRnJhbWVBY3Rpb24gZXh0ZW5kcyBBc3luY0FjdGlvbiB7CiAgICAgICAgY29uc3RydWN0b3Ioc2NoZWR1bGVyLCB3b3JrKSB7CiAgICAgICAgICAgIHN1cGVyKHNjaGVkdWxlciwgd29yayk7CiAgICAgICAgICAgIHRoaXMuc2NoZWR1bGVyID0gc2NoZWR1bGVyOwogICAgICAgICAgICB0aGlzLndvcmsgPSB3b3JrOwogICAgICAgIH0KICAgICAgICByZXF1ZXN0QXN5bmNJZChzY2hlZHVsZXIsIGlkLCBkZWxheSA9IDApIHsKICAgICAgICAgICAgaWYgKGRlbGF5ICE9PSBudWxsICYmIGRlbGF5ID4gMCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHN1cGVyLnJlcXVlc3RBc3luY0lkKHNjaGVkdWxlciwgaWQsIGRlbGF5KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBzY2hlZHVsZXIuYWN0aW9ucy5wdXNoKHRoaXMpOwogICAgICAgICAgICByZXR1cm4gc2NoZWR1bGVyLnNjaGVkdWxlZCB8fCAoc2NoZWR1bGVyLnNjaGVkdWxlZCA9IHJlcXVlc3RBbmltYXRpb25GcmFtZSgoKSA9PiBzY2hlZHVsZXIuZmx1c2godW5kZWZpbmVkKSkpOwogICAgICAgIH0KICAgICAgICByZWN5Y2xlQXN5bmNJZChzY2hlZHVsZXIsIGlkLCBkZWxheSA9IDApIHsKICAgICAgICAgICAgaWYgKChkZWxheSAhPT0gbnVsbCAmJiBkZWxheSA+IDApIHx8IChkZWxheSA9PT0gbnVsbCAmJiB0aGlzLmRlbGF5ID4gMCkpIHsKICAgICAgICAgICAgICAgIHJldHVybiBzdXBlci5yZWN5Y2xlQXN5bmNJZChzY2hlZHVsZXIsIGlkLCBkZWxheSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHNjaGVkdWxlci5hY3Rpb25zLmxlbmd0aCA9PT0gMCkgewogICAgICAgICAgICAgICAgY2FuY2VsQW5pbWF0aW9uRnJhbWUoaWQpOwogICAgICAgICAgICAgICAgc2NoZWR1bGVyLnNjaGVkdWxlZCA9IHVuZGVmaW5lZDsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkOwogICAgICAgIH0KICAgIH0KCiAgICBjbGFzcyBBbmltYXRpb25GcmFtZVNjaGVkdWxlciBleHRlbmRzIEFzeW5jU2NoZWR1bGVyIHsKICAgICAgICBmbHVzaChhY3Rpb24pIHsKICAgICAgICAgICAgdGhpcy5hY3RpdmUgPSB0cnVlOwogICAgICAgICAgICB0aGlzLnNjaGVkdWxlZCA9IHVuZGVmaW5lZDsKICAgICAgICAgICAgY29uc3QgeyBhY3Rpb25zIH0gPSB0aGlzOwogICAgICAgICAgICBsZXQgZXJyb3I7CiAgICAgICAgICAgIGxldCBpbmRleCA9IC0xOwogICAgICAgICAgICBsZXQgY291bnQgPSBhY3Rpb25zLmxlbmd0aDsKICAgICAgICAgICAgYWN0aW9uID0gYWN0aW9uIHx8IGFjdGlvbnMuc2hpZnQoKTsKICAgICAgICAgICAgZG8gewogICAgICAgICAgICAgICAgaWYgKGVycm9yID0gYWN0aW9uLmV4ZWN1dGUoYWN0aW9uLnN0YXRlLCBhY3Rpb24uZGVsYXkpKSB7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0gd2hpbGUgKCsraW5kZXggPCBjb3VudCAmJiAoYWN0aW9uID0gYWN0aW9ucy5zaGlmdCgpKSk7CiAgICAgICAgICAgIHRoaXMuYWN0aXZlID0gZmFsc2U7CiAgICAgICAgICAgIGlmIChlcnJvcikgewogICAgICAgICAgICAgICAgd2hpbGUgKCsraW5kZXggPCBjb3VudCAmJiAoYWN0aW9uID0gYWN0aW9ucy5zaGlmdCgpKSkgewogICAgICAgICAgICAgICAgICAgIGFjdGlvbi51bnN1YnNjcmliZSgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdGhyb3cgZXJyb3I7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CgogICAgY29uc3QgYW5pbWF0aW9uRnJhbWUgPSBuZXcgQW5pbWF0aW9uRnJhbWVTY2hlZHVsZXIoQW5pbWF0aW9uRnJhbWVBY3Rpb24pOwoKICAgIGZ1bmN0aW9uIG5vb3AoKSB7IH0KCiAgICBmdW5jdGlvbiBpc09ic2VydmFibGUob2JqKSB7CiAgICAgICAgcmV0dXJuICEhb2JqICYmIChvYmogaW5zdGFuY2VvZiBPYnNlcnZhYmxlIHx8ICh0eXBlb2Ygb2J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1wbDsKICAgIH0pKCk7CiAgICBjb25zdCBBcmd1bWVudE91dE9mUmFuZ2VFcnJvciA9IEFyZ3VtZW50T3V0T2ZSYW5nZUVycm9ySW1wbDsKCiAgICBmdW5jdGlvbiBtYXAocHJvamVjdCwgdGhpc0FyZykgewogICAgICAgIHJldHVybiBmdW5jdGlvbiBtYXBPcGVyYXRpb24oc291cmNlKSB7CiAgICAgICAgICAgIGlmICh0eXBlb2YgcHJvamVjdCAhPT0gJ2Z1bmN0aW9uJykgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcignYXJndW1lbnQgaXMgbm90IGEgZnVuY3Rpb24uIEFyZSB5b3UgbG9va2luZyBmb3IgYG1hcFRvKClgPycpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBzb3VyY2UubGlmdChuZXcgTWFwT3BlcmF0b3IocHJvamVjdCwgdGhpc0FyZykpOwogICAgICAgIH07CiAgICB9CiAgICBjbGFzcyBNYXBPcGVyYXRvciB7CiAgICAgICAgY29uc3RydWN0b3IocHJvamVjdCwgdGhpc0FyZykgewogICAgICAgICAgICB0aGlzLnByb2plY3QgPSBwcm9qZWN0OwogICAgICAgICAgICB0aGlzLnRoaXNBcmcgPSB0aGlzQXJnOwogICAgICAgIH0KICAgICAgICBjYWxsKHN1YnNjcmliZXIsIHNvdXJjZSkgewogICAgICAgICAgICByZXR1cm4gc291cmNlLnN1YnNjcmliZShuZXcgTWFwU3Vic2NyaWJlcihzdWJzY3JpYmVyLCB0aGlzLnByb2plY3QsIHRoaXMudGhpc0FyZykpOwogICAgICAgIH0KICAgIH0KICAgIGNsYXNzIE1hcFN1YnNjcmliZXIgZXh0ZW5kcyBTdWJzY3JpYmVyIHsKICAgICAgICBjb25zdHJ1Y3RvcihkZXN0aW5hdGlvbiwgcHJvamVjdCwgdGhpc0FyZykgewogICAgICAgICAgICBzdXBlcihkZXN0aW5hdGlvbik7CiAgICAgICAgICAgIHRoaXMucHJvamVjdCA9IHByb2plY3Q7CiAgICAgICAgICAgIHRoaXMuY291bnQgPSAwOwogICAgICAgICAgICB0aGlzLnRoaXNBcmcgPSB0aGlzQXJnIHx8IHRoaXM7CiAgICAgICAgfQogICAgICAgIF9uZXh0KHZhbHVlKSB7CiAgICAgICAgICAgIGxldCByZXN1bHQ7CiAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICByZXN1bHQgPSB0aGlzLnByb2plY3QuY2FsbCh0aGlzLnRoaXNBcmcsIHZhbHVlLCB0aGlzLmNvdW50KyspOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNhdGNoIChlcnIpIHsKICAgICAgICAgICAgICAgIHRoaXMuZGVzdGluYXRpb24uZXJyb3IoZXJyKTsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLmRlc3RpbmF0aW9uLm5leHQocmVzdWx0KTsKICAgICAgICB9CiAgICB9CgogICAgY2xhc3MgT3V0ZXJTdWJzY3JpYmVyIGV4dGVuZHMgU3Vic2NyaWJlciB7CiAgICAgICAgbm90aWZ5TmV4dChvdXRlclZhbHVlLCBpbm5lclZhbHVlLCBvdXRlckluZGV4LCBpbm5lckluZGV4LCBpbm5lclN1YikgewogICAgICAgICAgICB0aGlzLmRlc3RpbmF0aW9uLm5leHQoaW5uZXJWYWx1ZSk7CiAgICAgICAgfQogICAgICAgIG5vdGlmeUVycm9yKGVycm9yLCBpbm5lclN1YikgewogICAgICAgICAgICB0aGlzLmRlc3RpbmF0aW9uLmVycm9yKGVycm9yKTsKICAgICAgICB9CiAgICAgICAgbm90aWZ5Q29tcGxldGUoaW5uZXJTdWIpIHsKICAgICAgICAgICAgdGhpcy5kZXN0aW5hdGlvbi5jb21wbGV0ZSgpOwogICAgICAgIH0KICAgIH0KCiAgICBjbGFzcyBJbm5lclN1YnNjcmliZXIgZXh0ZW5kcyBTdWJzY3JpYmVyIHsKICAgICAgICBjb25zdHJ1Y3RvcihwYXJlbnQsIG91dGVyVmFsdWUsIG91dGVySW5kZXgpIHsKICAgICAgICAgICAgc3VwZXIoKTsKICAgICAgICAgICAgdGhpcy5wYXJlbnQgPSBwYXJlbnQ7CiAgICAgICAgICAgIHRoaXMub3V0ZXJWYWx1ZSA9IG91dGVyVmFsdWU7CiAgICAgICAgICAgIHRoaXMub3V0ZXJJbmRleCA9IG91dGVySW5kZXg7CiAgICAgICAgICAgIHRoaXMuaW5kZXggPSAwOwogICAgICAgIH0KICAgICAgICBfbmV4dCh2YWx1ZSkgewogICAgICAgICAgICB0aGlzLnBhcmVudC5ub3RpZnlOZXh0KHRoaXMub3V0ZXJWYWx1ZSwgdmFsdWUsIHRoaXMub3V0ZXJJbmRleCwgdGhpcy5pbmRleCsrLCB0aGlzKTsKICAgICAgICB9CiAgICAgICAgX2Vycm9yKGVycm9yKSB7CiAgICAgICAgICAgIHRoaXMucGFyZW50Lm5vdGlmeUVycm9yKGVycm9yLCB0aGlzKTsKICAgICAgICAgICAgdGhpcy51bnN1YnNjcmliZSgpOwogICAgICAgIH0KICAgICAgICBfY29tcGxldGUoKSB7CiAgICAgICAgICAgIHRoaXMucGFyZW50Lm5vdGlmeUNvbXBsZXRlKHRoaXMpOwogICAgICAgICAgICB0aGlzLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgfQogICAgfQoKICAgIGNvbnN0IHN1YnNjcmliZVRvUHJvbWlzZSA9IChwcm9taXNlKSA9PiAoc3Vic2NyaWJlcikgPT4gewogICAgICAgIHByb21pc2UudGhlbigodmFsdWUpID0+IHsKICAgICAgICAgICAgaWYgKCFzdWJzY3JpYmVyLmNsb3NlZCkgewogICAgICAgICAgICAgICAgc3Vic2NyaWJlci5uZXh0KHZhbHVlKTsKICAgICAgICAgICAgICAgIHN1YnNjcmliZXIuY29tcGxldGUoKTsKICAgICAgICAgICAgfQogICAgICAgIH0sIChlcnIpID0+IHN1YnNjcmliZXIuZXJyb3IoZXJyKSkKICAgICAgICAgICAgLnRoZW4obnVsbCwgaG9zdFJlcG9ydEVycm9yKTsKICAgICAgICByZXR1cm4gc3Vic2NyaWJlcjsKICAgIH07CgogICAgZnVuY3Rpb24gZ2V0U3ltYm9sSXRlcmF0b3IoKSB7CiAgICAgICAgaWYgKHR5cGVvZiBTeW1ib2wgIT09ICdmdW5jdGlvbicgfHwgIVN5bWJvbC5pdGVyYXRvcikgewogICAgICAgICAgICByZXR1cm4gJ0BAaXRlcmF0b3InOwogICAgICAgIH0KICAgICAgICByZXR1cm4gU3ltYm9sLml0ZXJhdG9yOwogICAgfQogICAgY29uc3QgaXRlcmF0b3IgPSBnZXRTeW1ib2xJdGVyYXRvcigpOwoKICAgIGNvbnN0IHN1YnNjcmliZVRvSXRlcmFibGUgPSAoaXRlcmFibGUpID0+IChzdWJzY3JpYmVyKSA9PiB7CiAgICAgICAgY29uc3QgaXRlcmF0b3IkMSA9IGl0ZXJhYmxlW2l0ZXJhdG9yXSgpOwogICAgICAgIGRvIHsKICAgICAgICAgICAgY29uc3QgaXRlbSA9IGl0ZXJhdG9yJDEubmV4dCgpOwogICAgICAgICAgICBpZiAoaXRlbS5kb25lKSB7CiAgICAgICAgICAgICAgICBzdWJzY3JpYmVyLmNvbXBsZXRlKCk7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQogICAgICAgICAgICBzdWJzY3JpYmVyLm5leHQoaXRlbS52YWx1ZSk7CiAgICAgICAgICAgIGlmIChzdWJzY3JpYmVyLmNsb3NlZCkgewogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICB9IHdoaWxlICh0cnVlKTsKICAgICAgICBpZiAodHlwZW9mIGl0ZXJhdG9yJDEucmV0dXJuID09PSAnZnVuY3Rpb24nKSB7CiAgICAgICAgICAgIHN1YnNjcmliZXIuYWRkKCgpID0+IHsKICAgICAgICAgICAgICAgIGlmIChpdGVyYXRvciQxLnJldHVybikgewogICAgICAgICAgICAgICAgICAgIGl0ZXJhdG9yJDEucmV0dXJuKCk7CiAgIC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KICAgIH0KICAgIGZ1bmN0aW9uIHByb2Nlc3MkMShhc3luY0l0ZXJhYmxlLCBzdWJzY3JpYmVyKSB7CiAgICAgICAgdmFyIGFzeW5jSXRlcmFibGVfMSwgYXN5bmNJdGVyYWJsZV8xXzE7CiAgICAgICAgdmFyIGVfMSwgX2E7CiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHsKICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgIGZvciAoYXN5bmNJdGVyYWJsZV8xID0gX19hc3luY1ZhbHVlcyhhc3luY0l0ZXJhYmxlKTsgYXN5bmNJdGVyYWJsZV8xXzEgPSB5aWVsZCBhc3luY0l0ZXJhYmxlXzEubmV4dCgpLCAhYXN5bmNJdGVyYWJsZV8xXzEuZG9uZTspIHsKICAgICAgICAgICAgICAgICAgICBjb25zdCB2YWx1ZSA9IGFzeW5jSXRlcmFibGVfMV8xLnZhbHVlOwogICAgICAgICAgICAgICAgICAgIHN1YnNjcmliZXIubmV4dCh2YWx1ZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY2F0Y2ggKGVfMV8xKSB7IGVfMSA9IHsgZXJyb3I6IGVfMV8xIH07IH0KICAgICAgICAgICAgZmluYWxseSB7CiAgICAgICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgICAgIGlmIChhc3luY0l0ZXJhYmxlXzFfMSAmJiAhYXN5bmNJdGVyYWJsZV8xXzEuZG9uZSAmJiAoX2EgPSBhc3luY0l0ZXJhYmxlXzEucmV0dXJuKSkgeWllbGQgX2EuY2FsbChhc3luY0l0ZXJhYmxlXzEpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZmluYWxseSB7IGlmIChlXzEpIHRocm93IGVfMS5lcnJvcjsgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHN1YnNjcmliZXIuY29tcGxldGUoKTsKICA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AgICAgIHRoaXMuYWN0aXZlID0gMDsKICAgICAgICAgICAgdGhpcy52YWx1ZXMgPSBbXTsKICAgICAgICAgICAgdGhpcy5vYnNlcnZhYmxlcyA9IFtdOwogICAgICAgIH0KICAgICAgICBfbmV4dChvYnNlcnZhYmxlKSB7CiAgICAgICAgICAgIHRoaXMudmFsdWVzLnB1c2goTk9ORSk7CiAgICAgICAgICAgIHRoaXMub2JzZXJ2YWJsZXMucHVzaChvYnNlcnZhYmxlKTsKICAgICAgICB9CiAgICAgICAgX2NvbXBsZXRlKCkgewogICAgICAgICAgICBjb25zdCBvYnNlcnZhYmxlcyA9IHRoaXMub2JzZXJ2YWJsZXM7CiAgICAgICAgICAgIGNvbnN0IGxlbiA9IG9ic2VydmFibGVzLmxlbmd0aDsKICAgICAgICAgICAgaWYgKGxlbiA9PT0gMCkgewogICAgICAgICAgICAgICAgdGhpcy5kZXN0aW5hdGlvbi5jb21wbGV0ZSgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5hY3RpdmUgPSBsZW47CiAgICAgICAgICAgICAgICB0aGlzLnRvUmVzcG9uZCA9IGxlbjsKICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbGVuOyBpKyspIHsKICAgICAgICAgICAgICAgICAgICBjb25zdCBvYnNlcnZhYmxlID0gb2JzZXJ2YWJsZXNbaV07CiAgICAgICAgICAgICAgICAgICAgdGhpcy5hZGQoc3Vic2NyaWJlVG9SZXN1bHQodGhpcywgb2JzZXJ2YWJsZSwgb2JzZXJ2YWJsZSwgaSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIG5vdGlmeUNvbXBsZXRlKHVudXNlZCkgewogICAgICAgICAgICBpZiAoKHRoaXMuYWN0aXZlIC09IDEpID09PSAwKSB7CiAgICAgICAgICAgICAgICB0aGlzLmRlc3RpbmF0aW9uLmNvbXBsZXRlKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgbm90aWZ5TmV4dChvdXRlclZhbHVlLCBpbm5lclZhbHVlLCBvdXRlckluZGV4LCBpbm5lckluZGV4LCBpbm5lclN1YikgewogICAgICAgICAgICBjb25zdCB2YWx1ZXMgPSB0aGlzLnZhbHVlczsKICAgICAgICAgICAgY29uc3Qgb2xkVmFsID0gdmFsdWVzW291dGVySW5kZXhdOwogICAgICAgICAgICBjb25zdCB0b1Jlc3BvbmQgPSAhdGhpcy50b1Jlc3BvbmQKICAgICAgICAgICAgICAgID8gMAogICAgICAgICAgICAgICAgOiBvbGRWYWwgPT09IE5PTkUgPyAtLXRoaXMudG9SZXNwb25kIDogdGhpcy50b1Jlc3BvbmQ7CiAgICAgICAgICAgIHZhbHVlc1tvdXRlckluZGV4XSA9IGlubmVyVmFsdWU7CiAgICAgICAgICAgIGlmICh0b1Jlc3BvbmQgPT09IDApIHsKICAgICAgICAgICAgICAgIGlmICh0aGlzLnJlc3VsdFNlbGVjdG9yKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fdHJ5UmVzdWx0U2VsZWN0b3IodmFsdWVzKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIHRoaXMuZGVzdGluYXRpb24ubmV4dCh2YWx1ZXMuc2xpY2UoKSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgX3RyeVJlc3VsdFNlbGVjdG9yKHZhbHVlcykgewogICAgICAgICAgICBsZXQgcmVzdWx0OwogICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgcmVzdWx0ID0gdGhpcy5yZXN1bHRTZWxlY3Rvci5hcHBseSh0aGlzLCB2YWx1ZXMpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNhdGNoIChlcnIpIHsKICAgICAgICAgICAgICAgIHRoaXMuZGVzdGluYXRpb24uZXJyb3IoZXJyKTsKICA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cmliZXIgPT4gewogICAgICAgICAgICBjb25zdCBzdWIgPSBuZXcgU3Vic2NyaXB0aW9uKCk7CiAgICAgICAgICAgIHN1Yi5hZGQoc2NoZWR1bGVyLnNjaGVkdWxlKCgpID0+IGlucHV0LnRoZW4odmFsdWUgPT4gewogICAgICAgICAgICAgICAgc3ViLmFkZChzY2hlZHVsZXIuc2NoZWR1bGUoKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHN1YnNjcmliZXIubmV4dCh2YWx1ZSk7CiAgICAgICAgICAgICAgICAgICAgc3ViLmFkZChzY2hlZHVsZXIuc2NoZWR1bGUoKCkgPT4gc3Vic2NyaWJlci5jb21wbGV0ZSgpKSk7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0sIGVyciA9PiB7CiAgICAgICAgICAgICAgICBzdWIuYWRkKHNjaGVkdWxlci5zY2hlZHVsZSgoKSA9PiBzdWJzY3JpYmVyLmVycm9yKGVycikpKTsKICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgcmV0dXJuIHN1YjsKICAgICAgICB9KTsKICAgIH0KCiAgICBmdW5jdGlvbiBzY2hlZHVsZUl0ZXJhYmxlKGlucHV0LCBzY2hlZHVsZXIpIHsKICAgICAgICBpZiAoIWlucHV0KSB7CiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignSXRlcmFibGUgY2Fubm90IGJlIG51bGwnKTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIG5ldyBPYnNlcnZhYmxlKHN1YnNjcmliZXIgPT4gewogICAgICAgICAgICBjb25zdCBzdWIgPSBuZXcgU3Vic2NyaXB0aW9uKCk7CiAgICAgICAgICAgIGxldCBpdGVyYXRvciQxOwogICAgICAgICAgICBzdWIuYWRkKCgpID0+IHsKICAgICAgICAgICAgICAgIGlmIChpdGVyYXRvciQxICYmIHR5cGVvZiBpdGVyYXRvciQxLnJldHVybiA9PT0gJ2Z1bmN0aW9uJykgewogICAgICAgICAgICAgICAgICAgIGl0ZXJhdG9yJDEucmV0dXJuKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBzdWIuYWRkKHNjaGVkdWxlci5zY2hlZHVsZSgoKSA9PiB7CiAgICAgICAgICAgICAgICBpdGVyYXRvciQxID0gaW5wdXRbaXRlcmF0b3JdKCk7CiAgICAgICAgICAgICAgICBzdWIuYWRkKHNjaGVkdWxlci5zY2hlZHVsZShmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKHN1YnNjcmliZXIuY2xvc2VkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgbGV0IHZhbHVlOwogICAgICAgICAgICAgICAgICAgIGxldCBkb25lOwogICAgICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHJlc3VsdCA9IGl0ZXJhdG9yJDEubmV4dCgpOwogICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZSA9IHJlc3VsdC52YWx1ZTsKICAgICAgICAgICAgICAgICAgICAgICAgZG9uZSA9IHJlc3VsdC5kb25lOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBjYXRjaCAoZXJyKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHN1YnNjcmliZXIuZXJyb3IoZXJyKTsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBpZiAoZG9uZSkgewogICAgICAgICAgICAgICAgICAgICAgICBzdWJzY3JpYmVyLmNvbXBsZXRlKCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICBzdWJzY3JpYmVyLm5leHQodmFsdWUpOwogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNjaGVkdWxlKCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIHJldHVybiBzdWI7CiAgICAgICAgfSk7CiAgICB9CgogICAgZnVuY3Rpb24gaXNJbnRlcm9wT2JzZXJ2YWJsZShpbnB1dCkgewogICAgICAgIHJldHVybiBpbnB1dCAmJiB0eXBlb2YgaW5wdXRbb2JzZXJ2YWJsZV0gPT09ICdmdW5jdGlvbic7CiAgICB9CgogICAgZnVuY3Rpb24gaXNJdGVyYWJsZShpbnB1dCkgewogICAgICAgIHJldHVybiBpbnB1dCAmJiB0eXBlb2YgaW5wdXRbaXRlcmF0b3JdID09PSAnZnVuY3Rpb24nOwogICAgfQoKICAgIGZ1bmN0aW9uIHNjaGVkdWxlQXN5bmNJdGVyYWJsZShpbnB1dCwgc2NoZWR1bGVyKSB7CiAgICAgICAgaWYgKCFpbnB1dCkgewogICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0l0ZXJhYmxlIGNhbm5vdCBiZSBudWxsJyk7CiAgICAgICAgfQogICAgICAgIHJldHVybiBuZXcgT2JzZXJ2YWJsZShzdWJzY3JpYmVyID0+IHsKICAgICAgICAgICAgY29uc3Qgc3ViID0gbmV3IFN1YnNjcmlwdGlvbigpOwogICAgICAgICAgICBzdWIuYWRkKHNjaGVkdWxlci5zY2hlZHVsZSgoKSA9PiB7CiAgICAgICAgICAgICAgICBjb25zdCBpdGVyYXRvciA9IGlucHV0W1N5bWJvbC5hc3luY0l0ZXJhdG9yXSgpOwogICAgICAgICAgICAgICAgc3ViLmFkZChzY2hlZHVsZXIuc2NoZWR1bGUoZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgICAgIGl0ZXJhdG9yLm5leHQoKS50aGVuKHJlc3VsdCA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXN1bHQuZG9uZSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgc3Vic2NyaWJlci5jb21wbGV0ZSgpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgc3Vic2NyaWJlci5uZXh0KHJlc3VsdC52YWx1ZSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNjaGVkdWxlKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfSkpOwogICAgICAgICAgICByZXR1cm4gc3ViOwogICAgICAgIH0pOwogICAgfQoKICAgIGZ1bmN0aW9uIHNjaGVkdWxlZChpbnB1dCwgc2NoZWR1bGVyKSB7CiAgICAgICAgaWYgKGlucHV0ICE9IG51bGwpIHsKICAgICAgICAgICAgaWYgKGlzSW50ZXJvcE9ic2VydmFibGUoaW5wdXQpKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gc2NoZWR1bGVPYnNlcnZhYmxlKGlucHV0LCBzY2hlZHVsZXIpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKGlzUHJvbWlzZShpbnB1dCkpIHsKICAgICAgICAgICAgICAgIHJldHVybiBzY2hlZHVsZVByb21pc2UoaW5wdXQsIHNjaGVkdWxlcik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoaXNBcnJheUxpa2UoaW5wdXQpKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gc2NoZWR1bGVBcnJheShpbnB1dCwgc2NoZWR1bGVyKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChpc0l0ZXJhYmxlKGlucHV0KSB8fCB0eXBlb2YgaW5wdXQgPT09ICdzdHJpbmcnKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gc2NoZWR1bGVJdGVyYWJsZShpbnB1dCwgc2NoZWR1bGVyKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlb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GxldGVkID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuYnVmZmVyID0gW107CiAgICAgICAgICAgIHRoaXMuYWN0aXZlID0gMDsKICAgICAgICAgICAgdGhpcy5pbmRleCA9IDA7CiAgICAgICAgfQogICAgICAgIF9uZXh0KHZhbHVlKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmFjdGl2ZSA8IHRoaXMuY29uY3VycmVudCkgewogICAgICAgICAgICAgICAgdGhpcy5fdHJ5TmV4dCh2YWx1ZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLmJ1ZmZlci5wdXNoKHZhbHVlKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBfdHJ5TmV4dCh2YWx1ZSkgewogICAgICAgICAgICBsZXQgcmVzdWx0OwogICAgICAgICAgICBjb25zdCBpbmRleCA9IHRoaXMuaW5kZXgrKzsKICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgIHJlc3VsdCA9IHRoaXMucHJvamVjdCh2YWx1ZSwgaW5kZXgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNhdGNoIChlcnIpIHsKICAgICAgICAgICAgICAgIHRoaXMuZGVzdGluYXRpb24uZXJyb3IoZXJyKTsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLmFjdGl2ZSsrOwogICAgICAgICAgICB0aGlzLl9pbm5lclN1YihyZXN1bHQsIHZhbHVlLCBpbmRleCk7CiAgICAgICAgfQogICAgICAgIF9pbm5lclN1Yihpc2gsIHZhbHVlLCBpbmRleCkgewogICAgICAgICAgICBjb25zdCBpbm5lclN1YnNjcmliZXIgPSBuZXcgSW5uZXJTdWJzY3JpYmVyKHRoaXMsIHZhbHVlLCBpbmRleCk7CiAgICAgICAgICAgIGNvbnN0IGRlc3RpbmF0aW9uID0gdGhpcy5kZXN0aW5hdGlvbjsKICAgICAgICAgICAgZGVzdGluYXRpb24uYWRkKGlubmVyU3Vic2NyaWJlcik7CiAgICAgICAgICAgIGNvbnN0IGlubmVyU3Vic2NyaXB0aW9uID0gc3Vic2NyaWJlVG9SZXN1bHQodGhpcywgaXNoLCB1bmRlZmluZWQsIHVuZGVmaW5lZCwgaW5uZXJTdWJzY3JpYmVyKTsKICAgICAgICAgICAgaWYgKGlubmVyU3Vic2NyaXB0aW9uICE9PSBpbm5lclN1YnNjcmliZXIpIHsKICAgICAgICAgICAgICAgIGRlc3RpbmF0aW9uLmFkZChpbm5lclN1YnNjcmlwdGlvbik7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgX2NvbXBsZXRlKCkgewogICAgICAgICAgICB0aGlzLmhhc0NvbXBsZXRlZCA9IHRydWU7CiAgICAgICAgICAgIGlmICh0aGlzLmFjdGl2ZSA9PT0gMCAmJiB0aGlzLmJ1ZmZlci5sZW5ndGggPT09IDApIHsKICAgICAgICAgICAgICAgIHRoaXMuZGVzdGluYXRpb24uY29tcGxldGUoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgfQogICAgICAgIG5vdGlmeU5leHQob3V0ZXJWYWx1ZSwgaW5uZXJWYWx1ZSwgb3V0ZXJJbmRleCwgaW5uZXJJbmRleCwgaW5uZXJTdWIpIHsKICAgICAgICAgICAgdGhpcy5kZXN0aW5hdGlvbi5uZXh0KGlubmVyVmFsdWUpOwogICAgICAgIH0KICAgICAgICBub3RpZnlDb21wbGV0ZShpbm5lclN1YikgewogICAgICAgICAgICBjb25zdCBidWZmZXIgPSB0aGlzLmJ1ZmZlcjsKICAgICAgICAgICAgdGhpcy5yZW1vdmUoaW5uZXJTdWIpOwogICAgICAgICAgICB0aGlzLmFjdGl2ZS0tOwogICAgICAgICAgICBpZiAoYnVmZmVyLmxlbmd0aCA+IDApIHsKICAgICAgICAgICAgICAgIHRoaXMuX25leHQoYnVmZmVyLnNoaWZ0KCkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKHRoaXMuYWN0aXZlID09PSAwICYmIHRoaXMuaGFzQ29tcGxldGVkKSB7CiAgICAgICAgICAgICAgICB0aGlzLmRlc3RpbmF0aW9uLmNvbXBsZXRlKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CgogICAgZnVuY3Rpb24gbWVyZ2VBbGwoY29uY3VycmVudCA9IE51bWJlci5QT1NJVElWRV9JTkZJTklUWSkgewogICAgICAgIHJldHVybiBtZXJnZU1hcChpZGVudGl0eSwgY29uY3VycmVudCk7CiAgICB9CgogICAgZnVuY3Rpb24gY29uY2F0QWxsKCkgewogICAgICAgIHJldHVybiBtZXJnZUFsbCgxKTsKICAgIH0KCiAgICBmdW5jdGlvbiBjb25jYXQoLi4ub2JzZXJ2YWJsZXMpIHsKICAgICAgICByZXR1cm4gY29uY2F0QWxsKCkob2YoLi4ub2JzZXJ2YWJsZXMpKTsKICAgIH0KCiAgICBmdW5jdGlvbiBkZWZlcihvYnNlcnZhYmxlRmFjdG9yeSkgewogICAgICAgIHJldHVybiBuZXcgT2JzZXJ2YWJsZShzdWJzY3JpYmVyID0+IHsKICAgICAgICAgICAgbGV0IGlucHV0OwogICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgaW5wdXQgPSBvYnNlcnZhYmxlRmFjdG9yeSgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNhdGNoIChlcnIpIHsKICAgICAgICAgICAgICAgIHN1YnNjcmliZXIuZXJyb3IoZXJyKTsKICAgICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY29uc3Qgc291cmNlID0gaW5wdXQgPyBmcm9tKGlucHV0KSA6IEVNUFRZOwogICAgICAgICAgICByZXR1cm4gc291cmNlLnN1YnNjcmliZShzdWJzY3JpYmVyKTsKICAgICAgICB9KTsKICAgIH0KCiAgICBmdW5jdGlvbiBmb3JrSm9pbiguLi5zb3VyY2VzKSB7CiAgICAgICAgaWYgKHNvdXJjZXMubGVuZ3RoID09PSAxKSB7CiAgICAgICAgICAgIGNvbnN0IGZpcnN0ID0gc291cmNlc1swXTsKICAgICAgICAgICAgaWYgKGlzQXJyYXkoZmlyc3QpKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gZm9ya0pvaW5JbnRlcm5hbChmaXJzdCwgbnVsbCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGlzT2JqZWN0KGZpcnN0KSAmJiBPYmplY3QuZ2V0UHJvdG90eXBlT2YoZmlyc3QpID09PSBPYmplY3QucHJvdG90eXBlKSB7CiAgICAgICAgICAgICAgICBjb25zdCBrZXlzID0gT2JqZWN0LmtleXMoZmlyc3QpOwogICAgICAgICAgICAgICAgcmV0dXJuIGZvcmtKb2luSW50ZXJuYWwoa2V5cy5tYXAoa2V5ID0+IGZpcnN0W2tleV0pLCBrZXlzKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBpZiAodHlwZW9mIHNvdXJjZXNbc291cmNlcy5sZW5ndGggLSAxXSA9PT0gJ2Z1bmN0aW9uJykgewogICAgICAgICAgICBjb25zdCByZXN1bHRTZWxlY3RvciA9IHNvdXJjZXMucG9wKCk7CiAgICAgICAgICAgIHNvdXJjZXMgPSAoc291cmNlcy5sZW5ndGggPT09IDEgJiYgaXNBcnJheShzb3VyY2VzWzBdKSkgPyBzb3VyY2VzWzBdIDogc291cmNlczsKICAgICAgICAgICAgcmV0dXJuIGZvcmtKb2luSW50ZXJuYWwoc291cmNlcywgbnVsbCkucGlwZShtYXAoKGFyZ3MpID0+IHJlc3VsdFNlbGVjdG9yKC4uLmFyZ3MpKSk7CiAgICAgICAgfQogICAgICAgIHJldHVybiBmb3JrSm9pbkludGVybmFsKHNvdXJjZXMsIG51bGwpOwogICAgfQogICAgZnVuY3Rpb24gZm9ya0pvaW5JbnRlcm5hbChzb3VyY2VzLCBrZXlzKSB7CiAgICAgICAgcmV0dXJuIG5ldyBPYnNlcnZhYmxlKHN1YnNjcmliZXIgPT4gewogICAgICAgICAgICBjb25zdCBsZW4gPSBzb3VyY2VzLmxlbmd0aDsKICAgICAgICAgICAgaWYgKGxlbiA9PT0gMCkgewogICAgICAgICAgICAgICAgc3Vic2NyaWJlci5jb21wbGV0ZSgpOwogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNvbnN0IHZhbHVlcyA9IG5ldyBBcnJheShsZW4pOwogICAgICAgICAgICBsZXQgY29tcGxldGVkID0gMDsKICAgICAgICAgICAgbGV0IGVtaXR0ZWQgPSAwOwogICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGxlbjsgaSsrKSB7CiAgICAgICAgICAgICAgICBjb25zdCBzb3VyY2UgPSBmcm9tKHNvdXJjZXNbaV0pOwogICAgICAgICAgICAgICAgbGV0IGhhc1ZhbHVlID0gZmFsc2U7CiAgICAgICAgICAgICAgICBzdWJzY3JpYmVyLmFkZChzb3VyY2Uuc3Vic2NyaWJlKHsKICAgICAgICAgICAgICAgICAgICBuZXh0OiB2YWx1ZSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghaGFzVmFsdWUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhhc1ZhbHVlID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVtaXR0ZWQrKzsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZXNbaV0gPSB2YWx1ZTsKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIGVycm9yOiBlcnIgPT4gc3Vic2NyaWJlci5lcnJvcihlcnIpLAogICAgICAgICAgICAgICAgICAgIGNvbXBsZXRlOiAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBsZXRlZCsrOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAoY29tcGxldGVkID09PSBsZW4gfHwgIWhhc1ZhbHVlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZW1pdHRlZCA9PT0gbGVuKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3Vic2NyaWJlci5uZXh0KGtleXMgPwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXlzLnJlZHVjZSgocmVzdWx0LCBrZXksIGkpID0+IChyZXN1bHRba2V5XSA9IHZhbHVlc1tpXSwgcmVzdWx0KSwge30pIDoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWVzKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN1YnNjcmliZXIuY29tcGxldGUoKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfQogICAgICAgIH0pOwogICAgfQoKICAgIGZ1bmN0aW9uIGZyb21FdmVudCh0YXJnZXQsIGV2ZW50TmFtZSwgb3B0aW9ucywgcmVzdWx0U2VsZWN0b3IpIHsKICAgICAgICBpZiAoaXNGdW5jdGlvbihvcHRpb25zKSkgewogICAgICAgICAgICByZXN1bHRTZWxlY3RvciA9IG9wdGlvbnM7CiAgICAgICAgICAgIG9wdGlvbnMgPSB1bmRlZmluZWQ7CiAgICAgICAgfQogICAgICAgIGlmIChyZXN1bHRTZWxlY3RvcikgewogICAgICAgICAgICByZXR1cm4gZnJvbUV2ZW50KHRhcmdldCwgZXZlbnROYW1lLCBvcHRpb25zKS5waXBlKG1hcChhcmdzID0+IGlzQXJyYXkoYXJncykgPyByZXN1bHRTZWxlY3RvciguLi5hcmdzKSA6IHJlc3VsdFNlbGVjdG9yKGFyZ3MpKSk7CiAgICAgICAgfQogICAgICAgIHJldHVybiBuZXcgT2JzZXJ2YWJsZShzdWJzY3JpYmVyID0+IHsKICAgICAgICAgICAgZnVuY3Rpb24gaGFuZGxlcihlKSB7CiAgICAgICAgICAgICAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA+IDEpIHsKICAgICAgICAgICAgICAgICAgICBzdWJzY3JpYmVyLm5leHQoQXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwoYXJndW1lbnRzKSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBzdWJzY3JpYmVyLm5leHQoZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgc2V0dXBTdWJzY3JpcHRpb24odGFyZ2V0LCBldmVudE5hbWUsIGhhbmRsZXIsIHN1YnNjcmliZXIsIG9wdGlvbnMpOwogICAgICAgIH0pOwogICAgfQogICAgZnVuY3Rpb24gc2V0dXBTdWJzY3JpcHRpb24oc291cmNlT2JqLCBldmVudE5hbWUsIGhhbmRsZXIsIHN1YnNjcmliZXIsIG9wdGlvbnMpIHsKICAgICAgICBsZXQgdW5zdWJzY3JpYmU7CiAgICAgICAgaWYgKGlzRXZlbnRUYXJnZXQoc291cmNlT2JqKSkgewogICAgICAgICAgICBjb25zdCBzb3VyY2UgPSBzb3VyY2VPYmo7CiAgICAgICAgICAgIHNvdXJjZU9iai5hZGRFdmVudExpc3RlbmVyKGV2ZW50TmFtZSwgaGFuZGxlciwgb3B0aW9ucyk7CiAgICAgICAgICAgIHVuc3Vic2NyaWJlID0gKCkgPT4gc291cmNlLnJlbW92ZUV2ZW50TGlzdGVuZXIoZXZlbnROYW1lLCBoYW5kbGVyLCBvcHRpb25zKTsKICAgICAgICB9CiAgICAgICAgZWxzZSBpZiAoaXNKUXVlcnlTdHlsZUV2ZW50RW1pdHRlcihzb3VyY2VPYmopKSB7CiAgICAgICAgICAgIGNvbnN0IHNvdXJjZSA9IHNvdXJjZU9iajsKICAgICAgICAgICAgc291cmNlT2JqLm9uKGV2ZW50TmFtZSwgaGFuZGxl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RlcjogMCwgcGVyaW9kIH0pKTsKICAgICAgICAgICAgcmV0dXJuIHN1YnNjcmliZXI7CiAgICAgICAgfSk7CiAgICB9CiAgICBmdW5jdGlvbiBkaXNwYXRjaCQxKHN0YXRlKSB7CiAgICAgICAgY29uc3QgeyBzdWJzY3JpYmVyLCBjb3VudGVyLCBwZXJpb2QgfSA9IHN0YXRlOwogICAgICAgIHN1YnNjcmliZXIubmV4dChjb3VudGVyKTsKICAgICAgICB0aGlzLnNjaGVkdWxlKHsgc3Vic2NyaWJlciwgY291bnRlcjogY291bnRlciArIDEsIHBlcmlvZCB9LCBwZXJpb2QpOwogICAgfQoKICAgIGZ1bmN0aW9uIG1lcmdlKC4uLm9ic2VydmFibGVzKSB7CiAgICAgICAgbGV0IGNvbmN1cnJlbnQgPSBOdW1iZXIuUE9TSVRJVkVfSU5GSU5JVFk7CiAgICAgICAgbGV0IHNjaGVkdWxlciA9IHVuZGVmaW5lZDsKICAgICAgICBsZXQgbGFzdCA9IG9ic2VydmFibGVzW29ic2VydmFibGVzLmxlbmd0aCAtIDFdOwogICAgICAgIGlmIChpc1NjaGVkdWxlcihsYXN0KSkgewogICAgICAgICAgICBzY2hlZHVsZXIgPSBvYnNlcnZhYmxlcy5wb3AoKTsKICAgICAgICAgICAgaWYgKG9ic2VydmFibGVzLmxlbmd0aCA+IDEgJiYgdHlwZW9mIG9ic2VydmFibGVzW29ic2VydmFibGVzLmxlbmd0aCAtIDFdID09PSAnbnVtYmVyJykgewogICAgICAgICAgICAgICAgY29uY3VycmVudCA9IG9ic2VydmFibGVzLnBvcCgpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYgKHR5cGVvZiBsYXN0ID09PSAnbnVtYmVyJykgewogICAgICAgICAgICBjb25jdXJyZW50ID0gb2JzZXJ2YWJsZXMucG9wKCk7CiAgICAgICAgfQogICAgICAgIGlmICghc2NoZWR1bGVyICYmIG9ic2VydmFibGVzLmxlbmd0aCA9PT0gMSAmJi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gICAgICB0aGlzLnRoaXNBcmcgPSB0aGlzQXJnOwogICAgICAgICAgICB0aGlzLmNvdW50ID0gMDsKICAgICAgICB9CiAgICAgICAgX25leHQodmFsdWUpIHsKICAgICAgICAgICAgbGV0IHJlc3VsdDsKICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgIHJlc3VsdCA9IHRoaXMucHJlZGljYXRlLmNhbGwodGhpcy50aGlzQXJnLCB2YWx1ZSwgdGhpcy5jb3VudCsrKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBjYXRjaCAoZXJyKSB7CiAgICAgICAgICAgICAgICB0aGlzLmRlc3RpbmF0aW9uLmVycm9yKGVycik7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHJlc3VsdCkgewogICAgICAgICAgICAgICAgdGhpcy5kZXN0aW5hdGlvbi5uZXh0KHZhbHVlKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiB0aW1lcihkdWVUaW1lID0gMCwgcGVyaW9kT3JTY2hlZHVsZXIsIHNjaGVkdWxlcikgewogICAgICAgIGxldCBwZXJpb2QgPSAtMTsKICAgICAgICBpZiAoaXNOdW1lcmljKHBlcmlvZE9yU2NoZWR1bGVyKSkgewogICAgICAgICAgICBwZXJpb2QgPSBOdW1iZXIocGVyaW9kT3JTY2hlZHVsZXIpIDwgMSAmJiAxIHx8IE51bWJlcihwZXJpb2RPclNjaGVkdWxlcik7CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYgKGlzU2NoZWR1bGVyKHBlcmlvZE9yU2NoZWR1bGVyKSkgewogICAgICAgICAgICBzY2hlZHVsZXIgPSBwZXJpb2RPclNjaGVkdWxlcjsKICAgICAgICB9CiAgICAgICAgaWYgKCFpc1NjaGVkdWxlcihzY2hlZHVsZXIpKSB7CiAgICAgICAgICAgIHNjaGVkdWxlciA9IGFzeW5jOwogICAgICAgIH0KICAgICAgICByZXR1cm4gbmV3IE9ic2VydmFibGUoc3Vic2NyaWJlciA9PiB7CiAgICAgICAgICAgIGNvbnN0IGR1ZSA9IGlzTnVtZXJpYyhkdWVUaW1lKQogICAgICAgICAgICAgICAgPyBkdWVUaW1lCiAgICAgICAgICAgICAgICA6ICgrZHVlVGltZSAtIHNjaGVkdWxlci5ub3coKSk7CiAgICAgICAgICAgIHJldHVybiBzY2hlZHVsZXIuc2NoZWR1bGUoZGlzcGF0Y2gkMiwgZHVlLCB7CiAgICAgICAgICAgICAgICBpbmRleDogMCwgcGVyaW9kLCBzdWJzY3JpYmVyCiAgICAgICAgICAgIH0pOwogICAgICAgIH0pOwogICAgfQogICAgZnVuY3Rpb24gZGlzcGF0Y2gkMihzdGF0ZSkgewogICAgICAgIGNvbnN0IHsgaW5kZXgsIHBlcmlvZCwgc3Vic2NyaWJlciB9ID0gc3RhdGU7CiAgICAgICAgc3Vic2NyaWJlci5uZXh0KGluZGV4KTsKICAgICAgICBpZiAoc3Vic2NyaWJlci5jbG9zZWQpIHsKICAgICAgICAgICAgcmV0dXJuOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChwZXJpb2QgPT09IC0xKSB7CiAgICAgICAgICAgIHJldHVybiBzdWJzY3JpYmVyLmNvbXBsZXRlKCk7CiAgICAgICAgfQogICAgICAgIHN0YXRlLmluZGV4ID0gaW5kZXggKyAxOwogICAgICAgIHRoaXMuc2NoZWR1bGUoc3RhdGUsIHBlcmlvZCk7CiAgICB9CgogICAgZnVuY3Rpb24gemlwKC4uLm9ic2VydmFibGVzKSB7CiAgICAgICAgY29uc3QgbGFzdCA9IG9ic2VydmFibGVzW29ic2VydmFibGVzLmxlbmd0aCAtIDFdOwogICAgICAgIGxldCByZXN1bHRTZWxlY3RvciA9IHVuZGVmaW5lZDsKICAgICAgICBpZiAodHlwZW9mIGxhc3QgPT09ICdmdW5jdGlvbicpIHsKICAgICAgICAgICAgcmVzdWx0U2VsZWN0b3IgPSBvYnNlcnZhYmxlcy5wb3A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ZXJhdG9yKHZhbHVlKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAodHlwZW9mIHZhbHVlW2l0ZXJhdG9yXSA9PT0gJ2Z1bmN0aW9uJykgewogICAgICAgICAgICAgICAgaXRlcmF0b3JzLnB1c2gobmV3IFN0YXRpY0l0ZXJhdG9yKHZhbHVlW2l0ZXJhdG9yXSgpKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBpdGVyYXRvcnMucHVzaChuZXcgWmlwQnVmZmVySXRlcmF0b3IodGhpcy5kZXN0aW5hdGlvbiwgdGhpcywgdmFsdWUpKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBfY29tcGxldGUoKSB7CiAgICAgICAgICAgIGNvbnN0IGl0ZXJhdG9ycyA9IHRoaXMuaXRlcmF0b3JzOwogICAgICAgICAgICBjb25zdCBsZW4gPSBpdGVyYXRvcnMubGVuZ3RoOwogICAgICAgICAgICB0aGlzLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgICAgIGlmIChsZW4gPT09IDApIHsKICAgICAgICAgICAgICAgIHRoaXMuZGVzdGluYXRpb24uY29tcGxldGUoKTsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLmFjdGl2ZSA9IGxlbjsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBsZW47IGkrKykgewogICAgICAgICAgICAgICAgbGV0IGl0ZXJhdG9yID0gaXRlcmF0b3JzW2ldOwogICAgICAgICAgICAgICAgaWYgKGl0ZXJhdG9yLnN0aWxsVW5zdWJzY3JpYmVkKSB7CiAgICAgICAgICAgICAgICAgICAgY29uc3QgZGVzdGluYXRpb24gPSB0aGlzLmRlc3RpbmF0aW9uOwogICAgICAgICAgICAgICAgICAgIGRlc3RpbmF0aW9uLmFkZChpdGVyYXRvci5zdWJzY3JpYmUoaXRlcmF0b3IsIGkpKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIHRoaXMuYWN0aXZlLS07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgbm90aWZ5SW5hY3RpdmUoKSB7CiAgICAgICAgICAgIHRoaXMuYWN0aXZlLS07CiAgICAgICAgICAgIGlmICh0aGlzLmFjdGl2ZSA9PT0gMCkgewogICAgICAgICAgICAgICAgdGhpcy5kZXN0aW5hdGlvbi5jb21wbGV0ZSgpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGNoZWNrSXRlcmF0b3JzKCkgewogICAgICAgICAgICBjb25zdCBpdGVyYXRvcnMgPSB0aGlzLml0ZXJhdG9yczsKICAgICAgICAgICAgY29uc3QgbGVuID0gaXRlcmF0b3JzLmxlbmd0aDsKICAgICAgICAgICAgY29uc3QgZGVzdGluYXRpb24gPSB0aGlzLmRlc3RpbmF0aW9uOwogICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGxlbjsgaSsrKSB7CiAgICAgICAgICAgICAgICBsZXQgaXRlcmF0b3IgPSBpdGVyYXRvcnNbaV07CiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGl0ZXJhdG9yLmhhc1ZhbHVlID09PSAnZnVuY3Rpb24nICYmICFpdGVyYXRvci5oYXNWYWx1ZSgpKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGxldCBzaG91bGRDb21wbGV0ZSA9IGZhbHNlOwogICAgICAgICAgICBjb25zdCBhcmdzID0gW107CiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbGVuOyBpKyspIHsKICAgICAgICAgICAgICAgIGxldCBpdGVyYXRvciA9IGl0ZXJhdG9yc1tpXTsKICAgICAgICAgICAgICAgIGxldCByZXN1bHQgPSBpdGVyYXRvci5uZXh0KCk7CiAgICAgICAgICAgICAgICBpZiAoaXRlcmF0b3IuaGFzQ29tcGxldGVkKCkpIHsKICAgICAgICAgICAgICAgICAgICBzaG91bGRDb21wbGV0ZSA9IHRydWU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAocmVzdWx0LmRvbmUpIHsKICAgICAgICAgICAgICAgICAgICBkZXN0aW5hdGlvbi5jb21wbGV0ZSgpOwogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGFyZ3MucHVzaChyZXN1bHQudmFsdWUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0aGlzLnJlc3VsdFNlbGVjdG9yKSB7CiAgICAgICAgICAgICAgICB0aGlzLl90cnlyZXN1bHRTZWxlY3RvcihhcmdzKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIGRlc3RpbmF0aW9uLm5leHQoYXJncyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHNob3VsZENvbXBsZXRlKSB7CiAgICAgICAgICAgICAgICBkZXN0aW5hdGlvbi5jb21wbGV0ZSgpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIF90cnlyZXN1bHRTZWxlY3RvcihhcmdzKSB7CiAgICAgICAgICAgIGxldCByZXN1bHQ7CiAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICByZXN1bHQgPSB0aGlzLnJlc3VsdFNlbGVjdG9yLmFwcGx5KHRoaXMsIGFyZ3MpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNhdGNoIChlcnIpIHsKICAgICAgICAgICAgICAgIHRoaXMuZGVzdGluYXRpb24uZXJyb3IoZXJyKTsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLmRlc3RpbmF0aW9uLm5leHQocmVzdWx0KTsKICAgICAgICB9CiAgICB9CiAgICBjbGFzcyBTdGF0aWNJdGVyYXRvciB7CiAgICAgICAgY29uc3RydWN0b3IoaXRlcmF0b3IpIHsKICAgICAgICAgICAgdGhpcy5pdGVyYXRvciA9IGl0ZXJhdG9yOwogICAgICAgICAgICB0aGlzLm5leHRSZXN1bHQgPSBpdGVyYXRvci5uZXh0KCk7CiAgICAgICAgfQogICAgICAgIGhhc1ZhbHVlKCkgewogICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICB9CiAgICAgICAgbmV4dCgpIHsKICAgICAgICAgICAgY29uc3QgcmVzdWx0ID0gdGhpcy5uZXh0UmVzdWx0OwogICAgICAgICAgICB0aGlzLm5leHRSZXN1bHQgPSB0aGlzLml0ZXJhdG9yLm5leHQoKTsKICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDsKICAgICAgICB9CiAgICAgICAgaGFzQ29tcGxldGVkKCkgewogICAgICAgICAgICBjb25zdCBuZXh0UmVzdWx0ID0gdGhpcy5uZXh0UmVzdWx0OwogICAgICAgICAgICByZXR1cm4gbmV4dFJlc3VsdCAmJiAhIW5leHRSZXN1bHQuZG9uZTsKICAgICAgICB9CiAgICB9CiAgICBjbGFzcyBTdGF0aWNBcnJheUl0ZXJhdG9yIHsKICAgICAgICBjb25zdHJ1Y3RvcihhcnJheSkgewogICAgICAgICAgICB0aGlzLmFycmF5ID0gYXJyYXk7CiAgICAgICAgICAgIHRoaXMuaW5kZXggPSAwOwogICAgICAgICAgICB0aGlzLmxlbmd0aCA9IDA7CiAgICAgICAgICAgIHRoaXMubGVuZ3RoID0gYXJyYXkubGVuZ3RoOwogICAgICAgIH0KICAgICAgICBbaXRlcmF0b3JdKCkgewogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9CiAgICAgICAgbmV4dCh2YWx1ZSkgewogICAgICAgICAgICBjb25zdCBpID0gdGhpcy5pbmRleCsrOwogICAgICAgICAgICBjb25zdCBhcnJheSA9IHRoaXMuYXJyYXk7CiAgICAgICAgICAgIHJldHVybiB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ICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICByZXR1cm4geyB2YWx1ZTogYnVmZmVyLnNoaWZ0KCksIGRvbmU6IGZhbHNlIH07CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaGFzVmFsdWUoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmJ1ZmZlci5sZW5ndGggPiAwOwogICAgICAgIH0KICAgICAgICBoYXNDb21wbGV0ZWQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmJ1ZmZlci5sZW5ndGggPT09IDAgJiYgdGhpcy5pc0NvbXBsZXRlOwogICAgICAgIH0KICAgICAgICBub3RpZnlDb21wbGV0ZSgpIHsKICAgICAgICAgICAgaWYgKHRoaXMuYnVmZmVyLmxlbmd0aCA+IDApIHsKICAgICAgICAgICAgICAgIHRoaXMuaXNDb21wbGV0ZSA9IHRydWU7CiAgICAgICAgICAgICAgICB0aGlzLnBhcmVudC5ub3RpZnlJbmFjdGl2ZSgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5kZXN0aW5hdGlvbi5jb21wbGV0ZSgpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIG5vdGlmeU5leHQob3V0ZXJWYWx1ZSwgaW5uZXJWYWx1ZSwgb3V0ZXJJbmRleCwgaW5uZXJJbmRleCwgaW5uZXJTdWIpIHsKICAgICAgICAgICAgdGhpcy5idWZmZXIucHVzaChpbm5lclZhbHVlKTsKICAgICAgICAgICAgdGhpcy5wYXJlbnQuY2hlY2tJdGVyYXRvcnMoKTsKICAgICAgICB9CiAgICAgICAgc3Vic2NyaWJlKHZhbHVlLCBpbmRleCkgewogICAgICAgICAgICByZXR1cm4gc3Vic2NyaWJlVG9SZXN1bHQodGhpcywgdGhpcy5vYnNlcnZhYmxlLCB0aGlzLCBpbmRleCk7CiAgICAgICAgfQogICAgfQoKICAgIGZ1bmN0aW9uIGF1Z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gKCF0aGlzLnRocm90dGxlZCkgewogICAgICAgICAgICAgICAgbGV0IGR1cmF0aW9uOwogICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICBjb25zdCB7IGR1cmF0aW9uU2VsZWN0b3IgfSA9IHRoaXM7CiAgICAgICAgICAgICAgICAgICAgZHVyYXRpb24gPSBkdXJhdGlvblNlbGVjdG9yKHZhbHVlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGNhdGNoIChlcnIpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5kZXN0aW5hdGlvbi5lcnJvcihlcnIpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgY29uc3QgaW5uZXJTdWJzY3JpcHRpb24gPSBzdWJzY3JpYmVUb1Jlc3VsdCh0aGlzLCBkdXJhdGlvbik7CiAgICAgICAgICAgICAgICBpZiAoIWlubmVyU3Vic2NyaXB0aW9uIHx8IGlubmVyU3Vic2NyaXB0aW9uLmNsb3NlZCkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuY2xlYXJUaHJvdHRsZSgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5hZGQodGhpcy50aHJvdHRsZWQgPSBpbm5lclN1YnNjcmlwdGlvbik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgY2xlYXJUaHJvdHRsZSgpIHsKICAgICAgICAgICAgY29uc3QgeyB2YWx1ZSwgaGFzVmFsdWUsIHRocm90dGxlZCB9ID0gdGhpczsKICAgICAgICAgICAgaWYgKHRocm90dGxlZCkgewogICAgICAgICAgICAgICAgdGhpcy5yZW1vdmUodGhyb3R0bGVkKTsKICAgICAgICAgICAgICAgIHRoaXMudGhyb3R0bGVkID0gbnVsbDsKICAgICAgICAgICAgICAgIHRocm90dGxlZC51bnN1YnNjcmliZSgpOwogICAgICAgIC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zZWxlY3RvcjsKICAgICAgICB9CiAgICAgICAgY2FsbChzdWJzY3JpYmVyLCBzb3VyY2UpIHsKICAgICAgICAgICAgcmV0dXJuIHNvdXJjZS5zdWJzY3JpYmUobmV3IENhdGNoU3Vic2NyaWJlcihzdWJzY3JpYmVyLCB0aGlzLnNlbGVjdG9yLCB0aGlzLmNhdWdodCkpOwogICAgICAgIH0KICAgIH0KICAgIGNsYXNzIENhdGNoU3Vic2NyaWJlciBleHRlbmRzIE91dGVyU3Vic2NyaWJlciB7CiAgICAgICAgY29uc3RydWN0b3IoZGVzdGluYXRpb24sIHNlbGVjdG9yLCBjYXVnaHQpIHsKICAgICAgICAgICAgc3VwZXIoZGVzdGluYXRpb24pOwogICAgICAgICAgICB0aGlzLnNlbGVjdG9yID0gc2VsZWN0b3I7CiAgICAgICAgICAgIHRoaXMuY2F1Z2h0ID0gY2F1Z2h0OwogICAgICAgIH0KICAgICAgICBlcnJvcihlcnIpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLmlzU3RvcHBlZCkgewogICAgICAgICAgICAgICAgbGV0IHJlc3VsdDsKICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ID0gdGhpcy5zZWxlY3RvcihlcnIsIHRoaXMuY2F1Z2h0KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGNhdGNoIChlcnIyKSB7CiAgICAgICAgICAgICAgICAgICAgc3VwZXIuZXJyb3IoZXJyMik7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdGhpcy5fdW5zdWJzY3JpYmVBbmRSZWN5Y2xlKCk7CiAgICAgICAgICAgICAgICBjb25zdCBpbm5lclN1YnNjcmliZXIgPSBuZXcgSW5uZXJTdWJzY3JpYmVyKHRoaXMsIHVuZGVmaW5lZCwgdW5kZWZpbmVkKTsKICAgICAgICAgICAgICAgIHRoaXMuYWRkKGlubmVyU3Vic2NyaWJlcik7CiAgICAgICAgICAgICAgICBjb25zdCBpbm5lclN1YnNjcmlwdGlvbiA9IHN1YnNjcmliZVRvUmVzdWx0KHRoaXMsIHJlc3VsdCwgdW5kZWZpbmVkLCB1bmRlZmluZWQsIGlubmVyU3Vic2NyaWJlcik7CiAgICAgICAgICAgICAgICBpZiAoaW5uZXJTdWJzY3JpcHRpb24gIT09IGlubmVyU3Vic2NyaWJlcikgewogICAgICAgICAgICAgICAgICAgIHRoaXMuYWRkKGlubmVyU3Vic2NyaXB0aW9uKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiBjb21iaW5lTGF0ZXN0JDEoLi4ub2JzZXJ2YWJsZXMpIHsKICAgICAgICBsZXQgcHJvamVjdCA9IHVuZGVmaW5lZDsKICAgICAgICBpZiAodHlwZW9mIG9ic2VydmFibGVzW29ic2VydmFibGVzLmxlbmd0aCAtIDFdID09PSAnZnVuY3Rpb24nKSB7CiAgICAgICAgICAgIHByb2plY3QgPSBvYnNlcnZhYmxlcy5wb3AoKTsKICAgICAgICB9CiAgICAgICAgaWYgKG9ic2VydmFibGVzLmxlbmd0aCA9PT0gMSAmJiBpc0FycmF5KG9ic2VydmFibGVzWzBdKSkgewogICAgICAgICAgICBvYnNlcnZhYmxlcyA9IG9ic2VydmFibGVzWzBdLnNsaWNlKCk7CiAgICAgICAgfQogICAgICAgIHJldHVybiAoc291cmNlKSA9PiBzb3VyY2UubGlmdC5jYWxsKGZyb20oW3NvdXJjZSwgLi4ub2JzZXJ2YWJsZXNdKSwgbmV3IENvbWJpbmVMYXRlc3RPcGVyYXRvcihwcm9qZWN0KSk7CiAgICB9CiAgICBmdW5jdGlvbiBjb21iaW5lTGF0ZXN0V2l0aCguLi5vdGhlclNvdXJjZXMpIHsKICAgICAgICByZXR1cm4gY29tYmluZUxhdGVzdCQxKC4uLm90aGVyU291cmNlcyk7CiAgICB9CgogICAgZnVuY3Rp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ICAgICB0aGlzLmhhc1ZhbHVlID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuZHVyYXRpb25TdWJzY3JpcHRpb24gPSBudWxsOwogICAgICAgIH0KICAgICAgICBfbmV4dCh2YWx1ZSkgewogICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgY29uc3QgcmVzdWx0ID0gdGhpcy5kdXJhdGlvblNlbGVjdG9yLmNhbGwodGhpcywgdmFsdWUpOwogICAgICAgICAgICAgICAgaWYgKHJlc3VsdCkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX3RyeU5leHQodmFsdWUsIHJlc3VsdCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY2F0Y2ggKGVycikgewogICAgICAgICAgICAgICAgdGhpcy5kZXN0aW5hdGlvbi5lcnJvcihlcnIpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIF9jb21wbGV0ZSgpIHsKICAgICAgICAgICAgdGhpcy5lbWl0VmFsdWUoKTsKICAgICAgICAgICAgdGhpcy5kZXN0aW5hdGlvbi5jb21wbGV0ZSgpOwogICAgICAgIH0KICAgICAgICBfdHJ5TmV4dCh2YWx1ZSwgZHVyYXRpb24pIHsKICAgICAgICAgICAgbGV0IHN1YnNjcmlwdGlvbiA9IHRoaXMuZHVyYXRpb25TdWJzY3JpcHRpb247CiAgICAgICAgICAgIHRoaXMudmFsdWUgPSB2YWx1ZTsKICAgICAgICAgICAgdGhpcy5oYXNWYWx1ZSA9IHRydWU7CiAgICAgICAgICAgIGlmIChzdWJzY3JpcHRpb24pIHsKICAgICAgICAgICAgICAgIHN1YnNjcmlwdGlvbi51bnN1YnNjcmliZSgpOwogICAgICAgICAgICAgICAgdGhpcy5yZW1vdmUoc3Vic2NyaXB0aW9uKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBzdWJzY3JpcHRpb24gPSBzdWJzY3JpYmVUb1Jlc3VsdCh0aGlzLCBkdXJhdGlvbik7CiAgICAgICAgICAgIGlmIChzdWJzY3JpcHRpb24gJiYgIXN1YnNjcmlwdGlvbi5jbG9zZWQpIHsKICAgICAgICAgICAgICAgIHRoaXMuYWRkKHRoaXMuZHVyYXRpb25TdWJzY3JpcHRpb24gPSBzdWJzY3JpcHRpb24pOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIG5vdGlmeU5leHQob3V0ZXJWYWx1ZSwgaW5uZXJWYWx1ZSwgb3V0ZXJJbmRleCwgaW5uZXJJbmRleCwgaW5uZXJTdWIpIHsKICAgICAgICAgICAgdGhpcy5lbWl0VmFsdWUoKTsKICAgICAgICB9CiAgICAgICAgbm90aWZ5Q29tcGxldGUoKSB7CiAgICAgICAgICAgIHRoaXMuZW1pdFZhbHVlKCk7CiAgICAgICAgfQogICAgICAgIGVtaXRWYWx1ZSgpIHsKICAgICAgICAgICAgaWYgKHRoaXMuaGFzVmFsdWUpIHsKICAgICAgICAgICAgICAgIGNvbnN0IHZhbHVlID0gdGhpcy52YWx1ZTsKICAgICAgICAgICAgICAgIGNvbnN0IHN1YnNjcmlwdGlvbiA9IHRoaXMuZHVyYXRpb25TdWJzY3JpcHRpb247CiAgICAgICAgICAgICAgICBpZiAoc3Vic2NyaXB0aW9uKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5kdXJhdGlvblN1YnNjcmlwdGlvbiA9IG51bGw7CiAgICAgICAgICAgICAgICAgICAgc3Vic2NyaXB0aW9uLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5yZW1vdmUoc3Vic2NyaXB0aW9uKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMudmFsdWUgPSBudWxsOwogICAgICAgICAgICAgICAgdGhpcy5oYXNWYWx1ZSA9IGZhbHNlOwogICAgICAgICAgICAgICAgc3VwZXIuX25leHQodmFsdWUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQoKICAgIGZ1bmN0aW9uIGRlYm91bmNlVGltZShkdWVUaW1lLCBzY2hlZHVsZXIgPSBhc3luYykgewogICAgICAgIHJldHVybiAoc291cmNlKSA9PiBzb3VyY2UubGlmdChuZXcgRGVib3VuY2VUaW1lT3BlcmF0b3IoZHVlVGltZSwgc2NoZWR1bGVyKSk7CiAgICB9CiAgICBjbGFzcyBEZWJvdW5jZVRpbWVPcGVyYXRvciB7CiAgICAgICAgY29uc3RydWN0b3IoZHVlVGltZSwgc2NoZWR1bGVyKSB7CiAgICAgICAgICAgIHRoaXMuZHVlVGltZSA9IGR1ZVRpbWU7CiAgICAgICAgICAgIHRoaXMuc2NoZWR1bGVyID0gc2NoZWR1bGVyOwogICAgICAgIH0KICAgICAgICBjYWxsKHN1YnNjcmliZXIsIHNvdXJjZSkgewogICAgICAgICAgICByZXR1cm4gc291cmNlLnN1YnNjcmliZShuZXcgRGVib3VuY2VUaW1lU3Vic2NyaWJlcihzdWJzY3JpYmVyLCB0aGlzLmR1ZVRpbWUsIHRoaXMuc2NoZWR1bGVyKSk7CiAgICAgICAgfQogICAgfQogICAgY2xhc3MgRGVib3VuY2VUaW1lU3Vic2NyaWJlciBleHRlbmRzIFN1YnNjcmliZXIgewogICAgICAgIGNvbnN0cnVjdG9yKGRlc3RpbmF0aW9uLCBkdWVUaW1lLCBzY2hlZHVsZXIpIHsKICAgICAgICAgICAgc3VwZXIoZGVzdGluYXRpb24pOwogICAgICAgICAgICB0aGlzLmR1ZVRpbWUgPSBkdWVUaW1lOwogICAgICAgICAgICB0aGlzLnNjaGVkdWxlciA9IHNjaGVkdWxlcjsKICAgICAgICAgICAgdGhpcy5kZWJvdW5jZWRTdWJzY3JpcHRpb24gPSBudWxsOwogICAgICAgICAgICB0aGlzLmxhc3RWYWx1ZSA9IG51bGw7CiAgICAgICAgICAgIHRoaXMuaGFzVmFsdWUgPSBmYWxzZTsKICAgICAgICB9CiAgICAgICAgX25leHQodmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5jbGVhckRlYm91bmNlKCk7CiAgICAgICAgICAgIHRoaXMubGFzdFZhbHVlID0gdmFsdWU7CiAgICAgICAgICAgIHRoaXMuaGFzVmFsdWUgPSB0cnVlOwogICAgICAgICAgICB0aGlzLmFkZCh0aGlzLmRlYm91bmNlZFN1YnNjcmlwdGlvbiA9IHRoaXMuc2NoZWR1bGVyLnNjaGVkdWxlKGRpc3BhdGNoTmV4dCwgdGhpcy5kdWVUaW1lLCB0aGlzKSk7CiAgICAgICAgfQogICAgICAgIF9jb21wbGV0ZSgpIHsKICAgICAgICAgICAgdGhpcy5kZWJvdW5jZWROZXh0KCk7CiAgICAgICAgICAgIHRoaXMuZGVzdGluYXRpb24uY29tcGxldGUoKTsKICAgICAgICB9CiAgICAgICAgZGVib3VuY2VkTmV4dCgpIHsKICAgICAgICAgICAgdGhpcy5jbGVhckRlYm91bmNlKCk7CiAgICAgICAgICAgIGlmICh0aGlzLmhhc1ZhbHVlKSB7CiAgICAgICAgICAgICAgICBjb25zdCB7IGxhc3RWYWx1ZSB9ID0gdGhpczsKICAgICAgICAgICAgICAgIHRoaXMubGFzdFZhbHVlID0gbnVsbDsKICAgICAgICAgICAgICAgIHRoaXMuaGFzVmFsdWUgPSBmYWxzZTsKICAgICAgICAgICAgICAgIHRoaXMuZGVzdGluYXRpb24ubmV4dChsYXN0VmFsdWUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGNsZWFyRGVib3VuY2UoKSB7CiAgICAgICAgICAgIGNvbnN0IGRlYm91bmNlZFN1YnNjcmlwdGlvbiA9IHRoaXMuZGVib3VuY2VkU3Vic2NyaXB0aW9uOwogICAgICAgICAgICBpZiAoZGVib3VuY2VkU3Vic2NyaXB0aW9uICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICB0aGlzLnJlbW92ZShkZWJvdW5jZWRTdWJzY3JpcHRpb24pOwogICAgICAgICAgICAgICAgZGVib3VuY2VkU3Vic2NyaXB0aW9uLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgICAgICAgICB0aGlzLm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bXB0eSA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLmRlc3RpbmF0aW9uLm5leHQodmFsdWUpOwogICAgICAgIH0KICAgICAgICBfY29tcGxldGUoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmlzRW1wdHkpIHsKICAgICAgICAgICAgICAgIHRoaXMuZGVzdGluYXRpb24ubmV4dCh0aGlzLmRlZmF1bHRWYWx1ZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5kZXN0aW5hdGlvbi5jb21wbGV0ZSgpOwogICAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiBpc0RhdGUodmFsdWUpIHsKICAgICAgICByZXR1cm4gdmFsdWUgaW5zdGFuY2VvZiBEYXRlICYmICFpc05hTigrdmFsdWUpOwogICAgfQoKICAgIGZ1bmN0aW9uIGRlbGF5KGRlbGF5LCBzY2hlZHVsZXIgPSBhc3luYykgewogICAgICAgIGNvbnN0IGFic29sdXRlRGVsYXkgPSBpc0RhdGUoZGVsYXkpOwogICAgICAgIGNvbnN0IGRlbGF5Rm9yID0gYWJzb2x1dGVEZWxheSA/ICgrZGVsYXkgLSBzY2hlZHVsZXIubm93KCkpIDogTWF0aC5hYnMoZGVsYXkpOwogICAgICAgIHJldHVybiAoc291cmNlKSA9PiBzb3VyY2UubGlmdChuZXcgRGVsYXlPcGVyYXRvcihkZWxheUZvciwgc2NoZWR1bGVyKSk7CiAgICB9CiAgICBjbGFzcyBEZWxheU9wZXJhdG9yIHsKICAgICAgICBjb25zdHJ1Y3RvcihkZWxheSwgc2NoZWR1bGVyKSB7CiAgICAgICAgICAgIHRoaXMuZGVsYXkgPSBkZWxheTsKICAgICAgICAgICAgdGhpcy5zY2hlZHVsZXIgPSBzY2hlZHVsZXI7CiAgICAgICAgfQogICAgICAgIGNhbGwoc3Vic2NyaWJlciwgc291cmNlKSB7CiAgICAgICAgICAgIHJldHVybiBzb3VyY2Uuc3Vic2NyaWJlKG5ldyBEZWxheVN1YnNjcmliZXIoc3Vic2NyaWJlciwgdGhpcy5kZWxheSwgdGhpcy5zY2hlZHVsZXIpKTsKICAgICAgICB9CiAgICB9CiAgICBjbGFzcyBEZWxheVN1YnNjcmliZXIgZXh0ZW5kcyBTdWJzY3JpYmVyIHsKICAgICAgICBjb25zdHJ1Y3RvcihkZXN0aW5hdGlvbiwgZGVsYXksIHNjaGVkdWxlcikgewogICAgICAgICAgICBzdXBlcihkZXN0aW5hdGlvbik7CiAgICAgICAgICAgIHRoaXMuZGVsYXkgPSBkZWxheTsKICAgICAgICAgICAgdGhpcy5zY2hlZHVsZXIgPSBzY2hlZHVsZXI7CiAgICAgICAgICAgIHRoaXMucXVldWUgPSBbXTsKICAgICAgICAgICAgdGhpcy5hY3RpdmUgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5lcnJvcmVkID0gZmFsc2U7CiAgICAgICAgfQogICAgICAgIHN0YXRpYyBkaXNwYXRjaChzdGF0ZSkgewogICAgICAgICAgICBjb25zdCBzb3VyY2UgPSBzdGF0ZS5zb3VyY2U7CiAgICAgICAgICAgIGNvbnN0IHF1ZXVlID0gc291cmNlLnF1ZXVlOwogICAgICAgICAgICBjb25zdCBzY2hlZHVsZXIgPSBzdGF0ZS5zY2hlZHVsZXI7CiAgICAgICAgICAgIGNvbnN0IGRlc3RpbmF0aW9uID0gc3RhdGUuZGVzdGluYXRpb247CiAgICAgICAgICAgIHdoaWxlIChxdWV1ZS5sZW5ndGggPiAwICYmIChxdWV1ZVswXS50aW1lIC0gc2NoZWR1bGVyLm5vdygpKSA8PSAwKSB7CiAgICAgICAgICAgICAgICBxdWV1ZS5zaGlmdCgpLm5vdGlmaWNhdGlvbi5vYnNlcnZlKGRlc3RpbmF0aW9uKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAocXVldWUubGVuZ3RoID4gMCkgewogICAgICAgICAgICAgICAgY29uc3QgZGVsYXkgPSBNYXRoLm1heCgwLCBxdWV1ZVswXS50aW1lIC0gc2NoZWR1bGVyLm5vdygpKTsKICAgICAgICAgICAgICAgIHRoaXMuc2NoZWR1bGUoc3RhdGUsIGRlbGF5KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChzb3VyY2UuaXNTdG9wcGVkKSB7CiAgICAgICAgICAgICAgICBzb3VyY2UuZGVzdGluYXRpb24uY29tcGxldGUoKTsKICAgICAgICAgICAgICAgIHNvdXJjZS5hY3RpdmUgPSBmYWxzZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMudW5zdWJzY3JpYmUoKTsKICAgICAgICAgICAgICAgIHNvdXJjZS5hY3RpdmUgPSBmYWxzZTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBfc2NoZWR1bGUoc2NoZWR1bGVyKSB7CiAgICAgICAgICAgIHRoaXMuYWN0aXZlID0gdHJ1ZTsKICAgICAgICAgICAgY29uc3QgZGVzdGluYXRpb24gPSB0aGlzLmRlc3RpbmF0aW9uOwogICAgICAgICAgICBkZXN0aW5hdGlvbi5hZGQoc2NoZWR1bGVyLnNjaGVkdWxlKERlbGF5U3Vic2NyaWJlci5kaXNwYXRjaCwgdGhpcy5kZWxheSwgewogICAgICAgICAgICAgICAgc291cmNlOiB0aGlzLCBkZXN0aW5hdGlvbjogdGhpcy5kZXN0aW5hdGlvbiwgc2NoZWR1bGVyOiBzY2hlZHVsZXIKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICBzY2hlZHVsZU5vdGlmaWNhdGlvbihub3RpZmljYXRpb24pIHsKICAgICAgICAgICAgaWYgKHRoaXMuZXJyb3JlZCA9PT0gdHJ1ZSkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNvbnN0IHNjaGVkdWxlciA9IHRoaXMuc2NoZWR1bGVyOwogICAgICAgICAgICBjb25zdCBtZXNzYWdlID0gbmV3IERlbGF5TWVzc2FnZShzY2hlZHVsZXIubm93KCkgKyB0aGlzLmRlbGF5LCBub3RpZmljYXRpb24pOwogICAgICAgICAgICB0aGlzLnF1ZXVlLnB1c2gobWVzc2FnZSk7CiAgICAgICAgICAgIGlmICh0aGlzLmFjdGl2ZSA9PT0gZmFsc2UpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3NjaGVkdWxlKHNjaGVkdWxlcik7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgX25leHQodmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5zY2hlZHVsZU5vdGlmaWNhdGlvbihOb3RpZmljYXRpb24uY3JlYXRlTmV4dCh2YWx1ZSkpOwogICAgICAgIH0KICAgICAgICBfZXJyb3IoZXJyKSB7CiAgICAgICAgICAgIHRoaXMuZXJyb3JlZCA9IHRydWU7CiAgICAgICAgICAgIHRoaXMucXVldWUgPSBbXTsKICAgICAgICAgICAgdGhpcy5kZXN0aW5hdGlvbi5lcnJvcihlcnIpOwogICAgICAgICAgICB0aGlzLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgfQogICAgICAgIF9jb21wbGV0ZSgpIHsKICAgICAgICAgICAgaWYgKHRoaXMucXVldWUubGVuZ3RoID09PSAwKSB7CiAgICAgICAgICAgICAgICB0aGlzLmRlc3RpbmF0aW9uLmNvbXBsZXRlKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy51bnN1YnNjcmliZSgpOwogICAgICAgIH0KICAgIH0KICAgIGNsYXNzIERlbGF5TWVzc2FnZSB7CiAgICAgICAgY29uc3RydWN0b3IodGltZSwgbm90aWZpY2F0aW9uKSB7CiAgICAgICAgICAgIHRoaXMudGltZSA9IHRpbWU7CiAgICAgICAgICAgIHRoaXMubm90aWZpY2F0aW9uID0gbm90aWZpY2F0aW9uOwogICAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiBkZWxheVdoZW4oZGVsYXlEdXJhdGlvblNlbGVjdG9yLCBzdWJzY3JpcHRpb25EZWxheSkgewogICAgICAgIGlmIChzdWJzY3J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XMuZGVsYXlOb3RpZmllclN1YnNjcmlwdGlvbnMgPSBbXTsKICAgICAgICAgICAgdGhpcy5pbmRleCA9IDA7CiAgICAgICAgfQogICAgICAgIG5vdGlmeU5leHQob3V0ZXJWYWx1ZSwgaW5uZXJWYWx1ZSwgb3V0ZXJJbmRleCwgaW5uZXJJbmRleCwgaW5uZXJTdWIpIHsKICAgICAgICAgICAgdGhpcy5kZXN0aW5hdGlvbi5uZXh0KG91dGVyVmFsdWUpOwogICAgICAgICAgICB0aGlzLnJlbW92ZVN1YnNjcmlwdGlvbihpbm5lclN1Yik7CiAgICAgICAgICAgIHRoaXMudHJ5Q29tcGxldGUoKTsKICAgICAgICB9CiAgICAgICAgbm90aWZ5RXJyb3IoZXJyb3IsIGlubmVyU3ViKSB7CiAgICAgICAgICAgIHRoaXMuX2Vycm9yKGVycm9yKTsKICAgICAgICB9CiAgICAgICAgbm90aWZ5Q29tcGxldGUoaW5uZXJTdWIpIHsKICAgICAgICAgICAgY29uc3QgdmFsdWUgPSB0aGlzLnJlbW92ZVN1YnNjcmlwdGlvbihpbm5lclN1Yik7CiAgICAgICAgICAgIGlmICh2YWx1ZSkgewogICAgICAgICAgICAgICAgdGhpcy5kZXN0aW5hdGlvbi5uZXh0KHZhbHVlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLnRyeUNvbXBsZXRlKCk7CiAgICAgICAgfQogICAgICAgIF9uZXh0KHZhbHVlKSB7CiAgICAgICAgICAgIGNvbnN0IGluZGV4ID0gdGhpcy5pbmRleCsrOwogICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgY29uc3QgZGVsYXlOb3RpZmllciA9IHRoaXMuZGVsYXlEdXJhdGlvblNlbGVjdG9yKHZhbHVlLCBpbmRleCk7CiAgICAgICAgICAgICAgICBpZiAoZGVsYXlOb3RpZmllcikgewogICAgICAgICAgICAgICAgICAgIHRoaXMudHJ5RGVsYXkoZGVsYXlOb3RpZmllciwgdmFsdWUpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGNhdGNoIChlcnIpIHsKICAgICAgICAgICAgICAgIHRoaXMuZGVzdGluYXRpb24uZXJyb3IoZXJyKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBfY29tcGxldGUoKSB7CiAgICAgICAgICAgIHRoaXMuY29tcGxldGVkID0gdHJ1ZTsKICAgICAgICAgICAgdGhpcy50cnlDb21wbGV0ZSgpOwogICAgICAgICAgICB0aGlzLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgfQogICAgICAgIHJlbW92ZVN1YnNjcmlwdGlvbihzdWJzY3JpcHRpb24pIHsKICAgICAgICAgICAgc3Vic2NyaXB0aW9uLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgICAgIGNvbnN0IHN1YnNjcmlwdGlvbklkeCA9IHRoaXMuZGVsYXlOb3RpZmllclN1YnNjcmlwdGlvbnMuaW5kZXhPZihzdWJzY3JpcHRpb24pOwogICAgICAgICAgICBpZiAoc3Vic2NyaXB0aW9uSWR4ICE9PSAtMSkgewogICAgICAgICAgICAgICAgdGhpcy5kZWxheU5vdGlmaWVyU3Vic2NyaXB0aW9ucy5zcGxpY2Uoc3Vic2NyaXB0aW9uSWR4LCAxKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gc3Vic2NyaXB0aW9uLm91dGVyVmFsdWU7CiAgICAgICAgfQogICAgICAgIHRyeURlbGF5KGRlbGF5Tm90aWZpZXIsIHZhbHVlKSB7CiAgICAgICAgICAgIGNvbnN0IG5vdGlmaWVyU3Vic2NyaXB0aW9uID0gc3Vic2NyaWJlVG9SZXN1bHQodGhpcywgZGVsYXlOb3RpZmllciwgdmFsdWUpOwogICAgICAgICAgICBpZiAobm90aWZpZXJTdWJzY3JpcHRpb24gJiYgIW5vdGlmaWVyU3Vic2NyaXB0aW9uLmNsb3NlZCkgewogICAgICAgICAgICAgICAgY29uc3QgZGVzdGluYXRpb24gPSB0aGlzLmRlc3RpbmF0aW9uOwogICAgICAgICAgICAgICAgZGVzdGluYXRpb24uYWRkKG5vdGlmaWVyU3Vic2NyaXB0aW9uKTsKICAgICAgICAgICAgICAgIHRoaXMuZGVsYXlOb3RpZmllclN1YnNjcmlwdGlvbnMucHVzaChub3RpZmllclN1YnNjcmlwdGlvbik7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgdHJ5Q29tcGxldGUoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmNvbXBsZXRlZCAmJiB0aGlzLmRlbGF5Tm90aWZpZXJTdWJzY3JpcHRpb25zLmxlbmd0aCA9PT0gMCkgewogICAgICAgICAgICAgICAgdGhpcy5kZXN0aW5hdGlvbi5jb21wbGV0ZSgpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQogICAgY2xhc3MgU3Vic2NyaXB0aW9uRGVsYXlPYnNlcnZhYmxlIGV4dGVuZHMgT2JzZXJ2YWJsZSB7CiAgICAgICAgY29uc3RydWN0b3Ioc291cmNlLCBzdWJzY3JpcHRpb25EZWxheSkgewogICAgICAgICAgICBzdXBlcigpOwogICAgICAgICAgICB0aGlzLnNvdXJjZSA9IHNvdXJjZTsKICAgICAgICAgICAgdGhpcy5zdWJzY3JpcHRpb25EZWxheSA9IHN1YnNjcmlwdGlvbkRlbGF5OwogICAgICAgIH0KICAgICAgICBfc3Vic2NyaWJlKHN1YnNjcmliZXIpIHsKICAgICAgICAgICAgdGhpcy5zdWJzY3JpcHRpb25EZWxheS5zdWJzY3JpYmUobmV3IFN1YnNjcmlwdGlvbkRlbGF5U3Vic2NyaWJlcihzdWJzY3JpYmVyLCB0aGlzLnNvdXJjZSkpOwogICAgICAgIH0KICAgIH0KICAgIGNsYXNzIFN1YnNjcmlwdGlvbkRlbGF5U3Vic2NyaWJlciBleHRlbmRzIFN1YnNjcmliZXIgewogICAgICAgIGNvbnN0cnVjdG9yKHBhcmVudCwgc291cmNlKSB7CiAgICAgICAgICAgIHN1cGVyKCk7CiAgICAgICAgICAgIHRoaXMucGFyZW50ID0gcGFyZW50OwogICAgICAgICAgICB0aGlzLnNvdXJjZSA9IHNvdXJjZTsKICAgICAgICAgICAgdGhpcy5zb3VyY2VTdWJzY3JpYmVkID0gZmFsc2U7CiAgICAgICAgfQogICAgICAgIF9uZXh0KHVudXNlZCkgewogICAgICAgICAgICB0aGlzLnN1YnNjcmliZVRvU291cmNlKCk7CiAgICAgICAgfQogICAgICAgIF9lcnJvcihlcnIpIHsKICAgICAgICAgICAgdGhpcy51bnN1YnNjcmliZSgpOwogICAgICAgICAgICB0aGlzLnBhcmVudC5lcnJvcihlcnIpOwogICAgICAgIH0KICAgICAgICBfY29tcGxldGUoKSB7CiAgICAgICAgICAgIHRoaXMudW5zdWJzY3JpYmUoKTsKICAgICAgICAgICAgdGhpcy5zdWJzY3JpYmVUb1NvdXJjZSgpOwogICAgICAgIH0KICAgICAgICBzdWJzY3JpYmVUb1NvdXJjZSgpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLnNvdXJjZVN1YnNjcmliZWQpIHsKICAgICAgICAgICAgICAgIHRoaXMuc291cmNlU3Vic2NyaWJlZCA9IHRydWU7CiAgICAgICAgICAgICAgICB0aGlzLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgICAgICAgICB0aGlzLnNvdXJjZS5zdWJzY3JpYmUodGhpcy5wYXJlbnQpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQoKICAgIGZ1bmN0aW9uIGRlbWF0ZXJpYWxpemUoKSB7CiAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIGRlbWF0ZXJpYWxpemVPcGVyYXRvckZ1bmN0aW9uKHNvdXJjZSkgewogICAgICAgICAgICByZXR1cm4gc291cmNlLmxpZnQobmV3IERlTWF0ZXJpYWxpemVPcGVyYXRvcigpKTsKICAgICAgICB9OwogICAgfQogICAgY2xhc3MgRGVNYXRlcmlhbGl6ZU9wZXJhdG9yIHsKICAgICAgICBjYWxsKHN1YnNjcmliZXIsIHNvdXJjZSkgewogICAgICAgICAgICByZXR1cm4gc291cmNlLnN1YnNjcmliZShuZXcgRGVNYXRlcmlhbGl6ZVN1YnNjcmliZXIoc3Vic2NyaWJlcikpOwogICAgICAgIH0KICAgIH0KICAgIGNsYXNzIERlTWF0ZXJpYWxpemVTdWJzY3JpYmVyIGV4dGVuZHMgU3Vic2NyaWJlciB7CiAgICAgICAgY29uc3RydWN0b3IoZGVzdGluYXRpb24pIHsKICAgICAgICAgICAgc3VwZXIoZGVzdGluYXRpb24pOwogICAgICAgIH0KICAgICAgICBfbmV4dCh2YWx1ZSkgewogICAgICAgICAgICB2YWx1ZS5vYnNlcnZlKHRoaXMuZGVzdGluYXRpb24pOwogICAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiBkaXN0aW5jdFVudGlsQ2hhbmdlZChjb21wYXJlLCBrZXlTZWxlY3RvcikgewogICAgICAgIHJldHVybiAoc291cmNlKSA9PiBzb3VyY2UubGlmdChuZXcgRGlzdGluY3RVbnRpbENoYW5nZWRPcGVyYXRvcihjb21wYXJlLCBrZXlTZWxlY3RvcikpOwogICAgfQogICAgY2xhc3MgRGlzdGluY3RVbnRpbENoYW5nZWRPcGVyYXRvciB7CiAgICAgICAgY29uc3RydWN0b3IoY29tcGFyZSwga2V5U2VsZWN0b3IpIHsKICAgICAgICAgICAgdGhpcy5jb21wYXJlID0gY29tcGFyZTsKICAgICAgICAgICAgdGhpcy5rZXlTZWxlY3RvciA9IGtleVNlbGVjdG9yOwogICAgICAgIH0KICAgICAgICBjYWxsKHN1YnNjcmliZXIsIHNvdXJjZSkgewogICAgICAgICAgICByZXR1cm4gc291cmNlLnN1YnNjcmliZShuZXcgRGlzdGluY3RVbnRpbENoYW5nZWRTdWJzY3JpYmVyKHN1YnNjcmliZXIsIHRoaXMuY29tcGFyZSwgdGhpcy5rZXlTZWxlY3RvcikpOwogICAgICAgIH0KICAgIH0KICAgIGNsYXNzIERpc3RpbmN0VW50aWxDaGFuZ2VkU3Vic2NyaWJlciBleHRlbmRzIFN1YnNjcmliZXIgewogICAgICAgIGNvbnN0cnVjdG9yKGRlc3RpbmF0aW9uLCBjb21wYXJlLCBrZXlTZWxlY3RvcikgewogICAgICAgICAgICBzdXBlcihkZXN0aW5hdGlvbik7CiAgICAgICAgICAgIHRoaXMua2V5U2VsZWN0b3IgPSBrZXlTZWxlY3RvcjsKICAgICAgICAgICAgdGhpcy5oYXNLZXkgPSBmYWxzZTsKICAgICAgICAgICAgaWYgKHR5cGVvZiBjb21wYXJlID09PSAnZnVuY3Rpb24nKSB7CiAgICAgICAgICAgICAgICB0aGlzLmNvbXBhcmUgPSBjb21wYXJlOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGNvbXBhcmUoeCwgeSkgewogICAgICAgICAgICByZXR1cm4geCA9PT0geTsKICAgICAgICB9CiAgICAgICAgX25leHQodmFsdWUpIHsKICAgICAgICAgICAgbGV0IGtleTsKICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgIGNvbnN0IHsga2V5U2VsZWN0b3IgfSA9IHRoaXM7CiAgICAgICAgICAgICAgICBrZXkgPSBrZXlTZWxlY3RvciA/IGtleVNlbGVjdG9yKHZhbHVlKSA6IHZhbHVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNhdGNoIChlcnIpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmRlc3RpbmF0aW9uLmVycm9yKGVycik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgbGV0IHJlc3VsdCA9IGZhbHNlOwogICAgICAgICAgICBpZiAodGhpcy5oYXNLZXkpIHsKICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgY29uc3QgeyBjb21wYXJlIH0gPSB0aGlzOwogICAgICAgICAgICAgICAgICAgIHJlc3VsdCA9IGNvbXBhcmUodGhpcy5rZXksIGtleSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjYXRjaCAoZXJyKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuZGVzdGluYXRpb24uZXJyb3IoZXJyKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuaGFzS2V5ID0gdHJ1ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoIXJlc3VsdCkgewogICAgICAgICAgICAgICAgdGhpcy5rZXkgPSBrZXk7CiAgICAgICAgICAgICAgICB0aGlzLmRlc3RpbmF0aW9uLm5leHQodmFsdWUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQoKICAgIGZ1bmN0aW9uIHRocm93SWZFbXB0eShlcnJvckZhY3RvcnkgPSBkZWZhdWx0RXJyb3JGYWN0b3J5KSB7CiAgICAgICAgcmV0dXJuIChzb3VyY2UpID0+IHsKICAgICAgICAgICAgcmV0dXJuIHNvdXJjZS5saWZ0KG5ldyBUaHJvd0lmRW1wdHlPcGVyYXRvcihlcnJvckZhY3RvcnkpKTsKICAgICAgICB9OwogICAgfQogICAgY2xhc3MgVGhyb3dJZkVtcHR5T3BlcmF0b3IgewogICAgICAgIGNvbnN0cnVjdG9yKGVycm9yRmFjdG9yeSkgewogICAgICAgICAgICB0aGlzLmVycm9yRmFjdG9yeSA9IGVycm9yRmFjdG9yeTsKICAgICAgICB9CiAgICAgICAgY2FsbChzdWJzY3JpYmVyLCBzb3VyY2UpIHsKICAgICAgICAgICAgcmV0dXJuIHNvdXJjZS5zdWJzY3JpYmUobmV3IFRocm93SWZFbXB0eVN1YnNjcmliZXIoc3Vic2NyaWJlciwgdGhpcy5lcnJvckZhY3RvcnkpKTsKICAgICAgICB9CiAgICB9CiAgICBjbGFzcyBUaHJvd0lmRW1wdHlTdWJzY3JpYmVyIGV4dGVuZHMgU3Vic2NyaWJlciB7CiAgICAgICAgY29uc3RydWN0b3IoZGVzdGluYXRpb24sIGVycm9yRmFjdG9yeSkgewogICAgICAgICAgICBzdXBlcihkZXN0aW5hdGlvbik7CiAgICAgICAgICAgIHRoaXMuZXJyb3JGYWN0b3J5ID0gZXJyb3JGYWN0b3J5OwogICAgICAgICAgICB0aGlzLmhhc1ZhbHVlID0gZmFsc2U7CiAgICAgICAgfQogICAgICAgIF9uZXh0KHZhbHVlKSB7CiAgICAgICAgICAgIHRoaXMuaGFzVmFsdWUgPSB0cnVlOwogICAgICAgICAgICB0aGlzLmRlc3RpbmF0aW9uLm5leHQodmFsdWUpOwogICAgICAgIH0KICAgICAgICBfY29tcGxldGUoKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5oYXNWYWx1ZSkgewogICAgICAgICAgICAgICAgbGV0IGVycjsKICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgZXJyID0gdGhpcy5lcnJvckZhY3RvcnkoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGNhdGNoIChlKSB7CiAgICAgICAgICAgICAgICAgICAgZXJyID0gZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuZGVzdGluYXRpb24uZXJyb3IoZXJyKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmRlc3RpbmF0aW9uLmNvbXBsZXRlKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICBmdW5jdGlvbiBkZWZhdWx0RXJyb3JGYWN0b3J5KCkgewogICAgICAgIHJldHVybiBuZXcgRW1wdHlFcnJvcigpOwogICAgfQoKICAgIGZ1bmN0aW9uIHRha2UoY291bnQpIHsKICAgICAgICByZXR1cm4gKHNvdXJjZSkgPT4gewogICAgICAgICAgICBpZiAoY291bnQgPT09IDApIHsKICAgICAgICAgICAgICAgIHJldHVybiBFTVBUWTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHJldHVybiBzb3VyY2UubGlmdChuZXcgVGFrZU9wZXJhdG9yKGNvdW50KSk7CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgfQogICAgY2xhc3MgVGFrZU9wZXJhdG9yIHsKICAgICAgICBjb25zdHJ1Y3Rvcih0b3RhbCkgewogICAgICAgICAgICB0aGlzLnRvdGFsID0gdG90YWw7CiAgICAgICAgICAgIGlmICh0aGlzLnRvdGFsIDwgMCkgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEFyZ3VtZW50T3V0T2ZSYW5nZUVycm9yOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGNhbGwoc3Vic2NyaWJlciwgc291cmNlKSB7CiAgICAgICAgICAgIHJldHVybiBzb3VyY2Uuc3Vic2NyaWJlKG5ldyBUYWtlU3Vic2NyaWJlcihzdWJzY3JpYmVyLCB0aGlzLnRvdGFsKSk7CiAgICAgICAgfQogICAgfQogICAgY2xhc3MgVGFrZVN1YnNjcmliZXIgZXh0ZW5kcyBTdWJzY3JpYmVyIHsKICAgICAgICBjb25zdHJ1Y3RvcihkZXN0aW5hdGlvbiwgdG90YWwpIHsKICAgICAgICAgICAgc3VwZXIoZGVzdGluYXRpb24pOwogICAgICAgICAgICB0aGlzLnRvdGFsID0gdG90YWw7CiAgICAgICAgICAgIHRoaXMuY291bnQgPSAwOwogICAgICAgIH0KICAgICAgICBfbmV4dCh2YWx1ZSkgewogICAgICAgICAgICBjb25zdCB0b3RhbCA9IHRoaXMudG90YWw7CiAgICAgICAgICAgIGNvbnN0IGNvdW50ID0gKyt0aGlzLmNvdW50OwogICAgICAgICAgICBpZiAoY291bnQgPD0gdG90YWwpIHsKICAgICAgICAgICAgICAgIHRoaXMuZGVzdGluYXRpb24ubmV4dCh2YWx1ZSk7CiAgICAgICAgICAgICAgICBpZiAoY291bnQgPT09IHRvdGFsKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5kZXN0aW5hdGlvbi5jb21wbGV0ZSgpOwogICAgICAgICAgICAgICAgICAgIHRoaXMudW5zdWJzY3JpYmUoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiBleGhhdXN0TWFwKHByb2plY3QsIHJlc3VsdFNlbGVjdG9yKSB7CiAgICAgICAgaWYgKHJlc3VsdFNlbGVjdG9yKSB7CiAgICAgICAgICAgIHJldHVybiAoc291cmNlKSA9PiBzb3VyY2UucGlwZShleGhhdXN0TWFwKChhLCBpKSA9PiBmcm9tKHByb2plY3QoYSwgaSkpLnBpcGUobWFwKChiLCBpaSkgPT4gcmVzdWx0U2VsZWN0b3IoYSwgYiwgaSwgaWkpKSkpKTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIChzb3VyY2UpID0+IHNvdXJjZS5saWZ0KG5ldyBFeGhhdXN0TWFwT3BlcmF0b3IocHJvamVjdCkpOwogICAgfQogICAgY2xhc3MgRXhoYXVzdE1hcE9wZXJhdG9yIHsKICAgICAgICBjb25zdHJ1Y3Rvcihwcm9qZWN0KSB7CiAgICAgICAgICAgIHRoaXMucHJvamVjdCA9IHByb2plY3Q7CiAgICAgICAgfQogICAgICAgIGNhbGwoc3Vic2NyaWJlciwgc291cmNlKSB7CiAgICAgICAgICAgIHJldHVybiBzb3VyY2Uuc3Vic2NyaWJlKG5ldyBFeGhhdXN0TWFwU3Vic2NyaWJlcihzdWJzY3JpYmVyLCB0aGlzLnByb2plY3QpKTsKICAgICAgICB9CiAgICB9CiAgICBjbGFzcyBFeGhhdXN0TWFwU3Vic2NyaWJlciBleHRlbmRzIE91dGVyU3Vic2NyaWJlciB7CiAgICAgICAgY29uc3RydWN0b3IoZGVzdGluYXRpb24sIHByb2plY3QpIHsKICAgICAgICAgICAgc3VwZXIoZGVzdGluYXRpb24pOwogICAgICAgICAgICB0aGlzLnByb2plY3QgPSBwcm9qZWN0OwogICAgICAgICAgICB0aGlzLmhhc1N1YnNjcmlwdGlvbiA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLmhhc0NvbXBsZXRlZCA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLmluZGV4ID0gMDsKICAgICAgICB9CiAgICAgICAgX25leHQodmFsdWUpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLmhhc1N1YnNjcmlwdGlvbikgewogICAgICAgICAgICAgICAgdGhpcy50cnlOZXh0KHZhbHVlKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICB0cnlOZXh0KHZhbHVlKSB7CiAgICAgICAgICAgIGxldCByZXN1bHQ7CiAgICAgICAgICAgIGNvbnN0IGluZGV4ID0gdGhpcy5pbmRleCsrOwogICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgcmVzdWx0ID0gdGhpcy5wcm9qZWN0KHZhbHVlLCBpbmRleCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY2F0Y2ggKGVycikgewogICAgICAgICAgICAgICAgdGhpcy5kZXN0aW5hdGlvbi5lcnJvcihlcnIpOwogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuaGFzU3Vic2NyaXB0aW9uID0gdHJ1ZTsKICAgICAgICAgICAgdGhpcy5faW5uZXJTdWIocmVzdWx0LCB2YWx1ZSwgaW5kZXgpOwogICAgICAgIH0KICAgICAgICBfaW5uZXJTdWIocmVzdWx0LCB2YWx1ZSwgaW5kZXgpIHsKICAgICAgICAgICAgY29uc3QgaW5uZXJTdWJzY3JpYmVyID0gbmV3IElubmVyU3Vic2NyaWJlcih0aGlzLCB2YWx1ZSwgaW5kZXgpOwogICAgICAgICAgICBjb25zdCBkZXN0aW5hdGlvbiA9IHRoaXMuZGVzdGluYXRpb247CiAgICAgICAgICAgIGRlc3RpbmF0aW9uLmFkZChpbm5lclN1YnNjcmliZXIpOwogICAgICAgICAgICBjb25zdCBpbm5lclN1YnNjcmlwdGlvbiA9IHN1YnNjcmliZVRvUmVzdWx0KHRoaXMsIHJlc3VsdCwgdW5kZWZpbmVkLCB1bmRlZmluZWQsIGlubmVyU3Vic2NyaWJlcik7CiAgICAgICAgICAgIGlmIChpbm5lclN1YnNjcmlwdGlvbiAhPT0gaW5uZXJTdWJzY3JpYmVyKSB7CiAgICAgICAgICAgICAgICBkZXN0aW5hdGlvbi5hZGQoaW5uZXJTdWJzY3JpcHRpb24pOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIF9jb21wbGV0ZSgpIHsKICAgICAgICAgICAgdGhpcy5oYXNDb21wbGV0ZWQgPSB0cnVlOwogICAgICAgICAgICBpZiAoIXRoaXMuaGFzU3Vic2NyaXB0aW9uKSB7CiAgICAgICAgICAgICAgICB0aGlzLmRlc3RpbmF0aW9uLmNvbXBsZXRlKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy51bnN1YnNjcmliZSgpOwogICAgICAgIH0KICAgICAgICBub3RpZnlOZXh0KG91dGVyVmFsdWUsIGlubmVyVmFsdWUsIG91dGVySW5kZXgsIGlubmVySW5kZXgsIGlubmVyU3ViKSB7CiAgICAgICAgICAgIHRoaXMuZGVzdGluYXRpb24ubmV4dChpbm5lclZhbHVlKTsKICAgICAgICB9CiAgICAgICAgbm90aWZ5RXJyb3IoZXJyKSB7CiAgICAgICAgICAgIHRoaXMuZGVzdGluYXRpb24uZXJyb3IoZXJyKTsKICAgICAgICB9CiAgICAgICAgbm90aWZ5Q29tcGxldGUoaW5uZXJTdWIpIHsKICAgICAgICAgICAgY29uc3QgZGVzdGluYXRpb24gPSB0aGlzLmRlc3RpbmF0aW9uOwogICAgICAgICAgICBkZXN0aW5hdGlvbi5yZW1vdmUoaW5uZXJTdWIpOwogICAgICAgICAgICB0aGlzLmhhc1N1YnNjcmlwdGlvbiA9IGZhbHNlOwogICAgICAgICAgICBpZiAodGhpcy5oYXNDb21wbGV0ZWQpIHsKICAgICAgICAgICAgICAgIHRoaXMuZGVzdGluYXRpb24uY29tcGxldGUoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiBmaW5hbGl6ZShjYWxsYmFjaykgewogICAgICAgIHJldHVybiAoc291cmNlKSA9PiBzb3VyY2UubGlmdChuZXcgRmluYWxseU9wZXJhdG9yKGNhbGxiYWNrKSk7CiAgICB9CiAgICBjbGFzcyBGaW5hbGx5T3BlcmF0b3IgewogICAgICAgIGNvbnN0cnVjdG9yKGNhbGxiYWNrKSB7CiAgICAgICAgICAgIHRoaXMuY2FsbGJhY2sgPSBjYWxsYmFjazsKICAgICAgICB9CiAgICAgICAgY2FsbChzdWJzY3JpYmVyLCBzb3VyY2UpIHsKICAgICAgICAgICAgcmV0dXJuIHNvdXJjZS5zdWJzY3JpYmUobmV3IEZpbmFsbHlTdWJzY3JpYmVyKHN1YnNjcmliZXIsIHRoaXMuY2FsbGJhY2spKTsKICAgICAgICB9CiAgICB9CiAgICBjbGFzcyBGaW5hbGx5U3Vic2NyaWJlciBleHRlbmRzIFN1YnNjcmliZXIgewogICAgICAgIGNvbnN0cnVjdG9yKGRlc3RpbmF0aW9uLCBjYWxsYmFjaykgewogICAgICAgICAgICBzdXBlcihkZXN0aW5hdGlvbik7CiAgICAgICAgICAgIHRoaXMuYWRkKG5ldyBTdWJzY3JpcHRpb24oY2FsbGJhY2spKTsKICAgICAgICB9CiAgICB9CgogICAgZnVuY3Rpb24gaWdub3JlRWxlbWVudHMoKSB7CiAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIGlnbm9yZUVsZW1lbnRzT3BlcmF0b3JGdW5jdGlvbihzb3VyY2UpIHsKICAgICAgICAgICAgcmV0dXJuIHNvdXJjZS5saWZ0KG5ldyBJZ25vcmVFbGVtZW50c09wZXJhdG9yKCkpOwogICAgICAgIH07CiAgICB9CiAgICBjbGFzcyBJZ25vcmVFbGVtZW50c09wZXJhdG9yIHsKICAgICAgICBjYWxsKHN1YnNjcmliZXIsIHNvdXJjZSkgewogICAgICAgICAgICByZXR1cm4gc291cmNlLnN1YnNjcmliZShuZXcgSWdub3JlRWxlbWVudHNTdWJzY3JpYmVyKHN1YnNjcmliZXIpKTsKICAgICAgICB9CiAgICB9CiAgICBjbGFzcyBJZ25vcmVFbGVtZW50c1N1YnNjcmliZXIgZXh0ZW5kcyBTdWJzY3JpYmVyIHsKICAgICAgICBfbmV4dCh1bnVzZWQpIHsKICAgICAgICB9CiAgICB9CgogICAgZnVuY3Rpb24gdGFrZUxhc3QoY291bnQpIHsKICAgICAgICByZXR1cm4gZnVuY3Rpb24gdGFrZUxhc3RPcGVyYXRvckZ1bmN0aW9uKHNvdXJjZSkgewogICAgICAgICAgICBpZiAoY291bnQgPT09IDApIHsKICAgICAgICAgICAgICAgIHJldHVybiBFTVBUWTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHJldHVybiBzb3VyY2UubGlmdChuZXcgVGFrZUxhc3RPcGVyYXRvcihjb3VudCkpOwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgIH0KICAgIGNsYXNzIFRha2VMYXN0T3BlcmF0b3IgewogICAgICAgIGNvbnN0cnVjdG9yKHRvdGFsKSB7CiAgICAgICAgICAgIHRoaXMudG90YWwgPSB0b3RhbDsKICAgICAgICAgICAgaWYgKHRoaXMudG90YWwgPCAwKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgQXJndW1lbnRPdXRPZlJhbmdlRXJyb3I7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgY2FsbChzdWJzY3JpYmVyLCBzb3VyY2UpIHsKICAgICAgICAgICAgcmV0dXJuIHNvdXJjZS5zdWJzY3JpYmUobmV3IFRha2VMYXN0U3Vic2NyaWJlcihzdWJzY3JpYmVyLCB0aGlzLnRvdGFsKSk7CiAgICAgICAgfQogICAgfQogICAgY2xhc3MgVGFrZUxhc3RTdWJzY3JpYmVyIGV4dGVuZHMgU3Vic2NyaWJlciB7CiAgICAgICAgY29uc3RydWN0b3IoZGVzdGluYXRpb24sIHRvdGFsKSB7CiAgICAgICAgICAgIHN1cGVyKGRlc3RpbmF0aW9uKTsKICAgICAgICAgICAgdGhpcy50b3RhbCA9IHRvdGFsOwogICAgICAgICAgICB0aGlzLnJpbmcgPSBuZXcgQXJyYXkoKTsKICAgICAgICAgICAgdGhpcy5jb3VudCA9IDA7CiAgICAgICAgfQogICAgICAgIF9uZXh0KHZhbHVlKSB7CiAgICAgICAgICAgIGNvbnN0IHJpbmcgPSB0aGlzLnJpbmc7CiAgICAgICAgICAgIGNvbnN0IHRvdGFsID0gdGhpcy50b3RhbDsKICAgICAgICAgICAgY29uc3QgY291bnQgPSB0aGlzLmNvdW50Kys7CiAgICAgICAgICAgIGlmIChyaW5nLmxlbmd0aCA8IHRvdGFsKSB7CiAgICAgICAgICAgICAgICByaW5nLnB1c2godmFsdWUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgY29uc3QgaW5kZXggPSBjb3VudCAlIHRvdGFsOwogICAgICAgICAgICAgICAgcmluZ1tpbmRleF0gPSB2YWx1ZTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBfY29tcGxldGUoKSB7CiAgICAgICAgICAgIGNvbnN0IGRlc3RpbmF0aW9uID0gdGhpcy5kZXN0aW5hdGlvbjsKICAgICAgICAgICAgbGV0IGNvdW50ID0gdGhpcy5jb3VudDsKICAgICAgICAgICAgaWYgKGNvdW50ID4gMCkgewogICAgICAgICAgICAgICAgY29uc3QgdG90YWwgPSB0aGlzLmNvdW50ID49IHRoaXMudG90YWwgPyB0aGlzLnRvdGFsIDogdGhpcy5jb3VudDsKICAgICAgICAgICAgICAgIGNvbnN0IHJpbmcgPSB0aGlzLnJpbmc7CiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHRvdGFsOyBpKyspIHsKICAgICAgICAgICAgICAgICAgICBjb25zdCBpZHggPSAoY291bnQrKykgJSB0b3RhbDsKICAgICAgICAgICAgICAgICAgICBkZXN0aW5hdGlvbi5uZXh0KHJpbmdbaWR4XSk7CiAgICAgICAgICAgICAg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IH0KICAgICAgICBfbmV4dCh2YWx1ZSkgewogICAgICAgICAgICB0aGlzLmRlc3RpbmF0aW9uLm5leHQoTm90aWZpY2F0aW9uLmNyZWF0ZU5leHQodmFsdWUpKTsKICAgICAgICB9CiAgICAgICAgX2Vycm9yKGVycikgewogICAgICAgICAgICBjb25zdCBkZXN0aW5hdGlvbiA9IHRoaXMuZGVzdGluYXRpb247CiAgICAgICAgICAgIGRlc3RpbmF0aW9uLm5leHQoTm90aWZpY2F0aW9uLmNyZWF0ZUVycm9yKGVycikpOwogICAgICAgICAgICBkZXN0aW5hdGlvbi5jb21wbGV0ZSgpOwogICAgICAgIH0KICAgICAgICBfY29tcGxldGUoKSB7CiAgICAgICAgICAgIGNvbnN0IGRlc3RpbmF0aW9uID0gdGhpcy5kZXN0aW5hdGlvbjsKICAgICAgICAgICAgZGVzdGluYXRpb24ubmV4dChOb3RpZmljYXRpb24uY3JlYXRlQ29tcGxldGUoKSk7CiAgICAgICAgICAgIGRlc3RpbmF0aW9uLmNvbXBsZXRlKCk7CiAgICAgICAgfQogICAgfQoKICAgIGZ1bmN0aW9uIHNjYW4oYWNjdW11bGF0b3IsIHNlZWQpIHsKICAgICAgICBsZXQgaGFzU2VlZCA9IGZhbHNlOwogICAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoID49IDIpIHsKICAgICAgICAgICAgaGFzU2VlZCA9IHRydWU7CiAgICAgICAgfQogICAgICAgIHJldHVybiBmdW5jdGlvbiBzY2FuT3BlcmF0b3JGdW5jdGlvbihzb3VyY2UpIHsKICAgICAgICAgICAgcmV0dXJuIHNvdXJjZS5saWZ0KG5ldyBTY2FuT3BlcmF0b3IoYWNjdW11bGF0b3IsIHNlZWQsIGhhc1NlZWQpKTsKICAgICAgICB9OwogICAgfQogICAgY2xhc3MgU2Nhbk9wZXJhdG9yIHsKICAgICAgICBjb25zdHJ1Y3RvcihhY2N1bXVsYXRvciwgc2VlZCwgaGFzU2VlZCA9IGZhbHNlKSB7CiAgICAgIC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b25zdCBpbmRleCA9IHRoaXMuaW5kZXgrKzsKICAgICAgICAgICAgICAgIGxldCByZXN1bHQ7CiAgICAgICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgICAgIHJlc3VsdCA9IHRoaXMuYWNjdW11bGF0b3IodGhpcy5fc3RhdGUsIHZhbHVlLCBpbmRleCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjYXRjaCAoZXJyKSB7CiAgICAgICAgICAgICAgICAgICAgZGVzdGluYXRpb24uZXJyb3IoZXJyKTsKICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLl9zdGF0ZSA9IHJlc3VsdDsKICAgICAgICAgICAgICAgIGRlc3RpbmF0aW9uLm5leHQocmVzdWx0KTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiBtdWx0aWNhc3Qoc3ViamVjdE9yU3ViamVjdEZhY3RvcnksIHNlbGVjdG9yKSB7CiAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIG11bHRpY2FzdE9wZXJhdG9yRnVuY3Rpb24oc291cmNlKSB7CiAgICAgICAgICAgIGxldCBzdWJqZWN0RmFjdG9yeTsKICAgICAgICAgICAgaWYgKHR5cGVvZiBzdWJqZWN0T3JTdWJqZWN0RmFjdG9yeSA9PT0gJ2Z1bmN0aW9uJykgewogICAgICAgICAgICAgICAgc3ViamVjdEZhY3RvcnkgPSBzdWJqZWN0T3JTdWJqZWN0RmFjdG9yeTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHN1YmplY3RGYWN0b3J5ID0gZnVuY3Rpb24gc3ViamVjdEZhY3RvcnkoKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHN1YmplY3RPclN1YmplY3RGYWN0b3J5OwogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodHlwZW9mIHNlbGVjdG9yID09PSAnZnVuY3Rpb24nKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gc291cmNlLmxpZnQobmV3IE11bHRpY2FzdE9wZXJhdG9yKHN1YmplY3RGYWN0b3J5LCBzZWxlY3RvcikpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNvbnN0IGNvbm5lY3RhYmxlID0gT2JqZWN0LmNyZWF0ZShzb3VyY2UsIGNvbm5lY3RhYmxlT2JzZXJ2YWJsZURlc2NyaXB0b3IpOwogICAgICAgICAgICBjb25uZWN0YWJsZS5zb3VyY2UgPSBzb3VyY2U7CiAgICAgICAgICAgIGNvbm5lY3RhYmxlLnN1YmplY3RGYWN0b3J5ID0gc3ViamVjdEZhY3Rvcnk7CiAgICAgICAgICAgIHJldHVybiBjb25uZWN0YWJsZTsKICAgICAgICB9OwogICAgfQogICAgY2xhc3MgTXVsdGljYXN0T3BlcmF0b3IgewogICAgICAgIGNvbnN0cnVjdG9yKHN1YmplY3RGYWN0b3J5LCBzZWxlY3RvcikgewogICAgICAgICAgICB0aGlzLnN1YmplY3RGYWN0b3J5ID0gc3ViamVjdEZhY3Rvcnk7CiAgICAgICAgICAgIHRoaXMuc2VsZWN0b3IgPSBzZWxlY3RvcjsKICAgICAgICB9CiAgICAgICAgY2FsbChzdWJzY3JpYmVyLCBzb3VyY2UpIHsKICAgICAgICAgICAgY29uc3QgeyBzZWxlY3RvciB9ID0gdGhpczsKICAgICAgICAgICAgY29uc3Qgc3ViamVjdCA9IHRoaXMuc3ViamVjdEZhY3RvcnkoKTsKICAgICAgICAgICAgY29uc3Qgc3Vic2NyaXB0aW9uID0gc2VsZWN0b3Ioc3ViamVjdCkuc3Vic2NyaWJlKHN1YnNjcmliZXIpOwogICAgICAgICAgICBzdWJzY3JpcHRpb24uYWRkKHNvdXJjZS5zdWJzY3JpYmUoc3ViamVjdCkpOwogICAgICAgICAgICByZXR1cm4gc3Vic2NyaXB0aW9uOwogICAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiBwYWlyd2lzZSgpIHsKICAgICAgICByZXR1cm4gKHNvdXJjZSkgPT4gc291cmNlLmxpZnQobmV3IFBhaXJ3aXNlT3BlcmF0b3IoKSk7CiAgICB9CiAgICBjbGFzcyBQYWlyd2lzZU9wZXJhdG9yIHsKICAgICAgICBjYWxsKHN1YnNjcmliZXIsIHNvdXJjZSkgewogICAgICAgICAgICByZXR1cm4gc291cmNlLnN1YnNjcmliZShuZXcgUGFpcndpc2VTdWJzY3JpYmVyKHN1YnNjcmliZXIpKTsKICAgICAgICB9CiAgICB9CiAgICBjbGFzcyBQYWlyd2lzZVN1YnNjcmliZXIgZXh0ZW5kcyBTdWJzY3JpYmVyIHsKICAgICAgICBjb25zdHJ1Y3RvcihkZXN0aW5hdGlvbikgewogICAgICAgICAgICBzdXBlcihkZXN0aW5hdGlvbik7CiAgICAgICAgICAgIHRoaXMuaGFzUHJldiA9IGZhbHNlOwogICAgICAgIH0KICAgICAgICBfbmV4dCh2YWx1ZSkgewogICAgICAgICAgICBsZXQgcGFpcjsKICAgICAgICAgICAgaWYgKHRoaXMuaGFzUHJldikgewogICAgICAgICAgICAgICAgcGFpciA9IFt0aGlzLnByZXYsIHZhbHVlXTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuaGFzUHJldiA9IHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5wcmV2ID0gdmFsdWU7CiAgICAgICAgICAgIGlmIChwYWlyKSB7CiAgICAgICAgICAgICAgICB0aGlzLmRlc3RpbmF0aW9uLm5leHQocGFpcik7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CgogICAgZnVuY3Rpb24gcGx1Y2soLi4ucHJvcGVydGllcykgewogICAgICAgIGNvbnN0IGxlbmd0aCA9IHByb3BlcnRpZXMubGVuZ3RoOwogICAgICAgIGlmIChsZW5ndGggPT09IDApIHsKICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdsaXN0IG9mIHByb3BlcnRpZXMgY2Fubm90IGJlIGVtcHR5LicpOwogICAgICAgIH0KICAgICAgICByZXR1cm4gbWFwKCh4KSA9PiB7CiAgICAgICAgICAgIGxldCBjdXJyZW50UHJvcCA9IHg7CiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIGNvbnN0IHAgPSBjdXJyZW50UHJvcFtwcm9wZXJ0aWVzW2ldXTsKICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgcCAhPT0gJ3VuZGVmaW5lZCcpIHsKICAgICAgICAgICAgICAgICAgICBjdXJyZW50UHJvcCA9IHA7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBjdXJyZW50UHJvcDsKICAgICAgICB9KTsKICAgIH0KCiAgICBmdW5jdGlvbiByZXBlYXRXaGVuKG5vdGlmaWVyKSB7CiAgICAgICAgcmV0dXJuIChzb3VyY2UpID0+IHNvdXJjZS5saWZ0KG5ldyBSZXBlYXRXaGVuT3BlcmF0b3Iobm90aWZpZXIpKTsKICAgIH0KICAgIGNsYXNzIFJlcGVhdFdoZW5PcGVyYXRvciB7CiAgICAgICAgY29uc3RydWN0b3Iobm90aWZpZXIpIHsKICAgICAgICAgICAgdGhpcy5ub3RpZmllciA9IG5vdGlmaWVyOwogICAgICAgIH0KICAgICAgICBjYWxsKHN1YnNjcmliZXIsIHNvdXJjZSkgewogICAgICAgICAgICByZXR1cm4gc291cmNlLnN1YnNjcmliZShuZXcgUmVwZWF0V2hlblN1YnNjcmliZXIoc3Vic2NyaWJlciwgdGhpcy5ub3RpZmllciwgc291cmNlKSk7CiAgICAgICAgfQogICAgfQogICAgY2xhc3MgUmVwZWF0V2hlblN1YnNjcmliZXIgZXh0ZW5kcyBPdXRlclN1YnNjcmliZXIgewogICAgICAgIGNvbnN0cnVjdG9yKGRlc3RpbmF0aW9uLCBub3RpZmllciwgc291cmNlKSB7CiAgICAgICAgICAgIHN1cGVyKGRlc3RpbmF0aW9uKTsKICAgICAgICAgICAgdGhpcy5ub3RpZmllciA9IG5vdGlmaWVyOwogICAgICAgICAgICB0aGlzLnNvdXJjZSA9IHNvdXJjZTsKICAgICAgICAgICAgdGhpcy5ub3RpZmljYXRpb25zID0gbnVsbDsKICAgICAgICAgICAgdGhpcy5yZXRyaWVzID0gbnVsbDsKICAgICAgICAgICAgdGhpcy5yZXRyaWVzU3Vic2NyaXB0aW9uID0gbnVsbDsKICAgICAgICAgICAgdGhpcy5zb3VyY2VJc0JlaW5nU3Vic2NyaWJlZFRvID0gdHJ1ZTsKICAgICAgICB9CiAgICAgICAgbm90aWZ5TmV4dChvdXRlclZhbHVlLCBpbm5lclZhbHVlLCBvdXRlckluZGV4LCBpbm5lckluZGV4LCBpbm5lclN1YikgewogICAgICAgICAgICB0aGlzLnNvdXJjZUlzQmVpbmdTdWJzY3JpYmVkVG8gPSB0cnVlOwogICAgICAgICAgICB0aGlzLnNvdXJjZS5zdWJzY3JpYmUodGhpcyk7CiAgICAgICAgfQogICAgICAgIG5vdGlmeUNvbXBsZXRlKGlubmVyU3ViKSB7CiAgICAgICAgICAgIGlmICh0aGlzLnNvdXJjZUlzQmVpbmdTdWJzY3JpYmVkVG8gPT09IGZhbHNlKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gc3VwZXIuY29tcGxldGUoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBjb21wbGV0ZSgpIHsKICAgICAgICAgICAgdGhpcy5zb3VyY2VJc0JlaW5nU3Vic2NyaWJlZFRvID0gZmFsc2U7CiAgICAgICAgICAgIGlmICghdGhpcy5pc1N0b3BwZWQpIHsKICAgICAgICAgICAgICAgIGlmICghdGhpcy5yZXRyaWVzKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5zdWJzY3JpYmVUb1JldHJpZXMoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmICghdGhpcy5yZXRyaWVzU3Vic2NyaXB0aW9uIHx8IHRoaXMucmV0cmllc1N1YnNjcmlwdGlvbi5jbG9zZWQpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gc3VwZXIuY29tcGxldGUoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuX3Vuc3Vic2NyaWJlQW5kUmVjeWNsZSgpOwogICAgICAgICAgICAgICAgdGhpcy5ub3RpZmljYXRpb25zLm5leHQoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBfdW5zdWJzY3JpYmUoKSB7CiAgICAgICAgICAgIGNvbnN0IHsgbm90aWZpY2F0aW9ucywgcmV0cmllc1N1YnNjcmlwdGlvbiB9ID0gdGhpczsKICAgICAgICAgICAgaWYgKG5vdGlmaWNhdGlvbnMpIHsKICAgICAgICAgICAgICAgIG5vdGlmaWNhdGlvbnMudW5zdWJzY3JpYmUoKTsKICAgICAgICAgICAgICAgIHRoaXMubm90aWZpY2F0aW9ucyA9IG51bGw7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHJldHJpZXNTdWJzY3JpcHRpb24pIHsKICAgICAgICAgICAgICAgIHJldHJpZXNTdWJzY3JpcHRpb24udW5zdWJzY3JpYmUoKTsKICAgICAgICAgICAgICAgIHRoaXMucmV0cmllc1N1YnNjcmlwdGlvbiA9IG51bGw7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5yZXRyaWVzID0gbnVsbDsKICAgICAgICB9CiAgICAgICAgX3Vuc3Vic2NyaWJlQW5kUmVjeWNsZSgpIHsKICAgICAgICAgICAgY29uc3QgeyBfdW5zdWJzY3JpYmUgfSA9IHRoaXM7CiAgICAgICAgICAgIHRoaXMuX3Vuc3Vic2NyaWJlID0gbnVsbDsKICAgICAgICAgICAgc3VwZXIuX3Vuc3Vic2NyaWJlQW5kUmVjeWNsZSgpOwogICAgICAgICAgICB0aGlzLl91bnN1YnNjcmliZSA9IF91bnN1YnNjcmliZTsKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfQogICAgICAgIHN1YnNjcmliZVRvUmV0cmllcygpIHsKICAgICAgICAgICAgdGhpcy5ub3RpZmljYXRpb25zID0gbmV3IFN1YmplY3QoKTsKICAgICAgICAgICAgbGV0IHJldHJpZXM7CiAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICBjb25zdCB7IG5vdGlmaWVyIH0gPSB0aGlzOwogICAgICAgICAgICAgICAgcmV0cmllcyA9IG5vdGlmaWVyKHRoaXMubm90aWZpY2F0aW9ucyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY2F0Y2ggKGUpIHsKICAgICAgICAgICAgICAgIHJldHVybiBzdXBlci5jb21wbGV0ZSgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMucmV0cmllcyA9IHJldHJpZXM7CiAgICAgICAgICAgIHRoaXMucmV0cmllc1N1YnNjcmlwdGlvbiA9IHN1YnNjcmliZVRvUmVzdWx0KHRoaXMsIHJldHJpZXMpOwogICAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiBzaGFyZVN1YmplY3RGYWN0b3J5KCkgewogICAgICAgIHJldHVybiBuZXcgU3ViamVjdCgpOwogICAgfQogICAgZnVuY3Rpb24gc2hhcmUoKSB7CiAgICAgICAgcmV0dXJuIChzb3VyY2UpID0+IHJlZkNvdW50KCkobXVsdGljYXN0KHNoYXJlU3ViamVjdEZhY3RvcnkpKHNvdXJjZSkpOwogICAgfQoKICAgIGZ1bmN0aW9uIHNoYXJlUmVwbGF5KGNvbmZpZ09yQnVmZmVyU2l6ZSwgd2luZG93VGltZSwgc2NoZWR1bGVyKSB7CiAgICAgICAgbGV0IGNvbmZpZzsKICAgICAgICBpZiAoY29uZmlnT3JCdWZmZXJTaXplICYmIHR5cGVvZiBjb25maWdPckJ1ZmZlclNpemUgPT09ICdvYmplY3QnKSB7CiAgICAgICAgICAgIGNvbmZpZyA9IGNvbmZpZ09yQnVmZmVyU2l6ZTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIGNvbmZpZyA9IHsKICAgICAgICAgICAgICAgIGJ1ZmZlclNpemU6IGNvbmZpZ09yQnVmZmVyU2l6ZSwKICAgICAgICAgICAgICAgIHdpbmRvd1RpbWUsCiAgICAgICAgICAgICAgICByZWZDb3VudDogZmFsc2UsCiAgICAgICAgICAgICAgICBzY2hlZHVsZXIKICAgICAgICAgICAgfTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIChzb3VyY2UpID0+IHNvdXJjZS5saWZ0KHNoYXJlUmVwbGF5T3BlcmF0b3IoY29uZmlnKSk7CiAgICB9CiAgICBmdW5jdGlvbiBzaGFyZVJlcGxheU9wZXJhdG9yKHsgYnVmZmVyU2l6ZSA9IE51bWJlci5QT1NJVElWRV9JTkZJTklUWSwgd2luZG93VGltZSA9IE51bWJlci5QT1NJVElWRV9JTkZJTklUWSwgcmVmQ291bnQ6IHVzZVJlZkNvdW50LCBzY2hlZHVsZXIgfSkgewogICAgICAgIGxldCBzdWJqZWN0OwogICAgICAgIGxldCByZWZDb3VudCA9IDA7CiAgICAgICAgbGV0IHN1YnNjcmlwdGlvbjsKICAgICAgICBsZXQgaGFzRXJyb3IgPSBmYWxzZTsKICAgICAgICBsZXQgaXNDb21wbGV0ZSA9IGZhbHNlOwogICAgICAgIHJldHVybiBmdW5jdGlvbiBzaGFyZVJlcGxheU9wZXJhdGlvbihzb3VyY2UpIHsKICAgICAgICAgICAgcmVmQ291bnQrKzsKICAgICAgICAgICAgaWYgKCFzdWJqZWN0IHx8IGhhc0Vycm9yKSB7CiAgICAgICAgICAgICAgICBoYXNFcnJvciA9IGZhbHNlOwogICAgICAgICAgICAgICAgc3ViamVjdCA9IG5ldyBSZXBsYXlTdWJqZWN0KGJ1ZmZlclNpemUsIHdpbmRvd1RpbWUsIHNjaGVkdWxlcik7CiAgICAgICAgICAgICAgICBzdWJzY3JpcHRpb24gPSBzb3VyY2Uuc3Vic2NyaWJlKHsKICAgICAgICAgICAgICAgICAgICBuZXh0KHZhbHVlKSB7IHN1YmplY3QubmV4dCh2YWx1ZSk7IH0sCiAgICAgICAgICAgICAgICAgICAgZXJyb3IoZXJyKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGhhc0Vycm9yID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICAgICAgc3ViamVjdC5lcnJvcihlcnIpOwogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgY29tcGxldGUoKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlzQ29tcGxldGUgPSB0cnVlOwogICAgICAgICAgICAgICAgICAgICAgICBzdWJzY3JpcHRpb24gPSB1bmRlZmluZWQ7CiAgICAgICAgICAgICAgICAgICAgICAgIHN1YmplY3QuY29tcGxldGUoKTsKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY29uc3QgaW5uZXJTdWIgPSBzdWJqZWN0LnN1YnNjcmliZSh0aGlzKTsKICAgICAgICAgICAgdGhpcy5hZGQoKCkgPT4gewogICAgICAgICAgICAgICAgcmVmQ291bnQtLTsKICAgICAgICAgICAgICAgIGlubmVyU3ViLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgICAgICAgICBpZiAoc3Vic2NyaXB0aW9uICYmICFpc0NvbXBsZXRlICYmIHVzZVJlZkNvdW50ICYmIHJlZkNvdW50ID09PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgc3Vic2NyaXB0aW9uLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgICAgICAgICAgICAgc3Vic2NyaXB0aW9uID0gdW5kZWZpbmVkOwogICAgICAgICAgICAgICAgICAgIHN1YmplY3QgPSB1bmRlZmluZWQ7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gc2tpcChjb3VudCkgewogICAgICAgIHJldHVybiAoc291cmNlKSA9PiBzb3VyY2UubGlmdChuZXcgU2tpcE9wZXJhdG9yKGNvdW50KSk7CiAgICB9CiAgICBjbGFzcyBTa2lwT3BlcmF0b3IgewogICAgICAgIGNvbnN0cnVjdG9yKHRvdGFsKSB7CiAgICAgICAgICAgIHRoaXMudG90YWwgPSB0b3RhbDsKICAgICAgICB9CiAgICAgICAgY2FsbChzdWJzY3JpYmVyLCBzb3VyY2UpIHsKICAgICAgICAgICAgcmV0dXJuIHNvdXJjZS5zdWJzY3JpYmUobmV3IFNraXBTdWJzY3JpYmVyKHN1YnNjcmliZXIsIHRoaXMudG90YWwpKTsKICAgICAgICB9CiAgICB9CiAgICBjbGFzcyBTa2lwU3Vic2NyaWJlciBleHRlbmRzIFN1YnNjcmliZXIgewogICAgICAgIGNvbnN0cnVjdG9yKGRlc3RpbmF0aW9uLCB0b3RhbCkgewogICAgICAgICAgICBzdXBlcihkZXN0aW5hdGlvbik7CiAgICAgICAgICAgIHRoaXMudG90YWwgPSB0b3RhbDsKICAgICAgICAgICAgdGhpcy5jb3VudCA9IDA7CiAgICAgICAgfQogICAgICAgIF9uZXh0KHgpIHsKICAgICAgICAgICAgaWYgKCsrdGhpcy5jb3VudCA+IHRoaXMudG90YWwpIHsKICAgICAgICAgICAgICAgIHRoaXMuZGVzdGluYXRpb24ubmV4dCh4KTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiBzdGFydFdpdGgoLi4udmFsdWVzKSB7CiAgICAgICAgY29uc3Qgc2NoZWR1bGVyID0gdmFsdWVzW3ZhbHVlcy5sZW5ndGggLSAxXTsKICAgICAgICBpZiAoaXNTY2hlZHVsZXIoc2NoZWR1bGVyKSkgewogICAgICAgICAgICB2YWx1ZXMucG9wKCk7CiAgICAgICAgICAgIHJldHVybiAoc291cmNlKSA9PiBjb25jYXQodmFsdWVzLCBzb3VyY2UsIHNjaGVkdWxlcik7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICByZXR1cm4gKHNvdXJjZSkgPT4gY29uY2F0KHZhbHVlcywgc291cmNlKTsKICAgICAgICB9CiAgICB9CgogICAgZnVuY3Rpb24gc3dpdGNoTWFwKHByb2plY3QsIHJlc3VsdFNlbGVjdG9yKSB7CiAgICAgICAgaWYgKHR5cGVvZiByZXN1bHRTZWxlY3RvciA9PT0gJ2Z1bmN0aW9uJykgewogICAgICAgICAgICByZXR1cm4gKHNvdXJjZSkgPT4gc291cmNlLnBpcGUoc3dpdGNoTWFwKChhLCBpKSA9PiBmcm9tKHByb2plY3QoYSwgaSkpLnBpcGUobWFwKChiLCBpaSkgPT4gcmVzdWx0U2VsZWN0b3IoYSwgYiwgaSwgaWkpKSkpKTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIChzb3VyY2UpID0+IHNvdXJjZS5saWZ0KG5ldyBTd2l0Y2hNYXBPcGVyYXRvcihwcm9qZWN0KSk7CiAgICB9CiAgICBjbGFzcyBTd2l0Y2hNYXBPcGVyYXRvciB7CiAgICAgICAgY29uc3RydWN0b3IocHJvamVjdCkgewogICAgICAgICAgICB0aGlzLnByb2plY3QgPSBwcm9qZWN0OwogICAgICAgIH0KICAgICAgICBjYWxsKHN1YnNjcmliZXIsIHNvdXJjZSkgewogICAgICAgICAgICByZXR1cm4gc291cmNlLnN1YnNjcmliZShuZXcgU3dpdGNoTWFwU3Vic2NyaWJlcihzdWJzY3JpYmVyLCB0aGlzLnByb2plY3QpKTsKICAgICAgICB9CiAgICB9CiAgICBjbGFzcyBTd2l0Y2hNYXBTdWJzY3JpYmVyIGV4dGVuZHMgT3V0ZXJTdWJzY3JpYmVyIHsKICAgICAgICBjb25zdHJ1Y3RvcihkZXN0aW5hdGlvbiwgcHJvamVjdCkgewogICAgICAgICAgICBzdXBlcihkZXN0aW5hdGlvbik7CiAgICAgICAgICAgIHRoaXMucHJvamVjdCA9IHByb2plY3Q7CiAgICAgICAgICAgIHRoaXMuaW5kZXggPSAwOwogICAgICAgIH0KICAgICAgICBfbmV4dCh2YWx1ZSkgewogICAgICAgICAgICBsZXQgcmVzdWx0OwogICAgICAgICAgICBjb25zdCBpbmRleCA9IHRoaXMuaW5kZXgrKzsKICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgIHJlc3VsdCA9IHRoaXMucHJvamVjdCh2YWx1ZSwgaW5kZXgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNhdGNoIChlcnJvcikgewogICAgICAgICAgICAgICAgdGhpcy5kZXN0aW5hdGlvbi5lcnJvcihlcnJvcik7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5faW5uZXJTdWIocmVzdWx0LCB2YWx1ZSwgaW5kZXgpOwogICAgICAgIH0KICAgICAgICBfaW5uZXJTdWIocmVzdWx0LCB2YWx1ZSwgaW5kZXgpIHsKICAgICAgICAgICAgY29uc3QgaW5uZXJTdWJzY3JpcHRpb24gPSB0aGlzLmlubmVyU3Vic2NyaXB0aW9uOwogICAgICAgICAgICBpZiAoaW5uZXJTdWJzY3JpcHRpb24pIHsKICAgICAgICAgICAgICAgIGlubmVyU3Vic2NyaXB0aW9uLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY29uc3QgaW5uZXJTdWJzY3JpYmVyID0gbmV3IElubmVyU3Vic2NyaWJlcih0aGlzLCB2YWx1ZSwgaW5kZXgpOwogICAgICAgICAgICBjb25zdCBkZXN0aW5hdGlvbiA9IHRoaXMuZGVzdGluYXRpb247CiAgICAgICAgICAgIGRlc3RpbmF0aW9uLmFkZChpbm5lclN1YnNjcmliZXIpOwogICAgICAgICAgICB0aGlzLmlubmVyU3Vic2NyaXB0aW9uID0gc3Vic2NyaWJlVG9SZXN1bHQodGhpcywgcmVzdWx0LCB1bmRlZmluZWQsIHVuZGVmaW5lZCwgaW5uZXJTdWJzY3JpYmVyKTsKICAgICAgICAgICAgaWYgKHRoaXMuaW5uZXJTdWJzY3JpcHRpb24gIT09IGlubmVyU3Vic2NyaWJlcikgewogICAgICAgICAgICAgICAgZGVzdGluYXRpb24uYWRkKHRoaXMuaW5uZXJTdWJzY3JpcHRpb24pOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIF9jb21wbGV0ZSgpIHsKICAgICAgICAgICAgY29uc3QgeyBpbm5lclN1YnNjcmlwdGlvbiB9ID0gdGhpczsKICAgICAgICAgICAgaWYgKCFpbm5lclN1YnNjcmlwdGlvbiB8fCBpbm5lclN1YnNjcmlwdGlvbi5jbG9zZWQpIHsKICAgICAgICAgICAgICAgIHN1cGVyLl9jb21wbGV0ZSgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMudW5zdWJzY3JpYmUoKTsKICAgICAgICB9CiAgICAgICAgX3Vuc3Vic2NyaWJlKCkgewogICAgICAgICAgICB0aGlzLmlubmVyU3Vic2NyaXB0aW9uID0gbnVsbDsKICAgICAgICB9CiAgICAgICAgbm90aWZ5Q29tcGxldGUoaW5uZXJTdWIpIHsKICAgICAgICAgICAgY29uc3QgZGVzdGluYXRpb24gPSB0aGlzLmRlc3RpbmF0aW9uOwogICAgICAgICAgICBkZXN0aW5hdGlvbi5yZW1vdmUoaW5uZXJTdWIpOwogICAgICAgICAgICB0aGlzLmlubmVyU3Vic2NyaXB0aW9uID0gbnVsbDsKICAgICAgICAgICAgaWYgKHRoaXMuaXNTdG9wcGVkKSB7CiAgICAgICAgICAgICAgICBzdXBlci5fY29tcGxldGUoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBub3RpZnlOZXh0KG91dGVyVmFsdWUsIGlubmVyVmFsdWUsIG91dGVySW5kZXgsIGlubmVySW5kZXgsIGlubmVyU3ViKSB7CiAgICAgICAgICAgIHRoaXMuZGVzdGluYXRpb24ubmV4dChpbm5lclZhbHVlKTsKICAgICAgICB9CiAgICB9CgogICAgZnVuY3Rpb24gdGFrZVVudGlsKG5vdGlmaWVyKSB7CiAgICAgICAgcmV0dXJuIChzb3VyY2UpID0+IHNvdXJjZS5saWZ0KG5ldyBUYWtlVW50aWxPcGVyYXRvcihub3RpZmllcikpOwogICAgfQogICAgY2xhc3MgVGFrZVVudGlsT3BlcmF0b3IgewogICAgICAgIGNvbnN0cnVjdG9yKG5vdGlmaWVyKSB7CiAgICAgICAgICAgIHRoaXMubm90aWZpZXIgPSBub3RpZmllcjsKICAgICAgICB9CiAgICAgICAgY2FsbChzdWJzY3JpYmVyLCBzb3VyY2UpIHsKICAgICAgICAgICAgY29uc3QgdGFrZVVudGlsU3Vic2NyaWJlciA9IG5ldyBUYWtlVW50aWxTdWJzY3JpYmVyKHN1YnNjcmliZXIpOwogICAgICAgICAgICBjb25zdCBub3RpZmllclN1YnNjcmlwdGlvbiA9IHN1YnNjcmliZVRvUmVzdWx0KHRha2VVbnRpbFN1YnNjcmliZXIsIHRoaXMubm90aWZpZXIpOwogICAgICAgICAgICBpZiAobm90aWZpZXJTdWJzY3JpcHRpb24gJiYgIXRha2VVbnRpbFN1YnNjcmliZXIuc2VlblZhbHVlKSB7CiAgICAgICAgICAgICAgICB0YWtlVW50aWxTdWJzY3JpYmVyLmFkZChub3RpZmllclN1YnNjcmlwdGlvbik7CiAgICAgICAgICAgICAgICByZXR1cm4gc291cmNlLnN1YnNjcmliZSh0YWtlVW50aWxTdWJzY3JpYmVyKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGFrZVVudGlsU3Vic2NyaWJlcjsKICAgICAgICB9CiAgICB9CiAgICBjbGFzcyBUYWtlVW50aWxTdWJzY3JpYmVyIGV4dGVuZHMgT3V0ZXJTdWJzY3JpYmVyIHsKICAgICAgICBjb25zdHJ1Y3RvcihkZXN0aW5hdGlvbikgewogICAgICAgICAgICBzdXBlcih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ICBjbGFzcyBUYXBTdWJzY3JpYmVyIGV4dGVuZHMgU3Vic2NyaWJlciB7CiAgICAgICAgY29uc3RydWN0b3IoZGVzdGluYXRpb24sIG9ic2VydmVyT3JOZXh0LCBlcnJvciwgY29tcGxldGUpIHsKICAgICAgICAgICAgc3VwZXIoZGVzdGluYXRpb24pOwogICAgICAgICAgICB0aGlzLl90YXBOZXh0ID0gbm9vcDsKICAgICAgICAgICAgdGhpcy5fdGFwRXJyb3IgPSBub29wOwogICAgICAgICAgICB0aGlzLl90YXBDb21wbGV0ZSA9IG5vb3A7CiAgICAgICAgICAgIHRoaXMuX3RhcEVycm9yID0gZXJyb3IgfHwgbm9vcDsKICAgICAgICAgICAgdGhpcy5fdGFwQ29tcGxldGUgPSBjb21wbGV0ZSB8fCBub29wOwogICAgICAgICAgICBpZiAoaXNGdW5jdGlvbihvYnNlcnZlck9yTmV4dCkpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2NvbnRleHQgPSB0aGlzOwogICAgICAgICAgICAgICAgdGhpcy5fdGFwTmV4dCA9IG9ic2VydmVyT3JOZXh0OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKG9ic2VydmVyT3JOZXh0KSB7CiAgICAgICAgICAgICAgICB0aGlzLl9jb250ZXh0ID0gb2JzZXJ2ZXJPck5leHQ7CiAgICAgICAgICAgICAgICB0aGlzLl90YXBOZXh0ID0gb2JzZXJ2ZXJPck5leHQubmV4dCB8fCBub29wOwogICAgICAgICAgICAgICAgdGhpcy5fdGFwRXJyb3IgPSBvYnNlcnZlck9yTmV4dC5lcnJvciB8fCBub29wOwogICAgICAgICAgICAgICAgdGhpcy5fdGFwQ29tcGxldGUgPSBvYnNlcnZlck9yTmV4dC5jb21wbGV0ZSB8fCBub29wOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIF9uZXh0KHZhbHVlKSB7CiAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICB0aGlzLl90YXBOZXh0LmNhbGwodGhpcy5fY29udGV4dCwgdmFsdWUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNhdGNoIChlcnIpIHsKICAgICAgICAgICAgICAgIHRoaXMuZGVzdGluYXRpb24uZXJyb3IoZXJyKTsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLmRlc3RpbmF0aW9uLm5leHQodmFsdWUpOwogICAgICAgIH0KICAgICAgICBfZXJyb3IoZXJyKSB7CiAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICB0aGlzLl90YXBFcnJvci5jYWxsKHRoaXMuX2NvbnRleHQsIGVycik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY2F0Y2ggKGVycikgewogICAgICAgICAgICAgICAgdGhpcy5kZXN0aW5hdGlvbi5lcnJvcihlcnIpOwogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuZGVzdGluYXRpb24uZXJyb3IoZXJyKTsKICAgICAgICB9CiAgICAgICAgX2NvbXBsZXRlKCkgewogICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgdGhpcy5fdGFwQ29tcGxldGUuY2FsbCh0aGlzLl9jb250ZXh0KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBjYXRjaCAoZXJyKSB7CiAgICAgICAgICAgICAgICB0aGlzLmRlc3RpbmF0aW9uLmVycm9yKGVycik7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXMuZGVzdGluYXRpb24uY29tcGxldGUoKTsKICAgICAgICB9CiAgICB9CgogICAgY29uc3QgZGVmYXVsdFRocm90dGxlQ29uZmlnID0gewogICAgICAgIGxlYWRpbmc6IHRydWUsCiAgICAgICAgdHJhaWxpbmc6IGZhbHNlCiAgICB9OwoKICAgIGZ1bmN0aW9uIHRocm90dGxlVGltZShkdXJhdGlvbiwgc2NoZWR1bGV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dWxlciA9IHNjaGVkdWxlcjsKICAgICAgICAgICAgdGhpcy5sZWFkaW5nID0gbGVhZGluZzsKICAgICAgICAgICAgdGhpcy50cmFpbGluZyA9IHRyYWlsaW5nOwogICAgICAgICAgICB0aGlzLnRocm90dGxlZCA9IG51bGw7CiAgICAgICAgICAgIHRoaXMuX2hhc1RyYWlsaW5nVmFsdWUgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5fdHJhaWxpbmdWYWx1ZSA9IG51bGw7CiAgICAgICAgfQogICAgICAgIF9uZXh0KHZhbHVlKSB7CiAgICAgICAgICAgIGlmICh0aGlzLnRocm90dGxlZCkgewogICAgICAgICAgICAgICAgaWYgKHRoaXMudHJhaWxpbmcpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl90cmFpbGluZ1ZhbHVlID0gdmFsdWU7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5faGFzVHJhaWxpbmdWYWx1ZSA9IHRydWU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLmFkZCh0aGlzLnRocm90dGxlZCA9IHRoaXMuc2NoZWR1bGVyLnNjaGVkdWxlKGRpc3BhdGNoTmV4dCQxLCB0aGlzLmR1cmF0aW9uLCB7IHN1YnNjcmliZXI6IHRoaXMgfSkpOwogICAgICAgICAgICAgICAgaWYgKHRoaXMubGVhZGluZykgewogICAgICAgICAgICAgICAgICAgIHRoaXMuZGVzdGluYXRpb24ubmV4dCh2YWx1ZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmICh0aGlzLnRyYWlsaW5nKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fdHJhaWxpbmdWYWx1ZSA9IHZhbHVlOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX2hhc1RyYWlsaW5nVmFsdWUgPSB0cnVlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIF9jb21wbGV0ZSgpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX2hhc1RyYWlsaW5nVmFsdWUpIHsKICAgICAgICAgICAgICAgIHRoaXMuZGVzdGluYXRpb24ubmV4dCh0aGlzLl90cmFpbGluZ1ZhbHVlKTsKICAgICAgICAgICAgICAgIHRoaXMuZGVzdGluYXRpb24uY29tcGxldGUoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuZGVzdGluYXRpb24uY29tcGxldGUoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBjbGVhclRocm90dGxlKCkgewogICAgICAgICAgICBjb25zdCB0aHJvdHRsZWQgPSB0aGlzLnRocm90dGxlZDsKICAgICAgICAgICAgaWYgKHRocm90dGxlZCkgewogICAgICAgICAgICAgICAgaWYgKHRoaXMudHJhaWxpbmcgJiYgdGhpcy5faGFzVHJhaWxpbmdWYWx1ZSkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuZGVzdGluYXRpb24ubmV4dCh0aGlzLl90cmFpbGluZ1ZhbHVlKTsKICAgICAgICAgICAgICAgICAgICB0aGlzLl90cmFpbGluZ1ZhbHVlID0gbnVsbDsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9oYXNUcmFpbGluZ1ZhbHVlID0gZmFsc2U7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aHJvdHRsZWQudW5zdWJzY3JpYmUoKTsKICAgICAgICAgICAgICAgIHRoaXMucmVtb3ZlKHRocm90dGxlZCk7CiAgICAgICAgICAgICAgICB0aGlzLnRocm90dGxlZCA9IG51bGw7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICBmdW5jdGlvbiBkaXNwYXRjaE5leHQkMShhcmcpIHsKICAgICAgICBjb25zdCB7IHN1YnNjcmliZXIgfSA9IGFyZzsKICAgICAgICBzdWJzY3JpYmVyLmNsZWFyVGhyb3R0bGUoKTsKICAgIH0KCiAgICBmdW5jdGlvbiB3aXRoTGF0ZXN0RnJvbSguLi5hcmdzKSB7CiAgICAgICAgcmV0dXJuIChzb3VyY2UpID0+IHsKICAgICAgICAgICAgbGV0IHByb2plY3Q7CiAgICAgICAgICAgIGlmICh0eXBlb2YgYXJnc1thcmdzLmxlbmd0aCAtIDFdID09PSAnZnVuY3Rpb24nKSB7CiAgICAgICAgICAgICAgICBwcm9qZWN0ID0gYXJncy5wb3AoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBjb25zdCBvYnNlcnZhYmxlcyA9IGFyZ3M7CiAgICAgICAgICAgIHJldHVybiBzb3VyY2UubGlmdChuZXcgV2l0aExhdGVzdEZyb21PcGVyYXRvcihvYnNlcnZhYmxlcywgcHJvamVjdCkpOwogICAgICAgIH07CiAgICB9CiAgICBjbGFzcyBXaXRoTGF0ZXN0RnJvbU9wZXJhdG9yIHsKICAgICAgICBjb25zdHJ1Y3RvcihvYnNlcnZhYmxlcywgcHJvamVjdCkgewogICAgICAgICAgICB0aGlzLm9ic2VydmFibGVzID0gb2JzZXJ2YWJsZXM7CiAgICAgICAgICAgIHRoaXMucHJvamVjdCA9IHByb2plY3Q7CiAgICAgICAgfQogICAgICAgIGNhbGwoc3Vic2NyaWJlciwgc291cmNlKSB7CiAgICAgICAgICAgIHJldHVybiBzb3VyY2Uuc3Vic2NyaWJlKG5ldyBXaXRoTGF0ZXN0RnJvbVN1YnNjcmliZXIoc3Vic2NyaWJlciwgdGhpcy5vYnNlcnZhYmxlcywgdGhpcy5wcm9qZWN0KSk7CiAgICAgICAgfQogICAgfQogICAgY2xhc3MgV2l0aExhdGVzdEZyb21TdWJzY3JpYmVyIGV4dGVuZHMgT3V0ZXJTdWJzY3JpYmVyIHsKICAgICAgICBjb25zdHJ1Y3RvcihkZXN0aW5hdGlvbiwgb2JzZXJ2YWJsZXMsIHByb2plY3QpIHsKICAgICAgICAgICAgc3VwZXIoZGVzdGluYXRpb24pOwogICAgICAgICAgICB0aGlzLm9ic2VydmFibGVzID0gb2JzZXJ2YWJsZXM7CiAgICAgICAgICAgIHRoaXMucHJvamVjdCA9IHByb2plY3Q7CiAgICAgICAgICAgIHRoaXMudG9SZXNwb25kID0gW107CiAgICAgICAgICAgIGNvbnN0IGxlbiA9IG9ic2VydmFibGVzLmxlbmd0aDsKICAgICAgICAgICAgdGhpcy52YWx1ZXMgPSBuZXcgQXJyYXkobGVuKTsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBsZW47IGkrKykgewogICAgICAgICAgICAgICAgdGhpcy50b1Jlc3BvbmQucHVzaChpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGxlbjsgaSsrKSB7CiAgICAgICAgICAgICAgICBsZXQgb2JzZXJ2YWJsZSA9IG9ic2VydmFibGVzW2ldOwogICAgICAgICAgICAgICAgdGhpcy5hZGQoc3Vic2NyaWJlVG9SZXN1bHQodGhpcywgb2JzZXJ2YWJsZSwgb2JzZXJ2YWJsZSwgaSkpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIG5vdGlmeU5leHQob3V0ZXJWYWx1ZSwgaW5uZXJWYWx1ZSwgb3V0ZXJJbmRleCwgaW5uZXJJbmRleCwgaW5uZXJTdWIpIHsKICAgICAgICAgICAgdGhpcy52YWx1ZXNbb3V0ZXJJbmRleF0gPSBpbm5lclZhbHVlOwogICAgICAgICAgICBjb25zdCB0b1Jlc3BvbmQgPSB0aGlzLnRvUmVzcG9uZDsKICAgICAgICAgICAgaWYgKHRvUmVzcG9uZC5sZW5ndGggPiAwKSB7CiAgICAgICAgICAgICAgICBjb25zdCBmb3VuZCA9IHRvUmVzcG9uZC5pbmRleE9mKG91dGVySW5kZXgpOwogICAgICAgICAgICAgICAgaWYgKGZvdW5kICE9PSAtMSkgewogICAgICAgICAgICAgICAgICAgIHRvUmVzcG9uZC5zcGxpY2UoZm91bmQsIDEpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIG5vdGlmeUNvbXBsZXRlKCkgewogICAgICAgIH0KICAgICAgICBfbmV4dCh2YWx1ZSkgewogICAgICAgICAgICBpZiAodGhpcy50b1Jlc3BvbmQubGVuZ3RoID09PSAwKSB7CiAgICAgICAgICAgICAgICBjb25zdCBhcmdzID0gW3ZhbHVlLCAuLi50aGlzLnZhbHVlc107CiAgICAgICAgICAgICAgICBpZiAodGhpcy5wcm9qZWN0KSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fdHJ5UHJvamVjdChhcmdzKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIHRoaXMuZGVzdGluYXRpb24ubmV4dChhcmdzKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBfdHJ5UHJvamVjdChhcmdzKSB7CiAgICAgICAgICAgIGxldCByZXN1bHQ7CiAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICByZXN1bHQgPSB0aGlzLnByb2plY3QuYXBwbHkodGhpcywgYXJncyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY2F0Y2ggKGVycikgewogICAgICAgICAgICAgICAgdGhpcy5kZXN0aW5hdGlvbi5lcnJvcihlcnIpOwogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuZGVzdGluYXRpb24ubmV4dChyZXN1bHQpOwogICAgICAgIH0KICAgIH0KCiAgICAvKioKICAgICAqIEBsaWNlbnNlIEFuZ3VsYXIgdjkuMS4xMgogICAgICogKGMpIDIwMTAtMjAyMCBHb29nbGUgTExDLiBodHRwczovL2FuZ3VsYXIuaW8vCiAgICAgKiBMaWNlbnNlOiBNSVQKICAgICAqLwoKICAgIC8qKgogICAgICogQGxpY2Vuc2UKICAgICAqIENvcHlyaWdodCBHb29nbGUgSW5jLiBBbGwgUmlnaH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aW9uIFR5cGVEZWNvcmF0b3IoY2xzKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVGbikKICAgICAgICAgICAgICAgICAgICAgICAgdHlwZUZuKGNscywgLi4uYXJncyk7CiAgICAgICAgICAgICAgICAgICAgLy8gVXNlIG9mIE9iamVjdC5kZWZpbmVQcm9wZXJ0eSBpcyBpbXBvcnRhbnQgc2luY2UgaXQgY3JlYXRlcyBub24tZW51bWVyYWJsZSBwcm9wZXJ0eSB3aGljaAogICAgICAgICAgICAgICAgICAgIC8vIHByZXZlbnRzIHRoZSBwcm9wZXJ0eSBpcyBjb3BpZWQgZHVyaW5nIHN1YmNsYXNzaW5nLgogICAgICAgICAgICAgICAgICAgIGNvbnN0IGFubm90YXRpb25zID0gY2xzLmhhc093blByb3BlcnR5KEFOTk9UQVRJT05TKSA/CiAgICAgICAgICAgICAgICAgICAgICAgIGNsc1tBTk5PVEFUSU9OU10gOgogICAgICAgICAgICAgICAgICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoY2xzLCBBTk5PVEFUSU9OUywgeyB2YWx1ZTogW10gfSlbQU5OT1RBVElPTlNdOwogICAgICAgICAgICAgICAgICAgIGFubm90YXRpb25zLnB1c2goYW5ub3RhdGlvbkluc3RhbmNlKTsKICAgICAgICAgICAgICAgICAgICBpZiAoYWRkaXRpb25hbFByb2Nlc3NpbmcpCiAgICAgICAgICAgICAgICAgICAgICAgIGFkZGl0aW9uYWxQcm9jZXNzaW5nKGNscyk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNsczsKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHBhcmVudENsYXNzKSB7CiAgICAgICAgICAgICAgICBEZWNvcmF0b3JGYWN0b3J5LnByb3RvdHlwZSA9IE9iamVjdC5jcmVhdGUocGFyZW50Q2xhc3MucHJvdG90eXBlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBEZWNvcmF0b3JGYWN0b3J5LnByb3RvdHlwZS5uZ01ldGFkYXRhTmFtZSA9IG5hbWU7CiAgICAgICAgICAgIERlY29yYXRvckZhY3RvcnkuYW5ub3RhdGlvbkNscyA9IERlY29yYXRvckZhY3Rvcnk7CiAgICAgICAgICAgIHJldHVybiBEZWNvcmF0b3JGYWN0b3J5OwogICAgICAgIH0pOwogICAgfQogICAgZnVuY3Rpb24gbWFrZU1ldGFkYXRhQ3Rvcihwcm9wcykgewogICAgICAgIHJldHVybiBmdW5jdGlvbiBjdG9yKC4uLmFyZ3MpIHsKICAgICAgICAgICAgaWYgKHByb3BzKSB7CiAgICAgICAgICAgICAgICBjb25zdCB2YWx1ZXMgPSBwcm9wcyguLi5hcmdzKTsKICAgICAgICAgICAgICAgIGZvciAoY29uc3QgcHJvcE5hbWUgaW4gdmFsdWVzKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpc1twcm9wTmFtZV0gPSB2YWx1ZXNbcHJvcE5hbWVdOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgIH0KICAgIGZ1bmN0aW9uIG1ha2VQYXJhbURlY29yYXRvcihuYW1lLCBwcm9wcywgcGFyZW50Q2xhc3MpIHsKICAgICAgICByZXR1cm4gbm9TaWRlRWZmZWN0cygoKSA9PiB7CiAgICAgICAgICAgIGNvbnN0IG1ldGFDdG9yID0gbWFrZU1ldGFkYXRhQ3Rvcihwcm9wcyk7CiAgICAgICAgICAgIGZ1bmN0aW9uIFBhcmFtRGVjb3JhdG9yRmFjdG9yeSguLi5hcmdzKSB7CiAgICAgICAgICAgICAgICBpZiAodGhpcyBpbnN0YW5jZW9mIFBhcmFtRGVjb3JhdG9yRmFjdG9yeSkgewogICAgICAgICAgICAgICAgICAgIG1ldGFDdG9yLmFwcGx5KHRoaXMsIGFyZ3MpOwogICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgY29uc3QgYW5ub3RhdGlvbkluc3RhbmNlID0gbmV3IFBhcmFtRGVjb3JhdG9yRmFjdG9yeSguLi5hcmdzKTsKICAgICAgICAgICAgICAgIFBhcmFtRGVjb3JhdG9yLmFubm90YXRpb24gPSBhbm5vdGF0aW9uSW5zdGFuY2U7CiAgICAgICAgICAgICAgICByZXR1cm4gUGFyYW1EZWNvcmF0b3I7CiAgICAgICAgICAgICAgICBmdW5jdGlvbiBQYXJhbURlY29yYXRvcihjbHMsIHVudXNlZEtleSwgaW5kZXgpIHsKICAgICAgICAgICAgICAgICAgICAvLyBVc2Ugb2YgT2JqZWN0LmRlZmluZVByb3BlcnR5IGlzIGltcG9ydGFudCBzaW5jZSBpdCBjcmVhdGVzIG5vbi1lbnVtZXJhYmxlIHByb3BlcnR5IHdoaWNoCiAgICAgICAgICAgICAgICAgICAgLy8gcHJldmVudHMgdGhlIHByb3BlcnR5IGlzIGNvcGllZCBkdXJpbmcgc3ViY2xhc3NpbmcuCiAgICAgICAgICAgICAgICAgICAgY29uc3QgcGFyYW1ldGVycyA9IGNscy5oYXNPd25Qcm9wZXJ0eShQQVJBTUVURVJTKSA/CiAgICAgICAgICAgICAgICAgICAgICAgIGNsc1tQQVJBTUVURVJTXSA6CiAgICAgICAgICAgICAgICAgICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShjbHMsIFBBUkFNRVRFUlMsIHsgdmFsdWU6IFtdIH0pW1BBUkFNRVRFUlNdOwogICAgICAgICAgICAgICAgICAgIC8vIHRoZXJlIG1pZ2h0IGJlIGdhcHMgaWYgc29tZSBpbiBiZXR3ZWVuIHBhcmFtZXRlcnMgZG8gbm90IGhhdmUgYW5ub3RhdGlvbnMuCiAgICAgICAgICAgICAgICAgICAgLy8gd2UgcGFkIHdpdGggbnVsbHMuCiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKHBhcmFtZXRlcnMubGVuZ3RoIDw9IGluZGV4KSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtZXRlcnMucHVzaChudWxsKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgKHBhcmFtZXRlcnNbaW5kZXhdID0gcGFyYW1ldGVyc1tpbmRleF0gfHwgW10pLnB1c2goYW5ub3RhdGlvbkluc3RhbmNlKTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gY2xzOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChwYXJlbnRDbGFzcykgewogICAgICAgICAgICAgICAgUGFyYW1EZWNvcmF0b3JGYWN0b3J5LnByb3RvdHlwZSA9IE9iamVjdC5jcmVhdGUocGFyZW50Q2xhc3MucHJvdG90eXBlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBQYXJhbURlY29yYXRvckZhY3RvcnkucHJvdG90eXBlLm5nTWV0YWRhdGFOYW1lID0gbmFtZTsKICAgICAgICAgICAgUGFyYW1EZWNvcmF0b3JGYWN0b3J5LmFubm90YXRpb25DbHMgPSBQYXJhbURlY29yYXRvckZhY3Rvcnk7CiAgICAgICAgICAgIHJldHVybiBQYXJhbURlY29yYXRvckZhY3Rvcnk7CiAgICAgICAgfSk7CiAgICB9CiAgICBmdW5jdGlvbiBtYWtlUHJvcERlY29yYXRvcihuYW1lLCBwcm9wcywgcGFyZW50Q2xhc3MsIGFkZGl0aW9uYWxQcm9jZXNzaW5nKSB7CiAgICAgICAgcmV0dXJuIG5vU2lkZUVmZmVjdHMoKCkgPT4gewogICAgICAgICAgICBjb25zdCBtZXRhQ3RvciA9IG1ha2VNZXRhZGF0YUN0b3IocHJvcHMpOwogICAgICAgICAgICBmdW5jdGlvbiBQcm9wRGVjb3JhdG9yRmFjdG9yeSguLi5hcmdzKSB7CiAgICAgICAgICAgICAgICBpZiAodGhpcyBpbnN0YW5jZW9mIFByb3BEZWNvcmF0b3JGYWN0b3J5KSB7CiAgICAgICAgICAgICAgICAgICAgbWV0YUN0b3IuYXBwbHkodGhpcywgYXJncyk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjb25zdCBkZWNvcmF0b3JJbnN0YW5jZSA9IG5ldyBQcm9wRGVjb3JhdG9yRmFjdG9yeSguLi5hcmdzKTsKICAgICAgICAgICAgICAgIGZ1bmN0aW9uIFByb3BEZWNvcmF0b3IodGFyZ2V0LCBuYW1lKSB7CiAgICAgICAgICAgICAgICAgICAgY29uc3QgY29uc3RydWN0b3IgPSB0YXJnZXQuY29uc3RydWN0b3I7CiAgICAgICAgICAgICAgICAgICAgLy8gVXNlIG9mIE9iamVjdC5kZWZpbmVQcm9wZXJ0eSBpcyBpbXBvcnRhbnQgc2luY2UgaXQgY3JlYXRlcyBub24tZW51bWVyYWJsZSBwcm9wZXJ0eSB3aGljaAogICAgICAgICAgICAgICAgICAgIC8vIHByZXZlbnRzIHRoZSBwcm9wZXJ0eSBpcyBjb3BpZWQgZHVyaW5nIHN1YmNsYXNzaW5nLgogICAgICAgICAgICAgICAgICAgIGNvbnN0IG1ldGEgPSBjb25zdHJ1Y3Rvci5oYXNPd25Qcm9wZXJ0eShQUk9QX01FVEFEQVRBKSA/CiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0cnVjdG9yW1BST1BfTUVUQURBVEFdIDoKICAgICAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGNvbnN0cnVjdG9yLCBQUk9QX01FVEFEQVRBLCB7IHZhbHVlOiB7fSB9KVtQUk9QX01FVEFEQVRBXTsKICAgICAgICAgICAgICAgICAgICBtZXRhW25hbWVdID0gbWV0YS5oYXNPd25Qcm9wZXJ0eShuYW1lKSAmJiBtZXRhW25hbWVdIHx8IFtdOwogICAgICAgICAgICAgICAgICAgIG1ldGFbbmFtZV0udW5zaGlmdChkZWNvcmF0b3JJbnN0YW5jZSk7CiAgICAgICAgICAgICAgICAgICAgaWYgKGFkZGl0aW9uYWxQcm9jZXNzaW5nKQogICAgICAgICAgICAgICAgICAgICAgICBhZGRpdGlvbmFsUHJvY2Vzc2luZyh0YXJnZXQsIG5hbWUsIC4uLmFyZ3MpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIFByb3BEZWNvcmF0b3I7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHBhcmVudENsYXNzKSB7CiAgICAgICAgICAgICAgICBQcm9wRGVjb3JhdG9yRmFjdG9yeS5wcm90b3R5cGUgPSBPYmplY3QuY3JlYXRlKHBhcmVudENsYXNzLnByb3RvdHlwZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgUHJvcERlY29yYXRvckZhY3RvcnkucHJvdG90eXBlLm5nTWV0YWRhdGFOYW1lID0gbmFtZTsKICAgICAgICAgICAgUHJvcERlY29yYXRvckZhY3RvcnkuYW5ub3RhdGlvbkNscyA9IFByb3BEZWNvcmF0b3JGYWN0b3J5OwogICAgICAgICAgICByZXR1cm4gUHJvcERlY29yYXRvckZhY3Rvcnk7CiAgICAgICAgfSk7CiAgICB9CiAgICAvLyBXQVJOSU5HOiBpbnRlcmZhY2UgaGFzIGJvdGggYSB0eXBlIGFuZCBhIHZhbHVlLCBza2lwcGluZyBlbWl0CiAgICBjb25zdCDJtTAgPSAvKioKICAgICAqIEBwYXJhbSB7P30gdG9rZW4KICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgICh0b2tlbikgPT4gKHsgdG9rZW4gfSk7CiAgICAvKioKICAgICAqIEluamVjdCBkZWNvcmF0b3IgYW5kIG1ldGFkYXRhLgogICAgICoKICAgICAqIFxAQW5ub3RhdGlvbgogICAgICogXEBwdWJsaWNBcGkKICAgICAqIEB0eXBlIHs/fQogICAgICovCiAgICBjb25zdCBJbmplY3QgPSBtYWtlUGFyYW1EZWNvcmF0b3IoJ0luamVjdCcsICjJtTApKTsKICAgIC8vIFdBUk5JTkc6IGludGVyZmFjZSBoYXMgYm90aCBhIHR5cGUgYW5kIGEgdmFsdWUsIHNraXBwaW5nIGVtaXQKICAgIC8qKgogICAgICogT3B0aW9uYWwgZGVjb3JhdG9yIGFuZCBtZXRhZGF0YS4KICAgICAqCiAgICAgKiBcQEFubm90YXRpb24KICAgICAqIFxAcHVibGljQXBpCiAgICAgKiBAdHlwZSB7P30KICAgICAqLwogICAgY29uc3QgT3B0aW9uYWwgPSBtYWtlUGFyYW1EZWNvcmF0b3IoJ09wdGlvbmFsJyk7CiAgICAvLyBXQVJOSU5HOiBpbnRlcmZhY2UgaGFzIGJvdGggYSB0eXBlIGFuZCBhIHZhbHVlLCBza2lwcGluZyBlbWl0CiAgICAvKioKICAgICAqIFNlbGYgZGVjb3JhdG9yIGFuZCBtZXRhZGF0YS4KICAgICAqCiAgICAgKiBcQEFubm90YXRpb24KICAgICAqIFxAcHVibGljQXBpCiAgICAgKiBAdHlwZSB7P30KICAgICAqLwogICAgY29uc3QgU2VsZiA9IG1ha2VQYXJhbURlY29yYXRvcignU2VsZicpOwogICAgLy8gV0FSTklORzogaW50ZXJmYWNlIGhhcyBib3RoIGEgdHlwZSBhbmQgYSB2YWx1ZSwgc2tpcHBpbmcgZW1pdAogICAgLyoqCiAgICAgKiBTa2lwU2VsZiBkZWNvcmF0b3IgYW5kIG1ldGFkYXRhLgogICAgICoKICAgICAqIFxAQW5ub3RhdGlvbgogICAgICogXEBwdWJsaWNBcGkKICAgICAqIEB0eXBlIHs/fQogICAgICovCiAgICBjb25zdCBTa2lwU2VsZiA9IG1ha2VQYXJhbURlY29yYXRvcignU2tpcFNlbGYnKTsKICAgIC8vIFdBUk5JTkc6IGludGVyZmFjZSBoYXMgYm90aCBhIHR5cGUgYW5kIGEgdmFsdWUsIHNraXBwaW5nIGVtaXQKICAgIC8qKgogICAgICogSG9zdCBkZWNvcmF0b3IgYW5kIG1ldGFkYXRhLgogICAgICoKICAgICAqIFxAQW5ub3RhdGlvbgogICAgICogXEBwdWJsaWNBcGkKICAgICAqIEB0eXBlIHs/fQogICAgICovCiAgICBjb25zdCBIb3N0ID0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GUgcHJvcGVydHkga2V5cyBhbmQgdmFsdWVzIHRvIHNldAogICAgICovCiAgICBmdW5jdGlvbiBmaWxsUHJvcGVydGllcyh0YXJnZXQsIHNvdXJjZSkgewogICAgICAgIGZvciAoY29uc3Qga2V5IGluIHNvdXJjZSkgewogICAgICAgICAgICBpZiAoc291cmNlLmhhc093blByb3BlcnR5KGtleSkgJiYgIXRhcmdldC5oYXNPd25Qcm9wZXJ0eShrZXkpKSB7CiAgICAgICAgICAgICAgICB0YXJnZXRba2V5XSA9IHNvdXJjZVtrZXldOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQoKICAgIC8qKgogICAgICogQGxpY2Vuc2UKICAgICAqIENvcHlyaWdodCBHb29nbGUgSW5jLiBBbGwgUmlnaHRzIFJlc2VydmVkLgogICAgICoKICAgICAqIFVzZSBvZiB0aGlzIHNvdXJjZSBjb2RlIGlzIGdvdmVybmVkIGJ5IGFuIE1JVC1zdHlsZSBsaWNlbnNlIHRoYXQgY2FuIGJlCiAgICAgKiBmb3VuZCBpbiB0aGUgTElDRU5TRSBmaWxlIGF0IGh0dHBzOi8vYW5ndWxhci5pby9saWNlbnNlCiAgICAgKi8KICAgIC8qKgogICAgICogQ29uc3RydWN0IGFuIGBJbmplY3RhYmxlRGVmYCB3aGljaCBkZWZpbmVzIGhvdyBhIHRva2VuIHdpbGwgYmUgY29uc3RydWN0ZWQgYnkgdGhlIERJIHN5c3RlbSwgYW5kCiAgICAgKiBpbiB3aGljaCBpbmplY3RvcnMgKGlmIGFueSkgaXQgd2lsbCBiZSBhdmFpbGFibGUuCiAgICAgKgogICAgICogVGhpcyBzaG91bGQgYmUgYXNzaWduZWQgdG8gYSBzdGF0aWMgYMm1cHJvdmAgZmllbGQgb24gYSB0eXBlLCB3aGljaCB3aWxsIHRoZW4gYmUgYW4KICAgICAqIGBJbmplY3RhYmxlVHlwZWAuCiAgICAgKgogICAgICogT3B0aW9uczoKICAgICAqICogYHByb3ZpZGVkSW5gIGRldGVybW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2lsbCBvdmVycmlkZQogICAgICogICBwcm92aWRlcnMgZnJvbSBpbXBvcnRzLgogICAgICoKICAgICAqIEBwdWJsaWNBcGkKICAgICAqLwogICAgZnVuY3Rpb24gybXJtWRlZmluZUluamVjdG9yKG9wdGlvbnMpIHsKICAgICAgICByZXR1cm4gewogICAgICAgICAgICBmYWN0b3J5OiBvcHRpb25zLmZhY3RvcnksCiAgICAgICAgICAgIHByb3ZpZGVyczogb3B0aW9ucy5wcm92aWRlcnMgfHwgW10sCiAgICAgICAgICAgIGltcG9ydHM6IG9wdGlvbnMuaW1wb3J0cyB8fCBbXSwKICAgICAgICB9OwogICAgfQogICAgLyoqCiAgICAgKiBSZWFkIHRoZSBpbmplY3RhYmxlIGRlZiAoYMm1cHJvdmApIGZvciBgdHlwZWAgaW4gYSB3YXkgd2hpY2ggaXMgaW1tdW5lIHRvIGFjY2lkZW50YWxseSByZWFkaW5nCiAgICAgKiBpbmhlcml0ZWQgdmFsdWUuCiAgICAgKgogICAgICogQHBhcmFtIHR5cGUgQSB0eXBlIHdoaWNoIG1heSBoYXZlIGl0cyBvd24gKG5vbi1pbmhlcml0ZWQpIGDJtXByb3ZgLgogICAgICovCiAgICBmdW5jdGlvbiBnZXRJbmplY3RhYmxlRGVmKHR5cGUpIHsKICAgICAgICByZXR1cm4gZ2V0T3duRGVmaW5pdGlvbih0eXBlLCB0eXBlW05HX1BST1ZfREVGXSkgfHwKICAgICAgICAgICAgZ2V0T3duRGVmaW5pdGlvbih0eXBlLCB0eXBlW05HX0lOSkVDVEFCTEVfREVGXSk7CiAgICB9CiAgICAvKioKICAgICAqIFJldHVybiBgZGVmYCBvbmx5IGlmIGl0IGlzIGRlZmluZWQgZGlyZWN0bHkgb24gYHR5cGVgIGFuZCBpcyBub3QgaW5oZXJpdGVkIGZyb20gYSBiYXNlCiAgICAgKiBjbGFzcyBvZiBgdHlwZWAuCiAgICAgKgogICAgICogVGhlIGZ1bmN0aW9uIGBPYmplY3QuaGFzT3duUHJv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ZWN0b3JEZWY6IGdldENsb3N1cmVTYWZlUHJvcGVydHkgfSk7CgogICAgLyoqCiAgICAgKiBAbGljZW5zZQogICAgICogQ29weXJpZ2h0IEdvb2dsZSBJbmMuIEFsbCBSaWdodHMgUmVzZXJ2ZWQuCiAgICAgKgogICAgICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgYW4gTUlULXN0eWxlIGxpY2Vuc2UgdGhhdCBjYW4gYmUKICAgICAqIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUgYXQgaHR0cHM6Ly9hbmd1bGFyLmlvL2xpY2Vuc2UKICAgICAqLwogICAgZnVuY3Rpb24gc3RyaW5naWZ5KHRva2VuKSB7CiAgICAgICAgaWYgKHR5cGVvZiB0b2tlbiA9PT0gJ3N0cmluZycpIHsKICAgICAgICAgICAgcmV0dXJuIHRva2VuOwogICAgICAgIH0KICAgICAgICBpZiAoQXJyYXkuaXNBcnJheSh0b2tlbikpIHsKICAgICAgICAgICAgcmV0dXJuICdbJyArIHRva2VuLm1hcChzdHJpbmdpZnkpLmpvaW4oJywgJykgKyAnXSc7CiAgICAgICAgfQogICAgICAgIGlmICh0b2tlbiA9PSBudWxsKSB7CiAgICAgICAgICAgIHJldHVybiAnJyArIHRva2VuOwogICAgICAgIH0KICAgICAgICBpZiAodG9rZW4ub3ZlcnJpZGRlbk5hbWUpIHsKICAgICAgICAgICAgcmV0dXJuIGAke3Rva2VuLm92ZXJyaWRkZW5OYW1lfWA7CiAgICAgICAgfQogICAgICAgIGlmICh0b2tlbi5uYW1lKSB7CiAgICAgICAgICAgIHJldHVybiBgJHt0b2tlbi5uYW1lfWA7CiAgICAgICAgfQogICAgICAgIGNvbnN0IHJlcyA9IHRva2VuLnRvU3RyaW5nKCk7CiAgICAgICAgaWYgKHJlcyA9PSBudWxsKSB7CiAgICAgICAgICAgIHJldHVybiAnJyArIHJlczsKICAgICAgICB9CiAgICAgICAgY29uc3QgbmV3TGluZUluZ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9rZW4nfQogICAgICoKICAgICAqCiAgICAgKiBcQHB1YmxpY0FwaQogICAgICogQHRlbXBsYXRlIFQKICAgICAqLwogICAgY2xhc3MgSW5qZWN0aW9uVG9rZW4gewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gX2Rlc2MKICAgICAgICAgKiBAcGFyYW0gez89fSBvcHRpb25zCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoX2Rlc2MsIG9wdGlvbnMpIHsKICAgICAgICAgICAgdGhpcy5fZGVzYyA9IF9kZXNjOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5uZ01ldGFkYXRhTmFtZSA9ICdJbmplY3Rpb25Ub2tlbic7CiAgICAgICAgICAgIHRoaXMuybVwcm92ID0gdW5kZWZpbmVkOwogICAgICAgICAgICBpZiAodHlwZW9mIG9wdGlvbnMgPT0gJ251bWJlcicpIHsKICAgICAgICAgICAgICAgIC8vIFRoaXMgaXMgYSBzcGVjaWFsIGhhY2sgdG8gYXNzaWduIF9fTkdfRUxFTUVOVF9JRF9fIHRvIHRoaXMgaW5zdGFuY2UuCiAgICAgICAgICAgICAgICAvLyBfX05HX0VMRU1FTlRfSURfXyBpcyBVc2VkIGJ5IEl2eSB0byBkZXRlcm1pbmUgYmxvb20gZmlsdGVyIGlkLgogICAgICAgICAgICAgICAgLy8gV2UgYXJlIHVzaW5nIGl0IHRvIGFzc2lnbiBgLTFgIHdoaWNoIGlzIHVzZWQgdG8gaWRlbnRpZnkgYEluamVjdG9yYC4KICAgICAgICAgICAgICAgICgoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpKS5fX05HX0VMRU1FTlRfSURfXyA9IG9wdGlvbnM7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAob3B0aW9ucyAhPT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgICAgICB0aGlzLsm1cHJvdiA9IMm1ybVkZWZpbmVJbmplY3RhYmxlKHsKICAgICAgICAgICAgICAgICAgICB0b2tlbjogdGhpcywKICAgICAgICAgICAgICAgICAgICBwcm92aWRlZEluOiBvcHRpb25zLnByb3ZpZGVkSW4gfHwgJ3Jvb3QnLAogICAgICAgICAgICAgICAgICAgIGZhY3Rvcnk6IG9wdGlvbnMuZmFjdG9yeSwKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdG9TdHJpbmcoKSB7CiAgICAgICAgICAgIHJldHVybiBgSW5qZWN0aW9uVG9rZW4gJHt0aGlzLl9kZXNjfWA7CiAgICAgICAgfQogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogcGFja2FnZXMvY29yZS9zcmMvZGkvaW5qZWN0b3JfY29tcGF0aWJpbGl0eS50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvKioKICAgICAqIEFuIEluamVjdGlvblRva2VuIHRoYXQgZ2V0cyB0aGUgY3VycmVudCBgSW5qZWN0b3JgIGZvciBgY3JlYXRlSW5qZWN0b3IoKWAtc3R5bGUgaW5qZWN0b3JzLgogICAgICoKICAgICAqIFJlcXVlc3RpbmcgdGhpcyB0b2tlbiBpbnN0ZWFkIG9mIGBJbmplY3RvcmAgYWxsb3dzIGBTdGF0aWNJbmplY3RvcmAgdG8gYmUgdHJlZS1zaGFrZW4gZnJvbSBhCiAgICAgKiBwcm9qZWN0LgogICAgICoKICAgICAqIF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AgICAgKi8KICAgIGxldCBfaW5qZWN0SW1wbGVtZW50YXRpb247CiAgICAvKioKICAgICAqIFNldHMgdGhlIGN1cnJlbnQgaW5qZWN0IGltcGxlbWVudGF0aW9uLgogICAgICogQHBhcmFtIHs/fSBpbXBsCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBzZXRJbmplY3RJbXBsZW1lbnRhdGlvbihpbXBsKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHByZXZpb3VzID0gX2luamVjdEltcGxlbWVudGF0aW9uOwogICAgICAgIF9pbmplY3RJbXBsZW1lbnRhdGlvbiA9IGltcGw7CiAgICAgICAgcmV0dXJuIHByZXZpb3VzOwogICAgfQogICAgLyoqCiAgICAgKiBAdGVtcGxhdGUgVAogICAgICogQHBhcmFtIHs/fSB0b2tlbgogICAgICogQHBhcmFtIHs/PX0gZmxhZ3MKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGluamVjdEluamVjdG9yT25seSh0b2tlbiwgZmxhZ3MgPSBJbmplY3RGbGFncy5EZWZhdWx0KSB7CiAgICAgICAgaWYgKF9jdXJyZW50SW5qZWN0b3IgPT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYGluamVjdCgpIG11c3QgYmUgY2FsbGVkIGZyb20gYW4gaW5qZWN0aW9uIGNvbnRleHRgKTsKICAgICAgICB9CiAgICAgICAgZWxzZSBpZiAoX2N1cnJlbnRJbmplY3RvciA9PT0gbnVsbCkgewogICAgICAgICAgICByZXR1cm4gaW5qZWN0Um9vdExpbXBNb2RlKHRva2VuLCB1bmRlZmluZWQsIGZsYWdzKTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIHJldHVybiBfY3VycmVudEluamVjdG9yLmdldCh0b2tlbiwgZmxhZ3MgJiBJbmplY3RGbGFncy5PcHRpb25hbCA/IG51b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bj0nU2hha2FibGVJbmplY3Rpb25Ub2tlbid9CiAgICAgKgogICAgICogXEBwdWJsaWNBcGkKICAgICAqIEB0eXBlIHs/fQogICAgICovCiAgICBjb25zdCBpbmplY3QgPSDJtcm1aW5qZWN0OwogICAgLyoqCiAgICAgKiBJbmplY3RzIGByb290YCB0b2tlbnMgaW4gbGltcCBtb2RlLgogICAgICoKICAgICAqIElmIG5vIGluamVjdG9yIGV4aXN0cywgd2UgY2FuIHN0aWxsIGluamVjdCB0cmVlLXNoYWthYmxlIHByb3ZpZGVycyB3aGljaCBoYXZlIGBwcm92aWRlZEluYCBzZXQgdG8KICAgICAqIGAicm9vdCJgLiBUaGlzIGlzIGtub3duIGFzIHRoZSBsaW1wIG1vZGUgaW5qZWN0aW9uLiBJbiBzdWNoIGNhc2UgdGhlIHZhbHVlIGlzIHN0b3JlZCBpbiB0aGUKICAgICAqIGBJbmplY3RhYmxlRGVmYC4KICAgICAqIEB0ZW1wbGF0ZSBUCiAgICAgKiBAcGFyYW0gez99IHRva2VuCiAgICAgKiBAcGFyYW0gez99IG5vdEZvdW5kVmFsdWUKICAgICAqIEBwYXJhbSB7P30gZmxhZ3MKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGluamVjdFJvb3RMaW1wTW9kZSh0b2tlbiwgbm90Rm91bmRWYWx1ZSwgZmxhZ3MpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgaW5qZWN0YWJsZURlZiA9IGdldEluamVjdGFibGVEZWYodG9rZW4pOwogICAgICAgIGlmIChpbmplY3RhYmxlRGVmICYmIGluamVjdGFibGVEZWYucHJvdmlkZWRJbiA9PSAncm9vdCcpIHsKICAgICAgICAgICAgcmV0dXJuIGluamVjdGFibGVEZWYudmFsdWUgPT09IHVuZGVmaW5lZCA/IGluamVjdGFibGVEZWYudmFsdWUgPSBpbmplY3RhYmxlRGVmLmZhY3RvcnkoKSA6CiAgICAgICAgICAgICAgICBpbmplY3RhYmxlRGVmLnZhbHVlOwogICAgICAgIH0KICAgICAgICBpZiAoZmxhZ3MgJiBJbmplY3RGbGFncy5PcHRpb25hbCkKICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgaWYgKG5vdEZvdW5kVmFsdWUgIT09IHVuZGVmaW5lZCkKICAgICAgICAgICAgcmV0dXJuIG5vdEZvdW5kVmFsdWU7CiAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBJbmplY3RvcjogTk9UX0ZPVU5EIFske3N0cmluZ2lmeSh0b2tlbil9XWApOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHR5cGVzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBpbmplY3RBcmdzKHR5cGVzKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGFyZ3MgPSBbXTsKICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHR5cGVzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgYXJnID0gcmVzb2x2ZUZvcndhcmRSZWYodHlwZXNbaV0pOwogICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShhcmcpKSB7CiAgICAgICAgICAgICAgICBpZiAoYXJnLmxlbmd0aCA9PT0gMCkgewogICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignQXJndW1lbnRzIGFycmF5IG11c3QgaGF2ZSBhcmd1bWVudHMuJyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBsZXQgdHlwZSA9IHVuZGVmaW5lZDsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCBmbGFncyA9IEluamVjdEZsYWdzLkRlZmF1bHQ7CiAgICAgICAgICAgICAgICBmb3IgKGxldCBqID0gMDsgaiA8IGFyZy5sZW5ndGg7IGorKykgewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBtZXRhID0gYXJnW2pdOwogICAgICAgICAgICAgICAgICAgIGlmIChtZXRhIGluc3RhbmNlb2YgT3B0aW9uYWwgfHwgbWV0YS5uZ01ldGFkYXRhTmFtZSA9PT0gJ09wdGlvbmFsJyB8fCBtZXRhID09PSBPcHRpb25hbCkgewogICAgICAgICAgICAgICAgICAgICAgICBmbGFncyB8PSBJbmplY3RGbGFncy5PcHRpb25hbDsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAobWV0YSBpbnN0YW5jZW9mIFNraXBTZWxmIHx8IG1ldGEubmdNZXRhZGF0YU5hbWUgPT09ICdTa2lwU2VsZicgfHwgbWV0YSA9PT0gU2tpcFNlbGYpIHsKICAgICAgICAgICAgICAgICAgICAgICAgZmxhZ3MgfD0gSW5qZWN0RmxhZ3MuU2tpcFNlbGY7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKG1ldGEgaW5zdGFuY2VvZiBTZWxmIHx8IG1ldGEubmdNZXRhZGF0YU5hbWUgPT09ICdTZWxmJyB8fCBtZXRhID09PSBTZWxmKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGZsYWdzIHw9IEluamVjdEZsYWdzLlNlbGY7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKG1ldGEgaW5zdGFuY2VvZiBJbmplY3QgfHwgbWV0YSA9PT0gSW5qZWN0KSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGUgPSBtZXRhLnRva2VuOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgdHlwZSA9IG1ldGE7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgYXJncy5wdXNoKMm1ybVpbmplY3QoKC8qKiBAdHlwZSB7P30gKi8gKHR5cGUpKSwgZmxhZ3MpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIGFyZ3MucHVzaCjJtcm1aW5qZWN0KGFyZykpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiBhcmdzOwogICAgfQogICAgY2xhc3MgTnVsbEluamVjdG9yIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHRva2VuCiAgICAgICAgICogQHBhcmFtIHs/PX0gbm90Rm91bmRWYWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0KHRva2VuLCBub3RGb3VuZFZhbHVlID0gVEhST1dfSUZfTk9UX0ZPVU5EKSB7CiAgICAgICAgICAgIGlmIChub3RGb3VuZFZhbHVlID09PSBUSFJPV19JRl9OT1RfRk9VTkQpIHsKICAgICAgICAgICAgICAgIC8vIEludGVudGlvbmFsbHkgbGVmdCBiZWhpbmQ6IFdpdGggZGV2IHRvb2xzIG9wZW4gdGhlIGRlYnVnZ2VyIHdpbGwgc3RvcCBoZXJlLiBUaGVyZSBpcyBubwogICAgICAgICAgICAgICAgLy8gcmVhc29uIHdoeSBjb3JyZWN0bHkgd3JpdHRlbiBhcHBsaWNhdGlvbiBzaG91bGQgY2F1c2UgdGhpcyBleGNlcHRpb24uCiAgICAgICAgICAgICAgICAvLyBUT0RPKG1pc2tvKTogdW5jb21tZW50IHRoZSBuZXh0IGxpbmUgb25jZSBgbmdEZXZNb2RlYCB3b3JrcyB3aXRoIGNsb3N1cmUuCiAgICAgICAgICAgICAgICAvLyBpZiAobmdEZXZNb2RlKSBkZWJ1Z2dlcjsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGVycm9yID0gbmV3IEVycm9yKGBOdWxsSW5qZWN0b3JFcnJvcjogTm8gcHJvdmlkZXIgZm9yICR7c3RyaW5naWZ5KHRva2VuKX0hYCk7CiAgICAgICAgICAgICAgICBlcnJvci5uYW1lID0gJ051bGxJbmplY3RvckVycm9yJzsKICAgICAgICAgICAgICAgIHRocm93IGVycm9yOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBub3RGb3VuZFZhbHVlOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBlCiAgICAgKiBAcGFyYW0gez99IHRva2VuCiAgICAgKiBAcGFyYW0gez99IGluamVjdG9yRXJyb3JOYW1lCiAgICAgKiBAcGFyYW0gez99IHNvdXJjZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gY2F0Y2hJbmplY3RvckVycm9yKGUsIHRva2VuLCBpbmplY3RvckVycm9yTmFtZSwgc291cmNlKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHRva2VuUGF0aCA9IGVbTkdfVEVNUF9UT0tFTl9QQVRIXTsKICAgICAgICBpZiAodG9rZW5bU09VUkNFXSkgewogICAgICAgICAgICB0b2tlblBhdGgudW5zaGlmdCh0b2tlbltTT1VSQ0VdKTsKICAgICAgICB9CiAgICAgICAgZS5tZXNzYWdlID0gZm9ybWF0RXJyb3IoJ1xuJyArIGUubWVzc2FnZSwgdG9rZW5QYXRoLCBpbmplY3RvckVycm9yTmFtZSwgc291cmNlKTsKICAgICAgICBlW05HX1RPS0VOX1BBVEhdID0gdG9rZW5QYXRoOwogICAgICAgIGVbTkdfVEVNUF9UT0tFTl9QQVRIXSA9IG51bGw7CiAgICAgICAgdGhyb3cgZTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB0ZXh0CiAgICAgKiBAcGFyYW0gez99IG9iagogICAgICogQHBhcmFtIHs/fSBpbmplY3RvckVycm9yTmFtZQogICAgICogQHBhcmFtIHs/PX0gc291cmNlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBmb3JtYXRFcnJvcih0ZXh0LCBvYmosIGluamVjdG9yRXJyb3JOYW1lLCBzb3VyY2UgPSBudWxsKSB7CiAgICAgICAgdGV4dCA9IHRleHQgJiYgdGV4dC5jaGFyQXQoMCkgPT09ICdcbicgJiYgdGV4dC5jaGFyQXQoMSkgPT0gTk9fTkVXX0xJTkUgPyB0ZXh0LnN1YnN0cigyKSA6IHRleHQ7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBjb250ZXh0ID0gc3RyaW5naWZ5KG9iaik7CiAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkob2JqKSkgewogICAgICAgICAgICBjb250ZXh0ID0gb2JqLm1hcChzdHJpbmdpZnkpLmpvaW4oJyAtPiAnKTsKICAgICAgICB9CiAgICAgICAgZWxzZSBpZiAodHlwZW9mIG9iaiA9PT0gJ29iamVjdCcpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgcGFydHMgPSAoLyoqIEB0eXBlIHs/fSAqLyAoW10pKTsKICAgICAgICAgICAgZm9yIChsZXQga2V5IGluIG9iaikgewogICAgICAgICAgICAgICAgaWYgKG9iai5oYXNPd25Qcm9wZXJ0eShrZXkpKSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGxldCB2YWx1ZSA9IG9ialtrZXldOwogICAgICAgICAgICAgICAgICAgIHBhcnRzLnB1c2goa2V5ICsgJzonICsgKHR5cGVvZiB2YWx1ZSA9PT0gJ3N0cmluZycgPyBKU09OLnN0cmluZ2lmeSh2YWx1ZSkgOiBzdHJpbmdpZnkodmFsdWUpKSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY29udG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tWdldEZhY3RvcnlPZic6IGdldEZhY3RvcnlPZiwKICAgICAgICAnybXJtWludmFsaWRGYWN0b3J5RGVwJzogybXJtWludmFsaWRGYWN0b3J5RGVwLAogICAgfTsKICAgIC8qKgogICAgICogQHRlbXBsYXRlIFQKICAgICAqIEBwYXJhbSB7P30gdHlwZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0RmFjdG9yeU9mKHR5cGUpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgdHlwZUFueSA9ICgvKiogQHR5cGUgez99ICovICh0eXBlKSk7CiAgICAgICAgaWYgKGlzRm9yd2FyZFJlZih0eXBlKSkgewogICAgICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKCgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBmYWN0b3J5ID0gZ2V0RmFjdG9yeU9mKHJlc29sdmVGb3J3YXJkUmVmKHR5cGVBbnkpKTsKICAgICAgICAgICAgICAgIHJldHVybiBmYWN0b3J5ID8gZmFjdG9yeSgpIDogbnVsbDsKICAgICAgICAgICAgfSkpKSk7CiAgICAgICAgfQogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBkZWYgPSBnZXRJbmplY3RhYmxlRGVmKHR5cGVBbnkpIHx8IGdldEluamVjdG9yRGVmKHR5cGVBbnkpOwogICAgICAgIGlmICghZGVmIHx8IGRlZi5mYWN0b3J5ID09PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgfQogICAgICAgIHJldHVybiBkZWYuZmFjdG9yeTsKICAgIH0KCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcgYWRkZWQgYnkgdHNpY2tsZQogIC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hcyB3cm9uZyBhbmQKICAgICAgICAgICAgICAgICAgICAvLyB3ZSBuZWVkIHRvIGNsb25lIGZsYXQgc2luY2Ugd2UgbmVlZCB0byB3cml0ZSB0byBpdC4KICAgICAgICAgICAgICAgICAgICBkc3QgPSBsaXN0LnNsaWNlKDAsIGkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZmxhdHRlbihpdGVtLCBkc3QpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKGRzdCAhPT0gbGlzdCkgewogICAgICAgICAgICAgICAgZHN0LnB1c2goaXRlbSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIGRzdDsKICAgIH0KICAgIGZ1bmN0aW9uIGRlZXBGb3JFYWNoKGlucHV0LCBmbikgewogICAgICAgIGlucHV0LmZvckVhY2godmFsdWUgPT4gQXJyYXkuaXNBcnJheSh2YWx1ZSkgPyBkZWVwRm9yRWFjaCh2YWx1ZSwgZm4pIDogZm4odmFsdWUpKTsKICAgIH0KICAgIGZ1bmN0aW9uIGFkZFRvQXJyYXkoYXJyLCBpbmRleCwgdmFsdWUpIHsKICAgICAgICAvLyBwZXJmOiBhcnJheS5wdXNoIGlzIGZhc3RlciB0aGFuIGFycmF5LnNwbGljZSEKICAgICAgICBpZiAoaW5kZXggPj0gYXJyLmxlbmd0aCkgewogICAgICAgICAgICBhcnIucHVzaCh2YWx1ZSk7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICBhcnIuc3BsaWNlKGluZGV4LCAwLCB2YWx1ZSk7CiAgICAgICAgfQogICAgfQogICAgZnVuY3Rpb24gcmVtb3ZlRnJvbUFycmF5KGFyciwgaW5kZXgpIHsKICAgICAgICAvLyBwZXJmOiBhcnJheS5wb3AgaXMgZmFzdGVyIHRoYW4gYXJyYXkuc3BsaWNlIQogICAgICAgIGlmIChpbmRleCA+PSBhcnIubGVuZ3RoIC0gMSkgewogICAgICAgICAgICByZXR1c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cnJheSwgaW5kZXgsIHZhbHVlMSwgdmFsdWUyKSB7CiAgICAgICAgbmdEZXZNb2RlICYmIGFzc2VydExlc3NUaGFuT3JFcXVhbChpbmRleCwgYXJyYXkubGVuZ3RoLCAnQ2FuXCd0IGluc2VydCBwYXN0IGFycmF5IGVuZC4nKTsKICAgICAgICBsZXQgZW5kID0gYXJyYXkubGVuZ3RoOwogICAgICAgIGlmIChlbmQgPT0gaW5kZXgpIHsKICAgICAgICAgICAgLy8gaW5zZXJ0aW5nIGF0IHRoZSBlbmQuCiAgICAgICAgICAgIGFycmF5LnB1c2godmFsdWUxLCB2YWx1ZTIpOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChlbmQgPT09IDEpIHsKICAgICAgICAgICAgLy8gY29ybmVyIGNhc2Ugd2hlbiB3ZSBoYXZlIGxlc3MgaXRlbXMgaW4gYXJyYXkgdGhhbiB3ZSBoYXZlIGl0ZW1zIHRvIGluc2VydC4KICAgICAgICAgICAgYXJyYXkucHVzaCh2YWx1ZTIsIGFycmF5WzBdKTsKICAgICAgICAgICAgYXJyYXlbMF0gPSB2YWx1ZTE7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICBlbmQtLTsKICAgICAgICAgICAgYXJyYXkucHVzaChhcnJheVtlbmQgLSAxXSwgYXJyYXlbZW5kXSk7CiAgICAgICAgICAgIHdoaWxlIChlbmQgPiBpbmRleCkgewogICAgICAgICAgICAgICAgY29uc3QgcHJldmlvdXNFbmQgPSBlbmQgLSAyOwogICAgICAgICAgICAgICAgYXJyYXlbZW5kXSA9IGFycmF5W3ByZXZpb3VzRW5kXTsKICAgICAgICAgICAgICAgIGVuZC0tOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGFycmF5W2luZGV4XSA9IHZhbHVlMTsKICAgICAgICAgICAgYXJyYXlbaW5kZXggKyAxXSA9IHZhbHVlMjsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIFNldCBhIGB2YWx1ZWAgZm9yIGEgYGtleWAuCiAgICAgKgogICAgICogQHBhcmFtIGtleVZhbHVlQXJyYXkgdG8gbW9kaWZ5LgogICAgICogQHBhcmFtIGtleSBUaGUga2V5IHRvIGxvY2F0ZSBvciBjcmVhdGUuCiAgICAgKiBAcGFyYW0gdmFsdWUgVGhlIHZhbHVlIHRvIHNldCBmb3IgYSBga2V5YC4KICAgICAqIEByZXR1cm5zIGluZGV4IChhbHdheXMgZXZlbikgb2Ygd2hlcmUgdGhlIHZhbHVlIHZhcyBzZXQuCiAgICAgKi8KICAgIGZ1bmN0aW9uIGtleVZhbHVlQXJyYXlTZXQoa2V5VmFsdWVBcnJheSwga2V5LCB2YWx1ZSkgewogICAgICAgIGxldCBpbmRleCA9IGtleVZhbHVlQXJyYXlJbmRleE9mKGtleVZhbHVlQXJyYXksIGtleSk7CiAgICAgICAgaWYgKGluZGV4ID49IDApIHsKICAgICAgICAgICAgLy8gaWYgd2UgZm91bmQgaXQgc2V0IGl0LgogICAgICAgICAgICBrZXlWYWx1ZUFycmF5W2luZGV4IHwgMV0gPSB2YWx1ZTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIGluZGV4ID0gfmluZGV4OwogICAgICAgICAgICBhcnJheUluc2VydDIoa2V5VmFsdWVBcnJheSwgaW5kZXgsIGtleSwgdmFsdWUpOwogICAgICAgIH0KICAgICAgICByZXR1cm4gaW5kZXg7CiAgICB9CiAgICAvKioKICAgICAqIFJldHJpZXZlIGEgYHZhbHVlYCBmb3IgYSBga2V5YCAob24gYHVuZGVmaW5lZGAgaWYgbm90IGZvdW5kLikKICAgICAqCiAgICAgKiBAcGFyYW0ga2V5VmFsdWVBcnJheSB0byBzZWFyY2guCiAgICAgKiBAcGFyYW0ga2V5IFRoZSBrZXkgdG8gbG9jYXRlLgogICAgICogQHJldHVybiBUaGUgYHZhbHVlYCBzdG9yZWQgYXQgdGhlIGBrZXlgIGxvY2F0aW9uIG9yIGB1bmRlZmluZWQgaWYgbm90IGZvdW5kLgogICAgICovCiAgICBmdW5jdGlvbiBrZXlWYWx1ZUFycmF5R2V0KGtleVZhbHVlQXJyYXksIGtleSkgewogICAgICAgIGNvbnN0IGluZGV4ID0ga2V5VmFsdWVBcnJheUluZGV4T2Yoa2V5VmFsdWVBcnJheSwga2V5KTsKICAgICAgICBpZiAoaW5kZXggPj0gMCkgewogICAgICAgICAgICAvLyBpZiB3ZSBmb3VuZCBpdCByZXRyaWV2ZSBpdC4KICAgICAgICAgICAgcmV0dXJuIGtleVZhbHVlQXJyYXlbaW5kZXggfCAxXTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDsKICAgIH0KICAgIC8qKgogICAgICogUmV0cmlldmUgYSBga2V5YCBpbmRleCB2YWx1ZSBpbiB0aGUgYXJyYXkgb3IgYC0xYCBpZiBub3QgZm91bmQuCiAgICAgKgogICAgICogQHBhcmFtIGtleVZhbHVlQXJyYXkgdG8gc2VhcmNoLgogICAgICogQHBhcmFtIGtleSBUaGUga2V5IHRvIGxvY2F0ZS4KICAgICAqIEByZXR1cm5zIGluZGV4IG9mIHdoZXJlIHRoZSBrZXkgaXMgKG9yIHNob3VsZCBoYXZlIGJlZW4uKQogICAgICogICAtIHBvc2l0aXZlIChldmVuKSBpbmRleCBpZiBrZXkgZm91bmQuCiAgICAgKiAgIC0gbmVnYXRpdmUgaW5kZXggaWYga2V5IG5vdCBmb3VuZC4gKGB+aW5kZXhgIChldmVuKSB0byBnZXQgdGhlIGluZGV4IHdoZXJlIGl0IHNob3VsZCBoYXZlCiAgICAgKiAgICAgYmVlbiBpbnNlcnRlZC4pCiAgICAgKi8KICAgIGZ1bmN0aW9uIGtleVZhbHVlQXJyYXlJbmRleE9mKGtleVZhbHVlQXJyYXksIGtleSkgewogICAgICAgIHJldHVybiBfYXJyYXlJbmRleE9mU29ydGVkKGtleVZhbHVlQXJyYXksIGtleSwgMSk7CiAgICB9CiAgICAvKioKICAgICAqIElOVEVSTkFMOiBHZXQgYW4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7CiAgICAgICAgLy8gdHNsaW50OmRpc2FibGUtbmV4dC1saW5lOm5vLXRvcGxldmVsLXByb3BlcnR5LWFjY2VzcwogICAgICAgIE9iamVjdC5mcmVlemUoRU1QVFlfQVJSQVkpOwogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogcGFja2FnZXMvY29yZS9zcmMvcmVuZGVyMy9kZWZpbml0aW9uLnRzCiAgICAgKiBAc3VwcHJlc3Mge2NoZWNrVHlwZXMsY29uc3RhbnRQcm9wZXJ0eSxleHRyYVJlcXVpcmUsbWlzc2luZ092ZXJyaWRlLG1pc3NpbmdSZXR1cm4sdW51c2VkUHJpdmF0ZU1lbWJlcnMsdXNlbGVzc0NvZGV9IGNoZWNrZWQgYnkgdHNjCiAgICAgKi8KICAgIC8qKiBAdHlwZSB7P30gKi8KICAgIGxldCBfcmVuZGVyQ29tcENvdW50ID0gMDsKICAgIC8qKgogICAgICogQ3JlYXRlIGEgY29tcG9uZW50IGRlZmluaXRpb24gb2JqZWN0LgogICAgICoKICAgICAqCiAgICAgKiAjIEV4YW1wbGUKICAgICAqIGBgYAogICAgICogY2xhc3MgTXlEaXJlY3RpdmUgewogICAgICogICAvLyBHZW5lcmF0ZWQgYnkgQW5ndWxhciBUZW1wbGF0ZSBDb21waWxlcgogICAgICogICAvLyBbU3ltYm9sXSBzeW50YXggd2lsbCBub3QgYmUgc3VwcG9ydGVkIGJ5IFR5cGVTY3JpcHQgdW50aWwgdjIuNwogICAgICogICBzdGF0aWMgybVjbXAgPSBkZWZpbmVDb21wb25lbnQoewogICAgICogICAgIC4uLgogICAgICogICB9KTsKICAgICAqIH0KICAgICAqIGBgYAogICAgICogXEBjb2RlR2VuQXBpCiAgICAgKiBAdGVtcGxhdGUgVAogICAgICogQHBhcmFtIHs/fSBjb21wb25lbnREZWZpbml0aW9uCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiDJtcm1ZGVmaW5lQ29tcG9uZW50KGNvbXBvbmVudERlZmluaXRpb24pIHsKICAgICAgICByZXR1cm4gbm9TaWRlRWZmZWN0cygoLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgIC8vIEluaXRpYWxpemUgbmdEZXZNb2RlLiBUaGlzIG11c3QgYmUgdGhlIGZpcnN0IHN0YXRlbWVudCBpbiDJtcm1ZGVmaW5lQ29tcG9uZW50LgogICAgICAgICAgICAvLyBTZWUgdGhlIGBpbml0TmdEZXZNb2RlYCBkb2NzdHJpbmcgZm9yIG1vcmUgaW5mb3JtYXRpb24uCiAgICAgICAgICAgICh0eXBlb2YgbmdEZXZNb2RlID09PSAndW5kZWZpbmVkJyB8fCBuZ0Rldk1vZGUpICYmIGluaXROZ0Rldk1vZGUoKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB0eXBlID0gY29tcG9uZW50RGVmaW5pdGlvbi50eXBlOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHR5cGVQcm90b3R5cGUgPSB0eXBlLnByb3RvdHlwZTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBkZWNsYXJlZElucHV0cyA9ICgvKiogQHR5cGUgez99ICovICh7fSkpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGRlZiA9IHsKICAgICAgICAgICAgICAgIHR5cGU6IHR5cGUsCiAgICAgICAgICAgICAgICBwcm92aWRlcnNSZXNvbHZlcjogbnVsbCwKICAgICAgICAgICAgICAgIGRlY2xzOiBjb21wb25lbnREZWZpbml0aW9uLmRlY2xzLAogICAgICAgICAgICAgICAgdmFyczogY29tcG9uZW50RGVmaW5pdGlvbi52YXJzLAogICAgICAgICAgICAgICAgZmFjdG9yeTogbnVsbCwKICAgICAgICAgICAgICAgIHRlbXBsYXRlOiBjb21wb25lbnREZWZpbml0aW9uLnRlbXBsYXRlIHx8ICgvKiogQHR5cGUgez99ICovIChudWxsKSksCiAgICAgICAgICAgICAgICBjb25zdHM6IGNvbXBvbmVudERlZmluaXRpb24uY29uc3RzIHx8IG51bGwsCiAgICAgICAgICAgICAgICBuZ0NvbnRlbnRTZWxlY3RvcnM6IGNvbXBvbmVudERlZmluaXRpb24ubmdDb250ZW50U2VsZWN0b3JzLAogICAgICAgICAgICAgICAgaG9zdEJpbmRpbmdzOiBjb21wb25lbnREZWZpbml0aW9uLmhvc3RCaW5kaW5ncyB8fCBudWxsLAogICAgICAgICAgICAgICAgaG9zdFZhcnM6IGNvbXBvbmVudERlZmluaXRpb24uaG9zdFZhcnMgfHwgMCwKICAgICAgICAgICAgICAgIGhvc3RBdHRyczogY29tcG9uZW50RGVmaW5pdGlvbi5ob3N0QXR0cnMgfHwgbnVsbCwKICAgICAgICAgICAgICAgIGNvbnRlbnRRdWVyaWVzOiBjb21wb25lbnREZWZpbml0aW9uLmNvbnRlbnRRdWVyaWVzIHx8IG51bGwsCiAgICAgICAgICAgICAgICBkZWNsYXJlZElucHV0czogZGVjbGFyZWRJbnB1dHMsCiAgICAgICAgICAgICAgICBpbnB1dHM6ICgvKiogQHR5cGUgez99ICovIChudWxsKSksCiAgICAgICAgICAgICAgICAvLyBhc3NpZ25lZCBpbiBub1NpZGVFZmZlY3RzCiAgICAgICAgICAgICAgICBvdXRwdXRzOiAoLyoqIEB0eXBlIHs/fSAqLyAobnVsbCkpLAogICAgICAgICAgICAgICAgLy8gYXNzaWduZWQgaW4gbm9TaWRlRWZmZWN0cwogICAgICAgICAgICAgICAgZXhwb3J0QXM6IGNvbXBvbmVudERlZmluaXRpb24uZXhwb3J0QXMgfHwgbnVsbCwKICAgICAgICAgICAgICAgIG9uQ2hhbmdlczogbnVsbCwKICAgICAgICAgICAgICAgIG9uSW5pdDogdHlwZVByb3RvdHlwZS5uZ09uSW5pdCB8fCBudWxsLAogICAgICAgICAgICAgICAgZG9DaGVjazogdHlwZVByb3RvdHlwZS5uZ0RvQ2hlY2sgfHwgbnVsbCwKICAgICAgICAgICAgICAgIGFmdGVyQ29udGVudEluaXQ6IHR5cGVQcm90b3R5cGUubmdBZnRlckNvbnRlbnRJbml0IHx8IG51bGwsCiAgICAgICAgICAgICAgICBhZnRlckNvbnRlbnRDaGVja2VkOiB0eXBlUHJvdG90eXBlLm5nQWZ0ZXJDb250ZW50Q2hlY2tlZCB8fCBudWxsLAogICAgICAgICAgICAgICAgYWZ0ZXJWaWV3SW5pdDogdHlwZVByb3RvdHlwZS5uZ0FmdGVyVmlld0luaXQgfHwgbnVsbCwKICAgICAgICAgICAgICAgIGFmdGVyVmlld0NoZWNrZWQ6IHR5cGVQcm90b3R5cGUubmdBZnRlclZpZXdDaGVja2VkIHx8IG51bGwsCiAgICAgICAgICAgICAgICBvbkRlc3Ryb3k6IHR5cGVQcm90b3R5cGUubmdPbkRlc3Ryb3kgfHwgbnVsbCwKICAgICAgICAgICAgICAgIG9uUHVzaDogY29tcG9uZW50RGVmaW5pdGlvbi5jaGFuZ2VEZXRlY3Rpb24gPT09IENoYW5nZURldGVjdGlvblN0cmF0ZWd5Lk9uUHVzaCwKICAgICAgICAgICAgICAgIGRpcmVjdGl2ZURlZnM6ICgvKiogQHR5cGUgez99ICovIChudWxsKSksCiAgICAgICAgICAgICAgICAvLyBhc3NpZ25lZCBpbiBub1NpZGVFZmZlY3RzCiAgICAgICAgICAgICAgICBwaXBlRGVmczogKC8qKiBAdHlwZSB7P30gKi8gKG51bGwpKSwKICAgICAgICAgICAgICAgIC8vIGFzc2lnbmVkIGluIG5vU2lkZUVmZmVjdHMKICAgICAgICAgICAgICAgIHNlbGVjdG9yczogY29tcG9uZW50RGVmaW5pdGlvbi5zZWxlY3RvcnMgfHwgRU1QVFlfQVJSQVksCiAgICAgICAgICAgICAgICB2aWV3UXVlcnk6IGNvbXBvbmVudERlZmluaXRpb24udmlld1F1ZXJ5IHx8IG51bGwsCiAgICAgICAgICAgICAgICBmZWF0dXJlczogKC8qKiBAdHlwZSB7P30gKi8gKGNvbXBvbmVudERlZmluaXRpb24uZmVhdHVyZXMpKSB8fCBudWxsLAogICAgICAgICAgICAgICAgZGF0YTogY29tcG9uZW50RGVmaW5pdGlvbi5kYXRhIHx8IHt9LAogICAgICAgICAgICAgICAgLy8gVE9ETyhtaXNrbyk6IGNvbnZlcnQgVmlld0VuY2Fwc3VsYXRpb24gaW50byBjb25zdCBlbnVtIHNvIHRoYXQgaXQgY2FuIGJlIHVzZWQgZGlyZWN0bHkgaW4KICAgICAgICAgICAgICAgIC8vIHRoZSBuZXh0IGxpbmUuIEFsc28gYE5vbmVgIHNob3VsZCBiZSAwIG5vdCAyLgogICAgICAgICAgICAgICAgZW5jYXBzdWxhdGlvbjogY29tcG9uZW50RGVmaW5pdGlvbi5lbmNhcHN1bGF0aW9uIHx8IFZpZXdFbmNhcHN1bGF0aW9uJDEuRW11bGF0ZWQsCiAgICAgICAgICAgICAgICBpZDogJ2MnLAogICAgICAgICAgICAgICAgc3R5bGVzOiBjb21wb25lbnREZWZpbml0aW9uLnN0eWxlcyB8fCBFTVBUWV9BUlJBWSwKICAgICAgICAgICAgICAgIF86ICgvKiogQHR5cGUgez99ICovIChudWxsKSksCiAgICAgICAgICAgICAgICBzZXRJbnB1dDogbnVsbCwKICAgICAgICAgICAgICAgIHNjaGVtYXM6IGNvbXBvbmVudERlZmluaXRpb24uc2NoZW1hcyB8fCBudWxsLAogICAgICAgICAgICAgICAgdFZpZXc6IG51bGwsCiAgICAgICAgICAgIH07CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZGlyZWN0aXZlVHlwZXMgPSAoLyoqIEB0eXBlIHs/fSAqLyAoY29tcG9uZW50RGVmaW5pdGlvbi5kaXJlY3RpdmVzKSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZmVhdHVyZSA9IGNvbXBvbmVudERlZmluaXRpb24uZmVhdHVyZXM7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcGlwZVR5cGVzID0gKC8qKiBAdHlwZSB7P30gKi8gKGNvbXBvbmVudERlZmluaXRpb24ucGlwZXMpKTsKICAgICAgICAgICAgZGVmLmlkICs9IF9yZW5kZXJDb21wQ291bnQrKzsKICAgICAgICAgICAgZGVmLmlucHV0cyA9IGludmVydE9iamVjdChjb21wb25lbnREZWZpbml0aW9uLmlucHV0cywgZGVjbGFyZWRJbnB1dHMpLAogICAgICAgICAgICAgICAgZGVmLm91dHB1dHMgPSBpbnZlcnRPYmplY3QoY29tcG9uZW50RGVmaW5pdGlvbi5vdXRwdXRzKSwKICAgICAgICAgICAgICAgIGZlYXR1cmUgJiYgZmVhdHVyZS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChmbikgPT4gZm4oZGVmKSkpOwogICAgICAgICAgICBkZWYuZGlyZWN0aXZlRGVmcyA9IGRpcmVjdGl2ZVR5cGVzID8KICAgICAgICAgICAgICAgICgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+ICh0eXBlb2YgZGlyZWN0aXZlVHlwZXMgPT09ICdmdW5jdGlvbicgPyBkaXJlY3RpdmVUeXBlcygpIDogZGlyZWN0aXZlVHlwZXMpCiAgICAgICAgICAgICAgICAgICAgLm1hcChleHRyYWN0RGlyZWN0aXZlRGVmKSkgOgogICAgICAgICAgICAgICAgbnVsbDsKICAgICAgICAgICAgZGVmLnBpcGVEZWZzID0gcGlwZVR5cGVzID8KICAgICAgICAgICAgICAgICgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+ICh0eXBlb2YgcGlwZVR5cGVzID09PSAnZnVuY3Rpb24nID8gcGlwZVR5cGVzKCkgOiBwaXBlVHlwZXMpLm1hcChleHRyYWN0UGlwZURlZikpIDoKICAgICAgICAgICAgICAgIG51bGw7CiAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAoZGVmKSk7CiAgICAgICAgfSkpOwogICAgfQogICAgLyoqCiAgICAgKiBcQGNvZGVHZW5BcGkKICAgICAqIEBwYXJhbSB7P30gdHlwZQogICAgICogQHBhcmFtIHs/fSBkaXJlY3RpdmVzCiAgICAgKiBAcGFyYW0gez99IHBpcGVzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiDJtcm1c2V0Q29tcG9uZW50U2NvcGUodHlwZSwgZGlyZWN0aXZlcywgcGlwZXMpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgZGVmID0gKCgvKiogQHR5cGUgez99ICovICh0eXBlLsm1Y21wKSkpOwogICAgICAgIGRlZi5kaXJlY3RpdmVEZWZzID0gKC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgKCkgPT4gZGlyZWN0aXZlcy5tYXAoZXh0cmFjdERpcmVjdGl2ZURlZikpOwogICAgICAgIGRlZi5waXBlRGVmcyA9ICgvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgICgpID0+IHBpcGVzLm1hcChleHRyYWN0UGlwZURlZikpOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHR5cGUKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGV4dHJhY3REaXJlY3RpdmVEZWYodHlwZSkgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBkZWYgPSBnZXRDb21wb25lbnREZWYodHlwZSkgfHwgZ2V0RGlyZWN0aXZlRGVmKHR5cGUpOwogICAgICAgIGlmIChuZ0Rldk1vZGUgJiYgIWRlZikgewogICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYCcke3R5cGUubmFtZX0nIGlzIG5laXRoZXIgJ0NvbXBvbmVudFR5cGUnIG9yICdEaXJlY3RpdmVUeXBlJy5gKTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovIChkZWYpKTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB0eXBlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBleHRyYWN0UGlwZURlZih0eXBlKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGRlZiA9IGdldFBpcGVEZWYodHlwZSk7CiAgICAgICAgaWYgKG5nRGV2TW9kZSAmJiAhZGVmKSB7CiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgJyR7dHlwZS5uYW1lfScgaXMgbm90IGEgJ1BpcGVUeXBlJy5gKTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovIChkZWYpKTsKICAgIH0KICAgIC8qKiBAdHlwZSB7P30gKi8KICAgIGNvbnN0IGF1dG9SZWdpc3Rlck1vZHVsZUJ5SWQgPSB7fTsKICAgIC8qKgogICAgICogXEBjb2RlR2VuQXBpCiAgICAgKiBAdGVtcGxhdGUgVAogICAgICogQHBhcmFtIHs/fSBkZWYKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIMm1ybVkZWZpbmVOZ01vZHVsZShkZWYpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgcmVzID0gewogICAgICAgICAgICB0eXBlOiBkZWYudHlwZSwKICAgICAgICAg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B3ZXJlIHRoZQogICAgICogbWluaWZpZWQga2V5cywgYXJlIHBhcnQgb2YgdGhlIHZhbHVlcywgYW5kIHRoZSB2YWx1ZXMgYXJlIHBhcnNlZCBzbyB0aGF0CiAgICAgKiB0aGUgcHVibGljTmFtZSBvZiB0aGUgcHJvcGVydHkgaXMgdGhlIG5ldyBrZXkKICAgICAqCiAgICAgKiBlLmcuIGZvcgogICAgICoKICAgICAqIGBgYAogICAgICogY2xhc3MgQ29tcCB7CiAgICAgKiBcQElucHV0KCkKICAgICAqICAgcHJvcE5hbWUxOiBzdHJpbmc7CiAgICAgKgogICAgICogXEBJbnB1dCgncHVibGljTmFtZTInKQogICAgICogICBkZWNsYXJlZFByb3BOYW1lMjogbnVtYmVyOwogICAgICogfQogICAgICogYGBgCiAgICAgKgogICAgICogd2lsbCBiZSBzZXJpYWxpemVkIGFzCiAgICAgKgogICAgICogYGBgCiAgICAgKiB7CiAgICAgKiAgIHByb3BOYW1lMTogJ3Byb3BOYW1lMScsCiAgICAgKiAgIGRlY2xhcmVkUHJvcE5hbWUyOiBbJ3B1YmxpY05hbWUyJywgJ2RlY2xhcmVkUHJvcE5hbWUyJ10sCiAgICAgKiB9CiAgICAgKiBgYGAKICAgICAqCiAgICAgKiB3aGljaCBpcyB0aGFuIHRyYW5zbGF0ZWQgYnkgdGhlIG1pbmlmaWVyIGFzOgogICAgICoKICAgICAqIGBgYAogICAgICogewogICAgICogICBtaW5pZmllZFByb3BOYW1lMTogJ3Byb3BOYW1lMScsCiAgICAgKiAgIG1pbmlmaWVkUHJvcE5hbWUyOiBbJ3B1YmxpY05hbWUyJywgJ2RlY2xhcmVkUHJvcE5hbWUyJ10sCiAgICAgKiB9CiAgICAgKiBgYGAKICAgICAqCiAgICAgKiBiZWNvbWVzOiAocHVibGljIG5hbWUgPT4gbWluaWZpZWROYW1lKQogICAgICoKICAgICAqIGBgYAogICAgICogewogICAgICogICdwcm9wTmFtZTEnOiAnbWluaWZpZWRQcm9wTmFtZTEnLAogICAgICogICdwdWJsaWNOYW1lMic6ICdtaW5pZmllZFByb3BOYW1lMicsCiAgICAgKiB9CiAgICAgKiBgYGAKICAgICAqCiAgICAgKiBPcHRpb25hbGx5IHRoZSBmdW5jdGlvbiBjYW4gdGFrZSBgc2Vjb25kYXJ5YCB3aGljaCB3aWxsIHJlc3VsdCBpbjogKHB1YmxpYyBuYW1lID0+IGRlY2xhcmVkIG5hbWUpCiAgICAgKgogICAgICogYGBgCiAgICAgKiB7CiAgICAgKiAgJ3Byb3BOYW1lMSc6ICdwcm9wTmFtZTEnLAogICAgICogICdwdWJsaWNOYW1lMic6ICdkZWNsYXJlZFByb3BOYW1lMicsCiAgICAgKiB9CiAgICAgKiBgYGAKICAgICAqCiAgICAgKiBAdGVtcGxhdGUgVAogICAgICogQHBhcmFtIHs/PX0gb2JqCiAgICAgKiBAcGFyYW0gez89fSBzZWNvbmRhcnkKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGludmVydE9iamVjdChvYmosIHNlY29uZGFyeSkgewogICAgICAgIGlmIChvYmogPT0gbnVsbCkKICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovIChFTVBUWV9PQkopKTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgbmV3TG9va3VwID0ge307CiAgICAgICAgZm9yIChjb25zdCBtaW5pZmllZEtleSBpbiBvYmopIHsKICAgICAgICAgICAgaWYgKG9iai5oYXNPd25Qcm9wZXJ0eShtaW5pZmllZEtleSkpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCBwdWJsaWNOYW1lID0gKC8qKiBAdHlwZSB7P30gKi8gKG9ialttaW5pZmllZEtleV0pKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCBkZWNsYXJlZE5hbWUgPSBwdWJsaWNOYW1lOwogICAgICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkocHVibGljTmFtZSkpIHsKICAgICAgICAgICAgICAgICAgICBkZWNsYXJlZE5hbWUgPSBwdWJsaWNOYW1lWzFdOwogICAgICAgICAgICAgICAgICAgIHB1YmxpY05hbWUgPSBwdWJsaWNOYW1lWzBdOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgbmV3TG9va3VwW3B1YmxpY05hbWVdID0gbWluaWZpZWRLZXk7CiAgICAgICAgICAgICAgICBpZiAoc2Vjb25kYXJ5KSB7CiAgICAgICAgICAgICAgICAgICAgKHNlY29uZGFyeVtwdWJsaWNOYW1lXSA9ICgvKiogQHR5cGUgez99ICovIChkZWNsYXJlZE5hbWUpKSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIG5ld0xvb2t1cDsKICAgIH0KICAgIC8qKgogICAgICogQ3JlYXRlIGEgZGlyZWN0aXZlIGRlZmluaXRpb24gb2JqZWN0LgogICAgICoKICAgICAqICMgRXhhbXBsZQogICAgICogYGBgdHMKICAgICAqIGNsYXNzIE15RGlyZWN0aXZlIHsKICAgICAqICAgLy8gR2VuZXJhdGVkIGJ5IEFuZ3VsYXIgVGVtcGxhdGUgQ29tcGlsZXIKICAgICAqICAgLy8gW1N5bWJvbF0gc3ludGF4IHdpbGwgbm90IGJlIHN1cHBvcnRlZCBieSBUeXBlU2NyaXB0IHVudGlsIHYyLjcKICAgICAqICAgc3RhdGljIMm1ZGlyID0gybXJtWRlZmluZURpcmVjdGl2ZSh7CiAgICAgKiAgICAgLi4uCiAgICAgKiAgIH0pOwogICAgICogfQogICAgICogYGBgCiAgICAgKgogICAgICogXEBjb2RlR2VuQXBpCiAgICAgKiBAdHlwZSB7P30KICAgICAqLwogICAgY29uc3QgybXJtWRlZmluZURpcmVjdGl2ZSA9ICgvKiogQHR5cGUgez99ICovICgoLyoqIEB0eXBlIHs/fSAqLyAoybXJtWRlZmluZUNvbXBvbmVudCkpKSk7CiAgICAvKioKICAgICAqIENyZWF0ZSBhIHBpcGUgZGVmaW5pdGlvbiBvYmplY3QuCiAgICAgKgogICAgICogIyBFeGFtcGxlCiAgICAgKiBgYGAKICAgICAqIGNsYXNzIE15UGlwZSBpbXBsZW1lbnRzIFBpcGVUcmFuc2Zvcm0gewogICAgICogICAvLyBHZW5lcmF0ZWQgYnkgQW5ndWxhciBUZW1wbGF0ZSBDb21waWxlcgogICAgICogICBzdGF0aWMgybVwaXBlID0gZGVmaW5lUGlwZSh7CiAgICAgKiAgICAgLi4uCiAgICAgKiAgIH0pOwogICAgICogfQogICAgICogYGBgCiAgICAgKiBcQGNvZGVHZW5BcGkKICAgICAqIEB0ZW1wbGF0ZSBUCiAgICAgKiBAcGFyYW0gez99IHBpcGVEZWYgUGlwZSBkZWZpbml0aW9uIGdlbmVyYXRlZCBieSB0aGUgY29tcGlsZXIKICAgICAqCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiDJtcm1ZGVmaW5lUGlwZShwaXBlRGVmKSB7CiAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovICgoKC8qKiBAdHlwZSB7P30gKi8gKHsKICAgICAgICAgICAgdHlwZTogcGlwZURlZi50eXBlLAogICAgICAgICAgICBuYW1lOiBwaXBlRGVmLm5hbWUsCiAgICAgICAgICAgIGZhY3Rvcnk6IG51bGwsCiAgICAgICAgICAgIHB1cmU6IHBpcGVEZWYucHVyZSAhPT0gZmFsc2UsCiAgICAgICAgICAgIG9uRGVzdHJveTogcGlwZURlZi50eXBlLnByb3RvdHlwZS5uZ09uRGVzdHJveSB8fCBudWxsCiAgICAgICAgfSkpKSkpOwogICAgfQogICAgLyoqCiAgICAgKiBUaGUgZm9sbG93aW5nIGdldHRlciBtZXRob2RzIHJldHJpZXZlIHRoZSBkZWZpbml0aW9uIGZvcm0gdGhlIHR5cGUuIEN1cnJlbnRseSB0aGUgcmV0cmlldmFsCiAgICAgKiBob25vcnMgaW5oZXJpdGFuY2UsIGJ1dCBpbiB0aGUgZnV0dXJlIHdlIG1heSBjaGFuZ2UgdGhlIHJ1bGUgdG8gcmVxdWlyZSB0aGF0IGRlZmluaXRpb25zIGFyZQogICAgICogZXhwbGljaXQuIFRoaXMgd291bGQgcmVxdWlyZSBzb21lIHNvcnQgb2YgbWlncmF0aW9uIHN0cmF0ZWd5LgogICAgICogQHRlbXBsYXRlIFQKICAgICAqIEBwYXJhbSB7P30gdHlwZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0Q29tcG9uZW50RGVmKHR5cGUpIHsKICAgICAgICByZXR1cm4gdHlwZVtOR19DT01QX0RFRl0gfHwgbnVsbDsKICAgIH0KICAgIC8qKgogICAgICogQHRlbXBsYXRlIFQKICAgICAqIEBwYXJhbSB7P30gdHlwZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0RGlyZWN0aXZlRGVmKHR5cGUpIHsKICAgICAgICByZXR1cm4gdHlwZVtOR19ESVJfREVGXSB8fCBudWxsOwogICAgfQogICAgLyoqCiAgICAgKiBAdGVtcGxhdGUgVAogICAgICogQHBhcmFtIHs/fSB0eXBlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBnZXRQaXBlRGVmKHR5cGUpIHsKICAgICAgICByZXR1cm4gdHlwZVtOR19QSVBFX0RFRl0gfHwgbnVsbDsKICAgIH0KICAgIC8qKgogICAgICogQHRlbXBsYXRlIFQKICAgICAqIEBwYXJhbSB7P30gdHlwZQogICAgICogQHBhcmFtIHs/PX0gdGhyb3dOb3RGb3VuZAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0RmFjdG9yeURlZih0eXBlLCB0aHJvd05vdEZvdW5kKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGhhc0ZhY3RvcnlEZWYgP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sKICAgIC8qKiBAdHlwZSB7P30gKi8KICAgIGNvbnN0IEZMQUdTID0gMjsKICAgIC8qKiBAdHlwZSB7P30gKi8KICAgIGNvbnN0IFBBUkVOVCA9IDM7CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBORVhUID0gNDsKICAgIC8qKiBAdHlwZSB7P30gKi8KICAgIGNvbnN0IFRSQU5TUExBTlRFRF9WSUVXU19UT19SRUZSRVNIID0gNTsKICAgIC8qKiBAdHlwZSB7P30gKi8KICAgIGNvbnN0IFRfSE9TVCA9IDY7CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBDTEVBTlVQID0gNzsKICAgIC8qKiBAdHlwZSB7P30gKi8KICAgIGNvbnN0IENPTlRFWFQgPSA4OwogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgSU5KRUNUT1IkMSA9IDk7CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBSRU5ERVJFUl9GQUNUT1JZID0gMTA7CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBSRU5ERVJFUiA9IDExOwogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgU0FOSVRJWkVSID0gMTI7CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBDSElMRF9IRUFEID0gMTM7CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBDSElMRF9UQUlMID0gMTQ7CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBERUNMQVJBVElPTl9WSUVXID0gMTU7CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBERUNMQVJBVElPTl9DT01QT05FTlRfVklFVyA9IDE2OwogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgREVDTEFSQVRJT05fTENPTlRBSU5FUiA9IDE3OwogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgUFJFT1JERVJfSE9PS19GTEFHUyA9IDE4OwogICAgLyoqIEB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gdmFsdWVbVFlQRV0gPT09ICdvYmplY3QnOwogICAgfQogICAgLyoqCiAgICAgKiBUcnVlIGlmIGB2YWx1ZWAgaXMgYExDb250YWluZXJgLgogICAgICogQHBhcmFtIHs/fSB2YWx1ZSB3cmFwcGVkIHZhbHVlIG9mIGBSTm9kZWAsIGBMVmlld2AsIGBMQ29udGFpbmVyYAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gaXNMQ29udGFpbmVyKHZhbHVlKSB7CiAgICAgICAgcmV0dXJuIEFycmF5LmlzQXJyYXkodmFsdWUpICYmIHZhbHVlW1RZUEVdID09PSB0cnVlOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHROb2RlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBpc0NvbnRlbnRRdWVyeUhvc3QodE5vZGUpIHsKICAgICAgICByZXR1cm4gKHROb2RlLmZsYWdzICYgOCAvKiBoYXNDb250ZW50UXVlcnkgKi8pICE9PSAwOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHROb2RlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBpc0NvbXBvbmVudEhvc3QodE5vZGUpIHsKICAgICAgICByZXR1cm4gKHROb2RlLmZsYWdzICYgMiAvKiBpc0NvbXBvbmVudEhvc3QgKi8pID09PSAyIC8qIGlzQ29tcG9uZW50SG9zdCAqLzsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB0Tm9kZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gaXNEaXJlY3RpdmVIb3N0KHROb2RlKSB7CiAgICAgICAgcmV0dXJuICh0Tm9kZS5mbGFncyAmIDEgLyogaXNEaXJlY3RpdmVIb3N0ICovKSA9PT0gMSAvKiBpc0RpcmVjdGl2ZUhvc3QgKi87CiAgICB9CiAgICAvKioKICAgICAqIEB0ZW1wbGF0ZSBU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sbAogICAgICAgICAgICAvLyBgQXJyYXkuaXNBcnJheSgpYCB0d2ljZSBhbmQgZ2l2ZSBKSVRlciBtb3JlIHdvcmsgZm9yIGlubGluaW5nLgogICAgICAgICAgICBpZiAodHlwZW9mIHZhbHVlW1RZUEVdID09PSAnb2JqZWN0JykKICAgICAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAodmFsdWUpKTsKICAgICAgICAgICAgdmFsdWUgPSAoLyoqIEB0eXBlIHs/fSAqLyAodmFsdWVbSE9TVF0pKTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIG51bGw7CiAgICB9CiAgICAvKioKICAgICAqIFJldHJpZXZlcyBhbiBlbGVtZW50IHZhbHVlIGZyb20gdGhlIHByb3ZpZGVkIGB2aWV3RGF0YWAsIGJ5IHVud3JhcHBpbmcKICAgICAqIGZyb20gYW55IGNvbnRhaW5lcnMsIGNvbXBvbmVudCB2aWV3cywgb3Igc3R5bGUgY29udGV4dHMuCiAgICAgKiBAcGFyYW0gez99IGluZGV4CiAgICAgKiBAcGFyYW0gez99IGxWaWV3CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBnZXROYXRpdmVCeUluZGV4KGluZGV4LCBsVmlldykgewogICAgICAgIHJldHVybiB1bndyYXBSTm9kZShsVmlld1tpbmRleCArIEhFQURFUl9PRkZTRVRdKTsKICAgIH0KICAgIC8qKgogICAgICogUmV0cmlldmUgYW4gYFJOb2RlYCBmb3IgYSBnaXZlbiBgVE5vZGVgIGFuZCBgTFZpZXdgLgogICAgICoKICAgICAqIFRoaXMgZnVuY3Rpb24gZ3VhcmFudGVlcyBpbiBkZXYgbW9kZSB0byByZXRyaWV2ZSBhIG5vbi1udWxsIGBSTm9kZWAuCiAgICAgKgogICAgICogQHBhcmFtIHs/fSB0Tm9kZQogICAgICogQHBhcmFtIHs/fSBsVmlldwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ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A9IHVud3JhcFJOb2RlKGxWaWV3W2luZGV4XSk7CiAgICAgICAgICAgIG5nRGV2TW9kZSAmJiBub2RlICE9PSBudWxsICYmICFpc1Byb2NlZHVyYWxSZW5kZXJlcihsVmlld1tSRU5ERVJFUl0pICYmIGFzc2VydERvbU5vZGUobm9kZSk7CiAgICAgICAgICAgIHJldHVybiBub2RlOwogICAgICAgIH0KICAgICAgICByZXR1cm4gbnVsbDsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB0VmlldwogICAgICogQHBhcmFtIHs/fSBpbmRleAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0VE5vZGUodFZpZXcsIGluZGV4KSB7CiAgICAgICAgbmdEZXZNb2RlICYmIGFzc2VydEdyZWF0ZXJUaGFuKGluZGV4LCAtMSwgJ3dyb25nIGluZGV4IGZvciBUTm9kZScpOwogICAgICAgIG5nRGV2TW9kZSAmJiBhc3NlcnRMZXNzVGhhbihpbmRleCwgdFZpZXcuZGF0YS5sZW5ndGgsICd3cm9uZyBpbmRleCBmb3IgVE5vZGUnKTsKICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKHRWaWV3LmRhdGFbaW5kZXggKyBIRUFERVJfT0ZGU0VUXSkpOwogICAgfQogICAgLyoqCiAgICAgKiBSZXRyaWV2ZXMgYSB2YWx1ZSBmcm9tIGFueSBgTFZpZXdgIG9yIGBURGF0YWAuCiAgICAgKiBAdGVtcGxhdGUgVAogICAgICogQHBhcmFtIHs/fSB2aWV3CiAgICAgKiBAcGFyYW0gez99IGluZGV4CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBsb2FkKHZpZXcsIGluZGV4KSB7CiAgICAgICAgbmdEZXZNb2RlICYmIGFzc2VydERhdGFJblJhbmdlKHZpZXcsIGluZGV4ICsgSEVBREVSX09GRlNFVCk7CiAgICAgICAgcmV0dXJuIHZpZXdbaW5kZXggKyBIRUFERVJfT0ZGU0VUXTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBub2RlSW5kZXgKICAgICAqIEBwYXJhbSB7P30gaG9zdFZpZXcKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGdldENvbXBvbmVudExWaWV3QnlJbmRleChub2RlSW5kZXgsIGhvc3RWaWV3KSB7CiAgICAgICAgLy8gQ291bGQgYmUgYW4gTFZpZXcgb3IgYW4gTENvbnRhaW5lci4gSWYgTENvbnRhaW5lciwgdW53cmFwIHRvIGZpbmQgTFZpZXcuCiAgICAgICAgbmdEZXZNb2RlICYmIGFzc2VydERhdGFJblJhbmdlKGhvc3RWaWV3LCBub2RlSW5kZXgpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBzbG90VmFsdWUgPSBob3N0Vmlld1tub2RlSW5kZXhdOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBsVmlldyA9IGlzTFZpZXcoc2xvdFZhbHVlKSA/IHNsb3RWYWx1ZSA6IHNsb3RWYWx1ZVtIT1NUXTsKICAgICAgICByZXR1cm4gbFZpZXc7CiAgICB9CiAgICAvKioKICAgICAqIFJldHVybnMgdGhlIG1vbmtleS1wYXRjaCB2YWx1ZSBkYXRhIHByZXNlbnQgb24gdGhlIHRhcmdldCAod2hpY2ggY291bGQgYmUKICAgICAqIGEgY29tcG9uZW50LCBkaXJlY3RpdmUgb3IgYSBET00gbm9kZSkuCiAgICAgKiBAcGFyYW0gez99IHRhcmdldAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gcmVhZFBhdGNoZWREYXRhKHRhcmdldCkgewogICAgICAgIG5nRGV2TW9kZSAmJiBhc3NlcnREZWZpbmVkKHRhcmdldCwgJ1RhcmdldCBleHBlY3RlZCcpOwogICAgICAgIHJldHVybiB0YXJnZXRbTU9OS0VZX1BBVENIX0tFWV9OQU1FXSB8fCBudWxsOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHRhcmdldAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gcmVhZFBhdGNoZWRMVmlldyh0YXJnZXQpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgdmFsdWUgPSByZWFkUGF0Y2hlZERhdGEodGFyZ2V0KTsKICAgICAgICBpZiAodmFsdWUpIHsKICAgICAgICAgICAgcmV0dXJuIEFycmF5LmlzQXJyYXkodmFsdWUpID8gdmFsdWUgOiAoKC8qKiBAdHlwZSB7P30gKi8gKHZhbHVlKSkpLmxWaWV3OwogICAgICAgIH0KICAgICAgICByZXR1cm4gbnVsbDsKICAgIH0KICAgIC8qKgogICAgICogQ2hlY2tzIHdoZXRoZXIgYSBnaXZlbiB2aWV3IGlzIGluIGNyZWF0aW9uIG1vZGUKICAgICAqIEBwYXJhbSB7P30gdmlldwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gaXNDcmVhdGlvbk1vZGUodmlldykgewogICAgICAgIHJldHVybiAodmlld1tGTEFHU10gJiA0IC8qIENyZWF0aW9uTW9kZSAqLykgPT09IDQgLyogQ3JlYXRpb25Nb2RlICovOwogICAgfQogICAgLyoqCiAgICAgKiBSZXR1cm5zIGEgYm9vbGVhbiBmb3Igd2hldGhlciB0aGUgdmlldyBpcyBhdHRhY2hlZCB0byB0aGUgY2hhbmdlIGRldGVjdGlvbiB0cmVlLgogICAgICoKICAgICAqIE5vdGU6IFRoaXMgZGV0ZXJtaW5lcyB3aGV0aGVyIGEgdmlldyBzaG91bGQgYmUgY2hlY2tlZCwgbm90IHdoZXRoZXIgaXQncyBpbnNlcnRlZAogICAgICogaW50byBhIGNvbnRhaW5lci4gRm9yIHRoYXQsIHlvdSdsbCB3YW50IGB2aWV3QXR0YWNoZWRUb0NvbnRhaW5lcmAgYmVsb3cuCiAgICAgKiBAcGFyYW0gez99IHZpZXcKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHZpZXdBdHRhY2hlZFRvQ2hhbmdlRGV0ZWN0b3IodmlldykgewogICAgICAgIHJldHVybiAodmlld1tGTEFHU10gJiAxMjggLyogQXR0YWNoZWQgKi8pID09PSAxMjggLyogQXR0YWNoZWQgKi87CiAgICB9CiAgICAvKioKICAgICAqIFJldHVybnMgYSBib29sZWFuIGZvciB3aGV0aGVyIHRoZSB2aWV3IGlzIGF0dGFjaGVkIHRvIGEgY29udGFpbmVyLgogICAgICogQHBhcmFtIHs/fSB2aWV3CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiB2aWV3QXR0YWNoZWRUb0NvbnRhaW5lcih2aWV3KSB7CiAgICAgICAgcmV0dXJuIGlzTENvbnRhaW5lcih2aWV3W1BBUkVOVF0pOwogICAgfQogICAgLyoqCiAgICAgKiBSZXR1cm5zIGEgY29uc3RhbnQgZnJvbSBgVENvbnN0YW50c2AgaW5zdGFuY2UuCiAgICAgKiBAdGVtcGxhdGUgVAogICAgICogQHBhcmFtIHs/fSBjb25zdHMKICAgICAqIEBwYXJhbSB7P30gaW5kZXgKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGdldENvbnN0YW50KGNvbnN0cywgaW5kZXgpIHsKICAgICAgICByZXR1cm4gY29uc3RzID09PSBudWxsIHx8IGluZGV4ID09IG51bGwgPyBudWxsIDogKC8qKiBAdHlwZSB7P30gKi8gKCgvKiogQHR5cGUgez99ICovIChjb25zdHNbaW5kZXhdKSkpKTsKICAgIH0KICAgIC8qKgogICAgICogUmVzZXRzIHRoZSBwcmUtb3JkZXIgaG9vayBmbGFncyBvZiB0aGUgdmlldy4KICAgICAqIEBwYXJhbSB7P30gbFZpZXcgdGhlIExWaWV3IG9uIHdoaWNoIHRoZSBmbGFncyBhcmUgcmVzZXQKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1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F9WSUVXU19UT19SRUZSRVNIXSA9PT0gMSkgfHwKICAgICAgICAgICAgICAgIChhbW91bnQgPT09IC0xICYmIHZpZXdPckNvbnRhaW5lcltUUkFOU1BMQU5URURfVklFV1NfVE9fUkVGUkVTSF0gPT09IDApKSkgewogICAgICAgICAgICBwYXJlbnRbVFJBTlNQTEFOVEVEX1ZJRVdTX1RPX1JFRlJFU0hdICs9IGFtb3VudDsKICAgICAgICAgICAgdmlld09yQ29udGFpbmVyID0gcGFyZW50OwogICAgICAgICAgICBwYXJlbnQgPSBwYXJlbnRbUEFSRU5UXTsKICAgICAgICB9CiAgICB9CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBpbnN0cnVjdGlvblN0YXRlID0gewogICAgICAgIGxGcmFtZTogY3JlYXRlTEZyYW1lKG51bGwpLAogICAgICAgIGJpbmRpbmdzRW5hYmxlZDogdHJ1ZSwKICAgICAgICBjaGVja05vQ2hhbmdlc01vZGU6IGZhbHNlLAogICAgfTsKICAgIC8qKgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0RWxlbWVudERlcHRoQ291bnQoKSB7CiAgICAgICAgcmV0dXJuIGluc3RydWN0aW9uU3RhdGUubEZyYW1lLmVsZW1lbnREZXB0aENvdW50OwogICAgfQogICAgLyoqCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBpbmNyZWFzZUVsZW1lbnREZXB0aENvdW50KCkgewogICAgICAgIGluc3RydWN0aW9uU3RhdGUubEZyYW1lLmVsZW1lbnREZXB0aENvdW50Kys7CiAgICB9CiAgICAvKioKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGRlY3JlYXNlRWxlbWVudERlcHRoQ291bnQoKSB7CiAgICAgICAgaW5zdHJ1Y3Rpb25TdGF0ZS5sRnJhbWUuZWxlbWVudERlcHRoQ291bnQtLTsKICAgIH0KICAgIC8qKgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0QmluZGluZ3NFbmFibGVkKCkgewogICAgICAgIHJldHVybiBpbnN0cnVjdGlvblN0YXRlLmJpbmRpbmdzRW5hYmxlZDsKICAgIH0KICAgIC8qKgogICAgICogRW5hYmxlcyBkaXJlY3RpdmUgbWF0Y2hpbmcgb24gZWxlbWVudHMuCiAgICAgKgogICAgICogICogRXhhbXBsZToKICAgICAqIGBgYAogICAgICogPG15LWNvbXAgbXktZGlyZWN0aXZlPgogICAgICogICBTaG91bGQgbWF0Y2ggY29tcG9uZW50IC8gZGlyZWN0aXZlLgogICAgICogPC9teS1jb21wPgogICAgICogPGRpdiBuZ05vbkJpbmRhYmxlPgogICAgICogICA8IS0tIMm1ybVkaXNhYmxlQmluZGluZ3MoKSAtLT4KICAgICAqICAgPG15LWNvbXAgbXktZGlyZWN0aXZlPgogICAgICogICAgIFNob3VsZCBub3QgbWF0Y2ggY29tcG9uZW50IC8gZGlyZWN0aXZlIGJlY2F1c2Ugd2UgYXJlIGluIG5nTm9uQmluZGFibGUuCiAgICAgKiAgIDwvbXktY29tcD4KICAgICAqICAgPCEtLSDJtcm1ZW5hYmxlQmluZGluZ3MoKSAtLT4KICAgICAqIDwvZGl2PgogICAgICogYGBgCiAgICAgKgogICAgICogXEBjb2RlR2VuQXBpCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiDJtcm1ZW5hYmxlQmluZGluZ3MoKSB7CiAgICAgICAgaW5zdHJ1Y3Rpb25TdGF0ZS5iaW5kaW5nc0VuYWJsZWQgPSB0cnVlOwogICAgfQogICAgLyoqCiAgICAgKiBEaXNhYmxlcyBkaXJlY3RpdmUgbWF0Y2hpbmcgb24gZWxlbWVudC4KICAgICAqCiAgICAgKiAgKiBFeGFtcGxlOgogICAgICogYGBgCiAgICAgKiA8bXktY29tcCBteS1kaXJlY3RpdmU+CiAgICAgKiAgIFNob3VsZCBtYXRjaCBjb21wb25lbnQgLyBkaXJlY3RpdmUuCiAgICAgKiA8L215LWNvbXA+CiAgICAgKiA8ZGl2IG5nTm9uQmluZGFibGU+CiAgICAgKiAgIDwhLS0gybXJtWRpc2FibGVCaW5kaW5ncygpIC0tPgogICAgICogICA8bXktY29tcCBteS1kaXJlY3RpdmU+CiAgICAgKiAgICAgU2hvdWxkIG5vdCBtYXRjaCBjb21wb25lbnQgLyBkaXJlY3RpdmUgYmVjYXVzZSB3ZSBhcmUgaW4gbmdOb25CaW5kYWJsZS4KICAgICAqICAgPC9teS1jb21wPgogICAgICogICA8IS0tIMm1ybVlbmFibGVCaW5kaW5ncygpIC0tPgogICAgICogPC9kaXY+CiAgICAgKiBgYGAKICAgICAqCiAgICAgKiBcQGNvZGVHZW5BcGkKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIMm1ybVkaXNhYmxlQmluZGluZ3MoKSB7CiAgICAgICAgaW5zdHJ1Y3Rpb25TdGF0ZS5iaW5kaW5nc0VuYWJsZWQgPSBmYWxzZTsKICAgIH0KICAgIC8qKgogICAgICogUmV0dXJuIHRoZSBjdXJyZW50IGBMVmlld2AuCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBnZXRMVmlldygpIHsKICAgICAgICByZXR1cm4gaW5zdHJ1Y3Rpb25TdGF0ZS5sRnJhbWUubFZpZXc7CiAgICB9CiAgICAvKioKICAgICAqIFJldHVybiB0aGUgY3VycmVudCBgVFZpZXdgLgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0VFZpZXcoKSB7CiAgICAgICAgcmV0dXJuIGluc3RydWN0aW9uU3RhdGUubEZyYW1lLnRWaWV3OwogICAgfQogICAgLyoqCiAgICAgKiBSZXN0b3JlcyBgY29udGV4dFZpZXdEYXRhYCB0byB0aGUgZ2l2ZW4gT3BhcXVlVmlld1N0YXRlIGluc3RhbmNlLgogICAgICoKICAgICAqIFVzZWQgaW4gY29uanVu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ICAgfQogICAgLy8gdG9wIGxldmVsIHZhcmlhYmxlcyBzaG91bGQgbm90IGJlIGV4cG9ydGVkIGZvciBwZXJmb3JtYW5jZSByZWFzb25zIChQRVJGX05PVEVTLm1kKQogICAgLyoqCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBnZXRCaW5kaW5nUm9vdCgpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgbEZyYW1lID0gaW5zdHJ1Y3Rpb25TdGF0ZS5sRnJhbWU7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBpbmRleCA9IGxGcmFtZS5iaW5kaW5nUm9vdEluZGV4OwogICAgICAgIGlmIChpbmRleCA9PT0gLTEpIHsKICAgICAgICAgICAgaW5kZXggPSBsRnJhbWUuYmluZGluZ1Jvb3RJbmRleCA9IGxGcmFtZS50Vmlldy5iaW5kaW5nU3RhcnRJbmRleDsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGluZGV4OwogICAgfQogICAgLyoqCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBnZXRCaW5kaW5nSW5kZXgoKSB7CiAgICAgICAgcmV0dXJuIGluc3RydWN0aW9uU3RhdGUubEZyYW1lLmJpbmRpbmdJbmRleDsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gc2V0QmluZGluZ0luZGV4KHZhbHVlKSB7CiAgICAgICAgcmV0dXJuIGluc3RydWN0aW9uU3RhdGUubEZyYW1lLmJpbmRpbmdJbmRleCA9IHZhbHVlOwogICAgfQogICAgLyoqCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBuZXh0QmluZGluZ0luZGV4KCkgewogICAgICAgIHJldHVybiBpbnN0cnVjdGlvblN0YXRlLmxGcmFtZS5iaW5ka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dGVMRnJhbWUocGFyZW50KSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGxGcmFtZSA9IHsKICAgICAgICAgICAgcHJldmlvdXNPclBhcmVudFROb2RlOiAoLyoqIEB0eXBlIHs/fSAqLyAobnVsbCkpLAogICAgICAgICAgICAvLwogICAgICAgICAgICBpc1BhcmVudDogdHJ1ZSwKICAgICAgICAgICAgLy8KICAgICAgICAgICAgbFZpZXc6ICgvKiogQHR5cGUgez99ICovIChudWxsKSksCiAgICAgICAgICAgIC8vCiAgICAgICAgICAgIHRWaWV3OiAoLyoqIEB0eXBlIHs/fSAqLyAobnVsbCkpLAogICAgICAgICAgICAvLwogICAgICAgICAgICBzZWxlY3RlZEluZGV4OiAwLAogICAgICAgICAgICAvLwogICAgICAgICAgICBjb250ZXh0TFZpZXc6ICgvKiogQHR5cGUgez99ICovIChudWxsKSksCiAgICAgICAgICAgIC8vCiAgICAgICAgICAgIGVsZW1lbnREZXB0aENvdW50OiAwLAogICAgICAgICAgICAvLwogICAgICAgICAgICBjdXJyZW50TmFtZXNwYWNlOiBudWxsLAogICAgICAgICAgICAvLwogICAgICAgICAgICBjdXJyZW50U2FuaXRpemVyOiBudWxsLAogICAgICAgICAgICAvLwogICAgICAgICAgICBjdXJyZW50RGlyZWN0aXZlSW5kZXg6IC0xLAogICAgICAgICAgICAvLwogICAgICAgICAgICBiaW5kaW5nUm9vdEluZGV4OiAtMSwKICAgICAgICAgICAgLy8KICAgICAgICAgICAgYmluZGluZ0luZGV4OiAtMSwKICAgICAgICAgICAgLy8KICAgICAgICAgICAgY3VycmVudFF1ZXJ5SW5kZXg6IDAsCiAgICAgICAgICAgIC8vCiAgICAgICAgICAgIHBhcmVudDogKC8qKiBAdHlwZSB7P30gKi8gKHBhcmVudCkpLAogICAgICAgICAgICAvLwogICAgICAgICAgICBjaGlsZDogbnVsbCwKICAgICAgICB9OwogICAgICAgIHBhcmVudCAhPT0gbnVsbCAmJiAocGFy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mlldyA9ICgvKiogQHR5cGUgez99ICovIChudWxsKSk7CiAgICAgICAgb2xkTEZyYW1lLnNlbGVjdGVkSW5kZXggPSAwOwogICAgICAgIG9sZExGcmFtZS5jb250ZXh0TFZpZXcgPSAoLyoqIEB0eXBlIHs/fSAqLyAobnVsbCkpOwogICAgICAgIG9sZExGcmFtZS5lbGVtZW50RGVwdGhDb3VudCA9IDA7CiAgICAgICAgb2xkTEZyYW1lLmN1cnJlbnREaXJlY3RpdmVJbmRleCA9IC0xOwogICAgICAgIG9sZExGcmFtZS5jdXJyZW50TmFtZXNwYWNlID0gbnVsbDsKICAgICAgICBvbGRMRnJhbWUuY3VycmVudFNhbml0aXplciA9IG51bGw7CiAgICAgICAgb2xkTEZyYW1lLmJpbmRpbmdSb290SW5kZXggPSAtMTsKICAgICAgICBvbGRMRnJhbWUuYmluZGluZ0luZGV4ID0gLTE7CiAgICAgICAgb2xkTEZyYW1lLmN1cnJlbnRRdWVyeUluZGV4ID0gMDsKICAgIH0KICAgIC8qKgogICAgICogQHRlbXBsYXRlIFQKICAgICAqIEBwYXJhbSB7P30gbGV2ZWwKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIG5leHRDb250ZXh0SW1wbChsZXZlbCkgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBjb250ZXh0TFZpZXcgPSBpbnN0cnVjdGlvblN0YXRlLmxGcmFtZS5jb250ZXh0TFZpZXcgPQogICAgICAgICAgICB3YWxrVXBWaWV3cyhsZXZlbCwgKC8qKiBAdHlwZSB7P30gKi8gKGluc3RydWN0aW9uU3RhdGUubEZyYW1lLmNvbnRleHRMVmlldykpKTsKICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKGNvbnRleHRMVmlld1tDT05URVhUXSkpOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IG5lc3RpbmdMZXZlbAogICAgICogQHBhcmFtIHs/fSBjdXJyZW50VmlldwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gd2Fsa1VwVmlld3MobmVzdGluZ0xldmVsLCBjdXJyZW50VmlldykgewogICAgICAgIHdoaWxlIChuZXN0aW5nTGV2ZWwgPiAwKSB7CiAgICAgICAgICAgIG5nRGV2TW9kZSAmJgogICAgICAgICAgICAgICAgYXNzZXJ0RGVmaW5lZChjdXJyZW50Vmlld1tERUNMQVJBVElPTl9WSUVXXSwgJ0RlY2xhcmF0aW9uIHZpZXcgc2hvdWxkIGJlIGRlZmluZWQgaWYgbmVzdGluZyBsZXZlbCBpcyBncmVhdGVyIHRoYW4gMC4nKTsKICAgICAgICAgICAgY3VycmVudFZpZXcgPSAoLyoqIEB0eXBlIHs/fSAqLyAoY3VycmVudFZpZXdbREVDTEFSQVRJT05fVklFV10pKTsKICAgICAgICAgICAgbmVzdGluZ0xldmVsLS07CiAgICAgICAgfQogICAgICAgIHJldHVybiBjdXJyZW50VmlldzsKICAgIH0KICAgIC8qKgogICAgICogR2V0cyB0aGUgY3VycmVudGx5IHNlbGVjdGVkIGVsZW1lbnQgaW5kZXguCiAgICAgKgogICAgICogVXNlZCB3aXRoIHtcQGxpbmsgcHJvcGVydHl9IGluc3RydWN0aW9uIChhbmQgbW9yZSBpbiB0aGUgZnV0dXJlKSB0byBpZGVudGlmeSB0aGUgaW5kZXggaW4gdGhlCiAgICAgKiBjdXJyZW50IGBMVmlld2AgdG8gYWN0IG9uLgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0U2VsZWN0ZWRJbmRleCgpIHsKICAgICAgICByZXR1cm4gaW5zdHJ1Y3Rpb25TdGF0ZS5sRnJhbWUuc2VsZWN0ZWRJbmRleDsKICAgIH0KICAgIC8qKgogICAgICogU2V0cyB0aGUgbW9zdCByZWNlbnQgaW5kZXggcGFzc2VkIHRvIHtcQGxpbmsgc2VsZWN0fQogICAgICoKICAgICAqIFVzZWQgd2l0aCB7XEB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ICAgICAgICAgICh0Vmlldy5jb250ZW50SG9va3MgfHwgKHRWaWV3LmNvbnRlbnRIb29rcyA9IFtdKSkucHVzaChpLCBkaXJlY3RpdmVEZWYuYWZ0ZXJDb250ZW50Q2hlY2tlZCk7CiAgICAgICAgICAgICAgICAodFZpZXcuY29udGVudENoZWNrSG9va3MgfHwgKHRWaWV3LmNvbnRlbnRDaGVja0hvb2tzID0gW10pKQogICAgICAgICAgICAgICAgICAgIC5wdXNoKGksIGRpcmVjdGl2ZURlZi5hZnRlckNvbnRlbnRDaGVja2VkKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoZGlyZWN0aXZlRGVmLmFmdGVyVmlld0luaXQpIHsKICAgICAgICAgICAgICAgICh0Vmlldy52aWV3SG9va3MgfHwgKHRWaWV3LnZpZXdIb29rcyA9IFtdKSkucHVzaCgtaSwgZGlyZWN0aXZlRGVmLmFmdGVyVmlld0luaXQpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChkaXJlY3RpdmVEZWYuYWZ0ZXJWaWV3Q2hlY2tlZCkgewogICAgICAgICAgICAgICAgKHRWaWV3LnZpZXdIb29rcyB8fCAodFZpZXcudmlld0hvb2tzID0gW10pKS5wdXNoKGksIGRpcmVjdGl2ZURlZi5hZnRlclZpZXdDaGVja2VkKTsKICAgICAgICAgICAgICAgICh0Vmlldy52aWV3Q2hlY2tIb29rcyB8fCAodFZpZXcudmlld0NoZWNrSG9va3MgPSBbXSkpLnB1c2goaSwgZGlyZWN0aXZlRGVmLmFmdGVyVmlld0NoZWNrZWQpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChkaXJlY3RpdmVEZWYub25EZXN0cm95ICE9IG51bGwpIHsKICAgICAgICAgICAgICAgICh0Vmlldy5kZXN0cm95SG9va3MgfHwgKHRWaWV3LmRlc3Ryb3lIb29rcyA9IFtdKSkucHVzaChpLCBkaXJlY3RpdmVEZWYub25EZXN0cm95KTsKICAgICAgICAgICAgfQogICAgICAgIH0K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EFHU10gJiAzIC8qIEluaXRQaGFzZVN0YXRlTWFzayAqLykgPT09IGluaXRQaGFzZSkgewogICAgICAgICAgICBjYWxsSG9va3MobFZpZXcsIGhvb2tzLCBpbml0UGhhc2UsIG5vZGVJbmRleCk7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IGxWaWV3CiAgICAgKiBAcGFyYW0gez99IGluaXRQaGFzZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gaW5jcmVtZW50SW5pdFBoYXNlRmxhZ3MobFZpZXcsIGluaXRQaGFzZSkgewogICAgICAgIG5nRGV2TW9kZSAmJgogICAgICAgICAgICBhc3NlcnROb3RFcXVhbChpbml0UGhhc2UsIDMgLyogSW5pdFBoYXNlQ29tcGxldGVkICovLCAnSW5pdCBob29rcyBwaGFzZSBzaG91bGQgbm90IGJlIGluY3JlbWVudGVkIGFmdGVyIGFsbCBpbml0IGhvb2tzIGhhdmUgYmVlbiBydW4uJyk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBmbGFncyA9IGxWaWV3W0ZMQUdTXTsKICAgICAgICBpZiAoKGZsYWdzICYgMyAvKiBJbml0UGhhc2VTdGF0ZU1hc2sgKi8pID09PSBpbml0UGhhc2UpIHsKICAgICAgICAgICAgZmxhZ3MgJj0gMjA0NyAvKiBJbmRleFdpdGhpbkluaXRQaGFzZVJlc2V0ICovOwogICAgICAgICAgICBmbGFncyArPSAxIC8qIEluaXRQaGFzZVN0YXRlSW5jcmVtZW50ZXIgKi87CiAgICAgICAgICAgIGxWaWV3W0ZMQUdTXSA9IGZsYWdzOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQ2FsbHMgbGlmZWN5Y2xlIGhvb2tzIHdpdGggdGhlaXIgY29udGV4dHMsIHNraXBwaW5nIGluaXQgaG9va3MgaWYgaXQncyBub3QKICAgICAqIHRoZSBmaXJzdCBMVmlldyBwYXNzCiAgICAg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ICAgIGNvbnN0IHN0YXJ0SW5kZXggPSBjdXJyZW50Tm9kZUluZGV4ICE9PSB1bmRlZmluZWQgPwogICAgICAgICAgICAoY3VycmVudFZpZXdbUFJFT1JERVJfSE9PS19GTEFHU10gJiA2NTUzNSAvKiBJbmRleE9mVGhlTmV4dFByZU9yZGVySG9va01hc2tNYXNrICovKSA6CiAgICAgICAgICAgIDA7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IG5vZGVJbmRleExpbWl0ID0gY3VycmVudE5vZGVJbmRleCAhPSBudWxsID8gY3VycmVudE5vZGVJbmRleCA6IC0xOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgbGFzdE5vZGVJbmRleEZvdW5kID0gMDsKICAgICAgICBmb3IgKGxldCBpID0gc3RhcnRJbmRleDsgaSA8IGFyci5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGhvb2sgPSAoLyoqIEB0eXBlIHs/fSAqLyAoYXJyW2kgKyAxXSkpOwogICAgICAgICAgICBpZiAodHlwZW9mIGhvb2sgPT09ICdudW1iZXInKSB7CiAgICAgICAgICAgICAgICBsYXN0Tm9kZUluZGV4Rm91bmQgPSAoLyoqIEB0eXBlIHs/fSAqLyAoYXJyW2ldKSk7CiAgICAgICAgICAgICAgICBpZiAoY3VycmVudE5vZGVJbmRleCAhPSBudWxsICYmIGxhc3ROb2RlSW5kZXhGb3VuZCA+PSBjdXJyZW50Tm9kZUluZGV4KSB7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBpc0luaXRIb29rID0gYXJyW2ldIDwgMDsKICAgICAgICAgICAgICAgIGlmIChpc0luaXRIb29rKQogICAgICAgICAgICAgICAgICAgIGN1cnJlbnRWaWV3W1BSRU9SREVSX0hPT0tfRkxBR1NdICs9IDY1NTM2IC8qIE51bWJlck9mSW5pdEhvb2tzQ2FsbGVkSW5jcmVtZW50ZXIgKi87CiAgICAgICAgICAgICAgICBpZiAobGFzdE5vZGVJbmRleEZvdW5kIDwgbm9kZUluZGV4TGltaXQgfHwgbm9kZUluZGV4TGltaXQgPT0gLTEpIHsKICAgICAgICAgICAgICAgICAgICBjYWxsSG9vayhjdXJyZW50VmlldywgaW5pdFBoYXNlLCBhcnIsIGkpOwogICAgICAgICAgICAgICAgICAgIGN1cnJlbnRWaWV3W1BSRU9SREVSX0hPT0tfRkxBR1NdID0KICAgICAgICAgICAgICAgICAgICAgICAgKGN1cnJlbnRWaWV3W1BSRU9SREVSX0hPT0tfRkxBR1NdICYgNDI5NDkwMTc2MCAvKiBOdW1iZXJPZkluaXRIb29rc0NhbGxlZE1hc2sgKi8pICsgaSArCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaSsrOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBFeGVjdXRlIG9uZSBob29rIGFnYWluc3QgdGhlIGN1cnJlbnQgYExWaWV3YC4KICAgICAqCiAgICAgKiBAcGFyYW0gez99IGN1cnJlbnRWaWV3IFRoZSBjdXJyZW50IHZpZXcKICAgICAqIEBwYXJhbSB7P30gaW5pdFBoYXNlCiAgICAgKiBAcGFyYW0gez99IGFyciBUaGUgYXJyYXkgaW4gd2hpY2ggdGhlIGhvb2tzIGFyZSBmb3VuZAogICAgICogQHBhcmFtIHs/fSBpIFRoZSBjdXJyZW50IGluZGV4IHdpdGhpbiB0aGUgaG9vayBkYXRhIGFycmF5CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBjYWxsSG9vayhjdXJyZW50VmlldywgaW5pdFBoYXNlLCBhcnIsI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BbM106IG51bWJlcjsKICAgICAqCiAgICAgKiAgICAvLyBDdW11bGF0aXZlIGJsb29tIGZvciBkaXJlY3RpdmUgSURzIDEyOC0xNTkKICAgICAqICAgIFs0XTogbnVtYmVyOwogICAgICoKICAgICAqICAgIC8vIEN1bXVsYXRpdmUgYmxvb20gZm9yIGRpcmVjdGl2ZSBJRHMgMTYwIC0gMTkxCiAgICAgKiAgICBbNV06IG51bWJlcjsKICAgICAqCiAgICAgKiAgICAvLyBDdW11bGF0aXZlIGJsb29tIGZvciBkaXJlY3RpdmUgSURzIDE5MiAtIDIyMwogICAgICogICAgWzZdOiBudW1iZXI7CiAgICAgKgogICAgICogICAgLy8gQ3VtdWxhdGl2ZSBibG9vbSBmb3IgZGlyZWN0aXZlIElEcyAyMjQgLSAyNTUKICAgICAqICAgIFs3XTogbnVtYmVyOwogICAgICoKICAgICAqICAgIC8vIFdlIG5lZWQgdG8gc3RvcmUgYSByZWZlcmVuY2UgdG8gdGhlIGluamVjdG9yJ3MgcGFyZW50IHNvIERJIGNhbiBrZWVwIGxvb2tpbmcgdXAKICAgICAqICAgIC8vIHRoZSBpbmplY3RvciB0cmVlIHVudGlsIGl0IGZpbmRzIHRoZSBkZXBlbmRlbmN5IGl0J3MgbG9va2luZyBmb3IuCiAgICAgKiAgICBbUEFSRU5UX0lOSkVDVE9SXTogbnVtYmVyOwogICAgICogfQogICAgICoKICAgICAqIGV4cG9ydCBpbnRlcmZhY2UgVEluamVjdG9yIGV4dGVuZHMgQXJyYXk8YW55PiB7CiAgICAgKgogICAgICogICAgLy8gU2hhcmVkIG5vZGUgYmxvb20gZm9yIGRpcmVjdGl2ZSBJRHMgMC0zMSAgKElEcyBhcmUgJSBCTE9PTV9TSVpFKQogICAgICogICAgWzBdOiBudW1iZXI7CiAgICAgKgogICAgICogICAgLy8gU2hhcmVkIG5vZGUgYmxvb20gZm9yIGRpcmVjdGl2ZSBJRHMgMzItNjMKICAgICAqICAgIFsxXTogbnVtYmVyOwogICAgICo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UHJpdmF0ZU1lbWJlcnMsdXNlbGVzc0NvZGV9IGNoZWNrZWQgYnkgdHNjCiAgICAgKi8KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB0Tm9kZQogICAgICogQHBhcmFtIHs/fSB0eXBlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBhc3NlcnROb2RlVHlwZSh0Tm9kZSwgdHlwZSkgewogICAgICAgIGFzc2VydERlZmluZWQodE5vZGUsICdzaG91bGQgYmUgY2FsbGVkIHdpdGggYSBUTm9kZScpOwogICAgICAgIGFzc2VydEVxdWFsKHROb2RlLnR5cGUsIHR5cGUsIGBzaG91bGQgYmUgYSAke3R5cGVOYW1lKHR5cGUpfWApOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHROb2RlCiAgICAgKiBAcGFyYW0gey4uLj99IHR5cGVzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBhc3NlcnROb2RlT2ZQb3NzaWJsZVR5cGVzKHROb2RlLCAuLi50eXBlcykgewogICAgICAgIGFzc2VydERlZmluZWQodE5vZGUsICdzaG91bGQgYmUgY2FsbGVkIHdpdGggYSBUTm9kZScpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBmb3VuZCA9IHR5cGVzLnNvbWUoKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdHlwZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdHlwZSA9PiB0Tm9kZS50eXBlID09PSB0eXBlKSk7CiAgICAgICAgYXNzZXJ0RXF1YWwoZm91bmQsIHRydWUsIGBTaG91bGQgYmUgb25lIG9mICR7dHlwZXMubWFwKHR5cGVOYW1lKS5qb2luKCcsICcpfSBidXQgZ290ICR7dHlwZU5hbWUodE5vZGUudHlwZSl9YCk7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdHlwZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gdHlwZU5hbWUodHlwZSkgewogICAgICAgIGlmICh0eXBlID09IDEgLyogUHJvamVjdGlvbiAqLykKICAgICAgICAgICAgcmV0dXJuICdQcm9qZWN0aW9uJzsKICAgICAgICBpZiAodHlwZSA9PSAwIC8qIENvbnRhaW5lciAqLykKICAgICAgICAgICAgcmV0dXJuICdDb250YWluZXInOwogICAgICAgIGlmICh0eXBlID09IDUgLyogSWN1Q29udGFpbmVyICovKQogICAgICAgICAgICByZXR1cm4gJ0ljdUNvbnRhaW5lcic7CiAgICAgICAgaWYgKHR5cGUgPT0gMiAvKiBWaWV3ICovKQogICAgICAgICAgICByZXR1cm4gJ1ZpZXcnOwogICAgICAgIGlmICh0eXBlID09IDMgLyogRWxlbWVudCAqLykKICAgICAgICAgICAgcmV0dXJuICdFbGVtZW50JzsKICAgICAgICBpZiAodHlwZSA9PSA0IC8qIEVsZW1lbnRDb250YWluZXIgKi8pCiAgICAgICAgICAgIHJldHVybiAnRWxlbWVudENvbnRhaW5lcic7CiAgICAgICAgcmV0dXJuICc8dW5rbm93bj4nOwogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogcGFja2FnZXMvY29yZS9zcmMvcmVuZGVyMy91dGlsL2F0dHJzX3V0aWxzLnRzCiAgICAgKiBAc3VwcHJlc3Mge2NoZWNrVHlwZXMsY29uc3RhbnRQcm9wZXJ0eSxleHRyYVJlcXVpcmUsbWlzc2luZ092ZXJyaWRlLG1pc3NpbmdSZXR1cm4sdW51c2VkUHJpdmF0ZU1lbWJlcnMsdXNlbGVzc0NvZGV9IGNoZWNrZWQgYnkgdHNjCiAgICAgKi8KICAgIC8qKgogICAgICogQXNzaWducyBhbGwgYXR0cmlidXRlIHZhbHVlcyB0byB0aGUgcHJvdmlkZWQgZWxlbWVudCB2aWEgdGhlIGluZmVycmVkIHJl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GVvZiB2YWx1ZSA9PT0gJ251bWJlcicpIHsKICAgICAgICAgICAgICAgIC8vIG9ubHkgbmFtZXNwYWNlcyBhcmUgc3VwcG9ydGVkLiBPdGhlciB2YWx1ZSB0eXBlcyAoc3VjaCBhcyBzdHlsZS9jbGFzcwogICAgICAgICAgICAgICAgLy8gZW50cmllcykgYXJlIG5vdCBzdXBwb3J0ZWQgaW4gdGhpcyBmdW5jdGlvbi4KICAgICAgICAgICAgICAgIGlmICh2YWx1ZSAhPT0gMCAvKiBOYW1lc3BhY2VVUkkgKi8pIHsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vIHdlIGp1c3QgbGFuZGVkIG9uIHRoZSBtYXJrZXIgdmFsdWUgLi4uIHRoZXJlZm9yZQogICAgICAgICAgICAgICAgLy8gd2Ugc2hvdWxkIHNraXAgdG8gdGhlIG5leHQgZW50cnkKICAgICAgICAgICAgICAgIGkrKzsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IG5hbWVzcGFjZVVSSSA9ICgvKiogQHR5cGUgez99ICovIChhdHRyc1tpKytdKSk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBhdHRyTmFtZSA9ICgvKiogQHR5cGUgez99ICovIChhdHRyc1tpKytdKSk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBhdHRyVmFsID0gKC8qKiBAdHlwZSB7P30gKi8gKGF0dHJzW2krK10pKTsKICAgICAgICAgICAgICAgIG5nRGV2TW9kZSAmJiBuZ0Rldk1vZGUucmVuZGVyZXJTZXRBdHRyaWJ1dGUrKzsKICAgICAgICAgICAgICAgIGlzUHJvYyA/CiAgICAgICAgICAgICAgICAgICAgKCgvKiogQHR5cGUgez99ICovIChyZW5kZXJlcikpKS5zZXRBdHRyaWJ1dGUobmF0aXZlLCBhdHRyTmFtZSwgYXR0clZhbCwgbmFtZXNwYWNlVVJJKSA6CiAgICAgICAgICAgICAgICAgICAgbmF0aXZlLnNldEF0dHJpYnV0ZU5TKG5hbWVzcGFjZVVSSSwgYXR0ck5hbWUsIGF0dHJWYWwpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgLy8gYXR0ck5hbWUgaXMgc3RyaW5nOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgYXR0ck5hbWUgPSAoLyoqIEB0eXBlIHs/fSAqLyAodmFsdWUpKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGF0dHJWYWwgPSBhdHRyc1srK2ldOwogICAgICAgICAgICAgICAgLy8gU3RhbmRhcmQgYXR0cmlidXRlcwogICAgICAgICAgICAgICAgbmdEZXZNb2RlICYmIG5nRGV2TW9kZS5yZW5kZXJlclNldEF0dHJpYnV0ZSsrOwogICAgICAgICAgICAgICAgaWYgKGlzQW5pbWF0aW9uUHJvcChhdHRyTmFtZSkpIHsKICAgICAgICAgICAgICAgICAgICBpZiAoaXNQcm9jKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICgoLyoqIEB0eXBlIHs/fSAqLyAocmVuZGVyZXIpKSkuc2V0UHJvcGVydHkobmF0aXZlLCBhdHRyTmFtZSwgYXR0clZhbCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgaXNQcm9jID8KICAgICAgICAgICAgICAgICAgICAgICAgKCgvKiogQHR5cGUgez99ICovIChyZW5kZXJlcikpKS5zZXRBdHRyaWJ1dGUobmF0aXZlLCBhdHRyTmFtZSwgKC8qKiBAdHlwZSB7P30gKi8gKGF0dHJWYWwpKSkgOgogICAgIC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hlcmUgdGhlIG1lcmdlZCBgVEF0dHJpYnV0ZXNgIHNob3VsZCBlbmQgdXAuCiAgICAgKiBAcGFyYW0gez99IHNyYyBgVEF0dHJpYnV0ZXNgIHdoaWNoIHNob3VsZCBiZSBhcHBlbmRlZCB0byBgZHN0YAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gbWVyZ2VIb3N0QXR0cnMoZHN0LCBzcmMpIHsKICAgICAgICBpZiAoc3JjID09PSBudWxsIHx8IHNyYy5sZW5ndGggPT09IDApIDsKICAgICAgICBlbHNlIGlmIChkc3QgPT09IG51bGwgfHwgZHN0Lmxlbmd0aCA9PT0gMCkgewogICAgICAgICAgICAvLyBXZSBoYXZlIHNvdXJjZSwgYnV0IGRzdCBpcyBlbXB0eSwganVzdCBtYWtlIGEgY29weS4KICAgICAgICAgICAgZHN0ID0gc3JjLnNsaWNlKCk7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBzcmNNYXJrZXIgPSAtMSAvKiBJbXBsaWNpdEF0dHJpYnV0ZXMgKi87CiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgc3JjLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBpdGVtID0gc3JjW2ldOwogICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBpdGVtID09PSAnbnVtYmVyJykgewogICAgICAgICAgICAgICAgICAgIHNyY01hcmtlciA9IGl0ZW07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBpZiAoc3JjTWFya2VyID09PSAwIC8qIE5hbWVzcGFjZVVSSSAqLykgOwogICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHNyY01hcmtlciA9PT0gLTEgLyogSW1wbGljaXRBdHRyaWJ1dGVzICovIHx8CiAgICAgICAgICAgICAgICAgICAgICAgIHNyY01hcmtlciA9PT0gMiAvKiBTdHlsZXMgKi8pIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gQ2FzZSB3aGVyZSB3ZSBoYXZlIHRvIGNvbnN1bWUgYGtleTFgIGFuZCBgdmFsdWVgIG9ubHkuCiAgICAgICAgICAgICAgICAgICAgICAgIG1lcmdlSG9zdEF0dHJpYnV0ZShkc3QsIHNyY01hcmtlciwgKC8qKiBAdHlwZSB7P30gKi8gKGl0ZW0pKSwgbnVsbCwgKC8qKiBAdHlwZSB7P30gKi8gKHNyY1srK2ldKSkpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gQ2FzZSB3aGVyZSB3ZSBoYXZlIHRvIGNvbnN1bWUgYGtleTFgIG9ubHkuCiAgICAgICAgICAgICAgICAgICAgICAgIG1lcmdlSG9zdEF0dHJpYnV0ZShkc3QsIHNyY01hcmtlciwgKC8qKiBAdHlwZSB7P30gKi8gKGl0ZW0pKSwgbnVsbCwgbnVsbCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiBkc3Q7CiAgICB9CiAgICAvKioKICAgICAqIEFwcGVuZCBga2V5YC9gdmFsdWVgIHRvIGV4aXN0aW5nIGBUQXR0cmlidXRlc2AgdGFraW5nIHJlZ2lvbiBtYXJrZXIgYW5kIGR1cGxpY2F0ZXMgaW50byBhY2NvdW50LgogICAgICoKICAgICAqIEBwYXJhbSB7P30gZHN0IGBUQXR0cmlidXRlc2AgdG8gYXBwZW5kIHRvLgogICAgICogQHBhcmFtIHs/fSBtYXJrZXIgUmVnaW9uIHdoZXJlIHRoZSBga2V5YC9gdmFsdWVgIHNob3VsZCBiZSBhZGRlZC4KICAgICAqIEBwYXJhbSB7P30ga2V5MSBLZXkgd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GRzdFZhbHVlID09PSBtYXJrZXIpIHsKICAgICAgICAgICAgICAgICAgICAgICAgbWFya2VySW5zZXJ0UG9zaXRpb24gPSAtMTsKICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKGRzdFZhbHVlID4gbWFya2VyKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFdlIG5lZWQgdG8gc2F2ZSB0aGlzIGFzIHdlIHdhbnQgdGhlIG1hcmtlcnMgdG8gYmUgaW5zZXJ0ZWQgaW4gc3BlY2lmaWMgb3JkZXIuCiAgICAgICAgICAgICAgICAgICAgICAgIG1hcmtlckluc2VydFBvc2l0aW9uID0gaSAtIDE7CiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvLyBzZWFyY2ggdW50aWwgeW91IGZpbmQgcGxhY2Ugb2YgaW5zZXJ0aW9uCiAgICAgICAgd2hpbGUgKGkgPCBkc3QubGVuZ3RoKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaXRlbSA9IGRzdFtpXTsKICAgICAgICAgICAgaWYgKHR5cGVvZiBpdGVtID09PSAnbnVtYmVyJykgewogICAgICAgICAgICAgICAgLy8gc2luY2UgYGlgIHN0YXJ0ZWQgYXMgdGhlIGluZGV4IGFmdGVyIHRoZSBtYXJrZXIsIHdlIGRpZCBub3QgZmluZCBpdCBpZiB3ZSBhcmUgYXQgdGhlIG5leHQKICAgICAgICAgICAgICAgIC8vIG1hcmtlcgogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoaXRlbSA9PT0ga2V5MSkgewogICAgICAgICAgICAgICAgLy8gV2UgYWxyZWFkeSBoYXZlIHNhbWUgdG9rZW4KICAgICAgICAgICAgICAgIGlmIChrZXkyID09PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKHZhbHVlICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGRzdFtpICsgMV0gPSB2YWx1ZTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAoa2V5MiA9PT0gZHN0W2kgKyAxXSkgewogICAgICAgICAgICAgICAgICAgIGRzdFtpICsgMl0gPSAoLyoqIEB0eXBlIHs/fSAqLyAodmFsdWUpKTsKICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gSW5jcmVtZW50IGNvdW50ZXIuCiAgICAgICAgICAgIGkrKzsKICAgICAgICAgICAgaWYgKGtleTIgIT09IG51bGwpCiAgICAgICAgICAgICAgICBpKys7CiAgICAgICAgICAgIGlmICh2YWx1ZSAhPT0gbnVsbCkKICAgICAgICAgICAgICAgIGkrKzsKICAgICAgICB9CiAgICAgICAgLy8gaW5zZXJ0IGF0IGxvY2F0aW9uLgogICAgICAgIGlmIChtYXJrZXJJbnNlcnRQb3NpdGlvbiAhPT0gLTEpIHsKICAgICAgICAgICAgZHN0LnNwbGljZShtYXJrZXJJbnNlcnRQb3NpdGlvbiwgMCwgbWFya2VyKTsKICAgICAgICAgICAgaSA9IG1hcmtlckluc2VydFBvc2l0aW9uICsgMTsKICAgICAgICB9CiAgICAgICAgZHN0LnNwbGljZShpKyssIDAsIGtleTEpOwogICAgICAgIGlmIChrZXkyICE9PSBudWxsKSB7CiAgICAgICAgICAgIGRzdC5zcGxpY2UoaSsrLCAwLCBrZXkyKTsKICAgICAgICB9CiAgICAgICAgaWYgKHZhbHVlICE9PSBudWxsKSB7CiAgICAgICAgICAgIGRzdC5zcGxpY2Uo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UgPT09ICdvYmplY3QnICYmIHZhbHVlICE9IG51bGwgJiYgdHlwZW9mIHZhbHVlLnR5cGUgPT09ICdmdW5jdGlvbicpIHsKICAgICAgICAgICAgcmV0dXJuIHZhbHVlLnR5cGUubmFtZSB8fCB2YWx1ZS50eXBlLnRvU3RyaW5nKCk7CiAgICAgICAgfQogICAgICAgIHJldHVybiByZW5kZXJTdHJpbmdpZnkodmFsdWUpOwogICAgfQogICAgY29uc3QgybUwJDMgPSAvKioKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgICgpID0+ICh0eXBlb2YgcmVxdWVzdEFuaW1hdGlvbkZyYW1lICE9PSAndW5kZWZpbmVkJyAmJgogICAgICAgIHJlcXVlc3RBbmltYXRpb25GcmFtZSB8fCAvLyBicm93c2VyIG9ubHkKICAgICAgICBzZXRUaW1lb3V0IC8vIGV2ZXJ5dGhpbmcgZWxzZQogICAgKQogICAgICAgIC5iaW5kKF9nbG9iYWwpOwogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgZGVmYXVsdFNjaGVkdWxlciA9ICgoybUwJDMpKSgpOwogICAgLyoqCiAgICAgKgogICAgICogXEBjb2RlR2VuQXBpCiAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIMm1ybVyZXNvbHZlV2luZG93KGVsZW1lbnQpIHsKICAgICAgICByZXR1cm4geyBuYW1lOiAnd2luZG93JywgdGFyZ2V0OiBlbGVtZW50Lm93bmVyRG9jdW1lbnQuZGVmYXVsdFZpZXcgfTsKICAgIH0KICAgIC8qKgogICAgICoKICAgICAqIFxAY29kZUdlbkFwaQogICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiDJtcm1cmVzb2x2ZURvY3VtZW50KGVsZW1lbnQpIHsKICAgICAgICByZXR1cm4geyBuYW1lOiAnZG9jdW1l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ICAgICAgKGI1ID8gKHREYXRhW2luamVjdG9ySW5kZXggKyA1XSB8PSBtYXNrKSA6ICh0RGF0YVtpbmplY3RvckluZGV4ICsgNF0gfD0gbWFzaykpOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgYjYgPyAoYjUgPyAodERhdGFbaW5qZWN0b3JJbmRleCArIDNdIHw9IG1hc2spIDogKHREYXRhW2luamVjdG9ySW5kZXggKyAyXSB8PSBtYXNrKSkgOgogICAgICAgICAgICAgICAgKGI1ID8gKHREYXRhW2luamVjdG9ySW5kZXggKyAxXSB8PSBtYXNrKSA6ICh0RGF0YVtpbmplY3RvckluZGV4XSB8PSBtYXNrKSk7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBDcmVhdGVzIChvciBnZXRzIGFuIGV4aXN0aW5nKSBpbmplY3RvciBmb3IgYSBnaXZlbiBlbGVtZW50IG9yIGNvbnRhaW5lci4KICAgICAqCiAgICAgKiBAcGFyYW0gez99IHROb2RlIGZvciB3aGljaCBhbiBpbmplY3RvciBzaG91bGQgYmUgcmV0cmlldmVkIC8gY3JlYXRlZC4KICAgICAqIEBwYXJhbSB7P30gaG9zdFZpZXcgVmlldyB3aGVyZSB0aGUgbm9kZSBpcyBzdG9yZWQKICAgICAqIEByZXR1cm4gez99IE5vZGUgaW5qZWN0b3IKICAgICAqLwogICAgZnVuY3Rpb24gZ2V0T3JDcmVhdGVOb2RlSW5qZWN0b3JGb3JOb2RlKHROb2RlLCBob3N0VmlldykgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBleGlzdGluZ0luamVjdG9ySW5kZXggPSBnZXRJbmplY3RvckluZGV4KHROb2RlLCBob3N0Vmlldyk7CiAgICAgICAgaWYgKGV4aXN0aW5nSW5qZWN0b3JJbmRleCAhPT0gLTEpIHsKICAgICAgICAgICAgcmV0dXJuIGV4aXN0aW5nSW5qZWN0b3JJbmRleDsKICAgICAgICB9CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHRWaWV3ID0gaG9zdFZpZXdbVFZJRVddOwogICAgICAgIGlmICh0Vmlldy5maXJzdENyZWF0ZVBhc3MpIHsKICAgICAgICAgICAgdE5vZGUuaW5qZWN0b3JJbmRleCA9IGhvc3RWaWV3Lmxlbmd0aDsKICAgICAgICAgICAgaW5zZXJ0Qmxvb20odFZpZXcuZGF0YSwgdE5vZGUpOyAvLyBmb3VuZGF0aW9uIGZvciBub2RlIGJsb29tCiAgICAgICAgICAgIGluc2VydEJsb29tKGhvc3RWaWV3LCBudWxsKTsgLy8gZm91bmRhdGlvbiBmb3IgY3VtdWxhdGl2ZSBibG9vbQogICAgICAgICAgICBpbnNlcnRCbG9vbSh0Vmlldy5ibHVlcHJpbnQsIG51bGwpOwogICAgICAgIH0KICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgcGFyZW50TG9jID0gZ2V0UGFyZW50SW5qZWN0b3JMb2NhdGlvbih0Tm9kZSwgaG9zdFZpZXcpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBpbmplY3RvckluZGV4ID0gdE5vZGUuaW5qZWN0b3JJbmRleDsKICAgICAgICAvLyBJZiBhIHBhcmVudCBpbmplY3RvciBjYW4ndCBiZSBmb3VuZCwgaXRzIGxvY2F0aW9uIGlzIHNldCB0byAtMS4KICAgICAgICAvLyBJbiB0aGF0IGNhc2UsIHdlIGRvbid0IG5lZWQgdG8gc2V0IHVwIGEgY3VtdWxhdGl2ZSBibG9vbQogICAgICAgIGlmIChoYXNQYXJlbnRJbmplY3RvcihwYXJlbnRMb2MpKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcGFyZW50SW5kZXggPSBnZXRQYXJlbnRJbmplY3RvckluZGV4KHBhcmVudExvYyk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcGFyZW50TFZpZXcgPSBnZXRQYXJlbnRJbmplY3RvclZpZXcocGFyZW50TG9jLCBob3N0Vmlldyk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcGFyZW50RGF0YSA9ICgvKiogQHR5cGUgez99ICovIChwYXJlbnRMVmlld1tUVklFV10uZGF0YSkpOwogICAgICAgICAgICAvLyBDcmVhdGVzIGEgY3VtdWxhdGl2ZSBibG9vbSBmaWx0ZXIgdGhhdCBtZXJnZXMgdGhlIHBhcmVudCdzIGJsb29tIGZpbHRlcgogICAgICAgICAgICAvLyBhbmQgaXRzIG93biBjdW11bGF0aXZlIGJsb29tICh3aGljaCBjb250YWlucyB0b2tlbnMgZm9yIGFsbCBhbmNlc3RvcnMpCiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgODsgaSsrKSB7CiAgICAgICAgICAgICAgICBob3N0Vmlld1tpbmplY3RvckluZGV4ICsgaV0gPSBwYXJlbnRMVmlld1twYXJlbnRJbmRleCArIGldIHwgcGFyZW50RGF0YVtwYXJlbnRJbmRleCArIGldOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGhvc3RWaWV3W2luamVjdG9ySW5kZXggKyBQQVJFTlRfSU5KRUNUT1JdID0gcGFyZW50TG9jOwogICAgICAgIHJldHVybiBpbmplY3RvckluZGV4OwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IGFycgogICAgICogQHBhcmFtIHs/fSBmb290ZXIKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGluc2VydEJsb29tKGFyciwgZm9vdGVyKSB7CiAgICAgICAgYXJyLnB1c2goMCwgMCwgMCwgMCwgMCwgMCwgMCwgMCwgZm9vdGVyKTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB0Tm9kZQogICAgICogQHBhcmFtIHs/fSBob3N0VmlldwogICAgICogQHJldHVybiB7P30KICA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gKiBAcGFyYW0gez99IHROb2RlCiAgICAgKiBAcGFyYW0gez99IGF0dHJOYW1lVG9JbmplY3QKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGluamVjdEF0dHJpYnV0ZUltcGwodE5vZGUsIGF0dHJOYW1lVG9JbmplY3QpIHsKICAgICAgICBuZ0Rldk1vZGUgJiYKICAgICAgICAgICAgYXNzZXJ0Tm9kZU9mUG9zc2libGVUeXBlcyh0Tm9kZSwgMCAvKiBDb250YWluZXIgKi8sIDMgLyogRWxlbWVudCAqLywgNCAvKiBFbGVtZW50Q29udGFpbmVyICovKTsKICAgICAgICBuZ0Rldk1vZGUgJiYgYXNzZXJ0RGVmaW5lZCh0Tm9kZSwgJ2V4cGVjdGluZyB0Tm9kZScpOwogICAgICAgIGlmIChhdHRyTmFtZVRvSW5qZWN0ID09PSAnY2xhc3MnKSB7CiAgICAgICAgICAgIHJldHVybiB0Tm9kZS5jbGFzc2VzOwogICAgICAgIH0KICAgICAgICBpZiAoYXR0ck5hbWVUb0luamVjdCA9PT0gJ3N0eWxlJykgewogICAgICAgICAgICByZXR1cm4gdE5vZGUuc3R5bGVzOwogICAgICAgIH0KICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgYXR0cnMgPSB0Tm9kZS5hdHRyczsKICAgICAgICBpZiAoYXR0cnMpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBhdHRyc0xlbmd0aCA9IGF0dHJzLmxlbmd0aDsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgaSA9IDA7CiAgICAgICAgICAgIHdoaWxlIChpIDwgYXR0cnNMZW5ndGgpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHZhbHVlID0gYXR0cnNbaV07CiAgICAgICAgICAgICAgICAvLyBJZiB3ZSBoaXQgYSBgQmluZGluZ3NgIG9yIGBUZW1wbGF0ZWAgbWFya2VyIHRoZW4gd2UgYXJlIGRvbmUuCiAgICAgICAgICAgICAgICBpZiAoaXNOYW1lT25seUF0dHJpYnV0ZU1hcmtlcih2YWx1ZSkpCiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAvLyBTa2lwIG5hbWVzcGFjZWQgYXR0cmlidXRlcwogICAgICAgICAgICAgICAgaWYgKHZhbHVlID09PSAwIC8qIE5hbWVzcGFjZVVSSSAqLykgewogICAgICAgICAgICAgICAgICAgIC8vIHdlIHNraXAgdGhlIG5leHQgdHdvIHZhbHVlcwogICAgICAgICAgICAgICAgICAgIC8vIGFzIG5hbWVzcGFjZWQgYXR0cmlidXRlcyBsb29rcyBsaWtlCiAgICAgICAgICAgICAgICAgICAgLy8gWy4uLiwgQXR0cmlidXRlTWFya2VyLk5hbWVzcGFjZVVSSSwgJ2h0dHA6Ly9zb21ldXJpLmNvbS90ZXN0JywgJ3Rlc3Q6ZXhpc3QnLAogICAgICAgICAgICAgICAgICAgIC8vICdleGlzdFZhbHVlJywgLi4uXQogICAgICAgICAgICAgICAgICAgIGkgPSBpICsgMjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKHR5cGVvZiB2YWx1ZSA9PT0gJ251bWJlcicpIHsKICAgICAgICAgICAgICAgICAgICAvLyBTa2lwIHRvIHRoZSBmaXJzdCB2YWx1ZSBvZiB0aGUgbWFya2VkIGF0dHJpYnV0ZS4KICAgICAgICAgICAgICAgICAgICBpKys7CiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKGkgPCBhdHRyc0xlbmd0aCAmJiB0eXBlb2YgYXR0cnNbaV0gPT09ICdzdHJpbmcnKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGkrKzsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmICh2Y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0Tm9kZSk7CiAgICAgICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCB2YWx1ZSA9IGJsb29tSGFzaCgpOwogICAgICAgICAgICAgICAgICAgIGlmICh2YWx1ZSA9PSBudWxsICYmICEoZmxhZ3MgJiBJbmplY3RGbGFncy5PcHRpb25hbCkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBObyBwcm92aWRlciBmb3IgJHtzdHJpbmdpZnlGb3JFcnJvcih0b2tlbil9IWApOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHZhbHVlOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGZpbmFsbHkgewogICAgICAgICAgICAgICAgICAgIGxlYXZlREkoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmICh0eXBlb2YgYmxvb21IYXNoID09ICdudW1iZXInKSB7CiAgICAgICAgICAgICAgICBpZiAoYmxvb21IYXNoID09PSAtMSkgewogICAgICAgICAgICAgICAgICAgIC8vIGAtMWAgaXMgYSBzcGVjaWFsIHZhbHVlIHVzZWQgdG8gaWRlbnRpZnkgYEluamVjdG9yYCB0eXBlcy4KICAgICAgICAgICAgICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKG5ldyBOb2RlSW5qZWN0b3IodE5vZGUsIGxWaWV3KSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLy8gSWYgdGhlIHRva2VuIGhhcyBhIGJsb29tIGhhc2gsIHRoZW4gaXQgaXMgYSB0b2tlbiB3aGljaCBjb3VsZCBiZSBpbiBOb2RlSW5qZWN0b3IuCiAgICAgICAgICAgICAgICAvLyBBIHJlZmVyZW5jZSB0byB0aGUgcHJldmlvdXMgaW5qZWN0b3IgVFZpZXcgdGhhdCB3YXMgZm91bmQgd2hpbGUgY2xpbWJpbmcgdGhlIGVsZW1lbnQKICAgICAgICAgICAgICAgIC8vIGluamVjdG9yIHRyZWUuIFRoaXMgaXMgdXNlZCB0byBrbm93IGlmIHZpZXdQcm92aWRlcnMgY2FuIGJlIGFjY2Vzc2VkIG9uIHRoZSBjdXJyZW50CiAgICAgICAgICAgICAgICAvLyBpbmplY3Rvci4KICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCBwcmV2aW91c1RWaWV3ID0gbnVsbDsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCBpbmplY3RvckluZGV4ID0gZ2V0SW5qZWN0b3JJbmRleCh0Tm9kZSwgbFZpZXcpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IHBhcmVudExvY2F0aW9uID0gTk9fUEFSRU5UX0lOSkVDVE9SOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IGhvc3RURWxlbWVudE5vZGUgPSBmbGFncyAmIEluamVjdEZsYWdzLkhvc3QgPyBsVmlld1tERUNMQVJBVElPTl9DT01QT05FTlRfVklFV11bVF9IT1NUXSA6IG51bGw7CiAgICAgICAgICAgICAgICAvLyBJZiB3ZSBzaG91bGQgc2tpcCB0aGlzIGluamVjdG9yLCBvciBpZiB0aGVyZSBpcyBubyBpbmplY3RvciBvbiB0aGlzIG5vZGUsIHN0YXJ0IGJ5CiAgICAgICAgICAgICAgICAvLyBzZWFyY2hpbmcKICAgICAgICAgICAgICAgIC8vIHRoZSBwYXJlbnQgaW5qZWN0b3IuCiAgICAgICAgICAgICAgICBpZiAoaW5qZWN0b3JJbmRleCA9PT0gLTEgfHwgZmxhZ3MgJiBJbmplY3RGbGFncy5Ta2lwU2VsZikgewogICAgICAgICAgICAgICAgICAgIHBhcmVudExvY2F0aW9uID0gaW5qZWN0b3JJbmRleCA9PT0gLTEgPyBnZXRQYXJlbnRJbmplY3RvckxvY2F0aW9uKHROb2RlLCBsVmlldykgOgogICAgICAgICAgICAgICAgICAgICAgICBsVmlld1tpbmplY3RvckluZGV4ICsgUEFSRU5UX0lOSkVDVE9SXTsKICAgICAgICAgICAgICAgICAgICBpZiAoIXNob3VsZFNlYXJjaFBhcmVudChmbGFncywgZmFsc2UpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGluamVjdG9ySW5kZXggPSAtMTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHByZXZpb3VzVFZpZXcgPSBsVmlld1tUVklFV107CiAgICAgICAgICAgICAgICAgICAgICAgIGluamVjdG9ySW5kZXggPSBnZXRQYXJlbnRJbmplY3RvckluZGV4KHBhcmVudExvY2F0aW9uKTsKICAgICAgICAgICAgICAgICAgICAgICAgbFZpZXcgPSBnZXRQYXJlbnRJbmplY3RvclZpZXcocGFyZW50TG9jYXRpb24sIGxWaWV3KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvLyBUcmF2ZXJzZSB1cCB0aGUgaW5qZWN0b3IgdHJlZSB1bnRpbCB3ZSBmaW5kIGEgcG90ZW50aWFsIG1hdGNoIG9yIHVudGlsIHdlIGtub3cgdGhlcmUKICAgICAgICAgICAgICAgIC8vICppc24ndCogYSBtYXRjaC4KICAgICAgICAgICAgICAgIHdoaWxlIChpbmplY3RvckluZGV4ICE9PSAtMSkgewogICAgICAgICAgICAgICAgICAgIHBhcmVudExvY2F0aW9uID0gbFZpZXdbaW5qZWN0b3JJbmRleCArIFBBUkVOVF9JTkpFQ1RPUl07CiAgICAgICAgICAgICAgICAgICAgLy8gQ2hlY2sgdGhlIGN1cnJlbnQgaW5qZWN0b3IuIElmIGl0IG1hdGNoZXMsIHNlZSBpZiBpdCBjb250YWlucyB0b2tlbi4KICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgdFZpZXcgPSBsVmlld1tUVklFV107CiAgICAgICAgICAgICAgICAgICAgaWYgKGJsb29tSGFzVG9rZW4oYmxvb21IYXNoLCBpbmplY3RvckluZGV4LCB0Vmlldy5kYXRhKSkgewogICAgICAgICAgICAgICAgICAgICAgICAvLyBBdCB0aGlzIHBvaW50LCB3ZSBoYXZlIGFuIGluamVjdG9yIHdoaWNoICptYXkqIGNvbnRhaW4gdGhlIHRva2VuLCBzbyB3ZSBzdGVwIHRocm91Z2gKICAgICAgICAgICAgICAgICAgICAgICAgLy8gdGhlIHByb3ZpZGVycyBhbmQgZGlyZWN0aXZlcyBhc3NvY2lhdGVkIHdpdGggdGhlIGluamVjdG9yJ3MgY29ycmVzcG9uZGluZyBub2RlIHRvIGdldAogICAgICAgICAgICAgICAgICAgICAgICAvLyB0aGUgaW5zdGFuY2UuCiAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgaW5zdGFuY2UgPSBzZWFyY2hUb2tlbnNPbkluamVjdG9yKGluamVjdG9ySW5kZXgsIGxWaWV3LCB0b2tlbiwgcHJldmlvdXNUVmlldywgZmxhZ3MsIGhvc3RURWxlbWVudE5vZGUpOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5zdGFuY2UgIT09IE5PVF9GT1VORCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGluc3RhbmNlOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGlmIChzaG91bGRTZWFyY2hQYXJlbnQoZmxhZ3MsIGxWaWV3W1RWSUVXXS5kYXRhW2luamVjdG9ySW5kZXggKyBUTk9ERV0gPT09IGhvc3RURWxlbWVudE5vZGUpICYmCiAgICAgICAgICAgICAgICAgICAgICAgIGJsb29tSGFzVG9rZW4oYmxvb21IYXNoLCBpbmplY3RvckluZGV4LCBsVmlldykpIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gVGhlIGRlZiB3YXNuJ3QgZm91bmQgYW55d2hlcmUgb24gdGhpcyBub2RlLCBzbyBpdCB3YXMgYSBmYWxzZSBwb3NpdGl2ZS4KICAgICAgICAgICAgICAgICAgICAgICAgLy8gVHJhdmVyc2UgdXAgdGhlIHRyZWUgYW5kIGNvbnRpbnVlIHNlYXJjaGluZy4KICAgICAgICAgICAgICAgICAgICAgICAgcHJldmlvdXNUVmlldyA9IHRWaWV3OwogICAgICAgICAgICAgICAgICAgICAgICBpbmplY3RvckluZGV4ID0gZ2V0UGFyZW50SW5qZWN0b3JJbmRleChwYXJlbnRMb2NhdGlvbik7CiAgICAgICAgICAgICAgICAgICAgICAgIGxWaWV3ID0gZ2V0UGFyZW50SW5qZWN0b3JWaWV3KHBhcmVudExvY2F0aW9uLCBsVmlldyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAvLyBJZiB3ZSBzaG91bGQgbm90IHNlYXJjaCBwYXJlbnQgT1IgSWYgdGhlIGFuY2VzdG9yIGJsb29tIGZpbHRlciB2YWx1ZSBkb2VzIG5vdCBoYXZlIHRoZQogICAgICAgICAgICAgICAgICAgICAgICAvLyBiaXQgY29ycmVzcG9uZGluZyB0byB0aGUgZGlyZWN0aXZlIHdlIGNhbiBnaXZlIHVwIG9uIHRyYXZlcnNpbmcgdXAgdG8gZmluZCB0aGUgc3BlY2lmaWMKICAgICAgICAgICAgICAgICAgICAgICAgLy8gaW5qZWN0b3IuCiAgICAgICAgICAgICAgICAgICAgICAgIGluamVjdG9ySW5kZXggPSAtMTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaWYgKGZsYWdzICYgSW5qZWN0RmxhZ3MuT3B0aW9uYWwgJiYgbm90Rm91bmRWYWx1ZSA9PT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgIC8vIFRoaXMgbXVzdCBiZSBzZXQgb3IgdGhlIE51bGxJbmplY3RvciB3aWxsIHRocm93IGZvciBvcHRpb25hbCBkZXBzCiAgICAgICAgICAgIG5vdEZvdW5kVmFsdWUgPSBudWxsOwogICAgICAgIH0KICAgICAgICBpZiAoKGZsYWdzICYgKEluamVjdEZsYWdzLlNlbGYgfCBJbmplY3RGbGFncy5Ib3N0KSkgPT09IDApIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBtb2R1bGVJbmplY3RvciA9IGxWaWV3W0lOSkVDVE9SJDFdOwogICAgICAgICAgICAvLyBzd2l0Y2ggdG8gYGluamVjdEluamVjdG9yT25seWAgaW1wbGVtZW50YXRpb24gZm9yIG1vZHVsZSBpbmplY3Rvciwgc2luY2UgbW9kdWxlIGluamVjdG9yCiAgICAgICAgICAgIC8vIHNob3VsZCBub3QgaGF2ZSBhY2Nlc3MgdG8gQ29tcG9uZW50L0RpcmVjdGl2ZSBESSBzY29wZSAodGhhdCBtYXkgaGFwcGVuIHRocm91Z2gKICAgICAgICAgICAgLy8gYGRpcmVjdGl2ZUluamVjdGAgaW1wbGVtZW50YXRpb24pCiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcHJldmlvdXNJbmplY3RJbXBsZW1lbnRhdGlvbiA9IHNldEluamVjdEltcGxlbWVudGF0aW9uKHVuZGVmaW5lZCk7CiAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICBpZiAobW9kdWxlSW5qZWN0b3IpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gbW9kdWxlSW5qZWN0b3IuZ2V0KHRva2VuLCBub3RGb3VuZFZhbHVlLCBmbGFncyAmIEluamVjdEZsYWdzLk9wdGlvbmFsKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBpbmplY3RSb290TGltcE1vZGUodG9rZW4sIG5vdEZvdW5kVmFsdWUsIGZsYWdzICYgSW5qZWN0RmxhZ3MuT3B0aW9uYWwpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGZpbmFsbHkgewogICAgICAgICAgICAgICAgc2V0SW5qZWN0SW1wbGVtZW50YXRpb24ocHJldmlvdXNJbmplY3RJbXBsZW1lbnRhdGlvbik7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaWYgKGZsYWdzICYgSW5qZWN0RmxhZ3MuT3B0aW9uYWwpIHsKICAgICAgICAgICAgcmV0dXJuIG5vdEZvdW5kVmFsdWU7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYE5vZGVJbmplY3RvcjogTk9UX0ZPVU5EIFske3N0cmluZ2lmeUZvckVycm9yKHRva2VuKX1dYCk7CiAgICAgICAgfQogICAgfQogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgTk9UX0ZPVU5EID0ge307CiAgICAvKioKICAgICAqIEB0ZW1wbGF0ZSBUCiAgICAgKiBAcGFyYW0gez99IGluamVjdG9ySW5kZXgKICAgICAqIEBwYXJhbSB7P30gbFZpZXcKICAgICAqIEBwYXJhbSB7P30gdG9rZW4KICAgICAqIEBwYXJhbSB7P30gcHJldmlvdXNUVmlldwogICAgICogQHBhcmFtIHs/fSBmbGFncwogICAgICogQHBhcmFtIHs/fSBob3N0VEVsZW1lbnROb2RlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBzZWFyY2hUb2tlbnNPbklu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PSB0b2tlbikgewogICAgICAgICAgICAgICAgcmV0dXJuIGk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaWYgKGlzSG9zdFNwZWNpYWxDYXNlKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZGlyRGVmID0gKC8qKiBAdHlwZSB7P30gKi8gKHRJbmplY3RhYmxlc1tkaXJlY3RpdmVzU3RhcnRdKSk7CiAgICAgICAgICAgIGlmIChkaXJEZWYgJiYgaXNDb21wb25lbnREZWYoZGlyRGVmKSAmJiBkaXJEZWYudHlwZSA9PT0gdG9rZW4pIHsKICAgICAgICAgICAgICAgIHJldHVybiBkaXJlY3RpdmVzU3RhcnQ7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIG51bGw7CiAgICB9CiAgICAvKioKICAgICAqIFJldHJpZXZlIG9yIGluc3RhbnRpYXRlIHRoZSBpbmplY3RhYmxlIGZyb20gdGhlIGBMVmlld2AgYXQgcGFydGljdWxhciBgaW5kZXhgLgogICAgICoKICAgICAqIFRoaXMgZnVuY3Rpb24gY2hlY2tzIHRvIHNlZSBpZiB0aGUgdmFsdWUgaGFzIGFscmVhZHkgYmVlbiBpbnN0YW50aWF0ZWQgYW5kIGlmIHNvIHJldHVybnMgdGhlCiAgICAgKiBjYWNoZWQgYGluamVjdGFibGVgLiBPdGhlcndpc2UgaWYgaXQgZGV0ZWN0cyB0aGF0IHRoZSB2YWx1ZSBpcyBzdGlsbCBhIGZhY3RvcnkgaXQKICAgICAqIGluc3RhbnRpYXRlcyB0aGUgYGluamVjdGFibGVgIGFuZCBjYWNoZXMgdGhlIHZhbHVlLgogICAgICogQHBhcmFtIHs/fSBsVmlldwogICAgICogQHBhcmFtIHs/fSB0VmlldwogICAgICogQHBhcmFtIHs/fSBpbmRleAogICAgICogQHBhcmFtIHs/fSB0Tm9kZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0Tm9kZUluamVjdGFibGUobFZpZXcsIHRWaWV3LCBpbmRleCwgdE5vZGUpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IHZhbHVlID0gbFZpZXdbaW5kZXhdOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCB0RGF0YSA9IHRWaWV3LmRhdGE7CiAgICAgICAgaWYgKGlzRmFjdG9yeSh2YWx1ZSkpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBmYWN0b3J5ID0gdmFsdWU7CiAgICAgICAgICAgIGlmIChmYWN0b3J5LnJlc29sdmluZykgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBDaXJjdWxhciBkZXAgZm9yICR7c3RyaW5naWZ5Rm9yRXJyb3IodERhdGFbaW5kZXhdKX1gKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHByZXZpb3VzSW5jbHVkZVZpZXdQcm92aWRlcnMgPSBzZXRJbmNsdWRlVmlld1Byb3ZpZGVycyhmYWN0b3J5LmNhblNlZVZpZXdQcm92aWRlcnMpOwogICAgICAgICAgICBmYWN0b3J5LnJlc29sdmluZyA9IHRydWU7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHByZXZpb3VzSW5qZWN0SW1wbGVtZW50YXRpb247CiAgICAgICAgICAgIGlmIChmYWN0b3J5LmluamVjdEltcGwpIHsKICAgICAgICAgICAgICAgIHByZXZpb3VzSW5qZWN0SW1wbGVtZW50YXRpb24gPSBzZXRJbmplY3RJbXBsZW1lbnRhdGlvbihmYWN0b3J5LmluamVjdEltcGwpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVudGVyREkobFZpZXcsIHROb2RlKTsKICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgIHZhb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ICAgICAgICB9CiAgICAgICAgICAgIGZpbmFsbHkgewogICAgICAgICAgICAgICAgaWYgKGZhY3RvcnkuaW5qZWN0SW1wbCkKICAgICAgICAgICAgICAgICAgICBzZXRJbmplY3RJbXBsZW1lbnRhdGlvbihwcmV2aW91c0luamVjdEltcGxlbWVudGF0aW9uKTsKICAgICAgICAgICAgICAgIHNldEluY2x1ZGVWaWV3UHJvdmlkZXJzKHByZXZpb3VzSW5jbHVkZVZpZXdQcm92aWRlcnMpOwogICAgICAgICAgICAgICAgZmFjdG9yeS5yZXNvbHZpbmcgPSBmYWxzZTsKICAgICAgICAgICAgICAgIGxlYXZlREkoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gdmFsdWU7CiAgICB9CiAgICAvKioKICAgICAqIFJldHVybnMgdGhlIGJpdCBpbiBhbiBpbmplY3RvcidzIGJsb29tIGZpbHRlciB0aGF0IHNob3VsZCBiZSB1c2VkIHRvIGRldGVybWluZSB3aGV0aGVyIG9yIG5vdAogICAgICogdGhlIGRpcmVjdGl2ZSBtaWdodCBiZSBwcm92aWRlZCBieSB0aGUgaW5qZWN0b3IuCiAgICAgKgogICAgICogV2hlbiBhIGRpcmVjdGl2ZSBpcyBwdWJsaWMsIGl0IGlzIGFkZGVkIHRvIHRoZSBibG9vbSBmaWx0ZXIgYW5kIGdpdmVuIGEgdW5pcXVlIElEIHRoYXQgY2FuIGJlCiAgICAgKiByZXRyaWV2ZWQgb24gdGhlIFR5cGUuIFdoZW4gdGhlIGRpcmVjdGl2ZSBpc24ndCBwdWJsaWMgb3IgdGhlIHRva2VuIGlzIG5vdCBhIGRpcmVjdGl2ZSBgbnVsbGAKICAgICAqIGlzIHJldHVybmVkIGFzIHRoZSBub2RlIGluamVjdG9yIGNhbiBub3QgcG9zc2libHkgcHJvdmlkZSB0aGF0IHRva2VuLgogICAgICoKICAgICAqIEBwYXJhbSB7P30gdG9rZW4gdGhlIGluamVjdGlvbiB0b2tlbgogICAgICogQ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ICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCB2YWx1ZTsKICAgICAgICBpZiAoYjcpIHsKICAgICAgICAgICAgdmFsdWUgPSBiNiA/IChiNSA/IGluamVjdG9yVmlld1tpbmplY3RvckluZGV4ICsgN10gOiBpbmplY3RvclZpZXdbaW5qZWN0b3JJbmRleCArIDZdKSA6CiAgICAgICAgICAgICAgICAoYjUgPyBpbmplY3RvclZpZXdbaW5qZWN0b3JJbmRleCArIDVdIDogaW5qZWN0b3JWaWV3W2luamVjdG9ySW5kZXggKyA0XSk7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICB2YWx1ZSA9IGI2ID8gKGI1ID8gaW5qZWN0b3JWaWV3W2luamVjdG9ySW5kZXggKyAzXSA6IGluamVjdG9yVmlld1tpbmplY3RvckluZGV4ICsgMl0pIDoKICAgICAgICAgICAgICAgIChiNSA/IGluamVjdG9yVmlld1tpbmplY3RvckluZGV4ICsgMV0gOiBpbmplY3RvclZpZXdbaW5qZWN0b3JJbmRleF0pOwogICAgICAgIH0KICAgICAgICAvLyBJZiB0aGUgYmxvb20gZmlsdGVyIHZhbHVlIGhhcyB0aGUgYml0IGNvcnJlc3BvbmRpbmcgdG8gdGhlIGRpcmVjdGl2ZSdzIGJsb29tQml0IGZsaXBwZWQgb24sCiAgICAgICAgLy8gdGhpcyBpbmplY3RvciBpcyBhIHBvdGVudGlhbCBtYXRjaC4KICAgICAgICByZXR1cm4gISEodmFsdWUgJiBtYXNrKTsKICAgIH0KICAgIC8qKgogICAgICogUmV0dXJucyB0cnVlIGlmIGZsYWdzIHByZXZlbnQgcGFyZW50IGluamVjdG9yIGZyb20gYmVpbmcgc2VhcmNoZWQgZm9yIHRva2VucwogICAgICogQHBhcmFtIHs/fSBmbGFncwogICAgICogQHBhcmFtIHs/fSBpc0ZpcnN0SG9zdFROb2RlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBzaG91bGRTZWFyY2hQYXJlbnQoZmxhZ3MsIGlzRmlyc3RIb3N0VE5vZGUpIHsKICAgICAgICByZXR1cm4gIShmbGFncyAmIEluamVjdEZsYWdzLlNlbGYpICYmICEoZmxhZ3MgJiBJbmplY3RGbGFncy5Ib3N0ICYmIGlzRmlyc3RIb3N0VE5vZGUpOwogICAgfQogICAgY2xhc3MgTm9kZUluamVjdG9yIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IF90Tm9kZQogICAgICAgICAqIEBwYXJhbSB7P30gX2xWaWV3CiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoX3ROb2RlLCBfbFZpZXcpIHsKICAgICAgICAgICAgdGhpcy5fdE5vZGUgPSBfdE5vZGU7CiAgICAgICAgICAgIHRoaXMuX2xWaWV3ID0gX2xWaWV3OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHRva2VuCiAgICAgICAgICogQHBhcmFtIHs/PX0gbm90Rm91bmRWYWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0KHRva2VuLCBub3RGb3VuZFZhbHVlKSB7CiAgICAgICAgICAgIHJldHVybiBnZXRPckNyZWF0ZUluamVjdGFibGUodGhpcy5fdE5vZGUsIHRoaXMuX2xWaWV3LCB0b2tlbiwgdW5kZWZpbmVkLCBub3RGb3VuZFZhbHVlKTsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIFxAY29kZUdlbkFwaQogICAgICogQHRlbXBsYXRlIFQKICAgICAqIEBwYXJhbSB7P30gdHlwZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gybXJtWdldEZhY3RvcnlPZih0eXBlKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHR5cGVBbnkgPSAoLyoqIEB0eXBlIHs/fSAqLyAodHlwZSkpOwogICAgICAgIGlmIChpc0ZvcndhcmRSZWYodHlwZSkpIHsKICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovICgoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZmFjdG9yeSA9IMm1ybVnZXRGYWN0b3J5T2YocmVzb2x2ZUZvcndhcmRSZWYodHlwZUFueSkpOwogICAgICAgICAgICAgICAgcmV0dXJuIGZhY3RvcnkgPyBmYWN0b3J5KCkgOiBudWxsOwogICAgICAgICAgICB9KSkpKTsKICAgICAgICB9CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBmYWN0b3J5ID0gZ2V0RmFjdG9yeURlZih0eXBlQW55KTsKICAgICAgICBpZiAoZmFjdG9yeSA9PT0gbnVsbCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGluamVjdG9yRGVmID0gZ2V0SW5qZWN0b3JEZWYodHlwZUFueSk7CiAgICAgICAgICAgIGZhY3RvcnkgPSBpbmplY3RvckRlZiAmJiBpbmplY3RvckRlZi5mYWN0b3J5OwogICAgICAgIH0KICAgICAgICByZXR1cm4gZmFjdG9yeSB8fCBudWxsOwogICAgfQogICAgLyoqCiAgICAgKiBcQGNvZGVHZW5BcGkKICAgICAqIEB0ZW1wbGF0ZSBUCiAgICAgKiBAcGFyYW0gez99IHR5cGUKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIMm1ybVnZXRJbmhlcml0ZWRGYWN0b3J5KHR5cGUpIHsKICAgICAgICByZXR1cm4gbm9TaWRlRWZmZWN0cygoLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29u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Hs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdCA9PiBuZXcgdCgpKTsKICAgICAgICB9KSk7CiAgICB9CiAgICBjb25zdCBFUlJPUl9ERUJVR19DT05URVhUID0gJ25nRGVidWdDb250ZXh0JzsKICAgIGNvbnN0IEVSUk9SX09SSUdJTkFMX0VSUk9SID0gJ25nT3JpZ2luYWxFcnJvcic7CiAgICBjb25zdCBFUlJPUl9MT0dHRVIgPSAnbmdFcnJvckxvZ2dlcic7CiAgICBmdW5jdGlvbiB3cmFwcGVkRXJyb3IobWVzc2FnZSwgb3JpZ2luYWxFcnJvcikgewogICAgICAgIGNvbnN0IG1zZyA9IGAke21lc3NhZ2V9IGNhdXNlZCBieTogJHtvcmlnaW5hbEVycm9yIGluc3RhbmNlb2YgRXJyb3IgPyBvcmlnaW5hbEVycm9yLm1lc3NhZ2UgOiBvcmlnaW5hbEVycm9yfWA7CiAgICAgICAgY29uc3QgZXJyb3IgPSBFcnJvcihtc2cpOwogICAgICAgIGVycm9yW0VSUk9SX09SSUdJTkFMX0VSUk9SXSA9IG9yaWdpbmFsRXJyb3I7CiAgICAgICAgcmV0dXJuIGVycm9yOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IGVycm9yCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBnZXREZWJ1Z0NvbnRleHQoZXJyb3IpIHsKICAgICAgICByZXR1cm4gKCgvKiogQHR5cGUgez99ICovIChlcnJvcikpKVtFUlJPUl9ERUJVR19DT05URVhUXTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBlcnJvcgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0T3JpZ2luYWxFcnJvcihlcnJvcikgewogICAgICAgIHJldHVybiAoKC8qKiBAdHlwZSB7P30gKi8gKGVycm9yKSkpW0VSUk9SX09SSUdJTkFMX0VSUk9SXTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBlcnJvcgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0RXJyb3JMb2dnZXIoZXJyb3IpIHsKICAgICAgICByZXR1cm4gKCgvKiogQHR5cGUgez99ICovIChlcnJvcikpKVtFUlJPUl9MT0dHRVJdIHx8IGRlZmF1bHRFcnJvckxvZ2dlcjsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBjb25zb2xlCiAgICAgKiBAcGFyYW0gey4uLj99IHZhbHVlcwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZGVmYXVsdEVycm9yTG9nZ2VyKGNvbnNvbGUsIC4uLnZhbHVlcykgewogICAgICAgICgoLyoqIEB0eXBlIHs/fSAqLyAoY29uc29sZS5lcnJvcikpKSguLi52YWx1ZXMpOwogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogcGFja2FnZXMvY29yZS9zcmMvZXJyb3JfaGFuZGxlci50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvKioKICAgICAqIFByb3ZpZGVzIGEgaG9vayBmb3IgY2VudHJhbGl6ZWQgZXhjZXB0aW9uIGhhbmRsaW5nLgogICAgICoKICAgICAqIFRoZSBkZWZhdWx0IGltcGxlbWVudGF0aW9uIG9mIGBFcnJvckhhbmRsZXJgIHByaW50cyBlcnJvciBtZXNzYWdlcyB0byB0aGUgYGNvbnNvbGVgLiBUbwogICAgICogaW50ZXJjZXB0IGVycm9yIGhhbmRsaW5nLCB3cml0ZSBhIGN1c3RvbSBleGNlcHRpb24gaGFuZGxlciB0aGF0IHJlcGxhY2VzIHRoaXMgZGVmYXVsdCBhcwogICAgICogYXBwcm9wcmlhdGUgZm9yIHlvdXIgYXBwLgogICAgICoKICAgICAqIFxAdXNhZ2VOb3RlcwogICAgICogIyMjIEV4YW1wbGUKICAgICAqCiAgICAgKiBgYGAKICAgICAqIGNsYXNzIE15RXJyb3JIYW5kbGVyIGltcGxlbWVudHMgRXJyb3JIYW5kbGVyIHsKICAgICAqICAgaGFuZGxlRXJyb3IoZXJyb3IpIHsKICAgICAqICAgICAvLyBkbyBzb21ldGhpbmcgd2l0aCB0aGUgZXhjZXB0aW9uCiAgICAgKiAgIH0KICAgICAqIH0KICAgICAqCiAgICAgKiBcQE5nTW9kdWxlKHsKICAgICAqICAgcHJvdmlkZXJzOiBbe3Byb3ZpZGU6IEVycm9ySGFuZGxlciwgdXNlQ2xhc3M6IE15RXJyb3JIYW5kbGVyfV0KICAgICAqIH0pCiAgICAgKiBjbGFzcyBNeU1vZHVsZSB7fQogICAgICogYGBgCiAgICAgKgogICAgICogXEBwdWJsaWNBcGkKICAgICAqLwogICAgY2xhc3MgRXJyb3JIYW5kbGVyIHsKICAgICAgICBjb25zdHJ1Y3RvcigpIHsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX2NvbnNvbGUgPSBjb25zb2xlOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVycm9yCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBoYW5kbGVFcnJvcihlcnJvcikgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG9yaWdpbmFsRXJyb3IgPSB0aGlzLl9maW5kT3JpZ2luYWxFcnJvcihlcnJvcik7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgY29udGV4dCA9IHRoaXMuX2ZpbmRDb250ZXh0KGVycm9yKTsKICAgICAgICAgICAgLy8gTm90ZTogQnJvd3NlciBjb25zb2xlcyBzaG93IHRoZSBwbGFjZSBmcm9tIHdoZXJlIGNvbnNvbGUuZXJyb3Igd2FzIGNhbGxlZC4KICAgICAgICAgICAgLy8gV2UgY2FuIHVzZSB0aGlzIHRvIGdpdmUgdXNlcnMgYWRkaXRpb25hbCBpbmZvcm1hdGlvbiBhYm91dCB0aGUgZXJyb3IuCiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZXJyb3JMb2dnZXIgPSBnZXRFcnJvckxvZ2dlcihlcnJvcik7CiAgICAgICAgICAgIGVycm9yTG9nZ2VyKHRoaXMuX2NvbnNvbGUsIGBFUlJPUmAsIGVycm9yKTsKICAgICAgICAgICAgaWYgKG9yaWdpbmFsRXJyb3IpIHsKICAgICAgICAgICAgICAgIGVycm9yTG9nZ2VyKHRoaXMuX2NvbnNvbGUsIGBPUklHSU5BTCBFUlJPUmAsIG9yaWdpbmFsRXJyb3IpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChjb250ZXh0KSB7CiAgICAgICAgICAgICAgICBlcnJvckxvZ2dlcih0aGlzLl9jb25zb2xlLCAnRVJST1IgQ09OVEVYVCcsIGNvbnRleHQpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgKiBAcGFyYW0gez99IGVycm9yCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZmluZENvbnRleHQoZXJyb3IpIHsKICAgICAgICAgICAgaWYgKGVycm9yKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gZ2V0RGVidWdDb250ZXh0KGVycm9yKSA/IGdldERlYnVnQ29udGV4dChlcnJvcikgOgogICAgICAgICAgICAgICAgICAgIHRoaXMuX2ZpbmRDb250ZXh0KGdldE9yaWdpbmFsRXJyb3IoZXJyb3IpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7P30gZXJyb3IKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9maW5kT3JpZ2luYWxFcnJvcihlcnJvcikgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBlID0gZ2V0T3JpZ2luYWxFcnJvcihlcnJvcik7CiAgICAgICAgICAgIHdoaWxlIChlICYmIGdldE9yaWdpbmFsRXJyb3IoZSkpIHsKICAgICAgICAgICAgICAgIGUgPSBnZXRPcmlnaW5hbEVycm9yKGUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBlOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogRGVmaW5lcyBhIHNjaGVtYSB0aGF0IGFsbG93cyBhbiBOZ01vZHVsZSB0byBjb250YWluIHRoZSBmb2xsb3dpbmc6CiAgICAgKiAtIE5vbi1Bbmd1bGFyIGVsZW1lbnRzIG5hbWVkIHdpdGggZGFzaCBjYXNlIChgLWApLgogICAgICogLSBFbGVtZW50IHByb3BlcnRpZXMgbmFtZWQgd2l0aCBkYXNoIGNhc2UgKGAtYCkuCiAgICAgKiBEYXNoIGNhc2UgaXMgdGhlIG5hbWluZyBjb252ZW50aW9uIGZvciBjdXN0b20gZWxlbWVudHMuCiAgICAgKgogICAgICogXEBwdWJsaWNBcGkKICAgICAqIEB0eXBlIHs/fQogICAgICovCiAgICBjb25zdCBDVVNUT01fRUxFTUVOVFNfU0NIRU1BID0gewogICAgICAgIG5hbWU6ICdjdXN0b20tZWxlbWVudHMnCiAgICB9OwogICAgLyoqCiAgICAgKiBEZWZpbmVzIGEgc2NoZW1hIHRoYXQgYWxsb3dzIGFueSBwcm9wZXJ0eSBvbiBhbnkgZWxlbWVudC4KICAgICAqCiAgICAgKiBcQHB1YmxpY0FwaQogICAgICogQHR5cGUgez99CiAgICAgKi8KICAgIGNvbnN0IE5PX0VSUk9SU19TQ0hFTUEgPSB7CiAgICAgICAgbmFtZTogJ25vLWVycm9ycy1zY2hlbWEnCiAgICB9OwogICAgLyoqCiAgICAgKiBAYWJzdHJhY3QKICAgICAqLwogICAgY2xhc3MgU2FmZVZhbHVlSW1wbCB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBjaGFuZ2luZ1RoaXNCcmVha3NBcHBsaWNhdGlvblNlY3VyaXR5CiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoY2hhbmdpbmdUaGlzQnJlYWtzQXBwbGljYXRpb25TZWN1cml0eSkgewogICAgICAgICAgICB0aGlzLmNoYW5naW5nVGhpc0JyZWFrc0FwcGxpY2F0aW9uU2VjdXJpdHkgPSBjaGFuZ2luZ1RoaXNCcmVha3NBcHBsaWNhdGlvblNlY3VyaXR5OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHRvU3RyaW5nKCkgewogICAgICAgICAgICByZXR1cm4gYFNhZmVWYWx1ZSBtdXN0IHVzZSBbcHJvcGVydHldPWJpbmRpbmc6ICR7dGhpcy5jaGFuZ2luZ1RoaXNCcmVha3NBcHBsaWNhdGlvblNlY3VyaXR5fWAgKwogICAgICAgICAgICAgICAgYCAoc2VlIGh0dHA6Ly9nLmNvL25nL3NlY3VyaXR5I3hzcylgOwogICAgICAgIH0KICAgIH0KICAgIGNsYXNzIFNhZmVIdG1sSW1wbCBleHRlbmRzIFNhZmVWYWx1ZUltcGwgewogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0VHlwZU5hbWUoKSB7CiAgICAgICAgICAgIHJldHVybiAiSFRNTCIgLyogSHRtbCAqLzsKICAgICAgICB9CiAgICB9CiAgICBjbGFzcyBTYWZlU3R5bGVJbXBsIGV4dGVuZHMgU2FmZVZhbHVlSW1wbCB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXRUeXBlTmFtZSgpIHsKICAgICAgICAgICAgcmV0dXJuICJTdHlsZSIgLyogU3R5bGUgKi87CiAgICAgICAgfQogICAgfQogICAgY2xhc3MgU2FmZVNjcmlwdEltcGwgZXh0ZW5kcyBTYWZlVmFsdWVJbXBsIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldFR5cGVOYW1lKCkgewogICAgICAgICAgICByZXR1cm4gIlNjcmlwdCIgLyogU2NyaXB0ICovOwogICAgICAgIH0KICAgIH0KICAgIGNsYXNzIFNhZmVVcmxJbXBsIGV4dGVuZHMgU2FmZVZhbHVlSW1wbCB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXRUeXBlTmFtZSgpIHsKICAgICAgICAgICAgcmV0dXJuICJVUkwiIC8qIFVybCAqLzsKICAgICAgICB9CiAgICB9CiAgICBjbGFzcyBTYWZlUmVzb3VyY2VVcmxJbXBsIGV4dGVuZHMgU2FmZVZhbHVlSW1wbCB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXRUeXBlTmFtZSgpIHsKICAgICAgICAgICAgcmV0dXJuICJSZXNvdXJjZVVSTCIgLyogUmVzb3VyY2VVcmwgKi87CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBAdGVtcGxhdGUgVAogICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gdW53cmFwU2FmZVZhbHVlKHZhbHVlKSB7CiAgICAgICAgcmV0dXJuIHZhbHVlIGluc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SBvZiB0aHJlZSBzdHJhdGVnaWVzIGZvciBkb2luZyB0aGlzLgogICAgICogU3VwcG9ydDogU2FmYXJpIDEwLnggLT4gWEhSIHN0cmF0ZWd5CiAgICAgKiBTdXBwb3J0OiBGaXJlZm94IC0+IERvbVBhcnNlciBzdHJhdGVneQogICAgICogRGVmYXVsdDogSW5lcnREb2N1bWVudCBzdHJhdGVneQogICAgICovCiAgICBjbGFzcyBJbmVydEJvZHlIZWxwZXIgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZGVmYXVsdERvYwogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKGRlZmF1bHREb2MpIHsKICAgICAgICAgICAgdGhpcy5kZWZhdWx0RG9jID0gZGVmYXVsdERvYzsKICAgICAgICAgICAgdGhpcy5pbmVydERvY3VtZW50ID0gdGhpcy5kZWZhdWx0RG9jLmltcGxlbWVudGF0aW9uLmNyZWF0ZUhUTUxEb2N1bWVudCgnc2FuaXRpemF0aW9uLWluZXJ0Jyk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGluZXJ0Qm9keUVsZW1lbnQgPSB0aGlzLmluZXJ0RG9jdW1lbnQuYm9keTsKICAgICAgICAgICAgaWYgKGluZXJ0Qm9keUVsZW1lbnQgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgLy8gdXN1YWxseSB0aGVyZSBzaG91bGQgYmUgb25seSBvbmUgYm9keSBlbGVtZW50IGluIHRoZSBkb2N1bWVudCwgYnV0IElFIGRvZXNuJ3QgaGF2ZSBhbnksIHNvCiAgICAgICAgICAgICAgICAvLyB3ZSBuZWVkIHRvIGNyZWF0ZSBvbmUuCiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBpbmVydEh0bWwgPSB0aGlzLmluZXJ0RG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnaHRtbCcpOwogICAgICAgICAgICAgICAgdG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dGYtOCwnICsgaHRtbCwgZmFsc2UpOwogICAgICAgICAgICB4aHIuc2VuZCh1bmRlZmluZWQpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGJvZHkgPSB4aHIucmVzcG9uc2UuYm9keTsKICAgICAgICAgICAgYm9keS5yZW1vdmVDaGlsZCgoLyoqIEB0eXBlIHs/fSAqLyAoYm9keS5maXJzdENoaWxkKSkpOwogICAgICAgICAgICByZXR1cm4gYm9keTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVXNlIERPTVBhcnNlciB0byBjcmVhdGUgYW5kIGZpbGwgYW4gaW5lcnQgYm9keSBlbGVtZW50IChvbiBGaXJlZm94KQogICAgICAgICAqIFNlZSBodHRwczovL2dpdGh1Yi5jb20vY3VyZTUzL0RPTVB1cmlmeS9yZWxlYXNlcy90YWcvMC42LjcKICAgICAgICAgKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBodG1sCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXRJbmVydEJvZHlFbGVtZW50X0RPTVBhcnNlcihodG1sKSB7CiAgICAgICAgICAgIC8vIFdlIGFkZCB0aGVzZSBleHRyYSBlbGVtZW50cyB0byBlbnN1cmUgdGhhdCB0aGUgcmVzdCBvZiB0aGUgY29udGVudCBpcyBwYXJzZWQgYXMgZXhwZWN0ZWQKICAgICAgICAgICAgLy8gZS5nLiBsZWFkaW5nIHdoaXRlc3BhY2UgaXMgbWFpbnRhaW5lZCBhbmQgdGFncyBsaWtlIGA8bWV0YT5gIGRvIG5vdCBnZXQgaG9pc3RlZCB0byB0aGUKICAgICAgICAgICAgLy8gYDxoZWFkPmAgdGFnLgogICAgICAgICAgICBodG1sID0gJzxib2R5PjxyZW1vdmU+PC9yZW1vdmU+JyArIGh0bWwgKyAnPC9ib2R5Pic7CiAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBib2R5ID0gKC8qKiBAdHlwZSB7P30gKi8gKG5ldyAoKC8qKiBAdHlwZSB7P30gKi8gKHdpbmRvdykpKS5ET01QYXJzZXIoKS5wYXJzZUZyb21TdHJpbmcoaHRtbCwgJ3RleHQvaHRtbCcpLmJvZHkpKTsKICAgICAgICAgICAgICAgIGJvZHkucmVtb3ZlQ2hpbGQoKC8qKiBAdHlwZSB7P30gKi8gKGJvZHkuZmlyc3RDaGlsZCkpKTsKICAgICAgICAgICAgICAgIHJldHVybiBib2R5OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNhdGNoIChfYSkgewogICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVXNlIGFuIEhUTUw1IGB0ZW1wbGF0ZWAgZWxlbWVudCwgaWYgc3VwcG9ydGVkLCBvciBhbiBpbmVydCBib2R5IGVsZW1lbnQgY3JlYXRlZCB2aWEKICAgICAgICAgKiBgY3JlYXRlSHRtbERvY3VtZW50YCB0byBjcmVhdGUgYW5kIGZpbGwgYW4gaW5lcnQgRE9NIGVsZW1lbnQuCiAgICAgICAgICogVGhpcyBpcyB0aGUgZGVmYXVsdCBzYW5lIHN0cmF0ZWd5IHRvIHVzZSBpZiB0aGUgYnJvd3NlciBkb2VzIG5vdCByZXF1aXJlIG9uZSBvZiB0aGUgc3BlY2lhbGlzZWQKICAgICAgICAgKiBzdHJhdGVnaWVzIGFib3ZlLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBodG1sCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXRJbmVydEJvZHlFbGVtZW50X0luZXJ0RG9jdW1lbnQoaHRtbCkgewogICAgICAgICAgICAvLyBQcmVmZXIgdXNpbmcgPHRlbXBsYXRlPiBlbGVtZW50IGlm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jdXN0b20gYXR0cmlidXRlcy4gVGhpcyBtZXRob2QKICAgICAgICAgKiBzdHJpcHMgdGhlbSBhbGwuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGVsCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzdHJpcEN1c3RvbU5zQXR0cnMoZWwpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBlbEF0dHJzID0gZWwuYXR0cmlidXRlczsKICAgICAgICAgICAgLy8gbG9vcCBiYWNrd2FyZHMgc28gdGhhdCB3ZSBjYW4gc3VwcG9ydCByZW1vdmFscy4KICAgICAgICAgICAgZm9yIChsZXQgaSA9IGVsQXR0cnMubGVuZ3RoIC0gMTsgMCA8IGk7IGktLSkgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgYXR0cmliID0gZWxBdHRycy5pdGVtKGkpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgYXR0ck5hbWUgPSAoLyoqIEB0eXBlIHs/fSAqLyAoYXR0cmliKSkubmFtZTsKICAgICAgICAgICAgICAgIGlmIChhdHRyTmFtZSA9PT0gJ3htbG5zOm5zMScgfHwgYXR0ck5hbWUuaW5kZXhPZignbnMxOicpID09PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgZWwucmVtb3ZlQXR0cmlidXRlKGF0dHJOYW1lKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBjaGlsZE5vZGUgPSAoLyoqIEB0eXBlIHs/fSAqLyAoZWwuZmlyc3RDaGlsZCkpOwogICAgICAgICAgICB3aGlsZSAoY2hpbGROb2RlKSB7CiAgICAgICAgICAgICAgICBpZiAoY2hpbGROb2RlLm5vZGVUeXBlID09PSBOb2RlLkVMRU1FTlRfTk9ERSkKICAgICAgICAgICAgICAgICAgICB0aGlzLnN0cmlwQ3VzdG9tTnNBdHRycygoLyoqIEB0eXBlIHs/fSAqLyAoY2hpbGROb2RlKSkpOwogICAgICAgICAgICAgICAgY2hpbGROb2RlID0gY2hpbGROb2RlLm5leHRTaWJsaW5nOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBXZSBuZWVkIHRvIGRldGVybWluZSB3aGV0aGVyIHRoZSBET01QYXJzZXIgZXhpc3RzIGluIHRoZSBnbG9iYWwgY29udGV4dC4KICAgICAqIFRoZSB0cnktY2F0Y2ggaXMgYmVjYXVzZSwgb24gc29tZSBicm93c2VycywgdHJ5aW5nIHRvIGFjY2VzcyB0aGlzIHByb3BlcnR5CiAgICAgKiBvbiB3aW5kb3cgY2FuIGFjdHVhbGx5IHRocm93IGFuIGVycm9yLgogICAgICoKICAgICAqIEBzdXBwcmVzcyB7dXNlbGVzc0NvZGV9CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBpc0RPTVBhcnNlckF2YWlsYWJsZSgpIHsKICAgICAgICB0cnkgewogICAgICAgICAgICByZXR1cm4gISEoKC8qKiBAdHlwZSB7P30gKi8gKHdpbmRvdykpKS5ET01QYXJzZXI7CiAgICAgICAgfQogICAgICAgIGNhdGNoIChfYSkgewogICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgfQogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogcGFja2FnZXMvY29yZS9zcmMvc2FuaXRpemF0aW9uL3VybF9zYW5pdGl6ZXIudHMKICAgICAqIEBzdXBwcmVzcyB7Y2hlY2tUeXBlcyxjb25zdGFudFByb3BlcnR5LGV4dHJhUmVxdWlyZSxtaXNzaW5nT3ZlcnJpZGUsbWlzc2luZ1J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AgICAgIHJldHVybiBzcmNzZXQuc3BsaXQoJywnKS5tYXAoKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gc3Jjc2V0CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAoc3Jjc2V0KSA9PiBfc2FuaXRpemVVcmwoc3Jjc2V0LnRyaW0oKSkpKS5qb2luKCcsICcpOwogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogcGFja2FnZXMvY29yZS9zcmMvc2FuaXRpemF0aW9uL2h0bWxfc2FuaXRpemVyLnRzCiAgICAgKiBAc3VwcHJlc3Mge2NoZWNrVHlwZXMsY29uc3RhbnRQcm9wZXJ0eSxleHRyYVJlcXVpcmUsbWlzc2luZ092ZXJyaWRlLG1pc3NpbmdSZXR1cm4sdW51c2VkUHJpdmF0ZU1lbWJlcnMsdXNlbGVzc0NvZGV9IGNoZWNrZWQgYnkgdHNjCiAgICAgKi8KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB0YWdzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiB0YWdTZXQodGFncykgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCByZXMgPSB7fTsKICAgICAgICBmb3IgKGNvbnN0IHQgb2YgdGFncy5zcGxpdCgnLCcpKQogICAgICAgICAgICByZXNbdF0gPSB0cnVlOwogICAgICAgIHJldHVybiByZXM7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7Li4uP30gc2V0cwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gbWVyZ2UkMSguLi5zZXRzKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHJlcyA9IHt9OwogICAgICAgIGZvciAoY29uc3QgcyBvZiBzZXRzKSB7CiAgICAgICAgICAgIG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ICAgIHdoaWxlIChjdXJyZW50KSB7CiAgICAgICAgICAgICAgICBpZiAoY3VycmVudC5ub2RlVHlwZSA9PT0gTm9kZS5FTEVNRU5UX05PREUpIHsKICAgICAgICAgICAgICAgICAgICB0cmF2ZXJzZUNvbnRlbnQgPSB0aGlzLnN0YXJ0RWxlbWVudCgoLyoqIEB0eXBlIHs/fSAqLyAoY3VycmVudCkpKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKGN1cnJlbnQubm9kZVR5cGUgPT09IE5vZGUuVEVYVF9OT0RFKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5jaGFycygoLyoqIEB0eXBlIHs/fSAqLyAoY3VycmVudC5ub2RlVmFsdWUpKSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAvLyBTdHJpcCBub24tZWxlbWVudCwgbm9uLXRleHQgbm9kZXMuCiAgICAgICAgICAgICAgICAgICAgdGhpcy5zYW5pdGl6ZWRTb21ldGhpbmcgPSB0cnVlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKHRyYXZlcnNlQ29udGVudCAmJiBjdXJyZW50LmZpcnN0Q2hpbGQpIHsKICAgICAgICAgICAgICAgICAgICBjdXJyZW50ID0gKC8qKiBAdHlwZSB7P30gKi8gKGN1cnJlbnQuZmlyc3RDaGlsZCkpOwogICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgd2hpbGUgKGN1cnJlbnQpIHsKICAgICAgICAgICAgICAgICAgICAvLyBMZWF2aW5nIHRoZSBlbGVtZW50LiBXYWxrIHVwIGFuZCB0byB0aGUgcmlnaHQsIGNsb3NpbmcgdGFncyBhcyB3ZSBnby4KICAgICAgICAgICAgICAgICAgICBpZiAoY3VycmVudC5ub2RlVHlwZSA9PT0gTm9kZS5FTEVNRU5UX05PREUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5lbmRFbGVtZW50KCgvKiogQHR5cGUgez99ICovIChjdXJyZW50KSkpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgbGV0IG5leHQgPSB0aGlzLmNoZWNrQ2xvYmJlcmVkRWxlbWVudChjdXJyZW50LCAoLyoqIEB0eXBlIHs/fSAqLyAoY3VycmVudC5uZXh0U2libGluZykpKTsKICAgICAgICAgICAgICAgICAgICBpZiAobmV4dCkgewogICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50ID0gbmV4dDsKICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGN1cnJlbnQgPSB0aGlzLmNoZWNrQ2xvYmJlcmVkRWxlbWVudChjdXJyZW50LCAoLyoqIEB0eXBlIHs/fSAqLyAoY3VycmVudC5wYXJlbnROb2RlKSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0aGlzLmJ1Zi5qb2luKCcnKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU2FuaXRpemVzIGFuIG9wZW5pbmcgZWxlbWVudCB0YWcgKGlmIHZhbGlkKSBhbmQgcmV0dXJucyB3aGV0aGVyIHRoZSBlbGVtZW50J3MgY29udGVudHMgc2hvdWxkCiAgICAgICAgICogYmUgdHJhdmVyc2VkLiBFbGVtZW50IGNvbnRlbnQgbXVzdCBhbHdheXMgYmUgdHJhdmVyc2VkIChldmVuIGlmIHRoZSBlbGVtZW50IGl0c2VsZiBpcyBub3QKICAgICAgICAgKiB2YWxpZC9zYWZlKSwgdW5sZXNzIHRoZSBlbGVtZW50IGlzIG9uZSBvZiBgU0tJUF9UUkFWRVJTSU5HX0NPTlRFTlRfSUZfSU5WQUxJRF9FTEVNRU5UU2AuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudCBUaGUgZWxlbWVudCB0byBzYW5pdGl6ZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fSBUcnVlIGlmIHRoZSBlbGVtZW50J3MgY29udGVudHMgc2hvdWxkIGJlIHRyYXZlcnNlZC4KICAgICAgICAgKi8KICAgICAgICBzdGFydEVsZW1lbnQoZWxlbWVudCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHRhZ05hbWUgPSBlbGVtZW50Lm5vZGVOYW1lLnRvTG93ZXJDYXNlKCk7CiAgICAgICAgICAgIGlmICghVkFMSURfRUxFTUVOVFMuaGFzT3duUHJvcGVydHkodGFnTmFtZSkpIHsKICAgICAgICAgICAgICAgIHRoaXMuc2FuaXRpemVkU29tZXRoaW5nID0gdHJ1ZTsKICAgICAgICAgICAgICAgIHJldHVybiAhU0tJUF9UUkFWRVJTSU5HX0NPTlRFTlRfSUZfSU5WQUxJRF9FTEVNRU5UUy5oYXNPd25Qcm9wZXJ0eSh0YWdOYW1lKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLmJ1Zi5wdXNoKCc8Jyk7CiAgICAgICAgICAgIHRoaXMuYnVmLnB1c2godGFnTmFtZSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZWxBdHRycyA9IGVsZW1lbnQuYXR0cmlidXRlczsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBlbEF0dHJzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBlbEF0dHIgPSBlbEF0dHJzLml0ZW0oaSk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBhdHRyTmFtZSA9ICgvKiogQHR5cGUgez99ICovIChlbEF0dHIpKS5uYW1lOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgbG93ZXIgPSBhdHRyTmFtZS50b0xvd2VyQ2FzZSgpOwogICAgICAgICAgICAgICAgaWYgKCFWQUxJRF9BVFRSUy5oYXNPd25Qcm9wZXJ0eShsb3dlcikpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLnNhbml0aXplZFNvbWV0aGluZyA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgY29udGludWU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBsZXQgdmFsdWUgPSAoLyoqIEB0eXBlIHs/fSAqLyAoZWxBdHRyKSkudmFsdWU7CiAgICAgICAgICAgICAgICAvLyBUT0RPKG1hcnRpbnByb2JzdCk6IFNwZWNpYWwgY2FzZSBpbWFnZSBVUklzIGZvciBkYXRhOmltYWdlLy4uLgogICAgICAgICAgICAgICAgaWYgKFVSSV9BVFRSU1tsb3dlcl0pCiAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSBfc2FuaXRpemVVcmwodmFsdWUpOwogICAgICAgICAgICAgICAgaWYgKFNSQ1NFVF9BVFRSU1tsb3dlcl0pCiAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSBzYW5pdGl6ZVNyY3NldCh2YWx1ZSk7CiAgICAgICAgICAgICAgICB0aGlzLmJ1Zi5wdXNoKCcgJywgYXR0ck5hbWUsICc9IicsIGVuY29kZUVudGl0aWVzKHZhbHVlKSwgJyInKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLmJ1Zi5wdXNoKCc+Jyk7CiAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gY3VycmVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZW5kRWxlbWVudChjdXJyZW50KSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdGFnTmFtZSA9IGN1cnJlbnQubm9kZU5hbWUudG9Mb3dlckNhc2UoKTsKICAgICAgICAgICAgaWYgKFZBTElEX0VMRU1FTlRTLmhhc093blByb3BlcnR5KHRhZ05hbWUpICYmICFWT0lEX0VMRU1FTlRTLmhhc093blByb3BlcnR5KHRhZ05hbWUpKSB7CiAgICAgICAgICAgICAgICB0aGlzLmJ1Zi5wdXNoKCc8LycpOwogICAgICAgICAgICAgICAgdGhpcy5idWYucHVzaCh0YWdOYW1lKTsKICAgICAgICAgICAgICAgIHRoaXMuYnVmLnB1c2goJz4nKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gY2hhcnMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGNoYXJzKGNoYXJzKSB7CiAgICAgICAgICAgIHRoaXMuYnVmLnB1c2goZW5jb2RlRW50aXRpZXMoY2hhcnMpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBub2RlCiAgICAgICAgICogQHBhcmFtIHs/fSBuZXh0Tm9kZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgY2hlY2tDbG9iYmVyZWRFbGVtZW50KG5vZGUsIG5leHROb2RlKSB7CiAgICAgICAgICAgIGlmIChuZXh0Tm9kZSAmJgogICAgICAgICAgICAgICAgKG5vZGUuY29tcGFyZURvY3VtZW50UG9zaXRpb24obmV4dE5vZGUpICYKICAgICAgICAgICAgICAgICAgICBOb2RlLkRPQ1VNRU5UX1BPU0lUSU9OX0NPTlRBSU5FRF9CWSkgPT09IE5vZGUuRE9DVU1FTlRfUE9TSVRJ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CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiAobWF0Y2gpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBoaSA9IG1hdGNoLmNoYXJDb2RlQXQoMCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbG93ID0gbWF0Y2guY2hhckNvZGVBdCgxKTsKICAgICAgICAgICAgcmV0dXJuICcmIycgKyAoKChoaSAtIDB4RDgwMCkgKiAweDQwMCkgKyAobG93IC0gMHhEQzAwKSArIDB4MTAwMDApICsgJzsnOwogICAgICAgIH0pKQogICAgICAgICAgICAucmVwbGFjZShOT05fQUxQSEFOVU1FUklDX1JFR0VYUCwgKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gbWF0Y2gKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIChtYXRjaCkgewogICAgICAgICAgICByZXR1cm4gJyYjJyArIG1hdGNoLmNoYXJDb2RlQXQoMCkgKyAnOyc7CiAgICAgICAgfSkpCiAgICAgICAgICAgIC5yZXBsYWNlKC88L2csICcmbHQ7JykKICAgICAgICAgICAgLnJlcGxhY2UoLz4vZywgJyZndDsnKTsKICAgIH0KICAgIC8qKiBAdHlwZSB7P30gKi8KICAgIGxldCBpbmVydEJvZHlIZWxwZXI7CiAgICAvKioKICAgICAqIFNhbml0aXplcyB0aGUgZ2l2ZW4gdW5zYWZlLCB1bnRydXN0ZWQgSFRNTCBmcmFnbWVudCwgYW5kIHJldHVybnMgSFRNTCB0ZXh0IHRoYXQgaXMgc2FmZSB0byBhZGQgdG8KICAgICAqIHRoZSBET00gaW4gYSBicm93c2VyIGVudmlyb25tZW50LgogICAgICogQHBhcmFtIHs/fSBkZWZhdWx0RG9jCiAgICAgKiBAcGFyYW0gez99IHVuc2FmZUh0bWxJbnB1dAogICAgICogQHJld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ICAgICAgbGV0IHBhcnNlZEh0bWwgPSB1bnNhZmVIdG1sOwogICAgICAgICAgICBkbyB7CiAgICAgICAgICAgICAgICBpZiAobVhTU0F0dGVtcHRzID09PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdGYWlsZWQgdG8gc2FuaXRpemUgaHRtbCBiZWNhdXNlIHRoZSBpbnB1dCBpcyB1bnN0YWJsZScpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgbVhTU0F0dGVtcHRzLS07CiAgICAgICAgICAgICAgICB1bnNhZmVIdG1sID0gcGFyc2VkSHRtbDsKICAgICAgICAgICAgICAgIHBhcnNlZEh0bWwgPSAoLyoqIEB0eXBlIHs/fSAqLyAoaW5lcnRCb2R5RWxlbWVudCkpLmlubmVySFRNTDsKICAgICAgICAgICAgICAgIGluZXJ0Qm9keUVsZW1lbnQgPSBpbmVydEJvZHlIZWxwZXIuZ2V0SW5lcnRCb2R5RWxlbWVudCh1bnNhZmVIdG1sKTsKICAgICAgICAgICAgfSB3aGlsZSAodW5zYWZlSHRtbCAhPT0gcGFyc2VkSHRtbCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc2FuaXRpemVyID0gbmV3IFNhbml0aXppbmdIdG1sU2VyaWFsaXplcigpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHNhZmVIdG1sID0gc2FuaXRpemVyLnNhbml0aXplQ2hpbGRyZW4oKC8qKiBAdHlwZSB7P30gKi8gKGdldFRlbXBsYXRlQ29udGVudCgoLyoqIEB0eXBlIHs/fSAqLyAoaW5lcnRCb2R5RWxlbWVudCkpKSkpIHx8IGluZXJ0Qm9keUVsZW1lbnQpOwogICAgICAgICAgICBpZiAoaXNEZXZNb2RlKCkgJiYgc2FuaXRpemVyLnNhbml0aXplZFNvbWV0aGluZykgewogICAgICAgICAgICAgICAgY29uc29sZS53YXJuKCdXQVJOSU5HOiBzYW5pdGl6aW5nIEhUTUwgc3RyaXBwZWQgc29tZSBjb250ZW50LCBzZWUgaHR0cDovL2cuY28vbmcvc2VjdXJpdHkjeHNzJyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHNhZmVIdG1sOwogICAgICAgIH0KICAgICAgICBmaW5hbGx5IHsKICAgICAgICAgICAgLy8gSW4gY2FzZSBhbnl0aGluZyBnb2VzIHdyb25nLCBjbGVhciBvdXQgaW5lcnRFbGVtZW50IHRvIHJlc2V0IHRoZSBlbnRpcmUgRE9NIHN0cnVjdHVyZS4KICAgICAgICAgICAgaWYgKGluZXJ0Qm9keUVsZW1lbnQpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHBhcmVudCA9IGdldFRlbXBsYXRlQ29udGVudChpbmVydEJvZHlFbGVtZW50KSB8fCBpbmVydEJvZHlFbGVtZW50OwogICAgICAgICAgICAgICAgd2hpbGUgKHBhcmVudC5maXJzdENoaWxkKSB7CiAgICAgICAgICAgICAgICAgICAgcGFyZW50LnJlbW92ZUNoaWxkKHBhcmVudC5maXJzdENoaWxkKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBlbAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0VGVtcGxhdGVDb250ZW50KGVsKSB7CiAgICAgICAgcmV0dXJuICdjb250ZW50JyBpbiAoKC8qKiBAdHlwZSB7P30gKi8gKGVsKSkpICYmIGlzVGVtcGxhdGVFbGVtZW50KGVsKSA/CiAgICAgICAgICAgIGVsLmNvbnRlbnQgOgogICAgICAgICAgICBudWxsOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IGVsCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBpc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kgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgbFZpZXcgPSAoLyoqIEB0eXBlIHs/fSAqLyAobXBWYWx1ZSkpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IG5vZGVJbmRleDsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCBjb21wb25lbnQgPSB1bmRlZmluZWQ7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBsZXQgZGlyZWN0aXZlcyA9IHVuZGVmaW5lZDsKICAgICAgICAgICAgICAgIGlmIChpc0NvbXBvbmVudEluc3RhbmNlKHRhcmdldCkpIHsKICAgICAgICAgICAgICAgICAgICBub2RlSW5kZXggPSBmaW5kVmlhQ29tcG9uZW50KGxWaWV3LCB0YXJnZXQpOwogICAgICAgICAgICAgICAgICAgIGlmIChub2RlSW5kZXggPT0gLTEpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdUaGUgcHJvdmlkZWQgY29tcG9uZW50IHdhcyBub3QgZm91bmQgaW4gdGhlIGFwcGxpY2F0aW9uJyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudCA9IHRhcmdldDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKGlzRGlyZWN0aXZlSW5zdGFuY2UodGFyZ2V0KSkgewogICAgICAgICAgICAgICAgICAgIG5vZGVJbmRleCA9IGZpbmRWaWFEaXJlY3RpdmUobFZpZXcsIHRhcmdldCk7CiAgICAgICAgICAgICAgICAgICAgaWYgKG5vZGVJbmRleCA9PSAtMSkgewogICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ1RoZSBwcm92aWRlZCBkaXJlY3RpdmUgd2FzIG5vdCBmb3VuZCBpbiB0aGUgYXBwbGljYXRpb24nKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZGlyZWN0aXZlcyA9IGdldERpcmVjdGl2ZXNBdE5vZGVJbmRleChub2RlSW5kZXgsIGxWaWV3LCBmYWxzZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBub2RlSW5kZXggPSBmaW5kVmlhTmF0aXZlRWxlbWVudChsVmlldywgKC8qKiBAdHlwZSB7P30gKi8gKHRhcmdldCkpKTsKICAgICAgICAgICAgICAgICAgICBpZiAobm9kZUluZGV4ID09IC0xKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vIHRoZSBnb2FsIGlzIG5vdCB0byBmaWxsIHRoZSBlbnRpcmUgY29udGV4dCBmdWxsIG9mIGRhdGEgYmVjYXVzZSB0aGUgbG9va3VwcwogICAgICAgICAgICAgICAgLy8gYXJlIGV4cGVuc2l2ZS4gSW5zdGVhZCwgb25seSB0aGUgdGFyZ2V0IGRhdGEgKHRoZSBlbGVtZW50LCBjb21wb25lbnQsIGNvbnRhaW5lciwgSUNVCiAgICAgICAgICAgICAgICAvLyBleHByZXNzaW9uIG9yIGRpcmVjdGl2ZSBkZXRhaWxzKSBhcmUgZmlsbGVkIGludG8gdGhlIGNvbnRleHQuIElmIGNhbGxlZCBtdWx0aXBsZSB0aW1lcwogICAgICAgICAgICAgICAgLy8gd2l0aCBkaWZmZXJlbnQgdGFyZ2V0IHZhbHVlcyB0aGVuIHRoZSBtaXNzaW5nIHRhcmdldCBkYXRhIHdpbGwgYmUgZmlsbGVkIGluLgogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgbmF0aXZlID0gdW53cmFwUk5vZGUobFZpZXdbbm9kZUluZGV4XSk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBleGlzdGluZ0N0eCA9IHJlYWRQYXRjaGVkRGF0YShuYXRpdmUpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgY29udGV4dCA9IChleGlzdGluZ0N0eCAmJiAhQXJyYXkuaXNBcnJheShleGlzdGluZ0N0eCkpID8KICAgICAgICAgICAgICAgICAgICBleGlzdGluZ0N0eCA6CiAgICAgICAgICAgICAgICAgICAgY3JlYXRlTENvbnRleHQobFZpZXcsIG5vZGVJbmRleCwgbmF0aXZlKTsKICAgICAgICAgICAgICAgIC8vIG9ubHkgd2hlbiB0aGUgY29tcG9uZW50IGhhcyBiZWVuIGRpc2NvdmVyZWQgdGhlbiB1cGRhdGUgdGhlIG1vbmtleS1wYXRjaAogICAgICAgICAgICAgICAgaWYgKGNvbXBvbmVudCAmJiBjb250ZXh0LmNvbXBvbmVudCA9PT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgICAgICAgICAgY29udGV4dC5jb21wb25lbnQgPSBjb21wb25lbnQ7CiAgICAgICAgICAgICAgICAgICAgYXR0YWNoUGF0Y2hEYXRhKGNvbnRleHQuY29tcG9uZW50LCBjb250ZXh0KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vIG9ubHkgd2hlbiB0aGUgZGlyZWN0aXZlcyBoYXZlIGJlZW4gZGlzY292ZXJlZCB0aGVuIHVwZGF0ZSB0aGUgbW9ua2V5LXBhdGNoCiAgICAgICAgICAgICAgICBpZiAoZGlyZWN0aXZlcyAmJiBjb250ZXh0LmRpcmVjdGl2ZXMgPT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICAgICAgICAgIGNvbnRleHQuZGlyZWN0aXZlcyA9IGRpcmVjdGl2ZXM7CiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBkaXJlY3RpdmVzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGF0dGFjaFBhdGNoRGF0YShkaXJlY3RpdmVzW2ldLCBjb250ZXh0KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBhdHRhY2hQYXRjaERhdGEoY29udGV4dC5uYXRpdmUsIGNvbnRleHQpOwogICAgICAgICAgICAgICAgbXBWYWx1ZSA9IGNvbnRleHQ7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgckVsZW1lbnQgPSAoLyoqIEB0eXBlIHs/fSAqLyAodGFyZ2V0KSk7CiAgICAgICAgICAgIG5nRGV2TW9kZSAmJiBhc3NlcnREb21Ob2RlKHJFbGVtZW50KTsKICAgICAgICAgICAgLy8gaWYgdGhlIGNvbnRleHQgaXMgbm90IGZvdW5kIHRoZW4gd2UgbmVlZCB0byB0cmF2ZXJzZSB1cHdhcmRzIHVwIHRoZSBET00KICAgICAgICAgICAgLy8gdG8gZmluZCB0aGUgbmVhcmVzdCBlbGVtZW50IHRoYXQgaGFzIGFscmVhZHkgYmVlbiBtb25rZXkgcGF0Y2hlZCB3aXRoIGRhdGEKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgcGFyZW50ID0gKC8qKiBAdHlwZSB7P30gKi8gKHJFbGVtZW50KSk7CiAgICAgICAgICAgIHdoaWxlIChwYXJlbnQgPSBwYXJlbnQucGFyZW50Tm9kZSkgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgcGFyZW50Q29udGV4dCA9IHJlYWRQYXRjaGVkRGF0YShwYXJlbnQpOwogICAgICAgICAgICAgICAgaWYgKHBhcmVudENvbnRleHQpIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgbGV0IGxWaWV3OwogICAgICAgICAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KHBhcmVudENvbnRleHQpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGxWaWV3ID0gKC8qKiBAdHlwZSB7P30gKi8gKHBhcmVudENvbnRleHQpKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGxWaWV3ID0gcGFyZW50Q29udGV4dC5sVmlldzsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgLy8gdGhlIGVkZ2Ugb2YgdGhlIGFwcCB3YXMgYWxzbyByZWFjaGVkIGhlcmUgdGhyb3VnaCBhbm90aGVyIG1lYW5zCiAgICAgICAgICAgICAgICAgICAgLy8gKG1heWJlIGJlY2F1c2UgdGhlIERPTSB3YXMgY2hhbmdlZCBtYW51YWxseSkuCiAgICAgICAgICAgICAgICAgICAgaWYgKCFsVmlldykgewogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGluZGV4ID0gZmluZFZpYU5hdGl2ZUVsZW1lbnQobFZpZXcsIHJFbGVtZW50KTsKICAgICAgICAgICAgICAgICAgICBpZiAoaW5kZXggPj0gMCkgewogICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG5hdGl2ZSA9IHVud3JhcFJOb2RlKGxWaWV3W2luZGV4XSk7CiAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgY29udGV4dCA9IGNyZWF0ZUxDb250ZXh0KGxWaWV3LCBpbmRleCwgbmF0aXZlKTsKICAgICAgICAgICAgICAgICAgICAgICAgYXR0YWNoUGF0Y2hEYXRhKG5hdGl2ZSwgY29udGV4dCk7CiAgICAgICAgICAgICAgICAgICAgICAgIG1wVmFsdWUgPSBjb250ZXh0OwogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuICgoLyoqIEB0eXBlIHs/fSAqLyAobXBWYWx1ZSkpKSB8fCBudWxsOwogICAgfQogICAgLyoqCiAgICAgKiBDcmVhdGVzIGFuIGVtcHR5IGluc3RhbmNlIG9mIGEgYExDb250ZXh0YCBjb250ZXh0CiAgICAgKiBAcGFyYW0gez99IGxWaWV3CiAgICAgKiBAcGFyYW0gez99IG5vZGVJbmRleAogICAgICogQHBhcmFtIHs/fSBuYXRpdmUKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGNyZWF0ZUxDb250ZXh0KGxWaWV3LCBub2RlSW5kZXgsIG5hdGl2ZSkgewogICAgICAgIHJldHVybiB7CiAgICAgICAgICAgIGxWaWV3LAogICAgICAgICAgICBub2RlSW5kZXgsCiAgICAgICAgICAgIG5hdGl2ZSwKICAgICAgICAgICAgY29tcG9uZW50OiB1bmRlZmluZWQsCiAgICAgICAgICAgIGRpcmVjdGl2ZXM6IHVuZGVmaW5lZCwKICAgICAgICAgICAgbG9jYWxSZWZzOiB1bmRlZmluZWQsCiAgICAgICAgfTsKICAgIH0KICAgIC8qKgogICAgICogVGFrZXMgYSBjb21wb25lbnQgaW5zdGFuY2UgYW5kIHJldHVybnMgdGhlIHZpZXcgZm9yIHRoYXQgY29tcG9uZW50LgogICAgICoKICAgICAqIEBwYXJhbSB7P30gY29tcG9uZW50SW5zdGFuY2UKICAgICAqIEByZXR1cm4gez99IFRoZSBjb21wb25lbnQncyB2aWV3CiAgICAgKi8KICAgIGZ1bmN0aW9uIGdldENvbXBvbmVudFZpZXdCeUluc3RhbmNlKGNvbXBvbmVudEluc3RhbmNlKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBsVmlldyA9IHJlYWRQYXRjaGVkRGF0YShjb21wb25lbnRJbnN0YW5jZSk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCB2aWV3OwogICAgICAgIGlmIChBcnJheS5pc0FycmF5KGxWaWV3KSkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG5vZGVJbmRleCA9IGZpbmRWaWFDb21wb25lbnQobFZpZXcsIGNvbXBvbmVudEluc3RhbmNlKTsKICAgICAgICAgICAgdmlldyA9IGdldENvbXBvbmVudExWaWV3QnlJbmRleChub2RlSW5kZXgsIGxWaWV3KTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjb250ZXh0ID0gY3JlYXRlTENvbnRleHQobFZpZXcsIG5vZGVJbmRleCwgKC8qKiBAdHlwZSB7P30gKi8gKHZpZXdbSE9TVF0pKSk7CiAgICAgICAgICAgIGNvbnRleHQuY29tcG9uZW50ID0gY29tcG9uZW50SW5zdGFuY2U7CiAgICAgICAgICAgIGF0dGFjaFBhdGNoRGF0YShjb21wb25lbnRJbnN0YW5jZSwgY29udGV4dCk7CiAgICAgICAgICAgIGF0dGFjaFBhdGNoRGF0YShjb250ZXh0Lm5hdGl2ZSwgY29udGV4dCk7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGNvbnRleHQgPSAoLyoqIEB0eXBlIHs/fSAqLyAoKC8qKiBAdHlwZSB7P30gKi8gKGxWaWV3KSkpKTsKICAgICAgICAgICAgdmlldyA9IGdldENvbXBvbmVud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4gTFZpZXcgYW5kIHJldHVybnMgdGhlIG1hdGNoaW5nIGluZGV4CiAgICAgKiBAcGFyYW0gez99IGxWaWV3CiAgICAgKiBAcGFyYW0gez99IHRhcmdldAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZmluZFZpYU5hdGl2ZUVsZW1lbnQobFZpZXcsIHRhcmdldCkgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgdE5vZGUgPSBsVmlld1tUVklFV10uZmlyc3RDaGlsZDsKICAgICAgICB3aGlsZSAodE5vZGUpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBuYXRpdmUgPSAoLyoqIEB0eXBlIHs/fSAqLyAoZ2V0TmF0aXZlQnlUTm9kZU9yTnVsbCh0Tm9kZSwgbFZpZXcpKSk7CiAgICAgICAgICAgIGlmIChuYXRpdmUgPT09IHRhcmdldCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHROb2RlLmluZGV4OwogICAgICAgICAgICB9CiAgICAgICAgICAgIHROb2RlID0gdHJhdmVyc2VOZXh0RWxlbWVudCh0Tm9kZSk7CiAgICAgICAgfQogICAgICAgIHJldHVybiAtMTsKICAgIH0KICAgIC8qKgogICAgICogTG9jYXRlcyB0aGUgbmV4dCB0Tm9kZSAoY2hpbGQsIHNpYmxpbmcgb3IgcGFyZW50KS4KICAgICAqIEBwYXJhbSB7P30gdE5vZGUKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHRyYXZlcnNlTmV4dEVsZW1lbnQodE5vZGUpIHsKICAgICAgICBpZiAodE5vZGUuY2hpbGQpIHsKICAgICAgICAgICAgcmV0dXJuIHROb2RlLmNoaWxkOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmICh0Tm9kZS5uZXh0KSB7CiAgICAgICAgICAgIHJldHVybiB0Tm9kZS5uZXh0OwogICAgICAgIH0KICAgICAgICBlbHNlI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b21wb25lbnRJbmRpY2VzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBlbGVtZW50Q29tcG9uZW50SW5kZXggPSBjb21wb25lbnRJbmRpY2VzW2ldOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgY29tcG9uZW50VmlldyA9IGdldENvbXBvbmVudExWaWV3QnlJbmRleChlbGVtZW50Q29tcG9uZW50SW5kZXgsIGxWaWV3KTsKICAgICAgICAgICAgICAgIGlmIChjb21wb25lbnRWaWV3W0NPTlRFWFRdID09PSBjb21wb25lbnRJbnN0YW5jZSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBlbGVtZW50Q29tcG9uZW50SW5kZXg7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgcm9vdENvbXBvbmVudFZpZXcgPSBnZXRDb21wb25lbnRMVmlld0J5SW5kZXgoSEVBREVSX09GRlNFVCwgbFZpZXcpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHJvb3RDb21wb25lbnQgPSByb290Q29tcG9uZW50Vmlld1tDT05URVhUXTsKICAgICAgICAgICAgaWYgKHJvb3RDb21wb25lbnQgPT09IGNvbXBvbmVudEluc3RhbmNlKSB7CiAgICAgICAgICAgICAgICAvLyB3ZSBhcmUgZGVhbGluZyB3aXRoIHRoZSByb290IGVsZW1lbnQgaGVyZSB0aGVyZWZvcmUgd2Uga25vdyB0aGF0IHRoZQogICAgICAgICAgICAgICAgLy8gZWxlbWVudCBpcyB0aGUgdmVyeSBmaXJzdCBlbGVtZW50IGFmdGVyIHRoZSBIRUFERVIgZGF0YSBpbiB0aGUgbFZpZXcKICAgICAgICAg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GggdGFnbmFtZSAke3ROb2RlLnRhZ05hbWV9YCk7CiAgICB9CiAgICAvKioKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHRocm93TWl4ZWRNdWx0aVByb3ZpZGVyRXJyb3IoKSB7CiAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBDYW5ub3QgbWl4IG11bHRpIHByb3ZpZGVycyBhbmQgcmVndWxhciBwcm92aWRlcnNgKTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/PX0gbmdNb2R1bGVUeXBlCiAgICAgKiBAcGFyYW0gez89fSBwcm92aWRlcnMKICAgICAqIEBwYXJhbSB7Pz19IHByb3ZpZGVyCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiB0aHJvd0ludmFsaWRQcm92aWRlckVycm9yKG5nTW9kdWxlVHlwZSwgcHJvdmlkZXJzLCBwcm92aWRlcikgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgbmdNb2R1bGVEZXRhaWwgPSAnJzsKICAgICAgICBpZiAobmdNb2R1bGVUeXBlICYmIHByb3ZpZGVycykgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHByb3ZpZGVyRGV0YWlsID0gcHJvdmlkZXJzLm1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdiA9PiB2ID09IHByb3ZpZGVyID8gJz8nICsgcHJvdmlkZXIgKyAnPycgOiAnLi4uJykpOwogICAgICAgICAgICBuZ01vZHVsZURldGFpbCA9CiAgICAgICAgICAgICAgICBgIC0gb25seSBpbnN0YW5jZXMgb2YgUHJvdmlkZXIgYW5kIFR5cGUgYXJlIGFsbG93ZWQsIGdvdDogWyR7cHJvdmlkZXJEZXRhaWwuam9pbignLCAnKX1dYDsK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mluZyB0aGF0CiAgICAgICAgLy8gY29udGFpbnMgSU5URVJQT0xBVElPTl9ERUxJTUlURVIsIHRoZSBsYXlvdXQgaW4gdFZpZXcuZGF0YSBmb3IgdGhpcyBjYXNlIHdpbGwgbG9vayBsaWtlIHRoaXM6CiAgICAgICAgLy8gWy4uLiwgJ2lk77+9UHJlZml4IO+/vSBhbmQg77+9IHN1ZmZpeCcsIG51bGwsIG51bGwsIG51bGwsIC4uLl0KICAgICAgICBpZiAobWV0YWRhdGEgPT09IG51bGwpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgaWR4ID0gYmluZGluZ0luZGV4IC0gMTsKICAgICAgICAgICAgd2hpbGUgKHR5cGVvZiB0RGF0YVtpZHhdICE9PSAnc3RyaW5nJyAmJiB0RGF0YVtpZHggKyAxXSA9PT0gbnVsbCkgewogICAgICAgICAgICAgICAgaWR4LS07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBtZXRhID0gdERhdGFbaWR4XTsKICAgICAgICAgICAgaWYgKHR5cGVvZiBtZXRhID09PSAnc3RyaW5nJykgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgbWF0Y2hlcyA9IG1ldGEubWF0Y2gobmV3IFJlZ0V4cChJTlRFUlBPTEFUSU9OX0RFTElNSVRFUiwgJ2cnKSk7CiAgICAgICAgICAgICAgICAvLyBmaXJzdCBpbnRlcnBvbGF0aW9uIGRlbGltaXRlciBzZXBhcmF0ZXMgcHJvcGVydHkgbmFtZSBmcm9tIGludGVycG9sYXRpb24gcGFydHMgKGluIGNhc2Ugb2YKICAgICAgICAgICAgICAgIC8vIHByb3BlcnR5IGludGVycG9sYXRpb25zKSwgc28gd2Ugc3VidHJhY3Qgb25lIGZyb20gdG90YWwgbnVtYmVyIG9mIGZvdW5kIGRlbGltaXRlcnMKICAgICAgICAgICAgICAgIGlmIChtYXRjaGVzICYmIChtYXRjaGVzLmxlbmd0aCAtIDEpID4gYmluZGluZ0luZGV4IC0gaWR4KSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNvbnN0cnVjdERldGFpbHNGb3JJbnRlcnBvbGF0aW9uKGxWaWV3LCBpZHgsIGJpbmRpbmdJbmRleCwgbWV0YSwgbmV3VmFsdWUpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiB7IHByb3BOYW1lOiB1bmRlZmluZWQsIG9sZFZhbHVlLCBuZXdWYWx1ZSB9OwogICAgfQogICAgLyoqCiAgICAgKiBSZXR1cm5zIGB0cnVlYCBpZiB0aGUgYFROb2RlYCBoYXMgYSBkaXJlY3RpdmUgd2hpY2ggaGFzIGBcQElucHV0KClgIGZvciBgY2xhc3NgIGJpbmRpbmcuCiAgICAgKgogICAgICogYGBgCiAgICAgKiA8ZGl2IG15LWRpciBbY2xhc3NdPSJleHAiPjwvZGl2PgogICAgICogYGBgCiAgICAgKiBhbmQKICAgICAqIGBgYAogICAgICogXEBEaXJlY3RpdmUoewogICAgICogfSkKICAgICAqIGNsYXNzIE15RGlyZWN0aXZlIHsKICAgICAqIFxASW5wdXQoKQogICAgICogICBjbGFzczogc3RyaW5nOwogICAgICogfQogICAgICogYGBgCiAgICAgKgogICAgICogSW4gdGhlIGFib3ZlIGNhc2UgaXQgaXMgbmVjZXNzYXJ5IHRvIHdyaXRlIHRoZSByZWNvbmNpbGVkIHN0eWxpbmcgaW5mb3JtYXRpb24gaW50byB0aGUKICAgICAqIGRpcmVjdGl2ZSdzIGlucHV0LgogICAgICoKICAgICAqIEBwYXJhbSB7P30gdE5vZGUKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGhhc0NsYXNzSW5wdXQodE5vZGUpIHsKICAgICAgICByZXR1cm4gKHROb2RlLmZsYWdzICYgMTYgLyogaGFzQ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pbmRleE9mKGNsYXNzVG9TZWFyY2gsIHN0YXJ0aW5nSW5kZXgpOwogICAgICAgICAgICBpZiAoZm91bmRJbmRleCA9PT0gLTEpCiAgICAgICAgICAgICAgICByZXR1cm4gZm91bmRJbmRleDsKICAgICAgICAgICAgaWYgKGZvdW5kSW5kZXggPT09IDAgfHwgY2xhc3NOYW1lLmNoYXJDb2RlQXQoZm91bmRJbmRleCAtIDEpIDw9IDMyIC8qIFNQQUNFICovKSB7CiAgICAgICAgICAgICAgICAvLyBFbnN1cmUgdGhhdCBpdCBoYXMgbGVhZGluZyB3aGl0ZXNwYWNlCiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBsZW5ndGggPSBjbGFzc1RvU2VhcmNoLmxlbmd0aDsKICAgICAgICAgICAgICAgIGlmIChmb3VuZEluZGV4ICsgbGVuZ3RoID09PSBlbmQgfHwKICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWUuY2hhckNvZGVBdChmb3VuZEluZGV4ICsgbGVuZ3RoKSA8PSAzMiAvKiBTUEFDRSAqLykgewogICAgICAgICAgICAgICAgICAgIC8vIEVuc3VyZSB0aGF0IGl0IGhhcyB0cmFpbGluZyB3aGl0ZXNwYWNlCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZvdW5kSW5kZXg7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gRmFsc2UgcG9zaXRpdmUsIGtlZXAgc2VhcmNoaW5nIGZyb20gd2hlcmUgd2UgbGVmdCBvZmYuCiAgICAgICAgICAgIHN0YXJ0aW5nSW5kZXggPSBmb3VuZEluZGV4ICsgMTsKICAgICAgICB9CiAgICB9CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBOR19URU1QTEFURV9TRUxFQ1RPUiA9ICduZy10ZW1wbGF0ZSc7CiAgICAvKioKICAgICAqIFNlYXJjaCB0aGUgYFRBdHRyaWJ1dGVzYCB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YXZpb3IuCiAgICAgICAgbmdEZXZNb2RlICYmCiAgICAgICAgICAgIGFzc2VydEVxdWFsKGNzc0NsYXNzVG9NYXRjaCwgY3NzQ2xhc3NUb01hdGNoLnRvTG93ZXJDYXNlKCksICdDbGFzcyBuYW1lIGV4cGVjdGVkIHRvIGJlIGxvd2VyY2FzZS4nKTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IGkgPSAwOwogICAgICAgIHdoaWxlIChpIDwgYXR0cnMubGVuZ3RoKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGl0ZW0gPSBhdHRyc1tpKytdOwogICAgICAgICAgICBpZiAoaXNQcm9qZWN0aW9uTW9kZSAmJiBpdGVtID09PSAnY2xhc3MnKSB7CiAgICAgICAgICAgICAgICBpdGVtID0gKC8qKiBAdHlwZSB7P30gKi8gKGF0dHJzW2ldKSk7CiAgICAgICAgICAgICAgICBpZiAoY2xhc3NJbmRleE9mKGl0ZW0udG9Mb3dlckNhc2UoKSwgY3NzQ2xhc3NUb01hdGNoLCAwKSAhPT0gLTEpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChpdGVtID09PSAxIC8qIENsYXNzZXMgKi8pIHsKICAgICAgICAgICAgICAgIC8vIFdlIGZvdW5kIHRoZSBjbGFzc2VzIHNlY3Rpb24uIFN0YXJ0IHNlYXJjaGluZyBmb3IgdGhlIGNsYXNzLgogICAgICAgICAgICAgICAgd2hpbGUgKGkgPCBhdHRycy5sZW5ndGggJiYgdHlwZW9mIChpdGVtID0gYXR0cnNbaSsrXSkgPT0gJ3N0cmluZycpIHsKICAgICAgICAgICAgICAgICAgICAvLyB3aGlsZSB3ZSBoYXZlIHN0cmluZ3MKICAgICAgICAgICAgICAgICAgICBpZiAoaXRlbS50b0xvd2VyQ2FzZSgpID09P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JzLCB3ZSBza2lwIHRvIHRoZSBuZXh0ICI6bm90IiBpZiB0aGUKICAgICAgICAvLyBjdXJyZW50IG9uZSBkb2Vzbid0IG1hdGNoCiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBza2lwVG9OZXh0U2VsZWN0b3IgPSBmYWxzZTsKICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHNlbGVjdG9yLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgY3VycmVudCA9IHNlbGVjdG9yW2ldOwogICAgICAgICAgICBpZiAodHlwZW9mIGN1cnJlbnQgPT09ICdudW1iZXInKSB7CiAgICAgICAgICAgICAgICAvLyBJZiB3ZSBmaW5pc2ggcHJvY2Vzc2luZyBhIDpub3Qgc2VsZWN0b3IgYW5kIGl0IGhhc24ndCBmYWlsZWQsIHJldHVybiBmYWxzZQogICAgICAgICAgICAgICAgaWYgKCFza2lwVG9OZXh0U2VsZWN0b3IgJiYgIWlzUG9zaXRpdmUobW9kZSkgJiYgIWlzUG9zaXRpdmUoY3VycmVudCkpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvLyBJZiB3ZSBhcmUgc2tpcHBpbmcgdG8gdGhlIG5leHQgOm5vdCgpIGFuZCB0aGlzIG1vZGUgZmxhZyBpcyBwb3NpdGl2ZSwKICAgICAgICAgICAgICAgIC8vIGl0J3MgYSBwYXJ0IG9mIHRoZSBjdXJyZW50IDpub3QoKSBzZWxlY3RvciwgYW5kIHdlIHNob3VsZCBrZWVwIHNraXBwaW5nCiAgICAgICAgICAgICAgICBpZiAoc2tpcFRvTmV4dFNlbGVjdG9yICYmIGlzUG9zaXRpdmUoY3VycmVudCkpCiAgICAgICAgICAgICAgICAgICAgY29udGludWU7CiAgICAgICAgICAgICAgICBza2lwVG9OZXh0U2VsZWN0b3IgPSBmYWxzZTsKICAgICAgICAgICAgICAgIG1vZGUgPSAoKC8qKiBAdHlwZSB7P30gKi8gKGN1cnJlbnQpKSkgfCAobW9kZSAmIDEgLyogTk9UICovKTsKICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChza2lwVG9OZXh0U2VsZWN0b3IpCiAgICAgICAgICAgICAgICBjb250aW51ZTsKICAgICAgICAgICAgaWYgKG1vZGUgJiA0IC8qIEVMRU1FTlQgKi8pIHsKICAgICAgICAgICAgICAgIG1vZGUgPSAyIC8qIEFUVFJJQlVURSAqLyB8IG1vZGUgJiAxIC8qIE5PVCAqLzsKICAgICAgICAgICAgICAgIGlmIChjdXJyZW50ICE9PSAnJyAmJiAhaGFzVGFnQW5kVHlwZU1hdGNoKHROb2RlLCBjdXJyZW50LCBpc1Byb2plY3Rpb25Nb2RlKSB8fAogICAgICAgICAgICAgICAgICAgIGN1cnJlbnQgPT09ICcnICYmIHNlbGVjdG9yLmxlbmd0aCA9PT0gMSkgewogICAgICAgICAgICAgICAgICAgIGlmIChpc1Bvc2l0aXZlKG1vZGUpKQogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICAgICAgc2tpcFRvTmV4dFNlbGVjdG9yID0gdHJ1ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHNlbGVjdG9yQXR0clZhbHVlID0gbW9kZSAmIDggLyogQ0xBU1MgKi8gPyBjdXJyZW50IDogc2VsZWN0b3JbKytpXTsKICAgICAgICAgICAgICAgIC8vIHNwZWNpYWwgY2FzZSBmb3IgbWF0Y2hpbmcgYWdhaW5zdCBjbGFzc2VzIHdoZW4gYSB0Tm9kZSBoYXMgYmVlbiBpbnN0YW50aWF0ZWQgd2l0aAogICAgICAgICAgICAgICAgLy8gY2xhc3MgYW5kIHN0eWxlIHZhbHVlcyBhcyBzZXBhcmF0ZSBhdHRyaWJ1dGUgdmFsdWVzIChlLmcuIFsndGl0bGUnLCBDTEFTUywgJ2ZvbyddKQogICAgICAgICAgICAgICAgaWYgKChtb2RlICYgOCAvKiBDTEFTUyAqLykgJiYgdE5vZGUuYXR0cnMgIT09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICBpZiAoIWlzQ3NzQ2xhc3NNYXRjaGluZyh0Tm9kZS5hdHRycywgKC8qKiBAdHlwZSB7P30gKi8gKHNlbGVjdG9yQXR0clZhbHVlKSksIGlzUHJvamVjdGlvbk1vZGUpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpc1Bvc2l0aXZlKG1vZGUpKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgICAgICAgICAgICBza2lwVG9OZXh0U2VsZWN0b3IgPSB0cnVlOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGF0dHJOYW1lID0gKG1vZGUgJiA4IC8qIENMQVNTICovKSA/ICdjbGFzcycgOiBjdXJyZW50OwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgYXR0ckluZGV4SW5Ob2RlID0gZmluZEF0dHJJbmRleEluTm9kZShhdHRyTmFtZSwgbm9kZUF0dHJzLCBpc0lubGluZVRlbXBsYXRlKHROb2RlKSwgaXNQcm9qZWN0aW9uTW9kZSk7CiAgICAgICAgICAgICAgICBpZiAoYXR0ckluZGV4SW5Ob2RlID09PSAtMSkgewogICAgICAgICAgICAgICAgICAgIGlmIChpc1Bvc2l0aXZlKG1vZGUpKQogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICAgICAgc2tpcFRvTmV4dFNlbGVjdG9yID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChzZWxlY3RvckF0dHJWYWx1ZSAhPT0gJycpIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgbGV0IG5vZGVBdHRyVmFsdWU7CiAgICAgICAgICAgICAgICAgICAgaWYgKGF0dHJJbmRleEluTm9kZSA+IG5hbWVPbmx5TWFya2VySWR4KSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG5vZGVBdHRyVmFsdWUgPSAnJzsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG5nRGV2TW9kZSAmJgogICAgICAgICAgICAgICAgICAgICAgICAgICAgYXNzZXJ0Tm90RXF1YWwobm9kZUF0dHJzW2F0dHJJbmRleEluTm9kZV0sIDAgLyogTmFtZXNwYWNlVVJJICovLCAnV2UgZG8gbm90IG1hdGNoIGRpcmVjdGl2ZXMgb24gbmFtZXNwYWNlZCBhdHRyaWJ1dGVzJyk7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHdlIGxvd2VyY2FzZSB0aGUgYXR0cmlidXRlIHZhbHVlIHRvIGJlIGFibGUgdG8gbWF0Y2gKICAgICAgICAgICAgICAgICAgICAgICAgLy8gc2VsZWN0b3JzIHdpdGhvdXQgY2FzZS1zZW5zaXRpdml0eQogICAgICAgICAgICAgICAgICAgICAgICAvLyAoc2VsZWN0b3JzIGFyZSBhbHJlYWR5IGluIGxvd2VyY2FzZSB3aGVuIGdlbmVyYXRlZCkKICAgICAgICAgICAgICAgICAgICAgICAgbm9kZUF0dHJWYWx1ZSA9ICgoLyoqIEB0eXBlIHs/fSAqLyAobm9kZUF0dHJzW2F0dHJJbmRleEluTm9kZSArIDFdKSkpLnRvTG93ZXJDYXNlKCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBjb21wYXJlQWdhaW5zdENsYXNzTmFtZSA9IG1vZGUgJiA4IC8qIENMQVNTICovID8gbm9kZUF0dHJWYWx1ZSA6IG51bGw7CiAgICAgICAgICAgICAgICAgICAgaWYgKGNvbXBhcmVBZ2FpbnN0Q2xhc3NOYW1lICYmCiAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzSW5kZXhPZihjb21wYXJlQWdhaW5zdENsYXNzTmFtZSwgKC8qKiBAdHlwZSB7P30gKi8gKHNlbGVjdG9yQXR0clZhbHVlKSksIDApICE9PSAtMSB8fAogICAgICAgICAgICAgICAgICAgICAgICBtb2RlICYgMiAvKiBBVFRSSUJVVEUgKi8gJiYgc2VsZWN0b3JBdHRyVmFsdWUgIT09IG5vZGVBdHRyVmFsdWUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlzUG9zaXRpdmUobW9kZSkpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICAgICAgICAgIHNraXBUb05leHRTZWxlY3RvciA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiBpc1Bvc2l0aXZlKG1vZGUpIHx8IHNraXBUb05leHRTZWxlY3RvcjsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBtb2RlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBpc1Bvc2l0aXZlKG1vZGUpIHsKICAgICAgICByZXR1cm4gKG1vZGUgJiAxIC8qIE5PVCAqLykgPT09IDA7CiAgICB9CiAgICAvKioKICAgICAqIEV4YW1pbmVzIHRoZSBhdHRyaWJ1dGUncyBkZWZpbml0aW9uIGFycmF5IGZvciBhIG5vZGUgdG8gZmluZCB0aGUgaW5kZXggb2YgdGhlCiAgICAgKiBhdHRyaWJ1dGUgdGhhdCBtYXRjaGVzIHRoZSBnaXZlbiBgbmFtZWAuCiAgICAgKgogICAgICogTk9URTogVGhpcyB3aWxsIG5vdCBtYXRjaCBuYW1lc3BhY2VkIGF0dHJpYnV0ZXMuCiAgICAgKgogICAgICogQXR0cmlidXRlIG1hdGNoaW5nIGRlcGVuZHMgdXBvbiBgaXNJbmxpbmVUZW1wbGF0ZWAgYW5kIGBpc1Byb2plY3Rpb25Nb2RlYC4KICAgICAqIFRoZSBmb2xsb3dpbmcgdGFibGUgc3VtbWFyaXplcyB3aGljaCB0eXBlcyBvZiBhdHRyaWJ1dGVzIHdlIGF0dGVtcHQgdG8gbWF0Y2g6CiAgICAgKgogICAgICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KICAgICAqIE1vZGVzICAgICAgICAgICAgICAgICAgIHwgTm9ybWFsIEF0dHJpYnV0ZXMgfCBCaW5kaW5ncyBBdHRyaWJ1dGVzIHwgVGVtcGxhdGUgQXR0cmlidXRlcyB8IEkxOG4KICAgICAqIEF0dHJpYnV0ZXMKICAgICAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiAgICAgKiBJbmxpbmUgKyBQcm9qZWN0aW9uICAgICB8IFlFUyAgICAgICAgICAgICAgIHwgWUVTICAgICAgICAgICAgICAgICB8IE5PICAgICAgICAgICAgICAgICAgfCBZRVMKICAgICAqIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCiAgICAgKiBJbmxpbmUgKyBEaXJlY3RpdmUgICAgICB8IE5PICAgICAgICAgICAgICAgIHwgTk8gICAgICAgICAgICAgICAgICB8IFlFUyAgICAgICAgICAgICAgICAgfCBOTwogICAgICogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KICAgICAqIE5vbi1pbmxpbmUgKyBQcm9qZWN0aW9uIHwgWUVTICAgICAgICAgICAgICAgfCBZRVMgICAgICAgICAgICAgICAgIHwgTk8gICAgICAgICAgICAgICAgICB8IFlFUwogICAgICogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KICAgICAqIE5vbi1pbmxpbmUgKyBEaXJlY3RpdmUgIHwgWUVTICAgICAgICAgICAgICAgfCBZRVMgICAgICAgICAgICAgICAgIHwgTk8gICAgICAgICAgICAgICAgICB8IFlFUwogICAgICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KICAgICAqCiAgICAgKiBAcGFyYW0gez99IG5hbWUgdGhlIG5hbWUgb2YgdGhlIGF0dHJpYnV0ZSB0byBmaW5kCiAgICAgKiBAcGFyYW0gez99IGF0dHJzIHRoZSBhdHRyaWJ1dGUgYXJyYXkgdG8gZXhhbWluZQogICAgICogQH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gICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKG1heWJlQXR0ck5hbWUgPT09IDMgLyogQmluZGluZ3MgKi8gfHwgbWF5YmVBdHRyTmFtZSA9PT0gNiAvKiBJMThuICovKSB7CiAgICAgICAgICAgICAgICAgICAgYmluZGluZ3NNb2RlID0gdHJ1ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKG1heWJlQXR0ck5hbWUgPT09IDEgLyogQ2xhc3NlcyAqLyB8fCBtYXliZUF0dHJOYW1lID09PSAyIC8qIFN0eWxlcyAqLykgewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBsZXQgdmFsdWUgPSBhdHRyc1srK2ldOwogICAgICAgICAgICAgICAgICAgIC8vIFdlIHNob3VsZCBza2lwIGNsYXNzZXMgaGVyZSBiZWNhdXNlIHdlIGhhdmUgYSBzZXBhcmF0ZSBtZWNoYW5pc20gZm9yCiAgICAgICAgICAgICAgICAgICAgLy8gbWF0Y2hpbmcgY2xhc3NlcyBpbiBwcm9qZWN0aW9uIG1vZGUuCiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKHR5cGVvZiB2YWx1ZSA9PT0gJ3N0cmluZycpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSBhdHRyc1srK2ldOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKG1heWJlQXR0ck5hbWUgPT09IDQgLyogVGVtcGxhdGUgKi8pIHsKICAgICAgICAgICAgICAgICAgICAvLyBXZSBkbyBub3QgY2FyZSBhYm91dCBUZW1wbGF0ZSBhdHRyaWJ1dGVzIGluIHRoaXMgc2NlbmFyaW8uCiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmIChtYXliZUF0dHJOYW1lID09PSAwIC8qIE5hbWVzcGFjZVVSSSAqLykgewogICAgICAgICAgICAgICAgICAgIC8vIFNraXAgdGhlIHdob2xlIG5hbWVzcGFjZWQgYXR0cmlidXRlIGFuZCB2YWx1ZS4gVGhpcyBpcyBieSBkZXNpZ24uCiAgICAgICAgICAgICAgICAgICAgaSArPSA0OwogICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLy8gSW4gYmluZGluZyBtb2RlIHRoZXJlIGFyZSBvbmx5IG5hbWVzLCByYXRoZXIgdGhhbiBuYW1lLXZhbHVlIHBhaXJzLgogICAgICAgICAgICAgICAgaSArPSBiaW5kaW5nc01vZGUgPyAxIDogMjsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBXZSBkaWQgbm90IG1hdGNoIHRoZSBhdHRyaWJ1dGUKICAgICAgICAgICAgcmV0dXJuIC0xOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgcmV0dXJuIG1hdGNoVGVtcGxhdGVBdHRyaWJ1dGUoYXR0cnMsIG5hbWUpOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB0Tm9kZQogICAgICogQHBhcmFtIHs/fSBzZWxlY3RvcgogICAgICogQHBhcmFtIHs/PX0gaXNQcm9qZWN0aW9uTW9kZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gaXNOb2RlTWF0Y2hpbmdTZWxlY3Rvckxpc3QodE5vZGUsIHNlbGVjdG9yLCBpc1Byb2plY3Rpb25Nb2RlID0gZmFsc2UpIHsKICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHNlbGVjdG9yLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgIGlmIChpc05vZGVNYXRjaGluZ1NlbGVjdG9yKHROb2RlLCBzZWxlY3RvcltpXSwgaXNQcm9qZWN0aW9uTW9kZSkpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiBmYWxzZTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB0Tm9kZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0UHJvamVjdEFzQXR0clZhbHVlKHROb2RlKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IG5vZGVBdHRycyA9IHROb2RlLmF0dHJzOwogICAgICAgIGlmIChub2RlQXR0cnMgIT0gbnVsbCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG5nUHJvamVjdEFzQXR0cklkeCA9IG5vZGVBdHRycy5pbmRleE9mKDUgLyogUHJvamVjdEFzICovKTsKICAgICAgICAgICAgLy8gb25seSBjaGVjayBmb3IgbmdQcm9qZWN0QXMgaW4gYXR0cmlidXRlIG5hbWVzLCBkb24ndCBhY2NpZGVudGFsbHkgbWF0Y2ggYXR0cmlidXRlJ3MgdmFsdWUKICAgICAgICAgICAgLy8gKGF0dHJpYnV0ZSBuYW1lcyBhcmUgc3RvcmVkIGF0IGV2ZW4gaW5kZXhlcykKICAgICAgICAgICAgaWYgKChuZ1Byb2plY3RBc0F0dHJJZHggJiAxKSA9PT0gMCkgewogICAgICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovIChub2RlQXR0cnNbbmdQcm9qZWN0QXNBdHRySWR4ICsgMV0pKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gbnVsbDsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBub2RlQXR0cnMKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGdldE5hbWVPbmx5TWFya2VySW5kZXgobm9kZUF0dHJzKSB7CiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBub2RlQXR0cnMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBub2RlQXR0ciA9IG5vZGVBdHRyc1tpXTsKICAgICAgICAgICAgaWYgKGlzTmFtZU9ubHlBdHRyaWJ1dGVNYXJrZXIobm9kZUF0dHIpKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gaTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gbm9kZUF0dHJzLmxlbmd0aDsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBhdHRycwogICAgICogQHBhcmFtIHs/fSBuYW1lCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBtYXRjaFRlbXBsYXRlQXR0cmlidXRlKGF0dHJzLCBuYW1lKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBpID0gYXR0cnMuaW5kZXhPZig0IC8qIFRlbXBsYXRlICovKTsKICAgICAgICBpZiAoaSA+IC0xKSB7CiAgICAgICAgICAgIGkrKzsKICAgICAgICAgICAgd2hpbGUgKGkgPCBhdHRycy5sZW5ndGgpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGF0dHIgPSBhdHRyc1tpXTsKICAgICAgICAgICAgICAgIC8vIFJldHVybiBpbiBjYXNlIHdlIGNoZWNrZWQgYWxsIHRlbXBsYXRlIGF0dHJzIGFuZCBhcmUgc3dpdGNoaW5nIHRvIHRoZSBuZXh0IHNlY3Rpb24gaW4gdGhlCiAgICAgICAgICAgICAgICAvLyBhdHRycyBhcnJheSAodGhhdCBzdGFydHMgd2l0aCBhIG51bWJlciB0aGF0IHJlcHJlc2VudHMgYW4gYXR0cmlidXRlIG1hcmtlcikuCiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGF0dHIgPT09ICdudW1iZXInKQogICAgICAgICAgICAgICAgICAgIHJldHVybiAtMTsKICAgICAgICAgICAgICAgIGlmIChhdHRyID09PSBuYW1lKQogICAgICAgICAgICAgICAgICAgIHJldHVybiBpOwogICAgICAgICAgICAgICAgaSsrOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiAtMTsKICAgIH0KICAgIC8qKgogICAgICogQ2hlY2tzIHdoZXRoZXIgYSBzZWxlY3RvciBpcyBpbnNpZGUgYSBDc3NTZWxlY3Rvckxpc3QKICAgICAqIEBwYXJhbSB7P30gc2VsZWN0b3IgU2VsZWN0b3IgdG8gYmUgY2hlY2tlZC4KICAgICAqIEBwYXJhbSB7P30gbGlzdCBMaXN0IGluIHdoaWNoIHRvIGxvb2sgZm9yIHRoZSBzZWxlY3Rvci4KICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGlzU2VsZWN0b3JJblNlbGVjdG9yTGlzdChzZWxlY3RvciwgbGlzdCkgewogICAgICAgIHNlbGVjdG9yTGlzdExvb3A6IGZvciAobGV0IGkgPSAwOyBpIDwgbGlzdC5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGN1cnJlbnRTZWxlY3RvckluTGlzdCA9IGxpc3RbaV07CiAgICAgICAgICAgIGlmIChzZWxlY3Rvci5sZW5ndGggIT09IGN1cnJlbnRTZWxlY3RvckluTGlzdC5sZW5ndGgpIHsKICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGZvciAobGV0IGogPSAwOyBqIDwgc2VsZWN0b3IubGVuZ3RoOyBqKyspIHsKICAgICAgICAgICAgICAgIGlmIChzZWxlY3RvcltqXSAhPT0gY3VycmVudFNlbGVjdG9ySW5MaXN0W2pdKSB7CiAgICAgICAgICAgICAgICAgICAgY29udGludWUgc2VsZWN0b3JMaXN0TG9vcDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IGlzTmVnYXRpdmVNb2RlCiAgICAgKiBAcGFyYW0gez99IGNodW5rCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBtYXliZVdyYXBJbk5vdFNlbGVjdG9yKGlzTmVnYXRpdmVNb2RlLCBjaHVuaykgewogICAgICAgIHJldHVybiBpc05lZ2F0aXZlTW9kZSA/ICc6bm90KCcgKyBjaHVuay50cmltKCkgKyAnKScgOiBjaHVuazsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBzZWxlY3RvcgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gc3RyaW5naWZ5Q1NTU2VsZWN0b3Ioc2VsZWN0b3IpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IHJlc3VsdCA9ICgvKiogQHR5cGUgez99ICovIChzZWxlY3RvclswXSkpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgaSA9IDE7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBtb2RlID0gMiAvKiBBVFRSSUJVVEUgKi87CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBjdXJyZW50Q2h1bmsgPSAnJzsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IGlzTmVnYXRpdmVNb2RlID0gZmFsc2U7CiAgICAgICAgd2hpbGUgKGkgPCBzZWxlY3Rvci5sZW5ndGgpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgdmFsdWVPck1hcmtlciA9IHNlbGVjdG9yW2ldOwogICAgICAgICAgICBpZiAodHlwZW9mIHZhbHVlT3JNYXJrZXIgPT09ICdzdHJpbmcnKSB7CiAgICAgICAgICAgICAgICBpZiAobW9kZSAmIDIgLyogQVRUUklCVVRFICovKSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGF0dHJWYWx1ZSA9ICgvKiogQHR5cGUgez99ICovIChzZWxlY3RvclsrK2ldKSk7CiAgICAgICAgICAgICAgICAgICAgY3VycmVudENodW5rICs9CiAgICAgICAgICAgICAgICAgICAgICAgICdbJyArIHZhbHVlT3JNYXJrZXIgKyAoYXR0clZhbHVlLmxlbmd0aCA+IDAgPyAnPSInICsgYXR0clZhbHVlICsgJyInIDogJycpICsgJ10nOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAobW9kZSAmIDggLyogQ0xBU1MgKi8pIHsKICAgICAgICAgICAgICAgICAgICBjdXJyZW50Q2h1bmsgKz0gJy4nICsgdmFsdWVPck1hcmtlcjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKG1vZGUgJiA0IC8qIEVMRU1FTlQgKi8pIHsKICAgICAgICAgICAgICAgICAgICBjdXJyZW50Q2h1bmsgKz0gJyAnICsgdmFsdWVPck1hcmtlcjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIC8vCiAgICAgICAgICAgICAgICAvLyBBcHBlbmQgY3VycmVudCBjaHVuayB0byB0aGUgZmluYWwgcmVzdWx0IGluIGNhc2Ugd2UgY29tZSBhY3Jvc3MgU2VsZWN0b3JGbGFnLCB3aGljaAogICAgICAgICAgICAgICAgLy8gaW5kaWNhdGVzIHRoYXQgdGhlIHByZXZpb3VzIHNlY3Rpb24gb2YgYSBzZWxlY3RvciBpcyBvdmVyLiBXZSBuZWVkIHRvIGFjY3VtdWxhdGUgY29udGVudAogICAgICAgICAgICAg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gICAgICAgICAgIC8vCiAgICAgICAgICAgICAgICBpZiAoY3VycmVudENodW5rICE9PSAnJyAmJiAhaXNQb3NpdGl2ZSh2YWx1ZU9yTWFya2VyKSkgewogICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSBtYXliZVdyYXBJbk5vdFNlbGVjdG9yKGlzTmVnYXRpdmVNb2RlLCBjdXJyZW50Q2h1bmspOwogICAgICAgICAgICAgICAgICAgIGN1cnJlbnRDaHVuayA9ICcnOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgbW9kZSA9IHZhbHVlT3JNYXJrZXI7CiAgICAgICAgICAgICAgICAvLyBBY2NvcmRpbmcgdG8gQ3NzU2VsZWN0b3Igc3BlYywgb25jZSB3ZSBjb21lIGFjcm9zcyBgU2VsZWN0b3JGbGFncy5OT1RgIGZsYWcsIHRoZSBuZWdhdGl2ZQogICAgICAgICAgICAgICAgLy8gbW9kZSBpcyBtYWludGFpbmVkIGZvciByZW1haW5pbmcgY2h1bmtzIG9mIGEgc2VsZWN0b3IuCiAgICAgICAgICAgICAgICBpc05lZ2F0aXZlTW9kZSA9IGlzTmVnYXRpdmVNb2RlIHx8ICFpc1Bvc2l0aXZlKG1vZGUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGkrKzsKICAgICAgICB9CiAgICAgICAgaWYgKGN1cnJlbnRDaHVuayAhPT0gJycpIHsKICAgICAgICAgICAgcmVzdWx0ICs9IG1heWJlV3JhcEluTm90U2VsZWN0b3IoaXNOZWdhdGl2ZU1vZGUsIGN1cnJlbnRDaHVuayk7CiAgICAgICAgfQogICAgICAgIHJldHVybiByZXN1bHQ7CiAgICB9CiAgICAvKioKICAgICAqIEdlbmVyYXRlcyBzdHJpbmcgcmVwcmVzZW50YXRpb24gb2YgQ1NTIHNlbGVjdG9yIGluIHBhcnNlZCBmb3JtLgogICAgICoKICAgICAqIENvbXBvbmVudERlZiBhbmQgRGlyZWN0aXZlRGVmIGFyZSBnZW5lcmF0ZWQgd2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seS4gSW4gdGhpcyBjYXNlLCB0aGUgaG9zdCBlbGVtZW50CiAgICAgKiAodGhhdCBpcyBjcmVhdGVkIGR5bmFtaWNhbGx5KSBzaG91bGQgY29udGFpbiBhdHRyaWJ1dGVzIGFuZCBjbGFzc2VzIHNwZWNpZmllZCBpbiBjb21wb25lbnQncyBDU1MKICAgICAqIHNlbGVjdG9yLgogICAgICoKICAgICAqIEBwYXJhbSB7P30gc2VsZWN0b3IgQ1NTIHNlbGVjdG9yIGluIHBhcnNlZCBmb3JtIChpbiBhIGZvcm0gb2YgYXJyYXkpCiAgICAgKiBAcmV0dXJuIHs/fSBvYmplY3Qgd2l0aCBgYXR0cnNgIGFuZCBgY2xhc3Nlc2AgZmllbGRzIHRoYXQgY29udGFpbiBleHRyYWN0ZWQgaW5mb3JtYXRpb24KICAgICAqLwogICAgZnVuY3Rpb24gZXh0cmFjdEF0dHJzQW5kQ2xhc3Nlc0Zyb21TZWxlY3RvcihzZWxlY3RvcikgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBhdHRycyA9IFtdOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBjbGFzc2VzID0gW107CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBpID0gMTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IG1vZGUgPSAyIC8qIEFUVFJJQlVURSAqLzsKICAgICAgICB3aGlsZSAoaSA8IHNlbGVjdG9yLmxlbmd0aCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCB2YWx1ZU9yTWFya2VyID0gc2VsZWN0b3JbaV07CiAgICAgICAgICAgIGlmICh0eXBlb2YgdmFsdWVPck1hcmtlciA9PT0gJ3N0cmluZycpIHsKICAgICAgICAgICAgICAgIGlmIChtb2RlID09PSAyIC8qIEFUVFJJQlVURSAqLykgewogICAgICAgICAgICAgICAgICAgIGlmICh2YWx1ZU9yTWFya2VyICE9PSAnJykgewogICAgICAgICAgICAgICAgICAgICAgICBhdHRycy5wdXNoKHZhbHVlT3JNYXJrZXIsICgvKiogQHR5cGUgez99ICovIChzZWxlY3RvclsrK2ldKSkpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKG1vZGUgPT09IDggLyogQ0xBU1MgKi8pIHsKICAgICAgICAgICAgICAgICAgICBjbGFzc2VzLnB1c2godmFsdWVPck1hcmtlcik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAvLyBBY2NvcmRpbmcgdG8gQ3NzU2VsZWN0b3Igc3BlYywgb25jZSB3ZSBjb21lIGFjcm9zcyBgU2VsZWN0b3JGbGFncy5OT1RgIGZsYWcsIHRoZSBuZWdhdGl2ZQogICAgICAgICAgICAgICAgLy8gbW9kZSBpcyBtYWludGFpbmVkIGZvciByZW1haW5pbmcgY2h1bmtzIG9mIGEgc2VsZWN0b3IuIFNpbmNlIGF0dHJpYnV0ZXMgYW5kIGNsYXNzZXMgYXJlCiAgICAgICAgICAgICAgICAvLyBleHRyYWN0ZWQgb25seSBmb3IgInBvc2l0aXZlIiBwYXJ0IG9mIHRoZSBzZWxlY3Rvciwgd2UgY2FuIHN0b3AgaGVyZS4KICAgICAgICAgICAgICAgIGlmICghaXNQb3NpdGl2ZShtb2RlKSkKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIG1vZGUgPSB2YWx1ZU9yTWFya2VyOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGkrKzsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIHsgYXR0cnMsIGNsYXNzZXMgfTsKICAgIH0KCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcgYWRkZWQgYnkgdHNpY2tsZQogICAgICogR2VuZXJhdGVkIGZyb206IH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92aWV3X3RyYXZlcnNhbF91dGlscy50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvKioKICAgICAqIEdldHMgdGhlIHBhcmVudCBMVmlldyBvZiB0aGUgcGFzc2VkIExWaWV3LCBpZiB0aGUgUEFSRU5UIGlzIGFuIExDb250YWluZXIsIHdpbGwgZ2V0IHRoZSBwYXJlbnQgb2YKICAgICAqIHRoYXQgTENvbnRhaW5lciwgd2hpY2ggaXMgYW4gTFZpZXcKICAgICAqIEBwYXJhbSB7P30gbFZpZXcgdGhlIGxWaWV3IHdob3NlIHBhcmVudCB0byBnZXQKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGdldExWaWV3UGFyZW50KGxWaWV3KSB7CiAgICAgICAgbmdEZXZNb2RlICYmIGFzc2VydExWaWV3KGxWaWV3KTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgcGFyZW50ID0gbFZpZXdbUEFSRU5UXTsKICAgICAgICByZXR1cm4gaXNMQ29udGFpbmVyKHBhcmVudCkgPyAoLyoqIEB0eXBlIHs/fSAqLyAocGFyZW50W1BBUkVOVF0pKSA6IHBhcmVudDsKICAgIH0KICAgIC8qKgogICAgICogUmV0cmlldmUgdGhlIHJvb3QgdmlldyBmcm9tIGFueSBjb21wb25lbnQgb3IgYExWaWV3YCBieSB3YWxraW5nIHRoZSBwYXJlbnQgYExWaWV3YCB1bnRpbAogICAgICogcmVhY2hpbmcgdGhlIHJvb3QgYExWaWV3YC4KICAgICAqCiAgICAgKiBAcGFyYW0gez99IGNvbXBvbmVudE9yTFZpZXcgYW55IGNvbXBvbmVudCBvciBgTFZpZXdgCiAgICA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EByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGdldFJvb3RDb250ZXh0KHZpZXdPckNvbXBvbmVudCkgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCByb290VmlldyA9IGdldFJvb3RWaWV3KHZpZXdPckNvbXBvbmVudCk7CiAgICAgICAgbmdEZXZNb2RlICYmCiAgICAgICAgICAgIGFzc2VydERlZmluZWQocm9vdFZpZXdbQ09OVEVYVF0sICdSb290VmlldyBoYXMgbm8gY29udGV4dC4gUGVyaGFwcyBpdCBpcyBkaXNjb25uZWN0ZWQ/Jyk7CiAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovIChyb290Vmlld1tDT05URVhUXSkpOwogICAgfQogICAgLyoqCiAgICAgKiBHZXRzIHRoZSBmaXJzdCBgTENvbnRhaW5lcmAgaW4gdGhlIExWaWV3IG9yIGBudWxsYCBpZiBub25lIGV4aXN0cy4KICAgICAqIEBwYXJhbSB7P30gbFZpZXcKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGdldEZpcnN0TENvbnRhaW5lcihsVmlldykgewogICAgICAgIHJldHVybiBnZXROZWFyZXN0TENvbnRhaW5lcihsVmlld1tDSElMRF9IRUFEXSk7CiAgICB9CiAgICAvKioKICAgICAqIEdldHMgdGhlIG5leHQgYExDb250YWluZXJgIHRoYXQgaXMgYSBzaWJsaW5nIG9mIHRoZSBnaXZlbiBjb250YWluZXIuCiAgICAgKiBAcGFyYW0gez99IGNvbnRhaW5lcgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0TmV4dExDb250YWluZXIoY29udGFpbmVyKSB7CiAgICAgICAgcmV0dXJuIGdldE5lYXJlc3RMQ29udGFpbmVyKGNvbnRhaW5lcltORVhUXSk7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdmlld09yQ29udGFpbmVyCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBnZXROZWFyZXN0TENvbnRhaW5lcih2aWV3T3JDb250YWluZXIpIHsKICAgICAgICB3aGlsZSAodmlld09yQ29udGFpbmVyICE9PSBudWxsICYmICFpc0xDb250YWluZXIodmlld09yQ29udGFpbmVyKSkgewogICAgICAgICAgICB2aWV3T3JDb250YWluZXIgPSB2aWV3T3JDb250YWluZXJbTkVYVF07CiAgICAgICAgfQogICAgICAgIHJldHVybiB2aWV3T3JDb250YWluZXI7CiAgICB9CgogICAgLyoqCiAgICAgKiBAZmlsZW92ZXJ2aWV3IGFkZGVkIGJ5IHRzaWNrbGUKICAgICAqIEdlbmVyYXRlZCBmcm9tOiBwYWNrYWdlcy9jb3JlL3NyYy9yZW5kZXIzL2luc3RydWN0aW9ucy9hZHZhbmNlLnRzCiAgICAgKiBAc3VwcHJlc3Mge2NoZWNrVHlwZXMsY29uc3RhbnRQcm9wZXJ0eSxleHRyYVJlcXVpcmUsbWlzc2luZ092ZXJyaWRlLG1pc3NpbmdSZXR1cm4sdW51c2VkUHJpdmF0ZU1lbWJlcnMsdXNlbGVzc0NvZGV9IGNoZWNrZWQgYnkgdHNjCiAgICAgKi8KICAgIC8qKgogICAgICogQWR2YW5jZXMgdG8gYW4gZWxlbWVudCBmb3IgbGF0ZXIgYmluZGluZyBpbnN0cnVjdGlvbnMuCiAgICAgKgogICAgICogVXNlZCBpbiBjb25qdW5jdGlvbiB3aXRoIGluc3RydWN0aW9ucyBsaWtlIHtcQGxpbmsgcHJvcGVydHl9IHRvIGFjdCBvbiBlbGVtZW50cyB3aXRoIHNwZWNpZmllZAogICAgICogaW5kaWNlcywgZm9yIGV4YW1wbGUgdGhvc2UgY3JlYXRlZCB3aXRoIHtcQGxpbmsgZWxlbWVudH0gb3Ige1xAbGluayBlbGVtZW50U3RhcnR9LgogICAgICoKICAgICAqIGBgYHRzCiAgICAgKiAocmY6IFJlbmRlckZsYWdzLCBjdHg6IGFueSkgPT4gewogICAgICogICB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XNlbGVjdChpbmRleCkgewogICAgICAgIC8vIFRPRE8obWlza28pOiBSZW1vdmUgdGhpcyBmdW5jdGlvbiBhcyBpdCBpcyBubyBsb25nZXIgYmVpbmcgdXNlZC4KICAgICAgICBzZWxlY3RJbmRleEludGVybmFsKGdldFRWaWV3KCksIGdldExWaWV3KCksIGluZGV4LCBnZXRDaGVja05vQ2hhbmdlc01vZGUoKSk7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdFZpZXcKICAgICAqIEBwYXJhbSB7P30gbFZpZXcKICAgICAqIEBwYXJhbSB7P30gaW5kZXgKICAgICAqIEBwYXJhbSB7P30gY2hlY2tOb0NoYW5nZXNNb2RlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBzZWxlY3RJbmRleEludGVybmFsKHRWaWV3LCBsVmlldywgaW5kZXgsIGNoZWNrTm9DaGFuZ2VzTW9kZSkgewogICAgICAgIG5nRGV2TW9kZSAmJiBhc3NlcnRHcmVhdGVyVGhhbihpbmRleCwgLTEsICdJbnZhbGlkIGluZGV4Jyk7CiAgICAgICAgbmdEZXZNb2RlICYmIGFzc2VydERhdGFJblJhbmdlKGxWaWV3LCBpbmRleCArIEhFQURFUl9PRkZTRVQpOwogICAgICAgIC8vIEZsdXNoIHRoZSBpbml0aWFsIGhvb2tzIGZvciBlbGVtZW50cyBpbiB0aGUgdmlldyB0aGF0IGhhdmUgYmVlbiBhZGRlZCB1cCB0byB0aGlzIHBvaW50LgogICAgICAgIC8vIFBFUkYgV0FSTklORzogZG8gTk9UIGV4dHJhY3QgdGhpcyB0byBhIHNlcGFyYXRlIGZ1bmN0aW9uIHdpdGhvdXQgcnVubmluZyBiZW5jaG1hcmtzCiAgICAgICAgaWYgKCFjaGVja05vQ2hhbmdlc01vZGUpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBob29rc0luaXRQaGFzZUNvbXBsZXRlZCA9IChsVmlld1tGTEFHU10gJiAzIC8qIEluaXRQaGFzZVN0YXRlTWFzayAqLykgPT09IDMgLyogSW5pdFBoYXNlQ29tcGxldGVkICovOwogICAgICAgICAgICBpZiAoaG9va3NJbml0UGhhc2VDb21wbGV0ZWQpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHByZU9yZGVyQ2hlY2tIb29rcyA9IHRWaWV3LnByZU9yZGVyQ2hlY2tIb29rczsKICAgICAgICAgICAgICAgIGlmIChwcmVPcmRlckNoZWNrSG9va3MgIT09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICBleGVjdXRlQ2hlY2tIb29rcyhsVmlldywgcHJlT3JkZXJDaGVja0hvb2tzLCBpbmRleCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBwcmVPcmRlckhvb2tzID0gdFZpZXcucHJlT3JkZXJIb29rczsKICAgICAgICAgICAgICAgIGlmIChwcmVPcmRlckhvb2tzICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgZXhlY3V0ZUluaXRBbmRDaGVja0hvb2tzKGxWaWV3LCBwcmVPcmRlckhvb2tzLCAwIC8qIE9uSW5pdEhvb2tzVG9CZVJ1biAqLywgaW5kZXgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8vIFdlIG11c3Qgc2V0IHRoZSBzZWxlY3RlZCBpbmRleCAqYWZ0ZXIqIHJ1bm5pbmcgdGhlIGhvb2tzLCBiZWNhdXNlIGhvb2tzIG1heSBoYXZlIHNpZGUtZWZmZWN0cwogICAgICAgIC8vIHRoYXQgY2F1c2Ugb3RoZXIgdGVtcGxhdGUgZnVuY3Rpb25zIHRvIHJ1biwgdGh1cyB1cGRhdGluZyB0aGUgc2VsZ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LCBudWxsLCDigKZdCiAgICAgKiBgYGAKICAgICAqCiAgICAgKiBZb3UgZ2V0IHRvIHNlZToKICAgICAqIGBgYAogICAgICogTFZpZXdEZWJ1ZyB7CiAgICAgKiAgIHZpZXdzOiBbLi4uXSwKICAgICAqICAgZmxhZ3M6IHthdHRhY2hlZDogdHJ1ZSwgLi4ufQogICAgICogICBub2RlczogWwogICAgICogICAgIHtodG1sOiAnPGRpdiBpZD0iMTIzIj4nLCAuLi4sIG5vZGVzOiBbCiAgICAgKiAgICAgICB7aHRtbDogJzxzcGFuPicsIC4uLiwgbm9kZXM6IG51bGx9CiAgICAgKiAgICAgXX0KICAgICAqICAgXQogICAgICogfQogICAgICogYGBgCiAgICAgKi8KICAgIC8qKiBAdHlwZSB7P30gKi8KICAgIGxldCBMVklFV19DT01QT05FTlRfQ0FDSEU7CiAgICAvKiogQHR5cGUgez99ICovCiAgICBsZXQgTFZJRVdfRU1CRURERURfQ0FDSEU7CiAgICAvKiogQHR5cGUgez99ICovCiAgICBsZXQgTFZJRVdfUk9PVDsKICAgIC8qKgogICAgICogVGhpcyBmdW5jdGlvbiBjbG9uZXMgYSBibHVlcHJpbnQgYW5kIGNyZWF0ZXMgTFZpZXcuCiAgICAgKgogICAgICogU2ltcGxlIHNsaWNlIHdpbGwga2VlcCB0aGUgc2FtZSB0eXBlLCBhbmQgd2UgbmVlZCBpdCB0byBiZSBMVmlldwogICAgICogQHBhcmFtIHs/fSB0VmlldwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gY2xvbmVUb0xWaWV3RnJvbVRWaWV3Qmx1ZXByaW50KHRWaWV3KSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGRlYnVnVFZpZXcgPSAoLyoqIEB0eXBlIHs/fSAqLyAodFZpZXcpKTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgbFZpZXcgPSBnZXRMVmlld1RvQ2xvbmUoZGVidWdUVmlldy50eXBlLCB0Vmlldy50ZW1wbGF0ZSAmJiB0Vmlldy50ZW1wbGF0ZS5uYW1lKTsKICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKGxWaWV3LmNvbmNhdCh0Vmlldy5ibHVlcHJpbnQpKSk7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdHlwZQogICAgICogQHBhcmFtIHs/fSBuYW1lCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBnZXRMVmlld1RvQ2xvbmUodHlwZSwgbmFtZSkgewogICAgICAgIHN3aXRjaCAodHlwZSkgewogICAgICAgICAgICBjYXNlIDAgLyogUm9vdCAqLzoKICAgICAgICAgICAgICAgIGlmIChMVklFV19ST09UID09PSB1bmRlZmluZWQpCiAgICAgICAgICAgICAgICAgICAgTFZJRVdfUk9PVCA9IG5ldyAoY3JlYXRlTmFtZWRBcnJheVR5cGUoJ0xSb290VmlldycpKSgpOwogICAgICAgICAgICAgICAgcmV0dXJuIExWSUVXX1JPT1Q7CiAgICAgICAgICAgIGNhc2UgMSAvKiBDb21wb25lbnQgKi86CiAgICAgICAgICAgICAgICBpZiAoTFZJRVdfQ09NUE9ORU5UX0NBQ0hFID09PSB1bmRlZmluZWQpCiAgICAgICAgICAgICAgICAgICAgTFZJRVdfQ09NUE9ORU5UX0NBQ0hFID0gbmV3IE1hcCgpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IGNvbXBvbmVudEFycmF5ID0gTFZJRVdfQ09NUE9ORU5UX0NBQ0hFLmdldChuYW1lKTsKICAgICAgICAgICAgICAgIGlmIChjb21wb25lbnRBcnJheSA9PT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgICAgICAgICAgY29tcG9uZW50QXJyYXkgPSBuZXcgKGNyZWF0ZU5hbWVkQXJyYXlUeXBlKCdMQ29tcG9uZW50VmlldycgKyBuYW1lU3VmZml4KG5hbWUpKSkoKTsKICAgICAgICAgICAgICAgICAgICBMVklFV19DT01QT05FTlRfQ0FDSEUuc2V0KG5hbWUsIGNvbXBvbmVudEFycmF5KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiBjb21wb25lbnRBcnJheTsKICAgICAgICAgICAgY2FzZSAyIC8qIEVtYmVkZGVkICovOgogICAgICAgICAgICAgICAgaWYgKExWSUVXX0VNQkVEREVEX0NBQ0hFID09PSB1bmRlZmluZWQpCiAgICAgICAgICAgICAgICAgICAgTFZJRVdfRU1CRURERURfQ0FDSEUgPSBuZXcgTWFwKCk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBsZXQgZW1iZWRkZWRBcnJheSA9IExWSUVXX0VNQkVEREVEX0NBQ0hFLmdldChuYW1lKTsKICAgICAgICAgICAgICAgIGlmIChlbWJlZGRlZEFycmF5ID09PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgICAgICAgICBlbWJlZGRlZEFycmF5ID0gbmV3IChjcmVhdGVOYW1lZEFycmF5VHlwZSgnTEVtYmVkZGVkVmlldycgKyBuYW1lU3VmZml4KG5hbWUpKSkoKTsKICAgICAgICAgICAgICAgICAgICBMVklFV19FTUJFRERFRF9DQUNIRS5zZXQobmFtZSwgZW1iZWRkZWRBcnJheSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gZW1iZWRkZWRBcnJheTsKICAgICAgICB9CiAgICAgICAgdGhyb3cgbmV3IEVycm9yKCd1bnJlYWNoYWJsZSBjb2RlJyk7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdGV4dAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gbmFtZVN1ZmZpeCh0ZXh0KSB7CiAgICAgICAgaWYgKHRleHQgPT0gbnVsbCkKICAgICAgICAgICAgcmV0dXJuICcnOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBpbmRleCA9IHRleHQubGFzdEluZGV4T2YoJ19UZW1wbGF0ZScpOwogICAgICAgIHJldHVybiAnXycgKyAoaW5kZXggPT09IC0xID8gdGV4dCA6IHRleHQuc3Vic3RyKDAsIGluZGV4KSk7CiAgICB9CiAgICAvKioKICAgICAqIFRoaXMgY2xhc3MgaXMgYSBkZWJ1ZyB2ZXJzaW9uIG9mIE9iamVjdCBsaXRlcmFsIHNvIHRoYXQgd2UgY2FuIGhhdmUgY29uc3RydWN0b3IgbmFtZSBzaG93IHVwCiAgICAgKiBpbgogICAgICogZGVidWcgdG9vbHMgaW4gbmdEZXZNb2RlLgogICAgICogQHR5cGUgez99CiAgICAgKi8KICAgIGNvbnN0IFRWaWV3Q29uc3RydWN0b3IgPSBjbGFzcyBUVmlldyB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB0eXBlCiAgICAgICAgICogQHBhcmFtIHs/fSBpZAogICAgICAgICAqIEBwYXJhbSB7P30gYmx1ZXByaW50CiAgICAgICAgICogQHBhcmFtIHs/fSB0ZW1wbGF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gcXVlcmllcwogICAgICAgICAqIEBwYXJhbSB7P30gdmlld1F1ZXJ5CiAgICAgICAgICogQHBhcmFtIHs/fSBub2RlCiAgICAgICAgICogQHBhcmFtIHs/fSBkYXRhCiAgICAgICAgICogQHBhcmFtIHs/fSBiaW5kaW5nU3RhcnRJbmRleAogICAgICAgICAqIEBwYXJhbSB7P30gZXhwYW5kb1N0YXJ0SW5kZXgKICAgICAgICAgKiBAcGFyYW0gez99IGV4cGFuZG9JbnN0cnVjdGlvbnMKICAgICAgICAgKiBAcGFyYW0gez99IGZpcnN0Q3JlYXRlUGFzcwogICAgICAgICAqIEBwYXJhbSB7P30gZmlyc3RVcGRhdGVQYXNzCiAgICAgICAgICogQHBhcmFtIHs/fSBzdGF0aWNWaWV3UXVlcmllcwogICAgICAgICAqIEBwYXJhbSB7P30gc3RhdGljQ29udGVudFF1ZXJpZXMKICAgICAgICAgKiBAcGFyYW0gez99IHByZU9yZGVySG9va3MKICAgICAgICAgKiBAcGFyYW0gez99IHByZU9yZGVyQ2hlY2tIb29rcwogICAgICAgICAqIEBwYXJhbSB7P30gY29udGVudEhvb2tzCiAgICAgICAgICogQHBhcmFtIHs/fSBjb250ZW50Q2hlY2tIb29rcwogICAgICAgICAqIEBwYXJhbSB7P30gdmlld0hvb2tzCiAgICAgICAgICogQHBhcmFtIHs/fSB2aWV3Q2hlY2tIb29rcwogICAgICAgICAqIEBwYXJhbSB7P30gZGVzdHJveUhvb2tzCiAgICAgICAgICogQHBhcmFtIHs/fSBjbGVhbnVwCiAgICAgICAgICogQHBhcmFtIHs/fSBjb250ZW50UXVlcmllcwogICAgICAgICAqIEBwYXJhbSB7P30gY29tcG9uZW50cwogICAgICAgICAqIEBwYXJhbSB7P30gZGlyZWN0aXZlUmVnaXN0cnkKICAgICAgICAgKiBAcGFyYW0gez99IHBpcGVSZWdpc3RyeQogICAgICAgICAqIEBwYXJhbSB7P30gZmlyc3RDaGlsZAogICAgICAgICAqIEBwYXJhbSB7P30gc2NoZW1hcwogICAgICAgICAqIEBwYXJhbSB7P30gY29uc3RzCiAgICAgICAgICogQHBhcmFtIHs/fSBpbmNvbXBsZXRlRmlyc3RQYXNzCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IodHlwZSwgLy8KICAgICAgICBpZCwgLy8KICAgICAgICBibHVlcHJpbnQsIC8vCiAgICAgICAgdGVtcGxhdGUsIC8vCiAgICAgICAgcXVlcmllcywgLy8KICAgICAgICB2aWV3UXVlcnksIC8vCiAgICAgICAgbm9kZSwgLy8KICAgICAgICBkYXRhLCAvLwogICAgICAgIGJpbmRpbmdTdGFydEluZGV4LCAvLwogICAgICAgIGV4cGFuZG9TdGFydEluZGV4LCAvLwogICAgICAgIGV4cGFuZG9JbnN0cnVjdGlvbnMsIC8vCiAgICAgICAgZmlyc3RDcmVhdGVQYXNzLCAvLwogICAgICAgIGZpcnN0VXBkYXRlUGFzcywgLy8KICAgICAgICBzdGF0aWNWaWV3UXVlcmllcywgLy8KICAgICAgICBzdGF0aWNDb250ZW50UXVlcmllcywgLy8KICAgICAgICBwcmVPcmRlckhvb2tzLCAvLwogICAgICAgIHByZU9yZGVyQ2hlY2tIb29rcywgLy8KICAgICAgICBjb250ZW50SG9va3MsIC8vCiAgICAgICAgY29udGVudENoZWNrSG9va3MsIC8vCiAgICAgICAgdmlld0hvb2tzLCAvLwogICAgICAgIHZpZXdDaGVja0hvb2tzLCAvLwogICAgICAgIGRlc3Ryb3lIb29rcywgLy8KICAgICAgICBjbGVhbnVwLCAvLwogICAgICAgIGNvbnRlbnRRdWVyaWVzLCAvLwogICAgICAgIGNvbXBvbmVudHMsIC8vCiAgICAgICAgZGlyZWN0aXZlUmVnaXN0cnksIC8vCiAgICAgICAgcGlwZVJlZ2lzdHJ5LCAvLwogICAgICAgIGZpcnN0Q2hpbGQsIC8vCiAgICAgICAgc2NoZW1hcywgLy8KICAgICAgICBjb25zdHMsIC8vCiAgICAgICAgaW5jb21wbGV0ZUZpcnN0UGFzcyAvLwogICAgICAgICkgewogICAgICAgICAgICB0aGlzLnR5cGUgPSB0eXBlOwogICAgICAgICAgICB0aGlzLmlkID0gaWQ7CiAgICAgICAgICAgIHRoaXMuYmx1ZXByaW50ID0gYmx1ZXByaW50OwogICAgICAgICAgICB0aGlzLnRlbXBsYXRlID0gdGVtcGxhdGU7CiAgICAgICAgICAgIHRoaXMucXVlcmllcyA9IHF1ZXJpZXM7CiAgICAgICAgICAgIHRoaXMudmlld1F1ZXJ5ID0gdmlld1F1ZXJ5OwogICAgICAgICAgICB0aGlzLm5vZGUgPSBub2RlOwogICAgICAgICAgICB0aGlzLmRhdGEgPSBkYXRhOwogICAgICAgICAgICB0aGlzLmJpbmRpbmdTdGFydEluZGV4ID0gYmluZGluZ1N0YXJ0SW5kZXg7CiAgICAgICAgICAgIHRoaXMuZXhwYW5kb1N0YXJ0SW5kZXggPSBleHBhbmRvU3RhcnRJbmRleDsKICAgICAgICAgICAgdGhpcy5leHBhbmRvSW5zdHJ1Y3Rpb25zID0gZXhwYW5kb0luc3RydWN0aW9uczsKICAgICAgICAgICAgdGhpcy5maXJzdENyZWF0ZVBhc3MgPSBmaXJzdENyZWF0ZVBhc3M7CiAgICAgICAgICAgIHRoaXMuZmlyc3RVcGRhdGVQYXNzID0gZmlyc3RVcGRhdGVQYXNzOwogICAgICAgICAgICB0aGlzLnN0YXRpY1ZpZXdRdWVyaWVzID0gc3RhdGljVmlld1F1ZXJpZXM7CiAgICAgICAgICAgIHRoaXMuc3RhdGljQ29udGVudFF1ZXJpZXMgPSBzdGF0aWNDb250ZW50UXVlcmllczsKICAgICAgICAgICAgdGhpcy5wcmVPcmRlckhvb2tzID0gcHJlT3JkZXJIb29rczsKICAgICAgICAgICAgdGhpcy5wcmVPcmRlckNoZWNrSG9va3MgPSBwcmVPcmRlckNoZWNrSG9va3M7CiAgICAgICAgICAgIHRoaXMuY29udGVudEhvb2tzID0gY29udGVudEhvb2tzOwogICAgICAgICAgICB0aGlzLmNvbnRlbnRDaGVja0hvb2tzID0gY29udGVudENoZWNrSG9va3M7CiAgICAgICAgICAgIHRoaXMudmlld0hvb2tzID0gdmlld0hvb2tzOwogICAgICAgICAgICB0aGlzLnZpZXdDaGVja0hvb2tzID0gdmlld0NoZWNrSG9va3M7CiAgICAgICAgICAgIHRoaXMuZGVzdHJveUhvb2tzID0gZGVzdHJveUhvb2tzOwogICAgICAgICAgICB0aGlzLmNsZWFudXAgPSBjbGVhbnVwOwogICAgICAgICAgICB0aGlzLmNvbnRlbnRRdWVyaWVzID0gY29udGVudFF1ZXJpZXM7CiAgICAgICAgICAgIHRoaXMuY29tcG9uZW50cyA9IGNvbXBvbmVudHM7CiAgICAgICAgICAgIHRoaXMuZGlyZWN0aXZlUmVnaXN0cnkgPSBkaXJlY3RpdmVSZWdpc3RyeTsKICAgICAgICAgICAgdGhpcy5waXBlUmVnaXN0cnkgPSBwaXBlUmVnaXN0cnk7CiAgICAgICAgICAgIHRoaXMuZmlyc3RDaGlsZCA9IGZpcnN0Q2hpbGQ7CiAgICAgICAgICAgIHRoaXMuc2NoZW1hcyA9IHNjaGVtYXM7CiAgICAgICAgICAgIHRoaXMuY29uc3RzID0gY29uc3RzOwogICAgICAgICAgICB0aGlzLmluY29tcGxldGVGaXJzdFBhc3MgPSBpbmNvbXBsZXRlRmlyc3RQYXNzOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCB0ZW1wbGF0ZV8oKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgYnVmID0gW107CiAgICAgICAgICAgIHByb2Nlc3NUTm9kZUNoaWxkcmVuKHRoaXMuZmlyc3RDaGlsZCwgYnVmKTsKICAgICAgICAgICAgcmV0dXJuIGJ1Zi5qb2luKCcnKTsKICAgICAgICB9CiAgICB9OwogICAgY2xhc3MgVE5vZGUkMSB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB0Vmlld18KICAgICAgICAgKiBAcGFyYW0gez99IHR5cGUKICAgICAgICAgKiBAcGFyYW0gez99IGluZGV4CiAgICAgICAgICogQHBhcmFtIHs/fSBpbmplY3RvckluZGV4CiAgICAgICAgICogQHBhcmFtIHs/fSBkaXJlY3RpdmVTdGFydAogICAgICAgICAqIEBwYXJhbSB7P30gZGlyZWN0aXZlRW5kCiAgICAgICAgICogQHBhcmFtIHs/fSBkaXJlY3RpdmVTdHlsaW5nTGFzdAogICAgICAgICAqIEBwYXJhbSB7P30gcHJvcGVydHlCaW5kaW5ncwogICAgICAgICAqIEBwYXJhbSB7P30gZmxhZ3MKICAgICAgICAgKiBAcGFyYW0gez99IHByb3ZpZGVySW5kZXhlcwogICAgICAgICAqIEBwYXJhbSB7P30gdGFnTmFtZQogICAgICAgICAqIEBwYXJhbSB7P30gYXR0cnMKICAgICAgICAgKiBAcGFyYW0gez99IG1lcmdlZEF0dHJzCiAgICAgICAgICogQHBhcmFtIHs/fSBsb2NhbE5hbWVzCiAgICAgICAgICogQHBhcmFtIHs/fSBpbml0aWFsSW5wdXRzCiAgICAgICAgICogQHBhcmFtIHs/fSBpbnB1dHMKICAgICAgICAgKiBAcGFyYW0gez99IG91dHB1dHMKICAgICAgICAgKiBAcGFyYW0gez99IHRWaWV3cwogICAgICAgICAqIEBwYXJhbSB7P30gbmV4dAogICAgICAgICAqIEBwYXJhbSB7P30gcHJvamVjdGlvbk5leHQKICAgICAgICAgKiBAcGFyYW0gez99IGNoaWxkCiAgICAgICAgICogQHBhcmFtIHs/fSBwYXJlbnQKICAgICAgICAgKiBAcGFyYW0gez99IHByb2plY3Rpb24KICAgICAgICAgKiBAcGFyYW0gez99IHN0eWxlcwogICAgICAgICAqIEBwYXJhbSB7P30gc3R5bGVzV2l0aG91dEhvc3QKICAgICAgICAgKiBAcGFyYW0gez99IHJlc2lkdWFsU3R5bGVzCiAgICAgICAgICogQHBhcmFtIHs/fSBjbGFzc2VzCiAgICAgICAgICogQHBhcmFtIHs/fSBjbGFzc2VzV2l0aG91dEhvc3QKICAgICAgICAgKiBAcGFyYW0gez99IHJlc2lkdWFsQ2xhc3NlcwogICAgICAgICAqIEBwYXJhbSB7P30gY2xhc3NCaW5kaW5ncwogICAgICAgICAqIEBwYXJhbSB7P30gc3R5bGVCaW5kaW5ncwogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKHRWaWV3XywgLy8KICAgICAgICB0eXBlLCAvLwogICAgICAgIGluZGV4LCAvLwogICAgICAgIGluamVjdG9ySW5kZXgsIC8vCiAgICAgICAgZGlyZWN0aXZlU3RhcnQsIC8vCiAgICAgICAgZGlyZWN0aXZlRW5kLCAvLwogICAgICAgIGRpcmVjdGl2ZVN0eWxpbmdMYXN0LCAvLwogICAgICAgIHByb3BlcnR5QmluZGluZ3MsIC8vCiAgICAgICAgZmxhZ3MsIC8vCiAgICAgICAgcHJvdmlkZXJJbmRleGVzLCAvLwogICAgICAgIHRhZ05hbWUsIC8vCiAgICAgICAgYXR0cnMsIC8vCiAgICAgICAgbWVyZ2VkQXR0cnMsIC8vCiAgICAgICAgbG9jYWxOYW1lcywgLy8KICAgICAgICBpbml0aWFsSW5wdXRzLCAvLwogICAgICAgIGlucHV0cywgLy8KICAgICAgICBvdXRwdXRzLCAvLwogICAgICAgIHRWaWV3cywgLy8KICAgICAgICBuZXh0LCAvLwogICAgICAgIHByb2plY3Rpb25OZXh0LCAvLwogICAgICAgIGNoaWxkLCAvLwogICAgICAgIHBhcmVudCwgLy8KICAgICAgICBwcm9qZWN0aW9uLCAvLwogICAgICAgIHN0eWxlcywgLy8KICAgICAgICBzdHlsZXNXaXRob3V0SG9zdCwgLy8KICAgICAgICByZXNpZHVhbFN0eWxlcywgLy8KICAgICAgICBjbGFzc2VzLCAvLwogICAgICAgIGNsYXNzZXNXaXRob3V0SG9zdCwgLy8KICAgICAgICByZXNpZHVhbENsYXNzZXMsIC8vCiAgICAgICAgY2xhc3NCaW5kaW5ncywgLy8KICAgICAgICBzdHlsZUJpbmRpbmdzKSB7CiAgICAgICAgICAgIHRoaXMudFZpZXdfID0gdFZpZXdfOwogICAgICAgICAgICB0aGlzLnR5cGUgPSB0eXBlOwogICAgICAgICAgICB0aGlzLmluZGV4ID0gaW5kZXg7CiAgICAgICAgICAgIHRoaXMuaW5qZWN0b3JJbmRleCA9IGluamVjdG9ySW5kZXg7CiAgICAgICAgICAgIHRoaXMuZGlyZWN0aXZlU3RhcnQgPSBkaXJlY3RpdmVTdGFydDsKICAgICAgICAgICAgdGhpcy5kaXJlY3RpdmVFbmQgPSBkaXJlY3RpdmVFbmQ7CiAgICAgICAgICAgIHRoaXMuZGlyZWN0aXZlU3R5bGluZ0xhc3QgPSBkaXJlY3RpdmVTdHlsaW5nTGFzdDsKICAgICAgICAgICAgdGhpcy5wcm9wZXJ0eUJpbmRpbmdzID0gcHJvcGVydHlCaW5kaW5nczsKICAgICAgICAgICAgdGhpcy5mbGFncyA9IGZsYWdzOwogICAgICAgICAgICB0aGlzLnByb3ZpZGVySW5kZXhlcyA9IHByb3ZpZGVySW5kZXhlczsKICAgICAgICAgICAgdGhpcy50YWdOYW1lID0gdGFnTmFtZTsKICAgICAgICAgICAgdGhpcy5hdHRycyA9IGF0dHJzOwogICAgICAgICAgICB0aGlzLm1lcmdlZEF0dHJzID0gbWVyZ2VkQXR0cnM7CiAgICAgICAgICAgIHRoaXMubG9jYWxOYW1lcyA9IGxvY2FsTmFtZXM7CiAgICAgICAgICAgIHRoaXMuaW5pdGlhbElucHV0cyA9IGluaXRpYWxJbnB1dHM7CiAgICAgICAgICAgIHRoaXMuaW5wdXRzID0gaW5wdXRzOwogICAgICAgICAgICB0aGlzLm91dHB1dHMgPSBvdXRwdXRzOwogICAgICAgICAgICB0aGlzLnRWaWV3cyA9IHRWaWV3czsKICAgICAgICAgICAgdGhpcy5uZXh0ID0gbmV4dDsKICAgICAgICAgICAgdGhpcy5wcm9qZWN0aW9uTmV4dCA9IHByb2plY3Rpb25OZXh0OwogICAgICAgICAgICB0aGlzLmNoaWxkID0gY2hpbGQ7CiAgICAgICAgICAgIHRoaXMucGFyZW50ID0gcGFyZW50OwogICAgICAgICAgICB0aGlzLnByb2plY3Rpb24gPSBwcm9qZWN0aW9uOwogICAgICAgICAgICB0aGlzLnN0eWxlcyA9IHN0eWxlczsKICAgICAgICAgICAgdGhpcy5zdHlsZXNXaXRob3V0SG9zdCA9IHN0eWxlc1dpdGhvdXRIb3N0OwogICAgICAgICAgICB0aGlzLnJlc2lkdWFsU3R5bGVzID0gcmVzaWR1YWxTdHlsZXM7CiAgICAgICAgICAgIHRoaXMuY2xhc3NlcyA9IGNsYXNzZXM7CiAgICAgICAgICAgIHRoaXMuY2xhc3Nlc1dpdGhvdXRIb3N0ID0gY2xhc3Nlc1dpdGhvdXRIb3N0OwogICAgICAgICAgICB0aGlzLnJlc2lkdWFsQ2xhc3NlcyA9IHJlc2lkdWFsQ2xhc3NlczsKICAgICAgICAgICAgdGhpcy5jbGFzc0JpbmRpbmdzID0gY2xhc3NCaW5kaW5nczsKICAgICAgICAgICAgdGhpcy5zdHlsZUJpbmRpbmdzID0gc3R5bGVCaW5kaW5nczsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgdHlwZV8oKSB7CiAgICAgICAgICAgIHN3aXRjaCAodGhpcy50eXBlKSB7CiAgICAgICAgICAgICAgICBjYXNlIDAgLyogQ29udGFpbmVyICovOgogICAgICAgICAgICAgICAgICAgIHJldHVybiAnVE5vZGVUeXBlLkNvbnRhaW5lcic7CiAgICAgICAgICAgICAgICBjYXNlIDMgLyogRWxlbWVudCAqLzoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1ROb2RlVHlwZS5FbGVtZW50JzsKICAgICAgICAgICAgICAgIGNhc2UgNCAvKiBFbGVtZW50Q29udGFpbmVyICovOgogICAgICAgICAgICAgICAgICAgIHJldHVybiAnVE5vZGVUeXBlLkVsZW1lbnRDb250YWluZXInOwogICAgICAgICAgICAgICAgY2FzZSA1IC8qIEljdUNvbnRhaW5lciAqLzoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1ROb2RlVHlwZS5JY3VDb250YWluZXInOwogICAgICAgICAgICAgICAgY2FzZSAxIC8qIFByb2plY3Rpb24gKi86CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdUTm9kZVR5cGUuUHJvamVjdGlvbic7CiAgICAgICAgICAgICAgICBjYXNlIDIgLyogVmlldyAqLzoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1ROb2RlVHlwZS5WaWV3JzsKICAgICAgICAgICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdUTm9kZVR5cGUuPz8/JzsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBmbGFnc18oKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZmxhZ3MgPSBbXTsKICAgICAgICAgICAgaWYgKHRoaXMuZmxhZ3MgJiAxNiAvKiBoYXNDbGFzc0lucHV0ICovKQogICAgICAgICAgICAgICAgZmxhZ3MucHVzaCgnVE5vZGVGbGFncy5oYXNDbGFzc0lucHV0Jyk7CiAgICAgICAgICAgIGlmICh0aGlzLmZsYWdzICYgOCAvKiBoYXNDb250ZW50UXVlcnkgKi8pCiAgICAgICAgICAgICAgICBmbGFncy5wdXNoKCdUTm9kZUZsYWdzLmhhc0NvbnRlbnRRdWVyeScpOwogICAgICAgICAgICBpZiAodGhpcy5mbGFncyAmIDMyIC8qIGhhc1N0eWxlSW5wdXQgKi8pCiAgICAgICAgICAgICAgICBmbGFncy5wdXNoKCdUTm9kZUZsYWdzLmhhc1N0eWxlSW5wdXQnKTsKICAgICAgICAgICAgaWYgKHRoaXMuZmxhZ3MgJiAxMjggLyogaGFzSG9zdEJpbmRpbmdzICovKQogICAgICAgICAgICAgICAgZmxhZ3MucHVzaCgnVE5vZGVGbGFncy5oYXNIb3N0QmluZGluZ3MnKTsKICAgICAgICAgICAgaWYgKHRoaXMuZmxhZ3MgJiAyIC8qIGlzQ29tcG9uZW50SG9zdCAqLykKICAgICAgICAgICAgICAgIGZsYWdzLnB1c2goJ1ROb2RlRmxhZ3MuaXNDb21wb25lbnRIb3N0Jyk7CiAgICAgICAgICAgIGlmICh0aGlzLmZsYWdzICYgMSAvKiBpc0RpcmVjdGl2ZUhvc3QgKi8pCiAgICAgICAgICAgICAgICBmbGFncy5wdXNoKCdUTm9kZUZsYWdzLmlzRGlyZWN0aXZlSG9zdCcpOwogICAgICAgICAgICBpZiAodGhpcy5mbGFncyAmIDY0IC8qIGlzRGV0YWNoZWQgKi8pCiAgICAgICAgICAgICAgICBmbGFncy5wdXNoKCdUTm9kZUZsYWdzLmlzRGV0YWNoZWQnKTsKICAgICAgICAgICAgaWYgKHRoaXMuZmxhZ3MgJiA0IC8qIGlzUHJvamVjdGVkICovKQogICAgICAgICAgICAgICAgZmxhZ3MucHVzaCgnVE5vZGVGbGFncy5pc1Byb2plY3RlZCcpOwogICAgICAgICAgICByZXR1cm4gZmxhZ3Muam9pbignfCcpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCB0ZW1wbGF0ZV8oKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgYnVmID0gW107CiAgICAgICAgICAgIGJ1Zi5wdXNoKCc8JywgdGhpcy50YWdOYW1lIHx8IHRoaXMudHlwZV8pOwogICAgICAgICAgICBpZiAodGhpcy5hdHRycykgewogICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB0aGlzLmF0dHJzLmxlbmd0aDspIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgYXR0ck5hbWUgPSB0aGlzLmF0dHJzW2krK107CiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBhdHRyTmFtZSA9PSAnbnVtYmVyJykgewogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGF0dHJWYWx1ZSA9IHRoaXMuYXR0cnNbaSsrXTsKICAgICAgICAgICAgICAgICAgICBidWYucHVzaCgnICcsICgvKiogQHR5cGUgez99ICovIChhdHRyTmFtZSkpLCAnPSInLCAoLyoqIEB0eXBlIHs/fSAqLyAoYXR0clZhbHVlKSksICciJyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgYnVmLnB1c2goJz4nKTsKICAgICAgICAgICAgcHJvY2Vzc1ROb2RlQ2hpbGRyZW4odGhpcy5jaGlsZCwgYnVmKTsKICAgICAgICAgICAgYnVmLnB1c2goJzwvJywgdGhpcy50YWdOYW1lIHx8IHRoaXMudHlwZV8sICc+Jyk7CiAgICAgICAgICAgIHJldHVybiBidWYuam9pbignJyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHN0eWxlQmluZGluZ3NfKCkgewogICAgICAgICAgICByZXR1cm4gdG9EZWJ1Z1N0eWxlQmluZGluZyh0aGlzLCBmYWxzZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGNsYXNzQmluZGluZ3NfKCkgewogICAgICAgICAgICByZXR1cm4gdG9EZWJ1Z1N0eWxlQmluZGluZyh0aGlzLCB0cnVlKTsKICAgICAgICB9CiAgICB9CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBUTm9kZURlYnVnID0gVE5vZGUkMTsKICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB0Tm9kZQogICAgICogQHBhcmFtIHs/fSBpc0NsYXNzQmFzZWQKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHRvRGVidWdTdHlsZUJpbmRpbmcodE5vZGUsIGlzQ2xhc3NCYXNlZCkgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCB0RGF0YSA9IHROb2RlLnRWaWV3Xy5kYXRhOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBiaW5kaW5ncyA9ICgvKiogQHR5cGUgez99ICovIChbXSkpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCByYW5nZSA9IGlzQ2xhc3NCYXNlZCA/IHROb2RlLmNsYXNzQmluZGluZ3MgOiB0Tm9kZS5zdHlsZUJpbmRpbmdzOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBwcmV2ID0gZ2V0VFN0eWxpbmdSYW5nZVByZXYocmFuZ2UpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBuZXh0ID0gZ2V0VFN0eWxpbmdSYW5nZU5leHQocmFuZ2UpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgaXNUZW1wbGF0ZSA9IG5leHQgIT09IDA7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBjdXJzb3IgPSBpc1RlbXBsYXRlID8gbmV4dCA6IHByZXY7CiAgICAgICAgd2hpbGUgKGN1cnNvciAhPT0gMCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGl0ZW1LZXkgPSAoLyoqIEB0eXBlIHs/fSAqLyAodERhdGFbY3Vyc29yXSkpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGl0ZW1SYW5nZSA9ICgvKiogQHR5cGUgez99ICovICh0RGF0YVtjdXJzb3IgKyAxXSkpOwogICAgICAgICAgICBiaW5kaW5ncy51bnNoaWZ0KHsKICAgICAgICAgICAgICAgIGtleTogaXRlbUtleSwKICAgICAgICAgICAgICAgIGluZGV4OiBjdXJzb3IsCiAgICAgICAgICAgICAgICBpc1RlbXBsYXRlOiBpc1RlbXBsYXRlLAogICAgICAgICAgICAgICAgcHJldkR1cGxpY2F0ZTogZ2V0VFN0eWxpbmdSYW5nZVByZXZEdXBsaWNhdGUoaXRlbVJhbmdlKSwKICAgICAgICAgICAgICAgIG5leHREdXBsaWNhdGU6IGdldFRTdHlsaW5nUmFuZ2VOZXh0RHVwbGljYXRlKGl0ZW1SYW5nZSksCiAgICAgICAgICAgICAgICBuZXh0SW5kZXg6IGdldFRTdHlsaW5nUmFuZ2VOZXh0KGl0ZW1SYW5nZSksCiAgICAgICAgICAgICAgICBwcmV2SW5kZXg6IGdldFRTdHlsaW5nUmFuZ2VQcmV2KGl0ZW1SYW5nZSksCiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBpZiAoY3Vyc29yID09PSBwcmV2KQogICAgICAgICAgICAgICAgaXNUZW1wbGF0ZSA9IGZhbHNlOwogICAgICAgICAgICBjdXJzb3IgPSBnZXRUU3R5bGluZ1JhbmdlUHJldihpdGVtUmFuZ2UpOwogICAgICAgIH0KICAgICAgICBiaW5kaW5ncy5wdXNoKChpc0NsYXNzQmFzZWQgPyB0Tm9kZS5yZXNpZHVhbENsYXNzZXMgOiB0Tm9kZS5yZXNpZHVhbFN0eWxlcykgfHwgbnVsbCk7CiAgICAgICAgcmV0dXJuIGJpbmRpbmdzOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHROb2RlCiAgICAgKiBAcGFyYW0gez99IGJ1ZgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gcHJvY2Vzc1ROb2RlQ2hpbGRyZW4odE5vZGUsIGJ1ZikgewogICAgICAgIHdoaWxlICh0Tm9kZSkgewogICAgICAgICAgICBidWYucHVzaCgoKC8qKiBAdHlwZSB7P30gKi8gKCgvKiogQHR5cGUgez99ICovICh0Tm9kZSkpKSkpLnRlbXBsYXRlXyk7CiAgICAgICAgICAgIHROb2RlID0gdE5vZGUubmV4dDsKICAgICAgICB9CiAgICB9CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBUVmlld0RhdGEgPSBOR19ERVZfTU9ERSAmJiBjcmVhdGVOYW1lZEFycmF5VHlwZSgnVFZpZXdEYXRhJykgfHwgKC8qKiBAdHlwZSB7P30gKi8gKCgvKiogQHR5cGUgez99ICovIChudWxsKSkpKTsKICAgIC8qKi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E5HX0RFVl9NT0RFICYmIGNyZWF0ZU5hbWVkQXJyYXlUeXBlKCdUQ2xlYW51cCcpIHx8ICgvKiogQHR5cGUgez99ICovICgoLyoqIEB0eXBlIHs/fSAqLyAobnVsbCkpKSk7CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gbFZpZXcKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGF0dGFjaExWaWV3RGVidWcobFZpZXcpIHsKICAgICAgICBhdHRhY2hEZWJ1Z09iamVjdChsVmlldywgbmV3IExWaWV3RGVidWcobFZpZXcpKTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBsQ29udGFpbmVyCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBhdHRhY2hMQ29udGFpbmVyRGVidWcobENvbnRhaW5lcikgewogICAgICAgIGF0dGFjaERlYnVnT2JqZWN0KGxDb250YWluZXIsIG5ldyBMQ29udGFpbmVyRGVidWcobENvbnRhaW5lcikpOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IG9iagogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gdG9EZWJ1ZyhvYmopIHsKICAgICAgICBpZiAob2JqKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZGVidWcgPSAoKC8qKiBAdHlwZSB7P30gKi8gKG9iaikpKS5kZWJ1ZzsKICAgICAgICAgICAgYXNzZXJ0RGVmaW5lZChkZWJ1ZywgJ09iamVjdCBkb2VzIG5vdCBoYXZlIGEgZGVidWcgcmVwcmVzZW50YXRpb24uJyk7CiAgICAgICAgICAgIHJldHVybiBkZWJ1ZzsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIHJldHVybiBvYmo7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBVc2UgdGhpcyBtZXRob2QgdG8gdW53cmFwIG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oaWxkcmVuIHx8IGlzVGV4dE5vZGUpIHsKICAgICAgICAgICAgICAgIHJldHVybiBvdXRlckhUTUw7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBpbm5lckhUTUwgPSAnPicgKyBub2RlLmlubmVySFRNTCArICc8JzsKICAgICAgICAgICAgICAgIHJldHVybiAob3V0ZXJIVE1MLnNwbGl0KGlubmVySFRNTClbMF0pICsgJz4nOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICB9CiAgICB9CiAgICBjbGFzcyBMVmlld0RlYnVnIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IF9yYXdfbFZpZXcKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihfcmF3X2xWaWV3KSB7CiAgICAgICAgICAgIHRoaXMuX3Jhd19sVmlldyA9IF9yYXdfbFZpZXc7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEZsYWdzIGFzc29jaWF0ZWQgd2l0aCB0aGUgYExWaWV3YCB1bnBhY2tlZCBpbnRvIGEgbW9yZSByZWFkYWJsZSBzdGF0ZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBmbGFncygpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBmbGFncyA9IHRoaXMuX3Jhd19sVmlld1tGTEFHU107CiAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICBfX3Jhd19fZmxhZ3NfXzogZmxhZ3MsCiAgICAgICAgICAgICAgICBpbml0UGhhc2VTdGF0ZTogZmxhZ3MgJiAzIC8qIEluaXRQaGFzZVN0YXRlTWFzayAqLywKICAgICAgICAgICAgICAgIGNyZWF0aW9uTW9kZTogISEoZmxhZ3MgJiA0IC8qIENyZWF0aW9uTW9kZSAqLyksCiAgICAgICAgICAgICAgICBmaXJzdFZpZXdQYXNzOiAhIShmbGFncyAmIDggLyogRmlyc3RMVmlld1Bhc3MgKi8pLAogICAgICAgICAgICAgICAgY2hlY2tBbHdheXM6ICEhKGZsYWdzICYgMTYgLyogQ2hlY2tBbHdheXMgKi8pLAogICAgICAgICAgICAgICAgZGlydHk6ICEhKGZsYWdzICYgNjQgLyogRGlydHkgKi8pLAogICAgICAgICAgICAgICAgYXR0YWNoZWQ6ICEhKGZsYWdzICYgMTI4IC8qIEF0dGFjaGVkICovKSwKICAgICAgICAgICAgICAgIGRlc3Ryb3llZDogISEoZmxhZ3MgJiAyNTYgLyogRGVzdHJveWVkICovKSwKICAgICAgICAgICAgICAgIGlzUm9vdDogISEoZmxhZ3MgJiA1MTIgLyogSXNSb290ICovKSwKICAgICAgICAgICAgICAgIGluZGV4V2l0aGluSW5pdFBoYXNlOiBmbGFncyA+PiAxMSAvKiBJbmRleFdpdGhpbkluaXRQaGFzZVNoaWZ0ICovLAogICAgICAgICAgICB9OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBwYXJlbnQoKSB7CiAgICAgICAgICAgIHJldHVybiB0b0RlYnVnKHRoaXMuX3Jhd19sVmlld1tQQVJFTlRdKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgaG9zdCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRvSHRtbCh0aGlzLl9yYXdfbFZpZXdbSE9TVF0sIHRydWUpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBodG1sKCkgewogICAgICAgICAgICByZXR1cm4gKHRoaXMubm9kZXMgfHwgW10pLm1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbm9kZQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgbm9kZSA9PiB0b0h0bWwobm9kZS5uYXRpdmUsIHRydWUpKSkuam9pbignJyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGNvbnRleHQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9yYXdfbFZpZXdbQ09OVEVYVF07CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFRoZSB0cmVlIG9mIG5vZGVzIGFzc29jaWF0ZWQgd2l0aCB0aGUgY3VycmVudCBgTFZpZXdgLiBUaGUgbm9kZXMgaGF2ZSBiZWVuIG5vcm1hbGl6ZWQgaW50bwogICAgICAgICAqIGEKICAgICAgICAgKiB0cmVlIHN0cnVjdHVyZSB3aXRoIHJlbGV2YW50IGRldGFpbHMgcHVsbGVkIG91dCBmb3IgcmVhZGFiaWxpdHkuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgbm9kZXMoKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbFZpZXcgPSB0aGlzLl9yYXdfbFZpZXc7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdE5vZGUgPSBsVmlld1tUVklFV10uZmlyc3RDaGlsZDsKICAgICAgICAgICAgcmV0dXJuIHRvRGVidWdOb2Rlcyh0Tm9kZSwgbFZpZXcpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCB0VmlldygpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3Jhd19sVmlld1tUVklFV107CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGNsZWFudXAoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9yYXdfbFZpZXdbQ0xFQU5VUF07CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGluamVjdG9yKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fcmF3X2xWaWV3W0lOSkVDVE9SJDFdOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCByZW5kZXJlckZhY3RvcnkoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9yYXdfbFZpZXdbUkVOREVSRVJfRkFDVE9SWV07CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHJlbmRlcmVyKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fcmF3X2xWaWV3W1JFTkRFUkVSXTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgc2FuaXRpemVyKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fcmF3X2xWaWV3W1NBTklUSVpFUl07CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGNoaWxkSGVhZCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRvRGVidWcodGhpcy5fcmF3X2xWaWV3W0NISUxEX0hFQURdKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgbmV4dCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRvRGVidWcodGhpcy5fcmF3X2xWaWV3W05FWFRdKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgY2hpbGRUYWlsKCkgewogICAgICAgICAgICByZXR1cm4gdG9EZWJ1Zyh0aGlzLl9yYXdfbFZpZXdbQ0hJTERfVEFJTF0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBkZWNsYXJhdGlvblZpZXcoKSB7CiAgICAgICAgICAgIHJldHVybiB0b0RlYnVnKHRoaXMuX3Jhd19sVmlld1tERUNMQVJBVElPTl9WSUVXXSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHF1ZXJpZXMoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9yYXdfbFZpZXdbUVVFUklFU107CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHRIb3N0KCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fcmF3X2xWaWV3W1RfSE9TVF07CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIE5vcm1hbGl6ZWQgdmlldyBvZiBjaGlsZCB2aWV3cyAoYW5kIGNvbnRhaW5lcnMpIGF0dGFjaGVkIGF0IHRoaXMgbG9jYXRpb24uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgY2hpbGRWaWV3cygpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjaGlsZFZpZXdzID0gW107CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGNoaWxkID0gdGhpcy5jaGlsZEhlYWQ7CiAgICAgICAgICAgIHdoaWxlIChjaGlsZCkgewogICAgICAgICAgICAgICAgY2hpbGRWaWV3cy5wdXNoKGNoaWxkKTsKICAgICAgICAgICAgICAgIGNoaWxkID0gY2hpbGQubmV4dDsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gY2hpbGRWaWV3czsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIFR1cm5zIGEgZmxhdCBsaXN0IG9mIG5vZGVzIGludG8gYSB0cmVlIGJ5IHdhbGtpbmcgdGhlIGFzc29jaWF0ZWQgYFROb2RlYCB0cmVlLgogICAgICoKICAgICAqIEBwYXJhbSB7P30gdE5vZGUKICAgICAqIEBwYXJhbSB7P30gbFZpZXcKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHRvRGVidWdOb2Rlcyh0Tm9kZSwgbFZpZXcpIHsKICAgICAgICBpZiAodE5vZGUpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBkZWJ1Z05vZGVzID0gW107CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHROb2RlQ3Vyc29yID0gdE5vZGU7CiAgICAgICAgICAgIHdoaWxlICh0Tm9kZUN1cnNvcikgewogICAgICAgICAgICAgICAgZGVidWdOb2Rlcy5wdXNoKGJ1aWxkRGVidWdOb2RlKHROb2RlQ3Vyc29yLCBsVmlldywgdE5vZGVDdXJzb3IuaW5kZXgpKTsKICAgICAgICAgICAgICAgIHROb2RlQ3Vyc29yID0gdE5vZGVDdXJzb3IubmV4dDsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gZGVidWdOb2RlczsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB0Tm9kZQogICAgICogQHBhcmFtIHs/fSBsVmlldwogICAgICogQHBhcmFtIHs/fSBub2RlSW5kZXgKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGJ1aWxkRGVidWdOb2RlKHROb2RlLCBsVmlldywgbm9kZUluZGV4KSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHJhd1ZhbHVlID0gbFZpZXdbbm9kZUluZGV4XTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgbmF0aXZlID0gdW53cmFwUk5vZGUocmF3VmFsdWUpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBjb21wb25lbnRMVmlld0RlYnVnID0gdG9EZWJ1ZyhyZWFkTFZpZXdWYWx1ZShyYXdWYWx1ZSkpOwogICAgICAgIHJldHVybiB7CiAgICAgICAgICAgIGh0bWw6IHRvSHRtbChuYXRpdmUpLAogICAgICAgICAgICBuYXRpdmU6ICgvKiogQHR5cGUgez99ICovIChuYXRpdmUpKSwKICAgICAgICAgICAgbm9kZXM6IHRvRGVidWdOb2Rlcyh0Tm9kZS5jaGlsZCwgbFZpZXcpLAogICAgICAgICAgICBjb21wb25lbnQ6IGNvbXBvbmVudExWaWV3RGVidWcsCiAgICAgICAgfTsKICAgIH0KICAgIGNsYXNzIExDb250YWluZXJEZWJ1ZyB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBfcmF3X2xDb250YWluZXIKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihfcmF3X2xDb250YWluZXIpIHsKICAgICAgICAgICAgdGhpcy5fcmF3X2xDb250YWluZXIgPSBfcmF3X2xDb250YWluZXI7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGhhc1RyYW5zcGxhbnRlZFZpZXdzKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fcmF3X2xDb250YWluZXJbSEFTX1RSQU5TUExBTlRFRF9WSUVXU107CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHZpZXdzKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fcmF3X2xDb250YWluZXIuc2xpY2UoQ09OVEFJTkVSX0hFQURFUl9PRkZTRVQpCiAgICAgICAgICAgICAgICAubWFwKCgvKiogQHR5cGUgez99ICovICh0b0RlYnVnKSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBwYXJlbnQoKSB7CiAgICAgICAgICAgIHJldHVybiB0b0RlYnVnKHRoaXMuX3Jhd19sQ29udGFpbmVyW1BBUkVOVF0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBtb3ZlZFZpZXdzKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fcmF3X2xDb250YWluZXJbTU9WRURfVklFV1NdOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBob3N0KCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fcmF3X2xDb250YWluZXJbSE9TVF07CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IG5hdGl2ZSgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3Jhd19sQ29udGFpbmVyW05BVElWRV07CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IG5leHQoKSB7CiAgICAgICAgICAgIHJldHVybiB0b0RlYnVnKHRoaXMuX3Jhd19sQ29udGFpbmVyW05FWFRdKTsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIFJldHVybiBhbiBgTFZpZXdgIHZhbHVlIGlmIGZvdW5kLgogICAgICoKICAgICAqIEBwYXJhbSB7P30gdmFsdWUgYExWaWV3YCBpZiBhbnkKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHJlYWRMVmlld1ZhbHVlKHZhbHVlKSB7CiAgICAgICAgd2hpbGUgKEFycmF5LmlzQXJyYXkodmFsdWUpKSB7CiAgICAgICAgICAgIC8vIFRoaXMgY2hlY2sgaXMgbm90IHF1aXRlIHJpZ2h0LCBhcyBpdCBkb2VzIG5vdCB0YWtlIGludG8gYWNjb3VudCBgU3R5bGluZ0NvbnRleHRgCiAgICAgICAgICAgIC8vIFRoaXMgaXMgd2h5IGl0IGlzIGluIGRlYnVnLCBub3QgaW4gdXRpbC50cwogICAgICAgICAgICBpZiAodmFsdWUubGVuZ3RoID49IEhFQURFUl9PRkZTRVQgLSAxKQogICAgICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovICh2YWx1ZSkpOwogICAgICAgICAgICB2YWx1ZSA9IHZhbHVlW0hPU1RdOwogICAgICAgIH0KICAgICAgICByZXR1cm4gbnVsbDsKICAgIH0KICAgIGNsYXNzIEkxOE5EZWJ1Z0l0ZW0gewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gX19yYXdfb3BDb2RlCiAgICAgICAgICogQHBhcmFtIHs/fSBfbFZpZXcKICAgICAgICAgKiBAcGFyYW0gez99IG5vZGVJbmRleAogICAgICAgICAqIEBwYXJhbSB7P30gdHlwZQogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKF9fcmF3X29wQ29kZSwgX2xWaWV3LCBub2RlSW5kZXgsIHR5cGUpIHsKICAgICAgICAgICAgdGhpcy5fX3Jhd19vcENvZGUgPSBfX3Jhd19vcENvZGU7CiAgICAgICAgICAgIHRoaXMuX2xWaWV3ID0gX2xWaWV3OwogICAgICAgICAgICB0aGlzLm5vZGVJbmRleCA9IG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N1cywgbFZpZXcpKTsKICAgICAgICBpZiAoaWN1cykgewogICAgICAgICAgICBpY3VzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGljdQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgaWN1ID0+IHsKICAgICAgICAgICAgICAgIGljdS5jcmVhdGUuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGljdUNhc2UKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIGljdUNhc2UgPT4gewogICAgICAgICAgICAgICAgICAgIGF0dGFjaERlYnVnT2JqZWN0KGljdUNhc2UsIG5ldyBJMThuTXV0YXRlT3BDb2Rlc0RlYnVnKGljdUNhc2UsIGxWaWV3KSk7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICBpY3UudXBkYXRlLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBpY3VDYXNlCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBpY3VDYXNlID0+IHsKICAgICAgICAgICAgICAgICAgICBhdHRhY2hEZWJ1Z09iamVjdChpY3VDYXNlLCBuZXcgSTE4blVwZGF0ZU9wQ29kZXNEZWJ1ZyhpY3VDYXNlLCBpY3VzLCBsVmlldykpOwogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgfQogICAgY2xhc3MgSTE4bk11dGF0ZU9wQ29kZXNEZWJ1ZyB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBfX3Jhd19vcENvZGVzCiAgICAgICAgICogQHBhcmFtIHs/fSBfX2xWaWV3CiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoX19yYXdfb3BDb2RlcywgX19sVmlldykgewogICAgICAgICAgICB0aGlzLl9fcmF3X29wQ29kZXMgPSBfX3Jhd19vcENvZGVzOwogICAgICAgICAgICB0aGlzLl9fbFZpZXcgPSBfX2xWaWV3OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBIGxpc3Qgb2Ygb3BlcmF0aW9uIGluZm9ybWF0aW9uIGFib3V0IGhvdyB0aGUgT3BDb2RlcyB3aWxsIGFjdCBvbiB0aGUgdmlldy4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBvcGVyYXRpb25zKCkgewogICAgICAgICAgICBjb25zdCB7IF9fbFZpZXcsIF9fcmF3X29wQ29kZXMgfSA9IHRoaXM7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcmVzdWx0cyA9IFtdOwogICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IF9fcmF3X29wQ29kZXMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IG9wQ29kZSA9IF9fcmF3X29wQ29kZXNbaV07CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBsZXQgcmVzdWx0OwogICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBvcENvZGUgPT09ICdzdHJpbmcnKSB7CiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ID0gewogICAgICAgICAgICAgICAgICAgICAgICBfX3Jhd19vcENvZGU6IG9wQ29kZSwKICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogJ0NyZWF0ZSBUZXh0IE5vZGUnLAogICAgICAgICAgICAgICAgICAgICAgICBub2RlSW5kZXg6IF9fcmF3X29wQ29kZXNbKytpXSwKICAgICAgICAgICAgICAgICAgICAgICAgdGV4dDogb3BDb2RlLAogICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG9wQ29kZSA9PT0gJ251bWJlcicpIHsKICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKG9wQ29kZSAmIDcgLyogTUFTS19PUENPREUgKi8pIHsKICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAxIC8qIEFwcGVuZENoaWxkICovOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZGVzdGluYXRpb25Ob2RlSW5kZXggPSBvcENvZGUgPj4+IDE3IC8qIFNISUZUX1BBUkVOVCAqLzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCA9IG5ldyBJMThORGVidWdJdGVtKG9wQ29kZSwgX19sVmlldywgZGVzdGluYXRpb25Ob2RlSW5kZXgsICdBcHBlbmRDaGlsZCcpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgMCAvKiBTZWxlY3QgKi86CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBub2RlSW5kZXggPSBvcENvZGUgPj4+IDMgLyogU0hJRlRfUkVGICovOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ID0gbmV3IEkxOE5EZWJ1Z0l0ZW0ob3BDb2RlLCBfX2xWaWV3LCBub2RlSW5kZXgsICdTZWxlY3QnKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDUgLyogRWxlbWVudEVuZCAqLzoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBlbGVtZW50SW5kZXggPSBvcENvZGUgPj4+IDMgLyogU0hJRlRfUkVGICovOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ID0gbmV3IEkxOE5EZWJ1Z0l0ZW0ob3BDb2RlLCBfX2xWaWV3LCBlbGVtZW50SW5kZXgsICdFbGVtZW50RW5kJyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSA0IC8qIEF0dHIgKi86CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGVtZW50SW5kZXggPSBvcENvZGUgPj4+IDMgLyogU0hJRlRfUkVGICovOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ID0gbmV3IEkxOE5EZWJ1Z0l0ZW0ob3BDb2RlLCBfX2xWaWV3LCBlbGVtZW50SW5kZXgsICdBdHRyJyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHRbJ2F0dHJOYW1lJ10gPSBfX3Jhd19vcENvZGVzWysraV07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHRbJ2F0dHJWYWx1ZSddID0gX19yYXdfb3BDb2Rlc1srK2ldOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKCFyZXN1bHQpIHsKICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKG9wQ29kZSkgewogICAgICAgICAgICAgICAgICAgICAgICBjYXNlIENPTU1FTlRfTUFSS0VSOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ID0gewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9fcmF3X29wQ29kZTogb3BDb2RlLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6ICdDT01NRU5UX01BUktFUicsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tbWVudFZhbHVlOiBfX3Jhd19vcENvZGVzWysraV0sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbm9kZUluZGV4OiBfX3Jhd19vcENvZGVzWysraV0sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgRUxFTUVOVF9NQVJLRVI6CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQgPSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX19yYXdfb3BDb2RlOiBvcENvZGUsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogJ0VMRU1FTlRfTUFSS0VSJywKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAoIXJlc3VsdCkgewogICAgICAgICAgICAgICAgICAgIHJlc3VsdCA9IHsKICAgICAgICAgICAgICAgICAgICAgICAgX19yYXdfb3BDb2RlOiBvcENvZGUsCiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6ICdVbmtub3duIE9wIENvZGUnLAogICAgICAgICAgICAgICAgICAgICAgICBjb2RlOiBvcENvZGUsCiAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJlc3VsdHMucHVzaChyZXN1bHQpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiByZXN1bHRzOwogICAgICAgIH0KICAgIH0KICAgIGNsYXNzIEkxOG5VcGRhdGVPcENvZGVzRGVidWcgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gX19yYXdfb3BDb2RlcwogICAgICAgICAqIEBwYXJhbSB7P30gaWN1cwogICAgICAgICAqIEBwYXJhbSB7P30gX19sVmlldwogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKF9fcmF3X29wQ29kZXMsIGljdXMsIF9fbFZpZXcpIHsKICAgICAgICAgICAgdGhpcy5fX3Jhd19vcENvZGVzID0gX19yYXdfb3BDb2RlczsKICAgICAgICAgICAgdGhpcy5pY3VzID0gaWN1czsKICAgICAgICAgICAgdGhpcy5fX2xWaWV3ID0gX19sVmlldzsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQSBsaXN0IG9mIG9wZXJhdGlvbiBpbmZvcm1hdGlvbiBhYm91dCBob3cgdGhlIE9wQ29kZXMgd2lsbCBhY3Qgb24gdGhlIHZpZXcuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgb3BlcmF0aW9ucygpIHsKICAgICAgICAgICAgY29uc3QgeyBfX2xWaWV3LCBfX3Jhd19vcENvZGVzLCBpY3VzIH0gPSB0aGlzOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHJlc3VsdHMgPSBbXTsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBfX3Jhd19vcENvZGVzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAvLyBiaXQgY29kZSB0byBjaGVjayBpZiB3ZSBzaG91bGQgYXBwbHkgdGhlIG5leHQgdXBkYXRlCiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBjaGVja0JpdCA9ICgvKiogQHR5cGUgez99ICovIChfX3Jhd19vcENvZGVzW2ldKSk7CiAgICAgICAgICAgICAgICAvLyBOdW1iZXIgb2Ygb3BDb2RlcyB0byBza2lwIHVudGlsIG5leHQgc2V0IG9mIHVwZGF0ZSBjb2RlcwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3Qgc2tpcENvZGVzID0gKC8qKiBAdHlwZSB7P30gKi8gKF9fcmF3X29wQ29kZXNbKytpXSkpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IHZhbHVlID0gJyc7CiAgICAgICAgICAgICAgICBmb3IgKGxldCBqID0gaSArIDE7IGogPD0gKGkgKyBza2lwQ29kZXMpOyBqKyspIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3Qgb3BDb2RlID0gX19yYXdfb3BDb2Rlc1tqXTsKICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG9wQ29kZSA9PT0gJ3N0cmluZycpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUgKz0gb3BDb2RlOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICh0eXBlb2Ygb3BDb2RlID09ICdudW1iZXInKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChvcENvZGUgPCAwKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBJdCdzIGEgYmluZGluZyBpbmRleCB3aG9zZSB2YWx1ZSBpcyBuZWdhdGl2ZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gV2UgY2Fubm90IGtub3cgdGhlIHZhbHVlIG9mIHRoZSBiaW5kaW5nIHNvIHdlIG9ubHkgc2hvdyB0aGUgaW5kZXgKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlICs9IGDvv70key1vcENvZGUgLSAxfe+/vWA7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBub2RlSW5kZXggPSBvcENvZGUgPj4+IDIgLyogU0hJRlRfUkVGICovOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRJY3VJbmRleDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0SWN1OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChvcENvZGUgJiAzIC8qIE1BU0tfT1BDT0RFICovKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAxIC8qIEF0dHIgKi86CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgYXR0ck5hbWUgPSAoLyoqIEB0eXBlIHs/fSAqLyAoX19yYXdfb3BDb2Rlc1srK2pdKSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc2FuaXRpemVGbiA9IF9fcmF3X29wQ29kZXNbKytqXTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0cy5wdXNoKHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9fcmF3X29wQ29kZTogb3BDb2RlLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hlY2tCaXQsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiAnQXR0cicsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdHRyVmFsdWU6IHZhbHVlLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0ck5hbWUsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzYW5pdGl6ZUZuLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAwIC8qIFRleHQgKi86CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdHMucHVzaCh7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfX3Jhd19vcENvZGU6IG9wQ29kZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrQml0LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogJ1RleHQnLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbm9kZUluZGV4LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dDogdmFsdWUsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDIgLyogSWN1U3dpdGNoICovOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0SWN1SW5kZXggPSAoLyoqIEB0eXBlIHs/fSAqLyAoX19yYXdfb3BDb2Rlc1srK2pdKSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRJY3UgPSAoLyoqIEB0eXBlIHs/fSAqLyAoaWN1cykpW3RJY3VJbmRleF07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJlc3VsdCA9IG5ldyBJMThORGVidWdJdGVtKG9wQ29kZSwgX19sVmlldywgbm9kZUluZGV4LCAnSWN1U3dpdGNoJyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdFsndEljdUluZGV4J10gPSB0SWN1SW5kZXg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdFsnY2hlY2tCaXQnXSA9IGNoZWNrQml0OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHRbJ21haW5CaW5kaW5nJ10gPSB2YWx1ZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0Wyd0SWN1J10gPSB0SWN1OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHRzLnB1c2gocmVzdWx0KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAzIC8qIEljdVVwZGF0ZSAqLzoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdEljdUluZGV4ID0gKC8qKiBAdHlwZSB7P30gKi8gKF9fcmF3X29wQ29kZXNbKytqXSkpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0SWN1ID0gKC8qKiBAdHlwZSB7P30gKi8gKGljdXMpKVt0SWN1SW5kZXhdOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQgPSBuZXcgSTE4TkRlYnVnSXRlbShvcENvZGUsIF9fbFZpZXcsIG5vZGVJbmRleCwgJ0ljdVVwZGF0ZScpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHRbJ3RJY3VJbmRleCddID0gdEljdUluZGV4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHRbJ2NoZWNrQml0J10gPSBjaGVja0JpdDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0Wyd0SWN1J10gPSB0SWN1OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHRzLnB1c2gocmVzdWx0KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpICs9IHNraXBDb2RlczsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gcmVzdWx0czsKICAgICAgICB9CiAgICB9CgogICAgLyoqCiAgICAgKiBAZmlsZW92ZXJ2aWV3IGFkZGVkIGJ5IHRzaWNrbGUKICAgICAqIEdlbmVyYXRlZCBmcm9tOiBwYWNrYWdlcy9jb3JlL3NyYy9yZW5kZXIzL2luc3RydWN0aW9ucy9zaGFyZWQudHMKICAgICAqIEBzdXBwcmVzcyB7Y2hlY2tUeXBlcyxjb25zdGFudFByb3BlcnR5LGV4dHJhUmVxdWlyZSxtaXNzaW5nT3ZlcnJpZGUsbWlzc2luZ1JldHVybix1bnVzZWRQcml2YXRlTWVtYmVycyx1c2VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgY29uc3QgybUwJDQgPSAvKioKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgICgpID0+IFByb21pc2UucmVzb2x2ZShudWxsKTsKICAgIC8qKgogICAgICogQSBwZXJtYW5lbnQgbWFya2VyIHByb21pc2Ugd2hpY2ggc2lnbmlmaWVzIHRoYXQgdGhlIGN1cnJlbnQgQ0QgdHJlZSBpcwogICAgICogY2xlYW4uCiAgICAgKiBAdHlwZSB7P30KICAgICAqLwogICAgY29uc3QgX0NMRUFOX1BST01JU0UgPSAoKMm1MCQ0KSkoKTsKICAgIC8qKgogICAgICogUHJvY2VzcyB0aGUgYFRWaWV3LmV4cGFuZG9JbnN0cnVjdGlvbnNgLiAoRXhlY3V0ZSB0aGUgYGhvc3RCaW5kaW5nc2AuKQogICAgICoKICAgICAqIEBwYXJhbSB7P30gdFZpZXcgYFRWaWV3YCBjb250YWluaW5nIHRoZSBgZXhwYW5kb0luc3RydWN0aW9uc2AKICAgICAqIEBwYXJhbSB7P30gbFZpZXcgYExWaWV3YCBhc3NvY2lhdGVkIHdpdGggdGhlIGBUVmlld2AKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHNldEhvc3RCaW5kaW5nc0J5RXhlY3V0aW5nRXhwYW5kb0luc3RydWN0aW9ucyh0VmlldywgbFZpZXcpIHsKICAgICAgICBuZ0Rldk1vZGUgJiYgYXNzZXJ0U2FtZSh0VmlldywgbFZpZXdbVFZJRVddLCAnYExWaWV3YCBpcyBub3QgYXNzb2NpYXRlZCB3aXRoIHRoZSBgVFZpZXdgIScpOwogICAgICAgIHRyeSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZXhwYW5kb0luc3RydWN0aW9ucyA9IHRWaWV3LmV4cGFuZG9JbnN0cnVjdGlvbnM7CiAgICAgICAgICAgIGlmIChleHBhbmRvSW5zdHJ1Y3Rpb25zICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBsZXQgYmluZGluZ1Jvb3RJbmRleCA9IHRWaWV3LmV4cGFuZG9TdGFydEluZGV4OwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IGN1cnJlbnREaXJlY3RpdmVJbmRleCA9IC0xOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IGN1cnJlbnRFbGVtZW50SW5kZXggPSAtMTsKICAgICAgICAgICAgICAgIC8vIFRPRE8obWlza28pOiBQRVJGIEl0IGlzIHBvc3NpYmxlIHRvIGdldCBoZXJlIHdpdGggYFRWaWV3LmV4cGFuZG9JbnN0cnVjdGlvbnNgIGNvbnRhaW5pbmcgbm8KICAgICAgICAgICA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lYW4gdGhhdCB3ZSBhcmUgc3RhcnRpbmcgbmV3IEVYUEFORE8gYmxvY2sgYW5kIG5lZWQgdG8gdXBkYXRlCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyB0aGUgY3VycmVudCBlbGVtZW50IGFuZCBkaXJlY3RpdmUgaW5kZXguCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBJbXBvcnRhbnQ6IEluIEpTIGAteGAgYW5kIGAwLXhgIGlzIG5vdCB0aGUgc2FtZSEgSWYgYHg9PT0wYCB0aGVuIGAteGAgd2lsbCBwcm9kdWNlCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBgLTBgIHdoaWNoIHJlcXVpcmVzIG5vbiBzdGFuZGFyZCBtYXRoIGFyaXRobWV0aWMgYW5kIGl0IGNhbiBwcmV2ZW50IFZNIG9wdGltaXphdGlvbnMuCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBgMC0wYCB3aWxsIGFsd2F5cyBwcm9kdWNlIGAwYCBhbmQgd2lsbCBub3QgY2F1c2UgYSBwb3RlbnRpYWwgZGVvcHRpbWl6YXRpb24gaW4gVk0uCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBUT0RPKG1pc2tvKTogUEVSRiBUaGlzIHNob3VsZCBiZSByZWZhY3RvcmVkIHRvIHVzZSBgfmluc3RydWN0aW9uYCBhcyB0aGF0IGRvZXMgbm90CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBzdWZmZXIgZnJvbSBgLTBgIGFuZCBpdCBpcyBmYXN0ZXIvbW9yZSBjb21wYWN0LgogICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudEVsZW1lbnRJbmRleCA9IDAgLSBpbnN0cnVjdGlvbjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFNlbGVjdGVkSW5kZXgoY3VycmVudEVsZW1lbnRJbmRleCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBJbmplY3RvciBibG9jayBhbmQgcHJvdmlkZXJzIGFyZSB0YWtlbiBpbnRvIGFjY291bnQuCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBwcm92aWRlckNvdW50ID0gKCgvKiogQHR5cGUgez99ICovIChleHBhbmRvSW5zdHJ1Y3Rpb25zWysraV0pKSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5kaW5nUm9vdEluZGV4ICs9IElOSkVDVE9SX0JMT09NX1BBUkVOVF9TSVpFICsgcHJvdmlkZXJDb3VudDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnREaXJlY3RpdmVJbmRleCA9IGJpbmRpbmdSb290SW5kZXg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBUaGlzIGlzIGVpdGhlciB0aGUgaW5qZWN0b3Igc2l6ZSAoc28gdGhlIGJpbmRpbmcgcm9vdCBjYW4gc2tpcCBvdmVyIGRpcmVjdGl2ZXMKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGFuZCBnZXQgdG8gdGhlIGZpcnN0IHNldCBvZiBob3N0IGJpbmRpbmdzIG9uIHRoaXMgbm9kZSkgb3IgdGhlIGhvc3QgdmFyIGNvdW50CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAodG8gZ2V0IHRvIHRoZSBuZXh0IHNldCBvZiBob3N0IGJpbmRpbmdzIG9uIHRoaXMgbm9kZSkuCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5kaW5nUm9vdEluZGV4ICs9IGluc3RydWN0aW9uOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAvLyBJZiBpdCdzIG5vdCBhIG51bWJlciwgaXQncyBhIGhvc3QgYmluZGluZyBmdW5jdGlvbiB0aGF0IG5lZWRzIHRvIGJlIGV4ZWN1dGVkLgogICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5zdHJ1Y3Rpb24gIT09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldEJpbmRpbmdSb290Rm9ySG9zdEJpbmRpbmdzKGJpbmRpbmdSb290SW5kZXgsIGN1cnJlbnREaXJlY3RpdmVJbmRleCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBob3N0Q3R4ID0gbFZpZXdbY3VycmVudERpcmVjdGl2ZUluZGV4XTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uKDIgLyogVXBkYXRlICovLCBob3N0Q3R4KTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAvLyBUT0RPKG1pc2tvKTogUEVSRiBSZWx5aW5nIG9uIGluY3JlbWVudGluZyB0aGUgYGN1cnJlbnREaXJlY3RpdmVJbmRleGAgaGVyZSBpcwogICAgICAgICAgICAgICAgICAgICAgICAvLyBzdWItb3B0aW1hbC4gVGhlIGltcGxpY2F0aW9ucyBhcmUgdGhhdCBpZiB3ZSBoYXZlIGEgbG90IG9mIGRpcmVjdGl2ZXMgYnV0IG5vbmUgb2YgdGhlbQogICAgICAgICAgICAgICAgICAgICAgICAvLyBoYXZlIGhvc3QgYmluZGluZ3Mgd2UgbmV2ZXJ0aGVsZXNzIG5lZWQgdG8gaXRlcmF0ZSBvdmVyIHRoZSBleHBhbmRvIGluc3RydWN0aW9ucyB0bwogICAgICAgICAgICAgICAgICAgICAgICAvLyB1cGRhdGUgdGhlIGNvdW50ZXIuIEl0IHdvdWxkIGJlIG11Y2ggYmV0dGVyIGlmIHdlIGNvdWxkIGVuY29kZSB0aGUKICAgICAgICAgICAgICAgICAgICAgICAgLy8gYGN1cnJlbnREaXJlY3RpdmVJbmRleGAgaW50byB0aGUgYGV4cGFuZG9JbnN0cnVjdGlvbmAgYXJyYXkgc28gdGhhdCB3ZSBvbmx5IG5lZWQgdG8KICAgICAgICAgICAgICAgICAgICAgICAgLy8gaXRlcmF0ZSBvdmVyIHRob3NlIGRpcmVjdGl2ZXMgd2hpY2ggYWN0dWFsbHkgaGF2ZSBgaG9zdEJpbmRpbmdzYC4KICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudERpcmVjdGl2ZUluZGV4Kys7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGZpbmFsbHkgewogICAgICAgICAgICBzZXRTZWxlY3RlZEluZGV4KC0xKTsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIFJlZnJlc2hlcyBhbGwgY29udGVudCBxdWVyaWVzIGRlY2xhcmVkIGJ5IGRpcmVjdGl2ZXMgaW4gYSBnaXZlbiB2aWV3CiAgICAgKiBAcGFyYW0gez99IHRWaWV3CiAgICAgKiBAcGFyYW0gez99IGxWaWV3CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiByZWZyZXNoQ29udGVudFF1ZXJpZXModFZpZXcsIGxWaWV3KSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGNvbnRlbnRRdWVyaWVzID0gdFZpZXcuY29udGVudFF1ZXJpZXM7CiAgICAgICAgaWYgKGNvbnRlbnRRdWVyaWVzICE9PSBudWxsKSB7CiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgY29udGVudFF1ZXJpZXMubGVuZ3RoOyBpICs9IDIpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHF1ZXJ5U3RhcnRJZHggPSBjb250ZW50UXVlcmllc1tpXTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGRpcmVjdGl2ZURlZklkeCA9IGNvbnRlbnRRdWVyaWVzW2kgKyAxXTsKICAgICAgICAgICAgICAgIGlmIChkaXJlY3RpdmVEZWZJZHggIT09IC0xKSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGRpcmVjdGl2ZURlZiA9ICgvKiogQHR5cGUgez99ICovICh0Vmlldy5kYXRhW2RpcmVjdGl2ZURlZklkeF0pKTsKICAgICAgICAgICAgICAgICAgICBuZ0Rldk1vZGUgJiYKICAgICAgICAgICAgICAgICAgICAgICAgYXNzZXJ0RGVmaW5lZChkaXJlY3RpdmVEZWYuY29udGVudFF1ZXJpZXMsICdjb250ZW50UXVlcmllcyBmdW5jdGlvbiBzaG91bGQgYmUgZGVmaW5lZCcpOwogICAgICAgICAgICAgICAgICAgIHNldEN1cnJlbnRRdWVyeUluZGV4KHF1ZXJ5U3RhcnRJZHgpOwogICAgICAgICAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovIChkaXJlY3RpdmVEZWYuY29udGVudFF1ZXJpZXMpKSgyIC8qIFVwZGF0ZSAqLywgbFZpZXdbZGlyZWN0aXZlRGVmSWR4XSwgZGlyZWN0aXZlRGVmSWR4KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogUmVmcmVzaGVzIGNoaWxkIGNvbXBvbmVudHMgaW4gdGhlIGN1cnJlbnQgdmlldyAodXBkYXRlIG1vZGUpLgogICAgICogQHBhcmFtIHs/fSBob3N0TFZpZXcKICAgICAqIEBwYXJhbSB7P30gY29tcG9uZW50cwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gcmVmcmVzaENoaWxkQ29tcG9uZW50cyhob3N0TFZpZXcsIGNvbXBvbmVudHMpIHsKICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGNvbXBvbmVudHMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgcmVmcmVzaENvbXBvbmVudChob3N0TFZpZXcsIGNvbXBvbmVudHNbaV0pOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogUmVuZGVycyBjaGlsZCBjb21wb25lbnRzIGluIHRoZSBjdXJyZW50IHZpZXcgKGNyZWF0aW9uIG1vZGUpLgogICAgICogQHBhcmFtIHs/fSBob3N0TFZpZXcKICAgICAqIEBwYXJhbSB7P30gY29tcG9uZW50cwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gcmVuZGVyQ2hpbGRDb21wb25lbnRzKGhvc3RMVmlldywgY29tcG9uZW50cykgewogICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgY29tcG9uZW50cy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICByZW5kZXJDb21wb25lbnQoaG9zdExWaWV3LCBjb21wb25lbnRzW2ldKTsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIENyZWF0ZXMgYSBuYXRpdmUgZWxlbWVudCBmcm9tIGEgdGFnIG5hbWUsIHVzaW5nIGEgcmVuZGVyZXIuCiAgICAgKiBAcGFyYW0gez99IG5hbWUgdGhlIHRhZyBuYW1lCiAgICAgKiBAcGFyYW0gez99IHJlbmRlcmVyIEEgcmVuZGVyZXIgdG8gdXNlCiAgICAgKiBAcGFyYW0gez99IG5hbWVzcGFjZQogICAgICogQHJldHVybiB7P30gdGhlIGVsZW1lbnQgY3JlYXRlZAogICAgICovCiAgICBmdW5jdGlvbiBlbGVtZW50Q3JlYXRlKG5hbWUsIHJlbmRlcmVyLCBuYW1lc3BhY2UpIHsKICAgICAgICBpZiAoaXNQcm9jZWR1cmFsUmVuZGVyZXIocmVuZGVyZXIpKSB7CiAgICAgICAgICAgIHJldHVybiByZW5kZXJlci5jcmVhdGVFbGVtZW50KG5hbWUsIG5hbWVzcGFjZSk7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICByZXR1cm4gbmFtZXNwYWNlID09PSBudWxsID8gcmVuZGVyZXIuY3JlYXRlRWxlbWVudChuYW1lKSA6CiAgICAgICAgICAgICAgICByZW5kZXJlci5jcmVhdGVFbGVtZW50TlMobmFtZXNwYWNlLCBuYW1lKTsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEB0ZW1wbGF0ZSBUCiAgICAgKiBAcGFyYW0gez99IHBhcmVudExWaWV3CiAgICAgKiBAcGFyYW0gez99IHRWaWV3CiAgICAgKiBAcGFyYW0gez99IGNvbnRleHQKICAgICAqIEBwYXJhbSB7P30gZmxhZ3MKICAgICAqIEBwYXJhbSB7P30gaG9zdAogICAgICogQHBhcmFtIHs/fSB0SG9zdE5vZGUKICAgICAqIEBwYXJhbSB7Pz19IHJlbmRlcmVyRmFjdG9yeQogICAgICogQHBhcmFtIHs/PX0gcmVuZGVyZXIKICAgICAqIEBwYXJhbSB7Pz19IHNhbml0aXplcgogICAgICogQHBhcmFtIHs/PX0gaW5qZWN0b3IKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGNyZWF0ZUxWaWV3KHBhcmVudExWaWV3LCB0VmlldywgY29udGV4dCwgZmxhZ3MsIGhvc3QsIHRIb3N0Tm9kZSwgcmVuZGVyZXJGYWN0b3J5LCByZW5kZXJlciwgc2FuaXRpemVyLCBpbmplY3RvcikgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBsVmlldyA9IG5nRGV2TW9kZSA/IGNsb25lVG9MVmlld0Zyb21UVmlld0JsdWVwcmludCh0VmlldykgOiAoLyoqIEB0eXBlIHs/fSAqLyAodFZpZXcuYmx1ZXByaW50LnNsaWNlKCkpKTsKICAgICAgICBsVmlld1tIT1NUXSA9IGhvc3Q7CiAgICAgICAgbFZpZXdbRkxBR1NdID0gZmxh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AgICAgICBsVmlld1tUX0hPU1RdID0gdEhvc3ROb2RlOwogICAgICAgIG5nRGV2TW9kZSAmJgogICAgICAgICAgICBhc3NlcnRFcXVhbCh0Vmlldy50eXBlID09IDIgLyogRW1iZWRkZWQgKi8gPyBwYXJlbnRMVmlldyAhPT0gbnVsbCA6IHRydWUsIHRydWUsICdFbWJlZGRlZCB2aWV3cyBtdXN0IGhhdmUgcGFyZW50TFZpZXcnKTsKICAgICAgICBsVmlld1tERUNMQVJBVElPTl9DT01QT05FTlRfVklFV10gPQogICAgICAgICAgICB0Vmlldy50eXBlID09IDIgLyogRW1iZWRkZWQgKi8gPyAoLyoqIEB0eXBlIHs/fSAqLyAocGFyZW50TFZpZXcpKVtERUNMQVJBVElPTl9DT01QT05FTlRfVklFV10gOiBsVmlldzsKICAgICAgICBuZ0Rldk1vZGUgJiYgYXR0YWNoTFZpZXdEZWJ1ZyhsVmlldyk7CiAgICAgICAgcmV0dXJuIGxWaWV3OwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHRWaWV3CiAgICAgKiBAcGFyYW0gez99IHRIb3N0Tm9kZQogICAgICogQHBhcmFtIHs/fSBpbmRleAogICAgICogQHBhcmFtIHs/fSB0eXBlCiAgICAgKiBAcGFyYW0gez99IG5hbWUKICAgICAqIEBwYXJhbSB7P30gYXR0cnMKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGdldE9yQ3JlYXRlVE5vZGUodFZpZXcsIHRIb3N0Tm9kZSwgaW5kZXgsIHR5cGUsIG5hbWUsIGF0dHJzKSB7CiAgICAgICAgLy8gS2VlcCB0aGlzIGZ1bmN0aW9uIHNob3J0LCBzbyB0aGF0IHRoZSBWTSB3aWxsIGlubGluZSBpdC4KICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgYWRqdXN0ZWRJbmRleCA9IGluZGV4ICsgSEVBREVSX09GRlNFVDsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgdE5vZGUgPSAoLyoqIEB0eXBlIHs/fSAqLyAodFZpZXcuZGF0YVthZGp1c3RlZEluZGV4XSkpIHx8CiAgICAgICAgICAgIGNyZWF0ZVROb2RlQXRJbmRleCh0VmlldywgdEhvc3ROb2RlLCBhZGp1c3RlZEluZGV4LCB0eXBlLCBuYW1lLCBhdHRycyk7CiAgICAgICAgc2V0UHJldmlvdXNPclBhcmVudFROb2RlKHROb2RlLCB0cnVlKTsKICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKHROb2RlKSk7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdFZpZXcKICAgICAqIEBwYXJhbSB7P30gdEhvc3ROb2RlCiAgICAgKiBAcGFyYW0gez99IGFkanVzdGVkSW5kZXgKICAgICAqIEBwYXJhbSB7P30gdHlwZQogICAgICogQHBhcmFtIHs/fSBuYW1lCiAgICAgKiBAcGFyYW0gez99IGF0dHJzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBjcmVhdGVUTm9kZUF0SW5kZXgodFZpZXcsIHRIb3N0Tm9kZSwgYWRqdXN0ZWRJbmRleCwgdHlwZSwgbmFtZSwgYXR0cnMpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgcHJldmlvdXNPclBhcmVudFROb2RlID0gZ2V0UHJldmlvdXNPclBhcmVudFROb2RlKCk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGlzUGFyZW50ID0gZ2V0SXNQYXJlbnQoKTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgcGFyZW50ID0gaXNQYXJlbnQgPyBwcmV2aW91c09yUGFyZW50VE5vZGUgOiBwcmV2aW91c09yUGFyZW50VE5vZGUgJiYgcHJldmlvdXNPclBhcmVudFROb2RlLnBhcmVudDsKICAgICAgICAvLyBQYXJlbnRzIGNhbm5v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zdENoaWxkID0gdE5vZGU7CiAgICAgICAgfQogICAgICAgIGlmIChwcmV2aW91c09yUGFyZW50VE5vZGUpIHsKICAgICAgICAgICAgaWYgKGlzUGFyZW50ICYmIHByZXZpb3VzT3JQYXJlbnRUTm9kZS5jaGlsZCA9PSBudWxsICYmCiAgICAgICAgICAgICAgICAodE5vZGUucGFyZW50ICE9PSBudWxsIHx8IHByZXZpb3VzT3JQYXJlbnRUTm9kZS50eXBlID09PSAyIC8qIFZpZXcgKi8pKSB7CiAgICAgICAgICAgICAgICAvLyBXZSBhcmUgaW4gdGhlIHNhbWUgdmlldywgd2hpY2ggbWVhbnMgd2UgYXJlIGFkZGluZyBjb250ZW50IG5vZGUgdG8gdGhlIHBhcmVudCB2aWV3LgogICAgICAgICAgICAgICAgcHJldmlvdXNPclBhcmVudFROb2RlLmNoaWxkID0gdE5vZGU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoIWlzUGFyZW50KSB7CiAgICAgICAgICAgICAgICBwcmV2aW91c09yUGFyZW50VE5vZGUubmV4dCA9IHROb2RlOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiB0Tm9kZTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB0VmlldwogICAgICogQHBhcmFtIHs/fSB0UGFyZW50Tm9kZQogICAgICogQHBhcmFtIHs/fSBpbmRleAogICAgICogQHBhcmFtIHs/fSBsVmlldwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gYXNzaWduVFZpZXdOb2RlVG9MVmlldyh0VmlldywgdFBhcmVudE5vZGUsIGluZGV4LCBsVmlldykgewogICAgICAgIC8vIFZpZXcgbm9kZXMgYXJlIG5vdCBzdG9yZWQgaW4gZGF0YSBiZWNhdXNlIHRoZXkgY2FuIGJlIGFkZGVkIC8gcmVtb3ZlZCBhdCBydW50aW1lICh3aGljaAogICAgICAgIC8vIHdvdWxkIGNhdXNlIGluZGljZXMgdG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HNUb0FsbG9jIFRoZSBudW1iZXIgb2Ygc2xvdHMgdG8gYWxsb2MgaW4gdGhlIExWaWV3LCBzaG91bGQgYmUgPjAKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGFsbG9jRXhwYW5kbyh0VmlldywgbFZpZXcsIG51bVNsb3RzVG9BbGxvYykgewogICAgICAgIG5nRGV2TW9kZSAmJgogICAgICAgICAgICBhc3NlcnRHcmVhdGVyVGhhbihudW1TbG90c1RvQWxsb2MsIDAsICdUaGUgbnVtYmVyIG9mIHNsb3RzIHRvIGFsbG9jIHNob3VsZCBiZSBncmVhdGVyIHRoYW4gMCcpOwogICAgICAgIGlmIChudW1TbG90c1RvQWxsb2MgPiAwKSB7CiAgICAgICAgICAgIGlmICh0Vmlldy5maXJzdENyZWF0ZVBhc3MpIHsKICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbnVtU2xvdHNUb0FsbG9jOyBpKyspIHsKICAgICAgICAgICAgICAgICAgICB0Vmlldy5ibHVlcHJpbnQucHVzaChudWxsKTsKICAgICAgICAgICAgICAgICAgICB0Vmlldy5kYXRhLnB1c2gobnVsbCk7CiAgICAgICAgICAgICAgICAgICAgbFZpZXcucHVzaChudWxsKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vIFdlIHNob3VsZCBvbmx5IGluY3JlbWVudCB0aGUgZXhwYW5kbyBzdGFydCBpbmRleCBpZiB0aGVyZSBhcmVuJ3QgYWxyZWFkeSBkaXJlY3RpdmVzCiAgICAgICAgICAgICAgICAvLyBhbmQgaW5qZWN0b3JzIHNhdmVkIGluIHRoZSAiZXhwYW5kbyIgc2VjdGlvbgogICAgICAgICAgICAgICAgaWYgKCF0Vmlldy5leHBhbmRvSW5zdHJ1Y3Rpb25zKSB7CiAgICAgICAgICAgICAgICAgICAgdFZpZXcuZXhwYW5kb1N0YXJ0SW5kZXggKz0gbnVtU2xvdHNUb0FsbG9jOwogICA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gdGhpcyB0byBhIHNlcGFyYXRlIGZ1bmN0aW9uIHdpdGhvdXQgcnVubmluZyBiZW5jaG1hcmtzCiAgICAgICAgICAgIGlmICghY2hlY2tOb0NoYW5nZXNNb2RlKSB7CiAgICAgICAgICAgICAgICBpZiAoaG9va3NJbml0UGhhc2VDb21wbGV0ZWQpIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgcHJlT3JkZXJDaGVja0hvb2tzID0gdFZpZXcucHJlT3JkZXJDaGVja0hvb2tzOwogICAgICAgICAgICAgICAgICAgIGlmIChwcmVPcmRlckNoZWNrSG9va3MgIT09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICAgICAgZXhlY3V0ZUNoZWNrSG9va3MobFZpZXcsIHByZU9yZGVyQ2hlY2tIb29rcywgbnVsbCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHByZU9yZGVySG9va3MgPSB0Vmlldy5wcmVPcmRlckhvb2tzOwogICAgICAgICAgICAgICAgICAgIGlmIChwcmVPcmRlckhvb2tzICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGV4ZWN1dGVJbml0QW5kQ2hlY2tIb29rcyhsVmlldywgcHJlT3JkZXJIb29rcywgMCAvKiBPbkluaXRIb29rc1RvQmVSdW4gKi8sIG51bGwpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBpbmNyZW1lbnRJbml0UGhhc2VGbGFncyhsVmlldywgMCAvKiBPbkluaXRIb29rc1RvQmVSdW4gKi8pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIEZpcnN0IG1hcmsgdHJhbnNwbGFudGVkIHZpZXdzIHRoY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Ugez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgY29udGVudENoZWNrSG9va3MgPSB0Vmlldy5jb250ZW50Q2hlY2tIb29rczsKICAgICAgICAgICAgICAgICAgICBpZiAoY29udGVudENoZWNrSG9va3MgIT09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICAgICAgZXhlY3V0ZUNoZWNrSG9va3MobFZpZXcsIGNvbnRlbnRDaGVja0hvb2tzKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgY29udGVudEhvb2tzID0gdFZpZXcuY29udGVudEhvb2tzOwogICAgICAgICAgICAgICAgICAgIGlmIChjb250ZW50SG9va3MgIT09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICAgICAgZXhlY3V0ZUluaXRBbmRDaGVja0hvb2tzKGxWaWV3LCBjb250ZW50SG9va3MsIDEgLyogQWZ0ZXJDb250ZW50SW5pdEhvb2tzVG9CZVJ1biAqLyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGluY3JlbWVudEluaXRQaGFzZUZsYWdzKGxWaWV3LCAxIC8qIEFmdGVyQ29udGVudEluaXRIb29rc1RvQmVSdW4gKi8pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHNldEhvc3RCaW5kaW5nc0J5RXhlY3V0aW5nRXhwYW5kb0luc3RydWN0aW9ucyh0VmlldywgbFZpZXcpOwogICAgICAgICAgICAvLyBSZWZyZXNoIGNoaWxkIGNvbXBvbmVudCB2aWV3cy4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjb21wb25lbnRzID0gdFZpZXcuY29tcG9uZW50czsKICAgICAgICAgICAgaWYgKGNvbXBvbmVudHMgIT09IG51bGwpIHsK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IEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHZpZXdDaGVja0hvb2tzID0gdFZpZXcudmlld0NoZWNrSG9va3M7CiAgICAgICAgICAgICAgICAgICAgaWYgKHZpZXdDaGVja0hvb2tzICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGV4ZWN1dGVDaGVja0hvb2tzKGxWaWV3LCB2aWV3Q2hlY2tIb29rcyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHZpZXdIb29rcyA9IHRWaWV3LnZpZXdIb29rczsKICAgICAgICAgICAgICAgICAgICBpZiAodmlld0hvb2tzICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGV4ZWN1dGVJbml0QW5kQ2hlY2tIb29rcyhsVmlldywgdmlld0hvb2tzLCAyIC8qIEFmdGVyVmlld0luaXRIb29rc1RvQmVSdW4gKi8pOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBpbmNyZW1lbnRJbml0UGhhc2VGbGFncyhsVmlldywgMiAvKiBBZnRlclZpZXdJbml0SG9va3NUb0JlUnVuICovKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodFZpZXcuZmlyc3RVcGRhdGVQYXNzID09PSB0cnVlKSB7CiAgICAgICAgICAgICAgICAvLyBXZSBuZWVkIHRvIG1ha2Ugc3VyZSB0aGF0IHdlIG9ubHkgZmxpcCB0aGUgZmxhZyBvbiBzdWNjZXNzZnVsIGByZWZyZXNoVmlld2Agb25seQogICAgICAgICAgICAgICAgLy8gRG9uJ3QgZG8gdGhpcyBpbiBgZmluYWxseWAgYmxvY2suCiAgICAgICAgICAgICAgICAvLyBJZiB3ZSBkaWQgdGhpcy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XJDb21wb25lbnRPclRlbXBsYXRlKHRWaWV3LCBsVmlldywgdGVtcGxhdGVGbiwgY29udGV4dCkgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCByZW5kZXJlckZhY3RvcnkgPSBsVmlld1tSRU5ERVJFUl9GQUNUT1JZXTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3Qgbm9ybWFsRXhlY3V0aW9uUGF0aCA9ICFnZXRDaGVja05vQ2hhbmdlc01vZGUoKTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgY3JlYXRpb25Nb2RlSXNBY3RpdmUgPSBpc0NyZWF0aW9uTW9kZShsVmlldyk7CiAgICAgICAgdHJ5IHsKICAgICAgICAgICAgaWYgKG5vcm1hbEV4ZWN1dGlvblBhdGggJiYgIWNyZWF0aW9uTW9kZUlzQWN0aXZlICYmIHJlbmRlcmVyRmFjdG9yeS5iZWdpbikgewogICAgICAgICAgICAgICAgcmVuZGVyZXJGYWN0b3J5LmJlZ2luKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGNyZWF0aW9uTW9kZUlzQWN0aXZlKSB7CiAgICAgICAgICAgICAgICByZW5kZXJWaWV3KHRWaWV3LCBsVmlldywgY29udGV4dCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmVmcmVzaFZpZXcodFZpZXcsIGxWaWV3LCB0ZW1wbGF0ZUZuLCBjb250ZXh0KTsKICAgICAgICB9CiAgICAgICAgZmluYWxseSB7CiAgICAgICAgICAgIGlmIChub3JtYWxFeGVjdXRpb25QYXRoICYmICFjcmVhdGlvbk1vZGVJc0FjdGl2ZSAmJiByZW5kZXJlckZhY3RvcnkuZW5kKSB7CiAgICAgICAgICAgICAgICByZW5kZXJlckZhY3RvcnkuZW5kKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEB0ZW1wbGF0ZSBUCiAgICAgKiBAcGFyYW0gez99IHRWaWV3CiAgICAgKiBAcGFyYW0gez99IGxWaWV3CiAgICAgKiBAcGFyYW0gez99IHRlbXBsYXRlRm4KICAgICAqIEBwYXJhbSB7P30gcmYKICAgICAqIEBwYXJhbSB7P30gY29udGV4dAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZXhlY3V0ZVRlbXBsYXRlKHRWaWV3LCBsVmlldywgdGVtcGxhdGVGbiwgcmYsIGNvbnRleHQpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgcHJldlNlbGVjdGVkSW5kZXggPSBnZXRTZWxlY3RlZEluZGV4KCk7CiAgICAgICAgdHJ5IHsKICAgICAgICAgICAgc2V0U2VsZWN0ZWRJbmRleCgtMSk7CiAgICAgICAgICAgIGlmIChyZiAmIDIgLyogVXBkYXRlICovICYmIGxWaWV3Lmxlbmd0aCA+IEhFQURFUl9PRkZTRVQpIHsKICAgICAgICAgICAgICAgIC8vIFdoZW4gd2UncmUgdXBkYXRpbmcsIGluaGVyZW50bHkgc2VsZWN0IDAgc28gd2UgZG9uJ3QKICAgICAgICAgICAgICAgIC8vIGhhdmUgdG8gZ2VuZXJhdGUgdGhhdCBpbnN0cnVjdGlvbiBmb3IgbW9zdCB1cGRhdGUgYmxvY2tzLgogICAgICAgICAgICAgICAgc2VsZWN0SW5kZXhJbnRlcm5hbCh0VmlldywgbFZpZXcsIDAsIGdldENoZWNrTm9DaGFuZ2VzTW9kZSgpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0ZW1wbGF0ZUZuKHJmLCBjb250ZXh0KTsKICAgICAgICB9CiAgICAgICAgZmluYWxseSB7CiAgICAgICAgICAgIHNldFNlbGVjdGVkSW5kZXgocHJldlNlbGVjdGVkSW5kZXgpOwogICAgICAgIH0KICAgIH0KICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vCiAgICAvLy8vIEVsZW1lbnQKICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vCiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdFZpZXcKICAgICAqIEBwYXJhbSB7P30gdE5vZGUKICAgICAqIEBwYXJhbSB7P30gbFZpZXcKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGV4ZWN1dGVDb250ZW50UXVlcmllcyh0VmlldywgdE5vZGUsIGxWaWV3KSB7CiAgICAgICAgaWYgKGlzQ29udGVudFF1ZXJ5SG9zdCh0Tm9kZSkpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBzdGFydCA9IHROb2RlLmRpcmVjdGl2ZVN0YXJ0OwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGVuZCA9IHROb2RlLmRpcmVjdGl2ZUVuZDsKICAgICAgICAgICAgZm9yIChsZXQgZGlyZWN0aXZlSW5kZXggPSBzdGFydDsgZGlyZWN0aXZlSW5kZXggPCBlbmQ7IGRpcmVjdGl2ZUluZGV4KyspIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGRlZiA9ICgvKiogQHR5cGUgez99ICovICh0Vmlldy5kYXRhW2RpcmVjdGl2ZUluZGV4XSkpOwogICAgICAgICAgICAgICAgaWYgKGRlZi5jb250ZW50UXVlcmllcykgewogICAgICAgICAgICAgICAgICAgIGRlZi5jb250ZW50UXVlcmllcygxIC8qIENyZWF0ZSAqLywgbFZpZXdbZGlyZWN0aXZlSW5kZXhdLCBkaXJlY3RpdmVJbmRleCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIENyZWF0ZXMgZGlyZWN0aXZlIGluc3RhbmNlcy4KICAgICAqIEBwYXJhbSB7P30gdFZpZXcKICAgICAqIEBwYXJhbSB7P30gbFZpZXcKICAgICAqIEBw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s/fSAqLwogICAgICAgIGNvbnN0IGxvY2FsTmFtZXMgPSB0Tm9kZS5sb2NhbE5hbWVzOwogICAgICAgIGlmIChsb2NhbE5hbWVzICE9PSBudWxsKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGxvY2FsSW5kZXggPSB0Tm9kZS5pbmRleCArIDE7CiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbG9jYWxOYW1lcy5sZW5ndGg7IGkgKz0gMikgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgaW5kZXggPSAoLyoqIEB0eXBlIHs/fSAqLyAobG9jYWxOYW1lc1tpICsgMV0pKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHZhbHVlID0gaW5kZXggPT09IC0xID8KICAgICAgICAgICAgICAgICAgICBsb2NhbFJlZkV4dHJhY3RvcigoLyoqIEB0eXBlIHs/fSAqLyAodE5vZGUpKSwgdmlld0RhdGEpIDoKICAgICAgICAgICAgICAgICAgICB2aWV3RGF0YVtpbmRleF07CiAgICAgICAgICAgICAgICB2aWV3RGF0YVtsb2NhbEluZGV4KytdID0gdmFsdWU7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEdldHMgVFZpZXcgZnJvbSBhIHRlbXBsYXRlIGZ1bmN0aW9uIG9yIGNyZWF0ZXMgYSBuZXcgVFZpZXcKICAgICAqIGlmIGl0IGRvZXNuJ3QgYWxyZWFkeSBleGlzdC4KICAgICAqCiAgICAgKiBAcGFyYW0gez99IGRlZiBDb21wb25lbnREZWYKICAgICAqIEByZXR1cm4gez99IFRWaWV3CiAgICAgKi8KICAgIGZ1bmN0aW9uIGdldE9yQ3JlYXRlVENvbXBvbmVudFZpZXcoZGVmKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwog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nM6IEV4cGFuZG9JbnN0cnVjdGlvbnN8bnVsbCwKICAgICAgICAgICAgdHJ1ZSwgLy8gZmlyc3RDcmVhdGVQYXNzOiBib29sZWFuLAogICAgICAgICAgICB0cnVlLCAvLyBmaXJzdFVwZGF0ZVBhc3M6IGJvb2xlYW4sCiAgICAgICAgICAgIGZhbHNlLCAvLyBzdGF0aWNWaWV3UXVlcmllczogYm9vbGVhbiwKICAgICAgICAgICAgZmFsc2UsIC8vIHN0YXRpY0NvbnRlbnRRdWVyaWVzOiBib29sZWFuLAogICAgICAgICAgICBudWxsLCAvLyBwcmVPcmRlckhvb2tzOiBIb29rRGF0YXxudWxsLAogICAgICAgICAgICBudWxsLCAvLyBwcmVPcmRlckNoZWNrSG9va3M6IEhvb2tEYXRhfG51bGwsCiAgICAgICAgICAgIG51bGwsIC8vIGNvbnRlbnRIb29rczogSG9va0RhdGF8bnVsbCwKICAgICAgICAgICAgbnVsbCwgLy8gY29udGVudENoZWNrSG9va3M6IEhvb2tEYXRhfG51bGwsCiAgICAgICAgICAgIG51bGwsIC8vIHZpZXdIb29rczogSG9va0RhdGF8bnVsbCwKICAgICAgICAgICAgbnVsbCwgLy8gdmlld0NoZWNrSG9va3M6IEhvb2tEYXRhfG51bGwsCiAgICAgICAgICAgIG51bGwsIC8vIGRlc3Ryb3lIb29rczogRGVzdHJveUhvb2tEYXRhfG51bGwsCiAgICAgICAgICAgIG51bGwsIC8vIGNsZWFudXA6IGFueVtdfG51bGwsCiAgICAgICAgICAgIG51bGwsIC8vIGNvbnRlbnRRdWVyaWVzOiBudW1iZXJbXXxudWxsLAogICAgICAgICAgICBudWxsLCAvLyBjb21wb25lbnRzOiBudW1iZXJbXXxudWxsLAogICAgICAgICAgICB0eXBlb2YgZGlyZWN0aXZlcyA9PT0gJ2Z1bmN0aW9uJyA/CiAgICAgICAgICAgICAgICBkaXJlY3RpdmVzKCkgOgogICAgICAgICAgICAgICAgZGlyZWN0aXZlcywgLy8gZGlyZWN0aXZlUmVnaXN0cnk6IERpcmVjdGl2ZURlZkxpc3R8bnVsbCwKICAgICAgICAgICAgdHlwZW9mIHBpcGVzID09PSAnZnVuY3Rpb24nID8gcGlwZXMoKSA6IHBpcGVzLCAvLyBwaXBlUmVnaXN0cnk6IFBpcGVEZWZMaXN0fG51bGwsCiAgICAgICAgICAgIG51bGwsIC8vIGZpcnN0Q2hpbGQ6IFROb2RlfG51bGwsCiAgICAgICAgICAgIHNjaGVtYXMsIC8vIHNjaGVtYXM6IFNjaGVtYU1ldGFkYXRhW118bnVsbCwKICAgICAgICAgICAgY29uc3RzLCAvLyBjb25zdHM6IFRDb25zdGFudHN8bnVsbAogICAgICAgICAgICBmYWxzZSAvLyBpbmNvbXBsZXRlRmlyc3RQYXNzOiBib29sZWFuCiAgICAgICAgICAgICkgOgogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICB0eXBlOiB0eXBlLAogICAgICAgICAgICAgICAgaWQ6IHZpZXdJbmRleCwKICAgICAgICAgICAgICAgIGJsdWVwcmludDogYmx1ZXByaW50LAogICAgICAgICAgICAgICAgdGVtcGxhdGU6IHRlbXBsYXRlRm4sCiAgICAgICAgICAgICAgICBxdWVyaWVzOiBudWxsLAogICAgICAgICAgICAgICAgdmlld1F1ZXJ5OiB2aWV3UXVlcnksCiAgICAgICAgICAgICAgICBub2RlOiAoLyoqIEB0eXBlIHs/fSAqLyAobnVsbCkpLAogICAgICAgICAgICAgICAgZGF0YTogYmx1ZXByaW50LnNsaWNlKCkuZmlsbChudWxsLCBiaW5kaW5nU3RhcnRJbmRleCksCiAgICAgICAgICAgICAgICBiaW5kaW5nU3RhcnRJbmRleDogYmluZGluZ1N0YXJ0SW5kZXgsCiAgICAgICAgICAgICAgICBleHBhbmRvU3RhcnRJbmRleDogaW5pdGlhbFZpZXdMZW5ndGgsCiAgICAgICAgICAgICAgICBleHBhbmRvSW5zdHJ1Y3Rpb25zOiBudWxsLAogICAgICAgICAgICAgICAgZmlyc3RDcmVhdGVQYXNzOiB0cnVlLAogICAgICAgICAgICAgICAgZmlyc3RVcGRhdGVQYXNzOiB0cnVlLAogICAgICAgICAgICAgICAgc3RhdGljVmlld1F1ZXJpZXM6IGZhbHNlLAogICAgICAgICAgICAgICAgc3RhdGljQ29udGVudFF1ZXJpZXM6IGZhbHNlLAogICAgICAgICAgICAgICAgcHJlT3JkZXJIb29rczogbnVsbCwKICAgICAgICAgICAgICAgIHByZU9yZGVyQ2hlY2tIb29rczogbnVsbCwKICAgICAgICAgICAgICAgIGNvbnRlbnRIb29rczogbnVsbCwKICAgICAgICAgICAgICAgIGNvbnRlbnRDaGVja0hvb2tzOiBudWxsLAogICAgICAgICAgICAgICAgdmlld0hvb2tzOiBudWxsLAogICAgICAgICAgICAgICAgdmlld0NoZWNrSG9va3M6IG51bGwsCiAgICAgICAgICAgICAgICBkZXN0cm95SG9va3M6IG51bGwsCiAgICAgICAgICAgICAgICBjbGVhbnVwOiBudWxsLAogICAgICAgICAgICAgICAgY29udGVudFF1ZXJpZXM6IG51bGwsCiAgICAgICAgICAgICAgICBjb21wb25lbnRzOiBudWxsLAogICAgICAgICAgICAgICAgZGlyZWN0aXZlUmVnaXN0cnk6IHR5cGVvZiBkaXJlY3RpdmVzID09PSAnZnVuY3Rpb24nID8gZGlyZWN0aXZlcygpIDogZGlyZWN0aXZlcywKICAgICAgICAgICAgICAgIHBpcGVSZWdpc3RyeTogdHlwZW9mIHBpcGVzID09PSAnZnVuY3Rpb24nID8gcGlwZXMoKSA6IHBpcGVzLAogICAgICAgICAgICAgICAgZmlyc3RDaGlsZDogbnVsbCwKICAgICAgICAgICAgICAgIHNjaGVtYXM6IHNjaGVtYXMsCiAgICAgICAgICAgICAgICBjb25zdHM6IGNvbnN0cywKICAgICAgICAgICAgICAgIGluY29tcGxldGVGaXJzdFBhc3M6IGZhbHNlCiAgICAgICAgICAgIH07CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gYmluZGluZ1N0YXJ0SW5kZXgKICAgICAqIEBwYXJhbSB7P30gaW5pdGlhbFZpZXdMZW5ndGgKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGNyZWF0ZVZpZXdCbHVlcHJpbnQoYmluZGluZ1N0YXJ0SW5kZXgsIGluaXRpYWxWaWV3TGVuZ3RoKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGJsdWVwcmludCA9IG5nRGV2TW9kZSA/IG5ldyBMVmlld0JsdWVwcmludCgpIDogW107CiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBpbml0aWFsVmlld0xlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgIGJsdWVwcmludC5wdXNoKGkgPCBiaW5kaW5nU3RhcnRJbmRleCA/IG51bGwgOiBOT19DSEFOR0UpOwogICAgICAgIH0KICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKGJsdWVwcmludCkpOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHRleHQKICAgICAqIEBwYXJhbSB7P30gdG9rZW4KICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGNyZWF0ZUVycm9yKHRleHQsIHRva2VuKSB7CiAgICAgICAgcmV0dXJuIG5ldyBFcnJvcihgUmVuZGVyZXI6ICR7dGV4dH0gWyR7c3RyaW5naWZ5Rm9yRXJyb3IodG9rZW4pfV1gKTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSByRWxlbWVudAogICAgICogQHBhcmFtIHs/fSBlbGVtZW50T3JTZWxlY3RvcgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gYXNzZXJ0SG9zdE5vZGVFeGlzdHMockVsZW1lbnQsIGVsZW1lbnRPclNlbGVjdG9yKSB7CiAgICAgICAgaWYgKCFyRWxlbWVudCkgewogICAgICAgICAgICBpZiAodHlwZW9mIGVsZW1lbnRPclNlbGVjdG9yID09PSAnc3R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hc3Nlc1dpdGhvdXRIb3N0OiBzdHJpbmd8bnVsbAogICAgICAgIHVuZGVmaW5lZCwgKC8qKiBAdHlwZSB7P30gKi8gKDApKSwgKC8qKiBAdHlwZSB7P30gKi8gKDApKSkgOgogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICB0eXBlOiB0eXBlLAogICAgICAgICAgICAgICAgaW5kZXg6IGFkanVzdGVkSW5kZXgsCiAgICAgICAgICAgICAgICBpbmplY3RvckluZGV4OiBpbmplY3RvckluZGV4LAogICAgICAgICAgICAgICAgZGlyZWN0aXZlU3RhcnQ6IC0xLAogICAgICAgICAgICAgICAgZGlyZWN0aXZlRW5kOiAtMSwKICAgICAgICAgICAgICAgIGRpcmVjdGl2ZVN0eWxpbmdMYXN0OiAtMSwKICAgICAgICAgICAgICAgIHByb3BlcnR5QmluZGluZ3M6IG51bGwsCiAgICAgICAgICAgICAgICBmbGFnczogMCwKICAgICAgICAgICAgICAgIHByb3ZpZGVySW5kZXhlczogMCwKICAgICAgICAgICAgICAgIHRhZ05hbWU6IHRhZ05hbWUsCiAgICAgICAgICAgICAgICBhdHRyczogYXR0cnMsCiAgICAgICAgICAgICAgICBtZXJnZWRBdHRyczogbnVsbCwKICAgICAgICAgICAgICAgIGxvY2FsTmFtZXM6IG51bGwsCiAgICAgICAgICAgICAgICBpbml0aWFsSW5wdXRzOiB1bmRlZmluZWQsCiAgICAgICAgICAgICAgICBpbnB1dHM6IG51bGwsCiAgICAgICAgICAgICAgICBvdXRwdXRzOiBudWxsLAogICAgICAgICAgICAgICAgdFZpZXdzOiBudWxsLAogICAgICAgICAgICAgICAgbmV4dDogbnVsbCwKICAgICAgICAgICAgICAgIHByb2plY3Rpb25OZXh0OiBudWxsLAogICAgICAgICAgICAgICAgY2hpbGQ6IG51bGwsCiAgICAgICAgICAgICAgICBwYXJlbnQ6IHRQYXJlbnQsCiAgICAgICAgICAgICAgICBwcm9qZWN0aW9uOiBudWxsLAogICAgICAgICAgICAgICAgc3R5bGVzOiBudWxsLAogICAgICAgICAgICAgICAgc3R5bGVzV2l0aG91dEhvc3Q6IG51bGwsCiAgICAgICAgICAgICAgICByZXNpZHVhbFN0eWxlczogdW5kZWZpbmVkLAogICAgICAgICAgICAgICAgY2xhc3NlczogbnVsbCwKICAgICAgICAgICAgICAgIGNsYXNzZXNXaXRob3V0SG9zdDogbnVsbCwKICAgICAgICAgICAgICAgIHJlc2lkdWFsQ2xhc3NlczogdW5kZWZpbmVkLAogICAgICAgICAgICAgICAgY2xhc3NCaW5kaW5nczogKC8qKiBAdHlwZSB7P30gKi8gKDApKSwKICAgICAgICAgICAgICAgIHN0eWxlQmluZGluZ3M6ICgvKiogQHR5cGUgez99ICovICgwKSksCiAgICAgICAgICAgIH07CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gaW5wdXRBbGlhc01hcAogICAgICogQHBhcmFtIHs/fSBkaXJlY3RpdmVEZWZJZHgKICAgICAqIEBwYXJhbSB7P30gcHJvcFN0b3JlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBnZW5lcmF0ZVByb3BlcnR5QWxpYXNlcyhpbnB1dEFsaWFzTWFwLCBkaXJlY3RpdmVEZWZJZHgsIHByb3BTdG9yZSkgewogICAgICAgIGZvciAobGV0IHB1YmxpY05hbWUgaW4gaW5wdXRBbGlhc01hcCkgewogICAgICAgICAgICBpZiAoaW5wdXRBbGlhc01hcC5oYXNPd25Qcm9wZXJ0eShwdWJsaWNOYW1lKSkgewogICAgICAgICAgICAgICAgcHJvcFN0b3JlID0gcHJvcFN0b3JlID09PSBudWxsID8ge30gOiBwcm9wU3RvcmU7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBpbnRlcm5hbE5hbWUgPSBpbnB1dEFsaWFzTWFwW3B1YmxpY05hbWVdOwogICAgICAgICAgICAgICAgaWYgKHByb3BTdG9yZS5oYXNPd25Qcm9wZXJ0eShwdWJsaWNOYW1lKSkgewogICAgICAgICAgICAgICAgICAgIHByb3BTdG9yZVtwdWJsaWNOYW1lXS5wdXNoKGRpcmVjdGl2ZURlZklkeCwgaW50ZXJuYWxOYW1lKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIChwcm9wU3RvcmVbcHVibGljTmFtZV0gPSBbZGlyZWN0aXZlRGVmSWR4LCBpbnRlcm5hbE5hbWVdKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gcHJvcFN0b3JlOwogICAgfQogICAgLyoqCiAgICAgKiBJbml0aWFsaXplcyBkYXRhIHN0cnVjdHVyZXMgcmVxdWlyZWQgdG8gd29yayB3aXRoIGRpcmVjdGl2ZSBvdXRwdXRzIGFuZCBvdXRwdXRzLgogICAgICogSW5pdGlhbGl6YXRpb24gaXMgZG9uZSBmb3IgYWxsIGRpcmVjdGl2ZXMgbWF0Y2hlZCBvbiBhIGdpdmVuIFROb2RlLgogICAgICogQHBhcmFtIHs/fSB0VmlldwogICAgICogQHBhcmFtIHs/fSB0Tm9kZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gaW5pdGlhbGl6ZUlucHV0QW5kT3V0cHV0QWxpYXNlcyh0VmlldywgdE5vZGUpIHsKICAgICAgICBuZ0Rldk1vZGUgJiYgYXNzZXJ0Rmlyc3RDcmVhdGVQYXNzKHRWaWV3KTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3Qgc3RhcnQgPSB0Tm9kZS5kaXJlY3RpdmVTdGFydDsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgZW5kID0gdE5vZGUuZGlyZWN0aXZlRW5kOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBkZWZzID0gdFZpZXcuZGF0YTsKICAgICAgICAvKiogQHR5cGU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09PSAnaW5uZXJIdG1sJykKICAgICAgICAgICAgcmV0dXJuICdpbm5lckhUTUwnOwogICAgICAgIGlmIChuYW1lID09PSAncmVhZG9ubHknKQogICAgICAgICAgICByZXR1cm4gJ3JlYWRPbmx5JzsKICAgICAgICBpZiAobmFtZSA9PT0gJ3RhYmluZGV4JykKICAgICAgICAgICAgcmV0dXJuICd0YWJJbmRleCc7CiAgICAgICAgcmV0dXJuIG5hbWU7CiAgICB9CiAgICAvKioKICAgICAqIEB0ZW1wbGF0ZSBUCiAgICAgKiBAcGFyYW0gez99IHRWaWV3CiAgICAgKiBAcGFyYW0gez99IHROb2RlCiAgICAgKiBAcGFyYW0gez99IGxWaWV3CiAgICAgKiBAcGFyYW0gez99IHByb3BOYW1lCiAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgKiBAcGFyYW0gez99IHJlbmRlcmVyCiAgICAgKiBAcGFyYW0gez99IHNhbml0aXplcgogICAgICogQHBhcmFtIHs/fSBuYXRpdmVPbmx5CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBlbGVtZW50UHJvcGVydHlJbnRlcm5hbCh0VmlldywgdE5vZGUsIGxWaWV3LCBwcm9wTmFtZSwgdmFsdWUsIHJlbmRlcmVyLCBzYW5pdGl6ZXIsIG5hdGl2ZU9ubHkpIHsKICAgICAgICBuZ0Rldk1vZGUgJiYgYXNzZXJ0Tm90U2FtZSh2YWx1ZSwgKC8qKiBAdHlwZSB7P30gKi8gKE5PX0NIQU5HRSkpLCAnSW5jb21pbmcgdmFsdWUgc2hvdWxkIG5ldmVyIGJlIE5PX0NIQU5HRS4nKTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgZWxlbWVudCA9ICgvKiogQHR5cGUgez99ICovIChnZXROYXRpdmVCeVROb2RlKHROb2RlLCBsVmlldykpKTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IGlucHV0RGF0YSA9IHROb2RlLmlucHV0czsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IGRhdGFWYWx1ZTsKICAgICAgICBpZiAoIW5hdGl2ZU9ubHkgJiYgaW5wdXREYXRhICE9IG51bGwgJiYgKGRhdGFWYWx1ZSA9IGlucHV0RGF0YVtwcm9wTmFtZV0pKSB7CiAgICAgICAgICAgIHNldElucHV0c0ZvclByb3BlcnR5KHRWaWV3LCBsVmlldywgZGF0YVZhbHVlLCBwcm9wTmFtZSwgdmFsdWUpOwogICAgICAgICAgICBpZiAoaXNDb21wb25lbnRIb3N0KHROb2RlKSkKICAgICAgICAgICAgICAgIG1hcmtEaXJ0eUlmT25QdXNoKGxWaWV3LCB0Tm9kZS5pbmRleCk7CiAgICAgICAgICAgIGlmIChuZ0Rldk1vZGUpIHsKICAgICAgICAgICAgICAgIHNldE5nUmVmbGVjdFByb3BlcnRpZXMobFZpZXcsIGVsZW1lbnQsIHROb2RlLnR5cGUsIGRhdGFWYWx1ZSwgdmFsdWUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYgKHROb2RlLnR5cGUgPT09IDMgLyogRWxlbWVudCAqLykgewogICAgICAgICAgICBwcm9wTmFtZSA9IG1hcFByb3BOYW1lKHByb3BOYW1lKTsKICAgICAgICAgICAgaWYgKG5nRGV2TW9kZSkgewogICAgICAgICAgICAgICAgdmFsaWRhdGVBZ2FpbnN0RXZlbnRQcm9wZXJ0aWVzKHByb3BOYW1lKTsKICAgICAgICAgICAgICAgIGlmICghdmFsaWRhdGVQcm9wZXJ0eSh0VmlldywgbFZpZXcsIGVsZW1lbnQsIHByb3BOYW1lLCB0Tm9kZSkpIHsKICAgICAgICAgICAgICAgICAgICAvLyBSZXR1cm4gaGVyZSBzaW5jZSB3ZSBvbmx5IGxvZyB3YXJuaW5ncyBmb3IgdW5rbm93biBwcm9wZXJ0aWVzLgogICAgICAgICAgICAgICAgICAgIHdhcm5BYm91dFVua25vd25Qcm9wZXJ0eShwcm9wTmFtZSwgdE5vZGUpOwogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIG5nRGV2TW9kZS5yZW5kZXJlclNldFByb3BlcnR5Kys7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gSXQgaXMgYXNzdW1lZCB0aGF0IHRoZSBzYW5pdGl6ZXIgaXMgb25seSBhZGRlZCB3aGVuIHRoZSBjb21waWxlciBkZXRlcm1pbmVzIHRoYXQgdGhlCiAgICAgICAgICAgIC8vIHByb3BlcnR5IGlzIHJpc2t5LCBzbyBzYW5pdGl6YXRpb24gY2FuIGJlIGRvbmUgd2l0aG91dCBmdXJ0aGVyIGNoZWNrcy4KICAgICAgICAgICAgdmFsdWUgPSBzYW5pdGl6ZXIgIT0gbnVsbCA/ICgoLyoqIEB0eXBlIHs/fSAqLyAoc2FuaXRpemVyKHZhbHVlLCB0Tm9kZS50YWdOYW1lIHx8ICcnLCBwcm9wTmFtZSkpKSkgOiB2YWx1ZTsKICAgICAgICAgICAgaWYgKGlzUHJvY2VkdXJhbFJlbmRlcmVyKHJlbmRlcmVyKSkgewogICAgICAgICAgICAgICAgcmVuZGVyZXIuc2V0UHJvcGVydHkoKC8qKiBAdHlwZSB7P30gKi8gKGVsZW1lbnQpKSwgcHJvcE5hbWUsIHZhbHVlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmICghaXNBbmltYXRpb25Qcm9wKHByb3BOYW1lKSkgewogICAgICAgICAgICAgICAgKCgvKiogQHR5cGUgez99ICovIChlbGVtZW50KSkpLnNldFByb3BlcnR5ID8gKCgvKiogQHR5cGUgez99ICovIChlbGVtZW50KSkpLnNldFByb3BlcnR5KHByb3BOYW1lLCB2YWx1ZSkgOgogICAgICAgICAgICAgICAgICAgICgoLyoqIEB0eXBlIHs/fSAqLyAoZWxlbWVudCkpKVtwcm9wTmFtZV0gPSB2YWx1ZTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBlbHNlIGlmICh0Tm9kZS50eXBlID09PSAwIC8qIENvbnRhaW5lciAqLykgewogICAgICAgICAgICAvLyBJZiB0aGUgbm9kZSBpcyBhIGNvbnRhaW5lciBhbmQgdGhlIHByb3BlcnR5IGRpZG4ndAogICAgICAgICAgICAvLyBtYXRjaCBhbnkgb2YgdGhlIGlucHV0cyBvciBzY2hlbWFzIHdlIHNob3VsZCB0aHJvdy4KICAgICAgICAgICAgaWYgKG5nRGV2TW9kZSAmJiAhbWF0Y2hpbmdTY2hlbWFzKHRWaWV3LCBsVmlldywgdE5vZGUudGFnTmFtZSkpIHsKICAgICAgICAgICAgICAgIHdhcm5BYm91dFVua25vd25Qcm9wZXJ0eShwcm9wTmFtZSwgdE5vZGUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBJZiBub2RlIGlzIGFuIE9uUHVzaCBjb21wb25lbnQsIG1hcmtzIGl0cyBMVmlldyBkaXJ0eS4KICAgICAqIEBwYXJhbSB7P30gbFZpZXcKICAgICAqIEBwYXJhbSB7P30gdmlld0luZGV4CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBtYXJrRGlydHlJZk9uUHVzaChsVmlldywgdmlld0luZGV4KSB7CiAgICAgICAgbmdEZXZNb2RlICYmIGFzc2VydExWaWV3KGxWaWV3KTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgY2hpbGRDb21wb25lbnRMVmlldyA9IGdldENvbXBvbmVudExWaWV3QnlJbmRleCh2aWV3SW5kZXgsIGxWaWV3KTsKICAgICAgICBpZiAoIShjaGlsZENvbXBvbmVudExWaWV3W0ZMQUdTXSAmIDE2IC8qIENoZWNrQWx3YXlzICovKSkgewogICAgICAgICAgICBjaGlsZENvbXBvbmVudExWaWV3W0ZMQUdTXSB8PSA2NCAvKiBEaXJ0eSAqLzsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgIC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SAqLyAoZWxlbWVudCkpKSwgYXR0ck5hbWUsIGRlYnVnVmFsdWUpIDoKICAgICAgICAgICAgICAgICAgICAoKC8qKiBAdHlwZSB7P30gKi8gKGVsZW1lbnQpKSkuc2V0QXR0cmlidXRlKGF0dHJOYW1lLCBkZWJ1Z1ZhbHVlKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB0ZXh0Q29udGVudCA9IGBiaW5kaW5ncz0ke0pTT04uc3RyaW5naWZ5KHsgW2F0dHJOYW1lXTogZGVidWdWYWx1ZSB9LCBudWxsLCAyKX1gOwogICAgICAgICAgICBpZiAoaXNQcm9jZWR1cmFsUmVuZGVyZXIocmVuZGVyZXIpKSB7CiAgICAgICAgICAgICAgICByZW5kZXJlci5zZXRWYWx1ZSgoKC8qKiBAdHlwZSB7P30gKi8gKGVsZW1lbnQpKSksIHRleHRDb250ZW50KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICgoLyoqIEB0eXBlIHs/fSAqLyAoZWxlbWVudCkpKS50ZXh0Q29udGVudCA9IHRleHRDb250ZW50OwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IGxWaWV3CiAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAqIEBwYXJhbSB7P30gdHlwZQogICAgICogQHBhcmFtIHs/fSBkYXRhVmFsdWUKICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHNldE5nUmVmbGVjdFByb3BlcnRpZXMobFZpZXcsIGVsZW1lbnQsIHR5cGUsIGRhdGFWYWx1ZSwgdmFsdWUpIHsKICAgICAgICBpZiAodHlwZSA9PT0gMyAvKiBFbGVtZW50ICovIHx8IHR5cGUgPT09IDAgLyogQ29udGFpbmVyICovKSB7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBkYXRhVmFsdWUgaXMgYW4gYXJyYXkgY29udGFpbmluZyBydW50aW1lIGlucHV0IG9yIG91dHB1dCBuYW1lcyBmb3IgdGhlIGRpcmVjdGl2ZXM6CiAgICAgICAgICAgICAqIGkrMDogZGlyZWN0aXZlIGluc3RhbmNlIGluZGV4CiAgICAgICAgICAgICAqIGkrMTogcHJpdmF0ZU5hbWUKICAgICAgICAgICAgICoKICAgICAgICAgICAgICogZS5nLiBbMCwgJ2NoYW5nZScsICdjaGFuZ2UtbWluaWZpZWQnXQogICAgICAgICAgICAgKiB3ZSB3YW50IHRvIHNldCB0aGUgcmVmbGVjdGVkIHByb3BlcnR5IHdpdGggdGhlIHByaXZhdGVOYW1lOiBkYXRhVmFsdWVbaSsxXQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBkYXRhVmFsdWUubGVuZ3RoOyBpICs9IDIpIHsKICAgICAgICAgICAgICAgIHNldE5nUmVmbGVjdFByb3BlcnR5KGxWaWV3LCBlbGVtZW50LCB0eXBlLCAoLyoqIEB0eXBlIHs/fSAqLyAoZGF0YVZhbHVlW2kgKyAxXSkpLCB2YWx1ZSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdFZpZXcKICAgICAqIEBwYXJhbSB7P30gbFZpZXcKICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICogQHBhcmFtIHs/fSBwcm9wTmFtZQogICAgICogQHBhcmFtIHs/fSB0Tm9kZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gdmFsaWRhdGVQcm9wZXJ0eSh0VmlldywgbFZpZXcsIGVsZW1lbnQsIHByb3BOYW1lLCB0Tm9kZSkgewogICAgICAgIC8vIElmIGBzY2hlbWFzYCBpcyBzZXQgdG8gYG51bGxg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2JqZWN0JyBzbyB3ZQogICAgICAgIC8vIG5lZWQgdG8gYWNjb3VudCBmb3IgYm90aCBoZXJlLCB3aGlsZSBiZWluZyBjYXJlZnVsIGZvciBgdHlwZW9mIG51bGxgIGFsc28gcmV0dXJuaW5nICdvYmplY3QnLgogICAgICAgIHJldHVybiB0eXBlb2YgTm9kZSA9PT0gJ3VuZGVmaW5lZCcgfHwgTm9kZSA9PT0gbnVsbCB8fCAhKGVsZW1lbnQgaW5zdGFuY2VvZiBOb2RlKTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB0VmlldwogICAgICogQHBhcmFtIHs/fSBsVmlldwogICAgICogQHBhcmFtIHs/fSB0YWdOYW1lCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBtYXRjaGluZ1NjaGVtYXModFZpZXcsIGxWaWV3LCB0YWdOYW1lKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHNjaGVtYXMgPSB0Vmlldy5zY2hlbWFzOwogICAgICAgIGlmIChzY2hlbWFzICE9PSBudWxsKSB7CiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgc2NoZW1hcy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3Qgc2NoZW1hID0gc2NoZW1hc1tpXTsKICAgICAgICAgICAgICAgIGlmIChzY2hlbWEgPT09IE5PX0VSUk9SU19TQ0hFTUEgfHwKICAgICAgICAgICAgICAgICAgICBzY2hlbWEgPT09IENVU1RPTV9FTEVNRU5UU19TQ0hFTUEgJiYgdGFnTmFtZSAmJiB0YWdOYW1lLmluZGV4T2YoJy0nKSA+IC0xKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgfQogICAgLyoqCiAgICAgKiBMb2dzIGEgd2FybmluZyB0aGF0IGEgcHJvcGVydHkgaXMgbm90IHN1cHBvcnRlZCBvbiBhbiBlbGVtZW50LgogICAgICogQHBhcmFtIHs/fSBwcm9wTmFtZSBOYW1lIG9mIHRoZSBpbnZhbGlkIHByb3BlcnR5LgogICAgICogQHBhcmFtIHs/fSB0Tm9kZSBOb2RlIG9uIHdoaWNoIHdlIGVuY291bnRlcmVkIHRoZSBwcm9wZXJ0eS4KICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHdhcm5BYm91dFVua25vd25Qcm9wZXJ0eShwcm9wTmFtZSwgdE5vZGUpIHsKICAgICAgICBjb25zb2xlLndhcm4oYENhbid0IGJpbmQgdG8gJyR7cHJvcE5hbWV9JyBzaW5jZSBpdCBpc24ndCBhIGtub3duIHByb3BlcnR5IG9mICcke3ROb2RlLnRhZ05hbWV9Jy5gKTsKICAgIH0KICAgIC8qKgogICAgICogSW5zdGFudGlhdGUgYSByb290IGNvbXBvbmVudC4KICAgICAqIEB0ZW1wbGF0ZSBUCiAgICAgKiBAcGFyYW0gez99IHRWaWV3CiAgICAgKiBAcGFyYW0gez99IGxWaWV3CiAgICAgKiBAcGFyYW0gez99IGRlZgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gaW5zdGFudGlhdGVSb290Q29tcG9uZW50KHRWaWV3LCBsVmlldywgZGVmKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHJvb3RUTm9kZSA9IGdldFByZXZpb3VzT3JQYXJlbnRUTm9kZSgpOwogICAgICAgIGlmICh0Vmlldy5maXJzdENyZWF0ZVBhc3MpIHsKICAgICAgICAgICAgaWYgKGRlZi5wcm92aWRlcnNSZXNvbHZlcikKICAgICAgICAgICAgICAgIGRlZi5wcm92aWRlcnNSZXNvbHZlcihkZWYpOwogICAgICAgICAgICBnZW5lcmF0Z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IGxhc3QgZGlyZWN0aXZlIGluIE5nTW9kdWxlLmRlY2xhcmF0aW9ucyBoYXMgcHJpb3JpdHkgb3ZlciB0aGUgcHJldmlvdXMgb25lCiAgICAgICAgICAgICAgICAvLyBTbyB0byBtYXRjaCB0aGVzZSBydWxlcywgdGhlIG9yZGVyIGluIHdoaWNoIHByb3ZpZGVycyBhcmUgYWRkZWQgaW4gdGhlIGFycmF5cyBpcyB2ZXJ5CiAgICAgICAgICAgICAgICAvLyBpbXBvcnRhbnQuCiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGRpcmVjdGl2ZURlZnMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgZGVmID0gZGlyZWN0aXZlRGVmc1tpXTsKICAgICAgICAgICAgICAgICAgICBpZiAoZGVmLnByb3ZpZGVyc1Jlc29sdmVyKQogICAgICAgICAgICAgICAgICAgICAgICBkZWYucHJvdmlkZXJzUmVzb2x2ZXIoZGVmKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGdlbmVyYXRlRXhwYW5kb0luc3RydWN0aW9uQmxvY2sodFZpZXcsIHROb2RlLCBkaXJlY3RpdmVEZWZzLmxlbmd0aCk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBsZXQgcHJlT3JkZXJIb29rc0ZvdW5kID0gZmFsc2U7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBsZXQgcHJlT3JkZXJDaGVja0hvb2tzRm91bmQgPSBmYWxzZTsKICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZGlyZWN0aXZlRGVmcy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBkZWYgPS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IGZpcnN0CiAgICAgICAgICAgICAgICAgICAgLy8gcHJlLW9yZGVyIGhvb2sgZm91bmQgb24gdGhpcyBub2RlLgogICAgICAgICAgICAgICAgICAgIGlmICghcHJlT3JkZXJIb29rc0ZvdW5kICYmIChkZWYub25DaGFuZ2VzIHx8IGRlZi5vbkluaXQgfHwgZGVmLmRvQ2hlY2spKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFdlIHdpbGwgcHVzaCB0aGUgYWN0dWFsIGhvb2sgZnVuY3Rpb24gaW50byB0aGlzIGFycmF5IGxhdGVyIGR1cmluZyBkaXIgaW5zdGFudGlhdGlvbi4KICAgICAgICAgICAgICAgICAgICAgICAgLy8gV2UgY2Fubm90IGRvIGl0IG5vdyBiZWNhdXNlIHdlIG11c3QgZW5zdXJlIGhvb2tzIGFyZSByZWdpc3RlcmVkIGluIHRoZSBzYW1lCiAgICAgICAgICAgICAgICAgICAgICAgIC8vIG9yZGVyIHRoYXQgZGlyZWN0aXZlcyBhcmUgY3JlYXRlZCAoaS5lLiBpbmplY3Rpb24gb3JkZXIpLgogICAgICAgICAgICAgICAgICAgICAgICAodFZpZXcucHJlT3JkZXJIb29rcyB8fCAodFZpZXcucHJlT3JkZXJIb29rcyA9IFtdKSkucHVzaCh0Tm9kZS5pbmRleCAtIEhFQURFUl9PRkZTRVQpOwogICAgICAgICAgICAgICAgICAgICAgICBwcmVPcmRlckhvb2tzRm91bmQgPSB0cnVlOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBpZiAoIXByZU9yZGVyQ2hlY2tIb29rc0ZvdW5kICYmIChkZWYub25DaGFuZ2VzIHx8IGRlZi5kb0NoZWNrKSkgewogICAgICAgICAgICAgICAgICAgICAgICAodFZpZXcucHJlT3JkZXJDaGVja0hvb2tzIHx8ICh0Vmlldy5wcmVPcmRlckNoZWNrSG9va3MgPSBbXSkpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAucHVzaCh0Tm9kZS5pbmRleCAtIEhFQURFUl9PRkZTRVQpOwogICAgICAgICAgICAgICAgICAgICAgICBwcmVPcmRlckNoZWNrSG9va3NGb3VuZCA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGFkZEhvc3RCaW5kaW5nc1RvRXhwYW5kb0luc3RydWN0aW9ucyh0VmlldywgZGVmKTsKICAgICAgICAgICAgICAgICAgICB0b3RhbERpcmVjdGl2ZUhvc3RWYXJzICs9IGRlZi5ob3N0VmFyczsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGluaXRpYWxpemVJbnB1dEFuZE91dHB1dEFsaWFzZXModFZpZXcsIHROb2RlKTsKICAgICAgICAgICAgICAgIGdyb3dIb3N0VmFyc1NwYWNlKHRWaWV3LCBsVmlldywgdG90YWxEaXJlY3RpdmVIb3N0VmFycyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGV4cG9ydHNNYXApCiAgICAgICAgICAgICAgICBjYWNoZU1hdGNoaW5nTG9jYWxOYW1lcyh0Tm9kZSwgbG9jYWxSZWZzLCBleHBvcnRzTWFwKTsKICAgICAgICB9CiAgICAgICAgLy8gTWVyZ2UgdGhlIHRlbXBsYXRlIGF0dHJzIGxhc3Qgc28gdGhhdCB0aGV5IGhhdmUgdGhlIGhpZ2hlc3QgcHJpb3JpdHkuCiAgICAgICAgdE5vZGUubWVyZ2VkQXR0cnMgPSBtZXJnZUhvc3RBdHRycyh0Tm9kZS5tZXJnZWRBdHRycywgdE5vZGUuYXR0cnMpOwogICAgICAgIHJldHVybiBoYXNEaXJlY3RpdmVzOwogICAgfQogICAgLyoqCiAgICAgKiBBZGQgYGhvc3RCaW5kaW5nc2AgdG8gdGhlIGBUVmlldy5leHBhbmRvSW5zdHJ1Y3Rpb25zYC4KICAgICAqCiAgICAgKiBAcGFyYW0gez99IHRWaWV3IGBUVmlld2AgdG8gd2hpY2ggdGhlIGBob3N0QmluZGluZ3NgIHNob3VsZCBiZSB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ogICAgICAgIGNvbnN0IGVuZCA9IHROb2RlLmRpcmVjdGl2ZUVuZDsKICAgICAgICBpZiAoIXRWaWV3LmZpcnN0Q3JlYXRlUGFzcykgewogICAgICAgICAgICBnZXRPckNyZWF0ZU5vZGVJbmplY3RvckZvck5vZGUodE5vZGUsIGxWaWV3KTsKICAgICAgICB9CiAgICAgICAgYXR0YWNoUGF0Y2hEYXRhKG5hdGl2ZSwgbFZpZXcpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBpbml0aWFsSW5wdXRzID0gdE5vZGUuaW5pdGlhbElucHV0czsKICAgICAgICBmb3IgKGxldCBpID0gc3RhcnQ7IGkgPCBlbmQ7IGkrKykgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGRlZiA9ICgvKiogQHR5cGUgez99ICovICh0Vmlldy5kYXRhW2ldKSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaXNDb21wb25lbnQgPSBpc0NvbXBvbmVudERlZihkZWYpOwogICAgICAgICAgICBpZiAoaXNDb21wb25lbnQpIHsKICAgICAgICAgICAgICAgIG5nRGV2TW9kZSAmJiBhc3NlcnROb2RlT2ZQb3NzaWJsZVR5cGVzKHROb2RlLCAzIC8qIEVsZW1lbnQgKi8pOwogICAgICAgICAgICAgICAgYWRkQ29tcG9uZW50TG9naWMobFZpZXcsICgvKiogQHR5cGUgez99ICovICh0Tm9kZSkpLCAoLyoqIEB0eXBlIHs/fSAqLyAoZGVmKSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZGlyZWN0aXZlID0gZ2V0Tm9kZUluamVjdGFibGUobFZpZXcsIHRWaWV3LCBpLCB0Tm9kZSk7CiAgICAgICAgICAgIGF0dGFjaFBhdGNoRGF0YShkaXJlY3RpdmUsIGxWaWV3KTsKICAgICAgICAgICAgaWYgKGluaXRpYWxJbnB1dHMgIT09IG51bGwpIHsKICAgICAgICAgICAgICAgIHNldElucHV0c0Zyb21BdHRycyhsVmlldywgaSAtIHN0YXJ0LCBkaXJlY3RpdmUsIGRlZiwgdE5vZGUsICgvKiogQHR5cGUgez99ICovIChpbml0aWFsSW5wdXRzKSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChpc0NvbXBvbmVudCkgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgY29tcG9uZW50VmlldyA9IGdldENvbXBvbmVudExWaWV3QnlJbmRleCh0Tm9kZS5pbmRleCwgbFZpZXcpOwogICAgICAgICAgICAgICAgY29tcG9uZW50Vmlld1tDT05URVhUXSA9IGRpcmVjdGl2ZTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB0VmlldwogICAgICogQHBhcmFtIHs/fSBsVmlldwogICAgICogQHBhcmFtIHs/fSB0Tm9kZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gaW52b2tlRGlyZWN0aXZlc0hvc3RCaW5kaW5ncyh0VmlldywgbFZpZXcsIHROb2RlKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHN0YXJ0ID0gdE5vZGUuZGlyZWN0aXZlU3RhcnQ7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGVuZCA9IHROb2RlLmRpcmVjdGl2ZUVuZDsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgZXhwYW5kbyA9ICgvKiogQHR5cGUgez99ICovICh0Vmlldy5leHBhbmRvSW5zdHJ1Y3Rpb25zKSk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGZpcnN0Q3JlYXRlUGFzcyA9IHRWaWV3LmZpcnN0Q3JlYXRlUGFzczsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgZWxlbWVudEluZGV4ID0gdE5vZGUuaW5kZXggLSBIRUFERVJfT0ZGU0VUOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBjdXJyZW50RGlyZWN0aXZlSW5kZXggPSBnZXRDdXJyZW50RGlyZWN0aXZlSW5kZXgoKTsKICAgICAgICB0cnkgewogICAgICAgICAgICBzZXRTZWxlY3RlZEluZGV4KGVsZW1lbnRJbmRleCk7CiAgICAgICAgICAgIGZvciAobGV0IGRpckluZGV4ID0gc3RhcnQ7IGRpckluZGV4IDwgZW5kOyBkaXJJbmRleCsrKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBkZWYgPSAoLyoqIEB0eXBlIHs/fSAqLyAodFZpZXcuZGF0YVtkaXJJbmRleF0pKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGRpcmVjdGl2ZSA9IGxWaWV3W2RpckluZGV4XTsKICAgICAgICAgICAgICAgIHNldEN1cnJlbnREaXJlY3RpdmVJbmRleChkaXJJbmRleCk7CiAgICAgICAgICAgICAgICBpZiAoZGVmLmhvc3RCaW5kaW5ncyAhPT0gbnVsbCB8fCBkZWYuaG9zdFZhcnMgIT09IDAgfHwgZGVmLmhvc3RBdHRycyAhPT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIGludm9rZUhvc3RCaW5kaW5nc0luQ3JlYXRpb25Nb2RlKGRlZiwgZGlyZWN0aXZlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKGZpcnN0Q3JlYXRlUGFzcykgewogICAgICAgICAgICAgICAgICAgIGV4cGFuZG8ucHVzaChudWxsKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICA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/fSAqLwogICAgICAgIGxldCBtYXRjaGVzID0gbnVsbDsKICAgICAgICBpZiAocmVnaXN0cnkpIHsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCByZWdpc3RyeS5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZGVmID0gKC8qKiBAdHlwZSB7P30gKi8gKHJlZ2lzdHJ5W2ldKSk7CiAgICAgICAgICAgICAgICBpZiAoaXNOb2RlTWF0Y2hpbmdTZWxlY3Rvckxpc3QodE5vZGUsICgvKiogQHR5cGUgez99ICovIChkZWYuc2VsZWN0b3JzKSksIC8qIGlzUHJvamVjdGlvbk1vZGUgKi8gZmFsc2UpKSB7CiAgICAgICAgICAgICAgICAgICAgbWF0Y2hlcyB8fCAobWF0Y2hlcyA9IG5nRGV2TW9kZSA/IG5ldyBNYXRjaGVzQXJyYXkoKSA6IFtdKTsKICAgICAgICAgICAgICAgICAgICBkaVB1YmxpY0luSW5qZWN0b3IoZ2V0T3JDcmVhdGVOb2RlSW5qZWN0b3JGb3JOb2RlKHROb2RlLCB2aWV3RGF0YSksIHRWaWV3LCBkZWYudHlwZSk7CiAgICAgICAgICAgICAgICAgICAgaWYgKGlzQ29tcG9uZW50RGVmKGRlZikpIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHROb2RlLmZsYWdzICYgMiAvKiBpc0NvbXBvbmVudEhvc3QgKi8pCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvd011bHRpcGxlQ29tcG9uZW50RXJyb3IodE5vZGUpOwogICAgICAgICAgICAgICAgICAgICAgICBtYXJrQXNDb21wb25lbnRIb3N0KHRWaWV3LCB0Tm9kZSk7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFRoZSBjb21wb25lbnQgaXMgYWx3YXlzIHN0b3JlZCBmaXJzdCB3aXRoIGRpcmVjdGl2ZXMgYWZ0ZXIuCiAgICAgICAgICAgICAgICAgICAgICAgIG1hdGNoZXMudW5zaGlmdChkZWYpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgbWF0Y2hlcy5wdXNoKGRlZik7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiBtYXRjaGVzOwogICAgfQogICAgLyoqCiAgICAgKiBNYXJrcyBhIGdpdmVuIFROb2RlIGFzIGEgY29tcG9uZW50J3MgaG9zdC4gVGhpcyBjb25zaXN0cyBvZjoKICAgICAqIC0gc2V0dGluZyBhcHByb3ByaWF0ZSBUTm9kZSBmbGFnczsKICAgICAqIC0gc3RvcmluZyBpbmRleCBvZiBjb21wb25lbnQncyBob3N0IGVsZW1lbnQgc28gaXQgd2lsbCBiZSBxdWV1ZWQgZm9yIHZpZXcgcmVmcmVzaCBkdXJpbmcgQ0QuCiAgICAgKiBAcGFyYW0gez99IHRWaWV3CiAgICAgKiBAcGFyYW0gez99IGhvc3RUTm9kZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gbWFya0FzQ29tcG9uZW50SG9zdCh0VmlldywgaG9zdFROb2RlKSB7CiAgICAgICAgbmdEZXZNb2RlICYmIGFzc2VydEZpcnN0Q3JlYXRlUGFzcyh0Vmlldyk7CiAgICAgICAgaG9zdFROb2RlLmZsYWdzIHw9IDIgLyogaXNDb21wb25lbnRIb3N0ICovOwogICAgICAgICh0Vmlldy5jb21wb25lbnRzIHx8ICh0Vmlldy5jb21wb25lbnRzID0gbmdEZXZNb2RlID8gbmV3IFRWaWV3Q29tcG9uZW50cygpIDogW10pKQogICAgICAgICAgICAucHVzaChob3N0VE5vZGUuaW5kZXgpOwogICAgfQogICAgLyoqCiAgICAgKiBDYWNoZXMgbG9jYWwgbmFtZXMgYW5kIHRoZWlyIG1hdGNoaW5nIGRpcmV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BFcnJvcihgRXhwb3J0IG9mIG5hbWUgJyR7bG9jYWxSZWZzW2kgKyAxXX0nIG5vdCBmb3VuZCFgKTsKICAgICAgICAgICAgICAgIGxvY2FsTmFtZXMucHVzaChsb2NhbFJlZnNbaV0sIGluZGV4KTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQnVpbGRzIHVwIGFuIGV4cG9ydCBtYXAgYXMgZGlyZWN0aXZlcyBhcmUgY3JlYXRlZCwgc28gbG9jYWwgcmVmcyBjYW4gYmUgcXVpY2tseSBtYXBwZWQKICAgICAqIHRvIHRoZWlyIGRpcmVjdGl2ZSBpbnN0YW5jZXMuCiAgICAgKiBAcGFyYW0gez99IGluZGV4CiAgICAgKiBAcGFyYW0gez99IGRlZgogICAgICogQHBhcmFtIHs/fSBleHBvcnRzTWFwCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBzYXZlTmFtZVRvRXhwb3J0TWFwKGluZGV4LCBkZWYsIGV4cG9ydHNNYXApIHsKICAgICAgICBpZiAoZXhwb3J0c01hcCkgewogICAgICAgICAgICBpZiAoZGVmLmV4cG9ydEFzKSB7CiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGRlZi5leHBvcnRBcy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgICAgIGV4cG9ydHNNYXBbZGVmLmV4cG9ydEFzW2ldXSA9IGluZGV4OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChpc0NvbXBvbmVudERlZihkZWYpKQogICAgICAgICAgICAgICAgZXhwb3J0c01hcFsnJ10gPSBpbmRleDsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEluaXRpYWxpemVzIHRoZSBmbGFncyBvbiB0aGUgY3VycmVudCBub2RlLCBzZXR0aW5nIGFsbCBpbmRpY2VzIHRvIHRoZSBpbml0aWFsIGluZGV4LAogICAgICogdGhlI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mlldywgdmlld0RhdGEsIGRlZikgewogICAgICAgIHRWaWV3LmRhdGEucHVzaChkZWYpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBkaXJlY3RpdmVGYWN0b3J5ID0gZGVmLmZhY3RvcnkgfHwgKCgoLyoqIEB0eXBlIHs/fSAqLyAoZGVmKSkpLmZhY3RvcnkgPSBnZXRGYWN0b3J5RGVmKGRlZi50eXBlLCB0cnVlKSk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IG5vZGVJbmplY3RvckZhY3RvcnkgPSBuZXcgTm9kZUluamVjdG9yRmFjdG9yeShkaXJlY3RpdmVGYWN0b3J5LCBpc0NvbXBvbmVudERlZihkZWYpLCBudWxsKTsKICAgICAgICB0Vmlldy5ibHVlcHJpbnQucHVzaChub2RlSW5qZWN0b3JGYWN0b3J5KTsKICAgICAgICB2aWV3RGF0YS5wdXNoKG5vZGVJbmplY3RvckZhY3RvcnkpOwogICAgfQogICAgLyoqCiAgICAgKiBAdGVtcGxhdGUgVAogICAgICogQHBhcmFtIHs/fSBsVmlldwogICAgICogQHBhcmFtIHs/fSBob3N0VE5vZGUKICAgICAqIEBwYXJhbSB7P30gZGVmCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBhZGRDb21wb25lbnRMb2dpYyhsVmlldywgaG9zdFROb2RlLCBkZWYpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgbmF0aXZlID0gKC8qKiBAdHlwZSB7P30gKi8gKGdldE5hdGl2ZUJ5VE5vZGUoaG9zdFROb2RlLCBsVmlldykpKTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgdFZpZXcgPSBnZXRPckNyZWF0ZVRDb21wb25lbnRWaWV3KGRlZik7CiAgICAgICAgLy8gT25seSBjb21wb25lbnQgdmlld3Mgc2hvdWxkIGJlIGFkZGVkIHRvIHR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ZSBkaXJlY3RpdmUgZGVmIHRoYXQgY29udGFpbnMgdGhlIGxpc3Qgb2YgaW5wdXRzCiAgICAgKiBAcGFyYW0gez99IHROb2RlIFRoZSBzdGF0aWMgZGF0YSBmb3IgdGhpcyBub2RlCiAgICAgKiBAcGFyYW0gez99IGluaXRpYWxJbnB1dERhdGEKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHNldElucHV0c0Zyb21BdHRycyhsVmlldywgZGlyZWN0aXZlSW5kZXgsIGluc3RhbmNlLCBkZWYsIHROb2RlLCBpbml0aWFsSW5wdXREYXRhKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGluaXRpYWxJbnB1dHMgPSAoLyoqIEB0eXBlIHs/fSAqLyAoaW5pdGlhbElucHV0RGF0YSkpW2RpcmVjdGl2ZUluZGV4XTsKICAgICAgICBpZiAoaW5pdGlhbElucHV0cyAhPT0gbnVsbCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHNldElucHV0ID0gZGVmLnNldElucHV0OwogICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGluaXRpYWxJbnB1dHMubGVuZ3RoOykgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgcHVibGljTmFtZSA9IGluaXRpYWxJbnB1dHNbaSsrXTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHByaXZhdGVOYW1lID0gaW5pdGlhbElucHV0c1tpKytdOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgdmFsdWUgPSBpbml0aWFsSW5wdXRzW2krK107CiAgICAgICAgICAgICAgICBpZiAoc2V0SW5wdXQgIT09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICAoLyoqIEB0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9uLiBXZSBuZWVkIHRoaXMgYXJyYXkgdG8gc3VwcG9ydAogICAgICogdGhlIGNhc2Ugd2hlcmUgeW91IHNldCBhbiBcQElucHV0IHByb3BlcnR5IG9mIGEgZGlyZWN0aXZlIHVzaW5nIGF0dHJpYnV0ZS1saWtlIHN5bnRheC4KICAgICAqIGUuZy4gaWYgeW91IGhhdmUgYSBgbmFtZWAgXEBJbnB1dCwgeW91IGNhbiBzZXQgaXQgb25jZSBsaWtlIHRoaXM6CiAgICAgKgogICAgICogPG15LWNvbXBvbmVudCBuYW1lPSJCZXNzIj48L215LWNvbXBvbmVudD4KICAgICAqCiAgICAgKiBAcGFyYW0gez99IGlucHV0cyBUaGUgbGlzdCBvZiBpbnB1dHMgZnJvbSB0aGUgZGlyZWN0aXZlIGRlZgogICAgICogQHBhcmFtIHs/fSBhdHRycyBUaGUgc3RhdGljIGF0dHJzIG9uIHRoaXMgbm9kZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2VuZXJhdGVJbml0aWFsSW5wdXRzKGlucHV0cywgYXR0cnMpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IGlucHV0c1RvU3RvcmUgPSBudWxsOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgaSA9IDA7CiAgICAgICAgd2hpbGUgKGkgPCBhdHRycy5sZW5ndGgpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBhdHRyTmFtZSA9IGF0dHJzW2ldOwogICAgICAgICAgICBpZiAoYXR0ck5hbWUgPT09IDAgLyogTmFtZXNwYWNlVVJJICovKSB7CiAgICAgICAgICAgICAgICAvLyBXZSBkbyBub3QgYWxsb3cgaW5wdXRzIG9uIG5hbWVzcGFjZWQgYXR0cmlidXRlcy4KICAgICAgICAgICAgICAgIGkgKz0gNDsKICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKGF0dHJOYW1lID09PSA1IC8qIFByb2plY3RBcyAqLykgewogICAgICAgICAgICAgICAgLy8gU2tpcCBvdmVyIHRoZSBgbmdQcm9qZWN0QXNgIHZhbHVlLgogICAgICAgICAgICAgICAgaSArPSAyOwogICAgICAgICAgICAgICAgY29udGludWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gSWYgd2UgaGl0IGFueSBvdGhlciBhdHRyaWJ1dGUgbWFya2Vycywgd2UncmUgZG9uZSBhbnl3YXkuIE5vbmUgb2YgdGhvc2UgYXJlIHZhbGlkIGlucHV0cy4KICAgICAgICAgICAgaWYgKHR5cGVvZiBhdHRyTmFtZSA9PT0gJ251bWJlcicpCiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgaWYgKGlucHV0cy5oYXNPd25Qcm9wZXJ0eSgoLyoqIEB0eXBlIHs/fSAqLyAoYXR0ck5hbWUpKSkpIHsKICAgICAgICAgICAgICAgIGlmIChpbnB1dHNUb1N0b3JlID09PSBudWxsKQogICAgICAgICAgICAgICAgICAgIGlucHV0c1RvU3RvcmUgPSBbXTsKICAgICAgICAgICAgICAgIGlucHV0c1RvU3RvcmUucHVzaCgoLyoqIEB0eXBlIHs/fSAqLyAoYXR0ck5hbWUpKSwgaW5wdXRzWygvKiogQHR5cGUgez99ICovIChhdHRyTmFtZSkpXSwgKC8qKiBAdHlwZSB7P30gKi8gKGF0dHJzW2kgKyAxXSkpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpICs9IDI7CiAgICAgICAgfQogICAgICAgIHJldHVybiBpbnB1dHNUb1N0b3JlOwogICAgfQogICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8KICAgIC8vLy8gVmlld0NvbnRhaW5lciAmIFZpZXcKICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vCiAgICAvLyBOb3Qgc3VyZSB3aHkgSSBuZWVkIHRvIGRvIGBhbnl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aW9uLgogICAgICogQHBhcmFtIHs/fSBsVmlldwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gcmVmcmVzaEVtYmVkZGVkVmlld3MobFZpZXcpIHsKICAgICAgICBmb3IgKGxldCBsQ29udGFpbmVyID0gZ2V0Rmlyc3RMQ29udGFpbmVyKGxWaWV3KTsgbENvbnRhaW5lciAhPT0gbnVsbDsgbENvbnRhaW5lciA9IGdldE5leHRMQ29udGFpbmVyKGxDb250YWluZXIpKSB7CiAgICAgICAgICAgIGZvciAobGV0IGkgPSBDT05UQUlORVJfSEVBREVSX09GRlNFVDsgaSA8IGxDb250YWluZXIubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGVtYmVkZGVkTFZpZXcgPSBsQ29udGFpbmVyW2ldOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZW1iZWRkZWRUVmlldyA9IGVtYmVkZGVkTFZpZXdbVFZJRVddOwogICAgICAgICAgICAgICAgbmdEZXZNb2RlICYmIGFzc2VydERlZmluZWQoZW1iZWRkZWRUVmlldywgJ1RWaWV3IG11c3QgYmUgYWxsb2NhdGVkJyk7CiAgICAgICAgICAgICAgICBpZiAodmlld0F0dGFjaGVkVG9DaGFuZ2VEZXRlY3RvcihlbWJlZGRlZExWaWV3KSkgewogICAgICAgICAgICAgICAgICAgIHJlZnJlc2hWaWV3KGVtYmVkZGVkVFZpZXcsIGVtYmVkZGVkTFZpZXcsIGVtYmVkZGVkVFZpZXcudGVtcGxhdGUsICgvKiogQHR5cGUgez99ICovIChlbWJlZGRlZExWaWV3W0NPTlRFWFRdKSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBNYXJrIHRyYW5zcGxhbnRlZCB2aWV3cyBhcyBuZWVkaW5nIHRvIGJlIHJlZnJlc2hlZCBhdCB0aGVpciBpbnNlcnRpb24gcG9pbnRzLgogICAgICoKICAgICAqIEBwYXJhbSB7P30gbFZpZXcgVGhlIGBMVmlld2AgdGhhdCBtYXkgaGF2ZSB0cmFuc3BsYW50ZWQgdmlld3MuCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBtYXJrVHJhbnNwbGFudGVkVmlld3NGb3JSZWZyZXNoKGxWaWV3KSB7CiAgICAgICAgZm9yIChsZXQgbENvbnRhaW5lciA9IGdldEZpcnN0TENvbnRhaW5lcihsVmlldyk7IGxDb250YWluZXIgIT09IG51bGw7IGxDb250YWluZXIgPSBnZXROZXh0TENvbnRhaW5lcihsQ29udGFpbmVyKSkgewogICAgICAgICAgICBpZiAoIWxDb250YWluZXJbSEFTX1RSQU5TUExBTlRFRF9WSUVXU10pCiAgICAgICAgICAgICAgICBjb250aW51ZTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBtb3ZlZFZpZXdzID0gKC8qKiBAdHlwZSB7P30gKi8gKGxDb250YWluZXJbTU9WRURfVklFV1NdKSk7CiAgICAgICAgICAgIG5nRGV2TW9kZSAmJiBhc3NlcnREZWZpbmVkKG1vdmVkVmlld3MsICdUcmFuc3BsYW50ZWQgVmlldyBmbGFncyBzZXQgYnV0IG1pc3NpbmcgTU9WRURfVklFV1MnKTsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBtb3ZlZFZpZXdzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBtb3ZlZExWaWV3ID0gKC8qKiBAdHlwZSB7P30gKi8gKG1vdmVkVmlld3NbaV0pKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGluc2VydGlvbkxDb250YWluZXIgPS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VXXTsKICAgICAgICAgICAgaWYgKGNvbXBvbmVudFZpZXdbRkxBR1NdICYgKDE2IC8qIENoZWNrQWx3YXlzICovIHwgNjQgLyogRGlydHkgKi8pKSB7CiAgICAgICAgICAgICAgICByZWZyZXNoVmlldyh0VmlldywgY29tcG9uZW50VmlldywgdFZpZXcudGVtcGxhdGUsIGNvbXBvbmVudFZpZXdbQ09OVEVYVF0pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKGNvbXBvbmVudFZpZXdbVFJBTlNQTEFOVEVEX1ZJRVdTX1RPX1JFRlJFU0hdID4gMCkgewogICAgICAgICAgICAgICAgLy8gT25seSBhdHRhY2hlZCBjb21wb25lbnRzIHRoYXQgYXJlIENoZWNrQWx3YXlzIG9yIE9uUHVzaCBhbmQgZGlydHkgc2hvdWxkIGJlIHJlZnJlc2hlZAogICAgICAgICAgICAgICAgcmVmcmVzaENvbnRhaW5zRGlydHlWaWV3KGNvbXBvbmVudFZpZXcpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBSZWZyZXNoZXMgYWxsIHRyYW5zcGxhbnRlZCB2aWV3cyBtYXJrZWQgd2l0aCBgTFZpZXdGbGFncy5SZWZyZXNoVHJhbnNwbGFudGVkVmlld2AgdGhhdCBhcmUKICAgICAqIGNoaWxkcmVuIG9yIGRlc2NlbmRhbnRzIG9mIHRoZSBnaXZlbiBsVmlldy4KICAgICAqCiAgICAgKiBAcGFyYW0gez99IGxWaWV3IFRoZSBsVmlldyB3aGljaCBjb250YWlucyBkZXNjZW5kYW50IHRyYW5zcGxhbnRlZCB2aWV3cyB0aGF0IG5lZWQgdG8gYmUgcmVmcmVzaGVkLgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gcmVmcmVzaENvbnRhaW5zRGlydHlWaWV3KGxWaWV3KSB7CiAgICAgICAgZm9yIChsZXQgbENvbnRhaW5lciA9IGdldEZpcnN0TENvbnRhaW5lcihsVmlldyk7IGxDb250YWluZXIgIT09IG51bGw7IGxDb250YWluZXIgPSBnZXROZXh0TENvbnRhaW5lcihsQ29udGFpbmVyKSkgewogICAgICAgICAgICBmb3IgKGxldCBpID0gQ09OVEFJTkVSX0hFQURFUl9PRkZTRVQ7IGkgPCBsQ29udGFpbmVyLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBlbWJlZGRlZExWaWV3ID0gbENvbnRhaW5lcltpXTsKICAgICAgICAgICAgICAgIGlmIChlbWJlZGRlZExWaWV3W0ZMQUdTXSAmIDEwMjQgLyogUmVmcmVzaFRyYW5zcGxhbnRlZFZpZXcgKi8pIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgZW1iZWRkZWRUVmlldyA9IGVtYmVkZGVkTFZpZXdbVFZJRVddOwogICAgICAgICAgICAgICAgICAgIG5nRGV2TW9kZSAmJiBhc3NlcnREZWZpbmVkKGVtYmVkZGVkVFZpZXcsICdUVmlldyBtdXN0IGJlIGFsbG9jYXRlZCcpOwogICAgICAgICAgICAgICAgICAgIHJlZnJlc2hWaWV3KGVtYmVkZGVkVFZpZXcsIGVtYmVkZGVkTFZpZXcsIGVtYmVkZGVkVFZpZXcudGVtcGxhdGUsICgvKiogQHR5cGUgez99ICovIChlbWJlZGRlZExWaWV3W0NPTlRFWFRdKSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAoZW1iZWRkZWRMVmlld1tUUkFOU1BMQU5URURfVklFV1NfVE9fUkVGUkVTSF0gPiAwKSB7CiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaENvbnRhaW5zRGlydHlWaWV3KGVtYmVkZGVkTFZpZXcpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCB0VmlldyA9IGxWaWV3W1RWSUVXXTsKICAgICAgICAvLyBSZWZyZXNoIGNoaWxkIGNvbXBvbmVudCB2aWV3cy4KICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgY29tcG9uZW50cyA9IHRWaWV3LmNvbXBvbmVudHM7CiAgICAgICAgaWYgKGNvbXBvbmVudHMgIT09IG51bGwpIHsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBjb21wb25lbnRzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBjb21wb25lbnRWaWV3ID0gZ2V0Q29tcG9uZW50TFZpZXdCeUluZGV4KGNvbXBvbmVudHNbaV0sIGxWaWV3KTsKICAgICAgICAgICAgICAgIC8vIE9ubHkgYXR0YWNoZWQgY29tcG9uZW50cyB0aGF0IGFyZSBDaGVja0Fsd2F5cyBvciBPblB1c2ggYW5kIGRpcnR5IHNob3VsZCBiZSByZWZyZXNoZWQKICAgICAgICAgICAgICAgIGlmICh2aWV3QXR0YWNoZWRUb0NoYW5nZURldGVjdG9yKGNvbXBvbmVudFZpZXcpICYmCiAgICAgICAgICAgICAgICAgICAgY29tcG9uZW50Vmlld1tUUkFOU1BMQU5URURfVklFV1NfVE9fUkVGUkVTSF0gPiAwKSB7CiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaENvbnRhaW5zRGlydHlWaWV3KGNvbXBvbmVudFZpZXcpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IGhvc3RMVmlldwogICAgICogQHBhcmFtIHs/fSBjb21wb25lbnRIb3N0SWR4CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiByZW5kZXJDb21wb25lbnQoaG9zdExWaWV3LCBjb21wb25lbnRIb3N0SWR4KSB7CiAgICAgICAgbmdEZXZNb2RlICYmIGFzc2VydEVxdWFsKGlzQ3JlYXRpb25Nb2RlKGhvc3RMVmlldyksIHRydWUsICdTaG91bGQgYmUgcnVuIGluIGNyZWF0aW9uIG1vZGUnKTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgY29tcG9uZW50VmlldyA9IGdldENvbXBvbmVudExWaWV3QnlJbmRleChjb21wb25lbnRIb3N0SWR4LCBob3N0TFZpZXcpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBjb21wb25lbnRUVmlldyA9IGNvbXBvbmVudFZpZXdbVFZJRVddOwogICAgICAgIHN5bmNWaWV3V2l0aEJsdWVwcmludChjb21wb25lbnRUVmlldywgY29tcG9uZW50Vmlldyk7CiAgICAgICAgcmVuZGVyVmlldyhjb21wb25lbnRUVmlldywgY29tcG9uZW50VmlldywgY29tcG9uZW50Vmlld1tDT05URVhUXSk7CiAgICB9CiAgICAvKioKICAgICAqIFN5bmNzIGFuIExWaWV3IGluc3RhbmNlIHdpdGggaXRzIGJsdWVwcmludCBpZiB0aGV5IGhhdmUgZ290dGVuIG91dCBvZiBzeW5jLgogICAgICoKICAgICAqIFR5cGljYWxseSwgYmx1ZXByaW50cyBhbmQgdGhlaXIgdmlldyBpbnN0YW5jZXMgc2hvdWxkIGFsd2F5cyBiZSBpbiBzeW5jLCBzbyB0aGUgbG9vcCBoZXJlCiAgICAgKiB3aWxsIGJlIHNraXBwZWQuIEhvd2V2ZXIsIGNvbnNpZGVyIHRoaXMgY2FzZSBvZiB0d28gY29tcG9uZW50cyBzaWRlLWJ5LXNpZGU6CiAgICAgKgogICAgICogQXBwIHRlbXBsYXRlOgogICAgICogYGBgCiAgICAgKiA8Y29tcD48L2NvbXA+CiAgICAgKiA8Y29tcD48L2NvbXA+CiAgICAgKiBgYGAKICAgICAqCiAgICAgKiBUaGUgZm9sbG93aW5nIHdpbGwgaGFwcGVuOgogICAgICog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AgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHJlczsKICAgICAgICAgICAgcm9vdENvbnRleHQuY2xlYW4gPSBuZXcgUHJvbWlzZSgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHIpID0+IHJlcyA9IHIpKTsKICAgICAgICAgICAgcm9vdENvbnRleHQuc2NoZWR1bGVyKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIGlmIChyb290Q29udGV4dC5mbGFncyAmIDEgLyogRGV0ZWN0Q2hhbmdlcyAqLykgewogICAgICAgICAgICAgICAgICAgIHJvb3RDb250ZXh0LmZsYWdzICY9IH4xIC8qIERldGVjdENoYW5nZXMgKi87CiAgICAgICAgICAgICAgICAgICAgdGlja1Jvb3RDb250ZXh0KHJvb3RDb250ZXh0KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChyb290Q29udGV4dC5mbGFncyAmIDIgLyogRmx1c2hQbGF5ZXJzICovKSB7CiAgICAgICAgICAgICAgICAgICAgcm9vdENvbnRleHQuZmxhZ3MgJj0gfjIgLyogRmx1c2hQbGF5ZXJzICovOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBwbGF5ZXJIYW5kbGVyID0gcm9vdENvbnRleHQucGxheWVySGFuZGxlcjsKICAgICAgICAgICAgICAgICAgICBpZiAocGxheWVySGFuZGxlcikgewogICAgICAgICAgICAgICAgICAgICAgICBwbGF5ZXJIYW5kbGVyLmZsdXNoUGxheWVycygpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJvb3RDb250ZXh0LmNsZWFuID0gX0NMRUFOX1BST01JU0U7CiAgICAgICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAocmVzKSkobnVsbCk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gcm9vdENvbnRleHQKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHRpY2tSb290Q29udGV4dChyb290Q29udGV4dCkgewogICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgcm9vdENvbnRleHQuY29tcG9uZW50cy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHJvb3RDb21wb25lbnQgPSByb290Q29udGV4dC5jb21wb25lbnRzW2ldOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGxWaWV3ID0gKC8qKiBAdHlwZSB7P30gKi8gKHJlYWRQYXRjaGVkTFZpZXcocm9vdENvbXBvbmVudCkpKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB0VmlldyA9IGxWaWV3W1RWSUVXXTsKICAgICAgICAgICAgcmVuZGVyQ29tcG9uZW50T3JUZW1wbGF0ZSh0VmlldywgbFZpZXcsIHRWaWV3LnRlbXBsYXRlLCByb290Q29tcG9uZW50KTsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEB0ZW1wbGF0ZSBUCiAgICAgKiBAcGFyYW0gez99IHRWaWV3CiAgICAgKiBAcGFyYW0gez99IGxWaWV3CiAgICAgKiBAcGFyYW0gez99IGNvbnRleHQKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGRldGVjdENoYW5nZXNJbnRlcm5hbCh0VmlldywgbFZpZXcsIGNvbnRleHQpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgcmVuZGVyZXJGYWN0b3J5ID0gbFZpZXdbUkVOREVSRVJfRkFDVE9SWV07CiAgICAgICAgaWYgKHJlbmRlcmVyRmFjdG9yeS5iZWdpbikKICAgICAgICAgICAgcmVuZGVyZXJGYWN0b3J5LmJlZ2luKCk7CiAgICAgICAgdHJ5IHsKICAgICAgICAgICAgcmVmcmVzaFZpZXcodFZpZXcsIGxWaWV3LCB0Vmlldy50ZW1wbGF0ZSwgY29udGV4dCk7CiAgICAgICAgfQogICAgICAgIGNhdGNoIChlcnJvcikgewogICAgICAgICAgICBoYW5kbGVFcnJvcihsVmlldywgZXJyb3IpOwogICAgICAgICAgICB0aHJvdyBlcnJvcjsKICAgICAgICB9CiAgICAgICAgZmluYWxseSB7CiAgICAgICAgICAgIGlmIChyZW5kZXJlckZhY3RvcnkuZW5kKQogICAgICAgICAgICAgICAgcmVuZGVyZXJGYWN0b3J5LmVuZCgpOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogU3luY2hyb25vdXNseSBwZXJmb3JtIGNoYW5nZSBkZXRlY3Rpb24gb24gYSByb290IHZpZXcgYW5kIGl0cyBjb21wb25lbnRzLgogICAgICoKICAgICAqIEBwYXJhbSB7P30gbFZpZXcgVGhlIHZpZXcgd2hpY2ggdGhlIGNoYW5nZSBkZXRlY3Rpb24gc2hvdWxkIGJlIHBlcmZvcm1lZCBvbi4KICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGRldGVjdENoYW5nZXNJblJvb3RWaWV3KGxWaWV3KSB7CiAgICAgICAgdGlja1Jvb3RDb250ZXh0KCgvKiogQHR5cGUgez99ICovIChsVmlld1tDT05URVhUXSkpKTsKICAgIH0KICAgIC8qKgogICAgICogQHRlbXBsYXRlIFQKICAgICAqIEBwYXJhbSB7P30gdFZpZXcKICAgICAqIEBwYXJhbSB7P30gdmlldwogICAgICogQHBhcmFtIHs/fSBjb250ZXh0CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBjaGV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ICAgICAgICAgICAgICAgIGlmIChpbnRlcnBvbGF0aW9uUGFydHMubGVuZ3RoID4gMCkgewogICAgICAgICAgICAgICAgICAgIGJpbmRpbmdNZXRhZGF0YSArPQogICAgICAgICAgICAgICAgICAgICAgICBJTlRFUlBPTEFUSU9OX0RFTElNSVRFUiArIGludGVycG9sYXRpb25QYXJ0cy5qb2luKElOVEVSUE9MQVRJT05fREVMSU1JVEVSKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHREYXRhW2JpbmRpbmdJbmRleF0gPSBiaW5kaW5nTWV0YWRhdGE7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBDTEVBTl9QUk9NSVNFID0gX0NMRUFOX1BST01JU0U7CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdmlldwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0TENsZWFudXAodmlldykgewogICAgICAgIC8vIHRvcCBsZXZlbCB2YXJpYWJsZXMgc2hvdWxkIG5vdCBiZSBleHBvcnRlZCBmb3IgcGVyZm9ybWFuY2UgcmVhc29ucyAoUEVSRl9OT1RFUy5tZCkKICAgICAgICByZXR1cm4gdmlld1tDTEVBTlVQXSB8fCAodmlld1tDTEVBTlVQXSA9IG5nRGV2TW9kZSA/IG5ldyBMQ2xlYW51cCgpIDogW10pOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHRWaWV3CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBnZXRUVmlld0NsZWFudXAodFZpZXcpIHsKICAgICAgICByZXR1cm4gdFZpZXcuY2xlYW51cCB8fCAodFZpZXcuY2xlYW51cCA9IG5nRGV2TW9kZSA/IG5ldyBUQ2xlYW51cCgpIDogW10pOwogICAgfQogICAgLyoqCiAgICAgKiBUaGVyZSBhcmUgY2FzZXMgd2hlcmUgdGhlIHN1YiBjb21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HB1YmxpYyAiaW5wdXQiIG5hbWUgYW5kIHByaXZhdGVseS1rbm93biwKICAgICAqICAgICAgICBwb3NzaWJseSBtaW5pZmllZCwgcHJvcGVydHkgbmFtZXMgdG8gd3JpdGUgdG8uCiAgICAgKiBAcGFyYW0gez99IHB1YmxpY05hbWUKICAgICAqIEBwYXJhbSB7P30gdmFsdWUgVmFsdWUgdG8gc2V0LgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gc2V0SW5wdXRzRm9yUHJvcGVydHkodFZpZXcsIGxWaWV3LCBpbnB1dHMsIHB1YmxpY05hbWUsIHZhbHVlKSB7CiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBpbnB1dHMubGVuZ3RoOykgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGluZGV4ID0gKC8qKiBAdHlwZSB7P30gKi8gKGlucHV0c1tpKytdKSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcHJpdmF0ZU5hbWUgPSAoLyoqIEB0eXBlIHs/fSAqLyAoaW5wdXRzW2krK10pKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBpbnN0YW5jZSA9IGxWaWV3W2luZGV4XTsKICAgICAgICAgICAgbmdEZXZNb2RlICYmIGFzc2VydERhdGFJblJhbmdlKGxWaWV3LCBpbmRleCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZGVmID0gKC8qKiBAdHlwZSB7P30gKi8gKHRWaWV3LmRhdGFbaW5kZXhdKSk7CiAgICAgICAgICAgIGlmIChkZWYuc2V0SW5wdXQgIT09IG51bGwpIHsKICAgICAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovIChkZWYuc2V0SW5wdXQpKShpbnN0YW5jZSwgdmFsdWUsIHB1YmxpY05hbWUsIHByaXZhdGVO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gICAgaXNQcm9jZWR1cmFsUmVuZGVyZXIocmVuZGVyZXIpID8gcmVuZGVyZXIuc2V0VmFsdWUoZWxlbWVudCwgdmFsdWUpIDogZWxlbWVudC50ZXh0Q29udGVudCA9IHZhbHVlOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHROb2RlCiAgICAgKiBAcGFyYW0gez99IGVtYmVkZGVkVmlldwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0TENvbnRhaW5lcih0Tm9kZSwgZW1iZWRkZWRWaWV3KSB7CiAgICAgICAgbmdEZXZNb2RlICYmIGFzc2VydExWaWV3KGVtYmVkZGVkVmlldyk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGNvbnRhaW5lciA9ICgvKiogQHR5cGUgez99ICovIChlbWJlZGRlZFZpZXdbUEFSRU5UXSkpOwogICAgICAgIGlmICh0Tm9kZS5pbmRleCA9PT0gLTEpIHsKICAgICAgICAgICAgLy8gVGhpcyBpcyBhIGR5bmFtaWNhbGx5IGNyZWF0ZWQgdmlldyBpbnNpZGUgYSBkeW5hbWljIGNvbnRhaW5lci4KICAgICAgICAgICAgLy8gVGhlIHBhcmVudCBpc24ndCBhbiBMQ29udGFpbmVyIGlmIHRoZSBlbWJlZGRlZCB2aWV3IGhhc24ndCBiZWVuIGF0dGFjaGVkIHlldC4KICAgICAgICAgICAgcmV0dXJuIGlzTENvbnRhaW5lcihjb250YWluZXIpID8gY29udGFpbmVyIDogbnVsbDsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIG5nRGV2TW9kZSAmJiBhc3NlcnRMQ29udGFpbmVyKGNvbnRhaW5lcik7CiAgICAgICAgICAgIC8vIFRoaXMgaXMgYSBpbmxpbmUgdmlldyBub2RlIChlLmcuIGVtYmVkZGVkVmlld1N0YXJ0KQogICAgICAgICAgICByZXR1cm4gY29udGFpbmVyOwogICAgICAgIH0KICAgIH0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XIobE5vZGVUb0hhbmRsZSkpIHsKICAgICAgICAgICAgICAgIGxDb250YWluZXIgPSBsTm9kZVRvSGFuZGxlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKGlzTFZpZXcobE5vZGVUb0hhbmRsZSkpIHsKICAgICAgICAgICAgICAgIGlzQ29tcG9uZW50ID0gdHJ1ZTsKICAgICAgICAgICAgICAgIG5nRGV2TW9kZSAmJiBhc3NlcnREZWZpbmVkKGxOb2RlVG9IYW5kbGVbSE9TVF0sICdIT1NUIG11c3QgYmUgZGVmaW5lZCBmb3IgYSBjb21wb25lbnQgTFZpZXcnKTsKICAgICAgICAgICAgICAgIGxOb2RlVG9IYW5kbGUgPSAoLyoqIEB0eXBlIHs/fSAqLyAobE5vZGVUb0hhbmRsZVtIT1NUXSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgck5vZGUgPSB1bndyYXBSTm9kZShsTm9kZVRvSGFuZGxlKTsKICAgICAgICAgICAgbmdEZXZNb2RlICYmICFpc1Byb2NlZHVyYWxSZW5kZXJlcihyZW5kZXJlcikgJiYgYXNzZXJ0RG9tTm9kZShyTm9kZSk7CiAgICAgICAgICAgIGlmIChhY3Rpb24gPT09IDAgLyogQ3JlYXRlICovICYmIHBhcmVudCAhPT0gbnVsbCkgewogICAgICAgICAgICAgICAgaWYgKGJlZm9yZU5vZGUgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIG5hdGl2ZUFwcGVuZENoaWxkKHJlbmRlcmVyLCBwYXJlbnQsIHJOb2RlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIG5hdGl2ZUluc2VydEJlZm9yZShyZW5kZXJlciwgcGFyZW50LCByTm9kZSwgYmVmb3JlTm9kZSB8fCBudWxsKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChhY3Rpb24gPT09IDEgLyogSW5zZXJ0ICovICYmIHBhcmVudCAhPT0gbnVsbCkgewogICAgICAgICAgICAgICAgbmF0aXZlSW5zZXJ0QmVmb3JlKHJlbmRlcmVyLCBwYXJlbnQsIHJOb2RlLCBiZWZvcmVOb2RlIHx8IG51bGwpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKGFjdGlvbiA9PT0gMiAvKiBEZXRhY2ggKi8pIHsKICAgICAgICAgICAgICAgIG5hdGl2ZVJlbW92ZU5vZGUocmVuZGVyZXIsIHJOb2RlLCBpc0NvbXBvbmVudCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoYWN0aW9uID09PSAzIC8qIERlc3Ryb3kgKi8pIHsKICAgICAgICAgICAgICAgIG5nRGV2TW9kZSAmJiBuZ0Rldk1vZGUucmVuZGVyZXJEZXN0cm95Tm9kZSsrOwogICAgICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKCgoLyoqIEB0eXBlIHs/fSAqLyAocmVuZGVyZXIpKSkuZGVzdHJveU5vZGUpKShyTm9kZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGxDb250YWluZXIgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgYXBwbHlDb250YWluZXIocmVuZGVyZXIsIGFjdGlvbiwgbENvbnRhaW5lciwgcGFyZW50LCBiZWZvcmVOb2RlKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICogQHBhcmFtIHs/fSByZW5kZXJlcgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gY3JlYXRlVGV4dE5vZGUodmFsdWUsIHJlbmRlcmVyKSB7CiAgICAgICAgbmdEZXZNb2RlICYmIG5nRGV2TW9kZS5yZW5kZXJlckNyZWF0ZVRleHROb2RlKys7CiAgICAgICAgbmdE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ryb3kgb25seSBjYWxsZWQgb24gbW92ZW1lbnQgdG8gc2libGluZyBvciBtb3ZlbWVudCB0byBwYXJlbnQgKGxhdGVyYWxseSBvciB1cCkKICAgICAqCiAgICAgKiBAcGFyYW0gez99IHJvb3RWaWV3IFRoZSB2aWV3IHRvIGRlc3Ryb3kKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGRlc3Ryb3lWaWV3VHJlZShyb290VmlldykgewogICAgICAgIC8vIElmIHRoZSB2aWV3IGhhcyBubyBjaGlsZHJlbiwgd2UgY2FuIGNsZWFuIGl0IHVwIGFuZCByZXR1cm4gZWFybHkuCiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBsVmlld09yTENvbnRhaW5lciA9IHJvb3RWaWV3W0NISUxEX0hFQURdOwogICAgICAgIGlmICghbFZpZXdPckxDb250YWluZXIpIHsKICAgICAgICAgICAgcmV0dXJuIGNsZWFuVXBWaWV3KHJvb3RWaWV3W1RWSUVXXSwgcm9vdFZpZXcpOwogICAgICAgIH0KICAgICAgICB3aGlsZSAobFZpZXdPckxDb250YWluZXIpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgbmV4dCA9IG51bGw7CiAgICAgICAgICAgIGlmIChpc0xWaWV3KGxWaWV3T3JMQ29udGFpbmVyKSkgewogICAgICAgICAgICAgICAgLy8gSWYgTFZpZXcsIHRyYXZlcnNlIGRvd24gdG8gY2hpbGQuCiAgICAgICAgICAgICAgICBuZXh0ID0gbFZpZXdPckxDb250YWluZXJbQ0hJTERfSEVBRF07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBuZ0Rldk1vZGUgJiYgYXNzZXJ0TENvbnRhaW5lcihsVmlld09yTENvbnRhaW5lcik7CiAgICAgICAgICAgICAgICAvLyBJZiBjb250YWluZXIsIHRyYXZlcnNlIGRvd24gdG8gaXRzIGZpcnN0IExWaWV3LgogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZmlyc3RWaWV3ID0gbFZpZXdPckxDb250YWluZXJbQ09OVEFJTkVSX0hFQURFUl9PRkZTRVRdOwogICAgICAgICAgICAgICAgaWYgKGZpcnN0VmlldykKICAgICAgICAgICAgICAgICAgICBuZXh0ID0gZmlyc3RWaWV3OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICghbmV4dCkgewogICAgICAgICAgICAgICAgLy8gT25seSBjbGVhbiB1cCB2aWV3IHdoZW4gbW92aW5nIHRvIHRoZSBzaWRlIG9yIHVwLCBhcyBkZXN0cm95IGhvb2tzCiAgICAgICAgICAgICAgICAvLyBzaG91bGQgYmUgY2FsbGVkIGluIG9yZGVyIGZyb20gdGhlIGJvdHRvbSB1cC4KICAgICAgICAgICAgICAgIHdoaWxlIChsVmlld09yTENvbnRhaW5lciAmJiAhKC8qKiBAdHlwZSB7P30gKi8gKGxWaWV3T3JMQ29udGFpbmVyKSlbTkVYVF0gJiYgbFZpZXdPckxDb250YWluZXIgIT09IHJvb3RWaWV3KSB7CiAgICAgICAgICAgICAgICAgICAgaXNMVmlldyhsVmlld09yTENvbnRhaW5lcikgJiYgY2xlYW5VcFZpZXcobFZpZXdPckxDb250YWluZXJbVFZJRVddLCBsVmlld09yTENvbnRhaW5lcik7CiAgICAgICAgICAgICAgICAgICAgbFZpZXdPckxDb250YWluZXIgPSBnZXRQYXJlbnRTdGF0ZShsVmlld09yTENvbnRhaW5lciwgcm9vdFZpZXcpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKGxWaWV3T3JMQ29udGFpbmVyID09PSBudWxsKQogICAgICAgICAgICAgICAgICAgIGxWaWV3T3JMQ29udGFpbmVyID0gcm9vdFZpZXc7CiAgICAgICAgICAgICAgICBpc0xWaWV3KGxWaWV3T3JMQ29udGFpbmVyKSAmJiBjbGVhblVwVmlldyhsVmlld09yTENvbnRhaW5lcltUVklFV10sIGxWaWV3T3JMQ29udGFpbmVyKTsKICAgICAgICAgICAgICAgIG5leHQgPSBsVmlld09yTENvbnRhaW5lciAmJiAoLyoqIEB0eXBlIHs/fSAqLyAobFZpZXdPckxDb250YWluZXIpKVtORVhUXTsKICAgICAgICAgICAgfQogICAgICAgICAgICBsVmlld09yTENvbnRhaW5lciA9IG5leHQ7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBJbnNlcnRzIGEgdmlldyBpbnRvIGEgY29udGFpbmVyLgogICAgICoKICAgICAqIFRoaXMgYWRkcyB0aGUgdmlldyB0byB0aGUgY29udGFpbmVyJ3MgYXJyYXkgb2YgYWN0aXZlIHZpZXdzIGluIHRoZSBjb3JyZWN0CiAgICAgKiBwb3NpdGlvbi4gSXQgYWxzbyBhZGRzIHRoZSB2aWV3J3MgZWxlbWVudHMgdG8gdGhlIERPTSBpZiB0aGUgY29udGFpbmVyIGlzbid0IGEKICAgICAqIHJvb3Qgbm9kZSBvZiBhbm90aGVyIHZpZXcgKGluIHRoYXQgY2FzZSwgdGhlIHZpZXcncyBlbGVtZW50cyB3aWxsIGJlIGFkZGVkIHdoZW4KICAgICAqIHRoZSBjb250YWluZXIncyBwYXJlbnQgdmlldyBpcyBhZGRlZCBsYXRlcikuCiAgICAgKgogICAgICogQHBhcmFtIHs/fSB0VmlldyBUaGUgYFRWaWV3JyBvZiB0aGUgYExWaWV3YCB0byBpbnNlcnQKICAgICAqIEBwYXJhbSB7P30gbFZpZXcgVGhlIHZpZXcgdG8gaW5zZXJ0CiAgICAgKiBAcGFyYW0gez99IGxDb250YWluZXIgVGhlIGNvbnRhaW5lciBpbnRvIHdoaWNoIHRoZSB2aWV3IHNob3VsZCBiZSBpbnNlcnRlZAogICAgICogQHBhcmFtIHs/fSBpbmRleCBXaGljaCBpbmRleCBpbiB0aGUgY29udGFpbmVyIHRvIGluc2VydCB0aGUgY2hpbGQgdmlldyBpbnRvCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBpbnNlcnRWaWV3KHRWaWV3LCBsVmlldywgbENvbnRhaW5lciwgaW5kZXgpIHsKICAgICAgICBuZ0Rldk1vZGUgJiYgYXNzZXJ0TFZpZXcobFZpZXcpOwogICAgICAgIG5nRGV2TW9kZSAmJiBhc3NlcnRMQ29udGFpbmVyKGxDb250YWluZXIpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBpbmRleEluQ29udGFpbmVyID0gQ09OVEFJTkVSX0hFQURFUl9PRkZTRVQgKyBpbmRleDsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgY29udGFpbmVyTGVuZ3RoID0gbENvbnRhaW5lci5sZW5ndGg7CiAgICAgICAgaWYgKGluZGV4ID4gMCkgewogICAgICAgICAgICAvLyBUaGlzIGlzIGEgbmV3IHZpZXcsIHdlIG5lZWQgdG8gYWRkIGl0IHRvIHRoZSBjaGlsZHJlbi4KICAgICAgICAgICAgbENvbnRhaW5lcltpbmRleEluQ29udGFpbmVyIC0gMV1bTkVYVF0gPSBsVmlldzsKICAgICAgICB9CiAgICAgICAgaWYgKGluZGV4IDwgY29udGFpbmVyTGVuZ3RoIC0gQ09OVEFJTkVSX0hFQURFUl9PRkZTRVQpIHsKICAgICAgICAgICAgbFZpZXdbTkVYVF0gPSBsQ29udGFpbmVyW2luZGV4SW5Db250YWluZXJdOwogICAgICAgICAgICBhZGRUb0FycmF5KGxDb250YWluZXIsIENPTlRBSU5FUl9IRUFERVJfT0ZGU0VUICsgaW5kZXgsIGxWaWV3KTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIGxDb250YWluZXIucHVzaChsVmlldyk7CiAgICAgICAgICAgIGxWaWV3W05FWFRdID0gbnVsbDsKICAgICAgICB9CiAgICAgICAgbFZpZXdbUEFSRU5UXSA9IGxDb250YWluZXI7CiAgICAgICAgLy8gdHJhY2sgdmlld3Mgd2hlcmUgZGVjbGFyYXRpb24gYW5kIGluc2VydGlvbiBwb2ludHMgYXJlIGRpZmZlcmVudAogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBkZWNsYXJhdGlvbkxDb250YWluZXIgPSBsVmlld1tERUNMQVJBVElPTl9MQ09OVEFJTkVSXTsKICAgICAgICBpZiAoZGVjbGFyYXRpb25MQ29udGFpbmVyICE9PSBudWxsICYmIGxDb250YWluZXIgIT09IGRlY2xhcmF0aW9uTENvbnRhaW5lcikgewogICAgICAgICAgICB0cmFja01vdmVkVmlldyhkZWNsYXJhdGlvbkxDb250YWluZXIsIGxWaWV3KTsKICAgICAgICB9CiAgICAgICAgLy8gbm90aWZ5IHF1ZXJ5IHRoYXQgYSBuZXcgdmlldyBoYXMgYmVlbiBhZGRlZAogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBsUXVlcmllcyA9IGxWaWV3W1FVRVJJRVNdOwogICAgICAgIGlmIChsUXVlcmllcyAhPT0gbnVsbCkgewogICAgICAgICAgICBsUXVlcmllcy5pbnNlcnRWaWV3KHRWaWV3KTsKICAgICAgICB9CiAgICAgICAgLy8gU2V0cyB0aGUgYXR0YWNoZWQgZmxhZwogICAgICAgIGxWaWV3W0ZMQUdTXSB8PSAxMjggLyogQXR0YWNoZWQgKi87CiAgICB9CiAgICAvKioKICAgICAqIFRyYWNrIHZpZXdzIGNyZWF0ZWQgZnJvbSB0aGUgZGVjbGFyYXRpb24gY29udGFpbmVyIChUZW1wbGF0ZVJlZikgYW5kIGluc2VydGVkIGludG8gYQogICAgICogZGlmZmVyZW50IExDb250YWluZXIuCiAgICAgKiBAcGFyYW0gez99IGRlY2xhcmF0aW9uQ29udGFpbmVyCiAgICAgKiBAcGFyYW0gez99IGxWaWV3CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiB0cmFja01vdmVkVmlldyhkZWNsYXJhdGlvbkNvbnRhaW5lci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4LCAxKTsKICAgIH0KICAgIC8qKgogICAgICogRGV0YWNoZXMgYSB2aWV3IGZyb20gYSBjb250YWluZXIuCiAgICAgKgogICAgICogVGhpcyBtZXRob2QgcmVtb3ZlcyB0aGUgdmlldyBmcm9tIHRoZSBjb250YWluZXIncyBhcnJheSBvZiBhY3RpdmUgdmlld3MuIEl0IGFsc28KICAgICAqIHJlbW92ZXMgdGhlIHZpZXcncyBlbGVtZW50cyBmcm9tIHRoZSBET00uCiAgICAgKgogICAgICogQHBhcmFtIHs/fSBsQ29udGFpbmVyIFRoZSBjb250YWluZXIgZnJvbSB3aGljaCB0byBkZXRhY2ggYSB2aWV3CiAgICAgKiBAcGFyYW0gez99IHJlbW92ZUluZGV4IFRoZSBpbmRleCBvZiB0aGUgdmlldyB0byBkZXRhY2gKICAgICAqIEByZXR1cm4gez99IERldGFjaGVkIExWaWV3IGluc3RhbmNlLgogICAgICovCiAgICBmdW5jdGlvbiBkZXRhY2hWaWV3KGxDb250YWluZXIsIHJlbW92ZUluZGV4KSB7CiAgICAgICAgaWYgKGxDb250YWluZXIubGVuZ3RoIDw9IENPTlRBSU5FUl9IRUFERVJfT0ZGU0VUKQogICAgICAgICAgICByZXR1cm47CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGluZGV4SW5Db250YWluZXIgPSBDT05UQUlORVJfSEVBREVSX09GRlNFVCArIHJlbW92ZUluZGV4OwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCB2aWV3VG9EZXRhY2ggPSBsQ29udGFpbmVyW2luZGV4SW5Db250YWluZXJdOwogICAgICAgIGlmICh2aWV3VG9EZXRhY2gpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBkZWNsYXJhdGlvbkxDb250YWluZXIgPSB2aWV3VG9EZXRhY2hbREVDTEFSQVRJT05fTENPTlRBSU5FUl07CiAgICAgICAgICAgIGlmIChkZWNsYXJhdGlvbkxDb250YWluZXIgIT09IG51bGwgJiYgZGVjbGFyYXRpb25MQ29udGFpbmVyICE9PSBsQ29udGFpbmVyKSB7CiAgICAgICAgICAgICAgICBkZXRhY2hNb3ZlZFZpZXcoZGVjbGFyYXRpb25MQ29udGFpbmVyLCB2aWV3VG9EZXRhY2gpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChyZW1vdmVJbmRleCA+IDApIHsKICAgICAgICAgICAgICAgIGxDb250YWluZXJbaW5kZXhJbkNvbnRhaW5lciAtIDFdW05FWFRdID0gKC8qKiBAdHlwZSB7P30gKi8gKHZpZXdUb0RldGFjaFtORVhUXSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcmVtb3ZlZExWaWV3ID0gcmVtb3ZlRnJvbUFycmF5KGxDb250YWluZXIsIENPTlRBSU5FUl9IRUFERVJfT0ZGU0VUICsgcmVtb3ZlSW5kZXgpOwogICAgICAgICAgICBhZGRSZW1vdmVWaWV3RnJvbUNvbnRhaW5lcih2aWV3VG9EZXRhY2hbVFZJRVddLCB2aWV3VG9EZXRhY2gsIGZhbHNlLCBudWxsKTsKICAgICAgICAgICAgLy8gbm90aWZ5IHF1ZXJ5IHRoYXQgYSB2aWV3IGhhcyBiZWVuIHJlbW92ZWQKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBsUXVlcmllcyA9IHJlbW92ZWRMVmlld1tRVUVSSUVTXTsKICAgICAgICAgICAgaWYgKGxRdWVyaWVzICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICBsUXVlcmllcy5kZXRhY2hWaWV3KHJlbW92ZWRMVmlld1tUVklFV10pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZpZXdUb0RldGFjaFtQQVJFTlRdID0gbnVsbDsKICAgICAgICAgICAgdmlld1RvRGV0YWNoW05FWFRdID0gbnVsbDsKICAgICAgICAgIC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AgKiBAcGFyYW0gez99IGxWaWV3IFRoZSB2aWV3IHRvIGJlIGRlc3Ryb3llZC4KICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGRlc3Ryb3lMVmlldyh0VmlldywgbFZpZXcpIHsKICAgICAgICBpZiAoIShsVmlld1tGTEFHU10gJiAyNTYgLyogRGVzdHJveWVkICovKSkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHJlbmRlcmVyID0gbFZpZXdbUkVOREVSRVJdOwogICAgICAgICAgICBpZiAoaXNQcm9jZWR1cmFsUmVuZGVyZXIocmVuZGVyZXIpICYmIHJlbmRlcmVyLmRlc3Ryb3lOb2RlKSB7CiAgICAgICAgICAgICAgICBhcHBseVZpZXcodFZpZXcsIGxWaWV3LCByZW5kZXJlciwgMyAvKiBEZXN0cm95ICovLCBudWxsLCBudWxsKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBkZXN0cm95Vmlld1RyZWUobFZpZXcpOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogRGV0ZXJtaW5lcyB3aGljaCBMVmlld09yTENvbnRhaW5lciB0byBqdW1wIHRvIHdoZW4gdHJhdmVyc2luZyBiYWNrIHVwIHRoZQogICAgICogdHJlZSBpbiBkZXN0cm95Vmlld1RyZWUuCiAgICAgKgogICAgICogTm9ybWFsbHksIHRoZSB2aWV3J3MgcGFyZW50IExWaWV3IHNob3VsZCBiZSBjaGVja2VkLCBidXQgaW4gdGhlIGNhc2Ugb2YKICAgICAqIGVtYmVkZGVkIHZpZXdzLCB0aGUgY29udGFpbmVyICh3aGljaCBpcyB0aGUgdmlldyBub2RlJ3MgcGFyZW50LCBidXQgbm90IHRoZQogICAgICogTFZpZXcncyBwYXJlbnQpIG5lZWRzIHRvIGJlIGNoZWNrZWQgZm9yIGEgcG9zc2libGUgbmV4dCBwcm9wZXJ0eS4KICAgICAqCiAgICAgKiBAcGFyYW0gez99IGxWaWV3T3JMQ29udGFpbmVyIFRoZSBMVmlld09yTENvbnRhaW5lciBmb3Igd2hpY2ggd2UgbmVlZCBhIHBhcmVudCBzdGF0ZQogICAgICogQHBhcmFtIHs/fSByb290VmlldyBUaGUgcm9vdFZpZXcsIHNvIHdlIGRvbid0IHByb3BhZ2F0ZSB0b28gZmFyIHVwIHRoZSB2aWV3IHRyZWUKICAgICAqIEByZXR1cm4gez99IFRoZSBjb3JyZWN0IHBhcmVudCBMVmlld09yTENvbnRhaW5lcgogICAgICovCiAgICBmdW5jdGlvbiBnZXRQYXJlbnRTdGF0ZShsVmlld09yTENvbnRhaW5lciwgcm9vdFZpZXcpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IHROb2RlOwogICAgICAgIGlmIChpc0xWaWV3KGxWaWV3T3JMQ29udGFpbmVyKSAmJiAodE5vZGUgPSBsVmlld09yTENvbnRhaW5lcltUX0hPU1RdKSAmJgogICAgICAgICAgICB0Tm9kZS50eXBlID09PSAyIC8qIFZpZXcgKi8pIHsKICAgICAgICAgICAgLy8gaWYgaXQncyBhbiBlbWJlZGRlZCB2aWV3LCB0aGUgc3RhdGUgbmVlZHMgdG8gZ28gdXAgdG8gdGhlIGNvbnRhaW5lciwgaW4gY2FzZSB0aGUKICAgICAgICAgICAgLy8gY29udGFpbmVyIGhhcyBhIG5leHQKICAgICAgICAgICAgcmV0dXJuIGdldExDb250YWluZXIoKC8qKiBAdHlwZSB7P30gKi8gKHROb2RlKSksIGxWaWV3T3JMQ29udGFpbmVyKTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIC8vIG90aGVyd2lzZSwgdXNlIHBhcmVudCB2aWV3IGZvciBjb250YWluZXJzIG9yIGNvbXBvbmVudCB2aWV3cwogICAgICAgICAgICByZXR1cm4gbFZpZXdPckxDb250YWluZXJbUEFSRU5UXSA9PT0gcm9vdFZpZXcgPyBudWxsIDogbFZpZXdPckxDb250YWluZXJbUEFSRU5UXT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ZXIobFZpZXdbUkVOREVSRVJdKSkgewogICAgICAgICAgICAgICAgbmdEZXZNb2RlICYmIG5nRGV2TW9kZS5yZW5kZXJlckRlc3Ryb3krKzsKICAgICAgICAgICAgICAgICgoLyoqIEB0eXBlIHs/fSAqLyAobFZpZXdbUkVOREVSRVJdKSkpLmRlc3Ryb3koKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGRlY2xhcmF0aW9uQ29udGFpbmVyID0gbFZpZXdbREVDTEFSQVRJT05fTENPTlRBSU5FUl07CiAgICAgICAgICAgIC8vIHdlIGFyZSBkZWFsaW5nIHdpdGggYW4gZW1iZWRkZWQgdmlldyB0aGF0IGlzIHN0aWxsIGluc2VydGVkIGludG8gYSBjb250YWluZXIKICAgICAgICAgICAgaWYgKGRlY2xhcmF0aW9uQ29udGFpbmVyICE9PSBudWxsICYmIGlzTENvbnRhaW5lcihsVmlld1tQQVJFTlRdKSkgewogICAgICAgICAgICAgICAgLy8gYW5kIHRoaXMgaXMgYSBwcm9qZWN0ZWQgdmlldwogICAgICAgICAgICAgICAgaWYgKGRlY2xhcmF0aW9uQ29udGFpbmVyICE9PSBsVmlld1tQQVJFTlRdKSB7CiAgICAgICAgICAgICAgICAgICAgZGV0YWNoTW92ZWRWaWV3KGRlY2xhcmF0aW9uQ29udGFpbmVyLCBsVmlldyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvLyBGb3IgZW1iZWRkZWQgdmlld3Mgc3RpbGwgYXR0YWNoZWQgdG8gYSBjb250YWluZXI6IHJlbW92ZSBxdWVyeSByZXN1bHQgZnJvbSB0aGlzIHZpZXcuCiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBsUXVlcmllcyA9IGxWaWV3W1FVRVJJRVNdOwogICAgICAgICAgICAgICAgaWYgKGxRdWVyaWVzICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgbFF1ZXJpZXMuZGV0YWNoVmlldyh0Vmlldyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIFJlbW92ZXMgbGlzdGVuZXJzIGFuZCB1bnN1YnNjcmliZXMgZnJvbSBvdXRwdXQgc3Vic2NyaXB0aW9ucwogICAgICogQHBhcmFtIHs/fSB0VmlldwogICAgICogQHBhcmFtIHs/fSBsVmlldwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gcmVtb3ZlTGlzdGVuZXJzKHRWaWV3LCBsVmlldykgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCB0Q2xlYW51cCA9IHRWaWV3LmNsZWFudXA7CiAgICAgICAgaWYgKHRDbGVhbnVwICE9PSBudWxsKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbENsZWFudXAgPSAoLyoqIEB0eXBlIHs/fSAqLyAobFZpZXdbQ0xFQU5VUF0pKTsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB0Q2xlYW51cC5sZW5ndGggLSAxOyBpICs9IDIpIHsKICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdENsZWFudXBbaV0gPT09ICdzdHJpbmcnKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gVGhpcyBpcyBhIG5hdGl2ZSBET00gbGlzdGVuZXIKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgaWR4T3JUYXJnZXRHZXR0ZXIgPSB0Q2xlYW51cFtpICsgMV07CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHRhcmdldCA9IHR5cGVvZiBpZHhPclRhcmdldEdldHRlciA9PT0gJ2Z1bmN0aW9uJyA/CiAgICAgICAgICAgICAgICAgICAgICAgIGlkeE9yVGFyZ2V0R2V0dGVyKGxWaWV3KSA6CiAgICAgICAgICAgICAgICAgICAgICAgIHVud3JhcFJOb2RlKGxWaWV3W2lkeE9yVGFyZ2V0R2V0dGVyXSk7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGxpc3RlbmVyID0gbENsZWFudXBbdENsZWFudXBbaSArIDJdXTsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgdXNlQ2FwdHVyZU9yU3ViSWR4ID0gdENsZWFudXBbaSArIDNdOwogICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdXNlQ2FwdHVyZU9yU3ViSWR4ID09PSAnYm9vbGVhbicpIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gbmF0aXZlIERPTSBsaXN0ZW5lciByZWdpc3RlcmVkIHdpdGggUmVuZGVyZXIzCiAgICAgICAgICAgICAgICAgICAgICAgIHRhcmdldC5yZW1vdmVFdmVudExpc3RlbmVyKHRDbGVhbnVwW2ldLCBsaXN0ZW5lciwgdXNlQ2FwdHVyZU9yU3ViSWR4KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh1c2VDYXB0dXJlT3JTdWJJZHggPj0gMCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gdW5yZWdpc3RlcgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbENsZWFudXBbdXNlQ2FwdHVyZU9yU3ViSWR4XSgpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gU3Vic2NyaXB0aW9uCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsQ2xlYW51cFstdXNlQ2FwdHVyZU9yU3ViSWR4XS51bnN1YnNjcmliZSgpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGkgKz0gMjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIC8vIFRoaXMgaXMgYSBjbGVhbnVwIGZ1bmN0aW9uIHRoYXQgaXMgZ3JvdXBlZCB3aXRoIHRoZSBpbmRleCBvZiBpdHMgY29udGV4dAogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBjb250ZXh0ID0gbENsZWFudXBbdENsZWFudXBbaSArIDFdXTsKICAgICAgICAgICAgICAgICAgICB0Q2xlYW51cFtpXS5jYWxsKGNvbnRleHQpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGxWaWV3W0NMRUFOVVBdID0gbnVsbDsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIENhbGxzIG9uRGVzdHJveSBob29rcyBmb3IgdGhpcyB2aWV3CiAgICAgKiBAcGFyYW0gez99IHRWaWV3CiAgICAgKiBAcGFyYW0gez99IGxWaWV3CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBleGVjdXRlT25EZXN0cm95cyh0VmlldywgbFZpZXcpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IGRlc3Ryb3lIb29rczsKICAgICAgICBpZiAodFZpZXcgIT0gbnVsbCAmJiAoZGVzdHJveUhvb2tzID0gdFZpZXcuZGVzdHJveUhvb2tzKSAhPSBudWxsKSB7CiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZGVzdHJveUhvb2tzLmxlbmd0aDsgaSArPSAyKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBjb250ZXh0ID0gbFZpZXdbKC8qKiBAdHlwZSB7P30gKi8gKGRlc3Ryb3lIb29rc1tpXSkpXTsKICAgICAgICAgICAgICAgIC8vIE9ubHkgY2FsbCB0aGUgZGVzdHJveSBob29rIGlmIHRoZSBjb250ZXh0IGhhcyBiZWVuIHJlcXVlc3RlZC4KICAgICAgICAgICAgICAgIGlmICghKGNvbnRleHQgaW5zdGFuY2VvZiBOb2RlSW5qZWN0b3JGYWN0b3J5KSkgewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCB0b0NhbGwgPSAoLyoqIEB0eXBlIHs/fSAqLyAoZGVzdHJveUhvb2tzW2kgKyAxXSkpOwogICAgICAgICAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KHRvQ2FsbCkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaiA9IDA7IGogPCB0b0NhbGwubGVuZ3RoOyBqICs9IDIpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoLyoqIEB0eXBlIHs/fSAqLyAodG9DYWxsW2ogKyAxXSkpKS5jYWxsKGNvbnRleHRbKC8qKiBAdHlwZSB7P30gKi8gKHRvQ2FsbFtqXSkpXSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRvQ2FsbC5jYWxsKGNvbnRleHQpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogUmV0dXJucyBhIG5hdGl2ZSBlbGVtZW50IGlmIGEgbm9kZSBjYW4gYmUgaW5zZXJ0ZWQgaW50byB0aGUgZ2l2ZW4gcGFyZW50LgogICAgICoKICAgICAqIFRoZXJlIG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NVIGNvbnRhaW5lcnMgYXMgdGhvc2UgYXJlIHJlcHJlc2VudGVkIGJ5IGEgY29tbWVudCBub2RlIGFuZAogICAgICAgIC8vIGNhbid0IGJlIHVzZWQgYXMgYSByZW5kZXIgcGFyZW50LgogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgcGFyZW50VE5vZGUgPSB0Tm9kZS5wYXJlbnQ7CiAgICAgICAgd2hpbGUgKHBhcmVudFROb2RlICE9IG51bGwgJiYKICAgICAgICAgICAgKHBhcmVudFROb2RlLnR5cGUgPT09IDQgLyogRWxlbWVudENvbnRhaW5lciAqLyB8fAogICAgICAgICAgICAgICAgcGFyZW50VE5vZGUudHlwZSA9PT0gNSAvKiBJY3VDb250YWluZXIgKi8pKSB7CiAgICAgICAgICAgIHROb2RlID0gcGFyZW50VE5vZGU7CiAgICAgICAgICAgIHBhcmVudFROb2RlID0gdE5vZGUucGFyZW50OwogICAgICAgIH0KICAgICAgICAvLyBJZiB0aGUgcGFyZW50IHROb2RlIGlzIG51bGwsIHRoZW4gd2UgYXJlIGluc2VydGluZyBhY3Jvc3Mgdmlld3M6IGVpdGhlciBpbnRvIGFuIGVtYmVkZGVkIHZpZXcKICAgICAgICAvLyBvciBhIGNvbXBvbmVudCB2aWV3LgogICAgICAgIGlmIChwYXJlbnRUTm9kZSA9PSBudWxsKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaG9zdFROb2RlID0gKC8qKiBAdHlwZSB7P30gKi8gKGN1cnJlbnRWaWV3W1RfSE9TVF0pKTsKICAgICAgICAgICAgaWYgKGhvc3RUTm9kZS50eXBlID09PSAyIC8qIFZpZXcgKi8pIHsKICAgICAgICAgICAgICAgIC8vIFdlIGFyZSBpbnNlcnRpbmcgYSByb290IGVsZW1lbnQgb2YgYW4gZW1iZWRkZWQgdmlldyBXZSBtaWdodCBkZWxheSBpbnNlcnRpb24gb2YgY2hpbGRyZW4KICAgICAgICAgICAgICAgIC8vIGZvciBhIGdpdmVuIHZpZXcgaWYgaXQgaXMgZGlzY29ubmVjdGVkLiBUaGlzIG1pZ2h0IGhhcHBlbiBmb3IgMiBtYWluIHJlYXNvbnM6CiAgICAgICAgICAgICAgICAvLyAtIHZpZXcgaXMgbm90IGluc2VydGVkIGludG8gYW55IGNvbnRhaW5lcih2aWV3IHdhcyBjcmVhdGVkIGJ1dCBub3QgaW5zZXJ0ZWQgeWV0KQogICAgICAgICAgICAgICAgLy8gLSB2aWV3IGlzIGluc2VydGVkIGludG8gYSBjb250YWluZXIgYnV0IHRoZSBjb250YWluZXIgaXRzZWxmIGlzIG5vdCBpbnNlcnRlZCBpbnRvIHRoZSBET00KICAgICAgICAgICAgICAgIC8vIChjb250YWluZXIgbWlnaHQgYmUgcGFydCBvZiBwcm9qZWN0aW9uIG9yIGNoaWxkIG9mIGEgdmlldyB0aGF0IGlzIG5vdCBpbnNlcnRlZCB5ZXQpLgogICAgICAgICAgICAgICAgLy8gSW4gb3RoZXIgd29yZHMgd2UgY2FuIGluc2VydCBjaGlsZHJlbiBvZiBhIGdpdmVuIHZpZXcgaWYgdGhpcyB2aWV3IHdhcyBpbnNlcnRlZCBpbnRvIGEKICAgICAgICAgICAgICAgIC8vIGNvbnRhaW5lciBhbmQgdGhlIGNvbnRhaW5lciBpdHNlbGYgaGFzIGl0cyByZW5kZXIgcGFyZW50IGRldGVybWluZWQuCiAgICAgICAgICAgICAgICByZXR1cm4gZ2V0Q29udGFpbmVyUmVuZGVyUGFyZW50KCgvKiogQHR5cGUgez99ICovIChob3N0VE5vZGUpKSwgY3VycmVudFZpZXcpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgLy8gV2UgYXJlIGluc2VydGluZyBhIHJvb3QgZWxlbWVudCBvZiB0aGUgY29tcG9uZW50IHZpZXcgaW50byB0aGUgY29tcG9uZW50IGhvc3QgZWxlbWVudCBhbmQKICAgICAgICAgICAgICAg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CBjaGlsZCwgYmVmb3JlTm9kZSkgewogICAgICAgIG5nRGV2TW9kZSAmJiBuZ0Rldk1vZGUucmVuZGVyZXJJbnNlcnRCZWZvcmUrKzsKICAgICAgICBpZiAoaXNQcm9jZWR1cmFsUmVuZGVyZXIocmVuZGVyZXIpKSB7CiAgICAgICAgICAgIHJlbmRlcmVyLmluc2VydEJlZm9yZShwYXJlbnQsIGNoaWxkLCBiZWZvcmVOb2RlKTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIHBhcmVudC5pbnNlcnRCZWZvcmUoY2hpbGQsIGJlZm9yZU5vZGUsIHRydWUpOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSByZW5kZXJlcgogICAgICogQHBhcmFtIHs/fSBwYXJlbnQKICAgICAqIEBwYXJhbSB7P30gY2hpbGQKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIG5hdGl2ZUFwcGVuZENoaWxkKHJlbmRlcmVyLCBwYXJlbnQsIGNoaWxkKSB7CiAgICAgICAgbmdEZXZNb2RlICYmIG5nRGV2TW9kZS5yZW5kZXJlckFwcGVuZENoaWxkKys7CiAgICAgICAgbmdEZXZNb2RlICYmIGFzc2VydERlZmluZWQocGFyZW50LCAncGFyZW50IG5vZGUgbXVzdCBiZSBkZWZpbmVkJyk7CiAgICAgICAgaWYgKGlzUHJvY2VkdXJhbFJlbmRlcmVyKHJlbmRlcmVyKSkgewogICAgICAgICAgICByZW5kZXJlci5hcHBlbmRDaGlsZChwYXJlbnQsIGNoaWxkKTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIHBhcmVudC5hcHBlbmRDaGlsZChjaGlsZCk7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHJlbmRlcmVyCiAgICAgKiBAcGFyYW0gez99IHBhcmVudAogICAgICogQHBhcmFtIHs/fSBjaGlsZAogICAgICogQHBhcmFtIHs/fSBiZWZvcmVOb2RlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBuYXRpdmVBcHBlbmRPckluc2VydEJlZm9yZShyZW5kZXJlciwgcGFyZW50LCBjaGlsZCwgYmVmb3JlTm9kZSkgewogICAgICAgIGlmIChiZWZvcmVOb2RlICE9PSBudWxsKSB7CiAgICAgICAgICAgIG5hdGl2ZUluc2VydEJlZm9yZShyZW5kZXJlciwgcGFyZW50LCBjaGlsZCwgYmVmb3JlTm9kZSk7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICBuYXRpdmVBcHBlbmRDaGlsZChyZW5kZXJlciwgcGFyZW50LCBjaGlsZCk7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBSZW1vdmVzIGEgbm9kZSBmcm9tIHRoZSBET00gZ2l2ZW4gaXRzIG5hdGl2ZSBwYXJlbnQuCiAgICAgKiBAcGFyYW0gez99IHJlbmRlcmVyCiAgICAgKiBAcGFyYW0gez99IHBhcmVudAogICAgICogQHBhcmFtIHs/fSBjaGlsZAogICAgICogQHBhcmFtIHs/PX0gaXNIb3N0RWxlbWVudAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gbmF0aXZlUmVtb3ZlQ2hpbGQocmVuZGVyZXIsIHBhcmVudCwgY2hpbGQsIGlzSG9zdEVsZW1lbnQpIHsKICAgICAgICBpZiAoaXNQcm9jZWR1cmFsUmVuZGVyZXIocmVuZGVyZXIpKSB7CiAgICAgICAgICAgIHJlbmRlcmVyLnJlbW92ZUNoaWxkKHBhcmVudCwgY2hpbGQsIGlzSG9zdEVsZW1lbnQpOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgcGFyZW50LnJlbW92ZUNoaWxkKGNoaWxkKTsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIFJldHVybnMgYSBuYXRpdmUgcGFyZW50IG9mIGEgZ2l2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ICAgKi8KICAgIGZ1bmN0aW9uIGdldE5hdGl2ZUFuY2hvck5vZGUocGFyZW50VE5vZGUsIGxWaWV3KSB7CiAgICAgICAgaWYgKHBhcmVudFROb2RlLnR5cGUgPT09IDIgLyogVmlldyAqLykgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGxDb250YWluZXIgPSBnZXRMQ29udGFpbmVyKCgvKiogQHR5cGUgez99ICovIChwYXJlbnRUTm9kZSkpLCBsVmlldyk7CiAgICAgICAgICAgIGlmIChsQ29udGFpbmVyID09PSBudWxsKQogICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaW5kZXggPSBsQ29udGFpbmVyLmluZGV4T2YobFZpZXcsIENPTlRBSU5FUl9IRUFERVJfT0ZGU0VUKSAtIENPTlRBSU5FUl9IRUFERVJfT0ZGU0VUOwogICAgICAgICAgICByZXR1cm4gZ2V0QmVmb3JlTm9kZUZvclZpZXcoaW5kZXgsIGxDb250YWluZXIpOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChwYXJlbnRUTm9kZS50eXBlID09PSA0IC8qIEVsZW1lbnRDb250YWluZXIgKi8gfHwKICAgICAgICAgICAgcGFyZW50VE5vZGUudHlwZSA9PT0gNSAvKiBJY3VDb250YWluZXIgKi8pIHsKICAgICAgICAgICAgcmV0dXJuIGdldE5hdGl2ZUJ5VE5vZGUocGFyZW50VE5vZGUsIGxWaWV3KTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIG51bGw7CiAgICB9CiAgICAvKioKICAgICAqIEFwcGVuZHMgdGhlIGBjaGlsZGAgbmF0aXZlIG5vZGUgKG9yIGEgY29sbGVjdGlvbiBvZiBub2RlcykgdG8gdGhlIGBwYXJlbnRgLgogICAgICoKICAgICAqIFRoZSBlbGVtZW50IGluc2VydGlvbiBtaWdodCBiZSBkZWxheWVkIHtcQGxpbmsgY2FuSW5zZXJ0TmF0aXZlTm9kZX0uCiAgICAgKgogICAgICogQHBhcmFtIHs/fSB0VmlldyBUaGUgYFRWaWV3JyB0byBiZSBhcHBlbmRlZAogICAgICogQHBhcmFtIHs/fSBsVmlldyBUaGUgY3VycmVudCBMVmlldwogICAgICogQHBhcmFtIHs/fSBjaGlsZEVsIFRoZSBuYXRpdmUgY2hpbGQgKG9yIGNoaWxkcmVuKSB0aGF0IHNob3VsZCBiZSBhcHBlbmRlZAogICAgICogQHBhcmFtIHs/fSBjaGlsZFROb2RlIFRoZSBUTm9kZSBvZiB0aGUgY2hpbGQgZWxlbWVudAogICAgICogQHJldHVybiB7P30gV2hldGhlciBvciBub3QgdGhlIGNoaWxkIHdhcyBhcHBlbmRlZAogICAgICovCiAgICBmdW5jdGlvbiBhcHBlbmRDaGlsZCh0VmlldywgbFZpZXcsIGNoaWxkRWwsIGNoaWxkVE5vZGUpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgcmVuZGVyUGFyZW50ID0gZ2V0UmVuZGVyUGFyZW50KHRWaWV3LCBjaGlsZFROb2RlLCBsVmlldyk7CiAgICAgICAgaWYgKHJlbmRlclBhcmVudCAhPSBudWxsKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcmVuZGVyZXIgPSBsVmlld1tSRU5ERVJFUl07CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcGFyZW50VE5vZGUgPSBjaGlsZFROb2RlLnBhcmVudCB8fCAoLyoqIEB0eXBlIHs/fSAqLyAobFZpZXdbVF9IT1NUXSkpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGFuY2hvck5vZGUgPSBnZXROYXRpdmVBbmNob3JOb2RlKHBhcmVudFROb2RlLCBsVmlldyk7CiAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KGNoaWxkRWwpKSB7CiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGNoaWxkRWwubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgICAgICBuYXRpdmVBcHBlbmRPckluc2VydEJlZm9yZShyZW5kZXJlciwgcmVuZGVyUGFyZW50LCBjaGlsZEVsW2ldLCBhbmNob3JOb2RlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIG5hdGl2ZUFwcGVuZE9ySW5zZXJ0QmVmb3JlKHJlbmRlcmVyLCByZW5kZXJQYXJlbnQsIGNoaWxkRWwsIGFuY2hvck5vZGUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBSZXR1cm5zIHRoZSBmaXJzdCBuYXRpdmUgbm9kZSBmb3IgYSBnaXZlbiBMVmlldywgc3RhcnRpbmcgZnJvbSB0aGUgcHJvdmlkZWQgVE5vZGUuCiAgICAgKgogICAgICogTmF0aXZlIG5vZGVzIGFyZSByZXR1cm5lZCBpbiB0aGUgb3JkZXIgaW4gd2hpY2ggdGhvc2UgYXBwZWFyIGluIHRoZSBuYXRpdmUgdHJlZSAoRE9NKS4KICAgICAqIEBwYXJhbSB7P30gbFZpZXcKICAgICAqIEBwYXJhbSB7P30gdE5vZGUKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGdldEZpcnN0TmF0aXZlTm9kZShsVmlldywgdE5vZGUpIHsKICAgICAgICBpZiAodE5vZGUgIT09IG51bGwpIHsKICAgICAgICAgICAgbmdEZXZNb2RlICYmCiAgICAgICAgICAgICAgICBhc3NlcnROb2RlT2ZQb3NzaWJsZVR5cGVzKHROb2RlLCAzIC8qIEVsZW1lbnQgKi8sIDAgLyogQ29udGFpbmVyICovLCA0IC8qIEVsZW1lbnRDb250YWluZXIgKi8sIDUgLyogSWN1Q29udGFpbmVyICovLCAxIC8qIFByb2plY3Rpb24gKi8pOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHROb2RlVHlwZSA9IHROb2RlLnR5cGU7CiAgICAgICAgICAgIGlmICh0Tm9kZVR5cGUgPT09IDMgLyogRWxlbWVudCAqLykgewogICAgICAgICAgICAgICAgcmV0dXJuIGdldE5hdGl2ZUJ5VE5vZGUodE5vZGUsIGxWaWV3KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmICh0Tm9kZVR5cGUgPT09IDAgLyogQ29udGFpbmVyICovKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gZ2V0QmVmb3JlTm9kZUZvclZpZXcoLTEsIGxWaWV3W3ROb2RlLmluZGV4XSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAodE5vZGVUeXBlID09PSA0IC8qIEVsZW1lbnRDb250YWluZXIgKi8gfHwgdE5vZGVUeXBlID09PSA1IC8qIEljdUNvbnRhaW5lciAqLykgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZWxJY3VDb250YWluZXJDaGlsZCA9IHROb2RlLmNoaWxkOwogICAgICAgICAgICAgICAgaWYgKGVsSWN1Q29udGFpbmVyQ2hpbGQgIT09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gZ2V0Rmlyc3ROYXRpdmVOb2RlKGxWaWV3LCBlbEljdUNvbnRhaW5lckNoaWxkKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCByTm9kZU9yTENvbnRhaW5lciA9IGxWaWV3W3ROb2RlLmluZGV4XTsKICAgICAgICAgICAgICAgICAgICBpZiAoaXNMQ29udGFpbmVyKHJOb2RlT3JMQ29udGFpbmVyKSkgewogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZ2V0QmVmb3JlTm9kZUZvclZpZXcoLTEsIHJOb2RlT3JMQ29udGFpbmVyKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB1bndyYXBSTm9kZShyTm9kZU9yTENvbnRhaW5lcik7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgY29tcG9uZW50VmlldyA9IGxWaWV3W0RFQ0xBUkFUSU9OX0NPTVBPTkVOVF9WSUVXXTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGNvbXBvbmVudEhvc3QgPSAoLyoqIEB0eXBlIHs/fSAqLyAoY29tcG9uZW50Vmlld1tUX0hPU1RdKSk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBwYXJlbnRWaWV3ID0gZ2V0TFZpZXdQYXJlbnQoY29tcG9uZW50Vmlldyk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBmaXJzdFByb2plY3RlZFROb2RlID0gKCgvKiogQHR5cGUgez99ICovIChjb21wb25lbnRIb3N0LnByb2plY3Rpb24pKSlbKC8qKiBAdHlwZSB7P30gKi8gKHROb2RlLnByb2plY3Rpb24pKV07CiAgICAgICAgICAgICAgICBpZiAoZmlyc3RQcm9qZWN0ZWRUTm9kZSAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGdldEZpcnN0TmF0aXZlTm9kZSgoLyoqIEB0eXBlIHs/fSAqLyAocGFyZW50VmlldykpLCBmaXJzdFByb2plY3RlZFROb2RlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBnZXRGaXJzdE5hdGl2ZU5vZGUobFZpZXcsIHROb2RlLm5leHQpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiBudWxsOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHZpZXdJbmRleEluQ29udGFpbmVyCiAgICAgKiBAcGFyYW0gez99IGxDb250YWluZXIKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGdldEJlZm9yZU5vZGVGb3JWaWV3KHZpZXdJbmRleEluQ29udGFpbmVyLCBsQ29udGFpbmVyKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IG5leHRWaWV3SW5kZXggPSBDT05UQUlORVJfSEVBREVSX09GRlNFVCArIHZpZXdJbmRleEluQ29udGFpbmVyICsgMTsKICAgICAgICBpZiAobmV4dFZpZXdJbmRleCA8IGxDb250YWluZXIubGVuZ3RoKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbFZpZXcgPSAoLyoqIEB0eXBlIHs/fSAqLyAobENvbnRhaW5lcltuZXh0Vmlld0luZGV4XSkpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGZpcnN0VE5vZGVPZlZpZXcgPSBsVmlld1tUVklFV10uZmlyc3RDaGlsZDsKICAgICAgICAgICAgaWYgKGZpcnN0VE5vZGVPZlZpZXcgIT09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiBnZXRGaXJzdE5hdGl2ZU5vZGUobFZpZXcsIGZpcnN0VE5vZGVPZlZpZXcpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiBsQ29udGFpbmVyW05BVElWRV07CiAg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ICAgICAgICAgICAgaWYgKGlzUHJvamVjdGlvbikgewogICAgICAgICAgICAgICAgaWYgKGFjdGlvbiA9PT0gMCAvKiBDcmVhdGUgKi8pIHsKICAgICAgICAgICAgICAgICAgICByYXdTbG90VmFsdWUgJiYgYXR0YWNoUGF0Y2hEYXRhKHVud3JhcFJOb2RlKHJhd1Nsb3RWYWx1ZSksIGxWaWV3KTsKICAgICAgICAgICAgICAgICAgICB0Tm9kZS5mbGFncyB8PSA0IC8qIGlzUHJvamVjdGVkICovOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICgodE5vZGUuZmxhZ3MgJiA2NCAvKiBpc0RldGFjaGVkICovKSAhPT0gNjQgLyogaXNEZXRhY2hlZCAqLykgewogICAgICAgICAgICAgICAgaWYgKHROb2RlVHlwZSA9PT0gNCAvKiBFbGVtZW50Q29udGFpbmVyICovIHx8IHROb2RlVHlwZSA9PT0gNSAvKiBJY3VDb250YWluZXIgKi8pIHsKICAgICAgICAgICAgICAgICAgICBhcHBseU5vZGVzKHJlbmRlcmVyLCBhY3Rpb24sIHROb2RlLmNoaWxkLCBsVmlldywgcmVuZGVyUGFyZW50LCBiZWZvcmVOb2RlLCBmYWxzZSk7CiAgICAgICAgICAgICAgICAgICAgYXBwbHlUb0VsZW1lbnRPckNvbnRhaW5lcihhY3Rpb24sIHJlbmRlcmVyLCByZW5kZXJQYXJlbnQsIHJhd1Nsb3RWYWx1ZSwgYmVmb3JlTm9kZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmICh0Tm9kZVR5cGUgPT09IDEgLyogUHJvamVjdGlvbiAqLykgewogICAgICAgICAgICAgICAgICAgIGFwcGx5UHJvamVjdGlvblJlY3Vyc2l2ZShyZW5kZXJlciwgYWN0aW9uLCBsVmlldywgKC8qKiBAdHlwZSB7P30gKi8gKHROb2RlKSksIHJlbmRlclBhcmVudCwgYmVmb3JlTm9kZSk7CiAgICAgICAgICAg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SB2YWx1ZSBWYWx1ZSB0byB3cml0ZS4gSWYgYG51bGxgL2B1bmRlZmluZWRgL2BmYWxzZWAgdGhpcyBpcyBjb25zaWRlcmVkIGEgcmVtb3ZlIChzZXQvYWRkCiAgICAgKiAgICAgICAgb3RoZXJ3aXNlKS4KICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGFwcGx5U3R5bGluZyhyZW5kZXJlciwgaXNDbGFzc0Jhc2VkLCByTm9kZSwgcHJvcCwgdmFsdWUpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgaXNQcm9jZWR1cmFsID0gaXNQcm9jZWR1cmFsUmVuZGVyZXIocmVuZGVyZXIpOwogICAgICAgIGlmIChpc0NsYXNzQmFzZWQpIHsKICAgICAgICAgICAgLy8gV2UgYWN0dWFsbHkgd2FudCBKUyB0cnVlL2ZhbHNlIGhlcmUgYmVjYXVzZSBhbnkgdHJ1dGh5IHZhbHVlIHNob3VsZCBhZGQgdGhlIGNsYXNzCiAgICAgICAgICAgIGlmICghdmFsdWUpIHsKICAgICAgICAgICAgICAgIG5nRGV2TW9kZSAmJiBuZ0Rldk1vZGUucmVuZGVyZXJSZW1vdmVDbGFzcysrOwogICAgICAgICAgICAgICAgaWYgKGlzUHJvY2VkdXJhbCkgewogICAgICAgICAgICAgICAgICAgICgoLyoqIEB0eXBlIHs/fSAqLyAocmVuZGVyZXIpKSkucmVtb3ZlQ2xhc3Mock5vZGUsIHByb3ApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgKCgvKiogQHR5cGUgez99ICovIChyTm9kZSkpKS5jbGFzc0xpc3QucmVtb3ZlKHByb3ApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgbmdEZXZNb2RlICYmIG5nRGV2TW9kZS5yZW5kZXJlckFkZENsYXNzKys7CiAgICAgICAgICAgICAgICBpZiAoaXNQcm9jZWR1cmFsKSB7CiAgICAgICAgICAgICAgICAgICAgKCgvKiogQHR5cGUgez99ICovIChyZW5kZXJlcikpKS5hZGRDbGFzcyhyTm9kZSwgcHJvcCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBuZ0Rldk1vZGUgJiYgYXNzZXJ0RGVmaW5lZCgoKC8qKiBAdHlwZSB7P30gKi8gKHJOb2RlKSkpLmNsYXNzTGlzdCwgJ0hUTUxFbGVtZW50IGV4cGVjdGVkJyk7CiAgICAgICAgICAgICAgICAgICAgKCgvKiogQHR5cGUgez99ICovIChyTm9kZSkpKS5jbGFzc0xpc3QuYWRkKHByb3ApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICAvLyBUT0RPKG1pc2tvKTogQ2FuJ3QgaW1wb3J0IFJlbmRlcmVyU3R5bGVGbGFnczIuRGFzaENhc2UgYXMgaXQgY2F1c2VzIGltcG9ydHMgdG8gYmUgcmVzb2x2ZWQgaW4KICAgICAgICAgICAgLy8gZGlmZmVyZW50IG9yZGVyIHdoaWNoIGNhdXNlcyBmYWlsdXJlcy4gVXNpbmcgZGlyZWN0IGNvbnN0YW50IGFzIHdvcmthcm91bmQgZm9yIG5vdy4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBmbGFncyA9IHByb3AuaW5kZXhPZignLScpID09IC0xID8gdW5kZWZpbmVkIDogMiAvKiBSZW5kZXJlclN0eWxlRmxhZ3MyLkRhc2hDYXNlICovOwogICAgICAgICAgICBpZiAodmFsdWUgPT0gbnVsbCAvKiogfHwgdmFsdWUgPT09IHVuZGVmaW5lZCAqLykgewogICAgICAgICAgICAgICAgbmdEZXZNb2RlICYmIG5nRGV2TW9kZS5yZW5kZXJlclJlbW92ZVN0eWxlKys7CiAgICAgICAgICAgICAgICBpZiAoaXNQcm9jZWR1cmFsKSB7CiAgICAgICAgICAgICAgICAgICAgKCgvKiogQHR5cGUgez99ICovIChyZW5kZXJlcikpKS5yZW1vdmVTdHlsZShyTm9kZSwgcHJvcCwgZmxhZ3MpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgKCgvKiogQHR5cGUgez99ICovIChyTm9kZSkpKS5zdHlsZS5yZW1vdmVQcm9wZXJ0eShwcm9wKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIG5nRGV2TW9kZSAmJiBuZ0Rldk1vZGUucmVuZGVyZXJTZXRTdHlsZSsrOwogICAgICAgICAgICAgICAgaWYgKGlzUHJvY2VkdXJhbCkgewogICAgICAgICAgICAgICAgICAgICgoLyoqIEB0eXBlIHs/fSAqLyAocmVuZGVyZXIpKSkuc2V0U3R5bGUock5vZGUsIHByb3AsIHZhbHVlLCBmbGFncyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBuZ0Rldk1vZGUgJiYgYXNzZXJ0RGVmaW5lZCgoKC8qKiBAdHlwZSB7P30gKi8gKHJOb2RlKSkpLnN0eWxlLCAnSFRNTEVsZW1lbnQgZXhwZWN0ZWQnKTsKICAgICAgICAgICAgICAgICAgICAoKC8qKiBAdHlwZSB7P30gKi8gKHJOb2RlKSkpLnN0eWxlLnNldFByb3BlcnR5KHByb3AsIHZhbHVlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogV3JpdGUgYGNzc1RleHRgIHRvIGBSRWxlbWVudGAuCiAgICAgKgogICAgICogVGhpcyBmdW5jdGlvbiBkb2VzIGRpcmVjdCB3cml0ZSB3aXRob3V0IGFueSByZWNvbmNpbGl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ZXcgaW5zdGFuY2UgZnJvbSB3aGljaCB0byBzdGFydCB3YWxraW5nIHVwIHRoZSB2aWV3IHRyZWUKICAgICAqIEBwYXJhbSB7P30gc3RhcnRUTm9kZSBUaGUgVE5vZGUgaW5zdGFuY2Ugb2YgdGhlIHN0YXJ0aW5nIGVsZW1lbnQKICAgICAqIEByZXR1cm4gez99IFRoZSBUTm9kZSBvZiB0aGUgcGFyZW50IGluamVjdG9yCiAgICAgKi8KICAgIGZ1bmN0aW9uIGdldFBhcmVudEluamVjdG9yVE5vZGUobG9jYXRpb24sIHN0YXJ0Vmlldywgc3RhcnRUTm9kZSkgewogICAgICAgIC8vIElmIHRoZXJlIGlzIGFuIGluamVjdG9yIG9uIHRoZSBwYXJlbnQgVE5vZGUsIHJldHJpZXZlIHRoZSBUTm9kZSBmb3IgdGhhdCBpbmplY3Rvci4KICAgICAgICBpZiAoc3RhcnRUTm9kZS5wYXJlbnQgJiYgc3RhcnRUTm9kZS5wYXJlbnQuaW5qZWN0b3JJbmRleCAhPT0gLTEpIHsKICAgICAgICAgICAgLy8gdmlldyBvZmZzZXQgaXMgMAogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGluamVjdG9ySW5kZXggPSBzdGFydFROb2RlLnBhcmVudC5pbmplY3RvckluZGV4OwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCB0Tm9kZSA9IHN0YXJ0VE5vZGUucGFyZW50OwogICAgICAgICAgICAvLyBJZiB0Tm9kZS5pbmplY3RvckluZGV4ID09PSB0Tm9kZS5wYXJlbnQuaW5qZWN0b3JJbmRleCwgdGhlbiB0aGUgaW5kZXggYmVsb25ncyB0byBhIHBhcmVudAogICAgICAgICAgICAvLyBpbmplY3Rvci4KICAgICAgICAgICAgd2hpbGUgKHROb2RlLnBhcmVudCAhPSBudWxsICYmIGluamVjdG9ySW5kZXggPT0gdE5vZGUucGFyZW50LmluamVjdG9ySW5kZXgpIHsKICAgICAgICAgICAgICAgIHROb2RlID0gdE5vZGUucGFyZW50OwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0Tm9kZTsKICAgICAgICB9CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCB2aWV3T2Zmc2V0ID0gZ2V0UGFyZW50SW5qZWN0b3JWaWV3T2Zmc2V0KGxvY2F0aW9uKTsKICAgICAgICAvLyB2aWV3IG9mZnNldCBpcyAxCiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBwYXJlbnRWaWV3ID0gc3RhcnRWaWV3OwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgcGFyZW50VE5vZGUgPSAoLyoqIEB0eXBlIHs/fSAqLyAoc3RhcnRWaWV3W1RfSE9TVF0pKTsKICAgICAgICAvLyB2aWV3IG9mZnNldCBpcyBzdXBlcmlvciB0byAxCiAgICAgICAgd2hpbGUgKHZpZXdPZmZzZXQgPiAxKSB7CiAgICAgICAgICAgIHBhcmVudFZpZXcgPSAoLyoqIEB0eXBlIHs/fSAqLyAocGFyZW50Vmlld1tERUNMQVJBVElPTl9WSUVXXSkpOwogICAgICAgICAgICBwYXJlbnRUTm9kZSA9ICgvKiogQHR5cGUgez99ICovIChwYXJlbnRWaWV3W1RfSE9TVF0pKTsKICAgICAgICAgICAgdmlld09mZnNldC0tOwogICAgICAgIH0KICAgICAgICByZXR1cm4gcGFyZW50VE5vZGU7CiAgICB9CiAgICAvKioKICAgICAqIEB0ZW1wbGF0ZSBUCiAgICAgKi8KICAgIGNsYXNzIFZpZXdSZWYgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gX2xWaWV3CiAgICAgICAgICogQHBhcmFtIHs/PX0gX2NkUmVmSW5qZWN0aW5nVmlldwogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKF9sVmlldywgX2NkUmVmSW5qZWN0aW5nVmlldykgewogICAgICAgICAgICB0aGlzLl9sVmlldyA9IF9sVmlldzsKICAgICAgICAgICAgdGhpcy5fY2RSZWZJbmplY3RpbmdWaWV3ID0gX2NkUmVmSW5qZWN0aW5nVmlldzsKICAgICAgICAgICAgdGhpcy5fYXBwUmVmID0gbnVsbDsKICAgICAgICAgICAgdGhpcy5fdmlld0NvbnRhaW5lclJlZiA9IG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHJvb3ROb2RlcygpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBsVmlldyA9IHRoaXMuX2xWaWV3OwogICAgICAgICAgICBpZiAobFZpZXdbSE9TVF0gPT0gbnVsbCkgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgaG9zdFRWaWV3ID0gKC8qKiBAdHlwZSB7P30gKi8gKGxWaWV3W1RfSE9TVF0pKTsKICAgICAgICAgICAgICAgIHJldHVybiBjb2xsZWN0TmF0aXZlTm9kZXMobFZpZXdbVFZJRVddLCBsVmlldywgaG9zdFRWaWV3LmNoaWxkLCBbXSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIFtdOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBjb250ZXh0KCkgewogICAgICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX2xWaWV3W0NPTlRFWFRdKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGRlc3Ryb3llZCgpIHsKICAgICAgICAgICAgcmV0dXJuICh0aGlzLl9sVmlld1tGTEFHU10gJiAyNTYgLyogRGVzdHJveWVkICovKSA9PT0gMjU2IC8qIERlc3Ryb3llZCAqLzsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkZXN0cm95KCkgewogICAgICAgICAgICBpZiAodGhpcy5fYXBwUmVmKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9hcHBSZWYuZGV0YWNoVmlldyh0aGlzKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmICh0aGlzLl92aWV3Q29udGFpbmVyUmVmKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBpbmRleCA9IHRoaXMuX3ZpZXdDb250YWluZXJSZWYuaW5kZXhPZih0aGlzKTsKICAgICAgICAgICAgICAgIGlmIChpbmRleCA+IC0xKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fdmlld0NvbnRhaW5lclJlZi5kZXRhY2goaW5kZXgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdGhpcy5fdmlld0NvbnRhaW5lclJlZiA9IG51bGw7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZGVzdHJveUxWaWV3KHRoaXMuX2xWaWV3W1RWSUVXXSwgdGhpcy5fbFZpZXcpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGNhbGxiYWNrCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvbkRlc3Ryb3koY2FsbGJhY2spIHsKICAgICAgICAgICAgc3RvcmVDbGVhbnVwRm4odGhpcy5fbFZpZXdbVFZJRVddLCB0aGlzLl9sVmlldywgY2FsbGJhY2spOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBNYXJrcyBhIHZpZXcgYW5kIGFsbCBvZiBpdHMgYW5jZXN0b3JzIGRpcnR5LgogICAgICAgICAqCiAgICAgICAgICogSXQgYWxzbyB0cmlnZ2VycyBjaGFuZ2UgZGV0ZWN0aW9uIGJ5IGNhbGxpbmcgYHNjaGVkdWxlVGlja2AgaW50ZXJuYWxseSwgd2hpY2ggY29hbGVzY2VzCiAgICAgICAgICogbXVsdGlwbGUgYG1hcmtGb3JDaGVja2AgY2FsbHMgdG8gaW50byBvbmUgY2hhbmdlIGRldGVjdGlvbiBydW4uCiAgICAgICAgICoKICAgICAgICAgKiBUaGlzIGNhbiBiZSB1c2VkIHRvIGVuc3VyZSBhbiB7XEBsaW5rIENoYW5nZURldGVjdGlvblN0cmF0ZWd5I09uUHVzaCBPblB1c2h9IGNvbXBvbmVudCBpcwogICAgICAgICAqIGNoZWNrZWQgd2hlbiBpdCBuZWVkcyB0byBiZSByZS1yZW5kZXJlZCBidXQgdGhlIHR3byBub3JtYWwgdHJpZ2dlcnMgaGF2ZW4ndCBtYXJrZWQgaXQKICAgICAgICAgKiBkaXJ0eSAoaS5lLiBpbnB1dHMgaGF2ZW4ndCBjaGFuZ2VkIGFuZCBldmVudHMgaGF2ZW4ndCBmaXJlZCBpbiB0aGUgdmlldykuCiAgICAgICAgICoKICAgICAgICAgKiA8IS0tIFRPRE86IEFkZCBhIGxpbmsgdG8gYSBjaGFwdGVyIG9uIE9uUHVzaCBjb21wb25lbnRzIC0tPgogICAgICAgICAqCiAgICAgICAgICogXEB1c2FnZU5vdGVzCiAgICAgICAgICogIyMjIEV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIGBgYHR5cGVzY3JpcHQKICAgICAgICAgKiBcQENvbXBvbmVudCh7CiAgICAgICAgICogICBzZWxlY3RvcjogJ215LWFwcCcsCiAgICAgICAgICogICB0ZW1wbGF0ZTogYE51bWJlciBvZiB0aWNrczoge3tudW1iZXJPZlRpY2tzfX1gCiAgICAgICAgICogICBjaGFuZ2VEZXRlY3Rpb246IENoYW5nZURldGVjdGlvblN0cmF0ZWd5Lk9uUHVzaCwKICAgICAgICAgKiB9KQogICAgICAgICAqIGNsYXNzIEFwcENvbXBvbmVudCB7CiAgICAgICAgICogICBudW1iZXJPZlRpY2tzID0gMDsKICAgICAgICAgKgogICAgICAgICAqICAgY29uc3RydWN0b3IocHJpdmF0ZSByZWY6IENoYW5nZURldGVjdG9yUmVmKSB7CiAgICAgICAgICogICAgIHNldEludGVydmFsKCgpID0+IHsKICAgICAgICAgKiAgICAgICB0aGlzLm51bWJlck9mVGlja3MrKzsKICAgICAgICAgKiAgICAgICAvLyB0aGUgZm9sbG93aW5nIGlzIHJlcXVpcmVkLCBvdGhlcndpc2UgdGhlIHZpZXcgd2lsbCBub3QgYmUgdXBkYXRlZAogICAgICAgICAqICAgICAgIHRoaXMucmVmLm1hcmtGb3JDaGVjaygpOwogICAgICAgICAqICAgICB9LCAxMDAwKTsKICAgICAgICAgKiAgIH0KICAgICAgICAgKiB9CiAgICAgICAgICogYGBgCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBtYXJrRm9yQ2hlY2soKSB7CiAgICAgICAgICAgIG1hcmtWaWV3RGlydHkodGhpcy5fY2RSZWZJbmplY3RpbmdWaWV3IHx8IHRoaXMuX2xWaWV3KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogRGV0YWNoZXMgdGhlIHZpZXcgZnJvbSB0aGUgY2hhbmdlIGRldGVjdGlvbiB0cmVlLgogICAgICAgICAqCiAgICAgICAgICogRGV0YWNoZWQgdmlld3Mgd2lsbCBub3QgYmUgY2hlY2tlZCBkdXJpbmcgY2hhbmdlIGRldGVjdGlvbiBydW5zIHVudGlsIHRoZXkgYXJlCiAgICAgICAgICogcmUtYXR0YWNoZWQsIGV2ZW4gaWYgdGhleSBhcmUgZGlydHkuIGBkZXRhY2hgIGNhbiBiZSB1c2VkIGluIGNvbWJpbmF0aW9uIHdpdGgKICAgICAgICAgKiB7XEBsaW5rIENoYW5nZURldGVjdG9yUmVmI2RldGVjdENoYW5nZXMgZGV0ZWN0Q2hhbmdlc30gdG8gaW1wbGVtZW50IGxvY2FsIGNoYW5nZQogICAgICAgICAqIGRldGVjdGl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WzEsMiwzLDQsNV07CiAgICAgICAgICogICB9CiAgICAgICAgICogfQogICAgICAgICAqCiAgICAgICAgICogXEBDb21wb25lbnQoewogICAgICAgICAqICAgc2VsZWN0b3I6ICdnaWFudC1saXN0JywKICAgICAgICAgKiAgIHRlbXBsYXRlOiBgCiAgICAgICAgICogICAgIDxsaSAqbmdGb3I9ImxldCBkIG9mIGRhdGFQcm92aWRlci5kYXRhIj5EYXRhIHt7ZH19PC9saT4KICAgICAgICAgKiAgIGAsCiAgICAgICAgICogfSkKICAgICAgICAgKiBjbGFzcyBHaWFudExpc3QgewogICAgICAgICAqICAgY29uc3RydWN0b3IocHJpdmF0ZSByZWY6IENoYW5nZURldGVjdG9yUmVmLCBwcml2YXRlIGRhdGFQcm92aWRlcjogRGF0YVByb3ZpZGVyKSB7CiAgICAgICAgICogICAgIHJlZi5kZXRhY2goKTsKICAgICAgICAgKiAgICAgc2V0SW50ZXJ2YWwoKCkgPT4gewogICAgICAgICAqICAgICAgIHRoaXMucmVmLmRldGVjdENoYW5nZXMoKTsKICAgICAgICAgKiAgICAgfSwgNTAwMCk7CiAgICAgICAgICogICB9CiAgICAgICAgICogfQogICAgICAgICAqICAvCiAgICAgICAgICogICBzZWxlY3RvcjogJ2FwcCcsCiAgICAgICAgICogICBwcm92aWRlcnM6IFtEYXRhUHJvdmlkZXJdLAogICAgICAgICAqICAgdGVtcGxhdGU6IGAKICAgICAgICAgKiAgICAgPGdpYW50LWxpc3Q+PGdpYW50LWxpc3Q+CiAgICAgICAgICogICBgLAogICAgICAgICAqIH0pCiAgICAgICAgICogY2xhc3MgQXBwIHsKICAgICAgICAgKiB9CiAgICAgICAgICogYGBgCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkZXRhY2goKSB7CiAgICAgICAgICAgIHRoaXMuX2xWaWV3W0ZMQUdTXSAmPSB+MTI4IC8qIEF0dGFjaGVkICovOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZ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A9IHRoaXMuZGF0YSAqIDI7CiAgICAgICAgICogICAgIH0sIDUwMCk7CiAgICAgICAgICogICB9CiAgICAgICAgICogfQogICAgICAgICAqCiAgICAgICAgICogXEBDb21wb25lbnQoewogICAgICAgICAqICAgc2VsZWN0b3I6ICdsaXZlLWRhdGEnLAogICAgICAgICAqICAgaW5wdXRzOiBbJ2xpdmUnXSwKICAgICAgICAgKiAgIHRlbXBsYXRlOiAnRGF0YToge3tkYXRhUHJvdmlkZXIuZGF0YX19JwogICAgICAgICAqIH0pCiAgICAgICAgICogY2xhc3MgTGl2ZURhdGEgewogICAgICAgICAqICAgY29uc3RydWN0b3IocHJpdmF0ZSByZWY6IENoYW5nZURldGVjdG9yUmVmLCBwcml2YXRlIGRhdGFQcm92aWRlcjogRGF0YVByb3ZpZGVyKSB7fQogICAgICAgICAqCiAgICAgICAgICogICBzZXQgbGl2ZSh2YWx1ZSkgewogICAgICAgICAqICAgICBpZiAodmFsdWUpIHsKICAgICAgICAgKiAgICAgICB0aGlzLnJlZi5yZWF0dGFjaCgpOwogICAgICAgICAqICAgICB9IGVsc2UgewogICAgICAgICAqICAgICAgIHRoaXMucmVmLmRldGFjaCgpOwogICAgICAgICAqICAgICB9CiAgICAgICAgICogICB9CiAgICAgICAgICogfQogICAgICAgICAqICAvCiAgICAgICAgICogICBzZWxlY3RvcjogJ215LWFwcCcsCiAgICAgICAgICogICBwcm92aWRlcnM6IFtEYXRhUHJvdmlkZXJdLAogICAgICAgICAqICAgdGVtcGxhdGU6IGAKICAgICAgICAgKiAgICAgTGl2ZSBVcGRhdGU6IDxpbnB1dCB0eXBlPSJjaGVja2JveCIgWyhuZ01vZGVsKV09ImxpdmUiPgogICAgICAgICAqICAgICA8bGl2ZS1kYXRhIFtsaXZlXT0ibGl2ZSI+PGxpdmUtZGF0YT4KICAgICAgICAgKiAgIGAsCiAgICAgICAgICogfSkKICAgICAgICAgKiBjbGFzcyBBcHBDb21wb25lbnQgewogICAgICAgICAqICAgbGl2Z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AgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmNSZWYKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGF0dGFjaFRvVmlld0NvbnRhaW5lclJlZih2Y1JlZikgewogICAgICAgICAgICBpZiAodGhpcy5fYXBwUmVmKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ1RoaXMgdmlldyBpcyBhbHJlYWR5IGF0dGFjaGVkIGRpcmVjdGx5IHRvIHRoZSBBcHBsaWNhdGlvblJlZiEnKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl92aWV3Q29udGFpbmVyUmVmID0gdmNSZWY7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZGV0YWNoRnJvbUFwcFJlZigpIHsKICAgICAgICAgICAgdGhpcy5fYXBwUmVmID0gbnVsbDsKICAgICAgICAgICAgcmVuZGVyRGV0YWNoVmlldyh0aGlzLl9sVmlld1tUVklFV10sIHRoaXMuX2xWaWV3KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBhcHBSZWYKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGF0dGFjaFRvQXBwUmVmKGFwcFJlZikgewogICAgICAgICAgICBpZiAodGhpcy5fdmlld0NvbnRhaW5lclJlZikgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdUaGlzIHZpZXcgaXMgYWxyZWFkeSBhdHRhY2hlZCB0byBhIFZpZXdDb250YWluZXIhJyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fYXBwUmVmID0gYXBwUmVmOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogXEBpbnRlcm5hbAogICAgICogQHRlbXBsYXRlIFQKICAgICAqLwogICAgY2xhc3MgUm9vdFZpZXdSZWYgZXh0ZW5kcyBWaWV3UmVmIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IF92aWV3CiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoX3ZpZXcpIHsKICAgICAgICAgICAgc3VwZXIoX3ZpZXcpOwogICAgICAgICAgICB0aGlzLl92aWV3ID0gX3ZpZXc7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZGV0ZWN0Q2hhbmdlcygpIHsKICAgICAgICAgICAgZGV0ZWN0Q2hhbmdlc0luUm9vdFZpZXcodGhpcy5fdmlldyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgY2hlY2tOb0NoYW5nZXMoKSB7CiAgICAgICAgICAgIGNoZWNrTm9DaGFuZ2VzSW5Sb290Vmlldyh0aGlzLl92aWV3KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgY29udGV4dCgpIHsKICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovIChudWxsKSk7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHRWaWV3CiAgICAgKiBAcGFyYW0gez99IGxWaWV3CiAgICAgKiBAcGFyYW0gez99IHROb2RlCiAgICAgKiBAcGFyYW0gez99IHJlc3VsdAogICAgICogQHBhcmFtIHs/PX0gaXNQcm9qZWN0aW9uCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBjb2xsZWN0TmF0aXZlTm9kZXModFZpZXcsIGxWaWV3LCB0Tm9kZSwgcmVzdWx0LCBpc1Byb2plY3Rpb24gPSBmYWxzZSkgewogICAgICAgIHdoaWxlICh0Tm9kZSAhPT0gbnVsbCkgewogICAgICAgICAgICBuZ0Rldk1vZGUgJiYKICAgICAgICAgICAgICAgIGFzc2VydE5vZGVPZlBvc3NpYmxlVHlwZXModE5vZGUsIDMgLyogRWxlbWVudCAqLywgMCAvKiBDb250YWluZXIgKi8sIDEgLyogUHJvamVjdGlvbiAqLywgNCAvKiBFbGVtZW50Q29udGFpbmVyICovLCA1IC8qIEljdUNvbnRhaW5lciAqLyk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbE5vZGUgPSBsVmlld1t0Tm9kZS5pbmRleF07CiAgICAgICAgICAgIGlmIChsTm9kZSAhPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmVzdWx0LnB1c2godW53cmFwUk5vZGUobE5vZGUpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBBIGdpdmVuIGxOb2RlIGNhbiByZXByZXNlbnQgZWl0aGVyIGEgbmF0aXZlIG5vZGUgb3IgYSBMQ29udGFpbmVyICh3aGVuIGl0IGlzIGEgaG9zdCBvZiBhCiAgICAgICAgICAgIC8vIFZpZXdDb250YWluZXJSZWYpLiBXaGVuIHdlIGZpbmQgYSBMQ29udGFpbmVyIHdlIG5lZWQgdG8gZGVzY2VuZCBpbnRvIGl0IHRvIGNvbGxlY3Qgcm9vdCBub2RlcwogICAgICAgICAgICAvLyBmcm9tIHRoZSB2aWV3cyBpbiB0aGlzIGNvbnRhaW5lci4KICAgICAgICAgICAgaWYgKGlzTENvbnRhaW5lcihsTm9kZSkpIHsKICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSBDT05UQUlORVJfSEVBREVSX09GRlNFVDsgaSA8IGxOb2RlLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGxWaWV3SW5BQ29udGFpbmVyID0gbE5vZGVbaV07CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGxWaWV3Rmlyc3RDaGlsZFROb2RlID0gbFZpZXdJbkFDb250YWluZXJbVFZJRVddLmZpcnN0Q2hpbGQ7CiAgICAgICAgICAgICAgICAgICAgaWYgKGxWaWV3Rmlyc3RDaGlsZFROb2RlICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGNvbGxlY3ROYXRpdmVOb2RlcyhsVmlld0luQUNvbnRhaW5lcltUVklFV10sIGxWaWV3SW5BQ29udGFpbmVyLCBsVmlld0ZpcnN0Q2hpbGRUTm9kZSwgcmVzdWx0KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB0Tm9kZVR5cGUgPSB0Tm9kZS50eXBlOwogICAgICAgICAgICBpZiAodE5vZGVUeXBlID09PSA0IC8qIEVsZW1lbnRDb250YWluZXIgKi8gfHwgdE5vZGVUeXBlID09PSA1IC8qIEljdUNvbnRhaW5lciAqLykgewogICAgICAgICAgICAgICAgY29sbGVjdE5hdGl2ZU5vZGVzKHRWaWV3LCBsVmlldywgdE5vZGUuY2hpbGQsIHJlc3VsdCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAodE5vZGVUeXBlID09PSAxIC8qIFByb2plY3Rpb24gKi8pIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGNvbXBvbmVudFZpZXcgPSBsVmlld1tERUNMQVJBVElPTl9DT01QT05FTlRfVklFV107CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBjb21wb25lbnRIb3N0ID0gKC8qKiBAdHlwZSB7P30gKi8gKGNvbXBvbmVudFZpZXdbVF9IT1NUXSkpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3Qgc2xvdElkeCA9ICgvKiogQHR5cGUgez99ICovICh0Tm9kZS5wcm9qZWN0aW9uKSk7CiAgICAgICAgICAgICAgICBuZ0Rldk1vZGUgJiYKICAgICAgICAgICAgICAgICAgICBhc3NlcnREZWZpbmVkKGNvbXBvbmVudEhvc3QucHJvamVjdGlvbiwgJ0NvbXBvbmVudHMgd2l0aCBwcm9qZWN0aW9uIG5vZGVzICg8bmctY29udGVudD4pIG11c3QgaGF2ZSBwcm9qZWN0aW9uIHNsb3RzIGRlZmluZWQuJyk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBub2Rlc0luU2xvdCA9ICgvKiogQHR5cGUgez99ICovIChjb21wb25lbnRIb3N0LnByb2plY3Rpb24pKVtzbG90SWR4XTsKICAgICAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KG5vZGVzSW5TbG90KSkgewogICAgICAgICAgICAgICAgICAgIHJlc3VsdC5wdXNoKC4uLm5vZGVzSW5TbG90KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBwYXJlbnRWaWV3ID0gKC8qKiBAdHlwZSB7P30gKi8gKGdldExWaWV3UGFyZW50KGNvbXBvbmVudFZpZXcpKSk7CiAgICAgICAgICAgICAgICAgICAgbmdEZXZNb2RlICYmCiAgICAgICAgICAgICAgICAgICAgICAgIGFzc2VydERlZmluZWQocGFyZW50VmlldywgJ0NvbXBvbmVudCB2aWV3cyBzaG91bGQgYWx3YXlzIGhhdmUgYSBwYXJlbnQgdmlldyAoY29tcG9uZW50XCdzIGhvc3QgdmlldyknKTsKICAgICAgICAgICAgICAgICAgICBjb2xsZWN0TmF0aXZlTm9kZXMocGFyZW50Vmlld1tUVklFV10sIHBhcmVudFZpZXcsIG5vZGVzSW5TbG90LCByZXN1bHQsIHRydWUpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHROb2RlID0gaXNQcm9qZWN0aW9uID8gdE5vZGUucHJvamVjdGlvbk5leHQgOiB0Tm9kZS5uZXh0OwogICAgICAgIH0KICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogcGFja2FnZXMvY29yZS9zcmMvcmVuZGVyMy92aWV3X2VuZ2luZV9jb21wYXRpYmlsaXR5LnRzCiAgICAgKiBAc3VwcHJlc3Mge2NoZWNrVHlwZXMsY29uc3RhbnRQcm9wZXJ0eSxleHRyYVJlcXVpcmUsbWlzc2luZ092ZXJyaWRlLG1pc3NpbmdSZXR1cm4sdW51c2VkUHJpdmF0ZU1lbWJlcnMsdXNlbGVzc0NvZGV9IGNoZWNrZWQgYnkgdHNjCiAgICAgKi8KICAgIC8qKgogICAgICogQ3JlYXRlcyBhbiBFbGVtZW50UmVmIGZyb20gdGhlIG1vc3QgcmVjZW50IG5vZGUuCiAgICAgKgogICAgICogQHBhcmFtIHs/fSBFbGVtZW50UmVmVG9rZW4KICAgICAqIEByZXR1cm4gez99IFRoZSBFbGVtZW50UmVmIGluc3RhbmNlIHRvIHVzZQogICAgICovCiAgICBmdW5jdGlvbiBpbmplY3RFbGVtZW50UmVmKEVsZW1lbnRSZWZUb2tlbikgewogICAgICAgIHJldHVybiBjcmVhdGVFbGVtZW50UmVmKEVsZW1lbnRSZWZUb2tlbiwgZ2V0UHJldmlvdXNPclBhcmVudFROb2RlKCksIGdldExWaWV3KCkpOwogICAgfQogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgbGV0IFIzRWxlbWVudFJlZjsKICAgIC8qKgogICAgICogQ3JlYXRlcyBhbiBFbGVtZW50UmVmIGdpdmVuIGEgbm9kZS4KICAgICAqCiAgICAgKiBAcGFyYW0gez99IEV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gICAgKiBAcGFyYW0gez99IF9kZWNsYXJhdGlvblRDb250YWluZXIKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudFJlZgogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBjb25zdHJ1Y3RvcihfZGVjbGFyYXRpb25WaWV3LCBfZGVjbGFyYXRpb25UQ29udGFpbmVyLCBlbGVtZW50UmVmKSB7CiAgICAgICAgICAgICAgICAgICAgc3VwZXIoKTsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9kZWNsYXJhdGlvblZpZXcgPSBfZGVjbGFyYXRpb25WaWV3OwogICAgICAgICAgICAgICAgICAgIHRoaXMuX2RlY2xhcmF0aW9uVENvbnRhaW5lciA9IF9kZWNsYXJhdGlvblRDb250YWluZXI7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5lbGVtZW50UmVmID0gZWxlbWVudFJlZjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjb250ZXh0CiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBjcmVhdGVFbWJlZGRlZFZpZXcoY29udGV4dCkgewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBlbWJlZGRlZFRWaWV3ID0gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX2RlY2xhcmF0aW9uVENvbnRhaW5lci50Vmlld3MpKTsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgZW1iZWRkZWRMVmlldyA9IGNyZWF0ZUxWaWV3KHRoaXMuX2RlY2xhcmF0aW9uVmlldywgZW1iZWRkZWRUVmlldywgY29udGV4dCwgMTYgLyogQ2hlY2tBbHdheXMgKi8sIG51bGwsIGVtYmVkZGVkVFZpZXcubm9kZSk7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGRlY2xhcmF0aW9uTENvbnRhaW5lciA9IHRoaXMuX2RlY2xhcmF0aW9uVmlld1t0aGlzLl9kZWNsYXJhdGlvblRDb250YWluZXIuaW5kZXhdOwogICAgICAgICAgICAgICAgICAgIG5nRGV2TW9kZSAmJiBhc3NlcnRMQ29udGFpbmVyKGRlY2xhcmF0aW9uTENvbnRhaW5lcik7CiAgICAgICAgICAgICAgICAgICAgZW1iZWRkZWRMVmlld1tERUNMQVJBVElPTl9MQ09OVEFJTkVSXSA9IGRlY2xhcmF0aW9uTENvbnRhaW5lcjsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgZGVjbGFyYXRpb25WaWV3TFF1ZXJpZXMgPSB0aGlzLl9kZWNsYXJhdGlvblZpZXdbUVVFUklFU107CiAgICAgICAgICAgICAgICAgICAgaWYgKGRlY2xhcmF0aW9uVmlld0xRdWVyaWVzICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGVtYmVkZGVkTFZpZXdbUVVFUklFU10gPSBkZWNsYXJhdGlvblZpZXdMUXVlcmllcy5jcmVhdGVFbWJlZGRlZFZpZXcoZW1iZWRkZWRUVmlldyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHJlbmRlclZpZXcoZW1iZWRkZWRUVmlldywgZW1iZWRkZWRMVmlldywgY29udGV4dCk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBWaWV3UmVmKGVtYmVkZGVkTFZpZXcpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9OwogICAgICAgIH0KICAgICAgICBpZiAoaG9zdFROb2RlLnR5cGUgPT09IDAgLyogQ29udGFpbmVyICovKSB7CiAgICAgICAgICAgIG5nRGV2TW9kZSAmJi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q29udGFpbmVyUmVmVG9rZW4sIEVsZW1lbnRSZWZUb2tlbiwgcHJldmlvdXNUTm9kZSwgZ2V0TFZpZXcoKSk7CiAgICB9CiAgICAvKioKICAgICAqIENyZWF0ZXMgYSBWaWV3Q29udGFpbmVyUmVmIGFuZCBzdG9yZXMgaXQgb24gdGhlIGluamVjdG9yLgogICAgICoKICAgICAqIEBwYXJhbSB7P30gVmlld0NvbnRhaW5lclJlZlRva2VuIFRoZSBWaWV3Q29udGFpbmVyUmVmIHR5cGUKICAgICAqIEBwYXJhbSB7P30gRWxlbWVudFJlZlRva2VuIFRoZSBFbGVtZW50UmVmIHR5cGUKICAgICAqIEBwYXJhbSB7P30gaG9zdFROb2RlIFRoZSBub2RlIHRoYXQgaXMgcmVxdWVzdGluZyBhIFZpZXdDb250YWluZXJSZWYKICAgICAqIEBwYXJhbSB7P30gaG9zdFZpZXcgVGhlIHZpZXcgdG8gd2hpY2ggdGhlIG5vZGUgYmVsb25ncwogICAgICogQHJldHVybiB7P30gVGhlIFZpZXdDb250YWluZXJSZWYgaW5zdGFuY2UgdG8gdXNlCiAgICAgKi8KICAgIGZ1bmN0aW9uIGNyZWF0ZUNvbnRhaW5lclJlZihWaWV3Q29udGFpbmVyUmVmVG9rZW4sIEVsZW1lbnRSZWZUb2tlbiwgaG9zdFROb2RlLCBob3N0VmlldykgewogICAgICAgIGlmICghUjNWaWV3Q29udGFpbmVyUmVmKSB7CiAgICAgICAgICAgIFIzVmlld0NvbnRhaW5lclJlZiA9IGNsYXNzIFZpZXdDb250YWluZXJSZWYgZXh0ZW5kcyBWaWV3Q29udGFpbmVyUmVmVG9rZW4gewogICAgICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IF9sQ29udGFpbmVyCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IF9ob3N0VE5vZGUKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX2hvc3RWaWV3CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIGNvbnN0cnVjdG9yKF9sQ29udGFpbmVyLCBfaG9zdFROb2RlLCBfaG9zdFZpZXcpIHsKICAgICAgICAgICAgICAgICAgICBzdXBlcigpOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX2xDb250YWluZXIgPSBfbENvbnRhaW5lcjsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9ob3N0VE5vZGUgPSBfaG9zdFROb2RlOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX2hvc3RWaWV3ID0gX2hvc3RWaWV3OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBnZXQgZWxlbWVudCgpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gY3JlYXRlRWxlbWVudFJlZihFbGVtZW50UmVmVG9rZW4sIHRoaXMuX2hvc3RUTm9kZSwgdGhpcy5faG9zdFZpZXcpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBnZXQgaW5qZWN0b3IoKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBOb2RlSW5qZWN0b3IodGhpcy5faG9zdFROb2RlLCB0aGlzLl9ob3N0Vmlldyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvKioKICAgICAgICAgICAgICAgICAqIEBkZXByZWNhdGVkIE5vIHJlcGxhY2VtZW50CiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBnZXQgcGFyZW50SW5qZWN0b3IoKSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHBhcmVudExvY2F0aW9uID0gZ2V0UGFyZW50SW5qZWN0b3JMb2NhdGlvbih0aGlzLl9ob3N0VE5vZGUsIHRoaXMuX2hvc3RWaWV3KTsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgcGFyZW50VmlldyA9IGdldFBhcmVudEluamVjdG9yVmlldyhwYXJlbnRMb2NhdGlvbiwgdGhpcy5faG9zdFZpZXcpOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBwYXJlbnRUTm9kZSA9IGdldFBhcmVudEluamVjdG9yVE5vZGUocGFyZW50TG9jYXRpb24sIHRoaXMuX2hvc3RWaWV3LCB0aGlzLl9ob3N0VE5vZGUpOwogICAgICAgICAgICAgICAgICAgIHJldHVybiAhaGFzUGFyZW50SW5qZWN0b3IocGFyZW50TG9jYXRpb24pIHx8IHBhcmVudFROb2RlID09IG51bGwgPwogICAgICAgICAgICAgICAgICAgICAgICBuZXcgTm9kZUluamVjdG9yKG51bGwsIHRoaXMuX2hvc3RWaWV3KSA6CiAgICAgICAgICAgICAgICAgICAgICAgIG5ldyBOb2RlSW5qZWN0b3IocGFyZW50VE5vZGUsIHBhcmVudFZpZXcpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBjbGVhcigpIHsKICAgICAgICAgICAgICAgICAgICB3aGlsZSAodGhpcy5sZW5ndGggPiAwKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucmVtb3ZlKHRoaXMubGVuZ3RoIC0gMSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGluZGV4CiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBnZXQoaW5kZXgpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fbENvbnRhaW5lcltWSUVXX1JFRlNdICE9PSBudWxsICYmICgvKiogQHR5cGUgez99ICovICh0aGlzLl9sQ29udGFpbmVyW1ZJRVdfUkVGU10pKVtpbmRleF0gfHwgbnVsbDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgZ2V0IGxlbmd0aCgpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fbENvbnRhaW5lci5sZW5ndGggLSBDT05UQUlORVJfSEVBREVSX09GRlNFVDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgICAgICogQHRlbXBsYXRlIEMKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdGVtcGxhdGVSZWYKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7Pz19IGNvbnRleHQKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7Pz19IGluZGV4CiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBjcmVhdGVFbWJlZGRlZFZpZXcodGVtcGxhdGVSZWYsIGNvbnRleHQsIGluZGV4KSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHZpZXdSZWYgPSB0ZW1wbGF0ZVJlZi5jcmVhdGVFbWJlZGRlZFZpZXcoY29udGV4dCB8fCAoLyoqIEB0eXBlIHs/fSAqLyAoe30pKSk7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5pbnNlcnQodmlld1JlZiwgaW5kZXgpOwogICAgICAgICAgICAgICAgICAgIHJldHVybiB2aWV3UmVmOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAgICAgKiBAdGVtcGxhdGUgQwogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjb21wb25lbnRGYWN0b3J5CiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez89fSBpbmRleAogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/PX0gaW5qZWN0b3IKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7Pz19IHByb2plY3RhYmxlTm9kZXMKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7Pz19IG5nTW9kdWxlUmVmCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBjcmVhdGVDb21wb25lbnQoY29tcG9uZW50RmFjdG9yeSwgaW5kZXgsIGluamVjdG9yLCBwcm9qZWN0YWJsZU5vZGVzLCBuZ01vZHVsZVJlZikgewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBjb250ZXh0SW5qZWN0b3IgPSBpbmplY3RvciB8fCB0aGlzLnBhcmVudEluamVjdG9yOwogICAgICAgICAgICAgICAgICAgIGlmICghbmdNb2R1bGVSZWYgJiYgKCgvKiogQHR5cGUgez99ICovIChjb21wb25lbnRGYWN0b3J5KSkpLm5nTW9kdWxlID09IG51bGwgJiYgY29udGV4dEluamVjdG9yKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIERPIE5PVCBSRUZBQ1RPUi4gVGhlIGNvZGUgaGVyZSB1c2VkIHRvIGhhdmUgYSBgdmFsdWUgfHwgdW5kZWZpbmVkYCBleHByZXNzaW9uCiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHdoaWNoIHNlZW1zIHRvIGNhdXNlIGludGVybmFsIGdvb2dsZSBhcHBzIHRvIGZhaWwuIFRoaXMgaXMgZG9jdW1lbnRlZCBpbiB0aGUKICAgICAgICAgICAgICAgICAgICAgICAgLy8gZm9sbG93aW5nIGludGVybmFsIGJ1ZyBpc3N1ZTogZ28vYi8xNDI5Njc4MDIKICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCByZXN1bHQgPSBjb250ZXh0SW5qZWN0b3IuZ2V0KE5nTW9kdWxlUmVmLCBudWxsKTsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3VsdCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgbmdNb2R1bGVSZWYgPSByZXN1bHQ7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGNvbXBvbmVudFJlZiA9IGNvbXBvbmVudEZhY3RvcnkuY3JlYXRlKGNvbnRleHRJbmplY3RvciwgcHJvamVjdGFibGVOb2RlcywgdW5kZWZpbmVkLCBuZ01vZHVsZVJlZik7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5pbnNlcnQoY29tcG9uZW50UmVmLmhvc3RWaWV3LCBpbmRleCk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNvbXBvbmVudFJlZjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSB2aWV3UmVmCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez89fSBpbmRleAogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgaW5zZXJ0KHZpZXdSZWYsIGluZGV4KSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGxWaWV3ID0gKC8qKiBAdHlwZSB7P30gKi8gKCgoLyoqIEB0eXBlIHs/fSAqLyAodmlld1JlZikpKS5fbFZpZXcpKTsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgdFZpZXcgPSBsVmlld1tUVklFV107CiAgICAgICAgICAgICAgICAgICAgaWYgKHZpZXdSZWYuZGVzdHJveWVkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignQ2Fubm90IGluc2VydCBhIGRlc3Ryb3llZCBWaWV3IGluIGEgVmlld0NvbnRhaW5lciEnKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgdGhpcy5hbGxvY2F0ZUNvbnRhaW5lcklmTmVlZGVkKCk7CiAgICAgICAgICAgICAgICAgICAgaWYgKHZpZXdBdHRhY2hlZFRvQ29udGFpbmVyKGxWaWV3KSkgewogICAgICAgICAgICAgICAgICAgICAgICAvLyBJZiB2aWV3IGlzIGFscmVhZHkgYXR0YWNoZWQsIGRldGFjaCBpdCBmaXJzdCBzbyB3ZSBjbGVhbiB1cCByZWZlcmVuY2VzIGFwcHJvcHJpYXRlbHkuCiAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgcHJldklkeCA9IHRoaXMuaW5kZXhPZih2aWV3UmVmKTsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gQSB2aWV3IG1pZ2h0IGJlIGF0dGFjaGVkIGVpdGhlciB0byB0aGlzIG9yIGEgZGlmZmVyZW50IGNvbnRhaW5lci4gVGhlIGBwcmV2SWR4YCBmb3IKICAgICAgICAgICAgICAgICAgICAgICAgLy8gdGhvc2UgY2FzZXMgd2lsbCBiZToKICAgICAgICAgICAgICAgICAgICAgICAgLy8gZXF1YWwgdG8gLTEgZm9yIHZpZXdzIGF0dGFjaGVkIHRvIHRoaXMgVmlld0NvbnRhaW5lclJlZgogICAgICAgICAgICAgICAgICAgICAgICAvLyA+PSAwIGZvciB2aWV3cyBhdHRhY2hlZCB0byBhIGRpZmZlcmVudCBWaWV3Q29udGFpbmVyUmVmCiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwcmV2SWR4ICE9PSAtMSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5kZXRhY2gocHJldklkeCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBwcmV2TENvbnRhaW5lciA9ICgvKiogQHR5cGUgez99ICovIChsVmlld1tQQVJFTlRdKSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZ0Rldk1vZGUgJiYKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhc3NlcnRFcXVhbChpc0xDb250YWluZXIocHJldkxDb250YWluZXIpLCB0cnVlLCAnQW4gYXR0YWNoZWQgdmlldyBzaG91bGQgaGF2ZSBpdHMgUEFSRU5UIHBvaW50IHRvIGEgY29udGFpbmVyLicpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gV2UgbmVlZCB0byByZS1jcmVhdGUgYSBSM1ZpZXdDb250YWluZXJSZWYgaW5zdGFuY2Ugc2luY2UgdGhvc2UgYXJlIG5vdCBzdG9yZWQgb24KICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIExWaWV3IChub3IgYW55d2hlcmUgZWxzZSkuCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBwcmV2VkNSZWYgPSBuZXcgUjNWaWV3Q29udGFpbmVyUmVmKHByZXZMQ29udGFpbmVyLCAoLyoqIEB0eXBlIHs/fSAqLyAocHJldkxDb250YWluZXJbVF9IT1NUXSkpLCBwcmV2TENvbnRhaW5lcltQQVJFTlRdKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByZXZWQ1JlZi5kZXRhY2gocHJldlZDUmVmLmluZGV4T2Yodmlld1JlZikpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBhZGp1c3RlZElkeCA9IHRoaXMuX2FkanVzdEluZGV4KGluZGV4KTsKICAgICAgICAgICAgICAgICAgICBpbnNlcnRWaWV3KHRWaWV3LCBsVmlldywgdGhpcy5fbENvbnRhaW5lciwgYWRqdXN0ZWRJZHgpOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBiZWZvcmVOb2RlID0gZ2V0QmVmb3JlTm9kZUZvclZpZXcoYWRqdXN0ZWRJZHgsIHRoaXMuX2xDb250YWluZXIpOwogICAgICAgICAgICAgICAgICAgIGFkZFJlbW92ZVZpZXdGcm9tQ29udGFpbmVyKHRWaWV3LCBsVmlldywgdHJ1ZSwgYmVmb3JlTm9kZSk7CiAgICAgICAgICAgICAgICAgICAgKCgvKiogQHR5cGUgez99ICovICh2aWV3UmVmKSkpLmF0dGFjaFRvVmlld0NvbnRhaW5lclJlZih0aGlzKTsKICAgICAgICAgICAgICAgICAgICBhZGRUb0FycmF5KCgvKiogQHR5cGUgez99ICovICh0aGlzLl9sQ29udGFpbmVyW1ZJRVdfUkVGU10pKSwgYWRqdXN0ZWRJZHgsIHZpZXdSZWYpOwogICAgICAgICAgICAgICAgICAgIHJldHVybiB2aWV3UmVmOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHZpZXdSZWYKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbmV3SW5kZXgKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIG1vdmUodmlld1JlZiwgbmV3SW5kZXgpIHsKICAgICAgICAgICAgICAgICAgICBpZiAodmlld1JlZi5kZXN0cm95ZWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdDYW5ub3QgbW92ZSBhIGRlc3Ryb3llZCBWaWV3IGluIGEgVmlld0NvbnRhaW5lciEnKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuaW5zZXJ0KHZpZXdSZWYsIG5ld0luZGV4KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSB2aWV3UmVmCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBpbmRleE9mKHZpZXdSZWYpIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3Qgdmlld1JlZnNBcnIgPSB0aGlzLl9sQ29udGFpbmVyW1ZJRVdfUkVGU107CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHZpZXdSZWZzQXJyICE9PSBudWxsID8gdmlld1JlZnNBcnIuaW5kZXhPZih2aWV3UmVmKSA6IC0xOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez89fSBpbmRleAogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgcmVtb3ZlKGluZGV4KSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5hbGxvY2F0ZUNvbnRhaW5lcklmTmVlZGVkKCk7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGFkanVzdGVkSWR4ID0gdGhpcy5fYWRqdXN0SW5kZXgoaW5kZXgsIC0xKTsKICAgICAgICAgICAgICAgICAgICByZW1vdmVWaWV3KHRoaXMuX2xDb250YWluZXIsIGFkanVzdGVkSWR4KTsKICAgICAgICAgICAgICAgICAgICByZW1vdmVGcm9tQXJyYXkoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX2xDb250YWluZXJbVklFV19SRUZTXSkpLCBhZGp1c3RlZElkeCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7Pz19IGluZGV4CiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBkZXRhY2goaW5kZXgpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLmFsbG9jYXRlQ29udGFpbmVySWZOZWVkZWQoKTsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgYWRqdXN0ZWRJZHggPSB0aGlzLl9hZGp1c3RJbmRleChpbmRleCwgLTEpOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCB2aWV3ID0gZGV0YWNoVmlldyh0aGlzLl9sQ29udGFpbmVyLCBhZGp1c3RlZElkeCk7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHdhc0RldGFjaGVkID0gdmlldyAmJiByZW1vdmVGcm9tQXJyYXkoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX2xDb250YWluZXJbVklFV19SRUZTXSkpLCBhZGp1c3RlZElkeCkgIT0gbnVsbDsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gd2FzRGV0YWNoZWQgPyBuZXcgVmlld1JlZigoLyoqIEB0eXBlIHs/fSAqLyAodmlldykpKSA6IG51bGw7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvKioKICAgICAgICAgICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez89fSBpbmRleAogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/PX0gc2hpZnQKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIF9hZGp1c3RJbmRleChpbmRleCwgc2hpZnQgPSAwKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKGluZGV4ID09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMubGVuZ3RoICsgc2hpZnQ7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGlmIChuZ0Rldk1vZGUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgYXNzZXJ0R3JlYXRlclRoYW4oaW5kZXgsIC0xLCBgVmlld1JlZiBpbmRleCBtdXN0IGJlIHBvc2l0aXZlLCBnb3QgJHtpbmRleH1gKTsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gKzEgYmVjYXVzZSBpdCdzIGxlZ2FsIHRvIGluc2VydCBhdCB0aGUgZW5kLgogICAgICAgICAgICAgICAgICAgICAgICBhc3NlcnRMZXNzVGhhbihpbmRleCwgdGhpcy5sZW5ndGggKyAxICsgc2hpZnQsICdpbmRleCcpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gaW5kZXg7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvKioKICAgICAgICAgICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBhbGxvY2F0ZUNvbnRhaW5lcklmTmVlZGVkKCkgewogICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLl9sQ29udGFpbmVyW1ZJRVdfUkVGU10gPT09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fbENvbnRhaW5lcltWSUVXX1JFRlNdID0gW107CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9OwogICAgICAgIH0KICAgICAgICBuZ0Rldk1vZGUgJiYKICAgICAgICAgICAgYXNzZXJ0Tm9kZU9mUG9zc2libGVUeXBlcyhob3N0VE5vZGUsIDAgLyogQ29udGFpbmVyICovLCAzIC8qIEVsZW1lbnQgKi8sIDQgLyogRWxlbWVudENvbnRhaW5lciAqLyk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBsQ29udGFpbmVyOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBzbG90VmFsdWUgPSBob3N0Vmlld1tob3N0VE5vZGUuaW5kZXhdOwogICAgICAgIGlmIChpc0xDb250YWluZXIoc2xvdFZhbHVlKSkgewogICAgICAgICAgICAvLyBJZiB0aGUgaG9zdCBpcyBhIGNvbnRhaW5lciwgd2UgZG9uJ3QgbmVlZCB0byBjcmVhdGUgYSBuZXcgTENvbnRhaW5lcgogICAgICAgICAgICBsQ29udGFpbmVyID0gc2xvdFZhbHVlOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgY29tbWVudE5vZGU7CiAgICAgICAgICAgIC8vIElmIHRoZSBob3N0IGlzIGFuIGVsZW1lbnQgY29udGFpbmVyLCB0aGUgbmF0aXZlIGhvc3QgZWxlbWVudCBpcyBndWFyYW50ZWVkIHRvIGJlIGEKICAgICAgICAgICAgLy8gY29tbWVudCBhbmQgd2UgY2FuIHJldXNlIHRoYXQgY29tbWVudCBhcyBhbmNob3IgZWxlbWVudCBmb3IgdGhlIG5ldyBMQ29udGFpbmVyLgogICAgICAgICAgICAvLyBUaGUgY29tbWVudCBub2RlIGluIHF1ZXN0aW9uIGlzIGFscmVhZHkgcGFydCBvZiB0aGUgRE9NIHN0cnVjdHVyZSBzbyB3ZSBkb24ndCBuZWVkIHRvIGFwcGVuZAogICAgICAgICAgICAvLyBpdCBhZ2Fpbi4KICAgICAgICAgICAgaWYgKGhvc3RUTm9kZS50eXBlID09PSA0IC8qIEVsZW1lbnRDb250YWluZXIgKi8pIHsKICAgICAgICAgICAgICAgIGNvbW1lbnROb2RlID0gKC8qKiBAdHlwZSB7P30gKi8gKHVud3JhcFJOb2RlKHNsb3RWYWx1ZSkpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIG5nRGV2TW9kZSAmJiBuZ0Rldk1vZGUucmVuZGVyZXJDcmVhdGVDb21tZW50Kys7CiAgICAgICAgICAgICAgICBjb21tZW50Tm9kZSA9IGhvc3RWaWV3W1JFTkRFUkVSXS5jcmVhdGVDb21tZW50KG5nRGV2TW9kZSA/ICdjb250YWluZXInIDogJycpOwogICAgICAgICAgICAgICAgLy8gQSBgVmlld0NvbnRhaW5lclJlZmAgY2FuIGJlIGluamVjdGVkIGJ5IHRoZSByb290ICh0b3Btb3N0IC8gYm9vdHN0cmFwcGVkKSBjb21wb25lbnQuIEluCiAgICAgICAgICAgICAgICAvLyB0aGlzIGNhc2Ugd2UgY2FuJ3QgdXNlIFRWaWV3IC8gVE5vZGUgZGF0YSBzdHJ1Y3R1cmVzIHRvIGluc2VydCBjb250YWluZXIncyBtYXJrZXIgbm9kZQogICAgICAgICAgICAgICAgLy8gKGJvdGggYSBwYXJlbnQgb2YgYSBjb21tZW50IG5vZGUgYW5kIHRoZSBjb21tZW50IG5vZGUgaXRzZWxmIGFyZSBub3QgcGFydCBvZiBhbnkgdmlldykuIEluCiAgICAgICAgICAgICAgICAvLyB0aGlzIHNwZWNpZmljIGNhc2Ugd2UgdXNlIGxvdy1sZXZlbCBET00gbWFuaXB1bGF0aW9uIHRvIGluc2VydCBjb250YWluZXIncyBtYXJrZXIgKGNvbW1lbnQpCiAgICAgICAgICAgICAgICAvLyBub2RlLgogICAgICAgICAgICAgICAgaWYgKGlzUm9vdFZpZXcoaG9zdFZpZXcpKSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHJlbmRlcmVyID0gaG9zdFZpZXdbUkVOREVSRVJdOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBob3N0TmF0aXZlID0gKC8qKiBAdHlwZSB7P30gKi8gKGdldE5hdGl2ZUJ5VE5vZGUoaG9zdFROb2RlLCBob3N0VmlldykpKTsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgcGFyZW50T2ZIb3N0TmF0aXZlID0gbmF0aXZlUGFyZW50Tm9kZShyZW5kZXJlciwgaG9zdE5hdGl2ZSk7CiAgICAgICAgICAgICAgICAgICAgbmF0aXZlSW5zZXJ0QmVmb3JlKHJlbmRlcmVyLCAoLyoqIEB0eXBlIHs/fSAqLyAocGFyZW50T2ZIb3N0TmF0aXZlKSksIGNvbW1lbnROb2RlLCBuYXRpdmVOZXh0U2libGluZyhyZW5kZXJlciwgaG9zdE5hdGl2ZSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgYXBwZW5kQ2hpbGQoaG9zdFZpZXdbVFZJRVddLCBob3N0VmlldywgY29tbWVudE5vZGUsIGhvc3RUTm9kZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaG9zdFZpZXdbaG9zdFROb2RlLm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ZW1lbnRDb250YWluZXIgKi8gfHwgdE5vZGUudHlwZSA9PT0gNSAvKiBJY3VDb250YWluZXIgKi8pIHsKICAgICAgICAgICAgLy8gVGhlIExWaWV3IHJlcHJlc2VudHMgdGhlIGxvY2F0aW9uIHdoZXJlIHRoZSBpbmplY3Rpb24gaXMgcmVxdWVzdGVkIGZyb20uCiAgICAgICAgICAgIC8vIFdlIG5lZWQgdG8gbG9jYXRlIHRoZSBjb250YWluaW5nIExWaWV3IChpbiBjYXNlIHdoZXJlIHRoZSBgbFZpZXdgIGlzIGFuIGVtYmVkZGVkIHZpZXcpCiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaG9zdENvbXBvbmVudFZpZXcgPSBsVmlld1tERUNMQVJBVElPTl9DT01QT05FTlRfVklFV107CiAgICAgICAgICAgIHJldHVybiBuZXcgVmlld1JlZihob3N0Q29tcG9uZW50VmlldywgbFZpZXcpOwogICAgICAgIH0KICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKG51bGwpKTsKICAgIH0KICAgIC8qKgogICAgICogUmV0dXJucyBhIFJlbmRlcmVyMiAob3IgdGhyb3dzIHdoZW4gYXBwbGljYXRpb24gd2FzIGJvb3RzdHJhcHBlZCB3aXRoIFJlbmRlcmVyMykKICAgICAqIEBwYXJhbSB7P30gdmlldwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0T3JDcmVhdGVSZW5kZXJlcjIodmlldykgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCByZW5kZXJlciA9IHZpZXdbUkVOREVSRVJdOwogICAgICAgIGlmIChpc1Byb2NlZHVyYWxSZW5kZXJlcihyZW5kZXJlcikpIHsKICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovIChyZW5kZXJlcikpOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdDYW5ub3QgaW5qZWN0IFJlbmRlcmVyMiB3aGVuIHRoZSBhcHBsaWNhdGlvbiB1c2VzIFJlbmRlcmVyMyEnKTsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEluamVjdHMgYSBSZW5kZXJlcjIgZm9yIHRoZSBjdXJyZW50IGNvbXBvbmVudC4KICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGluamVjdFJlbmRlcmVyMigpIHsKICAgICAgICAvLyBXZSBuZWVkIHRoZSBSZW5kZXJlciB0byBiZSBiYXNlZCBvbiB0aGUgY29tcG9uZW50IHRoYXQgaXQncyBiZWluZyBpbmplY3RlZCBpbnRvLCBob3dldmVyIHNpbmNlCiAgICAgICAgLy8gREkgaGFwcGVucyBiZWZvcmUgd2UndmUgZW50ZXJlZCBpdHMgdmlldywgYGdldExWaWV3YCB3aWxsIHJldHVybiB0aGUgcGFyZW50IHZpZXcgaW5zdGVhZC4KICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgbFZpZXcgPSBnZXRMVmlldygpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCB0Tm9kZSA9IGdldFByZXZpb3VzT3JQYXJlbnRUTm9kZSgpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBub2RlQXRJbmRleCA9IGdldENvbXBvbmVudExWaWV3QnlJbmRleCh0Tm9kZS5pbmRleCwgbFZpZXcpOwogICAgICAgIHJldHVybiBnZXRPckNyZWF0ZVJlbmRlcmVyMihpc0xWaWV3KG5vZGVBdEluZGV4KSA/IG5vZGVBdEluZGV4IDogbFZpZXcpOwogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogcGFja2FnZXMvY29yZS9zcmMvY2hhbmdlX2RldGVjdGlvbi9jaGFuZ2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ICAgICAgX3ppcFR5cGVzQW5kQW5ub3RhdGlvbnMocGFyYW1UeXBlcywgcGFyYW1Bbm5vdGF0aW9ucykgewogICAgICAgICAgICBsZXQgcmVzdWx0OwogICAgICAgICAgICBpZiAodHlwZW9mIHBhcmFtVHlwZXMgPT09ICd1bmRlZmluZWQnKSB7CiAgICAgICAgICAgICAgICByZXN1bHQgPSBuZXdBcnJheShwYXJhbUFubm90YXRpb25zLmxlbmd0aCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICByZXN1bHQgPSBuZXdBcnJheShwYXJhbVR5cGVzLmxlbmd0aCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCByZXN1bHQubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIC8vIFRTIG91dHB1dHMgT2JqZWN0IGZvciBwYXJhbWV0ZXJzIHdpdGhvdXQgdHlwZXMsIHdoaWxlIFRyYWNldXIgb21pdHMKICAgICAgICAgICAgICAgIC8vIHRoZSBhbm5vdGF0aW9ucy4gRm9yIG5vdyB3ZSBwcmVzZXJ2ZSB0aGUgVHJhY2V1ciBiZWhhdmlvciB0byBhaWQKICAgICAgICAgICAgICAgIC8vIG1pZ3JhdGlvbiwgYnV0IHRoaXMgY2FuIGJlIHJldmlzaXRlZC4KICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgcGFyYW1UeXBlcyA9PT0gJ3VuZGVmaW5lZCcpIHsKICAgICAgICAgICAgICAgICAgICByZXN1bHRbaV0gPSBbXTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKHBhcmFtVHlwZXNbaV0gJiYgcGFyYW1UeXBlc1tpXSAhPSBPYmplY3QpIHsKICAgICAgICAgICAgICAgICAgICByZXN1bHRbaV0gPSBbcGFyYW1UeXBlc1tpXV07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICByZXN1bHRbaV0gPSBbXTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChwYXJhbUFubm90YXRpb25zICYmIHBhcmFtQW5ub3RhdGlvbnNbaV0gIT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIHJlc3VsdFtpXSA9IHJlc3VsdFtpXS5jb25jYXQocGFyYW1Bbm5vdGF0aW9uc1tpXSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDsKICAgICAgICB9CiAgICAgICAgX293blBhcmFtZXRlcnModHlwZSwgcGFyZW50Q3RvcikgewogICAgICAgICAgICBjb25zdCB0eXBlU3RyID0gdHlwZS50b1N0cmluZygpOwogICAgICAgICAgICAvLyBJZiB3ZSBoYXZlIG5vIGRlY29yYXRvcnMsIHdlIG9ubHkgaGF2ZSBmdW5jdGlvbi5sZW5ndGggYXMgbWV0YWRhdGEuCiAgICAgICAgICAgIC8vIEluIHRoYXQgY2FzZSwgdG8gZGV0ZWN0IHdoZXRoZXIgYSBjaGlsZCBjbGFzcyBkZWNsYXJlZCBhbiBvd24gY29uc3RydWN0b3Igb3Igbm90LAogICAgICAgICAgICAvLyB3ZSBuZWVkIHRvIGxvb2sgaW5zaWRlIG9mIHRoYXQgY29uc3RydWN0b3IgdG8gY2hlY2sgd2hldGhlciBpdCBpcwogICAgICAgICAgICAvLyBqdXN0IGNhbGxpbmcgdGhlIHBhcmVudC4KICAgICAgICAgICAgLy8gVGhpcyBhbHNvIGhlbHBzIHRvIHdvcmsgYXJvdW5kIGZvciBodHRwczovL2dpdGh1Yi5jb20vTWljcm9zb2Z0L1R5cGVTY3JpcHQvaXNzdWVzLzEyNDM5CiAgICAgICAgICAgIC8vIHRoYXQgc2V0cyAnZGVzaWduOnBhcmFtdHlwZXMnIHRvIFtdCiAgICAgICAgICAgIC8vIGlmIGEgY2xhc3MgaW5oZXJpdHMgZnJvbSBhb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WN0IEFQSS4KICAgICAgICAgICAgaWYgKHR5cGVPckZ1bmMuYW5ub3RhdGlvbnMgJiYgdHlwZU9yRnVuYy5hbm5vdGF0aW9ucyAhPT0gcGFyZW50Q3Rvci5hbm5vdGF0aW9ucykgewogICAgICAgICAgICAgICAgbGV0IGFubm90YXRpb25zID0gdHlwZU9yRnVuYy5hbm5vdGF0aW9uczsKICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgYW5ub3RhdGlvbnMgPT09ICdmdW5jdGlvbicgJiYgYW5ub3RhdGlvbnMuYW5ub3RhdGlvbnMpIHsKICAgICAgICAgICAgICAgICAgICBhbm5vdGF0aW9ucyA9IGFubm90YXRpb25zLmFubm90YXRpb25zOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIGFubm90YXRpb25zOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIEFQSSBvZiB0c2lja2xlIGZvciBsb3dlcmluZyBkZWNvcmF0b3JzIHRvIHByb3BlcnRpZXMgb24gdGhlIGNsYXNzLgogICAgICAgICAgICBpZiAodHlwZU9yRnVuYy5kZWNvcmF0b3JzICYmIHR5cGVPckZ1bmMuZGVjb3JhdG9ycyAhPT0gcGFyZW50Q3Rvci5kZWNvcmF0b3JzKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gY29udmVydFRzaWNrbGVEZWNvcmF0b3JJbnRvTWV0YWRhdGEodHlwZU9yRnVuYy5kZWNvcmF0b3JzKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBBUEkgZm9yIG1ldGFkYXRhIGNyZWF0ZWQgYnkgaW52b2tpbmcgdGhlIGRlY29yYXRvcnMuCiAgICAgICAgICAgIGlmICh0eXBlT3JGdW5jLmhhc093blByb3BlcnR5KEFOTk9UQVRJT05TKSkgewogICAgICAgICAgICAgICAgcmV0dXJuIHR5cGVPckZ1bmNbQU5OT1RBVElPTlNdOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgIH0KICAgICAgICBhbm5vdGF0aW9ucyh0eXBlT3JGdW5jKSB7CiAgICAgICAgICAgIGlmICghaXNUeXBlKHR5cGVPckZ1bmMpKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gW107CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY29uc3QgcGFyZW50Q3RvciA9IGdldFBhcmVudEN0b3IodHlwZU9yRnVuYyk7CiAgICAgICAgICAgIGNvbnN0IG93bkFubm90YXRpb25zID0gdGhpcy5fb3duQW5ub3RhdGlvbnModHlwZU9yRnVuYywgcGFyZW50Q3RvcikgfHwgW107CiAgICAgICAgICAgIGNvbnN0IHBhcmVudEFubm90YXRpb25zID0gcGFyZW50Q3RvciAhPT0gT2JqZWN0ID8gdGhpcy5hbm5vdGF0aW9ucyhwYXJlbnRDdG9yKSA6IFtdOwogICAgICAgICAgICByZXR1cm4gcGFyZW50QW5ub3RhdGlvbnMuY29uY2F0KG93bkFubm90YXRpb25zKTsKICAgICAgICB9CiAgICAgICAgX293blByb3BNZXRhZGF0YSh0eXBlT3JGdW5jLCBwYXJlbnRDdG9yKSB7CiAgICAgICAgICAgIC8vIFByZWZlciB0aGUgZGlyZWN0IEFQSS4KICAgICAgICAgICAgaWYgKHR5cGVPckZ1bmMucHJvcE1ldGFkYXRhICYmCiAgICAgICAgICAgICAgICB0eXBlT3JGdW5jLnByb3BNZXRhZGF0YSAhPT0gcGFyZW50Q3Rvci5wcm9wTWV0YWRhdGEpIHsKICAgICAgICAgICAgICAgIGxldCBwcm9wTWV0YWRhdGEgPSB0eXBlT3JGdW5jLnByb3BNZXRhZGF0YTsKICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgcHJvcE1ldGFkYXRhID09PSAnZnVuY3Rpb24nICYmIHByb3BNZXRhZGF0YS5wcm9wTWV0YWRhdGEpIHsKICAgICAgICAgICAgICAgICAgICBwcm9wTWV0YWRhdGEgPSBwcm9wTWV0YWRhdGEucHJvcE1ldGFkYXRhOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIHByb3BNZXRhZGF0YTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBBUEkgb2YgdHNpY2tsZSBmb3IgbG93ZXJpbmcgZGVjb3JhdG9ycyB0byBwcm9wZXJ0aWVzIG9uIHRoZSBjbGFzcy4KICAgICAgICAgICAgaWYgKHR5cGVPckZ1bmMucHJvcERlY29yYXRvcnMgJiYKICAgICAgICAgICAgICAgIHR5cGVPckZ1bmMucHJvcERlY29yYXRvcnMgIT09IHBhcmVudEN0b3IucHJvcERlY29yYXRvcnMpIHsKICAgICAgICAgICAgICAgIGNvbnN0IHByb3BEZWNvcmF0b3JzID0gdHlwZU9yRnVuYy5wcm9wRGVjb3JhdG9yczsKICAgICAgICAgICAgICAgIGNvbnN0IHByb3BNZXRhZGF0YSA9IHt9OwogICAgICAgICAgICAgICAgT2JqZWN0LmtleXMocHJvcERlY29yYXRvcnMpLmZvckVhY2gocHJvcCA9PiB7CiAgICAgICAgICAgICAgICAgICAgcHJvcE1ldGFkYXRhW3Byb3BdID0gY29udmVydFRzaWNrbGVEZWNvcmF0b3JJbnRvTWV0YWRhdGEocHJvcERlY29yYXRvcnNbcHJvcF0pOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICByZXR1cm4gcHJvcE1ldGFkYXRhOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIEFQSSBmb3IgbWV0YWRhdGEgY3JlYXRlZCBieSBpbnZva2luZyB0aGUgZGVjb3JhdG9ycy4KICAgICAgICAgICAgaWYgKHR5cGVPckZ1bmMuaGFzT3duUHJvcGVydHkoUFJPUF9NRVRBREFUQSkpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0eXBlT3JGdW5jW1BST1BfTUVUQURBVEFdOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgIH0KICAgICAgICBwcm9wTWV0YWRhdGEodHlwZU9yRnVuYykgewogICAgICAgICAgICBpZiAoIWlzVHlwZSh0eXBlT3JGdW5jKSkgewogICAgICAgICAgICAgICAgcmV0dXJuIHt9OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNvbnN0IHBhcmVudEN0b3IgPSBnZXRQYXJlbnRDdG9yKHR5cGVPckZ1bmMpOwogICAgICAgICAgICBjb25zdCBwcm9wTWV0YWRhdGEgPSB7fTsKICAgICAgICAgICAgaWYgKHBhcmVudEN0b3IgIT09IE9iamVjdCkgewogICAgICAgICAgICAgICAgY29uc3QgcGFyZW50UHJvcE1ldGFkYXRhID0gdGhpcy5wcm9wTWV0YWRhdGEocGFyZW50Q3Rvcik7CiAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyhwYXJlbnRQcm9wTWV0YWRhdGEpLmZvckVhY2goKHByb3BOYW1lKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgcHJvcE1ldGFkYXRhW3Byb3BOYW1lXSA9IHBhcmVudFByb3BNZXRhZGF0YVtwcm9wTmFtZV07CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBjb25zdCBvd25Qcm9wTWV0YWRhdGEgPSB0aGlzLl9vd25Qcm9wTWV0YWRhdGEodHlwZU9yRnVuYywgcGFyZW50Q3Rvcik7CiAgICAgICAgICAgIGlmIChvd25Qcm9wTWV0YWRhdGEpIHsKICAgICAgICAgICAgICAgIE9iamVjdC5rZXlzKG93blByb3BNZXRhZGF0YSkuZm9yRWFjaCgocHJvcE5hbWUpID0+IHsKICAgICAgICAgICAgICAgICAgICBjb25zdCBkZWNvcmF0b3JzID0gW107CiAgICAgICAgICAgICAgICAgICAgaWYgKHByb3BNZXRhZGF0YS5oYXNPd25Qcm9wZXJ0eShwcm9wTmFtZSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgZGVjb3JhdG9ycy5wdXNoKC4uLnByb3BNZXRhZGF0YVtwcm9wTmFtZV0pOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBkZWNvcmF0b3JzLnB1c2goLi4ub3duUHJvcE1ldGFkYXRhW3Byb3BOYW1lXSk7CiAgICAgICAgICAgICAgICAgICAgcHJvcE1ldGFkYXRhW3Byb3BOYW1lXSA9IGRlY29yYXRvcnM7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gcHJvcE1ldGFkYXRhOwogICAgICAgIH0KICAgICAgICBvd25Qcm9wTWV0YWRhdGEodHlwZU9yRnVuYykgewogICAgICAgICAgICBpZiAoIWlzVHlwZSh0eXBlT3JGdW5jKSkgewogICAgICAgICAgICAgICAgcmV0dXJuIHt9OwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9vd25Qcm9wTWV0YWRhdGEodHlwZU9yRnVuYywgZ2V0UGFyZW50Q3Rvcih0eXBlT3JGdW5jKSkgfHwge307CiAgICAgICAgfQogICAgICAgIGhhc0xpZmVjeWNsZUhvb2sodHlwZSwgbGNQcm9wZXJ0eSkgewogICAgICAgICAgICByZXR1cm4gdHlwZSBpbnN0YW5jZW9mIFR5cGUgJiYgbGNQcm9wZXJ0eSBpbiB0eXBlLnByb3RvdHlwZTsKICAgICAgICB9CiAgICAgICAgZ3VhcmRzKHR5cGUpIHsKICAgICAgICAgICAgcmV0dXJuIHt9OwogICAgICAgIH0KICAgICAgICBnZXR0ZXIobmFtZSkgewogICAgICAgICAgICByZXR1cm4gbmV3IEZ1bmN0aW9uKCdvJywgJ3JldHVybiBvLicgKyBuYW1lICsgJzsnKTsKICAgICAgICB9CiAgICAgICAgc2V0dGVyKG5hbWUpIHsKICAgICAgICAgICAgcmV0dXJuIG5ldyBGdW5jdGlvbignbycsICd2JywgJ3JldHVybiBvLicgKyBuYW1lICsgJyA9IHY7Jyk7CiAgICAgICAgfQogICAgICAgIG1ldGhvZChuYW1lKSB7CiAgICAgICAgICAgIGNvbnN0IGZ1bmN0aW9uQm9keSA9IGBpZiAoIW8uJHtuYW1lfSkgdGhyb3cgbmV3IEVycm9yKCciJHtuYW1lfSIgaXMgdW5kZWZpbmVkJyk7CiAgICAgICAgcmV0dXJuIG8uJHtuYW1lfS5hcHBseShvLCBhcmdzKTtgOwogICAgICAgICAgICByZXR1cm4gbmV3IEZ1bmN0aW9uKCdvJywgJ2FyZ3MnLCBmdW5jdGlvbkJvZHkpOwogICAgICAgIH0KICAgICAgICAvLyBUaGVyZSBpcyBub3QgYSBjb25jZXB0IG9mIGltcG9ydCB1cmkgaW4gSnMsIGJ1dCB0aGlzIGlzIHVzZWZ1bCBpbiBkZXZlbG9waW5nIERhcnQgYXBwbGljYXRpb25zLgogICAgICAgIGltcG9ydFVyaSh0eXBlKSB7CiAgICAgICAgICAgIC8vIFN0YXRpY1N5bWJvbAogICAgICAgICAgICBpZiAodHlwZW9mIHR5cGUgPT09ICdvYmplY3QnICYmIHR5cGVbJ2ZpbGVQYXRoJ10pIHsKICAgICAgICAgICAgICAgIHJldHVybiB0eXBlWydmaWxlUGF0aCddOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIFJ1bnRpbWUgdHlwZQogICAgICAgICAgICByZXR1cm4gYC4vJHtzdHJpbmdpZnkodHlwZSl9YDsKICAgICAgICB9CiAgICAgICAgcmVzb3VyY2VVcmkodHlwZSkgewogICAgICAgICAgICByZXR1cm4gYC4vJHtzdHJpbmdpZnkodHlwZSl9YDsKICAgICAgICB9CiAgICAgICAgcmVzb2x2ZUlkZW50aWZpZXIobmFtZSwgbW9kdWxlVXJsLCBtZW1iZXJzLCBydW50aW1lKSB7CiAgICAgICAgICAgIHJldHVybiBydW50aW1lOwogICAgICAgIH0KICAgICAgICByZXNvbHZlRW51bShlbnVtSWRlbnRpZmllciwgbmFtZSkgewogICAgICAgICAgICByZXR1cm4gZW51bUlkZW50aWZpZXJbbmFtZV07CiAgICAgICAgfQogICAgfQogICAgZnVuY3Rpb24gY29udmVydFRzaWNrbGVEZWNvcmF0b3JJbnRvTWV0YWRhdGEoZGVjb3JhdG9ySW52b2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21waWxlciwgZGVwKSkpOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IGNvbXBpbGVyCiAgICAgKiBAcGFyYW0gez99IGRlcAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gcmVmbGVjdERlcGVuZGVuY3koY29tcGlsZXIsIGRlcCkgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBtZXRhID0gewogICAgICAgICAgICB0b2tlbjogbnVsbCwKICAgICAgICAgICAgaG9zdDogZmFsc2UsCiAgICAgICAgICAgIG9wdGlvbmFsOiBmYWxzZSwKICAgICAgICAgICAgcmVzb2x2ZWQ6IGNvbXBpbGVyLlIzUmVzb2x2ZWREZXBlbmRlbmN5VHlwZS5Ub2tlbiwKICAgICAgICAgICAgc2VsZjogZmFsc2UsCiAgICAgICAgICAgIHNraXBTZWxmOiBmYWxzZSwKICAgICAgICB9OwogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdG9rZW4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHNldFRva2VuQW5kUmVzb2x2ZWRUeXBlKHRva2VuKSB7CiAgICAgICAgICAgIG1ldGEucmVzb2x2ZWQgPSBjb21waWxlci5SM1Jlc29sdmVkRGVwZW5kZW5jeVR5cGUuVG9rZW47CiAgICAgICAgICAgIG1ldGEudG9rZW4gPSB0b2tlbjsKICAgICAgICB9CiAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoZGVwKSAmJiBkZXAubGVuZ3RoID4gMCkgewogICAgICAgICAgICBmb3IgKGxldCBqID0gMDsgaiA8IGRlcC5sZW5ndGg7IGorKykgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgcGFyYW0gPSBkZXBbal07CiAgICAgICAgICAgICAgICBpZiAocGFyYW0gPT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICAgICAgICAgIC8vIHBhcmFtIG1heSBiZSB1bmRlZmluZWQgaWYgdHlwZSBvZiBkZXAgaXMgbm90IHNldCBieSBuZ3RzYwogICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgcHJvdG8gPSBPYmplY3QuZ2V0UHJvdG90eXBlT2YocGFyYW0pOwogICAgICAgICAgICAgICAgaWYgKHBhcmFtIGluc3RhbmNlb2YgT3B0aW9uYWwgfHwgcHJvdG8ubmdNZXRhZGF0YU5hbWUgPT09ICdPcHRpb25hbCcpIHsKICAgICAgICAgICAgICAgICAgICBtZXRhLm9wdGlvbmFsID0gdHJ1ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKHBhcmFtIGluc3RhbmNlb2YgU2tpcFNlbGYgfHwgcHJvdG8ubmdNZXRhZGF0YU5hbWUgPT09ICdTa2lwU2VsZicpIHsKICAgICAgICAgICAgICAgICAgICBtZXRhLnNraXBTZWxmID0gdHJ1ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKHBhcmFtIGluc3RhbmNlb2YgU2VsZiB8fCBwcm90by5uZ01ldGFkYXRhTmFtZSA9PT0gJ1NlbGYnKSB7CiAgICAgICAgICAgICAgICAgICAgbWV0YS5zZWxmID0gdHJ1ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKHBhcmFtIGluc3RhbmNlb2YgSG9zdCB8fCBwcm90by5uZ01ldGFkYXRhTmFtZSA9PT0gJ0hvc3QnKSB7CiAgICAgICAgICAgICAgICAgICAgbWV0YS5ob3N0ID0gdHJ1ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKHBhcmFtIGluc3RhbmNlb2YgSW5qZWN0KSB7CiAgICAgICAgICAgICAgICAgICAgbWV0YS50b2tlbiA9IHBhcmFtLnRva2VuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAocGFyYW0gaW5zdGFuY2VvZiBBdHRyaWJ1dGUpIHsKICAgICAgICAgICAgICAgICAgICBpZiAocGFyYW0uYXR0cmlidXRlTmFtZSA9PT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgQXR0cmlidXRlIG5hbWUgbXVzdCBiZSBkZWZpbmVkLmApOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBtZXRhLnRva2VuID0gcGFyYW0uYXR0cmlidXRlTmFtZTsKICAgICAgICAgICAgICAgICAgICBtZXRhLnJlc29sdmVkID0gY29tcGlsZXIuUjNSZXNvbHZlZERlcGVuZGVuY3lUeXBlLkF0dHJpYnV0ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKHBhcmFtID09PSBDaGFuZ2VEZXRlY3RvclJlZikgewogICAgICAgICAgICAgICAgICAgIG1ldGEudG9rZW4gPSBwYXJhbTsKICAgICAgICAgICAgICAgICAgICBtZXRhLnJlc29sdmVkID0gY29tcGlsZXIuUjNSZXNvbHZlZERlcGVuZGVuY3lUeXBlLkNoYW5nZURldGVjdG9yUmVmOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgc2V0VG9rZW5BbmRSZXNvbHZlZFR5cGUocGFyYW0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYgKGRlcCA9PT0gdW5kZWZpbmVkIHx8IChBcnJheS5pc0FycmF5KGRlcCkgJiYgZGVwLmxlbmd0aCA9PT0gMCkpIHsKICAgICAgICAgICAgbWV0YS50b2tlbiA9IHVuZGVmaW5lZDsKICAgICAgICAgICAgbWV0YS5yZ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1ZfREVGIGlzIGFscmVhZHkgZGVmaW5lZCBvbiB0aGlzIGNsYXNzIHRoZW4gZG9uJ3Qgb3ZlcndyaXRlIGl0CiAgICAgICAgaWYgKCF0eXBlLmhhc093blByb3BlcnR5KE5HX1BST1ZfREVGKSkgewogICAgICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkodHlwZSwgTkdfUFJPVl9ERUYsIHsKICAgICAgICAgICAgICAgIGdldDogKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgICAgIGlmIChuZ0luamVjdGFibGVEZWYgPT09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICAgICAgbmdJbmplY3RhYmxlRGVmID0gZ2V0Q29tcGlsZXJGYWNhZGUoKS5jb21waWxlSW5qZWN0YWJsZShhbmd1bGFyQ29yZURpRW52LCBgbmc6Ly8vJHt0eXBlLm5hbWV9L8m1cHJvdi5qc2AsIGdldEluamVjdGFibGVNZXRhZGF0YSh0eXBlLCBzcmNNZXRhKSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHJldHVybiBuZ0luamVjdGFibGVEZWY7CiAgICAgICAgICAgICAgICB9KSwKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIC8vIE9uIElFMTAgcHJvcGVydGllcyBkZWZpbmVkIHZpYSBgZGVmaW5lUHJvcGVydHlgIHdvbid0IGJlIGluaGVyaXRlZCBieSBjaGlsZCBjbGFzc2VzLAogICAgICAgICAgICAvLyB3aGljaCB3aWxsIGJyZWFrIGluaGVyaXRpbmcgdGhlIGluamVjdGFibGUgZGVmaW5pdGlvbiBmcm9tIGEgZ3JhbmRwYXJlbnQgdGhyb3VnaCBhbgogICAgICAgICAgICAvLyB1bmRlY29yYXRlZCBwYXJlbnQgY2xhc3MuIFdlIHdvcmsgYXJvdW5kIGl0IGJ5IGRlZmluaW5nIGEgbWV0aG9kIHdoaWNoIHNob3VsZCBiZSB1c2VkCiAgICAgICAgICAgIC8vIGFzIGEgZmFsbGJhY2suIFRoaXMgc2hvdWxkIG9ubHkgYmUgYSBwcm9ibGVtIGluIEpJVCBtb2RlLCBiZWNhdXNlIGluIEFPVCBUeXBlU2NyaXB0CiAgICAgICAgICAgIC8vIHNlZW1zIHRvIGhhdmUgYSB3b3JrYXJvdW5kIGZvciBzdGF0aWMgcHJvcGVydGllcy4gV2hlbiBpbmhlcml0aW5nIGZyb20gYW4gdW5kZWNvcmF0ZWQKICAgICAgICAgICAgLy8gcGFyZW50IGlzIG5vIGxvbmdlciBzdXBwb3J0ZWQgaW4gdjEwLCB0aGlzIGNhbiBzYWZlbHkgYmUgcmVtb3ZlZC4KICAgICAgICAgICAgaWYgKCF0eXBlLmhhc093blByb3BlcnR5KE5HX1BST1ZfREVGX0ZBTExCQUNLKSkgewogICAgICAgICAgICAgICAgKCgvKiogQHR5cGUgez99ICovICh0eXBlKSkpW05HX1BST1ZfREVGX0ZBTExCQUNLXSA9ICgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+ICgoLyoqIEB0eXBlIHs/fSAqLyAodHlwZSkpKVtOR19QUk9WX0RFRl0pOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8vIGlmIE5HX0ZBQ1RPUllfREVGIGlzIGFscmVhZHkgZGVmaW5lZCBvbiB0aGlzIGNsYXNzIHRoZW4gZG9uJ3Qgb3ZlcndyaXRlIGl0CiAgICAgICAgaWYgKCF0eXBlLmhhc093blByb3BlcnR5KE5HX0ZBQ1RPUllfREVGKSkgewogICAgICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkodHlwZSwgTkdfRkFDVE9SWV9ERUYsIHsKICAgICAgICAgICAgICAgIGdldDogKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgICAgIGlmIChuZ0ZhY3RvcnlEZWYgPT09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBtZXRhZGF0YSA9IGdldEluamVjdGFibGVNZXRhZGF0YSh0eXBlLCBzcmNNZXRhKTsKICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBjb21waWxlciA9IGdldENvbXBpbGVyRmFjYWRlKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIG5nRmFjdG9yeURlZiA9IGNvbXBpbGVyLmNvbXBpbGVGYWN0b3J5KGFuZ3VsYXJDb3JlRGlFbnYsIGBuZzovLy8ke3R5cGUubmFtZX0vybVmYWMuanNgLCB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiBtZXRhZGF0YS5uYW1lLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogbWV0YWRhdGEudHlwZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGVBcmd1bWVudENvdW50OiBtZXRhZGF0YS50eXBlQXJndW1lbnRDb3VudCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlcHM6IHJlZmxlY3REZXBlbmRlbmNpZXModHlwZSksCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmplY3RGbjogJ2luamVjdCcsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YXJnZXQ6IGNvbXBpbGVyLlIzRmFjdG9yeVRhcmdldC5JbmplY3RhYmxlCiAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmdGYWN0b3J5RGVmOwogICAgICAgICAgICAgICAgfSksCiAgICAgICAgICAgICAgICAvLyBMZWF2ZSB0aGlzIGNvbmZpZ3VyYWJsZSBzbyB0aGF0IHRoZSBmYWN0b3JpZXMgZnJvbSBkaXJlY3RpdmVzIG9yIHBpcGVzIGNhbiB0YWtlIHByZWNlZGVuY2UuCiAgICAgICAgICAgICAgICBjb25maWd1cmFibGU6IHRydWUKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgfQogICAgY29uc3QgybUwJDYgPSBnZXRDbG9zdXJlU2FmZVByb3BlcnR5OwogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgVVNFX1ZBTFVFJDEgPSBnZXRDbG9zdXJlU2FmZVByb3BlcnR5KHsgcHJvdmlkZTogU3RyaW5nLCB1c2VWYWx1ZTogybUwJDYgfSk7CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gbWV0YQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gaXNVc2VDbGFzc1Byb3ZpZGVyKG1ldGEpIHsKICAgICAgICByZXR1cm4gKCgvKiogQHR5cGUgez99ICovIChtZXRhKSkpLnVzZUNsYXNzICE9PSB1bmRlZmluZWQ7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gbWV0YQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gaXNVc2VWYWx1ZVByb3ZpZGVyKG1ldGEpIHsKICAgICAgICByZXR1cm4gVVNFX1ZBTFVFJDEgaW4gbWV0YTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBtZXRhCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBpc1VzZUZhY3RvcnlQcm92aWRlcihtZXRhKSB7CiAgICAgICAgcmV0dXJuICgoLyoqIEB0eXBlIHs/fSAqLyAobWV0YSkpKS51c2VGYWN0b3J5ICE9PSB1bmRlZmluZWQ7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gbWV0YQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gaXNVc2VFeGlzdGluZ1Byb3ZpZGVyKG1ldGEpIHsKICAgICAgICByZXR1cm4gKCgvKiogQHR5cGUgez99ICovIChtZXRhKSkpLnVzZUV4aXN0aW5nICE9PSB1bmRlZmluZWQ7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdHlwZQogICAgICogQHBhcmFtIHs/PX0gc3JjTWV0YQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0SW5qZWN0YWJsZU1ldGFkYXRhKHR5cGUsIHNyY01ldGEpIHsKICAgICAgICAvLyBBbGxvdyB0aGUgY29tcGlsYXRpb24gb2YgYSBjbGFzcyB3aXRoIGEgYEBJbmplY3RhYmxlKClgIGRlY29yYXRvciB3aXRob3V0IHBhcmFtZXRlcnMKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgbWV0YSA9IHNyY01ldGEgfHwgeyBwcm92aWRlZEluOiBudWxsIH07CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGNvbXBpbGVyTWV0YSA9IHsKICAgICAgICAgICAgbmFtZTogdHlwZS5uYW1lLAogICAgICAgICAgICB0eXBlOiB0eXBlLAogICAgICAgICAgICB0eXBlQXJndW1lbnRDb3VudDogMCwKICAgICAgICAgICAgcHJvdmlkZWRJbjogbWV0YS5wcm92aWRlZEluLAogICAgICAgICAgICB1c2VyRGVwczogdW5kZWZpbmVkLAogICAgICAgIH07CiAgICAgICAgaWYgKChpc1VzZUNsYXNzUHJvdmlkZXIobWV0YSkgfHwgaXNVc2VGYWN0b3J5UHJvdmlkZXIobWV0YSkpICYmIG1ldGEuZGVwcyAhPT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgIGNvbXBpbGVyTWV0YS51c2VyRGVwcyA9IGNvbnZlcnREZXBlbmRlbmNpZXMobWV0YS5kZXBzKTsKICAgICAgICB9CiAgICAgICAgaWYgKGlzV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ICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihkZWYsIGFkZGl0aW9uYWxQcm92aWRlcnMsIHBhcmVudCwgc291cmNlID0gbnVsbCkgewogICAgICAgICAgICB0aGlzLnBhcmVudCA9IHBhcmVudDsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIE1hcCBvZiB0b2tlbnMgdG8gcmVjb3JkcyB3aGljaCBjb250YWluIHRoZSBpbnN0YW5jZXMgb2YgdGhvc2UgdG9rZW5zLgogICAgICAgICAgICAgKiAtIGBudWxsYCB2YWx1ZSBpbXBsaWVzIHRoYXQgd2UgZG9uJ3QgaGF2ZSB0aGUgcmVjb3JkLiBVc2VkIGJ5IHRyZWUtc2hha2FibGUgaW5qZWN0b3JzCiAgICAgICAgICAgICAqIHRvIHByZXZlbnQgZnVydGhlciBzZWFyY2hlcy4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMucmVjb3JkcyA9IG5ldyBNYXAoKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFRoZSB0cmFuc2l0aXZlIHNldCBvZiBgSW5qZWN0b3JUeXBlYHMgd2hpY2ggZGVmaW5lIHRoaXMgaW5qZWN0b3IuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmluamVjdG9yRGVmVHlwZXMgPSBuZXcgU2V0KCk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBTZXQgb2YgdmFsdWVzIGluc3RhbnRpYXRlZCBieSB0aGlzIGluamVjdG9yIHdoaWNoIGNvbnRhaW4gYG5nT25EZXN0cm95YCBsaWZlY3ljbGUgaG9va3MuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLm9uRGVzdHJveSA9IG5ldyBTZXQoKTsKICAgICAgICAgICAgdGhpcy5fZGVzdHJveWVkID0gZmFsc2U7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZGVkdXBTdGFjayA9IFtdO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gICAgICAgdGhpcy5yZWNvcmRzLnNldChJTkpFQ1RPUiwgbWFrZVJlY29yZCh1bmRlZmluZWQsIHRoaXMpKTsKICAgICAgICAgICAgLy8gRGV0ZWN0IHdoZXRoZXIgdGhpcyBpbmplY3RvciBoYXMgdGhlIEFQUF9ST09UX1NDT1BFIHRva2VuIGFuZCB0aHVzIHNob3VsZCBwcm92aWRlCiAgICAgICAgICAgIC8vIGFueSBpbmplY3RhYmxlIHNjb3BlZCB0byBBUFBfUk9PVF9TQ09QRS4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCByZWNvcmQgPSB0aGlzLnJlY29yZHMuZ2V0KElOSkVDVE9SX1NDT1BFKTsKICAgICAgICAgICAgdGhpcy5zY29wZSA9IHJlY29yZCAhPSBudWxsID8gcmVjb3JkLnZhbHVlIDogbnVsbDsKICAgICAgICAgICAgLy8gU291cmNlIG5hbWUsIHVzZWQgZm9yIGRlYnVnZ2luZwogICAgICAgICAgICB0aGlzLnNvdXJjZSA9IHNvdXJjZSB8fCAodHlwZW9mIGRlZiA9PT0gJ29iamVjdCcgPyBudWxsIDogc3RyaW5naWZ5KGRlZikpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBGbGFnIGluZGljYXRpbmcgdGhhdCB0aGlzIGluamVjdG9yIHdhcyBwcmV2aW91c2x5IGRlc3Ryb3llZC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBkZXN0cm95ZWQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9kZXN0cm95ZWQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIERlc3Ryb3kgdGhlIGluamVjdG9yIGFuZCByZWxlYXNlIHJlZmVyZW5jZXMgdG8gZXZlcnkgaW5zdGFuY2Ugb3IgcHJvdmlkZXIgYXNzb2NpYXRlZCB3aXRoIGl0LgogICAgICAgICAqCiAgICAgICAgICogQWxzbyBjYWxscyB0aGUgYE9uRGVzdHJveWAgbGlmZWN5Y2xlIGhvb2tzIG9mIGV2ZXJ5IGluc3RhbmNlIHRoYXQgd2FzIGNyZWF0ZWQgZm9yIHdoaWNoIGEKICAgICAgICAgKiBob29rIHdhcyBmb3VuZC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGRlc3Ryb3koKSB7CiAgICAgICAgICAgIHRoaXMuYXNzZXJ0Tm90RGVzdHJveWVkKCk7CiAgICAgICAgICAgIC8vIFNldCBkZXN0cm95ZWQgPSB0cnVlIGZpcnN0LCBpbiBjYXNlIGxpZmVjeWNsZSBob29rcyByZS1lbnRlciBkZXN0cm95KCkuCiAgICAgICAgICAgIHRoaXMuX2Rlc3Ryb3llZCA9IHRydWU7CiAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAvLyBDYWxsIGFsbCB0aGUgbGlmZWN5Y2xlIGhvb2tzLgogICAgICAgICAgICAgICAgdGhpcy5vbkRlc3Ryb3kuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHNlcnZpY2UKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIHNlcnZpY2UgPT4gc2VydmljZS5uZ09uRGVzdHJveSgpKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZmluYWxseSB7CiAgICAgICAgICAgICAgICAvLyBSZWxlYXNlIGFsbCByZWZlcmVuY2VzLgogICAgICAgICAgICAgICAgdGhpcy5yZWNvcmRzLmNsZWFyKCk7CiAgICAgICAgICAgICAgICB0aGlzLm9uRGVzdHJveS5jbGVhcigpOwogICAgICAgICAgICAgICAgdGhpcy5pbmplY3RvckRlZlR5cGVzLmNsZWFyKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHRlbXBsYXRlIFQKICAgICAgICAgKiBAcGFyYW0gez99IHRva2VuCiAgICAgICAgICogQHBhcmFtIHs/PX0gbm90Rm91bmRWYWx1ZQogICAgICAgICAqIEBwYXJhbSB7Pz19IGZsYWdzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQodG9rZW4sIG5vdEZvdW5kVmFsdWUgPSBUSFJPV19JRl9OT1RfRk9VTkQsIGZsYWdzID0gSW5qZWN0RmxhZ3MuRGVmYXVsdCkgewogICAgICAgICAgICB0aGlzLmFzc2VydE5vdERlc3Ryb3llZCgpOwogICAgICAgICAgICAvLyBTZXQgdGhlIGluamVjdGlvbiBjb250ZXh0LgogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHByZXZpb3VzSW5qZWN0b3IgPSBzZXRDdXJyZW50SW5qZWN0b3IodGhpcyk7CiAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAvLyBDaGVjayBmb3IgdGhlIFNraXBTZWxmIGZsYWcuCiAgICAgICAgICAgICAgICBpZiAoIShmbGFncyAmIEluamVjdEZsYWdzLlNraXBTZWxmKSkgewogICAgICAgICAgICAgICAgICAgIC8vIFNraXBTZWxmIGlzbid0IHNldCwgY2hlY2sgaWYgdGhlIHJlY29yZCBiZWxvbmdzIHRvIHRoaXMgaW5qZWN0b3IuCiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGxldCByZWNvcmQgPSB0aGlzLnJlY29yZHMuZ2V0KHRva2VuKTsKICAgICAgICAgICAgICAgICAgICBpZiAocmVjb3JkID09PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gTm8gcmVjb3JkLCBidXQgbWF5YmUgdGhlIHRva2VuIGlzIHNjb3BlZCB0byB0aGlzIGluamVjdG9yLiBMb29rIGZvciBhbiBpbmplY3RhYmxlCiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGRlZiB3aXRoIGEgc2NvcGUgbWF0Y2hpbmcgdGhpcyBpbmplY3Rvci4KICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBkZWYgPSBjb3VsZEJlSW5qZWN0YWJsZVR5cGUodG9rZW4pICYmIGdldEluamVjdGFibGVEZWYodG9rZW4pOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGVmICYmIHRoaXMuaW5qZWN0YWJsZURlZkluU2NvcGUoZGVmKSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gRm91bmQgYW4gaW5qZWN0YWJsZSBkZWYgYW5kIGl0J3Mgc2NvcGVkIHRvIHRoaXMgaW5qZWN0b3IuIFByZXRlbmQgYXMgaWYgaXQgd2FzIGhlcmUKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGFsbCBhbG9uZy4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlY29yZCA9IG1ha2VSZWNvcmQoaW5qZWN0YWJsZURlZk9ySW5qZWN0b3JEZWZGYWN0b3J5KHRva2VuKSwgTk9UX1lFVCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWNvcmQgPSBudWxsOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucmVjb3Jkcy5zZXQodG9rZW4sIHJlY29yZCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIC8vIElmIGEgcmVjb3JkIHdhcyBmb3VuZCwgZ2V0IHRoZSBpbnN0YW5jZSBmb3IgaXQgYW5kIHJldHVybiBpdC4KICAgICAgICAgICAgICAgICAgICBpZiAocmVjb3JkICE9IG51bGwgLyogTk9UIG51bGwgfHwgdW5kZWZpbmVkICovKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmh5ZHJhdGUodG9rZW4sIHJlY29yZCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLy8gU2VsZWN0IHRoZSBuZXh0IGluamVjdG9yIGJhc2VkIG9uIHRoZSBTZWxmIGZsYWcgLSBpZiBzZWxmIGlzIHNldCwgdGhlIG5leHQgaW5qZWN0b3IgaXMKICAgICAgICAgICAgICAgIC8vIHRoZSBOdWxsSW5qZWN0b3IsIG90aGVyd2lzZSBpdCdzIHRoZSBwYXJlbnQuCiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBuZXh0SW5qZWN0b3IgPSAhKGZsYWdzICYgSW5qZWN0RmxhZ3MuU2VsZikgPyB0aGlzLnBhcmVudCA6IGdldE51bGxJbmplY3RvcigpOwogICAgICAgICAgICAgICAgLy8gU2V0IHRoZSBub3RGb3VuZFZhbHVlIGJhc2VkIG9uIHRoZSBPcHRpb25hbCBmbGFnIC0gaWYgb3B0aW9uYWwgaXMgc2V0IGFuZCBub3RGb3VuZFZhbHVlCiAgICAgICAgICAgICAgICAvLyBpcyB1bmRlZmluZWQsIHRoZSB2YWx1ZSBpcyBudWxsLCBvdGhlcndpc2UgaXQncyB0aGUgbm90Rm91bmRWYWx1ZS4KICAgICAgICAgICAgICAgIG5vdEZvdW5kVmFsdWUgPSAoZmxhZ3MgJiBJbmplY3RGbGFncy5PcHRpb25hbCkgJiYgbm90Rm91bmRWYWx1ZSA9PT0gVEhST1dfSUZfTk9UX0ZPVU5EID8KICAgICAgICAgICAgICAgICAgICBudWxsIDoKICAgICAgICAgICAgICAgICAgICBub3RGb3VuZFZhbHVlOwogICAgICAgICAgICAgICAgcmV0dXJuIG5leHRJbmplY3Rvci5nZXQodG9rZW4sIG5vdEZvdW5kVmFsdWUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNhdGNoIChlKSB7CiAgICAgICAgICAgICAgICBpZiAoZS5uYW1lID09PSAnTnVsbEluamVjdG9yRXJyb3InKSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHBhdGggPSBlW05HX1RFTVBfVE9LRU5fUEFUSF0gPSBlW05HX1RFTVBfVE9LRU5fUEFUSF0gfHwgW107CiAgICAgICAgICAgICAgICAgICAgcGF0aC51bnNoaWZ0KHN0cmluZ2lmeSh0b2tlbikpOwogICAgICAgICAgICAgICAgICAgIGlmIChwcmV2aW91c0luamVjdG9yKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFdlIHN0aWxsIGhhdmUgYSBwYXJlbnQgaW5qZWN0b3IsIGtlZXAgdGhyb3dpbmcKICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgZTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIEZvcm1hdCAmIHRocm93IHRoZSBmaW5hbCBlcnJvciBtZXNzYWdlIHdoZW4gd2UgZG9uJ3QgaGF2ZSBhbnkgcHJldmlvdXMgaW5qZWN0b3IKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNhdGNoSW5qZWN0b3JFcnJvcihlLCB0b2tlbiwgJ1IzSW5qZWN0b3JFcnJvcicsIHRoaXMuc291cmNlKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICB0aHJvdyBlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGZpbmFsbHkgewogICAgICAgICAgICAgICAgLy8gTGFzdGx5LCBjbGVhbiB1cCB0aGUgc3RhdGUgYnkgcmVzdG9yaW5nIHRoZSBwcmV2aW91cyBpbmplY3Rvci4KICAgICAgICAgICAgICAgIHNldEN1cnJlbnRJbmplY3RvcihwcmV2aW91c0luamVjdG9yKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfcmVzb2x2ZUluamVjdG9yRGVmVHlwZXMoKSB7CiAgICAgICAgICAgIHRoaXMuaW5qZWN0b3JEZWZUeXBlcy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBkZWZUeXBlCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBkZWZUeXBlID0+IHRoaXMuZ2V0KGRlZlR5cGUpKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdG9TdHJpbmcoKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdG9rZW5zID0gKC8qKiBAdHlwZSB7P30gKi8gKFtdKSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcmVjb3JkcyA9IHRoaXMucmVjb3JkczsKICAgICAgICAgICAgcmVjb3Jkcy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSB2CiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdG9rZW4KICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICh2LCB0b2tlbikgPT4gdG9rZW5zLnB1c2goc3RyaW5naWZ5KHRva2VuKSkpKTsKICAgICAgICAgICAgcmV0dXJuIGBSM0luamVjdG9yWyR7dG9rZW5zLmpvaW4oJywgJyl9XWA7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBhc3NlcnROb3REZXN0cm95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fQogICAgICAgICAqLwogICAgICAgIHByb2Nlc3NJbmplY3RvclR5cGUoZGVmT3JXcmFwcGVkRGVmLCBwYXJlbnRzLCBkZWR1cFN0YWNrKSB7CiAgICAgICAgICAgIGRlZk9yV3JhcHBlZERlZiA9IHJlc29sdmVGb3J3YXJkUmVmKGRlZk9yV3JhcHBlZERlZik7CiAgICAgICAgICAgIGlmICghZGVmT3JXcmFwcGVkRGVmKQogICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAvLyBFaXRoZXIgdGhlIGRlZk9yV3JhcHBlZERlZiBpcyBhbiBJbmplY3RvclR5cGUgKHdpdGggaW5qZWN0b3IgZGVmKSBvciBhbgogICAgICAgICAgICAvLyBJbmplY3RvckRlZlR5cGVXaXRoUHJvdmlkZXJzIChha2EgTW9kdWxlV2l0aFByb3ZpZGVycykuIERldGVjdGluZyBlaXRoZXIgaXMgYSBtZWdhbW9ycGhpYwogICAgICAgICAgICAvLyByZWFkLCBzbyBjYXJlIGlzIHRha2VuIHRvIG9ubHkgZG8gdGhlIHJlYWQgb25jZS4KICAgICAgICAgICAgLy8gRmlyc3QgYXR0ZW1wdCB0byByZWFkIHRoZSBpbmplY3RvciBkZWYgKGDJtWluamApLgogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBkZWYgPSBnZXRJbmplY3RvckRlZihkZWZPcldyYXBwZWREZWYpOwogICAgICAgICAgICAvLyBJZiB0aGF0J3Mgbm90IHByZXNlbnQsIHRoZW4gYXR0ZW1wdCB0byByZWFkIG5nTW9kdWxlIGZyb20gdGhlIEluamVjdG9yRGVmVHlwZVdpdGhQcm92aWRlcnMuCiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbmdNb2R1bGUgPSAoZGVmID09IG51bGwpICYmICgoLyoqIEB0eXBlIHs/fSAqLyAoZGVmT3JXcmFwcGVkRGVmKSkpLm5nTW9kdWxlIHx8IHVu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pbXBvcnRzLCBhZGQgaXQgdG8gdGhlIHNldCBvZiBwYXJlbnRzLiBUaGlzIHdheSwgaWYgaXQgZW5kcwogICAgICAgICAgICAgICAgLy8gdXAgZGVlcGx5IGltcG9ydGluZyBpdHNlbGYsIHRoaXMgY2FuIGJlIGRldGVjdGVkLgogICAgICAgICAgICAgICAgbmdEZXZNb2RlICYmIHBhcmVudHMucHVzaChkZWZUeXBlKTsKICAgICAgICAgICAgICAgIC8vIEFkZCBpdCB0byB0aGUgc2V0IG9mIGRlZHVwcy4gVGhpcyB3YXkgd2UgY2FuIGRldGVjdCBtdWx0aXBsZSBpbXBvcnRzIG9mIHRoZSBzYW1lIG1vZHVsZQogICAgICAgICAgICAgICAgZGVkdXBTdGFjay5wdXNoKGRlZlR5cGUpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IGltcG9ydFR5cGVzV2l0aFByb3ZpZGVyczsKICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgZGVlcEZvckVhY2goZGVmLmltcG9ydHMsICgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGltcG9ydGVkCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICBpbXBvcnRlZCA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLnByb2Nlc3NJbmplY3RvclR5cGUoaW1wb3J0ZWQsIHBhcmVudHMsIGRlZHVwU3RhY2spKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW1wb3J0VHlwZXNXaXRoUHJvdmlkZXJzID09PSB1bmRlZmluZWQpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW1wb3J0VHlwZXNXaXRoUHJvdmlkZXJzID0gW107CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBJZiB0aGUgcHJvY2Vzc2VkIGltcG9ydCBpcyBhbiBpbmplY3RvciB0eXBlIHdpdGggcHJvdmlkZXJzLCB3ZSBzdG9yZSBpdCBpbiB0aGUKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGxpc3Qgb2YgaW1wb3J0IHR5cGVzIHdpdGggcHJvdmlkZXJzLCBzbyB0aGF0IHdlIGNhbiBwcm9jZXNzIHRob3NlIGFmdGVyd2FyZHMuCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbXBvcnRUeXBlc1dpdGhQcm92aWRlcnMucHVzaChpbXBvcnRlZCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmaW5hbGx5IHsKICAgICAgICAgICAgICAgICAgICAvLyBSZW1vdmUgaXQgZnJvbSB0aGUgcGFyZW50cyBzZXQgd2hlbiBmaW5pc2hlZC4KICAgICAgICAgICAgICAgICAgICBuZ0Rldk1vZGUgJiYgcGFyZW50cy5wb3AoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vIEltcG9ydHMgd2hpY2ggYXJlIGRlY2xhcmVkIHdpdGggcHJvdmlkZXJzIChUeXBlV2l0aFByb3ZpZGVycykgbmVlZCB0byBiZSBwcm9jZXNzZWQKICAgICAgICAgICAgICAgIC8vIGFmdGVyIGFsbCBpbXBvcnRlZCBtb2R1bGVzIGFyZSBwcm9jZXNzZWQuIFRoaXMgaXMgc2ltaWxhciB0byBob3cgVmlldyBFbmdpbmUKICAgICAgICAgICAgICAgIC8vIHByb2Nlc3Nlcy9tZXJnZXMgbW9kdWxlIGltcG9ydHMgaW4gdGhlIG1ldGFkYXRhIHJlc29sdmVyLiBTZWU6IEZXLTEzNDkuCiAgICAgICAgICAgICAgICBpZiAoaW1wb3J0VHlwZXNXaXRoUHJvdmlkZXJzICE9PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGltcG9ydFR5cGVzV2l0aFByb3ZpZGVycy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB7IG5nTW9kdWxlLCBwcm92aWRlcnMgfSA9IGltcG9ydFR5cGVzV2l0aFByb3ZpZGVyc1tpXTsKICAgICAgICAgICAgICAgICAgICAgICAgZGVlcEZvckVhY2goKC8qKiBAdHlwZSB7P30gKi8gKHByb3ZpZGVycykpLCAoLyoqCiAgICAgICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcHJvdmlkZXIKICAgICAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgICAgIHByb3ZpZGVyID0+IHRoaXMucHJvY2Vzc1Byb3ZpZGVyKHByb3ZpZGVyLCBuZ01vZHVsZSwgcHJvdmlkZXJzIHx8IEVNUFRZX0FSUkFZJDIpKSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIFRyYWNrIHRoZSBJbmplY3RvclR5cGUgYW5kIGFkZCBhIHByb3ZpZGVyIGZvciBpdC4gSXQncyBpbXBvcnRhbnQgdGhhdCB0aGlzIGlzIGRvbmUgYWZ0ZXIgdGhlCiAgICAgICAgICAgIC8vIGRlZidzIGltcG9ydHMuCiAgICAgICAgICAgIHRoaXMuaW5qZWN0b3JEZWZUeXBlcy5hZGQoZGVmVHlwZSk7CiAgICAgICAgICAgIHRoaXMucmVjb3Jkcy5zZXQoZGVmVHlwZSwgbWFrZVJlY29yZChkZWYuZmFjdG9yeSwgTk9UX1lFVCkpOwogICAgICAgICAgICAvLyBOZXh0LCBpbmNsdWRlIHByb3ZpZGVycyBsaXN0ZWQgb24gdGhlIGRlZmluaXRpb24gaXRzZWxmLgogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGRlZlByb3ZpZGVycyA9IGRlZi5wcm92aWRlcnM7CiAgICAgICAgICAgIGlmIChkZWZQcm92aWRlcnMgIT0gbnVsbCAmJiAhaXNEdXBsaWNhdGUpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGluamVjdG9yVHlwZSA9ICgvKiogQHR5cGUgez99ICovIChkZWZPcldyYXBwZWREZWYpKTsKICAgICAgICAgICAgICAgIGRlZXBGb3JFYWNoKGRlZlByb3ZpZGVycywgKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwcm92aWRlcgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgcHJvdmlkZXIgPT4gdGhpcy5wcm9jZXNzUHJvdmlkZXIocHJvdmlkZXIsIGluamVjdG9yVHlwZSwgZGVmUHJvdmlkZXJzKSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiAobmdNb2R1bGUgIT09IHVuZGVmaW5lZCAmJgogICAgICAgICAgICAgICAgKCgvKiogQHR5cGUgez99ICovIChkZWZPcldyYXBwZWREZWYpKSkucHJvdmlkZXJzICE9PSB1bmRlZmluZWQpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBQcm9jZXNzIGEgYFNpbmdsZVByb3ZpZGVyYCBhbmQgYWRkIGl0LgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBwcm92aWRlcgogICAgICAgICAqIEBwYXJhbSB7P30gbmdNb2R1bGVUeXBlCiAgICAgICAgICogQHBhcmFtIHs/fSBwcm92aWRlcnMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHByb2Nlc3NQcm92aWRlcihwcm92aWRlciwgbmdNb2R1bGVUeXBlLCBwcm92aWRlcnMpIHsKICAgICAgICAgICAgLy8gRGV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ICAgIC8vIEl0IGhhcy4gVGhyb3cgYSBuaWNlIGVycm9yIGlmCiAgICAgICAgICAgICAgICAgICAgaWYgKG11bHRpUmVjb3JkLm11bHRpID09PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3dNaXhlZE11bHRpUHJvdmlkZXJFcnJvcigpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIG11bHRpUmVjb3JkID0gbWFrZVJlY29yZCh1bmRlZmluZWQsIE5PVF9ZRVQsIHRydWUpOwogICAgICAgICAgICAgICAgICAgIG11bHRpUmVjb3JkLmZhY3RvcnkgPSAoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAoKSA9PiBpbmplY3RBcmdzKCgvKiogQHR5cGUgez99ICovICgoLyoqIEB0eXBlIHs/fSAqLyAobXVsdGlSZWNvcmQpKS5tdWx0aSkpKSk7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5yZWNvcmRzLnNldCh0b2tlbiwgbXVsdGlSZWNvcmQpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdG9rZW4gPSBwcm92aWRlcjsKICAgICAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovIChtdWx0aVJlY29yZC5tdWx0aSkpLnB1c2gocHJvdmlkZXIpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZXhpc3RpbmcgPSB0aGlzLnJlY29yZHMuZ2V0KHRva2VuKTsKICAgICAgICAgICAgICAgIGlmIChleGlzdGluZyAmJiBleGlzdGluZy5tdWx0aSAhPT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgICAgICAgICAgdGhyb3dNaXhlZE11bHRpUHJvdmlkZXJFcnJvcigpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMucmVjb3Jkcy5zZXQodG9rZW4sIHJlY29yZCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHRlbXBsYXRlIFQKICAgICAgICAgKiBAcGFyYW0gez99IHRva2VuCiAgICAgICAgICogQHBhcmFtIHs/fSByZWNvcmQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGh5ZHJhdGUodG9rZW4sIHJlY29yZCkgewogICAgICAgICAgICBpZiAocmVjb3JkLnZhbHVlID09PSBDSVJDVUxBUikgewogICAgICAgICAgICAgICAgdGhyb3dDeWNsaWNEZXBlbmRlbmN5RXJyb3Ioc3RyaW5naWZ5KHRva2VuKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAocmVjb3JkLnZhbHVlID09PSBOT1RfWUVUKSB7CiAgICAgICAgICAgICAgICByZWNvcmQudmFsdWUgPSBDSVJDVUxBUjsKICAgICAgICAgICAgICAgIHJlY29yZC52YWx1ZSA9ICgvKiogQHR5cGUgez99ICovIChyZWNvcmQuZmFjdG9yeSkpKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHR5cGVvZiByZWNvcmQudmFsdWUgPT09ICdvYmplY3QnICYmIHJlY29yZC52YWx1ZSAmJiBoYXNPbkRlc3Ryb3kocmVjb3JkLnZhbHVlKSkgewogICAgICAgICAgICAgICAgdGhpcy5vbkRlc3Ryb3kuYWRkKHJlY29yZC52YWx1ZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovIChyZWNvcmQudmFsdWUpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGRlZgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgaW5qZWN0YWJsZURlZkluU2NvcGUoZGVmKSB7CiAgICAgICAgICAgIGlmICghZGVmLnByb3ZpZGVkSW4pIHsKICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmICh0eXBlb2YgZGVmLnByb3ZpZGVkSW4gPT09ICdzdHJpbmcnKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gZGVmLnByb3ZpZGVkSW4gPT09ICdhbnknIHx8IChkZWYucHJvdmlkZWRJbiA9PT0gdGhpcy5zY29wZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5pbmplY3RvckRlZlR5cGVzLmhhcyhkZWYucHJvdmlkZWRJbik7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdG9rZW4KICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGluamVjdGFibGVEZWZPckluamVjdG9yRGVmRmFjdG9yeSh0b2tlbikgewogICAgICAgIC8vIE1vc3QgdG9rZW5zIHdpbGwgaGF2ZSBhbiBpbmplY3RhYmxlIGRlZiBkaXJlY3RseSBvbiB0aGVtLCB3aGljaCBzcGVjaWZpZXMgYSBmYWN0b3J5IGRpcmVjdGx5LgogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBpbmplY3RhYmxlRGVmID0gZ2V0SW5qZWN0YWJsZURlZih0b2tlbik7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGZhY3RvcnkgPSBpbmplY3RhYmxlRGVmICE9PSBudWxsID8gaW5qZWN0YWJsZURlZi5mYWN0b3J5IDogZ2V0RmFjdG9yeURlZih0b2tlbik7CiAgICAgICAgaWYgKGZhY3RvcnkgIT09IG51bGwpIH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lIHRoaXMgcmVhbGx5IGlzIGEgc2ltcGxlIGNsYXNzIHdpdGggbm8gZGVwZW5kZW5jaWVzLCBzbyByZXR1cm4gYSBmYWN0b3J5IHRoYXQKICAgICAgICAvLyBqdXN0IGluc3RhbnRpYXRlcyB0aGUgemVyby1hcmcgY29uc3RydWN0b3IuCiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGluaGVyaXRlZEluamVjdGFibGVEZWYgPSBnZXRJbmhlcml0ZWRJbmplY3RhYmxlRGVmKHRva2VuKTsKICAgICAgICBpZiAoaW5oZXJpdGVkSW5qZWN0YWJsZURlZiAhPT0gbnVsbCkgewogICAgICAgICAgICByZXR1cm4gKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gaW5oZXJpdGVkSW5qZWN0YWJsZURlZi5mYWN0b3J5KCgvKiogQHR5cGUgez99ICovICh0b2tlbikpKSk7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICByZXR1cm4gKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gbmV3ICgoLyoqIEB0eXBlIHs/fSAqLyAodG9rZW4pKSkoKSk7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHByb3ZpZGVyCiAgICAgKiBAcGFyYW0gez99IG5nTW9kdWxlVHlwZQogICAgICogQHBhcmFtIHs/fSBwcm92aWRlcnMKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHByb3ZpZGVyVG9SZWNvcmQocHJvdmlkZXIsIG5nTW9kdWxlVHlwZSwgcHJvdmlkZXJzKSB7CiAgICAgICAgaWYgKGlzVmFsdWVQcm92aWRlcihwcm92aWRlcikpIHsKICAgICAgICAgICAgcmV0dXJuIG1ha2VSZWNvcmQodW5kZWZpbmVkLCBwcm92aWRlci51c2VWYWx1ZSk7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGZhY3RvcnkgPSBwcm92aWRlclRvRmFjdG9yeShwcm92aWRlciwgbmdNb2R1bGVUeXBlLCBwcm92aWRlcnMpOwogICAgICAgICAgICByZXR1cm4gbWFrZVJlY29yZChmYWN0b3J5LCBOT1RfWUVUKTsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIENvbnZlcnRzIGEgYFNpbmdsZVByb3ZpZGVyYCBpbnRvIGEgZmFjdG9yeSBmdW5jdGlvbi4KICAgICAqCiAgICAgKiBAcGFyYW0gez99IHByb3ZpZGVyIHByb3ZpZGVyIHRvIGNvbnZlcnQgdG8gZmFjdG9yeQogICAgICogQHBhcmFtIHs/PX0gbmdNb2R1bGVUeXBlCiAgICAgKiBAcGFyYW0gez89fSBwcm92aWRlcnMKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHByb3ZpZGVyVG9GYWN0b3J5KHByb3ZpZGVyLCBuZ01vZHVsZVR5cGUsIHByb3ZpZGVycykgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgZmFjdG9yeSA9IHVuZGVmaW5lZDsKICAgICAgICBpZiAoaXNUeXBlUHJvdmlkZXIocHJvdmlkZXIpKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdW53cmFwcGVkUHJvdmlkZXIgPSByZXNvbHZlRm9yd2FyZFJlZihwcm92aWRlcik7CiAgICAgICAgICAgIHJldHVybiBnZXRGYWN0b3J5RGVmKHVud3JhcHBlZFByb3ZpZGVyKSB8fCBpbmplY3RhYmxlRGVmT3JJbmplY3RvckRlZkZhY3RvcnkodW53cmFwcGVkUHJvdmlkZXIpOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgaWYgKGlzVmFsdWVQcm92aWRlcihwcm92aWRlcikpIHsKICAgICAgICAgICAgICAgIGZhY3RvcnkgPSAoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiByZXNvbHZlRm9yd2FyZFJlZihwcm92aWRlci51c2VWYWx1ZSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKGlzRmFjdG9yeVByb3ZpZGVyKHByb3ZpZGVyKSkgewogICAgICAgICAgICAgICAgZmFjdG9yeSA9ICgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHByb3ZpZGVyLnVzZUZhY3RvcnkoLi4uaW5qZWN0QXJncyhwcm92aWRlci5kZXBzIHx8IFtdKSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKGlzRXhpc3RpbmdQcm92aWRlcihwcm92aWRlcikpIHsKICAgICAgICAgICAgICAgIGZhY3RvcnkgPSAoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiDJtcm1aW5qZWN0KHJlc29sdmVGb3J3YXJkUmVmKHByb3ZpZGVyLnVzZUV4aXN0aW5nKSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgY2xhc3NSZWYgPSByZXNvbHZlRm9yd2FyZFJlZihwcm92aWRlciAmJgogICAgICAgICAgICAgICAgICAgICgoKC8qKiBAdHlwZSB7P30gKi8gKHByb3ZpZGVyKSkpLnVzZUNsYXNzIHx8IHByb3ZpZGVyLnByb3ZpZGUpKTsKICAgICAgICAgICAgICAgIGlmICghY2xhc3NSZWYpIHsKICAgICAgICAgICAgICAgICAgICB0aHJvd0ludmFsaWRQcm92aWRlckVycm9yKG5nTW9kdWxlVHlwZSwgcHJvdmlkZXJzLCBwcm92aWRlcik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAoaGFzRGVwcyhwcm92aWRlcikpIHsKICAgICAgICAgICAgICAgICAgICBmYWN0b3J5ID0gKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKCkgPT4gbmV3IChjbGFzc1JlZikoLi4uaW5qZWN0QXJncyhwcm92aWRlci5kZXBzKSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGdldEZhY3RvcnlEZWYoY2xhc3NSZWYpIHx8IGluamVjdGFibGVEZWZPckluamVjdG9yRGVmRmFjdG9yeShjbGFzc1JlZik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIGZhY3Rvcnk7CiAgICB9CiAgICAvKioKICAgICAqIEB0ZW1wbGF0ZSBUCiAgICAgKiBAcGFyYW0gez99IGZhY3RvcnkKICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAqIEBwYXJhbSB7Pz19IG11bHRpCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBtYWtlUmVjb3JkKGZhY3RvcnksIHZhbHVlLCBtdWx0aSA9IGZhbHNlKSB7CiAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgZmFjdG9yeTogZmFjdG9yeSwKICAgICAgICAgICAgdmFsdWU6IHZhbHVlLAogICAgICAgICAgICBtdWx0aTogbXVsdGkgPyBbXSA6IHVuZGVmaW5lZCwKICAgICAgICB9OwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBpc1ZhbHVlUHJvdmlkZXIodmFsdWUpIHsKICAgICAgICByZXR1cm4gdmFsdWUgIT09IG51bGwgJiYgdHlwZW9mIHZhbHVlID09ICdvYmplY3QnICYmIFVTRV9WQUxVRSBpbiB2YWx1ZTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gaXNFeGlzdGluZ1Byb3ZpZGVyKHZhbHVlKSB7CiAgICAgICAgcmV0dXJuICEhKHZhbHVlICYmICgoLyoqIEB0eXBlIHs/fSAqLyAodmFsdWUpKSkudXNlRXhpc3RpbmcpOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBpc0ZhY3RvcnlQcm92aWRlcih2YWx1ZSkgewogICAgICAgIHJldHVybiAhISh2YWx1ZSAmJiAoKC8qKiBAdHlwZSB7P30gKi8gKHZhbHVlKSkpLnVzZUZhY3RvcnkpOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBpc1R5cGVQcm92aWRlcih2YWx1ZSkgewogICAgICAgIHJldHVybiB0eXBlb2YgdmFsdWUgPT09ICdmdW5jdGlvbic7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGlzQ2xhc3NQcm92aWRlcih2YWx1ZSkgewogICAgICAgIHJldHVybiAhISgoLyoqIEB0eXBlIHs/fSAqLyAodmFsdWUpKSkudXNlQ2xhc3M7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAqIEByZXR1cm4gez99CiA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mplY3RJbmplY3Rvcid9CiAgICAgKgogICAgICogXEBwdWJsaWNBcGkKICAgICAqIEBhYnN0cmFjdAogICAgICovCiAgICBjbGFzcyBJbmplY3RvciB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBvcHRpb25zCiAgICAgICAgICogQHBhcmFtIHs/PX0gcGFyZW50CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzdGF0aWMgY3JlYXRlKG9wdGlvbnMsIHBhcmVudCkgewogICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShvcHRpb25zKSkgewogICAgICAgICAgICAgICAgcmV0dXJuIElOSkVDVE9SX0lNUEwob3B0aW9ucywgcGFyZW50LCAnJyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICByZXR1cm4gSU5KRUNUT1JfSU1QTChvcHRpb25zLnByb3ZpZGVycywgb3B0aW9ucy5wYXJlbnQsIG9wdGlvbnMubmFtZSB8fCAnJyk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICBJbmplY3Rvci5USFJPV19JRl9OT1RfRk9VTkQgPSBUSFJPV19JRl9OT1RfRk9VTkQ7CiAgICBJbmplY3Rvci5OVUxMID0gbmV3IE51bGxJbmplY3RvcigpOwogICAgLyoqIEBub2NvbGxhcHNlICovCiAgICBJbmplY3Rvci7JtXByb3YgPSDJtcm1ZGVmaW5lSW5qZWN0YWJsZSh7CiAgICAgICAgdG9rZW46IEluamVjdG9yLAogICAgICAgIHByb3ZpZGVkSW46ICgvKiogQHR5cGUgez99ICovICgnYW55JykpLAogICAgICAgIGZhY3Rvcnk6ICgvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgICgpID0+IMm1ybVpbmplY3QoSU5KRUNUT1IpKSwKICAgIH0pOwogICAgLyoqCiAgICAgKiBcQGludGVybmFsCiAgICAgKiBAbm9jb2xsYXBzZQogICAgICovCiAgICBJbmplY3Rvci5fX05HX0VMRU1FTlRfSURfXyA9IC0xOwoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogcGFja2FnZXMvY29yZS9zcmMvZGkvcmVmbGVjdGl2ZV9lcnJvcnMudHMKICAgICAqIEBzdXBwcmVzcyB7Y2hlY2tUeXBlcyxjb25zdGFudFByb3BlcnR5LGV4dHJhUmVxdWlyZSxtaXNzaW5nT3ZlcnJpZGUsbWlzc2luZ1JldHVybix1bnVzZWRQcml2YXRlTWVtYmVycyx1c2VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IGtleXMKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGZpbmRGaXJzdENsb3NlZEN5Y2xlKGtleXMpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgcmVzID0gW107CiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBrZXlzLmxlbmd0aDsgKytpKSB7CiAgICAgICAgICAgIGlmIChyZXMuaW5kZXhPZihrZXlzW2ldKSA+IC0xKSB7CiAgICAgICAgICAgICAgICByZXMucHVzaChrZXlzW2ldKTsKICAgICAgICAgICAgICAgIHJldHVybiByZXM7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmVzLnB1c2goa2V5c1tpXSk7CiAgICAgICAgfQogICAgICAgIHJldHVybiByZXM7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30ga2V5cwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gY29uc3RydWN0UmVzb2x2aW5nUGF0aChrZXlzKSB7CiAgICAgICAgaWYgKGtleXMubGVuZ3RoID4gMSkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHJldmVyc2VkID0gZmluZEZpcnN0Q2xvc2VkQ3ljbGUoa2V5cy5zbGljZSgpLnJldmVyc2UoKSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdG9rZW5TdHJzID0gcmV2ZXJzZWQubWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBrCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBrID0+IHN0cmluZ2lmeShrLnRva2VuKSkpOwogICAgICAgICAgICByZXR1cm4gJyAoJyArIHRva2VuU3Rycy5qb2luKCcgLT4gJykgKyAnKSc7CiAgICAgICAgfQogICAgICAgIHJldHVybiAnJzsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBpbmplY3RvcgogICAgICogQHBhcmFtIHs/fSBrZXkKICAgICAqIEBwYXJhbSB7P30gY29uc3RydWN0UmVzb2x2aW5nTWVzc2FnZQogICAgICogQHBhcmFtIHs/PX0gb3JpZ2luYWxFcnJvcgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gaW5qZWN0aW9uRXJyb3IoaW5qZWN0b3IsIGtleSwgY29uc3RydWN0UmVzb2x2aW5nTWVzc2FnZSwgb3JpZ2luYWxFcnJvcikgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBrZXlzID0gW2tleV07CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGVyck1zZyA9IGNvbnN0cnVjdFJlc29sdmluZ01lc3NhZ2Uoa2V5cyk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGVycm9yID0gKC8qKiBAdHlwZSB7P30gKi8gKChvcmlnaW5hbEVycm9yID8gd3JhcHBlZEVycm9yKGVyck1zZywgb3JpZ2luYWxFcnJvcikgOiBFcnJvcihlcnJNc2cpKSkpOwogICAgICAgIGVyc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cGxlCiAgICAgKgogICAgICogYGBgdHlwZXNjcmlwdAogICAgICogY2xhc3MgQSB7CiAgICAgKiAgIGNvbnN0cnVjdG9yKGI6Qikge30KICAgICAqIH0KICAgICAqCiAgICAgKiBleHBlY3QoKCkgPT4gSW5qZWN0b3IucmVzb2x2ZUFuZENyZWF0ZShbQV0pKS50b1Rocm93RXJyb3IoKTsKICAgICAqIGBgYAogICAgICogQHBhcmFtIHs/fSBpbmplY3RvcgogICAgICogQHBhcmFtIHs/fSBrZXkKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIG5vUHJvdmlkZXJFcnJvcihpbmplY3Rvciwga2V5KSB7CiAgICAgICAgcmV0dXJuIGluamVjdGlvbkVycm9yKGluamVjdG9yLCBrZXksICgvKioKICAgICAgICAgKiBAcGFyYW0gez99IGtleXMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIChrZXlzKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZmlyc3QgPSBzdHJpbmdpZnkoa2V5c1swXS50b2tlbik7CiAgICAgICAgICAgIHJldHVybiBgTm8gcHJvdmlkZXIgZm9yICR7Zmlyc3R9ISR7Y29uc3RydWN0UmVzb2x2aW5nUGF0aChrZXlzKX1gOwogICAgICAgIH0pKTsKICAgIH0KICAgIC8qKgogICAgICogVGhyb3duIHdoZW4gZGVwZW5kZW5jaWVzIGZvcm0gYSBjeWNsZS4KICAgICAqCiAgICAgKiBcQHVzYWdlTm90ZXMKICAgICAqICMjIyBFeGFtcGxlCiAgICAgKgogICAgICogYGBgdHlwZXNjcmlwdAogICAgICogdmFyIGluamVjdG9yID0gSW5qZWN0b3IucmVzb2x2ZUFuZENyZWF0ZShbCiAgICAgKiAgIHtwcm92aWRlOiAib25lIiwgdXNlRmFjdG9yeTogKHR3bykgPT4gInR3byIsIGRlcHM6IFtbbmV3IEluamVjd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NhdXNlZAogICAgICogdGhpcyBvYmplY3QgdG8gYmUgaW5zdGFudGlhdGVkLgogICAgICoKICAgICAqIFxAdXNhZ2VOb3RlcwogICAgICogIyMjIEV4YW1wbGUKICAgICAqCiAgICAgKiBgYGB0eXBlc2NyaXB0CiAgICAgKiBjbGFzcyBBIHsKICAgICAqICAgY29uc3RydWN0b3IoKSB7CiAgICAgKiAgICAgdGhyb3cgbmV3IEVycm9yKCdtZXNzYWdlJyk7CiAgICAgKiAgIH0KICAgICAqIH0KICAgICAqCiAgICAgKiB2YXIgaW5qZWN0b3IgPSBJbmplY3Rvci5yZXNvbHZlQW5kQ3JlYXRlKFtBXSk7CiAgICAgKiB0cnkgewogICAgICogICBpbmplY3Rvci5nZXQoQSk7CiAgICAgKiB9IGNhdGNoIChlKSB7CiAgICAgKiAgIGV4cGVjdChlIGluc3RhbmNlb2YgSW5zdGFudGlhdGlvbkVycm9yKS50b0JlKHRydWUpOwogICAgICogICBleHBlY3QoZS5vcmlnaW5hbEV4Y2VwdGlvbi5tZXNzYWdlKS50b0VxdWFsKCJtZXNzYWdlIik7CiAgICAgKiAgIGV4cGVjdChlLm9yaWdpbmFsU3RhY2spLnRvQmVEZWZpbmVkKCk7CiAgICAgKiB9CiAgICAgKiBgYGAKICAgICAqIEBwYXJhbSB7P30gaW5qZWN0b3IKICAgICAqIEBwYXJhbSB7P30gb3JpZ2luYWxFeGNlcHRpb24KICAgICAqIEBwYXJhbSB7P30gb3JpZ2luYWxTdGFjawogICAgICogQHBhcmFtIHs/fSBrZXkKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGluc3RhbnRpYXRpb25FcnJvcihpbmplY3Rvciwgb3JpZ2luYWxFeGNlcHRpb24sIG9yaWdpbmFsU3RhY2ssIGtleSkgewogICAgICAgIHJldHVybiBpbmplY3Rpb25FcnJvcihpbmplY3Rvciwga2V5LCAoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBrZXlzCiAgICAgIC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B7P30gcGFyYW1zCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBub0Fubm90YXRpb25FcnJvcih0eXBlT3JGdW5jLCBwYXJhbXMpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3Qgc2lnbmF0dXJlID0gW107CiAgICAgICAgZm9yIChsZXQgaSA9IDAsIGlpID0gcGFyYW1zLmxlbmd0aDsgaSA8IGlpOyBpKyspIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwYXJhbWV0ZXIgPSBwYXJhbXNbaV07CiAgICAgICAgICAgIGlmICghcGFyYW1ldGVyIHx8IHBhcmFtZXRlci5sZW5ndGggPT0gMCkgewogICAgICAgICAgICAgICAgc2lnbmF0dXJlLnB1c2goJz8nKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHNpZ25hdHVyZS5wdXNoKHBhcmFtZXRlci5tYXAoc3RyaW5naWZ5KS5qb2luKCcgJykpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiBFcnJvcignQ2Fubm90IHJlc29sdmUgYWxsIHBhcmFtZXRlcnMgZm9yIFwnJyArIHN0cmluZ2lmeSh0eXBlT3JGdW5jKSArICdcJygnICsKICAgICAgICAgICAgc2lnbmF0dXJlLmpvaW4oJywgJykgKyAnKS4gJyArCiAgICAgICAgICAgICdNYWtlIHN1cmUgdGhhdCBhbGwgdGhlIHBhcmFtZXRlcnMgYXJlIGRlY29yYXRlZCB3aXRoIEluamVjdCBvciBoYXZlIHZhbGlkIHR5cGUgYW5ub3RhdGlvbnMgYW5kIHRoYXQgXCcnICsKICAgICAgICAgICAgc3RyaW5naWZ5KHR5cGVPckZ1bmMpICsgJ1wnIGlzIGRlY29yYXRlZCB3aXRoIEluamVjdGFibGUuJyk7CiAgICB9CiAgICAvKioKICAgICAqIFRocm93biB3aGVuIGdldHRpb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2lkZSB1bmlxdWUgYGlkYCBhbGxvd3MKICAgICAqIHRoZQogICAgICogaW5qZWN0b3IgdG8gc3RvcmUgY3JlYXRlZCBvYmplY3RzIGluIGEgbW9yZSBlZmZpY2llbnQgd2F5LgogICAgICoKICAgICAqIGBLZXlgIHNob3VsZCBub3QgYmUgY3JlYXRlZCBkaXJlY3RseS4ge1xAbGluayBSZWZsZWN0aXZlSW5qZWN0b3J9IGNyZWF0ZXMga2V5cyBhdXRvbWF0aWNhbGx5IHdoZW4KICAgICAqIHJlc29sdmluZwogICAgICogcHJvdmlkZXJzLgogICAgICoKICAgICAqIEBkZXByZWNhdGVkIE5vIHJlcGxhY2VtZW50CiAgICAgKiBcQHB1YmxpY0FwaQogICAgICovCiAgICBjbGFzcyBSZWZsZWN0aXZlS2V5IHsKICAgICAgICAvKioKICAgICAgICAgKiBQcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSB0b2tlbgogICAgICAgICAqIEBwYXJhbSB7P30gaWQKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3Rvcih0b2tlbiwgaWQpIHsKICAgICAgICAgICAgdGhpcy50b2tlbiA9IHRva2VuOwogICAgICAgICAgICB0aGlzLmlkID0gaWQ7CiAgICAgICAgICAgIGlmICghdG9rZW4pIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignVG9rZW4gbXVzdCBiZSBkZWZpbmVkIScpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuZGlzcGxheU5hbWUgPSBzdHJpbmdpZnkodGhpcy50b2tlbik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJldHJpZXZlcyBhIGBLZXlgIGZvciBhIHRva2VuLgogICAgICAgICAqIEBwYXJhbSB7P30gdG9rZW4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHN0YXRpYyBnZXQodG9rZW4pIHsKICAgICAgICAgICAgcmV0dXJuIF9nbG9iYWxLZXlSZWdpc3RyeS5nZXQocmVzb2x2ZUZvcndhcmRSZWYodG9rZW4pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30gdGhlIG51bWJlciBvZiBrZXlzIHJlZ2lzdGVyZWQgaW4gdGhlIHN5c3RlbS4KICAgICAgICAgKi8KICAgICAgICBzdGF0aWMgZ2V0IG51bWJlck9mS2V5cygpIHsKICAgICAgICAgICAgcmV0dXJuIF9nbG9iYWxLZXlSZWdpc3RyeS5udW1iZXJPZktleXM7CiAgICAgICAgfQogICAgfQogICAgY2xhc3MgS2V5UmVnaXN0cnkgewogICAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgICAgICB0aGlzLl9hbGxLZXlzID0gbmV3IE1hcCgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHRva2VuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQodG9rZW4pIHsKICAgICAgICAgICAgaWYgKHRva2VuIGluc3RhbmNlb2YgUmVmbGVjdGl2ZUtleSkKICAgICAgICAgICAgICAgIHJldHVybiB0b2tlbjsKICAgICAgICAgICAgaWYgKHRoaXMuX2FsbEtleXMuaGFzKHRva2VuKSkgewogICAgICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovICh0aGlzLl9hbGxLZXlzLmdldCh0b2tlbikpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG5ld0tleSA9IG5ldyBSZWZsZWN0aXZlS2V5KHRva2VuLCBSZWZsZWN0aXZlS2V5Lm51bWJlck9mS2V5cyk7CiAgICAgICAgICAgIHRoaXMuX2FsbEtleXMuc2V0KHRva2VuLCBuZXdLZXkpOwogICAgICAgICAgICByZXR1cm4gbmV3S2V5OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqL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dG9yID0gbmV3IFJlZmxlY3RvcihuZXcgUmVmbGVjdGlvbkNhcGFiaWxpdGllcygpKTsKICAgIC8qKgogICAgICogYERlcGVuZGVuY3lgIGlzIHVzZWQgYnkgdGhlIGZyYW1ld29yayB0byBleHRlbmQgREkuCiAgICAgKiBUaGlzIGlzIGludGVybmFsIHRvIEFuZ3VsYXIgYW5kIHNob3VsZCBub3QgYmUgdXNlZCBkaXJlY3RseS4KICAgICAqLwogICAgY2xhc3MgUmVmbGVjdGl2ZURlcGVuZGVuY3kgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30ga2V5CiAgICAgICAgICogQHBhcmFtIHs/fSBvcHRpb25hbAogICAgICAgICAqIEBwYXJhbSB7P30gdmlzaWJpbGl0eQogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKGtleSwgb3B0aW9uYWwsIHZpc2liaWxpdHkpIHsKICAgICAgICAgICAgdGhpcy5rZXkgPSBrZXk7CiAgICAgICAgICAgIHRoaXMub3B0aW9uYWwgPSBvcHRpb25hbDsKICAgICAgICAgICAgdGhpcy52aXNpYmlsaXR5ID0gdmlzaWJpbGl0eTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBrZXkKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHN0YXRpYyBmcm9tS2V5KGtleSkgewogICAgICAgICAgICByZXR1cm4gbmV3IFJlZmxlY3RpdmVEZXBlbmRlbmN5KGtleSwgZmFsc2UsIG51bGwpOwogICAgICAgIH0KICAgIH0KICAgIC8qKiBAdHlwZSB7P30gKi8KICAgIGNvbnN0IF9FTVBUWV9MSVNUID0gW107CiAgICBjbGFzcyBSZXNvbHZlZFJlZmxlY3RpdmVQcm92aWRlcl8gewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30ga2V5CiAgICAgICAgICogQHBhcmFtIHs/fSByZXNvbHZlZEZhY3RvcmllcwogICAgICAgICAqIEBwYXJhbSB7P30gbXVsdGlQcm92aWRlcgogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKGtleSwgcmVzb2x2ZWRGYWN0b3JpZXMsIG11bHRpUHJvdmlkZXIpIHsKICAgICAgICAgICAgdGhpcy5rZXkgPSBrZXk7CiAgICAgICAgICAgIHRoaXMucmVzb2x2ZWRGYWN0b3JpZXMgPSByZXNvbHZlZEZhY3RvcmllczsKICAgICAgICAgICAgdGhpcy5tdWx0aVByb3ZpZGVyID0gbXVsdGlQcm92aWRlcjsKICAgICAgICAgICAgdGhpcy5yZXNvbHZlZEZhY3RvcnkgPSB0aGlzLnJlc29sdmVkRmFjdG9yaWVzWzBdOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQW4gaW50ZXJuYWwgcmVzb2x2ZWQgcmVwcmVzZW50YXRpb24gb2YgYSBmYWN0b3J5IGZ1bmN0aW9uIGNyZWF0ZWQgYnkgcmVzb2x2aW5nIGBQcm92aWRlcmAuCiAgICAgKiBcQHB1YmxpY0FwaQogICAgICovCiAgICBjbGFzcyBSZXNvbHZlZFJlZmxlY3RpdmVGYWN0b3J5IHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGZhY3RvcnkKICAgICAgICAgKiBAcGFyYW0gez99IGRlcGVuZGVuY2llcwogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKGZhY3RvcnksIGRlcGVuZGVuY2llcykgewogICAgICAgICAgICB0aGlzLmZhY3RvcnkgPSBmYWN0b3J5OwogICAgICAgICAgICB0aGlzLmRlcGVuZGVuY2llcyA9IGRlcGVuZGVuY2llczsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIFJlc29sdmUgYSBzaW5nbGUgcHJvdmlkZXIuCiAgICAgKiBAcGFyYW0gez99IHByb3ZpZGVyCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiByZXNvbHZlUmVmbGVjdGl2ZUZhY3RvcnkocHJvdmlkZXIpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IGZhY3RvcnlGbjsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IHJlc29sdmVkRGVwczsKICAgICAgICBpZiAocHJvdmlkZXIudXNlQ2xhc3MpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB1c2VDbGFzcyA9IHJlc29sdmVGb3J3YXJkUmVmKHByb3ZpZGVyLnVzZUNsYXNzKTsKICAgICAgICAgICAgZmFjdG9yeUZuID0gcmVmbGVjdG9yLmZhY3RvcnkodXNlQ2xhc3MpOwogICAgICAgICAgICByZXNvbHZlZERlcHMgPSBfZGVwZW5kZW5jaWVzRm9yKHVzZUNsYXNzKTsKICAgICAgICB9CiAgICAgICAgZWxzZSBpZiAocHJvdmlkZXIudXNlRXhpc3RpbmcpIHsKICAgICAgICAgICAgZmFjdG9yeUZuID0gKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGFsaWFzSW5zdGFuY2UKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChhbGlhc0luc3RhbmNlKSA9PiBhbGlhc0luc3RhbmNlKTsKICAgICAgICAgICAgcmVzb2x2ZWREZXBzID0gW1JlZmxlY3RpdmVEZXBlbmRlbmN5LmZyb21LZXkoUmVmbGVjdGl2ZUtleS5nZXQocHJvdmlkZXIudXNlRXhpc3RpbmcpKV07CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYgKHByb3ZpZGVyLnVzZUZhY3RvcnkpIHsKICAgICAgICAgICAgZmFjdG9yeUZuID0gcHJvdmlkZXIudXNlRmFjdG9yeTsKICAgICAgICAgICAgcmVzb2x2ZWREZXBzID0gY29uc3RydWN0RGVwZW5kZW5jaWVzKHByb3ZpZGVyLnVzZUZhY3RvcnksIHByb3ZpZGVyLmRlcHMpOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgZmFjdG9yeUZuID0gKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gcHJvdmlkZXIudXNlVmFsdWUpOwogICAgICAgICAgICByZXNvbHZlZERlcHMgPSBfRU1QVFlfTElTVDsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIG5ldyBSZXNvbHZlZFJlZmxlY3RpdmVGYWN0b3J5KGZhY3RvcnlGbiwgcmVzb2x2ZWREZXBzKTsKICAgIH0KICAgIC8qKgogICAgICogQ29udmVydHMgdGhlIGBQcm92aWRlcmAgaW50byBgUmVzb2x2ZWRQcm92aWRlcmAuCiAgICAgKgogICAgICogYEluamVjdG9yYCBpbnRlcm5hbGx5IG9ubHkgdXNlcyBgUmVzb2x2ZWRQcm92aWRlcmAsIGBQcm92aWRlcmAgY29udGFpbnMgY29udmVuaWVuY2UgcHJvdmlkZXIKICAgICAqIHN5bnRheC4KICAgICAqIEBwYXJhbSB7P30gcHJvdmlkZXIKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHJlc29sdmVSZWZsZWN0aXZlUHJvdmlkZXIocHJvdmlkZXIpIHsKICAgICAgICByZXR1cm4gbmV3IFJlc29sdmVkUmVmbGVjdGl2ZVByb3ZpZGVyXyhSZWZsZWN0aXZlS2V5LmdldChwcm92aWRlci5wcm92aWRlKSwgW3Jlc29sdmVSZWZsZWN0aXZlRmFjdG9yeShwcm92aWRlcildLCBwcm92aWRlci5tdWx0aSB8fCBmYWxzZSk7CiAgICB9CiAgICAvKioKICAgICAqIFJlc29sdmUgYSBsaXN0IG9mIFByb3ZpZGVycy4KICAgICAqIEBwYXJhbSB7P30gcHJvdmlkZXJzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiByZXNvbHZlUmVmbGVjdGl2ZVByb3ZpZGVycyhwcm92aWRlcnMpIHsKICAg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ICAgICAgIGNvbnN0IGV4aXN0aW5nID0gbm9ybWFsaXplZFByb3ZpZGVyc01hcC5nZXQocHJvdmlkZXIua2V5LmlkKTsKICAgICAgICAgICAgaWYgKGV4aXN0aW5nKSB7CiAgICAgICAgICAgICAgICBpZiAocHJvdmlkZXIubXVsdGlQcm92aWRlciAhPT0gZXhpc3RpbmcubXVsdGlQcm92aWRlcikgewogICAgICAgICAgICAgICAgICAgIHRocm93IG1peGluZ011bHRpUHJvdmlkZXJzV2l0aFJlZ3VsYXJQcm92aWRlcnNFcnJvcihleGlzdGluZywgcHJvdmlkZXIpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKHByb3ZpZGVyLm11bHRpUHJvdmlkZXIpIHsKICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBqID0gMDsgaiA8IHByb3ZpZGVyLnJlc29sdmVkRmFjdG9yaWVzLmxlbmd0aDsgaisrKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGV4aXN0aW5nLnJlc29sdmVkRmFjdG9yaWVzLnB1c2gocHJvdmlkZXIucmVzb2x2ZWRGYWN0b3JpZXNbal0pOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIG5vcm1hbGl6ZWRQcm92aWRlcnNNYXAuc2V0KHByb3ZpZGVyLmtleS5pZCwgcHJvdmlkZXIpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IHJlc29sdmVkUHJvdmlkZXI7CiAgICAgICAgICAgICAgICBpZiAocHJvdmlkZXIubXVsdGlQcm92aWRlcikgewogICAgICAgICAgICAgICAgICAgIHJlc29sdmVkUHJvdmlkZXIgPSBuZXcgUmVzb2x2ZWRSZWZsZWN0aXZlUHJvdmlkZXJfKHByb3ZpZGVyLmtleSwgcHJvdmlkZXIucmVzb2x2ZWRGYWN0b3JpZXMuc2xpY2UoKSwgcHJvdmlkZXIubXVsdGlQcm92aWRlcik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICByZXNvbHZlZFByb3ZpZGVyID0gcHJvdmlkZXI7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBub3JtYWxpemVkUHJvdmlkZXJzTWFwLnNldChwcm92aWRlci5rZXkuaWQsIHJlc29sdmVkUHJvdmlkZXIpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiBub3JtYWxpemVkUHJvdmlkZXJzTWFwOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHByb3ZpZGVycwogICAgICogQHBhcmFtIHs/fSByZXMKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIF9ub3JtYWxpemVQcm92aWRlcnMocHJvdmlkZXJzLCByZXMpIHsKICAgICAgICBwcm92aWRlcnMuZm9yRWFjaCgoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBiCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBiID0+IHsKICAgICAgICAgICAgaWYgKGIgaW5zdGFuY2VvZiBUeXBlKSB7CiAgICAgICAgICAgICAgICByZXMucHVzaCgoLyoqIEB0eXBlIHs/fSAqLyAoeyBwcm92aWRlOiBiLCB1c2VDbGFzczogYiB9KSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKGIgJiYgdHlwZW9mIGIgPT0gJ29iamVjdCcgJiYgKCgvKiogQHR5cGUgez99ICovIChiKSkpLnByb3ZpZGUgIT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICAgICAgcmVzLnB1c2goKC8qKiBAdHlwZSB7P30gKi8gKGIpKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoQXJyYXkuaXNBcnJheShiKSkgewogICAgICAgICAgICAgICAgX25vcm1hbGl6ZVByb3ZpZGVycyhiLCByZXMpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhyb3cgaW52YWxpZFByb3ZpZGVyRXJyb3IoYik7CiAgICAgICAgICAgIH0KICAgICAgICB9KSk7CiAgICAgICAgcmV0dXJuIHJlczsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB0eXBlT3JGdW5jCiAgICAgKiBAcGFyYW0gez89fSBkZXBlbmRlbmNpZXMKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGNvbnN0cnVjdERlcGVuZGVuY2llcyh0eXBlT3JGdW5jLCBkZXBlbmRlbmNpZXMpIHsKICAgICAgICBpZiAoIWRlcGVuZGVuY2llcykgewogICAgICAgICAgICByZXR1cm4gX2RlcGVuZGVuY2llc0Zvcih0eXBlT3JGdW5jKTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcGFyYW1zID0gZGVwZW5kZW5jaWVzLm1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdCA9PiBbdF0pKTsKICAgICAgICAgICAgcmV0dXJuIGRlcGVuZGVuY2llcy5tYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHQgPT4gX2V4dHJhY3RUb2tlbih0eXBlT3JGdW5jLCB0LCBwYXJhbXMpKSk7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHR5cGVPckZ1bmMKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIF9kZXBlbmRlbmNpZXNGb3IodHlwZU9yRnVuYykgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBwYXJhbXMgPSByZWZsZWN0b3IucGFyYW1ldGVycyh0eXBlT3JGdW5jKTsKICAgICAgICBpZiAoIXBhcmFtcykKICAgICAgICAgICAgcmV0dXJuIFtdOwogICAgICAgIGlmIChwYXJhbXMuc29tZSgoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBwCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBwID0+IHAgPT0gbnVsbCkpKSB7CiAgICAgICAgICAgIHRocm93IG5vQW5ub3RhdGlvbkVycm9yKHR5cGVPckZ1bmMsIHBhcmFtcyk7CiAgICAgICAgfQogICAgICAgIHJldHVybiBwYXJhbXMubWFwKCgvKioKICAgICAgICAgKiBAcGFyYW0gez99IHAKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHAgPT4gX2V4dHJhY3RUb2tlbih0eXBlT3JGdW5jLCBwLCBwYXJhbXMpKSk7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdHlwZU9yRnVuYwogICAgICogQHBhcmFtIHs/fSBtZXRhZGF0YQogICAgICogQHBhcmFtIHs/fSBwYXJhbXMKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIF9leHRyYWN0VG9rZW4odHlwZU9yRnVuYywgbWV0YWRhdGEsIHBhcmFtcykgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgdG9rZW4gPSBudWxsOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgb3B0aW9uYWwgPSBmYWxzZTsKICAgICAgICBpZiAoIUFycmF5LmlzQXJyYXkobWV0YWRhdGEpKSB7CiAgICAgICAgICAgIGlmIChtZXRhZGF0YSBpbnN0YW5jZW9mIEluamVjdCkgewogICAgICAgICAgICAgICAgcmV0dXJuIF9jcmVhdGVEZXBlbmRlbmN5KG1ldGFkYXRhLnRva2VuLCBvcHRpb25hbCwgbnVsbCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICByZXR1cm4gX2NyZWF0ZURlcGVuZGVuY3kobWV0YWRhdGEsIG9wdGlvbmFsLCBudWxsKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IHZpc2liaWxpdHkgPSBudWxsOwogICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbWV0YWRhdGEubGVuZ3RoOyArK2kpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwYXJhbU1ldGFkYXRhID0gbWV0YWRhdGFbaV07CiAgICAgICAgICAgIGlmIChwYXJhbU1ldGFkYXRhIGluc3RhbmNlb2YgVHlwZSkgewogICAgICAgICAgICAgICAgdG9rZW4gPSBwYXJhbU1ldGFkYXRhOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKHBhcmFtTWV0YWRhdGEgaW5zdGFuY2VvZiBJbmplY3QpIHsKICAgICAgICAgICAgICAgIHRva2VuID0gcGFyYW1NZXRhZGF0YS50b2tlbjsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChwYXJhbU1ldGFkYXRhIGluc3RhbmNlb2YgT3B0aW9uYWwpIHsKICAgICAgICAgICAgICAgIG9wdGlvbmFsID0gdHJ1ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChwYXJhbU1ldGFkYXRhIGluc3RhbmNlb2YgU2VsZiB8fCBwYXJhbU1ldGFkYXRhIGluc3RhbmNlb2YgU2tpcFNlbGYpIHsKICAgICAgICAgICAgICAgIHZpc2liaWxpdHkgPSBwYXJhbU1ldGFkYXRhOwogICAgICAg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JldHVybix1bnVzZWRQcml2YXRlTWVtYmVycyx1c2VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgLy8gVGhyZXNob2xkIGZvciB0aGUgZHluYW1pYyB2ZXJzaW9uCiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBVTkRFRklORUQgPSB7fTsKICAgIC8qKgogICAgICogQSBSZWZsZWN0aXZlRGVwZW5kZW5jeSBpbmplY3Rpb24gY29udGFpbmVyIHVzZWQgZm9yIGluc3RhbnRpYXRpbmcgb2JqZWN0cyBhbmQgcmVzb2x2aW5nCiAgICAgKiBkZXBlbmRlbmNpZXMuCiAgICAgKgogICAgICogQW4gYEluamVjdG9yYCBpcyBhIHJlcGxhY2VtZW50IGZvciBhIGBuZXdgIG9wZXJhdG9yLCB3aGljaCBjYW4gYXV0b21hdGljYWxseSByZXNvbHZlIHRoZQogICAgICogY29uc3RydWN0b3IgZGVwZW5kZW5jaWVzLgogICAgICoKICAgICAqIEluIHR5cGljYWwgdXNlLCBhcHBsaWNhdGlvbiBjb2RlIGFza3MgZm9yIHRoZSBkZXBlbmRlbmNpZXMgaW4gdGhlIGNvbnN0cnVjdG9yIGFuZCB0aGV5IGFyZQogICAgICogcmVzb2x2ZWQgYnkgdGhlIGBJbmplY3RvcmAuCiAgICAgKgogICAgICogXEB1c2FnZU5vdGVzCiAgICAgKiAjIyMgRXhhbXBsZQogICAgICoKICAgICAqIFRoZSBmb2xsb3dpbmcgZXhhbXBsZSBjcmVhdGVzIGFuIGBJbmplY3RvcmAgY29uZmlndXJlZCB0byBjcmVhdGUgYEVuZ2luZWAgYW5kIGBDYXJgLgogICAgICoKICAgICAqIGBgYHR5cGVzY3JpcHQKICAgICAqIFxASW5qZWN0YWJsZSgpCiAgICAgKiBjbGFzcyBFbmdpbmUgewogICAgICogfQogICAgICoKICAgICAqIFxASW5qZWN0YWJsZSgpCiAgICAgKiBjbGFzcyBDYXIgewogICAgICogICBjb25zdHJ1Y3Rvcih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ICAgICAgICAgKiBwcm92aWRlcnMgaW50byBhbiBhcnJheSBvZiBgUmVzb2x2ZWRSZWZsZWN0aXZlUHJvdmlkZXJgcy4KICAgICAgICAgKgogICAgICAgICAqIFxAdXNhZ2VOb3RlcwogICAgICAgICAqICMjIyBFeGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBgYGB0eXBlc2NyaXB0CiAgICAgICAgICogXEBJbmplY3RhYmxlKCkKICAgICAgICAgKiBjbGFzcyBFbmdpbmUgewogICAgICAgICAqIH0KICAgICAgICAgKiAgLwogICAgICAgICAqIGNsYXNzIENhciB7CiAgICAgICAgICogICBjb25zdHJ1Y3RvcihwdWJsaWMgZW5naW5lOkVuZ2luZSkge30KICAgICAgICAgKiB9CiAgICAgICAgICoKICAgICAgICAgKiB2YXIgcHJvdmlkZXJzID0gUmVmbGVjdGl2ZUluamVjdG9yLnJlc29sdmUoW0NhciwgW1tFbmdpbmVdXV0pOwogICAgICAgICAqCiAgICAgICAgICogZXhwZWN0KHByb3ZpZGVycy5sZW5ndGgpLnRvRXF1YWwoMik7CiAgICAgICAgICoKICAgICAgICAgKiBleHBlY3QocHJvdmlkZXJzWzBdIGluc3RhbmNlb2YgUmVzb2x2ZWRSZWZsZWN0aXZlUHJvdmlkZXIpLnRvQmUodHJ1ZSk7CiAgICAgICAgICogZXhwZWN0KHByb3ZpZGVyc1swXS5rZXkuZGlzcGxheU5hbWUpLnRvQmUoIkNhciIpOwogICAgICAgICAqIGV4cGVjdChwcm92aWRlcnNbMF0uZGVwZW5kZW5jaWVzLmxlbmd0aCkudG9FcXVhbCgxKTsKICAgICAgICAgKiBleHBlY3QocHJvdmlkZXJzWzBdLmZhY3RvcnkpLnRvQmVEZWZpbmVkKCk7CiAgICAgICAgICoKICAgICAgICAgKiBleHBlY3QocHJvdmlkZXJzWzFdLmtleS5kaXNwbGF5TmFtZSkudG9CZSgiRW5naW5lIik7CiAgICAgICAgICogfSk7CiAgICAgICAgICogYGBgCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez99IHByb3ZpZGVycwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc3RhdGljIHJlc29sdmUocHJvdmlkZXJzKSB7CiAgICAgICAgICAgIHJldHVybiByZXNvbHZlUmVmbGVjdGl2ZVByb3ZpZGVycyhwcm92aWRlcnMpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZXNvbHZlcyBhbiBhcnJheSBvZiBwcm92aWRlcnMgYW5kIGNyZWF0ZXMgYW4gaW5qZWN0b3IgZnJvbSB0aG9zZSBwcm92aWRlcnMuCiAgICAgICAgICoKICAgICAgICAgKiBUaGUgcGFzc2VkLWluIHByb3ZpZGVycyBjYW4gYmUgYW4gYXJyYXkgb2YgYFR5cGVgLCBgUHJvdmlkZXJgLAogICAgICAgICAqIG9yIGEgcmVjdXJzaXZlIGFycmF5IG9mIG1vcmUgcHJvdmlkZXJzLgogICAgICAgICAqCiAgICAgICAgICogXEB1c2FnZU5vdGVzCiAgICAgICAgICogIyMjIEV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIGBgYHR5cGVzY3JpcHQKICAgICAgICAgKiBcQEluamVjdGFibGUoKQogICAgICAgICAqIGNsYXNzIEVuZ2luZSB7CiAgICAgICAgICogfQogICAgICAgICAqICAvCiAgICAgICAgICogY2xhc3MgQ2FyIHsKICAgICAgICAgKiAgIGNvbnN0cnVjdG9yKHB1YmxpYyBlbmdpbmU6RW5naW5lKSB7fQogICAgICAgICAqIH0KICAgICAgICAgKgogICAgICAgICAqIHZhciBpbmplY3RvciA9IFJlZmxlY3RpdmVJbmplY3Rvci5yZXNvbHZlQW5kQ3JlYXRlKFtDYXIsIEVuZ2luZV0pOwogICAgICAgICAqIGV4cGVjdChpbmplY3Rvci5nZXQoQ2FyKSBpbnN0YW5jZW9mIENhcikudG9CZSh0cnVlKTsKICAgICAgICAgKiBgYGAKICAgICAgICAgKiBAcGFyYW0gez99IHByb3ZpZGVycwogICAgICAgICAqIEBwYXJhbSB7Pz19IHBhcmVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc3RhdGljIHJlc29sdmVBbmRDcmVhdGUocHJvdmlkZXJzLCBwYXJlbnQpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBSZXNvbHZlZFJlZmxlY3RpdmVQcm92aWRlcnMgPSBSZWZsZWN0aXZlSW5qZWN0b3IucmVzb2x2ZShwcm92aWRlcnMpOwogICAgICAgICAgICByZXR1cm4gUmVmbGVjdGl2ZUluamVjdG9yLmZyb21SZXNvbHZlZFByb3ZpZGVycyhSZXNvbHZlZFJlZmxlY3RpdmVQcm92aWRlcnMsIHBhcmVudCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYW4gaW5qZWN0b3IgZnJvbSBwcmV2aW91c2x5IHJlc29sdmVkIHByb3ZpZGVycy4KICAgICAgICAgKgogICAgICAgICAqIFRoaXMgQVBJIGlzIHRoZSByZWNvbW1lbmRlZCB3YXkgdG8gY29uc3RydWN0IGluamVjdG9ycyBpbiBwZXJmb3JtYW5jZS1zZW5zaXRpdmUgcGFydHMuCiAgICAgICAgICoKICAgICAgICAgKiBcQHVzYWdlTm90ZXMKICAgICAgICAgKiAjIyMgRXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogYGBgdHlwZXNjcmlwdAogICAgICAgICAqIFxASW5qZWN0YWJsZSgpCiAgICAgICAgICogY2xhc3MgRW5naW5lIHsKICAgICAgICAgKiB9CiAgICAgICAgICogIC8KICAgICAgICAgKiBjbGFzcyBDYXIgewogICAgICAgICAqICAgY29uc3RydWN0b3IocHVibGljIGVuZ2luZTpFbmdpbmUpIHt9CiAgICAgICAgICogfQogICAgICAgICAqCiAgICAgICAgICogdmFyIHByb3ZpZGVycyA9IFJlZmxlY3RpdmVJbmplY3Rvci5yZXNvbHZlKFtDYXIsIEVuZ2luZV0pOwogICAgICAgICAqIHZhciBpbmplY3RvciA9IFJlZmxlY3RpdmVJbmplY3Rvci5mcm9tUmVzb2x2ZWRQcm92aWRlcnMocHJvdmlkZXJzKTsKICAgICAgICAgKiBleHBlY3QoaW5qZWN0b3IuZ2V0KENhcikgaW5zdGFuY2VvZiBDYXIpLnRvQmUodHJ1ZSk7CiAgICAgICAgICogYGBgCiAgICAgICAgICogQHBhcmFtIHs/fSBwcm92aWRlcnMKICAgICAgICAgKiBAcGFyYW0gez89fSBwYXJlbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHN0YXRpYyBmcm9tUmVzb2x2ZWRQcm92aWRlcnMocHJvdmlkZXJzLCBwYXJlbnQpIHsKICAgICAgICAgICAgcmV0dXJuIG5ldyBSZWZsZWN0aXZlSW5qZWN0b3JfKHByb3ZpZGVycywgcGFyZW50KTsKICAgICAgICB9CiAgICB9CiAgICBjbGFzcyBSZWZsZWN0aXZlSW5qZWN0b3JfIHsKICAgICAgICAvKioKICAgICAgICAgKiBQcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBfcHJvdmlkZXJzCiAgICAgICAgICogQHBhcmFtIHs/PX0gX3BhcmVudAogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKF9wcm92aWRlcnMsIF9wYXJlbnQpIHsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX2NvbnN0cnVjdGlvbkNvdW50ZXIgPSAwOwogICAgICAgICAgICB0aGlzLl9wcm92aWRlcnMgPSBfcHJvdmlkZXJzOwogICAgICAgICAgICB0aGlzLnBhcmVudCA9IF9wYXJlbnQgfHwgbnVsbDsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBsZW4gPSBfcHJvdmlkZXJzLmxlbmd0aDsKICAgICAgICAgICAgdGhpcy5rZXlJZHMgPSBbXTsKICAgICAgICAgICAgdGhpcy5vYmpzID0gW107CiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbGVuOyBpKyspIHsKICAgICAgICAgICAgICAgIHRoaXMua2V5SWRzW2ldID0gX3Byb3ZpZGVyc1tpXS5rZXkuaWQ7CiAgICAgICAgICAgICAgICB0aGlzLm9ianNbaV0gPSBVTkRFRklORUQ7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB0b2tlbgogICAgICAgICAqIEBwYXJhbSB7Pz19IG5vdEZvdW5kVmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCh0b2tlbiwgbm90Rm91bmRWYWx1ZSA9IFRIUk9XX0lGX05PVF9GT1VORCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fZ2V0QnlLZXkoUmVmbGVjdGl2ZUtleS5nZXQodG9rZW4pLCBudWxsLCBub3RGb3VuZFZhbHVlKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBwcm92aWRlcnMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlc29sdmVBbmRDcmVhdGVDaGlsZChwcm92aWRlcnMpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBSZXNvbHZlZFJlZmxlY3RpdmVQcm92aWRlcnMgPSBSZWZsZWN0aXZlSW5qZWN0b3IucmVzb2x2ZShwcm92aWRlcnMpOwogICAgICAgICAgICByZXR1cm4gdGhpcy5jcmVhdGVDaGlsZEZyb21SZXNvbHZlZChSZXNvbHZlZFJlZmxlY3RpdmVQcm92aWRlcnMpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHByb3ZpZGVycwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgY3JlYXRlQ2hpbGRGcm9tUmVzb2x2ZWQocHJvdmlkZXJzKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaW5qID0gbmV3IFJlZmxlY3RpdmVJbmplY3Rvcl8ocHJvdmlkZXJzKTsKICAgICAgICAgICAgKCgvKiogQHR5cGUgez99ICovIChpbmopKSkucGFyZW50ID0gdGhpczsKICAgICAgICAgICAgcmV0dXJuIGluajsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBwcm92aWRlcgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVzb2x2ZUFuZEluc3RhbnRpYXRlKHByb3ZpZGVyKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmluc3RhbnRpYXRlUmVzb2x2ZWQoUmVmbGVjdGl2ZUluamVjdG9yLnJlc29sdmUoW3Byb3ZpZGVyXSlbMF0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHByb3ZpZGVyCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBpbnN0YW50aWF0ZVJlc29sdmVkKHByb3ZpZGVyKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9pbnN0YW50aWF0ZVByb3ZpZGVyKHByb3ZpZGVyKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBpbmRleAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0UHJvdmlkZXJBdEluZGV4KGluZGV4KSB7CiAgICAgICAgICAgIGlmIChpbmRleCA8IDAgfHwgaW5kZXggPj0gdGhpcy5fcHJvdmlkZXJzLmxlbmd0aCkgewogICAgICAgICAgICAgICAgdGhyb3cgb3V0T2ZCb3VuZHNFcnJvcihpbmRleCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3Byb3ZpZGVyc1tpbmRleF07CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgKiBAcGFyYW0gez99IHByb3ZpZGVyCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfbmV3KHByb3ZpZGVyKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9jb25zdHJ1Y3Rpb25Db3VudGVyKysgPiB0aGlzLl9nZXRNYXhOdW1iZXJPZk9iamVjdHMoKSkgewogICAgICAgICAgICAgICAgdGhyb3cgY3ljbGljRGVwZW5kZW5jeUVycm9yKHRoaXMsIHByb3ZpZGVyLmtleSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2luc3RhbnRpYXRlUHJvdmlkZXIocHJvdmlkZXIpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2dldE1heE51bWJlck9mT2JqZWN0cygpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMub2Jqcy5sZW5ndGg7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBwcm92aWRlcgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2luc3RhbnRpYXRlUHJvdmlkZXIocHJvdmlkZXIpIHsKICAgICAgICAgICAgaWYgKHByb3ZpZGVyLm11bHRpUHJvdmlkZXIpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHJlcyA9IFtdOwogICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBwcm92aWRlci5yZXNvbHZlZEZhY3Rvcmllcy5sZW5ndGg7ICsraSkgewogICAgICAgICAgICAgICAgICAgIHJlc1tpXSA9IHRoaXMuX2luc3RhbnRpYXRlKHByb3ZpZGVyLCBwcm92aWRlci5yZXNvbHZlZEZhY3Rvcmllc1tpXSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gcmVzOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2luc3RhbnRpYXRlKHByb3ZpZGVyLCBwcm92aWRlci5yZXNvbHZlZEZhY3Rvcmllc1swXSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHByb3ZpZGVyCiAgICAgICAgICogQHBhcmFtIHs/fSBSZXNvbHZlZFJlZmxlY3RpdmVGYWN0b3J5CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfaW5zdGFudGlhdGUocHJvdmlkZXIsIFJlc29sdmVkUmVmbGVjdGl2ZUZhY3RvcnkpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBmYWN0b3J5ID0gUmVzb2x2ZWRSZWZsZWN0aXZlRmFjdG9yeS5mYWN0b3J5OwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBkZXBzOwogICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgZGVwcyA9CiAgICAgICAgICAgICAgICAgICAgUmVzb2x2ZWRSZWZsZWN0aXZlRmFjdG9yeS5kZXBlbmRlbmNpZXMubWFwKCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGRlcAogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgZGVwID0+IHRoaXMuX2dldEJ5UmVmbGVjdGl2ZURlcGVuZGVuY3koZGVwKSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNhdGNoIChlKSB7CiAgICAgICAgICAgICAgICBpZiAoZS5hZGRLZXkpIHsKICAgICAgICAgICAgICAgICAgICBlLmFkZEtleSh0aGlzLCBwcm92aWRlci5rZXkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdGhyb3cgZTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBvYmo7CiAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICBvYmogPSBmYWN0b3J5KC4uLmRlcHMpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNhdGNoIChlKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBpbnN0YW50aWF0aW9uRXJyb3IodGhpcywgZSwgZS5zdGFjaywgcHJvdmlkZXIua2V5KTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gb2JqOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gZGVwCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZ2V0QnlSZWZsZWN0aXZlRGVwZW5kZW5jeShkZXApIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2dldEJ5S2V5KGRlcC5rZXksIGRlcC52aXNpYmlsaXR5LCBkZXAub3B0aW9uYWwgPyBudWxsIDogVEhST1dfSUZfTk9UX0ZPVU5EKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGtleQogICAgICAgICAqIEBwYXJhbSB7P30gdmlzaWJpbGl0eQogICAgICAgICAqIEBwYXJhbSB7P30gbm90Rm91bmRWYWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2dldEJ5S2V5KGtleSwgdmlzaWJpbGl0eSwgbm90Rm91bmRWYWx1ZSkgewogICAgICAgICAgICBpZiAoa2V5ID09PSBSZWZsZWN0aXZlSW5qZWN0b3JfLklOSkVDVE9SX0tFWSkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHZpc2liaWxpdHkgaW5zdGFuY2VvZiBTZWxmKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fZ2V0QnlLZXlTZWxmKGtleSwgbm90Rm91bmRWYWx1ZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fZ2V0QnlLZXlEZWZhdWx0KGtleSwgbm90Rm91bmRWYWx1ZSwgdmlzaWJpbGl0eSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGtleUlkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZ2V0T2JqQnlLZXlJZChrZXlJZCkgewogICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHRoaXMua2V5SWRzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5rZXlJZHNbaV0gPT09IGtleUlkKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMub2Jqc1tpXSA9PT0gVU5ERUZJTkVEKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMub2Jqc1tpXSA9IHRoaXMuX25ldyh0aGlzLl9wcm92aWRlcnNbaV0pOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5vYmpzW2ldOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBVTkRFRklORUQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgKiBAcGFyYW0gez99IGtleQogICAgICAgICAqIEBwYXJhbSB7P30gbm90Rm91bmRWYWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3Rocm93T3JOdWxsKGtleSwgbm90Rm91bmRWYWx1ZSkgewogICAgICAgICAgICBpZiAobm90Rm91bmRWYWx1ZSAhPT0gVEhST1dfSUZfTk9UX0ZPVU5EKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gbm90Rm91bmRWYWx1ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRocm93IG5vUHJvdmlkZXJFcnJvcih0aGlzLCBrZXkpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgKiBAcGFyYW0gez99IGtleQogICAgICAgICAqIEBwYXJhbSB7P30gbm90Rm91bmRWYWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2dldEJ5S2V5U2VsZihrZXksIG5vdEZvdW5kVmFsdWUpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBvYmogPSB0aGlzLl9nZXRPYmpCeUtleUlkKGtleS5pZCk7CiAgICAgICAgICAgIHJldHVybiAob2JqICE9PSBVTkRFRklORUQpID8gb2JqIDogdGhpcy5fdGhyb3dPck51bGwoa2V5LCBub3RGb3VuZFZhbHVlKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7P30ga2V5CiAgICAgICAgICogQHBhcmFtIHs/fSBub3RGb3VuZFZhbHVlCiAgICAgICAgICogQHBhcmFtIHs/fSB2aXNpYmlsaXR5CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZ2V0QnlLZXlEZWZhdWx0KGtleSwgbm90Rm91bmRWYWx1ZSwgdmlzaWJpbGl0eSkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBpbmo7CiAgICAgICAgICAgIGlmICh2aXNpYmlsaXR5IGluc3RhbmNlb2YgU2tpcFNlbGYpIHsKICAgICAgICAgICAgICAgIGluaiA9IHRoaXMucGFyZW50OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgaW5qID0gdGhpczsKICAgICAgICAgICAgfQogICAgICAgICAgICB3aGlsZSAoaW5qIGluc3RhbmNlb2YgUmVmbGVjdGl2ZUluamVjdG9yXykgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgaW5qXyA9ICgvKiogQHR5cGUgez99ICovIChpbmopKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IG9iaiA9IGlual8uX2dldE9iakJ5S2V5SWQoa2V5LmlkKTsKICAgICAgICAgICAgICAgIGlmIChvYmogIT09IFVOREVGSU5FRCkKICAgICAgICAgICAgICAgICAgICByZXR1cm4gb2JqOwogICAgICAgICAgICAgICAgaW5qID0gaW5qXy5wYXJlbnQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGluaiAhPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIGluai5nZXQoa2V5LnRva2VuLCBub3RGb3VuZFZhbHVlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl90aHJvd09yTnVsbChrZXksIG5vdEZvdW5kVmFsdWUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGRpc3BsYXlOYW1lKCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHByb3ZpZGVycyA9IF9tYXBQcm92aWRlcnModGhpcywgKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGIKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChiKSA9PiAnICInICsgYi5rZXkuZGlzcGxheU5hbWUgKyAnIiAnKSkKICAgICAgICAgICAgICAgIC5qb2luKCcsICcpOwogICAgICAgICAgICByZXR1cm4gYFJlZmxlY3RpdmVJbmplY3Rvcihwcm92aWRlcnM6IFske3Byb3ZpZGVyc31dKWA7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdG9TdHJpbmcoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmRpc3BsYXlOYW1lOwogICAgICAgIH0KICAgIH0KICAgIFJlZmxlY3RpdmVJbmplY3Rvcl8uSU5KRUNUT1JfS0VZID0gUmVmbGVjdGl2ZUtleS5nZXQoSW5qZWN0b3IpOwogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IGluamVjdG9yCiAgICAgKiBAcGFyYW0gez99IGZuCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBfbWFwUHJvdmlkZXJzKGluamVjdG9yLCBmbikgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCByZXMgPSBbXTsKICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGluamVjdG9yLl9wcm92aWRlcnMubGVuZ3RoOyArK2kpIHsKICAgICAgICAgICAgcmVzW2ldID0gZm4oaW5qZWN0b3IuZ2V0UHJvdmlkZXJBdEluZGV4KGkpKTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIHJlczsKICAgIH0KCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcgYWRkZWQgYnkgdHNpY2tsZQogICAg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GF0aDogJy9yb290JywgY29tcG9uZW50OiBSb290Q29tcH0sCiAgICAgKiAgIHtwYXRoOiAnL3RlYW1zJywgY29tcG9uZW50OiBUZWFtc0NvbXB9CiAgICAgKiBdOwogICAgICoKICAgICAqIFxATmdNb2R1bGUoewogICAgICogICBwcm92aWRlcnM6IFtwcm92aWRlUm91dGVzKHJvdXRlcyldCiAgICAgKiB9KQogICAgICogY2xhc3MgTW9kdWxlV2l0aFJvdXRlcyB7fQogICAgICogYGBgCiAgICAgKgogICAgICogXEBwdWJsaWNBcGkKICAgICAqIEBkZXByZWNhdGVkIFNpbmNlIDkuMC4wLiBXaXRoIEl2eSwgdGhpcyBwcm9wZXJ0eSBpcyBubyBsb25nZXIgbmVjZXNzYXJ5LgogICAgICogQHR5cGUgez99CiAgICAgKi8KICAgIGNvbnN0IEFOQUxZWkVfRk9SX0VOVFJZX0NPTVBPTkVOVFMgPSBuZXcgSW5qZWN0aW9uVG9rZW4oJ0FuYWx5emVGb3JFbnRyeUNvbXBvbmVudHMnKTsKICAgIC8vIFdBUk5JTkc6IGludGVyZmFjZSBoYXMgYm90aCBhIHR5cGUgYW5kIGEgdmFsdWUsIHNraXBwaW5nIGVtaXQKICAgIC8qKgogICAgICogQmFzZSBjbGFzcyBmb3IgcXVlcnkgbWV0YWRhdGEuCiAgICAgKgogICAgICogQHNlZSBgQ29udGVudENoaWxkcmVuYC4KICAgICAqIEBzZWUgYENvbnRlbnRDaGlsZGAuCiAgICAgKiBAc2VlIGBWaWV3Q2hpbGRyZW5gLgogICAgICogQHNlZSBgVmlld0NoaWxkYC4KICAgICAqCiAgICAgKiBcQHB1YmxpY0FwaQogICAgICogQGFic3RyYWN0CiAgICAgKi8KICAgIGNsYXNzIFF1ZXJ5IHsKICAgIH0KICAgIGNvbnN0IMm1MCRhID0gLyoqCiAgICAgKiBAcGFyYW0gez89fSBzZWxlY3RvcgogICAgICogQHBhcmFtIHs/PX0gZGF0YQogICAgICogQHJldHVybiB7P30KICAgICAqL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HMgb2YgdGhlIHJlc29sdmVkIFVSTC4gQnJvd3NlcidzIGBmZXRjaCgpYCBtZXRob2QgaXMgYSBnb29kIGRlZmF1bHQgaW1wbGVtZW50YXRpb24uCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiByZXNvbHZlQ29tcG9uZW50UmVzb3VyY2VzKHJlc291cmNlUmVzb2x2ZXIpIHsKICAgICAgICAvLyBTdG9yZSBhbGwgcHJvbWlzZXMgd2hpY2ggYXJlIGZldGNoaW5nIHRoZSByZXNvdXJjZXMuCiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGNvbXBvbmVudFJlc29sdmVkID0gW107CiAgICAgICAgLy8gQ2FjaGUgc28gdGhhdCB3ZSBkb24ndCBmZXRjaCB0aGUgc2FtZSByZXNvdXJjZSBtb3JlIHRoYW4gb25jZS4KICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgdXJsTWFwID0gbmV3IE1hcCgpOwogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdXJsCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBjYWNoZWRSZXNvdXJjZVJlc29sdmUodXJsKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHByb21pc2UgPSB1cmxNYXAuZ2V0KHVybCk7CiAgICAgICAgICAgIGlmICghcHJvbWlzZSkgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgcmVzcCA9IHJlc291cmNlUmVzb2x2ZXIodXJsKTsKICAgICAgICAgICAgICAgIHVybE1hcC5zZXQodXJsLCBwcm9taXNlID0gcmVzcC50aGVuKHVud3JhcFJlc3BvbnNlKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHByb21pc2U7CiAgICAgICAgfQogICAgICAgIGNvbXBvbmVudFJlc291cmNlUmVzb2x1dGlvblF1ZXVlLmZvckVhY2goKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gY29tcG9uZW50CiAgICAgICAgICogQHBhcmFtIHs/fSB0eXBlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAoY29tcG9uZW50LCB0eXBlKSA9PiB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcHJvbWlzZXMgPSBbXTsKICAgICAgICAgICAgaWYgKGNvbXBvbmVudC50ZW1wbGF0ZVVybCkgewogICAgICAgICAgICAgICAgcHJvbWlzZXMucHVzaChjYWNoZWRSZXNvdXJjZVJlc29sdmUoY29tcG9uZW50LnRlbXBsYXRlVXJsKS50aGVuKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdGVtcGxhdGUKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICh0ZW1wbGF0ZSkgPT4gewogICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudC50ZW1wbGF0ZSA9IHRlbXBsYXRlOwogICAgICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHN0eWxlVXJscyA9IGNvbXBvbmVudC5zdHlsZVVybHM7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc3R5bGVzID0gY29tcG9uZW50LnN0eWxlcyB8fCAoY29tcG9uZW50LnN0eWxlcyA9IFtdKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBzdHlsZU9mZnNldCA9IGNvbXBvbmVudC5zdHlsZXMubGVuZ3RoOwogICAgICAgICAgICBzdHlsZVVybHMgJiYgc3R5bGVVcmxzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHN0eWxlVXJsCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gaW5kZXgKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChzdHlsZVVybCwgaW5kZXgpID0+IHsKICAgICAgICAgICAgICAgIHN0eWxlcy5wdXNoKCcnKTsgLy8gcHJlLWFsbG9jYXRlIGFycmF5LgogICAgICAgICAgICAgICAgcHJvbWlzZXMucHVzaChjYWNoZWRSZXNvdXJjZVJlc29sdmUoc3R5bGVVcmwpLnRoZW4oKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBzdHlsZQogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKHN0eWxlKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgc3R5bGVzW3N0eWxlT2Zmc2V0ICsgaW5kZXhdID0gc3R5bGU7CiAgICAgICAgICAgICAgICAgICAgc3R5bGVVcmxzLnNwbGljZShzdHlsZVVybHMuaW5kZXhPZihzdHlsZVVybCksIDEpOwogICAgICAgICAgICAgICAgICAgIGlmIChzdHlsZVVybHMubGVuZ3RoID09IDApIHsKICAgICAgICAgICAgICAgICAgICAgICAgY29tcG9uZW50LnN0eWxlVXJscyA9IHVuZGVmaW5lZDsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KSkpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZnVsbHlSZXNvbHZlZCA9IFByb21pc2UuYWxsKHByb21pc2VzKS50aGVuKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IGNvbXBvbmVudERlZlJlc29sdmVkKHR5cGUpKSk7CiAgICAgICAgICAgIGNvbXBvbmVudFJlc29sdmV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aW9uIGNvbXBvbmVudE5lZWRzUmVzb2x1dGlvbihjb21wb25lbnQpIHsKICAgICAgICByZXR1cm4gISEoKGNvbXBvbmVudC50ZW1wbGF0ZVVybCAmJiAhY29tcG9uZW50Lmhhc093blByb3BlcnR5KCd0ZW1wbGF0ZScpKSB8fAogICAgICAgICAgICBjb21wb25lbnQuc3R5bGVVcmxzICYmIGNvbXBvbmVudC5zdHlsZVVybHMubGVuZ3RoKTsKICAgIH0KICAgIC8qKgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gY2xlYXJSZXNvbHV0aW9uT2ZDb21wb25lbnRSZXNvdXJjZXNRdWV1ZSgpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3Qgb2xkID0gY29tcG9uZW50UmVzb3VyY2VSZXNvbHV0aW9uUXVldWU7CiAgICAgICAgY29tcG9uZW50UmVzb3VyY2VSZXNvbHV0aW9uUXVldWUgPSBuZXcgTWFwKCk7CiAgICAgICAgcmV0dXJuIG9sZDsKICAgIH0KICAgIC8qKgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gaXNDb21wb25lbnRSZXNvdXJjZVJlc29sdXRpb25RdWV1ZUVtcHR5KCkgewogICAgICAgIHJldHVybiBjb21wb25lbnRSZXNvdXJjZVJlc29sdXRpb25RdWV1ZS5zaXplID09PSAwOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHJlc3BvbnNlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiB1bndyYXBSZXNwb25zZShyZXNwb25zZSkgewogICAgICAgIHJldHVybiB0eXBlb2YgcmVzcG9uc2UgPT0gJ3N0cmluZycgPyByZXNwb25zZSA6IHJlc3BvbnNlLnRleHQoKTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB0eXBlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBj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gVE5vZGUuY2xhc3Nlc1dpdGhvdXRIb3N0YAogICAgICogICAtIGB0cnVlYCBXcml0ZSB0byBgVE5vZGUuc3R5bGVzYCAvIGBUTm9kZS5jbGFzc2VzYAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gY29tcHV0ZVN0YXRpY1N0eWxpbmcodE5vZGUsIGF0dHJzLCB3cml0ZVRvSG9zdCkgewogICAgICAgIG5nRGV2TW9kZSAmJgogICAgICAgICAgICBhc3NlcnRGaXJzdENyZWF0ZVBhc3MoZ2V0VFZpZXcoKSwgJ0V4cGVjdGluZyB0byBiZSBjYWxsZWQgaW4gZmlyc3QgdGVtcGxhdGUgcGFzcyBvbmx5Jyk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBzdHlsZXMgPSB3cml0ZVRvSG9zdCA/IHROb2RlLnN0eWxlcyA6IG51bGw7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBjbGFzc2VzID0gd3JpdGVUb0hvc3QgPyB0Tm9kZS5jbGFzc2VzIDogbnVsbDsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IG1vZGUgPSAwOwogICAgICAgIGlmIChhdHRycyAhPT0gbnVsbCkgewogICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGF0dHJzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCB2YWx1ZSA9IGF0dHJzW2ldOwogICAgICAgICAgICAgICAgaWYgKHR5cGVvZiB2YWx1ZSA9PT0gJ251bWJlcicpIHsKICAgICAgICAgICAgICAgICAgICBtb2RlID0gdmFsdWU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmIChtb2RlID09IDEgLyogQ2xhc3NlcyAqLykgewogICAgICAgICAgICAgICAgICAgIGNsYXNzZXMgPSBjb25jYXRTdHJpbmdzV2l0aFNwYWNlKGNsYXNzZXMsICgvKiogQHR5cGUgez99ICovICh2YWx1ZSkpKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKG1vZGUgPT0gMiAvKiBTdHlsZXMgKi8pIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3R5bGUgPSAoLyoqIEB0eXBlIHs/fSAqLyAodmFsdWUpKTsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3R5bGVWYWx1ZSA9ICgvKiogQHR5cGUgez99ICovIChhdHRyc1srK2ldKSk7CiAgICAgICAgICAgICAgICAgICAgc3R5bGVzID0gY29uY2F0U3RyaW5nc1dpdGhTcGFjZShzdHlsZXMsIHN0eWxlICsgJzogJyArIHN0eWxlVmFsdWUgKyAnOycpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHdyaXRlVG9Ib3N0ID8gdE5vZGUuc3R5bGVzID0gc3R5bGVzIDogdE5vZGUuc3R5bGVzV2l0aG91dEhvc3QgPSBzdHlsZXM7CiAgICAgICAgd3JpdGVUb0hvc3QgPyB0Tm9kZS5jbGFzc2VzID0gY2xhc3NlcyA6IHROb2RlLmNsYXNzZXNXaXRob3V0SG9zdCA9IGNsYXNzZXM7CiAgICB9CgogICAgLyoqCiAgICAgKiBAbGljZW5zZQogICAgICogQ29weXJpZ2h0IEdvb2dsZSBJbmMuIEFsbCBSaWdodHMgUmVzZXJ2ZWQuCiAgICAgKgogICAgICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgYW4gTUlULXN0eWxlIGxpY2Vuc2UgdGhhdCBjYW4gYmUKICAgICAqIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUgYXQgaHR0cHM6Ly9hbmd1bGFyLmlvL2xpY2Vuc2UKICAgICAqLwogICAgbGV0IF9zeW1ib2xJdGVyYXRvciA9IG51bGw7CiAgICBmdW5jdGlvbiBnZXRTeW1ib2xJdGVyYXRvciQxKCkgewogICAgICAgIGlmICghX3N5bWJvbEl0ZXJhdG9yKSB7CiAgICAgICAgICAgIGNvbnN0IFN5bWJvbCA9IF9nbG9iYWxbJ1N5bWJvbCddOwogICAgICAgICAgICBpZiAoU3ltYm9sICYmIFN5bWJvbC5pdGVyYXRvcikgewogICAgICAgICAgICAgICAgX3N5bWJvbEl0ZXJhdG9yID0gU3ltYm9sLml0ZXJhdG9yOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgLy8gZXM2LXNoaW0gc3BlY2lmaWMgbG9naWMKICAgICAgICAgICAgICAgIGNvbnN0IGtleXMgPSBPYmplY3QuZ2V0T3duUHJvcGVydHlOYW1lcyhNYXAucHJvdG90eXBlKTsKICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwga2V5cy5sZW5ndGg7ICsraSkgewogICAgICAgICAgICAgICAgICAgIGNvbnN0IGtleSA9IGtleXNbaV07CiAgICAgICAgICAgICAgICAgICAgaWYgKGtleSAhPT0gJ2VudHJpZXMnICYmIGtleSAhPT0gJ3NpemUnICYmCiAgICAgICAgICAgICAgICAgICAgICAgIE1hcC5wcm90b3R5cGVba2V5XSA9PT0gTWFwLnByb3RvdHlwZVsnZW50cmllcyddKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIF9zeW1ib2xJdGVyYXRvciA9IGtleTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIF9zeW1ib2xJdGVyYXRvcjsKICAgIH0KCiAgICAvKioKICAgICAqIEBsaWNlbnNlCiAgICAgKiBDb3B5cmlnaHQgR29vZ2xlIEluYy4gQWxsIFJpZ2h0cyBSZXNlc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Y2FsbHkgZHVyaW5nIHRoZSBjaGFuZ2UgZGV0ZWN0aW9uLCBhbmQgdGhlIHVud3JhcHBlZCB2YWx1ZQogICAgICogaXMgc3RvcmVkLgogICAgICoKICAgICAqIEV4YW1wbGU6CiAgICAgKgogICAgICogYGBgCiAgICAgKiBpZiAodGhpcy5fbGF0ZXN0VmFsdWUgPT09IHRoaXMuX2xhdGVzdFJldHVybmVkVmFsdWUpIHsKICAgICAqICAgIHJldHVybiB0aGlzLl9sYXRlc3RSZXR1cm5lZFZhbHVlOwogICAgICogIH0gZWxzZSB7CiAgICAgKiAgICB0aGlzLl9sYXRlc3RSZXR1cm5lZFZhbHVlID0gdGhpcy5fbGF0ZXN0VmFsdWU7CiAgICAgKiAgICByZXR1cm4gV3JhcHBlZFZhbHVlLndyYXAodGhpcy5fbGF0ZXN0VmFsdWUpOyAvLyB0aGlzIHdpbGwgZm9yY2UgdXBkYXRlCiAgICAgKiAgfQogICAgICogYGBgCiAgICAgKgogICAgICogXEBwdWJsaWNBcGkKICAgICAqLwogICAgY2xhc3MgV3JhcHBlZFZhbHVlIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IodmFsdWUpIHsKICAgICAgICAgICAgdGhpcy53cmFwcGVkID0gdmFsdWU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYSB3cmFwcGVkIHZhbHVlLgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHN0YXRpYyB3cmFwKHZhbHVlKSB7CiAgICAgICAgICAgIHJldHVybiBuZXcgV3JhcHBlZFZhbHVlKHZhbHVlKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0dXJucyB0aGUgdW5kZXJseWluZyB2YWx1ZSBvZiBhIHdyYXBwZWQgdmFsdWUuCiAgICAgICAgICogUmV0dXJucyB0aGUgZ2l2ZW4gYHZhbHVlYCB3aGVuIGl0IGlzIG5vdCB3cmFwcGVkLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc3RhdGljIHVud3JhcCh2YWx1ZSkgewogICAgICAgICAgICByZXR1cm4gV3JhcHBlZFZhbHVlLmlzV3JhcHBlZCh2YWx1ZSkgPyB2YWx1ZS53cmFwcGVkIDogdmFsdWU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgdHJ1ZSBpZiBgdmFsdWVgIGlzIGEgd3JhcHBlZCB2YWx1ZS4KICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzdGF0aWMgaXNXcmFwcGVkKHZhbHVlKSB7CiAgICAgICAgICAgIHJldHVybiB2YWx1ZSBpbnN0YW5jZW9mIFdyYXBwZWRWYWx1ZTsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gb2JqCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBpc0xpc3RMaWtlSXRlcmFibGUkMShvYmopIHsKICAgICAgICBpZiAoIWlzSnNPYmplY3QkMShvYmopKQogICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgcmV0dXJuIEFycmF5LmlzQXJyYXkob2JqKSB8fAogICAgICAgICAgICAoIShvYmogaW5zdGFuY2VvZiBNYXApICYmIC8vIEpTIE1hcCBhcmUgaXRlcmFibGVzIGJ1dCByZXR1cm4gZW50cmllcyBhcyBbaywgdl0KICAgICAgICAgICAgICAgIGdldFN5bWJvbEl0ZXJhdG9yJDEoKSBpbiBvYmopOyAvLyBKUyBJdGVyYWJsZSBoYXZlIGEgU3ltYm9sLml0ZXJhdG9yIHByb3AKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBhCiAgICAgKiBAcGFyYW0gez99IGIKICAgICAqIEBwYXJhbSB7P30gY29tcGFyYXRvcgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gYXJlSXRlcmFibGVzRXF1YWwkMShhLCBiLCBjb21wYXJhdG9yKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGl0ZXJhdG9yMSA9IGFbZ2V0U3ltYm9sSXRlcmF0b3IkMSgpXSgpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBpdGVyYXRvcjIgPSBiW2dldFN5bWJvbEl0ZXJhdG9yJDEoKV0oKTsKICAgICAgICB3aGlsZSAodHJ1ZSkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGl0ZW0xID0gaXRlcmF0b3IxLm5leHQoKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBpdGVtMiA9IGl0ZXJhdG9yMi5uZXh0KCk7CiAgICAgICAgICAgIGlmIChpdGVtMS5kb25lICYmIGl0ZW0yLmRvbmUpCiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgaWYgKGl0ZW0xLmRvbmUgfHwgaXRlbTIuZG9uZSkKICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgaWYgKCFjb21wYXJhdG9yKGl0ZW0xLnZhbHVlLCBpdGVtMi52YWx1ZSkpCiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IG9iagogICAgICogQHBhcmFtIHs/fSBmbgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gaXRlcmF0ZUxpc3RMaWtlJDEob2JqLCBmbikgewogICAg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0aW9uIGJpbmRpbmcgd2l0aCAyIGV4cHJlc3Npb25zLgogICAgICogQHBhcmFtIHs/fSBsVmlldwogICAgICogQHBhcmFtIHs/fSBwcmVmaXgKICAgICAqIEBwYXJhbSB7P30gdjAKICAgICAqIEBwYXJhbSB7P30gaTAKICAgICAqIEBwYXJhbSB7P30gdjEKICAgICAqIEBwYXJhbSB7P30gc3VmZml4CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBpbnRlcnBvbGF0aW9uMihsVmlldywgcHJlZml4LCB2MCwgaTAsIHYxLCBzdWZmaXgpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgYmluZGluZ0luZGV4ID0gZ2V0QmluZGluZ0luZGV4KCk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGRpZmZlcmVudCA9IGJpbmRpbmdVcGRhdGVkMihsVmlldywgYmluZGluZ0luZGV4LCB2MCwgdjEpOwogICAgICAgIGluY3JlbWVudEJpbmRpbmdJbmRleCgyKTsKICAgICAgICByZXR1cm4gZGlmZmVyZW50ID8gcHJlZml4ICsgcmVuZGVyU3RyaW5naWZ5KHYwKSArIGkwICsgcmVuZGVyU3RyaW5naWZ5KHYxKSArIHN1ZmZpeCA6IE5PX0NIQU5HRTsKICAgIH0KICAgIC8qKgogICAgICogQ3JlYXRlcyBhbiBpbnRlcnBvbGF0aW9uIGJpbmRpbmcgd2l0aCAzIGV4cHJlc3Npb25zLgogICAgICogQHBhcmFtIHs/fSBsVmlldwogICAgICogQHBhcmFtIHs/fSBwcmVmaXgKICAgICAqIEBwYXJhbSB7P30gdjAKICAgICAqIEBwYXJhbSB7P30gaTAKICAgICAqIEBwYXJhbSB7P30gdjEKICAgICAqIEBwYXJhbSB7P30gaTEKICAgICAqIEBwYXJhbSB7P30gdjIKICAgICAqIEBwYXJhbSB7P30gc3VmZml4CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBpbnRlcnBvbGF0aW9uMyhsVmlldywgcHJlZml4LCB2MCwgaTAsIHYxLCBpMSwgdjIsIHN1ZmZpeCkgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBiaW5kaW5nSW5kZXggPSBnZXRCaW5kaW5nSW5kZXgoKTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgZGlmZmVyZW50ID0gYmluZGluZ1VwZGF0ZWQzKGxWaWV3LCBiaW5kaW5nSW5kZXgsIHYwLCB2MSwgdjIpOwogICAgICAgIGluY3JlbWVudEJpbmRpbmdJbmRleCgzKTsKICAgICAgICByZXR1cm4gZGlmZmVyZW50ID8KICAgICAgICAgICAgcHJlZml4ICsgcmVuZGVyU3RyaW5naWZ5KHYwKSArIGkwICsgcmVuZGVyU3RyaW5naWZ5KHYxKSArIGkxICsgcmVuZGVyU3RyaW5naWZ5KHYyKSArIHN1ZmZpeCA6CiAgICAgICAgICAgIE5PX0NIQU5HRTsKICAgIH0KICAgIC8qKgogICAgICogQ3JlYXRlIGFuIGludGVycG9sYXRpb24gYmluZGluZyB3aXRoIDQgZXhwcmVzc2lvbnMuCiAgICAgKiBAcGFyYW0gez99IGxWaWV3CiAgICAgKiBAcGFyYW0gez99IHByZWZpeAogICAgICogQHBhcmFtIHs/fSB2MAogICAgICogQHBhcmFtIHs/fSBpMAogICAgICogQHBhcmFtIHs/fSB2MQogICAgICogQHBhcmFtIHs/fSBpMQogICAgICogQHBhcmFtIHs/fSB2MgogICAgICogQHBhcmFtIHs/fSBpMgogICAgICogQHBhcmFtIHs/fSB2MwogICAgICogQHBhcmFtIHs/fSBzdWZmaXgKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGludGVycG9sYXRpb240KGxWaWV3LCBwcmVmaXgsIHYwLCBpMCwgdjEsIGkxLCB2MiwgaTIsIHYzLCBzdWZmaXgpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgYmluZGluZ0luZGV4ID0gZ2V0QmluZGluZ0luZGV4KCk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGRpZmZlcmVudCA9IGJpbmRpbmdVcGRhdGVkNChsVmlldywgYmluZGluZ0luZGV4LCB2MCwgdjEsIHYyLCB2Myk7CiAgICAgICAgaW5jcmVtZW50QmluZGluZ0luZGV4KDQpOwogICAgICAgIHJldHVybiBkaWZmZXJlbnQgPyBwcmVmaXggKyByZW5kZXJTdHJpbmdpZnkodjApICsgaTAgKyByZW5kZXJTdHJpbmdpZnkodjEpICsgaTEgKwogICAgICAgICAgICByZW5kZXJTdHJpbmdpZnkodjIpICsgaTIgKyByZW5kZXJTdHJpbmdpZnkodjMpICsgc3VmZml4IDoKICAgICAgICAgICAgTk9fQ0hBTkdFOwogICAgfQogICAgLyoqCiAgICAgKiBDcmVhdGVzIGFuIGludGVycG9sYXRpb24gYmluZGluZyB3aXRoIDUgZXhwcmVzc2lvbnMuCiAgICAgKiBAcGFyYW0gez99IGxWaWV3CiAgICAgKiBAcGFyYW0gez99IHByZWZpeAogICAgICogQHBhcmFtIHs/fSB2MAogICAgICogQHBhcmFtIHs/fSBpMAogICAgICogQHBhcmFtIHs/fSB2MQogICAgICogQHBhcmFtIHs/fSBpMQogICAgICogQHBhcmFtIHs/fSB2MgogICAgICogQHBhcmFtIHs/fSBpMgogICAgICogQHBhcmFtIHs/fSB2MwogICAgICogQHBhcmFtIHs/fSBpMwogICAgICogQHBhcmFtIHs/fSB2NAogICAgICogQHBhcmFtIHs/fSBzdWZmaXgKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGludGVycG9sYXRpb241KGxWaWV3LCBwcmVmaXgsIHYwLCBpMCwgdjEsIGkxLCB2MiwgaTIsIHYzLCBpMywgdjQsIHN1ZmZpeCkgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBiaW5kaW5nSW5kZXggPSBnZXRCaW5kaW5nSW5kZXgoKTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IGRpZmZlcmVudCA9IGJpbmRpbmdVcGRhdGVkNChsVmlldywgYmluZGluZ0luZGV4LCB2MCwgdjEsIHYyLCB2Myk7CiAgICAgICAgZGlmZmVyZW50ID0gYmluZGluZ1VwZGF0ZWQobFZpZXcsIGJpbmRpbmdJbmRleCArIDQsIHY0KSB8fCBkaWZmZXJlbnQ7CiAgICAgICAgaW5jcmVtZW50QmluZGluZ0luZGV4KDUpOwogICAgICAgIHJldHVybiBkaWZmZXJlbnQgPyBwcmVmaXggKyByZW5kZXJTdHJpbmdpZnkodjApICsgaTAgKyByZW5kZXJTdHJpbmdpZnkodjEpICsgaTEgKwogICAgICAgICAgICByZW5kZXJTdHJpbmdpZnkodjIpICsgaTIgKyByZW5kZXJTdHJpbmdpZnkodjMpICsgaTMgKyByZW5kZXJTdHJpbmdpZnkodjQpICsgc3VmZml4IDoKICAgICAgICAgICAgTk9fQ0hBTkdFOwogICAgfQogICAgLyoqCiAgICAgKiBDcmVhdGVzIGFuIGludGVycG9sYXRpb24gYmluZGluZyB3aXRoIDYgZXhwcmVzc2lvbnMuCiAgICAgKiBAcGFyYW0gez99IGxWaWV3CiAgICAgKiBAcGFyYW0gez99IHByZWZpeAogICAgICogQHBhcmFtIHs/fSB2MAogICAgICogQHBhcmFtIHs/fSBpMAogICAgICogQHBhcmFtIHs/fSB2MQogICAgICogQHBhcmFtIHs/fSBpMQogICAgICogQHBhcmFtIHs/fSB2MgogICAgICogQHBhcmFtIHs/fSBpMgogICAgICogQHBhcmFtIHs/fSB2MwogICAgICogQHBhcmFtIHs/fSBpMwogICAgICogQHBhcmFtIHs/fSB2NAogICAgICogQHBhcmFtIHs/fSBpNAogICAgICogQHBhcmFtIHs/fSB2NQogICAgICogQHBhcmFtIHs/fSBzdWZmaXgKICAgICAqIEByZXR1cm4gez99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AgICAgKiBAcGFyYW0gez99IGkxCiAgICAgKiBAcGFyYW0gez99IHYyCiAgICAgKiBAcGFyYW0gez99IGkyCiAgICAgKiBAcGFyYW0gez99IHYzCiAgICAgKiBAcGFyYW0gez99IGkzCiAgICAgKiBAcGFyYW0gez99IHY0CiAgICAgKiBAcGFyYW0gez99IGk0CiAgICAgKiBAcGFyYW0gez99IHY1CiAgICAgKiBAcGFyYW0gez99IGk1CiAgICAgKiBAcGFyYW0gez99IHY2CiAgICAgKiBAcGFyYW0gez99IHN1ZmZpeAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gaW50ZXJwb2xhdGlvbjcobFZpZXcsIHByZWZpeCwgdjAsIGkwLCB2MSwgaTEsIHYyLCBpMiwgdjMsIGkzLCB2NCwgaTQsIHY1LCBpNSwgdjYsIHN1ZmZpeCkgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBiaW5kaW5nSW5kZXggPSBnZXRCaW5kaW5nSW5kZXgoKTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IGRpZmZlcmVudCA9IGJpbmRpbmdVcGRhdGVkNChsVmlldywgYmluZGluZ0luZGV4LCB2MCwgdjEsIHYyLCB2Myk7CiAgICAgICAgZGlmZmVyZW50ID0gYmluZGluZ1VwZGF0ZWQzKGxWaWV3LCBiaW5kaW5nSW5kZXggKyA0LCB2NCwgdjUsIHY2KSB8fCBkaWZmZXJlbnQ7CiAgICAgICAgaW5jcmVtZW50QmluZGluZ0luZGV4KDcpOwogICAgICAgIHJldHVybiBkaWZmZXJlbnQgPyBwcmVmaXggKyByZW5kZXJTdHJpbmdpZnkodjApICsgaTAgKyByZW5kZXJTdHJpbmdpZnkodjEpICsgaTEgKwogICAgICAgICAgICByZW5kZXJTdHJpbmdpZnkodjIpICsgaTIgKyByZW5kZXJTdHJpbmdpZnkodjMpICsgaTMgKyByZW5kZXJTdHJpbmdpZnkodjQpICsgaTQgKwogICAgICAgICAgICByZW5kZXJTdHJpbmdpZnkodjUpICsgaTUgKyByZW5kZXJTdHJpbmdpZnkodjYpICsgc3VmZml4IDoKICAgICAgICAgICAgTk9fQ0hBTkdFOwogICAgfQogICAgLyoqCiAgICAgKiBDcmVhdGVzIGFuIGludGVycG9sYXRpb24gYmluZGluZyB3aXRoIDggZXhwcmVzc2lvbnMuCiAgICAgKiBAcGFyYW0gez99IGxWaWV3CiAgICAgKiBAcGFyYW0gez99IHByZWZpeAogICAgICogQHBhcmFtIHs/fSB2MAogICAgICogQHBhcmFtIHs/fSBpMAogICAgICogQHBhcmFtIHs/fSB2MQogICAgICogQHBhcmFtIHs/fSBpMQogICAgICogQHBhcmFtIHs/fSB2MgogICAgICogQHBhcmFtIHs/fSBpMgogICAgICogQHBhcmFtIHs/fSB2MwogICAgICogQHBhcmFtIHs/fSBpMwogICAgICogQHBhcmFtIHs/fSB2NAogICAgICogQHBhcmFtIHs/fSBpNAogICAgICogQHBhcmFtIHs/fSB2NQogICAgICogQHBhcmFtIHs/fSBpNQogICAgICogQHBhcmFtIHs/fSB2NgogICAgICogQHBhcmFtIHs/fSBpNgogICAgICogQHBhcmFtIHs/fSB2NwogICAgICogQHBhcmFtIHs/fSBzdWZmaXgKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGludGVycG9sYXRpb244KGxWaWV3LCBwcmVmaXgsIHYwLCBpMCwgdjEsIGkxLCB2MiwgaTIsIHYzLCBpMywgdjQsIGk0LCB2NSwgaTUsIHY2LCBpNiwgdjcsIHN1ZmZpeCkgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBiaW5kaW5nSW5kZXggPSBnZXRCaW5kaW5nSW5kZXgoKTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IGRpZmZlcmVudCA9IGJpbmRpbmdVcGRhdGVkNChsVmlldywgYmluZGluZ0luZGV4LCB2MCwgdjEsIHYyLCB2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HkgaGFzIDggaW50ZXJwb2xhdGVkIHZhbHVlcyBpbiBpdDoKICAgICAqCiAgICAgKiBgYGBodG1sCiAgICAgKiA8ZGl2IGF0dHIudGl0bGU9InByZWZpeHt7djB9fS17e3YxfX0te3t2Mn19LXt7djN9fS17e3Y0fX0te3t2NX19LXt7djZ9fS17e3Y3fX1zdWZmaXgiPjwvZGl2PgogICAgICogYGBgCiAgICAgKgogICAgICogSXRzIGNvbXBpbGVkIHJlcHJlc2VudGF0aW9uIGlzOjoKICAgICAqCiAgICAgKiBgYGB0cwogICAgICogybXJtWF0dHJpYnV0ZUludGVycG9sYXRlOCgKICAgICAqICAndGl0bGUnLCAncHJlZml4JywgdjAsICctJywgdjEsICctJywgdjIsICctJywgdjMsICctJywgdjQsICctJywgdjUsICctJywgdjYsICctJywgdjcsICdzdWZmaXgnKTsKICAgICAqIGBgYAogICAgICoKICAgICAqIFxAY29kZUdlbkFwaQogICAgICogQHBhcmFtIHs/fSBhdHRyTmFtZSBUaGUgbmFtZSBvZiB0aGUgYXR0cmlidXRlIHRvIHVwZGF0ZQogICAgICogQHBhcmFtIHs/fSBwcmVmaXggU3RhdGljIHZhbHVlIHVzZWQgZm9yIGNvbmNhdGVuYXRpb24gb25seS4KICAgICAqIEBwYXJhbSB7P30gdjAgVmFsdWUgY2hlY2tlZCBmb3IgY2hhbmdlLgogICAgICogQHBhcmFtIHs/fSBpMCBTdGF0aWMgdmFsdWUgdXNlZCBmb3IgY29uY2F0ZW5hdGlvbiBvbmx5LgogICAgICogQHBhcmFtIHs/fSB2MSBWYWx1ZSBjaGVja2VkIGZvciBjaGFuZ2UuCiAgICAgKiBAcGFyYW0gez99IGkxIFN0YXRpYyB2YWx1ZSB1c2VkIGZvciBjb25jYXRlbmF0aW9uIG9ubHkuCiAgICAgKiBAcGFyYW0gez99IHYyIFZhbHVlIGNoZWNrZWQgZm9yIGNoYW5nZS4KICAgICAqIEBwYXJhbSB7P30gaTIgU3RhdGljIHZhbHVlIHVzZWQ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2luZ092ZXJyaWRlLG1pc3NpbmdSZXR1cm4sdW51c2VkUHJpdmF0ZU1lbWJlcnMsdXNlbGVzc0NvZGV9IGNoZWNrZWQgYnkgdHNjCiAgICAgKi8KICAgIC8qKgogICAgICogQHRlbXBsYXRlIFQKICAgICAqIEBwYXJhbSB7P30gdG9rZW4KICAgICAqIEBwYXJhbSB7Pz19IGZsYWdzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiDJtcm1ZGlyZWN0aXZlSW5qZWN0KHRva2VuLCBmbGFncyA9IEluamVjdEZsYWdzLkRlZmF1bHQpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgbFZpZXcgPSBnZXRMVmlldygpOwogICAgICAgIC8vIEZhbGwgYmFjayB0byBpbmplY3QoKSBpZiB2aWV3IGhhc24ndCBiZWVuIGNyZWF0ZWQuIFRoaXMgc2l0dWF0aW9uIGNhbiBoYXBwZW4gaW4gdGVzdHMKICAgICAgICAvLyBpZiBpbmplY3QgdXRpbGl0aWVzIGFyZSB1c2VkIGJlZm9yZSBib290c3RyYXBwaW5nLgogICAgICAgIGlmIChsVmlldyA9PSBudWxsKQogICAgICAgICAgICByZXR1cm4gybXJtWluamVjdCh0b2tlbiwgZmxhZ3MpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCB0Tm9kZSA9IGdldFByZXZpb3VzT3JQYXJlbnRUTm9kZSgpOwogICAgICAgIHJldHVybiBnZXRPckNyZWF0ZUluamVjdGFibGUoKC8qKiBAdHlwZSB7P30gKi8gKHROb2RlKSksIGxWaWV3LCByZXNvbHZlRm9yd2FyZFJlZih0b2tlbiksIGZsYWdzKTsKICAgIH0KICAgIC8qKgogICAgICogRmFjYWRlIGZvciB0aGUgYXR0cmlidXRlIGluamVjdGlvbiBmcm9tIERJLgogICAgICoKICAgICAqIFxAY29kZUdlbkFwaQogICAgICogQHBhcmFtIHs/fSBhdHRyTmFtZ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Aoc2VlIGBlbGVtZW50X2Rpc2NvdmVyeS50c2ApCiAgICAgICAgaWYgKGdldEVsZW1lbnREZXB0aENvdW50KCkgPT09IDApIHsKICAgICAgICAgICAgYXR0YWNoUGF0Y2hEYXRhKG5hdGl2ZSwgbFZpZXcpOwogICAgICAgIH0KICAgICAgICBpbmNyZWFzZUVsZW1lbnREZXB0aENvdW50KCk7CiAgICAgICAgaWYgKGlzRGlyZWN0aXZlSG9zdCh0Tm9kZSkpIHsKICAgICAgICAgICAgY3JlYXRlRGlyZWN0aXZlc0luc3RhbmNlcyh0VmlldywgbFZpZXcsIHROb2RlKTsKICAgICAgICAgICAgZXhlY3V0ZUNvbnRlbnRRdWVyaWVzKHRWaWV3LCB0Tm9kZSwgbFZpZXcpOwogICAgICAgIH0KICAgICAgICBpZiAobG9jYWxSZWZzSW5kZXggIT09IG51bGwpIHsKICAgICAgICAgICAgc2F2ZVJlc29sdmVkTG9jYWxzSW5EYXRhKGxWaWV3LCB0Tm9kZSk7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBNYXJrIHRoZSBlbmQgb2YgdGhlIGVsZW1lbnQuCiAgICAgKgogICAgICogXEBjb2RlR2VuQXBpCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiDJtcm1ZWxlbWVudEVuZCgpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IHByZXZpb3VzT3JQYXJlbnRUTm9kZSA9IGdldFByZXZpb3VzT3JQYXJlbnRUTm9kZSgpOwogICAgICAgIG5nRGV2TW9kZSAmJiBhc3NlcnREZWZpbmVkKHByZXZpb3VzT3JQYXJlbnRUTm9kZSwgJ05vIHBhcmVudCBub2RlIHRvIGNsb3NlLicpOwogICAgICAgIGlmIChnZXRJc1BhcmVudCgpKSB7CiAgICAgICAgICAgIHNldElzTm90UGFyZW50KCk7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICBuZ0Rldk1vZGUgJiYgYXNzZXJ0SGFzUGFyZW50KGdldFByZXZpb3VzT3JQYXJlbnRUTm9kZSgpKTsKICAgICAgICAgICAgcHJldmlvdXNPclBhcmVudFROb2RlID0gKC8qKiBAdHlwZSB7P30gKi8gKHByZXZpb3VzT3JQYXJlbnRUTm9kZS5wYXJlbnQpKTsKICAgICAgICAgICAgc2V0UHJldmlvdXNPclBhcmVudFROb2RlKHByZXZpb3VzT3JQYXJlbnRUTm9kZSwgZmFsc2UpOwogICAgICAgIH0KICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgdE5vZGUgPSBwcmV2aW91c09yUGFyZW50VE5vZGU7CiAgICAgICAgbmdEZXZNb2RlICYmIGFzc2VydE5vZGVUeXBlKHROb2RlLCAzIC8qIEVsZW1lbnQgKi8pOwogICAgICAgIGRlY3JlYXNlRWxlbWVudERlcHRoQ291bnQoKTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgdFZpZXcgPSBnZXRUVmlldygpOwogICAgICAgIGlmICh0Vmlldy5maXJzdENyZWF0ZVBhc3MpIHsKICAgICAgICAgICAgcmVnaXN0ZXJQb3N0T3JkZXJIb29rcyh0VmlldywgcHJldmlvdXNPclBhcmVudFROb2RlKTsKICAgICAgICAgICAgaWYgKGlzQ29udGVudFF1ZXJ5SG9zdChwcmV2aW91c09yUGFyZW50VE5vZGUpKSB7CiAgICAgICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAodFZpZXcucXVlcmllcykpLmVsZW1lbnRFbmQocHJldmlvdXNPclBhcmVudFROb2RlKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBpZiAodE5vZGUuY2xhc3Nlc1dpdGhvdXRIb3N0ICE9IG51bGwgJiYgaGFzQ2xhc3NJbnB1dCh0Tm9kZSkpIHsKICAgICAgICAgICAgc2V0RGlyZWN0aXZlSW5wdXRzV2hpY2hTaGFkb3dzU3R5bGluZyh0VmlldywgdE5vZGUsIGdld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AgICAgICAgICAgICAgICAgIWN1c3RvbUVsZW1lbnRzLmdldCh0YWdOYW1lKSk7CiAgICAgICAgICAgIGlmIChpc1Vua25vd24gJiYgIW1hdGNoaW5nU2NoZW1hcyh0VmlldywgbFZpZXcsIHRhZ05hbWUpKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBsZXQgd2FybmluZyA9IGAnJHt0YWdOYW1lfScgaXMgbm90IGEga25vd24gZWxlbWVudDpcbmA7CiAgICAgICAgICAgICAgICB3YXJuaW5nICs9IGAxLiBJZiAnJHt0YWdOYW1lfScgaXMgYW4gQW5ndWxhciBjb21wb25lbnQsIHRoZW4gdmVyaWZ5IHRoYXQgaXQgaXMgcGFydCBvZiB0aGlzIG1vZHVsZS5cbmA7CiAgICAgICAgICAgICAgICBpZiAodGFnTmFtZSAmJiB0YWdOYW1lLmluZGV4T2YoJy0nKSA+IC0xKSB7CiAgICAgICAgICAgICAgICAgICAgd2FybmluZyArPSBgMi4gSWYgJyR7dGFnTmFtZX0nIGlzIGEgV2ViIENvbXBvbmVudCB0aGVuIGFkZCAnQ1VTVE9NX0VMRU1FTlRTX1NDSEVNQScgdG8gdGhlICdATmdNb2R1bGUuc2NoZW1hcycgb2YgdGhpcyBjb21wb25lbnQgdG8gc3VwcHJlc3MgdGhpcyBtZXNzYWdlLmA7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICB3YXJuaW5nICs9CiAgICAgICAgICAgICAgICAgICAgICAgIGAyLiBUbyBhbGxvdyBhbnkgZWxlbWVudCBhZGQgJ05PX0VSUk9SU19TQ0hFTUEnIHRvIHRoZSAnQE5nTW9kdWxlLnNjaGVtYXMnIG9mIHRoaXMgY29tcG9uZW50LmA7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjb25zb2xlLndhcm4od2FybmluZyk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAg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JbnN0YW5jZXModFZpZXcsIGxWaWV3LCB0Tm9kZSk7CiAgICAgICAgICAgIGV4ZWN1dGVDb250ZW50UXVlcmllcyh0VmlldywgdE5vZGUsIGxWaWV3KTsKICAgICAgICB9CiAgICAgICAgaWYgKGxvY2FsUmVmc0luZGV4ICE9IG51bGwpIHsKICAgICAgICAgICAgc2F2ZVJlc29sdmVkTG9jYWxzSW5EYXRhKGxWaWV3LCB0Tm9kZSk7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBNYXJrIHRoZSBlbmQgb2YgdGhlIDxuZy1jb250YWluZXI+LgogICAgICoKICAgICAqIFxAY29kZUdlbkFwaQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gybXJtWVsZW1lbnRDb250YWluZXJFbmQoKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBwcmV2aW91c09yUGFyZW50VE5vZGUgPSBnZXRQcmV2aW91c09yUGFyZW50VE5vZGUoKTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgdFZpZXcgPSBnZXRUVmlldygpOwogICAgICAgIGlmIChnZXRJc1BhcmVudCgpKSB7CiAgICAgICAgICAgIHNldElzTm90UGFyZW50KCk7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICBuZ0Rldk1vZGUgJiYgYXNzZXJ0SGFzUGFyZW50KHByZXZpb3VzT3JQYXJlbnRUTm9kZSk7CiAgICAgICAgICAgIHByZXZpb3VzT3JQYXJlbnRUTm9kZSA9ICgvKiogQHR5cGUgez99ICovIChwcmV2aW91c09yUGFyZW50VE5vZGUucGFyZW50KSk7CiAgICAgICAgICAgIHNldFByZXZpb3VzT3JQYXJlbnRUTm9kZShwcmV2aW91c09yUGFyZW50VE5vZGUsIGZhbHNlKTsKICAgICAgICB9CiAgICAgICAgbmdEZXZNb2RlICYmIGFzc2VydE5vZGVUeXBlKHByZXZpb3VzT3JQYXJlbnRUTm9kZSwgNCAvKiBFbGVtZW50Q29udGFpbmVyICovKTsKICAgICAgICBpZiAodFZpZXcuZmlyc3RDcmVhdGVQYXNzKSB7CiAgICAgICAgICAgIHJlZ2lzdGVyUG9zdE9yZGVySG9va3ModFZpZXcsIHByZXZpb3VzT3JQYXJlbnRUTm9kZSk7CiAgICAgICAgICAgIGlmIChpc0NvbnRlbnRRdWVyeUhvc3QocHJldmlvdXNPclBhcmVudFROb2RlKSkgewogICAgICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKHRWaWV3LnF1ZXJpZXMpKS5lbGVtZW50RW5kKHByZXZpb3VzT3JQYXJlbnRUTm9kZSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIENyZWF0ZXMgYW4gZW1wdHkgbG9naWNhbCBjb250YWluZXIgdXNpbmcge1xAbGluayBlbGVtZW50Q29udGFpbmVyU3RhcnR9CiAgICAgKiBhbmQge1xAbGluayBlbGVtZW50Q29udGFpbmVyRW5kfQogICAgICoKICAgICAqIFxAY29kZUdlbkFwaQogICAgICogQHBhcmFtIHs/fSBpbmRleCBJbmRleCBvZiB0aGUgZWxlbWVudCBpbiB0aGUgTFZpZXcgYXJyYXkKICAgICAqIEBwYXJhbSB7Pz19IGF0dHJzSW5kZXggSW5kZXggb2YgdGhlIGNvbnRhaW5lciBhdHRyaWJ1dGVzIGluIHRoZSBgY29uc3RzYCBhcnJheS4KICAgICAqIEBwYXJhbSB7Pz19IGxvY2FsUmVmc0luZGV4IEluZGV4IG9mIHRoZSBjb250YWluZXIncyBsb2NhbCByZWZlcmVuY2VzIGluIHRoZSBgY29uc3RzYCBhcnJheS4KICAgICAqCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiDJtcm1ZWxlbWVudENvbnRhaW5lcihpbmRleCwgYXR0cnNJbmRleCwgbG9jYWxSZWZzSW5kZXgpIHsKICAgICAgICDJtcm1ZWxlbWVudENvbnRh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Zmlyc3QgYW5kIGp1bXAgYW5vdGhlciAyIGVsZW1lbnRzIGlmIHdlIGRldGVjdCBsaXN0ZW5lcnMgY2xlYW51cCAoNCBlbGVtZW50cykuIEFsc28gY2hlY2sKICAgICAgICAgICAgICAgIC8vIGRvY3VtZW50YXRpb24gb2YgVFZpZXcuY2xlYW51cCBmb3IgbW9yZSBkZXRhaWxzIG9mIHRoaXMgZGF0YSBzdHJ1Y3R1cmUgbGF5b3V0LgogICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBjbGVhbnVwRXZlbnROYW1lID09PSAnc3RyaW5nJykgewogICAgICAgICAgICAgICAgICAgIGkgKz0gMjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gbnVsbDsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB0VmlldwogICAgICogQHBhcmFtIHs/fSBsVmlldwogICAgICogQHBhcmFtIHs/fSByZW5kZXJlcgogICAgICogQHBhcmFtIHs/fSB0Tm9kZQogICAgICogQHBhcmFtIHs/fSBldmVudE5hbWUKICAgICAqIEBwYXJhbSB7P30gbGlzdGVuZXJGbgogICAgICogQHBhcmFtIHs/PX0gdXNlQ2FwdHVyZQogICAgICogQHBhcmFtIHs/PX0gZXZlbnRUYXJnZXRSZXNvbHZlcgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gbGlzdGVuZXJJbnRlcm5hbCh0VmlldywgbFZpZXcsIHJlbmRlcmVyLCB0Tm9kZSwgZXZlbnROYW1lLCBsaXN0ZW5lckZuLCB1c2VDYXB0dXJlID0gZmFsc2UsIGV2ZW50VGFyZ2V0UmVzb2x2ZXIpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgaXNUTm9kZURpcmVjdGl2ZUhvc3QgPSBpc0RpcmVjdGl2ZUhvc3QodE5vZGUpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgIC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gICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG5hdGl2ZSA9ICgvKiogQHR5cGUgez99ICovIChnZXROYXRpdmVCeVROb2RlKHROb2RlLCBsVmlldykpKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCByZXNvbHZlZCA9IGV2ZW50VGFyZ2V0UmVzb2x2ZXIgPyBldmVudFRhcmdldFJlc29sdmVyKG5hdGl2ZSkgOiAoLyoqIEB0eXBlIHs/fSAqLyAoRU1QVFlfT0JKKSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdGFyZ2V0ID0gcmVzb2x2ZWQudGFyZ2V0IHx8IG5hdGl2ZTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBsQ2xlYW51cEluZGV4ID0gbENsZWFudXAubGVuZ3RoOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGlkeE9yVGFyZ2V0R2V0dGVyID0gZXZlbnRUYXJnZXRSZXNvbHZlciA/CiAgICAgICAgICAgICAgICAoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IF9sVmlldwogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKF9sVmlldykgPT4gZXZlbnRUYXJnZXRSZXNvbHZlcih1bndyYXBSTm9kZShfbFZpZXdbdE5vZGUuaW5kZXhdKSkudGFyZ2V0KSA6CiAgICAgICAgICAgICAgICB0Tm9kZS5pbmRleDsKICAgICAgICAgICAgLy8gSW4gb3JkZXIgdG8gbWF0Y2ggY3VycmVudCBiZWhhdmlvciwgbmF0aXZlIERPTSBldmVudCBsaXN0ZW5lcnMgbXVzdCBiZSBhZGRlZCBmb3IgYWxsCiAgICAgICAgICAgIC8vIGV2ZW50cyAoaW5jbHV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cEZuKTsKICAgICAgICAgICAgICAgICAgICB0Q2xlYW51cCAmJiB0Q2xlYW51cC5wdXNoKGV2ZW50TmFtZSwgaWR4T3JUYXJnZXRHZXR0ZXIsIGxDbGVhbnVwSW5kZXgsIGxDbGVhbnVwSW5kZXggKyAxKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIGxpc3RlbmVyRm4gPSB3cmFwTGlzdGVuZXIodE5vZGUsIGxWaWV3LCBsaXN0ZW5lckZuLCB0cnVlIC8qKiBwcmV2ZW50RGVmYXVsdCAqLyk7CiAgICAgICAgICAgICAgICB0YXJnZXQuYWRkRXZlbnRMaXN0ZW5lcihldmVudE5hbWUsIGxpc3RlbmVyRm4sIHVzZUNhcHR1cmUpOwogICAgICAgICAgICAgICAgbmdEZXZNb2RlICYmIG5nRGV2TW9kZS5yZW5kZXJlckFkZEV2ZW50TGlzdGVuZXIrKzsKICAgICAgICAgICAgICAgIGxDbGVhbnVwLnB1c2gobGlzdGVuZXJGbik7CiAgICAgICAgICAgICAgICB0Q2xlYW51cCAmJiB0Q2xlYW51cC5wdXNoKGV2ZW50TmFtZSwgaWR4T3JUYXJnZXRHZXR0ZXIsIGxDbGVhbnVwSW5kZXgsIHVzZUNhcHR1cmUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8vIHN1YnNjcmliZSB0byBkaXJlY3RpdmUgb3V0cHV0cwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBvdXRwdXRzID0gdE5vZGUub3V0cHV0czsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IHByb3BzOwogICAgICAgIGlmIChwcm9jZXNzT3V0cHV0cyAmJiBvdXRwdXRzICE9PSBudWxsICYmIChwcm9wcyA9IG91dHB1dHNbZXZlbnROYW1lXSkpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwcm9wc0xlbmd0aCA9IHByb3BzLmxlbmd0aDsKICAgICAgICAgICAgaWYgKHByb3BzTGVuZ3RoKSB7CiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHByb3BzTGVuZ3RoOyBpICs9IDIpIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgaW5kZXggPSAoLyoqIEB0eXBlIHs/fSAqLyAocHJvcHNbaV0pKTsKICAgICAgICAgICAgICAgICAgICBuZ0Rldk1vZGUgJiYgYXNzZXJ0RGF0YUluUmFuZ2UobFZpZXcsIGluZGV4KTsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgbWluaWZpZWROYW1lID0gcHJvcHNbaSArIDFdOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBkaXJlY3RpdmVJbnN0YW5jZSA9IGxWaWV3W2luZGV4XTsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3Qgb3V0cHV0ID0gZGlyZWN0aXZlSW5zdGFuY2VbbWluaWZpZWROYW1lXTsKICAgICAgICAgICAgICAgICAgICBpZiAobmdEZXZNb2RlICYmICFpc09ic2VydmFibGUkMShvdXRwdXQpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgQE91dHB1dCAke21pbmlmaWVkTmFtZX0gbm90IGluaXRpYWxpemVkIGluICcke2RpcmVjdGl2ZUluc3RhbmNlLmNvbnN0cnVjdG9yLm5hbWV9Jy5gKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHN1YnNjcmlwdGlvbiA9IG91dHB1dC5zdWJzY3JpYmUobGlzdGVuZXJGbik7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGlkeCA9IGxDbGVhbnVwLmxlbmd0aDsKICAgICAgICAgICAgICAgICAgICBsQ2xlYW51cC5wdXNoKGxpc3RlbmVyRm4sIHN1YnNjcmlwdGlvbik7CiAgICAgICAgICAgICAgICAgICAgdENsZWFudXAgJiYgdENsZWFudXAucHVzaChldmVudE5hbWUsIHROb2RlLmluZGV4LCBpZHgsIC0oaWR4ICsgMSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IGxWaWV3CiAgICAgKiBAcGFyYW0gez99IGxpc3RlbmVyRm4KICAgICAqIEBwYXJhbSB7P30gZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZXhlY3V0ZUxpc3RlbmVyV2l0aEVycm9ySGFuZGxpbmcobFZpZXcsIGxpc3RlbmVyRm4sIGUpIHsKICAgICAgICB0cnkgewogICAgICAgICAgICAvLyBPbmx5IGV4cGxpY2l0bHkgcmV0dXJuaW5nIGZhbHNlIGZyb20gYSBsaXN0ZW5lciBzaG91bGQgcHJldmVudERlZmF1bHQKICAgICAgICAgICAgcmV0dXJuIGxpc3RlbmVyRm4oZSkgIT09IGZhbHNlOwogICAgICAgIH0KICAgICAgICBjYXRjaCAoZXJyb3IpIHsKICAgICAgICAgICAgaGFuZGxlRXJyb3IobFZpZXcsIGVycm9yKTsKICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogV3JhcHMgYW4gZXZlbnQgbGlzdGVuZXIgd2l0aCBhIGZ1bmN0aW9uIHRoYXQgbWFya3MgYW5jZXN0b3JzIGRpcnR5IGFuZCBwcmV2ZW50cyBkZWZhdWx0IGJlaGF2aW9yLA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bndyYXAgdGhlIGZ1bmN0aW9uCiAgICAgICAgICAgIC8vIHNvIHRoYXQgaXQgY2FuIGJlIGludm9rZWQgcHJvZ3JhbW1hdGljYWxseSBieSBgRGVidWdOb2RlLnRyaWdnZXJFdmVudEhhbmRsZXJgLgogICAgICAgICAgICBpZiAoZSA9PT0gRnVuY3Rpb24pIHsKICAgICAgICAgICAgICAgIHJldHVybiBsaXN0ZW5lckZuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIEluIG9yZGVyIHRvIGJlIGJhY2t3YXJkcyBjb21wYXRpYmxlIHdpdGggVmlldyBFbmdpbmUsIGV2ZW50cyBvbiBjb21wb25lbnQgaG9zdCBub2RlcwogICAgICAgICAgICAvLyBtdXN0IGFsc28gbWFyayB0aGUgY29tcG9uZW50IHZpZXcgaXRzZWxmIGRpcnR5IChpLmUuIHRoZSB2aWV3IHRoYXQgaXQgb3ducykuCiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc3RhcnRWaWV3ID0gdE5vZGUuZmxhZ3MgJiAyIC8qIGlzQ29tcG9uZW50SG9zdCAqLyA/CiAgICAgICAgICAgICAgICBnZXRDb21wb25lbnRMVmlld0J5SW5kZXgodE5vZGUuaW5kZXgsIGxWaWV3KSA6CiAgICAgICAgICAgICAgICBsVmlldzsKICAgICAgICAgICAgLy8gU2VlIGludGVyZmFjZXMvdmlldy50cyBmb3IgbW9yZSBvbiBMVmlld0ZsYWdzLk1hbnVhbE9uUHVzaAogICAgICAgICAgICBpZiAoKGxWaWV3W0ZMQUdTXSAmIDMyIC8qIE1hbnVhbE9uUHVzaCAqLykgPT09IDApIHsKICAgICAgICAgICAgICAgIG1hcmtWaWV3RGlydHkoc3RhcnRWaWV3KTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCByZXN1bHQgPSBleGVjdXRlTGlzdGVuZXJXaXRoRXJyb3JIYW5kbGlu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ZSBjYW4ndCByZS1jb25zdHJ1Y3QgdGV4dHVhbCBmb3JtIGZyb20gaXQgKGFzIGVudGVyZWQgYnkgYQogICAgICogdGVtcGxhdGUgYXV0aG9yKS4KICAgICAqCiAgICAgKiBcQGNvZGVHZW5BcGkKICAgICAqIEBwYXJhbSB7Pz19IHByb2plY3Rpb25TbG90cwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gybXJtXByb2plY3Rpb25EZWYocHJvamVjdGlvblNsb3RzKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGNvbXBvbmVudE5vZGUgPSAoLyoqIEB0eXBlIHs/fSAqLyAoZ2V0TFZpZXcoKVtERUNMQVJBVElPTl9DT01QT05FTlRfVklFV11bVF9IT1NUXSkpOwogICAgICAgIGlmICghY29tcG9uZW50Tm9kZS5wcm9qZWN0aW9uKSB7CiAgICAgICAgICAgIC8vIElmIG5vIGV4cGxpY2l0IHByb2plY3Rpb24gc2xvdHMgYXJlIGRlZmluZWQsIGZhbGwgYmFjayB0byBhIHNpbmdsZQogICAgICAgICAgICAvLyBwcm9qZWN0aW9uIHNsb3Qgd2l0aCB0aGUgd2lsZGNhcmQgc2VsZWN0b3IuCiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbnVtUHJvamVjdGlvblNsb3RzID0gcHJvamVjdGlvblNsb3RzID8gcHJvamVjdGlvblNsb3RzLmxlbmd0aCA6IDE7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcHJvamVjdGlvbkhlYWRzID0gY29tcG9uZW50Tm9kZS5wcm9qZWN0aW9uID0KICAgICAgICAgICAgICAgIG5ld0FycmF5KG51bVByb2plY3Rpb25TbG90cywgKC8qKiBAdHlwZSB7P30gKi8gKCgvKiogQHR5cGUgez99ICovIChudWxsKSkpKSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdGFpbHMgPSBwcm9qZWN0aW9uSGVhZHMuc2xpY2UoKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgY29tcG9uZW50Q2hpbGQgPSBjb21wb25lbnROb2RlLmNoaWxkOwogICAgICAgICAgICB3aGlsZSAoY29tcG9uZW50Q2hpbGQgIT09IG51bGwpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHNsb3RJbmRleCA9IHByb2plY3Rpb25TbG90cyA/IG1hdGNoaW5nUHJvamVjdGlvblNsb3RJbmRleChjb21wb25lbnRDaGlsZCwgcHJvamVjdGlvblNsb3RzKSA6IDA7CiAgICAgICAgICAgICAgICBpZiAoc2xvdEluZGV4ICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKHRhaWxzW3Nsb3RJbmRleF0pIHsKICAgICAgICAgICAgICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKHRhaWxzW3Nsb3RJbmRleF0pKS5wcm9qZWN0aW9uTmV4dCA9IGNvbXBvbmVudENoaWxkOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgcHJvamVjdGlvbkhlYWRzW3Nsb3RJbmRleF0gPSBjb21wb25lbnRDaGlsZDsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgdGFpbHNbc2xvdEluZGV4XSA9IGNvbXBvbmVudENoaWxkOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgY29tcG9uZW50Q2hpbGQgPSBjb21wb25lbnRDaGlsZC5uZXh0OwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgbGV0IGRlbGF5UHJvamVjdGlvbiA9IGZhbHNlOwogICAgLyoqCi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ZXMgc3Vycm91bmRlZCBieSB0ZXh0LgogICAgICoKICAgICAqIFVzZWQgd2hlbiB0aGUgdmFsdWUgcGFzc2VkIHRvIGEgcHJvcGVydHkgaGFzIDggaW50ZXJwb2xhdGVkIHZhbHVlcyBpbiBpdDoKICAgICAqCiAgICAgKiBgYGBodG1sCiAgICAgKiA8ZGl2IHRpdGxlPSJwcmVmaXh7e3YwfX0te3t2MX19LXt7djJ9fS17e3YzfX0te3t2NH19LXt7djV9fS17e3Y2fX0te3t2N319c3VmZml4Ij48L2Rpdj4KICAgICAqIGBgYAogICAgICoKICAgICAqIEl0cyBjb21waWxlZCByZXByZXNlbnRhdGlvbiBpczo6CiAgICAgKgogICAgICogYGBgdHMKICAgICAqIMm1ybVwcm9wZXJ0eUludGVycG9sYXRlOCgKICAgICAqICAndGl0bGUnLCAncHJlZml4JywgdjAsICctJywgdjEsICctJywgdjIsICctJywgdjMsICctJywgdjQsICctJywgdjUsICctJywgdjYsICctJywgdjcsICdzdWZmaXgnKTsKICAgICAqIGBgYAogICAgICoKICAgICAqIElmIHRoZSBwcm9wZXJ0eSBuYW1lIGFsc28gZXhpc3RzIGFzIGFuIGlucHV0IHByb3BlcnR5IG9uIG9uZSBvZiB0aGUgZWxlbWVudCdzIGRpcmVjdGl2ZXMsCiAgICAgKiB0aGUgY29tcG9uZW50IHByb3BlcnR5IHdpbGwgYmUgc2V0IGluc3RlYWQgb2YgdGhlIGVsZW1lbnQgcHJvcGVydHkuIFRoaXMgY2hlY2sgbXVzdAogICAgICogYmUgY29uZHVjdGVkIGF0IHJ1bnRpbWUgc28gY2hpbGQgY29tcG9uZW50cyB0aGF0IGFkZCBuZXcgYFxASW5wdXRzYCBkb24ndCBoYXZlIHRvIGJlIHJlLWNvbXBpbGVkLgogICAgICoKICAgICAqIFxAY29kZUdlbkFwaQogICAgICogQHBhcmFtIHs/fSBwcm9wTmFtZSBUaGUgbmFtZSBvZiB0aGUgcHJvcGVydHkgdG8gdXBkYXRlCiAgICA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lcnR5SW50ZXJwb2xhdGVWKHByb3BOYW1lLCB2YWx1ZXMsIHNhbml0aXplcikgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBsVmlldyA9IGdldExWaWV3KCk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGludGVycG9sYXRlZFZhbHVlID0gaW50ZXJwb2xhdGlvblYobFZpZXcsIHZhbHVlcyk7CiAgICAgICAgaWYgKGludGVycG9sYXRlZFZhbHVlICE9PSBOT19DSEFOR0UpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB0VmlldyA9IGdldFRWaWV3KCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdE5vZGUgPSBnZXRTZWxlY3RlZFROb2RlKCk7CiAgICAgICAgICAgIGVsZW1lbnRQcm9wZXJ0eUludGVybmFsKHRWaWV3LCB0Tm9kZSwgbFZpZXcsIHByb3BOYW1lLCBpbnRlcnBvbGF0ZWRWYWx1ZSwgbFZpZXdbUkVOREVSRVJdLCBzYW5pdGl6ZXIsIGZhbHNlKTsKICAgICAgICAgICAgaWYgKG5nRGV2TW9kZSkgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgaW50ZXJwb2xhdGlvbkluQmV0d2VlbiA9IFt2YWx1ZXNbMF1dOwogICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDI7IGkgPCB2YWx1ZXMubGVuZ3RoOyBpICs9IDIpIHsKICAgICAgICAgICAgICAgICAgICBpbnRlcnBvbGF0aW9uSW5CZXR3ZWVuLnB1c2godmFsdWVzW2ldKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHN0b3JlUHJvcGVydHlCaW5kaW5nTWV0YWRhdGEodFZpZXcuZGF0YSwgdE5vZGUsIHByb3BOYW1lLCBnZXR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mllbGRzIGFzIHdlbGwuCiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc3RhdGljS2V5VmFsdWVBcnJheSA9ICgvKiogQHR5cGUgez99ICovICh0U3R5bGluZ0tleVdpdGhTdGF0aWMpKTsKICAgICAgICAgICAgdFN0eWxpbmdLZXkgPSBzdGF0aWNLZXlWYWx1ZUFycmF5WzFdOyAvLyB1bndyYXAuCiAgICAgICAgICAgIC8vIFdlIG5lZWQgdG8gY2hlY2sgaWYgb3VyIGtleSBpcyBwcmVzZW50IGluIHRoZSBzdGF0aWMgc28gdGhhdCB3ZSBjYW4gbWFyayBpdCBhcyBkdXBsaWNhdGUuCiAgICAgICAgICAgIGlmICh0U3R5bGluZ0tleSA9PT0gbnVsbCB8fAogICAgICAgICAgICAgICAga2V5VmFsdWVBcnJheUluZGV4T2Yoc3RhdGljS2V5VmFsdWVBcnJheSwgKC8qKiBAdHlwZSB7P30gKi8gKHRTdHlsaW5nS2V5KSkpID4gMCkgewogICAgICAgICAgICAgICAgLy8gdFN0eWxpbmdLZXkgaXMgcHJlc2VudCBpbiB0aGUgc3RhdGljcywgbmVlZCB0byBtYXJrIGl0IGFzIGR1cGxpY2F0ZS4KICAgICAgICAgICAgICAgIGlzS2V5RHVwbGljYXRlT2ZTdGF0aWMgPSB0cnVlOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICB0U3R5bGluZ0tleSA9IHRTdHlsaW5nS2V5V2l0aFN0YXRpYzsKICAgICAgICB9CiAgICAgICAgaWYgKGlzSG9zdEJpbmRpbmcpIHsKICAgICAgICAgICAgLy8gV2UgYXJlIGluc2VydGluZyBob3N0IGJpbmRpbmdzCiAgICAgICAgICAgIC8vIElmIHdlIGRvbid0IGhhdmUgdGVtcGxhdGUgYmluZGluZ3MgdGhlbiBgdGFpbGAgaXMgMC4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIC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byB1cGRhdGUgdGhlIHRlbXBsYXRlLXRhaWwgdmFsdWUgdG8gcG9pbnQgdG8gdXMuCiAgICAgICAgICAgICAgICAgICAgdERhdGFbcHJldmlvdXNOb2RlICsgMV0gPQogICAgICAgICAgICAgICAgICAgICAgICBzZXRUU3R5bGluZ1JhbmdlTmV4dCgoLyoqIEB0eXBlIHs/fSAqLyAodERhdGFbcHJldmlvdXNOb2RlICsgMV0pKSwgaW5kZXgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLy8gVGhlICJwcmV2aW91cyIgb2YgdGhlIHRlbXBsYXRlIGJpbmRpbmcgaGVhZCBzaG91bGQgcG9pbnQgdG8gdGhpcyBob3N0IGJpbmRpbmcKICAgICAgICAgICAgICAgIHREYXRhW3RtcGxIZWFkICsgMV0gPSBzZXRUU3R5bGluZ1JhbmdlUHJldigoLyoqIEB0eXBlIHs/fSAqLyAodERhdGFbdG1wbEhlYWQgKyAxXSkpLCBpbmRleCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0RGF0YVtpbmRleCArIDFdID0gdG9UU3R5bGluZ1JhbmdlKHRtcGxIZWFkLCAwKTsKICAgICAgICAgICAgICAgIC8vIGlmIGEgaG9zdCBiaW5kaW5nIGhhcyBhbHJlYWR5IGJlZW4gcmVnaXN0ZXJlZCwgd2UgbmVlZCB0byB1cGRhdGUgdGhlIG5leHQgb2YgdGhhdCBob3N0CiAgICAgICAgICAgICAgICAvLyBiaW5kaW5nIHRvIHBvaW50IHRvIHRoaXMgb25lCiAgICAgICAgICAgICAgICBpZiAodG1wbEhlYWQgIT09IDApIHsKICAgICAgICAgICAgICAgICAgICAvLyBXZSBuZWVkIHRvIHVwZGF0ZSB0aGUgdGVtcGxhdGUtdGFpbCB2YWx1ZSB0byBwb2ludCB0byB1cy4KICAgICAgICAgICAgICAgICAgICB0RGF0YVt0bXBsSGVhZCArIDFdID0gc2V0VFN0eWxpbmdSYW5nZ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wcmV2aW91cyBjaGFyYWN0ZXIKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IGNoMiA9IC0xOwogICAgICAgIC8vIDJuZCBwcmV2aW91cyBjaGFyYWN0ZXIKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IGNoMyA9IC0xOwogICAgICAgIC8vIDNyZCBwcmV2aW91cyBjaGFyYWN0ZXIKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IGkgPSBzdGFydEluZGV4OwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgbGFzdENoSW5kZXggPSBpOwogICAgICAgIHdoaWxlIChpIDwgZW5kSW5kZXgpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjaCA9IHRleHQuY2hhckNvZGVBdChpKyspOwogICAgICAgICAgICBpZiAoY2ggPT09IDU5IC8qIFNFTUlfQ09MT04gKi8pIHsKICAgICAgICAgICAgICAgIHJldHVybiBsYXN0Q2hJbmRleDsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChjaCA9PT0gMzQgLyogRE9VQkxFX1FVT1RFICovIHx8IGNoID09PSAzOSAvKiBTSU5HTEVfUVVPVEUgKi8pIHsKICAgICAgICAgICAgICAgIGxhc3RDaEluZGV4ID0gaSA9IGNvbnN1bWVRdW90ZWRUZXh0KHRleHQsIGNoLCBpLCBlbmRJbmRleCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoc3RhcnRJbmRleCA9PT0KICAgICAgICAgICAgICAgIGkgLSA0ICYmIC8vIFdlIGhhdmUgc2VlbiBvbmx5IDQgY2hhcmFjdGVycyBzbyBmYXIgIlVSTCgiIChJZ25vcmUgImZvb19VUkwoKSIpCiAgICAgICAgICAgICAgICBjaDMgPT09IDg1IC8qIFUgKi8gJiYKICAgICAgICAgICAgICAgIGNoMiA9PT0gODIgLyogUiAq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R1cm4gez99IEluZGV4IGFmdGVyIHF1b3RlZCBjaGFyYWN0ZXJzLgogICAgICovCiAgICBmdW5jdGlvbiBjb25zdW1lUXVvdGVkVGV4dCh0ZXh0LCBxdW90ZUNoYXJDb2RlLCBzdGFydEluZGV4LCBlbmRJbmRleCkgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgY2gxID0gLTE7CiAgICAgICAgLy8gMXN0IHByZXZpb3VzIGNoYXJhY3RlcgogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgaW5kZXggPSBzdGFydEluZGV4OwogICAgICAgIHdoaWxlIChpbmRleCA8IGVuZEluZGV4KSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgY2ggPSB0ZXh0LmNoYXJDb2RlQXQoaW5kZXgrKyk7CiAgICAgICAgICAgIGlmIChjaCA9PSBxdW90ZUNoYXJDb2RlICYmIGNoMSAhPT0gOTIgLyogQkFDS19TTEFTSCAqLykgewogICAgICAgICAgICAgICAgcmV0dXJuIGluZGV4OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChjaCA9PSA5MiAvKiBCQUNLX1NMQVNIICovICYmIGNoMSA9PT0gOTIgLyogQkFDS19TTEFTSCAqLykgewogICAgICAgICAgICAgICAgLy8gdHdvIGJhY2sgc2xhc2hlcyBjYW5jZWwgZWFjaCBvdGhlciBvdXQuIEZvciBleGFtcGxlIGAiXFwiYCBzaG91bGQgcHJvcGVybHkgZW5kIHRoZQogICAgICAgICAgICAgICAgLy8gcXVvdGF0aW9uLiAoSXQgc2hvdWxkIG5vdCBhc3N1bWUgdGhhdCB0aGUgbGFzdCBgImAgaXMgZXNjYXBlZC4pCiAgICAgICAgICAgICAgICBjaDEgPSAwOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgY2gxID0gY2g7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgIC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AgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgYXR0cnMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGl0ZW0gPSAoLyoqIEB0eXBlIHs/fSAqLyAoYXR0cnNbaV0pKTsKICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgaXRlbSA9PT0gJ251bWJlcicpIHsKICAgICAgICAgICAgICAgICAgICBjdXJyZW50TWFya2VyID0gaXRlbTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIGlmIChjdXJyZW50TWFya2VyID09PSBkZXNpcmVkTWFya2VyKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghQXJyYXkuaXNBcnJheShzdHlsaW5nS2V5KSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgc3R5bGluZ0tleSA9IHN0eWxpbmdLZXkgPT09IHVuZGVmaW5lZCA/IFtdIDogKC8qKiBAdHlwZSB7P30gKi8gKFsnJywgc3R5bGluZ0tleV0pKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBrZXlWYWx1ZUFycmF5U2V0KCgvKiogQHR5cGUgez99ICovIChzdHlsaW5nS2V5KSksIGl0ZW0sIGlzQ2xhc3NCYXNlZCA/IHRydWUgOiBhdHRyc1srK2ldKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIHN0eWxpbmdLZXkgPT09IHVuZGVmaW5lZCA/IG51bGwgOiBzdHlsaW5nS2V5OwogICAgfQogICAgLyoqCiAgICAgKiBDb252ZXJ0IHVzZXIgaW5wdXQgdG8gYEtleVZhbHVlQXJyYXlgLgogICAgICoKICAgICAqIFRoaXMgZnVuY3Rpb24gdGFrZXMgdXNlciBpbnB1dCB3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UgPT09IHVuZGVmaW5lZCAqLyB8fCB2YWx1ZSA9PT0gJycpCiAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAoRU1QVFlfQVJSQVkkMykpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBzdHlsZUtleVZhbHVlQXJyYXkgPSAoLyoqIEB0eXBlIHs/fSAqLyAoW10pKTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgdW53cmFwcGVkVmFsdWUgPSAoLyoqIEB0eXBlIHs/fSAqLyAodW53cmFwU2FmZVZhbHVlKHZhbHVlKSkpOwogICAgICAgIGlmIChBcnJheS5pc0FycmF5KHVud3JhcHBlZFZhbHVlKSkgewogICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHVud3JhcHBlZFZhbHVlLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICBrZXlWYWx1ZUFycmF5U2V0KHN0eWxlS2V5VmFsdWVBcnJheSwgdW53cmFwcGVkVmFsdWVbaV0sIHRydWUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYgKHR5cGVvZiB1bndyYXBwZWRWYWx1ZSA9PT0gJ29iamVjdCcpIHsKICAgICAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gdW53cmFwcGVkVmFsdWUpIHsKICAgICAgICAgICAgICAgIGlmICh1bndyYXBwZWRWYWx1ZS5oYXNPd25Qcm9wZXJ0eShrZXkpKSB7CiAgICAgICAgICAgICAgICAgICAga2V5VmFsdWVBcnJheVNldChzdHlsZUtleVZhbHVlQXJyYXksIGtleSwgdW53cmFwcGVkVmFsdWVba2V5XSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgZWxzZSBpZiAodHlwZW9mIHVud3JhcHBlZFZhbHVlID09PSAnc3RyaW5nJykgewogICAgICAgICAgICBzdHJpbmdQYXJzZXIoc3R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qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHNldFZhbHVlID0gdW5kZWZpbmVkOwogICAgICAgICAgICBpZiAob2xkS2V5ID09PSBuZXdLZXkpIHsKICAgICAgICAgICAgICAgIC8vIFVQREFURTogS2V5cyBhcmUgZXF1YWwgPT4gbmV3IHZhbHVlIGlzIG92ZXJ3cml0aW5nIG9sZCB2YWx1ZS4KICAgICAgICAgICAgICAgIG9sZEluZGV4ICs9IDI7CiAgICAgICAgICAgICAgICBuZXdJbmRleCArPSAyOwogICAgICAgICAgICAgICAgaWYgKG9sZFZhbHVlICE9PSBuZXdWYWx1ZSkgewogICAgICAgICAgICAgICAgICAgIHNldEtleSA9IG5ld0tleTsKICAgICAgICAgICAgICAgICAgICBzZXRWYWx1ZSA9IG5ld1ZhbHVlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKG5ld0tleSA9PT0gbnVsbCB8fCBvbGRLZXkgIT09IG51bGwgJiYgb2xkS2V5IDwgKC8qKiBAdHlwZSB7P30gKi8gKG5ld0tleSkpKSB7CiAgICAgICAgICAgICAgICAvLyBERUxFVEU6IG9sZEtleSBrZXkgaXMgbWlzc2luZyBvciB3ZSBkaWQgbm90IGZpbmQgdGhlIG9sZEtleSBpbiB0aGUgbmV3VmFsdWUKICAgICAgICAgICAgICAgIC8vIChiZWNhdXNlIHRoZSBrZXlWYWx1ZUFycmF5IGlzIHNvcnRlZCBhbmQgYG5ld0tleWAgaXMgZm91bmQgbGF0ZXIgYWxwaGFiZXRpY2FsbHkpLgogICAgICAgICAgICAgICAgLy8gYCJiYWNrZ3JvdW5kIiA8ICJjb2xvciJgIHNvIHdlIG5lZWQgdG8gZGVsZXRlIGAiYmFja2dyb3VuZCJgIGJlY2F1c2UgaXQgaXMgbm90IGZvdW5kIGluIHRoZQogICAgICAgICAgICAgICAgLy8gbmV3IGFycmF5LgogICAgICAgICAgICAgICAgb2xkSW5kZXggKz0gMjsKICAgICAgICAgICAgICAgIHNldEtleSA9IG9sZEtleTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIC8vIENSRUFURTogbmV3S2V5J3MgaXMgZWFybGllciBhbHBoYWJldGljYWxseSB0aGFuIG9sZEtleSdzIChvciBubyBvbGRLZXkpID0+IHdlIGhhdmUgbmV3IGtleS4KICAgICAgICAgICAgICAgIC8vIGAiY29sb3IiID4gImJhY2tncm91bmQiYCBzbyB3ZSBuZWVkIHRvIGFkZCBgY29sb3JgIGJlY2F1c2UgaXQgaXMgaW4gbmV3IGFycmF5IGJ1dCBub3QgaW4KICAgICAgICAgICAgICAgIC8vIG9sZCBhcnJheS4KICAgICAgICAgICAgICAgIG5nRGV2TW9kZSAmJiBhc3NlcnREZWZpbmVkKG5ld0tleSwgJ0V4cGVjdGluZyB0byBoYXZlIGEgdmFsaWQga2V5Jyk7CiAgICAgICAgICAgICAgICBuZXdJbmRleCArPSAyOwogICAgICAgICAgICAgICAgc2V0S2V5ID0gbmV3S2V5OwogICAgICAgICAgICAgICAgc2V0VmFsdWUgPSBuZXdWYWx1ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoc2V0S2V5ICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICB1cGRhdGVTdHlsaW5nKHRWaWV3LCB0Tm9kZSwgbFZpZXcsIHJlbmRlcmVyLCBzZXRLZXksIHNldFZhbHVlLCBpc0NsYXNzQmFzZWQsIGJpbmRpbmdJbmRleCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgb2xkS2V5ID0gb2xkSW5kZXggPCBvbGRLZXlWYWx1ZUFycmF5Lmxlbmd0aCA/IG9sZEtleVZhbHVlQXJyYXlbb2xkSW5kZXhdIDogbnVsbDsKICAgICAgICAgICAgbmV3S2V5ID0gbmV3SW5kZXggPCBuZXdLZXlWYWx1ZUFycmF5Lmxlbmd0aCA/IG5ld0tleVZhbHVlQXJyYXlbbmV3SW5kZXhdI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bGx5IGV4ZWN1dGVzLikKICAgICAgICAgICAgICAgIHZhbHVlQXRMVmlld0luZGV4ID0gaXNTdHlsaW5nTWFwID8gRU1QVFlfQVJSQVkkMyA6IHVuZGVmaW5lZDsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBjdXJyZW50VmFsdWUgPSBpc1N0eWxpbmdNYXAgPyBrZXlWYWx1ZUFycmF5R2V0KHZhbHVlQXRMVmlld0luZGV4LCBwcm9wKSA6CiAgICAgICAgICAgICAgICBrZXkgPT09IHByb3AgPyB2YWx1ZUF0TFZpZXdJbmRleCA6IHVuZGVmaW5lZDsKICAgICAgICAgICAgaWYgKGNvbnRhaW5zU3RhdGljcyAmJiAhaXNTdHlsaW5nVmFsdWVQcmVzZW50KGN1cnJlbnRWYWx1ZSkpIHsKICAgICAgICAgICAgICAgIGN1cnJlbnRWYWx1ZSA9IGtleVZhbHVlQXJyYXlHZXQoKC8qKiBAdHlwZSB7P30gKi8gKHJhd0tleSkpLCBwcm9wKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoaXNTdHlsaW5nVmFsdWVQcmVzZW50KGN1cnJlbnRWYWx1ZSkpIHsKICAgICAgICAgICAgICAgIHZhbHVlID0gY3VycmVudFZhbHVlOwogICAgICAgICAgICAgICAgaWYgKGlzUHJldkRpcmVjdGlvbikgewogICAgICAgICAgICAgICAgICAgIHJldHVybiB2YWx1ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHRSYW5nZSA9ICgvKiogQHR5cGUgez99ICovICh0RGF0YVtpbmRleCArIDFdKSk7CiAgICAgICAgICAgIGluZGV4ID0gaXNQcmV2RGlyZWN0aW9uID8gZ2V0VFN0eWxpbmdSYW5nZVByZXYodFJhbmdlKSA6IGdldFRTdHlsaW5nUmFuZ2VOZXh0KHRSYW5nZSk7CiA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cyBpbiBpdDoKICAgICAqCiAgICAgKiBgYGBodG1sCiAgICAgKiA8ZGl2PnByZWZpeHt7djB9fS17e3YxfX1zdWZmaXg8L2Rpdj4KICAgICAqIGBgYAogICAgICoKICAgICAqIEl0cyBjb21waWxlZCByZXByZXNlbnRhdGlvbiBpczoKICAgICAqCiAgICAgKiBgYGB0cwogICAgICogybXJtXRleHRJbnRlcnBvbGF0ZTIoJ3ByZWZpeCcsIHYwLCAnLScsIHYxLCAnc3VmZml4Jyk7CiAgICAgKiBgYGAKICAgICAqIEBzZWUgdGV4dEludGVycG9sYXRlVgogICAgICogXEBjb2RlR2VuQXBpCiAgICAgKiBAcGFyYW0gez99IHByZWZpeAogICAgICogQHBhcmFtIHs/fSB2MAogICAgICogQHBhcmFtIHs/fSBpMAogICAgICogQHBhcmFtIHs/fSB2MQogICAgICogQHBhcmFtIHs/fSBzdWZmaXgKICAgICAqIEByZXR1cm4gez99IGl0c2VsZiwgc28gdGhhdCBpdCBtYXkgYmUgY2hhaW5lZC4KICAgICAqLwogICAgZnVuY3Rpb24gybXJtXRleHRJbnRlcnBvbGF0ZTIocHJlZml4LCB2MCwgaTAsIHYxLCBzdWZmaXgpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgbFZpZXcgPSBnZXRMVmlldygpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBpbnRlcnBvbGF0ZWQgPSBpbnRlcnBvbGF0aW9uMihsVmlldywgcHJlZml4LCB2MCwgaTAsIHYxLCBzdWZmaXgpOwogICAgICAgIGlmIChpbnRlcnBvbGF0ZWQgIT09IE5PX0NIQU5HRSkgewogICAgICAgICAgICB0ZXh0QmluZGluZ0ludGVybmFsKGxWaWV3LCBnZXRTZWxlY3RlZEluZGV4KCksICgvKiogQHR5cGUgez99ICovIChpbnRlcnBvbGF0ZWQpKSk7CiAgICAgICAgfQogICAgICAgIHJldHVybiDJtcm1dGV4dEludGVycG9sYXRlM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0gez99IGkxCiAgICAgKiBAcGFyYW0gez99IHYyCiAgICAgKiBAcGFyYW0gez99IGkyCiAgICAgKiBAcGFyYW0gez99IHYzCiAgICAgKiBAcGFyYW0gez99IHN1ZmZpeAogICAgICogQHJldHVybiB7P30gaXRzZWxmLCBzbyB0aGF0IGl0IG1heSBiZSBjaGFpbmVkLgogICAgICovCiAgICBmdW5jdGlvbiDJtcm1dGV4dEludGVycG9sYXRlNChwcmVmaXgsIHYwLCBpMCwgdjEsIGkxLCB2MiwgaTIsIHYzLCBzdWZmaXgpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgbFZpZXcgPSBnZXRMVmlldygpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBpbnRlcnBvbGF0ZWQgPSBpbnRlcnBvbGF0aW9uNChsVmlldywgcHJlZml4LCB2MCwgaTAsIHYxLCBpMSwgdjIsIGkyLCB2Mywgc3VmZml4KTsKICAgICAgICBpZiAoaW50ZXJwb2xhdGVkICE9PSBOT19DSEFOR0UpIHsKICAgICAgICAgICAgdGV4dEJpbmRpbmdJbnRlcm5hbChsVmlldywgZ2V0U2VsZWN0ZWRJbmRleCgpLCAoLyoqIEB0eXBlIHs/fSAqLyAoaW50ZXJwb2xhdGVkKSkpOwogICAgICAgIH0KICAgICAgICByZXR1cm4gybXJtXRleHRJbnRlcnBvbGF0ZTQ7CiAgICB9CiAgICAvKioKICAgICAqCiAgICAgKiBVcGRhdGUgdGV4dCBjb250ZW50IHdpdGggNSBib3VuZCB2YWx1ZXMgc3Vycm91bmRlZCBieSBvdGhlciB0ZXh0LgogICAgICoKICAgICAqIFVzZWQgd2hlbiBhIHRleHQgbm9kZSBoYXMgNSBpbnRlcnBvbGF0ZWQgdmFsdWVzIGluIGl0OgogICAgICoKICAgICAqIGBgYGh0bWwKICAgICAqIDxkaXY+cHJlZml4e3t2MH19LXt7djF9fS17e3YyfX0te3t2M319LXt7djR9fXN1ZmZpe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Jwb2xhdGVkICE9PSBOT19DSEFOR0UpIHsKICAgICAgICAgICAgdGV4dEJpbmRpbmdJbnRlcm5hbChsVmlldywgZ2V0U2VsZWN0ZWRJbmRleCgpLCAoLyoqIEB0eXBlIHs/fSAqLyAoaW50ZXJwb2xhdGVkKSkpOwogICAgICAgIH0KICAgICAgICByZXR1cm4gybXJtXRleHRJbnRlcnBvbGF0ZTU7CiAgICB9CiAgICAvKioKICAgICAqCiAgICAgKiBVcGRhdGUgdGV4dCBjb250ZW50IHdpdGggNiBib3VuZCB2YWx1ZXMgc3Vycm91bmRlZCBieSBvdGhlciB0ZXh0LgogICAgICoKICAgICAqIFVzZWQgd2hlbiBhIHRleHQgbm9kZSBoYXMgNiBpbnRlcnBvbGF0ZWQgdmFsdWVzIGluIGl0OgogICAgICoKICAgICAqIGBgYGh0bWwKICAgICAqIDxkaXY+cHJlZml4e3t2MH19LXt7djF9fS17e3YyfX0te3t2M319LXt7djR9fS17e3Y1fX1zdWZmaXg8L2Rpdj4KICAgICAqIGBgYAogICAgICoKICAgICAqIEl0cyBjb21waWxlZCByZXByZXNlbnRhdGlvbiBpczoKICAgICAqCiAgICAgKiBgYGB0cwogICAgICogybXJtXRleHRJbnRlcnBvbGF0ZTYoCiAgICAgKiAgICAncHJlZml4JywgdjAsICctJywgdjEsICctJywgdjIsICctJywgdjMsICctJywgdjQsICctJywgdjUsICdzdWZmaXgnKTsKICAgICAqIGBgYAogICAgICoKICAgICAqIEBzZWUgdGV4dEludGVycG9sYXRlVgogICAgICogXEBjb2RlR2VuQXBpCiAgICAgKiBAcGFyYW0gez99IHByZWZpeAogICAgICogQHBhcmFtIHs/fSB2MAogICAgICogQHBhcmFtIHs/fSBpMAogICAgICogQHBhcmFtIHs/fSB2MQogICAgICogQHBhcmFtIHs/fSBpMQogICAgICogQHBhcmFtIHs/fSB2MgogICAgICogQHBhcmFtIHs/fSBpMgogICAgICogQHBhcmFtIHs/fSB2MwogICAgICogQHBhcmFtIHs/fSBpMwogIC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yBpbnRlcnBvbGF0ZWQgdmFsdWVzIGluIGl0OgogICAgICoKICAgICAqIGBgYGh0bWwKICAgICAqIDxkaXY+cHJlZml4e3t2MH19LXt7djF9fS17e3YyfX0te3t2M319LXt7djR9fS17e3Y1fX0te3t2Nn19c3VmZml4PC9kaXY+CiAgICAgKiBgYGAKICAgICAqCiAgICAgKiBJdHMgY29tcGlsZWQgcmVwcmVzZW50YXRpb24gaXM6CiAgICAgKgogICAgICogYGBgdHMKICAgICAqIMm1ybV0ZXh0SW50ZXJwb2xhdGU3KAogICAgICogICAgJ3ByZWZpeCcsIHYwLCAnLScsIHYxLCAnLScsIHYyLCAnLScsIHYzLCAnLScsIHY0LCAnLScsIHY1LCAnLScsIHY2LCAnc3VmZml4Jyk7CiAgICAgKiBgYGAKICAgICAqIEBzZWUgdGV4dEludGVycG9sYXRlVgogICAgICogXEBjb2RlR2VuQXBpCiAgICAgKiBAcGFyYW0gez99IHByZWZpeAogICAgICogQHBhcmFtIHs/fSB2MAogICAgICogQHBhcmFtIHs/fSBpMAogICAgICogQHBhcmFtIHs/fSB2MQogICAgICogQHBhcmFtIHs/fSBpMQogICAgICogQHBhcmFtIHs/fSB2MgogICAgICogQHBhcmFtIHs/fSBpMgogICAgICogQHBhcmFtIHs/fSB2MwogICAgICogQHBhcmFtIHs/fSBpMwogICAgICogQHBhcmFtIHs/fSB2NAogICAgICogQHBhcmFtIHs/fSBpNAogICAgICogQHBhcmFtIHs/fSB2NQogICAgICogQHBhcmFtIHs/fSBpNQogICAgICogQHBhcmFtIHs/fSB2NgogICAgICogQHBhcmFtIHs/fSBzdWZmaXgKICAgICAqIEByZXR1cm4gez99IGl0c2VsZiwgc28gdGhhdCBpdCBtYXkgYmUgY2hhaW5lZC4KICAgICAqLwogICAgZnVuY3Rpb24gybXJtXRleHRJbnRlcnBvbGF0ZTcocHJlZml4LCB2MCwgaTAsIHYxLCBpMSwgdjIsIGkyLCB2MywgaTMsIHY0LCBpNCwgdjUsIGk1LCB2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LCAnLScsIHY1LCAnLScsIHY2LCAnLScsIHY3LCAnc3VmZml4Jyk7CiAgICAgKiBgYGAKICAgICAqIEBzZWUgdGV4dEludGVycG9sYXRlVgogICAgICogXEBjb2RlR2VuQXBpCiAgICAgKiBAcGFyYW0gez99IHByZWZpeAogICAgICogQHBhcmFtIHs/fSB2MAogICAgICogQHBhcmFtIHs/fSBpMAogICAgICogQHBhcmFtIHs/fSB2MQogICAgICogQHBhcmFtIHs/fSBpMQogICAgICogQHBhcmFtIHs/fSB2MgogICAgICogQHBhcmFtIHs/fSBpMgogICAgICogQHBhcmFtIHs/fSB2MwogICAgICogQHBhcmFtIHs/fSBpMwogICAgICogQHBhcmFtIHs/fSB2NAogICAgICogQHBhcmFtIHs/fSBpNAogICAgICogQHBhcmFtIHs/fSB2NQogICAgICogQHBhcmFtIHs/fSBpNQogICAgICogQHBhcmFtIHs/fSB2NgogICAgICogQHBhcmFtIHs/fSBpNgogICAgICogQHBhcmFtIHs/fSB2NwogICAgICogQHBhcmFtIHs/fSBzdWZmaXgKICAgICAqIEByZXR1cm4gez99IGl0c2VsZiwgc28gdGhhdCBpdCBtYXkgYmUgY2hhaW5lZC4KICAgICAqLwogICAgZnVuY3Rpb24gybXJtXRleHRJbnRlcnBvbGF0ZTgocHJlZml4LCB2MCwgaTAsIHYxLCBpMSwgdjIsIGkyLCB2MywgaTMsIHY0LCBpNCwgdjUsIGk1LCB2NiwgaTYsIHY3LCBzdWZmaXgpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgbFZpZXcgPSBnZXRMVmlldygpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBpbnRlcnBvbGF0ZWQgPSBpbnRlcnBvbGF0aW9uOChsVmlldywgcHJlZml4LCB2MCwgaTAsIHYxLCBpMSwgdjIsIGkyLCB2MywgaTMsIHY0LCBpNCwgdjUsIGk1LCB2NiwgaTYsIHY3LCBzdWZmaXgpOwogICAgICAgIGlmIChpbnRlcnBvbGF0ZWQgIT09IE5PX0NIQU5HRSkgewogICAgICAgICAgICB0ZXh0QmluZGluZ0ludGVybmFsKGxWaWV3LCBnZXRTZWxlY3RlZEluZGV4KCksICgvKiogQHR5cGUgez99ICovIChpbnRlcnBvbGF0ZWQpKSk7CiAgICAgICAgfQogICAgICAgIHJldHVybiDJtcm1dGV4dEludGVycG9sYXRlODsKICAgIH0KICAgIC8qKgogICAgICogVXBkYXRlIHRleHQgY29udGVudCB3aXRoIDkgb3IgbW9yZSBib3VuZCB2YWx1ZXMgb3RoZXIgc3Vycm91bmRlZCBieSB0ZXh0LgogICAgICoKICAgICAqIFVzZWQgd2hlbiB0aGUgbnVtYmVyIG9mIGludGVycG9sYXRlZCB2YWx1ZXMgZXhjZWVkcyA4LgogICAgICoKICAgICAqIGBgYGh0bWwKICAgICAqIDxkaXY+cHJlZml4e3t2MH19LXt7djF9fS17e3YyfX0te3t2M319LXt7djR9fS17e3Y1fX0te3t2Nn19LXt7djd9fS17e3Y4fX0te3t2OX19c3VmZml4PC9kaXY+CiAgICAgKiBgYGAKICAgICAqCiAgICAgKiBJdHMgY29tcGlsZWQgcmVwcmVzZW50YXRpb24gaXM6CiAgICAgKgogICAgICogYGBgdHMKICAgICAqIMm1ybV0ZXh0SW50ZXJwb2xhdGVWKAogICAgICogIFsncHJlZml4JywgdjAsICctJywgdjEsICctJywgdjIsICctJywgdjMsICctJywgdjQsICctJywgdjUsICctJywgdjYsICctJywgdjcsICctJywgdjksCiAgICAgKiAgJ3N1ZmZpeCddKTsKICAgICAqIGBgYAogICAgICogLgogICAgICogXEBjb2RlR2VuQXBpCiAgICAgKiBAcGFyYW0gez99IHZhbHVlcyBUaGUgY29sbGVjdGlvbiBvZiB2YWx1ZXMgYW5kIHRoZSBzdHJpbmdzIGluIGJldHdlZW4gdGhvc2UgdmFsdWVzLCBiZWdpbm5pbmcgd2l0aAogICAgICogYSBzdHJpbmcgcHJlZml4IGFuZCBlbmRpbmcgd2l0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CkgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBsVmlldyA9IGdldExWaWV3KCk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGludGVycG9sYXRlZFZhbHVlID0gaW50ZXJwb2xhdGlvbjUobFZpZXcsIHByZWZpeCwgdjAsIGkwLCB2MSwgaTEsIHYyLCBpMiwgdjMsIGkzLCB2NCwgc3VmZml4KTsKICAgICAgICDJtcm1c3R5bGVNYXAoaW50ZXJwb2xhdGVkVmFsdWUpOwogICAgfQogICAgLyoqCiAgICAgKgogICAgICogVXBkYXRlIGFuIGludGVycG9sYXRlZCBzdHlsZSBvbiBhbiBlbGVtZW50IHdpdGggNiBib3VuZCB2YWx1ZXMgc3Vycm91bmRlZCBieSB0ZXh0LgogICAgICoKICAgICAqIFVzZWQgd2hlbiB0aGUgdmFsdWUgcGFzc2VkIHRvIGEgcHJvcGVydHkgaGFzIDYgaW50ZXJwb2xhdGVkIHZhbHVlcyBpbiBpdDoKICAgICAqCiAgICAgKiBgYGBodG1sCiAgICAgKiA8ZGl2IHN0eWxlPSJrZXk6IHt7djB9fTsga2V5MToge3t2MX19OyBrZXkyOiB7e3YyfX07IGtleTM6IHt7djN9fTsga2V5NDoge3t2NH19OwogICAgICogICAgICAgICAgICAga2V5NToge3t2NX19c3VmZml4Ij48L2Rpdj4KICAgICAqIGBgYAogICAgICoKICAgICAqIEl0cyBjb21waWxlZCByZXByZXNlbnRhdGlvbiBpczoKICAgICAqCiAgICAgKiBgYGB0cwogICAgICogybXJtXN0eWxlTWFwSW50ZXJwb2xhdGU2KAogICAgICogICAgJ2tleTogJywgdjAsICc7IGtleTE6ICcsIHYxLCAnOyBrZXkyOiAnLCB2MiwgJzsga2V5MzogJywgdjMsICc7IGtleTQ6ICcsIHY0LCAnOyBrZXk1OiAnLCB2NSwKICAgICAqICAgICdzdWZmaXgnKTsKICAgICAqIGBgYAogICAgICoKICAgICAqIFxAY29kZ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eCwgdjAsIHN1ZmZpeCwgdmFsdWVTdWZmaXgpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgbFZpZXcgPSBnZXRMVmlldygpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBpbnRlcnBvbGF0ZWRWYWx1ZSA9IGludGVycG9sYXRpb24xKGxWaWV3LCBwcmVmaXgsIHYwLCBzdWZmaXgpOwogICAgICAgIGNoZWNrU3R5bGluZ1Byb3BlcnR5KHByb3AsIGludGVycG9sYXRlZFZhbHVlLCB2YWx1ZVN1ZmZpeCwgZmFsc2UpOwogICAgICAgIHJldHVybiDJtcm1c3R5bGVQcm9wSW50ZXJwb2xhdGUxOwogICAgfQogICAgLyoqCiAgICAgKgogICAgICogVXBkYXRlIGFuIGludGVycG9sYXRlZCBzdHlsZSBwcm9wZXJ0eSBvbiBhbiBlbGVtZW50IHdpdGggMiBib3VuZCB2YWx1ZXMgc3Vycm91bmRlZCBieSB0ZXh0LgogICAgICoKICAgICAqIFVzZWQgd2hlbiB0aGUgdmFsdWUgcGFzc2VkIHRvIGEgcHJvcGVydHkgaGFzIDIgaW50ZXJwb2xhdGVkIHZhbHVlcyBpbiBpdDoKICAgICAqCiAgICAgKiBgYGBodG1sCiAgICAgKiA8ZGl2IHN0eWxlLmNvbG9yPSJwcmVmaXh7e3YwfX0te3t2MX19c3VmZml4Ij48L2Rpdj4KICAgICAqIGBgYAogICAgICoKICAgICAqIEl0cyBjb21waWxlZCByZXByZXNlbnRhdGlvbiBpczoKICAgICAqCiAgICAgKiBgYGB0cwogICAgICogybXJtXN0eWxlUHJvcEludGVycG9sYXRlMigwLCAncHJlZml4JywgdjAsICctJywgdjEsICdzdWZmaXgnKTsKICAgICAqIGBgYAogICAgICoKICAgICAqIFxAY29kZUdlbkFwaQogICAgICogQHBhcmFtIHs/fSBwcm9wCiAgICAgKiBAcGFyYW0gez99IHByZWZpeCBTdGF0aWMgdmFsdWUgdXNl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J0eSBoYXMgNiBpbnRlcnBvbGF0ZWQgdmFsdWVzIGluIGl0OgogICAgICoKICAgICAqIGBgYGh0bWwKICAgICAqIDxkaXYgc3R5bGUuY29sb3I9InByZWZpeHt7djB9fS17e3YxfX0te3t2Mn19LXt7djN9fS17e3Y0fX0te3t2NX19c3VmZml4Ij48L2Rpdj4KICAgICAqIGBgYAogICAgICoKICAgICAqIEl0cyBjb21waWxlZCByZXByZXNlbnRhdGlvbiBpczoKICAgICAqCiAgICAgKiBgYGB0cwogICAgICogybXJtXN0eWxlUHJvcEludGVycG9sYXRlNigwLCAncHJlZml4JywgdjAsICctJywgdjEsICctJywgdjIsICctJywgdjMsICctJywgdjQsICctJywgdjUsICdzdWZmaXgnKTsKICAgICAqIGBgYAogICAgICoKICAgICAqIFxAY29kZUdlbkFwaQogICAgICogQHBhcmFtIHs/fSBwcm9wCiAgICAgKiBAcGFyYW0gez99IHByZWZpeCBTdGF0aWMgdmFsdWUgdXNlZCBmb3IgY29uY2F0ZW5hdGlvbiBvbmx5LgogICAgICogQHBhcmFtIHs/fSB2MCBWYWx1ZSBjaGVja2VkIGZvciBjaGFuZ2UuCiAgICAgKiBAcGFyYW0gez99IGkwIFN0YXRpYyB2YWx1ZSB1c2VkIGZvciBjb25jYXRlbmF0aW9uIG9ubHkuCiAgICAgKiBAcGFyYW0gez99IHYxIFZhbHVlIGNoZWNrZWQgZm9yIGNoYW5nZS4KICAgICAqIEBwYXJhbSB7P30gaTEgU3RhdGljIHZhbHVlIHVzZWQgZm9yIGNvbmNhdGVuYXRpb24gb25seS4KICAgICAqIEBwYXJhbSB7P30gdjIgVmFsdWUgY2hlY2tlZCBmb3IgY2hhbmdlLgogICAgICogQHBhcmFtIHs/fSBpMiBTdGF0aWMgdmFsdWUgdXNlZCBmb3IgY29uY2F0ZW5hdGlvbiBvbmx5LgogICAgICogQHBhcmFtIHs/fSB2MyBWYWx1ZSBjaGVja2VkIGZvciBjaGFuZ2UuCiAgICAgKiBAcGFyYW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iBAcGFyYW0gez89fSBzYW5pdGl6ZXIgQW4gb3B0aW9uYWwgZnVuY3Rpb24gdXNlZCB0byBzYW5pdGl6ZSB0aGUgdmFsdWUuCiAgICAgKgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gybXJtXVwZGF0ZVN5bnRoZXRpY0hvc3RCaW5kaW5nKHByb3BOYW1lLCB2YWx1ZSwgc2FuaXRpemVyKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGxWaWV3ID0gZ2V0TFZpZXcoKTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgYmluZGluZ0luZGV4ID0gbmV4dEJpbmRpbmdJbmRleCgpOwogICAgICAgIGlmIChiaW5kaW5nVXBkYXRlZChsVmlldywgYmluZGluZ0luZGV4LCB2YWx1ZSkpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB0VmlldyA9IGdldFRWaWV3KCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdE5vZGUgPSBnZXRTZWxlY3RlZFROb2RlKCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgY3VycmVudERlZiA9IGdldEN1cnJlbnREaXJlY3RpdmVEZWYodFZpZXcuZGF0YSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcmVuZGVyZXIgPSBsb2FkQ29tcG9uZW50UmVuZGVyZXIoY3VycmVudERlZiwgdE5vZGUsIGxWaWV3KTsKICAgICAgICAgICAgZWxlbWVudFByb3BlcnR5SW50ZXJuYWwodFZpZXcsIHROb2RlLCBsVmlldywgcHJvcE5hbWUsIHZhbHVlLCByZW5kZXJlciwgc2FuaXRpemVyLCB0cnVlKTsKICAgICAgICAgICAgbmdEZXZNb2RlICYmIHN0b3Jl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IGZ1bmN0aW9uIGdldENvbnRleHQoZWxlbWVudCkgewogICAgICAgIGFzc2VydERvbUVsZW1lbnQoZWxlbWVudCk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGNvbnRleHQgPSBsb2FkTENvbnRleHQoZWxlbWVudCwgZmFsc2UpOwogICAgICAgIHJldHVybiBjb250ZXh0ID09PSBudWxsID8gbnVsbCA6ICgvKiogQHR5cGUgez99ICovIChjb250ZXh0LmxWaWV3W0NPTlRFWFRdKSk7CiAgICB9CiAgICAvKioKICAgICAqIFJldHJpZXZlcyB0aGUgY29tcG9uZW50IGluc3RhbmNlIHdob3NlIHZpZXcgY29udGFpbnMgdGhlIERPTSBlbGVtZW50LgogICAgICoKICAgICAqIEZvciBleGFtcGxlLCBpZiBgPGNoaWxkLWNvbXA+YCBpcyB1c2VkIGluIHRoZSB0ZW1wbGF0ZSBvZiBgPGFwcC1jb21wPmAKICAgICAqIChpLmUuIGEgYFZpZXdDaGlsZGAgb2YgYDxhcHAtY29tcD5gKSwgY2FsbGluZyBgZ2V0T3duaW5nQ29tcG9uZW50YCBvbiBgPGNoaWxkLWNvbXA+YAogICAgICogd291bGQgcmV0dXJuIGA8YXBwLWNvbXA+YC4KICAgICAqCiAgICAgKiBcQHB1YmxpY0FwaQogICAgICogXEBnbG9iYWxBcGkgbmcKICAgICAqIEB0ZW1wbGF0ZSBUCiAgICAgKiBAcGFyYW0gez99IGVsZW1lbnRPckRpciBET00gZWxlbWVudCwgY29tcG9uZW50IG9yIGRpcmVjdGl2ZSBpbnN0YW5jZQogICAgICogICAgZm9yIHdoaWNoIHRvIHJldHJpZXZlIHRoZSByb290IGNvbXBvbmVudHMuCiAgICAgKiBAcmV0dXJuIHs/fSBDb21wb25lbnQgaW5zdGFuY2Ugd2hvc2UgdmlldyBvd25zIHRoZSBET00gZWxlbWVudCBvciBudWxsIGlmIHRoZSBlbGVtZW50IGlzIG5vdAogICAgICogICAgcGFydCBvZiBhIGNvbXBvbmVudCB2aWV3LgogICAgICoKICAgICAqLwogICAgZnVuY3Rpb24gZ2V0T3duaW5nQ29tcG9uZW50KGVsZW1lbnRPckRpcikgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBjb250ZXh0ID0gbG9hZExDb250ZXh0KGVsZW1lbnRPckRpciwgZmFsc2UpOwogICAgICAgIGlmIChjb250ZXh0ID09PSBudWxsKQogICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IGxWaWV3ID0gY29udGV4dC5sVmlldzsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IHBhcmVudDsKICAgICAgICBuZ0Rldk1vZGUgJiYgYXNzZXJ0TFZpZXcobFZpZXcpOwogICAgICAgIHdoaWxlIChsVmlld1tIT1NUXSA9PT0gbnVsbCAmJiAocGFyZW50ID0gKC8qKiBAdHlwZSB7P30gKi8gKGdldExWaWV3UGFyZW50KGxWaWV3KSkpKSkgewogICAgICAgICAgICAvLyBBcyBsb25nIGFzIGxWaWV3W0hPU1RdIGlzIG51bGwgd2Uga25vdyB3ZSBhcmUgcGFydCBvZiBzdWItdGVtcGxhdGUgc3VjaCBhcyBgKm5nSWZgCiAgICAgICAgICAgIGxWaWV3ID0gcGFyZW50OwogICAgICAgIH0KICAgICAgICByZXR1cm4gbFZpZXdbRkxBR1NdICYgNTEyIC8qIElzUm9vdCAqLyA/IG51bGwgOiAoLyoqIEB0eXBlIHs/fSAqLyAobFZpZXdbQ09OVEVYVF0pKTsKICAgIH0KICAgIC8qKgogICAgICogUmV0cmlldmVzIGFsbCByb290IGNvbXBvbmVudHMgYXNzb2NpYXRlZCB3aXRoIGEgRE9NIGVsZW1lbnQsIGRpcmVjdGl2ZSBvciBjb21wb25lbnQgaW5zdGFuY2UuCiAgICAgKiBSb290IGNvbXBvbmVudHMgYXJlIHRob3NlIHdoaWNoIGhhdmUgYmVlbiBib290c3RyYXBwZWQgYnkgQW5ndWxhci4KICAgICAqCiAgICAgKiBcQHB1YmxpY0FwaQogICAgICogXEBnbG9iYWxBcGkgbmcKICAgICAqIEBwYXJhbSB7P30gZWxlbWVudE9yRGlyIERPTSBlbGVtZW50LCBjb21wb25lbnQgb3IgZGlyZWN0aXZlIGluc3RhbmNlCiAgICAgKiAgICBmb3Igd2hpY2ggdG8gcmV0cmlldmUgdGhlIHJvb3QgY29tcG9uZW50cy4KICAgICAqIEByZXR1cm4gez99IFJvb3QgY29tcG9uZW50cyBhc3NvY2lhdGVkIHdpdGggdGhlIHRhcmdldCBvYmplY3QuCiAgICAgKgogICAgICovCiAgICBmdW5jdGlvbiBnZXRSb290Q29tcG9uZW50cyhlbGVtZW50T3JEaXIpIHsKICAgICAgICByZXR1cm4gWy4uLmdldFJvb3RDb250ZXh0KGVsZW1lbnRPckRpcikuY29tcG9uZW50c107CiAgICB9CiAgICAvKioKICAgICAqIFJldHJpZXZlcyBhbiBgSW5qZWN0b3JgIGFzc29jaWF0ZWQgd2l0aCBhbiBlbGVtZW50LCBjb21wb25lbnQgb3IgZGlyZWN0aXZlIGluc3RhbmNlLgogICAgICoKICAgICAqIFxAcHVibGljQXBpCiAgICAgKiBcQGdsb2JhbEFwaSBuZwogICAgICogQHBhcmFtIHs/fSBlbGVtZW50T3JEaXIgRE9NIGVsZW1lbnQsIGNvbXBvbmVudCBvciBkaXJlY3RpdmUgaW5zdGFuY2UgZm9yIHdoaWNoIHRvCiAgICAgKiAgICByZXRyaWV2ZSB0aGUgaW5qZWN0b3IuCiAgICAgKiBAcmV0dXJuIHs/fSBJbmplY3RvciBhc3NvY2lhdGVkIHdpdGggdGhlIGVsZW1lbnQsIGNvbXBvbmVudCBvciBkaXJlY3RpdmUgaW5zdGFuY2UuCiAgICAgKgogICAgICovCiAgICBmdW5jdGlvbiBnZXRJbmplY3RvcihlbGVtZW50T3JEaXIpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY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bmQKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGxvYWRMQ29udGV4dCh0YXJnZXQsIHRocm93T25Ob3RGb3VuZCA9IHRydWUpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgY29udGV4dCA9IGdldExDb250ZXh0KHRhcmdldCk7CiAgICAgICAgaWYgKCFjb250ZXh0ICYmIHRocm93T25Ob3RGb3VuZCkgewogICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IobmdEZXZNb2RlID8gYFVuYWJsZSB0byBmaW5kIGNvbnRleHQgYXNzb2NpYXRlZCB3aXRoICR7c3RyaW5naWZ5Rm9yRXJyb3IodGFyZ2V0KX1gIDoKICAgICAgICAgICAgICAgICdJbnZhbGlkIG5nIHRhcmdldCcpOwogICAgICAgIH0KICAgICAgICByZXR1cm4gY29udGV4dDsKICAgIH0KICAgIC8qKgogICAgICogUmV0cmlldmVzIHRoZSBob3N0IGVsZW1lbnQgb2YgYSBjb21wb25lbnQgb3IgZGlyZWN0aXZlIGluc3RhbmNlLgogICAgICogVGhlIGhvc3QgZWxlbWVudCBpcyB0aGUgRE9NIGVsZW1lbnQgdGhhdCBtYXRjaGVkIHRoZSBzZWxlY3RvciBvZiB0aGUgZGlyZWN0aXZlLgogICAgICoKICAgICAqIFxAcHVibGljQXBpCiAgICAgKiBcQGdsb2JhbEFwaSBuZwogICAgICogQHBhcmFtIHs/fSBjb21wb25lbnRPckRpcmVjdGl2ZSBDb21wb25lbnQgb3IgZGlyZWN0aXZlIGluc3RhbmNlIGZvciB3aGljaCB0aGUgaG9zdAogICAgICogICAgIGVsZW1lbnQgc2hvdWxkIGJlIHJldHJpZXZlZC4KICAgICAqIEByZXR1cm4gez99IEhvc3QgZWxlbWVudCBvZiB0aGUgdGFyZ2V0LgogICAgICoKICAgICAqLwogICAgZnVuY3Rpb24gZ2V0SG9zdEVsZW1lbnQoY29tcG9uZW50T3JEaXJlY3RpdmUpIHsKICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKCgvKiogQHR5cGUgez99ICovICgoLyoqIEB0eXBlIHs/fSAqLyAoZ2V0TENvbnRleHQoY29tcG9uZW50T3JEaXJlY3RpdmUpKSkubmF0aXZlKSkpKTsKICAgIH0KICAgIC8qKgogICAgICogUmV0cmlldmVzIGEgbGlzdCBvZiBldmVudCBsaXN0ZW5lcnMgYXNzb2NpYXRlZCB3aXRoIGEgRE9NIGVsZW1lbnQuIFRoZSBsaXN0IGRvZXMgaW5jbHVkZSBob3N0CiAgICAgKiBsaXN0ZW5lcnMsIGJ1dCBpdCBkb2VzIG5vdCBpbmNsdWRlIGV2ZW50IGxpc3RlbmVycyBkZWZpbmVkIG91dHNpZGUgb2YgdGhlIEFuZ3VsYXIgY29udGV4dAogICAgICogKGUuZy4gdGhyb3VnaCBgYWRkRXZlbnRMaXN0ZW5lcmApLgogICAgICoKICAgICAqIFxAdXNhZ2VOb3RlcwogICAgICogR2l2ZW4gdGhlIGZvbGxvd2luZyBET00gc3RydWN0dXJlOgogICAgICogYGBgCiAgICAgKiA8bXktYXBwPgogICAgICogICA8ZGl2IChjbGljayk9ImRvU29tZXRoaW5nKCkiPjwvZGl2PgogICAgICogPC9teS1hcHA+CiAgICAgKgogICAgICogYGBgCiAgICAgKiBDYWxsaW5nIGBnZXRMaXN0ZW5lcnNgIG9uIGA8ZGl2PmAgd2lsbCByZXR1cm4gYW4gb2JqZWN0IHRoYXQgbG9va3MgYXMgZm9sbG93czoKICAgICAqIGBgYAogICAgICogewogICAgICogICBuYW1lOiAnY2xpY2snLAogICAgICogICBlbGVtZW50OiA8ZGl2PiwKICAgICAqICAgY2FsbGJhY2s6ICgpID0+IGRvU29tZXRoaW5nKCksCiAgICAgKiAgIHVzZUNhcHR1cmU6IGZhbHNlCiAgICAgKiB9CiAgICAgKiBgYGAKICAgICAqCiAgICAgKiBcQHB1YmxpY0FwaQogICAgICogXEBnbG9iYWxBcGkgbmcKICAgICAqIEBwYXJhbSB7P30gZWxlbWVudCBFbGVtZW50IGZvciB3aGljaCB0aGUgRE9NIGxpc3RlbmVycyBzaG91bGQgYmUgcmV0cmlldmVkLgogICAgICogQHJldHVybiB7P30gQXJyYXkgb2YgZXZlbnQgbGlzdGVuZXJzIG9uIHRoZSBET00gZWxlbWVudC4KICAgICAqCiAgICAgKi8KICAgIGZ1bmN0aW9uIGdldExpc3RlbmVycyhlbGVtZW50KSB7CiAgICAgICAgYXNzZXJ0RG9tRWxlbWVudChlbGVtZW50KTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgbENvbnRleHQgPSBsb2FkTENvbnRleHQoZWxlbWVudCwgZmFsc2UpOwogICAgICAgIGlmIChsQ29udGV4dCA9PT0gbnVsbCkKICAgICAgICAgICAgcmV0dXJuIFtdOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBsVmlldyA9IGxDb250ZXh0LmxWaWV3OwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCB0VmlldyA9IGxWaWV3W1RWSUVXXTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgbENsZWFudXAgPSBsVmlld1tDTEVBTlVQXTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgdENsZWFudXAgPSB0Vmlldy5jbGVhbnVwOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBsaXN0ZW5lcnMgPSBbXTsKICAgICAgICBpZiAodENsZWFudXAgJiYgbENsZWFudXApIHsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB0Q2xlYW51cC5sZW5ndGg7KSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBmaXJzdFBhcmFtID0gdENsZWFudXBbaSsrXTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHNlY29uZFBhcmFtID0gdENsZWFudXBbaSsrXTsKICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgZmlyc3RQYXJhbSA9PT0gJ3N0cmluZycpIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgbmFtZSA9IGZpcnN0UGFyYW07CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGxpc3RlbmVyRWxlbWVudCA9ICgvKiogQHR5cGUgez99ICovICgoLyoqIEB0eXBlIHs/fSAqLyAodW53cmFwUk5vZGUobFZpZXdbc2Vjb25kUGFyYW1dKSkpKSk7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGNhbGxiYWNrID0gbENsZWFudXBbdENsZWFudXBbaSsrXV07CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHVzZUNhcHR1cmVPckluZHggPSB0Q2xlYW51cFtpKytdOwogICAgICAgICAgICAgICAgICAgIC8vIGlmIHVzZUNhcHR1cmVPckluZHggaXMgYm9vbGVhbiB0aGVuIHJlcG9ydCBpdCBhcyBpcy4KICAgICAgICAgICAgICAgICAgICAvLyBpZiB1c2VDYXB0dXJlT3JJbmR4IGlzIHBvc2l0aXZlIG51bWJlciB0aGVuIGl0IGluIHVuc3Vic2NyaWJlIG1ldGhvZAogICAgICAgICAgICAgICAgICAgIC8vIGlmIHVzZUNhcHR1cmVPckluZHggaXMgbmVnYXRpdmUgbnVtYmVyIHRoZW4gaXQgaXMgYSBTdWJzY3JpcHRpb24KICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgdHlwZSA9ICh0eXBlb2YgdXNlQ2FwdHVyZU9ySW5keCA9PT0gJ2Jvb2xlYW4nIHx8IHVzZUNhcHR1cmVPckluZHggPj0gMCkgPyAnZG9tJyA6ICdvdXRwdXQnOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCB1c2VDYXB0dXJlID0gdHlwZW9mIHVzZUNhcHR1cmVPckluZHggPT09ICdib29sZWFuJyA/IHVzZUNhcHR1cmVPckluZHggOiBmYWxzZTsKICAgICAgICAgICAgICAgICAgICBpZiAoZWxlbWVudCA9PSBsaXN0ZW5lckVsZW1lbnQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgbGlzdGVuZXJzLnB1c2goeyBlbGVtZW50LCBuYW1lLCBjYWxsYmFjaywgdXNlQ2FwdHVyZSwgdHlwZSB9KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgbGlzdGVuZXJzLnNvcnQoc29ydExpc3RlbmVycyk7CiAgICAgICAgcmV0dXJuIGxpc3RlbmVyczsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBhCiAgICAgKiBAcGFyYW0gez99IGIKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHNvcnRMaXN0ZW5lcnMoYSwgYikgewogICAgICAgIGlmIChhLm5hbWUgPT0gYi5uYW1lKQogICAgICAgICAgICByZXR1cm4gMDsKICAgICAgICByZXR1cm4gYS5uYW1lIDwgYi5uYW1lID8gLTEgOiAxOwogICAgfQogICAgLyoqCiAgICAgKiBBc3NlcnRzIHRoYXQgYSB2YWx1ZSBpcyBhIERPTSBFbGVtZW50LgogICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gYXNzZXJ0RG9tRWxlbWVudCh2YWx1ZSkgewogICAgICAgIGlmICh0e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G5vdCBkZWZpbmVkJyk7CiAgICAgICAgICAgIGlmICh3KSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBsZXQgY29udGFpbmVyID0gd1tHTE9CQUxfUFVCTElTSF9FWFBBTkRPX0tFWV07CiAgICAgICAgICAgICAgICBpZiAoIWNvbnRhaW5lcikgewogICAgICAgICAgICAgICAgICAgIGNvbnRhaW5lciA9IHdbR0xPQkFMX1BVQkxJU0hfRVhQQU5ET19LRVldID0ge307CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjb250YWluZXJbbmFtZV0gPSBmbjsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQ3JlYXRlcyB0aGUgcm9vdCBjb21wb25lbnQgdmlldyBhbmQgdGhlIHJvb3QgY29tcG9uZW50IG5vZGUuCiAgICAgKgogICAgICogQHBhcmFtIHs/fSByTm9kZSBSZW5kZXIgaG9zdCBlbGVtZW50LgogICAgICogQHBhcmFtIHs/fSBkZWYgQ29tcG9uZW50RGVmCiAgICAgKiBAcGFyYW0gez99IHJvb3RWaWV3IFRoZSBwYXJlbnQgdmlldyB3aGVyZSB0aGUgaG9zdCBub2RlIGlzIHN0b3JlZAogICAgICogQHBhcmFtIHs/fSByZW5kZXJlckZhY3RvcnkKICAgICAqIEBwYXJhbSB7P30gaG9zdFJlbmRlcmVyIFRoZSBjdXJyZW50IHJlbmRlcmVyCiAgICAgKiBAcGFyYW0gez89fSBzYW5pdGl6ZXIgVGhlIHNhbml0aXplciwgaWYgcHJvdmlkZWQKICAgICAqCiAgICAgKiBAcmV0dXJuIHs/fSBDb21wb25lbnQgdmlldyBjcmVhdGVkCiAgICAgKi8KICAgIGZ1bmN0aW9uIGNyZWF0ZVJvb3RDb21wb25lbnRWaWV3KHJOb2RlLCBkZWYsIHJvb3RWaWV3LCByZW5kZXJlckZhY3RvcnksIGhvc3RSZW5kZXJlciwgc2FuaXRpemVyKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHRWaWV3ID0gcm9vdFZpZXdbVFZJRVddOwogICAgICAgIG5nRGV2TW9kZSAmJiBhc3NlcnREYXRhSW5SYW5nZShyb290VmlldywgMCArIEhFQURFUl9PRkZTRVQpOwogICAgICAgIHJvb3RWaWV3WzAgKyBIRUFERVJfT0ZGU0VUXSA9IHJOb2RlOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCB0Tm9kZSA9IGdldE9yQ3JlYXRlVE5vZGUodFZpZXcsIG51bGwsIDAsIDMgLyogRWxlbWVudCAqLywgbnVsbCwgbnVsbCk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IG1lcmdlZEF0dHJzID0gdE5vZGUubWVyZ2VkQXR0cnMgPSBkZWYuaG9zdEF0dHJzOwogICAgICAgIGlmIChtZXJnZWRBdHRycyAhPT0gbnVsbCkgewogICAgICAgICAgICBjb21wdXRlU3RhdGljU3R5bGluZyh0Tm9kZSwgbWVyZ2VkQXR0cnMsIHRydWUpOwogICAgICAgICAgICBpZiAock5vZGUgIT09IG51bGwpIHsKICAgICAgICAgICAgICAgIHNldFVwQXR0cmlidXRlcyhob3N0UmVuZGVyZXIsIHJOb2RlLCBtZXJnZWRBdHRycyk7CiAgICAgICAgICAgICAgICBpZiAodE5vZGUuY2xhc3NlcyAhPT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIHdyaXRlRGlyZWN0Q2xhc3MoaG9zdFJlbmRlcmVyLCByTm9kZSwgdE5vZGUuY2xhc3Nlcyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAodE5vZGUuc3R5bGVzICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgd3JpdGVEaXJlY3RTdHlsZShob3N0UmVuZGVyZXIsIHJOb2RlLCB0Tm9kZS5zdHlsZXMpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCB2aWV3UmVuZGVyZXIgPSByZW5kZXJlckZhY3RvcnkuY3JlYXRlUmVuZGVyZXIock5vZGUsIGRlZik7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGNvbXBvbmVudFZpZXcgPSBjcmVhdGVMVmlldyhyb290VmlldywgZ2V0T3JDcmVhdGVUQ29tcG9uZW50VmlldyhkZWYpLCBudWxsLCBkZWYub25QdXNoID8gNjQgLyogRGlydHkgKi8gOiAxNiAvKiBDaGVja0Fsd2F5cyAqLywgcm9vdFZpZXdbSEVBREVSX09GRlNFVF0sIHROb2RlLCByZW5kZXJlckZhY3RvcnksIHZpZXdSZW5kZXJlciwgc2FuaXRpemVyKTsKICAgICAgICBpZiAodFZpZXcuZmlyc3RDcmVhdGVQYXNzKSB7CiAgICAgICAgICAgIGRpUHVibGljSW5JbmplY3RvcihnZXRPckNyZWF0ZU5vZGVJbmplY3RvckZvck5vZGUodE5vZGUsIHJvb3RWaWV3KSwgdFZpZXcsIGRlZi50eXBlKTsKICAgICAgICAgICAgbWFya0FzQ29tcG9uZW50SG9zdCh0VmlldywgdE5vZGUpOwogICAgICAgICAgICBpbml0VE5vZGVGbGFncyh0Tm9kZSwgcm9vdFZpZXcubGVuZ3RoLCAxKTsKICAgICAgICB9CiAgICAgICAgYWRkVG9WaWV3VHJlZShyb290VmlldywgY29tcG9uZW50Vmlldyk7CiAgICAgICAgLy8gU3RvcmUgY29tcG9uZW50IHZpZXcgYXQgbm9kZSBpbmRleCwgd2l0aCBub2RlIGFzIHRoZSBIT1NUCiAgICAgICAgcmV0dXJuIHJvb3RWaWV3W0hFQURFUl9PRkZTRVRdID0gY29tcG9uZW50VmlldzsKICAgIH0KICAgIC8qKgogICAgICogQ3JlYXRlcyBhIHJvb3QgY29tcG9uZW50IGFuZCBzZXRzIGl0IHVwIHdpdGggZmVhdHVyZXMgYW5kIGhvc3QgYmluZGluZ3MuIFNoYXJlZCBieQogICAgICogcmVuZGVyQ29tcG9uZW50KCkgYW5kIFZpZXdDb250YWluZXJSZWYuY3JlYXRlQ29tcG9uZW50KCkuCiAgICAgKiBAdGVtcGxhdGUgVAogICAgICogQHBhcmFtIHs/fSBjb21wb25lbnRWaWV3CiAgICAgKiBAcGFyYW0gez99IGNvbXBvbmVudERlZgogICAgICogQHBhcmFtIHs/fSByb290TFZpZXcKICAgICAqIEBwYXJhbSB7P30gcm9vdENvbnRleHQKICAgICAqIEBwYXJhbSB7P30gaG9zdEZlYXR1cmVzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBjcmVhdGVSb290Q29tcG9uZW50KGNvbXBvbmVudFZpZXcsIGNvbXBvbmVudERlZiwgcm9vdExWaWV3LCByb290Q29udGV4dCwgaG9zdEZlYXR1cmVzKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHRWaWV3ID0gcm9vdExWaWV3W1RWSUVXXTsKICAgICAgICAvLyBDcmVhdGUgZGlyZWN0aXZlIGluc3RhbmNlIHdpdGggZmFjdG9yeSgpIGFuZCBzdG9yZSBhdCBuZXh0IGluZGV4IGluIHZpZXdEYXRhCiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGNvbXBvbmVudCA9IGluc3RhbnRpYXRlUm9vdENvbXBvbmVudCh0Vmlldywgcm9vdExWaWV3LCBjb21wb25lbnREZWYpOwogICAgICAgIHJvb3RDb250ZXh0LmNvbXBvbmVudHMucHVzaChjb21wb25lbnQpOwogICAgICAgIGNvbXBvbmVudFZpZXdbQ09OVEVYVF0gPSBjb21wb25lbnQ7CiAgICAgICAgaG9zdEZlYXR1cmVzICYmIGhvc3RGZWF0dXJlcy5mb3JFYWNoKCgvKioKICAgICAgICAgKiBAcGFyYW0gez99IGZlYXR1cmUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIChmZWF0dXJlKSA9PiBmZWF0dXJlKGNvbXBvbmVudCwgY29tcG9uZW50RGVmKSkpOwogICAgICAgIC8vIFdlIHdhbnQgdG8gZ2VuZXJhdGUgYW4gZW1wdHkgUXVlcnlMaXN0IGZvciByb290IGNvbnRlbnQgcXVlcmllcyBmb3IgYmFja3dhcmRzCiAgICAgICAgLy8gY29tcGF0aWJpbGl0eSB3aXRoIFZpZXdFbmdpbmUuCiAgICAgICAgaWYgKGNvbXBvbmVudERlZi5jb250ZW50UXVlcmllcykgewogICAgICAgICAgICBjb21wb25lbnREZWYuY29udGVudFF1ZXJpZXMoMSAvKiBDcmVhdGUgKi8sIGNvbXBvbmVudCwgcm9vdExWaWV3Lmxlbmd0aCAtIDEpOwogICAgICAgIH0KICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3Qgcm9vdFROb2RlID0gZ2V0UHJldmlvdXNPclBhcmVudFROb2RlKCk7CiAgICAgICAgaWYgKHRWaWV3LmZpcnN0Q3JlYXRlUGFzcyAmJgogICAgICAgICAgICAoY29tcG9uZW50RGVmLmhvc3RCaW5kaW5ncyAhPT0gbnVsbCB8fCBjb21wb25lbnREZWYuaG9zdEF0dHJzICE9PSBudWxsKSkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGVsZW1lbnRJbmRleCA9IHJvb3RUTm9kZS5pbmRleCAtIEhFQURFUl9PRkZTRVQ7CiAgICAgICAgICAgIHNldFNlbGVjdGVkSW5kZXgoZWxlbWVudEluZGV4KTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCByb290VFZpZXcgPSByb290TFZpZXdbVFZJRVddOwogICAgICAgICAgICBhZGRIb3N0QmluZGluZ3NUb0V4cGFuZG9JbnN0cnVjdGlvbnMocm9vdFRWaWV3LCBjb21wb25lbnREZWYpOwogICAgICAgICAgICBncm93SG9zdFZhcnNTcGFjZShyb290VFZpZXcsIHJvb3RMVmlldywgY29tcG9uZW50RGVmLmhvc3RWYXJzKTsKICAgICAgICAgICAgaW52b2tlSG9zdEJpbmRpbmdzSW5DcmVhdGlvbk1vZGUoY29tcG9uZW50RGVmLCBjb21wb25lbnQpOwogICAgICAgIH0KICAgICAgICByZXR1cm4gY29tcG9uZW50OwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez89fSBzY2hlZHVsZXIKICAgICAqIEBwYXJhbSB7Pz19IHBsYXllckhhbmRsZXIKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGNyZWF0ZVJvb3RDb250ZXh0KHNjaGVkdWxlciwgcGxheWVySGFuZGxlcikgewogICAgICAgIHJldHVybiB7CiAgICAgICAgICAgIGNvbXBvbmVudHM6IFtdLAogICAgICAgICAgICBzY2hlZHVsZXI6IHNjaGVkdWxlciB8fCBkZWZhdWx0U2NoZWR1bGVyLAogICAgICAgICAgICBjbGVhbjogQ0xFQU5fUFJPTUlTRSwKICAgICAgICAgICAgcGxheWVySGFuZGxlcjogcGxheWVySGFuZGxlciB8fCBudWxsLAogICAgICAgICAgICBmbGFnczogMCAvKiBFbXB0eSAqLwogICAgICAgIH07CiAgICB9CiAgICAvKioKICAgICAqIFVzZWQgdG8gZW5hYmxlIGxpZmVjeWNsZSBob29rcyBvbiB0aGUgcm9vdCBjb21wb25lbnQuCiAgICAgKgogICAgICogSW5jbHVkZSB0aGlzIGZlYXR1cmUgd2hlbiBjYWxsaW5nIGByZW5kZXJDb21wb25lbnRgIGlmIHRoZSByb290IGNvbXBvbmVudAogICAgICogeW91IGFyZSByZW5kZXJpbmcgaGFzIGxpZmVjeWNsZSBob29rcyBkZWZpbmVkLiBPdGhlcndpc2UsIHRoZSBob29rcyB3b24ndAogICAgICogYmUgY2FsbGVkIHByb3Blcmx5LgogICAgICoKICAgICAqIEV4YW1wbGU6CiAgICAgKgogICAgICogYGBgCiAgICAgKiByZW5kZXJDb21wb25lbnQoQXBwQ29tcG9uZW50LCB7aG9zdEZlYXR1cmVzOiBbTGlmZWN5Y2xlSG9va3NGZWF0dXJlXX0pOwogICAgICogYGBgCiAgICAgKiBAcGFyYW0gez99IGNvbXBvbmVudAogICAgICogQHBhcmFtIHs/fSBkZWYKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIExpZmVjeWNsZUhvb2tzRmVhdHVyZShjb21wb25lbnQsIGRlZikgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCByb290VFZpZXcgPSAoLyoqIEB0eXBlIHs/fSAqLyAocmVhZFBhdGNoZWRMVmlldyhjb21wb25lbnQpKSlbVFZJRVddOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBkaXJJbmRleCA9IHJvb3RUVmlldy5kYXRhLmxlbmd0aCAtIDE7CiAgICAgICAgLy8gVE9ETyhtaXNrbyk6IHJlcGxhY2UgYGFzIFROb2RlYCB3aXRoIGNyZWF0ZVROb2RlIGNhbGwuIChuZWVkcyByZWZhY3RvcmluZyB0byBsb3NlIGRlcCBvbgogICAgICAgIC8vIExOb2RlKS4KICAgICAgICByZWdpc3RlclBvc3RPcmRlckhvb2tzKHJvb3RUVmlldywgKC8qKiBAdHlwZSB7P30gKi8gKHsgZGlyZWN0aXZlU3RhcnQ6IGRpckluZGV4LCBkaXJlY3RpdmVFbmQ6IGRpckluZGV4ICsgMSB9KSkpOwogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogcGFja2FnZXMvY29yZS9zcmMvcmVuZGVyMy9mZWF0dXJlcy9pbmhlcml0X2RlZmluaXRpb25fZmVhdHVyZS50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdHlwZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0U3VwZXJUeXBlKHR5cGUpIHsKICAgICAgICByZXR1cm4gT2JqZWN0LmdldFByb3RvdHlwZU9mKHR5cGUucHJvdG90eXBlKS5jb25zdHJ1Y3RvcjsKICAgIH0KICAgIC8qKgogICAgICogTWVyZ2VzIHRoZSBkZWZpbml0aW9uIGZyb20gYSBzdXBlciBjbGFzcyB0byBhIHN1YiBjbGFzcy4KICAgICAqIFxAY29kZUdlbkFwaQogICAgICogQHBhcmFtIHs/fSBkZWZpbml0aW9uIFRoZSBkZWZpbml0aW9uIHRoYXQgaXMgYSBTdWJDbGFzcyBvZiBhbm90aGVyIGRpcmVjdGl2ZSBvZiBjb21wb25lbnQKICAgICAqCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiDJtcm1SW5oZXJpdERlZmluaXRpb25GZWF0dXJlKGRlZmluaXRpb24pIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IHN1cGVyVHlwZSA9IGdldFN1cGVyVHlwZShkZWZpbml0aW9uLnR5cGUpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgc2hvdWxkSW5oZXJpdEZpZWxkcyA9IHRydWU7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGluaGVyaXRhbmNlQ2hhaW4gPSBbZGVmaW5pdGlvbl07CiAgICAgICAgd2hpbGUgKHN1cGVyVHlwZSkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBzdXBlckRlZiA9IHVuZGVmaW5lZDsKICAgICAgICAgICAgaWYgKGlzQ29tcG9uZW50RGVmKGRlZmluaXRpb24pKSB7CiAgICAgICAgICAgICAgICAvLyBEb24ndCB1c2UgZ2V0Q29tcG9uZW50RGVmL2dldERpcmVjdGl2ZURlZi4gVGhpcyBsb2dpYyByZWxpZXMgb24gaW5oZXJpdGFuY2UuCiAgICAgICAgICAgICAgICBzdXBlckRlZiA9IHN1cGVyVHlwZS7JtWNtcCB8fCBzdXBlclR5cGUuybVkaXI7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBpZiAoc3VwZXJUeXBlLsm1Y21wKSB7CiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdEaXJlY3RpdmVzIGNhbm5vdCBpbmhlcml0IENvbXBvbmVudHMnKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vIERvbid0IHVzZSBnZXRDb21wb25lbnREZWYvZ2V0RGlyZWN0aXZlRGVmLiBUaGlzIGxvZ2ljIHJlbGllcyBvbiBpbmhlcml0YW5jZS4KICAgICAgICAgICAgICAgIHN1cGVyRGVmID0gc3VwZXJUeXBlLsm1ZGlyOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChzdXBlckRlZikgewogICAgICAgICAgICAgICAgaWYgKHNob3VsZEluaGVyaXRGaWVsZHMpIHsKICAgICAgICAgICAgICAgICAgICBpbmhlcml0YW5jZUNoYWluLnB1c2goc3VwZXJEZWYpOwogICAgICAgICAgICAgICAgICAgIC8vIFNvbWUgZmllbGRzIGluIHRoZSBkZWZpbml0aW9uIG1heSBiZSBlbXB0eSwgaWYgdGhlcmUgd2VyZSBubyB2YWx1ZXMgdG8gcHV0IGluIHRoZW0gdGhhdAogICAgICAgICAgICAgICAgICAgIC8vIHdvdWxkJ3ZlIGp1c3RpZmllZCBvYmplY3QgY3JlYXRpb24uIFVud3JhcCB0aGVtIGlmIG5lY2Vzc2FyeS4KICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3Qgd3JpdGVhYmxlRGVmID0gKC8qKiBAdHlwZSB7P30gKi8gKGRlZmluaXRpb24pKTsKICAgICAgICAgICAgICAgICAgICB3cml0ZWFibGVEZWYuaW5wdXRzID0gbWF5YmVVbndyYXBFbXB0eShkZWZpbml0aW9uLmlucHV0cyk7CiAgICAgICAgICAgICAgICAgICAgd3JpdGVhYmxlRGVmLmRlY2xhcmVkSW5wdXRzID0gbWF5YmVVbndyYXBFbXB0eShkZWZpbml0aW9uLmRlY2xhcmVkSW5wdXRzKTsKICAgICAgICAgICAgICAgICAgICB3cml0ZWFibGVEZWYub3V0cHV0cyA9IG1heWJlVW53cmFwRW1wdHkoZGVmaW5pdGlvbi5vdXRwdXRzKTsKICAgICAgICAgICAgICAgICAgICAvLyBNZXJnZSBob3N0QmluZGluZ3MKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3VwZXJIb3N0QmluZGluZ3MgPSBzdXBlckRlZi5ob3N0QmluZGluZ3M7CiAgICAgICAgICAgICAgICAgICAgc3VwZXJIb3N0QmluZGluZ3MgJiYgaW5oZXJpdEhvc3RCaW5kaW5ncyhkZWZpbml0aW9uLCBzdXBlckhvc3RCaW5kaW5ncyk7CiAgICAgICAgICAgICAgICAgICAgLy8gTWVyZ2UgcXVlcmllcwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBzdXBlclZpZXdRdWVyeSA9IHN1cGVyRGVmLnZpZXdRdWVyeTsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3VwZXJDb250ZW50UXVlcmllcyA9IHN1cGVyRGVmLmNvbnRlbnRRdWVyaWVzOwogICAgICAgICAgICAgICAgICAgIHN1cGVyVmlld1F1ZXJ5ICYmIGluaGVyaXRWaWV3UXVlcnkoZGVmaW5pdGlvbiwgc3VwZXJWaWV3UXVlcnkpOwogICAgICAgICAgICAgICAgICAgIHN1cGVyQ29udGVudFF1ZXJpZXMgJiYgaW5oZXJpdENvbnRlbnRRdWVyaWVzKGRlZmluaXRpb24sIHN1cGVyQ29udGVudFF1ZXJpZXMpOwogICAgICAgICAgICAgICAgICAgIC8vIE1lcmdlIGlucHV0cyBhbmQgb3V0cHV0cwogICAgICAgICAgICAgICAgICAgIGZpbGxQcm9wZXJ0aWVzKGRlZmluaXRpb24uaW5wdXRzLCBzdXBlckRlZi5pbnB1dHMpOwogICAgICAgICAgICAgICAgICAgIGZpbGxQcm9wZXJ0aWVzKGRlZmluaXRpb24uZGVjbGFyZWRJbnB1dHMsIHN1cGVyRGVmLmRlY2xhcmVkSW5wdXRzKTsKICAgICAgICAgICAgICAgICAgICBmaWxsUHJvcGVydGllcyhkZWZpbml0aW9uLm91dHB1dHMsIHN1cGVyRGVmLm91dHB1dHMpOwogICAgICAgICAgICAgICAgICAgIC8vIE1lcmdlIGFuaW1hdGlvbnMgbWV0YWRhdGEuCiAgICAgICAgICAgICAgICAgICAgLy8gSWYgYHN1cGVyRGVmYCBpcyBhIENvbXBvbmVudCwgdGhlIGBkYXRhYCBmaWVsZCBpcyBwcmVzZW50IChkZWZhdWx0cyB0byBhbiBlbXB0eSBvYmplY3QpLgogICAgICAgICAgICAgICAgICAgIGlmIChpc0NvbXBvbmVudERlZihzdXBlckRlZikgJiYgc3VwZXJEZWYuZGF0YS5hbmltYXRpb24pIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gSWYgc3VwZXIgZGVmIGlzIGEgQ29tcG9uZW50LCB0aGUgYGRlZmluaXRpb25gIGlzIGFsc28gYSBDb21wb25lbnQsIHNpbmNlIERpcmVjdGl2ZXMgY2FuCiAgICAgICAgICAgICAgICAgICAgICAgIC8vIG5vdCBpbmhlcml0IENvbXBvbmVudHMgKHdlIHRocm93IGFuIGVycm9yIGFib3ZlIGFuZCBjYW5ub3QgcmVhY2ggdGhpcyBjb2RlKS4KICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBkZWZEYXRhID0gKCgvKiogQHR5cGUgez99ICovIChkZWZpbml0aW9uKSkpLmRhdGE7CiAgICAgICAgICAgICAgICAgICAgICAgIGRlZkRhdGEuYW5pbWF0aW9uID0gKGRlZkRhdGEuYW5pbWF0aW9uIHx8IFtdKS5jb25jYXQoc3VwZXJEZWYuZGF0YS5hbmltYXRpb24pOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAvLyBJbmhlcml0IGhvb2tzCiAgICAgICAgICAgICAgICAgICAgLy8gQXNzdW1lIHN1cGVyIGNsYXNzIGluaGVyaXRhbmNlIGZlYXR1cmUgaGFzIGFscmVhZHkgcnVuLgogICAgICAgICAgICAgICAgICAgIHdyaXRlYWJsZURlZi5hZnRlckNvbnRlbnRDaGVja2VkID0KICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVhYmxlRGVmLmFmdGVyQ29udGVudENoZWNrZWQgfHwgc3VwZXJEZWYuYWZ0ZXJDb250ZW50Q2hlY2tlZDsKICAgICAgICAgICAgICAgICAgICB3cml0ZWFibGVEZWYuYWZ0ZXJDb250ZW50SW5pdCA9IGRlZmluaXRpb24uYWZ0ZXJDb250ZW50SW5pdCB8fCBzdXBlckRlZi5hZnRlckNvbnRlbnRJbml0OwogICAgICAgICAgICAgICAgICAgIHdyaXRlYWJsZURlZi5hZnRlclZpZXdDaGVja2VkID0gZGVmaW5pdGlvbi5hZnRlclZpZXdDaGVja2VkIHx8IHN1cGVyRGVmLmFmdGVyVmlld0NoZWNrZWQ7CiAgICAgICAgICAgICAgICAgICAgd3JpdGVhYmxlRGVmLmFmdGVyVmlld0luaXQgPSBkZWZpbml0aW9uLmFmdGVyVmlld0luaXQgfHwgc3VwZXJEZWYuYWZ0ZXJWaWV3SW5pdDsKICAgICAgICAgICAgICAgICAgICB3cml0ZWFibGVEZWYuZG9DaGVjayA9IGRlZmluaXRpb24uZG9DaGVjayB8fCBzdXBlckRlZi5kb0NoZWNrOwogICAgICAgICAgICAgICAgICAgIHdyaXRlYWJsZURlZi5vbkRlc3Ryb3kgPSBkZWZpbml0aW9uLm9uRGVzdHJveSB8fCBzdXBlckRlZi5vbkRlc3Ryb3k7CiAgICAgICAgICAgICAgICAgICAgd3JpdGVhYmxlRGVmLm9uSW5pdCA9IGRlZmluaXRpb24ub25Jbml0IHx8IHN1cGVyRGVmLm9uSW5pdDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vIFJ1biBwYXJlbnQgZmVhdHVyZXMKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGZlYXR1cmVzID0gc3VwZXJEZWYuZmVhdHVyZXM7CiAgICAgICAgICAgICAgICBpZiAoZmVhdHVyZXMpIHsKICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGZlYXR1cmVzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZmVhdHVyZSA9IGZlYXR1cmVzW2ldOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAoZmVhdHVyZSAmJiBmZWF0dXJlLm5nSW5oZXJpdCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgKCgvKiogQHR5cGUgez99ICovIChmZWF0dXJlKSkpKGRlZmluaXRpb24pOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIElmIGBJbmhlcml0RGVmaW5pdGlvbkZlYXR1cmVgIGlzIGEgcGFydCBvZiB0aGUgY3VycmVudCBgc3VwZXJEZWZgLCBpdCBtZWFucyB0aGF0IHRoaXMKICAgICAgICAgICAgICAgICAgICAgICAgLy8gZGVmIGFscmVhZHkgaGFzIGFsbCB0aGUgbmVjZXNzYXJ5IGluZm9ybWF0aW9uIGluaGVyaXRlZCBmcm9tIGl0cyBzdXBlciBjbGFzcyhlcyksIHNvIHdlCiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGNhbiBzdG9wIG1lcmdpbmcgZmllbGRzIGZyb20gc3VwZXIgY2xhc3Nlcy4gSG93ZXZlciB3ZSBuZWVkIHRvIGl0ZXJhdGUgdGhyb3VnaCB0aGUKICAgICAgICAgICAgICAgICAgICAgICAgLy8gcHJvdG90eXBlIGNoYWluIHRvIGxvb2sgZm9yIGNsYXNzZXMgdGhhdCBtaWdodCBjb250YWluIG90aGVyICJmZWF0dXJlcyIgKGxpa2UKICAgICAgICAgICAgICAgICAgICAgICAgLy8gTmdPbkNoYW5nZXMpLCB3aGljaCB3ZSBzaG91bGQgaW52b2tlIGZvciB0aGUgb3JpZ2luYWwgYGRlZmluaXRpb25gLiBXZSBzZXQgdGhlCiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGBzaG91bGRJbmhlcml0RmllbGRzYCBmbGFnIHRvIGluZGljYXRlIHRoYXQsIGVzc2VudGlhbGx5IHNraXBwaW5nIGZpZWxkcyBpbmhlcml0YW5jZQogICAgICAgICAgICAgICAgICAgICAgICAvLyBsb2dpYyBhbmQgb25seSBpbnZva2luZyBmdW5jdGlvbnMgZnJvbSB0aGUgImZlYXR1cmVzIiBsaXN0LgogICAgICAgICAgICAgICAgICAgICAgICBpZiAoZmVhdHVyZSA9PT0gybXJtUluaGVyaXREZWZpbml0aW9uRmVhdHVyZSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgc2hvdWxkSW5oZXJpdEZpZWxkcyA9IGZhbHNlOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHN1cGVyVHlwZSA9IE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IHs/fSAqLwogICAgICAgIGNvbnN0IHByZXZWaWV3UXVlcnkgPSBkZWZpbml0aW9uLnZpZXdRdWVyeTsKICAgICAgICBpZiAocHJldlZpZXdRdWVyeSkgewogICAgICAgICAgICBkZWZpbml0aW9uLnZpZXdRdWVyeSA9ICgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSByZgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGN0eAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHJmLCBjdHgpID0+IHsKICAgICAgICAgICAgICAgIHN1cGVyVmlld1F1ZXJ5KHJmLCBjdHgpOwogICAgICAgICAgICAgICAgcHJldlZpZXdRdWVyeShyZiwgY3R4KTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICBkZWZpbml0aW9uLnZpZXdRdWVyeSA9IHN1cGVyVmlld1F1ZXJ5OwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBkZWZpbml0aW9uCiAgICAgKiBAcGFyYW0gez99IHN1cGVyQ29udGVudFF1ZXJpZXMKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGluaGVyaXRDb250ZW50UXVlcmllcyhkZWZpbml0aW9uLCBzdXBlckNvbnRlbnRRdWVyaWVzKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHByZXZDb250ZW50UXVlcmllcyA9IGRlZmluaXRpb24uY29udGVudFF1ZXJpZXM7CiAgICAgICAgaWYgKHByZXZDb250ZW50UXVlcmllcykgewogICAgICAgICAgICBkZWZpbml0aW9uLmNvbnRlbnRRdWVyaWVzID0gKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHJmCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY3R4CiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZGlyZWN0aXZlSW5kZXgKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChyZiwgY3R4LCBkaXJlY3RpdmVJbmRleCkgPT4gewogICAgICAgICAgICAgICAgc3VwZXJDb250ZW50UXVlcmllcyhyZiwgY3R4LCBkaXJlY3RpdmVJbmRleCk7CiAgICAgICAgICAgICAgICBwcmV2Q29udGVudFF1ZXJpZXMocmYsIGN0eCwgZGlyZWN0aXZlSW5kZXgpOwogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIGRlZmluaXRpb24uY29udGVudFF1ZXJpZXMgPSBzdXBlckNvbnRlbnRRdWVyaWVzOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBkZWZpbml0aW9uCiAgICAgKiBAcGFyYW0gez99IHN1cGVySG9zdEJpbmRpbmdzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBpbmhlcml0SG9zdEJpbmRpbmdzKGRlZmluaXRpb24sIHN1cGVySG9zdEJpbmRpbmdzKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHByZXZIb3N0QmluZGluZ3MgPSBkZWZpbml0aW9uLmhvc3RCaW5kaW5nczsKICAgICAgICBpZiAocHJldkhvc3RCaW5kaW5ncykgewogICAgICAgICAgICBkZWZpbml0aW9uLmhvc3RCaW5kaW5ncyA9ICgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSByZgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGN0eAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHJmLCBjdHgpID0+IHsKICAgICAgICAgICAgICAgIHN1cGVySG9zdEJpbmRpbmdzKHJmLCBjdHgpOwogICAgICAgICAgICAgICAgcHJldkhvc3RCaW5kaW5ncyhyZiwgY3R4KTsKICA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AgICAgIHJldHVybiAoLyoqCiAgICAgICAgICogQHRoaXMgez99CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiB3cmFwT25DaGFuZ2VzSG9va19pblByZXZpb3VzQ2hhbmdlc1N0b3JhZ2UoKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc2ltcGxlQ2hhbmdlc1N0b3JlID0gZ2V0U2ltcGxlQ2hhbmdlc1N0b3JlKHRoaXMpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGN1cnJlbnQgPSBzaW1wbGVDaGFuZ2VzU3RvcmUgJiYgc2ltcGxlQ2hhbmdlc1N0b3JlLmN1cnJlbnQ7CiAgICAgICAgICAgIGlmIChjdXJyZW50KSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBwcmV2aW91cyA9ICgvKiogQHR5cGUgez99ICovIChzaW1wbGVDaGFuZ2VzU3RvcmUpKS5wcmV2aW91czsKICAgICAgICAgICAgICAgIGlmIChwcmV2aW91cyA9PT0gRU1QVFlfT0JKKSB7CiAgICAgICAgICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKHNpbXBsZUNoYW5nZXNTdG9yZSkpLnByZXZpb3VzID0gY3VycmVudDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIC8vIE5ldyBjaGFuZ2VzIGFyZSBjb3BpZWQgdG8gdGhlIHByZXZpb3VzIHN0b3JlLCBzbyB0aGF0IHdlIGRvbid0IGxvc2UgaGlzdG9yeSBmb3IgaW5wdXRzCiAgICAgICAgICAgICAgICAgICAgLy8gd2hpY2ggd2VyZSBub3QgY2hhbmdlZCB0aGlzIHRpbWUKICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBrZXkgaW4gY3VycmVudCkgewogICAgICAgICAgICAgICAgICAgICAgICBwcmV2aW91c1trZXldID0gY3VycmVudFtrZXldOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovIChzaW1wbGVDaGFuZ2VzU3RvcmUpKS5jdXJyZW50ID0gbnVsbDsKICAgICAgICAgICAgICAgIHRoaXMubmdPbkNoYW5nZXMoY3VycmVudCk7CiAgICAgICAgICAgIH0KICAgICAgICB9KTsKICAgIH0KICAgIC8qKgogICAgICogQHRlbXBsYXRlIFQKICAgICAqIEB0aGlzIHs/fQogICAgICogQHBhcmFtIHs/fSBpbnN0YW5jZQogICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICogQHBhcmFtIHs/fSBwdWJsaWNOYW1lCiAgICAgKiBAcGFyYW0gez99IHByaXZhdGVOYW1lCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBuZ09uQ2hhbmdlc1NldElucHV0KGluc3RhbmNlLCB2YWx1ZSwgcHVibGljTmFtZSwgcHJpdmF0ZU5hbWUpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3Qgc2ltcGxlQ2hhbmdlc1N0b3JlID0gZ2V0U2ltcGxlQ2hhbmdlc1N0b3JlKGluc3RhbmNlKSB8fAogICAgICAgICAgICBzZXRTaW1wbGVDaGFuZ2VzU3RvcmUoaW5zdGFuY2UsIHsgcHJldmlvdXM6IEVNUFRZX09CSiwgY3VycmVudDogbnVsbCB9KTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgY3VycmVudCA9IHNpbXBsZUNoYW5nZXNTdG9yZS5jdXJyZW50IHx8IChzaW1wbGVDaGFuZ2VzU3RvcmUuY3VycmVudCA9IHt9KTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgcHJldmlvdXMgPSBzaW1wbGVDaGFuZ2VzU3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Z3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIHJlc29sdmVQcm92aWRlciQxKHByb3ZpZGVyW2ldLCB0SW5qZWN0YWJsZXMsIGxJbmplY3RhYmxlc0JsdWVwcmludCwgaXNDb21wb25lbnQsIGlzVmlld1Byb3ZpZGVyKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB0VmlldyA9IGdldFRWaWV3KCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbFZpZXcgPSBnZXRMVmlldygpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCB0b2tlbiA9IGlzVHlwZVByb3ZpZGVyKHByb3ZpZGVyKSA/IHByb3ZpZGVyIDogcmVzb2x2ZUZvcndhcmRSZWYocHJvdmlkZXIucHJvdmlkZSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHByb3ZpZGVyRmFjdG9yeSA9IHByb3ZpZGVyVG9GYWN0b3J5KHByb3ZpZGVyKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB0Tm9kZSA9IGdldFByZXZpb3VzT3JQYXJlbnRUTm9kZSgpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGJlZ2luSW5kZXggPSB0Tm9kZS5wcm92aWRlckluZGV4ZXMgJiA2NTUzNSAvKiBQcm92aWRlcnNTdGFydEluZGV4TWFzayAqLzsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBlbmRJbmRleCA9IHROb2RlLmRpcmVjdGl2ZVN0YXJ0OwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGNwdFZpZXdQc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AgICAgICB0SW5qZWN0YWJsZXMucHVzaCh0b2tlbik7CiAgICAgICAgICAgICAgICAgICAgdE5vZGUuZGlyZWN0aXZlU3RhcnQrKzsKICAgICAgICAgICAgICAgICAgICB0Tm9kZS5kaXJlY3RpdmVFbmQrKzsKICAgICAgICAgICAgICAgICAgICBpZiAoaXNWaWV3UHJvdmlkZXIpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdE5vZGUucHJvdmlkZXJJbmRleGVzICs9IDY1NTM2IC8qIENwdFZpZXdQcm92aWRlcnNDb3VudFNoaWZ0ZXIgKi87CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGxJbmplY3RhYmxlc0JsdWVwcmludC5wdXNoKGZhY3RvcnkpOwogICAgICAgICAgICAgICAgICAgIGxWaWV3LnB1c2goZmFjdG9yeSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBsSW5qZWN0YWJsZXNCbHVlcHJpbnRbZXhpc3RpbmdGYWN0b3J5SW5kZXhdID0gZmFjdG9yeTsKICAgICAgICAgICAgICAgICAgICBsVmlld1tleGlzdGluZ0ZhY3RvcnlJbmRleF0gPSBmYWN0b3J5OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgLy8gTXVsdGkgcHJvdmlkZXIgY2FzZToKICAgICAgICAgICAgICAgIC8vIFdlIGNyZWF0ZSBhIG11bHRpIGZhY3Rvcnkgd2hpY2ggaXMgZ29pbmcgdG8gYWdncmVnYXRlIGFsbCB0aGUgdmFsdWVzLgogICAgICAgICAgICAgICAgLy8gU2luY2UgdGhlIG91dHB1dCBvZiBzdWNoIGEgZmFjdG9yeSBkZXBlbmRzIG9uIGNvbnRlbnQgb3IgdmlldyBpbmplY3Rpb24sCiAgICAgICAgICAgICAgICAvLyB3ZSBjcmVhdGUgdHdvIG9mIHRoZW0sIHdoaW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ICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGRvZXNQcm92aWRlcnNGYWN0b3J5RXhpc3QgPSBleGlzdGluZ1Byb3ZpZGVyc0ZhY3RvcnlJbmRleCA+PSAwICYmCiAgICAgICAgICAgICAgICAgICAgbEluamVjdGFibGVzQmx1ZXByaW50W2V4aXN0aW5nUHJvdmlkZXJzRmFjdG9yeUluZGV4XTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGRvZXNWaWV3UHJvdmlkZXJzRmFjdG9yeUV4aXN0ID0gZXhpc3RpbmdWaWV3UHJvdmlkZXJzRmFjdG9yeUluZGV4ID49IDAgJiYKICAgICAgICAgICAgICAgICAgICBsSW5qZWN0YWJsZXNCbHVlcHJpbnRbZXhpc3RpbmdWaWV3UHJvdmlkZXJzRmFjdG9yeUluZGV4XTsKICAgICAgICAgICAgICAgIGlmIChpc1ZpZXdQcm92aWRlciAmJiAhZG9lc1ZpZXdQcm92aWRlcnNGYWN0b3J5RXhpc3QgfHwKICAgICAgICAgICAgICAgICAgICAhaXNWaWV3UHJvdmlkZXIgJiYgIWRvZXNQcm92aWRlcnNGYWN0b3J5RXhpc3QpIHsKICAgICAgICAgICAgICAgICAgICAvLyBDYXNlcyAxLmEgYW5kIDIuYQogICAgICAgICAgICAgICAgICAgIGRpUHVibGljSW5JbmplY3RvcihnZXRPckNyZWF0ZU5vZGVJbmplY3RvckZvck5vZGUoKC8qKiBAdHlwZSB7P30gKi8gKHROb2RlKSksIGxWaWV3KSwgdFZpZXcsIHRva2VuKTsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgZmFjdG9yeSA9IG11bHRpRmFjdG9yeShpc1ZpZXdQcm92aWRlciA/IG11bHRpVmlld1Byb3ZpZGVyc0ZhY3RvcnlSZXNvbHZlciA6IG11bHRpUHJvdmlkZXJzRmFjdG9yeVJlc29sdmVyLCBsSW5qZWN0YWJsZXNCbHVlcHJpbnQubGVuZ3RoLCBpc1ZpZXdQcm92aWRlciwgaXNDb21wb25lbnQsIHByb3ZpZGVyRmFjdG9yeSk7CiAgICAgICAgICAgICAgICAgICAgaWYgKCFpc1ZpZXdQcm92aWRlciAmJiBkb2VzVmlld1Byb3ZpZGVyc0ZhY3RvcnlFeGlzdCkgewogICAgICAgICAgICAgICAgICAgICAgICBsSW5qZWN0YWJsZXNCbHVlcHJpbnRbZXhpc3RpbmdWaWV3UHJvdmlkZXJzRmFjdG9yeUluZGV4XS5wcm92aWRlckZhY3RvcnkgPSBmYWN0b3J5OwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICByZWdpc3RlckRlc3Ryb3lIb29rc0lmU3VwcG9ydGVkKHRWaWV3LCBwcm92aWRlciwgdEluamVjdGFibGVzLmxlbmd0aCwgMCk7CiAgICAgICAgICAgICAgICAgICAgdEluamVjdGFibGVzLnB1c2godG9rZW4pOwogICAgICAgICAgICAgICAgICAgIHROb2RlLmRpcmVjdGl2ZVN0YXJ0Kys7CiAgICAgICAgICAgICAgICAgICAgdE5vZGUuZGlyZWN0aXZlRW5kKys7CiAgICAgICAgICAgICAgICAgICAgaWYgKGlzVmlld1Byb3ZpZGVyKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHROb2RlLnByb3ZpZGVySW5kZXhlcyArPSA2NTUzNiAvKiBDcHRWaWV3UHJvdmlkZXJzQ291bnRTaGlmdGVyICovOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBsSW5qZWN0YWJsZXNCbHVlcHJpbnQucHVzaChmYWN0b3J5KTsKICAgICAgICAgICAgICAgICAgICBsVmlldy5wdXNoKGZhY3RvcnkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgLy8gQ2FzZXMgMS5iIGFuZCAyLmIKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgaW5kZXhJbkZhY3RvcnkgPSBtdWx0aUZhY3RvcnlBZGQoKC8qKiBAdHlwZSB7P30gKi8gKGxJbmplY3RhYmxlc0JsdWVwcmludCkpW2lzVmlld1Byb3ZpZGVyID8gZXhpc3RpbmdWaWV3UHJvdmlkZXJzRmFjdG9yeUluZGV4IDoKICAgICAgICAgICAgICAgICAgICAgICAgZXhpc3RpbmdQcm92aWRlcnNGYWN0b3J5SW5kZXhdLCBwcm92aWRlckZhY3RvcnksICFpc1ZpZXdQcm92aWRlciAmJiBpc0NvbXBvbmVudCk7CiAgICAgICAgICAgICAgICAgICAgcmVnaXN0ZXJEZXN0cm95SG9va3NJZlN1cHBvcnRlZCh0VmlldywgcHJvdmlkZXIsIGV4aXN0aW5nUHJvdmlkZXJzRmFjdG9yeUluZGV4ID4gLTEgPyBleGlzdGluZ1Byb3ZpZGVyc0ZhY3RvcnlJbmRleCA6CiAgICAgICAgICAgICAgICAgICAgICAgIGV4aXN0aW5nVmlld1Byb3ZpZGVyc0ZhY3RvcnlJbmRleCwgaW5kZXhJbkZhY3RvcnkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKCFpc1ZpZXdQcm92aWRlciAmJiBpc0NvbXBvbmVudCAmJiBkb2VzVmlld1Byb3ZpZGVyc0ZhY3RvcnlFeGlzdCkgewogICAgICAgICAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovIChsSW5qZWN0YWJsZXNCbHVlcHJpbnRbZXhpc3RpbmdWaWV3UHJvdmlkZXJzRmFjdG9yeUluZGV4XS5jb21wb25lbnRQcm92aWRlcnMpKSsrOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBSZWdpc3RlcnMgdGhlIGBuZ09uRGVzdHJveWAgaG9vayBvZiBhIHByb3ZpZGVyLCBpZiB0aGUgcHJvdmlkZXIgc3VwcG9ydHMgZGVzdHJveSBob29rcy4KICAgICAqIEBwYXJhbSB7P30gdFZpZXcgYFRWaWV3YCBpbiB3aGljaCB0byByZWdpc3RlciB0aGUgaG9vay4KICAgICAqIEBwYXJhbSB7P30gcHJvdmlkZXIgUHJvdmlkZXIgd2hvc2UgaG9vayBzaG91bGQgYmUgcmVnaXN0ZXJlZC4KICAgICAqIEBwYXJhbSB7P30gY29udGV4dEluZGV4IEluZGV4IHVuZGVyIHdoaWNoIHRvIGZpbmQgdGhlIGNvbnRleHQgZm9yIHRoZSBob29rIHdoZW4gaXQncyBiZWluZyBpbnZva2VkLgogICAgICogQHBhcmFtIHs/PX0gaW5kZXhJbkZhY3RvcnkgT25seSByZXF1aXJlZCBmb3IgYG11bHRpYCBwcm92aWRlcnMuIEluZGV4IG9mIHRoZSBwcm92aWRlciBpbiB0aGUgbXVsdGkKICAgICAqIHByb3ZpZGVyIGZhY3RvcnkuCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiByZWdpc3RlckRlc3Ryb3lIb29rc0lmU3VwcG9ydGVkKHRWaWV3LCBwcm92aWRlciwgY29udGV4dEluZGV4LCBpbmRleEluRmFjdG9yeSkgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBwcm92aWRlcklzVHlwZVByb3ZpZGVyID0gaXNUeXBlUHJvdmlkZXIocHJvdmlkZXIpOwogICAgICAgIGlmIChwcm92aWRlcklzVHlwZVByb3ZpZGVyIHx8IGlzQ2xhc3NQcm92aWRlcihwcm92aWRlcikpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwcm90b3R5cGUgPSAoKCgvKiogQHR5cGUgez99ICovIChwcm92aWRlcikpKS51c2VDbGFzcyB8fCBwcm92aWRlcikucHJvdG90eXBlOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG5nT25EZXN0cm95ID0gcHJvdG90eXBlLm5nT25EZXN0cm95OwogICAgICAgICAgICBpZiAobmdPbkRlc3Ryb3kpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGhvb2tzID0gdFZpZXcuZGVzdHJveUhvb2tzIHx8ICh0Vmlldy5kZXN0cm95SG9va3MgPSBbXSk7CiAgICAgICAgICAgICAgICBpZiAoIXByb3ZpZGVySXNUeXBlUHJvdmlkZXIgJiYgKCgoLyoqIEB0eXBlIHs/fSAqLyAocHJvdmlkZXIpKSkpLm11bHRpKSB7CiAgICAgICAgICAgICAgICAgICAgbmdEZXZNb2RlICYmCiAgICAgICAgICAgICAgICAgICAgICAgIGFzc2VydERlZmluZWQoaW5kZXhJbkZhY3RvcnksICdpbmRleEluRmFjdG9yeSB3aGVuIHJlZ2lzdGVyaW5nIG11bHRpIGZhY3RvcnkgZGVzdHJveSBob29rJyk7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGV4aXN0aW5nQ2FsbGJhY2tzSW5kZXggPSBob29rcy5pbmRleE9mKGNvbnRleHRJbmRleCk7CiAgICAgICAgICAgICAgICAgICAgaWYgKGV4aXN0aW5nQ2FsbGJhY2tzSW5kZXggPT09IC0xKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGhvb2tzLnB1c2goY29udGV4dEluZGV4LCBbaW5kZXhJbkZhY3RvcnksIG5nT25EZXN0cm95XSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAoKC8qKiBAdHlwZSB7P30gKi8gKGhvb2tzW2V4aXN0aW5nQ2FsbGJhY2tzSW5kZXggKyAxXSkpKS5wdXNoKCgvKiogQHR5cGUgez99ICovIChpbmRleEluRmFjdG9yeSkpLCBuZ09uRGVzdHJveSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgaG9va3MucHVzaChjb250ZXh0SW5kZXgsIG5nT25EZXN0cm95KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQWRkIGEgZmFjdG9yeSBpbiBhIG11bHRpIGZhY3RvcnkuCiAgICAgKiBAcGFyYW0gez99IG11bHRpRmFjdG9yeQogICAgICogQHBhcmFtIHs/fSBmYWN0b3J5CiAgICAgKiBAcGFyYW0gez99IGlzQ29tcG9uZW50UHJvdmlkZXIKICAgICAqIEByZXR1cm4gez99IEluZGV4IGF0IHdoaWNoIHRoZSBmYWN0b3J5IHdhcyBpbnNlcnRlZC4KICAgICAqLwogICAgZnVuY3Rpb24gbXVsdGlGYWN0b3J5QWRkKG11bHRpRmFjdG9yeSwgZmFjdG9yeSwgaXNDb21wb25lbnRQcm92aWRlcikgewogICAgICAgIGlmIChpc0NvbXBvbmVudFByb3ZpZGVyKSB7CiAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovIChtdWx0aUZhY3RvcnkuY29tcG9uZW50UHJvdmlkZXJzKSkrKzsKICAgICAgICB9CiAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovIChtdWx0aUZhY3RvcnkubXVsdGkpKS5wdXNoKGZhY3RvcnkpIC0gMTsKICAgIH0KICAgIC8qKgogICAgICogUmV0dXJucyB0aGUgaW5kZXggb2YgaXRlbSBpbiB0aGUgYXJyYXksIGJ1dCBvbmx5IGluIHRoZSBiZWdpbiB0byBlbmQgcmFuZ2UuCiAgICAgKiBAcGFyYW0gez99IGl0ZW0KICAgICAqIEBwYXJhbSB7P30gYXJyCiAgICAgKiBAcGFyYW0gez99IGJlZ2luCiAgICAgKiBAcGFyYW0gez99IGVuZAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gaW5kZXhPZihpdGVtLCBhcnIsIGJlZ2luLCBlbmQpIHsKICAgICAgICBmb3IgKGxldCBpID0gYmVnaW47IGkgPCBlbmQ7IGkrKykgewogICAgICAgICAgICBpZiAoYXJyW2ldID09PSBpdGVtKQogICAgICAgICAgICAgICAgcmV0dXJuIGk7CiAgICAgICAgfQogICAgICAgIHJldHVybiAtMTsKICAgIH0KICAgIC8qKgogICAgICogVXNlIHRoaXMgd2l0aCBgbXVsdGlgIGBwcm92aWRlcnNgLgogICAgICogQHRoaXMgez99CiAgICAgKiBAcGFyYW0gez99IF8KICAgICAqIEBwYXJhbSB7P30gdERhdGEKICAgICAqIEBwYXJhbSB7P30gbERhdGEKICAgICAqIEBwYXJhbSB7P30gdE5vZGUKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIG11bHRpUHJvdmlkZXJzRmFjdG9yeVJlc29sdmVyKF8sIHREYXRhLCBsRGF0YSwgdE5vZGUpIHsKICAgICAgICByZXR1cm4gbXVsdGlSZXNvbHZlKCgvKiogQHR5cGUgez99ICovICh0aGlzLm11bHRpKSksIFtdKTsKICAgIH0KICAgIC8qKgogICAgICogVXNlIHRoaXMgd2l0aCBgbXVsdGlgIGB2aWV3UHJvdmlkZXJzYC4KICAgICAqCiAgICAgKiBUaGlzIGZhY3Rvcnkga25vd3MgaG93IHRvIGNvbmNhdGVuYXRlIGl0c2VsZiB3aXRoIHRoZSBleGlzdGluZyBgbXVsdGlgIGBwcm92aWRlcnNgLgogICAgICogQHRoaXMgez99CiAgICAgKiBAcGFyYW0gez99IF8KICAgICAqIEBwYXJhbSB7P30gdERhdGEKICAgICAqIEBwYXJhbSB7P30gbFZpZXcKICAgICAqIEBwYXJhbSB7P30gdE5vZGUKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIG11bHRpVmlld1Byb3ZpZGVyc0ZhY3RvcnlSZXNvbHZlcihfLCB0RGF0YSwgbFZpZXcsIHROb2RlKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGZhY3RvcmllcyA9ICgvKiogQHR5cGUgez99ICovICh0aGlzLm11bHRpKSk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCByZXN1bHQ7CiAgICAgICAgaWYgKHRoaXMucHJvdmlkZXJGYWN0b3J5KSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgY29tcG9uZW50Q291bnQgPSAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5wcm92aWRlckZhY3RvcnkuY29tcG9uZW50UHJvdmlkZXJzKSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbXVsdGlQcm92aWRlcnMgPSBnZXROb2RlSW5qZWN0YWJsZShsVmlldywgbFZpZXdbVFZJRVddLCAoLyoqIEB0eXBlIHs/fSAqLyAoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMucHJvdmlkZXJGYWN0b3J5KSkuaW5kZXgpKSwgdE5vZGUpOwogICAgICAgICAgICAvLyBDb3B5IHRoZSBzZWN0aW9uIG9mIHRoZSBhcnJheSB3aGljaCBjb250YWlucyBgbXVsdGlgIGBwcm92aWRlcnNgIGZyb20gdGhlIGNvbXBvbmVudAogICAgICAgICAgICByZXN1bHQgPSBtdWx0aVByb3ZpZGVycy5zbGljZSgwLCBjb21wb25lbnRDb3VudCk7CiAgICAgICAgICAgIC8vIEluc2VydCB0aGUgYHZpZXdQcm92aWRlcmAgaW5zdGFuY2VzLgogICAgICAgICAgICBtdWx0aVJlc29sdmUoZmFjdG9yaWVzLCByZXN1bHQpOwogICAgICAgICAgICAvLyBDb3B5IHRoZSBzZWN0aW9uIG9mIHRoZSBhcnJheSB3aGljaCBjb250YWlucyBgbXVsdGlgIGBwcm92aWRlcnNgIGZyb20gb3RoZXIgZGlyZWN0aXZlcwogICAgICAgICAgICBmb3IgKGxldCBpID0gY29tcG9uZW50Q291bnQ7IGkgPCBtdWx0aVByb3ZpZGVycy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgcmVzdWx0LnB1c2gobXVsdGlQcm92aWRlcnNbaV0pOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICByZXN1bHQgPSBbXTsKICAgICAgICAgICAgLy8gSW5zZXJ0IHRoZSBgdmlld1Byb3ZpZGVyYCBpbnN0YW5jZXMuCiAgICAgICAgICAgIG11bHRpUmVzb2x2ZShmYWN0b3JpZXMsIHJlc3VsdCk7CiAgICAgICAgfQogICAgICAgIHJldHVybiByZXN1bHQ7CiAgICB9CiAgICAvKioKICAgICAqIE1hcHMgYW4gYXJyYXkgb2YgZmFjdG9yaWVzIGludG8gYW4gYXJyYXkgb2YgdmFsdWVzLgogICAgICogQHBhcmFtIHs/fSBmYWN0b3JpZXMKICAgICAqIEBwYXJhbSB7P30gcmVzdWx0CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBtdWx0aVJlc29sdmUoZmFjdG9yaWVzLCByZXN1bHQpIHsKICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGZhY3Rvcmllcy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGZhY3RvcnkgPSAoLyoqIEB0eXBlIHs/fSAqLyAoKC8qKiBAdHlwZSB7P30gKi8gKGZhY3Rvcmllc1tpXSkpKSk7CiAgICAgICAgICAgIHJlc3VsdC5wdXNoKGZhY3RvcnkoKSk7CiAgICAgICAgfQogICAgICAgIHJldHVybiByZXN1bHQ7CiAgICB9CiAgICAvKioKICAgICAqIENyZWF0ZXMgYSBtdWx0aSBmYWN0b3J5LgogICAgICogQHBhcmFtIHs/fSBmYWN0b3J5Rm4KICAgICAqIEBwYXJhbSB7P30gaW5kZXgKICAgICAqIEBwYXJhb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YgYSBkaXJlY3RpdmUgKG9yIGNvbXBvbmVudCksCiAgICAgKiBhbmQgcHVibGlzaCB0aGVtIGludG8gdGhlIERJIHN5c3RlbSwgbWFraW5nIGl0IHZpc2libGUgdG8gb3RoZXJzIGZvciBpbmplY3Rpb24uCiAgICAgKgogICAgICogRm9yIGV4YW1wbGU6CiAgICAgKiBgYGB0cwogICAgICogY2xhc3MgQ29tcG9uZW50V2l0aFByb3ZpZGVycyB7CiAgICAgKiAgIGNvbnN0cnVjdG9yKHByaXZhdGUgZ3JlZXRlcjogR3JlZXRlckRFKSB7fQogICAgICoKICAgICAqICAgc3RhdGljIMm1Y21wID0gZGVmaW5lQ29tcG9uZW50KHsKICAgICAqICAgICB0eXBlOiBDb21wb25lbnRXaXRoUHJvdmlkZXJzLAogICAgICogICAgIHNlbGVjdG9yczogW1snY29tcG9uZW50LXdpdGgtcHJvdmlkZXJzJ11dLAogICAgICogICAgZmFjdG9yeTogKCkgPT4gbmV3IENvbXBvbmVudFdpdGhQcm92aWRlcnMoZGlyZWN0aXZlSW5qZWN0KEdyZWV0ZXJERSBhcyBhbnkpKSwKICAgICAqICAgIGRlY2xzOiAxLAogICAgICogICAgdmFyczogMSwKICAgICAqICAgIHRlbXBsYXRlOiBmdW5jdGlvbihmczogUmVuZGVyRmxhZ3MsIGN0eDogQ29tcG9uZW50V2l0aFByb3ZpZGVycykgewogICAgICogICAgICBpZiAoZnMgJiBSZW5kZXJGbGFncy5DcmVhdGUpIHsKICAgICAqICAgICAgICDJtcm1dGV4dCgwKTsKICAgICAqICAgICAgfQogICAgICogICAgICBpZiAoZnMgJiBSZW5kZXJGbGFncy5VcGRhdGUpIHsKICAgICAqICAgICAgICDJtcm1dGV4dEludGVycG9sYXRlKGN0eC5ncmVldGVyLmdyZWV0KCkpOwogICAgICogICAgICB9CiAgICAgKiAgICB9LAogICAgICogICAgZmVhdHVyZXM6IFtQcm92aWRlcnNGZWF0dXJlKFtHcmVldGVyREVdKV0KICAgICAqICB9KTsKICAgICAqIH0KICAgICAqIGBgYAogICAgICoKICAgICAqIFxAY29kZUdlbkFwaQogICAgICogQHRlbXBsYXRlIFQKICAgICAqIEBwYXJhbSB7P30gcHJvdmlkZXJzCiAgICAgKiBAcGFyYW0gez89fSB2aWV3UHJvdmlkZXJzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiDJtcm1UHJvdmlkZXJzRmVhdHVyZShwcm92aWRlcnMsIHZpZXdQcm92aWRlcnMgPSBbXSkgewogICAgICAgIHJldHVybiAoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBkZWZpbml0aW9uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAoZGVmaW5pdGlvbikgPT4gewogICAgICAgICAgICBkZWZpbml0aW9uLnByb3ZpZGVyc1Jlc29sdmVyID0KICAgICAgICAgICAgICAgICgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZGVmCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez89fSBwcm9jZXNzUHJvdmlkZXJzRm4KICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChkZWYsIHByb2Nlc3NQcm92aWRlcnNGbikgPT4gewogICAgICAgICAgICAgICAgICAgIHJldHVybiBwcm92aWRlcnNSZXNvbHZlcihkZWYsIC8vCiAgICAgICAgICAgICAgICAgICAgcHJvY2Vzc1Byb3ZpZGVyc0ZuID8gcHJvY2Vzc1Byb3ZpZGVyc0ZuKHByb3ZpZGVycykgOiBwcm92aWRlcnMsIC8vCiAgICAgICAgICAgICAgICAgICAgdmlld1Byb3ZpZGVycyk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICB9KTsKICAgIH0KCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcgYWRkZWQgYnkgdHNpY2tsZQogICAgICogR2VuZXJhdGVkIGZyb206IHBhY2thZ2VzL2Nv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BNSVQtc3R5bGUgbGljZW5zZSB0aGF0IGNhbiBiZQogICAgICogZm91bmQgaW4gdGhlIExJQ0VOU0UgZmlsZSBhdCBodHRwczovL2FuZ3VsYXIuaW8vbGljZW5zZQogICAgICovCiAgICAvKioKICAgICAqIFxAZGVzY3JpcHRpb24gUmVwcmVzZW50cyB0aGUgdmVyc2lvbiBvZiBBbmd1bGFyCiAgICAgKgogICAgICogXEBwdWJsaWNBcGkKICAgICAqLwogICAgY2xhc3MgVmVyc2lvbiB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBmdWxsCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoZnVsbCkgewogICAgICAgICAgICB0aGlzLmZ1bGwgPSBmdWxsOwogICAgICAgICAgICB0aGlzLm1ham9yID0gZnVsbC5zcGxpdCgnLicpWzBdOwogICAgICAgICAgICB0aGlzLm1pbm9yID0gZnVsbC5zcGxpdCgnLicpWzFdOwogICAgICAgICAgICB0aGlzLnBhdGNoID0gZnVsbC5zcGxpdCgnLicpLnNsaWNlKDIpLmpvaW4oJy4nKTsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIFxAcHVibGljQXBpCiAgICAgKiBAdHlwZSB7P30KICAgICAqLwogICAgY29uc3QgVkVSU0lPTiA9IG5ldyBWZXJzaW9uKCc5LjEuMTInKTsKCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcgYWRkZWQgYnkgdHNpY2tsZQogICAgICogR2VuZXJhdGVkIGZyb206IHBhY2thZ2VzL2NvcmUvc3JjL2NoYW5nZV9kZXRlY3Rpb24vZGlmZmVycy9kZWZhdWx0X2l0ZXJhYmxlX2RpZmZlci50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICBjbGFzcyBEZWZhdWx0SXRlcmFibGVEaWZmZXJGYWN0b3J5IHsKICAgICAgICBjb25zdHJ1Y3RvcigpIHsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gb2JqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzdXBwb3J0cyhvYmopIHsKICAgICAgICAgICAgcmV0dXJuIGlzTGlzdExpa2VJdGVyYWJsZSQxKG9iaik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEB0ZW1wbGF0ZSBWCiAgICAgICAgICogQHBhcmFtIHs/PX0gdHJhY2tCeUZuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBjcmVhdGUodHJhY2tCeUZuKSB7CiAgICAgICAgICAgIHJldHVybiBuZXcgRGVmYXVsdEl0ZXJhYmxlRGlmZmVyKHRyYWNrQnlGbik7CiAgICAgICAgfQogICAgfQogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgdHJhY2tCeUlkZW50aXR5ID0gKC8qKgogICAgICogQHBhcmFtIHs/fSBpbmRleAogICAgICogQHBhcmFtIHs/fSBpdGVtCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICAoaW5kZXgsIGl0ZW0pID0+IGl0ZW0pOwogICAgLyoqCiAgICAgKiBAZGVwcmVjYXRlZCB2NC4wLjAgLSBTaG91bGQgbm90IGJlIHBhcnQgb2YgcHVibGljIEFQSS4KICAgICAqIFxAcHVibGljQXBpCiAgICAgKiBAdGVtcGxhdGUgVgogICAgICovCiAgICBjbGFzcyBEZWZhdWx0SXRlcmFibGVEaWZmZXIgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7Pz19IHRyYWNrQnlGbgogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKHRyYWNrQnlGbikgewogICAgICAgICAgICB0aGlzLmxlbmd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NrQnlGbiA9IHRyYWNrQnlGbiB8fCB0cmFja0J5SWRlbnRpdHk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZvckVhY2hJdGVtKGZuKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHJlY29yZDsKICAgICAgICAgICAgZm9yIChyZWNvcmQgPSB0aGlzLl9pdEhlYWQ7IHJlY29yZCAhPT0gbnVsbDsgcmVjb3JkID0gcmVjb3JkLl9uZXh0KSB7CiAgICAgICAgICAgICAgICBmbihyZWNvcmQpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZvckVhY2hPcGVyYXRpb24oZm4pIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgbmV4dEl0ID0gdGhpcy5faXRIZWFkOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBuZXh0UmVtb3ZlID0gdGhpcy5fcmVtb3ZhbHNIZWFkOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBhZGRSZW1vdmVPZmZzZXQgPSAwOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBtb3ZlT2Zmc2V0cyA9IG51bGw7CiAgICAgICAgICAgIHdoaWxlIChuZXh0SXQgfHwgbmV4dFJlbW92ZSkgewogICAgICAgICAgICAgICAgLy8gRmlndXJlIG91dCB3aGljaCBpcyB0aGUgbmV4dCByZWNvcmQgdG8gcHJvY2VzcwogICAgICAgICAgICAgICAgLy8gT3JkZXI6IHJlbW92ZSwgYWRkLCBtb3ZlCiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCByZWNvcmQgPSAhbmV4dFJlbW92ZSB8fAogICAgICAgICAgICAgICAgICAgIG5leHRJdCAmJgogICAgICAgICAgICAgICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAobmV4dEl0LmN1cnJlbnRJbmRleCkpIDwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdldFByZXZpb3VzSW5kZXgobmV4dFJlbW92ZSwgYWRkUmVtb3ZlT2Zmc2V0LCBtb3ZlT2Zmc2V0cykgPwogICAgICAgICAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovIChuZXh0SXQpKSA6CiAgICAgICAgICAgICAgICAgICAgbmV4dFJlbW92ZTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGFkalByZXZpb3VzSW5kZXggPSBnZXRQcmV2aW91c0luZGV4KHJlY29yZCwgYWRkUmVtb3ZlT2Zmc2V0LCBtb3ZlT2Zmc2V0cyk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBjdXJyZW50SW5kZXggPSByZWNvcmQuY3VycmVudEluZGV4OwogICAgICAgICAgICAgICAgLy8gY29uc3VtZSB0aGUgaXRlbSwgYW5kIGFkanVzdCB0aGUgYWRkUmVtb3ZlT2Zmc2V0IGFuZCB1cGRhdGUgbW92ZURpc3RhbmNlIGlmIG5lY2Vzc2FyeQogICAgICAgICAgICAgICAgaWYgKHJlY29yZCA9PT0gbmV4dFJlbW92ZSkgewogICAgICAgICAgICAgICAgICAgIGFkZFJlbW92ZU9mZnNldC0tOwogICAgICAgICAgICAgICAgICAgIG5leHRSZW1vdmUgPSBuZXh0UmVtb3ZlLl9uZXh0UmVtb3ZlZDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIG5leHRJdCA9ICgvKiogQHR5cGUgez99ICovIChuZXh0SXQpKS5fbmV4dDsKICAgICAgICAgICAgICAgICAgICBpZiAocmVjb3JkLnByZXZpb3VzSW5kZXggPT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgICAgICBhZGRSZW1vdmVPZmZzZXQrKzsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIElOVkFSSUFOVDogIGN1cnJlbnRJbmRleCA8IHByZXZpb3VzSW5kZXgKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFtb3ZlT2Zmc2V0cykKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1vdmVPZmZzZXRzID0gW107CiAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbG9jYWxNb3ZlUHJldmlvdXNJbmRleCA9IGFkalByZXZpb3VzSW5kZXggLSBhZGRSZW1vdmVPZmZzZXQ7CiAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbG9jYWxDdXJyZW50SW5kZXggPSAoLyoqIEB0eXBlIHs/fSAqLyAoY3VycmVudEluZGV4KSkgLSBhZGRSZW1vdmVPZmZzZXQ7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChsb2NhbE1vdmVQcmV2aW91c0luZGV4ICE9IGxvY2FsQ3VycmVudEluZGV4KSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGxvY2FsTW92ZVByZXZpb3VzSW5kZXg7IGkrKykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBvZmZzZXQgPSBpIDwgbW92ZU9mZnNldHMubGVuZ3RoID8gbW92ZU9mZnNldHNbaV0gOiAobW92ZU9mZnNldHNbaV0gPSAwKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgaW5kZXggPSBvZmZzZXQgKyBpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChsb2NhbEN1cnJlbnRJbmRleCA8PSBpbmRleCAmJiBpbmRleCA8IGxvY2FsTW92ZVByZXZpb3VzSW5kZXgpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbW92ZU9mZnNldHNbaV0gPSBvZmZzZXQgKyAxOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHByZXZpb3VzSW5kZXggPSByZWNvcmQucHJldmlvdXNJbmRleDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1vdmVPZmZzZXRzW3ByZXZpb3VzSW5kZXhdID0gbG9jYWxDdXJyZW50SW5kZXggLSBsb2NhbE1vdmVQcmV2aW91c0luZGV4OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKGFkalByZXZpb3VzSW5kZXggIT09IGN1cnJlbnRJbmRleCkgewogICAgICAgICAgICAgICAgICAgIGZuKHJlY29yZCwgYWRqUHJldmlvdXNJbmRleCwgY3VycmVudEluZGV4KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGZuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmb3JFYWNoUHJldmlvdXNJdGVtKGZuKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHJlY29yZDsKICAgICAgICAgICAgZm9yIChyZWNvcmQgPSB0aGlzLl9wcmV2aW91c0l0SGVhZDsgcmVjb3JkICE9PSBudWxsOyByZWNvcmQgPSByZWNvcmQuX25leHRQcmV2aW91cykgewogICAgICAgICAgICAgICAgZm4ocmVjb3JkKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGZuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmb3JFYWNoQWRkZWRJdGVtKGZuKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHJlY29yZDsKICAgICAgICAgICAgZm9yIChyZWNvcmQgPSB0aGlzLl9hZGRpdGlvbnNIZWFkOyByZWNvcmQgIT09IG51bGw7IHJlY29yZCA9IHJlY29yZC5fbmV4dEFkZGVkKSB7CiAgICAgICAgICAgICAgICBmbihyZWNvcmQpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZvckVhY2hNb3ZlZEl0ZW0oZm4pIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgcmVjb3JkOwogICAgICAgICAgICBmb3IgKHJlY29yZCA9IHRoaXMuX21vdmVzSGVhZDsgcmVjb3JkICE9PSBudWxsOyByZWNvcmQgPSByZWNvcmQuX25leHRNb3ZlZCkgewogICAgICAgICAgICAgICAgZm4ocmVjb3JkKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGZuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmb3JFYWNoUmVtb3ZlZEl0ZW0oZm4pIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgcmVjb3JkOwogICAgICAgICAgICBmb3IgKHJlY29yZCA9IHRoaXMuX3JlbW92YWxzSGVhZDsgcmVjb3JkICE9PSBudWxsOyByZWNvcmQgPSByZWNvcmQuX25leHRSZW1vdmVkKSB7CiAgICAgICAgICAgICAgICBmbihyZWNvcmQpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZvckVhY2hJZGVudGl0eUNoYW5nZShmbikgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCByZWNvcmQ7CiAgICAgICAgICAgIGZvciAocmVjb3JkID0gdGhpcy5faWRlbnRpdHlDaGFuZ2VzSGVhZDsgcmVjb3JkICE9PSBudWxsOyByZWNvcmQgPSByZWNvcmQuX25leHRJZGVudGl0eUNoYW5nZSkgewogICAgICAgICAgICAgICAgZm4ocmVjb3JkKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGNvbGxlY3Rpb24KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGRpZmYoY29sbGVjdGlvbikgewogICAgICAgICAgICBpZiAoY29sbGVjdGlvbiA9PSBudWxsKQogICAgICAgICAgICAgICAgY29sbGVjdGlvbiA9IFtdOwogICAgICAgICAgICBpZiAoIWlzTGlzdExpa2VJdGVyYWJsZSQxKGNvbGxlY3Rpb24pKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYEVycm9yIHRyeWluZyB0byBkaWZmICcke3N0cmluZ2lmeShjb2xsZWN0aW9uKX0nLiBPbmx5IGFycmF5cyBhbmQgaXRlcmFibGVzIGFyZSBhbGxvd2VkYCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHRoaXMuY2hlY2soY29sbGVjdGlvbikpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvbkRlc3Ryb3koKSB7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGNvbGxlY3Rpb24KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGNoZWNrKGNvbGxlY3Rpb24pIHsKICAgICAgICAgICAgdGhpcy5fcmVzZXQoKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgcmVjb3JkID0gdGhpcy5faXRIZWFkOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBtYXlCZURpcnR5ID0gZmFsc2U7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGluZGV4OwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBpdGVtOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBpdGVtVHJhY2tCeTsKICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoY29sbGVjdGlvbikpIHsKICAgICAgICAgICAgICAgICgoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpKS5sZW5ndGggPSBjb2xsZWN0aW9uLmxlbmd0aDsKICAgICAgICAgICAgICAgIGZvciAobGV0IGluZGV4ID0gMDsgaW5kZXggPCB0aGlzLmxlbmd0aDsgaW5kZXgrKykgewogICAgICAgICAgICAgICAgICAgIGl0ZW0gPSBjb2xsZWN0aW9uW2luZGV4XTsKICAgICAgICAgICAgICAgICAgICBpdGVtVHJhY2tCeSA9IHRoaXMuX3RyYWNrQnlGbihpbmRleCwgaXRlbSk7CiAgICAgICAgICAgICAgICAgICAgaWYgKHJlY29yZCA9PT0gbnVsbCB8fCAhbG9vc2VJZGVudGljYWwocmVjb3JkLnRyYWNrQnlJZCwgaXRlbVRyYWNrQnkpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJlY29yZCA9IHRoaXMuX21pc21hdGNoKHJlY29yZCwgaXRlbSwgaXRlbVRyYWNrQnksIGluZGV4KTsKICAgICAgICAgICAgICAgICAgICAgICAgbWF5QmVEaXJ0eSA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICBpZiAobWF5QmVEaXJ0eSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gVE9ETyhtaXNrbyk6IGNhbiB3ZSBsaW1pdCB0aGlzIHRvIGR1cGxpY2F0ZXMgb25seT8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlY29yZCA9IHRoaXMuX3ZlcmlmeVJlaW5zZXJ0aW9uKHJlY29yZCwgaXRlbSwgaXRlbVRyYWNrQnksIGluZGV4KTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWxvb3NlSWRlbnRpY2FsKHJlY29yZC5pdGVtLCBpdGVtKSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2FkZElkZW50aXR5Q2hhbmdlKHJlY29yZCwgaXRlbSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHJlY29yZCA9IHJlY29yZC5fbmV4dDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIGluZGV4ID0gMDsKICAgICAgICAgICAgICAgIGl0ZXJhdGVMaXN0TGlrZSQxKGNvbGxlY3Rpb24sICgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gaXRlbQogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKGl0ZW0pID0+IHsKICAgICAgICAgICAgICAgICAgICBpdGVtVHJhY2tCeSA9IHRoaXMuX3RyYWNrQnlGbihpbmRleCwgaXRlbSk7CiAgICAgICAgICAgICAgICAgICAgaWYgKHJlY29yZCA9PT0gbnVsbCB8fCAhbG9vc2VJZGVudGljYWwocmVjb3JkLnRyYWNrQnlJZCwgaXRlbVRyYWNrQnkpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJlY29yZCA9IHRoaXMuX21pc21hdGNoKHJlY29yZCwgaXRlbSwgaXRlbVRyYWNrQnksIGluZGV4KTsKICAgICAgICAgICAgICAgICAgICAgICAgbWF5QmVEaXJ0eSA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICBpZiAobWF5QmVEaXJ0eSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gVE9ETyhtaXNrbyk6IGNhbiB3ZSBsaW1pdCB0aGlzIHRvIGR1cGxpY2F0ZXMgb25seT8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlY29yZCA9IHRoaXMuX3ZlcmlmeVJlaW5zZXJ0aW9uKHJlY29yZCwgaXRlbSwgaXRlbVRyYWNrQnksIGluZGV4KTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWxvb3NlSWRlbnRpY2FsKHJlY29yZC5pdGVtLCBpdGVtKSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2FkZElkZW50aXR5Q2hhbmdlKHJlY29yZCwgaXRlbSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHJlY29yZCA9IHJlY29yZC5fbmV4dDsKICAgICAgICAgICAgICAgICAgICBpbmRleCsrOwogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgKCgvKiogQHR5cGUgez99ICovICh0aGlzKSkpLmxlbmd0aCA9IGluZGV4OwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX3RydW5jYXRlKHJlY29yZCk7CiAgICAgICAgICAgICgoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpKS5jb2xsZWN0aW9uID0gY29sbGVjdGlvbjsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuaXNEaXJ0eTsKICAgICAgICB9CiAgICAgICAgLyogQ29sbGVjdGlvbkNoYW5nZXMgaXMgY29uc2lkZXJlZCBkaXJ0eSBpZiBpdCBoYXMgYW55IGFkZGl0aW9ucywgbW92ZXMsIHJlbW92YWxzLCBvciBpZGVudGl0eQogICAgICAgICAgICogY2hhbmdlcy4KICAgICAgICAgICAqLwogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGlzRGlydHkoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9hZGRpdGlvbnNIZWFkICE9PSBudWxsIHx8IHRoaXMuX21vdmVzSGVhZCAhPT0gbnVsbCB8fAogICAgICAgICAgICAgICAgdGhpcy5fcmVtb3ZhbHNIZWFkICE9PSBudWxsIHx8IHRoaXMuX2lkZW50aXR5Q2hhbmdlc0hlYWQgIT09IG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJlc2V0IHRoZSBzdGF0ZSBvZiB0aGUgY2hhbmdlIG9iamVjdHMgdG8gc2hvdyBubyBjaGFuZ2VzLiBUaGlzIG1lYW5zIHNldCBwcmV2aW91c0tleSB0bwogICAgICAgICAqIGN1cnJlbnRLZXksIGFuZCBjbGVhciBhbGwgb2YgdGhlIHF1ZXVlcyAoYWRkaXRpb25zLCBtb3ZlcywgcmVtb3ZhbHMpLgogICAgICAgICAqIFNldCB0aGUgcHJldmlvdXNJbmRleGVzIG9mIG1vdmVkIGFuZCBhZGRlZCBpdGVtcyB0byB0aGVpciBjdXJyZW50SW5kZXhlcwogICAgICAgICAqIFJlc2V0IHRoZSBsaXN0IG9mIGFkZGl0aW9ucywgbW92ZXMgYW5kIHJlbW92YWxzCiAgICAgICAgICoKICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfcmVzZXQoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmlzRGlydHkpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCByZWNvcmQ7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBsZXQgbmV4dFJlY29yZDsKICAgICAgICAgICAgICAgIGZvciAocmVjb3JkID0gdGhpcy5fcHJldmlvdXNJdEhlYWQgPSB0aGlzLl9pdEhlYWQ7IHJlY29yZCAhPT0gbnVsbDsgcmVjb3JkID0gcmVjb3JkLl9uZXh0KSB7CiAgICAgICAgICAgICAgICAgICAgcmVjb3JkLl9uZXh0UHJldmlvdXMgPSByZWNvcmQuX25leHQ7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmb3IgKHJlY29yZCA9IHRoaXMuX2FkZGl0aW9uc0hlYWQ7IHJlY29yZCAhPT0gbnVsbDsgcmVjb3JkID0gcmVjb3JkLl9uZXh0QWRkZWQpIHsKICAgICAgICAgICAgICAgICAgICByZWNvcmQucHJldmlvdXNJbmRleCA9IHJlY29yZC5jdXJyZW50SW5kZXg7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLl9hZGRpdGlvbnNIZWFkID0gdGhpcy5fYWRkaXRpb25zVGFpbCA9IG51bGw7CiAgICAgICAgICAgICAgICBmb3IgKHJlY29yZCA9IHRoaXMuX21vdmVzSGVhZDsgcmVjb3JkICE9PSBudWxsOyByZWNvcmQgPSBuZXh0UmVjb3JkKSB7CiAgICAgICAgICAgICAgICAgICAgcmVjb3JkLnByZXZpb3VzSW5kZXggPSByZWNvcmQuY3VycmVudEluZGV4OwogICAgICAgICAgICAgICAgICAgIG5leHRSZWNvcmQgPSByZWNvcmQuX25leHRNb3ZlZDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuX21vdmVzSGVhZCA9IHRoaXMuX21vdmVzVGFpbCA9IG51bGw7CiAgICAgICAgICAgICAgICB0aGlzLl9yZW1vdmFsc0hlYWQgPSB0aGlzLl9yZW1vdmFsc1RhaWwgPSBudWxsOwogICAgICAgICAgICAgICAgdGhpcy5faWRlbnRpdHlDaGFuZ2VzSGVhZCA9IHRoaXMuX2lkZW50aXR5Q2hhbmdlc1RhaWwgPSBudWxsOwogICAgICAgICAgICAgICAgLy8gVE9ETyh2aWNiKTogd2hlbiBhc3NlcnQgZ2V0cyBzdXBwb3J0ZWQKICAgICAgICAgICAgICAgIC8vIGFzc2VydCghdGhpcy5pc0RpcnR5KTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBUaGlzIGlzIHRoZSBjb3JlIGZ1bmN0aW9uIHdoaWNoIGhhbmRsZXMgZGlmZmVyZW5jZXMgYmV0d2VlbiBjb2xsZWN0aW9ucy4KICAgICAgICAgKgogICAgICAgICAqIC0gYHJlY29yZGAgaXMgdGhlIHJlY29yZCB3aGljaCB3ZSBzYXcgYXQgdGhpcyBwb3NpdGlvbiBsYXN0IHRpbWUuIElmIG51bGwgdGhlbiBpdCBpcyBhIG5ldwogICAgICAgICAqICAgaXRlbS4KICAgICAgICAgKiAtIGBpdGVtYCBpcyB0aGUgY3VycmVudCBpdGVtIGluIHRoZSBjb2xsZWN0aW9uCiAgICAgICAgICogLSBgaW5kZXhgIGlzIHRoZSBwb3NpdGlvbiBvZiB0aGUgaXRlbSBpbiB0aGUgY29sbGVjdGlvbgogICAgICAgICAqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7P30gcmVjb3JkCiAgICAgICAgICogQHBhcmFtIHs/fSBpdGVtCiAgICAgICAgICogQHBhcmFtIHs/fSBpdGVtVHJhY2tCeQogICAgICAgICAqIEBwYXJhbSB7P30gaW5kZXgKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9taXNtYXRjaChyZWNvcmQsIGl0ZW0sIGl0ZW1UcmFja0J5LCBpbmRleCkgewogICAgICAgICAgICAvLyBUaGUgcHJldmlvdXMgcmVjb3JkIGFmdGVyIHdoaWNoIHdlIHdpbGwgYXBwZW5kIHRoZSBjdXJyZW50IG9uZS4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgcHJldmlvdXNSZWNvcmQ7CiAgICAgICAgICAgIGlmIChyZWNvcmQgPT09IG51bGwpIHsKICAgICAgICAgICAgICAgIHByZXZpb3VzUmVjb3JkID0gdGhpcy5faXRUYWlsOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgcHJldmlvdXNSZWNvcmQgPSByZWNvcmQuX3ByZXY7CiAgICAgICAgICAgICAgICAvLyBSZW1vdmUgdGhlIHJlY29yZCBmcm9tIHRoZSBjb2xsZWN0aW9uIHNpbmNlIHdlIGtub3cgaXQgZG9lcyBub3QgbWF0Y2ggdGhlIGl0ZW0uCiAgICAgICAgICAgICAgICB0aGlzLl9yZW1vdmUocmVjb3JkKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBBdHRlbXB0IHRvIHNlZSBpZiB3ZSBoYXZlIHNlZW4gdGhlIGl0ZW0gYmVmb3JlLgogICAgICAgICAgICByZWNvcmQgPSB0aGlzLl9saW5rZWRSZWNvcmRzID09PSBudWxsID8gbnVsbCA6IHR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hlY2sgaWYgaWRlbnRpdHkgY2hhbmdlZCwgc28gd2UgY2FuIHVwZGF0ZSBpbiB2aWV3IGlmIG5lY2Vzc2FyeQogICAgICAgICAgICAgICAgICAgIGlmICghbG9vc2VJZGVudGljYWwocmVjb3JkLml0ZW0sIGl0ZW0pKQogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9hZGRJZGVudGl0eUNoYW5nZShyZWNvcmQsIGl0ZW0pOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX3JlaW5zZXJ0QWZ0ZXIocmVjb3JkLCBwcmV2aW91c1JlY29yZCwgaW5kZXgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgLy8gSXQgaXMgYSBuZXcgaXRlbTogYWRkIGl0LgogICAgICAgICAgICAgICAgICAgIHJlY29yZCA9CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2FkZEFmdGVyKG5ldyBJdGVyYWJsZUNoYW5nZVJlY29yZF8oaXRlbSwgaXRlbVRyYWNrQnkpLCBwcmV2aW91c1JlY29yZCwgaW5kZXgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiByZWNvcmQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFRoaXMgY2hlY2sgaXMgb25seSBuZWVkZWQgaWYgYW4gYXJyYXkgY29udGFpbnMgZHVwbGljYXRlcy4gKFNob3J0IGNpcmN1aXQgb2Ygbm90aGluZyBkaXJ0eSkKICAgICAgICAgKgogICAgICAgICAqIFVzZSBjYXNlOiBgW2EsIGFdYCA9PiBgW2IsIGEsIGFdYAogICAgICAgICAqCiAgICAgICAgICogSWYgd2UgZGlkIG5vdCBoYXZlIHRoaXMgY2hlY2sgdGhlbiB0aGUgaW5zZXJ0aW9uIG9mIGBiYCB3b3VsZDoKICAgICAgICAgKiAgIDEpIGV2aWN0IGZpcnN0IGBhYAogICAgICAgICAqICA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diJyBhbmQgdGhlbiBhZGQgJ2EnCiAgICAgICAgICogYXQgdGhlIGVuZC4KICAgICAgICAgKgogICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgKiBAcGFyYW0gez99IHJlY29yZAogICAgICAgICAqIEBwYXJhbSB7P30gaXRlbQogICAgICAgICAqIEBwYXJhbSB7P30gaXRlbVRyYWNrQnkKICAgICAgICAgKiBAcGFyYW0gez99IGluZGV4CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfdmVyaWZ5UmVpbnNlcnRpb24ocmVjb3JkLCBpdGVtLCBpdGVtVHJhY2tCeSwgaW5kZXgpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgcmVpbnNlcnRSZWNvcmQgPSB0aGlzLl91bmxpbmtlZFJlY29yZHMgPT09IG51bGwgPyBudWxsIDogdGhpcy5fdW5saW5rZWRSZWNvcmRzLmdldChpdGVtVHJhY2tCeSwgbnVsbCk7CiAgICAgICAgICAgIGlmIChyZWluc2VydFJlY29yZCAhPT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmVjb3JkID0gdGhpcy5fcmVpbnNlcnRBZnRlcihyZWluc2VydFJlY29yZCwgKC8qKiBAdHlwZSB7P30gKi8gKHJlY29yZC5fcHJldikpLCBpbmRleCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAocmVjb3JkLmN1cnJlbnRJbmRleCAhPSBpbmRleCkgewogICAgICAgICAgICAgICAgcmVjb3JkLmN1cnJlbnRJbmRleCA9IGluZGV4OwogICAgICAgICAgICAgICAgdGhpcy5fYWRkVG9Nb3ZlcyhyZWNvcmQsIGluZGV4KTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gcmVjb3JkOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBHZXQgcmlkIG9mIGFueSBleGNlc3Mge1xAbGluayBJdGVyYWJsZUNoYW5nZVJlY29yZF99cyBmcm9tIHRoZSBwcmV2aW91cyBjb2xsZWN0aW9uCiAgICAgICAgICoKICAgICAgICAgKiAtIGByZWNvcmRgIFRoZSBmaXJzdCBleGNlc3Mge1xAbGluayBJdGVyYWJsZUNoYW5nZVJlY29yZF99LgogICAgICAgICAqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7P30gcmVjb3JkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfdHJ1bmNhdGUocmVjb3JkKSB7CiAgICAgICAgICAgIC8vIEFueXRoaW5nIGFmdGVyIHRoYXQgbmVlZHMgdG8gYmUgcmVtb3ZlZDsKICAgICAgICAgICAgd2hpbGUgKHJlY29yZCAhPT0gbnVsbCkgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgbmV4dFJlY29yZCA9IHJlY29yZC5fbmV4dDsKICAgICAgICAgICAgICAgIHRoaXMuX2FkZFRvUmVtb3ZhbHModGhpcy5fdW5saW5rKHJlY29yZCkpOwogICAgICAgICAgICAgICAgcmVjb3JkID0gbmV4dFJlY29yZDsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5fdW5saW5rZWRSZWNvcmRzICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICB0aGlzLl91bmxpbmtlZFJlY29yZHMuY2xlYXIoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5fYWRkaXRpb25zVGFpbCAhPT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5fYWRkaXRpb25zVGFpbC5fbmV4dEFkZGVkID0gbnVsbDsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5fbW92ZXNUYWlsICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9tb3Zlc1RhaWwuX25leHRNb3ZlZCA9IG51bGw7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHRoaXMuX2l0VGFpbCAhPT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5faXRUYWlsLl9uZXh0ID0gbnVsbDsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5fcmVtb3ZhbHNUYWlsICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9yZW1vdmFsc1RhaWwuX25leHRSZW1vdmVkID0gbnVsbDsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5faWRlbnRpdHlDaGFuZ2VzVGFpbCAhPT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5faWRlbnRpdHlDaGFuZ2VzVGFpbC5fbmV4dElkZW50aXR5Q2hhbmdlID0gbnVsbDsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICogQHBhcmFtIHs/fSByZWNvcmQKICAgICAgICAgKiBAcGFyYW0gez99IHByZXZSZWNvcmQKICAgICAgICAgKiBAcGFyYW0gez99IGluZGV4CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfcmVpbnNlcnRBZnRlcihyZWNvcmQsIHByZXZSZWNvcmQsIGluZGV4KSB7CiAgICAgICAgICAgIGlmICh0aGlzLl91bmxpbmtlZFJlY29yZHMgIT09IG51bGwpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3VubGlua2VkUmVjb3Jkcy5yZW1vdmUocmVjb3JkKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHByZXYgPSByZWNvcmQuX3ByZXZSZW1vdmVkOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG5leHQgPSByZWNvcmQuX25leHRSZW1vdmVkOwogICAgICAgICAgICBpZiAocHJldiA9PT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5fcmVtb3ZhbHNIZWFkID0gbmV4dDsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHByZXYuX25leHRSZW1vdmVkID0gbmV4dDsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAobmV4dCA9PT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5fcmVtb3ZhbHNUYWlsID0gcHJldjsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIG5leHQuX3ByZXZSZW1vdmVkID0gcHJldjsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9pbnNlcnRBZnRlcihyZWNvcmQsIHByZXZSZWNvcmQsIGluZGV4KTsKICAgICAgICAgICAgdGhpcy5fYWRkVG9Nb3ZlcyhyZWNvcmQsIGluZGV4KTsKICAgICAgICAgICAgcmV0dXJuIHJlY29yZDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7P30gcmVjb3JkCiAgICAgICAgICogQHBhcmFtIHs/fSBwcmV2UmVjb3JkCiAgICAgICAgICogQHBhcmFtIHs/fSBpbmRleAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX21vdmVBZnRlcihyZWNvcmQsIHByZXZSZWNvcmQsIGluZGV4KSB7CiAgICAgICAgICAgIHRoaXMuX3VubGluayhyZWNvcmQpOwogICAgICAgICAgICB0aGlzLl9pbnNlcnRBZnRlcihyZWNvcmQsIHByZXZSZWNvcmQsIGluZGV4KTsKICAgICAgICAgICAgdGhpcy5fYWRkVG9Nb3ZlcyhyZWNvcmQsIGluZGV4KTsKICAgICAgICAgICAgcmV0dXJuIHJlY29yZDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7P30gcmVjb3JkCiAgICAgICAgICogQHBhcmFtIHs/fSBwcmV2UmVjb3JkCiAgICAgICAgICogQHBhcmFtIHs/fSBpbmRleAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2FkZEFmdGVyKHJlY29yZCwgcHJldlJlY29yZCwgaW5kZXgpIHsKICAgICAgICAgICAgdGhpcy5faW5zZXJ0QWZ0ZXIocmVjb3JkLCBwcmV2UmVjb3JkLCBpbmRleCk7CiAgICAgICAgICAgIGlmICh0aGlzLl9hZGRpdGlvbnNUYWlsID09PSBudWxsKSB7CiAgICAgICAgICAgICAgICAvLyBUT0RPKHZpY2IpOgogICAgICAgICAgICAgICAgLy8gYXNzZXJ0KHRoaXMuX2FkZGl0aW9uc0hlYWQgPT09IG51bGwpOwogICAgICAgICAgICAgICAgdGhpcy5fYWRkaXRpb25zVGFpbCA9IHRoaXMuX2FkZGl0aW9uc0hlYWQgPSByZWNvcmQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAvLyBUT0RPKHZpY2IpOgogICAgICAgICAgICAgICAgLy8gYXNzZXJ0KF9hZGRpdGlvbnNUYWlsLl9uZXh0QWRkZWQgPT09IG51bGwpOwogICAgICAgICAgICAgICAgLy8gYXNzZXJ0KHJlY29yZC5fbmV4dEFkZGVkID09PSBudWxsKTsKICAgICAgICAgICAgICAgIHRoaXMuX2FkZGl0aW9uc1RhaWwgPSB0aGlzLl9hZGRpdGlvbnNUYWlsLl9uZXh0QWRkZWQgPSByZWNvcmQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHJlY29yZDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7P30gcmVjb3JkCiAgICAgICAgICogQHBhcmFtIHs/fSBwcmV2UmVjb3JkCiAgICAgICAgICogQHBhcmFtIHs/fSBpbmRleAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2luc2VydEFmdGVyKHJlY29yZCwgcHJldlJlY29yZCwgaW5kZXgpIHsKICAgICAgICAgICAgLy8gVE9ETyh2aWNiKToKICAgICAgICAgICAgLy8gYXNzZXJ0KHJlY29yZCAhPSBwcmV2UmVjb3JkKTsKICAgICAgICAgICAgLy8gYXNzZXJ0KHJlY29yZC5fbmV4dCA9PT0gbnVsbCk7CiAgICAgICAgICAgIC8vIGFzc2VydChyZWNvcmQuX3ByZXYgPT09IG51bGwpOwogICAgICAgICAgICAvLyBUT0RPKHZpY2IpOgogICAgICAgICAgICAvLyBhc3NlcnQocmVjb3JkICE9IHByZXZSZWNvcmQpOwogICAgICAgICAgICAvLyBhc3NlcnQocmVjb3JkLl9uZXh0ID09PSBudWxsKTsKICAgICAgICAgICAgLy8gYXNzZXJ0KHJlY29yZC5fcHJldiA9PT0gbnVsbCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbmV4dCA9IHByZXZSZWNvcmQgPT09IG51bGwgPyB0aGlzLl9pdEhlYWQgOiBwcmV2UmVjb3JkLl9uZXh0OwogICAgICAgICAgICAvLyBUT0RPKHZpY2IpOgogICAgICAgICAgICAvLyBhc3NlcnQobmV4dCAhPSByZWNvcmQpOwogICAgICAgICAgICAvLyBhc3NlcnQocHJldlJlY29yZCAhPSByZWNvcmQpOwogICAgICAgICAgICByZWNvcmQuX25leHQgPSBuZXh0OwogICAgICAgICAgICByZWNvcmQuX3ByZXYgPSBwcmV2UmVjb3JkOwogICAgICAgICAgICBpZiAobmV4dCA9PT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5faXRUYWlsID0gcmVjb3JkOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgbmV4dC5fcHJldiA9IHJlY29yZDsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAocHJldlJlY29yZCA9PT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5faXRIZWFkID0gcmVjb3JkOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgcHJldlJlY29yZC5fbmV4dCA9IHJlY29yZDsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5fbGlua2VkUmVjb3JkcyA9PT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5fbGlua2VkUmVjb3JkcyA9IG5ldyBfRHVwbGljYXRlTWFwKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fbGlua2VkUmVjb3Jkcy5wdXQocmVjb3JkKTsKICAgICAgICAgICAgcmVjb3JkLmN1cnJlbnRJbmRleCA9IGluZGV4OwogICAgICAgICAgICByZXR1cm4gcmVjb3JkOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICogQHBhcmFtIHs/fSByZWNvcmQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9yZW1vdmUocmVjb3JkKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9hZGRUb1JlbW92YWxzKHRoaXMuX3VubGluayhyZWNvcmQpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7P30gcmVjb3JkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfdW5saW5rKHJlY29yZCkgewogICAgICAgICAgICBpZiAodGhpcy5fbGlua2VkUmVjb3JkcyAhPT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5fbGlua2VkUmVjb3Jkcy5yZW1vdmUocmVjb3JkKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHByZXYgPSByZWNvcmQuX3ByZXY7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbmV4dCA9IHJlY29yZC5fbmV4dDsKICAgICAgICAgICAgLy8gVE9ETyh2aWNiKToKICAgICAgICAgICAgLy8gYXNzZXJ0KChyZWNvcmQuX3ByZXYgPSBudWxsKSA9PT0gbnVsbCk7CiAgICAgICAgICAgIC8vIGFzc2VydCgocmVjb3JkLl9uZXh0ID0gbnVsbCkgPT09IG51bGwpOwogICAgICAgICAgICBpZiAocHJldiA9PT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5faXRIZWFkID0gbmV4dDsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHByZXYuX25leHQgPSBuZXh0OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChuZXh0ID09PSBudWxsKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9pdFRhaWwgPSBwcmV2OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgbmV4dC5fcHJldiA9IHByZXY7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHJlY29yZDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7P30gcmVjb3JkCiAgICAgICAgICogQHBhcmFtIHs/fSB0b0luZGV4CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfYWRkVG9Nb3ZlcyhyZWNvcmQsIHRvSW5kZXgpIHsKICAgICAgICAgICAgLy8gVE9ETyh2aWNiKToKICAgICAgICAgICAgLy8gYXNzZXJ0KHJlY29yZC5fbmV4dE1vdmVkID09PSBudWxsKTsKICAgICAgICAgICAgaWYgKHJlY29yZC5wcmV2aW91c0luZGV4ID09PSB0b0luZGV4KSB7CiAgICAgICAgICAgICAgICByZXR1cm4gcmVjb3JkOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0aGlzLl9tb3Zlc1RhaWwgPT09IG51bGwpIHsKICAgICAgICAgICAgICAgIC8vIFRPRE8odmljYik6CiAgICAgICAgICAgICAgICAvLyBhc3NlcnQoX21vdmVzSGVhZCA9PT0gbnVsbCk7CiAgICAgICAgICAgICAgICB0aGlzLl9tb3Zlc1RhaWwgPSB0aGlzLl9tb3Zlc0hlYWQgPSByZWNvcmQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAvLyBUT0RPKHZpY2IpOgogICAgICAgICAgICAgICAgLy8gYXNzZXJ0KF9tb3Zlc1RhaWwuX25leHRNb3ZlZCA9PT0gbnVsbCk7CiAgICAgICAgICAgICAgICB0aGlzLl9tb3Zlc1RhaWwgPSB0aGlzLl9tb3Zlc1RhaWwuX25leHRNb3ZlZCA9IHJlY29yZDsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gcmVjb3JkOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gcmVjb3JkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfYWRkVG9SZW1vdmFscyhyZWNvcmQpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX3VubGlua2VkUmVjb3JkcyA9PT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5fdW5saW5rZWRSZWNvcmRzID0gbmV3IF9EdXBsaWNhdGVNYXAoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl91bmxpbmtlZFJlY29yZHMucHV0KHJlY29yZCk7CiAgICAgICAgICAgIHJlY29yZC5jdXJyZW50SW5kZXggPSBudWxsOwogICAgICAgICAgICByZWNvcmQuX25leHRSZW1vdmVkID0gbnVsbDsKICAgICAgICAgICAgaWYgKHRoaXMuX3JlbW92YWxzVGFpbCA9PT0gbnVsbCkgewogICAgICAgICAgICAgICAgLy8gVE9ETyh2aWNiKToKICAgICAgICAgICAgICAgIC8vIGFzc2VydChfcmVtb3ZhbHNIZWFkID09PSBudWxsKTsKICAgICAgICAgICAgICAgIHRoaXMuX3JlbW92YWxzVGFpbCA9IHRoaXMuX3JlbW92YWxzSGVhZCA9IHJlY29yZDsKICAgICAgICAgICAgICAgIHJlY29yZC5fcHJldlJlbW92ZWQgPSBudWxsOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgLy8gVE9ETyh2aWNiKToKICAgICAgICAgICAgICAgIC8vIGFzc2VydChfcmVtb3ZhbHNUYWlsLl9uZXh0UmVtb3ZlZCA9PT0gbnVsbCk7CiAgICAgICAgICAgICAgICAvLyBhc3NlcnQocmVjb3JkLl9uZXh0UmVtb3ZlZCA9PT0gbnVsbCk7CiAgICAgICAgICAgICAgICByZWNvcmQuX3ByZXZSZW1vdmVkID0gdGhpcy5fcmVtb3ZhbHNUYWlsOwogICAgICAgICAgICAgICAgdGhpcy5fcmVtb3ZhbHNUYWlsID0gdGhpcy5fcmVtb3ZhbHNUYWlsLl9uZXh0UmVtb3ZlZCA9IHJlY29yZDsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gcmVjb3JkOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICogQHBhcmFtIHs/fSByZWNvcmQKICAgICAgICAgKiBAcGFyYW0gez99IGl0ZW0KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9hZGRJZGVudGl0eUNoYW5nZShyZWNvcmQsIGl0ZW0pIHsKICAgICAgICAgICAgcmVjb3JkLml0ZW0gPSBpdGVtOwogICAgICAgICAgICBpZiAodGhpcy5faWRlbnRpdHlDaGFuZ2VzVGFpbCA9PT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5faWRlbnRpdHlDaGFuZ2VzVGFpbCA9IHRoaXMuX2lkZW50aXR5Q2hhbmdlc0hlYWQgPSByZWNvcmQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLl9pZGVudGl0eUNoYW5nZXNUYWlsID0gdGhpcy5faWRlbnRpdHlDaGFuZ2VzVGFpbC5fbmV4dElkZW50aXR5Q2hhbmdlID0gcmVjb3JkOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiByZWNvcmQ7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBAdGVtcGxhdGUgVgogICAgICovCiAgICBjbGFzcyBJdGVyYWJsZUNoYW5nZVJlY29yZF8gewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gaXRlbQogICAgICAgICAqIEBwYXJhbSB7P30gdHJhY2tCeUlkCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoaXRlbSwgdHJhY2tCeUlkKSB7CiAgICAgICAgICAgIHRoaXMuaXRlbSA9IGl0ZW07CiAgICAgICAgICAgIHRoaXMudHJhY2tCeUlkID0gdHJhY2tCeUlkOwogICAgICAgICAgICB0aGlzLmN1cnJlbnRJbmRleCA9IG51bGw7CiAgICAgICAgICAgIHRoaXMucHJldmlvdXNJbmRleCA9IG51bGw7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9uZXh0UHJldmlvdXMgPSBudWxsOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fcHJldiA9IG51bGw7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9uZXh0ID0gbnVsbDsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX3ByZXZEdXAgPSBudWxsOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fbmV4dER1cCA9IG51bGw7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9wcmV2UmVtb3ZlZCA9IG51bGw7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9uZXh0UmVtb3ZlZCA9IG51bGw7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9uZXh0QWRkZWQgPSBudWxsOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fbmV4dE1vdmVkID0gbnVsbDsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX25leHRJZGVudGl0eUNoYW5nZSA9IG51bGw7CiAgICAgICAgfQogICAgfQogICAgLy8gQSBsaW5rZWQgbGlzdCBvZiBDb2xsZWN0aW9uQ2hhbmdlUmVjb3JkcyB3aXRoIHRoZSBzYW1lIEl0ZXJhYmxlQ2hhbmdlUmVjb3JkXy5pdGVtCiAgICAvKioKICAgICAqIEB0ZW1wbGF0ZSBWCiAgICAgKi8KICAgIGNsYXNzIF9EdXBsaWNhdGVJdGVtUmVjb3JkTGlzdCB7CiAgICAgICAgY29uc3RydWN0b3IoKSB7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9oZWFkID0gbnVsbDsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX3RhaWwgPSBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBcHBlbmQgdGhlIHJlY29yZCB0byB0aGUgbGlzdCBvZiBkdXBsaWNhdGVzLgogICAgICAgICAqCiAgICAgICAgICogTm90ZTogYnkgZGVzaWduIGFsbCByZWNvcmRzIGluIHRoZSBsaXN0IG9mIGR1cGxpY2F0ZXMgaG9sZCB0aGUgc2FtZSB2YWx1ZSBpbiByZWNvcmQuaXRlbS4KICAgICAgICAgKiBAcGFyYW0gez99IHJlY29yZAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYWRkKHJlY29yZCkgewogICAgICAgICAgICBpZiAodGhpcy5faGVhZCA9PT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5faGVhZCA9IHRoaXMuX3RhaWwgPSByZWNvcmQ7CiAgICAgICAgICAgICAgICByZWNvcmQuX25leHREdXAgPSBudWxsOwogICAgICAgICAgICAgICAgcmVjb3JkLl9wcmV2RHVwID0gbnVsbDsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIC8vIFRPRE8odmljYik6CiAgICAgICAgICAgICAgICAvLyBhc3NlcnQocmVjb3JkLml0ZW0gPT0gIF9oZWFkLml0ZW0gfHwKICAgICAgICAgICAgICAgIC8vICAgICAgIHJlY29yZC5pdGVtIGlzIG51bSAmJiByZWNvcmQuaXRlbS5pc05hTiAmJiBfaGVhZC5pdGVtIGlzIG51bSAmJiBfaGVhZC5pdGVtLmlzTmFOKTsKICAgICAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovICh0aGlzLl90YWlsKSkuX25leHREdXAgPSByZWNvcmQ7CiAgICAgICAgICAgICAgICByZWNvcmQuX3ByZXZEdXAgPSB0aGlzLl90YWlsOwogICAgICAgICAgICAgICAgcmVjb3JkLl9uZXh0RHVwID0gbnVsbDsKICAgICAgICAgICAgICAgIHRoaXMuX3RhaWwgPSByZWNvcmQ7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLy8gUmV0dXJucyBhIEl0ZXJhYmxlQ2hhbmdlUmVjb3JkXyBoYXZpbmcgSXRlcmFibGVDaGFuZ2VSZWNvcmRfLnRyYWNrQnlJZCA9PSB0cmFja0J5SWQgYW5kCiAgICAgICAgLy8gSXRlcmFibGVDaGFuZ2VSZWNvcmRfLmN1cnJlbnRJbmRleCA+PSBhdE9yQWZ0ZXJJbmRleAogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdHJhY2tCeUlkCiAgICAgICAgICogQHBhcmFtIHs/fSBhdE9yQWZ0ZXJJbmRleAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0KHRyYWNrQnlJZCwgYXRPckFmdGVySW5kZXgpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgcmVjb3JkOwogICAgICAgICAgICBmb3IgKHJlY29yZCA9IHRoaXMuX2hlYWQ7IHJlY29yZCAhPT0gbnVsbDsgcmVjb3JkID0gcmVjb3JkLl9uZXh0RHVwKSB7CiAgICAgICAgICAgICAgICBpZiAoKGF0T3JBZnRlckluZGV4ID09PSBudWxsIHx8IGF0T3JBZnRlckluZGV4IDw9ICgvKiogQHR5cGUgez99ICovIChyZWNvcmQuY3VycmVudEluZGV4KSkpICYmCiAgICAgICAgICAgICAgICAgICAgbG9vc2VJZGVudGljYWwocmVjb3JkLnRyYWNrQnlJZCwgdHJhY2tCeUlkKSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiByZWNvcmQ7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJlbW92ZSBvbmUge1xAbGluayBJdGVyYWJsZUNoYW5nZVJlY29yZF99IGZyb20gdGhlIGxpc3Qgb2YgZHVwbGljYXRlcy4KICAgICAgICAgKgogICAgICAgICAqIFJldHVybnMgd2hldGhlciB0aGUgbGlzdCBvZiBkdXBsaWNhdGVzIGlzIGVtcHR5LgogICAgICAgICAqIEBwYXJhbSB7P30gcmVjb3JkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZW1vdmUocmVjb3JkKSB7CiAgICAgICAgICAgIC8vIFRPRE8odmljYik6CiAgICAgICAgICAgIC8vIGFzc2VydCgoKSB7CiAgICAgICAgICAgIC8vICAvLyB2ZXJpZnkgdGhhdCB0aGUgcmVjb3JkIGJlaW5nIHJlbW92ZWQgaXMgaW4gdGhlIGxpc3QuCiAgICAgICAgICAgIC8vICBmb3IgKEl0ZXJhYmxlQ2hhbmdlUmVjb3JkXyBjdXJzb3IgPSBfaGVhZDsgY3Vyc29yICE9IG51bGw7IGN1cnNvciA9IGN1cnNvci5fbmV4dER1cCkgewogICAgICAgICAgICAvLyAgICBpZiAoaWRlbnRpY2FsKGN1cnNvciwgcmVjb3JkKSkgcmV0dXJuIHRydWU7CiAgICAgICAgICAgIC8vICB9CiAgICAgICAgICAgIC8vICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgIC8vfSk7CiAgICAgICAgICAgIC8vIFRPRE8odmljYik6CiAgICAgICAgICAgIC8vIGFzc2VydCgoKSB7CiAgICAgICAgICAgIC8vICAvLyB2ZXJpZnkgdGhhdCB0aGUgcmVjb3JkIGJlaW5nIHJlbW92ZWQgaXMgaW4gdGhlIGxpc3QuCiAgICAgICAgICAgIC8vICBmb3IgKEl0ZXJhYmxlQ2hhbmdlUmVjb3JkXyBjdXJzb3IgPSBfaGVhZDsgY3Vyc29yICE9IG51bGw7IGN1cnNvciA9IGN1cnNvci5fbmV4dER1cCkgewogICAgICAgICAgICAvLyAgICBpZiAoaWRlbnRpY2FsKGN1cnNvciwgcmVjb3JkKSkgcmV0dXJuIHRydWU7CiAgICAgICAgICAgIC8vICB9CiAgICAgICAgICAgIC8vICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgIC8vfSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcHJldiA9IHJlY29yZC5fcHJldkR1cDsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBuZXh0ID0gcmVjb3JkLl9uZXh0RHVwOwogICAgICAgICAgICBpZiAocHJldiA9PT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5faGVhZCA9IG5leHQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBwcmV2Ll9uZXh0RHVwID0gbmV4dDsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAobmV4dCA9PT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5fdGFpbCA9IHByZXY7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBuZXh0Ll9wcmV2RHVwID0gcHJldjsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpcy5faGVhZCA9PT0gbnVsbDsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEB0ZW1wbGF0ZSBWCiAgICAgKi8KICAgIGNsYXNzIF9EdXBsaWNhdGVNYXAgewogICAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgICAgICB0aGlzLm1hcCA9IG5ldyBNYXAoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSByZWNvcmQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHB1dChyZWNvcmQpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBrZXkgPSByZWNvcmQudHJhY2tCeUlkOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBkdXBsaWNhdGVzID0gdGhpcy5tYXAuZ2V0KGtleSk7CiAgICAgICAgICAgIGlmICghZHVwbGljYXRlcykgewogICAgICAgICAgICAgICAgZHVwbGljYXRlcyA9IG5ldyBfRHVwbGljYXRlSXRlbVJlY29yZExpc3QoKTsKICAgICAgICAgICAgICAgIHRoaXMubWFwLnNldChrZXksIGR1cGxpY2F0ZXMpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGR1cGxpY2F0ZXMuYWRkKHJlY29yZCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJldHJpZXZlIHRoZSBgdmFsdWVgIHVzaW5nIGtleS4gQmVjYXVzZSB0aGUgSXRlcmFibGVDaGFuZ2VSZWNvcmRfIHZhbHVlIG1heSBiZSBvbmUgd2hpY2ggd2UKICAgICAgICAgKiBoYXZlIGFscmVhZHkgaXRlcmF0ZWQgb3Zlciwgd2UgdXNlIHRoZSBgYXRPckFmdGVySW5kZXhgIHRvIHByZXRlbmQgaXQgaXMgbm90IHRoZXJlLgogICAgICAgICAqCiAgICAgICAgICogVXNlIGNhc2U6IGBbYSwgYiwgYywgYSwgYV1gIGlmIHdlIGFyZSBhdCBpbmRleCBgM2Agd2hpY2ggaXMgdGhlIHNlY29uZCBgYWAgdGhlbiBhc2tpbmcgaWYgd2UKICAgICAgICAgKiBoYXZlIGFueSBtb3JlIGBhYHMgbmVlZHMgdG8gcmV0dXJuIHRoZSBzZWNvbmQgYGFgLgogICAgICAgICAqIEBwYXJhbSB7P30gdHJhY2tCeUlkCiAgICAgICAgICogQHBhcmFtIHs/fSBhdE9yQWZ0ZXJJbmRleAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0KHRyYWNrQnlJZCwgYXRPckFmdGVySW5kZXgpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBrZXkgPSB0cmFja0J5SWQ7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcmVjb3JkTGlzdCA9IHRoaXMubWFwLmdldChrZXkpOwogICAgICAgICAgICByZXR1cm4gcmVjb3JkTGlzdCA/IHJlY29yZExpc3QuZ2V0KHRyYWNrQnlJZCwgYXRPckFmdGVySW5kZXgpIDogbnVsbDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmVtb3ZlcyBhIHtcQGxpbmsgSXRlcmFibGVDaGFuZ2VSZWNvcmRffSBmcm9tIHRoZSBsaXN0IG9mIGR1cGxpY2F0ZXMuCiAgICAgICAgICoKICAgICAgICAgKiBUaGUgbGlzdCBvZiBkdXBsaWNhdGVzIGFsc28gaXMgcmVtb3ZlZCBmcm9tIHRoZSBtYXAgaWYgaXQgZ2V0cyBlbXB0eS4KICAgICAgICAgKiBAcGFyYW0gez99IHJlY29yZAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVtb3ZlKHJlY29yZCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGtleSA9IHJlY29yZC50cmFja0J5SWQ7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcmVjb3JkTGlzdCA9ICgvKiogQHR5cGUgez99ICovICh0aGlzLm1hcC5nZXQoa2V5KSkpOwogICAgICAgICAgICAvLyBSZW1vdmUgdGhlIGxpc3Qgb2YgZHVwbGljYXRlcyB3aGVuIGl0IGdldHMgZW1wdHkKICAgICAgICAgICAgaWYgKHJlY29yZExpc3QucmVtb3ZlKHJlY29yZCkpIHsKICAgICAgICAgICAgICAgIHRoaXMubWFwLmRlbGV0ZShrZXkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiByZWNvcmQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGlzRW1wdHkoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLm1hcC5zaXplID09PSAwOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGNsZWFyKCkgewogICAgICAgICAgICB0aGlzLm1hcC5jbGVhcigpOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBpdGVtCiAgICAgKiBAcGFyYW0gez99IGFkZFJlbW92ZU9mZnNldAogICAgICogQHBhcmFtIHs/fSBtb3ZlT2Zmc2V0cwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0UHJldmlvdXNJbmRleChpdGVtLCBhZGRSZW1vdmVPZmZzZXQsIG1vdmVPZmZzZXRzKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHByZXZpb3VzSW5kZXggPSBpdGVtLnByZXZpb3VzSW5kZXg7CiAgICAgICAgaWYgKHByZXZpb3VzSW5kZXggPT09IG51bGwpCiAgICAgICAgICAgIHJldHVybiBwcmV2aW91c0luZGV4OwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgbW92ZU9mZnNldCA9IDA7CiAgICAgICAgaWYgKG1vdmVPZmZzZXRzICYmIHByZXZpb3VzSW5kZXggPCBtb3ZlT2Zmc2V0cy5sZW5ndGgpIHsKICAgICAgICAgICAgbW92ZU9mZnNldCA9IG1vdmVPZmZzZXRzW3ByZXZpb3VzSW5kZXhdOwogICAgICAgIH0KICAgICAgICByZXR1cm4gcHJldmlvdXNJbmRleCArIGFkZFJlbW92ZU9mZnNldCArIG1vdmVPZmZzZXQ7CiAgICB9CgogICAgLyoqCiAgICAgKiBAZmlsZW92ZXJ2aWV3IGFkZGVkIGJ5IHRzaWNrbGUKICAgICAqIEdlbmVyYXRlZCBmcm9tOiBwYWNrYWdlcy9jb3JlL3NyYy9jaGFuZ2VfZGV0ZWN0aW9uL2RpZmZlcnMvZGVmYXVsdF9rZXl2YWx1ZV9kaWZmZXIudHMKICAgICAqIEBzdXBwcmVzcyB7Y2hlY2tUeXBlcyxjb25zdGFudFByb3BlcnR5LGV4dHJhUmVxdWlyZSxtaXNzaW5nT3ZlcnJpZGUsbWlzc2luZ1JldHVybix1bnVzZWRQcml2YXRlTWVtYmVycyx1c2VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgLyoqCiAgICAgKiBAdGVtcGxhdGUgSywgVgogICAgICovCiAgICBjbGFzcyBEZWZhdWx0S2V5VmFsdWVEaWZmZXJGYWN0b3J5IHsKICAgICAgICBjb25zdHJ1Y3RvcigpIHsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gb2JqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzdXBwb3J0cyhvYmopIHsKICAgICAgICAgICAgcmV0dXJuIG9iaiBpbnN0YW5jZW9mIE1hcCB8fCBpc0pzT2JqZWN0JDEob2JqKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHRlbXBsYXRlIEssIFYKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGNyZWF0ZSgpIHsKICAgICAgICAgICAgcmV0dXJuIG5ldyBEZWZhdWx0S2V5VmFsdWVEaWZmZXIoKTsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEB0ZW1wbGF0ZSBLLCBWCiAgICAgKi8KICAgIGNsYXNzIERlZmF1bHRLZXlWYWx1ZURpZmZlciB7CiAgICAgICAgY29uc3RydWN0b3IoKSB7CiAgICAgICAgICAgIHRoaXMuX3JlY29yZHMgPSBuZXcgTWFwKCk7CiAgICAgICAgICAgIHRoaXMuX21hcEhlYWQgPSBudWxsOwogICAgICAgICAgICAvLyBfYXBwZW5kQWZ0ZXIgaXMgdXNlZCBpbiB0aGUgY2hlY2sgbG9vcAogICAgICAgICAgICB0aGlzLl9hcHBlbmRBZnRlciA9IG51bGw7CiAgICAgICAgICAgIHRoaXMuX3ByZXZpb3VzTWFwSGVhZCA9IG51bGw7CiAgICAgICAgICAgIHRoaXMuX2NoYW5nZXNIZWFkID0gbnVsbDsKICAgICAgICAgICAgdGhpcy5fY2hhbmdlc1RhaWwgPSBudWxsOwogICAgICAgICAgICB0aGlzLl9hZGRpdGlvbnNIZWFkID0gbnVsbDsKICAgICAgICAgICAgdGhpcy5fYWRkaXRpb25zVGFpbCA9IG51bGw7CiAgICAgICAgICAgIHRoaXMuX3JlbW92YWxzSGVhZCA9IG51bGw7CiAgICAgICAgICAgIHRoaXMuX3JlbW92YWxzVGFpbCA9IG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGlzRGlydHkoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9hZGRpdGlvbnNIZWFkICE9PSBudWxsIHx8IHRoaXMuX2NoYW5nZXNIZWFkICE9PSBudWxsIHx8CiAgICAgICAgICAgICAgICB0aGlzLl9yZW1vdmFsc0hlYWQgIT09IG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZvckVhY2hJdGVtKGZuKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHJlY29yZDsKICAgICAgICAgICAgZm9yIChyZWNvcmQgPSB0aGlzLl9tYXBIZWFkOyByZWNvcmQgIT09IG51bGw7IHJlY29yZCA9IHJlY29yZC5fbmV4dCkgewogICAgICAgICAgICAgICAgZm4ocmVjb3JkKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGZuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmb3JFYWNoUHJldmlvdXNJdGVtKGZuKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHJlY29yZDsKICAgICAgICAgICAgZm9yIChyZWNvcmQgPSB0aGlzLl9wcmV2aW91c01hcEhlYWQ7IHJlY29yZCAhPT0gbnVsbDsgcmVjb3JkID0gcmVjb3JkLl9uZXh0UHJldmlvdXMpIHsKICAgICAgICAgICAgICAgIGZuKHJlY29yZCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZm9yRWFjaENoYW5nZWRJdGVtKGZuKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHJlY29yZDsKICAgICAgICAgICAgZm9yIChyZWNvcmQgPSB0aGlzLl9jaGFuZ2VzSGVhZDsgcmVjb3JkICE9PSBudWxsOyByZWNvcmQgPSByZWNvcmQuX25leHRDaGFuZ2VkKSB7CiAgICAgICAgICAgICAgICBmbihyZWNvcmQpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZvckVhY2hBZGRlZEl0ZW0oZm4pIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgcmVjb3JkOwogICAgICAgICAgICBmb3IgKHJlY29yZCA9IHRoaXMuX2FkZGl0aW9uc0hlYWQ7IHJlY29yZCAhPT0gbnVsbDsgcmVjb3JkID0gcmVjb3JkLl9uZXh0QWRkZWQpIHsKICAgICAgICAgICAgICAgIGZuKHJlY29yZCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZm9yRWFjaFJlbW92ZWRJdGVtKGZuKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHJlY29yZDsKICAgICAgICAgICAgZm9yIChyZWNvcmQgPSB0aGlzLl9yZW1vdmFsc0hlYWQ7IHJlY29yZCAhPT0gbnVsbDsgcmVjb3JkID0gcmVjb3JkLl9uZXh0UmVtb3ZlZCkgewogICAgICAgICAgICAgICAgZm4ocmVjb3JkKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez89fSBtYXAKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGRpZmYobWFwKSB7CiAgICAgICAgICAgIGlmICghbWFwKSB7CiAgICAgICAgICAgICAgICBtYXAgPSBuZXcgTWFwKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoIShtYXAgaW5zdGFuY2VvZiBNYXAgfHwgaXNKc09iamVjdCQxKG1hcCkpKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYEVycm9yIHRyeWluZyB0byBkaWZmICcke3N0cmluZ2lmeShtYXApfScuIE9ubHkgbWFwcyBhbmQgb2JqZWN0cyBhcmUgYWxsb3dlZGApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0aGlzLmNoZWNrKG1hcCkgPyB0aGlzIDogbnVsbDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvbkRlc3Ryb3koKSB7IH0KICAgICAgICAvKioKICAgICAgICAgKiBDaGVjayB0aGUgY3VycmVudCBzdGF0ZSBvZiB0aGUgbWFwIHZzIHRoZSBwcmV2aW91cy4KICAgICAgICAgKiBUaGUgYWxnb3JpdGhtIGlzIG9wdGltaXNlZCBmb3Igd2hlbiB0aGUga2V5cyBkbyBubyBjaGFuZ2UuCiAgICAgICAgICogQHBhcmFtIHs/fSBtYXAKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGNoZWNrKG1hcCkgewogICAgICAgICAgICB0aGlzLl9yZXNldCgpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBpbnNlcnRCZWZvcmUgPSB0aGlzLl9tYXBIZWFkOwogICAgICAgICAgICB0aGlzLl9hcHBlbmRBZnRlciA9IG51bGw7CiAgICAgICAgICAgIHRoaXMuX2ZvckVhY2gobWFwLCAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBrZXkKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICh2YWx1ZSwga2V5KSA9PiB7CiAgICAgICAgICAgICAgICBpZiAoaW5zZXJ0QmVmb3JlICYmIGluc2VydEJlZm9yZS5rZXkgPT09IGtleSkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX21heWJlQWRkVG9DaGFuZ2VzKGluc2VydEJlZm9yZSwgdmFsdWUpOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX2FwcGVuZEFmdGVyID0gaW5zZXJ0QmVmb3JlOwogICAgICAgICAgICAgICAgICAgIGluc2VydEJlZm9yZSA9IGluc2VydEJlZm9yZS5fbmV4dDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCByZWNvcmQgPSB0aGlzLl9nZXRPckNyZWF0ZVJlY29yZEZvcktleShrZXksIHZhbHVlKTsKICAgICAgICAgICAgICAgICAgICBpbnNlcnRCZWZvcmUgPSB0aGlzLl9pbnNlcnRCZWZvcmVPckFwcGVuZChpbnNlcnRCZWZvcmUsIHJlY29yZCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgLy8gSXRlbXMgcmVtYWluaW5nIGF0IHRoZSBlbmQgb2YgdGhlIGxpc3QgaGF2ZSBiZWVuIGRlbGV0ZWQKICAgICAgICAgICAgaWYgKGluc2VydEJlZm9yZSkgewogICAgICAgICAgICAgICAgaWYgKGluc2VydEJlZm9yZS5fcHJldikgewogICAgICAgICAgICAgICAgICAgIGluc2VydEJlZm9yZS5fcHJldi5fbmV4dCA9IG51bGw7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLl9yZW1vdmFsc0hlYWQgPSBpbnNlcnRCZWZvcmU7CiAgICAgICAgICAgICAgICBmb3IgKGxldCByZWNvcmQgPSBpbnNlcnRCZWZvcmU7IHJlY29yZCAhPT0gbnVsbDsgcmVjb3JkID0gcmVjb3JkLl9uZXh0UmVtb3ZlZCkgewogICAgICAgICAgICAgICAgICAgIGlmIChyZWNvcmQgPT09IHRoaXMuX21hcEhlYWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fbWFwSGVhZCA9IG51bGw7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHRoaXMuX3JlY29yZHMuZGVsZXRlKHJlY29yZC5rZXkpOwogICAgICAgICAgICAgICAgICAgIHJlY29yZC5fbmV4dFJlbW92ZWQgPSByZWNvcmQuX25leHQ7CiAgICAgICAgICAgICAgICAgICAgcmVjb3JkLnByZXZpb3VzVmFsdWUgPSByZWNvcmQuY3VycmVudFZhbHVlOwogICAgICAgICAgICAgICAgICAgIHJlY29yZC5jdXJyZW50VmFsdWUgPSBudWxsOwogICAgICAgICAgICAgICAgICAgIHJlY29yZC5fcHJldiA9IG51bGw7CiAgICAgICAgICAgICAgICAgICAgcmVjb3JkLl9uZXh0ID0gbnVsbDsKICAgICAgICAgICAgICAgIH0KICAgIC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gez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBwcmV2ID0gYmVmb3JlLl9wcmV2OwogICAgICAgICAgICAgICAgcmVjb3JkLl9uZXh0ID0gYmVmb3JlOwogICAgICAgICAgICAgICAgcmVjb3JkLl9wcmV2ID0gcHJldjsKICAgICAgICAgICAgICAgIGJlZm9yZS5fcHJldiA9IHJlY29yZDsKICAgICAgICAgICAgICAgIGlmIChwcmV2KSB7CiAgICAgICAgICAgICAgICAgICAgcHJldi5fbmV4dCA9IHJlY29yZDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChiZWZvcmUgPT09IHRoaXMuX21hcEhlYWQpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9tYXBIZWFkID0gcmVjb3JkOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdGhpcy5fYXBwZW5kQWZ0ZXIgPSBiZWZvcmU7CiAgICAgICAgICAgICAgICByZXR1cm4gYmVmb3JlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0aGlzLl9hcHBlbmRBZnRlcikgewogICAgICAgICAgICAgICAgdGhpcy5fYXBwZW5kQWZ0ZXIuX25leHQgPSByZWNvcmQ7CiAgICAgICAgICAgICAgICByZWNvcmQuX3ByZXYgPSB0aGlzLl9hcHBlbmRBZnRlcjsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuX21hcEhlYWQgPSByZWNvcmQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fYXBwZW5kQWZ0ZXIgPSByZWNvcmQ7CiAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30ga2V5CiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2dldE9yQ3JlYXRlUmVjb3JkRm9yS2V5KGtleSwgdmFsdWUpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX3JlY29yZHMuaGFzKGtleSkpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHJlY29yZCA9ICgvKiogQHR5cGUgez99ICovICh0aGlzLl9yZWNvcmRzLmdldChrZXkpKSk7CiAgICAgICAgICAgICAgICB0aGlzLl9tYXliZUFkZFRvQ2hhbmdlcyhyZWNvcmQsIHZhbHVlKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHByZXYgPSByZWNvcmQuX3ByZXY7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBuZXh0ID0gcmVjb3JkLl9uZXh0OwogICAgICAgICAgICAgICAgaWYgKHByZXYpIHsKICAgICAgICAgICAgICAgICAgICBwcmV2Ll9uZXh0ID0gbmV4dDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChuZXh0KSB7CiAgICAgICAgICAgICAgICAgICAgbmV4dC5fcHJldiA9IHByZXY7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZWNvcmQuX25leHQgPSBudWxsOwogICAgICAgICAgICAgICAgcmVjb3JkLl9wcmV2ID0gbnVsbDsKICAgICAgICAgICAgICAgIHJldHVybiByZWNvcmQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCByZWNvcmQgPSBuZXcgS2V5VmFsdWVDaGFuZ2VSZWNvcmRfKGtleSk7CiAgICAgICAgICAgIHRoaXMuX3JlY29yZHMuc2V0KGtleSwgcmVjb3JkKTsKICAgICAgICAgICAgcmVjb3JkLmN1cnJlbnRWYWx1ZSA9IHZhbHVlOwogICAgICAgICAgICB0aGlzLl9hZGRUb0FkZGl0aW9ucyhyZWNvcmQpOwogICAgICAgICAgICByZXR1cm4gcmVjb3JkOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfcmVzZXQoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmlzRGlydHkpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCByZWNvcmQ7CiAgICAgICAgICAgICAgICAvLyBsZXQgYF9wcmV2aW91c01hcEhlYWRgIGNvbnRhaW4gdGhlIHN0YXRlIG9mIHRoZSBtYXAgYmVmb3JlIHRoZSBjaGFuZ2VzCiAgICAgICAgICAgICAgICB0aGlzLl9wcmV2aW91c01hcEhlYWQgPSB0aGlzLl9tYXBIZWFkOwogICAgICAgICAgICAgICAgZm9yIChyZWNvcmQgPSB0aGlzLl9wcmV2aW91c01hcEhlYWQ7IHJlY29yZCAhPT0gbnVsbDsgcmVjb3JkID0gcmVjb3JkLl9uZXh0KSB7CiAgICAgICAgICAgICAgICAgICAgcmVjb3JkLl9uZXh0UHJldmlvdXMgPSByZWNvcmQuX25leHQ7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvLyBVcGRhdGUgYHJlY29yZC5wcmV2aW91c1ZhbHVlYCB3aXRoIHRoZSB2YWx1ZSBvZiB0aGUgaXRlbSBiZWZvcmUgdGhlIGNoYW5nZXMKICAgICAgICAgICAgICAgIC8vIFdlIG5lZWQgdG8gdXBkYXRlIGFsbCBjaGFuZ2VkIGl0ZW1zICh0aGF0J3MgdGhvc2Ugd2hpY2ggaGF2ZSBiZWVuIGFkZGVkIGFuZCBjaGFuZ2VkKQogICAgICAgICAgICAgICAgZm9yIChyZWNvcmQgPSB0aGlzLl9jaGFuZ2VzSGVhZDsgcmVjb3JkICE9PSBudWxsOyByZWNvcmQgPSByZWNvcmQuX25leHRDaGFuZ2VkKSB7CiAgICAgICAgICAgICAgICAgICAgcmVjb3JkLnByZXZpb3VzVmFsdWUgPSByZWNvcmQuY3VycmVudFZhbHVlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZm9yIChyZWNvcmQgPSB0aGlzLl9hZGRpdGlvbnNIZWFkOyByZWNvcmQgIT0gbnVsbDsgcmVjb3JkID0gcmVjb3JkLl9uZXh0QWRkZWQpIHsKICAgICAgICAgICAgICAgICAgICByZWNvcmQucHJldmlvdXNWYWx1ZSA9IHJlY29yZC5jdXJyZW50VmFsdWU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLl9jaGFuZ2VzSGVhZCA9IHRoaXMuX2NoYW5nZXNUYWlsID0gbnVsbDsKICAgICAgICAgICAgICAgIHRoaXMuX2FkZGl0aW9uc0hlYWQgPSB0aGlzLl9hZGRpdGlvbnNUYWlsID0gbnVsbDsKICAgICAgICAgICAgICAgIHRoaXMuX3JlbW92YWxzSGVhZCA9IG51bGw7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLy8gQWRkIHRoZSByZWNvcmQgb3IgYSBnaXZlbiBrZXkgdG8gdGhlIGxpc3Qgb2YgY2hhbmdlcyBvbmx5IHdoZW4gdGhlIHZhbHVlIGhhcyBhY3R1YWxseSBjaGFuZ2VkCiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHJlY29yZAogICAgICAgICAqIEBwYXJhbSB7P30gbmV3VmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9tYXliZUFkZFRvQ2hhbmdlcyhyZWNvcmQsIG5ld1ZhbHVlKSB7CiAgICAgICAgICAgIGlmICghbG9vc2VJZGVudGljYWwobmV3VmFsdWUsIHJlY29yZC5jdXJyZW50VmFsdWUpKSB7CiAgICAgICAgICAgICAgICByZWNvcmQucHJldmlvdXNWYWx1ZSA9IHJlY29yZC5jdXJyZW50VmFsdWU7CiAgICAgICAgICAgICAgICByZWNvcmQuY3VycmVudFZhbHVlID0gbmV3VmFsdWU7CiAgICAgICAgICAgICAgICB0aGlzLl9hZGRUb0NoYW5nZXMocmVjb3JkKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gcmVjb3JkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfYWRkVG9BZGRpdGlvbnMocmVjb3JkKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9hZGRpdGlvbnNIZWFkID09PSBudWxsKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9hZGRpdGlvbnNIZWFkID0gdGhpcy5fYWRkaXRpb25zVGFpbCA9IHJlY29yZDsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovICh0aGlzLl9hZGRpdGlvbnNUYWlsKSkuX25leHRBZGRlZCA9IHJlY29yZDsKICAgICAgICAgICAgICAgIHRoaXMuX2FkZGl0aW9uc1RhaWwgPSByZWNvcmQ7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHJlY29yZAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2FkZFRvQ2hhbmdlcyhyZWNvcmQpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX2NoYW5nZXNIZWFkID09PSBudWxsKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9jaGFuZ2VzSGVhZCA9IHRoaXMuX2NoYW5nZXNUYWlsID0gcmVjb3JkOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX2NoYW5nZXNUYWlsKSkuX25leHRDaGFuZ2VkID0gcmVjb3JkOwogICAgICAgICAgICAgICAgdGhpcy5fY2hhbmdlc1RhaWwgPSByZWNvcmQ7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHRlbXBsYXRlIEssIFYKICAgICAgICAgKiBAcGFyYW0gez99IG9iagogICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9mb3JFYWNoKG9iaiwgZm4pIHsKICAgICAgICAgICAgaWYgKG9iaiBpbnN0YW5jZW9mIE1hcCkgewogICAgICAgICAgICAgICAgb2JqLmZvckVhY2goZm4pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgT2JqZWN0LmtleXMob2JqKS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gawogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgayA9PiBmbihvYmpba10sIGspKSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEB0ZW1wbGF0ZSBLLCBWCiAgICAgKi8KICAgIGNsYXNzIEtleVZhbHVlQ2hhbmdlUmVjb3JkXyB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBrZXkKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihrZXkpIHsKICAgICAgICAgICAgdGhpcy5rZXkgPSBrZXk7CiAgICAgICAgICAgIHRoaXMucHJldmlvdXNWYWx1ZSA9IG51bGw7CiAgICAgICAgICAgIHRoaXMuY3VycmVudFZhbHVlID0gbnVsbDsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX25leHRQcmV2aW91cyA9IG51bGw7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9uZXh0ID0gbnVsbDsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX3ByZXYgPSBudWxsOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fbmV4dEFkZGVkID0gbnVsbDsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX25leHRSZW1vdmVkID0gbnVsbDsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX25leHRDaGFuZ2VkID0gbnVsbDsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEEgcmVwb3NpdG9yeSBvZiBkaWZmZXJlbnQgaXRlcmFibGUgZGlmZmluZyBzdHJhdGVnaWVzIHVzZWQgYnkgTmdGb3IsIE5nQ2xhc3MsIGFuZCBvdGhlcnMuCiAgICAgKgogICAgICogXEBwdWJsaWNBcGkKICAgICAqLwogICAgY2xhc3MgSXRlcmFibGVEaWZmZXJzIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGZhY3RvcmllcwogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKGZhY3RvcmllcykgewogICAgICAgICAgICB0aGlzLmZhY3RvcmllcyA9IGZhY3RvcmllczsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBmYWN0b3JpZXMKICAgICAgICAgKiBAcGFyYW0gez89fSBwYXJlbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHN0YXRpYyBjcmVhdGUoZmFjdG9yaWVzLCBwYXJlbnQpIHsKICAgICAgICAgICAgaWYgKHBhcmVudCAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBjb3BpZWQgPSBwYXJlbnQuZmFjdG9yaWVzLnNsaWNlKCk7CiAgICAgICAgICAgICAgICBmYWN0b3JpZXMgPSBmYWN0b3JpZXMuY29uY2F0KGNvcGllZCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIG5ldyBJdGVyYWJsZURpZmZlcnMoZmFjdG9yaWVzKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVGFrZXMgYW4gYXJyYXkgb2Yge1xAbGluayBJdGVyYWJsZURpZmZlckZhY3Rvcnl9IGFuZCByZXR1cm5zIGEgcHJvdmlkZXIgdXNlZCB0byBleHRlbmQgdGhlCiAgICAgICAgICogaW5oZXJpdGVkIHtcQGxpbmsgSXRlcmFibGVEaWZmZXJzfSBpbnN0YW5jZSB3aXRoIHRoZSBwcm92aWRlZCBmYWN0b3JpZXMgYW5kIHJldHVybiBhIG5ldwogICAgICAgICAqIHtcQGxpbmsgSXRlcmFibGVEaWZmZXJzfSBpbnN0YW5jZS4KICAgICAgICAgKgogICAgICAgICAqIFxAdXNhZ2VOb3RlcwogICAgICAgICAqICMjIyBFeGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBUaGUgZm9sbG93aW5nIGV4YW1wbGUgc2hvd3MgaG93IHRvIGV4dGVuZCBhbiBleGlzdGluZyBsaXN0IG9mIGZhY3RvcmllcywKICAgICAgICAgKiB3aGljaCB3aWxsIG9ubHkgYmUgYXBwbGllZCB0byB0aGUgaW5qZWN0b3IgZm9yIHRoaXMgY29tcG9uZW50IGFuZCBpdHMgY2hpbGRyZW4uCiAgICAgICAgICogVGhpcyBzdGVwIGlzIGFsbCB0aGF0J3MgcmVxdWlyZWQgdG8gbWFrZSBhIG5ldyB7XEBsaW5rIEl0ZXJhYmxlRGlmZmVyfSBhdmFpbGFibGUuCiAgICAgICAgICoKICAgICAgICAgKiBgYGAKICAgICAgICAgKiBcQENvbXBvbmVudCh7CiAgICAgICAgICogICB2aWV3UHJvdmlkZXJzOiBbCiAgICAgICAgICogICAgIEl0ZXJhYmxlRGlmZmVycy5leHRlbmQoW25ldyBJbW11dGFibGVMaXN0RGlmZmVyKCldKQogICAgICAgICAqICAgXQogICAgICAgICAqIH0pCiAgICAgICAgICogYGBgCiAgICAgICAgICogQHBhcmFtIHs/fSBmYWN0b3JpZXMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHN0YXRpYyBleHRlbmQoZmFjdG9yaWVzKSB7CiAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICBwcm92aWRlOiBJdGVyYWJsZURpZmZlcnMsCiAgICAgICAgICAgICAgICB1c2VGYWN0b3J5OiAoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHBhcmVudAogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKHBhcmVudCkgPT4gewogICAgICAgICAgICAgICAgICAgIGlmICghcGFyZW50KSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFR5cGljYWxseSB3b3VsZCBvY2N1ciB3aGVuIGNhbGxpbmcgSXRlcmFibGVEaWZmZXJzLmV4dGVuZCBpbnNpZGUgb2YgZGVwZW5kZW5jaWVzIHBhc3NlZAogICAgICAgICAgICAgICAgICAgICAgICAvLyB0bwogICAgICAgICAgICAgICAgICAgICAgICAvLyBib290c3RyYXAoKSwgd2hpY2ggd291bGQgb3ZlcnJpZGUgZGVmYXVsdCBwaXBlcyBpbnN0ZWFkIG9mIGV4dGVuZGluZyB0aGVtLgogICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0Nhbm5vdCBleHRlbmQgSXRlcmFibGVEaWZmZXJzIHdpdGhvdXQgYSBwYXJlbnQgaW5qZWN0b3InKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEl0ZXJhYmxlRGlmZmVycy5jcmVhdGUoZmFjdG9yaWVzLCBwYXJlbnQpOwogICAgICAgICAgICAgICAgfSksCiAgICAgICAgICAgICAgICAvLyBEZXBlbmRlbmN5IHRlY2huaWNhbGx5IGlzbid0IG9wdGlvbmFsLCBidXQgd2UgY2FuIHByb3ZpZGUgYSBiZXR0ZXIgZXJyb3IgbWVzc2FnZSB0aGlzIHdheS4KICAgICAgICAgICAgICAgIGRlcHM6IFtbSXRlcmFibGVEaWZmZXJzLCBuZXcgU2tpcFNlbGYoKSwgbmV3IE9wdGlvbmFsKCldXQogICAgICAgICAgICB9OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGl0ZXJhYmxlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmaW5kKGl0ZXJhYmxlKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZmFjdG9yeSA9IHRoaXMuZmFjdG9yaWVzLmZpbmQoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGYKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGYgPT4gZi5zdXBwb3J0cyhpdGVyYWJsZSkpKTsKICAgICAgICAgICAgaWYgKGZhY3RvcnkgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIGZhY3Rvcnk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYENhbm5vdCBmaW5kIGEgZGlmZmVyIHN1cHBvcnRpbmcgb2JqZWN0ICcke2l0ZXJhYmxlfScgb2YgdHlwZSAnJHtnZXRUeXBlTmFtZUZvckRlYnVnZ2luZyhpdGVyYWJsZSl9J2ApOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQogICAgLyoqIEBub2NvbGxhcHNlICovCiAgICBJdGVyYWJsZURpZmZlcnMuybVwcm92ID0gybXJtWRlZmluZUluamVjdGFibGUoewogICAgICAgIHRva2VuOiBJdGVyYWJsZURpZmZlcnMsCiAgICAgICAgcHJvdmlkZWRJbjogJ3Jvb3QnLAogICAgICAgIGZhY3Rvcnk6ICgvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgICgpID0+IG5ldyBJdGVyYWJsZURpZmZlcnMoW25ldyBEZWZhdWx0SXRlcmFibGVEaWZmZXJGYWN0b3J5KCldKSkKICAgIH0pOwogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHR5cGUKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGdldFR5cGVOYW1lRm9yRGVidWdnaW5nKHR5cGUpIHsKICAgICAgICByZXR1cm4gdHlwZVsnbmFtZSddIHx8IHR5cGVvZiB0eXBlOwogICAgfQogICAgLyoqCiAgICAgKiBBIHJlcG9zaXRvcnkgb2YgZGlmZmVyZW50IE1hcCBkaWZmaW5nIHN0cmF0ZWdpZXMgdXNlZCBieSBOZ0NsYXNzLCBOZ1N0eWxlLCBhbmQgb3RoZXJzLgogICAgICoKICAgICAqIFxAcHVibGljQXBpCiAgICAgKi8KICAgIGNsYXNzIEtleVZhbHVlRGlmZmVycyB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBmYWN0b3JpZXMKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihmYWN0b3JpZXMpIHsKICAgICAgICAgICAgdGhpcy5mYWN0b3JpZXMgPSBmYWN0b3JpZXM7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEB0ZW1wbGF0ZSBTCiAgICAgICAgICogQHBhcmFtIHs/fSBmYWN0b3JpZXMKICAgICAgICAgKiBAcGFyYW0gez89fSBwYXJlbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHN0YXRpYyBjcmVhdGUoZmFjdG9yaWVzLCBwYXJlbnQpIHsKICAgICAgICAgICAgaWYgKHBhcmVudCkgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgY29waWVkID0gcGFyZW50LmZhY3Rvcmllcy5zbGljZSgpOwogICAgICAgICAgICAgICAgZmFjdG9yaWVzID0gZmFjdG9yaWVzLmNvbmNhdChjb3BpZWQpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBuZXcgS2V5VmFsdWVEaWZmZXJzKGZhY3Rvcmllcyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFRha2VzIGFuIGFycmF5IG9mIHtcQGxpbmsgS2V5VmFsdWVEaWZmZXJGYWN0b3J5fSBhbmQgcmV0dXJucyBhIHByb3ZpZGVyIHVzZWQgdG8gZXh0ZW5kIHRoZQogICAgICAgICAqIGluaGVyaXRlZCB7XEBsaW5rIEtleVZhbHVlRGlmZmVyc30gaW5zdGFuY2Ugd2l0aCB0aGUgcHJvdmlkZWQgZmFjdG9yaWVzIGFuZCByZXR1cm4gYSBuZXcKICAgICAgICAgKiB7XEBsaW5rIEtleVZhbHVlRGlmZmVyc30gaW5zdGFuY2UuCiAgICAgICAgICoKICAgICAgICAgKiBcQHVzYWdlTm90ZXMKICAgICAgICAgKiAjIyMgRXhhbXBsZQogICAgICAgICAqCiAgICAgICAgICogVGhlIGZvbGxvd2luZyBleGFtcGxlIHNob3dzIGhvdyB0byBleHRlbmQgYW4gZXhpc3RpbmcgbGlzdCBvZiBmYWN0b3JpZXMsCiAgICAgICAgICogd2hpY2ggd2lsbCBvbmx5IGJlIGFwcGxpZWQgdG8gdGhlIGluamVjdG9yIGZvciB0aGlzIGNvbXBvbmVudCBhbmQgaXRzIGNoaWxkcmVuLgogICAgICAgICAqIFRoaXMgc3RlcCBpcyBhbGwgdGhhdCdzIHJlcXVpcmVkIHRvIG1ha2UgYSBuZXcge1xAbGluayBLZXlWYWx1ZURpZmZlcn0gYXZhaWxhYmxlLgogICAgICAgICAqCiAgICAgICAgICogYGBgCiAgICAgICAgICogXEBDb21wb25lbnQoewogICAgICAgICAqICAgdmlld1Byb3ZpZGVyczogWwogICAgICAgICAqICAgICBLZXlWYWx1ZURpZmZlcnMuZXh0ZW5kKFtuZXcgSW1tdXRhYmxlTWFwRGlmZmVyKCldKQogICAgICAgICAqICAgXQogICAgICAgICAqIH0pCiAgICAgICAgICogYGBgCiAgICAgICAgICogQHRlbXBsYXRlIFMKICAgICAgICAgKiBAcGFyYW0gez99IGZhY3RvcmllcwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc3RhdGljIGV4dGVuZChmYWN0b3JpZXMpIHsKICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIHByb3ZpZGU6IEtleVZhbHVlRGlmZmVycywKICAgICAgICAgICAgICAgIHVzZUZhY3Rvcnk6ICgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcGFyZW50CiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAocGFyZW50KSA9PiB7CiAgICAgICAgICAgICAgICAgICAgaWYgKCFwYXJlbnQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gVHlwaWNhbGx5IHdvdWxkIG9jY3VyIHdoZW4gY2FsbGluZyBLZXlWYWx1ZURpZmZlcnMuZXh0ZW5kIGluc2lkZSBvZiBkZXBlbmRlbmNpZXMgcGFzc2VkCiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHRvIGJvb3RzdHJhcCgpLCB3aGljaCB3b3VsZCBvdmVycmlkZSBkZWZhdWx0IHBpcGVzIGluc3RlYWQgb2YgZXh0ZW5kaW5nIHRoZW0uCiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignQ2Fubm90IGV4dGVuZCBLZXlWYWx1ZURpZmZlcnMgd2l0aG91dCBhIHBhcmVudCBpbmplY3RvcicpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gS2V5VmFsdWVEaWZmZXJzLmNyZWF0ZShmYWN0b3JpZXMsIHBhcmVudCk7CiAgICAgICAgICAgICAgICB9KSwKICAgICAgICAgICAgICAgIC8vIERlcGVuZGVuY3kgdGVjaG5pY2FsbHkgaXNuJ3Qgb3B0aW9uYWwsIGJ1dCB3ZSBjYW4gcHJvdmlkZSBhIGJldHRlciBlcnJvciBtZXNzYWdlIHRoaXMgd2F5LgogICAgICAgICAgICAgICAgZGVwczogW1tLZXlWYWx1ZURpZmZlcnMsIG5ldyBTa2lwU2VsZigpLCBuZXcgT3B0aW9uYWwoKV1dCiAgICAgICAgICAgIH07CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30ga3YKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZpbmQoa3YpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBmYWN0b3J5ID0gdGhpcy5mYWN0b3JpZXMuZmluZCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZiA9PiBmLnN1cHBvcnRzKGt2KSkpOwogICAgICAgICAgICBpZiAoZmFjdG9yeSkgewogICAgICAgICAgICAgICAgcmV0dXJuIGZhY3Rvcnk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhy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sb3NzYXJ5I3ZpZXctdHJlZSkuCiAgICAgKgogICAgICogQHNlZSBgQ29tcG9uZW50UmVmYAogICAgICogQHNlZSBgRW1iZWRkZWRWaWV3UmVmYAogICAgICoKICAgICAqIFxAcHVibGljQXBpCiAgICAgKiBAYWJzdHJhY3QKICAgICAqLwogICAgY2xhc3MgVmlld0NvbnRhaW5lclJlZiB7CiAgICB9CiAgICAvKioKICAgICAqIFxAaW50ZXJuYWwKICAgICAqIEBub2NvbGxhcHNlCiAgICAgKi8KICAgIFZpZXdDb250YWluZXJSZWYuX19OR19FTEVNRU5UX0lEX18gPSAoLyoqCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICAoKSA9PiBTV0lUQ0hfVklFV19DT05UQUlORVJfUkVGX0ZBQ1RPUlkoVmlld0NvbnRhaW5lclJlZiwgRWxlbWVudFJlZikpOwogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgU1dJVENIX1ZJRVdfQ09OVEFJTkVSX1JFRl9GQUNUT1JZX19QT1NUX1IzX18gPSBpbmplY3RWaWV3Q29udGFpbmVyUmVmOwogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgU1dJVENIX1ZJRVdfQ09OVEFJTkVSX1JFRl9GQUNUT1JZID0gU1dJVENIX1ZJRVdfQ09OVEFJTkVSX1JFRl9GQUNUT1JZX19QT1NUX1IzX187CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBfdG9rZW5LZXlDYWNoZSA9IG5ldyBNYXAoKTsKICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB0b2tlbgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gdG9rZW5LZXkodG9rZW4pIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IGtleSA9IF90b2tlbktleUNhY2hlLmdldCh0b2tlbik7CiAgICAgICAgaWYgKCFrZXkpIHsKICAgICAgICAgICAga2V5ID0gc3RyaW5naWZ5K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QKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlc29sdmVDb21wb25lbnRGYWN0b3J5KGNvbXBvbmVudCkgewogICAgICAgICAgICBuZ0Rldk1vZGUgJiYgYXNzZXJ0Q29tcG9uZW50VHlwZShjb21wb25lbnQpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGNvbXBvbmVudERlZiA9ICgvKiogQHR5cGUgez99ICovIChnZXRDb21wb25lbnREZWYoY29tcG9uZW50KSkpOwogICAgICAgICAgICByZXR1cm4gbmV3IENvbXBvbmVudEZhY3RvcnkkMShjb21wb25lbnREZWYsIHRoaXMubmdNb2R1bGUpOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBtYXAKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHRvUmVmQXJyYXkobWFwKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGFycmF5ID0gW107CiAgICAgICAgZm9yIChsZXQgbm9uTWluaWZpZWQgaW4gbWFwKSB7CiAgICAgICAgICAgIGlmIChtYXAuaGFzT3duUHJvcGVydHkobm9uTWluaWZpZWQpKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBtaW5pZmllZCA9IG1hcFtub25NaW5pZmllZF07CiAgICAgICAgICAgICAgICBhcnJheS5wdXNoKHsgcHJvcE5hbWU6IG1pbmlmaWVkLCB0ZW1wbGF0ZU5hbWU6IG5vbk1pbmlmaWVkIH0pOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiBhcnJheTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBlbGVtZW50TmFtZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0TmFtZXNwYWNlJDEoZWxlbWVudE5hbWUpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgbmFtZSA9IGVsZW1lbnROYW1lLnRvTG93ZXJDYXNlKCk7CiAgICAgICAgcmV0dXJuIG5hbWUgPT09ICdzdmcnID8gU1ZHX05BTUVTUEFDRSA6IChuYW1lID09PSAnbWF0aCcgPyBNQVRIX01MX05BTUVTUEFDRSA6IG51bGwpOwogICAgfQogICAgLyoqCiAgICAgKiBBIGNoYW5nZSBkZXRlY3Rpb24gc2NoZWR1bGVyIHRva2VuIGZvciB7XEBsaW5rIFJvb3RDb250ZXh0fS4gVGhpcyB0b2tlbiBpcyB0aGUgZGVmYXVsdCB2YWx1ZSB1c2VkCiAgICAgKiBmb3IgdGhlIGRlZmF1bHQgYFJvb3RDb250ZXh0YCBmb3VuZCBpbiB0aGUge1xAbGluayBST09UX0NPTlRFWFR9IHRva2VuLgogICAgICogQHR5cGUgez99CiAgICAgKi8KICAgIGNvbnN0IFNDSEVEVUxFUiA9IG5ldyBJbmplY3Rpb25Ub2tlbignU0NIRURVTEVSX1RPS0VOJywgewogICAgICAgIHByb3ZpZGVkSW46ICdyb290JywKICAgICAgICBmYWN0b3J5OiAoLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAoKSA9PiBkZWZhdWx0U2NoZWR1bGVyKSwKICAgIH0pOwogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHJvb3RWaWV3SW5qZWN0b3IKICAgICAqIEBwYXJhbSB7P30gbW9kdWxlSW5qZWN0b3IKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGNyZWF0ZUNoYWluZWRJbmplY3Rvcihyb290Vmlld0luamVjdG9yLCBtb2R1bGVJbmplY3RvcikgewogICAgICAgIHJldHVybiB7CiAgICAgICAgICAgIGdldDogKC8qKgogICAgICAgICAgICAgKiBAdGVtcGxhdGUgVAogICAgICAgICAgICAgKiBAcGFyYW0gez99IHRva2VuCiAgICAgICAgICAgICAqIEBwYXJhbSB7Pz19IG5vdEZvdW5kVmFsdWUKICAgICAgICAgICAgICogQHBhcmFtIHs/PX0gZmxhZ3MKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICh0b2tlbiwgbm90Rm91bmRWYWx1ZSwgZmxhZ3MpID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHZhbHVlID0gcm9vdFZpZXdJbmplY3Rvci5nZXQodG9rZW4sICgvKiogQHR5cGUgez99ICovIChOT1RfRk9VTkRfQ0hFQ0tfT05MWV9FTEVNRU5UX0lOSkVDVE9SKSksIGZsYWdzKTsKICAgICAgICAgICAgICAgIGlmICh2YWx1ZSAhPT0gTk9UX0ZPVU5EX0NIRUNLX09OTFlfRUxFTUVOVF9JTkpFQ1RPUiB8fAogICAgICAgICAgICAgICAgICAgIG5vdEZvdW5kVmFsdWUgPT09IE5PVF9GT1VORF9DSEVDS19PTkxZX0VMRU1FTlRfSU5KRUNUT1IpIHsKICAgICAgICAgICAgICAgICAgICAvLyBSZXR1cm4gdGhlIHZhbHVlIGZyb20gdGhlIHJvb3QgZWxlbWVudCBpbmplY3RvciB3aGVuCiAgICAgICAgICAgICAgICAgICAgLy8gLSBpdCBwcm92aWRlcyBpdAogICAgICAgICAgICAgICAgICAgIC8vICAgKHZhbHVlICE9PSBOT1RfRk9VTkRfQ0hFQ0tfT05MWV9FTEVNRU5UX0lOSkVDVE9SKQogICAgICAgICAgICAgICAgICAgIC8vIC0gdGhlIG1vZHVsZSBpbmplY3RvciBzaG91bGQgbm90IGJlIGNoZWNrZWQKICAgICAgICAgICAgICAgICAgICAvLyAgIChub3RGb3VuZFZhbHVlID09PSBOT1RfRk9VTkRfQ0hFQ0tfT05MWV9FTEVNRU5UX0lOSkVDVE9SKQogICAgICAgICAgICAgICAgICAgIHJldHVybiB2YWx1ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiBtb2R1bGVJbmplY3Rvci5nZXQodG9rZW4sIG5vdEZvdW5kVmFsdWUsIGZsYWdzKTsKICAgICAgICAgICAgfSkKICAgICAgICB9OwogICAgfQogICAgLyoqCiAgICAgKiBSZW5kZXIzIGltcGxlbWVudGF0aW9uIG9mIHtcQGxpbmsgdmlld0VuZ2luZV9Db21wb25lbnRGYWN0b3J5fS4KICAgICAqIEB0ZW1wbGF0ZSBUCiAgICAgKi8KICAgIGNsYXNzIENvbXBvbmVudEZhY3RvcnkkMSBleHRlbmRzIENvbXBvbmVudEZhY3RvcnkgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gY29tcG9uZW50RGVmIFRoZSBjb21wb25lbnQgZGVmaW5pdGlvbi4KICAgICAgICAgKiBAcGFyYW0gez89fSBuZ01vZHVsZSBUaGUgTmdNb2R1bGVSZWYgdG8gd2hpY2ggdGhlIGZhY3RvcnkgaXMgYm91bmQuCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoY29tcG9uZW50RGVmLCBuZ01vZHVsZSkgewogICAgICAgICAgICBzdXBlcigpOwogICAgICAgICAgICB0aGlzLmNvbXBvbmVudERlZiA9IGNvbXBvbmVudERlZjsKICAgICAgICAgICAgdGhpcy5uZ01vZHVsZSA9IG5nTW9kdWxlOwogICAgICAgICAgICB0aGlzLmNvbXBvbmVudFR5cGUgPSBjb21wb25lbnREZWYudHlwZTsKICAgICAgICAgICAgdGhpcy5zZWxlY3RvciA9IHN0cmluZ2lmeUNTU1NlbGVjdG9yTGlzdChjb21wb25lbnREZWYuc2VsZWN0b3JzKTsKICAgICAgICAgICAgdGhpcy5uZ0NvbnRlbnRTZWxlY3RvcnMgPQogICAgICAgICAgICAgICAgY29tcG9uZW50RGVmLm5nQ29udGVudFNlbGVjdG9ycyA/IGNvbXBvbmVudERlZi5uZ0NvbnRlbnRTZWxlY3RvcnMgOiBbXTsKICAgICAgICAgICAgdGhpcy5pc0JvdW5kVG9Nb2R1bGUgPSAhIW5nTW9kdWxlOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBpbnB1dHMoKSB7CiAgICAgICAgICAgIHJldHVybiB0b1JlZkFycmF5KHRoaXMuY29tcG9uZW50RGVmLmlucHV0cyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IG91dHB1dHMoKSB7CiAgICAgICAgICAgIHJldHVybiB0b1JlZkFycmF5KHRoaXMuY29tcG9uZW50RGVmLm91dHB1dHMpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGluamVjdG9yCiAgICAgICAgICogQHBhcmFtIHs/PX0gcHJvamVjdGFibGVOb2RlcwogICAgICAgICAqIEBwYXJhbSB7Pz19IHJvb3RTZWxlY3Rvck9yTm9kZQogICAgICAgICAqIEBwYXJhbSB7Pz19IG5nTW9kdWxlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBjcmVhdGUoaW5qZWN0b3IsIHByb2plY3RhYmxlTm9kZXMsIHJvb3RTZWxlY3Rvck9yTm9kZSwgbmdNb2R1bGUpIHsKICAgICAgICAgICAgbmdNb2R1bGUgPSBuZ01vZHVsZSB8fCB0aGlzLm5nTW9kdWxlOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHJvb3RWaWV3SW5qZWN0b3IgPSBuZ01vZHVsZSA/IGNyZWF0ZUNoYWluZWRJbmplY3RvcihpbmplY3RvciwgbmdNb2R1bGUuaW5qZWN0b3IpIDogaW5qZWN0b3I7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcmVuZGVyZXJGYWN0b3J5ID0gKC8qKiBAdHlwZSB7P30gKi8gKH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lcmVyRmFjdG9yeS5jcmVhdGVSZW5kZXJlcihudWxsLCB0aGlzLmNvbXBvbmVudERlZiksIGdldE5hbWVzcGFjZSQxKGVsZW1lbnROYW1lKSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgcm9vdEZsYWdzID0gdGhpcy5jb21wb25lbnREZWYub25QdXNoID8gNjQgLyogRGlydHkgKi8gfCA1MTIgLyogSXNSb290ICovIDoKICAgICAgICAgICAgICAgIDE2IC8qIENoZWNrQWx3YXlzICovIHwgNTEyIC8qIElzUm9vdCAqLzsKICAgICAgICAgICAgLy8gQ2hlY2sgd2hldGhlciB0aGlzIENvbXBvbmVudCBuZWVkcyB0byBiZSBpc29sYXRlZCBmcm9tIG90aGVyIGNvbXBvbmVudHMsIGkuZS4gd2hldGhlciBpdAogICAgICAgICAgICAvLyBzaG91bGQgYmUgcGxhY2VkIGludG8gaXRzIG93biAoZW1wdHkpIHJvb3QgY29udGV4dCBvciBleGlzdGluZyByb290IGNvbnRleHQgc2hvdWxkIGJlIHVzZWQuCiAgICAgICAgICAgIC8vIE5vdGU6IHRoaXMgaXMgaW50ZXJuYWwtb25seSBjb252ZW50aW9uIGFuZCBtaWdodCBjaGFuZ2UgaW4gdGhlIGZ1dHVyZSwgc28gaXQgc2hvdWxkIG5vdCBiZQogICAgICAgICAgICAvLyByZWxpZWQgdXBvbiBleHRlcm5hbGx5LgogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGlzSXNvbGF0ZWQgPSB0eXBlb2Ygcm9vdFNlbGVjdG9yT3JOb2RlID09PSAnc3RyaW5nJyAmJgogICAgICAgICAgICAgICAgL14jcm9vdC1uZy1pbnRlcm5hbC1pc29sYXRlZC1cZCsvLnRlc3Qocm9vdFNlbGVjdG9yT3JOb2RlKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCByb290Q29udGV4dCA9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ICAgZW50ZXJWaWV3KHJvb3RMVmlldywgbnVsbCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGNvbXBvbmVudDsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgdEVsZW1lbnROb2RlOwogICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgY29tcG9uZW50VmlldyA9IGNyZWF0ZVJvb3RDb21wb25lbnRWaWV3KGhvc3RSTm9kZSwgdGhpcy5jb21wb25lbnREZWYsIHJvb3RMVmlldywgcmVuZGVyZXJGYWN0b3J5LCBob3N0UmVuZGVyZXIpOwogICAgICAgICAgICAgICAgaWYgKGhvc3RSTm9kZSkgewogICAgICAgICAgICAgICAgICAgIGlmIChyb290U2VsZWN0b3JPck5vZGUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgc2V0VXBBdHRyaWJ1dGVzKGhvc3RSZW5kZXJlciwgaG9zdFJOb2RlLCBbJ25nLXZlcnNpb24nLCBWRVJTSU9OLmZ1bGxdKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIElmIGhvc3QgZWxlbWVudCBpcyBjcmVhdGVkIGFzIGEgcGFydCBvZiB0aGlzIGZ1bmN0aW9uIGNhbGwgKGkuZS4gYHJvb3RTZWxlY3Rvck9yTm9kZWAKICAgICAgICAgICAgICAgICAgICAgICAgLy8gaXMgbm90IGRlZmluZWQpLCBhbHNvIGFwcGx5IGF0dHJpYnV0ZXMgYW5kIGNsYXNzZXMgZXh0cmFjdGVkIGZyb20gY29tcG9uZW50IHNlbGVjdG9yLgogICAgICAgICAgICAgICAgICAgICAgICAvLyBFeHRyYWN0IGF0dHJpYnV0ZXMgYW5kIGNsYXNzZXMgZnJvbSB0aGUgZmlyc3Qgc2VsZWN0b3Igb25seSB0byBtYXRjaCBWRSBiZWhhdmlvci4KICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgeyBhdHRycywgY2xhc3NlcyB9ID0gZXh0cmFjdEF0dHJzQW5kQ2xhc3Nlc0Zyb21TZWxlY3Rvcih0aGlzLmNvbXBvbmVudERlZi5zZWxlY3RvcnNbMF0pOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAoYXR0cnMpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFVwQXR0cmlidXRlcyhob3N0UmVuZGVyZXIsIGhvc3RSTm9kZSwgYXR0cnMpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjbGFzc2VzICYmIGNsYXNzZXMubGVuZ3RoID4gMCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVEaXJlY3RDbGFzcyhob3N0UmVuZGVyZXIsIGhvc3RSTm9kZSwgY2xhc3Nlcy5qb2luKCcgJykpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdEVsZW1lbnROb2RlID0gKC8qKiBAdHlwZSB7P30gKi8gKGdldFROb2RlKHJvb3RUVmlldywgMCkpKTsKICAgICAgICAgICAgICAgIGlmIChwcm9qZWN0YWJsZU5vZGVzICE9PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgcHJvamVjdGlvbiA9IHRFbGVtZW50Tm9kZS5wcm9qZWN0aW9uID0gW107CiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB0aGlzLm5nQ29udGVudFNlbGVjdG9ycy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgI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Oi8vc3RhY2tibGl0ei5jb20vZWRpdC9saWZlY3ljbGUtaG9va3MtdmNyZWYKICAgICAgICAgICAgICAgIGNvbXBvbmVudCA9IGNyZWF0ZVJvb3RDb21wb25lbnQoY29tcG9uZW50VmlldywgdGhpcy5jb21wb25lbnREZWYsIHJvb3RMVmlldywgcm9vdENvbnRleHQsIFtMaWZlY3ljbGVIb29rc0ZlYXR1cmVdKTsKICAgICAgICAgICAgICAgIHJlbmRlclZpZXcocm9vdFRWaWV3LCByb290TFZpZXcsIG51bGwpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGZpbmFsbHkgewogICAgICAgICAgICAgICAgbGVhdmVWaWV3KCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjb21wb25lbnRSZWYgPSBuZXcgQ29tcG9uZW50UmVmJDEodGhpcy5jb21wb25lbnRUeXBlLCBjb21wb25lbnQsIGNyZWF0ZUVsZW1lbnRSZWYoRWxlbWVudFJlZiwgdEVsZW1lbnROb2RlLCByb290TFZpZXcpLCByb290TFZpZXcsIHRFbGVtZW50Tm9kZSk7CiAgICAgICAgICAgIGlmICghcm9vdFNlbGVjdG9yT3JOb2RlIHx8IGlzSXNvbGF0ZWQpIHsKICAgICAgICAgICAgICAgIC8vIFRoZSBob3N0IGVsZW1lbnQgb2YgdGhlIGludGVybmFsIG9yIGlzb2xhdGVkIHJvb3QgdmlldyBpcyBhdHRhY2hlZCB0byB0aGUgY29tcG9uZW50J3MgaG9zdAogICAgICAgICAgICAgICAgLy8gdmlldyBub2RlLgogICAgICAgICAgICAgICAgbmdEZXZNb2RlICYmIGFzc2VydE5vZGVPZlBvc3NpYmxlVHlwZXMocm9vdFRWaWV3Lm5vZGUsIDIgLyogVmlldyAqLyk7CiAgICAgICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAocm9vdFRWaWV3Lm5vZGUpKS5jaGlsZCA9IHRFbGVtZW50Tm9kZTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gY29tcG9uZW50UmVmOwogICAgICAgIH0KICAgIH0KICAgIC8qKiBAdHlwZSB7P30gKi8KICAgIGNvbnN0IGNvbXBvbmVudEZhY3RvcnlSZXNvbHZlciA9IG5ldyBDb21wb25lbnRGYWN0b3J5UmVzb2x2ZXIkMSgpOwogICAgLyoqCiAgICAgKiBSZXByZXNlbnRzIGFuIGluc3RhbmNlIG9mIGEgQ29tcG9uZW50IGNyZWF0ZWQgdmlhIGEge1xAbGluayBDb21wb25lbnRGYWN0b3J5fS4KICAgICAqCiAgICAgKiBgQ29tcG9uZW50UmVmYCBwcm92aWRlcyBhY2Nlc3MgdG8gdGhlIENvbXBvbmVudCBJbnN0YW5jZSBhcyB3ZWxsIG90aGVyIG9iamVjdHMgcmVsYXRlZCB0byB0aGlzCiAgICAgKiBDb21wb25lbnQgSW5zdGFuY2UgYW5kIGFsbG93cyB5b3UgdG8gZGVzdHJveSB0aGUgQ29tcG9uZW50IEluc3RhbmNlIHZpYSB0aGUge1xAbGluayAjZGVzdHJveX0KICAgICAqIG1ldGhvZC4KICAgICAqCiAgICAgKiBAdGVtcGxhdGUgVAogICAgICovCiAgICBjbGFzcyBDb21wb25lbnRSZWYkMSBleHRlbmRzIENvbXBvbmVudFJlZiB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBjb21wb25lbnRUeXBlCiAgICAgICAgICogQHBhcmFtIHs/fSBpbnN0YW5jZQogICAgICAgICAqIEBwYXJhbSB7P30gbG9jYXRpb24KICAgICAgICAgKiBAcGFyYW0gez99IF9yb290TFZpZXcKICAgICAgICAgKiBAcGFyYW0gez99IF90Tm9kZQogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKGNvbXBvbmVudFR5cGUsIGluc3RhbmNlLCBsb2NhdGlvbiwgX3Jvb3RMVmlldywgX3ROb2RlKSB7CiAgICAgICAgICAgIHN1cGVyKCk7CiAgICAgICAgICAgIHRoaXMubG9jYXRpb24gPSBsb2NhdGlvbjsKICAgICAgICAgICAgdGhpcy5fcm9vdExWaWV3ID0gX3Jvb3RMVmlldzsKICAgICAgICAgICAgdGhpcy5fdE5vZGUgPSBfdE5vZGU7CiAgICAgICAgICAgIHRoaXMuZGVzdHJveUNicyA9IFtdOwogICAgICAgICAgICB0aGlzLmluc3RhbmNlID0gaW5zdGFuY2U7CiAgICAgICAgICAgIHRoaXMuaG9zdFZpZXcgPSB0aGlzLmNoYW5nZURldGVjdG9yUmVmID0gbmV3IFJvb3RWaWV3UmVmKF9yb290TFZpZXcpOwogICAgICAgICAgICBhc3NpZ25UVmlld05vZGVUb0xWaWV3KF9yb290TFZpZXdbVFZJRVddLCBudWxsLCAtMSwgX3Jvb3RMVmlldyk7CiAgICAgICAgICAgIHRoaXMuY29tcG9uZW50VHlwZSA9IGNvbXBvbmVudFR5cGU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGluamVjdG9yKCkgewogICAgICAgICAgICByZXR1cm4gbmV3IE5vZGVJbmplY3Rvcih0aGlzLl90Tm9kZSwgdGhpcy5fcm9vdExWaWV3KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkZXN0cm95KCkgewogICAgICAgICAgICBpZiAodGhpcy5kZXN0cm95Q2JzKSB7CiAgICAgICAgICAgICAgICB0aGlzLmRlc3Ryb3lDYnMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGZuCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBmbiA9PiBmbigpKSk7CiAgICAgICAgICAgICAgICB0aGlzLmRlc3Ryb3lDYnMgPSBudWxsOwogICAgICAgICAgICAgICAgIXRoaXMuaG9zdFZpZXcuZGV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AnUyddLCBbJ1N1bicsICdNb24nLCAnVHVlJywgJ1dlZCcsICdUaHUnLCAnRnJpJywgJ1NhdCddLAogICAgICAgICAgICBbJ1N1bmRheScsICdNb25kYXknLCAnVHVlc2RheScsICdXZWRuZXNkYXknLCAnVGh1cnNkYXknLCAnRnJpZGF5JywgJ1NhdHVyZGF5J10sCiAgICAgICAgICAgIFsnU3UnLCAnTW8nLCAnVHUnLCAnV2UnLCAnVGgnLCAnRnInLCAnU2EnXQogICAgICAgIF0sCiAgICAgICAgdSwKICAgICAgICBbCiAgICAgICAgICAgIFsnSicsICdGJywgJ00nLCAnQScsICdNJywgJ0onLCAnSicsICdBJywgJ1MnLCAnTycsICdOJywgJ0QnXSwKICAgICAgICAgICAgWydKYW4nLCAnRmViJywgJ01hcicsICdBcHInLCAnTWF5JywgJ0p1bicsICdKdWwnLCAnQXVnJywgJ1NlcCcsICdPY3QnLCAnTm92JywgJ0RlYyddLAogICAgICAgICAgICBbCiAgICAgICAgICAgICAgICAnSmFudWFyeScsICdGZWJydWFyeScsICdNYXJjaCcsICdBcHJpbCcsICdNYXknLCAnSnVuZScsICdKdWx5JywgJ0F1Z3VzdCcsICdTZXB0ZW1iZXInLAogICAgICAgICAgICAgICAgJ09jdG9iZXInLCAnTm92ZW1iZXInLCAnRGVjZW1iZXInCiAgICAgICAgICAgIF0KICAgICAgICBdLAogICAgICAgIHUsCiAgICAgICAgW1snQicsICdBJ10sIFsnQkMnLCAnQUQnXSwgWydCZWZvcmUgQ2hyaXN0JywgJ0Fubm8gRG9taW5pJ11dLAogICAgICAgIDAsCiAgICAgICAgWzYsIDBdLAogICAgICAgIFsnTS9kL3l5JywgJ01NTSBkLCB5JywgJ01NTU0gZCwgeScsICdFRUVFLCBNTU1NIGQsIHknXSwKICAgICAgICBbJ2g6bW0gYScsICdoOm1tOnNzIGEnLCAnaDptbTpzcyBhIHonLCAnaDptbTpzcyBhIHp6enonXSwKICAgICAgICBbJ3sxfSwgezB9JywgdSwgJ3sx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25vcm1hbGl6ZWRMb2NhbGVdOwogICAgICAgIH0KICAgICAgICByZXR1cm4gTE9DQUxFX0RBVEFbbm9ybWFsaXplZExvY2FsZV07CiAgICB9CiAgICAvKiogQGVudW0ge251bWJlcn0gKi8KICAgIGNvbnN0IExvY2FsZURhdGFJbmRleCA9IHsKICAgICAgICBMb2NhbGVJZDogMCwKICAgICAgICBEYXlQZXJpb2RzRm9ybWF0OiAxLAogICAgICAgIERheVBlcmlvZHNTdGFuZGFsb25lOiAyLAogICAgICAgIERheXNGb3JtYXQ6IDMsCiAgICAgICAgRGF5c1N0YW5kYWxvbmU6IDQsCiAgICAgICAgTW9udGhzRm9ybWF0OiA1LAogICAgICAgIE1vbnRoc1N0YW5kYWxvbmU6IDYsCiAgICAgICAgRXJhczogNywKICAgICAgICBGaXJzdERheU9mV2VlazogOCwKICAgICAgICBXZWVrZW5kUmFuZ2U6IDksCiAgICAgICAgRGF0ZUZvcm1hdDogMTAsCiAgICAgICAgVGltZUZvcm1hdDogMTEsCiAgICAgICAgRGF0ZVRpbWVGb3JtYXQ6IDEyLAogICAgICAgIE51bWJlclN5bWJvbHM6IDEzLAogICAgICAgIE51bWJlckZvcm1hdHM6IDE0LAogICAgICAgIEN1cnJlbmN5Q29kZTogMTUsCiAgICAgICAgQ3VycmVuY3lTeW1ib2w6IDE2LAogICAgICAgIEN1cnJlbmN5TmFtZTogMTcsCiAgICAgICAgQ3VycmVuY2llczogMTgsCiAgICAgICAgRGlyZWN0aW9uYWxpdHk6IDE5LAogICAgICAgIFBsdXJhbENhc2U6IDIwLAogICAgICAgIEV4dHJhRGF0YTogMjEsCiAgICB9OwogICAgTG9jYWxlRGF0YUluZGV4W0xvY2FsZURhdGFJbmRleC5Mb2NhbGVJZF0gPSAnTG9jYWxlSWQnOwogICAgTG9jYWxlRGF0YUluZGV4W0xvY2FsZURhdGFJbmRleC5EYXlQZXJpb2RzRm9ybWF0XSA9ICdEYXlQZXJpb2RzRm9ybWF0JzsKICAgIExvY2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yhwYXR0ZXJuKSkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHBvcyA9IG1hdGNoLmluZGV4OwogICAgICAgICAgICBpZiAobWF0Y2hbMF0gPT0gJ30nKSB7CiAgICAgICAgICAgICAgICBicmFjZVN0YWNrLnBvcCgpOwogICAgICAgICAgICAgICAgaWYgKGJyYWNlU3RhY2subGVuZ3RoID09IDApIHsKICAgICAgICAgICAgICAgICAgICAvLyBFbmQgb2YgdGhlIGJsb2NrLgogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBibG9jayA9IHBhdHRlcm4uc3Vic3RyaW5nKHByZXZQb3MsIHBvcyk7CiAgICAgICAgICAgICAgICAgICAgaWYgKElDVV9CTE9DS19SRUdFWFAudGVzdChibG9jaykpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0cy5wdXNoKHBhcnNlSUNVQmxvY2soYmxvY2spKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdHMucHVzaChibG9jayk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHByZXZQb3MgPSBwb3MgKyAxOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgaWYgKGJyYWNlU3RhY2subGVuZ3RoID09IDApIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3Vic3RyaW5nID0gcGF0dGVybi5zdWJzdHJpbmcocHJldlBvcywgcG9zKTsKICAgICAgICAgICAgICAgICAgICByZXN1bHRzLnB1c2goc3Vic3RyaW5nKTsKICAgICAgICAgICAgICAgICAgICBwcmV2UG9zID0gcG9zICsgMTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGJyYWNlU3RhY2sucHVzaCgneycpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBzdWJzdHJpbmcgPSBwYXR0ZXJuLnN1YnN0cmluZyhwcmV2UG9zKTsKICAgICAgICByZXN1bHRzLnB1c2goc3Vic3RyaW5nKTsKICAgICAgICByZXR1cm4gcmVzdWx0czsKICAgIH0KICAgIC8qKgogICAgICogUGFyc2VzIHRleHQgY29udGFpbmluZyBhbiBJQ1UgZXhwcmVzc2lvbiBhbmQgcHJvZHVjZXMgYSBKU09OIG9iamVjdCBmb3IgaXQuCiAgICAgKiBPcmlnaW5hbCBjb2RlIGZyb20gY2xvc3VyZSBsaWJyYXJ5LCBtb2RpZmllZCBmb3IgQW5ndWxhci4KICAgICAqCiAgICAgKiBAcGFyYW0gez99IHBhdHRlcm4gVGV4dCBjb250YWluaW5nIGFuIElDVSBleHByZXNzaW9uIHRoYXQgbmVlZHMgdG8gYmUgcGFyc2VkLgogICAgICoKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHBhcnNlSUNVQmxvY2socGF0dGVybikgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBjYXNlcyA9IFtdOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCB2YWx1ZXMgPSBbXTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IGljdVR5cGUgPSAxIC8qIHBsdXJhbCAqLzsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IG1haW5CaW5kaW5nID0gMDsKICAgICAgICBwYXR0ZXJuID0gcGF0dGVybi5yZXBsYWNlKElDVV9CTE9DS19SRUdFWFAsICgvKioKICAgICAgICAgKiBAcGFyYW0gez99IHN0cgogICAgICAgICAqIEBwYXJhbSB7P30gYmluZGluZwogICAgICAgICAqIEBwYXJhbSB7P30gdHlwZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gKHN0ciwgYmluZGluZywgdHlwZSkgewogICAgICAgICAgICBpZiAodHlwZSA9PT0gJ3NlbGVjdCcpIHsKICAgICAgICAgICAgICAgIGljdVR5cGUgPSAwIC8qIHNlbGVjdCAqLzsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIGljdVR5cGUgPSAxIC8qIHBsdXJhbCAqLzsKICAgICAgICAgICAgfQogICAgICAgICAgICBtYWluQmluZGluZyA9IHBhcnNlSW50KGJpbmRpbmcuc3Vic3RyKDEpLCAxMCk7CiAgICAgICAgICAgIHJldHVybiAnJzsKICAgICAgICB9KSk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHBhcnRzID0gKC8qKiBAdHlwZSB7P30gKi8gKGV4dHJhY3RQYXJ0cyhwYXR0ZXJuKSkpOwogICAgICAgIC8vIExvb2tpbmcgZm9yIChrZXkgYmxvY2spKyBzZXF1ZW5jZS4gT25lIG9mIHRoZSBrZXlzIGhhcyB0byBiZSAib3RoZXIiLgogICAgICAgIGZvciAobGV0IHBvcyA9IDA7IHBvcyA8IHBhcnRzLmxlbmd0aDspIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQga2V5ID0gcGFydHNbcG9zKytdLnRyaW0oKTsKICAgICAgICAgICAgaWYgKGljdVR5cGUgPT09IDEgLyogcGx1cmFsICovKSB7CiAgICAgICAgICAgICAgICAvLyBLZXkgY2FuIGJlICI9eCIsIHdlIGp1c3Qgd2FudCAieCIKICAgICAgICAgICAgICAgIGtleSA9IGtleS5yZXBsYWNlKC9ccyooPzo9KT8oXHcrKVxzKi8sICckMScpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChrZXkubGVuZ3RoKSB7CiAgICAgICAgICAgICAgICBjYXNlcy5wdXNoKGtleSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBibG9ja3MgPSAoLyoqIEB0eXBlIHs/fSAqLyAoZXh0cmFjdFBhcnRzKHBhcnRzW3BvcysrXSkpKTsKICAgICAgICAgICAgaWYgKGNhc2VzLmxlbmd0aCA+IHZhbHVlcy5sZW5ndGgpIHsKICAgICAgICAgICAgICAgIHZhbHVlcy5wdXNoKGJsb2Nrcyk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLy8gVE9ETyhvY29tYmUpOiBzdXBwb3J0IElDVSBleHByZXNzaW9ucyBpbiBhdHRyaWJ1dGVzLCBzZWUgIzIxNjE1CiAgICAgICAgcmV0dXJuIHsgdHlwZTogaWN1VHlwZSwgbWFpbkJpbmRpbmc6IG1haW5CaW5kaW5nLCBjYXNlcywgdmFsdWVzIH07CiAgICB9CiAgICAvKioKICAgICAqIFJlbW92ZXMgZXZlcnl0aGluZyBpbnNpZGUgdGhlIHN1Yi10ZW1wbGF0ZXMgb2YgYSBtZXNzYWdlLgogICAgICogQHBhcmFtIHs/fSBtZXNzYWdlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiByZW1vdmVJbm5lclRlbXBsYXRlVHJhbnNsYXRpb24obWVzc2FnZSkgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgbWF0Y2g7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCByZXMgPSAnJzsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IGluZGV4ID0gMDsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IGluVGVtcGxhdGUgPSBmYWxzZTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IHRhZ01hdGNoZWQ7CiAgICAgICAgd2hpbGUgKChtYXRjaCA9IFNVQlRFTVBMQVRFX1JFR0VYUC5leGVjKG1lc3NhZ2UpKSAhPT0gbnVsbCkgewogICAgICAgICAgICBpZiAoIWluVGVtcGxhdGUpIHsKICAgICAgICAgICAgICAgIHJlcyArPSBtZXNzYWdlLnN1YnN0cmluZyhpbmRleCwgbWF0Y2guaW5kZXggKyBtYXRjaFswXS5sZW5ndGgpOwogICAgICAgICAgICAgICAgdGFnTWF0Y2hlZCA9IG1hdGNoWzFdOwogICAgICAgICAgICAgICAgaW5UZW1wbGF0ZSA9IHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBpZiAobWF0Y2hbMF0gPT09IGAke01BUktFUn0vKiR7dGFnTWF0Y2hlZH0ke01BUktFUn1gKSB7CiAgICAgICAgICAgICAgICAgICAgaW5kZXggPSBtYXRjaC5pbmRleDsKICAgICAgICAgICAgICAgICAgICBpblRlbXBsYXRlID0gZmFsc2U7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgbmdEZXZNb2RlICYmCiAgICAgICAgICAgIGFzc2VydEVxdWFsKGluVGVtcGxhdGUsIGZhbHNlLCBgVGFnIG1pc21hdGNoOiB1bmFibGUgdG8gZmluZCB0aGUgZW5kIG9mIHRoZSBzdWItdGVtcGxhdGUgaW4gdGhlIHRyYW5zbGF0aW9uICIke21lc3NhZ2V9ImApOwogICAgICAgIHJlcyArPSBtZXNzYWdlLnN1YnN0cihpbmRleCk7CiAgICAgICAgcmV0dXJuIHJlczsKICAgIH0KICAgIC8qKgogICAgICogRXh0cmFjdHMgYSBwYXJ0IG9mIGEgbWVzc2FnZSBhbmQgcmVtb3ZlcyB0aGUgcmVzdC4KICAgICAqCiAgICAgKiBUaGlzIG1ldGhvZCBpcyB1c2VkIGZvciBleHRyYWN0aW5nIGEgcGFydCBvZiB0aGUgbWVzc2FnZSBhc3NvY2lhdGVkIHdpdGggYSB0ZW1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ob2RlLCBhdHRyTmFtZSwgc2FuaXRpemVGbiA9IG51bGwpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgdXBkYXRlT3BDb2RlcyA9IFtudWxsLCBudWxsXTsKICAgICAgICAvLyBBbGxvYyBzcGFjZSBmb3IgbWFzayBhbmQgc2l6ZQogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCB0ZXh0UGFydHMgPSBzdHIuc3BsaXQoQklORElOR19SRUdFWFApOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgbWFzayA9IDA7CiAgICAgICAgZm9yIChsZXQgaiA9IDA7IGogPCB0ZXh0UGFydHMubGVuZ3RoOyBqKyspIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB0ZXh0VmFsdWUgPSB0ZXh0UGFydHNbal07CiAgICAgICAgICAgIGlmIChqICYgMSkgewogICAgICAgICAgICAgICAgLy8gT2RkIGluZGV4ZXMgYXJlIGJpbmRpbmdzCiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBiaW5kaW5nSW5kZXggPSBwYXJzZUludCh0ZXh0VmFsdWUsIDEwKTsKICAgICAgICAgICAgICAgIHVwZGF0ZU9wQ29kZXMucHVzaCgtMSAtIGJpbmRpbmdJbmRleCk7CiAgICAgICAgICAgICAgICBtYXNrID0gbWFzayB8IHRvTWFza0JpdChiaW5kaW5nSW5kZXgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKHRleHRWYWx1ZSAhPT0gJycpIHsKICAgICAgICAgICAgICAgIC8vIEV2ZW4gaW5kZXhlcyBhcmUgdGV4dAogICAgICAgICAgICAgICAgdXBkYXRlT3BDb2Rlcy5wdXNoKHRleHRWYWx1ZSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgdXBkYXRlT3BDb2Rlcy5wdXNoKGRlc3RpbmF0aW9uTm9kZSA8PCAyIC8qIFNISUZUX1JFRiAqLyB8CiAgICAgICAgICAgIChhdHRyTmFtZSA/IDEgLyogQXR0ciAqLyA6IDAgLyogVGV4dCAqLykpOwogICAgICAgIGlmIChhdHRyTmFtZSkgewogICAgICAgICAgICB1cGRhdGVPcENvZGVzLnB1c2goYXR0ck5hbWUsIHNhbml0aXplRm4pOwogICAgICAgIH0KICAgICAgICB1cGRhdGVPcENvZGVzWzBdID0gbWFzazsKICAgICAgICB1cGRhdGVPcENvZGVzWzFdID0gdXBkYXRlT3BDb2Rlcy5sZW5ndGggLSAyOwogICAgICAgIHJldHVybiB1cGRhdGVPcENvZGVzOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IGljdUV4cHJlc3Npb24KICAgICAqIEBwYXJhbSB7Pz19IG1hc2sKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGdldEJpbmRpbmdNYXNrKGljdUV4cHJlc3Npb24sIG1hc2sgPSAwKSB7CiAgICAgICAgbWFzayA9IG1hc2sgfCB0b01hc2tCaXQoaWN1RXhwcmVzc2lvbi5tYWluQmluZGluZyk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBtYXRjaDsKICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGljdUV4cHJlc3Npb24udmFsdWVzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdmFsdWVBcnIgPSBpY3VFeHByZXNzaW9uLnZhbHVlc1tpXTsKICAgICAgICAgICAgZm9yIChsZXQgaiA9IDA7IGogPCB2YWx1ZUFyci5sZW5ndGg7IGorKykgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgdmFsdWUgPSB2YWx1ZUFycltqXTsKICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdmFsdWUgPT09ICdzdHJpbmcnKSB7CiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKG1hdGNoID0gQklORElOR19SRUdFWFAuZXhlYyh2YWx1ZSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgbWFzayA9IG1hc2sgfCB0b01hc2tCaXQocGFyc2VJbnQobWF0Y2hbMV0sIDEwKSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgbWFzayA9IGdldEJpbmRpbmdNYXNrKCgvKiogQHR5cGUgez99ICovICh2YWx1ZSkpLCBtYXNrKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gbWFzazsKICAgIH0KICAgIC8qKiBAdHlwZSB7P30gKi8KICAgIGNvbnN0IGkxOG5JbmRleFN0YWNrID0gW107CiAgICAvKiogQHR5cGUgez99ICovCiAgICBsZXQgaTE4bkluZGV4U3RhY2tQb2ludGVyID0gLTE7CiAgICAvKioKICAgICAqIENvbnZlcnQgYmluZGluZyBpbmRleCB0byBtYXNrIGJpdC4KICAgICAqCiAgICAgKiBFYWNoIGluZGV4IHJlcHJlc2VudHMgYSBzaW5nbGUgYml0IG9uIHRoZSBiaXQtbWFzay4gQmVjYXVzZSBiaXQtbWFzayBvbmx5IGhhcyAzMiBiaXRzLCB3ZSBtYWtlCiAgICAgKiB0aGUgMzJuZCBiaXQgc2hhcmUgYWxsIG1hc2tzIGZvciBhbGwgYmluZGluZ3MgaGlnaGVyIHRoYW4gMzIuIFNpbmNlIGl0IGlzIGV4dHJlbWVseSByYXJlIHRvIGhhdmUKICAgICAqIG1vcmUgdGhhbiAzMiBiaW5kaW5ncyB0aGlzIHdpbGwgYmUgaGl0IHZlcnkgcmFyZWx5LiBUaGUgZG93bnNpZGUgb2YgaGl0dGluZyB0aGlzIGNvcm5lciBjYXNlIGlzCiAg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CiAgICAgICAgcmV0dXJuIHN0YXJ0SW5kZXggKyBpMThuVmFyc0NvdW50Kys7CiAgICB9CiAgICAvKioKICAgICAqIFNlZSBgaTE4blN0YXJ0YCBhYm92ZS4KICAgICAqIEBwYXJhbSB7P30gbFZpZXcKICAgICAqIEBwYXJhbSB7P30gdFZpZXcKICAgICAqIEBwYXJhbSB7P30gaW5kZXgKICAgICAqIEBwYXJhbSB7P30gbWVzc2FnZQogICAgICogQHBhcmFtIHs/PX0gc3ViVGVtcGxhdGVJbmRleAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gaTE4blN0YXJ0Rmlyc3RQYXNzKGxWaWV3LCB0VmlldywgaW5kZXgsIG1lc3NhZ2UsIHN1YlRlbXBsYXRlSW5kZXgpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3Qgc3RhcnRJbmRleCA9IHRWaWV3LmJsdWVwcmludC5sZW5ndGggLSBIRUFERVJfT0ZGU0VUOwogICAgICAgIGkxOG5WYXJzQ291bnQgPSAwOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBwcmV2aW91c09yUGFyZW50VE5vZGUgPSBnZXRQcmV2aW91c09yUGFyZW50VE5vZGUoKTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgcGFyZW50VE5vZGUgPSBnZXRJc1BhcmVudCgpID8gcHJldmlvdXNPclBhcmVudFROb2RlIDogcHJldmlvdXNPclBhcmVudFROb2RlICYmIHByZXZpb3VzT3JQYXJlbnRUTm9kZS5wYXJlbnQ7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBwYXJlbnRJbmRleCA9IHBhcmVudFROb2RlICYmIHBhcmVudFROb2RlICE9PSBsVmlld1tUX0hPU1RdID8gcGFyZW50VE5vZGUuaW5kZXggLSBIRUFERVJfT0ZGU0VUIDogaW5kZXg7CiAgICAgICAgLyoqIEB0eXBlIHs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hZ2UsIGFsbG9jTm9kZUluZGV4KHN0YXJ0SW5kZXgpLCBwYXJlbnRJbmRleCA8PCAxNyAvKiBTSElGVF9QQVJFTlQgKi8gfCAxIC8qIEFwcGVuZENoaWxkICovKTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdGVtcGxhdGVUcmFuc2xhdGlvbiA9IGdldFRyYW5zbGF0aW9uRm9yVGVtcGxhdGUobWVzc2FnZSwgc3ViVGVtcGxhdGVJbmRleCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbXNnUGFydHMgPSByZXBsYWNlTmdzcCh0ZW1wbGF0ZVRyYW5zbGF0aW9uKS5zcGxpdChQSF9SRUdFWFApOwogICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IG1zZ1BhcnRzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBsZXQgdmFsdWUgPSBtc2dQYXJ0c1tpXTsKICAgICAgICAgICAgICAgIGlmIChpICYgMSkgewogICAgICAgICAgICAgICAgICAgIC8vIE9kZCBpbmRleGVzIGFyZSBwbGFjZWhvbGRlcnMgKGVsZW1lbnRzIGFuZCBzdWItdGVtcGxhdGVzKQogICAgICAgICAgICAgICAgICAgIGlmICh2YWx1ZS5jaGFyQXQoMCkgPT09ICcvJykgewogICAgICAgICAgICAgICAgICAgICAgICAvLyBJdCBpcyBhIGNsb3NpbmcgdGFnCiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2YWx1ZS5jaGFyQXQoMSkgPT09ICIjIiAvKiBFTEVNRU5UICovKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBwaEluZGV4ID0gcGFyc2VJbnQodmFsdWUuc3Vic3RyKDIpLCAxMCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJlbnRJbmRleCA9IHBhcmVudEluZGV4U3RhY2tbLS1wYXJlbnRJbmRleFBvaW50ZXJdOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgY3JlYXRlT3BDb2Rlcy5wdXNoKHBoSW5kZXggPDwgMyAvKiBTSElGVF9SRUYgKi8gfCA1IC8qIEVsZW1lbnRFbmQgKi8pOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHBoSW5kZXggPSBwYXJzZUludCh2YWx1ZS5zdWJzdHIoMSksIDEwKTsKICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBpc0VsZW1lbnQgPSB2YWx1ZS5jaGFyQXQoMCkgPT09ICIjIiAvKiBFTEVNRU5UICovOwogICAgICAgICAgICAgICAgICAgICAgICAvLyBUaGUgdmFsdWUgcmVwcmVzZW50cyBhIHBsYWNlaG9sZGVyIHRoYXQgd2UgbW92ZSB0byB0aGUgZGVzaWduYXRlZCBpbmRleC4KICAgICAgICAgICAgICAgICAgICAgICAgLy8gTm90ZTogcG9zaXRpdmUgaW5kaWNpZXMgaW5kaWNhdGUgdGhhdCBhIFROb2RlIHdpdGggYSBnaXZlbiBpbmRleCBzaG91bGQgYWxzbyBiZSBtYXJrZWQKICAgICAgICAgICAgICAgICAgICAgICAgLy8gYXMgcGFyZW50IHdoaWxlIGV4ZWN1dGluZyBgU2VsZWN0YCBpbnN0cnVjdGlvbi4KICAgICAgICAgICAgICAgICAgICAgICAgY3JlYXRlT3BDb2Rlcy5wdXNoKChpc0VsZW1lbnQgPyBwaEluZGV4IDogfnBoSW5kZXgpIDw8IDMgLyogU0hJRlRfUkVGICovIHwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgLyogU2VsZWN0ICovLCBwYXJlbnRJbmRleCA8PCAxNyAvKiBTSElGVF9QQVJFTlQgKi8gfCAxIC8qIEFwcGVuZENoaWxkICovKTsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlzRWxlbWVudCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyZW50SW5kZXhTdGFja1srK3BhcmVudEluZGV4UG9pbnRlcl0gPSBwYXJlbnRJbmRleCA9IHBoSW5kZXg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAvLyBFdmVuIGluZGV4ZXMgYXJlIHRleHQgKGluY2x1ZGluZyBiaW5kaW5ncyAmIElDVSBleHByZXNzaW9ucykKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgcGFydHMgPSBleHRyYWN0UGFydHModmFsdWUpOwogICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGogPSAwOyBqIDwgcGFydHMubGVuZ3RoOyBqKyspIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGogJiAxKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBPZGQgaW5kZXhlcyBhcmUgSUNVIGV4cHJlc3Npb25zCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBpY3VFeHByZXNzaW9uID0gKC8qKiBAdHlwZSB7P30gKi8gKHBhcnRzW2pdKSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBWZXJpZnkgdGhhdCBJQ1UgZXhwcmVzc2lvbiBoYXMgdGhlIHJpZ2h0IHNoYXBlLiBUcmFuc2xhdGlvbnMgbWlnaHQgY29udGFpbiBpbnZhbGlkCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBjb25zdHJ1Y3Rpb25zICh3aGlsZSBvcmlnaW5hbCBtZXNzYWdlcyB3ZXJlIGNvcnJlY3QpLCBzbyBJQ1UgcGFyc2luZyBhdCBydW50aW1lIG1heQogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbm90IHN1Y2NlZWQgKHRodXMgYGljdUV4cHJlc3Npb25gIHJlbWFpbnMgYSBzdHJpbmcpLgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBpY3VFeHByZXNzaW9uICE9PSAnb2JqZWN0JykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgVW5hYmxlIHRvIHBhcnNlIElDVSBleHByZXNzaW9uIGluICIke3RlbXBsYXRlVHJhbnNsYXRpb259IiBtZXNzYWdlLmApOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQ3JlYXRlIHRoZSBjb21tZW50IG5vZGUgdGhhdCB3aWxsIGFuY2hvciB0aGUgSUNVIGV4cHJlc3Npb24KICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGljdU5vZGVJbmRleCA9IGFsbG9jTm9kZUluZGV4KHN0YXJ0SW5kZXgpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgY3JlYXRlT3BDb2Rlcy5wdXNoKENPTU1FTlRfTUFSS0VSLCBuZ0Rldk1vZGUgPyBgSUNVICR7aWN1Tm9kZUluZGV4fWAgOiAnJywgaWN1Tm9kZUluZGV4LCBwYXJlbnRJbmRleCA8PCAxNyAvKiBTSElGVF9QQVJFTlQgKi8gfCAxIC8qIEFwcGVuZENoaWxkICovKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFVwZGF0ZSBjb2RlcyBmb3IgdGhlIElDVSBleHByZXNzaW9uCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBtYXNrID0gZ2V0QmluZGluZ01hc2soaWN1RXhwcmVzc2lvbik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpY3VTdGFydChpY3VFeHByZXNzaW9ucywgaWN1RXhwcmVzc2lvbiwgaWN1Tm9kZUluZGV4LCBpY3VOb2RlSW5kZXgpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gU2luY2UgdGhpcyBpcyByZWN1cnNpdmUsIHRoZSBsYXN0IFRJY3UgdGhhdCB3YXMgcHVzaGVkIGlzIHRoZSBvbmUgd2Ugd2FudAogICAgICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgdEljdUluZGV4ID0gaWN1RXhwcmVzc2lvbnMubGVuZ3RoIC0gMTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZU9wQ29kZXMucHVzaCh0b01hc2tCaXQoaWN1RXhwcmVzc2lvbi5tYWluQmluZGluZyksIC8vIG1hc2sgb2YgdGhlIG1haW4gYmluZGluZwogICAgICAgICAgICAgICAgICAgICAgICAgICAgMywgLy8gc2tpcCAzIG9wQ29kZXMgaWYgbm90IGNoYW5nZWQKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0xIC0gaWN1RXhwcmVzc2lvbi5tYWluQmluZGluZywgaWN1Tm9kZUluZGV4IDw8IDIgLyogU0hJRlRfUkVGICovIHwgMiAvKiBJY3VTd2l0Y2ggKi8sIHRJY3VJbmRleCwgbWFzaywgLy8gbWFzayBvZiBhbGwgdGhlIGJpbmRpbmdzIG9mIHRoaXMgSUNVIGV4cHJlc3Npb24KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIsIC8vIHNraXAgMiBvcENvZGVzIGlmIG5vdCBjaGFuZ2VkCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpY3VOb2RlSW5kZXggPDwgMiAvKiBTSElGVF9SRUYgKi8gfCAzIC8qIEljdVVwZGF0ZSAqLywgdEljdUluZGV4KTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChwYXJ0c1tqXSAhPT0gJycpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHRleHQgPSAoLyoqIEB0eXBlIHs/fSAqLyAocGFydHNbal0pKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEV2ZW4gaW5kZXhlcyBhcmUgdGV4dCAoaW5jbHVkaW5nIGJpbmRpbmdzKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgaGFzQmluZGluZyA9IHRleHQubWF0Y2goQklORElOR19SRUdFWFApOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQ3JlYXRlIHRleHQgbm9kZXMKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHRleHROb2RlSW5kZXggPSBhbGxvY05vZGVJbmRleChzdGFydEluZGV4KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNyZWF0ZU9wQ29kZXMucHVzaCgKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIElmIHRoZXJlIGlzIGEgYmluZGluZywgdGhlIHZhbHVlIHdpbGwgYmUgc2V0IGR1cmluZyB1cGRhdGUKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhhc0JpbmRpbmcgPyAnJyA6IHRleHQsIHRleHROb2RlSW5kZXgsIHBhcmVudEluZGV4IDw8IDE3IC8qIFNISUZUX1BBUkVOVCAqLyB8IDEgLyogQXBwZW5kQ2hpbGQgKi8pOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGhhc0JpbmRpbmcpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRBbGxUb0FycmF5KGdlbmVyYXRlQmluZGluZ1VwZGF0ZU9wQ29kZXModGV4dCwgdGV4dE5vZGVJbmRleCksIHVwZGF0ZU9wQ29kZXMpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGlmIChpMThuVmFyc0NvdW50ID4gMCkgewogICAgICAgICAgICBhbGxvY0V4cGFuZG8odFZpZXcsIGxWaWV3LCBpMThuVmFyc0NvdW50KTsKICAgICAgICB9CiAgICAgICAgbmdEZXZNb2RlICYmCiAgICAgICAgICAgIGF0dGFjaEkxOG5PcENvZGVzRGVidWcoY3JlYXRlT3BDb2RlcywgdXBkYXRlT3BDb2RlcywgaWN1RXhwcmVzc2lvbnMubGVuZ3RoID8gaWN1RXhwcmVzc2lvbnMgOiBudWxsLCBsVmlldyk7CiAgICAgICAgLy8gTk9URTogbG9jYWwgdmFyIG5lZWRlZCB0byBwcm9wZXJseSBhc3NlcnQgdGhlIHR5cGUgb2YgYFRJMThuYC4KICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgdEkxOG4gPSB7CiAgICAgICAgICAgIHZhcnM6IGkxOG5WYXJzQ291bnQsCiAgICAgICAgICAgIGNyZWF0ZTogY3JlYXRlT3BDb2RlcywKICAgICAgICAgICAgdXBkYXRlOiB1cGRhdGVPcENvZGVzLAogICAgICAgICAgICBpY3VzOiBpY3VFeHByZXNzaW9ucy5sZW5ndGggPyBpY3VFeHByZXNzaW9ucyA6IG51bGwsCiAgICAgICAgfTsKICAgICAgICB0Vmlldy5kYXRhW2luZGV4ICsgSEVBREVSX09GRlNFVF0gPSB0STE4bjsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB0VmlldwogICAgICogQHBhcmFtIHs/fSB0Tm9kZQogICAgICogQHBhcmFtIHs/fSBwYXJlbnRUTm9kZQogICAgICogQHBhcmFtIHs/fSBwcmV2aW91c1ROb2RlCiAgICAgKiBAcGFyYW0gez99IGxWaWV3CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBhcHBlbmRJMThuTm9kZSh0VmlldywgdE5vZGUsIHBhcmVudFROb2RlLCBwcmV2aW91c1ROb2RlLCBsVmlldykgewogICAgICAgIG5nRGV2TW9kZSAmJiBuZ0Rldk1vZGUucmVuZGVyZXJNb3ZlTm9kZSsrOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBuZXh0Tm9kZSA9IHROb2RlLm5leHQ7CiAgICAgICAgaWYgKCFwcmV2aW91c1ROb2RlKSB7CiAgICAgICAgICAgIHByZXZpb3VzVE5vZGUgPSBwYXJlbnRUTm9kZTsKICAgICAgICB9CiAgICAgICAgLy8gUmUtb3JnYW5pemUgbm9kZSB0cmVlIHRvIHB1dCB0aGlzIG5vZGUgaW4gdGhlIGNvcnJlY3QgcG9zaXRpb24uCiAgICAgICAgaWYgKHByZXZpb3VzVE5vZGUgPT09IHBhcmVudFROb2RlICYmIHROb2RlICE9PSBwYXJlbnRUTm9kZS5jaGlsZCkgewogICAgICAgICAgICB0Tm9kZS5uZXh0ID0gcGFyZW50VE5vZGUuY2hpbGQ7CiAgICAgICAgICAgIHBhcmVudFROb2RlLmNoaWxkID0gdE5vZGU7CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYgKHByZXZpb3VzVE5vZGUgIT09IHBhcmVudFROb2RlICYmIHROb2RlICE9PSBwcmV2aW91c1ROb2RlLm5leHQpIHsKICAgICAgICAgICAgdE5vZGUubmV4dCA9IHByZXZpb3VzVE5vZGUubmV4dDsKICAgICAgICAgICAgcHJldmlvdXNUTm9kZS5uZXh0ID0gdE5vZGU7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICB0Tm9kZS5uZXh0ID0gbnVsbDsKICAgICAgICB9CiAgICAgICAgaWYgKHBhcmVudFROb2RlICE9PSBsVmlld1tUX0hPU1RdKSB7CiAgICAgICAgICAgIHROb2RlLnBhcmVudCA9ICgvKiogQHR5cGUgez99ICovIChwYXJlbnRUTm9kZSkpOwogICAgICAgIH0KICAgICAgICAvLyBJZiB0Tm9kZSB3YXMgbW92ZWQgYXJvdW5kLCB3ZSBtaWdodCBuZWVkIHRvIGZpeCBhIGJyb2tlbiBsaW5rLgogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgY3Vyc29yID0gdE5vZGUubmV4dDsKICAgICAgICB3aGlsZSAoY3Vyc29yKSB7CiAgICAgICAgICAgIGlmIChjdXJzb3IubmV4dCA9PT0gdE5vZGUpIHsKICAgICAgICAgICAgICAgIGN1cnNvci5uZXh0ID0gbmV4dE5vZGU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY3Vyc29yID0gY3Vyc29yLm5leHQ7CiAgICAgICAgfQogICAgICAgIC8vIElmIHRoZSBwbGFjZWhvbGRlciB0byBhcHBlbmQgaXMgYSBwcm9qZWN0aW9uLCB3ZSBuZWVkIHRvIG1vdmUgdGhlIHByb2plY3RlZCBub2RlcyBpbnN0ZWFkCiAgICAgICAgaWYgKHROb2RlLnR5cGUgPT09IDEgLyogUHJvamVjdGlvbiAqLykgewogICAgICAgICAgICBhcHBseVByb2plY3Rpb24odFZpZXcsIGxWaWV3LCAoLyoqIEB0eXBlIHs/fSAqLyAodE5vZGUpKSk7CiAgICAgICAgICAgIHJldHVybiB0Tm9kZTsKICAgICAgICB9CiAgICAgICAgYXBwZW5kQ2hpbGQodFZpZXcsIGxWaWV3LCBnZX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CiAgICAgICAgaWYgKFBQX01VTFRJX1ZBTFVFX1BMQUNFSE9MREVSU19SRUdFWFAudGVzdChtZXNzYWdlKSkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG1hdGNoZXMgPSB7fTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB0ZW1wbGF0ZUlkc1N0YWNrID0gW1JPT1RfVEVNUExBVEVfSURdOwogICAgICAgICAgICByZXN1bHQgPSByZXN1bHQucmVwbGFjZShQUF9QTEFDRUhPTERFUlNfUkVHRVhQLCAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbQogICAgICAgICAgICAgKiBAcGFyYW0gez99IHBocwogICAgICAgICAgICAgKiBAcGFyYW0gez99IHRtcGwKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChtLCBwaHMsIHRtcGwpID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGNvbnRlbnQgPSBwaHMgfHwgdG1wbDsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHBsYWNlaG9sZGVycyA9IG1hdGNoZXNbY29udGVudF0gfHwgW107CiAgICAgICAgICAgICAgICBpZiAoIXBsYWNlaG9sZGVycy5sZW5ndGgpIHsKICAgICAgICAgICAgICAgICAgICBjb250ZW50LnNwbGl0KCd8JykuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwbGFjZWhvbGRlcgogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKHBsYWNlaG9sZGVyKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbWF0Y2ggPSBwbGFjZWhvbGRlci5tYXRjaChQUF9URU1QTEFURV9JRF9SRUdFWFApOwogICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHRlbXBsYXRlSWQgPSBtYXRjaCA/IHBhcnNlSW50KG1hdGNoWzFdLCAxMCkgOiBST09UX1RFTVBMQVRFX0lEOwogICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGlzQ2xvc2VUZW1wbGF0ZVRhZyA9IFBQX0NMT1NFX1RFTVBMQVRFX1JFR0VYUC50ZXN0KHBsYWNlaG9sZGVyKTsKICAgICAgICAgICAgICAgICAgICAgICAgcGxhY2Vob2xkZXJzLnB1c2goW3RlbXBsYXRlSWQsIGlzQ2xvc2VUZW1wbGF0ZVRhZywgcGxhY2Vob2xkZXJdKTsKICAgICAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICAgICAgbWF0Y2hlc1tjb250ZW50XSA9IHBsYWNlaG9sZGVyczsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmICghcGxhY2Vob2xkZXJzLmxlbmd0aCkgewogICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgaTE4biBwb3N0cHJvY2VzczogdW5tYXRjaGVkIHBsYWNlaG9sZGVyIC0gJHtjb250ZW50fWApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgY3VycmVudFRlbXBsYXRlSWQgPSB0ZW1wbGF0ZUlkc1N0YWNrW3RlbXBsYXRlSWRzU3RhY2subGVuZ3RoIC0gMV07CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBsZXQgaWR4ID0gMDsKICAgICAgICAgICAgICAgIC8vIGZpbmQgcGxhY2Vob2xkZXIgaW5kZXggdGhhdCBtYXRjaGVzIGN1cnJlbnQgdGVtcGxhdGUgaWQKICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgcGxhY2Vob2xkZXJzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKHBsYWNlaG9sZGVyc1tpXVswXSA9PT0gY3VycmVudFRlbXBsYXRlSWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWR4ID0gaTsKICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLy8gdXBkYXRlIHRlbXBsYXRlIGlkIHN0YWNrIGJhc2VkIG9uIHRoZSBjdXJyZW50IHRhZyBleHRyYWN0ZWQKICAgICAgICAgICAgICAgIGNvbnN0IFt0ZW1wbGF0ZUlkLCBpc0Nsb3NlVGVtcGxhdGVUYWcsIHBsYWNlaG9sZGVyXSA9IHBsYWNlaG9sZGVyc1tpZHhdOwogICAgICAgICAgICAgICAgaWYgKGlzQ2xvc2VUZW1wbGF0ZVRhZykgewogICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlSWRzU3RhY2sucG9wKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmIChjdXJyZW50VGVtcGxhdGVJZCAhPT0gdGVtcGxhdGVJZCkgewogICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlSWRzU3RhY2sucHVzaCh0ZW1wbGF0ZUlkKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vIHJlbW92ZSBwcm9jZXNzZWQgdGFnIGZyb20gdGhlIGxpc3QKICAgICAgICAgICAgICAgIHBsYWNlaG9sZGVycy5zcGxpY2UoaWR4LCAxKTsKICAgICAgICAgICAgICAgIHJldHVybiBwbGFjZWhvbGRlcjsKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvLyByZXR1cm4gY3VycmVudCByZXN1bHQgaWYgbm8gcmVwbGFjZW1lbnRzIHNwZWNpZmllZAogICAgICAgIGlmICghT2JqZWN0LmtleXMocmVwbGFjZW1lbnRzKS5sZW5ndGgpIHsKICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU3RlcCAyOiByZXBsYWNlIGFsbCBJQ1UgdmFycyAobGlrZSAiVkFSX1BMVVJBTCIpCiAgICAgICAgICovCiAgICAgICAgcmVzdWx0ID0gcmVzdWx0LnJlcGxhY2UoUFBfSUNVX1ZBUlNfUkVHRVhQLCAoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBtYXRjaAogICAgICAgICAqIEBwYXJhbSB7P30gc3RhcnQKICAgICAgICAgKiBAcGFyYW0gez99IGtleQogICAgICAgICAqIEBwYXJhbSB7P30gX3R5cGUKICAgICAgICAgKiBAcGFyYW0gez99IF9pZHgKICAgICAgICAgKiBAcGFyYW0gez99IGVuZAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgKG1hdGNoLCBzdGFydCwga2V5LCBfdHlwZSwgX2lkeCwgZW5kKSA9PiB7CiAgICAgICAgICAgIHJldHVybiByZXBsYWNlbWVudHMuaGFzT3duUHJvcGVydHkoa2V5KSA/IGAke3N0YXJ0fSR7cmVwbGFjZW1lbnRzW2tleV19JHtlbmR9YCA6IG1hdGNoOwogICAgICAgIH0pKTsKICAgICAgICAvKioKICAgICAgICAgKiBTdGVwIDM6IHJlcGxhY2UgYWxsIHBsYWNlaG9sZGVycyB1c2VkIGluc2lkZSBJQ1VzIGluIGEgZm9ybSBvZiB7UExBQ0VIT0xERVJ9CiAgICAgICAgICovCiAgICAgICAgcmVzdWx0ID0gcmVzdWx0LnJlcGxhY2UoUFBfSUNVX1BMQUNFSE9MREVSU19SRUdFWFAsICgvKioKICAgICAgICAgKiBAcGFyYW0gez99IG1hdGNoCiAgICAgICAgICogQHBhcmFtIHs/fSBrZXkKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIChtYXRjaCwga2V5KSA9PiB7CiAgICAgICAgICAgIHJldHVybiByZXBsYWNlbWVudHMuaGFzT3duUHJvcGVydHkoa2V5KSA/ICgvKiogQHR5cGUgez99ICovIChyZXBsYWNlbWVudHNba2V5XSkpIDogbWF0Y2g7CiAgICAgICAgfSkpOwogICAgICAgIC8qKgogICAgICAgICAqIFN0ZXAgNDogcmVwbGFjZSBhbGwgSUNVIHJlZmVyZW5jZXMgd2l0aCBjb3JyZXNwb25kaW5nIHZhbHVlcyAobGlrZSDvv71JQ1VfRVhQX0lDVV8x77+9KSBpbiBjYXNlCiAgICAgICAgICogbXVsdGlwbGUgSUNVcyBoYXZlIHRoZSBzYW1lIHBsYWNlaG9sZGVyIG5hbWUKICAgICAgICAgKi8KICAgICAgICByZXN1bHQgPSByZXN1bHQucmVwbGFjZShQUF9JQ1VTX1JFR0VYUCwgKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gbWF0Y2gKICAgICAgICAgKiBAcGFyYW0gez99IGtleQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgKG1hdGNoLCBrZXkpID0+IHsKICAgICAgICAgICAgaWYgKHJlcGxhY2VtZW50cy5oYXNPd25Qcm9wZXJ0eShrZXkpKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBsaXN0ID0gKC8qKiBAdHlwZSB7P30gKi8gKHJlcGxhY2VtZW50c1trZXldKSk7CiAgICAgICAgICAgICAgICBpZiAoIWxpc3QubGVuZ3RoKSB7CiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBpMThuIHBvc3Rwcm9jZXNzOiB1bm1hdGNoZWQgSUNVIC0gJHttYXRjaH0gd2l0aCBrZXk6ICR7a2V5fWApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovIChsaXN0LnNoaWZ0KCkpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gbWF0Y2g7CiAgICAgICAgfSkpOwogICAgICAgIHJldHVybiByZXN1bHQ7CiAgICB9CiAgICAvKioKICAgICAqIFRyYW5zbGF0ZXMgYSB0cmFuc2xhdGlvbiBibG9jayBtYXJrZWQgYnkgYGkxOG5TdGFydGAgYW5kIGBpMThuRW5kYC4gSXQgaW5zZXJ0cyB0aGUgdGV4dC9JQ1Ugbm9kZXMKICAgICAqIGludG8gdGhlIHJlbmRlciB0cmVlLCBtb3ZlcyB0aGUgcGxhY2Vob2xkZXIgbm9kZXMgYW5kIHJlbW92ZXMgdGhlIGRlbGV0ZWQgbm9kZXMuCiAgICAgKgogICAgICogXEBjb2RlR2VuQXBpCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiDJtcm1aTE4bkVuZCgpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgbFZpZXcgPSBnZXRMVmlldygpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCB0VmlldyA9IGdldFRWaWV3KCk7CiAgICAgICAgbmdEZXZNb2RlICYmIGFzc2VydERlZmluZWQodFZpZXcsIGB0VmlldyBzaG91bGQgYmUgZGVmaW5lZGApOwogICAgICAgIGkxOG5FbmRGaXJzdFBhc3ModFZpZXcsIGxWaWV3KTsKICAgICAgICAvLyBTdG9wIGRlbGF5aW5nIHByb2plY3Rpb25zCiAgICAgICAgc2V0RGVsYXlQcm9qZWN0aW9uKGZhbHNlKTsKICAgIH0KICAgIC8qKgogICAgICogU2VlIGBpMThuRW5kYCBhYm92ZS4KICAgICAqIEBwYXJhbSB7P30gdFZpZXcKICAgICAqIEBwYXJhbSB7P30gbFZpZXcKICAgICAq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lbGV0ZWQgbm9kZXMKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IGluZGV4ID0gcm9vdEluZGV4ICsgMTsKICAgICAgICB3aGlsZSAoaW5kZXggPD0gbGFzdENyZWF0ZWROb2RlLmluZGV4IC0gSEVBREVSX09GRlNFVCkgewogICAgICAgICAgICBpZiAodmlzaXRlZE5vZGVzLmluZGV4T2YoaW5kZXgpID09PSAtMSkgewogICAgICAgICAgICAgICAgcmVtb3ZlTm9kZSh0VmlldywgbFZpZXcsIGluZGV4LCAvKiBtYXJrQXNEZXRhY2hlZCAqLyB0cnVlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBDaGVjayBpZiBhbiBlbGVtZW50IGhhcyBhbnkgbG9jYWwgcmVmcyBhbmQgc2tpcCB0aGVtCiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdE5vZGUgPSBnZXRUTm9kZSh0VmlldywgaW5kZXgpOwogICAgICAgICAgICBpZiAodE5vZGUgJiYKICAgICAgICAgICAgICAgICh0Tm9kZS50eXBlID09PSAwIC8qIENvbnRhaW5lciAqLyB8fCB0Tm9kZS50eXBlID09PSAzIC8qIEVsZW1lbnQgKi8gfHwKICAgICAgICAgICAgICAgICAgICB0Tm9kZS50eXBlID09PSA0IC8qIEVsZW1lbnRDb250YWluZXIgKi8pICYmCiAgICAgICAgICAgICAgICB0Tm9kZS5sb2NhbE5hbWVzICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAvLyBEaXZpZGUgYnkgMiB0byBnZXQgdGhlIG51bWJlciBvZiBsb2NhbCByZWZzLAogICAgICAgICAgICAgICAgLy8gc2luY2UgdGhleSBhcmUgc3RvcmVkIGFzIGFuIGFycmF5IHRoYXQgYWxzbyBpbmNsdWRlcyBkaXJlY3RpdmUgaW5kZXhlcywKICAgICAgICAgICAgICAgIC8vIGkuZS4gWyJsb2NhbFJlZiIsIGRpcmVjdGl2ZUluZGV4LCA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cHJldmlvdXMgdE5vZGUgbWlnaHQgbm90IGJlIHBvaW50aW5nIGF0IHRoaXMgbm9kZS4KICAgICAgICAvLyBXZSB3aWxsIGxpbmsgb3Vyc2VsdmVzIGludG8gdGhlIHRyZWUgbGF0ZXIgd2l0aCBgYXBwZW5kSTE4bk5vZGVgLgogICAgICAgIGlmIChwcmV2aW91c09yUGFyZW50VE5vZGUgJiYgcHJldmlvdXNPclBhcmVudFROb2RlLm5leHQgPT09IHROb2RlKSB7CiAgICAgICAgICAgIHByZXZpb3VzT3JQYXJlbnRUTm9kZS5uZXh0ID0gbnVsbDsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIHROb2RlOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IGluZGV4CiAgICAgKiBAcGFyYW0gez99IGNyZWF0ZU9wQ29kZXMKICAgICAqIEBwYXJhbSB7P30gdFZpZXcKICAgICAqIEBwYXJhbSB7P30gbFZpZXcKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHJlYWRDcmVhdGVPcENvZGVzKGluZGV4LCBjcmVhdGVPcENvZGVzLCB0VmlldywgbFZpZXcpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgcmVuZGVyZXIgPSBsVmlld1tSRU5ERVJFUl07CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBjdXJyZW50VE5vZGUgPSBudWxsOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgcHJldmlvdXNUTm9kZSA9IG51bGw7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHZpc2l0ZWROb2RlcyA9IFtdOwogICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgY3JlYXRlT3BDb2Rlcy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG9wQ29kZSA9IGNyZWF0ZU9wQ29kZXNbaV07CiAgICAgICAgICAgIGlmICh0eXBlb2Ygb3BDb2RlID09ICdzdHJpbmcnKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCB0ZXh0Uk5vZGUgPSBjcmVhdGVUZXh0Tm9kZShvcENvZGUsIHJlbmRlcmVyKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHRleHROb2RlSW5kZXggPSAoLyoqIEB0eXBlIHs/fSAqLyAoY3JlYXRlT3BDb2Rlc1srK2ldKSk7CiAgICAgICAgICAgICAgICBuZ0Rldk1vZGUgJiYgbmdEZXZNb2RlLnJlbmRlcmVyQ3JlYXRlVGV4dE5vZGUrKzsKICAgICAgICAgICAgICAgIHByZXZpb3VzVE5vZGUgPSBjdXJyZW50VE5vZGU7CiAgICAgICAgICAgICAgICBjdXJyZW50VE5vZGUgPQogICAgICAgICAgICAgICAgICAgIGNyZWF0ZUR5bmFtaWNOb2RlQXRJbmRleCh0VmlldywgbFZpZXcsIHRleHROb2RlSW5kZXgsIDMgLyogRWxlbWVudCAqLywgdGV4dFJOb2RlLCBudWxsKTsKICAgICAgICAgICAgICAgIHZpc2l0ZWROb2Rlcy5wdXNoKHRleHROb2RlSW5kZXgpOwogICAgICAgICAgICAgICAgc2V0SXNOb3RQYXJlbnQoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmICh0eXBlb2Ygb3BDb2RlID09ICdudW1iZXInKSB7CiAgICAgICAgICAgICAgICBzd2l0Y2ggKG9wQ29kZSAmIDcgLyogTUFTS19PUENPREUgKi8pIHsKICAgICAgICAgICAgICAgICAgICBjYXNlIDEgLyogQXBwZW5kQ2hpbGQgKi86CiAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZGVzdGluYXRpb25Ob2RlSW5kZXggPSBvcENvZGUgPj4+IDE3IC8qIFNISUZUX1BBUkVOVCAqLzsKICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGVzdGluYXRpb25UTm9kZTsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRlc3RpbmF0aW9uTm9kZUluZGV4ID09PSBpbmRleCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gSWYgdGhlIGRlc3RpbmF0aW9uIG5vZGUgaXMgYGkxOG5TdGFydGAsIHdlIGRvbid0IGhhdmUgYQogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gdG9wLWxldmVsIG5vZGUgYW5kIHdlIHNob3VsZCB1c2UgdGhlIGhvc3Qgbm9kZSBpbnN0ZWFkCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXN0aW5hdGlvblROb2RlID0gKC8qKiBAdHlwZSB7P30gKi8gKGxWaWV3W1RfSE9TVF0pKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc3RpbmF0aW9uVE5vZGUgPSBnZXRUTm9kZSh0VmlldywgZGVzdGluYXRpb25Ob2RlSW5kZXgpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIG5nRGV2TW9kZSAmJgogICAgICAgICAgICAgICAgICAgICAgICAgICAgYXNzZXJ0RGVmaW5lZCgoLyoqIEB0eXBlIHs/fSAqLyAoY3VycmVudFROb2RlKSksIGBZb3UgbmVlZCB0byBjcmVhdGUgb3Igc2VsZWN0IGEgbm9kZSBiZWZvcmUgeW91IGNhbiBpbnNlcnQgaXQgaW50byB0aGUgRE9NYCk7CiAgICAgICAgICAgICAgICAgICAgICAgIHByZXZpb3VzVE5vZGUgPQogICAgICAgICAgICAgICAgICAgICAgICAgICAgYXBwZW5kSTE4bk5vZGUodFZpZXcsICgvKiogQHR5cGUgez99ICovIChjdXJyZW50VE5vZGUpKSwgZGVzdGluYXRpb25UTm9kZSwgcHJldmlvdXNUTm9kZSwgbFZpZXcpOwogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICBjYXNlIDAgLyogU2VsZWN0ICovOgogICAgICAgICAgICAgICAgICAgICAgICAvLyBOZWdhdGl2ZSBpbmRpY2llcyBpbmRpY2F0ZSB0aGF0IGEgZ2l2ZW4gVE5vZGUgaXMgYSBzaWJsaW5nIG5vZGUsIG5vdCBhIHBhcmVudCBub2RlCiAgICAgICAgICAgICAgICAgICAgICAgIC8vIChzZWUgYGkxOG5TdGFydEZpcnN0UGFzc2AgZm9yIGFkZGl0aW9uYWwgaW5mb3JtYXRpb24pLgogICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGlzUGFyZW50ID0gb3BDb2RlID49IDA7CiAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgbm9kZUluZGV4ID0gKGlzUGFyZW50ID8gb3BDb2RlIDogfm9wQ29kZSkgPj4+IDMgLyogU0hJRlRfUkVGICovOwogICAgICAgICAgICAgICAgICAgICAgICB2aXNpdGVkTm9kZXMucHVzaChub2RlSW5kZXgpOwogICAgICAgICAgICAgICAgICAgICAgICBwcmV2aW91c1ROb2RlID0gY3VycmVudFROb2RlOwogICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50VE5vZGUgPSBnZXRUTm9kZSh0Vmlldywgbm9kZUluZGV4KTsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGN1cnJlbnRUTm9kZSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0UHJldmlvdXNPclBhcmVudFROb2RlKGN1cnJlbnRUTm9kZSwgaXNQYXJlbnQpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgIGNhc2UgNSAvKiBFbGVtZW50RW5kICovOgogICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGVsZW1lbnRJbmRleCA9IG9wQ29kZSA+Pj4gMyAvKiBTSElGVF9SRUYgKi87CiAgICAgICAgICAgICAgICAgICAgICAgIHByZXZpb3VzVE5vZGUgPSBjdXJyZW50VE5vZGUgPSBnZXRUTm9kZSh0VmlldywgZWxlbWVudEluZGV4KTsKICAgICAgICAgICAgICAgICAgICAgICAgc2V0UHJldmlvdXNPclBhcmVudFROb2RlKGN1cnJlbnRUTm9kZSwgZmFsc2UpOwogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICBjYXNlIDQgLyogQXR0ciAqLzoKICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBlbGVtZW50Tm9kZUluZGV4ID0gb3BDb2RlID4+PiAzIC8qIFNISUZUX1JFRiAqLzsKICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBhdHRyTmFtZSA9ICgvKiogQHR5cGUgez99ICovIChjcmVhdGVPcENvZGVzWysraV0pKTsKICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBhdHRyVmFsdWUgPSAoLyoqIEB0eXBlIHs/fSAqLyAoY3JlYXRlT3BDb2Rlc1srK2ldKSk7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFRoaXMgY29kZSBpcyB1c2VkIGZvciBJQ1UgZXhwcmVzc2lvbnMgb25seSwgc2luY2Ugd2UgZG9uJ3Qgc3VwcG9ydAogICAgICAgICAgICAgICAgICAgICAgICAvLyBkaXJlY3RpdmVzL2NvbXBvbmVudHMgaW4gSUNVcywgd2UgZG9uJ3QgbmVlZCB0byB3b3JyeSBhYm91dCBpbnB1dHMgaGVyZQogICAgICAgICAgICAgICAgICAgICAgICBlbGVtZW50QXR0cmlidXRlSW50ZXJuYWwoZ2V0VE5vZGUodFZpZXcsIGVsZW1lbnROb2RlSW5kZXgpLCBsVmlldywgYXR0ck5hbWUsIGF0dHJWYWx1ZSwgbnVsbCwgbnVsbCk7CiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgVW5hYmxlIHRvIGRldGVybWluZSB0aGUgdHlwZSBvZiBtdXRhdGUgb3BlcmF0aW9uIGZvciAiJHtvcENvZGV9ImApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgc3dpdGNoIChvcENvZGUpIHsKICAgICAgICAgICAgICAgICAgICBjYXNlIENPTU1FTlRfTUFSS0VSOgogICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGNvbW1lbnRWYWx1ZSA9ICgvKiogQHR5cGUgez99ICovIChjcmVhdGVPcENvZGVzWysraV0pKTsKICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBjb21tZW50Tm9kZUluZGV4ID0gKC8qKiBAdHlwZSB7P30gKi8gKGNyZWF0ZU9wQ29kZXNbKytpXSkpOwogICAgICAgICAgICAgICAgICAgICAgICBuZ0Rldk1vZGUgJiYKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFzc2VydEVxdWFsKHR5cGVvZiBjb21tZW50VmFsdWUsICdzdHJpbmcnLCBgRXhwZWN0ZWQgIiR7Y29tbWVudFZhbHVlfSIgdG8gYmUgYSBjb21tZW50IG5vZGUgdmFsdWVgKTsKICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBjb21tZW50Uk5vZGUgPSByZW5kZXJlci5jcmVhdGVDb21tZW50KGNvbW1lbnRWYWx1ZSk7CiAgICAgICAgICAgICAgICAgICAgICAgIG5nRGV2TW9kZSAmJiBuZ0Rldk1vZGUucmVuZGVyZXJDcmVhdGVDb21tZW50Kys7CiAgICAgICAgICAgICAgICAgICAgICAgIHByZXZpb3VzVE5vZGUgPSBjdXJyZW50VE5vZGU7CiAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRUTm9kZSA9IGNyZWF0ZUR5bmFtaWNOb2RlQXRJbmRleCh0VmlldywgbFZpZXcsIGNvbW1lbnROb2RlSW5kZXgsIDUgLyogSWN1Q29udGFpbmVyICovLCBjb21tZW50Uk5vZGUsIG51bGwpOwogICAgICAgICAgICAgICAgICAgICAgICB2aXNpdGVkTm9kZXMucHVzaChjb21tZW50Tm9kZUluZGV4KTsKICAgICAgICAgICAgICAgICAgICAgICAgYXR0YWNoUGF0Y2hEYXRhKGNvbW1lbnRSTm9kZSwgbFZpZXcpOwogICAgICAgICAgICAgICAgICAgICAgICAoKC8qKiBAdHlwZSB7P30gKi8gKGN1cnJlbnRUTm9kZSkpKS5hY3RpdmVDYXNlSW5kZXggPSBudWxsOwogICAgICAgICAgICAgICAgICAgICAgICAvLyBXZSB3aWxsIGFkZCB0aGUgY2FzZSBub2RlcyBsYXRlciwgZHVyaW5nIHRoZSB1cGRhdGUgcGhhc2UKICAgICAgICAgICAgICAgICAgICAgICAgc2V0SXNOb3RQYXJlbnQoKTsKICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgY2FzZSBFTEVNRU5UX01BUktFUjoKICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB0YWdOYW1lVmFsdWUgPSAoLyoqIEB0eXBlIHs/fSAqLyAoY3JlYXRlT3BDb2Rlc1srK2ldKSk7CiAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZWxlbWVudE5vZGVJbmRleCA9ICgvKiogQHR5cGUgez99ICovIChjcmVhdGVPcENvZGVzWysraV0pKTsKICAgICAgICAgICAgICAgICAgICAgICAgbmdEZXZNb2RlICYmCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhc3NlcnRFcXVhbCh0eXBlb2YgdGFnTmFtZVZhbHVlLCAnc3RyaW5nJywgYEV4cGVjdGVkICIke3RhZ05hbWVWYWx1ZX0iIHRvIGJlIGFuIGVsZW1lbnQgbm9kZSB0YWcgbmFtZWApOwogICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGVsZW1lbnRSTm9kZSA9IHJlbmRlcmVyLmNyZWF0ZUVsZW1lbnQodGFnTmFtZVZhbHVlKTsKICAgICAgICAgICAgICAgICAgICAgICAgbmdEZXZNb2RlICYmIG5nRGV2TW9kZS5yZW5kZXJlckNyZWF0ZUVsZW1lbnQrKzsKICAgICAgICAgICAgICAgICAgICAgICAgcHJldmlvdXNUTm9kZSA9IGN1cnJlbnRUTm9kZTsKICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudFROb2RlID0gY3JlYXRlRHluYW1pY05vZGVBdEluZGV4KHRWaWV3LCBsVmlldywgZWxlbWVudE5vZGVJbmRleCwgMyAvKiBFbGVtZW50ICovLCBlbGVtZW50Uk5vZGUsIHRhZ05hbWVWYWx1ZSk7CiAgICAgICAgICAgICAgICAgICAgICAgIHZpc2l0ZWROb2Rlcy5wdXNoKGVsZW1lbnROb2RlSW5kZXgpOwogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYFVuYWJsZSB0byBkZXRlcm1pbmUgdGhlIHR5cGUgb2YgbXV0YXRlIG9wZXJhdGlvbiBmb3IgIiR7b3BDb2RlfSJgKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBzZXRJc05vdFBhcmVudCgpOwogICAgICAgIHJldHVybiB2aXNpdGVkTm9kZXM7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdXBkYXRlT3BDb2RlcwogICAgICogQHBhcmFtIHs/fSBpY3VzCiAgICAgKiBAcGFyYW0gez99IGJpbmRpbmdzU3RhcnRJbmRleAogICAgICogQHBhcmFtIHs/fSBjaGFuZ2VNYXNrCiAgICAgKiBAcGFyYW0gez99IHRWaWV3CiAgICAgKiBAcGFyYW0gez99IGxWaWV3CiAgICAgKiBAcGFyYW0gez89fSBieXBhc3NDaGVja0JpdAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gcmVhZFVwZGF0ZU9wQ29kZXModXBkYXRlT3BDb2RlcywgaWN1cywgYmluZGluZ3NTdGFydEluZGV4LCBjaGFuZ2VNYXNrLCB0VmlldywgbFZpZXcsIGJ5cGFzc0NoZWNrQml0ID0gZmFsc2UpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IGNhc2VDcmVhdGVkID0gZmFsc2U7CiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB1cGRhdGVPcENvZGVzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgIC8vIGJpdCBjb2RlIHRvIGNoZWNrIGlmIHdlIHNob3VsZCBhcHBseSB0aGUgbmV4dCB1cGRhdGUKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjaGVja0JpdCA9ICgvKiogQHR5cGUgez99ICovICh1cGRhdGVPcENvZGVzW2ldKSk7CiAgICAgICAgICAgIC8vIE51bWJlciBvZiBvcENvZGVzIHRvIHNraXAgdW50aWwgbmV4dCBzZXQgb2YgdXBkYXRlIGNvZGVzCiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc2tpcENvZGVzID0gKC8qKiBAdHlwZSB7P30gKi8gKHVwZGF0ZU9wQ29kZXNbKytpXSkpOwogICAgICAgICAgICBpZiAoYnlwYXNzQ2hlY2tCaXQgfHwgKGNoZWNrQml0ICYgY2hhbmdlTWFzaykpIHsKICAgICAgICAgICAgICAgIC8vIFRoZSB2YWx1ZSBoYXMgYmVlbiB1cGRhdGVkIHNpbmNlIGxhc3QgY2hlY2tlZAogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IHZhbHVlID0gJyc7CiAgICAgICAgICAgICAgICBmb3IgKGxldCBqID0gaSArIDE7IGogPD0gKGkgKyBza2lwQ29kZXMpOyBqKyspIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3Qgb3BDb2RlID0gdXBkYXRlT3BDb2Rlc1tqXTsKICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG9wQ29kZSA9PSAnc3RyaW5nJykgewogICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZSArPSBvcENvZGU7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHR5cGVvZiBvcENvZGUgPT0gJ251bWJlcicpIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG9wQ29kZSA8IDApIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEl0J3MgYSBiaW5kaW5nIGluZGV4IHdob3NlIHZhbHVlIGlzIG5lZ2F0aXZlCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZSArPSByZW5kZXJTdHJpbmdpZnkobFZpZXdbYmluZGluZ3NTdGFydEluZGV4IC0gb3BDb2RlXSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBub2RlSW5kZXggPSBvcENvZGUgPj4+IDIgLyogU0hJRlRfUkVGICovOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRJY3VJbmRleDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0SWN1OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGljdVROb2RlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChvcENvZGUgJiAzIC8qIE1BU0tfT1BDT0RFICovKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAxIC8qIEF0dHIgKi86CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgcHJvcE5hbWUgPSAoLyoqIEB0eXBlIHs/fSAqLyAodXBkYXRlT3BDb2Rlc1srK2pdKSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc2FuaXRpemVGbiA9ICgvKiogQHR5cGUgez99ICovICh1cGRhdGVPcENvZGVzWysral0pKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxlbWVudFByb3BlcnR5SW50ZXJuYWwodFZpZXcsIGdldFROb2RlKHRWaWV3LCBub2RlSW5kZXgpLCBsVmlldywgcHJvcE5hbWUsIHZhbHVlLCBsVmlld1tSRU5ERVJFUl0sIHNhbml0aXplRm4sIGZhbHNlKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAwIC8qIFRleHQgKi86CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRleHRCaW5kaW5nSW50ZXJuYWwobFZpZXcsIG5vZGVJbmRleCwgdmFsdWUpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDIgLyogSWN1U3dpdGNoICovOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0SWN1SW5kZXggPSAoLyoqIEB0eXBlIHs/fSAqLyAodXBkYXRlT3BDb2Rlc1srK2pdKSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRJY3UgPSAoLyoqIEB0eXBlIHs/fSAqLyAoaWN1cykpW3RJY3VJbmRleF07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGljdVROb2RlID0gKC8qKiBAdHlwZSB7P30gKi8gKGdldFROb2RlKHRWaWV3LCBub2RlSW5kZXgpKSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIElmIHRoZXJlIGlzIGFuIGFjdGl2ZSBjYXNlLCBkZWxldGUgdGhlIG9sZCBub2RlcwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaWN1VE5vZGUuYWN0aXZlQ2FzZUluZGV4ICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCByZW1vdmVDb2RlcyA9IHRJY3UucmVtb3ZlW2ljdVROb2RlLmFjdGl2ZUNhc2VJbmRleF07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBrID0gMDsgayA8IHJlbW92ZUNvZGVzLmxlbmd0aDsgaysrKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHJlbW92ZU9wQ29kZSA9ICgvKiogQHR5cGUgez99ICovIChyZW1vdmVDb2Rlc1trXSkpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaCAocmVtb3ZlT3BDb2RlICYgNyAvKiBNQVNLX09QQ09ERSAqLykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDMgLyogUmVtb3ZlICovOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgbm9kZUluZGV4ID0gcmVtb3ZlT3BDb2RlID4+PiAzIC8qIFNISUZUX1JFRiAqLzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFJlbW92ZSBET00gZWxlbWVudCwgYnV0IGRvICpub3QqIG1hcmsgVE5vZGUgYXMgZGV0YWNoZWQsIHNpbmNlIHdlIGFyZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8ganVzdCBzd2l0Y2hpbmcgSUNVIGNhc2VzICh3aGlsZSBrZWVwaW5nIHRoZSBzYW1lIFROb2RlKSwgc28gYSBET00gZWxlbWVudAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gcmVwcmVzZW50aW5nIGEgbmV3IElDVSBjYXNlIHdpbGwgYmUgcmUtY3JlYXRlZC4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlbW92ZU5vZGUodFZpZXcsIGxWaWV3LCBub2RlSW5kZXgsIC8qIG1hcmtBc0RldGFjaGVkICovIGZhbHNlKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDYgLyogUmVtb3ZlTmVzdGVkSWN1ICovOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbmVzdGVkSWN1Tm9kZUluZGV4ID0gKC8qKiBAdHlwZSB7P30gKi8gKHJlbW92ZUNvZGVzW2sgKyAxXSkpID4+PiAzIC8qIFNISUZUX1JFRiAqLzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG5lc3RlZEljdVROb2RlID0gKC8qKiBAdHlwZSB7P30gKi8gKGdldFROb2RlKHRWaWV3LCBuZXN0ZWRJY3VOb2RlSW5kZXgpKSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBhY3RpdmVJbmRleCA9IG5lc3RlZEljdVROb2RlLmFjdGl2ZUNhc2VJbmRleDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhY3RpdmVJbmRleCAhPT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBuZXN0ZWRJY3VUSW5kZXggPSByZW1vdmVPcENvZGUgPj4+IDMgLyogU0hJRlRfUkVGICovOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBuZXN0ZWRUSWN1ID0gKC8qKiBAdHlwZSB7P30gKi8gKGljdXMpKVtuZXN0ZWRJY3VUSW5kZXhdOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZEFsbFRvQXJyYXkobmVzdGVkVEljdS5yZW1vdmVbYWN0aXZlSW5kZXhdLCByZW1vdmVDb2Rlcyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gVXBkYXRlIHRoZSBhY3RpdmUgY2FzZUluZGV4CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgY2FzZUluZGV4ID0gZ2V0Q2FzZUluZGV4KHRJY3UsIHZhbHVlKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWN1VE5vZGUuYWN0aXZlQ2FzZUluZGV4ID0gY2FzZUluZGV4ICE9PSAtMSA/IGNhc2VJbmRleCA6IG51bGw7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjYXNlSW5kZXggPiAtMSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQWRkIHRoZSBub2RlcyBmb3IgdGhlIG5ldyBjYXNlCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWFkQ3JlYXRlT3BDb2RlcygtMSwgdEljdS5jcmVhdGVbY2FzZUluZGV4XSwgdFZpZXcsIGxWaWV3KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2VDcmVhdGVkID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDMgLyogSWN1VXBkYXRlICovOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0SWN1SW5kZXggPSAoLyoqIEB0eXBlIHs/fSAqLyAodXBkYXRlT3BDb2Rlc1srK2pdKSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRJY3UgPSAoLyoqIEB0eXBlIHs/fSAqLyAoaWN1cykpW3RJY3VJbmRleF07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGljdVROb2RlID0gKC8qKiBAdHlwZSB7P30gKi8gKGdldFROb2RlKHRWaWV3LCBub2RlSW5kZXgpKSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpY3VUTm9kZS5hY3RpdmVDYXNlSW5kZXggIT09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlYWRVcGRhdGVPcENvZGVzKHRJY3UudXBkYXRlW2ljdVROb2RlLmFjdGl2ZUNhc2VJbmRleF0sIGljdXMsIGJpbmRpbmdzU3RhcnRJbmRleCwgY2hhbmdlTWFzaywgdFZpZXcsIGxWaWV3LCBjYXNlQ3JlYXRlZCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaSArPSBza2lwQ29kZXM7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHRWaWV3CiAgICAgKiBAcGFyYW0gez99IGxWaWV3CiAgICAgKiBAcGFyYW0gez99IGluZGV4CiAgICAgKiBAcGFyYW0gez99IG1hcmtBc0RldGFjaGVkCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiByZW1vdmVOb2RlKHRWaWV3LCBsVmlldywgaW5kZXgsIG1hcmtBc0RldGFjaGVkKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHJlbW92ZWRQaFROb2RlID0gZ2V0VE5vZGUodFZpZXcsIGluZGV4KTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgcmVtb3ZlZFBoUk5vZGUgPSBnZXROYXRpdmVCeUluZGV4KGluZGV4LCBsVmlldyk7CiAgICAgICAgaWYgKHJlbW92ZWRQaFJOb2RlKSB7CiAgICAgICAgICAgIG5hdGl2ZVJlbW92ZU5vZGUobFZpZXdbUkVOREVSRVJdLCByZW1vdmVkUGhSTm9kZSk7CiAgICAgICAgfQogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBzbG90VmFsdWUgPSAoLyoqIEB0eXBlIHs/fSAqLyAobG9hZChsVmlldywgaW5kZXgpKSk7CiAgICAgICAgaWYgKGlzTENvbnRhaW5lcihzbG90VmFsdWUpKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbENvbnRhaW5lciA9ICgvKiogQHR5cGUgez99ICovIChzbG90VmFsdWUpKTsKICAgICAgICAgICAgaWYgKHJlbW92ZWRQaFROb2RlLnR5cGUgIT09IDAgLyogQ29udGFpbmVyICovKSB7CiAgICAgICAgICAgICAgICBuYXRpdmVSZW1vdmVOb2RlKGxWaWV3W1JFTkRFUkVSXSwgbENvbnRhaW5lcltOQVRJVkVdKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBpZiAobWFya0FzRGV0YWNoZWQpIHsKICAgICAgICAgICAgLy8gRGVmaW5lIHRoaXMgbm9kZSBhcyBkZXRhY2hlZCB0byBhdm9pZCBwcm9qZWN0aW5nIGl0IGxhdGVyCiAgICAgICAgICAgIHJlbW92ZWRQaFROb2RlLmZsYWdzIHw9IDY0IC8qIGlzRGV0YWNoZWQgKi87CiAgICAgICAgfQogICAgICAgIG5nRGV2TW9kZSAmJiBuZ0Rldk1vZGUucmVuZGVyZXJSZW1vdmVOb2RlKys7CiAgICB9CiAgICAvKioKICAgICAqCiAgICAgKiBVc2UgdGhpcyBpbnN0cnVjdGlvbiB0byBjcmVhdGUgYSB0cmFuc2xhdGlvbiBibG9j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uY3Rpb24gaTE4bkF0dHJpYnV0ZXNGaXJzdFBhc3MobFZpZXcsIHRWaWV3LCBpbmRleCwgdmFsdWVzKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHByZXZpb3VzRWxlbWVudCA9IGdldFByZXZpb3VzT3JQYXJlbnRUTm9kZSgpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBwcmV2aW91c0VsZW1lbnRJbmRleCA9IHByZXZpb3VzRWxlbWVudC5pbmRleCAtIEhFQURFUl9PRkZTRVQ7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHVwZGF0ZU9wQ29kZXMgPSBbXTsKICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHZhbHVlcy5sZW5ndGg7IGkgKz0gMikgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGF0dHJOYW1lID0gdmFsdWVzW2ldOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG1lc3NhZ2UgPSB2YWx1ZXNbaSArIDFdOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHBhcnRzID0gbWVzc2FnZS5zcGxpdChJQ1VfUkVHRVhQKTsKICAgICAgICAgICAgZm9yIChsZXQgaiA9IDA7IGogPCBwYXJ0cy5sZW5ndGg7IGorKykgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgdmFsdWUgPSBwYXJ0c1tqXTsKICAgICAgICAgICAgICAgIGlmIChqICYgMSkgewogICAgICAgICAgICAgICAgICAgIC8vIE9kZCBpbmRleGVzIGFyZSBJQ1UgZXhwcmVzc2lvbnMKICAgICAgICAgICAgICAgICAgICAvLyBUT0RPKG9jb21iZSk6IHN1cHBvcnQgSUNVIGV4cHJlc3Npb25zIGluIGF0dHJpYnV0ZXMKICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0lDVSBleHByZXNzaW9ucyBhcmUgbm90IHlldCBzdXBwb3J0ZWQgaW4gYXR0cmlidXRlcycpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAodmFsdWUgIT09ICcnKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gRXZlbiBpbmRleGVzIGFyZSB0ZXh0IChpbmNsdWRpbmcgYmluZGluZ3MpCiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGhhc0JpbmRpbmcgPSAhIXZhbHVlLm1hdGNoKEJJTkRJTkdfUkVHRVhQKTsKICAgICAgICAgICAgICAgICAgICBpZiAoaGFzQmluZGluZykgewogICAgICAgICAgICAgICAgICAgICAgICBpZiAodFZpZXcuZmlyc3RDcmVhdGVQYXNzICYmIHRWaWV3LmRhdGFbaW5kZXggKyBIRUFERVJfT0ZGU0VUXSA9PT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkQWxsVG9BcnJheShnZW5lcmF0ZUJpbmRpbmdVcGRhdGVPcENvZGVzKHZhbHVlLCBwcmV2aW91c0VsZW1lbnRJbmRleCwgYXR0ck5hbWUpLCB1cGRhdGVPcENvZGVzKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB0Tm9kZSA9IGdldFROb2RlKHRWaWV3LCBwcmV2aW91c0VsZW1lbnRJbmRleCk7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFNldCBhdHRyaWJ1dGVzIGZvciBFbGVtZW50cyBvbmx5LCBmb3Igb3RoZXIgdHlwZXMgKGxpa2UgRWxlbWVudENvbnRhaW5lciksCiAgICAgICAgICAgICAgICAgICAgICAgIC8vIG9ubHkgc2V0IGlucHV0cyBiZWxvdwogICAgICAgICAgICAgICAgICAgICAgICBpZiAodE5vZGUudHlwZSA9PT0gMyAvKiBFbGVtZW50ICovKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGVtZW50QXR0cmlidXRlSW50ZXJuYWwodE5vZGUsIGxWaWV3LCBhdHRyTmFtZSwgdmFsdWUsIG51bGwsIG51bGwpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIENoZWNrIGlmIHRoYXQgYXR0cmlidXRlIGlzIGEgZGlyZWN0aXZlIGlucHV0CiAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZGF0YVZhbHVlID0gdE5vZGUuaW5wdXRzICE9PSBudWxsICYmIHROb2RlLmlucHV0c1thdHRyTmFtZV07CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkYXRhVmFsdWUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldElucHV0c0ZvclByb3BlcnR5KHRWaWV3LCBsVmlldywgZGF0YVZhbHVlLCBhdHRyTmFtZSwgdmFsdWUpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG5nRGV2TW9kZSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBlbGVtZW50ID0gKC8qKiBAdHlwZSB7P30gKi8gKGdldE5hdGl2ZUJ5SW5kZXgocHJldmlvdXNFbGVtZW50SW5kZXgsIGxWaWV3KSkpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldE5nUmVmbGVjdFByb3BlcnRpZXMobFZpZXcsIGVsZW1lbnQsIHROb2RlLnR5cGUsIGRhdGFWYWx1ZSwgdmFsdWUpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGlmICh0Vmlldy5maXJzdENyZWF0ZVBhc3MgJiYgdFZpZXcuZGF0YVtpbmRleCArIEhFQURFUl9PRkZTRVRdID09PSBudWxsKSB7CiAgICAgICAgICAgIHRWaWV3LmRhdGFbaW5kZXggKyBIRUFERVJfT0ZGU0VUXSA9IHVwZGF0ZU9wQ29kZXM7CiAgICAgICAgfQogICAgfQogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgbGV0IGNoYW5nZU1hc2sgPSAwYjA7CiAgICAvKiogQHR5cGUgez99ICovCiAgICBsZXQgc2hpZnRzQ291bnRlciA9IDA7CiAgICAvKioKICAgICAqIFN0b3JlcyB0aGUgdmFsdWVzIG9mIHRoZSBiaW5kaW5ncyBkdXJpbmcgZWFjaCB1cGRhdGUgY3ljbGUgaW4gb3JkZXIgdG8gZGV0ZXJtaW5lIGlmIHdlIG5lZWQgdG8KICAgICAqIHVwZGF0ZSB0aGUgdHJhbnNsYXRlZCBub2Rlcy4KICAgICAqCiAgICAgKiBcQGNvZGVHZW5BcGkKICAgICAqIEB0ZW1wbGF0ZSBUCiAgICAgKiBAcGFyYW0gez99IHZhbHVlIFRoZSBiaW5kaW5nJ3MgdmFsdWUKICAgICAqIEByZXR1cm4gez99IFRoaXMgZnVuY3Rpb24gcmV0dXJucyBpdHNlbGYgc28gdGhhdCBpdCBtYXkgYmUgY2hhaW5lZAogICAgICogKGUuZy4gYGkxOG5FeHAoY3R4Lm5hbWUpKGN0eC50aXRsZSlgKQogICAgICoKICAgICAqLwogICAgZnVuY3Rpb24gybXJtWkxOG5FeHAodmFsdWUpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgbFZpZXcgP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BAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHVwZGF0ZU9wQ29kZXM7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGljdXMgPSBudWxsOwogICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheSh0STE4bikpIHsKICAgICAgICAgICAgICAgIHVwZGF0ZU9wQ29kZXMgPSAoLyoqIEB0eXBlIHs/fSAqLyAodEkxOG4pKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHVwZGF0ZU9wQ29kZXMgPSAoKC8qKiBAdHlwZSB7P30gKi8gKHRJMThuKSkpLnVwZGF0ZTsKICAgICAgICAgICAgICAgIGljdXMgPSAoKC8qKiBAdHlwZSB7P30gKi8gKHRJMThuKSkpLmljdXM7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBiaW5kaW5nc1N0YXJ0SW5kZXggPSBnZXRCaW5kaW5nSW5kZXgoKSAtIHNoaWZ0c0NvdW50ZXIgLSAxOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGxWaWV3ID0gZ2V0TFZpZXcoKTsKICAgICAgICAgICAgcmVhZFVwZGF0ZU9wQ29kZXModXBkYXRlT3BDb2RlcywgaWN1cywgYmluZGluZ3NTdGFydEluZGV4LCBjaGFuZ2VNYXNrLCB0VmlldywgbFZpZXcpOwogICAgICAgICAgICAvLyBSZXNldCBjaGFuZ2VNYXNrICYgbWFza0JpdCB0byBkZWZhdWx0IGZvciB0aGUgbmV4dCB1cGRhdGUgY3ljbGUKICAgICAgICAgICAgY2hhbmdlTWFzayA9IDBiMDsKICAgICAgICAgICAgc2hpZnRzQ291bnRlciA9IDA7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBSZXR1cm5zIHRoZSBpbmRleCBvZiB0aGUgY3VycmVudCBjYXNlIG9mIGFuIElDVSBleHByZXNzaW9uIGRlcGVuZGluZyBvbiB0aGUgbWFpbiBiaW5kaW5nIHZhbHVlCiAgICAgKgogICAgICogQHBhcmFtIHs/fSBpY3VFeHByZXNzaW9uCiAgICAgKiBAcGFyYW0gez99IGJpbmRpbmdWYWx1ZSBUaGUgdmFsdWUgb2YgdGhlIG1haW4gYmluZGluZyB1c2VkIGJ5IHRoaXMgSUNVIGV4cHJlc3Npb24KICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGdldENhc2VJbmRleChpY3VFeHByZXNzaW9uLCBiaW5kaW5nVmFsdWUpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IGluZGV4ID0gaWN1RXhwcmVzc2lvbi5jYXNlcy5pbmRleE9mKGJpbmRpbmdWYWx1ZSk7CiAgICAgICAgaWYgKGluZGV4ID09PSAtMSkgewogICAgICAgICAgICBzd2l0Y2ggKGljdUV4cHJlc3Npb24udHlwZSkgewogICAgICAgICAgICAgICAgY2FzZSAxIC8qIHBsdXJhbCAqLzogewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCByZXNvbHZlZENhc2UgPSBnZXRQbHVyYWxDYXNlKGJpbmRpbmdWYWx1ZSwgZ2V0TG9jYWxlSWQoKSk7CiAgICAgICAgICAgICAgICAgICAgaW5kZXggPSBpY3VFeHByZXNzaW9uLmNhc2VzLmluZGV4T2YocmVzb2x2ZWRDYXNlKTsKICAgICAgICAgICAgICAgICAgICBpZiAoaW5kZXggPT09IC0xICYmIHJlc29sdmVkQ2FzZSAhPT0gJ290aGVyJykgewogICAgICAgICAgICAgICAgICAgICAgICBpbmRleCA9IGljdUV4cHJlc3Npb24uY2FzZXMuaW5kZXhPZignb3RoZXInKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjYXNlIDAgLyogc2VsZWN0ICovOiB7CiAgICAgICAgICAgICAgICAgICAgaW5kZXggPSBpY3VFeHByZXNzaW9uLmNhc2VzLmluZGV4T2YoJ290aGVyJyk7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIGluZGV4OwogICAgfQogICAgLyoqCiAgICAgKiBHZW5lcmF0ZSB0aGUgT3BDb2RlcyBmb3IgSUNVIGV4cHJlc3Npb25zLgogICAgICoKICAgICAqIEBwYXJhbSB7P30gdEljdXMKICAgICAqIEBwYXJhbSB7P30gaWN1RXhwcmVzc2lvbgogICAgICogQHBhcmFtIHs/fSBzdGFydEluZGV4CiAgICAgKiBAcGFyYW0gez99IGV4cGFuZG9TdGFydEluZGV4CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBpY3VTdGFydCh0SWN1cywgaWN1RXhwcmVzc2lvbiwgc3RhcnRJbmRleCwgZXhwYW5kb1N0YXJ0SW5kZXgpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgY3JlYXRlQ29kZXMgPSBbXTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgcmVtb3ZlQ29kZXMgPSBbXTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgdXBkYXRlQ29kZXMgPSBbXTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgdmFycyA9IFtdOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBjaGlsZEljdXMgPSBbXTsKICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGljdUV4cHJlc3Npb24udmFsdWVzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgIC8vIEVhY2ggdmFsdWUgaXMgYW4gYXJyYXkgb2Ygc3RyaW5ncyAmIG90aGVyIElDVSBleHByZXNzaW9ucwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHZhbHVlQXJyID0gaWN1RXhwcmVzc2lvbi52YWx1ZXNbaV07CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbmVzdGVkSWN1cyA9IFtdOwogICAgICAgICAgICBmb3IgKGxldCBqID0gMDsgaiA8IHZhbHVlQXJyLmxlbmd0aDsgaisrKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCB2YWx1ZSA9IHZhbHVlQXJyW2pdOwogICAgICAgICAgICAgICAgaWYgKHR5cGVvZiB2YWx1ZSAhPT0gJ3N0cmluZycpIHsKICAgICAgICAgICAgICAgICAgICAvLyBJdCBpcyBhbiBuZXN0ZWQgSUNVIGV4cHJlc3Npb24KICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgaWN1SW5kZXggPSBuZXN0ZWRJY3VzLnB1c2goKC8qKiBAdHlwZSB7P30gKi8gKHZhbHVlKSkpIC0gMTsKICAgICAgICAgICAgICAgICAgICAvLyBSZXBsYWNlIG5lc3RlZCBJQ1UgZXhwcmVzc2lvbiBieSBhIGNvbW1lbnQgbm9kZQogICAgICAgICAgICAgICAgICAgIHZhbHVlQXJyW2pdID0gYDwhLS3vv70ke2ljdUluZGV4fe+/vS0tPmA7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBpY3VDYXNlID0gcGFyc2VJY3VDYXNlKHZhbHVlQXJyLmpvaW4oJycpLCBzdGFydEluZGV4LCBuZXN0ZWRJY3VzLCB0SWN1cywgZXhwYW5kb1N0YXJ0SW5kZXgpOwogICAgICAgICAgICBjcmVhdGVDb2Rlcy5wdXNoKGljdUNhc2UuY3JlYXRlKTsKICAgICAgICAgICAgcmVtb3ZlQ29kZXMucHVzaChpY3VDYXNlLnJlbW92ZSk7CiAgICAgICAgICAgIHVwZGF0ZUNvZGVzLnB1c2goaWN1Q2FzZS51cGRhdGUpOwogICAgICAgICAgICB2YXJzLnB1c2goaWN1Q2FzZS52YXJzKTsKICAgICAgICAgICAgY2hpbGRJY3VzLnB1c2goaWN1Q2FzZS5jaGlsZEljdXMpOwogICAgICAgIH0KICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgdEljdSA9IHsKICAgICAgICAgICAgdHlwZTogaWN1RXhwcmVzc2lvbi50eXBlLAogICAgICAgICAgICB2YXJzLAogICAgICAgICAgICBjaGlsZEljdXMsCiAgICAgICAgICAgIGNhc2VzOiBpY3VFeHByZXNzaW9uLmNhc2VzLAogICAgICAgICAgICBjcmVhdGU6IGNyZWF0ZUNvZGVzLAogICAgICAgICAgICByZW1vdmU6IHJlbW92ZUNvZGVzLAogICAgICAgICAgICB1cGRhdGU6IHVwZGF0ZUNvZGVzCiAgICAgICAgfTsKICAgICAgICB0SWN1cy5wdXNoKHRJY3UpOwogICAgICAgIC8vIEFkZGluZyB0aGUgbWF4aW11bSBwb3NzaWJsZSBvZiB2YXJzIG5lZWRlZCAoYmFzZWQgb24gdGhlIGNhc2VzIHdpdGggdGhlIG1vc3QgdmFycykKICAgICAgICBpMThuVmFyc0NvdW50ICs9IE1hdGgubWF4KC4uLnZhcnMpOwogICAgfQogICAgLyoqCiAgICAgKiBUcmFuc2Zvcm1zIGEgc3RyaW5nIHRlbXBsYXRlIGludG8gYW4gSFRNTCB0ZW1wbGF0ZSBhbmQgYSBsaXN0IG9mIGluc3RydWN0aW9ucyB1c2VkIHRvIHVwZGF0ZQogICAgICogYXR0cmlidXRlcyBvciBub2RlcyB0aGF0IGNvbnRhaW4gYmluZGluZ3MuCiAgICAgKgogICAgICogQHBhcmFtI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sIGljdUNhc2UsIHBhcmVudEluZGV4LCBuZXN0ZWRJY3VzLCB0SWN1cywgZXhwYW5kb1N0YXJ0SW5kZXgpIHsKICAgICAgICBpZiAoY3VycmVudE5vZGUpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBuZXN0ZWRJY3VzVG9DcmVhdGUgPSBbXTsKICAgICAgICAgICAgd2hpbGUgKGN1cnJlbnROb2RlKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBuZXh0Tm9kZSA9IGN1cnJlbnROb2RlLm5leHRTaWJsaW5nOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgbmV3SW5kZXggPSBleHBhbmRvU3RhcnRJbmRleCArICsraWN1Q2FzZS52YXJzOwogICAgICAgICAgICAgICAgc3dpdGNoIChjdXJyZW50Tm9kZS5ub2RlVHlwZSkgewogICAgICAgICAgICAgICAgICAgIGNhc2UgTm9kZS5FTEVNRU5UX05PREU6CiAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZWxlbWVudCA9ICgvKiogQHR5cGUgez99ICovIChjdXJyZW50Tm9kZSkpOwogICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHRhZ05hbWUgPSBlbGVtZW50LnRhZ05hbWUudG9Mb3dlckNhc2UoKTsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFWQUxJRF9FTEVNRU5UUy5oYXNPd25Qcm9wZXJ0eSh0YWdOYW1lKSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gVGhpcyBpc24ndCBhIHZhbGlkIGVsZW1lbnQsIHdlIHdvbid0IGNyZWF0ZSBhbiBlbGVtZW50IGZvciBpdAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWN1Q2FzZS52YXJzLS07CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpY3VDYXNlLmNyZWF0ZS5wdXNoKEVMRU1FTlRfTUFSS0VSLCB0YWdOYW1lLCBuZXdJbmRleCwgcGFyZW50SW5kZXggPDwgMTcgLyogU0hJRlRfUEFSRU5UICovIHwgMSAvKiBBcHBlbmRDaGlsZCAqLyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBlbEF0dHJzID0gZWxlbWVudC5hdHRyaWJ1dGVzOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBlbEF0dHJzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGF0dHIgPSAoLyoqIEB0eXBlIHs/fSAqLyAoZWxBdHRycy5pdGVtKGkpKSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGxvd2VyQXR0ck5hbWUgPSBhdHRyLm5hbWUudG9Mb3dlckNhc2UoKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgaGFzQmluZGluZyA9ICEhYXR0ci52YWx1ZS5tYXRjaChCSU5ESU5HX1JFR0VYUCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gd2UgYXNzdW1lIHRoZSBpbnB1dCBzdHJpbmcgaXMgc2FmZSwgdW5sZXNzIGl0J3MgdXNpbmcgYSBiaW5kaW5nCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGhhc0JpbmRpbmcpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFZBTElEX0FUVFJTLmhhc093blByb3BlcnR5KGxvd2VyQXR0ck5hbWUpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoVVJJX0FUVFJTW2xvd2VyQXR0ck5hbWVdKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkQWxsVG9BcnJheShnZW5lcmF0ZUJpbmRpbmdVcGRhdGVPcENvZGVzKGF0dHIudmFsdWUsIG5ld0luZGV4LCBhdHRyLm5hbWUsIF9zYW5pdGl6ZVVybCksIGljdUNhc2UudXBkYXRlKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKFNSQ1NFVF9BVFRSU1tsb3dlckF0dHJOYW1lXSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZEFsbFRvQXJyYXkoZ2VuZXJhdGVCaW5kaW5nVXBkYXRlT3BDb2RlcyhhdHRyLnZhbHVlLCBuZXdJbmRleCwgYXR0ci5uYW1lLCBzYW5pdGl6ZVNyY3NldCksIGljdUNhc2UudXBkYXRlKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZEFsbFRvQXJyYXkoZ2VuZXJhdGVCaW5kaW5nVXBkYXRlT3BDb2RlcyhhdHRyLnZhbHVlLCBuZXdJbmRleCwgYXR0ci5uYW1lKSwgaWN1Q2FzZS51cGRhdGUpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmdEZXZNb2RlICYmCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS53YXJuKGBXQVJOSU5HOiBpZ25vcmluZyB1bnNhZmUgYXR0cmlidXRlIHZhbHVlICR7bG93ZXJBdHRyTmFtZX0gb24gZWxlbWVudCAke3RhZ05hbWV9IChzZWUgaHR0cDovL2cuY28vbmcvc2VjdXJpdHkjeHNzKWApOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpY3VDYXNlLmNyZWF0ZS5wdXNoKG5ld0luZGV4IDw8IDMgLyogU0hJRlRfUkVGICovIHwgNCAvKiBBdHRyICovLCBhdHRyLm5hbWUsIGF0dHIudmFsdWUpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFBhcnNlIHRoZSBjaGlsZHJlbiBvZiB0aGlzIG5vZGUgKGlmIGFueSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlTm9kZXMoY3VycmVudE5vZGUuZmlyc3RDaGlsZCwgaWN1Q2FzZSwgbmV3SW5kZXgsIG5lc3RlZEljdXMsIHRJY3VzLCBleHBhbmRvU3RhcnRJbmRleCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBSZW1vdmUgdGhlIHBhcmVudCBub2RlIGFmdGVyIHRoZSBjaGlsZHJlbgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWN1Q2FzZS5yZW1vdmUucHVzaChuZXdJbmRleCA8PCAzIC8qIFNISUZUX1JFRiAqLyB8IDMgLyogUmVtb3ZlICovKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICBjYXNlIE5vZGUuVEVYVF9OT0RFOgogICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHZhbHVlID0gY3VycmVudE5vZGUudGV4dENvbnRlbnQgfHwgJyc7CiAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgaGFzQmluZGluZyA9IHZhbHVlLm1hdGNoKEJJTkRJTkdfUkVHRVhQKTsKICAgICAgICAgICAgICAgICAgICAgICAgaWN1Q2FzZS5jcmVhdGUucHVzaChoYXNCaW5kaW5nID8gJycgOiB2YWx1ZSwgbmV3SW5kZXgsIHBhcmVudEluZGV4IDw8IDE3IC8qIFNISUZUX1BBUkVOVCAqLyB8IDEgLyogQXBwZW5kQ2hpbGQgKi8pOwogICAgICAgICAgICAgICAgICAgICAgICBpY3VDYXNlLnJlbW92ZS5wdXNoKG5ld0luZGV4IDw8IDMgLyogU0hJRlRfUkVGICovIHwgMyAvKiBSZW1vdmUgKi8pOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAoaGFzQmluZGluZykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkQWxsVG9BcnJheShnZW5lcmF0ZUJpbmRpbmdVcGRhdGVPcENvZGVzKHZhbHVlLCBuZXdJbmRleCksIGljdUNhc2UudXBkYXRlKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICBjYXNlIE5vZGUuQ09NTUVOVF9OT0RFOgogICAgICAgICAgICAgICAgICAgICAgICAvLyBDaGVjayBpZiB0aGUgY29tbWVudCBub2RlIGlzIGEgcGxhY2Vob2xkZXIgZm9yIGEgbmVzdGVkIElDVQogICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG1hdGNoID0gTkVTVEVEX0lDVS5leGVjKGN1cnJlbnROb2RlLnRleHRDb250ZW50IHx8ICcnKTsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG1hdGNoKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBuZXN0ZWRJY3VJbmRleCA9IHBhcnNlSW50KG1hdGNoWzFdLCAxMCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBuZXdMb2NhbCA9IG5nRGV2TW9kZSA/IGBuZXN0ZWQgSUNVICR7bmVzdGVkSWN1SW5kZXh9YCA6ICcnOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQ3JlYXRlIHRoZSBjb21tZW50IG5vZGUgdGhhdCB3aWxsIGFuY2hvciB0aGUgSUNVIGV4cHJlc3Npb24KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGljdUNhc2UuY3JlYXRlLnB1c2goQ09NTUVOVF9NQVJLRVIsIG5ld0xvY2FsLCBuZXdJbmRleCwgcGFyZW50SW5kZXggPDwgMTcgLyogU0hJRlRfUEFSRU5UICovIHwgMSAvKiBBcHBlbmRDaGlsZCAqLyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBuZXN0ZWRJY3UgPSBuZXN0ZWRJY3VzW25lc3RlZEljdUluZGV4XTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5lc3RlZEljdXNUb0NyZWF0ZS5wdXNoKFtuZXN0ZWRJY3UsIG5ld0luZGV4XSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBXZSBkbyBub3QgaGFuZGxlIGFueSBvdGhlciB0eXBlIG9mIGNvbW1lbnQKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGljdUNhc2UudmFycy0tOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFdlIGRvIG5vdCBoYW5kbGUgYW55IG90aGVyIHR5cGUgb2YgZWxlbWVudAogICAgICAgICAgICAgICAgICAgICAgICBpY3VDYXNlLnZhcnMtLTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGN1cnJlbnROb2RlID0gKC8qKiBAdHlwZSB7P30gKi8gKG5leHROb2RlKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBuZXN0ZWRJY3VzVG9DcmVhdGUubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IG5lc3RlZEljdSA9IG5lc3RlZEljdXNUb0NyZWF0ZVtpXVswXTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IG5lc3RlZEljdU5vZGVJbmRleCA9IG5lc3RlZEljdXNUb0NyZWF0ZVtpXVsxXTsKICAgICAgICAgICAgICAgIGljdVN0YXJ0KHRJY3VzLCBuZXN0ZWRJY3UsIG5lc3RlZEljdU5vZGV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sZXMuZ2V0KGlkKSkpOwogICAgICAgICAgICBhc3NlcnRTYW1lT3JOb3RFeGlzdGluZyhpZCwgZXhpc3RpbmcsIG5nTW9kdWxlVHlwZSk7CiAgICAgICAgICAgIG1vZHVsZXMuc2V0KGlkLCBuZ01vZHVsZVR5cGUpOwogICAgICAgIH0KICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IGltcG9ydHMgPSBuZ01vZHVsZVR5cGUuybVtb2QuaW1wb3J0czsKICAgICAgICBpZiAoaW1wb3J0cyBpbnN0YW5jZW9mIEZ1bmN0aW9uKSB7CiAgICAgICAgICAgIGltcG9ydHMgPSBpbXBvcnRzKCk7CiAgICAgICAgfQogICAgICAgIGlmIChpbXBvcnRzKSB7CiAgICAgICAgICAgIGltcG9ydHMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gaQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgaSA9PiByZWdpc3Rlck5nTW9kdWxlVHlwZSgoLyoqIEB0eXBlIHs/fSAqLyAoaSkpKSkpOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQHRlbXBsYXRlIFQKICAgICAqLwogICAgY2xhc3MgTmdNb2R1bGVSZWYkMSBleHRlbmRzIE5nTW9kdWxlUmVmIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IG5nTW9kdWxlVHlwZQogICAgICAgICAqIEBwYXJhbSB7P30gX3BhcmVudAogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKG5nTW9kdWxlVHlwZSwgX3BhcmVudCkgewogICAgICAgICAgICBzdXBlcigpOwogICAgICAgICAgICB0aGlzLl9wYXJlbnQgPSBfcGFyZW50OwogICAgICAgICAgICAvLyB0c2xpbnQ6ZGlzYWJsZS1uZXh0LWxpbmU6cmVxdWlyZS1pbnRlcm5hbC13aXRoLXVuZGVyc2NvcmUKICAgICAgICA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hlIGluamVjdG9yIGNyZWF0aW9uLCBiZWNhdXNlCiAgICAgICAgICAgIC8vIHRoZSBtb2R1bGUgbWlnaHQgYmUgdHJ5aW5nIHRvIHVzZSB0aGlzIHJlZiBpbiBpdHMgY29udHJ1Y3RvciBmb3IgREkgd2hpY2ggd2lsbCBjYXVzZSBhCiAgICAgICAgICAgIC8vIGNpcmN1bGFyIGVycm9yIHRoYXQgd2lsbCBldmVudHVhbGx5IGVycm9yIG91dCwgYmVjYXVzZSB0aGUgaW5qZWN0b3IgaXNuJ3QgY3JlYXRlZCB5ZXQuCiAgICAgICAgICAgIHRoaXMuX3IzSW5qZWN0b3IuX3Jlc29sdmVJbmplY3RvckRlZlR5cGVzKCk7CiAgICAgICAgICAgIHRoaXMuaW5zdGFuY2UgPSB0aGlzLmdldChuZ01vZHVsZVR5cGUpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHRva2VuCiAgICAgICAgICogQHBhcmFtIHs/PX0gbm90Rm91bmRWYWx1ZQogICAgICAgICAqIEBwYXJhbSB7Pz19IGluamVjdEZsYWdzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQodG9rZW4sIG5vdEZvdW5kVmFsdWUgPSBJbmplY3Rvci5USFJPV19JRl9OT1RfRk9VTkQsIGluamVjdEZsYWdzID0gSW5qZWN0RmxhZ3MuRGVmYXVsdCkgewogICAgICAgICAgICBpZiAodG9rZW4gPT09IEluamVjdG9yIHx8IHRva2VuID09PSBOZ01vZHVsZVJlZiB8fCB0b2tlbiA9PT0gSU5KRUNUT1IpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9yM0luamVjdG9yLmdldCh0b2tlbiwgbm90Rm91bmRWYWx1ZSwgaW5qZWN0RmxhZ3MpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGRlc3Ryb3koKSB7CiAgICAgICAgICAgIG5nRGV2TW9kZSAmJiBhc3NlcnREZWZpbmVkKHRoaXMuZGVzdHJveUNicywgJ05nTW9kdWxlIGFscmVhZHkgZGVzdHJveWVkJyk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaW5qZWN0b3IgPSB0aGlzLl9yM0luamVjdG9yOwogICAgICAgICAgICAhaW5qZWN0b3IuZGVzdHJveWVkICYmIGluamVjdG9yLmRlc3Ryb3koKTsKICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuZGVzdHJveUNicykpLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGZuCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBmbiA9PiBmbigpKSk7CiAgICAgICAgICAgIHRoaXMuZGVzdHJveUNicyA9IG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gY2FsbGJhY2sKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uRGVzdHJveShjYWxsYmFjaykgewogICAgICAgICAgICBuZ0Rldk1vZGUgJiYgYXNzZXJ0RGVmaW5lZCh0aGlzLmRlc3Ryb3lDYnMsICdOZ01vZHVsZSBhbHJlYWR5IGRlc3Ryb3llZCcpOwogICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5kZXN0cm95Q2JzKSkucHVzaChjYWxsYmFjayk7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBAdGVtcGxhdGUgVAogICAgICovCiAgICBjbGFzcyBOZ01vZHVsZUZhY3RvcnkkMSBleHRlbmRzIE5nTW9kdWxlRmFjdG9yeSB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBtb2R1bGVUeXB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FtIHs/fSBwaXBlTmFtZSBUaGUgbmFtZSBvZiB0aGUgcGlwZQogICAgICogQHJldHVybiB7P30gVCB0aGUgaW5zdGFuY2Ugb2YgdGhlIHBpcGUuCiAgICAgKgogICAgICovCiAgICBmdW5jdGlvbiDJtcm1cGlwZShpbmRleCwgcGlwZU5hbWUpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgdFZpZXcgPSBnZXRUVmlldygpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgcGlwZURlZjsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgYWRqdXN0ZWRJbmRleCA9IGluZGV4ICsgSEVBREVSX09GRlNFVDsKICAgICAgICBpZiAodFZpZXcuZmlyc3RDcmVhdGVQYXNzKSB7CiAgICAgICAgICAgIHBpcGVEZWYgPSBnZXRQaXBlRGVmJDEocGlwZU5hbWUsIHRWaWV3LnBpcGVSZWdpc3RyeSk7CiAgICAgICAgICAgIHRWaWV3LmRhdGFbYWRqdXN0ZWRJbmRleF0gPSBwaXBlRGVmOwogICAgICAgICAgICBpZiAocGlwZURlZi5vbkRlc3Ryb3kpIHsKICAgICAgICAgICAgICAgICh0Vmlldy5kZXN0cm95SG9va3MgfHwgKHRWaWV3LmRlc3Ryb3lIb29rcyA9IFtdKSkucHVzaChhZGp1c3RlZEluZGV4LCBwaXBlRGVmLm9uRGVzdHJveSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIHBpcGVEZWYgPSAoLyoqIEB0eXBlIHs/fSAqLyAodFZpZXcuZGF0YVthZGp1c3RlZEluZGV4XSkpOwogICAgICAgIH0KICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgcGlwZUZhY3RvcnkgPSBwaXBlRGVmLmZhY3RvcnkgfHwgKHBpcGVEZWYuZmFjdG9yeSA9IGdldEZhY3RvcnlEZWYocGlwZURl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j48L3ppcHB5PgogICAgICogYGBgCiAgICAgKgogICAgICogQHNlZSBbT2JzZXJ2YWJsZXMgaW4gQW5ndWxhcl0oZ3VpZGUvb2JzZXJ2YWJsZXMtaW4tYW5ndWxhcikKICAgICAqIFxAcHVibGljQXBpCiAgICAgKiBAdGVtcGxhdGUgVAogICAgICovCiAgICBjbGFzcyBFdmVudEVtaXR0ZXIgZXh0ZW5kcyBTdWJqZWN0IHsKICAgICAgICAvLyB0c2xpbnQ6ZGlzYWJsZS1saW5lCiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhbiBpbnN0YW5jZSBvZiB0aGlzIGNsYXNzIHRoYXQgY2FuCiAgICAgICAgICogZGVsaXZlciBldmVudHMgc3luY2hyb25vdXNseSBvciBhc3luY2hyb25vdXNseS4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7Pz19IGlzQXN5bmMgV2hlbiB0cnVlLCBkZWxpdmVyIGV2ZW50cyBhc3luY2hyb25vdXNseS4KICAgICAgICAgKgogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKGlzQXN5bmMgPSBmYWxzZSkgewogICAgICAgICAgICBzdXBlcigpOwogICAgICAgICAgICB0aGlzLl9faXNBc3luYyA9IGlzQXN5bmM7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEVtaXRzIGFuIGV2ZW50IGNvbnRhaW5pbmcgYSBnaXZlbiB2YWx1ZS4KICAgICAgICAgKiBAcGFyYW0gez89fSB2YWx1ZSBUaGUgdmFsdWUgdG8gZW1pdC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGVtaXQodmFsdWUpIHsKICAgICAgICAgICAgc3VwZXIubmV4dCh2YWx1ZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJlZ2lzdGVycyBoYW5kbGVycyBmb3IgZXZlbnRzIGVtaXR0ZWQgYnkgdGhpcyBpbnN0YW5jZS4KICAgICAgICAgKiBAcGFyYW0gez89fSBnZW5lcmF0b3JPck5leHQgV2hlbiBzdXBwbGllZCwgYSBjdXN0b20gaGFuZGxlciBmb3IgZW1pdHRlZCBldmVudHMuCiAgICAgICAgICogQHBhcmFtIHs/PX0gZXJyb3IgV2hlbiBzdXBwbGllZCwgYSBjdXN0b20gaGFuZGxlciBmb3IgYW4gZXJyb3Igbm90aWZpY2F0aW9uCiAgICAgICAgICogZnJvbSB0aGlzIGVtaXR0ZXIuCiAgICAgICAgICogQHBhcmFtIHs/PX0gY29tcGxldGUgV2hlbiBzdXBwbGllZCwgYSBjdXN0b20gaGFuZGxlciBmb3IgYSBjb21wbGV0aW9uCiAgICAgICAgICogbm90aWZpY2F0aW9uIGZyb20gdGhpcyBlbWl0dGVyLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc3Vic2NyaWJlKGdlbmVyYXRvck9yTmV4dCwgZXJyb3IsIGNvbXBsZXRlKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHNjaGVkdWxlckZuOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBlcnJvckZuID0gKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGVycgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGVycikgPT4gbnVsbCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGNvbXBsZXRlRm4gPSAoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiBudWxsKTsKICAgICAgICAgICAgaWYgKGdlbmVyYXRvck9yTmV4dCAmJiB0eXBlb2YgZ2VuZXJhdG9yT3JOZXh0ID09PSAnb2JqZWN0JykgewogICAgICAgICAgICAgICAgc2NoZWR1bGVyRm4gPSB0aGlzLl9faXNBc3luYyA/ICgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICh2YWx1ZSkgPT4gewogICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKCkgPT4gZ2VuZXJhdG9yT3JOZXh0Lm5leHQodmFsdWUpKSk7CiAgICAgICAgICAgICAgICB9KSA6ICgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICh2YWx1ZSkgPT4gewogICAgICAgICAgICAgICAgICAgIGdlbmVyYXRvck9yTmV4dC5uZXh0KHZhbHVlKTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgaWYgKGdlbmVyYXRvck9yTmV4dC5lcnJvcikgewogICAgICAgICAgICAgICAgICAgIGVycm9yRm4gPSB0aGlzLl9faXNBc3luYyA/ICgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGVycgogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKGVycikgPT4gewogICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KCgvKioKICAgICAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgICAgICgpID0+IGdlbmVyYXRvck9yTmV4dC5lcnJvcihlcnIpKSk7CiAgICAgICAgICAgICAgICAgICAgfSkgOiAoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBlcnIKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgIChlcnIpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgZ2VuZXJhdG9yT3JOZXh0LmVycm9yKGVycik7CiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAoZ2VuZXJhdG9yT3JOZXh0LmNvbXBsZXRlKSB7CiAgICAgICAgICAgICAgICAgICAgY29tcGxldGVGbiA9IHRoaXMuX19pc0FzeW5jID8gKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KCgvKioKICAgICAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgICAgICgpID0+IGdlbmVyYXRvck9yTmV4dC5jb21wbGV0ZSgpKSk7CiAgICAgICAgICAgICAgICAgICAgfSkgOiAoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIGdlbmVyYXRvck9yTmV4dC5jb21wbGV0ZSgpOwogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgc2NoZWR1bGVyRm4gPSB0aGlzLl9faXNBc3luYyA/ICgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICh2YWx1ZSkgPT4gewogICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKCkgPT4gZ2VuZXJhdG9yT3JOZXh0KHZhbHVlKSkpOwogICAgICAgICAgICAgICAgfSkgOiAoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAodmFsdWUpID0+IHsKICAgICAgICAgICAgICAgICAgICBnZW5lcmF0b3JPck5leHQodmFsdWUpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBpZiAoZXJyb3IpIHsKICAgICAgICAgICAgICAgICAgICBlcnJvckZuID0gdGhpcy5fX2lzQXN5bmMgPyAoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBlcnIKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgIChlcnIpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dCgoLyoqCiAgICAgICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICAgICAoKSA9PiBlcnJvcihlcnIpKSk7CiAgICAgICAgICAgICAgICAgICAgfSkgOiAoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBlcnIKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgIChlcnIpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3IoZXJyKTsKICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChjb21wbGV0ZSkgewogICAgICAgICAgICAgICAgICAgIGNvbXBsZXRlRm4gPSB0aGlzLl9faXNBc3luYyA/ICgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dCgoLyoqCiAgICAgICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICAgICAoKSA9PiBjb21wbGV0ZSgpKSk7CiAgICAgICAgICAgICAgICAgICAgfSkgOiAoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBsZXRlKCk7CiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBzaW5rID0gc3VwZXIuc3Vic2NyaWJlKHNjaGVkdWxlckZuLCBlcnJvckZuLCBjb21wbGV0ZUZuKTsKICAgICAgICAgICAgaWYgKGdlbmVyYXRvck9yTmV4dCBpbnN0YW5jZW9mIFN1YnNjcmlwdGlvbikgewogICAgICAgICAgICAgICAgZ2VuZXJhdG9yT3JOZXh0LmFkZChzaW5rKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gc2luazsKICAgICAgICB9CiAgICB9CgogICAgLyoqCiAgICAgKiBAZmlsZW92ZXJ2aWV3IGFkZGVkIGJ5IHRzaWNrbGUKICAgICAqIE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HJlZS1zaGFrYWJsZS4gRm9yIHRoaXMgcmVhc29uIHdlIGRvIGl0IGluCiAgICAgICAgICAgIC8vIHRoZSBjb25zdHJ1Y3Rvci4KICAgICAgICAgICAgLy8gW2dldFN5bWJvbEl0ZXJhdG9yKCldKCk6IEl0ZXJhdG9yPFQ+IHsgLi4uIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBzeW1ib2wgPSBnZXRTeW1ib2xJdGVyYXRvciQxKCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcHJvdG8gPSAoLyoqIEB0eXBlIHs/fSAqLyAoUXVlcnlMaXN0LnByb3RvdHlwZSkpOwogICAgICAgICAgICBpZiAoIXByb3RvW3N5bWJvbF0pCiAgICAgICAgICAgICAgICBwcm90b1tzeW1ib2xdID0gc3ltYm9sSXRlcmF0b3I7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNlZQogICAgICAgICAqIFtBcnJheS5tYXBdKGh0dHBzOi8vZGV2ZWxvcGVyLm1vemlsbGEub3JnL2VuLVVTL2RvY3MvV2ViL0phdmFTY3JpcHQvUmVmZXJlbmNlL0dsb2JhbF9PYmplY3RzL0FycmF5L21hcCkKICAgICAgICAgKiBAdGVtcGxhdGUgVQogICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG1hcChmbikgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fcmVzdWx0cy5tYXAoZm4pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZWUKICAgICAgICAgKiBbQXJyYXkuZmlsdGVyXShodHRwczovL2RldmVsb3Blci5tb3ppbGxhLm9yZy9lbi1VUy9kb2NzL1dlYi9KYXZhU2NyaXB0L1JlZmVyZW5jZS9HbG9iYWxfT2JqZWN0cy9BcnJheS9maWx0ZXIpCiAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZmlsdGVyKGZuKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9yZXN1bHRzLmZpbHRlcihmbik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNlZQogICAgICAgICAqIFtBcnJheS5maW5kXShodHRwczovL2RldmVsb3Blci5tb3ppbGxhLm9yZy9lbi1VUy9kb2NzL1dlYi9KYXZhU2NyaXB0L1JlZmVyZW5jZS9HbG9iYWxfT2JqZWN0cy9BcnJheS9maW5kKQogICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZpbmQoZm4pIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3Jlc3VsdHMuZmluZChmbik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNlZQogICAgICAgICAqIFtBcnJheS5yZWR1Y2VdKGh0dHBzOi8vZGV2ZWxvcGVyLm1vemlsbGEub3JnL2VuLVVTL2RvY3MvV2ViL0phdmFTY3JpcHQvUmVmZXJlbmNlL0dsb2JhbF9PYmplY3RzL0FycmF5L3JlZHVjZSkKICAgICAgICAgKiBAdGVtcGxhdGUgVQogICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgKiBAcGFyYW0gez99IGluaXQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlZHVjZShmbiwgaW5pdCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fcmVzdWx0cy5yZWR1Y2UoZm4sIGluaXQpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZWUKICAgICAgICAgKiBbQXJyYXkuZm9yRWFjaF0oaHR0cHM6Ly9kZXZlbG9wZXIubW96aWxsYS5vcmcvZW4tVVMvZG9jcy9XZWIvSmF2YVNjcmlwdC9SZWZlcmVuY2UvR2xvYmFsX09iamVjdHMvQXJyYXkvZm9yRWFjaCkKICAgICAgICAgKiBAcGFyYW0gez99IGZuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmb3JFYWNoKGZuKSB7CiAgICAgICAgICAgIHRoaXMuX3Jlc3VsdHMuZm9yRWFjaChmbik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNlZQogICAgICAgICAqIFtBcnJheS5zb21lXShodHRwczovL2RldmVsb3Blci5tb3ppbGxhLm9yZy9lbi1VUy9kb2NzL1dlYi9KYXZhU2NyaXB0L1JlZmVyZW5jZS9HbG9iYWxfT2JqZWN0cy9BcnJheS9zb21lKQogICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNvbWUoZm4pIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3Jlc3VsdHMuc29tZShmbik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgYSBjb3B5IG9mIHRoZSBpbnRlcm5hbCByZXN1bHRzIGxpc3QgYXMgYW4gQXJyYXkuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB0b0FycmF5KCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fcmVzdWx0cy5zbGljZSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHRvU3RyaW5nKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fcmVzdWx0cy50b1N0cmluZygpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBVcGRhdGVzIHRoZSBzdG9yZWQgZGF0YSBvZiB0aGUgcXVlcnkgbGlzdCwgYW5kIHJlc2V0cyB0aGUgYGRpcnR5YCBmbGFnIHRvIGBmYWxzZWAsIHNvIHRoYXQKICAgICAg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ICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0RGlydHkoKSB7CiAgICAgICAgICAgICgoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpKS5kaXJ0eSA9IHRydWU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIGludGVybmFsCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkZXN0cm95KCkgewogICAgICAgICAgICAoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuY2hhbmdlcykpKS5jb21wbGV0ZSgpOwogICAgICAgICAgICAoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuY2hhbmdlcykpKS51bnN1YnNjcmliZSgpOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQHRlbXBsYXRlIFQKICAgICAqLwogICAgY2xhc3MgTFF1ZXJ5XyB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBxdWVyeUxpc3QKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihxdWVyeUxpc3QpIHsKICAgICAgICAgICAgdGhpcy5xdWVyeUxpc3QgPSBxdWVyeUxpc3Q7CiAgICAgICAgICAgIHRoaXMubWF0Y2hlcyA9IG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgY2xvbmUoKSB7CiAgICAgICAgICAgIHJldHVybiBuZXcgTFF1ZXJ5Xyh0aGlzLnF1ZXJ5TGlzdCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0RGlydHkoKSB7CiAgICAgICAgICAgIHRoaXMucXVlcnlMaXN0LnNldERpcnR5KCk7CiAgICAgICAgfQogICAgfQogICAgY2xhc3MgTFF1ZXJpZXNfIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez89fSBxdWVyaWVzCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IocXVlcmllcyA9IFtdKSB7CiAgICAgICAgICAgIHRoaXMucXVlcmllcyA9IHF1ZXJpZXM7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdFZpZXcKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGNyZWF0ZUVtYmVkZGVkVmlldyh0VmlldykgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHRRdWVyaWVzID0gdFZpZXcucXVlcmllczsKICAgICAgICAgICAgaWYgKHRRdWVyaWVzICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBub09mSW5oZXJpdGVkUXVlcmllcyA9IHRWaWV3LmNvbnRlbnRRdWVyaWVzICE9PSBudWxsID8gdFZpZXcuY29udGVudFF1ZXJpZXNbMF0gOiB0UXVlcmllcy5sZW5ndGg7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCB2aWV3TFF1ZXJpZXMgPSBbXTsKICAgICAgICAgICAgICAgIC8vIEFuIGVtYmVkZGVkIHZpZXcgaGFzIHF1ZXJpZXMgcHJvcGFnYXRlZCBmcm9tIGEgZGVjbGFyYXRpb24gdmlldyBhdCB0aGUgYmVnaW5uaW5nIG9mIHRoZQogICAgICAgICAgICAgICAgLy8gVFF1ZXJpZXMgY29sbGVjdGlvbiBhbmQgdXAgdW50aWwgYSBmaXJzdCBjb250ZW50IHF1ZXJ5IGRlY2xhcmVkIGluIHRoZSBlbWJlZGRlZCB2aWV3LiBPbmx5CiAgICAgICAgICAgICAgICAvLyBwcm9wYWdhdGVkIExRdWVyaWVzIGFyZSBjcmVhdGVkIGF0IHRoaXMgcG9pbnQgKExRdWVyeSBjb3JyZXNwb25kaW5nIHRvIGRlY2xhcmVkIGNvbnRlbnQKICAgICAgICAgICAgICAgIC8vIHF1ZXJpZXMgd2lsbCBiZSBpbnN0YW50aWF0ZWQgZnJvbSB0aGUgY29udGVudCBxdWVyeSBpbnN0cnVjdGlvbnMgZm9yIGVhY2ggZGlyZWN0aXZlKS4KICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbm9PZkluaGVyaXRlZFF1ZXJpZXM7IGkrKykgewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCB0UXVlcnkgPSB0UXVlcmllcy5nZXRCeUluZGV4KGkpOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBwYXJlbnRMUXVlcnkgPSB0aGlzLnF1ZXJpZXNbdFF1ZXJ5LmluZGV4SW5EZWNsYXJhdGlvblZpZXddOwogICAgICAgICAgICAgICAgICAgIHZpZXdMUXVlcmllcy5wdXNoKHBhcmVudExRdWVyeS5jbG9uZSgpKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiBuZXcgTFF1ZXJpZXNfKHZpZXdMUXVlcmllcyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdFZpZXcKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGluc2VydFZpZXcodFZpZXcpIHsKICAgICAgICAgICAgdGhpcy5kaXJ0eVF1ZXJpZXNXaXRoTWF0Y2hlcyh0Vmlldyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdFZpZXcKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGRldGFjaFZpZXcodFZpZXcpIHsKICAgICAgICAgICAgdGhpcy5kaXJ0eVF1ZXJpZXNXaXRoTWF0Y2hlcyh0Vmlldyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSB0VmlldwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZGlydHlRdWVyaWVzV2l0aE1hdGNoZXModFZpZXcpIHsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB0aGlzLnF1ZXJpZXMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIGlmIChnZXRUUXVlcnkodFZpZXcsIGkpLm1hdGNoZXMgIT09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLnF1ZXJpZXNbaV0uc2V0RGlydHkoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIGNsYXNzIFRRdWVyeU1ldGFkYXRhXyB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBwcmVkaWNhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGRlc2NlbmRhbnRzCiAgICAgICAgICogQHBhcmFtIHs/fSBpc1N0YXRpYwogICAgICAgICAqIEBwYXJhbSB7Pz19IHJlYWQKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihwcmVkaWNhdGUsIGRlc2NlbmRhbnRzLCBpc1N0YXRpYywgcmVhZCA9IG51bGwpIHsKICAgICAgICAgICAgdGhpcy5wcmVkaWNhdGUgPSBwcmVkaWNhdGU7CiAgICAgICAgICAgIHRoaXMuZGVzY2VuZGFudHMgPSBkZXNjZW5kYW50czsKICAgICAgICAgICAgdGhpcy5pc1N0YXRpYyA9IGlzU3RhdGljOwogICAgICAgICAgICB0aGlzLnJlYWQgPSByZWFkOwogICAgICAgIH0KICAgIH0KICAgIGNsYXNzIFRRdWVyaWVzXyB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/PX0gcXVlcmllcwogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKHF1ZXJpZXMgPSBbXSkgewogICAgICAgICAgICB0aGlzLnF1ZXJpZXMgPSBxdWVyaWVzOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHRWaWV3CiAgICAgICAgICogQHBhcmFtIHs/fSB0Tm9kZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZWxlbWVudFN0YXJ0KHRWaWV3LCB0Tm9kZSkgewogICAgICAgICAgICBuZ0Rldk1vZGUgJiYKICAgICAgICAgICAgICAgIGFzc2VydEZpcnN0Q3JlYXRlUGFzcyh0VmlldywgJ1F1ZXJpZXMgc2hvdWxkIGNvbGxlY3QgcmVzdWx0cyBvbiB0aGUgZmlyc3QgdGVtcGxhdGUgcGFzcyBvbmx5Jyk7CiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgdGhpcy5xdWVyaWVzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICB0aGlzLnF1ZXJpZXNbaV0uZWxlbWVudFN0YXJ0KHRWaWV3LCB0Tm9kZSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB0Tm9kZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZWxlbWVudEVuZCh0Tm9kZSkgewogICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHRoaXMucXVlcmllcy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgdGhpcy5xdWVyaWVzW2ldLmVsZW1lbnRFbmQodE5vZGUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdE5vZGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGVtYmVkZGVkVFZpZXcodE5vZGUpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgcXVlcmllc0ZvclRlbXBsYXRlUmVmID0gbnVsbDsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB0aGlzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBjaGlsZFF1ZXJ5SW5kZXggPSBxdWVyaWVzRm9yVGVtcGxhdGVSZWYgIT09IG51bGwgPyBxdWVyaWVzRm9yVGVtcGxhdGVSZWYubGVuZ3RoIDogMDsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHRxdWVyeUNsb25lID0gdGhpcy5nZXRCeUluZGV4KGkpLmVtYmVkZGVkVFZpZXcodE5vZGUsIGNoaWxkUXVlcnlJbmRleCk7CiAgICAgICAgICAgICAgICBpZiAodHF1ZXJ5Q2xvbmUpIHsKICAgICAgICAgICAgICAgICAgICB0cXVlcnlDbG9uZS5pbmRleEluRGVjbGFyYXRpb25WaWV3ID0gaTsKICAgICAgICAgICAgICAgICAgICBpZiAocXVlcmllc0ZvclRlbXBsYXRlUmVmICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHF1ZXJpZXNGb3JUZW1wbGF0ZVJlZi5wdXNoKHRxdWVyeUNsb25lKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHF1ZXJpZXNGb3JUZW1wbGF0ZVJlZiA9IFt0cXVlcnlDbG9uZV07CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBxdWVyaWVzRm9yVGVtcGxhdGVSZWYgIT09IG51bGwgPyBuZXcgVFF1ZXJpZXNfKHF1ZXJpZXNGb3JUZW1wbGF0ZVJlZikgOiBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHRWaWV3CiAgICAgICAgICogQHBhcmFtIHs/fSB0Tm9kZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdGVtcGxhdGUodFZpZXcsIHROb2RlKSB7CiAgICAgICAgICAgIG5nRGV2TW9kZSAmJgogICAgICAgICAgICAgICAgYXNzZXJ0Rmlyc3RDcmVhdGVQYXNzKHRWaWV3LCAnUXVlcmllcyBzaG91bGQgY29sbGVjdCByZXN1bHRzIG9uIHRoZSBmaXJzdCB0ZW1wbGF0ZSBwYXNzIG9ubHknKTsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB0aGlzLnF1ZXJpZXMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIHRoaXMucXVlcmllc1tpXS50ZW1wbGF0ZSh0VmlldywgdE5vZGUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gaW5kZXgKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldEJ5SW5kZXgoaW5kZXgpIHsKICAgICAgICAgICAgbmdEZXZNb2RlICYmIGFzc2VydERhdGFJblJhbmdlKHRoaXMucXVlcmllcywgaW5kZXgpOwogICAgICAgICAgICByZXR1cm4gdGhpcy5xdWVyaWVzW2luZGV4XTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgbGVuZ3RoKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5xdWVyaWVzLmxlbmd0aDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB0cXVlcnkKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHRyYWNrKHRxdWVyeSkgewogICAgICAgICAgICB0aGlzLnF1ZXJpZXMucHVzaCh0cXVlcnkpOwogICAgICAgIH0KICAgIH0KICAgIGNsYXNzIFRRdWVyeV8gewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gbWV0YWRhdGEKICAgICAgICAgKiBAcGFyYW0gez89fSBub2RlSW5kZXgKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihtZXRhZGF0YSwgbm9kZUluZGV4ID0gLTEpIHsKICAgICAgICAgICAgdGhpcy5tZXRhZGF0YSA9IG1ldGFkYXRhOwogICAgICAgICAgICB0aGlzLm1hdGNoZXMgPSBudWxsOwogICAgICAgICAgICB0aGlzLmluZGV4SW5EZWNsYXJhdGlvblZpZXcgPSAtMTsKICAgICAgICAgICAgdGhpcy5jcm9zc2VzTmdUZW1wbGF0ZSA9IGZhbHNlOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQSBmbGFnIGluZGljYXRpbmcgaWYgYSBnaXZlbiBxdWVyeSBzdGlsbCBhcHBsaWVzIHRvIG5vZGVzIGl0IGlzIGNyb3NzaW5nLiBXZSB1c2UgdGhpcyBmbGFnCiAgICAgICAgICAgICAqIChhbG9uZ3NpZGUgd2l0aCBfZGVjbGFyYXRpb25Ob2RlSW5kZXgpIHRvIGtub3cgd2hlbiB0byBzdG9wIGFwcGx5aW5nIGNvbnRlbnQgcXVlcmllcyB0bwogICAgICAgICAgICAgKiBlbGVtZW50cyBpbiBhIHRlbXBsYXRlLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fYXBwbGllc1RvTmV4dE5vZGUgPSB0cnVlOwogICAgICAgICAgICB0aGlzLl9kZWNsYXJhdGlvbk5vZGVJbmRleCA9IG5vZGVJbmRleDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB0VmlldwogICAgICAgICAqIEBwYXJhbSB7P30gdE5vZGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGVsZW1lbnRTdGFydCh0VmlldywgdE5vZGUpIHsKICAgICAgICAgICAgaWYgKHRoaXMuaXNBcHBseWluZ1RvTm9kZSh0Tm9kZSkpIHsKICAgICAgICAgICAgICAgIHRoaXMubWF0Y2hUTm9kZSh0VmlldywgdE5vZGUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdE5vZGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGVsZW1lbnRFbmQodE5vZGUpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX2RlY2xhcmF0aW9uTm9kZUluZGV4ID09PSB0Tm9kZS5pbmRleCkgewogICAgICAgICAgICAgICAgdGhpcy5fYXBwbGllc1RvTmV4dE5vZGUgPSBmYWxzZTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHRWaWV3CiAgICAgICAgICogQHBhcmFtIHs/fSB0Tm9kZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdGVtcGxhdGUodFZpZXcsIHROb2RlKSB7CiAgICAgICAgICAgIHRoaXMuZWxlbWVudFN0YXJ0KHRWaWV3LCB0Tm9kZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdE5vZGUKICAgICAgICAgKiBAcGFyYW0gez99IGNoaWxkUXVlcnlJbmRleAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZW1iZWRkZWRUVmlldyh0Tm9kZSwgY2hpbGRRdWVyeUluZGV4KSB7CiAgICAgICAgICAgIGlmICh0aGlzLmlzQXBwbHlpbmdUb05vZGUodE5vZGUpKSB7CiAgICAgICAgICAgICAgICB0aGlzLmNyb3NzZXNOZ1RlbXBsYXRlID0gdHJ1ZTsKICAgICAgICAgICAgICAgIC8vIEEgbWFya2VyIGluZGljYXRpbmcgYSBgPG5nLXRlbXBsYXRlPmAgZWxlbWVudCAoYSBwbGFjZWhvbGRlciBmb3IgcXVlcnkgcmVzdWx0cyBmcm9tCiAgICAgICAgICAgICAgICAvLyBlbWJlZGRlZCB2aWV3cyBjcmVhdGVkIGJhc2VkIG9uIHRoaXMgYDxuZy10ZW1wbGF0ZT5gKS4KICAgICAgICAgICAgICAgIHRoaXMuYWRkTWF0Y2goLXROb2RlLmluZGV4LCBjaGlsZFF1ZXJ5SW5kZXgpOwogICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBUUXVlcnlfKHRoaXMubWV0YWRhdGEpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gdE5vZGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGlzQXBwbHlpbmdUb05vZGUodE5vZGUpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX2FwcGxpZXNUb05leHROb2RlICYmIHRoaXMubWV0YWRhdGEuZGVzY2VuZGFudHMgPT09IGZhbHNlKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBkZWNsYXJhdGlvbk5vZGVJZHggPSB0aGlzLl9kZWNsYXJhdGlvbk5vZGVJbmRleDsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCBwYXJlbnQgPSB0Tm9kZS5wYXJlbnQ7CiAgICAgICAgICAgICAgICAvLyBEZXRlcm1pbmUgaWYgYSBnaXZlbiBUTm9kZSBpcyBhICJkaXJlY3QiIGNoaWxkIG9mIGEgbm9kZSBvbiB3aGljaCBhIGNvbnRlbnQgcXVlcnkgd2FzCiAgICAgICAgICAgICAgICAvLyBkZWNsYXJlZ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gICAgICAgICBwYXJlbnQuaW5kZXggIT09IGRlY2xhcmF0aW9uTm9kZUlkeCkgewogICAgICAgICAgICAgICAgICAgIHBhcmVudCA9IHBhcmVudC5wYXJlbnQ7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gZGVjbGFyYXRpb25Ob2RlSWR4ID09PSAocGFyZW50ICE9PSBudWxsID8gcGFyZW50LmluZGV4IDogLTEpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9hcHBsaWVzVG9OZXh0Tm9kZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHRWaWV3CiAgICAgICAgICogQHBhcmFtIHs/fSB0Tm9kZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbWF0Y2hUTm9kZSh0VmlldywgdE5vZGUpIHsKICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkodGhpcy5tZXRhZGF0YS5wcmVkaWNhdGUpKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBsb2NhbE5hbWVzID0gdGhpcy5tZXRhZGF0YS5wcmVkaWNhdGU7CiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGxvY2FsTmFtZXMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLm1hdGNoVE5vZGVXaXRoUmVhZE9wdGlvbih0VmlldywgdE5vZGUsIGdldElkeE9mTWF0Y2hpbmdTZWxlY3Rvcih0Tm9kZSwgbG9jYWxOYW1lc1tpXSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgdHlwZVByZWRpY2F0ZSA9ICgvKiogQHR5cGUgez99ICovICh0aGlzLm1ldGFkYXRhLnByZWRpY2F0ZSkpOwogICAgICAgICAgICAgICAgaWYgKHR5cGVQcmVkaWNhdGUgPT09IFRlbXBsYXRlUmVmKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKHROb2RlLnR5cGUgPT09IDAgLyogQ29udGFpbmVyICovKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubWF0Y2hUTm9kZVdpdGhSZWFkT3B0aW9uKHRWaWV3LCB0Tm9kZSwgLTEpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIHRoaXMubWF0Y2hUTm9kZVdpdGhSZWFkT3B0aW9uKHRWaWV3LCB0Tm9kZSwgbG9jYXRlRGlyZWN0aXZlT3JQcm92aWRlcih0Tm9kZSwgdFZpZXcsIHR5cGVQcmVkaWNhdGUsIGZhbHNlLCBmYWxzZSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSB0VmlldwogICAgICAgICAqIEBwYXJhbSB7P30gdE5vZGUKICAgICAgICAgKiBAcGFyYW0gez99IG5vZGVNYXRjaElkeAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbWF0Y2hUTm9kZVdpdGhSZWFkT3B0aW9uKHRWaWV3LCB0Tm9kZSwgbm9kZU1hdGNoSWR4KSB7CiAgICAgICAgICAgIGlmIChub2RlTWF0Y2hJZHggIT09IG51bGwpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHJlYWQgPSB0aGlzLm1ldGFkYXRhLnJlYWQ7CiAgICAgICAgICAgICAgICBpZiAocmVhZCAhPT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIGlmIChyZWFkID09PSBFbGVtZW50UmVmIHx8IHJlYWQgPT09IFZpZXdDb250YWluZXJSZWYgfHwKICAgICAgICAgICAgICAgICAgICAgICAgcmVhZCA9PT0gVGVtcGxhdGVSZWYgJiYgdE5vZGUudHlwZSA9PT0gMCAvKiBDb250YWluZXIgKi8pIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5hZGRNYXRjaCh0Tm9kZS5pbmRleCwgLTIpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBkaXJlY3RpdmVPclByb3ZpZGVySWR4ID0gbG9jYXRlRGlyZWN0aXZlT3JQcm92aWRlcih0Tm9kZSwgdFZpZXcsIHJlYWQsIGZhbHNlLCBmYWxzZSk7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkaXJlY3RpdmVPclByb3ZpZGVySWR4ICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmFkZE1hdGNoKHROb2RlLmluZGV4LCBkaXJlY3RpdmVPclByb3ZpZGVySWR4KTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIHRoaXMuYWRkTWF0Y2godE5vZGUuaW5kZXgsIG5vZGVNYXRjaElkeCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHROb2RlSWR4CiAgICAgICAgICogQHBhcmFtIHs/fSBtYXRjaElkeAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYWRkTWF0Y2godE5vZGVJZHgs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SA9PT0gc2VsZWN0b3IpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKGxvY2FsTmFtZXNbaSArIDFdKSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIG51bGw7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdE5vZGUKICAgICAqIEBwYXJhbSB7P30gY3VycmVudFZpZXcKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGNyZWF0ZVJlc3VsdEJ5VE5vZGVUeXBlKHROb2RlLCBjdXJyZW50VmlldykgewogICAgICAgIGlmICh0Tm9kZS50eXBlID09PSAzIC8qIEVsZW1lbnQgKi8gfHwgdE5vZGUudHlwZSA9PT0gNCAvKiBFbGVtZW50Q29udGFpbmVyICovKSB7CiAgICAgICAgICAgIHJldHVybiBjcmVhdGVFbGVtZW50UmVmKEVsZW1lbnRSZWYsIHROb2RlLCBjdXJyZW50Vmlldyk7CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYgKHROb2RlLnR5cGUgPT09IDAgLyogQ29udGFpbmVyICovKSB7CiAgICAgICAgICAgIHJldHVybiBjcmVhdGVUZW1wbGF0ZVJlZihUZW1wbGF0ZVJlZiwgRWxlbWVudFJlZiwgdE5vZGUsIGN1cnJlbnRWaWV3KTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIG51bGw7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gbFZpZXcKICAgICAqIEBwYXJhbSB7P30gdE5vZGUKICAgICAqIEBwYXJhbSB7P30gbWF0Y2hpbmdJZHgKICAgICAqIEBwYXJhbSB7P30gcmVhZAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gY3JlYXRlUmVzdWx0Rm9yTm9kZShsVmlldywgdE5vZGUsIG1hdGNoaW5nSWR4LCByZWFkKSB7CiAgICAgICAg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hdGUgVAogICAgICogQHBhcmFtIHs/fSB0VmlldwogICAgICogQHBhcmFtIHs/fSBsVmlldwogICAgICogQHBhcmFtIHs/fSB0UXVlcnkKICAgICAqIEBwYXJhbSB7P30gcXVlcnlJbmRleAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gbWF0ZXJpYWxpemVWaWV3UmVzdWx0cyh0VmlldywgbFZpZXcsIHRRdWVyeSwgcXVlcnlJbmRleCkgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBsUXVlcnkgPSAoLyoqIEB0eXBlIHs/fSAqLyAoKC8qKiBAdHlwZSB7P30gKi8gKGxWaWV3W1FVRVJJRVNdKSkucXVlcmllcykpW3F1ZXJ5SW5kZXhdOwogICAgICAgIGlmIChsUXVlcnkubWF0Y2hlcyA9PT0gbnVsbCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHRWaWV3RGF0YSA9IHRWaWV3LmRhdGE7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdFF1ZXJ5TWF0Y2hlcyA9ICgvKiogQHR5cGUgez99ICovICh0UXVlcnkubWF0Y2hlcykpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHJlc3VsdCA9IFtdOwogICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHRRdWVyeU1hdGNoZXMubGVuZ3RoOyBpICs9IDIpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IG1hdGNoZWROb2RlSWR4ID0gdFF1ZXJ5TWF0Y2hlc1tpXTsKICAgICAgICAgICAgICAgIGlmIChtYXRjaGVkTm9kZUlkeCA8IDApIHsKICAgICAgICAgICAgICAgICAgICAvLyB3ZSBhdCB0aGUgPG5nLXRlbXBsYXRlPiBtYXJrZXIgd2hpY2ggbWlnaHQgaGF2ZSByZXN1bHRzIGluIHZpZXdzIGNyZWF0ZWQgYmFzZWQgb24gdGhpcwogICAgICAgICAgICAgICAgICAgIC8vIDxuZy10ZW1wbGF0ZT4gLSB0aG9zZSByZXN1bHRzIHdpbGwgYmUgaW4gc2VwYXJhdGUgdmlld3MgdGhvdWdoLCBzbyBoZXJlIHdlIGp1c3QgbGVhdmUKICAgICAgICAgICAgICAgICAgICAvLyBudWxsIGFzIGEgcGxhY2Vob2xkZXIKICAgICAgICAgICAgICAgICAgICByZXN1bHQucHVzaChudWxsKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIG5nRGV2TW9kZSAmJiBhc3NlcnREYXRhSW5SYW5nZSh0Vmlld0RhdGEsIG1hdGNoZWROb2RlSWR4KTsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgdE5vZGUgPSAoLyoqIEB0eXBlIHs/fSAqLyAodFZpZXdEYXRhW21hdGNoZWROb2RlSWR4XSkpOwogICAgICAgICAgICAgICAgICAgIHJlc3VsdC5wdXNoKGNyZWF0ZVJlc3VsdEZvck5vZGUobFZpZXcsIHROb2RlLCB0UXVlcnlNYXRjaGVzW2kgKyAxXSwgdFF1ZXJ5Lm1ldGFkYXRhLnJlYWQpKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBsUXVlcnkubWF0Y2hlcyA9IHJlc3VsdDsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGxRdWVyeS5tYXRjaGVzOwogICAgfQogICAgLyoqCiAgICAgKiBBIGhlbHBlciBmdW5jdGlvbiB0aGF0IGNvbGxlY3RzIChhbHJlYWR5IG1hdGVyaWFsaXplZCkgcXVlcnkgcmVzdWx0cyBmcm9tIGEgdHJlZSBvZiB2aWV3cywKICAgICAqIHN0YXJ0aW5nIHdpdGggYSBwcm92aWRlZCBMVmlldy4KICAgICAqIEB0ZW1wbGF0ZSBUCiAgICAgKiBAcGFyYW0gez99IHRWaWV3CiAgICAgKiBAcGFyYW0gez99IGxWaWV3CiAgICAgKiBAcGFyYW0gez99IHF1ZXJ5SW5kZXgKICAgICAqIEBwYXJhbSB7P30gcmVzdWx0CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBjb2xsZWN0UXVlcnlSZXN1bHRzKHRWaWV3LCBsVmlldywgcXVlcnlJbmRleCwgcmVzdWx0KSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHRRdWVyeSA9ICgvKiogQHR5cGUgez99ICovICh0Vmlldy5xdWVyaWVzKSkuZ2V0QnlJbmRleChxdWVyeUluZGV4KTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgdFF1ZXJ5TWF0Y2hlcyA9IHRRdWVyeS5tYXRjaGVzOwogICAgICAgIGlmICh0UXVlcnlNYXRjaGVzICE9PSBudWxsKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbFZpZXdSZXN1bHRzID0gbWF0ZXJpYWxpemVWaWV3UmVzdWx0cyh0VmlldywgbFZpZXcsIHRRdWVyeSwgcXVlcnlJbmRleCk7CiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgdFF1ZXJ5TWF0Y2hlcy5sZW5ndGg7IGkgKz0gMikgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgdE5vZGVJZHggPSB0UXVlcnlNYXRjaGVzW2ldOwogICAgICAgICAgICAgICAgaWYgKHROb2RlSWR4ID4gMCkgewogICAgICAgICAgICAgICAgICAgIHJlc3VsdC5wdXNoKCgvKiogQHR5cGUgez99ICovIChsVmlld1Jlc3VsdHNbaSAvIDJdKSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGNoaWxkUXVlcnlJbmRleCA9IHRRdWVyeU1hdGNoZXNbaSArIDFdOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBkZWNsYXJhdGlvbkxDb250YWluZXIgPSAoLyoqIEB0eXBlIHs/fSAqLyAobFZpZXdbLXROb2RlSWR4XSkpOwogICAgICAgICAgICAgICAgICAgIG5nRGV2TW9kZSAmJiBhc3NlcnRMQ29udGFpbmVyKGRlY2xhcmF0aW9uTENvbnRhaW5lcik7CiAgICAgICAgICAgICAgICAgICAgLy8gY29sbGVjdCBtYXRjaGVzIGZvciB2aWV3cyBpbnNlcnRlZCBpbiB0aGlzIGNvbnRhaW5lcgogICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSBDT05UQUlORVJfSEVBREVSX09GRlNFVDsgaSA8IGRlY2xhcmF0aW9uTENvbnRhaW5lci5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGVtYmVkZGVkTFZpZXcgPSBkZWNsYXJhdGlvbkxDb250YWluZXJbaV07CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlbWJlZGRlZExWaWV3W0RFQ0xBUkFUSU9OX0xDT05UQUlORVJdID09PSBlbWJlZGRlZExWaWV3W1BBUkVOVF0pIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbGxlY3RRdWVyeVJlc3VsdHMoZW1iZWRkZWRMVmlld1tUVklFV10sIGVtYmVkZGVkTFZpZXcsIGNoaWxkUXVlcnlJbmRleCwgcmVzdWx0KTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAvLyBjb2xsZWN0IG1hdGNoZXMgZm9yIHZpZXdzIGNyZWF0ZWQgZnJvbSB0aGlzIGRlY2xhcmF0aW9uIGNvbnRhaW5lciBhbmQgaW5zZXJ0ZWQgaW50bwogICAgICAgICAgICAgICAgICAgIC8vIGRpZmZlcmVudCBjb250YWluZXJzCiAgICAgICAgICAgICAgICAgICAgaWYgKGRlY2xhcmF0aW9uTENvbnRhaW5lcltNT1ZFRF9WSUVXU10gIT09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBlbWJlZGRlZExWaWV3cyA9ICgvKiogQHR5cGUgez99ICovIChkZWNsYXJhdGlvbkxDb250YWluZXJbTU9WRURfVklFV1NdKSk7CiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZW1iZWRkZWRMVmlld3MubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGVtYmVkZGVkTFZpZXcgPSBlbWJlZGRlZExWaWV3c1tpXTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbGxlY3RRdWVyeVJlc3VsdHMoZW1iZWRkZWRMVmlld1tUVklFV10sIGVtYmVkZGVkTFZpZXcsIGNoaWxkUXVlcnlJbmRleCwgcmVzdWx0KTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgfQogICAgLyoqCiAgICAgKiBSZWZyZXNoZXMgYSBxdWVyeSBieSBjb21iaW5pbmcgbWF0Y2hlcyBmcm9tIGFsbCBhY3RpdmUgdmlld3MgYW5kIHJlbW92aW5nIG1hdGNoZX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XN0LCBxdWVyeUxpc3QuZGVzdHJveSk7CiAgICAgICAgaWYgKGxWaWV3W1FVRVJJRVNdID09PSBudWxsKQogICAgICAgICAgICBsVmlld1tRVUVSSUVTXSA9IG5ldyBMUXVlcmllc18oKTsKICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAobFZpZXdbUVVFUklFU10pKS5xdWVyaWVzLnB1c2gobmV3IExRdWVyeV8ocXVlcnlMaXN0KSk7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdFZpZXcKICAgICAqIEBwYXJhbSB7P30gbWV0YWRhdGEKICAgICAqIEBwYXJhbSB7P30gbm9kZUluZGV4CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBjcmVhdGVUUXVlcnkodFZpZXcsIG1ldGFkYXRhLCBub2RlSW5kZXgpIHsKICAgICAgICBpZiAodFZpZXcucXVlcmllcyA9PT0gbnVsbCkKICAgICAgICAgICAgdFZpZXcucXVlcmllcyA9IG5ldyBUUXVlcmllc18oKTsKICAgICAgICB0Vmlldy5xdWVyaWVzLnRyYWNrKG5ldyBUUXVlcnlfKG1ldGFkYXRhLCBub2RlSW5kZXgpKTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB0VmlldwogICAgICogQHBhcmFtIHs/fSBkaXJlY3RpdmVJbmRleAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gc2F2ZUNvbnRlbnRRdWVyeUFuZERpcmVjdGl2ZUluZGV4KHRWaWV3LCBkaXJlY3RpdmVJbmRleCkgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCB0Vmlld0NvbnRlbnRRdWVyaWVzID0gdFZpZXcuY29udGVudFF1ZXJpZXMgfHwgKHRWaWV3LmNvbnRlbnRRdWVyaWVzID0gW10pOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBsYXN0U2F2ZWREaXJlY3Rp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gICAgICAgICAgICAgIGZvciAobGV0IGkgPSBtb2R1bGVRdWV1ZS5sZW5ndGggLSAxOyBpID49IDA7IGktLSkgewogICAgICAgICAgICAgICAgICAgIGNvbnN0IHsgbW9kdWxlVHlwZSwgbmdNb2R1bGUgfSA9IG1vZHVsZVF1ZXVlW2ldOwogICAgICAgICAgICAgICAgICAgIGlmIChuZ01vZHVsZS5kZWNsYXJhdGlvbnMgJiYgbmdNb2R1bGUuZGVjbGFyYXRpb25zLmV2ZXJ5KGlzUmVzb2x2ZWREZWNsYXJhdGlvbikpIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gZGVxdWV1ZQogICAgICAgICAgICAgICAgICAgICAgICBtb2R1bGVRdWV1ZS5zcGxpY2UoaSwgMSk7CiAgICAgICAgICAgICAgICAgICAgICAgIHNldFNjb3BlT25EZWNsYXJlZENvbXBvbmVudHMobW9kdWxlVHlwZSwgbmdNb2R1bGUpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBmaW5hbGx5IHsKICAgICAgICAgICAgICAgIGZsdXNoaW5nTW9kdWxlUXVldWUgPSBmYWxzZTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogUmV0dXJucyB0cnV0aHkgaWYgYSBkZWNsYXJhdGlvbiBoYXMgcmVzb2x2ZWQuIElmIHRoZSBkZWNsYXJhdGlvbiBoYXBwZW5zIHRvIGJlCiAgICAgKiBhbiBhcnJheSBvZiBkZWNsYXJhdGlvbnMsIGl0IHdpbGwgcmVjdXJzZSB0byBjaGVjayBlYWNoIGRlY2xhcmF0aW9uIGluIHRoYXQgYXJyYXkKICAgICAqICh3aGljaCBtYXkgYWxzbyBiZSBhcnJheXMpLgogICAgICogQHBhcmFtIHs/fSBkZWNsYXJhdGlvbgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gaXNSZXNvbHZlZERlY2xhcmF0a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ogQHR5cGUgez99ICovCiAgICAgICAgbGV0IG5nTW9kdWxlRGVmID0gbnVsbDsKICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkobW9kdWxlVHlwZSwgTkdfTU9EX0RFRiwgewogICAgICAgICAgICBjb25maWd1cmFibGU6IHRydWUsCiAgICAgICAgICAgIGdldDogKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgaWYgKG5nTW9kdWxlRGVmID09PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKG5nRGV2TW9kZSAmJiBuZ01vZHVsZS5pbXBvcnRzICYmIG5nTW9kdWxlLmltcG9ydHMuaW5kZXhPZihtb2R1bGVUeXBlKSA+IC0xKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFdlIG5lZWQgdG8gYXNzZXJ0IHRoaXMgaW1tZWRpYXRlbHksIGJlY2F1c2UgYWxsb3dpbmcgaXQgdG8gY29udGludWUgd2lsbCBjYXVzZSBpdCB0bwogICAgICAgICAgICAgICAgICAgICAgICAvLyBnbyBpbnRvIGFuIGluZmluaXRlIGxvb3AgYmVmb3JlIHdlJ3ZlIHJlYWNoZWQgdGhlIHBvaW50IHdoZXJlIHdlIHRocm93IGFsbCB0aGUgZXJyb3JzLgogICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYCcke3N0cmluZ2lmeUZvckVycm9yKG1vZHVsZVR5cGUpfScgbW9kdWxlIGNhbid0IGltcG9ydCBpdHNlbGZgKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgbmdNb2R1bGVEZWYgPSBnZXRDb21waWxlckZhY2FkZSgpLmNvbXBpbGVOZ01vZHVsZShhbmd1bGFyQ29yZUVudiwgYG5nOi8vLyR7bW9kdWxlVHlwZS5uYW1lfS/JtW1vZC5qc2AsIHsKICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogbW9kdWxlVHlwZSwKICAgICAgICAgICAgICAgICAgICAgICAgYm9vdHN0cmFwOiBmbGF0dGVuKG5nTW9kdWxlLmJvb3RzdHJhcCB8fCBFTVBUWV9BUlJBWSQ1KS5tYXAocmVzb2x2ZUZvcndhcmRSZWYpLAogICAgICAgICAgICAgICAgICAgICAgICBkZWNsYXJhdGlvbnM6IGRlY2xhcmF0aW9ucy5tYXAocmVzb2x2ZUZvcndhcmRSZWYpLAogICAgICAgICAgICAgICAgICAgICAgICBpbXBvcnRzOiBmbGF0dGVuKG5nTW9kdWxlLmltcG9ydHMgfHwgRU1QVFlfQVJSQVkkNSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5tYXAocmVzb2x2ZUZvcndhcmRSZWYpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAubWFwKGV4cGFuZE1vZHVsZVdpdGhQcm92aWRlcnMpLAogICAgICAgICAgICAgICAgICAgICAgICBleHBvcnRzOiBmbGF0dGVuKG5nTW9kdWxlLmV4cG9ydHMgfHwgRU1QVFlfQVJSQVkkNSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5tYXAocmVzb2x2ZUZvcndhcmRSZWYpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAubWFwKGV4cGFuZE1vZHVsZVdpdGhQcm92aWRlcnMpLAogICAgICAgICAgICAgICAgICAgICAgICBzY2hlbWFzOiBuZ01vZHVsZS5zY2hlbWFzID8gZmxhdHRlbihuZ01vZHVsZS5zY2hlbWFzKSA6IG51bGwsCiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBuZ01vZHVsZS5pZCB8fCBudWxsLAogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgIC8vIFNldCBgc2NoZW1hc2Agb24gbmdNb2R1bGVEZWYgdG8gYW4gZW1wdHkgYXJyYXkgaW4gSklUIG1vZGUgdG8gaW5kaWNhdGUgdGhhdCBydW50aW1lCiAgICAgICAgICAgICAgICAgICAgLy8gc2hvdWxkIHZlcmlmeSB0aGF0IHRoZXJlIGFyZSBubyB1bmtub3duIGVsZW1lbnRzIGluIGEgdGVtcGxhdGUuIEluIEFPVCBtb2RlLCB0aGF0IGNoZWNrCiAgICAgICAgICAgICAgICAgICAgLy8gaGFwcGVucyBhdCBjb21waWxlIHRpbWUgYW5kIGBzY2hlbWFzYCBpbmZvcm1hdGlvbiBpcyBub3QgcHJlc2VudCBvbiBDb21wb25lbnQgYW5kIE1vZHVsZQogICAgICAgICAgICAgICAgICAgIC8vIGRlZnMgYWZ0ZXIgY29tcGlsYXRpb24gKHNvIHRoZSBjaGVjayBkb2Vzbid0IGhhcHBlbiB0aGUgc2Vjb25kIHRpbWUgYXQgcnVudGltZSkuCiAgICAgICAgICAgICAgICAgICAgaWYgKCFuZ01vZHVsZURlZi5zY2hlbWFzKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG5nTW9kdWxlRGVmLnNjaGVtYXMgPSBbXTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gbmdNb2R1bGVEZWY7CiAgICAgICAgICAgIH0pCiAgICAgICAgfSk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBuZ0luamVjdG9yRGVmID0gbnVsbDsKICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkobW9kdWxlVHlwZSwgTkdfSU5KX0RFRiwgewogICAgICAgICAgICBnZXQ6ICgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIGlmIChuZ0luamVjdG9yRGVmID09PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgbmdEZXZNb2RlICYmCiAgICAgICAgICAgICAgICAgICAgICAgIHZlcmlmeVNlbWFudGljc09mTmdNb2R1bGVEZWYoKC8qKiBAdHlwZSB7P30gKi8gKCgvKiogQHR5cGUgez99ICovIChtb2R1bGVUeXBlKSkpKSwgYWxsb3dEdXBsaWNhdGVEZWNsYXJhdGlvbnNJblJvb3QpOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBtZXRhID0gewogICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiBtb2R1bGVUeXBlLm5hbWUsCiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IG1vZHVsZVR5cGUsCiAgICAgICAgICAgICAgICAgICAgICAgIGRlcHM6IHJlZmxlY3REZXBlbmRlbmNpZXMobW9kdWxlVHlwZSksCiAgICAgICAgICAgICAgICAgICAgICAgIHByb3ZpZGVyczogbmdNb2R1bGUucHJvdmlkZXJzIHx8IEVNUFRZX0FSUkFZJDUsCiAgICAgICAgICAgICAgICAgICAgICAgIGltcG9ydHM6IFsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIChuZ01vZHVsZS5pbXBvcnRzIHx8IEVNUFRZX0FSUkFZJDUpLm1hcChyZXNvbHZlRm9yd2FyZFJlZiksCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAobmdNb2R1bGUuZXhwb3J0cyB8fCBFTVBUWV9BUlJBWSQ1KS5tYXAocmVzb2x2ZUZvcndhcmRSZWYpLAogICAgICAgICAgICAgICAgICAgICAgICBdLAogICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICAgICAgbmdJbmplY3RvckRlZiA9IGdldENvbXBpbGVyRmFjYWRlKCkuY29tcGlsZUluamVjdG9yKGFuZ3VsYXJDb3JlRW52LCBgbmc6Ly8vJHttb2R1bGVUeXBlLm5hbWV9L8m1aW5qLmpzYCwgbWV0YSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gbmdJbmplY3RvckRlZjsKICAgICAgICAgICAgfSksCiAgICAgICAgICAgIC8vIE1ha2UgdGhlIHByb3BlcnR5IGNvbmZpZ3VyYWJsZSB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gICogQHBhcmFtIHs/fSB0eXBlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiB2ZXJpZnlEZWNsYXJhdGlvbnNIYXZlRGVmaW5pdGlvbnModHlwZSkgewogICAgICAgICAgICB0eXBlID0gcmVzb2x2ZUZvcndhcmRSZWYodHlwZSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZGVmID0gZ2V0Q29tcG9uZW50RGVmKHR5cGUpIHx8IGdldERpcmVjdGl2ZURlZih0eXBlKSB8fCBnZXRQaXBlRGVmKHR5cGUpOwogICAgICAgICAgICBpZiAoIWRlZikgewogICAgICAgICAgICAgICAgZXJyb3JzLnB1c2goYFVuZXhwZWN0ZWQgdmFsdWUgJyR7c3RyaW5naWZ5Rm9yRXJyb3IodHlwZSl9JyBkZWNsYXJlZCBieSB0aGUgbW9kdWxlICcke3N0cmluZ2lmeUZvckVycm9yKG1vZHVsZVR5cGUpfScuIFBsZWFzZSBhZGQgYSBAUGlwZS9ARGlyZWN0aXZlL0BDb21wb25lbnQgYW5ub3RhdGlvbi5gKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHR5cGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHZlcmlmeURpcmVjdGl2ZXNIYXZlU2VsZWN0b3IodHlwZSkgewogICAgICAgICAgICB0eXBlID0gcmVzb2x2ZUZvcndhcmRSZWYodHlwZSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZGVmID0gZ2V0RGlyZWN0aXZlRGVmKHR5cGUpOwogICAgICAgICAgICBpZiAoIWdldENvbXBvbmVudERlZih0eXBlKSAmJiBkZWYgJiYgZGVmLnNlbGVjdG9ycy5sZW5ndGggPT0gMCkgewogICAgICAgICAgICAgICAgZXJyb3JzLnB1c2goYERpcmVjdGl2ZSAke3N0cmluZ2lmeUZvckVycm9yKHR5cGUpfSBoYXMgbm8gc2VsZWN0b3IsIHBsZWFzZSBhZGQgaXQhYCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB0eXBlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiB2ZXJpZnlFeHBvcnRzQXJlRGVjbGFyZWRPclJlRXhwb3J0ZWQodHlwZSkgewogICAgICAgICAgICB0eXBlID0gcmVzb2x2ZUZvcndhcmRSZWYodHlwZSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qga2luZCA9IGdldENvbXBvbmVudERlZih0eXBlKSAmJiAnY29tcG9uZW50JyB8fCBnZXREaXJlY3RpdmVEZWYodHlwZSkgJiYgJ2RpcmVjdGl2ZScgfHwKICAgICAgICAgICAgICAgIGdldFBpcGVEZWYodHlwZSkgJiYgJ3BpcGUnOwogICAgICAgICAgICBpZiAoa2luZCkgewogICAgICAgICAgICAgICAgLy8gb25seSBjaGVja2VkIGlmIHdlIGFyZSBkZWNsYXJlZCBhcyBDb21wb25lbnQsIERpcmVjdGl2ZSwgb3IgUGlwZQogICAgICAgICAgICAgICAgLy8gTW9kdWxlcyBkb24ndCBuZWVkIHRvIGJlIGRlY2xhcmVkIG9yIGltcG9ydGVkLgogICAgICAgICAgICAgICAgaWYgKGNvbWJpbmVkRGVjbGFyYXRpb25zLmxhc3RJbmRleE9mKHR5cGUpID09PSAtMSkgewogICAgICAgICAgICAgICAgICAgIC8vIFdlIGFyZSBleHBvcnRpbmcgc29tZXRoaW5nIHdoaWNoIHdlIGRvbid0IGV4cGxpY2l0bHkgZGVjbGFyZSBvciBpbXBvcnQuCiAgICAgICAgICAgICAgICAgICAgZXJyb3JzLnB1c2goYENhbid0IGV4cG9ydCAke2tpbmR9ICR7c3RyaW5naWZ5Rm9yRXJyb3IodHlwZSl9IGZyb20gJHtzdHJpbmdpZnlGb3JFcnJvcihtb2R1bGVUeXBlKX0gYXMgaXQgd2FzIG5laXRoZXIgZGVjbGFyZWQgbm9yIGltcG9ydGVkIWApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdHlwZQogICAgICAgICAqIEBwYXJhbSB7P30gc3VwcHJlc3NFcnJvcnMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHZlcmlmeURlY2xhcmF0aW9uSXNVbmlxdWUodHlwZSwgc3VwcHJlc3NFcnJvcnMpIHsKICAgICAgICAgICAgdHlwZSA9IHJlc29sdmVGb3J3YXJkUmVmKHR5cGUpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGV4aXN0aW5nTW9kdWxlID0gb3duZXJOZ01vZHVsZS5nZXQodHlwZSk7CiAgICAgICAgICAgIGlmIChleGlzdGluZ01vZHVsZSAmJiBleGlzdGluZ01vZHVsZSAhPT0gbW9kdWxlVHlwZSkgewogICAgICAgICAgICAgICAgaWYgKCFzdXBwcmVzc0Vycm9ycykgewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBtb2R1bGVzID0gW2V4aXN0aW5nTW9kdWxlLCBtb2R1bGVUeXBlXS5tYXAoc3RyaW5naWZ5Rm9yRXJyb3IpLnNvcnQoKTsKICAgICAgICAgICAgICAgICAgICBlcnJvcnMucHVzaChgVHlwZSAke3N0cmluZ2lmeUZvckVycm9yKHR5cGUpfSBpcyBwYXJ0IG9mIHRoZSBkZWNsYXJhdGlvbnMgb2YgMiBtb2R1bGVzOiAke21vZHVsZXNbMF19IGFuZCAke21vZHVsZXNbMV19ISBgICsKICAgICAgICAgICAgICAgICAgICAgICAgYFBsZWFzZSBjb25zaWRlciBtb3ZpbmcgJHtzdHJpbmdpZnlGb3JFcnJvcih0eXBlKX0gdG8gYSBoaWdoZXIgbW9kdWxlIHRoYXQgaW1wb3J0cyAke21vZHVsZXNbMF19IGFuZCAke21vZHVsZXNbMV19LiBgICsKICAgICAgICAgICAgICAgICAgICAgICAgYFlvdSBjYW4gYWxzbyBjcmVhdGUgYSBuZXcgTmdNb2R1bGUgdGhhdCBleHBvcnRzIGFuZCBpbmNsdWRlcyAke3N0cmluZ2lmeUZvckVycm9yKHR5cGUpfSB0aGVuIGltcG9ydCB0aGF0IE5nTW9kdWxlIGluICR7bW9kdWxlc1swXX0gYW5kICR7bW9kdWxlc1sxXX0uYCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAvLyBNYXJrIHR5cGUgYXMgaGF2aW5nIG93bmVyLgogICAgICAgICAgICAgICAgb3duZXJOZ01vZHVsZS5zZXQodHlwZSwgbW9kdWxlVHlwZSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB0eXBlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiB2ZXJpZnlDb21wb25lbnRJc1BhcnRPZk5nTW9kdWxlKHR5cGUpIHsKICAgICAgICAgICAgdHlwZSA9IHJlc29sdmVGb3J3YXJkUmVmKHR5cGUpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGV4aXN0aW5nTW9kdWxlID0gb3duZXJOZ01vZHVsZS5nZXQodHlwZSk7CiAgICAgICAgICAgIGlmICghZXhpc3RpbmdNb2R1bGUpIHsKICAgICAgICAgICAgICAgIGVycm9ycy5wdXNoKGBDb21wb25lbnQgJHtzdHJpbmdpZnlGb3JFcnJvcih0eXBlKX0gaXMgbm90IHBhcnQgb2YgYW55IE5nTW9kdWxlIG9yIHRoZSBtb2R1bGUgaGFzIG5vdCBiZWVuIGltcG9ydGVkIGludG8geW91ciBtb2R1bGUuYCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB0eXBlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiB2ZXJpZnlDb3JyZWN0Qm9vdHN0cmFwVHlwZSh0eXBlKSB7CiAgICAgICAgICAgIHR5cGUgPSByZXNvbHZlRm9yd2FyZFJlZih0eXBlKTsKICAgICAgICAgICAgaWYgKCFnZXRDb21wb25lbnREZWYodHlwZSkpIHsKICAgICAgICAgICAgICAgIGVycm9ycy5wdXNoKGAke3N0cmluZ2lmeUZvckVycm9yKHR5cGUpfSBjYW5ub3QgYmUgdXNlZCBhcyBhbiBlbnRyeSBjb21wb25lbnQuYCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB0eXBlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiB2ZXJpZnlDb21wb25lbnRFbnRyeUNvbXBvbmVudHNJc1BhcnRPZk5nTW9kdWxlKHR5cGUpIHsKICAgICAgICAgICAgdHlwZSA9IHJlc29sdmVGb3J3YXJkUmVmKHR5cGUpOwogICAgICAgICAgICBpZiAoZ2V0Q29tcG9uZW50RGVmKHR5cGUpKSB7CiAgICAgICAgICAgICAgICAvLyBXZSBrbm93IHdlIGFyZSBjb21wb25lbnQKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGNvbXBvbmVudCA9IGdldEFubm90YXRpb24odHlwZSwgJ0NvbXBvbmVudCcpOwogICAgICAgICAgICAgICAgaWYgKGNvbXBvbmVudCAmJiBjb21wb25lbnQuZW50cnlDb21wb25lbnRzKSB7CiAgICAgICAgICAgICAgICAgICAgZGVlcEZvckVhY2goY29tcG9uZW50LmVudHJ5Q29tcG9uZW50cywgdmVyaWZ5Q29tcG9uZW50SXNQYXJ0T2ZOZ01vZHVsZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB0eXBlCiAgICAgICAgICogQHBhcmFtIHs/fSBpbXBvcnRpbmdNb2R1bGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIHZlcmlmeVNlbWFudGljc09mTmdNb2R1bGVJbXBvcnQodHlwZSwgaW1wb3J0aW5nTW9kdWxlKSB7CiAgICAgICAgICAgIHR5cGUgPSByZXNvbHZlRm9yd2FyZFJlZih0eXBlKTsKICAgICAgICAgICAgaWYgKGdldENvbXBvbmVudERlZih0eXBlKSB8fCBnZXREaXJlY3RpdmVEZWYodHlwZSkpIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgVW5leHBlY3RlZCBkaXJlY3RpdmUgJyR7dHlwZS5uYW1lfScgaW1wb3J0ZWQgYnkgdGhlIG1vZHVsZSAnJHtpbXBvcnRpbmdNb2R1bGUubmFtZX0nLiBQbGVhc2UgYWRkIGFuIEBOZ01vZHVsZSBhbm5vdGF0aW9uLmApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChnZXRQaXBlRGVmKHR5cGUpKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYFVuZXhwZWN0ZWQgcGlwZSAnJHt0eXBlLm5hbWV9JyBpbXBvcnRlZCBieSB0aGUgbW9kdWxlICcke2ltcG9ydGluZ01vZHVsZS5uYW1lfScuIFBsZWFzZSBhZGQgYW4gQE5nTW9kdWxlIGFubm90YXRpb24uYCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdHlwZU9yV2l0aFByb3ZpZGVycwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gdW53cmFwTW9kdWxlV2l0aFByb3ZpZGVyc0ltcG9ydHModHlwZU9yV2l0aFByb3ZpZGVycykgewogICAgICAgIHR5cGVPcldpdGhQcm92aWRlcnMgPSByZXNvbHZlRm9yd2FyZFJlZih0eXBlT3JXaXRoUHJvdmlkZXJzKTsKICAgICAgICByZXR1cm4gKCgvKiogQHR5cGUgez99ICovICh0eXBlT3JXaXRoUHJvdmlkZXJzKSkpLm5nTW9kdWxlIHx8IHR5cGVPcldpdGhQcm92aWRlcnM7CiAgICB9CiAgICAvKioKICAgICAqIEB0ZW1wbGF0ZSBUCiAgICAgKiBAcGFyYW0gez99IHR5cGUKICAgICAqIEBwYXJhbSB7P30gbmFtZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0QW5ub3RhdGlvbih0eXBlLCBuYW1lKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBhbm5vdGF0aW9uID0gbnVsbDsKICAgICAgICBjb2xsZWN0KHR5cGUuX19hbm5vdGF0aW9uc19fKTsKICAgICAgICBjb2xsZWN0KHR5cGUuZGVjb3JhdG9ycyk7CiAgICAgICAgcmV0dXJuIGFubm90YXRpb247CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBhbm5vdGF0aW9ucwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gY29sbGVjdChhbm5vdGF0aW9ucykgewogICAgICAgICAgICBpZiAoYW5ub3RhdGlvbnMpIHsKICAgICAgICAgICAgICAgIGFubm90YXRpb25zLmZvckVhY2gocmVhZEFubm90YXRpb24pOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZGVjb3JhdG9yCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiByZWFkQW5ub3RhdGlvbihkZWNvcmF0b3IpIHsKICAgICAgICAgICAgaWYgKCFhbm5vdGF0aW9uKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBwcm90byA9IE9iamVjdC5nZXRQcm90b3R5cGVPZihkZWNvcmF0b3IpOwogICAgICAgICAgICAgICAgaWYgKHByb3RvLm5nTWV0YWRhdGFOYW1lID09IG5hbWUpIHsKICAgICAgICAgICAgICAgICAgICBhbm5vdGF0aW9uID0gKC8qKiBAdHlwZSB7P30gKi8gKGRlY29yYXRvcikpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAoZGVjb3JhdG9yLnR5cGUpIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgcHJvdG8gPSBPYmplY3QuZ2V0UHJvdG90eXBlT2YoZGVjb3JhdG9yLnR5cGUpOwogICAgICAgICAgICAgICAgICAgIGlmIChwcm90by5uZ01ldGFkYXRhTmFtZSA9PSBuYW1lKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGFubm90YXRpb24gPSBkZWNvcmF0b3IuYXJnc1swXTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEtlZXAgdHJhY2sgb2YgY29tcGlsZWQgY29tcG9uZW50cy4gVGhpcyBpcyBuZWVkZWQgYmVjYXVzZSBpbiB0ZXN0cyB3ZSBvZnRlbiB3YW50IHRvIGNvbXBpbGUgdGhlCiAgICAgKiBzYW1lIGNvbXBvbmVudCB3aXRoIG1vcmUgdGhhbiBvbmUgTmdNb2R1bGUuIFRoaXMgd291bGQgY2F1c2UgYW4gZXJyb3IgdW5sZXN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ez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBuZ01vZHVsZURlZiA9IGdldE5nTW9kdWxlRGVmKHR5cGUpOwogICAgICAgICAgICAgICAgaWYgKG5nTW9kdWxlRGVmKSB7CiAgICAgICAgICAgICAgICAgICAgdmVyaWZ5U2VtYW50aWNzT2ZOZ01vZHVsZURlZigoLyoqIEB0eXBlIHs/fSAqLyAoKC8qKiBAdHlwZSB7P30gKi8gKHR5cGUpKSkpLCBmYWxzZSk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNvbXB1dGVDb21iaW5lZEV4cG9ydHModHlwZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHlwZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSkpKV07CiAgICB9CiAgICAvKioKICAgICAqIFNvbWUgZGVjbGFyZWQgY29tcG9uZW50cyBtYXkgYmUgY29tcGlsZWQgYXN5bmNocm9ub3VzbHksIGFuZCB0aHVzIG1heSBub3QgaGF2ZSB0aGVpcgogICAgICogybVjbXAgc2V0IHlldC4gSWYgdGhpcyBpcyB0aGUgY2FzZSwgdGhlbiBhIHJlZmVyZW5jZSB0byB0aGUgbW9kdWxlIGlzIHdyaXR0ZW4gaW50bwogICAgICogdGhlIGBuZ1NlbGVjdG9yU2NvcGVgIHByb3BlcnR5IG9mIHRoZSBkZWNsYXJlZCB0eXBlLgogICAgICogQHBhcmFtIHs/fSBtb2R1bGVUeXBlCiAgICAgKiBAcGFyYW0gez99IG5nTW9kdWxlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBzZXRTY29wZU9uRGVjbGFyZWRDb21wb25lbnRzKG1vZHVsZVR5cGUsIG5nTW9kdWxlKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGRlY2xhcmF0aW9ucyA9IGZsYXR0ZW4obmdNb2R1bGUuZGVjbGFyYXRpb25zIHx8IEVNUFRZX0FSUkFZJDUpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCB0cmFuc2l0aXZlU2NvcGVzID0gdHJhbnNpdGl2ZVNjb3Blc0Zvcihtb2R1bGVUeXBlKTsKICAgICAgICBkZWNsYXJhdGlvbnMuZm9yRWFjaCgoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBkZWNsYXJhdGlvbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZGVjbGFyYXRpb24gPT4gewogICAgICAgICAgICBpZiAoZGVjbGFyYXRpb24uaGFzT3duUHJvcGVydHkoTkdfQ09NUF9ERUYpKSB7CiAgICAgICAgICAgICAgICAvLyBBIGDJtWNtcGAgZmllbGQgZXhpc3RzIC0gZ28gYWhlYWQgYW5kIHBhdGNoIHRoZSBjb21wb25lbnQgZGlyZWN0bHkuCiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBjb21wb25lbnQgPSAoLyoqIEB0eXBlIHs/fSAqLyAoZGVjbGFyYXRpb24pKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGNvbXBvbmVudERlZiA9ICgvKiogQHR5cGUgez99ICovIChnZXRDb21wb25lbnREZWYoY29tcG9uZW50KSkpOwogICAgICAgICAgICAgICAgcGF0Y2hDb21wb25lbnREZWZXaXRoU2NvcGUoY29tcG9uZW50RGVmLCB0cmFuc2l0aXZlU2NvcGVzKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmICghZGVjbGFyYXRpb24uaGFzT3duUHJvcGVydHkoTkdfRElSX0RFRikgJiYgIWRlY2xhcmF0aW9uLmhhc093blByb3BlcnR5KE5HX1BJUEVfREVGKSkgewogICAgICAgICAgICAgICAgLy8gU2V0IGBuZ1NlbGVjdG9yU2NvcGVgIGZvciBmdXR1cmUgcmVmZXJlbmNlIHdoZW4gdGhlIGNvbXBvbmVudCBjb21waWxhdGlvbiBmaW5pc2hlcy4KICAgICAgICAgICAgICAgICgoLyoqIEB0eXBlIHs/fSAqLyAoZGVjbGFyYXRpb24pKSkubmdTZWxlY3RvclNjb3BlID0gbW9kdWxlVHlwZTsKICAgICAgICAgICAgfQogICAgICAgIH0pKTsKICAgIH0KICAgIC8qKgogICAgICogUGF0Y2ggdGhlIGRlZmluaXRpb24gb2YgYSBjb21wb25lbnQgd2l0aCBkaXJlY3RpdmVzIGFuZCBwaXBlcyBmcm9tIHRoZSBjb21waWxhdGlvbiBzY29wZSBvZgogICAgICogYSBnaXZlbiBtb2R1bGUuCiAgICAgKiBAdGVtcGxhdGUgQwogICAgICogQHBhcmFtIHs/fSBjb21wb25lbnREZWYKICAgICAqIEBwYXJhbSB7P30gdHJhbnNpdGl2ZVNjb3BlcwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gcGF0Y2hDb21wb25lbnREZWZXaXRoU2NvcGUoY29tcG9uZW50RGVmLCB0cmFuc2l0aXZlU2NvcGVzKSB7CiAgICAgICAgY29tcG9uZW50RGVmLmRpcmVjdGl2ZURlZnMgPSAoLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAoKSA9PiBBcnJheS5mcm9tKHRyYW5zaXRpdmVTY29wZXMuY29tcGlsYXRpb24uZGlyZWN0aXZlcykKICAgICAgICAgICAgLm1hcCgoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBkaXIKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGRpciA9PiBkaXIuaGFzT3duUHJvcGVydHkoTkdfQ09NUF9ERUYpID8gKC8qKiBAdHlwZSB7P30gKi8gKGdldENvbXBvbmVudERlZihkaXIpKSkgOiAoLyoqIEB0eXBlIHs/fSAqLyAoZ2V0RGlyZWN0aXZlRGVmKGRpcikpKSkpCi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sZVNjb3BlcyAhPT0gbnVsbCkgewogICAgICAgICAgICByZXR1cm4gZGVmLnRyYW5zaXRpdmVDb21waWxlU2NvcGVzOwogICAgICAgIH0KICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3Qgc2NvcGVzID0gewogICAgICAgICAgICBzY2hlbWFzOiBkZWYuc2NoZW1hcyB8fCBudWxsLAogICAgICAgICAgICBjb21waWxhdGlvbjogewogICAgICAgICAgICAgICAgZGlyZWN0aXZlczogbmV3IFNldCgpLAogICAgICAgICAgICAgICAgcGlwZXM6IG5ldyBTZXQoKSwKICAgICAgICAgICAgfSwKICAgICAgICAgICAgZXhwb3J0ZWQ6IHsKICAgICAgICAgICAgICAgIGRpcmVjdGl2ZXM6IG5ldyBTZXQoKSwKICAgICAgICAgICAgICAgIHBpcGVzOiBuZXcgU2V0KCksCiAgICAgICAgICAgIH0sCiAgICAgICAgfTsKICAgICAgICBtYXliZVVud3JhcEZuKGRlZi5pbXBvcnRzKS5mb3JFYWNoKCgvKioKICAgICAgICAgKiBAdGVtcGxhdGUgSQogICAgICAgICAqIEBwYXJhbSB7P30gaW1wb3J0ZWQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIChpbXBvcnRlZCkgPT4gewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGltcG9ydGVkVHlwZSA9ICgvKiogQHR5cGUgez99ICovIChpbXBvcnRlZCkpOwogICAgICAgICAgICBpZiAoIWlzTmdNb2R1bGUoaW1wb3J0ZWRUeXBlKSkgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBJbXBvcnRpbmcgJHtpbXBvcnRlZFR5cGUubmFtZX0gd2hpY2ggZG9lcyBub3QgaGF2ZSBhIMm1bW9kIHByb3BlcnR5YCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gV2hlbiB0aGlzIG1vZHVsZSBpbXBvcnRzIGFub3RoZXIsIHRoZSBpbXBvcnRlZCBtb2R1bGUncyBleHBvcnRlZCBkaXJlY3RpdmVzIGFuZCBwaXBlcyBhcmUKICAgICAgICAgICAgLy8gYWRkZWQgdG8gdGhlIGNvbXBpbGF0aW9uIHNjb3BlIG9mIHRoaXMgbW9kdWxlLgogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGltcG9ydGVkU2NvcGUgPSB0cmFuc2l0aXZlU2NvcGVzRm9yKGltcG9ydGVkVHlwZSk7CiAgICAgICAgICAgIGltcG9ydGVkU2NvcGUuZXhwb3J0ZWQuZGlyZWN0aXZlcy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBlbnRyeQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZW50cnkgPT4gc2NvcGVzLmNvbXBpbGF0aW9uLmRpcmVjdGl2ZXMuYWRkKGVudHJ5KSkpOwogICAgICAgICAgICBpbXBvcnRlZFNjb3BlLmV4cG9ydGVkLnBpcGVzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGVudHJ5CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBlbnRyeSA9PiBzY29wZXMuY29tcGlsYXRpb24ucGlwZXMuYWRkKGVudHJ5KSkpOwogICAgICAgIH0pKTsKICAgICAgICBtYXliZVVud3JhcEZuKGRlZi5kZWNsYXJhdGlvbnMpLmZvckVhY2goKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZGVjbGFyZWQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGRlY2xhcmVkID0+IHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBkZWNsYXJlZFdpdGhEZWZzID0gKC8qKiBAdHlwZSB7P30gKi8gKGRlY2xhcmVkKSk7CiAgICAgICAgICAgIGlmIChnZXRQaXBlRGVmKGRlY2xhcmVkV2l0aERlZnMpKSB7CiAgICAgICAgICAgICAgICBzY29wZXMuY29tcGlsYXRpb24ucGlwZXMuYWRkKGRlY2xhcmVkKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIC8vIEVpdGhlciBkZWNsYXJlZCBoYXMgYSDJtWNtcCBvciDJtWRpciwgb3IgaXQncyBhIGNvbXBvbmVudCB3aGljaCBoYXNuJ3QKICAgICAgICAgICAgICAgIC8vIGhhZCBpdHMgdGVtcGxhdGUgY29tcGlsZWQgeWV0LiBJbiBlaXRoZXIgY2FzZSwgaXQgZ2V0cyBhZGRlZCB0byB0aGUgY29tcGlsYXRpb24ncwogICAgICAgICAgICAgICAgLy8gZGlyZWN0aXZlcy4KICAgICAgICAgICAgICAgIHNjb3Blcy5jb21waWxhdGlvbi5kaXJlY3RpdmVzLmFkZChkZWNsYXJlZCk7CiAgICAgICAgICAgIH0KICAgICAgICB9KSk7CiAgICAgICAgbWF5YmVVbndyYXBGbihkZWYuZXhwb3J0cykuZm9yRWFjaCgoLyoqCiAgICAgICAgICogQHRlbXBsYXRlIEUKICAgICAgICAgKiBAcGFyYW0gez99IGV4cG9ydGVkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAoZXhwb3J0ZWQpID0+IHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBleHBvcnRlZFR5cGUgPSAoLyoqIEB0eXBlIHs/fSAqLyAoZXhwb3J0ZWQpKTsKICAgICAgICAgICAgLy8gRWl0aGVyIHRoZSB0eXBlIGlzIGEgbW9kdWxlLCBhIHBpcGUsIG9yIGEgY29tcG9uZW50L2RpcmVjdGl2ZSAod2hpY2ggbWF5IG5vdCBoYXZlIGEKICAgICAgICAgICAgLy8gybVjbXAgYXMgaXQgbWlnaHQgYmUgY29tcGlsZWQgYXN5bmNocm9ub3VzbHkpLgogICAgICAgICAgICBpZiAoaXNOZ01vZHVsZShleHBvcnRlZFR5cGUpKSB7CiAgICAgICAgICAgICAgICAvLyBXaGVuIHRoaXMgbW9kdWxlIGV4cG9ydHMgYW5vdGhlciwgdGhlIGV4cG9ydGVkIG1vZHVsZSdzIGV4cG9ydGVkIGRpcmVjdGl2ZXMgYW5kIHBpcGVzIGFyZQogICAgICAgICAgICAgICAgLy8gYWRkZWQgdG8gYm90aCB0aGUgY29tcGlsYXRpb24gYW5kIGV4cG9ydGVkIHNjb3BlcyBvZiB0aGlzIG1vZHVsZS4KICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGV4cG9ydGVkU2NvcGUgPSB0cmFuc2l0aXZlU2NvcGVzRm9yKGV4cG9ydGVkVHlwZSk7CiAgICAgICAgICAgICAgICBleHBvcnRlZFNjb3BlLmV4cG9ydGVkLmRpcmVjdGl2ZXMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGVudHJ5CiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBlbnRyeSA9PiB7CiAgICAgICAgICAgICAgICAgICAgc2NvcGVzLmNvbXBpbGF0aW9uLmRpcmVjdGl2ZXMuYWRkKGVudHJ5KTsKICAgICAgICAgICAgICAgICAgICBzY29wZXMuZXhwb3J0ZWQuZGlyZWN0aXZlcy5hZGQoZW50cnkpOwogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgZXhwb3J0ZWRTY29wZS5leHBvcnRlZC5waXBlcy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZW50cnkKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIGVudHJ5ID0+IHsKICAgICAgICAgICAgICAgICAgICBzY29wZXMuY29tcGlsYXRpb24ucGlwZXMuYWRkKGVudHJ5KTsKICAgICAgICAgICAgICAgICAgICBzY29wZXMuZXhwb3J0ZWQucGlwZXMuYWRkKGVudHJ5KTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChnZXRQaXBlRGVmKGV4cG9ydGVkVHlwZSkpIHsKICAgICAgICAgICAgICAgIHNjb3Blcy5leHBvcnRlZC5waXBlcy5hZGQoZXhwb3J0ZWRUeXBlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHNjb3Blcy5leHBvcnRlZC5kaXJlY3RpdmVzLmFkZChleHBvcnRlZFR5cGUpOwogICAgICAgICAgICB9CiAgICAgICAgfSkpOwogICAgICAgIGRlZi50cmFuc2l0aXZlQ29tcGlsZVNjb3BlcyA9IHNjb3BlczsKICAgICAgICByZXR1cm4gc2NvcGVzOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBleHBhbmRNb2R1bGVXaXRoUHJvdmlkZXJzKHZhbHVlKSB7CiAgICAgICAgaWYgKGlzTW9kdWxlV2l0aFByb3ZpZGVycyh2YWx1ZSkpIHsKICAgICAgICAgICAgcmV0dXJuIHZhbHVlLm5nTW9kdWxlOwogICAgICAgIH0KICAgICAgICByZXR1cm4gdmFsdWU7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGlzTW9kdWxlV2l0aFByb3ZpZGVycyh2YWx1ZSkgewogICAgICAgIHJldHVybiAoKC8qKiBAdHlwZSB7P30gKi8gKHZhbHVlKSkpLm5nTW9kdWxlICE9PSB1bmRlZmluZWQ7CiAgICB9CiAgICAvKioKICAgICAqIEB0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gbmVlZCB0byBjcmVhdGUgdGhlIG5nRmFjdG9yeURlZi4gV2UncmUgYXZvaWRpbmcgdXNpbmcgdGhlIGNvbXBvbmVudCBtZXRhZGF0YQogICAgICAgIC8vIGJlY2F1c2Ugd2UnZCBoYXZlIHRvIHJlc29sdmUgdGhlIGFzeW5jaHJvbm91cyB0ZW1wbGF0ZXMuCiAgICAgICAgYWRkRGlyZWN0aXZlRmFjdG9yeURlZih0eXBlLCBtZXRhZGF0YSk7CiAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KHR5cGUsIE5HX0NPTVBfREVGLCB7CiAgICAgICAgICAgIGdldDogKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgaWYgKG5nQ29tcG9uZW50RGVmID09PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGNvbXBpbGVyID0gZ2V0Q29tcGlsZXJGYWNhZGUoKTsKICAgICAgICAgICAgICAgICAgICBpZiAoY29tcG9uZW50TmVlZHNSZXNvbHV0aW9uKG1ldGFkYXRhKSkgewogICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGVycm9yID0gW2BDb21wb25lbnQgJyR7dHlwZS5uYW1lfScgaXMgbm90IHJlc29sdmVkOmBdOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAobWV0YWRhdGEudGVtcGxhdGVVcmwpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yLnB1c2goYCAtIHRlbXBsYXRlVXJsOiAke21ldGFkYXRhLnRlbXBsYXRlVXJsfWApOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zdHlsZVVybHMgJiYgbWV0YWRhdGEuc3R5bGVVcmxzLmxlbmd0aCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3IucHVzaChgIC0gc3R5bGVVcmxzOiAke0pTT04uc3RyaW5naWZ5KG1ldGFkYXRhLnN0eWxlVXJscyl9YCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3IucHVzaChgRGlkIHlvdSBydW4gYW5kIHdhaXQgZm9yICdyZXNvbHZlQ29tcG9uZW50UmVzb3VyY2VzKCknP2ApOwogICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoZXJyb3Iuam9pbignXG4nKSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIC8vIFRoaXMgY29uc3Qgd2FzIGNhbGxlZCBgaml0T3B0aW9uc2AgcHJldmlvdXNseSBidXQgaGFkIHRvIGJlIHJlbmFtZWQgdG8gYG9wdGlvbnNgIGJlY2F1c2UKICAgICAgICAgICAgICAgICAgICAvLyBvZiBhIGJ1ZyB3aXRoIFRlcnNlciB0aGF0IGNhdXNlZCBvcHRpbWl6ZWQgSklUIGJ1aWxkcyB0byB0aHJvdyBhIGBSZWZlcmVuY2VFcnJvcmAuCiAgICAgICAgICAgICAgICAgICAgLy8gVGhpcyBidWcgd2FzIGludmVzdGlnYXRlZCBpbiBodHRwczovL2dpdGh1Yi5jb20vYW5ndWxhci9hbmd1bGFyLWNsaS9pc3N1ZXMvMTcyNjQuCiAgICAgICAgICAgICAgICAgICAgLy8gV2Ugc2hvdWxkIG5vdCByZW5hbWUgaXQgYmFjayB1bnRpbCBodHRwczovL2dpdGh1Yi5jb20vdGVyc2VyL3RlcnNlci9pc3N1ZXMvNjE1IGlzIGZpeGVkLgogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBvcHRpb25zID0gZ2V0Sml0T3B0aW9ucygpOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBsZXQgcHJlc2VydmVXaGl0ZXNwYWNlcyA9IG1ldGFkYXRhLnByZXNlcnZlV2hpdGVzcGFjZXM7CiAgICAgICAgICAgICAgICAgICAgaWYgKHByZXNlcnZlV2hpdGVzcGFjZXMgPT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICAgICAgICAgICAgICBpZiAob3B0aW9ucyAhPT0gbnVsbCAmJiBvcHRpb25zLnByZXNlcnZlV2hpdGVzcGFjZXMgIT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJlc2VydmVXaGl0ZXNwYWNlcyA9IG9wdGlvbnMucHJlc2VydmVXaGl0ZXNwYWNlczsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByZXNlcnZlV2hpdGVzcGFjZXMgPSBmYWxzZTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgbGV0IGVuY2Fwc3VsYXRpb24gPSBtZXRhZGF0YS5lbmNhcHN1bGF0aW9uOwogICAgICAgICAgICAgICAgICAgIGlmIChlbmNhcHN1bGF0aW9uID09PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMgIT09IG51bGwgJiYgb3B0aW9ucy5kZWZhdWx0RW5jYXBzdWxhdGlvbiAhPT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbmNhcHN1bGF0aW9uID0gb3B0aW9ucy5kZWZhdWx0RW5jYXBzdWxhdGlvbjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBlbHNlIH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LyBjb21wb25lbnQgbWF5IGV4ZWN1dGUgYW5kIHNldCBhbiBuZ1NlbGVjdG9yU2NvcGUgcHJvcGVydHkgb24gdGhlIGNvbXBvbmVudCB0eXBlLiBUaGlzCiAgICAgICAgICAgICAgICAgICAgLy8gYWxsb3dzIHRoZSBjb21wb25lbnQgdG8gcGF0Y2ggaXRzZWxmIHdpdGggZGlyZWN0aXZlRGVmcyBmcm9tIHRoZSBtb2R1bGUgYWZ0ZXIgaXQKICAgICAgICAgICAgICAgICAgICAvLyBmaW5pc2hlcyBjb21waWxpbmcuCiAgICAgICAgICAgICAgICAgICAgaWYgKGhhc1NlbGVjdG9yU2NvcGUodHlwZSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzY29wZXMgPSB0cmFuc2l0aXZlU2NvcGVzRm9yKHR5cGUubmdTZWxlY3RvclNjb3BlKTsKICAgICAgICAgICAgICAgICAgICAgICAgcGF0Y2hDb21wb25lbnREZWZXaXRoU2NvcGUobmdDb21wb25lbnREZWYsIHNjb3Blcyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIG5nQ29tcG9uZW50RGVmOwogICAgICAgICAgICB9KSwKICAgICAgICAgICAgLy8gTWFrZSB0aGUgcHJvcGVydHkgY29uZmlndXJhYmxlIGluIGRldiBtb2RlIHRvIGFsbG93IG92ZXJyaWRpbmcgaW4gdGVzdHMKICAgICAgICAgICAgY29uZmlndXJhYmxlOiAhIW5nRGV2TW9kZSwKICAgICAgICB9KTsKICAgIH0KICAgIC8qKgogICAgICogQHRlbXBsYXRlIFQKICAgICAqIEBwYXJhbSB7P30gY29tcG9uZW50CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBoYXNTZWxlY3RvclNjb3BlKGNvbXBvbmVudCkgewogICAgICAgIHJldHVybiAoK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AgICAgICAgICAgIC8vIGBkaXJlY3RpdmVgIGNhbiBiZSBudWxsIGluIHRoZSBjYXNlIG9mIGFic3RyYWN0IGRpcmVjdGl2ZXMgYXMgYSBiYXNlIGNsYXNzCiAgICAgICAgICAgICAgICAgICAgLy8gdGhhdCB1c2UgYEBEaXJlY3RpdmUoKWAgd2l0aCBubyBzZWxlY3Rvci4gSW4gdGhhdCBjYXNlLCBwYXNzIGVtcHR5IG9iamVjdCB0byB0aGUKICAgICAgICAgICAgICAgICAgICAvLyBgZGlyZWN0aXZlTWV0YWRhdGFgIGZ1bmN0aW9uIGluc3RlYWQgb2YgbnVsbC4KICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgbWV0YSA9IGdldERpcmVjdGl2ZU1ldGFkYXRhKHR5cGUsIGRpcmVjdGl2ZSB8fCB7fSk7CiAgICAgICAgICAgICAgICAgICAgbmdEaXJlY3RpdmVEZWYgPQogICAgICAgICAgICAgICAgICAgICAgICBnZXRDb21waWxlckZhY2FkZSgpLmNvbXBpbGVEaXJlY3RpdmUoYW5ndWxhckNvcmVFbnYsIG1ldGEuc291cmNlTWFwVXJsLCBtZXRhLm1ldGFkYXRhKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiBuZ0RpcmVjdGl2ZURlZjsKICAgICAgICAgICAgfSksCiAgICAgICAgICAgIC8vIE1ha2UgdGhlIHByb3BlcnR5IGNvbmZpZ3VyYWJsZSBpbiBkZXYgbW9kZSB0byBhbGxvdyBvdmVycmlkaW5nIGluIHRlc3RzCiAgICAgICAgICAgIGNvbmZpZ3VyYWJsZTogISFuZ0Rldk1vZGUsCiAgICAgICAgfSk7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdHlwZQogICAgICogQHBhcmFtIHs/fSBtZXRhZGF0YQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0RGlyZWN0aXZlTWV0YWRhdGEodHlwZSwgbWV0YWRhdGEpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgbmFtZSA9IHR5cGUgJiYgdHlwZS5uYW1lOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBzb3VyY2VNYXBVcmwgPSBgbmc6Ly8vJHtuYW1lfS/JtWRpci5qc2A7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGNvbXBpbGVyID0gZ2V0Q29tcGlsZXJGYWNhZGUoKTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgZmFjYWRlID0gZGlyZWN0aXZlTWV0YWRhdGEoKC8qKiBAdHlwZSB7P30gKi8gKHR5cGUpKSwgbWV0YWRhdGEpOwogICAgICAgIGZhY2FkZS50eXBlU291cmNlU3BhbiA9IGNvbXBpbGVyLmNyZWF0ZVBhcnNlU291cmNlU3BhbignRGlyZWN0aXZlJywgbmFtZSwgc291cmNlTWFwVXJsKTsKICAgICAgICBpZiAoZmFjYWRlLnVzZXNJbmhlcml0YW5jZSkgewogICAgICAgICAgICBhZGREaXJlY3RpdmVEZWZUb1VuZGVjb3JhdGVkUGFyZW50cyh0eXBlKTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIHsgbWV0YWRhdGE6IGZhY2FkZSwgc291cmNlTWFwVXJsIH07CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdHlwZQogICAgICogQHBhcmFtIHs/fSBtZXRhZGF0YQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gYWRkRGlyZWN0aXZlRmFjdG9yeURlZih0eXBlLCBtZXRhZGF0YSkgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgbmdGYWN0b3J5RGVmID0gbnVsbDsKICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkodHlwZSwgTkdfRkFDVE9SWV9ERUYsIHsKICAgICAgICAgICAgZ2V0OiAoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAobmdGYWN0b3J5RGVmID09PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IG1ldGEgPSBnZXREaXJlY3RpdmVNZXRhZGF0YSh0eXBlLCBtZXRhZGF0YSk7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGNvbXBpbGVyID0gZ2V0Q29tcGlsZXJGYWNhZGUoKTsKICAgICAgICAgICAgICAgICAgICBuZ0ZhY3RvcnlEZWYgPSBjb21waWxlci5jb21waWxlRmFjdG9yeShhbmd1bGFyQ29yZUVudiwgYG5nOi8vLyR7dHlwZS5uYW1lfS/JtWZhYy5qc2AsIE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgbWV0YS5tZXRhZGF0YSksIHsgaW5qZWN0Rm46ICdkaXJlY3RpdmVJbmplY3QnLCB0YXJnZXQ6IGNvbXBpbGVyLlIzRmFjdG9yeVRhcmdldC5EaXJlY3RpdmUgfSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIG5nRmFjdG9yeURlZjsKICAgICAgICAgICAgfSksCiAgICAgICAgICAgIC8vIE1ha2UgdGhlIHByb3BlcnR5IGNvbmZpZ3VyYWJsZSBpbiBkZXYgbW9kZSB0byBhbGxvdyBvdmVycmlkaW5nIGluIHRlc3RzCiAgICAgICAgICAgIGNvbmZpZ3VyYWJsZTogISFuZ0Rldk1vZGUsCiAgICAgICAgfSk7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdHlwZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAg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XJ5UHJlZGljYXRlKHNlbGVjdG9yKSB7CiAgICAgICAgcmV0dXJuIHR5cGVvZiBzZWxlY3RvciA9PT0gJ3N0cmluZycgPyBzcGxpdEJ5Q29tbWEoc2VsZWN0b3IpIDogcmVzb2x2ZUZvcndhcmRSZWYoc2VsZWN0b3IpOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHByb3BlcnR5TmFtZQogICAgICogQHBhcmFtIHs/fSBhbm4KICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGNvbnZlcnRUb1IzUXVlcnlNZXRhZGF0YShwcm9wZXJ0eU5hbWUsIGFubikgewogICAgICAgIHJldHVybiB7CiAgICAgICAgICAgIHByb3BlcnR5TmFtZTogcHJvcGVydHlOYW1lLAogICAgICAgICAgICBwcmVkaWNhdGU6IGNvbnZlcnRUb1IzUXVlcnlQcmVkaWNhdGUoYW5uLnNlbGVjdG9yKSwKICAgICAgICAgICAgZGVzY2VuZGFudHM6IGFubi5kZXNjZW5kYW50cywKICAgICAgICAgICAgZmlyc3Q6IGFubi5maXJzdCwKICAgICAgICAgICAgcmVhZDogYW5uLnJlYWQgPyBhbm4ucmVhZCA6IG51bGwsCiAgICAgICAgICAgIHN0YXRpYzogISFhbm4uc3RhdGljCiAgICAgICAgfTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB0eXBlCiAgICAgKiBAcGFyYW0gez99IHByb3BNZXRhZGF0YQogICAgICogQHBhcmFtIHs/fSBpc1F1ZXJ5QW5uCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBleHRyYWN0UXVlcmllc01ldGFkYXRhKHR5cGUsIHByb3BNZXRhZGF0YSwgaXNRdWVyeUFubikgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBxdWVyaWVzTWV0YSA9IFtdOwogICAgICAgIGZvciAoY29uc3QgZmllbGQgaW4gcHJvcE1ldGFkYXRhKSB7CiAgICAgICAgICAgIGlmIChwcm9wTWV0YWRhdGEuaGFzT3duUHJvcGVydHkoZmllbGQpKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBhbm5vdGF0aW9ucyA9IHByb3BNZXRhZGF0YVtmaWVsZF07CiAgICAgICAgICAgICAgICBhbm5vdGF0aW9ucy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gYW5uCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBhbm4gPT4gewogICAgICAgICAgICAgICAgICAgIGlmIChpc1F1ZXJ5QW5uKGFubikpIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFhbm4uc2VsZWN0b3IpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgQ2FuJ3QgY29uc3RydWN0IGEgcXVlcnkgZm9yIHRoZSBwcm9wZXJ0eSAiJHtmaWVsZH0iIG9mIGAgKwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGAiJHtzdHJpbmdpZnlGb3JFcnJvcih0eXBlKX0iIHNpbmNlIHRoZSBxdWVyeSBzZWxlY3RvciB3YXNuJ3QgZGVmaW5lZC5gKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBpZiAoYW5ub3RhdGlvbnMuc29tZShpc0lucHV0QW5ub3RhdGlvbikpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgQ2Fubm90IGNvbWJpbmUgQElucHV0IGRlY29yYXRvcnMgd2l0aCBxdWVyeSBkZWNvcmF0b3JzYCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgcXVlcmllc01ldGEucHVzaChjb252ZXJ0VG9SM1F1ZXJ5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aW9uIGlzSW5wdXRBbm5vdGF0aW9uKHZhbHVlKSB7CiAgICAgICAgcmV0dXJuIHZhbHVlLm5nTWV0YWRhdGFOYW1lID09PSAnSW5wdXQnOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBzcGxpdEJ5Q29tbWEodmFsdWUpIHsKICAgICAgICByZXR1cm4gdmFsdWUuc3BsaXQoJywnKS5tYXAoKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gcGllY2UKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHBpZWNlID0+IHBpZWNlLnRyaW0oKSkpOwogICAgfQogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgTElGRUNZQ0xFX0hPT0tTID0gWwogICAgICAgICduZ09uQ2hhbmdlcycsICduZ09uSW5pdCcsICduZ09uRGVzdHJveScsICduZ0RvQ2hlY2snLCAnbmdBZnRlclZpZXdJbml0JywgJ25nQWZ0ZXJWaWV3Q2hlY2tlZCcsCiAgICAgICAgJ25nQWZ0ZXJDb250ZW50SW5pdCcsICduZ0FmdGVyQ29udGVudENoZWNrZWQnCiAgICBdOwogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHR5cGUKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHNob3VsZEFkZEFic3RyYWN0RGlyZWN0aXZlKHR5cGUpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgcmVmbGVjdCA9IGdldFJlZmxlY3QoKTsKICAgICAgICBpZiAoTElGRUNZQ0xFX0hPT0tTLnNvbWUoKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gaG9va05hbWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGhvb2tOYW1lID0+IHJlZmxlY3QuaGFzTGlmZWN5Y2xlSG9vayh0eXBlLCBob29rTmFtZSkpKSkgewogICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICB9CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHByb3BNZXRhZGF0YSA9IHJlZmxlY3QucHJvcE1ldGFkYXRhKHR5cGUpOwogICAgICAgIGZvciAoY29uc3QgZmllbGQgaW4gcHJvcE1ldGFkYXRhKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgYW5ub3RhdGlvbnMgPSBwcm9wTWV0YWRhdGFbZmllbGRdOwogICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGFubm90YXRpb25zLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBjdXJyZW50ID0gYW5ub3RhdGlvbnNbaV07CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBtZXRhZGF0YU5hbWUgPSBjdXJyZW50Lm5nTWV0YWRhdGFOYW1lOwogICAgICAgICAgICAgICAgaWYgKGlzSW5wdXRBbm5vdGF0aW9uKGN1cnJlbnQpIHx8IGlzQ29udGVudFF1ZXJ5KGN1cnJlbnQpIHx8IGlzVmlld1F1ZXJ5KGN1cnJlbnQpIHx8CiAgICAgICAgICAgICAgICAgICAgbWV0YWRhdGFOYW1lID09PSAnT3V0cHV0JyB8fCBtZXRhZGF0YU5hbWUgPT09ICdIb3N0QmluZGluZycgfHwKICAgICAgICAgICAgICAgICAgICBtZXRhZGF0YU5hbWUgPT09ICdIb3N0TGlzdGVuZXInKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogcGFja2FnZXMvY29yZS9zcmMvcmVuZGVyMy9qaXQvcGlwZS50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdHlwZQogICAgICogQHBhcmFtIHs/fSBtZXRhCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBjb21waWxlUGlwZSh0eXBlLCBtZXRhKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBuZ1BpcGVEZWYgPSBudWxsOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgbmdGYWN0b3J5RGVmID0gbnVsbDsKICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkodHlwZSwgTkdfRkFDVE9SWV9ERUYsIHsKICAgICAgICAgICAgZ2V0OiAoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAobmdGYWN0b3J5RGVmID09PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IG1ldGFkYXRhID0gZ2V0UGlwZU1ldGFkYXRhKHR5cGUsIG1ldGEpOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBjb21waWxlciA9IGdldENvbXBpbGVyRmFjYWRlKCk7CiAgICAgICAgICAgICAgICAgICAgbmdGYWN0b3J5RGVmID0gY29tcGlsZXIuY29tcGlsZUZhY3RvcnkoYW5ndWxhckNvcmVFbnYsIGBuZzovLy8ke21ldGFkYXRhLm5hbWV9L8m1ZmFjLmpzYCwgT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LCBtZXRhZGF0YSksIHsgaW5qZWN0Rm46ICdkaXJlY3RpdmVJbmplY3QnLCB0YXJnZXQ6IGNvbXBpbGVyLlIzRmFjdG9yeVRhcmdldC5QaXBlIH0pKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiBuZ0ZhY3RvcnlEZWY7CiAgICAgICAgICAgIH0pLAogICAgICAgICAgICAvLyBNYWtlIHRoZSBwcm9wZXJ0eSBjb25maWd1cmFibGUgaW4gZGV2IG1vZGUgdG8gYWxsb3cgb3ZlcnJpZGluZyBpbiB0ZXN0cwogICAgICAgICAgICBjb25maWd1cmFibGU6ICEhbmdEZXZNb2RlLAogICAgICAgIH0pOwogICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eSh0eXBlLCBOR19QSVBFX0RFRiwgewogICAgICAgICAgICBnZXQ6ICgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIGlmIChuZ1BpcGVEZWYgPT09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgbWV0YWRhdGEgPSBnZXRQaXBlTWV0YWRhdGEodHlwZSwgbWV0YSk7CiAgICAgICAgICAgICAgICAgICAgbmdQaXBlRGVmID0gZ2V0Q29tcGlsZXJGYWNhZGUoKS5jb21waWxlUGlwZShhbmd1bGFyQ29yZUVudiwgYG5nOi8vLyR7bWV0YWRhdGEubmFtZX0vybVwaXBlLmpzYCwgbWV0YWRhdGEpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIG5nUGlwZURlZjsKICAgICAgICAgICAgfSksCiAgICAgICAgICAgIC8vIE1ha2UgdGhlIHByb3BlcnR5IGNvbmZpZ3VyYWJsZSBpbiBkZXYgbW9kZSB0byBhbGxvdyBvdmVycmlkaW5nIGluIHRlc3RzCiAgICAgICAgICAgIGNvbmZpZ3VyYWJsZTogISFuZ0Rldk1vZGUsCiAgICAgICAgfSk7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdHlwZQogICAgICogQHBhcmFtIHs/fSBtZXRhCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBnZXRQaXBlTWV0YWRhdGEodHlwZSwgbWV0YSkgewogICAgICAgIHJldHVybiB7CiAgICAgICAgICAgIHR5cGU6IHR5cGUsCiAgICAgICAgICAgIHR5cGVBcmd1bWVudENvdW50OiAwLAogICAgICAgICAgICBuYW1lOiB0eXBlLm5hbWUsCiAgICAgICAgICAgIGRlcHM6IHJlZmxlY3REZXBlbmRlbmNpZXModHlwZSksCiAgICAgICAgICAgIHBpcGVOYW1lOiBtZXRhLm5hbWUsCiAgICAgICAgICAgIHB1cmU6IG1ldGEucHVyZSAhPT0gdW5kZWZpbmVkID8gbWV0YS5wdXJlIDogdHJ1ZQogICAgICAgIH07CiAgICB9CiAgICAvLyBXQVJOSU5HOiBpbnRlcmZhY2UgaGFzIGJvdGggYSB0eXBlIGFuZCBhIHZhbHVlLCBza2lwcGluZyBlbWl0CiAgICBjb25zdCDJtTAkZSA9IC8qKgogICAgICogQHBhcmFtIHs/PX0gZGlyCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICAoZGlyID0ge30pID0+IGRpciwgybUxJDMgPSAvKioKICAgICAqIEBwYXJhbSB7P30gdHlwZQogICAgICogQHBhcmFtIHs/fSBtZXRhCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICAodHlwZSwgbWV0YSkgPT4gU1dJVENIX0NPTVBJTE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C8qKgogICAgICogQHBhcmFtIHs/PX0gYmluZGluZ1Byb3BlcnR5TmFtZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgKGJpbmRpbmdQcm9wZXJ0eU5hbWUpID0+ICh7IGJpbmRpbmdQcm9wZXJ0eU5hbWUgfSk7CiAgICAvKioKICAgICAqIFxAQW5ub3RhdGlvbgogICAgICogXEBwdWJsaWNBcGkKICAgICAqIEB0eXBlIHs/fQogICAgICovCiAgICBjb25zdCBPdXRwdXQgPSBtYWtlUHJvcERlY29yYXRvcignT3V0cHV0JywgKMm1NykpOwogICAgLy8gV0FSTklORzogaW50ZXJmYWNlIGhhcyBib3RoIGEgdHlwZSBhbmQgYSB2YWx1ZSwgc2tpcHBpbmcgZW1pdAogICAgY29uc3QgybU4ID0gLyoqCiAgICAgKiBAcGFyYW0gez89fSBob3N0UHJvcGVydHlOYW1lCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICAoaG9zdFByb3BlcnR5TmFtZSkgPT4gKHsgaG9zdFByb3BlcnR5TmFtZSB9KTsKICAgIC8qKgogICAgICogXEBBbm5vdGF0aW9uCiAgICAgKiBcQHB1YmxpY0FwaQogICAgICogQHR5cGUgez99CiAgICAgKi8KICAgIGNvbnN0IEhvc3RCaW5kaW5nID0gbWFrZVByb3BEZWNvcmF0b3IoJ0hvc3RCaW5kaW5nJywgKMm1OCkpOwogICAgLy8gV0FSTklORzogaW50ZXJmYWNlIGhhcyBib3RoIGEgdHlwZSBhbmQgYSB2YWx1ZSwgc2tpcHBpbmcgZW1pdAogICAgY29uc3QgybU5ID0gLyoqCiAgICAgKiBAcGFyYW0gez89fSBldmVudE5hbWUKICAgICAqIEBwYXJhbSB7Pz19IGFyZ3MKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIChldmVudE5hbWUsIGFyZ3MpID0+ICh7IGV2ZW50TmFtZSwgYXJncyB9KTsKICAgIC8qKgogICAgICogRGVjb3JhdG9yIHRoYXQgYmluZHMgYSBET00gZXZlbnQgdG8gYSBob3N0IGxpc3RlbmVyIGFuZCBzdXBwbGllcyBjb25maWd1cmF0aW9uIG1ldGFkYXRhLgogICAgICogQW5ndWxhciBpbnZva2VzIHRoZSBzdXBwbGllZCBoYW5kbGVyIG1ldGhvZCB3aGVuIHRoZSBob3N0IGVsZW1lbnQgZW1pdHMgdGhlIHNwZWNpZmllZCBldmVudCwKICAgICAqIGFuZCB1cGRhdGVzIHRoZSBib3VuZCBlbGVtZW50IHdpdGggdGhlIHJlc3VsdC4KICAgICAqCiAgICAgKiBJZiB0aGUgaGFuZGxlciBtZXRob2QgcmV0dXJucyBmYWxzZSwgYXBwbGllcyBgcHJldmVudERlZmF1bHRgIG9uIHRoZSBib3VuZCBlbGVtZW50LgogICAgICoKICAgICAqIFxAdXNhZ2VOb3RlcwogICAgICoKICAgICAqIFRoZSBmb2xsb3dpbmcgZXhhbXBsZSBkZWNsYXJlcyBhIGRpcmVjdGl2ZQogICAgICogdGhhdCBhdHRhY2hlcyBhIGNsaWNrIGxpc3RlbmVyIHRvIGEgYnV0dG9uIGFuZCBjb3VudHMgY2xpY2tzLgogICAgICoKICAgICAqIGBgYHRzCiAgICAgKiBcQERpcmVjdGl2ZSh7c2VsZWN0b3I6ICdidXR0b25bY291bnRpbmddJ30pCiAgICAgKiBjbGFzcyBDb3VudENsaWNrcyB7CiAgICAgKiAgIG51bWJlck9mQ2xpY2tzID0gMDsKICAgICAqCiAgICAgKiBcQEhvc3RMaXN0ZW5lcignY2xpY2snLCBbJyRldmVudC50YXJnZXQnXSkKICAgICAqICAgb25DbGljayhidG4pIHsKICAgICAqICAgICBjb25zb2xlLmxvZygnYnV0dG9uJywgYnRuLCAnbnVtYmVyIG9mIGNsaWNrczonLCB0aGlzLm51bWJlck9mQ2xpY2tzKyspOwogICAgICogIH0KICAgICAqIH0KICAgICAqCiAgICAgKiBcQENvbXBvbmVudCh7CiAgICAgKiAgIHNlbGVjdG9yOiAnYXBwJywKICAgICAqICAgdGVtcGxhdGU6ICc8YnV0dG9uIGNvdW50aW5nPkluY3JlbWVudDwvYnV0dG9uPicsCiAgICAgKiB9KQogICAgICogY2xhc3MgQXBwIHt9CiAgICAgKgogICAgICogYGBgCiAgICAgKgogICAgICogVGhlIGZvbGxvd2luZyBleGFtcGxlIHJlZ2lzdGVycyBhbm90aGVyIERPTSBldmVudCBoYW5kbGVyIHRoYXQgbGlzdGVucyBmb3Iga2V5LXByZXNzIGV2ZW50cy4KICAgICAqIGBgYCB0cwogICAgICogaW1wb3J0IHsgSG9zdExpc3RlbmVyLCBDb21wb25lbnQgfSBmcm9tICJcQGFuZ3VsYXIvY29yZSI7CiAgICAgKgogICAgICogXEBDb21wb25lbnQoewogICAgICogICBzZWxlY3RvcjogJ2FwcCcsCiAgICAgKiAgIHRlbXBsYXRlOiBgPGgxPkhlbGxvLCB5b3UgaGF2ZSBwcmVzc2VkIGtleXMge3tjb3VudGVyfX0gbnVtYmVyIG9mIHRpbWVzITwvaDE+IFByZXNzIGFueSBrZXkgdG8KICAgICAqIGluY3JlbWVudCB0aGUgY291bnRlci4KICAgICAqICAgPGJ1dHRvbiAoY2xpY2spPSJyZXNldENvdW50ZXIoKSI+UmVzZXQgQ291bnRlcjwvYnV0dG9uPmAKICAgICAqIH0pCiAgICAgKiBjbGFzcyBBcHBDb21wb25lbnQgewogICAgICogICBjb3VudGVyID0gMDsKICAgICAqIFxASG9zdExpc3RlbmVyKCd3aW5kb3c6a2V5ZG93bicsIFsnJGV2ZW50J10pCiAgICAgKiAgIGhhbmRsZUtleURvd24oZXZlbnQ6IEtleWJvYXJkRXZlbnQpIHsKICAgICAqICAgICB0aGlzLmNvdW50ZXIrKzsKICAgICAqICAgfQogICAgICogICByZXNldENvdW50ZXIoKSB7CiAgICAgKiAgICAgdGhpcy5jb3VudGVyID0gMDsKICAgICAqICAgfQogICAgICogfQogICAgICogYGBgCiAgICAgKgogICAgICogXEBBbm5vdGF0aW9uCiAgICAgKiBcQHB1YmxpY0FwaQogICAg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IHJlZmxlY3RzIHRoZSBzdGF0ZSBvZiBydW5uaW5nIHtcQGxpbmsgQVBQX0lOSVRJQUxJWkVSfXMuCiAgICAgKgogICAgICogXEBwdWJsaWNBcGkKICAgICAqLwogICAgY2xhc3MgQXBwbGljYXRpb25Jbml0U3RhdHVzIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGFwcEluaXRzCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoYXBwSW5pdHMpIHsKICAgICAgICAgICAgdGhpcy5hcHBJbml0cyA9IGFwcEluaXRzOwogICAgICAgICAgICB0aGlzLmluaXRpYWxpemVkID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuZG9uZSA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLmRvbmVQcm9taXNlID0gbmV3IFByb21pc2UoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHJlcwogICAgICAgICAgICAgKiBAcGFyYW0gez99IHJlagogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHJlcywgcmVqKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLnJlc29sdmUgPSByZXM7CiAgICAgICAgICAgICAgICB0aGlzLnJlamVjdCA9IHJlajsKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBydW5Jbml0aWFsaXplcnMoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmluaXRpYWxpemVkKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBhc3luY0luaXRQcm9taXNlcyA9IFtdOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGNvbXBsZXRlID0gKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgKCgvKiogQHR5cGUgez99ICovICh0aGlzKSkpLmRvbmUgPSB0cnVlOwogICAgICAgICAgICAgICAgdGhpcy5yZXNvbHZlKCk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBpZiAodGhpcy5hcHBJbml0cykgewogICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB0aGlzLmFwcEluaXRzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGluaXRSZXN1bHQgPSB0aGlzLmFwcEluaXRzW2ldKCk7CiAgICAgICAgICAgICAgICAgICAgaWYgKGlzUHJvbWlzZSQxKGluaXRSZXN1bHQpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGFzeW5jSW5pdFByb21pc2VzLnB1c2goaW5pdFJlc3VsdCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIFByb21pc2UuYWxsKGFzeW5jSW5pdFByb21pc2VzKQogICAgICAgICAgICAgICAgLnRoZW4oKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgY29tcGxldGUoKTsKICAgICAgICAgICAgfSkpCiAgICAgICAgICAgICAgICAuY2F0Y2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGUKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGUgPT4gewogICAgICAgICAgICAgICAgdGhpcy5yZWplY3QoZSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgaWYgKGFzeW5jSW5pdFByb21pc2VzL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GNhbGxiYWNrOgogICAgICoKICAgICAqIGAoY29tcG9uZW50UmVmOiBDb21wb25lbnRSZWYpID0+IHZvaWRgLgogICAgICoKICAgICAqIFxAcHVibGljQXBpCiAgICAgKiBAdHlwZSB7P30KICAgICAqLwogICAgY29uc3QgQVBQX0JPT1RTVFJBUF9MSVNURU5FUiA9IG5ldyBJbmplY3Rpb25Ub2tlbignYXBwQm9vdHN0cmFwTGlzdGVuZXInKTsKICAgIC8qKgogICAgICogQSB0b2tlbiB3aGljaCBpbmRpY2F0ZXMgdGhlIHJvb3QgZGlyZWN0b3J5IG9mIHRoZSBhcHBsaWNhdGlvbgogICAgICogXEBwdWJsaWNBcGkKICAgICAqIEB0eXBlIHs/fQogICAgICovCiAgICBjb25zdCBQQUNLQUdFX1JPT1RfVVJMID0gbmV3IEluamVjdGlvblRva2VuKCdBcHBsaWNhdGlvbiBQYWNrYWdlcyBSb290IFVSTCcpOwoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogcGFja2FnZXMvY29yZS9zcmMvY29uc29sZS50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICBjbGFzcyBDb25zb2xlIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IG1lc3NhZ2UKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGxvZyhtZXNzYWdlKSB7CiAgICAgICAgICAgIC8vIHRzbGludDpkaXNhYmxlLW5leHQtbGluZTpuby1jb25zb2xlCiAgICAgICAgICAgIGNvbnNvbGUubG9nKG1lc3NhZ2UpOwogICAgICAgIH0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1bGVGYWN0b3J5ID0gbmdNb2R1bGVGYWN0b3J5OwogICAgICAgICAgICB0aGlzLmNvbXBvbmVudEZhY3RvcmllcyA9IGNvbXBvbmVudEZhY3RvcmllczsKICAgICAgICB9CiAgICB9CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBDb21waWxlcl9jb21waWxlTW9kdWxlU3luY19fUE9TVF9SM19fID0gKC8qKgogICAgICogQHRlbXBsYXRlIFQKICAgICAqIEBwYXJhbSB7P30gbW9kdWxlVHlwZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gKG1vZHVsZVR5cGUpIHsKICAgICAgICByZXR1cm4gbmV3IE5nTW9kdWxlRmFjdG9yeSQxKG1vZHVsZVR5cGUpOwogICAgfSk7CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBDb21waWxlcl9jb21waWxlTW9kdWxlU3luYyA9IENvbXBpbGVyX2NvbXBpbGVNb2R1bGVTeW5jX19QT1NUX1IzX187CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBDb21waWxlcl9jb21waWxlTW9kdWxlQXN5bmNfX1BPU1RfUjNfXyA9ICgvKioKICAgICAqIEB0ZW1wbGF0ZSBUCiAgICAgKiBAcGFyYW0gez99IG1vZHVsZVR5cGUKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIChtb2R1bGVUeXBlKSB7CiAgICAgICAgcmV0dXJuIFByb21pc2UucmVzb2x2ZShDb21waWxlcl9jb21waWxlTW9kdWxlU3luY19fUE9TVF9SM19fKG1vZHVsZVR5cGUpKTsKICAgIH0pOwogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgQ29tcGlsZXJfY29tcGlsZU1vZHVsZUFzeW5jID0gQ29tcGlsZXJfY29tcGlsZU1vZHVsZUFzeW5jX19QT1NUX1IzX187CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBDb21waWxlcl9jb21waWxlTW9kdWxlQW5kQWxsQ29tcG9uZW50c1N5bmNfX1BPU1RfUjNfXyA9ICgvKioKICAgICAqIEB0ZW1wbGF0ZSBUCiAgICAgKiBAcGFyYW0gez99IG1vZHVsZVR5cGUKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIChtb2R1bGVUeXBlKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IG5nTW9kdWxlRmFjdG9yeSA9IENvbXBpbGVyX2NvbXBpbGVNb2R1bGVTeW5jX19QT1NUX1IzX18obW9kdWxlVHlwZSk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IG1vZHVsZURlZiA9ICgvKiogQHR5cGUgez99ICovIChnZXROZ01vZHVsZURlZihtb2R1bGVUeXBlKSkpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBjb21wb25lbnRGYWN0b3JpZXMgPSBtYXliZVVud3JhcEZuKG1vZHVsZURlZi5kZWNsYXJhdGlvbnMpCiAgICAgICAgICAgIC5yZWR1Y2UoKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZmFjdG9yaWVzCiAgICAgICAgICogQHBhcmFtIHs/fSBkZWNsYXJhdGlvbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgKGZhY3RvcmllcywgZGVjbGFyYXRpb24pID0+IHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjb21wb25lbnREZWYgPSBnZXRDb21wb25lbnREZWYoZGVjbGFyYXRpb24pOwogICAgICAgICAgICBjb21wb25lbnREZWYgJiYgZmFjdG9yaWVzLnB1c2gobmV3IENvbXBvbmVudEZhY3RvcnkkMShjb21wb25lbnREZWYpKTsKICAgICAgICAgICAgcmV0dXJuIGZhY3RvcmllczsKICAgICAgICB9KSwgKC8qKiBAdHlwZSB7P30gKi8gKFtdKSkpOwog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VuZGVyIGEgQ29tcG9uZW50IGluc3RhbmNlLgogICAgICoKICAgICAqIEVhY2ggYFxATmdNb2R1bGVgIHByb3ZpZGVzIGFuIG93biBgQ29tcGlsZXJgIHRvIGl0cyBpbmplY3RvciwKICAgICAqIHRoYXQgd2lsbCB1c2UgdGhlIGRpcmVjdGl2ZXMvcGlwZXMgb2YgdGhlIG5nIG1vZHVsZSBmb3IgY29tcGlsYXRpb24KICAgICAqIG9mIGNvbXBvbmVudHMuCiAgICAgKgogICAgICogXEBwdWJsaWNBcGkKICAgICAqLwogICAgY2xhc3MgQ29tcGlsZXIgewogICAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQ29tcGlsZXMgdGhlIGdpdmVuIE5nTW9kdWxlIGFuZCBhbGwgb2YgaXRzIGNvbXBvbmVudHMuIEFsbCB0ZW1wbGF0ZXMgb2YgdGhlIGNvbXBvbmVudHMgbGlzdGVkCiAgICAgICAgICAgICAqIGluIGBlbnRyeUNvbXBvbmVudHNgIGhhdmUgdG8gYmUgaW5saW5lZC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuY29tcGlsZU1vZHVsZVN5bmMgPSBDb21waWxlcl9jb21waWxlTW9kdWxlU3luYzsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIENvbXBpbGVzIHRoZSBnaXZlbiBOZ01vZHVsZSBhbmQgYWxsIG9mIGl0cyBjb21wb25lbnRzCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmNvbXBpbGVNb2R1bGVBc3luYyA9IENvbXBpbGVyX2NvbXBpbGVNb2R1bGVBc3luYzsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFNhbWUgYXMge1xAbGluayAjY29tcGlsZU1vZHVsZVN5bmN9IGJ1dCBhbHNvIGNyZWF0ZXMgQ29tcG9uZW50RmFjdG9yaWVzIGZvciBhbGwgY29tcG9uZW50cy4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuY29tcGlsZU1vZHVsZUFuZEFsbENvbXBvbmVudHNTeW5jID0gQ29tcGlsZXJfY29tcGlsZU1vZHVsZUFuZEFsbENvbXBvbmVudHNTeW5jOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogU2FtZSBhcyB7XEBsaW5rICNjb21waWxlTW9kdWxlQXN5bmN9IGJ1dCBhbHNvIGNyZWF0ZXMgQ29tcG9uZW50RmFjdG9yaWVzIGZvciBhbGwgY29tcG9uZW50cy4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuY29tcGlsZU1vZHVsZUFuZEFsbENvbXBvbmVudHNBc3luYyA9IENvbXBpbGVyX2NvbXBpbGVNb2R1bGVBbmRBbGxDb21wb25lbnRzQXN5bmM7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENsZWFycyBhbGwgY2FjaGVzLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgY2xlYXJDYWNoZSgpIHsgfQogICAgICAgIC8qKgogICAgICAgICAqIENsZWFycyB0aGUgY2FjaGUgZm9yIHRoZSBnaXZlbiBjb21wb25lbnQvbmdNb2R1bGUuCiAgICAgICAgICogQHBhcmFtIHs/fSB0eXBlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBjbGVhckNhY2hlRm9yKHR5cGUpIHsgfQogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgdGhlIGlkIGZvciBhIGdpdmVuIE5nTW9kdWxlLCBpZiBvbmUgaXMgZGVmaW5lZCBhbmQga25vd24gdG8gdGhlIGNvbXBpbGVyLgogICAgICAgICAqIEBwYXJhbSB7P30gbW9kdWxlVHlwZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0TW9kdWxlSWQobW9kdWxlVHlwZSkgewogICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkOwogICAgICAgIH0KICAgIH0KICAgIEN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AqICAgICB0aGlzLmxhYmVsID0gJ2luc2lkZSc7CiAgICAgKiAgICAgdGhpcy5wcm9ncmVzcyA9IDA7CiAgICAgKiAgICAgdGhpcy5faW5jcmVhc2VQcm9ncmVzcygoKSA9PiBjb25zb2xlLmxvZygnSW5zaWRlIERvbmUhJykpOwogICAgICogICB9CiAgICAgKgogICAgICogICAvLyBMb29wIG91dHNpZGUgb2YgdGhlIEFuZ3VsYXIgem9uZQogICAgICogICAvLyBzbyB0aGUgVUkgRE9FUyBOT1QgcmVmcmVzaCBhZnRlciBlYWNoIHNldFRpbWVvdXQgY3ljbGUKICAgICAqICAgcHJvY2Vzc091dHNpZGVPZkFuZ3VsYXJab25lKCkgewogICAgICogICAgIHRoaXMubGFiZWwgPSAnb3V0c2lkZSc7CiAgICAgKiAgICAgdGhpcy5wcm9ncmVzcyA9IDA7CiAgICAgKiAgICAgdGhpcy5fbmdab25lLnJ1bk91dHNpZGVBbmd1bGFyKCgpID0+IHsKICAgICAqICAgICAgIHRoaXMuX2luY3JlYXNlUHJvZ3Jlc3MoKCkgPT4gewogICAgICogICAgICAgICAvLyByZWVudGVyIHRoZSBBbmd1bGFyIHpvbmUgYW5kIGRpc3BsYXkgZG9uZQogICAgICogICAgICAgICB0aGlzLl9uZ1pvbmUucnVuKCgpID0+IHsgY29uc29sZS5sb2coJ091dHNpZGUgRG9uZSEnKTsgfSk7CiAgICAgKiAgICAgICB9KTsKICAgICAqICAgICB9KTsKICAgICAqICAgfQogICAgICoKICAgICAqICAgX2luY3JlYXNlUHJvZ3Jlc3MoZG9uZUNhbGxiYWNrOiAoKSA9PiB2b2lkKSB7CiAgICAgKiAgICAgdGhpcy5wcm9ncmVzcyArPSAxOwogICAgICogICAgIGNvbnNvbGUubG9nKGBDdXJyZW50IHByb2dyZXNzOiAke3RoaXMucHJvZ3Jlc3N9JWApOwogICAgICoKICAgICAqICAgICBpZiAodGhpcy5wcm9ncmVzcyA8IDEwMCkgewogICAgICogICAgICAgd2luZG93LnNldFRpbWVvdXQoKCkgPT4gdGhpcy5faW5jcmVhc2VQcm9ncmVzcyhkb25lQ2FsbGJhY2spLCAxMCk7CiAgICAgKiAgICAgfSBlbHNlIHsKICAgICAqICAgICAgIGRvbmVDYWxsYmFjaygpOwogICAgICogICAgIH0KICAgICAqICAgfQogICAgICogfQogICAgICogYGBgCiAgICAgKgogICAgICogXEBwdWJsaWNBcGkKICAgICAqLwogICAgY2xhc3MgTmdab25lIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKHsgZW5hYmxlTG9uZ1N0YWNrVHJhY2UgPSBmYWxzZSwgc2hvdWxkQ29hbGVzY2VFdmVudENoYW5nZURldGVjdGlvbiA9IGZhbHNlIH0pIHsKICAgICAgICAgICAgdGhpcy5oYXNQZW5kaW5nTWFjcm90YXNrcyA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLmhhc1BlbmRpbmdNaWNyb3Rhc2tzID0gZmFsc2U7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBXaGV0aGVyIHRoZXJlIGFyZSBubyBvdXRzdGFuZGluZyBtaWNyb3Rhc2tzIG9yIG1hY3JvdGFza3MuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmlzU3RhYmxlID0gdHJ1ZTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIE5vdGlmaWVzIHdoZW4gY29kZSBlbnRlcnMgQW5ndWxhciBab25lLiBUaGlzIGdldHMgZmlyZWQgZmlyc3Qgb24gVk0gVHVybi4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMub25VbnN0YWJsZSA9IG5ldyBFdmVudEVtaXR0ZXIoZmFsc2UpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogTm90aWZpZXMgd2hlbiB0aGVyZSBpcyBubyBtb3JlIG1pY3JvdGFza3MgZW5xdWV1ZWQgaW4gdGhlIGN1cnJlbnQgVk0gVHVybi4KICAgICAgICAgICAgICogVGhpcyBpcyBhIGhpbnQgZm9yIEFuZ3VsYXIgdG8gZG8gY2hhbmdlIGRldGVjdGlvbiwgd2hpY2ggbWF5IGVucXVldWUgbW9yZSBtaWNyb3Rhc2tzLgogICAgICAgICAgICAgKiBGb3IgdGhpcyByZWFzb24gdGhpcyBldmVudCBjYW4gZmlyZSBtdWx0aXBsZSB0aW1lcyBwZXIgVk0gVHVybi4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMub25NaWNyb3Rhc2tFbXB0eSA9IG5ldyBFdmVudEVtaXR0ZXIoZmFsc2UpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogTm90aWZpZXMgd2hlbiB0aGUgbGFzdCBgb25NaWNyb3Rhc2tFbXB0eWAgaGFzIHJ1biBhbmQgdGhlcmUgYXJlIG5vIG1vcmUgbWljcm90YXNrcywgd2hpY2gKICAgICAgICAgICAgICogaW1wbGllcyB3ZSBhcmUgYWJvdXQgdG8gcmVsaW5xdWlzaCBWTSB0dXJuLgogICAgICAgICAgICAgKiBUaGlzIGV2ZW50IGdldHMgY2FsbGVkIGp1c3Qgb25jZS4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMub25TdGFibGUgPSBuZXcgRXZlbnRFbWl0dGVyKGZhbHNlKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIE5vdGlmaWVzIHRoYXQgYW4gZXJyb3IgaGFzIGJlZW4gZGVsaXZlcmVkLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5vbkVycm9yID0gbmV3IEV2ZW50RW1pdHRlcihmYWxzZSk7CiAgICAgICAgICAgIGlmICh0eXBlb2YgWm9uZSA9PSAndW5kZWZpbmVkJykgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBJbiB0aGlzIGNvbmZpZ3VyYXRpb24gQW5ndWxhciByZXF1aXJlcyBab25lLmpzYCk7CiAgICAgICAgICAgIH0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xkQ29hbGVzY2VFdmVudENoYW5nZURldGVjdGlvbiA9IHNob3VsZENvYWxlc2NlRXZlbnRDaGFuZ2VEZXRlY3Rpb247CiAgICAgICAgICAgIHNlbGYubGFzdFJlcXVlc3RBbmltYXRpb25GcmFtZUlkID0gLTE7CiAgICAgICAgICAgIHNlbGYubmF0aXZlUmVxdWVzdEFuaW1hdGlvbkZyYW1lID0gZ2V0TmF0aXZlUmVxdWVzdEFuaW1hdGlvbkZyYW1lKCkubmF0aXZlUmVxdWVzdEFuaW1hdGlvbkZyYW1lOwogICAgICAgICAgICBmb3JrSW5uZXJab25lV2l0aEFuZ3VsYXJCZWhhdmlvcihzZWxmKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzdGF0aWMgaXNJbkFuZ3VsYXJab25lKCkgewogICAgICAgICAgICByZXR1cm4gWm9uZS5jdXJyZW50LmdldCgnaXNBbmd1bGFyWm9uZScpID09PSB0cnVlOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHN0YXRpYyBhc3NlcnRJbkFuZ3VsYXJab25lKCkgewogICAgICAgICAgICBpZiAoIU5nWm9uZS5pc0luQW5ndWxhclpvbmUoKSkgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdFeHBlY3RlZCB0byBiZSBpbiBBbmd1bGFyIFpvbmUsIGJ1dCBpdCBpcyBub3QhJyk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzdGF0aWMgYXNzZXJ0Tm90SW5Bbmd1bGFyWm9uZSgpIHsKICAgICAgICAgICAgaWYgKE5nWm9uZS5pc0luQW5ndWxhclpvbmUoKSkgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdFeHBlY3RlZCB0byB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s/PX0gYXBwbHlUaGlzCiAgICAgICAgICogQHBhcmFtIHs/PX0gYXBwbHlBcmdzCiAgICAgICAgICogQHBhcmFtIHs/PX0gbmFtZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcnVuVGFzayhmbiwgYXBwbHlUaGlzLCBhcHBseUFyZ3MsIG5hbWUpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB6b25lID0gKCgvKiogQHR5cGUgez99ICovICgoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpKSkpLl9pbm5lcjsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB0YXNrID0gem9uZS5zY2hlZHVsZUV2ZW50VGFzaygnTmdab25lRXZlbnQ6ICcgKyBuYW1lLCBmbiwgRU1QVFlfUEFZTE9BRCwgbm9vcCQxLCBub29wJDEpOwogICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovICh6b25lLnJ1blRhc2sodGFzaywgYXBwbHlUaGlzLCBhcHBseUFyZ3MpKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZmluYWxseSB7CiAgICAgICAgICAgICAgICB6b25lLmNhbmNlbFRhc2sodGFzayk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU2FtZSBhcyBgcnVuYCwgZXhjZXB0IHRoYXQgc3luY2hyb25vdXMgZXJyb3JzIGFyZSBjYXVnaHQgYW5kIGZvcndhcmRlZCB2aWEgYG9uRXJyb3JgIGFuZCBub3QKICAgICAgICAgKiByZXRocm93bi4KICAgICAgICAgKiBAdGVtcGxhdGUgVAogICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgKiBAcGFyYW0gez89fSBhcHBseVRoaXMKICAgICAgICAgKiBAcGFyYW0gez89fSBhcHBseUFyZ3MKICAgICAgICAgK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aGF0IHVwZGF0ZXMgdGhlIGFwcGxpY2F0aW9uIG1vZGVsLgogICAgICAgICAqIEB0ZW1wbGF0ZSBUCiAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcnVuT3V0c2lkZUFuZ3VsYXIoZm4pIHsKICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovICgoKC8qKiBAdHlwZSB7P30gKi8gKCgvKiogQHR5cGUgez99ICovICh0aGlzKSkpKSkuX291dGVyLnJ1bihmbikpKTsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIG5vb3AkMSgpIHsgfQogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgRU1QVFlfUEFZTE9BRCA9IHt9OwogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHpvbmUKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGNoZWNrU3RhYmxlKHpvbmUpIHsKICAgICAgICBpZiAoem9uZS5fbmVzdGluZyA9PSAwICYmICF6b25lLmhhc1BlbmRpbmdNaWNyb3Rhc2tzICYmICF6b25lLmlzU3RhYmxlKSB7CiAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICB6b25lLl9uZXN0aW5nKys7CiAgICAgICAgICAgICAgICB6b25lLm9uTWljcm90YXNrRW1wdHkuZW1pdChudWxsKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBmaW5hbGx5IHsKICAgICAgICAgICAgICAgIHpvbmUuX25lc3RpbmctLTsKICAgICAgICAgICAgICAgIGlmICghem9uZS5oYXNQZW5kaW5nTWljcm90YXNrcykgewogICAgICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHpvbmUucnVuT3V0c2lkZUFuZ3VsYXIoKC8qKgogICAgICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAgICAgKCkgPT4gem9uZS5vblN0YWJsZS5lbWl0KG51bGwpKSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGZpbmFsbHkgewogICAgICAgICAgICAgICAgICAgICAgICB6b25lLmlzU3RhYmxlID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gem9uZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZGVsYXlDaGFuZ2VEZXRlY3Rpb25Gb3JFdmVudHMoem9uZSkgewogICAgICAgIGlmICh6b25lLmxhc3RSZXF1ZXN0QW5pbWF0aW9uRnJhbWVJZCAhPT0gLTEpIHsKICAgICAgICAgICAgcmV0dXJuOwogICAgICAgIH0KICAgICAgICB6b25lLmxhc3RSZXF1ZXN0QW5pbWF0aW9uRnJhbWVJZCA9IHpvbmUubmF0aXZlUmVxdWVzdEFuaW1hdGlvbkZyYW1lLmNhbGwoX2dsb2JhbCwgKC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgKCkgPT4gewogICAgICAgICAgICB6b25lLmxhc3RSZXF1ZXN0QW5pbWF0aW9uRnJhbWVJZCA9IC0xOwogICAgICAgICAgICB1cGRhdGVNaWNyb1Rhc2tTdGF0dXMoem9uZSk7CiAgICAgICAgICAgIGNoZWNrU3RhYmxlKHpvbmUpOwogICAgICAgIH0pKTsKICAgICAgICB1cGRhdGVNaWNyb1Rhc2tTdGF0dXMoem9uZSk7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gem9uZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZm9ya0lubmVyWm9uZVdpdGhBbmd1bGFyQmVoYXZpb3Ioem9uZSkgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBkZWxheUNoYW5nZURldGVjdGlvbkZvckV2ZW50c0RlbGVnYXRlID0gKC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgKCkgPT4gewogICAgICAgICAgICBkZWxheUNoYW5nZURldGVjdGlvbkZvckV2ZW50cyh6b25lKTsKICAgICAgICB9KTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgbWF5YmVEZWxheUNoYW5nZURldGVjdGlvbiA9ICEhem9uZS5zaG91bGRDb2FsZXNjZUV2ZW50Q2hhbmdlRGV0ZWN0aW9uICYmCiAgICAgICAgICAgIHpvbmUubmF0aXZlUmVxdWVzdEFuaW1hdGlvbkZyYW1lICYmIGRlbGF5Q2hhbmdlRGV0ZWN0aW9uRm9yRXZlbnRzRGVsZWdhdGU7CiAgICAgICAgem9uZS5faW5uZXIgPSB6b25lLl9pbm5lci5mb3JrKHsKICAgICAgICAgICAgbmFtZTogJ2FuZ3VsYXInLAogICAgICAgICAgICBwcm9wZXJ0aWVzOiAoLyoqIEB0eXBlIHs/fSAqLyAoeyAnaXNBbmd1bGFyWm9uZSc6IHRydWUsICdtYXliZURlbGF5Q2hhbmdlRGV0ZWN0aW9uJzogbWF5YmVEZWxheUNoYW5nZURldGVjdGlvbiB9KSksCiAgICAgICAgICAgIG9uSW52b2tlVGFzazogKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGRlbGVnYXRlCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY3VycmVudAogICAgICAgICAgICAgKiBAcGFyYW0gez99IHRhcmdldAogICAgICAgICAgICAgKiBAcGFyYW0gez99IHRhc2sKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBhcHBseVRoaXMKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBhcHBseUFyZ3MKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChkZWxlZ2F0ZSwgY3VycmVudCwgdGFyZ2V0LCB0YXNrLCBhcHBseVRoaXMsIGFwcGx5QXJncykgPT4gewogICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICBvbkVudGVyKHpvbmUpOwogICAgICAgICAgICAgICAgICAgIHJldHVybiBkZWxlZ2F0ZS5pbnZva2VUYXNrKHRhcmdldCwgdGFzaywgYXBwbHlUaGlzLCBhcHBseUFyZ3MpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZmluYWxseSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKG1heWJlRGVsYXlDaGFuZ2VEZXRlY3Rpb24gJiYgdGFzay50eXBlID09PSAnZXZlbnRUYXNrJykgewogICAgICAgICAgICAgICAgICAgICAgICBtYXliZURlbGF5Q2hhbmdlRGV0ZWN0aW9uKCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIG9uTGVhdmUoem9uZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pLAogICAgICAgICAgICBvbkludm9rZTogKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGRlbGVnYXRlCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY3VycmVudAogICAgICAgICAgICAgKiBAcGFyYW0gez99IHRhcmdldAogICAgICAgICAgICAgKiBAcGFyYW0gez99IGNhbGxiYWNrCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gYXBwbHlUaGlzCiAgICAgICAgICAgICAqIEBwYXJhbSB7Pz19IGFwcGx5QXJncwogICAgICAgICAgICAgKiBAcGFyYW0gez89fSBzb3VyY2UKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChkZWxlZ2F0ZSwgY3VycmVudCwgdGFyZ2V0LCBjYWxsYmFjaywgYXBwbHlUaGlzLCBhcHBseUFyZ3MsIHNvdXJjZSkgPT4gewogICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICBvbkVudGVyKHpvbmUpOwogICAgICAgICAgICAgICAgICAgIHJldHVybiBkZWxlZ2F0ZS5pbnZva2UodGFyZ2V0LCBjYWxsYmFjaywgYXBwbHlUaGlzLCBhcHBseUFyZ3MsIHNvdXJjZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmaW5hbGx5IHsKICAgICAgICAgICAgICAgICAgICBvbkxlYXZlKHpvbmUpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSwKICAgICAgICAgICAgb25IYXNUYXNrOiAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZGVsZWdhdGUKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjdXJyZW50CiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdGFyZ2V0CiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gaGFzVGFza1N0YXRlCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoZGVsZWdhdGUsIGN1cnJlbnQsIHRhcmdldCwgaGFzVGFza1N0YXRlKSA9PiB7CiAgICAgICAgICAgICAgICBkZWxlZ2F0ZS5oYXNUYXNrKHRhcmdldCwgaGFzVGFza1N0YXRlKTsKICAgICAgICAgICAgICAgIGlmIChjdXJyZW50ID09PSB0YXJnZXQpIHsKICAgICAgICAgICAgICAgICAgICAvLyBXZSBhcmUgb25seSBpbnRlcmVzdGVkIGluIGhhc1Rhc2sgZXZlbnRzIHdoaWNoIG9yaWdpbmF0ZSBmcm9tIG91ciB6b25lCiAgICAgICAgICAgICAgICAgICAgLy8gKEEgY2hpbGQgaGFzVGFzayBldmVudCBpcyBub3QgaW50ZXJlc3RpbmcgdG8gdXMpCiAgICAgICAgICAgICAgICAgICAgaWYgKGhhc1Rhc2tTdGF0ZS5jaGFuZ2UgPT0gJ21pY3JvVGFzaycpIHsKICAgICAgICAgICAgICAgICAgICAgICAgem9uZS5faGFzUGVuZGluZ01pY3JvdGFza3MgPSBoYXNUYXNrU3RhdGUubWljcm9UYXNrOwogICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVNaWNyb1Rhc2tTdGF0dXMoem9uZSk7CiAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrU3RhYmxlKHpvbmUpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChoYXNUYXNrU3RhdGUuY2hhbmdlID09ICdtYWNyb1Rhc2snKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHpvbmUuaGFzUGVuZGluZ01hY3JvdGFza3MgPSBoYXNUYXNrU3RhdGUubWFjcm9UYXNrOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSksCiAgICAgICAgICAgIG9uSGFuZGxlRXJyb3I6ICgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBkZWxlZ2F0ZQogICAgICAgICAgICAgKiBAcGFyYW0gez99IGN1cnJlbnQKICAgICAgICAgICAgICogQHBhcmFtIHs/fSB0YXJnZXQKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBlcnJvcgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGRlbGVnYXRlLCBjdXJyZW50LCB0YXJnZXQsIGVycm9yKSA9PiB7CiAgICAgICAgICAgICAgICBkZWxlZ2F0ZS5oYW5kbGVFcnJvcih0YXJnZXQsIGVycm9yKTsKICAgICAgICAgICAgICAgIHpvbmUucnVuT3V0c2lkZUFuZ3VsYXIoKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gem9uZS5vbkVycm9yLmVtaXQoZXJyb3IpKSk7CiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgIH0pCiAgICAgICAgfSk7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gem9uZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gdXBkYXRlTWljcm9UYXNrU3RhdHVzKHpvbmUpIHsKICAgICAgICBpZiAoem9uZS5faGFzUGVuZGluZ01pY3JvdGFza3MgfHwKICAgICAgICAgICAgKHpvbmUuc2hvdWxkQ29hbGVzY2VFdmVudENoYW5nZURldGVjdGlvbiAmJiB6b25lLmxhc3RSZXF1ZXN0QW5pbWF0aW9uRnJhbWVJZCAhPT0gLTEpKSB7CiAgICAgICAgICAgIHpvbmUuaGFzUGVuZGluZ01pY3JvdGFza3MgPSB0cnVlOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgem9uZS5oYXNQZW5kaW5nTWljcm90YXNrcyA9IGZhbHNlOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB6b25lCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBvbkVudGVyKHpvbmUpIHsKICAgICAgICB6b25lLl9uZXN0aW5nKys7CiAgICAgICAgaWYgKHpvbmUuaXNTdGFibGUpIHsKICAgICAgICAgICAgem9uZS5pc1N0YWJsZSA9IGZhbHNlOwogICAgICAgICAgICB6b25lLm9uVW5zdGFibGUuZW1pdChudWxsKTsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gem9uZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gb25MZWF2ZSh6b25lKSB7CiAgICAgICAgem9uZS5fbmVzdGluZy0tOwogICAgICAgIGNoZWNrU3RhYmxlKHpvbmUpOwogICAgfQogICAgLyoqCiAgICAgKiBQcm92aWRlcyBhIG5vb3AgaW1wbGVtZW50YXRpb24gb2YgYE5nWm9uZWAgd2hpY2ggZG9lcyBub3RoaW5nLiBUaGlzIHpvbmUgcmVxdWlyZXMgZXhwbGljaXQgY2FsbHMKICAgICAqIHRvIGZyYW1ld29yayB0byBwZXJmb3JtIHJlbmRlcmluZy4KICAgICAqLwogICAgY2xhc3MgTm9vcE5nWm9uZSB7CiAgICAgICAgY29uc3RydWN0b3IoKSB7CiAgICAgICAgICAgIHRoaXMuaGFzUGVuZGluZ01pY3JvdGFza3MgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5oYXNQZW5kaW5nTWFjcm90YXNrcyA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLmlzU3RhYmxlID0gdHJ1ZTsKICAgICAgICAgICAgdGhpcy5vblVuc3RhYmxlID0gbmV3IEV2ZW50RW1pdHRlcigpOwogICAgICAgICAgICB0aGlzLm9uTWljcm90YXNrRW1wdHkgPSBuZXcgRXZlbnRFbWl0dGVyKCk7CiAgICAgICAgICAgIHRoaXMub25TdGFibGUgPSBuZXcgRXZlbnRFbWl0dGVyKCk7CiAgICAgICAgICAgIHRoaXMub25FcnJvciA9IG5ldyBFdmVudEVtaXR0ZXIoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAqIEBwYXJhbSB7Pz19IGFwcGx5VGhpcwogICAgICAgICAqIEBwYXJhbSB7Pz19IGFwcGx5QXJncwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcnVuKGZuLCBhcHBseVRoaXMsIGFwcGx5QXJncykgewogICAgICAgICAgICByZXR1cm4gZm4uYXBwbHkoYXBwbHlUaGlzLCBhcHBseUFyZ3MpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGZuCiAgICAgICAgICogQHBhcmFtIHs/PX0gYXBwbHlUaGlzCiAgICAgICAgICogQHBhcmFtIHs/PX0gYXBwbHlBcmdzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBydW5HdWFyZGVkKGZuLCBhcHBseVRoaXMsIGFwcGx5QXJncykgewogICAgICAgICAgICByZXR1cm4gZm4uYXBwbHkoYXBwbHlUaGlzLCBhcHBseUFyZ3MpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGZuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBydW5PdXRzaWRlQW5ndWxhcihmbikgewogICAgICAgICAgICByZXR1cm4gZm4oKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAqIEBwYXJhbSB7Pz19IGFwcGx5VGhpcwogICAgICAgICAqIEBwYXJhbSB7Pz19IGFwcGx5QXJncwogICAgICAgICAqIEBwYXJhbSB7Pz19IG5hbWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJ1blRhc2soZm4sIGFwcGx5VGhpcywgYXBwbHlBcmdzLCBuYW1lKSB7CiAgICAgICAgICAgIHJldHVybiBmbi5hcHBseShhcHBseVRoaXMsIGFwcGx5QXJncyk7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBUaGUgVGVzdGFiaWxpdHkgc2VydmljZSBwcm92aWRlcyB0ZXN0aW5nIGhvb2tzIHRoYXQgY2FuIGJlIGFjY2Vzc2VkIGZyb20KICAgICAqIHRoZSBicm93c2VyIGFuZCBieSBzZXJ2aWNlcyBzdWNoIGFzIFByb3RyYWN0b3IuIEVhY2ggYm9vdHN0cmFwcGVkIEFuZ3VsYXIKICAgICAqIGFwcGxpY2F0aW9uIG9uIHRoZSBwYWdlIHdpbGwgaGF2ZSBhbiBpbnN0YW5jZSBvZiBUZXN0YWJpbGl0eS4KICAgICAqIFxAcHVibGljQXBpCiAgICAgKi8KICAgIGNsYXNzIFRlc3RhYmlsaXR5IHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IF9uZ1pvbmUKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3Rvcihfbmdab25lKSB7CiAgICAgICAgICAgIHRoaXMuX25nWm9uZSA9IF9uZ1pvbmU7CiAgICAgICAgICAgIHRoaXMuX3BlbmRpbmdDb3VudCA9IDA7CiAgICAgICAgICAgIHRoaXMuX2lzWm9uZVN0YWJsZSA9IHRydWU7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBXaGV0aGVyIGFueSB3b3JrIHdhcyBkb25lIHNpbmNlIHRoZSBsYXN0ICd3aGVuU3RhYmxlJyBjYWxsYmFjay4gVGhpcyBpcwogICAgICAgICAgICAgKiB1c2VmdWwgdG8gZGV0ZWN0IGlmIHRoaXMgY291bGQgaGF2ZSBwb3RlbnRpYWxseSBkZXN0YWJpbGl6ZWQgYW5vdGhlcgogICAgICAgICAgICAgKiBjb21wb25lbnQgd2hpbGUgaXQgaXMgc3RhYmlsaXppbmcuCiAgICAgICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX2RpZFdvcmsgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5fY2FsbGJhY2tzID0gW107CiAgICAgICAgICAgIHRoaXMudGFza1RyYWNraW5nWm9uZSA9IG51bGw7CiAgICAgICAgICAgIHRoaXMuX3dhdGNoQW5ndWxhckV2ZW50cygpOwogICAgICAgICAgICBfbmdab25lLnJ1bigoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLnRhc2tUcmFja2luZ1pvbmUgPQogICAgICAgICAgICAgICAgICAgIHR5cGVvZiBab25lID09ICd1bmRlZmluZWQnID8gbnVsbCA6IFpvbmUuY3VycmVudC5nZXQoJ1Rhc2tUcmFja2luZ1pvbmUnKTsKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3dhdGNoQW5ndWxhckV2ZW50cygpIHsKICAgICAgICAgICAgdGhpcy5fbmdab25lLm9uVW5zdGFibGUuc3Vic2NyaWJlKHsKICAgICAgICAgICAgICAgIG5leHQ6ICgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9kaWRXb3JrID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9pc1pvbmVTdGFibGUgPSBmYWxzZTsKICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgIH0pOwogICAgICAgICAgICB0aGlzLl9uZ1pvbmUucnVuT3V0c2lkZUFuZ3VsYXIoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgdGhpcy5fbmdab25lLm9uU3RhYmxlLnN1YnNjcmliZSh7CiAgICAgICAgICAgICAgICAgICAgbmV4dDogKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgICAgICAgICBOZ1pvbmUuYXNzZXJ0Tm90SW5Bbmd1bGFyWm9uZSgpOwogICAgICAgICAgICAgICAgICAgICAgICBzY2hlZHVsZU1pY3JvVGFzaygoLyoqCiAgICAgICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9pc1pvbmVTdGFibGUgPSB0cnVlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fcnVuQ2FsbGJhY2tzSWZSZWFkeSgpOwogICAgICAgICAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEluY3JlYXNlcyB0aGUgbnVtYmVyIG9mIHBlbmRpbmcgcmVxdWVzdAogICAgICAgICAqIEBkZXByZWNhdGVkIHBlbmRpbmcgcmVxdWVzdHMgYXJlIG5vdyB0cmFja2VkIHdpdGggem9uZXMuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBpbmNyZWFzZVBlbmRpbmdSZXF1ZXN0Q291bnQoKSB7CiAgICAgICAgICAgIHRoaXMuX3BlbmRpbmdDb3VudCArPSAxOwogICAgICAgICAgICB0aGlzLl9kaWRXb3JrID0gdHJ1ZTsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3BlbmRpbmdDb3VudDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogRGVjcmVhc2VzIHRoZSBudW1iZXIgb2YgcGVuZGluZyByZXF1ZXN0CiAgICAgICAgICogQGRlcHJlY2F0ZWQgcGVuZGluZyByZXF1ZXN0cyBhcmUgbm93IHRyYWNrZWQgd2l0aCB6b25lcwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZGVjcmVhc2VQZW5kaW5nUmVxdWVzdENvdW50KCkgewogICAgICAgICAgICB0aGlzLl9wZW5kaW5nQ291bnQgLT0gMTsKICAgICAgICAgICAgaWYgKHRoaXMuX3BlbmRpbmdDb3VudCA8IDApIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigncGVuZGluZyBhc3luYyByZXF1ZXN0cyBiZWxvdyB6ZXJvJyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fcnVuQ2FsbGJhY2tzSWZSZWFkeSgpOwogICAgICAgICAgICByZXR1cm4gdGhpcy5fcGVuZGluZ0NvdW50OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGV0aGVyIGFuIGFzc29jaWF0ZWQgYXBwbGljYXRpb24gaXMgc3RhYmxlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBpc1N0YWJsZSgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2lzWm9uZVN0YWJsZSAmJiB0aGlzLl9wZW5kaW5nQ291bnQgPT09IDAgJiYgIXRoaXMuX25nWm9uZS5oYXNQZW5kaW5nTWFjcm90YXNrczsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9ydW5DYWxsYmFja3NJZlJlYWR5KCkgewogICAgICAgICAgICBpZiAodGhpcy5pc1N0YWJsZSgpKSB7CiAgICAgICAgICAgICAgICAvLyBTY2hlZHVsZXMgdGhlIGNhbGwgYmFja3MgaW4gYSBuZXcgZnJhbWUgc28gdGhhdCBpdCBpcyBhbHdheXMgYXN5bmMuCiAgICAgICAgICAgICAgICBzY2hlZHVsZU1pY3JvVGFzaygoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKHRoaXMuX2NhbGxiYWNrcy5sZW5ndGggIT09IDApIHsKICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBsZXQgY2IgPSAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5fY2FsbGJhY2tzLnBvcCgpKSk7CiAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyVGltZW91dChjYi50aW1lb3V0SWQpOwogICAgICAgICAgICAgICAgICAgICAgICBjYi5kb25lQ2IodGhpcy5fZGlkV29yayk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHRoaXMuX2RpZFdvcmsgPSBmYWxzZTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIC8vIFN0aWxsIG5vdCBzdGFibGUsIHNlbmQgdXBkYXRlcy4KICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCBwZW5kaW5nID0gdGhpcy5nZXRQZW5kaW5nVGFza3MoKTsKICAgICAgICAgICAgICAgIHRoaXMuX2NhbGxiYWNrcyA9IHRoaXMuX2NhbGxiYWNrcy5maWx0ZXIoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjYgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKGNiKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgaWYgKGNiLnVwZGF0ZUNiICYmIGNiLnVwZGF0ZUNiKHBlbmRpbmcpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyVGltZW91dChjYi50aW1lb3V0SWQpOwogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgdGhpcy5fZGlkV29yayA9IHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldFBlbmRpbmdUYXNrcygpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLnRhc2tUcmFja2luZ1pvbmUpIHsKICAgICAgICAgICAgICAgIHJldHVybiBbXTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBDb3B5IHRoZSB0YXNrcyBkYXRhIHNvIHRoYXQgd2UgZG9uJ3QgbGVhayB0YXNrcy4KICAgICAgICAgICAgcmV0dXJuIHRoaXMudGFza1RyYWNraW5nWm9uZS5tYWNyb1Rhc2tzLm1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHQpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAgICAgc291cmNlOiB0LnNvdXJjZSwKICAgICAgICAgICAgICAgICAgICAvLyBGcm9tIFRhc2tUcmFja2luZ1pvbmU6CiAgICAgICAgICAgICAgICAgICAgLy8gaHR0cHM6Ly9naXRodWIuY29tL2FuZ3VsYXIvem9uZS5qcy9ibG9iL21hc3Rlci9saWIvem9uZS1zcGVjL3Rhc2stdHJhY2tpbmcudHMjTDQwCiAgICAgICAgICAgICAgICAgICAgY3JlYXRpb25Mb2NhdGlvbjogKC8qKiBAdHlwZSB7P30gKi8gKCgoLyoqIEB0eXBlIHs/fSAqLyAodCkpKS5jcmVhdGlvbkxvY2F0aW9uKSksCiAgICAgICAgICAgICAgICAgICAgZGF0YTogdC5kYXRhCiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBjYgogICAgICAgICAqIEBwYXJhbSB7Pz19IHRpbWVvdXQKICAgICAgICAgKiBAcGFyYW0gez89fSB1cGRhdGVDYgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYWRkQ2FsbGJhY2soY2IsIHRpbWVvdXQsIHVwZGF0ZUNiKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHRpbWVvdXRJZCA9IC0xOwogICAgICAgICAgICBpZiAodGltZW91dCAmJiB0aW1lb3V0ID4gMCkgewogICAgICAgICAgICAgICAgdGltZW91dElkID0gc2V0VGltZW91dCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fY2FsbGJhY2tzID0gdGhpcy5fY2FsbGJhY2tzLmZpbHRlcigoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjYgogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKGNiKSA9PiBjYi50aW1lb3V0SWQgIT09IHRpbWVvdXRJZCkpOwogICAgICAgICAgICAgICAgICAgIGNiKHRoaXMuX2RpZFdvcmssIHRoaXMuZ2V0UGVuZGluZ1Rhc2tzKCkpOwogICAgICAgICAgICAgICAgfSksIHRpbWVvdXQpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2NhbGxiYWNrcy5wdXNoKCgvKiogQHR5cGUgez99ICovICh7IGRvbmVDYjogY2IsIHRpbWVvdXRJZDogdGltZW91dElkLCB1cGRhdGVDYjogdXBkYXRlQ2IgfSkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogV2FpdCBmb3IgdGhlIGFwcGxpY2F0aW9uIHRvIGJlIHN0YWJsZSB3aXRoIGEgdGltZW91dC4gSWYgdGhlIHRpbWVvdXQgaXMgcmVhY2hlZCBiZWZvcmUgdGhhdAogICAgICAgICAqIGhhcHBlbnMsIHRoZSBjYWxsYmFjayByZWNlaXZlcyBhIGxpc3Qgb2YgdGhlIG1hY3JvIHRhc2tzIHRoYXQgd2VyZSBwZW5kaW5nLCBvdGhlcndpc2UgbnVsbC4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7P30gZG9uZUNiIFRoZS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WRlZD8nKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBUaGVzZSBhcmd1bWVudHMgYXJlICdGdW5jdGlvbicgYWJvdmUgdG8ga2VlcCB0aGUgcHVibGljIEFQSSBzaW1wbGUuCiAgICAgICAgICAgIHRoaXMuYWRkQ2FsbGJhY2soKC8qKiBAdHlwZSB7P30gKi8gKGRvbmVDYikpLCB0aW1lb3V0LCAoLyoqIEB0eXBlIHs/fSAqLyAodXBkYXRlQ2IpKSk7CiAgICAgICAgICAgIHRoaXMuX3J1bkNhbGxiYWNrc0lmUmVhZHkoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogR2V0IHRoZSBudW1iZXIgb2YgcGVuZGluZyByZXF1ZXN0cwogICAgICAgICAqIEBkZXByZWNhdGVkIHBlbmRpbmcgcmVxdWVzdHMgYXJlIG5vdyB0cmFja2VkIHdpdGggem9uZXMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldFBlbmRpbmdSZXF1ZXN0Q291bnQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9wZW5kaW5nQ291bnQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEZpbmQgcHJvdmlkZXJzIGJ5IG5hbWUKICAgICAgICAgKiBAcGFyYW0gez99IHVzaW5nIFRoZSByb290IGVsZW1lbnQgdG8gc2VhcmNoIGZyb20KICAgICAgICAgKiBAcGFyYW0gez99IHByb3ZpZGVyIFRoZSBuYW1lIG9mIGJpbmRpbmcgdmFyaWFibGUKICAgICAgICAgKiBAcGFyYW0gez99IGV4YWN0TWF0Y2ggV2hldGhlciB1c2luZyBleGFjdE1hdGNoCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmaW5kUHJvdmlkZXJzKHVzaW5nLCBwcm92aWRlciwgZXhhY3RNYXRjaCkgewogICAgICAgICAgICAvLyBUT0RPKGp1bGllbXIpOiBpbXBsZW1lbnQ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sZW1lbnQKICAgICAgICAgKiBAcGFyYW0gez99IHRlc3RhYmlsaXR5IFRlc3RhYmlsaXR5IGhvb2sKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlZ2lzdGVyQXBwbGljYXRpb24odG9rZW4sIHRlc3RhYmlsaXR5KSB7CiAgICAgICAgICAgIHRoaXMuX2FwcGxpY2F0aW9ucy5zZXQodG9rZW4sIHRlc3RhYmlsaXR5KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVW5yZWdpc3RlcnMgYW4gYXBwbGljYXRpb24uCiAgICAgICAgICogQHBhcmFtIHs/fSB0b2tlbiB0b2tlbiBvZiBhcHBsaWNhdGlvbiwgcm9vdCBlbGVtZW50CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB1bnJlZ2lzdGVyQXBwbGljYXRpb24odG9rZW4pIHsKICAgICAgICAgICAgdGhpcy5fYXBwbGljYXRpb25zLmRlbGV0ZSh0b2tlbik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFVucmVnaXN0ZXJzIGFsbCBhcHBsaWNhdGlvbnMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHVucmVnaXN0ZXJBbGxBcHBsaWNhdGlvbnMoKSB7CiAgICAgICAgICAgIHRoaXMuX2FwcGxpY2F0aW9ucy5jbGVhcigpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBHZXQgYSB0ZXN0YWJpbGl0eSBob29rIGFzc29jaWF0ZWQgd2l0aCB0aGUgYXBwbGljYXRpb24KICAgICAgICAgKiBAcGFyYW0gez99IGVsZW0gcm9vdCBlbGVtZW50CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXRUZXN0YWJpbGl0eShlbGVtKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9hcHBsaWNhdGlvbnMuZ2V0KGVsZW0pIHx8IG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEdldCBhbGwgcmVnaXN0ZXJlZCB0ZXN0YWJpbGl0aWVzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXRBbGxUZXN0YWJpbGl0aWVzKCkgewogICAgICAgICAgICByZXR1cm4gQXJyYXkuZnJvbSh0aGlzLl9hcHBsaWNhdGlvbnMudmFsdWVzKCkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBHZXQgYWxsIHJlZ2lzdGVyZWQgYXBwbGljYXRpb25zKHJvb3QgZWxlbWVudHMpCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXRBbGxSb290RWxlbWVudHMoKSB7CiAgICAgICAgICAgIHJldHVybiBBcnJheS5mcm9tKHRoaXMuX2FwcGxpY2F0aW9ucy5rZXlzKCkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBGaW5kIHRlc3RhYmlsaXR5IG9mIGEgbm9kZSBpbiB0aGUgVHJlZQogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbSBub2RlCiAgICAgICAgICogQHBhcmFtIHs/PX0gZmluZEluQW5jZXN0b3JzIHdoZXRoZXIgZmluZGluZyB0ZXN0YWJpbGl0eSBpbiBhbmNlc3RvcnMgaWYgdGVzdGFiaWxpdHkgd2FzIG5vdCBmb3VuZCBpbgogICAgICAgICAqIGN1cnJlbnQgbm9kZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZmluZFRlc3RhYmlsaXR5SW5UcmVlKGVsZW0sIGZpbmRJbkFuY2VzdG9ycyA9IHRydWUpIHsKICAgICAgICAgICAgcmV0dXJuIF90ZXN0YWJpbGl0eUdldHRlci5maW5kVGVzdGFiaWxpdHlJblRyZWUodGhpcywgZWxlbSwgZmluZEluQW5jZXN0b3JzKTsKICAgICAgICB9CiAgICB9CiAgICBUZXN0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NlcnROZ01vZHVsZVR5cGUobW9kdWxlVHlwZSk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGNvbXBpbGVyT3B0aW9ucyA9IGluamVjdG9yLmdldChDT01QSUxFUl9PUFRJT05TLCBbXSkuY29uY2F0KG9wdGlvbnMpOwogICAgICAgIGlmICh0eXBlb2YgbmdKaXRNb2RlID09PSAndW5kZWZpbmVkJyB8fCBuZ0ppdE1vZGUpIHsKICAgICAgICAgICAgLy8gQ29uZmlndXJlIHRoZSBjb21waWxlciB0byB1c2UgdGhlIHByb3ZpZGVkIG9wdGlvbnMuIFRoaXMgY2FsbCBtYXkgZmFpbCB3aGVuIG11bHRpcGxlIG1vZHVsZXMKICAgICAgICAgICAgLy8gYXJlIGJvb3RzdHJhcHBlZCB3aXRoIGluY29tcGF0aWJsZSBvcHRpb25zLCBhcyBhIGNvbXBvbmVudCBjYW4gb25seSBiZSBjb21waWxlZCBhY2NvcmRpbmcgdG8KICAgICAgICAgICAgLy8gYSBzaW5nbGUgc2V0IG9mIG9wdGlvbnMuCiAgICAgICAgICAgIHNldEppdE9wdGlvbnMoewogICAgICAgICAgICAgICAgZGVmYXVsdEVuY2Fwc3VsYXRpb246IF9sYXN0RGVmaW5lZChjb21waWxlck9wdGlvbnMubWFwKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gb3B0aW9ucwogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgb3B0aW9ucyA9PiBvcHRpb25zLmRlZmF1bHRFbmNhcHN1bGF0aW9uKSkpLAogICAgICAgICAgICAgICAgcHJlc2VydmVXaGl0ZXNwYWNlczogX2xhc3REZWZpbmVkKGNvbXBpbGVyT3B0aW9ucy5tYXAoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBvcHRpb25zCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBvcHRpb25zID0+IG9wdGlvbnMucHJlc2VydmVXaGl0ZXNwYWNlcykpKSwKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBtb2R1bGVGYWN0b3J5ID0gbmV3IE5nTW9kdWxlRmFjdG9yeSQxKG1vZHVsZVR5cGUpOwogICAgICAgIGlmIChpc0NvbXBvbmVudFJlc291cmNlUmVzb2x1dGlvblF1ZXVlRW1wdHkoKSkgewogICAgICAgICAgICByZXR1cm4gUHJvbWlzZS5yZXNvbHZlKG1vZHVsZUZhY3RvcnkpOwogICAgICAgIH0KICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgY29tcGlsZXJQcm92aWRlcnMgPSBfbWVyZ2VBcnJheXMoY29tcGlsZXJPcHRpb25zLm1hcCgoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBvCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvID0+ICgvKiogQHR5cGUgez99ICovIChvLnByb3ZpZGVycykpKSkpOwogICAgICAgIC8vIEluIGNhc2UgdGhlcmUgYXJlIG5vIGNvbXBpbGVyIHByb3ZpZGVycywgd2UganVzdCByZXR1cm4gdGhlIG1vZHVsZSBmYWN0b3J5IGFzCiAgICAgICAgLy8gdGhlcmUgd29uJ3QgYmUgYW55IHJlc291cmNlIGxvYWRlci4gVGhpcyBjYW4gaGFwcGVuIHdpdGggSXZ5LCBiZWNhdXNlIEFPVCBjb21waWxlZAogICAgICAgIC8vIG1vZHVsZXMgY2FuIGJlIHN0aWxsIHBhc3NlZCB0aHJvdWdoICJib290c3RyYXBNb2R1bGUiLiBJbiB0aGF0IGNhc2Ugd2Ugc2hvdWxkbid0CiAgICAgICAgLy8gdW5uZWNlc3NhcmlseSByZXF1aXJlIHRoZSBKSVQgY29tcGlsZXIuCiAgICAgICAgaWYgKGNvbXBpbGVyUHJvdmlkZXJzLmxlbmd0aCA9PT0gMCkgewogICAgICAgICAgICByZXR1cm4gUHJvbWlzZS5yZXNvbHZlKG1vZHVsZUZhY3RvcnkpOwogICAgICAgIH0KICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgY29tcGlsZXIgPSBnZXRDb21waWxlckZhY2FkZSgpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBjb21waWxlckluamVjdG9yID0gSW5qZWN0b3IuY3JlYXRlKHsgcHJvdmlkZXJzOiBjb21waWxlclByb3ZpZGVycyB9KTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgcmVzb3VyY2VMb2FkZXIgPSBjb21waWxlckluamVjdG9yLmdldChjb21waWxlci5SZXNvdXJjZUxvYWRlcik7CiAgICAgICAgLy8gVGhlIHJlc291cmNlIGxvYWRlciBjYW4gYWxzbyByZXR1cm4gYSBzdHJpbmcgd2hpbGUgdGhlICJyZXNvbHZlQ29tcG9uZW50UmVzb3VyY2VzIgogICAgICAgIC8vIGFsd2F5cyBleHBlY3RzIGEgcHJvbWlzZS4gVGhlcmVmb3JlIHdlIG5lZWQgdG8gd3JhcCB0aGUgcmV0dXJuZWQgdmFsdWUgaW4gYSBwcm9taXNlLgogICAgICAgIHJldHVybiByZXNvbHZlQ29tcG9uZW50UmVzb3VyY2VzKCgvKioKICAgICAgICAgKiBAcGFyYW0gez99IHVybAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdXJsID0+IFByb21pc2UucmVzb2x2ZShyZXNvdXJjZUxvYWRlci5nZXQodXJsKSkpKQogICAgICAgICAgICAudGhlbigoLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAoKSA9PiBtb2R1bGVGYWN0b3J5KSk7CiAgICB9CiAgICAvKioKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9u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m5hbWUgPSBuYW1lOwogICAgICAgICAgICB0aGlzLnRva2VuID0gdG9rZW47CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBDcmVhdGVzIGEgcGxhdGZvcm0uCiAgICAgKiBQbGF0Zm9ybXMgaGF2ZSB0byBiZSBlYWdlcmx5IGNyZWF0ZWQgdmlhIHRoaXMgZnVuY3Rpb24uCiAgICAgKgogICAgICogXEBwdWJsaWNBcGkKICAgICAqIEBwYXJhbSB7P30gaW5qZWN0b3IKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGNyZWF0ZVBsYXRmb3JtKGluamVjdG9yKSB7CiAgICAgICAgaWYgKF9wbGF0Zm9ybSAmJiAhX3BsYXRmb3JtLmRlc3Ryb3llZCAmJgogICAgICAgICAgICAhX3BsYXRmb3JtLmluamVjdG9yLmdldChBTExPV19NVUxUSVBMRV9QTEFURk9STVMsIGZhbHNlKSkgewogICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ1RoZXJlIGNhbiBiZSBvbmx5IG9uZSBwbGF0Zm9ybS4gRGVzdHJveSB0aGUgcHJldmlvdXMgb25lIHRvIGNyZWF0ZSBhIG5ldyBvbmUuJyk7CiAgICAgICAgfQogICAgICAgIHB1Ymxpc2hEZWZhdWx0R2xvYmFsVXRpbHMkMSgpOwogICAgICAgIF9wbGF0Zm9ybSA9IGluamVjdG9yLmdldChQbGF0Zm9ybVJlZik7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGluaXRzID0gaW5qZWN0b3IuZ2V0KFBMQVRGT1JNX0lOSVRJQUxJWkVSLCBudWxsKTsKICAgICAgICBpZiAoaW5pdHMpCiAgICAgICAgICAgIGluaXRzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGluaXQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChpbml0KSA9PiBpbml0KCkpKTsKICAgICAgICByZXR1cm4gX3BsYXRmb3JtOwogICAgfQogICAgLyoqCiAgICAgKiBDcmVhdGVzIGEgZmFjdG9yeSBmb3IgYSBwbGF0Zm9ybQogICAgICoKICAgICAqIFxAcHVibGljQXBpCiAgICAgKiBAcGFyYW0gez99IHBhcmVudFBsYXRmb3JtRmFjdG9yeQogICAgICogQHBhcmFtIHs/fSBuYW1lCiAgICAgKiBAcGFyYW0gez89fSBwcm92aWRlcnMKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGNyZWF0ZVBsYXRmb3JtRmFjdG9yeShwYXJlbnRQbGF0Zm9ybUZhY3RvcnksIG5hbWUsIHByb3ZpZGVycyA9IFtdKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGRlc2MgPSBgUGxhdGZvcm06ICR7bmFtZX1gOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBtYXJrZXIgPSBuZXcgSW5qZWN0aW9uVG9rZW4oZGVzYyk7CiAgICAgICAgcmV0dXJuICgvKioKICAgICAgICAgKiBAcGFyYW0gez89fSBleHRyYVByb3ZpZGVycwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgKGV4dHJhUHJvdmlkZXJzID0gW10pID0+IHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgcGxhdGZvcm0gPSBnZXRQbGF0Zm9ybSgpOwogICAgICAgICAgICBpZiAoIXBsYXRmb3JtIHx8IHBsYXRmb3JtLmluamVjdG9yLmdldChBTExPV19NVUxUSVBMRV9QTEFURk9STVMsIGZhbHNlKSkgewogICAgICAgICAgICAgICAgaWYgKHBhcmVudFBsYXRmb3JtRmFjdG9yeSkgewogICAgICAgICAgICAgICAgICAgIHBhcmVudFBsYXRmb3JtRmFjdG9yeShwcm92aWRlcnMuY29uY2F0KGV4dHJhUHJvdmlkZXJzKS5jb25jYXQoeyBwcm92aWRlOiBtYXJrZXIsIHVzZVZhbHVlOiB0cnVlIH0pKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBpbmplY3RlZFByb3ZpZGVycyA9IHByb3ZpZGVycy5jb25jYXQoZXh0cmFQcm92aWRlcnMpLmNvbmNhdCh7IHByb3ZpZGU6IG1hcmtlciwgdXNlVmFsdWU6IHRydWUgfSwgewogICAgICAgICAgICAgICAgICAgICAgICBwcm92aWRlOiBJTkpFQ1RPUl9TQ09QRSwKICAgICAgICAgICAgICAgICAgICAgICAgdXNlVmFsdWU6ICdwbGF0Zm9ybScKICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgICAgICBjcmVhdGVQbGF0Zm9ybShJbmplY3Rvci5jcmVhdGUoeyBwcm92aWRlcnM6IGluamVjdGVkUHJvdmlkZXJzLCBuYW1lOiBkZXNjIH0pKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gYXNzZXJ0UGxhdGZvcm0obWFya2VyKTsKICAgICAgICB9KTsKICAgIH0KICAgIC8qKgogICAgICogQ2hlY2tzIHRoYXQgdGhlcmUgY3VycmVudGx5IGlzIGEgcGxhdGZvcm0gd2hpY2ggY29udGFpbnMgdGhlIGdpdmVuIHRva2VuIGFzIGEgcHJvdmlkZXIuCiAgICAgKgogICAgICogXEBwdWJsaWNBcGkKICAgICAqIEBwYXJhbSB7P30gcmVxdWlyZWRUb2tlbgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gYXNzZXJ0UGxhdGZvcm0ocmVxdWlyZWRUb2tlbikgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBwbGF0Zm9ybSA9IGdldFBsYXRmb3JtKCk7CiAgICA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GZvcm0gaXMgY3JlYXRlZCB2aWEgYSBwbGF0Zm9ybSBmYWN0b3J5CiAgICAgKiAoZS5nLiB7XEBsaW5rIHBsYXRmb3JtQnJvd3Nlcn0pLCBvciBleHBsaWNpdGx5IGJ5IGNhbGxpbmcgdGhlIHtcQGxpbmsgY3JlYXRlUGxhdGZvcm19IGZ1bmN0aW9uLgogICAgICoKICAgICAqIFxAcHVibGljQXBpCiAgICAgKi8KICAgIGNsYXNzIFBsYXRmb3JtUmVmIHsKICAgICAgICAvKioKICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICogQHBhcmFtIHs/fSBfaW5qZWN0b3IKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihfaW5qZWN0b3IpIHsKICAgICAgICAgICAgdGhpcy5faW5qZWN0b3IgPSBfaW5qZWN0b3I7CiAgICAgICAgICAgIHRoaXMuX21vZHVsZXMgPSBbXTsKICAgICAgICAgICAgdGhpcy5fZGVzdHJveUxpc3RlbmVycyA9IFtdOwogICAgICAgICAgICB0aGlzLl9kZXN0cm95ZWQgPSBmYWxzZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhbiBpbnN0YW5jZSBvZiBhbiBgXEBOZ01vZHVsZWAgZm9yIHRoZSBnaXZlbiBwbGF0Zm9ybQogICAgICAgICAqIGZvciBvZmZsaW5lIGNvbXBpbGF0aW9uLgogICAgICAgICAqCiAgICAgICAgICogXEB1c2FnZU5vdGVzCiAgICAgICAgICogIyMjIFNpbXBsZSBFeGFtcGxlCiAgICAgICAgICoKICAgICAgICAgKiBgYGB0eXBlc2NyaXB0CiAgICAgICAgICogbXlfbW9kdWxlLnRzOgogICAgICAgICAqCiAgICAgICAgICogXEBOZ01vZHVsZSh7CiAgICAgICAgICogICBpbXBvcnRzOiBbQnJvd3Nlck1vZHVsZV0KICAgICAgICAgKiB9KQogICAgICAgICAqIGNsYXNzIE15TW9kdWxlIHt9CiAgICAgICAgICoKICAgIC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cHRpb25zLm5nWm9uZSA6IHVuZGVmaW5lZDsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBuZ1pvbmVFdmVudENvYWxlc2NpbmcgPSAob3B0aW9ucyAmJiBvcHRpb25zLm5nWm9uZUV2ZW50Q29hbGVzY2luZykgfHwgZmFsc2U7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgbmdab25lID0gZ2V0Tmdab25lKG5nWm9uZU9wdGlvbiwgbmdab25lRXZlbnRDb2FsZXNjaW5nKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwcm92aWRlcnMgPSBbeyBwcm92aWRlOiBOZ1pvbmUsIHVzZVZhbHVlOiBuZ1pvbmUgfV07CiAgICAgICAgICAgIC8vIEF0dGVudGlvbjogRG9uJ3QgdXNlIEFwcGxpY2F0aW9uUmVmLnJ1biBoZXJlLAogICAgICAgICAgICAvLyBhcyB3ZSB3YW50IHRvIGJlIHN1cmUgdGhhdCBhbGwgcG9zc2libGUgY29uc3RydWN0b3IgY2FsbHMgYXJlIGluc2lkZSBgbmdab25lLnJ1bmAhCiAgICAgICAgICAgIHJldHVybiBuZ1pvbmUucnVuKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IG5nWm9uZUluamVjdG9yID0gSW5qZWN0b3IuY3JlYXRlKHsgcHJvdmlkZXJzOiBwcm92aWRlcnMsIHBhcmVudDogdGhpcy5pbmplY3RvciwgbmFtZTogbW9kdWxlRmFjdG9yeS5tb2R1bGVUeXBlLm5hbWUgfSk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBtb2R1bGVSZWYgPSAoLyoqIEB0eXBlIHs/fSAqLyAobW9kdWxlRmFjdG9yeS5jcmVhdGUobmdab25lSW5qZWN0b3IpKSk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBleGNlcHRpb25IYW5kbGVyID0gbW9kdWxlUmVmLmluamVjdG9yLmdldChFcnJvckhhbmRsZXIsIG51bGwpOwogICAgICAgICAgICAgICAgaWYgKCFleGNlcHRpb25IYW5kbGVyKSB7CiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdObyBFcnJvckhhbmRsZXIuIElzIHBsYXRmb3JtIG1vZHVsZSAoQnJvd3Nlck1vZHVsZSkgaW5jbHVkZWQ/Jyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBtb2R1bGVSZWYub25EZXN0cm95KCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHJlbW92ZSh0aGlzLl9tb2R1bGVzLCBtb2R1bGVSZWYpKSk7CiAgICAgICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAobmdab25lKSkucnVuT3V0c2lkZUFuZ3VsYXIoKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gKC8qKiBAdHlwZSB7P30gKi8gKG5nWm9uZSkpLm9uRXJyb3Iuc3Vic2NyaWJlKHsKICAgICAgICAgICAgICAgICAgICBuZXh0OiAoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBlcnJvcgogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKGVycm9yKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIGV4Y2VwdGlvbkhhbmRsZXIuaGFuZGxlRXJyb3IoZXJyb3IpOwogICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICB9KSkpOwogICAgICAgICAgICAgICAgcmV0dXJuIF9jYWxsQW5kUmVwb3J0VG9FcnJvckhhbmRsZXIoZXhjZXB0aW9uSGFuZGxlciwgKC8qKiBAdHlwZSB7P30gKi8gKG5nWm9uZSkpLCAoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGluaXRTdGF0dXMgPSBtb2R1bGVSZWYuaW5qZWN0b3IuZ2V0KEFwcGxpY2F0aW9uSW5pdFN0YXR1cyk7CiAgICAgICAgICAgICAgICAgICAgaW5pdFN0YXR1cy5ydW5Jbml0aWFsaXplcnMoKTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gaW5pdFN0YXR1cy5kb25lUHJvbWlzZS50aGVuKCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGl2eUVuYWJsZWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIElmIHRoZSBgTE9DQUxFX0lEYCBwcm92aWRlciBpcyBkZWZpbmVkIGF0IGJvb3RzdHJhcCB0aGVuIHdlIHNldCB0aGUgdmFsdWUgZm9yIGl2eQogICAgICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbG9jYWxlSWQgPSBtb2R1bGVSZWYuaW5qZWN0b3IuZ2V0KExPQ0FMRV9JRCQxLCBERUZBVUxUX0xPQ0FMRV9JRCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRMb2NhbGVJZChsb2NhbGVJZCB8fCBERUZBVUxUX0xPQ0FMRV9JRCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fbW9kdWxlRG9Cb290c3RyYXAobW9kdWxlUmVmKTsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG1vZHVsZVJlZjsKICAgICAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhbiBpbnN0YW5jZSBvZiBhbiBgXEBOZ01vZHVsZWAgZm9yIGEgZ2l2ZW4gcGxhdGZvcm0gdXNpbmcgdGhlIGdpdmVuIHJ1bnRpbWUgY29tcGlsZXIuCiAgICAgICAgICoKICAgICAgICAgKiBcQHVzYWdlTm90ZXMKICAgICAgICAgKiAjIyMgU2ltcGxlIEV4YW1wbGUKICAgICAgICAgKgogICAgICAgICAqIGBgYHR5cGVzY3JpcHQKICAgICAgICAgKiBcQE5nTW9kdWxlKHsKICAgICAgICAgKiAgIGltcG9ydHM6IFtCcm93c2VyTW9kdWxlXQogICAgICAgICAqIH0pCiAgICAgICAgICogY2xhc3MgTXlNb2R1bGUge30KICAgICAgICAgKgogICAgICAgICAqIGxldCBtb2R1bGVSZWYgPSBwbGF0Zm9ybUJyb3dzZXIoKS5ib290c3RyYXBNb2R1bGUoTXlNb2R1bGUpOwogICAgICAgICAqIGBgYAogICAgICAgICAqCiAgICAgICAgICogQHRlbXBsYXRlIE0KICAgICAgICAgKiBAcGFyYW0gez99IG1vZHVsZVR5cGUKICAgICAgICAgKiBAcGFyYW0gez89fSBjb21waWxlck9wdGlvbnMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGJvb3RzdHJhcE1vZHVsZShtb2R1bGVUeXBlLCBjb21waWxlck9wdGlvbnMgPSBbXSkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG9wdGlvbnMgPSBvcHRpb25zUmVkdWNlcih7fSwgY29tcGlsZXJPcHRpb25zKTsKICAgICAgICAgICAgcmV0dXJuIGNvbXBpbGVOZ01vZHVsZUZhY3RvcnkodGhpcy5pbmplY3Rvciwgb3B0aW9ucywgbW9kdWxlVHlwZSkKICAgICAgICAgICAgICAgIC50aGVuKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBtb2R1bGVGYWN0b3J5CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBtb2R1bGVGYWN0b3J5ID0+IHRoaXMuYm9vdHN0cmFwTW9kdWxlRmFjdG9yeShtb2R1bGVGYWN0b3J5LCBvcHRpb25zKSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gbW9kdWxlUmVmCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfbW9kdWxlRG9Cb290c3RyYXAobW9kdWxlUmVmKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgYXBwUmVmID0gKC8qKiBAdHlwZSB7P30gKi8gKG1vZHVsZVJlZi5pbmplY3Rvci5nZXQoQXBwbGljYXRpb25SZWYpKSk7CiAgICAgICAgICAgIGlmIChtb2R1bGVSZWYuX2Jvb3RzdHJhcENvbXBvbmVudHMubGVuZ3RoID4gMCkgewogICAgICAgICAgICAgICAgbW9kdWxlUmVmLl9ib290c3RyYXBDb21wb25lbnRzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBmCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBmID0+IGFwcFJlZi5ib290c3RyYXAoZikpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChtb2R1bGVSZWYuaW5zdGFuY2UubmdEb0Jvb3RzdHJhcCkgewogICAgICAgICAgICAgICAgbW9kdWxlUmVmLmluc3RhbmNlLm5nRG9Cb290c3RyYXAoYXBwUmVmKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgVGhlIG1vZHVsZSAke3N0cmluZ2lmeShtb2R1bGVSZWYuaW5zdGFuY2UKICAgICAgICAgICAgICAgIC5jb25zdHJ1Y3Rvcil9IHdhcyBib290c3RyYXBwZWQsIGJ1dCBpdCBkb2VzIG5vdCBkZWNsYXJlICJATmdNb2R1bGUuYm9vdHN0cmFwIiBjb21wb25lbnRzIG5vciBhICJuZ0RvQm9vdHN0cmFwIiBtZXRob2QuIGAgKwogICAgICAgICAgICAgICAgICAgIGBQbGVhc2UgZGVmaW5lIG9uZSBvZiB0aGVzZS5gKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9tb2R1bGVzLnB1c2gobW9kdWxlUmVmKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmVnaXN0ZXIgYSBsaXN0ZW5lciB0byBiZSBjYWxsZWQgd2hlbiB0aGUgcGxhdGZvcm0gaXMgZGlzcG9zZWQuCiAgICAgICAgICogQHBhcmFtIHs/fSBjYWxsYmFjawogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25EZXN0cm95KGNhbGxiYWNrKSB7CiAgICAgICAgICAgIHRoaXMuX2Rlc3Ryb3lMaXN0ZW5lcnMucHVzaChjYWxsYmFjayk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJldHJpZXZlIHRoZSBwbGF0Zm9ybSB7XEBsaW5rIEluamVjdG9yfSwgd2hpY2ggaXMgdGhlIHBhcmVudCBpbmplY3RvciBmb3IKICAgICAgICAgKiBldmVyeSBBbmd1bGFyIGFwcGxpY2F0aW9uIG9uIHRoZSBwYWdlIGFuZCBwcm92aWRlcyBzaW5nbGV0b24gcHJvdmlkZXJzLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGluamVjdG9yKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5faW5qZWN0b3I7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIERlc3Ryb3kgdGhlIEFuZ3VsYXIgcGxhdGZvcm0gYW5kIGFsbCBBbmd1bGFyIGFwcGxpY2F0aW9ucyBvbiB0aGUgcGFnZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGRlc3Ryb3koKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9kZXN0cm95ZWQpIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignVGhlIHBsYXRmb3JtIGhhcyBhbHJlYWR5IGJlZW4gZGVzdHJveWVkIScpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX21vZHVsZXMuc2xpY2UoKS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBtb2R1bGUKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIG1vZHVsZSA9PiBtb2R1bGUuZGVzdHJveSgpKSk7CiAgICAgICAgICAgIHRoaXMuX2Rlc3Ryb3lMaXN0ZW5lcnMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbGlzdGVuZXIKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGxpc3RlbmVyID0+IGxpc3RlbmVyKCkpKTsKICAgICAgICAgICAgdGhpcy5fZGVzdHJveWVkID0gdHJ1ZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgZGVzdHJveWVkKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fZGVzdHJveWVkOwogICAgICAgIH0KICAgIH0KICAgIFBsYXRmb3JtUmVmLsm1ZmFjID0gZnVuY3Rpb24gUGxhdGZvcm1SZWZfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgUGxhdGZvcm1SZWYpKMm1ybVpbmplY3QoSW5qZWN0b3IpKTsgfTsKICAgIFBsYXRmb3JtUmVmLsm1cHJvdiA9IMm1ybVkZWZpbmVJbmplY3RhYmxlKHsgdG9rZW46IFBsYXRmb3JtUmVmLCBmYWN0b3J5OiBQbGF0Zm9ybVJlZi7JtWZhYyB9KTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLwogICAgUGxhdGZvcm1SZWYuY3RvclBhcmFtZXRlcnMgPSAoKSA9PiBbCiAgICAgICAgeyB0eXBlOiBJbmplY3RvciB9CiAgICBdOwogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IG5nWm9uZU9wdGlvbgogICAgICogQHBhcmFtIHs/fSBuZ1pvbmVFdmVudENvYWxlc2NpbmcKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGdldE5nWm9uZShuZ1pvbmVPcHRpb24sIG5nWm9uZUV2ZW50Q29hbGVzY2luZykgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgbmdab25lOwogICAgICAgIGlmIChuZ1pvbmVPcHRpb24gPT09ICdub29wJykgewogICAgICAgICAgICBuZ1pvbmUgPSBuZXcgTm9vcE5nWm9uZSgpOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgbmdab25lID0gKG5nWm9uZU9wdGlvbiA9PT0gJ3pvbmUuanMnID8gdW5kZWZpbmVkIDogbmdab25lT3B0aW9uKSB8fCBuZXcgTmdab25lKHsKICAgICAgICAgICAgICAgIGVuYWJsZUxvbmdTdGFja1RyYWNlOiBpc0Rldk1vZGUoKSwKICAgICAgICAgICAgICAgIHNob3VsZENvYWxlc2NlRXZlbnRDaGFuZ2VEZXRlY3Rpb246IG5nWm9uZUV2ZW50Q29hbGVzY2luZwogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIG5nWm9uZTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBlcnJvckhhbmRsZXIKICAgICAqIEBwYXJhbSB7P30gbmdab25lCiAgICAgKiBAcGFyYW0gez99IGNhbGxiYWNrCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBfY2FsbEFuZFJlcG9ydFRvRXJyb3JIYW5kbGVyKGVycm9ySGFuZGxlciwgbmdab25lLCBjYWxsYmFjaykgewogICAgICAgIHRyeSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcmVzdWx0ID0gY2FsbGJhY2soKTsKICAgICAgICAgICAgaWYgKGlzUHJvbWlzZSQxKHJlc3VsdCkpIHsKICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQuY2F0Y2goKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBlCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoZSkgPT4gewogICAgICAgICAgICAgICAgICAgIG5nWm9uZS5ydW5PdXRzaWRlQW5ndWxhcigoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAoKSA9PiBlcnJvckhhbmRsZXIuaGFuZGxlRXJyb3IoZSkpKTsKICAgICAgICAgICAgICAgICAgICAvLyByZXRocm93IGFzIHRoZSBleGNlcHRpb24gaGFuZGxlciBtaWdodCBub3QgZG8gaXQKICAgICAgICAgICAgICAgICAgICB0aHJvdyBlOwogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgfQogICAgICAgIGNhdGNoIChlKSB7CiAgICAgICAgICAgIG5nWm9uZS5ydW5PdXRzaWRlQW5ndWxhcigoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiBlcnJvckhhbmRsZXIuaGFuZGxlRXJyb3IoZSkpKTsKICAgICAgICAgICAgLy8gcmV0aHJvdyBhcyB0aGUgZXhjZXB0aW9uIGhhbmRsZXIgbWlnaHQgbm90IGRvIGl0CiAgICAgICAgICAgIHRocm93IGU7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBAdGVtcGxhdGUgVAogICAgICogQHBhcmFtIHs/fSBkc3QKICAgICAqIEBwYXJhbSB7P30gb2JqcwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gb3B0aW9uc1JlZHVjZXIoZHN0LCBvYmpzKSB7CiAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkob2JqcykpIHsKICAgICAgICAgICAgZHN0ID0gb2Jqcy5yZWR1Y2Uob3B0aW9uc1JlZHVjZXIsIGRzdCk7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICBkc3QgPSBPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sIGRzdCksICgoLyoqIEB0eXBlIHs/fSAqLyAob2JqcykpKSk7CiAgICAgICAgfQogICAgICAgIHJldHVybiBkc3Q7CiAgICB9CiAgICAvKioKICAgICAqIEEgcmVmZXJlbmNlIHRvIGFuIEFuZ3VsYXIgYXBwbGljYXRpb24gcnVubmluZyBvbiBhIHBhZ2UuCiAgICAgKgogICAgICogXEB1c2FnZU5vdGVzCiAgICAgKgogICAgICoge1xAYSBpcy1zdGFibGUtZXhhbXBsZXN9CiAgICAgKiAjIyMgaXNTdGFibGUgZXhhbXBsZXMgYW5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AgKgogICAgICogYGBgCiAgICAgKiBjb25zdHJ1Y3RvcihhcHBSZWY6IEFwcGxpY2F0aW9uUmVmLCBjZDogQ2hhbmdlRGV0ZWN0b3JSZWYpIHsKICAgICAqICAgYXBwUmVmLmlzU3RhYmxlLnBpcGUoCiAgICAgKiAgICAgZmlyc3Qoc3RhYmxlID0+IHN0YWJsZSksCiAgICAgKiAgICAgc3dpdGNoTWFwKCgpID0+IGludGVydmFsKDEwMDApKQogICAgICogICApLnN1YnNjcmliZShjb3VudGVyID0+IHsKICAgICAqICAgICB0aGlzLnZhbHVlID0gY291bnRlcjsKICAgICAqICAgICBjZC5kZXRlY3RDaGFuZ2VzKCk7CiAgICAgKiAgIH0pOwogICAgICogfQogICAgICogYGBgCiAgICAgKgogICAgICogT3IgbWFrZSB0aGUgc3Vic2NyaXB0aW9uIGNhbGxiYWNrIHJ1biBpbnNpZGUgdGhlIHpvbmUuCiAgICAgKgogICAgICogYGBgCiAgICAgKiBjb25zdHJ1Y3RvcihhcHBSZWY6IEFwcGxpY2F0aW9uUmVmLCB6b25lOiBOZ1pvbmUpIHsKICAgICAqICAgYXBwUmVmLmlzU3RhYmxlLnBpcGUoCiAgICAgKiAgICAgZmlyc3Qoc3RhYmxlID0+IHN0YWJsZSksCiAgICAgKiAgICAgc3dpdGNoTWFwKCgpID0+IGludGVydmFsKDEwMDApKQogICAgICogICApLnN1YnNjcmliZShjb3VudGVyID0+IHpvbmUucnVuKCgpID0+IHRoaXMudmFsdWUgPSBjb3VudGVyKSk7CiAgICAgKiB9CiAgICAgKiBgYGAKICAgICAqCiAgICAgKiBcQHB1YmxpY0FwaQogICAgICovCiAgICBjbGFzcyBBcHBsaWNhdGlvblJlZiB7CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7P30gX3pvbmUKICAgICAgICAgKiBAcGFyYW0gez99IF9jb25zb2xlCiAgICAgICAgICogQHBhcmFtIHs/fSBfaW5qZWN0b3IKICAgICAgICAgKiBAcGFyYW0gez99IF9leGNlcHRpb25IYW5kbGVyCiAgICAgICAgICogQHBhcmFtIHs/fSBfY29tcG9uZW50RmFjdG9yeVJlc29sdmVyCiAgICAgICAgICogQHBhcmFtIHs/fSBfaW5pdFN0YXR1cwogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKF96b25lLCBfY29uc29sZSwgX2luamVjdG9yLCBfZXhjZXB0aW9uSGFuZGxlciwgX2NvbXBvbmVudEZhY3RvcnlSZXNvbHZlciwgX2luaXRTdGF0dXMpIHsKICAgICAgICAgICAgdGhpcy5fem9uZSA9IF96b25lOwogICAgICAgICAgICB0aGlzLl9jb25zb2xlID0gX2NvbnNvbGU7CiAgICAgICAgICAgIHRoaXMuX2luamVjdG9yID0gX2luamVjdG9yOwogICAgICAgICAgICB0aGlzLl9leGNlcHRpb25IYW5kbGVyID0gX2V4Y2VwdGlvbkhhbmRsZXI7CiAgICAgICAgICAgIHRoaXMuX2NvbXBvbmVudEZhY3RvcnlSZXNvbHZlciA9IF9jb21wb25lbnRGYWN0b3J5UmVzb2x2ZXI7CiAgICAgICAgICAgIHRoaXMuX2luaXRTdGF0dXMgPSBfaW5pdFN0YXR1czsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX2Jvb3RzdHJhcExpc3RlbmVycyA9IFtdOwogICAgICAgICAgICB0aGlzLl92aWV3cyA9IFtdOwogICAgICAgICAgICB0aGlzLl9ydW5uaW5nVGljayA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLl9lbmZvcmNlTm9OZXdDaGFuZ2VzID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuX3N0YWJsZSA9IHRydWU7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBHZXQgYSBsaXN0IG9mIGNvbXBvbmVudCB0eXBlcyByZWdpc3RlcmVkIHRvIHRoaXMgYXBwbGljYXRpb24uCiAgICAgICAgICAgICAqIFRoaXMgbGlzdCBpcyBwb3B1bGF0ZWQgZXZlbiBiZWZvcmUgdGhlIGNvbXBvbmVudCBpcyBjcmVhdGVkLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5jb21wb25lbnRUeXBlcyA9IFtdOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogR2V0IGEgbGlzdCBvZiBjb21wb25lbnRzIHJlZ2lzdGVyZWQgdG8gdGhpcyBhcHBsaWNhdGlvbi4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuY29tcG9uZW50cyA9IFtdOwogICAgICAgICAgICB0aGlzLl9lbmZvcmNlTm9OZXdDaGFuZ2VzID0gaXNEZXZNb2RlKCk7CiAgICAgICAgICAgIHRoaXMuX3pvbmUub25NaWNyb3Rhc2tFbXB0eS5zdWJzY3JpYmUoewogICAgICAgICAgICAgICAgbmV4dDogKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHRoaXMuX3pvbmUucnVuKCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy50aWNrKCk7CiAgICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaXNDdXJyZW50bHlTdGFibGUgPSBuZXcgT2JzZXJ2YWJsZSgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gb2JzZXJ2ZXIKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChvYnNlcnZlcikgPT4gewogICAgICAgICAgICAgICAgdGhpcy5fc3RhYmxlID0gdGhpcy5fem9uZS5pc1N0YWJsZSAmJiAhdGhpcy5fem9uZS5oYXNQZW5kaW5nTWFjcm90YXNrcyAmJgogICAgICAgICAgICAgICAgICAgICF0aGlzLl96b25lLmhhc1BlbmRpbmdNaWNyb3Rhc2tzOwogICAgICAgICAgICAgICAgdGhpcy5fem9uZS5ydW5PdXRzaWRlQW5ndWxhcigoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgb2JzZXJ2ZXIubmV4dCh0aGlzLl9zdGFibGUpOwogICAgICAgICAgICAgICAgICAgIG9ic2VydmVyLmNvbXBsZXRlKCk7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBpc1N0YWJsZSA9IG5ldyBPYnNlcnZhYmxlKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBvYnNlcnZlcgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKG9ic2VydmVyKSA9PiB7CiAgICAgICAgICAgICAgICAvLyBDcmVhdGUgdGhlIHN1YnNjcmlwdGlvbiB0byBvblN0YWJsZSBvdXRzaWRlIHRoZSBBbmd1bGFyIFpvbmUgc28gdGhhdAogICAgICAgICAgICAgICAgLy8gdGhlIGNhbGxiYWNrIGlzIHJ1biBvdXRzaWRlIHRoZSBBbmd1bGFyIFpvbmUuCiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBsZXQgc3RhYmxlU3ViOwogICAgICAgICAgICAgICAgdGhpcy5fem9uZS5ydW5PdXRzaWRlQW5ndWxhcigoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgc3RhYmxlU3ViID0gdGhpcy5fem9uZS5vblN0YWJsZS5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgICAgICAgICBOZ1pvbmUuYXNzZXJ0Tm90SW5Bbmd1bGFyWm9uZSgpOwogICAgICAgICAgICAgICAgICAgICAgICAvLyBDaGVjayB3aGV0aGVyIHRoZXJlIGFyZSBubyBwZW5kaW5nIG1hY3JvL21pY3JvIHRhc2tzIGluIHRoZSBuZXh0IHRpY2sKICAgICAgICAgICAgICAgICAgICAgICAgLy8gdG8gYWxsb3cgZm9yIE5nWm9uZSB0byB1cGRhdGUgdGhlIHN0YXRlLgogICAgICAgICAgICAgICAgICAgICAgICBzY2hlZHVsZU1pY3JvVGFzaygoLyoqCiAgICAgICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXRoaXMuX3N0YWJsZSAmJiAhdGhpcy5fem9uZS5oYXNQZW5kaW5nTWFjcm90YXNrcyAmJgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICF0aGlzLl96b25lLmhhc1BlbmRpbmdNaWNyb3Rhc2tzKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fc3RhYmxlID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvYnNlcnZlci5uZXh0KHRydWUpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgdW5zdGFibGVTdWIgPSB0aGlzLl96b25lLm9uVW5zdGFibGUuc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgICAgICBOZ1pvbmUuYXNzZXJ0SW5Bbmd1bGFyWm9uZSgpOwogICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLl9zdGFibGUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fc3RhYmxlID0gZmFsc2U7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3pvbmUucnVuT3V0c2lkZUFuZ3VsYXIoKC8qKgogICAgICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgICAgICAgICAgICAgb2JzZXJ2ZXIubmV4dChmYWxzZSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICByZXR1cm4gKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHN0YWJsZVN1Yi51bnN1YnNjcmliZSgpOwogICAgICAgICAgICAgICAgICAgIHVuc3RhYmxlU3ViLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKSkuaXNTdGFibGUgPQogICAgICAgICAgICAgICAgbWVyZ2UoaXNDdXJyZW50bHlTdGFibGUsIGlzU3RhYmxlLnBpcGUoc2hhcmUoKSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBCb290c3RyYXAgYSBuZXcgY29tcG9uZW50IGF0IHRoZSByb290IGxldmVsIG9mIHRoZSBhcHBsaWNhdGlvbi4KICAgICAgICAgKgogICAgICAgICAqIFxAdXNhZ2VOb3RlcwogICAgICAgICAqICMjIyBCb290c3RyYXAgcHJvY2VzcwogICAgICAgICAqCiAgICAgICAgICogV2hlbiBib290c3RyYXBwaW5nIGEgbmV3IHJvb3QgY29tcG9uZW50IGludG8gYW4gYXBwbGljYXRpb24sIEFuZ3VsYXIgbW91bnRzIHRoZQogICAgICAgICAqIHNwZWNpZmllZCBhcHBsaWNhdGlvbiBjb21wb25lbnQgb250byBET00gZWxlbWVudHMgaWRlbnRpZmllZCBieSB0aGUgY29tcG9uZW50VHlwZSdzCiAgICAgICAgICogc2VsZWN0b3IgYW5kIGtpY2tzIG9mZiBhdXRvbWF0aWMgY2hhbmdlIGRldGVjdGlvbiB0byBmaW5pc2ggaW5pdGlhbGl6aW5nIHRoZSBjb21wb25lbnQuCiAgICAgICAgICoKICAgICAgICAgKiBPcHRpb25hbGx5LCBhIGNvbXBvbmVudCBjYW4gYmUgbW91bnRlZCBvbnRvIGEgRE9NIGVsZW1lbnQgdGhhdCBkb2VzIG5vdCBtYXRjaCB0aGUKICAgICAgICAgKiBjb21wb25lbnRUeXBlJ3Mgc2VsZWN0b3IuCiAgICAgICAgICoKICAgICAgICAgKiAjIyMgRXhhbXBsZQogICAgICAgICAqIHtcQGV4YW1wbGUgY29yZS90cy9wbGF0Zm9ybS9wbGF0Zm9ybS50cyByZWdpb249J2xvbmdmb3JtJ30KICAgICAgICAgKiBAdGVtcGxhdGUgQwogICAgICAgICAqIEBwYXJhbSB7P30gY29tcG9uZW50T3JGYWN0b3J5CiAgICAgICAgICogQHBhcmFtIHs/PX0gcm9vdFNlbGVjdG9yT3JOb2RlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBib290c3RyYXAoY29tcG9uZW50T3JGYWN0b3J5LCByb290U2VsZWN0b3JPck5vZGUpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLl9pbml0U3RhdHVzLmRvbmUpIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignQ2Fubm90IGJvb3RzdHJhcCBhcyB0aGVyZSBhcmUgc3RpbGwgYXN5bmNocm9ub3VzIGluaXRpYWxpemVycyBydW5uaW5nLiBCb290c3RyYXAgY29tcG9uZW50cyBpbiB0aGUgYG5nRG9Cb290c3RyYXBgIG1ldGhvZCBvZiB0aGUgcm9vdCBtb2R1bGUuJyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgY29tcG9uZW50RmFjdG9yeTsKICAgICAgICAgICAgaWYgKGNvbXBvbmVudE9yRmFjdG9yeSBpbnN0YW5jZW9mIENvbXBvbmVudEZhY3RvcnkpIHsKICAgICAgICAgICAgICAgIGNvbXBvbmVudEZhY3RvcnkgPSBjb21wb25lbnRPckZhY3Rvcnk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBjb21wb25lbnRGYWN0b3J5ID0KICAgICAgICAgICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5fY29tcG9uZW50RmFjdG9yeVJlc29sdmVyLnJlc29sdmVDb21wb25lbnRGYWN0b3J5KGNvbXBvbmVudE9yRmFjdG9yeSkpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLmNvbXBvbmVudFR5cGVzLnB1c2goY29tcG9uZW50RmFjdG9yeS5jb21wb25lbnRUeXBlKTsKICAgICAgICAgICAgLy8gQ3JlYXRlIGEgZmFjdG9yeSBhc3NvY2lhdGVkIHdpdGggdGhlIGN1cnJlbnQgbW9kdWxlIGlmIGl0J3Mgbm90IGJvdW5kIHRvIHNvbWUgb3RoZXIKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBuZ01vZHVsZSA9IGlzQm91bmRUb01vZHVsZShjb21wb25lbnRGYWN0b3J5KSA/IHVuZGVmaW5lZCA6IHRoaXMuX2luamVjdG9yLmdldChOZ01vZHVsZVJlZik7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc2VsZWN0b3JPck5vZGUgPSByb290U2VsZWN0b3JPck5vZGUgfHwgY29tcG9uZW50RmFjdG9yeS5zZWxlY3RvcjsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjb21wUmVmID0gY29tcG9uZW50RmFjdG9yeS5jcmVhdGUoSW5qZWN0b3IuTlVMTCwgW10sIHNlbGVjdG9yT3JOb2RlLCBuZ01vZHVsZSk7CiAgICAgICAgICAgIGNvbXBSZWYub25EZXN0cm95KCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuX3VubG9hZENvbXBvbmVudChjb21wUmVmKTsKICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHRlc3RhYmlsaXR5ID0gY29tcFJlZi5pbmplY3Rvci5nZXQoVGVzdGFiaWxpdHksIG51bGwpOwogICAgICAgICAgICBpZiAodGVzdGFiaWxpdHkpIHsKICAgICAgICAgICAgICAgIGNvbXBSZWYuaW5qZWN0b3IuZ2V0KFRlc3RhYmlsaXR5UmVnaXN0cnkpCiAgICAgICAgICAgICAgICAgICAgLnJlZ2lzdGVyQXBwbGljYXRpb24oY29tcFJlZi5sb2NhdGlvbi5uYXRpdmVFbGVtZW50LCB0ZXN0YWJpbGl0eSk7CiAgIC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N0aW9uIHBhc3MgZHVyaW5nIHdoaWNoIGFsbCBjaGFuZ2UgZGV0ZWN0aW9uIG11c3QgY29tcGxldGUuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB0aWNrKCkgewogICAgICAgICAgICBpZiAodGhpcy5fcnVubmluZ1RpY2spIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignQXBwbGljYXRpb25SZWYudGljayBpcyBjYWxsZWQgcmVjdXJzaXZlbHknKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgdGhpcy5fcnVubmluZ1RpY2sgPSB0cnVlOwogICAgICAgICAgICAgICAgZm9yIChsZXQgdmlldyBvZiB0aGlzLl92aWV3cykgewogICAgICAgICAgICAgICAgICAgIHZpZXcuZGV0ZWN0Q2hhbmdlcygpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKHRoaXMuX2VuZm9yY2VOb05ld0NoYW5nZXMpIHsKICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCB2aWV3IG9mIHRoaXMuX3ZpZXdzKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHZpZXcuY2hlY2tOb0NoYW5nZXMoKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY2F0Y2ggKGUpIHsKICAgICAgICAgICAgICAgIC8vIEF0dGVudGlvbjogRG9uJ3QgcmV0aHJvdyBhcyBpdCBjb3VsZCBjYW5jZWwgc3Vic2NyaXB0aW9ucyB0byBPYnNlcnZhYmxlcyEKICAgICAgICAgICAgICAgIHRoaXMuX3pvbmUucnVuT3V0c2lkZUFuZ3VsYXIoKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gdGhpcy5fZXhjZXB0aW9uSGFuZGxlci5oYW5kbGVFcnJvcihlKSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGZpbmFsbHkgewogICAgICAgICAgICAgICAgdGhpcy5fcnVubmluZ1RpY2sgPSBmYWxzZTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBdHRhY2hlcyBhIHZpZXcgc28gdGhhdCBpdCB3aWxsIGJlIGRpcnR5IGNoZWNrZWQuCiAgICAgICAgICogVGhlIHZpZXcgd2lsbCBiZSBhdXRvbWF0aWNhbGx5IGRldGFjaGVkIHdoZW4gaXQgaXMgZGVzdHJveWVkLgogICAgICAgICAqIFRoaXMgd2lsbCB0aHJvdyBpZiB0aGUgdmlldyBpcyBhbHJlYWR5IGF0dGFjaGVkIHRvIGEgVmlld0NvbnRhaW5lci4KICAgICAgICAgKiBAcGFyYW0gez99IHZpZXdSZWYKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGF0dGFjaFZpZXcodmlld1JlZikgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHZpZXcgPSAoKC8qKiBAdHlwZSB7P30gKi8gKHZpZXdSZWYpKSk7CiAgICAgICAgICAgIHRoaXMuX3ZpZXdzLnB1c2godmlldyk7CiAgICAgICAgICAgIHZpZXcuYXR0YWNoVG9BcHBSZWYodGhpcyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIERldGFjaGVzIGEgdmlldyBmcm9tIGRpcnR5IGNoZWNraW5nIGFnYWluLgogICAgICAgICAqIEBwYXJhbSB7P30gdmlld1JlZgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZGV0YWNoVmlldyh2aWV3UmVmKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdmlldyA9ICgoLyoqIEB0eXBlIHs/fSAqLyAodmlld1JlZikpKTsKICAgICAgICAgICAgcmVtb3ZlKHRoaXMuX3ZpZXdzLCB2aWV3KTsKICAgICAgICAgICAgdmlldy5kZXRhY2hGcm9tQXBwUmVmKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBjb21wb25lbnRSZWYKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9sb2FkQ29tcG9uZW50KGNvbXBvbmVudFJlZikgewogICAgICAgICAgICB0aGlzLmF0dGFjaFZpZXcoY29tcG9uZW50UmVmLmhvc3RWaWV3KTsKICAgICAgICAgICAgdGhpcy50aWNrKCk7CiAgICAgICAgICAgIHRoaXMuY29tcG9uZW50cy5wdXNoKGNvbXBvbmVudFJlZik7CiAgICAgICAgICAgIC8vIEdldCB0aGUgbGlzdGVuZXJzIGxhemlseSB0byBwcmV2ZW50IERJIGN5Y2xlcy4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBsaXN0ZW5lcnMgPSB0aGlzLl9pbmplY3Rvci5nZXQoQVBQX0JPT1RTVFJBUF9MSVNURU5FUiwgW10pLmNvbmNhdCh0aGlzLl9ib290c3RyYXBMaXN0ZW5lcnMpOwogICAgICAgICAgICBsaXN0ZW5lcnMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbGlzdGVuZXIKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChsaXN0ZW5lcikgPT4gbGlzdGVuZXIoY29tcG9uZW50UmVmKSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gY29tcG9uZW50UmVmCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfdW5sb2FkQ29tcG9uZW50KGNvbXBvbmVudFJlZikgewogICAgICAgICAgICB0aGlzLmRldGFjaFZpZXcoY29tcG9uZW50UmVmLmhvc3RWaWV3KTsKICAgICAgICAgICAgcmVtb3ZlKHRoaXMuY29tcG9uZW50cywgY29tcG9uZW50UmVmKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkRlc3Ryb3koKSB7CiAgICAgICAgICAgIC8vIFRPRE8oYWx4aHViKTogRGlzcG9zZSBvZiB0aGUgTmdab25lLgogICAgICAgICAgICB0aGlzLl92aWV3cy5zbGljZSgpLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHZpZXcKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICh2aWV3KSA9PiB2aWV3LmRlc3Ryb3koKSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZXR1cm5zIHRoZSBudW1iZXIgb2YgYXR0YWNoZWQgdmlld3MuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgdmlld0NvdW50KCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fdmlld3MubGVuZ3RoOwogICAgICAgIH0KICAgIH0KICAgIEFwcGxpY2F0aW9uUmVmLsm1ZmFjID0gZnVuY3Rpb24gQXBwbGljYXRpb25SZWZfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgQXBwbGljYXRpb25SZWYpKMm1ybVpbmplY3QoTmdab25lKSwgybXJtWluamVjdChDb25zb2xlKSwgybXJtWluamVjdChJbmplY3RvciksIMm1ybVpbmplY3QoRXJyb3JIYW5kbGVyKSwgybXJtWluamVjdChDb21wb25lbnRGYWN0b3J5UmVzb2x2ZXIpLCDJtcm1aW5qZWN0KEFwcGxpY2F0aW9uSW5pdFN0YXR1cykpOyB9OwogICAgQXBwbGljYXRpb25SZWYuybVwcm92ID0gybXJtWRlZmluZUluamVjdGFibGUoeyB0b2tlbjogQXBwbGljYXRpb25SZWYsIGZhY3Rvcnk6IEFwcGxpY2F0aW9uUmVmLsm1ZmFjIH0pOwogICAgLyoqIEBub2NvbGxhcHNlICovCiAgICBBcHBsaWNhdGlvblJlZi5jdG9yUGFyYW1ldGVycyA9ICgpID0+IFsKICAgICAgICB7IHR5cGU6IE5nWm9uZSB9LAogICAgICAgIHsgdHlwZTogQ29uc29sZSB9LAogICAgICAgIHsgdHlwZTogSW5qZWN0b3IgfSwKICAgICAgICB7IHR5cGU6IEVycm9ySGFuZGxlciB9LAogICAgICAgIHsgdHlwZTogQ29tcG9uZW50RmFjdG9yeVJlc29sdmVyIH0sCiAgICAgICAgeyB0eXBlOiBBcHBsaWNhdGlvbkluaXRTdGF0dXMgfQogICAgXTsKICAgIC8qKgogICAgICogQHRlbXBsYXRlIFQKICAgICAqIEBwYXJhbSB7P30gbGlzdAogICAgICogQHBhcmFtIHs/fSBlbAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gcmVtb3ZlKGxpc3QsIGVsKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGluZGV4ID0gbGlzdC5pbmRleE9mKGVsKTsKICAgICAgICBpZiAoaW5kZXggPiAtMSkgewogICAgICAgICAgICBsaXN0LnNwbGljZShpbmRleCwgMSk7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBAdGVtcGxhdGUgVAogICAgICogQHBhcmFtIHs/fSBhcmdzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBfbGFzdERlZmluZWQoYXJncykgewogICAgICAgIGZvciAobGV0IGkgPSBhcmdzLmxlbmd0aCAtIDE7IGkgPj0gMDsgaS0tKSB7CiAgICAgICAgICAgIGlmIChhcmdzW2ldICE9PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgICAgIHJldHVybiBhcmdzW2ldOwogICAgICAgICAgICB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29tcGlsZXIsIGNvbmZpZykgewogICAgICAgICAgICB0aGlzLl9jb21waWxlciA9IF9jb21waWxlcjsKICAgICAgICAgICAgdGhpcy5fY29uZmlnID0gY29uZmlnIHx8IERFRkFVTFRfQ09ORklHOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHBhdGgKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGxvYWQocGF0aCkgewogICAgICAgICAgICByZXR1cm4gIHRoaXMubG9hZEFuZENvbXBpbGUocGF0aCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBwYXRoCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBsb2FkQW5kQ29tcGlsZShwYXRoKSB7CiAgICAgICAgICAgIGxldCBbbW9kdWxlLCBleHBvcnROYW1lXSA9IHBhdGguc3BsaXQoX1NFUEFSQVRPUik7CiAgICAgICAgICAgIGlmIChleHBvcnROYW1lID09PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgICAgIGV4cG9ydE5hbWUgPSAnZGVmYXVsdCc7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIFN5c3RlbS5pbXBvcnQobW9kdWxlKQogICAgICAgICAgICAgICAgLnRoZW4oKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IG1vZHVsZQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKG1vZHVsZSkgPT4gbW9kdWxlW2V4cG9ydE5hbWVdKSkKICAgICAgICAgICAgICAgIC50aGVuKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSB0eXBlCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAodHlwZSkgPT4gY2hlY2tOb3RFbXB0eSh0eXBlLCBtb2R1bGUsIGV4cG9ydE5hbWUpKSkKICAgICAgICAgICAgICAgIC50aGVuKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSB0eXBlCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAodHlwZSkgPT4gdGhpcy5fY29tcGlsZXIuY29tcGlsZU1vZHVsZUFzeW5jKHR5cGUpKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBwYXRoCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBsb2FkRmFjdG9yeShwYXRoKSB7CiAgICAgICAgICAgIGxldCBbbW9kdWxlLCBleHBvcnROYW1lXSA9IHBhdGguc3BsaXQoX1NFUEFSQVRPUik7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGZhY3RvcnlDbGFzc1N1ZmZpeCA9IEZBQ1RPUllfQ0xBU1NfU1VGRklYOwogICAgICAgICAgICBpZiAoZXhwb3J0TmFtZSA9PT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgICAgICBleHBvcnROYW1lID0gJ2RlZmF1bHQnOwogICAgICAgICAgICAgICAgZmFjdG9yeUNsYXNzU3VmZml4ID0gJyc7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIFN5c3RlbS5pbXBvcnQodGhpcy5fY29uZmlnLmZhY3RvcnlQYXRoUHJlZml4ICsgbW9kdWxlICsgdGhpcy5fY29uZmlnLmZhY3RvcnlQYXRoU3VmZml4KQogICAgICAgICAgICAgICAgLnRoZW4oKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IG1vZHVsZQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKG1vZHVsZSkgPT4gbW9kdWxlW2V4cG9ydE5hbWUgKyBmYWN0b3J5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JvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvKioKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIF9pdGVyYWJsZURpZmZlcnNGYWN0b3J5KCkgewogICAgICAgIHJldHVybiBkZWZhdWx0SXRlcmFibGVEaWZmZXJzOwogICAgfQogICAgLyoqCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBfa2V5VmFsdWVEaWZmZXJzRmFjdG9yeSgpIHsKICAgICAgICByZXR1cm4gZGVmYXVsdEtleVZhbHVlRGlmZmVyczsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/PX0gbG9jYWxlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBfbG9jYWxlRmFjdG9yeShsb2NhbGUpIHsKICAgICAgICBsb2NhbGUgPSBsb2NhbGUgfHwgZ2V0R2xvYmFsTG9jYWxlKCk7CiAgICAgICAgewogICAgICAgICAgICBzZXRMb2NhbGVJZChsb2NhbGUpOwogICAgICAgIH0KICAgICAgICByZXR1cm4gbG9jYWxlOwogICAgfQogICAgLyoqCiAgICAgKiBXb3JrIG91dCB0aGUgbG9jYWxlIGZyb20gdGhlIHBvdGVudGlhbCBnbG9iYWwgcHJvcGVydGllcy4KICAgICAqCiAgICAgKiAqIENsb3N1cmUgQ29tcGlsZXI6IHVzZSBgZ29vZy5MT0NBTEVgLgogICAgICogKiBJdnkgZW5hYmxlZDogdXNlIGAkbG9jYWxpemUubG9jYWxlYAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0R2xvYmFsTG9jYWxlKCkgewogICAgICAgIGlmICh0eXBlb2YgbmdJMThuQ2xvc3VyZU1vZGUgIT09ICd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IHdlIG5lZWQgdG8gdXNlIGBOZ1pvbmUub25TdGFibGVgIGFzIHRoZSBzY2hlZHVsaW5nIG1lY2hhbmlzbS4KICAgICAqIFRoaXMgb3ZlcnJpZGVzIHRoZSBzY2hlZHVsaW5nIG1lY2hhbmlzbSBpbiBJdnkgdG8gYE5nWm9uZS5vblN0YWJsZWAuCiAgICAgKgogICAgICogQHBhcmFtIHs/fSBuZ1pvbmUgTmdab25lIHRvIHVzZSBmb3Igc2NoZWR1bGluZy4KICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHpvbmVTY2hlZHVsZXJGYWN0b3J5KG5nWm9uZSkgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgcXVldWUgPSBbXTsKICAgICAgICBuZ1pvbmUub25TdGFibGUuc3Vic2NyaWJlKCgvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgICgpID0+IHsKICAgICAgICAgICAgd2hpbGUgKHF1ZXVlLmxlbmd0aCkgewogICAgICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKHF1ZXVlLnBvcCgpKSkoKTsKICAgICAgICAgICAgfQogICAgICAgIH0pKTsKICAgICAgICByZXR1cm4gKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIChmbikgewogICAgICAgICAgICBxdWV1ZS5wdXNoKGZuKTsKICAgICAgICB9KTsKICAgIH0KICAgIC8qKgogICAgICogQ29uZmlndXJlcyB0aGUgcm9vdCBpbmplY3RvciBmb3IgYW4gYXBwIHdpdGgKICAgICAqIHByb3ZpZGVycyBvZiBgXEBhbmd1bGFyL2NvcmVgIGRlcGVuZGVuY2llcyB0aGF0IGBBcHBsaWNhdGlvblJlZmAgbmVlZHMKICAgICAqIHRvIGJvb3RzdHJhcCBjb21wb25lbnRzLgogICAgIC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IGFuIGFwcGxpY2F0aW9uIGRldmVsb3Blci4gSW5zdGVhZCwgdXNlCiAgICAgKiB7XEBsaW5rIExvY2F0aW9ufS4KICAgICAqLwogICAgY2xhc3MgQnJvd3NlclBsYXRmb3JtTG9jYXRpb24gZXh0ZW5kcyBQbGF0Zm9ybUxvY2F0aW9uIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IF9kb2MKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihfZG9jKSB7CiAgICAgICAgICAgIHN1cGVyKCk7CiAgICAgICAgICAgIHRoaXMuX2RvYyA9IF9kb2M7CiAgICAgICAgICAgIHRoaXMuX2luaXQoKTsKICAgICAgICB9CiAgICAgICAgLy8gVGhpcyBpcyBtb3ZlZCB0byBpdHMgb3duIG1ldGhvZCBzbyB0aGF0IGBNb2NrUGxhdGZvcm1Mb2NhdGlvblN0cmF0ZWd5YCBjYW4gb3ZlcndyaXRlIGl0CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2luaXQoKSB7CiAgICAgICAgICAgICgoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpKS5sb2NhdGlvbiA9IGdldERPTSgpLmdldExvY2F0aW9uKCk7CiAgICAgICAgICAgIHRoaXMuX2hpc3RvcnkgPSBnZXRET00oKS5nZXRIaXN0b3J5KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0QmFzZUhyZWZGcm9tRE9NKCkgewogICAgICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKGdldERPTSgpLmdldEJhc2VIcmVmKHRoaXMuX2RvYykpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25Qb3BTdGF0ZShmbikgewogICAgICAgICAgICBnZXRET00oKS5nZXRHbG9iYWxFdmVudFRhcmdldCh0aGlzLl9kb2MsICd3aW5kb3cnKS5hZGRFdmVudExpc3RlbmVyKCdwb3BzdGF0ZScsIGZuLCBmYWxzZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uSGFzaENoYW5nZShmbikgewogICAgICAgICAgICBnZXRET00oKS5nZXRHbG9iYWxFdmVudFRhcmdldCh0aGlzLl9kb2MsICd3aW5kb3cnKS5hZGRFdmVudExpc3RlbmVyKCdoYXNoY2hhbmdlJywgZm4sIGZhbHNlKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgaHJlZigpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMubG9jYXRpb24uaHJlZjsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgcHJvdG9jb2woKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmxvY2F0aW9uLnByb3RvY29sOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBob3N0bmFtZSgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMubG9jYXRpb24uaG9zdG5hbWU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHBvcnQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmxvY2F0aW9uLnBvcnQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHBhdGhuYW1lKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5sb2NhdGlvbi5wYXRobmFtZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgc2VhcmNoKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5sb2NhdGlvbi5zZWFyY2g7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGhhc2goKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmxvY2F0aW9uLmhhc2g7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gbmV3UGF0aAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IHBhdGhuYW1lKG5ld1BhdGgpIHsKICAgICAgICAgICAgdGhpcy5sb2NhdGlvbi5wYXRobmFtZSA9IG5ld1BhdGg7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gc3RhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHRpdGxlCiAgICAgICAgICogQHBhcmFtIHs/fSB1cmwKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHB1c2hTdGF0ZShzdGF0ZSwgdGl0bGUsIHVybCkgewogICAgICAgICAgICBpZiAoc3VwcG9ydHNTdGF0ZSgpKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9oaXN0b3J5LnB1c2hTdGF0ZShzdGF0ZSwgdGl0bGUsIHVybCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLmxvY2F0aW9uLmhhc2ggPSB1cmw7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBzdGF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gdGl0bGUKICAgICAgICAgKiBAcGFyYW0gez99IHVybAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVwbGFjZVN0YXRlKHN0YXRlLCB0aXRsZSwgdXJsKSB7CiAgICAgICAgICAgIGlmIChzdXBwb3J0c1N0YXRlKCkpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2hpc3RvcnkucmVwbGFjZVN0YXRlKHN0YXRlLCB0aXRsZSwgdXJsKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMubG9jYXRpb24uaGFzaCA9IHVybDsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZvcndhcmQoKSB7CiAgICAgICAgICAgIHRoaXMuX2hpc3RvcnkuZm9yd2FyZCgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGJhY2soKSB7CiAgICAgICAgICAgIHRoaXMuX2hpc3RvcnkuYmFjaygpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldFN0YXRlKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5faGlzdG9yeS5zdGF0ZTsKICAgICAgICB9CiAgICB9CiAgICBCcm93c2VyUGxhdGZvcm1Mb2NhdGlvbi7JtWZhYyA9IGZ1bmN0aW9uIEJyb3dzZXJQbGF0Zm9ybUxvY2F0aW9uX0ZhY3RvcnkodCkgeyByZXR1cm4gbmV3ICh0IHx8IEJyb3dzZXJQbGF0Zm9ybUxvY2F0aW9uKSjJtcm1aW5qZWN0KERPQ1VNRU5UJDEpKTsgfTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLwogICAgQnJvd3NlclBsYXRmb3JtTG9jY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AgICByZXR1cm4gc3RhcnQ7CiAgICAgICAgfQogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgc2xhc2hlcyA9IDA7CiAgICAgICAgaWYgKHN0YXJ0LmVuZHNXaXRoKCcvJykpIHsKICAgICAgICAgICAgc2xhc2hlcysrOwogICAgICAgIH0KICAgICAgICBpZiAoZW5kLnN0YXJ0c1dpdGgoJy8nKSkgewogICAgICAgICAgICBzbGFzaGVzKys7CiAgICAgICAgfQogICAgICAgIGlmIChzbGFzaGVzID09IDIpIHsKICAgICAgICAgICAgcmV0dXJuIHN0YXJ0ICsgZW5kLnN1YnN0cmluZygxKTsKICAgICAgICB9CiAgICAgICAgaWYgKHNsYXNoZXMgPT0gMSkgewogICAgICAgICAgICByZXR1cm4gc3RhcnQgKyBlbmQ7CiAgICAgICAgfQogICAgICAgIHJldHVybiBzdGFydCArICcvJyArIGVuZDsKICAgIH0KICAgIC8qKgogICAgICogUmVtb3ZlcyBhIHRyYWlsaW5nIHNsYXNoIGZyb20gYSBVUkwgc3RyaW5nIGlmIG5lZWRlZC4KICAgICAqIExvb2tzIGZvciB0aGUgZmlyc3Qgb2NjdXJyZW5jZSBvZiBlaXRoZXIgYCNgLCBgP2AsIG9yIHRoZSBlbmQgb2YgdGhlCiAgICAgKiBsaW5lIGFzIGAvYCBjaGFyYWN0ZXJzIGFuZCByZW1vdmVzIHRoZSB0cmFpbGluZyBzbGFzaCBpZiBvbmUgZXhpc3RzLgogICAgICoKICAgICAqIEBwYXJhbSB7P30gdXJsIFVSTCBzdHJpbmcuCiAgICAgKgogICAgICogQHJldHVybiB7P30gVGhlIFVSTCBzdHJpbmcsIG1vZGlmaWVkIGlmIG5lZWRlZC4KICAgICAqLwogICAgZnVuY3Rpb24gc3RyaXBUcmFpbGluZ1NsYXNoKHVybCkgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBtYXRjaCA9IHVybC5tYXRjaCgvI3xcP3wkLyk7Ci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ICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IF9wbGF0Zm9ybUxvY2F0aW9uCiAgICAgICAgICogQHBhcmFtIHs/PX0gaHJlZgogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKF9wbGF0Zm9ybUxvY2F0aW9uLCBocmVmKSB7CiAgICAgICAgICAgIHN1cGVyKCk7CiAgICAgICAgICAgIHRoaXMuX3BsYXRmb3JtTG9jYXRpb24gPSBfcGxhdGZvcm1Mb2NhdGlvbjsKICAgICAgICAgICAgaWYgKGhyZWYgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgaHJlZiA9IHRoaXMuX3BsYXRmb3JtTG9jYXRpb24uZ2V0QmFzZUhyZWZGcm9tRE9NKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGhyZWYgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBObyBiYXNlIGhyZWYgc2V0LiBQbGVhc2UgcHJvdmlkZSBhIHZhbHVlIGZvciB0aGUgQVBQX0JBU0VfSFJFRiB0b2tlbiBvciBhZGQgYSBiYXNlIGVsZW1lbnQgdG8gdGhlIGRvY3VtZW50LmApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2Jhc2VIcmVmID0gaHJlZjsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25Qb3BTdGF0ZShmbikgewogICAgICAgICAgICB0aGlzLl9wbGF0Zm9ybUxvY2F0aW9uLm9uUG9wU3RhdGUoZm4pOwogICAgICAgICAgICB0aGlzLl9wbGF0Zm9ybUxvY2F0aW9uLm9uSGFzaENoYW5nZShmbik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0QmFzZUhyZWYoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9iYXNlSHJlZjsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBpbnRlcm5hbAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcHJlcGFyZUV4dGVybmFsVXJsKGludGVybmFsKSB7CiAgICAgICAgICAgIHJldHVybiBqb2luV2l0aFNsYXNoKHRoaXMuX2Jhc2VIcmVmLCBpbnRlcm5hbCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7Pz19IGluY2x1ZGVIYXNoCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBwYXRoKGluY2x1ZGVIYXNoID0gZmFsc2UpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwYXRobmFtZSA9IHRoaXMuX3BsYXRmb3JtTG9jYXRpb24ucGF0aG5hbWUgKyBub3JtYWxpemVRdWVyeVBhcmFtcyh0aGlzLl9wbGF0Zm9ybUxvY2F0aW9uLnNlYXJjaCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaGFzaCA9IHRoaXMuX3BsYXRmb3JtTG9jYXRpb24uaGFzaDsKICAgICAgICAgICAgcmV0dXJuIGhhc2ggJiYgaW5jbHVkZUhhc2ggPyBgJHtwYXRobmFtZX0ke2hhc2h9YCA6IHBhdGhuYW1lOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHN0YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSB0aXRsZQogICAgICAgICAqIEBwYXJhbSB7P30gdXJsCiAgICAgICAgICogQHBhcmFtIHs/fSBxdWVyeVBhcmFtcwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcHVzaFN0YXRlKHN0YXRlLCB0aXRsZSwgdXJsLCBxdWVyeVBhcmFtcykgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGV4dGVybmFsVXJsID0gdGhpcy5wcmVwYXJlRXh0ZXJuYWxVcmwodXJsICsgbm9ybWFsaXplUXVlcnlQYXJhbXMocXVlcnlQYXJhbXMpKTsKICAgICAgICAgICAgdGhpcy5fcGxhdGZvcm1Mb2NhdGlvbi5wdXNoU3RhdGUoc3RhdGUsIHRpdGxlLCBleHRlcm5hbFVybCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gc3RhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHRpdGxlCiAgICAgICAgICogQHBhcmFtIHs/fSB1cmwKICAgICAgICAgKiBAcGFyYW0gez99IHF1ZXJ5UGFyYW1zCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZXBsYWNlU3RhdGUoc3RhdGUsIHRpdGxlLCB1cmwsIHF1ZXJ5UGFyYW1zKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZXh0ZXJuYWxVcmwgPSB0aGlzLnByZXBhcmVFeHRlcm5hbFVybCh1cmwgKyBub3JtYWxpemVRdWVyeVBhcmFtcyhxdWVyeVBhcmFtcykpOwogICAgICAgICAgICB0aGlzLl9wbGF0Zm9ybUxvY2F0aW9uLnJlcGxhY2VTdGF0ZShzdGF0ZSwgdGl0bGUsIGV4dGVybmFsVXJsKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmb3J3YXJkKCkgewogICAgICAgICAgICB0aGlzLl9wbGF0Zm9ybUxvY2F0aW9uLmZvcndhcmQoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBiYWNrKCkgewogICAgICAgICAgICB0aGlzLl9wbGF0Zm9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Ll9wbGF0Zm9ybUxvY2F0aW9uID0gX3BsYXRmb3JtTG9jYXRpb247CiAgICAgICAgICAgIHRoaXMuX2Jhc2VIcmVmID0gJyc7CiAgICAgICAgICAgIGlmIChfYmFzZUhyZWYgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5fYmFzZUhyZWYgPSBfYmFzZUhyZWY7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25Qb3BTdGF0ZShmbikgewogICAgICAgICAgICB0aGlzLl9wbGF0Zm9ybUxvY2F0aW9uLm9uUG9wU3RhdGUoZm4pOwogICAgICAgICAgICB0aGlzLl9wbGF0Zm9ybUxvY2F0aW9uLm9uSGFzaENoYW5nZShmbik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0QmFzZUhyZWYoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9iYXNlSHJlZjsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/PX0gaW5jbHVkZUhhc2gKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHBhdGgoaW5jbHVkZUhhc2ggPSBmYWxzZSkgewogICAgICAgICAgICAvLyB0aGUgaGFzaCB2YWx1ZSBpcyBhbHdheXMgcHJlZml4ZWQgd2l0aCBhIGAjYAogICAgICAgICAgICAvLyBhbmQgaWYgaXQgaXMgZW1wdHkgdGhlbiBpdCB3aWxsIHN0YXkgZW1wdHkKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgcGF0aCA9IHRoaXMuX3BsYXRmb3JtTG9jYXRpb24uaGFzaDsKICAgICAgICAgICAgaWYgKHBhdGggPT0gbnVsbCkKICAgICAgICAgICAgICAgIHBhdGggPSAnIyc7CiAgICAgICAgICAgIHJldHVybiBwYXRoLmxlbmd0aCA+IDAgPyBwYXRoLnN1YnN0cmluZygxKSA6IHBhdGg7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gaW50ZXJuYWwKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHByZXBhcmVFeHRlcm5hbFVybChpbnRlcm5hbCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHVybCA9IGpvaW5XaXRoU2xhc2godGhpcy5fYmFzZUhyZWYsIGludGVybmFsKTsKICAgICAgICAgICAgcmV0dXJuIHVybC5sZW5ndGggPiAwID8gKCcjJyArIHVybCkgOiB1cmw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gc3RhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHRpdGxlCiAgICAgICAgICogQHBhcmFtIHs/fSBwYXRoCiAgICAgICAgICogQHBhcmFtIHs/fSBxdWVyeVBhcmFtcwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcHVzaFN0YXRlKHN0YXRlLCB0aXRsZSwgcGF0aCwgcXVlcnlQYXJhbXMpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgdXJsID0gdGhpcy5wcmVwYXJlRXh0ZXJuYWxVcmwocGF0aCArIG5vcm1hbGl6ZVF1ZXJ5UGFyYW1zKHF1ZXJ5UGFyYW1zKSk7CiAgICAgICAgICAgIGlmICh1cmwubGVuZ3RoID09IDApIHsKICAgICAgICAgICAgICAgIHVybCA9IHRoaXMuX3BsYXRmb3JtTG9jYXRpb24ucGF0aG5hbWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fcGxhdGZvcm1Mb2NhdGlvbi5wdXNoU3RhdGUoc3RhdGUsIHRpdGxlLCB1cmwpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHN0YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSB0aXRsZQogICAgICAgICAqIEBwYXJhbSB7P30gcGF0aAogICAgICAgICAqIEBwYXJhbSB7P30gcXVlcnlQYXJhbXMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlcGxhY2VTdGF0ZShzdGF0ZSwgdGl0bGUsIHBhdGgsIHF1ZXJ5UGFyYW1zKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHVybCA9IHRoaXMucHJlcGFyZUV4dGVybmFsVXJsKHBhdGggKyBub3JtYWxpemVRdWVyeVBhcmFtcyhxdWVyeVBhcmFtcykpOwogICAgICAgICAgICBpZiAodXJsLmxlbmd0aCA9PSAwKSB7CiAgICAgICAgICAgICAgICB1cmwgPSB0aGlzLl9wbGF0Zm9ybUxvY2F0aW9uLnBhdGhuYW1lOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX3BsYXRmb3JtTG9jYXRpb24ucmVwbGFjZVN0YXRlKHN0YXRlLCB0aXRsZSwgdXJsKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmb3J3YXJkKCkgewogICAgICAgICAgICB0aGlzLl9wbGF0Zm9ybUxvY2F0aW9uLmZvcndhcmQoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBiYWNrKCkgewogICAgICAgICAgICB0aGlzLl9wbGF0Zm9ybUxvY2F0aW9uLmJhY2soKTsKICAgICAgICB9CiAgICB9CiAgICBIYXNoTG9jYXRpb25TdHJhdGVneS7JtWZhYyA9IGZ1bmN0aW9uIEhhc2hMb2NhdGlvblN0cmF0ZWd5X0ZhY3Rvcnk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3ksIHBsYXRmb3JtTG9jYXRpb24pIHsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX3N1YmplY3QgPSBuZXcgRXZlbnRFbWl0dGVyKCk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl91cmxDaGFuZ2VMaXN0ZW5lcnMgPSBbXTsKICAgICAgICAgICAgdGhpcy5fcGxhdGZvcm1TdHJhdGVneSA9IHBsYXRmb3JtU3RyYXRlZ3k7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgYnJvd3NlckJhc2VIcmVmID0gdGhpcy5fcGxhdGZvcm1TdHJhdGVneS5nZXRCYXNlSHJlZigpOwogICAgICAgICAgICB0aGlzLl9wbGF0Zm9ybUxvY2F0aW9uID0gcGxhdGZvcm1Mb2NhdGlvbjsKICAgICAgICAgICAgdGhpcy5fYmFzZUhyZWYgPSBzdHJpcFRyYWlsaW5nU2xhc2goX3N0cmlwSW5kZXhIdG1sKGJyb3dzZXJCYXNlSHJlZikpOwogICAgICAgICAgICB0aGlzLl9wbGF0Zm9ybVN0cmF0ZWd5Lm9uUG9wU3RhdGUoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGV2CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoZXYpID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuX3N1YmplY3QuZW1pdCh7CiAgICAgICAgICAgICAgICAgICAgJ3VybCc6IHRoaXMucGF0aCh0cnVlKSwKICAgICAgICAgICAgICAgICAgICAncG9wJzogdHJ1ZSwKICAgICAgICAgICAgICAgICAgICAnc3RhdGUnOiBldi5zdGF0ZSwKICAgICAgICAgICAgICAgICAgICAndHlwZSc6IGV2LnR5cGUsCi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VybiB7P30KICAgICAgICAgKi8KICAgICAgICBvblVybENoYW5nZShmbikgewogICAgICAgICAgICB0aGlzLl91cmxDaGFuZ2VMaXN0ZW5lcnMucHVzaChmbik7CiAgICAgICAgICAgIHRoaXMuc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSB2CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICB2ID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuX25vdGlmeVVybENoYW5nZUxpc3RlbmVycyh2LnVybCwgdi5zdGF0ZSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7Pz19IHVybAogICAgICAgICAqIEBwYXJhbSB7Pz19IHN0YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfbm90aWZ5VXJsQ2hhbmdlTGlzdGVuZXJzKHVybCA9ICcnLCBzdGF0ZSkgewogICAgICAgICAgICB0aGlzLl91cmxDaGFuZ2VMaXN0ZW5lcnMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGZuID0+IGZuKHVybCwgc3RhdGUpKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFN1YnNjcmliZXMgdG8gdGhlIHBsYXRmb3JtJ3MgYHBvcFN0YXRlYCBldmVudHMuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez99IG9uTmV4dAogICAgICAgICAqIEBwYXJhbSB7Pz19IG9uVGhyb3cKICAgICAgICAgKiBAcGFyYW0gez89fSBvblJldHVybgogICAgICAgICAqIEByZXR1cm4gez99IFN1YnNjcmliZWQgZXZlbnRzLgogICAgICAgICAqLwogICAgICAgIHN1YnN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CwgM10sCiAgICAgICAgJ0JJRic6IFt1bmRlZmluZWQsIHVuZGVmaW5lZCwgMF0sCiAgICAgICAgJ0JNRCc6IFt1bmRlZmluZWQsICckJ10sCiAgICAgICAgJ0JORCc6IFt1bmRlZmluZWQsICckJ10sCiAgICAgICAgJ0JPQic6IFt1bmRlZmluZWQsICdCcyddLAogICAgICAgICdCUkwnOiBbJ1IkJ10sCiAgICAgICAgJ0JTRCc6IFt1bmRlZmluZWQsICckJ10sCiAgICAgICAgJ0JXUCc6IFt1bmRlZmluZWQsICdQJ10sCiAgICAgICAgJ0JZTic6IFt1bmRlZmluZWQsICfRgC4nLCAyXSwKICAgICAgICAnQllSJzogW3VuZGVmaW5lZCwgdW5kZWZpbmVkLCAwXSwKICAgICAgICAnQlpEJzogW3VuZGVmaW5lZCwgJyQnXSwKICAgICAgICAnQ0FEJzogWydDQSQnLCAnJCcsIDJdLAogICAgICAgICdDSEYnOiBbdW5kZWZpbmVkLCB1bmRlZmluZWQsIDJdLAogICAgICAgICdDTEYnOiBbdW5kZWZpbmVkLCB1bmRlZmluZWQsIDRdLAogICAgICAgICdDTFAnOiBbdW5kZWZpbmVkLCAnJCcsIDBdLAogICAgICAgICdDTlknOiBbJ0NOwqUnLCAnwqUnXSwKICAgICAgICAnQ09QJzogW3VuZGVmaW5lZCwgJyQnLCAyXSwKICAgICAgICAnQ1JDJzogW3VuZGVmaW5lZCwgJ+KCoScsIDJdLAogICAgICAgICdDVUMnOiBbdW5kZWZpbmVkLCAnJCddLAogICAgICAgICdDVVAnOiBbdW5kZWZpbmVkLCAnJCddLAogICAgICAgICdDWksnOiBbdW5kZWZpbmVkLCAnS8SNJywgMl0sCiAgICAgICAgJ0RKRic6IFt1bmRlZmluZWQsIHVuZGVmaW5lZCwgMF0sCiAgICAgICAgJ0RLSyc6IFt1bmRlZmluZWQsICdrcicsIDJdLAogICAgICAgICdET1AnOiBbdW5kZWZpbmVkLCAnJCddLAogICAgICAgICdFR1AnOiBbdW5kZWZp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1JNJ10sCiAgICAgICAgJ05BRCc6IFt1bmRlZmluZWQsICckJ10sCiAgICAgICAgJ05HTic6IFt1bmRlZmluZWQsICfigqYnXSwKICAgICAgICAnTklPJzogW3VuZGVmaW5lZCwgJ0MkJ10sCiAgICAgICAgJ05PSyc6IFt1bmRlZmluZWQsICdrcicsIDJdLAogICAgICAgICdOUFInOiBbdW5kZWZpbmVkLCAnUnMnXSwKICAgICAgICAnTlpEJzogWydOWiQnLCAnJCddLAogICAgICAgICdPTVInOiBbdW5kZWZpbmVkLCB1bmRlZmluZWQsIDNdLAogICAgICAgICdQSFAnOiBbdW5kZWZpbmVkLCAn4oKxJ10sCiAgICAgICAgJ1BLUic6IFt1bmRlZmluZWQsICdScycsIDJdLAogICAgICAgICdQTE4nOiBbdW5kZWZpbmVkLCAnesWCJ10sCiAgICAgICAgJ1BZRyc6IFt1bmRlZmluZWQsICfigrInLCAwXSwKICAgICAgICAnUk9OJzogW3VuZGVmaW5lZCwgJ2xlaSddLAogICAgICAgICdSU0QnOiBbdW5kZWZpbmVkLCB1bmRlZmluZWQsIDBdLAogICAgICAgICdSVUInOiBbdW5kZWZpbmVkLCAn4oK9J10sCiAgICAgICAgJ1JVUic6IFt1bmRlZmluZWQsICfRgC4nXSwKICAgICAgICAnUldGJzogW3VuZGVmaW5lZCwgJ1JGJywgMF0sCiAgICAgICAgJ1NCRCc6IFt1bmRlZmluZWQsICckJ10sCiAgICAgICAgJ1NFSyc6IFt1bmRlZmluZWQsICdrcicsIDJdLAogICAgICAgICdTR0QnOiBbdW5kZWZpbmVkLCAnJCddLAogICAgICAgICdTSFAnOiBbdW5kZWZpbmVkLCAnwqMnXSwKICAgICAgICAnU0xMJzogW3VuZGVmaW5lZCwgdW5kZWZpbmVkLCAwXSwKICAgICAgICAnU09TJzogW3VuZGVmaW5lZCwgdW5kZWZpbmVkLCAwXSwKICAgICAgICAnU1JEJzogW3VuZGVmaW5lZCwgJyQnXSwKICAgICAgICAnU1NQJzogW3VuZGVm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XIuCiAgICAgICAgICogRXhhbXBsZTogMmAsYDM0NS42NwogICAgICAgICAqLwogICAgICAgIEdyb3VwOiAxLAogICAgICAgIC8qKgogICAgICAgICAqIExpc3QtaXRlbSBzZXBhcmF0b3IuCiAgICAgICAgICogRXhhbXBsZTogIm9uZSwgdHdvLCBhbmQgdGhyZWUiCiAgICAgICAgICovCiAgICAgICAgTGlzdDogMiwKICAgICAgICAvKioKICAgICAgICAgKiBTaWduIGZvciBwZXJjZW50YWdlIChvdXQgb2YgMTAwKS4KICAgICAgICAgKiBFeGFtcGxlOiAyMy40JQogICAgICAgICAqLwogICAgICAgIFBlcmNlbnRTaWduOiAzLAogICAgICAgIC8qKgogICAgICAgICAqIFNpZ24gZm9yIHBvc2l0aXZlIG51bWJlcnMuCiAgICAgICAgICogRXhhbXBsZTogKzIzCiAgICAgICAgICovCiAgICAgICAgUGx1c1NpZ246IDQsCiAgICAgICAgLyoqCiAgICAgICAgICogU2lnbiBmb3IgbmVnYXRpdmUgbnVtYmVycy4KICAgICAgICAgKiBFeGFtcGxlOiAtMjMKICAgICAgICAgKi8KICAgICAgICBNaW51c1NpZ246IDUsCiAgICAgICAgLyoqCiAgICAgICAgICogQ29tcHV0ZXIgbm90YXRpb24gZm9yIGV4cG9uZW50aWFsIHZhbHVlIChuIHRpbWVzIGEgcG93ZXIgb2YgMTApLgogICAgICAgICAqIEV4YW1wbGU6IDEuMkUzCiAgICAgICAgICovCiAgICAgICAgRXhwb25lbnRpYWw6IDYsCiAgICAgICAgLyoqCiAgICAgICAgICogSHVtYW4tcmVhZGFibGUgZm9ybWF0IG9mIGV4cG9uZW50aWFsLgogICAgICAgICAqIEV4YW1wbGU6IDEuMngxMDMKICAgICAgICAgKi8KICAgICAgICBTdXBlcnNjcmlwdGluZ0V4cG9uZW50OiA3LAogICAgICAgIC8qKgogICAgICAgICAqIFNpZ24gZm9yIHBlcm1pbGxlIChvdXQgb2YgMTAwMCkuCiAgICAgICAgICogRXhhbXBsZTogMjMuNOKAsAogICAgICAgICAqLwogICAgICAgIFBlck1pbGxlOiA4LAogICAgICAgIC8qKgogICAgICAgICAqIEluZmluaXR5LCBjYW4gYmUgdXNlZCB3aXRoIHBsdXMgYW5kIG1pbnVzLgogICAgICAgICAqIEV4YW1wbGU6IOKIniwgK+KIniwgLeKIngogICAgICAgICAqLwogICAgICAgIEluZmluaXR5OiA5LAogICAgICAgIC8qKgogICAgICAgICAqIE5vdCBhIG51bWJlci4KICAgICAgICAgKiBFeGFtcGxlOiBOYU4KICAgICAgICAgKi8KICAgICAgICBOYU46IDEwLAogICAgICAgIC8qKgogICAgICAgICAqIFN5bWJvbCB1c2VkIGJldHdlZW4gdGltZSB1bml0cy4KICAgICAgICAgKiBFeGFtcGxlOiAxMDo1MgogICAgICAgICAqLwogICAgICAgIFRpbWVTZXBhcmF0b3I6IDExLAogICAgICAgIC8qKgogICAgICAgICAqIERlY2ltYWwgc2VwYXJhdG9yIGZvciBjdXJyZW5jeSB2YWx1ZXMgKGZhbGxiYWNrIHRvIGBEZWNpbWFsYCkuCiAgICAgICAgICogRXhhbXBsZTogJDIsMzQ1LjY3CiAgICAgICAgICovCiAgICAgICAgQ3VycmVuY3lEZWNpbWFsOiAxMiwKICAgICAgICAvKioKICAgICAgICAgKiBHcm91cCBzZXBhcmF0b3IgZm9yIGN1cnJlbmN5IHZhbHVlcyAoZmFsbGJhY2sgdG8gYEdyb3VwYCkuCiAgICAgICAgICogRXhhbXBsZTogJDIsMzQ1LjY3CiAgICAgICAgICovCiAgICAgICAgQ3VycmVuY3lHcm91cDogMTMsCiAgICB9OwogICAgTnVtYmVyU3ltYm9sW051bWJlclN5bWJvbC5EZWNpbWFsXSA9ICdEZWNpbWFsJzsKICAgIE51bWJlclN5bWJvbFtOdW1iZXJTeW1ib2wuR3JvdXBdID0gJ0dyb3VwJzsKICAgIE51bWJlclN5bWJvbFtOdW1iZXJTeW1ib2wuTGlzdF0gPSAnTGlzdCc7CiAgICBOdW1iZXJTeW1ib2xbT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FycmF5IG9mICpmcm9tLXRpbWUsIHRvLXRpbWUqLAogICAgICogb3IgbnVsbCBpZiBubyBwZXJpb2RzIGFyZSBhdmFpbGFibGUuCiAgICAgKgogICAgICovCiAgICBmdW5jdGlvbiBnZXRMb2NhbGVFeHRyYURheVBlcmlvZFJ1bGVzKGxvY2FsZSkgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBkYXRhID0gZmluZExvY2FsZURhdGEobG9jYWxlKTsKICAgICAgICBjaGVja0Z1bGxEYXRhKGRhdGEpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBydWxlcyA9IGRhdGFbTG9jYWxlRGF0YUluZGV4LkV4dHJhRGF0YV1bMiAvKiBFeHRyYURheVBlcmlvZHNSdWxlcyAqL10gfHwgW107CiAgICAgICAgcmV0dXJuIHJ1bGVzLm1hcCgoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBydWxlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAocnVsZSkgPT4gewogICAgICAgICAgICBpZiAodHlwZW9mIHJ1bGUgPT09ICdzdHJpbmcnKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gZXh0cmFjdFRpbWUocnVsZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIFtleHRyYWN0VGltZShydWxlWzBdKSwgZXh0cmFjdFRpbWUocnVsZVsxXSldOwogICAgICAgIH0pKTsKICAgIH0KICAgIC8qKgogICAgICogUmV0cmlldmVzIGxvY2FsZS1zcGVjaWZpYyBkYXkgcGVyaW9kcywgd2hpY2ggaW5kaWNhdGUgcm91Z2hseSBob3cgYSBkYXkgaXMgYnJva2VuIHVwCiAgICAgKiBpbiBkaWZmZXJlbnQgbGFuZ3VhZ2VzLgogICAgICogRm9yIGV4YW1wbGUsIGZvciBgZW4tVVNgLCBwZXJpb2RzIGFyZSBtb3JuaW5nLCBub29uLCBhZnRlcm5vb24sI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HsKICAgICAgICAgICAgbWF0Y2ggPSBEQVRFX0ZPUk1BVFNfU1BMSVQuZXhlYyhmb3JtYXQpOwogICAgICAgICAgICBpZiAobWF0Y2gpIHsKICAgICAgICAgICAgICAgIHBhcnRzID0gcGFydHMuY29uY2F0KG1hdGNoLnNsaWNlKDEpKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHBhcnQgPSBwYXJ0cy5wb3AoKTsKICAgICAgICAgICAgICAgIGlmICghcGFydCkgewogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZm9ybWF0ID0gcGFydDsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHBhcnRzLnB1c2goZm9ybWF0KTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgZGF0ZVRpbWV6b25lT2Zmc2V0ID0gZGF0ZS5nZXRUaW1lem9uZU9mZnNldCgpOwogICAgICAgIGlmICh0aW1lem9uZSkgewogICAgICAgICAgICBkYXRlVGltZXpvbmVPZmZzZXQgPSB0aW1lem9uZVRvT2Zmc2V0KHRpbWV6b25lLCBkYXRlVGltZXpvbmVPZmZzZXQpOwogICAgICAgICAgICBkYXRlID0gY29udmVydFRpbWV6b25lVG9Mb2NhbChkYXRlLCB0aW1lem9uZSwgdHJ1ZSk7CiAgICAgICAgfQogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgdGV4dCA9ICcnOwogICAgICAgIHBhcnRzLmZvckVhY2goKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHZhbHVlID0+IHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fS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2NhbGUsIEZvcm1hdFdpZHRoLlNob3J0KTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlICdtZWRpdW1EYXRlJzoKICAgICAgICAgICAgICAgIGZvcm1hdFZhbHVlID0gZ2V0TG9jYWxlRGF0ZUZvcm1hdChsb2NhbGUsIEZvcm1hdFdpZHRoLk1lZGl1bSk7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSAnbG9uZ0RhdGUnOgogICAgICAgICAgICAgICAgZm9ybWF0VmFsdWUgPSBnZXRMb2NhbGVEYXRlRm9ybWF0KGxvY2FsZSwgRm9ybWF0V2lkdGguTG9uZyk7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSAnZnVsbERhdGUnOgogICAgICAgICAgICAgICAgZm9ybWF0VmFsdWUgPSBnZXRMb2NhbGVEYXRlRm9ybWF0KGxvY2FsZSwgRm9ybWF0V2lkdGguRnVsbCk7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSAnc2hvcnRUaW1lJzoKICAgICAgICAgICAgICAgIGZvcm1hdFZhbHVlID0gZ2V0TG9jYWxlVGltZUZvcm1hdChsb2NhbGUsIEZvcm1hdFdpZHRoLlNob3J0KTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlICdtZWRpdW1UaW1lJzoKICAgICAgICAgICAgICAgIGZvcm1hdFZhbHVlID0gZ2V0TG9jYWxlVGltZUZvcm1hdChsb2NhbGUsIEZvcm1hdFdpZHRoLk1lZGl1bSk7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSAnbG9uZ1RpbWUnOgogICAgICAgICAgICAgICAgZm9ybWF0VmFsdWUgPSBnZXRMb2NhbGVUaW1lRm9ybWF0KGxvY2FsZSwgRm9ybWF0V2lkdGguTG9uZyk7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSAnZnVsbFR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ZV0pOwogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGNhc2UgJ2xvbmcnOgogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgbG9uZ1RpbWUgPSBnZXROYW1lZEZvcm1hdChsb2NhbGUsICdsb25nVGltZScpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgbG9uZ0RhdGUgPSBnZXROYW1lZEZvcm1hdChsb2NhbGUsICdsb25nRGF0ZScpOwogICAgICAgICAgICAgICAgZm9ybWF0VmFsdWUgPQogICAgICAgICAgICAgICAgICAgIGZvcm1hdERhdGVUaW1lKGdldExvY2FsZURhdGVUaW1lRm9ybWF0KGxvY2FsZSwgRm9ybWF0V2lkdGguTG9uZyksIFtsb25nVGltZSwgbG9uZ0RhdGVdKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlICdmdWxsJzoKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGZ1bGxUaW1lID0gZ2V0TmFtZWRGb3JtYXQobG9jYWxlLCAnZnVsbFRpbWUnKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGZ1bGxEYXRlID0gZ2V0TmFtZWRGb3JtYXQobG9jYWxlLCAnZnVsbERhdGUnKTsKICAgICAgICAgICAgICAgIGZvcm1hdFZhbHVlID0KICAgICAgICAgICAgICAgICAgICBmb3JtYXREYXRlVGltZShnZXRMb2NhbGVEYXRlVGltZUZvcm1hdChsb2NhbGUsIEZvcm1hdFdpZHRoLkZ1bGwpLCBbZnVsbFRpbWUsIGZ1bGxEYXRlXSk7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICB9CiAgICAgICAgaWYgKGZvcm1hdFZhbHVlKSB7CiAgICAgICAgICAgIE5BTUVEX0ZPUk1BVFNbbG9jYWxlSWRdW2Zvcm1hdF0gPSBmb3JtYXRWYWx1ZTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGZvcm1hdFZhbHVlOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHN0cgogICAgICogQHBhcmFtIHs/fSBvcHRfdmFsdWVzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBmb3JtYXREYXRlVGltZShzdHIsIG9wdF92YWx1ZXMpIHsKICAgICAgICBpZiAob3B0X3ZhbHVlcykgewogICAgICAgICAgICBzdHIgPSBzdHIucmVwbGFjZSgvXHsoW159XSspfS9nLCAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbWF0Y2gKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBrZXkKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGZ1bmN0aW9uIChtYXRjaCwga2V5KSB7CiAgICAgICAgICAgICAgICByZXR1cm4gKG9wdF92YWx1ZXMgIT0gbnVsbCAmJiBrZXkgaW4gb3B0X3ZhbHVlcykgPyBvcHRfdmFsdWVzW2tleV0gOiBtYXRjaDsKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICByZXR1cm4gc3RyOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IG51bQogICAgICogQHBhcmFtIHs/fSBkaWdpdHMKICAgICAqIEBwYXJhbSB7Pz19IG1pbnVzU2lnbgogICAgICogQHBhcmFtIHs/PX0gdHJpbQogICAgICogQHBhcmFtIHs/PX0gbmVnV3JhcAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gcGFkTnVtYmVyKG51bSwgZGlnaXRzLCBtaW51c1NpZ24gPSAnLScsIHRyaW0sIG5lZ1dyYXApIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IG5lZyA9ICcnOwogICAgICAgIGlmIChudW0gPCAwIHx8IChuZWdXcmFwICYmIG51bSA8PSAwKSkgewogICAgICAgICAgICBpZiAobmVnV3JhcCkgewogICAgICAgICAgICAgICAgbnVtID0gLW51bSArIDE7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBudW0gPSAtbnVtOwogICAgICAgICAgICAgICAgbmVnID0gbWludXNTaWduOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgc3RyTnVtID0gU3RyaW5nKG51bSk7CiAgICAgICAgd2hpbGUgKHN0ck51bS5sZW5ndGggPCBkaWdpdHMpIHsKICAgICAgICAgICAgc3RyTnVtID0gJzAnICsgc3RyTnVtOwogICAgICAgIH0KICAgICAgICBpZiAodHJpbSkgewogICAgICAgICAgICBzdHJOdW0gPSBzdHJOdW0uc3Vic3RyKHN0ck51bS5sZW5ndGggLSBkaWdpdHMpOwogICAgICAgIH0KICAgICAgICByZXR1cm4gbmVnICsgc3RyTnVtOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IG1pbGxpc2Vjb25kcwogICAgICogQHBhcmFtIHs/fSBkaWdpdHMKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGZvcm1hdEZyYWN0aW9uYWxTZWNvbmRzKG1pbGxpc2Vjb25kcywgZGlnaXRzKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHN0ck1zID0gcGFkTnVtYmVyKG1pbGxpc2Vjb25kcywgMyk7CiAgICAgICAgcmV0dXJuIHN0ck1zLnN1YnN0cigwLCBkaWdpdHMpOwogICAgfQogICAgLyoqCiAgICAgKiBSZXR1cm5zIGEgZGF0ZSBmb3JtYXR0ZXIgdGhhdCB0cmFuc2Zvcm1zIGEgZGF0ZSBpbnRvIGl0cyBsb2NhbGUgZGlnaXQgcmVwcmVzZW50YXRpb24KICAgICAqIEBwYXJhbSB7P30gbmFtZQogICAgICogQHBhcmFtIHs/fSBzaXplCiAgICAgKiBAcGFyYW0gez89fSBvZmZzZXQKICAgICAqIEBwYXJhbSB7Pz19IHRyaW0KICAgICAqIEBwYXJhbSB7Pz19IG5lZ1dyYXAKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGRhdGVHZXR0ZXIobmFtZSwgc2l6ZSwgb2Zmc2V0ID0gMCwgdHJpbSA9IGZhbHNlLCBuZWdXcmFwID0gZmFsc2UpIHsKICAgICAgICByZXR1cm4gKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZGF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gbG9jYWxlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiAoZGF0ZSwgbG9jYWxlKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHBhcnQgPSBnZXREYXRlUGFydChuYW1lLCBkYXRlKTsKICAgICAgICAgICAgaWYgKG9mZnNldCA+IDAgfHwgcGFydCA+IC1vZmZzZXQpIHsKICAgICAgICAgICAgICAgIHBhcnQgKz0gb2Zmc2V0OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChuYW1lID09PSBEYXRlVHlwZS5Ib3VycykgewogICAgICAgICAgICAgICAgaWYgKHBhcnQgPT09IDAgJiYgb2Zmc2V0ID09PSAtMTIpIHsKICAgICAgICAgICAgICAgICAgICBwYXJ0ID0gMTI7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAobmFtZSA9PT0gRGF0ZVR5cGUuRnJhY3Rpb25hbFNlY29uZHMpIHsKICAgICAgICAgICAgICAgIHJldHVybiBmb3JtYXRGcmFjdGlvbmFsU2Vjb25kcyhwYXJ0LCBzaXplKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGxvY2FsZU1pbnVzID0gZ2V0TG9jYWxlTnVtYmVyU3ltYm9sKGxvY2FsZSwgTnVtYmVyU3ltYm9sLk1pbnVzU2lnbik7CiAgICAgICAgICAgIHJldHVybiBwYWROdW1iZXIocGFydCwgc2l6ZSwgbG9jYWxlTWludXMsIHRyaW0sIG5lZ1dyYXApOwogICAgICAgIH0pOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHBhcnQKICAgICAqIEBwYXJhbSB7P30gZGF0ZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0RGF0ZVBhcnQocGFydCwgZGF0ZSkgewogICAgICAgIHN3aXRjaCAocGFydCkgewogICAgICAgICAgICBjYXNlIERhdGVUeXBlLkZ1bGxZZWFyOgogICAgICAgICAgICAgICAgcmV0dXJuIGRhdGUuZ2V0RnVsbFllYXIoKTsKICAgICAgICAgICAgY2FzZSBEYXRlVHlwZS5Nb250aDoKICAgICAgICAgICAgICAgIHJldHVybiBkYXRlLmdldE1vbnRoKCk7CiAgICAgICAgICAgIGNhc2UgRGF0ZVR5cGUuRGF0ZToKICAgICAgICAgICAgICAgIHJldHVybiBkYXRlLmdldERhdGUoKTsKICAgICAgICAgICAgY2FzZSBEYXRlVHlwZS5Ib3VyczoKICAgICAgICAgICAgICAgIHJldHVybiBkYXRlLmdldEhvdXJzKCk7CiAgICAgICAgICAgIGNhc2UgRGF0ZVR5cGUuTWludXRlczoKICAgICAgICAgICAgICAgIHJldHVybiBkYXRlLmdldE1pbnV0ZXMoKTsKICAgICAgICAgICAgY2FzZSBEYXRlVHlwZS5TZWNvbmRzOgogICAgICAgICAgICAgICAgcmV0dXJuIGRhdGUuZ2V0U2Vjb25kcygpOwogICAgICAgICAgICBjYXNlIERhdGVUeXBlLkZyYWN0aW9uYWxTZWNvbmRzOgogICAgICAgICAgICAgICAgcmV0dXJuIGRhdGUuZ2V0TWlsbGlzZ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W0gez99IGRhdGUKICAgICAqIEBwYXJhbSB7P30gbG9jYWxlCiAgICAgKiBAcGFyYW0gez99IG5hbWUKICAgICAqIEBwYXJhbSB7P30gd2lkdGgKICAgICAqIEBwYXJhbSB7P30gZm9ybQogICAgICogQHBhcmFtIHs/fSBleHRlbmRlZAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0RGF0ZVRyYW5zbGF0aW9uKGRhdGUsIGxvY2FsZSwgbmFtZSwgd2lkdGgsIGZvcm0sIGV4dGVuZGVkKSB7CiAgICAgICAgc3dpdGNoIChuYW1lKSB7CiAgICAgICAgICAgIGNhc2UgVHJhbnNsYXRpb25UeXBlLk1vbnRoczoKICAgICAgICAgICAgICAgIHJldHVybiBnZXRMb2NhbGVNb250aE5hbWVzKGxvY2FsZSwgZm9ybSwgd2lkdGgpW2RhdGUuZ2V0TW9udGgoKV07CiAgICAgICAgICAgIGNhc2UgVHJhbnNsYXRpb25UeXBlLkRheXM6CiAgICAgICAgICAgICAgICByZXR1cm4gZ2V0TG9jYWxlRGF5TmFtZXMobG9jYWxlLCBmb3JtLCB3aWR0aClbZGF0ZS5nZXREYXkoKV07CiAgICAgICAgICAgIGNhc2UgVHJhbnNsYXRpb25UeXBlLkRheVBlcmlvZHM6CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBjdXJyZW50SG91cnMgPSBkYXRlLmdldEhvdXJzKCk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBjdXJyZW50TWludXRlcyA9IGRhdGUuZ2V0TWludXRlcygpOwogICAgICAgICAgICAgICAgaWYgKGV4dGVuZGVkKSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHJ1bGVzID0gZ2V0TG9jYWxlRXh0cmFEYXlQZXJpb2RSdWxlcyhsb2NhbGUpOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBkYXlQZXJpb2RzID0gZ2V0TG9jYWxlRXh0cmFEYXlQZXJpb2RzKGxvY2FsZSwgZm9ybSwgd2lkdGgpOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBsZXQgcmVzdWx0OwogICAgICAgICAgICAgICAgICAgIHJ1bGVzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcnVsZQogICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gaW5kZXgKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgIChydWxlLCBpbmRleCkgPT4gewogICAgICAgICAgICAgICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShydWxlKSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbW9ybmluZywgYWZ0ZXJub29uLCBldmVuaW5nLCBuaWdodAogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgeyBob3VyczogaG91cnNGcm9tLCBtaW51dGVzOiBtaW51dGVzRnJvbSB9ID0gcnVsZVswXTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHsgaG91cnM6IGhvdXJzVG8sIG1pbnV0ZXM6IG1pbnV0ZXNUbyB9ID0gcnVsZVsxXTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjdXJyZW50SG91cnMgPj0gaG91cnNGcm9tICYmIGN1cnJlbnRNaW51dGVzID49IG1pbnV0ZXNGcm9tICYmCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGN1cnJlbnRIb3VycyA8IGhvdXJzVG8gfHwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGN1cnJlbnRIb3VycyA9PT0gaG91cnNUbyAmJiBjdXJyZW50TWludXRlcyA8IG1pbnV0ZXNUbykpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ID0gZGF5UGVyaW9kc1tpbmRleF07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7IC8vIG5vb24gb3IgbWlkbmlnaHQKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIG5vb24gb3IgbWlkbmlnaHQKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHsgaG91cnMsIG1pbnV0ZXMgfSA9IHJ1bGU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaG91cnMgPT09IGN1cnJlbnRIb3VycyAmJiBtaW51dGVzID09PSBjdXJyZW50TWludXRlcykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCA9IGRheVBlcmlvZHNbaW5kZXhdOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgICAgIGlmIChyZXN1bHQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvLyBpZiBubyBydWxlcyBmb3IgdGhlIGRheSBwZXJpb2RzLCB3ZSB1c2UgYW0vcG0gYnkgZGVmYXVsdAogICAgICAgICAgICAgICAgcmV0dXJuIGdldExvY2FsZURheVBlcmlvZHMobG9jYWxlLCBmb3JtLCAoLyoqIEB0eXBlIHs/fSAqLyAod2lkdGgpKSlbY3VycmVudEhvdXJzIDwgMTIgPyAwIDogMV07CiAgICAgICAgICAgIGNhc2UgVHJhbnNsYXRpb25UeXBlLkVyY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gdGhlIHdpZHRoIChlZzogc2hvcnQgPSArMDQzMCwgc2hvcnQ6R01UID0gR01UKzQsIGxvbmcgPSBHTVQrMDQ6MzAsCiAgICAgKiBleHRlbmRlZCA9ICswNDozMCkKICAgICAqIEBwYXJhbSB7P30gd2lkdGgKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHRpbWVab25lR2V0dGVyKHdpZHRoKSB7CiAgICAgICAgcmV0dXJuICgvKioKICAgICAgICAgKiBAcGFyYW0gez99IGRhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGxvY2FsZQogICAgICAgICAqIEBwYXJhbSB7P30gb2Zmc2V0CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiAoZGF0ZSwgbG9jYWxlLCBvZmZzZXQpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB6b25lID0gLTEgKiBvZmZzZXQ7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbWludXNTaWduID0gZ2V0TG9jYWxlTnVtYmVyU3ltYm9sKGxvY2FsZSwgTnVtYmVyU3ltYm9sLk1pbnVzU2lnbik7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaG91cnMgPSB6b25lID4gMCA/IE1hdGguZmxvb3Ioem9uZSAvIDYwKSA6IE1hdGguY2VpbCh6b25lIC8gNjApOwogICAgICAgICAgICBzd2l0Y2ggKHdpZHRoKSB7CiAgICAgICAgICAgICAgICBjYXNlIFpvbmVXaWR0aC5TaG9ydDoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gKCh6b25lID49IDApID8gJysnIDogJycpICsgcGFkTnVtYmVyKGhvdXJzLCAyLCBtaW51c1NpZ24pICsKICAgICAgICAgICAgICAgICAgICAgICAgcGFkTnVtYmVyKE1hdGguYWJzKHpvbmUgJSA2MCksIDIsIG1pbnVzU2lnbik7CiAgICAgICAgICAgICAgICBjYXNlIFpvbmVXaWR0aC5TaG9ydEdNVDoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ0dNVCcgKyAoKHpvbmUgPj0gMCkgPyAnKycgOiAnJykgKyBwYWROdW1iZXIoaG91cnMsIDEsIG1pbnVzU2lnbik7CiAgICAgICAgICAgICAgICBjYXNlIFpvbmVXaWR0aC5Mb25nOgogICAgICAgICAgICAgICAgICAgIHJldHVybiAnR01UJyArICgoem9uZSA+PSAwKSA/ICcrJyA6ICcnKSArIHBhZE51bWJlcihob3VycywgMiwgbWludXNTaWduKSArICc6JyArCiAgICAgICAgICAgICAgICAgICAgICAgIHBhZE51bWJlcihNYXRoLmFicyh6b25lICUgNjApLCAyLCBtaW51c1NpZ24pOwogICAgICAgICAgICAgICAgY2FzZSBab25lV2lkdGguRXh0ZW5kZWQ6CiAgICAgICAgICAgICAgICAgICAgaWYgKG9mZnNldCA9PT0gMCkgewogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1onOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICgoem9uZSA+PSAwKSA/ICcrJyA6ICcnKSArIHBhZE51bWJlcihob3VycywgMiwgbWludXNTaWduKSArICc6JyArCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWROdW1iZXIoTWF0aC5hYnMoem9uZSAlIDYwKSwgMiwgbWludXNTaWduKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgVW5rbm93biB6b25lIHdpZHRoICIke3dpZHRofSJgKTsKICAgICAgICAgICAgfQogICAgICAgIH0pOwogICAgfQogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgSkFOVUFSWSA9IDA7CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBUSFVSU0RBWSA9IDQ7CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30geWVhcgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0Rmlyc3RUaHVyc2RheU9mWWVhcih5ZWFyKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGZpcnN0RGF5T2ZZZWFyID0gKG5ldyBEYXRlKHllYXIsIEpBTlVBUlksIDEpKS5nZXREYXkoKTsKICAgICAgICByZXR1cm4gbmV3IERhdGUoeWVhciwgMCwgMSArICgoZmlyc3REYXlPZlllYXIgPD0gVEhVUlNEQVkpID8gVEhVUlNEQVkgOiBUSFVSU0RBWSArIDcpIC0gZmlyc3REYXlPZlllYXIpOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IGRhdGV0aW1lCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBnZXRUaHVyc2RheVRoaXNXZWVrKGRhdGV0aW1lKSB7CiAgICAgICAgcmV0dXJuIG5ldyBEYXRlKGRhdGV0aW1lLmdldEZ1bGxZZWFyKCksIGRhdGV0aW1lLmdldE1vbnRoKCksIGRhdGV0aW1lLmdldERhdGUoKSArIChUSFVSU0RBWSAtIGRhdGV0aW1lLmdldERheSgpKSk7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gc2l6ZQogICAgICogQHBhcmFtIHs/PX0gbW9udGhCYXNlZAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gd2Vla0dldHRlcihzaXplLCBtb250aEJhc2VkID0gZmFsc2UpIHsKICAgICAgICByZXR1cm4gKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZGF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gbG9jYWxlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiAoZGF0ZSwgbG9jYWxlKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHJlc3VsdDsKICAgICAgICAgICAgaWYgKG1vbnRoQmFzZWQpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IG5iRGF5c0JlZm9yZTFzdERheU9mTW9udGggPSBuZXcgRGF0ZShkYXRlLmdldEZ1bGxZZWFyKCksIGRhdGUuZ2V0TW9udGgoKSwgMSkuZ2V0RGF5KCkgLSAxOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgdG9kYXkgPSBkYXRlLmdldERhdGUoKTsKICAgICAgICAgICAgICAgIHJlc3VsdCA9IDEgKyBNYXRoLmZsb29yKCh0b2RheSArIG5iRGF5c0JlZm9yZTFzdERheU9mTW9udGgpIC8gNyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBmaXJzdFRodXJzID0gZ2V0Rmlyc3RUaHVyc2RheU9mWWVhcihkYXRlLmdldEZ1bGxZZWFyKCkpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgdGhpc1RodXJzID0gZ2V0VGh1cnNkYXlUaGlzV2VlayhkYXRlKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGRpZmYgPSB0aGlzVGh1cnMuZ2V0VGltZSgpIC0gZmlyc3RUaHVycy5nZXRUaW1lKCk7CiAgICAgICAgICAgICAgICByZXN1bHQgPSAxICsgTWF0aC5yb3VuZChkaWZmIC8gNi4wNDhlOCk7IC8vIDYuMDQ4ZTggbXMgcGVyIHdlZWsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4g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YgdGhlIHllYXIsIHBhZGRlZCAoMDAwLTk5OSkuIChlLmcuIEFEIDIwMDEgPT4gMDEsIEFEIDIwMTAgPT4gMTApCiAgICAgICAgICAgIGNhc2UgJ3l5eSc6CiAgICAgICAgICAgICAgICBmb3JtYXR0ZXIgPSBkYXRlR2V0dGVyKERhdGVUeXBlLkZ1bGxZZWFyLCAzLCAwLCBmYWxzZSwgdHJ1ZSk7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgLy8gNCBkaWdpdCByZXByZXNlbnRhdGlvbiBvZiB0aGUgeWVhciAoZS5nLiBBRCAxID0+IDAwMDEsIEFEIDIwMTAgPT4gMjAxMCkKICAgICAgICAgICAgY2FzZSAneXl5eSc6CiAgICAgICAgICAgICAgICBmb3JtYXR0ZXIgPSBkYXRlR2V0dGVyKERhdGVUeXBlLkZ1bGxZZWFyLCA0LCAwLCBmYWxzZSwgdHJ1ZSk7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgLy8gTW9udGggb2YgdGhlIHllYXIgKDEtMTIpLCBudW1lcmljCiAgICAgICAgICAgIGNhc2UgJ00nOgogICAgICAgICAgICBjYXNlICdMJzoKICAgICAgICAgICAgICAgIGZvcm1hdHRlciA9IGRhdGVHZXR0ZXIoRGF0ZVR5cGUuTW9udGgsIDEsIDEpOwogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGNhc2UgJ01NJzoKICAgICAgICAgICAgY2FzZSAnTEwnOgogICAgICAgICAgICAgICAgZm9ybWF0dGVyID0gZGF0ZUdldHRlcihEYXRlVHlwZS5Nb250aCwgMiwgMSk7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgLy8gTW9udGggb2YgdGhlIHllYXIgKEphbnVhcnksIC4uLiksIHN0cmluZywgZm9ybWF0CiAgICAgICAgICAgIGNhc2UgJ01NTSc6CiAgICAgICAgICAgICAgICBmb3JtYXR0ZXIgPSBkYXRlU3RyR2V0dGVyKFRyYW5zbGF0aW9uVHlwZS5Nb250aHMsIFRyYW5zbGF0aW9uV2lkdGguQWJicmV2aWF0ZWQpOwogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGNhc2UgJ01NTU0nOgogICAgICAgICAgICAgICAgZm9ybWF0dGVyID0gZGF0ZVN0ckdldHRlcihUcmFuc2xhdGlvblR5cGUuTW9udGhzLCBUcmFuc2xhdGlvbldpZHRoLldpZGUpOwogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGNhc2UgJ01NTU1NJzoKICAgICAgICAgICAgICAgIGZvcm1hdHRlciA9IGRhdGVTdHJHZXR0ZXIoVHJhbnNsYXRpb25UeXBlLk1vbnRocywgVHJhbnNsYXRpb25XaWR0aC5OYXJyb3cpOwogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIC8vIE1vbnRoIG9mIHRoZSB5ZWFyIChKYW51YXJ5LCAuLi4pLCBzdHJpbmcsIHN0YW5kYWxvbmUKICAgICAgICAgICAgY2FzZSAnTExMJzoKICAgICAgICAgICAgICAgIGZvcm1hdHRlciA9CiAgICAgICAgICAgICAgICAgICAgZGF0ZVN0ckdldHRlcihUcmFuc2xhdGlvblR5cGUuTW9udGhzLCBUcmFuc2xhdGlvbldpZHRoLkFiYnJldmlhdGVkLCBGb3JtU3R5bGUuU3RhbmRhbG9uZSk7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSAnTExMTCc6CiAgICAgICAgICAgICAgICBmb3JtYXR0ZXIgPQogICAgICAgICAgICAgICAgICAgIGRhdGVTdHJHZXR0ZXIoVHJhbnNsYXRpb25UeXBlLk1vbnRocywgVHJhbnNsYXRpb25XaWR0aC5XaWRlLCBGb3JtU3R5bGUuU3RhbmRhbG9uZSk7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSAnTExMTEwnOgogICAgICAgICAgICAgICAgZm9ybWF0dGVyID0KICAgICAgICAgICAgICAgICAgICBkYXRlU3RyR2V0dGVyKFRyYW5zbGF0aW9uVHlwZS5Nb250aHMsIFRyYW5zbGF0aW9uV2lkdGguTmFycm93LCBGb3JtU3R5bGUuU3RhbmRhbG9uZSk7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgLy8gV2VlayBvZiB0aGUgeWVhciAoMSwgLi4uIDUyKQogICAgICAgICAgICBjYXNlICd3JzoKICAgICAgICAgICAgICAgIGZvcm1hdHRlciA9IHdlZWtHZXR0ZXIoMSk7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSAnd3cnOgogICAgICAgICAgICAgICAgZm9ybWF0dGVyID0gd2Vla0dldHRlcigyKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAvLyBXZWVrIG9mIHRoZSBtb250aCAoMSwgLi4uKQogICAgICAgICAgICBjYXNlICdXJzoKICAgICAgICAgICAgICAgIGZvcm1hdHRlciA9IHdlZWtHZXR0ZXIoMSwgdHJ1ZSk7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgLy8gRGF5IG9mIHRoZSBtb250aCAoMS0zMSkKICAgICAgICAgICAgY2FzZSAnZCc6CiAgICAgICAgICAgICAgICBmb3JtYXR0ZXIgPSBkYXRlR2V0dGVyKERhdGVUeXBlLkRhdGUsIDEpOwogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGNhc2UgJ2RkJzoKICAgICAgICAgICAgICAgIGZvcm1hdHRlciA9IGRhdGVHZXR0ZXIoRGF0ZVR5cGUuRGF0ZSwgMik7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgLy8gRGF5IG9mIHRoZSBXZWVrCiAgICAgICAgICAgIGNhc2UgJ0UnOgogICAgICAgICAgICBjYXNlICdFRSc6CiAgICAgICAgICAgIGNhc2UgJ0VFRSc6CiAgICAgICAgICAgICAgICBmb3JtYXR0ZXIgPSBkYXRlU3RyR2V0dGVyKFRyYW5zbGF0aW9uVHlwZS5EYXlzLCBUcmFuc2xhdGlvbldpZHRoLkFiYnJldmlhdGVkKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlICdFRUVFJzoKICAgICAgICAgICAgICAgIGZvcm1hdHRlciA9IGRhdGVTdHJHZXR0ZXIoVHJhbnNsYXRpb25UeXBlLkRheXMsIFRyYW5zbGF0aW9uV2lkdGguV2lkZSk7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSAnRUVFRUUnOgogICAgICAgICAgICAgICAgZm9ybWF0dGVyID0gZGF0ZVN0ckdldHRlcihUcmFuc2xhdGlvblR5cGUuRGF5cywgVHJhbnNsYXRpb25XaWR0aC5OYXJyb3cpOwogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGNhc2UgJ0VFRUVFRSc6CiAgICAgICAgICAgICAgICBmb3JtYXR0ZXIgPSBkYXRlU3RyR2V0dGVyKFRyYW5zbGF0aW9uVHlwZS5EYXlzLCBUcmFuc2xhdGlvbldpZHRoLlNob3J0KTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAvLyBHZW5lcmljIHBlcmlvZCBvZiB0aGUgZGF5IChhbS1wbSkKICAgICAgICAgICAgY2FzZSAnYSc6CiAgICAgICAgICAgIGNhc2UgJ2FhJzoKICAgICAgICAgICAgY2FzZSAnYWFhJzoKICAgICAgICAgICAgICAgIGZvcm1hdHRlciA9IGRhdGVTdHJHZXR0ZXIoVHJhbnNsYXRpb25UeXBlLkRheVBlcmlvZHMsIFRyYW5zbGF0aW9uV2lkdGguQWJicmV2aWF0ZWQpOwogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGNhc2UgJ2FhYWEnOgogICAgICAgICAgICAgICAgZm9ybWF0dGVyID0gZGF0ZVN0ckdldHRlcihUcmFuc2xhdGlvblR5cGUuRGF5UGVyaW9kcywgVHJhbnNsYXRpb25XaWR0aC5XaWRlKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlICdhYWFhYSc6CiAgICAgICAgICAgICAgICBmb3JtYXR0ZXIgPSBkYXRlU3RyR2V0dGVyKFRyYW5zbGF0aW9uVHlwZS5EYXlQZXJpb2RzLCBUcmFuc2xhdGlvbldpZHRoLk5hcnJvdyk7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgLy8gRXh0ZW5kZWQgcGVyaW9kIG9mIHRoZSBkYXkgKG1pZG5pZ2h0LCBhdCBuaWdodCwgLi4uKSwgc3RhbmRhbG9uZQogICAgICAgICAgICBjYXNlICdiJzoKICAgICAgICAgICAgY2FzZSAnYmInOgogICAgICAgICAgICBjYXNlICdiYmInOgogICAgICAgICAgICAgICAgZm9ybWF0dGVyID0gZGF0ZVN0ckdldHRlcihUcmFuc2xhdGlvblR5cGUuRGF5UGVyaW9kcywgVHJhbnNsYXRpb25XaWR0aC5BYmJyZXZpYXRlZCwgRm9ybVN0eWxlLlN0YW5kYWxvbmUsIHRydWUpOwogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGNhc2UgJ2JiYmInOgogICAgICAgICAgICAgICAgZm9ybWF0dGVyID0gZGF0ZVN0ckdldHRlcihUcmFuc2xhdGlvblR5cGUuRGF5UGVyaW9kcywgVHJhbnNsYXRpb25XaWR0aC5XaWRlLCBGb3JtU3R5bGUuU3RhbmRhbG9uZSwgdHJ1ZSk7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSAnYmJiYmInOgogICAgICAgICAgICAgICAgZm9ybWF0dGVyID0gZGF0ZVN0ckdldHRlcihUcmFuc2xhdGlvblR5cGUuRGF5UGVyaW9kcywgVHJhbnNsYXRpb25XaWR0aC5OYXJyb3csIEZvcm1TdHlsZS5TdGFuZGFsb25lLCB0cnVlKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAvLyBFeHRlbmRlZCBwZXJpb2Qgb2YgdGhlIGRheSAobWlkbmlnaHQsIG5pZ2h0LCAuLi4pLCBzdGFuZGFsb25lCiAgICAgICAgICAgIGNhc2UgJ0InOgogICAgICAgICAgICBjYXNlICdCQic6CiAgICAgICAgICAgIGNhc2UgJ0JCQic6CiAgICAgICAgICAgICAgICBmb3JtYXR0ZXIgPSBkYXRlU3RyR2V0dGVyKFRyYW5zbGF0aW9uVHlwZS5EYXlQZXJpb2RzLCBUcmFuc2xhdGlvbldpZHRoLkFiYnJldmlhdGVkLCBGb3JtU3R5bGUuRm9ybWF0LCB0cnVlKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlICdCQkJCJzoKICAgICAgICAgICAgICAgIGZvcm1hdHRlciA9CiAgICAgICAgICAgICAgICAgICAgZGF0ZVN0ckdldHRlcihUcmFuc2xhdGlvblR5cGUuRGF5UGVyaW9kcywgVHJhbnNsYXRpb25XaWR0aC5XaWRlLCBGb3JtU3R5bGUuRm9ybWF0LCB0cnVlKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlICdCQkJCQic6CiAgICAgICAgICAgICAgICBmb3JtYXR0ZXIgPSBkYXRlU3RyR2V0dGVyKFRyYW5zbGF0aW9uVHlwZS5EYXlQZXJpb2RzLCBUcmFuc2xhdGlvbldpZHRoLk5hcnJvdywgRm9ybVN0eWxlLkZvcm1hdCwgdHJ1ZSk7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgLy8gSG91ciBpbiBBTS9QTSwgKDEtMTIpCiAgICAgICAgICAgIGNhc2UgJ2gnOgogICAgICAgICAgICAgICAgZm9ybWF0dGVyID0gZGF0ZUdldHRlcihEYXRlVHlwZS5Ib3VycywgMSwgLTEyKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlICdoaCc6CiAgICAgICAgICAgICAgICBmb3JtYXR0ZXIgPSBkYXRlR2V0dGVyKERhdGVUeXBlLkhvdXJzLCAyLCAtMTIpOwogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIC8vIEhvdXIgb2YgdGhlIGRheSAoMC0yMykKICAgICAgICAgICAgY2FzZSAnSCc6CiAgICAgICAgICAgICAgICBmb3JtYXR0ZXIgPSBkYXRlR2V0dGVyKERhdGVUeXBlLkhvdXJzLCAxKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAvLyBIb3VyIGluIGRheSwgcGFkZGVkICgwMC0yMykKICAgICAgICAgICAgY2FzZSAnSEgnOgogICAgICAgICAgICAgICAgZm9ybWF0dGVyID0gZGF0ZUdldHRlcihEYXRlVHlwZS5Ib3VycywgMik7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgLy8gTWludXRlIG9mIHRoZSBob3VyICgwLTU5KQogICAgICAgICAgICBjYXNlICdtJzoKICAgICAgICAgICAgICAgIGZvcm1hdHRlciA9IGRhdGVHZXR0ZXIoRGF0ZVR5cGUuTWludXRlcywgMSk7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSAnbW0nOgogICAgICAgICAgICAgICAgZm9ybWF0dGVyID0gZGF0ZUdldHRlcihEYXRlVHlwZS5NaW51dGVzLCAyKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAvLyBTZWNvbmQgb2YgdGhlIG1pbnV0ZSAoMC01OSkKICAgICAgICAgICAgY2FzZSAncyc6CiAgICAgICAgICAgICAgICBmb3JtYXR0ZXIgPSBkYXRlR2V0dGVyKERhdGVUeXBlLlNlY29uZHMsIDEpOwogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGNhc2UgJ3NzJzoKICAgICAgICAgICAgICAgIGZvcm1hdHRlciA9IGRhdGVHZXR0ZXIoRGF0ZVR5cGUuU2Vjb25kcywgMik7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgLy8gRnJhY3Rpb25hbCBzZWNvbmQKICAgICAgICAgICAgY2FzZSAnUyc6CiAgICAgICAgICAgICAgICBmb3JtYXR0ZXIgPSBkYXRlR2V0dGVyKERhdGVUeXBlLkZyYWN0aW9uYWxTZWNvbmRzLCAxKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlICdTUyc6CiAgICAgICAgICAgICAgICBmb3JtYXR0ZXIgPSBkYXRlR2V0dGVyKERhdGVUeXBlLkZyYWN0aW9uYWxTZWNvbmRzLCAyKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlICdTU1MnOgogICAgICAgICAgICAgICAgZm9ybWF0dGVyID0gZGF0ZUdldHRlcihEYXRlVHlwZS5GcmFjdGlvbmFsU2Vjb25kcywgMyk7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgLy8gVGltZXpvbmUgSVNPODYwMSBzaG9ydCBmb3JtYXQgKC0wNDMwKQogICAgICAgICAgICBjYXNlICdaJzoKICAgICAgICAgICAgY2FzZSAnWlonOgogICAgICAgICAgICBjYXNlICdaWlonOgogICAgICAgICAgICAgICAgZm9ybWF0dGVyID0gdGltZVpvbmVHZXR0ZXIoWm9uZVdpZHRoLlNob3J0KTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAvLyBUaW1lem9uZSBJU084NjAxIGV4dGVuZGVkIGZvcm1hdCAoLTA0OjMwKQogICAgICAgICAgICBjYXNlICdaWlpaWic6CiAgICAgICAgICAgICAgICBmb3JtYXR0ZXIgPSB0aW1lWm9uZUdldHRlcihab25lV2lkdGguRXh0ZW5kZWQpOwogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIC8vIFRpbWV6b25lIEdNVCBzaG9ydCBmb3JtYXQgKEdNVCs0KQogICAgICAgICAgICBjYXNlICdPJzoKICAgICAgICAgICAgY2FzZSAnT08nOgogICAgICAgICAgICBjYXNlICdPT08nOgogICAgICAgICAgICAvLyBTaG91bGQgYmUgbG9jYXRpb24sIGJ1dCBmYWxsYmFjayB0byBmb3JtYXQgTyBpbnN0ZWFkIGJlY2F1c2Ugd2UgZG9uJ3QgaGF2ZSB0aGUgZGF0YSB5ZXQKICAgICAgICAgICAgY2FzZSAneic6CiAgICAgICAgICAgIGNhc2UgJ3p6JzoKICAgICAgICAgICAgY2FzZSAnenp6JzoKICAgICAgICAgICAgICAgIGZvcm1hdHRlciA9IHRpbWVab25lR2V0dGVyKFpvbmVXaWR0aC5TaG9ydEdNVCk7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgLy8gVGltZXpvbmUgR01UIGxvbmcgZm9ybWF0IChHTVQrMDQzMCkKICAgICAgICAgICAgY2FzZSAnT09PTyc6CiAgICAgICAgICAgIGNhc2UgJ1paWlonOgogICAgICAgICAgICAvLyBTaG91bGQgYmUgbG9jYXRpb24sIGJ1dCBmYWxsYmFjayB0byBmb3JtYXQgTyBpbnN0ZWFkIGJlY2F1c2Ugd2UgZG9uJ3QgaGF2ZSB0aGUgZGF0YSB5ZXQKICAgICAgICAgICAgY2FzZSAnenp6eic6CiAgICAgICAgICAgICAgICBmb3JtYXR0ZXIgPSB0aW1lWm9uZUdldHRlcihab25lV2lkdGguTG9uZyk7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgIH0KICAgICAgICBEQVRFX0ZPUk1BVFNbZm9ybWF0XSA9IGZvcm1hdHRlcjsKICAgICAgICByZXR1cm4gZm9ybWF0dGVyOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHRpbWV6b25lCiAgICAgKiBAcGFyYW0gez99IGZhbGxiYWNrCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiB0aW1lem9uZVRvT2Zmc2V0KHRpbWV6b25lLCBmYWxsYmFjaykgewogICAgICAgIC8vIFN1cHBvcnQ6IElFIDktMTEgb25seSwgRWRnZSAxMy0xNSsKICAgICAgICAvLyBJRS9FZGdlIGRvIG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hbHVlOwogICAgICAgIH0KICAgICAgICBpZiAodHlwZW9mIHZhbHVlID09PSAnbnVtYmVyJyAmJiAhaXNOYU4odmFsdWUpKSB7CiAgICAgICAgICAgIHJldHVybiBuZXcgRGF0ZSh2YWx1ZSk7CiAgICAgICAgfQogICAgICAgIGlmICh0eXBlb2YgdmFsdWUgPT09ICdzdHJpbmcnKSB7CiAgICAgICAgICAgIHZhbHVlID0gdmFsdWUudHJpbSgpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHBhcnNlZE5iID0gcGFyc2VGbG9hdCh2YWx1ZSk7CiAgICAgICAgICAgIC8vIGFueSBzdHJpbmcgdGhhdCBvbmx5IGNvbnRhaW5zIG51bWJlcnMsIGxpa2UgIjEyMzQiIGJ1dCBub3QgbGlrZSAiMTIzNGhlbGxvIgogICAgICAgICAgICBpZiAoIWlzTmFOKCgvKiogQHR5cGUgez99ICovICh2YWx1ZSkpIC0gcGFyc2VkTmIpKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IERhdGUocGFyc2VkTmIpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICgvXihcZHs0fS1cZHsxLDJ9LVxkezEsMn0pJC8udGVzdCh2YWx1ZSkpIHsKICAgICAgICAgICAgICAgIC8qIEZvciBJU08gU3RyaW5ncyB3aXRob3V0IHRpbWUgdGhlIGRheSwgbW9udGggYW5kIHllYXIgbXVzdCBiZSBleHRyYWN0ZWQgZnJvbSB0aGUgSVNPIFN0cmluZwogICAgICAgICAgICAgICAgICAgICAgYmVmb3JlIERhdGUgY3JlYXRpb24gdG8gYXZvaWQgdGltZSBvZmZzZXQgYW5kIGVycm9ycyBpbiB0aGUgbmV3IERhdGUuCiAgICAgICAgICAgICAgICAgICAgICBJZiB3ZSBvbmx5IHJlcGxhY2UgJy0nIHdpdGggJywnIGluIHRoZSBJU08gU3RyaW5nICgiMjAxNSwwMSwwMSIpLCBhbmQgdHJ5IHRvIGNyZWF0ZSBhIG5ldwogICAgICAgICAgICAgICAgICAgICAgZGF0ZSwgc29tZSBicm93c2VycyAoZS5nLiBJRSA5KSB3aWxsIHRocm93IGFuIGludmFsaWQgRGF0ZSBlcnJvci4KICAgICAgICAgICAgICAgICAgICAgIElmIHdlIGxlYXZlIHRoZSAnLScgKCIyMDE1LTAxLTAxIikgYW5kIHRyeSB0byBjcmVhdGUgYSBuZXcgRGF0ZSgiMjAxNS0wMS0wMSIpIHRoZSB0aW1lb2Zmc2V0CiAgICAgICAgICAgICAgICAgICAgICBpcyBhcHBsaWVkLgogICAgICAgICAgICAgICAgICAgICAgTm90ZTogSVNPIG1vbnRocyBhcmUgMCBmb3IgSmFudWFyeSwgMSBmb3IgRmVicnVhcnksIC4uLiAqLwogICAgICAgICAgICAgICAgY29uc3QgW3ksIG0sIGRdID0gdmFsdWUuc3BsaXQoJy0nKS5tYXAoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSB2YWwKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICh2YWwpID0+ICt2YWwpKTsKICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRGF0ZSh5LCBtIC0gMSwgZCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgbWF0Y2g7CiAgICAgICAgICAgIGlmIChtYXRjaCA9IHZhbHVlLm1hdGNoKElTTzg2MDFfREFURV9SRUdFWCkpIHsKICAgICAgICAgICAgICAgIHJldHVybiBpc29TdHJpbmdUb0RhdGUobWF0Y2gpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBkYXRlID0gbmV3IERhdGUoKC8qKiBAdHlwZSB7P30gKi8gKHZhbHVlKSkpOwogICAgICAgIGlmICghaXNEYXRlJDEoZGF0ZSkpIHsKICAgICAg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cGFyYW0gez99IGdyb3VwU3ltYm9sCiAgICAgKiBAcGFyYW0gez99IGRlY2ltYWxTeW1ib2wKICAgICAqIEBwYXJhbSB7Pz19IGRpZ2l0c0luZm8KICAgICAqIEBwYXJhbSB7Pz19IGlzUGVyY2VudAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZm9ybWF0TnVtYmVyVG9Mb2NhbGVTdHJpbmcodmFsdWUsIHBhdHRlcm4sIGxvY2FsZSwgZ3JvdXBTeW1ib2wsIGRlY2ltYWxTeW1ib2wsIGRpZ2l0c0luZm8sIGlzUGVyY2VudCA9IGZhbHNlKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBmb3JtYXR0ZWRUZXh0ID0gJyc7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBpc1plcm8gPSBmYWxzZTsKICAgICAgICBpZiAoIWlzRmluaXRlKHZhbHVlKSkgewogICAgICAgICAgICBmb3JtYXR0ZWRUZXh0ID0gZ2V0TG9jYWxlTnVtYmVyU3ltYm9sKGxvY2FsZSwgTnVtYmVyU3ltYm9sLkluZmluaXR5KTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHBhcnNlZE51bWJlciA9IHBhcnNlTnVtYmVyKHZhbHVlKTsKICAgICAgICAgICAgaWYgKGlzUGVyY2VudCkgewogICAgICAgICAgICAgICAgcGFyc2VkTnVtYmVyID0gdG9QZXJjZW50KHBhcnNlZE51bWJlcik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgbWluSW50ID0gcGF0dGVybi5taW5JbnQ7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IG1pbkZyYWN0aW9uID0gcGF0dGVybi5taW5GcmFjOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBtYXhGcmFjdGlvbiA9IHBhdHRlcm4ubWF4RnJhYzsKICAgICAgICAgICAgaWYgKGRpZ2l0c0luZm8pIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHBhcnRzID0gZGlnaXRzSW5mby5tYXRjaChOVU1CRVJfRk9STUFUX1JFR0VYUCk7CiAgICAgICAgICAgICAgICBpZiAocGFydHMgPT09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYCR7ZGlnaXRzSW5mb30gaXMgbm90IGEgdmFsaWQgZGlnaXQgaW5mb2ApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgbWluSW50UGFydCA9IHBhcnRzWzFdOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgbWluRnJhY3Rpb25QYXJ0ID0gcGFydHNbM107CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBtYXhGcmFjdGlvblBhcnQgPSBwYXJ0c1s1XTsKICAgICAgICAgICAgICAgIGlmIChtaW5JbnRQYXJ0ICE9IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICBtaW5JbnQgPSBwYXJzZUludEF1dG9SYWRpeChtaW5JbnRQYXJ0KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChtaW5GcmFjdGlvblBhcnQgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIG1pbkZyYWN0aW9uID0gcGFyc2VJbnRBdXRvUmFkaXgobWluRnJhY3Rpb25QYXJ0KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChtYXhGcmFjdGlvblBhcnQgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIG1heEZyYWN0aW9uID0gcGFyc2VJbnRBdXRvUmFkaXgobWF4RnJhY3Rpb25QYXJ0KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKG1pbkZyYWN0aW9uUGFydCAhPSBudWxsICYmIG1pbkZyYWN0aW9uID4gbWF4RnJhY3Rpb24pIHsKICAgICAgICAgICAgICAgICAgICBtYXhGcmFjdGlvbiA9IG1pbkZyYWN0aW9uOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJvdW5kTnVtYmVyKHBhcnNlZE51bWJlciwgbWluRnJhY3Rpb24sIG1heEZyYWN0aW9uKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgZGlnaXRzID0gcGFyc2VkTnVtYmVyLmRpZ2l0czsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgaW50ZWdlckxlbiA9IHBhcnNlZE51bWJlci5pbnRlZ2VyTGVuOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGV4cG9uZW50ID0gcGFyc2VkTnVtYmVyLmV4cG9uZW50OwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBkZWNpbWFscyA9IFtdOwogICAgICAgICAgICBpc1plcm8gPSBkaWdpdHMuZXZlcnkoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGQgPT4gIWQpKTsKICAgICAgICAgICAgLy8gcGFkIHplcm9zIGZvciBzbWFsbCBudW1iZXJzCiAgICAgICAgICAgIGZvciAoOyBpbnRlZ2VyTGVuIDwgbWluSW50OyBpbnRlZ2VyTGVuKyspIHsKICAgICAgICAgICAgICAgIGRpZ2l0cy51bnNoaWZ0KDApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIHBhZCB6ZXJvcyBmb3Igc21hbGwgbnVtYmVycwogICAgICAgICAgICBmb3IgKDsgaW50ZWdlckxlbiA8IDA7IGludGVnZXJMZW4rKykgewogICAgICAgICAgICAgICAgZGlnaXRzLnVuc2hpZnQoMCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gZXh0cmFjdCBkZWNpbWFscyBkaWdpdHMKICAgICAgICAgICAgaWYgKGludGVnZXJMZW4gPiAwKSB7CiAgICAgICAgICAgICAgICBkZWNpbWFscyA9IGRpZ2l0cy5zcGxpY2UoaW50ZWdlckxlbiwgZGlnaXRzLmxlbmd0aCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBkZWNpbWFscyA9IGRpZ2l0czsKICAgICAgICAgICAgICAgIGRpZ2l0cyA9IFswXTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBmb3JtYXQgdGhlIGludGVnZXIgZGlnaXRzIHdpdGggZ3JvdXBpbmcgc2VwYXJhdG9ycwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGdyb3VwcyA9IFtdOwogICAgICAgICAgICBpZiAoZGlnaXRzLmxlbmd0aCA+PSBwYXR0ZXJuLmxnU2l6ZSkgewogICAgICAgICAgICAgICAgZ3JvdXBzLnVuc2hpZnQoZGlnaXRzLnNwbGljZSgtcGF0dGVybi5sZ1NpemUsIGRpZ2l0cy5sZW5ndGgpLmpvaW4oJycpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB3aGlsZSAoZGlnaXRzLmxlbmd0aCA+IHBhdHRlcm4uZ1NpemUpIHsKICAgICAgICAgICAgICAgIGdyb3Vwcy51bnNoaWZ0KGRpZ2l0cy5zcGxpY2UoLXBhdHRlcm4uZ1NpemUsIGRpZ2l0cy5sZW5ndGgpLmpvaW4oJycpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoZGlnaXRzLmxlbmd0aCkgewogICAgICAgICAgICAgICAgZ3JvdXBzLnVuc2hpZnQoZGlnaXRzLmpvaW4oJycpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBmb3JtYXR0ZWRUZXh0ID0gZ3JvdXBzLmpvaW4oZ2V0TG9jYWxlTnVtYmVyU3ltYm9sKGxvY2FsZSwgZ3JvdXBTeW1ib2wpKTsKICAgICAgICAgICAgLy8gYXBwZW5kIHRoZSBkZWNpbWFsIGRpZ2l0cwogICAgICAgICAgICBpZiAoZGVjaW1hbHMubGVuZ3RoKSB7CiAgICAgICAgICAgICAgICBmb3JtYXR0ZWRUZXh0ICs9IGdldExvY2FsZU51bWJlclN5bWJvbChsb2NhbGUsIGRlY2ltYWxTeW1ib2wpICsgZGVjaW1hbHMuam9pbignJyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGV4cG9uZW50KSB7CiAgICAgICAgICAgICAgICBmb3JtYXR0ZWRUZXh0ICs9IGdldExvY2FsZU51bWJlclN5bWJvbChsb2NhbGUsIE51bWJlclN5bWJvbC5FeHBvbmVudGlhbCkgKyAnKycgKyBleHBvbmVudDsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBpZiAodmFsdWUgPCAwICYmICFpc1plcm8pIHsKICAgICAgICAgICAgZm9ybWF0dGVkVGV4dCA9IHBhdHRlcm4ubmVnUHJlICsgZm9ybWF0dGVkVGV4dCArIHBhdHRlcm4ubmVnU3VmOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgZm9ybWF0dGVkVGV4dCA9IHBhdHRlcm4ucG9zUHJlICsgZm9ybWF0dGVkVGV4dCArIHBhdHRlcm4ucG9zU3VmOwogICAgICAgIH0KICAgICAgICByZXR1cm4gZm9ybWF0dGVkVGV4dDsKICAgIH0KICAgIC8qKgogICAgICogXEBuZ01vZHVsZSBDb21tb25Nb2R1bGUKICAgICAqIFxAZGVzY3JpcHRpb24KICAgIC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ICovCiAgICAgICAgY29uc3QgcCA9IHsKICAgICAgICAgICAgbWluSW50OiAxLAogICAgICAgICAgICBtaW5GcmFjOiAwLAogICAgICAgICAgICBtYXhGcmFjOiAwLAogICAgICAgICAgICBwb3NQcmU6ICcnLAogICAgICAgICAgICBwb3NTdWY6ICcnLAogICAgICAgICAgICBuZWdQcmU6ICcnLAogICAgICAgICAgICBuZWdTdWY6ICcnLAogICAgICAgICAgICBnU2l6ZTogMCwKICAgICAgICAgICAgbGdTaXplOiAwCiAgICAgICAgfTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgcGF0dGVyblBhcnRzID0gZm9ybWF0LnNwbGl0KFBBVFRFUk5fU0VQKTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgcG9zaXRpdmUgPSBwYXR0ZXJuUGFydHNbMF07CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IG5lZ2F0aXZlID0gcGF0dGVyblBhcnRzWzFdOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBwb3NpdGl2ZVBhcnRzID0gcG9zaXRpdmUuaW5kZXhPZihERUNJTUFMX1NFUCkgIT09IC0xID8KICAgICAgICAgICAgcG9zaXRpdmUuc3BsaXQoREVDSU1BTF9TRVApIDoKICAgICAgICAgICAgWwogICAgICAgICAgICAgICAgcG9zaXRpdmUuc3Vic3RyaW5nKDAsIHBvc2l0aXZlLmxhc3RJbmRleE9mKFpFUk9fQ0hBUikgKyAxKSwKICAgICAgICAgICAgICAgIHBvc2l0aXZlLnN1YnN0cmluZyhwb3NpdGl2ZS5sYXN0SW5kZXhPZihaRVJPX0NIQVIpICsgMSkKICAgICAgICAgICAgXTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgaW50ZWdlciA9IHBvc2l0aXZlUGFydHNbMF07CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGZyYWN0aW9uID0gcG9zaXRpdmVQYXJ0c1sxXSB8fCAnJzsKICAgICAgICBwLnBvc1ByZSA9IGludGVnZXIuc3Vic3RyKDAsIGludGVnZXIuaW5kZXhPZihESUdJVF9DSEFSKSk7CiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBmcmFjdGlvbi5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGNoID0gZnJhY3Rpb24uY2hhckF0KGkpOwogICAgICAgICAgICBpZiAoY2ggPT09IFpFUk9fQ0hBUikgewogICAgICAgICAgICAgICAgcC5taW5GcmFjID0gcC5tYXhGcmFjID0gaSArIDE7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoY2ggPT09IERJR0lUX0NIQVIpIHsKICAgICAgICAgICAgICAgIHAubWF4RnJhYyA9IGkgKyAxOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgcC5wb3NTdWYgKz0gY2g7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGdyb3VwcyA9IGludGVnZXIuc3BsaXQoR1JPVVBfU0VQKTsKICAgICAgICBwLmdTaXplID0gZ3JvdXBzWzFdID8gZ3JvdXBzWzFdLmxlbmd0aCA6IDA7CiAgICAgICAgcC5sZ1NpemUgPSAoZ3JvdXBzWzJdIHx8IGdyb3Vwc1sxXSkgPyAoZ3JvdXBzWzJdIHx8IGdyb3Vwc1sxXSkubGVuZ3RoIDogMDsKICAgICAgICBpZiAobmVnYXRpdmUpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB0cnVua0xlbiA9IHBvc2l0aXZlLmxlbmd0aCAtIHAucG9zUHJlLmxlbmd0aCAtIHAucG9zU3VmLmxlbmd0aDsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwb3MgPSBuZWdhdGl2ZS5pbmRleE9mKERJR0lUX0NIQVIpOwogICAgICAgICAgICBwLm5lZ1ByZSA9IG5lZ2F0aXZlLnN1YnN0cigwLCBwb3MpLnJlcGxhY2UoLycvZywgJycpOwogICAgICAgICAgICBwLm5lZ1N1ZiA9IG5lZ2F0aXZlLnN1YnN0cihwb3MgKyB0cnVua0xlbikucmVwbGFjZSgvJy9nLCAnJyk7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICBwLm5lZ1ByZSA9IG1pbnVzU2lnbiArIHAucG9zUHJlOwogICAgICAgICAgICBwLm5lZ1N1ZiA9IHAucG9zU3VmOwogICAgICAgIH0KICAgICAgICByZXR1cm4gcDsKICAgIH0KICAgIC8vIFRyYW5zZm9ybXMgYSBwYXJzZWQgbnVtYmVyIGludG8gYSBwZXJjZW50YWdlIGJ5IG11bHRpcGx5aW5nIGl0IGJ5IDEwMAogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHBhcnNlZE51bWJlcgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gdG9QZXJjZW50KHBhcnNlZE51bWJlcikgewogICAgICAgIC8vIGlmIHRoZSBudW1iZXIgaXMgMCwgZG9uJ3QgZG8gYW55dGhpbmcKICAgICAgICBpZiAocGFyc2VkTnVtYmVyLmRpZ2l0c1swXSA9PT0gMCkgewogICAgICAgICAgICByZXR1cm4gcGFyc2VkTnVtYmVyOwogICAgICAgIH0KICAgICAgICAvLyBHZXR0aW5nIHRoZSBjdXJyZW50IG51bWJlciBvZiBkZWNpbWFscwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBmcmFjdGlvbkxlbiA9IHBhcnNlZE51bWJlci5kaWdpdHMubGVuZ3RoIC0gcGFyc2VkTnVtYmVyLmludGVnZXJMZW47CiAgICAgICAgaWYgKHBhcnNlZE51bWJlci5leHBvbmVudCkgewogICAgICAgICAgICBwYXJzZWROdW1iZXIuZXhwb25lbnQgKz0gMjsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIGlmIChmcmFjdGlvbkxlbiA9PT0gMCkgewogICAgICAgICAgICAgICAgcGFyc2VkTnVtYmVyLmRpZ2l0cy5wdXNoKDAsIDApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKGZyYWN0aW9uTGVuID09PSAxKSB7CiAgICAgICAgICAgICAgICBwYXJzZWROdW1iZXIuZGlnaXRzLnB1c2goMCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcGFyc2VkTnVtYmVyLmludGVnZXJMZW4gKz0gMjsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIHBhcnNlZE51bWJlcjsKICAgIH0KICAgIC8qKgogICAgICogUGFyc2VzIGEgbnVtYmVyLgogICAgICogU2lnbmlmaWNhbnQgYml0cyBvZiB0aGlzIHBhcnNlIGFsZ29yaXRobSBjYW1lIGZyb20gaHR0cHM6Ly9naXRodWIuY29tL01pa2VNY2wvYmlnLmpzLwogICAgICogQHBhcmFtIHs/fSBudW0KICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHBhcnNlTnVtYmVyKG51bSkgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgbnVtU3RyID0gTWF0aC5hYnMobnVtKSArICcnOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgZXhwb25lbnQgPSAwOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgZGlnaXRzOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgaW50ZWdlckxlbjsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IGk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBqOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgemVyb3M7CiAgICAgICAgLy8gRGVjaW1hbCBwb2ludD8KICAgICAgICBpZiAoKGludGVnZXJMZW4gPSBudW1TdHIuaW5kZXhPZihERUNJTUFMX1NFUCkpID4gLTEpIHsKICAgICAgICAgICAgbnVtU3RyID0gbnVtU3RyLnJlcGxhY2UoREVDSU1BTF9TRVAsICcnKTsKICAgICAgICB9CiAgICAgICAgLy8gRXhwb25lbnRpYWwgZm9ybT8KICAgICAgICBpZiAoKGkgPSBudW1TdHIuc2VhcmNoKC9lL2kpKSA+IDApIHsKICAgICAgICAgICAgLy8gV29yayBvdXQgdGhlIGV4cG9uZW50LgogICAgICAgICAgICBpZiAoaW50ZWdlckxlbiA8IDApCiAgICAgICAgICAgICAgICBpbnRlZ2VyTGVuID0gaTsKICAgICAgICAgICAgaW50ZWdlckxlbiArPSArbnVtU3RyLnNsaWNlKGkgKyAxKTsKICAgICAgICAgICAgbnVtU3RyID0gbnVtU3RyLnN1YnN0cmluZygwLCBpKTsKICAgICAgICB9CiAgICAgICAgZWxzZSBpZiAoaW50ZWdlckxlbiA8IDApIHsKICAgICAgICAgICAgLy8gVGhlcmUgd2FzIG5vIGRlY2ltYWwgcG9pbnQgb3IgZXhwb25lbnQgc28gaXQgaXMgYW4gaW50ZWdlci4KICAgICAgICAgICAgaW50ZWdlckxlbiA9IG51bVN0ci5sZW5ndGg7CiAgICAgICAgfQogICAgICAgIC8vIENvdW50IHRoZSBudW1iZXIgb2YgbGVhZGluZyB6ZXJvcy4KICAgICAgICBmb3IgKGkgPSAwOyBudW1TdHIuY2hhckF0KGkpID09PSBaRVJPX0NIQVI7IGkrKykgeyAvKiBlbXB0eSAqLwogICAgICAgIH0KICAgICAgICBpZiAoaSA9PT0gKHplcm9zID0gbnVtU3RyLmxlbmd0aCkpIHsKICAgICAgICAgICAgLy8gVGhlIGRpZ2l0cyBhcmUgYWxsIHplcm8uCiAgICAgICAgICAgIGRpZ2l0cyA9IFswXTsKICAgICAgICAgICAgaW50ZWdlckxlbiA9IDE7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICAvLyBDb3VudCB0aGUgbnVtYmVyIG9mIHRyYWlsaW5nIHplcm9zCiAgICAgICAgICAgIHplcm9zLS07CiAgICAgICAgICAgIHdoaWxlIChudW1TdHIuY2hhckF0KHplcm9zKSA9PT0gWkVST19DSEFSKQogICAgICAgICAgICAgICAgemVyb3MtLTsKICAgICAgICAgICAgLy8gVHJhaWxpbmcgemVyb3MgYXJlIGluc2lnbmlmaWNhbnQgc28gaWdub3JlIHRoZW0KICAgICAgICAgICAgaW50ZWdlckxlbiAtPSBpOwogICAgICAgICAgICBkaWdpdHMgPSBbXTsKICAgICAgICAgICAgLy8gQ29udmVydCBzdHJpbmcgdG8gYXJyYXkgb2YgZGlnaXRzIHdpdGhvdXQgbGVhZGluZy90cmFpbGluZyB6ZXJvcy4KICAgICAgICAgICAgZm9yIChqID0gMDsgaSA8PSB6ZXJvczsgaSsrLCBqKyspIHsKICAgICAgICAgICAgICAgIGRpZ2l0c1tqXSA9IE51bWJlcihudW1TdHIuY2hhckF0KGkpKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvLyBJZiB0aGUgbnVtYmVyIG92ZXJmbG93cyB0aGUgbWF4aW11bSBhbGxvd2VkIGRpZ2l0cyB0aGVuIHVzZSBhbiBleHBvbmVudC4KICAgICAgICBpZiAoaW50ZWdlckxlbiA+IE1BWF9ESUdJVFMpIHsKICAgICAgICAgICAgZGlnaXRzID0gZGlnaXRzLnNwbGljZSgwLCBNQVhfRElHSVRTIC0gMSk7CiAgICAgICAgICAgIGV4cG9uZW50ID0gaW50ZWdlckxlbiAtIDE7CiAgICAgICAgICAgIGludGVnZXJMZW4gPSAxOwogICAgICAgIH0KICAgICAgICByZXR1cm4geyBkaWdpdHMsIGV4cG9uZW50LCBpbnRlZ2VyTGVuIH07CiAgICB9CiAgICAvKioKICAgICAqIFJvdW5kIHRo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emUgKyBwYXJzZWROdW1iZXIuaW50ZWdlckxlbjsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IGRpZ2l0ID0gZGlnaXRzW3JvdW5kQXRdOwogICAgICAgIGlmIChyb3VuZEF0ID4gMCkgewogICAgICAgICAgICAvLyBEcm9wIGZyYWN0aW9uYWwgZGlnaXRzIGJleW9uZCBgcm91bmRBdGAKICAgICAgICAgICAgZGlnaXRzLnNwbGljZShNYXRoLm1heChwYXJzZWROdW1iZXIuaW50ZWdlckxlbiwgcm91bmRBdCkpOwogICAgICAgICAgICAvLyBTZXQgbm9uLWZyYWN0aW9uYWwgZGlnaXRzIGJleW9uZCBgcm91bmRBdGAgdG8gMAogICAgICAgICAgICBmb3IgKGxldCBqID0gcm91bmRBdDsgaiA8IGRpZ2l0cy5sZW5ndGg7IGorKykgewogICAgICAgICAgICAgICAgZGlnaXRzW2pdID0gMDsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgLy8gV2Ugcm91bmRlZCB0byB6ZXJvIHNvIHJlc2V0IHRoZSBwYXJzZWROdW1iZXIKICAgICAgICAgICAgZnJhY3Rpb25MZW4gPSBNYXRoLm1heCgwLCBmcmFjdGlvbkxlbik7CiAgICAgICAgICAgIHBhcnNlZE51bWJlci5pbnRlZ2VyTGVuID0gMTsKICAgICAgICAgICAgZGlnaXRzLmxlbmd0aCA9IE1hdGgubWF4KDEsIHJvdW5kQXQgPSBmcmFjdGlvblNpemUgKyAxKTsKICAgICAgICAgICAgZGlnaXRzWzBdID0gMDsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IDE7IGkgPCByb3VuZEF0OyBpKyspCiAgICAgICAgICAgICAgICBkaWdpdHNbaV0gPSAwOwogICAgICAgIH0KICAgICAgICBpZiAoZGlnaXQgPj0gNSkgewogICAgICAgICAgICBpZiAocm91bmRBdCAtIDEgPCAwKSB7CiAgICAgICAgICAgICAgICBmb3IgKGxldCBrID0gM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dXAgdG8gMTAKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgY2FycnkgPSBkaWdpdHMucmVkdWNlUmlnaHQoKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gY2FycnkKICAgICAgICAgKiBAcGFyYW0gez99IGQKICAgICAgICAgKiBAcGFyYW0gez99IGkKICAgICAgICAgKiBAcGFyYW0gez99IGRpZ2l0cwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gKGNhcnJ5LCBkLCBpLCBkaWdpdHMpIHsKICAgICAgICAgICAgZCA9IGQgKyBjYXJyeTsKICAgICAgICAgICAgZGlnaXRzW2ldID0gZCA8IDEwID8gZCA6IGQgLSAxMDsgLy8gZCAlIDEwCiAgICAgICAgICAgIGlmIChkcm9wVHJhaWxpbmdaZXJvcykgewogICAgICAgICAgICAgICAgLy8gRG8gbm90IGtlZXAgbWVhbmluZ2xlc3MgZnJhY3Rpb25hbCB0cmFpbGluZyB6ZXJvcyAoZS5nLiAxNS41MjAwMCAtLT4gMTUuNTIpCiAgICAgICAgICAgICAgICBpZiAoZGlnaXRzW2ldID09PSAwICYmIGkgPj0gbWluTGVuKSB7CiAgICAgICAgICAgICAgICAgICAgZGlnaXRzLnBvcCgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgZHJvcFRyYWlsaW5nWmVyb3MgPSBmYWxzZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gZCA+PSAxMCA/IDEgOiAwOyAvLyBNYXRoLmZsb29yKGQgLyAxMCk7CiAgICAgICAgfSksIDApOwogICAgICAgIGlmIChjYXJyeSkgewogICAgICAgICAgICBkaWdpdHMudW5zaGlmdChjYXJyeSk7CiAgICAgICAgICAgIHBhcnNlZE51bWJlci5pbnRlZ2VyTGVuKys7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHRleHQKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHBhcnNlSW50QXV0b1JhZGl4KHRleHQpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgcmVzdWx0ID0gcGFyc2VJbnQodGV4dCk7CiAgICAgICAgaWYgKGlzTmFOKHJlc3VsdCkpIHsKICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdJbnZhbGlkIGludGVnZXIgbGl0ZXJhbCB3aGVuIHBhcnNpbmcgJyArIHRleHQpOwogICAgICAgIH0KICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogcGFja2FnZXMvY29tbW9uL3NyYy9pMThuL2xvY2FsaXphdGlvbi50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvKioKICAgICAqIFxAcHVibGljQXBpCiAgICAgKiBAYWJzdHJhY3QKICAgICAqLwogICAgY2xhc3MgTmdMb2NhbGl6YXRpb24gewogICAgfQogICAgLyoqCiAgICAgKiBSZXR1cm5zIHRoZSBwbHVyYWwgY2F0ZWdvcnkgZm9yIGEgZ2l2ZW4gdmFsdWUuCiAgICAgKiAtICI9dmFsdWUiIHdoZW4gdGhlIGNhc2UgZXhpc3RzLAogICAgICogLSB0aGUgcGx1cmFsIGNhdGVnb3J5IG90aGVyd2lzZQogICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICogQHBhcmFtIHs/fSBjYXNlcwogICAgICogQHBhcmFtIHs/fSBuZ0xvY2FsaXphdGlvbgogICAgICogQHBhcmFtIHs/PX0gbG9jYWxlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBnZXRQbHVyYWxDYXRlZ29yeSh2YWx1ZSwgY2FzZXMsIG5nTG9jYWxpemF0aW9uLCBsb2NhbGUpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IGtleSA9IGA9JHt2YWx1ZX1gOwogICAgICAgIGlmIChjYXNlcy5pbmRleE9mKGtleSkgPiAtMSkgewogICAgICAgICAgICByZXR1cm4ga2V5OwogICAgICAgIH0KICAgICAgICBrZXkgPSBuZ0xvY2FsaXphdGlvbi5nZXRQbHVyYWxDYXRlZ29yeSh2YWx1ZSwgbG9jYWxlKTsKICAgICAgICBpZiAoY2FzZXMuaW5kZXhPZihrZXkpID4gLTEpIHsKICAgICAgICAgICAgcmV0dXJuIGtleTsKICAgICAgICB9CiAgICAgICAgaWYgKGNhc2VzLmluZGV4T2YoJ290aGVyJykgPiAtMSkgewogICAgICAgICAgICByZXR1cm4gJ290aGVyJzsKICAgICAgICB9CiAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBObyBwbHVyYWwgbWVzc2FnZSBmb3VuZCBmb3IgdmFsdWUgIiR7dmFsdWV9ImApOwogICAgfQogICAgLyoqCiAgICAgKiBSZXR1cm5zIHRoZSBwbHVyYWwgY2FzZSBiYXNlZCBvbiB0aGUgbG9jYWxlCiAgICAgKgogICAgICogXEBwdWJsaWNBcGkKICAgICAqLwogICAgY2xhc3MgTmdMb2NhbGVMb2NhbGl6YXRpb24gZXh0ZW5kcyBOZ0xvY2FsaXphdGlvbiB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBsb2NhbGUKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3Rvcihsb2NhbGUpIHsKICAgICAgICAgICAgc3VwZXIoKTsKICAgICAgICAgICAgdGhpcy5sb2NhbGUgPSBsb2NhbGU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcGFyYW0gez89fSBsb2NhbGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldFBsdXJhbENhdGVnb3J5KHZhbHVlLCBsb2NhbGUpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwbHVyYWwgPSBnZXRMb2NhbGVQbHVyYWxDYXNlJDEobG9jYWxlIHx8IHRoaXMubG9jYWxlKSh2YWx1ZSk7CiAgICAgICAgICAgIHN3aXRjaCAocGx1cmFsKSB7CiAgICAgICAgICAgICAgICBjYXNlIFBsdXJhbC5aZXJvOgogICAgICAgICAgICAgICAgICAgIHJldHVybiAnemVybyc7CiAgICAgICAgICAgICAgICBjYXNlIFBsdXJhbC5PbmU6CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdvbmUnOwogICAgICAgICAgICAgICAgY2FzZSBQbHVyYWwuVHdvOgogICAgICAgICAgICAgICAgICAgIHJldHVybiAndHdvJzsKICAgICAgICAgICAgICAgIGNhc2UgUGx1cmFsLkZldzoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2Zldyc7CiAgICAgICAgICAgICAgICBjYXNlIFBsdXJhbC5NYW55OgogICAgICAgICAgICAgICAgICAgIHJldHVybiAnbWFueSc7CiAgICAgICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICAgICAgIHJldHVybiAnb3RoZXInOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQogICAgTmdMb2NhbGVMb2NhbGl6YXRpb24uybVmYWMgPSBmdW5jdGlvbiBOZ0xvY2FsZUxvY2FsaXphdGlvbl9GYWN0b3J5KHQpIHsgcmV0dXJuIG5ldyAodCB8fCBOZ0xvY2FsZUxvY2FsaXphdGlvbikoybXJtWluamVjdChMT0NBTEVfSUQkMSkpOyB9OwogICAgT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dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBwYXJzZUNvb2tpZVZhbHVlKGNvb2tpZVN0ciwgbmFtZSkgewogICAgICAgIG5hbWUgPSBlbmNvZGVVUklDb21wb25lbnQobmFtZSk7CiAgICAgICAgZm9yIChjb25zdCBjb29raWUgb2YgY29va2llU3RyLnNwbGl0KCc7JykpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBlcUluZGV4ID0gY29va2llLmluZGV4T2YoJz0nKTsKICAgICAgICAgICAgY29uc3QgW2Nvb2tpZU5hbWUsIGNvb2tpZVZhbHVlXSA9IGVxSW5kZXggPT0gLTEgPyBbY29va2llLCAnJ10gOiBbY29va2llLnNsaWNlKDAsIGVxSW5kZXgpLCBjb29raWUuc2xpY2UoZXFJbmRleCArIDEpXTsKICAgICAgICAgICAgaWYgKGNvb2tpZU5hbWUudHJpbSgpID09PSBuYW1lKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gZGVjb2RlVVJJQ29tcG9uZW50KGNvb2tpZVZhbHVlKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gbnVsbDsKICAgIH0KCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcgYWRkZWQgYnkgdHNpY2tsZQogICAgICogR2VuZXJhdGVkIGZyb206IHBhY2thZ2VzL2NvbW1vbi9zcmMvZGlyZWN0aXZlcy9uZ19jbGFzcy50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvKioKICAgICAqIFxAbmdNb2R1bGUgQ29tbW9uTW9kdWxlCiAgICAgKgogICAgICogXEB1c2FnZU5vdGVzCiAgICAgKiB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AqIC0gYE9iamVjdGAgLSBrZXlzIGFyZSBDU1MgY2xhc3NlcyB0aGF0IGdldCBhZGRlZCB3aGVuIHRoZSBleHByZXNzaW9uIGdpdmVuIGluIHRoZSB2YWx1ZQogICAgICogICAgICAgICAgICAgIGV2YWx1YXRlcyB0byBhIHRydXRoeSB2YWx1ZSwgb3RoZXJ3aXNlIHRoZXkgYXJlIHJlbW92ZWQuCiAgICAgKgogICAgICogXEBwdWJsaWNBcGkKICAgICAqLwogICAgY2xhc3MgTmdDbGFzcyB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBfaXRlcmFibGVEaWZmZXJzCiAgICAgICAgICogQHBhcmFtIHs/fSBfa2V5VmFsdWVEaWZmZXJzCiAgICAgICAgICogQHBhcmFtIHs/fSBfbmdFbAogICAgICAgICAqIEBwYXJhbSB7P30gX3JlbmRlcmVyCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoX2l0ZXJhYmxlRGlmZmVycywgX2tleVZhbHVlRGlmZmVycywgX25nRWwsIF9yZW5kZXJlcikgewogICAgICAgICAgICB0aGlzLl9pdGVyYWJsZURpZmZlcnMgPSBfaXRlcmFibGVEaWZmZXJzOwogICAgICAgICAgICB0aGlzLl9rZXlWYWx1ZURpZmZlcnMgPSBfa2V5VmFsdWVEaWZmZXJzOwogICAgICAgICAgICB0aGlzLl9uZ0VsID0gX25nRWw7CiAgICAgICAgICAgIHRoaXMuX3JlbmRlcmVyID0gX3JlbmRlcmVyOwogICAgICAgICAgICB0aGlzLl9pdGVyYWJsZURpZmZlciA9IG51bGw7CiAgICAgICAgICAgIHRoaXMuX2tleVZhbHVlRGlmZmVyID0gbnVsbDsKICAgICAgICAgICAgdGhpcy5faW5pdGlhbENsYXNzZXMgPSBbXTsKICAgICAgICAgICAgdGhpcy5fcmF3Q2xhc3MgPSBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQga2xhc3ModmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5fcmVtb3ZlQ2xhc3Nlcyh0aGlzLl9pbml0aWFsQ2xhc3Nlcyk7CiAgICAgICAgICAgIHRoaXMuX2luaXRpYWxDbGFzc2VzID0gdHlwZW9mIHZhbHVlID09PSAnc3RyaW5nJyA/IHZhbHVlLnNwbGl0KC9ccysvKSA6IFtdOwogICAgICAgICAgICB0aGlzLl9hcHBseUNsYXNzZXModGhpcy5faW5pdGlhbENsYXNzZXMpOwogICAgICAgICAgICB0aGlzLl9hcHBseUNsYXNzZXModGhpcy5fcmF3Q2xhc3MpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgbmdDbGFzcyh2YWx1ZSkgewogICAgICAgICAgICB0aGlzLl9yZW1vdmVDbGFzc2VzKHRoaXMuX3Jhd0NsYXNzKTsKICAgICAgICAgICAgdGhpcy5fYXBwbHlDbGFzc2VzKHRoaXMuX2luaXRpYWxDbGFzc2VzKTsKICAgICAgICAgICAgdGhpcy5faXRlcmFibGVEaWZmZXIgPSBudWxsOwogICAgICAgICAgICB0aGlzLl9rZXlWYWx1ZURpZmZlciA9IG51bGw7CiAgICAgICAgICAgIHRoaXMuX3Jhd0NsYXNzID0gdHlwZW9mIHZhbHVlID09PSAnc3RyaW5nJyA/IHZhbHVlLnNwbGl0KC9ccysvKSA6IHZhbHVlOwogICAgICAgICAgICBpZiAodGhpcy5fcmF3Q2xhc3MpIHsKICAgICAgICAgICAgICAgIGlmIChpc0xpc3RMaWtlSXRlcmFibGUkMSh0aGlzLl9yYXdDbGFzcykpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9pdGVyYWJsZURpZmZlciA9IHRoaXMuX2l0ZXJhYmxlRGlmZmVycy5maW5kKHRoaXMuX3Jhd0NsYXNzKS5jcmVhdGUoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX2tleVZhbHVlRGlmZmVyID0gdGhpcy5fa2V5VmFsdWVEaWZmZXJzLmZpbmQodGhpcy5fcmF3Q2xhc3MpLmNyZWF0ZSgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdEb0NoZWNrKCkgewogICAgICAgICAgICBpZiAodGhpcy5faXRlcmFibGVEaWZmZXIpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGl0ZXJhYmxlQ2hhbmdlcyA9IHRoaXMuX2l0ZXJhYmxlRGlmZmVyLmRpZmYoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX3Jhd0NsYXNzKSkpOwogICAgICAgICAgICAgICAgaWYgKGl0ZXJhYmxlQ2hhbmdlcykgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX2FwcGx5SXRlcmFibGVDaGFuZ2VzKGl0ZXJhYmxlQ2hhbmdlcyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAodGhpcy5fa2V5VmFsdWVEaWZmZXIpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGtleVZhbHVlQ2hhbmdlcyA9IHRoaXMuX2tleVZhbHVlRGlmZmVyLmRpZmYoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX3Jhd0NsYXNzKSkpOwogICAgICAgICAgICAgICAgaWYgKGtleVZhbHVlQ2hhbmdlcykgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX2FwcGx5S2V5VmFsdWVDaGFuZ2VzKGtleVZhbHVlQ2hhbmdlcyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGNoYW5nZXMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9hcHBseUtleVZhbHVlQ2hhbmdlcyhjaGFuZ2VzKSB7CiAgICAgICAgICAgIGNoYW5nZXMuZm9yRWFjaEFkZGVkSXRlbSgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcmVjb3JkCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAocmVjb3JkKSA9PiB0aGlzLl90b2dnbGVDbGFzcyhyZWNvcmQua2V5LCByZWNvcmQuY3VycmVudFZhbHVlKSkpOwogICAgICAgICAgICBjaGFuZ2VzLmZvckVhY2hDaGFuZ2VkSXRlbSgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcmVjb3JkCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAocmVjb3JkKSA9PiB0aGlzLl90b2dnbGVDbGFzcyhyZWNvcmQua2V5LCByZWNvcmQuY3VycmVudFZhbHVlKSkpOwogICAgICAgICAgICBjaGFuZ2VzLmZvckVhY2hSZW1vdmVkSXRlbSgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcmVjb3JkCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAocmVjb3JkKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAocmVjb3JkLnByZXZpb3VzVmFsdWUpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl90b2dnbGVDbGFzcyhyZWNvcmQua2V5LCBmYWxzZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGNoYW5nZXMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9hcHBseUl0ZXJhYmxlQ2hhbmdlcyhjaGFuZ2VzKSB7CiAgICAgICAgICAgIGNoYW5nZXMuZm9yRWFjaEFkZGVkSXRlbSgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcmVjb3JkCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAocmVjb3JkKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHJlY29yZC5pdGVtID09PSAnc3RyaW5nJykgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX3RvZ2dsZUNsYXNzKHJlY29yZC5pdGVtLCB0cnVlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgTmdDbGFzcyBjYW4gb25seSB0b2dnbGUgQ1NTIGNsYXNzZXMgZXhwcmVzc2VkIGFzIHN0cmluZ3MsIGdvdCAke3N0cmluZ2lmeShyZWNvcmQuaXRlbSl9YCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgY2hhbmdlcy5mb3JFYWNoUmVtb3ZlZEl0ZW0oKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHJlY29yZAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHJlY29yZCkgPT4gdGhpcy5fdG9nZ2xlQ2xhc3MocmVjb3JkLml0ZW0sIGZhbHNlKSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBcHBsaWVzIGEgY29sbGVjdGlvbiBvZiBDU1MgY2xhc3NlcyB0byB0aGUgRE9NIGVsZW1lbnQuCiAgICAgICAgICoKICAgICAgICAgKiBGb3IgYXJndW1lbnQgb2YgdHlwZSBTZXQgYW5kIEFycmF5IENTUyBjbGFzcyBuYW1lcyBjb250YWluZWQgaW4gdGhvc2UgY29sbGVjdGlvbnMgYXJlIGFsd2F5cwogICAgICAgICAqIGFkZGVkLgogICAgICAgICAqIEZvciBhcmd1bWVudCBvZiB0eXBlIE1hcCBDU1MgY2xhc3MgbmFtZSBpbiB0aGUgbWFwJ3Mga2V5IGlzIHRvZ2dsZWQgYmFzZWQgb24gdGhlIHZhbHVlIChhZGRlZAogICAgICAgICAqIGZvciB0cnV0aHkgYW5kIHJlbW92ZWQgZm9yIGZhbHN5KS4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gcmF3Q2xhc3NWYWwKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9hcHBseUNsYXNzZXMocmF3Q2xhc3NWYWwpIHsKICAgICAgICAgICAgaWYgKHJhd0NsYXNzVmFsKSB7CiAgICAgICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShyYXdDbGFzc1ZhbCkgfHwgcmF3Q2xhc3NWYWwgaW5zdGFuY2VvZiBTZXQpIHsKICAgICAgICAgICAgICAgICAgICAoKC8qKiBAdHlwZSB7P30gKi8gKHJhd0NsYXNzVmFsKSkpLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30ga2xhc3MKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgIChrbGFzcykgPT4gdGhpcy5fdG9nZ2xlQ2xhc3Moa2xhc3MsIHRydWUpKSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyhyYXdDbGFzc1ZhbCkuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBrbGFzcwogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAga2xhc3MgPT4gdGhpcy5fdG9nZ2xlQ2xhc3Moa2xhc3MsICEhcmF3Q2xhc3NWYWxba2xhc3NdKSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJlbW92ZXMgYSBjb2xsZWN0aW9uIG9mIENTUyBjbGFzc2VzIGZyb20gdGhlIERPTSBlbGVtZW50LiBUaGlzIGlzIG1vc3RseSB1c2VmdWwgZm9yIGNsZWFudXAKICAgICAgICAgKiBwdXJwb3Nlcy4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gcmF3Q2xhc3NWYWwKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9yZW1vdmVDbGFzc2VzKHJhd0NsYXNzVmFsKSB7CiAgICAgICAgICAgIGlmIChyYXdDbGFzc1ZhbCkgewogICAgICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkocmF3Q2xhc3NWYWwpIHx8IHJhd0NsYXNzVmFsIGluc3RhbmNlb2YgU2V0KSB7CiAgICAgICAgICAgICAgICAgICAgKCgvKiogQHR5cGUgez99ICovIChyYXdDbGFzc1ZhbCkpKS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGtsYXNzCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAoa2xhc3MpID0+IHRoaXMuX3RvZ2dsZUNsYXNzKGtsYXNzLCBmYWxzZSkpKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIE9iamVjdC5rZXlzKHJhd0NsYXNzVmFsKS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGtsYXNzCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICBrbGFzcyA9PiB0aGlzLl90b2dnbGVDbGFzcyhrbGFzcywgZmFsc2UpKSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGtsYXNzCiAgICAgICAgICogQHBhcmFtIHs/fSBlbmFibGVkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfdG9nZ2xlQ2xhc3Moa2xhc3MsIGVuYWJsZWQpIHsKICAgICAgICAgICAga2xhc3MgPSBrbGFzcy50cmltKCk7CiAgICAgICAgICAgIGlmIChrbGFzcykgewogICAgICAgICAgICAgICAga2xhc3Muc3BsaXQoL1xzKy9nKS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30ga2xhc3MKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIGtsYXNzID0+IHsKICAgICAgICAgICAgICAgICAgICBpZiAoZW5hYmxlZCkgewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9yZW5kZXJlci5hZGRDbGFzcyh0aGlzLl9uZ0VsLm5hdGl2ZUVsZW1lbnQsIGtsYXNzKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3JlbmRlcmVyLnJlbW92ZUNsYXNzKHRoaXMuX25nRWwubmF0aXZlRWxlbWVudCwga2xhc3MpOwog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b20ge1xAbGluayBJbmplY3Rvcn0gdGhhdCB3aWxsIGJlIHVzZWQgYXMgcGFyZW50IGZvcgogICAgICogdGhlIENvbXBvbmVudC4gRGVmYXVsdHMgdG8gdGhlIGluamVjdG9yIG9mIHRoZSBjdXJyZW50IHZpZXcgY29udGFpbmVyLgogICAgICoKICAgICAqICogYG5nQ29tcG9uZW50T3V0bGV0Q29udGVudGA6IE9wdGlvbmFsIGxpc3Qgb2YgcHJvamVjdGFibGUgbm9kZXMgdG8gaW5zZXJ0IGludG8gdGhlIGNvbnRlbnQKICAgICAqIHNlY3Rpb24gb2YgdGhlIGNvbXBvbmVudCwgaWYgZXhpc3RzLgogICAgICoKICAgICAqICogYG5nQ29tcG9uZW50T3V0bGV0TmdNb2R1bGVGYWN0b3J5YDogT3B0aW9uYWwgbW9kdWxlIGZhY3RvcnkgdG8gYWxsb3cgZHluYW1pY2FsbHkgbG9hZGluZyBvdGhlcgogICAgICogbW9kdWxlLCB0aGVuIGxvYWQgYSBjb21wb25lbnQgZnJvbSB0aGF0IG1vZHVsZS4KICAgICAqCiAgICAgKiAjIyMgU3ludGF4CiAgICAgKgogICAgICogU2ltcGxlCiAgICAgKiBgYGAKICAgICAqIDxuZy1jb250YWluZXIgKm5nQ29tcG9uZW50T3V0bGV0PSJjb21wb25lbnRUeXBlRXhwcmVzc2lvbiI+PC9uZy1jb250YWluZXI+CiAgICAgKiBgYGAKICAgICAqCiAgICAgKiBDdXN0b21pemVkIGluamVjdG9yL2NvbnRlbnQKICAgICAqIGBgYAogICAgICogPG5nLWNvbnRhaW5lciAqbmdDb21wb25lbnRPdXRsZXQ9ImNvbXBvbmVudFR5cGVFeHByZXNzaW9uOwogICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluamVjdG9yOiBpbmplY3RvckV4cHJlc3Npb247CiAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGVudDogY29udGVudE5vZGVzRXhwcmVzc2lvbjsiPgogICAgICogPC9uZy1jb250YWluZXI+CiAgICAgKiBgYGAKICAgICAqCiAgICAgKiBDdXN0b21pemVkIG5nTW9kdWxlRmFjdG9yeQogICAgICogYGBgCiAgICAgKiA8bmctY29udGFpbmVyICpuZ0NvbXBvbmVudE91dGxldD0iY29tcG9uZW50VHlwZUV4cHJlc3Npb247CiAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmdNb2R1bGVGYWN0b3J5OiBtb2R1bGVGYWN0b3J5OyI+CiAgICAgKiA8L25nLWNvbnRhaW5lcj4KICAgICAqIGBgYAogICAgICoKICAgICAqICMjIyBBIHNpbXBsZSBleGFtcGxlCiAgICAgKgogICAgICoge1xAZXhhbXBsZSBjb21tb24vbmdDb21wb25lbnRPdXRsZXQvdHMvbW9kdWxlLnRzIHJlZ2lvbj0nU2ltcGxlRXhhbXBsZSd9CiAgICAgKgogICAgICogQSBtb3JlIGNvbXBsZXRlIGV4YW1wbGUgd2l0aCBhZGRpdGlvbmFsIG9wdGlvbnM6CiAgICAgKgogICAgICoge1xAZXhhbXBsZSBjb21tb24vbmdDb21wb25lbnRPdXRsZXQvdHMvbW9kdWxlLnRzIHJlZ2lvbj0nQ29tcGxldGVFeGFtcGxlJ30KICAgICAqCiAgICAgKiBcQHB1YmxpY0FwaQogICAgICogXEBuZ01vZHVsZSBDb21tb25Nb2R1bGUKICAgICAqLwogICAgY2xhc3MgTmdDb21wb25lbnRPdXRsZXQgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gX3ZpZXdDb250YWluZXJSZWYKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3Rvcihfdmlld0NvbnRhaW5lclJlZikgewogICAgICAgICAgICB0aGlzLl92aWV3Q29udGFpbmVyUmVmID0gX3ZpZXdDb250YWluZXJSZWY7CiAgICAgICAgICAgIHRoaXMuX2NvbXBvbmVudFJlZiA9IG51bGw7CiAgICAgICAgICAgIHRoaXMuX21vZHVsZVJlZiA9IG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gY2hhbmdlcwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkNoYW5nZXMoY2hhbmdlcykgewogICAgICAgICAgICB0aGlzLl92aWV3Q29udGFpbmVyUmVmLmNsZWFyKCk7CiAgICAgICAgICAgIHRoaXMuX2NvbXBvbmVudFJlZiA9IG51bGw7CiAgICAgICAgICAgIGlmICh0aGlzLm5nQ29tcG9uZW50T3V0bGV0KSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBlbEluamVjdG9yID0gdGhpcy5uZ0NvbXBvbmVudE91dGxldEluamVjdG9yIHx8IHRoaXMuX3ZpZXdDb250YWluZXJSZWYucGFyZW50SW5qZWN0b3I7CiAgICAgICAgICAgICAgICBpZiAoY2hhbmdlc1snbmdDb21wb25lbnRPdXRsZXROZ01vZHVsZUZhY3RvcnknXSkgewogICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLl9tb2R1bGVSZWYpCiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX21vZHVsZVJlZi5kZXN0cm95KCk7CiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMubmdDb21wb25lbnRPdXRsZXROZ01vZHVsZUZhY3RvcnkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBwYXJlbnRNb2R1bGUgPSBlbEluamVjdG9yLmdldChOZ01vZHVsZVJlZik7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX21vZHVsZVJlZiA9IHRoaXMubmdDb21wb25lbnRPdXRsZXROZ01vZHVsZUZhY3RvcnkuY3JlYXRlKHBhcmVudE1vZHVsZS5pbmplY3Rvcik7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9tb2R1bGVSZWYgPSBudWxsOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGNvbXBvbmVudEZhY3RvcnlSZXNvbHZlciA9IHRoaXMuX21vZHVsZVJlZiA/IHRoaXMuX21vZHVsZVJlZi5jb21wb25lbnRGYWN0b3J5UmVzb2x2ZXIgOgogICAgICAgICAgICAgICAgICAgIGVsSW5qZWN0b3IuZ2V0KENvbXBvbmVudEZhY3RvcnlSZXNvbHZlcik7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBjb21wb25lbnRGYWN0b3J5ID0gY29tcG9uZW50RmFjdG9yeVJlc29sdmVyLnJlc29sdmVDb21wb25lbnRGYWN0b3J5KHRoaXMubmdDb21wb25lbnRPdXRsZXQpOwogICAgICAgICAgICAgICAgdGhpcy5fY29tcG9uZW50UmVmID0gdGhpcy5fdmlld0NvbnRhaW5lclJlZi5jcmVhdGVDb21wb25lbnQoY29tcG9uZW50RmFjdG9yeSwgdGhpcy5fdmlld0NvbnRhaW5lclJlZi5sZW5ndGgsIGVsSW5qZWN0b3IsIHRoaXMubmdDb21wb25lbnRPdXRsZXRDb250ZW50KTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25EZXN0cm95KCkgewogICAgICAgICAgICBpZiAodGhpcy5fbW9kdWxlUmVmKQogICAgICAgICAgICAgICAgdGhpcy5fbW9kdWxlUmVmLmRlc3Ryb3koKTsKICAgICAgICB9CiAgICB9CiAgICBOZ0NvbXBvbmVudE91dGxldC7JtWZhYyA9IGZ1bmN0aW9uIE5nQ29tcG9uZW50T3V0bGV0X0ZhY3RvcnkodCkgeyByZXR1c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B1dCB9XQogICAgfTsKCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcgYWRkZWQgYnkgdHNpY2tsZQogICAgICogR2VuZXJhdGVkIGZyb206IHBhY2thZ2VzL2NvbW1vbi9zcmMvZGlyZWN0aXZlcy9uZ19mb3Jfb2YudHMKICAgICAqIEBzdXBwcmVzcyB7Y2hlY2tUeXBlcyxjb25zdGFudFByb3BlcnR5LGV4dHJhUmVxdWlyZSxtaXNzaW5nT3ZlcnJpZGUsbWlzc2luZ1JldHVybix1bnVzZWRQcml2YXRlTWVtYmVycyx1c2VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgLyoqCiAgICAgKiBcQHB1YmxpY0FwaQogICAgICogQHRlbXBsYXRlIFQsIFUKICAgICAqLwogICAgY2xhc3MgTmdGb3JPZkNvbnRleHQgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gJGltcGxpY2l0CiAgICAgICAgICogQHBhcmFtIHs/fSBuZ0Zvck9mCiAgICAgICAgICogQHBhcmFtIHs/fSBpbmRleAogICAgICAgICAqIEBwYXJhbSB7P30gY291bnQKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcigkaW1wbGljaXQsIG5nRm9yT2YsIGluZGV4LCBjb3VudCkgewogICAgICAgICAgICB0aGlzLiRpbXBsaWNpdCA9ICRpbXBsaWNpdDsKICAgICAgICAgICAgdGhpcy5uZ0Zvck9mID0gbmdGb3JPZjsKICAgICAgICAgICAgdGhpcy5pbmRleCA9IGluZGV4OwogICAgICAgICAgICB0aGlzLmNvdW50ID0gY291bnQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGZpcnN0KCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5pbmRleCA9PT0gMDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgK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hdGlvbi5gKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl90cmFja0J5Rm4gPSBmbjsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgbmdGb3JUcmFja0J5KCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fdHJhY2tCeUZuOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBIHJlZmVyZW5jZSB0byB0aGUgdGVtcGxhdGUgdGhhdCBpcyBzdGFtcGVkIG91dCBmb3IgZWFjaCBpdGVtIGluIHRoZSBpdGVyYWJsZS4KICAgICAgICAgKiBAc2VlIFt0ZW1wbGF0ZSByZWZlcmVuY2UgdmFyaWFibGVdKGd1aWRlL3RlbXBsYXRlLXN5bnRheCN0ZW1wbGF0ZS1yZWZlcmVuY2UtdmFyaWFibGVzLS12YXItKQogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBuZ0ZvclRlbXBsYXRlKHZhbHVlKSB7CiAgICAgICAgICAgIC8vIFRPRE8oVFMyLjEpOiBtYWtlIFRlbXBsYXRlUmVmPFBhcnRpYWw8TmdGb3JSb3dPZjxUPj4+IG9uY2Ugd2UgbW92ZSB0byBUUyB2Mi4xCiAgICAgICAgICAgIC8vIFRoZSBjdXJyZW50IHR5cGUgaXMgdG9vIHJlc3RyaWN0aXZlOyBhIHRlbXBsYXRlIHRoYXQganVzdCB1c2VzIGluZGV4LCBmb3IgZXhhbXBsZSwKICAgICAgICAgICAgLy8gc2hvdWxkIGJlIGFjY2VwdGFibGUuCiAgICAgICAgICAgIGlmICh2YWx1ZSkgewogICAgICAgICAgICAgICAgdGhpcy5fdGVtcGxhdGUgPSB2YWx1ZTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBcHBsaWVzIHRoZSBjaGFuZ2VzIHdoZW4gbmVlZGVkLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdEb0NoZWNrKCkgewogICAgICAgICAgICBpZiAodGhpcy5fbmdGb3JPZkRpcnR5KSB7CiAgICAgICAgICAgICAgICB0aGlzLl9uZ0Zvck9mRGlydHkgPSBmYWxzZTsKICAgICAgICAgICAgICAgIC8vIFJlYWN0IG9uIG5nRm9yT2YgY2hhbmdlcyBvbmx5IG9uY2UgYWxsIGlucHV0cyBoYXZlIGJlZW4gaW5pdGlhbGl6ZWQKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHZhbHVlID0gdGhpcy5fbmdGb3JPZjsKICAgICAgICAgICAgICAgIGlmICghdGhpcy5fZGlmZmVyICYmIHZhbHVlKSB7CiAgICAgICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fZGlmZmVyID0gdGhpcy5fZGlmZmVycy5maW5kKHZhbHVlKS5jcmVhdGUodGhpcy5uZ0ZvclRyYWNrQnkpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBjYXRjaCAoX2EpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBDYW5ub3QgZmluZCBhIGRpZmZlciBzdXBwb3J0aW5nIG9iamVjdCAnJHt2YWx1ZX0nIG9mIHR5cGUgJyR7Z2V0VHlwZU5hbWUkMSh2YWx1ZSl9Jy4gTmdGb3Igb25seSBzdXBwb3J0cyBiaW5kaW5nIHRvIEl0ZXJhYmxlcyBzdWNoIGFzIEFycmF5cy5gKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHRoaXMuX2RpZmZlcikgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgY2hhbmdlcyA9IHRoaXMuX2RpZmZlci5kaWZmKHRoaXMuX25nRm9yT2YpOwogICAgICAgICAgICAgICAgaWYgKGNoYW5nZXMpCiAgICAgICAgICAgICAgICAgICAgdGhpcy5fYXBwbHlDaGFuZ2VzKGNoYW5nZXMpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBjaGFuZ2VzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfYXBwbHlDaGFuZ2VzKGNoYW5nZXMpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBpbnNlcnRUdXBsZXMgPSBbXTsKICAgICAgICAgICAgY2hhbmdlcy5mb3JFYWNoT3BlcmF0aW9uKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBpdGVtCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gYWRqdXN0ZWRQcmV2aW91c0luZGV4CiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY3VycmVudEluZGV4CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoaXRlbSwgYWRqdXN0ZWRQcmV2aW91c0luZGV4LCBjdXJyZW50SW5kZXgpID0+IHsKICAgICAgICAgICAgICAgIGlmIChpdGVtLnByZXZpb3VzSW5kZXggPT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIC8vIE5nRm9yT2YgaXMgbmV2ZXIgIm51bGwiIG9yICJ1bmRlZmluZWQiIGhlcmUgYmVjYXVzZSB0aGUgZGlmZmVyIGRldGVjdGVkCiAgICAgICAgICAgICAgICAgICAgLy8gdGhhdCBhIG5ldyBpdGVtIG5lZWRzIHRvIGJlIGluc2VydGVkIGZyb20gdGhlIGl0ZXJhYmxlLiBUaGlzIGltcGxpZXMgdGhhdAogICAgICAgICAgICAgICAgICAgIC8vIHRoZXJlIGlzIGFuIGl0ZXJhYmxlIHZhbHVlIGZvciAiX25nRm9yT2YiLgogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCB2aWV3ID0gdGhpcy5fdmlld0NvbnRhaW5lci5jcmVhdGVFbWJlZGRlZFZpZXcodGhpcy5fdGVtcGxhdGUsIG5ldyBOZ0Zvck9mQ29udGV4dCgoLyoqIEB0eXBlIHs/fSAqLyAobnVsbCkpLCAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5fbmdGb3JPZikpLCAtMSwgLTEpLCBjdXJyZW50SW5kZXggPT09IG51bGwgPyB1bmRlZmluZWQgOiBjdXJyZW50SW5kZXgpOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCB0dXBsZSA9IG5ldyBSZWNvcmRWaWV3VHVwbGUoaXRlbSwgdmlldyk7CiAgICAgICAgICAgICAgICAgICAgaW5zZXJ0VHVwbGVzLnB1c2godHVwbGUpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAoY3VycmVudEluZGV4ID09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl92aWV3Q29udGFpbmVyLnJlbW92ZShhZGp1c3RlZFByZXZpb3VzSW5kZXggPT09IG51bGwgPyB1bmRlZmluZWQgOiBhZGp1c3RlZFByZXZpb3VzSW5kZXgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAoYWRqdXN0ZWRQcmV2aW91c0luZGV4ICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHZpZXcgPSAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5fdmlld0NvbnRhaW5lci5nZXQoYWRqdXN0ZWRQcmV2aW91c0luZGV4KSkpOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX3ZpZXdDb250YWluZXIubW92ZSh2aWV3LCBjdXJyZW50SW5kZXgpOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCB0dXBsZSA9IG5ldyBSZWNvcmRWaWV3VHVwbGUoaXRlbSwgKC8qKiBAdHlwZSB7P30gKi8gKHZpZXcpKSk7CiAgICAgICAgICAgICAgICAgICAgaW5zZXJ0VHVwbGVzLnB1c2godHVwbGUpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgaW5zZXJ0VHVwbGVzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9wZXJWaWV3Q2hhbmdlKGluc2VydFR1cGxlc1tpXS52aWV3LCBpbnNlcnRUdXBsZXNbaV0ucmVjb3JkKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBmb3IgKGxldCBpID0gMCwgaWxlbiA9IHRoaXMuX3ZpZXdDb250YWluZXIubGVuZ3RoOyBpIDwgaWxlbjsgaSsrKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCB2aWV3UmVmID0gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX3ZpZXdDb250YWluZXIuZ2V0KGkpKSk7CiAgICAgICAgICAgICAgICB2aWV3UmVmLmNvbnRleHQuaW5kZXggPSBpOwogICAgICAgICAgICAgICAgdmlld1JlZi5jb250ZXh0LmNvdW50ID0gaWxlbjsKICAgICAgICAgICAgICAgIHZpZXdSZWYuY29udGV4dC5uZ0Zvck9mID0gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX25nRm9yT2YpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBjaGFuZ2VzLmZvckVhY2hJZGVudGl0eUNoYW5nZSgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcmVjb3JkCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAocmVjb3JkKSA9PiB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCB2aWV3UmVmID0gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX3ZpZXdDb250YWluZXIuZ2V0KHJlY29yZC5jdXJyZW50SW5kZXgpKSk7CiAgICAgICAgICAgICAgICB2aWV3UmVmLmNvbnRleHQuJGltcGxpY2l0ID0gcmVjb3JkLml0ZW07CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHZpZXcKICAgICAgICAgKiBAcGFyYW0gez99IHJlY29yZAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3BlclZpZXdDaGFuZ2UodmlldywgcmVjb3JkKSB7CiAgICAgICAgICAgIHZpZXcuY29udGV4dC4kaW1wbGljaXQgPSByZWNvcmQuaXRlbTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQXNzZXJ0cyB0aGUgY29ycmVjdCB0eXBlIG9mIHRoZSBjb250ZXh0IGZvciB0aGUgdGVtcGxhdGUgdGhhdCBgTmdGb3JPZmAgd2lsbCByZW5kZXIuCiAgICAgICAgICoKICAgICAgICAgKiBUaGUgcHJlc2VuY2Ugb2YgdGhpcyBtZXRob2QgaXMgYSBzaWduYWwgdG8gdGhlIEl2eSB0ZW1wbGF0ZSB0eXBlLWNoZWNrIGNvbXBpbGVyIHRoYXQgdGhlCiAgICAgICAgICogYE5nRm9yT2ZgIHN0cnVjdHVyYWwgZGlyZWN0aXZlIHJlbmRlcnMgaXRzIHRlbXBsYXRlIHdpdGggYSBzcGVjaW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gbmdGb3JPZjogW3sgdHlwZTogSW5wdXQgfV0sCiAgICAgICAgbmdGb3JUcmFja0J5OiBbeyB0eXBlOiBJbnB1dCB9XSwKICAgICAgICBuZ0ZvclRlbXBsYXRlOiBbeyB0eXBlOiBJbnB1dCB9XQogICAgfTsKICAgIC8qKgogICAgICogQHRlbXBsYXRlIFQsIFUKICAgICAqLwogICAgY2xhc3MgUmVjb3JkVmlld1R1cGxlIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHJlY29yZAogICAgICAgICAqIEBwYXJhbSB7P30gdmlldwogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKHJlY29yZCwgdmlldykgewogICAgICAgICAgICB0aGlzLnJlY29yZCA9IHJlY29yZDsKICAgICAgICAgICAgdGhpcy52aWV3ID0gdmlldzsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdHlwZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0VHlwZU5hbWUkMSh0eXBlKSB7CiAgICAgICAgcmV0dXJuIHR5cGVbJ25hbWUnXSB8fCB0eXBlb2YgdHlwZTsKICAgIH0KCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcgYWRkZWQgYnkgdHNpY2tsZQogICAgICogR2VuZXJhdGVkIGZyb206IHBhY2thZ2VzL2NvbW1vbi9zcmMvZGlyZWN0aXZlcy9uZ19pZi50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvKioKICAgICAqIEEgc3RydWN0dXJhbCBkaXJlY3RpdmUgdGhhdCBjb25kaXRpb25hbGx5IGluY2x1ZGVzIGEgdGVtcGxhd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W9kdWxlCiAgICAgKiBcQHB1YmxpY0FwaQogICAgICogQHRlbXBsYXRlIFQKICAgICAqLwogICAgY2xhc3MgTmdJZiB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBfdmlld0NvbnRhaW5lcgogICAgICAgICAqIEBwYXJhbSB7P30gdGVtcGxhdGVSZWYKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3Rvcihfdmlld0NvbnRhaW5lciwgdGVtcGxhdGVSZWYpIHsKICAgICAgICAgICAgdGhpcy5fdmlld0NvbnRhaW5lciA9IF92aWV3Q29udGFpbmVyOwogICAgICAgICAgICB0aGlzLl9jb250ZXh0ID0gbmV3IE5nSWZDb250ZXh0KCk7CiAgICAgICAgICAgIHRoaXMuX3RoZW5UZW1wbGF0ZVJlZiA9IG51bGw7CiAgICAgICAgICAgIHRoaXMuX2Vsc2VUZW1wbGF0ZVJlZiA9IG51bGw7CiAgICAgICAgICAgIHRoaXMuX3RoZW5WaWV3UmVmID0gbnVsbDsKICAgICAgICAgICAgdGhpcy5fZWxzZVZpZXdSZWYgPSBudWxsOwogICAgICAgICAgICB0aGlzLl90aGVuVGVtcGxhdGVSZWYgPSB0ZW1wbGF0ZVJlZjsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIEJvb2xlYW4gZXhwcmVzc2lvbiB0byBldmFsdWF0ZSBhcyB0aGUgY29uZGl0aW9uIGZvciBzaG93aW5nIGEgdGVtcGxhdGUuCiAgICAgICAgICogQHBhcmFtIHs/fSBjb25kaXRpb24KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBuZ0lmKGNvbmRpdGlvbikgewogICAgICAgICAgICB0aGlzLl9jb250ZXh0LiRpbXBsaWNpdCA9IHRoaXMuX2NvbnRleHQubmdJZiA9IGNvbmRpdGlvbjsKICAgICAgICAgICAgdGhpcy5fdXBkYXRlVmlldygpOwogICAgICAgIH0KICAgICAgICAvKioKICA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HJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfdXBkYXRlVmlldygpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX2NvbnRleHQuJGltcGxpY2l0KSB7CiAgICAgICAgICAgICAgICBpZiAoIXRoaXMuX3RoZW5WaWV3UmVmKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fdmlld0NvbnRhaW5lci5jbGVhcigpOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX2Vsc2VWaWV3UmVmID0gbnVsbDsKICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5fdGhlblRlbXBsYXRlUmVmKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3RoZW5WaWV3UmVmID0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3ZpZXdDb250YWluZXIuY3JlYXRlRW1iZWRkZWRWaWV3KHRoaXMuX3RoZW5UZW1wbGF0ZVJlZiwgdGhpcy5fY29udGV4dCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgaWYgKCF0aGlzLl9lbHNlVmlld1JlZikgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX3ZpZXdDb250YWluZXIuY2xlYXIoKTsKICAgICAgICAgICAgICAgICAgICB0aGlzLl90aGVuVmlld1JlZiA9IG51bGw7CiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX2Vsc2VUZW1wbGF0ZVJlZikgewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9lbHNlVmlld1JlZiA9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl92aWV3Q29udGFpbmVyLmNyZWF0ZUVtYmVkZGVkVmlldyh0aGlzLl9lbHNlVGVtcGxhdGVSZWYsIHRoaXMuX2NvbnRleHQpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgf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GVSZWYsIGJ1dCByZWNlaXZlZCAnJHtzdHJpbmdpZnkodGVtcGxhdGVSZWYpfScuYCk7CiAgICAgICAgfQogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogcGFja2FnZXMvY29tbW9uL3NyYy9kaXJlY3RpdmVzL25nX3N3aXRjaC50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICBjbGFzcyBTd2l0Y2hWaWV3IHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IF92aWV3Q29udGFpbmVyUmVmCiAgICAgICAgICogQHBhcmFtIHs/fSBfdGVtcGxhdGVSZWYKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3Rvcihfdmlld0NvbnRhaW5lclJlZiwgX3RlbXBsYXRlUmVmKSB7CiAgICAgICAgICAgIHRoaXMuX3ZpZXdDb250YWluZXJSZWYgPSBfdmlld0NvbnRhaW5lclJlZjsKICAgICAgICAgICAgdGhpcy5fdGVtcGxhdGVSZWYgPSBfdGVtcGxhdGVSZWY7CiAgICAgICAgICAgIHRoaXMuX2NyZWF0ZWQgPSBmYWxzZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBjcmVhdGUoKSB7CiAgICAgICAgICAgIHRoaXMuX2NyZWF0ZWQgPSB0cnVlOwogICAgICAgICAgICB0aGlzLl92aWV3Q29udGFpbmVyUmVmLmNyZWF0ZUVtYmVkZGVkVmlldyh0aGlzLl90ZW1wbGF0ZVJlZik7CiAgICAgICAgfQogICAgICAgIC8q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NvbWUtZWxlbWVudCAqbmdTd2l0Y2hDYXNlPSJtYXRjaF9leHByZXNzaW9uXzEiPi4uLjwvc29tZS1lbGVtZW50PgogICAgICogICAgICAgPHNvbWUtZWxlbWVudCAqbmdTd2l0Y2hDYXNlPSJtYXRjaF9leHByZXNzaW9uXzIiPi4uLjwvc29tZS1lbGVtZW50PgogICAgICogICAgICAgPHNvbWUtb3RoZXItZWxlbWVudCAqbmdTd2l0Y2hDYXNlPSJtYXRjaF9leHByZXNzaW9uXzMiPi4uLjwvc29tZS1vdGhlci1lbGVtZW50PgogICAgICogICAgICAgPG5nLWNvbnRhaW5lciAqbmdTd2l0Y2hDYXNlPSJtYXRjaF9leHByZXNzaW9uXzMiPgogICAgICogICAgICAgICA8IS0tIHVzZSBhIG5nLWNvbnRhaW5lciB0byBncm91cCBtdWx0aXBsZSByb290IG5vZGVzIC0tPgogICAgICogICAgICAgICA8aW5uZXItZWxlbWVudD48L2lubmVyLWVsZW1lbnQ+CiAgICAgKiAgICAgICAgIDxpbm5lci1vdGhlci1lbGVtZW50PjwvaW5uZXItb3RoZXItZWxlbWVudD4KICAgICAqICAgICAgIDwvbmctY29udGFpbmVyPgogICAgICogICAgICAgPHNvbWUtZWxlbWVudCAqbmdTd2l0Y2hEZWZhdWx0Pi4uLjwvc29tZS1lbGVtZW50PgogICAgICogICAgIDwvY29udGFpbmVyLWVsZW1lbnQ+CiAgICAgKiBgYGAKICAgICAqCiAgICAgKiBcQHB1YmxpY0FwaQogICAgICogQHNlZSBgTmdTd2l0Y2hDYXNlYAogICAgICogQHNlZSBgTmdTd2l0Y2hEZWZhdWx0YAogICAgICogQHNlZSBbU3RydWN0dXJhbCBEaXJlY3RpdmVzXShndWlkZS9zdHJ1Y3R1cmFsLWRpcmVjdGl2ZXMpCiAgICAgKgogICAgICovCiAgICBjbGFzcyBOZ1N3aXRjaCB7CiAgICAgICAgY29uc3RydWN0b3IoKSB7CiAgICAgICAgICAgIHRoaXMuX2RlZmF1bHRVc2VkID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuX2Nhc2VDb3VudCA9IDA7CiAgICAgICAgICAgIHRoaXMuX2xhc3RDYXNlQ2hlY2tJbmRleCA9IDA7CiAgICAgICAgICAgIHRoaXMuX2xhc3RDYXNlc01hdGNoZWQgPSBmYWxzZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBuZXdWYWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IG5nU3dpdGNoKG5ld1ZhbHVlKSB7CiAgICAgICAgICAgIHRoaXMuX25nU3dpdGNoID0gbmV3VmFsdWU7CiAgICAgICAgICAgIGlmICh0aGlzLl9jYXNlQ291bnQgPT09IDApIHsKICAgICAgICAgICAgICAgIHRoaXMuX3VwZGF0ZURlZmF1bHRDYXNlcyh0cnVlKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfYWRkQ2FzZSgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2Nhc2VDb3VudCsrOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICogQHBhcmFtIHs/fSB2aWV3CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfYWRkRGVmYXVsdCh2aWV3KSB7CiAgICAgICAgICAgIGlmICghdGhpcy5fZGVmYXVsdFZpZXdzKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9kZWZhdWx0Vmlld3MgPSBbXTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9kZWZhdWx0Vmlld3MucHVzaCh2aWV3KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9tYXRjaENhc2UodmFsdWUpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBtYXRjaGVkID0gdmFsdWUgPT0gdGhpcy5fbmdTd2l0Y2g7CiAgICAgICAgICAgIHRoaXMuX2xhc3RDYXNlc01hdGNoZWQgPSB0aGlzLl9sYXN0Q2FzZXNNYXRjaGVkIHx8IG1hdGNoZWQ7CiAgICAgICAgICAgIHRoaXMuX2xhc3RDYXNlQ2hlY2tJbmRleCsrOwogICAgICAgICAgICBpZiAodGhpcy5fbGFzdENhc2VDaGVja0luZGV4ID09PSB0aGlzLl9jYXNlQ291bnQpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3VwZGF0ZURlZmF1bHRDYXNlcyghdGhpcy5fbGFzdENhc2VzTWF0Y2hlZCk7CiAgICAgICAgICAgICAgICB0aGlzLl9sYXN0Q2FzZUNoZWNrSW5kZXggPSAwOwogICAgICAgICAgICAgICAgdGhpcy5fbGFzdENhc2VzTWF0Y2hlZCA9IGZhbHNlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBtYXRjaGVkOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gdXNlRGVmYXVsdAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3VwZGF0ZURlZmF1bHRDYXNlcyh1c2VEZWZhdWx0KSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9kZWZhdWx0Vmlld3MgJiYgdXNlRGVmYXVsdCAhPT0gdGhpcy5fZGVmYXVsdFVzZWQpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2RlZmF1bHRVc2VkID0gdXNlRGVmYXVsdDsKICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgdGhpcy5fZGVmYXVsdFZpZXdzL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ci1zcGVjL3BsdXJhbC1ydWxlcwogICAgICoKICAgICAqIFxAcHVibGljQXBpCiAgICAgKi8KICAgIGNsYXNzIE5nUGx1cmFsIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IF9sb2NhbGl6YXRpb24KICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihfbG9jYWxpemF0aW9uKSB7CiAgICAgICAgICAgIHRoaXMuX2xvY2FsaXphdGlvbiA9IF9sb2NhbGl6YXRpb247CiAgICAgICAgICAgIHRoaXMuX2Nhc2VWaWV3cyA9IHt9OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgbmdQbHVyYWwodmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5fc3dpdGNoVmFsdWUgPSB2YWx1ZTsKICAgICAgICAgICAgdGhpcy5fdXBkYXRlVmlldygpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHBhcmFtIHs/fSBzd2l0Y2hWaWV3CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBhZGRDYXNlKHZhbHVlLCBzd2l0Y2hWaWV3KSB7CiAgICAgICAgICAgIHRoaXMuX2Nhc2VWaWV3c1t2YWx1ZV0gPSBzd2l0Y2hWaWV3OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3VwZGF0ZVZpZXcoKSB7CiAgICAgICAgICAgIHRoaXMuX2NsZWFyVmlld3MoKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjYXNlcyA9IE9iamVjdC5rZXlzKHRoaXMuX2Nhc2VWaWV3cyk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qga2V5ID0gZ2V0UGx1cmFsQ2F0ZWdvcnkodGhpcy5fc3dpdGNoVmFsdWUsIGNhc2VzLCB0aGlzLl9sb2NhbGl6YXRpb24pOwogICAgICAgICAgICB0aGlzLl9hY3RpdmF0ZVZpZXcodGhpcy5fY2FzZVZpZXdzW2tleV0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2NsZWFyVmlld3MoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9hY3RpdmVWaWV3KQogICAgICAgICAgICAgICAgdGhpcy5fYWN0aXZlVmlldy5kZXN0cm95KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSB2aWV3CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfYWN0aXZhdGVWaWV3KHZpZXcpIHsKICAgICAgICAgICAgaWYgKHZpZXcpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2FjdGl2ZVZpZXcgPSB2aWV3OwogICAgICAgICAgICAgICAgdGhpcy5fYWN0aXZlVmlldy5jcmVhdGUoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIE5nUGx1cmFsLsm1ZmFjID0gZnVuY3Rpb24gTmdQbHVyYWxfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgTmdQbHVyYWwpKMm1ybVkaXJlY3RpdmVJbmplY3QoTmdMb2NhbGl6YXRpb24pKTsgfTsKICAgIE5nUGx1cmFsLsm1ZGlyID0gybXJtWRlZmluZURpcmVjdGl2ZSh7IHR5cGU6IE5nUGx1cmFsLCBzZWxlY3RvcnM6IFtbIiIsICJuZ1BsdXJhbCIsICIiXV0sIGlucHV0czogeyBuZ1BsdXJhbD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vbiBpcyBudWxsLCB0aGUgY29ycmVzcG9uZGluZyBzdHlsZSBpcyByZW1vdmVkLgogICAgICoKICAgICAqIFxAcHVibGljQXBpCiAgICAgKi8KICAgIGNsYXNzIE5nU3R5bGUgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gX25nRWwKICAgICAgICAgKiBAcGFyYW0gez99IF9kaWZmZXJzCiAgICAgICAgICogQHBhcmFtIHs/fSBfcmVuZGVyZXIKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihfbmdFbCwgX2RpZmZlcnMsIF9yZW5kZXJlcikgewogICAgICAgICAgICB0aGlzLl9uZ0VsID0gX25nRWw7CiAgICAgICAgICAgIHRoaXMuX2RpZmZlcnMgPSBfZGlmZmVyczsKICAgICAgICAgICAgdGhpcy5fcmVuZGVyZXIgPSBfcmVuZGVyZXI7CiAgICAgICAgICAgIHRoaXMuX25nU3R5bGUgPSBudWxsOwogICAgICAgICAgICB0aGlzLl9kaWZmZXIgPSBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlcwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IG5nU3R5bGUodmFsdWVzKSB7CiAgICAgICAgICAgIHRoaXMuX25nU3R5bGUgPSB2YWx1ZXM7CiAgICAgICAgICAgIGlmICghdGhpcy5fZGlmZmVyICYmIHZhbHVlcykgewogICAgICAgICAgICAgICAgdGhpcy5fZGlmZmVyID0gdGhpcy5fZGlmZmVycy5maW5kKHZhbHVlcykuY3JlYXRlKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ0RvQ2hlY2soKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9kaWZmZXIpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGNoYW5nZXMgPSB0aGlzLl9kaWZmZXIuZGlmZigoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5fbmdTdHlsZSkpKTsKICAgICAgICAgICAgICAgIGlmIChjaGFuZ2VzKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fYXBwbHlDaGFuZ2VzKGNoYW5nZXMpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBuYW1lQW5kVW5pdAogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9zZXRTdHlsZShuYW1lQW5kVW5pdCwgdmFsdWUpIHsKICAgICAgICAgICAgY29uc3QgW25hbWUsIHVuaXRdID0gbmFtZUFuZFVuaXQuc3BsaXQoJy4nKTsKICAgICAgICAgICAgdmFsdWUgPSB2YWx1ZSAhPSBudWxsICYmIHVuaXQgPyBgJHt2YWx1ZX0ke3VuaXR9YCA6IHZhbHVlOwogICAgICAgICAgICBpZiAodmFsdWUgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5fcmVuZGVyZXIuc2V0U3R5bGUodGhpcy5fbmdFbC5uYXRpdmVFbGVtZW50LCBuYW1lLCAoLyoqIEB0eXBlIHs/fSAqLyAodmFsdWUpKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLl9yZW5kZXJlci5yZW1vdmVTdHlsZSh0aGlzLl9uZ0VsLm5hdGl2ZUVsZW1lbnQsIG5hbWUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBjaGFuZ2VzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfYXBwbHlDaGFuZ2VzKGNoYW5nZXMpIHsKICAgICAgICAgICAgY2hhbmdlcy5mb3JFYWNoUmVtb3ZlZEl0ZW0oKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHJlY29yZAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHJlY29yZCkgPT4gdGhpcy5fc2V0U3R5bGUocmVjb3JkLmtleSwgbnVsbCkpKTsKICAgICAgICAgICAgY2hhbmdlcy5mb3JFYWNoQWRkZWRJdGVtKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSByZWNvcmQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChyZWNvcmQpID0+IHRoaXMuX3NldFN0eWxlKHJlY29yZC5rZXksIHJlY29yZC5jdXJyZW50VmFsdWUpKSk7CiAgICAgICAgICAgIGNoYW5nZXMuZm9yRWFjaENoYW5nZWRJdGVtKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSByZWNvcmQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChyZWNvcmQpID0+IHRoaXMuX3NldFN0eWxlKHJlY29yZC5rZXksIHJlY29yZC5jdXJyZW50VmFsdWUpKSk7CiAgICAgICAgfQogICAgfQogICAgTmdTdHlsZS7JtWZhYyA9IGZ1bmN0aW9uIE5nU3R5bGVfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgTmdTdHlsZSkoybXJtWRpcmVjdGl2ZUluamVjdChFbGVtZW50UmVmKSwgybXJtWRpcmVjdGl2ZUluamVjdChLZXlWYWx1ZURpZmZlcnMpLCDJtcm1ZGlyZWN0aXZlSW5qZWN0KFJlbmRlcmVyMikpOyB9OwogICAgTmdTdHlsZS7JtWRpciA9IMm1ybVkZWZpbmVEaXJlY3RpdmUoeyB0eXBlOiBOZ1N0eWxlLCBz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29udGFpbmVyUmVmOwogICAgICAgICAgICAgICAgaWYgKHRoaXMuX3ZpZXdSZWYpIHsKICAgICAgICAgICAgICAgICAgICB2aWV3Q29udGFpbmVyUmVmLnJlbW92ZSh2aWV3Q29udGFpbmVyUmVmLmluZGV4T2YodGhpcy5fdmlld1JlZikpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdGhpcy5fdmlld1JlZiA9IHRoaXMubmdUZW1wbGF0ZU91dGxldCA/CiAgICAgICAgICAgICAgICAgICAgdmlld0NvbnRhaW5lclJlZi5jcmVhdGVFbWJlZGRlZFZpZXcodGhpcy5uZ1RlbXBsYXRlT3V0bGV0LCB0aGlzLm5nVGVtcGxhdGVPdXRsZXRDb250ZXh0KSA6CiAgICAgICAgICAgICAgICAgICAgbnVsbDsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmICh0aGlzLl92aWV3UmVmICYmIHRoaXMubmdUZW1wbGF0ZU91dGxldENvbnRleHQpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3VwZGF0ZUV4aXN0aW5nQ29udGV4dCh0aGlzLm5nVGVtcGxhdGVPdXRsZXRDb250ZXh0KTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBXZSBuZWVkIHRvIHJlLWNyZWF0ZSBleGlzdGluZyBlbWJlZGRlZCB2aWV3IGlmOgogICAgICAgICAqIC0gdGVtcGxhdGVSZWYgaGFzIGNoYW5nZWQKICAgICAgICAgKiAtIGNvbnRleHQgaGFzIGNoYW5nZXMKICAgICAgICAgKgogICAgICAgICAqIFdlIG1hcmsgY29udGV4dCBvYmplY3QgYXMgY2hhbmdlZCB3aGVuIHRoZSBjb3JyZXNwb25kaW5nIG9iamVjdAogICAgICAgICAqIHNoYXBlIGNoYW5nZXMgKG5ldyBwcm9wZXJ0aWVzIGFyZSBhZGRlZCBvciBleGlzdGluZyBwcm9wZXJ0aWVzIGFyZSByZW1vdmVkKS4KICAgICAgICAgKiBJbiBvdGhlciB3b3JkcyB3ZSBjb25zaWRlciBjb250ZXh0IHdpdGggdGhlIHNhbWUgcHJvcGVydGllcyBhcyAidGhlIHNhbWUiIGV2ZW4KICAgICAgICAgKiBpZiBvYmplY3QgcmVmZXJlbmNlIGNoYW5nZXMgKHNlZSBodHRwczovL2dpdGh1Yi5jb20vYW5ndWxhci9hbmd1bGFyL2lzc3Vlcy8xMzQwNykuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGNoYW5nZXMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9zaG91bGRSZWNyZWF0ZVZpZXcoY2hhbmdlcykgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGN0eENoYW5nZSA9IGNoYW5nZXNbJ25nVGVtcGxhdGVPdXRsZXRDb250ZXh0J107CiAgICAgICAgICAgIHJldHVybiAhIWNoYW5nZXNbJ25nVGVtcGxhdGVPdXRsZXQnXSB8fCAoY3R4Q2hhbmdlICYmIHRoaXMuX2hhc0NvbnRleHRTaGFwZUNoYW5nZWQoY3R4Q2hhbmdlKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBjdHhDaGFuZ2UKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9oYXNDb250ZXh0U2hhcGVDaGFuZ2VkKGN0eENoYW5nZSkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHByZXZDdHhLZXlzID0gT2JqZWN0LmtleXMoY3R4Q2hhbmdlLnByZXZpb3VzVmFsdWUgfHwge30pOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGN1cnJDdHhLZXlzID0gT2JqZWN0LmtleXMoY3R4Q2hhbmdlLmN1cnJlbnRWYWx1ZSB8fCB7fSk7CiAgICAgICAgICAgIGlmIChwcmV2Q3R4S2V5cy5sZW5ndGggPT09IGN1cnJDdHhLZXlzLmxlbmd0aCkgewogICAgICAgICAgICAgICAgZm9yIChsZXQgcHJvcE5hbWUgb2YgY3VyckN0eEtleXMpIHsKICAgICAgICAgICAgICAgICAgICBpZiAocHJldkN0eEtleXMuaW5kZXhPZihwcm9wTmFtZSkgPT09IC0xKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGN0eAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3VwZGF0ZUV4aXN0aW5nQ29udGV4dChjdHgpIHsKICAgICAgICAgICAgZm9yIChsZXQgcHJvcE5hbWUgb2YgT2JqZWN0LmtleXMoY3R4KSkgewogICAgICAgICAgICAgICAgKCgvKiogQHR5cGUgez99ICovICgoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5fdmlld1JlZikpLmNvbnRleHQpKSlbcHJvcE5hbWVdID0gKCgvKiogQHR5cGUgez99ICovICh0aGlzLm5nVGVtcGxhdGVPdXRsZXRDb250ZXh0KSkpW3Byb3BOYW1lXTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIE5nVGVtcGxhdGVPdXRsZXQuybVmYWMgPSBmdW5jdGlvbiBOZ1RlbXBsYXRlT3V0bGV0X0ZhY3RvcnkodCkgeyByZXR1cm4gbmV3ICh0IHx8IE5nVGVtcGxhdGVPdXRsZXQpKMm1ybVkaXJlY3RpdmVJbmplY3QoVmlld0NvbnRhaW5lclJlZikpOyB9OwogICAgTmdUZ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JhbSB7P30gdmFsdWUKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGludmFsaWRQaXBlQXJndW1lbnRFcnJvcih0eXBlLCB2YWx1ZSkgewogICAgICAgIHJldHVybiBFcnJvcihgSW52YWxpZFBpcGVBcmd1bWVudDogJyR7dmFsdWV9JyBmb3IgcGlwZSAnJHtzdHJpbmdpZnkodHlwZSl9J2ApOwogICAgfQogICAgY2xhc3MgT2JzZXJ2YWJsZVN0cmF0ZWd5IHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGFzeW5jCiAgICAgICAgICogQHBhcmFtIHs/fSB1cGRhdGVMYXRlc3RWYWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgY3JlYXRlU3Vic2NyaXB0aW9uKGFzeW5jLCB1cGRhdGVMYXRlc3RWYWx1ZSkgewogICAgICAgICAgICByZXR1cm4gYXN5bmMuc3Vic2NyaWJlKHsKICAgICAgICAgICAgICAgIG5leHQ6IHVwZGF0ZUxhdGVzdFZhbHVlLAogICAgICAgICAgICAgICAgZXJyb3I6ICgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZQogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKGUpID0+IHsKICAgICAgICAgICAgICAgICAgICB0aHJvdyBlOwogICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gc3Vic2NyaXB0aW9uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkaXNwb3NlKHN1YnNjcmlwdGlvbikgewogICAgICAgICAgICBzdWJzY3JpcHRpb24udW5zdWJzY3JpYmUoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBzdWJzY3JpcHRpb24KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uRGVzdHJveShzdWJzY3JpcHRpb24pIHsKICAgICAgICAgICAgc3Vic2NyaXB0aW9uLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgfQogICAgfQogICAgY2xhc3MgUHJvbWlzZVN0cmF0ZWd5IHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGFzeW5jCiAgICAgICAgICogQHBhcmFtIHs/fSB1cGRhdGVMYXRlc3RWYWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgY3JlYXRlU3Vic2NyaXB0aW9uKGFzeW5jLCB1cGRhdGVMYXRlc3RWYWx1ZSkgewogICAgICAgICAgICByZXR1cm4gYXN5bmMudGhlbih1cGRhdGVMYXRlc3RWYWx1ZSwgKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGUKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGUgPT4gewogICAgICAgICAgICAgICAgdGhyb3cgZTsKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHN1YnNjcmlwdGlvbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZGlzcG9zZShzdWJzY3JpcHRpb24pIHsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gc3Vic2NyaXB0aW9uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvbkRlc3Ryb3koc3Vic2NyaXB0aW9uKSB7IH0KICAgIH0KICAgIC8qKiBAdHlwZSB7P30gKi8KICAgIGNvbnN0IF9wcm9taXNlU3RyYXRlZ3kgPSBuZXcgUHJvbWlzZVN0cmF0ZWd5KCk7CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBfb2JzZXJ2YWJsZVN0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bXBsZSBiZWxvdyBiaW5kcyB0aGUgYHRpbWVgIE9ic2VydmFibGUKICAgICAqIHRvIHRoZSB2aWV3LiBUaGUgT2JzZXJ2YWJsZSBjb250aW51b3VzbHkgdXBkYXRlcyB0aGUgdmlldyB3aXRoIHRoZSBjdXJyZW50IHRpbWUuCiAgICAgKgogICAgICoge1xAZXhhbXBsZSBjb21tb24vcGlwZXMvdHMvYXN5bmNfcGlwZS50cyByZWdpb249J0FzeW5jUGlwZU9ic2VydmFibGUnfQogICAgICoKICAgICAqIFxAcHVibGljQXBpCiAgICAgKi8KICAgIGNsYXNzIEFzeW5jUGlwZSB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBfcmVmCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoX3JlZikgewogICAgICAgICAgICB0aGlzLl9yZWYgPSBfcmVmOwogICAgICAgICAgICB0aGlzLl9sYXRlc3RWYWx1ZSA9IG51bGw7CiAgICAgICAgICAgIHRoaXMuX2xhdGVzdFJldHVybmVkVmFsdWUgPSBudWxsOwogICAgICAgICAgICB0aGlzLl9zdWJzY3JpcHRpb24gPSBudWxsOwogICAgICAgICAgICB0aGlzLl9vYmogPSBudWxsOwogICAgICAgICAgICB0aGlzLl9zdHJhdGVneSA9ICgvKiogQHR5cGUgez99ICovIChudWxsKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkRlc3Ryb3koKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9zdWJzY3JpcHRpb24pIHsKICAgICAgICAgICAgICAgIHRoaXMuX2Rpc3Bvc2UoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IG9iagogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdHJhbnNmb3JtKG9iaikgewogICAgICAgICAgICBpZiAoIXRoaXMuX29iaikgewogICAgICAgICAgICAgICAgaWYgKG9iaikgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX3N1YnNjcmliZShvYmopOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdGhpcy5fbGF0ZXN0UmV0dXJuZWRWYWx1ZSA9IHRoaXMuX2xhdGVzdFZhbHVlOwogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2xhdGVzdFZhbHVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChvYmogIT09IHRoaXMuX29iaikgewogICAgICAgICAgICAgICAgdGhpcy5fZGlzcG9zZSgpOwogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMudHJhbnNmb3JtKCgvKiogQHR5cGUgez99ICovIChvYmopKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGxvb3NlSWRlbnRpY2FsKHRoaXMuX2xhdGVzdFZhbHVlLCB0aGlzLl9sYXRlc3RSZXR1cm5lZFZhbHVlKSkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2xhdGVzdFJldHVybmVkVmFsdWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fbGF0ZXN0UmV0dXJuZWRWYWx1ZSA9IHRoaXMuX2xhdGVzdFZhbHVlOwogICAgICAgICAgICByZXR1cm4gV3JhcHBlZFZhbHVlLndyYXAodGhpcy5fbGF0ZXN0VmFsdWUpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gb2JqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfc3Vic2NyaWJlKG9iaikgewogICAgICAgICAgICB0aGlzLl9vYmogPSBvYmo7CiAgICAgICAgICAgIHRoaXMuX3N0cmF0ZWd5ID0gdGhpcy5fc2VsZWN0U3RyYXRlZ3kob2JqKTsKICAgICAgICAgICAgdGhpcy5fc3Vic2NyaXB0aW9uID0gdGhpcy5fc3RyYXRlZ3kuY3JlYXRlU3Vic2NyaXB0aW9uKG9iaiwgKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAodmFsdWUpID0+IHRoaXMuX3VwZGF0ZUxhdGVzdFZhbHVlKG9iaiwgdmFsdWUpKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBvYmoKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9zZWxlY3RTdHJhdGVneShvYmopIHsKICAgICAgICAgICAgaWYgKGlzUHJvbWlzZSQxKG9iaikpIHsKICAgICAgICAgICAgICAgIHJldHVybiBfcHJvbWlzZVN0cmF0ZWd5OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChpc09ic2VydmFibGUkMShvYmopKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gX29ic2VydmFibGVTdHJhdGVneTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aHJvdyBpbnZhbGlkUGlwZUFyZ3VtZW50RXJyb3IoQXN5bmNQaXBlLCBvYmopOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2Rpc3Bvc2UoKSB7CiAgICAgICAgICAgIHRoaXMuX3N0cmF0ZWd5LmRpc3Bvc2UoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX3N1YnNjcmlwdGlvbikpKTsKICAgICAgICAgICAgdGhpcy5fbGF0ZXN0VmFsdWUgPSBudWxsOwogICAgICAgICAgICB0aGlzLl9sYXRlc3RSZXR1cm5lZFZhbHVlID0gbnVsbDsKICAgICAgICAgICAgdGhpcy5fc3Vic2NyaXB0aW9uID0gbnVsbDsKICAgICAgICAgICAg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URGQzNcdURGQzgtXHVERkNGXXxcdUQ4MDFbXHVEQzAwLVx1REM5RFx1RENCMC1cdURDRDNcdURDRDgtXHVEQ0ZCXHVERDAwLVx1REQyN1x1REQzMC1cdURENjNcdURFMDAtXHVERjM2XHVERjQwLVx1REY1NVx1REY2MC1cdURGNjddfFx1RDgwMltcdURDMDAtXHVEQzA1XHVEQzA4XHVEQzBBLVx1REMzNVx1REMzN1x1REMzOFx1REMzQ1x1REMzRi1cdURDNTVcdURDNjAtXHVEQzc2XHVEQzgwLVx1REM5RVx1RENFMC1cdURDRjJcdURDRjRcdURDRjVcdUREMDAtXHVERDE1XHVERDIwLVx1REQzOVx1REQ4MC1cdUREQjdcdUREQkVcdUREQkZcdURFMDBcdURFMTAtXHVERTEzXHVERTE1LVx1REUxN1x1REUxOS1cdURFMzNcdURFNjAtXHVERTdDXHVERTgwLVx1REU5Q1x1REVDMC1cdURFQzdcdURFQzktXHVERUU0XHVERjAwLVx1REYzNVx1REY0MC1cdURGNTVcdURGNjAtXHVERjcyXHVERjgwLVx1REY5MV18XHVEODAzW1x1REMwMC1cdURDNDhcdURDODAtXHVEQ0IyXHVEQ0MwLVx1RENGMl18XHVEODA0W1x1REMwMy1cdURDMzdcdURDODMtXHVEQ0FGXHVEQ0QwLVx1RENFOFx1REQwMy1cdUREMjZcdURENTAtXHVERDcyXHVERDc2XHVERDgzLVx1RERCMlx1RERDMS1cdUREQzRcdUREREFcdURERENcdURFMDAtXHVERTExXHVERTEzLVx1REUyQlx1REU4MC1cdURFODZcdURFODhcdURFOEEtXHVERThEXHVERThGLVx1REU5RFx1REU5Ri1cdURFQThcdURFQjAtXHVERURFXHVERjA1LVx1REYwQ1x1REYwRlx1REYxMFx1REYxMy1cdURGMjhcdURGMkEtXHVERjMwXHVERjMyXHVERjMzXHVERjM1LVx1REYzOVx1REYzRFx1REY1MFx1REY1RC1cdURGNjFdfFx1RDgwNVtcdURDMDAtXHVEQzM0XHVEQzQ3LVx1REM0QVx1REM4MC1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1x1RENBRS1cdURDQjlcdURDQkJcdURDQkQtXHVEQ0MzXHVEQ0M1LVx1REQwNVx1REQwNy1cdUREMEFcdUREMEQtXHVERDE0XHVERDE2LVx1REQxQ1x1REQxRS1cdUREMzlcdUREM0ItXHVERDNFXHVERDQwLVx1REQ0NFx1REQ0Nlx1REQ0QS1cdURENTBcdURENTItXHVERUE1XHVERUE4LVx1REVDMFx1REVDMi1cdURFREFcdURFREMtXHVERUZBXHVERUZDLVx1REYxNFx1REYxNi1cdURGMzRcdURGMzYtXHVERjRFXHVERjUwLVx1REY2RVx1REY3MC1cdURGODhcdURGOEEtXHVERkE4XHVERkFBLVx1REZDMlx1REZDNC1cdURGQ0JdfFx1RDgzQVtcdURDMDAtXHVEQ0M0XHVERDAwLVx1REQ0M118XHVEODNCW1x1REUwMC1cdURFMDNcdURFMDUtXHVERTFGXHVERTIxXHVERTIyXHVERTI0XHVERTI3XHVERTI5LVx1REUzMlx1REUzNC1cdURFMzdcdURFMzlcdURFM0JcdURFNDJcdURFNDdcdURFNDlcdURFNEJcdURFNEQtXHVERTRGXHVERTUxXHVERTUyXHVERTU0XHVERTU3XHVERTU5XHVERTVCXHVERTVEXHVERTVGXHVERTYxXHVERTYyXHVERTY0XHVERTY3LVx1REU2QVx1REU2Qy1cdURFNzJcdURFNzQtXHVERTc3XHVERTc5LVx1REU3Q1x1REU3RVx1REU4MC1cdURFODlcdURFOEItXHVERTlCXHVERUExLVx1REVBM1x1REVBNS1cdURFQTlcdURFQUItXHVERUJCXXxcdUQ4NjlbXHVEQzAwLVx1REVENlx1REYwMC1cdURGRkZdfFx1RDg2RFtcdURDMDAtXHVERjM0XHVERjQwLVx1REZGRl18XHVEODZFW1x1REMwMC1cdURDMURcdURDMjAtXHVERkZGXXxcdUQ4NzNbXHVEQzAwLVx1REVBMVx1REVCMC1cdURGRkZdfFx1RDg3QVtcdURDMDAtXHVERkUwXXxcdUQ4N0VbXHVEQzAwLVx1REUxRF0pXFMqL2c7CiAgICAvK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ICAgICAgICAgIHwgQUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiAgICAgKiAgfCAgICAgICAgICAgICAgICAgICAgfCBHR0dHICAgICAgICB8IFdpZGUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCBBbm5vIERvbWluaSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKICAgICAqICB8ICAgICAgICAgICAgICAgICAgICB8IEdHR0dHICAgICAgIHwgTmFycm93ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IEEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogICAgICogIHwgWWVhciAgICAgICAgICAgICAgIHwgeSAgICAgICAgICAgfCBOdW1lcmljOiBtaW5pbXVtIGRpZ2l0cyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgMiwgMjAsIDIwMSwgMjAxNywgMjAxNzMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiAgICAgKiAgfCAgICAgICAgICAgICAgICAgICAgfCB5eSAgICAgICAgICB8IE51bWVyaWM6IDIgZGlnaXRzICsgemVybyBwYWRkZWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAwMiwgMjAsIDAxLCAxNywgNzMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKICAgICAqICB8ICAgICAgICAgICAgICAgICAgICB8IHl5eSAgICAgICAgIHwgTnVtZXJpYzogMyBkaWdpdHMgKyB6ZXJvIHBhZGRlZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IDAwMiwgMDIwLCAyMDEsIDIwMTcsIDIwMTczICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogICAgICogIHwgICAgICAgICAgICAgICAgICAgIHwgeXl5eSAgICAgICAgfCBOdW1lcmljOiA0IGRpZ2l0cyBvciBtb3JlICsgemVybyBwYWRkZWQgICAgICAgICAgICAgICAgICAgICAgIHwgMDAwMiwgMDAyMCwgMDIwMSwgMjAxNywgMjAxNzMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiAgICAgKiAgfCBNb250aCAgICAgICAgICAgICAgfCBNICAgICAgICAgICB8IE51bWVyaWM6IDEgZGlnaXQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCA5LCAxMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKICAgICAqICB8ICAgICAgICAgICAgICAgICAgICB8IE1NICAgICAgICAgIHwgTnVtZXJpYzogMiBkaWdpdHMgKyB6ZXJvIHBhZGRlZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IDA5LCAxMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogICAgICogIHwgICAgICAgICAgICAgICAgICAgIHwgTU1NICAgICAgICAgfCBBYmJyZXZpYXRlZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgU2VwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiAgICAgKiAgfCAgICAgICAgICAgICAgICAgICAgfCBNTU1NICAgICAgICB8IFdpZGUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCBTZXB0ZW1iZXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKICAgICAqICB8ICAgICAgICAgICAgICAgICAgICB8IE1NTU1NICAgICAgIHwgTmFycm93ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IFMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogICAgICogIHwgTW9udGggc3RhbmRhbG9uZSAgIHwgTCAgICAgICAgICAgfCBOdW1lcmljOiAxIGRpZ2l0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgOSwgMTIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiAgICAgKiAgfCAgICAgICAgICAgICAgICAgICAgfCBMTCAgICAgICAgICB8IE51bWVyaWM6IDIgZGlnaXRzICsgemVybyBwYWRkZWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAwOSwgMTIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKICAgICAqICB8ICAgICAgICAgICAgICAgICAgICB8IExMTCAgICAgICAgIHwgQWJicmV2aWF0ZWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IFNlcCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogICAgICogIHwgICAgICAgICAgICAgICAgICAgIHwgTExMTCAgICAgICAgfCBXaWRlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgU2VwdGVtYmVyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiAgICAgKiAgfCAgICAgICAgICAgICAgICAgICAgfCBMTExMTCAgICAgICB8IE5hcnJvdyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCBTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKICAgICAqICB8IFdlZWsgb2YgeWVhciAgICAgICB8IHcgICAgICAgICAgIHwgTnVtZXJpYzogbWluaW11bSBkaWdpdHMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IDEuLi4gNTMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogICAgICogIHwgICAgICAgICAgICAgICAgICAgIHwgd3cgICAgICAgICAgfCBOdW1lcmljOiAyIGRpZ2l0cyArIHplcm8gcGFkZGVkICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgMDEuLi4gNTMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiAgICAgKiAgfCBXZWVrIG9mIG1vbnRoICAgICAgfCBXICAgICAgICAgICB8IE51bWVyaWM6IDEgZGlnaXQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAxLi4uIDUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKICAgICAqICB8IERheSBvZiBtb250aCAgICAgICB8IGQgICAgICAgICAgIHwgTnVtZXJpYzogbWluaW11bSBkaWdpdHMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogICAgICogIHwgICAgICAgICAgICAgICAgICAgIHwgZGQgICAgICAgICAgfCBOdW1lcmljOiAyIGRpZ2l0cyArIHplcm8gcGFkZGVkICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgMDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogICAgICogIHwgV2VlayBkYXkgICAgICAgICAgIHwgRSwgRUUgJiBFRUUgfCBBYmJyZXZpYXRlZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgVHVlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiAgICAgKiAgfCAgICAgICAgICAgICAgICAgICAgfCBFRUVFICAgICAgICB8IFdpZGUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCBUdWVzZGF5ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKICAgICAqICB8ICAgICAgICAgICAgICAgICAgICB8IEVFRUVFICAgICAgIHwgTmFycm93ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IFQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogICAgICogIHwgICAgICAgICAgICAgICAgICAgIHwgRUVFRUVFICAgICAgfCBTaG9ydCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgVHUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiAgICAgKiAgfCBQZXJpb2QgICAgICAgICAgICAgfCBhLCBhYSAmIGFhYSB8IEFiYnJldmlhdGVkICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCBhbS9wbSBvciBBTS9QTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKICAgICAqICB8ICAgICAgICAgICAgICAgICAgICB8IGFhYWEgICAgICAgIHwgV2lkZSAoZmFsbGJhY2sgdG8gYGFgIHdoZW4gbWlzc2luZykgICAgICAgICAgICAgICAgICAgICAgICAgICB8IGFudGUgbWVyaWRpZW0vcG9zdCBtZXJpZGllbSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogICAgICogIHwgICAgICAgICAgICAgICAgICAgIHwgYWFhYWEgICAgICAgfCBOYXJyb3cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgYS9wICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiAgICAgKiAgfCBQZXJpb2QqICAgICAgICAgICAgfCBCLCBCQiAmIEJCQiB8IEFiYnJldmlhdGVkICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCBtaWQuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKICAgICAqICB8ICAgICAgICAgICAgICAgICAgICB8IEJCQkIgICAgICAgIHwgV2lkZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IGFtLCBwbSwgbWlkbmlnaHQsIG5vb24sIG1vcm5pbmcsIGFmdGVybm9vbiwgZXZlbmluZywgbmlnaHQgfAogICAgICogIHwgICAgICAgICAgICAgICAgICAgIHwgQkJCQkIgICAgICAgfCBOYXJyb3cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgbWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiAgICAgKiAgfCBQZXJpb2Qgc3RhbmRhbG9uZSogfCBiLCBiYiAmIGJiYiB8IEFiYnJldmlhdGVkICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCBtaWQuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKICAgICAqICB8ICAgICAgICAgICAgICAgICAgICB8IGJiYmIgICAgICAgIHwgV2lkZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IGFtLCBwbSwgbWlkbmlnaHQsIG5vb24sIG1vcm5pbmcsIGFmdGVybm9vbiwgZXZlbmluZywgbmlnaHQgfAogICAgICogIHwgICAgICAgICAgICAgICAgICAgIHwgYmJiYmIgICAgICAgfCBOYXJyb3cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgbWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiAgICAgKiAgfCBIb3VyIDEtMTIgICAgICAgICAgfCBoICAgICAgICAgICB8IE51bWVyaWM6IG1pbmltdW0gZGlnaXRzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAxLCAxMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKICAgICAqICB8ICAgICAgICAgICAgICAgICAgICB8IGhoICAgICAgICAgIHwgTnVtZXJpYzogMiBkaWdpdHMgKyB6ZXJvIHBhZGRlZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IDAxLCAxMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogICAgICogIHwgSG91ciAwLTIzICAgICAgICAgIHwgSCAgICAgICAgICAgfCBOdW1lcmljOiBtaW5pbXVtIGRpZ2l0cyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgMCwgMjMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiAgICAgKiAgfCAgICAgICAgICAgICAgICAgICAgfCBISCAgICAgICAgICB8IE51bWVyaWM6IDIgZGlnaXRzICsgemVybyBwYWRkZWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAwMCwgMjMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKICAgICAqICB8IE1pbnV0ZSAgICAgICAgICAgICB8IG0gICAgICAgICAgIHwgTnVtZXJpYzogbWluaW11bSBkaWdpdHMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IDgsIDU5ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogICAgICogIHwgICAgICAgICAgICAgICAgICAgIHwgbW0gICAgICAgICAgfCBOdW1lcmljOiAyIGRpZ2l0cyArIHplcm8gcGFkZGVkICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgMDgsIDU5ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiAgICAgKiAgfCBTZWNvbmQgICAgICAgICAgICAgfCBzICAgICAgICAgICB8IE51bWVyaWM6IG1pbmltdW0gZGlnaXRzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAwLi4uIDU5ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKICAgICAqICB8ICAgICAgICAgICAgICAgICAgICB8IHNzICAgICAgICAgIHwgTnVtZXJpYzogMiBkaWdpdHMgKyB6ZXJvIHBhZGRlZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IDAwLi4uIDU5ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogICAgICogIHwgRnJhY3Rpb25hbCBzZWNvbmRzIHwgUyAgICAgICAgICAgfCBOdW1lcmljOiAxIGRpZ2l0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgMC4uLiA5ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiAgICAgKiAgfCAgICAgICAgICAgICAgICAgICAgfCBTUyAgICAgICAgICB8IE51bWVyaWM6IDIgZGlnaXRzICsgemVybyBwYWRkZWQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAwMC4uLiA5OSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKICAgICAqICB8ICAgICAgICAgICAgICAgICAgICB8IFNTUyAgICAgICAgIHwgTnVtZXJpYzogMyBkaWdpdHMgKyB6ZXJvIHBhZGRlZCAoPSBtaWxsaXNlY29uZHMpICAgICAgICAgICAgICB8IDAwMC4uLiA5OTkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogICAgICogIHwgWm9uZSAgICAgICAgICAgICAgIHwgeiwgenogJiB6enogfCBTaG9ydCBzcGVjaWZpYyBub24gbG9jYXRpb24gZm9ybWF0IChmYWxsYmFjayB0byBPKSAgICAgICAgICAgIHwgR01ULTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiAgICAgKiAgfCAgICAgICAgICAgICAgICAgICAgfCB6enp6ICAgICAgICB8IExvbmcgc3BlY2lmaWMgbm9uIGxvY2F0aW9uIGZvcm1hdCAoZmFsbGJhY2sgdG8gT09PTykgICAgICAgICAgfCBHTVQtMDg6MDAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKICAgICAqICB8ICAgICAgICAgICAgICAgICAgICB8IFosIFpaICYgWlpaIHwgSVNPODYwMSBiYXNpYyBmb3JtYXQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IC0wODAwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogICAgICogIHwgICAgICAgICAgICAgICAgICAgIHwgWlpaWiAgICAgICAgfCBMb25nIGxvY2FsaXplZCBHTVQgZm9ybWF0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgR01ULTg6MDAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiAgICAgKiAgfCAgICAgICAgICAgICAgICAgICAgfCBaWlpaWiAgICAgICB8IElTTzg2MDEgZXh0ZW5kZWQgZm9ybWF0ICsgWiBpbmRpY2F0b3IgZm9yIG9mZnNldCAwICg9IFhYWFhYKSAgfCAtMDg6MDAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKICAgICAqICB8ICAgICAgICAgICAgICAgICAgICB8IE8sIE9PICYgT09PIHwgU2hvcnQgbG9jYWxpemVkIEdNVCBmb3JtYXQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IEdNVC04ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogICAgICogIHwgICAgICAgICAgICAgICAgICAgIHwgT09PTyAgICAgICAgfCBMb25nIGxvY2FsaXplZCBHTVQgZm9ybWF0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgR01ULTA4OjAwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiAgICAgKgogICAgICogTm90ZSB0aGF0IHRpbWV6b25lIGNvcnJlY3Rpb24gaXMgbm90IGFwcGxpZWQgdG8gYW4gSVNPIHN0cmluZyB0aGF0IGhhcyBubyB0aW1lIGNvbXBvbmVudCwgc3VjaCBhcyAiMjAxNi0wOS0xOSIKICAgICAqCiAgICAgKiAjIyMgRm9ybWF0IGV4YW1wbGVzCiAgICAgKgogICAgICogVGhlc2UgZXhhbXBsZXMgdHJhbnNmb3JtIGEgZGF0ZSBpbnRvIHZhcmlvdXMgZm9ybWF0cywKICAgICAqIGFzc3VtaW5nIHRoYXQgYGRhdGVPYmpgIGlzIGEgSmF2YVNjcmlwdCBgRGF0ZWAgb2JqZWN0IGZvcgogICAgICogeWVhcjogMjAxNSwgbW9udGg6IDYsIGRheTogMTUsIGhvdXI6IDIxLCBtaW51dGU6IDQzLCBzZWNvbmQ6IDExLAogICAgICogZ2l2ZW4gaW4gdGhlIGxvY2FsIHRpbWUgZm9yIHRoZSBgZW4tVVNgIGxvY2FsZS4KICAgICAqCiAgICAg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ICoKICAgICAqIFxAcHVibGljQXBpCiAgICAgKi8KICAgIGNsYXNzIEkxOG5QbHVyYWxQaXBlIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IF9sb2NhbGl6YXRpb24KICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihfbG9jYWxpemF0aW9uKSB7CiAgICAgICAgICAgIHRoaXMuX2xvY2FsaXphdGlvbiA9IF9sb2NhbGl6YXRpb247CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUgdGhlIG51bWJlciB0byBiZSBmb3JtYXR0ZWQKICAgICAgICAgKiBAcGFyYW0gez99IHBsdXJhbE1hcCBhbiBvYmplY3QgdGhhdCBtaW1pY3MgdGhlIElDVSBmb3JtYXQsIHNlZQogICAgICAgICAqIGh0dHA6Ly91c2VyZ3VpZGUuaWN1LXByb2plY3Qub3JnL2Zvcm1hdHBhcnNlL21lc3NhZ2VzLgogICAgICAgICAqIEBwYXJhbSB7Pz19IGxvY2FsZSBhIGBzdHJpbmdgIGRlZmluaW5nIHRoZSBsb2NhbGUgdG8gdXNlICh1c2VzIHRoZSBjdXJyZW50IHtcQGxpbmsgTE9DQUxFX0lEfSBieQogICAgICAgICAqIGRlZmF1bHQpLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdHJhbnNmb3JtKHZhbHVlLCBwbHVyYWxNYXAsIGxvY2FsZSkgewogICAgICAgICAgICBpZiAodmFsdWUgPT0gbnVsbCkKICAgICAgICAgICAgICAgIHJldHVybiAnJzsKICAgICAgICAgICAgaWYgKHR5cGVvZiBwbHVyYWxNYXAgIT09ICdvYmplY3QnIHx8IHBsdXJhbE1hcCA9PT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhyb3cgaW52YWxpZFBpcGVBcmd1bWVudEVycm9yKEkxOG5QbHVyYWxQaXBlLCBwbHVyYWxNYXApOwogICAgICAgICAgICB9CiAgICAgICAg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gICAgICAgICAgIGlmICh2YWx1ZSA9PSBudWxsKQogICAgICAgICAgICAgICAgcmV0dXJuICcnOwogICAgICAgICAgICBpZiAodHlwZW9mIG1hcHBpbmcgIT09ICdvYmplY3QnIHx8IHR5cGVvZiB2YWx1ZSAhPT0gJ3N0cmluZycpIHsKICAgICAgICAgICAgICAgIHRocm93IGludmFsaWRQaXBlQXJndW1lbnRFcnJvcihJMThuU2VsZWN0UGlwZSwgbWFwcGluZyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKG1hcHBpbmcuaGFzT3duUHJvcGVydHkodmFsdWUpKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gbWFwcGluZ1t2YWx1ZV07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKG1hcHBpbmcuaGFzT3duUHJvcGVydHkoJ290aGVyJykpIHsKICAgICAgICAgICAgICAgIHJldHVybiBtYXBwaW5nWydvdGhlciddOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiAnJzsKICAgICAgICB9CiAgICB9CiAgICBJMThuU2VsZWN0UGlwZS7JtWZhYyA9IGZ1bmN0aW9uIEkxOG5TZWxlY3RQaXBlX0ZhY3RvcnkodCkgeyByZXR1cm4gbmV3ICh0IHx8IEkxOG5TZWxlY3RQaXBlKSgpOyB9OwogICAgSTE4blNlbGVjdFBpcGUuybVwaXBlID0gybXJtWRlZmluZVBpcGUoeyBuYW1lOiAiaTE4blNlbGVjdCIsIHR5cGU6IEkxOG5TZWxlY3RQaXBlLCBwdXJlOiB0cnVlIH0pOwoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogcGFja2FnZXMvY29tbW9uL3NyYy9waXBlcy9qc29uX3BpcGUudHMKICAgICAqIEBzdXBwcmVzcyB7Y2hlY2tUeXBlcyxjb25zdGFudFByb3BlcnR5LGV4dHJhUmVxdWlyZSxtaXNzaW5nT3Zlcn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xseSBwYXNzIGEgY29tcGFyZUZuIGlmIHlvdXIga2V5cyBhcmUgY29tcGxleCB0eXBlcy4KICAgICAqCiAgICAgKiBcQHVzYWdlTm90ZXMKICAgICAqICMjIyBFeGFtcGxlcwogICAgICoKICAgICAqIFRoaXMgZXhhbXBsZXMgc2hvdyBob3cgYW4gT2JqZWN0IG9yIGEgTWFwIGNhbiBiZSBpdGVyYXRlZCBieSBuZ0ZvciB3aXRoIHRoZSB1c2Ugb2YgdGhpcyBrZXl2YWx1ZQogICAgICogcGlwZS4KICAgICAqCiAgICAgKiB7XEBleGFtcGxlIGNvbW1vbi9waXBlcy90cy9rZXl2YWx1ZV9waXBlLnRzIHJlZ2lvbj0nS2V5VmFsdWVQaXBlJ30KICAgICAqCiAgICAgKiBcQHB1YmxpY0FwaQogICAgICovCiAgICBjbGFzcyBLZXlWYWx1ZVBpcGUgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZGlmZmVycwogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKGRpZmZlcnMpIHsKICAgICAgICAgICAgdGhpcy5kaWZmZXJzID0gZGlmZmVyczsKICAgICAgICAgICAgdGhpcy5rZXlWYWx1ZXMgPSBbXTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHRlbXBsYXRlIEssIFYKICAgICAgICAgKiBAcGFyYW0gez99IGlucHV0CiAgICAgICAgICogQHBhcmFtIHs/PX0gY29tcGFyZUZuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB0cmFuc2Zvcm0oaW5wdXQsIGNvbXBhcmVGbiA9IGRlZmF1bHRDb21wYXJhdG9yKSB7CiAgICAgICAgICAgIGlmICghaW5wdXQgfHwgKCEoaW5wdXQgaW5zdGFuY2VvZiBNYXApICYmIHR5cGVvZiBpbnB1dCAhPT0gJ29iamVjdCcpKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoIXRoaXMuZGlmZmVyKSB7CiAgICAgICAgICAgICAgICAvLyBtYWtlIGEgZGlmZmVyIGZvciB3aGF0ZXZlciB0eXBlIHdlJ3ZlIGJlZW4gcGFzc2VkIGluCiAgICAgICAgICAgICAgICB0aGlzLmRpZmZlciA9IHRoaXMuZGlmZmVycy5maW5kKGlucHV0KS5jcmVhdGUoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGRpZmZlckNoYW5nZXMgPSB0aGlzLmRpZmZlci5kaWZmKCgvKiogQHR5cGUgez99ICovIChpbnB1dCkpKTsKICAgICAgICAgICAgaWYgKGRpZmZlckNoYW5nZXMpIHsKICAgICAgICAgICAgICAgIHRoaXMua2V5VmFsdWVzID0gW107CiAgICAgICAgICAgICAgICBkaWZmZXJDaGFuZ2VzLmZvckVhY2hJdGVtKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKHIpID0+IHsKICAgICAgICAgICAgICAgICAgICB0aGlzLmtleVZhbHVlcy5wdXNoKG1ha2VLZXlWYWx1ZVBhaXIoci5rZXksICgvKiogQHR5cGUgez99ICovIChyLmN1cnJlbnRWYWx1ZSkpKSk7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICB0aGlzLmtleVZhbHVlcy5zb3J0KGNvbXBhcmVGbik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXMua2V5VmFsdWVzOwogICAgICAgIH0KICAgIH0KICAgIEtleVZhbHVlUGlwZS7JtWZhYyA9IGZ1bmN0aW9uIEtleVZhbHVlUGlwZV9GYWN0b3J5KHQpIHsgcmV0dXJuIG5ldyAodCB8fCBLZXlWYWx1ZVBpcGUpKMm1ybVkaXJlY3RpdmVJbmplY3QoS2V5VmFsd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IHJldHVybiAxOwogICAgICAgIGlmIChiID09PSBudWxsKQogICAgICAgICAgICByZXR1cm4gLTE7CiAgICAgICAgaWYgKHR5cGVvZiBhID09ICdzdHJpbmcnICYmIHR5cGVvZiBiID09ICdzdHJpbmcnKSB7CiAgICAgICAgICAgIHJldHVybiBhIDwgYiA/IC0xIDogMTsKICAgICAgICB9CiAgICAgICAgaWYgKHR5cGVvZiBhID09ICdudW1iZXInICYmIHR5cGVvZiBiID09ICdudW1iZXInKSB7CiAgICAgICAgICAgIHJldHVybiBhIC0gYjsKICAgICAgICB9CiAgICAgICAgaWYgKHR5cGVvZiBhID09ICdib29sZWFuJyAmJiB0eXBlb2YgYiA9PSAnYm9vbGVhbicpIHsKICAgICAgICAgICAgcmV0dXJuIGEgPCBiID8gLTEgOiAxOwogICAgICAgIH0KICAgICAgICAvLyBgYWAgYW5kIGBiYCBhcmUgb2YgZGlmZmVyZW50IHR5cGVzLiBDb21wYXJlIHRoZWlyIHN0cmluZyB2YWx1ZXMuCiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGFTdHJpbmcgPSBTdHJpbmcoYSk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGJTdHJpbmcgPSBTdHJpbmcoYik7CiAgICAgICAgcmV0dXJuIGFTdHJpbmcgPT0gYlN0cmluZyA/IDAgOiBhU3RyaW5nIDwgYlN0cmluZyA/IC0xIDogMTsKICAgIH0KCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcgYWRkZWQgYnkgdHNpY2tsZQogICAgICogR2VuZXJhdGVkIGZyb206IHBhY2thZ2VzL2NvbW1vbi9zcmMvcGlwZXMvbnVtYmVyX3BpcGUudHMKICAgICAqIEBzdXBwcmVzcyB7Y2hlY2tUeXBlcyxjb25zdGFudFByb3BlcnR5LGV4dHJhUmVxdWlyZSxtaXNzaW5nT3ZlcnJpZGUsbWlzc2luZ1JldHVybix1bnVzZWRQcml2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51bWJlcigpYAogICAgICoKICAgICAqIFxAdXNhZ2VOb3RlcwogICAgICogVGhlIGZvbGxvd2luZyBjb2RlIHNob3dzIGhvdyB0aGUgcGlwZSB0cmFuc2Zvcm1zIG51bWJlcnMKICAgICAqIGludG8gdGV4dCBzdHJpbmdzLCBhY2NvcmRpbmcgdG8gdmFyaW91cyBmb3JtYXQgc3BlY2lmaWNhdGlvbnMsCiAgICAgKiB3aGVyZSB0aGUgY2FsbGVyJ3MgZGVmYXVsdCBsb2NhbGUgaXMgYGVuLVVTYC4KICAgICAqCiAgICAgKiAjIyMgRXhhbXBsZQogICAgICoKICAgICAqIDxjb2RlLWV4YW1wbGUgcGF0aD0iY29tbW9uL3BpcGVzL3RzL251bWJlcl9waXBlLnRzIiByZWdpb249J051bWJlclBpcGUnPjwvY29kZS1leGFtcGxlPgogICAgICoKICAgICAqIFxAcHVibGljQXBpCiAgICAgKi8KICAgIGNsYXNzIERlY2ltYWxQaXBlIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IF9sb2NhbGUKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihfbG9jYWxlKSB7CiAgICAgICAgICAgIHRoaXMuX2xvY2FsZSA9IF9sb2NhbGU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUgVGhlIG51bWJlciB0byBiZSBmb3JtYXR0ZWQuCiAgICAgICAgICogQHBhcmFtIHs/PX0gZGlnaXRzSW5mbyBEZWNpbWFsIHJlcHJlc2VudGF0aW9uIG9wdGlvbnMsIHNwZWNpZmllZCBieSBhIHN0cmluZwogICAgICAgICAqIGluIHRoZSBmb2xsb3dpbmcgZm9ybWF0Ojxicj4KICAgICAgICAgKiA8Y29kZT57bWluSW50ZWdlckRpZ2l0c30ue21pbkZyYWN0aW9uRGlnaXRzfS17bWF4RnJhY3Rpb25EaWdpdHN9PC9jb2RlPi4KICAgICAgICAgKiAgIC0gYG1pbkludGVnZ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ICAgICAgICBpZiAoKC8qKiBAdHlwZSB7P30gKi8gKGNvbnNvbGUpKSAmJiAoLyoqIEB0eXBlIHs/fSAqLyAoY29uc29sZS53YXJuKSkpIHsKICAgICAgICAgICAgICAgICAgICBjb25zb2xlLndhcm4oYFdhcm5pbmc6IHRoZSBjdXJyZW5jeSBwaXBlIGhhcyBiZWVuIGNoYW5nZWQgaW4gQW5ndWxhciB2NS4gVGhlIHN5bWJvbERpc3BsYXkgb3B0aW9uICh0aGlyZCBwYXJhbWV0ZXIpIGlzIG5vdyBhIHN0cmluZyBpbnN0ZWFkIG9mIGEgYm9vbGVhbi4gVGhlIGFjY2VwdGVkIHZhbHVlcyBhcmUgImNvZGUiLCAic3ltYm9sIiBvciAic3ltYm9sLW5hcnJvdyIuYCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBkaXNwbGF5ID0gZGlzcGxheSA/ICdzeW1ib2wnIDogJ2NvZGUnOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGN1cnJlbmN5ID0gY3VycmVuY3lDb2RlIHx8IHRoaXMuX2RlZmF1bHRDdXJyZW5jeUNvZGU7CiAgICAgICAgICAgIGlmIChkaXNwbGF5ICE9PSAnY29kZScpIHsKICAgICAgICAgICAgICAgIGlmIChkaXNwbGF5ID09PSAnc3ltYm9sJyB8fCBkaXNwbGF5ID09PSAnc3ltYm9sLW5hcnJvdycpIHsKICAgICAgICAgICAgICAgICAgICBjdXJyZW5jeSA9IGdldEN1cnJlbmN5U3ltYm9sKGN1cnJlbmN5LCBkaXNwbGF5ID09PSAnc3ltYm9sJyA/ICd3aWRlJyA6ICduYXJyb3cnLCBsb2NhbGUpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgY3VycmVuY3kgPSBkaXNwbGF5OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICA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AqIGBgYAogICAgICoKICAgICAqICMjIyBTdHJpbmcgRXhhbXBsZXMKICAgICAqCiAgICAgKiB7XEBleGFtcGxlIGNvbW1vbi9waXBlcy90cy9zbGljZV9waXBlLnRzIHJlZ2lvbj0nU2xpY2VQaXBlX3N0cmluZyd9CiAgICAgKgogICAgICogXEBwdWJsaWNBcGkKICAgICAqLwogICAgY2xhc3MgU2xpY2VQaXBlIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHBhcmFtIHs/fSBzdGFydAogICAgICAgICAqIEBwYXJhbSB7Pz19IGVuZAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdHJhbnNmb3JtKHZhbHVlLCBzdGFydCwgZW5kKSB7CiAgICAgICAgICAgIGlmICh2YWx1ZSA9PSBudWxsKQogICAgICAgICAgICAgICAgcmV0dXJuIHZhbHVlOwogICAgICAgICAgICBpZiAoIXRoaXMuc3VwcG9ydHModmFsdWUpKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBpbnZhbGlkUGlwZUFyZ3VtZW50RXJyb3IoU2xpY2VQaXBlLCB2YWx1ZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHZhbHVlLnNsaWNlKHN0YXJ0LCBlbmQpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gb2JqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzdXBwb3J0cyhvYmopIHsKICAgICAgICAgICAgcmV0dXJuIHR5cGVvZiBvYmogPT09ICdzdHJpbmcnIHx8IEFycmF5LmlzQXJyYXkob2JqKTsKICAgICAgICB9CiAgICB9CiAgICBTbGljZVBpcGUuybVmYWMgPSBmdW5jdGlvbiBTbGljZVBpcGVfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgU2xpY2VQaXBlKS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sCiAgICAgICAgICAgIE5nU3dpdGNoQ2FzZSwKICAgICAgICAgICAgTmdTd2l0Y2hEZWZhdWx0LAogICAgICAgICAgICBOZ1BsdXJhbCwKICAgICAgICAgICAgTmdQbHVyYWxDYXNlLAogICAgICAgICAgICBBc3luY1BpcGUsCiAgICAgICAgICAgIFVwcGVyQ2FzZVBpcGUsCiAgICAgICAgICAgIExvd2VyQ2FzZVBpcGUsCiAgICAgICAgICAgIEpzb25QaXBlLAogICAgICAgICAgICBTbGljZVBpcGUsCiAgICAgICAgICAgIERlY2ltYWxQaXBlLAogICAgICAgICAgICBQZXJjZW50UGlwZSwKICAgICAgICAgICAgVGl0bGVDYXNlUGlwZSwKICAgICAgICAgICAgQ3VycmVuY3lQaXBlLAogICAgICAgICAgICBEYXRlUGlwZSwKICAgICAgICAgICAgSTE4blBsdXJhbFBpcGUsCiAgICAgICAgICAgIEkxOG5TZWxlY3RQaXBlLAogICAgICAgICAgICBLZXlWYWx1ZVBpcGVdLCBleHBvcnRzOiBbTmdDbGFzcywKICAgICAgICAgICAgTmdDb21wb25lbnRPdXRsZXQsCiAgICAgICAgICAgIE5nRm9yT2YsCiAgICAgICAgICAgIE5nSWYsCiAgICAgICAgICAgIE5nVGVtcGxhdGVPdXRsZXQsCiAgICAgICAgICAgIE5nU3R5bGUsCiAgICAgICAgICAgIE5nU3dpdGNoLAogICAgICAgICAgICBOZ1N3aXRjaENhc2UsCiAgICAgICAgICAgIE5nU3dpdGNoRGVmYXVsdCwKICAgICAgICAgICAgTmdQbHVyYWwsCiAgICAgICAgICAgIE5nUGx1cmFsQ2FzZSwKICAgICAgICAgICAgQXN5bmNQaXBlLAogICAgICAgICAgICBVcHBlckNhc2VQaXBlLAogICAgICAgICAgICBMb3dlckNhc2VQaXBlLAogICAgICAgICAgICBKc29uUGlwZSwKICAgICAgICAgICAgU2xpY2VQaXBlLAogICAgICAgICAgICBEZWNpbWFsUGlwZSwKICAgICAgICAgICAgUGVyY2VudFBpcGUsCiAgIC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RTY3JvbGxlcmAuCiAgICAgKgogICAgICogXEBwdWJsaWNBcGkKICAgICAqIEBhYnN0cmFjdAogICAgICovCiAgICBjbGFzcyBWaWV3cG9ydFNjcm9sbGVyIHsKICAgIH0KICAgIC8vIERlLXN1Z2FyZWQgdHJlZS1zaGFrYWJsZSBpbmplY3Rpb24KICAgIC8vIFNlZSAjMjM5MTcKICAgIC8qKiBAbm9jb2xsYXBzZSAqLwogICAgVmlld3BvcnRTY3JvbGxlci7JtXByb3YgPSDJtcm1ZGVmaW5lSW5qZWN0YWJsZSh7CiAgICAgICAgdG9rZW46IFZpZXdwb3J0U2Nyb2xsZXIsCiAgICAgICAgcHJvdmlkZWRJbjogJ3Jvb3QnLAogICAgICAgIGZhY3Rvcnk6ICgvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgICgpID0+IG5ldyBCcm93c2VyVmlld3BvcnRTY3JvbGxlcijJtcm1aW5qZWN0KERPQ1VNRU5UJDEpLCB3aW5kb3csIMm1ybVpbmplY3QoRXJyb3JIYW5kbGVyKSkpCiAgICB9KTsKICAgIC8qKgogICAgICogTWFuYWdlcyB0aGUgc2Nyb2xsIHBvc2l0aW9uIGZvciBhIGJyb3dzZXIgd2luZG93LgogICAgICovCiAgICBjbGFzcyBCcm93c2VyVmlld3BvcnRTY3JvbGxlciB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBkb2N1bWVudAogICAgICAgICAqIEBwYXJhbSB7P30gd2luZG93CiAgICAgICAgICogQHBhcmFtIHs/fSBlcnJvckhhbmRsZXIKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3Rvcihkb2N1bWVudCwgd2luZG93LCBlcnJvckhhbmRsZXIpIHsKICAgICAgICAgICAgdGhpcy5kb2N1bWVudCA9IGRvY3VtZW50OwogICAgICAgICAgICB0aGlzLndpbmRvdyA9IHdpbmRvdzsKICAgICAgICAgICAgdGhpcy5lcnJvckhhbmRsZXIgPSBlcnJvckhhbmRsZXI7CiAgICAgICAgICAgIHRoaXMub2Zmc2V0ID0gKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gWzAsIDBdKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ29uZmlndXJlcyB0aGUgdG9wIG9mZnNldCB1c2VkIHdoZW4gc2Nyb2xsaW5nIHRvIGFuIGFuY2hvci4KICAgICAgICAgKiBAcGFyYW0gez99IG9mZnNldCBBIHBvc2l0aW9uIGluIHNjcmVlbiBjb29yZGluYXRlcyAoYSB0dXBsZSB3aXRoIHggYW5kIHkgdmFsdWVzKQogICAgICAgICAqIG9yIGEgZnVuY3Rpb24gdGhhdCByZXR1cm5zIHRoZSB0b3Agb2Zmc2V0IHBvc2l0aW9uLgogICAgICAgICAqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXRPZmZzZXQob2Zmc2V0KSB7CiAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KG9mZnNldCkpIHsKICAgICAgICAgICAgICAgIHRoaXMub2Zmc2V0ID0gKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gb2Zmc2V0KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMub2Zmc2V0ID0gb2Zmc2V0OwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJldHJpZXZlcyB0aGUgY3VycmVudCBzY3JvbGwgcG9zaXRpb24uCiAgICAgICAgICogQHJldHVybiB7P30gVGhlIHBvc2l0aW9uIGluIHNjcmVlbiBjb29yZGluYXRlcy4KICAgICAgICAgKi8KICAgICAgICBnZXRTY3JvbGxQb3NpdGlvbigpIHsKICAgICAgICAgICAgaWYgKHRoaXMuc3VwcG9ydFNjcm9sbFJlc3RvcmF0aW9uKCkpIHsKICAgICAgICAgICAgICAgIHJldHVybiBbdGhpcy53aW5kb3cuc2Nyb2xsWCwgdGhpcy53aW5kb3cuc2Nyb2xsWV07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICByZXR1cm4gWzAsIDBdOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgdGhlIHNjcm9sbCBwb3NpdGlvbi4KICAgICAgICAgKiBAcGFyYW0gez99IHBvc2l0aW9uIFRoZSBuZXcgcG9zaXRpb24gaW4gc2NyZWVuIGNvb3JkaW5hdGVzLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2Nyb2xsVG9Qb3NpdGlvbihwb3NpdGlvbikgewogICAgICAgICAgICBpZiAodGhpcy5zdXBwb3J0U2Nyb2xsUmVzdG9yYXRpb24oKSkgewogICAgICAgICAgICAgICAgdGhpcy53aW5kb3cuc2Nyb2xsVG8ocG9zaXRpb25bMF0sIHBvc2l0aW9uWzFdKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTY3JvbGxzIHRvIGFuIGFuY2hvciBlbGVtZW50LgogICAgICAgICAqIEBwYXJhbSB7P30gYW5jaG9yIFRoZSBJRCBvZiB0aGUgYW5jaG9yIGVsZW1lbnQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzY3JvbGxUb0FuY2hvcihhbmNob3IpIHsKICAgICAgICAgICAgaWYgKHRoaXMuc3VwcG9ydFNjcm9sbFJlc3RvcmF0aW9uKCkpIHsKICAgICAgICAgICAgICAgIC8vIEVzY2FwZSBhbnl0aGluZyBwYXNzZWQgdG8gYHF1ZXJ5U2VsZWN0b3JgIGFzIGl0IGNhbiB0aHJvdyBlcnJvcnMgYW5kIHN0b3AgdGhlIGFwcGxpY2F0aW9uCiAgICAgICAgICAgICAgICAvLyBmcm9tIHdvcmtpbmcgaWYgaW52YWxpZCB2YWx1ZXMgYXJlIHBhc3NlZC4KICAgICAgICAgICAgICAgIGlmICh0aGlzLndpbmRvdy5DU1MgJiYgdGhpcy53aW5kb3cuQ1NTLmVzY2FwZSkgewogICAgICAgICAgICAgICAgICAgIGFuY2hvciA9IHRoaXMud2luZG93LkNTUy5lc2NhcGUoYW5jaG9yKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIGFuY2hvciA9IGFuY2hvci5yZXBsYWNlKC8oXCJ8XCdcIHw6fFwufFxbfFxdfCx8PSkvZywgJ1xcJDEnKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGVsU2VsZWN0ZWRCeUlkID0gdGhpcy5kb2N1bWVudC5xdWVyeVNlbGVjdG9yKGAjJHthbmNob3J9YCk7CiAgICAgICAgICAgICAgICAgICAgaWYgKGVsU2VsZWN0ZWRCeUlkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2Nyb2xsVG9FbGVtZW50KGVsU2VsZWN0ZWRCeUlkKTsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgZWxTZWxlY3RlZEJ5TmFtZSA9IHRoaXMuZG9jdW1lbnQucXVlcnlTZWxlY3RvcihgW25hbWU9JyR7YW5jaG9yfSddYCk7CiAgICAgICAgICAgICAgICAgICAgaWYgKGVsU2VsZWN0ZWRCeU5hbWUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zY3JvbGxUb0VsZW1lbnQoZWxTZWxlY3RlZEJ5TmFtZSk7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjYXRjaCAoZSkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuZXJyb3JIYW5kbGVyLmhhbmRsZUVycm9yKGUpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIERpc2FibGVzIGF1dG9tYXRpYyBzY3JvbGwgcmVzdG9yYXRpb24gcHJvdmlkZWQgYnkgdGhlIGJyb3dzZXIuCiAgICAgICAgICogQHBhcmFtIHs/fSBzY3JvbGxSZXN0b3JhdGlvbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0SGlzdG9yeVNjcm9sbFJlc3RvcmF0aW9uKHNjcm9sbFJlc3RvcmF0aW9uKSB7CiAgICAgICAgICAgIGlmICh0aGlzLnN1cHBvcnRTY3JvbGxSZXN0b3JhdGlvbigpKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBoaXN0b3J5ID0gdGhpcy53aW5kb3cuaGlzdG9yeTsKICAgICAgICAgICAgICAgIGlmIChoaXN0b3J5ICYmIGhpc3Rvcnkuc2Nyb2xsUmVzdG9yYXRpb24pIHsKICAgICAgICAgICAgICAgICAgICBoaXN0b3J5LnNjcm9sbFJlc3RvcmF0aW9uID0gc2Nyb2xsUmVzdG9yYXRpb247CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGVsCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzY3JvbGxUb0VsZW1lbnQoZWwpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAg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ICAgc3VwcG9ydFNjcm9sbFJlc3RvcmF0aW9uKCkgewogICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgcmV0dXJuICEhdGhpcy53aW5kb3cgJiYgISF0aGlzLndpbmRvdy5zY3JvbGxUbzsKICAgICAgICAgICAgfQogICAgICAgICAgICBjYXRjaCAoX2EpIHsKICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KCiAgICAvKioKICAgICAqIEBsaWNlbnNlIEFuZ3VsYXIgdjkuMS4xMgogICAgICogKGMpIDIwMTAtMjAyMCBHb29nbGUgTExDLiBodHRwczovL2FuZ3VsYXIuaW8vCiAgICAgKiBMaWNlbnNlOiBNSVQKICAgICAqLwoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogcGFja2FnZXMvcGxhdGZvcm0tYnJvd3Nlci9zcmMvYnJvd3Nlci9nZW5lcmljX2Jyb3dzZXJfYWRhcHRlci50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvKioKICAgICAqIFByb3ZpZGVzIERPTSBvcGVyYXRpb25zIGluIGFueSBicm93c2VyIGVudmlyb25tZW50LgogICAgICoKICAgICAqIFxAc2VjdXJpdHkgVHJlYWQgY2FyZWZ1bGx5ISBJbnRlcmFjdGluZyB3aXRoIHRoZSBET00gZGlyZWN0bHkgaXMgZGFuZ2Vyb3VzIGFuZAogICAgICogY2FuIGludHJvZHVjZSBYU1Mgcmlza3MuCiAgICAgKiBAYWJzdHJhY3QKICAgICAqLwogICAgY2xhc3MgR2VuZXJpY0Jyb3dzZXJEb21BZGFwdGVyIGV4dGVuZHMgRG9tQWRhcHRlciB7CiAgICAgICAgY29uc3RydWN0b3IoKSB7CiAgICAgICAgICAgIHN1cGVyKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc3VwcG9ydHNET01FdmVudHMoKSB7CiAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgIH0KICAgIH0KCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcgYWRkZWQgYnkgdHNpY2tsZQogICAgICogR2VuZXJhdGVkIGZyb206IHBhY2thZ2VzL3BsYXRmb3JtLWJyb3dzZXIvc3JjL2Jyb3dzZXIvYnJvd3Nlcl9hZGFwdGVyLnRzCiAgICAgKiBAc3VwcHJlc3Mge2NoZWNrVHlwZXMsY29uc3RhbnRQcm9wZXJ0eSxleHRyYVJlcXVpcmUsbWlzc2luZ092ZXJyaWRlLG1pc3NpbmdSZXR1cm4sdW51c2VkUHJpdmF0ZU1lbWJlcnMsdXNlbGVzc0NvZGV9IGNoZWNrZWQgYnkgdHNjCiAgICAgKi8KICAgIGNvbnN0IMm1MCQ1ID0gLyoqCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICAoKSA9PiB7CiAgICAgICAgaWYgKF9nbG9iYWxbJ05vZGUnXSkgewogICAgICAgICAgICByZXR1cm4gX2dsb2JhbFsnTm9kZSddLnByb3RvdHlwZS5jb250YWlucyB8fCAoLyoqCiAgICAgICAgICAgICAqIEB0aGlzIHs/fQogICAgICAgICAgICAgKiBAcGFyYW0gez99IG5vZGUKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGZ1bmN0aW9uIChub2RlKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gISEodGhpcy5jb21wYXJlRG9jdW1lbnRQb3NpdGlvbihub2RlKSAmIDE2KTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAodW5kZWZpbmVkKSk7CiAgICB9OwogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3Qgbm9kZUNvbnRhaW5zID0gKCjJtTAkNSkpKCk7CiAgICAvKioKICAgICAqIEEgYERvbUFkYXB0ZXJgIHBvd2VyZWQgYnkgZnVsbCBicm93c2VyIERPTSBBUElzLgogICAgICoKICAgICAqIFxAc2VjdXJpdHkgVHJlYWQgY2FyZWZ1bGx5ISBJbnRlcmFjdGluZyB3aXRoIHRoZSBET00gZGlyZWN0bHkgaXMgZGFuZ2Vyb3VzIGFuZAogICAgICogY2FuIGludHJvZHVjZSBYU1Mgcmlza3MuCiAgICAgKi8KICAgIC8qIHRzbGludDpkaXNhYmxlOnJlcXVpcmVQYXJhbWV0ZXJUeXBlIG5vLWNvbnNvbGUgKi8KICAgIGNsYXNzIEJyb3dzZXJEb21BZGFwdGVyIGV4dGVuZHMgR2VuZXJpY0Jyb3dzZXJEb21BZGFwdGVyIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHN0YXRpYyBtYWtlQ3VycmVudCgpIHsKICAgICAgICAgICAgc2V0Um9vdERvbUFkYXB0ZXIobmV3IEJyb3dzZXJEb21BZGFwdGVyKCkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsCiAgICAgICAgICogQHBhcmFtIHs/fSBuYW1lCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXRQcm9wZXJ0eShlbCwgbmFtZSkgewogICAgICAgICAgICByZXR1cm4gKCgvKiogQHR5cGUgez99ICovIChlbCkpKVtuYW1lXTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBlcnJvcgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbG9nKGVycm9yKSB7CiAgICAgICAgICAgIGlmICh3aW5kb3cuY29uc29sZSkgewogICAgICAgICAgICAgICAgd2luZG93LmNvbnNvbGUubG9nICYmIHdpbmRvdy5jb25zb2xlLmxvZyhlcnJvcik7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBlcnJvcgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbG9nR3JvdXAoZXJyb3IpIHsKICAgICAgICAgICAgaWYgKHdpbmRvdy5jb25zb2xlKSB7CiAgICAgICAgICAgICAgICB3aW5kb3cuY29uc29sZS5ncm91cCAmJiB3aW5kb3cuY29uc29sZS5ncm91cChlcnJvcik7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBsb2dHcm91cEVuZCgpIHsKICAgICAgICAgICAgaWYgKHdpbmRvdy5jb25zb2xlKSB7CiAgICAgICAgICAgICAgICB3aW5kb3cuY29uc29sZS5ncm91cEVuZCAmJiB3aW5kb3cuY29uc29sZS5ncm91cEVuZCgpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZWwKICAgICAgICAgKiBAcGFyYW0gez99IGV2dAogICAgICAgICAqIEBwYXJhbSB7P30gbGlzdGVuZXIKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uQW5kQ2FuY2VsKGVsLCBldnQsIGxpc3RlbmVyKSB7CiAgICAgICAgICAgIGVsLmFkZEV2ZW50TGlzdGVuZXIoZXZ0LCBsaXN0ZW5lciwgZmFsc2UpOwogICAgICAgICAgICAvLyBOZWVkZWQgdG8gZm9sbG93IERhcnQncyBzdWJzY3JpcHRpb24gc2VtYW50aWMsIHVudGlsIGZpeCBvZgogICAgICAgICAgICAvLyBodHRwczovL2NvZGUuZ29vZ2xlLmNvbS9wL2RhcnQvaXNzdWVzL2RldGFpbD9pZD0xNzQwNgogICAgICAgICAgICByZXR1cm4gKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgZWwucmVtb3ZlRXZlbnRMaXN0ZW5lcihldnQsIGxpc3RlbmVyLCBmYWxzZSk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsCiAgICAgICAgICogQHBhcmFtIHs/fSBldnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGRpc3BhdGNoRXZlbnQoZWwsIGV2dCkgewogICAgICAgICAgICBlbC5kaXNwYXRjaEV2ZW50KGV2dCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gbm9kZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVtb3ZlKG5vZGUpIHsKICAgICAgICAgICAgaWYgKG5vZGUucGFyZW50Tm9kZSkgewogICAgICAgICAgICAgICAgbm9kZS5wYXJlbnROb2RlLnJlbW92ZUNoaWxkKG5vZGUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBub2RlOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXRWYWx1ZShlbCkgewogICAgICAgICAgICByZXR1cm4gZWwudmFsdWU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdGFnTmFtZQogICAgICAgICAqIEBwYXJhbSB7Pz19IGRvYwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgY3JlYXRlRWxlbWVudCh0YWdOYW1lLCBkb2MpIHsKICAgICAgICAgICAgZG9jID0gZG9jIHx8IHRoaXMuZ2V0RGVmYXVsdERvY3VtZW50KCk7CiAgICAgICAgICAgIHJldHVybiBkb2MuY3JlYXRlRWxlbWVudCh0YWdOYW1lKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBjcmVhdGVIdG1sRG9jdW1lbnQoKSB7CiAgICAgICAgICAgIHJldHVybiBkb2N1bWVudC5pbXBsZW1lbnRhdGlvbi5jcmVhdGVIVE1MRG9jdW1lbnQoJ2Zha2VUaXRsZScpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldERlZmF1bHREb2N1bWVudCgpIHsKICAgICAgICAgICAgcmV0dXJuIGRvY3VtZW50OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IG5vZGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGlzRWxlbWVudE5vZGUobm9kZSkgewogICAgICAgICAgICByZXR1cm4gbm9kZS5ub2RlVHlwZSA9PT0gTm9kZS5FTEVNRU5UX05PREU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gbm9kZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgaXNTaGFkb3dSb290KG5vZGUpIHsKICAgICAgICAgICAgcmV0dXJuIG5vZGUgaW5zdGFuY2VvZiBEb2N1bWVudEZyYWdtZW50OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGRvYwogICAgICAgICAqIEBwYXJhbSB7P30gdGFyZ2V0CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXRHbG9iYWxFdmVudFRhcmdldChkb2MsIHRhcmdldCkgewogICAgICAgICAgICBpZiAodGFyZ2V0ID09PSAnd2luZG93JykgewogICAgICAgICAgICAgICAgcmV0dXJuIHdpbmRvdzsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGFyZ2V0ID09PSAnZG9jdW1lbnQnKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gZG9jOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0YXJnZXQgPT09ICdib2R5JykgewogICAgICAgICAgICAgICAgcmV0dXJuIGRvYy5ib2R5OwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldEhpc3RvcnkoKSB7CiAgICAgICAgICAgIHJldHVybiB3aW5kb3cuaGlzdG9yeTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXRMb2NhdGlvbigpIHsKICAgICAgICAgICAgcmV0dXJuIHdpbmRvdy5sb2NhdGlvbjsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBkb2MKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldEJhc2VIcmVmKGRvYykgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGhyZWYgPSBnZXRCYXNlRWxlbWVudEhyZWYoKTsKICAgICAgICAgICAgcmV0dXJuIGhyZWYgPT0gbnVsbCA/IG51bGwgOiByZWxhdGl2ZVBhdGgoaHJlZik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVzZXRCYXNlRWxlbWVudCgpIHsKICAgICAgICAgICAgYmFzZUVsZW1lbnQgPSBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldFVzZXJBZ2VudCgpIHsKICAgICAgICAgICAgcmV0dXJuIHdpbmRvdy5uYXZpZ2F0b3IudXNlckFnZW50OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHBlcmZvcm1hbmNlTm93KCkgewogICAgICAgICAgICAvLyBwZXJmb3JtYW5jZS5ub3coKSBpcyBub3QgYXZhaWxhYmxlIGluIGFsbCBicm93c2Vycywgc2VlCiAgICAgICAgICAgIC8vIGh0dHA6Ly9jYW5pdXNlLmNvbS8jc2VhcmNoPXBlcmZvcm1hbmNlLm5vdwogICAgICAgICAgICByZXR1cm4gd2luZG93LnBlcmZvcm1hbmNlICYmIHdpbmRvdy5wZXJmb3JtYW5jZS5ub3cgPyB3aW5kb3cucGVyZm9ybWFuY2Uubm93KCkgOgogICAgICAgICAgICAgICAgbmV3IERhdGUoKS5nZXRUaW1lKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc3VwcG9ydHNDb29raWVzKCkgewogICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBuYW1lCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXRDb29raWUobmFtZSkgewogICAgICAgICAgICByZXR1cm4gcGFyc2VDb29raWVWYWx1ZShkb2N1bWVudC5jb29raWUsIG5hbWUpOwogICAgICAgIH0KICAgIH0KICAgIC8qKiBAdHlwZSB7P30gKi8KICAgIGxldCBiYXNlRWxlbWVudCA9IG51bGw7CiAgICAvKioKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGdldEJhc2VFbGVtZW50SHJlZigpIHsKICAgICAgICBpZiAoIWJhc2VFbGVtZW50KSB7CiAgICAgICAgICAgIGJhc2VFbGVtZW50ID0gKC8qKiBAdHlwZSB7P30gKi8gKGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJ2Jhc2UnKSkpOwogICAgICAgICAgICBpZiAoIWJhc2VFbGVtZW50KSB7CiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gYmFzZUVsZW1lbnQuZ2V0QXR0cmlidXRlKCdocmVmJyk7CiAgICB9CiAgICAvLyBiYXNlZCBvbiB1cmxVdGlscy5qcyBpbiBBbmd1bGFySlMgMQogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgbGV0IHVybFBhcnNpbmdOb2RlOwogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHVybAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gcmVsYXRpdmVQYXRoKHVybCkgewogICAgICAgIGlmICghdXJsUGFyc2luZ05vZGUpIHsKICAgICAgICAgICAgdXJsUGFyc2luZ05vZGUgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdhJyk7CiAgICAgICAgfQogICAgICAgIHVybFBhcnNpbmdOb2RlLnNldEF0dHJpYnV0ZSgnaHJlZicsIHVybCk7CiAgICAgICAgcmV0dXJuICh1cmxQYXJzaW5nTm9kZS5wYXRobmFtZS5jaGFyQXQoMCkgPT09ICcvJykgPyB1cmxQYXJzaW5nTm9kZS5wYXRobmFtZSA6CiAgICAgICAgICAgICcvJyArIHVybFBhcnNpbmdOb2RlLnBhdGhuYW1lOwogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogcGFja2FnZXMvcGxhdGZvcm0tYnJvd3Nlci9zcmMvYnJvd3Nlci9zZXJ2ZXItdHJhbnNpdGlvbi50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvKioKICAgICAqIEFuIGlkIHRoYXQgaWRlbnRpZmllcyBhIHBhcnRpY3VsYXIgYXBwbGljYXRpb24gYmVpbmcgYm9vdHN0cmFwcGVkLCB0aGF0IHNob3VsZAogICAgICogbWF0Y2ggYWNyb3NzIHRoZSBjbGllbnQvc2VydmVyIGJvdW5kYXJ5LgogICAgICogQHR5cGUgez99CiAgICAgKi8KICAgIGNvbnN0IFRSQU5TSVRJT05fSUQgPSBuZXcgSW5qZWN0aW9uVG9rZW4oJ1RSQU5TSVRJT05fSUQnKTsKICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB0cmFuc2l0aW9uSWQKICAgICAqIEBwYXJhbSB7P30gZG9jdW1lbnQKICAgICAqIEBwYXJhbSB7P30gaW5qZWN0b3IKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGFwcEluaXRpYWxpemVyRmFjdG9yeSh0cmFuc2l0aW9uSWQsIGRvY3VtZW50LCBpbmplY3RvcikgewogICAgICAgIHJldHVybiAoLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgIC8vIFdhaXQgZm9yIGFsbCBhcHBsaWNhdGlvbiBpbml0aWFsaXplcnMgdG8gYmUgY29tcGxldGVkIGJlZm9yZSByZW1vdmluZyB0aGUgc3R5bGVzIHNldCBieQogICAgICAgICAgICAvLyB0aGUgc2VydmVyLgogICAgICAgICAgICBpbmplY3Rvci5nZXQoQXBwbGljYXRpb25Jbml0U3RhdHVzKS5kb25lUHJvbWlzZS50aGVuKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGRvbSA9IGdldERPTSgpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3Qgc3R5bGVzID0gQXJyYXkucHJvdG90eXBlLnNsaWNlLmFwcGx5KGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoYHN0eWxlW25nLXRyYW5zaXRpb25dYCkpOwogICAgICAgICAgICAgICAgc3R5bGVzLmZpbHRlcigoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGVsCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBlbCA9PiBlbC5nZXRBdHRyaWJ1dGUoJ25nLXRyYW5zaXRpb24nKSA9PT0gdHJhbnNpdGlvbklkKSkKICAgICAgICAgICAgICAgICAgICAuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGVsCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBlbCA9PiBkb20ucmVtb3ZlKGVsKSkpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgfSk7CiAgICB9CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBTRVJWRVJfVFJBTlNJVElPTl9QUk9WSURFUlMgPSBbCiAgICAgICAgewogICAgICAgICAgICBwcm92aWRlOiBBUFBfSU5JVElBTElaRVIsCiAgICAgICAgICAgIHVzZUZhY3Rvcnk6IGFwcEluaXRpYWxpemVyRmFjdG9yeSwKICAgICAgICAgICAgZGVwczogW1RSQU5TSVRJT05fSUQsIERPQ1VNRU5UJDEsIEluamVjdG9yXSwKICAgICAgICAgICAgbXVsdGk6IHRydWUKICAgICAgICB9LAogICAgXTsKCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcgYWRkZWQgYnkgdHNpY2tsZQogICAgICogR2VuZXJhdGVkIGZyb206IHBhY2thZ2VzL3BsYXRmb3JtLWJyb3dzZXIvc3JjL2Jyb3dzZXIvdGVzdGFiaWxpdHkudHMKICAgICAqIEBzdXBwcmVzcyB7Y2hlY2tUeXBlcyxjb25zdGFudFByb3BlcnR5LGV4dHJhUmVxdWlyZSxtaXNzaW5nT3ZlcnJpZGUsbWlzc2luZ1JldHVybix1bnVzZWRQcml2YXRlTWVtYmVycyx1c2VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgY2xhc3MgQnJvd3NlckdldFRlc3RhYmlsaXR5IHsKICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHN0YXRpYyBpbml0KCkgewogICAgICAgICAgICBzZXRUZXN0YWJpbGl0eUdldHRlcihuZXcgQnJvd3NlckdldFRlc3RhYmlsaXR5KCkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHJlZ2lzdHJ5CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBhZGRUb1dpbmRvdyhyZWdpc3RyeSkgewogICAgICAgICAgICBfZ2xvYmFsWydnZXRBbmd1bGFyVGVzdGFiaWxpdHknXSA9ICgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtCiAgICAgICAgICAgICAqIEBwYXJhbSB7Pz19IGZpbmRJbkFuY2VzdG9ycwogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGVsZW0sIGZpbmRJbkFuY2VzdG9ycyA9IHRydWUpID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHRlc3RhYmlsaXR5ID0gcmVnaXN0cnkuZmluZFRlc3RhYmlsaXR5SW5UcmVlKGVsZW0sIGZpbmRJbkFuY2VzdG9ycyk7CiAgICAgICAgICAgICAgICBpZiAodGVzdGFiaWxpdHkgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignQ291bGQgbm90IGZpbmQgdGVzdGFiaWxpdHkgZm9yIGVsZW1lbnQuJyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gdGVzdGFiaWxpdHk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBfZ2xvYmFsWydnZXRBbGxBbmd1bGFyVGVzdGFiaWxpdGllcyddID0gKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gcmVnaXN0cnkuZ2V0QWxsVGVzdGFiaWxpdGllcygpKTsKICAgICAgICAgICAgX2dsb2JhbFsnZ2V0QWxsQW5ndWxhclJvb3RFbGVtZW50cyddID0gKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gcmVnaXN0cnkuZ2V0QWxsUm9vdEVsZW1lbnRzKCkpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHdoZW5BbGxTdGFibGUgPSAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY2FsbGJhY2sKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChjYWxsYmFjayAvKiogVE9ETyAjOTEwMCAqLykgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgdGVzdGFiaWxpdGllcyA9IF9nbG9iYWxbJ2dldEFsbEFuZ3VsYXJUZXN0YWJpbGl0aWVzJ10oKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCBjb3VudCA9IHRlc3RhYmlsaXRpZXMubGVuZ3RoOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IGRpZFdvcmsgPSBmYWxzZTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGRlY3JlbWVudCA9ICgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZGlkV29ya18KICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChkaWRXb3JrXyAvKiogVE9ETyAjOTEwMCAqLykgewogICAgICAgICAgICAgICAgICAgIGRpZFdvcmsgPSBkaWRXb3JrIHx8IGRpZFdvcmtfOwogICAgICAgICAgICAgICAgICAgIGNvdW50LS07CiAgICAgICAgICAgICAgICAgICAgaWYgKGNvdW50ID09IDApIHsKICAgICAgICAgICAgICAgICAgICAgICAgY2FsbGJhY2soZGlkV29yayk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB0ZXN0YWJpbGl0aWVzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSB0ZXN0YWJpbGl0eQogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgZnVuY3Rpb24gKHRlc3RhYmlsaXR5IC8qKiBUT0RPICM5MTAwICovKSB7CiAgICAgICAgICAgICAgICAgICAgdGVzdGFiaWxpdHkud2hlblN0YWJsZShkZWNyZW1lbnQpOwogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgaWYgKCFfZ2xvYmFsWydmcmFtZXdvcmtTdGFiaWxpemVycyddKSB7CiAgICAgICAgICAgICAgICBfZ2xvYmFsWydmcmFtZXdvcmtTdGFiaWxpemVycyddID0gW107CiAgICAgICAgICAgIH0KICAgICAgICAgICAgX2dsb2JhbFsnZnJhbWV3b3JrU3RhYmlsaXplcnMnXS5wdXNoKHdoZW5BbGxTdGFibGUpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHJlZ2lzdHJ5CiAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtCiAgICAgICAgICogQHBhcmFtIHs/fSBmaW5kSW5BbmNlc3RvcnMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZpbmRUZXN0YWJpbGl0eUluVHJlZShyZWdpc3RyeSwgZWxlbSwgZmluZEluQW5jZXN0b3JzKSB7CiAgICAgICAgICAgIGlmIChlbGVtID09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdCA9IHJlZ2lzdHJ5LmdldFRlc3RhYmlsaXR5KGVsZW0pOwogICAgICAgICAgICBpZiAodCAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdDsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmICghZmluZEluQW5jZXN0b3JzKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoZ2V0RE9NKCkuaXNTaGFkb3dSb290KGVsZW0pKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5maW5kVGVzdGFiaWxpdHlJblRyZWUocmVnaXN0cnksICgoLyoqIEB0eXBlIHs/fSAqLyAoZWxlbSkpKS5ob3N0LCB0cnVlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpcy5maW5kVGVzdGFiaWxpdHlJblRyZWUocmVnaXN0cnksIGVsZW0ucGFyZW50RWxlbWVudCwgdHJ1ZSk7CiAgICAgICAgfQogICAgfQog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AgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIChwcmV2LCB0KSA9PiAocHJldlt0Lm5hbWVdID0gdC50b2tlbiwgcHJldikpLCB7fSk7CiAgICB9CiAgICAvKioKICAgICAqIEluIEl2eSwgd2UgZG9uJ3Qgc3VwcG9ydCBOZ1Byb2JlIGJlY2F1c2Ugd2UgaGF2ZSBvdXIgb3duIHNldCBvZiB0ZXN0aW5nIHV0aWxpdGllcwogICAgICogd2l0aCBtb3JlIHJvYnVzdCBmdW5jdGlvbmFsaXR5LgogICAgICoKICAgICAqIFdlIHNob3VsZG4ndCBicmluZyBpbiBOZ1Byb2JlIGJlY2F1c2UgaXQgcHJldmVudHMgRGVidWdOb2RlIGFuZCBmcmllbmRzIGZyb20KICAgICAqIHRyZWUtc2hha2luZyBwcm9wZXJseS4KICAgICAqIEB0eXBlIHs/fQogICAgICovCiAgICBjb25zdCBFTEVNRU5UX1BST0JFX1BST1ZJREVSU19fUE9TVF9SM19fID0gW107CiAgICAvKioKICAgICAqIFByb3ZpZGVycyB3aGljaCBzdXBwb3J0IGRlYnVnZ2luZyBBbmd1bGFyIGFwcGxpY2F0aW9ucyAoZS5nLiB2aWEgYG5nLnByb2JlYCkuCiAgICAgKiBAdHlwZSB7P30KICAgICAqLwogICAgY29uc3QgRUxFTUVOVF9QUk9CRV9QUk9WSURFUlNfX1BSRV9SM19fID0gWwogICAgICAgIHsKICAgICAgICAgICAgcHJvdmlkZTogQVBQX0lOSVRJQUxJWkVSLAogICAgICAgICAgICB1c2VGYWN0b3J5OiBfY3JlYXRlTmdQcm9iZVIyLAogICAgICAgICAgICBkZXBzOiBbCiAgICAgICAgICAgICAgICBbTmdQcm9iZVRva2VuLCBuZXcgT3B0aW9uYWwoKV0sCiAgICAgICAgICAgIF0sCiAgICAgICAgICAgIG11bHRpOiB0cnVlLAogICAgICAgIH0sCiAgICBdOwogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgRUxFTUVOVF9QUk9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mUKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihwbHVnaW5zLCBfem9uZSkgewogICAgICAgICAgICB0aGlzLl96b25lID0gX3pvbmU7CiAgICAgICAgICAgIHRoaXMuX2V2ZW50TmFtZVRvUGx1Z2luID0gbmV3IE1hcCgpOwogICAgICAgICAgICBwbHVnaW5zLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAdGVtcGxhdGUgVEhJUwogICAgICAgICAgICAgKiBAdGhpcyB7VEhJU30KICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwCiAgICAgICAgICAgICAqIEByZXR1cm4ge1RISVN9CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBwID0+IHAubWFuYWdlciA9IHRoaXMpKTsKICAgICAgICAgICAgdGhpcy5fcGx1Z2lucyA9IHBsdWdpbnMuc2xpY2UoKS5yZXZlcnNlKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJlZ2lzdGVycyBhIGhhbmRsZXIgZm9yIGEgc3BlY2lmaWMgZWxlbWVudCBhbmQgZXZlbnQuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQgVGhlIEhUTUwgZWxlbWVudCB0byByZWNlaXZlIGV2ZW50IG5vdGlmaWNhdGlvbnMuCiAgICAgICAgICogQHBhcmFtIHs/fSBldmVudE5hbWUgVGhlIG5hbWUgb2YgdGhlIGV2ZW50IHRvIGxpc3RlbiBmb3IuCiAgICAgICAgICogQHBhcmFtIHs/fSBoYW5kbGVyIEEgZnVuY3Rpb24gdG8gY2FsbCB3aGVuIHRoZSBub3RpZmljYXRpb24gb2NjdXJzLiBSZWNlaXZlcyB0aGUKICAgICAgICAgKiBldmVudCBvYmplY3QgYXMgYW4gYXJndW1lbnQuCiAgICAgICAgICogQHJldHVybiB7P30gQSBjYWxsYmFjayBmdW5jdGlvbiB0aGF0IGNhbiBiZSB1c2VkIHRvIHJlbW92ZSB0aGUgaGFuZGxlci4KICAgICA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CBwbHVnaW4gPSB0aGlzLl9maW5kUGx1Z2luRm9yKGV2ZW50TmFtZSk7CiAgICAgICAgICAgIHJldHVybiBwbHVnaW4uYWRkR2xvYmFsRXZlbnRMaXN0ZW5lcih0YXJnZXQsIGV2ZW50TmFtZSwgaGFuZGxlcik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJldHJpZXZlcyB0aGUgY29tcGlsYXRpb24gem9uZSBpbiB3aGljaCBldmVudCBsaXN0ZW5lcnMgYXJlIHJlZ2lzdGVyZWQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXRab25lKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fem9uZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnROYW1lCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZmluZFBsdWdpbkZvcihldmVudE5hbWUpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwbHVnaW4gPSB0aGlzLl9ldmVudE5hbWVUb1BsdWdpbi5nZXQoZXZlbnROYW1lKTsKICAgICAgICAgICAgaWYgKHBsdWdpbikgewogICAgICAgICAgICAgICAgcmV0dXJuIHBsdWdpbjsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHBsdWdpbnMgPSB0aGlzLl9wbHVnaW5zOwogICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHBsdWdpbnMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHBsdWdpbiA9IHBsdWdpbnNbaV07CiAgICAgICAgICAgICAgICBpZiAocGx1Z2luLnN1cHBvcnRzKGV2ZW50TmFtZSk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MuX2RvYyA9IF9kb2M7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnROYW1lCiAgICAgICAgICogQHBhcmFtIHs/fSBoYW5kbGVyCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBhZGRHbG9iYWxFdmVudExpc3RlbmVyKGVsZW1lbnQsIGV2ZW50TmFtZSwgaGFuZGxlcikgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHRhcmdldCA9IGdldERPTSgpLmdldEdsb2JhbEV2ZW50VGFyZ2V0KHRoaXMuX2RvYywgZWxlbWVudCk7CiAgICAgICAgICAgIGlmICghdGFyZ2V0KSB7CiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYFVuc3VwcG9ydGVkIGV2ZW50IHRhcmdldCAke3RhcmdldH0gZm9yIGV2ZW50ICR7ZXZlbnROYW1lfWApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0aGlzLmFkZEV2ZW50TGlzdGVuZXIodGFyZ2V0LCBldmVudE5hbWUsIGhhbmRsZXIpOwogICAgICAgIH0KICAgIH0KCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcgYWRkZWQgYnkgdHNpY2tsZQogICAgICogR2VuZXJhdGVkIGZyb206IHBhY2thZ2VzL3BsYXRmb3JtLWJyb3dzZXIvc3JjL2RvbS9zaGFyZWRfc3R5bGVzX2hvc3QudHMKICAgICAqIEBzdXBwcmVzcyB7Y2hlY2tUeXBlcyxjb25zdGFudFByb3BlcnR5LGV4dHJhUmVxdWlyZSxtaXNzaW5nT3ZlcnJpZGUsbWlzc2luZ1JldHVybix1bnVzZWRQcml2YXRlTWVtYmVycyx1c2VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgY2xhc3MgU2hhcmVkU3R5bGVzSG9zdCB7CiAgICAgICAgY29uc3RydWN0b3IoKSB7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9zdHlsZXNTZXQgPSBuZXcgU2V0KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gc3R5bGVzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBhZGRTdHlsZXMoc3R5bGVzKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgYWRkaXRpb25zID0gbmV3IFNldCgpOwogICAgICAgICAgICBzdHlsZXMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gc3R5bGUKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHN0eWxlID0+IHsKICAgICAgICAgICAgICAgIGlmICghdGhpcy5fc3R5bGVzU2V0LmhhcyhzdHlsZSkpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9zdHlsZXNTZXQuYWRkKHN0eWxlKTsKICAgICAgICAgICAgICAgICAgICBhZGRpdGlvbnMuYWRkKHN0eWxlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB0aGlzLm9uU3R5bGVzQWRkZWQoYWRkaXRpb25zKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBhZGRpdGlvbnMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uU3R5bGVzQWRkZWQoYWRkaXRpb25zKSB7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldEFsbFN0eWxlcygpIHsKICAgICAgICAgICAgcmV0dXJuIEFycmF5LmZyb20odGhp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ICAgKi8KICAgICAgICAgICAgKHN0eWxlKSA9PiB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBzdHlsZUVsID0gdGhpcy5fZG9jLmNyZWF0ZUVsZW1lbnQoJ3N0eWxlJyk7CiAgICAgICAgICAgICAgICBzdHlsZUVsLnRleHRDb250ZW50ID0gc3R5bGU7CiAgICAgICAgICAgICAgICB0aGlzLl9zdHlsZU5vZGVzLmFkZChob3N0LmFwcGVuZENoaWxkKHN0eWxlRWwpKTsKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGhvc3ROb2RlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBhZGRIb3N0KGhvc3ROb2RlKSB7CiAgICAgICAgICAgIHRoaXMuX2FkZFN0eWxlc1RvSG9zdCh0aGlzLl9zdHlsZXNTZXQsIGhvc3ROb2RlKTsKICAgICAgICAgICAgdGhpcy5faG9zdE5vZGVzLmFkZChob3N0Tm9kZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gaG9zdE5vZGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlbW92ZUhvc3QoaG9zdE5vZGUpIHsKICAgICAgICAgICAgdGhpcy5faG9zdE5vZGVzLmRlbGV0ZShob3N0Tm9kZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gYWRkaXRpb25zCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvblN0eWxlc0FkZGVkKGFkZGl0aW9ucykgewogICAgICAgICAgICB0aGlzLl9ob3N0Tm9kZXMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gaG9zdE5vZGUKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGhvc3ROb2RlID0+IHRoaXMuX2FkZFN0eWxlc1RvSG9zdChhZGRpdGlvbnMsIGhvc3ROb2RlKSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25EZXN0cm95KCkgewogICAgICAgICAgICB0aGlzLl9zdHlsZU5vZGVzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHN0eWxlTm9kZQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgc3R5bGVOb2RlID0+IGdldERPTSgpLnJlbW92ZShzdHlsZU5vZGUpKSk7CiAgICAgICAgfQogICAgfQogICAgRG9tU2hhcmVkU3R5bGVzSG9zdC7JtWZhYyA9IGZ1bmN0aW9uIERvbVNoYXJlZFN0eWxlc0hvc3RfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgRG9tU2hhcmVkU3R5bGVzSG9zdCkoybXJtWluamVjdChET0NVTUVOVCQxKSk7IH07CiAgICBEb21TaGFyZWRTdHlsZXNIb3N0Lsm1cHJvdiA9IMm1ybVkZWZpbmVJbmplY3RhYmxlKHsgdG9rZW46IERvbVNoYXJlZFN0eWxlc0hvc3QsIGZhY3Rvcnk6IERvbVNoYXJlZFN0eWxlc0hvc3QuybVmYWMgfSk7CiAgICAvKiogQG5vY29sbGFwc2UgKi8KICAgIERvbVNoYXJlZFN0eWxlc0hvc3QuY3RvclBhcmFtZXRlcnMgPSAoKSA9PiBbCiAgICAgICAgeyB0eXBlOiB1bmRlZmluZWQsIGRlY29yYXRvcnM6IFt7IHR5cGU6IEluamVjdCwgYXJnczogW0RPQ1VNRU5UJDEsXSB9XSB9CiAgICBdOwoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogc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fQVRUUiA9IGBfbmdjb250ZW50LSR7Q09NUE9ORU5UX1ZBUklBQkxFfWA7CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gY29tcG9uZW50U2hvcnRJZAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gc2hpbUNvbnRlbnRBdHRyaWJ1dGUoY29tcG9uZW50U2hvcnRJZCkgewogICAgICAgIHJldHVybiBDT05URU5UX0FUVFIucmVwbGFjZShDT01QT05FTlRfUkVHRVgsIGNvbXBvbmVudFNob3J0SWQpOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IGNvbXBvbmVudFNob3J0SWQKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHNoaW1Ib3N0QXR0cmlidXRlKGNvbXBvbmVudFNob3J0SWQpIHsKICAgICAgICByZXR1cm4gSE9TVF9BVFRSLnJlcGxhY2UoQ09NUE9ORU5UX1JFR0VYLCBjb21wb25lbnRTaG9ydElkKTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBjb21wSWQKICAgICAqIEBwYXJhbSB7P30gc3R5bGVzCiAgICAgKiBAcGFyYW0gez99IHRhcmdldAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZmxhdHRlblN0eWxlcyhjb21wSWQsIHN0eWxlcywgdGFyZ2V0KSB7CiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBzdHlsZXMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgc3R5bGUgPSBzdHlsZXNbaV07CiAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KHN0eWxlKSkgewogICAgICAgICAgICAgICAgZmxhdHRlblN0eWxlcyhjb21wSWQsIHN0eWxlLCB0YXJnZXQpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgc3R5b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IEBwYXJhbSB7P30gYXBwSWQKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihldmVudE1hbmFnZXIsIHNoYXJlZFN0eWxlc0hvc3QsIGFwcElkKSB7CiAgICAgICAgICAgIHRoaXMuZXZlbnRNYW5hZ2VyID0gZXZlbnRNYW5hZ2VyOwogICAgICAgICAgICB0aGlzLnNoYXJlZFN0eWxlc0hvc3QgPSBzaGFyZWRTdHlsZXNIb3N0OwogICAgICAgICAgICB0aGlzLmFwcElkID0gYXBwSWQ7CiAgICAgICAgICAgIHRoaXMucmVuZGVyZXJCeUNvbXBJZCA9IG5ldyBNYXAoKTsKICAgICAgICAgICAgdGhpcy5kZWZhdWx0UmVuZGVyZXIgPSBuZXcgRGVmYXVsdERvbVJlbmRlcmVyMihldmVudE1hbmFnZXIpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgKiBAcGFyYW0gez99IHR5cGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGNyZWF0ZVJlbmRlcmVyKGVsZW1lbnQsIHR5cGUpIHsKICAgICAgICAgICAgaWYgKCFlbGVtZW50IHx8ICF0eXBlKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5kZWZhdWx0UmVuZGVyZXI7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgc3dpdGNoICh0eXBlLmVuY2Fwc3VsYXRpb24pIHsKICAgICAgICAgICAgICAgIGNhc2UgVmlld0VuY2Fwc3VsYXRpb24kMS5FbXVsYXRlZDogewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBsZXQgcmVuZGVyZXIgPSB0aGlzLnJlbmRlcmVyQnlDb21wSWQuZ2V0KHR5cGUuaWQpOwogICAgICAgICAgICAgICAgICAgIGlmICghcmVuZGVyZXIpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmVuZGVyZXIgPSBuZXcgRW11bGF0ZWRFbmNhcHN1bGF0aW9uRG9tUmVuZGVyZXIyKHRoaXMuZXZlbnRNYW5hZ2VyLCB0aGlzLnNoYXJlZFN0eWxlc0hvc3QsIHR5cGUsIHRoaXMuYXBwSWQpOwogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnJlbmRlcmVyQnlDb21wSWQuc2V0KHR5cGUuaWQsIHJlbmRlcmVyKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgKCgvKiogQHR5cGUgez99ICovIChyZW5kZXJlcikpKS5hcHBseVRvSG9zdChlbGVtZW50KTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVuZGVyZXI7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjYXNlIFZpZXdFbmNhcHN1bGF0aW9uJDEuTmF0aXZlOgogICAgICAgICAgICAgICAgY2FzZSBWaWV3RW5jYXBzdWxhdGlvbiQxLlNoYWRvd0RvbToKICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IFNoYWRvd0RvbVJlbmRlcmVyKHRoaXMuZXZlbnRNYW5hZ2VyLCB0aGlzLnNoYXJlZFN0eWxlc0hvc3QsIGVsZW1lbnQsIHR5cGUpOwogICAgICAgICAgICAgICAgZGVmYXVsdDogewogICAgICAgICAgICAgICAgICAgIGlmICghdGhpcy5yZW5kZXJlckJ5Q29tcElkLmhhcyh0eXBlLmlkKSkgewogICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHN0eWxlcyA9IGZsYXR0ZW5TdHlsZXModHlwZS5pZCwgdHlwZS5zdHlsZXMsIFtdKTsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zaGFyZWRTdHlsZXNIb3N0LmFkZFN0eWxlcyhzdHlsZXMpOwogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnJlbmRlcmVyQnlDb21wS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BEZWZhdWx0RG9tUmVuZGVyZXIyIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50TWFuYWdlcgogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKGV2ZW50TWFuYWdlcikgewogICAgICAgICAgICB0aGlzLmV2ZW50TWFuYWdlciA9IGV2ZW50TWFuYWdlcjsKICAgICAgICAgICAgdGhpcy5kYXRhID0gT2JqZWN0LmNyZWF0ZShudWxsKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkZXN0cm95KCkgeyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBuYW1lCiAgICAgICAgICogQHBhcmFtIHs/PX0gbmFtZXNwYWNlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBjcmVhdGVFbGVtZW50KG5hbWUsIG5hbWVzcGFjZSkgewogICAgICAgICAgICBpZiAobmFtZXNwYWNlKSB7CiAgICAgICAgICAgICAgICAvLyBJbiBjYXNlcyB3aGVyZSBJdnkgKG5vdCBWaWV3RW5naW5lKSBpcyBnaXZpbmcgdXMgdGhlIGFjdHVhbCBuYW1lc3BhY2UsIHRoZSBsb29rIHVwIGJ5IGtleQogICAgICAgICAgICAgICAgLy8gd2lsbCByZXN1bHQgaW4gdW5kZWZpbmVkLCBzbyB3ZSBqdXN0IHJldHVybiB0aGUgbmFtZXNwYWNlIGhlcmUuCiAgICAgICAgICAgICAgICByZXR1cm4gZG9jdW1lbnQuY3JlYXRlRWxlbWVudE5TKE5BTUVTUEFDRV9VUklTW25hbWVzcGFjZV0gfHwgbmFtZXNwYWNlLCBuYW1lKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChuYW1lKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgY3JlYXRlQ29tbWVudCh2YWx1ZSkgewogICAgICAgICAgICByZXR1cm4gZG9jdW1lbnQuY3JlYXRlQ29tbWVudCh2YWx1ZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGNyZWF0ZVRleHQodmFsdWUpIHsKICAgICAgICAgICAgcmV0dXJuIGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKHZhbHVlKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBwYXJlbnQKICAgICAgICAgKiBAcGFyYW0gez99IG5ld0NoaWxkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBhcHBlbmRDaGlsZChwYXJlbnQsIG5ld0NoaWxkKSB7CiAgICAgICAgICAgIHBhcmVudC5hcHBlbmRDaGlsZChuZXdDaGlsZCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gcGFyZW50CiAgICAgICAgICogQHBhcmFtIHs/fSBuZXdDaGlsZAogICAgICAgICAqIEBwYXJhbSB7P30gcmVmQ2hpbGQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGluc2VydEJlZm9yZShwYXJlbnQsIG5ld0NoaWxkLCByZWZDaGlsZCkgewogICAgICAgICAgICBpZiAocGFyZW50KSB7CiAgICAgICAgICAgICAgICBwYXJlbnQuaW5zZXJ0QmVmb3JlKG5ld0NoaWxkLCByZWZDaGlsZCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBwYXJlbnQKICAgICAgICAgKiBAcGFyYW0gez99IG9sZENoaWxkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZW1vdmVDaGlsZChwYXJlbnQsIG9sZENoaWxkKSB7CiAgICAgICAgICAgIGlmIChwYXJlbnQpIHsKICAgICAgICAgICAgICAgIHBhcmVudC5yZW1vdmVDaGlsZChvbGRDaGlsZCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBzZWxlY3Rvck9yTm9kZQogICAgICAgICAqIEBwYXJhbSB7Pz19IHByZXNlcnZlQ29udGVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2VsZWN0Um9vdEVsZW1lbnQoc2VsZWN0b3JPck5vZGUsIHByZXNlcnZlQ29udGVudCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBlbCA9IHR5cGVvZiBzZWxlY3Rvck9yTm9kZSA9PT0gJ3N0cmluZycgPyBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKHNlbGVjdG9yT3JOb2RlKSA6CiAgICAgICAgICAgICAgICBzZWxlY3Rvck9yTm9kZTsKICAgICAgICAgICAgaWYgKCFlbCkgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBUaGUgc2VsZWN0b3IgIiR7c2VsZWN0b3JPck5vZGV9IiBkaWQgbm90IG1hdGNoIGFueSBlbGVtZW50c2ApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICghcHJlc2VydmVDb250ZW50KSB7CiAgICAgICAgICAgICAgICBlbC50ZXh0Q29udGVudCA9ICcnOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBlbDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBub2RlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBwYXJlbnROb2RlKG5vZGUpIHsKICAgICAgICAgICAgcmV0dXJuIG5vZGUucGFyZW50Tm9kZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBub2RlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZXh0U2libGluZyhub2RlKSB7CiAgICAgICAgICAgIHJldHVybiBub2RlLm5leHRTaWJsaW5nOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsCiAgICAgICAgICogQHBhcmFtIHs/fSBuYW1lCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEBwYXJhbSB7Pz19IG5hbWVzcGFjZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0QXR0cmlidXRlKGVsLCBuYW1lLCB2YWx1ZSwgbmFtZXNwYWNlKSB7CiAgICAgICAgICAgIGlmIChuYW1lc3BhY2UpIHsKICAgICAgICAgICAgICAgIG5hbWUgPSBuYW1lc3BhY2UgKyAnOicgKyBuYW1lOwogICAgICAgICAgICAgICAgLy8gVE9ETyhGVy04MTEpOiBJdnkgbWF5IGNhdXNlIGlzc3VlcyBoZXJlIGJlY2F1c2UgaXQncyBwYXNzaW5nIGFyb3VuZAogICAgICAgICAgICAgICAgLy8gZnVsbCBVUklzIGZvciBuYW1lc3BhY2VzLCB0aGVyZWZvcmUgdGhpcyBsb29rdXAgd2lsbCBmYWlsLgogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgbmFtZXNwYWNlVXJpID0gTkFNRVNQQUNFX1VSSVNbbmFtZXNwYWNlXTsKICAgICAgICAgICAgICAgIGlmIChuYW1lc3BhY2VVcmkpIHsKICAgICAgICAgICAgICAgICAgICBlbC5zZXRBdHRyaWJ1dGVOUyhuYW1lc3BhY2VVcmksIG5hbWUsIHZhbHVlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIGVsLnNldEF0dHJpYnV0ZShuYW1lLCB2YWx1ZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBlbC5zZXRBdHRyaWJ1dGUobmFtZSwgdmFsdWUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZWwKICAgICAgICAgKiBAcGFyYW0gez99IG5hbWUKICAgICAgICAgKiBAcGFyYW0gez89fSBuYW1lc3BhY2UKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlbW92ZUF0dHJpYnV0ZShlbCwgbmFtZSwgbmFtZXNwYWNlKSB7CiAgICAgICAgICAgIGlmIChuYW1lc3BhY2UpIHsKICAgICAgICAgICAgICAgIC8vIFRPRE8oRlctODExKTogSXZ5IG1heSBjYXVzZSBpc3N1ZXMgaGVyZSBiZWNhdXNlIGl0J3MgcGFzc2luZyBhcm91bmQKICAgICAgICAgICAgICAgIC8vIGZ1bGwgVVJJcyBmb3IgbmFtZXNwYWNlcywgdGhlcmVmb3JlIHRoaXMgbG9va3VwIHdpbGwgZmFpbC4KICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IG5hbWVzcGFjZVVyaSA9IE5BTUVTUEFDRV9VUklTW25hbWVzcGFjZV07CiAgICAgICAgICAgICAgICBpZiAobmFtZXNwYWNlVXJpKSB7CiAgICAgICAgICAgICAgICAgICAgZWwucmVtb3ZlQXR0cmlidXRlTlMobmFtZXNwYWNlVXJpLCBuYW1lKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIC8vIFRPRE8oRlctODExKTogU2luY2UgaXZ5IGlzIHBhc3NpbmcgYXJvdW5kIGZ1bGwgVVJJcyBmb3IgbmFtZXNwYWNlcwogICAgICAgICAgICAgICAgICAgIC8vIHRoaXMgY291bGQgcmVzdWx0IGluIHByb3BlcnRpZXMgbGlrZSBgaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmc6Y3g9IjEyMyJgLAogICAgICAgICAgICAgICAgICAgIC8vIHdoaWNoIGlzIHdyb25nLgogICAgICAgICAgICAgICAgICAgIGVsLnJlbW92ZUF0dHJpYnV0ZShgJHtuYW1lc3BhY2V9OiR7bmFtZX1gKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIGVsLnJlbW92ZUF0dHJpYnV0ZShuYW1lKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsCiAgICAgICAgICogQHBhcmFtIHs/fSBuYW1lCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBhZGRDbGFzcyhlbCwgbmFtZSkgewogICAgICAgICAgICBlbC5jbGFzc0xpc3QuYWRkKG5hbWUpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsCiAgICAgICAgICogQHBhcmFtIHs/fSBuYW1lCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZW1vdmVDbGFzcyhlbCwgbmFtZSkgewogICAgICAgICAgICBlbC5jbGFzc0xpc3QucmVtb3ZlKG5hbWUpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsCiAgICAgICAgICogQHBhcmFtIHs/fSBzdHlsZQogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcGFyYW0gez99IGZsYWdzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXRTdHlsZShlbCwgc3R5bGUsIHZhbHVlLCBmbGFncykgewogICAgICAgICAgICBpZiAoZmxhZ3MgJiBSZW5kZXJlclN0eWxlRmxhZ3MyLkRhc2hDYXNlKSB7CiAgICAgICAgICAgICAgICBlbC5zdHlsZS5zZXRQcm9wZXJ0eShzdHlsZSwgdmFsdWUsICEhKGZsYWdzICYgUmVuZGVyZXJTdHlsZUZsYWdzMi5JbXBvcnRhbnQpID8gJ2ltcG9ydGFudCcgOiAnJyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBlbC5zdHlsZVtzdHlsZV0gPSB2YWx1ZTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsCiAgICAgICAgICogQHBhcmFtIHs/fSBzdHlsZQogICAgICAgICAqIEBwYXJhbSB7P30gZmxhZ3MKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlbW92ZVN0eWxlKGVsLCBzdHlsZSwgZmxhZ3MpIHsKICAgICAgICAgICAgaWYgKGZsYWdzICYgUmVuZGVyZXJTdHlsZUZsYWdzMi5EYXNoQ2FzZSkgewogICAgICAgICAgICAgICAgZWwuc3R5bGUucmVtb3ZlUHJvcGVydHkoc3R5bGUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgLy8gSUUgcmVxdWlyZXMgJycgaW5zdGVhZCBvZiBudWxsCiAgICAgICAgICAgICAgICAvLyBzZWUgaHR0cHM6Ly9naXRodWIuY29tL2FuZ3VsYXIvYW5ndWxhci9pc3N1ZXMvNzkxNgogICAgICAgICAgICAgICAgZWwuc3R5bGVbc3R5bGVdID0gJyc7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBlbAogICAgICAgICAqIEBwYXJhbSB7P30gbmFtZQogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldFByb3BlcnR5KGVsLCBuYW1lLCB2YWx1ZSkgewogICAgICAgICAgICBOR19ERVZfTU9ERSQxICYmIGNoZWNrTm9TeW50aGV0aWNQcm9wKG5hbWUsICdwcm9wZXJ0eScpOwogICAgICAgICAgICBlbFtuYW1lXSA9IHZhbHVlOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IG5vZGUKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXRWYWx1ZShub2RlLCB2YWx1ZSkgewogICAgICAgICAgICBub2RlLm5vZGVWYWx1ZSA9IHZhbHVlOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHRhcmdldAogICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQKICAgICAgICAgKiBAcGFyYW0gez99IGNhbGxiYWNrCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBsaXN0ZW4odGFyZ2V0LCBldmVudCwgY2FsbGJhY2spIHsKICAgICAgICAgICAgTkdfREVWX01PREUkMSAmJiBjaGVja05vU3ludGhldGljUHJvcChldmVudCwgJ2xpc3RlbmVyJyk7CiAgICAgICAgICAgIGlmICh0eXBlb2YgdGFyZ2V0ID09PSAnc3RyaW5nJykgewogICAgICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovICh0aGlzLmV2ZW50TWFuYWdlci5hZGRHbG9iYWxFdmVudExpc3RlbmVyKHRhcmdldCwgZXZlbnQsIGRlY29yYXRlUHJldmVudERlZmF1bHQoY2FsbGJhY2spKSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuZXZlbnRNYW5hZ2VyLmFkZEV2ZW50TGlzdGVuZXIodGFyZ2V0LCBldmVudCwgZGVjb3JhdGVQcmV2ZW50RGVmYXVsdChjYWxsYmFjaykpKSkpKTsKICAgICAgICB9CiAgICB9CiAgICBjb25zdCDJtTAkMiQxID0gLyoqCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICAoKSA9PiAnQCcuY2hhckNvZGVBdCgwKTsKICAgIC8qKiBAdHlwZSB7P30gKi8KICAgIGNvbnN0IEFUX0NIQVJDT0RFID0gKCjJtTAkMiQxKSkoKTsKICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBuYW1lCiAgICAgKiBAcGFyYW0gez99IG5hbWVLaW5kCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBjaGVja05vU3ludGhldGljUHJvcChuYW1lLCBuYW1lS2luZCkgewogICAgICAgIGlmIChuYW1lLmNoYXJDb2RlQXQoMCkgPT09IEFUX0NIQVJDT0RFKSB7CiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgRm91bmQgdGhlIHN5bnRoZXRpYyAke25hbWVLaW5kfSAke25hbWV9LiBQbGVhc2UgaW5jbHVkZSBlaXRoZXIgIkJyb3dzZXJBbmltYXRpb25zTW9kdWxlIiBvciAiTm9vcEFuaW1hdGlvbnNNb2R1bGUiIGluIHlvdXIgYXBwbGljYXRpb24uYCk7CiAgICAgICAgfQogICAgfQogICAgY2xhc3MgRW11bGF0ZWRFbmNhcHN1bGF0aW9uRG9tUmVuZGVyZXIyIGV4dGVuZHMgRGVmYXVsdERvbVJlbmRlcmVyMiB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBldmVudE1hbmFnZXIKICAgICAgICAgKiBAcGFyYW0gez99IHNoYXJlZFN0eWxlc0hvc3QKICAgICAgICAgKiBAcGFyYW0gez99IGNvbXBvbmVudAogICAgICAgICAqIEBwYXJhbSB7P30gYXBwSWQKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihldmVudE1hbmFnZXIsIHNoYXJlZFN0eWxlc0hvc3QsIGNvbXBvbmVudCwgYXBwSWQpIHsKICAgICAgICAgICAgc3VwZXIoZXZlbnRNYW5hZ2VyKTsKICAgICAgICAgICAgdGhpcy5jb21wb25lbnQgPSBjb21wb25lbnQ7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc3R5bGVzID0gZmxhdHRlblN0eWxlcyhhcHBJZCArICctJyArIGNvbXBvbmVudC5pZCwgY29tcG9uZW50LnN0eWxlcywgW10pOwogICAgICAgICAgICBzaGFyZWRTdHlsZXNIb3N0LmFkZFN0eWxlcyhzdHlsZXMpOwogICAgICAgICAgICB0aGlzLmNvbnRlbnRBdHRyID0gc2hpbUNvbnRlbnRBdHRyaWJ1dGUoYXBwSWQgKyAnLScgKyBjb21wb25lbnQuaWQpOwogICAgICAgICAgICB0aGlzLmhvc3RBdHRyID0gc2hpbUhvc3RBdHRyaWJ1dGUoYXBwSWQgKyAnLScgKyBjb21wb25lbnQuaWQpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGFwcGx5VG9Ib3N0KGVsZW1lbnQpIHsKICAgICAgICAgICAgc3VwZXIuc2V0QXR0cmlidXRlKGVsZW1lbnQsIHRoaXMuaG9zdEF0dHIsICcnKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBwYXJlbnQKICAgICAgICAgKiBAcGFyYW0gez99IG5hbWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGNyZWF0ZUVsZW1lbnQocGFyZW50LCBuYW1lKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZWwgPSBzdXBlci5jcmVhdGVFbGVtZW50KHBhcmVudCwgbmFtZSk7CiAgICAgICAgICAgIHN1cGVyLnNldEF0dHJpYnV0ZShlbCwgdGhpcy5jb250ZW50QXR0ciwgJycpOwogICAgICAgICAgICByZXR1cm4gZWw7CiAgICAgICAgfQogICAgfQogICAgY2xhc3MgU2hhZG93RG9tUmVuZGVyZXIgZXh0ZW5kcyBEZWZhdWx0RG9tUmVuZGVyZXIyIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50TWFuYWdlcgogICAgICAgICAqIEBwYXJhbSB7P30gc2hhcmVkU3R5bGVzSG9zdAogICAgICAgICAqIEBwYXJhbSB7P30gaG9zdEVsCiAgICAgICAgICogQHBhcmFtIHs/fSBjb21wb25lbnQKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihldmVudE1hbmFnZXIsIHNoYXJlZFN0eWxlc0hvc3QsIGhvc3RFbCwgY29tcG9uZW50KSB7CiAgICAgICAgICAgIHN1cGVyKGV2ZW50TWFuYWdlcik7CiAgICAgICAgICAgIHRoaXMuc2hhcmVkU3R5bGVzSG9zdCA9IHNoYXJlZFN0eWxlc0hvc3Q7CiAgICAgICAgICAgIHRoaXMuaG9zdEVsID0gaG9zdEVsOwogICAgICAgICAgICB0aGlzLmNvbXBvbmVudCA9IGNvbXBvbmVudDsKICAgICAgICAgICAgaWYgKGNvbXBvbmVudC5lbmNhcHN1bGF0aW9uID09PSBWaWV3RW5jYXBzdWxhdGlvbiQxLlNoYWRvd0RvbSkgewogICAgICAgICAgICAgICAgdGhpcy5zaGFkb3dSb290ID0gKCgvKiogQHR5cGUgez99ICovIChob3N0RWwpKSkuYXR0YWNoU2hhZG93KHsgbW9kZTogJ29wZW4nIH0pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5zaGFkb3dSb290ID0gKCgvKiogQHR5cGUgez99ICovIChob3N0RWwpKSkuY3JlYXRlU2hhZG93Um9vdCgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuc2hhcmVkU3R5bGVzSG9zdC5hZGRIb3N0KHRoaXMuc2hhZG93Um9vdCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc3R5bGVzID0gZmxhdHRlblN0eWxlcyhjb21wb25lbnQuaWQsIGNvbXBvbmVudC5zdHlsZXMsIFtdKTsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBzdHlsZXMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHN0eWxlRWwgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdzdHlsZScpOwogICAgICAgICAgICAgICAgc3R5bGVFbC50ZXh0Q29udGVudCA9IHN0eWxlc1tpXTsKICAgICAgICAgICAgICAgIHRoaXMuc2hhZG93Um9vdC5hcHBlbmRDaGlsZChzdHlsZUVsKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gbm9kZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbm9kZU9yU2hhZG93Um9vdChub2RlKSB7CiAgICAgICAgICAgIHJldHVybiBub2RlID09PSB0aGlzLmhvc3RFbCA/IHRoaXMuc2hhZG93Um9vdCA6IG5vZGU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZGVzdHJveSgpIHsKICAgICAgICAgICAgdGhpcy5zaGFyZWRTdHlsZXNIb3N0LnJlbW92ZUhvc3QodGhpcy5zaGFkb3dSb290KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBwYXJlbnQKICAgICAgICAgKiBAcGFyYW0gez99IG5ld0NoaWxkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBhcHBlbmRDaGlsZChwYXJlbnQsIG5ld0NoaWxkKSB7CiAgICAgICAgICAgIHJldHVybiBzdXBlci5hcHBlbmRDaGlsZCh0aGlzLm5vZGVPclNoYWRvd1Jvb3QocGFyZW50KSwgbmV3Q2hpbGQpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHBhcmVudAogICAgICAgICAqIEBwYXJhbSB7P30gbmV3Q2hpbGQKICAgICAgICAgKiBAcGFyYW0gez99IHJlZkNoaWxkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBpbnNlcnRCZWZvcmUocGFyZW50LCBuZXdDaGlsZCwgcmVmQ2hpbGQpIHsKICAgICAgICAgICAgcmV0dXJuIHN1cGVyLmluc2VydEJlZm9yZSh0aGlzLm5vZGVPclNoYWRvd1Jvb3QocGFyZW50KSwgbmV3Q2hpbGQsIHJlZkNoaWxkKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBwYXJlbnQKICAgICAgICAgKiBAcGFyYW0gez99IG9sZENoaWxkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZW1vdmVDaGlsZChwYXJlbnQsIG9sZENoaWxkKSB7CiAgICAgICAgICAgIHJldHVybiBzdXBlci5yZW1vdmVDaGlsZCh0aGlzLm5vZGVPclNoYWRvd1Jvb3QocGFyZW50KSwgb2xkQ2hpbGQpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IG5vZGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHBhcmVudE5vZGUobm9kZSkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5ub2RlT3JTaGFkb3dSb290KHN1cGVyLnBhcmVudE5vZGUodGhpcy5ub2RlT3JTaGFkb3dSb290KG5vZGUpKSk7CiAgICAgICAgfQogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlld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GFuZGxlcikgewogICAgICAgICAgICBlbGVtZW50LmFkZEV2ZW50TGlzdGVuZXIoZXZlbnROYW1lLCAoLyoqIEB0eXBlIHs/fSAqLyAoaGFuZGxlcikpLCBmYWxzZSk7CiAgICAgICAgICAgIHJldHVybiAoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB0aGlzLnJlbW92ZUV2ZW50TGlzdGVuZXIoZWxlbWVudCwgZXZlbnROYW1lLCAoLyoqIEB0eXBlIHs/fSAqLyAoaGFuZGxlcikpKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdGFyZ2V0CiAgICAgICAgICogQHBhcmFtIHs/fSBldmVudE5hbWUKICAgICAgICAgKiBAcGFyYW0gez99IGNhbGxiYWNrCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZW1vdmVFdmVudExpc3RlbmVyKHRhcmdldCwgZXZlbnROYW1lLCBjYWxsYmFjaykgewogICAgICAgICAgICByZXR1cm4gdGFyZ2V0LnJlbW92ZUV2ZW50TGlzdGVuZXIoZXZlbnROYW1lLCAoLyoqIEB0eXBlIHs/fSAqLyAoY2FsbGJhY2spKSk7CiAgICAgICAgfQogICAgfQogICAgRG9tRXZlbnRzUGx1Z2luLsm1ZmFjID0gZnVuY3Rpb24gRG9tRXZlbnRzUGx1Z2luX0ZhY3RvcnkodCkgeyByZXR1cm4gbmV3ICh0IHx8IERvbUV2ZW50c1BsdWdpbikoybXJtWluamVjdChET0NVTUVOVCQxKSk7IH07CiAgICBEb21FdmVudHNQbHVnaW4uybVwcm92ID0gybXJtWRlZmluZUluamVjdGFibGUoeyB0b2tlbjogRG9tRXZlbnRzUGx1Z2luLCBmYWN0b3J5OiBEb21FdmVudHNQbHVnaW4uybVmYWMgfSk7CiAgICAvKiogQG5vY29sbGFwc2UgKi8KICAgIERvbUV2ZW50c1BsdWdpbi5j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VjaWZpYyBwcm9wZXJ0aWVzLgogICAgICAgICAgICAgKgogICAgICAgICAgICAgKiBUaGUga2V5IGlzIGEgc3VwcG9ydGVkIGV2ZW50IG5hbWUgdG8gYmUgY29uZmlndXJlZCwKICAgICAgICAgICAgICogYW5kIHRoZSBvcHRpb25zIG9iamVjdCBjb250YWlucyBhIHNldCBvZiBwcm9wZXJ0aWVzLCB3aXRoIG92ZXJyaWRlIHZhbHVlcwogICAgICAgICAgICAgKiB0byBiZSBhcHBsaWVkIHRvIHRoZSBuYW1lZCByZWNvZ25pemVyIGV2ZW50LgogICAgICAgICAgICAgKiBGb3IgZXhhbXBsZSwgdG8gZGlzYWJsZSByZWNvZ25pdGlvbiBvZiB0aGUgcm90YXRlIGV2ZW50LCBzcGVjaWZ5CiAgICAgICAgICAgICAqICBgeyJyb3RhdGUiOiB7ImVuYWJsZSI6IGZhbHNlfX1gLgogICAgICAgICAgICAgKgogICAgICAgICAgICAgKiBQcm9wZXJ0aWVzIHRoYXQgYXJlIG5vdCBwcmVzZW50IHRha2UgdGhlIEhhbW1lckpTIGRlZmF1bHQgdmFsdWVzLgogICAgICAgICAgICAgKiBGb3IgaW5mb3JtYXRpb24gYWJvdXQgd2hpY2ggcHJvcGVydGllcyBhcmUgc3VwcG9ydGVkIGZvciB3aGljaCBldmVudHMsCiAgICAgICAgICAgICAqIGFuZCB0aGVpciBhbGxvd2VkIGFuZCBkZWZhdWx0IHZhbHVlcywgc2VlCiAgICAgICAgICAgICAqIFtIYW1tZXJKUyBkb2N1bWVudGF0aW9uXShodHRwOi8vaGFtbWVyanMuZ2l0aHViLmlvLykuCiAgICAgICAgICAgICAqCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLm92ZXJyaWRlcyA9IHt9OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDcmVhdGVzIGEgW0hhbW1lckpTIE1hbmFnZXJdKGh0dHA6Ly9oYW1tZXJqcy5naXRodWIuaW8vYXBpLyNoYW1t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ZXJHZXN0dXJlQ29uZmlnLsm1ZmFjIH0pOwogICAgLyoqCiAgICAgKiBFdmVudCBwbHVnaW4gdGhhdCBhZGRzIEhhbW1lciBzdXBwb3J0IHRvIGFuIGFwcGxpY2F0aW9uLgogICAgICoKICAgICAqIFxAbmdNb2R1bGUgSGFtbWVyTW9kdWxlCiAgICAgKi8KICAgIGNsYXNzIEhhbW1lckdlc3R1cmVzUGx1Z2luIGV4dGVuZHMgRXZlbnRNYW5hZ2VyUGx1Z2luIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGRvYwogICAgICAgICAqIEBwYXJhbSB7P30gX2NvbmZpZwogICAgICAgICAqIEBwYXJhbSB7P30gY29uc29sZQogICAgICAgICAqIEBwYXJhbSB7Pz19IGxvYWRlcgogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKGRvYywgX2NvbmZpZywgY29uc29sZSwgbG9hZGVyKSB7CiAgICAgICAgICAgIHN1cGVyKGRvYyk7CiAgICAgICAgICAgIHRoaXMuX2NvbmZpZyA9IF9jb25maWc7CiAgICAgICAgICAgIHRoaXMuY29uc29sZSA9IGNvbnNvbGU7CiAgICAgICAgICAgIHRoaXMubG9hZGVyID0gbG9hZGVyOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50TmFtZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc3VwcG9ydHMoZXZlbnROYW1lKSB7CiAgICAgICAgICAgIGlmICghRVZFTlRfTkFNRVMuaGFzT3duUHJvcGVydHkoZXZlbnROYW1lLnRvTG93ZXJDYXNlKCkpICYmICF0aGlzLmlzQ3VzdG9tRXZlbnQoZXZlbnROYW1lKSkgewogICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICghKCgvKiogQHR5cGUgez99ICovICh3aW5kb3cpKSkuSGFtbWVyICYmICF0aGlzLmxvYWRlcikgewogICAgICAgICAgICAgICAgdGhpcy5jb25zb2xlLndhcm4oYFRoZSAiJHtldmVudE5hbWV9IiBldmVudCBjYW5ub3QgYmUgYm91bmQgYmVjYXVzZSBIYW1tZXIuSlMgaXMgbm90IGAgKwogICAgICAgICAgICAgICAgICAgIGBsb2FkZWQgYW5kIG5vIGN1c3RvbSBsb2FkZXIgaGFzIGJlZW4gc3BlY2lmaWVkLmApOwogICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50TmFtZQogICAgICAgICAqIEBwYXJhbSB7P30gaGFuZGxlcgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYWRkRXZlbnRMaXN0ZW5lcihlbGVtZW50LCBldmVudE5hbWUsIGhhbmRsZXIpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB6b25lID0gdGhpcy5tYW5hZ2VyLmdldFpvbmUoKTsKICAgICAgICAgICAgZXZlbnROYW1lID0gZXZlbnROYW1lLnRvTG93ZXJDYXNlKCk7CiAgICAgICAgICAgIC8vIElmIEhhbW1lciBpcyBub3QgcHJlc2VudCBidXQgYSBsb2FkZXIgaXMgc3BlY2lmaWVkLCB3ZSBkZWZlciBhZGRpbmcgdGhlIGV2ZW50IGxpc3RlbmVyCiAgICAgICAgICAgIC8vIHVudGlsIEhhbW1lciBpcyBsb2FkZWQuCiAgICAgICAgICAgIGlmICghKCgvKiogQHR5cGUgez99ICovICh3aW5kb3cpKSkuSGFtbWVyICYmIHRoaXMubG9hZGVyKSB7CiAgICAgICAgICAgICAgICAvLyBUaGlzIGBhZGRFdmVudExpc3RlbmVyYCBtZXRob2QgcmV0dXJucyBhIGZ1bmN0aW9uIHRvIHJlbW92ZSB0aGUgYWRkZWQgbGlzdGVuZXIuCiAgICAgICAgICAgICAgICAvLyBVbnRpbCBIYW1tZXIgaXMgbG9hZGVkLCB0aGUgcmV0dXJuZWQgZnVuY3Rpb24gbmVlZHMgdG8gKmNhbmNlbCogdGhlIHJlZ2lzdHJhdGlvbiByYXRoZXIKICAgICAgICAgICAgICAgIC8vIHRoYW4gcmVtb3ZlIGFueXRoaW5nLgogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IGNhbmNlbFJlZ2lzdHJhdGlvbiA9IGZhbHNlOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IGRlcmVnaXN0ZXIgPSAoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgY2FuY2VsUmVnaXN0cmF0aW9uID0gdHJ1ZTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgdGhpcy5sb2FkZXIoKQogICAgICAgICAgICAgICAgICAgIC50aGVuKCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgICAgICAvLyBJZiBIYW1tZXIgaXNuJ3QgYWN0dWFsbHkgbG9hZGVkIHdoZW4gdGhlIGN1c3RvbSBsb2FkZXIgcmVzb2x2ZXMsIGdpdmUgdXAuCiAgICAgICAgICAgICAgICAgICAgaWYgKCEoKC8qKiBAdHlwZSB7P30gKi8gKHdpbmRvdykpKS5IYW1tZXIpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jb25zb2xlLndhcm4oYFRoZSBjdXN0b20gSEFNTUVSX0xPQURFUiBjb21wbGV0ZWQsIGJ1dCBIYW1tZXIuSlMgaXMgbm90IHByZXNlbnQuYCk7CiAgICAgICAgICAgICAgICAgICAgICAgIGRlcmVnaXN0ZXIgPSAoLyoqCiAgICAgICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICAgICAoKSA9PiB7IH0pOwogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGlmICghY2FuY2VsUmVnaXN0cmF0aW9uKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIE5vdyB0aGF0IEhhbW1lciBpcyBsb2FkZWQgYW5kIHRoZSBsaXN0ZW5lciBpcyBiZWluZyBsb2FkZWQgZm9yIHJlYWwsCiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHRoZSBkZXJlZ2lzdHJhdGlvbiBmdW5jdGlvbiBjaGFuZ2VzIGZyb20gY2FuY2VsaW5nIHJlZ2lzdHJhdGlvbiB0byByZW1vdmFsLgogICAgICAgICAgICAgICAgICAgICAgICBkZXJlZ2lzdGVyID0gdGhpcy5hZGRFdmVudExpc3RlbmVyKGVsZW1lbnQsIGV2ZW50TmFtZSwgaGFuZGxlcik7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSkpCiAgICAgICAgICAgICAgICAgICAgLmNhdGNoKCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgICAgICB0aGlzLmNvbnNvbGUud2FybihgVGhlICIke2V2ZW50TmFtZX0iIGV2ZW50IGNhbm5vdCBiZSBib3VuZCBiZWNhdXNlIHRoZSBjdXN0b20gYCArCiAgICAgICAgICAgICAgICAgICAgICAgIGBIYW1tZXIuSlMgbG9hZGVyIGZhaWxlZC5gKTsKICAgICAgICAgICAgICAgICAgICBkZXJlZ2lzdGVyID0gKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKCkgPT4geyB9KTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgIC8vIFJldHVybiBhIGZ1bmN0aW9uIHRoYXQgKmV4ZWN1dGVzKiBgZGVyZWdpc3RlcmAgKGFuZCBub3QgYGRlcmVnaXN0ZXJgIGl0c2VsZikgc28gdGhhdCB3ZQogICAgICAgICAgICAgICAgLy8gY2FuIGNoYW5nZSB0aGUgYmVoYXZpb3Igb2YgYGRlcmVnaXN0ZXJgIG9uY2UgdGhlIGxpc3RlbmVyIGlzIGFkZGVkLiBVc2luZyBhIGNsb3N1cmUgaW4KICAgICAgICAgICAgICAgIC8vIHRoaXMgd2F5IGFsbG93cyB1cyB0byBhdm9pZCBhbnkgYWRkaXRpb25hbCBkYXRhIHN0cnVjdHVyZXMgdG8gdHJhY2sgbGlzdGVuZXIgcmVtb3ZhbC4KICAgICAgICAgICAgICAgIHJldHVybiAoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgZGVyZWdpc3RlcigpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHpvbmUucnVuT3V0c2lkZUFuZ3VsYXIoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgLy8gQ3JlYXRpbmcgdGhlIG1hbmFnZXIgYmluZCBldmVudHMsIG11c3QgYmUgZG9uZSBvdXRzaWRlIG9mIGFuZ3VsYXIKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IG1jID0gdGhpcy5fY29uZmlnLmJ1aWxkSGFtbWVyKGVsZW1lbnQpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgY2FsbGJhY2sgPSAoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50T2JqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBmdW5jdGlvbiAoZXZlbnRPYmopIHsKICAgICAgICAgICAgICAgICAgICB6b25lLnJ1bkd1YXJkZWQoKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgICAgICAgICBoYW5kbGVyKGV2ZW50T2JqKTsKICAgICAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIG1jLm9uKGV2ZW50TmFtZSwgY2FsbGJhY2spOwogICAgICAgICAgICAgICAgcmV0dXJuICgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgICAgICBtYy5vZmYoZXZlbnROYW1lLCBjYWxsYmFjayk7CiAgICAgICAgICAgICAgICAgICAgLy8gZGVzdHJveSBtYyB0byBwcmV2ZW50IG1lbW9yeSBsZWFrCiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBtYy5kZXN0cm95ID09PSAnZnVuY3Rpb24nKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG1jLmRlc3Ryb3koKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGF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lJywKICAgICAgICAnRGVsJzogJ0RlbGV0ZScsCiAgICAgICAgJ0VzYyc6ICdFc2NhcGUnLAogICAgICAgICdMZWZ0JzogJ0Fycm93TGVmdCcsCiAgICAgICAgJ1JpZ2h0JzogJ0Fycm93UmlnaHQnLAogICAgICAgICdVcCc6ICdBcnJvd1VwJywKICAgICAgICAnRG93bic6ICdBcnJvd0Rvd24nLAogICAgICAgICdNZW51JzogJ0NvbnRleHRNZW51JywKICAgICAgICAnU2Nyb2xsJzogJ1Njcm9sbExvY2snLAogICAgICAgICdXaW4nOiAnT1MnCiAgICB9OwogICAgLy8gVGhlcmUgaXMgYSBidWcgaW4gQ2hyb21lIGZvciBudW1lcmljIGtleXBhZCBrZXlzOgogICAgLy8gaHR0cHM6Ly9jb2RlLmdvb2dsZS5jb20vcC9jaHJvbWl1bS9pc3N1ZXMvZGV0YWlsP2lkPTE1NTY1NAogICAgLy8gMSwgMiwgMyAuLi4gYXJlIHJlcG9ydGVkIGFzIEEsIEIsIEMgLi4uCiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBfY2hyb21lTnVtS2V5UGFkTWFwID0gewogICAgICAgICdBJzogJzEnLAogICAgICAgICdCJzogJzInLAogICAgICAgICdDJzogJzMnLAogICAgICAgICdEJzogJzQnLAogICAgICAgICdFJzogJzUnLAogICAgICAgICdGJzogJzYnLAogICAgICAgICdHJzogJzcnLAogICAgICAgICdIJzogJzgnLAogICAgICAgICdJJzogJzknLAogICAgICAgICdKJzogJyonLAogICAgICAgICdLJzogJysnLAogICAgICAgICdNJzogJy0nLAogICAgICAgICdOJzogJy4nLAogICAgICAgICdPJzogJy8nLAogICAgICAgICdceDYwJzogJzAnLAogICAgICAgICdceDkwJzogJ051bUxvY2snCiAgICB9OwogICAgY29uc3QgybUwJDMkMSA9IC8qKgogICAgICogQHBhcmFtIHs/fSBldmVudAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgKGV2ZW50KSA9PiBldmVudC5hbHRLZXksIMm1M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ICAgICovCiAgICAgICAgY29uc3RydWN0b3IoZG9jKSB7CiAgICAgICAgICAgIHN1cGVyKGRvYyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJlcG9ydHMgd2hldGhlciBhIG5hbWVkIGtleSBldmVudCBpcyBzdXBwb3J0ZWQuCiAgICAgICAgICogQHBhcmFtIHs/fSBldmVudE5hbWUgVGhlIGV2ZW50IG5hbWUgdG8gcXVlcnkuCiAgICAgICAgICogQHJldHVybiB7P30gVHJ1ZSBpZiB0aGUgbmFtZWQga2V5IGV2ZW50IGlzIHN1cHBvcnRlZC4KICAgICAgICAgKi8KICAgICAgICBzdXBwb3J0cyhldmVudE5hbWUpIHsKICAgICAgICAgICAgcmV0dXJuIEtleUV2ZW50c1BsdWdpbi5wYXJzZUV2ZW50TmFtZShldmVudE5hbWUpICE9IG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJlZ2lzdGVycyBhIGhhbmRsZXIgZm9yIGEgc3BlY2lmaWMgZWxlbWVudCBhbmQga2V5IGV2ZW50LgogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudCBUaGUgSFRNTCBlbGVtZW50IHRvIHJlY2VpdmUgZXZlbnQgbm90aWZpY2F0aW9ucy4KICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50TmFtZSBUaGUgbmFtZSBvZiB0aGUga2V5IGV2ZW50IHRvIGxpc3RlbiBmb3IuCiAgICAgICAgICogQHBhcmFtIHs/fSBoYW5kbGVyIEEgZnVuY3Rpb24gdG8gY2FsbCB3aGVuIHRoZSBub3RpZmljYXRpb24gb2NjdXJzLiBSZWNlaXZlcyB0aGUKICAgICAgICAgKiBldmVudCBvYmplY3QgYXMgYW4gYXJndW1lbnQuCiAgICAgICAgICogQHJldHVybiB7P30gVGhlIGtleSBldmVudCB0aGF0IHdhcyByZWdpc3RlcmVkLgogICAgICAgICAqLwogICAgICAgIGFkZEV2ZW50TGlzdGVuZXIoZWxlbWVudCwgZXZlbnROYW1lLCBoYW5kbGVyKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcGFyc2VkRXZlbnQgPSAoLyoqIEB0eXBlIHs/fSAqLyAoS2V5RXZlbnRzUGx1Z2luLnBhcnNlRXZlbnROYW1lKGV2ZW50TmFtZSkpKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBvdXRzaWRlSGFuZGxlciA9IEtleUV2ZW50c1BsdWdpbi5ldmVudENhbGxiYWNrKHBhcnNlZEV2ZW50WydmdWxsS2V5J10sIGhhbmRsZXIsIHRoaXMubWFuYWdlci5nZXRab25lKCkpOwogICAgICAgICAgICByZXR1cm4gdGhpcy5tYW5hZ2VyLmdldFpvbmUoKS5ydW5PdXRzaWRlQW5ndWxhcigoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gZ2V0RE9NKCkub25BbmRDYW5jZWwoZWxlbWVudCwgcGFyc2VkRXZlbnRbJ2RvbUV2ZW50TmFtZSddLCBvdXRzaWRlSGFuZGxlcik7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBldmVudE5hbWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHN0YXRpYyBwYXJzZUV2ZW50TmFtZShldmVudE5hbWUpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwYXJ0cyA9IGV2ZW50TmFtZS50b0xvd2VyQ2FzZSgpLnNwbGl0KCcuJyk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZG9tRXZlbnROYW1lID0gcGFydHMuc2hpZnQoKTsKICAgICAgICAgICAgaWYgKChwYXJ0cy5sZW5ndGggPT09IDApIHx8ICEoZG9tRXZlbnROYW1lID09PSAna2V5ZG93bicgfHwgZG9tRXZlbnROYW1lID09PSAna2V5dXAnKSkgewogICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBrZXkgPSBLZXlFdmVudHNQbHVnaW4uX25vcm1hbGl6ZUtleSgoLyoqIEB0eXBlIHs/fSAqLyAocGFydHMucG9wKCkpKSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGZ1bGxLZXkgPSAnJzsKICAgICAgICAgICAgTU9ESUZJRVJfS0VZUy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBtb2RpZmllck5hbWUKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIG1vZGlmaWVyTmFtZSA9PiB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBpbmRleCA9IHBhcnRzLmluZGV4T2YobW9kaWZpZXJOYW1lKTsKICAgICAgICAgICAgICAgIGlmIChpbmRleCA+IC0xKSB7CiAgICAgICAgICAgICAgICAgICAgcGFydHMuc3BsaWNlKGluZGV4LCAxKTsKICAgICAgICAgICAgICAgICAgICBmdWxsS2V5ICs9IG1vZGlmaWVyTmFtZSArICcuJzsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSkpOwogICAgICAgICAgICBmdWxsS2V5ICs9IGtleTsKICAgICAgICAgICAgaWYgKHBhcnRzLmxlbmd0aCAhPSAwIHx8IGtleS5sZW5ndGggPT09IDApIHsKICAgICAgICAgICAgICAgIC8vIHJldHVybmluZyBudWxsIGluc3RlYWQgb2YgdGhyb3dpbmcgdG8gbGV0IGFub3RoZXIgcGx1Z2luIHByb2Nlc3MgdGhlIGV2ZW50CiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHJlc3VsdCA9IHt9OwogICAgICAgICAgICByZXN1bHRbJ2RvbUV2ZW50TmFtZSddID0gZG9tRXZlbnROYW1lOwogICAgICAgICAgICByZXN1bHRbJ2Z1bGxLZXknXSA9IGZ1bGxLZXk7CiAgICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHN0YXRpYyBnZXRFdmVudEZ1bGxLZXkoZXZlbnQpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgZnVsbEtleSA9ICcnOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBrZXkgPSBnZXRFdmVudEtleShldmVudCk7CiAgICAgICAgICAgIGtleSA9IGtleS50b0xvd2VyQ2FzZSgpOwogICAgICAgICAgICBpZiAoa2V5ID09PSAnICcpIHsKICAgICAgICAgICAgICAgIGtleSA9ICdzcGFjZSc7IC8vIGZvciByZWFkYWJpbGl0eQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKGtleSA9PT0gJy4nKSB7CiAgICAgICAgICAgICAgICBrZXkgPSAnZG90JzsgLy8gYmVjYXVzZSAnLicgaXMgdXNlZCBhcyBhIHNlcGFyYXRvciBpbiBldmVudCBuYW1lcwogICAgICAgICAgICB9CiAgICAgICAgICAgIE1PRElGSUVSX0tFWVMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbW9kaWZpZXJOYW1lCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBtb2RpZmllck5hbWUgPT4gewogICAgICAgICAgICAgICAgaWYgKG1vZGlmaWVyTmFtZSAhPSBrZXkpIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgbW9kaWZpZXJHZXR0ZXIgPSBNT0RJRklFUl9LRVlfR0VUVEVSU1ttb2RpZmllck5hbWVdOwogICAgICAgICAgICAgICAgICAgIGlmIChtb2RpZmllckdldHRlcihldmVudCkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgZnVsbEtleSArPSBtb2RpZmllck5hbWUgKyAnLic7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIGZ1bGxLZXkgKz0ga2V5OwogICAgICAgICAgICByZXR1cm4gZnVsbEtleTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ29uZmlndXJlcyBhIGhhbmRsZXIgY2FsbGJhY2sgZm9yIGEga2V5IGV2ZW50LgogICAgICAgICAqIEBwYXJhbSB7P30gZnVsbEtleSBUaGUgZXZlbnQgbmFtZSB0aGF0IGNvbWJpbmVzIGFsbCBzaW11bHRhbmVvdXMga2V5c3Ryb2tlcy4KICAgICAgICAgKiBAcGFyYW0gez99IGhhbmRsZXIgVGhlIGZ1bmN0aW9uIHRoYXQgcmVzcG9uZHMgdG8gdGhlIGtleSBldmVudC4KICAgICAgICAgKiBAcGFyYW0gez99IHpvbmUgVGhlIHpvbmUgaW4gd2hpY2ggdGhlIGV2ZW50IG9jY3VycmVkLgogICAgICAgICAqIEByZXR1cm4gez99IEEgY2FsbGJhY2sgZnVuY3Rpb24uCiAgICAgICAgICovCiAgICAgICAgc3RhdGljIGV2ZW50Q2FsbGJhY2soZnVsbEtleSwgaGFuZGxlciwgem9uZSkgewogICAgICAgICAgICByZXR1cm4gKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoZXZlbnQgLyoqIFRPRE8gIzkxMDAgKi8pID0+IHsKICAgICAgICAgICAgICAgIGlmIChLZXlFdmVudHNQbHVnaW4uZ2V0RXZlbnRGdWxsS2V5KGV2ZW50KSA9PT0gZnVsbEtleSkgewogICAgICAgICAgICAgICAgICAgIHpvbmUucnVuR3VhcmRlZCgoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAoKSA9PiBoYW5kbGVyKGV2ZW50KSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7P30ga2V5TmFtZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc3RhdGljIF9ub3JtYWxpemVLZXkoa2V5TmFtZSkgewogICAgICAgICAgICAvLyBUT0RPOiBzd2l0Y2ggdG8gYSBNYXAgaWYgdGhlIG1hcHBpbmcgZ3Jvd3MgdG9vIG11Y2gKICAgICAgICAgICAgc3dpdGNoIChrZXlOYW1lKSB7CiAgICAgICAgICAgICAgICBjYXNlICdlc2MnOgogICAgICAgICAgICAgICAgICAgIHJldHVybiAnZXNjYXBlJzsKICAgICAgICAgICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGtleU5hbWU7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICBLZXlFdmVudHNQbHVnaW4uybVmYWMgPSBmdW5jdGlvbiBLZXlFdmVudHNQbHVnaW5fRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgS2V5RXZlbnRzUGx1Z2luKSjJtcm1aW5qZWN0KERPQ1VNRU5UJDEpKTsgfTsKICAgIEtleUV2ZW50c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gICAgICAgICAga2V5ID0gU3RyaW5nLmZyb21DaGFyQ29kZShwYXJzZUludChrZXkuc3Vic3RyaW5nKDIpLCAxNikpOwogICAgICAgICAgICAgICAgaWYgKGV2ZW50LmxvY2F0aW9uID09PSBET01fS0VZX0xPQ0FUSU9OX05VTVBBRCAmJiBfY2hyb21lTnVtS2V5UGFkTWFwLmhhc093blByb3BlcnR5KGtleSkpIHsKICAgICAgICAgICAgICAgICAgICAvLyBUaGVyZSBpcyBhIGJ1ZyBpbiBDaHJvbWUgZm9yIG51bWVyaWMga2V5cGFkIGtleXM6CiAgICAgICAgICAgICAgICAgICAgLy8gaHR0cHM6Ly9jb2RlLmdvb2dsZS5jb20vcC9jaHJvbWl1bS9pc3N1ZXMvZGV0YWlsP2lkPTE1NTY1NAogICAgICAgICAgICAgICAgICAgIC8vIDEsIDIsIDMgLi4uIGFyZSByZXBvcnRlZCBhcyBBLCBCLCBDIC4uLgogICAgICAgICAgICAgICAgICAgIGtleSA9ICgoLyoqIEB0eXBlIHs/fSAqLyAoX2Nocm9tZU51bUtleVBhZE1hcCkpKVtrZXldOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiBfa2V5TWFwW2tleV0gfHwga2V5OwogICAgfQogICAgLyoqCiAgICAgKiBEb21TYW5pdGl6ZXIgaGVscHMgcHJldmVudGluZyBDcm9zcyBTaXRlIFNjcmlwdGluZyBTZWN1cml0eSBidWdzIChYU1MpIGJ5IHNhbml0aXppbmcKICAgICAqIHZhbHVlcyB0byBiZSBzYWZlIHRvIHVzZSBpbiB0aGUgZGlmZmVyZW50IERPTSBjb250ZXh0cy4KICAgICAqCiAgICAgKiBGb3IgZXhhbXBsZSwgd2hlbiBiaW5kaW5nIGEgVVJMIGluIGFuIGA8YSBbaHJlZl09InNvbWVWYWx1ZSI+YCBoeXBlcmxpbmssIGBzb21lVmFsdWVgIHdpbGwgYmUKICAgICAqIHNhbml0aXplZCBzbyB0aGF0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nVuY3Rpb24gRG9tU2FuaXRpemVyX0ZhY3RvcnkodCkgeyByZXR1cm4gbmV3ICh0IHx8IERvbVNhbml0aXplcikoKTsgfTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLyBEb21TYW5pdGl6ZXIuybVwcm92ID0gybXJtWRlZmluZUluamVjdGFibGUoeyBmYWN0b3J5OiBmdW5jdGlvbiBEb21TYW5pdGl6ZXJfRmFjdG9yeSgpIHsgcmV0dXJuIMm1ybVpbmplY3QoRG9tU2FuaXRpemVySW1wbCk7IH0sIHRva2VuOiBEb21TYW5pdGl6ZXIsIHByb3ZpZGVkSW46ICJyb290IiB9KTsKICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBpbmplY3RvcgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZG9tU2FuaXRpemVySW1wbEZhY3RvcnkoaW5qZWN0b3IpIHsKICAgICAgICByZXR1cm4gbmV3IERvbVNhbml0aXplckltcGwoaW5qZWN0b3IuZ2V0KERPQ1VNRU5UJDEpKTsKICAgIH0KICAgIGNsYXNzIERvbVNhbml0aXplckltcGwgZXh0ZW5kcyBEb21TYW5pdGl6ZXIgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gX2RvYwogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKF9kb2MpIHsKICAgICAgICAgICAgc3VwZXIoKTsKICAgICAgICAgICAgdGhpcy5fZG9jID0gX2RvYzsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBjdHgKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzYW5pdGl6ZShjdHgsIHZhbHVlKSB7CiAgICAgICAgICAgIGlmICh2YWx1ZSA9PSBudWxsKQogICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgICAgIHN3aXRjaCAoY3R4KSB7CiAgICAgICAgICAgICAgICBjYXNlIFNlY3VyaXR5Q29udGV4dC5OT05FOgogICAgICAgICAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAodmFsdWUpKTsKICAgICAgICAgICAgICAgIGNhc2UgU2VjdXJpdHlDb250ZXh0LkhUTUw6CiAgICAgICAgICAgICAgICAgICAgaWYgKGFsbG93U2FuaXRpemF0aW9uQnlwYXNzQW5kVGhyb3codmFsdWUsICJIVE1MIiAvKiBIdG1sICovKSkgewogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW53cmFwU2FmZVZhbHVlKHZhbHVlKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF9zYW5pdGl6ZUh0bWwodGhpcy5fZG9jLCBTdHJpbmcodmFsdWUpKTsKICAgICAgICAgICAgICAgIGNhc2UgU2VjdXJpdHlDb250ZXh0LlNUWUxFOgogICAgICAgICAgICAgICAgICAgIGlmIChhbGxvd1Nhbml0aXphdGlvbkJ5cGFzc0FuZFRocm93KHZhbHVlLCAiU3R5bGUiIC8qIFN0eWxlICovKSkgewogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW53cmFwU2FmZVZhbHVlKHZhbHVlKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF9zYW5pdGl6ZVN0eWxlKCgvKiogQHR5cGUgez99ICovICh2YWx1ZSkpKTsKICAgICAgICAgICAgICAgIGNhc2UgU2VjdXJpdHlDb250ZXh0LlNDUklQVDoKICAgICAgICAgICAgICAgICAgICBpZiAoYWxsb3dTYW5pdGl6YXRpb25CeXBhc3NBbmRUaHJvdyh2YWx1ZSwgIlNjcmlwdCIgLyogU2NyaXB0ICovKSkgewogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW53cmFwU2FmZVZhbHVlKHZhbHVlKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCd1bnNhZmUgdmFsdWUgdXNlZCBpbiBhIHNjcmlwdCBjb250ZXh0Jyk7CiAgICAgICAgICAgICAgICBjYXNlIFNlY3VyaXR5Q29udGV4dC5VUkw6CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHR5cGUgPSBnZXRTYW5pdGl6YXRpb25CeXBhc3NUeXBlKHZhbHVlKTsKICAgICAgICAgICAgICAgICAgICBpZiAoYWxsb3dTYW5pdGl6YXRpb25CeXBhc3NBbmRUaHJvdyh2YWx1ZSwgIlVSTCIgLyogVXJsICovKSkgewogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW53cmFwU2FmZVZhbHVlKHZhbHVlKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF9zYW5pdGl6ZVVybChTdHJpbmcodmFsdWUpKTsKICAgICAgICAgICAgICAgIGNhc2UgU2VjdXJpdHlDb250ZXh0LlJFU09VUkNFX1VSTDoKICAgICAgICAgICAgICAgICAgICBpZiAoYWxsb3dTYW5pdGl6YXRpb25CeXBhc3NBbmRUaHJvdyh2YWx1ZSwgIlJlc291cmNlVVJMIiAvKiBSZXNvdXJjZVVybCAqLykpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVud3JhcFNhZmVWYWx1ZSh2YWx1ZSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigndW5zYWZlIHZhbHVlIHVzZWQgaW4gYSByZXNvdXJjZSBVUkwgY29udGV4dCAoc2VlIGh0dHA6Ly9nLmNvL25nL3NlY3VyaXR5I3hzcyknKTsKICAgICAgICAgICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBVbmV4cGVjdGVkIFNlY3VyaXR5Q29udGV4dCAke2N0eH0gKHNlZSBodHRwOi8vZy5jby9uZy9zZWN1cml0eSN4c3MpYCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYnlwYXNzU2VjdXJpdHlUcnVzdEh0bWwodmFsdWUpIHsKICAgICAgICAgICAgcmV0dXJuIGJ5cGFzc1Nhbml0aXphdGlvblRydXN0SHRtbCh2YWx1ZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGJ5cGFzc1NlY3VyaXR5VHJ1c3RTdHlsZSh2YWx1ZSkgewogICAgICAgICAgICByZXR1cm4gYnlwYXNzU2FuaXRpemF0aW9uVHJ1c3RTdHlsZSh2YWx1ZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGJ5cGFzc1NlY3VyaXR5VHJ1c3RTY3JpcHQodmFsdWUpIHsKICAgICAgICAgICAgcmV0dXJuIGJ5cGFzc1Nhbml0aXphdGlvblRydXN0U2NyaXB0KHZhbHVlKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYnlwYXNzU2VjdXJpdHlUcnVzdFVybCh2YWx1ZSkgewogICAgICAgICAgICByZXR1cm4gYnlwYXNzU2FuaXRpemF0aW9uVHJ1c3RVcmwodmFsdWUpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8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qKgogICAgICAgICAqIENvbmZpZ3VyZXMgYSBicm93c2VyLWJhc2VkIGFwcCB0byB0cmFuc2l0aW9uIGZyb20gYSBzZXJ2ZXItcmVuZGVyZWQgYXBwLCBpZgogICAgICAgICAqIG9uZSBpcyBwcmVzZW50IG9uIHRoZSBwYWdlLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/fSBwYXJhbXMgQW4gb2JqZWN0IGNvbnRhaW5pbmcgYW4gaWRlbnRpZmllciBmb3IgdGhlIGFwcCB0byB0cmFuc2l0aW9uLgogICAgICAgICAqIFRoZSBJRCBtdXN0IG1hdGNoIGJldHdlZW4gdGhlIGNsaWVudCBhbmQgc2VydmVyIHZlcnNpb25zIG9mIHRoZSBhcHAuCiAgICAgICAgICogQHJldHVybiB7P30gVGhlIHJlY29uZmlndXJlZCBgQnJvd3Nlck1vZHVsZWAgdG8gaW1wb3J0IGludG8gdGhlIGFwcCdzIHJvb3QgYEFwcE1vZHVsZWAuCiAgICAgICAgICovCiAgICAgICAgc3RhdGljIHdpdGhTZXJ2ZXJUcmFuc2l0aW9uKHBhcmFtcykgewogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgbmdNb2R1bGU6IEJyb3dzZXJNb2R1bGUsCiAgICAgICAgICAgICAgICBwcm92aWRlcnM6IFsKICAgICAgICAgICAgICAgICAgICB7IHByb3ZpZGU6IEFQUF9JRCwgdXNlVmFsdWU6IHBhcmFtcy5hcHBJZCB9LAogICAgICAgICAgICAgICAgICAgIHsgcHJvdmlkZTogVFJBTlNJVElPTl9JRCwgdXNlRXhpc3Rpbmc6IEFQUF9JRCB9LAogICAgICAgICAgICAgICAgICAgIFNFUlZFUl9UUkFOU0lUSU9OX1BST1ZJREVSUywKICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgIH07CiAgICAgICAgfQogICAgfQogICAgQnJvd3Nlck1vZHVsZS7JtW1vZCA9IMm1ybVkZWZpbmVOZ01vZHVsZSh7IHR5cGU6IEJyb3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YVJlcXVpcmUsbWlzc2luZ092ZXJyaWRlLG1pc3NpbmdSZXR1cm4sdW51c2VkUHJpdmF0ZU1lbWJlcnMsdXNlbGVzc0NvZGV9IGNoZWNrZWQgYnkgdHNjCiAgICAgKi8KICAgIC8qKgogICAgICogRmFjdG9yeSB0byBjcmVhdGUgTWV0YSBzZXJ2aWNlLgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gY3JlYXRlTWV0YSgpIHsKICAgICAgICByZXR1cm4gbmV3IE1ldGEoybXJtWluamVjdChET0NVTUVOVCQxKSk7CiAgICB9CiAgICAvKioKICAgICAqIEEgc2VydmljZSB0aGF0IGNhbiBiZSB1c2VkIHRvIGdldCBhbmQgYWRkIG1ldGEgdGFncy4KICAgICAqCiAgICAgKiBcQHB1YmxpY0FwaQogICAgICovCiAgICBjbGFzcyBNZXRhIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IF9kb2MKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihfZG9jKSB7CiAgICAgICAgICAgIHRoaXMuX2RvYyA9IF9kb2M7CiAgICAgICAgICAgIHRoaXMuX2RvbSA9IGdldERPTSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHRhZwogICAgICAgICAqIEBwYXJhbSB7Pz19IGZvcmNlQ3JlYXRpb24KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGFkZFRhZyh0YWcsIGZvcmNlQ3JlYXRpb24gPSBmYWxzZSkgewogICAgICAgICAgICBpZiAoIXRhZykKICAgICAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgICAgICByZXR1cm4gdGhpcy5fZ2V0T3JDcmVhdGVFbGVtZW50KHRhZywgZm9yY2VDcmVhdGlvbik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdGFncwogICAgICAgICAqIEBwYXJhbSB7Pz19IGZvcmNlQ3JlYXRpb24KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGFkZFRhZ3ModGFncywgZm9yY2VDcmVhdGlvbiA9IGZhbHNlKSB7CiAgICAgICAgICAgIGlmICghdGFncykKICAgICAgICAgICAgICAgIHJldHVybiBbXTsKICAgICAgICAgICAgcmV0dXJuIHRhZ3MucmVkdWNlKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSByZXN1bHQKICAgICAgICAgICAgICogQHBhcmFtIHs/fSB0YWcKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChyZXN1bHQsIHRhZykgPT4gewogICAgICAgICAgICAgICAgaWYgKHRhZykgewogICAgICAgICAgICAgICAgICAgIHJlc3VsdC5wdXNoKHRoaXMuX2dldE9yQ3JlYXRlRWxlbWVudCh0YWcsIGZvcmNlQ3JlYXRpb24pKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgICAgIH0pLCBbXSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gYXR0clNlbGVjdG9yCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXRUYWcoYXR0clNlbGVjdG9yKSB7CiAgICAgICAgICAgIGlmICghYXR0clNlbGVjdG9yKQogICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9kb2MucXVlcnlTZWxlY3RvcihgbWV0YVske2F0dHJTZWxlY3Rvcn1dYCkgfHwgbnVsbDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBhdHRyU2VsZWN0b3IKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldFRhZ3MoYXR0clNlbGVjdG9yKSB7CiAgICAgICAgICAgIGlmICghYXR0clNlbGVjdG9yKQogICAgICAgICAgICAgICAgcmV0dXJuIFtdOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGxpc3QgLypOb2RlTGlzdCovID0gdGhpcy5fZG9jLnF1ZXJ5U2VsZWN0b3JBbGwoYG1ldGFbJHthdHRyU2VsZWN0b3J9XWApOwogICAgICAgICAgICByZXR1cm4gbGlzdCA/IFtdLnNsaWNlLmNhbGwobGlzdCkgOiBbXTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB0YWcKICAgICAgICAgKiBAcGFyYW0gez89fSBzZWxlY3RvcgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdXBkYXRlVGFnKHRhZywgc2VsZWN0b3IpIHsKICAgICAgICAgICAgaWYgKCF0YWcpCiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICAgICAgc2VsZWN0b3IgPSBzZWxlY3RvciB8fCB0aGlzLl9wYXJzZVNlbGVjdG9yKHRhZyk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbWV0YSA9ICgvKiogQHR5cGUgez99ICovICh0aGlzLmdldFRhZyhzZWxlY3RvcikpKTsKICAgICAgICAgICAgaWYgKG1ldGEpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9zZXRNZXRhRWxlbWVudEF0dHJpYnV0ZXModGFnLCBtZXRhKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpcy5fZ2V0T3JDcmVhdGVFbGVtZW50KHRhZywgdHJ1ZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gYXR0clNlbGVjdG9yCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZW1vdmVUYWcoYXR0clNlbGVjdG9yKSB7CiAgICAgICAgICAgIHRoaXMucmVtb3ZlVGFnRWxlbWVudCgoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5nZXRUYWcoYXR0clNlbGVjdG9yKSkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBtZXRhCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZW1vdmVUYWdFbGVtZW50KG1ldGEpIHsKICAgICAgICAgICAgaWYgKG1ldGEpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2RvbS5yZW1vdmUobWV0YSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IG1ldGEKICAgICAgICAgKiBAcGFyYW0gez89fSBmb3JjZUNyZWF0aW9uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZ2V0T3JDcmVhdGVFbGVtZW50KG1ldGEsIGZvcmNlQ3JlYXRpb24gPSBmYWxzZSkgewogICAgICAgICAgICBpZiAoIWZvcmNlQ3JlYXRpb24pIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHNlbGVjdG9yID0gdGhpcy5fcGFyc2VTZWxlY3RvcihtZXRhKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGVsZW0gPSAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5nZXRUYWcoc2VsZWN0b3IpKSk7CiAgICAgICAgICAgICAgICAvLyBJdCdzIGFsbG93ZWQgdG8gaGF2ZSBtdWx0aXBsZSBlbGVtZW50cyB3aXRoIHRoZSBzYW1lIG5hbWUgc28gaXQncyBub3QgZW5vdWdoIHRvCiAgICAgICAgICAgICAgICAvLyBqdXN0IGNoZWNrIHRoYXQgZWxlbWVudCB3aXRoIHRoZSBzYW1lIG5hbWUgYWxyZWFkeSBwcmVzZW50IG9uIHRoZSBwYWdlLiBXZSBhbHNvIG5lZWQgdG8KICAgICAgICAgICAgICAgIC8vIGNoZWNrIGlmIGVsZW1lbnQgaGFzIHRhZyBhdHRyaWJ1dGVzCiAgICAgICAgICAgICAgICBpZiAoZWxlbSAmJiB0aGlzLl9jb250YWluc0F0dHJpYnV0ZXMobWV0YSwgZWxlbSkpCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGVsZW07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBlbGVtZW50ID0gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX2RvbS5jcmVhdGVFbGVtZW50KCdtZXRhJykpKTsKICAgICAgICAgICAgdGhpcy5fc2V0TWV0YUVsZW1lbnRBdHRyaWJ1dGVzKG1ldGEsIGVsZW1lbnQpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGhlYWQgPSB0aGlzLl9kb2MuZ2V0RWxlbWVudHNCeVRhZ05hbWUoJ2hlYWQnKVswXTsKICAgICAgICAgICAgaGVhZC5hcHBlbmRDaGlsZChlbGVtZW50KTsKICAgICAgICAgICAgcmV0dXJuIGVsZW1lbnQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSB0YWcKICAgICAgICAgKiBAcGFyYW0gez99IGVsCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfc2V0TWV0YUVsZW1lbnRBdHRyaWJ1dGVzKHRhZywgZWwpIHsKICAgICAgICAgICAgT2JqZWN0LmtleXModGFnKS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwcm9wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAocHJvcCkgPT4gZWwuc2V0QXR0cmlidXRlKHByb3AsIHRhZ1twcm9wXSkpKTsKICAgICAgICAgICAgcmV0dXJuIGVsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gdGFnCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfcGFyc2VTZWxlY3Rvcih0YWcpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBhdHRyID0gdGFnLm5hbWUgPyAnbmFtZScgOiAncHJvcGVydHknOwogICAgICAgICAgICByZXR1cm4gYCR7YXR0cn09IiR7dGFnW2F0dHJdfSJgOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gdGFnCiAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfY29udGFpbnNBdHRyaWJ1dGVzKHRhZywgZWxlbSkgewogICAgICAgICAgICByZXR1cm4gT2JqZWN0LmtleXModGFnKS5ldmVyeSgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30ga2V5CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoa2V5KSA9PiBlbGVtLmdldEF0dHJpYnV0ZShrZXkpID09PSB0YWdba2V5XSkpOwogICAgICAgIH0KICAgIH0KICAgIE1ldGEuybVmYWMgPSBmdW5jdGlvbiBNZXRhX0ZhY3RvcnkodCkgeyByZXR1cm4gbmV3ICh0IHx8IE1ldGEpKMm1ybVpbmplY3QoRE9DVU1FTlQkMSkpOyB9OwogICAgLyoqIEBub2NvbGxhcHNlICovCiAgICBNZXRhLmN0b3JQYXJhbWV0ZXJzID0gKCkgPT4gWwogICAgICAgIHsgdHlwZTogdW5kZWZpbmVkLCBk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mplY3QoRE9DVU1FTlQkMSkpOyB9OwogICAgLyoqIEBub2NvbGxhcHNlICovCiAgICBUaXRsZS5jdG9yUGFyYW1ldGVycyA9ICgpID0+IFsKICAgICAgICB7IHR5cGU6IHVuZGVmaW5lZCwgZGVjb3JhdG9yczogW3sgdHlwZTogSW5qZWN0LCBhcmdzOiBbRE9DVU1FTlQkMSxdIH1dIH0KICAgIF07CiAgICAvKiogQG5vY29sbGFwc2UgKi8gVGl0bGUuybVwcm92ID0gybXJtWRlZmluZUluamVjdGFibGUoeyBmYWN0b3J5OiBjcmVhdGVUaXRsZSwgdG9rZW46IFRpdGxlLCBwcm92aWRlZEluOiAicm9vdCIgfSk7CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdGV4dAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gdW5lc2NhcGVIdG1sKHRleHQpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgdW5lc2NhcGVkVGV4dCA9IHsKICAgICAgICAgICAgJyZhOyc6ICcmJywKICAgICAgICAgICAgJyZxOyc6ICciJywKICAgICAgICAgICAgJyZzOyc6ICdcJycsCiAgICAgICAgICAgICcmbDsnOiAnPCcsCiAgICAgICAgICAgICcmZzsnOiAnPicsCiAgICAgICAgfTsKICAgICAgICByZXR1cm4gdGV4dC5yZXBsYWNlKC8mW147XSs7L2csICgvKioKICAgICAgICAgKiBAcGFyYW0gez99IHMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHMgPT4gdW5lc2NhcGVkVGV4dFtzXSkpOwogICAgfQogICAgLyoqCiAgICAgKiBBIGtleSB2YWx1ZSBzdG9yZSB0aGF0IGlzIHRyYW5zZmVycmVkIGZyb20gdGhlIGFwcGxpY2F0aW9uIG9uIHRoZSBzZXJ2ZXIgc2lkZSB0byB0aGUgYXBwbGljYXRpb24KICAgICAqIG9uIHRoZSBjbGllbnQgc2lkZS4KICAgICAqCiA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XRlOwogICAgICAgICAgICByZXR1cm4gdHJhbnNmZXJTdGF0ZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogR2V0IHRoZSB2YWx1ZSBjb3JyZXNwb25kaW5nIHRvIGEga2V5LiBSZXR1cm4gYGRlZmF1bHRWYWx1ZWAgaWYga2V5IGlzIG5vdCBmb3VuZC4KICAgICAgICAgKiBAdGVtcGxhdGUgVAogICAgICAgICAqIEBwYXJhbSB7P30ga2V5CiAgICAgICAgICogQHBhcmFtIHs/fSBkZWZhdWx0VmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldChrZXksIGRlZmF1bHRWYWx1ZSkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5zdG9yZVtrZXldICE9PSB1bmRlZmluZWQgPyAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5zdG9yZVtrZXldKSkgOiBkZWZhdWx0VmFsdWU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNldCB0aGUgdmFsdWUgY29ycmVzcG9uZGluZyB0byBhIGtleS4KICAgICAgICAgKiBAdGVtcGxhdGUgVAogICAgICAgICAqIEBwYXJhbSB7P30ga2V5CiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0KGtleSwgdmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5zdG9yZVtrZXldID0gdmFsdWU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJlbW92ZSBhIGtleSBmcm9tIHRoZSBzdG9yZS4KICAgICAgICAgKiBAdGVtcGxhdGUgVAogICAgICAgICAqIEBwYXJhbSB7P30ga2V5CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZW1vdmUoa2V5KSB7CiAgICAgICAgICAgIGRlbGV0ZSB0aGlzLnN0b3JlW2tleV07CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFRlc3Qgd2hldGhlciBhIGtleSBleGlzdHMgaW4gdGhlIHN0b3JlLgogICAgICAgICAqIEB0ZW1wbGF0ZSBUCiAgICAgICAgICogQHBhcmFtIHs/fSBrZXkKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGhhc0tleShrZXkpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuc3RvcmUuaGFzT3duUHJvcGVydHkoa2V5KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmVnaXN0ZXIgYSBjYWxsYmFjayB0byBwcm92aWRlIHRoZSB2YWx1ZSBmb3IgYSBrZXkgd2hlbiBgdG9Kc29uYCBpcyBjYWxsZWQuCiAgICAgICAgICogQHRlbXBsYXRlIFQKICAgICAgICAgKiBAcGFyYW0gez99IGtleQogICAgICAgICAqIEBwYXJhbSB7P30gY2FsbGJhY2sKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uU2VyaWFsaXplKGtleSwgY2FsbGJhY2spIHsKICAgICAgICAgICAgdGhpcy5vblNlcmlhbGl6ZUNhbGxiYWNrc1trZXldID0gY2FsbGJhY2s7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNlcmlhbGl6ZSB0aGUgY3VycmVudCBzdGF0ZSBvZiB0aGUgc3RvcmUgdG8gSlNPTi4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHRvSnNvbigpIHsKICAgICAgICAgICAgLy8gQ2FsbCB0aGUgb25TZXJpYWxpemUgY2FsbGJhY2tzIGFuZCBwdXQgdGhvc2UgdmFsdWVzIGludG8gdGhlIHN0b3JlLgogICAgICAgICAgICBmb3IgKGNvbnN0IGtleSBpbiB0aGlzLm9uU2VyaWFsaXplQ2FsbGJhY2tzKSB7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5vblNlcmlhbGl6ZUNhbGxiY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ICAgdGhyb3cgbmV3IEVycm9yKCdab25lIGFscmVhZHkgbG9hZGVkLicpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGdsb2JhbFsnWm9uZSddOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciBab25lID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgZnVuY3Rpb24gWm9uZShwYXJlbnQsIHpvbmVTcGVjKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fcGFyZW50ID0gcGFyZW50OwogICAgICAgICAgICAgICAgICAgIHRoaXMuX25hbWUgPSB6b25lU3BlYyA/IHpvbmVTcGVjLm5hbWUgfHwgJ3VubmFtZWQnIDogJzxyb290Pic7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fcHJvcGVydGllcyA9IHpvbmVTcGVjICYmIHpvbmVTcGVjLnByb3BlcnRpZXMgfHwge307CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fem9uZURlbGVnYXRlID0KICAgICAgICAgICAgICAgICAgICAgICAgbmV3IFpvbmVEZWxlZ2F0ZSh0aGlzLCB0aGlzLl9wYXJlbnQgJiYgdGhpcy5fcGFyZW50Ll96b25lRGVsZWdhdGUsIHpvbmVTcGVjKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIFpvbmUuYXNzZXJ0Wm9uZVBhdGNoZWQgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKGdsb2JhbFsnUHJvbWlzZSddICE9PSBwYXRjaGVzWydab25lQXdhcmVQcm9taXNlJ10pIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdab25lLmpzIGhhcyBkZXRlY3RlZCB0aGF0IFpvbmVBd2FyZVByb21pc2UgYCh3aW5kb3d8Z2xvYmFsKS5Qcm9taXNlYCAnICsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICdoYXMgYmVlbiBvdmVyd3JpdHRlbi5cbicgKwogICAgICAgICAgICAgICAgICAgICAgICAgICAgJ01vc3QgbGlrZWx5IGNhdXNlIGlzIHRoYXQgYSBQcm9taXNlIHBvbHlmaWxsIGhhcyBiZWVuIGxvYWRlZCAnICsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICdhZnRlciBab25lLmpzIChQb2x5ZmlsbGluZyBQcm9taXNlIGFwaSBpcyBub3QgbmVjZXNzYXJ5IHdoZW4gem9uZS5qcyBpcyBsb2FkZWQuICcgKwogICAgICAgICAgICAgICAgICAgICAgICAgICAgJ0lmIHlvdSBtdXN0IGxvYWQgb25lLCBkbyBzbyBiZWZvcmUgbG9hZGluZyB6b25lLmpzLiknKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KFpvbmUsICJyb290IiwgewogICAgICAgICAgICAgICAgICAgIGdldDogZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgICAgICAgICB2YXIgem9uZSA9IFpvbmUuY3VycmVudDsKICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKHpvbmUucGFyZW50KSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB6b25lID0gem9uZS5wYXJlbnQ7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHpvbmU7CiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICBlbnVtZXJhYmxlOiB0cnVlLAogICAgICAgICAgICAgICAgICAgIGNvbmZpZ3VyYWJsZTogdHJ1ZQogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoWm9uZSwgImN1cnJlbnQiLCB7CiAgICAgICAgICAgICAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7IHJldHVybiBfY3VycmVudFpvbmVGcmFtZS56b25lOyB9LAogICAgICAgICAgICAgICAgICAgIGVudW1lcmFibGU6IHRydWUsCiAgICAgICAgICAgICAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlCiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShab25lLCAiY3VycmVudFRhc2siLCB7CiAgICAgICAgICAgICAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7IHJldHVybiBfY3VycmVudFRhc2s7IH0sCiAgICAgICAgICAgICAgICAgICAgZW51bWVyYWJsZTogdHJ1ZSwKICAgICAgICAgICAgICAgICAgICBjb25maWd1cmFibGU6IHRydWUKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgLy8gdHNsaW50OmRpc2FibGUtbmV4dC1saW5lOnJlcXVpcmUtaW50ZXJuYWwtd2l0aC11bmRlcnNjb3JlCiAgICAgICAgICAgICAgICBab25lLl9fbG9hZF9wYXRjaCA9IGZ1bmN0aW9uIChuYW1lLCBmbikgewogICAgICAgICAgICAgICAgICAgIGlmIChwYXRjaGVzLmhhc093blByb3BlcnR5KG5hbWUpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjaGVja0R1cGxpY2F0ZSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgRXJyb3IoJ0FscmVhZHkgbG9hZGVkIHBhdGNoOiAnICsgbmFtZSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIWdsb2JhbFsnX19ab25lX2Rpc2FibGVfJyArIG5hbWVdKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwZXJmTmFtZSA9ICdab25lOicgKyBuYW1lOwogICAgICAgICAgICAgICAgICAgICAgICBtYXJrKHBlcmZOYW1lKTsKICAgICAgICAgICAgICAgICAgICAgICAgcGF0Y2hlc1tuYW1lXSA9IGZuKGdsb2JhbCwgWm9uZSwgX2FwaSk7CiAgICAgICAgICAgICAgICAgICAgICAgIHBlcmZvcm1hbmNlTWVhc3VyZShwZXJmTmFtZSwgcGVyZk5hbWUpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoWm9uZS5wcm90b3R5cGUsICJwYXJlbnQiLCB7CiAgICAgICAgICAgICAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7IHJldHVybiB0aGlzLl9wYXJlbnQ7IH0sCiAgICAgICAgICAgICAgICAgICAgZW51bWVyYWJsZTogdHJ1ZSwKICAgICAgICAgICAgICAgICAgICBjb25maWd1cmFibGU6IHRydWUKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KFpvbmUucHJvdG90eXBlLCAibmFtZSIsIHsKICAgICAgICAgICAgICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHsgcmV0dXJuIHRoaXMuX25hbWU7IH0sCiAgICAgICAgICAgICAgICAgICAgZW51bWVyYWJsZTogdHJ1ZSwKICAgICAgICAgICAgICAgICAgICBjb25maWd1cmFibGU6IHRydWUKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgWm9uZS5wcm90b3R5cGUuZ2V0ID0gZnVuY3Rpb24gKGtleSkgewogICAgICAgICAgICAgICAgICAgIHZhciB6b25lID0gdGhpcy5nZXRab25lV2l0aChrZXkpOwogICAgICAgICAgICAgICAgICAgIGlmICh6b25lKQogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gem9uZS5fcHJvcGVydGllc1trZXldOwogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIFpvbmUucHJvdG90eXBlLmdldFpvbmVXaXRoID0gZnVuY3Rpb24gKGtleSkgewogICAgICAgICAgICAgICAgICAgIHZhciBjdXJyZW50ID0gdGhpczsKICAgICAgICAgICAgICAgICAgICB3aGlsZSAoY3VycmVudCkgewogICAgICAgICAgICAgICAgICAgICAgICBpZiAoY3VycmVudC5fcHJvcGVydGllcy5oYXNPd25Qcm9wZXJ0eShrZXkpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY3VycmVudDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50ID0gY3VycmVudC5fcGFyZW50OwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICBab25lLnByb3RvdHlwZS5mb3JrID0gZnVuY3Rpb24gKHpvbmVTcGVjKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKCF6b25lU3BlYykKICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdab25lU3BlYyByZXF1aXJlZCEnKTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fem9uZURlbGVnYXRlLmZvcmsodGhpcywgem9uZVNwZWMpOwogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIFpvbmUucHJvdG90eXBlLndyYXAgPSBmdW5jdGlvbiAoY2FsbGJhY2ssIHNvdXJjZSkgewogICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgY2FsbGJhY2sgIT09ICdmdW5jdGlvbicpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdFeHBlY3RpbmcgZnVuY3Rpb24gZ290OiAnICsgY2FsbGJhY2spOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB2YXIgX2NhbGxiYWNrID0gdGhpcy5fem9uZURlbGVnYXRlLmludGVyY2VwdCh0aGlzLCBjYWxsYmFjaywgc291cmNlKTsKICAgICAgICAgICAgICAgICAgICB2YXIgem9uZSA9IHRoaXM7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHpvbmUucnVuR3VhcmRlZChfY2FsbGJhY2ssIHRoaXMsIGFyZ3VtZW50cywgc291cmNlKTsKICAgICAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIFpvbmUucHJvdG90eXBlLnJ1biA9IGZ1bmN0aW9uIChjYWxsYmFjaywgYXBwbHlUaGlzLCBhcHBseUFyZ3MsIHNvdXJjZSkgewogICAgICAgICAgICAgICAgICAgIF9jdXJyZW50Wm9uZUZyYW1lID0geyBwYXJlbnQ6IF9jdXJyZW50Wm9uZUZyYW1lLCB6b25lOiB0aGlzIH07CiAgICAgICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3pvbmVEZWxlZ2F0ZS5pbnZva2UodGhpcywgY2FsbGJhY2ssIGFwcGx5VGhpcywgYXBwbHlBcmdzLCBzb3VyY2UpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBmaW5hbGx5IHsKICAgICAgICAgICAgICAgICAgICAgICAgX2N1cnJlbnRab25lRnJhbWUgPSBfY3VycmVudFpvbmVGcmFtZS5wYXJlbnQ7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIFpvbmUucHJvdG90eXBlLnJ1bkd1YXJkZWQgPSBmdW5jdGlvbiAoY2FsbGJhY2ssIGFwcGx5VGhpcywgYXBwbHlBcmdzLCBzb3VyY2UpIHsKICAgICAgICAgICAgICAgICAgICBpZiAoYXBwbHlUaGlzID09PSB2b2lkIDApIHsgYXBwbHlUaGlzID0gbnVsbDsgfQogICAgICAgICAgICAgICAgICAgIF9jdXJyZW50Wm9uZUZyYW1lID0geyBwYXJlbnQ6IF9jdXJyZW50Wm9uZUZyYW1lLCB6b25lOiB0aGlzIH07CiAgICAgICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl96b25lRGVsZWdhdGUuaW52b2tlKHRoaXMsIGNhbGxiYWNrLCBhcHBseVRoaXMsIGFwcGx5QXJncywgc291cmNlKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBjYXRjaCAoZXJyb3IpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLl96b25lRGVsZWdhdGUuaGFuZGxlRXJyb3IodGhpcywgZXJyb3IpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgZXJyb3I7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZmluYWxseSB7CiAgICAgICAgICAgICAgICAgICAgICAgIF9jdXJyZW50Wm9uZUZyYW1lID0gX2N1cnJlbnRab25lRnJhbWUucGFyZW50OwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICBab25lLnByb3RvdHlwZS5ydW5UYXNrID0gZnVuY3Rpb24gKHRhc2ssIGFwcGx5VGhpcywgYXBwbHlBcmdzKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKHRhc2suem9uZSAhPSB0aGlzKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignQSB0YXNrIGNhbiBvbmx5IGJlIHJ1biBpbiB0aGUgem9uZSBvZiBjcmVhdGlvbiEgKENyZWF0aW9uOiAnICsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICh0YXNrLnpvbmUgfHwgTk9fWk9ORSkubmFtZSArICc7IEV4ZWN1dGlvbjogJyArIHRoaXMubmFtZSArICcpJyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIC8vIGh0dHBzOi8vZ2l0aHViLmNvbS9hbmd1bGFyL3pvbmUuanMvaXNzdWVzLzc3OCwgc29tZXRpbWVzIGV2ZW50VGFzawogICAgICAgICAgICAgICAgICAgIC8vIHdpbGwgcnVuIGluIG5vdFNjaGVkdWxlZChjYW5jZWxlZCkgc3RhdGUsIHdlIHNob3VsZCBub3QgdHJ5IHRvCiAgICAgICAgICAgICAgICAgICAgLy8gcnVuIHN1Y2gga2luZCBvZiB0YXNrIGJ1dCBqdXN0IHJldHVybgogICAgICAgICAgICAgICAgICAgIGlmICh0YXNrLnN0YXRlID09PSBub3RTY2hlZHVsZWQgJiYgKHRhc2sudHlwZSA9PT0gZXZlbnRUYXNrIHx8IHRhc2sudHlwZSA9PT0gbWFjcm9UYXNrKSkgewogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHZhciByZUVudHJ5R3VhcmQgPSB0YXNrLnN0YXRlICE9IHJ1bm5pbmc7CiAgICAgICAgICAgICAgICAgICAgcmVFbnRyeUd1YXJkICYmIHRhc2suX3RyYW5zaXRpb25UbyhydW5uaW5nLCBzY2hlZHVsZWQpOwogICAgICAgICAgICAgICAgICAgIHRhc2sucnVuQ291bnQrKzsKICAgICAgICAgICAgICAgICAgICB2YXIgcHJldmlvdXNUYXNrID0gX2N1cnJlbnRUYXNrOwogICAgICAgICAgICAgICAgICAgIF9jdXJyZW50VGFzayA9IHRhc2s7CiAgICAgICAgICAgICAgICAgICAgX2N1cnJlbnRab25lRnJhbWUgPSB7IHBhcmVudDogX2N1cnJlbnRab25lRnJhbWUsIHpvbmU6IHRoaXMgfTsKICAgICAgICAgICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgICAgICAgICBpZiAodGFzay50eXBlID09IG1hY3JvVGFzayAmJiB0YXNrLmRhdGEgJiYgIXRhc2suZGF0YS5pc1BlcmlvZGljKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YXNrLmNhbmNlbEZuID0gdW5kZWZpbmVkOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fem9uZURlbGVnYXRlLmludm9rZVRhc2sodGhpcywgdGFzaywgYXBwbHlUaGlzLCBhcHBseUFyZ3MpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGNhdGNoIChlcnJvcikgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX3pvbmVEZWxlZ2F0ZS5oYW5kbGVFcnJvcih0aGlzLCBlcnJvcikpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBlcnJvcjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBmaW5hbGx5IHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gaWYgdGhlIHRhc2sncyBzdGF0ZSBpcyBub3RTY2hlZHVsZWQgb3IgdW5rbm93biwgdGhlbiBpdCBoYXMgYWxyZWFkeSBiZWVuIGNhbmNlbGxlZAogICAgICAgICAgICAgICAgICAgICAgICAvLyB3ZSBzaG91bGQgbm90IHJlc2V0IHRoZSBzdGF0ZSB0byBzY2hlZHVsZWQKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRhc2suc3RhdGUgIT09IG5vdFNjaGVkdWxlZCAmJiB0YXNrLnN0YXRlICE9PSB1bmtub3duKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodGFzay50eXBlID09IGV2ZW50VGFzayB8fCAodGFzay5kYXRhICYmIHRhc2suZGF0YS5pc1BlcmlvZGljKSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlRW50cnlHdWFyZCAmJiB0YXNrLl90cmFuc2l0aW9uVG8oc2NoZWR1bGVkLCBydW5uaW5nKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhc2sucnVuQ291bnQgPSAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3VwZGF0ZVRhc2tDb3VudCh0YXNrLCAtMSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVFbnRyeUd1YXJkICYmCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhc2suX3RyYW5zaXRpb25Ubyhub3RTY2hlZHVsZWQsIHJ1bm5pbmcsIG5vdFNjaGVkdWxlZCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgX2N1cnJlbnRab25lRnJhbWUgPSBfY3VycmVudFpvbmVGcmFtZS5wYXJlbnQ7CiAgICAgICAgICAgICAgICAgICAgICAgIF9jdXJyZW50VGFzayA9IHByZXZpb3VzVGFzazsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgWm9uZS5wcm90b3R5cGUuc2NoZWR1bGVUYXNrID0gZnVuY3Rpb24gKHRhc2spIHsKICAgICAgICAgICAgICAgICAgICBpZiAodGFzay56b25lICYmIHRhc2suem9uZSAhPT0gdGhpcykgewogICAgICAgICAgICAgICAgICAgICAgICAvLyBjaGVjayBpZiB0aGUgdGFzayB3YXMgcmVzY2hlZHVsZWQsIHRoZSBuZXdab25lCiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHNob3VsZCBub3QgYmUgdGhlIGNoaWxkcmVuIG9mIHRoZSBvcmlnaW5hbCB6b25lCiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBuZXdab25lID0gdGhpczsKICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKG5ld1pvbmUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChuZXdab25lID09PSB0YXNrLnpvbmUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBFcnJvcigiY2FuIG5vdCByZXNjaGVkdWxlIHRhc2sgdG8gIiArIHRoaXMubmFtZSArICIgd2hpY2ggaXMgZGVzY2VuZGFudHMgb2YgdGhlIG9yaWdpbmFsIHpvbmUgIiArIHRhc2suem9uZS5uYW1lKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld1pvbmUgPSBuZXdab25lLnBhcmVudDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB0YXNrLl90cmFuc2l0aW9uVG8oc2NoZWR1bGluZywgbm90U2NoZWR1bGVkKTsKICAgICAgICAgICAgICAgICAgICB2YXIgem9uZURlbGVnYXRlcyA9IFtdOwogICAgICAgICAgICAgICAgICAgIHRhc2suX3pvbmVEZWxlZ2F0ZXMgPSB6b25lRGVsZWdhdGVzOwogICAgICAgICAgICAgICAgICAgIHRhc2suX3pvbmUgPSB0aGlzOwogICAgICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRhc2sgPSB0aGlzLl96b25lRGVsZWdhdGUuc2NoZWR1bGVUYXNrKHRoaXMsIHRhc2spOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBjYXRjaCAoZXJyKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHNob3VsZCBzZXQgdGFzaydzIHN0YXRlIHRvIHVua25vd24gd2hlbiBzY2hlZHVsZVRhc2sgdGhyb3cgZXJyb3IKICAgICAgICAgICAgICAgICAgICAgICAgLy8gYmVjYXVzZSB0aGUgZXJyIG1heSBmcm9tIHJlc2NoZWR1bGUsIHNvIHRoZSBmcm9tU3RhdGUgbWF5YmUgbm90U2NoZWR1bGVkCiAgICAgICAgICAgICAgICAgICAgICAgIHRhc2suX3RyYW5zaXRpb25Ubyh1bmtub3duLCBzY2hlZHVsaW5nLCBub3RTY2hlZHVsZWQpOwogICAgICAgICAgICAgICAgICAgICAgICAvLyBUT0RPOiBASmlhTGlQYXNzaW9uLCBzaG91bGQgd2UgY2hlY2sgdGhlIHJlc3VsdCBmcm9tIGhhbmRsZUVycm9yPwogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl96b25lRGVsZWdhdGUuaGFuZGxlRXJyb3IodGhpcywgZXJyKTsKICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgZXJyOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBpZiAodGFzay5fem9uZURlbGVnYXRlcyA9PT0gem9uZURlbGVnYXRlcykgewogICAgICAgICAgICAgICAgICAgICAgICAvLyB3ZSBoYXZlIHRvIGNoZWNrIGJlY2F1c2UgaW50ZXJuYWxseSB0aGUgZGVsZWdhdGUgY2FuIHJlc2NoZWR1bGUgdGhlIHRhc2suCiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3VwZGF0ZVRhc2tDb3VudCh0YXNrLCAxKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgaWYgKHRhc2suc3RhdGUgPT0gc2NoZWR1bGluZykgewogICAgICAgICAgICAgICAgICAgICAgICB0YXNrLl90cmFuc2l0aW9uVG8oc2NoZWR1bGVkLCBzY2hlZHVsaW5nKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRhc2s7CiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgWm9uZS5wcm90b3R5cGUuc2NoZWR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AgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdBIHRhc2sgY2FuIG9ubHkgYmUgY2FuY2VsbGVkIGluIHRoZSB6b25lIG9mIGNyZWF0aW9uISAoQ3JlYXRpb246ICcgKwogICAgICAgICAgICAgICAgICAgICAgICAgICAgKHRhc2suem9uZSB8fCBOT19aT05FKS5uYW1lICsgJzsgRXhlY3V0aW9uOiAnICsgdGhpcy5uYW1lICsgJyknKTsKICAgICAgICAgICAgICAgICAgICB0YXNrLl90cmFuc2l0aW9uVG8oY2FuY2VsaW5nLCBzY2hlZHVsZWQsIHJ1bm5pbmcpOwogICAgICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3pvbmVEZWxlZ2F0ZS5jYW5jZWxUYXNrKHRoaXMsIHRhc2spOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBjYXRjaCAoZXJyKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGlmIGVycm9yIG9jY3VycyB3aGVuIGNhbmNlbFRhc2ssIHRyYW5zaXQgdGhlIHN0YXRlIHRvIHVua25vd24KICAgICAgICAgICAgICAgICAgICAgICAgdGFzay5fdHJhbnNpdGlvblRvKHVua25vd24sIGNhbmNlbGluZyk7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3pvbmVEZWxlZ2F0ZS5oYW5kbGVFcnJvcih0aGlzLCBlcnIpOwogICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBlcnI7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHRoaXMuX3VwZGF0ZVRhc2tDb3VudCh0YXNrLCAtMSk7CiAgICAgICAgICAgICAgICAgICAgdGFzay5fdHJhbnNpdGlvblRvKG5vdFNjaGVkdWxlZCwgY2FuY2VsaW5nKTsKICAgICAgICAgICAgICAgICAgICB0YXNrLnJ1bkNvdW50ID0gMDsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGFzazsKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICBab25lLnByb3RvdHlwZS5fdXBkYXRlVGFza0NvdW50ID0gZnVuY3Rpb24gKHRhc2ssIGNvdW50KSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIHpvbmVEZWxlZ2F0ZXMgPSB0YXNrLl96b25lRGVsZWdhdGVzOwogICAgICAgICAgICAgICAgICAgIGlmIChjb3VudCA9PSAtMSkgewogICAgICAgICAgICAgICAgICAgICAgICB0YXNrLl96b25lRGVsZWdhdGVzID0gbnVsbDsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCB6b25lRGVsZWdhdGVzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHpvbmVEZWxlZ2F0ZXNbaV0uX3VwZGF0ZVRhc2tDb3VudCh0YXNrLnR5cGUsIGNvdW50KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgcmV0dXJuIFpvbmU7CiAgICAgICAgICAgIH0oKSk7CiAgICAgICAgICAgIC8vIHRzbGludDpkaXNhYmxlLW5leHQtbGluZTpyZXF1aXJlLWludGVybmFsLXdpdGgtdW5kZXJzY29yZQogICAgICAgICAgICBab25lLl9fc3ltYm9sX18gPSBfX3N5bWJvbF9fOwogICAgICAgICAgICB2YXIgREVMRUdBVEVfWlMgPSB7CiAgICAgICAgICAgICAgICBuYW1lOiAnJywKICAgICAgICAgICAgICAgIG9uSGFzVGFzazogZnVuY3Rpb24gKGRlbGVnYXRlLCBfLCB0YXJnZXQsIGhhc1Rhc2tTdGF0ZSkgeyByZXR1cm4gZGVsZWdhdGUuaGFzVGFzayh0YXJnZXQsIGhhc1Rhc2tTdGF0ZSk7IH0sCiAgICAgICAgICAgICAgICBvblNjaGVkdWxlVGFzazogZnVuY3Rpb24gKGRlbGVnYXRlLCBfLCB0Y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0ID0gem9uZVNwZWMgJiYgKHpvbmVTcGVjLm9uRm9yayA/IHBhcmVudERlbGVnYXRlIDogcGFyZW50RGVsZWdhdGUuX2ZvcmtEbGd0KTsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9mb3JrQ3VyclpvbmUgPQogICAgICAgICAgICAgICAgICAgICAgICB6b25lU3BlYyAmJiAoem9uZVNwZWMub25Gb3JrID8gdGhpcy56b25lIDogcGFyZW50RGVsZWdhdGUuX2ZvcmtDdXJyWm9uZSk7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5faW50ZXJjZXB0WlMgPQogICAgICAgICAgICAgICAgICAgICAgICB6b25lU3BlYyAmJiAoem9uZVNwZWMub25JbnRlcmNlcHQgPyB6b25lU3BlYyA6IHBhcmVudERlbGVnYXRlLl9pbnRlcmNlcHRaUyk7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5faW50ZXJjZXB0RGxndCA9CiAgICAgICAgICAgICAgICAgICAgICAgIHpvbmVTcGVjICYmICh6b25lU3BlYy5vbkludGVyY2VwdCA/IHBhcmVudERlbGVnYXRlIDogcGFyZW50RGVsZWdhdGUuX2ludGVyY2VwdERsZ3QpOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX2ludGVyY2VwdEN1cnJab25lID0KICAgICAgICAgICAgICAgICAgICAgICAgem9uZVNwZWMgJiYgKHpvbmVTcGVjLm9uSW50ZXJjZXB0ID8gdGhpcy56b25lIDogcGFyZW50RGVsZWdhdGUuX2ludGVyY2VwdEN1cnJab25lKTsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9pbnZva2VaUyA9IHpvbmVTcGVjICYmICh6b25lU3BlYy5vbkludm9rZSA/IHpvbmVTcGVjIDogcGFyZW50RGVsZWdhdGUuX2ludm9rZVpTKTsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9pbnZva2VEbGd0ID0KICAgICAgICAgICAgICAgICAgICAgICAgem9uZVNwZWMgJiYgKHpvbmVTcGVjLm9uSW52b2tlID8gcGFyZW50RGVsZWdhdGUgOiBwYXJlbnREZWxlZ2F0ZS5faW52b2tlRGxndCk7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5faW52b2tlQ3VyclpvbmUgPQogICAgICAgICAgICAgICAgICAgICAgICB6b25lU3BlYyAmJiAoem9uZVNwZWMub25JbnZva2UgPyB0aGlzLnpvbmUgOiBwYXJlbnREZWxlZ2F0ZS5faW52b2tlQ3VyclpvbmUpOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX2hhbmRsZUVycm9yWlMgPQogICAgICAgICAgICAgICAgICAgICAgICB6b25lU3BlYyAmJiAoem9uZVNwZWMub25IYW5kbGVFcnJvciA/IHpvbmVTcGVjIDogcGFyZW50RGVsZWdhdGUuX2hhbmRsZUVycm9yWlMpOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX2hhbmRsZUVycm9yRGxndCA9IHpvbmVTcGVjICYmCiAgICAgICAgICAgICAgICAgICAgICAgICh6b25lU3BlYy5vbkhhbmRsZUVycm9yID8gcGFyZW50RGVsZWdhdGUgOiBwYXJlbnREZWxlZ2F0ZS5faGFuZGxlRXJyb3JEbGd0KTsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9oYW5kbGVFcnJvckN1cnJab25lID0KICAgICAgICAgICAgICAgICAgICAgICAgem9uZVNwZWMgJiYgKHpvbmVTcGVjLm9uSGFuZGxlRXJyb3IgPyB0aGlzLnpvbmUgOiBwYXJlbnREZWxlZ2F0ZS5faGFuZGxlRXJyb3JDdXJyWm9uZSk7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fc2NoZWR1bGVUYXNrWlMgPQogICAgICAgICAgICAgICAgICAgICAgICB6b25lU3BlYyAmJiAoem9uZVNwZWMub25TY2hlZHVsZVRhc2sgPyB6b25lU3BlYyA6IHBhcmVudERlbGVnYXRlLl9zY2hlZHVsZVRhc2taUyk7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fc2NoZWR1bGVUYXNrRGxndCA9IHpvbmVTcGVjICYmCiAgICAgICAgICAgICAgICAgICAgICAgICh6b25lU3BlYy5vblNjaGVkdWxlVGFzayA/IHBhcmVudERlbGVnYXRlIDogcGFyZW50RGVsZWdhdGUuX3NjaGVkdWxlVGFza0RsZ3QpOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX3NjaGVkdWxlVGFza0N1cnJab25lID0gem9uZVNwZWMgJiYKICAgICAgICAgICAgICAgICAgICAgICAgKHpvbmVTcGVjLm9uU2NoZWR1bGVUYXNrID8gdGhpcy56b25lIDogcGFyZW50RGVsZWdhdGUuX3NjaGVkdWxlVGFza0N1cnJab25lKTsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9pbnZva2VUYXNrWlMgPQogICAgICAgICAgICAgICAgICAgICAgICB6b25lU3BlYyAmJiAoem9uZVNwZWMub25JbnZva2VUYXNrID8gem9uZVNwZWMgOiBwYXJlbnREZWxlZ2F0ZS5faW52b2tlVGFza1pTKTsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9pbnZva2VUYXNrRGxndCA9CiAgICAgICAgICAgICAgICAgICAgICAgIHpvbmVTcGVjICYmICh6b25lU3BlYy5vbkludm9rZVRhc2sgPyBwYXJlbnREZWxlZ2F0ZSA6IHBhcmVudERlbGVnYXRlLl9pbnZva2VUYXNrRGxndCk7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5faW52b2tlVGFza0N1cnJab25lID0KICAgICAgICAgICAgICAgICAgICAgICAgem9uZVNwZWMgJiYgKHpvbmVTcGVjLm9uSW52b2tlVGFzayA/IHRoaXMuem9uZSA6IHBhcmVudERlbGVnYXRlLl9pbnZva2VUYXNrQ3VyclpvbmUpOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX2NhbmNlbFRhc2taUyA9CiAgICAgICAgICAgICAgICAgICAgICAgIHpvbmVTcGVjICYmICh6b25lU3BlYy5vbkNhbmNlbFRhc2sgPyB6b25lU3BlYyA6IHBhcmVudERlbGVnYXRlLl9jYW5jZWxUYXNrWlMpOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX2NhbmNlbFRhc2tEbGd0ID0KICAgICAgICAgICAgICAgICAgICAgICAgem9uZVNwZWMgJiYgKHpvbmVTcGVjLm9uQ2FuY2VsVGFzayA/IHBhcmVudERlbGVnYXRlIDogcGFyZW50RGVsZWdhdGUuX2NhbmNlbFRhc2tEbGd0KTsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9jYW5jZWxUYXNrQ3VyclpvbmUgPQogICAgICAgICAgICAgICAgICAgICAgICB6b25lU3BlYyAmJiAoem9uZVNwZWMub25DYW5jZWxUYXNrID8gdGhpcy56b25lIDogcGFyZW50RGVsZWdhdGUuX2NhbmNlbFRhc2tDdXJyWm9uZSk7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5faGFzVGFza1pTID0gbnVsbDsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9oYXNUYXNrRGxndCA9IG51bGw7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5faGFzVGFza0RsZ3RPd25lciA9IG51bGw7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5faGFzVGFza0N1cnJab25lID0gbnVsbDsKICAgICAgICAgICAgICAgICAgICB2YXIgem9uZVNwZWNIYXNUYXNrID0gem9uZVNwZWMgJiYgem9uZVNwZWMub25IYXNUYXNrOwogICAgICAgICAgICAgICAgICAgIHZhciBwYXJlbnRIYXNUYXNrID0gcGFyZW50RGVsZWdhdGUgJiYgcGFyZW50RGVsZWdhdGUuX2hhc1Rhc2taUzsKICAgICAgICAgICAgICAgICAgICBpZiAoem9uZVNwZWNIYXNUYXNrIHx8IHBhcmVudEhhc1Rhc2spIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gSWYgd2UgbmVlZCB0byByZXBvcnQgaGFzVGFzaywgdGhhbiB0aGlzIFpTIG5lZWRzIHRvIGRvIHJlZiBjb3VudGluZyBvbiB0YXNrcy4gSW4gc3VjaAogICAgICAgICAgICAgICAgICAgICAgICAvLyBhIGNhc2UgYWxsIHRhc2sgcmVsYXRlZCBpbnRlcmNlcHRvcnMgbXVzdCBnbyB0aHJvdWdoIHRoaXMgWkQuIFdlIGNhbid0IHNob3J0IGNpcmN1aXQgaXQuCiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2hhc1Rhc2taUyA9IHpvbmVTcGVjSGFzVGFzayA/IHpvbmVTcGVjIDogREVMRUdBVEVfWlM7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2hhc1Rhc2tEbGd0ID0gcGFyZW50RGVsZWdhdGU7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2hhc1Rhc2tEbGd0T3duZXIgPSB0aGlzOwogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9oYXNUYXNrQ3VyclpvbmUgPSB6b25lOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXpvbmVTcGVjLm9uU2NoZWR1bGVUYXNrKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9zY2hlZHVsZVRhc2taUyA9IERFTEVHQVRFX1pTOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fc2NoZWR1bGVUYXNrRGxndCA9IHBhcmVudERlbGVnYXRlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fc2NoZWR1bGVUYXNrQ3VyclpvbmUgPSB0aGlzLnpvbmU7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCF6b25lU3BlYy5vbkludm9rZVRhc2spIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2ludm9rZVRhc2taUyA9IERFTEVHQVRFX1pTOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5faW52b2tlVGFza0RsZ3QgPSBwYXJlbnREZWxlZ2F0ZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2ludm9rZVRhc2tDdXJyWm9uZSA9IHRoaXMuem9uZTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXpvbmVTcGVjLm9uQ2FuY2VsVGFzaykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fY2FuY2VsVGFza1pTID0gREVMRUdBVEVfWlM7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9jYW5jZWxUYXNrRGxndCA9IHBhcmVudERlbGVnYXRlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fY2FuY2VsVGFza0N1cnJab25lID0gdGhpcy56b25lOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgWm9uZURlbGVnYXRlLnByb3RvdHlwZS5mb3JrID0gZnVuY3Rpb24gKHRhcmdldFpvbmUsIHpvbmVTcGVjKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2ZvcmtaUyA/CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2ZvcmtaUy5vbkZvcmsodGhpcy5fZm9ya0RsZ3QsIHRoaXMuem9uZSwgdGFyZ2V0Wm9uZSwgem9uZVNwZWMpIDoKICAgICAgICAgICAgICAgICAgICAgICAgbmV3IFpvbmUodGFyZ2V0Wm9uZSwgem9uZVNwZWMpOwogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIFpvbmVEZWxlZ2F0ZS5wcm90b3R5cGUuaW50ZXJjZXB0ID0gZnVuY3Rpb24gKHRhcmdldFpvbmUsIGNhbGxiYWNrLCBzb3VyY2UpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5faW50ZXJjZXB0WlMgPwogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9pbnRlcmNlcHRaUy5vbkludGVyY2VwdCh0aGlzLl9pbnRlcmNlcHREbGd0LCB0aGlzLl9pbnRlcmNlcHRDdXJyWm9uZSwgdGFyZ2V0Wm9uZSwgY2FsbGJhY2ssIHNvdXJjZSkgOgogICAgICAgICAgICAgICAgICAgICAgICBjYWxsYmFjazsKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICBab25lRGVsZWdhdGUucHJvdG90eXBlLmludm9rZSA9IGZ1bmN0aW9uICh0YXJnZXRab25lLCBjYWxsYmFjaywgYXBwbHlUaGlzLCBhcHBseUFyZ3MsIHNvdXJjZSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9pbnZva2VaUyA/CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2ludm9rZVpTLm9uSW52b2tlKHRoaXMuX2ludm9rZURsZ3QsIHRoaXMuX2ludm9rZUN1cnJab25lLCB0YXJnZXRab25lLCBjYWxsYmFjaywgYXBwbHlUaGlzLCBhcHBseUFyZ3MsIHNvdXJjZSkgOgogICAgICAgICAgICAgICAgICAgICAgICBjYWxsYmFjay5hcHBseShhcHBseVRoaXMsIGFwcGx5QXJncyk7CiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgWm9uZURlbGVnYXRlLnByb3RvdHlwZS5oYW5kbGVFcnJvciA9IGZ1bmN0aW9uICh0YXJnZXRab25lLCBlcnJvcikgewogICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9oYW5kbGVFcnJvclpTID8KICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5faGFuZGxlRXJyb3JaUy5vbkhhbmRsZUVycm9yKHRoaXMuX2hhbmRsZUVycm9yRGxndCwgdGhpcy5faGFuZGxlRXJyb3JDdXJyWm9uZSwgdGFyZ2V0Wm9uZSwgZXJyb3IpIDoKICAgICAgICAgICAgICAgICAgICAgICAgdHJ1ZTsKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICBab25lRGVsZWdhdGUucHJvdG90eXBlLnNjaGVkdWxlVGFzayA9IGZ1bmN0aW9uICh0YXJnZXRab25lLCB0YXNrKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIHJldHVyblRhc2sgPSB0YXNrOwogICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLl9zY2hlZHVsZVRhc2taUykgewogICAgICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5faGFzVGFza1pTKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm5UYXNrLl96b25lRGVsZWdhdGVzLnB1c2godGhpcy5faGFzVGFza0RsZ3RPd25lcik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLy8gY2xhbmctZm9ybWF0IG9mZgogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm5UYXNrID0gdGhpcy5fc2NoZWR1bGVUYXNrWlMub25TY2hlZHVsZVRhc2sodGhpcy5fc2NoZWR1bGVUYXNrRGxndCwgdGhpcy5fc2NoZWR1bGVUYXNrQ3VyclpvbmUsIHRhcmdldFpvbmUsIHRhc2spOwogICAgICAgICAgICAgICAgICAgICAgICAvLyBjbGFuZy1mb3JtYXQgb24KICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFyZXR1cm5UYXNrKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuVGFzayA9IHRhc2s7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICBpZiAodGFzay5zY2hlZHVsZUZuKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YXNrLnNjaGVkdWxlRm4odGFzayk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAodGFzay50eXBlID09IG1pY3JvVGFzaykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NoZWR1bGVNaWNyb1Rhc2sodGFzayk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ1Rhc2sgaXMgbWlzc2luZyBzY2hlZHVsZUZuLicpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHJldHVybiByZXR1cm5UYXNrOwogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIFpvbmVEZWxlZ2F0ZS5wcm90b3R5cGUuaW52b2tlVGFzayA9IGZ1bmN0aW9uICh0YXJnZXRab25lLCB0YXNrLCBhcHBseVRoaXMsIGFwcGx5QXJncykgewogICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9pbnZva2VUYXNrWlMgPwogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9pbnZva2VUYXNrWlMub25JbnZva2VUYXNrKHRoaXMuX2ludm9rZVRhc2tEbGd0LCB0aGlzLl9pbnZva2VUYXNrQ3VyclpvbmUsIHRhcmdldFpvbmUsIHRhc2ssIGFwcGx5VGhpcywgYXBwbHlBcmdzKSA6CiAgICAgICAgICAgICAgICAgICAgICAgIHRhc2suY2FsbGJhY2suYXBwbHkoYXBwbHlUaGlzLCBhcHBseUFyZ3MpOwogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIFpvbmVEZWxlZ2F0ZS5wcm90b3R5cGUuY2FuY2VsVGFzayA9IGZ1bmN0aW9uICh0YXJnZXRab25lLCB0YXNrKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIHZhbHVlOwogICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLl9jYW5jZWxUYXNrWlMpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSB0aGlzLl9jYW5jZWxUYXNrWlMub25DYW5jZWxUYXNrKHRoaXMuX2NhbmNlbFRhc2tEbGd0LCB0aGlzLl9jYW5jZWxUYXNrQ3VyclpvbmUsIHRhcmdldFpvbmUsIHRhc2spOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCF0YXNrLmNhbmNlbEZuKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBFcnJvcignVGFzayBpcyBub3QgY2FuY2VsYWJsZScpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlID0gdGFzay5jYW5jZWxGbih0YXNrKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHZhbHVlOwogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIFpvbmVEZWxlZ2F0ZS5wcm90b3R5cGUuaGFzVGFzayA9IGZ1bmN0aW9uICh0YXJnZXRab25lLCBpc0VtcHR5KSB7CiAgICAgICAgICAgICAgICAgICAgLy8gaGFzVGFzayBzaG91bGQgbm90IHRocm93IGVycm9yIHNvIG90aGVyIFpvbmVEZWxlZ2F0ZQogICAgICAgICAgICAgICAgICAgIC8vIGNhbiBzdGlsbCB0cmlnZ2VyIGhhc1Rhc2sgY2FsbGJhY2sKICAgICAgICAgICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9oYXNUYXNrWlMgJiYKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2hhc1Rhc2taUy5vbkhhc1Rhc2sodGhpcy5faGFzVGFza0RsZ3QsIHRoaXMuX2hhc1Rhc2tDdXJyWm9uZSwgdGFyZ2V0Wm9uZSwgaXNFbXB0eSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGNhdGNoIChlcnIpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5oYW5kbGVFcnJvcih0YXJnZXRab25lLCBlcnIpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICAvLyB0c2xpbnQ6ZGlzYWJsZS1uZXh0LWxpbmU6cmVxdWlyZS1pbnRlcm5hbC13aXRoLXVuZGVyc2NvcmUKICAgICAgICAgICAgICAgIFpvbmVEZWxlZ2F0ZS5wcm90b3R5cGUuX3VwZGF0ZVRhc2tDb3VudCA9IGZ1bmN0aW9uICh0eXBlLCBjb3VudCkgewogICAgICAgICAgICAgICAgICAgIHZhciBjb3VudHMgPSB0aGlzLl90YXNrQ291bnRzOwogICAgICAgICAgICAgICAgICAgIHZhciBwcmV2ID0gY291bnRzW3R5cGVdOwogICAgICAgICAgICAgICAgICAgIHZhciBuZXh0ID0gY291bnRzW3R5cGVdID0gcHJldiArIGNvdW50OwogICAgICAgICAgICAgICAgICAgIGlmIChuZXh0IDwgMCkgewogICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ01vcmUgdGFza3MgZXhlY3V0ZWQgdGhlbiB3ZXJlIHNjaGVkdWxlZC4nKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgaWYgKHByZXYgPT0gMCB8fCBuZXh0ID09IDApIHsKICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGlzRW1wdHkgPSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtaWNyb1Rhc2s6IGNvdW50c1snbWljcm9UYXNrJ10gPiAwLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFjcm9UYXNrOiBjb3VudHNbJ21hY3JvVGFzayddID4gMCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2ZW50VGFzazogY291bnRzWydldmVudFRhc2snXSA+IDAsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGFuZ2U6IHR5cGUKICAgICAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5oYXNUYXNrKHRoaXMuem9uZSwgaXNFbXB0eSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIHJldHVybiBab25lRGVsZWdhdGU7CiAgICAgICAgICAgIH0oKSk7CiAgICAgICAgICAgIHZhciBab25lVGFzayA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgIGZ1bmN0aW9uIFpvbmVUYXNrKHR5cGUsIHNvdXJjZSwgY2FsbGJhY2ssIG9wdGlvbnMsIHNjaGVkdWxlRm4sIGNhbmNlbEZuKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gdHNsaW50OmRpc2FibGUtbmV4dC1saW5lOnJlcXVpcmUtaW50ZXJuYWwtd2l0aC11bmRlcnNjb3JlCiAgICAgICAgICAgICAgICAgICAgdGhpcy5fem9uZSA9IG51bGw7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5ydW5Db3VudCA9IDA7CiAgICAgICAgICAgICAgICAgICAgLy8gdHNsaW50OmRpc2FibGUtbmV4dC1saW5lOnJlcXVpcmUtaW50ZXJuYWwtd2l0aC11bmRlcnNjb3JlCiAgICAgICAgICAgICAgICAgICAgdGhpcy5fem9uZURlbGVnYXRlcyA9IG51bGw7CiAgICAgICAgICAgICAgICAgICAgLy8gdHNsaW50OmRpc2FibGUtbmV4dC1saW5lOnJlcXVpcmUtaW50ZXJuYWwtd2l0aC11bmRlcnNjb3JlCiAgICAgICAgICAgICAgICAgICAgdGhpcy5fc3RhdGUgPSAnbm90U2NoZWR1bGVkJzsKICAgICAgICAgICAgICAgICAgICB0aGlzLnR5cGUgPSB0eXBlOwogICAgICAgICAgICAgICAgICAgIHRoaXMuc291cmNlID0gc291cmNlOwogICAgICAgICAgICAgICAgICAgIHRoaXMuZGF0YSA9IG9wdGlvbnM7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5zY2hlZHVsZUZuID0gc2NoZWR1bGVGbjsKICAgICAgICAgICAgICAgICAgICB0aGlzLmNhbmNlbEZuID0gY2FuY2VsRm47CiAgICAgICAgICAgICAgICAgICAgaWYgKCFjYWxsYmFjaykgewogICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ2NhbGxiYWNrIGlzIG5vdCBkZWZpbmVkJyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHRoaXMuY2FsbGJhY2sgPSBjYWxsYmFjazsKICAgICAgICAgICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXM7CiAgICAgICAgICAgICAgICAgICAgLy8gVE9ETzogQEppYUxpUGFzc2lvbiBvcHRpb25zIHNob3VsZCBoYXZlIGludGVyZmFjZQogICAgICAgICAgICAgICAgICAgIGlmICh0eXBlID09PSBldmVudFRhc2sgJiYgb3B0aW9ucyAmJiBvcHRpb25zLnVzZUcpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5pbnZva2UgPSBab25lVGFzay5pbnZva2VUYXNrOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5pbnZva2UgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gWm9uZVRhc2suaW52b2tlVGFzay5jYWxsKGdsb2JhbCwgc2VsZiwgdGhpcywgYXJndW1lbnRzKTsKICAgICAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBab25lVGFzay5pbnZva2VUYXNrID0gZnVuY3Rpb24gKHRhc2ssIHRhcmdldCwgYXJncykgewogICAgICAgICAgICAgICAgICAgIGlmICghdGFzaykgewogICAgICAgICAgICAgICAgICAgICAgICB0YXNrID0gdGhpczsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgX251bWJlck9mTmVzdGVkVGFza0ZyYW1lcysrOwogICAgICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRhc2sucnVuQ291bnQrKzsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRhc2suem9uZS5ydW5UYXNrKHRhc2ssIHRhcmdldCwgYXJncyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGZpbmFsbHkgewogICAgICAgICAgICAgICAgICAgICAgICBpZiAoX251bWJlck9mTmVzdGVkVGFza0ZyYW1lcyA9PSAxKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkcmFpbk1pY3JvVGFza1F1ZXVlKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgX251bWJlck9mTmVzdGVkVGFza0ZyYW1lcy0tOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoWm9uZVRhc2sucHJvdG90eXBlLCAiem9uZSIsIHsKICAgICAgICAgICAgICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHsgcmV0dXJuIHRoaXMuX3pvbmU7IH0sCiAgICAgICAgICAgICAgICAgICAgZW51bWVyYWJsZTogdHJ1ZSwKICAgICAgICAgICAgICAgICAgICBjb25maWd1cmFibGU6IHRydWUKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KFpvbmVUYXNrLnByb3RvdHlwZSwgInN0YXRlIiwgewogICAgICAgICAgICAgICAgICAgIGdldDogZnVuY3Rpb24gKCkgeyByZXR1cm4gdGhpcy5fc3RhdGU7IH0sCiAgICAgICAgICAgICAgICAgICAgZW51bWVyYWJsZTogdHJ1ZSwKICAgICAgICAgICAgICAgICAgICBjb25maWd1cmFibGU6IHRydWUKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgWm9uZVRhc2sucHJvdG90eXBlLmNhbmNlbFNjaGVkdWxlUmVxdWVzdCA9IGZ1bmN0aW9uICgpIHsgdGhpcy5fdHJhbnNpdGlvblRvKG5vdFNjaGVkdWxlZCwgc2NoZWR1bGluZyk7IH07CiAgICAgICAgICAgICAgICAvLyB0c2xpbnQ6ZGlzYWJsZS1uZXh0LWxpbmU6cmVxdWlyZS1pbnRlcm5hbC13aXRoLXVuZGVyc2NvcmUKICAgICAgICAgICAgICAgIFpvbmVUYXNrLnByb3RvdHlwZS5fdHJhbnNpdGlvblRvID0gZnVuY3Rpb24gKHRvU3RhdGUsIGZyb21TdGF0ZTEsIGZyb21TdGF0ZTIpIHsKICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5fc3RhdGUgPT09IGZyb21TdGF0ZTEgfHwgdGhpcy5fc3RhdGUgPT09IGZyb21TdGF0ZTIpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fc3RhdGUgPSB0b1N0YXRlOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAodG9TdGF0ZSA9PSBub3RTY2hlZHVsZWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3pvbmVEZWxlZ2F0ZXMgPSBudWxsOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IodGhpcy50eXBlICsgIiAnIiArIHRoaXMuc291cmNlICsgIic6IGNhbiBub3QgdHJhbnNpdGlvbiB0byAnIiArIHRvU3RhdGUgKyAiJywgZXhwZWN0aW5nIHN0YXRlICciICsgZnJvbVN0YXRlMSArICInIiArIChmcm9tU3RhdGUyID8gJyBvciBcJycgKyBmcm9tU3RhdGUyICsgJ1wnJyA6ICcnKSArICIsIHdhcyAnIiArIHRoaXMuX3N0YXRlICsgIicuIik7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIFpvbmVUYXNrLnByb3RvdHlwZS50b1N0cmluZyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5kYXRhICYmIHR5cGVvZiB0aGlzLmRhdGEuaGFuZGxlSWQgIT09ICd1bmRlZmluZWQnKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmRhdGEuaGFuZGxlSWQudG9TdHJpbmcoKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nLmNhbGwodGhpcyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIC8vIGFkZCB0b0pTT04gbWV0aG9kIHRvIHByZXZlbnQgY3ljbGljIGVycm9yIHdoZW4KICAgICAgICAgICAgICAgIC8vIGNhbGwgSlNPTi5zdHJpbmdpZnkoem9uZVRhc2spCiAgICAgICAgICAgICAgICBab25lVGFzay5wcm90b3R5cGUudG9KU09OID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IHRoaXMudHlwZSwKICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGU6IHRoaXMuc3RhdGUsCiAgICAgICAgICAgICAgICAgICAgICAgIHNvdXJjZTogdGhpcy5zb3VyY2UsCiAgICAgICAgICAgICAgICAgICAgICAgIHpvbmU6IHRoaXMuem9uZS5uYW1lLAogICAgICAgICAgICAgICAgICAgICAgICBydW5Db3VudDogdGhpcy5ydW5Db3VudAogICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgcmV0dXJuIFpvbmVUYXNrOwogICAgICAgICAgICB9KCkpOwogICAgICAgICAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8KICAgICAgICAgICAgLy8vLy8vLy8vLy8vLy8vLy8vLy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AwKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gV2UgYXJlIG5vdCBydW5uaW5nIGluIFRhc2ssIHNvIHdlIG5lZWQgdG8ga2lja3N0YXJ0IHRoZSBtaWNyb3Rhc2sgcXVldWUuCiAgICAgICAgICAgICAgICAgICAgaWYgKCFuYXRpdmVNaWNyb1Rhc2tRdWV1ZVByb21pc2UpIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGdsb2JhbFtzeW1ib2xQcm9taXNlXSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgbmF0aXZlTWljcm9UYXNrUXVldWVQcm9taXNlID0gZ2xvYmFsW3N5bWJvbFByb21pc2VdLnJlc29sdmUoMCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgaWYgKG5hdGl2ZU1pY3JvVGFza1F1ZXVlUHJvbWlzZSkgewogICAgICAgICAgICAgICAgICAgICAgICB2YXIgbmF0aXZlVGhlbiA9IG5hdGl2ZU1pY3JvVGFza1F1ZXVlUHJvbWlzZVtzeW1ib2xUaGVuXTsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFuYXRpdmVUaGVuKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBuYXRpdmUgUHJvbWlzZSBpcyBub3QgcGF0Y2hhYmxlLCB3ZSBuZWVkIHRvIHVzZSBgdGhlbmAgZGlyZWN0bHkKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGlzc3VlIDEwNzgKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hdGl2ZVRoZW4gPSBuYXRpdmVNaWNyb1Rhc2tRdWV1ZVByb21pc2VbJ3RoZW4nXTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBuYXRpdmVUaGVuLmNhbGwobmF0aXZlTWljcm9UYXNrUXVldWVQcm9taXNlLCBkcmFpbk1pY3JvVGFza1F1ZXVlKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGdsb2JhbFtzeW1ib2xTZXRUaW1lb3V0XShkcmFpbk1pY3JvVGFza1F1ZXVlLCAwKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0YXNrICYmIF9taWNyb1Rhc2tRdWV1ZS5wdXNoKHRhc2spOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGZ1bmN0aW9uIGRyYWluTWljcm9UYXNrUXVldWUoKSB7CiAgICAgICAgICAgICAgICBpZiAoIV9pc0RyYWluaW5nTWljcm90YXNrUXVldWUpIHsKICAgICAgICAgICAgICAgICAgICBfaXNEcmFpbmluZ01pY3JvdGFza1F1ZXVlID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICB3aGlsZSAoX21pY3JvVGFza1F1ZXVlLmxlbmd0aCkgewogICAgICAgICAgICAgICAgICAgICAgICB2YXIgcXVldWUgPSBfbWljcm9UYXNrUXVldWU7CiAgICAgICAgICAgICAgICAgICAgICAgIF9taWNyb1Rhc2tRdWV1ZSA9IFtdOwogICAgICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHF1ZXVlLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdGFzayA9IHF1ZXVlW2ldOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YXNrLnpvbmUucnVuVGFzayh0YXNrLCBudWxsLCBudWxsKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhdGNoIChlcnJvcikgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9hcGkub25VbmhhbmRsZWRFcnJvcihlcnJvcik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgX2FwaS5taWNyb3Rhc2tEcmFpbkRvbmUoKTsKICAgICAgICAgICAgICAgICAgICBfaXNEcmFpbmluZ01pY3JvdGFza1F1ZXVlID0gZmFsc2U7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vCiAgICAgICAgICAgIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLwogICAgICAgICAgICAvLy8gIEJPT1RTVFJBUAogICAgICAgICAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8KICAgICAgICAgICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vCiAgICAgICAgICAgIHZhciBOT19aT05FID0geyBuYW1lOiAnTk8gWk9ORScgfTsKICAgICAgICAgICAgdmFyIG5vdFNjaGVkdWxlZCA9ICdub3RTY2hlZHVsZWQnLCBzY2hlZHVsaW5nID0gJ3NjaGVkdWxpbmcnLCBzY2hlZHVsZWQgPSAnc2NoZWR1bGVkJywgcnVubmluZyA9ICdydW5uaW5nJywgY2FuY2VsaW5nID0gJ2NhbmNlbGluZycsIHVua25vd24gPSAndW5rbm93bic7CiAgICAgICAgICAgIHZhciBtaWNyb1Rhc2sgPSAnbWljcm9UYXNrJywgbWFjcm9UYXNrID0gJ21hY3JvVGFzaycsIGV2ZW50VGFzayA9ICdldmVudFRhc2snOwogICAgICAgICAgICB2YXIgcGF0Y2hlcyA9IHt9OwogICAgICAgICAgICB2YXIgX2FwaSA9IHsKICAgICAgICAgICAgICAgIHN5bWJvbDogX19zeW1ib2xfXywKICAgICAgICAgICAgICAgIGN1cnJlbnRab25lRnJhbWU6IGZ1bmN0aW9uICgpIHsgcmV0dXJuIF9jdXJyZW50Wm9uZUZyYW1lOyB9LAogICAgICAgICAgICAgICAgb25VbmhhbmRsZWRFcnJvcjogbm9vcCwKICAgICAgICAgICAgICAgIG1pY3JvdGFza0RyYWluRG9uZTogbm9vcCwKICAgICAgICAgICAgICAgIHNjaGVkdWxlTWljcm9UYXNrOiBzY2hlZHVsZU1pY3JvVGFzaywKICAgICAgICAgICAgICAgIHNob3dVbmNhdWdodEVycm9yOiBmdW5jdGlvbiAoKSB7IHJldHVybiAhWm9uZVtfX3N5bWJvbF9fKCdpZ25vcmVDb25zb2xlRXJyb3JVbmNhdWdodEVycm9yJyldOyB9LAogICAgICAgICAgICAgICAgcGF0Y2hFdmVudFRhcmdldDogZnVuY3Rpb24gKCkgeyByZXR1cm4gW107IH0sCiAgICAgICAgICAgICAgICBwYXRjaE9uUHJvcGVydGllczogbm9vcCwKICAgICAgICAgICAgICAgIHBhdGNoTWV0aG9kOiBmdW5jdGlvbiAoKSB7IHJldHVybiBub29wOyB9LAogICAgICAgICAgICAgICAgYmluZEFyZ3VtZW50czogZnVuY3Rpb24gKCkgeyByZXR1cm4gW107IH0sCiAgICAgICAgICAgICAgICBwYXRjaFRoZW46IGZ1bmN0aW9uICgpIHsgcmV0dXJuIG5vb3A7IH0sCiAgICAgICAgICAgICAgICBwYXRjaE1hY3JvVGFzazogZnVuY3Rpb24gKCkgeyByZXR1cm4gbm9vcDsgfSwKICAgICAgICAgICAgICAgIHNldE5hdGl2ZVByb21pc2U6IGZ1bmN0aW9uIChOYXRpdmVQcm9taXNlKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gc29tZXRpbWVzIE5hdGl2ZVByb21pc2UucmVzb2x2ZSBzdGF0aWMgZnVuY3Rpb24KICAgICAgICAgICAgICAgICAgICAvLyBpcyBub3QgcmVhZHkgeWV0LCAoc3VjaCBhcyBjb3JlLWpzL2VzNi5wcm9taXNlKQogICAgICAgICAgICAgICAgICAgIC8vIHNvIHdlIG5lZWQgdG8gY2hlY2sgaGVyZS4KICAgICAgICAgICAgICAgICAgICBpZiAoTmF0aXZlUHJvbWlzZSAmJiB0eXBlb2YgTmF0aXZlUHJvbWlzZS5yZXNvbHZlID09PSAnZnVuY3Rpb24nKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG5hdGl2ZU1pY3JvVGFza1F1ZXVlUHJvbWlzZSA9IE5hdGl2ZVByb21pc2UucmVzb2x2ZSgwKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgcGF0Y2hFdmVudFByb3RvdHlwZTogZnVuY3Rpb24gKCkgeyByZXR1cm4gbm9vcDsgfSwKICAgICAgICAgICAgICAgIGlzSUVPckVkZ2U6IGZ1bmN0aW9uICgpIHsgcmV0dXJuIGZhbHNlOyB9LAogICAgICAgICAgICAgICAgZ2V0R2xvYmFsT2JqZWN0czogZnVuY3Rpb24gKCkgeyByZXR1cm4gdW5kZWZpbmVkOyB9LAogICAgICAgICAgICAgICAgT2JqZWN0RGVmaW5lUHJvcGVydHk6IGZ1bmN0aW9uICgpIHsgcmV0dXJuIG5vb3A7IH0sCiAgICAgICAgICAgICAgICBPYmplY3RHZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3I6IGZ1bmN0aW9uICgpIHsgcmV0dXJuIHVuZGVmaW5lZDsgfSwKICAgICAgICAgICAgICAgIE9iamVjdENyZWF0ZTogZnVuY3Rpb24gKCkgeyByZXR1cm4gdW5kZWZpbmVkOyB9LAogICAgICAgICAgICAgICAgQXJyYXlTbGljZTogZnVuY3Rpb24gKCkgeyByZXR1cm4gW107IH0sCiAgICAgICAgICAgICAgICBwYXRjaENsYXNzOiBmdW5jdGlvbiAoKSB7IHJldHVybiBub29wOyB9LAogICAgICAgICAgICAgICAgd3JhcFdpd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lIGlzIGdvdmVybmVkIGJ5IGFuIE1JVC1zdHlsZSBsaWNlbnNlIHRoYXQgY2FuIGJlCiAgICAgICAgICogZm91bmQgaW4gdGhlIExJQ0VOU0UgZmlsZSBhdCBodHRwczovL2FuZ3VsYXIuaW8vbGljZW5zZQogICAgICAgICAqLwogICAgICAgIFpvbmUuX19sb2FkX3BhdGNoKCdab25lQXdhcmVQcm9taXNlJywgZnVuY3Rpb24gKGdsb2JhbCwgWm9uZSwgYXBpKSB7CiAgICAgICAgICAgIHZhciBPYmplY3RHZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IgPSBPYmplY3QuZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yOwogICAgICAgICAgICB2YXIgT2JqZWN0RGVmaW5lUHJvcGVydHkgPSBPYmplY3QuZGVmaW5lUHJvcGVydHk7CiAgICAgICAgICAgIGZ1bmN0aW9uIHJlYWRhYmxlT2JqZWN0VG9TdHJpbmcob2JqKSB7CiAgICAgICAgICAgICAgICBpZiAob2JqICYmIG9iai50b1N0cmluZyA9PT0gT2JqZWN0LnByb3RvdHlwZS50b1N0cmluZykgewogICAgICAgICAgICAgICAgICAgIHZhciBjbGFzc05hbWUgPSBvYmouY29uc3RydWN0b3IgJiYgb2JqLmNvbnN0cnVjdG9yLm5hbWU7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIChjbGFzc05hbWUgPyBjbGFzc05hbWUgOiAnJykgKyAnOiAnICsgSlNPTi5zdHJpbmdpZnkob2JqKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiBvYmogPyBvYmoudG9TdHJpbmcoKSA6IE9iamVjdC5wcm90b3R5cGUudG9TdHJpbmcuY2FsbChvYmopOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciBfX3N5bWJvbF9fID0gYXBpLnN5bWJvbDsKICAgICAgICAgICAgdmFyIF91bmNhdWdodFByb21pc2VFcnJvcnMgPSBbXTsKICAgICAgICAgICAgdmFyIGlzRGlzYWJsZVdyYXBwaW5nVW5jYXVnaHRQcm9taXNlUmVqZWN0aW9uID0gZ2xvYmFsW19fc3ltYm9sX18oJ0RJU0FCTEVfV1JBUFBJTkdfVU5DQVVHSFRfUFJPTUlTRV9SRUpFQ1RJT04nKV0gPT09IHRydWU7CiAgICAgICAgICAgIHZhciBzeW1ib2xQcm9taXNlID0gX19zeW1ib2xfXygnUHJvbWlzZScpOwogICAgICAgICAgICB2YXIgc3ltYm9sVGhlbiA9IF9fc3ltYm9sX18oJ3RoZW4nKTsKICAgICAgICAgICAgdmFyIGNyZWF0aW9uVHJhY2UgPSAnX19jcmVhdGlvblRyYWNlX18nOwogICAgICAgICAgICBhcGkub25VbmhhbmRsZWRFcnJvciA9IGZ1bmN0aW9uIChlKSB7CiAgICAgICAgICAgICAgICBpZiAoYXBpLnNob3dVbmNhdWdodEVycm9yKCkpIHsKICAgICAgICAgICAgICAgICAgICB2YXIgcmVqZWN0aW9uID0gZSAmJiBlLnJlamVjdGlvbjsKICAgICAgICAgICAgICAgICAgICBpZiAocmVqZWN0aW9uKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoJ1VuaGFuZGxlZCBQcm9taXNlIHJlamVjdGlvbjonLCByZWplY3Rpb24gaW5zdGFuY2VvZiBFcnJvciA/IHJlamVjdGlvbi5tZXNzYWdlIDogcmVqZWN0aW9uLCAnOyBab25lOicsIGUuem9uZS5uYW1lLCAnOyBUYXNrOicsIGUudGFzayAmJiBlLnRhc2suc291cmNlLCAnOyBWYWx1ZTonLCByZWplY3Rpb24sIHJlamVjdGlvbiBpbnN0YW5jZW9mIEVycm9yID8gcmVqZWN0aW9uLnN0YWNrIDogdW5kZWZpbmVkKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoZSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9OwogICAgICAgICAgICBhcGkubWljcm90YXNrRHJhaW5Eb25lID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgdmFyIF9sb29wXzEgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIHVuY2F1Z2h0UHJvbWlzZUVycm9yID0gX3VuY2F1Z2h0UHJvbWlzZUVycm9ycy5zaGlmdCgpOwogICAgICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHVuY2F1Z2h0UHJvbWlzZUVycm9yLnpvbmUucnVuR3VhcmRlZChmdW5jdGlvbiAoKSB7IHRocm93IHVuY2F1Z2h0UHJvbWlzZUVycm9yOyB9KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgY2F0Y2ggKGVycm9yKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGhhbmRsZVVuaGFuZGxlZFJlamVjdGlvbihlcnJvcik7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIHdoaWxlIChfdW5jYXVnaHRQcm9taXNlRXJyb3JzLmxlbmd0aCkgewogICAgICAgICAgICAgICAgICAgIF9sb29wXzEoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfTsKICAgICAgICAgICAgdmFyIFVOSEFORExFRF9QUk9NSVNFX1JFSkVDVElPTl9IQU5ETEVSX1NZTUJPTCA9IF9fc3ltYm9sX18oJ3VuaGFuZGxlZFByb21pc2VSZWplY3Rpb25IYW5kbGVyJyk7CiAgICAgICAgICAgIGZ1bmN0aW9uIGhhbmRsZVVuaGFuZGxlZFJlamVjdGlvbihlKSB7CiAgICAgICAgICAgICAgICBhcGkub25VbmhhbmRsZWRFcnJvcihlKTsKICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIGhhbmRsZXIgPSBab25lW1VOSEFORExFRF9QUk9NSVNFX1JFSkVDVElPTl9IQU5ETEVSX1NZTUJPTF07CiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBoYW5kbGVyID09PSAnZnVuY3Rpb24nKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGhhbmRsZXIuY2FsbCh0aGlzLCBlKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjYXRjaCAoZXJyKSB7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZnVuY3Rpb24gaXNUaGVuYWJsZSh2YWx1ZSkgeyByZXR1cm4gdmFsdWUgJiYgdmFsdWUudGhlbjsgfQogICAgICAgICAgICBmdW5jdGlvbiBmb3J3YXJkUmVzb2x1dGlvbih2YWx1ZSkgeyByZXR1cm4gdmFsdWU7IH0KICAgICAgICAgICAgZnVuY3Rpb24gZm9yd2FyZFJlamVjdGlvbihyZWplY3Rpb24pIHsgcmV0dXJuIFpvbmVBd2FyZVByb21pc2UucmVqZWN0KHJlamVjdGlvbik7IH0KICAgICAgICAgICAgdmFyIHN5bWJvbFN0YXRlID0gX19zeW1ib2xfXygnc3RhdGUnKTsKICAgICAgICAgICAgdmFyIHN5bWJvbFZhbHVlID0gX19zeW1ib2xfXygndmFsdWUnKTsKICAgICAgICAgICAgdmFyIHN5bWJvbEZpbmFsbHkgPSBfX3N5bWJvbF9fKCdmaW5hbGx5Jyk7CiAgICAgICAgICAgIHZhciBzeW1ib2xQYXJlbnRQcm9taXNlVmFsdWUgPSBfX3N5bWJvbF9fKCdwYXJlbnRQcm9taXNlVmFsdWUnKTsKICAgICAgICAgICAgdmFyIHN5bWJvbFBhcmVudFByb21pc2VTdGF0ZSA9IF9fc3ltYm9sX18oJ3BhcmVudFByb21pc2VTdGF0ZScpOwogICAgICAgICAgICB2YXIgc291cmNlID0gJ1Byb21pc2UudGhlbic7CiAgICAgICAgICAgIHZhciBVTlJFU09MVkVEID0gbnVsbDsKICAgICAgICAgICAgdmFyIFJFU09MVkVEID0gdHJ1ZTsKICAgICAgICAgICAgdmFyIFJFSkVDVEVEID0gZmFsc2U7CiAgICAgICAgICAgIHZhciBSRUpFQ1RFRF9OT19DQVRDSCA9IDA7CiAgICAgICAgICAgIGZ1bmN0aW9uIG1ha2VSZXNvbHZlcihwcm9taXNlLCBzdGF0ZSkgewogICAgICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uICh2KSB7CiAgICAgICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZVByb21pc2UocHJvbWlzZSwgc3RhdGUsIHYpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBjYXRjaCAoZXJyKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmVQcm9taXNlKHByb21pc2UsIGZhbHNlLCBlcnIpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAvLyBEbyBub3QgcmV0dXJuIHZhbHVlIG9yIHlvdSB3aWxsIGJyZWFrIHRoZSBQcm9taXNlIHNwZWMuCiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciBvbmNlID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgdmFyIHdhc0NhbGxlZCA9IGZhbHNlOwogICAgICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIHdyYXBwZXIod3JhcHBlZEZ1bmN0aW9uKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHdhc0NhbGxlZCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIHdhc0NhbGxlZCA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgICAgIHdyYXBwZWRGdW5jdGlvbi5hcHBseShudWxsLCBhcmd1bWVudHMpOwogICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9OwogICAgICAgICAgICB2YXIgVFlQRV9FUlJPUiA9ICdQcm9taXNlIHJlc29sdmVkIHdpdGggaXRzZWxmJzsKICAgICAgICAgICAgdmFyIENVUlJFTlRfVEFTS19UUkFDRV9TWU1CT0wgPSBfX3N5bWJvbF9fKCdjdXJyZW50VGFza1RyYWNlJyk7CiAgICAgICAgICAgIC8vIFByb21pc2UgUmVzb2x1dGlvbgogICAgICAgICAgICBmdW5jdGlvbiByZXNvbHZlUHJvbWlzZShwcm9taXNlLCBzdGF0ZSwgdmFsdWUpIHsKICAgICAgICAgICAgICAgIHZhciBvbmNlV3JhcHBlciA9IG9uY2UoKTsKICAgICAgICAgICAgICAgIGlmIChwcm9taXNlID09PSB2YWx1ZSkgewogICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoVFlQRV9FUlJPUik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAocHJvbWlzZVtzeW1ib2xTdGF0ZV0gPT09IFVOUkVTT0xWRUQpIHsKICAgICAgICAgICAgICAgICAgICAvLyBzaG91bGQgb25seSBnZXQgdmFsdWUudGhlbiBvbmNlIGJhc2VkIG9uIHByb21pc2Ugc3BlYy4KICAgICAgICAgICAgICAgICAgICB2YXIgdGhlbiA9IG51bGw7CiAgICAgICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiB2YWx1ZSA9PT0gJ29iamVjdCcgfHwgdHlwZW9mIHZhbHVlID09PSAnZnVuY3Rpb24nKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGVuID0gdmFsdWUgJiYgdmFsdWUudGhlbjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBjYXRjaCAoZXJyKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG9uY2VXcmFwcGVyKGZ1bmN0aW9uICgpIHsgcmVzb2x2ZVByb21pc2UocHJvbWlzZSwgZmFsc2UsIGVycik7IH0pKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwcm9taXNlOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAvLyBpZiAodmFsdWUgaW5zdGFuY2VvZiBab25lQXdhcmVQcm9taXNlKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKHN0YXRlICE9PSBSRUpFQ1RFRCAmJiB2YWx1ZSBpbnN0YW5jZW9mIFpvbmVBd2FyZVByb21pc2UgJiYKICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUuaGFzT3duUHJvcGVydHkoc3ltYm9sU3RhdGUpICYmIHZhbHVlLmhhc093blByb3BlcnR5KHN5bWJvbFZhbHVlKSAmJgogICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZVtzeW1ib2xTdGF0ZV0gIT09IFVOUkVTT0xWRUQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJSZWplY3RlZE5vQ2F0Y2godmFsdWUpOwogICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlUHJvbWlzZShwcm9taXNlLCB2YWx1ZVtzeW1ib2xTdGF0ZV0sIHZhbHVlW3N5bWJvbFZhbHVlXSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHN0YXRlICE9PSBSRUpFQ1RFRCAmJiB0eXBlb2YgdGhlbiA9PT0gJ2Z1bmN0aW9uJykgewogICAgICAgICAgICAgICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhlbi5jYWxsKHZhbHVlLCBvbmNlV3JhcHBlcihtYWtlUmVzb2x2ZXIocHJvbWlzZSwgc3RhdGUpKSwgb25jZVdyYXBwZXIobWFrZVJlc29sdmVyKHByb21pc2UsIGZhbHNlKSkpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGNhdGNoIChlcnIpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uY2VXcmFwcGVyKGZ1bmN0aW9uICgpIHsgcmVzb2x2ZVByb21pc2UocHJvbWlzZSwgZmFsc2UsIGVycik7IH0pKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHByb21pc2Vbc3ltYm9sU3RhdGVdID0gc3RhdGU7CiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBxdWV1ZSA9IHByb21pc2Vbc3ltYm9sVmFsdWVdOwogICAgICAgICAgICAgICAgICAgICAgICBwcm9taXNlW3N5bWJvbFZhbHVlXSA9IHZhbHVlOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAocHJvbWlzZVtzeW1ib2xGaW5hbGx5XSA9PT0gc3ltYm9sRmluYWxseSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gdGhlIHByb21pc2UgaXMgZ2VuZXJhdGVkIGJ5IFByb21pc2UucHJvdG90eXBlLmZpbmFsbHkKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzdGF0ZSA9PT0gUkVTT0xWRUQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyB0aGUgc3RhdGUgaXMgcmVzb2x2ZWQsIHNob3VsZCBpZ25vcmUgdGhlIHZhbHVlCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gYW5kIHVzZSBwYXJlbnQgcHJvbWlzZSB2YWx1ZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb21pc2Vbc3ltYm9sU3RhdGVdID0gcHJvbWlzZVtzeW1ib2xQYXJlbnRQcm9taXNlU3RhdGVdOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb21pc2Vbc3ltYm9sVmFsdWVdID0gcHJvbWlzZVtzeW1ib2xQYXJlbnRQcm9taXNlVmFsdWVdOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHJlY29yZCB0YXNrIGluZm9ybWF0aW9uIGluIHZhbHVlIHdoZW4gZXJyb3Igb2NjdXJzLCBzbyB3ZSBjYW4KICAgICAgICAgICAgICAgICAgICAgICAgLy8gZG8gc29tZSBhZGRpdGlvbmFsIHdvcmsgc3VjaCBhcyByZW5kZXIgbG9uZ1N0YWNrVHJhY2UKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHN0YXRlID09PSBSRUpFQ1RFRCAmJiB2YWx1ZSBpbnN0YW5jZW9mIEVycm9yKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBjaGVjayBpZiBsb25nU3RhY2tUcmFjZVpvbmUgaXMgaGVyZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRyYWNlID0gWm9uZS5jdXJyZW50VGFzayAmJiBab25lLmN1cnJlbnRUYXNrLmRhdGEgJiYKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBab25lLmN1cnJlbnRUYXNrLmRhdGFbY3JlYXRpb25UcmFjZV07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodHJhY2UpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBvbmx5IGtlZXAgdGhlIGxvbmcgc3RhY2sgdHJhY2UgaW50byBlcnJvciB3aGVuIGluIGxvbmdTdGFja1RyYWNlWm9uZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE9iamVjdERlZmluZVByb3BlcnR5KHZhbHVlLCBDVVJSRU5UX1RBU0tfVFJBQ0VfU1lNQk9MLCB7IGNvbmZpZ3VyYWJsZTogdHJ1ZSwgZW51bWVyYWJsZTogZmFsc2UsIHdyaXRhYmxlOiB0cnVlLCB2YWx1ZTogdHJhY2UgfSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBxdWV1ZS5sZW5ndGg7KSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY2hlZHVsZVJlc29sdmVPclJlamVjdChwcm9taXNlLCBxdWV1ZVtpKytdLCBxdWV1ZVtpKytdLCBxdWV1ZVtpKytdLCBxdWV1ZVtpKytdKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBpZiAocXVldWUubGVuZ3RoID09IDAgJiYgc3RhdGUgPT0gUkVKRUNURUQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb21pc2Vbc3ltYm9sU3RhdGVdID0gUkVKRUNURURfTk9fQ0FUQ0g7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdW5jYXVnaHRQcm9taXNlRXJyb3IgPSB2YWx1ZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghaXNEaXNhYmxlV3JhcHBpbmdVbmNhdWdodFByb21pc2VSZWplY3Rpb24pIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBJZiBkaXNhYmxlIHdyYXBwaW5nIHVuY2F1Z2h0IHByb21pc2UgcmVqZWN0CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gYW5kIHRoZSByZWplY3RlZCB2YWx1ZSBpcyBhbiBFcnJvciBvYmplY3QsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gdXNlIHRoZSB2YWx1ZSBpbnN0ZWFkIG9mIHdyYXBwaW5nIGl0LgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEhlcmUgd2UgdGhyb3dzIGEgbmV3IEVycm9yIHRvIHByaW50IG1vcmUgcmVhZGFibGUgZXJyb3IgbG9nCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGFuZCBpZiB0aGUgdmFsdWUgaXMgbm90IGFuIGVycm9yLCB6b25lLmpzIGJ1aWxkcyBhbiBgRXJyb3JgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIE9iamVjdCBoZXJlIHRvIGF0dGFjaCB0aGUgc3RhY2sgaW5mb3JtYXRpb24uCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignVW5jYXVnaHQgKGluIHByb21pc2UpOiAnICsgcmVhZGFibGVPYmplY3RUb1N0cmluZyh2YWx1ZSkgKwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHZhbHVlICYmIHZhbHVlLnN0YWNrID8gJ1xuJyArIHZhbHVlLnN0YWNrIDogJycpKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2F0Y2ggKGVycikgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bmNhdWdodFByb21pc2VFcnJvciA9IGVycjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bmNhdWdodFByb21pc2VFcnJvci5yZWplY3Rpb24gPSB2YWx1ZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuY2F1Z2h0UHJvbWlzZUVycm9yLnByb21pc2UgPSBwcm9taXNlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5jYXVnaHRQcm9taXNlRXJyb3Iuem9uZSA9IFpvbmUuY3VycmVudDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuY2F1Z2h0UHJvbWlzZUVycm9yLnRhc2sgPSBab25lLmN1cnJlbnRUYXNrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgX3VuY2F1Z2h0UHJvbWlzZUVycm9ycy5wdXNoKHVuY2F1Z2h0UHJvbWlzZUVycm9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFwaS5zY2hlZHVsZU1pY3JvVGFzaygpOyAvLyB0byBtYWtlIHN1cmUgdGhhdCBpdCBpcyBydW5uaW5nCiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvLyBSZXNvbHZpbmcgYW4gYWxyZWFkeSByZXNvbHZlZCBwcm9taXNlIGlzIGEgbm9vcC4KICAgICAgICAgICAgICAgIHJldHVybiBwcm9taXNlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciBSRUpFQ1RJT05fSEFORExFRF9IQU5ETEVSID0gX19zeW1ib2xfXygncmVqZWN0aW9uSGFuZGxlZEhhbmRsZXInKTsKICAgICAgICAgICAgZnVuY3Rpb24gY2xlYXJSZWplY3RlZE5vQ2F0Y2gocHJvbWlzZSkgewogICAgICAgICAgICAgICAgaWYgKHByb21pc2Vbc3ltYm9sU3RhdGVdID09PSBSRUpFQ1RFRF9OT19DQVRDSCkgewogICAgICAgICAgICAgICAgICAgIC8vIGlmIHRoZSBwcm9taXNlIGlzIHJlamVjdGVkIG5vIGNhdGNoIHN0YXR1cwogICAgICAgICAgICAgICAgICAgIC8vIGFuZCBxdWV1ZS5sZW5ndGggPiAwLCBtZWFucyB0aGVyZSBpcyBhIGVycm9yIGhhbmRsZXIKICAgICAgICAgICAgICAgICAgICAvLyBoZXJlIHRvIGhhbmRsZSB0aGUgcmVqZWN0ZWQgcHJvbWlzZSwgd2Ugc2hvdWxkIHRyaWdnZXIKICAgICAgICAgICAgICAgICAgICAvLyB3aW5kb3dzLnJlamVjdGlvbmhhbmRsZWQgZXZlbnRIYW5kbGVyIG9yIG5vZGVqcyByZWplY3Rpb25IYW5kbGVkCiAgICAgICAgICAgICAgICAgICAgLy8gZXZlbnRIYW5kbGVyCiAgICAgICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGhhbmRsZXIgPSBab25lW1JFSkVDVElPTl9IQU5ETEVEX0hBTkRMRVJdOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAoaGFuZGxlciAmJiB0eXBlb2YgaGFuZGxlciA9PT0gJ2Z1bmN0aW9uJykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgaGFuZGxlci5jYWxsKHRoaXMsIHsgcmVqZWN0aW9uOiBwcm9taXNlW3N5bWJvbFZhbHVlXSwgcHJvbWlzZTogcHJvbWlzZSB9KTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBjYXRjaCAoZXJyKSB7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHByb21pc2Vbc3ltYm9sU3RhdGVdID0gUkVKRUNURUQ7CiAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBfdW5jYXVnaHRQcm9taXNlRXJyb3JzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwcm9taXNlID09PSBfdW5jYXVnaHRQcm9taXNlRXJyb3JzW2ldLnByb21pc2UpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIF91bmNhdWdodFByb21pc2VFcnJvcnMuc3BsaWNlKGksIDEpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGZ1bmN0aW9uIHNjaGVkdWxlUmVzb2x2ZU9yUmVqZWN0KHByb21pc2UsIHpvbmUsIGNoYWluUHJvbWlzZSwgb25GdWxmaWxsZWQsIG9uUmVqZWN0ZWQpIHsKICAgICAgICAgICAgICAgIGNsZWFyUmVqZWN0ZWROb0NhdGNoKHByb21pc2UpOwogICAgICAgICAgICAgICAgdmFyIHByb21pc2VTdGF0ZSA9IHByb21pc2Vbc3ltYm9sU3RhdGVdOwogICAgICAgICAgICAgICAgdmFyIGRlbGVnYXRlID0gcHJvbWlzZVN0YXRlID8KICAgICAgICAgICAgICAgICAgICAodHlwZW9mIG9uRnVsZmlsbGVkID09PSAnZnVuY3Rpb24nKSA/IG9uRnVsZmlsbGVkIDogZm9yd2FyZFJlc29sdXRpb24gOgogICAgICAgICAgICAgICAgICAgICh0eXBlb2Ygb25SZWplY3RlZCA9PT0gJ2Z1bmN0aW9uJykgPyBvblJlamVjdGVkIDogZm9yd2FyZFJlamVjdGlvbjsKICAgICAgICAgICAgICAgIHpvbmUuc2NoZWR1bGVNaWNyb1Rhc2soc291cmNlLCBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHBhcmVudFByb21pc2VWYWx1ZSA9IHByb21pc2Vbc3ltYm9sVmFsdWVdOwogICAgICAgICAgICAgICAgICAgICAgICB2YXIgaXNGaW5hbGx5UHJvbWlzZSA9ICEhY2hhaW5Qcm9taXNlICYmIHN5bWJvbEZpbmFsbHkgPT09IGNoYWluUHJvbWlzZVtzeW1ib2xGaW5hbGx5XTsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlzRmluYWxseVByb21pc2UpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGlmIHRoZSBwcm9taXNlIGlzIGdlbmVyYXRlZCBmcm9tIGZpbmFsbHkgY2FsbCwga2VlcCBwYXJlbnQgcHJvbWlzZSdzIHN0YXRlIGFuZCB2YWx1ZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hhaW5Qcm9taXNlW3N5bWJvbFBhcmVudFByb21pc2VWYWx1ZV0gPSBwYXJlbnRQcm9taXNlVmFsdWU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGFpblByb21pc2Vbc3ltYm9sUGFyZW50UHJvbWlzZVN0YXRlXSA9IHByb21pc2VTdGF0ZTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAvLyBzaG91bGQgbm90IHBhc3MgdmFsdWUgdG8gZmluYWxseSBjYWxsYmFjawogICAgICAgICAgICAgICAgICAgICAgICB2YXIgdmFsdWUgPSB6b25lLnJ1bihkZWxlZ2F0ZSwgdW5kZWZpbmVkLCBpc0ZpbmFsbHlQcm9taXNlICYmIGRlbGVnYXRlICE9PSBmb3J3YXJkUmVqZWN0aW9uICYmIGRlbGVnYXRlICE9PSBmb3J3YXJkUmVzb2x1dGlvbiA/CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSA6CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBbcGFyZW50UHJvbWlzZVZhbHVlXSk7CiAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmVQcm9taXNlKGNoYWluUHJvbWlzZSwgdHJ1ZSwgdmFsdWUpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBjYXRjaCAoZXJyb3IpIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gaWYgZXJyb3Igb2NjdXJzLCBzaG91bGQgYWx3YXlzIHJldHVybiB0aGlzIGVycm9yCiAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmVQcm9taXNlKGNoYWluUHJvbWlzZSwgZmFsc2UsIGVycm9yKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9LCBjaGFpblByb21pc2UpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciBaT05FX0FXQVJFX1BST01JU0VfVE9fU1RSSU5HID0gJ2Z1bmN0aW9uIFpvbmVBd2FyZVByb21pc2UoKSB7IFtuYXRpdmUgY29kZV0gfSc7CiAgICAgICAgICAgIHZhciBub29wID0gZnVuY3Rpb24gKCkgeyB9OwogICAgICAgICAgICB2YXIgWm9uZUF3YXJlUHJvbWlzZSA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgIGZ1bmN0aW9uIFpvbmVBd2FyZVByb21pc2UoZXhlY3V0b3IpIHsKICAgICAgICAgICAgICAgICAgICB2YXIgcHJvbWlzZSA9IHRoaXM7CiAgICAgICAgICAgICAgICAgICAgaWYgKCEocHJvbWlzZSBpbnN0YW5jZW9mIFpvbmVBd2FyZVByb21pc2UpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignTXVzdCBiZSBhbiBpbnN0YW5jZW9mIFByb21pc2UuJyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHByb21pc2Vbc3ltYm9sU3RhdGVdID0gVU5SRVNPTFZFRDsKICAgICAgICAgICAgICAgICAgICBwcm9taXNlW3N5bWJvbFZhbHVlXSA9IFtdOyAvLyBxdWV1ZTsKICAgICAgICAgICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgICAgICAgICBleGVjdXRvciAmJiBleGVjdXRvcihtYWtlUmVzb2x2ZXIocHJvbWlzZSwgUkVTT0xWRUQpLCBtYWtlUmVzb2x2ZXIocHJvbWlzZSwgUkVKRUNURUQpKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgY2F0Y2ggKGVycm9yKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmVQcm9taXNlKHByb21pc2UsIGZhbHNlLCBlcnJvcik7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgWm9uZUF3YXJlUHJvbWlzZS50b1N0cmluZyA9IGZ1bmN0aW9uICgpIHsgcmV0dXJuIFpPTkVfQVdBUkVfUFJPTUlTRV9UT19TVFJJTkc7IH07CiAgICAgICAgICAgICAgICBab25lQXdhcmVQcm9taXNlLnJlc29sdmUgPSBmdW5jdGlvbiAodmFsdWUpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzb2x2ZVByb21pc2UobmV3IHRoaXMobnVsbCksIFJFU09MVkVELCB2YWx1ZSk7CiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgWm9uZUF3YXJlUHJvbWlzZS5yZWplY3QgPSBmdW5jdGlvbiAoZXJyb3IpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzb2x2ZVByb21pc2UobmV3IHRoaXMobnVsbCksIFJFSkVDVEVELCBlcnJvcik7CiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgWm9uZUF3YXJlUHJvbWlzZS5yYWNlID0gZnVuY3Rpb24gKHZhbHVlcykgewogICAgICAgICAgICAgICAgICAgIHZhciByZXNvbHZlOwogICAgICAgICAgICAgICAgICAgIHZhciByZWplY3Q7CiAgICAgICAgICAgICAgICAgICAgdmFyIHByb21pc2UgPSBuZXcgdGhpcyhmdW5jdGlvbiAocmVzLCByZWopIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZSA9IHJlczsKICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0ID0gcmVqOwogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIG9uUmVzb2x2ZSh2YWx1ZSkgeyByZXNvbHZlKHZhbHVlKTsgfQogICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIG9uUmVqZWN0KGVycm9yKSB7IHJlamVjdChlcnJvcik7IH0KICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBfaSA9IDAsIHZhbHVlc18xID0gdmFsdWVzOyBfaSA8IHZhbHVlc18xLmxlbmd0aDsgX2krKykgewogICAgICAgICAgICAgICAgICAgICAgICB2YXIgdmFsdWUgPSB2YWx1ZXNfMVtfaV07CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghaXNUaGVuYWJsZSh2YWx1ZSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlID0gdGhpcy5yZXNvbHZlKHZhbHVlKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZS50aGVuKG9uUmVzb2x2ZSwgb25SZWplY3QpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gcHJvbWlzZTsKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICBab25lQXdhcmVQcm9taXNlLmFsbCA9IGZ1bmN0aW9uICh2YWx1ZXMpIHsgcmV0dXJuIFpvbmVBd2FyZVByb21pc2UuYWxsV2l0aENhbGxiYWNrKHZhbHVlcyk7IH07CiAgICAgICAgICAgICAgICBab25lQXdhcmVQcm9taXNlLmFsbFNldHRsZWQgPSBmdW5jdGlvbiAodmFsdWVzKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIFAgPSB0aGlzICYmIHRoaXMucHJvdG90eXBlIGluc3RhbmNlb2YgWm9uZUF3YXJlUHJvbWlzZSA/IHRoaXMgOiBab25lQXdhcmVQcm9taXNlOwogICAgICAgICAgICAgICAgICAgIHJldHVybiBQLmFsbFdpdGhDYWxsYmFjayh2YWx1ZXMsIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhlbkNhbGxiYWNrOiBmdW5jdGlvbiAodmFsdWUpIHsgcmV0dXJuICh7IHN0YXR1czogJ2Z1bGZpbGxlZCcsIHZhbHVlOiB2YWx1ZSB9KTsgfSwKICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JDYWxsYmFjazogZnVuY3Rpb24gKGVycikgeyByZXR1cm4gKHsgc3RhdHVzOiAncmVqZWN0ZWQnLCByZWFzb246IGVyciB9KTsgfQogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIFpvbmVBd2FyZVByb21pc2UuYWxsV2l0aENhbGxiYWNrID0gZnVuY3Rpb24gKHZhbHVlcywgY2FsbGJhY2spIHsKICAgICAgICAgICAgICAgICAgICB2YXIgcmVzb2x2ZTsKICAgICAgICAgICAgICAgICAgICB2YXIgcmVqZWN0OwogICAgICAgICAgICAgICAgICAgIHZhciBwcm9taXNlID0gbmV3IHRoaXMoZnVuY3Rpb24gKHJlcywgcmVqKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmUgPSByZXM7CiAgICAgICAgICAgICAgICAgICAgICAgIHJlamVjdCA9IHJlajsKICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgICAgICAvLyBTdGFydCBhdCAyIHRvIHByZXZlbnQgcHJlbWF0dXJlbHkgcmVzb2x2aW5nIGlmIC50aGVuIGlzIGNhbGxlZCBpbW1lZGlhdGVseS4KICAgICAgICAgICAgICAgICAgICB2YXIgdW5yZXNvbHZlZENvdW50ID0gMjsKICAgICAgICAgICAgICAgICAgICB2YXIgdmFsdWVJbmRleCA9IDA7CiAgICAgICAgICAgICAgICAgICAgdmFyIHJlc29sdmVkVmFsdWVzID0gW107CiAgICAgICAgICAgICAgICAgICAgdmFyIF9sb29wXzIgPSBmdW5jdGlvbiAodmFsdWUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFpc1RoZW5hYmxlKHZhbHVlKSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSB0aGlzXzEucmVzb2x2ZSh2YWx1ZSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGN1clZhbHVlSW5kZXggPSB2YWx1ZUluZGV4OwogICAgICAgICAgICAgICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUudGhlbihmdW5jdGlvbiAodmFsdWUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlZFZhbHVlc1tjdXJWYWx1ZUluZGV4XSA9IGNhbGxiYWNrID8gY2FsbGJhY2sudGhlbkNhbGxiYWNrKHZhbHVlKSA6IHZhbHVlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVucmVzb2x2ZWRDb3VudC0tOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh1bnJlc29sdmVkQ291bnQgPT09IDApIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShyZXNvbHZlZFZhbHVlcyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgZnVuY3Rpb24gKGVycikgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghY2FsbGJhY2spIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0KGVycik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlZFZhbHVlc1tjdXJWYWx1ZUluZGV4XSA9IGNhbGxiYWNrLmVycm9yQ2FsbGJhY2soZXJyKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5yZXNvbHZlZENvdW50LS07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh1bnJlc29sdmVkQ291bnQgPT09IDApIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmUocmVzb2x2ZWRWYWx1ZXMpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgY2F0Y2ggKHRoZW5FcnIpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlamVjdCh0aGVuRXJyKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB1bnJlc29sdmVkQ291bnQrKzsKICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWVJbmRleCsrOwogICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICAgICAgdmFyIHRoaXNfMSA9IHRoaXM7CiAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgX2kgPSAwLCB2YWx1ZXNfMiA9IHZhbHVlczsgX2kgPCB2YWx1ZXNfMi5sZW5ndGg7IF9pKyspIHsKICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHZhbHVlID0gdmFsdWVzXzJbX2ldOwogICAgICAgICAgICAgICAgICAgICAgICBfbG9vcF8yKHZhbHVlKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgLy8gTWFrZSB0aGUgdW5yZXNvbHZlZENvdW50IHplcm8tYmFzZWQgYWdhaW4uCiAgICAgICAgICAgICAgICAgICAgdW5yZXNvbHZlZENvdW50IC09IDI7CiAgICAgICAgICAgICAgICAgICAgaWYgKHVucmVzb2x2ZWRDb3VudCA9PT0gMCkgewogICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKHJlc29sdmVkVmFsdWVzKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHByb21pc2U7CiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KFpvbmVBd2FyZVByb21pc2UucHJvdG90eXBlLCBTeW1ib2wudG9TdHJpbmdUYWcsIHsKICAgICAgICAgICAgICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHsgcmV0dXJuICdQcm9taXNlJzsgfSwKICAgICAgICAgICAgICAgICAgICBlbnVtZXJhYmxlOiB0cnVlLAogICAgICAgICAgICAgICAgICAgIGNvbmZpZ3VyYWJsZTogdHJ1ZQogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoWm9uZUF3YXJlUHJvbWlzZS5wcm90b3R5cGUsIFN5bWJvbC5zcGVjaWVzLCB7CiAgICAgICAgICAgICAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7IHJldHVybiBab25lQXdhcmVQcm9taXNlOyB9LAogICAgICAgICAgICAgICAgICAgIGVudW1lcmFibGU6IHRydWUsCiAgICAgICAgICAgICAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlCiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIFpvbmVBd2FyZVByb21pc2UucHJvdG90eXBlLnRoZW4gPSBmdW5jdGlvbiAob25GdWxmaWxsZWQsIG9uUmVqZWN0ZWQpIHsKICAgICAgICAgICAgICAgICAgICB2YXIgQyA9IHRoaXMuY29uc3RydWN0b3JbU3ltYm9sLnNwZWNpZXNdOwogICAgICAgICAgICAgICAgICAgIGlmICghQyB8fCB0eXBlb2YgQyAhPT0gJ2Z1bmN0aW9uJykgewogICAgICAgICAgICAgICAgICAgICAgICBDID0gdGhpcy5jb25zdHJ1Y3RvciB8fCBab25lQXdhcmVQcm9taXNlOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB2YXIgY2hhaW5Qcm9taXNlID0gbmV3IEMobm9vcCk7CiAgICAgICAgICAgICAgICAgICAgdmFyIHpvbmUgPSBab25lLmN1cnJlbnQ7CiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXNbc3ltYm9sU3RhdGVdID09IFVOUkVTT0xWRUQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1tzeW1ib2xWYWx1ZV0ucHVzaCh6b25lLCBjaGFpblByb21pc2UsIG9uRnVsZmlsbGVkLCBvblJlamVjdGVkKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHNjaGVkdWxlUmVzb2x2ZU9yUmVqZWN0KHRoaXMsIHpvbmUsIGNoYWluUHJvbWlzZSwgb25GdWxmaWxsZWQsIG9uUmVqZWN0ZWQpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gY2hhaW5Qcm9taXNlOwogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIFpvbmVBd2FyZVByb21pc2UucHJvdG90eXBlLmNhdGNoID0gZnVuY3Rpb24gKG9uUmVqZWN0ZWQpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy50aGVuKG51bGwsIG9uUmVqZWN0ZWQpOwogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIFpvbmVBd2FyZVByb21pc2UucHJvdG90eXBlLmZpbmFsbHkgPSBmdW5jdGlvbiAob25GaW5hbGx5KSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIEMgPSB0aGlzLmNvbnN0cnVjdG9yW1N5bWJvbC5zcGVjaWVzXTsKICAgICAgICAgICAgICAgICAgICBpZiAoIUMgfHwgdHlwZW9mIEMgIT09ICdmdW5jdGlvbicpIHsKICAgICAgICAgICAgICAgICAgICAgICAgQyA9IFpvbmVBd2FyZVByb21pc2U7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHZhciBjaGFpblByb21pc2UgPSBuZXcgQyhub29wKTsKICAgICAgICAgICAgICAgICAgICBjaGFpblByb21pc2Vbc3ltYm9sRmluYWxseV0gPSBzeW1ib2xGaW5hbGx5OwogICAgICAgICAgICAgICAgICAgIHZhciB6b25lID0gWm9uZS5jdXJyZW50OwogICAgICAgICAgICAgICAgICAgIGlmICh0aGlzW3N5bWJvbFN0YXRlXSA9PSBVTlJFU09MVkVEKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXNbc3ltYm9sVmFsdWVdLnB1c2goem9uZSwgY2hhaW5Qcm9taXNlLCBvbkZpbmFsbHksIG9uRmluYWxseSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICBzY2hlZHVsZVJlc29sdmVPclJlamVjdCh0aGlzLCB6b25lLCBjaGFpblByb21pc2UsIG9uRmluYWxseSwgb25GaW5hbGx5KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNoYWluUHJvbWlzZTsKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICByZXR1cm4gWm9uZUF3YXJlUHJvbWlzZTsKICAgICAgICAgICAgfSgpKTsKICAgICAgICAgICAgLy8gUHJvdGVjdCBhZ2FpbnN0IGFnZ3Jlc3NpdmUgb3B0aW1pemVycyBkcm9wcGluZyBzZWVtaW5nbHkgdW51c2VkIHByb3BlcnRpZXMuCiAgICAgICAgICAgIC8vIEUuZy4gQ2xvc3VyZSBDb21waWxlciBpbiBhZHZhbmNlZCBtb2RlLgogICAgICAgICAgICBab25lQXdhcmVQcm9taXNlWydyZXNvbHZlJ10gPSBab25lQXdhcmVQcm9taXNlLnJlc29sdmU7CiAgICAgICAgICAgIFpvbmVBd2FyZVByb21pc2VbJ3JlamVjdCddID0gWm9uZUF3YXJlUHJvbWlzZS5yZWplY3Q7CiAgICAgICAgICAgIFpvbmVBd2FyZVByb21pc2VbJ3JhY2UnXSA9IFpvbmVBd2FyZVByb21pc2UucmFjZTsKICAgICAgICAgICAgWm9uZUF3YXJlUHJvbWlzZVsnYWxsJ10gPSBab25lQXdhcmVQcm9taXNlLmFsbDsKICAgICAgICAgICAgdmFyIE5hdGl2ZVByb21pc2UgPSBnbG9iYWxbc3ltYm9sUHJvbWlzZV0gPSBnbG9iYWxbJ1Byb21pc2UnXTsKICAgICAgICAgICAgdmFyIFpPTkVfQVdBUkVfUFJPTUlTRSA9IFpvbmUuX19zeW1ib2xfXygnWm9uZUF3YXJlUHJvbWlzZScpOwogICAgICAgICAgICB2YXIgZGVzYyA9IE9iamVjdEdldE93blByb3BlcnR5RGVzY3JpcHRvcihnbG9iYWwsICdQcm9taXNlJyk7CiAgICAgICAgICAgIGlmICghZGVzYyB8fCBkZXNjLmNvbmZpZ3VyYWJsZSkgewogICAgICAgICAgICAgICAgZGVzYyAmJiBkZWxldGUgZGVzYy53cml0YWJsZTsKICAgICAgICAgICAgICAgIGRlc2MgJiYgZGVsZXRlIGRlc2MudmFsdWU7CiAgICAgICAgICAgICAgICBpZiAoIWRlc2MpIHsKICAgICAgICAgICAgICAgICAgICBkZXNjID0geyBjb25maWd1cmFibGU6IHRydWUsIGVudW1lcmFibGU6IHRydWUgfTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGRlc2MuZ2V0ID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgICAgIC8vIGlmIHdlIGFscmVhZHkgc2V0IFpvbmVBd2FyZVByb21pc2UsIHVzZSBwYXRjaGVkIG9uZQogICAgICAgICAgICAgICAgICAgIC8vIG90aGVyd2lzZSByZXR1cm4gbmF0aXZlIG9uZS4KICAgICAgICAgICAgICAgICAgICByZXR1cm4gZ2xvYmFsW1pPTkVfQVdBUkVfUFJPTUlTRV0gPyBnbG9iYWxbWk9ORV9BV0FSRV9QUk9NSVNFXSA6IGdsb2JhbFtzeW1ib2xQcm9taXNlXTsKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICBkZXNjLnNldCA9IGZ1bmN0aW9uIChOZXdOYXRpdmVQcm9taXNlKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKE5ld05hdGl2ZVByb21pc2UgPT09IFpvbmVBd2FyZVByb21pc2UpIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gaWYgdGhlIE5ld05hdGl2ZVByb21pc2UgaXMgWm9uZUF3YXJlUHJvbWlzZQogICAgICAgICAgICAgICAgICAgICAgICAvLyBzYXZlIHRvIGdsb2JhbAogICAgICAgICAgICAgICAgICAgICAgICBnbG9iYWxbWk9ORV9BV0FSRV9QUk9NSVNFXSA9IE5ld05hdGl2ZVByb21pc2U7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAvLyBpZiB0aGUgTmV3TmF0aXZlUHJvbWlzZSBpcyBub3QgWm9uZUF3YXJlUHJvbWlzZQogICAgICAgICAgICAgICAgICAgICAgICAvLyBmb3IgZXhhbXBsZTogYWZ0ZXIgbG9hZCB6b25lLmpzLCBzb21lIGxpYnJhcnkganVzdAogICAgICAgICAgICAgICAgICAgICAgICAvLyBzZXQgZXM2LXByb21pc2UgdG8gZ2xvYmFsLCBpZiB3ZSBzZXQgaXQgdG8gZ2xvYmFsCiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGRpcmVjdGx5LCBhc3NlcnRab25lUGF0Y2hlZCB3aWxsIGZhaWwgYW5kIGFuZ3VsYXIKICAgICAgICAgICAgICAgICAgICAgICAgLy8gd2lsbCBub3QgbG9hZGVkLCBzbyB3ZSBqdXN0IHNldCB0aGUgTmV3TmF0aXZlUHJvbWlzZQogICAgICAgICAgICAgICAgICAgICAgICAvLyB0byBnbG9iYWxbc3ltYm9sUHJvbWlzZV0sIHNvIHRoZSByZXN1bHQgaXMganVzdCBsaWtlCiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHdlIGxvYWQgRVM2IFByb21pc2UgYmVmb3JlIHpvbmUuanMKICAgICAgICAgICAgICAgICAgICAgICAgZ2xvYmFsW3N5bWJvbFByb21pc2VdID0gTmV3TmF0aXZlUHJvbWlzZTsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFOZXdOYXRpdmVQcm9taXNlLnByb3RvdHlwZVtzeW1ib2xUaGVuXSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGF0Y2hUaGVuKE5ld05hdGl2ZVByb21pc2UpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGFwaS5zZXROYXRpdmVQcm9taXNlKE5ld05hdGl2ZVByb21pc2UpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICBPYmplY3REZWZpbmVQcm9wZXJ0eShnbG9iYWwsICdQcm9taXNlJywgZGVzYyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZ2xvYmFsWydQcm9taXNlJ10gPSBab25lQXdhcmVQcm9taXNlOwogICAgICAgICAgICB2YXIgc3ltYm9sVGhlblBhdGNoZWQgPSBfX3N5bWJvbF9fKCd0aGVuUGF0Y2hlZCcpOwogICAgICAgICAgICBmdW5jdGlvbiBwYXRjaFRoZW4oQ3RvcikgewogICAgICAgICAgICAgICAgdmFyIHByb3RvID0gQ3Rvci5wcm90b3R5cGU7CiAgICAgICAgICAgICAgICB2YXIgcHJvcCA9IE9iamVjdEdldE93blByb3BlcnR5RGVzY3JpcHRvcihwcm90bywgJ3RoZW4nKTsKICAgICAgICAgICAgICAgIGlmIChwcm9wICYmIChwcm9wLndyaXRhYmxlID09PSBmYWxzZSB8fCAhcHJvcC5jb25maWd1cmFibGUpKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gY2hlY2sgQ3Rvci5wcm90b3R5cGUudGhlbiBwcm9wZXJ0eURlc2NyaXB0b3IgaXMgd3JpdGFibGUgb3Igbm90CiAgICAgICAgICAgICAgICAgICAgLy8gaW4gbWV0ZW9yIGVudiwgd3JpdGFibGUgaXMgZmFsc2UsIHdlIHNob3VsZCBpZ25vcmUgc3VjaCBjYXNlCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdmFyIG9yaWdpbmFsVGhlbiA9IHByb3RvLnRoZW47CiAgICAgICAgICAgICAgICAvLyBLZWVwIGEgcmVmZXJlbmNlIHRvIHRoZSBvcmlnaW5hbCBtZXRob2QuCiAgICAgICAgICAgICAgICBwcm90b1tzeW1ib2xUaGVuXSA9IG9yaWdpbmFsVGhlbjsKICAgICAgICAgICAgICAgIEN0b3IucHJvdG90eXBlLnRoZW4gPSBmdW5jdGlvbiAob25SZXNvbHZlLCBvblJlamVjdCkgewogICAgICAgICAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7CiAgICAgICAgICAgICAgICAgICAgdmFyIHdyYXBwZWQgPSBuZXcgWm9uZUF3YXJlUHJvbWlzZShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7IG9yaWdpbmFsVGhlbi5jYWxsKF90aGlzLCByZXNvbHZlLCByZWplY3QpOyB9KTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gd3JhcHBlZC50aGVuKG9uUmVzb2x2ZSwgb25SZWplY3QpOwogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIEN0b3Jbc3ltYm9sVGhlblBhdGNoZWRdID0gdHJ1ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBhcGkucGF0Y2hUaGVuID0gcGF0Y2hUaGVuOwogICAgICAgICAgICBmdW5jdGlvbiB6b25laWZ5KGZuKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgICAgIHZhciByZXN1bHRQcm9taXNlID0gZm4uYXBwbHkodGhpcywgYXJndW1lbnRzKTsKICAgICAgICAgICAgICAgICAgICBpZiAocmVzdWx0UHJvbWlzZSBpbnN0YW5jZW9mIFpvbmVBd2FyZVByb21pc2UpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdFByb21pc2U7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHZhciBjdG9yID0gcmVzdWx0UHJvbWlzZS5jb25zdHJ1Y3RvcjsKICAgICAgICAgICAgICAgICAgICBpZiAoIWN0b3Jbc3ltYm9sVGhlblBhdGNoZWRdKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHBhdGNoVGhlbihjdG9yKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdFByb21pc2U7CiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChOYXRpdmVQcm9taXNlKSB7CiAgICAgICAgICAgICAgICBwYXRjaFRoZW4oTmF0aXZlUHJvbWlzZSk7CiAgICAgICAgICAgICAgICB2YXIgZmV0Y2hfMSA9IGdsb2JhbFsnZmV0Y2gnXTsKICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgZmV0Y2hfMSA9PSAnZnVuY3Rpb24nKSB7CiAgICAgICAgICAgICAgICAgICAgZ2xvYmFsW2FwaS5zeW1ib2woJ2ZldGNoJyldID0gZmV0Y2hfMTsKICAgICAgICAgICAgICAgICAgICBnbG9iYWxbJ2ZldGNoJ10gPSB6b25laWZ5KGZldGNoXzEpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIFRoaXMgaXMgbm90IHBhcnQgb2YgcHVibGljIEFQSSwgYnV0IGl0IGlzIHVzZWZ1bCBmb3IgdGVzdHMsIHNvIHdlIGV4cG9zZSBpdC4KICAgICAgICAgICAgUHJvbWlzZVtab25lLl9fc3ltYm9sX18oJ3VuY2F1Z2h0UHJvbWlzZUVycm9ycycpXSA9IF91bmNhdWdodFByb21pc2VFcnJvcnM7CiAgICAgICAgICAgIHJldHVybiBab25lQXdhcmVQcm9taXNlOwogICAgICAgIH0pOwogICAgICAgIC8qKgogICAgICAgICAqIEBsaWNlbnNlCiAgICAgICAgICogQ29weXJpZ2h0IEdvb2dsZSBJbmMuIEFsbCBSaWdodHMgUmVzZXJ2ZWQuCiAgICAgICAgICoKICAgICAgICAgKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSBhbiBNSVQtc3R5bGUgbGljZW5zZSB0aGF0IGNhbiBiZQogICAgICAgICAqIGZvdW5kIGluI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AgICB9CiAgICAgICAgICAgIHJldHVybiBhcmdzOwogICAgICAgIH0KICAgICAgICBmdW5jdGlvbiBwYXRjaFByb3RvdHlwZShwcm90b3R5cGUsIGZuTmFtZXMpIHsKICAgICAgICAgICAgdmFyIHNvdXJjZSA9IHByb3RvdHlwZS5jb25zdHJ1Y3RvclsnbmFtZSddOwogICAgICAgICAgICB2YXIgX2xvb3BfMyA9IGZ1bmN0aW9uIChpKSB7CiAgICAgICAgICAgICAgICB2YXIgbmFtZV8xID0gZm5OYW1lc1tpXTsKICAgICAgICAgICAgICAgIHZhciBkZWxlZ2F0ZSA9IHByb3RvdHlwZVtuYW1lXzFdOwogICAgICAgICAgICAgICAgaWYgKGRlbGVnYXRlKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIHByb3RvdHlwZURlc2MgPSBPYmplY3RHZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IocHJvdG90eXBlLCBuYW1lXzEpOwogICAgICAgICAgICAgICAgICAgIGlmICghaXNQcm9wZXJ0eVdyaXRhYmxlKHByb3RvdHlwZURlc2MpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAiY29udGludWUiOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBwcm90b3R5cGVbbmFtZV8xXSA9IChmdW5jdGlvbiAoZGVsZWdhdGUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHBhdGNoZWQgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGVsZWdhdGUuYXBwbHkodGhpcywgYmluZEFyZ3VtZW50cyhhcmd1bWVudHMsIHNvdXJjZSArICcuJyArIG5hbWVfMSkpOwogICAgICAgICAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgICAgICAgICBhdHRhY2hPcmlnaW5Ub1BhdGNoZWQocGF0Y2hlZCwgZGVsZWdhdGUpOwogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcGF0Y2hlZDsKICAgICAgICAgICAgICAgICAgICB9KShkZWxlZ2F0ZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZm5OYW1lcy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgX2xvb3BfMyhpKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBmdW5jdGlvbiBpc1Byb3BlcnR5V3JpdGFibGUocHJvcGVydHlEZXNjKSB7CiAgICAgICAgICAgIGlmICghcHJvcGVydHlEZXNjKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAocHJvcGVydHlEZXNjLndyaXRhYmxlID09PSBmYWxzZSkgewogICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiAhKHR5cGVvZiBwcm9wZXJ0eURlc2MuZ2V0ID09PSAnZnVuY3Rpb24nICYmIHR5cGVvZiBwcm9wZXJ0eURlc2Muc2V0ID09PSAndW5kZWZpbmVkJyk7CiAgICAgICAgfQogICAgICAgIHZhciBpc1dlYldvcmtlciA9ICh0eXBlb2YgV29ya2VyR2xvYmFsU2NvcGUgIT09ICd1bmRlZmluZWQnICYmIHNlbGYgaW5zdGFuY2VvZiBXb3JrZXJHbG9iYWxTY29wZSk7CiAgICAgICAgLy8gTWFrZSBzdXJlIHRvIGFjY2VzcyBgcHJvY2Vzc2AgdGhyb3VnaCBgX2dsb2JhbGAgc28gdGhhdCBXZWJQYWNrIGRvZXMgbm90IGFjY2lkZW50YWxseSBicm93c2VyaWZ5CiAgICAgICAgLy8gdGhpcyBjb2RlLgogICAgICAgIHZhciBpc05vZGUgPSAoISgnbncnIGluIF9nbG9iYWwpICYmIHR5cGVvZiBfZ2xvYmFsLnByb2Nlc3MgIT09ICd1bmRlZmluZWQnICYmCiAgICAgICAgICAgIH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W50IHx8IF9nbG9iYWwuZXZlbnQ7CiAgICAgICAgICAgIGlmICghZXZlbnQpIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICB2YXIgZXZlbnROYW1lU3ltYm9sID0gem9uZVN5bWJvbEV2ZW50TmFtZXNbZXZlbnQudHlwZV07CiAgICAgICAgICAgIGlmICghZXZlbnROYW1lU3ltYm9sKSB7CiAgICAgICAgICAgICAgICBldmVudE5hbWVTeW1ib2wgPSB6b25lU3ltYm9sRXZlbnROYW1lc1tldmVudC50eXBlXSA9IHpvbmVTeW1ib2woJ09OX1BST1BFUlRZJyArIGV2ZW50LnR5cGUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciB0YXJnZXQgPSB0aGlzIHx8IGV2ZW50LnRhcmdldCB8fCBfZ2xvYmFsOwogICAgICAgICAgICB2YXIgbGlzdGVuZXIgPSB0YXJnZXRbZXZlbnROYW1lU3ltYm9sXTsKICAgICAgICAgICAgdmFyIHJlc3VsdDsKICAgICAgICAgICAgaWYgKGlzQnJvd3NlciAmJiB0YXJnZXQgPT09IGludGVybmFsV2luZG93ICYmIGV2ZW50LnR5cGUgPT09ICdlcnJvcicpIHsKICAgICAgICAgICAgICAgIC8vIHdpbmRvdy5vbmVycm9yIGhhdmUgZGlmZmVyZW50IHNpZ25pdHVyZQogICAgICAgICAgICAgICAgLy8gaHR0cHM6Ly9kZXZlbG9wZXIubW96aWxsYS5vcmcvZW4tVVMvZG9jcy9XZWIvQVBJL0dsb2JhbEV2ZW50SGFuZGxlcnMvb25lcnJvciN3aW5kb3cub25lcnJvcgogICAgICAgICAgICAgICAgLy8gYW5kIG9uZXJyb3IgY2FsbGJhY2sgd2lsbCBwcmV2ZW50IGRlZmF1bHQgd2hlbiBjYWxsYmFjayByZXR1cm4gdHJ1ZQogICAgICAgICAgICAgICAgdmFyIGVycm9yRXZlbnQgPSBldmVudDsKICAgICAgICAgICAgICAgIHJlc3VsdCA9IGxpc3RlbmVyICYmCiAgICAgICAgICAgICAgICAgICAgbGlzdGVuZXIuY2FsbCh0aGlzLCBlcnJvckV2ZW50Lm1lc3NhZ2UsIGVycm9yRXZlbnQuZmlsZW5hbWUsIGVycm9yRXZlbnQubGluZW5vLCBlcnJvckV2ZW50LmNvbG5vLCBlcnJvckV2ZW50LmVycm9yKTsKICAgICAgICAgICAgICAgIGlmIChyZXN1bHQgPT09IHRydWUpIHsKICAgICAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgcmVzdWx0ID0gbGlzdGVuZXIgJiYgbGlzdGVuZXIuYXBwbHkodGhpcywgYXJndW1lbnRzKTsKICAgICAgICAgICAgICAgIGlmIChyZXN1bHQgIT0gdW5kZWZpbmVkICYmICFyZXN1bHQpIHsKICAgICAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgfTsKICAgICAgICBmdW5jdGlvbiBwYXRjaFByb3BlcnR5KG9iaiwgcHJvcCwgcHJvdG90eXBlKSB7CiAgICAgICAgICAgIHZhciBkZXNjID0gT2JqZWN0R2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKG9iaiwgcHJvcCk7CiAgICAgICAgICAgIGlmICghZGVzYyAmJiBwcm90b3R5cGUpIHsKICAgICAgICAgICAgICAgIC8vIHdoZW4gcGF0Y2ggd2luZG93IG9iamVjdCwgdXNlIHByb3RvdHlwZSB0byBjaGVjayBwcm9wIGV4aXN0IG9yIG5vdAogICAgICAgICAgICAgICAgdmFyIHByb3RvdHlwZURlc2MgPSBPYmplY3RHZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IocHJvdG90eXBlLCBwcm9wKTsKICAgICAgICAgICAgICAgIGlmIChwcm90b3R5cGVEZXNjKSB7CiAgICAgICAgICAgICAgICAgICAgZGVzYyA9IHsgZW51bWVyYWJsZTogdHJ1ZSwgY29uZmlndXJhYmxlOiB0cnVlIH07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gaWYgdGhlIGRlc2NyaXB0b3Igbm90IGV4aXN0cyBvciBpcyBub3QgY29uZmlndXJhYmxlCiAgICAgICAgICAgIC8vIGp1c3QgcmV0dXJuCiAgICAgICAgICAgIGlmICghZGVzYyB8fCAhZGVzYy5jb25maWd1cmFibGUpIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICB2YXIgb25Qcm9wUGF0Y2hlZFN5bWJvbCA9IHpvbmVTeW1ib2woJ29uJyArIHByb3AgKyAncGF0Y2hlZCcpOwogICAgICAgICAgICBpZiAob2JqLmhhc093blByb3BlcnR5KG9uUHJvcFBhdGNoZWRTeW1ib2wpICYmIG9ialtvblByb3BQYXRjaGVkU3ltYm9sXSkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIEEgcHJvcGVydHkgZGVzY3JpcHRvciBjYW5ub3QgaGF2ZSBnZXR0ZXIvc2V0dGVyIGFuZCBiZSB3cml0YWJsZQogICAgICAgICAgICAvLyBkZWxldGluZyB0aGUgd3JpdGFibGUgYW5kIHZhbHVlIHByb3BlcnRpZXMgYXZvaWRzIHRoaXMgZXJyb3I6CiAgICAgICAgICAgIC8vCiAgICAgICAgICAgIC8vIFR5cGVFcnJvcjogcHJvcGVydHkgZGVzY3JpcHRvcnMgbXVzdCBub3Qgc3BlY2lmeSBhIHZhbHVlIG9yIGJlIHdyaXRhYmxlIHdoZW4gYQogICAgICAgICAgICAvLyBnZXR0ZXIgb3Igc2V0dGVyIGhhcyBiZWVuIHNwZWNpZmllZAogICAgICAgICAgICBkZWxldGUgZGVzYy53cml0YWJsZTsKICAgICAgICAgICAgZGVsZXRlIGRlc2MudmFsdWU7CiAgICAgICAgICAgIHZhciBvcmlnaW5hbERlc2NHZXQgPSBkZXNjLmdldDsKICAgICAgICAgICAgdmFyIG9yaWdpbmFsRGVzY1NldCA9IGRlc2Muc2V0OwogICAgICAgICAgICAvLyBzdWJzdHIoMikgY3V6ICdvbmNsaWNrJyAtPiAnY2xpY2snLCBldGMKICAgICAgICAgICAgdmFyIGV2ZW50TmFtZSA9IHByb3Auc3Vic3RyKDIpOwogICAgICAgICAgICB2YXIgZXZlbnROYW1lU3ltYm9sID0gem9uZVN5bWJvbEV2ZW50TmFtZXNbZXZlbnROYW1lXTsKICAgICAgICAgICAgaWYgKCFldmVudE5hbWVTeW1ib2wpIHsKICAgICAgICAgICAgICAgIGV2ZW50TmFtZVN5bWJvbCA9IHpvbmVTeW1ib2xFdmVudE5hbWVzW2V2ZW50TmFtZV0gPSB6b25lU3ltYm9sKCdPTl9QUk9QRVJUWScgKyBldmVudE5hbWUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGRlc2Muc2V0ID0gZnVuY3Rpb24gKG5ld1ZhbHVlKSB7CiAgICAgICAgICAgICAgICAvLyBpbiBzb21lIG9mIHdpbmRvd3MncyBvbnByb3BlcnR5IGNhbGxiYWNrLCB0aGlzIGlzIHVuZGVmaW5lZAogICAgICAgICAgICAgICAgLy8gc28gd2UgbmVlZCB0byBjaGVjayBpdAogICAgICAgICAgICAgICAgdmFyIHRhcmdldCA9IHRoaXM7CiAgICAgICAgICAgICAgICBpZiAoIXRhcmdldCAmJiBvYmogPT09IF9nbG9iYWwpIHsKICAgICAgICAgICAgICAgICAgICB0YXJnZXQgPSBfZ2xvYmFsOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKCF0YXJnZXQpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB2YXIgcHJldmlvdXNWYWx1ZSA9IHRhcmdldFtldmVudE5hbWVTeW1ib2xdOwogICAgICAgICAgICAgICAgaWYgKHByZXZpb3VzVmFsdWUpIHsKICAgICAgICAgICAgICAgICAgICB0YXJnZXQucmVtb3ZlRXZlbnRMaXN0ZW5lcihldmVudE5hbWUsIHdyYXBGbik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvLyBpc3N1ZSAjOTc4LCB3aGVuIG9ubG9hZCBoYW5kbGVyIHdhcyBhZGRlZCBiZWZvcmUgbG9hZGluZyB6b25lLmpzCiAgICAgICAgICAgICAgICAvLyB3ZSBzaG91bGQgcmVtb3ZlIGl0IHdpdGggb3JpZ2luYWxEZXNjU2V0CiAgICAgICAgICAgICAgICBpZiAob3JpZ2luYWxEZXNjU2V0KSB7CiAgICAgICAgICAgICAgICAgICAgb3JpZ2luYWxEZXNjU2V0LmFwcGx5KHRhcmdldCwgTlVMTF9PTl9QUk9QX1ZBTFVFKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgbmV3VmFsdWUgPT09ICdmdW5jdGlvbicpIHsKICAgICAgICAgICAgICAgICAgICB0YXJnZXRbZXZlbnROYW1lU3ltYm9sXSA9IG5ld1ZhbHVlOwogICAgICAgICAgICAgICAgICAgIHRhcmdldC5hZGRFdmVudExpc3RlbmVyKGV2ZW50TmFtZSwgd3JhcEZuLCBmYWxzZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICB0YXJnZXRbZXZlbnROYW1lU3ltYm9sXSA9IG51bGw7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIC8vIFRoZSBnZXR0ZXIgd291bGQgcmV0dXJuIHVuZGVmaW5lZCBmb3IgdW5hc3NpZ25lZCBwcm9wZXJ0aWVzIGJ1dCB0aGUgZGVmYXVsdCB2YWx1ZSBvZiBhbgogICAgICAgICAgICAvLyB1bmFzc2lnbmVkIHByb3BlcnR5IGlzIG51bGwKICAgICAgICAgICAgZGVzYy5nZXQgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICAvLyBpbiBzb21lIG9mIHdpbmRvd3MncyBvbnByb3BlcnR5IGNhbGxiYWNrLCB0aGlzIGlzIHVuZGVmaW5lZAogICAgICAgICAgICAgICAgLy8gc28gd2UgbmVlZCB0byBjaGVjayBpdAogICAgICAgICAgICAgICAgdmFyIHRhcmdldCA9IHRoaXM7CiAgICAgICAgICAgICAgICBpZiAoIXRhcmdldCAmJiBvYmogPT09IF9nbG9iYWwpIHsKICAgICAgICAgICAgICAgICAgICB0YXJnZXQgPSBfZ2xvYmFsOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKCF0YXJnZXQpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHZhciBsaXN0ZW5lciA9IHRhcmdldFtldmVudE5hbWVTeW1ib2xdOwogICAgICAgICAgICAgICAgaWYgKGxpc3RlbmVyKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGxpc3RlbmVyOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAob3JpZ2luYWxEZXNjR2V0KSB7CiAgICAgICAgICAgICAgICAgICAgLy8gcmVzdWx0IHdpbGwgYmUgbnVsbCB3aGVuIHVzZSBpbmxpbmUgZXZlbnQgYXR0cmlidXRlLAogICAgICAgICAgICAgICAgICAgIC8vIHN1Y2ggYXMgPGJ1dHRvbiBvbmNsaWNrPSJmdW5jKCk7Ij5PSzwvYnV0dG9uPgogICAgICAgICAgICAgICAgICAgIC8vIGJlY2F1c2UgdGhlIG9uY2xpY2sgZnVuY3Rpb24gaXMgaW50ZXJuYWwgcmF3IHVuY29tcGlsZWQgaGFuZGxlcgogICAgICAgICAgICAgICAgICAgIC8vIHRoZSBvbmNsaWNrIHdpbGwgYmUgZXZhbHVhdGVkIHdoZW4gZmlyc3QgdGltZSBldmVudCB3YXMgdHJpZ2dlcmVkIG9yCiAgICAgICAgICAgICAgICAgICAgLy8gdGhlIHByb3BlcnR5IGlzIGFjY2Vzc2VkLCBodHRwczovL2dpdGh1Yi5jb20vYW5ndWxhci96b25lLmpzL2lzc3Vlcy81MjUKICAgICAgICAgICAgICAgICAgICAvLyBzbyB3ZSBzaG91bGQgdXNlIG9yaWdpbmFsIG5hdGl2ZSBnZXQgdG8gcmV0cmlldmUgdGhlIGhhbmRsZXIKICAgICAgICAgICAgICAgICAgICB2YXIgdmFsdWUgPSBvcmlnaW5hbERlc2NHZXQgJiYgb3JpZ2luYWxEZXNjR2V0LmNhbGwodGhpcyk7CiAgICAgICAgICAgICAgICAgICAgaWYgKHZhbHVlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGRlc2Muc2V0LmNhbGwodGhpcywgdmFsdWUpOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHRhcmdldFtSRU1PVkVfQVRUUklCVVRFXSA9PT0gJ2Z1bmN0aW9uJykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFyZ2V0LnJlbW92ZUF0dHJpYnV0ZShwcm9wKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdmFsdWU7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIE9iamVjdERlZmluZVByb3BlcnR5KG9iaiwgcHJvcCwgZGVzYyk7CiAgICAgICAgICAgIG9ialtvblByb3BQYXRjaGVkU3ltYm9sXSA9IHRydWU7CiAgICAgICAgfQogICAgICAgIGZ1bmN0aW9uIHBhdGNoT25Qcm9wZXJ0aWVzKG9iaiwgcHJvcGVydGllcywgcHJvdG90eXBlKSB7CiAgICAgICAgICAgIGlmIChwcm9wZXJ0aWVzKSB7CiAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHByb3BlcnRpZXMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgICAgICBwYXRjaFByb3BlcnR5KG9iaiwgJ29uJyArIHByb3BlcnRpZXNbaV0sIHByb3RvdHlwZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB2YXIgb25Qcm9wZXJ0aWVzID0gW107CiAgICAgICAgICAgICAgICBmb3IgKHZhciBwcm9wIGluIG9iaikgewogICAgICAgICAgICAgICAgICAgIGlmIChwcm9wLnN1YnN0cigwLCAyKSA9PSAnb24nKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG9uUHJvcGVydGllcy5wdXNoKHByb3ApOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgb25Qcm9wZXJ0aWVzLmxlbmd0aDsgaisrKSB7CiAgICAgICAgICAgICAgICAgICAgcGF0Y2hQcm9wZXJ0eShvYmosIG9uUHJvcGVydGllc1tqXSwgcHJvdG90eXBlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICB2YXIgb3JpZ2luYWxJbnN0YW5jZUtleSA9IHpvbmVTeW1ib2woJ29yaWdpbmFsSW5zdGFuY2UnKTsKICAgICAgICAvLyB3cmFwIHNvbWUgbmF0aXZlIEFQSSBvbiBgd2luZG93YAogICAgICAgIGZ1bmN0aW9uIHBhdGNoQ2xhc3MoY2xhc3NOYW1lKSB7CiAgICAgICAgICAgIHZhciBPcmlnaW5hbENsYXNzID0gX2dsb2JhbFtjbGFzc05hbWVdOwogICAgICAgICAgICBpZiAoIU9yaWdpbmFsQ2xhc3MpCiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIC8vIGtlZXAgb3JpZ2luYWwgY2xhc3MgaW4gZ2xvYmFsCiAgICAgICAgICAgIF9nbG9iYWxbem9uZVN5bWJvbChjbGFzc05hbWUpXSA9IE9yaWdpbmFsQ2xhc3M7CiAgICAgICAgICAgIF9nbG9iYWxbY2xhc3NOYW1lXSA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgIHZhciBhID0gYmluZEFyZ3VtZW50cyhhcmd1bWVudHMsIGNsYXNzTmFtZSk7CiAgICAgICAgICAgICAgICBzd2l0Y2ggKGEubGVuZ3RoKSB7CiAgICAgICAgICAgICAgICAgICAgY2FzZSAwOgogICAgICAgICAgICAgICAgICAgICAgICB0aGlzW29yaWdpbmFsSW5zdGFuY2VLZXldID0gbmV3IE9yaWdpbmFsQ2xhc3MoKTsKICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgY2FzZSAxOgogICAgICAgICAgICAgICAgICAgICAgICB0aGlzW29yaWdpbmFsSW5zdGFuY2VLZXldID0gbmV3IE9yaWdpbmFsQ2xhc3MoYVswXSk7CiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgIGNhc2UgMjoKICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1tvcmlnaW5hbEluc3RhbmNlS2V5XSA9IG5ldyBPcmlnaW5hbENsYXNzKGFbMF0sIGFbMV0pOwogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICBjYXNlIDM6CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXNbb3JpZ2luYWxJbnN0YW5jZUtleV0gPSBuZXcgT3JpZ2luYWxDbGFzcyhhWzBdLCBhWzFdLCBhWzJdKTsKICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgY2FzZSA0OgogICAgICAgICAgICAgICAgICAgICAgICB0aGlzW29yaWdpbmFsSW5zdGFuY2VLZXldID0gbmV3IE9yaWdpbmFsQ2xhc3MoYVswXSwgYVsxXSwgYVsyXSwgYVszXSk7CiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignQXJnIGxpc3QgdG9vIGxvbmcuJyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIC8vIGF0dGFjaCBvcmlnaW5hbCBkZWxlZ2F0ZSB0byBwYXRjaGVkIGZ1bmN0aW9uCiAgICAgICAgICAgIGF0dGFjaE9yaWdpblRvUGF0Y2hlZChfZ2xvYmFsW2NsYXNzTmFtZV0sIE9yaWdpbmFsQ2xhc3MpOwogICAgICAgICAgICB2YXIgaW5zdGFuY2UgPSBuZXcgT3JpZ2luYWxDbGFzcyhmdW5jdGlvbiAoKSB7IH0pOwogICAgICAgICAgICB2YXIgcHJvcDsKICAgICAgICAgICAgZm9yIChwcm9wIGluIGluc3RhbmNlKSB7CiAgICAgICAgICAgICAgICAvLyBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9NDQ3MjEKICAgICAgICAgICAgICAgIGlmIChjbGFzc05hbWUgPT09ICdYTUxIdHRwUmVxdWVzdCcgJiYgcHJvcCA9PT0gJ3Jlc3BvbnNlQmxvYicpCiAgICAgICAgICAgICAgICAgICAgY29udGludWU7CiAgICAgICAgICAgICAgICAoZnVuY3Rpb24gKHByb3ApIHsKICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGluc3RhbmNlW3Byb3BdID09PSAnZnVuY3Rpb24nKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIF9nbG9iYWxbY2xhc3NOYW1lXS5wcm90b3R5cGVbcHJvcF0gPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpc1tvcmlnaW5hbEluc3RhbmNlS2V5XVtwcm9wXS5hcHBseSh0aGlzW29yaWdpbmFsSW5zdGFuY2VLZXldLCBhcmd1bWVudHMpOwogICAgICAgICAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgT2JqZWN0RGVmaW5lUHJvcGVydHkoX2dsb2JhbFtjbGFzc05hbWVdLnByb3RvdHlwZSwgcHJvcCwgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0OiBmdW5jdGlvbiAoZm4pIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGZuID09PSAnZnVuY3Rpb24nKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXNbb3JpZ2luYWxJbnN0YW5jZUtleV1bcHJvcF0gPSB3cmFwV2l0aEN1cnJlbnRab25lKGZuLCBjbGFzc05hbWUgKyAnLicgKyBwcm9wKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8ga2VlcCBjYWxsYmFjayBpbiB3cmFwcGVkIGZ1bmN0aW9uIHNvIHdlIGNhbgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyB1c2UgaXQgaW4gRnVuY3Rpb24ucHJvdG90eXBlLnRvU3RyaW5nIHRvIHJldHVybgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyB0aGUgbmF0aXZlIG9uZS4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0YWNoT3JpZ2luVG9QYXRjaGVkKHRoaXNbb3JpZ2luYWxJbnN0YW5jZUtleV1bcHJvcF0sIGZuKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXNbb3JpZ2luYWxJbnN0YW5jZUtleV1bcHJvcF0gPSBmbjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7IHJldHVybiB0aGlzW29yaWdpbmFsSW5zdGFuY2VLZXldW3Byb3BdOyB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0ocHJvcCkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGZvciAocHJvcCBpbiBPcmlnaW5hbENsYXNzKSB7CiAgICAgICAgICAgICAgICBpZiAocHJvcCAhPT0gJ3Byb3RvdHlwZScgJiYgT3JpZ2luYWxDbGFzcy5oYXNPd25Qcm9wZXJ0eShwcm9wKSkgewogICAgICAgICAgICAgICAgICAgIF9nbG9iYWxbY2xhc3NOYW1lXVtwcm9wXSA9IE9yaWdpbmFsQ2xhc3NbcHJvcF07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgZnVuY3Rpb24gcGF0Y2hNZXRob2QodGFyZ2V0LCBuYW1lLCBwYXRjaEZuKSB7CiAgICAgICAgICAgIHZhciBwcm90byA9IHRhcmdldDsKICAgICAgICAgICAgd2hpbGUgKHByb3RvICYmICFwcm90by5oYXNPd25Qcm9wZXJ0eShuYW1lKSkgewogICAgICAgICAgICAgICAgcHJvdG8gPSBPYmplY3RHZXRQcm90b3R5cGVPZihwcm90byk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKCFwcm90byAmJiB0YXJnZXRbbmFtZV0pIHsKICAgICAgICAgICAgICAgIC8vIHNvbWVob3cgd2UgZGlkIG5vdCBmaW5kIGl0LCBidXQgd2UgY2FuIHNlZSBpdC4gVGhpcyBoYXBwZW5zIG9uIElFIGZvciBXaW5kb3cgcHJvcGVydGllcy4KICAgICAgICAgICAgICAgIHByb3RvID0gdGFyZ2V0Owog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vbiwgc3VwcG9ydCBjYW5jZWwgdGFzayBsYXRlciBpZiBuZWNlc3NhcnkKICAgICAgICBmdW5jdGlvbiBwYXRjaE1hY3JvVGFzayhvYmosIGZ1bmNOYW1lLCBtZXRhQ3JlYXRvcikgewogICAgICAgICAgICB2YXIgc2V0TmF0aXZlID0gbnVsbDsKICAgICAgICAgICAgZnVuY3Rpb24gc2NoZWR1bGVUYXNrKHRhc2spIHsKICAgICAgICAgICAgICAgIHZhciBkYXRhID0gdGFzay5kYXRhOwogICAgICAgICAgICAgICAgZGF0YS5hcmdzW2RhdGEuY2JJZHhdID0gZnVuY3Rpb24gKCkgeyB0YXNrLmludm9rZS5hcHBseSh0aGlzLCBhcmd1bWVudHMpOyB9OwogICAgICAgICAgICAgICAgc2V0TmF0aXZlLmFwcGx5KGRhdGEudGFyZ2V0LCBkYXRhLmFyZ3MpOwogICAgICAgICAgICAgICAgcmV0dXJuIHRhc2s7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgc2V0TmF0aXZlID0gcGF0Y2hNZXRob2Qob2JqLCBmdW5jTmFtZSwgZnVuY3Rpb24gKGRlbGVnYXRlKSB7IHJldHVybiBmdW5jdGlvbiAoc2VsZiwgYXJncykgewogICAgICAgICAgICAgICAgdmFyIG1ldGEgPSBtZXRhQ3JlYXRvcihzZWxmLCBhcmdzKTsKICAgICAgICAgICAgICAgIGlmIChtZXRhLmNiSWR4ID49IDAgJiYgdHlwZW9mIGFyZ3NbbWV0YS5jYklkeF0gPT09ICdmdW5jdGlvbicpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2NoZWR1bGVNYWNyb1Rhc2tXaXRoQ3VycmVudFpvbmUobWV0YS5uYW1lLCBhcmdzW21ldGEuY2JJZHhdLCBtZXRhLCBzY2hlZHVsZVRhc2spOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgLy8gY2F1c2UgYW4gZXJyb3IgYnkgY2FsbGluZyBpdCBkaXJlY3RseS4KICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGVsZWdhdGUuYXBwbHkoc2VsZiwgYXJncyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH07IH0pOwogICAgICAgIH0KICAgICAgICBmdW5jdGlvbiBhdHRhY2hPcmlnaW5Ub1BhdGNoZWQocGF0Y2hlZCwgb3JpZ2luYWwpIHsKICAgICAgICAgICAgcGF0Y2hlZFt6b25lU3ltYm9sKCdPcmlnaW5hbERlbGVnYXRlJyldID0gb3JpZ2luYWw7CiAgICAgICAgfQogICAgICAgIHZhciBpc0RldGVjdGVkSUVPckVkZ2UgPSBmYWxzZTsKICAgICAgICB2YXIgaWVPckVkZ2UgPSBmYWxzZTsKICAgICAgICBmdW5jdGlvbiBpc0lFKCkgewogICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgdmFyIHVhID0gaW50ZXJuYWxXaW5kb3cubmF2aWdhdG9yLnVzZXJBZ2VudDsKICAgICAgICAgICAgICAgIGlmICh1YS5pbmRleE9mKCdNU0lFICcpICE9PSAtMSB8fCB1YS5pbmRleE9mKCdUcmlkZW50LycpICE9PSAtMSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGNhdGNoIChlcnJvcikgewogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICB9CiAgICAgICAgZnVuY3Rpb24gaXNJRU9yRWRnZSgpIHsKICAgICAgICAgICAgaWYgKGlzRGV0ZWN0ZWRJRU9yRWRnZSkgewogICAgICAgICAgICAgICAgcmV0dXJuIGllT3JFZGdlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlzRGV0ZWN0ZWRJRU9yRWRnZSA9IHRydWU7CiAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICB2YXIgdWEgPSBpbnRlcm5hbFdpbmRvdy5uYXZpZ2F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dHlwZS50b1N0cmluZzsKICAgICAgICAgICAgdmFyIE9SSUdJTkFMX0RFTEVHQVRFX1NZTUJPTCA9IHpvbmVTeW1ib2woJ09yaWdpbmFsRGVsZWdhdGUnKTsKICAgICAgICAgICAgdmFyIFBST01JU0VfU1lNQk9MID0gem9uZVN5bWJvbCgnUHJvbWlzZScpOwogICAgICAgICAgICB2YXIgRVJST1JfU1lNQk9MID0gem9uZVN5bWJvbCgnRXJyb3InKTsKICAgICAgICAgICAgdmFyIG5ld0Z1bmN0aW9uVG9TdHJpbmcgPSBmdW5jdGlvbiB0b1N0cmluZygpIHsKICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdGhpcyA9PT0gJ2Z1bmN0aW9uJykgewogICAgICAgICAgICAgICAgICAgIHZhciBvcmlnaW5hbERlbGVnYXRlID0gdGhpc1tPUklHSU5BTF9ERUxFR0FURV9TWU1CT0xdOwogICAgICAgICAgICAgICAgICAgIGlmIChvcmlnaW5hbERlbGVnYXRlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2Ygb3JpZ2luYWxEZWxlZ2F0ZSA9PT0gJ2Z1bmN0aW9uJykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9yaWdpbmFsRnVuY3Rpb25Ub1N0cmluZy5jYWxsKG9yaWdpbmFsRGVsZWdhdGUpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIE9iamVjdC5wcm90b3R5cGUudG9TdHJpbmcuY2FsbChvcmlnaW5hbERlbGVnYXRlKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBpZiAodGhpcyA9PT0gUHJvbWlzZSkgewogICAgICAgICAgICAgICAgICAgICAgICB2YXIgbmF0aXZlUHJvbWlzZSA9IGdsb2JhbFtQUk9NSVNFX1NZTUJPTF07CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChuYXRpdmVQcm9taXNlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gb3JpZ2luYWxGdW5jdGlvblRvU3RyaW5nLmNhbGwobmF0aXZlUHJvbWlzZSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMgPT09IEVycm9yKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBuYXRpdmVFcnJvciA9IGdsb2JhbFtFUlJPUl9TWU1CT0xdOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAobmF0aXZlRXJyb3IpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvcmlnaW5hbEZ1bmN0aW9uVG9TdHJpbmcuY2FsbChuYXRpdmVFcnJvcik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gb3JpZ2luYWxGdW5jdGlvblRvU3RyaW5nLmNhbGwodGhpcyk7CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIG5ld0Z1bmN0aW9uVG9TdHJpbmdbT1JJR0lOQUxfREVMRUdBVEVfU1lNQk9MXSA9IG9yaWdpbmFsRnVuY3Rpb25Ub1N0cmluZzsKICAgICAgICAgICAgRnVuY3Rpb24ucHJvdG90eXBlLnRvU3RyaW5nID0gbmV3RnVuY3Rpb25Ub1N0cmluZzsKICAgICAgICAgICAgLy8gcGF0Y2ggT2JqZWN0LnByb3RvdHlwZS50b1N0cmluZyB0byBsZXQgdGhlbSBsb29rIGxpa2UgbmF0aXZlCiAgICAgICAgICAgIHZhciBvcmlnaW5hbE9iamVjdFRvU3RyaW5nID0gT2JqZWN0LnByb3RvdHlwZS50b1N0cmluZzsKICAgICAgICAgICAgdmFyIFBST01JU0VfT0JKRUNUX1RPX1NUUklORyA9ICdbb2JqZWN0IFByb21pc2VdJzsKICAgICAgICAgICAgT2JqZWN0LnByb3RvdHlwZS50b1N0cmluZyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgIGlmICh0aGlzIGluc3RhbmNlb2YgUHJvbWlzZSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBQUk9NSVNFX09CSkVDVF9UT19TVFJJTkc7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gb3JpZ2luYWxPYmplY3RUb1N0cmluZy5jYWxsKHRoaXMpOwogICAgICAgICAgICB9OwogICAgICAgIH0pOwogICAgICAgIC8qKgogICAgICAgICAqIEBsaWNlbnNlCiAgICAgICAgICogQ29weXJpZ2h0IEdvb2dsZSBJbmMuIEFsbCBSaWdodHMgUmVzZXJ2ZWQuCiAgICAgICAgICoKICAgICAgICAgKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSBhbiBNSVQtc3R5bGUgbGljZW5zZSB0aGF0IGNhbiBiZQogICAgICAgICAqIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUgYXQgaHR0cHM6Ly9hbmd1bGFyLmlvL2xpY2Vuc2UKICAgICAgICAgKi8KICAgICAgICB2YXIgcGFzc2l2ZVN1cHBvcnRlZCA9IGZhbHNlOwogICAgICAgIGlmICh0eXBlb2Ygd2luZG93ICE9PSAndW5kZWZpbmVkJykgewogICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgdmFyIG9wdGlvbnMgPSBPYmplY3QuZGVmaW5lUHJvcGVydHkoe30sICdwYXNzaXZlJywgeyBnZXQ6IGZ1bmN0aW9uICgpIHsgcGFzc2l2ZVN1cHBvcnRlZCA9IHRydWU7IH0gfSk7CiAgICAgICAgICAgICAgICB3aW5kb3cuYWRkRXZlbnRMaXN0ZW5lcigndGVzdCcsIG9wdGlvbnMsIG9wdGlvbnMpOwogICAgICAg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QWxsTGlzdGVuZXJzJzsKICAgICAgICAgICAgdmFyIHpvbmVTeW1ib2xBZGRFdmVudExpc3RlbmVyID0gem9uZVN5bWJvbChBRERfRVZFTlRfTElTVEVORVIpOwogICAgICAgICAgICB2YXIgQUREX0VWRU5UX0xJU1RFTkVSX1NPVVJDRSA9ICcuJyArIEFERF9FVkVOVF9MSVNURU5FUiArICc6JzsKICAgICAgICAgICAgdmFyIFBSRVBFTkRfRVZFTlRfTElTVEVORVIgPSAncHJlcGVuZExpc3RlbmVyJzsKICAgICAgICAgICAgdmFyIFBSRVBFTkRfRVZFTlRfTElTVEVORVJfU09VUkNFID0gJy4nICsgUFJFUEVORF9FVkVOVF9MSVNURU5FUiArICc6JzsKICAgICAgICAgICAgdmFyIGludm9rZVRhc2sgPSBmdW5jdGlvbiAodGFzaywgdGFyZ2V0LCBldmVudCkgewogICAgICAgICAgICAgICAgLy8gZm9yIGJldHRlciBwZXJmb3JtYW5jZSwgY2hlY2sgaXNSZW1vdmVkIHdoaWNoIGlzIHNldAogICAgICAgICAgICAgICAgLy8gYnkgcmVtb3ZlRXZlbnRMaXN0ZW5lcgogICAgICAgICAgICAgICAgaWYgKHRhc2suaXNSZW1vdmVkKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdmFyIGRlbGVnYXRlID0gdGFzay5jYWxsYmFjazsKICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgZGVsZWdhdGUgPT09ICdvYmplY3QnICYmIGRlbGVnYXRlLmhhbmRsZUV2ZW50KSB7CiAgICAgICAgICAgICAgICAgICAgLy8gY3JlYXRlIHRoZSBiaW5kIHZlcnNpb24gb2YgaGFuZGxlRXZlbnQgd2hlbiBpbnZva2UKICAgICAgICAgICAgICAgICAgICB0YXNrLmNhbGxiYWNrID0gZnVuY3Rpb24gKGV2ZW50KSB7IHJldHVybiBkZWxlZ2F0ZS5oYW5kbGVFdmVudChldmVudCk7IH07CiAgICAgICAgICAgICAgICAgICAgdGFzay5vcmlnaW5hbERlbGVnYXRlID0gZGVsZWdhdGU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvLyBpbnZva2Ugc3RhdGljIHRhc2suaW52b2tlCiAgICAgICAgICAgICAgICB0YXNrLmludm9rZSh0YXNrLCB0YXJnZXQsIFtldmVudF0pOwogICAgICAgICAgICAgICAgdmFyIG9wdGlvbnMgPSB0YXNrLm9wdGlvbnM7CiAgICAgICAgICAgICAgICBpZiAob3B0aW9ucyAmJiB0eXBlb2Ygb3B0aW9ucyA9PT0gJ29iamVjdCcgJiYgb3B0aW9ucy5vbmNlKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gaWYgb3B0aW9ucy5vbmNlIGlzIHRydWUsIGFmdGVyIGludm9rZSBvbmNlIHJlbW92ZSBsaXN0ZW5lciBoZXJlCiAgICAgICAgICAgICAgICAgICAgLy8gb25seSBicm93c2VyIG5lZWQgdG8gZG8gdGhpcywgbm9kZWpzIGV2ZW50RW1pdHRlciB3aWxsIGNhbCByZW1vdmVMaXN0ZW5lcgogICAgICAgICAgICAgICAgICAgIC8vIGluc2lkZSBFdmVudEVtaXR0ZXIub25jZQogICAgICAgICAgICAgICAgICAgIHZhciBkZWxlZ2F0ZV8xID0gdGFzay5vcmlnaW5hbERlbGVnYXRlID8gdGFzay5vcmlnaW5hbERlbGVnYXRlIDogdGFzay5jYWxsYmFjazsKICAgICAgICAgICAgICAgICAgICB0YXJnZXRbUkVNT1ZFX0VWRU5UX0xJU1RFTkVSXS5jYWxsKHRhcmdldCwgZXZlbnQudHlwZSwgZGVsZWdhdGVfMSwgb3B0aW9ucyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIC8vIGdsb2JhbCBzaGFyZWQgem9uZUF3YXJlQ2FsbGJhY2sgdG8gaGFuZGxlIGFsbCBldmVudCBjYWxsYmFjayB3aXRoIGNhcHR1cmUgPSBmYWxzZQogICA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HRhc2subGVuZ3RoID09PSAxLCBqdXN0IGludm9rZQogICAgICAgICAgICAgICAgICAgIGlmICh0YXNrcy5sZW5ndGggPT09IDEpIHsKICAgICAgICAgICAgICAgICAgICAgICAgaW52b2tlVGFzayh0YXNrc1swXSwgdGFyZ2V0LCBldmVudCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAvLyBodHRwczovL2dpdGh1Yi5jb20vYW5ndWxhci96b25lLmpzL2lzc3Vlcy84MzYKICAgICAgICAgICAgICAgICAgICAgICAgLy8gY29weSB0aGUgdGFza3MgYXJyYXkgYmVmb3JlIGludm9rZSwgdG8gYXZvaWQKICAgICAgICAgICAgICAgICAgICAgICAgLy8gdGhlIGNhbGxiYWNrIHdpbGwgcmVtb3ZlIGl0c2VsZiBvciBvdGhlciBsaXN0ZW5lcgogICAgICAgICAgICAgICAgICAgICAgICB2YXIgY29weVRhc2tzID0gdGFza3Muc2xpY2UoKTsKICAgICAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjb3B5VGFza3MubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChldmVudCAmJiBldmVudFtJTU1FRElBVEVfUFJPUEFHQVRJT05fU1lNQk9MXSA9PT0gdHJ1ZSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgaW52b2tlVGFzayhjb3B5VGFza3NbaV0sIHRhcmdldCwgZXZlbnQpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9OwogICAgICAgICAgICAvLyBnbG9iYWwgc2hhcmVkIHpvbmVBd2FyZUNhbGxiYWNrIHRvIGhhbmRsZSBhbGwgZXZ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AgICAgICAgLy8gZm9yIHBlcmZvcm1hbmNlIGNvbmNlcm4sIGlmIHRhc2subGVuZ3RoID09PSAxLCBqdXN0IGludm9rZQogICAgICAgICAgICAgICAgICAgIGlmICh0YXNrcy5sZW5ndGggPT09IDEpIHsKICAgICAgICAgICAgICAgICAgICAgICAgaW52b2tlVGFzayh0YXNrc1swXSwgdGFyZ2V0LCBldmVudCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAvLyBodHRwczovL2dpdGh1Yi5jb20vYW5ndWxhci96b25lLmpzL2lzc3Vlcy84MzYKICAgICAgICAgICAgICAgICAgICAgICAgLy8gY29weSB0aGUgdGFza3MgYXJyYXkgYmVmb3JlIGludm9rZSwgdG8gYXZvaWQKICAgICAgICAgICAgICAgICAgICAgICAgLy8gdGhlIGNhbGxiYWNrIHdpbGwgcmVtb3ZlIGl0c2VsZiBvciBvdGhlciBsaXN0ZW5lcgogICAgICAgICAgICAgICAgICAgICAgICB2YXIgY29weVRhc2tzID0gdGFza3Muc2xpY2UoKTsKICAgICAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjb3B5VGFza3MubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChldmVudCAmJiBldmVudFtJTU1FRElBVEVfUFJPUEFHQVRJT05fU1lNQk9MXSA9PT0gdHJ1ZSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgaW52b2tlVGFzayhjb3B5VGFza3NbaV0sIHRhcmdldCwgZXZlbnQpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9OwogICAgICAgICAgICBmdW5jdGlvbiBwYXRjaEV2ZW50VGFyZ2V0TWV0aG9kcyhvYmosIHBhdGNoT3B0aW9ucykgewogICAgICAgICAgICAgICAgaWYgKCFvYmopIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB2YXIgdXNlR2xvYmFsQ2FsbGJhY2sgPSB0cnVlOwogICAgICAgICAgICAgICAgaWYgKHBhdGNoT3B0aW9ucyAmJiBwYXRjaE9wdGlvbnMudXNlRyAhPT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgICAgICAgICAgdXNlR2xvYmFsQ2FsbGJhY2sgPSBwYXRjaE9wdGlvbnMudXNlRzsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHZhciB2YWxpZGF0ZUhhbmRsZXIgPSBwYXRjaE9wdGlvbnMgJiYgcGF0Y2hPcHRpb25zLnZoOwogICAgICAgICAgICAgICAgdmFyIGNoZWNrRHVwbGljYXRlID0gdHJ1ZTsKICAgICAgICAgICAgICAgIGlmIChwYXRjaE9wdGlvbnMgJiYgcGF0Y2hPcHRpb25zLmNoa0R1cCAhPT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgICAgICAgICAgY2hlY2tEdXBsaWNhdGUgPSBwYXRjaE9wdGlvbnMuY2hrRHVwOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdmFyIHJldHVyblRhcmdldCA9IGZhbHNlOwogICAgICAgICAgICAgICAgaWYgKHBhdGNoT3B0aW9ucyAmJiBwYXRjaE9wdGlvbnMucnQgIT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICAgICAgICAgIHJldHVyblRhcmdldCA9IHBhdGNoT3B0aW9ucy5ydDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHZhciBwcm90byA9IG9iajsKICAgICAgICAgICAgICAgIHdoaWxlIChwcm90byAmJiAhcHJvdG8uaGFzT3duUHJvcGVydHkoQUREX0VWRU5UX0xJU1RFTkVSKSkgewogICAgICAgICAgICAgICAgICAgIHByb3RvID0gT2JqZWN0R2V0UHJvdG90eXBlT2YocHJvdG8pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKCFwcm90byAmJiBvYmpbQUREX0VWRU5UX0xJU1RFTkVSXSkgewogICAgICAgICAgICAgICAgICAgIC8vIHNvbWVob3cgd2UgZGlkIG5vdCBmaW5kIGl0LCBidXQgd2UgY2FuIHNlZSBpdC4gVGhpcyBoYXBwZW5zIG9uIElFIGZvciBXaW5kb3cgcHJvcGVydGllcy4KICAgICAgICAgICAgICAgICAgICBwcm90byA9IG9iajsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmICghcHJvdG8pIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAocHJvdG9bem9uZVN5bWJvbEFkZEV2ZW50TGlzdGVuZXJdKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdmFyIGV2ZW50TmFtZVRvU3RyaW5nID0gcGF0Y2hPcHRpb25zICYmIHBhdGNoT3B0aW9ucy5ldmVudE5hbWVUb1N0cmluZzsKICAgICAgICAgICAgICAgIC8vIGEgc2hhcmVkIGdsb2JhbCB0YXNrRGF0YSB0byBwYXNzIGRhdGEgZm9yIHNjaGVkdWxlRXZlbnRUYXNrCiAgICAgICAgICAgICAgICAvLyBzbyB3ZSBkbyBub3QgbmVlZCB0byBjcmVhdGUgYSBuZXcgb2JqZWN0IGp1c3QgZm9yIHBhc3Mgc29tZSBkYXRhCiAgICAgICAgICAgICAgICB2YXIgdGFza0RhdGEgPSB7fTsKICAgICAgICAgICAgICAgIHZhciBuYXRpdmVBZGRFdmVudExpc3RlbmVyID0gcHJvdG9bem9uZVN5bWJvbEFkZEV2ZW50TGlzdGVuZXJdID0gcHJvdG9bQUREX0VWRU5UX0xJU1RFTkVSXTsKICAgICAgICAgICAgICAgIHZhciBuYXRpdmVSZW1vdmVFdmVudExpc3RlbmVyID0gcHJvdG9bem9uZVN5bWJvbChSRU1PVkVfRVZFTlRfTElTVEVORVIpXSA9CiAgICAgICAgICAgICAgICAgICAgcHJvdG9bUkVNT1ZFX0VWRU5UX0xJU1RFTkVSXTsKICAgICAgICAgICAgICAgIHZhciBuYXRpdmVMaXN0ZW5lcnMgPSBwcm90b1t6b25lU3ltYm9sKExJU1RFTkVSU19FVkVOVF9MSVNURU5FUildID0KICAgICAgICAgICAgICAgICAgICBwcm90b1tMSVNURU5FUlNfRVZFTlRfTElTVEVORVJdOwogICAgICAgICAgICAgICAgdmFyIG5hdGl2ZVJlbW92ZUFsbExpc3RlbmVycyA9IHByb3RvW3pvbmVTeW1ib2woUkVNT1ZFX0FMTF9MSVNURU5FUlNfRVZFTlRfTElTVEVORVIpXSA9CiAgICAgICAgICAgICAgICAgICAgcHJvdG9bUkVNT1ZFX0FMTF9MSVNURU5FUlNfRVZFTlRfTElTVEVORVJdOwogICAgICAgICAgICAgICAgdmFyIG5hdGl2ZVByZXBlbmRFdmVudExpc3RlbmVyOwogICAgICAgICAgICAgICAgaWYgKHBhdGNoT3B0aW9ucyAmJiBwYXRjaE9wdGlvbnMucHJlcGVuZCkgewogICAgICAgICAgICAgICAgICAgIG5hdGl2ZVByZXBlbmRFdmVudExpc3RlbmVyID0gcHJvdG9bem9uZVN5bWJvbChwYXRjaE9wdGlvbnMucHJlcGVuZCldID0KICAgICAgICAgICAgICAgICAgICAgICAgcHJvdG9bcGF0Y2hPcHRpb25zLnByZXBlbmRdOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAgICAgKiBUaGlzIHV0aWwgZnVuY3Rpb24gd2lsbCBidWlsZCBhbiBvcHRpb24gb2JqZWN0IHdpdGggcGFzc2l2ZSBvcHRpb24KICAgICAgICAgICAgICAgICAqIHRvIGhhbmRsZSBhbGwgcG9zc2libGUgaW5wdXQgZnJvbSB0aGUgdXNlci4KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgZnVuY3Rpb24gYnVpbGRFdmVudExpc3RlbmVyT3B0aW9ucyhvcHRpb25zLCBwYXNzaXZlKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKCFwYXNzaXZlU3VwcG9ydGVkICYmIHR5cGVvZiBvcHRpb25zID09PSAnb2JqZWN0JyAmJiBvcHRpb25zKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGRvZXNuJ3Qgc3VwcG9ydCBwYXNzaXZlIGJ1dCB1c2VyIHdhbnQgdG8gcGFzcyBhbiBvYmplY3QgYXMgb3B0aW9ucy4KICAgICAgICAgICAgICAgICAgICAgICAgLy8gdGhpcyB3aWxsIG5vdCB3b3JrIG9uIHNvbWUgb2xkIGJyb3dzZXIsIHNvIHdlIGp1c3QgcGFzcyBhIGJvb2xlYW4KICAgICAgICAgICAgICAgICAgICAgICAgLy8gYXMgdXNlQ2FwdHVyZSBwYXJhbWV0ZXIKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICEhb3B0aW9ucy5jYXB0dXJlOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBpZiAoIXBhc3NpdmVTdXBwb3J0ZWQgfHwgIXBhc3NpdmUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9wdGlvbnM7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2Ygb3B0aW9ucyA9PT0gJ2Jvb2xlYW4nKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7IGNhcHR1cmU6IG9wdGlvbnMsIHBhc3NpdmU6IHRydWUgfTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgaWYgKCFvcHRpb25zKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7IHBhc3NpdmU6IHRydWUgfTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBvcHRpb25zID09PSAnb2JqZWN0JyAmJiBvcHRpb25zLnBhc3NpdmUgIT09IGZhbHNlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sIG9wdGlvbnMpLCB7IHBhc3NpdmU6IHRydWUgfSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHJldHVybiBvcHRpb25zOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdmFyIGN1c3RvbVNjaGVkdWxlR2xvYmFsID0gZnVuY3Rpb24gKHRhc2spIHsKICAgICAgICAgICAgICAgICAgICAvLyBpZiB0aGVyZSBpcyBhbHJlYWR5IGEgdGFzayBmb3IgdGhlIGV2ZW50TmFtZSArIGNhcHR1cmUsCiAgICAgICAgICAgICAgICAgICAgLy8ganVzdCByZXR1cm4sIGJlY2F1c2Ugd2UgdXNlIHRoZSBzaGFyZWQgZ2xvYmFsWm9uZUF3YXJlQ2FsbGJhY2sgaGVyZS4KICAgICAgICAgICAgICAgICAgICBpZiAodGFza0RhdGEuaXNFeGlzdGluZykgewogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHJldHVybiBuYXRpdmVBZGRFdmVudExpc3RlbmVyLmNhbGwodGFza0RhdGEudGFyZ2V0LCB0YXNrRGF0YS5ldmVudE5hbWUsIHRhc2tEYXRhLmNhcHR1cmUgPyBnbG9iYWxab25lQXdhcmVDYXB0dXJlQ2FsbGJhY2sgOiBnbG9iYWxab25lQXdhcmVDYWxsYmFjaywgdGFza0RhdGEub3B0aW9ucyk7CiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgdmFyIGN1c3RvbUNhbmNlbEdsb2JhbCA9IGZ1bmN0aW9uICh0YXNrKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gaWYgdGFzayBpcyBub3QgbWFya2VkIGFzIGlzUmVtb3ZlZCwgdGhpcyBjYWxsIGlzIGRpcmVjdGx5CiAgICAgICAgICAgICAgICAgICAgLy8gZnJvbSBab25lLnByb3RvdHlwZS5jYW5jZWxUYXNrLCB3ZSBzaG91bGQgcmVtb3ZlIHRoZSB0YXNrCiAgICAgICAgICAgICAgICAgICAgLy8gZnJvbSB0YXNrc0xpc3Qgb2YgdGFyZ2V0IGZpcnN0CiAgICAgICAgICAgICAgICAgICAgaWYgKCF0YXNrLmlzUmVtb3ZlZCkgewogICAgICAgICAgICAgICAgICAgICAgICB2YXIgc3ltYm9sRXZlbnROYW1lcyA9IHpvbmVTeW1ib2xFdmVudE5hbWVzJDFbdGFzay5ldmVudE5hbWVdOwogICAgICAgICAgICAgICAgICAgICAgICB2YXIgc3ltYm9sRXZlbnROYW1lID0gdm9pZCAwOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3ltYm9sRXZlbnROYW1lcykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgc3ltYm9sRXZlbnROYW1lID0gc3ltYm9sRXZlbnROYW1lc1t0YXNrLmNhcHR1cmUgPyBUUlVFX1NUUiA6IEZBTFNFX1NUUl07CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGV4aXN0aW5nVGFza3MgPSBzeW1ib2xFdmVudE5hbWUgJiYgdGFzay50YXJnZXRbc3ltYm9sRXZlbnROYW1lXTsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGV4aXN0aW5nVGFza3MpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZXhpc3RpbmdUYXNrcy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBleGlzdGluZ1Rhc2sgPSBleGlzdGluZ1Rhc2tzW2ldOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChleGlzdGluZ1Rhc2sgPT09IHRhc2spIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXhpc3RpbmdUYXNrcy5zcGxpY2UoaSwgMSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHNldCBpc1JlbW92ZWQgdG8gZGF0YSBmb3IgZmFzdGVyIGludm9rZVRhc2sgY2hlY2sKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFzay5pc1JlbW92ZWQgPSB0cnVlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZXhpc3RpbmdUYXNrcy5sZW5ndGggPT09IDApIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGFsbCB0YXNrcyBmb3IgdGhlIGV2ZW50TmFtZSArIGNhcHR1cmUgaGF2ZSBnb25lLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gcmVtb3ZlIGdsb2JhbFpvbmVBd2FyZUNhbGxiYWNrIGFuZCByZW1vdmUgdGhlIHRhc2sgY2FjaGUgZnJvbSB0YXJnZXQKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhc2suYWxsUmVtb3ZlZCA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YXNrLnRhcmdldFtzeW1ib2xFdmVudE5hbWVdID0gbnVsbDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgLy8gaWYgYWxsIHRhc2tzIGZvciB0aGUgZXZlbnROYW1lICsgY2FwdHVyZSBoYXZlIGdvbmUsCiAgICAgICAgICAgICAgICAgICAgLy8gd2Ugd2lsbCByZWFsbHkgcmVtb3ZlIHRoZSBnbG9iYWwgZXZlbnQgY2FsbGJhY2ssCiAgICAgICAgICAgICAgICAgICAgLy8gaWYgbm90LCByZXR1cm4KICAgICAgICAgICAgICAgICAgICBpZiAoIXRhc2suYWxsUmVtb3ZlZCkgewogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHJldHVybiBuYXRpdmVSZW1vdmVFdmVudExpc3RlbmVyLmNhbGwodGFzay50YXJnZXQsIHRhc2suZXZlbnROYW1lLCB0YXNrLmNhcHR1cmUgPyBnbG9iYWxab25lQXdhcmVDYXB0dXJlQ2FsbGJhY2sgOiBnbG9iYWxab25lQXdhcmVDYWxsYmFjaywgdGFzay5vcHRpb25zKTsKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICB2YXIgY3VzdG9tU2NoZWR1bGVOb25HbG9iYWwgPSBmdW5jdGlvbiAodGFzaykgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBuYXRpdmVBZGRFdmVudExpc3RlbmVyLmNhbGwodGFza0RhdGEudGFyZ2V0LCB0YXNrRGF0YS5ldmVudE5hbWUsIHRhc2suaW52b2tlLCB0YXNrRGF0YS5vcHRpb25zKTsKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICB2YXIgY3VzdG9tU2NoZWR1bGVQcmVwZW5kID0gZnVuY3Rpb24gKHRhc2spIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmF0aXZlUHJlcGVuZEV2ZW50TGlzdGVuZXIuY2FsbCh0YXNrRGF0YS50YXJnZXQsIHRhc2tEYXRhLmV2ZW50TmFtZSwgdGFzay5pbnZva2UsIHRhc2tEYXRhLm9wdGlvbnMpOwogIC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ZmYgOiBjb21wYXJlVGFza0NhbGxiYWNrVnNEZWxlZ2F0ZTsKICAgICAgICAgICAgICAgIHZhciBibGFja0xpc3RlZEV2ZW50cyA9IFpvbmVbem9uZVN5bWJvbCgnQkxBQ0tfTElTVEVEX0VWRU5UUycpXTsKICAgICAgICAgICAgICAgIHZhciBwYXNzaXZlRXZlbnRzID0gX2dsb2JhbFt6b25lU3ltYm9sKCdQQVNTSVZFX0VWRU5UUycpXTsKICAgICAgICAgICAgICAgIHZhciBtYWtlQWRkTGlzdGVuZXIgPSBmdW5jdGlvbiAobmF0aXZlTGlzdGVuZXIsIGFkZFNvdXJjZSwgY3VzdG9tU2NoZWR1bGVGbiwgY3VzdG9tQ2FuY2VsRm4sIHJldHVyblRhcmdldCwgcHJlcGVuZCkgewogICAgICAgICAgICAgICAgICAgIGlmIChyZXR1cm5UYXJnZXQgPT09IHZvaWQgMCkgeyByZXR1cm5UYXJnZXQgPSBmYWxzZTsgfQogICAgICAgICAgICAgICAgICAgIGlmIChwcmVwZW5kID09PSB2b2lkIDApIHsgcHJlcGVuZCA9IGZhbHNlOyB9CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRhcmdldCA9IHRoaXMgfHwgX2dsb2JhbDsKICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGV2ZW50TmFtZSA9IGFyZ3VtZW50c1swXTsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBhdGNoT3B0aW9ucyAmJiBwYXRjaE9wdGlvbnMudHJhbnNmZXJFdmVudE5hbWUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2ZW50TmFtZSA9IHBhdGNoT3B0aW9ucy50cmFuc2ZlckV2ZW50TmFtZShldmVudE5hbWUpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkZWxlZ2F0ZSA9IGFyZ3VtZW50c1sxXTsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFkZWxlZ2F0ZSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5hdGl2ZUxpc3RlbmVyLmFwcGx5KHRoaXMsIGFyZ3VtZW50cyk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlzTm9kZSAmJiBldmVudE5hbWUgPT09ICd1bmNhdWdodEV4Y2VwdGlvbicpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGRvbid0IHBhdGNoIHVuY2F1Z2h0RXhjZXB0aW9uIG9mIG5vZGVqcyB0byBwcmV2ZW50IGVuZGxlc3MgbG9vcAogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5hdGl2ZUxpc3RlbmVyLmFwcGx5KHRoaXMsIGFyZ3VtZW50cyk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLy8gZG9uJ3QgY3JlYXRlIHRoZSBiaW5kIGRlbGVnYXRlIGZ1bmN0aW9uIGZvciBoYW5kbGVFdmVudAogICAgICAgICAgICAgICAgICAgICAgICAvLyBjYXNlIGhlcmUgdG8gaW1wcm92ZSBhZGRFdmVudExpc3RlbmVyIHBlcmZvcm1hbmNlCiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHdlIHdpbGwgY3JlYXRlIHRoZSBiaW5kIGRlbGVnYXRlIHdoZW4gaW52b2tlCiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBpc0hhbmRsZUV2ZW50ID0gZmFsc2U7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgZGVsZWdhdGUgIT09ICdmdW5jdGlvbicpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghZGVsZWdhdGUuaGFuZGxlRXZlbnQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmF0aXZlTGlzdGVuZXIuYXBwbHkodGhpcywgYXJndW1lbnRzKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzSGFuZGxlRXZlbnQgPSB0cnVlOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2YWxpZGF0ZUhhbmRsZXIgJiYgIXZhbGlkYXRlSGFuZGxlcihuYXRpdmVMaXN0ZW5lciwgZGVsZWdhdGUsIHRhcmdldCwgYXJndW1lbnRzKSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwYXNzaXZlID0gcGFzc2l2ZVN1cHBvcnRlZCAmJiAhIXBhc3NpdmVFdmVudHMgJiYgcGFzc2l2ZUV2ZW50cy5pbmRleE9mKGV2ZW50TmFtZSkgIT09IC0xOwogICAgICAgICAgICAgICAgICAgICAgICB2YXIgb3B0aW9ucyA9IGJ1aWxkRXZlbnRMaXN0ZW5lck9wdGlvbnMoYXJndW1lbnRzWzJdLCBwYXNzaXZlKTsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGJsYWNrTGlzdGVkRXZlbnRzKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBjaGVjayBibGFjayBsaXN0CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGJsYWNrTGlzdGVkRXZlbnRzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGV2ZW50TmFtZSA9PT0gYmxhY2tMaXN0ZWRFdmVudHNbaV0pIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBhc3NpdmUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBuYXRpdmVMaXN0ZW5lci5jYWxsKHRhcmdldCwgZXZlbnROYW1lLCBkZWxlZ2F0ZSwgb3B0aW9ucyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmF0aXZlTGlzdGVuZXIuYXBwbHkodGhpcywgYXJndW1lbnRzKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB2YXIgY2FwdHVyZSA9ICFvcHRpb25zID8gZmFsc2UgOiB0eXBlb2Ygb3B0aW9ucyA9PT0gJ2Jvb2xlYW4nID8gdHJ1ZSA6IG9wdGlvbnMuY2FwdHVyZTsKICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG9uY2UgPSBvcHRpb25zICYmIHR5cGVvZiBvcHRpb25zID09PSAnb2JqZWN0JyA/IG9wdGlvbnMub25jZSA6IGZhbHNlOwogICAgICAgICAgICAgICAgICAgICAgICB2YXIgem9uZSA9IFpvbmUuY3VycmVudDsKICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHN5bWJvbEV2ZW50TmFtZXMgPSB6b25lU3ltYm9sRXZlbnROYW1lcyQxW2V2ZW50TmFtZV07CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghc3ltYm9sRXZlbnROYW1lcykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJlcGFyZUV2ZW50TmFtZXMoZXZlbnROYW1lLCBldmVudE5hbWVUb1N0cmluZyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzeW1ib2xFdmVudE5hbWVzID0gem9uZVN5bWJvbEV2ZW50TmFtZXMkMVtldmVudE5hbWVdOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzeW1ib2xFdmVudE5hbWUgPSBzeW1ib2xFdmVudE5hbWVzW2NhcHR1cmUgPyBUUlVFX1NUUiA6IEZBTFNFX1NUUl07CiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBleGlzdGluZ1Rhc2tzID0gdGFyZ2V0W3N5bWJvbEV2ZW50TmFtZV07CiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBpc0V4aXN0aW5nID0gZmFsc2U7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChleGlzdGluZ1Rhc2tzKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBhbHJlYWR5IGhhdmUgdGFzayByZWdpc3RlcmVkCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpc0V4aXN0aW5nID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjaGVja0R1cGxpY2F0ZSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZXhpc3RpbmdUYXNrcy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY29tcGFyZShleGlzdGluZ1Rhc2tzW2ldLCBkZWxlZ2F0ZSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHNhbWUgY2FsbGJhY2ssIHNhbWUgY2FwdHVyZSwgc2FtZSBldmVudCBuYW1lLCBqdXN0IHJldHVybgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZXhpc3RpbmdUYXNrcyA9IHRhcmdldFtzeW1ib2xFdmVudE5hbWVdID0gW107CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHNvdXJjZTsKICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGNvbnN0cnVjdG9yTmFtZSA9IHRhcmdldC5jb25zdHJ1Y3RvclsnbmFtZSddOwogICAgICAgICAgICAgICAgICAgICAgICB2YXIgdGFyZ2V0U291cmNlID0gZ2xvYmFsU291cmNlc1tjb25zdHJ1Y3Rvck5hbWVdOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAodGFyZ2V0U291cmNlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzb3VyY2UgPSB0YXJnZXRTb3VyY2VbZXZlbnROYW1lXTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXNvdXJjZSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlID0gY29uc3RydWN0b3JOYW1lICsgYWRkU291cmNlICsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZXZlbnROYW1lVG9TdHJpbmcgPyBldmVudE5hbWVUb1N0cmluZyhldmVudE5hbWUpIDogZXZlbnROYW1lKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAvLyBkbyBub3QgY3JlYXRlIGEgbmV3IG9iamVjdCBhcyB0YXNrLmRhdGEgdG8gcGFzcyB0aG9zZSB0aGluZ3MKICAgICAgICAgICAgICAgICAgICAgICAgLy8ganVzdCB1c2UgdGhlIGdsb2JhbCBzaGFyZWQgb25lCiAgICAgICAgICAgICAgICAgICAgICAgIHRhc2tEYXRhLm9wdGlvbnMgPSBvcHRpb25zOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAob25jZSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaWYgYWRkRXZlbnRMaXN0ZW5lciB3aXRoIG9uY2Ugb3B0aW9ucywgd2UgZG9uJ3QgcGFzcyBpdCB0bwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbmF0aXZlIGFkZEV2ZW50TGlzdGVuZXIsIGluc3RlYWQgd2Uga2VlcCB0aGUgb25jZSBzZXR0aW5nCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBhbmQgaGFuZGxlIG91cnNlbHZlcy4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhc2tEYXRhLm9wdGlvbnMub25jZSA9IGZhbHNlOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIHRhc2tEYXRhLnRhcmdldCA9IHRhcmdldDsKICAgICAgICAgICAgICAgICAgICAgICAgdGFza0RhdGEuY2FwdHVyZSA9IGNhcHR1cmU7CiAgICAgICAgICAgICAgICAgICAgICAgIHRhc2tEYXRhLmV2ZW50TmFtZSA9IGV2ZW50TmFtZTsKICAgICAgICAgICAgICAgICAgICAgICAgdGFza0RhdGEuaXNFeGlzdGluZyA9IGlzRXhpc3Rpbmc7CiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkYXRhID0gdXNlR2xvYmFsQ2FsbGJhY2sgPyBPUFRJTUlaRURfWk9ORV9FVkVOVF9UQVNLX0RBVEEgOiB1bmRlZmluZWQ7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGtlZXAgdGFza0RhdGEgaW50byBkYXRhIHRvIGFsbG93IG9uU2NoZWR1bGVFdmVudFRhc2sgdG8gYWNjZXNzIHRoZSB0YXNrIGluZm9ybWF0aW9uCiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkYXRhKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhLnRhc2tEYXRhID0gdGFza0RhdGE7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRhc2sgPSB6b25lLnNjaGVkdWxlRXZlbnRUYXNrKHNvdXJjZSwgZGVsZWdhdGUsIGRhdGEsIGN1c3RvbVNjaGVkdWxlRm4sIGN1c3RvbUNhbmNlbEZuKTsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gc2hvdWxkIGNsZWFyIHRhc2tEYXRhLnRhcmdldCB0byBhdm9pZCBtZW1vcnkgbGVhawogICAgICAgICAgICAgICAgICAgICAgICAvLyBpc3N1ZSwgaHR0cHM6Ly9naXRodWIuY29tL2FuZ3VsYXIvYW5ndWxhci9pc3N1ZXMvMjA0NDIKICAgICAgICAgICAgICAgICAgICAgICAgdGFza0RhdGEudGFyZ2V0ID0gbnVsbDsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gbmVlZCB0byBjbGVhciB1cCB0YXNrRGF0YSBiZWNhdXNlIGl0IGlzIGEgZ2xvYmFsIG9iamVjdAogICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGF0YSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS50YXNrRGF0YSA9IG51bGw7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLy8gaGF2ZSB0byBzYXZlIHRob3NlIGluZm9ybWF0aW9uIHRvIHRhc2sgaW4gY2FzZQogICAgICAgICAgICAgICAgICAgICAgICAvLyBhcHBsaWNhdGlvbiBtYXkgY2FsbCB0YXNrLnpvbmUuY2FuY2VsVGFzaygpIGRpcmVjdGx5CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChvbmNlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zLm9uY2UgPSB0cnVlOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghKCFwYXNzaXZlU3VwcG9ydGVkICYmIHR5cGVvZiB0YXNrLm9wdGlvbnMgPT09ICdib29sZWFuJykpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGlmIG5vdCBzdXBwb3J0IHBhc3NpdmUsIGFuZCB3ZSBwYXNzIGFuIG9wdGlvbiBvYmplY3QKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHRvIGFkZEV2ZW50TGlzdGVuZXIsIHdlIHNob3VsZCBzYXZlIHRoZSBvcHRpb25zIHRvIHRhc2sKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhc2sub3B0aW9ucyA9IG9wdGlvbnM7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgdGFzay50YXJnZXQgPSB0YXJnZXQ7CiAgICAgICAgICAgICAgICAgICAgICAgIHRhc2suY2FwdHVyZSA9IGNhcHR1cmU7CiAgICAgICAgICAgICAgICAgICAgICAgIHRhc2suZXZlbnROYW1lID0gZXZlbnROYW1lOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXNIYW5kbGVFdmVudCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gc2F2ZSBvcmlnaW5hbCBkZWxlZ2F0ZSBmb3IgY29tcGFyZSB0byBjaGVjayBkdXBsaWNhdGUKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhc2sub3JpZ2luYWxEZWxlZ2F0ZSA9IGRlbGVnYXRlOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghcHJlcGVuZCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZXhpc3RpbmdUYXNrcy5wdXNoKHRhc2spOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZXhpc3RpbmdUYXNrcy51bnNoaWZ0KHRhc2spOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXR1cm5UYXJnZXQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0YXJnZXQ7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIHByb3RvW0FERF9FVkVOVF9MSVNURU5FUl0gPSBtYWtlQWRkTGlzdGVuZXIobmF0aXZlQWRkRXZlbnRMaXN0ZW5lciwgQUREX0VWRU5UX0xJU1RFTkVSX1NPVVJDRSwgY3VzdG9tU2NoZWR1bGUsIGN1c3RvbUNhbmNlbCwgcmV0dXJuVGFyZ2V0KTsKICAgICAgICAgICAgICAgIGlmIChuYXRpdmVQcmVwZW5kRXZlbnRMaXN0ZW5lcikgewogICAgICAgICAgICAgICAgICAgIHByb3RvW1BSRVBFTkRfRVZFTlRfTElTVEVORVJdID0gbWFrZUFkZExpc3RlbmVyKG5hdGl2ZVByZXBlbmRFdmVudExpc3RlbmVyLCBQUkVQRU5EX0VWRU5UX0xJU1RFTkVSX1NPVVJDRSwgY3VzdG9tU2NoZWR1bGVQcmVwZW5kLCBjdXN0b21DYW5jZWwsIHJldHVyblRhcmdldCwgdHJ1ZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBwcm90b1tSRU1PVkVfRVZFTlRfTElTVEVORVJdID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgICAgIHZhciB0YXJnZXQgPSB0aGlzIHx8IF9nbG9iYWw7CiAgICAgICAgICAgICAgICAgICAgdmFyIGV2ZW50TmFtZSA9IGFyZ3VtZW50c1swXTsKICAgICAgICAgICAgICAgICAgICBpZiAocGF0Y2hPcHRpb25zICYmIHBhdGNoT3B0aW9ucy50cmFuc2ZlckV2ZW50TmFtZSkgewogICAgICAgICAgICAgICAgICAgICAgICBldmVudE5hbWUgPSBwYXRjaE9wdGlvbnMudHJhbnNmZXJFdmVudE5hbWUoZXZlbnROYW1lKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgdmFyIG9wdGlvbnMgPSBhcmd1bWVudHNbMl07CiAgICAgICAgICAgICAgICAgICAgdmFyIGNhcHR1cmUgPSAhb3B0aW9ucyA/IGZhbHNlIDogdHlwZW9mIG9wdGlvbnMgPT09ICdib29sZWFuJyA/IHRydWUgOiBvcHRpb25zLmNhcHR1cmU7CiAgICAgICAgICAgICAgICAgICAgdmFyIGRlbGVnYXRlID0gYXJndW1lbnRzWzFdOwogICAgICAgICAgICAgICAgICAgIGlmICghZGVsZWdhdGUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5hdGl2ZVJlbW92ZUV2ZW50TGlzdGVuZXIuYXBwbHkodGhpcywgYXJndW1lbnRzKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgaWYgKHZhbGlkYXRlSGFuZGxlciAmJgogICAgICAgICAgICAgICAgICAgICAgICAhdmFsaWRhdGVIYW5kbGVyKG5hdGl2ZVJlbW92ZUV2ZW50TGlzdGVuZXIsIGRlbGVnYXRlLCB0YXJnZXQsIGFyZ3VtZW50cykpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB2YXIgc3ltYm9sRXZlbnROYW1lcyA9IHpvbmVTeW1ib2xFdmVudE5hbWVzJDFbZXZlbnROYW1lXTsKICAgICAgICAgICAgICAgICAgICB2YXIgc3ltYm9sRXZlbnROYW1lOwogICAgICAgICAgICAgICAgICAgIGlmIChzeW1ib2xFdmVudE5hbWVzKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHN5bWJvbEV2ZW50TmFtZSA9IHN5bWJvbEV2ZW50TmFtZXNbY2FwdHVyZSA/IFRSVUVfU1RSIDogRkFMU0VfU1RSXTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgdmFyIGV4aXN0aW5nVGFza3MgPSBzeW1ib2xFdmVudE5hbWUgJiYgdGFyZ2V0W3N5bWJvbEV2ZW50TmFtZV07CiAgICAgICAgICAgICAgICAgICAgaWYgKGV4aXN0aW5nVGFza3MpIHsKICAgICAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBleGlzdGluZ1Rhc2tzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZXhpc3RpbmdUYXNrID0gZXhpc3RpbmdUYXNrc1tpXTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb21wYXJlKGV4aXN0aW5nVGFzaywgZGVsZWdhdGUpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXhpc3RpbmdUYXNrcy5zcGxpY2UoaSwgMSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gc2V0IGlzUmVtb3ZlZCB0byBkYXRhIGZvciBmYXN0ZXIgaW52b2tlVGFzayBjaGVjawogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4aXN0aW5nVGFzay5pc1JlbW92ZWQgPSB0cnVlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChleGlzdGluZ1Rhc2tzLmxlbmd0aCA9PT0gMCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBhbGwgdGFza3MgZm9yIHRoZSBldmVudE5hbWUgKyBjYXB0dXJlIGhhdmUgZ29uZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gcmVtb3ZlIGdsb2JhbFpvbmVBd2FyZUNhbGxiYWNrIGFuZCByZW1vdmUgdGhlIHRhc2sgY2FjaGUgZnJvbSB0YXJnZXQKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXhpc3RpbmdUYXNrLmFsbFJlbW92ZWQgPSB0cnVlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YXJnZXRbc3ltYm9sRXZlbnROYW1lXSA9IG51bGw7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGluIHRoZSB0YXJnZXQsIHdlIGhhdmUgYW4gZXZlbnQgbGlzdGVuZXIgd2hpY2ggaXMgYWRkZWQgYnkgb25fcHJvcGVydHkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gc3VjaCBhcyB0YXJnZXQub25jbGljayA9IGZ1bmN0aW9uKCkge30sIHNvIHdlIG5lZWQgdG8gY2xlYXIgdGhpcyBpbnRlcm5hbAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBwcm9wZXJ0eSB0b28gaWYgYWxsIGRlbGVnYXRlcyBhbGwgcmVtb3ZlZAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGV2ZW50TmFtZSA9PT0gJ3N0cmluZycpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBvblByb3BlcnR5U3ltYm9sID0gWk9ORV9TWU1CT0xfUFJFRklYICsgJ09OX1BST1BFUlRZJyArIGV2ZW50TmFtZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhcmdldFtvblByb3BlcnR5U3ltYm9sXSA9IG51bGw7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXhpc3RpbmdUYXNrLnpvbmUuY2FuY2VsVGFzayhleGlzdGluZ1Rhc2spOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXR1cm5UYXJnZXQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRhcmdldDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIC8vIGlzc3VlIDkzMCwgZGlkbid0IGZpbmQgdGhlIGV2ZW50IG5hbWUgb3IgY2FsbGJhY2sKICAgICAgICAgICAgICAgICAgICAvLyBmcm9tIHpvbmUga2VwdCBleGlzdGluZ1Rhc2tzLCB0aGUgY2FsbGJhY2sgbWF5YmUKICAgICAgICAgICAgICAgICAgICAvLyBhZGRlZCBvdXRzaWRlIG9mIHpvbmUsIHdlIG5lZWQgdG8gY2FsbCBuYXRpdmUgcmVtb3ZlRXZlbnRMaXN0ZW5lcgogICAgICAgICAgICAgICAgICAgIC8vIHRvIHRyeSB0byByZW1vdmUgaXQuCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5hdGl2ZVJlbW92ZUV2ZW50TGlzdGVuZXIuYXBwbHkodGhpcywgYXJndW1lbnRzKTsKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICBwcm90b1tMSVNURU5FUlNfRVZFTlRfTElTVEVORVJdID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgICAgIHZhciB0YXJnZXQgPSB0aGlzIHx8IF9nbG9iYWw7CiAgICAgICAgICAgICAgICAgICAgdmFyIGV2ZW50TmFtZSA9IGFyZ3VtZW50c1swXTsKICAgICAgICAgICAgICAgICAgICBpZiAocGF0Y2hPcHRpb25zICYmIHBhdGNoT3B0aW9ucy50cmFuc2ZlckV2ZW50TmFtZSkgewogICAgICAgICAgICAgICAgICAgICAgICBldmVudE5hbWUgPSBwYXRjaE9wdGlvbnMudHJhbnNmZXJFdmVudE5hbWUoZXZlbnROYW1lKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgdmFyIGxpc3RlbmVycyA9IFtdOwogICAgICAgICAgICAgICAgICAgIHZhciB0YXNrcyA9IGZpbmRFdmVudFRhc2tzKHRhcmdldCwgZXZlbnROYW1lVG9TdHJpbmcgPyBldmVudE5hbWVUb1N0cmluZyhldmVudE5hbWUpIDogZXZlbnROYW1lKTsKICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRhc2tzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0YXNrID0gdGFza3NbaV07CiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkZWxlZ2F0ZSA9IHRhc2sub3JpZ2luYWxEZWxlZ2F0ZSA/IHRhc2sub3JpZ2luYWxEZWxlZ2F0ZSA6IHRhc2suY2FsbGJhY2s7CiAgICAgICAgICAgICAgICAgICAgICAgIGxpc3RlbmVycy5wdXNoKGRlbGVnYXRlKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGxpc3RlbmVyczsKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICBwcm90b1tSRU1PVkVfQUxMX0xJU1RFTkVSU19FVkVOVF9MSVNURU5FUl0gPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIHRhcmdldCA9IHRoaXMgfHwgX2dsb2JhbDsKICAgICAgICAgICAgICAgICAgICB2YXIgZXZlbnROYW1lID0gYXJndW1lbnRzWzBdOwogICAgICAgICAgICAgICAgICAgIGlmICghZXZlbnROYW1lKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBrZXlzID0gT2JqZWN0LmtleXModGFyZ2V0KTsKICAgICAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBrZXlzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcHJvcCA9IGtleXNbaV07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbWF0Y2ggPSBFVkVOVF9OQU1FX1NZTUJPTF9SRUdYLmV4ZWMocHJvcCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZXZ0TmFtZSA9IG1hdGNoICYmIG1hdGNoWzFdOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaW4gbm9kZWpzIEV2ZW50RW1pdHRlciwgcmVtb3ZlTGlzdGVuZXIgZXZlbnQgaXMKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHVzZWQgZm9yIG1vbml0b3JpbmcgdGhlIHJlbW92ZUxpc3RlbmVyIGNhbGwsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBzbyBqdXN0IGtlZXAgcmVtb3ZlTGlzdGVuZXIgZXZlbnRMaXN0ZW5lciB1bnRpbAogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gYWxsIG90aGVyIGV2ZW50TGlzdGVuZXJzIGFyZSByZW1vdmVkCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZXZ0TmFtZSAmJiBldnROYW1lICE9PSAncmVtb3ZlTGlzdGVuZXInKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1tSRU1PVkVfQUxMX0xJU1RFTkVSU19FVkVOVF9MSVNURU5FUl0uY2FsbCh0aGlzLCBldnROYW1lKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAvLyByZW1vdmUgcmVtb3ZlTGlzdGVuZXIgbGlzdGVuZXIgZmluYWxseQogICAgICAgICAgICAgICAgICAgICAgICB0aGlzW1JFTU9WRV9BTExfTElTVEVORVJTX0VWRU5UX0xJU1RFTkVSXS5jYWxsKHRoaXMsICdyZW1vdmVMaXN0ZW5lcicpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBhdGNoT3B0aW9ucyAmJiBwYXRjaE9wdGlvbnMudHJhbnNmZXJFdmVudE5hbWUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2ZW50TmFtZSA9IHBhdGNoT3B0aW9ucy50cmFuc2ZlckV2ZW50TmFtZShldmVudE5hbWUpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzeW1ib2xFdmVudE5hbWVzID0gem9uZVN5bWJvbEV2ZW50TmFtZXMkMVtldmVudE5hbWVdOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3ltYm9sRXZlbnROYW1lcykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHN5bWJvbEV2ZW50TmFtZSA9IHN5bWJvbEV2ZW50TmFtZXNbRkFMU0VfU1RSXTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzeW1ib2xDYXB0dXJlRXZlbnROYW1lID0gc3ltYm9sRXZlbnROYW1lc1tUUlVFX1NUUl07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdGFza3MgPSB0YXJnZXRbc3ltYm9sRXZlbnROYW1lXTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjYXB0dXJlVGFza3MgPSB0YXJnZXRbc3ltYm9sQ2FwdHVyZUV2ZW50TmFtZV07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodGFza3MpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcmVtb3ZlVGFza3MgPSB0YXNrcy5zbGljZSgpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgcmVtb3ZlVGFza3MubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRhc2sgPSByZW1vdmVUYXNrc1tpXTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGRlbGVnYXRlID0gdGFzay5vcmlnaW5hbERlbGVnYXRlID8gdGFzay5vcmlnaW5hbERlbGVnYXRlIDogdGFzay5jYWxsYmFjazsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1tSRU1PVkVfRVZFTlRfTElTVEVORVJdLmNhbGwodGhpcywgZXZlbnROYW1lLCBkZWxlZ2F0ZSwgdGFzay5vcHRpb25zKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY2FwdHVyZVRhc2tzKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHJlbW92ZVRhc2tzID0gY2FwdHVyZVRhc2tzLnNsaWNlKCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCByZW1vdmVUYXNrcy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdGFzayA9IHJlbW92ZVRhc2tzW2ldOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZGVsZWdhdGUgPSB0YXNrLm9yaWdpbmFsRGVsZWdhdGUgPyB0YXNrLm9yaWdpbmFsRGVsZWdhdGUgOiB0YXNrLmNhbGxiYWNrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzW1JFTU9WRV9FVkVOVF9MSVNURU5FUl0uY2FsbCh0aGlzLCBldmVudE5hbWUsIGRlbGVnYXRlLCB0YXNrLm9wdGlvbnMpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBpZiAocmV0dXJuVGFyZ2V0KSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICAvLyBmb3IgbmF0aXZlIHRvU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AgICAgIGlmICghZXZlbnROYW1lKSB7CiAgICAgICAgICAgICAgICB2YXIgZm91bmRUYXNrcyA9IFtdOwogICAgICAgICAgICAgICAgZm9yICh2YXIgcHJvcCBpbiB0YXJnZXQpIHsKICAgICAgICAgICAgICAgICAgICB2YXIgbWF0Y2ggPSBFVkVOVF9OQU1FX1NZTUJPTF9SRUdYLmV4ZWMocHJvcCk7CiAgICAgICAgICAgICAgICAgICAgdmFyIGV2dE5hbWUgPSBtYXRjaCAmJiBtYXRjaFsxXTsKICAgICAgICAgICAgICAgICAgICBpZiAoZXZ0TmFtZSAmJiAoIWV2ZW50TmFtZSB8fCBldnROYW1lID09PSBldmVudE5hbWUpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0YXNrcyA9IHRhcmdldFtwcm9wXTsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRhc2tzKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRhc2tzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm91bmRUYXNrcy5wdXNoKHRhc2tzW2ldKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiBmb3VuZFRhc2tzOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciBzeW1ib2xFdmVudE5hbWUgPSB6b25lU3ltYm9sRXZlbnROYW1lcyQxW2V2ZW50TmFtZV07CiAgICAgICAgICAgIGlmICghc3ltYm9sRXZlbnROYW1lKSB7CiAgICAgICAgICAgICAgICBwcmVwYXJlRXZlbnROYW1lcyhldmVudE5hbWUpOwogICAgICAgICAgICAgICAgc3ltYm9sRXZlbnROYW1lID0gem9uZVN5bWJvbEV2ZW50TmFtZXMkMVtldmVudE5hbWVdOwogICAgICA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IG9wdGlvbnMpIHsKICAgICAgICAgICAgICAgIGlmIChvcHRzICYmIG9wdHMucHJvdG90eXBlKSB7CiAgICAgICAgICAgICAgICAgICAgY2FsbGJhY2tzLmZvckVhY2goZnVuY3Rpb24gKGNhbGxiYWNrKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzb3VyY2UgPSB0YXJnZXROYW1lICsgIi4iICsgbWV0aG9kICsgIjo6IiArIGNhbGxiYWNrOwogICAgICAgICAgICAgICAgICAgICAgICB2YXIgcHJvdG90eXBlID0gb3B0cy5wcm90b3R5cGU7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwcm90b3R5cGUuaGFzT3duUHJvcGVydHkoY2FsbGJhY2spKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZGVzY3JpcHRvciA9IGFwaS5PYmplY3RHZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IocHJvdG90eXBlLCBjYWxsYmFjayk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGVzY3JpcHRvciAmJiBkZXNjcmlwdG9yLnZhbHVlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzY3JpcHRvci52YWx1ZSA9IGFwaS53cmFwV2l0aEN1cnJlbnRab25lKGRlc2NyaXB0b3IudmFsdWUsIHNvdXJjZSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXBpLl9yZWRlZmluZVByb3BlcnR5KG9wdHMucHJvdG90eXBlLCBjYWxsYmFjaywgZGVzY3JpcHRvcik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChwcm90b3R5cGVbY2FsbGJhY2tdKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvdG90eXBlW2NhbGxiYWNrXSA9IGFwaS53cmFwV2l0aEN1cnJlbnRab25lKHByb3RvdHlwZVtjYWxsYmFja10sIHNvdXJjZSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAocHJvdG90eXBlW2NhbGxiYWNrXSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvdG90eXBlW2NhbGxiYWNrXSA9IGFwaS53cmFwV2l0aEN1cnJlbnRab25lKHByb3RvdHlwZVtjYWxsYmFja10sIHNvdXJjZSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiBuYXRpdmVEZWxlZ2F0ZS5jYWxsKHRhcmdldCwgbmFtZSwgb3B0cywgb3B0aW9ucyk7CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIGFwaS5hdHRhY2hPcmlnaW5Ub1BhdGNoZWQodGFyZ2V0W21ldGhvZF0sIG5hdGl2ZURlbGVnYXRlKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQGxpY2Vuc2UKICAgICAgICAgKiBDb3B5cmlnaHQgR29vZ2xlIEluYy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4KICAgICAgICAgKgogICAgICAgICAqIFVzZSBvZiB0aGlzIHNvdXJjZSBjb2RlIGlzIGdvdmVybmVkIGJ5IGFuIE1JVC1zdHlsZSBsaWNlbnNlIHRoYXQgY2FuIGJlCiAgICAgICAgICogZm91bmQgaW4gdGhlIExJQ0VOU0UgZmlsZSBhdCBodHRwczovL2FuZ3VsYXIuaW8vbGljZW5zZQogICAgICAgICAqLwogICAgICAgIHZhciBnbG9iYWxFdmVudEhhbmRsZXJzRXZlbnROYW1lcyA9IFsKICAgICAgICAgICAgJ2Fib3J0JywKICAgICAgICAgICAgJ2FuaW1hdGlvbmNhbmNlbCcsCiAgICAgICAgICAgICdhbmltYXRpb25lbmQnLAogICAgICAgICAgICAnYW5pbWF0aW9uaXRlcmF0aW9uJywKICAgICAgICAgICAgJ2F1eGNsaWNrJywKICAgICAgICAgICAgJ2JlZm9yZWlucHV0JywKICAgICAgICAgICAgJ2JsdXInLAogICAgICAgICAgICAnY2FuY2VsJywKICAgICAgICAgICAgJ2NhbnBsYXknLAogICAgICAgICAgICAnY2FucGxheXRocm91Z2gnLAogICAgICAgICAgICAnY2hhbmdlJywKICAgICAgICAgICAgJ2NvbXBvc2l0aW9uc3RhcnQnLAogICAgICAgICAgICAnY29tcG9zaXRpb251cGRhdGUnLAogICAgICAgICAgICAnY29tcG9zaXRpb25lbmQnLAogICAgICAgICAgICAnY3VlY2hhbmdlJywKICAgICAgICAgICAgJ2NsaWNrJywKICAgICAgICAgICAgJ2Nsb3NlJywKICAgICAgICAgICAgJ2NvbnRleHRtZW51JywKICAgICAgICAgICAgJ2N1cmVjaGFuZ2UnLAogICAgICAgICAgICAnZGJsY2xpY2snLAogICAgICAgICAgICAnZHJhZycsCiAgICAgICAgICAgICdkcmFnZW5kJywKICAgICAgICAgICAgJ2RyYWdlbnRlcicsCiAgICAgICAgICAgICdkcmFnZXhpdCcsCiAgICAgICAgICAgICdkcmFnbGVhdmUnLAogICAgICAgICAgICAnZHJhZ292ZXInLAogICAgICAgICAgICAnZHJvcCcsCiAgICAgICAgICAgICdkdXJhdGlvbmNoYW5nZScsCiAgICAgICAgICAgICdlbXB0aWVkJywKICAgICAgICAgICAgJ2VuZGVkJywKICAgICAgICAgICAgJ2Vycm9yJywKICAgICAgICAgICAgJ2ZvY3VzJywKICAgICAgICAgICAgJ2ZvY3VzaW4nLAogICAgICAgICAgICAnZm9jdXNvdXQnLAogICAgICAgICAgICAnZ290cG9pbnRlcmNhcHR1cmUnLAogICAgICAgICAgICAnaW5wdXQnLAogICAgICAgICAgICAnaW52YWxpZCcsCiAgICAgICAgICAgICdrZXlkb3duJywKICAgICAgICAgICAgJ2tleXByZXNzJywKICAgICAgICAgICAgJ2tleXVwJywKICAgICAgICAgICAgJ2xvYWQnLAogICAgICAgICAgICAnbG9hZHN0YXJ0JywKICAgICAgICAgICAgJ2xvYWRlZGRhdGEnLAogICAgICAgICAgICAnbG9hZGVkbWV0YWRhdGEnLAogICAgICAgICAgICAnbG9zdHBvaW50ZXJjYXB0dXJlJywKICAgICAgICAgICAgJ21vdXNlZG93bicsCiAgICAgICAgICAgICdtb3VzZWVudGVyJywKICAgICAgICAgICAgJ21vdXNlbGVhdmUnLAogICAgICAgICAgICAnbW91c2Vtb3ZlJywKICAgICAgICAgICAgJ21vdXNlb3V0JywKICAgICAgICAgICAgJ21vdXNlb3ZlcicsCiAgICAgICAgICAgICdtb3VzZXVwJywKICAgICAgICAgICAgJ21vdXNld2hlZWwnLAogICAgICAgICAgICAnb3JpZW50YXRpb25jaGFuZ2UnLAogICAgICAgICAgICAncGF1c2UnLAogICAgICAgICAgICAncGxheScsCiAgICAgICAgICAgICdwbGF5aW5nJywKICAgICAgICAgICAgJ3BvaW50ZXJjYW5jZWwnLAogICAgICAgICAgICAncG9pbnRlcmRvd24nLAogICAgICAgICAgICAncG9pbnRlcmVudGVyJywKICAgICAgICAgICAgJ3BvaW50ZXJsZWF2ZScsCiAgICAgICAgICAgICdwb2ludGVybG9ja2NoYW5nZScsCiAgICAgICAgICAgICdtb3pwb2ludGVybG9ja2NoYW5nZScsCiAgICAgICAgICAgICd3ZWJraXRwb2ludGVybG9ja2VyY2hhbmdlJywKICAgICAgICAgICAgJ3BvaW50ZXJsb2NrZXJyb3InLAogICAgICAgICAgICAnbW96cG9pbnRlcmxvY2tlcnJvcicsCiAgICAgICAgICAgICd3ZWJraXRwb2ludGVybG9ja2Vycm9yJywKICAgICAgICAgICAgJ3BvaW50ZXJtb3ZlJywKICAgICAgICAgICAgJ3BvaW50b3V0JywKICAgICAgICAgICAgJ3BvaW50ZXJvdmVyJywKICAgICAgICAgICAgJ3BvaW50ZXJ1cCcsCiAgICAgICAgICAgICdwcm9ncmVzcycsCiAgICAgICAgICAgICdyYXRlY2hhbmdlJywKICAgICAgICAgICAgJ3Jlc2V0JywKICAgICAgICAgICAgJ3Jlc2l6ZScsCiAgICAgICAgICAgICdzY3JvbGwnLAogICAgICAgICAgICAnc2Vla2VkJywKICAgICAgICAgICAgJ3NlZWtpbmcnLAogICAgICAgICAgICAnc2VsZWN0JywKICAgICAgICAgICAgJ3NlbGVjdGlvbmNoYW5nZScsCiAgICAgICAgICAgICdzZWxlY3RzdGFydCcsCiAgICAgICAgICAgICdzaG93JywKICAgICAgICAgICAgJ3NvcnQnLAogICAgICAgICAgICAnc3RhbGxlZCcsCiAgICAgICAgICAgICdzdWJtaXQnLAogICAgICAgICAgICAnc3VzcGVuZCcsCiAgICAgICAgICAgICd0aW1ldXBkYXRlJywKICAgICAgICAgICAgJ3ZvbHVtZWNoYW5nZScsCiAgICAgICAgICAgICd0b3VjaGNhbmNlbCcsCiAgICAgICAgICAgICd0b3VjaG1vdmUnLAogICAgICAgICAgICAndG91Y2hzdGFydCcsCiAgICAgICAgICAgICd0b3VjaGVuZCcsCiAgICAgICAgICAgICd0cmFuc2l0aW9uY2FuY2VsJywKICAgICAgICAgICAgJ3RyYW5zaXRpb25lbmQnLAogICAgICAgICAgICAnd2FpdGluZycsCiAgICAgICAgICAgICd3aGVlbCcKICAgICAgICBdOwogICAgICAgIHZhciBkb2N1bWVudEV2ZW50TmFtZXMgPSBbCiAgICAgICAgICAgICdhZnRlcnNjcmlwdGV4ZWN1dGUnLCAnYmVmb3Jlc2NyaXB0ZXhlY3V0ZScsICdET01Db250ZW50TG9hZGVkJywgJ2ZyZWV6ZScsICdmdWxsc2NyZWVuY2hhbmdlJywKICAgICAgICAgICAgJ21vemZ1bGxzY3JlZW5jaGFuZ2UnLCAnd2Via2l0ZnVsbHNjcmVlbmNoYW5nZScsICdtc2Z1bGxzY3JlZW5jaGFuZ2UnLCAnZnVsbHNjcmVlbmVycm9yJywKICAgICAgICAgICAgJ21vemZ1bGxzY3JlZW5lcnJvcicsICd3ZWJraXRmdWxsc2NyZWVuZXJyb3InLCAnbXNmdWxsc2NyZWVuZXJyb3InLCAncmVhZHlzdGF0ZWNoYW5nZScsCiAgICAgICAgICAgICd2aXNpYmlsaXR5Y2hhbmdlJywgJ3Jlc3VtZScKICAgICAgICBdOwogICAgICAgIHZhciB3aW5kb3dFdmVudE5hbWVzID0gWwogICAgICAgICAgICAnYWJzb2x1dGVkZXZpY2VvcmllbnRhdGlvbicsCiAgICAgICAgICAgICdhZnRlcmlucHV0JywKICAgICAgICAgICAgJ2FmdGVycHJpbnQnLAogICAgICAgICAgICAnYXBwaW5zdGFsbGVkJywKICAgICAgICAgICAgJ2JlZm9yZWluc3RhbGxwcm9tcHQnLAogICAgICAgICAgICAnYmVmb3JlcHJpbnQnLAogICAgICAgICAgICAnYmVmb3JldW5sb2FkJywKICAgICAgICAgICAgJ2RldmljZWxpZ2h0JywKICAgICAgICAgICAgJ2RldmljZW1vdGlvbicsCiAgICAgICAgICAgICdkZXZpY2VvcmllbnRhdGlvbicsCiAgICAgICAgICAgICdkZXZpY2VvcmllbnRhdGlvbmFic29sdXRlJywKICAgICAgICAgICAgJ2RldmljZXByb3hpbWl0eScsCiAgICAgICAgICAgICdoYXNoY2hhbmdlJywKICAgICAgICAgICAgJ2xhbmd1YWdlY2hhbmdlJywKICAgICAgICAgICAgJ21lc3NhZ2UnLAogICAgICAgICAgICAnbW96YmVmb3JlcGFpbnQnLAogICAgICAgICAgICAnb2ZmbGluZScsCiAgICAgICAgICAgICdvbmxpbmUnLAogICAgICAgICAgICAncGFpbnQnLAogICAgICAgICAgICAncGFnZXNob3cnLAogICAgICAgICAgICAncGFnZWhpZGUnLAogICAgICAgICAgICAncG9wc3RhdGUnLAogICAgICAgICAgICAncmVqZWN0aW9uaGFuZGxlZCcsCiAgICAgICAgICAgICdzdG9yYWdlJywKICAgICAgICAgICAgJ3VuaGFuZGxlZHJlamVjdGlvbicsCiAgICAgICAgICAgICd1bmxvYWQnLAogICAgICAgICAgICAndXNlcnByb3hpbWl0eScsCiAgICAgICAgICAgICd2cmRpc3BsYXljb25uZWN0ZWQnLAogICAgICAgICAgICAndnJkaXNwbGF5ZGlzY29ubmVjdGVkJywKICAgICAgICAgICAgJ3ZyZGlzcGxheXByZXNlbnRjaGFuZ2UnCiAgICAgICAgXTsKICAgICAgICB2YXIgaHRtbEVsZW1lbnRFdmVudE5hbWVzID0gWwogICAgICAgICAgICAnYmVmb3JlY29weScsICdiZWZvcmVjdXQnLCAnYmVmb3JlcGFzdGUnLCAnY29weScsICdjdXQnLCAncGFzdGUnLCAnZHJhZ3N0YXJ0JywgJ2xvYWRlbmQnLAogICAgICAgICAgICAnYW5pbWF0aW9uc3RhcnQnLCAnc2VhcmNoJywgJ3RyYW5zaXRpb25ydW4nLCAndHJhbnNpdGlvbnN0YXJ0JywgJ3dlYmtpdGFuaW1hdGlvbmVuZCcsCiAgICAgICAgICAgICd3ZWJraXRhbmltYXRpb25pdGVyYXRpb24nLCAnd2Via2l0YW5pbWF0aW9uc3RhcnQnLCAnd2Via2l0dHJhbnNpdGlvbmVuZCcKICAgICAgICBdOwogICAgICAgIHZhciBtZWRpYUVsZW1lbnRFdmVudE5hbWVzID0gWydlbmNyeXB0ZWQnLCAnd2FpdGluZ2ZvcmtleScsICdtc25lZWRrZXknLCAnbW96aW50ZXJydXB0YmVnaW4nLCAnbW96aW50ZXJydXB0ZW5kJ107CiAgICAgICAgdmFyIGllRWxlbWVudEV2ZW50TmFtZXMgPSBbCiAgICAgICAgICAgICdhY3RpdmF0ZScsCiAgICAgICAgICAgICdhZnRlcnVwZGF0ZScsCiAgICAgICAgICAgICdhcmlhcmVxdWVzdCcsCiAgICAgICAgICAgICdiZWZvcmVhY3RpdmF0ZScsCiAgICAgICAgICAgICdiZWZvcmVkZWFjdGl2YXRlJywKICAgICAgICAgICAgJ2JlZm9yZWVkaXRmb2N1cycsCiAgICAgICAgICAgICdiZWZvcmV1cGRhdGUnLAogICAgICAgICAgICAnY2VsbGNoYW5nZScsCiAgICAgICAgICAgICdjb250cm9sc2VsZWN0JywKICAgICAgICAgICAgJ2RhdGFhdmFpbGFibGUnLAogICAgICAgICAgICAnZGF0YXNldGNoYW5nZWQnLAogICAgICAgICAgICAnZGF0YXNldGNvbXBsZXRlJywKICAgICAgICAgICAgJ2Vycm9ydXBkYXRlJywKICAgICAgICAgICAgJ2ZpbHRlcmNoYW5nZScsCiAgICAgICAgICAgICdsYXlvdXRjb21wbGV0ZScsCiAgICAgICAgICAgICdsb3NlY2FwdHVyZScsCiAgICAgICAgICAgICdtb3ZlJywKICAgICAgICAgICAgJ21vdmVlbmQnLAogICAgICAgICAgICAnbW92ZXN0YXJ0JywKICAgICAgICAgICAgJ3Byb3BlcnR5Y2hhbmdlJywKICAgICAgICAgICAgJ3Jlc2l6ZWVuZCcsCiAgICAgICAgICAgICdyZXNpemVzdGFydCcsCiAgICAgICAgICAgICdyb3dlbnRlcicsCiAgICAgICAgICAgICdyb3dleGl0JywKICAgICAgICAgICAgJ3Jvd3NkZWxldGUnLAogICAgICAgICAgICAncm93c2luc2VydGVkJywKICAgICAgICAgICAgJ2NvbW1hbmQnLAogICAgICAgICAgICAnY29tcGFzc25lZWRzY2FsaWJyYXRpb24nLAogICAgICAgICAgICAnZGVhY3RpdmF0ZScsCiAgICAgICAgICAgICdoZWxwJywKICAgICAgICAgICAgJ21zY29udGVudHpvb20nLAogICAgICAgICAgICAnbXNtYW5pcHVsYXRpb25zdGF0ZWNoYW5nZWQnLAogICAgICAgICAgICAnbXNnZXN0dXJlY2hhbmdlJywKICAgICAgICAgICAgJ21zZ2VzdHVyZWRvdWJsZXRhcCcsCiAgICAgICAgICAgICdtc2dlc3R1cmVlbmQnLAogICAgICAgICAgICAnbXNnZXN0dXJlaG9sZCcsCiAgICAgICAgICAgICdtc2dlc3R1cmVzdGFydCcsCiAgICAgICAgICAgICdtc2dlc3R1cmV0YXAnLAogICAgICAgICAgICAnbXNnb3Rwb2ludGVyY2FwdHVyZScsCiAgICAgICAgICAgICdtc2luZXJ0aWFzdGFydCcsCiAgICAgICAgICAgICdtc2xvc3Rwb2ludGVyY2FwdHVyZScsCiAgICAgICAgICAgICdtc3BvaW50ZXJjYW5jZWwnLAogICAgICAgICAgICAnbXNwb2ludGVyZG93bicsCiAgICAgICAgICAgICdtc3BvaW50ZXJlbnRlcicsCiAgICAgICAgICAgICdtc3BvaW50ZXJob3ZlcicsCiAgICAgICAgICAgICdtc3BvaW50ZXJsZWF2ZScsCiAgICAgICAgICAgICdtc3BvaW50ZXJtb3ZlJywKICAgICAgICAgICAgJ21zcG9pbnRlcm91dCcsCiAgICAgICAgICAgICdtc3BvaW50ZXJvdmVyJywKICAgICAgICAgICAgJ21zcG9pbnRlcnVwJywKICAgICAgICAgICAgJ3BvaW50ZXJvdXQnLAogICAgICAgICAgICAnbXNzaXRlbW9kZWp1bXBsaXN0aXRlbXJlbW92ZWQnLAogICAgICAgICAgICAnbXN0aHVtYm5haWxjbGljaycsCiAgICAgICAgICAgICdzdG9wJywKICAgICAgICAgICAgJ3N0b3JhZ2Vjb21taXQnCiAgICAgICAgXTsKICAgICAgICB2YXIgd2ViZ2xFdmVudE5hbWVzID0gWyd3ZWJnbGNvbnRleHRyZXN0b3JlZCcsICd3ZWJnbGNvbnRleHRsb3N0JywgJ3dlYmdsY29udGV4dGNyZWF0aW9uZXJyb3InXTsKICAgICAgICB2YXIgZm9ybUV2ZW50TmFtZXMgPSBbJ2F1dG9jb21wbGV0ZScsICdhdXRvY29tcGxldGVlcnJvciddOwogICAgICAgIHZhciBkZXRhaWxFdmVudE5hbWVzID0gWyd0b2dnbGUnXTsKICAgICAgICB2YXIgZnJhbWVFdmVudE5hbWVzID0gWydsb2FkJ107CiAgICAgICAgdmFyIGZyYW1lU2V0RXZlbnROYW1lcyA9IFsnYmx1cicsICdlcnJvcicsICdmb2N1cycsICdsb2FkJywgJ3Jlc2l6ZScsICdzY3JvbGwnLCAnbWVzc2FnZWVycm9yJ107CiAgICAgICAgdmFyIG1hcnF1ZWVFdmVudE5hbW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uIG9uUHJvcGVydGllczsKICAgICAgICAgICAgfQogICAgICAgICAgICB2YXIgdGlwID0gaWdub3JlUHJvcGVydGllcy5maWx0ZXIoZnVuY3Rpb24gKGlwKSB7IHJldHVybiBpcC50YXJnZXQgPT09IHRhcmdldDsgfSk7CiAgICAgICAgICAgIGlmICghdGlwIHx8IHRpcC5sZW5ndGggPT09IDApIHsKICAgICAgICAgICAgICAgIHJldHVybiBvblByb3BlcnRpZXM7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIHRhcmdldElnbm9yZVByb3BlcnRpZXMgPSB0aXBbMF0uaWdub3JlUHJvcGVydGllczsKICAgICAgICAgICAgcmV0dXJuIG9uUHJvcGVydGllcy5maWx0ZXIoZnVuY3Rpb24gKG9wKSB7IHJldHVybiB0YXJnZXRJZ25vcmVQcm9wZXJ0aWVzLmluZGV4T2Yob3ApID09PSAtMTsgfSk7CiAgICAgICAgfQogICAgICAgIGZ1bmN0aW9uIHBhdGNoRmlsdGVyZWRQcm9wZXJ0aWVzKHRhcmdldCwgb25Qcm9wZXJ0aWVzLCBpZ25vcmVQcm9wZXJ0aWVzLCBwcm90b3R5cGUpIHsKICAgICAgICAgICAgLy8gY2hlY2sgd2hldGhlciB0YXJnZXQgaXMgYXZhaWxhYmxlLCBzb21ldGltZXMgdGFyZ2V0IHdpbGwgYmUgdW5kZWZpbmVkCiAgICAgICAgICAgIC8vIGJlY2F1c2UgZGlmZmVyZW50IGJyb3dzZXIgb3Igc29tZSAzcmQgcGFydHkgcGx1Z2luLgogICAgICAgICAgICBpZiAoIXRhcmdldCkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHZhciBmaWx0ZXJlZFByb3BlcnRpZXMgPSBmaWx0ZXJQcm9wZXJ0aWVzKHRhcmdldCwgb25Qcm9wZXJ0aWVzLCBpZ25vcmVQcm9wZXJ0aWVzKTsKICAgICAgICAgICAgcGF0Y2hPblByb3BlcnRpZXModGFyZ2V0LCBmaWx0ZXJlZFByb3BlcnRpZXMsIHByb3RvdHlwZSk7CiAgICAgICAgfQogICAgICAgIGZ1bmN0aW9uIHByb3BlcnR5RGVzY3JpcHRvclBhdGNoKGFwaSwgX2dsb2JhbCkgewogICAgICAgICAgICBpZiAoaXNOb2RlICYmICFpc01peCkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChab25lW2FwaS5zeW1ib2woJ3BhdGNoRXZlbnRzJyldKSB7CiAgICAgICAgICAgICAgICAvLyBldmVudHMgYXJlIGFscmVhZHkgYmVlbiBwYXRjaGVkIGJ5IGxlZ2FjeSBwYXRjaC4KICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICB2YXIgc3VwcG9ydHNXZWJTb2NrZXQgPSB0eXBlb2YgV2ViU29ja2V0ICE9PSAndW5kZWZpbmVkJzsKICAgICAgICAgICAgdmFyIGlnbm9yZVByb3BlcnRpZXMgPSBfZ2xvYmFsWydfX1pvbmVfaWdub3JlX29uX3Byb3BlcnRpZXMnXTsKICAgICAgICAgICAgLy8gZm9yIGJyb3dzZXJzIHRoYXQgd2UgY2FuIHBhdGNoIHRoZSBkZXNjcmlwdG9yOiAgQ2hyb21lICYgRmlyZWZveAogICAgICAgICAgICBpZiAoaXNCcm93c2VyKSB7CiAgICAgICAgICAgICAgICB2YXIgaW50ZXJuYWxXaW5kb3dfMSA9IHdpbmRvdzsKICAgICAgICAgICAgICAgIHZhciBpZ25vcmVFcnJvclByb3BlcnRpZXMgPSBpc0lFID8gW3sgdGFyZ2V0OiBpbnRlcm5hbFdpbmRvd18xLCBpZ25vcmVQcm9wZXJ0aWVzOiBbJ2Vycm9yJ10gfV0gOiBbXTsKICAgICAgICAgICAgICAgIC8vIGluIElFL0VkZ2UsIG9uUHJvcCBub3QgZXhpc3QgaW4gd2luZG93IG9iamVjdCwgYnV0IGluIFdpbmRvd1Byb3RvdHlwZQogICAgICA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0eTsKICAgICAgICAgICAgX2dldE93blByb3BlcnR5RGVzY3JpcHRvciA9IE9iamVjdFt6b25lU3ltYm9sJDEoJ2dldE93blByb3BlcnR5RGVzY3JpcHRvcicpXSA9CiAgICAgICAgICAgICAgICBPYmplY3QuZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yOwogICAgICAgICAgICBfY3JlYXRlID0gT2JqZWN0LmNyZWF0ZTsKICAgICAgICAgICAgdW5jb25maWd1cmFibGVzS2V5ID0gem9uZVN5bWJvbCQxKCd1bmNvbmZpZ3VyYWJsZXMnKTsKICAgICAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5ID0gZnVuY3Rpb24gKG9iaiwgcHJvcCwgZGVzYykgewogICAgICAgICAgICAgICAgaWYgKGlzVW5jb25maWd1cmFibGUob2JqLCBwcm9wKSkgewogICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoJ0Nhbm5vdCBhc3NpZ24gdG8gcmVhZCBvbmx5IHByb3BlcnR5IFwnJyArIHByb3AgKyAnXCcgb2YgJyArIG9iaik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB2YXIgb3JpZ2luYWxDb25maWd1cmFibGVGbGFnID0gZGVzYy5jb25maWd1cmFibGU7CiAgICAgICAgICAgICAgICBpZiAocHJvcCAhPT0gJ3Byb3RvdHlwZScpIHsKICAgICAgICAgICAgICAgICAgICBkZXNjID0gcmV3cml0ZURlc2NyaXB0b3Iob2JqLCBwcm9wLCBkZXNjKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiBfdHJ5RGVmaW5lUHJvcGVydHkob2JqLCBwcm9wLCBkZXNjLCBvcmlnaW5hbENvbmZpZ3VyYWJsZUZsYWcpOwogICAgICAgICAgICB9OwogICAgICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydGllcyA9IGZ1bmN0aW9uIChvYmosIHByb3BzKSB7CiAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyhwcm9wcykuZm9yRWFjaChmdW5jdGlvbiAocHJvcCkgeyBPYmplY3QuZGVmaW5lUHJvcGVydHkob2JqLCBwcm9wLCBwcm9wc1twcm9wXSk7IH0pOwogICAgICAgICAgICAgICAgcmV0dXJuIG9iajsKICAgICAgICAgICAgfTsKICAgICAgICAgICAgT2JqZWN0LmNyZWF0ZSA9IGZ1bmN0aW9uIChvYmosIHByb3RvKSB7CiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHByb3RvID09PSAnb2JqZWN0JyAmJiAhT2JqZWN0LmlzRnJvemVuKHByb3RvKSkgewogICAgICAgICAgICAgICAgICAgIE9iamVjdC5rZXlzKHByb3RvKS5mb3JFYWNoKGZ1bmN0aW9uIChwcm9wKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHByb3RvW3Byb3BdID0gcmV3cml0ZURlc2NyaXB0b3Iob2JqLCBwcm9wLCBwcm90b1twcm9wXSk7CiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gX2NyZWF0ZShvYmosIHByb3RvKTsKICAgICAgICAgICAgfTsKICAgICAgICAgICAgT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvciA9IGZ1bmN0aW9uIChvYmosIHByb3ApIHsKICAgICAgICAgICAgICAgIHZhciBkZXNjID0gX2dldE93blByb3BlcnR5RGVzY3JpcHRvcihvYmosIHByb3ApOwogICAgICAgICAgICAgICAgaWYgKGRlc2MgJiYgaXNVbmNvbmZpZ3VyYWJsZShvYmosIHByb3ApKSB7CiAgICAgICAgICAgICAgICAgICAgZGVzYy5jb25maWd1cmFibGUgPSBmYWxzZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiBkZXNjOwogICAgICAgICAgICB9OwogICAgICAgIH0KICAgICAgICBmdW5jdGlvbiBfcmVkZWZpbmVQcm9wZXJ0eShvYmosIHByb3AsIGRlc2MpIHsKICAgICAgICAgICAgdmFyIG9yaWdpbmFsQ29uZmlndXJhYmxlRmxhZyA9IGRlc2MuY29uZmlndXJhYmxlOwogICAgICAgICAgICBkZXNjID0gcmV3cml0ZURlc2NyaXB0b3Iob2JqLCBwcm9wLCBkZXNjKTsKICAgICAgICAgICAgcmV0dXJuIF90cnlEZWZpbmVQcm9wZXJ0eShvYmosIHByb3AsIGRlc2MsIG9yaWdpbmFsQ29uZmlndXJhYmxlRmxhZyk7CiAgICAgICAgfQogICAgICAgIGZ1bmN0aW9uIGlzVW5jb25maWd1cmFibGUob2JqLCBwcm9wKSB7CiAgICAgICAgICAgIHJldHVybiBvYmogJiYgb2JqW3VuY29uZmlndXJhYmxlc0tleV0gJiYgb2JqW3VuY29uZmlndXJhYmxlc0tleV1bcHJvcF07CiAgICAgICAgfQogICAgICAgIGZ1bmN0aW9uIHJld3JpdGVEZXNjcmlwdG9yKG9iaiwgcHJvcCwgZGVzYykgewogICAgICAgICAgICAvLyBpc3N1ZS05MjcsIGlmIHRoZSBkZXNjIGlzIGZyb3plbiwgZG9uJ3QgdHJ5IHRvIGNoYW5nZSB0aGUgZGVzYwogICAgICAgICAgICBpZiAoIU9iamVjdC5pc0Zyb3plbihkZXNjKSkgewogICAgICAgICAgICAgICAgZGVzYy5jb25maWd1cmFibGUgPSB0cnVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICghZGVzYy5jb25maWd1cmFibGUpIHsKICAgICAgICAgICAgICAgIC8vIGlzc3VlLTkyNywgaWYgdGhlIG9iaiBpcyBmcm96ZW4sIGRvbid0IHRyeSB0byBzZXQgdGhlIGRlc2MgdG8gb2JqCiAgICAgICAgICAgICAgICBpZiAoIW9ialt1bmNvbmZpZ3VyYWJsZXNLZXldICYmICFPYmplY3QuaXNGcm96ZW4ob2JqKSkgewogICAgICAgICAgICAgICAgICAgIF9kZWZpbmVQcm9wZXJ0eShvYmosIHVuY29uZmlndXJhYmxlc0tleSwgeyB3cml0YWJsZTogdHJ1ZSwgdmFsdWU6IHt9IH0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKG9ialt1bmNvbmZpZ3VyYWJsZXNLZXldKSB7CiAgICAgICAgICAgICAgICAgICAgb2JqW3VuY29uZmlndXJhYmxlc0tleV1bcHJvcF0gPSB0cnVlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBkZXNjOwogICAgICAgIH0KICAgICAgICBmdW5jdGlvbiBfdHJ5RGVmaW5lUHJvcGVydHkob2JqLCBwcm9wLCBkZXNjLCBvcmlnaW5hbENvbmZpZ3VyYWJsZUZsYWcpIHsKICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgIHJldHVybiBfZGVmaW5lUHJvcGVydHkob2JqLCBwcm9wLCBkZXNjKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBjYXRjaCAoZXJyb3IpIHsKICAgICAgICAgICAgICAgIGlmIChkZXNjLmNvbmZpZ3VyYWJsZSkgewogICAgICAgICAgICAgICAgICAgIC8vIEluIGNhc2Ugb2YgZXJyb3JzLCB3aGVuIHRoZSBjb25maWd1cmFibGUgZmxhZyB3YXMgbGlrZWx5IHNldCBieSByZXdyaXRlRGVzY3JpcHRvcigpLCBsZXQncwogICAgICAgICAgICAgICAgICAgIC8vIHJldHJ5IHdpdGggdGhlIG9yaWdpbmFsIGZsYWcgdmFsdWUKICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG9yaWdpbmFsQ29uZmlndXJhYmxlRmxhZyA9PSAndW5kZWZpbmVkJykgewogICAgICAgICAgICAgICAgICAgICAgICBkZWxldGUgZGVzYy5jb25maWd1cmFibGU7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICBkZXNjLmNvbmZpZ3VyYWJsZSA9IG9yaWdpbmFsQ29uZmlndXJhYmxlRmxhZzsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF9kZWZpbmVQcm9wZXJ0eShvYmosIHByb3AsIGRlc2MpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBjYXRjaCAoZXJyb3IpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGRlc2NKc29uID0gbnVsbDsKICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2NKc29uID0gSlNPTi5zdHJpbmdpZnkoZGVzYyk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgY2F0Y2ggKGVycm9yKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjSnNvbiA9IGRlc2MudG9TdHJpbmcoKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygiQXR0ZW1wdGluZyB0byBjb25maWd1cmUgJyIgKyBwcm9wICsgIicgd2l0aCBkZXNjcmlwdG9yICciICsgZGVzY0pzb24gKyAiJyBvbiBvYmplY3QgJyIgKyBvYmogKyAiJyBhbmQgZ290IGVycm9yLCBnaXZpbmcgdXA6ICIgKyBlcnJvcik7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgdGhyb3cgZXJyb3I7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQGxpY2Vuc2UKICAgICAgICAgKiBDb3B5cmlnaHQgR29vZ2xlIEluYy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4KICAgICAgICAgKgogICAgICAgICAqIFVzZSBvZiB0aGlzIHNvdXJjZSBjb2RlIGlzIGdvdmVybmVkIGJ5IGFuIE1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A9ICdmdW5jdGlvbiBfX0JST1dTRVJUT09MU19DT05TT0xFX1NBRkVGVU5DKCkgeyBbbmF0aXZlIGNvZGVdIH0nOwogICAgICAgICAgICB2YXIgcG9pbnRlckV2ZW50c01hcCA9IHsKICAgICAgICAgICAgICAgICdNU1BvaW50ZXJDYW5jZWwnOiAncG9pbnRlcmNhbmNlbCcsCiAgICAgICAgICAgICAgICAnTVNQb2ludGVyRG93bic6ICdwb2ludGVyZG93bicsCiAgICAgICAgICAgICAgICAnTVNQb2ludGVyRW50ZXInOiAncG9pbnRlcmVudGVyJywKICAgICAgICAgICAgICAgICdNU1BvaW50ZXJIb3Zlcic6ICdwb2ludGVyaG92ZXInLAogICAgICAgICAgICAgICAgJ01TUG9pbnRlckxlYXZlJzogJ3BvaW50ZXJsZWF2ZScsCiAgICAgICAgICAgICAgICAnTVNQb2ludGVyTW92ZSc6ICdwb2ludGVybW92ZScsCiAgICAgICAgICAgICAgICAnTVNQb2ludGVyT3V0JzogJ3BvaW50ZXJvdXQnLAogICAgICAgICAgICAgICAgJ01TUG9pbnRlck92ZXInOiAncG9pbnRlcm92ZXInLAogICAgICAgICAgICAgICAgJ01TUG9pbnRlclVwJzogJ3BvaW50ZXJ1cCcKICAgICAgICAgICAgfTsKICAgICAgICAgICAgLy8gIHByZWRlZmluZSBhbGwgX196b25lX3N5bWJvbF9fICsgZXZlbnROYW1lICsgdHJ1ZS9mYWxzZSBzdHJpbmcKICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBldmVudE5hbWVzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICB2YXIgZXZlbnROYW1lID0gZXZlbnROYW1lc1tpXTsKICAgICAgICAgICAgICAgIHZhciBmYWxzZUV2ZW50TmFtZSA9IGV2ZW50TmFtZSArIEZBTFNFX1NUUjsKICAgICAgICAgICAgICAgIHZhciB0cnVlRXZlbnROYW1lID0gZXZlbnROYW1lICsgVFJVRV9TVFI7CiAgICAgICAgICAgICAgICB2YXIgc3ltYm9sID0gWk9ORV9TWU1CT0xfUFJFRklYICsgZmFsc2VFdmVudE5hbWU7CiAgICAgICAgICAgICAgICB2YXIgc3ltYm9sQ2FwdHVyZSA9IFpPTkVfU1lNQk9MX1BSRUZJWCArIHRydWVFdmVudE5hbWU7CiAgICAgICAgICAgICAgICB6b25lU3ltYm9sRXZlbnROYW1lc1tldmVudE5hbWVdID0ge307CiAgICAgICAgICAgICAgICB6b25lU3ltYm9sRXZlbnROYW1lc1tldmVudE5hbWVdW0ZBTFNFX1NUUl0gPSBzeW1ib2w7CiAgICAgICAgICAgICAgICB6b25lU3ltYm9sRXZlbnROYW1lc1tldmVudE5hbWVdW1RSVUVfU1RSXSA9IHN5bWJvbENhcHR1cmU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gIHByZWRlZmluZSBhbGwgdGFzay5zb3VyY2Ugc3RyaW5nCiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgV1RGX0lTU1VFXzU1NV9BUlJBWS5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgdmFyIHRhcmdldCA9IFdURl9JU1NVRV81NTVfQVJSQVlbaV07CiAgICAgICAgICAgICAgICB2YXIgdGFyZ2V0cyA9IGdsb2JhbFNvdXJjZXNbdGFyZ2V0XSA9IHt9OwogICAgICAgICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBldmVudE5hbWVzLmxlbmd0aDsgaisrKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIGV2ZW50TmFtZSA9IGV2ZW50TmFtZXNbal07CiAgICAgICAgICAgICAgICAgICAgdGFyZ2V0c1tldmVudE5hbWVdID0gdGFyZ2V0ICsgQUREX0VWRU5UX0xJU1RFTkVSX1NPVVJDRSArIGV2ZW50TmFtZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICB2YXIgY2hlY2tJRUFuZENyb3NzQ29udGV4dCA9IGZ1bmN0aW9uIChuYXRpdmVEZWxlZ2F0ZSwgZGVsZWdhdGUsIHRhcmdldCwgYXJncykgewogICAgICAgICAgICAgICAgaWYgKCFpc0Rpc2FibGVJRUNoZWNrICYmIGllT3JFZGdlKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKGlzRW5hYmxlQ3Jvc3NDb250ZXh0Q2hlY2spIHsKICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0ZXN0U3RyaW5nID0gZGVsZWdhdGUudG9TdHJpbmcoKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgodGVzdFN0cmluZyA9PT0gRlVOQ1RJT05fV1JBUFBFUiB8fCB0ZXN0U3RyaW5nID09IEJST1dTRVJfVE9PTFMpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmF0aXZlRGVsZWdhdGUuYXBwbHkodGFyZ2V0LCBhcmdzKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgY2F0Y2ggKGVycm9yKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYXRpdmVEZWxlZ2F0ZS5hcHBseSh0YXJnZXQsIGFyZ3MpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICB2YXIgdGVzdFN0cmluZyA9IGRlbGVnYXRlLnRvU3RyaW5nKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgodGVzdFN0cmluZyA9PT0gRlVOQ1RJT05fV1JBUFBFUiB8fCB0ZXN0U3RyaW5nID09IEJST1dTRVJfVE9PTFMpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYXRpdmVEZWxlZ2F0ZS5hcHBseSh0YXJnZXQsIGFyZ3MpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAoaXNFbmFibGVDcm9zc0NvbnRleHRDaGVjaykgewogICAgICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGRlbGVnYXRlLnRvU3RyaW5nKCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGNhdGNoIChlcnJvcikgewogICAgICAgICAgICAgICAgICAgICAgICBuYXRpdmVEZWxlZ2F0ZS5hcHBseSh0YXJnZXQsIGFyZ3MpOwogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIHZhciBhcGlUeXBlcyA9IFtdOwogICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGFwaXMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIHZhciB0eXBlID0gX2dsb2JhbFthcGlzW2ldXTsKICAgICAgICAgICAgICAgIGFwaVR5cGVzLnB1c2godHlwZSAmJiB0eXBlLnByb3RvdHlwZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gdmggaXMgdmFsaWRhdGVIYW5kbGVyIHRvIGNoZWNrIGV2ZW50IGhhbmRsZXIKICAgICAgICAgICAgLy8gaXMgdmFsaWQgb3Igbm90KGZvciBzZWN1cml0eSBjaGVjaykKICAgICAgICAgICAgYXBpLnBhdGNoRXZlbnRUYXJnZXQoX2dsb2JhbCwgYXBpV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gICAgaWYgKG9ubWVzc2FnZURlc2MgJiYgb25tZXNzYWdlRGVzYy5jb25maWd1cmFibGUgPT09IGZhbHNlKSB7CiAgICAgICAgICAgICAgICAgICAgcHJveHlTb2NrZXQgPSBhcGkuT2JqZWN0Q3JlYXRlKHNvY2tldCk7CiAgICAgICAgICAgICAgICAgICAgLy8gc29ja2V0IGhhdmUgb3duIHByb3BlcnR5IGRlc2NyaXB0b3IgJ29ub3BlbicsICdvbm1lc3NhZ2UnLCAnb25jbG9zZScsICdvbmVycm9yJwogICAgICAgICAgICAgICAgICAgIC8vIGJ1dCBwcm94eVNvY2tldCBub3QsIHNvIHdlIHdpbGwga2VlcCBzb2NrZXQgYXMgcHJvdG90eXBlIGFuZCBwYXNzIGl0IHRvCiAgICAgICAgICAgICAgICAgICAgLy8gcGF0Y2hPblByb3BlcnRpZXMgbWV0aG9kCiAgICAgICAgICAgICAgICAgICAgcHJveHlTb2NrZXRQcm90byA9IHNvY2tldDsKICAgICAgICAgICAgICAgICAgICBbQUREX0VWRU5UX0xJU1RFTkVSX1NUUiwgUkVNT1ZFX0VWRU5UX0xJU1RFTkVSX1NUUiwgJ3NlbmQnLCAnY2xvc2UnXS5mb3JFYWNoKGZ1bmN0aW9uIChwcm9wTmFtZSkgewogICAgICAgICAgICAgICAgICAgICAgICBwcm94eVNvY2tldFtwcm9wTmFtZV0gPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgYXJncyA9IGFwaS5BcnJheVNsaWNlLmNhbGwoYXJndW1lbnRzKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwcm9wTmFtZSA9PT0gQUREX0VWRU5UX0xJU1RFTkVSX1NUUiB8fCBwcm9wTmFtZSA9PT0gUkVNT1ZFX0VWRU5UX0xJU1RFTkVSX1NUUikgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBldmVudE5hbWUgPSBhcmdzLmxlbmd0aCA+IDAgPyBhcmdzWzBdIDogdW5kZWZpbmVkOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChldmVudE5hbWUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHByb3BlcnR5U3ltYm9sID0gWm9uZS5fX3N5bWJvbF9fKCdPTl9QUk9QRVJUWScgKyBldmVudE5hbWUpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzb2NrZXRbcHJvcGVydHlTeW1ib2xdID0gcHJveHlTb2NrZXRbcHJvcGVydHlTeW1ib2xdOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzb2NrZXRbcHJvcE5hbWVdLmFwcGx5KHNvY2tldCwgYXJncyk7CiAgICAgICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAvLyB3ZSBjYW4gcGF0Y2ggdGhlIHJlYWwgc29ja2V0CiAgICAgICAgICAgICAgICAgICAgcHJveHlTb2NrZXQgPSBzb2NrZXQ7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBhcGkucGF0Y2hPblByb3BlcnRpZXMocHJveHlTb2NrZXQsIFsnY2xvc2UnLCAnZXJyb3InLCAnbWVzc2FnZScsICdvcGVuJ10sIHByb3h5U29ja2V0UHJvdG8pOwogICAgICAgICAgICAgICAgcmV0dXJuIHByb3h5U29ja2V0OwogICAgICAgICAgICB9OwogICAgICAgICAgICB2YXIgZ2xvYmFsV2ViU29ja2V0ID0gX2dsb2JhbFsnV2ViU29ja2V0J107CiAgICAgICAgICAgIGZvciAodmFyIHByb3AgaW4gV1MpIHsKICAgICAgICAgICAgICAgIGdsb2JhbFdlYlNvY2tldFtwcm9wXSA9IFdTW3Byb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XQpIHsKICAgICAgICAgICAgICAgICAgICBhcHBseShhcGksIF9nbG9iYWwpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgWm9uZVthcGkuc3ltYm9sKCdwYXRjaEV2ZW50cycpXSA9IHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgZnVuY3Rpb24gY2FuUGF0Y2hWaWFQcm9wZXJ0eURlc2NyaXB0b3IoYXBpLCBfZ2xvYmFsKSB7CiAgICAgICAgICAgIHZhciBfYSA9IGFwaS5nZXRHbG9iYWxPYmplY3RzKCksIGlzQnJvd3NlciA9IF9hLmlzQnJvd3NlciwgaXNNaXggPSBfYS5pc01peDsKICAgICAgICAgICAgaWYgKChpc0Jyb3dzZXIgfHwgaXNNaXgpICYmCiAgICAgICAgICAgICAgICAhYXBpLk9iamVjdEdldE93blByb3BlcnR5RGVzY3JpcHRvcihIVE1MRWxlbWVudC5wcm90b3R5cGUsICdvbmNsaWNrJykgJiYKICAgICAgICAgICAgICAgIHR5cGVvZiBFbGVtZW50ICE9PSAndW5kZWZpbmVkJykgewogICAgICAgICAgICAgICAgLy8gV2ViS2l0IGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0xMzQzNjQKICAgICAgICAgICAgICAgIC8vIElETCBpbnRlcmZhY2UgYXR0cmlidXRlcyBhcmUgbm90IGNvbmZpZ3VyYWJsZQogICAgICAgICAgICAgICAgdmFyIGRlc2MgPSBhcGkuT2JqZWN0R2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKEVsZW1lbnQucHJvdG90eXBlLCAnb25jbGljaycpOwogICAgICAgICAgICAgICAgaWYgKGRlc2MgJiYgIWRlc2MuY29uZmlndXJhYmxlKQogICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICAgIC8vIHRyeSB0byB1c2Ugb25jbGljayB0byBkZXRlY3Qgd2hldGhlciB3ZSBjYW4gcGF0Y2ggdmlhIHByb3BlcnR5RGVzY3JpcHRvcgogICAgICAgICAgICAgICAgLy8gYmVjYXVzZSBYTUxIdHRwUmVxdWVzdCBpcyBub3QgYXZhaWxhYmxlIGluIHNlcnZpY2Ugd29ya2VyCiAgICAgICAgICAgICAgICBpZiAoZGVzYykgewogICAgICAgICAgICAgICAgICAgIGFwaS5PYmplY3REZWZpbmVQcm9wZXJ0eShFbGVtZW50LnByb3RvdHlwZSwgJ29uY2xpY2snLCB7IGVudW1lcmFibGU6IHRydWUsIGNvbmZpZ3VyYWJsZTogdHJ1ZSwgZ2V0OiBmdW5jdGlvbiAoKSB7IHJldHVybiB0cnVlOyB9IH0pOwogICAgICAgICAgICAgICAgICAgIHZhciBkaXYgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdkaXYnKTsKICAgICAgICAgICAgICAgICAgICB2YXIgcmVzdWx0ID0gISFkaXYub25jbGljazsKICAgICAgICAgICAgICAgICAgICBhcGkuT2JqZWN0RGVmaW5lUHJvcGVydHkoRWxlbWVudC5wcm90b3R5cGUsICdvbmNsaWNrJywgZGVzYyk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICB2YXIgWE1MSHR0cFJlcXVlc3QgPSBfZ2xvYmFsWydYTUxIdHRwUmVxdWVzdCddOwogICAgICAgICAgICBpZiAoIVhNTEh0dHBSZXF1ZXN0KSB7CiAgICAgICAgICAgICAgICAvLyBYTUxIdHRwUmVxdWVzdCBpcyBub3QgYXZhaWxhYmxlIGluIHNlcnZpY2Ugd29ya2VyCiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdmFyIE9OX1JFQURZX1NUQVRFX0NIQU5HRSA9ICdvbnJlYWR5c3RhdGVjaGFuZ2UnOwogICAgICAgICAgICB2YXIgWE1MSHR0cFJlcXVlc3RQcm90b3R5cGUgPSBYTUxIdHRwUm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HJlcVtTWU1CT0xfRkFLRV9PTlJFQURZU1RBVEVDSEFOR0VfMV0gPT09IGRldGVjdEZ1bmM7CiAgICAgICAgICAgICAgICByZXEub25yZWFkeXN0YXRlY2hhbmdlID0gbnVsbDsKICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLy8gV2hlbmV2ZXIgYW55IGV2ZW50TGlzdGVuZXIgZmlyZXMsIHdlIGNoZWNrIHRoZSBldmVudExpc3RlbmVyIHRhcmdldCBhbmQgYWxsIHBhcmVudHMKICAgICAgICAvLyBmb3IgYG9ud2hhdGV2ZXJgIHByb3BlcnRpZXMgYW5kIHJlcGxhY2UgdGhlbSB3aXRoIHpvbmUtYm91bmQgZnVuY3Rpb25zCiAgICAgICAgLy8gLSBDaHJvbWUgKGZvciBub3cpCiAgICAgICAgZnVuY3Rpb24gcGF0Y2hWaWFDYXB0dXJpbmdBbGxUaGVFdmVudHMoYXBpKSB7CiAgICAgICAgICAgIHZhciBldmVudE5hbWVzID0gYXBpLmdldEdsb2JhbE9iamVjdHMoKS5ldmVudE5hbWVzOwogICAgICAgICAgICB2YXIgdW5ib3VuZEtleSA9IGFwaS5zeW1ib2woJ3VuYm91bmQnKTsKICAgICAgICAgICAgdmFyIF9sb29wXzQgPSBmdW5jdGlvbiAoaSkgewogICAgICAgICAgICAgICAgdmFyIHByb3BlcnR5ID0gZXZlbnROYW1lc1tpXTsKICAgICAgICAgICAgICAgIHZhciBvbnByb3BlcnR5ID0gJ29uJyArIHByb3BlcnR5OwogICAgICAgICAgICAgICAgc2VsZi5hZGRFdmVudExpc3RlbmVyKHByb3BlcnR5LCBmdW5jdGlvbiAoZXZlbnQpIHsKICAgICAgICAgICAgICAgICAgICB2YXIgZWx0ID0gZXZlbnQudGFyZ2V0LCBib3VuZCwgc291cmNlOwogICAgICAgICAgICAgICAgICAgIGlmIChlbHQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlID0gZWx0LmNvbnN0cnVjdG9yWyduYW1lJ10gKyAnLicgKyBvbnByb3BlcnR5OwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlID0gJ3Vua25vd24uJyArIG9ucHJvcGVydHk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHdoaWxlIChlbHQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGVsdFtvbnByb3BlcnR5XSAmJiAhZWx0W29ucHJvcGVydHldW3VuYm91bmRLZXldKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3VuZCA9IGFwaS53cmFwV2l0aEN1cnJlbnRab25lKGVsdFtvbnByb3BlcnR5XSwgc291cmNlKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvdW5kW3VuYm91bmRLZXldID0gZWx0W29ucHJvcGVydHldOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZWx0W29ucHJvcGVydHldID0gYm91bmQ7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgZWx0ID0gZWx0LnBhcmVudEVsZW1lbnQ7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSwgdHJ1ZSk7CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZXZlbnROYW1lcy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgX2xvb3BfNChpKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAbGljZW5zZQogICAgICAgICAqIENvcHlyaWdodCBHb29nbGUgSW5jLiBBbGwgUmlnaHRzIFJlc2VydmVkLgogICAgICAgICAqCiAgICAgICAgICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgYW4gTUlULXN0eWxlIGxpY2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AgICAgICAgICB2YXIgZGF0YSA9IHRhc2suZGF0YTsKICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHRpbWVyKCkgewogICAgICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRhc2suaW52b2tlLmFwcGx5KHRoaXMsIGFyZ3VtZW50cyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGZpbmFsbHkgewogICAgICAgICAgICAgICAgICAgICAgICAvLyBpc3N1ZS05MzQsIHRhc2sgd2lsbCBiZSBjYW5jZWxsZWQKICAgICAgICAgICAgICAgICAgICAgICAgLy8gZXZlbiBpdCBpcyBhIHBlcmlvZGljIHRhc2sgc3VjaCBhcwogICAgICAgICAgICAgICAgICAgICAgICAvLyBzZXRJbnRlcnZhbAogICAgICAgICAgICAgICAgICAgICAgICBpZiAoISh0YXNrLmRhdGEgJiYgdGFzay5kYXRhLmlzUGVyaW9kaWMpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGRhdGEuaGFuZGxlSWQgPT09ICdudW1iZXInKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaW4gbm9uLW5vZGVqcyBlbnYsIHdlIHJlbW92ZSB0aW1lcklkCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gZnJvbSBsb2NhbCBjYWNoZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZSB0YXNrc0J5SGFuZGxlSWRbZGF0YS5oYW5kbGVJZF07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChkYXRhLmhhbmRsZUlkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gTm9kZSByZXR1cm5zIGNvbXBsZXggb2JqZWN0cyBhcyBoYW5kbGVJZHMKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyB3ZSByZW1vdmUgdGFzayByZWZlcmVuY2UgZnJvbSB0aW1lciBvYmplY3QKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhLmhhbmRsZUlkW3Rhc2tTeW1ib2xdID0gbnVsbDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGRhdGEuYXJnc1swXSA9IHRpbWVyOwogICAgICAgICAgICAgICAgZGF0YS5oYW5kbGVJZCA9IHNldE5hdGl2ZS5hcHBseSh3aW5kb3csIGRhdGEuYXJncyk7CiAgICAgICAgICAgICAgICByZXR1cm4gdGFzazsKICAgICAgICAgICAgfQogICAgICAgICAgICBmdW5jdGlvbiBjbGVhclRhc2sodGFzaykgeyByZXR1cm4gY2xlYXJOYXRpdmUodGFzay5kYXRhLmhhbmRsZUlkKTsgfQogICAgICAgICAgICBzZXROYXRpdmUgPQogICAgICAgICAgICAgICAgcGF0Y2hNZXRob2Qod2luZG93LCBzZXROYW1lLCBmdW5jdGlvbiAoZGVsZWdhdGUpIHsgcmV0dXJuIGZ1bmN0aW9uIChzZWxmLCBhcmdzKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBhcmdzWzBdID09PSAnZnVuY3Rpb24nKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBvcHRpb25zID0gewogICAgICAgICAgICAgICAgICAgICAgICAgICAgaXNQZXJpb2RpYzogbmFtZVN1ZmZpeCA9PT0gJ0ludGVydmFsJywKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlbGF5OiAobmFtZVN1ZmZpeCA9PT0gJ1RpbWVvdXQnIHx8IG5hbWVTdWZmaXggPT09ICdJbnRlcnZhbCcpID8gYXJnc1sxXSB8fCAwIDoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bmRlZmluZWQsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcmdzOiBhcmdzCiAgICAgICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0YXNrID0gc2NoZWR1bGVNYWNyb1Rhc2tXaXRoQ3VycmVudFpvbmUoc2V0TmFtZSwgYXJnc1swXSwgb3B0aW9ucywgc2NoZWR1bGVUYXNrLCBjbGVhclRhc2spOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXRhc2spIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0YXNrOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIE5vZGUuanMgbXVzdCBhZGRpdGlvbmFsbHkgc3VwcG9ydCB0aGUgcmVmIGFuZCB1bnJlZiBmdW5jdGlvbnMuCiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBoYW5kbGUgPSB0YXNrLmRhdGEuaGFuZGxlSWQ7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgaGFuZGxlID09PSAnbnVtYmVyJykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gZm9yIG5vbiBub2RlanMgZW52LCB3ZSBzYXZlIGhhbmRsZUlkOiB0YXNrCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBtYXBwaW5nIGluIGxvY2FsIGNhY2hlIGZvciBjbGVhclRpbWVvdXQKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhc2tzQnlIYW5kbGVJZFtoYW5kbGVdID0gdGFzazsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChoYW5kbGUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGZvciBub2RlanMgZW52LCB3ZSBzYXZlIHRhc2sKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHJlZmVyZW5jZSBpbiB0aW1lcklkIE9iamVjdCBmb3IgY2xlYXJUaW1lb3V0CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoYW5kbGVbdGFza1N5bWJvbF0gPSB0YXNrOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGNoZWNrIHdoZXRoZXIgaGFuZGxlIGlzIG51bGwsIGJlY2F1c2Ugc29tZSBwb2x5ZmlsbCBvciBicm93c2VyCiAgICAgICAgICAgICAgICAgICAgICAgIC8vIG1heSByZXR1cm4gdW5kZWZpbmVkIGZyb20gc2V0VGltZW91dC9zZXRJbnRlcnZhbC9zZXRJbW1lZGlhdGUvcmVxdWVzdEFuaW1hdGlvbkZyYW1lCiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChoYW5kbGUgJiYgaGFuZGxlLnJlZiAmJiBoYW5kbGUudW5yZWYgJiYgdHlwZW9mIGhhbmRsZS5yZWYgPT09ICdmdW5jdGlvbicgJiYKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGVvZiBoYW5kbGUudW5yZWYgPT09ICdmdW5jdGlvbicpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhc2sucmVmID0gaGFuZGxlLnJlZi5iaW5kKGhhbmRsZSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YXNrLnVucmVmID0gaGFuZGxlLnVucmVmLmJpbmQoaGFuZGxlKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGhhbmRsZSA9PT0gJ251bWJlcicgfHwgaGFuZGxlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0YXNrOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gY2F1c2UgYW4gZXJyb3IgYnkgY2FsbGluZyBpdCBkaXJlY3RseS4KICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGRlbGVnYXRlLmFwcGx5KHdpbmRvdywgYXJncyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfTsgfSk7CiAgICAgICAgICAgIGNsZWFyTmF0aXZlID0KICAgICAgICAgICAgICAgIHBhdGNoTWV0aG9kKHdpbmRvdywgY2FuY2VsTmFtZSwgZnVuY3Rpb24gKGRlbGVnYXRlKSB7IHJldHVybiBmdW5jdGlvbiAoc2VsZiwgYXJncykgewogICAgICAgICAgICAgICAgICAgIHZhciBpZCA9IGFyZ3NbMF07CiAgICAgICAgICAgICAgICAgICAgdmFyIHRhc2s7CiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBpZCA9PT0gJ251bWJlcicpIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gbm9uIG5vZGVqcyBlbnYuCiAgICAgICAgICAgICAgICAgICAgICAgIHRhc2sgPSB0YXNrc0J5SGFuZGxlSWRbaWRdOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gbm9kZWpzIGVudi4KICAgICAgICAgICAgICAgICAgICAgICAgdGFzayA9IGlkICYmIGlkW3Rhc2tTeW1ib2xdOwogICAgICAgICAgICAgICAgICAgICAgICAvLyBvdGhlciBlbnZpcm9ubWVudHMuCiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghdGFzaykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFzayA9IGlkOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGlmICh0YXNrICYmIHR5cGVvZiB0YXNrLnR5cGUgPT09ICdzdHJpbmcnKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0YXNrLnN0YXRlICE9PSAnbm90U2NoZWR1bGVkJyAmJgogICAgICAgICAgICAgICAgICAgICAgICAgICAgKHRhc2suY2FuY2VsRm4gJiYgdGFzay5kYXRhLmlzUGVyaW9kaWMgfHwgdGFzay5ydW5Db3VudCA9PT0gMCkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgaWQgPT09ICdudW1iZXInKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHRhc2tzQnlIYW5kbGVJZFtpZF07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChpZCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkW3Rhc2tTeW1ib2xdID0gbnVsbDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIERvIG5vdCBjYW5jZWwgYWxyZWFkeSBjYW5jZWxlZCBmdW5jdGlvbnMKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhc2suem9uZS5jYW5jZWxUYXNrKHRhc2spOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAvLyBjYXVzZSBhbiBlcnJvciBieSBjYWxsaW5nIGl0IGRpcmVjdGx5LgogICAgICAgICAgICAgICAgICAgICAgICBkZWxlZ2F0ZS5hcHBseSh3aW5kb3csIGFyZ3MpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH07IH0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAbGljZW5zZQogICAgICAgICAqIENvcHlyaWdodCBHb29nbGUgSW5jLiBBbGwgUmlnaHRzIFJlc2VydmVkLgogICAgICAgICAqCiAgICAgICAgICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgYW4g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AgdmFyIFhIUl9UQVNLID0gem9uZVN5bWJvbCgneGhyVGFzaycpOwogICAgICAgICAgICB2YXIgWEhSX1NZTkMgPSB6b25lU3ltYm9sKCd4aHJTeW5jJyk7CiAgICAgICAgICAgIHZhciBYSFJfTElTVEVORVIgPSB6b25lU3ltYm9sKCd4aHJMaXN0ZW5lcicpOwogICAgICAgICAgICB2YXIgWEhSX1NDSEVEVUxFRCA9IHpvbmVTeW1ib2woJ3hoclNjaGVkdWxlZCcpOwogICAgICAgICAgICB2YXIgWEhSX1VSTCA9IHpvbmVTeW1ib2woJ3hoclVSTCcpOwogICAgICAgICAgICB2YXIgWEhSX0VSUk9SX0JFRk9SRV9TQ0hFRFVMRUQgPSB6b25lU3ltYm9sKCd4aHJFcnJvckJlZm9yZVNjaGVkdWxlZCcpOwogICAgICAgICAgICBmdW5jdGlvbiBwYXRjaFhIUih3aW5kb3cpIHsKICAgICAgICAgICAgICAgIHZhciBYTUxIdHRwUmVxdWVzdCA9IHdpbmRvd1snWE1MSHR0cFJlcXVlc3QnXTsKICAgICAgICAgICAgICAgIGlmICghWE1MSHR0cFJlcXVlc3QpIHsKICAgICAgICAgICAgICAgICAgICAvLyBYTUxIdHRwUmVxdWVzdCBpcyBub3QgYXZhaWxhYmxlIGluIHNlcnZpY2Ugd29ya2VyCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdmFyIFhNTEh0dHBSZXF1ZXN0UHJvdG90eXBlID0gWE1MSHR0cFJlcXVlc3QucHJvdG90eXBlOwogICAgICAgICAgICAgICAgZnVuY3Rpb24gZmluZFBlbmRpbmdUYXNrKHRhcmdldCkgeyByZXR1cm4gdGFyZ2V0W1hIUl9UQVNLXTsgfQogICAgICAgICAgICAgICAgdmFyIG9yaUFkZExpc3RlbmVyID0gWE1MSHR0cFJlcXVlc3RQcm90b3R5cGVbWk9ORV9TWU1CT0xfQUREX0VWRU5UX0xJU1RFTkVSXTsKIC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NrLmRhdGE7CiAgICAgICAgICAgICAgICAgICAgdmFyIHRhcmdldCA9IGRhdGEudGFyZ2V0OwogICAgICAgICAgICAgICAgICAgIHRhcmdldFtYSFJfU0NIRURVTEVEXSA9IGZhbHNlOwogICAgICAgICAgICAgICAgICAgIHRhcmdldFtYSFJfRVJST1JfQkVGT1JFX1NDSEVEVUxFRF0gPSBmYWxzZTsKICAgICAgICAgICAgICAgICAgICAvLyByZW1vdmUgZXhpc3RpbmcgZXZlbnQgbGlzdGVuZXIKICAgICAgICAgICAgICAgICAgICB2YXIgbGlzdGVuZXIgPSB0YXJnZXRbWEhSX0xJU1RFTkVSXTsKICAgICAgICAgICAgICAgICAgICBpZiAoIW9yaUFkZExpc3RlbmVyKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG9yaUFkZExpc3RlbmVyID0gdGFyZ2V0W1pPTkVfU1lNQk9MX0FERF9FVkVOVF9MSVNURU5FUl07CiAgICAgICAgICAgICAgICAgICAgICAgIG9yaVJlbW92ZUxpc3RlbmVyID0gdGFyZ2V0W1pPTkVfU1lNQk9MX1JFTU9WRV9FVkVOVF9MSVNURU5FUl07CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGlmIChsaXN0ZW5lcikgewogICAgICAgICAgICAgICAgICAgICAgICBvcmlSZW1vdmVMaXN0ZW5lci5jYWxsKHRhcmdldCwgUkVBRFlfU1RBVEVfQ0hBTkdFLCBsaXN0ZW5lcik7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHZhciBuZXdMaXN0ZW5lciA9IHRhcmdldFtYSFJfTElTVEVORVJdID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgICAgICAgICBpZiAodGFyZ2V0LnJlYWR5U3RhdGUgPT09IHRhcmdldC5ET05FKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBzb21ldGltZXMgb24gc29tZSBicm93c2VycyBYTUxIdHRwUmVxdWVzdCB3aWxsIGZpcmUgb25yZWFkeXN0YXRlY2hhbmdlIHdpdGgKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHJlYWR5U3RhdGU9NCBtdWx0aXBsZSB0aW1lcywgc28gd2UgbmVlZCB0byBjaGVjayB0YXNrIHN0YXRlIGhlcmUKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghZGF0YS5hYm9ydGVkICYmIHRhcmdldFtYSFJfU0NIRURVTEVEXSAmJiB0YXNrLnN0YXRlID09PSBTQ0hFRFVMRUQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBjaGVjayB3aGV0aGVyIHRoZSB4aHIgaGFzIHJlZ2lzdGVyZWQgb25sb2FkIGxpc3RlbmVyCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaWYgdGhhdCBpcyB0aGUgY2FzZSwgdGhlIHRhc2sgc2hvdWxkIGludm9rZSBhZnRlciBhbGwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBvbmxvYWQgbGlzdGVuZXJzIGZpbmlzaC4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbG9hZFRhc2tzID0gdGFyZ2V0W1pvbmUuX19zeW1ib2xfXygnbG9hZGZhbHNlJyldOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChsb2FkVGFza3MgJiYgbG9hZFRhc2tzLmxlbmd0aCA+IDApIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG9yaUludm9rZV8xID0gdGFzay5pbnZva2U7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhc2suaW52b2tlID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbmVlZCB0byBsb2FkIHRoZSB0YXNrcyBhZ2FpbiwgYmVjYXVzZSBpbiBvdGhlcgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbG9hZCBsaXN0ZW5lciwgdGhleSBtYXkgcmVtb3ZlIHRoZW1zZWx2ZXMKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBsb2FkVGFza3MgPSB0YXJnZXRbWm9uZS5fX3N5bWJvbF9fKCdsb2FkZmFsc2UnKV07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGxvYWRUYXNrcy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChsb2FkVGFza3NbaV0gPT09IHRhc2spIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9hZFRhc2tzLnNwbGljZShpLCAxKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWRhdGEuYWJvcnRlZCAmJiB0YXNrLnN0YXRlID09PSBTQ0hFRFVMRUQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcmlJbnZva2VfMS5jYWxsKHRhc2spOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2FkVGFza3MucHVzaCh0YXNrKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhc2suaW52b2tlKCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIWRhdGEuYWJvcnRlZCAmJiB0YXJnZXRbWEhSX1NDSEVEVUxFRF0gPT09IGZhbHNlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gZXJyb3Igb2NjdXJzIHdoZW4geGhyLnNlbmQoKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhcmdldFtYSFJfRVJST1JfQkVGT1JFX1NDSEVEVUxFRF0gPSB0cnVlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgICAgICBvcmlBZGRMaXN0ZW5lci5jYWxsKHRhcmdldCwgUkVBRFlfU1RBVEVfQ0hBTkdFLCBuZXdMaXN0ZW5lcik7CiAgICAgICAgICAgICAgICAgICAgdmFyIHN0b3JlZFRhc2sgPSB0YXJnZXRbWEhSX1RBU0tdOwogICAgICAgICAgICAgICAgICAgIGlmICghc3RvcmVkVGFzaykgewogICAgICAgICAgICAgICAgICAgICAgICB0YXJnZXRbWEhSX1RBU0tdID0gdGFzazsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgc2VuZE5hdGl2ZS5hcHBseSh0YXJnZXQsIGRhdGEuYXJncyk7CiAgICAgICAgICAgICAgICAgICAgdGFyZ2V0W1hIUl9TQ0hFRFVMRURdID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGFzazsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHBsYWNlaG9sZGVyQ2FsbGJhY2soKSB7IH0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGNsZWFyVGFzayh0YXNrKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIGRhdGEgPSB0YXNrLmRhdGE7CiAgICAgICAgICAgICAgICAgICAgLy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AgICAgICAgICAgICB2YXIgc2VuZE5hdGl2ZSA9IHBhdGNoTWV0aG9kKFhNTEh0dHBSZXF1ZXN0UHJvdG90eXBlLCAnc2VuZCcsIGZ1bmN0aW9uICgpIHsgcmV0dXJuIGZ1bmN0aW9uIChzZWxmLCBhcmdzKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKFpvbmUuY3VycmVudFtmZXRjaFRhc2tTY2hlZHVsaW5nXSA9PT0gdHJ1ZSkgewogICAgICAgICAgICAgICAgICAgICAgICAvLyBhIGZldGNoIGlzIHNjaGVkdWxpbmcsIHNvIHdlIGFyZSB1c2luZyB4aHIgdG8gcG9seWZpbGwgZmV0Y2gKICAgICAgICAgICAgICAgICAgICAgICAgLy8gYW5kIGJlY2F1c2Ugd2UgYWxyZWFkeSBzY2hlZHVsZSBtYWNyb1Rhc2sgZm9yIGZldGNoLCB3ZSBzaG91bGQKICAgICAgICAgICAgICAgICAgICAgICAgLy8gbm90IHNjaGVkdWxlIGEgbWFjcm9UYXNrIGZvciB4aHIgYWdhaW4KICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNlbmROYXRpdmUuYXBwbHkoc2VsZiwgYXJncyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGlmIChzZWxmW1hIUl9TWU5DXSkgewogICAgICAgICAgICAgICAgICAgICAgICAvLyBpZiB0aGUgWEhSIGlzIHN5bmMgdGhlcmUgaXMgbm8gdGFzayB0byBzY2hlZHVsZSwganVzdCBleGVjdXRlIHRoZSBjb2RlLgogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2VuZE5hdGl2ZS5hcHBseShzZWxmLCBhcmdzKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBvcHRpb25zID0geyB0YXJnZXQ6IHNlbGYsIHVybDogc2VsZltYSFJfVVJMXSwgaXNQZXJpb2RpYzogZmFsc2UsIGFyZ3M6IGFyZ3MsIGFib3J0ZWQ6IGZhbHNlIH07CiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0YXNrID0gc2NoZWR1bGVNYWNyb1Rhc2tXaXRoQ3VycmVudFpvbmUoWE1MSFRUUFJFUVVFU1RfU09VUkNFLCBwbGFjZWhvbGRlckNhbGxiYWNrLCBvcHRpb25zLCBzY2hlZHVsZVRhc2ssIGNsZWFyVGFzayk7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzZWxmICYmIHNlbGZbWEhSX0VSUk9SX0JFRk9SRV9TQ0hFRFVMRURdID09PSB0cnVlICYmICFvcHRpb25zLmFib3J0ZWQgJiYKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhc2suc3RhdGUgPT09IFNDSEVEVUxFRCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8geGhyIHJlcXVlc3QgdGhyb3cgZXJyb3Igd2hlbiBzZW5kCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyB3ZSBzaG91bGQgaW52b2tlIHRhc2sgaW5zdGVhZCBvZiBsZWF2aW5nIGEgc2NoZWR1bGVkCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBwZW5kaW5nIG1hY3JvVGFzawogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFzay5pbnZva2UoKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH07IH0pOwogICAgICAgICAgICAgICAgdmFyIGFib3J0TmF0aXZlID0gcGF0Y2hNZXRob2QoWE1MSHR0cFJlcXVlc3RQcm90b3R5cGUsICdhYm9ydCcsIGZ1bmN0aW9uICgpIHsgcmV0dXJuIGZ1bmN0aW9uIChzZWxmLCBhcmdzKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIHRhc2sgPSBmaW5kUGVuZGluZ1Rhc2soc2VsZik7CiAgICAgICAgICAgICAgICAgICAgaWYgKHRhc2sgJiYgdHlwZW9mIHRhc2sudHlwZSA9PSAnc3RyaW5nJykgewogICAgICAgICAgICAgICAgICAgICAgICAvLyBJZiB0aGUgWEhSIGhhcyBhbHJlYWR5IGNvbXBsZXRlZCwgZG8gbm90aGluZy4KICAgICAgICAgICAgICAgICAgICAgICAgLy8gSWYgdGhlIFhIUiBoYXMgYWxyZWFkeSBiZWVuIGFib3J0ZWQsIGRvIG5vdGhpbmcuCiAgICAgICAgICAgICAgICAgICAgICAgIC8vIEZpeCAjNTY5LCBjYWxsIGFib3J0IG11bHRpcGxlIHRpbWVzIGJlZm9yZSBkb25lIHdpbGwgY2F1c2UKICAgICAgICAgICAgICAgICAgICAgICAgLy8gbWFjcm9UYXNrIHRhc2sgY291bnQgYmUgbmVnYXRpdmUgbnVtYmVyCiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0YXNrLmNhbmNlbEZuID09IG51bGwgfHwgKHRhc2suZGF0YSAmJiB0YXNrLmRhdGEuYWJvcnRlZCkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB0YXNrLnpvbmUuY2FuY2VsVGFzayh0YXNrKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoWm9uZS5jdXJyZW50W2ZldGNoVGFza0Fib3J0aW5nXSA9PT0gdHJ1ZSkgewogICAgICAgICAgICAgICAgICAgICAgICAvLyB0aGUgYWJvcnQgaXMgY2FsbGVkIGZyb20gZmV0Y2ggcG9seWZpbGwsIHdlIG5lZWQgdG8gY2FsbCBuYXRpdmUgYWJvcnQgb2YgWEhSLgogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYWJvcnROYXRpdmUuYXBwbHkoc2VsZiwgYXJncyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIC8vIE90aGVyd2lzZSwgd2UgYXJlIHRyeWluZyB0byBhYm9ydCBhbiBYSFIgd2hpY2ggaGFzIG5vdCB5ZXQgYmVlbiBzZW50LCBzbyB0aGVyZSBpcyBubwogICAgICAgICAgICAgICAgICAgIC8vIHRhc2sKICAgICAgICAgICAgICAgICAgICAvLyB0byBjYW5jZWwuIERvIG5vdGhpbmcuCiAgICAgICAgICAgICAgICB9OyB9KTsKICAgICAgICAgICAgfQogICAgICAgIH0pOwogICAgICAgIFpvbmUuX19sb2FkX3BhdGNoKCdnZW9sb2NhdGlvbicsIGZ1bmN0aW9uIChnbG9iYWwpIHsKICAgICAgICAgICAgLy8vIEdFT19MT0NBVElPTgogICAgICAgICAgICBpZiAoZ2xvYmFsWyduYXZpZ2F0b3InXSAmJiBnbG9iYWxbJ25hdmlnYXRvciddLmdlb2xvY2F0aW9uKSB7CiAgICAgICAgICAgICAgICBwYXRjaFByb3RvdHlwZShnbG9iYWxbJ25hdmlnYXRvciddLmdlb2xvY2F0aW9uLCBbJ2dldEN1cnJlbnRQb3NpdGlvbicsICd3YXRjaFBvc2l0aW9uJ10pOwogICAgICAgICAgICB9CiAgICAgICAgfSk7CiAgICAgICAgWm9uZS5fX2xvYWRfcGF0Y2goJ1Byb21pc2VSZWplY3Rpb25FdmVudCcsIGZ1bmN0aW9uIChnbG9iYWwsIFpvbmUpIHsKICAgICAgICAgICAgLy8gaGFuZGxlIHVuaGFuZGxlZCBwcm9taXNlIHJlamVjdGlvbgogICAgICAgICAgICBmdW5jdGlvbiBmaW5kUHJvbWlzZVJlamVjdGlvbkhhbmRsZXIoZXZ0TmFtZSkgewogICAgICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIChlKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIGV2ZW50VGFza3MgPSBmaW5kRXZlbnRUYXNrcyhnbG9iYWwsIGV2dE5hbWUpOwogICAgICAgICAgICAgICAgICAgIGV2ZW50VGFza3MuZm9yRWFjaChmdW5jdGlvbiAoZXZlbnRUYXNrKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHdpbmRvd3MgaGFzIGFkZGVkIHVuaGFuZGxlZHJlamVjdGlvbiBldmVudCBsaXN0ZW5lcgogICAgICAgICAgICAgICAgICAgICAgICAvLyB0cmlnZ2VyIHRoZSBldmVudCBsaXN0ZW5lcgogICAgICAgICAgICAgICAgICAgICAgICB2YXIgUHJvbWlzZVJlamVjdGlvbkV2ZW50ID0gZ2xvYmFsWydQcm9taXNlUmVqZWN0aW9uRXZlbnQnXTsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFByb21pc2VSZWplY3Rpb25FdmVudCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGV2dCA9IG5ldyBQcm9taXNlUmVqZWN0aW9uRXZlbnQoZXZ0TmFtZSwgeyBwcm9taXNlOiBlLnByb21pc2UsIHJlYXNvbjogZS5yZWplY3Rpb24gfSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmVudFRhc2suaW52b2tlKGV2dCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGdsb2JhbFsnUHJvbWlzZVJlamVjdGlvbkV2ZW50J10pIHsKICAgICAgICAgICAgICAgIFpvbmVbem9uZVN5bWJvbCgndW5oYW5kbGVkUHJvbWlzZVJlamVjdGlvbkhhbmRsZXInKV0gPQogICAgICAgICAgICAgICAgICAgIGZpbmRQcm9taXNlUmVqZWN0aW9uSGFuZGxlcigndW5oYW5kbGVkcmVqZWN0aW9uJyk7CiAgICAgICAgICAgICAgICBab25lW3pvbmVTeW1ib2woJ3JlamVjdGlvbkhhbmRsZWRIYW5kbGVyJyldID0KICAgICAgICAgICAgICAgICAgICBmaW5kUHJvbWlzZVJlamVjdGlvbkhhbmRsZXIoJ3JlamVjdGlvbmhhbmRsZWQnKTsKICAgICAgICAgICAgfQogICAgICAgIH0pOwogICAgfSkpKTsK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mltYXRpb24KICAgICAqICAgICBjb25zdCBteUFuaW1hdGlvbiA9IHRoaXMuX2J1aWxkZXIuYnVpbGQoWwogICAgICogICAgICAgc3R5bGUoeyB3aWR0aDogMCB9KSwKICAgICAqICAgICAgIGFuaW1hdGUoMTAwMCwgc3R5bGUoeyB3aWR0aDogJzEwMHB4JyB9KSkKICAgICAqICAgICBdKTsKICAgICAqCiAgICAgKiAgICAgLy8gdXNlIHRoZSByZXR1cm5lZCBmYWN0b3J5IG9iamVjdCB0byBjcmVhdGUgYSBwbGF5ZXIKICAgICAqICAgICBjb25zdCBwbGF5ZXIgPSBteUFuaW1hdGlvbi5jcmVhdGUoZWxlbWVudCk7CiAgICAgKgogICAgICogICAgIHBsYXllci5wbGF5KCk7CiAgICAgKiAgIH0KICAgICAqIH0KICAgICAqIGBgYAogICAgICoKICAgICAqIFxAcHVibGljQXBpCiAgICAgKiBAYWJzdHJhY3QKICAgICAqLwogICAgY2xhc3MgQW5pbWF0aW9uQnVpbGRlciB7CiAgICB9CiAgICAvKioKICAgICAqIEEgZmFjdG9yeSBvYmplY3QgcmV0dXJuZWQgZnJvbSB0aGUgYEFuaW1hdGlvbkJ1aWxkZXJgLmBidWlsZCgpYCBtZXRob2QuCiAgICAgKgogICAgICogXEBwdWJsaWNBcGkKICAgICAqIEBhYnN0cmFjdAogICAgICovCiAgICBjbGFzcyBBbmltYXRpb25GYWN0b3J5IHsKICAgIH0KICAgIC8qKgogICAgICogU3BlY2lmaWVzIGF1dG9tYXRpYyBzdHlsaW5nLgogICAgICoKICAgICAqIFxAcHVibGljQXBpCiAgICAgKiBAdHlwZSB7P30KICAgICAqLwogICAgY29uc3QgQVVUT19TVFlMRSA9ICcqJzsKICAgIC8qKgogICAgICogQ3JlYXRlcyBhIG5hbWVkIGFuaW1hdGlvbiB0cmlnZ2VyLCBjb250YWluaW5nIGEgIGxpc3Qgb2YgYHN0YXRlKClgCiAgICAgKiBhbmQgYHRyYW5zaXRpb24oKWAgZW50cmllcyB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gICAgKiBjbGFzcyBNeUNvbXBvbmVudCB7CiAgICAgKiAgIG15U3RhdHVzRXhwID0gInllcy1wbGVhc2UtYW5pbWF0ZSI7CiAgICAgKiB9CiAgICAgKiBgYGAKICAgICAqCiAgICAgKiAjIyMgRGlzYWJsaW5nIEFuaW1hdGlvbnMKICAgICAqIFdoZW4gdHJ1ZSwgdGhlIHNwZWNpYWwgYW5pbWF0aW9uIGNvbnRyb2wgYmluZGluZyBgXEAuZGlzYWJsZWRgIGJpbmRpbmcgcHJldmVudHMKICAgICAqIGFsbCBhbmltYXRpb25zIGZyb20gcmVuZGVyaW5nLgogICAgICogUGxhY2UgdGhlICBgXEAuZGlzYWJsZWRgIGJpbmRpbmcgb24gYW4gZWxlbWVudCB0byBkaXNhYmxlCiAgICAgKiBhbmltYXRpb25zIG9uIHRoZSBlbGVtZW50IGl0c2VsZiwgYXMgd2VsbCBhcyBhbnkgaW5uZXIgYW5pbWF0aW9uIHRyaWdnZXJzCiAgICAgKiB3aXRoaW4gdGhlIGVsZW1lbnQuCiAgICAgKgogICAgICogVGhlIGZvbGxvd2luZyBleGFtcGxlIHNob3dzIGhvdyB0byB1c2UgdGhpcyBmZWF0dXJlOgogICAgICoKICAgICAqIGBgYHR5cGVzY3JpcHQgLwogICAgICogICBzZWxlY3RvcjogJ215LWNvbXBvbmVudCcsCiAgICAgKiAgIHRlbXBsYXRlOiBgCiAgICAgKiAgICAgPGRpdiBbXEAuZGlzYWJsZWRdPSJpc0Rpc2FibGVkIj4KICAgICAqICAgICAgIDxkaXYgW1xAY2hpbGRBbmltYXRpb25dPSJleHAiPjwvZGl2PgogICAgICogICAgIDwvZGl2PgogICAgICogICBgLAogICAgICogICBhbmltYXRpb25zOiBbCiAgICAgKiAgICAgdHJpZ2dlcigiY2hpbGRBbmltYXRpb24iLCBbCiAgICAgKiAgICAgICAvLyAuLi4KICAgICAqICAgICBdKQogICAgICogICBdCiAgICAgKiB9KQogICAgICogY2xhc3MgTXlDb21wb25lbnQg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+VGl0bGU8L2gxPgogICAgICogICAgICAgPGRpdiBjbGFzcz0iY29udGVudCI+CiAgICAgKiAgICAgICAgIEJsYWggYmxhaCBibGFoCiAgICAgKiAgICAgICA8L2Rpdj4KICAgICAqICAgICA8L2Rpdj4KICAgICAqICAgYCwKICAgICAqICAgYW5pbWF0aW9uczogWwogICAgICogICAgdHJpZ2dlcigncXVlcnlBbmltYXRpb24nLCBbCiAgICAgKiAgICAgIHRyYW5zaXRpb24oJyogPT4gZ29BbmltYXRlJywgWwogICAgICogICAgICAgIC8vIGhpZGUgdGhlIGlubmVyIGVsZW1lbnRzCiAgICAgKiAgICAgICAgcXVlcnkoJ2gxJywgc3R5bGUoeyBvcGFjaXR5OiAwIH0pKSwKICAgICAqICAgICAgICBxdWVyeSgnLmNvbnRlbnQnLCBzdHlsZSh7IG9wYWNpdHk6IDAgfSkpLAogICAgICoKICAgICAqICAgICAgICAvLyBhbmltYXRlIHRoZSBpbm5lciBlbGVtZW50cyBpbiwgb25lIGJ5IG9uZQogICAgICogICAgICAgIHF1ZXJ5KCdoMScsIGFuaW1hdGUoMTAwMCwgc3R5bGUoeyBvcGFjaXR5OiAxIH0pKSksCiAgICAgKiAgICAgICAgcXVlcnkoJy5jb250ZW50JywgYW5pbWF0ZSgxMDAwLCBzdHlsZSh7IG9wYWNpdHk6IDEgfSkpKSwKICAgICAqICAgICAgXSkKICAgICAqICAgIF0pCiAgICAgKiAgXQogICAgICogfSkKICAgICAqIGNsYXNzIENtcCB7CiAgICAgKiAgIGV4cCA9ICcnOwogICAgICoKICAgICAqICAgZ29BbmltYXRlKCkgewogICAgICogICAgIHRoaXMuZXhwID0gJ2dvQW5pbWF0ZSc7CiAgICAgKiAgIH0KICAgICAqIH0KICAgICAqIGBgYAogICAgICoKICAgICAqIFxAcHVibGljQXBpCiAgICAgKiBAcGFyYW0gez99IHNlbGVjdG9yIFRoZSBlbGVtZW50IHRvIHF1ZXJ5LCBvciBhIHNldCBvZiBlbGVtZW50cyB0aG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CiAgICAgKiBBbiBlbXB0eSBwcm9ncmFtbWF0aWMgY29udHJvbGxlciBmb3IgcmV1c2FibGUgYW5pbWF0aW9ucy4KICAgICAqIFVzZWQgaW50ZXJuYWxseSB3aGVuIGFuaW1hdGlvbnMgYXJlIGRpc2FibGVkLCB0byBhdm9pZAogICAgICogY2hlY2tpbmcgZm9yIHRoZSBudWxsIGNhc2Ugd2hlbiBhbiBhbmltYXRpb24gcGxheWVyIGlzIGV4cGVjdGVkLgogICAgICoKICAgICAqIEBzZWUgYGFuaW1hdGUoKWAKICAgICAqIEBzZWUgYEFuaW1hdGlvblBsYXllcmAKICAgICAqIEBzZWUgYEdyb3VwUGxheWVyYAogICAgICoKICAgICAqIFxAcHVibGljQXBpCiAgICAgKi8KICAgIGNsYXNzIE5vb3BBbmltYXRpb25QbGF5ZXIgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7Pz19IGR1cmF0aW9uCiAgICAgICAgICogQHBhcmFtIHs/PX0gZGVsYXkKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihkdXJhdGlvbiA9IDAsIGRlbGF5ID0gMCkgewogICAgICAgICAgICB0aGlzLl9vbkRvbmVGbnMgPSBbXTsKICAgICAgICAgICAgdGhpcy5fb25TdGFydEZucyA9IFtdOwogICAgICAgICAgICB0aGlzLl9vbkRlc3Ryb3lGbnMgPSBbXTsKICAgICAgICAgICAgdGhpcy5fc3RhcnRlZCA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLl9kZXN0cm95ZWQgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5fZmluaXNoZWQgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5wYXJlbnRQbGF5ZXIgPSBudWxsOwogICAgICAgICAgICB0aGlzLnRvdGFsVGltZSA9IGR1cmF0aW9uICsgZGVsYXk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfb25GaW5pc2goKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5fZmluaXNoZWQpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2ZpbmlzaGVkID0gdHJ1ZTsKICAgICAgICAgICAgICAgIHRoaXMuX29uRG9uZUZucy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIGZuID0+IGZuKCkpKTsKICAgICAgICAgICAgICAgIHRoaXMuX29uRG9uZUZucyA9IFtdOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uU3RhcnQoZm4pIHsKICAgICAgICAgICAgdGhpcy5fb25TdGFydEZucy5wdXNoKGZuKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25Eb25lKGZuKSB7CiAgICAgICAgICAgIHRoaXMuX29uRG9uZUZucy5wdXNoKGZuKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25EZXN0cm95KGZuKSB7CiAgICAgICAgICAgIHRoaXMuX29uRGVzdHJveUZucy5wdXNoKGZuKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBoYXNTdGFydGVkKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fc3RhcnRlZDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBpbml0KCkgeyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBwbGF5KCkgewogICAgICAgICAgICBpZiAoIXRoaXMuaGFzU3RhcnRlZCgpKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9vblN0YXJ0KCk7CiAgICAgICAgICAgICAgICB0aGlzLnRyaWdnZXJNaWNyb3Rhc2soKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9zdGFydGVkID0gdHJ1ZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdHJpZ2dlck1pY3JvdGFzaygpIHsKICAgICAgICAgICAgc2NoZWR1bGVNaWNyb1Rhc2skMSgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB0aGlzLl9vbkZpbmlzaCgpKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfb25TdGFydCgpIHsKICAgICAgICAgICAgdGhpcy5fb25TdGFydEZucy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZm4gPT4gZm4oKSkpOwogICAgICAgICAgICB0aGlzLl9vblN0YXJ0Rm5zID0gW107CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcGF1c2UoKSB7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlc3RhcnQoKSB7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZpbmlzaCgpIHsKICAgICAgICAgICAgdGhpcy5fb25GaW5pc2goKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkZXN0cm95KCkgewogICAgICAgICAgICBpZiAoIXRoaXMuX2Rlc3Ryb3llZCkgewogICAgICAgICAgICAgICAgdGhpcy5fZGVzdHJveWVkID0gdHJ1ZTsKICAgICAgICAgICAgICAgIGlmICghdGhpcy5oYXNTdGFydGVkKCkpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9vblN0YXJ0KCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLmZpbmlzaCgpOwogICAgICAgICAgICAgICAgdGhpcy5fb25EZXN0cm95Rm5zLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgZm4gPT4gZm4oKSkpOwogICAgICAgICAgICAgICAgdGhpcy5fb25EZXN0cm95Rm5zID0gW107CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZXNldCgpIHsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gcG9zaXRpb24KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldFBvc2l0aW9uKHBvc2l0aW9uKSB7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldFBvc2l0aW9uKCkgewogICAgICAgICAgICByZXR1cm4gMDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7P30gcGhhc2VOYW1lCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB0cmlnZ2VyQ2FsbGJhY2socGhhc2VOYW1lKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbWV0aG9kcyA9IHBoYXNlTmFtZSA9PSAnc3RhcnQnID8gdGhpcy5fb25TdGFydEZucyA6IHRoaXMuX29uRG9uZUZuczsKICAgICAgICAgICAgbWV0aG9kcy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZm4gPT4gZm4oKSkpOwogICAgICAgICAgICBtZXRob2RzLmxlbmd0aCA9IDA7CiAgICAgICAgfQogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogcGFja2FnZXMvYW5pbWF0aW9ucy9zcmMvcGxheWVycy9hbmltYXRpb25fZ3JvdXBfcGxheWVyLnRzCiAgICAgKiBAc3VwcHJlc3Mge2NoZWNrVHlwZXMsY29uc3RhbnRQcm9wZXJ0eSxleHRyYVJlcXVpcmUsbWlzc2luZ092ZXJyaWRlLG1pc3NpbmdSZXR1cm4sdW51c2VkUHJpdmF0ZU1lbWJlcnMsdXNlbGVzc0NvZGV9IGNoZWNrZWQgYnkgdHNjCiAgICAgKi8KICAgIC8qKgogICAgICogQSBwcm9ncmFtbWF0aWMgY29udHJvbGxlciBmb3IgYSBncm91cCBvZiByZXVzYWJsZSBhbmltYXRpb25zLgogICAgICogVXNlZCBpbnRlcm5hbGx5IHRvIGNvbnRyb2wgYW5pbWF0aW9ucy4KICAgICAqCiAgICAgKiBAc2VlIGBBbmltYXRpb25QbGF5ZXJgCiAgICAgKiBAc2VlIGB7XEBsaW5rIGFuaW1hdGlvbnMvZ3JvdXAgZ3JvdXAoKX1gCiAgICAgKgogICAgICovCiAgICBjbGFzcyBBbmltYXRpb25Hcm91cFBsYXllciB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBfcGxheWVycwogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKF9wbGF5ZXJzKSB7CiAgICAgICAgICAgIHRoaXMuX29uRG9uZUZucyA9IFtdOwogICAgICAgICAgICB0aGlzLl9vblN0YXJ0Rm5zID0gW107CiAgICAgICAgICAgIHRoaXMuX2ZpbmlzaGVkID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuX3N0YXJ0ZWQgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5fZGVzdHJveWVkID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuX29uRGVzdHJveUZucyA9IFtdOwogICAgICAgICAgICB0aGlzLnBhcmVudFBsYXllciA9IG51bGw7CiAgICAgICAgICAgIHRoaXMudG90YWxUaW1lID0gMDsKICAgICAgICAgICAgdGhpcy5wbGF5ZXJzID0gX3BsYXllcnM7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGRvbmVDb3VudCA9IDA7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGRlc3Ryb3lDb3VudCA9IDA7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHN0YXJ0Q291bnQgPSAwOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHRvdGFsID0gdGhpcy5wbGF5ZXJzLmxlbmd0aDsKICAgICAgICAgICAgaWYgKHRvdGFsID09IDApIHsKICAgICAgICAgICAgICAgIHNjaGVkdWxlTWljcm9UYXNrJDEoKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gdGhpcy5fb25GaW5pc2goKSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5wbGF5ZXJzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwbGF5ZXIKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIHBsYXllciA9PiB7CiAgICAgICAgICAgICAgICAgICAgcGxheWVyLm9uRG9uZSgoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgrK2RvbmVDb3VudCA9PSB0b3RhbCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fb25GaW5pc2goKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgICAgICBwbGF5ZXIub25EZXN0cm95KCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCsrZGVzdHJveUNvdW50ID09IHRvdGFsKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9vbkRlc3Ryb3koKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgICAgICBwbGF5ZXIub25TdGFydCgoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgrK3N0YXJ0Q291bnQgPT0gdG90YWwpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX29uU3RhcnQoKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLnRvdGFsVGltZSA9IHRoaXMucGxheWVycy5yZWR1Y2UoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHRpbWUKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwbGF5ZXIKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICh0aW1lLCBwbGF5ZXIpID0+IE1hdGgubWF4KHRpbWUsIHBsYXllci50b3RhbFRpbWUpKSwgMCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfb25GaW5pc2goKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5fZmluaXNoZWQpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2ZpbmlzaGVkID0gdHJ1ZTsKICAgICAgICAgICAgICAgIHRoaXMuX29uRG9uZUZucy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIGZuID0+IGZuKCkpKTsKICAgICAgICAgICAgICAgIHRoaXMuX29uRG9uZUZucyA9IFtdOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgaW5pdCgpIHsKICAgICAgICAgICAgdGhpcy5wbGF5ZXJzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHBsYXllcgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgcGxheWVyID0+IHBsYXllci5pbml0KCkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25TdGFydChmbikgewogICAgICAgICAgICB0aGlzLl9vblN0YXJ0Rm5zLnB1c2goZm4pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX29uU3RhcnQoKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5oYXNTdGFydGVkKCkpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3N0YXJ0ZWQgPSB0cnVlOwogICAgICAgICAgICAgICAgdGhpcy5fb25TdGFydEZucy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIGZuID0+IGZuKCkpKTsKICAgICAgICAgICAgICAgIHRoaXMuX29uU3RhcnRGbnMgPSBbXTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGZuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvbkRvbmUoZm4pIHsKICAgICAgICAgICAgdGhpcy5fb25Eb25lRm5zLnB1c2goZm4pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGZuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvbkRlc3Ryb3koZm4pIHsKICAgICAgICAgICAgdGhpcy5fb25EZXN0cm95Rm5zLnB1c2goZm4pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGhhc1N0YXJ0ZWQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9zdGFydGVkOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHBsYXkoKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5wYXJlbnRQbGF5ZXIpIHsKICAgICAgICAgICAgICAgIHRoaXMuaW5pdCgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX29uU3RhcnQoKTsKICAgICAgICAgICAgdGhpcy5wbGF5ZXJzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHBsYXllcgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgcGxheWVyID0+IHBsYXllci5wbGF5KCkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBwYXVzZSgpIHsKICAgICAgICAgICAgdGhpcy5wbGF5ZXJzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHBsYXllcgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgcGxheWVyID0+IHBsYXllci5wYXVzZSgpKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVzdGFydCgpIHsKICAgICAgICAgICAgdGhpcy5wbGF5ZXJzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHBsYXllcgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgcGxheWVyID0+IHBsYXllci5yZXN0YXJ0KCkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmaW5pc2goKSB7CiAgICAgICAgICAgIHRoaXMuX29uRmluaXNoKCk7CiAgICAgICAgICAgIHRoaXMucGxheWVycy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwbGF5ZXIKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHBsYXllciA9PiBwbGF5ZXIuZmluaXNoKCkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkZXN0cm95KCkgewogICAgICAgICAgICB0aGlzLl9vbkRlc3Ryb3koKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9vbkRlc3Ryb3koKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5fZGVzdHJveWVkKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9kZXN0cm95ZWQgPSB0cnVlOwogICAgICAgICAgICAgICAgdGhpcy5fb25GaW5pc2goKTsKICAgICAgICAgICAgICAgIHRoaXMucGxheWVycy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcGxheWVyCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBwbGF5ZXIgPT4gcGxheWVyLmRlc3Ryb3koKSkpOwogICAgICAgICAgICAgICAgdGhpcy5fb25EZXN0cm95Rm5zLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgZm4gPT4gZm4oKSkpOwogICAgICAgICAgICAgICAgdGhpcy5fb25EZXN0cm95Rm5zID0gW107CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZXNldCgpIHsKICAgICAgICAgICAgdGhpcy5wbGF5ZXJzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHBsYXllcgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgcGxheWVyID0+IHBsYXllci5yZXNldCgpKSk7CiAgICAgICAgICAgIHRoaXMuX2Rlc3Ryb3llZCA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLl9maW5pc2hlZCA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLl9zdGFydGVkID0gZmFsc2U7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gcAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0UG9zaXRpb24ocCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHRpbWVBdFBvc2l0aW9uID0gcCAqIHRoaXMudG90YWxUaW1lOwogICAgICAgICAgICB0aGlzLnBsYXllcnMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcGxheWVyCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBwbGF5ZXIgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgcG9zaXRpb24gPSBwbGF5ZXIudG90YWxUaW1lID8gTWF0aC5taW4oMSwgdGltZUF0UG9zaXRpb24gLyBwbGF5ZXIudG90YWxUaW1lKSA6IDE7CiAgICAgICAgICAgICAgICBwbGF5ZXIuc2V0UG9zaXRpb24ocG9zaXRpb24pOwogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0UG9zaXRpb24oKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IG1pbiA9IDA7CiAgICAgICAgICAgIHRoaXMucGxheWVycy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwbGF5ZXIKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHBsYXllciA9PiB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBwID0gcGxheWVyLmdldFBvc2l0aW9uKCk7CiAgICAgICAgICAgICAgICBtaW4gPSBNYXRoLm1pbihwLCBtaW4pOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIHJldHVybiBtaW47CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYmVmb3JlRGVzdHJveSgpIHsKICAgICAgICAgICAgdGhpcy5wbGF5ZXJzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHBsYXllcgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgcGxheWVyID0+IHsKICAgICAgICAgICAgICAgIGlmIChwbGF5ZXIuYmVmb3JlRGVzdHJveSkgewogICAgICAgICAgICAgICAgICAgIHBsYXllci5iZWZvcmVEZXN0cm95KCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7P30gcGhhc2VOYW1lCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB0c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DoKICAgICAgICAgICAgICAgIHJldHVybiBuZXcgTm9vcEFuaW1hdGlvblBsYXllcigpOwogICAgICAgICAgICBjYXNlIDE6CiAgICAgICAgICAgICAgICByZXR1cm4gcGxheWVyc1swXTsKICAgICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgICAgIHJldHVybiBuZXcgQW5pbWF0aW9uR3JvdXBQbGF5ZXIocGxheWVycyk7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IGRyaXZlcgogICAgICogQHBhcmFtIHs/fSBub3JtYWxpemVyCiAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAqIEBwYXJhbSB7P30ga2V5ZnJhbWVzCiAgICAgKiBAcGFyYW0gez89fSBwcmVTdHlsZXMKICAgICAqIEBwYXJhbSB7Pz19IHBvc3RTdHlsZXMKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIG5vcm1hbGl6ZUtleWZyYW1lcyhkcml2ZXIsIG5vcm1hbGl6ZXIsIGVsZW1lbnQsIGtleWZyYW1lcywgcHJlU3R5bGVzID0ge30sIHBvc3RTdHlsZXMgPSB7fSkgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBlcnJvcnMgPSBbXTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3Qgbm9ybWFsaXplZEtleWZyYW1lcyA9IFtdOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgcHJldmlvdXNPZmZzZXQgPSAtMTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IHByZXZpb3VzS2V5ZnJhbWUgPSBudWxsOwogICAgICAgIGtleWZyYW1lcy5mb3JFYWNoKCgvKioKICAgICAgICAgKiBAcGFyYW0gez99IGtmCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBrZiA9PiB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgb2Zmc2V0ID0gKC8qKiBAdHlwZSB7P30gKi8gKGtmWydvZmZzZXQnXSkpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGlzU2FtZU9mZnNldCA9IG9mZnNldCA9PSBwcmV2aW91c09mZnNldDsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBub3JtYWxpemVkS2V5ZnJhbWUgPSAoaXNTYW1lT2Zmc2V0ICYmIHByZXZpb3VzS2V5ZnJhbWUpIHx8IHt9OwogICAgICAgICAgICBPYmplY3Qua2V5cyhrZikuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcHJvcAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgcHJvcCA9PiB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBsZXQgbm9ybWFsaXplZFByb3AgPSBwcm9wOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IG5vcm1hbGl6ZWRWYWx1ZSA9IGtmW3Byb3BdOwogICAgICAgICAgICAgICAgaWYgKHByb3AgIT09ICdvZmZzZXQnKSB7CiAgICAgICAgICAgICAgICAgICAgbm9ybWFsaXplZFByb3AgPSBub3JtYWxpemVyLm5vcm1hbGl6ZVByb3BlcnR5TmFtZShub3JtYWxpemVkUHJvcCwgZXJyb3JzKTsKICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKG5vcm1hbGl6ZWRWYWx1ZSkgewogICAgICAgICAgICAgICAgICAgICAgICBjYXNlIMm1UFJFX1NUWUxFOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbm9ybWFsaXplZFZhbHVlID0gcHJlU3R5bGVzW3Byb3BdOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgQVVUT19TVFlMRToKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vcm1hbGl6ZWRWYWx1ZSA9IHBvc3RTdHlsZXNbcHJvcF07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vcm1hbGl6ZWRWYWx1ZSA9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbm9ybWFsaXplci5ub3JtYWxpemVTdHlsZVZhbHVlKHByb3AsIG5vcm1hbGl6ZWRQcm9wLCBub3JtYWxpemVkVmFsdWUsIGVycm9ycyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBub3JtYWxpemVkS2V5ZnJhbWVbbm9ybWFsaXplZFByb3BdID0gbm9ybWFsaXplZFZhbHVlOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIGlmICghaXNTYW1lT2Zmc2V0KSB7CiAgICAgICAgICAgICAgICBub3JtYWxpemVkS2V5ZnJhbWVzLnB1c2gobm9ybWFsaXplZEtleWZyYW1lKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBwcmV2aW91c0tleWZyYW1lID0gbm9ybWFsaXplZEtleWZyYW1lOwogICAgICAgICAgICBwcmV2aW91c09mZnNldCA9IG9mZnNldDsKICAgICAgICB9KSk7CiAgICAgICAgaWYgKGVycm9ycy5sZW5ndGgpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBMSU5FX1NUQVJUID0gJ1xuIC0gJzsKICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBVbmFibGUgdG8gYW5pbWF0ZSBkdWUgdG8gdGhlIGZvbGxvd2luZyBlcnJvcnM6JHtMSU5FX1NUQVJUfSR7ZXJyb3JzLmpvaW4oTElORV9TVEFSVCl9YCk7CiAgICAgICAgfQogICAgICAgIHJldHVybiBub3JtYWxpemVkS2V5ZnJhbWVzOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHBsYXllcgogICAgICogQHBhcmFtIHs/fSBldmVudE5hbWUKICAgICAqIEBwYXJhbSB7P30gZXZlbnQKICAgICAqIEBwYXJhbSB7P30gY2FsbGJhY2sKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGxpc3Rlbk9uUGxheWVyKHBsYXllciwgZXZlbnROYW1lLCBldmVudCwgY2FsbGJhY2spIHsKICAgICAgICBzd2l0Y2ggKGV2ZW50TmFtZSkgewogICAgICAgICAgICBjYXNlICdzdGFydCc6CiAgICAgICAgICAgICAgICBwbGF5ZXIub25TdGFydCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiBjYWxsYmFjayhldmVudCAmJiBjb3B5QW5pbWF0aW9uRXZlbnQoZXZlbnQsICdzdGFydCcsIHBsYXllcikpKSk7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSAnZG9uZSc6CiAgICAgICAgICAgICAgICBwbGF5ZXIub25Eb25lKCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IGNhbGxiYWNrKGV2ZW50ICYmIGNvcHlBbmltYXRpb25FdmVudChldmVudCwgJ2RvbmUnLCBwbGF5ZXIpKSkpOwogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGNhc2UgJ2Rlc3Ryb3knOgogICAgICAgICAgICAgICAgcGxheWVyLm9uRGVzdHJveSgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiBjYWxsYmFjayhldmVudCAmJiBjb3B5QW5pbWF0aW9uRXZlbnQoZXZlbnQsICdkZXN0cm95JywgcGxheWVyKSkpKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBlCiAgICAgKiBAcGFyYW0gez99IHBoYXNlTmFtZQogICAgICogQHBhcmFtIHs/fSBwbGF5ZXIKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGNvcHlBbmltYXRpb25FdmVudChlLCBwaGFzZU5hbWUsIHBsYXllcikgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCB0b3RhbFRpbWUgPSBwbGF5ZXIudG90YWxUaW1lOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBkaXNhYmxlZCA9ICgoLyoqIEB0eXBlIHs/fSAqLyAocGxheWVyKSkpLmRpc2FibGVkID8gdHJ1ZSA6IGZhbHNlOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBldmVudCA9IG1ha2VBbmltYXRpb25FdmVudChlLmVsZW1lbnQsIGUudHJpZ2dlck5hbWUsIGUuZnJvbVN0YXRlLCBlLnRvU3RhdGUsIHBoYXNlTmFtZSB8fCBlLnBoYXNlTmFtZSwgdG90YWxUaW1lID09IHVuZGVmaW5lZCA/IGUudG90YWxUaW1lIDogdG90YWxUaW1lLCBkaXNhYmxlZCk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGRhdGEgPSAoKC8qKiBAdHlwZSB7P30gKi8gKGUpKSlbJ19kYXRhJ107CiAgICAgICAgaWYgKGRhdGEgIT0gbnVsbCkgewogICAgICAgICAgICAoKC8qKiBAdHlwZSB7P30gKi8gKGV2ZW50KSkpWydfZGF0YSddID0gZGF0YTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGV2ZW50OwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAqIEBwYXJhbSB7P30gdHJpZ2dlck5hbWUKICAgICAqIEBwYXJhbSB7P30gZnJvbVN0YXRlCiAgICAgKiBAcGFyYW0gez99IHRvU3RhdGUKICAgICAqIEBwYXJhbSB7Pz19IHBoYXNlTmFtZQogICAgICogQHBhcmFtIHs/PX0gdG90YWxUaW1lCiAgICAgKiBAcGFyYW0gez89fSBkaXNhYmxlZAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gbWFrZUFuaW1hdGlvbkV2ZW50KGVsZW1lbnQsIHRyaWdnZXJOYW1lLCBmcm9tU3RhdGUsIHRvU3RhdGUsIHBoYXNlTmFtZSA9ICcnLCB0b3RhbFRpbWUgPSAwLCBkaXNhYmxlZCkgewogICAgICAgIHJldHVybiB7IGVsZW1lbnQsIHRyaWdnZXJOYW1lLCBmcm9tU3RhdGUsIHRvU3RhdGUsIHBoYXNlTmFtZSwgdG90YWxUaW1lLCBkaXNhYmxlZDogISFkaXNhYmxlZCB9OwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IG1hcAogICAgICogQHBhcmFtIHs/fSBrZXkKICAgICAqIEBwYXJhbSB7P30gZGVmYXVsdFZhbHVlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBnZXRPclNldEFzSW5NYXAobWFwLCBrZXksIGRlZmF1bHRWYWx1ZSkgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgdmFsdWU7CiAgICAgICAgaWYgKG1hcCBpbnN0YW5jZW9mIE1hcCkgewogICAgICAgICAgICB2YWx1ZSA9IG1hcC5nZXQoa2V5KTsKICAgICAgICAgICAgaWYgKCF2YWx1ZSkgewogICAgICAgICAgICAgICAgbWFwLnNldChrZXksIHZhbHVlID0gZGVmYXVsdFZhbHVlKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgdmFsdWUgPSBtYXBba2V5XTsKICAgICAgICAgICAgaWYgKCF2YWx1ZSkgewogICAgICAgICAgICAgICAgdmFsdWUgPSBtYXBba2V5XSA9IGRlZmF1bHRWYWx1ZTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gdmFsdWU7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gY29tbWFuZAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gcGFyc2VUaW1lbGluZUNvbW1hbmQoY29tbWFuZCkgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBzZXBhcmF0b3JQb3MgPSBjb21tYW5kLmluZGV4T2YoJzonKTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgaWQgPSBjb21tYW5kLnN1YnN0cmluZygxLCBzZXBhcmF0b3JQb3MpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBhY3Rpb24gPSBjb21tYW5kLnN1YnN0cihzZXBhcmF0b3JQb3MgKyAxKTsKICAgICAgICByZXR1cm4gW2lkLCBhY3Rpb25dOwogICAgfQogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgbGV0IF9jb250YWlucyA9ICgvKioKICAgICAqIEBwYXJhbSB7P30gZWxtMQogICAgICogQHBhcmFtIHs/fSBlbG0yCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICAoZWxtMSwgZWxtMikgPT4gZmFsc2UpOwogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgbGV0IF9tYXRjaGVzID0gKC8qKgogICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgKiBAcGFyYW0gez99IHNlbGVjdG9yCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICAoZWxlbWVudCwgc2VsZWN0b3IpID0+IGZhbHNlKTsKICAgIC8qKiBAdHlwZSB7P30gKi8KICAgIGxldCBfcXVlcnkgPSAoLyoqCiAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAqIEBwYXJhbSB7P30gc2VsZWN0b3IKICAgICAqIEBwYXJhbSB7P30gbXVsdGkKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIChlbGVtZW50LCBzZWxlY3RvciwgbXVsdGkpID0+IHsKICAgICAgICByZXR1cm4gW107CiAgICB9KTsKICAgIC8vIERlZmluZSB1dGlsaXR5IG1ldGhvZHMgZm9yIGJyb3dzZXJzIGFuZCBwbGF0Zm9ybS1zZXJ2ZXIoZG9taW5vKSB3aGVyZSBFbGVtZW50CiAgICAvLyBhbmQgdXRpbGl0eSBtZXRob2RzIGV4aXN0LgogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgX2lzTm9kZSA9IGlzTm9kZSgpOwogICAgaWYgKF9pc05vZGUgfHwgdHlwZW9mIEVsZW1lbnQgIT09ICd1bmRlZmluZWQnKSB7CiAgICAgICAgLy8gdGhpcyBpcyB3ZWxsIHN1cHBvcnRlZCBpbiBhbGwgYnJvd3NlcnMKICAgICAgICBfY29udGFpbnMgPSAoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBlbG0xCiAgICAgICAgICogQHBhcmFtIHs/fSBlbG0yCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAoZWxtMSwgZWxtMikgPT4gewogICAgICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKGVsbTEuY29udGFpbnMoZWxtMikpKTsKICAgICAgICB9KTsKICAgICAgICBfbWF0Y2hlcyA9ICgoLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgIGlmIChfaXNOb2RlIHx8IEVsZW1lbnQucHJvdG90eXBlLm1hdGNoZXMpIHsKICAgICAgICAgICAgICAgIHJldHVybiAoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gc2VsZWN0b3IKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChlbGVtZW50LCBzZWxlY3RvcikgPT4gZWxlbWVudC5tYXRjaGVzKHNlbGVjdG9yKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBwcm90byA9ICgvKiogQHR5cGUgez99ICovIChFbGVtZW50LnByb3RvdHlwZSkpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZm4gPSBwcm90by5tYXRjaGVzU2VsZWN0b3IgfHwgcHJvdG8ubW96TWF0Y2hlc1NlbGVjdG9yIHx8IHByb3RvLm1zTWF0Y2hlc1NlbGVjdG9yIHx8CiAgICAgICAgICAgICAgICAgICAgcHJvdG8ub01hdGNoZXNTZWxlY3RvciB8fCBwcm90by53ZWJraXRNYXRjaGVzU2VsZWN0b3I7CiAgICAgICAgICAgICAgICBpZiAoZm4pIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gc2VsZWN0b3IKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgIChlbGVtZW50LCBzZWxlY3RvcikgPT4gZm4uYXBwbHkoZWxlbWVudCwgW3NlbGVjdG9yXSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF9tYXRjaGVzOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfSkpKCk7CiAgICAgICAgX3F1ZXJ5ID0gKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAqIEBwYXJhbSB7P30gc2VsZWN0b3IKICAgICAgICAgKiBAcGFyYW0gez99IG11bHRpCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAoZWxlbWVudCwgc2VsZWN0b3IsIG11bHRpKSA9PiB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHJlc3VsdHMgPSBbXTsKICAgICAgICAgICAgaWYgKG11bHRpKSB7CiAgICAgICAgICAgICAgICByZXN1bHRzLnB1c2goLi4uZWxlbWVudC5xdWVyeVNlbGVjdG9yQWxsKHNlbGVjdG9yKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBlbG0gPSBlbGVtZW50LnF1ZXJ5U2VsZWN0b3Ioc2VsZWN0b3IpOwogICAgICAgICAgICAgICAgaWYgKGVsbSkgewogICAgICAgICAgICAgICAgICAgIHJlc3VsdHMucHVzaChlbG0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiByZXN1bHRzOwogICAgICAgIH0pOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHByb3AKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGNvbnRhaW5zVmVuZG9yUHJlZml4KHByb3ApIHsKICAgICAgICAvLyBXZWJraXQgaXMgdGhlIG9ubHkgcmVhbCBwb3B1bGFyIHZlbmRvciBwcmVmaXggbm93YWRheXMKICAgICAgICAvLyBjYzogaHR0cDovL3Nob3VsZGlwcmVmaXguY29tLwogICAgICAgIHJldHVybiBwcm9wLnN1YnN0cmluZygxLCA2KSA9PSAnZWJraXQnOyAvLyB3ZWJraXQgb3IgV2Via2l0CiAgICB9CiAgICAvKiogQHR5cGUgez99ICovCiAgICBsZXQgX0NBQ0hFRF9CT0RZID0gbnVsbDsKICAgIC8qKiBAdHlwZSB7P30gKi8KICAgIGxldCBfSVNfV0VCS0lUID0gZmFsc2U7CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gcHJvcAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gdmFsaWRhdGVTdHlsZVByb3BlcnR5KHByb3ApIHsKICAgICAgICBpZiAoIV9DQUNIRURfQk9EWSkgewogICAgICAgICAgICBfQ0FDSEVEX0JPRFkgPSBnZXRCb2R5Tm9kZSgpIHx8IHt9OwogICAgICAgICAgICBfSVNfV0VCS0lUID0gKC8qKiBAdHlwZSB7P30gKi8gKF9DQUNIRURfQk9EWSkpLnN0eWxlID8gKCdXZWJraXRBcHBlYXJhbmNlJyBpbiAoLyoqIEB0eXBlIHs/fSAqLyAoX0NBQ0hFRF9CT0RZKSkuc3R5bGUpIDogZmFsc2U7CiAgICAgICAgfQogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgcmVzdWx0ID0gdHJ1ZTsKICAgICAgICBpZiAoKC8qKiBAdHlwZSB7P30gKi8gKF9DQUNIRURfQk9EWSkpLnN0eWxlICYmICFjb250YWluc1ZlbmRvclByZWZpeChwcm9wKSkgewogICAgICAgICAgICByZXN1bHQgPSBwcm9wIGluICgvKiogQHR5cGUgez99ICovIChfQ0FDSEVEX0JPRFkpKS5zdHlsZTsKICAgICAgICAgICAgaWYgKCFyZXN1bHQgJiYgX0lTX1dFQktJVCkgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgY2FtZWxQcm9wID0gJ1dlYmtpdCcgKyBwcm9wLmNoYXJBdCgwKS50b1VwcGVyQ2FzZSgpICsgcHJvcC5zdWJzdHIoMSk7CiAgICAgICAgICAgICAgICByZXN1bHQgPSBjYW1lbFByb3AgaW4gKC8qKiBAdHlwZSB7P30gKi8gKF9DQUNIRURfQk9EWSkpLnN0eWxlOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiByZXN1bHQ7CiAgICB9CiAgICAvKioKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGdldEJvZHlOb2RlKCkgewogICAgICAgIGlmICh0eXBlb2YgZG9jdW1lbnQgIT0gJ3VuZGVmaW5lZCcpIHsKICAgICAgICAgICAgcmV0dXJuIGRvY3VtZW50LmJvZHk7CiAgICAgICAgfQogICAgICAgIHJldHVybiBudWxsOwogICAgfQogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgbWF0Y2hlc0VsZW1lbnQgPSBfbWF0Y2hlczsKICAgIC8qKiBAdHlwZSB7P30gKi8KICAgIGNvbnN0IGNvbnRhaW5zRWxlbWVudCA9IF9jb250YWluczsKICAgIC8qKiBAdHlwZSB7P30gKi8KICAgIGNvbnN0IGludm9rZVF1ZXJ5ID0gX3F1ZXJ5OwogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IG9iamVjdAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gaHlwZW5hdGVQcm9wc09iamVjdChvYmplY3QpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgbmV3T2JqID0ge307CiAgICAgICAgT2JqZWN0LmtleXMob2JqZWN0KS5mb3JFYWNoKCgvKioKICAgICAgICAgKiBAcGFyYW0gez99IHByb3AKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHByb3AgPT4gewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG5ld1Byb3AgPSBwcm9wLnJlcGxhY2UoLyhbYS16XSkoW0EtWl0pL2csICckMS0kMicpOwogICAgICAgICAgICBuZXdPYmpbbmV3UHJvcF0gPSBvYmplY3RbcHJvcF07CiAgICAgICAgfSkpOwogICAgICAgIHJldHVybiBuZXdPYmo7CiAgICB9CgogICAgLyoqCiAgICAgKiBAZmlsZW92ZXJ2aWV3IGFkZGVkIGJ5IHRzaWNrbGUKICAgICAqIEdlbmVyYXRlZCBmcm9tOiBwYWNrYWdlcy9hbmltYXRpb25zL2Jyb3dzZXIvc3JjL3JlbmRlci9hbmltYXRpb25fZHJpdmVyLnRzCiAgICAgKiBAc3VwcHJlc3Mge2NoZWNrVHlwZXMsY29uc3RhbnRQcm9wZXJ0eSxleHRyYVJlcXVpcmUsbWlzc2luZ092ZXJyaWRlLG1pc3NpbmdSZXR1cm4sdW51c2VkUHJpdmF0ZU1lbWJlcnMsdXNlbGVzc0NvZGV9IGNoZWNrZWQgYnkgdHNjCiAgICAgKi8KICAgIC8qKgogICAgICogXEBwdWJsaWNBcGkKICAgICAqLwogICAgY2xhc3MgTm9vcEFuaW1hdGlvbkRyaXZlciB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBwcm9wCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB2YWxpZGF0ZVN0eWxlUHJvcGVydHkocHJvcCkgewogICAgICAgICAgICByZXR1cm4gdmFsaWRhdGVTdHlsZVByb3BlcnR5KHByb3ApOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgKiBAcGFyYW0gez99IHNlbGVjdG9yCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBtYXRjaGVzRWxlbWVudChlbGVtZW50LCBzZWxlY3RvcikgewogICAgICAgICAgICByZXR1cm4gbWF0Y2hlc0VsZW1lbnQoZWxlbWVudCwgc2VsZWN0b3IpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsbTEKICAgICAgICAgKiBAcGFyYW0gez99IGVsbTIKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGNvbnRhaW5zRWxlbWVudChlbG0xLCBlbG0yKSB7CiAgICAgICAgICAgIHJldHVybiBjb250YWluc0VsZW1lbnQoZWxtMSwgZWxtMik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAqIEBwYXJhbSB7P30gc2VsZWN0b3IKICAgICAgICAgKiBAcGFyYW0gez99IG11bHRpCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBxdWVyeShlbGVtZW50LCBzZWxlY3RvciwgbXVsdGkpIHsKICAgICAgICAgICAgcmV0dXJuIGludm9rZVF1ZXJ5KGVsZW1lbnQsIHNlbGVjdG9yLCBtdWx0aSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAqIEBwYXJhbSB7P30gcHJvcAogICAgICAgICAqIEBwYXJhbSB7Pz19IGRlZmF1bHRWYWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgY29tcHV0ZVN0eWxlKGVsZW1lbnQsIHByb3AsIGRlZmF1bHRWYWx1ZSkgewogICAgICAgICAgICByZXR1cm4gZGVmYXVsdFZhbHVlIHx8ICcnOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgKiBAcGFyYW0gez99IGtleWZyYW1lcwogICAgICAgICAqIEBwYXJhbSB7P30gZHVyYXRpb24KICAgICAgICAgKiBAcGFyYW0gez99IGRlbGF5CiAgICAgICAgICogQHBhcmFtIHs/fSBlYXNpbmcKICAgICAgICAgKiBAcGFyYW0gez89fSBwcmV2aW91c1BsYXllcnMKICAgICAgICAgKiBAcGFyYW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25zdCBtYXRjaGVzID0gdmFsdWUubWF0Y2goL14oLT9bXC5cZF0rKShtP3MpLyk7CiAgICAgICAgaWYgKCFtYXRjaGVzIHx8IG1hdGNoZXMubGVuZ3RoIDwgMikKICAgICAgICAgICAgcmV0dXJuIDA7CiAgICAgICAgcmV0dXJuIF9jb252ZXJ0VGltZVZhbHVlVG9NUyhwYXJzZUZsb2F0KG1hdGNoZXNbMV0pLCBtYXRjaGVzWzJdKTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICogQHBhcmFtIHs/fSB1bml0CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBfY29udmVydFRpbWVWYWx1ZVRvTVModmFsdWUsIHVuaXQpIHsKICAgICAgICBzd2l0Y2ggKHVuaXQpIHsKICAgICAgICAgICAgY2FzZSAncyc6CiAgICAgICAgICAgICAgICByZXR1cm4gdmFsdWUgKiBPTkVfU0VDT05EOwogICAgICAgICAgICBkZWZhdWx0OiAvLyBtcyBvciBzb21ldGhpbmcgZWxzZQogICAgICAgICAgICAgICAgcmV0dXJuIHZhbHVlOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB0aW1pbmdzCiAgICAgKiBAcGFyYW0gez99IGVycm9ycwogICAgICogQHBhcmFtIHs/PX0gYWxsb3dOZWdhdGl2ZVZhbHVlcwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gcmVzb2x2ZVRpbWluZyh0aW1pbmdzLCBlcnJvcnMsIGFsbG93TmVnYXRpdmVWYWx1ZXMpIHsKICAgICAgICByZXR1cm4gdGltaW5ncy5oYXNPd25Qcm9wZXJ0eSgnZHVyYXRpb24nKSA/CiAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovICh0aW1pbmdzKSkgOgogICAgICAgICAgICBwYXJzZVRpbWVFeHByZXNzaW9uKCgvKiogQHR5cGUgez99ICovICh0aW1pbmdzKSksIGVycm9ycywgYWxsb3dOZWdhdGl2ZVZhbHVlcyk7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gZXhwCiAgICAgKiBAcGFyYW0gez99IGVycm9ycwogICAgICogQHBhcmFtIHs/PX0gYWxsb3dOZWdhdGl2ZVZhbHVlcwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gcGFyc2VUaW1lRXhwcmVzc2lvbihleHAsIGVycm9ycywgYWxsb3dOZWdhdGl2ZVZhbHVlcykgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCByZWdleCA9IC9eKC0/W1wuXGRdKykobT9zKSg/OlxzKygtP1tcLlxkXSspKG0/cykpPyg/OlxzKyhbLWEtel0rKD86XCguKz9cKSk/KSk/JC9pOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgZHVyYXRpb247CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBkZWxheSA9IDA7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBlYXNpbmcgPSAnJzsKICAgICAgICBpZiAodHlwZW9mIGV4cCA9PT0gJ3N0cmluZycpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBtYXRjaGVzID0gZXhwLm1hdGNoKHJlZ2V4KTsKICAgICAgICAgICAgaWYgKG1hdGNoZXMgPT09IG51bGwpIHsKICAgICAgICAgICAgICAgIGVycm9ycy5wdXNoKGBUaGUgcHJvdmlkZWQgdGltaW5nIHZhbHVlICIke2V4cH0iIGlzIGludmFsaWQuYCk7CiAgICAgICAgICAgICAgICByZXR1cm4geyBkdXJhdGlvbjogMCwgZGVsYXk6IDAsIGVhc2luZzogJycgfTsKICAgICAgICAgICAgfQogICAgICAgICAgICBkdXJhdGlvbiA9IF9jb252ZXJ0VGltZVZhbHVlVG9NUyhwYXJzZUZsb2F0KG1hdGNoZXNbMV0pLCBtYXRjaGVzWzJdKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBkZWxheU1hdGNoID0gbWF0Y2hlc1szXTsKICAgICAgICAgICAgaWYgKGRlbGF5TWF0Y2ggIT0gbnVsbCkgewogICAgICAgICAgICAgICAgZGVsYXkgPSBfY29udmVydFRpbWVWYWx1ZVRvTVMocGFyc2VGbG9hdChkZWxheU1hdGNoKSwgbWF0Y2hlc1s0XSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBlYXNpbmdWYWwgPSBtYXRjaGVzWzVdOwogICAgICAgICAgICBpZiAoZWFzaW5nVmFsKSB7CiAgICAgICAgICAgICAgICBlYXNpbmcgPSBlYXNpbmdWYWw7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIGR1cmF0aW9uID0gZXhwOwogICAgICAgIH0KICAgICAgICBpZiAoIWFsbG93TmVnYXRpdmVWYWx1ZXMpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgY29udGFpbnNFcnJvcnMgPSBmYWxzZTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgc3RhcnRJbmRleCA9IGVycm9ycy5sZW5ndGg7CiAgICAgICAgICAgIGlmIChkdXJhdGlvbiA8IDApIHsKICAgICAgICAgICAgICAgIGVycm9ycy5wdXNoKGBEdXJhdGlvbiB2YWx1ZXMgYmVsb3cgMCBhcmUgbm90IGFsbG93ZWQgZm9yIHRoaXMgYW5pbWF0aW9uIHN0ZXAuYCk7CiAgICAgICAgICAgICAgICBjb250YWluc0Vycm9ycyA9IHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGRlbGF5IDwgMCkgewogICAgICAgICAgICAgICAgZXJyb3JzLnB1c2goYERlbGF5IHZhbHVlcyBiZWxvdyAwIGFyZSBub3QgYWxsb3dlZCBmb3IgdGhpcyBhbmltYXRpb24gc3RlcC5gKTsKICAgICAgICAgICAgICAgIGNvbnRhaW5zRXJyb3JzID0gdHJ1ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoY29udGFpbnNFcnJvcnMpIHsKICAgICAgICAgICAgICAgIGVycm9ycy5zcGxpY2Uoc3RhcnRJbmRleCwgMCwgYFRoZSBwcm92aWRlZCB0aW1pbmcgdmFsdWUgIiR7ZXhwfSIgaXMgaW52YWxpZC5gKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4geyBkdXJhdGlvbiwgZGVsYXksIGVhc2luZyB9OwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IG9iagogICAgICogQHBhcmFtIHs/PX0gZGVzdGluYXRpb24KICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGNvcHlPYmoob2JqLCBkZXN0aW5hdGlvbiA9IHt9KSB7CiAgICAgICAgT2JqZWN0LmtleXMob2JqKS5mb3JFYWNoKCgvKioKICAgICAgICAgKiBAcGFyYW0gez99IHByb3AKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHByb3AgPT4gewogICAgICAgICAgICBkZXN0aW5hdGlvbltwcm9wXSA9IG9ialtwcm9wXTsKICAgICAgICB9KSk7CiAgICAgICAgcmV0dXJuIGRlc3RpbmF0aW9uOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHN0eWxlcwogICAgICogQHBhcmFtIHs/fSByZWFkUHJvdG90eXBlCiAgICAgKiBAcGFyYW0gez89fSBkZXN0aW5hdGlvbgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gY29weVN0eWxlcyhzdHlsZXMsIHJlYWRQcm90b3R5cGUsIGRlc3RpbmF0aW9uID0ge30pIHsKICAgICAgICBpZiAocmVhZFByb3RvdHlwZSkgewogICAgICAgICAgICAvLyB3ZSBtYWtlIHVzZSBvZiBhIGZvci1pbiBsb29wIHNvIHRoYXQgdGhlCiAgICAgICAgICAgIC8vIHByb3RvdHlwaWNhbGx5IGluaGVyaXRlZCBwcm9wZXJ0aWVzIGFyZQogICAgICAgICAgICAvLyByZXZlYWxlZCBmcm9tIHRoZSBiYWNrRmlsbCBtYXAKICAgICAgICAgICAgZm9yIChsZXQgcHJvcCBpbiBzdHlsZXMpIHsKICAgICAgICAgICAgICAgIGRlc3RpbmF0aW9uW3Byb3BdID0gc3R5bGVzW3Byb3BdOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICBjb3B5T2JqKHN0eWxlcywgZGVzdGluYXRpb24pOwogICAgICAgIH0KICAgICAgICByZXR1cm4gZGVzdGluYXRpb247CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICogQHBhcmFtIHs/fSBrZXkKICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGdldFN0eWxlQXR0cmlidXRlU3RyaW5nKGVsZW1lbnQsIGtleSwgdmFsdWUpIHsKICAgICAgICAvLyBSZXR1cm4gdGhlIGtleS12YWx1ZSBwYWlyIHN0cmluZyB0byBiZSBhZGRlZCB0byB0aGUgc3R5bGUgYXR0cmlidXRlIGZvciB0aGUKICAgICAgICAvLyBnaXZlbiBDU1Mgc3R5bGUga2V5LgogICAgICAgIGlmICh2YWx1ZSkgewogICAgICAgICAgICByZXR1cm4ga2V5ICsgJzonICsgdmFsdWUgKyAnOyc7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICByZXR1cm4gJyc7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ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IHsKICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZGFzaEtleSA9IGNhbWVsQ2FzZVRvRGFzaENhc2UkMShrZXkpOwogICAgICAgICAgICBzdHlsZUF0dHJWYWx1ZSArPSBnZXRTdHlsZUF0dHJpYnV0ZVN0cmluZyhlbGVtZW50LCBkYXNoS2V5LCBlbGVtZW50LnN0eWxlW2tleV0pOwogICAgICAgIH0KICAgICAgICBlbGVtZW50LnNldEF0dHJpYnV0ZSgnc3R5bGUnLCBzdHlsZUF0dHJWYWx1ZSk7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICogQHBhcmFtIHs/fSBzdHlsZXMKICAgICAqIEBwYXJhbSB7Pz19IGZvcm1lclN0eWxlcwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gc2V0U3R5bGVzKGVsZW1lbnQsIHN0eWxlcywgZm9ybWVyU3R5bGVzKSB7CiAgICAgICAgaWYgKGVsZW1lbnRbJ3N0eWxlJ10pIHsKICAgICAgICAgICAgT2JqZWN0LmtleXMoc3R5bGVzKS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwcm9wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBwcm9wID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGNhbWVsUHJvcCA9IGRhc2hDYXNlVG9DYW1lbENhc2UocHJvcCk7CiAgICAgICAgICAgICAgICBpZiAoZm9ybWVyU3R5bGVzICYmICFmb3JtZXJTdHlsZXMuaGFzT3duUHJvcGVydHkocHJvcCkpIHsKICAgICAgICAgICAgICAgICAgICBmb3JtZXJTdHlsZXNbcHJvcF0gPSBlbGVtZW50LnN0eWxlW2NhbWVsUHJvcF07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbGVtZW50LnN0eWxlW2NhbWVsUHJvcF0gPSBzdHlsZXNbcHJvcF07CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgLy8gT24gdGhlIHNlcnZlciBzZXQgdGhlICdzdHlsZScgYXR0cmlidXRlIHNpbmNlIGl0J3Mgbm90IGF1dG9tYXRpY2FsbHkgcmVmbGVjdGVkLgogICAgICAgICAgICBpZiAoaXNOb2RlKCkpIHsKICAgICAgICAgICAgICAgIHdyaXRlU3R5bGVBdHRyaWJ1dGUoZWxlbWVudCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICogQHBhcmFtIHs/fSBzdHlsZXMKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGVyYXNlU3R5bGVzKGVsZW1lbnQsIHN0eWxlcykgewogICAgICAgIGlmIChlbGVtZW50WydzdHlsZSddKSB7CiAgICAgICAgICAgIE9iamVjdC5rZXlzKHN0eWxlcykuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcHJvcAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgcHJvcCA9PiB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBjYW1lbFByb3AgPSBkYXNoQ2FzZVRvQ2FtZWxDYXNlKHByb3ApOwogICAgICAgICAgICAgICAgZWxlbWVudC5zdHlsZVtjYW1lbFByb3BdID0gJyc7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgLy8gT24gdGhlIHNlcnZlciBzZXQgdGhlICdzdHlsZScgYXR0cmlidXRlIHNpbmNlIGl0J3Mgbm90IGF1dG9tYXRpY2FsbHkgcmVmbGVjdGVkLgogICAgICAgICAgICBpZiAoaXNOb2RlKCkpIHsKICAgICAgICAgICAgICAgIHdyaXRlU3R5bGVBdHRyaWJ1dGUoZWxlbWVudCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gc3RlcHMKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIG5vcm1hbGl6ZUFuaW1hdGlvbkVudHJ5KHN0ZXBzKSB7CiAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoc3RlcHMpKSB7CiAgICAgICAgICAgIGlmIChzdGVwcy5sZW5ndGggPT0gMSkKICAgICAgICAgICAgICAgIHJldHVybiBzdGVwc1swXTsKICAgICAgICAgICAgcmV0dXJuIHNlcXVlbmNlKHN0ZXBzKTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovIChzdGVwcykpOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgKiBAcGFyYW0gez99IG9wdGlvbnMKICAgICAqIEBwYXJhbSB7P30gZXJyb3JzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiB2YWxpZGF0ZVN0eWxlUGFyYW1zKHZhbHVlLCBvcHRpb25zLCBlcnJvcnMpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgcGFyYW1zID0gb3B0aW9ucy5wYXJhbXMgfHwge307CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IG1hdGNoZXMgPSBleHRyYWN0U3R5bGVQYXJhbXModmFsdWUpOwogICAgICAgIGlmIChtYXRjaGVzLmxlbmd0aCkgewogICAgICAgICAgICBtYXRjaGVzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHZhck5hbWUKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHZhck5hbWUgPT4gewogICAgICAgICAgICAgICAgaWYgKCFwYXJhbXMuaGFzT3duUHJvcGVydHkodmFyTmFtZSkpIHsKICAgICAgICAgICAgICAgICAgICBlcnJvcnMucHVzaChgVW5hYmxlIHRvIHJlc29sdmUgdGhlIGxvY2FsIGFuaW1hdGlvbiBwYXJhbSAke3Zhck5hbWV9IGluIHRoZSBnaXZlbiBsaXN0IG9mIHZhbHVlc2ApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgfQogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgUEFSQU1fUkVHRVggPSBuZXcgUmVnRXhwKGAke1NVQlNUSVRVVElPTl9FWFBSX1NUQVJUfVxccyooLis/KVxccyoke1NVQlNUSVRVVElPTl9FWFBSX0VORH1gLCAnZycpOwogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBleHRyYWN0U3R5bGVQYXJhbXModmFsdWUpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IHBhcmFtcyA9IFtdOwogICAgICAgIGlmICh0eXBlb2YgdmFsdWUgPT09ICdzdHJpbmcnKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IG1hdGNoOwogICAgICAgICAgICB3aGlsZSAobWF0Y2ggPSBQQVJBTV9SRUdFWC5leGVjKHZhbHVlKSkgewogICAgICAgICAgICAgICAgcGFyYW1zLnB1c2goKC8qKiBAdHlwZSB7P30gKi8gKG1hdGNoWzFdKSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIFBBUkFNX1JFR0VYLmxhc3RJbmRleCA9IDA7CiAgICAgICAgfQogICAgICAgIHJldHVybiBwYXJhbXM7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAqIEBwYXJhbSB7P30gcGFyYW1zCiAgICAgKiBAcGFyYW0gez99IGVycm9ycwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gaW50ZXJwb2xhdGVQYXJhbXModmFsdWUsIHBhcmFtcywgZXJyb3JzKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IG9yaWdpbmFsID0gdmFsdWUudG9TdHJpbmcoKTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3Qgc3RyID0gb3JpZ2luYWwucmVwbGFjZShQQVJBTV9SRUdFWCwgKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gXwogICAgICAgICAqIEBwYXJhbSB7P30gdmFyTmFtZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgKF8sIHZhck5hbWUpID0+IHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgbG9jYWxWYWwgPSBwYXJhbXNbdmFyTmFtZV07CiAgICAgICAgICAgIC8vIHRoaXMgbWVhbnMgdGhhdCB0aGUgdmFsdWUgd2FzIG5ldmVyIG92ZXJyaWRkZW4gYnkgdGhlIGRhdGEgcGFzc2VkIGluIGJ5IHRoZSB1c2VyCiAgICAgICAgICAgIGlmICghcGFyYW1zLmhhc093blByb3BlcnR5KHZhck5hbWUpKSB7CiAgICAgICAgICAgICAgICBlcnJvcnMucHVzaChgUGxlYXNlIHByb3ZpZGUgYSB2YWx1ZSBmb3IgdGhlIGFuaW1hdGlvbiBwYXJhbSAke3Zhck5hbWV9YCk7CiAgICAgICAgICAgICAgICBsb2NhbFZhbCA9ICcnOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBsb2NhbFZhbC50b1N0cmluZygpOwogICAgICAgIH0pKTsKICAgICAgICAvLyB3ZSBkbyB0aGlzIHRvIGFzc2VydCB0aGF0IG51bWVyaWMgdmFsdWVzIHN0YXkgYXMgdGhleSBhcmUKICAgICAgICByZXR1cm4gc3RyID09IG9yaWdpbmFsID8gdmFsdWUgOiBzdHI7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gaXRlcmF0b3IKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGl0ZXJhdG9yVG9BcnJheShpdGVyYXRvcikgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBhcnIgPSBbXTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IGl0ZW0gPSBpdGVyYXRvci5uZXh0KCk7CiAgICAgICAgd2hpbGUgKCFpdGVtLmRvbmUpIHsKICAgICAgICAgICAgYXJyLnB1c2goaXRlbS52YWx1ZSk7CiAgICAgICAgICAgIGl0ZW0gPSBpdGVyYXRvci5uZXh0KCk7CiAgICAgICAgfQogICAgICAgIHJldHVybiBhcnI7CiAgICB9CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBEQVNIX0NBU0VfUkVHRVhQID0gLy0rKFthLXowLTldKS9nOwogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IGlucHV0CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBkYXNoQ2FzZVRvQ2FtZWxDYXNlKGlucHV0KSB7CiAgICAgICAgcmV0dXJuIGlucHV0LnJlcGxhY2UoREFTSF9DQVNFX1JFR0VYUCwgKC8qKgogICAgICAgICAqIEBwYXJhbSB7Li4uP30gbQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgKC4uLm0pID0+IG1bMV0udG9VcHBlckNhc2UoKSkpOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IGlucHV0CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBjYW1lbENhc2VUb0Rhc2hDYXNlJDEoaW5wdXQpIHsKICAgICAgICByZXR1cm4gaW5wdXQucmVwbGFjZSgvKFthLXpdKShbQS1aXSkvZywgJyQxLSQyJykudG9Mb3dlckNhc2UoKTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBkdXJhdGlvbgogICAgICogQHBhcmFtIHs/fSBkZWxheQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gYWxsb3dQcmV2aW91c1BsYXllclN0eWxlc01lcmdlKGR1cmF0aW9uLCBkZWxheSkgewogICAgICAgIHJldHVybiBkdXJhdGlvbiA9PT0gMCB8fCBkZWxheSA9PT0gMDsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgKiBAcGFyYW0gez99IGtleWZyYW1lcwogICAgICogQHBhcmFtIHs/fSBwcmV2aW91c1N0eWxlcwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gYmFsYW5jZVByZXZpb3VzU3R5bGVzSW50b0tleWZyYW1lcyhlbGVtZW50LCBrZXlmcmFtZXMsIHByZXZpb3VzU3R5bGVzKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHByZXZpb3VzU3R5bGVQcm9wcyA9IE9iamVjdC5rZXlzKHByZXZpb3VzU3R5bGVzKTsKICAgICAgICBpZiAocHJldmlvdXNTdHlsZVByb3BzLmxlbmd0aCAmJiBrZXlmcmFtZXMubGVuZ3RoKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHN0YXJ0aW5nS2V5ZnJhbWUgPSBrZXlmcmFtZXNbMF07CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IG1pc3NpbmdTdHlsZVByb3BzID0gW107CiAgICAgICAgICAgIHByZXZpb3VzU3R5bGVQcm9wcy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwcm9wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBwcm9wID0+IHsKICAgICAgICAgICAgICAgIGlmICghc3RhcnRpbmdLZXlmcmFtZS5oYXNPd25Qcm9wZXJ0eShwcm9wKSkgewogICAgICAgICAgICAgICAgICAgIG1pc3NpbmdTdHlsZVByb3BzLnB1c2gocHJvcCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBzdGFydGluZ0tleWZyYW1lW3Byb3BdID0gcHJldmlvdXNTdHlsZXNbcHJvcF07CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgaWYgKG1pc3NpbmdTdHlsZVByb3BzLmxlbmd0aCkgewogICAgICAgICAgICAgICAgLy8gdHNsaW50OmRpc2FibGUtbmV4dC1saW5lCiAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMTsgaSA8IGtleWZyYW1lcy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBsZXQga2YgPSBrZXlmcmFtZXNbaV07CiAgICAgICAgICAgICAgICAgICAgbWlzc2luZ1N0eWxlUHJvcHMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwcm9wCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiAocHJvcCkgewogICAgICAgICAgICAgICAgICAgICAgICBrZltwcm9wXSA9IGNvbXB1dGVTdHlsZShlbGVtZW50LCBwcm9wKTsKICAgICAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIGtleWZyYW1lczsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB2aXNpdG9yCiAgICAgKiBAcGFyYW0gez99IG5vZGUKICAgICAqIEBwYXJhbSB7P30gY29udGV4dAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gdmlzaXREc2xOb2RlKHZpc2l0b3IsIG5vZGUsIGNvbnRleHQpIHsKICAgICAgICBzd2l0Y2ggKG5vZGUudHlwZSkgewogICAgICAgICAgICBjYXNlIDcgLyogVHJpZ2dlciAqLzoKICAgICAgICAgICAgICAgIHJldHVybiB2aXNpdG9yLnZpc2l0VHJpZ2dlcihub2RlLCBjb250ZXh0KTsKICAgICAgICAgICAgY2FzZSAwIC8qIFN0YXRlICovOgogICAgICAgICAgICAgICAgcmV0dXJuIHZpc2l0b3IudmlzaXRTdGF0ZShub2RlLCBjb250ZXh0KTsKICAgICAgICAgICAgY2FzZSAxIC8qIFRyYW5zaXRpb24gKi86CiAgICAgICAgICAgICAgICByZXR1cm4gdmlzaXRvci52aXNpdFRyYW5zaXRpb24obm9kZSwgY29udGV4dCk7CiAgICAgICAgICAgIGNhc2UgMiAvKiBTZXF1ZW5jZSAqLzoKICAgICAgICAgICAgICAgIHJldHVybiB2aXNpdG9yLnZpc2l0U2VxdWVuY2Uobm9kZSwgY29udGV4dCk7CiAgICAgICAgICAgIGNhc2UgMyAvKiBHcm91cCAqLzoKICAgICAgICAgICAgICAgIHJldHVybiB2aXNpdG9yLnZpc2l0R3JvdXAobm9kZSwgY29udGV4dCk7CiAgICAgICAgICAgIGNhc2UgNCAvKiBBbmltYXRlICovOgogICAgICAgICAgICAgICAgcmV0dXJuIHZpc2l0b3IudmlzaXRBbmltYXRlKG5vZGUsIGNvbnRleHQpOwogICAgICAgICAgICBjYXNlIDUgLyogS2V5ZnJhbWVzICovOgogICAgICAgICAgICAgICAgcmV0dXJuIHZpc2l0b3IudmlzaXRLZXlmcmFtZXMobm9kZSwgY29udGV4dCk7CiAgICAgICAgICAgIGNhc2UgNiAvKiBTdHlsZSAqLzoKICAgICAgICAgICAgICAgIHJldHVybiB2aXNpdG9yLnZpc2l0U3R5bGUobm9kZSwgY29udGV4dCk7CiAgICAgICAgICAgIGNhc2UgOCAvKiBSZWZlcmVuY2UgKi86CiAgICAgICAgICAgICAgICByZXR1cm4gdmlzaXRvci52aXNpdFJlZmVyZW5jZShub2RlLCBjb250ZXh0KTsKICAgICAgICAgICAgY2FzZSA5IC8qIEFuaW1hdGVDaGlsZCAqLzoKICAgICAgICAgICAgICAgIHJldHVybiB2aXNpdG9yLnZpc2l0QW5pbWF0ZUNoaWxkKG5vZGUsIGNvbnRleHQpOwogICAgICAgICAgICBjYXNlIDEwIC8qIEFuaW1hdGVSZWYgKi86CiAgICAgICAgICAgICAgICByZXR1cm4gdmlzaXRvci52aXNpdEFuaW1hdGVSZWYobm9kZSwgY29udGV4dCk7CiAgICAgICAgICAgIGNhc2UgMTEgLyogUXVlcnkgKi86CiAgICAgICAgICAgICAgICByZXR1cm4gdmlzaXRvci52aXNpdFF1ZXJ5KG5vZGUsIGNvbnRleHQpOwogICAgICAgICAgICBjYXNlIDEyIC8qIFN0YWdnZXIgKi86CiAgICAgICAgICAgICAgICByZXR1cm4gdmlzaXRvci52aXNpdFN0YWdnZXIobm9kZSwgY29udGV4dCk7CiAgICAgICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYFVuYWJsZSB0byByZXNvbHZlIGFuaW1hdGlvbiBtZXRhZGF0YSBub2RlICMke25vZGUudHlwZX1gKTsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICogQHBhcmFtIHs/fSBwcm9wCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBjb21wdXRlU3R5bGUoZWxlbWVudCwgcHJvcCkgewogICAgICAgIHJldHVybiAoKC8qKiBAdHlwZSB7P30gKi8gKHdpbmRvdy5nZXRDb21wdXRlZFN0eWxlKGVsZW1lbnQpKSkpW3Byb3BdOwogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZG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RWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gc3RyCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBzdHIgPT4gcGFyc2VJbm5lclRyYW5zaXRpb25TdHIoc3RyLCBleHByZXNzaW9ucywgZXJyb3JzKSkpOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgZXhwcmVzc2lvbnMucHVzaCgoLyoqIEB0eXBlIHs/fSAqLyAodHJhbnNpdGlvblZhbHVlKSkpOwogICAgICAgIH0KICAgICAgICByZXR1cm4gZXhwcmVzc2lvbnM7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gZXZlbnRTdHIKICAgICAqIEBwYXJhbSB7P30gZXhwcmVzc2lvbnMKICAgICAqIEBwYXJhbSB7P30gZXJyb3JzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBwYXJzZUlubmVyVHJhbnNpdGlvblN0cihldmVudFN0ciwgZXhwcmVzc2lvbnMsIGVycm9ycykgewogICAgICAgIGlmIChldmVudFN0clswXSA9PSAnOicpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCByZXN1bHQgPSBwYXJzZUFuaW1hdGlvbkFsaWFzKGV2ZW50U3RyLCBlcnJvcnMpOwogICAgICAgICAgICBpZiAodHlwZW9mIHJlc3VsdCA9PSAnZnVuY3Rpb24nKSB7CiAgICAgICAgICAgICAgICBleHByZXNzaW9ucy5wdXNoKHJlc3VsdCk7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZXZlbnRTdHIgPSByZXN1bHQ7CiAgICAgICAgfQogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBtYXRjaCA9IGV2ZW50U3RyLm1hdGNoKC9eKFwqfFstXHddKylccyooPD9bPS1dPilccyooXCp8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IHsKICAgICAgICBzd2l0Y2ggKGFsaWFzKSB7CiAgICAgICAgICAgIGNhc2UgJzplbnRlcic6CiAgICAgICAgICAgICAgICByZXR1cm4gJ3ZvaWQgPT4gKic7CiAgICAgICAgICAgIGNhc2UgJzpsZWF2ZSc6CiAgICAgICAgICAgICAgICByZXR1cm4gJyogPT4gdm9pZCc7CiAgICAgICAgICAgIGNhc2UgJzppbmNyZW1lbnQnOgogICAgICAgICAgICAgICAgcmV0dXJuICgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZnJvbVN0YXRlCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHRvU3RhdGUKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChmcm9tU3RhdGUsIHRvU3RhdGUpID0+IHBhcnNlRmxvYXQodG9TdGF0ZSkgPiBwYXJzZUZsb2F0KGZyb21TdGF0ZSkpOwogICAgICAgICAgICBjYXNlICc6ZGVjcmVtZW50JzoKICAgICAgICAgICAgICAgIHJldHVybiAoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGZyb21TdGF0ZQogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSB0b1N0YXRlCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoZnJvbVN0YXRlLCB0b1N0YXRlKSA9PiBwYXJzZUZsb2F0KHRvU3RhdGUpIDwgcGFyc2VGbG9hdChmcm9tU3RhdGUpKTsKICAgICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgICAgIGVycm9ycy5wdXNoKGBUaGUgdHJhbnNpdGlvbiBhbGlhcyB2YWx1ZSAiJHthbGlhc30iIGlzIG5vdCBzdXBwb3J0ZWRgKTsKICAgICAgICAgICAgICAgIHJldHVybiAnKiA9PiAqJzsKICAgICAgICB9CiAgICB9CiAgICAvLyBETyBOT1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zdEJ1aWxkZXJWaXNpdG9yKGRyaXZlcikuYnVpbGQobWV0YWRhdGEsIGVycm9ycyk7CiAgICB9CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBST09UX1NFTEVDVE9SID0gJyc7CiAgICBjbGFzcyBBbmltYXRpb25Bc3RCdWlsZGVyVmlzaXRvciB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBfZHJpdmVyCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoX2RyaXZlcikgewogICAgICAgICAgICB0aGlzLl9kcml2ZXIgPSBfZHJpdmVyOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IG1ldGFkYXRhCiAgICAgICAgICogQHBhcmFtIHs/fSBlcnJvcnMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGJ1aWxkKG1ldGFkYXRhLCBlcnJvcnMpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjb250ZXh0ID0gbmV3IEFuaW1hdGlvbkFzdEJ1aWxkZXJDb250ZXh0KGVycm9ycyk7CiAgICAgICAgICAgIHRoaXMuX3Jlc2V0Q29udGV4dFN0eWxlVGltaW5nU3RhdGUoY29udGV4dCk7CiAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAodmlzaXREc2xOb2RlKHRoaXMsIG5vcm1hbGl6ZUFuaW1hdGlvbkVudHJ5KG1ldGFkYXRhKSwgY29udGV4dCkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGNvbnRleHQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9yZXNldENvbnRleHRTdHlsZVRpbWluZ1N0YXRlKGNvbnRleHQpIHsKICAgICAgICAgICAgY29udGV4dC5jdXJyZW50UXVlcnlTZWxlY3RvciA9IFJPT1RfU0VMRUNUT1I7CiAgICAgICAgICAgIGNvbnRleHQuY29sbGVjdGVkU3R5bGVzID0ge307CiAgICAgICAgICAgIGNvbnRleHQuY29sbGVjdGVkU3R5bGVzW1JPT1RfU0VMRUNUT1JdID0ge307CiAgICAgICAgICAgIGNvbnRleHQuY3VycmVudFRpbWUgPSAwOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IG1ldGFkYXRhCiAgICAgICAgICogQHBhcmFtIHs/fSBjb250ZXh0CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB2aXNpdFRyaWdnZXIobWV0YWRhdGEsIGNvbnRleHQpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgcXVlcnlDb3VudCA9IGNvbnRleHQucXVlcnlDb3VudCA9IDA7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGRlcENvdW50ID0gY29udGV4dC5kZXBDb3VudCA9IDA7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc3RhdGVzID0gW107CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdHJhbnNpdGlvbnMgPSBbXTsKICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUuY2hhckF0KDApID09ICdAJykgewogICAgICAgICAgICAgICAgY29udGV4dC5lcnJvcnMucHVzaCgnYW5pbWF0aW9uIHRyaWdnZXJzIGNhbm5vdCBiZSBwcmVmaXhlZCB3aXRoIGFuIGBAYCBzaWduIChlLmcuIHRyaWdnZXIoXCdAZm9vXCcsIFsuLi5dKSknKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBtZXRhZGF0YS5kZWZpbml0aW9ucy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBkZWYKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGRlZiA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLl9yZXNldENvbnRleHRTdHlsZVRpbWluZ1N0YXRlKGNvbnRleHQpOwogICAgICAgICAgICAgICAgaWYgKGRlZi50eXBlID09IDAgLyogU3RhdGUgKi8pIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3RhdGVEZWYgPSAoLyoqIEB0eXBlIHs/fSAqLyAoZGVmKSk7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IG5hbWUgPSBzdGF0ZURlZi5uYW1lOwogICAgICAgICAgICAgICAgICAgIG5hbWUudG9TdHJpbmcoKS5zcGxpdCgvXHMqLFxzKi8pLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbgogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgbiA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRlRGVmLm5hbWUgPSBuOwogICAgICAgICAgICAgICAgICAgICAgICBzdGF0ZXMucHVzaCh0aGlzLnZpc2l0U3RhdGUoc3RhdGVEZWYsIGNvbnRleHQpKTsKICAgICAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICAgICAgc3RhdGVEZWYubmFtZSA9IG5hbWU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmIChkZWYudHlwZSA9PSAxIC8qIFRyYW5zaXRpb24gKi8pIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgdHJhbnNpdGlvbiA9IHRoaXMudmlzaXRUcmFuc2l0aW9uKCgvKiogQHR5cGUgez99ICovIChkZWYpKSwgY29udGV4dCk7CiAgICAgICAgICAgICAgICAgICAgcXVlcnlDb3VudCArPSB0cmFuc2l0aW9uLnF1ZXJ5Q291bnQ7CiAgICAgICAgICAgICAgICAgICAgZGVwQ291bnQgKz0gdHJhbnNpdGlvbi5kZXBDb3VudDsKICAgICAgICAgICAgICAgICAgICB0cmFuc2l0aW9ucy5wdXNoKHRyYW5zaXRpb24pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgY29udGV4dC5lcnJvcnMucHVzaCgnb25seSBzdGF0ZSgpIGFuZCB0cmFuc2l0aW9uKCkgZGVmaW5pdGlvbnMgY2FuIHNpdCBpbnNpZGUgb2YgYSB0cmlnZ2VyKCknKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSkpOwogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgdHlwZTogNyAvKiBUcmlnZ2VyICovLAogICAgICAgICAgICAgICAgbmFtZTogbWV0YWRhdGEubmFtZSwKICAgICAgICAgICAgICAgIHN0YXRlcywKICAgICAgICAgICAgICAgIHRyYW5zaXRpb25zLAogICAgICAgICAgICAgICAgcXVlcnlDb3VudCwKICAgICAgICAgICAgICAgIGRlcENvdW50LAogICAgICAgICAgICAgICAgb3B0aW9uczogbnVsbAogICAgICAgICAgICB9OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IG1ldGFkYXRhCiAgICAgICAgICogQHBhcmFtIHs/fSBjb250ZXh0CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB2aXNpdFN0YXRlKG1ldGFkYXRhLCBjb250ZXh0KSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc3R5bGVBc3QgPSB0aGlzLnZpc2l0U3R5bGUobWV0YWRhdGEuc3R5bGVzLCBjb250ZXh0KTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBhc3RQYXJhbXMgPSAobWV0YWRhdGEub3B0aW9ucyAmJiBtZXRhZGF0YS5vcHRpb25zLnBhcmFtcykgfHwgbnVsbDsKICAgICAgICAgICAgaWYgKHN0eWxlQXN0LmNvbnRhaW5zRHluYW1pY1N0eWxlcykgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgbWlzc2luZ1N1YnMgPSBuZXcgU2V0KCk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBwYXJhbXMgPSBhc3RQYXJhbXMgfHwge307CiAgICAgICAgICAgICAgICBzdHlsZUFzdC5zdHlsZXMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICB2YWx1ZSA9PiB7CiAgICAgICAgICAgICAgICAgICAgaWYgKGlzT2JqZWN0JDEodmFsdWUpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3R5bGVzT2JqID0gKC8qKiBAdHlwZSB7P30gKi8gKHZhbHVlKSk7CiAgICAgICAgICAgICAgICAgICAgICAgIE9iamVjdC5rZXlzKHN0eWxlc09iaikuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcHJvcAogICAgICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAgICAgcHJvcCA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYWN0U3R5bGVQYXJhbXMoc3R5bGVzT2JqW3Byb3BdKS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gc3ViCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdWIgPT4gewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghcGFyYW1zLmhhc093blByb3BlcnR5KHN1YikpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWlzc2luZ1N1YnMuYWRkKHN1Yik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgaWYgKG1pc3NpbmdTdWJzLnNpemUpIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgbWlzc2luZ1N1YnNBcnIgPSBpdGVyYXRvclRvQXJyYXkobWlzc2luZ1N1YnMudmFsdWVzKCkpOwogICAgICAgICAgICAgICAgICAgIGNvbnRleHQuZXJyb3JzLnB1c2goYHN0YXRlKCIke21ldGFkYXRhCiAgICAgICAgICAgICAgICAgICAgLm5hbWV9IiwgLi4uKSBtdXN0IGRlZmluZSBkZWZhdWx0IHZhbHVlcyBmb3IgYWxsIHRoZSBmb2xsb3dpbmcgc3R5bGUgc3Vic3RpdHV0aW9uczogJHttaXNzaW5nU3Vic0Fyci5qb2luKCcsICcpfWApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICB0eXBlOiAwIC8qIFN0YXRlICovLAogICAgICAgICAgICAgICAgbmFtZTogbWV0YWRhdGEubmFtZSwKICAgICAgICAgICAgICAgIHN0eWxlOiBzdHlsZUFzdCwKICAgICAgICAgICAgICAgIG9wdGlvbnM6IGFzdFBhcmFtcyA/IHsgcGFyYW1zOiBhc3RQYXJhbXMgfSA6IG51bGwKICAgICAgICAgICAgfTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBtZXRhZGF0YQogICAgICAgICAqIEBwYXJhbSB7P30gY29udGV4dAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdmlzaXRUcmFuc2l0aW9uKG1ldGFkYXRhLCBjb250ZXh0KSB7CiAgICAgICAgICAgIGNvbnRleHQucXVlcnlDb3VudCA9IDA7CiAgICAgICAgICAgIGNvbnRleHQuZGVwQ291bnQgPSAwOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGFuaW1hdGlvbiA9IHZpc2l0RHNsTm9kZSh0aGlzLCBub3JtYWxpemVBbmltYXRpb25FbnRyeShtZXRhZGF0YS5hbmltYXRpb24pLCBjb250ZXh0KTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBtYXRjaGVycyA9IHBhcnNlVHJhbnNpdGlvbkV4cHIobWV0YWRhdGEuZXhwciwgY29udGV4dC5lcnJvcnMpOwogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgdHlwZTogMSAvKiBUcmFuc2l0aW9uICovLAogICAgICAgICAgICAgICAgbWF0Y2hlcnMsCiAgICAgICAgICAgICAgICBhbmltYXRpb24sCiAgICAgICAgICAgICAgICBxdWVyeUNvdW50OiBjb250ZXh0LnF1ZXJ5Q291bnQsCiAgICAgICAgICAgICAgICBkZXBDb3VudDogY29udGV4dC5kZXBDb3VudCwKICAgICAgICAgICAgICAgIG9wdGlvbnM6IG5vcm1hbGl6ZUFuaW1hdGlvbk9wdGlvbnMobWV0YWRhdGEub3B0aW9ucykKICAgICAgICAgICAgfTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBtZXRhZGF0YQogICAgICAgICAqIEBwYXJhbSB7P30gY29udGV4dAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdmlzaXRTZXF1ZW5jZShtZXRhZGF0YSwgY29udGV4dCkgewogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgdHlwZTogMiAvKiBTZXF1ZW5jZSAqLywKICAgICAgICAgICAgICAgIHN0ZXBzOiBtZXRhZGF0YS5zdGVwcy5tYXAoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBzCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBzID0+IHZpc2l0RHNsTm9kZSh0aGlzLCBzLCBjb250ZXh0KSkpLAogICAgICAgICAgICAgICAgb3B0aW9uczogbm9ybWFsaXplQW5pbWF0aW9uT3B0aW9ucyhtZXRhZGF0YS5vcHRpb25zKQogICAgICAgICAgICB9OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IG1ldGFkYXRhCiAgICAgICAgICogQHBhcmFtIHs/fSBjb250ZXh0CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB2aXNpdEdyb3VwKG1ldGFkYXRhLCBjb250ZXh0KSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgY3VycmVudFRpbWUgPSBjb250ZXh0LmN1cnJlbnRUaW1lOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBmdXJ0aGVzdFRpbWUgPSAwOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHN0ZXBzID0gbWV0YWRhdGEuc3RlcHMubWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBzdGVwCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBzdGVwID0+IHsKICAgICAgICAgICAgICAgIGNvbnRleHQuY3VycmVudFRpbWUgPSBjdXJyZW50VGltZTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGlubmVyQXN0ID0gdmlzaXREc2xOb2RlKHRoaXMsIHN0ZXAsIGNvbnRleHQpOwogICAgICAgICAgICAgICAgZnVydGhlc3RUaW1lID0gTWF0aC5tYXgoZnVydGhlc3RUaW1lLCBjb250ZXh0LmN1cnJlbnRUaW1lKTsKICAgICAgICAgICAgICAgIHJldHVybiBpbm5lckFzdDsKICAgICAgICAgICAgfSkpOwogICAgICAgICAgICBjb250ZXh0LmN1cnJlbnRUaW1lID0gZnVydGhlc3RUaW1lOwogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgdHlwZTogMyAvKiBHcm91cCAqLywKICAgICAgICAgICAgICAgIHN0ZXBzLAogICAgICAgICAgICAgICAgb3B0aW9uczogbm9ybWFsaXplQW5pbWF0aW9uT3B0aW9ucyhtZXRhZGF0YS5vcHRpb25zKQogICAgICAgICAgICB9OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IG1ldGFkYXRhCiAgICAgICAgICogQHBhcmFtIHs/fSBjb250ZXh0CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB2aXNpdEFuaW1hdGUobWV0YWRhdGEsIGNvbnRleHQpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB0aW1pbmdBc3QgPSBjb25zdHJ1Y3RUaW1pbmdBc3QobWV0YWRhdGEudGltaW5ncywgY29udGV4dC5lcnJvcnMpOwogICAgICAgICAgICBjb250ZXh0LmN1cnJlbnRBbmltYXRlVGltaW5ncyA9IHRpbWluZ0FzdDsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgc3R5bGVBc3Q7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHN0eWxlTWV0YWRhdGEgPSBtZXRhZGF0YS5zdHlsZXMgPyBtZXRhZGF0YS5zdHlsZXMgOiBzdHlsZSh7fSk7CiAgICAgICAgICAgIGlmIChzdHlsZU1ldGFkYXRhLnR5cGUgPT0gNSAvKiBLZXlmcmFtZXMgKi8pIHsKICAgICAgICAgICAgICAgIHN0eWxlQXN0ID0gdGhpcy52aXNpdEtleWZyYW1lcygoLyoqIEB0eXBlIHs/fSAqLyAoc3R5bGVNZXRhZGF0YSkpLCBjb250ZXh0KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCBzdHlsZU1ldGFkYXRhID0gKC8qKiBAdHlwZSB7P30gKi8gKG1ldGFkYXRhLnN0eWxlcykpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IGlzRW1wdHkgPSBmYWxzZTsKICAgICAgICAgICAgICAgIGlmICghc3R5bGVNZXRhZGF0YSkgewogICAgICAgICAgICAgICAgICAgIGlzRW1wdHkgPSB0cnVlOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBuZXdTdHlsZURhdGEgPSB7fTsKICAgICAgICAgICAgICAgICAgICBpZiAodGltaW5nQXN0LmVhc2luZykgewogICAgICAgICAgICAgICAgICAgICAgICBuZXdTdHlsZURhdGFbJ2Vhc2luZyddID0gdGltaW5nQXN0LmVhc2luZzsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgc3R5bGVNZXRhZGF0YSA9IHN0eWxlKG5ld1N0eWxlRGF0YSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjb250ZXh0LmN1cnJlbnRUaW1lICs9IHRpbWluZ0FzdC5kdXJhdGlvbiArIHRpbWluZ0FzdC5kZWxheTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IF9zdHlsZUFzdCA9IHRoaXMudmlzaXRTdHlsZShzdHlsZU1ldGFkYXRhLCBjb250ZXh0KTsKICAgICAgICAgICAgICAgIF9zdHlsZUFzdC5pc0VtcHR5U3RlcCA9IGlzRW1wdHk7CiAgICAgICAgICAgICAgICBzdHlsZUFzdCA9IF9zdHlsZUFzdDsKICAgICAgICAgICAgfQogICAgICAgICAgICBjb250ZXh0LmN1cnJlbnRBbmltYXRlVGltaW5ncyA9IG51bGw7CiAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICB0eXBlOiA0IC8qIEFuaW1hdGUgKi8sCiAgICAgICAgICAgICAgICB0aW1pbmdzOiB0aW1pbmdBc3QsCiAgICAgICAgICAgICAgICBzdHlsZTogc3R5bGVBc3QsCiAgICAgICAgICAgICAgICBvcHRpb25zOiBudWxsCiAgICAgICAgICAgIH07CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gbWV0YWRhdGEKICAgICAgICAgKiBAcGFyYW0gez99IGNvbnRleHQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHZpc2l0U3R5bGUobWV0YWRhdGEsIGNvbnRleHQpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBhc3QgPSB0aGlzLl9tYWtlU3R5bGVBc3QobWV0YWRhdGEsIGNvbnRleHQpOwogICAgICAgICAgICB0aGlzLl92YWxpZGF0ZVN0eWxlQXN0KGFzdCwgY29udGV4dCk7CiAgICAgICAgICAgIHJldHVybiBhc3Q7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBtZXRhZGF0YQogICAgICAgICAqIEBwYXJhbSB7P30gY29udGV4dAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX21ha2VTdHlsZUFzdChtZXRhZGF0YSwgY29udGV4dCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHN0eWxlcyA9IFtdOwogICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShtZXRhZGF0YS5zdHlsZXMpKSB7CiAgICAgICAgICAgICAgICAoKC8qKiBAdHlwZSB7P30gKi8gKG1ldGFkYXRhLnN0eWxlcykpKS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gc3R5bGVUdXBsZQogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgc3R5bGVUdXBsZSA9PiB7CiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBzdHlsZVR1cGxlID09ICdzdHJpbmcnKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzdHlsZVR1cGxlID09IEFVVE9fU1RZTEUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0eWxlcy5wdXNoKHN0eWxlVHVwbGUpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGV4dC5lcnJvcnMucHVzaChgVGhlIHByb3ZpZGVkIHN0eWxlIHN0cmluZyB2YWx1ZSAke3N0eWxlVHVwbGV9IGlzIG5vdCBhbGxvd2VkLmApOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICBzdHlsZXMucHVzaChzdHlsZVR1cGxlKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBzdHlsZXMucHVzaChtZXRhZGF0YS5zdHlsZXMpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGNvbnRhaW5zRHluYW1pY1N0eWxlcyA9IGZhbHNlOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBjb2xsZWN0ZWRFYXNpbmcgPSBudWxsOwogICAgICAgICAgICBzdHlsZXMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gc3R5bGVEYXRhCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBzdHlsZURhdGEgPT4gewogICAgICAgICAgICAgICAgaWYgKGlzT2JqZWN0JDEoc3R5bGVEYXRhKSkgewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBzdHlsZU1hcCA9ICgvKiogQHR5cGUgez99ICovIChzdHlsZURhdGEpKTsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgZWFzaW5nID0gc3R5bGVNYXBbJ2Vhc2luZyddOwogICAgICAgICAgICAgICAgICAgIGlmIChlYXNpbmcpIHsKICAgICAgICAgICAgICAgICAgICAgICAgY29sbGVjdGVkRWFzaW5nID0gKC8qKiBAdHlwZSB7P30gKi8gKGVhc2luZykpOwogICAgICAgICAgICAgICAgICAgICAgICBkZWxldGUgc3R5bGVNYXBbJ2Vhc2luZyddOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBpZiAoIWNvbnRhaW5zRHluYW1pY1N0eWxlcykgewogICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBwcm9wIGluIHN0eWxlTWFwKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB2YWx1ZSA9IHN0eWxlTWFwW3Byb3BdOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHZhbHVlLnRvU3RyaW5nKCkuaW5kZXhPZihTVUJTVElUVVRJT05fRVhQUl9TVEFSVCkgPj0gMCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRhaW5zRHluYW1pY1N0eWxlcyA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIHR5cGU6IDYgLyogU3R5bGUgKi8sCiAgICAgICAgICAgICAgICBzdHlsZXMsCiAgICAgICAgICAgICAgICBlYXNpbmc6IGNvbGxlY3RlZEVhc2luZywKICAgICAgICAgICAgICAgIG9mZnNldDogbWV0YWRhdGEub2Zmc2V0LAogICAgICAgICAgICAgICAgY29udGFpbnNEeW5hbWljU3R5bGVzLAogICAgICAgICAgICAgICAgb3B0aW9uczogbnVsbAogICAgICAgICAgICB9OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gYXN0CiAgICAgICAgICogQHBhcmFtIHs/fSBjb250ZXh0CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfdmFsaWRhdGVTdHlsZUFzdChhc3QsIGNvbnRleHQpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB0aW1pbmdzID0gY29udGV4dC5jdXJyZW50QW5pbWF0ZVRpbWluZ3M7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGVuZFRpbWUgPSBjb250ZXh0LmN1cnJlbnRUaW1lOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBzdGFydFRpbWUgPSBjb250ZXh0LmN1cnJlbnRUaW1lOwogICAgICAgICAgICBpZiAodGltaW5ncyAmJiBzdGFydFRpbWUgPiAwKSB7CiAgICAgICAgICAgICAgICBzdGFydFRpbWUgLT0gdGltaW5ncy5kdXJhdGlvbiArIHRpbWluZ3MuZGVsYXk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgYXN0LnN0eWxlcy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSB0dXBsZQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdHVwbGUgPT4gewogICAgICAgICAgICAgICAgaWYgKHR5cGVvZiB0dXBsZSA9PSAnc3RyaW5nJykKICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyh0dXBsZSkuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHByb3AKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIHByb3AgPT4gewogICAgICAgICAgICAgICAgICAgIGlmICghdGhpcy5fZHJpdmVyLnZhbGlkYXRlU3R5bGVQcm9wZXJ0eShwcm9wKSkgewogICAgICAgICAgICAgICAgICAgICAgICBjb250ZXh0LmVycm9ycy5wdXNoKGBUaGUgcHJvdmlkZWQgYW5pbWF0aW9uIHByb3BlcnR5ICIke3Byb3B9IiBpcyBub3QgYSBzdXBwb3J0ZWQgQ1NTIHByb3BlcnR5IGZvciBhbmltYXRpb25zYCk7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGNvbGxlY3RlZFN0eWxlcyA9IGNvbnRleHQuY29sbGVjdGVkU3R5bGVzWygvKiogQHR5cGUgez99ICovIChjb250ZXh0LmN1cnJlbnRRdWVyeVNlbGVjdG9yKSldOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBjb2xsZWN0ZWRFbnRyeSA9IGNvbGxlY3RlZFN0eWxlc1twcm9wXTsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgbGV0IHVwZGF0ZUNvbGxlY3RlZFN0eWxlID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICBpZiAoY29sbGVjdGVkRW50cnkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHN0YXJ0VGltZSAhPSBlbmRUaW1lICYmIHN0YXJ0VGltZSA+PSBjb2xsZWN0ZWRFbnRyeS5zdGFydFRpbWUgJiYKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVuZFRpbWUgPD0gY29sbGVjdGVkRW50cnkuZW5kVGltZSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGV4dC5lcnJvcnMucHVzaChgVGhlIENTUyBwcm9wZXJ0eSAiJHtwcm9wfSIgdGhhdCBleGlzdHMgYmV0d2VlbiB0aGUgdGltZXMgb2YgIiR7Y29sbGVjdGVkRW50cnkuc3RhcnRUaW1lfW1zIiBhbmQgIiR7Y29sbGVjdGVkRW50cnkKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5lbmRUaW1lfW1zIiBpcyBhbHNvIGJlaW5nIGFuaW1hdGVkIGluIGEgcGFyYWxsZWwgYW5pbWF0aW9uIGJldHdlZW4gdGhlIHRpbWVzIG9mICIke3N0YXJ0VGltZX1tcyIgYW5kICIke2VuZFRpbWV9bXMiYCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVDb2xsZWN0ZWRTdHlsZSA9IGZhbHNlOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHdlIGFsd2F5cyBjaG9vc2UgdGhlIHNtYWxsZXIgc3RhcnQgdGltZSB2YWx1ZSBzaW5jZSB3ZQogICAgICAgICAgICAgICAgICAgICAgICAvLyB3YW50IHRvIGhhdmUgYSByZWNvcmQgb2YgdGhlIGVudGlyZSBhbmltYXRpb24gd2luZG93IHdoZXJlCiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHRoZSBzdHlsZSBwcm9wZXJ0eSBpcyBiZWluZyBhbmltYXRlZCBpbiBiZXR3ZWVuCiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0VGltZSA9IGNvbGxlY3RlZEVudHJ5LnN0YXJ0VGltZTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgaWYgKHVwZGF0ZUNvbGxlY3RlZFN0eWxlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGNvbGxlY3RlZFN0eWxlc1twcm9wXSA9IHsgc3RhcnRUaW1lLCBlbmRUaW1lIH07CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGlmIChjb250ZXh0Lm9wdGlvbnMpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdmFsaWRhdGVTdHlsZVBhcmFtcyh0dXBsZVtwcm9wXSwgY29udGV4dC5vcHRpb25zLCBjb250ZXh0LmVycm9ycyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gbWV0YWRhdGEKICAgICAgICAgKiBAcGFyYW0gez99IGNvbnRleHQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHZpc2l0S2V5ZnJhbWVzKG1ldGFkYXRhLCBjb250ZXh0KSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgYXN0ID0geyB0eXBlOiA1IC8qIEtleWZyYW1lcyAqLywgc3R5bGVzOiBbXSwgb3B0aW9uczogbnVsbCB9OwogICAgICAgICAgICBpZiAoIWNvbnRleHQuY3VycmVudEFuaW1hdGVUaW1pbmdzKSB7CiAgICAgICAgICAgICAgICBjb250ZXh0LmVycm9ycy5wdXNoKGBrZXlmcmFtZXMoKSBtdXN0IGJlIHBsYWNlZCBpbnNpZGUgb2YgYSBjYWxsIHRvIGFuaW1hdGUoKWApOwogICAgICAgICAgICAgICAgcmV0dXJuIGFzdDsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IE1BWF9LRVlGUkFNRV9PRkZTRVQgPSAxOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCB0b3RhbEtleWZyYW1lc1dpdGhPZmZzZXRzID0gMDsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBvZmZzZXRzID0gW107CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IG9mZnNldHNPdXRPZk9yZGVyID0gZmFsc2U7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGtleWZyYW1lc091dE9mUmFuZ2UgPSBmYWxzZTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgcHJldmlvdXNPZmZzZXQgPSAwOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGtleWZyYW1lcyA9IG1ldGFkYXRhLnN0ZXBzLm1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gc3R5bGVzCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBzdHlsZXMgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3Qgc3R5bGUgPSB0aGlzLl9tYWtlU3R5bGVBc3Qoc3R5bGVzLCBjb250ZXh0KTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCBvZmZzZXRWYWwgPSBzdHlsZS5vZmZzZXQgIT0gbnVsbCA/IHN0eWxlLm9mZnNldCA6IGNvbnN1bWVPZmZzZXQoc3R5bGUuc3R5bGVzKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCBvZmZzZXQgPSAwOwogICAgICAgICAgICAgICAgaWYgKG9mZnNldFZhbCAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgdG90YWxLZXlmcmFtZXNXaXRoT2Zmc2V0cysrOwogICAgICAgICAgICAgICAgICAgIG9mZnNldCA9IHN0eWxlLm9mZnNldCA9IG9mZnNldFZhbDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGtleWZyYW1lc091dE9mUmFuZ2UgPSBrZXlmcmFtZXNPdXRPZlJhbmdlIHx8IG9mZnNldCA8IDAgfHwgb2Zmc2V0ID4gMTsKICAgICAgICAgICAgICAgIG9mZnNldHNPdXRPZk9yZGVyID0gb2Zmc2V0c091dE9mT3JkZXIgfHwgb2Zmc2V0IDwgcHJldmlvdXNPZmZzZXQ7CiAgICAgICAgICAgICAgICBwcmV2aW91c09mZnNldCA9IG9mZnNldDsKICAgICAgICAgICAgICAgIG9mZnNldHMucHVzaChvZmZzZXQpOwogICAgICAgICAgICAgICAgcmV0dXJuIHN0eWxlOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIGlmIChrZXlmcmFtZXNPdXRPZlJhbmdlKSB7CiAgICAgICAgICAgICAgICBjb250ZXh0LmVycm9ycy5wdXNoKGBQbGVhc2UgZW5zdXJlIHRoYXQgYWxsIGtleWZyYW1lIG9mZnNldHMgYXJlIGJldHdlZW4gMCBhbmQgMWApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChvZmZzZXRzT3V0T2ZPcmRlcikgewogICAgICAgICAgICAgICAgY29udGV4dC5lcnJvcnMucHVzaChgUGxlYXNlIGVuc3VyZSB0aGF0IGFsbCBrZXlmcmFtZSBvZmZzZXRzIGFyZSBpbiBvcmRlcmApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbGVuZ3RoID0gbWV0YWRhdGEuc3RlcHMubGVuZ3RoOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBnZW5lcmF0ZWRPZmZzZXQgPSAwOwogICAgICAgICAgICBpZiAodG90YWxLZXlmcmFtZXNXaXRoT2Zmc2V0cyA+IDAgJiYgdG90YWxLZXlmcmFtZXNXaXRoT2Zmc2V0cyA8IGxlbmd0aCkgewogICAgICAgICAgICAgICAgY29udGV4dC5lcnJvcnMucHVzaChgTm90IGFsbCBzdHlsZSgpIHN0ZXBzIHdpdGhpbiB0aGUgZGVjbGFyZWQga2V5ZnJhbWVzKCkgY29udGFpbiBvZmZzZXRzYCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAodG90YWxLZXlmcmFtZXNXaXRoT2Zmc2V0cyA9PSAwKSB7CiAgICAgICAgICAgICAgICBnZW5lcmF0ZWRPZmZzZXQgPSBNQVhfS0VZRlJBTUVfT0ZGU0VUIC8gKGxlbmd0aCAtIDEpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbGltaXQgPSBsZW5ndGggLSAxOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGN1cnJlbnRUaW1lID0gY29udGV4dC5jdXJyZW50VGltZTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjdXJyZW50QW5pbWF0ZVRpbWluZ3MgPSAoLyoqIEB0eXBlIHs/fSAqLyAoY29udGV4dC5jdXJyZW50QW5pbWF0ZVRpbWluZ3MpKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBhbmltYXRlRHVyYXRpb24gPSBjdXJyZW50QW5pbWF0ZVRpbWluZ3MuZHVyYXRpb247CiAgICAgICAgICAgIGtleWZyYW1lcy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBrZgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGkKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChrZiwgaSkgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2V0ID0gZ2VuZXJhdGVkT2Zmc2V0ID4gMCA/IChpID09IGxpbWl0ID8gMSA6IChnZW5lcmF0ZWRPZmZzZXQgKiBpKSkgOiBvZmZzZXRzW2ldOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZHVyYXRpb25VcFRvVGhpc0ZyYW1lID0gb2Zmc2V0ICogYW5pbWF0ZUR1cmF0aW9uOwogICAgICAgICAgICAgICAgY29udGV4dC5jdXJyZW50VGltZSA9IGN1cnJlbnRUaW1lICsgY3VycmVudEFuaW1hdGVUaW1pbmdzLmRlbGF5ICsgZHVyYXRpb25VcFRvVGhpc0ZyYW1lOwogICAgICAgICAgICAgICAgY3VycmVudEFuaW1hdGVUaW1pbmdzLmR1cmF0aW9uID0gZHVyYXRpb25VcFRvVGhpc0ZyYW1lOwogICAgICAgICAgICAgICAgdGhpcy5fdmFsaWRhdGVTdHlsZUFzdChrZiwgY29udGV4dCk7CiAgICAgICAgICAgICAgICBrZi5vZmZzZXQgPSBvZmZzZXQ7CiAgICAgICAgICAgICAgICBhc3Quc3R5bGVzLnB1c2goa2YpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIHJldHVybiBhc3Q7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gbWV0YWRhdGEKICAgICAgICAgKiBAcGFyYW0gez99IGNvbnRleHQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHZpc2l0UmVmZXJlbmNlKG1ldGFkYXRhLCBjb250ZXh0KSB7CiAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICB0eXBlOiA4IC8qIFJlZmVyZW5jZSAqLywKICAgICAgICAgICAgICAgIGFuaW1hdGlvbjogdmlzaXREc2xOb2RlKHRoaXMsIG5vcm1hbGl6ZUFuaW1hdGlvbkVudHJ5KG1ldGFkYXRhLmFuaW1hdGlvbiksIGNvbnRleHQpLAogICAgICAgICAgICAgICAgb3B0aW9uczogbm9ybWFsaXplQW5pbWF0aW9uT3B0aW9ucyhtZXRhZGF0YS5vcHRpb25zKQogICAgICAgICAgICB9OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IG1ldGFkYXRhCiAgICAgICAgICogQHBhcmFtIHs/fSBjb250ZXh0CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB2aXNpdEFuaW1hdGVDaGlsZChtZXRhZGF0YSwgY29udGV4dCkgewogICAgICAgICAgICBjb250ZXh0LmRlcENvdW50Kys7CiAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICB0eXBlOiA5IC8qIEFuaW1hdGVDaGlsZCAqLywKICAgICAgICAgICAgICAgIG9wdGlvbnM6IG5vcm1hbGl6ZUFuaW1hdGlvbk9wdGlvbnMobWV0YWRhdGEub3B0aW9ucykKICAgICAgICAgICAgfTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBtZXRhZGF0YQogICAgICAgICAqIEBwYXJhbSB7P30gY29udGV4dAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdmlzaXRBbmltYXRlUmVmKG1ldGFkYXRhLCBjb250ZXh0KSB7CiAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICB0eXBlOiAxMCAvKiBBbmltYXRlUmVmICovLAogICAgICAgICAgICAgICAgYW5pbWF0aW9uOiB0aGlzLnZpc2l0UmVmZXJlbmNlKG1ldGFkYXRhLmFuaW1hdGlvbiwgY29udGV4dCksCiAgICAgICAgICAgICAgICBvcHRpb25zOiBub3JtYWxpemVBbmltYXRpb25PcHRpb25zKG1ldGFkYXRhLm9wdGlvbnMpCiAgICAgICAgICAgIH07CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gbWV0YWRhdGEKICAgICAgICAgKiBAcGFyYW0gez99IGNvbnRleHQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHZpc2l0UXVlcnkobWV0YWRhdGEsIGNvbnRleHQpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwYXJlbnRTZWxlY3RvciA9ICgvKiogQHR5cGUgez99ICovIChjb250ZXh0LmN1cnJlbnRRdWVyeVNlbGVjdG9yKSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgb3B0aW9ucyA9ICgvKiogQHR5cGUgez99ICovICgobWV0YWRhdGEub3B0aW9ucyB8fCB7fSkpKTsKICAgICAgICAgICAgY29udGV4dC5xdWVyeUNvdW50Kys7CiAgICAgICAgICAgIGNvbnRleHQuY3VycmVudFF1ZXJ5ID0gbWV0YWRhdGE7CiAgICAgICAgICAgIGNvbnN0IFtzZWxlY3RvciwgaW5jbHVkZVNlbGZdID0gbm9ybWFsaXplU2VsZWN0b3IobWV0YWRhdGEuc2VsZWN0b3IpOwogICAgICAgICAgICBjb250ZXh0LmN1cnJlbnRRdWVyeVNlbGVjdG9yID0KICAgICAgICAgICAgICAgIHBhcmVudFNlbGVjdG9yLmxlbmd0aCA/IChwYXJlbnRTZWxlY3RvciArICcgJyArIHNlbGVjdG9yKSA6IHNlbGVjdG9yOwogICAgICAgICAgICBnZXRPclNldEFzSW5NYXAoY29udGV4dC5jb2xsZWN0ZWRTdHlsZXMsIGNvbnRleHQuY3VycmVudFF1ZXJ5U2VsZWN0b3IsIHt9KTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBhbmltYXRpb24gPSB2aXNpdERzbE5vZGUodGhpcywgbm9ybWFsaXplQW5pbWF0aW9uRW50cnkobWV0YWRhdGEuYW5pbWF0aW9uKSwgY29udGV4dCk7CiAgICAgICAgICAgIGNvbnRleHQuY3VycmVudFF1ZXJ5ID0gbnVsbDsKICAgICAgICAgICAgY29udGV4dC5jdXJyZW50UXVlcnlTZWxlY3RvciA9IHBhcmVudFNlbGVjdG9yOwogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgdHlwZTogMTEgLyogUXVlcnkgKi8sCiAgICAgICAgICAgICAgICBzZWxlY3RvciwKICAgICAgICAgICAgICAgIGxpbWl0OiBvcHRpb25zLmxpbWl0IHx8IDAsCiAgICAgICAgICAgICAgICBvcHRpb25hbDogISFvcHRpb25zLm9wdGlvbmFsLAogICAgICAgICAgICAgICAgaW5jbHVkZVNlbGYsCiAgICAgICAgICAgICAgICBhbmltYXRpb24sCiAgICAgICAgICAgICAgICBvcmlnaW5hbFNlbGVjdG9yOiBtZXRhZGF0YS5zZWxlY3RvciwKICAgICAgICAgICAgICAgIG9wdGlvbnM6IG5vcm1hbGl6ZUFuaW1hdGlvbk9wdGlvbnMobWV0YWRhdGEub3B0aW9ucykKICAgICAgICAgICAgfTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBtZXRhZGF0YQogICAgICAgICAqIEBwYXJhbSB7P30gY29udGV4dAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdmlzaXRTdGFnZ2VyKG1ldGFkYXRhLCBjb250ZXh0KSB7CiAgICAgICAgICAgIGlmICghY29udGV4dC5jdXJyZW50UXVlcnkpIHsKICAgICAgICAgICAgICAgIGNvbnRleHQuZXJyb3JzLnB1c2goYHN0YWdnZXIoKSBjYW4gb25seSBiZSB1c2VkIGluc2lkZSBvZiBxdWVyeSgpYCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB0aW1pbmdzID0gbWV0YWRhdGEudGltaW5ncyA9PT0gJ2Z1bGwnID8KICAgICAgICAgICAgICAgIHsgZHVyYXRpb246IDAsIGRlbGF5OiAwLCBlYXNpbmc6ICdmdWxsJyB9IDoKICAgICAgICAgICAgICAgIHJlc29sdmVUaW1pbmcobWV0YWRhdGEudGltaW5ncywgY29udGV4dC5lcnJvcnMsIHRydWUpOwogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgdHlwZTogMTIgLyogU3RhZ2dlciAqLywKICAgICAgICAgICAgICAgIGFuaW1hdGlvbjogdmlzaXREc2xOb2RlKHRoaXMsIG5vcm1hbGl6ZUFuaW1hdGlvbkVudHJ5KG1ldGFkYXRhLmFuaW1hdGlvbiksIGNvbnRleHQpLAogICAgICAgICAg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CBOR19BTklNQVRJTkdfU0VMRUNUT1IpOwogICAgICAgIHJldHVybiBbc2VsZWN0b3IsIGhhc0FtcGVyc2FuZF07CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gb2JqCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBub3JtYWxpemVQYXJhbXMob2JqKSB7CiAgICAgICAgcmV0dXJuIG9iaiA/IGNvcHlPYmoob2JqKSA6IG51bGw7CiAgICB9CiAgICBjbGFzcyBBbmltYXRpb25Bc3RCdWlsZGVyQ29udGV4dCB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBlcnJvcnMKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihlcnJvcnMpIHsKICAgICAgICAgICAgdGhpcy5lcnJvcnMgPSBlcnJvcnM7CiAgICAgICAgICAgIHRoaXMucXVlcnlDb3VudCA9IDA7CiAgICAgICAgICAgIHRoaXMuZGVwQ291bnQgPSAwOwogICAgICAgICAgICB0aGlzLmN1cnJlbnRUcmFuc2l0aW9uID0gbnVsbDsKICAgICAgICAgICAgdGhpcy5jdXJyZW50UXVlcnkgPSBudWxsOwogICAgICAgICAgICB0aGlzLmN1cnJlbnRRdWVyeVNlbGVjdG9yID0gbnVsbDsKICAgICAgICAgICAgdGhpcy5jdXJyZW50QW5pbWF0ZVRpbWluZ3MgPSBudWxsOwogICAgICAgICAgICB0aGlzLmN1cnJlbnRUaW1lID0gMDsKICAgICAgICAgICAgdGhpcy5jb2xsZWN0ZWRTdHlsZXMgPSB7fTsKICAgICAgICAgICAgdGhpcy5vcHRpb25zID0gbnVsbDsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gc3R5bGVzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBjb25zdW1lT2Zmc2V0KHN0eWxlcykgewogICAgICAgIGlmICh0eXBlb2Ygc3R5bGVzID09ICdzdHJpbmcnKQogICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IG9mZnNldCA9IG51bGw7CiAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoc3R5bGVzKSkgewogICAgICAgICAgICBzdHlsZXMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gc3R5bGVUdXBsZQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgc3R5bGVUdXBsZSA9PiB7CiAgICAgICAgICAgICAgICBpZiAoaXNPYmplY3QkMShzdHlsZVR1cGxlKSAmJiBzdHlsZVR1cGxlLmhhc093blByb3BlcnR5KCdvZmZzZXQnKSkgewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBvYmogPSAoLyoqIEB0eXBlIHs/fSAqLyAoc3R5bGVUdXBsZSkpOwogICAgICAgICAgICAgICAgICAgIG9mZnNldCA9IHBhcnNlRmxvYXQoKC8qKiBAdHlwZSB7P30gKi8gKG9ialsnb2Zmc2V0J10pKSk7CiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIG9ialsnb2Zmc2V0J107CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgZWxzZSBpZiAoaXNPYmplY3QkMShzdHlsZXMpICYmIHN0eWxlcy5oYXNPd25Qcm9wZXJ0eSgnb2Zmc2V0JykpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBvYmogPSBzdHlsZXM7CiAgICAgICAgICAgIG9mZnNldCA9IHBhcnNlRmxvYXQoKC8qKiBAdHlwZSB7P30gKi8gKG9ialsnb2Zmc2V0J10pKSk7CiAgICAgICAgICAgIGRlbGV0ZSBvYmpbJ29mZnNldCddOwogICAgICAgIH0KICAgICAgICByZXR1cm4gb2Zmc2V0OwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBpc09iamVjdCQxKHZhbHVlKSB7CiAgICAgICAgcmV0dXJuICFBcnJheS5pc0FycmF5KHZhbHVlKSAmJiB0eXBlb2YgdmFsdWUgPT0gJ29iamVjdCc7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAqIEBwYXJhbSB7P30gZXJyb3JzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBjb25zdHJ1Y3RUaW1pbmdBc3QodmFsdWUsIGVycm9ycykgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgdGltaW5ncyA9IG51bGw7CiAgICAgICAgaWYgKHZhbHVlLmhhc093blByb3BlcnR5KCdkdXJhdGlvbicpKSB7CiAgICAgICAgICAgIHRpbWluZ3MgPSAoLyoqIEB0eXBlIHs/fSAqLyAodmFsdWUpKTsKICAgICAgICB9CiAgICAgICAgZWxzZSBpZiAodHlwZW9mIHZhbHVlID09ICdudW1iZXInKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZHVyYXRpb24gPSByZXNvbHZlVGltaW5nKHZhbHVlLCBlcnJvcnMpLmR1cmF0aW9uOwogICAgICAgICAgICByZXR1cm4gbWFrZVRpbWluZ0FzdChkdXJhdGlvbiwgMCwgJycpOwogICAgICAgIH0KICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3Qgc3RyVmFsdWUgPSAoLyoqIEB0eXBlIHs/fSAqLyAodmFsdWUpKTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgaXNEeW5hbWljID0gc3RyVmFsdWUuc3BsaXQoL1xzKy8pLnNvbWUoKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdiA9PiB2LmNoYXJBdCgwKSA9PSAneycgJiYgdi5jaGFyQXQoMSkgPT0gJ3snKSk7CiAgICAgICAgaWYgKGlzRHluYW1pYykgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGFzdCA9ICgvKiogQHR5cGUgez99ICovIChtYWtlVGltaW5nQXN0KDAsIDAsICcnKSkpOwogICAgICAgICAgICBhc3QuZHluYW1pYyA9IHRydWU7CiAgICAgICAgICAgIGFzdC5zdHJWYWx1ZSA9IHN0clZhbHVlOwogICAgICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKGFzdCkpOwogICAgICAgIH0KICAgICAgICB0aW1pbmdzID0gdGltaW5ncyB8fCByZXNvbHZlVGltaW5nKHN0clZhbHVlLCBlcnJvcnMpOwogICAgICAgIHJldHVybiBtYWtlVGltaW5nQXN0KHRpbWluZ3MuZHVyYXRpb24sIHRpbWluZ3MuZGVsYXksIHRpbWluZ3MuZWFzaW5nKTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBvcHRpb25zCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBub3JtYWxpemVBbmltYXRpb25PcHRpb25zKG9wdGlvbnMpIHsKICAgICAgICBpZiAob3B0aW9ucykgewogICAgICAgICAgICBvcHRpb25zID0gY29weU9iaihvcHRpb25zKTsKICAgICAgICAgICAgaWYgKG9wdGlvbnNbJ3BhcmFtcyddKSB7CiAgICAgICAgICAgICAgICBvcHRpb25zWydwYXJhbXMnXSA9ICgvKiogQHR5cGUgez99ICovIChub3JtYWxpemVQYXJhbXMob3B0aW9uc1sncGFyYW1zJ10pKSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIG9wdGlvbnMgPSB7fTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIG9wdGlvbnM7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gZHVyYXRpb24KICAgICAqIEBwYXJhbSB7P30gZGVsYXkKICAgICAqIEBwYXJhbSB7P30gZWFzaW5nCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBtYWtlVGltaW5nQXN0KGR1cmF0aW9uLCBkZWxheSwgZWFzaW5nKSB7CiAgICAgICAgcmV0dXJuIHsgZHVyYXRpb24sIGRlbGF5LCBlYXNpbmcgfTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgKiBAcGFyYW0gez99IGtleWZyYW1lcwogICAgICogQHBhcmFtIHs/fSBwcmVTdHlsZVByb3BzCiAgICAgKiBAcGFyYW0gez99IHBvc3RTdHlsZVByb3BzCiAgICAgKiBAcGFyYW0gez99IGR1cmF0aW9uCiAgICAgKiBAcGFyYW0gez99IGRlbGF5CiAgICAgKiBAcGFyYW0gez89fSBlYXNpbmcKICAgICAqIEBwYXJhbSB7Pz19IHN1YlRpbWVsaW5lCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBjcmVhdGVUaW1lbGluZUluc3RydWN0aW9uKGVsZW1lbnQsIGtleWZyYW1lcywgcHJlU3R5bGVQcm9wcywgcG9zdFN0eWxlUHJvcHMsIGR1cmF0aW9uLCBkZWxheSwgZWFzaW5nID0gbnVsbCwgc3ViVGltZWxpbmUgPSBmYWxzZSkgewogICAgICAgIHJldHVybiB7CiAgICAgICAgICAgIHR5cGU6IDEgLyogVGltZWxpbmVBbmltYXRpb24gKi8sCiAgICAgICAgICAgIGVsZW1lbnQsCiAgICAgICAgICAgIGtleWZyYW1lcywKICAgICAgICAgICAgcHJlU3R5bGVQcm9wcywKICAgICAgICAgICAgcG9zdFN0eWxlUHJvcHMsCiAgICAgICAgICAgIGR1cmF0aW9uLAogICAgICAgICAgICBkZWxheSwKICAgICAgICAgICAgdG90YWxUaW1lOiBkdXJhdGlvbiArIGRlbGF5LAogICAgICAgICAgICBlYXNpbmcsCiAgICAgICAgICAgIHN1YlRpbWVsaW5lCiAgICAgICAgfTsKICAgIH0KCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcgYWRkZWQgYnkgdHNpY2tsZQogICAgICogR2VuZXJhdGVkIGZyb206IHBhY2thZ2VzL2FuaW1hdGlvbnMvYnJvd3Nlci9zcmMvZHNsL2VsZW1lbnRfaW5zdHJ1Y3Rpb25fbWFwLnRzCiAgICAgKiBAc3VwcHJlc3Mge2NoZWNrVHlwZXMsY29uc3RhbnRQcm9wZXJ0eSxleHRyYVJlcXVpcmUsbWlzc2luZ092ZXJyaWRlLG1pc3NpbmdSZXR1cm4sdW51c2VkUHJpdmF0ZU1lbWJlcnMsdXNlbGVzc0NvZGV9IGNoZWNrZWQgYnkgdHNjCiAgICAgKi8KICAgIGNsYXNzIEVsZW1lbnRJbnN0cnVjdGlvbk1hcCB7CiAgICAgICAgY29uc3RydWN0b3IoKSB7CiAgICAgICAgICAgIHRoaXMuX21hcCA9IG5ldyBNYXAoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBjb25zdW1lKGVsZW1lbnQpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgaW5zdHJ1Y3Rpb25zID0gdGhpcy5fbWFwLmdldChlbGVtZW50KTsKICAgICAgICAgICAgaWYgKGluc3RydWN0aW9ucykgewogICAgICAgICAgICAgICAgdGhpcy5fbWFwLmRlbGV0ZShlbGVtZW50KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIGluc3RydWN0aW9ucyA9IFtdOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBpbnN0cnVjdGlvbnM7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAqIEBwYXJhbSB7P30gaW5zdHJ1Y3Rpb25zCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBhcHBlbmQoZWxlbWVudCwgaW5zdHJ1Y3Rpb25zKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGV4aXN0aW5nSW5zdHJ1Y3Rpb25zID0gdGhpcy5fbWFwLmdldChlbGVtZW50KTsKICAgICAgICAgICAgaWYgKCFleGlzdGluZ0luc3RydWN0aW9ucykgewogICAgICAgICAgICAgICAgdGhpcy5fbWFwLnNldChlbGVtZW50LCBleGlzdGluZ0luc3RydWN0aW9ucyA9IFtdKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBleGlzdGluZ0luc3RydWN0aW9ucy5wdXNoKC4uLmluc3RydWN0aW9ucyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgaGFzKGVsZW1lbnQpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX21hcC5oYXMoZWxlbWVudCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgY2xlYXIoKSB7CiAgICAgICAgICAgIHRoaXMuX21hcC5jbGVhcigpOwogICAgICAgIH0KICAgIH0KCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcgYWRkZWQgYnkgdHNpY2tsZQogICAgICogR2VuZXJhdGVkIGZyb206IHBhY2thZ2VzL2FuaW1hdGlvbnMvYnJvd3Nlci9zcmMvZHNsL2FuaW1hdGlvbl90aW1lbGluZV9idWlsZGVyLnRzCiAgICAgKiBAc3VwcHJlc3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aXRvciB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBkcml2ZXIKICAgICAgICAgKiBAcGFyYW0gez99IHJvb3RFbGVtZW50CiAgICAgICAgICogQHBhcmFtIHs/fSBhc3QKICAgICAgICAgKiBAcGFyYW0gez99IGVudGVyQ2xhc3NOYW1lCiAgICAgICAgICogQHBhcmFtIHs/fSBsZWF2ZUNsYXNzTmFtZQogICAgICAgICAqIEBwYXJhbSB7P30gc3RhcnRpbmdTdHlsZXMKICAgICAgICAgKiBAcGFyYW0gez99IGZpbmFsU3R5bGVzCiAgICAgICAgICogQHBhcmFtIHs/fSBvcHRpb25zCiAgICAgICAgICogQHBhcmFtIHs/PX0gc3ViSW5zdHJ1Y3Rpb25zCiAgICAgICAgICogQHBhcmFtIHs/PX0gZXJyb3JzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBidWlsZEtleWZyYW1lcyhkcml2ZXIsIHJvb3RFbGVtZW50LCBhc3QsIGVudGVyQ2xhc3NOYW1lLCBsZWF2ZUNsYXNzTmFtZSwgc3RhcnRpbmdTdHlsZXMsIGZpbmFsU3R5bGVzLCBvcHRpb25zLCBzdWJJbnN0cnVjdGlvbnMsIGVycm9ycyA9IFtdKSB7CiAgICAgICAgICAgIHN1Ykluc3RydWN0aW9ucyA9IHN1Ykluc3RydWN0aW9ucyB8fCBuZXcgRWxlbWVudEluc3RydWN0aW9uTWFwKCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgY29udGV4dCA9IG5ldyBBbmltYXRpb25UaW1lbGluZUNvbnRleHQoZHJpdmVyLCByb290RWxlbWVudCwgc3ViSW5zdHJ1Y3Rpb25zLCBlbnRlckNsYXNzTmFtZSwgbGVhdmVDbGFzc05hbWUsIGVycm9ycywgW10pOwogICAgICAgICAgICBjb250ZXh0Lm9wdGlvbnMgPSBvcHRpb25zOwogICAgICAgICAgICBjb250ZXh0LmN1cnJlbnRUaW1lbGluZS5zZXRTdHlsZXMoW3N0YXJ0aW5nU3R5bGVzXSwgbnVsbCwgY29udGV4dC5lcnJvcnMsIG9wdGlvbnMpOwogICAgICAgICAgICB2aXNpdERzbE5vZGUodGhpcywgYXN0LCBjb250ZXh0KTsKICAgICAgICAgICAgLy8gdGhpcyBjaGVja3MgdG8gc2VlIGlmIGFuIGFjdHVhbCBhbmltYXRpb24gaGFwcGVuZWQKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB0aW1lbGluZXMgPSBjb250ZXh0LnRpbWVsaW5lcy5maWx0ZXIoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHRpbWVsaW5lCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aW1lbGluZSA9PiB0aW1lbGluZS5jb250YWluc0FuaW1hdGlvbigpKSk7CiAgICAgICAgICAgIGlmICh0aW1lbGluZXMubGVuZ3RoICYmIE9iamVjdC5rZXlzKGZpbmFsU3R5bGVzKS5sZW5ndGgpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHRsID0gdGltZWxpbmVzW3RpbWVsaW5lcy5sZW5ndGggLSAxXTsKICAgICAgICAgICAgICAgIGlmICghdGwuYWxsb3dPbmx5VGltZWxpbmVTdHlsZXMoKSkgewogICAgICAgICAgICAgICAgICAgIHRsLnNldFN0eWxlcyhbZmluYWxTdHlsZXNdLCBudWxsLCBjb250ZXh0LmVycm9ycywgb3B0aW9ucyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRpbWVsaW5lcy5sZW5ndGggPyB0aW1lbGluZXMubWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSB0aW1lbGluZQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGltZWxpbmUgPT4gdGltZWxpbmUuYnVpbGRLZXlmcmFtZXMoKSkpIDoKICAgICAgICAgICAgICAgIFtjcmVhdGVUaW1lbGluZUluc3RydWN0aW9uKHJvb3RFbGVtZW50LCBbXSwgW10sIFtdLCAwLCAwLCAnJywgZmFsc2UpXTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBhc3QKICAgICAgICAgKiBAcGFyYW0gez99IGNvbnRleHQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHZpc2l0VHJpZ2dlcihhc3QsIGNvbnRleHQpIHsKICAgICAgICAgICAgLy8gdGhlc2UgdmFsdWVzIGFyZSBub3QgdmlzaXRlZCBpbiB0aGlzIEFTVAogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGFzdAogICAgICAgICAqIEBwYXJhbSB7P30gY29udGV4dAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdmlzaXRTdGF0ZShhc3QsIGNvbnRleHQpIHsKICAgICAgICAgICAgLy8gdGhlc2UgdmFsdWVzIGFyZSBub3QgdmlzaXRlZCBpbiB0aGlzIEFTVAogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGFzdAogICAgICAgICAqIEBwYXJhbSB7P30gY29udGV4dAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdmlzaXRUcmFuc2l0aW9uKGFzdCwgY29udGV4dCkgewogICAgICAgICAgICAvLyB0aGVzZSB2YWx1ZXMgYXJlIG5vdCB2aXNpdGVkIGluIHRoaXMgQVNUCiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gYXN0CiAgICAgICAgICogQHBhcmFtIHs/fSBjb250ZXh0CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB2aXNpdEFuaW1hdGVDaGlsZChhc3QsIGNvbnRleHQpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBlbGVtZW50SW5zdHJ1Y3Rpb25zID0gY29udGV4dC5zdWJJbnN0cnVjdGlvbnMuY29uc3VtZShjb250ZXh0LmVsZW1lbnQpOwogICAgICAgICAgICBpZiAoZWxlbWVudEluc3RydWN0aW9ucykgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgaW5uZXJDb250ZXh0ID0gY29udGV4dC5jcmVhdGVTdWJDb250ZXh0KGFzdC5vcHRpb25zKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHN0YXJ0VGltZSA9IGNvbnRleHQuY3VycmVudFRpbWVsaW5lLmN1cnJlbnRUaW1lOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZW5kVGltZSA9IHRoaXMuX3Zpc2l0U3ViSW5zdHJ1Y3Rpb25zKGVsZW1lbnRJbnN0cnVjdGlvbnMsIGlubmVyQ29udGV4dCwgKC8qKiBAdHlwZSB7P30gKi8gKGlubmVyQ29udGV4dC5vcHRpb25zKSkpOwogICAgICAgICAgICAgICAgaWYgKHN0YXJ0VGltZSAhPSBlbmRUaW1lKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gd2UgZG8gdGhpcyBvbiB0aGUgdXBwZXIgY29udGV4dCBiZWNhdXNlIHdlIGNyZWF0ZWQgYSBzdWIgY29udGV4dCBmb3IKICAgICAgICAgICAgICAgICAgICAvLyB0aGUgc3ViIGNoaWxkIGFuaW1hdGlvbnMKICAgICAgICAgICAgICAgICAgICBjb250ZXh0LnRyYW5zZm9ybUludG9OZXdUaW1lbGluZShlbmRUaW1lKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBjb250ZXh0LnByZXZpb3VzTm9kZSA9IGFzdDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBhc3QKICAgICAgICAgKiBAcGFyYW0gez99IGNvbnRleHQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHZpc2l0QW5pbWF0ZVJlZihhc3QsIGNvbnRleHQpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBpbm5lckNvbnRleHQgPSBjb250ZXh0LmNyZWF0ZVN1YkNvbnRleHQoYXN0Lm9wdGlvbnMpOwogICAgICAgICAgICBpbm5lckNvbnRleHQudHJhbnNmb3JtSW50b05ld1RpbWVsaW5lKCk7CiAgICAgICAgICAgIHRoaXMudmlzaXRSZWZlcmVuY2UoYXN0LmFuaW1hdGlvbiwgaW5uZXJDb250ZXh0KTsKICAgICAgICAgICAgY29udGV4dC50cmFuc2Zvcm1JbnRvTmV3VGltZWxpbmUoaW5uZXJDb250ZXh0LmN1cnJlbnRUaW1lbGluZS5jdXJyZW50VGltZSk7CiAgICAgICAgICAgIGNvbnRleHQucHJldmlvdXNOb2RlID0gYXN0OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gaW5zdHJ1Y3Rpb25zCiAgICAgICAgICogQHBhcmFtIHs/fSBjb250ZXh0CiAgICAgICAgICogQHBhcmFtIHs/fSBvcHRpb25zCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfdmlzaXRTdWJJbnN0cnVjdGlvbnMoaW5zdHJ1Y3Rpb25zLCBjb250ZXh0LCBvcHRpb25zKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc3RhcnRUaW1lID0gY29udGV4dC5jdXJyZW50VGltZWxpbmUuY3VycmVudFRpbWU7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGZ1cnRoZXN0VGltZSA9IHN0YXJ0VGltZTsKICAgICAgICAgICAgLy8gdGhpcyBpcyBhIHNwZWNpYWwtY2FzZSBmb3Igd2hlbiBhIHVzZXIgd2FudHMgdG8gc2tpcCBhIHN1YgogICAgICAgICAgICAvLyBhbmltYXRpb24gZnJvbSBiZWluZyBmaXJlZCBlbnRpcmVseS4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBkdXJhdGlvbiA9IG9wdGlvbnMuZHVyYXRpb24gIT0gbnVsbCA/IHJlc29sdmVUaW1pbmdWYWx1ZShvcHRpb25zLmR1cmF0aW9uKSA6IG51bGw7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZGVsYXkgPSBvcHRpb25zLmRlbGF5ICE9IG51bGwgPyByZXNvbHZlVGltaW5nVmFsdWUob3B0aW9ucy5kZWxheSkgOiBudWxsOwogICAgICAgICAgICBpZiAoZHVyYXRpb24gIT09IDApIHsKICAgICAgICAgICAgICAgIGluc3RydWN0aW9ucy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gaW5zdHJ1Y3Rpb24KICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIGluc3RydWN0aW9uID0+IHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25UaW1pbmdzID0gY29udGV4dC5hcHBlbmRJbnN0cnVjdGlvblRvVGltZWxpbmUoaW5zdHJ1Y3Rpb24sIGR1cmF0aW9uLCBkZWxheSk7CiAgICAgICAgICAgICAgICAgICAgZnVydGhlc3RUaW1lID0KICAgICAgICAgICAgICAgICAgICAgICAgTWF0aC5tYXgoZnVydGhlc3RUaW1lLCBpbnN0cnVjdGlvblRpbWluZ3MuZHVyYXRpb24gKyBpbnN0cnVjdGlvblRpbWluZ3MuZGVsYXkpOwogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBmdXJ0aGVzdFRpbWU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gYXN0CiAgICAgICAgICogQHBhcmFtIHs/fSBjb250ZXh0CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB2aXNpdFJlZmVyZW5jZShhc3QsIGNvbnRleHQpIHsKICAgICAgICAgICAgY29udGV4dC51cGRhdGVPcHRpb25zKGFzdC5vcHRpb25zLCB0cnVlKTsKICAgICAgICAgICAgdmlzaXREc2xOb2RlKHRoaXMsIGFzdC5hbmltYXRpb24sIGNvbnRleHQpOwogICAgICAgICAgICBjb250ZXh0LnByZXZpb3VzTm9kZSA9IGFzdDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBhc3QKICAgICAgICAgKiBAcGFyYW0gez99IGNvbnRleHQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHZpc2l0U2VxdWVuY2UoYXN0LCBjb250ZXh0KSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc3ViQ29udGV4dENvdW50ID0gY29udGV4dC5zdWJDb250ZXh0Q291bnQ7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGN0eCA9IGNvbnRleHQ7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgb3B0aW9ucyA9IGFzdC5vcHRpb25zOwogICAgICAgICAgICBpZiAob3B0aW9ucyAmJiAob3B0aW9ucy5wYXJhbXMgfHwgb3B0aW9ucy5kZWxheSkpIHsKICAgICAgICAgICAgICAgIGN0eCA9IGNvbnRleHQuY3JlYXRlU3ViQ29udGV4dChvcHRpb25zKTsKICAgICAgICAgICAgICAgIGN0eC50cmFuc2Zvcm1JbnRvTmV3VGltZWxpbmUoKTsKICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLmRlbGF5ICE9IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICBpZiAoY3R4LnByZXZpb3VzTm9kZS50eXBlID09IDYgLyogU3R5bGUgKi8pIHsKICAgICAgICAgICAgICAgICAgICAgICAgY3R4LmN1cnJlbnRUaW1lbGluZS5zbmFwc2hvdEN1cnJlbnRTdHlsZXMoKTsKICAgICAgICAgICAgICAgICAgICAgICAgY3R4LnByZXZpb3VzTm9kZSA9IERFRkFVTFRfTk9PUF9QUkVWSU9VU19OT0RFOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgZGVsYXkgPSByZXNvbHZlVGltaW5nVmFsdWUob3B0aW9ucy5kZWxheSk7CiAgICAgICAgICAgICAgICAgICAgY3R4LmRlbGF5TmV4dFN0ZXAoZGVsYXkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChhc3Quc3RlcHMubGVuZ3RoKSB7CiAgICAgICAgICAgICAgICBhc3Quc3RlcHMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHMKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIHMgPT4gdmlzaXREc2xOb2RlKHRoaXMsIHMsIGN0eCkpKTsKICAgICAgICAgICAgICAgIC8vIHRoaXMgaXMgaGVyZSBqdXN0IGluY2FzZSB0aGUgaW5uZXIgc3RlcHMgb25seSBjb250YWluIG9yIGVuZCB3aXRoIGEgc3R5bGUoKSBjYWxsCiAgICAgICAgICAgICAgICBjdHguY3VycmVudFRpbWVsaW5lLmFwcGx5U3R5bGVzVG9LZXlmcmFtZSgpOwogICAgICAgICAgICAgICAgLy8gdGhpcyBtZWFucyB0aGF0IHNvbWUgYW5pbWF0aW9uIGZ1bmN0aW9uIHdpdGhpbiB0aGUgc2VxdWVuY2UKICAgICAgICAgICAgICAgIC8vIGVuZGVkIHVwIGNyZWF0aW5nIGEgc3ViIHRpbWVsaW5lICh3aGljaCBtZWFucyB0aGUgY3VycmVudAogICAgICAgICAgICAgICAgLy8gdGltZWxpbmUgY2Fubm90IG92ZXJsYXAgd2l0aCB0aGUgY29udGVudHMgb2YgdGhlIHNlcXVlbmNlKQogICAgICAgICAgICAgICAgaWYgKGN0eC5zdWJDb250ZXh0Q291bnQgPiBzdWJDb250ZXh0Q291bnQpIHsKICAgICAgICAgICAgICAgICAgICBjdHgudHJhbnNmb3JtSW50b05ld1RpbWVsaW5lKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY29udGV4dC5wcmV2aW91c05vZGUgPSBhc3Q7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gYXN0CiAgICAgICAgICogQHBhcmFtIHs/fSBjb250ZXh0CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB2aXNpdEdyb3VwKGFzdCwgY29udGV4dCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGlubmVyVGltZWxpbmVzID0gW107CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGZ1cnRoZXN0VGltZSA9IGNvbnRleHQuY3VycmVudFRpbWVsaW5lLmN1cnJlbnRUaW1lOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGRlbGF5ID0gYXN0Lm9wdGlvbnMgJiYgYXN0Lm9wdGlvbnMuZGVsYXkgPyByZXNvbHZlVGltaW5nVmFsdWUoYXN0Lm9wdGlvbnMuZGVsYXkpIDogMDsKICAgICAgICAgICAgYXN0LnN0ZXBzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHMKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHMgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgaW5uZXJDb250ZXh0ID0gY29udGV4dC5jcmVhdGVTdWJDb250ZXh0KGFzdC5vcHRpb25zKTsKICAgICAgICAgICAgICAgIGlmIChkZWxheSkgewogICAgICAgICAgICAgICAgICAgIGlubmVyQ29udGV4dC5kZWxheU5leHRTdGVwKGRlbGF5KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHZpc2l0RHNsTm9kZSh0aGlzLCBzLCBpbm5lckNvbnRleHQpOwogICAgICAgICAgICAgICAgZnVydGhlc3RUaW1lID0gTWF0aC5tYXgoZnVydGhlc3RUaW1lLCBpbm5lckNvbnRleHQuY3VycmVudFRpbWVsaW5lLmN1cnJlbnRUaW1lKTsKICAgICAgICAgICAgICAgIGlubmVyVGltZWxpbmVzLnB1c2goaW5uZXJDb250ZXh0LmN1cnJlbnRUaW1lbGluZSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgLy8gdGhpcyBvcGVyYXRpb24gaXMgcnVuIGFmdGVyIHRoZSBBU1QgbG9vcCBiZWNhdXNlIG90aGVyd2lzZQogICAgICAgICAgICAvLyBpZiB0aGUgcGFyZW50IHRpbWVsaW5lJ3MgY29sbGVjdGVkIHN0eWxlcyB3ZXJlIHVwZGF0ZWQgdGhlbgogICAgICAgICAgICAvLyBpdCB3b3VsZCBwYXNzIGluIGludmFsaWQgZGF0YSBpbnRvIHRoZSBuZXctdG8tYmUgZm9ya2VkIGl0ZW1zCiAgICAgICAgICAgIGlubmVyVGltZWxpbmVzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHRpbWVsaW5lCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aW1lbGluZSA9PiBjb250ZXh0LmN1cnJlbnRUaW1lbGluZS5tZXJnZVRpbWVsaW5lQ29sbGVjdGVkU3R5bGVzKHRpbWVsaW5lKSkpOwogICAgICAgICAgICBjb250ZXh0LnRyYW5zZm9ybUludG9OZXdUaW1lbGluZShmdXJ0aGVzdFRpbWUpOwogICAgICAgICAgICBjb250ZXh0LnByZXZpb3VzTm9kZSA9IGFzdDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGFzdAogICAgICAgICAqIEBwYXJhbSB7P30gY29udGV4dAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3Zpc2l0VGltaW5nKGFzdCwgY29udGV4dCkgewogICAgICAgICAgICBpZiAoKCgvKiogQHR5cGUgez99ICovIChhc3QpKSkuZHluYW1pYykgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3Qgc3RyVmFsdWUgPSAoKC8qKiBAdHlwZSB7P30gKi8gKGFzdCkpKS5zdHJWYWx1ZTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHRpbWluZ1ZhbHVlID0gY29udGV4dC5wYXJhbXMgPyBpbnRlcnBvbGF0ZVBhcmFtcyhzdHJWYWx1ZSwgY29udGV4dC5wYXJhbXMsIGNvbnRleHQuZXJyb3JzKSA6IHN0clZhbHVlOwogICAgICAgICAgICAgICAgcmV0dXJuIHJlc29sdmVUaW1pbmcodGltaW5nVmFsdWUsIGNvbnRleHQuZXJyb3JzKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHJldHVybiB7IGR1cmF0aW9uOiBhc3QuZHVyYXRpb24sIGRlbGF5OiBhc3QuZGVsYXksIGVhc2luZzogYXN0LmVhc2luZyB9OwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gYXN0CiAgICAgICAgICogQHBhcmFtIHs/fSBjb250ZXh0CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB2aXNpdEFuaW1hdGUoYXN0LCBjb250ZXh0KSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdGltaW5ncyA9IGNvbnRleHQuY3VycmVudEFuaW1hdGVUaW1pbmdzID0gdGhpcy5fdmlzaXRUaW1pbmcoYXN0LnRpbWluZ3MsIGNvbnRleHQpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHRpbWVsaW5lID0gY29udGV4dC5jdXJyZW50VGltZWxpbmU7CiAgICAgICAgICAgIGlmICh0aW1pbmdzLmRlbGF5KSB7CiAgICAgICAgICAgICAgICBjb250ZXh0LmluY3JlbWVudFRpbWUodGltaW5ncy5kZWxheSk7CiAgICAgICAgICAgICAgICB0aW1lbGluZS5zbmFwc2hvdEN1cnJlbnRTdHlsZXMoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHN0eWxlID0gYXN0LnN0eWxlOwogICAgICAgICAgICBpZiAoc3R5bGUudHlwZSA9PSA1IC8qIEtleWZyYW1lcyAqLykgewogICAgICAgICAgICAgICAgdGhpcy52aXNpdEtleWZyYW1lcyhzdHlsZSwgY29udGV4dCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBjb250ZXh0LmluY3JlbWVudFRpbWUodGltaW5ncy5kdXJhdGlvbik7CiAgICAgICAgICAgICAgICB0aGlzLnZpc2l0U3R5bGUoKC8qKiBAdHlwZSB7P30gKi8gKHN0eWxlKSksIGNvbnRleHQpOwogICAgICAgICAgICAgICAgdGltZWxpbmUuYXBwbHlTdHlsZXNUb0tleWZyYW1lKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY29udGV4dC5jdXJyZW50QW5pbWF0ZVRpbWluZ3MgPSBudWxsOwogICAgICAgICAgICBjb250ZXh0LnByZXZpb3VzTm9kZSA9IGFzdDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBhc3QKICAgICAgICAgKiBAcGFyYW0gez99IGNvbnRleHQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHZpc2l0U3R5bGUoYXN0LCBjb250ZXh0KSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdGltZWxpbmUgPSBjb250ZXh0LmN1cnJlbnRUaW1lbGluZTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB0aW1pbmdzID0gKC8qKiBAdHlwZSB7P30gKi8gKGNvbnRleHQuY3VycmVudEFuaW1hdGVUaW1pbmdzKSk7CiAgICAgICAgICAgIC8vIHRoaXMgaXMgYSBzcGVjaWFsIGNhc2UgZm9yIHdoZW4gYSBzdHlsZSgpIGNhbGwKICAgICAgICAgICAgLy8gZGlyZWN0bHkgZm9sbG93cyAgYW4gYW5pbWF0ZSgpIGNhbGwgKGJ1dCBub3QgaW5zaWRlIG9mIGFuIGFuaW1hdGUoKSBjYWxsKQogICAgICAgICAgICBpZiAoIXRpbWluZ3MgJiYgdGltZWxpbmUuZ2V0Q3VycmVudFN0eWxlUHJvcGVydGllcygpLmxlbmd0aCkgewogICAgICAgICAgICAgICAgdGltZWxpbmUuZm9yd2FyZEZyYW1lKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBlYXNpbmcgPSAodGltaW5ncyAmJiB0aW1pbmdzLmVhc2luZykgfHwgYXN0LmVhc2luZzsKICAgICAgICAgICAgaWYgKGFzdC5pc0VtcHR5U3RlcCkgewogICAgICAgICAgICAgICAgdGltZWxpbmUuYXBwbHlFbXB0eVN0ZXAoZWFzaW5nKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRpbWVsaW5lLnNldFN0eWxlcyhhc3Quc3R5bGVzLCBlYXNpbmcsIGNvbnRleHQuZXJyb3JzLCBjb250ZXh0Lm9wdGlvbnMpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNvbnRleHQucHJldmlvdXNOb2RlID0gYXN0OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGFzdAogICAgICAgICAqIEBwYXJhbSB7P30gY29udGV4dAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdmlzaXRLZXlmcmFtZXMoYXN0LCBjb250ZXh0KSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgY3VycmVudEFuaW1hdGVUaW1pbmdzID0gKC8qKiBAdHlwZSB7P30gKi8gKGNvbnRleHQuY3VycmVudEFuaW1hdGVUaW1pbmdzKSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc3RhcnRUaW1lID0gKCgvKiogQHR5cGUgez99ICovIChjb250ZXh0LmN1cnJlbnRUaW1lbGluZSkpKS5kdXJhdGlvbjsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBkdXJhdGlvbiA9IGN1cnJlbnRBbmltYXRlVGltaW5ncy5kdXJhdGlvbjsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBpbm5lckNvbnRleHQgPSBjb250ZXh0LmNyZWF0ZVN1YkNvbnRleHQoKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBpbm5lclRpbWVsaW5lID0gaW5uZXJDb250ZXh0LmN1cnJlbnRUaW1lbGluZTsKICAgICAgICAgICAgaW5uZXJUaW1lbGluZS5lYXNpbmcgPSBjdXJyZW50QW5pbWF0ZVRpbWluZ3MuZWFzaW5nOwogICAgICAgICAgICBhc3Quc3R5bGVzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHN0ZXAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHN0ZXAgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2V0ID0gc3RlcC5vZmZzZXQgfHwgMDsKICAgICAgICAgICAgICAgIGlubmVyVGltZWxpbmUuZm9yd2FyZFRpbWUob2Zmc2V0ICogZHVyYXRpb24pOwogICAgICAgICAgICAgICAgaW5uZXJUaW1lbGluZS5zZXRTdHlsZXMoc3RlcC5zdHlsZXMsIHN0ZXAuZWFzaW5nLCBjb250ZXh0LmVycm9ycywgY29udGV4dC5vcHRpb25zKTsKICAgICAgICAgICAgICAgIGlubmVyVGltZWxpbmUuYXBwbHlTdHlsZXNUb0tleWZyYW1lKCk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgLy8gdGhpcyB3aWxsIGVuc3VyZSB0aGF0IHRoZSBwYXJlbnQgdGltZWxpbmUgZ2V0cyBhbGwgdGhlIHN0eWxlcyBmcm9tCiAgICAgICAgICAgIC8vIHRoZSBjaGlsZCBldmVuIGlmIHRoZSBuZXcgdGltZWxpbmUgYmVsb3cgaXMgbm90IHVzZWQKICAgICAgICAgICAgY29udGV4dC5jdXJyZW50VGltZWxpbmUubWVyZ2VUaW1lbGluZU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KiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGRlbGF5ID0gb3B0aW9ucy5kZWxheSA/IHJlc29sdmVUaW1pbmdWYWx1ZShvcHRpb25zLmRlbGF5KSA6IDA7CiAgICAgICAgICAgIGlmIChkZWxheSAmJgogICAgICAgICAgICAgICAgKGNvbnRleHQucHJldmlvdXNOb2RlLnR5cGUgPT09IDYgLyogU3R5bGUgKi8gfHwKICAgICAgICAgICAgICAgICAgICAoc3RhcnRUaW1lID09IDAgJiYgY29udGV4dC5jdXJyZW50VGltZWxpbmUuZ2V0Q3VycmVudFN0eWxlUHJvcGVydGllcygpLmxlbmd0aCkpKSB7CiAgICAgICAgICAgICAgICBjb250ZXh0LmN1cnJlbnRUaW1lbGluZS5zbmFwc2hvdEN1cnJlbnRTdHlsZXMoKTsKICAgICAgICAgICAgICAgIGNvbnRleHQucHJldmlvdXNOb2RlID0gREVGQVVMVF9OT09QX1BSRVZJT1VTX05PREU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgZnVydGhlc3RUaW1lID0gc3RhcnRUaW1lOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGVsbXMgPSBjb250ZXh0Lmludm9rZVF1ZXJ5KGFzdC5zZWxlY3RvciwgYXN0Lm9yaWdpbmFsU2VsZWN0b3IsIGFzdC5saW1pdCwgYXN0LmluY2x1ZGVTZWxmLCBvcHRpb25zLm9wdGlvbmFsID8gdHJ1ZSA6IGZhbHNlLCBjb250ZXh0LmVycm9ycyk7CiAgICAgICAgICAgIGNvbnRleHQuY3VycmVudFF1ZXJ5VG90YWwgPSBlbG1zLmxlbmd0aDsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgc2FtZUVsZW1lbnRUaW1lbGluZSA9IG51bGw7CiAgICAgICAgICAgIGVsbXMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAgICAgKiBAcGFyYW0gez99IGkKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChlbGVtZW50LCBpKSA9PiB7CiAgICAgICAgICAgICAgICBjb250ZXh0LmN1cnJlbnRRdWVyeUluZGV4ID0gaTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGlubmVyQ29udGV4dCA9IGNvbnRleHQuY3JlYXRlU3ViQ29udGV4dChhc3Qub3B0aW9ucywgZWxlbWVudCk7CiAgICAgICAgICAgICAgICBpZiAoZGVsYXkpIHsKICAgICAgICAgICAgICAgICAgICBpbm5lckNvbnRleHQuZGVsYXlOZXh0U3RlcChkZWxheSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAoZWxlbWVudCA9PT0gY29udGV4dC5lbGVtZW50KSB7CiAgICAgICAgICAgICAgICAgICAgc2FtZUVsZW1lbnRUaW1lbGluZSA9IGlubmVyQ29udGV4dC5jdXJyZW50VGltZWxpbmU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB2aXNpdERzbE5vZGUodGhpcywgYXN0LmFuaW1hdGlvbiwgaW5uZXJDb250ZXh0KTsKICAgICAgICAgICAgICAgIC8vIHRoaXMgaXMgaGVyZSBqdXN0IGluY2FzZSB0aGUgaW5uZXIgc3RlcHMgb25seSBjb250YWluIG9yIGVuZAogICAgICAgICAgICAgICAgLy8gd2l0aCBhIHN0eWxlKCkgY2FsbCAod2hpY2ggaXMgaGVyZSB0byBzaWduYWwgdGhhdCB0aGlzIGlzIGEgcHJlcGFyYXRvcnkKICAgICAgICAgICAgICAgIC8vIGNhbGwgdG8gc3R5bGUgYW4gZWxlbWVudCBiZWZvcmUgaXQgaXMgYW5pbWF0ZWQgYWdhaW4pCiAgICAgICAgICAgICAgICBpbm5lckNvbnRleHQuY3VycmVudFRpbWVsaW5lLmFwcGx5U3R5bGVzVG9LZXlmcmFtZSgpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZW5kVGltZSA9IGlubmVyQ29udGV4dC5jdXJyZW50VGltZWxpbmUuY3VycmVudFRpbWU7CiAgICAgICAgICAgICAgICBmdXJ0aGVzdFRpbWUgPSBNYXRoLm1heChmdXJ0aGVzdFRpbWUsIGVuZFRpbWUpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIGNvbnRleHQuY3VycmVudFF1ZXJ5SW5kZXggPSAwOwogICAgICAgICAgICBjb250ZXh0LmN1cnJlbnRRdWVyeVRvdGFsID0gMDsKICAgICAgICAgICAgY29udGV4dC50cmFuc2Zvcm1JbnRvTmV3VGltZWxpbmUoZnVydGhlc3RUaW1lKTsKICAgICAgICAgICAgaWYgKHNhbWVFbGVtZW50VGltZWxpbmUpIHsKICAgICAgICAgICAgICAgIGNvbnRleHQuY3VycmVudFRpbWVsaW5lLm1lcmdlVGltZWxpbmVDb2xsZWN0ZWRTdHlsZXMoc2FtZUVsZW1lbnRUaW1lbGluZSk7CiAgICAgICAgICAgICAgICBjb250ZXh0LmN1cnJlbnRUaW1lbGluZS5zbmFwc2hvdEN1cnJlbnRTdHlsZXMoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBjb250ZXh0LnByZXZpb3VzTm9kZSA9IGFzdDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBhc3QKICAgICAgICAgKiBAcGFyYW0gez99IGNvbnRleHQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHZpc2l0U3RhZ2dlcihhc3QsIGNvbnRleHQpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwYXJlbnRDb250ZXh0ID0gKC8qKiBAdHlwZSB7P30gKi8gKGNvbnRleHQucGFyZW50Q29udGV4dCkpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHRsID0gY29udGV4dC5jdXJyZW50VGltZWxpbmU7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdGltaW5ncyA9IGFzdC50aW1pbmdzOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGR1cmF0aW9uID0gTWF0aC5hYnModGltaW5ncy5kdXJhdGlvbik7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbWF4VGltZSA9IGR1cmF0aW9uICogKGNvbnRleHQuY3VycmVudFF1ZXJ5VG90YWwgLSAxKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgZGVsYXkgPSBkdXJhdGlvbiAqIGNvbnRleHQuY3VycmVudFF1ZXJ5SW5kZXg7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHN0YWdnZXJUcmFuc2Zvcm1lciA9IHRpbWluZ3MuZHVyYXRpb24gPCAwID8gJ3JldmVyc2UnIDogdGltaW5ncy5lYXNpbmc7CiAgICAgICAgICAgIHN3aXRjaCAoc3RhZ2dlclRyYW5zZm9ybWVyKSB7CiAgICAgICAgICAgICAgICBjYXNlICdyZXZlcnNlJzoKICAgICAgICAgICAgICAgICAgICBkZWxheSA9IG1heFRpbWUgLSBkZWxheTsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIGNhc2UgJ2Z1bGwnOgogICAgICAgICAgICAgICAgICAgIGRlbGF5ID0gcGFyZW50Q29udGV4dC5jdXJyZW50U3RhZ2dlclRpbWU7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB0aW1lbGluZSA9IGNvbnRleHQuY3VycmVudFRpbWVsaW5lOwogICAgICAgICAgICBpZiAoZGVsYXkpIHsKICAgICAgICAgICAgICAgIHRpbWVsaW5lLmRlbGF5TmV4dFN0ZXAoZGVsYXkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc3RhcnRpbmdUaW1lID0gdGltZWxpbmUuY3VycmVudFRpbWU7CiAgICAgICAgICAgIHZpc2l0RHNsTm9kZSh0aGlzLCBhc3QuYW5pbWF0aW9uLCBjb250ZXh0KTsKICAgICAgICAgICAgY29udGV4dC5wcmV2aW91c05vZGUgPSBhc3Q7CiAgICAgICAgICAgIC8vIHRpbWUgPSBkdXJhdGlvbiArIGRlbGF5CiAgICAgICAgICAgIC8vIHRoZSByZWFzb24gd2h5IHRoaXMgY29tcHV0YXRpb24gaXMgc28gY29tcGxleCBpcyBiZWNhdXNlCiAgICAgICAgICAgIC8vIHRoZSBpbm5lciB0aW1lbGluZSBtYXkgZWl0aGVyIGhhdmUgYSBkZWxheSB2YWx1ZSBvciBhIHN0cmV0Y2hlZAogICAgICAgICAgICAvLyBrZXlmcmFtZSBkZXBlbmRpbmcgb24gaWYgYSBzdWJ0aW1lbGluZSBpcyBub3QgdXNlZCBvciBpcyB1c2VkLgogICAgICAgICAgICBwYXJlbnRDb250ZXh0LmN1cnJlbnRTdGFnZ2VyVGltZSA9CiAgICAgICAgICAgICAgICAodGwuY3VycmVudFRpbWUgLSBzdGFydGluZ1RpbWUpICsgKHRsLnN0YXJ0VGltZSAtIHBhcmVudENvbnRleHQuY3VycmVudFRpbWVsaW5lLnN0YXJ0VGltZSk7CiAgICAgICAgfQogICAgfQogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgREVGQVVMVF9OT09QX1BSRVZJT1VTX05PREUgPSAoLyoqIEB0eXBlIHs/fSAqLyAoe30pKTsKICAgIGNsYXNzIEFuaW1hdGlvblRpbWVsaW5lQ29udGV4dCB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBfZHJpdmVyCiAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgICAgICogQHBhcmFtIHs/fSBzdWJJbnN0cnVjdGlvbnMKICAgICAgICAgKiBAcGFyYW0gez99IF9lbnRlckNsYXNzTmFtZQogICAgICAgICAqIEBwYXJhbSB7P30gX2xlYXZlQ2xhc3NOYW1lCiAgICAgICAgICogQHBhcmFtIHs/fSBlcnJvcnMKICAgICAgICAgKiBAcGFyYW0gez99IHRpbWVsaW5lcwogICAgICAgICAqIEBwYXJhbSB7Pz19IGluaXRpYWxUaW1lbGluZQogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKF9kcml2ZXIsIGVsZW1lbnQsIHN1Ykluc3RydWN0aW9ucywgX2VudGVyQ2xhc3NOYW1lLCBfbGVhdmVDbGFzc05hbWUsIGVycm9ycywgdGltZWxpbmVzLCBpbml0aWFsVGltZWxpbmUpIHsKICAgICAgICAgICAgdGhpcy5fZHJpdmVyID0gX2RyaXZlcjsKICAgICAgICAgICAgdGhpcy5lbGVtZW50ID0gZWxlbWVudDsKICAgICAgICAgICAgdGhpcy5zdWJJbnN0cnVjdGlvbnMgPSBzdWJJbnN0cnVjdGlvbnM7CiAgICAgICAgICAgIHRoaXMuX2VudGVyQ2xhc3NOYW1lID0gX2VudGVyQ2xhc3NOYW1lOwogICAgICAgICAgICB0aGlzLl9sZWF2ZUNsYXNzTmFtZSA9IF9sZWF2ZUNsYXNzTmFtZTsKICAgICAgICAgICAgdGhpcy5lcnJvcnMgPSBlcnJvcnM7CiAgICAgICAgICAgIHRoaXMudGltZWxpbmVzID0gdGltZWxpbmVzOwogICAgICAgICAgICB0aGlzLnBhcmVudENvbnRleHQgPSBudWxsOwogICAgICAgICAgICB0aGlzLmN1cnJlbnRBbmltYXRlVGltaW5ncyA9IG51bGw7CiAgICAgICAgICAgIHRoaXMucHJldmlvdXNOb2RlID0gREVGQVVMVF9OT09QX1BSRVZJT1VTX05PREU7CiAgICAgICAgICAgIHRoaXMuc3ViQ29udGV4dENvdW50ID0gMDsKICAgICAgICAgICAgdGhpcy5vcHRpb25zID0ge307CiAgICAgICAgICAgIHRoaXMuY3VycmVudFF1ZXJ5SW5kZXggPSAwOwogICAgICAgICAgICB0aGlzLmN1cnJlbnRRdWVyeVRvdGFsID0gMDsKICAgICAgICAgICAgdGhpcy5jdXJyZW50U3RhZ2dlclRpbWUgPSAwOwogICAgICAgICAgICB0aGlzLmN1cnJlbnRUaW1lbGluZSA9IGluaXRpYWxUaW1lbGluZSB8fCBuZXcgVGltZWxpbmVCdWlsZGVyKHRoaXMuX2RyaXZlciwgZWxlbWVudCwgMCk7CiAgICAgICAgICAgIHRpbWVsaW5lcy5wdXNoKHRoaXMuY3VycmVudFRpbWVsaW5lKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgcGFyYW1zKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5vcHRpb25zLnBhcmFtczsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBvcHRpb25zCiAgICAgICAgICogQHBhcmFtIHs/PX0gc2tpcElmRXhpc3RzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB1cGRhdGVPcHRpb25zKG9wdGlvbnMsIHNraXBJZkV4aXN0cykgewogICAgICAgICAgICBpZiAoIW9wdGlvbnMpCiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbmV3T3B0aW9ucyA9ICgvKiogQHR5cGUgez99ICovIChvcHRpb25zKSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IG9wdGlvbnNUb1VwZGF0ZSA9IHRoaXMub3B0aW9uczsKICAgICAgICAgICAgLy8gTk9URTogdGhpcyB3aWxsIGdldCBwYXRjaGVkIHVwIHdoZW4gb3RoZXIgYW5pbWF0aW9uIG1ldGhvZHMgc3VwcG9ydCBkdXJhdGlvbiBvdmVycmlkZXMKICAgICAgICAgICAgaWYgKG5ld09wdGlvbnMuZHVyYXRpb24gIT0gbnVsbCkgewogICAgICAgICAgICAgICAgKCgvKiogQHR5cGUgez99ICovIChvcHRpb25zVG9VcGRhdGUpKSkuZHVyYXRpb24gPSByZXNvbHZlVGltaW5nVmFsdWUobmV3T3B0aW9ucy5kdXJhdGlvbik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKG5ld09wdGlvbnMuZGVsYXkgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgb3B0aW9uc1RvVXBkYXRlLmRlbGF5ID0gcmVzb2x2ZVRpbWluZ1ZhbHVlKG5ld09wdGlvbnMuZGVsYXkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbmV3UGFyYW1zID0gbmV3T3B0aW9ucy5wYXJhbXM7CiAgICAgICAgICAgIGlmIChuZXdQYXJhbXMpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCBwYXJhbXNUb1VwZGF0ZSA9ICgvKiogQHR5cGUgez99ICovIChvcHRpb25zVG9VcGRhdGUucGFyYW1zKSk7CiAgICAgICAgICAgICAgICBpZiAoIXBhcmFtc1RvVXBkYXRlKSB7CiAgICAgICAgICAgICAgICAgICAgcGFyYW1zVG9VcGRhdGUgPSB0aGlzLm9wdGlvbnMucGFyYW1zID0ge307CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyhuZXdQYXJhbXMpLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBuYW1lCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBuYW1lID0+IHsKICAgICAgICAgICAgICAgICAgICBpZiAoIXNraXBJZkV4aXN0cyB8fCAhcGFyYW1zVG9VcGRhdGUuaGFzT3duUHJvcGVydHkobmFtZSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zVG9VcGRhdGVbbmFtZV0gPSBpbnRlcnBvbGF0ZVBhcmFtcyhuZXdQYXJhbXNbbmFtZV0sIHBhcmFtc1RvVXBkYXRlLCB0aGlzLmVycm9ycyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfY29weU9wdGlvbnMoKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgb3B0aW9ucyA9IHt9OwogICAgICAgICAgICBpZiAodGhpcy5vcHRpb25zKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBvbGRQYXJhbXMgPSB0aGlzLm9wdGlvbnMucGFyYW1zOwogICAgICAgICAgICAgICAgaWYgKG9sZFBhcmFtcykgewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBwYXJhbXMgPSBvcHRpb25zWydwYXJhbXMnXSA9IHt9OwogICAgICAgICAgICAgICAgICAgIE9iamVjdC5rZXlzKG9sZFBhcmFtcykuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBuYW1lCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICBuYW1lID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zW25hbWVdID0gb2xkUGFyYW1zW25hbWVdOwogICAgICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gb3B0aW9uczsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/PX0gb3B0aW9ucwogICAgICAgICAqIEBwYXJhbSB7Pz19IGVsZW1lbnQKICAgICAgICAgKiBAcGFyYW0gez89fSBuZXdUaW1lCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBjcmVhdGVTdWJDb250ZXh0KG9wdGlvbnMgPSBudWxsLCBlbGVtZW50LCBuZXdUaW1lKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdGFyZ2V0ID0gZWxlbWVudCB8fCB0aGlzLmVsZW1lbnQ7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgY29udGV4dCA9IG5ldyBBbmltYXRpb25UaW1lbGluZUNvbnRleHQodGhpcy5fZHJpdmVyLCB0YXJnZXQsIHRoaXMuc3ViSW5zdHJ1Y3Rpb25zLCB0aGlzLl9lbnRlckNsYXNzTmFtZSwgdGhpcy5fbGVhdmVDbGFzc05hbWUsIHRoaXMuZXJyb3JzLCB0aGlzLnRpbWVsaW5lcywgdGhpcy5jdXJyZW50VGltZWxpbmUuZm9yayh0YXJnZXQsIG5ld1RpbWUgfHwgMCkpOwogICAgICAgICAgICBjb250ZXh0LnByZXZpb3VzTm9kZSA9IHRoaXMucHJldmlvdXNOb2RlOwogICAgICAgICAgICBjb250ZXh0LmN1cnJlbnRBbmltYXRlVGltaW5ncyA9IHRoaXMuY3VycmVudEFuaW1hdGVUaW1pbmdzOwogICAgICAgICAgICBjb250ZXh0Lm9wdGlvbnMgPSB0aGlzLl9jb3B5T3B0aW9ucygpOwogICAgICAgICAgICBjb250ZXh0LnVwZGF0ZU9wdGlvbnMob3B0aW9ucyk7CiAgICAgICAgICAgIGNvbnRleHQuY3VycmVudFF1ZXJ5SW5kZXggPSB0aGlzLmN1cnJlbnRRdWVyeUluZGV4OwogICAgICAgICAgICBjb250ZXh0LmN1cnJlbnRRdWVyeVRvdGFsID0gdGhpcy5jdXJyZW50UXVlcnlUb3RhbDsKICAgICAgICAgICAgY29udGV4dC5wYXJlbnRDb250ZXh0ID0gdGhpczsKICAgICAgICAgICAgdGhpcy5zdWJDb250ZXh0Q291bnQrKzsKICAgICAgICAgICAgcmV0dXJuIGNvbnRleHQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7Pz19IG5ld1RpbWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHRyYW5zZm9ybUludG9OZXdUaW1lbGluZShuZXdUaW1lKSB7CiAgICAgICAgICAgIHRoaXMucHJldmlvdXNOb2RlID0gREVGQVVMVF9OT09QX1BSRVZJT1VTX05PREU7CiAgICAgICAgICAgIHRoaXMuY3VycmVudFRpbWVsaW5lID0gdGhpcy5jdXJyZW50VGltZWxpbmUuZm9yayh0aGlzLmVsZW1lbnQsIG5ld1RpbWUpOwogICAgICAgICAgICB0aGlzLnRpbWVsaW5lcy5wdXNoKHRoaXMuY3VycmVudFRpbWVsaW5lKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuY3VycmVudFRpbWVsaW5lOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGluc3RydWN0aW9uCiAgICAgICAgICogQHBhcmFtIHs/fSBkdXJhdGlvbgogICAgICAgICAqIEBwYXJhbSB7P30gZGVsYXkKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGFwcGVuZEluc3RydWN0aW9uVG9UaW1lbGluZShpbnN0cnVjdGlvbiwgZHVyYXRpb24sIGRlbGF5KSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdXBkYXRlZFRpbWluZ3MgPSB7CiAgICAgICAgICAgICAgICBkdXJhdGlvbjogZHVyYXRpb24gIT0gbnVsbCA/IGR1cmF0aW9uIDogaW5zdHJ1Y3Rpb24uZHVyYXRpb24sCiAgICAgICAgICAgICAgICBkZWxheTogdGhpcy5jdXJyZW50VGltZWxpbmUuY3VycmVudFRpbWUgKyAoZGVsYXkgIT0gbnVsbCA/IGRlbGF5IDogMCkgKyBpbnN0cnVjdGlvbi5kZWxheSwKICAgICAgICAgICAgICAgIGVhc2luZzogJycKICAgICAgICAgICAgfTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBidWlsZGVyID0gbmV3IFN1YlRpbWVsaW5lQnVpbGRlcih0aGlzLl9kcml2ZXIsIGluc3RydWN0aW9uLmVsZW1lbnQsIGluc3RydWN0aW9uLmtleWZyYW1lcywgaW5zdHJ1Y3Rpb24ucHJlU3R5bGVQcm9wcywgaW5zdHJ1Y3Rpb24ucG9zdFN0eWxlUHJvcHMsIHVwZGF0ZWRUaW1pbmdzLCBpbnN0cnVjdGlvbi5zdHJldGNoU3RhcnRpbmdLZXlmcmFtZSk7CiAgICAgICAgICAgIHRoaXMudGltZWxpbmVzLnB1c2goYnVpbGRlcik7CiAgICAgICAgICAgIHJldHVybiB1cGRhdGVkVGltaW5nczsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB0aW1lCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBpbmNyZW1lbnRUaW1lKHRpbWUpIHsKICAgICAgICAgICAgdGhpcy5jdXJyZW50VGltZWxpbmUuZm9yd2FyZFRpbWUodGhpcy5jdXJyZW50VGltZWxpbmUuZHVyYXRpb24gKyB0aW1lKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBkZWxheQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZGVsYXlOZXh0U3RlcChkZWxheSkgewogICAgICAgICAgICAvLyBuZWdhdGl2ZSBkZWxheXMgYXJlIG5vdCB5ZXQgc3VwcG9ydGVkCiAgICAgICAgICAgIGlmIChkZWxheSA+IDApIHsKICAgICAgICAgICAgICAgIHRoaXMuY3VycmVudFRpbWVsaW5lLmRlbGF5TmV4dFN0ZXAoZGVsYXkpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gc2VsZWN0b3IKICAgICAgICAgKiBAcGFyYW0gez99IG9yaWdpbmFsU2VsZWN0b3IKICAgICAgICAgKiBAcGFyYW0gez99IGxpbWl0CiAgICAgICAgICogQHBhcmFtIHs/fSBpbmNsdWRlU2VsZgogICAgICAgICAqIEBwYXJhbSB7P30gb3B0aW9uYWwKICAgICAgICAgKiBAcGFyYW0gez99IGVycm9ycwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgaW52b2tlUXVlcnkoc2VsZWN0b3IsIG9yaWdpbmFsU2VsZWN0b3IsIGxpbWl0LCBpbmNsdWRlU2VsZiwgb3B0aW9uYWwsIGVycm9ycykgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCByZXN1bHRzID0gW107CiAgICAgICAgICAgIGlmIChpbmNsdWRlU2VsZikgewogICAgICAgICAgICAgICAgcmVzdWx0cy5wdXNoKHRoaXMuZWxlbWVudCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHNlbGVjdG9yLmxlbmd0aCA+IDApIHsgLy8gaWYgOnNlbGYgaXMgb25seSB1c2VkIHRoZW4gdGhlIHNlbGVjdG9yIGlzIGVtcHR5CiAgICAgICAgICAgICAgICBzZWxlY3RvciA9IHNlbGVjdG9yLnJlcGxhY2UoRU5URVJfVE9LRU5fUkVHRVgsICcuJyArIHRoaXMuX2VudGVyQ2xhc3NOYW1lKTsKICAgICAgICAgICAgICAgIHNlbGVjdG9yID0gc2VsZWN0b3IucmVwbGFjZShMRUFWRV9UT0tFTl9SRUdFWCwgJy4nICsgdGhpcy5fbGVhdmVDbGFzc05hbWUpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgbXVsdGkgPSBsaW1pdCAhPSAxOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IGVsZW1lbnRzID0gdGhpcy5fZHJpdmVyLnF1ZXJ5KHRoaXMuZWxlbWVudCwgc2VsZWN0b3IsIG11bHRpKTsKICAgICAgICAgICAgICAgIGlmIChsaW1pdCAhPT0gMCkgewogICAgICAgICAgICAgICAgICAgIGVsZW1lbnRzID0gbGltaXQgPCAwID8gZWxlbWVudHMuc2xpY2UoZWxlbWVudHMubGVuZ3RoICsgbGltaXQsIGVsZW1lbnRzLmxlbmd0aCkgOgogICAgICAgICAgICAgICAgICAgICAgICBlbGVtZW50cy5zbGljZSgwLCBsaW1pdCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXN1bHRzLnB1c2goLi4uZWxlbWVudHMpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICghb3B0aW9uYWwgJiYgcmVzdWx0cy5sZW5ndGggPT0gMCkgewogICAgICAgICAgICAgICAgZXJyb3JzLnB1c2goYFxgcXVlcnkoIiR7b3JpZ2luYWxTZWxlY3Rvcn0iKVxgIHJldHVybmVkIHplcm8gZWxlbWVudHMuIChVc2UgXGBxdWVyeSgiJHtvcmlnaW5hbFNlbGVjdG9yfSIsIHsgb3B0aW9uYWw6IHRydWUgfSlcYCBpZiB5b3Ugd2lzaCB0byBhbGxvdyB0aGlzLilgKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gcmVzdWx0czsKICAgICAgICB9CiAgICB9CiAgICBjbGFzcyBUaW1lbGluZUJ1aWxkZXIgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gX2RyaXZlcgogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAqIEBwYXJhbSB7P30gc3RhcnRUaW1lCiAgICAgICAgICogQHBhcmFtIHs/PX0gX2VsZW1lbnRUaW1lbGluZVN0eWxlc0xvb2t1cAogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKF9kcml2ZXIsIGVsZW1lbnQsIHN0YXJ0VGltZSwgX2VsZW1lbnRUaW1lbGluZVN0eWxlc0xvb2t1cCkgewogICAgICAgICAgICB0aGlzLl9kcml2ZXIgPSBfZHJpdmVyOwogICAgICAgICAgICB0aGlzLmVsZW1lbnQgPSBlbGVtZW50OwogICAgICAgICAgICB0aGlzLnN0YXJ0VGltZSA9IHN0YXJ0VGltZTsKICAgICAgICAgICAgdGhpcy5fZWxlbWVudFRpbWVsaW5lU3R5bGVzTG9va3VwID0gX2VsZW1lbnRUaW1lbGluZVN0eWxlc0xvb2t1cDsKICAgICAgICAgICAgdGhpcy5kdXJhdGlvbiA9IDA7CiAgICAgICAgICAgIHRoaXMuX3ByZXZpb3VzS2V5ZnJhbWUgPSB7fTsKICAgICAgICAgICAgdGhpcy5fY3VycmVudEtleWZyYW1lID0ge307CiAgICAgICAgICAgIHRoaXMuX2tleWZyYW1lcyA9IG5ldyBNYXAoKTsKICAgICAgICAgICAgdGhpcy5fc3R5bGVTdW1tYXJ5ID0ge307CiAgICAgICAgICAgIHRoaXMuX3BlbmRpbmdTdHlsZXMgPSB7fTsKICAgICAgICAgICAgdGhpcy5fYmFja0ZpbGwgPSB7fTsKICAgICAgICAgICAgdGhpcy5fY3VycmVudEVtcHR5U3RlcEtleWZyYW1lID0gbnVsbDsKICAgICAgICAgICAgaWYgKCF0aGlzLl9lbGVtZW50VGltZWxpbmVTdHlsZXNMb29rdXApIHsKICAgICAgICAgICAgICAgIHRoaXMuX2VsZW1lbnRUaW1lbGluZVN0eWxlc0xvb2t1cCA9IG5ldyBNYXAoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9sb2NhbFRpbWVsaW5lU3R5bGVzID0gT2JqZWN0LmNyZWF0ZSh0aGlzLl9iYWNrRmlsbCwge30pOwogICAgICAgICAgICB0aGlzLl9nbG9iYWxUaW1lbGluZVN0eWxlcyA9ICgvKiogQHR5cGUgez99ICovICh0aGlzLl9lbGVtZW50VGltZWxpbmVTdHlsZXNMb29rdXAuZ2V0KGVsZW1lbnQpKSk7CiAgICAgICAgICAgIGlmICghdGhpcy5fZ2xvYmFsVGltZWxpbmVTdHlsZXMpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2dsb2JhbFRpbWVsaW5lU3R5bGVzID0gdGhpcy5fbG9jYWxUaW1lbGluZVN0eWxlczsKICAgICAgICAgICAgICAgIHRoaXMuX2VsZW1lbnRUaW1lbGluZVN0eWxlc0xvb2t1cC5zZXQoZWxlbWVudCwgdGhpcy5fbG9jYWxUaW1lbGluZVN0eWxlcyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fbG9hZEtleWZyYW1lKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgY29udGFpbnNBbmltYXRpb24oKSB7CiAgICAgICAgICAgIHN3aXRjaCAodGhpcy5fa2V5ZnJhbWVzLnNpemUpIHsKICAgICAgICAgICAgICAgIGNhc2UgMDoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICBjYXNlIDE6CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuZ2V0Q3VycmVudFN0eWxlUHJvcGVydGllcygpLmxlbmd0aCA+IDA7CiAgICAgICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0Q3VycmVudFN0eWxlUHJvcGVydGllcygpIHsKICAgICAgICAgICAgcmV0dXJuIE9iamVjdC5rZXlzKHRoaXMuX2N1cnJlbnRLZXlmcmFtZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGN1cnJlbnRUaW1lKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5zdGFydFRpbWUgKyB0aGlzLmR1cmF0aW9uOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGRlbGF5CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkZWxheU5leHRTdGVwKGRlbGF5KSB7CiAgICAgICAgICAgIC8vIGluIHRoZSBldmVudCB0aGF0IGEgc3R5bGUoKSBzdGVwIGlzIHBsYWNlZCByaWdodCBiZWZvcmUgYSBzdGFnZ2VyKCkKICAgICAgICAgICAgLy8gYW5kIHRoYXQgc3R5bGUoKSBzdGVwIGlzIHRoZSB2ZXJ5IGZpcnN0IHN0eWxlKCkgdmFsdWUgaW4gdGhlIGFuaW1hdGlvbgogICAgICAgICAgICAvLyB0aGVuIHdlIG5lZWQgdG8gbWFrZSBhIGNvcHkgb2YgdGhlIGtleWZyYW1lIFswLCBjb3B5LCAxXSBzbyB0aGF0IHRoZSBkZWxheQogICAgICAgICAgICAvLyBwcm9wZXJseSBhcHBsaWVzIHRoZSBzdHlsZSgpIHZhbHVlcyB0byB3b3JrIHdpdGggdGhlIHN0YWdnZXIuLi4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBoYXNQcmVTdHlsZVN0ZXAgPSB0aGlzLl9rZXlmcmFtZXMuc2l6ZSA9PSAxICYmIE9iamVjdC5rZXlzKHRoaXMuX3BlbmRpbmdTdHlsZXMpLmxlbmd0aDsKICAgICAgICAgICAgaWYgKHRoaXMuZHVyYXRpb24gfHwgaGFzUHJlU3R5bGVTdGVwKSB7CiAgICAgICAgICAgICAgICB0aGlzLmZvcndhcmRUaW1lKHRoaXMuY3VycmVudFRpbWUgKyBkZWxheSk7CiAgICAgICAgICAgICAgICBpZiAoaGFzUHJlU3R5bGVTdGVwKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5zbmFwc2hvdEN1cnJlbnRTdHlsZXMoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuc3RhcnRUaW1lICs9IGRlbGF5OwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAqIEBwYXJhbSB7Pz19IGN1cnJlbnRUaW1lCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmb3JrKGVsZW1lbnQsIGN1cnJlbnRUaW1lKSB7CiAgICAgICAgICAgIHRoaXMuYXBwbHlTdHlsZXNUb0tleWZyYW1lKCk7CiAgICAgICAgICAgIHJldHVybiBuZXcgVGltZWxpbmVCdWlsZGVyKHRoaXMuX2RyaXZlciwgZWxlbWVudCwgY3VycmVudFRpbWUgfHwgdGhpcy5jdXJyZW50VGltZSwgdGhpcy5fZWxlbWVudFRpbWVsaW5lU3R5bGVzTG9va3VwKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9sb2FkS2V5ZnJhbWUoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9jdXJyZW50S2V5ZnJhbWUpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3ByZXZpb3VzS2V5ZnJhbWUgPSB0aGlzLl9jdXJyZW50S2V5ZnJhbWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fY3VycmVudEtleWZyYW1lID0gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX2tleWZyYW1lcy5nZXQodGhpcy5kdXJhdGlvbikpKTsKICAgICAgICAgICAgaWYgKCF0aGlzLl9jdXJyZW50S2V5ZnJhbWUpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2N1cnJlbnRLZXlmcmFtZSA9IE9iamVjdC5jcmVhdGUodGhpcy5fYmFja0ZpbGwsIHt9KTsKICAgICAgICAgICAgICAgIHRoaXMuX2tleWZyYW1lcy5zZXQodGhpcy5kdXJhdGlvbiwgdGhpcy5fY3VycmVudEtleWZyYW1lKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZvcndhcmRGcmFtZSgpIHsKICAgICAgICAgICAgdGhpcy5kdXJhdGlvbiArPSBPTkVfRlJBTUVfSU5fTUlMTElTRUNPTkRTOwogICAgICAgICAgICB0aGlzLl9sb2FkS2V5ZnJhbWUoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB0aW1lCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmb3J3YXJkVGltZSh0aW1lKSB7CiAgICAgICAgICAgIHRoaXMuYXBwbHlTdHlsZXNUb0tleWZyYW1lKCk7CiAgICAgICAgICAgIHRoaXMuZHVyYXRpb24gPSB0aW1lOwogICAgICAgICAgICB0aGlzLl9sb2FkS2V5ZnJhbWUoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHByb3AKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfdXBkYXRlU3R5bGUocHJvcCwgdmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5fbG9jYWxUaW1lbGluZVN0eWxlc1twcm9wXSA9IHZhbHVlOwogICAgICAgICAgICB0aGlzLl9nbG9iYWxUaW1lbGluZVN0eWxlc1twcm9wXSA9IHZhbHVlOwogICAgICAgICAgICB0aGlzLl9zdHlsZVN1bW1hcnlbcHJvcF0gPSB7IHRpbWU6IHRoaXMuY3VycmVudFRpbWUsIHZhbHVlIH07CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYWxsb3dPbmx5VGltZWxpbmVTdHlsZXMoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9jdXJyZW50RW1wdHlTdGVwS2V5ZnJhbWUgIT09IHRoaXMuX2N1cnJlbnRLZXlmcmFtZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBlYXNpbmcKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGFwcGx5RW1wdHlTdGVwKGVhc2luZykgewogICAgICAgICAgICBpZiAoZWFzaW5nKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9wcmV2aW91c0tleWZyYW1lWydlYXNpbmcnXSA9IGVhc2luZzsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBzcGVjaWFsIGNhc2UgZm9yIGFuaW1hdGUoZHVyYXRpb24pOgogICAgICAgICAgICAvLyBhbGwgbWlzc2luZyBzdHlsZXMgYXJlIGZpbGxlZCB3aXRoIGEgYCpgIHZhbHVlIHRoZW4KICAgICAgICAgICAgLy8gaWYgYW55IGRlc3RpbmF0aW9uIHN0eWxlcyBhcmUgZmlsbGVkIGluIGxhdGVyIG9uIHRoZSBzYW1lCiAgICAgICAgICAgIC8vIGtleWZyYW1lIHRoZW4gdGhleSB3aWxsIG92ZXJyaWRlIHRoZSBvdmVycmlkZGVuIHN0eWxlcwogICAgICAgICAgICAvLyBXZSB1c2UgYF9nbG9iYWxUaW1lbGluZVN0eWxlc2AgaGVyZSBiZWNhdXNlIHRoZXJlIG1heSBiZQogICAgICAgICAgICAvLyBzdHlsZXMgaW4gcHJldmlvdXMga2V5ZnJhbWVzIHRoYXQgYXJlIG5vdCBwcmVzZW50IGluIHRoaXMgdGltZWxpbmUKICAgICAgICAgICAgT2JqZWN0LmtleXModGhpcy5fZ2xvYmFsVGltZWxpbmVTdHlsZXMpLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHByb3AKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHByb3AgPT4gewogICAgICAgICAgICAgICAgdGhpcy5fYmFja0ZpbGxbcHJvcF0gPSB0aGlzLl9nbG9iYWxUaW1lbGluZVN0eWxlc1twcm9wXSB8fCBBVVRPX1NUWUxFOwogICAgICAgICAgICAgICAgdGhpcy5fY3VycmVudEtleWZyYW1lW3Byb3BdID0gQVVUT19TVFlMRTsKICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB0aGlzLl9jdXJyZW50RW1wdHlTdGVwS2V5ZnJhbWUgPSB0aGlzLl9jdXJyZW50S2V5ZnJhbWU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gaW5wdXQKICAgICAgICAgKiBAcGFyYW0gez99IGVhc2luZwogICAgICAgICAqIEBwYXJhbSB7P30gZXJyb3JzCiAgICAgICAgICogQHBhcmFtIHs/PX0gb3B0aW9ucwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0U3R5bGVzKGlucHV0LCBlYXNpbmcsIGVycm9ycywgb3B0aW9ucykgewogICAgICAgICAgICBpZiAoZWFzaW5nKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9wcmV2aW91c0tleWZyYW1lWydlYXNpbmcnXSA9IGVhc2luZzsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHBhcmFtcyA9IChvcHRpb25zICYmIG9wdGlvbnMucGFyYW1zKSB8fCB7fTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBzdHlsZXMgPSBmbGF0dGVuU3R5bGVzJDEoaW5wdXQsIHRoaXMuX2dsb2JhbFRpbWVsaW5lU3R5bGVzKTsKICAgICAgICAgICAgT2JqZWN0LmtleXMoc3R5bGVzKS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwcm9wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBwcm9wID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHZhbCA9IGludGVycG9sYXRlUGFyYW1zKHN0eWxlc1twcm9wXSwgcGFyYW1zLCBlcnJvcnMpOwogICAgICAgICAgICAgICAgdGhpcy5fcGVuZGluZ1N0eWxlc1twcm9wXSA9IHZhbDsKICAgICAgICAgICAgICAgIGlmICghdGhpcy5fbG9jYWxUaW1lbGluZVN0eWxlcy5oYXNPd25Qcm9wZXJ0eShwcm9wKSkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX2JhY2tGaWxsW3Byb3BdID0gdGhpcy5fZ2xvYmFsVGltZWxpbmVTdHlsZXMuaGFzT3duUHJvcGVydHkocHJvcCkgPwogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9nbG9iYWxUaW1lbGluZVN0eWxlc1twcm9wXSA6CiAgICAgICAgICAgICAgICAgICAgICAgIEFVVE9fU1RZTEU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLl91cGRhdGVTdHlsZShwcm9wLCB2YWwpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYXBwbHlTdHlsZXNUb0tleWZyYW1lKCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHN0eWxlcyA9IHRoaXMuX3BlbmRpbmdTdHlsZXM7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcHJvcHMgPSBPYmplY3Qua2V5cyhzdHlsZXMpOwogICAgICAgICAgICBpZiAocHJvcHMubGVuZ3RoID09IDApCiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIHRoaXMuX3BlbmRpbmdTdHlsZXMgPSB7fTsKICAgICAgICAgICAgcHJvcHMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcHJvcAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgcHJvcCA9PiB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCB2YWwgPSBzdHlsZXNbcHJvcF07CiAgICAgICAgICAgICAgICB0aGlzLl9jdXJyZW50S2V5ZnJhbWVbcHJvcF0gPSB2YWw7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgT2JqZWN0LmtleXModGhpcy5fbG9jYWxUaW1lbGluZVN0eWxlcykuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcHJvcAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgcHJvcCA9PiB7CiAgICAgICAgICAgICAgICBpZiAoIXRoaXMuX2N1cnJlbnRLZXlmcmFtZS5oYXNPd25Qcm9wZXJ0eShwcm9wKSkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX2N1cnJlbnRLZXlmcmFtZVtwcm9wXSA9IHRoaXMuX2xvY2FsVGltZWxpbmVTdHlsZXNbcHJvcF07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzbmFwc2hvdEN1cnJlbnRTdHlsZXMoKSB7CiAgICAgICAgICAgIE9iamVjdC5rZXlzKHRoaXMuX2xvY2FsVGltZWxpbmVTdHlsZXMpLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHByb3AKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHByb3AgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgdmFsID0gdGhpcy5fbG9jYWxUaW1lbGluZVN0eWxlc1twcm9wXTsKICAgICAgICAgICAgICAgIHRoaXMuX3BlbmRpbmdTdHlsZXNbcHJvcF0gPSB2YWw7CiAgICAgICAgICAgICAgICB0aGlzLl91cGRhdGVTdHlsZShwcm9wLCB2YWwpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0RmluYWxLZXlmcmFtZSgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2tleWZyYW1lcy5nZXQodGhpcy5kdXJhdGlvbik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHByb3BlcnRpZXMoKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcHJvcGVydGllcyA9IFtdOwogICAgICAgICAgICBmb3IgKGxldCBwcm9wIGluIHRoaXMuX2N1cnJlbnRLZXlmcmFtZSkgewogICAgICAgICAgICAgICAgcHJvcGVydGllcy5wdXNoKHByb3ApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBwcm9wZXJ0aWVzOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHRpbWVsaW5lCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBtZXJnZVRpbWVsaW5lQ29sbGVjdGVkU3R5bGVzKHRpbWVsaW5lKSB7CiAgICAgICAgICAgIE9iamVjdC5rZXlzKHRpbWVsaW5lLl9zdHlsZVN1bW1hcnkpLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHByb3AKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHByb3AgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZGV0YWlsczAgPSB0aGlzLl9zdHlsZVN1bW1hcnlbcHJvcF07CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBkZXRhaWxzMSA9IHRpbWVsaW5lLl9zdHlsZVN1bW1hcnlbcHJvcF07CiAgICAgICAgICAgICAgICBpZiAoIWRldGFpbHMwIHx8IGRldGFpbHMxLnRpbWUgPiBkZXRhaWxzMC50aW1lKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fdXBkYXRlU3R5bGUocHJvcCwgZGV0YWlsczEudmFsdWUpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYnVpbGRLZXlmcmFtZXMoKSB7CiAgICAgICAgICAgIHRoaXMuYXBwbHlTdHlsZXNUb0tleWZyYW1lKCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcHJlU3R5bGVQcm9wcyA9IG5ldyBTZXQoKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwb3N0U3R5bGVQcm9wcyA9IG5ldyBTZXQoKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBpc0VtcHR5ID0gdGhpcy5fa2V5ZnJhbWVzLnNpemUgPT09IDEgJiYgdGhpcy5kdXJhdGlvbiA9PT0gMDsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgZmluYWxLZXlmcmFtZXMgPSBbXTsKICAgICAgICAgICAgdGhpcy5fa2V5ZnJhbWVzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGtleWZyYW1lCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdGltZQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGtleWZyYW1lLCB0aW1lKSA9PiB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBmaW5hbEtleWZyYW1lID0gY29weVN0eWxlcyhrZXlmcmFtZSwgdHJ1ZSk7CiAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyhmaW5hbEtleWZyYW1lKS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcHJvcAogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgcHJvcCA9PiB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHZhbHVlID0gZmluYWxLZXlmcmFtZVtwcm9wXTsKICAgICAgICAgICAgICAgICAgICBpZiAodmFsdWUgPT0gybVQUkVfU1RZTEUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcHJlU3R5bGVQcm9wcy5hZGQocHJvcCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHZhbHVlID09IEFVVE9fU1RZTEUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcG9zdFN0eWxlUHJvcHMuYWRkKHByb3ApOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgIGlmICghaXNFbXB0eSkgewogICAgICAgICAgICAgICAgICAgIGZpbmFsS2V5ZnJhbWVbJ29mZnNldCddID0gdGltZSAvIHRoaXMuZHVyYXRpb247CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmaW5hbEtleWZyYW1lcy5wdXNoKGZpbmFsS2V5ZnJhbWUpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcHJlUHJvcHMgPSBwcmVTdHlsZVByb3BzLnNpemUgPyBpdGVyYXRvclRvQXJyYXkocHJlU3R5bGVQcm9wcy52YWx1ZXMoKSkgOiBbXTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwb3N0UHJvcHMgPSBwb3N0U3R5bGVQcm9wcy5zaXplID8gaXRlcmF0b3JUb0FycmF5KHBvc3RTdHlsZVByb3BzLnZhbHVlcygpKSA6IFtdOwogICAgICAgICAgICAvLyBzcGVjaWFsIGNhc2UgZm9yIGEgMC1zZWNvbmQgYW5pbWF0aW9uICh3aGljaCBpcyBkZXNpZ25lZCBqdXN0IHRvIHBsYWNlIHN0eWxlcyBvbnNjcmVlbikKICAgICAgICAgICAgaWYgKGlzRW1wdHkpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGtmMCA9IGZpbmFsS2V5ZnJhbWVzWzBdOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3Qga2YxID0gY29weU9iaihrZjApOwogICAgICAgICAgICAgICAga2YwWydvZmZzZXQnXSA9IDA7CiAgICAgICAgICAgICAgICBrZjFbJ29mZnNldCddID0gMTsKICAgICAgICAgICAgICAgIGZpbmFsS2V5ZnJhbWVzID0gW2tmMCwga2YxXTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gY3JlYXRlVGltZWxpbmVJbnN0cnVjdGlvbih0aGlzLmVsZW1lbnQsIGZpbmFsS2V5ZnJhbWVzLCBwcmVQcm9wcywgcG9zdFByb3BzLCB0aGlzLmR1cmF0aW9uLCB0aGlzLnN0YXJ0VGltZSwgdGhpcy5lYXNpbmcsIGZhbHNlKTsKICAgICAgICB9CiAgICB9CiAgICBjbGFzcyBTdWJUaW1lbGluZUJ1aWxkZXIgZXh0ZW5kcyBUaW1lbGluZUJ1aWxkZXIgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZHJpdmVyCiAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgICAgICogQHBhcmFtIHs/fSBrZXlmcmFtZXMKICAgICAgICAgKiBAcGFyYW0gez99IHByZVN0eWxlUHJvcHMKICAgICAgICAgKiBAcGFyYW0gez99IHBvc3RTdHlsZVByb3BzCiAgICAgICAgICogQHBhcmFtIHs/fSB0aW1pbmdzCiAgICAgICAgICogQHBhcmFtIHs/PX0gX3N0cmV0Y2hTdGFydGluZ0tleWZyYW1lCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoZHJpdmVyLCBlbGVtZW50LCBrZXlmcmFtZXMsIHByZVN0eWxlUHJvcHMsIHBvc3RTdHlsZVByb3BzLCB0aW1pbmdzLCBfc3RyZXRjaFN0YXJ0aW5nS2V5ZnJhbWUgPSBmYWxzZSkgewogICAgICAgICAgICBzdXBlcihkcml2ZXIsIGVsZW1lbnQsIHRpbWluZ3MuZGVsYXkpOwogICAgICAgICAgICB0aGlzLmVsZW1lbnQgPSBlbGVtZW50OwogICAgICAgICAgICB0aGlzLmtleWZyYW1lcyA9IGtleWZyYW1lczsKICAgICAgICAgICAgdGhpcy5wcmVTdHlsZVByb3BzID0gcHJlU3R5bGVQcm9wczsKICAgICAgICAgICAgdGhpcy5wb3N0U3R5bGVQcm9wcyA9IHBvc3RTdHlsZVByb3BzOwogICAgICAgICAgICB0aGlzLl9zdHJldGNoU3RhcnRpbmdLZXlmcmFtZSA9IF9zdHJldGNoU3RhcnRpbmdLZXlmcmFtZTsKICAgICAgICAgICAgdGhpcy50aW1pbmdzID0geyBkdXJhdGlvbjogdGltaW5ncy5kdXJhdGlvbiwgZGVsYXk6IHRpbWluZ3MuZGVsYXksIGVhc2luZzogdGltaW5ncy5lYXNpbmcgfTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBjb250YWluc0FuaW1hdGlvbigpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMua2V5ZnJhbWVzLmxlbmd0aCA+IDE7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYnVpbGRLZXlmcmFtZXMoKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGtleWZyYW1lcyA9IHRoaXMua2V5ZnJhbWVzOwogICAgICAgICAgICBsZXQgeyBkZWxheSwgZHVyYXRpb24sIGVhc2luZyB9ID0gdGhpcy50aW1pbmdzOwogICAgICAgICAgICBpZiAodGhpcy5fc3RyZXRjaFN0YXJ0aW5nS2V5ZnJhbWUgJiYgZGVsYXkpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IG5ld0tleWZyYW1lcyA9IFtdOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3Qg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BhdCB0aGUgc3RhcnQgb2YgdGhlIGFuaW1hdGlvbgogICAgICAgICAgICAgICAgICAgICAgICBhbmQgaXQgaXMgdGhlbiBjb3BpZWQgdG8gd2hlcmUgaXQgc3RhcnRzIHdoZW4gdGhlIG9yaWdpbmFsIGRlbGF5IGlzIG92ZXIuIFRoaXMgYmFzaWNhbGx5CiAgICAgICAgICAgICAgICAgICAgICAgIG1lYW5zIG5vdGhpbmcgYW5pbWF0ZXMgZHVyaW5nIHRoYXQgZGVsYXksIGJ1dCB0aGUgc3R5bGVzIGFyZSBzdGlsbCByZW5kZXJlcmVkLiBGb3IgdGhpcwogICAgICAgICAgICAgICAgICAgICAgICB0byB3b3JrIHRoZSBvcmlnaW5hbCBvZmZzZXQgdmFsdWVzIHRoYXQgZXhpc3QgaW4gdGhlIG9yaWdpbmFsIGtleWZyYW1lcyBtdXN0IGJlICJ3YXJwZWQiCiAgICAgICAgICAgICAgICAgICAgICAgIHNvIHRoYXQgdGhleSBjYW4gdGFrZSB0aGUgbmV3IGtleWZyYW1lICsgZGVsYXkgaW50byBhY2NvdW50LgogICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgIGRlbGF5PTEwMDAsIGR1cmF0aW9uPTEwMDAsIGtleWZyYW1lcyA9IDAgLjUgMQogICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgIHR1cm5zIGludG8KICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICBkZWxheT0wLCBkdXJhdGlvbj0yMDAwLCBrZXlmcmFtZXMgPSAwIC4zMyAuNjYgMQogICAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAvLyBvZmZzZXRzIGJldHdlZW4gMSAuLi4gbiAtMSBhcmUgYWxsIHdhcnBlZCBieSB0aGUga2V5ZnJhbWUgc3RyZXRjaAogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgbGltaXQgPSBrZXlmcmFtZXMubGVuZ3RoIC0gMTsKICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAxOyBpIDw9IGxpbWl0OyBpKyspIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgbGV0IGtmID0gY29weVN0eWxlcyhrZXlmcmFtZXNbaV0sIGZhbHNlKTsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3Qgb2xkT2Zmc2V0ID0gKC8qKiBAdHlwZSB7P30gKi8gKGtmWydvZmZzZXQnXSkpOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCB0aW1lQXRLZXlmcmFtZSA9IGRlbGF5ICsgb2xkT2Zmc2V0ICogZHVyYXRpb247CiAgICAgICAgICAgICAgICAgICAga2ZbJ29mZnNldCddID0gcm91bmRPZmZzZXQodGltZUF0S2V5ZnJhbWUgLyB0b3RhbFRpbWUpOwogICAgICAgICAgICAgICAgICAgIG5ld0tleWZyYW1lcy5wdXNoKGtmKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vIHRoZSBuZXcgc3RhcnRpbmcga2V5ZnJhbWUgc2hvdWxkIGJlIGFkZGVkIGF0IHRoZSBzdGFydAogICAgICAgICAgICAgICAgZHVyYXRpb24gPSB0b3RhbFRpbWU7CiAgICAgICAgICAgICAgICBkZWxheSA9IDA7CiAgICAgICAgICAgICAgICBlYXNpbmcgPSAnJzsKICAgICAgICAgICAgICAgIGtleWZyYW1lcyA9IG5ld0tleWZyYW1lczsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gY3JlYXRlVGltZWxpbmVJbnN0cnVjdGlvbih0aGlzLmVsZW1lbnQsIGtleWZyYW1lcywgdGhpcy5wcmVTdHlsZVByb3BzLCB0aGlzLnBvc3RTdHlsZVByb3BzLCBkdXJhdGlvbiwgZGVsYXksIGVhc2luZywgdHJ1ZSk7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IG9mZnNldAogICAgICogQHBhcmFtIHs/PX0gZGVjaW1hbFBvaW50cwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gcm91bmRPZmZzZXQob2Zmc2V0LCBkZWNpbWFsUG9pbnRzID0gMykgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBtdWx0ID0gTWF0aC5wb3coMTAsIGRlY2ltYWxQb2ludHMgLSAxKTsKICAgICAgICByZXR1cm4gTWF0aC5yb3VuZChvZmZzZXQgKiBtdWx0KSAvIG11bHQ7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gaW5wdXQKICAgICAqIEBwYXJhbSB7P30gYWxsU3R5bGVzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBmbGF0dGVuU3R5bGVzJDEoaW5wdXQsIGFsbFN0eWxlcykgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBzdHlsZXMgPSB7fTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IGFsbFByb3BlcnRpZXM7CiAgICAgICAgaW5wdXQuZm9yRWFjaCgoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB0b2tlbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdG9rZW4gPT4gewogICAgICAgICAgICBpZiAodG9rZW4gPT09ICcqJykgewogICAgICAgICAgICAgICAgYWxsUHJvcGVydGllcyA9IGFsbFByb3BlcnRpZXMgfHwgT2JqZWN0LmtleXMoYWxsU3R5bGVzKTsKICAgICAgICAgICAgICAgIGFsbFByb3BlcnRpZXMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHByb3AKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIHByb3AgPT4gewogICAgICAgICAgICAgICAgICAgIHN0eWxlc1twcm9wXSA9IEFVVE9fU1RZTEU7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBjb3B5U3R5bGVzKCgvKiogQHR5cGUgez99ICovICh0b2tlbikpLCBmYWxzZSwgc3R5bGVzKTsKICAgICAgICAgICAgfQogICAgICAgIH0pKTsKICAgICAgICByZXR1cm4gc3R5bGVzOwogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogcGFja2FnZXMvYW5pbWF0aW9ucy9icm93c2VyL3NyYy9kc2wvc3R5bGVfbm9ybWFsaXphdGlvbi9hbmltYXRpb25fc3R5bGVfbm9ybWFsaXplci50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvKioKICAgICAqIEBsaWNlbnNlCiAgICAgKiBDb3B5cmlnaHQgR29vZ2xlIEluYy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4KICAgICAqCiAgICAgKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSBhbiBNSVQtc3R5bGUgbGljZW5zZSB0aGF0IGNhbiBiZQogICAgICogZm91bmQgaW4gdGhlIExJQ0VOU0UgZmlsZSBhdCBodHRwczovL2FuZ3VsYXIuaW8vbGljZW5zZQogICAgICovCiAgICAvKioKICAgICAqIFxAcHVibGljQXBpCiAgICAgKiBAYWJzdHJhY3QKICAgICAqLwogICAgY2xhc3MgQW5pbWF0aW9uU3R5bGVOb3JtYWxpemVyIHsKICAgIH0KCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcgYWRkZWQgYnkgdHNpY2tsZQogICAgICogR2VuZXJhdGVkIGZyb206IHBhY2thZ2VzL2FuaW1hdGlvbnMvYnJvd3Nlci9zcmMvZHNsL3N0eWxlX25vcm1hbGl6YXRpb24vd2ViX2FuaW1hdGlvbnNfc3R5bGVfbm9ybWFsaXplci50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICBjbGFzcyBXZWJBbmltYXRpb25zU3R5bGVOb3JtYWxpemVyIGV4dGVuZHMgQW5pbWF0aW9uU3R5bGVOb3JtYWxpemVyIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHByb3BlcnR5TmFtZQogICAgICAgICAqIEBwYXJhbSB7P30gZXJyb3JzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBub3JtYWxpemVQcm9wZXJ0eU5hbWUocHJvcGVydHlOYW1lLCBlcnJvcnMpIHsKICAgICAgICAgICAgcmV0dXJuIGRhc2hDYXNlVG9DYW1lbENhc2UocHJvcGVydHlOYW1lKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB1c2VyUHJvdmlkZWRQcm9wZXJ0eQogICAgICAgICAqIEBwYXJhbSB7P30gbm9ybWFsaXplZFByb3BlcnR5CiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEBwYXJhbSB7P30gZXJyb3JzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBub3JtYWxpemVTdHlsZVZhbHVlKHVzZXJQcm92aWRlZFByb3BlcnR5LCBub3JtYWxpemVkUHJvcGVydHksIHZhbHVlLCBlcnJvcnMpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgdW5pdCA9ICcnOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHN0clZhbCA9IHZhbHVlLnRvU3RyaW5nKCkudHJpbSgpOwogICAgICAgICAgICBpZiAoRElNRU5TSU9OQUxfUFJPUF9NQVBbbm9ybWFsaXplZFByb3BlcnR5XSAmJiB2YWx1ZSAhPT0gMCAmJiB2YWx1ZSAhPT0gJzAnKSB7CiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHZhbHVlID09PSAnbnVtYmVyJykgewogICAgICAgICAgICAgICAgICAgIHVuaXQgPSAncHgnOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHZhbEFuZFN1ZmZpeE1hdGNoID0gdmFsdWUubWF0Y2goL15bKy1dP1tcZFwuXSsoW2Etel0qKSQvKTsKICAgICAgICAgICAgICAgICAgICBpZiAodmFsQW5kU3VmZml4TWF0Y2ggJiYgdmFsQW5kU3VmZml4TWF0Y2hbMV0ubGVuZ3RoID09IDApIHsKICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JzLnB1c2goYFBsZWFzZSBwcm92aWRlIGEgQ1NTIHVuaXQgdmFsdWUgZm9yICR7dXNlclByb3ZpZGVkUHJvcGVydHl9OiR7dmFsdWV9YCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBzdHJWYWwgKyB1bml0OwogICAgICAgIH0KICAgIH0KICAgIGNvbnN0IMm1MCQxJDIgPSAvKioKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgICgpID0+IG1ha2VCb29sZWFuTWFwKCd3aWR0aCxoZWlnaHQsbWluV2lkdGgsbWluSGVpZ2h0LG1heFdpZHRoLG1heEhlaWdodCxsZWZ0LHRvcCxib3R0b20scmlnaHQsZm9udFNpemUsb3V0bGluZVdpZHRoLG91dGxpbmVPZmZzZXQscGFkZGluZ1RvcCxwYWRkaW5nTGVmdCxwYWRkaW5nQm90dG9tLHBhZGRpbmdSaWdodCxtYXJnaW5Ub3AsbWFyZ2luTGVmdCxtYXJnaW5Cb3R0b20sbWFyZ2luUmlnaHQsYm9yZGVyUmFkaXVzLGJvcmRlcldpZHRoLGJvcmRlclRvcFdpZHRoLGJvcmRlckxlZnRXaWR0aCxib3JkZXJSaWdodFdpZHRoLGJvcmRlckJvdHRvbVdpZHRoLHRleHRJbmRlbnQscGVyc3BlY3RpdmUnCiAgICAgICAgLnNwbGl0KCcsJykpOwogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgRElNRU5TSU9OQUxfUFJPUF9NQVAgPSAoKMm1MCQxJDIpKSgpOwogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IGtleXMKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIG1ha2VCb29sZWFuTWFwKGtleXMpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgbWFwID0ge307CiAgICAgICAga2V5cy5mb3JFYWNoKCgvKioKICAgICAgICAgKiBAcGFyYW0gez99IGtleQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAga2V5ID0+IG1hcFtrZXldID0gdHJ1ZSkpOwogICAgICAgIHJldHVybiBtYXA7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICogQHBhcmFtIHs/fSB0cmlnZ2VyTmFtZQogICAgICogQHBhcmFtIHs/fSBmc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blBhcmFtcyA9IGN1cnJlbnRPcHRpb25zICYmIGN1cnJlbnRPcHRpb25zLnBhcmFtcyB8fCBFTVBUWV9PQkpFQ1Q7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgY3VycmVudFN0YXRlU3R5bGVzID0gdGhpcy5idWlsZFN0eWxlcyhjdXJyZW50U3RhdGUsIGN1cnJlbnRBbmltYXRpb25QYXJhbXMsIGVycm9ycyk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbmV4dEFuaW1hdGlvblBhcmFtcyA9IG5leHRPcHRpb25zICYmIG5leHRPcHRpb25zLnBhcmFtcyB8fCBFTVBUWV9PQkpFQ1Q7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbmV4dFN0YXRlU3R5bGVzID0gdGhpcy5idWlsZFN0eWxlcyhuZXh0U3RhdGUsIG5leHRBbmltYXRpb25QYXJhbXMsIGVycm9ycyk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcXVlcmllZEVsZW1lbnRzID0gbmV3IFNldCgpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHByZVN0eWxlTWFwID0gbmV3IE1hcCgpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHBvc3RTdHlsZU1hcCA9IG5ldyBNYXAoKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBpc1JlbW92YWwgPSBuZXh0U3RhdGUgPT09ICd2b2lkJzsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBhbmltYXRpb25PcHRpb25zID0geyBwYXJhbXM6IE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgdHJhbnNpdGlvbkFuaW1hdGlvblBhcmFtcyksIG5leHRBbmltYXRpb25QYXJhbXMpIH07CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdGltZWxpbmVzID0gc2tpcEFzdEJ1aWxkID8KICAgICAgICAgICAgICAgIFtdIDoKICAgICAgICAgICAgICAgIGJ1aWxkQW5pbWF0aW9uVGltZWxpbmVzKGRyaXZlciwgZWxlbWVudCwgdGhpcy5hc3QuYW5pbWF0aW9uLCBlbnRlckNsYXNzTmFtZSwgbGVhdmVDbGFzc05hbWUsIGN1cnJlbnRTdGF0ZVN0eWxlcywgbmV4dFN0YXRlU3R5bGVzLCBhbmltYXRpb25PcHRpb25zLCBzdWJJbnN0cnVjdGlvbnMsIGVycm9ycyk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHRvdGFsVGltZSA9IDA7CiAgICAgICAgICAgIHRpbWVsaW5lcy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSB0bAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGwgPT4gewogICAgICAgICAgICAgICAgdG90YWxUaW1lID0gTWF0aC5tYXgodGwuZHVyYXRpb24gKyB0bC5kZWxheSwgdG90YWxUaW1lKTsKICAgICAgICAgICAgfSkpOwogICAgICAgICAgICBpZiAoZXJyb3JzLmxlbmd0aCkgewogICAgICAgICAgICAgICAgcmV0dXJuIGNyZWF0ZVRyYW5zaXRpb25JbnN0cnVjdGlvbihlbGVtZW50LCB0aGlzLl90cmlnZ2VyTmFtZSwgY3VycmVudFN0YXRlLCBuZXh0U3RhdGUsIGlzUmVtb3ZhbCwgY3VycmVudFN0YXRlU3R5bGVzLCBuZXh0U3RhdGVTdHlsZXMsIFtdLCBbXSwgcHJlU3R5bGVNYXAsIHBvc3RTdHlsZU1hcCwgdG90YWxUaW1lLCBlcnJvcnMpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRpbWVsaW5lcy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSB0bAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGwgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZWxtID0gdGwuZWxlbWVudDsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHByZVByb3BzID0gZ2V0T3JTZXRBc0luTWFwKHByZVN0eWxlTWFwLCBlbG0sIHt9KTsKICAgICAgICAgICAgICAgIHRsLnByZVN0eWxlUHJvcHMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHByb3AKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIHByb3AgPT4gcHJlUHJvcHNbcHJvcF0gPSB0cnVlKSk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBwb3N0UHJvcHMgPSBnZXRPclNldEFzSW5NYXAocG9zdFN0eWxlTWFwLCBlbG0sIHt9KTsKICAgICAgICAgICAgICAgIHRsLnBvc3RTdHlsZVByb3BzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwcm9wCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBwcm9wID0+IHBvc3RQcm9wc1twcm9wXSA9IHRydWUpKTsKICAgICAgICAgICAgICAgIGlmIChlbG0gIT09IGVsZW1lbnQpIHsKICAgICAgICAgICAgICAgICAgICBxdWVyaWVkRWxlbWVudHMuYWRkKGVsbSk7CiAgICAgICAgICAg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IHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHN0eWxlcwogICAgICAgICAqIEBwYXJhbSB7P30gZGVmYXVsdFBhcmFtcwogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKHN0eWxlcywgZGVmYXVsdFBhcmFtcykgewogICAgICAgICAgICB0aGlzLnN0eWxlcyA9IHN0eWxlczsKICAgICAgICAgICAgdGhpcy5kZWZhdWx0UGFyYW1zID0gZGVmYXVsdFBhcmFtczsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBwYXJhbXMKICAgICAgICAgKiBAcGFyYW0gez99IGVycm9ycwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYnVpbGRTdHlsZXMocGFyYW1zLCBlcnJvcnMpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBmaW5hbFN0eWxlcyA9IHt9OwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGNvbWJpbmVkUGFyYW1zID0gY29weU9iaih0aGlzLmRlZmF1bHRQYXJhbXMpOwogICAgICAgICAgICBPYmplY3Qua2V5cyhwYXJhbXMpLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGtleQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAga2V5ID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHZhbHVlID0gcGFyYW1zW2tleV07CiAgICAgICAgICAgICAgICBpZiAodmFsdWUgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIGNvbWJpbmVkUGFyYW1zW2tleV0gPSB2YWx1ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB0aGlzLnN0eWxlcy5zdHlsZXMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHZhbHVlID0+IHsKICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdmFsdWUgIT09ICdzdHJpbmcnKSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHN0eWxlT2JqID0gKC8qKiBAdHlwZSB7P30gKi8gKHZhbHVlKSk7CiAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmtleXMoc3R5bGVPYmopLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcHJvcAogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgcHJvcCA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZhbCA9IHN0eWxlT2JqW3Byb3BdOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAodmFsLmxlbmd0aCA+IDEpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbCA9IGludGVycG9sYXRlUGFyYW1zKHZhbCwgY29tYmluZWRQYXJhbXMsIGVycm9ycyk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgZmluYWxTdHlsZXNbcHJvcF0gPSB2YWw7CiAgICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIHJldHVybiBmaW5hbFN0eWxlczsKICAgICAgICB9CiAgICB9CgogICAgLyoqCiAgICAgKiBAZmlsZW92ZXJ2aWV3IGFkZGVkIGJ5IHRzaWNrbGUKICAgICAqIEdlbmVyYXRlZCBmcm9tOiBwYWNrYWdlcy9hbmltYXRpb25zL2Jyb3dzZXIvc3JjL2RzbC9hbmltYXRpb25fdHJpZ2dlci50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvKioKICAgICAqIFxAcHVibGljQXBpCiAgICAgKiBAcGFyYW0gez99IG5hbWUKICAgICAqIEBwYXJhbSB7P30gYXN0CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBidWlsZFRyaWdnZXIobmFtZSwgYXN0KSB7CiAgICAgICAgcmV0dXJuIG5ldyBBbmltYXRpb25UcmlnZ2VyKG5hbWUsIGFzdCk7CiAgICB9CiAgICAvKioKICAgICAqIFxAcHVibGljQXBpCiAgICAgKi8KICAgIGNsYXNzIEFuaW1hdGlvblRyaWdnZXIgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gbmFtZQogICAgICAgICAqIEBwYXJhbSB7P30gYXN0CiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IobmFtZSwgYXN0KSB7CiAgICAgICAgICAgIHRoaXMubmFtZSA9IG5hbWU7CiAgICAgICAgICAgIHRoaXMuYXN0ID0gYXN0OwogICAgICAgICAgICB0aGlzLnRyYW5zaXRpb25GYWN0b3JpZXMgPSBbXTsKICAgICAgICAgICAgdGhpcy5zdGF0ZXMgPSB7fTsKICAgICAgICAgICAgYXN0LnN0YXRlcy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBhc3QKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGFzdCA9PiB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBkZWZhdWx0UGFyYW1zID0gKGFzdC5vcHRpb25zICYmIGFzdC5vcHRpb25zLnBhcmFtcykgfHwge307CiAgICAgICAgICAgICAgICB0aGlzLnN0YXRlc1thc3QubmFtZV0gPSBuZXcgQW5pbWF0aW9uU3RhdGVTdHlsZXMoYXN0LnN0eWxlLCBkZWZhdWx0UGFyYW1zKTsKICAgICAgICAgICAgfSkpOwogICAgICAgICAgICBiYWxhbmNlUHJvcGVydGllcyh0aGlzLnN0YXRlcywgJ3RydWUnLCAnMScpOwogICAgICAgICAgICBiYWxhbmNlUHJvcGVydGllcyh0aGlzLnN0YXRlcywgJ2ZhbHNlJywgJzAnKTsKICAgICAgICAgICAgYXN0LnRyYW5zaXRpb25zLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGFzdAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgYXN0ID0+IHsKICAgICAgICAgICAgICAgIHRoaXMudHJhbnNpdGlvbkZhY3Rvcmllcy5wdXNoKG5ldyBBbmltYXRpb25UcmFuc2l0aW9uRmFjdG9yeShuYW1lLCBhc3QsIHRoaXMuc3RhdGVzKSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgdGhpcy5mYWxsYmFja1RyYW5zaXRpb24gPSBjcmVhdGVGYWxsYmFja1RyYW5zaXRpb24obmFtZSwgdGhpcy5zdGF0ZXMpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBjb250YWluc1F1ZXJpZXMoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmFzdC5xdWVyeUNvdW50ID4gMDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBjdXJyZW50U3RhdGUKICAgICAgICAgKiBAcGFyYW0gez99IG5leHRTdGF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAqIEBwYXJhbSB7P30gcGFyYW1zCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBtYXRjaFRyYW5zaXRpb24oY3VycmVudFN0YXRlLCBuZXh0U3RhdGUsIGVsZW1lbnQsIHBhcmFtcykgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGVudHJ5ID0gdGhpcy50cmFuc2l0aW9uRmFjdG9yaWVzLmZpbmQoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGYKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGYgPT4gZi5tYXRjaChjdXJyZW50U3RhdGUsIG5leHRTdGF0ZSwgZWxlbWVudCwgcGFyYW1zKSkpOwogICAgICAgICAgICByZXR1cm4gZW50cnkgfHwgbnVsbDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBjdXJyZW50U3RhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHBhcmFtcwogICAgICAgICAqIEBwYXJhbSB7P30gZXJyb3JzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBtYXRjaFN0eWxlcyhjdXJyZW50U3RhdGUsIHBhcmFtcywgZXJyb3JzKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmZhbGxiYWNrVHJhbnNpdGlvbi5idWlsZFN0eWxlcyhjdXJyZW50U3RhdGUsIHBhcmFtcywgZXJyb3JzKTsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdHJpZ2dlck5hbWUKICAgICAqIEBwYXJhbSB7P30gc3RhdGVzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBjcmVhdGVGYWxsYmFja1RyYW5zaXRpb24odHJpZ2dlck5hbWUsIHN0YXRlcykgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBtYXRjaGVycyA9IFsoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZnJvbVN0YXRlCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdG9TdGF0ZQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGZyb21TdGF0ZSwgdG9TdGF0ZSkgPT4gdHJ1ZSldOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBhbmltYXRpb24gPSB7IHR5cGU6IDIgLyogU2VxdWVuY2UgKi8sIHN0ZXBzOiBbXSwgb3B0aW9uczogbnVsbCB9OwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCB0cmFuc2l0aW9uID0gewogICAgICAgICAgICB0eXBlOiAxIC8qIFRyYW5zaXRpb24gKi8sCiAgICAgICAgICAgIGFuaW1hdGlvbiwKICAgICAgICAgICAgbWF0Y2hlcnMsCiAgICAgICAgICAgIG9wdGlvbnM6IG51bGwsCiAgICAgICAgICAgIHF1ZXJ5Q291bnQ6IDAsCiAgICAgICAgICAgIGRlcENvdW50OiAwCiAgICAgICAgfTsKICAgICAgICByZXR1cm4gbmV3IEFuaW1hdGlvblRyYW5zaXRpb25GYWN0b3J5KHRyaWdnZXJOYW1lLCB0cmFuc2l0aW9uLCBzdGF0ZXMpOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IG9iagogICAgICogQHBhcmFtIHs/fSBrZXkxCiAgICAgKiBAcGFyYW0gez99IGtleTIKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGJhbGFuY2VQcm9wZXJ0aWVzKG9iaiwga2V5MSwga2V5MikgewogICAgICAgIGlmIChvYmouaGFzT3duUHJvcGVydHkoa2V5MSkpIHsKICAgICAgICAgICAgaWYgKCFvYmouaGFzT3duUHJvcGVydHkoa2V5MikpIHsKICAgICAgICAgICAgICAgIG9ialtrZXkyXSA9IG9ialtrZXkxXTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChvYmouaGFzT3duUHJvcGVydHkoa2V5MikpIHsKICAgICAgICAgICAgb2JqW2tleTFdID0gb2JqW2tleTJdOwogICAgICAgIH0KICAgIH0KCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcgYWRkZWQgYnkgdHNpY2tsZQogICAgICogR2VuZXJhdGVkIGZyb206IHBhY2thZ2VzL2FuaW1hdGlvbnMvYnJvd3Nlci9zcmMvcmVuZGVyL3RpbWVsaW5lX2FuaW1hdGlvbl9lbmdpbmUudHMKICAgICAqIEBzdXBwcmVzcyB7Y2hlY2tUeXBlcyxjb25zdGFudFByb3BlcnR5LGV4dHJhUmVxdWlyZSxtaXNzaW5nT3ZlcnJpZGUsbWlzc2luZ1JldHVybix1bnVzZWRQcml2YXRlTWVtYmVycyx1c2VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgRU1QVFlfSU5TVFJVQ1RJT05fTUFQID0gbmV3IEVsZW1lbnRJbnN0cnVjdGlvbk1hcCgpOwogICAgY2xhc3MgVGltZWxpbmVBbmltYXRpb25FbmdpbmUgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gYm9keU5vZGUKICAgICAgICAgKiBAcGFyYW0gez99IF9kcml2ZXIKICAgICAgICAgKiBAcGFyYW0gez99IF9ub3JtYWxpemVyCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoYm9keU5vZGUsIF9kcml2ZXIsIF9ub3JtYWxpemVyKSB7CiAgICAgICAgICAgIHRoaXMuYm9keU5vZGUgPSBib2R5Tm9kZTsKICAgICAgICAgICAgdGhpcy5fZHJpdmVyID0gX2RyaXZlcjsKICAgICAgICAgICAgdGhpcy5fbm9ybWFsaXplciA9IF9ub3JtYWxpemVyOwogICAgICAgICAgICB0aGlzLl9hbmltYXRpb25zID0ge307CiAgICAgICAgICAgIHRoaXMuX3BsYXllcnNCeUlkID0ge307CiAgICAgICAgICAgIHRoaXMucGxheWVycyA9IFtdOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGlkCiAgICAgICAgICogQHBhcmFtIHs/fSBtZXRhZGF0YQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVnaXN0ZXIoaWQsIG1ldGFkYXRhKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZXJyb3JzID0gW107CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgYXN0ID0gYnVpbGRBbmltYXRpb25Bc3QodGhpcy5fZHJpdmVyLCBtZXRhZGF0YSwgZXJyb3JzKTsKICAgICAgICAgICAgaWYgKGVycm9ycy5sZW5ndGgpIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgVW5hYmxlIHRvIGJ1aWxkIHRoZSBhbmltYXRpb24gZHVlIHRvIHRoZSBmb2xsb3dpbmcgZXJyb3JzOiAke2Vycm9ycy5qb2luKCdcbicpfWApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fYW5pbWF0aW9uc1tpZF0gPSBhc3Q7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGkKICAgICAgICAgKiBAcGFyYW0gez99IHByZVN0eWxlcwogICAgICAgICAqIEBwYXJhbSB7Pz19IHBvc3RTdHlsZXMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9idWlsZFBsYXllcihpLCBwcmVTdHlsZXMsIHBvc3RTdHlsZXMpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBlbGVtZW50ID0gaS5lbGVtZW50OwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGtleWZyYW1lcyA9IG5vcm1hbGl6ZUtleWZyYW1lcyh0aGlzLl9kcml2ZXIsIHRoaXMuX25vcm1hbGl6ZXIsIGVsZW1lbnQsIGkua2V5ZnJhbWVzLCBwcmVTdHlsZXMsIHBvc3RTdHlsZXMpOwogICAgICAgICAgICByZXR1cm4gdGhpcy5fZHJpdmVyLmFuaW1hdGUoZWxlbWVudCwga2V5ZnJhbWVzLCBpLmR1cmF0aW9uLCBpLmRlbGF5LCBpLmVhc2luZywgW10sIHRydWUpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGlkCiAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgICAgICogQHBhcmFtIHs/PX0gb3B0aW9ucwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgY3JlYXRlKGlkLCBlbGVtZW50LCBvcHRpb25zID0ge30pIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBlcnJvcnMgPSBbXTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBhc3QgPSB0aGlzLl9hbmltYXRpb25zW2lkXTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgaW5zdHJ1Y3Rpb25zOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGF1dG9TdHlsZXNNYXAgPSBuZXcgTWFwKCk7CiAgICAgICAgICAgIGlmIChhc3QpIHsKICAgICAgICAgICAgICAgIGluc3RydWN0aW9ucyA9IGJ1aWxkQW5pbWF0aW9uVGltZWxpbmVzKHRoaXMuX2RyaXZlciwgZWxlbWVudCwgYXN0LCBFTlRFUl9DTEFTU05BTUUsIExFQVZFX0NMQVNTTkFNRSwge30sIHt9LCBvcHRpb25zLCBFTVBUWV9JTlNUUlVDVElPTl9NQVAsIGVycm9ycyk7CiAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbnMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGluc3QKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIGluc3QgPT4gewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBzdHlsZXMgPSBnZXRPclNldEFzSW5NYXAoYXV0b1N0eWxlc01hcCwgaW5zdC5lbGVtZW50LCB7fSk7CiAgICAgICAgICAgICAgICAgICAgaW5zdC5wb3N0U3R5bGVQcm9wcy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHByb3AKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgIHByb3AgPT4gc3R5bGVzW3Byb3BdID0gbnVsbCkpOwogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgZXJyb3JzLnB1c2goJ1RoZSByZXF1ZXN0ZWQgYW5pbWF0aW9uIGRvZXNuXCd0IGV4aXN0IG9yIGhhcyBhbHJlYWR5IGJlZW4gZGVzdHJveWVkJyk7CiAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbnMgPSBbXTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoZXJyb3JzLmxlbmd0aCkgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBVbmFibGUgdG8gY3JlYXRlIHRoZSBhbmltYXRpb24gZHVlIHRvIHRoZSBmb2xsb3dpbmcgZXJyb3JzOiAke2Vycm9ycy5qb2luKCdcbicpfWApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGF1dG9TdHlsZXNNYXAuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gc3R5bGVzCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHN0eWxlcywgZWxlbWVudCkgPT4gewogICAgICAgICAgICAgICAgT2JqZWN0LmtleXMoc3R5bGVzKS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcHJvcAogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgcHJvcCA9PiB7CiAgICAgICAgICAgICAgICAgICAgc3R5bGVzW3Byb3BdID0gdGhpcy5fZHJpdmVyLmNvbXB1dGVTdHlsZShlbGVtZW50LCBwcm9wLCBBVVRPX1NUWUxFKTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHBsYXllcnMgPSBpbnN0cnVjdGlvbnMubWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBpCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBpID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHN0eWxlcyA9IGF1dG9TdHlsZXNNYXAuZ2V0KGkuZWxlbWVudCk7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fYnVpbGRQbGF5ZXIoaSwge30sIHN0eWxlcyk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwbGF5ZXIgPSBvcHRpbWl6ZUdyb3VwUGxheWVyKHBsYXllcnMpOwogICAgICAgICAgICB0aGlzLl9wbGF5ZXJzQnlJZFtpZF0gPSBwbGF5ZXI7CiAgICAgICAgICAgIHBsYXllci5vbkRlc3Ryb3koKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gdGhpcy5kZXN0cm95KGlkKSkpOwogICAgICAgICAgICB0aGlzLnBsYXllcnMucHVzaChwbGF5ZXIpOwogICAgICAgICAgICByZXR1cm4gcGxheWVyOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGlkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkZXN0cm95KGlkKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcGxheWVyID0gdGhpcy5fZ2V0UGxheWVyKGlkKTsKICAgICAgICAgICAgcGxheWVyLmRlc3Ryb3koKTsKICAgICAgICAgICAgZGVsZXRlIHRoaXMuX3BsYXllcnNCeUlkW2lkXTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBpbmRleCA9IHRoaXMucGxheWVycy5pbmRleE9mKHBsYXllcik7CiAgICAgICAgICAgIGlmIChpbmRleCA+PSAwKSB7CiAgICAgICAgICAgICAgICB0aGlzLnBsYXllcnMuc3BsaWNlKGluZGV4LCAxKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gaWQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9nZXRQbGF5ZXIoaWQpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwbGF5ZXIgPSB0aGlzLl9wbGF5ZXJzQnlJZFtpZF07CiAgICAgICAgICAgIGlmICghcGxheWVyKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYFVuYWJsZSB0byBmaW5kIHRoZSB0aW1lbGluZSBwbGF5ZXIgcmVmZXJlbmNlZCBieSAke2lkfWApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBwbGF5ZXI7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gaWQKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50TmFtZQogICAgICAgICAqIEBwYXJhbSB7P30gY2FsbGJhY2sKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGxpc3RlbihpZCwgZWxlbWVudCwgZXZlbnROYW1lLCBjYWxsYmFjaykgewogICAgICAgICAgICAvLyB0cmlnZ2VyTmFtZSwgZnJvbVN0YXRlLCB0b1N0YXRlIGFyZSBhbGwgaWdub3JlZCBmb3IgdGltZWxpbmUgYW5pbWF0aW9ucwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGJhc2VFdmVudCA9IG1ha2VBbmltYXRpb25FdmVudChlbGVtZW50LCAnJywgJycsICcnKTsKICAgICAgICAgICAgbGlzdGVuT25QbGF5ZXIodGhpcy5fZ2V0UGxheWVyKGlkKSwgZXZlbnROYW1lLCBiYXNlRXZlbnQsIGNhbGxiYWNrKTsKICAgICAgICAgICAgcmV0dXJuICgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsgfSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gaWQKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgKiBAcGFyYW0gez99IGNvbW1hbmQKICAgICAgICAgKiBAcGFyYW0gez99IGFyZ3MKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGNvbW1hbmQoaWQsIGVsZW1lbnQsIGNvbW1hbmQsIGFyZ3MpIHsKICAgICAgICAgICAgaWYgKGNvbW1hbmQgPT0gJ3JlZ2lzdGVyJykgewogICAgICAgICAgICAgICAgdGhpcy5yZWdpc3RlcihpZCwgKC8qKiBAdHlwZSB7P30gKi8gKGFyZ3NbMF0pKSk7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGNvbW1hbmQgPT0gJ2NyZWF0ZScpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IG9wdGlvbnMgPSAoLyoqIEB0eXBlIHs/fSAqLyAoKGFyZ3NbMF0gfHwge30pKSk7CiAgICAgICAgICAgICAgICB0aGlzLmNyZWF0ZShpZCwgZWxlbWVudCwgb3B0aW9ucyk7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwbGF5ZXIgPSB0aGlzLl9nZXRQbGF5ZXIoaWQpOwogICAgICAgICAgICBzd2l0Y2ggKGNvbW1hbmQpIHsKICAgICAgICAgICAgICAgIGNhc2UgJ3BsYXknOgogICAgICAgICAgICAgICAgICAgIHBsYXllci5wbGF5KCk7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBjYXNlICdwYXVzZSc6CiAgICAgICAgICAgICAgICAgICAgcGxheWVyLnBhdXNlKCk7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBjYXNlICdyZXNldCc6CiAgICAgICAgICAgICAgICAgICAgcGxheWVyLnJlc2V0KCk7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBjYXNlICdyZXN0YXJ0JzoKICAgICAgICAgICAgICAgICAgICBwbGF5ZXIucmVzdGFydCgpOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgY2FzZSAnZmluaXNoJzoKICAgICAgICAgICAgICAgICAgICBwbGF5ZXIuZmluaXNoKCk7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBjYXNlICdpbml0JzoKICAgICAgICAgICAgICAgICAgICBwbGF5ZXIuaW5pdCgpOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgY2FzZSAnc2V0UG9zaXRpb24nOgogICAgICAgICAgICAgICAgICAgIHBsYXllci5zZXRQb3NpdGlvbihwYXJzZUZsb2F0KCgvKiogQHR5cGUgez99ICovIChhcmdzWzBdKSkpKTsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIGNhc2UgJ2Rlc3Ryb3knOgogICAgICAgICAgICAgICAgICAgIHRoaXMuZGVzdHJveShpZCk7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CgogICAgLyoqCiAgICAgKiBAZmlsZW92ZXJ2aWV3IGFkZGVkIGJ5IHRzaWNrbGUKICAgICAqIEdlbmVyYXRlZCBmcm9tOiBwYWNrYWdlcy9hbmltYXRpb25zL2Jyb3dzZXIvc3JjL3JlbmRlci90cmFuc2l0aW9uX2FuaW1hdGlvbl9lbmdpbmUudHMKICAgICAqIEBzdXBwcmVzcyB7Y2hlY2tUeXBlcyxjb25zdGFudFByb3BlcnR5LGV4dHJhUmVxdWlyZSxtaXNzaW5nT3ZlcnJpZGUsbWlzc2luZ1JldHVybix1bnVzZWRQcml2YXRlTWVtYmVycyx1c2Vs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Fsc2UsCiAgICAgICAgc2V0Rm9yUmVtb3ZhbDogZmFsc2UsCiAgICAgICAgaGFzQW5pbWF0aW9uOiBmYWxzZSwKICAgICAgICByZW1vdmVkQmVmb3JlUXVlcmllZDogdHJ1ZQogICAgfTsKICAgIC8qKiBAdHlwZSB7P30gKi8KICAgIGNvbnN0IFJFTU9WQUxfRkxBRyA9ICdfX25nX3JlbW92ZWQnOwogICAgY2xhc3MgU3RhdGVWYWx1ZSB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBpbnB1dAogICAgICAgICAqIEBwYXJhbSB7Pz19IG5hbWVzcGFjZUlkCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoaW5wdXQsIG5hbWVzcGFjZUlkID0gJycpIHsKICAgICAgICAgICAgdGhpcy5uYW1lc3BhY2VJZCA9IG5hbWVzcGFjZUlkOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGlzT2JqID0gaW5wdXQgJiYgaW5wdXQuaGFzT3duUHJvcGVydHkoJ3ZhbHVlJyk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdmFsdWUgPSBpc09iaiA/IGlucHV0Wyd2YWx1ZSddIDogaW5wdXQ7CiAgICAgICAgICAgIHRoaXMudmFsdWUgPSBub3JtYWxpemVUcmlnZ2VyVmFsdWUodmFsdWUpOwogICAgICAgICAgICBpZiAoaXNPYmopIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IG9wdGlvbnMgPSBjb3B5T2JqKCgvKiogQHR5cGUgez99ICovIChpbnB1dCkpKTsKICAgICAgICAgICAgICAgIGRlbGV0ZSBvcHRpb25zWyd2YWx1ZSddOwogICAgICAgICAgICAgICAgdGhpcy5vcHRpb25zID0gKC8qKiBAdHlwZSB7P30gKi8gKG9wdGlvbnMpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMub3B0aW9ucyA9IHt9OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICghdGhpcy5vcHRpb25zLnBhcmFtcykgewogICAgICAgICAgICAgICAgdGhpcy5vcHRpb25zLnBhcmFtcyA9IHt9OwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHBhcmFtcygpIHsKICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovICh0aGlzLm9wdGlvbnMucGFyYW1zKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gb3B0aW9ucwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYWJzb3JiT3B0aW9ucyhvcHRpb25zKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbmV3UGFyYW1zID0gb3B0aW9ucy5wYXJhbXM7CiAgICAgICAgICAgIGlmIChuZXdQYXJhbXMpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IG9sZFBhcmFtcyA9ICgvKiogQHR5cGUgez99ICovICh0aGlzLm9wdGlvbnMucGFyYW1zKSk7CiAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyhuZXdQYXJhbXMpLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwcm9wCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBwcm9wID0+IHsKICAgICAgICAgICAgICAgICAgICBpZiAob2xkUGFyYW1zW3Byb3BdID09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICAgICAgb2xkUGFyYW1zW3Byb3BdID0gbmV3UGFyYW1zW3Byb3BdOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIC8qKiBAdHlwZSB7P30gKi8KICAgIGNvbnN0IFZPSURfVkFMVUUgPSAndm9pZCc7CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBERUZBVUxUX1NUQVRFX1ZBTFVFID0gbmV3IFN0YXRlVmFsdWUoVk9JRF9WQUxVRSk7CiAgICBjbGFzcyBBbmltYXRpb25UcmFuc2l0aW9uTmFtZXNwYWNlIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGlkCiAgICAgICAgICogQHBhcmFtIHs/fSBob3N0RWxlbWVudAogICAgICAgICAqIEBwYXJhbSB7P30gX2VuZ2luZQogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKGlkLCBob3N0RWxlbWVudCwgX2VuZ2luZSkgewogICAgICAgICAgICB0aGlzLmlkID0gaWQ7CiAgICAgICAgICAgIHRoaXMuaG9zdEVsZW1lbnQgPSBob3N0RWxlbWVudDsKICAgICAgICAgICAgdGhpcy5fZW5naW5lID0gX2VuZ2luZTsKICAgICAgICAgICAgdGhpcy5wbGF5ZXJzID0gW107CiAgICAgICAgICAgIHRoaXMuX3RyaWdnZXJzID0ge307CiAgICAgICAgICAgIHRoaXMuX3F1ZXVlID0gW107CiAgICAgICAgICAgIHRoaXMuX2VsZW1lbnRMaXN0ZW5lcnMgPSBuZXcgTWFwKCk7CiAgICAgICAgICAgIHRoaXMuX2hvc3RDbGFzc05hbWUgPSAnbmctdG5zLScgKyBpZDsKICAgICAgICAgICAgYWRkQ2xhc3MoaG9zdEVsZW1lbnQsIHRoaXMuX2hvc3RDbGFzc05hbWUpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgKiBAcGFyYW0gez99IG5hbWUKICAgICAgICAgKiB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dGhlIGxpc3RlbmVycyB3b3VsZCBiZSBkZXJlZ2lzdGVyZWQpCiAgICAgICAgICAgICAgICB0aGlzLl9lbmdpbmUuYWZ0ZXJGbHVzaCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGluZGV4ID0gbGlzdGVuZXJzLmluZGV4T2YoZGF0YSk7CiAgICAgICAgICAgICAgICAgICAgaWYgKGluZGV4ID49IDApIHsKICAgICAgICAgICAgICAgICAgICAgICAgbGlzdGVuZXJzLnNwbGljZShpbmRleCwgMSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGlmICghdGhpcy5fdHJpZ2dlcnNbbmFtZV0pIHsKICAgICAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHRyaWdnZXJzV2l0aFN0YXRlc1tuYW1lXTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IG5hbWUKICAgICAgICAgKiBAcGFyYW0gez99IGFzdAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVnaXN0ZXIobmFtZSwgYXN0KSB7CiAgICAgICAgICAgIGlmICh0aGlzLl90cmlnZ2Vyc1tuYW1lXSkgewogICAgICAgICAgICAgICAgLy8gdGhyb3cKICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuX3RyaWdnZXJzW25hbWVdID0gYXN0OwogICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IG5hbWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9nZXRUcmlnZ2VyKG5hbWUpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB0cmlnZ2VyID0gdGhpcy5fdHJpZ2dlcnNbbmFtZV07CiAgICAgICAgICAgIGlmICghdHJpZ2dlcikgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBUaGUgcHJvdmlkZWQgYW5pbWF0aW9uIHRyaWdnZXIgIiR7bmFtZX0iIGhhcyBub3QgYmVlbiByZWdpc3RlcmVkIWApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0cmlnZ2VyOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgKiBAcGFyYW0gez99IHRyaWdnZXJOYW1lCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEBwYXJhbSB7Pz19IGRlZmF1bHRUb0ZhbGxiYWNrCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB0cmlnZ2VyKGVsZW1lbnQsIHRyaWdnZXJOYW1lLCB2YWx1ZSwgZGVmYXVsdFRvRmFsbGJhY2sgPSB0cnVlKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdHJpZ2dlciA9IHRoaXMuX2dldFRyaWdnZXIodHJpZ2dlck5hbWUpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHBsYXllciA9IG5ldyBUcmFuc2l0aW9uQW5pbWF0aW9uUGxheWVyKHRoaXMuaWQsIHRyaWdnZXJOYW1lLCBlbGVtZW50KTsKICAgICAgICAgICAgLyoqIE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VhbnMgdGhhdCB0aGUgYW5pbWF0aW9uIGZpbmFsIHN0eWxlcyBuZWVkIHRvIGJlIGFwcGxpZWQKICAgICAgICAgICAgICAgIGlmICghb2JqRXF1YWxzKGZyb21TdGF0ZS5wYXJhbXMsIHRvU3RhdGUucGFyYW1zKSkgewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBlcnJvcnMgPSBbXTsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgZnJvbVN0eWxlcyA9IHRyaWdnZXIubWF0Y2hTdHlsZXMoZnJvbVN0YXRlLnZhbHVlLCBmcm9tU3RhdGUucGFyYW1zLCBlcnJvcnMpOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCB0b1N0eWxlcyA9IHRyaWdnZXIubWF0Y2hTdHlsZXModG9TdGF0ZS52YWx1ZSwgdG9TdGF0ZS5wYXJhbXMsIGVycm9ycyk7CiAgICAgICAgICAgICAgICAgICAgaWYgKGVycm9ycy5sZW5ndGgpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fZW5naW5lLnJlcG9ydEVycm9yKGVycm9ycyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9lbmdpbmUuYWZ0ZXJGbHVzaCgoLyoqCiAgICAgICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlcmFzZVN0eWxlcyhlbGVtZW50LCBmcm9tU3R5bGVzKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFN0eWxlcyhlbGVtZW50LCB0b1N0eWxlcyk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwbGF5ZXJzT25FbGVtZW50ID0gZ2V0T3JTZXRBc0luTWFwKHRoaXMuX2VuZ2luZS5wbGF5ZXJzQnlFbGVtZW50LCBlbGVtZW50LCBbXSk7CiAgICAgICAgICAgIHBsYXllcnNPbkVsZW1lbnQuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcGxheWVyCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBwbGF5ZXIgPT4gewogICAgICAgICAgICAgICAgLy8gb25seSByZW1vdmUgdGhlIHBsYXllciBpZiBpdCBpcyBxdWV1ZWQgb24gdGhlIEVYQUNUIHNhbWUgdHJpZ2dlci9uYW1lc3BhY2UKICAgICAgICAgICAgICAgIC8vIHdlIG9ubHkgYWxzbyBkZWFsIHdpdGggcXVldWVkIHBsYXllcnMgaGVyZSBiZWNhdXNlIGlmIHRoZSBhbmltYXRpb24gaGFzCiAgICAgICAgICAgICAgICAvLyBzdGFydGVkIHRoZW4gd2Ugd2FudCB0byBrZWVwIHRoZSBwbGF5ZXIgYWxpdmUgdW50aWwgdGhlIGZsdXNoIGhhcHBlbnMKICAgICAgICAgICAgICAgIC8vICh3aGljaCBpcyB3aGVyZSB0aGUgcHJldmlvdXNQbGF5ZXJzIGFyZSBwYXNzZWQgaW50byB0aGUgbmV3IHBhbHllcikKICAgICAgICAgICAgICAgIGlmIChwbGF5ZXIubmFtZXNwYWNlSWQgPT0gdGhpcy5pZCAmJiBwbGF5ZXIudHJpZ2dlck5hbWUgPT0gdHJpZ2dlck5hbWUgJiYgcGxheWVyLnF1ZXVlZCkgewogICAgICAgICAgICAgICAgICAgIHBsYXllci5kZXN0cm95KCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgdHJhbnNpdGlvbiA9IHRyaWdnZXIubWF0Y2hUcmFuc2l0aW9uKGZyb21TdGF0ZS52YWx1ZSwgdG9TdGF0ZS52YWx1ZSwgZWxlbWVudCwgdG9TdGF0ZS5wYXJhbXMpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBpc0ZhbGxiYWNrVHJhbnNpdGlvbiA9IGZhbHNlOwogICAgICAgICAgICBpZiAoIXRyYW5zaXRpb24pIHsKICAgICAgICAgICAgICAgIGlmICghZGVmYXVsdFRvRmFsbGJhY2spCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgdHJhbnNpdGlvbiA9IHRyaWdnZXIuZmFsbGJhY2tUcmFuc2l0aW9uOwogICAgICAgICAgICAgICAgaXNGYWxsYmFja1RyYW5zaXRpb24gPSB0cnVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2VuZ2luZS50b3RhbFF1ZXVlZFBsYXllcnMrKzsKICAgICAgICAgICAgdGhpcy5fcXVldWUucHVzaCh7IGVsZW1lbnQsIHRyaWdnZXJOYW1lLCB0cmFuc2l0aW9uLCBmcm9tU3RhdGUsIHRvU3RhdGUsIHBsYXllciwgaXNGYWxsYmFja1RyYW5zaXRpb24gfSk7CiAgICAgICAgICAgIGlmICghaXNGYWxsYmFja1RyYW5zaXRpb24pIHsKICAgICAgICAgICAgICAgIGFkZENsYXNzKGVsZW1lbnQsIFFVRVVFRF9DTEFTU05BTUUpOwogICAgICAgICAgICAgICAgcGxheWVyLm9uU3RhcnQoKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHJlbW92ZUNsYXNzKGVsZW1lbnQsIFFVRVVFRF9DTEFTU05BTUUpOwogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHBsYXllci5vbkRvbmUoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IGluZGV4ID0gdGhpcy5wbGF5ZXJzLmluZGV4T2YocGxheWVyKTsKICAgICAgICAgICAgICAgIGlmIChpbmRleCA+PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5wbGF5ZXJzLnNwbGljZShpbmRleCwgMSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBwbGF5ZXJzID0gdGhpcy5fZW5naW5lLnBsYXllcnNCeUVsZW1lbnQuZ2V0KGVsZW1lbnQpOwogICAgICAgICAgICAgICAgaWYgKHBsYXllcnMpIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgbGV0IGluZGV4ID0gcGxheWVycy5pbmRleE9mKHBsYXllcik7CiAgICAgICAgICAgICAgICAgICAgaWYgKGluZGV4ID49IDApIHsKICAgICAgICAgICAgICAgICAgICAgICAgcGxheWVycy5zcGxpY2UoaW5kZXgsIDEpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB0aGlzLnBsYXllcnMucHVzaChwbGF5ZXIpOwogICAgICAgICAgICBwbGF5ZXJzT25FbGVtZW50LnB1c2gocGxheWVyKTsKICAgICAgICAgICAgcmV0dXJuIHBsYXllcjsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBuYW1lCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkZXJlZ2lzdGVyKG5hbWUpIHsKICAgICAgICAgICAgZGVsZXRlIHRoaXMuX3RyaWdnZXJzW25hbWVdOwogICAgICAgICAgICB0aGlzLl9lbmdpbmUuc3RhdGVzQnlFbGVtZW50LmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHN0YXRlTWFwCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHN0YXRlTWFwLCBlbGVtZW50KSA9PiB7CiAgICAgICAgICAgICAgICBkZWxldGUgc3RhdGVNYXBbbmFtZV07CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgdGhpcy5fZWxlbWVudExpc3RlbmVycy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBsaXN0ZW5lcnMKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAobGlzdGVuZXJzLCBlbGVtZW50KSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLl9lbGVtZW50TGlzdGVuZXJzLnNldChlbGVtZW50LCBsaXN0ZW5lcnMuZmlsdGVyKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZW50cnkKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIGVudHJ5ID0+IHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gZW50cnkubmFtZSAhPSBuYW1lOwogICAgICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGNsZWFyRWxlbWVudENhY2hlKGVsZW1lbnQpIHsKICAgICAgICAgICAgdGhpcy5fZW5naW5lLnN0YXRlc0J5RWxlbWVudC5kZWxldGUoZWxlbWVudCk7CiAgICAgICAgICAgIHRoaXMuX2VsZW1lbnRMaXN0ZW5lcnMuZGVsZXRlKGVsZW1lbnQpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGVsZW1lbnRQbGF5ZXJzID0gdGhpcy5fZW5naW5lLnBsYXllcnNCeUVsZW1lbnQuZ2V0KGVsZW1lbnQpOwogICAgICAgICAgICBpZiAoZWxlbWVudFBsYXllcnMpIHsKICAgICAgICAgICAgICAgIGVsZW1lbnRQbGF5ZXJzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwbGF5ZXIKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIHBsYXllciA9PiBwbGF5ZXIuZGVzdHJveSgpKSk7CiAgICAgICAgICAgICAgICB0aGlzLl9lbmdpbmUucGxheWVyc0J5RWxlbWVudC5kZWxldGUoZWxlbWVudCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHJvb3RFbGVtZW50CiAgICAgICAgICogQHBhcmFtIHs/fSBjb250ZXh0CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfc2lnbmFsUmVtb3ZhbEZvcklubmVyVHJpZ2dlcnMocm9vdEVsZW1lbnQsIGNvbnRleHQpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBlbGVtZW50cyA9IHRoaXMuX2VuZ2luZS5kcml2ZXIucXVlcnkocm9vdEVsZW1lbnQsIE5HX1RSSUdHRVJfU0VMRUNUT1IsIHRydWUpOwogICAgICAgICAgICAvLyBlbXVsYXRlIGEgbGVhdmUgYW5pbWF0aW9uIGZvciBhbGwgaW5uZXIgbm9kZXMgd2l0aGluIHRoaXMgbm9kZS4KICAgICAgICAgICAgLy8gSWYgdGhlcmUgYXJlIG5vIGFuaW1hdGlvbnMgZm91bmQgZm9yIGFueSBvZiB0aGUgbm9kZXMgdGhlbiBjbGVhciB0aGUgY2FjaGUKICAgICAgICAgICAgLy8gZm9yIHRoZSBlbGVtZW50LgogICAgICAgICAgICBlbGVtZW50cy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBlbG0KICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGVsbSA9PiB7CiAgICAgICAgICAgICAgICAvLyB0aGlzIG1lYW5zIHRoYXQgYW4gaW5uZXIgcmVtb3ZlKCkgb3BlcmF0aW9uIGhhcyBhbHJlYWR5IGtpY2tlZCBvZmYKICAgICAgICAgICAgICAgIC8vIHRoZSBhbmltYXRpb24gb24gdGhpcyBlbGVtZW50Li4uCiAgICAgICAgICAgICAgICBpZiAoZWxtW1JFTU9WQUxfRkxBR10pCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgbmFtZXNwYWNlcyA9IHRoaXMuX2VuZ2luZS5mZXRjaE5hbWVzcGFjZXNCeUVsZW1lbnQoZWxtKTsKICAgICAgICAgICAgICAgIGlmIChuYW1lc3BhY2VzLnNpemUpIHsKICAgICAgICAgICAgICAgICAgICBuYW1lc3BhY2VzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbnMKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgIG5zID0+IG5zLnRyaWdnZXJMZWF2ZUFuaW1hdGlvbihlbG0sIGNvbnRleHQsIGZhbHNlLCB0cnVlKSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5jbGVhckVsZW1lbnRDYWNoZShlbG0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIC8vIElmIHRoZSBjaGlsZCBlbGVtZW50cyB3ZXJlIHJlbW92ZWQgYWxvbmcgd2l0aCB0aGUgcGFyZW50LCB0aGVpciBhbmltYXRpb25zIG1pZ2h0IG5vdAogICAgICAgICAgICAvLyBoYXZlIGNvbXBsZXRlZC4gQ2xlYXIgYWxsIHRoZSBlbGVtZW50cyBmcm9tIHRoZSBjYWNoZSBzbyB3ZSBkb24ndCBlbmQgdXAgd2l0aCBhIG1lbW9yeSBsZWFrLgogICAgICAgICAgICB0aGlzLl9lbmdpbmUuYWZ0ZXJGbHVzaEFuaW1hdGlvbnNEb25lKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IGVsZW1lbnRzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGVsbQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZWxtID0+IHRoaXMuY2xlYXJFbGVtZW50Q2FjaGUoZWxtKSkpKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAqIEBwYXJhbSB7P30gY29udGV4dAogICAgICAgICAqIEBwYXJhbSB7Pz19IGRlc3Ryb3lBZnRlckNvbXBsZXRlCiAgICAgICAgICogQHBhcmFtIHs/PX0gZGVmYXVsdFRvRmFsbGJhY2sKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHRyaWdnZXJMZWF2ZUFuaW1hdGlvbihlbGVtZW50LCBjb250ZXh0LCBkZXN0cm95QWZ0ZXJDb21wbGV0ZSwgZGVmYXVsdFRvRmFsbGJhY2spIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB0cmlnZ2VyU3RhdGVzID0gdGhpcy5fZW5naW5lLnN0YXRlc0J5RWxlbWVudC5nZXQoZWxlbWVudCk7CiAgICAgICAgICAgIGlmICh0cmlnZ2VyU3RhdGVzKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBwbGF5ZXJzID0gW107CiAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyh0cmlnZ2VyU3RhdGVzKS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdHJpZ2dlck5hbWUKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIHRyaWdnZXJOYW1lID0+IHsKICAgICAgICAgICAgICAgICAgICAvLyB0aGlzIGNoZWNrIGlzIGhlcmUgaW4gdGhlIGV2ZW50IHRoYXQgYW4gZWxlbWVudCBpcyByZW1vdmVkCiAgICAgICAgICAgICAgICAgICAgLy8gdHdpY2UgKGJvdGggb24gdGhlIGhvc3QgbGV2ZWwgYW5kIHRoZSBjb21wb25lbnQgbGV2ZWwpCiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX3RyaWdnZXJzW3RyaWdnZXJOYW1lXSkgewogICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHBsYXllciA9IHRoaXMudHJpZ2dlcihlbGVtZW50LCB0cmlnZ2VyTmFtZSwgVk9JRF9WQUxVRSwgZGVmYXVsdFRvRmFsbGJhY2spOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAocGxheWVyKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbGF5ZXJzLnB1c2gocGxheWVyKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgIGlmIChwbGF5ZXJzLmxlbmd0aCkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX2VuZ2luZS5tYXJrRWxlbWVudEFzUmVtb3ZlZCh0aGlzLmlkLCBlbGVtZW50LCB0cnVlLCBjb250ZXh0KTsKICAgICAgICAgICAgICAgICAgICBpZiAoZGVzdHJveUFmdGVyQ29tcGxldGUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW1pemVHcm91cFBsYXllcihwbGF5ZXJzKS5vbkRvbmUoKC8qKgogICAgICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAgICAgKCkgPT4gdGhpcy5fZW5naW5lLnByb2Nlc3NMZWF2ZU5vZGUoZWxlbWVudCkpKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHByZXBhcmVMZWF2ZUFuaW1hdGlvbkxpc3RlbmVycyhlbGVtZW50KSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbGlzdGVuZXJzID0gdGhpcy5fZWxlbWVudExpc3RlbmVycy5nZXQoZWxlbWVudCk7CiAgICAgICAgICAgIGlmIChsaXN0ZW5lcnMpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHZpc2l0ZWRUcmlnZ2VycyA9IG5ldyBTZXQoKTsKICAgICAgICAgICAgICAgIGxpc3RlbmVycy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbGlzdGVuZXIKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIGxpc3RlbmVyID0+IHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgdHJpZ2dlck5hbWUgPSBsaXN0ZW5lci5uYW1lOwogICAgICAgICAgICAgICAgICAgIGlmICh2aXNpdGVkVHJpZ2dlcnMuaGFzKHRyaWdnZXJOYW1lKSkKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgIHZpc2l0ZWRUcmlnZ2Vycy5hZGQodHJpZ2dlck5hbWUpOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCB0cmlnZ2VyID0gdGhpcy5fdHJpZ2dlcnNbdHJpZ2dlck5hbWVdOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCB0cmFuc2l0aW9uID0gdHJpZ2dlci5mYWxsYmFja1RyYW5zaXRpb247CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGVsZW1lbnRTdGF0ZXMgPSAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5fZW5naW5lLnN0YXRlc0J5RWxlbWVudC5nZXQoZWxlbWVudCkpKTsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgZnJvbVN0YXRlID0gZWxlbWVudFN0YXRlc1t0cmlnZ2VyTmFtZV0gfHwgREVGQVVMVF9TVEFURV9WQUxVRTsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgdG9TdGF0ZSA9IG5ldyBTdGF0ZVZhbHVlKFZPSURfVkFMVUUpOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBwbGF5ZXIgPSBuZXcgVHJhbnNpdGlvbkFuaW1hdGlvblBsYXllcih0aGlzLmlkLCB0cmlnZ2VyTmFtZSwgZWxlbWVudCk7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fZW5naW5lLnRvdGFsUXVldWVkUGxheWVycysrOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX3F1ZXVlLnB1c2goewogICAgICAgICAgICAgICAgICAgICAgICBlbGVtZW50LAogICAgICAgICAgICAgICAgICAgICAgICB0cmlnZ2VyTmFtZSwKICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNpdGlvbiwKICAgICAgICAgICAgICAgICAgICAgICAgZnJvbVN0YXRlLAogICAgICAgICAgICAgICAgICAgICAgICB0b1N0YXRlLAogICAgICAgICAgICAgICAgICAgICAgICBwbGF5ZXIsCiAgICAgICAgICAgICAgICAgICAgICAgIGlzRmFsbGJhY2tUcmFuc2l0aW9uOiB0cnVlCiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgICAgICogQHBhcmFtIHs/fSBjb250ZXh0CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZW1vdmVOb2RlKGVsZW1lbnQsIGNvbnRleHQpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBlbmdpbmUgPSB0aGlzLl9lbmdpbmU7CiAgICAgICAgICAgIGlmIChlbGVtZW50LmNoaWxkRWxlbWVudENvdW50KSB7CiAgICAgICAgICAgICAgICB0aGlzLl9zaWduYWxSZW1vdmFsRm9ySW5uZXJUcmlnZ2VycyhlbGVtZW50LCBjb250ZXh0KTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyB0aGlzIG1lYW5zIHRoYXQgYSAqID0+IFZPSUQgYW5pbWF0aW9uIHdhcyBkZXRlY3RlZCBhbmQga2lja2VkIG9mZgogICAgICAgICAgICBpZiAodGhpcy50cmlnZ2VyTGVhdmVBbmltYXRpb24oZWxlbWVudCwgY29udGV4dCwgdHJ1ZSkpCiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIC8vIGZpbmQgdGhlIHBsYXllciB0aGF0IGlzIGFuaW1hdGluZyBhbmQgbWFrZSBzdXJlIHRoYXQgdGhlCiAgICAgICAgICAgIC8vIHJlbW92YWwgaXMgZGVsYXllZCB1bnRpbCB0aGF0IHBsYXllciBoYXMgY29tcGxldGVkCiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGNvbnRhaW5zUG90ZW50aWFsUGFyZW50VHJhbnNpdGlvbiA9IGZhbHNlOwogICAgICAgICAgICBpZiAoZW5naW5lLnRvdGFsQW5pbWF0aW9ucykgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgY3VycmVudFBsYXllcnMgPSBlbmdpbmUucGxheWVycy5sZW5ndGggPyBlbmdpbmUucGxheWVyc0J5UXVlcmllZEVsZW1lbnQuZ2V0KGVsZW1lbnQpIDogW107CiAgICAgICAgICAgICAgICAvLyB3aGVuIHRoaXMgYGlmIHN0YXRlbWVudGAgZG9lcyBub3QgY29udGludWUgZm9yd2FyZCBpdCBtZWFucyB0aGF0CiAgICAgICAgICAgICAgICAvLyBhIHByZXZpb3VzIGFuaW1hdGlvbiBxdWVyeSBoYXMgc2VsZWN0ZWQgdGhlIGN1cnJlbnQgZWxlbWVudCBhbmQKICAgICAgICAgICAgICAgIC8vIGlzIGFuaW1hdGluZyBpdC4gSW4gdGhpcyBzaXR1YXRpb24gd2FudCB0byBjb250aW51ZSBmb3J3YXJkcyBhbmQKICAgICAgICAgICAgICAgIC8vIGFsbG93IHRoZSBlbGVtZW50IHRvIGJlIHF1ZXVlZCB1cCBmb3IgYW5pbWF0aW9uIGxhdGVyLgogICAgICAgICAgICAgICAgaWYgKGN1cnJlbnRQbGF5ZXJzICYmIGN1cnJlbnRQbGF5ZXJzLmxlbmd0aCkgewogICAgICAgICAgICAgICAgICAgIGNvbnRhaW5zUG90ZW50aWFsUGFyZW50VHJhbnNpdGlvbiA9IHRydWU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgbGV0IHBhcmVudCA9IGVsZW1lbnQ7CiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKHBhcmVudCA9IHBhcmVudC5wYXJlbnROb2RlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgdHJpZ2dlcnMgPSBlbmdpbmUuc3RhdGVzQnlFbGVtZW50LmdldChwYXJlbnQpOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAodHJpZ2dlcnMpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRhaW5zUG90ZW50aWFsUGFyZW50VHJhbnNpdGlvbiA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAg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PSBlbGVtZW50W1JFTU9WQUxfRkxBR107CiAgICAgICAgICAgICAgICBpZiAoIXJlbW92YWxGbGFnIHx8IHJlbW92YWxGbGFnID09PSBOVUxMX1JFTU9WQUxfU1RBVEUpIHsKICAgICAgICAgICAgICAgICAgICAvLyB3ZSBkbyB0aGlzIGFmdGVyIHRoZSBmbHVzaCBoYXMgb2NjdXJyZWQgc3VjaAogICAgICAgICAgICAgICAgICAgIC8vIHRoYXQgdGhlIGNhbGxiYWNrcyBjYW4gYmUgZmlyZWQKICAgICAgICAgICAgICAgICAgICBlbmdpbmUuYWZ0ZXJGbHVzaCgoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAoKSA9PiB0aGlzLmNsZWFyRWxlbWVudENhY2hlKGVsZW1lbnQpKSk7CiAgICAgICAgICAgICAgICAgICAgZW5naW5lLmRlc3Ryb3lJbm5lckFuaW1hdGlvbnMoZWxlbWVudCk7CiAgICAgICAgICAgICAgICAgICAgZW5naW5lLl9vblJlbW92YWxDb21wbGV0ZShlbGVtZW50LCBjb250ZXh0KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgKiBAcGFyYW0gez99IHBhcmVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgaW5zZXJ0Tm9kZShlbGVtZW50LCBwYXJlbnQpIHsKICAgICAgICAgICAgYWRkQ2xhc3MoZWxlbWVudCwgdGhpcy5faG9zdENsYXNzTmFtZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gbWljcm90YXNrSWQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGRyYWluUXVldWVkVHJhbnNpdGlvbnMobWljcm90YXNrSWQpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBbXTsKICAgICAgICAgICAgdGhpcy5fcXVldWUuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZW50cnkKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGVudHJ5ID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHBsYXllciA9IGVudHJ5LnBsYXllcjsKICAgICAgICAgICAgICAgIGlmIChwbGF5ZXIuZGVzdHJveWVkKQogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGVsZW1lbnQgPSBlbnRyeS5lbGVtZW50OwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgbGlzdGVuZXJzID0gdGhpcy5fZWxlbWVudExpc3RlbmVycy5nZXQoZWxlbWVudCk7CiAgICAgICAgICAgICAgICBpZiAobGlzdGVuZXJzKSB7CiAgICAgICAgICAgICAgICAgICAgbGlzdGVuZXJzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbGlzdGVuZXIKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgIChsaXN0ZW5lcikgPT4gewogICAgICAgICAgICAgICAgICAgICAgICBpZiAobGlzdGVuZXIubmFtZSA9PSBlbnRyeS50cmlnZ2VyTmFtZSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgYmFzZUV2ZW50ID0gbWFrZUFuaW1hdGlvbkV2ZW50KGVsZW1lbnQsIGVudHJ5LnRyaWdnZXJOYW1lLCBlbnRyeS5mcm9tU3RhdGUudmFsdWUsIGVudHJ5LnRvU3RhdGUudmFsdWUpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgKCgvKiogQHR5cGUgez99ICovIChiYXNlRXZlbnQpKSlbJ19kYXRhJ10gPSBtaWNyb3Rhc2tJZDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpc3Rlbk9uUGxheWVyKGVudHJ5LnBsYXllciwgbGlzdGVuZXIucGhhc2UsIGJhc2VFdmVudCwgbGlzdGVuZXIuY2FsbGJhY2spOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKHBsYXllci5tYXJrZWRGb3JEZXN0cm95KSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fZW5naW5lLmFmdGVyRmx1c2goKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgICAgICAgICAvLyBub3cgd2UgY2FuIGRlc3Ryb3kgdGhlIGVsZW1lbnQgcHJvcGVybHkgc2luY2UgdGhlIGV2ZW50IGxpc3RlbmVycyBoYXZlCiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGJlZW4gYm91bmQgdG8gdGhlIHBsYXllcgogICAgICAgICAgICAgICAgICAgICAgICBwbGF5ZXIuZGVzdHJveSgpOwogICAgICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9ucy5wdXNoKGVudHJ5KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB0aGlzLl9xdWV1ZSA9IFtdOwogICAgICAgICAgICByZXR1cm4gaW5zdHJ1Y3Rpb25zLnNvcnQoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGEKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBiCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoYSwgYikgPT4gewogICAgICAgICAgICAgICAgLy8gaWYgZGVwQ291bnQgPT0gMCB0aGVtIG1vdmUgdG8gZnJvbnQKICAgICAgICAgICAgICAgIC8vIG90aGVyd2lzZSBpZiBhIGNvbnRhaW5zIGIgdGhlbiBtb3ZlIGJhY2sKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGQwID0gYS50cmFuc2l0aW9uLmFzdC5kZXBDb3VudDsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGQxID0gYi50cmFuc2l0aW9uLmFzdC5kZXBDb3VudDsKICAgICAgICAgICAgICAgIGlmIChkMCA9PSAwIHx8IGQxID09IDApIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gZDAgLSBkMTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9lbmdpbmUuZHJpdmVyLmNvbnRhaW5zRWxlbWVudChhLmVsZW1lbnQsIGIuZWxlbWVudCkgPyAxIDogLTE7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBjb250ZXh0CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkZXN0cm95KGNvbnRleHQpIHsKICAgICAgICAgICAgdGhpcy5wbGF5ZXJzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHAgPT4gcC5kZXN0cm95KCkpKTsKICAgICAgICAgICAgdGhpcy5fc2lnbmFsUmVtb3ZhbEZvcklubmVyVHJpZ2dlcnModGhpcy5ob3N0RWxlbWVudCwgY29udGV4dCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZWxlbWVudENvbnRhaW5zRGF0YShlbGVtZW50KSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGNvbnRhaW5zRGF0YSA9IGZhbHNlOwogICAgICAgICAgICBpZiAodGhpcy5fZWxlbWVudExpc3RlbmVycy5oYXMoZWxlbWVudCkpCiAgICAgICAgICAgICAgICBjb250YWluc0RhdGEgPSB0cnVlOwogICAgICAgICAgICBjb250YWluc0RhdGEgPQogICAgICAgICAgICAgICAgKHRoaXMuX3F1ZXVlLmZpbmQoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBlbnRyeQogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgZW50cnkgPT4gZW50cnkuZWxlbWVudCA9PT0gZWxlbWVudCkpID8gdHJ1ZSA6IGZhbHNlKSB8fCBjb250YWluc0RhdGE7CiAgICAgICAgICAgIHJldHVybiBjb250YWluc0RhdGE7CiAgICAgICAgfQogICAgfQogICAgY2xhc3MgVHJhbnNpdGlvbkFuaW1hdGlvbkVuZ2luZSB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBib2R5Tm9kZQogICAgICAgICAqIEBwYXJhbSB7P30gZHJpdmVyCiAgICAgICAgICogQHBhcmFtIHs/fSBfbm9ybWFsaXplcgogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKGJvZHlOb2RlLCBkcml2ZXIsIF9ub3JtYWxpemVyKSB7CiAgICAgICAgICAgIHRoaXMuYm9keU5vZGUgPSBib2R5Tm9kZTsKICAgICAgICAgICAgdGhpcy5kcml2ZXIgPSBkcml2ZXI7CiAgICAgICAgICAgIHRoaXMuX25vcm1hbGl6ZXIgPSBfbm9ybWFsaXplcjsKICAgICAgICAgICAgdGhpcy5wbGF5ZXJzID0gW107CiAgICAgICAgICAgIHRoaXMubmV3SG9zdEVsZW1lbnRzID0gbmV3IE1hcCgpOwogICAgICAgICAgICB0aGlzLnBsYXllcnNCeUVsZW1lbnQgPSBuZXcgTWFwKCk7CiAgICAgICAgICAgIHRoaXMucGxheWVyc0J5UXVlcmllZEVsZW1lbnQgPSBuZXcgTWFwKCk7CiAgICAgICAgICAgIHRoaXMuc3RhdGVzQnlFbGVtZW50ID0gbmV3IE1hcCgpOwogICAgICAgICAgICB0aGlzLmRpc2FibGVkTm9kZXMgPSBuZXcgU2V0KCk7CiAgICAgICAgICAgIHRoaXMudG90YWxBbmltYXRpb25zID0gMDsKICAgICAgICAgICAgdGhpcy50b3RhbFF1ZXVlZFBsYXllcnMgPSAwOwogICAgICAgICAgICB0aGlzLl9uYW1lc3BhY2VMb29rdXAgPSB7fTsKICAgICAgICAgICAgdGhpcy5fbmFtZXNwYWNlTGlzdCA9IFtdOwogICAgICAgICAgICB0aGlzLl9mbHVzaEZucyA9IFtdOwogICAgICAgICAgICB0aGlzLl93aGVuUXVpZXRGbnMgPSBbXTsKICAgICAgICAgICAgdGhpcy5uYW1lc3BhY2VzQnlIb3N0RWxlbWVudCA9IG5ldyBNYXAoKTsKICAgICAgICAgICAgdGhpcy5jb2xsZWN0ZWRFbnRlckVsZW1lbnRzID0gW107CiAgICAgICAgICAgIHRoaXMuY29sbGVjdGVkTGVhdmVFbGVtZW50cyA9IFtdOwogICAgICAgICAgICAvLyB0aGlzIG1ldGhvZCBpcyBkZXNpZ25lZCB0byBiZSBvdmVycmlkZGVuIGJ5IHRoZSBjb2RlIHRoYXQgdXNlcyB0aGlzIGVuZ2luZQogICAgICAgICAgICB0aGlzLm9uUmVtb3ZhbENvbXBsZXRlID0gKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjb250ZXh0CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoZWxlbWVudCwgY29udGV4dCkgPT4geyB9KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAqIEBwYXJhbSB7P30gY29udGV4dAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX29uUmVtb3ZhbENvbXBsZXRlKGVsZW1lbnQsIGNvbnRleHQpIHsKICAgICAgICAgICAgdGhpcy5vblJlbW92YWxDb21wbGV0ZShlbGVtZW50LCBjb250ZXh0KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgcXVldWVkUGxheWVycygpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwbGF5ZXJzID0gW107CiAgICAgICAgICAgIHRoaXMuX25hbWVzcGFjZUxpc3QuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbnMKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIG5zID0+IHsKICAgICAgICAgICAgICAgIG5zLnBsYXllcnMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHBsYXllcgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgcGxheWVyID0+IHsKICAgICAgICAgICAgICAgICAgICBpZiAocGxheWVyLnF1ZXVlZCkgewogICAgICAgICAgICAgICAgICAgICAgICBwbGF5ZXJzLnB1c2gocGxheWVyKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgcmV0dXJuIHBsYXllcnM7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gbmFtZXNwYWNlSWQKICAgICAgICAgKiBAcGFyYW0gez99IGhvc3RFbGVtZW50CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBjcmVhdGVOYW1lc3BhY2UobmFtZXNwYWNlSWQsIGhvc3RFbGVtZW50KSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbnMgPSBuZXcgQW5pbWF0aW9uVHJhbnNpdGlvbk5hbWVzcGFjZShuYW1lc3BhY2VJZCwgaG9zdEVsZW1lbnQsIHRoaXMpOwogICAgICAgICAgICBpZiAoaG9zdEVsZW1lbnQucGFyZW50Tm9kZSkgewogICAgICAgICAgICAgICAgdGhpcy5fYmFsYW5jZU5hbWVzcGFjZUxpc3QobnMsIGhvc3RFbGVtZW50KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIC8vIGRlZmVyIHRoaXMgbGF0ZXIgdW50aWwgZmx1c2ggZHVyaW5nIHdoZW4gdGhlIGhvc3QgZWxlbWVudCBoYXMKICAgICAgICAgICAgICAgIC8vIGJlZW4gaW5zZXJ0ZWQgc28gdGhhdCB3ZSBrbm93IGV4YWN0bHkgd2hlcmUgdG8gcGxhY2UgaXQgaW4KICAgICAgICAgICAgICAgIC8vIHRoZSBuYW1lc3BhY2UgbGlzdAogICAgICAgICAgICAgICAgdGhpcy5uZXdIb3N0RWxlbWVudHMuc2V0KGhvc3RFbGVtZW50LCBucyk7CiAgICAgICAgICAgICAgICAvLyBnaXZlbiB0aGF0IHRoaXMgaG9zdCBlbGVtZW50IGlzIGFwYXJ0IG9mIHRoZSBhbmltYXRpb24gY29kZSwgaXQKICAgICAgICAgICAgICAgIC8vIG1heSBvciBtYXkgbm90IGJlIGluc2VydGVkIGJ5IGEgcGFyZW50IG5vZGUgdGhhdCBpcyBhbiBvZiBhbgogICAgICAgICAgICAgICAgLy8gYW5pbWF0aW9uIHJlbmRlcmVyIHR5cGUuIElmIHRoaXMgaGFwcGVucyB0aGVuIHdlIGNhbiBzdGlsbCBoYXZlCiAgICAgICAgICAgICAgICAvLyBhY2Nlc3MgdG8gdGhpcyBpdGVtIHdoZW4gd2UgcXVlcnkgZm9yIDplbnRlciBub2Rlcy4gSWYgdGhlIHBhcmVudAogICAgICAgICAgICAgICAgLy8gaXMgYSByZW5kZXJlciB0aGVuIHRoZSBzZXQgZGF0YS1zdHJ1Y3R1cmUgd2lsbCBub3JtYWxpemUgdGhlIGVudHJ5CiAgICAgICAgICAgICAgICB0aGlzLmNvbGxlY3RFbnRlckVsZW1lbnQoaG9zdEVsZW1lbnQpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9uYW1lc3BhY2VMb29rdXBbbmFtZXNwYWNlSWRdID0gbnM7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBucwogICAgICAgICAqIEBwYXJhbSB7P30gaG9zdEVsZW1lbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9iYWxhbmNlTmFtZXNwYWNlTGlzdChucywgaG9zdEVsZW1lbnQpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBsaW1pdCA9IHRoaXMuX25hbWVzcGFjZUxpc3QubGVuZ3RoIC0gMTsKICAgICAgICAgICAgaWYgKGxpbWl0ID49IDApIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCBmb3VuZCA9IGZhbHNlOwogICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IGxpbWl0OyBpID49IDA7IGktLSkgewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBuZXh0TmFtZXNwYWNlID0gdGhpcy5fbmFtZXNwYWNlTGlzdFtpXTsKICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5kcml2ZXIuY29udGFpbnNFbGVtZW50KG5leHROYW1lc3BhY2UuaG9zdEVsZW1lbnQsIGhvc3RFbGVtZW50KSkgewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9uYW1lc3BhY2VMaXN0LnNwbGljZShpICsgMSwgMCwgbnMpOwogICAgICAgICAgICAgICAgICAgICAgICBmb3VuZCA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmICghZm91bmQpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9uYW1lc3BhY2VMaXN0LnNwbGljZSgwLCAwLCBucyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLl9uYW1lc3BhY2VMaXN0LnB1c2gobnMpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMubmFtZXNwYWNlc0J5SG9zdEVsZW1lbnQuc2V0KGhvc3RFbGVtZW50LCBucyk7CiAgICAgICAgICAgIHJldHVybiBuczsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBuYW1lc3BhY2VJZAogICAgICAgICAqIEBwYXJhbSB7P30gaG9zdEVsZW1lbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlZ2lzdGVyKG5hbWVzcGFjZUlkLCBob3N0RWxlbWVudCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBucyA9IHRoaXMuX25hbWVzcGFjZUxvb2t1cFtuYW1lc3BhY2VJZF07CiAgICAgICAgICAgIGlmICghbnMpIHsKICAgICAgICAgICAgICAgIG5zID0gdGhpcy5jcmVhdGVOYW1lc3BhY2UobmFtZXNwYWNlSWQsIGhvc3RFbGVtZW50KTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gbnM7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gbmFtZXNwYWNlSWQKICAgICAgICAgKiBAcGFyYW0gez99IG5hbWUKICAgICAgICAgKiBAcGFyYW0gez99IHRyaWdnZXIKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlZ2lzdGVyVHJpZ2dlcihuYW1lc3BhY2VJZCwgbmFtZSwgdHJpZ2dlcikgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBucyA9IHRoaXMuX25hbWVzcGFjZUxvb2t1cFtuYW1lc3BhY2VJZF07CiAgICAgICAgICAgIGlmIChucyAmJiBucy5yZWdpc3RlcihuYW1lLCB0cmlnZ2VyKSkgewogICAgICAgICAgICAgICAgdGhpcy50b3RhbEFuaW1hdGlvbnMrKzsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IG5hbWVzcGFjZUlkCiAgICAgICAgICogQHBhcmFtIHs/fSBjb250ZXh0CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkZXN0cm95KG5hbWVzcGFjZUlkLCBjb250ZXh0KSB7CiAgICAgICAgICAgIGlmICghbmFtZXNwYWNlSWQpCiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbnMgPSB0aGlzLl9mZXRjaE5hbWVzcGFjZShuYW1lc3BhY2VJZCk7CiAgICAgICAgICAgIHRoaXMuYWZ0ZXJGbHVzaCgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLm5hbWVzcGFjZXNCeUhvc3RFbGVtZW50LmRlbGV0ZShucy5ob3N0RWxlbWVudCk7CiAgICAgICAgICAgICAgICBkZWxldGUgdGhpcy5fbmFtZXNwYWNlTG9va3VwW25hbWVzcGFjZUlkXTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGluZGV4ID0gdGhpcy5fbmFtZXNwYWNlTGlzdC5pbmRleE9mKG5zKTsKICAgICAgICAgICAgICAgIGlmIChpbmRleCA+PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fbmFtZXNwYWNlTGlzdC5zcGxpY2UoaW5kZXgsIDEpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIHRoaXMuYWZ0ZXJGbHVzaEFuaW1hdGlvbnNEb25lKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IG5zLmRlc3Ryb3koY29udGV4dCkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGlkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZmV0Y2hOYW1lc3BhY2UoaWQpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX25hbWVzcGFjZUxvb2t1cFtpZF07CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZmV0Y2hOYW1lc3BhY2VzQnlFbGVtZW50KGVsZW1lbnQpIHsKICAgICAgICAgICAgLy8gbm9ybWFsbHkgdGhlcmUgc2hvdWxkIG9ubHkgYmUgb25lIG5hbWVzcGFjZSBwZXIgZWxlbWVudCwgaG93ZXZlcgogICAgICAgICAgICAvLyBpZiBAdHJpZ2dlcnMgYXJlIHBsYWNlZCBvbiBib3RoIHRoZSBjb21wb25lbnQgZWxlbWVudCBhbmQgdGhlbgogICAgICAgICAgICAvLyBpdHMgaG9zdCBlbGVtZW50ICh3aXRoaW4gdGhlIGNvbXBvbmVudCBjb2RlKSB0aGVuIHRoZXJlIHdpbGwgYmUKICAgICAgICAgICAgLy8gdHdvIG5hbWVzcGFjZXMgcmV0dXJuZWQuIFdlIHVzZSBhIHNldCBoZXJlIHRvIHNpbXBseSB0aGUgZGVkdXBlCiAgICAgICAgICAgIC8vIG9mIG5hbWVzcGFjZXMgaW5jYXNlIHRoZXJlIGFyZSBtdWx0aXBsZSB0cmlnZ2VycyBib3RoIHRoZSBlbG0gYW5kIGhvc3QKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBuYW1lc3BhY2VzID0gbmV3IFNldCgpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGVsZW1lbnRTdGF0ZXMgPSB0aGlzLnN0YXRlc0J5RWxlbWVudC5nZXQoZWxlbWVudCk7CiAgICAgICAgICAgIGlmIChlbGVtZW50U3RhdGVzKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBrZXlzID0gT2JqZWN0LmtleXMoZWxlbWVudFN0YXRlcyk7CiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGtleXMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgbnNJZCA9IGVsZW1lbnRTdGF0ZXNba2V5c1tpXV0ubmFtZXNwYWNlSWQ7CiAgICAgICAgICAgICAgICAgICAgaWYgKG5zSWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBucyA9IHRoaXMuX2ZldGNoTmFtZXNwYWNlKG5zSWQpOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAobnMpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWVzcGFjZXMuYWRkKG5zKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gbmFtZXNwYWNlczsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBuYW1lc3BhY2VJZAogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAqIEBwYXJhbSB7P30gbmFtZQogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHRyaWdnZXIobmFtZXNwYWNlSWQsIGVsZW1lbnQsIG5hbWUsIHZhbHVlKSB7CiAgICAgICAgICAgIGlmIChpc0VsZW1lbnROb2RlKGVsZW1lbnQpKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBucyA9IHRoaXMuX2ZldGNoTmFtZXNwYWNlKG5hbWVzcGFjZUlkKTsKICAgICAgICAgICAgICAgIGlmIChucykgewogICAgICAgICAgICAgICAgICAgIG5zLnRyaWdnZXIoZWxlbWVudCwgbmFtZSwgdmFsdWUpOwogICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBuYW1lc3BhY2VJZAogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAqIEBwYXJhbSB7P30gcGFyZW50CiAgICAgICAgICogQHBhcmFtIHs/fSBpbnNlcnRCZWZvcmUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGluc2VydE5vZGUobmFtZXNwYWNlSWQsIGVsZW1lbnQsIHBhcmVudCwgaW5zZXJ0QmVmb3JlKSB7CiAgICAgICAgICAgIGlmICghaXNFbGVtZW50Tm9kZShlbGVtZW50KSkKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgLy8gc3BlY2lhbCBjYXNlIGZvciB3aGVuIGFuIGVsZW1lbnQgaXMgcmVtb3ZlZCBhbmQgcmVpbnNlcnRlZCAobW92ZSBvcGVyYXRpb24pCiAgICAgICAgICAgIC8vIHdoZW4gdGhpcyBvY2N1cnMgd2UgZG8gbm90IHdhbnQgdG8gdXNlIHRoZSBlbGVtZW50IGZvciBkZWxldGlvbiBsYXRlcgogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGRldGFpbHMgPSAoLyoqIEB0eXBlIHs/fSAqLyAoZWxlbWVudFtSRU1PVkFMX0ZMQUddKSk7CiAgICAgICAgICAgIGlmIChkZXRhaWxzICYmIGRldGFpbHMuc2V0Rm9yUmVtb3ZhbCkgewogICAgICAgICAgICAgICAgZGV0YWlscy5zZXRGb3JSZW1vdmFsID0gZmFsc2U7CiAgICAgICAgICAgICAgICBkZXRhaWxzLnNldEZvck1vdmUgPSB0cnVlOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgaW5kZXggPSB0aGlzLmNvbGxlY3RlZExlYXZlRWxlbWVudHMuaW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AgICAgICAvLyBpcyByZXNvbHZlZCwgd2UgbmVlZCB0byBoYW5kbGUgdGhlIHNjZW5hcmlvIHdoZW4gRE9NIGlzIG5vdCBpbiBhCiAgICAgICAgICAgICAgICAvLyBjb25zaXN0ZW50IHN0YXRlIGR1cmluZyB0aGUgYW5pbWF0aW9uLgogICAgICAgICAgICAgICAgaWYgKG5zKSB7CiAgICAgICAgICAgICAgICAgICAgbnMuaW5zZXJ0Tm9kZShlbGVtZW50LCBwYXJlbnQpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIG9ubHkgKmRpcmVjdGl2ZXMgYW5kIGhvc3QgZWxlbWVudHMgYXJlIGluc2VydGVkIGJlZm9yZQogICAgICAgICAgICBpZiAoaW5zZXJ0QmVmb3JlKSB7CiAgICAgICAgICAgICAgICB0aGlzLmNvbGxlY3RFbnRlckVsZW1lbnQoZWxlbWVudCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBjb2xsZWN0RW50ZXJFbGVtZW50KGVsZW1lbnQpIHsKICAgICAgICAgICAgdGhpcy5jb2xsZWN0ZWRFbnRlckVsZW1lbnRzLnB1c2goZWxlbWVudCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG1hcmtFbGVtZW50QXNEaXNhYmxlZChlbGVtZW50LCB2YWx1ZSkgewogICAgICAgICAgICBpZiAodmFsdWUpIHsKICAgICAgICAgICAgICAgIGlmICghdGhpcy5kaXNhYmxlZE5vZGVzLmhhcyhlbGVtZW50KSkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuZGlzYWJsZWROb2Rlcy5hZGQoZWxlbWVudCk7CiAgICAgICAgICAgICAgICAgICAgYWRkQ2xhc3MoZWxlbWVudCwgRElTQUJMRURfQ0xBU1NOQU1FKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmICh0aGlzLmRpc2FibGVkTm9kZXMuaGFzKGVsZW1lbnQpKSB7CiAgICAgICAgICAgICAgICB0aGlzLmRpc2FibGVkTm9kZXMuZGVsZXRlKGVsZW1lbnQpOwogICAgICAgICAgICAgICAgcmVtb3ZlQ2xhc3MoZWxlbWVudCwgRElTQUJMRURfQ0xBU1NOQU1FKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IG5hbWVzcGFjZUlkCiAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgICAgICogQHBhcmFtIHs/fSBpc0hvc3RFbGVtZW50CiAgICAgICAgICogQHBhcmFtIHs/fSBjb250ZXh0CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZW1vdmVOb2RlKG5hbWVzcGFjZUlkLCBlbGVtZW50LCBpc0hvc3RFbGVtZW50LCBjb250ZXh0KSB7CiAgICAgICAgICAgIGlmIChpc0VsZW1lbnROb2RlKGVsZW1lbnQpKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBucyA9IG5hbWVzcGFjZUlkID8gdGhpcy5fZmV0Y2hOYW1lc3BhY2UobmFtZXNwYWNlSWQpIDogbnVsbDsKICAgICAgICAgICAgICAgIGlmIChucykgewogICAgICAgICAgICAgICAgICAgIG5zLnJlbW92ZU5vZGUoZWxlbWVudCwgY29udGV4dCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLm1hcmtFbGVtZW50QXNSZW1vdmVkKG5hbWVzcGFjZUlkLCBlbGVtZW50LCBmYWxzZSwgY29udGV4dCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAoaXNIb3N0RWxlbWVudCkgewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBob3N0TlMgPSB0aGlzLm5hbWVzcGFjZXNCeUhvc3RFbGVtZW50LmdldChlbGVtZW50KTsKICAgICAgICAgICAgICAgICAgICBpZiAoaG9zdE5TICYmIGhvc3ROUy5pZCAhPT0gbmFtZXNwYWNlSWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgaG9zdE5TLnJlbW92ZU5vZGUoZWxlbWVudCwgY29udGV4dCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fb25SZW1vdmFsQ29tcGxldGUoZWxlbWVudCwgY29udGV4dCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBuYW1lc3BhY2VJZAogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAqIEBwYXJhbSB7Pz19IGhhc0FuaW1hdGlvbgogICAgICAgICAqIEBwYXJhbSB7Pz19IGNvbnRleHQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG1hcmtFbGVtZW50QXNSZW1vdmVkKG5hbWVzcGFjZUlkLCBlbGVtZW50LCBoYXNBbmltYXRpb24sIGNvbnRleHQpIHsKICAgICAgICAgICAgdGhpcy5jb2xsZWN0ZWRMZWF2ZUVsZW1lbnRzLnB1c2goZWxlbWVudCk7CiAgICAgICAgICAgIGVsZW1lbnRbUkVNT1ZBTF9GTEFHXSA9CiAgICAgICAgICAgICAgICB7IG5hbWVzcGFjZUlkLCBzZXRGb3JSZW1vdmFsOiBjb250ZXh0LCBoYXNBbmltYXRpb24sIHJlbW92ZWRCZWZvcmVRdWVyaWVkOiBmYWxzZSB9OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IG5hbWVzcGFjZUlkCiAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgICAgICogQHBhcmFtIHs/fSBuYW1lCiAgICAgICAgICogQHBhcmFtIHs/fSBwaGFzZQogICAgICAgICAqIEBwYXJhbSB7P30gY2FsbGJhY2sKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGxpc3RlbihuYW1lc3BhY2VJZCwgZWxlbWVudCwgbmFtZSwgcGhhc2UsIGNhbGxiYWNrKSB7CiAgICAgICAgICAgIGlmIChpc0VsZW1lbnROb2RlKGVsZW1lbnQpKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fZmV0Y2hOYW1lc3BhY2UobmFtZXNwYWNlSWQpLmxpc3RlbihlbGVtZW50LCBuYW1lLCBwaGFzZSwgY2FsbGJhY2spOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiAoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7IH0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gZW50cnkKICAgICAgICAgKiBAcGFyYW0gez99IHN1YlRpbWVsaW5lcwogICAgICAgICAqIEBwYXJhbSB7P30gZW50ZXJDbGFzc05hbWUKICAgICAgICAgKiBAcGFyYW0gez99IGxlYXZlQ2xhc3NOYW1lCiAgICAgICAgICogQHBhcmFtIHs/PX0gc2tpcEJ1aWxkQXN0CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfYnVpbGRJbnN0cnVjdGlvbihlbnRyeSwgc3ViVGltZWxpbmVzLCBlbnRlckNsYXNzTmFtZSwgbGVhdmVDbGFzc05hbWUsIHNraXBCdWlsZEFzdCkgewogICAgICAgICAgICByZXR1cm4gZW50cnkudHJhbnNpdGlvbi5idWlsZCh0aGlzLmRyaXZlciwgZW50cnkuZWxlbWVudCwgZW50cnkuZnJvbVN0YXRlLnZhbHVlLCBlbnRyeS50b1N0YXRlLnZhbHVlLCBlbnRlckNsYXNzTmFtZSwgbGVhdmVDbGFzc05hbWUsIGVudHJ5LmZyb21TdGF0ZS5vcHRpb25zLCBlbnRyeS50b1N0YXRlLm9wdGlvbnMsIHN1YlRpbWVsaW5lcywgc2tpcEJ1aWxkQXN0KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBjb250YWluZXJFbGVtZW50CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkZXN0cm95SW5uZXJBbmltYXRpb25zKGNvbnRhaW5lckVsZW1lbnQpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgZWxlbWVudHMgPSB0aGlzLmRyaXZlci5xdWVyeShjb250YWluZXJFbGVtZW50LCBOR19UUklHR0VSX1NFTEVDVE9SLCB0cnVlKTsKICAgICAgICAgICAgZWxlbWVudHMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZWxlbWVudCA9PiB0aGlzLmRlc3Ryb3lBY3RpdmVBbmltYXRpb25zRm9yRWxlbWVudChlbGVtZW50KSkpOwogICAgICAgICAgICBpZiAodGhpcy5wbGF5ZXJzQnlRdWVyaWVkRWxlbWVudC5zaXplID09IDApCiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIGVsZW1lbnRzID0gdGhpcy5kcml2ZXIucXVlcnkoY29udGFpbmVyRWxlbWVudCwgTkdfQU5JTUFUSU5HX1NFTEVDVE9SLCB0cnVlKTsKICAgICAgICAgICAgZWxlbWVudHMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZWxlbWVudCA9PiB0aGlzLmZpbmlzaEFjdGl2ZVF1ZXJpZWRBbmltYXRpb25PbkVsZW1lbnQoZWxlbWVudCkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkZXN0cm95QWN0aXZlQW5pbWF0aW9uc0ZvckVsZW1lbnQoZWxlbWVudCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHBsYXllcnMgPSB0aGlzLnBsYXllcnNCeUVsZW1lbnQuZ2V0KGVsZW1lbnQpOwogICAgICAgICAgICBpZiAocGxheWVycykgewogICAgICAgICAgICAgICAgcGxheWVycy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcGxheWVyCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBwbGF5ZXIgPT4gewogICAgICAgICAgICAgICAgICAgIC8vIHNwZWNpYWwgY2FzZSBmb3Igd2hlbiBhbiBlbGVtZW50IGlzIHNldCBmb3IgZGVzdHJ1Y3Rpb24sIGJ1dCBoYXNuJ3Qgc3RhcnRlZC4KICAgICAgICAgICAgICAgICAgICAvLyBpbiB0aGlzIHNpdHVhdGlvbiB3ZSB3YW50IHRvIGRlbGF5IHRoZSBkZXN0cnVjdGlvbiB1bnRpbCB0aGUgZmx1c2ggb2NjdXJzCiAgICAgICAgICAgICAgICAgICAgLy8gc28gdGhhdCBhbnkgZXZlbnQgbGlzdGVuZXJzIGF0dGFjaGVkIHRvIHRoZSBwbGF5ZXIgYXJlIHRyaWdnZXJlZC4KICAgICAgICAgICAgICAgICAgICBpZiAocGxheWVyLnF1ZXVlZCkgewogICAgICAgICAgICAgICAgICAgICAgICBwbGF5ZXIubWFya2VkRm9yRGVzdHJveSA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICBwbGF5ZXIuZGVzdHJveSgpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZpbmlzaEFjdGl2ZVF1ZXJpZWRBbmltYXRpb25PbkVsZW1lbnQoZWxlbWVudCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHBsYXllcnMgPSB0aGlzLnBsYXllcnNCeVF1ZXJpZWRFbGVtZW50LmdldChlbGVtZW50KTsKICAgICAgICAgICAgaWYgKHBsYXllcnMpIHsKICAgICAgICAgICAgICAgIHBsYXllcnMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHBsYXllcgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgcGxheWVyID0+IHBsYXllci5maW5pc2goKSkpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgd2hlblJlbmRlcmluZ0RvbmUoKSB7CiAgICAgICAgICAgIHJldHVybiBuZXcgUHJvbWlzZSgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcmVzb2x2ZQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgcmVzb2x2ZSA9PiB7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5wbGF5ZXJzLmxlbmd0aCkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBvcHRpbWl6ZUdyb3VwUGxheWVyKHRoaXMucGxheWVycykub25Eb25lKCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICgpID0+IHJlc29sdmUoKSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZSgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcHJvY2Vzc0xlYXZlTm9kZShlbGVtZW50KSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZGV0YWlscyA9ICgvKiogQHR5cGUgez99ICovIChlbGVtZW50W1JFTU9WQUxfRkxBR10pKTsKICAgICAgICAgICAgaWYgKGRldGFpbHMgJiYgZGV0YWlscy5zZXRGb3JSZW1vdmFsKSB7CiAgICAgICAgICAgICAgICAvLyB0aGlzIHdpbGwgcHJldmVudCBpdCBmcm9tIHJlbW92aW5nIGl0IHR3aWNlCiAgICAgICAgICAgICAgICBlbGVtZW50W1JFTU9WQUxfRkxBR10gPSBOVUxMX1JFTU9WQUxfU1RBVEU7CiAgICAgICAgICAgICAgICBpZiAoZGV0YWlscy5uYW1lc3BhY2VJZCkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuZGVzdHJveUlubmVyQW5pbWF0aW9ucyhlbGVtZW50KTsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgbnMgPSB0aGlzLl9mZXRjaE5hbWVzcGFjZShkZXRhaWxzLm5hbWVzcGFjZUlkKTsKICAgICAgICAgICAgICAgICAgICBpZiAobnMpIHsKICAgICAgICAgICAgICAgICAgICAgICAgbnMuY2xlYXJFbGVtZW50Q2FjaGUoZWxlbWVudCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdGhpcy5fb25SZW1vdmFsQ29tcGxldGUoZWxlbWVudCwgZGV0YWlscy5zZXRGb3JSZW1vdmFsKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5kcml2ZXIubWF0Y2hlc0VsZW1lbnQoZWxlbWVudCwgRElTQUJMRURfU0VMRUNUT1IpKSB7CiAgICAgICAgICAgICAgICB0aGlzLm1hcmtFbGVtZW50QXNEaXNhYmxlZChlbGVtZW50LCBmYWxzZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5kcml2ZXIucXVlcnkoZWxlbWVudCwgRElTQUJMRURfU0VMRUNUT1IsIHRydWUpLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IG5vZGUKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIG5vZGUgPT4gewogICAgICAgICAgICAgICAgdGhpcy5tYXJrRWxlbWVudEFzRGlzYWJsZWQobm9kZSwgZmFsc2UpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7Pz19IG1pY3JvdGFza0lkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmbHVzaChtaWNyb3Rhc2tJZCA9IC0xKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHBsYXllcnMgPSBbXTsKICAgICAgICAgICAgaWYgKHRoaXMubmV3SG9zdEVsZW1lbnRzLnNpemUpIHsKICAgICAgICAgICAgICAgIHRoaXMubmV3SG9zdEVsZW1lbnRzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBucwogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAobnMsIGVsZW1lbnQpID0+IHRoaXMuX2JhbGFuY2VOYW1lc3BhY2VMaXN0KG5zLCBlbGVtZW50KSkpOwogICAgICAgICAgICAgICAgdGhpcy5uZXdIb3N0RWxlbWVudHMuY2xlYXIoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy50b3RhbEFuaW1hdGlvbnMgJiYgdGhpcy5jb2xsZWN0ZWRFbnRlckVsZW1lbnRzLmxlbmd0aCkgewogICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB0aGlzLmNvbGxlY3RlZEVudGVyRWxlbWVudHMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgZWxtID0gdGhpcy5jb2xsZWN0ZWRFbnRlckVsZW1lbnRzW2ldOwogICAgICAgICAgICAgICAgICAgIGFkZENsYXNzKGVsbSwgU1RBUl9DTEFTU05BTUUpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0aGlzLl9uYW1lc3BhY2VMaXN0Lmxlbmd0aCAmJgogICAgICAgICAgICAgICAgKHRoaXMudG90YWxRdWV1ZWRQbGF5ZXJzIHx8IHRoaXMuY29sbGVjdGVkTGVhdmVFbGVtZW50cy5sZW5ndGgpKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBjbGVhbnVwRm5zID0gW107CiAgICAgICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgICAgIHBsYXllcnMgPSB0aGlzLl9mbHVzaEFuaW1hdGlvbnMoY2xlYW51cEZucywgbWljcm90YXNrSWQpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZmluYWxseSB7CiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBjbGVhbnVwRm5zLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFudXBGbnNbaV0oKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHRoaXMuY29sbGVjdGVkTGVhdmVFbGVtZW50cy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBlbGVtZW50ID0gdGhpcy5jb2xsZWN0ZWRMZWF2ZUVsZW1lbnRzW2ldOwogICAgICAgICAgICAgICAgICAgIHRoaXMucHJvY2Vzc0xlYXZlTm9kZShlbGVtZW50KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLnRvdGFsUXVldWVkUGxheWVycyA9IDA7CiAgICAgICAgICAgIHRoaXMuY29sbGVjdGVkRW50ZXJFbGVtZW50cy5sZW5ndGggPSAwOwogICAgICAgICAgICB0aGlzLmNvbGxlY3RlZExlYXZlRWxlbWVudHMubGVuZ3RoID0gMDsKICAgICAgICAgICAgdGhpcy5fZmx1c2hGbnMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGZuID0+IGZuKCkpKTsKICAgICAgICAgICAgdGhpcy5fZmx1c2hGbnMgPSBbXTsKICAgICAgICAgICAgaWYgKHRoaXMuX3doZW5RdWlldEZucy5sZW5ndGgpIHsKICAgICAgICAgICAgICAgIC8vIHdlIG1vdmUgdGhlc2Ugb3ZlciB0byBhIHZhcmlhYmxlIHNvIHRoYXQKICAgICAgICAgICAgICAgIC8vIGlmIGFueSBuZXcgY2FsbGJhY2tzIGFyZSByZWdpc3RlcmVkIGluIGFub3RoZXIKICAgICAgICAgICAgICAgIC8vIGZsdXNoIHRoZXkgZG8gbm90IHBvcHVsYXRlIHRoZSBleGlzdGluZyBzZXQKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHF1aWV0Rm5zID0gdGhpcy5fd2hlblF1aWV0Rm5zOwogICAgICAgICAgICAgICAgdGhpcy5fd2hlblF1aWV0Rm5zID0gW107CiAgICAgICAgICAgICAgICBpZiAocGxheWVycy5sZW5ndGgpIHsKICAgICAgICAgICAgICAgICAgICBvcHRpbWl6ZUdyb3VwUGxheWVyKHBsYXllcnMpLm9uRG9uZSgoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIHF1aWV0Rm5zLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGZuCiAgICAgICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICAgICBmbiA9PiBmbigpKSk7CiAgICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgcXVpZXRGbnMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgZm4gPT4gZm4oKSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZXJyb3JzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZXBvcnRFcnJvcihlcnJvcnMpIHsKICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBVbmFibGUgdG8gcHJvY2VzcyBhbmltYXRpb25zIGR1ZSB0byB0aGUgZm9sbG93aW5nIGZhaWxlZCB0cmlnZ2VyIHRyYW5zaXRpb25zXG4gJHtlcnJvcnMuam9pbignXG4nKX1gKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGNsZWFudXBGbnMKICAgICAgICAgKiBAcGFyYW0gez99IG1pY3JvdGFza0lkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZmx1c2hBbmltYXRpb25zKGNsZWFudXBGbnMsIG1pY3JvdGFza0lkKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc3ViVGltZWxpbmVzID0gbmV3IEVsZW1lbnRJbnN0cnVjdGlvbk1hcCgpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHNraXBwZWRQbGF5ZXJzID0gW107CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc2tpcHBlZFBsYXllcnNNYXAgPSBuZXcgTWFwKCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcXVldWVkSW5zdHJ1Y3Rpb25zID0gW107CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcXVlcmllZEVsZW1lbnRzID0gbmV3IE1hcCgpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGFsbFByZVN0eWxlRWxlbWVudHMgPSBuZXcgTWFwKCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgYWxsUG9zdFN0eWxlRWxlbWVudHMgPSBuZXcgTWFwKCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZGlzYWJsZWRFbGVtZW50c1NldCA9IG5ldyBTZXQoKTsKICAgICAgICAgICAgdGhpcy5kaXNhYmxlZE5vZGVzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IG5vZGUKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIG5vZGUgPT4gewogICAgICAgICAgICAgICAgZGlzYWJsZWRFbGVtZW50c1NldC5hZGQobm9kZSk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBub2Rlc1RoYXRBcmVEaXNhYmxlZCA9IHRoaXMuZHJpdmVyLnF1ZXJ5KG5vZGUsIFFVRVVFRF9TRUxFQ1RPUiwgdHJ1ZSk7CiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IG5vZGVzVGhhdEFyZURpc2FibGVkLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgZGlzYWJsZWRFbGVtZW50c1NldC5hZGQobm9kZXNUaGF0QXJlRGlzYWJsZWRbaV0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgYm9keU5vZGUgPSB0aGlzLmJvZHlOb2RlOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGFsbFRyaWdnZXJFbGVtZW50cyA9IEFycmF5LmZyb20odGhpcy5zdGF0ZXNCeUVsZW1lbnQua2V5cygpKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBlbnRlck5vZGVNYXAgPSBidWlsZFJvb3RNYXAoYWxsVHJpZ2dlckVsZW1lbnRzLCB0aGlzLmNvbGxlY3RlZEVudGVyRWxlbWVudHMpOwogICAgICAgICAgICAvLyB0aGlzIG11c3Qgb2NjdXIgYmVmb3JlIHRoZSBpbnN0cnVjdGlvbnMgYXJlIGJ1aWx0IGJlbG93IHN1Y2ggdGhhdAogICAgICAgICAgICAvLyB0aGUgOmVudGVyIHF1ZXJpZXMgbWF0Y2ggdGhlIGVsZW1lbnRzIChzaW5jZSB0aGUgdGltZWxpbmUgcXVlcmllcwogICAgICAgICAgICAvLyBhcmUgZmlyZWQgZHVyaW5nIGluc3RydWN0aW9uIGJ1aWxkaW5nKS4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBlbnRlck5vZGVNYXBJZHMgPSBuZXcgTWFwKCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGkgPSAwOwogICAgICAgICAgICBlbnRlck5vZGVNYXAuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbm9kZXMKICAgICAgICAgICAgICogQHBhcmFtIHs/fSByb290CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAobm9kZXMsIHJvb3QpID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGNsYXNzTmFtZSA9IEVOVEVSX0NMQVNTTkFNRSArIGkrKzsKICAgICAgICAgICAgICAgIGVudGVyTm9kZU1hcElkcy5zZXQocm9vdCwgY2xhc3NOYW1lKTsKICAgICAgICAgICAgICAgIG5vZGVzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBub2RlCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBub2RlID0+IGFkZENsYXNzKG5vZGUsIGNsYXNzTmFtZSkpKTsKICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGFsbExlYXZlTm9kZXMgPSBbXTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBtZXJnZWRMZWF2ZU5vZGVzID0gbmV3IFNldCgpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGxlYXZlTm9kZXNXaXRob3V0QW5pbWF0aW9ucyA9IG5ldyBTZXQoKTsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB0aGlzLmNvbGxlY3RlZExlYXZlRWxlbWVudHMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGVsZW1lbnQgPSB0aGlzLmNvbGxlY3RlZExlYXZlRWxlbWVudHNbaV07CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBkZXRhaWxzID0gKC8qKiBAdHlwZSB7P30gKi8gKGVsZW1lbnRbUkVNT1ZBTF9GTEFHXSkpOwogICAgICAgICAgICAgICAgaWYgKGRldGFpbHMgJiYgZGV0YWlscy5zZXRGb3JSZW1vdmFsKSB7CiAgICAgICAgICAgICAgICAgICAgYWxsTGVhdmVOb2Rlcy5wdXNoKGVsZW1lbnQpOwogICAgICAgICAgICAgICAgICAgIG1lcmdlZExlYXZlTm9kZXMuYWRkKGVsZW1lbnQpOwogICAgICAgICAgICAgICAgICAgIGlmIChkZXRhaWxzLmhhc0FuaW1hdGlvbikgewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmRyaXZlci5xdWVyeShlbGVtZW50LCBTVEFSX1NFTEVDVE9SLCB0cnVlKS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBlbG0KICAgICAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgICAgIGVsbSA9PiBtZXJnZWRMZWF2ZU5vZGVzLmFkZChlbG0pKSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICBsZWF2ZU5vZGVzV2l0aG91dEFuaW1hdGlvbnMuYWRkKGVsZW1lbnQpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGxlYXZlTm9kZU1hcElkcyA9IG5ldyBNYXAoKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBsZWF2ZU5vZGVNYXAgPSBidWlsZFJvb3RNYXAoYWxsVHJpZ2dlckVsZW1lbnRzLCBBcnJheS5mcm9tKG1lcmdlZExlYXZlTm9kZXMpKTsKICAgICAgICAgICAgbGVhdmVOb2RlTWFwLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IG5vZGVzCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcm9vdAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKG5vZGVzLCByb290KSA9PiB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBjbGFzc05hbWUgPSBMRUFWRV9DTEFTU05BTUUgKyBpKys7CiAgICAgICAgICAgICAgICBsZWF2ZU5vZGVNYXBJZHMuc2V0KHJvb3QsIGNsYXNzTmFtZSk7CiAgICAgICAgICAgICAgICBub2Rlcy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbm9kZQogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgbm9kZSA9PiBhZGRDbGFzcyhub2RlLCBjbGFzc05hbWUpKSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgY2xlYW51cEZucy5wdXNoKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIGVudGVyTm9kZU1hcC5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbm9kZXMKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcm9vdAogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKG5vZGVzLCByb290KSA9PiB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGNsYXNzTmFtZSA9ICgvKiogQHR5cGUgez99ICovIChlbnRlck5vZGVNYXBJZHMuZ2V0KHJvb3QpKSk7CiAgICAgICAgICAgICAgICAgICAgbm9kZXMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBub2RlCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICBub2RlID0+IHJlbW92ZUNsYXNzKG5vZGUsIGNsYXNzTmFtZSkpKTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgIGxlYXZlTm9kZU1hcC5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbm9kZXMKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcm9vdAogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKG5vZGVzLCByb290KSA9PiB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGNsYXNzTmFtZSA9ICgvKiogQHR5cGUgez99ICovIChsZWF2ZU5vZGVNYXBJZHMuZ2V0KHJvb3QpKSk7CiAgICAgICAgICAgICAgICAgICAgbm9kZXMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBub2RlCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICBub2RlID0+IHJlbW92ZUNsYXNzKG5vZGUsIGNsYXNzTmFtZSkpKTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgIGFsbExlYXZlTm9kZXMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIGVsZW1lbnQgPT4gewogICAgICAgICAgICAgICAgICAgIHRoaXMucHJvY2Vzc0xlYXZlTm9kZShlbGVtZW50KTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGFsbFBsYXllcnMgPSBbXTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBlcnJvbmVvdXNUcmFuc2l0aW9ucyA9IFtdOwogICAgICAgICAgICBmb3IgKGxldCBpID0gdGhpcy5fbmFtZXNwYWNlTGlzdC5sZW5ndGggLSAxOyBpID49IDA7IGktLSkgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgbnMgPSB0aGlzLl9uYW1lc3BhY2VMaXN0W2ldOwogICAgICAgICAgICAgICAgbnMuZHJhaW5RdWV1ZWRUcmFuc2l0aW9ucyhtaWNyb3Rhc2tJZCkuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGVudHJ5CiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBlbnRyeSA9PiB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHBsYXllciA9IGVudHJ5LnBsYXllcjsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgZWxlbWVudCA9IGVudHJ5LmVsZW1lbnQ7CiAgICAgICAgICAgICAgICAgICAgYWxsUGxheWVycy5wdXNoKHBsYXllcik7CiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuY29sbGVjdGVkRW50ZXJFbGVtZW50cy5sZW5ndGgpIHsKICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBkZXRhaWxzID0gKC8qKiBAdHlwZSB7P30gKi8gKGVsZW1lbnRbUkVNT1ZBTF9GTEFHXSkpOwogICAgICAgICAgICAgICAgICAgICAgICAvLyBtb3ZlIGFuaW1hdGlvbnMgYXJlIGN1cnJlbnRseSBub3Qgc3VwcG9ydGVkLi4uCiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkZXRhaWxzICYmIGRldGFpbHMuc2V0Rm9yTW92ZSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxheWVyLmRlc3Ryb3koKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3Qgbm9kZUlzT3JwaGFuZWQgPSAhYm9keU5vZGUgfHwgIXRoaXMuZHJpdmVyLmNvbnRhaW5zRWxlbWVudChib2R5Tm9kZSwgZWxlbWVudCk7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGxlYXZlQ2xhc3NOYW1lID0gKC8qKiBAdHlwZSB7P30gKi8gKGxlYXZlTm9kZU1hcElkcy5nZXQoZWxlbWVudCkpKTsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgZW50ZXJDbGFzc05hbWUgPSAoLyoqIEB0eXBlIHs/fSAqLyAoZW50ZXJOb2RlTWFwSWRzLmdldChlbGVtZW50KSkpOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBpbnN0cnVjdGlvbiA9ICgvKiogQHR5cGUgez99ICovICh0aGlzLl9idWlsZEluc3RydWN0aW9uKGVudHJ5LCBzdWJUaW1lbGluZXMsIGVudGVyQ2xhc3NOYW1lLCBsZWF2ZUNsYXNzTmFtZSwgbm9kZUlzT3JwaGFuZWQpKSk7CiAgICAgICAgICAgICAgICAgICAgaWYgKGluc3RydWN0aW9uLmVycm9ycyAmJiBpbnN0cnVjdGlvbi5lcnJvcnMubGVuZ3RoKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGVycm9uZW91c1RyYW5zaXRpb25zLnB1c2goaW5zdHJ1Y3Rpb24pOwogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIC8vIGV2ZW4gdGhvdWdoIHRoZSBlbGVtZW50IG1heSBub3QgYmUgYXBhcnQgb2YgdGhlIERPTSwgaXQgbWF5CiAgICAgICAgICAgICAgICAgICAgLy8gc3RpbGwgYmUgYWRkZWQgYXQgYSBsYXRlciBwb2ludCAoZHVlIHRvIHRoZSBtZWNoYW5pY3Mgb2YgY29udGVudAogICAgICAgICAgICAgICAgICAgIC8vIHByb2plY3Rpb24gYW5kL29yIGR5bmFtaWMgY29tcG9uZW50IGluc2VydGlvbikgdGhlcmVmb3JlIGl0J3MKICAgICAgICAgICAgICAgICAgICAvLyBpbXBvcnRhbnQgd2Ugc3RpbGwgc3R5bGUgdGhlIGVsZW1lbnQuCiAgICAgICAgICAgICAgICAgICAgaWYgKG5vZGVJc09ycGhhbmVkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHBsYXllci5vblN0YXJ0KCgvKioKICAgICAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgICAgICgpID0+IGVyYXNlU3R5bGVzKGVsZW1lbnQsIGluc3RydWN0aW9uLmZyb21TdHlsZXMpKSk7CiAgICAgICAgICAgICAgICAgICAgICAgIHBsYXllci5vbkRlc3Ryb3koKC8qKgogICAgICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAgICAgKCkgPT4gc2V0U3R5bGVzKGVsZW1lbnQsIGluc3RydWN0aW9uLnRvU3R5bGVzKSkpOwogICAgICAgICAgICAgICAgICAgICAgICBza2lwcGVkUGxheWVycy5wdXNoKHBsYXllcik7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgLy8gaWYgYSB1bm1hdGNoZWQgdHJhbnNpdGlvbiBpcyBxdWV1ZWQgdG8gZ28gdGhlbiBpdCBTSE9VTEQgTk9UIHJlbmRlcgogICAgICAgICAgICAgICAgICAgIC8vIGFuIGFuaW1hdGlvbiBhbmQgY2FuY2VsIHRoZSBwcmV2aW91c2x5IHJ1bm5pbmcgYW5pbWF0aW9ucy4KICAgICAgICAgICAgICAgICAgICBpZiAoZW50cnkuaXNGYWxsYmFja1RyYW5zaXRpb24pIHsKICAgICAgICAgICAgICAgICAgICAgICAgcGxheWVyLm9uU3RhcnQoKC8qKgogICAgICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAgICAgKCkgPT4gZXJhc2VTdHlsZXMoZWxlbWVudCwgaW5zdHJ1Y3Rpb24uZnJvbVN0eWxlcykpKTsKICAgICAgICAgICAgICAgICAgICAgICAgcGxheWVyLm9uRGVzdHJveSgoLyoqCiAgICAgICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICAgICAoKSA9PiBzZXRTdHlsZXMoZWxlbWVudCwgaW5zdHJ1Y3Rpb24udG9TdHlsZXMpKSk7CiAgICAgICAgICAgICAgICAgICAgICAgIHNraXBwZWRQbGF5ZXJzLnB1c2gocGxheWVyKTsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAvLyB0aGlzIG1lYW5zIHRoYXQgaWYgYSBwYXJlbnQgYW5pbWF0aW9uIHVzZXMgdGhpcyBhbmltYXRpb24gYXMgYSBzdWIgdHJpZ2dlcgogICAgICAgICAgICAgICAgICAgIC8vIHRoZW4gaXQgd2lsbCBpbnN0cnVjdCB0aGUgdGltZWxpbmUgYnVpbGRlciB0byBub3QgYWRkIGEgcGxheWVyIGRlbGF5LCBidXQKICAgICAgICAgICAgICAgICAgICAvLyBpbnN0ZWFkIHN0cmV0Y2ggdGhlIGZpcnN0IGtleWZyYW1lIGdhcCB1cCB1bnRpbCB0aGUgYW5pbWF0aW9uIHN0YXJ0cy4gVGhlCiAgICAgICAgICAgICAgICAgICAgLy8gcmVhc29uIHRoaXMgaXMgaW1wb3J0YW50IGlzIHRvIHByZXZlbnQgZXh0cmEgaW5pdGlhbGl6YXRpb24gc3R5bGVzIGZyb20gYmVpbmcKICAgICAgICAgICAgICAgICAgICAvLyByZXF1aXJlZCBieSB0aGUgdXNlciBpbiB0aGUgYW5pbWF0aW9uLgogICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnRpbWVsaW5lcy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHRsCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICB0bCA9PiB0bC5zdHJldGNoU3RhcnRpbmdLZXlmcmFtZSA9IHRydWUpKTsKICAgICAgICAgICAgICAgICAgICBzdWJUaW1lbGluZXMuYXBwZW5kKGVsZW1lbnQsIGluc3RydWN0aW9uLnRpbWVsaW5lcyk7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHR1cGxlID0geyBpbnN0cnVjdGlvbiwgcGxheWVyLCBlbGVtZW50IH07CiAgICAgICAgICAgICAgICAgICAgcXVldWVkSW5zdHJ1Y3Rpb25zLnB1c2godHVwbGUpOwogICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnF1ZXJpZWRFbGVtZW50cy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgIGVsZW1lbnQgPT4gZ2V0T3JTZXRBc0luTWFwKHF1ZXJpZWRFbGVtZW50cywgZWxlbWVudCwgW10pLnB1c2gocGxheWVyKSkpOwogICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnByZVN0eWxlUHJvcHMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBzdHJpbmdNYXAKICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgIChzdHJpbmdNYXAsIGVsZW1lbnQpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBwcm9wcyA9IE9iamVjdC5rZXlzKHN0cmluZ01hcCk7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwcm9wcy5sZW5ndGgpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzZXRWYWwgPSAoLyoqIEB0eXBlIHs/fSAqLyAoYWxsUHJlU3R5bGVFbGVtZW50cy5nZXQoZWxlbWVudCkpKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghc2V0VmFsKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxsUHJlU3R5bGVFbGVtZW50cy5zZXQoZWxlbWVudCwgc2V0VmFsID0gbmV3IFNldCgpKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb3BzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwcm9wCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm9wID0+IHNldFZhbC5hZGQocHJvcCkpKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wb3N0U3R5bGVQcm9wcy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHN0cmluZ01hcAogICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKHN0cmluZ01hcCwgZWxlbWVudCkgPT4gewogICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHByb3BzID0gT2JqZWN0LmtleXMoc3RyaW5nTWFwKTsKICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBsZXQgc2V0VmFsID0gKC8qKiBAdHlwZSB7P30gKi8gKGFsbFBvc3RTdHlsZUVsZW1lbnRzLmdldChlbGVtZW50KSkpOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXNldFZhbCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxsUG9zdFN0eWxlRWxlbWVudHMuc2V0KGVsZW1lbnQsIHNldFZhbCA9IG5ldyBTZXQoKSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgcHJvcHMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcHJvcAogICAgICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAgICAgcHJvcCA9PiBzZXRWYWwuYWRkKHByb3ApKSk7CiAgICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChlcnJvbmVvdXNUcmFuc2l0aW9ucy5sZW5ndGgpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGVycm9ycyA9IFtdOwogICAgICAgICAgICAgICAgZXJyb25lb3VzVHJhbnNpdGlvbnMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGluc3RydWN0aW9uCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbiA9PiB7CiAgICAgICAgICAgICAgICAgICAgZXJyb3JzLnB1c2goYEAke2luc3RydWN0aW9uLnRyaWdnZXJOYW1lfSBoYXMgZmFpbGVkIGR1ZSB0bzpcbmApOwogICAgICAgICAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovIChpbnN0cnVjdGlvbi5lcnJvcnMpKS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGVycm9yCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICBlcnJvciA9PiBlcnJvcnMucHVzaChgLSAke2Vycm9yfVxuYCkpKTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgIGFsbFBsYXllcnMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHBsYXllcgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgcGxheWVyID0+IHBsYXllci5kZXN0cm95KCkpKTsKICAgICAgICAgICAgICAgIHRoaXMucmVwb3J0RXJyb3IoZXJyb3JzKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGFsbFByZXZpb3VzUGxheWVyc01hcCA9IG5ldyBNYXAoKTsKICAgICAgICAgICAgLy8gdGhpcyBtYXAgd29ya3MgdG8gdGVsbCB3aGljaCBlbGVtZW50IGluIHRoZSBET00gdHJlZSBpcyBjb250YWluZWQgYnkKICAgICAgICAgICAgLy8gd2hpY2ggYW5pbWF0aW9uLiBGdXJ0aGVyIGRvd24gYmVsb3cgdGhpcyBtYXAgd2lsbCBnZXQgcG9wdWxhdGVkIG9uY2UKICAgICAgICAgICAgLy8gdGhlIHBsYXllcnMgYXJlIGJ1aWx0IGFuZCBpbiBkb2luZyBzbyBpdCBjYW4gZWZmaWNpZW50bHkgZmlndXJlIG91dAogICAgICAgICAgICAvLyBpZiBhIHN1YiBwbGF5ZXIgaXMgc2tpcHBlZCBkdWUgdG8gYSBwYXJlbnQgcGxheWVyIGhhdmluZyBwcmlvcml0eS4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBhbmltYXRpb25FbGVtZW50TWFwID0gbmV3IE1hcCgpOwogICAgICAgICAgICBxdWV1ZWRJbnN0cnVjdGlvbnMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZW50cnkKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGVudHJ5ID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGVsZW1lbnQgPSBlbnRyeS5lbGVtZW50OwogICAgICAgICAgICAgICAgaWYgKHN1YlRpbWVsaW5lcy5oYXMoZWxlbWVudCkpIHsKICAgICAgICAgICAgICAgICAgICBhbmltYXRpb25FbGVtZW50TWFwLnNldChlbGVtZW50LCBlbGVtZW50KTsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9iZWZvcmVBbmltYXRpb25CdWlsZChlbnRyeS5wbGF5ZXIubmFtZXNwYWNlSWQsIGVudHJ5Lmluc3RydWN0aW9uLCBhbGxQcmV2aW91c1BsYXllcnNNYXApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIHNraXBwZWRQbGF5ZXJzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHBsYXllcgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgcGxheWVyID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGVsZW1lbnQgPSBwbGF5ZXIuZWxlbWVudDsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHByZXZpb3VzUGxheWVycyA9IHRoaXMuX2dldFByZXZpb3VzUGxheWVycyhlbGVtZW50LCBmYWxzZSwgcGxheWVyLm5hbWVzcGFjZUlkLCBwbGF5ZXIudHJpZ2dlck5hbWUsIG51bGwpOwogICAgICAgICAgICAgICAgcHJldmlvdXNQbGF5ZXJzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwcmV2UGxheWVyCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBwcmV2UGxheWVyID0+I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ZU5vZGVzLmZpbHRlcigoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbm9kZQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgbm9kZSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gcmVwbGFjZVBvc3RTdHlsZXNBc1ByZShub2RlLCBhbGxQcmVTdHlsZUVsZW1lbnRzLCBhbGxQb3N0U3R5bGVFbGVtZW50cyk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgLy8gUE9TVCBTVEFHRTogZmlsbCB0aGUgKiBzdHlsZXMKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwb3N0U3R5bGVzTWFwID0gbmV3IE1hcCgpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGFsbExlYXZlUXVlcmllZE5vZGVzID0gY2xvYWtBbmRDb21wdXRlU3R5bGVzKHBvc3RTdHlsZXNNYXAsIHRoaXMuZHJpdmVyLCBsZWF2ZU5vZGVzV2l0aG91dEFuaW1hdGlvbnMsIGFsbFBvc3RTdHlsZUVsZW1lbnRzLCBBVVRPX1NUWUxFKTsKICAgICAgICAgICAgYWxsTGVhdmVRdWVyaWVkTm9kZXMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbm9kZQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgbm9kZSA9PiB7CiAgICAgICAgICAgICAgICBpZiAocmVwbGFjZVBvc3RTdHlsZXNBc1ByZShub2RlLCBhbGxQcmVTdHlsZUVsZW1lbnRzLCBhbGxQb3N0U3R5bGVFbGVtZW50cykpIHsKICAgICAgICAgICAgICAgICAgICByZXBsYWNlTm9kZXMucHVzaChub2RlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAvLyBQUkUgU1RBR0U6IGZpbGwgdGhlICEgc3R5bGVzCiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcHJlU3R5bGVzTWFwID0gbmV3IE1hcCgpOwogICAgICAgICAgICBlbnRlck5vZGVNYXAuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbm9kZXMKICAgICAgICAgICAgICogQHBhcmFtIHs/fSByb290CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAobm9kZXMsIHJvb3QpID0+IHsKICAgICAgICAgICAgICAgIGNsb2FrQW5kQ29tcHV0ZVN0eWxlcyhwcmVTdHlsZXNNYXAsIHRoaXMuZHJpdmVyLCBuZXcgU2V0KG5vZGVzKSwgYWxsUHJlU3R5bGVFbGVtZW50cywgybVQUkVfU1RZTEUpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIHJlcGxhY2VOb2Rlcy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBub2RlCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBub2RlID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHBvc3QgPSBwb3N0U3R5bGVzTWFwLmdldChub2RlKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHByZSA9IHByZVN0eWxlc01hcC5nZXQobm9kZSk7CiAgICAgICAgICAgICAgICBwb3N0U3R5bGVzTWFwLnNldChub2RlLCAoLyoqIEB0eXBlIHs/fSAqLyAoT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LCBwb3N0KSwgcHJlKSkpKTsKICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHJvb3RQbGF5ZXJzID0gW107CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc3ViUGxheWVycyA9IFtdOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IE5PX1BBUkVOVF9BTklNQVRJT05fRUxFTUVOVF9ERVRFQ1RFRCA9IHt9OwogICAgICAgICAgICBxdWV1ZWRJbnN0cnVjdGlvbnMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZW50cnkKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGVudHJ5ID0+IHsKICAgICAgICAgICAgICAgIGNvbnN0IHsgZWxlbWVudCwgcGxheWVyLCBpbnN0cnVjdGlvbiB9ID0gZW50cnk7CiAgICAgICAgICAgICAgICAvLyB0aGlzIG1lYW5zIHRoYXQgaXQgd2FzIG5ldmVyIGNvbnN1bWVkIGJ5IGEgcGFyZW50IGFuaW1hdGlvbiB3aGljaAogICAgICAgICAgICAgICAgLy8gbWVhbnMgdGhhdCBpdCBpcyBpbmRlcGVuZGVudCBhbmQgdGhlcmVmb3JlIHNob3VsZCBiZSBzZXQgZm9yIGFuaW1hdGlvbgogICAgICAgICAgICAgICAgaWYgKHN1YlRpbWVsaW5lcy5oYXMoZWxlbWVudCkpIHsKICAgICAgICAgICAgICAgICAgICBpZiAoZGlzYWJsZWRFbGVtZW50c1NldC5oYXMoZWxlbWVudCkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcGxheWVyLm9uRGVzdHJveSgoLyoqCiAgICAgICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICAgICAoKSA9PiBzZXRTdHlsZXMoZWxlbWVudCwgaW5zdHJ1Y3Rpb24udG9TdHlsZXMpKSk7CiAgICAgICAgICAgICAgICAgICAgICAgIHBsYXllci5kaXNhYmxlZCA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgICAgIHBsYXllci5vdmVycmlkZVRvdGFsVGltZShpbnN0cnVjdGlvbi50b3RhbFRpbWUpOwogICAgICAgICAgICAgICAgICAgICAgICBza2lwcGVkUGxheWVycy5wdXNoKHBsYXllcik7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgLy8gdGhpcyB3aWxsIGZsb3cgdXAgdGhlIERPTSBhbmQgcXVlcnkgdGhlIG1hcCB0byBmaWd1cmUgb3V0CiAgICAgICAgICAgICAgICAgICAgLy8gaWYgYSBwYXJlbnQgYW5pbWF0aW9uIGhhcyBwcmlvcml0eSBvdmVyIGl0LiBJbiB0aGUgc2l0dWF0aW9uCiAgICAgICAgICAgICAgICAgICAgLy8gdGhhdCBhIHBhcmVudCBpcyBkZXRlY3RlZCB0aGVuIGl0IHdpbGwgY2FuY2VsIHRoZSBsb29wLiBJZgogICAgICAgICAgICAgICAgICAgIC8vIG5vdGhpbmcgaXMgZGV0ZWN0ZWQsIG9yIGl0IHRha2VzIGEgZmV3IGhvcHMgdG8gZmluZCBhIHBhcmVudCwKICAgICAgICAgICAgICAgICAgICAvLyB0aGVuIGl0IHdpbGwgZmlsbCBpbiB0aGUgbWlzc2luZyBub2RlcyBhbmQgc2lnbmFsIHRoZW0gYXMgaGF2aW5nCiAgICAgICAgICAgICAgICAgICAgLy8gYSBkZXRlY3RlZCBwYXJlbnQgKG9yIGEgTk9fUEFSRU5UIHZhbHVlIHZpYSBhIHNwZWNpYWwgY29uc3RhbnQpLgogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBsZXQgcGFyZW50V2l0aEFuaW1hdGlvbiA9IE5PX1BBUkVOVF9BTklNQVRJT05fRUxFTUVOVF9ERVRFQ1RFRDsKICAgICAgICAgICAgICAgICAgICBpZiAoYW5pbWF0aW9uRWxlbWVudE1hcC5zaXplID4gMSkgewogICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBlbG0gPSBlbGVtZW50OwogICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHBhcmVudHNUb0FkZCA9IFtdOwogICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAoZWxtID0gZWxtLnBhcmVudE5vZGUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGRldGVjdGVkUGFyZW50ID0gYW5pbWF0aW9uRWxlbWVudE1hcC5nZXQoZWxtKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkZXRlY3RlZFBhcmVudCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmVudFdpdGhBbmltYXRpb24gPSBkZXRlY3RlZFBhcmVudDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmVudHNUb0FkZC5wdXNoKGVsbSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgcGFyZW50c1RvQWRkLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHBhcmVudAogICAgICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAgICAgcGFyZW50ID0+IGFuaW1hdGlvbkVsZW1lbnRNYXAuc2V0KHBhcmVudCwgcGFyZW50V2l0aEFuaW1hdGlvbikpKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGlubmVyUGxheWVyID0gdGhpcy5fYnVpbGRBbmltYXRpb24ocGxheWVyLm5hbWVzcGFjZUlkLCBpbnN0cnVjdGlvbiwgYWxsUHJldmlvdXNQbGF5ZXJzTWFwLCBza2lwcGVkUGxheWVyc01hcCwgcHJlU3R5bGVzTWFwLCBwb3N0U3R5bGVzTWFwKTsKICAgICAgICAgICAgICAgICAgICBwbGF5ZXIuc2V0UmVhbFBsYXllcihpbm5lclBsYXllcik7CiAgICAgICAgICAgICAgICAgICAgaWYgKHBhcmVudFdpdGhBbmltYXRpb24gPT09IE5PX1BBUkVOVF9BTklNQVRJT05fRUxFTUVOVF9ERVRFQ1RFRCkgewogICAgICAgICAgICAgICAgICAgICAgICByb290UGxheWVycy5wdXNoKHBsYXllcik7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHBhcmVudFBsYXllcnMgPSB0aGlzLnBsYXllcnNCeUVsZW1lbnQuZ2V0KHBhcmVudFdpdGhBbmltYXRpb24pOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAocGFyZW50UGxheWVycyAmJiBwYXJlbnRQbGF5ZXJzLmxlbmd0aCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxheWVyLnBhcmVudFBsYXllciA9IG9wdGltaXplR3JvdXBQbGF5ZXIocGFyZW50UGxheWVycyk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgc2tpcHBlZFBsYXllcnMucHVzaChwbGF5ZXIpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIGVyYXNlU3R5bGVzKGVsZW1lbnQsIGluc3RydWN0aW9uLmZyb21TdHlsZXMpOwogICAgICAgICAgICAgICAgICAgIHBsYXllci5vbkRlc3Ryb3koKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKCkgPT4gc2V0U3R5bGVzKGVsZW1lbnQsIGluc3RydWN0aW9uLnRvU3R5bGVzKSkpOwogICAgICAgICAgICAgICAgICAgIC8vIHRoZXJlIHN0aWxsIG1pZ2h0IGJlIGEgYW5jZXN0b3IgcGxheWVyIGFuaW1hdGluZyB0aGlzCiAgICAgICAgICAgICAgICAgICAgLy8gZWxlbWVudCB0aGVyZWZvcmUgd2Ugd2lsbCBzdGlsbCBhZGQgaXQgYXMgYSBzdWIgcGxheWVyCiAgICAgICAgICAgICAgICAgICAgLy8gZXZlbiBpZiBpdHMgYW5pbWF0aW9uIG1heSBiZSBkaXNhYmxlZAogICAgICAgICAgICAgICAgICAgIHN1YlBsYXllcnMucHVzaChwbGF5ZXIpOwogICAgICAgICAgICAgICAgICAgIGlmIChkaXNhYmxlZEVsZW1lbnRzU2V0LmhhcyhlbGVtZW50KSkgewogICAgICAgICAgICAgICAgICAgICAgICBza2lwcGVkUGxheWVycy5wdXNoKHBsYXllcik7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIC8vIGZpbmQgYWxsIG9mIHRoZSBzdWIgcGxheWVycycgY29ycmVzcG9uZGluZyBpbm5lciBhbmltYXRpb24gcGxheWVyCiAgICAgICAgICAgIHN1YlBsYXllcnMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcGxheWVyCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBwbGF5ZXIgPT4gewogICAgICAgICAgICAgICAgLy8gZXZlbiBpZiBhbnkgcGxheWVycyBhcmUgbm90IGZvdW5kIGZvciBhIHN1YiBhbmltYXRpb24gdGhlbiBpdAogICAgICAgICAgICAgICAgLy8gd2lsbCBzdGlsbCBjb21wbGV0ZSBpdHNlbGYgYWZ0ZXIgdGhlIG5leHQgdGljayBzaW5jZSBpdCdzIE5vb3AKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHBsYXllcnNGb3JFbGVtZW50ID0gc2tpcHBlZFBsYXllcnNNYXAuZ2V0KHBsYXllci5lbGVtZW50KTsKICAgICAgICAgICAgICAgIGlmIChwbGF5ZXJzRm9yRWxlbWVudCAmJiBwbGF5ZXJzRm9yRWxlbWVudC5sZW5ndGgpIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgaW5uZXJQbGF5ZXIgPSBvcHRpbWl6ZUdyb3VwUGxheWVyKHBsYXllcnNGb3JFbGVtZW50KTsKICAgICAgICAgICAgICAgICAgICBwbGF5ZXIuc2V0UmVhbFBsYXllcihpbm5lclBsYXllcik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgLy8gdGhlIHJlYXNvbiB3aHkgd2UgZG9uJ3QgYWN0dWFsbHkgcGxheSB0aGUgYW5pbWF0aW9uIGlzCiAgICAgICAgICAgIC8vIGJlY2F1c2UgYWxsIHRoYXQgYSBza2lwcGVkIHBsYXllciBpcyBkZXNpZ25lZCB0byBkbyBpcyB0bwogICAgICAgICAgICAvLyBmaXJlIHRoZSBzdGFydC9kb25lIHRyYW5zaXRpb24gY2FsbGJhY2sgZXZlbnRzCiAgICAgICAgICAgIHNraXBwZWRQbGF5ZXJzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHBsYXllcgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgcGxheWVyID0+IHsKICAgICAgICAgICAgICAgIGlmIChwbGF5ZXIucGFyZW50UGxheWVyKSB7CiAgICAgICAgICAgICAgICAgICAgcGxheWVyLnN5bmNQbGF5ZXJFdmVudHMocGxheWVyLnBhcmVudFBsYXllcik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBwbGF5ZXIuZGVzdHJveSgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIC8vIHJ1biB0aHJvdWdoIGFsbCBvZiB0aGUgcXVldWVkIHJlbW92YWxzIGFuZCBzZWUgaWYgdGhleQogICAgICAgICAgICAvLyB3ZXJlIHBpY2tlZCB1cCBieSBhIHF1ZXJ5LiBJZiBub3QgdGhlbiBwZXJmb3JtIHRoZSByZW1vdmFsCiAgICAgICAgICAgIC8vIG9wZXJhdGlvbiByaWdodCBhd2F5IHVubGVzcyBhIHBhcmVudCBhbmltYXRpb24gaXMgb25nb2luZy4KICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBhbGxMZWF2ZU5vZGVzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBlbGVtZW50ID0gYWxsTGVhdmVOb2Rlc1tpXTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGRldGFpbHMgPSAoLyoqIEB0eXBlIHs/fSAqLyAoZWxlbWVudFtSRU1PVkFMX0ZMQUddKSk7CiAgICAgICAgICAgICAgICByZW1vdmVDbGFzcyhlbGVtZW50LCBMRUFWRV9DTEFTU05BTUUpOwogICAgICAgICAgICAgICAgLy8gdGhpcyBtZWFucyB0aGUgZWxlbWVudCBoYXMgYSByZW1vdmFsIGFuaW1hdGlvbiB0aGF0IGlzIGJlaW5nCiAgICAgICAgICAgICAgICAvLyB0YWtlbiBjYXJlIG9mIGFuZCB0aGVyZWZvcmUgdGhlIGlubmVyIGVsZW1lbnRzIHdpbGwgaGFuZyBhcm91bmQKICAgICAgICAgICAgICAgIC8vIHVudGlsIHRoYXQgYW5pbWF0aW9uIGlzIG92ZXIgKG9yIHRoZSBwYXJlbnQgcXVlcmllZCBhbmltYXRpb24pCiAgICAgICAgICAgICAgICBpZiAoZGV0YWlscyAmJiBkZXRhaWxzLmhhc0FuaW1hdGlvbikKICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCBwbGF5ZXJzID0gW107CiAgICAgICAgICAgICAgICAvLyBpZiB0aGlzIGVsZW1lbnQgaXMgcXVlcmllZCBvciBpZiBpdCBjb250YWlucyBxdWVyaWVkIGNoaWxkcmVuCiAgICAgICAgICAgICAgICAvLyB0aGVuIHdlIHdhbnQgZm9yIHRoZSBlbGVtZW50IG5vdCB0byBiZSByZW1vdmVkIGZyb20gdGhlIHBhZ2UKICAgICAgICAgICAgICAgIC8vIHVudGlsIHRoZSBxdWVyaWVkIGFuaW1hdGlvbnMgaGF2ZSBmaW5pc2hlZAogICAgICAgICAgICAgICAgaWYgKHF1ZXJpZWRFbGVtZW50cy5zaXplKSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGxldCBxdWVyaWVkUGxheWVyUmVzdWx0cyA9IHF1ZXJpZWRFbGVtZW50cy5nZXQoZWxlbWVudCk7CiAgICAgICAgICAgICAgICAgICAgaWYgKHF1ZXJpZWRQbGF5ZXJSZXN1bHRzICYmIHF1ZXJpZWRQbGF5ZXJSZXN1bHRzLmxlbmd0aCkgewogICAgICAgICAgICAgICAgICAgICAgICBwbGF5ZXJzLnB1c2goLi4ucXVlcmllZFBsYXllclJlc3VsdHMpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgbGV0IHF1ZXJpZWRJbm5lckVsZW1lbnRzID0gdGhpcy5kcml2ZXIucXVlcnkoZWxlbWVudCwgTkdfQU5JTUFUSU5HX1NFTEVDVE9SLCB0cnVlKTsKICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBqID0gMDsgaiA8IHF1ZXJpZWRJbm5lckVsZW1lbnRzLmxlbmd0aDsgaisrKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHF1ZXJpZWRQbGF5ZXJzID0gcXVlcmllZEVsZW1lbnRzLmdldChxdWVyaWVkSW5uZXJFbGVtZW50c1tqXSk7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChxdWVyaWVkUGxheWVycyAmJiBxdWVyaWVkUGxheWVycy5sZW5ndGgpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBsYXllcnMucHVzaCguLi5xdWVyaWVkUGxheWVycyk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBhY3RpdmVQbGF5ZXJzID0gcGxheWVycy5maWx0ZXIoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBwID0+ICFwLmRlc3Ryb3llZCkpOwogICAgICAgICAgICAgICAgaWYgKGFjdGl2ZVBsYXllcnMubGVuZ3RoKSB7CiAgICAgICAgICAgICAgICAgICAgcmVtb3ZlTm9kZXNBZnRlckFuaW1hdGlvbkRvbmUodGhpcywgZWxlbWVudCwgYWN0aXZlUGxheWVycyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLnByb2Nlc3NMZWF2ZU5vZGUoZWxlbWVudCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gdGhpcyBpcyByZXF1aXJlZCBzbyB0aGUgY2xlYW51cCBtZXRob2QgZG9lc24ndCByZW1vdmUgdGhlbQogICAgICAgICAgICBhbGxMZWF2ZU5vZGVzLmxlbmd0aCA9IDA7CiAgICAgICAgICAgIHJvb3RQbGF5ZXJzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHBsYXllcgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgcGxheWVyID0+IHsKICAgICAgICAgICAgICAgIHRoaXMucGxheWVycy5wdXNoKHBsYXllcik7CiAgICAgICAgICAgICAgICBwbGF5ZXIub25Eb25lKCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgICAgICBwbGF5ZXIuZGVzdHJveSgpOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBpbmRleCA9IHRoaXMucGxheWVycy5pbmRleE9mKHBsYXllcik7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5wbGF5ZXJzLnNwbGljZShpbmRleCwgMSk7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICBwbGF5ZXIucGxheSgpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIHJldHVybiByb290UGxheWVyczsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBuYW1lc3BhY2VJZAogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZWxlbWVudENvbnRhaW5zRGF0YShuYW1lc3BhY2VJZCwgZWxlbWVudCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBjb250YWluc0RhdGEgPSBmYWxzZTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBkZXRhaWxzID0gKC8qKiBAdHlwZSB7P30gKi8gKGVsZW1lbnRbUkVNT1ZBTF9GTEFHXSkpOwogICAgICAgICAgICBpZiAoZGV0YWlscyAmJiBkZXRhaWxzLnNldEZvclJlbW92YWwpCiAgICAgICAgICAgICAgICBjb250YWluc0RhdGEgPSB0cnVlOwogICAgICAgICAgICBpZiAodGhpcy5wbGF5ZXJzQnlFbGVtZW50LmhhcyhlbGVtZW50KSkKICAgICAgICAgICAgICAgIGNvbnRhaW5zRGF0YSA9IHRydWU7CiAgICAgICAgICAgIGlmICh0aGlzLnBsYXllcnNCeVF1ZXJpZWRFbGVtZW50LmhhcyhlbGVtZW50KSkKICAgICAgICAgICAgICAgIGNvbnRhaW5zRGF0YSA9IHRydWU7CiAgICAgICAgICAgIGlmICh0aGlzLnN0YXRlc0J5RWxlbWVudC5oYXMoZWxlbWVudCkpCiAgICAgICAgICAgICAgICBjb250YWluc0RhdGEgPSB0cnVlOwogICAgICAgICAgICByZXR1cm4gdGhpcy5fZmV0Y2hOYW1lc3BhY2UobmFtZXNwYWNlSWQpLmVsZW1lbnRDb250YWluc0RhdGEoZWxlbWVudCkgfHwgY29udGFpbnNEYXRhOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGNhbGxiYWNrCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBhZnRlckZsdXNoKGNhbGxiYWNrKSB7CiAgICAgICAgICAgIHRoaXMuX2ZsdXNoRm5zLnB1c2goY2FsbGJhY2spOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGNhbGxiYWNrCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBhZnRlckZsdXNoQW5pbWF0aW9uc0RvbmUoY2FsbGJhY2spIHsKICAgICAgICAgICAgdGhpcy5fd2hlblF1aWV0Rm5zLnB1c2goY2FsbGJhY2spOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAqIEBwYXJhbSB7P30gaXNRdWVyaWVkRWxlbWVudAogICAgICAgICAqIEBwYXJhbSB7Pz19IG5hbWVzcGFjZUlkCiAgICAgICAgICogQHBhcmFtIHs/PX0gdHJpZ2dlck5hbWUKICAgICAgICAgKiBAcGFyYW0gez89fSB0b1N0YXRlVmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9nZXRQcmV2aW91c1BsYXllcnMoZWxlbWVudCwgaXNRdWVyaWVkRWxlbWVudCwgbmFtZXNwYWNlSWQsIHRyaWdnZXJOYW1lLCB0b1N0YXRlVmFsdWUpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgcGxheWVycyA9IFtdOwogICAgICAgICAgICBpZiAoaXNRdWVyaWVkRWxlbWVudCkgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgcXVlcmllZEVsZW1lbnRQbGF5ZXJzID0gdGhpcy5wbGF5ZXJzQnlRdWVyaWVkRWxlbWVudC5nZXQoZWxlbWVudCk7CiAgICAgICAgICAgICAgICBpZiAocXVlcmllZEVsZW1lbnRQbGF5ZXJzKSB7CiAgICAgICAgICAgICAgICAgICAgcGxheWVycyA9IHF1ZXJpZWRFbGVtZW50UGxheWVyczsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGVsZW1lbnRQbGF5ZXJzID0gdGhpcy5wbGF5ZXJzQnlFbGVtZW50LmdldChlbGVtZW50KTsKICAgICAgICAgICAgICAgIGlmIChlbGVtZW50UGxheWVycykgewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBpc1JlbW92YWxBbmltYXRpb24gPSAhdG9TdGF0ZVZhbHVlIHx8IHRvU3RhdGVWYWx1ZSA9PSBWT0lEX1ZBTFVFOwogICAgICAgICAgICAgICAgICAgIGVsZW1lbnRQbGF5ZXJzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcGxheWVyCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICBwbGF5ZXIgPT4gewogICAgICAgICAgICAgICAgICAgICAgICBpZiAocGxheWVyLnF1ZXVlZCkKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFpc1JlbW92YWxBbmltYXRpb24gJiYgcGxheWVyLnRyaWdnZXJOYW1lICE9IHRyaWdnZXJOYW1lKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICBwbGF5ZXJzLnB1c2gocGxheWVyKTsKICAgICAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKG5hbWVzcGFjZUlkIHx8IHRyaWdnZXJOYW1lKSB7CiAgICAgICAgICAgICAgICBwbGF5ZXJzID0gcGxheWVycy5maWx0ZXIoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwbGF5ZXIKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIHBsYXllciA9PiB7CiAgICAgICAgICAgICAgICAgICAgaWYgKG5hbWVzcGFjZUlkICYmIG5hbWVzcGFjZUlkICE9IHBsYXllci5uYW1lc3BhY2VJZCkKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgICAgICAgIGlmICh0cmlnZ2VyTmFtZSAmJiB0cmlnZ2VyTmFtZSAhPSBwbGF5ZXIudHJpZ2dlck5hbWUpCiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gcGxheWVyczsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IG5hbWVzcGFjZUlkCiAgICAgICAgICogQHBhcmFtIHs/fSBpbnN0cnVjdGlvbgogICAgICAgICAqIEBwYXJhbSB7P30gYWxsUHJldmlvdXNQbGF5ZXJzTWFwCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfYmVmb3JlQW5pbWF0aW9uQnVpbGQobmFtZXNwYWNlSWQsIGluc3RydWN0aW9uLCBhbGxQcmV2aW91c1BsYXllcnNNYXApIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB0cmlnZ2VyTmFtZSA9IGluc3RydWN0aW9uLnRyaWdnZXJOYW1lOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHJvb3RFbGVtZW50ID0gaW5zdHJ1Y3Rpb24uZWxlbWVudDsKICAgICAgICAgICAgLy8gd2hlbiBhIHJlbW92YWwgYW5pbWF0aW9uIG9jY3VycywgQUxMIHByZXZpb3VzIHBsYXllcnMgYXJlIGNvbGxlY3RlZAogICAgICAgICAgICAvLyBhbmQgZGVzdHJveWVkIChldmVuIGlmIHRoZXkgYXJlIG91dHNpZGUgb2YgdGhlIGN1cnJlbnQgbmFtZXNwYWNlKQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHRhcmdldE5hbWVTcGFjZUlkID0gaW5zdHJ1Y3Rpb24uaXNSZW1vdmFsVHJhbnNpdGlvbiA/IHVuZGVmaW5lZCA6IG5hbWVzcGFjZUlkOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHRhcmdldFRyaWdnZXJOYW1lID0gaW5zdHJ1Y3Rpb24uaXNSZW1vdmFsVHJhbnNpdGlvbiA/IHVuZGVmaW5lZCA6IHRyaWdnZXJOYW1lOwogICAgICAgICAgICBmb3IgKGNvbnN0IHRpbWVsaW5lSW5zdHJ1Y3Rpb24gb2YgaW5zdHJ1Y3Rpb24udGltZWxpbmVzKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBlbGVtZW50ID0gdGltZWxpbmVJbnN0cnVjdGlvbi5lbGVtZW50OwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgaXNRdWVyaWVkRWxlbWVudCA9IGVsZW1lbnQgIT09IHJvb3RFbGVtZW50OwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgcGxheWVycyA9IGdldE9yU2V0QXNJbk1hcChhbGxQcmV2aW91c1BsYXllcnNNYXAsIGVsZW1lbnQsIFtdKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHByZXZpb3VzUGxheWVycyA9IHRoaXMuX2dldFByZXZpb3VzUGxheWVycyhlbGVtZW50LCBpc1F1ZXJpZWRFbGVtZW50LCB0YXJnZXROYW1lU3BhY2VJZCwgdGFyZ2V0VHJpZ2dlck5hbWUsIGluc3RydWN0aW9uLnRvU3RhdGUpOwogICAgICAgICAgICAgICAgcHJldmlvdXNQbGF5ZXJzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwbGF5ZXIKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIHBsYXllciA9PiB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHJlYWxQbGF5ZXIgPSAoLyoqIEB0eXBlIHs/fSAqLyAoKCgvKiogQHR5cGUgez99ICovIChwbGF5ZXIpKSkuZ2V0UmVhbFBsYXllcigpKSk7CiAgICAgICAgICAgICAgICAgICAgaWYgKHJlYWxQbGF5ZXIuYmVmb3JlRGVzdHJveSkgewogICAgICAgICAgICAgICAgICAgICAgICByZWFsUGxheWVyLmJlZm9yZURlc3Ryb3koKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgcGxheWVyLmRlc3Ryb3koKTsKICAgICAgICAgICAgICAgICAgICBwbGF5ZXJzLnB1c2gocGxheWVyKTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyB0aGlzIG5lZWRzIHRvIGJlIGRvbmUgc28gdGhhdCB0aGUgUFJFL1BPU1Qgc3R5bGVzIGNhbiBiZQogICAgICAgICAgICAvLyBjb21wdXRlZCBwcm9wZXJseSB3aXRob3V0IGludGVyZmVyaW5nIHdpdGggdGhlIHByZXZpb3VzIGFuaW1hdGlvbgogICAgICAgICAgICBlcmFzZVN0eWxlcyhyb290RWxlbWVudCwgaW5zdHJ1Y3Rpb24uZnJvbVN0eWxlcyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBuYW1lc3BhY2VJZAogICAgICAgICAqIEBwYXJhbSB7P30gaW5zdHJ1Y3Rpb24KICAgICAgICAgKiBAcGFyYW0gez99IGFsbFByZXZpb3VzUGxheWVyc01hcAogICAgICAgICAqIEBwYXJhbSB7P30gc2tpcHBlZFBsYXllcnNNYXAKICAgICAgICAgKiBAcGFyYW0gez99IHByZVN0eWxlc01hcAogICAgICAgICAqIEBwYXJhbSB7P30gcG9zdFN0eWxlc01hcAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2J1aWxkQW5pbWF0aW9uKG5hbWVzcGFjZUlkLCBpbnN0cnVjdGlvbiwgYWxsUHJldmlvdXNQbGF5ZXJzTWFwLCBza2lwcGVkUGxheWVyc01hcCwgcHJlU3R5bGVzTWFwLCBwb3N0U3R5bGVzTWFwKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdHJpZ2dlck5hbWUgPSBpbnN0cnVjdGlvbi50cmlnZ2VyTmFtZTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCByb290RWxlbWVudCA9IGluc3RydWN0aW9uLmVsZW1lbnQ7CiAgICAgICAgICAgIC8vIHdlIGZpcnN0IHJ1biB0aGlzIHNvIHRoYXQgdGhlIHByZXZpb3VzIGFuaW1hdGlvbiBwbGF5ZXIKICAgICAgICAgICAgLy8gZGF0YSBjYW4gYmUgcGFzc2VkIGludG8gdGhlIHN1Y2Nlc3NpdmUgYW5pbWF0aW9uIHBsYXllcnMKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBhbGxRdWVyaWVkUGxheWVycyA9IFtdOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGFsbENvbnN1bWVkRWxlbWVudHMgPSBuZXcgU2V0KCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgYWxsU3ViRWxlbWVudHMgPSBuZXcgU2V0KCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgYWxsTmV3UGxheWVycyA9IGluc3RydWN0aW9uLnRpbWVsaW5lcy5tYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHRpbWVsaW5lSW5zdHJ1Y3Rpb24KICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRpbWVsaW5lSW5zdHJ1Y3Rpb24gPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZWxlbWVudCA9IHRpbWVsaW5lSW5zdHJ1Y3Rpb24uZWxlbWVudDsKICAgICAgICAgICAgICAgIGFsbENvbnN1bWVkRWxlbWVudHMuYWRkKGVsZW1lbnQpOwogICAgICAgICAgICAgICAgLy8gRklYTUUgKG1hdHNrbyk6IG1ha2Ugc3VyZSB0by1iZS1yZW1vdmVkIGFuaW1hdGlvbnMgYXJlIHJlbW92ZWQgcHJvcGVybHkKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGRldGFpbHMgPSBlbGVtZW50W1JFTU9WQUxfRkxBR107CiAgICAgICAgICAgICAgICBpZiAoZGV0YWlscyAmJiBkZXRhaWxzLnJlbW92ZWRCZWZvcmVRdWVyaWVkKQogICAgICAgICAgICAgICAgICAgIHJldHVybiBuZXcgTm9vcEFuaW1hdGlvblBsYXllcih0aW1lbGluZUluc3RydWN0aW9uLmR1cmF0aW9uLCB0aW1lbGluZUluc3RydWN0aW9uLmRlbGF5KTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGlzUXVlcmllZEVsZW1lbnQgPSBlbGVtZW50ICE9PSByb290RWxlbWVudDsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHByZXZpb3VzUGxheWVycyA9IGZsYXR0ZW5Hcm91cFBsYXllcnMoKGFsbFByZXZpb3VzUGxheWVyc01hcC5nZXQoZWxlbWVudCkgfHwgRU1QVFlfUExBWUVSX0FSUkFZKQogICAgICAgICAgICAgICAgICAgIC5tYXAoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBwID0+IHAuZ2V0UmVhbFBsYXllcigpKSkpCiAgICAgICAgICAgICAgICAgICAgLmZpbHRlcigoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHAKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIHAgPT4gewogICAgICAgICAgICAgICAgICAgIC8vIHRoZSBgZWxlbWVudGAgaXMgbm90IGFwYXJ0IG9mIHRoZSBBbmltYXRpb25QbGF5ZXIgZGVmaW5pdGlvbiwgYnV0CiAgICAgICAgICAgICAgICAgICAgLy8gTW9jay9XZWJBbmltYXRpb25zCiAgICAgICAgICAgICAgICAgICAgLy8gdXNlIHRoZSBlbGVtZW50IHdpdGhpbiB0aGVpciBpbXBsZW1lbnRhdGlvbi4gVGhpcyB3aWxsIGJlIGFkZGVkIGluIEFuZ3VsYXI1IHRvCiAgICAgICAgICAgICAgICAgICAgLy8gQW5pbWF0aW9uUGxheWVyCiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHBwID0gKC8qKiBAdHlwZSB7P30gKi8gKHApKTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gcHAuZWxlbWVudCA/IHBwLmVsZW1lbnQgPT09IGVsZW1lbnQgOiBmYWxzZTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHByZVN0eWxlcyA9IHByZVN0eWxlc01hcC5nZXQoZWxlbWVudCk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBwb3N0U3R5bGVzID0gcG9zdFN0eWxlc01hcC5nZXQoZWxlbWVudCk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBrZXlmcmFtZXMgPSBub3JtYWxpemVLZXlmcmFtZXModGhpcy5kcml2ZXIsIHRoaXMuX25vcm1hbGl6ZXIsIGVsZW1lbnQsIHRpbWVsaW5lSW5zdHJ1Y3Rpb24ua2V5ZnJhbWVzLCBwcmVTdHlsZXMsIHBvc3RTdHlsZXMpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgcGxheWVyID0gdGhpcy5fYnVpbGRQbGF5ZXIodGltZWxpbmVJbnN0cnVjdGlvbiwga2V5ZnJhbWVzLCBwcmV2aW91c1BsYXllcnMpOwogICAgICAgICAgICAgICAgLy8gdGhpcyBtZWFucyB0aGF0IHRoaXMgcGFydGljdWxhciBwbGF5ZXIgYmVsb25ncyB0byBhIHN1YiB0cmlnZ2VyLiBJdCBpcwogICAgICAgICAgICAgICAgLy8gaW1wb3J0YW50IHRoYXQgd2UgbWF0Y2ggdGhpcyBwbGF5ZXIgdXAgd2l0aCB0aGUgY29ycmVzcG9uZGluZyAoQHRyaWdnZXIubGlzdGVuZXIpCiAgICAgICAgICAgICAgICBpZiAodGltZWxpbmVJbnN0cnVjdGlvbi5zdWJUaW1lbGluZSAmJiBza2lwcGVkUGxheWVyc01hcCkgewogICAgICAgICAgICAgICAgICAgIGFsbFN1YkVsZW1lbnRzLmFkZChlbGVtZW50KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChpc1F1ZXJpZWRFbGVtZW50KSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHdyYXBwZWRQbGF5ZXIgPSBuZXcgVHJhbnNpdGlvbkFuaW1hdGlvblBsYXllcihuYW1lc3BhY2VJZCwgdHJpZ2dlck5hbWUsIGVsZW1lbnQpOwogICAgICAgICAgICAgICAgICAgIHdyYXBwZWRQbGF5ZXIuc2V0UmVhbFBsYXllcihwbGF5ZXIpOwogICAgICAgICAgICAgICAgICAgIGFsbFF1ZXJpZWRQbGF5ZXJzLnB1c2god3JhcHBlZFBsYXllcik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gcGxheWVyOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIGFsbFF1ZXJpZWRQbGF5ZXJzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHBsYXllcgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgcGxheWVyID0+IHsKICAgICAgICAgICAgICAgIGdldE9yU2V0QXNJbk1hcCh0aGlzLnBsYXllcnNCeVF1ZXJpZWRFbGVtZW50LCBwbGF5ZXIuZWxlbWVudCwgW10pLnB1c2gocGxheWVyKTsKICAgICAgICAgICAgICAgIHBsYXllci5vbkRvbmUoKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gZGVsZXRlT3JVbnNldEluTWFwKHRoaXMucGxheWVyc0J5UXVlcmllZEVsZW1lbnQsIHBsYXllci5lbGVtZW50LCBwbGF5ZXIpKSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgYWxsQ29uc3VtZWRFbGVtZW50cy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBlbGVtZW50ID0+IGFkZENsYXNzKGVsZW1lbnQsIE5HX0FOSU1BVElOR19DTEFTU05BTUUpKSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcGxheWVyID0gb3B0aW1pemVHcm91cFBsYXllcihhbGxOZXdQbGF5ZXJzKTsKICAgICAgICAgICAgcGxheWVyLm9uRGVzdHJveSgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICBhbGxDb25zdW1lZEVsZW1lbnRzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBlbGVtZW50ID0+IHJlbW92ZUNsYXNzKGVsZW1lbnQsIE5HX0FOSU1BVElOR19DTEFTU05BTUUpKSk7CiAgICAgICAgICAgICAgICBzZXRTdHlsZXMocm9vdEVsZW1lbnQsIGluc3RydWN0aW9uLnRvU3R5bGVzKTsKICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAvLyB0aGlzIGJhc2ljYWxseSBtYWtlcyBhbGwgb2YgdGhlIGNhbGxiYWNrcyBmb3Igc3ViIGVsZW1lbnQgYW5pbWF0aW9ucwogICAgICAgICAgICAvLyBiZSBkZXBlbmRlbnQgb24gdGhlIHVwcGVyIHBsYXllcnMgZm9yIHdoZW4gdGhleSBmaW5pc2gKICAgICAgICAgICAgYWxsU3ViRWxlbWVudHMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZWxlbWVudCA9PiB7CiAgICAgICAgICAgICAgICBnZXRPclNldEFzSW5NYXAoc2tpcHBlZFBsYXllcnNNYXAsIGVsZW1lbnQsIFtdKS5wdXNoKHBsYXllcik7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgcmV0dXJuIHBsYXllcjsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGluc3RydWN0aW9uCiAgICAgICAgICogQHBhcmFtIHs/fSBrZXlmcmFtZXMKICAgICAgICAgKiBAcGFyYW0gez99IHByZXZpb3VzUGxheWVycwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2J1aWxkUGxheWVyKGluc3RydWN0aW9uLCBrZXlmcmFtZXMsIHByZXZpb3VzUGxheWVycykgewogICAgICAgICAgICBpZiAoa2V5ZnJhbWVzLmxlbmd0aCA+IDApIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmRyaXZlci5hbmltYXRlKGluc3RydWN0aW9uLmVsZW1lbnQsIGtleWZyYW1lcywgaW5zdHJ1Y3Rpb24uZHVyYXRpb24sIGluc3RydWN0aW9uLmRlbGF5LCBpbnN0cnVjdGlvbi5lYXNpbmcsIHByZXZpb3VzUGxheWVycyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gc3BlY2lhbCBjYXNlIGZvciB3aGVuIGFuIGVtcHR5IHRyYW5zaXRpb258ZGVmaW5pdGlvbiBpcyBwcm92aWRlZAogICAgICAgICAgICAvLyAuLi4gdGhlcmUgaXMgbm8gcG9pbnQgaW4gcmVuZGVyaW5nIGFuIGVtcHR5IGFuaW1hdGlvbgogICAgICAgICAgICByZXR1cm4gbmV3IE5vb3BBbmltYXRpb25QbGF5ZXIoaW5zdHJ1Y3Rpb24uZHVyYXRpb24sIGluc3RydWN0aW9uLmRlbGF5KTsKICAgICAgICB9CiAgICB9CiAgICBjbGFzcyBUcmFuc2l0aW9uQW5pbWF0aW9uUGxheWVyIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IG5hbWVzcGFjZUlkCiAgICAgICAgICogQHBhcmFtIHs/fSB0cmlnZ2VyTmFtZQogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKG5hbWVzcGFjZUlkLCB0cmlnZ2VyTmFtZSwgZWxlbWVudCkgewogICAgICAgICAgICB0aGlzLm5hbWVzcGFjZUlkID0gbmFtZXNwYWNlSWQ7CiAgICAgICAgICAgIHRoaXMudHJpZ2dlck5hbWUgPSB0cmlnZ2VyTmFtZTsKICAgICAgICAgICAgdGhpcy5lbGVtZW50ID0gZWxlbWVudDsKICAgICAgICAgICAgdGhpcy5fcGxheWVyID0gbmV3IE5vb3BBbmltYXRpb25QbGF5ZXIoKTsKICAgICAgICAgICAgdGhpcy5fY29udGFpbnNSZWFsUGxheWVyID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuX3F1ZXVlZENhbGxiYWNrcyA9IHt9OwogICAgICAgICAgICB0aGlzLmRlc3Ryb3llZCA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLm1hcmtlZEZvckRlc3Ryb3kgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5kaXNhYmxlZCA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLnF1ZXVlZCA9IHRydWU7CiAgICAgICAgICAgIHRoaXMudG90YWxUaW1lID0gMDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBwbGF5ZXIKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldFJlYWxQbGF5ZXIocGxheWVyKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9jb250YWluc1JlYWxQbGF5ZXIpCiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIHRoaXMuX3BsYXllciA9IHBsYXllcjsKICAgICAgICAgICAgT2JqZWN0LmtleXModGhpcy5fcXVldWVkQ2FsbGJhY2tzKS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwaGFzZQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgcGhhc2UgPT4gewogICAgICAgICAgICAgICAgdGhpcy5fcXVldWVkQ2FsbGJhY2tzW3BoYXNlXS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY2FsbGJhY2sKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIGNhbGxiYWNrID0+IGxpc3Rlbk9uUGxheWVyKHBsYXllciwgcGhhc2UsIHVuZGVmaW5lZCwgY2FsbGJhY2spKSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgdGhpcy5fcXVldWVkQ2FsbGJhY2tzID0ge307CiAgICAgICAgICAgIHRoaXMuX2NvbnRhaW5zUmVhbFBsYXllciA9IHRydWU7CiAgICAgICAgICAgIHRoaXMub3ZlcnJpZGVUb3RhbFRpbWUocGxheWVyLnRvdGFsVGltZSk7CiAgICAgICAgICAgICgoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpKS5xdWV1ZWQgPSBmYWxzZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXRSZWFsUGxheWVyKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fcGxheWVyOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHRvdGFsVGltZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb3ZlcnJpZGVUb3RhbFRpbWUodG90YWxUaW1lKSB7CiAgICAgICAgICAgICgoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpKS50b3RhbFRpbWUgPSB0b3RhbFRpbWU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gcGxheWVyCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzeW5jUGxheWVyRXZlbnRzKHBsYXllcikgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHAgPSAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5fcGxheWVyKSk7CiAgICAgICAgICAgIGlmIChwLnRyaWdnZXJDYWxsYmFjaykgewogICAgICAgICAgICAgICAgcGxheWVyLm9uU3RhcnQoKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gKC8qKiBAdHlwZSB7P30gKi8gKHAudHJpZ2dlckNhbGxiYWNrKSkoJ3N0YXJ0JykpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBwbGF5ZXIub25Eb25lKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHRoaXMuZmluaXNoKCkpKTsKICAgICAgICAgICAgcGxheWVyLm9uRGVzdHJveSgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB0aGlzLmRlc3Ryb3koKSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gbmFtZQogICAgICAgICAqIEBwYXJhbSB7P30gY2FsbGJhY2sKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9xdWV1ZUV2ZW50KG5hbWUsIGNhbGxiYWNrKSB7CiAgICAgICAgICAgIGdldE9yU2V0QXNJbk1hcCh0aGlzLl9xdWV1ZWRDYWxsYmFja3MsIG5hbWUsIFtdKS5wdXNoKGNhbGxiYWNrKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25Eb25lKGZuKSB7CiAgICAgICAgICAgIGlmICh0aGlzLnF1ZXVlZCkgewogICAgICAgICAgICAgICAgdGhpcy5fcXVldWVFdmVudCgnZG9uZScsIGZuKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9wbGF5ZXIub25Eb25lKGZuKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25TdGFydChmbikgewogICAgICAgICAgICBpZiAodGhpcy5xdWV1ZWQpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3F1ZXVlRXZlbnQoJ3N0YXJ0JywgZm4pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX3BsYXllci5vblN0YXJ0KGZuKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25EZXN0cm95KGZuKSB7CiAgICAgICAgICAgIGlmICh0aGlzLnF1ZXVlZCkgewogICAgICAgICAgICAgICAgdGhpcy5fcXVldWVFdmVudCgnZGVzdHJveScsIGZuKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9wbGF5ZXIub25EZXN0cm95KGZuKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBpbml0KCkgewogICAgICAgICAgICB0aGlzLl9wbGF5ZXIuaW5pdCgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGhhc1N0YXJ0ZWQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLnF1ZXVlZCA/IGZhbHNlIDogdGhpcy5fcGxheWVyLmhhc1N0YXJ0ZWQoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBwbGF5KCkgewogICAgICAgICAgICAhdGhpcy5xdWV1ZWQgJiYgdGhpcy5fcGxheWVyLnBsYXkoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBwYXVzZSgpIHsKICAgICAgICAgICAgIXRoaXMucXVldWVkICYmIHRoaXMuX3BsYXllci5wYXVzZSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlc3RhcnQoKSB7CiAgICAgICAgICAgICF0aGlzLnF1ZXVlZCAmJiB0aGlzLl9wbGF5ZXIucmVzdGFydCgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZpbmlzaCgpIHsKICAgICAgICAgICAgdGhpcy5fcGxheWVyLmZpbmlzaCgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGRlc3Ryb3koKSB7CiAgICAgICAgICAgICgoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpKS5kZXN0cm95ZWQgPSB0cnVlOwogICAgICAgICAgICB0aGlzLl9wbGF5ZXIuZGVzdHJveSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlc2V0KCkgewogICAgICAgICAgICAhdGhpcy5xdWV1ZWQgJiYgdGhpcy5fcGxheWVyLnJlc2V0KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gcAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0UG9zaXRpb24ocCkgewogICAgICAgICAgICBpZiAoIXRoaXMucXVldWVkKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9wbGF5ZXIuc2V0UG9zaXRpb24ocCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXRQb3NpdGlvbigpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMucXVldWVkID8gMCA6IHRoaXMuX3BsYXllci5nZXRQb3NpdGlvbigpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICogQHBhcmFtIHs/fSBwaGFzZU5hbWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHRyaWdnZXJDYWxsYmFjayhwaGFzZU5hbWUpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwID0gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX3BsYXllcikpOwogICAgICAgICAgICBpZiAocC50cmlnZ2VyQ2FsbGJhY2spIHsKICAgICAgICAgICAgICAgIHAudHJpZ2dlckNhbGxiYWNrKHBoYXNlTmFtZSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gbWFwCiAgICAgKiBAcGFyYW0gez99IGtleQogICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZGVsZXRlT3JVbnNldEluTWFwKG1hcCwga2V5LCB2YWx1ZSkgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgY3VycmVudFZhbHVlczsKICAgICAgICBpZiAobWFwIGluc3RhbmNlb2YgTWFwKSB7CiAgICAgICAgICAgIGN1cnJlbnRWYWx1ZXMgPSBtYXAuZ2V0KGtleSk7CiAgICAgICAgICAgIGlmIChjdXJyZW50VmFsdWVzKSB7CiAgICAgICAgICAgICAgICBpZiAoY3VycmVudFZhbHVlcy5sZW5ndGgpIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgaW5kZXggPSBjdXJyZW50VmFsdWVzLmluZGV4T2YodmFsdWUpOwogICAgICAgICAgICAgICAgICAgIGN1cnJlbnRWYWx1ZXMuc3BsaWNlKGluZGV4LCAxKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChjdXJyZW50VmFsdWVzLmxlbmd0aCA9PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgbWFwLmRlbGV0ZShrZXkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICBjdXJyZW50VmFsdWVzID0gbWFwW2tleV07CiAgICAgICAgICAgIGlmIChjdXJyZW50VmFsdWVzKSB7CiAgICAgICAgICAgICAgICBpZiAoY3VycmVudFZhbHVlcy5sZW5ndGgpIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgaW5kZXggPSBjdXJyZW50VmFsdWVzLmluZGV4T2YodmFsdWUpOwogICAgICAgICAgICAgICAgICAgIGN1cnJlbnRWYWx1ZXMuc3BsaWNlKGluZGV4LCAxKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChjdXJyZW50VmFsdWVzLmxlbmd0aCA9PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIG1hcFtrZXldOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiBjdXJyZW50VmFsdWVzOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBub3JtYWxpemVUcmlnZ2VyVmFsdWUodmFsdWUpIHsKICAgICAgICAvLyB3ZSB1c2UgYCE9IG51bGxgIGhlcmUgYmVjYXVzZSBpdCdzIHRoZSBtb3N0IHNpbXBsZQogICAgICAgIC8vIHdheSB0byB0ZXN0IGFnYWluc3QgYSAiZmFsc3kiIHZhbHVlIHdpdGhvdXQgbWl4aW5nCiAgICAgICAgLy8gaW4gZW1wdHkgc3RyaW5ncyBvciBhIHplcm8gdmFsdWUuIERPIE5PVCBPUFRJTUlaRS4KICAgICAgICByZXR1cm4gdmFsdWUgIT0gbnVsbCA/IHZhbHVlIDogbnVsbDsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBub2RlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBpc0VsZW1lbnROb2RlKG5vZGUpIHsKICAgICAgICByZXR1cm4gbm9kZSAmJiBub2RlWydub2RlVHlwZSddID09PSAxOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IGV2ZW50TmFtZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gaXNUcmlnZ2VyRXZlbnRWYWxpZChldmVudE5hbWUpIHsKICAgICAgICByZXR1cm4gZXZlbnROYW1lID09ICdzdGFydCcgfHwgZXZlbnROYW1lID09ICdkb25lJzsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgKiBAcGFyYW0gez89fSB2YWx1ZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gY2xvYWtFbGVtZW50KGVsZW1lbnQsIHZhbHVlKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IG9sZFZhbHVlID0gZWxlbWVudC5zdHlsZS5kaXNwbGF5OwogICAgICAgIGVsZW1lbnQuc3R5bGUuZGlzcGxheSA9IHZhbHVlICE9IG51bGwgPyB2YWx1ZSA6ICdub25lJzsKICAgICAgICByZXR1cm4gb2xkVmFsdWU7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdmFsdWVzTWFwCiAgICAgKiBAcGFyYW0gez99IGRyaXZlcgogICAgICogQHBhcmFtIHs/fSBlbGVtZW50cwogICAgICogQHBhcmFtIHs/fSBlbGVtZW50UHJvcHNNYXAKICAgICAqIEBwYXJhbSB7P30gZGVmYXVsdFN0eWxlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBjbG9ha0FuZENvbXB1dGVTdHlsZXModmFsdWVzTWFwLCBkcml2ZXIsIGVsZW1lbnRzLCBlbGVtZW50UHJvcHNNYXAsIGRlZmF1bHRTdHlsZSkgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBjbG9ha1ZhbHMgPSBbXTsKICAgICAgICBlbGVtZW50cy5mb3JFYWNoKCgvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGVsZW1lbnQgPT4gY2xvYWtWYWxzLnB1c2goY2xvYWtFbGVtZW50KGVsZW1lbnQpKSkpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBmYWlsZWRFbGVtZW50cyA9IFtdOwogICAgICAgIGVsZW1lbnRQcm9wc01hcC5mb3JFYWNoKCgvKioKICAgICAgICAgKiBAcGFyYW0gez99IHByb3BzCiAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAocHJvcHMsIGVsZW1lbnQpID0+IHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBzdHlsZXMgPSB7fTsKICAgICAgICAgICAgcHJvcHMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcHJvcAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgcHJvcCA9PiB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCB2YWx1ZSA9IHN0eWxlc1twcm9wXSA9IGRyaXZlci5jb21wdXRlU3R5bGUoZWxlbWVudCwgcHJvcCwgZGVmYXVsdFN0eWxlKTsKICAgICAgICAgICAgICAgIC8vIHRoZXJlIGlzIG5vIGVhc3kgd2F5IHRvIGRldGVjdCB0aGlzIGJlY2F1c2UgYSBzdWIgZWxlbWVudCBjb3VsZCBiZSByZW1vdmVkCiAgICAgICAgICAgICAgICAvLyBieSBhIHBhcmVudCBhbmltYXRpb24gZWxlbWVudCBiZWluZyBkZXRhY2hlZC4KICAgICAgICAgICAgICAgIGlmICghdmFsdWUgfHwgdmFsdWUubGVuZ3RoID09IDApIHsKICAgICAgICAgICAgICAgICAgICBlbGVtZW50W1JFTU9WQUxfRkxBR10gPSBOVUxMX1JFTU9WRURfUVVFUklFRF9TVEFURTsKICAgICAgICAgICAgICAgICAgICBmYWlsZWRFbGVtZW50cy5wdXNoKGVsZW1lbnQpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIHZhbHVlc01hcC5zZXQoZWxlbWVudCwgc3R5bGVzKTsKICAgICAgICB9KSk7CiAgICAgICAgLy8gd2UgdXNlIGEgaW5kZXggdmFyaWFibGUgaGVyZSBzaW5jZSBTZXQuZm9yRWFjaChhLCBpKSBkb2VzIG5vdCByZXR1cm4K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cGFyYW0gez99IG5vZGVzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBidWlsZFJvb3RNYXAocm9vdHMsIG5vZGVzKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHJvb3RNYXAgPSBuZXcgTWFwKCk7CiAgICAgICAgcm9vdHMuZm9yRWFjaCgoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSByb290CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByb290ID0+IHJvb3RNYXAuc2V0KHJvb3QsIFtdKSkpOwogICAgICAgIGlmIChub2Rlcy5sZW5ndGggPT0gMCkKICAgICAgICAgICAgcmV0dXJuIHJvb3RNYXA7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IE5VTExfTk9ERSA9IDE7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IG5vZGVTZXQgPSBuZXcgU2V0KG5vZGVzKTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgbG9jYWxSb290TWFwID0gbmV3IE1hcCgpOwogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gbm9kZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gZ2V0Um9vdChub2RlKSB7CiAgICAgICAgICAgIGlmICghbm9kZSkKICAgICAgICAgICAgICAgIHJldHVybiBOVUxMX05PREU7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHJvb3QgPSBsb2NhbFJvb3RNYXAuZ2V0KG5vZGUpOwogICAgICAgICAgICBpZiAocm9vdCkKICAgICAgICAgICAgICAgIHJldHVybiByb290OwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHBhcmVudCA9IG5vZGUucGFyZW50Tm9kZTsKICAgICAgICAgICAgaWYgKHJvb3RNYXAuaGFzKHBhcmVudCkpIHsgLy8gbmdJZiBpbnNpZGUgQHRyaWdnZXIKICAgICAgICAgICAgICAgIHJvb3QgPSBwYXJlbnQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAobm9kZVNldC5oYXMocGFyZW50KSkgeyAvLyBuZ0lmIGluc2lkZSBuZ0lmCiAgICAgICAgICAgICAgICByb290ID0gTlVMTF9OT0RFOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgeyAvLyByZWN1cnNlIHVwd2FyZHMKICAgICAgICAgICAgICAgIHJvb3QgPSBnZXRSb290KHBhcmVudCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgbG9jYWxSb290TWFwLnNldChub2RlLCByb290KTsKICAgICAgICAgICAgcmV0dXJuIHJvb3Q7CiAgICAgICAgfQogICAgICAgIG5vZGVzLmZvckVhY2goKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gbm9kZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbm9kZSA9PiB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgcm9vdCA9IGdldFJvb3Qobm9kZSk7CiAgICAgICAgICAgIGlmIChyb290ICE9PSBOVUxMX05PREUpIHsKICAgICAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovIChyb290TWFwLmdldChyb290KSkpLnB1c2gobm9kZSk7CiAgICAgICAgICAgIH0KICAgICAgICB9KSk7CiAgICAgICAgcmV0dXJuIHJvb3RNYXA7CiAgICB9CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBDTEFTU0VTX0NBQ0hFX0tFWSA9ICckJGNsYXNzZXMnOwogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAqIEBwYXJhbSB7P30gY2xhc3NOYW1lCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBhZGRDbGFzcyhlbGVtZW50LCBjbGFzc05hbWUpIHsKICAgICAgICBpZiAoZWxlbWVudC5jbGFzc0xpc3QpIHsKICAgICAgICAgICAgZWxlbWVudC5jbGFzc0xpc3QuYWRkKGNsYXNzTmFtZSk7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBjbGFzc2VzID0gZWxlbWVudFtDTEFTU0VTX0NBQ0hFX0tFWV07CiAgICAgICAgICAgIGlmICghY2xhc3NlcykgewogICAgICAgICAgICAgICAgY2xhc3NlcyA9IGVsZW1lbnRbQ0xBU1NFU19DQUNIRV9LRVldID0ge307CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY2xhc3Nlc1tjbGFzc05hbWVdID0gdHJ1ZTsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICogQHBhcmFtIHs/fSBjbGFzc05hbWUKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHJlbW92ZUNsYXNzKGVsZW1lbnQsIGNsYXNzTmFtZSkgewogICAgICAgIGlmIChlbGVtZW50LmNsYXNzTGlzdCkgewogICAgICAgICAgICBlbGVtZW50LmNsYXNzTGlzdC5yZW1vdmUoY2xhc3NOYW1lKTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGNsYXNzZXMgPSBlbGVtZW50W0NMQVNTRVNfQ0FDSEVfS0VZXTsKICAgICAgICAgICAgaWYgKGNsYXNzZXMpIHsKICAgICAgICAgICAgICAgIGRlbGV0ZSBjbGFzc2VzW2NsYXNzTmFtZV07CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gZW5naW5lCiAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAqIEBwYXJhbSB7P30gcGxheWVycwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gcmVtb3ZlTm9kZXNBZnRlckFuaW1hdGlvbkRvbmUoZW5naW5lLCBlbGVtZW50LCBwbGF5ZXJzKSB7CiAgICAgICAgb3B0aW1pemVHcm91cFBsYXllcihwbGF5ZXJzKS5vbkRvbmUoKC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgKCkgPT4gZW5naW5lLnByb2Nlc3NMZWF2ZU5vZGUoZWxlbWVudCkpKTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBwbGF5ZXJzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBmbGF0dGVuR3JvdXBQbGF5ZXJzKHBsYXllcnMpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgZmluYWxQbGF5ZXJzID0gW107CiAgICAgICAgX2ZsYXR0ZW5Hcm91cFBsYXllcnNSZWN1cihwbGF5ZXJzLCBmaW5hbFBsYXllcnMpOwogICAgICAgIHJldHVybiBmaW5hbFBsYXllcnM7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gcGxheWVycwogICAgICogQHBhcmFtIHs/fSBmaW5hbFBsYXllcnMKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIF9mbGF0dGVuR3JvdXBQbGF5ZXJzUmVjdXIocGxheWVycywgZmluYWxQbGF5ZXJzKSB7CiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBwbGF5ZXJzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcGxheWVyID0gcGxheWVyc1tpXTsKICAgICAgICAgICAgaWYgKHBsYXllciBpbnN0YW5jZW9mIEFuaW1hdGlvbkdyb3VwUGxheWVyKSB7CiAgICAgICAgICAgICAgICBfZmxhdHRlbkdyb3VwUGxheWVyc1JlY3VyKHBsYXllci5wbGF5ZXJzLCBmaW5hbFBsYXllcnMpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgZmluYWxQbGF5ZXJzLnB1c2gocGxheWVyKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBhCiAgICAgKiBAcGFyYW0gez99IGIKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIG9iakVxdWFscyhhLCBiKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGsxID0gT2JqZWN0LmtleXMoYSk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGsyID0gT2JqZWN0LmtleXMoYik7CiAgICAgICAgaWYgKGsxLmxlbmd0aCAhPSBrMi5sZW5ndGgpCiAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGsxLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcHJvcCA9IGsxW2ldOwogICAgICAgICAgICBpZiAoIWIuaGFzT3duUHJvcGVydHkocHJvcCkgfHwgYVtwcm9wXSAhPT0gYltwcm9wXSkKICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIHRydWU7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICogQHBhcmFtIHs/fSBhbGxQcmVTdHlsZUVsZW1lbnRzCiAgICAgKiBAcGFyYW0gez99IGFsbFBvc3RTdHlsZUVsZW1lbnRzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiByZXBsYWNlUG9zdFN0eWxlc0FzUHJlKGVsZW1lbnQsIGFsbFByZVN0eWxlRWxlbWVudHMsIGFsbFBvc3RTdHlsZUVsZW1lbnRzKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHBvc3RFbnRyeSA9IGFsbFBvc3RTdHlsZUVsZW1lbnRzLmdldChlbGVtZW50KTsKICAgICAgICBpZiAoIXBvc3RFbnRyeSkKICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgcHJlRW50cnkgPSBhbGxQcmVTdHlsZUVsZW1lbnRzLmdldChlbGVtZW50KTsKICAgICAgICBpZiAocHJlRW50cnkpIHsKICAgICAgICAgICAgcG9zdEVudHJ5LmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGRhdGEKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGRhdGEgPT4gKC8qKiBAdHlwZSB7P30gKi8gKHByZUVudHJ5KSkuYWRkKGRhdGEpKSk7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICBhbGxQcmVTdHlsZUVsZW1lbnRzLnNldChlbGVtZW50LCBwb3N0RW50cnkpOwogICAgICAgIH0KICAgICAgICBhbGxQb3N0U3R5bGVFbGVtZW50cy5kZWxldGUoZWxlbWVudCk7CiAgICAgICAgcmV0dXJuIHRydWU7CiAgICB9CgogICAgLyoqCiAgICAgKiBAZmlsZW92ZXJ2aWV3IGFkZGVkIGJ5IHRzaWNrbGUKICAgICAqIEdlbmVyYXRlZCBmcm9tOiBwYWNrYWdlcy9hbmltYXRpb25zL2Jyb3dzZXIvc3JjL3JlbmRlci9hbmltYXRpb25fZW5naW5lX25leHQudHMKICAgICAqIEBzdXBwcmVzcyB7Y2hlY2tUeXBlcyxjb25zdGFudFByb3BlcnR5LGV4dHJhUmVxdWlyZSxtaXNzaW5nT3ZlcnJpZGUsbWlzc2luZ1JldHVybix1bnVzZWRQcml2YXRlTWVtYmVycyx1c2VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgY2xhc3MgQW5pbWF0aW9uRW5naW5lIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGJvZHlOb2RlCiAgICAgICAgICogQHBhcmFtIHs/fSBfZHJpdmVyCiAgICAgICAgICogQHBhcmFtIHs/fSBub3JtYWxpemVyCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoYm9keU5vZGUsIF9kcml2ZXIsIG5vcm1hbGl6ZXIpIHsKICAgICAgICAgICAgdGhpcy5ib2R5Tm9kZSA9IGJvZHlOb2RlOwogICAgICAgICAgICB0aGlzLl9kcml2ZXIgPSBfZHJpdmVyOwogICAgICAgICAgICB0aGlzLl90cmlnZ2VyQ2FjaGUgPSB7fTsKICAgICAgICAgICAgLy8gdGhpcyBtZXRob2QgaXMgZGVzaWduZWQgdG8gYmUgb3ZlcnJpZGRlbiBieSB0aGUgY29kZSB0aGF0IHVzZXMgdGhpcyBlbmdpbmUKICAgICAgICAgICAgdGhpcy5vblJlbW92YWxDb21wbGV0ZSA9ICgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY29udGV4dAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGVsZW1lbnQsIGNvbnRleHQpID0+IHsgfSk7CiAgICAgICAgICAgIHRoaXMuX3RyYW5zaXRpb25FbmdpbmUgPSBuZXcgVHJhbnNpdGlvbkFuaW1hdGlvbkVuZ2luZShib2R5Tm9kZSwgX2RyaXZlciwgbm9ybWFsaXplcik7CiAgICAgICAgICAgIHRoaXMuX3RpbWVsaW5lRW5naW5lID0gbmV3IFRpbWVsaW5lQW5pbWF0aW9uRW5naW5lKGJvZHlOb2RlLCBfZHJpdmVyLCBub3JtYWxpemVyKTsKICAgICAgICAgICAgdGhpcy5fdHJhbnNpdGlvbkVuZ2luZS5vblJlbW92YWxDb21wbGV0ZSA9ICgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY29udGV4dAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGVsZW1lbnQsIGNvbnRleHQpID0+IHRoaXMub25SZW1vdmFsQ29tcGxldGUoZWxlbWVudCwgY29udGV4dCkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGNvbXBvbmVudElkCiAgICAgICAgICogQHBhcmFtIHs/fSBuYW1lc3BhY2VJZAogICAgICAgICAqIEBwYXJhbSB7P30gaG9zdEVsZW1lbnQKICAgICAgICAgKiBAcGFyYW0gez99IG5hbWUKICAgICAgICAgKiBAcGFyYW0gez99IG1ldGFkYXRhCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZWdpc3RlclRyaWdnZXIoY29tcG9uZW50SWQsIG5hbWVzcGFjZUlkLCBob3N0RWxlbWVudCwgbmFtZSwgbWV0YWRhdGEpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjYWNoZUtleSA9IGNvbXBvbmVudElkICsgJy0nICsgbmFtZTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgdHJpZ2dlciA9IHRoaXMuX3RyaWdnZXJDYWNoZVtjYWNoZUtleV07CiAgICAgICAgICAgIGlmICghdHJpZ2dlcikgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZXJyb3JzID0gW107CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBhc3QgPSAoLyoqIEB0eXBlIHs/fSAqLyAoYnVpbGRBbmltYXRpb25Bc3QodGhpcy5fZHJpdmVyLCAoLyoqIEB0eXBlIHs/fSAqLyAobWV0YWRhdGEpKSwgZXJyb3JzKSkpOwogICAgICAgICAgICAgICAgaWYgKGVycm9ycy5sZW5ndGgpIHsKICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYFRoZSBhbmltYXRpb24gdHJpZ2dlciAiJHtuYW1lfSIgaGFzIGZhaWxlZCB0byBidWlsZCBkdWUgdG8gdGhlIGZvbGxvd2luZyBlcnJvcnM6XG4gLSAke2Vycm9ycy5qb2luKCdcbiAtICcpfWApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdHJpZ2dlciA9IGJ1aWxkVHJpZ2dlcihuYW1lLCBhc3QpOwogICAgICAgICAgICAgICAgdGhpcy5fdHJpZ2dlckNhY2hlW2NhY2hlS2V5XSA9IHRyaWdnZXI7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fdHJhbnNpdGlvbkVuZ2luZS5yZWdpc3RlclRyaWdnZXIobmFtZXNwYWNlSWQsIG5hbWUsIHRyaWdnZXIpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IG5hbWVzcGFjZUlkCiAgICAgICAgICogQHBhcmFtIHs/fSBob3N0RWxlbWVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVnaXN0ZXIobmFtZXNwYWNlSWQsIGhvc3RFbGVtZW50KSB7CiAgICAgICAgICAgIHRoaXMuX3RyYW5zaXRpb25FbmdpbmUucmVnaXN0ZXIobmFtZXNwYWNlSWQsIGhvc3RFbGVtZW50KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBuYW1lc3BhY2VJZAogICAgICAgICAqIEBwYXJhbSB7P30gY29udGV4dAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZGVzdHJveShuYW1lc3BhY2VJZCwgY29udGV4dCkgewogICAgICAgICAgICB0aGlzLl90cmFuc2l0aW9uRW5naW5lLmRlc3Ryb3kobmFtZXNwYWNlSWQsIGNvbnRleHQpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IG5hbWVzcGFjZUlkCiAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgICAgICogQHBhcmFtIHs/fSBwYXJlbnQKICAgICAgICAgKiBAcGFyYW0gez99IGluc2VydEJlZm9yZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25JbnNlcnQobmFtZXNwYWNlSWQsIGVsZW1lbnQsIHBhcmVudCwgaW5zZXJ0QmVmb3JlKSB7CiAgICAgICAgICAgIHRoaXMuX3RyYW5zaXRpb25FbmdpbmUuaW5zZXJ0Tm9kZShuYW1lc3BhY2VJZCwgZWxlbWVudCwgcGFyZW50LCBpbnNlcnRCZWZvcmUpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IG5hbWVzcGFjZUlkCiAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgICAgICogQHBhcmFtIHs/fSBjb250ZXh0CiAgICAgICAgICogQHBhcmFtIHs/PX0gaXNIb3N0RWxlbWVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25SZW1vdmUobmFtZXNwYWNlSWQsIGVsZW1lbnQsIGNvbnRleHQsIGlzSG9zdEVsZW1lbnQpIHsKICAgICAgICAgICAgdGhpcy5fdHJhbnNpdGlvbkVuZ2luZS5yZW1vdmVOb2RlKG5hbWVzcGFjZUlkLCBlbGVtZW50LCBpc0hvc3RFbGVtZW50IHx8IGZhbHNlLCBjb250ZXh0KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgICAgICogQHBhcmFtIHs/fSBkaXNhYmxlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkaXNhYmxlQW5pbWF0aW9ucyhlbGVtZW50LCBkaXNhYmxlKSB7CiAgICAgICAgICAgIHRoaXMuX3RyYW5zaXRpb25FbmdpbmUubWFya0VsZW1lbnRBc0Rpc2FibGVkKGVsZW1lbnQsIGRpc2FibGUpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IG5hbWVzcGFjZUlkCiAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgICAgICogQHBhcmFtIHs/fSBwcm9wZXJ0eQogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHByb2Nlc3MobmFtZXNwYWNlSWQsIGVsZW1lbnQsIHByb3BlcnR5LCB2YWx1ZSkgewogICAgICAgICAgICBpZiAocHJvcGVydHkuY2hhckF0KDApID09ICdAJykgewogICAgICAgICAgICAgICAgY29uc3QgW2lkLCBhY3Rpb25dID0gcGFyc2VUaW1lbGluZUNvbW1hbmQocHJvcGVydHkpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgYXJncyA9ICgvKiogQHR5cGUgez99ICovICh2YWx1ZSkpOwogICAgICAgICAgICAgICAgdGhpcy5fdGltZWxpbmVFbmdpbmUuY29tbWFuZChpZCwgZWxlbWVudCwgYWN0aW9uLCBhcmdzKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuX3RyYW5zaXRpb25FbmdpbmUudHJpZ2dlcihuYW1lc3BhY2VJZCwgZWxlbWVudCwgcHJvcGVydHksIHZhbHVlKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IG5hbWVzcGFjZUlkCiAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgICAgICogQHBhcmFtIHs/fSBldmVudE5hbWUKICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50UGhhc2UKICAgICAgICAgKiBAcGFyYW0gez99IGNhbGxiYWNrCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBsaXN0ZW4obmFtZXNwYWNlSWQsIGVsZW1lbnQsIGV2ZW50TmFtZSwgZXZlbnRQaGFzZSwgY2FsbGJhY2spIHsKICAgICAgICAgICAgLy8gQEBsaXN0ZW4KICAgICAgICAgICAgaWYgKGV2ZW50TmFtZS5jaGFyQXQoMCkgPT0gJ0AnKSB7CiAgICAgICAgICAgICAgICBjb25zdCBbaWQsIGFjdGlvbl0gPSBwYXJzZVRpbWVsaW5lQ29tbWFuZChldmVudE5hbWUpOwogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3RpbWVsaW5lRW5naW5lLmxpc3RlbihpZCwgZWxlbWVudCwgYWN0aW9uLCBjYWxsYmFjayk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3RyYW5zaXRpb25FbmdpbmUubGlzdGVuKG5hbWVzcGFjZUlkLCBlbGVtZW50LCBldmVudE5hbWUsIGV2ZW50UGhhc2UsIGNhbGxiYWNrKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/PX0gbWljcm90YXNrSWQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZsdXNoKG1pY3JvdGFza0lkID0gLTEpIHsKICAgICAgICAgICAgdGhpcy5fdHJhbnNpdGlvbkVuZ2luZS5mbHVzaChtaWNyb3Rhc2tJZCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHBsYXllcnMoKS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AcGFyYW0gez99IF9lbmRTdHlsZXMKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihfZWxlbWVudCwgX3N0YXJ0U3R5bGVzLCBfZW5kU3R5bGVzKSB7CiAgICAgICAgICAgIHRoaXMuX2VsZW1lbnQgPSBfZWxlbWVudDsKICAgICAgICAgICAgdGhpcy5fc3RhcnRTdHlsZXMgPSBfc3RhcnRTdHlsZXM7CiAgICAgICAgICAgIHRoaXMuX2VuZFN0eWxlcyA9IF9lbmRTdHlsZXM7CiAgICAgICAgICAgIHRoaXMuX3N0YXRlID0gMCAvKiBQZW5kaW5nICovOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBpbml0aWFsU3R5bGVzID0gU3BlY2lhbENhc2VkU3R5bGVzLmluaXRpYWxTdHlsZXNCeUVsZW1lbnQuZ2V0KF9lbGVtZW50KTsKICAgICAgICAgICAgaWYgKCFpbml0aWFsU3R5bGVzKSB7CiAgICAgICAgICAgICAgICBTcGVjaWFsQ2FzZWRTdHlsZXMuaW5pdGlhbFN0eWxlc0J5RWxlbWVudC5zZXQoX2VsZW1lbnQsIGluaXRpYWxTdHlsZXMgPSB7fSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5faW5pdGlhbFN0eWxlcyA9IGluaXRpYWxTdHlsZXM7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc3RhcnQoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9zdGF0ZSA8IDEgLyogU3RhcnRlZCAqLykgewogICAgICAgICAgICAgICAgaWYgKHRoaXMuX3N0YXJ0U3R5bGVzKSB7CiAgICAgICAgICAgICAgICAgICAgc2V0U3R5bGVzKHRoaXMuX2VsZW1lbnQsIHRoaXMuX3N0YXJ0U3R5bGVzLCB0aGlzLl9pbml0aWFsU3R5bGVzKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuX3N0YXRlID0gMSAvKiBTdGFydGVkICovOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZmluaXNoKCkgewogICAgICAgICAgICB0aGlzLnN0YXJ0KCk7CiAgICAgICAgICAgIGlmICh0aGlzLl9zdGF0ZSA8IDIgLyogRmluaXNoZWQgKi8pIHsKICAgICAgICAgICAgICAgIHNldFN0eWxlcyh0aGlzLl9lbGVtZW50LCB0aGlzLl9pbml0aWFsU3R5bGVzKTsKICAgICAgICAgICAgICAgIGlmICh0aGlzLl9lbmRTdHlsZXMpIHsKICAgICAgICAgICAgICAgICAgICBzZXRTdHlsZXModGhpcy5fZWxlbWVudCwgdGhpcy5fZW5kU3R5bGVzKTsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9lbmRTdHlsZXMgPSBudWxsOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdGhpcy5fc3RhdGUgPSAxIC8qIFN0YXJ0ZWQgKi87CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkZXN0cm95KCkgewogICAgICAgICAgICB0aGlzLmZpbmlzaCgpOwogICAgICAgICAgICBpZiAodGhpcy5fc3RhdGUgPCAzIC8qIERlc3Ryb3llZCAqLykgewogICAgICAgICAgICAgICAgU3BlY2lhbENhc2VkU3R5bGVzLmluaXRpYWxTdHlsZXNCeUVsZW1lbnQuZGVsZXRlKHRoaXMuX2VsZW1lbnQpOwogICAgICAgICAgICAgICAgaWYgKHRoaXMuX3N0YXJ0U3R5bGVzKSB7CiAgICAgICAgICAgICAgICAgICAgZXJhc2VTdHlsZXModGhpcy5fZWxlbWVudCwgdGhpcy5fc3RhcnRTdHlsZXMpOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX2VuZFN0eWxlcyA9IG51bGw7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAodGhpcy5fZW5kU3R5bGVzKSB7CiAgICAgICAgICAgICAgICAgICAgZXJhc2VTdHlsZXModGhpcy5fZWxlbWVudCwgdGhpcy5fZW5kU3R5bGVzKTsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9lbmRTdHlsZXMgPSBudWxsOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgc2V0U3R5bGVzKHRoaXMuX2VsZW1lbnQsIHRoaXMuX2luaXRpYWxTdHlsZXMpOwogICAgICAgICAgICAgICAgdGhpcy5fc3RhdGUgPSAzIC8qIERlc3Ryb3llZCAqLzsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIFNwZWNpYWxDYXNlZFN0eWxlcy5pbml0aWFsU3R5bGVzQnlFbGVtZW50ID0gbmV3IFdlYWtNYXAoKTsKICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBzdHlsZXMKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGZpbHRlck5vbkFuaW1hdGFibGVTdHlsZXMoc3R5bGVzKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCByZXN1bHQgPSBudWxsOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBwcm9wcyA9IE9iamVjdC5rZXlzKHN0eWxlcyk7CiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBwcm9wcy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHByb3AgPSBwcm9wc1tpXTsKICAgICAgICAgICAgaWYgKGlzTm9uQW5pbWF0YWJsZVN0eWxlKHByb3ApKSB7CiAgICAgICAgICAgICAgICByZXN1bHQgPSByZXN1bHQgfHwge307CiAgICAgICAgICAgICAgICByZXN1bHRbcHJvcF0gPSBzdHlsZXNbcHJvcF07CiAgICAg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iAgICBjb25zdCBBTklNQVRJT05fUFJPUCA9ICdhbmltYXRpb24nOwogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgQU5JTUFUSU9ORU5EX0VWRU5UID0gJ2FuaW1hdGlvbmVuZCc7CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBPTkVfU0VDT05EJDEgPSAxMDAwOwogICAgY2xhc3MgRWxlbWVudEFuaW1hdGlvblN0eWxlSGFuZGxlciB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBfZWxlbWVudAogICAgICAgICAqIEBwYXJhbSB7P30gX25hbWUKICAgICAgICAgKiBAcGFyYW0gez99IF9kdXJhdGlvbgogICAgICAgICAqIEBwYXJhbSB7P30gX2RlbGF5CiAgICAgICAgICogQHBhcmFtIHs/fSBfZWFzaW5nCiAgICAgICAgICogQHBhcmFtIHs/fSBfZmlsbE1vZGUKICAgICAgICAgKiBAcGFyYW0gez99IF9vbkRvbmVGbgogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKF9lbGVtZW50LCBfbmFtZSwgX2R1cmF0aW9uLCBfZGVsYXksIF9lYXNpbmcsIF9maWxsTW9kZSwgX29uRG9uZUZuKSB7CiAgICAgICAgICAgIHRoaXMuX2VsZW1lbnQgPSBfZWxlbWVudDsKICAgICAgICAgICAgdGhpcy5fbmFtZSA9IF9uYW1lOwogICAgICAgICAgICB0aGlzLl9kdXJhdGlvbiA9IF9kdXJhdGlvbjsKICAgICAgICAgICAgdGhpcy5fZGVsYXkgPSBfZGVsYXk7CiAgICAgICAgICAgIHRoaXMuX2Vhc2luZyA9IF9lYXNpbmc7CiAgICAgICAgICAgIHRoaXMuX2ZpbGxNb2RlID0gX2ZpbGxNb2RlOwogICAgICAgICAgICB0aGlzLl9vbkRvbmVGbiA9IF9vbkRvbmVGbjsKICAgICAgICAgICAgdGhpcy5fZmluaXNoZWQgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5fZGVzdHJveWVkID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuX3N0YXJ0VGltZSA9IDA7CiAgICAgICAgICAgIHRoaXMuX3Bvc2l0aW9uID0gMDsKICAgICAgICAgICAgdGhpcy5fZXZlbnRGbiA9ICgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBlCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoZSkgPT4gdGhpcy5faGFuZGxlQ2FsbGJhY2soZSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGFwcGx5KCkgewogICAgICAgICAgICBhcHBseUtleWZyYW1lQW5pbWF0aW9uKHRoaXMuX2VsZW1lbnQsIGAke3RoaXMuX2R1cmF0aW9ufW1zICR7dGhpcy5fZWFzaW5nfSAke3RoaXMuX2RlbGF5fW1zIDEgbm9ybWFsICR7dGhpcy5fZmlsbE1vZGV9ICR7dGhpcy5fbmFtZX1gKTsKICAgICAgICAgICAgYWRkUmVtb3ZlQW5pbWF0aW9uRXZlbnQodGhpcy5fZWxlbWVudCwgdGhpcy5fZXZlbnRGbiwgZmFsc2UpOwogICAgICAgICAgICB0aGlzLl9zdGFydFRpbWUgPSBEYXRlLm5vdygpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHBhdXNlKCkgewogICAgICAgICAgICBwbGF5UGF1c2VBbmltYXRpb24odGhpcy5fZWxlbWVudCwgdGhpcy5fbmFtZSwgJ3BhdXNlZCcpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlc3VtZSgpIHsKICAgICAgICAgICAgcGxheVBhdXNlQW5pbWF0aW9uKHRoaXMuX2VsZW1lbnQsIHRoaXMuX25hbWUsICdydW5uaW5nJyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gcG9zaXRpb24KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldFBvc2l0aW9uKHBvc2l0aW9uKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaW5kZXggPSBmaW5kSW5kZXhGb3JBbmltYXRpb24odGhpcy5fZWxlbWVudCwgdGhpcy5fbmFtZSk7CiAgICAgICAgICAgIHRoaXMuX3Bvc2l0aW9uID0gcG9zaXRpb24gKiB0aGlzLl9kdXJhdGlvbjsKICAgICAgICAgICAgc2V0QW5pbWF0aW9uU3R5bGUodGhpcy5fZWxlbWVudCwgJ0RlbGF5JywgYC0ke3RoaXMuX3Bvc2l0aW9ufW1zYCwgaW5kZXgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldFBvc2l0aW9uKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fcG9zaXRpb247CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBldmVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2hhbmRsZUNhbGxiYWNrKGV2ZW50KSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdGltZXN0YW1wID0gZXZlbnQuX25nVGVzdE1hbnVhbFRpbWVzdGFtcCB8fCBEYXRlLm5vdygpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGVsYXBzZWRUaW1lID0gcGFyc2VGbG9hdChldmVudC5lbGFwc2VkVGltZS50b0ZpeGVkKEVMQVBTRURfVElNRV9NQVhfREVDSU1BTF9QTEFDRVMpKSAqIE9ORV9TRUNPTkQkMTsKICAgICAgICAgICAgaWYgKGV2ZW50LmFuaW1hdGlvbk5hbWUgPT0gdGhpcy5fbmFtZSAmJgogICAgICAgICAgICAgICAgTWF0aC5tYXgodGltZXN0YW1wIC0gdGhpcy5fc3RhcnRUaW1lLCAwKSA+PSB0aGlzLl9kZWxheSAmJiBlbGFwc2VkVGltZSA+PSB0aGlzLl9kdXJhdGlvbikgewogICAgICAgICAgICAgICAgdGhpcy5maW5pc2goKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZpbmlzaCgpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX2ZpbmlzaGVkKQogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB0aGlzLl9maW5pc2hlZCA9IHRydWU7CiAgICAgICAgICAgIHRoaXMuX29uRG9uZUZuKCk7CiAgICAgICAgICAgIGFkZFJlbW92ZUFuaW1hdGlvbkV2ZW50KHRoaXMuX2VsZW1lbnQsIHRoaXMuX2V2ZW50Rm4sIHRydWUpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGRlc3Ryb3koKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9kZXN0cm95ZWQpCiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIHRoaXMuX2Rlc3Ryb3llZCA9IHRydWU7CiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7CiAgICAgICAgICAgIHJlbW92ZUtleWZyYW1lQW5pbWF0aW9uKHRoaXMuX2VsZW1lbnQsIHRoaXMuX25hbWUpOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgKiBAcGFyYW0gez99IG5hbWUKICAgICAqIEBwYXJhbSB7P30gc3RhdHVzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBwbGF5UGF1c2VBbmltYXRpb24oZWxlbWVudCwgbmFtZSwgc3RhdHVzKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGluZGV4ID0gZmluZEluZGV4Rm9yQW5pbWF0aW9uKGVsZW1lbnQsIG5hbWUpOwogICAgICAgIHNldEFuaW1hdGlvblN0eWxlKGVsZW1lbnQsICdQbGF5U3RhdGUnLCBzdGF0dXMsIGluZGV4KTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBhcHBseUtleWZyYW1lQW5pbWF0aW9uKGVsZW1lbnQsIHZhbHVlKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGFuaW0gPSBnZXRBbmltYXRpb25TdHlsZShlbGVtZW50LCAnJykudHJpbSgpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgaW5kZXggPSAwOwogICAgICAgIGlmIChhbmltLmxlbmd0aCkgewogICAgICAgICAgICBpbmRleCA9IGNvdW50Q2hhcnMoYW5pbSwgJywnKSArIDE7CiAgICAgICAgICAgIHZhbHVlID0gYCR7YW5pbX0sICR7dmFsdWV9YDsKICAgICAgICB9CiAgICAgICAgc2V0QW5pbWF0aW9uU3R5bGUoZWxlbWVudCwgJycsIHZhbHVlKTsKICAgICAgICByZXR1cm4gaW5kZXg7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICogQHBhcmFtIHs/fSBuYW1lCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiByZW1vdmVLZXlmcmFtZUFuaW1hdGlvbihlbGVtZW50LCBuYW1lKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGFuaW0gPSBnZXRBbmltYXRpb25TdHlsZShlbGVtZW50LCAnJyk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHRva2VucyA9IGFuaW0uc3BsaXQoJywnKTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgaW5kZXggPSBmaW5kTWF0Y2hpbmdUb2tlbkluZGV4KHRva2VucywgbmFtZSk7CiAgICAgICAgaWYgKGluZGV4ID49IDApIHsKICAgICAgICAgICAgdG9rZW5zLnNwbGljZShpbmRleCwgMSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbmV3VmFsdWUgPSB0b2tlbnMuam9pbignLCcpOwogICAgICAgICAgICBzZXRBbmltYXRpb25TdHlsZShlbGVtZW50LCAnJywgbmV3VmFsdWUpOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBmaW5kSW5kZXhGb3JBbmltYXRpb24oZWxlbWVudCwgdmFsdWUpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgYW5pbSA9IGdldEFuaW1hdGlvblN0eWxlKGVsZW1lbnQsICcnKTsKICAgICAgICBpZiAoYW5pbS5pbmRleE9mKCcsJykgPiAwKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdG9rZW5zID0gYW5pbS5zcGxpdCgnLCcpOwogICAgICAgICAgICByZXR1cm4gZmluZE1hdGNoaW5nVG9rZW5JbmRleCh0b2tlbnMsIHZhbHVlKTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGZpbmRNYXRjaGluZ1Rva2VuSW5kZXgoW2FuaW1dLCB2YWx1ZSk7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdG9rZW5zCiAgICAgKiBAcGFyYW0gez99IHNlYXJjaFRva2VuCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBmaW5kTWF0Y2hpbmdUb2tlbkluZGV4KHRva2Vucywgc2VhcmNoVG9rZW4pIHsKICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHRva2Vucy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICBpZiAodG9rZW5zW2ldLmluZGV4T2Yoc2VhcmNoVG9rZW4pID49IDApIHsKICAgICAgICAgICAgICAgIHJldHVybiBpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiAtMTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgKiBAcGFyYW0gez99IGZuCiAgICAgKiBAcGFyYW0gez99IGRvUmVtb3ZlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBhZGRSZW1vdmVBbmltYXRpb25FdmVudChlbGVtZW50LCBmbiwgZG9SZW1vdmUpIHsKICAgICAgICBkb1JlbW92ZSA/IGVsZW1lbnQucmVtb3ZlRXZlbnRMaXN0ZW5lcihBTklNQVRJT05FTkRfRVZFTlQsIGZuKSA6CiAgICAgICAgICAgIGVsZW1lbnQuYWRkRXZlbnRMaXN0ZW5lcihBTklNQVRJT05FTkRfRVZFTlQsIGZuKTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgKiBAcGFyYW0gez99IG5hbWUKICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAqIEBwYXJhbSB7Pz19IGluZGV4CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBzZXRBbmltYXRpb25TdHlsZShlbGVtZW50LCBuYW1lLCB2YWx1ZSwgaW5kZXgpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgcHJvcCA9IEFOSU1BVElPTl9QUk9QICsgbmFtZTsKICAgICAgICBpZiAoaW5kZXggIT0gbnVsbCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG9sZFZhbHVlID0gZWxlbWVudC5zdHlsZVtwcm9wXTsKICAgICAgICAgICAgaWYgKG9sZFZhbHVlLmxlbmd0aCkgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgdG9rZW5zID0gb2xkVmFsdWUuc3BsaXQoJywnKTsKICAgICAgICAgICAgICAgIHRva2Vuc1tpbmRleF0gPSB2YWx1ZTsKICAgICAgICAgICAgICAgIHZhbHVlID0gdG9rZW5zLmpvaW4oJywnKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBlbGVtZW50LnN0eWxlW3Byb3BdID0gdmFsdWU7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICogQHBhcmFtIHs/fSBuYW1lCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBnZXRBbmltYXRpb25TdHlsZShlbGVtZW50LCBuYW1lKSB7CiAgICAgICAgcmV0dXJuIGVsZW1lbnQuc3R5bGVbQU5JTUFUSU9OX1BST1AgKyBuYW1lXTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICogQHBhcmFtIHs/fSBjaGFyCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBjb3VudENoYXJzKHZhbHVlLCBjaGFyKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBjb3VudCA9IDA7CiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB2YWx1ZS5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGMgPSB2YWx1ZS5jaGFyQXQoaSk7CiAgICAgICAgICAgIGlmIChjID09PSBjaGFyKQogICAgICAgICAgICAgICAgY291bnQrKzsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGNvdW50OwogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogcGFja2FnZXMvYW5pbWF0aW9ucy9icm93c2VyL3NyYy9yZW5kZXIvY3NzX2tleWZyYW1lcy9jc3Nfa2V5ZnJhbWVzX3BsYXllci50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBERUZBVUxUX0ZJTExfTU9ERSA9ICdmb3J3YXJkcyc7CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBERUZBVUxUX0VBU0lORyA9ICdsaW5lYXInOwogICAgY2xhc3MgQ3NzS2V5ZnJhbWVzUGxheWVyIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgKiBAcGFyYW0gez99IGtleWZyYW1lcwogICAgICAgICAqIEBwYXJhbSB7P30gYW5pbWF0aW9uTmFtZQogICAgICAgICAqIEBwYXJhbSB7P30gX2R1cmF0aW9uCiAgICAgICAgICogQHBhcmFtIHs/fSBfZGVsYXkKICAgICAgICAgKiBAcGFyYW0gez99IGVhc2luZwogICAgICAgICAqIEBwYXJhbSB7P30gX2ZpbmFsU3R5bGVzCiAgICAgICAgICogQHBhcmFtIHs/PX0gX3NwZWNpYWxTdHlsZXMKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihlbGVtZW50LCBrZXlmcmFtZXMsIGFuaW1hdGlvbk5hbWUsIF9kdXJhdGlvbiwgX2RlbGF5LCBlYXNpbmcsIF9maW5hbFN0eWxlcywgX3NwZWNpYWxTdHlsZXMpIHsKICAgICAgICAgICAgdGhpcy5lbGVtZW50ID0gZWxlbWVudDsKICAgICAgICAgICAgdGhpcy5rZXlmcmFtZXMgPSBrZXlmcmFtZXM7CiAgICAgICAgICAgIHRoaXMuYW5pbWF0aW9uTmFtZSA9IGFuaW1hdGlvbk5hbWU7CiAgICAgICAgICAgIHRoaXMuX2R1cmF0aW9uID0gX2R1cmF0aW9uOwogICAgICAgICAgICB0aGlzLl9kZWxheSA9IF9kZWxheTsKICAgICAgICAgICAgdGhpcy5fZmluYWxTdHlsZXMgPSBfZmluYWxTdHlsZXM7CiAgICAgICAgICAgIHRoaXMuX3NwZWNpYWxTdHlsZXMgPSBfc3BlY2lhbFN0eWxlczsKICAgICAgICAgICAgdGhpcy5fb25Eb25lRm5zID0gW107CiAgICAgICAgICAgIHRoaXMuX29uU3RhcnRGbnMgPSBbXTsKICAgICAgICAgICAgdGhpcy5fb25EZXN0cm95Rm5zID0gW107CiAgICAgICAgICAgIHRoaXMuX3N0YXJ0ZWQgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5jdXJyZW50U25hcHNob3QgPSB7fTsKICAgICAgICAgICAgdGhpcy5fc3RhdGUgPSAwOwogICAgICAgICAgICB0aGlzLmVhc2luZyA9IGVhc2luZyB8fCBERUZBVUxUX0VBU0lORzsKICAgICAgICAgICAgdGhpcy50b3RhbFRpbWUgPSBfZHVyYXRpb24gKyBfZGVsYXk7CiAgICAgICAgICAgIHRoaXMuX2J1aWxkU3R5bGVyKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uU3RhcnQoZm4pIHsKICAgICAgICAgICAgdGhpcy5fb25TdGFydEZucy5wdXNoKGZuKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25Eb25lKGZuKSB7CiAgICAgICAgICAgIHRoaXMuX29uRG9uZUZucy5wdXNoKGZuKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25EZXN0cm95KGZuKSB7CiAgICAgICAgICAgIHRoaXMuX29uRGVzdHJveUZucy5wdXNoKGZuKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkZXN0cm95KCkgewogICAgICAgICAgICB0aGlzLmluaXQoKTsKICAgICAgICAgICAgaWYgKHRoaXMuX3N0YXRlID49IDQgLyogREVTVFJPWUVEICovKQogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB0aGlzLl9zdGF0ZSA9IDQgLyogREVTVFJPWUVEICovOwogICAgICAgICAgICB0aGlzLl9zdHlsZXIuZGVzdHJveSgpOwogICAgICAgICAgICB0aGlzLl9mbHVzaFN0YXJ0Rm5zKCk7CiAgICAgICAgICAgIHRoaXMuX2ZsdXNoRG9uZUZucygpOwogICAgICAgICAgICBpZiAodGhpcy5fc3BlY2lhbFN0eWxlcykgewogICAgICAgICAgICAgICAgdGhpcy5fc3BlY2lhbFN0eWxlcy5kZXN0cm95KCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fb25EZXN0cm95Rm5zLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGZuCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBmbiA9PiBmbigpKSk7CiAgICAgICAgICAgIHRoaXMuX29uRGVzdHJveUZucyA9IFtdOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2ZsdXNoRG9uZUZucygpIHsKICAgICAgICAgICAgdGhpcy5fb25Eb25lRm5zLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGZuCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBmbiA9PiBmbigpKSk7CiAgICAgICAgICAgIHRoaXMuX29uRG9uZUZucyA9IFtdOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2ZsdXNoU3RhcnRGbnMoKSB7CiAgICAgICAgICAgIHRoaXMuX29uU3RhcnRGbnMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGZuID0+IGZuKCkpKTsKICAgICAgICAgICAgdGhpcy5fb25TdGFydEZucyA9IFtdOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZpbmlzaCgpIHsKICAgICAgICAgICAgdGhpcy5pbml0KCk7CiAgICAgICAgICAgIGlmICh0aGlzLl9zdGF0ZSA+PSAzIC8qIEZJTklTSEVEICovKQogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB0aGlzLl9zdGF0ZSA9IDMgLyogRklOSVNIRUQgKi87CiAgICAgICAgICAgIHRoaXMuX3N0eWxlci5maW5pc2goKTsKICAgICAgICAgICAgdGhpcy5fZmx1c2hTdGFydEZucygpOwogICAgICAgICAgICBpZiAodGhpcy5fc3BlY2lhbFN0eWxlcykgewogICAgICAgICAgICAgICAgdGhpcy5fc3BlY2lhbFN0eWxlcy5maW5pc2goKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9mbHVzaERvbmVGbnMoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0UG9zaXRpb24odmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5fc3R5bGVyLnNldFBvc2l0aW9uKHZhbHVlKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXRQb3NpdGlvbigpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3N0eWxlci5nZXRQb3NpdGlvbigpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGhhc1N0YXJ0ZWQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9zdGF0ZSA+PSAyIC8qIFNUQVJURUQgKi87CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgaW5pdCgpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX3N0YXRlID49IDEgLyogSU5JVElBTElaRUQgKi8pCiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIHRoaXMuX3N0YXRlID0gMSAvKiBJTklUSUFMSVpFRCAqLzsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBlbG0gPSB0aGlzLmVsZW1lbnQ7CiAgICAgICAgICAgIHRoaXMuX3N0eWxlci5hcHBseSgpOwogICAgICAgICAgICBpZiAodGhpcy5fZGVsYXkpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3N0eWxlci5wYXVzZSgpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcGxheSgpIHsKICAgICAgICAgICAgdGhpcy5pbml0KCk7CiAgICAgICAgICAgIGlmICghdGhpcy5oYXNTdGFydGVkKCkpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2ZsdXNoU3RhcnRGbnMoKTsKICAgICAgICAgICAgICAgIHRoaXMuX3N0YXRlID0gMiAvKiBTVEFSVEVEICovOwogICAgICAgICAgICAgICAgaWYgKHRoaXMuX3NwZWNpYWxTdHlsZXMpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9zcGVjaWFsU3R5bGVzLnN0YXJ0KCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fc3R5bGVyLnJlc3VtZSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHBhdXNlKCkgewogICAgICAgICAgICB0aGlzLmluaXQoKTsKICAgICAgICAgICAgdGhpcy5fc3R5bGVyLnBhdXNlKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVzdGFydCgpIHsKICAgICAgICAgICAgdGhpcy5yZXNldCgpOwogICAgICAgICAgICB0aGlzLnBsYXkoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZXNldCgpIHsKICAgICAgICAgICAgdGhpcy5fc3R5bGVyLmRlc3Ryb3koKTsKICAgICAgICAgICAgdGhpcy5fYnVpbGRTdHlsZXIoKTsKICAgICAgICAgICAgdGhpcy5fc3R5bGVyLmFwcGx5KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfYnVpbGRTdHlsZXIoKSB7CiAgICAgICAgICAgIHRoaXMuX3N0eWxlciA9IG5ldyBFbGVtZW50QW5pbWF0aW9uU3R5bGVIYW5kbGVyKHRoaXMuZWxlbWVudCwgdGhpcy5hbmltYXRpb25OYW1lLCB0aGlzLl9kdXJhdGlvbiwgdGhpcy5fZGVsYXksIHRoaXMuZWFzaW5nLCBERUZBVUxUX0ZJTExfTU9ERSwgKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gdGhpcy5maW5pc2goKSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICogQHBhcmFtIHs/fSBwaGFzZU5hbWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHRyaWdnZXJDYWxsYmFjayhwaGFzZU5hbWUpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBtZXRob2RzID0gcGhhc2VOYW1lID09ICdzdGFydCcgPyB0aGlzLl9vblN0YXJ0Rm5zIDogdGhpcy5fb25Eb25lRm5zOwogICAgICAgICAgICBtZXRob2RzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGZuCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBmbiA9PiBmbigpKSk7CiAgICAgICAgICAgIG1ldGhvZHMubGVuZ3RoID0gMDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBiZWZvcmVEZXN0cm95KCkgewogICAgICAgICAgICB0aGlzLmluaXQoKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBzdHlsZXMgPSB7fTsKICAgICAgICAgICAgaWYgKHRoaXMuaGFzU3RhcnRlZCgpKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBmaW5pc2hlZCA9IHRoaXMuX3N0YXRlID49IDMgLyogRklOSVNIRUQgKi87CiAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyh0aGlzLl9maW5hbFN0eWxlcykuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHByb3AKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIHByb3AgPT4gewogICAgICAgICAgICAgICAgICAgIGlmIChwcm9wICE9ICdvZmZzZXQnKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHN0eWxlc1twcm9wXSA9IGZpbmlzaGVkID8gdGhpcy5fZmluYWxTdHlsZXNbcHJvcF0gOiBjb21wdXRlU3R5bGUodGhpcy5lbGVtZW50LCBwcm9wKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5jdXJyZW50U25hcHNob3QgPSBzdHlsZXM7CiAgICAgICAgfQogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogcGFja2FnZXMvYW5pbWF0aW9ucy9icm93c2VyL3NyYy9yZW5kZXIvY3NzX2tleWZyYW1lcy9kaXJlY3Rfc3R5bGVfcGxheWVyLnRzCiAgICAgKiBAc3VwcHJlc3Mge2NoZWNrVHlwZXMsY29uc3RhbnRQcm9wZXJ0eSxleHRyYVJlcXVpcmUsbWlzc2luZ092ZXJyaWRlLG1pc3NpbmdSZXR1cm4sdW51c2VkUHJpdmF0ZU1lbWJlcnMsdXNlbGVzc0NvZGV9IGNoZWNrZWQgYnkgdHNjCiAgICAgKi8KICAgIGNsYXNzIERpcmVjdFN0eWxlUGxheWVyIGV4dGVuZHMgTm9vcEFuaW1hdGlvblBsYXllciB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgICAgICogQHBhcmFtIHs/fSBzdHlsZXMKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihlbGVtZW50LCBzdHlsZXMpIHsKICAgICAgICAgICAgc3VwZXIoKTsKICAgICAgICAgICAgdGhpcy5lbGVtZW50ID0gZWxlbWVudDsKICAgICAgICAgICAgdGhpcy5fc3RhcnRpbmdTdHlsZXMgPSB7fTsKICAgICAgICAgICAgdGhpcy5fX2luaXRpYWxpemVkID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuX3N0eWxlcyA9IGh5cGVuYXRlUHJvcHNPYmplY3Qoc3R5bGVzKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBpbml0KCkgewogICAgICAgICAgICBpZiAodGhpcy5fX2luaXRpYWxpemVkIHx8ICF0aGlzLl9zdGFydGluZ1N0eWxlcykKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgdGhpcy5fX2luaXRpYWxpemVkID0gdHJ1ZTsKICAgICAgICAgICAgT2JqZWN0LmtleXModGhpcy5fc3R5bGVzKS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwcm9wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBwcm9wID0+IHsKICAgICAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovICh0aGlzLl9zdGFydGluZ1N0eWxlcykpW3Byb3BdID0gdGhpcy5lbGVtZW50LnN0eWxlW3Byb3BdOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIHN1cGVyLmluaXQoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBwbGF5KCkgewogICAgICAgICAgICBpZiAoIXRoaXMuX3N0YXJ0aW5nU3R5bGVzKQogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB0aGlzLmluaXQoKTsKICAgICAgICAgICAgT2JqZWN0LmtleXModGhpcy5fc3R5bGVzKQogICAgICAgICAgICAgICAgLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHByb3AKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHByb3AgPT4gdGhpcy5lbGVtZW50LnN0eWxlLnNldFByb3BlcnR5KHByb3AsIHRoaXMuX3N0eWxlc1twcm9wXSkpKTsKICAgICAgICAgICAgc3VwZXIucGxheSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGRlc3Ryb3koKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5fc3RhcnRpbmdTdHlsZXMpCiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIE9iamVjdC5rZXlzKHRoaXMuX3N0YXJ0aW5nU3R5bGVzKS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwcm9wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBwcm9wID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHZhbHVlID0gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX3N0YXJ0aW5nU3R5bGVzKSlbcHJvcF07CiAgICAgICAgICAgICAgICBpZiAodmFsdWUpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLmVsZW1lbnQuc3R5bGUuc2V0UHJvcGVydHkocHJvcCwgdmFsdWUpOwogICAgICAgICAgICAgICAgf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Byb3AKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHZhbGlkYXRlU3R5bGVQcm9wZXJ0eShwcm9wKSB7CiAgICAgICAgICAgIHJldHVybiB2YWxpZGF0ZVN0eWxlUHJvcGVydHkocHJvcCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAqIEBwYXJhbSB7P30gc2VsZWN0b3IKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG1hdGNoZXNFbGVtZW50KGVsZW1lbnQsIHNlbGVjdG9yKSB7CiAgICAgICAgICAgIHJldHVybiBtYXRjaGVzRWxlbWVudChlbGVtZW50LCBzZWxlY3Rvcik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZWxtMQogICAgICAgICAqIEBwYXJhbSB7P30gZWxtMgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgY29udGFpbnNFbGVtZW50KGVsbTEsIGVsbTIpIHsKICAgICAgICAgICAgcmV0dXJuIGNvbnRhaW5zRWxlbWVudChlbG0xLCBlbG0yKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgICAgICogQHBhcmFtIHs/fSBzZWxlY3RvcgogICAgICAgICAqIEBwYXJhbSB7P30gbXVsdGkKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHF1ZXJ5KGVsZW1lbnQsIHNlbGVjdG9yLCBtdWx0aSkgewogICAgICAgICAgICByZXR1cm4gaW52b2tlUXVlcnkoZWxlbWVudCwgc2VsZWN0b3IsIG11bHRpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgICAgICogQHBhcmFtIHs/fSBwcm9wCiAgICAgICAgICogQHBhcmFtIHs/PX0gZGVmYXVsdFZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBjb21wdXRlU3R5bGUoZWxlbWVudCwgcHJvcCwgZGVmYXVsdFZhbHVlKSB7CiAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAoKCgvKiogQHR5cGUgez99ICovICh3aW5kb3cuZ2V0Q29tcHV0ZWRTdHlsZShlbGVtZW50KSkpKVtwcm9wXSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgKiBAcGFyYW0gez99IG5hbWUKICAgICAgICAgKiBAcGFyYW0gez99IGtleWZyYW1lcwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYnVpbGRLZXlmcmFtZUVsZW1lbnQoZWxlbWVudCwgbmFtZSwga2V5ZnJhbWVzKSB7CiAgICAgICAgICAgIGtleWZyYW1lcyA9IGtleWZyYW1lcy5tYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGtmCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBrZiA9PiBoeXBlbmF0ZVByb3BzT2JqZWN0KGtmKSkpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBrZXlmcmFtZVN0ciA9IGBAa2V5ZnJhbWVzICR7bmFtZX0ge1xuYDsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgdGFiID0gJyc7CiAgICAgICAgICAgIGtleWZyYW1lcy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBrZgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAga2YgPT4gewogICAgICAgICAgICAgICAgdGFiID0gVEFCX1NQQUNFOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2V0ID0gcGFyc2VGbG9hdChrZlsnb2Zmc2V0J10pOwogICAgICAgICAgICAgICAga2V5ZnJhbWVTdHIgKz0gYCR7dGFifSR7b2Zmc2V0ICogMTAwfSUge1xuYDsKICAgICAgICAgICAgICAgIHRhYiArPSBUQUJfU1BBQ0U7CiAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyhrZikuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHByb3AKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIHByb3AgPT4gewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCB2YWx1ZSA9IGtmW3Byb3BdOwogICAgICAgICAgICAgICAgICAgIHN3aXRjaCAocHJvcCkgewogICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdvZmZzZXQnOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdlYXNpbmcnOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHZhbHVlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5ZnJhbWVTdHIgKz0gYCR7dGFifWFuaW1hdGlvbi10aW1pbmctZnVuY3Rpb246ICR7dmFsdWV9O1xuYDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleWZyYW1lU3RyICs9IGAke3RhYn0ke3Byb3B9OiAke3ZhbHVlfTtcbmA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAga2V5ZnJhbWVTdHIgKz0gYCR7dGFifX1cbmA7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAga2V5ZnJhbWVTdHIgKz0gYH1cbmA7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qga2ZFbG0gPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdzdHlsZScpOwogICAgICAgICAgICBrZkVsbS5pbm5lckhUTUwgPSBrZXlmcmFtZVN0cjsKICAgICAgICAgICAgcmV0dXJuIGtmRWxtOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgKiBAcGFyYW0gez99IGtleWZyYW1lcwogICAgICAgICAqIEBwYXJhbSB7P30gZHVyYXRpb24KICAgICAgICAgKiBAcGFyYW0gez99IGRlbGF5CiAgICAgICAgICogQHBhcmFtIHs/fSBlYXNpbmcKICAgICAgICAgKiBAcGFyYW0gez89fSBwcmV2aW91c1BsYXllcnMKICAgICAgICAgKiBAcGFyYW0gez89fSBzY3J1YmJlckFjY2Vzc1JlcXVlc3RlZAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYW5pbWF0ZShlbGVtZW50LCBrZXlmcmFtZXMsIGR1cmF0aW9uLCBkZWxheSwgZWFzaW5nLCBwcmV2aW91c1BsYXllcnMgPSBbXSwgc2NydWJiZXJBY2Nlc3NSZXF1ZXN0ZWQpIHsKICAgICAgICAgICAgaWYgKHNjcnViYmVyQWNjZXNzUmVxdWVzdGVkKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9ub3RpZnlGYXVsdHlTY3J1YmJlcigpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcHJldmlvdXNDc3NLZXlmcmFtZVBsYXllcnMgPSAoLyoqIEB0eXBlIHs/fSAqLyAocHJldmlvdXNQbGF5ZXJzLmZpbHRlcigoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcGxheWVyCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBwbGF5ZXIgPT4gcGxheWVyIGluc3RhbmNlb2YgQ3NzS2V5ZnJhbWVzUGxheWVyKSkpKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwcmV2aW91c1N0eWxlcyA9IHt9OwogICAgICAgICAgICBpZiAoYWxsb3dQcmV2aW91c1BsYXllclN0eWxlc01lcmdlKGR1cmF0aW9uLCBkZWxheSkpIHsKICAgICAgICAgICAgICAgIHByZXZpb3VzQ3NzS2V5ZnJhbWVQbGF5ZXJzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwbGF5ZXIKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIHBsYXllciA9PiB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGxldCBzdHlsZXMgPSBwbGF5ZXIuY3VycmVudFNuYXBzaG90OwogICAgICAgICAgICAgICAgICAgIE9iamVjdC5rZXlzKHN0eWxlcykuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwcm9wCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICBwcm9wID0+IHByZXZpb3VzU3R5bGVzW3Byb3BdID0gc3R5bGVzW3Byb3BdKSk7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAga2V5ZnJhbWVzID0gYmFsY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WxsLicpOwogICAgICAgICAgICAgICAgdGhpcy5fd2FybmluZ0lzc3VlZCA9IHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30ga2V5ZnJhbWVzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBmbGF0dGVuS2V5ZnJhbWVzSW50b1N0eWxlcyhrZXlmcmFtZXMpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IGZsYXRLZXlmcmFtZXMgPSB7fTsKICAgICAgICBpZiAoa2V5ZnJhbWVzKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qga2ZzID0gQXJyYXkuaXNBcnJheShrZXlmcmFtZXMpID8ga2V5ZnJhbWVzIDogW2tleWZyYW1lc107CiAgICAgICAgICAgIGtmcy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBrZgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAga2YgPT4gewogICAgICAgICAgICAgICAgT2JqZWN0LmtleXMoa2YpLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwcm9wCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBwcm9wID0+IHsKICAgICAgICAgICAgICAgICAgICBpZiAocHJvcCA9PSAnb2Zmc2V0JyB8fCBwcm9wID09ICdlYXNpbmcnKQogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgZmxhdEtleWZyYW1lc1twcm9wXSA9IGtmW3Byb3BdOwogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIHJldHVybiBmbGF0S2V5ZnJhbWVzOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IG5vZGUKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHJlbW92ZUVsZW1lbnQobm9kZSkgewogICAgICAgIG5vZGUucGFyZW50Tm9kZS5yZW1vdmVDaGlsZChub2RlKTsKICAgIH0KCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcgYWRkZWQgYnkgdHNpY2tsZQogICAgICogR2VuZXJhdGVkIGZyb206IHBhY2thZ2VzL2FuaW1hdGlvbnMvYnJvd3Nlci9zcmMvcmVuZGVyL3dlYl9hbmltYXRpb25zL3dlYl9hbmltYXRpb25zX3BsYXllci50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICBjbGFzcyBXZWJBbmltYXRpb25zUGxheWVyIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgKiBAcGFyYW0gez99IGtleWZyYW1lcwogICAgICAgICAqIEBwYXJhbSB7P30gb3B0aW9ucwogICAgICAgICAqIEBwYXJhbSB7Pz19IF9zcGVjaWFsU3R5bGVzCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoZWxlbWVudCwga2V5ZnJhbWVzLCBvcHRpb25zLCBfc3BlY2lhbFN0eWxlcykgewogICAgICAgICAgICB0aGlzLmVsZW1lbnQgPSBlbGVtZW50OwogICAgICAgICAgICB0aGlzLmtleWZyYW1lcyA9IGtleWZyYW1lczsKICAgICAgICAgICAgdGhpcy5vcHRpb25zID0gb3B0aW9uczsKICAgICAgICAgICAgdGhpcy5fc3BlY2lhbFN0eWxlcyA9IF9zcGVjaWFsU3R5bGVzOwogICAgICAgICAgICB0aGlzLl9vbkRvbmVGbnMgPSBbXTsKICAgICAgICAgICAgdGhpcy5fb25TdGFydEZucyA9IFtdOwogICAgICAgICAgICB0aGlzLl9vbkRlc3Ryb3lGbnMgPSBbXTsKICAgICAgICAgICAgdGhpcy5faW5pdGlhbGl6ZWQgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5fZmluaXNoZWQgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5fc3RhcnRlZCA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLl9kZXN0cm95ZWQgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy50aW1lID0gMDsKICAgICAgICAgICAgdGhpcy5wYXJlbnRQbGF5ZXIgPSBudWxsOwogICAgICAgICAgICB0aGlzLmN1cnJlbnRTbmFwc2hvdCA9IHt9OwogICAgICAgICAgICB0aGlzLl9kdXJhdGlvbiA9ICgvKiogQHR5cGUgez99ICovIChvcHRpb25zWydkdXJhdGlvbiddKSk7CiAgICAgICAgICAgIHRoaXMuX2RlbGF5ID0gKC8qKiBAdHlwZSB7P30gKi8gKG9wdGlvbnNbJ2RlbGF5J10pKSB8fCAwOwogICAgICAgICAgICB0aGlzLnRpbWUgPSB0aGlzLl9kdXJhdGlvbiArIHRoaXMuX2RlbGF5OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX29uRmluaXNoKCkgewogICAgICAgICAgICBpZiAoIXRoaXMuX2ZpbmlzaGVkKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9maW5pc2hlZCA9IHRydWU7CiAgICAgICAgICAgICAgICB0aGlzLl9vbkRvbmVGbnMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGZuCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBmbiA9PiBmbigpKSk7CiAgICAgICAgICAgICAgICB0aGlzLl9vbkRvbmVGbnMgPSBbXTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGluaXQoKSB7CiAgICAgICAgICAgIHRoaXMuX2J1aWxkUGxheWVyKCk7CiAgICAgICAgICAgIHRoaXMuX3ByZXBhcmVQbGF5ZXJCZWZvcmVTdGFydCgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2J1aWxkUGxheWVyKCkgewogICAgICAgICAgICBpZiAodGhpcy5faW5pdGlhbGl6ZWQpCiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIHRoaXMuX2luaXRpYWxpemVkID0gdHJ1ZTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBrZXlmcmFtZXMgPSB0aGlzLmtleWZyYW1lczsKICAgICAgICAgICAgKCgvKiogQHR5cGUgez99ICovICh0aGlzKSkpLmRvbVBsYXllciA9CiAgICAgICAgICAgICAgICB0aGlzLl90cmlnZ2VyV2ViQW5pbWF0aW9uKHRoaXMuZWxlbWVudCwga2V5ZnJhbWVzLCB0aGlzLm9wdGlvbnMpOwogICAgICAgICAgICB0aGlzLl9maW5hbEtleWZyYW1lID0ga2V5ZnJhbWVzLmxlbmd0aCA/IGtleWZyYW1lc1trZXlmcmFtZXMubGVuZ3RoIC0gMV0gOiB7fTsKICAgICAgICAgICAgdGhpcy5kb21QbGF5ZXIuYWRkRXZlbnRMaXN0ZW5lcignZmluaXNoJywgKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gdGhpcy5fb25GaW5pc2goKSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3ByZXBhcmVQbGF5ZXJCZWZvcmVTdGFydCgpIHsKICAgICAgICAgICAgLy8gdGhpcyBpcyByZXF1aXJlZCBzbyB0aGF0IHRoZSBwbGF5ZXIgZG9lc24ndCBzdGFydCB0byBhbmltYXRlIHJpZ2h0IGF3YXkKICAgICAgICAgICAgaWYgKHRoaXMuX2RlbGF5KSB7CiAgICAgICAgICAgICAgICB0aGlzLl9yZXNldERvbVBsYXllclN0YXRlKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLmRvbVBsYXllci5wYXVzZSgpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgKiBAcGFyYW0gez99IGtleWZyYW1lcwogICAgICAgICAqIEBwYXJhbSB7P30gb3B0aW9ucwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3RyaWdnZXJXZWJBbmltYXRpb24oZWxlbWVudCwga2V5ZnJhbWVzLCBvcHRpb25zKSB7CiAgICAgICAgICAgIC8vIGpzY29tcGlsZXIgZG9lc24ndCBzZWVtIHRvIGtub3cgYW5pbWF0ZSBpcyBhIG5hdGl2ZSBwcm9wZXJ0eSBiZWNhdXNlIGl0J3Mgbm90IGZ1bGx5CiAgICAgICAgICAgIC8vIHN1cHBvcnRlZCB5ZXQgYWNyb3NzIGNvbW1vbiBicm93c2VycyAod2UgcG9seWZpbGwgaXQgZm9yIEVkZ2UvU2FmYXJpKSBbQ0wgIzE0MzYzMDkyOV0KICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovIChlbGVtZW50WydhbmltYXRlJ10oa2V5ZnJhbWVzLCBvcHRpb25zKSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGZuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvblN0YXJ0KGZuKSB7CiAgICAgICAgICAgIHRoaXMuX29uU3RhcnRGbnMucHVzaChmbik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uRG9uZShmbikgewogICAgICAgICAgICB0aGlzLl9vbkRvbmVGbnMucHVzaChmbik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uRGVzdHJveShmbikgewogICAgICAgICAgICB0aGlzLl9vbkRlc3Ryb3lGbnMucHVzaChmbik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcGxheSgpIHsKICAgICAgICAgICAgdGhpcy5fYnVpbGRQbGF5ZXIoKTsKICAgICAgICAgICAgaWYgKCF0aGlzLmhhc1N0YXJ0ZWQoKSkgewogICAgICAgICAgICAgICAgdGhpcy5fb25TdGFydEZucy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIGZuID0+IGZuKCkpKTsKICAgICAgICAgICAgICAgIHRoaXMuX29uU3RhcnRGbnMgPSBbXTsKICAgICAgICAgICAgICAgIHRoaXMuX3N0YXJ0ZWQgPSB0cnVlOwogICAgICAgICAgICAgICAgaWYgKHRoaXMuX3NwZWNpYWxTdHlsZXMpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9zcGVjaWFsU3R5bGVzLnN0YXJ0KCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5kb21QbGF5ZXIucGxheSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHBhdXNlKCkgewogICAgICAgICAgICB0aGlzLmluaXQoKTsKICAgICAgICAgICAgdGhpcy5kb21QbGF5ZXIucGF1c2UoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmaW5pc2goKSB7CiAgICAgICAgICAgIHRoaXMuaW5pdCgpOwogICAgICAgICAgICBpZiAodGhpcy5fc3BlY2lhbFN0eWxlcykgewogICAgICAgICAgICAgICAgdGhpcy5fc3BlY2lhbFN0eWxlcy5maW5pc2goKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9vbkZpbmlzaCgpOwogICAgICAgICAgICB0aGlzLmRvbVBsYXllci5maW5pc2goKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZXNldCgpIHsKICAgICAgICAgICAgdGhpcy5fcmVzZXREb21QbGF5ZXJTdGF0ZSgpOwogICAgICAgICAgICB0aGlzLl9kZXN0cm95ZWQgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5fZmluaXNoZWQgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5fc3RhcnRlZCA9IGZhbHNlOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3Jlc2V0RG9tUGxheWVyU3RhdGUoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmRvbVBsYXllcikgewogICAgICAgICAgICAgICAgdGhpcy5kb21QbGF5ZXIuY2FuY2VsKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZXN0YXJ0KCkgewogICAgICAgICAgICB0aGlzLnJlc2V0KCk7CiAgICAgICAgICAgIHRoaXMucGxheSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGhhc1N0YXJ0ZWQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9zdGFydGVkOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGRlc3Ryb3koKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5fZGVzdHJveWVkKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9kZXN0cm95ZWQgPSB0cnVlOwogICAgICAgICAgICAgICAgdGhpcy5fcmVzZXREb21QbGF5ZXJTdGF0ZSgpOwogICAgICAgICAgICAgICAgdGhpcy5fb25GaW5pc2goKTsKICAgICAgICAgICAgICAgIGlmICh0aGlzLl9zcGVjaWFsU3R5bGVzKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fc3BlY2lhbFN0eWxlcy5kZXN0cm95KCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLl9vbkRlc3Ryb3lGbnMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGZuCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBmbiA9PiBmbigpKSk7CiAgICAgICAgICAgICAgICB0aGlzLl9vbkRlc3Ryb3lGbnMgPSBbXTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHAKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldFBvc2l0aW9uKHApIHsKICAgICAgICAgICAgdGhpcy5kb21QbGF5ZXIuY3VycmVudFRpbWUgPSBwICogdGhpcy50aW1lOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldFBvc2l0aW9uKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5kb21QbGF5ZXIuY3VycmVudFRpbWUgLyB0aGlzLnRpbWU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHRvdGFsVGltZSgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2RlbGF5ICsgdGhpcy5fZHVyYXRpb247CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYmVmb3JlRGVzdHJveSgpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBzdHlsZXMgPSB7fTsKICAgICAgICAgICAgaWYgKHRoaXMuaGFzU3RhcnRlZCgpKSB7CiAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyh0aGlzLl9maW5hbEtleWZyYW1lKS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcHJvcAogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgcHJvcCA9PiB7CiAgICAgICAgICAgICAgICAgICAgaWYgKHByb3AgIT0gJ29mZnNldCcpIHsKICAgICAgICAgICAgICAgICAgICAgICAgc3R5bGVzW3Byb3BdID0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2ZpbmlzaGVkID8gdGhpcy5fZmluYWxLZXlmcmFtZVtwcm9wXSA6IGNvbXB1dGVTdHlsZSh0aGlzLmVsZW1lbnQsIHByb3ApOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLmN1cnJlbnRTbmFwc2hvdCA9IHN0eWxlczsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7P30gcGhhc2VOYW1lCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB0cmlnZ2VyQ2FsbGJhY2socGhhc2VOYW1lKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbWV0aG9kcyA9IHBoYXNlTmFtZSA9PSAnc3RhcnQnID8gdGhpcy5fb25TdGFydEZucyA6IHRoaXMuX29uRG9uZUZuczsKICAgICAgICAgICAgbWV0aG9kcy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZm4gPT4gZm4oKSkpOwogICAgICAgICAgICBtZXRob2RzLmxlbmd0aCA9IDA7CiAgICAgICAgfQogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogcGFja2FnZXMvYW5pbWF0aW9ucy9icm93c2VyL3NyYy9yZW5kZXIvd2ViX2FuaW1hdGlvbnMvd2ViX2FuaW1hdGlvbnNfZHJpdmVyLnRzCiAgICAgKiBAc3VwcHJlc3Mge2NoZWNrVHlwZXMsY29uc3RhbnRQcm9wZXJ0eSxleHRyYVJlcXVpcmUsbWlzc2luZ092ZXJyaWRlLG1pc3NpbmdSZXR1cm4sdW51c2VkUHJpdmF0ZU1lbWJlcnMsdXNlbGVzc0NvZGV9IGNoZWNrZWQgYnkgdHNjCiAgICAgKi8KICAgIGNsYXNzIFdlYkFuaW1hdGlvbnNEcml2ZXIgewogICAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgICAgICB0aGlzLl9pc05hdGl2ZUltcGwgPSAvXHtccypcW25hdGl2ZVxzK2NvZGVcXVxzKlx9Ly50ZXN0KGdldEVsZW1lbnRBbmltYXRlRm4oKS50b1N0cmluZygpKTsKICAgICAgICAgICAgdGhpcy5fY3NzS2V5ZnJhbWVzRHJpdmVyID0gbmV3IENzc0tleWZyYW1lc0RyaXZlcigpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHByb3AKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHZhbGlkYXRlU3R5bGVQcm9wZXJ0eShwcm9wKSB7CiAgICAgICAgICAgIHJldHVybiB2YWxpZGF0ZVN0eWxlUHJvcGVydHkocHJvcCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAqIEBwYXJhbSB7P30gc2VsZWN0b3IKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG1hdGNoZXNFbGVtZW50KGVsZW1lbnQsIHNlbGVjdG9yKSB7CiAgICAgICAgICAgIHJldHVybiBtYXRjaGVzRWxlbWVudChlbGVtZW50LCBzZWxlY3Rvcik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZWxtMQogICAgICAgICAqIEBwYXJhbSB7P30gZWxtMgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgY29udGFpbnNFbGVtZW50KGVsbTEsIGVsbTIpIHsKICAgICAgICAgICAgcmV0dXJuIGNvbnRhaW5zRWxlbWVudChlbG0xLCBlbG0yKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgICAgICogQHBhcmFtIHs/fSBzZWxlY3RvcgogICAgICAgICAqIEBwYXJhbSB7P30gbXVsdGkKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHF1ZXJ5KGVsZW1lbnQsIHNlbGVjdG9yLCBtdWx0aSkgewogICAgICAgICAgICByZXR1cm4gaW52b2tlUXVlcnkoZWxlbWVudCwgc2VsZWN0b3IsIG11bHRpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgICAgICogQHBhcmFtIHs/fSBwcm9wCiAgICAgICAgICogQHBhcmFtIHs/PX0gZGVmYXVsdFZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBjb21wdXRlU3R5bGUoZWxlbWVudCwgcHJvcCwgZGVmYXVsdFZhbHVlKSB7CiAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAoKCgvKiogQHR5cGUgez99ICovICh3aW5kb3cuZ2V0Q29tcHV0ZWRTdHlsZShlbGVtZW50KSkpKVtwcm9wXSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHN1cHBvcnRlZAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb3ZlcnJpZGVXZWJBbmltYXRpb25zU3VwcG9ydChzdXBwb3J0ZWQpIHsKICAgICAgICAgICAgdGhpcy5faXNOYXRpdmVJbXBsID0gc3VwcG9ydGVkOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgKiBAcGFyYW0gez99IGtleWZyYW1lcwogICAgICAgICAqIEBwYXJhbSB7P30gZHVyYXRpb24KICAgICAgICAgKiBAcGFyYW0gez99IGRlbGF5CiAgICAgICAgICogQHBhcmFtIHs/fSBlYXNpbmcKICAgICAgICAgKiBAcGFyYW0gez89fSBwcmV2aW91c1BsYXllcnMKICAgICAgICAgKiBAcGFyYW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gIHBsYXllck9wdGlvbnNbJ2Vhc2luZyddID0gZWFzaW5nOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcHJldmlvdXNTdHlsZXMgPSB7fTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwcmV2aW91c1dlYkFuaW1hdGlvblBsYXllcnMgPSAoLyoqIEB0eXBlIHs/fSAqLyAocHJldmlvdXNQbGF5ZXJzLmZpbHRlcigoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcGxheWVyCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBwbGF5ZXIgPT4gcGxheWVyIGluc3RhbmNlb2YgV2ViQW5pbWF0aW9uc1BsYXllcikpKSk7CiAgICAgICAgICAgIGlmIChhbGxvd1ByZXZpb3VzUGxheWVyU3R5bGVzTWVyZ2UoZHVyYXRpb24sIGRlbGF5KSkgewogICAgICAgICAgICAgICAgcHJldmlvdXNXZWJBbmltYXRpb25QbGF5ZXJzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwbGF5ZXIKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIHBsYXllciA9PiB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGxldCBzdHlsZXMgPSBwbGF5ZXIuY3VycmVudFNuYXBzaG90OwogICAgICAgICAgICAgICAgICAgIE9iamVjdC5rZXlzKHN0eWxlcykuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwcm9wCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICBwcm9wID0+IHByZXZpb3VzU3R5bGVzW3Byb3BdID0gc3R5bGVzW3Byb3BdKSk7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAga2V5ZnJhbWVzID0ga2V5ZnJhbWVzLm1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gc3R5bGVzCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBzdHlsZXMgPT4gY29weVN0eWxlcyhzdHlsZXMsIGZhbHNlKSkpOwogICAgICAgICAgICBrZXlmcmFtZXMgPSBiYWxhbmNlUHJldmlvdXNTdHlsZXNJbnRvS2V5ZnJhbWVzKGVsZW1lbnQsIGtleWZyYW1lcywgcHJldmlvdXNTdHlsZXMpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHNwZWNpYWxTdHlsZXMgPSBwYWNrYWdlTm9uQW5pbWF0YWJsZVN0eWxlcyhlbGVtZW50LCBrZXlmcmFtZXMpOwogICAgICAgICAgICByZXR1cm4gbmV3IFdlYkFuaW1hdGlvbnNQbGF5ZXIoZWxlbWVudCwga2V5ZnJhbWVzLCBwbGF5ZXJPcHRpb25zLCBzcGVjaWFsU3R5bGVzKTsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHN1cHBvcnRzV2ViQW5pbWF0aW9ucygpIHsKICAgICAgICByZXR1cm4gdHlwZW9mIGdldEVsZW1lbnRBbmltYXRlRm4oKSA9PT0gJ2Z1bmN0aW9uJzsKICAgIH0KICAgIC8qKgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0RWxlbWVudEFuaW1hdGVGbigpIHsKICAgICAgICByZXR1cm4gKGlzQnJvd3NlcigpICYmICgoLyoqIEB0eXBlIHs/fSAqLyAoRWxlbWVudCkpKS5wcm90b3R5cGVbJ2FuaW1hdGUnXSkgfHwge307CiAgICB9CgogICAgLyoqCiAgICAgKiBAbGljZW5zZSBBbmd1bGFyIHY5LjEuMTIKICAgICAqIChjKSAyMDEwLTIwMjAgR29vZ2xlIExMQy4gaHR0cHM6Ly9hbmd1bGFyLmlvLwogICAgICogTGljZW5zZTogTUlUCiAgICAgKi8KICAgIGNsYXNzIEJyb3dzZXJBbmltYXRpb25CdWlsZGVyIGV4dGVuZHMgQW5pbWF0aW9uQnVpbGRlciB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSByb290UmVuZGVyZXIKICAgICAgICAgKiBAcGFyYW0gez99IGRvYwogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKHJvb3RSZW5kZXJlciwgZG9jKSB7CiAgICAgICAgICAgIHN1cGVyKCk7CiAgICAgICAgICAgIHRoaXMuX25leHRBbmltYXRpb25JZCA9IDA7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdHlwZURhdGEgPSAoLyoqIEB0eXBlIHs/fSAqLyAoeyBpZDogJzAnLCBlbmNhcHN1bGF0aW9uOiBWaWV3RW5jYXBzdWxhdGlvbiQxLk5vbmUsIHN0eWxlczogW10sIGRhdGE6IHsgYW5pbWF0aW9uOiBbXSB9IH0pKTsKICAgICAgICAgICAgdGhpcy5fcmVuZGVyZXIgPSAoLyoqIEB0eXBlIHs/fSAqLyAocm9vdFJlbmRlcmVyLmNyZWF0ZVJlbmRlcmVyKGRvYy5ib2R5LCB0eXBlRGF0YSkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBhbmltYXRpb24KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGJ1aWxkKGFuaW1hdGlvbikgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGlkID0gdGhpcy5fbmV4dE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amVjdCwgYXJnczogW0RPQ1VNRU5UJDEsXSB9XSB9CiAgICBdOwogICAgY2xhc3MgQnJvd3NlckFuaW1hdGlvbkZhY3RvcnkgZXh0ZW5kcyBBbmltYXRpb25GYWN0b3J5IHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IF9pZAogICAgICAgICAqIEBwYXJhbSB7P30gX3JlbmRlcmVyCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoX2lkLCBfcmVuZGVyZXIpIHsKICAgICAgICAgICAgc3VwZXIoKTsKICAgICAgICAgICAgdGhpcy5faWQgPSBfaWQ7CiAgICAgICAgICAgIHRoaXMuX3JlbmRlcmVyID0gX3JlbmRlcmVyOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgKiBAcGFyYW0gez89fSBvcHRpb25zCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBjcmVhdGUoZWxlbWVudCwgb3B0aW9ucykgewogICAgICAgICAgICByZXR1cm4gbmV3IFJlbmRlcmVyQW5pbWF0aW9uUGxheWVyKHRoaXMuX2lkLCBlbGVtZW50LCBvcHRpb25zIHx8IHt9LCB0aGlzLl9yZW5kZXJlcik7CiAgICAgICAgfQogICAgfQogICAgY2xhc3MgUmVuZGVyZXJBbmltYXRpb25QbGF5ZXIgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gaWQKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgKiBAcGFyYW0gez99IG9wdGlvbnMKICAgICAgICAgKiBAcGFyYW0gez99IF9yZW5kZXJlcgogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKGlkLCBlbGVtZW50LCBvcHRpb25zLCBfcmVuZGVyZXIpIHsKICAgICAgICAgICAgdGhpcy5pZCA9IGlkOwogICAgICAgICAgICB0aGlzLmVsZW1lbnQgPSBlbGVtZW50OwogICAgICAgICAgICB0aGlzLl9yZW5kZXJlciA9IF9yZW5kZXJlcjsKICAgICAgICAgICAgdGhpcy5wYXJlbnRQbGF5ZXIgPSBudWxsOwogICAgICAgICAgICB0aGlzLl9zdGFydGVkID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMudG90YWxUaW1lID0gMDsKICAgICAgICAgICAgdGhpcy5fY29tbWFuZCgnY3JlYXRlJywgb3B0aW9ucyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBldmVudE5hbWUKICAgICAgICAgKiBAcGFyYW0gez99IGNhbGxiYWNrCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfbGlzdGVuKGV2ZW50TmFtZSwgY2FsbGJhY2spIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3JlbmRlcmVyLmxpc3Rlbih0aGlzLmVsZW1lbnQsIGBAQCR7dGhpcy5pZH06JHtldmVudE5hbWV9YCwgY2FsbGJhY2spOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gY29tbWFuZAogICAgICAgICAqIEBwYXJhbSB7Li4uP30gYXJncwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2NvbW1hbmQoY29tbWFuZCwgLi4uYXJncykgewogICAgICAgICAgICByZXR1cm4gaXNzdWVBbmltYXRpb25Db21tYW5kKHRoaXMuX3JlbmRlcmVyLCB0aGlzLmVsZW1lbnQsIHRoaXMuaWQsIGNvbW1hbmQsIGFyZ3MpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGZuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvbkRvbmUoZm4pIHsKICAgICAgICAgICAgdGhpcy5fbGlzdGVuKCdkb25lJywgZm4pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGZuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvblN0YXJ0KGZuKSB7CiAgICAgICAgICAgIHRoaXMuX2xpc3Rlbignc3RhcnQnLCBmbik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uRGVzdHJveShmbikgewogICAgICAgICAgICB0aGlzLl9saXN0ZW4oJ2Rlc3Ryb3knLCBmbik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgaW5pdCgpIHsKICAgICAgICAgICAgdGhpcy5fY29tbWFuZCgnaW5pdCcpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGhhc1N0YXJ0ZWQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9zdGFydGVkOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHBsYXkoKSB7CiAgICAgICAgICAgIHRoaXMuX2NvbW1hbmQoJ3BsYXknKTsKICAgICAgICAgICAgdGhpcy5fc3RhcnRlZCA9IHRydWU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcGF1c2UoKSB7CiAgICAgICAgICAgIHRoaXMuX2NvbW1hbmQoJ3BhdXNlJyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVzdGFydCgpIHsKICAgICAgICAgICAgdGhpcy5fY29tbWFuZCgncmVzdGFydCcpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZpbmlzaCgpIHsKICAgICAgICAgICAgdGhpcy5fY29tbWFuZCgnZmluaXNoJyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZGVzdHJveSgpIHsKICAgICAgICAgICAgdGhpcy5fY29tbWFuZCgnZGVzdHJveScpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlc2V0KCkgewogICAgICAgICAgICB0aGlzLl9jb21tYW5kKCdyZXNldCcpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHAKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldFBvc2l0aW9uKHApIHsKICAgICAgICAgICAgdGhpcy5fY29tbWFuZCgnc2V0UG9zaXRpb24nLCBwKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXRQb3NpdGlvbigpIHsKICAgICAgICAgICAgcmV0dXJuIDA7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHJlbmRlcmVyCiAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAqIEBwYXJhbSB7P30gaWQKICAgICAqIEBwYXJhbSB7P30gY29tbWFuZAogICAgICogQHBhcmFtIHs/fSBhcmdzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBpc3N1ZUFuaW1hdGlvbkNvbW1hbmQocmVuZGVyZXIsIGVsZW1lbnQsIGlkLCBjb21tYW5kLCBhcmdzKSB7CiAgICAgICAgcmV0dXJuIHJlbmRlcmVyLnNldFByb3BlcnR5KGVsZW1lbnQsIGBAQCR7aWR9OiR7Y29tbWFuZH1gLC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TsKICAgICAgICAgICAgdGhpcy5fcmVuZGVyZXJDYWNoZSA9IG5ldyBNYXAoKTsKICAgICAgICAgICAgdGhpcy5fY2RSZWN1ckRlcHRoID0gMDsKICAgICAgICAgICAgdGhpcy5wcm9taXNlID0gUHJvbWlzZS5yZXNvbHZlKDApOwogICAgICAgICAgICBlbmdpbmUub25SZW1vdmFsQ29tcGxldGUgPSAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAgICAgKiBAcGFyYW0gez99IGRlbGVnYXRlCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoZWxlbWVudCwgZGVsZWdhdGUpID0+IHsKICAgICAgICAgICAgICAgIC8vIE5vdGU6IGlmIGFuIGNvbXBvbmVudCBlbGVtZW50IGhhcyBhIGxlYXZlIGFuaW1hdGlvbiwgYW5kIHRoZSBjb21wb25lbnQKICAgICAgICAgICAgICAgIC8vIGEgaG9zdCBsZWF2ZSBhbmltYXRpb24sIHRoZSB2aWV3IGVuZ2luZSB3aWxsIGNhbGwgYHJlbW92ZUNoaWxkYCBmb3IgdGhlIHBhcmVudAogICAgICAgICAgICAgICAgLy8gY29tcG9uZW50IHJlbmRlcmVyIGFzIHdlbGwgYXMgZm9yIHRoZSBjaGlsZCBjb21wb25lbnQgcmVuZGVyZXIuCiAgICAgICAgICAgICAgICAvLyBUaGVyZWZvcmUsIHdlIG5lZWQgdG8gY2hlY2sgaWYgd2UgYWxyZWFkeSByZW1vdmVkIHRoZSBlbGVtZW50LgogICAgICAgICAgICAgICAgaWYgKGRlbGVnYXRlICYmIGRlbGVnYXRlLnBhcmVudE5vZGUoZWxlbWVudCkpIHsKICAgICAgICAgICAgICAgICAgICBkZWxlZ2F0ZS5yZW1vdmVDaGlsZChlbGVtZW50LnBhcmVudE5vZGUsIGVsZW1lbnQpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICB9CiAg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ZAogICAgICAgICAgICAgICAgICAgIHRoaXMuX3JlbmRlcmVyQ2FjaGUuc2V0KGRlbGVnYXRlLCByZW5kZXJlcik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gcmVuZGVyZXI7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjb21wb25lbnRJZCA9IHR5cGUuaWQ7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbmFtZXNwYWNlSWQgPSB0eXBlLmlkICsgJy0nICsgdGhpcy5fY3VycmVudElkOwogICAgICAgICAgICB0aGlzLl9jdXJyZW50SWQrKzsKICAgICAgICAgICAgdGhpcy5lbmdpbmUucmVnaXN0ZXIobmFtZXNwYWNlSWQsIGhvc3RFbGVtZW50KTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCByZWdpc3RlclRyaWdnZXIgPSAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdHJpZ2dlcgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHRyaWdnZXIpID0+IHsKICAgICAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KHRyaWdnZXIpKSB7CiAgICAgICAgICAgICAgICAgICAgdHJpZ2dlci5mb3JFYWNoKHJlZ2lzdGVyVHJpZ2dlcik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLmVuZ2luZS5yZWdpc3RlclRyaWdnZXIoY29tcG9uZW50SWQsIG5hbWVzcGFjZUlkLCBob3N0RWxlbWVudCwgdHJpZ2dlci5uYW1lLCB0cmlnZ2VyKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgYW5pbWF0aW9uVHJpZ2dlcnMgPSAoLyoqIEB0eXBlIHs/fSAqLyAodHlwZS5kYXRhWydhbmltYXRpb24nXSkpOwogICAgICAgICAgICBhbmltYXRpb25UcmlnZ2Vycy5mb3JFYWNoKHJlZ2lzdGVyVHJpZ2dlcik7CiAgICAgICAgICAgIHJldHVybiBuZXcgQW5pbWF0aW9uUmVuZGVyZXIodGhpcywgbmFtZXNwYWNlSWQsIGRlbGVnYXRlLCB0aGlzLmVuZ2luZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYmVnaW4oKSB7CiAgICAgICAgICAgIHRoaXMuX2NkUmVjdXJEZXB0aCsrOwogICAgICAgICAgICBpZiAodGhpcy5kZWxlZ2F0ZS5iZWdpbikgewogICAgICAgICAgICAgICAgdGhpcy5kZWxlZ2F0ZS5iZWdpbigpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfc2NoZWR1bGVDb3VudFRhc2soKSB7CiAgICAgICAgICAgIC8vIGFsd2F5cyB1c2UgcHJvbWlzZSB0byBzY2hlZHVsZSBtaWNyb3Rhc2sgaW5zdGVhZCBvZiB1c2UgWm9uZQogICAgICAgICAgICB0aGlzLnByb21pc2UudGhlbigoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLl9taWNyb3Rhc2tJZCsrOwogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgKiBAcGFyYW0gez99IGNvdW50CiAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAqIEBwYXJhbSB7P30gZGF0YQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2NoZWR1bGVMaXN0ZW5lckNhbGxiYWNrKGNvdW50LCBmbiwgZGF0YSkgewogICAgICAgICAgICBpZiAoY291bnQgPj0gMCAmJiBjb3VudCA8IHRoaXMuX21pY3JvdGFza0lkKSB7CiAgICAgICAgICAgICAgICB0aGlzLl96b25lLnJ1bigoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiBmbihkYXRhKSkpOwogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0aGlzLl9hbmltYXRpb25DYWxsYmFja3NCdWZmZXIubGVuZ3RoID09IDApIHsKICAgICAgICAgICAgICAgIFByb21pc2UucmVzb2x2ZShudWxsKS50aGVuKCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl96b25lLnJ1bigoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2FuaW1hdGlvbkNhbGxiYWNrc0J1ZmZlci5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSB0dXBsZQogICAgICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAgICAgdHVwbGUgPT4gewogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgW2ZuLCBkYXRhXSA9IHR1cGxlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZm4oZGF0YSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fYW5pbWF0aW9uQ2FsbGJhY2tzQnVmZmVyID0gW107CiAgICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2FuaW1hdGlvbkNhbGxiYWNrc0J1ZmZlci5wdXNoKFtmbiwgZGF0YV0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGVuZCgpIHsKICAgICAgICAgICAgdGhpcy5fY2RSZWN1ckRlcHRoLS07CiAgICAgICAgICAgIC8vIHRoaXMgaXMgdG8gcHJldmVudCBhbmltYXRpb25zIGZyb20gcnVubmluZyB0d2ljZSB3aGVuIGFuIGlubmVyCiAgICAgICAgICAgIC8vIGNvbXBvbmVudCBkb2VzIENEIHdoZW4gYSBwYXJlbnQgY29tcG9uZW50IGluc3RlYWQgaGFzIGluc2VydGVkIGl0CiAgICAgICAgICAgIGlmICh0aGlzLl9jZFJlY3VyRGVwdGggPT0gMCkgewogICAgICAgICAgICAgICAgdGhpcy5fem9uZS5ydW5PdXRzaWRlQW5ndWxhcigoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fc2NoZWR1bGVDb3VudFRhc2soKTsKICAgICAgICAgICAgICAgICAgICB0aGlzLmVuZ2luZS5mbHVzaCh0aGlzLl9taWNyb3Rhc2tJZCk7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHRoaXMuZGVsZWdhdGUuZW5kKSB7CiAgICAgICAgICAgICAgICB0aGlzLmRlbGVnYXRlLmVuZCgpOwogIC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QogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKG5hbWVzcGFjZUlkLCBkZWxlZ2F0ZSwgZW5naW5lKSB7CiAgICAgICAgICAgIHRoaXMubmFtZXNwYWNlSWQgPSBuYW1lc3BhY2VJZDsKICAgICAgICAgICAgdGhpcy5kZWxlZ2F0ZSA9IGRlbGVnYXRlOwogICAgICAgICAgICB0aGlzLmVuZ2luZSA9IGVuZ2luZTsKICAgICAgICAgICAgdGhpcy5kZXN0cm95Tm9kZSA9IHRoaXMuZGVsZWdhdGUuZGVzdHJveU5vZGUgPyAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKG4pID0+ICgvKiogQHR5cGUgez99ICovIChkZWxlZ2F0ZS5kZXN0cm95Tm9kZSkpKG4pKSA6IG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGRhdGEoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmRlbGVnYXRlLmRhdGE7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZGVzdHJveSgpIHsKICAgICAgICAgICAgdGhpcy5lbmdpbmUuZGVzdHJveSh0aGlzLm5hbWVzcGFjZUlkLCB0aGlzLmRlbGVnYXRlKTsKICAgICAgICAgICAgdGhpcy5kZWxlZ2F0ZS5kZXN0cm95KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gbmFtZQogICAgICAgICAqIEBwYXJhbSB7Pz19IG5hbWVzcGFjZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgY3JlYXRlRWxlbWVudChuYW1lLCBuYW1lc3BhY2UpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuZGVsZWdhdGUuY3JlYXRlRWxlbWVudChuYW1lLCBuYW1lc3BhY2UpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBjcmVhdGVDb21tZW50KHZhbHVlKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmRlbGVnYXRlLmNyZWF0ZUNvbW1lbnQodmFsdWUpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBjcmVhdGVUZXh0KHZhbHVlKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmRlbGVnYXRlLmNyZWF0ZVRleHQodmFsdWUpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHBhcmVudAogICAgICAgICAqIEBwYXJhbSB7P30gbmV3Q2hpbGQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGFwcGVuZENoaWxkKHBhcmVudCwgbmV3Q2hpbGQpIHsKICAgICAgICAgICAgdGhpcy5kZWxlZ2F0ZS5hcHBlbmRDaGlsZChwYXJlbnQsIG5ld0NoaWxkKTsKICAgICAgICAgICAgdGhpcy5lbmdpbmUub25JbnNlcnQodGhpcy5uYW1lc3BhY2VJZCwgbmV3Q2hpbGQsIHBhcmVudCwgZmFsc2UpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHBhcmVudAogICAgICAgICAqIEBwYXJhbSB7P30gbmV3Q2hpbGQKICAgICAgICAgKiBAcGFyYW0gez99IHJlZkNoaWxkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBpbnNlcnRCZWZvcmUocGFyZW50LCBuZXdDaGlsZCwgcmVmQ2hpbGQpIHsKICAgICAgICAgICAgdGhpcy5kZWxlZ2F0ZS5pbnNlcnRCZWZvcmUocGFyZW50LCBuZXdDaGlsZCwgcmVmQ2hpbGQpOwogICAgICAgICAgICB0aGlzLmVuZ2luZS5vbkluc2VydCh0aGlzLm5hbWVzcGFjZUlkLCBuZXdDaGlsZCwgcGFyZW50LCB0cnVlKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBwYXJlbnQKICAgICAgICAgKiBAcGFyYW0gez99IG9sZENoaWxkCiAgICAgICAgICogQHBhcmFtIHs/fSBpc0hvc3RFbGVtZW50CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZW1vdmVDaGlsZChwYXJlbnQsIG9sZENoaWxkLCBpc0hvc3RFbGVtZW50KSB7CiAgICAgICAgICAgIHRoaXMuZW5naW5lLm9uUmVtb3ZlKHRoaXMubmFtZXNwYWNlSWQsIG9sZENoaWxkLCB0aGlzLmRlbGVnYXRlLCBpc0hvc3RFbGVtZW50KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBzZWxlY3Rvck9yTm9kZQogICAgICAgICAqIEBwYXJhbSB7Pz19IHByZXNlcnZlQ29udGVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2VsZWN0Um9vdEVsZW1lbnQoc2VsZWN0b3JPck5vZGUsIHByZXNlcnZlQ29udGVudCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5kZWxlZ2F0ZS5zZWxlY3RSb290RWxlbWVudChzZWxlY3Rvck9yTm9kZSwgcHJlc2VydmVDb250ZW50KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBub2RlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBwYXJlbnROb2RlKG5vZGUpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuZGVsZWdhdGUucGFyZW50Tm9kZShub2RlKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBub2RlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZXh0U2libGluZyhub2RlKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmRlbGVnYXRlLm5leHRTaWJsaW5nKG5vZGUpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsCiAgICAgICAgICogQHBhcmFtIHs/fSBuYW1lCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEBwYXJhbSB7Pz19IG5hbWVzcGFjZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0QXR0cmlidXRlKGVsLCBuYW1lLCB2YWx1ZSwgbmFtZXNwYWNlKSB7CiAgICAgICAgICAgIHRoaXMuZGVsZWdhdGUuc2V0QXR0cmlidXRlKGVsLCBuYW1lLCB2YWx1ZSwgbmFtZXNwYWNlKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBlbAogICAgICAgICAqIEBwYXJhbSB7P30gbmFtZQogICAgICAgICAqIEBwYXJhbSB7Pz19IG5hbWVzcGFjZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVtb3ZlQXR0cmlidXRlKGVsLCBuYW1lLCBuYW1lc3BhY2UpIHsKICAgICAgICAgICAgdGhpcy5kZWxlZ2F0ZS5yZW1vdmVBdHRyaWJ1dGUoZWwsIG5hbWUsIG5hbWVzcGFjZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZWwKICAgICAgICAgKiBAcGFyYW0gez99IG5hbWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGFkZENsYXNzKGVsLCBuYW1lKSB7CiAgICAgICAgICAgIHRoaXMuZGVsZWdhdGUuYWRkQ2xhc3MoZWwsIG5hbWUpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsCiAgICAgICAgICogQHBhcmFtIHs/fSBuYW1lCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZW1vdmVDbGFzcyhlbCwgbmFtZSkgewogICAgICAgICAgICB0aGlzLmRlbGVnYXRlLnJlbW92ZUNsYXNzKGVsLCBuYW1lKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBlbAogICAgICAgICAqIEBwYXJhbSB7P30gc3R5bGUKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHBhcmFtIHs/PX0gZmxhZ3MKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldFN0eWxlKGVsLCBzdHlsZSwgdmFsdWUsIGZsYWdzKSB7CiAgICAgICAgICAgIHRoaXMuZGVsZWdhdGUuc2V0U3R5bGUoZWwsIHN0eWxlLCB2YWx1ZSwgZmxhZ3MpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsCiAgICAgICAgICogQHBhcmFtIHs/fSBzdHlsZQogICAgICAgICAqIEBwYXJhbSB7Pz19IGZsYWdzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZW1vdmVTdHlsZShlbCwgc3R5bGUsIGZsYWdzKSB7CiAgICAgICAgICAgIHRoaXMuZGVsZWdhdGUucmVtb3ZlU3R5bGUoZWwsIHN0eWxlLCBmbGFncyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZWwKICAgICAgICAgKiBAcGFyYW0gez99IG5hbWUKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXRQcm9wZXJ0eShlbCwgbmFtZSwgdmFsdWUpIHsKICAgICAgICAgICAgaWYgKG5hbWUuY2hhckF0KDApID09IEFOSU1BVElPTl9QUkVGSVggJiYgbmFtZSA9PSBESVNBQkxFX0FOSU1BVElPTlNfRkxBRykgewogICAgICAgICAgICAgICAgdGhpcy5kaXNhYmxlQW5pbWF0aW9ucyhlbCwgISF2YWx1ZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLmRlbGVnYXRlLnNldFByb3BlcnR5KGVsLCBuYW1lLCB2YWx1ZSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBub2RlCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0VmFsdWUobm9kZSwgdmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5kZWxlZ2F0ZS5zZXRWYWx1ZShub2RlLCB2YWx1ZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdGFyZ2V0CiAgICAgICAgICogQHBhcmFtIHs/fSBldmVudE5hbWUKICAgICAgICAgKiBAcGFyYW0gez99IGNhbGxiYWNrCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBsaXN0ZW4odGFyZ2V0LCBldmVudE5hbWUsIGNhbGxiYWNrKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmRlbGVnYXRlLmxpc3Rlbih0YXJnZXQsIGV2ZW50TmFtZSwgY2FsbGJhY2spOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJvdGVjdGVkCiAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZGlzYWJsZUFuaW1hdGlvbnMoZWxlbWVudCwgdmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5lbmdpbmUuZGlzYWJsZUFuaW1hdGlvbnMoZWxlbWVudCwgdmFsdWUpOwogICAgICAgIH0KICAgIH0KICAgIGNsYXNzIEFuaW1hdGlvblJlbmRlcmVyIGV4dGVuZHMgQmFzZUFuaW1hdGlvblJlbmRlcmVyIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGZhY3RvcnkKICAgICAgICAgKiBAcGFyYW0gez99IG5hbWVzcGFjZUlkCiAgICAgICAgICogQHBhcmFtIHs/fSBkZWxlZ2F0ZQogICAgICAgICAqIEBwYXJhbSB7P30gZW5naW5lCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoZmFjdG9yeSwgbmFtZXNwYWNlSWQsIGRlbGVnYXRlLCBlbmdpbmUpIHsKICAgICAgICAgICAgc3VwZXIobmFtZXNwYWNlSWQsIGRlbGVnYXRlLCBlbmdpbmUpOwogICAgICAgICAgICB0aGlzLmZhY3RvcnkgPSBmYWN0b3J5OwogICAgICAgICAgICB0aGlzLm5hbWVzcGFjZUlkID0gbmFtZXNwYWNlSWQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZWwKICAgICAgICAgKiBAcGFyYW0gez99IG5hbWUKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXRQcm9wZXJ0eShlbCwgbmFtZSwgdmFsdWUpIHsKICAgICAgICAgICAgaWYgKG5hbWUuY2hhckF0KDApID09IEFOSU1BVElPTl9QUkVGSVgpIHsKICAgICAgICAgICAgICAgIGlmIChuYW1lLmNoYXJBdCgxKSA9PSAnLicgJiYgbmFtZSA9PSBESVNBQkxFX0FOSU1BVElPTlNfRkxBRykgewogICAgICAgICAgICAgICAgICAgIHZhbHVlID0gdmFsdWUgPT09IHVuZGVmaW5lZCA/IHRydWUgOiAhIXZhbHVlOwogICAgICAgICAgICAgICAgICAgIHRoaXMuZGlzYWJsZUFuaW1hdGlvbnMoZWwsICgvKiogQHR5cGUgez99ICovICh2YWx1ZSkpKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIHRoaXMuZW5naW5lLnByb2Nlc3ModGhpcy5uYW1lc3BhY2VJZCwgZWwsIG5hbWUuc3Vic3RyKDEpLCB2YWx1ZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLmRlbGVnYXRlLnNldFByb3BlcnR5KGVsLCBuYW1lLCB2YWx1ZSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB0YXJnZXQKICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50TmFtZQogICAgICAgICAqIEBwYXJhbSB7P30gY2FsbGJhY2sKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGxpc3Rlbih0YXJnZXQsIGV2ZW50TmFtZSwgY2FsbGJhY2spIHsKICAgICAgICAgICAgaWYgKGV2ZW50TmFtZS5jaGFyQXQoMCkgPT0gQU5JTUFUSU9OX1BSRUZJWCkgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZWxlbWVudCA9IHJlc29sdmVFbGVtZW50RnJvbVRhcmdldCh0YXJnZXQpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IG5hbWUgPSBldmVudE5hbWUuc3Vic3RyKDEpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IHBoYXNlID0gJyc7CiAgICAgICAgICAgICAgICAvLyBAbGlzdGVuZXIucGhhc2UgaXMgZm9yIHRyaWdnZXIgYW5pbWF0aW9uIGNhbGxiYWNrcwogICAgICAgICAgICAgICAgLy8gQEBsaXN0ZW5lciBpcyBmb3IgYW5pbWF0aW9uIGJ1aWxkZXIgY2FsbGJhY2tzCiAgICAgICAgICAgICAgICBpZiAobmFtZS5jaGFyQXQoMCkgIT0gQU5JTUFUSU9OX1BSRUZJWCkgewogICAgICAgICAgICAgICAgICAgIFtuYW1lLCBwaGFzZV0gPSBwYXJzZVRyaWdnZXJDYWxsYmFja05hbWUobmFtZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5lbmdpbmUubGlzdGVuKHRoaXMubmFtZXNwYWNlSWQsIGVsZW1lbnQsIG5hbWUsIHBoYXNlLCAoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50CiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBldmVudCA9PiB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGNvdW50SWQgPSAoKC8qKiBAdHlwZSB7P30gKi8gKGV2ZW50KSkpWydfZGF0YSddIHx8IC0xOwogICAgICAgICAgICAgICAgICAgIHRoaXMuZmFjdG9yeS5zY2hlZHVsZUxpc3RlbmVyQ2FsbGJhY2soY291bnRJZCwgY2FsbGJhY2ssIGV2ZW50KTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpcy5kZWxlZ2F0ZS5saXN0ZW4odGFyZ2V0LCBldmVudE5hbWUsIGNhbGxiYWNrKTsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdGFyZ2V0CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiByZXNvbHZlRWxlbWVudEZyb21UYXJnZXQodGFyZ2V0KSB7CiAgICAgICAgc3dpdGNoICh0YXJnZXQpIHsKICAgICAgICAgICAgY2FzZSAnYm9keSc6CiAgICAgICAgICAgICAgICByZXR1cm4gZG9jdW1lbnQuYm9keTsKICAgICAgICAgICAgY2FzZSAnZG9jdW1lbnQnOgogICAgICAgICAgICAgICAgcmV0dXJuIGRvY3VtZW50OwogICAgICAgICAgICBjYXNlICd3aW5kb3cnOgogICAgICAgICAgICAgICAgcmV0dXJuIHdpbmRvdzsKICAgICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgICAgIHJldHVybiB0YXJnZXQ7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHRyaWdnZXJOYW1lCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBwYXJzZVRyaWdnZXJDYWxsYmFja05hbWUodHJpZ2dlck5hbWUpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgZG90SW5kZXggPSB0cmlnZ2VyTmFtZS5pbmRleE9mKCcuJyk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHRyaWdnZXIgPSB0cmlnZ2VyTmFtZS5zdWJzdHJpbmcoMCwgZG90SW5kZXgpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBwaGFzZSA9IHRyaWdnZXJOYW1lLnN1YnN0cihkb3RJbmRleCArIDEpOwogICAgICAgIHJldHVybiBbdHJpZ2dlciwgcGhhc2VdOwogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogcGFja2FnZXMvcGxhdGZvcm0tYnJvd3Nlci9hbmltYXRpb25zL3NyYy9wcm92a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9PigpCiAgICAgKiApOwogICAgICogYGBgCiAgICAgKiBXaXRoIGEgZnVuY3Rpb246CiAgICAgKiBgYGB0cwogICAgICogZXhwb3J0IGNvbnN0IGxvZ2luU3VjY2VzcyA9IGNyZWF0ZUFjdGlvbigKICAgICAqICAgJ1tBdXRoL0FQSV0gTG9naW4gU3VjY2VzcycsCiAgICAgKiAgIChyZXNwb25zZTogUmVzcG9uc2UpID0+IHJlc3BvbnNlLnVzZXIKICAgICAqICk7CiAgICAgKiBgYGAKICAgICAqCiAgICAgKiAqKkRpc3BhdGNoaW5nIGFuIGFjdGlvbioqCiAgICAgKgogICAgICogV2l0aG91dCBhZGRpdGlvbmFsIG1ldGFkYXRhOgogICAgICogYGBgdHMKICAgICAqIHN0b3JlLmRpc3BhdGNoKGluY3JlbWVudCgpKTsKICAgICAqIGBgYAogICAgICogV2l0aCBhZGRpdGlvbmFsIG1ldGFkYXRhOgogICAgICogYGBgdHMKICAgICAqIHN0b3JlLmRpc3BhdGNoKGxvZ2luU3VjY2Vzcyh7IHVzZXI6IG5ld1VzZXIgfSkpOwogICAgICogYGBgCiAgICAgKgogICAgICogKipSZWZlcmVuY2luZyBhbiBhY3Rpb24gaW4gYSByZWR1Y2VyKioKICAgICAqCiAgICAgKiBVc2luZyBhIHN3aXRjaCBzdGF0ZW1lbnQ6CiAgICAgKiBgYGB0cwogICAgICogc3dpdGNoIChhY3Rpb24udHlwZSkgewogICAgICogICAvLyAuLi4KICAgICAqICAgY2FzZSBBdXRoQXBpQWN0aW9ucy5sb2dpblN1Y2Nlc3MudHlwZTogewogICAgICogICAgIHJldHVybiB7CiAgICAgKiAgICAgICAuLi5zdGF0ZSwKICAgICAqICAgICAgIHVzZXI6IGFjdGlvbi51c2VyCiAgICAgKiAgICAgfTsKICAgICAqICAgfQogICAgICogfQogICAgICogYGBgCiAgICAgKiBVc2luZyBhIHJlZHVjZXIgY3JlYXRvcjoKICAgICAqIGBgYHRzCiAgICAgKiBvbihBdXRoQXBpQWN0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ogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKC4uLmFyZ3MpID0+IChPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sIGNvbmZpZyguLi5hcmdzKSksIHsgdHlwZSB9KSkpKTsKICAgICAgICB9CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGFzID0gY29uZmlnID8gY29uZmlnLl9hcyA6ICdlbXB0eSc7CiAgICAgICAgc3dpdGNoIChhcykgewogICAgICAgICAgICBjYXNlICdlbXB0eSc6CiAgICAgICAgICAgICAgICByZXR1cm4gZGVmaW5lVHlwZSh0eXBlLCAoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiAoeyB0eXBlIH0pKSk7CiAgICAgICAgICAgIGNhc2UgJ3Byb3BzJzoKICAgICAgICAgICAgICAgIHJldHVybiBkZWZpbmVUeXBlKHR5cGUsICgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcHJvcHMKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChwcm9wcykgPT4gKE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgcHJvcHMpLCB7IHR5cGUgfSkpKSk7CiAgICAgICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ1VuZXhwZWN0ZWQgY29uZmlnLicpOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQHRlbXBsYXRlIFAKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHByb3BzKCkgewogICAgICAgIHJldHVybiB7IF9hczogJ3Byb3BzJywgX3A6ICgvKiogQHR5cGUgez99ICovICh1bmRlZmluZWQpKSB9OwogICAgfQogICAgLyoqCiAgICAgKiBAdGVtcGxhdGUgVAogICAgICogQHBhcmFtIHs/fSB0eXBlCiAgICAgKiBAcGFyYW0gez99IGNyZWF0b3IKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGRlZmluZVR5cGUodHlwZSwgY3JlYXRvcikgewogICAgICAgIHJldHVybiBPYmplY3QuZGVmaW5lUHJvcGVydHkoY3JlYXRvciwgJ3R5cGUnLCB7CiAgICAgICAgICAgIHZhbHVlOiB0eXBlLAogICAgICAgICAgICB3cml0YWJsZTogZmFsc2UsCiAgICAgICAgfSk7CiAgICB9CgogICAgLyoqCiAgICAgKiBAZmlsZW92ZXJ2aWV3IGFkZGVkIGJ5IHRzaWNrbGUKICAgICAqIEdlbmVyYXRlZCBmcm9tOiBtb2R1bGVzL3N0b3JlL3NyYy9hY3Rpb25zX3N1YmplY3QudHMKICAgICAqIEBzdXBwcmVzcyB7Y2hlY2tUeXBlcyxjb25zdGFudFByb3BlcnR5LGV4dHJhUmVxdWlyZSxtaXNzaW5nT3ZlcnJpZGUsbWlzc2luZ1JldHVybix1bnVzZWRQcml2YXRlTWVtYmVycyx1c2VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgSU5JVCA9ICgvKiogQHR5cGUgez99ICovICgnQG5ncngvc3RvcmUvaW5pdCcpKTsKICAgIGNsYXNzIEFjdGlvbnNTdWJqZWN0IGV4dGVuZHMgQmVoYXZpb3JTdWJqZWN0IHsKICAgICAgICBjb25zdHJ1Y3RvcigpIHsKICAgICAgICAgICAgc3VwZXIoeyB0eXBlOiBJTklUIH0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGFjdGlvbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmV4dChhY3Rpb24pIHsKICAgICAgICAgICAgaWYgKHR5cGVvZiBhY3Rpb24gPT09ICdmdW5jdGlvbicpIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoYAogICAgICAgIERpc3BhdGNoIGV4cGVjdGVkIGFuIG9iamVjdCwgaW5zdGVhZCBpdCByZWNlaXZlZCBhIGZ1bmN0aW9uLgogICAgICAgIElmIHlvdSdyZSB1c2luZyB0aGUgY3JlYXRlQWN0aW9uIGZ1bmN0aW9uLCBtYWtlIHN1cmUgdG8gaW52b2tlIHRoZSBmdW5jdGlvbgogICAgICAgIGJlZm9yZSBkaXNwYXRjaGluZyB0aGUgYWN0aW9uLiBGb3IgZXhhbXBsZSwgc29tZUFjdGlvbiBzaG91bGQgYmUgc29tZUFjdGlvbigpLmApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKHR5cGVvZiBhY3Rpb24gPT09ICd1bmRlZmluZWQnKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKGBBY3Rpb25zIG11c3QgYmUgb2JqZWN0c2ApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKHR5cGVvZiBhY3Rpb24udHlwZSA9PT0gJ3VuZGVmaW5lZCcpIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoYEFjdGlvbnMgbXVzdCBoYXZlIGEgdHlwZSBwcm9wZXJ0eWApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHN1cGVyLm5leHQoYWN0aW9uKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBjb21wbGV0ZSgpIHsKICAgICAgICAgICAgLyogbm9vcCAqLwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25EZXN0cm95KCkgewogICAgICAgICAgICBzdXBlci5jb21wbGV0ZSgpOwogICAgICAgIH0KICAgIH0KICAgIEFjdGlvbnNTdWJqZWN0Lsm1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h0eXBlb2YgcmVkdWNlcnNba2V5XSA9PT0gJ2Z1bmN0aW9uJykgewogICAgICAgICAgICAgICAgZmluYWxSZWR1Y2Vyc1trZXldID0gcmVkdWNlcnNba2V5XTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgZmluYWxSZWR1Y2VyS2V5cyA9IE9iamVjdC5rZXlzKGZpbmFsUmVkdWNlcnMpOwogICAgICAgIHJldHVybiAoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBzdGF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gYWN0aW9uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBjb21iaW5hdGlvbihzdGF0ZSwgYWN0aW9uKSB7CiAgICAgICAgICAgIHN0YXRlID0gc3RhdGUgPT09IHVuZGVmaW5lZCA/IGluaXRpYWxTdGF0ZSA6IHN0YXRlOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBoYXNDaGFuZ2VkID0gZmFsc2U7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbmV4dFN0YXRlID0ge307CiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZmluYWxSZWR1Y2VyS2V5cy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3Qga2V5ID0gZmluYWxSZWR1Y2VyS2V5c1tpXTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHJlZHVjZXIgPSBmaW5hbFJlZHVjZXJzW2tleV07CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBwcmV2aW91c1N0YXRlRm9yS2V5ID0gc3RhdGVba2V5XTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IG5leHRTdGF0ZUZvcktleSA9IHJlZHVjZXIocHJldmlvdXNTdGF0ZUZvcktleSwgYWN0aW9uKTsKICAgICAgICAgICAgICAgIG5leHRTdGF0ZVtrZXldID0gbmV4dFN0YXRlRm9yS2V5OwogICAgICAgICAgICAgICAgaGFzQ2hhbmdlZCA9IGhhc0NoYW5nZWQgfHwgbmV4dFN0YXRlRm9yS2V5ICE9PSBwcmV2aW91c1N0YXRlRm9yS2V5OwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBoYXNDaGFuZ2VkID8gbmV4dFN0YXRlIDogc3RhdGU7CiAgICAgICAgfSk7CiAgICB9CiAgICAvKioKICAgICAqIEB0ZW1wbGF0ZSBUCiAgICAgKiBAcGFyYW0gez99IG9iamVjdAogICAgICogQHBhcmFtIHs/fSBrZXlUb1JlbW92ZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gb21pdChvYmplY3QsIGtleVRvUmVtb3ZlKSB7CiAgICAgICAgcmV0dXJuIE9iamVjdC5rZXlzKG9iamVjdCkKICAgICAgICAgICAgLmZpbHRlcigoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBrZXkKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGtleSA9PiBrZXkgIT09IGtleVRvUmVtb3ZlKSkKICAgICAgICAgICAgLnJlZHVjZSgoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSByZXN1bHQKICAgICAgICAgKiBAcGFyYW0gez99IGtleQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgKHJlc3VsdCwga2V5KSA9PiBPYmplY3QuYXNzaWduKHJlc3VsdCwgeyBba2V5XTogb2JqZWN0W2tleV0gfSkpLCB7fSk7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7Li4uP30gZnVuY3Rpb25zCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBjb21wb3NlKC4uLmZ1bmN0aW9ucykgewogICAgICAgIHJldHVybiAoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBhcmcKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIChhcmcpIHsKICAgICAgICAgICAgaWYgKGZ1bmN0aW9ucy5sZW5ndGggPT09IDApIHsKICAgICAgICAgICAgICAgIHJldHVybiBhcmc7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBsYXN0ID0gZnVuY3Rpb25zW2Z1bmN0aW9ucy5sZW5ndGggLSAxXTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCByZXN0ID0gZnVuY3Rpb25zLnNsaWNlKDAsIC0xKTsKICAgICAgICAgICAgcmV0dXJuIHJlc3QucmVkdWNlUmlnaHQoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGNvbXBvc2VkCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChjb21wb3NlZCwgZm4pID0+IGZuKGNvbXBvc2VkKSksIGxhc3QoYXJnKSk7CiAgICAgICAgfSk7CiAgICB9CiAgICAvKioKICAgICAqIEB0ZW1wbGF0ZSBULCBWCiAgICAgKiBAcGFyYW0gez99IHJlZHVjZXJGYWN0b3J5CiAgICAgKiBAcGFyYW0gez89fSBtZXRhUmVkdWNlcnMKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGNyZWF0ZVJlZHVjZXJGYWN0b3J5KHJlZHVjZXJGYWN0b3J5LCBtZXRhUmVkdWNlcnMpIHsKICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShtZXRhUmVkdWNlcnMpICYmIG1ldGFSZWR1Y2Vycy5sZW5ndGggPiAwKSB7CiAgICAgICAgICAgICgoLyoqIEB0eXBlIHs/fSAqLyAocmVkdWNlckZhY3RvcnkpKSkgPSBjb21wb3NlLmFwcGx5KG51bGwsIFsKICAgICAgICAgICAgICAgIC4uLm1ldGFSZWR1Y2VycywKICAgICAgICAgICAgICAgIHJlZHVjZXJGYWN0b3J5LAogICAgICAgICAgICBdKTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuICgvKioKICAgICAgICAgKiBAcGFyYW0gez99IHJlZHVjZXJzCiAgICAgICAgICogQHBhcmFtIHs/PX0gaW5pdGlhbFN0YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAocmVkdWNlcnMsIGluaXRpYWxTdGF0ZSkgPT4gewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHJlZHVjZXIgPSByZWR1Y2VyRmFjdG9yeShyZWR1Y2Vycyk7CiAgICAgICAgICAgIHJldHVybiAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gc3RhdGUKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBhY3Rpb24KICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChzdGF0ZSwgYWN0aW9uKSA9PiB7CiAgICAgICAgICAgICAgICBzdGF0ZSA9IHN0YXRlID09PSB1bmRlZmluZWQgPyAoKC8qKiBAdHlwZSB7P30gKi8gKGluaXRpYWxTdGF0ZSkpKSA6IHN0YXRlOwogICAgICAgICAgICAgICAgcmV0dXJuIHJlZHVjZXIoc3RhdGUsIGFjdGlvbik7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0pOwogICAgfQogICAgLyoqCiAgICAgKiBAdGVtcGxhdGUgVCwgVgogICAgICogQHBhcmFtIHs/PX0gbWV0YVJlZHVjZXJzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBjcmVhdGVGZWF0dXJlUmVkdWNlckZhY3RvcnkobWV0YVJlZHVjZXJzKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHJlZHVjZXJGYWN0b3J5ID0gQXJyYXkuaXNBcnJheShtZXRhUmVkdWNlcnMpICYmIG1ldGFSZWR1Y2Vycy5sZW5ndGggPiAwCiAgICAgICAgICAgID8gY29tcG9zZSguLi5tZXRhUmVkdWNlcnMpCiAgICAgICAgICAgIDogKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHIKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChyKSA9PiByKTsKICAgICAgICByZXR1cm4gKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gcmVkdWNlcgogICAgICAgICAqIEBwYXJhbSB7Pz19IGluaXRpYWxTdGF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgKHJlZHVjZXIsIGluaXRpYWxTdGF0ZSkgPT4gewogICAgICAgICAgICByZWR1Y2VyID0gcmVkdWNlckZhY3RvcnkocmVkdWNlcik7CiAgICAgICAgICAgIHJldHVybiAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gc3RhdGUKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBhY3Rpb24KICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChzdGF0ZSwgYWN0aW9uKSA9PiB7CiAgICAgICAgICAgICAgICBzdGF0ZSA9IHN0YXRlID09PSB1bmRlZmluZWQgPyBpbml0aWFsU3RhdGUgOiBzdGF0ZTsKICAgICAgICAgICAgICAgIHJldHVybiByZWR1Y2VyKHN0YXRlLCBhY3Rpb24pOwogICAgICAgICAgICB9KTsKICAgICAgICB9KTsKICAgIH0KCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZ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ml0aWFsU3RhdGUpKTsKICAgICAgICAgICAgdGhpcy5kaXNwYXRjaGVyID0gZGlzcGF0Y2hlcjsKICAgICAgICAgICAgdGhpcy5pbml0aWFsU3RhdGUgPSBpbml0aWFsU3RhdGU7CiAgICAgICAgICAgIHRoaXMucmVkdWNlcnMgPSByZWR1Y2VyczsKICAgICAgICAgICAgdGhpcy5yZWR1Y2VyRmFjdG9yeSA9IHJlZHVjZXJGYWN0b3J5OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGZlYXR1cmUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGFkZEZlYXR1cmUoZmVhdHVyZSkgewogICAgICAgICAgICB0aGlzLmFkZEZlYXR1cmVzKFtmZWF0dXJlXSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZmVhdHVyZXMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGFkZEZlYXR1cmVzKGZlYXR1cmVzKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcmVkdWNlcnMgPSBmZWF0dXJlcy5yZWR1Y2UoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHJlZHVjZXJEaWN0CiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18xCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAocmVkdWNlckRpY3QsIHsgcmVkdWNlcnMsIHJlZHVjZXJGYWN0b3J5LCBtZXRhUmVkdWNlcnMsIGluaXRpYWxTdGF0ZSwga2V5IH0pID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHJlZHVjZXIgPSB0eXBlb2YgcmVkdWNlcnMgPT09ICdmdW5jdGlvbicKICAgICAgICAgICAgICAgICAgICA/IGNyZWF0ZUZlYXR1cmVSZWR1Y2VyRmFjdG9yeShtZXRhUmVkdWNlcnMpKHJlZHVjZXJzLCBpbml0aWFsU3RhdGUpCiAgICAgICAgICAgICAgICAgICAgOiBjcmVhdGVSZWR1Y2VyRmFjdG9yeShyZWR1Y2VyRmFjdG9yeSwgbWV0YVJlZHVjZXJzKShyZWR1Y2VycywgaW5pdGlhbFN0YXRlKTsKICAgICAgICAgICAgICAgIHJlZHVjZXJEaWN0W2tleV0gPSByZWR1Y2VyOwogICAgICAgICAgICAgICAgcmV0dXJuIHJlZHVjZXJEaWN0OwogICAgICAgICAgICB9KSwgKC8qKiBAdHlwZSB7P30gKi8gKHt9KSkpOwogICAgICAgICAgICB0aGlzLmFkZFJlZHVjZXJzKHJlZHVjZXJzKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBmZWF0dXJlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZW1vdmVGZWF0dXJlKGZlYXR1cmUpIHsKICAgICAgICAgICAgdGhpcy5yZW1vdmVGZWF0dXJlcyhbZmVhdHVyZV0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGZlYXR1cmVzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZW1vdmVGZWF0dXJlcyhmZWF0dXJlcykgewogICAgICAgICAgICB0aGlzLnJlbW92ZVJlZHVjZXJzKGZlYXR1cmVzLm1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgcCA9PiBwLmtleSkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBrZXkKICAgICAgICAgKiBAcGFyYW0gez99IHJlZHVjZXIKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGFkZFJlZHVjZXIoa2V5LCByZWR1Y2VyKSB7CiAgICAgICAgICAgIHRoaXMuYWRkUmVkdWNlcnMoeyBba2V5XTogcmVkdWNlciB9KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSByZWR1Y2VycwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYWRkUmVkdWNlcnMocmVkdWNlcnMpIHsKICAgICAgICAgICAgdGhpcy5yZWR1Y2VycyA9IE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgdGhpcy5yZWR1Y2VycyksIHJlZHVjZXJzKTsKICAgICAgICAgICAgdGhpcy51cGRhdGVSZWR1Y2VycyhPYmplY3Qua2V5cyhyZWR1Y2VycykpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGZlYXR1cmVLZXkKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlbW92ZVJlZHVjZXIoZmVhdHVyZUtleSkgewogICAgICAgICAgICB0aGlzLnJlbW92ZVJlZHVjZXJzKFtmZWF0dXJlS2V5XSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZmVhdHVyZUtleXMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlbW92ZVJlZHVjZXJzKGZlYXR1cmVLZXlzKSB7CiAgICAgICAgICAgIGZlYXR1cmVLZXlzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGtleQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAga2V5ID0+IHsKICAgICAgICAgICAgICAgIHRoaXMucmVkdWNlcnMgPSAoLyoqIEB0eXBlIHs/fSAqLyAob21pdCh0aGlzLnJlZHVjZXJzLCBrZXkpIC8qVE9ETygjODIzKSovKSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgdGhpcy51cGRhdGVSZWR1Y2VycyhmZWF0dXJlS2V5cyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBmZWF0dXJlS2V5cwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdXBkYXRlUmVkdWNlcnMoZmVhdHVyZUtleXMpIHsKICAgICAgICAgICAgdGhpcy5uZXh0KHRoaXMucmVkdWNlckZhY3RvcnkodGhpcy5yZWR1Y2VycywgdGhpcy5pbml0aWFsU3RhdGUpKTsKICAgICAgICAgICAgdGhpcy5kaXNwYXRjaGVyLm5leHQoKC8qKiBAdHlwZSB7P30gKi8gKHsKICAgICAgICAgICAgICAgIHR5cGU6IFVQREFURSwKICAgICAgICAgICAgICAgIGZlYXR1cmVzOiBmZWF0dXJlS2V5cywKICAgICAgICAgICAgfSkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uRGVzdHJveSgpIHsKICAgICAgICAgICAgdGhpcy5jb21wbGV0ZSgpOwogICAgICAgIH0KICAgIH0KICAgIFJlZHVjZXJNYW5hZ2VyLsm1ZmFjID0gZnVuY3Rpb24gUmVkdWNlck1hbmFnZXJfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgUmVkdWNlck1hbmFnZXIpKMm1ybVpbmplY3QoUmVkdWNlck1hbmFnZXJEaXNwYXRjaGVyKSwgybXJtWluamVjdChJTklUSUFMX1NUQVRFKSwgybXJtWluamVjdChJTklUSUFMX1JFRFVDRVJTKSwgybXJtWluamVjdChSRURVQ0VSX0ZBQ1RPUlkpKTsgfTsKICAgIFJlZHVjZXJNYW5hZ2VyLsm1cHJvdiA9IMm1ybVkZWZpbmVJbmplY3RhYmxlKHsgdG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WNlciQpKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBzZWVkID0geyBzdGF0ZTogaW5pdGlhbFN0YXRlIH07CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc3RhdGVBbmRBY3Rpb24kID0gd2l0aExhdGVzdFJlZHVjZXIkLnBpcGUoc2NhbihyZWR1Y2VTdGF0ZSwgc2VlZCkpOwogICAgICAgICAgICB0aGlzLnN0YXRlU3Vic2NyaXB0aW9uID0gc3RhdGVBbmRBY3Rpb24kLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoeyBzdGF0ZSwgYWN0aW9uIH0pID0+IHsKICAgICAgICAgICAgICAgIHRoaXMubmV4dChzdGF0ZSk7CiAgICAgICAgICAgICAgICBzY2FubmVkQWN0aW9ucy5uZXh0KGFjdGlvbik7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uRGVzdHJveSgpIHsKICAgICAgICAgICAgdGhpcy5zdGF0ZVN1YnNjcmlwdGlvbi51bnN1YnNjcmliZSgpOwogICAgICAgICAgICB0aGlzLmNvbXBsZXRlKCk7CiAgICAgICAgfQogICAgfQogICAgU3RhdGUuybVmYWMgPSBmdW5jdGlvbiBTdGF0ZV9GYWN0b3J5KHQpIHsgcmV0dXJuIG5ldyAodCB8fCBTdGF0ZSkoybXJtWluamVjdChBY3Rpb25zU3ViamVjdCksIMm1ybVpbmplY3QoUmVkdWNlck9ic2VydmFibGUpLCDJtcm1aW5qZWN0KFNjYW5uZWRBY3Rpb25zU3ViamVjdCksIMm1ybVpbmplY3QoSU5JVElBTF9TVEFURSkpOyB9OwogICAgU3RhdGUuyb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ZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogbW9kdWxlcy9zdG9yZS9zcmMvc3RvcmUudHMKICAgICAqIEBzdXBwcmVzcyB7Y2hlY2tUeXBlcyxjb25zdGFudFByb3BlcnR5LGV4dHJhUmVxdWlyZSxtaXNzaW5nT3ZlcnJpZGUsbWlzc2luZ1JldHVybix1bnVzZWRQcml2YXRlTWVtYmVycyx1c2VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgLyoqCiAgICAgKiBAdGVtcGxhdGUgVAogICAgICovCiAgICBjbGFzcyBTdG9yZSBleHRlbmRzIE9ic2VydmFibGUgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gc3RhdGUkCiAgICAgICAgICogQHBhcmFtIHs/fSBhY3Rpb25zT2JzZXJ2ZXIKICAgICAgICAgKiBAcGFyYW0gez99IHJlZHVjZXJNYW5hZ2VyCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3Ioc3RhdGUkLCBhY3Rpb25zT2JzZXJ2ZXIsIHJlZHVjZXJNYW5hZ2VyKSB7CiAgICAgICAgICAgIHN1cGVyKCk7CiAgICAgICAgICAgIHRoaXMuYWN0aW9uc09ic2VydmVyID0gYWN0aW9uc09ic2VydmVyOwogICAgICAgICAgICB0aGlzLnJlZHVjZXJNYW5hZ2VyID0gcmVkdWNlck1hbmFnZXI7CiAgICAgICAgICAgIHRoaXMuc291cmNlID0gc3RhdGUkOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAdGVtcGxhdGUgUHJvcHMsIEsKICAgICAgICAgKiBAcGFyYW0gez99IHBhdGhPck1hcEZuCiAgICAgICAgICogQHBhcmFtIHsuLi4/fSBwYXRocwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2VsZWN0KHBhdGhPck1hcEZuLCAuLi5wYXRocykgewogICAgICAgICAgICByZXR1cm4gKCgvKiogQHR5cGUgez99ICovIChzZWxlY3QpKSkuY2FsbChudWxsLCBwYXRoT3JNYXBGbiwgLi4ucGF0aHMpKHRoaXMpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAdGVtcGxhdGUgUgogICAgICAgICAqIEBwYXJhbSB7P30gb3BlcmF0b3IKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGxpZnQob3BlcmF0b3IpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBzdG9yZSA9IG5ldyBTdG9yZSh0aGlzLCB0aGlzLmFjdGlvbnNPYnNlcnZlciwgdGhpcy5yZWR1Y2VyTWFuYWdlcik7CiAgICAgICAgICAgIHN0b3JlLm9wZXJhdG9yID0gb3BlcmF0b3I7CiAgICAgICAgICAgIHJldHVybiBzdG9yZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHRlbXBsYXRlIFYKICAgICAgICAgKiBAcGFyYW0gez99IGFjdGlvbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZGlzcGF0Y2goYWN0aW9uKSB7CiAgICAgICAgICAgIHRoaXMuYWN0aW9uc09ic2VydmVyLm5leHQoYWN0aW9uKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBhY3Rpb24KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5leHQoYWN0aW9uKSB7CiAgICAgICAgICAgIHRoaXMuYWN0aW9uc09ic2VydmVyLm5leHQoYWN0aW9uKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBlcnIKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGVycm9yKGVycikgewogICAgICAgICAgICB0aGlzLmFjdGlvbnNPYnNlcnZlci5lcnJvcihlcnIpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGNvbXBsZXRlKCkgewogICAgICAgICAgICB0aGlzLmFjdGlvbnNPYnNlcnZlci5jb21wbGV0ZSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAdGVtcGxhdGUgU3RhdGUsIEFjdGlvbnMKICAgICAgICAgKiBAcGFyYW0gez99IGtleQogICAgICAgICAqIEBwYXJhbSB7P30gcmVkdWNlcgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYWRkUmVkdWNlcihrZXksIHJlZHVjZXIpIHsKICAgICAgICAgICAgdGhpcy5yZWR1Y2VyTWFuYWdlci5hZGRSZWR1Y2VyKGtleSwgcmVkdWNlcik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEB0ZW1wbGF0ZSBLZXkKICAgICAgICAgKiBAcGFyYW0gez99IGtleQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVtb3ZlUmVkdWNlcihrZXkpIHsKICAgICAgICAgICAgdGhpcy5yZWR1Y2VyTWFuYWdlci5yZW1vdmVSZWR1Y2VyKGtleSk7CiAgICAgICAgfQogICAgfQogICAgU3RvcmUuybVmYWMgPSBmdW5jdGlvbiBTdG9yZV9GYWN0b3J5KHQpIHsgcmV0dXJuIG5ldyAodCB8fCBTdG9yZSkoybXJtWluamVjdChTdGF0ZU9ic2VydmFibGUpLCDJtcm1aW5qZWN0KEFjdGlvbnNTdWJqZWN0KSwgybXJtWluamVjdChSZWR1Y2VyTWFuYWdlcikpOyB9OwogICAgU3RvcmUuybVwcm92ID0gybXJtWRlZmluZUluamVjdGFibGUoeyB0b2tlbjogU3RvcmUsIGZhY3Rvcnk6IFN0b3JlLsm1ZmFjIH0pOwogICAgLyoqIEBub2NvbGxhcHNlICovCiAgICBTdG9yZS5jdG9yUGFyYW1ldGVycyA9ICgpID0+IFsKICAgICAgICB7IHR5cGU6IFN0YXRlT2JzZXJ2YWJsZSB9LAogICAgICAgIHsgdHlwZTogQWN0aW9uc1N1YmplY3QgfSwKICAgICAgICB7IHR5cGU6IFJlZHVjZXJNYW5hZ2VyIH0KICAgIF07CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBTVE9SRV9QUk9WSURFUlMgPSBbU3RvcmVdOwogICAgLyoqCiAgICAgKiBAdGVtcGxhdGUgVCwgUHJvcHMsIEsKICAgICAqIEBwYXJhbSB7P30gcGF0aE9yTWFwRm4KICAgICAqIEBwYXJhbSB7Pz19IHByb3BzT3JQYXRoCiAgICAgKiBAcGFyYW0gey4uLj99IHBhdGhzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBzZWxlY3QocGF0aE9yTWFwRm4sIHByb3BzT3JQYXRoLCAuLi5wYXRocykgewogICAgICAgIHJldHVybiAoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBzb3VyY2UkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBzZWxlY3RPcGVyYXRvcihzb3VyY2UkKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IG1hcHBlZCQ7CiAgICAgICAgICAgIGlmICh0eXBlb2YgcGF0aE9yTWFwRm4gPT09ICdzdHJpbmcnKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBwYXRoU2xpY2VzID0gWygvKiogQHR5cGUgez99ICovIChwcm9wc09yUGF0aCkpLCAuLi5wYXRoc10uZmlsdGVyKEJvb2xlYW4pOwogICAgICAgICAgICAgICAgbWFwcGVkJCA9IHNvdXJjZSQucGlwZShwbHVjayhwYXRoT3JNYXBGbiwgLi4ucGF0aFNsaWNlcykpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKHR5cGVvZiBwYXRoT3JNYXBGbiA9PT0gJ2Z1bmN0aW9uJykgewogICAgICAgICAgICAgICAgbWFwcGVkJCA9IHNvdXJjZSQucGlwZShtYXAoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBzb3VyY2UKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIHNvdXJjZSA9PiBwYXRoT3JNYXBGbihzb3VyY2UsICgvKiogQHR5cGUgez99ICovIChwcm9wc09yUGF0aCkpKSkpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoYFVuZXhwZWN0ZWQgdHlwZSAnJHt0eXBlb2YgcGF0aE9yTWFwRm59JyBpbiBzZWxlY3Qgb3BlcmF0b3IsYCArCiAgICAgICAgICAgICAgICAgICAgYCBleHBlY3RlZCAnc3RyaW5nJyBvciAnZnVuY3Rpb24nYCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIG1hcHBlZCQucGlwZShkaXN0aW5jdFVudGlsQ2hhbmdlZCgpKTsKICAgICAgICB9KTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBhCiAgICAgKiBAcGFyYW0gez99IGIKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGlzRXF1YWxDaGVjayhhLCBiKSB7CiAgICAgICAgcmV0dXJuIGEgPT09IGI7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gYXJncwogICAgICogQHBhcmFtIHs/fSBsYXN0QXJndW1lbnRzCiAgICAgKiBAcGFyYW0gez99IGNvbXBhcmF0b3IKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGlzQXJndW1lbnRzQ2hhbmdlZChhcmdzLCBsYXN0QXJndW1lbnRzLCBjb21wYXJhdG9yKSB7CiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBhcmdzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgIGlmICghY29tcGFyYXRvcihhcmdzW2ldLCBsYXN0QXJndW1lbnRzW2ldKSkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHByb2plY3Rpb25GbgogICAgICogQHBhcmFtIHs/PX0gaXNBcmd1bWVudHNFcXVhbAogICAgICogQHBhcmFtIHs/PX0gaXNSZXN1bHRFcXVhbAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZGVmYXVsdE1lbW9pemUocHJvamVjdGlvbkZuLCBpc0FyZ3VtZW50c0VxdWFsID0gaXNFcXVhbENoZWNrLCBpc1Jlc3VsdEVxdWFsID0gaXNFcXVhbENoZWNrKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBsYXN0QXJndW1lbnRzID0gbnVsbDsKICAgICAgICAvLyB0c2xpbnQ6ZGlzYWJsZS1uZXh0LWxpbmU6bm8tYW55IGFueXRoaW5nIGNvdWxkIGJlIHRoZSByZXN1bHQuCiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBsYXN0UmVzdWx0ID0gbnVsbDsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IG92ZXJyaWRlUmVzdWx0OwogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gcmVzZXQoKSB7CiAgICAgICAgICAgIGxhc3RBcmd1bWVudHMgPSBudWxsOwogICAgICAgICAgICBsYXN0UmVzdWx0ID0gbnVsbDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/PX0gcmVzdWx0CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBzZXRSZXN1bHQocmVzdWx0ID0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgIG92ZXJyaWRlUmVzdWx0ID0geyByZXN1bHQgfTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBjbGVhclJlc3VsdCgpIHsKICAgICAgICAgICAgb3ZlcnJpZGVSZXN1bHQgPSB1bmRlZmluZWQ7CiAgICAgICAgfQogICAgICAgIC8vIHRzbGludDpkaXNhYmxlLW5leHQtbGluZTpuby1hbnkgYW55dGhpbmcgY291bGQgYmUgdGhlIHJlc3VsdC4KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uIG1lbW9pemVkKCkgewogICAgICAgICAgICBpZiAob3ZlcnJpZGVSZXN1bHQgIT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICAgICAgcmV0dXJuIG92ZXJyaWRlUmVzdWx0LnJlc3VsdDsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoIWxhc3RBcmd1bWVudHMpIHsKICAgICAgICAgICAgICAgIGxhc3RSZXN1bHQgPSBwcm9qZWN0aW9uRm4uYXBwbHkobnVsbCwgKC8qKiBAdHlwZSB7P30gKi8gKGFyZ3VtZW50cykpKTsKICAgICAgICAgICAgICAgIGxhc3RBcmd1bWVudHMgPSBhcmd1bWVudHM7CiAgICAgICAgICAgICAgICByZXR1cm4gbGFzdFJlc3VsdDsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoIWlzQXJndW1lbnRzQ2hhbmdlZChhcmd1bWVudHMsIGxhc3RBcmd1bWVudHMsIGlzQXJndW1lbnRzRXF1YWwpKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gbGFzdFJlc3VsdDsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG5ld1Jlc3VsdCA9IHByb2plY3Rpb25Gbi5hcHBseShudWxsLCAoLyoqIEB0eXBlIHs/fSAqLyAoYXJndW1lbnRzKSkpOwogICAgICAgICAgICBsYXN0QXJndW1lbnRzID0gYXJndW1lbnRzOwogICAgICAgICAgICBpZiAoaXNSZXN1bHRFcXVhbChsYXN0UmVzdWx0LCBuZXdSZXN1bHQpKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gbGFzdFJlc3VsdDsKICAgICAgICAgICAgfQogICAgICAgICAgICBsYXN0UmVzdWx0ID0gbmV3UmVzdWx0OwogICAgICAgICAgICByZXR1cm4gbmV3UmVzdWx0OwogICAgICAgIH0KICAgICAgICByZXR1cm4geyBtZW1vaXplZCwgcmVzZXQsIHNldFJlc3VsdCwgY2xlYXJSZXN1bHQgfTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHsuLi4/fSBpbnB1dAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gY3JlYXRlU2VsZWN0b3IoLi4uaW5wdXQpIHsKICAgICAgICByZXR1cm4gY3JlYXRlU2VsZWN0b3JGYWN0b3J5KGRlZmF1bHRNZW1vaXplKSguLi5pbnB1dCk7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gc3RhdGUKICAgICAqIEBwYXJhbSB7P30gc2VsZWN0b3JzCiAgICAgKiBAcGFyYW0gez99IHByb3BzCiAgICAgKiBAcGFyYW0gez99IG1lbW9pemVkUHJvamVjdG9yCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBkZWZhdWx0U3RhdGVGbihzdGF0ZSwgc2VsZWN0b3JzLCBwcm9wcywgbWVtb2l6ZWRQcm9qZWN0b3IpIHsKICAgICAgICBpZiAocHJvcHMgPT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGFyZ3MgPSAoKC8qKiBAdHlwZSB7P30gKi8gKHNlbGVjdG9ycykpKS5tYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGZuCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBmbiA9PiBmbihzdGF0ZSkpKTsKICAgICAgICAgICAgcmV0dXJuIG1lbW9pemVkUHJvamVjdG9yLm1lbW9pemVkLmFwcGx5KG51bGwsIGFyZ3MpOwogICAgICAgIH0KICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgYXJncyA9ICgoLyoqIEB0eXBlIHs/fSAqLyAoc2VsZWN0b3JzKSkpLm1hcCgoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZm4gPT4gZm4oc3RhdGUsIHByb3BzKSkpOwogICAgICAgIHJldHVybiBtZW1vaXplZFByb2plY3Rvci5tZW1vaXplZC5hcHBseShudWxsLCBbLi4uYXJncywgcHJvcHNdKTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBtZW1vaXplCiAgICAgKiBAcGFyYW0gez89fSBvcHRpb25zCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBjcmVhdGVTZWxlY3RvckZhY3RvcnkobWVtb2l6ZSwgb3B0aW9ucyA9IHsKICAgICAgICBzdGF0ZUZuOiBkZWZhdWx0U3RhdGVGbiwKICAgIH0pIHsKICAgICAgICByZXR1cm4gKC8qKgogICAgICAgICAqIEBwYXJhbSB7Li4uP30gaW5wdXQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZ1bmN0aW9uICguLi5pbnB1dCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBhcmdzID0gaW5wdXQ7CiAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KGFyZ3NbMF0pKSB7CiAgICAgICAgICAgICAgICBjb25zdCBbaGVhZCwgLi4udGFpbF0gPSBhcmdzOwogICAgICAgICAgICAgICAgYXJncyA9IFsuLi5oZWFkLCAuLi50YWlsXTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHNlbGVjdG9ycyA9IGFyZ3Muc2xpY2UoMCwgYXJncy5sZW5ndGggLSAxKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwcm9qZWN0b3IgPSBhcmdzW2FyZ3MubGVuZ3RoIC0gMV07CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbWVtb2l6ZWRTZWxlY3RvcnMgPSBzZWxlY3RvcnMuZmlsdGVyKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBzZWxlY3RvcgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHNlbGVjdG9yKSA9PiBzZWxlY3Rvci5yZWxlYXNlICYmIHR5cGVvZiBzZWxlY3Rvci5yZWxlYXNlID09PSAnZnVuY3Rpb24nKSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbWVtb2l6ZWRQcm9qZWN0b3IgPSBtZW1vaXplKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHsuLi4/fSBzZWxlY3RvcnMKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGZ1bmN0aW9uICguLi5zZWxlY3RvcnMpIHsKICAgICAgICAgICAgICAgIHJldHVybiBwcm9qZWN0b3IuYXBwbHkobnVsbCwgc2VsZWN0b3JzKTsKICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG1lbW9pemVkU3RhdGUgPSBkZWZhdWx0TWVtb2l6ZSgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gc3RhdGUKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwcm9wcwogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZnVuY3Rpb24gKHN0YXRlLCBwcm9wcykgewogICAgICAgICAgICAgICAgcmV0dXJuIG9wdGlvbnMuc3RhdGVGbi5hcHBseShudWxsLCBbCiAgICAgICAgICAgICAgICAgICAgc3RhdGUsCiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3JzLAogICAgICAgICAgICAgICAgICAgIHByb3BzLAogICAgICAgICAgICAgICAgICAgIG1lbW9pemVkUHJvamVjdG9yLAogICAgICAgICAgICAgICAgXSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBmdW5jdGlvbiByZWxlYXNlKCkgewogICAgICAgICAgICAgICAgbWVtb2l6ZWRTdGF0ZS5yZXNldCgpOwogICAgICAgICAgICAgICAgbWVtb2l6ZWRQcm9qZWN0b3IucmVzZXQoKTsKICAgICAgICAgICAgICAgIG1lbW9pemVkU2VsZWN0b3JzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBzZWxlY3RvcgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgc2VsZWN0b3IgPT4gc2VsZWN0b3IucmVsZWFzZSgpKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIE9iamVjdC5hc3NpZ24obWVtb2l6ZWRTdGF0ZS5tZW1vaXplZCwgewogICAgICAgICAgICAgICAgcmVsZWFzZSwKICAgICAgICAgICAgICAgIHByb2plY3RvcjogbWVtb2l6ZWRQcm9qZWN0b3IubWVtb2l6ZWQsCiAgICAgICAgICAgICAgICBzZXRSZXN1bHQ6IG1lbW9pemVkU3RhdGUuc2V0UmVzdWx0LAogICAgICAgICAgICAgICAgY2xlYXJSZXN1bHQ6IG1lbW9pemVkU3RhdGUuY2xlYXJSZXN1bHQsCiAgICAgICAgICAgIH0pOwogICAgICAgIH0pOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IGZlYXR1cmVOYW1lCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBjcmVhdGVGZWF0dXJlU2VsZWN0b3IoZmVhdHVyZU5hbWUpIHsKICAgICAgICByZXR1cm4gY3JlYXRlU2VsZWN0b3IoKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gc3RhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIChzdGF0ZSkgPT4gewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGZlYXR1cmVTdGF0ZSA9IHN0YXRlW2ZlYXR1cmVOYW1lXTsKICAgICAgICAgICAgaWYgKCBpc0Rldk1vZGUoKSAmJiAhKGZlYXR1cmVOYW1lIGluIHN0YXRlKSkgewogICAgICAgICAgICAgICAgY29uc29sZS53YXJuKGBAbmdyeC9zdG9yZTogVGhlIGZlYXR1cmUgbmFtZSBcIiR7ZmVhdHVyZU5hbWV9XCIgZG9lcyBgICsKICAgICAgICAgICAgICAgICAgICAnbm90IGV4aXN0IGluIHRoZSBzdGF0ZSwgdGhlcmVmb3JlIGNyZWF0ZUZlYXR1cmVTZWxlY3RvciAnICsKICAgICAgICAgICAgICAgICAgICAnY2Fubm90IGFjY2VzcyBpdC4gIEJlIHN1cmUgaXQgaXMgaW1wb3J0ZWQgaW4gYSBsb2FkZWQgbW9kdWxlICcgKwogICAgICAgICAgICAgICAgICAgIGB1c2luZyBTdG9yZU1vZHVsZS5mb3JSb290KCcke2ZlYXR1cmVOYW1lfScsIC4uLikgb3IgYCArCiAgICAgICAgICAgICAgICAgICAgYFN0b3JlTW9kdWxlLmZvckZlYXR1cmUoJyR7ZmVhdHVyZU5hbWV9JywgLi4uKS4gIElmIHRoZSBkZWZhdWx0IGAgKwogICAgICAgICAgICAgICAgICAgICdzdGF0ZSBpcyBpbnRlbmRlZCB0byBiZSB1bmRlZmluZWQsIGFzIGlzIHRoZSBjYXNlIHdpdGggcm91dGVyICcgKwogICAgICAgICAgICAgICAgICAgICdzdGF0ZSwgdGhpcyBkZXZlbG9wbWVudC1vbmx5IHdhcm5pbmcgbWVzc2FnZSBjYW4gYmUgaWdub3JlZC4nKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gZmVhdHVyZVN0YXRlOwogICAgICAgIH0pLCAoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBmZWF0dXJlU3RhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIChmZWF0dXJlU3RhdGUpID0+IGZlYXR1cmVTdGF0ZSkpOwogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogbW9kdWxlcy9zdG9yZS9zcmMvbWV0YS1yZWR1Y2Vycy91dGlscy50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBSVU5USU1FX0NIRUNLX1VSTCA9ICdodHRwczovL25ncnguaW8vZ3VpZGUvc3RvcmUvY29uZmlndXJhdGlvbi9ydW50aW1lLWNoZWNrcyc7CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdGFyZ2V0CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBpc1VuZGVmaW5lZCh0YXJnZXQpIHsKICAgICAgICByZXR1cm4gdGFyZ2V0ID09PSB1bmRlZmluZWQ7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdGFyZ2V0CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBpc051bGwodGFyZ2V0KSB7CiAgICAgICAgcmV0dXJuIHRhcmdldCA9PT0gbnVsbDsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB0YXJnZXQKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGlzQXJyYXkkMSh0YXJnZXQpIHsKICAgICAgICByZXR1cm4gQXJyYXkuaXNBcnJheSh0YXJnZXQpOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHRhcmdldAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gaXNTdHJpbmcodGFyZ2V0KSB7CiAgICAgICAgcmV0dXJuIHR5cGVvZiB0YXJnZXQgPT09ICdzdHJpbmcnOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHRhcmdldAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gaXNCb29sZWFuKHRhcmdldCkgewogICAgICAgIHJldHVybiB0eXBlb2YgdGFyZ2V0ID09PSAnYm9vbGVhbic7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdGFyZ2V0CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBpc051bWJlcih0YXJnZXQpIHsKICAgICAgICByZXR1cm4gdHlwZW9mIHRhcmdldCA9PT0gJ251bWJlcic7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdGFyZ2V0CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBpc09iamVjdExpa2UodGFyZ2V0KSB7CiAgICAgICAgcmV0dXJuIHR5cGVvZiB0YXJnZXQgPT09ICdvYmplY3QnICYmIHRhcmdldCAhPT0gbnVsbDsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB0YXJnZXQKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGlzT2JqZWN0JDIodGFyZ2V0KSB7CiAgICAgICAgcmV0dXJuIGlzT2JqZWN0TGlrZSh0YXJnZXQpICYmICFpc0FycmF5JDEodGFyZ2V0KTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB0YXJnZXQKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGlzUGxhaW5PYmplY3QodGFyZ2V0KSB7CiAgICAgICAgaWYgKCFpc09iamVjdCQyKHRhcmdldCkpIHsKICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgIH0KICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgdGFyZ2V0UHJvdG90eXBlID0gT2JqZWN0LmdldFByb3RvdHlwZU9mKHRhcmdldCk7CiAgICAgICAgcmV0dXJuIHRhcmdldFByb3RvdHlwZSA9PT0gT2JqZWN0LnByb3RvdHlwZSB8fCB0YXJnZXRQcm90b3R5cGUgPT09IG51bGw7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdGFyZ2V0CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBpc0Z1bmN0aW9uJDEodGFyZ2V0KSB7CiAgICAgICAgcmV0dXJuIHR5cGVvZiB0YXJnZXQgPT09ICdmdW5jdGlvbic7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gdGFyZ2V0CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBpc0NvbXB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4gez99CiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gKHN0YXRlLCBhY3Rpb24pIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBhY3QgPSBjaGVja3MuYWN0aW9uKGFjdGlvbikgPyBmcmVlemUoYWN0aW9uKSA6IGFjdGlvbjsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBuZXh0U3RhdGUgPSByZWR1Y2VyKHN0YXRlLCBhY3QpOwogICAgICAgICAgICByZXR1cm4gY2hlY2tzLnN0YXRlKCkgPyBmcmVlemUobmV4dFN0YXRlKSA6IG5leHRTdGF0ZTsKICAgICAgICB9KTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB0YXJnZXQKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGZyZWV6ZSh0YXJnZXQpIHsKICAgICAgICBPYmplY3QuZnJlZXplKHRhcmdldCk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHRhcmdldElzRnVuY3Rpb24gPSBpc0Z1bmN0aW9uJDEodGFyZ2V0KTsKICAgICAgICBPYmplY3QuZ2V0T3duUHJvcGVydHlOYW1lcyh0YXJnZXQpLmZvckVhY2goKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gcHJvcAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcHJvcCA9PiB7CiAgICAgICAgICAgIC8vIElnbm9yZSBJdnkgcHJvcGVydGllcywgcmVmOiBodHRwczovL2dpdGh1Yi5jb20vbmdyeC9wbGF0Zm9ybS9pc3N1ZXMvMjEwOSNpc3N1ZWNvbW1lbnQtNTgyNjg5MDYwCiAgICAgICAgICAgIGlmIChwcm9wLnN0YXJ0c1dpdGgoJ8m1JykpIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoaGFzT3duUHJvcGVydHkodGFyZ2V0LCBwcm9wKSAmJgogICAgICAgICAgICAgICAgKHRhcmdldElzRnVuY3Rpb24KICAgICAgICAgICAgICAgICAgICA/IHByb3AgIT09ICdjYWxsZXInICYmIHByb3AgIT09ICdjYWxsZWUnICYmIHByb3AgIT09ICdhcmd1bWVudHMnCiAgICAgICAgICAgICAgICAgICAgOiB0cnVlKSkgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgcHJvcFZhbHVlID0gdGFyZ2V0W3Byb3BdOwogICAgICAgICAgICAgICAgaWYgKChpc09iamVjdExpa2UocHJvcFZhbHVlKSB8fCBpc0Z1bmN0aW9uJDEocHJvcFZhbHVlKSkgJiYKICAgICAgICAgICAgICAgICAgICAhT2JqZWN0LmlzRnJvemVuKHByb3BWYWx1ZSkpIHsKICAgICAgICAgICAgICAgICAgICBmcmVlemUocHJvcFZhbHVlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0pKTsKICAgICAgICByZXR1cm4gdGFyZ2V0OwogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogbW9kdWxlcy9zdG9yZS9zcmMvbWV0YS1yZWR1Y2Vycy9zZXJpYWxpemF0aW9uX3JlZHVjZXIudHMKICAgICAqIEBzdXBwcmVzcyB7Y2hlY2tUeXBlcyxjb25zdGFudFByb3BlcnR5LGV4dHJhUmVxdWlyZSxtaXNzaW5nT3ZlcnJpZGUsbWlzc2luZ1JldHVybix1bnVzZWRQcml2YXRlTWVtYmVycyx1c2VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHJlZHVjZXIKICAgICAqIEBwYXJhbSB7P30gY2hlY2tzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBzZXJpYWxpemF0aW9uQ2hlY2tNZXRhUmVkdWNlcihyZWR1Y2VyLCBjaGVja3MpIHsKICAgICAgICByZXR1cm4gKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gc3RhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGFjdGlvbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gKHN0YXRlLCBhY3Rpb24pIHsKICAgICAgICAgICAgaWYgKGNoZWNrcy5hY3Rpb24oYWN0aW9uKSkgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgdW5zZXJpYWxpemFibGVBY3Rpb24gPSBnZXRVbnNlcmlhbGl6YWJsZShhY3Rpb24pOwogICAgICAgICAgICAgICAgdGhyb3dJZlVuc2VyaWFsaXphYmxlKHVuc2VyaWFsaXphYmxlQWN0aW9uLCAnYWN0aW9uJyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBuZXh0U3RhdGUgPSByZWR1Y2VyKHN0YXRlLCBhY3Rpb24pOwogICAgICAgICAgICBpZiAoY2hlY2tzLnN0YXRlKCkpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHVuc2VyaWFsaXphYmxlU3RhdGUgPSBnZXRVbnNlcmlhbGl6YWJsZShuZXh0U3RhdGUpOwogICAgICAgICAgICAgICAgdGhyb3dJZlVuc2VyaWFsaXphYmxlKHVuc2VyaWFsaXphYmxlU3RhdGUsICdzdGF0ZScpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBuZXh0U3RhdGU7CiAgICAgICAgfSk7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7Pz19IHRhcmdldAogICAgICogQHBhcmFtIHs/PX0gcGF0aAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0VW5zZXJpYWxpemFibGUodGFyZ2V0LCBwYXRoID0gW10pIHsKICAgICAgICAvLyBHdWFyZCBhZ2FpbnN0IHVuZGVmaW5lZCBhbmQgbnVsbCwgZS5nLiBhIHJlZHVjZXIgdGhhdCByZXR1cm5zIHVuZGVmaW5lZAogICAgICAgIGlmICgoaXNVbmRlZmluZWQodGFyZ2V0KSB8fCBpc051bGwodGFyZ2V0KSkgJiYgcGF0aC5sZW5ndGggPT09IDApIHsKICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIHBhdGg6IFsncm9vdCddLAogICAgICAgICAgICAgICAgdmFsdWU6IHRhcmdldCwKICAgICAgICAgICAgfTsKICAgICAgICB9CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGtleXMgPSBPYmplY3Qua2V5cyh0YXJnZXQpOwogICAgICAgIHJldHVybiBrZXlzLnJlZHVjZSgoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSByZXN1bHQKICAgICAgICAgKiBAcGFyYW0gez99IGtleQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgKHJlc3VsdCwga2V5KSA9PiB7CiAgICAgICAgICAgIGlmIChyZXN1bHQpIHsKICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB2YWx1ZSA9ICgoLyoqIEB0eXBlIHs/fSAqLyAodGFyZ2V0KSkpW2tleV07CiAgICAgICAgICAgIC8vIElnbm9yZSBJdnkgY29tcG9uZW50cwogICAgICAgICAgICBpZiAoaXNDb21wb25lbnQodmFsdWUpKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChpc1VuZGVmaW5lZCh2YWx1ZSkgfHwKICAgICAgICAgICAgICAgIGlzTnVsbCh2YWx1ZSkgfHwKICAgICAgICAgICAgICAgIGlzTnVtYmVyKHZhbHVlKSB8fAogICAgICAgICAgICAgICAgaXNCb29sZWFuKHZhbHVlKSB8fAogICAgICAgICAgICAgICAgaXNTdHJpbmcodmFsdWUpIHx8CiAgICAgICAgICAgICAgICBpc0FycmF5JDEodmFsdWUpKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGlzUGxhaW5PYmplY3QodmFsdWUpKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gZ2V0VW5zZXJpYWxpemFibGUodmFsdWUsIFsuLi5wYXRoLCBrZXldKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgcGF0aDogWy4uLnBhdGgsIGtleV0sCiAgICAgICAgICAgICAgICB2YWx1ZSwKICAgICAgICAgICAgfTsKICAgICAgICB9KSwgZmFsc2UpOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHVuc2VyaWFsaXphYmxlCiAgICAgKiBAcGFyYW0gez99IGNvbnRleHQKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHRocm93SWZVbnNlcmlhbGl6YWJsZSh1bnNlcmlhbGl6YWJsZSwgY29udGV4dCkgewogICAgICAgIGlmICh1bnNlcmlhbGl6YWJsZSA9PT0gZmFsc2UpIHsKICAgICAgICAgICAgcmV0dXJuOwogICAgICAgIH0KICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgdW5zZXJpYWxpemFibGVQYXRoID0gdW5zZXJpYWxpemFibGUucGF0aC5qb2luKCcuJyk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGVycm9yID0gbmV3IEVycm9yKGBEZXRlY3RlZCB1bnNlcmlhbGl6YWJsZSAke2NvbnR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AoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSByZWR1Y2VyCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAocmVkdWNlcikgPT4gc3RyaWN0QWN0aW9uU2VyaWFsaXphYmlsaXR5IHx8IHN0cmljdFN0YXRlU2VyaWFsaXphYmlsaXR5CiAgICAgICAgICAgID8gc2VyaWFsaXphdGlvbkNoZWNrTWV0YVJlZHVjZXIocmVkdWNlciwgewogICAgICAgICAgICAgICAgYWN0aW9uOiAoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGFjdGlvbgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKGFjdGlvbikgPT4gc3RyaWN0QWN0aW9uU2VyaWFsaXphYmlsaXR5ICYmICFpZ25vcmVOZ3J4QWN0aW9uKGFjdGlvbikpLAogICAgICAgICAgICAgICAgc3RhdGU6ICgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHN0cmljdFN0YXRlU2VyaWFsaXphYmlsaXR5KSwKICAgICAgICAgICAgfSkKICAgICAgICAgICAgOiByZWR1Y2VyKTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGNyZWF0ZUltbXV0YWJpbGl0eUNoZWNrTWV0YVJlZHVjZXIoeyBzdHJpY3RBY3Rpb25JbW11dGFiaWxpdHksIHN0cmljdFN0YXRlSW1tdXRhYmlsaXR5LCB9KSB7CiAgICAgICAgcmV0dXJuICgvKioKICAgICAgICAgKiBAcGFyYW0gez99IHJlZHVjZXIKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIChyZWR1Y2VyKSA9PiBzdHJpY3RBY3Rpb25JbW11dGFiaWxpdHkgfHwgc3RyaWN0U3RhdGVJbW11dGFiaWxpdHkKICAgICAgICAgICAgPyBpbW11dGFiaWxpdHlDaGVja01ldGFSZWR1Y2VyKHJlZHVjZXIsIHsKICAgICAgICAgICAgICAgIGFjdGlvbjogKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBhY3Rpb24KICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChhY3Rpb24pID0+IHN0cmljdEFjdGlvbkltbXV0YWJpbGl0eSAmJiAhaWdub3JlTmdyeEFjdGlvbihhY3Rpb24pKSwKICAgICAgICAgICAgICAgIHN0YXRlOiAoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiBzdHJpY3RTdGF0ZUltbXV0YWJpbGl0eSksCiAgICAgICAgICAgIH0pCiAgICAgICAgICAgIDogcmVkdWNlcik7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gYWN0aW9uCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBpZ25vcmVOZ3J4QWN0aW9uKGFjdGlvbikgewogICAgICAgIHJldHVybiBhY3Rpb24udHlwZS5zdGFydHNXaXRoKCdAbmdyeCcpOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gY3JlYXRlSW5OZ1pvbmVDaGVja01ldGFSZWR1Y2VyKHsgc3RyaWN0QWN0aW9uV2l0aGluTmdab25lLCB9KSB7CiAgICAgICAgcmV0dXJuICgvKioKICAgICAgICAgKiBAcGFyYW0gez99IHJlZHVjZXIKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIChyZWR1Y2VyKSA9PiBzdHJpY3RBY3Rpb25XaXRoaW5OZ1pvbmUKICAgICAgICAgICAgPyBpbk5nWm9uZUFzc2VydE1ldGFSZWR1Y2VyKHJlZHVjZXIsIHsKICAgICAgICAgICAgICAgIGFjdGlvbjogKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBhY3Rpb24KICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChhY3Rpb24pID0+IHN0cmljdEFjdGlvbldpdGhpbk5nWm9uZSAmJiAhaWdub3JlTmdyeEFjdGlvbihhY3Rpb24pKSwKICAgICAgICAgICAgfSkKICAgICAgICAgICAgOiByZWR1Y2VyKTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/PX0gcnVudGltZUNoZWNrcwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gcHJvdmlkZVJ1bnRpbWVDaGVja3MocnVudGltZUNoZWNrcykgewogICAgICAgIHJldHVybiBbCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgIHByb3ZpZGU6IF9VU0VSX1JVTlRJTUVfQ0hFQ0tTLAogICAgICAgICAgICAgICAgdXNlVmFsdWU6IHJ1bnRpbWVDaGVja3MsCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgIHByb3ZpZGU6IFVTRVJfUlVOVElNRV9DSEVDS1MsCiAgICAgICAgICAgICAgICB1c2VGYWN0b3J5OiBfcnVudGltZUNoZWNrc0ZhY3RvcnksCiAgICAgICAgICAgICAgICBkZXBzOiBbX1VTRVJfUlVOVElNRV9DSEVDS1NdLAogICAgICAgICAgICB9LAogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBwcm92aWRlOiBfQUNUSVZFX1JVTlRJTUVfQ0hFQ0tTLAogICAgICAgICAgICAgICAgZGVwczogW1VTRVJfUlVOVElNRV9DSEVDS1NdLAogICAgICAgICAgICAgICAgdXNlRmFjdG9yeTogY3JlYXRlQWN0aXZlUnVudGltZUNoZWNrcywKICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgcHJvdmlkZTogTUVUQV9SRURVQ0VSUywKICAgICAgICAgICAgICAgIG11bHRpOiB0cnVlLAogICAgICAgICAgICAgICAgZGVwczogW19BQ1RJVkVfUlVOVElNRV9DSEVDS1NdLAogICAgICAgICAgICAgICAgdXNlRmFjdG9yeTogY3JlYXRlSW1tdXRhYmlsaXR5Q2hlY2tNZXRhUmVkdWNlciwKICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgcHJvdmlkZTogTUVUQV9SRURVQ0VSUywKICAgICAgICAgICAgICAgIG11bHRpOiB0cnVlLAogICAgICAgICAgICAgICAgZGVwczogW19BQ1RJVkVfUlVOVElNRV9DSEVDS1NdLAogICAgICAgICAgICAgICAgdXNlRmFjdG9yeTogY3JlYXRlU2VyaWFsaXphdGlvbkNoZWNrTWV0YVJlZHVjZXIsCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgIHByb3ZpZGU6IE1FVEFfUkVEVUNFUlMsCiAgICAgICAgICAgICAgICBtdWx0aTogdHJ1ZSwKICAgICAgICAgICAgICAgIGRlcHM6IFtfQUNUSVZFX1JVTlRJTUVfQ0hFQ0tTXSwKICAgICAgICAgICAgICAgIHVzZUZhY3Rvcnk6IGNyZWF0ZUluTmdab25lQ2hlY2tNZXRhUmVkdWNlciwKICAgICAgICAgICAgfSwKICAgICAgICBdOwogICAgfQogICAgLyoqCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBjaGVja0ZvckFjdGlvblR5cGVVbmlxdWVuZXNzKCkgewogICAgICAgIHJldHVybiBbCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgIHByb3ZpZGU6IF9BQ1RJT05fVFlQRV9VTklRVUVORVNTX0NIRUNLLAogICAgICAgICAgICAgICAgbXVsdGk6IHRydWUsCiAgICAgICAgICAgICAgICBkZXBzOiBbX0FDVElWRV9SVU5USU1FX0NIRUNLU10sCiAgICAgICAgICAgICAgICB1c2VGYWN0b3J5OiBfYWN0aW9uVHlwZVVuaXF1ZW5lc3NDaGVjaywKICAgICAgICAgICAgfSwKICAgICAgICBdOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHJ1bnRpbWVDaGVja3MKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIF9ydW50aW1lQ2hlY2tzRmFjdG9yeShydW50aW1lQ2hlY2tzKSB7CiAgICAgICAgcmV0dXJuIHJ1bnRpbWVDaGVja3M7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gY29uZmlnCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBfYWN0aW9uVHlwZVVuaXF1ZW5lc3NDaGVjayhjb25maWcpIHsKICAgICAgICBpZiAoIWNvbmZpZy5zdHJpY3RBY3Rpb25UeXBlVW5pcXVlbmVzcykgewogICAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBkdXBsaWNhdGVzID0gT2JqZWN0LmVudHJpZXMoUkVHSVNURVJFRF9BQ1RJT05fVFlQRVMpCiAgICAgICAgICAgIC5maWx0ZXIoKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAoWywgcmVnaXN0cmF0aW9uc10pID0+IHJlZ2lzdHJhdGlvbnMgPiAxKSkKICAgICAgICAgICAgLm1hcCgoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIChbdHlwZV0pID0+IHR5cGUpKTsKICAgICAgICBpZiAoZHVwbGljYXRlcy5sZW5ndGgpIHsKICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBBY3Rpb24gdHlwZXMgYXJlIHJlZ2lzdGVyZWQgbW9yZSB0aGFuIG9uY2UsICR7ZHVwbGljY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ICAgIF07CiAgICBjbGFzcyBTdG9yZUZlYXR1cmVNb2R1bGUgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZmVhdHVyZXMKICAgICAgICAgKiBAcGFyYW0gez99IGZlYXR1cmVSZWR1Y2VycwogICAgICAgICAqIEBwYXJhbSB7P30gcmVkdWNlck1hbmFnZXIKICAgICAgICAgKiBAcGFyYW0gez99IHJvb3QKICAgICAgICAgKiBAcGFyYW0gez99IGFjdGlvbkNoZWNrCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoZmVhdHVyZXMsIGZlYXR1cmVSZWR1Y2VycywgcmVkdWNlck1hbmFnZXIsIHJvb3QsIGFjdGlvbkNoZWNrKSB7CiAgICAgICAgICAgIHRoaXMuZmVhdHVyZXMgPSBmZWF0dXJlczsKICAgICAgICAgICAgdGhpcy5mZWF0dXJlUmVkdWNlcnMgPSBmZWF0dXJlUmVkdWNlcnM7CiAgICAgICAgICAgIHRoaXMucmVkdWNlck1hbmFnZXIgPSByZWR1Y2VyTWFuYWdlcjsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBmZWF0cyA9IGZlYXR1cmVzLm1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZmVhdHVyZQogICAgICAgICAgICAgKiBAcGFyYW0gez99IGluZGV4CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoZmVhdHVyZSwgaW5kZXgpID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGZlYXR1cmVSZWR1Y2VyQ29sbGVjdGlvbiA9IGZlYXR1cmVSZWR1Y2Vycy5zaGlmdCgpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgcmVkdWNlcnMgPSAoLyoqIEB0eXBlIHs/fS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BAbm9jb2xsYXBzZSAqLwogICAgU3RvcmVGZWF0dXJlTW9kdWxlLmN0b3JQYXJhbWV0ZXJzID0gKCkgPT4gWwogICAgICAgIHsgdHlwZTogQXJyYXksIGRlY29yYXRvcnM6IFt7IHR5cGU6IEluamVjdCwgYXJnczogW19TVE9SRV9GRUFUVVJFUyxdIH1dIH0sCiAgICAgICAgeyB0eXBlOiBBcnJheSwgZGVjb3JhdG9yczogW3sgdHlwZTogSW5qZWN0LCBhcmdzOiBbRkVBVFVSRV9SRURVQ0VSUyxdIH1dIH0sCiAgICAgICAgeyB0eXBlOiBSZWR1Y2VyTWFuYWdlciB9LAogICAgICAgIHsgdHlwZTogU3RvcmVSb290TW9kdWxlIH0sCiAgICAgICAgeyB0eXBlOiB1bmRlZmluZWQsIGRlY29yYXRvcnM6IFt7IHR5cGU6IE9wdGlvbmFsIH0sIHsgdHlwZTogSW5qZWN0LCBhcmdzOiBbX0FDVElPTl9UWVBFX1VOSVFVRU5FU1NfQ0hFQ0ssXSB9XSB9CiAgICBdOwogICAgY2xhc3MgU3RvcmVNb2R1bGUgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gcmVkdWNlcnMKICAgICAgICAgKiBAcGFyYW0gez89fSBjb25maWcKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHN0YXRpYyBmb3JSb290KHJlZHVjZXJzLCBjb25maWcgPSB7fSkgewogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgbmdNb2R1bGU6IFN0b3JlUm9vdE1vZHVsZSwKICAgICAgICAgICAgICAgIHByb3ZpZGVyczogWwogICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgcHJvdmlkZTogX1JPT1RfU1RPUkVfR1VBUkQsCiAgICAgICAgICAgICAgICAgICAgICAgIHVzZUZhY3Rvcnk6IF9wcm92aWRlRm9yUm9vdEd1YXJkLAogICAgICAgICAgICAgICAgICAgICAgICBkZXBzOiBbW1N0b3JlLCBuZXcgT3B0aW9uYWwoKSwgbmV3IFNraXBTZWxmKCldXSwKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIHsgcHJvdmlkZTogX0lOSVRJQUxfU1RBVEUsIHVzZVZhbHVlOiBjb25maWcuaW5pdGlhbFN0YXRlIH0sCiAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICBwcm92aWRlOiBJTklUSUFMX1NUQVRFLAogICAgICAgICAgICAgICAgICAgICAgICB1c2VGYWN0b3J5OiBfaW5pdGlhbFN0YXRlRmFjdG9yeSwKICAgICAgICAgICAgICAgICAgICAgICAgZGVwczogW19JTklUSUFMX1NUQVRFXSwKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIHsgcHJvdmlkZTogX0lOSVRJQUxfUkVEVUNFUlMsIHVzZVZhbHVlOiByZWR1Y2VycyB9LAogICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgcHJvdmlkZTogX1NUT1JFX1JFRFVDRVJTLAogICAgICAgICAgICAgICAgICAgICAgICB1c2VFeGlzdGluZzogcmVkdWNlcnMgaW5zdGFuY2VvZiBJbmplY3Rpb25Ub2tlbiA/IHJlZHVjZXJzIDogX0lOSVRJQUxfUkVEVUNFUlMsCiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgIHByb3ZpZGU6IElOSVRJQUxfUkVEVUNFUlMsCiAgICAgICAgICAgICAgICAgICAgICAgIGRlcHM6IFtJbmplY3RvciwgX0lOSVRJQUxfUkVEVUNFUlMsIFtuZXcgSW5qZWN0KF9TVE9SRV9SRURVQ0VSUyldXSwKICAgICAgICAgICAgICAgICAgICAgICAgdXNlRmFjdG9yeTogX2NyZWF0ZVN0b3JlUmVkdWNlcnMsCiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgIHByb3ZpZGU6IFVTRVJfUFJPVklERURfTUVUQV9SRURVQ0VSUywKICAgICAgICAgICAgICAgICAgICAgICAgdXNlVmFsdWU6IGNvbmZpZy5tZXRhUmVkdWNlcnMgPyBjb25maWcubWV0YVJlZHVjZXJzIDogW10sCiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgIHByb3ZpZGU6IF9SRVNPTFZFRF9NRVRBX1JFRFVDRVJTLAogICAgICAgICAgICAgICAgICAgICAgICBkZXBzOiBbTUVUQV9SRURVQ0VSUywgVVNFUl9QUk9WSURFRF9NRVRBX1JFRFVDRVJTXSwKICAgICAgICAgICAgICAgICAgICAgICAgdXNlRmFjdG9yeTogX2NvbmNhdE1ldGFSZWR1Y2VycywKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgcHJvdmlkZTogX1JFRFVDRVJfRkFDVE9SWSwKICAgICAgICAgICAgICAgICAgICAgICAgdXNlVmFsdWU6IGNvbmZpZy5yZWR1Y2VyRmFjdG9yeQogICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBjb25maWcucmVkdWNlckZhY3RvcnkKICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogY29tYmluZVJlZHVjZXJzLAogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICBwcm92aWRlOiBSRURVQ0VSX0ZBQ1RPUlksCiAgICAgICAgICAgICAgICAgICAgICAgIGRlcHM6IFtfUkVEVUNFUl9GQUNUT1JZLCBfUkVTT0xWRURfTUVUQV9SRURVQ0VSU10sCiAgICAgICAgICAgICAgICAgICAgICAgIHVzZUZhY3Rvcnk6IGNyZWF0ZVJlZHVjZXJGYWN0b3J5LAogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgQUNUSU9OU19TVUJKRUNUX1BST1ZJREVSUywKICAgICAgICAgICAgICAgICAgICBSRURVQ0VSX01BTkFHRVJfUFJPVklERVJTLAogICAgICAgICAgICAgICAgICAgIFNDQU5ORURfQUNUSU9OU19TVUJKRUNUX1BST1ZJREVSUywKICAgICAgICAgICAgICAgICAgICBTVEFURV9QUk9WSURFUlMsCiAgICAgICAgICAgICAgICAgICAgU1RPUkVfUFJPVklERVJTLAogICAgICAgICAgICAgICAgICAgIHByb3ZpZGVSdW50aW1lQ2hlY2tzKGNvbmZpZy5ydW50aW1lQ2hlY2tzKSwKICAgICAgICAgICAgICAgICAgICBjaGVja0ZvckFjdGlvblR5cGVVbmlxdWVuZXNzKCksCiAgICAgICAgICAgICAgICBdLAogICAgICAgICAgICB9OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGZlYXR1cmVOYW1lCiAgICAgICAgICogQHBhcmFtIHs/fSByZWR1Y2VycwogICAgICAgICAqIEBwYXJhbSB7Pz19IGNvbmZpZwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc3RhdGljIGZvckZlYXR1cmUoZmVhdHVyZU5hbWUsIHJlZHVjZXJzLCBjb25maWcgPSB7fSkgewogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgbmdNb2R1bGU6IFN0b3JlRmVhdHVyZU1vZHVsZSwKICAgICAgICAgICAgICAgIHByb3ZpZGVyczogWwogICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgcHJvdmlkZTogX0ZFQVRVUkVfQ09ORklHUywKICAgICAgICAgICAgICAgICAgICAgICAgbXVsdGk6IHRydWUsCiAgICAgICAgICAgICAgICAgICAgICAgIHVzZVZhbHVlOiBjb25maWcsCiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgIHByb3ZpZGU6IFNUT1JFX0ZFQVRVUkVTLAogICAgICAgICAgICAgICAgICAgICAgICBtdWx0aTogdHJ1ZSwKICAgICAgICAgICAgICAgICAgICAgICAgdXNlVmFsdWU6IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleTogZmVhdHVyZU5hbWUsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWR1Y2VyRmFjdG9yeTogIShjb25maWcgaW5zdGFuY2VvZiBJbmplY3Rpb25Ub2tlbikgJiYgY29uZmlnLnJlZHVjZXJGYWN0b3J5CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBjb25maWcucmVkdWNlckZhY3RvcnkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IGNvbWJpbmVSZWR1Y2VycywKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ldGFSZWR1Y2VyczogIShjb25maWcgaW5zdGFuY2VvZiBJbmplY3Rpb25Ub2tlbikgJiYgY29uZmlnLm1ldGFSZWR1Y2VycwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gY29uZmlnLm1ldGFSZWR1Y2VycwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogW10sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbml0aWFsU3RhdGU6ICEoY29uZmlnIGluc3RhbmNlb2YgSW5qZWN0aW9uVG9rZW4pICYmIGNvbmZpZy5pbml0aWFsU3RhdGUKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGNvbmZpZy5pbml0aWFsU3RhdGUKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IHVuZGVmaW5lZCwKICAgICAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgcHJvdmlkZTogX1NUT1JFX0ZFQVRVUkVTLAogICAgICAgICAgICAgICAgICAgICAgICBkZXBzOiBbSW5qZWN0b3IsIF9GRUFUVVJFX0NPTkZJR1MsIFNUT1JFX0ZFQVRVUkVTXSwKICAgICAgICAgICAgICAgICAgICAgICAgdXNlRmFjdG9yeTogX2NyZWF0ZUZlYXR1cmVTdG9yZSwKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIHsgcHJvdmlkZTogX0ZFQVRVUkVfUkVEVUNFUlMsIG11bHRpOiB0cnVlLCB1c2VWYWx1ZTogcmVkdWNlcnMgfSwKICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgIHByb3ZpZGU6IF9GRUFUVVJFX1JFRFVDRVJTX1RPS0VOLAogICAgICAgICAgICAgICAgICAgICAgICBtdWx0aTogdHJ1ZSwKICAgICAgICAgICAgICAgICAgICAgICAgdXNlRXhpc3Rpbmc6IHJlZHVjZXJzIGluc3RhbmNlb2YgSW5qZWN0aW9uVG9rZW4gPyByZWR1Y2VycyA6IF9GRUFUVVJFX1JFRFVDRVJTLAogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICBwcm92aWRlOiBGRUFUVVJFX1JFRFVDRVJTLAogICAgICAgICAgICAgICAgICAgICAgICBtdWx0aTogdHJ1ZSwKICAgICAgICAgICAgICAgICAgICAgICAgZGVwczogWwogICAgICAgICAgICAgICAgICAgICAgICAgICAgSW5qZWN0b3IsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBfRkVBVFVSRV9SRURVQ0VSUywKICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtuZXcgSW5qZWN0KF9GRUFUVVJFX1JFRFVDRVJTX1RPS0VOKV0sCiAgICAgICAgICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICAgICAgICAgIHVzZUZhY3Rvcnk6IF9jcmVhdGVGZWF0dXJlUmVkdWNlcnMsCiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICBjaGVja0ZvckFjdGlvbl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4gewogICAgICAgICAgICBpZiAoY29uZmlnc1tpbmRleF0gaW5zdGFuY2VvZiBJbmplY3Rpb25Ub2tlbikgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgY29uZiA9IGluamVjdG9yLmdldChjb25maWdzW2luZGV4XSk7CiAgICAgICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgICAgIGtleTogZmVhdC5rZXksCiAgICAgICAgICAgICAgICAgICAgcmVkdWNlckZhY3Rvcnk6IGNvbmYucmVkdWNlckZhY3RvcnkKICAgICAgICAgICAgICAgICAgICAgICAgPyBjb25mLnJlZHVjZXJGYWN0b3J5CiAgICAgICAgICAgICAgICAgICAgICAgIDogY29tYmluZVJlZHVjZXJzLAogICAgICAgICAgICAgICAgICAgIG1ldGFSZWR1Y2VyczogY29uZi5tZXRhUmVkdWNlcnMgPyBjb25mLm1ldGFSZWR1Y2VycyA6IFtdLAogICAgICAgICAgICAgICAgICAgIGluaXRpYWxTdGF0ZTogY29uZi5pbml0aWFsU3RhdGUsCiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBmZWF0OwogICAgICAgIH0pKTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBpbmplY3RvcgogICAgICogQHBhcmFtIHs/fSByZWR1Y2VyQ29sbGVjdGlvbgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gX2NyZWF0ZUZlYXR1cmVSZWR1Y2VycyhpbmplY3RvciwgcmVkdWNlckNvbGxlY3Rpb24pIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgcmVkdWNlcnMgPSByZWR1Y2VyQ29sbGVjdGlvbi5tYXAoKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gcmVkdWNlcgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVkdWNlciA9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XQgdHlwZSBvZiBvbi50eXBlcykgewogICAgICAgICAgICAgICAgaWYgKG1hcC5oYXModHlwZSkpIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgZXhpc3RpbmdSZWR1Y2VyID0gKC8qKiBAdHlwZSB7P30gKi8gKG1hcC5nZXQodHlwZSkpKTsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgbmV3UmVkdWNlciA9ICgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHN0YXRlCiAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBhY3Rpb24KICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgIChzdGF0ZSwgYWN0aW9uKSA9PiBvbi5yZWR1Y2VyKGV4aXN0aW5nUmVkdWNlcihzdGF0ZSwgYWN0aW9uKSwgYWN0aW9uKSk7CiAgICAgICAgICAgICAgICAgICAgbWFwLnNldCh0eXBlLCBuZXdSZWR1Y2VyKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIG1hcC5zZXQodHlwZSwgb24ucmVkdWNlcik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuICgvKioKICAgICAgICAgKiBAcGFyYW0gez89fSBzdGF0ZQogICAgICAgICAqIEBwYXJhbSB7Pz19IGFjdGlvbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZnVuY3Rpb24gKHN0YXRlID0gaW5pdGlhbFN0YXRlLCBhY3Rpb24pIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCByZWR1Y2VyID0gbWFwL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hZHkgcHJlc2VudCBvbiB0aGUgQ2xhc3MKICAgICAqIGNvbnN0cnVjdG9yCiAgICAgKiBAdGVtcGxhdGUgVAogICAgICogQHBhcmFtIHs/fSBzb3VyY2VQcm90bwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gaGFzTWV0YWRhdGFFbnRyaWVzKHNvdXJjZVByb3RvKSB7CiAgICAgICAgcmV0dXJuIHNvdXJjZVByb3RvLmNvbnN0cnVjdG9yLmhhc093blByb3BlcnR5KE1FVEFEQVRBX0tFWSk7CiAgICB9CiAgICAvKioKICAgICAqIEB0ZW1wbGF0ZSBUCiAgICAgKiBAcGFyYW0gez99IHNvdXJjZVByb3RvCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBnZXRFZmZlY3RNZXRhZGF0YUVudHJpZXMoc291cmNlUHJvdG8pIHsKICAgICAgICByZXR1cm4gaGFzTWV0YWRhdGFFbnRyaWVzKHNvdXJjZVByb3RvKQogICAgICAgICAgICA/IHNvdXJjZVByb3RvLmNvbnN0cnVjdG9yW01FVEFEQVRBX0tFWV0KICAgICAgICAgICAgOiBbXTsKICAgIH0KICAgIC8qKgogICAgICogQHRlbXBsYXRlIFQKICAgICAqIEBwYXJhbSB7P30gaW5zdGFuY2UKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGdldFNvdXJjZU1ldGFkYXRhKGluc3RhbmNlKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGVmZmVjdHMgPSBbCiAgICAgICAgICAgIGdldEVmZmVjdERlY29yYXRvck1ldGFkYXRhLAogICAgICAgICAgICBnZXRDcmVhdGVFZmZlY3RNZXRhZGF0YSwKICAgICAgICBdOwogICAgICAgIHJldHVybiBlZmZlY3RzLnJlZHVjZSgoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBzb3VyY2VzCiAgICAgICAgICogQHBhcmFtIHs/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ICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgKHsgcHJvcGVydHlOYW1lLCBkaXNwYXRjaCwgdXNlRWZmZWN0c0Vycm9ySGFuZGxlciwgfSkgPT4gewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG9ic2VydmFibGUkID0gdHlwZW9mIHNvdXJjZUluc3RhbmNlW3Byb3BlcnR5TmFtZV0gPT09ICdmdW5jdGlvbicKICAgICAgICAgICAgICAgID8gc291cmNlSW5zdGFuY2VbcHJvcGVydHlOYW1lXSgpCiAgICAgICAgICAgICAgICA6IHNvdXJjZUluc3RhbmNlW3Byb3BlcnR5TmFtZV07CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZWZmZWN0QWN0aW9uJCA9IHVzZUVmZmVjdHNFcnJvckhhbmRsZXIKICAgICAgICAgICAgICAgID8gZWZmZWN0c0Vycm9ySGFuZGxlcihvYnNlcnZhYmxlJCwgZ2xvYmFsRXJyb3JIYW5kbGVyKQogICAgICAgICAgICAgICAgOiBvYnNlcnZhYmxlJDsKICAgICAgICAgICAgaWYgKGRpc3BhdGNoID09PSBmYWxzZSkgewogICAgICAgICAgICAgICAgcmV0dXJuIGVmZmVjdEFjdGlvbiQucGlwZShpZ25vcmVFbGVtZW50cygpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG1hdGVyaWFsaXplZCQgPSBlZmZlY3RBY3Rpb24kLnBpcGUobWF0ZXJpYWxpemUoKSk7CiAgICAgICAgICAgIHJldHVybiBtYXRlcmlhbGl6ZWQkLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBub3RpZmljYXRpb24KICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChub3RpZmljYXRpb24pID0+ICh7CiAgICAgIC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ICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez89fSBzb3VyY2UKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3Rvcihzb3VyY2UpIHsKICAgICAgICAgICAgc3VwZXIoKTsKICAgICAgICAgICAgaWYgKHNvdXJjZSkgewogICAgICAgICAgICAgICAgdGhpcy5zb3VyY2UgPSBzb3VyY2U7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHRlbXBsYXRlIFIKICAgICAgICAgKiBAcGFyYW0gez99IG9wZXJhdG9yCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBsaWZ0KG9wZXJhdG9yKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgb2JzZXJ2YWJsZSA9IG5ldyBBY3Rpb25zKCk7CiAgICAgICAgICAgIG9ic2VydmFibGUuc291cmNlID0gdGhpczsKICAgICAgICAgICAgb2JzZXJ2YWJsZS5vcGVyYXRvciA9IG9wZXJhdG9yOwogICAgICAgICAgICByZXR1cm4gb2JzZXJ2YWJsZTsKICAgICAgICB9CiAgICB9CiAgICBBY3Rpb25zLsm1ZmFjID0gZnVuY3Rpb24gQWN0aW9uc19GYWN0b3J5KHQpIHsgcmV0dXJuIG5ldyAodCB8fCBBY3Rpb25zKSjJtcm1aW5qZWN0KFNjYW5uZWRBY3Rpb25zU3ViamVjdCkpOyB9OwogICAgQWN0aW9ucy7JtXByb3YgPSDJtcm1ZGVmaW5lSW5qZWN0YWJsZSh7IHRva2VuOiBBY3Rpb25zLCBmYWN0b3J5OiBBY3Rpb25zLsm1ZmFjIH0pOwogICAgLyoqIEBub2NvbGxhcHNlICovCiAgICBBY3Rpb25zLmN0b3JQYXJhbWV0ZXJzID0gKCkgPT4gWwogICAgICAgIHsgdHlwZTogT2JzZXJ2YWJsZSwgZGVjb3JhdG9yczogW3sgdHlwZTogSW5qZWN0LCBhcmdzOiBbU2Nhbm5lZEFjdGlvbnNTdWJqZWN0LF0gfV0gfQogICAgXTsKICAgIC8qKgogICAgICogQHBhcmFtIHsuLi4/fSBhbGxvd2VkVHlwZXMKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIG9mVHlwZSguLi5hbGxvd2VkVHlwZXMpIHsKICAgICAgICByZXR1cm4gZmlsdGVyKCgvKioKICAgICAgICAgKiBAcGFyYW0gez99IGFjdGlvbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgKGFjdGlvbikgPT4gYWxsb3dlZFR5cGVzLnNvbWUoKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdHlwZU9yQWN0aW9uQ3JlYXRvcgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdHlwZU9yQWN0aW9uQ3JlYXRvciA9PiB7CiAgICAgICAgICAgIGlmICh0eXBlb2YgdHlwZU9yQWN0aW9uQ3JlYXRvciA9PT0gJ3N0cmluZycpIHsKICAgICAgICAgICAgICAgIC8vIENvbXBhcmluZyB0aGUgc3RyaW5nIHRvIHR5cGUKICAgICAgICAgICAgICAgIHJldHVybiB0eXBlT3JBY3Rpb25DcmVhdG9yID09PSBhY3Rpb24udHlwZTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBXZSBhcmUgZmlsdGVyaW5nIGJ5IEFjdGlvbkNyZWF0b3IKICAgICAgICAgICAgcmV0dXJuIHR5cGVPckFjdGlvbkNyZWF0b3IudHlwZSA9PT0gYWN0aW9uLnR5cGU7CiAgICAgICAgfSkpKSk7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gb3V0cHV0CiAgICAgKiBAcGFyYW0gez99IHJlcG9ydGVyCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiByZXBvcnRJbnZhbGlkQWN0aW9ucyhvdXRwdXQsIHJlcG9ydGVyKSB7CiAgICAgICAgaWYgKG91dHB1dC5ub3RpZmljYXRpb24ua2luZCA9PT0gJ04nKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgYWN0aW9uID0gb3V0cHV0Lm5vdGlmaWNhdGlvbi52YWx1ZTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBpc0ludmFsaWRBY3Rpb24gPSAhaXNBY3Rpb24oYWN0aW9uKTsKICAgICAgICAgICAgaWYgKGlzSW52YWxpZEFjdGlvbikgewogICAgICAgICAgICAgICAgcmVwb3J0ZXIuaGFuZGxlRXJyb3IobmV3IEVycm9yKGBFZmZlY3QgJHtnZXRFZmZlY3ROYW1lKG91dHB1dCl9IGRpc3BhdGNoZWQgYW4gaW52YWxpZCBhY3Rpb246ICR7c3RyaW5naWZ5JDEoYWN0aW9uKX1gKSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gYWN0aW9uCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBpc0FjdGlvbihhY3Rpb24pIHsKICAgICAgICByZXR1cm4gKHR5cGVvZiBhY3Rpb24gIT09ICdmdW5jdGlvbicgJiYKICAgICAgICAgICAgYWN0aW9uICYmCiAgICAgICAgICAgIGFjdGlvbi50eXBlICYmCiAgICAgICAgICAgIHR5cGVvZiBhY3Rpb24udHlwZSA9PT0gJ3N0cmluZycpOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0RWZmZWN0TmFtZSh7IHByb3BlcnR5TmFtZSwgc291cmNlSW5zdGFuY2UsIHNvdXJjZU5hbWUsIH0pIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgaXNNZXRob2QgPSB0eXBlb2Ygc291cmNlSW5zdGFuY2V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SW5zdGFuY2UKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGFkZEVmZmVjdHMoZWZmZWN0U291cmNlSW5zdGFuY2UpIHsKICAgICAgICAgICAgdGhpcy5uZXh0KGVmZmVjdFNvdXJjZUluc3RhbmNlKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdG9BY3Rpb25zKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5waXBlKGdyb3VwQnkoZ2V0U291cmNlRm9ySW5zdGFuY2UpLCBtZXJnZU1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gc291cmNlJAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgc291cmNlJCA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gc291cmNlJC5waXBlKGdyb3VwQnkoZWZmZWN0c0luc3RhbmNlKSk7CiAgICAgICAgICAgIH0pKSwgbWVyZ2VNYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHNvdXJjZSQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHNvdXJjZSQgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZWZmZWN0JCA9IHNvdXJjZSQucGlwZShleGhhdXN0TWFwKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gc291cmNlSW5zdGFuY2UKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIHNvdXJjZUluc3RhbmNlID0+IHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzb2x2ZUVmZmVjdFNvdXJjZSh0aGlzLmVycm9ySGFuZGxlciwgdGhpcy5lZmZlY3RzRXJyb3JIYW5kbGVyKShzb3VyY2VJbnN0YW5jZSk7CiAgICAgICAgICAgICAgICB9KSksIG1hcCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IG91dHB1dAogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgb3V0cHV0ID0+IHsKICAgICAgICAgICAgICAgICAgICByZXBvcnRJbnZhbGlkQWN0aW9ucyhvdXRwdXQsIHRoaXMuZXJyb3JIYW5kbGVyKTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gb3V0cHV0Lm5vdGlmaWNhdGlvbjsKICAgICAgICAgICAgICAgIH0pKSwgZmlsdGVyKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbm90aWZpY2F0aW9uCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAobm90aWZpY2F0aW9uKSA9PiBub3RpZmljYXRpb24ua2luZCA9PT0gJ04nKSksIGRlbWF0ZXJpYWxpemUoKSk7CiAgICAgICAgICAgICAgICAvLyBzdGFydCB0aGUgc3RyZWFtIHdpdGggYW4gSU5JVCBhY3Rpb24KICAgICAgICAgICAgICAgIC8vIGRvIHRoaXMgb25seSBmb3IgdGhlIGZpcnN0IEVmZmVjdCBpbnN0YW5jZQogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgaW5pdCQgPSBzb3VyY2UkLnBpcGUodGFrZSgxKSwgZmlsdGVyKGlzT25Jbml0RWZmZWN0cyksIG1hcCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGluc3RhbmNlCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBpbnN0YW5jZSA9PiBpbnN0Y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LyoqCiAgICAgKiBAcGFyYW0gez99IGVycm9ySGFuZGxlcgogICAgICogQHBhcmFtIHs/fSBlZmZlY3RzRXJyb3JIYW5kbGVyCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiByZXNvbHZlRWZmZWN0U291cmNlKGVycm9ySGFuZGxlciwgZWZmZWN0c0Vycm9ySGFuZGxlcikgewogICAgICAgIHJldHVybiAoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBzb3VyY2VJbnN0YW5jZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc291cmNlSW5zdGFuY2UgPT4gewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG1lcmdlZEVmZmVjdHMkID0gbWVyZ2VFZmZlY3RzKHNvdXJjZUluc3RhbmNlLCBlcnJvckhhbmRsZXIsIGVmZmVjdHNFcnJvckhhbmRsZXIpOwogICAgICAgICAgICBpZiAoaXNPblJ1bkVmZmVjdHMoc291cmNlSW5zdGFuY2UpKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gc291cmNlSW5zdGFuY2UubmdyeE9uUnVuRWZmZWN0cyhtZXJnZWRFZmZlY3RzJCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIG1lcmdlZEVmZmVjdHMkOwogICAgICAgIH0pOwogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogbW9kdWxlcy9lZmZlY3RzL3NyYy9lZmZlY3RzX3J1bm5lci50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICBjbGFzcyBFZmZlY3RzUnVubmVyIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVmZmVjdFNvdXJjZXMKICAgICAgICAgKiBAcGFyYW0gez99IHN0b3JlCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoZWZmZWN0U291cmNlcywgc3RvcmUpIHsKICAgICAgICAgICAgdGhpcy5lZmZlY3RTb3VyY2VzID0gZWZmZWN0U291cmNlczsKICAgICAgICAgICAgdGhpcy5zdG9yZSA9IHN0b3JlOwogICAgICAgICAgICB0aGlzLmVmZmVjdHNTdWJzY3JpcHRpb24gPSBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHN0YXJ0KCkgewogICAgICAgICAgICBpZiAoIXRoaXMuZWZmZWN0c1N1YnNjcmlwdGlvbikgewogICAgICAgICAgICAgICAgdGhpcy5lZmZlY3RzU3Vic2NyaXB0aW9uID0gdGhpcy5lZmZlY3RTb3VyY2VzCiAgICAgICAgICAgICAgICAgICAgLnRvQWN0aW9ucygpCiAgICAgICAgICAgICAgICAgICAgLnN1YnNjcmliZSh0aGlzLnN0b3JlKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25EZXN0cm95KCkgewogICAgICAgICAgICBpZiAodGhpcy5lZmZlY3RzU3Vic2NyaXB0aW9uKSB7CiAgICAgICAgICAgICAgICB0aGlzLmVmZmVjdHNTdWJzY3JpcHRpb24udW5zdWJzY3JpYmUoKTsKICAgICAgICAgICAgICAgIHRoaXMuZWZmZWN0c1N1YnNjcmlwdGlvbiA9IG51bGw7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICBFZmZlY3RzUnVubmVyLsm1ZmFjID0gZnVuY3Rpb24gRWZmZWN0c1J1bm5lcl9GYWN0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cwogICAgICAgICAqIEBwYXJhbSB7P30gcnVubmVyCiAgICAgICAgICogQHBhcmFtIHs/fSBzdG9yZQogICAgICAgICAqIEBwYXJhbSB7P30gcm9vdEVmZmVjdHMKICAgICAgICAgKiBAcGFyYW0gez99IHN0b3JlUm9vdE1vZHVsZQogICAgICAgICAqIEBwYXJhbSB7P30gc3RvcmVGZWF0dXJlTW9kdWxlCiAgICAgICAgICogQHBhcmFtIHs/fSBndWFyZAogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKHNvdXJjZXMsIHJ1bm5lciwgc3RvcmUsIHJvb3RFZmZlY3RzLCBzdG9yZVJvb3RNb2R1bGUsIHN0b3JlRmVhdHVyZU1vZHVsZSwgZ3VhcmQpIHsKICAgICAgICAgICAgdGhpcy5zb3VyY2VzID0gc291cmNlczsKICAgICAgICAgICAgcnVubmVyLnN0YXJ0KCk7CiAgICAgICAgICAgIHJvb3RFZmZlY3RzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGVmZmVjdFNvdXJjZUluc3RhbmNlCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBlZmZlY3RTb3VyY2VJbnN0YW5jZSA9PiBzb3VyY2VzLmFkZEVmZmVjdHMoZWZmZWN0U291cmNlSW5zdGFuY2UpKSk7CiAgICAgICAgICAgIHN0b3JlLmRpc3BhdGNoKHsgdHlwZTogUk9PVF9FRkZFQ1RTX0lOSVQgfSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZWZmZWN0U291cmNlSW5zdGFuY2UKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGFkZEVmZmVjdHMoZWZmZWN0U291cmNlSW5zdGFuY2UpIHsKICAgICAgICAgICAgdGhpcy5zb3VyY2VzLmFkZEVmZmVjdHMoZWZmZWN0U291cmNlSW5zdGFuY2UpOwogICAgICAgIH0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wZTogU3RvcmVGZWF0dXJlTW9kdWxlLCBkZWNvcmF0b3JzOiBbeyB0eXBlOiBPcHRpb25hbCB9XSB9CiAgICBdOwoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogbW9kdWxlcy9lZmZlY3RzL3NyYy9lZmZlY3RzX21vZHVsZS50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICBjbGFzcyBFZmZlY3RzTW9kdWxlIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez89fSBmZWF0dXJlRWZmZWN0cwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc3RhdGljIGZvckZlYXR1cmUoZmVhdHVyZUVmZmVjdHMgPSBbXSkgewogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgbmdNb2R1bGU6IEVmZmVjdHNGZWF0dXJlTW9kdWxlLAogICAgICAgICAgICAgICAgcHJvdmlkZXJzOiBbCiAgICAgICAgICAgICAgICAgICAgZmVhdHVyZUVmZmVjdHMsCiAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICBwcm92aWRlOiBfRkVBVFVSRV9FRkZFQ1RTLAogICAgICAgICAgICAgICAgICAgICAgICBtdWx0aTogdHJ1ZSwKICAgICAgICAgICAgICAgICAgICAgICAgdXNlVmFsdWU6IGZlYXR1cmVFZmZlY3RzLAogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICBwcm92aWRlOiBVU0VSX1BST1ZJREVEX0VGRkVDVFMsCiAgICAgICAgICAgICAgICAgICAgICAgIG11bHRpOiB0cnVlLAogICAgICAgICAgICAgICAgICAgICAgICB1c2VWYWx1ZTogW10sCiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgIHByb3ZpZGU6IEZFQVRVUkVfRUZGRUNUUywKICAgICAgICAgICAgICAgICAgICAgICAgbXVsdGk6IHRydWUsCiAgICAgICAgICAgICAgICAgICAgICAgIHVzZUZhY3Rvcnk6IGNyZWF0ZUVmZmVjdHMsCiAgICAgICAgICAgICAgICAgICAgICAgIGRlcHM6IFtJbmplY3RvciwgX0ZFQVRVUkVfRUZGRUNUUywgVVNFUl9QUk9WSURFRF9FRkZFQ1RTXSwKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgfTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/PX0gcm9vdEVmZmVjdHMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHN0YXRpYyBmb3JSb290KHJvb3RFZmZlY3RzID0gW10pIHsKICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIG5nTW9kdWxlOiBFZmZlY3RzUm9vdE1vZHVsZSwKICAgICAgICAgICAgICAgIHByb3ZpZGVyczogWwogICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgcHJvdmlkZTogX1JPT1RfRUZGRUNUU19HVUFSRCwKICAgICAgICAgICAgICAgICAgICAgICAgdXNlRmFjdG9yeTogX3Byb3ZpZGVGb3JSb290R3VhcmQkMSwKICAgICAgICAgICAgICAgICAgICAgICAgZGVwczogW1tFZmZlY3RzUnVubmVyLCBuZXcgT3B0aW9uYWwoKSwgbmV3IFNraXBTZWxmKCldXSwKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgcHJvdmlkZTogRUZGRUNUU19FUlJPUl9IQU5ETEVSLAogICAgICAgICAgICAgICAgICAgICAgICB1c2VWYWx1ZTogZGVmYXVsdEVmZmVjdHNFcnJvckhhbmRsZXIsCiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICBFZmZlY3RzUnVubmVyLAogICAgICAgICAgICAgICAgICAgIEVmZmVjdFNvdXJjZXMsCiAgICAgICAgICAgICAgICAgICAgQWN0aW9ucywKICAgICAgICAgICAgICAgICAgICByb290RWZmZWN0cywKICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgIHByb3ZpZGU6IF9ST09UX0VGRkVDVFMsCiAgICAgICAgICAgICAgICAgICAgICAgIHVzZVZhbHVlOiBbcm9vdEVmZmVjdHNdLAogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICBwcm92aWRlOiBVU0VSX1BST1ZJREVEX0VGRkVDVFMsCiAgICAgICAgICAgICAgICAgICAgICAgIG11bHRpOiB0cnVlLAogICAgICAgICAgICAgICAgICAgICAgICB1c2VWYWx1ZTogW10sCiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgIHByb3ZpZGU6IFJPT1RfRUZGRUNUUywKICAgICAgICAgICAgICAgICAgICAgICAgdXNlRmFjdG9yeTogY3JlYXRlRWZmZWN0cywKICAgICAgICAgICAgICAgICAgICAgICAgZGVwczogW0luamVjdG9yLCBfUk9PVF9FRkZFQ1RTLCBVU0VSX1BST1ZJREVEX0VGRkVDVFNdLAogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICBdLAogICAgICAgICAgICB9OwogICAgICAgIH0KICAgIH0KICAgIEVmZmVjdHNNb2R1bGUuybVtb2QgPSDJtcm1ZGVmaW5lTmdNb2R1bGUoeyB0eXB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AgICAgICAgJ2RhdGV0aW1lLWxvY2FsJywKICAgICAgICAnZW1haWwnLAogICAgICAgICdmaWxlJywKICAgICAgICAnaGlkZGVuJywKICAgICAgICAnaW1hZ2UnLAogICAgICAgICdtb250aCcsCiAgICAgICAgJ251bWJlcicsCiAgICAgICAgJ3Bhc3N3b3JkJywKICAgICAgICAncmFkaW8nLAogICAgICAgICdyYW5nZScsCiAgICAgICAgJ3Jlc2V0JywKICAgICAgICAnc2VhcmNoJywKICAgICAgICAnc3VibWl0JywKICAgICAgICAndGVsJywKICAgICAgICAndGV4dCcsCiAgICAgICAgJ3RpbWUnLAogICAgICAgICd1cmwnLAogICAgICAgICd3ZWVrJywKICAgIF07CiAgICAvKioKICAgICAqIEByZXR1cm4gez99IFRoZSBpbnB1dCB0eXBlcyBzdXBwb3J0ZWQgYnkgdGhpcyBicm93c2VyLgogICAgICovCiAgICBmdW5jdGlvbiBnZXRTdXBwb3J0ZWRJbnB1dFR5cGVzKCkgewogICAgICAgIC8vIFJlc3VsdCBpcyBjYWNoZWQuCiAgICAgICAgaWYgKHN1cHBvcnRlZElucHV0VHlwZXMpIHsKICAgICAgICAgICAgcmV0dXJuIHN1cHBvcnRlZElucHV0VHlwZXM7CiAgICAgICAgfQogICAgICAgIC8vIFdlIGNhbid0IGNoZWNrIGlmIGFuIGlucHV0IHR5cGUgaXMgbm90IHN1cHBvcnRlZCB1bnRpbCB3ZSdyZSBvbiB0aGUgYnJvd3Nlciwgc28gc2F5IHRoYXQKICAgICAgICAvLyBldmVyeXRoaW5nIGlzIHN1cHBvcnRlZCB3aGVuIG5vdCBvbiB0aGUgYnJvd3Nlci4gV2UgZG9uJ3QgdXNlIGBQbGF0Zm9ybWAgaGVyZSBzaW5jZSBpdCdzCiAgICAgICAgLy8ganVzdCBhIGhlbHBlciBmdW5jdGlvbiBhbmQgY2FuJ3QgaW5qZWN0IGl0LgogICAgICAgIGlmICh0eXBlb2YgZG9jdW1lbnQgIT09ICdvYmplY3QnIHx8IC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luZXIgYW5kIGEgMnB4IHdpZGUgY29udGVudCBlbGVtZW50LgogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHNjcm9sbENvbnRhaW5lciA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2RpdicpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGNvbnRhaW5lclN0eWxlID0gc2Nyb2xsQ29udGFpbmVyLnN0eWxlOwogICAgICAgICAgICBzY3JvbGxDb250YWluZXIuZGlyID0gJ3J0bCc7CiAgICAgICAgICAgIGNvbnRhaW5lclN0eWxlLmhlaWdodCA9ICcxcHgnOwogICAgICAgICAgICBjb250YWluZXJTdHlsZS53aWR0aCA9ICcxcHgnOwogICAgICAgICAgICBjb250YWluZXJTdHlsZS5vdmVyZmxvdyA9ICdhdXRvJzsKICAgICAgICAgICAgY29udGFpbmVyU3R5bGUudmlzaWJpbGl0eSA9ICdoaWRkZW4nOwogICAgICAgICAgICBjb250YWluZXJTdHlsZS5wb2ludGVyRXZlbnRzID0gJ25vbmUnOwogICAgICAgICAgICBjb250YWluZXJTdHlsZS5wb3NpdGlvbiA9ICdhYnNvbHV0ZSc7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgY29udGVudCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2RpdicpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGNvbnRlbnRTdHlsZSA9IGNvbnRlbnQuc3R5bGU7CiAgICAgICAgICAgIGNvbnRlbnRTdHlsZS53aWR0aCA9ICcycHgnOwogICAgICAgICAgICBjb250ZW50U3R5bGUuaGVpZ2h0ID0gJzFweCc7CiAgICAgICAgICAgIHNjcm9sbENvbnRhaW5lci5hcHBlbmRDaGlsZChjb250ZW50KTsKICAgICAgICAgICAgZG9jdW1lbnQuYm9keS5hcHBlbm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XJuIG5ldyBNdXRhdGlvbk9ic2VydmVyRmFjdG9yeSgpOyB9LCB0b2tlbjogTXV0YXRpb25PYnNlcnZlckZhY3RvcnksIHByb3ZpZGVkSW46ICJyb290IiB9KTsKICAgIC8qKgogICAgICogQW4gaW5qZWN0YWJsZSBzZXJ2aWNlIHRoYXQgYWxsb3dzIHdhdGNoaW5nIGVsZW1lbnRzIGZvciBjaGFuZ2VzIHRvIHRoZWlyIGNvbnRlbnQuCiAgICAgKi8KICAgIGNsYXNzIENvbnRlbnRPYnNlcnZlciB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBfbXV0YXRpb25PYnNlcnZlckZhY3RvcnkKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihfbXV0YXRpb25PYnNlcnZlckZhY3RvcnkpIHsKICAgICAgICAgICAgdGhpcy5fbXV0YXRpb25PYnNlcnZlckZhY3RvcnkgPSBfbXV0YXRpb25PYnNlcnZlckZhY3Rvcnk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBLZWVwcyB0cmFjayBvZiB0aGUgZXhpc3RpbmcgTXV0YXRpb25PYnNlcnZlcnMgc28gdGhleSBjYW4gYmUgcmV1c2VkLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fb2JzZXJ2ZWRFbGVtZW50cyA9IG5ldyBNYXAoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uRGVzdHJveSgpIHsKICAgICAgICAgICAgdGhpcy5fb2JzZXJ2ZWRFbGVtZW50cy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKF8sIGVsZW1lbnQpID0+IHRoaXMuX2NsZWFudXBPYnNlcnZlcihlbGVtZW50KSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnRPclJlZgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb2JzZXJ2ZShlbGVtZW50T3JSZWYpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBlbGVtZW50ID0gY29lcmNlRWxlbWVudChlbGVtZW50T3JSZWYpOwogICAgICAgICAgICByZXR1cm4gbmV3IE9ic2VydmFibGUoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IG9ic2VydmVyCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAob2JzZXJ2ZXIpID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHN0cmVhbSA9IHRoaXMuX29ic2VydmVFbGVtZW50KGVsZW1lbnQpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3Qgc3Vic2NyaXB0aW9uID0gc3RyZWFtLnN1YnNjcmliZShvYnNlcnZlcik7CiAgICAgICAgICAgICAgICByZXR1cm4gKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHN1YnNjcmlwdGlvbi51bnN1YnNjcmliZSgpOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX3Vub2JzZXJ2ZUVsZW1lbnQoZWxlbWVudCk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBPYnNlcnZlcyB0aGUgZ2l2ZW4gZWxlbWVudCBieSB1c2luZyB0aGUgZXhpc3RpbmcgTXV0YXRpb25PYnNlcnZlciBpZiBhdmFpbGFibGUsIG9yIGNyZWF0aW5nIGEKICAgICAgICAgKiBuZXcgb25lIGlmIG5vdC4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX29ic2VydmVFbGVtZW50KGVsZW1lbnQpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLl9vYnNlcnZlZEVsZW1lbnRzLmhhcyhlbGVtZW50KSkgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3Qgc3RyZWFtID0gbmV3IFN1YmplY3QoKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IG9ic2VydmVyID0gdGhpcy5fbXV0YXRpb25PYnNlcnZlckZhY3RvcnkuY3JlYXRlKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbXV0YXRpb25zCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBtdXRhdGlvbnMgPT4gc3RyZWFtLm5leHQobXV0YXRpb25zKSkpOwogICAgICAgICAgICAgICAgaWYgKG9ic2VydmVyKSB7CiAgICAgICAgICAgICAgICAgICAgb2JzZXJ2ZXIub2JzZXJ2ZShlbGVtZW50LCB7CiAgICAgICAgICAgICAgICAgICAgICAgIGNoYXJhY3RlckRhdGE6IHRydWUsCiAgICAgICAgICAgICAgICAgICAgICAgIGNoaWxkTGlzdDogdHJ1ZSwKICAgICAgICAgICAgICAgICAgICAgICAgc3VidHJlZTogdHJ1ZQogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdGhpcy5fb2JzZXJ2ZWRFbGVtZW50cy5zZXQoZWxlbWVudCwgeyBvYnNlcnZlciwgc3RyZWFtLCBjb3VudDogMSB9KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovICh0aGlzLl9vYnNlcnZlZEVsZW1lbnRzLmdldChlbGVtZW50KSkpLmNvdW50Kys7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovICh0aGlzLl9vYnNlcnZlZEVsZW1lbnRzLmdldChlbGVtZW50KSkpLnN0cmVhbTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVW4tb2JzZXJ2ZXMgdGhlIGdpdmVuIGVsZW1lbnQgYW5kIGNsZWFucyB1cCB0aGUgdW5kZXJseWluZyBNdXRhdGlvbk9ic2VydmVyIGlmIG5vYm9keSBlbHNlIGlzCiAgICAgICAgICogb2JzZXJ2aW5nIHRoaXMgZWxlbWVudC4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3Vub2JzZXJ2ZUVsZW1lbnQoZWxlbWVudCkgewogICAgICAgICAgICBpZiAodGhpcy5fb2JzZXJ2ZWRFbGVtZW50cy5oYXMoZWxlbWVudCkpIHsKICAgICAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovICh0aGlzLl9vYnNlcnZlZEVsZW1lbnRzLmdldChlbGVtZW50KSkpLmNvdW50LS07CiAgICAgICAgICAgICAgICBpZiAoISgvKiogQHR5cGUgez99ICovICh0aGlzLl9vYnNlcnZlZEVsZW1lbnRzLmdldChlbGVtZW50KSkpLmNvdW50KSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fY2xlYW51cE9ic2VydmVyKGVsZW1lbnQpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENsZWFuIHVwI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c2FibGVkID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuX2N1cnJlbnRTdWJzY3JpcHRpb24gPSBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGV0aGVyIG9ic2VydmluZyBjb250ZW50IGlzIGRpc2FibGVkLiBUaGlzIG9wdGlvbiBjYW4gYmUgdXNlZAogICAgICAgICAqIHRvIGRpc2Nvbm5lY3QgdGhlIHVuZGVybHlpbmcgTXV0YXRpb25PYnNlcnZlciB1bnRpbCBpdCBpcyBuZWVkZWQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgZGlzYWJsZWQoKSB7IHJldHVybiB0aGlzLl9kaXNhYmxlZDsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBkaXNhYmxlZCh2YWx1ZSkgewogICAgICAgICAgICB0aGlzLl9kaXNhYmxlZCA9IGNvZXJjZUJvb2xlYW5Qcm9wZXJ0eSh2YWx1ZSk7CiAgICAgICAgICAgIHRoaXMuX2Rpc2FibGVkID8gdGhpcy5fdW5zdWJzY3JpYmUoKSA6IHRoaXMuX3N1YnNjcmliZSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBEZWJvdW5jZSBpbnRlcnZhbCBmb3IgZW1pdHRpbmcgdGhlIGNoYW5nZXMuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgZGVib3VuY2UoKSB7IHJldHVybiB0aGlzLl9kZWJvdW5jZTsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBkZWJvdW5jZSh2YWx1ZSkgewogICAgICAgICAgICB0aGlzLl9kZWJvdW5jZSA9IGNvZXJjZU51bWJlclByb3BlcnR5KHZhbHVlKTsKICAgICAgICAgICAgdGhpcy5fc3Vic2NyaWJlKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdBZnRlckNvbnRlbnRJbml0KCkgewogICAgICAgICAgICBpZiAoIXRoaXMuX2N1cnJlbnRTdWJzY3JpcHRpb24gJiYgIXRoaXMuZGlzYWJsZWQpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3N1YnNjcmliZSgpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkRlc3Ryb3koKSB7CiAgICAgICAgICAgIHRoaXMuX3Vuc3Vic2NyaWJlKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfc3Vic2NyaWJlKCkgewogICAgICAgICAgICB0aGlzLl91bnN1YnNjcmliZSgpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHN0cmVhbSA9IHRoaXMuX2NvbnRlbnRPYnNlcnZlci5vYnNlcnZlKHRoaXMuX2VsZW1lbnRSZWYpOwogICAgICAgICAgICAvLyBUT0RPKG1tYWxlcmJhKTogV2Ugc2hvdWxkbid0IGJlIGVtaXR0aW5nIG9uIHRoaXMgQE91dHB1dCgpIG91dHNpZGUgdGhlIHpvbmUuCiAgICAgICAgICAgIC8vIENvbnNpZGVyIGJyaW5pbmcgaXQgYmFjayBpbnNpZGUgdGhlIHpvbmUgbmV4dCB0aW1lIHdlJ3JlIG1ha2luZyBicmVha2luZyBjaGFuZ2VzLgogICAgICAgICAgICAvLyBCcmluZ2luZyBpdCBiYWNrIGluc2lkZSBjYW4gY2F1c2UgdGhpbmdzIGxpa2UgaW5maW5pdGUgY2hhbmdlIGRldGVjdGlvbiBsb29wcyBhbmQgY2hhbmdlZAogICAgICAgICAgICAvLyBhZnRlciBjaGVja2VkIGVycm9ycyBpZiBwZW9wbGUncyBjb2RlIGlzbid0IGhhbmRsaW5nIGl0IHByb3Blcmx5LgogICAgICAgICAgICB0aGlzLl9uZ1pvbmUucnVuT3V0c2lkZUFuZ3VsYXIoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgdGhpcy5fY3VycmVudFN1YnNjcmlwdGlvbiA9CiAgICAgICAgICAgICAgICAgICAgKHRoaXMuZGVib3VuY2UgPyBzdHJlYW0ucGlwZShkZWJvdW5jZVRpbWUodGhpcy5kZWJvdW5jZSkpIDogc3RyZWFtKS5zdWJzY3JpYmUodGhpcy5ldmVudCk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF91bnN1YnNjcmliZSgpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX2N1cnJlbnRTdWJzY3JpcHRpb24pIHsKICAgICAgICAgICAgICAgIHRoaXMuX2N1cnJlbnRTdWJzY3JpcHRpb24udW5zdWJzY3JpYmUoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIENka09ic2VydmVDb250ZW50Lsm1ZmFjID0gZnVuY3Rpb24gQ2RrT2JzZXJ2ZUNvbnRlbnRfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgQ2RrT2JzZXJ2ZUNvbnRlbnQpKMm1ybVkaXJlY3RpdmVJbmplY3QoQ29udGVudE9ic2VydmVyKSwgybXJtWRpcmVjdGl2ZUluamVjdChFbGVtZW50UmVmKSwgybXJtWRpcmVjdGl2ZUluamVjdChOZ1pvbmUpKTsgfTsKICAgIENka09ic2Vyd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GlzdGluZ0lkLnRyaW0oKSA9PSBpZC50cmltKCkpKSkgewogICAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIGlkcy5wdXNoKGlkLnRyaW0oKSk7CiAgICAgICAgZWwuc2V0QXR0cmlidXRlKGF0dHIsIGlkcy5qb2luKElEX0RFTElNSVRFUikpOwogICAgfQogICAgLyoqCiAgICAgKiBSZW1vdmVzIHRoZSBnaXZlbiBJRCBmcm9tIHRoZSBzcGVjaWZpZWQgQVJJQSBhdHRyaWJ1dGUgb24gYW4gZWxlbWVudC4KICAgICAqIFVzZWQgZm9yIGF0dHJpYnV0ZXMgc3VjaCBhcyBhcmlhLWxhYmVsbGVkYnksIGFyaWEtb3ducywgZXRjLgogICAgICogQHBhcmFtIHs/fSBlbAogICAgICogQHBhcmFtIHs/fSBhdHRyCiAgICAgKiBAcGFyYW0gez99IGlkCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiByZW1vdmVBcmlhUmVmZXJlbmNlZElkKGVsLCBhdHRyLCBpZCkgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBpZHMgPSBnZXRBcmlhUmVmZXJlbmNlSWRzKGVsLCBhdHRyKTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgZmlsdGVyZWRJZHMgPSBpZHMuZmlsdGVyKCgvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdmFsID0+IHZhbCAhPSBpZC50cmltKCkpKTsKICAgICAgICBpZiAoZmlsdGVyZWRJZHMubGVuZ3RoKSB7CiAgICAgICAgICAgIGVsLnNldEF0dHJpYnV0ZShhdHRyLCBmaWx0ZXJlZElkcy5qb2luKElEX0RFTElNSVRFUikpOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgZWwucmVtb3ZlQXR0cmlidXRlKGF0dHI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KICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmICghbWVzc2FnZVJlZ2lzdHJ5LmhhcyhtZXNzYWdlKSkgewogICAgICAgICAgICAgICAgdGhpcy5fY3JlYXRlTWVzc2FnZUVsZW1lbnQobWVzc2FnZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKCF0aGlzLl9pc0VsZW1lbnREZXNjcmliZWRCeU1lc3NhZ2UoaG9zdEVsZW1lbnQsIG1lc3NhZ2UpKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9hZGRNZXNzYWdlUmVmZXJlbmNlKGhvc3RFbGVtZW50LCBtZXNzYWdlKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZW1vdmVzIHRoZSBob3N0IGVsZW1lbnQncyBhcmlhLWRlc2NyaWJlZGJ5IHJlZmVyZW5jZSB0byB0aGUgbWVzc2FnZSBlbGVtZW50LgogICAgICAgICAqIEBwYXJhbSB7P30gaG9zdEVsZW1lbnQKICAgICAgICAgKiBAcGFyYW0gez99IG1lc3NhZ2UKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlbW92ZURlc2NyaXB0aW9uKGhvc3RFbGVtZW50LCBtZXNzYWdlKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5faXNFbGVtZW50Tm9kZShob3N0RWxlbWVudCkpIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5faXNFbGVtZW50RGVzY3JpYmVkQnlNZXNzYWdlKGhvc3RFbGVtZW50LCBtZXNzYWdlKSkgewogICAgICAgICAgICAgICAgdGhpcy5fcmVtb3ZlTWVzc2FnZVJlZmVyZW5jZShob3N0RWxlbWVudCwgbWVzc2FnZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gSWYgdGhlIG1lc3NhZ2UgaXMgYSBzdHJpbmcsIGl0IG1lYW5zIHRoYXQgaXQncyBvbmUgdGhhdCB3ZSBjcmVhdGVkIGZvciB0aGUKICAgICAgICAgICAgLy8gY29uc3VtZXIgc28gd2UgY2FuIHJlbW92ZSBpdCBzYWZlbHksIG90aGVyd2lzZSB3ZSBzaG91bGQgbGVhdmUgaXQgaW4gcGxhY2UuCiAgICAgICAgICAgIGlmICh0eXBlb2YgbWVzc2FnZSA9PT0gJ3N0cmluZycpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHJlZ2lzdGVyZWRNZXNzYWdlID0gbWVzc2FnZVJlZ2lzdHJ5LmdldChtZXNzYWdlKTsKICAgICAgICAgICAgICAgIGlmIChyZWdpc3RlcmVkTWVzc2FnZSAmJiByZWdpc3RlcmVkTWVzc2FnZS5yZWZlcmVuY2VDb3VudCA9PT0gMCkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX2RlbGV0ZU1lc3NhZ2VFbGVtZW50KG1lc3NhZ2UpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChtZXNzYWdlc0NvbnRhaW5lciAmJiBtZXNzYWdlc0NvbnRhaW5lci5jaGlsZE5vZGVzLmxlbmd0aCA9PT0gMCkgewogICAgICAgICAgICAgICAgdGhpcy5fZGVsZXRlTWVzc2FnZXNDb250YWluZXIoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBVbnJlZ2lzdGVycyBhbGwgY3JlYXRlZCBtZXNzYWdlIGVsZW1lbnRzIGFuZCByZW1vdmVzIHRoZSBtZXNzYWdlIGNvbnRhaW5lci4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25EZXN0cm95KCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGRlc2NyaWJlZEVsZW1lbnRzID0gdGhpcy5fZG9jdW1lbnQucXVl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wogICAgICAgICAgICB0aGlzLl9zZXRNZXNzYWdlSWQobWVzc2FnZUVsZW1lbnQpOwogICAgICAgICAgICBtZXNzYWdlRWxlbWVudC50ZXh0Q29udGVudCA9IG1lc3NhZ2U7CiAgICAgICAgICAgIHRoaXMuX2NyZWF0ZU1lc3NhZ2VzQ29udGFpbmVyKCk7CiAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovIChtZXNzYWdlc0NvbnRhaW5lcikpLmFwcGVuZENoaWxkKG1lc3NhZ2VFbGVtZW50KTsKICAgICAgICAgICAgbWVzc2FnZVJlZ2lzdHJ5LnNldChtZXNzYWdlLCB7IG1lc3NhZ2VFbGVtZW50LCByZWZlcmVuY2VDb3VudDogMCB9KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQXNzaWducyBhIHVuaXF1ZSBJRCB0byBhbiBlbGVtZW50LCBpZiBpdCBkb2Vzbid0IGhhdmUgb25lIGFscmVhZHkuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9zZXRNZXNzYWdlSWQoZWxlbWVudCkgewogICAgICAgICAgICBpZiAoIWVsZW1lbnQuaWQpIHsKICAgICAgICAgICAgICAgIGVsZW1lbnQuaWQgPSBgJHtDREtfREVTQ1JJQkVEQllfSURfUFJFRklYfS0ke25leHRJZCsrfWA7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogRGVsZXRlcyB0aGUgbWVzc2FnZSBlbGVtZW50IGZyb20gdGhlIGdsb2JhbCBtZXNzYWdlcyBjb250YWluZXIuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IG1lc3NhZ2UKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9kZWxldGVNZXNzYWdlRWxlbWVudChtZXNzYWdlK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pb24gd2hlcmUgdGhlcmUncwogICAgICAgICAgICAgICAgLy8gYWxyZWFkeSBhIGNvbnRhaW5lciBvbiB0aGUgcGFnZSwgYnV0IHdlIGRvbid0IGhhdmUgYSByZWZlcmVuY2UgdG8gaXQuIENsZWFyIHRoZQogICAgICAgICAgICAgICAgLy8gb2xkIGNvbnRhaW5lciBzbyB3ZSBkb24ndCBnZXQgZHVwbGljYXRlcy4gRG9pbmcgdGhpcywgaW5zdGVhZCBvZiBlbXB0eWluZyB0aGUgcHJldmlvdXMKICAgICAgICAgICAgICAgIC8vIGNvbnRhaW5lciwgc2hvdWxkIGJlIHNsaWdodGx5IGZhc3Rlci4KICAgICAgICAgICAgICAgIGlmIChwcmVFeGlzdGluZ0NvbnRhaW5lcikgewogICAgICAgICAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovIChwcmVFeGlzdGluZ0NvbnRhaW5lci5wYXJlbnROb2RlKSkucmVtb3ZlQ2hpbGQocHJlRXhpc3RpbmdDb250YWluZXIpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgbWVzc2FnZXNDb250YWluZXIgPSB0aGlzLl9kb2N1bWVudC5jcmVhdGVFbGVtZW50KCdkaXYnKTsKICAgICAgICAgICAgICAgIG1lc3NhZ2VzQ29udGFpbmVyLmlkID0gTUVTU0FHRVNfQ09OVEFJTkVSX0lEOwogICAgICAgICAgICAgICAgbWVzc2FnZXNDb250YWluZXIuc2V0QXR0cmlidXRlKCdhcmlhLWhpZGRlbicsICd0cnVlJyk7CiAgICAgICAgICAgICAgICBtZXNzYWdlc0NvbnRhaW5lci5zdHlsZS5kaXNwbGF5ID0gJ25vbmUnOwogICAgICAgICAgICAgICAgdGhpcy5fZG9jdW1lbnQuYm9keS5hcHBlbmRDaGlsZChtZXNzYWdlc0NvbnRhaW5lcik7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogRGVsZXRlcyB0aGUgZ2xvYmFsIG1lc3NhZ2VzIGNvbnRhaW5lci4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2RlbGV0ZU1lc3NhZ2VzQ29udGFpbmVyKCkgewogICAgICAgICAgICBpZiAobWVzc2FnZXNDb250YWluZXIgJiYgbWVzc2FnZXNDb250YWluZXIucGFyZW50Tm9kZSkgewogICAgICAgICAgICAgICAgbWVzc2FnZXNDb250YWluZXIucGFyZW50Tm9kZS5yZW1vdmVDaGlsZChtZXNzYWdlc0NvbnRhaW5lcik7CiAgICAgICAgICAgICAgICBtZXNzYWdlc0NvbnRhaW5lciA9IG51bGw7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmVtb3ZlcyBhbGwgY2RrLWRlc2NyaWJlZGJ5IG1lc3NhZ2VzIHRoYXQgYXJlIGhvc3RlZCB0aHJvdWdoIHRoZSBlbGVtZW50LgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfcmVtb3ZlQ2RrRGVzY3JpYmVkQnlSZWZlcmVuY2VJZHMoZWxlbWVudCkgewogICAgICAgICAgICAvLyBSZW1vdmUgYWxsIGFyaWEtZGVzY3JpYmVkYnkgcmVmZXJlbmNlIElEcyB0aGF0IGFyZSBwcmVmaXhlZCBieSBDREtfREVTQ1JJQkVEQllfSURfUFJFRklYCiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgb3JpZ2luYWxSZWZlcmVuY2VJZHMgPSBnZXRBcmlhUmVmZXJlbmNlSWRzKGVsZW1lbnQsICdhcmlhLWRlc2NyaWJlZGJ5JykKICAgICAgICAgICAgICAgIC5maWx0ZXIoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGlkCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBpZCA9PiBpZC5pbmRleE9mKENES19ERVNDUklCRURCWV9JRF9QUkVGSVgpICE9IDApKTsKICAgICAgICAgICAgZWxlbWVudC5zZXRBdHRyaWJ1dGUoJ2FyaWEtZGVzY3JpYmVkYnknLCBvcmlnaW5hbFJlZmVyZW5jZUlkcy5qb2luKCcgJykpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBZGRzIGEgbWVzc2FnZSByZWZlcmVuY2UgdG8gdGhlIGVsZW1lbnQgdXNpbmcgYXJpYS1kZXNjcmliZWRieSBhbmQgaW5jcmVtZW50cyB0aGUgcmVnaXN0ZXJlZAogICAgICAgICAqIG1lc3NhZ2UncyByZWZlcmVuY2UgY291bnQuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgKiBAcGFyYW0gez99IG1lc3NhZ2UKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9hZGRNZXNzYWdlUmVmZXJlbmNlKGVsZW1lbnQsIG1lc3NhZ2UpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCByZWdpc3RlcmVkTWVzc2FnZSA9ICgvKiogQHR5cGUgez99ICovIChtZXNzYWdlUmVnaXN0cnkuZ2V0KG1lc3NhZ2UpKSk7CiAgICAgICAgICAgIC8vIEFkZCB0aGUgYXJpYS1kZXNjcmliZWRieSByZWZlcmVuY2UgYW5kIHNldCB0aGUKICAgICAgICAgICAgLy8gZGVzY3JpYmVkYnlfaG9zdCBhdHRyaWJ1dGUgdG8gbWFyayB0aGUgZWxlbWVudC4KICAgICAgICAgICAgYWRkQXJpYVJlZmVyZW5jZWRJZChlbGVtZW50LCAnYXJpYS1kZXNjcmliZWRieScsIHJlZ2lzdGVyZWRNZXNzYWdlLm1lc3NhZ2VFbGVtZW50LmlkKTsKICAgICAgICA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VtcyB0byBiZSBhbiBhcnJheSBiZWNhdXNlLCBpbiBzb21lIGNhc2VzLCB0aGUgY29uc3VtZXIgbWF5CiAgICAgICAgICAgIC8vIG5vdCBoYXZlIGFjY2VzcyB0byBhIFF1ZXJ5TGlzdCBvZiB0aGUgaXRlbXMgdGhleSB3YW50IHRvIG1hbmFnZSAoZS5nLiB3aGVuIHRoZQogICAgICAgICAgICAvLyBpdGVtcyBhcmVuJ3QgYmVpbmcgY29sbGVjdGVkIHZpYSBgVmlld0NoaWxkcmVuYCBvciBgQ29udGVudENoaWxkcmVuYCkuCiAgICAgICAgICAgIGlmIChfaXRlbXMgaW5zdGFuY2VvZiBRdWVyeUxpc3QpIHsKICAgICAgICAgICAgICAgIF9pdGVtcy5jaGFuZ2VzLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IG5ld0l0ZW1zCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAobmV3SXRlbXMpID0+IHsKICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5fYWN0aXZlSXRlbSkgewogICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGl0ZW1BcnJheSA9IG5ld0l0ZW1zLnRvQXJyYXkoKTsKICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBuZXdJbmRleCA9IGl0ZW1BcnJheS5pbmRleE9mKHRoaXMuX2FjdGl2ZUl0ZW0pOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAobmV3SW5kZXggPiAtMSAmJiBuZXdJbmRleCAhPT0gdGhpcy5fYWN0aXZlSXRlbUluZGV4KSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9hY3RpdmVJdGVtSW5kZXggPSBuZXdJbmRleDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIHRoZSBwcmVkaWNhdGUgZnVuY3Rpb24gdGhhdCBkZXRlcm1pbmVzIHdoaWNoIGl0ZW1zIHNob3VsZCBiZSBza2lwcGVkIGJ5IHRoZQogICAgICAgICAqIGxpc3Qga2V5IG1hbmFnZXIuCiAgICAgICAgICogQHRlbXBsYXRlIFRISVMKICAgICAgICAgKiBAdGhpcyB7VEhJU30KICAgICAgICAgKiBAcGFyYW0gez99IHByZWRpY2F0ZSBGdW5jdGlvbiB0aGF0IGRldGVybWluZXMgd2hldGhlciB0aGUgZ2l2ZW4gaXRlbSBzaG91bGQgYmUgc2tpcHBlZC4KICAgICAgICAgKiBAcmV0dXJuIHtUSElTfQogICAgICAgICAqLwogICAgICAgIHNraXBQcmVkaWNhdGUocHJlZGljYXRlKSB7CiAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovICh0aGlzKSkuX3NraXBQcmVkaWNhdGVGbiA9IHByZWRpY2F0ZTsKICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovICh0aGlzKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENvbmZpZ3VyZXMgd3JhcHBpbmcgbW9kZSwgd2hpY2ggZGV0ZXJtaW5lcyB3aGV0aGVyIHRoZSBhY3RpdmUgaXRlbSB3aWxsIHdyYXAgdG8KICAgICAgICAgKiB0aGUgb3RoZXIgZW5kIG9mIGxpc3Qgd2hlbiB0aGVyZSBhcmUgbm8gbW9yZSBpdGVtcyBpbiB0aGUgZ2l2ZW4gZGlyZWN0aW9uLgogICAgICAgICAqIEB0ZW1wbGF0ZSBUSElTCiAgICAgICAgICogQHRoaXMge1RISVN9CiAgICAgICAgICogQHBhcmFtIHs/PX0gc2hvdWxkV3JhcCBXaGV0aGVyIHRoZSBsaXN0IHNob3VsZCB3cmFwIHdoZW4gcmVhY2hpbmcgdGhlIGVuZC4KICAgICAgICAgKiBAcmV0dXJuIHtUSElTfQogICAgICAgICAqLwogICAgICAgIHdpdGhXcmFwKHNob3VsZFdyYXAgPSB0cnVlKSB7CiAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovICh0aGlzKSkuX3dyYXAgPSBzaG91bGRXcmFwOwogICAgICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ29uZmlndXJlcyB3aGV0aGVyIHRoZSBrZXkgbWFuYWdlciBzaG91bGQgYmUgYWJsZSB0byBtb3ZlIHRoZSBzZWxlY3Rpb24gdmVydGljYWxseS4KICAgICAgICAgKiBAdGVtcGxhdGUgVEhJUwogICAgICAgICAqIEB0aGlzIHtUSElTfQogICAgICAgICAqIEBwYXJhbSB7Pz19IGVuYWJsZWQgV2hldGhlciB2ZXJ0aWNhbCBzZWxlY3Rpb24gc2hvdWxkIGJlIGVuYWJsZWQuCiAgICAgICAgICogQHJldHVybiB7VEhJU30KICAgICAgICAgKi8KICAgICAgICB3aXRoVmVydGljYWxPcmllbnRhdGlvbihlbmFibGVkID0gdHJ1ZSkgewogICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpLl92ZXJ0aWNhbCA9IGVuYWJsZWQ7CiAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDb25maWd1cmVzIHRoZSBrZXkgbWFuYWdlciB0byBtb3ZlIHRoZSBzZWxlY3Rpb24gaG9yaXpvbnRhbGx5LgogICAgICAgICAqIFBhc3NpbmcgaW4gYG51bGxgIHdpbGwgZGlzYWJsZSBob3Jpem9udGFsIG1vdmVtZW50LgogICAgICAgICAqIEB0ZW1wbGF0ZSBUSElTCiAgICAgICAgICogQHRoaXMge1RISVN9CiAgICAgICAgICogQHBhcmFtIHs/fSBkaXJlY3Rpb24gRGlyZWN0aW9uIGluIHdoaWNoIHRoZSBzZWxlY3Rpb24gY2FuIGJlIG1vdmVkLgogICAgICAgICAqIEByZXR1cm4ge1RISVN9CiAgICAgICAgICovCiAgICAgICAgd2l0aEhvcml6b250YWxPcmllbnRhdGlvbihkaXJlY3Rpb24pIHsKICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKS5faG9yaXpvbnRhbCA9IGRpcmVjdGlvbjsKICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovICh0aGlzKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIE1vZGlmaWVyIGtleXMgd2hpY2ggYXJlIGFsbG93ZWQgdG8gYmUgaGVsZCBkb3duIGFuZCB3aG9zZSBkZWZhdWx0IGFjdGlvbnMgd2lsbCBiZSBwcmV2ZW50ZWQKICAgICAgICAgKiBhcyB0aGUgdXNlciBpcyBwcmVzc2luZyB0aGUgYXJyb3cga2V5cy4gRGVmYXVsdHMgdG8gbm90IGFsbG93aW5nIGFueSBtb2RpZmllciBrZXlzLgogICAgICAgICAqIEB0ZW1wbGF0ZSBUSElTCiAgICAgICAgICogQHRoaXMge1RISVN9CiAgICAgICAgICogQHBhcmFtIHs/fSBrZXlzCiAgICAgICAgICogQHJldHVybiB7VEhJU30KICAgICAgICAgKi8KICAgICAgICB3aXRoQWxsb3dlZE1vZGlmaWVyS2V5cyhrZXlzKSB7CiAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovICh0aGlzKSkuX2FsbG93ZWRNb2RpZmllcktleXMgPSBrZXlzOwogICAgICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVHVybnMgb24gdHlwZWFoZWFkIG1vZGUgd2hpY2ggYWxsb3dzIHVz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AgIC8vIGFuZCBjb252ZXJ0IHRob3NlIGxldHRlcnMgYmFjayBpbnRvIGEgc3RyaW5nLiBBZnRlcndhcmRzIGZpbmQgdGhlIGZpcnN0IGl0ZW0gdGhhdCBzdGFydHMKICAgICAgICAgICAgLy8gd2l0aCB0aGF0IHN0cmluZyBhbmQgc2VsZWN0IGl0LgogICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpLl90eXBlYWhlYWRTdWJzY3JpcHRpb24gPSAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpLl9sZXR0ZXJLZXlTdHJlYW0ucGlwZSh0YXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGxldHRlcgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgbGV0dGVyID0+ICgvKiogQHR5cGUgez99ICovICh0aGlzKSkuX3ByZXNzZWRMZXR0ZXJzLnB1c2gobGV0dGVyKSkpLCBkZWJvdW5jZVRpbWUoZGVib3VuY2VJbnRlcnZhbCksIGZpbHRlcigoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpLl9wcmVzc2VkTGV0dGVycy5sZW5ndGggPiAwKSksIG1hcCgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpLl9wcmVzc2VkTGV0dGVycy5qb2luKCcnKSkpKS5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGlucHV0U3RyaW5nCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBpbnB1dFN0cmluZyA9PiB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBpdGVtcyA9ICgvKiogQHR5cGUgez99ICovICh0aGlzKSkuX2dldEl0ZW1zQXJyYXkoKTsKICAgICAgICAgICAgICAgIC8vIFN0YXJ0IGF0IDEgYmVjYXVzZSB3ZSB3YW50IHRvIHN0YXJ0IHNlYXJjaGluZyBhdCB0aGUgaXRlbSBpbW1lZGlhdGVseQogICAgICAgICAgICAgICAgLy8gZm9sbG93aW5nIHRoZSBjdXJyZW50IGFjdGl2ZSBpdGVtLgogICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDE7IGkgPCBpdGVtcy5sZW5ndGggKyAxOyBpKyspIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgaW5kZXggPSAoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKS5fYWN0aXZlSXRlbUluZGV4ICsgaSkgJSBpdGVtcy5sZW5ndGg7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGl0ZW0gPSBpdGVtc1tpbmRleF07CiAgICAgICAgICAgICAgICAgICAgaWYgKCEoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpLl9za2lwUHJlZGljYXRlRm4oaXRlbSkgJiYKICAgICAgICAgICAgICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKGl0ZW0uZ2V0TGFiZWwpKSgpLnRvVXBwZXJDYXNlKCkudHJpbSgpLmluZGV4T2YoaW5wdXRTdHJpbmcpID09PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovICh0aGlzKSkuc2V0QWN0aXZlSXRlbShpbmRleCk7CiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovICh0aGlzKSkuX3ByZXNzZWRMZXR0ZXJzID0gW107CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovICh0aGlzKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gaXRlbQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0QWN0aXZlSXRlbShpdGVtKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcHJldmlvdXNJbmRleCA9IHRoaXMuX2FjdGl2ZUl0ZW1JbmRleDsKICAgICAgICAgICAgdGhpcy51cGRhdGVBY3RpdmVJdGVtKGl0ZW0pOwogICAgICAgICAgICBpZiAodGhpcy5fYWN0aXZlSXRlbUluZGV4ICE9PSBwcmV2aW91c0luZGV4KSB7CiAgICAgICAgICAgICAgICB0aGlzLmNoYW5nZS5uZXh0KHRoaXMuX2FjdGl2ZUl0ZW1JbmRleCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU2V0cyB0aGUgYWN0aXZlIGl0ZW0gZGVwZW5kaW5nIG9uIHRoZSBrZXkgZXZlbnQgcGFzc2VkIGluLgogICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQgS2V5Ym9hcmQgZXZlbnQgdG8gYmUgdXNlZCBmb3IgZGV0ZXJtaW5pbmcgd2hpY2ggZWxlbWVudCBzaG91bGQgYmUgYWN0aXZlLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25LZXlkb3duKGV2ZW50KSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qga2V5Q29kZSA9IGV2ZW50LmtleUNvZGU7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbW9kaWZpZXJzID0gWydhbHRLZXknLCAnY3RybEtleScsICdtZXRhS2V5JywgJ3NoaWZ0S2V5J107CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaXNNb2RpZmllckFsbG93ZWQgPSBtb2RpZmllcnMuZXZlcnkoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IG1vZGlmaWVyCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBtb2RpZmllciA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gIWV2ZW50W21vZGlmaWVyXSB8fCB0aGlzLl9hbGxvd2VkTW9kaWZpZXJLZXlzLmluZGV4T2YobW9kaWZpZXIpID4gLTE7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgc3dpdGNoIChrZXlDb2RlKSB7CiAgICAgICAgICAgICAgICBjYXNlIFRBQjoKICAgICAgICAgICAgICAgICAgICB0aGlzLnRhYk91dC5uZXh0KCk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgY2FzZSBET1dOX0FSUk9XOgogICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLl92ZXJ0aWNhbCAmJiBpc01vZGlmaWVyQWxsb3dlZCkgewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNldE5leHRJdGVtQWN0aXZlKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGNhc2UgVVBfQVJST1c6CiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX3ZlcnRpY2FsICYmIGlzTW9kaWZpZXJBbGxvd2VkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0UHJldmlvdXNJdGVtQWN0aXZlKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGNhc2UgUklHSFRfQVJST1c6CiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX2hvcml6b250YWwgJiYgaXNNb2RpZmllckFsbG93ZWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5faG9yaXpvbnRhbCA9PT0gJ3J0bCcgPyB0aGlzLnNldFByZXZpb3VzSXRlbUFjdGl2ZSgpIDogdGhpcy5zZXROZXh0SXRlbUFjdGl2ZSgpOwogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjYXNlIExFRlRfQVJST1c6CiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX2hvcml6b250YWwgJiYgaXNNb2RpZmllckFsbG93ZWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5faG9yaXpvbnRhbCA9PT0gJ3J0bCcgPyB0aGlzLnNldE5leHRJdGVtQWN0aXZlKCkgOiB0aGlzLnNldFByZXZpb3VzSXRlbUFjdGl2ZSgpOwogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICAgICAgIGlmIChpc01vZGlmaWVyQWxsb3dlZCB8fCBoYXNNb2RpZmllcktleShldmVudCwgJ3NoaWZ0S2V5JykpIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gQXR0ZW1wdCB0byB1c2UgdGhlIGBldmVudC5rZXlgIHdoaWNoIGFsc28gbWFwcyBpdCB0byB0aGUgdXNlcidzIGtleWJvYXJkIGxhbmd1YWdlLAogICAgICAgICAgICAgICAgICAgICAgICAvLyBvdGhlcndpc2UgZmFsbCBiYWNrIHRvIHJlc29sdmluZyBhbHBoYW51bWVyaWMgY2hhcmFjdGVycyB2aWEgdGhlIGtleUNvZGUuCiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChldmVudC5rZXkgJiYgZXZlbnQua2V5Lmxlbmd0aCA9PT0gMSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fbGV0dGVyS2V5U3RyZWFtLm5leHQoZXZlbnQua2V5LnRvTG9jYWxlVXBwZXJDYXNlKCkpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKChrZXlDb2RlID49IEEgJiYga2V5Q29kZSA8PSBaKSB8fCAoa2V5Q29kZSA+PSBaRVJPICYmIGtleUNvZGUgPD0gTklORSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2xldHRlcktleVN0cmVhbS5uZXh0KFN0cmluZy5mcm9tQ2hhckNvZGUoa2V5Q29kZSkpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIC8vIE5vdGUgdGhhdCB3ZSByZXR1cm4gaGVyZSwgaW4gb3JkZXIgdG8gYXZvaWQgcHJldmVudGluZwogICAgICAgICAgICAgICAgICAgIC8vIHRoZSBkZWZhdWx0IGFjdGlvbiBvZiBub24tbmF2aWdhdGlvbmFsIGtleXMuCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX3ByZXNzZWRMZXR0ZXJzID0gW107CiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEluZGV4IG9mIHRoZSBjdXJyZW50bHkgYWN0aXZlIGl0ZW0uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgYWN0aXZlSXRlbUluZGV4KCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fYWN0aXZlSXRlbUluZGV4OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBUaGUgYWN0aXZlIGl0ZW0uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgYWN0aXZlSXRlbSgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2FjdGl2ZUl0ZW07CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEdldHMgd2hldGhlciB0aGUgdXNlciBpcyBjdXJyZW50bHkgdHlwaW5nIGludG8gdGhlIG1hbmFnZXIgdXNpbmcgdGhlIHR5cGVhaGVhZCBmZWF0dXJlLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgaXNUeXBpbmcoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9wcmVzc2VkTGV0dGVycy5sZW5ndGggPiAwOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIHRoZSBhY3RpdmUgaXRlbSB0byB0aGUgZmlyc3QgZW5hYmxlZCBpdGVtIGluIHRoZSBsaXN0LgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0Rmlyc3RJdGVtQWN0aXZlKCkgewogICAgICAgICAgICB0aGlzLl9zZXRBY3RpdmVJdGVtQnlJbmRleCgwLCAxKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU2V0cyB0aGUgYWN0aXZlIGl0ZW0gdG8gdGhlIGxhc3QgZW5hYmxlZCBpdGVtIGluIHRoZSBsaXN0LgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0TGFzdEl0ZW1BY3RpdmUoKSB7CiAgICAgICAgICAgIHRoaXMuX3NldEFjdGl2ZUl0ZW1CeUluZGV4KHRoaXMuX2l0ZW1zLmxlbmd0aCAtIDEsIC0xKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU2V0cyB0aGUgYWN0aXZlIGl0ZW0gdG8gdGhlIG5leHQgZW5hYmxlZCBpdGVtIGluIHRoZSBsaXN0LgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0TmV4dEl0ZW1BY3RpdmUoKSB7CiAgICAgICAgICAgIHRoaXMuX2FjdGl2ZUl0ZW1JbmRleCA8IDAgPyB0aGlzLnNldEZpcnN0SXRlbUFjdGl2ZSgpIDogdGhpcy5fc2V0QWN0aXZlSXRlbUJ5RGVsdGEoMSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgdGhlIGFjdGl2ZSBpdGVtIHRvIGEgcHJldmlvdXMgZW5hYmxlZCBpdGVtIGluIHRoZSBsaXN0LgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0UHJldmlvdXNJdGVtQWN0aXZlKCkgewogICAgICAgICAgICB0aGlzLl9hY3RpdmVJdGVtSW5kZXggPCAwICYmIHRoaXMuX3dyYXAgPyB0aGlzLnNldExhc3RJdGVtQWN0aXZlKCkKICAgICAgICAgICAgICAgIDogdGhpcy5fc2V0QWN0aXZlSXRlbUJ5RGVsdGEoLTEpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGl0ZW0KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHVwZGF0ZUFjdGl2ZUl0ZW0oaXRlbSkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICA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AgICAgICAgIHRoaXMuX3dyYXAgPyB0aGlzLl9zZXRBY3RpdmVJbldyYXBNb2RlKGRlbHRhKSA6IHRoaXMuX3NldEFjdGl2ZUluRGVmYXVsdE1vZGUoZGVsdGEpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIHRoZSBhY3RpdmUgaXRlbSBwcm9wZXJseSBnaXZlbiAid3JhcCIgbW9kZS4gSW4gb3RoZXIgd29yZHMsIGl0IHdpbGwgY29udGludWUgdG8gbW92ZQogICAgICAgICAqIGRvd24gdGhlIGxpc3QgdW50aWwgaXQgZmluZHMgYW4gaXRlbSB0aGF0IGlzIG5vdCBkaXNhYmxlZCwgYW5kIGl0IHdpbGwgd3JhcCBpZiBpdAogICAgICAgICAqIGVuY291bnRlcnMgZWl0aGVyIGVuZCBvZiB0aGUgbGlzdC4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gZGVsdGEKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9zZXRBY3RpdmVJbldyYXBNb2RlKGRlbHRhKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaXRlbXMgPSB0aGlzLl9nZXRJdGVtc0FycmF5KCk7CiAgICAgICAgICAgIGZvciAobGV0IGkgPSAxOyBpIDw9IGl0ZW1zLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBpbmRleCA9ICh0aGlzLl9hY3RpdmVJdGVtSW5kZXggKyAoZGVsdGEgKiBpKSArIGl0ZW1zLmxlbmd0aCkgJSBpdGVtcy5sZW5ndGg7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBpdGVtID0gaXRlbXNbaW5kZXhdOwogICAgICAgICAgICAgICAgaWYgKCF0aGlzLl9za2lw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lbmFibGVkIGl0ZW0gb3IgZW5jb3VudGVycyB0aGUgZW5kIG9mIHRoZSBsaXN0LgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBpbmRleAogICAgICAgICAqIEBwYXJhbSB7P30gZmFsbGJhY2tEZWx0YQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3NldEFjdGl2ZUl0ZW1CeUluZGV4KGluZGV4LCBmYWxsYmFja0RlbHRhKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaXRlbXMgPSB0aGlzLl9nZXRJdGVtc0FycmF5KCk7CiAgICAgICAgICAgIGlmICghaXRlbXNbaW5kZXhdKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgd2hpbGUgKHRoaXMuX3NraXBQcmVkaWNhdGVGbihpdGVtc1tpbmRleF0pKSB7CiAgICAgICAgICAgICAgICBpbmRleCArPSBmYWxsYmFja0RlbHRhOwogICAgICAgICAgICAgICAgaWYgKCFpdGVtc1tpbmRleF0pIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5zZXRBY3RpdmVJdGVtKGluZGV4KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0dXJucyB0aGUgaXRlbXMgYXMgYW4gYXJyYXkuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9nZXRJdGVtc0FycmF5KCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5faXRlbXMgaW5zdGFuY2VvZiBRdWVyeUxpc3QgPyB0aGlzLl9pdGVtcy50b0FycmF5KCkgOiB0aGlzLl9pdGVtczsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEB0ZW1wbGF0ZSBUCiAgICAgKi8KICAgIGNsYXNzIEFjdGl2ZURlc2NlbmRhbnRLZXlNYW5hZ2VyIGV4dGVuZHMgTGlzdEtleU1hbmFnZXIgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gaW5kZXgKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldEFjdGl2ZUl0ZW0oaW5kZXgpIHsKICAgICAgICAgICAgaWYgKHRoaXMuYWN0aXZlSXRlbSkgewogICAgICAgICAgICAgICAgdGhpcy5hY3RpdmVJdGVtLnNldEluYWN0aXZlU3R5bGVzKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgc3VwZXIuc2V0QWN0aXZlSXRlbShpbmRleCk7CiAgICAgICAgICAgIGlmICh0aGlzLmFjdGl2ZUl0ZW0pIHsKICAgICAgICAgICAgICAgIHRoaXMuYWN0aXZlSXRlbS5zZXRBY3RpdmVTdHlsZXMoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQHRlbXBsYXRlIFQKICAgICAqLwogICAgY2xhc3MgRm9jdXNLZXlNYW5hZ2VyIGV4dGVuZHMgTGlzdEtleU1hbmFnZXIgewogICAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgICAgICBzdXBlciguLi5hcmd1bWVudHMpOwogICAgICAgICAgICB0aGlzLl9vcmlnaW4gPSAncHJvZ3JhbSc7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgdGhlIGZvY3VzIG9yaWdpbiB0aGF0IHdpbGwgYmUgcGFzc2VkIGluIHRvIHRoZSBpdGVtcyBmb3IgYW55IHN1YnNlcXVlbnQgYGZvY3VzYCBjYWxscy4KICAgICAgICAgKiBAdGVtcGxhdGUgVEhJUwogICAgICAgICAqIEB0aGlzIHtUSElTfQogICAgICAgICAqIEBwYXJhbSB7P30gb3JpZ2luIEZvY3VzIG9yaWdpbiB0byBiZSB1c2VkIH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dGhlIGVsZW1lbnQgaXMgdGFiYmFibGUuCiAgICAgICAgICovCiAgICAgICAgaXNUYWJiYWJsZShlbGVtZW50KSB7CiAgICAgICAgICAgIC8vIE5vdGhpbmcgaXMgdGFiYmFibGUgb24gdGhlIHNlcnZlciDwn5iOCiAgICAgICAgICAgIGlmICghdGhpcy5fcGxhdGZvcm0uaXNCcm93c2VyKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBmcmFtZUVsZW1lbnQgPSBnZXRGcmFtZUVsZW1lbnQoZ2V0V2luZG93KGVsZW1lbnQpKTsKICAgICAgICAgICAgaWYgKGZyYW1lRWxlbWVudCkgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZnJhbWVUeXBlID0gZnJhbWVFbGVtZW50ICYmIGZyYW1lRWxlbWVudC5ub2RlTmFtZS50b0xvd2VyQ2FzZSgpOwogICAgICAgICAgICAgICAgLy8gRnJhbWUgZWxlbWVudHMgaW5oZXJpdCB0aGVpciB0YWJpbmRleCBvbnRvIGFsbCBjaGlsZCBlbGVtZW50cy4KICAgICAgICAgICAgICAgIGlmIChnZXRUYWJJbmRleFZhbHVlKGZyYW1lRWxlbWVudCkgPT09IC0xKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLy8gV2Via2l0IGFuZCBCbGluayBjb25zaWRlciBhbnl0aGluZyBpbnNpZGUgb2YgYW4gPG9iamVjdD4gZWxlbWVudCBhcyBub24tdGFiYmFibGUuCiAgICAgICAgICAgICAgICBpZiAoKHRoaXMuX3BsYXRmb3JtLkJMSU5LIHx8IHRoaXMuX3BsYXRmb3JtLldFQktJVCkgJiYgZnJhbWVUeXBlID09PSAnb2JqZWN0JykgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vIFdlYmtpdCBhbmQgQmxpbmsgZGlzYWJsZSB0YWJiaW5nIHRvIGFuIGVsZW1lbnQgaW5zaWRlIG9mIGFuIGludmlzaWJsZSBmcmFtZS4KICAgICAgICAgICAgICAgIGlmICgodGhpcy5fcGxhdGZvcm0uQkxJTksgfHwgdGhpcy5fcGxhdGZvcm0uV0VCS0lUKSAmJiAhdGhpcy5pc1Zpc2libGUoZnJhbWVFbGVtZW50KSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBub2RlTmFtZSA9IGVsZW1lbnQubm9kZU5hbWUudG9Mb3dlckNhc2UoKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgdGFiSW5kZXhWYWx1ZSA9IGdldFRhYkluZGV4VmFsdWUoZWxlbWVudCk7CiAgICAgICAgICAgIGlmIChlbGVtZW50Lmhhc0F0dHJpYnV0ZSgnY29udGVudGVkaXRhYmxlJykpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0YWJJbmRleFZhbHVlICE9PSAtMTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAobm9kZU5hbWUgPT09ICdpZnJhbWUnKSB7CiAgICAgICAgICAgICAgICAvLyBUaGUgZnJhbWVzIG1heSBiZSB0YWJiYWJsZSBkZXBlbmRpbmcgb24gY29udGVudCwgYnV0IGl0J3Mgbm90IHBvc3NpYmx5IHRvIHJlbGlhYmx5CiAgICAgICAgICAgICAgICAvLyBpbnZlc3RpZ2F0ZSB0aGUgY29udGVudCBvZiB0aGUgZnJhbWVzLgogICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChub2RlTmFtZSA9PT0gJ2F1ZGlvJykgewogICAgICAgICAgICAgICAgaWYgKCFlbGVtZW50Lmhhc0F0dHJpYnV0ZSgnY29udHJvbHMnKSkgewogICAgICAgICAgICAgICAgICAgIC8vIEJ5IGRlZmF1bHQgYW4gPGF1ZGlvPiBlbGVtZW50IHdpdGhvdXQgdGhlIGNvbnRyb2xzIGVuYWJsZWQgaXMgbm90IHRhYmJhYmxlLgogICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKHRoaXMuX3BsYXRmb3JtLkJMSU5LKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gSW4gQmxpbmsgPGF1ZGlvIGNvbnRyb2xzPiBlbGVtZW50cyBhcmUgYWx3YXlzIHRhYmJhYmxlLgogICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChub2RlTmFtZSA9PT0gJ3ZpZGVvJykgewogICAgICAgICAgICAgICAgaWYgKCFlbGVtZW50Lmhhc0F0dHJpYnV0ZSgnY29udHJvbHMnKSAmJiB0aGlzLl9wbGF0Zm9ybS5UUklERU5UKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gSW4gVHJpZGVudCBhIDx2aWRlbz4gZWxlbWVudCB3aXRob3V0IHRoZSBjb250cm9scyBlbmFibGVkIGlzIG5vdCB0YWJiYWJsZS4KICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmICh0aGlzLl9wbGF0Zm9ybS5CTElOSyB8fCB0aGlzLl9wbGF0Zm9ybS5GSVJFRk9YKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gSW4gQ2hyb21lIGFuZCBGaXJlZm94IDx2aWRlbyBjb250cm9scz4gZWxlbWVudHMgYXJlIGFsd2F5cyB0YWJiYWJsZS4KICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAobm9kZU5hbWUgPT09ICdvYmplY3QnICYmICh0aGlzLl9wbGF0Zm9ybS5CTElOSyB8fCB0aGlzLl9wbGF0Zm9ybS5XRUJLSVQpKSB7CiAgICAgICAgICAgICAgICAvLyBJbiBhbGwgQmxpbmsgYW5kIFdlYktpdCBiYXNlZCBicm93c2VycyA8b2JqZWN0PiBlbGVtZW50cyBhcmUgbmV2ZXIgdGFiYmFibGUuCiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gSW4gaU9TIHRoZSBicm93c2VyIG9ubHkgY29uc2lkZXJzIHNvbWUgc3BlY2lmaWMgZWxlbWVudHMgYXMgdGFiYmFibGUuCiAgICAgICAgICAgIGlmICh0aGlzLl9wbGF0Zm9ybS5XRUJLSVQgJiYgdGhpcy5fcGxhdGZvcm0uSU9TICYmICFpc1BvdGVudGlhbGx5VGFiYmFibGVJT1MoZWxlbWVudCkpIHsKICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gZWxlbWVudC50YWJJbmRleCA+PSAwOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIHdoZXRoZXIgYW4gZWxlbWVudCBjYW4gYmUgZm9jdXNlZCBieSB0aGUgdXNlci4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudCBFbGVtZW50IHRvIGJlIGNoZWNrZWQuCiAgICAgICAgICogQHJldHVybiB7P30gV2hldGhlciB0aGUgZWxlbWVudCBpcyBmb2N1c2FibGUuCiAgICAgICAgICovCiAgICAgICAgaXNGb2N1c2FibGUoZWxlbWVudCkgewogICAgICAgICAgICAvLyBQZXJmb3JtIGNoZWNrcyBpbiBvcmRlci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AnZnVuY3Rpb24nICYmIGVsZW1lbnQuZ2V0Q2xpZW50UmVjdHMoKS5sZW5ndGgpKTsKICAgIH0KICAgIC8qKgogICAgICogR2V0cyB3aGV0aGVyIGFuIGVsZW1lbnQncwogICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBpc05hdGl2ZUZvcm1FbGVtZW50KGVsZW1lbnQpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IG5vZGVOYW1lID0gZWxlbWVudC5ub2RlTmFtZS50b0xvd2VyQ2FzZSgpOwogICAgICAgIHJldHVybiBub2RlTmFtZSA9PT0gJ2lucHV0JyB8fAogICAgICAgICAgICBub2RlTmFtZSA9PT0gJ3NlbGVjdCcgfHwKICAgICAgICAgICAgbm9kZU5hbWUgPT09ICdidXR0b24nIHx8CiAgICAgICAgICAgIG5vZGVOYW1lID09PSAndGV4dGFyZWEnOwogICAgfQogICAgLyoqCiAgICAgKiBHZXRzIHdoZXRoZXIgYW4gZWxlbWVudCBpcyBhbiBgPGlucHV0IHR5cGU9ImhpZGRlbiI+YC4KICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gaXNIaWRkZW5JbnB1dChlbGVtZW50KSB7CiAgICAgICAgcmV0dXJuIGlzSW5wdXRFbGVtZW50KGVsZW1lbnQpICYmIGVsZW1lbnQudHlwZSA9PSAnaGlkZGVuJzsKICAgIH0KICAgIC8qKgogICAgICogR2V0cyB3aGV0aGVyIGFuIGVsZW1lbnQgaXMgYW4gYW5jaG9yIHRoYXQgaGFzIGFuIGhyZWYgYXR0cmlidXRlLgogICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBpc0FuY2hvcldpdGhIcmVmKGVsZW1lbnQpIHsKICAgICAgICByZXR1cm4gaXNBbmNob3JFbGVtZW50KGVsZW1lbnQpICYmIGVsZW1lbnQuaGFzQXR0cmlidXRlKCdocmVmJyk7CiAgICB9CiAgICAvKioKICAgICAqIEdldHMgd2hldGhlciBhbiBlbGVtZW50IGlzIGFuIGlucHV0IGVsZW1lbnQuCiAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGlzSW5wdXRFbGVtZW50KGVsZW1lbnQpIHsKICAgICAgICByZXR1cm4gZWxlbWVudC5ub2RlTmFtZS50b0xvd2VyQ2FzZSgpID09ICdpbnB1dCc7CiAgICB9CiAgICAvKioKICAgICAqIEdldHMgd2hldGhlciBhbiBlbGVtZW50IGlzIGFuIGFuY2hvciBlbGVtZW50LgogICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBpc0FuY2hvckVsZW1lbnQoZWxlbWVudCkgewogICAgICAgIHJldHVybiBlbGVtZW50Lm5vZGVOYW1lLnRvTG93ZXJDYXNlKCkgPT0gJ2EnOwogICAgfQogICAgLyoqCiAgICAgKiBHZXRzIHdoZXRoZXIgYW4gZWxlbWVudCBoYXMgYSB2YWxpZCB0YWJpbmRleC4KICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gaGFzVmFsaWRUYWJJbmRleChlbGVtZW50KSB7CiAgICAgICAgaWYgKCFlbGVtZW50Lmhhc0F0dHJpYnV0ZSgndGFiaW5kZXgnKSB8fCBlbGVtZW50LnRhYkluZGV4ID09PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgIH0KICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IHRhYkluZGV4ID0gZWxlbWVudC5nZXRBdHRyaWJ1dGUoJ3RhYmluZ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xseSB0YWJiYWJsZSBvbiBpT1MKICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gaXNQb3RlbnRpYWxseVRhYmJhYmxlSU9TKGVsZW1lbnQpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IG5vZGVOYW1lID0gZWxlbWVudC5ub2RlTmFtZS50b0xvd2VyQ2FzZSgpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgaW5wdXRUeXBlID0gbm9kZU5hbWUgPT09ICdpbnB1dCcgJiYgKCgvKiogQHR5cGUgez99ICovIChlbGVtZW50KSkpLnR5cGU7CiAgICAgICAgcmV0dXJuIGlucHV0VHlwZSA9PT0gJ3RleHQnCiAgICAgICAgICAgIHx8IGlucHV0VHlwZSA9PT0gJ3Bhc3N3b3JkJwogICAgICAgICAgICB8fCBub2RlTmFtZSA9PT0gJ3NlbGVjdCcKICAgICAgICAgICAgfHwgbm9kZU5hbWUgPT09ICd0ZXh0YXJlYSc7CiAgICB9CiAgICAvKioKICAgICAqIEdldHMgd2hldGhlciBhbiBlbGVtZW50IGlzIHBvdGVudGlhbGx5IGZvY3VzYWJsZSB3aXRob3V0IHRha2luZyBjdXJyZW50IHZpc2libGUvZGlzYWJsZWQgc3RhdGUKICAgICAqIGludG8gYWNjb3VudC4KICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gaXNQb3RlbnRpYWxseUZvY3VzYWJsZShlbGVtZW50KSB7CiAgICAgICAgLy8gSW5wdXRzIGFyZSBwb3RlbnRpYWxseSBmb2N1c2FibGUgKnVubGVzcyogdGhleSdyZSB0eXBlPSJoaWRkZW4iLgogICAgICAgIGlmIChpc0hpZGRlbklucHV0KGVsZW1lbnQpKSB7CiAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICB9CiAgICAg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W50ID0gX2RvY3VtZW50OwogICAgICAgICAgICB0aGlzLl9oYXNBdHRhY2hlZCA9IGZhbHNlOwogICAgICAgICAgICAvLyBFdmVudCBsaXN0ZW5lcnMgZm9yIHRoZSBhbmNob3JzLiBOZWVkIHRvIGJlIHJlZ3VsYXIgZnVuY3Rpb25zIHNvIHRoYXQgd2UgY2FuIHVuYmluZCB0aGVtIGxhdGVyLgogICAgICAgICAgICB0aGlzLnN0YXJ0QW5jaG9yTGlzdGVuZXIgPSAoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB0aGlzLmZvY3VzTGFzdFRhYmJhYmxlRWxlbWVudCgpKTsKICAgICAgICAgICAgdGhpcy5lbmRBbmNob3JMaXN0ZW5lciA9ICgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHRoaXMuZm9jdXNGaXJzdFRhYmJhYmxlRWxlbWVudCgpKTsKICAgICAgICAgICAgdGhpcy5fZW5hYmxlZCA9IHRydWU7CiAgICAgICAgICAgIGlmICghZGVmZXJBbmNob3JzKSB7CiAgICAgICAgICAgICAgICB0aGlzLmF0dGFjaEFuY2hvcnMoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGV0aGVyIHRoZSBmb2N1cyB0cmFwIGlzIGFjdGl2ZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBlbmFibGVkKCkgeyByZXR1cm4gdGhpcy5fZW5hYmxlZDsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBlbmFibGVkKHZhbHVlKSB7CiAgICAgICAgICAgIHRoaXMuX2VuYWJsZWQgPSB2YWx1ZTsKICAgICAgICAgICAgaWYgKHRoaXMuX3N0YXJ0QW5jaG9yICYmIHRoaXMuX2VuZEFuY2hvcikgewogICAgICAgICAgICAgICAgdGhpcy5fdG9nZ2xlQW5jaG9yVGFiSW5kZXgodmFsdWUsIHRoaXMuX3N0YXJ0QW5jaG9yKTsKICAgICAgICAgICAgICAgIHRoaXMuX3RvZ2dsZUFuY2hvclRhYkluZGV4KHZhbHVlLCB0aGlzLl9lbmRBbmNob3IpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIERlc3Ryb3lzIHRoZSBmb2N1cyB0cmFwIGJ5IGNsZWFuaW5nIHVwIHRoZSBhbmNob3JzLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZGVzdHJveSgpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBzdGFydEFuY2hvciA9IHRoaXMuX3N0YXJ0QW5jaG9yOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGVuZEFuY2hvciA9IHRoaXMuX2VuZEFuY2hvcjsKICAgICAgICAgICAgaWYgKHN0YXJ0QW5jaG9yKSB7CiAgICAgICAgICAgICAgICBzdGFydEFuY2hvci5yZW1vdmVFdmVudExpc3RlbmVyKCdmb2N1cycsIHRoaXMuc3RhcnRBbmNob3JMaXN0ZW5lcik7CiAgICAgICAgICAgICAgICBpZiAoc3RhcnRBbmNob3IucGFyZW50Tm9kZSkgewogICAgICAgICAgICAgICAgICAgIHN0YXJ0QW5jaG9yLnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQoc3RhcnRBbmNob3IpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChlbmRBbmNob3IpIHsKICAgICAgICAgICAgICAgIGVuZEFuY2hvci5yZW1vdmVFdmVudExpc3RlbmVyKCdmb2N1cycsIHRoaXMuZW5kQW5jaG9yTGlzdGVuZXIpOwogICAgICAgICAgICAgICAgaWYgKGVuZEFuY2hvci5wYXJlbnROb2RlKSB7CiAgICAgICAgICAgICAgICAgICAgZW5kQW5jaG9yLnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQoZW5kQW5jaG9yKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9zdGFydEFuY2hvciA9IHRoaXMuX2VuZEFuY2hvciA9IG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEluc2VydHMgdGhlIGFuY2hvcnMgaW50byB0aGUgRE9NLiBUaGlzIGlzIHVzdWFsbHkgZG9uZSBhdXRvbWF0aWNhbGx5CiAgICAgICAgICogaW4gdGhlIGNvbnN0cnVjdG9yLCBidXQgY2FuIGJlIGRlZmVycmVkIGZvciBjYXNlcyBsaWtlIGRpcmVjdGl2ZXMgd2l0aCBgKm5nSWZgLgogICAgICAgICAqIEByZXR1cm4gez99IFdoZXRoZXIgdGhlIGZvY3VzIHRyYXAgbWFuYWdlZCB0byBhdHRhY2ggc3VjY2Vzc2Z1bHkuIFRoaXMgbWF5IG5vdCBiZSB0aGUgY2FzZQogICAgICAgICAqIGlmIHRoZSB0YXJnZXQgZWxlbWVudCBpc24ndCBjdXJyZW50bHkgaW4gdGhlIERPTS4KICAgICAgICAgKi8KICAgICAgICBhdHRhY2hBbmNob3JzKCkgewogICAgICAgICAgICAvLyBJZiB3ZSdyZSBub3Qgb24gdGhlIGJyb3dzZXIsIHRoZXJlIGNhbiBiZSBubyBmb2N1cyB0byB0cmFwLgogICAgICAgICAgICBpZiAodGhpcy5faGFzQXR0YWNoZWQpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX25nWm9uZS5ydW5PdXRzaWRlQW5ndWxhcigoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAoIXRoaXMuX3N0YXJ0QW5jaG9yKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fc3RhcnRBbmNob3IgPSB0aGlzLl9jcmVhdGVBbmNob3IoKTsKICAgICAgICAgICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5fc3RhcnRBbmNob3IpKS5hZGRFdmVudExpc3RlbmVyKCdmb2N1cycsIHRoaXMuc3RhcnRBbmNob3JMaXN0ZW5lcik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAoIXRoaXMuX2VuZEFuY2hvcikgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX2VuZEFuY2hvciA9IHRoaXMuX2NyZWF0ZUFuY2hvcigpOwogICAgICAgICAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovICh0aGlzLl9lbmRBbmNob3IpKS5hZGRFdmVudExpc3RlbmVyKCdmb2N1cycsIHRoaXMuZW5kQW5jaG9yTGlzdGVuZXIpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIGlmICh0aGlzLl9lbGVtZW50LnBhcmVudE5vZGUpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2VsZW1lbnQucGFyZW50Tm9kZS5pbnNlcnRCZWZvcmUoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX3N0YXJ0QW5jaG9yKSksIHRoaXMuX2VsZW1lbnQpOwogICAgICAgICAgICAgICAgdGhpcy5fZWxlbWVudC5wYXJlbnROb2RlLmluc2VydEJlZm9yZSgoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5fZW5kQW5jaG9yKSksIHRoaXMuX2VsZW1lbnQubmV4dFNpYmxpbmcpOwogICAgICAgICAgICAgICAgdGhpcy5faGFzQXR0YWNoZWQgPSB0cnVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9oYXNBdHRhY2hlZDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogV2FpdHMgZm9yIHRoZSB6b25lIHRvIHN0YWJpbGl6ZSwgdGhlbiBlaXRoZXIgZm9jdXNlcyB0aGUgZmlyc3QgZWxlbWVudCB0aGF0IHRoZQogICAgICAgICAqIHVzZXIgc3BlY2lmaWVkLCBvciB0aGUgZmlyc3QgdGFiYmFibGUgZWxlbWVudC4KICAgICAgICAgKiBAcmV0dXJuIHs/fSBSZXR1cm5zIGEgcHJvbWlzZSB0aGF0IHJlc29sdmVzIHdpdGggYSBib29sZWFuLCBkZXBlbmRpbmcKICAgICAgICAgKiBvbiB3aGV0aGVyIGZvY3VzIHdhcyBtb3ZlZCBzdWNjZXNzZnVseS4KICAgICAgICAgKi8KICAgICAgICBmb2N1c0luaXRpYWxFbGVtZW50V2hlblJlYWR5KCkgewogICAgICAgICAgICByZXR1cm4gbmV3IFByb21pc2UoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHJlc29sdmUKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHJlc29sdmUgPT4gewogICAgICAgICAgICAgICAgdGhpcy5fZXhlY3V0ZU9uU3RhYmxlKCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHJlc29sdmUodGhpcy5mb2N1c0luaXRpYWxFbGVtZW50KCkpKSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogV2FpdHMgZm9yIHRoZSB6b25lIHRvIHN0YWJpbGl6ZSwgdGhlbiBmb2N1c2VzCiAgICAgICAgICogdGhlIGZpcnN0IHRhYmJhYmxlIGVsZW1lbnQgd2l0aGluIHRoZSBmb2N1cyB0cmFwIHJlZ2lvbi4KICAgICAgICAgKiBAcmV0dXJuIHs/fSBSZXR1cm5zIGEgcHJvbWlzZSB0aGF0IHJlc29sdmVzIHdpdGggYSBib29sZWFuLCBkZXBlbmRpbmcKICAgICAgICAgKiBvbiB3aGV0aGVyIGZvY3VzIHdhcyBtb3ZlZCBzdWNjZXNzZnVseS4KICAgICAgICAgKi8KICAgICAgICBmb2N1c0ZpcnN0VGFiYmFibGVFbGVtZW50V2hlblJlYWR5KCkgewogICAgICAgICAgICByZXR1cm4gbmV3IFByb21pc2UoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHJlc29sdmUKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHJlc29sdmUgPT4gewogICAgICAgICAgICAgICAgdGhpcy5fZXhlY3V0ZU9uU3RhYmxlKCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHJlc29sdmUodGhpcy5mb2N1c0ZpcnN0VGFiYmFibGVFbGVtZW50KCkpKSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogV2FpdHMgZm9yIHRoZSB6b25lIHRvIHN0YWJpbGl6ZSwgdGhlbiBmb2N1c2VzCiAgICAgICAgICogdGhlIGxhc3QgdGFiYmFibGUgZWxlbWVudCB3aXRoaW4gdGhlIGZvY3VzIHRyYXAgcmVnaW9uLgogICAgICAgICAqIEByZXR1cm4gez99IFJldHVybnMgYSBwcm9taXNlIHRoYXQgcmVzb2x2ZXMgd2l0aCBhIGJvb2xlYW4sIGRlcGVuZGluZwogICAgICAgICAqIG9uIHdoZXRoZXIgZm9jdXMgd2FzIG1vdmVkIHN1Y2Nlc3NmdWx5LgogICAgICAgICAqLwogICAgICAgIGZvY3VzTGFzdFRhYmJhYmxlRWxlbWVudFdoZW5SZWFkeSgpIHsKICAgICAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSByZXNvbHZlCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICByZXNvbHZlID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuX2V4ZWN1dGVPblN0YWJsZSgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiByZXNvbHZlKHRoaXMuZm9jdXNMYXN0VGFiYmFibGVFbGVtZW50KCkpKSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogR2V0IHRoZSBzcGVjaWZpZWQgYm91bmRhcnkgZWxlbWVudCBvZiB0aGUgdHJhcHBlZCByZWdpb24uCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGJvdW5kIFRoZSBib3VuZGFyeSB0byBnZXQgKHN0YXJ0IG9yIGVuZCBvZiB0cmFwcGVkIHJlZ2lvbikuCiAgICAgICAgICogQHJldHVybiB7P30gVGhlIGJvdW5kYXJ5IGVsZW1lbnQuCiAgICAgICAgICovCiAgICAgICAgX2dldFJlZ2lvbkJvdW5kYXJ5KGJvdW5kKSB7CiAgICAgICAgICAgIC8vIENvbnRhaW5zIHRoZSBkZXByZWNhdGVkIHZlcnNpb24gb2Ygc2VsZWN0b3IsIGZvciB0ZW1wb3JhcnkgYmFja3dhcmRzIGNvbXBhcmFiaWxpdHkuCiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IG1hcmtlcnMgPSAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5fZWxlbWVudC5xdWVyeVNlbGVjdG9yQWxsKGBbY2RrLWZvY3VzLXJlZ2lvbi0ke2JvdW5kfV0sIGAgKwogICAgICAgICAgICAgICAgYFtjZGtGb2N1c1JlZ2lvbiR7Ym91bmR9XSwgYCArCiAgICAgICAgICAgICAgICBgW2Nkay1mb2N1cy0ke2JvdW5kfV1gKSkpOw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b0VsZW1lbnQuaGFzQXR0cmlidXRlKGBjZGstZm9jdXMtaW5pdGlhbGApKSB7CiAgICAgICAgICAgICAgICAgICAgY29uc29sZS53YXJuKGBGb3VuZCB1c2Ugb2YgZGVwcmVjYXRlZCBhdHRyaWJ1dGUgJ2Nkay1mb2N1cy1pbml0aWFsJywgYCArCiAgICAgICAgICAgICAgICAgICAgICAgIGB1c2UgJ2Nka0ZvY3VzSW5pdGlhbCcgaW5zdGVhZC4gVGhlIGRlcHJlY2F0ZWQgYXR0cmlidXRlIGAgKwogICAgICAgICAgICAgICAgICAgICAgICBgd2lsbCBiZSByZW1vdmVkIGluIDguMC4wYCwgcmVkaXJlY3RUb0VsZW1lbnQpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLy8gV2FybiB0aGUgY29uc3VtZXIgaWYgdGhlIGVsZW1lbnQgdGhleSd2ZSBwb2ludGVkIHRvCiAgICAgICAgICAgICAgICAvLyBpc24ndCBmb2N1c2FibGUsIHdoZW4gbm90IGluIHByb2R1Y3Rpb24gbW9kZS4KICAgICAgICAgICAgICAgIGlmIChpc0Rldk1vZGUoKSAmJiAhdGhpcy5fY2hlY2tlci5pc0ZvY3VzYWJsZShyZWRpcmVjdFRvRWxlbWVudCkpIHsKICAgICAgICAgICAgICAgICAgICBjb25zb2xlLndhcm4oYEVsZW1lbnQgbWF0Y2hpbmcgJ1tjZGtGb2N1c0luaXRpYWxdJyBpcyBub3QgZm9jdXNhYmxlLmAsIHJlZGlyZWN0VG9FbGVtZW50KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJlZGlyZWN0VG9FbGVtZW50LmZvY3VzKCk7CiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpcy5mb2N1c0ZpcnN0VGFiYmFibGVFbGVtZW50KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEZvY3VzZXMgdGhlIGZpcnN0IHRhYmJhYmxlIGVsZW1lbnQgd2l0aGluIHRoZSBmb2N1cyB0cmFwIHJlZ2lvbi4KICAgICAgICAgKiBAcmV0dXJuIHs/fSBXaGV0aGVyIGZvY3VzIHdhcyBtb3ZlZCBzdWNjZXNzZnVseS4KICAgICAgICAgKi8KICAgICAgICBmb2N1c0ZpcnN0VGFiYmFibGVFbGVtZW50KCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHJlZGlyZWN0VG9FbGVtZW50ID0gdGhpcy5fZ2V0UmVnaW9uQm91bmRhcnkoJ3N0YXJ0Jyk7CiAgICAgICAgICAgIGlmIChyZWRpcmVjdFRvRWxlbWVudCkgewogICAgICAgICAgICAgICAgcmVkaXJlY3RUb0VsZW1lbnQuZm9jdXMoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gISFyZWRpcmVjdFRvRWxlbWVudDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogRm9jdXNlcyB0aGUgbGFzdCB0YWJiYWJsZSBlbGVtZW50IHdpdGhpbiB0aGUgZm9jdXMgdHJhcCByZWdpb24uCiAgICAgICAgICogQHJldHVybiB7P30gV2hldGhlciBmb2N1cyB3YXMgbW92ZWQgc3VjY2Vzc2Z1bHkuCiAgICAgICAgICovCiAgICAgICAgZm9jdXNMYXN0VGFiYmFibGVFbGVtZW50KCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHJlZGlyZWN0VG9FbGVtZW50ID0gdGhpcy5fZ2V0UmVnaW9uQm91bmRhcnkoJ2VuZCcpOwogICAgICAgICAgICBpZiAocmVkaXJlY3RUb0VsZW1lbnQpIHsKICAgICAgICAgICAgICAgIHJlZGlyZWN0VG9FbGVtZW50LmZvY3VzKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuICEhcmVkaXJlY3RUb0VsZW1lbnQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENoZWNrcyB3aGV0aGVyIHRoZSBmb2N1cyB0cmFwIGhhcyBzdWNjZXNzZnVseSBiZWVuIGF0dGFjaGVkLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgaGFzQXR0YWNoZWQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9oYXNBdHRhY2hlZDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogR2V0IHRoZSBmaXJzdCB0YWJiYWJsZSBlbGVtZW50IGZyb20gYSBET00gc3VidHJlZSAoaW5jbHVzaXZlKS4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gcm9vdAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2dldEZpcnN0VGFiYmFibGVFbGVtZW50KHJvb3QpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX2NoZWNrZXIuaXNGb2N1c2FibGUocm9vdCkgJiYgdGhpcy5fY2hlY2tlci5pc1RhYmJhYmxlKHJvb3QpKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gcm9vdDsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBJdGVyYXRlIGluIERPTSBvcmRlci4gTm90ZSB0aGF0IElFIGRvZXNuJ3QgaGF2ZSBgY2hpbGRyZW5gIGZvciBTVkcgc28gd2UgZmFsbAogICAgICAgICAgICAvLyBiYWNrIHRvIGBjaGlsZE5vZGVzYCB3aGljaCBpbmNsdWRlcyB0ZXh0IG5vZGVzLCBjb21tZW50cyBldGMuCiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGNoaWxkcmVuID0gcm9vdC5jaGlsZHJlbiB8fCByb290LmNoaWxkTm9kZXM7CiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgY2hpbGRyZW4ubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCB0YWJiYWJsZUNoaWxkID0gY2hpbGRyZW5baV0ubm9kZVR5cGUgPT09IHRoaXMuX2RvY3VtZW50LkVMRU1FTlRfTk9ERSA/CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fZ2V0Rmlyc3RUYWJiYWJsZUVsZW1lbnQoKC8qKiBAdHlwZSB7P30gKi8gKGNoaWxkcmVuW2ldKSkpIDoKICAgICAgICAgICAgICAgICAgICBudWxsOwogICAgICAgICAgICAgICAgaWYgKHRhYmJhYmxlQ2hpbGQpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGFiYmFibGVDaGlsZDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogR2V0IHRoZSBsYXN0IHRhYmJhYmxlIGVsZW1lbnQgZnJvbSBhIERPTSBzdWJ0cmVlIChpbmNsdXNpdmUpLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSByb290CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZ2V0TGFzdFRhYmJhYmxlRWxlbWVudChyb290KSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9jaGVja2VyLmlzRm9jdXNhYmxlKHJvb3QpICYmIHRoaXMuX2NoZWNrZXIuaXNUYWJiYWJsZShyb290KSkgewogICAgICAgICAgICAgICAgcmV0dXJuIHJvb3Q7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gSXRlcmF0ZSBpbiByZXZlcnNlIERPTSBvcmRlci4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgY2hpbGRyZW4gPSByb290LmNoaWxkcmVuIHx8IHJvb3QuY2hpbGROb2RlczsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IGNoaWxkcmVuLmxlbmd0aCAtIDE7IGkgPj0gMDsgaS0tKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBsZXQgdGFiYmFibGVDaGlsZCA9IGNoaWxkcmVuW2ldLm5vZGVUeXBlID09PSB0aGlzLl9kb2N1bWVudC5FTEVNRU5UX05PREUgPwogICAgICAgICAgICAgICAgICAgIHRoaXMuX2dldExhc3RUYWJiYWJsZUVsZW1lbnQoKC8qKiBAdHlwZSB7P30gKi8gKGNoaWxkcmVuW2ldKSkpIDoKICAgICAgICAgICAgICAgICAgICBudWxsOwogICAgICAgICAgICAgICAgaWYgKHRhYmJhYmxlQ2hpbGQpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGFiYmFibGVDaGlsZDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhbiBhbmNob3IgZWxlbWVudC4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2NyZWF0ZUFuY2hvcigpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBhbmNob3IgPSB0aGlzLl9kb2N1bWVudC5jcmVhdGVFbGVtZW50KCdkaXYnKTsKICAgICAgICAgICAgdGhpcy5fdG9nZ2xlQW5jaG9yVGFiSW5kZXgodGhpcy5fZW5hYmxlZCwgYW5jaG9yKTsKICAgICAgICAgICAgYW5jaG9yLmNsYXNzTGlzdC5hZGQoJ2Nkay12aXN1YWxseS1oaWRkZW4nKTsKICAgICAgICAgICAgYW5jaG9yLmNsYXNzTGlzdC5hZGQoJ2Nkay1mb2N1cy10cmFwLWFuY2hvcicpOwogICAgICAgICAgICBhbmNob3Iuc2V0QXR0cmlidXRlKCdhcmlhLWhpZGRlbicsICd0c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ICAgICAgICAgKiBAcGFyYW0gez99IGVuYWJsZWQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHRvZ2dsZUFuY2hvcnMoZW5hYmxlZCkgewogICAgICAgICAgICBpZiAodGhpcy5fc3RhcnRBbmNob3IgJiYgdGhpcy5fZW5kQW5jaG9yKSB7CiAgICAgICAgICAgICAgICB0aGlzLl90b2dnbGVBbmNob3JUYWJJbmRleChlbmFibGVkLCB0aGlzLl9zdGFydEFuY2hvcik7CiAgICAgICAgICAgICAgICB0aGlzLl90b2dnbGVBbmNob3JUYWJJbmRleChlbmFibGVkLCB0aGlzLl9lbmRBbmNob3IpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEV4ZWN1dGVzIGEgZnVuY3Rpb24gd2hlbiB0aGUgem9uZSBpcyBzdGFibGUuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGZuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZXhlY3V0ZU9uU3RhYmxlKGZuKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9uZ1pvbmUuaXNTdGFibGUpIHsKICAgICAgICAgICAgICAgIGZuKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLl9uZ1pvbmUub25TdGFibGUuYXNPYnNlcnZhYmxlKCkucGlwZSh0YWtlKDEpKS5zdWJzY3JpYmUoZm4pOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBGYWN0b3J5IHRoYXQgYWxsb3dzIGVhc3kgaW5zdGFudGlhdGlvbiBvZiBmb2N1cyB0cmFwcy4KICAgICAqIEBkZXByZWNhdGVkIFVzZSBgQ29uZmlndXJhYmxlRm9jdXNUcmFwRmFjdG9yeWAgaW5zdGVhZC4KICAgICAqIFxAYnJlYWtpbmctY2hhbm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W9uLgogICAgICovCiAgICBjbGFzcyBDZGtUcmFwRm9jdXMgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gX2VsZW1lbnRSZWYKICAgICAgICAgKiBAcGFyYW0gez99IF9mb2N1c1RyYXBGYWN0b3J5CiAgICAgICAgICogQHBhcmFtIHs/fSBfZG9jdW1lbnQKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihfZWxlbWVudFJlZiwgX2ZvY3VzVHJhcEZhY3RvcnksIF9kb2N1bWVudCkgewogICAgICAgICAgICB0aGlzLl9lbGVtZW50UmVmID0gX2VsZW1lbnRSZWY7CiAgICAgICAgICAgIHRoaXMuX2ZvY3VzVHJhcEZhY3RvcnkgPSBfZm9jdXNUcmFwRmFjdG9yeTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFByZXZpb3VzbHkgZm9jdXNlZCBlbGVtZW50IHRvIHJlc3RvcmUgZm9jdXMgdG8gdXBvbiBkZXN0cm95IHdoZW4gdXNpbmcgYXV0b0NhcHR1cmUuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9wcmV2aW91c2x5Rm9jdXNlZEVsZW1lbnQgPSBudWxsOwogICAgICAgICAgICB0aGlzLl9kb2N1bWVudCA9IF9kb2N1bWVudDsKICAgICAgICAgICAgdGhpcy5mb2N1c1RyYXAgPSB0aGlzLl9mb2N1c1RyYXBGYWN0b3J5LmNyZWF0ZSh0aGlzLl9lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQsIHRydWUpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGV0aGVyIHRoZSBmb2N1cyB0cmFwIGlzIGFjdGl2ZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBlbmFibGVkKCkgeyByZXR1cm4gdGhpcy5mb2N1c1RyYXAuZW5hYmxlZDsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBlbmFibGVkKHZhbHVlKSB7IHRoaXMuZm9jdXNUcmFwLmVuYWJsZWQgPSBjb2VyY2VCb29sZWFuUHJvcGVydHkodmFsdWUpOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogV2hldGhlciB0aGUgZGlyZWN0aXZlIHNob3VsZCBhdXRvbWF0aWFsbHkgbW92ZSBmb2N1cyBpbnRvIHRoZSB0cmFwcGVkIHJlZ2lvbiB1cG9uCiAgICAgICAgICogaW5pdGlhbGl6YXRpb24gYW5kIHJldHVybiBmb2N1cyB0byB0aGUgcHJldmlvdXMgYWN0aXZlRWxlbWVudCB1cG9uIGRlc3RydWN0aW9uLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGF1dG9DYXB0dXJlKCkgeyByZXR1cm4gdGhpcy5fYXV0b0NhcHR1cmU7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgYXV0b0NhcHR1cmUodmFsdWUpIHsgdGhpcy5fYXV0b0NhcHR1cmUgPSBjb2VyY2VCb29sZWFuUHJvcGVydHkodmFsdWUpOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uRGVzdHJveSgpIHsKICAgICAgICAgICAgdGhpcy5mb2N1c1RyYXAuZGVzdHJveSgpOwogICAgICAgICAgICAvLyBJZiB3ZSBzdG9yZWQgYSBwcmV2aW91c2x5IGZvY3VzZWQgZWxlbWVudCB3aGVuIHVzaW5nIGF1dG9DYXB0dXJlLCByZXR1cm4gZm9jdXMgdG8gdGhhdAogICAgICAgICAgICAvLyBlbGVtZW50IG5vdyB0aGF0IHRoZSB0cmFwcGVkIHJlZ2lvbiBpcyBiZWluZyBkZXN0cm95ZWQuCiAgICAgICAgICAgIGlmICh0aGlzLl9wcmV2aW91c2x5Rm9jdXNlZEVsZW1lbnQpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3ByZXZpb3VzbHlGb2N1c2VkRWxlbWVudC5mb2N1cygpOwogICAgICAgICAgICAgICAgdGhpcy5fcHJldmlvdXNseUZvY3VzZWRFbGVtZW50ID0gbnVsbDsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nQWZ0ZXJDb250ZW50SW5pdCgpIHsKICAgICAgICAgICAgdGhpcy5mb2N1c1RyYXAuYXR0YWNoQW5jaG9ycygpOwogICAgICAgICAgICBpZiAodGhpcy5hdXRvQ2FwdHVyZSkgewogICAgICAgICAgICAgICAgdGhpcy5fcHJldmlvdXNseUZvY3VzZWRFbGVtZW50ID0gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX2RvY3VtZW50LmFjdGl2ZUVsZW1lbnQpKTsKICAgICAgICAgICAgICAgIHRoaXMuZm9jdXNUcmFwLmZvY3VzSW5pdGlhbEVsZW1lbnRXaGVuUmVhZHkoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nRG9DaGVjaygpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLmZvY3VzVHJhcC5oYXNBdHRhY2hlZCgpKSB7CiAgICAgICAgICAgICAgICB0aGlzLmZvY3VzVHJhcC5hdHRhY2hBbmNob3JzKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICBDZGtUcmFwRm9jdXMuybVmYWMgPSBmdW5jdGlvbiBDZGtUcmFwRm9jdXNfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgQ2RrVHJhcEZvY3VzKSjJtcm1ZGlyZWN0aXZlSW5qZWN0KEVsZW1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nWm9uZSwgX2RvY3VtZW50LCBjb25maWcuZGVmZXIpOwogICAgICAgICAgICB0aGlzLl9mb2N1c1RyYXBNYW5hZ2VyID0gX2ZvY3VzVHJhcE1hbmFnZXI7CiAgICAgICAgICAgIHRoaXMuX2luZXJ0U3RyYXRlZ3kgPSBfaW5lcnRTdHJhdGVneTsKICAgICAgICAgICAgdGhpcy5fZm9jdXNUcmFwTWFuYWdlci5yZWdpc3Rlcih0aGlzKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogV2hldGhlciB0aGUgRm9jdXNUcmFwIGlzIGVuYWJsZWQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgZW5hYmxlZCgpIHsgcmV0dXJuIHRoaXMuX2VuYWJsZWQ7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgZW5hYmxlZCh2YWx1ZSkgewogICAgICAgICAgICB0aGlzLl9lbmFibGVkID0gdmFsdWU7CiAgICAgICAgICAgIGlmICh0aGlzLl9lbmFibGVkKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9mb2N1c1RyYXBNYW5hZ2VyLnJlZ2lzdGVyKHRoaXMpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fZm9jdXNUcmFwTWFuYWdlci5kZXJlZ2lzdGVyKHRoaXMpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIE5vdGlmaWVzIHRoZSBGb2N1c1RyYXBNYW5hZ2VyIHRoYXQgdGhpcyBGb2N1c1RyYXAgd2lsbCBiZSBkZXN0cm95ZWQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkZXN0cm95KCkgewogICAgICAgICAgICB0aGlzLl9mb2N1c1RyYXBNYW5hZ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AgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICogQHBhcmFtIHs/fSBzZWxlY3RvcgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gcG9seWZpbGxDbG9zZXN0KGVsZW1lbnQsIHNlbGVjdG9yKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBjdXJyID0gZWxlbWVudDsKICAgICAgICB3aGlsZSAoY3VyciAhPSBudWxsICYmICEoY3VyciBpbnN0YW5jZW9mIEVsZW1lbnQgJiYgbWF0Y2hlcyhjdXJyLCBzZWxlY3RvcikpKSB7CiAgICAgICAgICAgIGN1cnIgPSBjdXJyLnBhcmVudE5vZGU7CiAgICAgICAgfQogICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAoKGN1cnIgfHwgbnVsbCkpKTsKICAgIH0KICAgIC8qKiBAdHlwZSB7P30gKi8KICAgIGNvbnN0IGhhc05hdGl2ZUNsb3Nlc3QgPSB0eXBlb2YgRWxlbWVudCAhPSAndW5kZWZpbmVkJyAmJiAhIUVsZW1lbnQucHJvdG90eXBlLmNsb3Nlc3Q7CiAgICAvKioKICAgICAqIElFIDExIGNvbXBhdGlibGUgbWF0Y2hlcyBpbXBsZW1lbnRhdGlvbi4KICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICogQHBhcmFtIHs/fSBzZWxlY3RvcgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gbWF0Y2hlcyhlbGVtZW50LCBzZWxlY3RvcikgewogICAgICAgIHJldHVybiBlbGVtZW50Lm1hdGNoZXMgPwogICAgICAgICAgICBlbGVtZW50Lm1hdGNoZXMoc2VsZWN0b3IpIDoKICAgICAgICAgICAgKCgvKiogQHR5cGUgez99ICovIChlbGVtZW50KSkpWydtc01hdGNoZXNTZWxlY3RvciddKHNlbGVjdG9yKTsKICAgIH0KCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcg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50CiAgICAgICAgICAgIGlmICh0aGlzLl9saXN0ZW5lcikgewogICAgICAgICAgICAgICAgZm9jdXNUcmFwLl9kb2N1bWVudC5yZW1vdmVFdmVudExpc3RlbmVyKCdmb2N1cycsICgvKiogQHR5cGUgez99ICovICh0aGlzLl9saXN0ZW5lcikpLCB0cnVlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9saXN0ZW5lciA9ICgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBlCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoZSkgPT4gdGhpcy5fdHJhcEZvY3VzKGZvY3VzVHJhcCwgZSkpOwogICAgICAgICAgICBmb2N1c1RyYXAuX25nWm9uZS5ydW5PdXRzaWRlQW5ndWxhcigoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICBmb2N1c1RyYXAuX2RvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIoJ2ZvY3VzJywgKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX2xpc3RlbmVyKSksIHRydWUpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJlbW92ZXMgdGhlIGV2ZW50IGxpc3RlbmVyIGFkZGVkIGluIHByZXZlbnRGb2N1cy4KICAgICAgICAgKiBAcGFyYW0gez99IGZvY3VzVHJhcAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYWxsb3dGb2N1cyhmb2N1c1RyYXApIHsKICAgICAgICAgICAgaWYgKCF0aGlzLl9saXN0ZW5lcikgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGZvY3VzVHJhcC5fZG9jdW1lbnQucmVtb3ZlRXZlbnRMaXN0ZW5lcignZm9jdXMnLCAoLyoqIE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lbnQgaW5zaWRlIHRoZSBGb2N1c1RyYXAsIGV4LiBtYXQtc2VsZWN0LgogICAgICAgICAgICBpZiAoIWZvY3VzVHJhcFJvb3QuY29udGFpbnModGFyZ2V0KSAmJiBjbG9zZXN0KHRhcmdldCwgJ2Rpdi5jZGstb3ZlcmxheS1wYW5lJykgPT09IG51bGwpIHsKICAgICAgICAgICAgICAgIC8vIFNvbWUgbGVnYWN5IEZvY3VzVHJhcCB1c2FnZXMgaGF2ZSBsb2dpYyB0aGF0IGZvY3VzZXMgc29tZSBlbGVtZW50IG9uIHRoZSBwYWdlCiAgICAgICAgICAgICAgICAvLyBqdXN0IGJlZm9yZSBGb2N1c1RyYXAgaXMgZGVzdHJveWVkLiBGb3IgYmFja3dhcmRzIGNvbXBhdGliaWxpdHksIHdhaXQKICAgICAgICAgICAgICAgIC8vIHRvIGJlIHN1cmUgRm9jdXNUcmFwIGlzIHN0aWxsIGVuYWJsZWQgYmVmb3JlIHJlZm9jdXNpbmcuCiAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgICAgICAvLyBDaGVjayB3aGV0aGVyIGZvY3VzIHdhc24ndCBwdXQgYmFjayBpbnRvIHRoZSBmb2N1cyB0cmFwIHdoaWxlIHRoZSB0aW1lb3V0IHdhcyBwZW5kaW5nLgogICAgICAgICAgICAgICAgICAgIGlmIChmb2N1c1RyYXAuZW5hYmxlZCAmJiAhZm9jdXNUcmFwUm9vdC5jb250YWlucyhmb2N1c1RyYXAuX2RvY3VtZW50LmFjdGl2ZUVsZW1lbnQpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGZvY3VzVHJhcC5mb2N1c0ZpcnN0VGFiYmFibGVFbGVtZW50KCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSkpOwogICAgICAgIC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XNUcmFwU3RhY2sgPSBbXTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogRGlzYWJsZXMgdGhlIEZvY3VzVHJhcCBhdCB0aGUgdG9wIG9mIHRoZSBzdGFjaywgYW5kIHRoZW4gcHVzaGVzCiAgICAgICAgICogdGhlIG5ldyBGb2N1c1RyYXAgb250byB0aGUgc3RhY2suCiAgICAgICAgICogQHBhcmFtIHs/fSBmb2N1c1RyYXAKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlZ2lzdGVyKGZvY3VzVHJhcCkgewogICAgICAgICAgICAvLyBEZWR1cGUgZm9jdXNUcmFwcyB0aGF0IHJlZ2lzdGVyIG11bHRpcGxlIHRpbWVzLgogICAgICAgICAgICB0aGlzLl9mb2N1c1RyYXBTdGFjayA9IHRoaXMuX2ZvY3VzVHJhcFN0YWNrLmZpbHRlcigoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZnQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChmdCkgPT4gZnQgIT09IGZvY3VzVHJhcCkpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBzdGFjayA9IHRoaXMuX2ZvY3VzVHJhcFN0YWNrOwogICAgICAgICAgICBpZiAoc3RhY2subGVuZ3RoKSB7CiAgICAgICAgICAgICAgICBzdGFja1tzdGFjay5sZW5ndGggLSAxXS5fZGlzYWJsZSgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHN0YWNrLnB1c2goZm9jdXNUcmFwKTsKICAgICAgICAgICAgZm9jdXNUcmFwLl9lbmFibGUoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmVtb3ZlcyB0aGUgRm9jdXNUcmFwIGZyb20gdGhlIHN0YWNrLCBhbmQgYWN0aXZhdGVzIHRoZQogICAgICAgICAqIEZvY3VzVHJhcCB0aGF0IGlzIHRoZSBuZXcgdG9wIG9mIHRoZSBzdGFjay4KICAgICAgICAgKiBAcGFyYW0gez99IGZvY3VzVHJhcAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZGVyZWdpc3Rlcihmb2N1c1RyYXApIHsKICAgICAgICAgICAgZm9jdXNUcmFwLl9kaXNhYmxlKCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc3RhY2sgPSB0aGlzLl9mb2N1c1RyYXBTdGFjazsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBpID0gc3RhY2suaW5kZXhPZihmb2N1c1RyYXApOwogICAgICAgICAgICBpZiAoaSAhPT0gLTEpIHsKICAgICAgICAgICAgICAgIHN0YWNrLnNwbGljZShpLCAxKTsKICAgICAgICAgICAgICAgIGlmIChzdGFjay5sZW5ndGgpIHsKICAgICAgICAgICAgICAgICAgICBzdGFja1tzdGFjay5sZW5ndGggLSAxXS5fZW5hYmxlKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICBGb2N1c1RyYXBNYW5hZ2VyLsm1ZmFjID0gZnVuY3Rpb24gRm9jdXNUcmFwTWFuYWdlcl9GYWN0b3J5KHQpIHsgcmV0dXJuIG5ldyAodCB8fCBGb2N1c1RyYXBNYW5hZ2VyKSgpOyB9OwogICAgLyoqIEBub2NvbGxhcHNlICovIEZvY3VzVHJhcE1hbmFnZXIuybVwcm92ID0gybXJtWRlZmluZUluamVjdGFibGUoeyBmYWN0b3J5OiBmdW5jdGlvbiBGb2N1c1RyYXBNYW5hZ2VyX0ZhY3RvcnkoKSB7IHJldHVybiBuZXcgRm9jdXNUcmFwTWFuYWdlcigpOyB9LCB0b2tlbjogRm9jdXNUcmFwTWFuYWdlciwgcHJvdmlkZWRJbjogInJvb3QiIH0pOwoKICAgIC8qKgogICAgICogQGZpbGVvdmVydm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KICAgICAgICAgICAgLy8gVE9ETyBzcGxpdCB1cCB0aGUgc3RyYXRlZ2llcyBpbnRvIGRpZmZlcmVudCBtb2R1bGVzLCBzaW1pbGFyIHRvIERhdGVBZGFwdGVyLgogICAgICAgICAgICB0aGlzLl9pbmVydFN0cmF0ZWd5ID0gX2luZXJ0U3RyYXRlZ3kgfHwgbmV3IEV2ZW50TGlzdGVuZXJGb2N1c1RyYXBJbmVydFN0cmF0ZWd5KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAqIEBwYXJhbSB7Pz19IGNvbmZpZwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgY3JlYXRlKGVsZW1lbnQsIGNvbmZpZyA9IG5ldyBDb25maWd1cmFibGVGb2N1c1RyYXBDb25maWcoKSkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBjb25maWdPYmplY3Q7CiAgICAgICAgICAgIGlmICh0eXBlb2YgY29uZmlnID09PSAnYm9vbGVhbicpIHsKICAgICAgICAgICAgICAgIGNvbmZpZ09iamVjdCA9IG5ldyBDb25maWd1cmFibGVGb2N1c1RyYXBDb25maWcoKTsKICAgICAgICAgICAgICAgIGNvbmZpZ09iamVjdC5kZWZlciA9IGNvbmZpZzsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIGNvbmZpZ09iamVjdCA9IGNvbmZpZzsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gbmV3IENvbmZpZ3VyYWJsZUZvY3VzVHJhcChlbGVtZW50LCB0aGlzLl9jaGVja2VyLCB0aGlzLl9uZ1pvbmUsIHRoaXMuX2RvY3VtZW50LCB0aGlzLl9mb2N1c1RyYXBNYW5hZ2VyLCB0aGlzLl9pbmVydFN0cmF0ZWd5LCBjb25maWdPYmplY3QpOwogICAgICAgIH0KICAgIH0KICAgIENv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Wm9uZTsKICAgICAgICAgICAgdGhpcy5fZGVmYXVsdE9wdGlvbnMgPSBfZGVmYXVsdE9wdGlvbnM7CiAgICAgICAgICAgIC8vIFdlIGluamVjdCB0aGUgbGl2ZSBlbGVtZW50IGFuZCBkb2N1bWVudCBhcyBgYW55YCBiZWNhdXNlIHRoZSBjb25zdHJ1Y3RvciBzaWduYXR1cmUgY2Fubm90CiAgICAgICAgICAgIC8vIHJlZmVyZW5jZSBicm93c2VyIGdsb2JhbHMgKEhUTUxFbGVtZW50LCBEb2N1bWVudCkgb24gbm9uLWJyb3dzZXIgZW52aXJvbm1lbnRzLCBzaW5jZSBoYXZpbmcKICAgICAgICAgICAgLy8gYSBjbGFzcyBkZWNvcmF0b3IgY2F1c2VzIFR5cGVTY3JpcHQgdG8gcHJlc2VydmUgdGhlIGNvbnN0cnVjdG9yIHNpZ25hdHVyZSB0eXBlcy4KICAgICAgICAgICAgdGhpcy5fZG9jdW1lbnQgPSBfZG9jdW1lbnQ7CiAgICAgICAgICAgIHRoaXMuX2xpdmVFbGVtZW50ID0gZWxlbWVudFRva2VuIHx8IHRoaXMuX2NyZWF0ZUxpdmVFbGVtZW50KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gbWVzc2FnZQogICAgICAgICAqIEBwYXJhbSB7Li4uP30gYXJncwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYW5ub3VuY2UobWVzc2FnZSwgLi4uYXJncykgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGRlZmF1bHRPcHRpb25zID0gdGhpcy5fZGVmYXVsdE9wdGlvbnM7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHBvbGl0ZW5lc3M7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGR1cmF0aW9uOwogICAgICAgICAgICBpZiAoYXJncy5sZW5ndGggPT09IDEgJiYgdHlwZW9mIGFyZ3NbMF0gPT09ICdudW1iZXInKSB7CiAgICAgICAgICAgICAgICBkdXJhdGlvbiA9IGFyZ3NbMF07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBbcG9saXRlbmVzcywgZHVyYXRpb25dID0gYXJnczsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLmNsZWFyKCk7CiAgICAgICAgICAgIGNsZWFyVGltZW91dCh0aGlzLl9wcmV2aW91c1RpbWVvdXQpOwogICAgICAgICAgICBpZiAoIXBvbGl0ZW5lc3MpIHsKICAgICAgICAgICAgICAgIHBvbGl0ZW5lc3MgPQogICAgICAgICAgICAgICAgICAgIChkZWZhdWx0T3B0aW9ucyAmJiBkZWZhdWx0T3B0aW9ucy5wb2xpdGVuZXNzKSA/IGRlZmF1bHRPcHRpb25zLnBvbGl0ZW5lc3MgOiAncG9saXRlJzsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoZHVyYXRpb24gPT0gbnVsbCAmJiBkZWZhdWx0T3B0aW9ucykgewogICAgICAgICAgICAgICAgZHVyYXRpb24gPSBkZWZhdWx0T3B0aW9ucy5kdXJhdGlvbjsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBUT0RPOiBlbnN1cmUgY2hhbmdpbmcgdGhlIHBvbGl0ZW5lc3Mgd29ya3Mgb24gYWxsIGVudmlyb25tZW50cyB3ZSBzdXBwb3J0LgogICAgICAgICAgICB0aGlzLl9saXZlRWxlbWVudC5zZXRBdHRyaWJ1dGUoJ2FyaWEtbGl2ZScsIHBvbGl0ZW5lc3MpOwogICAgICAgICAgICAvLyBUaGlzIDEwMG1zIHRpbWVvdXQgaXMgbmVjZXNzYXJ5IGZvciBzb21lIGJyb3dzZXIgKyBzY3JlZW4tcmVhZGVyIGNvbWJpbmF0aW9uczoKICAgICAgICAgICAgLy8gLSBCb3RoIEpBV1MgYW5kIE5WREEgb3ZlciBJRTExIHdpbGwgbm90IGFubm91bmNlIGFueXRoaW5nIHdpdGhvdXQgYSBub24temVybyB0aW1lb3V0LgogICAgICAgICAgICAvLyAtIFdpdGggQ2hyb21lIGFuZCBJRTExIHdpdGggTlZEQSBvciBKQVdTLCBhIHJlcGVhdGVkIChpZGVudGljYWwpIG1lc3NhZ2Ugd29uJ3QgYmUgcmVhZCBhCiAgICAgICAgICAgIC8vICAgc2Vjb25kIHRpbWUgd2l0aG91dCBjbGVhcmluZyBhbmQgdGhlbiB1c2luZyBhIG5vbi16ZXJvIGRlbGF5LgogICAgICAgICAgICAvLyAodXNpbmcgSkFXUyAxNyBhdCB0aW1lIG9mIHRoaXMgd3JpdGluZykuCiAgICAgICAgICAgIHJldHVybiB0aGlzLl9uZ1pvbmUucnVuT3V0c2lkZUFuZ3VsYXIoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcmVzb2x2ZQogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgcmVzb2x2ZSA9PiB7CiAgICAgICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHRoaXMuX3ByZXZpb3VzVGltZW91dCk7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fcHJldmlvdXNUaW1lb3V0ID0gc2V0VGltZW91dCgoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2xpdmVFbGVtZW50LnRleHRDb250ZW50ID0gbWVzc2FnZTsKICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZSgpOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGR1cmF0aW9uID09PSAnbnVtYmVyJykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fcHJldmlvdXNUaW1lb3V0ID0gc2V0VGltZW91dCgoLyoqCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKSA9PiB0aGlzLmNsZWFyKCkpLCBkdXJhdGlvbik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9KSwgMTAwKTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDbGVhcnMgdGhlIGN1cnJlbnQgdGV4dCBmcm9tIHRoZSBhbm5vdW5jZXIgZWxlbWVudC4gQ2FuIGJlIHVzZWQgdG8gcHJldmVudAogICAgICAgICAqIHNjcmVlbiByZWFkZXJzIGZyb20gcmVhZGluZyB0aGUgdGV4dCBvdXQgYWdhaW4gd2hpbGUgdGhlIHVzZXIgaXMgZ29pbmcKICAgICAgICAgKiB0aHJvdWdoIHRoZSBwYWdlIGxhbmRtYXJrcy4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGNsZWFyKCkgewogICAgICAgICAgICBpZiAodGhpcy5fbGl2ZUVsZW1lbnQpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2xpdmVFbGVtZW50LnRleHRDb250ZW50ID0gJyc7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uRGVzdHJveSgpIHsKICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHRoaXMuX3ByZXZpb3VzVGltZW91dCk7CiAgICAgICAgICAgIGlmICh0aGlzLl9saXZlRWxlbWVudCAmJiB0aGlzLl9saXZlRWxlbWVudC5wYXJlbnROb2RlKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9saXZlRWxlbWVudC5wYXJlbnROb2RlLnJlbW92ZUNoaWxkKHRoaXMuX2xpdmVFbGVtZW50KTsKICAgICAgICAgICAgICAgIHRoaXMuX2xpdmVFbGVtZW50ID0gKC8qKiBAdHlwZSB7P30gKi8gKG51bGwpKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2NyZWF0ZUxpdmVFbGVtZW50KCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGVsZW1lbnRDbGFzcyA9ICdjZGstbGl2ZS1hbm5vdW5jZXItZWxlbWVudCc7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcHJldmlvdXNFbGVtZW50cyA9IHRoaXMuX2RvY3VtZW50LmdldEVsZW1lbnRzQnlDbGFzc05hbWUoZWxlbWVudENsYXNzKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBsaXZlRWwgPSB0aGlzLl9kb2N1bWVudC5jcmVhdGVFbGVtZW50KCdkaXYnKTsKICAgICAgICAgICAgLy8gUmVtb3ZlIGFueSBvbGQgY29udGFpbmVycy4gVGhpcyBjYW4gaGFwcGVuIHdoZW4gY29taW5nIGluIGZyb20gYSBzZXJ2ZXItc2lkZS1yZW5kZXJlZCBwYWdlLgogICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHByZXZpb3VzRWxlbWVudHMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovIChwcmV2aW91c0VsZW1lbnRzW2ldLnBhcmVudE5vZG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RlbnRPYnNlcnZlcgogICAgICAgICAqIEBwYXJhbSB7P30gX25nWm9uZQogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKF9lbGVtZW50UmVmLCBfbGl2ZUFubm91bmNlciwgX2NvbnRlbnRPYnNlcnZlciwgX25nWm9uZSkgewogICAgICAgICAgICB0aGlzLl9lbGVtZW50UmVmID0gX2VsZW1lbnRSZWY7CiAgICAgICAgICAgIHRoaXMuX2xpdmVBbm5vdW5jZXIgPSBfbGl2ZUFubm91bmNlcjsKICAgICAgICAgICAgdGhpcy5fY29udGVudE9ic2VydmVyID0gX2NvbnRlbnRPYnNlcnZlcjsKICAgICAgICAgICAgdGhpcy5fbmdab25lID0gX25nWm9uZTsKICAgICAgICAgICAgdGhpcy5fcG9saXRlbmVzcyA9ICdvZmYnOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBUaGUgYXJpYS1saXZlIHBvbGl0ZW5lc3MgbGV2ZWwgdG8gdXNlIHdoZW4gYW5ub3VuY2luZyBtZXNzYWdlcy4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBwb2xpdGVuZXNzKCkgeyByZXR1cm4gdGhpcy5fcG9saXRlbmVzczsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBwb2xpdGVuZXNzKHZhbHVlKSB7CiAgICAgICAgICAgIHRoaXMuX3BvbGl0ZW5lc3MgPSB2YWx1ZSA9PT0gJ3BvbGl0ZScgfHwgdmFsdWUgPT09ICdhc3NlcnRpdmUnID8gdmFsdWUgOiAnb2ZmJzsKICAgICAgICAgICAgaWYgKHRoaXMuX3BvbGl0ZW5lc3MgPT09ICdvZmYnKSB7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5fc3Vic2NyaXB0aW9uKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fc3Vic2NyaXB0aW9uLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fc3Vic2NyaXB0aW9uID0gbnVsbDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmICghdGhpcy5fc3Vic2NyaXB0aW9uKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9zdWJzY3JpcHRpb24gPSB0aGlzLl9uZ1pvbmUucnVuT3V0c2lkZUFuZ3VsYXIoKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9jb250ZW50T2JzZXJ2ZXIKICAgICAgICAgICAgICAgICAgICAgICAgLm9ic2VydmUodGhpcy5fZWxlbWVudFJlZikKICAgICAgICAgICAgICAgICAgICAgICAgLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIE5vdGUgdGhhdCB3ZSB1c2UgdGV4dENvbnRlbnQgaGVyZSwgcmF0aGVyIHRoYW4gaW5uZXJUZXh0LCBpbiBvcmRlciB0byBhdm9pZCBhIHJlZmxvdy4KICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBlbGVtZW50VGV4dCA9IHRoaXMuX2VsZW1lbnRSZWYubmF0aXZlRWxlbWVudC50ZXh0Q29udGVudDsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gVGhlIGBNdXRhdGlvbk9ic2VydmVyYCBmaXJlcyBhbHNvIGZvciBhdHRyaWJ1dGUKICAgICAgICAgICAgICAgICAgICAgICAgLy8gY2hhbmdlcyB3aGljaCB3ZSBkb24ndCB3YW50IHRvIGFubm91bmNlLgogICAgICAgICAgICAgICAgICAgICAgICBpZiAoZWxlbWVudFRleHQgIT09IHRoaXMuX3ByZXZpb3VzQW5ub3VuY2VkVGV4dCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fbGl2ZUFubm91bmNlci5hbm5vdW5jZShlbGVtZW50VGV4dCwgdGhpcy5fcG9saXRlbmVzcyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9wcmV2aW91c0Fubm91bmNlZFRleHQgPSBlbGVtZW50VGV4dDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25EZXN0cm95KCkgewogICAgICAgICAgICBpZiAodGhpcy5fc3Vic2NyaXB0aW9uKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9zdWJzY3JpcHRpb24udW5zdWJzY3JpYmUoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIENka0FyaWFMaXZlLsm1ZmFjID0gZnVuY3Rpb24gQ2RrQXJpYUxpdmVfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgQ2RrQXJpYUxpdmUpKMm1ybVkaXJlY3RpdmVJbmplY3QoRWxlbWVudFJlZiksIMm1ybVkaXJlY3RpdmVJbmplY3QoTGl2ZUFubm91bmNlciksIMm1ybVkaXJlY3RpdmVJbmplY3QoQ29udGVudE9ic2VydmVyKSwgybXJtWRpcmVjdGl2ZUluamVjdChOZ1pvbmUpKTsgfTsKICAgIENka0FyaWFMaXZlLsm1ZGlyID0gybXJtWRlZmluZURpcmVjdGl2ZSh7IHR5cGU6IENka0FyaWFMaXZlLCBzZWxlY3RvcnM6IFtbIiIsICJjZGtBcmlhTGl2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YXVzZSBvZiBmb2N1cyBldmVudHMuCiAgICAgKi8KICAgIGNsYXNzIEZvY3VzTW9uaXRvciB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBfbmdab25lCiAgICAgICAgICogQHBhcmFtIHs/fSBfcGxhdGZvcm0KICAgICAgICAgKiBAcGFyYW0gez99IGRvY3VtZW50CiAgICAgICAgICogQHBhcmFtIHs/fSBvcHRpb25zCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoX25nWm9uZSwgX3BsYXRmb3JtLCAKICAgICAgICAvKiogQGJyZWFraW5nLWNoYW5nZSAxMS4wLjAgbWFrZSBkb2N1bWVudCByZXF1aXJlZCAqLwogICAgICAgIGRvY3VtZW50LCBvcHRpb25zKSB7CiAgICAgICAgICAgIHRoaXMuX25nWm9uZSA9IF9uZ1pvbmU7CiAgICAgICAgICAgIHRoaXMuX3BsYXRmb3JtID0gX3BsYXRmb3JtOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogVGhlIGZvY3VzIG9yaWdpbiB0aGF0IHRoZSBuZXh0IGZvY3VzIGV2ZW50IGlzIGEgcmVzdWx0IG9mLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fb3JpZ2luID0gbnVsbDsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFdoZXRoZXIgdGhlIHdpbmRvdyBoYXMganVzdCBiZWVuIGZvY3VzZWQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl93aW5kb3dGb2N1c2VkID0gZmFsc2U7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBNYXAgb2YgZWxlbWVudHMgYmVpbmcgbW9uaXRvcmVkIHRvIHRoZWlyIGluZm8uCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9lbGVtZW50SW5mbyA9IG5ldyBNYXAoKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFRoZSBudW1iZXIgb2YgZWxlbWVudHMgY3VycmVudGx5IGJlaW5nIG1vbml0b3JlZC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX21vbml0b3JlZEVsZW1lbnRDb3VudCA9IDA7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBLZWVwcyB0cmFjayBvZiB0aGUgcm9vdCBub2RlcyB0byB3aGljaCB3ZSd2ZSBjdXJyZW50bHkgYm91bmQgYSBmb2N1cy9ibHVyIGhhbmRsZXIsCiAgICAgICAgICAgICAqIGFzIHdlbGwgYXMgdGhlIG51bWJlciBvZiBtb25pdG9yZWQgZWxlbWVudHMgdGhhdCB0aGV5IGNvbnRhaW4uIFdlIGhhdmUgdG8gdHJlYXQgZm9jdXMvYmx1cgogICAgICAgICAgICAgKiBoYW5kbGVycyBkaWZmZXJlbnRseSBmcm9tIHRoZSByZXN0IG9mIHRoZSBldmVudHMsIGJlY2F1c2UgdGhlIGJyb3dzZXIgd29uJ3QgZW1pdCBldmVudHMKICAgICAgICAgICAgICogdG8gdGhlIGRvY3VtZW50IHdoZW4gZm9jdXMgbW92ZXMgaW5zaWRlIG9mIGEgc2hhZG93IHJvb3QuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9yb290Tm9kZUZvY3VzTGlzdGVuZXJDb3VudCA9IG5ldyBNYXAoKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEV2ZW50IGxpc3RlbmVyIGZvciBga2V5ZG93bmAgZXZlbnRzIG9uIHRoZSBkb2N1bWVudC4KICAgICAgICAgICAgICogTmVlZHMgdG8gYmUgYW4gYXJyb3cgZnVuY3Rpb24gaW4gb3JkZXIgdG8gcHJlc2VydmUgdGhlIGNvbnRleHQgd2hlbiBpdCBnZXRzIGJvdW5kLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fZG9jdW1lbnRLZXlkb3duTGlzdGVuZXIgPSAoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAvLyBPbiBrZXlkb3duIHJlY29yZCB0aGUgb3JpZ2luIGFuZCBjbGVhciBhbnkgdG91Y2ggZXZlbnQgdGhhdCBtYXkgYmUgaW4gcHJvZ3Jlc3MuCiAgICAgICAgICAgICAgICB0aGlzLl9sYXN0VG91Y2hUYXJnZXQgPSBudWxsOwogICAgICAgICAgICAgICAgdGhpcy5fc2V0T3JpZ2luRm9yQ3VycmVudEV2ZW50UXVldWUoJ2tleWJvYXJkJyk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRXZlbnQgbGlzdGVuZXIgZm9yIGBtb3VzZWRvd25gIGV2ZW50cyBvbiB0aGUgZG9jdW1lbnQuCiAgICAgICAgICAgICAqIE5lZWRzIHRvIGJlIGFuIGFycm93IGZ1bmN0aW9uIGluIG9yZGVyIHRvIHByZXNlcnZlIHRoZSBjb250ZXh0IHdoZW4gaXQgZ2V0cyBib3VuZC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX2RvY3VtZW50TW91c2Vkb3duTGlzdGVuZXIgPSAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChldmVudCkgPT4gewogICAgICAgICAgICAgICAgLy8gT24gbW91c2Vkb3duIHJlY29yZCB0aGUgb3JpZ2luIG9ubHkgaWYgdGhlcmUgaXMgbm90IHRvdWNoCiAgICAgICAgICAgICAgICAvLyB0YXJnZXQsIHNpbmNlIGEgbW91c2Vkb3duIGNhbiBoYXBwZW4gYXMgYSByZXN1bHQgb2YgYSB0b3VjaCBldmVudC4KICAgICAgICAgICAgICAgIGlmICghdGhpcy5fbGFzdFRvdWNoVGFyZ2V0KSB7CiAgICAgICAgICAgICAgICAgICAgLy8gSW4gc29tZSBjYXNlcyBzY3JlZW4gcmVhZGVycyBmaXJlIGZha2UgYG1vdXNlZG93bmAgZXZlbnRzIGluc3RlYWQgb2YgYGtleWRvd25gLgogICAgICAgICAgICAgICAgICAgIC8vIFJlc29sdmUgdGhlIGZvY3VzIHNvdXJjZSB0byBga2V5Ym9hcmRgIGlmIHdlIGRldGVjdCBvbmUgb2YgdGhlbS4KICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3Qgc291cmNlID0gaXNGYWtlTW91c2Vkb3duRnJvbVNjcmVlblJlYWRlcihldmVudCkgPyAna2V5Ym9hcmQnIDogJ21vdXNlJzsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9zZXRPcmlnaW5Gb3JDdXJyZW50RXZlbnRRdWV1ZShzb3VyY2UpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEV2ZW50IGxpc3RlbmVyIGZvciBgdG91Y2hzdGFydGAgZXZlbnRzIG9uIHRoZSBkb2N1bWVudC4KICAgICAgICAgICAgICogTmVlZHMgdG8gYmUgYW4gYXJyb3cgZnVuY3Rpb24gaW4gb3JkZXIgdG8gcHJlc2VydmUgdGhlIGNvbnRleHQgd2hlbiBpdCBnZXRzIGJvdW5kLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fZG9jdW1lbnRUb3VjaHN0YXJ0TGlzdGVuZXIgPSAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChldmVudCkgPT4gewogICAgICAgICAgICAgICAgLy8gV2hlbiB0aGUgdG91Y2hzdGFydCBldmVudCBmaXJlcyB0aGUgZm9jdXMgZXZlbnQgaXMgbm90IHlldCBpbiB0aGUgZXZlbnQgcXVldWUuIFRoaXMgbWVhbnMKICAgICAgICAgICAgICAgIC8vIHdlIGNhbid0IHJlbHkgb24gdGhlIHRyaWNrIHVzZWQgYWJvdmUgKHNldHRpbmcgdGltZW91dCBvZiAxbXMpLiBJbnN0ZWFkIHdlIHdhaXQgNjUwbXMgdG8KICAgICAgICAgICAgICAgIC8vIHNlZSBpZiBhIGZvY3VzIGhhcHBlbnMuCiAgICAgICAgICAgICAgICBpZiAodGhpcy5fdG91Y2hUaW1lb3V0SWQgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIGNsZWFyVGltZW91dCh0aGlzLl90b3VjaFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLl9sYXN0VG91Y2hUYXJnZXQgPSBnZXRUYXJnZXQoZXZlbnQpOwogICAgICAgICAgICAgICAgdGhpcy5fdG91Y2hUaW1lb3V0SWQgPSBzZXRUaW1lb3V0KCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHRoaXMuX2xhc3RUb3VjaFRhcmdldCA9IG51bGwpLCBUT1VDSF9CVUZGRVJfTVMpOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEV2ZW50IGxpc3RlbmVyIGZvciBgZm9jdXNgIGV2ZW50cyBvbiB0aGUgd2luZG93LgogICAgICAgICAgICAgKiBOZWVkcyB0byBiZSBhbiBhcnJvdyBmdW5jdGlvbiBpbiBvcmRlciB0byBwcmVzZXJ2ZSB0aGUgY29udGV4dCB3aGVuIGl0IGdldHMgYm91bmQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl93aW5kb3dGb2N1c0xpc3RlbmVyID0gKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgLy8gTWFrZSBhIG5vdGUgb2Ygd2hlbiB0aGUgd2luZG93IHJlZ2FpbnMgZm9jdXMsIHNvIHdlIGNhbgogICAgICAgICAgICAgICAgLy8gcmVzdG9yZSB0aGUgb3JpZ2luIGluZm8gZm9yIHRoZSBmb2N1c2VkIGVsZW1lbnQuCiAgICAgICAgICAgICAgICB0aGlzLl93aW5kb3dGb2N1c2VkID0gdHJ1ZTsKICAgICAgICAgICAgICAgIHRoaXMuX3dpbmRvd0ZvY3VzVGltZW91dElkID0gc2V0VGltZW91dCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB0aGlzLl93aW5kb3dGb2N1c2VkID0gZmFsc2UpKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBFdmVudCBsaXN0ZW5lciBmb3IgYGZvY3VzYCBhbmQgJ2JsdXInIGV2ZW50cyBvbiB0aGUgZG9jdW1lbnQuCiAgICAgICAgICAgICAqIE5lZWRzIHRvIGJlIGFuIGFycm93IGZ1bmN0aW9uIGluIG9yZGVyIHRvIHByZXNlcnZlIHRoZSBjb250ZXh0IHdoZW4gaXQgZ2V0cyBib3VuZC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX3Jvb3ROb2RlRm9jdXNBbmRCbHVyTGlzdGVuZXIgPSAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChldmVudCkgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgdGFyZ2V0ID0gZ2V0VGFyZ2V0KGV2ZW50KTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGhhbmRsZXIgPSBldmVudC50eXBlID09PSAnZm9jdXMnID8gdGhpcy5fb25Gb2N1cyA6IHRoaXMuX29uQmx1cjsKICAgICAgICAgICAgICAgIC8vIFdlIG5lZWQgdG8gd2FsayB1cCB0aGUgYW5jZXN0b3IgY2hhaW4gaW4gb3JkZXIgdG8gc3VwcG9ydCBgY2hlY2tDaGlsZHJlbmAuCiAgICAgICAgICAgICAgICBmb3IgKGxldCBlbGVtZW50ID0gdGFyZ2V0OyBlbGVtZW50OyBlbGVtZW50ID0gZWxlbWVudC5wYXJlbnRFbGVtZW50KSB7CiAgICAgICAgICAgICAgICAgICAgaGFuZGxlci5jYWxsKHRoaXMsICgvKiogQHR5cGUgez99ICovIChldmVudCkpLCBlbGVtZW50KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHRoaXMuX2RvY3VtZW50ID0gZG9jdW1lbnQ7CiAgICAgICAgICAgIHRoaXMuX2RldGVjdGlvbk1vZGUgPSAob3B0aW9ucyA9PT0gbnVsbCB8fCBvcHRpb25zID09PSB2b2lkIDAgPyB2b2lkIDAgOiBvcHRpb25zLmRldGVjdGlvbk1vZGUpIHx8IDAgLyogSU1NRURJQVRFICovOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgKiBAcGFyYW0gez89fSBjaGVja0NoaWxkcmVuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBtb25pdG9yKGVsZW1lbnQsIGNoZWNrQ2hpbGRyZW4gPSBmYWxzZSkgewogICAgICAgICAgICAvLyBEbyBub3RoaW5nIGlmIHdlJ3JlIG5vdCBvbiB0aGUgYnJvd3NlciBwbGF0Zm9ybS4KICAgICAgICAgICAgaWYgKCF0aGlzLl9wbGF0Zm9ybS5pc0Jyb3dzZXIpIHsKICAgICAgICAgICAgICAgIHJldHVybiBvZihudWxsKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG5hdGl2ZUVs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mVoYXZlIGFzIGlmIGBjaGVja0NoaWxkcmVuYCB3YXMgdHVybmVkIG9uLiBXZSBuZWVkIGEgbW9yZQogICAgICAgICAgICAgICAgICAgIC8vIHJvYnVzdCBzb2x1dGlvbi4KICAgICAgICAgICAgICAgICAgICBjYWNoZWRJbmZvLmNoZWNrQ2hpbGRyZW4gPSB0cnVlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIGNhY2hlZEluZm8uc3ViamVjdC5hc09ic2VydmFibGUoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBDcmVhdGUgbW9uaXRvcmVkIGVsZW1lbnQgaW5mby4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBpbmZvID0gewogICAgICAgICAgICAgICAgY2hlY2tDaGlsZHJlbjogY2hlY2tDaGlsZHJlbiwKICAgICAgICAgICAgICAgIHN1YmplY3Q6IG5ldyBTdWJqZWN0KCksCiAgICAgICAgICAgICAgICByb290Tm9kZQogICAgICAgICAgICB9OwogICAgICAgICAgICB0aGlzLl9lbGVtZW50SW5mby5zZXQobmF0aXZlRWxlbWVudCwgaW5mbyk7CiAgICAgICAgICAgIHRoaXMuX3JlZ2lzdGVyR2xvYmFsTGlzdGVuZXJzKGluZm8pOwogICAgICAgICAgICByZXR1cm4gaW5mby5zdWJqZWN0LmFzT2JzZXJ2YWJsZSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHN0b3BNb25pdG9yaW5nKGVsZW1lbnQpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBuYXRpdmVFbGVtZW50ID0gY29lcmNlRWxlbWVudChlbGVtZW50KTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBlbGVtZW50SW5mbyA9IHRoaXMuX2VsZW1lbnRJbmZvLmdldChuYXRpdmVFbGVtZW50KTsKICAgICAgICAgICAgaWYgKGVsZW1lbnRJbmZvKSB7CiAgICAgICAgICAgICAgICBlbGVtZW50SW5mby5zdWJqZWN0LmNvbXBsZXRlKCk7CiAgICAgICAgICAgICAgICB0aGlzLl9zZXRDbGFzc2VzKG5hdGl2ZUVsZW1lbnQpOwogICAgICAgICAgICAgICAgdGhpcy5fZWxlbWVudEluZm8uZGVsZXRlKG5hdGl2ZUVsZW1lbnQpOwogICAgICAgICAgICAgICAgdGhpcy5fcmVtb3ZlR2xvYmFsTGlzdGVuZXJzKGVsZW1lbnRJbmZvKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgKiBAcGFyYW0gez99IG9yaWdpbgogICAgICAgICAqIEBwYXJhbSB7Pz19IG9wdGlvbnMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZvY3VzVmlhKGVsZW1lbnQsIG9yaWdpbiwgb3B0aW9ucykgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG5hdGl2ZUVsZW1lbnQgPSBjb2VyY2VFbGVtZW50KGVsZW1lbnQpOwogICAgICAgICAgICB0aGlzLl9zZXRPcmlnaW5Gb3JDdXJyZW50RXZlbnRRdWV1ZShvcmlnaW4pOwogICAgICAgICAgICAvLyBgZm9jdXNgIGlzbid0IGF2YWlsYWJsZSBvbiB0aGUgc2VydmVyCiAgICAgICAgICAgIGlmICh0eXBlb2YgbmF0aXZlRWxlbWVudC5mb2N1cyA9PT0gJ2Z1bmN0aW9uJykgewogICAgICAgICAgICAgICAgLy8gQ2FzdCB0aGUgZWxlbWVudCB0byBgYW55YCwgYmVjYXVzZSB0aGUgVFMgdHlwaW5ncyBkb24ndCBoYXZlIHRoZSBgb3B0aW9uc2AgcGFyYW1ldGVyIHlldC4KICAgICAgICAgICAgICAgICgoLyoqIEB0eXBlIHs/fSAqLyAobmF0aXZlRWxlbWVudCkpKS5mb2N1cyhvcHRpb25zKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25EZXN0cm95KCkgewogICAgICAgICAgICB0aGlzLl9lbGVtZW50SW5mby5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfaW5mbwogICAgICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChfaW5mbywgZWxlbWVudCkgPT4gdGhpcy5zdG9wTW9uaXRvcmluZyhlbGVtZW50KSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBY2Nlc3MgaW5qZWN0ZWQgZG9jdW1lbnQgaWYgYXZhaWxhYmxlIG9yIGZhbGxiYWNrIHRvIGdsb2JhbCBkb2N1bWVudCByZWZlcmVuY2UKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2dldERvY3VtZW50KCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fZG9jdW1lbnQgfHwgZG9jdW1lbnQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFVzZSBkZWZhdWx0VmlldyBvZiBpbmplY3RlZCBkb2N1bWVudCBpZiBhdmFpbGFibGUgb3IgZmFsbGJhY2sgdG8gZ2xvYmFsIHdpbmRvdyByZWZlcmVuY2UKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2dldFdpbmRvdygpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBkb2MgPSB0aGlzLl9nZXREb2N1bWVudCgpOwogICAgICAgICAgICByZXR1cm4gZG9jLmRlZmF1bHRWaWV3IHx8IHdpbmRvdzsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgKiBAcGFyYW0gez99IGNsYXNzTmFtZQogICAgICAgICAqIEBwYXJhbSB7P30gc2hvdWxkU2V0CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfdG9nZ2xlQ2xhc3MoZWxlbWVudCwgY2xhc3NOYW1lLCBzaG91bGRTZXQpIHsKICAgICAgICAgICAgaWYgKHNob3VsZFNldCkgewogICAgICAgICAgICAgICAgZWxlbWVudC5jbGFzc0xpc3QuYWRkKGNsYXNzTmFtZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBlbGVtZW50LmNsYXNzTGlzdC5yZW1vdmUoY2xhc3NOYW1lKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9nZXRGb2N1c09yaWdpbihldmVudCkgewogICAgICAgICAgICAvLyBJZiB3ZSBjb3VsZG4ndCBkZXRlY3QgYSBjYXVzZSBmb3IgdGhlIGZvY3VzIGV2ZW50LCBpdCdzIGR1ZSB0byBvbmUgb2YgdGhyZWUgcmVhc29uczoKICAgICAgICAgICAgLy8gMSkgVGhlIHdpbmRvdyBoYXMganVzdCByZWdhaW5lZCBmb2N1cywgaW4gd2hpY2ggY2FzZSB3ZSB3YW50IHRvIHJlc3RvcmUgdGhlIGZvY3VzZWQgc3RhdGUgb2YKICAgICAgICAgICAgLy8gICAgdGhlIGVsZW1lbnQgZnJvb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Q3VycmVudEV2ZW50UXVldWUob3JpZ2luKSB7CiAgICAgICAgICAgIHRoaXMuX25nWm9uZS5ydW5PdXRzaWRlQW5ndWxhcigoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLl9vcmlnaW4gPSBvcmlnaW47CiAgICAgICAgICAgICAgICBpZiAodGhpcy5fZGV0ZWN0aW9uTW9kZSA9PT0gMCAvKiBJTU1FRElBVEUgKi8pIHsKICAgICAgICAgICAgICAgICAgICAvLyBTb21ldGltZXMgdGhlIGZvY3VzIG9yaWdpbiB3b24ndCBiZSB2YWxpZCBpbiBGaXJlZm94IGJlY2F1c2UgRmlyZWZveCBzZWVtcyB0byBmb2N1cyAqb25lKgogICAgICAgICAgICAgICAgICAgIC8vIHRpY2sgYWZ0ZXIgdGhlIGludGVyYWN0aW9uIGV2ZW50IGZpcmVkLiBUbyBlbnN1cmUgdGhlIGZvY3VzIG9yaWdpbiBpcyBhbHdheXMgY29ycmVjdCwKICAgICAgICAgICAgICAgICAgICAvLyB0aGUgZm9jdXMgb3JpZ2luIHdpbGwgYmUgZGV0ZXJtaW5lZCBhdCB0aGUgYmVnaW5uaW5nIG9mIHRoZSBuZXh0IHRpY2suCiAgICAgICAgICAgICAgICAgICAgdGhpcy5fb3JpZ2luVGltZW91dElkID0gc2V0VGltZW91dCgoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAoKSA9PiB0aGlzLl9vcmlnaW4gPSBudWxsKSwgMSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ2hlY2tzIHdoZXRoZXIgdGhlIGdpdmVuIGZvY3VzIGV2ZW50IHdhcyBjYXVzZWQgYnkgYSB0b3VjaHN0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gICAgICAvKioKICAgICAgICAgKiBIYW5kbGVzIGJsdXIgZXZlbnRzIG9uIGEgcmVnaXN0ZXJlZCBlbGVtZW50LgogICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQgVGhlIGJsdXIgZXZlbnQuCiAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50IFRoZSBtb25pdG9yZWQgZWxlbWVudC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9vbkJsdXIoZXZlbnQsIGVsZW1lbnQpIHsKICAgICAgICAgICAgLy8gSWYgd2UgYXJlIGNvdW50aW5nIGNoaWxkLWVsZW1lbnQtZm9jdXMgYXMgZm9jdXNlZCwgbWFrZSBzdXJlIHRoYXQgd2UgYXJlbid0IGp1c3QgYmx1cnJpbmcgaW4KICAgICAgICAgICAgLy8gb3JkZXIgdG8gZm9jdXMgYW5vdGhlciBjaGlsZCBvZiB0aGUgbW9uaXRvcmVkIGVsZW1lbnQuCiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZWxlbWVudEluZm8gPSB0aGlzLl9lbGVtZW50SW5mby5nZXQoZWxlbWVudCk7CiAgICAgICAgICAgIGlmICghZWxlbWVudEluZm8gfHwgKGVsZW1lbnRJbmZvLmNoZWNrQ2hpbGRyZW4gJiYgZXZlbnQucmVsYXRlZFRhcmdldCBpbnN0YW5jZW9mIE5vZGUgJiYKICAgICAgICAgICAgICAgIGVsZW1lbnQuY29udGFpbnMoZXZlbnQucmVsYXRlZFRhcmdldCkpKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fc2V0Q2xhc3NlcyhlbGVtZW50KTsKICAgICAgICAgICAgdGhpcy5fZW1pdE9yaWdpbihlbGVtZW50SW5mby5zdWJqZWN0LCBudWxsKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHN1YmplY3QKICAgICAgICAgKiBAcGFyYW0gez99IG9yaWdpbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2VtaXRPcmlnaW4oc3ViamVjdCwgb3JpZ2luKSB7CiAgICAgICAgICAgIHRoaXMuX25nWm9uZS5ydW4oKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gc3ViamVjdC5uZXh0KG9yaWdpbikpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnRJbmZvCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfcmVnaXN0ZXJHbG9iYWxMaXN0ZW5lcnMoZWxlbWVudEluZm8pIHsKICAgICAgICAgICAgaWYgKCF0aGlzLl9wbGF0Zm9ybS5pc0Jyb3dzZXIpIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHJvb3ROb2RlID0gZWxlbWVudEluZm8ucm9vdE5vZGU7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgcm9vdE5vZGVGb2N1c0xpc3RlbmVycyA9IHRoaXMuX3Jvb3ROb2RlRm9jdXNMaXN0ZW5lckNvdW50LmdldChyb290Tm9kZSkgfHwgMDsKICAgICAgICAgICAgaWYgKCFyb290Tm9kZUZvY3VzTGlzdGVuZXJzKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9uZ1pvbmUucnVuT3V0c2lkZUFuZ3VsYXIoKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHJvb3ROb2RlLmFkZEV2ZW50TGlzdGVuZXIoJ2ZvY3VzJywgdGhpcy5fcm9vdE5vZGVGb2N1c0FuZEJsdXJMaXN0ZW5lciwgY2FwdHVyZUV2ZW50TGlzdGVuZXJPcHRpb25zKTsKICAgICAgICAgICAgICAgICAgICByb290Tm9kZS5hZGRFdmVudExpc3RlbmVyKCdibHVyJywgdGhpcy5fcm9vdE5vZGVGb2N1c0FuZEJsdXJMaXN0ZW5lciwgY2FwdHVyZUV2ZW50TGlzdGVuZXJPcHRpb25zKTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9yb290Tm9kZUZvY3VzTGlzdGVuZXJDb3VudC5zZXQocm9vdE5vZGUsIHJvb3ROb2RlRm9jdXNMaXN0ZW5lcnMgKyAxKTsKICAgICAgICAgICAgLy8gUmVnaXN0ZXIgZ2xvYmFsIGxpc3RlbmVycyB3aGVuIGZpcnN0IGVsZW1lbnQgaXMgbW9uaXRvcmVkLgogICAgICAgICAgICBpZiAoKyt0aGlzLl9tb25pdG9yZWRFbGVtZW50Q291bnQgPT09IDEpIHsKICAgICAgICAgICAgICAgIC8vIE5vdGU6IHdlIGxpc3RlbiB0byBldmVudHMgaW4gdGhlIGNhcHR1cmUgcGhhc2Ugc28gd2UKICAgICAgICAgICAgICAgIC8vIGNhbiBkZXRlY3QgdGhlbSBldmVuIGlmIHRoZSB1c2VyIHN0b3BzIHByb3BhZ2F0aW9uLgogICAgICAgICAgICAgICAgdGhpcy5fbmdab25lLnJ1bk91dHNpZGVBbmd1bGFyKCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgZG9jdW1lbnQgPSB0aGlzLl9nZXREb2N1bWVudCgpOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCB3aW5kb3cgPSB0aGlzLl9nZXRXaW5kb3coKTsKICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5hZGRFdmVudExpc3RlbmVyKCdrZXlkb3duJywgdGhpcy5fZG9jdW1lbnRLZXlkb3duTGlzdGVuZXIsIGNhcHR1cmVFdmVudExpc3RlbmVyT3B0aW9ucyk7CiAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcignbW91c2Vkb3duJywgdGhpcy5fZG9jdW1lbnRNb3VzZWRvd25MaXN0ZW5lciwgY2FwdHVyZUV2ZW50TGlzdGVuZXJPcHRpb25zKTsKICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5hZGRFdmVudExpc3RlbmVyKCd0b3VjaHN0YXJ0JywgdGhpcy5fZG9jdW1lbnRUb3VjaHN0YXJ0TGlzdGVuZXIsIGNhcHR1cmVFdmVudExpc3RlbmVyT3B0aW9ucyk7CiAgICAgICAgICAgICAgICAgICAgd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoJ2ZvY3VzJywgdGhpcy5fd2luZG93Rm9jdXNMaXN0ZW5lcik7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnRJbmZvCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfcmVtb3ZlR2xvYmFsTGlzdGVuZXJzKGVsZW1lbnRJbmZvKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgcm9vdE5vZGUgPSBlbGVtZW50SW5mby5yb290Tm9kZTsKICAgICAgICAgICAgaWYgKHRoaXMuX3Jvb3ROb2RlRm9jdXNMaXN0ZW5lckNvdW50Lmhhcyh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kdXJpbmcgYXBwIGJvb3RzdHJhcCBhbmQgdGhyb3dpbmcgY2FuIGJyZWFrIHRoZSBlbnRpcmUgYXBwLgogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGRvY3VtZW50V2luZG93ID0gdGhpcy5fZG9jdW1lbnQuZGVmYXVsdFZpZXcgfHwgd2luZG93OwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGNvbXB1dGVkU3R5bGUgPSAoZG9jdW1lbnRXaW5kb3cgJiYgZG9jdW1lbnRXaW5kb3cuZ2V0Q29tcHV0ZWRTdHlsZSkgPwogICAgICAgICAgICAgICAgZG9jdW1lbnRXaW5kb3cuZ2V0Q29tcHV0ZWRTdHlsZSh0ZXN0RWxlbWVudCkgOiBudWxsOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGNvbXB1dGVkQ29sb3IgPSAoY29tcHV0ZWRTdHlsZSAmJiBjb21wdXRlZFN0eWxlLmJhY2tncm91bmRDb2xvciB8fCAnJykucmVwbGFjZSgvIC9nLCAnJyk7CiAgICAgICAgICAgIHRoaXMuX2RvY3VtZW50LmJvZHkucmVtb3ZlQ2hpbGQodGVzdEVsZW1lbnQpOwogICAgICAgICAgICBzd2l0Y2ggKGNvbXB1dGVkQ29sb3IpIHsKICAgICAgICAgICAgICAgIGNhc2UgJ3JnYigwLDAsMCknOiByZXR1cm4gMiAvKiBXSElURV9PTl9CTEFDSyAqLzsKICAgICAgICAgICAgICAgIGNhc2UgJ3JnYigyNTUsMjU1LDI1NSknOiByZXR1cm4gMSAvKiBCTEFDS19PTl9XSElURSAqLzsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gMCAvKiBOT05FICovOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBcHBsaWVzIENTUyBjbGFzc2VzIGluZGljYXRpbmcgaGlnaC1jb250cmFzdCBtb2RlIHRvIGRvY3VtZW50IGJvZHkgKGJyb3dzZXItb25seSkuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfYXBwbHlCb2R5SGlnaENvbnRyYXN0TW9kZUNzc0NsYXNzZXMoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9wbGF0Zm9ybS5pc0Jyb3dzZXIgJiYgdGhpcy5fZG9jdW1lbnQuYm9keSkgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgYm9keUNsYXNzZXMgPSB0aGlzLl9kb2N1bWVudC5ib2R5LmNsYXNzTGlzdDsKICAgICAgICAgICAgICAgIC8vIElFMTEgZG9lc24ndCBzdXBwb3J0IGBjbGFzc0xpc3RgIG9wZXJhdGlvbnMgd2l0aCBtdWx0aXBsZSBhcmd1bWVudHMKICAgICAgICAgICAgICAgIGJvZHlDbGFzc2VzLnJlbW92ZShISUdIX0NPTlRSQVNUX01PREVfQUNUSVZFX0NTU19DTEFTUyk7CiAgICAgICAgICAgICAgICBib2R5Q2xhc3Nlcy5yZW1vdmUoQkxBQ0tfT05fV0hJVEVfQ1NTX0NMQVNTKTsKICAgICAgICAgICAgICAgIGJvZHlDbGFzc2VzLnJlbW92ZShXSElURV9PTl9CTEFDS19DU1NfQ0xBU1MpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgbW9kZSA9IHRoaXMuZ2V0SGlnaENvbnRyYXN0TW9kZSgpOwogICAgICAgICAgICAgICAgaWYgKG1vZGUgPT09IDEgLyogQkxBQ0tfT05fV0hJVEUgKi8pIHsKICAgICAgICAgICAgICAgICAgICBib2R5Q2xhc3Nlcy5hZGQoSElHSF9DT05UUkFTVF9NT0RFX0FDVElWRV9DU1NfQ0xBU1MpOwogICAgICAgICAgICAgICAgICAgIGJvZHlDbGFzc2VzLmFkZChCTEFDS19PTl9XSElURV9DU1NfQ0xBU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dWUgLQogICAgICAgICAgICAgICAgLy8gV2Ugc3RpbGwgbmVlZCB0byBhY2NvdW50IGZvciBkaXI9ImF1dG8iLgogICAgICAgICAgICAgICAgLy8gSXQgbG9va3MgbGlrZSBIVE1MRWxlbWVuZXQuZGlyIGlzIGFsc28gImF1dG8iIHdoZW4gdGhhdCdzIHNldCB0byB0aGUgYXR0cmlidXRlLAogICAgICAgICAgICAgICAgLy8gYnV0IGdldENvbXB1dGVkU3R5bGUgcmV0dXJuIGVpdGhlciAibHRyIiBvciAicnRsIi4gYXZvaWRpbmcgZ2V0Q29tcHV0ZWRTdHlsZSBmb3Igbm93CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBib2R5RGlyID0gX2RvY3VtZW50LmJvZHkgPyBfZG9jdW1lbnQuYm9keS5kaXIgOiBudWxsOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgaHRtbERpciA9IF9kb2N1bWVudC5kb2N1bWVudEVsZW1lbnQgPyBfZG9jdW1lbnQuZG9jdW1lbnRFbGVtZW50LmRpciA6IG51bGw7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCB2YWx1ZSA9IGJvZHlEaXIgfHwgaHRtbERpcjsKICAgICAgICAgICAgICAgIHRoaXMudmFsdWUgPSAodmFsdWUgPT09ICdsdHInIHx8IHZhbHVlID09PSAncnRsJykgPyB2YWx1ZSA6ICdsdHInOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkRlc3Ryb3koKSB7CiAgICAgICAgICAgIHRoaXMuY2hhbmdlLmNvbXBsZXRlKCk7CiAgICAgICAgfQogICAgfQogICAgRGlyZWN0aW9uYWxpdHkuybVmYWMgPSBmdW5jdGlvbiBEaXJlY3Rpb25h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gICoKICAgICAqIFByb3ZpZGVzIGl0c2VsZiBhcyBEaXJlY3Rpb25hbGl0eSBzdWNoIHRoYXQgZGVzY2VuZGFudCBkaXJlY3RpdmVzIG9ubHkgbmVlZCB0byBldmVyIGluamVjdAogICAgICogRGlyZWN0aW9uYWxpdHkgdG8gZ2V0IHRoZSBjbG9zZXN0IGRpcmVjdGlvbi4KICAgICAqLwogICAgY2xhc3MgRGlyIHsKICAgICAgICBjb25zdHJ1Y3RvcigpIHsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIE5vcm1hbGl6ZWQgZGlyZWN0aW9uIHRoYXQgYWNjb3VudHMgZm9yIGludmFsaWQvdW5zdXBwb3J0ZWQgdmFsdWVzLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fZGlyID0gJ2x0cic7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBXaGV0aGVyIHRoZSBgdmFsdWVgIGhhcyBiZWVuIHNldCB0byBpdHMgaW5pdGlhbCB2YWx1ZS4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX2lzSW5pdGlhbGl6ZWQgPSBmYWxzZTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEV2ZW50IGVtaXR0ZWQgd2hlbiB0aGUgZGlyZWN0aW9uIGNoYW5nZXMuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmNoYW5nZSA9IG5ldyBFdmVudEVtaXR0ZXIoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkb2NzLXByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBkaXIoKSB7IHJldHVybiB0aGlzLl9kaXI7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgZGlyKHZhbHVlKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgb2xkID0gdGhpcy5fZGlyOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG5vcm1hbGl6ZWRWYWx1ZSA9IHZhbHVlID8gdmFsdWUudG9Mb3dlckNhc2UoKSA6IHZhbHVlOwogICAgICAgICAgICB0aGlzLl9yYXdEaXIgPSB2YWx1ZTsKICAgICAgICAgICAgdGhpcy5fZGlyID0gKG5vcm1hbGl6ZWRWYWx1ZSA9PT0gJ2x0cicgfHwgbm9ybWFsaXplZFZhbHVlID09PSAncnRsJykgPyBub3JtYWxpemVkVmFsdWUgOiAnbHRyJzsKICAgICAgICAgICAgaWYgKG9sZCAhPT0gdGhpcy5fZGlyICYmIHRoaXMuX2lzSW5pdGlhbGl6ZWQpIHsKICAgICAgICAgICAgICAgIHRoaXMuY2hhbmdlLmVtaXQodGhpcy5fZGlyKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDdXJyZW50IGxheW91dCBkaXJlY3Rpb24gb2YgdGhlIGVsZW1lbnQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgdmFsdWUoKSB7IHJldHVybiB0aGlzLmRpcjsgfQogICAgICAgIC8qKgogICAgICAgICAqIEluaXRpYWxpemUgb25jZSBkZWZhdWx0IHZhbHVlIGhhcyBiZWVuIHNldC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nQWZ0ZXJDb250ZW50SW5pdCgpIHsKICAgICAgICAgICAgdGhpcy5faXNJbml0aWFsaXplZCA9IHRydWU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkRlc3Ryb3koKSB7CiAgICAgICAgICAgIHRoaXMuY2hhbmdlLmNvbXBsZXRlKCk7CiAgIC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Blb2YgZG9jID09PSAnb2JqZWN0JyAmJiBkb2MgPyBkb2MgOiBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBVc2UgZGVmYXVsdFZpZXcgb2YgaW5qZWN0ZWQgZG9jdW1lbnQgaWYgYXZhaWxhYmxlIG9yIGZhbGxiYWNrIHRvIGdsb2JhbCB3aW5kb3cgcmVmZXJlbmNlCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9nZXRXaW5kb3coKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZG9jID0gdGhpcy5fZ2V0RG9jdW1lbnQoKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB3aW4gPSAoZG9jID09PSBudWxsIHx8IGRvYyA9PT0gdm9pZCAwID8gdm9pZCAwIDogZG9jLmRlZmF1bHRWaWV3KSB8fCB3aW5kb3c7CiAgICAgICAgICAgIHJldHVybiB0eXBlb2Ygd2luID09PSAnb2JqZWN0JyAmJiB3aW4gPyB3aW4gOiBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGV0aGVyIGFueSBzYW5pdHkgY2hlY2tzIGFyZSBlbmFibGVkLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfY2hlY2tzQXJlRW5hYmxlZCgpIHsKICAgICAgICAgICAgcmV0dXJuIGlzRGV2TW9kZSgpICYmICF0aGlzLl9pc1Rlc3RFbnYoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogV2hldGhlciB0aGUgY29kZSBpcyBydW5uaW5nIGluIHRlc3RzLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfaXNUZXN0RW52KCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHdpbmRvdyA9ICgvKiogQHR5cGUgez99ICovICh0aGlzLl9nZXRXaW5kb3coKSkpOwogICAgICAgICAgICByZXR1cm4gd2luZG93ICYmICh3aW5kb3cuX19rYXJtYV9fIHx8IHdpbmRvdy5qYXNtaW5lKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9jaGVja0RvY3R5cGVJc0RlZmluZWQoKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaXNFbmFibGVkID0gdGhpcy5fY2hlY2tzQXJlRW5hYmxlZCgpICYmCiAgICAgICAgICAgICAgICAodGhpcy5fc2FuaXR5Q2hlY2tzID09PSB0cnVlIHx8ICgoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5fc2FuaXR5Q2hlY2tzKSkpLmRvY3R5cGUpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGRvY3VtZW50ID0gdGhpcy5fZ2V0RG9jdW1lbnQoKTsKICAgICAgICAgICAgaWYgKGlzRW5hYmxlZCAmJiBkb2N1bWVudCAmJiAhZG9jdW1lbnQuZG9jdHlwZSkgewogICAgICAgICAgICAgICAgY29uc29sZS53YXJuKCdDdXJyZW50IGRvY3VtZW50IGRvZXMgbm90IGhhdmUgYSBkb2N0eXBlLiBUaGlzIG1heSBjYXVzZSAnICsKICAgICAgICAgICAgICAgICAgICAnc29tZSBBbmd1bGFyIE1hdGVyaWFsIGNvbXBvbmVudHMgbm90IHRvIGJlaGF2ZSBhcyBleHBlY3RlZC4nKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCi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zYWJsZWRgIHByb3BlcnR5LgogICAgICogQHRlbXBsYXRlIFQKICAgICAqIEBwYXJhbSB7P30gYmFzZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gbWl4aW5EaXNhYmxlZChiYXNlKSB7CiAgICAgICAgcmV0dXJuIGNsYXNzIGV4dGVuZHMgYmFzZSB7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gey4uLj99IGFyZ3MKICAgICAgICAgICAgICovCiAgICAgICAgICAgIGNvbnN0cnVjdG9yKC4uLmFyZ3MpIHsKICAgICAgICAgICAgICAgIHN1cGVyKC4uLmFyZ3MpOwogICAgICAgICAgICAgICAgdGhpcy5fZGlzYWJsZWQgPSBmYWxzZTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGdldCBkaXNhYmxlZCgpIHsgcmV0dXJuIHRoaXMuX2Rpc2FibGVkOyB9CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBzZXQgZGlzYWJsZWQodmFsdWUpIHsgdGhpcy5fZGlzYWJsZWQgPSBjb2VyY2VCb29sZWFuUHJvcGVydHkodmFsdWUpOyB9CiAgICAgICAgfTsKICAgIH0KICAgIC8qKgogICAgICogTWl4aW4gdG8gYXVnbWVudCBhIGRpcmVjdGl2ZSB3aXRoIGEgYGNvbG9yYCBwcm9wZXJ0eS4KICAgICAqIEB0ZW1wbGF0ZSBUCiAgICAgKiBAcGFyYW0gez99IGJhc2UKICAgICAqIEBwYXJhbSB7Pz19IGRlZmF1bHRDb2xvcgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gbWl4aW5Db2xvcihiYXNlLCBkZWZhdWx0Q29sb3IpIHsKICAgICAgICByZXR1cm4gY2xhc3MgZXh0ZW5kcyBiYXNlIHsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7Li4uP30gYXJncwogICAgICAgICAgICAgKi8KICAgICAgICAgICAgY29uc3RydWN0b3IoLi4uYXJncykgewogICAgICAgICAgICAgICAgc3VwZXIoLi4uYXJncyk7CiAgICAgICAgICAgICAgICAvLyBTZXQgdGhlIGRlZmF1bHQgY29sb3IgdGhhdCBjYW4gYmUgc3BlY2lmaWVkIGZyb20gdGhlIG1peGluLgogICAgICAgICAgICAgICAgdGhpcy5jb2xvciA9IGRlZmF1bHRDb2xvcjsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGdldCBjb2xvcigpIHsgcmV0dXJuIHRoaXMuX2NvbG9yOyB9CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBzZXQgY29sb3IodmFsdWUpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGNvbG9yUGFsZXR0ZSA9IHZhbHVlIHx8IGRlZmF1bHRDb2xvcjsKICAgICAgICAgICAgICAgIGlmIChjb2xvclBhbGV0dGUgIT09IHRoaXMuX2NvbG9yKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX2NvbG9yKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2VsZW1lbnRSZWYubmF0aXZlRWxlbWVudC5jbGFzc0xpc3QucmVtb3ZlKGBtYXQtJHt0aGlzLl9jb2xvcn1gKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgaWYgKGNvbG9yUGFsZXR0ZSkgewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQuY2xhc3NMaXN0LmFkZChgbWF0LSR7Y29sb3JQYWxldHRlfWApOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB0aGlzLl9jb2xvciA9IGNvbG9yUGFsZXR0ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH07CiAgICB9CiAgICAvKioKICAgICAqIE1peGluIHRvIGF1Z21lbnQgYSBkaXJlY3RpdmUgd2l0aCBhIGBkaXNhYmxlUmlwcGxlYCBwcm9wZXJ0eS4KICAgICAqIEB0ZW1wbGF0ZSBUCiAgICAgKiBAcGFyYW0gez99IGJhc2UKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIG1peGluRGlzYWJsZVJpcHBsZShiYXNlKSB7CiAgICAgICAgcmV0dXJuIGNsYXNzIGV4dGVuZHMgYmFzZSB7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gey4uLj99IGFyZ3MKICAgICAgICAgICAgICovCiAgICAgICAgICAgIGNvbnN0cnVjdG9yKC4uLmFyZ3MpIHsKICAgICAgICAgICAgICAgIHN1cGVyKC4uLmFyZ3MpOwogICAgICAgICAgICAgICAgdGhpcy5fZGlzYWJsZVJpcHBsZSA9IGZhbHNlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBXaGV0aGVyIHRoZSByaXBwbGUgZWZmZWN0IGlzIGRpc2FibGVkIG9yIG5vdC4KICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGdldCBkaXNhYmxlUmlwcGxlKCkgeyByZXR1cm4gdGhpcy5fZGlzYWJsZVJpcHBsZTsgfQogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgc2V0IGRpc2FibGVSaXBwbGUodmFsdWUpIHsgdGhpcy5fZGlzYWJsZVJpcHBsZSA9IGNvZXJjZUJvb2xlYW5Qcm9wZXJ0eSh2YWx1ZSk7IH0KICAgICAgICB9OwogICAgfQogICAgLyoqCiAgICAgKiBNaXhpbiB0byBhdWdtZW50IGEgZGlyZWN0aXZlIHdpdGggYSBgdGFiSW5kZXhgIHByb3BlcnR5LgogICAgICogQHRlbXBsYXRlIFQKICAgICAqIEBwYXJhbSB7P30gYmFzZQogICAgICogQHBhcmFtIHs/PX0gZGVmYXVsdFRhYkluZGV4CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBtaXhpblRhYkluZGV4KGJhc2UsIGRlZmF1bHRUYWJJbmRleCA9IDApIHsKICAgICAgICByZXR1cm4gY2xhc3MgZXh0ZW5kcyBiYXNlIHsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7Li4uP30gYXJncwogICAgICAgICAgICAgKi8KICAgICAgICAgICAgY29uc3RydWN0b3IoLi4uYXJncykgewogICAgICAgICAgICAgICAgc3VwZXIoLi4uYXJncyk7CiAgICAgICAgICAgICAgICB0aGlzLl90YWJJbmRleCA9IGRlZmF1bHRUYWJJbmRleDsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGdldCB0YWJJbmRleCgpIHsgcmV0dXJuIHRoaXMuZGlzYWJsZWQgPyAtMSA6IHRoaXMuX3RhYkluZGV4OyB9CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBzZXQgdGFiSW5kZXgodmFsdWUpIHsKICAgICAgICAgICAgICAgIC8vIElmIHRoZSBzcGVjaWZpZWQgdGFiSW5kZXggdmFsdWUgaXMgbnVsbCBvciB1bmRlZmluZWQsIGZhbGwgYmFjayB0byB0aGUgZGVmYXVsdCB2YWx1ZS4KICAgICAgICAgICAgICAgIHRoaXMuX3RhYkluZGV4ID0gdmFsdWUgIT0gbnVsbCA/IHZhbHVlIDogZGVmYXVsdFRhYkluZGV4OwogICAgICAgICAgICB9CiAgICAgICAgfTsKICAgIH0KICAgIC8qKgogICAgICogTWl4aW4gdG8gYXVnbWVudCBhIGRpcmVjdGl2ZSB3aXRoIHVwZGF0ZUVycm9yU3RhdGUgbWV0aG9kLgogICAgICogRm9yIGNvbXBvbmVudCB3aXRoIGBlcnJvclN0YXRlYCBhbmQgbmVlZCB0byB1cGRhdGUgYGVycm9yU3RhdGVgLgogICAgICogQHRlbXBsYXRlIFQKICAgICAqIEBwYXJhbSB7P30gYmFzZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gbWl4aW5FcnJvclN0YXRlKGJhc2UpIHsKICAgICAgICByZXR1cm4gY2xhc3MgZXh0ZW5kcyBiYXNlIHsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7Li4uP30gYXJncwogICAgICAgICAgICAgKi8KICAgICAgICAgICAgY29uc3RydWN0b3IoLi4uYXJncykgewogICAgICAgICAgICAgICAgc3VwZXIoLi4uYXJncyk7CiAgICAgICAgICAgICAgICAvKioKICAgICAgICAgICAgICAgICAqIFdoZXRoZXIgdGhlIGNvbXBvbmVudCBpcyBpbiBhbiBlcnJvciBzdGF0ZS4KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgdGhpcy5lcnJvclN0YXRlID0gZmFsc2U7CiAgICAgICAgICAgICAgICAvKioKICAgICAgICAgICAgICAgICAqIFN0cmVhbSB0aGF0IGVtaXRzIHdoZW5ldmVyIHRoZSBzdGF0ZSBvZiB0aGUgaW5wdXQgY2hhbmdlcyBzdWNoIHRoYXQgdGhlIHdyYXBwaW5nCiAgICAgICAgICAgICAgICAgKiBgTWF0Rm9ybUZpZWxkYCBuZWVkcyB0byBydW4gY2hhbmdlIGRldGVjdGlvbi4KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgdGhpcy5zdGF0ZUNoYW5nZXMgPSBuZXcgU3ViamVjdCgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdXBkYXRlRXJyb3JTdGF0ZSgpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IG9sZFN0YXRlID0gdGhpcy5lcnJvclN0YXRlOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgcGFyZW50ID0gdGhpcy5fcGFyZW50Rm9ybUdyb3VwIHx8IHRoaXMuX3BhcmVudEZvcm07CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBtYXRjaGVyID0gdGhpcy5lcnJvclN0YXRlTWF0Y2hlciB8fCB0aGlzLl9kZWZhdWx0RXJyb3JTdGF0ZU1hdGNoZXI7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBjb250cm9sID0gdGhpcy5uZ0NvbnRyb2wgPyAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5uZ0NvbnRyb2wuY29udHJvbCkpIDogbnVsbDsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IG5ld1N0YXRlID0gbWF0Y2hlci5pc0Vycm9yU3RhdGUoY29udHJvbCwgcGFyZW50KTsKICAgICAgICAgICAgICAgIGlmIChuZXdTdGF0ZSAhPT0gb2xkU3RhdGUpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLmVycm9yU3RhdGUgPSBuZXdTdGF0ZTsKICAgICAgICAgICAgICAgICAgICB0aGlzLnN0YXRlQ2hhbmdlcy5uZXh0KCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9OwogICAgfQogICAgLyoqCiAgICAgKiBNaXhpbiB0byBhdWdtZW50IGEgZGlyZWN0aXZlIHdpdGggYW4gaW5pdGlhbGl6ZWQgcHJvcGVydHkgdGhhdCB3aWxsIGVtaXRzIHdoZW4gbmdPbkluaXQgZW5kcy4KICAgICAqIEB0ZW1wbGF0ZSBUCiAgICAgKiBAcGFyYW0gez99IGJhc2UKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIG1peGluSW5pdGlhbGl6ZWQoYmFzZSkgewogICAgICAgIHJldHVybiBjbGFzcyBleHRlbmRzIGJhc2UgewogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQHBhcmFtIHsuLi4/fSBhcmdzCiAgICAgICAgICAgICAqLwogICAgICAgICAgICBjb25zdHJ1Y3RvciguLi5hcmdzKSB7CiAgICAgICAgICAgICAgICBzdXBlciguLi5hcmdzKTsKICAgICAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgICAgICogV2hldGhlciB0aGlzIGRpcmVjdGl2ZSBoYXMgYmVlbiBtYXJrZWQgYXMgaW5pdGlhbGl6ZWQuCiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIHRoaXMuX2lzSW5pdGlhbGl6ZWQgPSBmYWxzZTsKICAgICAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgICAgICogTGlzdCBvZiBzdWJzY3JpYmVycyB0aGF0IHN1YnNjcmliZWQgYmVmb3JlIHRoZSBkaXJlY3RpdmUgd2FzIGluaXRpYWxpemVkLiBTaG91bGQgYmUgbm90aWZpZWQKICAgICAgICAgICAgICAgICAqIGR1cmluZyBfbWFya0luaXRpYWxpemVkLiBTZXQgdG8gbnVsbCBhZnRlciBwZW5kaW5nIHN1YnNjcmliZXJzIGFyZSBub3RpZmllZCwgYW5kIHNob3VsZAogICAgICAgICAgICAgICAgICogbm90IGV4cGVjdCB0byBiZSBwb3B1bGF0ZWQgYWZ0ZXIuCiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIHRoaXMuX3BlbmRpbmdTdWJzY3JpYmVycyA9IFtdOwogICAgICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAgICAgKiBPYnNlcnZhYmxlIHN0cmVhbSB0aGF0IGVtaXRzIHdoZW4gdGhlIGRpcmVjdGl2ZSBpbml0aWFsaXplcy4gSWYgYWxyZWFkeSBpbml0aWFsaXplZCwgdGhlCiAgICAgICAgICAgICAgICAgKiBzdWJzY3JpYmVyIGlzIHN0b3JlZCB0byBiZSBub3RpZmllZCBvbmNlIF9tYXJrSW5pdGlhbGl6ZWQgaXMgY2FsbGVkLgogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICB0aGlzLmluaXRpYWxpemVkID0gbmV3IE9ic2VydmFibGUoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBzdWJzY3JpYmVyCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBzdWJzY3JpYmVyID0+IHsKICAgICAgICAgICAgICAgICAgICAvLyBJZiBpbml0aWFsaXplZCwgaW1tZWRpYXRlbHkgbm90aWZ5IHRoZSBzdWJzY3JpYmVyLiBPdGhlcndpc2Ugc3RvcmUgdGhlIHN1YnNjcmliZXIgdG8gbm90aWZ5CiAgICAgICAgICAgICAgICAgICAgLy8gd2hlbiBfbWFya0luaXRpYWxpemVkIGlzIGNhbGxlZC4KICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5faXNJbml0aWFsaXplZCkgewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9ub3RpZnlTdWJzY3JpYmVyKHN1YnNjcmliZXIpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX3BlbmRpbmdTdWJzY3JpYmVycykpLnB1c2goc3Vic2NyaWJlcik7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBNYXJrcyB0aGUgc3RhdGUgYXMgaW5pdGlhbGl6ZWQgYW5kIG5vdGlmaWVzIHBlbmRpbmcgc3Vic2NyaWJlcnMuIFNob3VsZCBiZSBjYWxsZWQgYXQgdGhlIGVuZAogICAgICAgICAgICAgKiBvZiBuZ09uSW5pdC4KICAgICAgICAgICAgICogXEBkb2NzLXByaXZhdGUKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIF9tYXJrSW5pdGlhbGl6ZWQoKSB7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5faXNJbml0aWFsaXplZCkgewogICAgICAgICAgICAgICAgICAgIHRocm93IEVycm9yKCdUaGlzIGRpcmVjdGl2ZSBoYXMgYWxyZWFkeSBiZWVuIG1hcmtlZCBhcyBpbml0aWFsaXplZCBhbmQgJyArCiAgICAgICAgICAgICAgICAgICAgICAgICdzaG91bGQgbm90IGJlIGNhbGxlZCB0d2ljZS4nKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuX2lzSW5pdGlhbGl6ZWQgPSB0cnVlOwogICAgICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX3BlbmRpbmdTdWJzY3JpYmVycykpLmZvckVhY2godGhpcy5fbm90aWZ5U3Vic2NyaWJlcik7CiAgICAgICAgICAgICAgICB0aGlzLl9wZW5kaW5nU3Vic2NyaWJlcnMgPSBudWxsOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKgogICAgICAg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ZSwgbnVsbCBpZiB0aGUgdmFsdWUgY2FuIGJlCiAgICAgICAgICogICAgIGRlc2VyaWFsaXplZCBpbnRvIGEgbnVsbCBkYXRlIChlLmcuIHRoZSBlbXB0eSBzdHJpbmcpLCBvciBhbiBpbnZhbGlkIGRhdGUuCiAgICAgICAgICovCiAgICAgICAgZGVzZXJpYWxpemUodmFsdWUpIHsKICAgICAgICAgICAgaWYgKHZhbHVlID09IG51bGwgfHwgdGhpcy5pc0RhdGVJbnN0YW5jZSh2YWx1ZSkgJiYgdGhpcy5pc1ZhbGlkKHZhbHVlKSkgewogICAgICAgICAgICAgICAgcmV0dXJuIHZhbHVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0aGlzLmludmFsaWQoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU2V0cyB0aGUgbG9jYWxlIHVzZWQgZm9yIGFsbCBkYXRlcy4KICAgICAgICAgKiBAcGFyYW0gez99IGxvY2FsZSBUaGUgbmV3IGxvY2FsZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldExvY2FsZShsb2NhbGUpIHsKICAgICAgICAgICAgdGhpcy5sb2NhbGUgPSBsb2NhbGU7CiAgICAgICAgICAgIHRoaXMuX2xvY2FsZUNoYW5nZXMubmV4dCgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDb21wYXJlcyB0d28gZGF0ZXMuCiAgICAgICAgICogQHBhcmFtIHs/fSBmaXJzdCBUaGUgZmlyc3QgZGF0ZSB0byBjb21wYXJlLgogICAgICAgICAqIEBwYXJhbSB7P30gc2Vjb25kIFRoZSBzZWNvbmQgZGF0ZSB0byBjb21wYXJlLgogICAgICAgICAqIEByZXR1cm4gez99IDAgaWYgdGhlIGRhdGVzIGFyZSBlcXVhbCwgYSBudW1iZXIgbGVzcyB0aGFuIDAgaWYgdGhlIGZpcnN0IGRhdGUgaXMgZWFybGllciwKICAgICAgICAgKiAgICAgYSBudW1iZXIgZ3JlYXRlciB0aGFuIDAgaWYgdGhlIGZpcnN0IGRhdGUgaXMgbGF0ZXIuCiAgICAgICAgICovCiAgICAgICAgY29tcGFyZURhdGUoZmlyc3QsIHNlY29uZCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5nZXRZZWFyKGZpcnN0KSAtIHRoaXMuZ2V0WWVhcihzZWNvbmQpIHx8CiAgICAgICAgICAgICAgICB0aGlzLmdldE1vbnRoKGZpcnN0KSAtIHRoaXMuZ2V0TW9udGgoc2Vjb25kKSB8fAogICAgICAgICAgICAgICAgdGhpcy5nZXREYXRlKGZpcnN0KSAtIHRoaXMuZ2V0RGF0ZShzZWNvbmQpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDaGVja3MgaWYgdHdvIGRhdGVzIGFyZSBlcXVhbC4KICAgICAgICAgKiBAcGFyYW0gez99IGZpcnN0IFRoZSBmaXJzdCBkYXRlIHRvIGNoZWNrLgogICAgICAgICAqIEBwYXJhbSB7P30gc2Vjb25kIFRoZSBzZWNvbmQgZGF0ZSB0byBjaGVjay4KICAgICAgICAgKiBAcmV0dXJuIHs/fSBXaGV0aGVyIHRoZSB0d28gZGF0ZXMgYXJlIGVxdWFsLgogICAgICAgICAqICAgICBOdWxsIGRhdGVzIGFyZSBjb25zaWRlcmVkIGVxdWFsIHRvIG90aGVyIG51bGwgZGF0ZXMuCiAgICAgICAgICovCiAgICAgICAgc2FtZURhdGUoZmlyc3QsIHNlY29uZCkgewogICAgICAgICAgICBpZiAoZmlyc3QgJiYgc2Vjb25kKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBsZXQgZmlyc3RWYWxpZCA9IHRoaXMuaXNWYWxpZChmaXJzdCk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBsZXQgc2Vjb25kVmFsaWQgPSB0aGlzLmlzVmFsaWQoc2Vjb25kKTsK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XN0JywgJ1NlcHRlbWJlcicsCiAgICAgICAgICAgICdPY3RvYmVyJywgJ05vdmVtYmVyJywgJ0RlY2VtYmVyJwogICAgICAgIF0sCiAgICAgICAgJ3Nob3J0JzogWydKYW4nLCAnRmViJywgJ01hcicsICdBcHInLCAnTWF5JywgJ0p1bicsICdKdWwnLCAnQXVnJywgJ1NlcCcsICdPY3QnLCAnTm92JywgJ0RlYyddLAogICAgICAgICduYXJyb3cnOiBbJ0onLCAnRicsICdNJywgJ0EnLCAnTScsICdKJywgJ0onLCAnQScsICdTJywgJ08nLCAnTicsICdEJ10KICAgIH07CiAgICBjb25zdCDJtTAkOSA9IC8qKgogICAgICogQHBhcmFtIHs/fSBpCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBpID0+IFN0cmluZyhpICsgMSk7CiAgICAvKioKICAgICAqIFRoZSBkZWZhdWx0IGRhdGUgbmFtZXMgdG8gdXNlIGlmIEludGwgQVBJIGlzIG5vdCBhdmFpbGFibGUuCiAgICAgKiBAdHlwZSB7P30KICAgICAqLwogICAgY29uc3QgREVGQVVMVF9EQVRFX05BTUVTID0gcmFuZ2UoMzEsICjJtTAkOSkpOwogICAgLyoqCiAgICAgKiBUaGUgZGVmYXVsdCBkYXkgb2YgdGhlIHdlZWsgbmFtZXMgdG8gdXNlIGlmIEludGwgQVBJIGlzIG5vdCBhdmFpbGFibGUuCiAgICAgKiBAdHlwZSB7P30KICAgICAqLwogICAgY29uc3QgREVGQVVMVF9EQVlfT0ZfV0VFS19OQU1FUyA9IHsKICAgICAgICAnbG9uZyc6IFsnU3VuZGF5JywgJ01vbmRheScsICdUdWVzZGF5JywgJ1dlZG5lc2RheScsICdUaHVyc2RheScsICdGcmlkYXknLCAnU2F0dXJkYXknXSwKICAgICAgICAnc2hvcnQnOiBbJ1N1bicsICdNb24nLCAnVHVlJywgJ1dlZCcsICdUaHUnLCAnRnJpJywgJ1NhdCddLAogICAgICAgICduYXJyb3cnOiBbJ1MnLCAnTScsIC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ICogZ2V0dGluZyB0aGUgc3RyaW5nIHJlcHJlc2VudGF0aW9uIG9mIGEgRGF0ZSBvYmplY3QgZnJvbSBpdHMgdXRjIHJlcHJlc2VudGF0aW9uLiBXZSdyZSBrZWVwaW5nCiAgICAgICAgICAgICAqIGl0IGhlcmUgZm9yIHNvbWV0aW1lLCBqdXN0IGZvciBwcmVjYXV0aW9uLCBpbiBjYXNlIHdlIGRlY2lkZSB0byByZXZlcnQgc29tZSBvZiB0aGVzZSBjaGFuZ2VzCiAgICAgICAgICAgICAqIHRob3VnaC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMudXNlVXRjRm9yRGlzcGxheSA9IHRydWU7CiAgICAgICAgICAgIHN1cGVyLnNldExvY2FsZShtYXREYXRlTG9jYWxlKTsKICAgICAgICAgICAgLy8gSUUgZG9lcyBpdHMgb3duIHRpbWUgem9uZSBjb3JyZWN0aW9uLCBzbyB3ZSBkaXNhYmxlIHRoaXMgb24gSUUuCiAgICAgICAgICAgIHRoaXMudXNlVXRjRm9yRGlzcGxheSA9ICFwbGF0Zm9ybS5UUklERU5UOwogICAgICAgICAgICB0aGlzLl9jbGFtcERhdGUgPSBwbGF0Zm9ybS5UUklERU5UIHx8IHBsYXRmb3JtLkVER0U7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZGF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0WWVhcihkYXRlKSB7CiAgICAgICAgICAgIHJldHVybiBkYXRlLmdldEZ1bGxZZWFyKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZGF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0TW9udGgoZGF0ZSkgewogICAgICAgICAgICByZXR1cm4gZGF0ZS5nZXRNb250aCgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGRhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldERhdGUoZGF0ZSkgewogICAgICAgICAgICByZXR1cm4gZGF0ZS5nZXREYXRlKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZGF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0RGF5T2ZXZWVrKGRhdGUpIHsKICAgICAgICAgICAgcmV0dXJuIGRhdGUuZ2V0RGF5KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gc3R5bGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldE1vbnRoTmFtZXMoc3R5bGUpIHsKICAgICAgICAgICAgaWYgKFNVUFBPUlRTX0lOVExfQVBJKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBkdGYgPSBuZXcgSW50bC5EYXRlVGltZUZvcm1hdCh0aGlzLmxvY2FsZSwgeyBtb250aDogc3R5bGUsIHRpbWVab25lOiAndXRjJyB9KTsKICAgICAgICAgICAgICAgIHJldHVybiByYW5nZSgxMiwgKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBpCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBpID0+IHRoaXMuX3N0cmlwRGlyZWN0aW9uYWxpdHlDaGFyYWN0ZXJzKHRoaXMuX2Zvcm1hdChkdGYsIG5ldyBEYXRlKDIwMTcsIGksIDEpKSkpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gREVGQVVMVF9NT05USF9OQU1FU1tzdHlsZV07CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0RGF0ZU5hbWVzKCkgewogICAgICAgICAgICBpZiAoU1VQUE9SVFNfSU5UTF9BUEkpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGR0ZiA9IG5ldyBJbnRsLkRhdGVUaW1lRm9ybWF0KHRoaXMubG9jYWxlLCB7IGRheTogJ251bWVyaWMnLCB0aW1lWm9uZTogJ3V0YycgfSk7CiAgICAgICAgICAgICAgICByZXR1cm4gcmFuZ2UoMzEsICgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gaQogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgaSA9PiB0aGlzLl9zdHJpcERpcmVjdGlvbmFsaXR5Q2hhcmFjdGVycyh0aGlzLl9mb3JtYXQoZHRmLCBuZXcgRGF0ZSgyMDE3LCAwLCBpICsgMSkpKSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBERUZBVUxUX0RBVEVfTkFNRVM7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gc3R5bGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldERheU9mV2Vla05hbWVzKHN0eWxlKSB7CiAgICAgICAgICAgIGlmIChTVVBQT1JUU19JTlRMX0FQSSkgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZHRmID0gbmV3IEludGwuRGF0ZVRpbWVGb3JtYXQodGhpcy5sb2NhbGUsIHsgd2Vla2RheTogc3R5bGUsIHRpbWVab25lOiAndXRjJyB9KTsKICAgICAgICAgICAgICAgIHJldHVybiByYW5nZSg3LCAoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGkKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIGkgPT4gdGhpcy5fc3RyaXBEaXJlY3Rpb25hbGl0eUNoYXJhY3RlcnModGhpcy5fZm9ybWF0KGR0ZiwgbmV3IERhdGUoMjAxNywgMCwgaSArIDEpKSkpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gREVGQVVMVF9EQVlfT0ZfV0VFS19OQU1FU1tzdHlsZV07CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZGF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0WWVhck5hbWUoZGF0ZSkgewogICAgICAgICAgICBpZiAoU1VQUE9SVFNfSU5UTF9BUEkpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGR0ZiA9IG5ldyBJbnRsLkRhdGVUaW1lRm9ybWF0KHRoaXMubG9jYWxlLCB7IHllYXI6ICdudW1lcmljJywgdGltZVpvbmU6ICd1dGMnIH0pOwogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3N0cmlwRGlyZWN0aW9uYWxpdHlDaGFyYWN0ZXJzKHRoaXMuX2Zvcm1hdChkdGYsIGRhdGUpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gU3RyaW5nKHRoaXMuZ2V0WWVhcihkYXRlKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0Rmlyc3REYXlPZldlZWsoKSB7CiAgICAgICAgICAgIC8vIFdlIGNhbid0IHRlbGwgdXNpbmcgbmF0aXZlIEpTIERhdGUgd2hhdCB0aGUgZmlyc3QgZGF5IG9mIHRoZSB3ZWVrIGlzLCB3ZSBkZWZhdWx0IHRvIFN1bmRheS4KICAgICAgICAgICAgcmV0dXJuIDA7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZGF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0TnVtRGF5c0luTW9udGgoZGF0ZSkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5nZXREYXRlKHRoaXMuX2NyZWF0ZURhdGVXaXRoT3ZlcmZsb3codGhpcy5nZXRZZWFyKGRhdGUpLCB0aGlzLmdldE1vbnRoKGRhdGUpICsgMSwgMCkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGRhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGNsb25lKGRhdGUpIHsKICAgICAgICAgICAgcmV0dXJuIG5ldyBEYXRlKGRhdGUuZ2V0VGltZSgpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB5ZWFyCiAgICAgICAgICogQHBhcmFtIHs/fSBtb250aAogICAgICAgICAqIEBwYXJhbSB7P30gZGF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgY3JlYXRlRGF0ZSh5ZWFyLCBtb250aCwgZGF0ZSkgewogICAgICAgICAgICAvLyBDaGVjayBmb3IgaW52YWxpZCBtb250aCBhbmQgZGF0ZSAoZXhjZXB0IHVwcGVyIGJvdW5kIG9uIGRhdGUgd2hpY2ggd2UgaGF2ZSB0byBjaGVjayBhZnRlcgogICAgICAgICAgICAvLyBjcmVhdGluZyB0aGUgRGF0ZSkuCiAgICAgICAgICAgIGlmIChtb250aCA8IDAgfHwgbW9udGggPiAxMSkgewogICAgICAgICAgICAgICAgdGhyb3cgRXJyb3IoYEludmFsaWQgbW9udGggaW5kZXggIiR7bW9udGh9Ii4gTW9udGggaW5kZXggaGFzIHRvIGJlIGJldHdlZW4gMCBhbmQgMTEuYCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGRhdGUgPCAxKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBFcnJvcihgSW52YWxpZCBkYXRlICIke2RhdGV9Ii4gRGF0ZSBoYXMgdG8gYmUgZ3JlYXRlciB0aGFuIDAuYCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgcmVzdWx0ID0gdGhpcy5fY3JlYXRlRGF0ZVdpdGhPdmVyZmxvdyh5ZWFyLCBtb250aCwgZGF0ZSk7CiAgICAgICAgICAgIC8vIENoZWNrIHRoYXQgdGhlIGRhdGUgd2Fzbid0IGFib3ZlIHRoZSB1cHBlciBib3VuZCBmb3IgdGhlIG1vbnRoLCBjYXVzaW5nIHRoZSBtb250aCB0byBvdmVyZmxvdwogICAgICAgICAgICBpZiAocmVzdWx0LmdldE1vbnRoKCkgIT0gbW9udGgpIHsKICAgICAgICAgICAgICAgIHRocm93IEVycm9yKGBJbnZhbGlkIGRhdGUgIiR7ZGF0ZX0iIGZvciBtb250aCB3aXRoIGluZGV4ICIke21vbnRofSIuYCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB0b2RheSgpIHsKICAgICAgICAgICAgcmV0dXJuIG5ldyBEYXRlKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHBhcnNlKHZhbHVlKSB7CiAgICAgICAgICAgIC8vIFdlIGhhdmUgbm8gd2F5IHVzaW5nIHRoZSBuYXRpdmUgSlMgRGF0ZSB0byBzZXQgdGhlIHBhcnNlIGZvcm1hdCBvciBsb2NhbGUsIHNvIHdlIGlnbm9yZSB0aGVzZQogICAgICAgICAgICAvLyBwYXJhbWV0ZXJzLgogICAgICAgICAgICBpZiAodHlwZW9mIHZhbHVlID09ICdudW1iZXInKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IERhdGUodmFsdWUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB2YWx1ZSA/IG5ldyBEYXRlKERhdGUucGFyc2UodmFsdWUpKSA6IG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZGF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gZGlzcGxheUZvcm1hdAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZm9ybWF0KGRhdGUsIGRpc3BsYXlGb3JtYXQpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLmlzVmFsaWQoZGF0ZSkpIHsKICAgICAgICAgICAgICAgIHRocm93IEVycm9yKCdOYXRpdmVEYXRlQWRhcHRlcjogQ2Fubm90IGZvcm1hdCBpbnZhbGlkIGRhdGUuJyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKFNVUFBPUlRTX0lOVExfQVBJKSB7CiAgICAgICAgICAgICAgICAvLyBPbiBJRSBhbmQgRWRnZSB0aGUgaTE4biBBUEkgd2lsbCB0aHJvdyBhIGhhcmQgZXJyb3IgdGhhdCBjYW4gY3Jhc2ggdGhlIGVudGlyZSBhcHAKICAgICAgICAgICAgICAgIC8vIGlmIHdlIGF0dGVtcHQgdG8gZm9ybWF0IGEgZGF0ZSB3aG9zZSB5ZWFyIGlzIGxlc3MgdGhhbiAxIG9yIGdyZWF0ZXIgdGhhbiA5OTk5LgogICAgICAgICAgICAgICAgaWYgKHRoaXMuX2NsYW1wRGF0ZSAmJiAoZGF0ZS5nZXRGdWxsWWVhcigpIDwgMSB8fCBkYXRlLmdldEZ1bGxZZWFyKCkgPiA5OTk5KSkgewogICAgICAgICAgICAgICAgICAgIGRhdGUgPSB0aGlzLmNsb25lKGRhdGUpOwogICAgICAgICAgICAgICAgICAgIGRhdGUuc2V0RnVsbFllYXIoTWF0aC5tYXgoMSwgTWF0aC5taW4oOTk5OSwgZGF0ZS5nZXRGdWxsWWVhcigpKSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZGlzcGxheUZvcm1hdCA9IE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgZGlzcGxheUZvcm1hdCksIHsgdGltZVpvbmU6ICd1dGMnIH0pOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZHRmID0gbmV3IEludGwuRGF0ZVRpbWVGb3JtYXQodGhpcy5sb2NhbGUsIGRpc3BsYXlGb3JtYXQpOwogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3N0cmlwRGlyZWN0aW9uYWxpdHlDaGFyYWN0ZXJzKHRoaXMuX2Zvcm1hdChkdGYsIGRhdGUpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpcy5fc3RyaXBEaXJlY3Rpb25hbGl0eUNoYXJhY3RlcnMoZGF0ZS50b0RhdGVTdHJpbmcoKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZGF0ZQogICAgICAgICAqIEBwYXJhbSB7P30geWVhcnMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGFkZENhbGVuZGFyWWVhcnMoZGF0ZSwgeWVhcnMpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuYWRkQ2FsZW5kYXJNb250aHMoZGF0ZSwgeWVhcnMgKiAxMik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZGF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gbW9udGhzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBhZGRDYWxlbmRhck1vbnRocyhkYXRlLCBtb250aHMpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAq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0ZSwgZGF5cykgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fY3JlYXRlRGF0ZVdpdGhPdmVyZmxvdyh0aGlzLmdldFllYXIoZGF0ZSksIHRoaXMuZ2V0TW9udGgoZGF0ZSksIHRoaXMuZ2V0RGF0ZShkYXRlKSArIGRheXMpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGRhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHRvSXNvODYwMShkYXRlKSB7CiAgICAgICAgICAgIHJldHVybiBbCiAgICAgICAgICAgICAgICBkYXRlLmdldFVUQ0Z1bGxZZWFyKCksCiAgICAgICAgICAgICAgICB0aGlzLl8yZGlnaXQoZGF0ZS5nZXRVVENNb250aCgpICsgMSksCiAgICAgICAgICAgICAgICB0aGlzLl8yZGlnaXQoZGF0ZS5nZXRVVENEYXRlKCkpCiAgICAgICAgICAgIF0uam9pbignLScpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZXR1cm5zIHRoZSBnaXZlbiB2YWx1ZSBpZiBnaXZlbiBhIHZhbGlkIERhdGUgb3IgbnVsbC4gRGVzZXJpYWxpemVzIHZhbGlkIElTTyA4NjAxIHN0cmluZ3MKICAgICAgICAgKiAoaHR0cHM6Ly93d3cuaWV0Zi5vcmcvcmZjL3JmYzMzMzkudHh0KSBpbnRvIHZhbGlkIERhdGVzIGFuZCBlbXB0eSBzdHJpbmcgaW50byBudWxsLiBSZXR1cm5zIGFuCiAgICAgICAgICogaW52YWxpZCBkYXRlIGZvciBhbGwgb3RoZXIgdmFsdWVzLgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGRlc2VyaWFsaXplKHZhbHVlKSB7CiAgICAgICAgICAgIGlmICh0eXBlb2YgdmFsdWUgPT09ICdzdHJpbmcnKSB7CiAgICAgICAgICAgICAgICBpZiAoIXZhbHVlKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvLyBUaGUgYERhdGVgIGNvbnN0cnVjdG9yIGFjY2VwdHMgZm9ybWF0cyBvdGhlciB0aGFuIElTTyA4NjAxLCBzbyB3ZSBuZWVkIHRvIG1ha2Ugc3VyZSB0aGUKICAgICAgICAgICAgICAgIC8vIHN0cmluZyBpcyB0aGUgcmlnaHQgZm9ybWF0IGZpcnN0LgogICAgICAgICAgICAgICAgaWYgKElTT184NjAxX1JFR0VYLnRlc3QodmFsdWUpKSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGxldCBkYXRlID0gbmV3IERhdGUodmFsdWUpOwogICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmlzVmFsaWQoZGF0ZSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGRhdGU7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBzdXBlci5kZXNlcmlhbGl6ZSh2YWx1ZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gb2JqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBpc0RhdGVJbnN0YW5jZShvYmopIHsKICAgICAgICAgICAgcmV0dXJuIG9iaiBpbnN0YW5jZW9mIERhdGU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZGF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgaXNWYWxpZChkYXRlKSB7CiAgICAgICAgICAgIHJldHVybiAhaXNOYU4oZGF0ZS5nZXRUaW1lKCkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGludmFsaWQoKSB7CiAgICAgICAgICAgIHJldHVybiBuZXcgRGF0ZShOYU4pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDcmVhdGVzIGEgZGF0ZSBidXQgYWxsb3dzIHRoZSBtb250aCBhbmQgZGF0ZSB0byBvdmVyZmxvdy4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30geWVhcgogICAgICAgICAqIEBwYXJhbSB7P30gbW9udGgKICAgICAgICAgKiBAcGFyYW0gez99IGRhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9jcmVhdGVEYXRlV2l0aE92ZXJmbG93KHllYXIsIG1vbnRoLCBkYXRlKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcmVzdWx0ID0gbmV3IERhdGUoeWVhciwgbW9udGgsIGRhdGUpOwogICAgICAgICAgICAvLyBXZSBuZWVkIHRvIGNvcnJlY3QgZm9yIHRoZSBmYWN0IHRoYXQgSlMgbmF0aXZlIERhdGUgdHJlYXRzIHllYXJzIGluIHJhbmdlIFswLCA5OV0gYXMKICAgICAgICAgICAgLy8gYWJicmV2aWF0aW9ucyBmb3IgMTl4eC4KICAgICAgICAgICAgaWYgKHllYXIgPj0gMCAmJiB5ZWFyIDwgMTAwKSB7CiAgICAgICAgICAgICAgICByZXN1bHQuc2V0RnVsbFllYXIodGhpcy5nZXRZZWFyKHJlc3VsdCkgLSAxOTAwKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBQYWRzIGEgbnVtYmVyIHRvIG1ha2UgaXQgdHdvIGRpZ2l0cy4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gbiBUaGUgbnVtYmVyIHRvIHBhZ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GVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvKioKICAgICAqIEBsaWNlbnNlCiAgICAgKiBDb3B5cmlnaHQgR29vZ2xlIExMQyBBbGwgUmlnaHRzIFJlc2VydmVkLgogICAgICoKICAgICAqIFVzZSBvZiB0aGlzIHNvdXJjZSBjb2RlIGlzIGdvdmVybmVkIGJ5IGFuIE1JVC1zdHlsZSBsaWNlbnNlIHRoYXQgY2FuIGJlCiAgICAgKiBmb3VuZCBpbiB0aGUgTElDRU5TRSBmaWxlIGF0IGh0dHBzOi8vYW5ndWxhci5pby9saWNlbnNlCiAgICAgKi8KICAgIC8qKiBAdHlwZSB7P30gKi8KICAgIGNvbnN0IE1BVF9OQVRJVkVfREFURV9GT1JNQVRTID0gewogICAgICAgIHBhcnNlOiB7CiAgICAgICAgICAgIGRhdGVJbnB1dDogbnVsbCwKICAgICAgICB9LAogICAgICAgIGRpc3BsYXk6IHsKICAgICAgICAgICAgZGF0ZUlucHV0OiB7IHllYXI6ICdudW1lcmljJywgbW9udGg6ICdudW1lcmljJywgZGF5OiAnbnVtZXJpYycgfSwKICAgICAgICAgICAgbW9udGhZZWFyTGFiZWw6IHsgeWVhcjogJ251bWVyaWMnLCBtb250aDogJ3Nob3J0JyB9LAogICAgICAgICAgICBkYXRlQTExeUxhYmVsOiB7IHllYXI6ICdudW1lcmljJywgbW9udGg6ICdsb25nJywgZGF5OiAnbnVtZXJpYycgfSwKICAgICAgICAgICAgbW9udGhZZWFyQTExeUxhYmVsOiB7IHllYXI6ICdudW1lcmljJywgbW9udGg6ICdsb25nJyB9LAogICAgICAgIH0KICAgIH07CgogICAgLyoqCiAgICAgKiBAZmlsZW92ZXJ2aWV3IGFkZGVkIGJ5IHRzaWNrbGUKICAgICAqIEdlbmVyYXRlZCBmcm9tOiBzcmMvbWF0ZXJpYWwvY29yZS9kYXRldGltZS9pbmRleC50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5c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XRjaGVyIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGNvbnRyb2wKICAgICAgICAgKiBAcGFyYW0gez99IGZvcm0KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGlzRXJyb3JTdGF0ZShjb250cm9sLCBmb3JtKSB7CiAgICAgICAgICAgIHJldHVybiAhIShjb250cm9sICYmIGNvbnRyb2wuaW52YWxpZCAmJiAoY29udHJvbC5kaXJ0eSB8fCAoZm9ybSAmJiBmb3JtLnN1Ym1pdHRlZCkpKTsKICAgICAgICB9CiAgICB9CiAgICBTaG93T25EaXJ0eUVycm9yU3RhdGVNYXRjaGVyLsm1ZmFjID0gZnVuY3Rpb24gU2hvd09uRGlydHlFcnJvclN0YXRlTWF0Y2hlcl9GYWN0b3J5KHQpIHsgcmV0dXJuIG5ldyAodCB8fCBTaG93T25EaXJ0eUVycm9yU3RhdGVNYXRjaGVyKSgpOyB9OwogICAgU2hvd09uRGlydHlFcnJvclN0YXRlTWF0Y2hlci7JtXByb3YgPSDJtcm1ZGVmaW5lSW5qZWN0YWJsZSh7IHRva2VuOiBTaG93T25EaXJ0eUVycm9yU3RhdGVNYXRjaGVyLCBmYWN0b3J5OiBTaG93T25EaXJ0eUVycm9yU3RhdGVNYXRjaGVyLsm1ZmFjIH0pOwogICAgLyoqCiAgICAgKiBQcm92aWRlciB0aGF0IGRlZmluZXMgaG93IGZvcm0gY29udHJvbHMgYmVoYXZlIHdpdGggcmVnYXJkcyB0byBkaXNwbGF5aW5nIGVycm9yIG1lc3NhZ2VzLgogICAgICovCiAgICBjbGFzcyBFcnJvclN0YXRlTWF0Y2hlciB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBjb250cm9sCiAgICAgICAgICogQHBhcmFtIHs/fSBmb3JtCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBpc0Vycm9yU3RhdGUoY29udHJvbCwgZm9ybSkgewog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2VuIGludHJvZHVjZWQgaW4gQW5ndWxhciA2LjEuCiAgICAgICAgICAgICAgICAvLyBCZWNhdXNlIHdlIGNhbid0IGRlcGVuZCBvbiBIQU1NRVJfTE9BREVSJ3MgZXhpc3RhbmNlIHVudGlsIDcuMCwgd2UgaGF2ZSB0byBhbHdheXMgc2V0CiAgICAgICAgICAgICAgICAvLyBgdGhpcy5ldmVudHNgIHRvIHRoZSBzZXQgd2Ugc3VwcG9ydCwgaW5zdGVhZCBvZiBjb25kaXRpb25hbGx5IHNldHRpbmcgaXQgdG8gYFtdYCBpZgogICAgICAgICAgICAgICAgLy8gYEhBTU1FUl9MT0FERVJgIGlzIHByZXNlbnQgKGFuZCB0aGVuIHRocm93aW5nIGFuIEVycm9yIGhlcmUgaWYgYHdpbmRvdy5IYW1tZXJgIGlzCiAgICAgICAgICAgICAgICAvLyB1bmRlZmluZWQpLgogICAgICAgICAgICAgICAgLy8gQGJyZWFraW5nLWNoYW5nZSA4LjAuMAogICAgICAgICAgICAgICAgcmV0dXJuIG5vb3BIYW1tZXJJbnN0YW5jZTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG1jID0gbmV3IGhhbW1lcihlbGVtZW50LCB0aGlzLl9oYW1tZXJPcHRpb25zIHx8IHVuZGVmaW5lZCk7CiAgICAgICAgICAgIC8vIERlZmF1bHQgSGFtbWVyIFJlY29nbml6ZXJzLgogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHBhbiA9IG5ldyBoYW1tZXIuUGFuKCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc3dpcGUgPSBuZXcgaGFtbWVyLlN3aXBlKCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcHJlc3MgPSBuZXcgaGFtbWVyLlByZXNzKCk7CiAgICAgICA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CiAgICAgICAgICAgIHRoaXMuc3RhdGUgPSAzIC8qIEhJRERFTiAqLzsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogRmFkZXMgb3V0IHRoZSByaXBwbGUgZWxlbWVudC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZhZGVPdXQoKSB7CiAgICAgICAgICAgIHRoaXMuX3JlbmRlcmVyLmZhZGVPdXRSaXBwbGUodGhpcyk7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBEZWZhdWx0IHJpcHBsZSBhbmltYXRpb24gY29uZmlndXJhdGlvbiBmb3IgcmlwcGxlcyB3aXRob3V0IGFuIGV4cGxpY2l0CiAgICAgKiBhbmltYXRpb24gY29uZmlnIHNwZWNpZmllZC4KICAgICAqIEB0eXBlIHs/fQogICAgICovCiAgICBjb25zdCBkZWZhdWx0UmlwcGxlQW5pbWF0aW9uQ29uZmlnID0gewogICAgICAgIGVudGVyRHVyYXRpb246IDQ1MCwKICAgICAgICBleGl0RHVyYXRpb246IDQwMAogICAgfTsKICAgIC8qKgogICAgICogVGltZW91dCBmb3IgaWdub3JpbmcgbW91c2UgZXZlbnRzLiBNb3VzZSBldmVudHMgd2lsbCBiZSB0ZW1wb3JhcnkgaWdub3JlZCBhZnRlciB0b3VjaAogICAgICogZXZlbnRzIHRvIGF2b2lkIHN5bnRoZXRpYyBtb3VzZSBldmVudHMuCiAgICAgKiBAdHlwZSB7P30KICAgICAqLwogICAgY29uc3QgaWdub3JlTW91c2VFdmVudHNUaW1lb3V0ID0gODAwOwogICAgLyoqCiAgICAgKiBPcHRpb25zIHRoYXQgYXBwbHkgdG8gYWxsIHRoZSBldmVudCBsaXN0ZW5lcnMgdGhhdCBhcmUgYm91bmQgYnkgdGhlIHJpcHBsZSByZW5kZXJlci4KICAgICAqIEB0eXBlIHs/fQogICAgICovCiAgICBjb25zdCBwYXNzaXZlRXZlbnRPcHRpb25zID0gbm9ybWFsaXplU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gICAgICAqIEBwYXJhbSB7P30gX25nWm9uZQogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudE9yRWxlbWVudFJlZgogICAgICAgICAqIEBwYXJhbSB7P30gcGxhdGZvcm0KICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihfdGFyZ2V0LCBfbmdab25lLCBlbGVtZW50T3JFbGVtZW50UmVmLCBwbGF0Zm9ybSkgewogICAgICAgICAgICB0aGlzLl90YXJnZXQgPSBfdGFyZ2V0OwogICAgICAgICAgICB0aGlzLl9uZ1pvbmUgPSBfbmdab25lOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogV2hldGhlciB0aGUgcG9pbnRlciBpcyBjdXJyZW50bHkgZG93biBvciBub3QuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9pc1BvaW50ZXJEb3duID0gZmFsc2U7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBTZXQgb2YgY3VycmVudGx5IGFjdGl2ZSByaXBwbGUgcmVmZXJlbmNlcy4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX2FjdGl2ZVJpcHBsZXMgPSBuZXcgU2V0KCk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBXaGV0aGVyIHBvaW50ZXItdXAgZXZlbnQgbGlzdGVuZXJzIGhhdmUgYmVlbiByZWdpc3RlcmVkLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fcG9pbnRlclVwRXZlbnRzUmVnaXN0ZXJlZCA9IGZhbHNlOwogICAgICAgICAgICAvLyBPbmx5IGRvIGFueXRoaW5nIGlmIHdlJ3JlIG9uIHRoZSBicm93c2VyLgogICAgICAgICAgICBpZiAocGxhdGZvcm0uaXNCcm93c2VyKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9jb250YWluZXJFbGVtZW50ID0gY29lcmNlRWxlbWVudChlbGVtZW50T3JFbGVtZW50UmVmKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBGYWRlcyBpbiBhIHJpcHBsZSBhdCB0aGUgZ2l2ZW4gY29vcmRpbmF0ZXMuCiAgICAgICAgICogQHBhcmFtIHs/fSB4IENvb3JkaW5hdGUgd2l0aGluIHRoZSBlbGVtZW50LCBhbG9uZyB0aGUgWCBheGlzIGF0IHdoaWNoIHRvIHN0YXJ0IHRoZSByaXBwbGUuCiAgICAgICAgICogQHBhcmFtIHs/fSB5IENvb3JkaW5hdGUgd2l0aGluIHRoZSBlbGVtZW50LCBhbG9uZyB0aGUgWSBheGlzIGF0IHdoaWNoIHRvIHN0YXJ0IHRoZSByaXBwbGUuCiAgICAgICAgICogQHBhcmFtIHs/PX0gY29uZmlnIEV4dHJhIHJpcHBsZSBvcHRpb25zLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZmFkZUluUmlwcGxlKHgsIHksIGNvbmZpZyA9IHt9KSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgY29udGFpbmVyUmVjdCA9IHRoaXMuX2NvbnRhaW5lclJlY3QgPQogICAgICAgICAgICAgICAgdGhpcy5fY29udGFpbmVyUmVjdCB8fCB0aGlzLl9jb250YWluZXJFbGVtZW50LmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGFuaW1hdGlvbkNvbmZpZyA9IE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgZGVmYXVsdFJpcHBsZUFuaW1hdGlvbkNvbmZpZyksIGNvbmZpZy5hbmltYXRpb24pOwogICAgICAgICAgICBpZiAoY29uZmlnLmNlbnRlcmVkKSB7CiAgICAgICAgICAgICAgICB4ID0gY29udGFpbmVyUmVjdC5sZWZ0ICsgY29udGFpbmVyUmVjdC53aWR0aCAvIDI7CiAgICAgICAgICAgICAgICB5ID0gY29udGFpbmVyUmVjdC50b3AgKyBjb250YWluZXJSZWN0LmhlaWdodCAvIDI7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCByYWRpdXMgPSBjb25maWcucmFkaXVzIHx8IGRpc3RhbmNlVG9GdXJ0aGVzdENvcm5lcih4LCB5LCBjb250YWluZXJSZWN0KTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBvZmZzZXRYID0geCAtIGNvbnRhaW5lclJlY3QubGVmdDsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBvZmZzZXRZID0geSAtIGNvbnRhaW5lclJlY3QudG9wOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGR1cmF0aW9uID0gYW5pbWF0aW9uQ29uZmlnLmVudGVyRHVyYXRpb247CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcmlwcGxlID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnZGl2Jyk7CiAgICAgICAgICAgIHJpcHBsZS5jbGFzc0xpc3QuYWRkKCdtYXQtcmlwcGxlLWVsZW1lbnQnKTsKICAgICAgICAgICAgcmlwcGxlLnN0eWxlLmxlZnQgPSBgJHtvZmZzZXRYIC0gcmFkaXVzfXB4YDsKICAgICAgICAgICAgcmlwcGxlLnN0eWxlLnRvcCA9IGAke29mZnNldFkgLSByYWRpdXN9cHhgOwogICAgICAgICAgICByaXBwbGUuc3R5bGUuaGVpZ2h0ID0gYCR7cmFkaXVzICogMn1weGA7CiAgICAgICAgICAgIHJpcHBsZS5zdHlsZS53aWR0aCA9IGAke3JhZGl1cyAqIDJ9cHhgOwogICAgICAgICAgICAvLyBJZiBhIGN1c3RvbSBjb2xvciBoYXMgYmVlbiBzcGVjaWZpZWQsIHNldCBpdCBhcyBpbm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BRElOR19JTiAqLzsKICAgICAgICAgICAgLy8gQWRkIHRoZSByaXBwbGUgcmVmZXJlbmNlIHRvIHRoZSBsaXN0IG9mIGFsbCBhY3RpdmUgcmlwcGxlcy4KICAgICAgICAgICAgdGhpcy5fYWN0aXZlUmlwcGxlcy5hZGQocmlwcGxlUmVmKTsKICAgICAgICAgICAgaWYgKCFjb25maWcucGVyc2lzdGVudCkgewogICAgICAgICAgICAgICAgdGhpcy5fbW9zdFJlY2VudFRyYW5zaWVudFJpcHBsZSA9IHJpcHBsZVJlZjsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBXYWl0IGZvciB0aGUgcmlwcGxlIGVsZW1lbnQgdG8gYmUgY29tcGxldGVseSBmYWRlZCBpbi4KICAgICAgICAgICAgLy8gT25jZSBpdCdzIGZhZGVkIGluLCB0aGUgcmlwcGxlIGNhbiBiZSBoaWRkZW4gaW1tZWRpYXRlbHkgaWYgdGhlIG1vdXNlIGlzIHJlbGVhc2VkLgogICAgICAgICAgICB0aGlzLl9ydW5UaW1lb3V0T3V0c2lkZVpvbmUoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgaXNNb3N0UmVjZW50VHJhbnNpZW50UmlwcGxlID0gcmlwcGxlUmVmID09PSB0aGlzLl9tb3N0UmVjZW50VHJhbnNpZW50UmlwcGxlOwogICAgICAgICAgICAgICAgcmlwcGxlUmVmLnN0YXRlID0gMSAvKiBWSVNJQkxFICovOwogICAgICAgICAgICAgICAgLy8gV2hlbiB0aGUgdGltZXIgcnVucyBvdXQgd2hpbGUgdGhlIHVzZXIgaGFzIGtlcHQgdGhlaXIgcG9pbnRlciBkb3duLCB3ZSB3YW50IHRvCiAgICAgICAgICAgICAgICAvLyBrZWVwIG9ubHkgdGhlIHBlcnNpc3RlbnQgcmlwcGxlcyBhbmQgdGhlIGxhdGVzdCB0cmFuc2llbnQgcmlwcGxlLiBXZSBkbyB0aGlzLAogICAgICAgICAgICAgICAgLy8gYmVjYXVzZSB3ZSBkb24ndCB3YW50IHN0YWNrZWQgdHJhbnNpZW50IHJpcHBsZXMgdG8gYXBwZWFyIGFmdGVyIHRoZWlyIGVudGVyCiAgICAgICAgICAgICAgICAvLyBhbmltYXRpb24gaGFzIGZpbmlzaGVkLgogICAgICAgICAgICAgICAgaWYgKCFjb25maWcucGVyc2lzdGVudCAmJiAoIWlzTW9zdFJlY2VudFRyYW5zaWVudFJpcHBsZSB8fCAhdGhpcy5faXNQb2ludGVyRG93bikpIHsKICAgICAgICAgICAgICAgICAgICByaXBwbGVSZWYuZmFkZU91dCgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSwgZHVyYXRpb24pOwogICAgICAgICAgICByZXR1cm4gcmlwcGxlUmVmOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBGYWRlcyBvdXQgYSByaXBwbGUgcmVmZXJlbmNlLgogICAgICAgICAqIEBwYXJhbSB7P30gcmlwcGxlUmVmCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmYWRlT3V0UmlwcGxlKHJpcHBsZVJlZikgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHdhc0FjdGl2ZSA9IHRoaXMuX2FjdGl2ZVJpcHBsZXMuZGVsZXRlKHJpcHBsZVJlZik7CiAgICAgICAgICAgIGlmIChyaXBwbGVSZWYgPT09IHRoaXMuX21vc3RSZWNlbnRUcmFuc2llbnRSaXBwbGUpIHsKICAgICAgICAgICAgICAgIHRoaXMuX21vc3RSZWNlbnRUcmFuc2llbnRSaXBwbGUgPSBudWxsOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIENsZWFyIG91dCB0aGUgY2FjaGVkIGJvdW5kaW5nIHJlY3QgaWYgd2UgaGF2ZSBubyBtb3JlIHJpcHBsZXMuCiAgICAgICAgICAgIGlmICghdGhpcy5fYWN0aXZlUmlwcGxlcy5zaXplKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9jb250YWluZXJSZWN0ID0gbnVsbDsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBGb3IgcmlwcGxlcyB0aGF0IGFyZSBub3QgYWN0aXZlIGFueW1vcmUsIGRvbid0IHJlLXJ1biB0aGUgZmFkZS1vdXQgYW5pbWF0aW9uLgogICAgICAgICAgICBpZiAoIXdhc0FjdGl2ZSkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcmlwcGxlRWwgPSByaXBwbGVSZWYuZWxlbWVudDsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBhbmltYXRpb25Db25maWcgPSBPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sIGRlZmF1bHRSaXBwbGVBbmltYXRpb25Db25maWcpLCByaXBwbGVSZWYuY29uZmlnLmFuaW1hdGlvbik7CiAgICAgICAgICAgIHJpcHBsZUVsLnN0eWxlLnRyYW5zaXRpb25EdXJhdGlvbiA9IGAke2FuaW1hdGlvbkNvbmZpZy5leGl0RHVyYXRpb259bXNgOwogICAgICAgICAgICByaXBwbGVFbC5zdHlsZS5vcGFjaXR5ID0gJzAnOwogICAgICAgICAgICByaXBwbGVSZWYuc3RhdGUgPSAyIC8qIEZBRElOR19PVVQgKi87CiAgICAgICAgICAgIC8vIE9uY2UgdGhlIHJpcHBsZSBmYWRlZCBvdXQsIHRoZSByaXBwbGUgY2FuIGJlIHNhZmVseSByZW1vdmVkIGZyb20gdGhlIERPTS4KICAgICAgICAgICAgdGhpcy5fcnVuVGltZW91dE91dHNpZGVab25lKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIHJpcHBsZVJlZi5zdGF0ZSA9IDMgLyogSElEREVOICovOwogICAgICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKHJpcHBsZUVsLnBhcmVudE5vZGUpKS5yZW1vdmVDaGlsZChyaXBwbGVFbCk7CiAgICAgICAgICAgIH0pLCBhbmltYXRpb25Db25maWcuZXhpdER1cmF0aW9uKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogRmFkZXMgb3V0IGFsbCBjdXJyZW50bHkgYWN0aXZlIHJpcHBsZXMuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmYWRlT3V0QWxsKCkgewogICAgICAgICAgICB0aGlzLl9hY3RpdmVSaXBwbGVzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHJpcHBsZQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgcmlwcGxlID0+IHJpcHBsZS5mYWRlT3V0KCkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU2V0cyB1cCB0aGUgdHJpZ2dlciBldmVudCBsaXN0ZW5lcnMKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnRPckVsZW1lbnRSZWYKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldHVwVHJpZ2dlckV2ZW50cyhlbGVtZW50T3JFbGVtZW50UmVmKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZWxlbWVudCA9IGNvZXJjZUVsZW1lbnQoZWxlbWVudE9yRWxlbWVudFJlZik7CiAgICAgICAgICAgIGlmICghZWxlbWVudCB8fCBlbGVtZW50ID09PSB0aGlzLl90cmlnZ2VyRWxlbWVudCkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIFJlbW92ZSBhbGwgcHJldmlvdXNseSByZWdpc3RlcmVkIGV2ZW50IGxpc3RlbmVycyBmcm9tIHRoZSB0cmlnZ2VyIGVsZW1lbnQuCiAgICAgICAgICAgIHRoaXMuX3JlbW92ZVRyaWdnZXJFdmVudHMoKTsKICAgICAgICAgICAgdGhpcy5fdHJpZ2dlckVsZW1lbnQgPSBlbGVtZW50OwogICAgICAgICAgICB0aGlzLl9yZWdpc3RlckV2ZW50cyhwb2ludGVyRG93bkV2ZW50cyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEhhbmRsZXMgYWxsIHJlZ2lzdGVyZWQgZXZlbnRzLgogICAgICAgICAqIFxAZG9jcy1wcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBldmVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgaGFuZGxlRXZlbnQoZXZlbnQpIHsKICAgICAgICAgICAgaWYgKGV2ZW50LnR5cGUgPT09ICdtb3VzZWRvd24nKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9vbk1vdXNlZG93bigoLyoqIEB0eXBlIHs/fSAqLyAoZXZlbnQpKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoZXZlbnQudHlwZSA9PT0gJ3RvdWNoc3RhcnQnKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9vblRvdWNoU3RhcnQoKC8qKiBAdHlwZSB7P30gKi8gKGV2ZW50KSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fb25Qb2ludGVyVXAoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBJZiBwb2ludGVyLXVwIGV2ZW50cyBoYXZlbid0IGJlZW4gcmVnaXN0ZXJlZCB5ZXQsIGRvIHNvIG5vdy4KICAgICAgICAgICAgLy8gV2UgZG8gdGhpcyBvbi1kZW1hbmQgaW4gb3JkZXIgdG8gcmVkdWNlIHRoZSB0b3RhbCBudW1iZXIgb2YgZXZlbnQgbGlzdGVuZXJzCiAgICAgICAgICAgIC8vIHJlZ2lzdGVyZWQgYnkgdGhlIHJpcHBsZXMsIHdoaWNoIHNwZWVkcyB1cCB0aGUgcmVuZGVyaW5nIHRpbWUgZm9yIGxhcmdlIFVJcy4KICAgICAgICAgICAgaWYgKCF0aGlzLl9wb2ludGVyVXBFdmVudHNSZWdpc3RlcmVkKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9yZWdpc3RlckV2ZW50cyhwb2ludGVyVXBFdmVudHMpOwogICAgICAgICAgICAgICAgdGhpcy5fcG9pbnRlclVwRXZlbnRzUmVnaXN0ZXJlZCA9IHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogRnVuY3Rpb24gYmVpbmcgY2FsbGVkIHdoZW5ldmVyIHRoZSB0cmlnZ2VyIGlzIGJlaW5nIHByZXNzZWQgdXNpbmcgbW91c2UuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfb25Nb3VzZWRvd24oZXZlbnQpIHsKICAgICAgICAgICAgLy8gU2NyZWVuIHJlYWRlcnMgd2lsbCBmaXJlIGZha2UgbW91c2UgZXZlbnRzIGZvciBzcGFjZS9lbnRlci4gU2tpcCBsYXVuY2hpbmcgYQogICAgICAgICAgICAvLyByaXBwbGUgaW4gdGhpcyBjYXNlIGZvciBjb25zaXN0ZW5jeSB3aXRoIHRoZSBub24tc2NyZWVuLXJlYWRlciBleHBlcmllbmNlLgogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGlzRmFrZU1vdXNlZG93biA9IGlzRmFrZU1vdXNlZG93bkZyb21TY3JlZW5SZWFkZXIoZXZlbnQpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGlzU3ludGhldGljRXZlbnQgPSB0aGlzLl9sYXN0VG91Y2hTdGFydEV2ZW50ICYmCiAgICAgICAgICAgICAgICBEYXRlLm5vdygpIDwgdGhpcy5fbGFzdFRvdWNoU3RhcnRFdmVudCArIGlnbm9yZU1vdXNlRXZlbnRzVGltZW91dDsKICAgICAgICAgICAgaWYgKCF0aGlzLl90YXJnZXQucmlwcGxlRGlzYWJsZWQgJiYgIWlzRmFrZU1vdXNlZG93biAmJiAhaXNTeW50aGV0aWNFdmVudCkgewogICAgICAgICAgICAgICAgdGhpcy5faXNQb2ludGVyRG93biA9IHRydWU7CiAgICAgICAgICAgICAgICB0aGlzLmZhZGVJblJpcHBsZShldmVudC5jbGllbnRYLCBldmVudC5jbGllbnRZLCB0aGlzLl90YXJnZXQucmlwcGxlQ29uZmlnKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBGdW5jdGlvbiBiZWluZyBjYWxsZWQgd2hlbmV2ZXIgdGhlIHRyaWdnZXIgaXMgYmVpbmcgcHJlc3NlZCB1c2luZyB0b3VjaC4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9vblRvdWNoU3RhcnQoZXZlbnQpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLl90YXJnZXQucmlwcGxlRGlzYWJsZWQpIHsKICAgICAgICAgICAgICAgIC8vIFNvbWUgYnJvd3NlcnMgZmlyZSBtb3VzZSBldmVudHMgYWZ0ZXIgYSBgdG91Y2hzdGFydGAgZXZlbnQuIFRob3NlIHN5bnRoZXRpYyBtb3VzZQogICAgICAgICAgICAgICAgLy8gZXZlbnRzIHdpbGwgbGF1bmNoIGEgc2Vjb25kIHJpcHBsZSBpZiB3ZSBkb24ndCBpZ25vcmUgbW91c2UgZXZlbnRzIGZvciBhIHNwZWNpZmljCiAgICAgICAgICAgICAgICAvLyB0aW1lIGFmdGVyIGEgdG91Y2hzdGFydCBldmVudC4KICAgICAgICAgICAgICAgIHRoaXMuX2xhc3RUb3VjaFN0YXJ0RXZlbnQgPSBEYXRlLm5vdygpOwogICAgICAgICAgICAgICAgdGhpcy5faXNQb2ludGVyRG93biA9IHRydWU7CiAgICAgICAgICAgICAgICAvLyBVc2UgYGNoYW5nZWRUb3VjaGVzYCBzbyB3ZSBza2lwIGFueSB0b3VjaGVzIHdoZXJlIHRoZSB1c2VyIHB1dAogICAgICAgICAgICAgICAgLy8gdGhlaXIgZmluZ2VyIGRvd24sIGJ1dCB1c2VkIGFub3RoZXIgZmluZ2VyIHRvIHRhcCB0aGUgZWxlbWVudCBhZ2Fpbi4KICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHRvdWNoZXMgPSBldmVudC5jaGFuZ2VkVG91Y2hlczsKICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgdG91Y2hlcy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgICAgIHRoaXMuZmFkZUluUmlwcGxlKHRvdWNoZXNbaV0uY2xpZW50WCwgdG91Y2hlc1tpXS5jbGllbnRZLCB0aGlzLl90YXJnZXQucmlwcGxlQ29uZmlnKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBGdW5jdGlvbiBiZWluZyBjYWxsZWQgd2hlbmV2ZXIgdGhlIHRyaWdnZXIgaXMgYmVpbmcgcmVsZWFzZWQuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9vblBvaW50ZXJVcCgpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLl9pc1BvaW50ZXJEb3duKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5faXNQb2ludGVyRG93biA9IGZhbHNlOwogICAgICAgICAgICAvLyBGYWRlLW91dCBhbGwgcmlwcGxlcyB0aGF0IGFyZSB2aXNpYmxlIGFuZCBub3QgcGVyc2lzdGVudC4KICAgICAgICAgICAgdGhpcy5fYWN0aXZlUmlwcGxlcy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSByaXBwbGUKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHJpcHBsZSA9PiB7CiAgICAgICAgICAgICAgICAvLyBCeSBkZWZhdWx0LCBvbmx5IHJpcHBsZXMgdGhhdCBhcmUgY29tcGxldGVseSB2aXNpYmxlIHdpbGwgZmFkZSBvdXQgb24gcG9pbnRlciByZWxlYXNlLgogICAgICAgICAgICAgICAgLy8gSWYgdGhlIGB0ZXJtaW5hdGVPblBvaW50ZXJVcGAgb3B0aW9uIGlzIHNldCwgcmlwcGxlcyB0aGF0IHN0aWxsIGZhZGUgaW4gd2lsbCBhbHNvIGZhZGUgb3V0LgogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgaXNWaXNpYmxlID0gcmlwcGxlLnN0YXRlID09PSAxIC8qIFZJU0lCTEUgKi8gfHwKICAgICAgICAgICAgICAgICAgICByaXBwbGUuY29uZmlnLnRlcm1pbmF0ZU9uUG9pbnRlclVwICYmIHJpcHBsZS5zdGF0ZSA9PT0gMCAvKiBGQURJTkdfSU4gKi87CiAgICAgICAgICAgICAgICBpZiAoIXJpcHBsZS5jb25maWcucGVyc2lzdGVudCAmJiBpc1Zpc2libGUpIHsKICAgICAgICAgICAgICAgICAgICByaXBwbGUuZmFkZU91dCgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJ1bnMgYSB0aW1lb3V0IG91dHNpZGUgb2YgdGhlIEFuZ3VsYXIgem9uZSB0byBhdm9pZCB0cmlnZ2VyaW5nIHRoZSBjaGFuZ2UgZGV0ZWN0aW9uLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAqIEBwYXJhbSB7Pz19IGRlbGF5CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfcnVuVGltZW91dE91dHNpZGVab25lKGZuLCBkZWxheSA9IDApIHsKICAgICAgICAgICAgdGhpcy5fbmdab25lLnJ1bk91dHNpZGVBbmd1bGFyKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHNldFRpbWVvdXQoZm4sIGRlbGF5KSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZWdpc3RlcnMgZXZlbnQgbGlzdGVuZXJzIGZvciBhIGdpdmVuIGxpc3Qgb2YgZXZlbnRzLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBldmVudFR5cGVzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfcmVnaXN0ZXJFdmVudHMoZXZlbnRUeXBlcykgewogICAgICAgICAgICB0aGlzLl9uZ1pvbmUucnVuT3V0c2lkZUFuZ3VsYXIoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgZXZlbnRUeXBlcy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdHlwZQogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKHR5cGUpID0+IHsKICAgICAgICAgICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5fdHJpZ2dlckVsZW1lbnQpKS5hZGRFdmVudExpc3RlbmVyKHR5cGUsIHRoaXMsIHBhc3NpdmVFdmVudE9wdGlvbnMpOwogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJlbW92ZXMgcHJldmlvdXNseSByZWdpc3RlcmVkIGV2ZW50IGxpc3RlbmVycyBmcm9tIHRoZSB0cmlnZ2VyIGVsZW1lbnQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfcmVtb3ZlVHJpZ2dlckV2ZW50cygpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX3RyaWdnZXJFbGVtZW50KSB7CiAgICAgICAgICAgICAgICBwb2ludGVyRG93bkV2ZW50cy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdHlwZQogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKHR5cGUpID0+IHsKICAgICAgICAgICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5fdHJpZ2dlckVsZW1lbnQpKS5yZW1vdmVFdmVudExpc3RlbmVyKHR5cGUsIHRoaXMsIHBhc3NpdmVFdmVudE9wdGlvbnMpOwogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgaWYgKHRoaXMuX3BvaW50ZXJVcEV2ZW50c1JlZ2lzdGVyZWQpIHsKICAgICAgICAgICAgICAgICAgICBwb2ludGVyVXBFdmVudHMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSB0eXBlCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAodHlwZSkgPT4gewogICAgICAgICAgICAgICAgICAgICAgICAoLyoqIEB0e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mRW5hYmxlZCgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25Jbml0KCkgewogICAgICAgICAgICB0aGlzLl9pc0luaXRpYWxpemVkID0gdHJ1ZTsKICAgICAgICAgICAgdGhpcy5fc2V0dXBUcmlnZ2VyRXZlbnRzSWZFbmFibGVkKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkRlc3Ryb3koKSB7CiAgICAgICAgICAgIHRoaXMuX3JpcHBsZVJlbmRlcmVyLl9yZW1vdmVUcmlnZ2VyRXZlbnRzKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEZhZGVzIG91dCBhbGwgY3VycmVudGx5IHNob3dpbmcgcmlwcGxlIGVsZW1lbnRzLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZmFkZU91dEFsbCgpIHsKICAgICAgICAgICAgdGhpcy5fcmlwcGxlUmVuZGVyZXIuZmFkZU91dEFsbCgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSaXBwbGUgY29uZmlndXJhdGlvbiBmcm9tIHRoZSBkaXJlY3RpdmUncyBpbnB1dCB2YWx1ZXMuCiAgICAgICAgICogXEBkb2NzLXByaXZhdGUgSW1wbGVtZW50ZWQgYXMgcGFydCBvZiBSaXBwbGVUYXJnZXQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCByaXBwbGVDb25maWcoKSB7CiAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICBjZW50ZXJlZDogdGhpcy5jZW50ZXJlZCwKICAgICAgICAgICAgICAgIHJhZGl1czogdGhpcy5yYWRpdXMsCiAgICAgICAgICAgICAgICBjb2xvcjogdGhpcy5jb2xvciwKICAgICAgICAgICAgICAgIGFuaW1hdGlvbjogT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sIHRoaXMuX2dsb2JhbE9wdGlvbnMuYW5pbWF0aW9uKSwgKHRoaXMuX2FuaW1hdGlvbk1vZGUgPT09ICdOb29wQW5pbWF0aW9ucycgPyB7IGVudGVyRHVyYXRpb246IDAsIGV4aXREdXJhdGlvbjogMCB9IDoge30pKSwgdGhpcy5hbmltYXRpb24pLAogICAgICAgICAgICAgICAgdGVybWluYXRlT25Qb2ludGVyVXA6IHRoaXMuX2dsb2JhbE9wdGlvbnMudGVybWluYXRlT25Qb2ludGVyVXAsCiAgICAgICAgICAgIH07CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFdoZXRoZXIgcmlwcGxlcyBvbiBwb2ludGVyLWRvd24gYXJlIGRpc2FibGVkIG9yIG5vdC4KICAgICAgICAgKiBcQGRvY3MtcHJpdmF0ZSBJbXBsZW1lbnRlZCBhcyBwYXJ0IG9mIFJpcHBsZVRhcmdldAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHJpcHBsZURpc2FibGVkKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5kaXNhYmxlZCB8fCAhIXRoaXMuX2dsb2JhbE9wdGlvbnMuZGlzYWJsZWQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgdXAgdGhlIHRyaWdnZXIgZXZlbnQgbGlzdGVuZXJzIGlmIHJpcHBsZXMgYXJlIGVuYWJsZWQuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9zZXR1cFRyaWdnZXJFdmVudHNJZkVuYWJsZWQoKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5kaXNhYmxlZCAmJiB0aGlzLl9pc0luaXRpYWxpemVkKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9yaXBwbGVSZW5kZXJlci5zZXR1cFRyaWdnZXJFdmVudHModGhpcy50cmlnZ2VyKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBMYXVuY2hlcyBhIG1hbnVhbCByaXBwbGUgYXQgdGhlIHNwZWNpZmllZCBjb29yZGluYXRlZCBvciBqdXN0IGJ5IHRoZSByaXBwbGUgY29uZmlnLgogICAgICAgICAqIEBwYXJhbSB7P30gY29uZmlnT3JYCiAgICAgICAgICogQHBhcmFtIHs/PX0geQogICAgICAgICAqIEBwYXJhbSB7Pz19IGNvbmZpZwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbGF1bmNoKGNvbmZpZ09yWCwgeSA9IDAsIGNvbmZpZykgewogICAgICAgICAgICBpZiAodHlwZW9mIGNvbmZpZ09yWCA9PT0gJ251bWJlcicpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9yaXBwbGVSZW5kZXJlci5mYWRlSW5SaXBwbGUoY29uZmlnT3JYLCB5LCBPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sIHRoaXMucmlwcGxlQ29uZmlnKSwgY29uZmlnKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fcmlwcGxlUmVuZGVyZXIuZmFkZUluUmlwcGxlKDAsIDAsIE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgdGhpcy5yaXBwbGVDb25maWcpLCBjb25maWdPclgpKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIE1hdFJpcHBsZS7JtWZhYyA9IGZ1bmN0aW9uIE1hdFJpcHBsZV9GYWN0b3J5KHQpIHsgcmV0dXJuIG5ldyAodCB8fCBNYXRSaXBwbGUpKMm1ybVkaXJlY3RpdmVJbmplY3QoRWxlbWVudFJlZiksIMm1ybVkaXJlY3RpdmVJbmplY3QoTmdab25lKSwgybXJtWR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LWNoZWNrYm94YC4KICAgICAqCiAgICAgKiBOb3RlIHRoYXQgdGhpcyBjb21wb25lbnQgd2lsbCBiZSBjb21wbGV0ZWx5IGludmlzaWJsZSB0byBzY3JlZW4tcmVhZGVyIHVzZXJzLiBUaGlzIGlzICpub3QqCiAgICAgKiBpbnRlcmNoYW5nZWFibGUgd2l0aCBgPG1hdC1jaGVja2JveD5gIGFuZCBzaG91bGQgKm5vdCogYmUgdXNlZCBpZiB0aGUgdXNlciB3b3VsZCBkaXJlY3RseQogICAgICogaW50ZXJhY3Qgd2l0aCB0aGUgY2hlY2tib3guIFRoZSBwc2V1ZG8tY2hlY2tib3ggc2hvdWxkIG9ubHkgYmUgdXNlZCBhcyBhbiBpbXBsZW1lbnRhdGlvbiBkZXRhaWwKICAgICAqIG9mIG1vcmUgY29tcGxleCBjb21wb25lbnRzIHRoYXQgYXBwcm9wcmlhdGVseSBoYW5kbGUgc2VsZWN0ZWQgLyBjaGVja2VkIHN0YXRlLgogICAgICogXEBkb2NzLXByaXZhdGUKICAgICAqLwogICAgY2xhc3MgTWF0UHNldWRvQ2hlY2tib3ggewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7Pz19IF9hbmltYXRpb25Nb2RlCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoX2FuaW1hdGlvbk1vZGUpIHsKICAgICAgICAgICAgdGhpcy5fYW5pbWF0aW9uTW9kZSA9IF9hbmltYXRpb25Nb2RlOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRGlzcGxheSBzdGF0ZSBvZiB0aGUgY2hlY2tib3guCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLnN0YXRlID0gJ3VuY2hlY2tlZCc7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBXaGV0aGVyIHRoZSBjaGVja2JveCBpcyBkaXNhYmxlZC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuZGlzYWJsZWQgPSBmYWxzZTsKIC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1dCA9IGZhbHNlKSB7CiAgICAgICAgICAgIHRoaXMuc291cmNlID0gc291cmNlOwogICAgICAgICAgICB0aGlzLmlzVXNlcklucHV0ID0gaXNVc2VySW5wdXQ7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBJbmplY3Rpb24gdG9rZW4gdXNlZCB0byBwcm92aWRlIHRoZSBwYXJlbnQgY29tcG9uZW50IHRvIG9wdGlvbnMuCiAgICAgKiBAdHlwZSB7P30KICAgICAqLwogICAgY29uc3QgTUFUX09QVElPTl9QQVJFTlRfQ09NUE9ORU5UID0gbmV3IEluamVjdGlvblRva2VuKCdNQVRfT1BUSU9OX1BBUkVOVF9DT01QT05FTlQnKTsKICAgIC8qKgogICAgICogU2luZ2xlIG9wdGlvbiBpbnNpZGUgb2YgYSBgPG1hdC1zZWxlY3Q+YCBlbGVtZW50LgogICAgICovCiAgICBjbGFzcyBNYXRPcHRpb24gewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gX2VsZW1lbnQKICAgICAgICAgKiBAcGFyYW0gez99IF9jaGFuZ2VEZXRlY3RvclJlZgogICAgICAgICAqIEBwYXJhbSB7P30gX3BhcmVudAogICAgICAgICAqIEBwYXJhbSB7P30gZ3JvdXAKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihfZWxlbWVudCwgX2NoYW5nZURldGVjdG9yUmVmLCBfcGFyZW50LCBncm91cCkgewogICAgICAgICAgICB0aGlzLl9lbGVtZW50ID0gX2VsZW1lbnQ7CiAgICAgICAgICAgIHRoaXMuX2NoYW5nZURldGVjdG9yUmVmID0gX2NoYW5nZURldGVjdG9yUmVmOwogICAgICAgICAgICB0aGlzLl9wYXJlbnQgPSBfcGFyZW50OwogICAgICAgICAgICB0aGlzLmdyb3VwID0gZ3JvdXA7CiAgICAgICAgICAgIHRoaXMuX3NlbGVjdGVkID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuX2FjdGl2ZSA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLl9kaXNhYmxlZCA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLl9tb3N0UmVjZW50Vmlld1ZhbHVlID0gJyc7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBUaGUgdW5pcXVlIElEIG9mIHRoZSBvcHRpb24uCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmlkID0gYG1hdC1vcHRpb24tJHtfdW5pcXVlSWRDb3VudGVyKyt9YDsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEV2ZW50IGVtaXR0ZWQgd2hlbiB0aGUgb3B0aW9uIGlzIHNlbGVjdGVkIG9yIGRlc2VsZWN0ZWQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICAvLyB0c2xpbnQ6ZGlzYWJsZS1uZXh0LWxpbmU6bm8tb3V0cHV0LW9uLXByZWZpeAogICAgICAgICAgICB0aGlzLm9uU2VsZWN0aW9uQ2hhbmdlID0gbmV3IEV2ZW50RW1pdHRlcigpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRW1pdHMgd2hlbiB0aGUgc3RhdGUgb2YgdGhlIG9wdGlvbiBjaGFuZ2VzIGFuZCBhbnkgcGFyZW50cyBoYXZlIHRvIGJlIG5vdGlmaWVkLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fc3RhdGVDaGFuZ2VzID0gbmV3IFN1YmplY3QoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogV2hldGhlciB0aGUgd3JhcHBpbmcgY29tcG9uZW50IGlzIGluIG11bHRpcGxlIHNlbGVjdGlvbiBtb2RlLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IG11bHRpcGxlKCkgeyByZXR1cm4gdGhpcy5fcGFyZW50ICYmIHRoaXMuX3BhcmVudC5tdWx0aXBsZTsgfQogICAgICAgIC8qKgogICAgICAgICAqIFdoZXRoZXIgb3Igbm90IHRoZSBvcH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2hlcmUgZWxzZS4gVGhpcyBjb21lcyBpbiBoYW5keQogICAgICAgICAqIGZvciBjb21wb25lbnRzIGxpa2UgYXV0b2NvbXBsZXRlIHdoZXJlIGZvY3VzIG11c3QgcmVtYWluIG9uIHRoZSBpbnB1dC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBhY3RpdmUoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9hY3RpdmU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBkaXNwbGF5ZWQgdmFsdWUgb2YgdGhlIG9wdGlvbi4gSXQgaXMgbmVjZXNzYXJ5IHRvIHNob3cgdGhlIHNlbGVjdGVkIG9wdGlvbiBpbiB0aGUKICAgICAgICAgKiBzZWxlY3QncyB0cmlnZ2VyLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHZpZXdWYWx1ZSgpIHsKICAgICAgICAgICAgLy8gVE9ETyhrYXJhKTogQWRkIGlucHV0IHByb3BlcnR5IGFsdGVybmF0aXZlIGZvciBub2RlIGVudnMuCiAgICAgICAgICAgIHJldHVybiAodGhpcy5fZ2V0SG9zdEVsZW1lbnQoKS50ZXh0Q29udGVudCB8fCAnJykudHJpbSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZWxlY3RzIHRoZSBvcHRpb24uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZWxlY3QoKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5fc2VsZWN0ZWQpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3NlbGVjdGVkID0gdHJ1ZTsKICAgICAgICAgICAgICAgIHRoaXMuX2NoYW5nZURldGVjdG9yUmVmLm1hcmtGb3JDaGVjaygpOwogICAgICAgICAgICAgICAgdGhpcy5fZW1pdFNlbGVjdGlvbkNoYW5nZUV2ZW50KCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogRGVzZWxlY3RzIHRoZSBvcHRpb24uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkZXNlbGVjdCgpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX3NlbGVjdGVkKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9zZWxlY3RlZCA9IGZhbHNlOwogICAgICAgICAgICAgICAgdGhpcy5fY2hhbmdlRGV0ZWN0b3JSZWYubWFya0ZvckNoZWNrKCk7CiAgICAgICAgICAgICAgICB0aGlzLl9lbWl0U2VsZWN0aW9uQ2hhbmdlRXZlbnQoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIGZvY3VzIG9udG8gdGhpcyBvcHRpb24uCiAgICAgICAgICogQHBhcmFtIHs/PX0gX29yaWdpbgogICAgICAgICAqIEBwYXJhbSB7Pz19IG9wdGlvbnMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZvY3VzKF9vcmlnaW4sIG9wdGlvbnMpIHsKICAgICAgICAgICAgLy8gTm90ZSB0aGF0IHdlIGFyZW4ndCB1c2luZyBgX29yaWdpbmAsIGJ1dCB3ZSBuZWVkIHRvIGtlZXAgaXQgYmVjYXVzZSBzb21lIGludGVybmFsIGNvbnN1bWVycwogICAgICAgICAgICAvLyB1c2UgYE1hdE9wdGlvbmAgaW4gYSBgRm9jdXNLZXlNYW5hZ2VyYCBhbmQgd2UgbmVlZCBpdCB0byBtYXRjaCBgRm9jdXNhYmxlT3B0aW9uYC4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBlbGVtZW50ID0gdGhpcy5fZ2V0SG9zdEVsZW1lbnQoKTsKICAgICAgICAgICAgaWYgKHR5cGVvZiBlbGVtZW50LmZvY3VzID09PSAnZnVuY3Rpb24nKSB7CiAgICAgICAgICAgICAg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B7CiAgICAgICAgICAgICAgICB0aGlzLl9hY3RpdmUgPSBmYWxzZTsKICAgICAgICAgICAgICAgIHRoaXMuX2NoYW5nZURldGVjdG9yUmVmLm1hcmtGb3JDaGVjaygpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEdldHMgdGhlIGxhYmVsIHRvIGJlIHVzZWQgd2hlbiBkZXRlcm1pbmluZyB3aGV0aGVyIHRoZSBvcHRpb24gc2hvdWxkIGJlIGZvY3VzZWQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXRMYWJlbCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMudmlld1ZhbHVlOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBFbnN1cmVzIHRoZSBvcHRpb24gaXMgc2VsZWN0ZWQgd2hlbiBhY3RpdmF0ZWQgZnJvbSB0aGUga2V5Ym9hcmQuCiAgICAgICAgICogQHBhcmFtIHs/fSBldmVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2hhbmRsZUtleWRvd24oZXZlbnQpIHsKICAgICAgICAgICAgaWYgKChldmVudC5rZXlDb2RlID09PSBFTlRFUiB8fCBldmVudC5rZXlDb2RlID09PSBTUEFDRSkgJiYgIWhhc01vZGlmaWVyS2V5KGV2ZW50KSkgewogICAgICAgICAgICAgICAgdGhpcy5fc2VsZWN0VmlhSW50ZXJhY3Rpb24oKTsKICAgICAgICAgICAgICAgIC8vIFByZXZlbnQgdGhlIHBhZ2UgZnJvbSBzY3JvbGxpbmcgZG93biBhbmQgZm9ybSBzdWJtaXRzLgogICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBgU2VsZWN0cyB0aGUgb3B0aW9uIHdoaWxlIGluZGljYXRpbmcgdGhlIHNlbGVjdGlvbiBjYW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cy5zZWxlY3RlZCB8fCAodGhpcy5tdWx0aXBsZSA/IGZhbHNlIDogbnVsbCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgdGhlIGNvcnJlY3QgdGFiaW5kZXggZm9yIHRoZSBvcHRpb24gZGVwZW5kaW5nIG9uIGRpc2FibGVkIHN0YXRlLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2dldFRhYkluZGV4KCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5kaXNhYmxlZCA/ICctMScgOiAnMCc7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEdldHMgdGhlIGhvc3QgRE9NIGVsZW1lbnQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZ2V0SG9zdEVsZW1lbnQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9lbGVtZW50Lm5hdGl2ZUVsZW1lbnQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdBZnRlclZpZXdDaGVja2VkKCkgewogICAgICAgICAgICAvLyBTaW5jZSBwYXJlbnQgY29tcG9uZW50cyBjb3VsZCBiZSB1c2luZyB0aGUgb3B0aW9uJ3MgbGFiZWwgdG8gZGlzcGxheSB0aGUgc2VsZWN0ZWQgdmFsdWVzCiAgICAgICAgICAgIC8vIChlLmcuIGBtYXQtc2VsZWN0YCkgYW5kIHRoZXkgZG9uJ3QgaGF2ZSBhIHdheSBvZiBrbm93aW5nIGlmIHRoZSBvcHRpb24ncyBsYWJlbCBoYXMgY2hhbmdlZAogICAgICAgICAgICAvLyB3ZSBoYXZlIHRvIGNoZWNrIGZvciBjaGFuZ2VzIGluIHRoZSBET00gb3Vyc2VsdmVzIGFuZCBkaXNwYXRjaCBhbiBldmVudC4gVGhlc2UgY2hlY2tzIGFyZQogICAgICAgICAgICAvLyByZWxhdGl2ZWx5IGNoZWFwLCBob3dldmVyIHdlIHN0aWxsIGxpbWl0IHRoZW0gb25seSB0byBzZWxlY3RlZCBvcHRpb25zIGluIG9yZGVyIHRvIGF2b2lkCiAgICAgICAgICAgIC8vIGhpdHRpbmcgdGhlIERPTSB0b28gb2Z0ZW4uCiAgICAgICAgICAgIGlmICh0aGlzLl9zZWxlY3RlZCkgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3Qgdmlld1ZhbHVlID0gdGhpcy52aWV3VmFsdWU7CiAgICAgICAgICAgICAgICBpZiAodmlld1ZhbHVlICE9PSB0aGlzLl9tb3N0UmVjZW50Vmlld1ZhbHVlKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fbW9zdFJlY2VudFZpZXdWYWx1ZSA9IHZpZXdWYWx1ZTsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9zdGF0ZUNoYW5nZXMubmV4dCgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkRlc3Ryb3koKSB7CiAgICAgICAgICAgIHRoaXMuX3N0YXRlQ2hhbmdlcy5jb21wbGV0ZSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBFbWl0cyB0aGUgc2VsZWN0aW9uIGNoYW5nZSBldmVudC4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7Pz19IGlzVXNlcklucHV0CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZW1pdFNlbGVjdGlvbkNoYW5nZUV2ZW50KGlzVXNlcklucHV0ID0gZmFsc2UpIHsKICAgICAgICAgICAgdGhpcy5vblNlbGVjdGlvbkNoYW5nZS5lbWl0KG5ldyBNYXRPcHRpb25TZWxlY3Rpb25DaGFuZ2UodGhpcywg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gMDsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBvcHRpb25JbmRleCArIDE7IGkrKykgewogICAgICAgICAgICAgICAgaWYgKG9wdGlvbnNBcnJheVtpXS5ncm91cCAmJiBvcHRpb25zQXJyYXlbaV0uZ3JvdXAgPT09IGdyb3Vwc1tncm91cENvdW50ZXJdKSB7CiAgICAgICAgICAgICAgICAgICAgZ3JvdXBDb3VudGVyKys7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIGdyb3VwQ291bnRlcjsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIDA7CiAgICB9CiAgICAvKioKICAgICAqIERldGVybWluZXMgdGhlIHBvc2l0aW9uIHRvIHdoaWNoIHRvIHNjcm9sbCBhIHBhbmVsIGluIG9yZGVyIGZvciBhbiBvcHRpb24gdG8gYmUgaW50byB2aWV3LgogICAgICogXEBkb2NzLXByaXZhdGUKICAgICAqIEBwYXJhbSB7P30gb3B0aW9uSW5kZXggSW5kZXggb2YgdGhlIG9wdGlvbiB0byBiZSBzY3JvbGxlZCBpbnRvIHRoZSB2aWV3LgogICAgICogQHBhcmFtIHs/fSBvcHRpb25IZWlnaHQgSGVpZ2h0IG9mIHRoZSBvcHRpb25zLgogICAgICogQHBhcmFtIHs/fSBjdXJyZW50U2Nyb2xsUG9zaXRpb24gQ3VycmVudCBzY3JvbGwgcG9zaXRpb24gb2YgdGhlIHBhbmVsLgogICAgICogQHBhcmFtIHs/fSBwYW5lbEhlaWdodCBIZWlnaHQgb2YgdGhlIHBhbmVsLgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gX2dldE9wdGlvblNjcm9sbFBvc2l0aW9uKG9wdGlvbkluZGV4LCBvcHRpb25IZWlnaHQsIGN1cnJlbnRTY3JvbGxQb3NpdGlvbiwgcGFuZWxIZWlnaHQpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3Qgb3B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czogW1sibWF0LXRvb2xiYXItcm93Il1dLCBob3N0QXR0cnM6IFsxLCAibWF0LXRvb2xiYXItcm93Il0sIGV4cG9ydEFzOiBbIm1hdFRvb2xiYXJSb3ciXSB9KTsKICAgIGNsYXNzIE1hdFRvb2xiYXIgZXh0ZW5kcyBfTWF0VG9vbGJhck1peGluQmFzZSB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50UmVmCiAgICAgICAgICogQHBhcmFtIHs/fSBfcGxhdGZvcm0KICAgICAgICAgKiBAcGFyYW0gez89fSBkb2N1bWVudAogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKGVsZW1lbnRSZWYsIF9wbGF0Zm9ybSwgZG9jdW1lbnQpIHsKICAgICAgICAgICAgc3VwZXIoZWxlbWVudFJlZik7CiAgICAgICAgICAgIHRoaXMuX3BsYXRmb3JtID0gX3BsYXRmb3JtOwogICAgICAgICAgICAvLyBUT0RPOiBtYWtlIHRoZSBkb2N1bWVudCBhIHJlcXVpcmVkIHBhcmFtIHdoZW4gZG9pbmcgYnJlYWtpbmcgY2hhbmdlcy4KICAgICAgICAgICAgdGhpcy5fZG9jdW1lbnQgPSBkb2N1bWVudDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ0FmdGVyVmlld0luaXQoKSB7CiAgICAgICAgICAgIGlmICghaXNEZXZNb2RlKCkgfHwgIXRoaXMuX3BsYXRmb3JtLmlzQnJvd3NlcikgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2NoZWNrVG9vbGJhck1peGVkTW9kZXMoKTsKICAgICAgICAgICAgdGhpcy5fdG9vbGJhclJvd3MuY2hhbmdlcy5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gdGhpcy5fY2hlY2tUb29sYmFyTWl4ZWRNb2RlcygpKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFRocm93cyBhbiBleGNlcHRpb24gd2hlbiBkZXZlbG9wZXJzIGFyZSBhdHRlbXB0aW5nIHRvIGNvbWJpbmUgdGhlIGRpZmZlcmVudCB0b29sYmFyIHJvdyBtb2Rlcy4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2NoZWNrVG9vbGJhck1peGVkTW9kZXMoKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5fdG9vbGJhclJvd3MubGVuZ3RoKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gQ2hlY2sgaWYgdGhlcmUgYXJlIGFueSBvdGhlciBET00gbm9kZXMgdGhhdCBjYW4gZGlzcGxheSBjb250ZW50IGJ1dCBhcmVuJ3QgaW5zaWRlIG9mCiAgICAgICAgICAgIC8vIGEgPG1hdC10b29sYmFyLXJvdz4gZWxlbWVudC4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBpc0NvbWJpbmVkVXNhZ2UgPSBBcnJheS5mcm9tKHRoaXMuX2VsZW1lbnRSZWYubmF0aXZlRWxlbWVudC5jaGlsZE5vZGVzKQogICAgICAgICAgICAgICAgLmZpbHRlcigoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbm9kZQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgbm9kZSA9PiAhKG5vZGUuY2xhc3NMaXN0ICYmIG5vZGUuY2xhc3NMaXN0LmNvbnRhaW5zKCdtYXQtdG9vbGJhci1yb3cnKSkpKQogICAgICAgICAgICAgICAgLmZpbHRlcigoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbm9kZQogICAg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dGUgfHwgKERhdGFMb2FkU3RhdGUgPSB7fSkpOwoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogdGVuc29yYm9hcmQvd2ViYXBwL2NvcmUvc3RvcmUvY29yZV90eXBlcy50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBDT1JFX0ZFQVRVUkVfS0VZID0gJ2NvcmUnOwogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgaW5pdGlhbFN0YXRlID0gewogICAgICAgIGFjdGl2ZVBsdWdpbjogbnVsbCwKICAgICAgICBwbHVnaW5zOiB7fSwKICAgICAgICBwbHVnaW5zTGlzdExvYWRlZDogewogICAgICAgICAgICBzdGF0ZTogRGF0YUxvYWRTdGF0ZS5OT1RfTE9BREVELAogICAgICAgICAgICBsYXN0TG9hZGVkVGltZUluTXM6IG51bGwsCiAgICAgICAgICAgIGZhaWx1cmVDb2RlOiBudWxsLAogICAgICAgIH0sCiAgICAgICAgcmVsb2FkUGVyaW9kSW5NczogMzAwMDAsCiAgICAgICAgcmVsb2FkRW5hYmxlZDogZmFsc2UsCiAgICAgICAgcGFnZVNpemU6IDEyLAogICAgICAgIGVudmlyb25tZW50OiB7CiAgICAgICAgICAgIGRhdGFfbG9jYXRpb246ICcnLAogICAgICAgICAgICB3aW5kb3dfdGl0bGU6ICcnLAogICAgICAgIH0sCiAgICAgICAgcG9seW1lckludGVyb3BSdW5zOiBbXSwKICAgICAgICBwb2x5bWVySW50ZXJvcFJ1blNlbGVjdGlvbjogbmV3IFNldCgpLA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JsZWRQbHVnaW5JZDsKICAgICAgICByZXR1cm4gT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LCBzdGF0ZSksIHsgYWN0aXZlUGx1Z2luLAogICAgICAgICAgICBwbHVnaW5zLCBwbHVnaW5zTGlzdExvYWRlZDogewogICAgICAgICAgICAgICAgc3RhdGU6IERhdGFMb2FkU3RhdGUuTE9BREVELAogICAgICAgICAgICAgICAgbGFzdExvYWRlZFRpbWVJbk1zOiBEYXRlLm5vdygpLAogICAgICAgICAgICAgICAgZmFpbHVyZUNvZGU6IG51bGwsCiAgICAgICAgICAgIH0gfSk7CiAgICB9KSksIG9uKGVudmlyb25tZW50TG9hZGVkLCAoLyoqCiAgICAgKiBAcGFyYW0gez99IHN0YXRlCiAgICAgKiBAcGFyYW0gez99IF9fMQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgKHN0YXRlLCB7IGVudmlyb25tZW50IH0pID0+IHsKICAgICAgICByZXR1cm4gT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LCBzdGF0ZSksIHsgZW52aXJvbm1lbnQ6IGVudmlyb25tZW50IH0pOwogICAgfSkpLCBvbih0b2dnbGVSZWxvYWRFbmFibGVkLCAoLyoqCiAgICAgKiBAcGFyYW0gez99IHN0YXRlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICAoc3RhdGUpID0+IHsKICAgICAgICByZXR1cm4gT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LCBzdGF0ZSksIHsgcmVsb2FkRW5hYmxlZDogIXN0YXRlLnJlbG9hZEVuYWJsZWQgfSk7CiAgICB9KSksIG9uKGNoYW5nZVJlbG9hZFBlcmlvZCwgKC8qKgogICAgICogQHBhcmFtIHs/fSBzdGF0ZQogICAgICogQHBhcmFtIHs/fSBfXzEKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIChzdGF0ZSwgeyBwZXJpb2RJbk1zIH0pID0+IHsKICAgICAgICAvKi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nVsbFBvcnRhbE91dGxldEVycm9yKCkgewogICAgICAgIHRocm93IEVycm9yKCdBdHRlbXB0aW5nIHRvIGF0dGFjaCBhIHBvcnRhbCB0byBhIG51bGwgUG9ydGFsT3V0bGV0Jyk7CiAgICB9CiAgICAvKioKICAgICAqIFRocm93cyBhbiBleGNlcHRpb24gd2hlbiBhdHRlbXB0aW5nIHRvIGRldGFjaCBhIHBvcnRhbCB0aGF0IGlzIG5vdCBhdHRhY2hlZC4KICAgICAqIFxAZG9jcy1wcml2YXRlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiB0aHJvd05vUG9ydGFsQXR0YWNoZWRFcnJvcigpIHsKICAgICAgICB0aHJvdyBFcnJvcignQXR0ZW1wdGluZyB0byBkZXRhY2ggYSBwb3J0YWwgdGhhdCBpcyBub3QgYXR0YWNoZWQgdG8gYSBob3N0Jyk7CiAgICB9CiAgICAvKioKICAgICAqIEEgYFBvcnRhbGAgaXMgc29tZXRoaW5nIHRoYXQgeW91IHdhbnQgdG8gcmVuZGVyIHNvbWV3aGVyZSBlbHNlLgogICAgICogSXQgY2FuIGJlIGF0dGFjaCB0byAvIGRldGFjaGVkIGZyb20gYSBgUG9ydGFsT3V0bGV0YC4KICAgICAqIEBhYnN0cmFjdAogICAgICogQHRlbXBsYXRlIFQKICAgICAqLwogICAgY2xhc3MgUG9ydGFsIHsKICAgICAgICAvKioKICAgICAgICAgKiBBdHRhY2ggdGhpcyBwb3J0YWwgdG8gYSBob3N0LgogICAgICAgICAqIEBwYXJhbSB7P30gaG9zdAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYXR0YWNoKGhvc3QpIHsKICAgICAgICAgICAgaWYgKGhvc3QgPT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhyb3dOdWxsUG9ydGFsT3V0bGV0RXJyb3IoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoaG9zdC5oYXNBdHRhY2hlZCgpKSB7CiAgICAgICAgICAgICAgICB0aHJvd1BvcnRhbEFscmVhZHlBdHRhY2hlZEVycm9yKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fYXR0YWNoZWRIb3N0ID0gaG9zdDsKICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovIChob3N0LmF0dGFjaCh0aGlzKSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBEZXRhY2ggdGhpcyBwb3J0YWwgZnJvbSBpdHMgaG9zdAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZGV0YWNoKCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBob3N0ID0gdGhpcy5fYXR0YWNoZWRIb3N0OwogICAgICAgICAgICBpZiAoaG9zdCA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICB0aHJvd05vUG9ydGFsQXR0YWNoZWRFcnJvcigpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fYXR0YWNoZWRIb3N0ID0gbnVsbDsKICAgICAgICAgICAgICAgIGhvc3QuZGV0YWNoKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogV2hldGhlciB0aGlzIHBvcnRhbCBpcyBhdHRhY2hlZCB0byBhIGhvc3QuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgaXNBdHRhY2hlZCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2F0dGFjaGVkSG9zdCAhPSBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIHRoZSBQb3J0YWxPdXRsZXQgcmVmZXJlbmNlIHdpdGhvdXQgcGVyZm9ybWluZyBgYXR0YWNoKClgLiBUaGlzIGlzIHVzZWQgZGlyZWN0bHkgYnkKICAgICAgICAgKiB0aGUgUG9ydGFsT3V0bGV0IHdoZW4gaXQgaXMgcGVyZm9ybWluZyBhbiBgYXR0YWNoKClgIG9yIGBkZXRhY2goKWAuCiAgICAgICAgICogQHBhcmFtIHs/fSBob3N0CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXRBdHRhY2hlZEhvc3QoaG9zdCkgewogICAgICAgICAgICB0aGlzLl9hdHRhY2hlZEhvc3QgPSBob3N0OwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQSBgQ29tcG9uZW50UG9ydGFsYCBpcyBhIHBvcnRhbCB0aGF0IGluc3RhbnRpYXRlcyBzb21lIENvbXBvbmVudCB1cG9uIGF0dGFjaG1lbnQuCiAgICAgKiBAdGVtcGxhdGUgVAogICAgICovCiAgICBjbGFzcyBDb21wb25lbnRQb3J0YWwgZXh0ZW5kcyBQb3J0YWwgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gY29tcG9uZW50CiAgICAgICAgICogQHBhcmFtIHs/PX0gdmlld0NvbnRhaW5lclJlZgogICAgICAgICAqIEBwYXJhbSB7Pz19IGluamVjdG9yCiAgICAgICAgICogQHBhcmFtIHs/PX0gY29tcG9uZW50RmFjdG9yeVJlc29sdmVyCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoY29tcG9uZW50LCB2aWV3Q29udGFpbmVyUmVmLCBpbmplY3RvciwgY29tcG9uZW50RmFjdG9yeVJlc29sdmVyKSB7CiAgICAgICAgICAgIHN1cGVyKCk7CiAgICAgICAgICAgIHRoaXMuY29tcG9uZW50ID0gY29tcG9uZW50OwogICAgICAgICAgICB0aGlzLnZpZXdDb250YWluZXJSZWYgPSB2aWV3Q29udGFpbmVyUmVmOwogICAgICAgICAgICB0aGlzLmluamVjdG9yID0gaW5qZWN0b3I7CiAgICAgICAgICAgIHRoaXMuY29tcG9uZW50RmFjdG9yeVJlc29sdmVyID0gY29tcG9uZW50RmFjdG9yeVJlc29sdmVyOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQSBgVGVtcGxhdGVQb3J0YWxgIGlzIGEgcG9ydGFsIHRoYXQgcmVwcmVzZW50cyBzb21lIGVtYmVkZGVkIHRlbXBsYXRlIChUZW1wbGF0ZVJlZikuCiAgICAgKiBAdGVtcGxhdGUgQwogICAgICovCiAgICBjbGFzcyBUZW1wbGF0ZVBvcnRhbCBleHRlbmRzIFBvcnRhbCB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB0ZW1wbGF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gdmlld0NvbnRhaW5lclJlZgogICAgICAgICAqIEBwYXJhbSB7Pz19IGNvbnRleHQKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3Rvcih0ZW1wbGF0ZSwgdmlld0NvbnRhaW5lclJlZiwgY29udGV4dCkgewogICAgICAgICAgICBzdXBlcigpOwogICAgICAgICAgICB0aGlzLnRlbXBsYXRlUmVmID0gdGVtcGxhdGU7CiAgICAgICAgICAgIHRoaXMudmlld0NvbnRhaW5lclJlZiA9IHZpZXdDb250YWluZXJSZWY7CiAgICAgICAgICAgIHRoaXMuY29udGV4dCA9IGNvbnRleHQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IG9yaWdpbigpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMudGVtcGxhdGVSZWYuZWxlbWVudFJlZjsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQXR0YWNoIHRoZSBwb3J0YWwgdG8gdGhlIHByb3ZpZGVkIGBQb3J0YWxPdXRsZXRgLgogICAgICAgICAqIFdoZW4gYSBjb250ZXh0IGlzIHByb3ZpZGVkIGl0IHdpbGwgb3ZlcnJpZGUgdGhlIGBjb250ZXh0YCBwcm9wZXJ0eSBvZiB0aGUgYFRlbXBsYXRlUG9ydGFsYAogICAgICAgICAqIGluc3RhbmNlLgogICAgICAgICAqIEBwYXJhbSB7P30gaG9zdAogICAgICAgICAqIEBwYXJhbSB7Pz19IGNvbnRleHQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGF0dGFjaChob3N0LCBjb250ZXh0ID0gdGhpcy5jb250ZXh0KSB7CiAgICAgICAgICAgIHRoaXMuY29udGV4dCA9IGNvbnRleHQ7CiAgICAgICAgICAgIHJldHVybiBzdXBlci5hdHRhY2goaG9zdCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZGV0YWNoKCkgewogICAgICAgICAgICB0aGlzLmNvbnRleHQgPSB1bmRlZmluZWQ7CiAgICAgICAgICAgIHJldHVybiBzdXBlci5kZXRhY2goKTsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIEEgYERvbVBvcnRhbGAgaXMgYSBwb3J0YWwgd2hvc2UgRE9NIGVsZW1lbnQgd2lsbCBiZSB0YWtlbiBmcm9tIGl0cyBjdXJyZW50IHBvc2l0aW9uCiAgICAgKiBpbiB0aGUgRE9NIGFuZCBtb3ZlZCBpbnRvIGEgcG9ydGFsIG91dGxldCwgd2hlbiBpdCBpcyBhdHRhY2hlZC4gT24gZGV0YWNoLCB0aGUgY29udGVudAogICAgICogd2lsbCBiZSByZXN0b3JlZCB0byBpdHMgb3JpZ2luYWwgcG9zaXRpb24uCiAgICAgKiBAdGVtcGxhdGUgVAogICAgICovCiAgICBjbGFzcyBEb21Qb3J0YWwgZXh0ZW5kcyBQb3J0YWwgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKGVsZW1lbnQpIHsKICAgICAgICAgICAgc3VwZXIoKTsKICAgICAgICAgICAgdGhpcy5lbGVtZW50ID0gZWxlbWVudCBpbnN0YW5jZW9mIEVsZW1lbnRSZWYgPyBlbGVtZW50Lm5hdGl2ZUVsZW1lbnQgOiBlbGVtZW50OwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogUGFydGlhbCBpbXBsZW1lbnRhdGlvbiBvZiBQb3J0YWxPdXRsZXQgdGhhdCBoYW5kbGVzIGF0dGFjaGluZwogICAgICogQ29tcG9uZW50UG9ydGFsIGFuZCBUZW1wbGF0ZVBvcnRhbC4KICAgICAqIEBhYnN0cmFjdAogICAgICovCiAgICBjbGFzcyBCYXNlUG9ydGFsT3V0bGV0IHsKICAgICAgICBjb25zdHJ1Y3RvcigpIHsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFdoZXRoZXIgdGhpcyBob3N0IGhhcyBhbHJlYWR5IGJlZW4gcGVybWFuZW50bHkgZGlzcG9zZWQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9pc0Rpc3Bvc2VkID0gZmFsc2U7CiAgICAgICAgICAgIC8vIEBicmVha2luZy1jaGFuZ2UgMTAuMC4wIGBhdHRhY2hEb21Qb3J0YWxgIHRvIGJlY29tZSBhIHJlcXVpcmVkIGFic3RyYWN0IG1ldGhvZC4KICAgICAgICAgICAgdGhpcy5hdHRhY2hEb21Qb3J0YWwgPSBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGV0aGVyIHRoaXMgaG9zdCBoYXMgYW4gYXR0YWNoZWQgcG9ydGFsLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgaGFzQXR0YWNoZWQoKSB7CiAgICAgICAgICAgIHJldHVybiAhIXRoaXMuX2F0dGFjaGVkUG9ydGFsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBdHRhY2hlcyBhIHBvcnRhbC4KICAgICAgICAgKiBAcGFyYW0gez99IHBvcnRhbAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYXR0YWNoKHBvcnRhbCkgewogICAgICAgICAgICBpZiAoIXBvcnRhbCkgewogICAgICAgICAgICAgICAgdGhyb3dOdWxsUG9ydGFsRXJyb3IoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5oYXNBdHRhY2hlZCgpKSB7CiAgICAgICAgICAgICAgICB0aHJvd1BvcnRhbEFscmVhZHlBdHRhY2hlZEVycm9yKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHRoaXMuX2lzRGlzcG9zZWQpIHsKICAgICAgICAgICAgICAgIHRocm93UG9ydGFsT3V0bGV0QWxyZWFkeURpc3Bvc2VkRXJyb3IoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAocG9ydGFsIGluc3RhbmNlb2YgQ29tcG9uZW50UG9ydGFsKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9hdHRhY2hlZFBvcnRhbCA9IHBvcnRhbDsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmF0dGFjaENvbXBvbmVudFBvcnRhbChwb3J0YWwpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKHBvcnRhbCBpbnN0YW5jZW9mIFRlbXBsYXRlUG9ydGFsKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9hdHRhY2hlZFBvcnRhbCA9IHBvcnRhbDsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmF0dGFjaFRlbXBsYXRlUG9ydGFsKHBvcnRhbCk7CiAgICAgICAgICAgICAgICAvLyBAYnJlYWtpbmctY2hhbmdlIDEwLjAuMCByZW1vdmUgbnVsbCBjaGVjayBmb3IgYHRoaXMuYXR0YWNoRG9tUG9ydGFsYC4KICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmICh0aGlzLmF0dGFjaERvbVBvcnRhbCAmJiBwb3J0YWwgaW5zdGFuY2VvZiBEb21Qb3J0YWwpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2F0dGFjaGVkUG9ydGFsID0gcG9ydGFsOwogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuYXR0YWNoRG9tUG9ydGFsKHBvcnRhbCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhyb3dVbmtub3duUG9ydGFsVHlwZUVycm9yKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIERldGFjaGVzIGEgcHJldmlvdXNseSBhdHRhY2hlZCBwb3J0YWwuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkZXRhY2goKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9hdHRhY2hlZFBvcnRhbCkgewogICAgICAgICAgICAgICAgdGhpcy5fYXR0YWNoZWRQb3J0YWwuc2V0QXR0YWNoZWRIb3N0KG51bGwpOwogICAgICAgICAgICAgICAgdGhpcy5fYXR0YWNoZWRQb3J0YWwgPSBudWxsOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2ludm9rZURpc3Bvc2VGbigpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBQZXJtYW5lbnRseSBkaXNwb3NlIG9mIHRoaXMgcG9ydGFsIGhvc3QuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkaXNwb3NlKCkgewogICAgICAgICAgICBpZiAodGhpcy5oYXNBdHRhY2hlZCgpKSB7CiAgICAgICAgICAgICAgICB0aGlzLmRldGFjaCgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2ludm9rZURpc3Bvc2VGbigpOwogICAgICAgICAgICB0aGlzLl9pc0Rpc3Bvc2VkID0gdHJ1ZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkb2NzLXByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGZuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXREaXNwb3NlRm4oZm4pIHsKICAgICAgICAgICAgdGhpcy5fZGlzcG9zZUZuID0gZm47CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfaW52b2tlRGlzcG9zZUZuKCkgewogICAgICAgICAgICBpZiAodGhpcy5fZGlzcG9zZUZuKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9kaXNwb3NlRm4oKTsKICAgICAgICAgICAgICAgIHRoaXMuX2Rpc3Bvc2VGbiA9IG51bGw7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CgogICAgLyoqCiAgICAgKiBAZmlsZW92ZXJ2aWV3IGFkZGVkIGJ5IHRzaWNrbGUKICAgICAqIEdlbmVyYXRlZCBmcm9tOiBzcmMvY2RrL3BvcnRhbC9kb20tcG9ydGFsLW91dGxldC50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvKioKICAgICAqIEEgUG9ydGFsT3V0bGV0IGZvciBhdHRhY2hpbmcgcG9ydGFscyB0byBhbiBhcmJpdHJhcnkgRE9NIGVsZW1lbnQgb3V0c2lkZSBvZiB0aGUgQW5ndWxhcgogICAgICogYXBwbGljYXRpb24gY29udGV4dC4KICAgICAqLwogICAgY2xhc3MgRG9tUG9ydGFsT3V0bGV0IGV4dGVuZHMgQmFzZVBvcnRhbE91dGxldCB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBvdXRsZXRFbGVtZW50CiAgICAgICAgICogQHBhcmFtIHs/fSBfY29tcG9uZW50RmFjdG9yeVJlc29sdmVyCiAgICAgICAgICogQHBhcmFtIHs/fSBfYXBwUmVmCiAgICAgICAgICogQHBhcmFtIHs/fSBfZGVmYXVsdEluamVjdG9yCiAgICAgICAgICogQHBhcmFtIHs/PX0gX2RvY3VtZW50CiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3Iob3V0bGV0RWxlbWVudCwgX2NvbXBvbmVudEZhY3RvcnlSZXNvbHZlciwgX2FwcFJlZiwgX2RlZmF1bHRJbmplY3RvciwgCiAgICAgICAgLyoqCiAgICAgICAgICogQGRlcHJlY2F0ZWQgYF9kb2N1bWVudGAgUGFyYW1ldGVyIHRvIGJlIG1hZGUgcmVxdWlyZWQuCiAgICAgICAgICogQGJyZWFraW5nLWNoYW5nZSAxMC4wLjAKICAgICAgICAgKi8KICAgICAgICBfZG9jdW1lbnQpIHsKICAgICAgICAgICAgc3VwZXIoKTsKICAgICAgICAgICAgdGhpcy5vdXRsZXRFbGVtZW50ID0gb3V0bGV0RWxlbWVudDsKICAgICAgICAgICAgdGhpcy5fY29tcG9uZW50RmFjdG9yeVJlc29sdmVyID0gX2NvbXBvbmVudEZhY3RvcnlSZXNvbHZlcjsKICAgICAgICAgICAgdGhpcy5fYXBwUmVmID0gX2FwcFJlZjsKICAgICAgICAgICAgdGhpcy5fZGVmYXVsdEluamVjdG9yID0gX2RlZmF1bHRJbmplY3RvcjsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEF0dGFjaGVzIGEgRE9NIHBvcnRhbCBieSB0cmFuc2ZlcnJpbmcgaXRzIGNvbnRlbnQgaW50byB0aGUgb3V0bGV0LgogICAgICAgICAgICAgKiBAcGFyYW0gcG9ydGFsIFBvcnRhbCB0byBiZSBhdHRhY2hlZC4KICAgICAgICAgICAgICogQGRlcHJlY2F0ZWQgVG8gYmUgdHVybmVkIGludG8gYSBtZXRob2QuCiAgICAgICAgICAgICAqIFxAYnJlYWtpbmctY2hhbmdlIDEwLjAuMAogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5hdHRhY2hEb21Qb3J0YWwgPSAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcG9ydGFsCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAocG9ydGFsKSA9PiB7CiAgICAgICAgICAgICAgICAvLyBAYnJlYWtpbmctY2hhbmdlIDEwLjAuMCBSZW1vdmUgY2hlY2sgYW5kIGVycm9yIG9uY2UgdGhlCiAgICAgICAgICAgICAgICAvLyBgX2RvY3VtZW50YCBjb25zdHJ1Y3RvciBwYXJhbWV0ZXIgaXMgcmVxdWlyZWQuCiAgICAgICAgICAgICAgICBpZiAoIXRoaXMuX2RvY3VtZW50KSB7CiAgICAgICAgICAgICAgICAgICAgdGhyb3cgRXJyb3IoJ0Nhbm5vdCBhdHRhY2ggRE9NIHBvcnRhbCB3aXRob3V0IF9kb2N1bWVudCBjb25zdHJ1Y3RvciBwYXJhbWV0ZXInKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGVsZW1lbnQgPSBwb3J0YWwuZWxlbWVudDsKICAgICAgICAgICAgICAgIGlmICghZWxlbWVudC5wYXJlbnROb2RlKSB7CiAgICAgICAgICAgICAgICAgICAgdGhyb3cgRXJyb3IoJ0RPTSBwb3J0YWwgY29udGVudCBtdXN0IGJlIGF0dGFjaGVkIHRvIGEgcGFyZW50IG5vZGUuJyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvLyBBbmNob3IgdXNlZCB0byBzYXZlIHRoZSBlbGVtZW50J3MgcHJldmlvdXMgcG9zaXRpb24gc28KICAgICAgICAgICAgICAgIC8vIHRoYXQgd2UgY2FuIHJlc3RvcmUgaXQgd2hlbiB0aGUgcG9ydGFsIGlzIGRldGFjaGVkLgogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgYW5jaG9yTm9kZSA9IHRoaXMuX2RvY3VtZW50LmNyZWF0ZUNvbW1lbnQoJ2RvbS1wb3J0YWwnKTsKICAgICAgICAgICAgICAgIGVsZW1lbnQucGFyZW50Tm9kZS5pbnNlcnRCZWZvcmUoYW5jaG9yTm9kZSwgZWxlbWVudCk7CiAgICAgICAgICAgICAgICB0aGlzLm91dGxldEVsZW1lbnQuYXBwZW5kQ2hpbGQoZWxlbWVudCk7CiAgICAgICAgICAgICAgICBzdXBlci5zZXREaXNwb3NlRm4oKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgICAgIC8vIFdlIGNhbid0IHVzZSBgcmVwbGFjZVdpdGhgIGhlcmUgYmVjYXVzZSBJRSBkb2Vzbid0IHN1cHBvcnQgaXQuCiAgICAgICAgICAgICAgICAgICAgaWYgKGFuY2hvck5vZGUucGFyZW50Tm9kZSkgewogICAgICAgICAgICAgICAgICAgICAgICBhbmNob3JOb2RlLnBhcmVudE5vZGUucmVwbGFjZUNoaWxkKGVsZW1lbnQsIGFuY2hvck5vZGUpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHRoaXMuX2RvY3VtZW50ID0gX2RvY3VtZW50OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBdHRhY2ggdGhlIGdpdmVuIENvbXBvbmVudFBvcnRhbCB0byBET00gZWxlbWVudCB1c2luZyB0aGUgQ29tcG9uZW50RmFjdG9yeVJlc29sdmVyLgogICAgICAgICAqIEB0ZW1wbGF0ZSBUCiAgICAgICAgICogQHBhcmFtIHs/fSBwb3J0YWwgUG9ydGFsIHRvIGJlIGF0dGFjaGVkCiAgICAgICAgICogQHJldHVybiB7P30gUmVmZXJlbmNlIHRvIHRoZSBjcmVhdGVkIGNvbXBvbmVudC4KICAgICAgICAgKi8KICAgICAgICBhdHRhY2hDb21wb25lbnRQb3J0YWwocG9ydGFsKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7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NvbnRhaW5lclJlZi5pbmplY3Rvcik7CiAgICAgICAgICAgICAgICB0aGlzLnNldERpc3Bvc2VGbigoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiBjb21wb25lbnRSZWYuZGVzdHJveSgpKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBjb21wb25lbnRSZWYgPSBjb21wb25lbnRGYWN0b3J5LmNyZWF0ZShwb3J0YWwuaW5qZWN0b3IgfHwgdGhpcy5fZGVmYXVsdEluamVjdG9yKTsKICAgICAgICAgICAgICAgIHRoaXMuX2FwcFJlZi5hdHRhY2hWaWV3KGNvbXBvbmVudFJlZi5ob3N0Vmlldyk7CiAgICAgICAgICAgICAgICB0aGlzLnNldERpc3Bvc2VGbigoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fYXBwUmVmLmRldGFjaFZpZXcoY29tcG9uZW50UmVmLmhvc3RWaWV3KTsKICAgICAgICAgICAgICAgICAgICBjb21wb25lbnRSZWYuZGVzdHJveSgpOwogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIEF0IHRoaXMgcG9pbnQgdGhlIGNvbXBvbmVudCBoYXMgYmVlbiBpbnN0YW50aWF0ZWQsIHNvIHdlIG1vdmUgaXQgdG8gdGhlIGxvY2F0aW9uIGluIHRoZSBET00KICAgICAgICAgICAgLy8gd2hlcmUgd2Ugd2FudCBpdCB0byBiZSByZW5kZXJlZC4KICAgICAgICAgICAgdGhpcy5vdXRsZXRFbGVtZW50LmFwcGVuZENoaWxkKHRoaXMuX2dldENvbXBvbmVudFJvb3ROb2RlKGNvbXBvbmVudFJlZikpOwogICAgICAgICAgICByZ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ICAgICAgIC8vIHJlLWFwcGVuZCB0aGUgZXhpc3Rpbmcgcm9vdCBub2Rlcy4KICAgICAgICAgICAgdmlld1JlZi5yb290Tm9kZXMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcm9vdE5vZGUKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHJvb3ROb2RlID0+IHRoaXMub3V0bGV0RWxlbWVudC5hcHBlbmRDaGlsZChyb290Tm9kZSkpKTsKICAgICAgICAgICAgdGhpcy5zZXREaXNwb3NlRm4oKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCBpbmRleCA9IHZpZXdDb250YWluZXIuaW5kZXhPZih2aWV3UmVmKTsKICAgICAgICAgICAgICAgIGlmIChpbmRleCAhPT0gLTEpIHsKICAgICAgICAgICAgICAgICAgICB2aWV3Q29udGFpbmVyLnJlbW92ZShpbmRleCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pKSk7CiAgICAgICAgICAgIC8vIFRPRE8oamVsYm91cm4pOiBSZXR1cm4gbG9jYWxzIGZyb20gdmlldy4KICAgICAgICAgICAgcmV0dXJuIHZpZXdSZWY7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENsZWFycyBvdXQgYSBwb3J0YWwgZnJvbSB0aGUgRE9NLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZGlzcG9zZSgpIHsKICAgICAgICAgICAgc3VwZXIuZGlzcG9zZSgpOwogICAgICAgICAgICBpZiAodGhpcy5vdXRsZXRFbGVtZW50LnBhcmVudE5vZGUgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5vdXRsZXRFbGVtZW50LnBhcmVudE5vZGUucmVt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2hlZCB0byBpdCwgZW5hYmxpbmcgZGVjbGFyYXRpdmUgdXNlLgogICAgICoKICAgICAqIFVzYWdlOgogICAgICogYDxuZy10ZW1wbGF0ZSBbY2RrUG9ydGFsT3V0bGV0XT0iZ3JlZXRpbmciPjwvbmctdGVtcGxhdGU+YAogICAgICovCiAgICBjbGFzcyBDZGtQb3J0YWxPdXRsZXQgZXh0ZW5kcyBCYXNlUG9ydGFsT3V0bGV0IHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IF9jb21wb25lbnRGYWN0b3J5UmVzb2x2ZXIKICAgICAgICAgKiBAcGFyYW0gez99IF92aWV3Q29udGFpbmVyUmVmCiAgICAgICAgICogQHBhcmFtIHs/PX0gX2RvY3VtZW50CiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoX2NvbXBvbmVudEZhY3RvcnlSZXNvbHZlciwgX3ZpZXdDb250YWluZXJSZWYsIAogICAgICAgIC8qKgogICAgICAgICAqIEBkZXByZWNhdGVkIGBfZG9jdW1lbnRgIHBhcmFtZXRlciB0byBiZSBtYWRlIHJlcXVpcmVkLgogICAgICAgICAqIEBicmVha2luZy1jaGFuZ2UgOS4wLjAKICAgICAgICAgKi8KICAgICAgICBfZG9jdW1lbnQpIHsKICAgICAgICAgICAgc3VwZXIoKTsKICAgICAgICAgICAgdGhpcy5fY29tcG9uZW50RmFjdG9yeVJlc29sdmVyID0gX2NvbXBvbmVudEZhY3RvcnlSZXNvbHZlcjsKICAgICAgICAgICAgdGhpcy5fdmlld0NvbnRhaW5lclJlZiA9IF92aWV3Q29udGFpbmVyUmVmOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogV2hldGhlciB0aGUgcG9ydGFsIGNvbXBvbmVudCBpcyBpbml0aWFsaXplZC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX2lzSW5pdGlhbGl6ZWQgPSBmYWxzZTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEVtaXRzIHdoZW4gYSBwb3J0YWwgaXMgYXR0YWNoZWQgdG8gdGhlIG91dGxldC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuYXR0YWNoZWQgPSBuZXcgRXZlbnRFbWl0dGVyKCk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBBdHRhY2hlcyB0aGUgZ2l2ZW4gRG9tUG9ydGFsIHRvIHRoaXMgUG9ydGFsSG9zdCBieSBtb3ZpbmcgYWxsIG9mIHRoZSBwb3J0YWwgY29udGVudCBpbnRvIGl0LgogICAgICAgICAgICAgKiBAcGFyYW0gcG9ydGFsIFBvcnRhbCB0byBiZSBhdHRhY2hlZC4KICAgICAgICAgICAgICogQGRlcHJlY2F0ZWQgVG8gYmUgdHVybmVkIGludG8gYSBtZXRob2QuCiAgICAgICAgICAgICAqIFxAYnJlYWtpbmctY2hhbmdlIDEwLjAuMAogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5hdHRhY2hEb21Qb3J0YWwgPSAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcG9ydGFsCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAocG9ydGFsKSA9PiB7CiAgICAgICAgICAgICAgICAvLyBAYnJlYWtpbmctY2hhbmdlIDkuMC4wIFJlbW92ZSBjaGVjayBhbmQgZXJyb3Igb25jZSB0aGUKICAgICAgICAgICAgICAgIC8vIGBfZG9jdW1lbnRgIGNvbnN0cnVjdG9yIHBhcmFtZXRlciBpcyByZXF1aXJlZC4KICAgICAgICAgICAgICAgIGlmICghdGhpcy5fZG9jdW1lbnQpIHsKICAgICAgICAgICAgICAgICAgICB0aHJvdyBFcnJvcignQ2Fubm90IGF0dGFjaCBET00gcG9ydGFsIHdpdGhvdXQgX2RvY3VtZW50IGNvbnN0cnVjdG9yIHBhcmFtZXRlcicpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZWxlbWVudCA9IHBvcnRhbC5lbGVtZW50OwogICAgICAgICAgICAgICAgaWYgKCFlbGVtZW50LnBhcmVudE5vZGUpIHsKICAgICAgICAgICAgICAgICAgICB0aHJvdyBFcnJvcignRE9NIHBvcnRhbCBjb250ZW50IG11c3QgYmUgYXR0YWNoZWQgdG8gYSBwYXJlbnQgbm9kZS4nKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vIEFuY2hvciB1c2VkIHRvIHNhdmUgdGhlIGVsZW1lbnQncyBwcmV2aW91cyBwb3NpdGlvbiBzbwogICAgICAgICAgICAgICAgLy8gdGhhdCB3ZSBjYW4gcmVzdG9yZSBpdCB3aGVuIHRoZSBwb3J0YWwgaXMgZGV0YWNoZWQuCiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBhbmNob3JOb2RlID0gdGhpcy5fZG9jdW1lbnQuY3JlYXRlQ29tbWVudCgnZG9tLXBvcnRhbCcpOwogICAgICAgICAgICAgICAgcG9ydGFsLnNldEF0dGFjaGVkSG9zdCh0aGlzKTsKICAgICAgICAgICAgICAgIGVsZW1lbnQucGFyZW50Tm9kZS5pbnNlcnRCZWZvcmUoYW5jaG9yTm9kZSwgZWxlbWVudCk7CiAgICAgICAgICAgICAgICB0aGlzLl9nZXRSb290Tm9kZSgpLmFwcGVuZENoaWxkKGVsZW1lbnQpOwogICAgICAgICAgICAgICAgc3VwZXIuc2V0RGlzcG9zZUZuKCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgICAgICBpZiAoYW5jaG9yTm9kZS5wYXJlbnROb2RlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovIChhbmNob3JOb2RlLnBhcmVudE5vZGUpKS5y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FyZWQuCiAgICAgICAgICAgIGlmICh0aGlzLmhhc0F0dGFjaGVkKCkgJiYgIXBvcnRhbCAmJiAhdGhpcy5faXNJbml0aWFsaXplZCkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0aGlzLmhhc0F0dGFjaGVkKCkpIHsKICAgICAgICAgICAgICAgIHN1cGVyLmRldGFjaCgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChwb3J0YWwpIHsKICAgICAgICAgICAgICAgIHN1cGVyLmF0dGFjaChwb3J0YWwpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2F0dGFjaGVkUG9ydGFsID0gcG9ydGFsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDb21wb25lbnQgb3IgdmlldyByZWZlcmVuY2UgdGhhdCBpcyBhdHRhY2hlZCB0byB0aGUgcG9ydGFsLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGF0dGFjaGVkUmVmKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fYXR0YWNoZWRSZWY7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkluaXQoKSB7CiAgICAgICAgICAgIHRoaXMuX2lzSW5pdGlhbGl6ZWQgPSB0cnVlOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25EZXN0cm95KCkgewogICAgICAgICAgICBzdXBlci5kaXNwb3NlKCk7CiAgICAgICAgICAgIHRoaXMuX2F0dGFjaGVkUG9ydGFsID0gbnVsbDsKICAgICAgICAgICAgdGhpcy5fYXR0YWNoZWRSZWYgPSBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBdHRhY2ggdGhlIGdpdmVuIENvbXBvbmVudFBvcnRhbCB0byB0aGlzIFBvcnRhbE91dGxldCB1c2luZyB0aGUgQ29tcG9uZW50RmFjdG9yeVJlc29sdmVyLgogICAgICAgICAqCiAgICAgICAgICogQHRlbXBsYXRlIFQKICAgICAgICAgKiBAcGFyYW0gez99IHBvcnRhbCBQb3J0YWwgdG8gYmUgYXR0YWNoZWQgdG8gdGhlIHBvcnRhbCBvdXRsZXQuCiAgICAgICAgICogQHJldHVybiB7P30gUmVmZXJlbmNlIHRvIHRoZSBjcmVhdGVkIGNvbXBvbmVudC4KICAgICAgICAgKi8KICAgICAgICBhdHRhY2hDb21wb25lbnRQb3J0YWwocG9ydGFsKSB7CiAgICAgICAgICAgIHBvcnRhbC5zZXRBdHRhY2hlZEhvc3QodGhpcyk7CiAgICAgICAgICAgIC8vIElmIHRoZSBwb3J0YWwgc3BlY2lmaWVzIGFuIG9yaWdpbiwgdXNlIHRoYXQgYXMgdGhlIGxvZ2ljYWwgbG9jYXRpb24gb2YgdGhlIGNvbXBvbmVudAogICAgICAgICAgICAvLyBpbiB0aGUgYXBwbGljYXRpb24gdHJlZS4gT3RoZXJ3aXNlIHVzZSB0aGUgbG9jYXRpb24gb2YgdGhpcyBQb3J0YWxPdXRsZXQuCiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgdmlld0NvbnRhaW5lclJlZiA9IHBvcnRhbC52aWV3Q29udGFpbmVyUmVmICE9IG51bGwgPwogICAgICAgICAgICAgICAgcG9ydGFsLnZpZXdDb250YWluZXJSZWYgOgogICAgICAgICAgICAgICAgdGhpcy5fdmlld0NvbnRhaW5lclJlZjsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCByZXNvbHZlciA9IHBvcnRhbC5jb21wb25lbnRGYWN0b3J5UmVzb2x2ZXIgfHwgdGhpcy5fY29tcG9uZW50RmFjdG9yeVJlc29sdmVyOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGNvbXBvbmVudEZhY3RvcnkgPSByZXNvbHZlci5yZXNvbHZlQ29tcG9uZW50RmFjdG9yeShwb3J0YWwuY29tcG9uZW50KTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCByZWYgPSB2aWV3Q29udGFpbmVyUmVmLmNyZWF0ZUNvbXBvbmVudChjb21wb25lbnRGYWN0b3J5LCB2aWV3Q29udGFpbmVyUmVmLmxlbmd0aCwgcG9ydGFsLmluamVjdG9yIHx8IHZpZXdDb250YWluZXJSZWYuaW5qZWN0b3IpOwogICAgICAgICAgICAvLyBJZiB3ZSdyZSB1c2luZyBhIHZpZXcgY29udGFpbmVyIHRoYXQncyBkaWZmZXJlbnQgZnJvbSB0aGUgaW5qZWN0ZWQgb25lIChlLmcuIHdoZW4gdGhlIHBvcnRhbAogICAgICAgICAgICAvLyBzcGVjaWZpZXMgaXRzIG93bikgd2UgbmVlZCB0byBtb3ZlIHRoZSBjb21wb25lbnQgaW50byB0aGUgb3V0bGV0LCBvdGhlcndpc2UgaXQnbGwgYmUgcmVuZGVyZWQKICAgICAgICAgICAgLy8gaW5zaWRlIG9mIHRoZSBhbHRlcm5hdGUgdmlldyBjb250YWluZXIuCiAgICAgICAgICAgIGlmICh2aWV3Q29udGFpbmVyUmVmICE9PSB0aGlzLl92aWV3Q29udGFpbmVyUmVmKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9nZXRSb290Tm9kZSgpLmFwcGVuZENoaWxkKCgoLyoqIEB0eXBlIHs/fSAqLyAocmVmLmhvc3RWaWV3KSkpLnJvb3ROb2Rlc1swXSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgc3VwZXIuc2V0RGlzcG9zZUZuKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHJlZi5kZXN0cm95KCkpKTsKICAgICAgICAgICAgdGhpcy5fYXR0YWNoZW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wogICAgICAgICAgICByZXR1cm4gdmlld1JlZjsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogR2V0cyB0aGUgcm9vdCBub2RlIG9mIHRoZSBwb3J0YWwgb3V0bGV0LgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZ2V0Um9vdE5vZGUoKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbmF0aXZlRWxlbWVudCA9IHRoaXMuX3ZpZXdDb250YWluZXJSZWYuZWxlbWVudC5uYXRpdmVFbGVtZW50OwogICAgICAgICAgICAvLyBUaGUgZGlyZWN0aXZlIGNvdWxkIGJlIHNldCBvbiBhIHRlbXBsYXRlIHdoaWNoIHdpbGwgcmVzdWx0IGluIGEgY29tbWVudAogICAgICAgICAgICAvLyBub2RlIGJlaW5nIHRoZSByb290LiBVc2UgdGhlIGNvbW1lbnQncyBwYXJlbnQgbm9kZSBpZiB0aGF0IGlzIHRoZSBjYXNlLgogICAgICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKChuYXRpdmVFbGVtZW50Lm5vZGVUeXBlID09PSBuYXRpdmVFbGVtZW50LkVMRU1FTlRfTk9ERSA/CiAgICAgICAgICAgICAgICBuYXRpdmVFbGVtZW50IDogKC8qKiBAdHlwZSB7P30gKi8gKG5hdGl2ZUVsZW1lbnQucGFyZW50Tm9kZSkpKSkpOwogICAgICAgIH0KICAgIH0KICAgIENka1BvcnRhbE91dGxldC7JtWZhYyA9IGZ1bmN0aW9uIENka1BvcnRhbE91dGxldF9GYWN0b3J5KHQpIHsgcmV0dXJuIG5ldyAodCB8fCBDZGtQb3J0YWxPdXRsZXQpKMm1ybVkaXJlY3RpdmVJbmplY3QoQ29tcG9uZW50RmFjdG9yeVJlc29sdmVyKSwgybXJtWRpcmVjdGl2ZUluamVjdChWaWV3Q29udGFpbmVyUmVmKSwgybXJ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B0aGUgTElDRU5TRSBmaWxlIGF0IGh0dHBzOi8vYW5ndWxhci5pby9saWNlbnNlCiAgICAgKi8KICAgIC8qKgogICAgICogQ3VzdG9tIGluamVjdG9yIHRvIGJlIHVzZWQgd2hlbiBwcm92aWRpbmcgY3VzdG9tCiAgICAgKiBpbmplY3Rpb24gdG9rZW5zIHRvIGNvbXBvbmVudHMgaW5zaWRlIGEgcG9ydGFsLgogICAgICogXEBkb2NzLXByaXZhdGUKICAgICAqLwogICAgY2xhc3MgUG9ydGFsSW5qZWN0b3IgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gX3BhcmVudEluamVjdG9yCiAgICAgICAgICogQHBhcmFtIHs/fSBfY3VzdG9tVG9rZW5zCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoX3BhcmVudEluamVjdG9yLCBfY3VzdG9tVG9rZW5zKSB7CiAgICAgICAgICAgIHRoaXMuX3BhcmVudEluamVjdG9yID0gX3BhcmVudEluamVjdG9yOwogICAgICAgICAgICB0aGlzLl9jdXN0b21Ub2tlbnMgPSBfY3VzdG9tVG9rZW5zOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHRva2VuCiAgICAgICAgICogQHBhcmFtIHs/PX0gbm90Rm91bmRWYWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0KHRva2VuLCBub3RGb3VuZFZhbHVlKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdmFsdWUgPSB0aGlzLl9jdXN0b21Ub2tlbnMuZ2V0KHRva2VuKTsKICAgICAgICAgICAgaWYgKHR5cGVvZiB2YWx1ZSAhPT0gJ3VuZGVmaW5lZCcpIHsKICAgICAgICAgICAgICAgIHJldHVybiB2YWx1ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpcy5fcGFyZW50SW5qZWN0b3IuZ2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mb3IgYSBuYXRpdmUgYXJyYXkuCiAgICAgKiBAdGVtcGxhdGUgVAogICAgICovCiAgICBjbGFzcyBBcnJheURhdGFTb3VyY2UgZXh0ZW5kcyBEYXRhU291cmNlIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IF9kYXRhCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoX2RhdGEpIHsKICAgICAgICAgICAgc3VwZXIoKTsKICAgICAgICAgICAgdGhpcy5fZGF0YSA9IF9kYXRhOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGNvbm5lY3QoKSB7CiAgICAgICAgICAgIHJldHVybiBpc09ic2VydmFibGUodGhpcy5fZGF0YSkgPyB0aGlzLl9kYXRhIDogb2YodGhpcy5fZGF0YSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZGlzY29ubmVjdCgpIHsgfQogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogc3JjL2Nkay9jb2xsZWN0aW9ucy9zZWxlY3Rpb24tbW9kZWwudHMKICAgICAqIEBzdXBwcmVzcyB7Y2hlY2tUeXBlcyxjb25zdGFudFByb3BlcnR5LGV4dHJhUmVxdWlyZSxtaXNzaW5nT3ZlcnJpZGUsbWlzc2luZ1JldHVybix1bnVzZWRQcml2YXRlTWVtYmVycyx1c2VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgLyoqCiAgICAgKiBDbGFzcyB0byBiZSB1c2VkIHRvIHBvd2VyIHNlbGVjdGluZyBvbmUgb3IgbW9yZSBvcHRpb25zIGZyb20gYSBsaXN0LgogICAgICogQHRlbXBsYXRlIFQKICAgICAqLwogICAgY2xhc3MgU2VsZWN0aW9uTW9kZWwgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7Pz19IF9tdWx0aXBsZQogICAgICAgICAqIEBwYXJhbSB7Pz19IGluaXRpYWxseVNlbGVjdGVkVmFsdWVzCiAgICAgICAgICogQHBhcmFtIHs/PX0gX2VtaXRDaGFuZ2VzCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoX211bHRpcGxlID0gZmFsc2UsIGluaXRpYWxseVNlbGVjdGVkVmFsdWVzLCBfZW1pdENoYW5nZXMgPSB0cnVlKSB7CiAgICAgICAgICAgIHRoaXMuX211bHRpcGxlID0gX211bHRpcGxlOwogICAgICAgICAgICB0aGlzLl9lbWl0Q2hhbmdlcyA9IF9lbWl0Q2hhbmdlczsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEN1cnJlbnRseS1zZWxlY3RlZCB2YWx1ZXMuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9zZWxlY3Rpb24gPSBuZXcgU2V0KCk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBLZWVwcyB0cmFjayBvZiB0aGUgZGVzZWxlY3RlZCBvcHRpb25zIHRoYXQgaGF2ZW4ndCBiZWVuIGVtaXR0ZWQgYnkgdGhlIGNoYW5nZSBldmVudC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX2Rlc2VsZWN0ZWRUb0VtaXQgPSBbXTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEtlZXBzIHRyYWNrIG9mIHRoZSBzZWxlY3RlZCBvcHRpb25zIHRoYXQgaGF2ZW4ndCBiZWVuIGVtaXR0ZWQgYnkgdGhlIGNoYW5nZSBldmVudC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX3NlbGVjdGVkVG9FbWl0ID0gW107CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBFdmVudCBlbWl0dGVkIHdoZW4gdGhlIHZhbHVlIGhhcyBjaGFuZ2VkLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5jaGFuZ2VkID0gbmV3IFN1YmplY3QoKTsKICAgICAgICAgICAgaWYgKGluaXRpYWxseVNlbGVjdGVkVmFsdWVzICYmIGluaXRpYWxseVNlbGVjdGVkVmFsdWVzLmxlbmd0aCkgewogICAgICAgICAgICAgICAgaWYgKF9tdWx0aXBsZSkgewogICAgICAgICAgICAgICAgICAgIGluaXRpYWxseVNlbGVjdGVkVmFsdWVzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgIHZhbHVlID0+IHRoaXMuX21hcmtTZWxlY3RlZCh2YWx1ZSkpKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX21hcmtTZWxlY3RlZChpbml0aWFsbHlTZWxlY3RlZFZhbHVlc1swXSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvLyBDbGVhciB0aGUgYXJyYXkgaW4gb3JkZXIgdG8gYXZvaWQgZmlyaW5nIHRoZSBjaGFuZ2UgZXZlbnQgZm9yIHByZXNlbGVjdGVkIHZhbHVlcy4KICAgICAgICAgICAgICAgIHRoaXMuX3NlbGVjdGVkVG9FbWl0Lmxlbmd0aCA9IDA7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU2VsZWN0ZWQgdmFsdWVzLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHNlbGVjdGVkKCkgewogICAgICAgICAgICBpZiAoIXRoaXMuX3NlbGVjdGVkKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9zZWxlY3RlZCA9IEFycmF5LmZyb20odGhpcy5fc2VsZWN0aW9uLnZhbHVlcygpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpcy5fc2VsZWN0ZWQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNlbGVjdHMgYSB2YWx1ZSBvciBhbiBhcnJheSBvZiB2YWx1ZXMuCiAgICAgICAgICogQHBhcmFtIHsuLi4/fSB2YWx1ZXMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNlbGVjdCguLi52YWx1ZXMpIHsKICAgICAgICAgICAgdGhpcy5fdmVyaWZ5VmFsdWVBc3NpZ25tZW50KHZhbHVlcyk7CiAgICAgICAgICAgIHZhbHVlcy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdmFsdWUgPT4gdGhpcy5fbWFya1NlbGVjdGVkKHZhbHVlKSkpOwogICAgICAgICAgICB0aGlzLl9lbWl0Q2hhbmdlRXZlbnQoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogRGVzZWxlY3RzIGEgdmFsdWUgb3IgYW4gYXJyYXkgb2YgdmFsdWVzLgogICAgICAgICAqIEBwYXJhbSB7Li4uP30gdmFsdWVzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkZXNlbGVjdCguLi52YWx1ZXMpIHsKICAgICAgICAgICAgdGhpcy5fdmVyaWZ5VmFsdWVBc3NpZ25tZW50KHZhbHVlcyk7CiAgICAgICAgICAgIHZhbHVlcy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdmFsdWUgPT4gdGhpcy5fdW5tYXJrU2VsZWN0ZWQodmFsdWUpKSk7CiAgICAgICAgICAgIHRoaXMuX2VtaXRDaGFuZ2VFdmVudCgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBUb2dnbGVzIGEgdmFsdWUgYmV0d2VlbiBzZWxlY3RlZCBhbmQgZGVzZWxlY3RlZC4KICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB0b2dnbGUodmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5pc1NlbGVjdGVkKHZhbHVlKSA/IHRoaXMuZGVzZWxlY3QodmFsdWUpIDogdGhpcy5zZWxlY3QodmFsdWUpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDbGVhcnMgYWxsIG9mIHRoZSBzZWxlY3RlZCB2YWx1ZXMuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBjbGVhcigpIHsKICAgICAgICAgICAgdGhpcy5fdW5tYXJrQWxsKCk7CiAgICAgICAgICAgIHRoaXMuX2VtaXRDaGFuZ2VFdmVudCgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBEZXRlcm1pbmVzIHdoZXRoZXIgYSB2YWx1ZSBpcyBzZWxlY3RlZC4KICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBpc1NlbGVjdGVkKHZhbHVlKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9zZWxlY3Rpb24uaGFzKHZhbHVlKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogRGV0ZXJtaW5lcyB3aGV0aGVyIHRoZSBtb2RlbCBkb2VzIG5vdCBoYXZlIGEgdmFsdWUuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBpc0VtcHR5KCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fc2VsZWN0aW9uLnNpemUgPT09IDA7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIERldGVybWluZXMgd2hldGhlciB0aGUgbW9kZWwgaGFzIGEgdmFsdWUuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBoYXNWYWx1ZSgpIHsKICAgICAgICAgICAgcmV0dXJuICF0aGlzLmlzRW1wdHkoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU29ydHMgdGhlIHNlbGVjdGVkIHZhbHVlcyBiYXNlZCBvbiBhIHByZWRpY2F0ZSBmdW5jdGlvbi4KICAgICAgICAgKiBAcGFyYW0gez89fSBwcmVkaWNhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNvcnQocHJlZGljYXRlKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9tdWx0aXBsZSAmJiB0aGlzLnNlbGVjdGVkKSB7CiAgICAgICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5fc2VsZWN0ZWQpKS5zb3J0KHByZWRpY2F0ZSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogR2V0cyB3aGV0aGVyIG11bHRpcGxlIHZhbHVlcyBjYW4gYmUgc2VsZWN0ZWQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBpc011bHRpcGxlU2VsZWN0aW9uKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fbXVsdGlwbGU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEVtaXRzIGEgY2hhbmdlIGV2ZW50IGFuZCBjbGVhcnMgdGhlIHJlY29yZHMgb2Ygc2VsZWN0ZWQgYW5kIGRlc2VsZWN0ZWQgdmFsdWVzLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZW1pdENoYW5nZUV2ZW50KCkgewogICAgICAgICAgICAvLyBDbGVhciB0aGUgc2VsZWN0ZWQgdmFsdWVzIHNvIHRoZXkgY2FuIGJlIHJlLWNhY2hlZC4KICAgICAgICAgICAgdGhpcy5fc2VsZWN0ZWQgPSBudWxsOwogICAgICAgICAgICBpZiAodGhpcy5fc2VsZWN0ZWRUb0VtaXQubGVuZ3RoIHx8IHRoaXMuX2Rlc2VsZWN0ZWRUb0VtaXQubGVuZ3RoKSB7CiAgICAgICAgICAgICAgICB0aGlzLmNoYW5nZWQubmV4dCh7CiAgICAgICAgICAgICAgICAgICAgc291cmNlOiB0aGlzLAogICAgICAgICAgICAgICAgICAgIGFkZGVkOiB0aGlzLl9zZWxlY3RlZFRvRW1pdCwKICAgICAgICAgICAgICAgICAgICByZW1vdmVkOiB0aGlzLl9kZXNlbGVjdGVkVG9FbWl0CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIHRoaXMuX2Rlc2VsZWN0ZWRUb0VtaXQgPSBbXTsKICAgICAgICAgICAgICAgIHRoaXMuX3NlbGVjdGVkVG9FbWl0ID0gW107CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU2VsZWN0cyBhIHZhbHVlLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX21hcmtTZWxlY3RlZCh2YWx1ZSkgewogICAgICAgICAgICBpZiAoIXRoaXMuaXNTZWxlY3RlZCh2YWx1ZSkpIHsKICAgICAgICAgICAgICAgIGlmICghdGhpcy5fbXVsdGlwbGUpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl91bm1hcmtBbGwoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuX3NlbGVjdGlvbi5hZGQodmFsdWUpOwogICAgICAgICAgICAgICAgaWYgKHRoaXMuX2VtaXRDaGFuZ2VzKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fc2VsZWN0ZWRUb0VtaXQucHVzaCh2YWx1ZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogRGVzZWxlY3RzIGEgdmFsdWUuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfdW5tYXJrU2VsZWN0ZWQodmFsdWUpIHsKICAgICAgICAgICAgaWYgKHRoaXMuaXNTZWxlY3RlZCh2YWx1ZSkpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3NlbGVjdGlvbi5kZWxldGUodmFsdWUpOwogICAgICAgICAgICAgICAgaWYgKHRoaXMuX2VtaXRDaGFuZ2VzKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fZGVzZWxlY3RlZFRvRW1pdC5wdXNoKHZhbHVlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDbGVhcnMgb3V0IHRoZSBzZWxlY3RlZCB2YWx1ZXMuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF91bm1hcmtBbGwoKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5pc0VtcHR5KCkpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3NlbGVjdGlvbi5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIHZhbHVlID0+IHRoaXMuX3VubWFya1NlbGVjdGVkKHZhbHVlKSkpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIF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BbXTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogTm90aWZ5IG90aGVyIGl0ZW1zIHRoYXQgc2VsZWN0aW9uIGZvciB0aGUgZ2l2ZW4gbmFtZSBoYXMgYmVlbiBzZXQuCiAgICAgICAgICogQHBhcmFtIHs/fSBpZCBJRCBvZiB0aGUgaXRlbS4KICAgICAgICAgKiBAcGFyYW0gez99IG5hbWUgTmFtZSBvZiB0aGUgaXRlbS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5vdGlmeShpZCwgbmFtZSkgewogICAgICAgICAgICBmb3IgKGxldCBsaXN0ZW5lciBvZiB0aGlzLl9saXN0ZW5lcnMpIHsKICAgICAgICAgICAgICAgIGxpc3RlbmVyKGlkLCBuYW1lKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBMaXN0ZW4gZm9yIGZ1dHVyZSBjaGFuZ2VzIHRvIGl0ZW0gc2VsZWN0aW9uLgogICAgICAgICAqIEBwYXJhbSB7P30gbGlzdGVuZXIKICAgICAgICAgKiBAcmV0dXJuIHs/fSBGdW5jdGlvbiB1c2VkIHRvIGRlcmVnaXN0ZXIgbGlzdGVuZXIKICAgICAgICAgKi8KICAgICAgICBsaXN0ZW4obGlzdGVuZXIpIHsKICAgICAgICAgICAgdGhpcy5fbGlzdGVuZXJzLnB1c2gobGlzdGVuZXIpOwogICAgICAgICAgICByZXR1cm4gKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgdGhpcy5fbGlzdGVuZXJzID0gdGhpcy5fbGlzdGVuZXJzLmZpbHRlcigoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHJlZ2lzdGVyZWQKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICA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cGFydCBvZiBWaXJ0dWFsU2Nyb2xsU3RyYXRlZ3kuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLnNjcm9sbGVkSW5kZXhDaGFuZ2UgPSB0aGlzLl9zY3JvbGxlZEluZGV4Q2hhbmdlLnBpcGUoZGlzdGluY3RVbnRpbENoYW5nZWQoKSk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBUaGUgYXR0YWNoZWQgdmlld3BvcnQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl92aWV3cG9ydCA9IG51bGw7CiAgICAgICAgICAgIHRoaXMuX2l0ZW1TaXplID0gaXRlbVNpemU7CiAgICAgICAgICAgIHRoaXMuX21pbkJ1ZmZlclB4ID0gbWluQnVmZmVyUHg7CiAgICAgICAgICAgIHRoaXMuX21heEJ1ZmZlclB4ID0gbWF4QnVmZmVyUHg7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEF0dGFjaGVzIHRoaXMgc2Nyb2xsIHN0cmF0ZWd5IHRvIGEgdmlld3BvcnQuCiAgICAgICAgICogQHBhcmFtIHs/fSB2aWV3cG9ydCBUaGUgdmlld3BvcnQgdG8gYXR0YWNoIHRoaXMgc3RyYXRlZ3kgdG8uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBhdHRhY2godmlld3BvcnQpIHsKICAgICAgICAgICAgdGhpcy5fdmlld3BvcnQgPSB2aWV3cG9ydDsKICAgICAgICAgICAgdGhpcy5fdXBkYXRlVG90YWxDb250ZW50U2l6ZSgpOwogICAgICAgICAgICB0aGlzLl91cGRhdGVSZW5kZXJlZFJhbmdlKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIERldGFjaGVzIHRoaXMgc2Nyb2xsIHN0cmF0ZWd5IGZyb20gdGhlIGN1cnJlbnRseSBhdHRhY2hlZCB2aWV3cG9ydC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAq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XMuX21heEJ1ZmZlclB4ID0gbWF4QnVmZmVyUHg7CiAgICAgICAgICAgIHRoaXMuX3VwZGF0ZVRvdGFsQ29udGVudFNpemUoKTsKICAgICAgICAgICAgdGhpcy5fdXBkYXRlUmVuZGVyZWRSYW5nZSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRvY3MtcHJpdmF0ZSBJbXBsZW1lbnRlZCBhcyBwYXJ0IG9mIFZpcnR1YWxTY3JvbGxTdHJhdGVneS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uQ29udGVudFNjcm9sbGVkKCkgewogICAgICAgICAgICB0aGlzLl91cGRhdGVSZW5kZXJlZFJhbmdlKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZG9jcy1wcml2YXRlIEltcGxlbWVudGVkIGFzIHBhcnQgb2YgVmlydHVhbFNjcm9sbFN0cmF0ZWd5LgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25EYXRhTGVuZ3RoQ2hhbmdlZCgpIHsKICAgICAgICAgICAgdGhpcy5fdXBkYXRlVG90YWxDb250ZW50U2l6ZSgpOwogICAgICAgICAgICB0aGlzLl91cGRhdGVSZW5kZXJlZFJhbmdlKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZG9jcy1wcml2YXRlIEltcGxlbWVudGVkIGFzIHBhcnQgb2YgVmlydHVhbFNjcm9sbFN0cmF0ZWd5LgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25Db250ZW50UmVuZGVyZWQoKSB7IH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRvY3MtcHJpdmF0ZSBJbXBsZW1lbnRlZCBhcyBwYXJ0IG9mIFZpcnR1YWxTY3JvbGxTdHJhdGVneS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uUmVuZGVyZWRPZmZzZXRDaGFuZ2VkKCkgeyB9CiAgICAgICAgLyoqCiAgICAgICAgICogU2Nyb2xsIHRvIHRoZSBvZmZzZXQgZm9yIHRoZSBnaXZlbiBpbmRleC4KICAgICAgICAgKiBAcGFyYW0gez99IGluZGV4IFRoZSBpbmRleCBvZiB0aGUgZWxlbWVudCB0byBzY3JvbGwgdG8uCiAgICAgICAgICogQHBhcmFtIHs/fSBiZWhhdmlvciBUaGUgU2Nyb2xsQmVoYXZpb3IgdG8gdXNlIHdoZW4gc2Nyb2xsaW5nLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2Nyb2xsVG9JbmRleChpbmRleCwgYmVoYXZpb3IpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX3ZpZXdwb3J0KSB7CiAgICAgICAgICAgICAgICB0aGlzLl92aWV3cG9ydC5zY3JvbGxUb09mZnNldChpbmRleCAqIHRoaXMuX2l0ZW1TaXplLCBiZWhhdmlvcik7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVXBkYXRlIHRoZSB2aWV3cG9ydCdzIHRvdGFsIGNvbnRlbnQgc2l6ZS4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3VwZGF0ZVRvdGFsQ29udGVudFNpemUoKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5fdmlld3BvcnQpIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl92aWV3cG9ydC5zZXRUb3RhbENvbnRlbnRTaXplKHRoaXMuX3ZpZXdwb3J0LmdldERhdGFMZW5ndGgoKSAqIHRoaXMuX2l0ZW1TaXplKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVXBkYXRlIHRoZSB2aWV3cG9ydCdzIHJlbmRlcmVkIHJhbmdlLgogICAgICAgICAqIEBw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gKi8KICAgICAgICBzZXQgaXRlbVNpemUodmFsdWUpIHsgdGhpcy5faXRlbVNpemUgPSBjb2VyY2VOdW1iZXJQcm9wZXJ0eSh2YWx1ZSk7IH0KICAgICAgICAvKioKICAgICAgICAgKiBUaGUgbWluaW11bSBhbW91bnQgb2YgYnVmZmVyIHJlbmRlcmVkIGJleW9uZCB0aGUgdmlld3BvcnQgKGluIHBpeGVscykuCiAgICAgICAgICogSWYgdGhlIGFtb3VudCBvZiBidWZmZXIgZGlwcyBiZWxvdyB0aGlzIG51bWJlciwgbW9yZSBpdGVtcyB3aWxsIGJlIHJlbmRlcmVkLiBEZWZhdWx0cyB0byAxMDBweC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBtaW5CdWZmZXJQeCgpIHsgcmV0dXJuIHRoaXMuX21pbkJ1ZmZlclB4OyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IG1pbkJ1ZmZlclB4KHZhbHVlKSB7IHRoaXMuX21pbkJ1ZmZlclB4ID0gY29lcmNlTnVtYmVyUHJvcGVydHkodmFsdWUpOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIG51bWJlciBvZiBwaXhlbHMgd29ydGggb2YgYnVmZmVyIHRvIHJlbmRlciBmb3Igd2hlbiByZW5kZXJpbmcgbmV3IGl0ZW1zLiBEZWZhdWx0cyB0byAyMDBweC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBtYXhCdWZmZXJQeCgpIHsgcmV0dXJuIHRoaXMuX21heEJ1ZmZlclB4OyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IG1heEJ1ZmZlclB4KHZhbHV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5lbGVtZW50U2Nyb2xsZWQoKQogICAgICAgICAgICAgICAgICAgIC5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gdGhpcy5fc2Nyb2xsZWQubmV4dChzY3JvbGxhYmxlKSkpKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBEZXJlZ2lzdGVycyBhIFNjcm9sbGFibGUgcmVmZXJlbmNlIGFuZCB1bnN1YnNjcmliZXMgZnJvbSBpdHMgc2Nyb2xsIGV2ZW50IG9ic2VydmFibGUuCiAgICAgICAgICogQHBhcmFtIHs/fSBzY3JvbGxhYmxlIFNjcm9sbGFibGUgaW5zdGFuY2UgdG8gYmUgZGVyZWdpc3RlcmVkLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZGVyZWdpc3RlcihzY3JvbGxhYmxlKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc2Nyb2xsYWJsZVJlZmVyZW5jZSA9IHRoaXMuc2Nyb2xsQ29udGFpbmVycy5nZXQoc2Nyb2xsYWJsZSk7CiAgICAgICAgICAgIGlmIChzY3JvbGxhYmxlUmVmZXJlbmNlKSB7CiAgICAgICAgICAgICAgICBzY3JvbGxhYmxlUmVmZXJlbmNlLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgICAgICAgICB0aGlzLnNjcm9sbENvbnRhaW5lcnMuZGVsZXRlKHNjcm9sbGFibGUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgYW4gb2JzZXJ2YWJsZSB0aGF0IGVtaXRzIGFuIGV2ZW50IHdoZW5ldmVyIGFueSBvZiB0aGUgcmVnaXN0ZXJlZCBTY3JvbGxhYmxlCiAgICAgICAgICogcmVmZXJlbmNlcyAob3Igd2luZG93LCBkb2N1bWVudCwgb3IgYm9keSkgZmlyZSBhIHNjcm9sbGVkIGV2ZW50LiBDYW4gcHJvdmlkZSBhIHRpbWUgaW4gbXMKICAgICAgICAgKiB0byBvdmVycmlkZSB0aGUgZGVmYXVsdCAidGhyb3R0bGUiIHRpbWUuCiAgICAgICAgICoKICAgICAgICAgKiAqKk5vdGU6KiogaW4gb3JkZXIgdG8gYXZvaWQgaGl0dGluZyBjaGFuZ2UgZGV0ZWN0aW9uIGZvciBldmVyeSBzY3JvbGwgZXZlbnQsCiAgICAgICAgICogYWxsIG9mIHRoZSBldmVudHMgZW1pdHRlZCBmcm9tIHRoaXMgc3RyZWFtIHdpbGwgYmUgcnVuIG91dHNpZGUgdGhlIEFuZ3VsYXIgem9uZS4KICAgICAgICAgKiBJZiB5b3UgbmVlZCB0byB1cGRhdGUgYW55IGRhdGEgYmluZGluZ3MgYXMgYSByZXN1bHQgb2YgYSBzY3JvbGwgZXZlbnQsIHlvdSBoYXZlCiAgICAgICAgICogdG8gcnVuIHRoZSBjYWxsYmFjayB1c2luZyBgTmdab25lLnJ1bmAuCiAgICAgICAgICogQHBhcmFtIHs/PX0gYXVkaXRUaW1lSW5NcwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2Nyb2xsZWQoYXVkaXRUaW1lSW5NcyA9IERFRkFVTFRfU0NST0xMX1RJTUUpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLl9wbGF0Zm9ybS5pc0Jyb3dzZXIpIHsKICAgICAgICAgICAgICAgIHJldHVybiBvZigpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBuZXcgT2JzZXJ2YWJsZSgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gb2JzZXJ2ZXIKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChvYnNlcnZlcikgPT4gewogICAgICAgICAgICAgICAgaWYgKCF0aGlzLl9nbG9iYWxTdWJzY3JpcHRpb24pIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9hZGRHbG9iYWxMaXN0ZW5lcigpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLy8gSW4gdGhlIGNhc2Ugb2YgYSAwbXMgZGVsYXksIHVzZSBhbiBvYnNlcnZhYmxlIHdpdGhvdXQgYXVkaXRUaW1lCiAgICAgICAgICAgICAgICAvLyBzaW5jZSBpdCBkb2VzIGFkZCBhIHBlcmNlcHRpYmxlIGRlbGF5IGluIHByb2Nlc3Npbmcgb3ZlcmhlYWQuCiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBzdWJzY3JpcHRpb24gPSBhdWRpdFRpbWVJbk1zID4gMCA/CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fc2Nyb2xsZWQucGlwZShhdWRpdFRpbWUoYXVkaXRUaW1lSW5NcykpLnN1YnNjcmliZShvYnNlcnZlcikgOgogICAgICAgICAgICAgICAgICAgIHRoaXMuX3Njcm9sbGVkLnN1YnNjcmliZShvYnNlcnZlcik7CiAgICAgICAgICAgICAgICB0aGlzLl9zY3JvbGxlZENvdW50Kys7CiAgICAgICAgICAgICAgICByZXR1cm4gKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHN1YnNjcmlwdGlvbi51bnN1YnNjcmliZSgpOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX3Njcm9sbGVkQ291bnQtLTsKICAgICAgICAgICAgICAgICAgICBpZiAoIXRoaXMuX3Njcm9sbGVkQ291bnQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fcmVtb3ZlR2xvYmFsTGlzdGVuZXIoKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25EZXN0cm95KCkgewogICAgICAgICAgICB0aGlzLl9yZW1vdmVHbG9iYWxMaXN0ZW5lcigpOwogICAgICAgICAgICB0aGlzLnNjcm9sbENvbnRhaW5lcnMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gXwogICAgICAgICAgICAgKiBAcGFyYW0gez99IGNvbnRhaW5lcgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKF8sIGNvbnRhaW5lcikgPT4gdGhpcy5kZXJlZ2lzdGVyKGNvbnRhaW5lcikpKTsKICAgICAgICAgICAgdGhpcy5fc2Nyb2xsZWQuY29tcGxldGUoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0dXJucyBhbiBvYnNlcnZhYmxlIHRoYXQgZW1pdHMgd2hlbmV2ZXIgYW55IG9mIHRoZQogICAgICAgICAqIHNjcm9sbGFibGUgYW5jZXN0b3JzIG9mIGFuIGVsZW1lbnQgYXJlIHNjcm9sbGVkLgogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudFJlZiBFbGVtZW50IHdob3NlIGFuY2VzdG9ycyB0byBsaXN0ZW4gZm9yLgogICAgICAgICAqIEBwYXJhbSB7Pz19IGF1ZGl0VGltZUluTXMgVGltZSB0byB0aHJvdHRsZSB0aGUgc2Nyb2xsIGV2ZW50cy4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGFuY2VzdG9yU2Nyb2xsZWQoZWxlbWVudFJlZiwgYXVkaXRUaW1lSW5NcykgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGFuY2VzdG9ycyA9IHRoaXMuZ2V0QW5jZXN0b3JTY3JvbGxDb250YWluZXJzKGVsZW1lbnRSZWYpOwogICAgICAgICAgICByZXR1cm4gdGhpcy5zY3JvbGxlZChhdWRpdFRpbWVJbk1zKS5waXBlKGZpbHRlcigoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdGFyZ2V0CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0YXJnZXQgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuICF0YXJnZXQgfHwgYW5jZXN0b3JzLmluZGV4T2YodGFyZ2V0KSA+IC0xOwogICAgICAgICAgICB9KSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZXR1cm5zIGFsbCByZWdpc3RlcmVkIFNjcm9sbGFibGVzIHRoYXQgY29udGFpbiB0aGUgcHJvdmlkZWQgZWxlbWVudC4KICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnRSZWYKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldEFuY2VzdG9yU2Nyb2xsQ29udGFpbmVycyhlbGVtZW50UmVmKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc2Nyb2xsaW5nQ29udGFpbmVycyA9IFtdOwogICAgICAgICAgICB0aGlzLnNjcm9sbENvbnRhaW5lcnMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX3N1YnNjcmlwdGlvbgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHNjcm9sbGFibGUKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChfc3Vic2NyaXB0aW9uLCBzY3JvbGxhYmxlKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5fc2Nyb2xsYWJsZUNvbnRhaW5zRWxlbWVudChzY3JvbGxhYmxlLCBlbGVtZW50UmVmKSkgewogICAgICAgICAgICAgICAgICAgIHNjcm9sbGluZ0NvbnRhaW5lcnMucHVzaChzY3JvbGxhYmxlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSkpOwogICAgICAgICAgICByZXR1cm4gc2Nyb2xsaW5nQ29udGFpbmVyczsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQWNjZXNzIGluamVjdGVkIGRvY3VtZW50IGlmIGF2YWlsYWJsZSBvciBmYWxsYmFjayB0byBnbG9iYWwgZG9jdW1lbnQgcmVmZXJlbmNlCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9nZXREb2N1bWVudCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2RvY3VtZW50IHx8IGRvY3VtZW50OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBVc2UgZGVmYXVsdFZpZXcgb2YgaW5qZWN0ZWQgZG9jdW1lbnQgaWYgYXZhaWxhYmxlIG9yIGZhbGxiYWNrIHRvIGdsb2JhbCB3aW5kb3cgcmVmZXJlbmNlCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9nZXRXaW5kb3coKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZG9jID0gdGhpcy5fZ2V0RG9jdW1lbnQoKTsKICAgICAgICAgICAgcmV0dXJuIGRvYy5kZWZhdWx0VmlldyB8fCB3aW5kb3c7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgdHJ1ZSBpZiB0aGUgZWxlbWVudCBpcyBjb250YWluZWQgd2l0aGluIHRoZSBwcm92aWRlZCBTY3JvbGxhYmxlLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBzY3JvbGxhYmxlCiAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50UmVmCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfc2Nyb2xsYWJsZUNvbnRhaW5zRWxlbWVudChzY3JvbGxhYmxlLCBlbGVtZW50UmVmKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGVsZW1lbnQgPSBlbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQ7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHNjcm9sbGFibGVFbGVtZW50ID0gc2Nyb2xsYWJsZS5nZXRFbGVtZW50UmVmKCkubmF0aXZlRWxlbWVudDsKICAgICAgICAgICAgLy8gVHJhdmVyc2UgdGhyb3VnaCB0aGUgZWxlbWVudCBwYXJlbnRzIHVudGlsIHdlIHJlYWNoIG51bGwsIGNoZWNraW5nIGlmIGFueSBvZiB0aGUgZWxlbWVudHMKICAgICAgICAgICAgLy8gYXJlIHRoZSBzY3JvbGxhYmxlJ3MgZWxlbWVudC4KICAgICAgICAgICAgZG8gewogICAgICAgICAgICAgICAgaWYgKGVsZW1lbnQgPT0gc2Nyb2xsYWJsZUVsZW1lbnQpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSB3aGlsZSAoZWxlbWVudCA9ICgvKiogQHR5cGUgez99ICovIChlbGVtZW50KSkucGFyZW50RWxlbWVudCk7CiAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU2V0cyB1cCB0aGUgZ2xvYmFsIHNjcm9sbCBsaXN0ZW5lcnMuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9hZGRHbG9iYWxMaXN0ZW5lcigpIHsKICAgICAgICAgICAgdGhpcy5fZ2xvYmFsU3Vic2NyaXB0aW9uID0gdGhpcy5fbmdab25lLnJ1bk91dHNpZGVBbmd1bGFyKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHdpbmRvdyA9IHRoaXMuX2dldFdpbmRvdygpOwogICAgICAgICAgICAgICAgcmV0dXJuIGZyb21FdmVudCh3aW5kb3cuZG9jdW1lbnQsICdzY3JvbGwnKS5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gdGhpcy5fc2Nyb2xsZWQubmV4dCgpKSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ2xlYW5zIHVwIHRoZSBnbG9iYWwgc2Nyb2xsIGxpc3RlbmVyLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfcmVtb3ZlR2xvYmFsTGlzdGVuZXIoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9nbG9iYWxTdWJzY3JpcHRpb24pIHsKICAgICAgICAgICAgICAgIHRoaXMuX2dsb2JhbFN1YnNjcmlwdGlvbi51bnN1YnNjcmliZSgpOwogICAgICAgICAgICAgICAgdGhpcy5fZ2xvYmFsU3Vic2NyaXB0aW9uID0gbnVsbDsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIFNjcm9sbERpc3BhdGNoZXIuybVmYWMgPSBmdW5jdGlvbiBTY3JvbGxEaXNwYXRjaGVyX0ZhY3RvcnkodCkgeyByZXR1cm4gbmV3ICh0IHx8IFNjcm9sbERpc3BhdGNoZXIpKMm1ybVpbmplY3QoTmdab25lKSwgybXJtWluamVjdChQbGF0Zm9ybSksIMm1ybVpbmplY3QoRE9DVU1FTlQkMSwgOCk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GVkLiBSZWdpc3RlcnMgaXRzZWxmIHdpdGggdGhlCiAgICAgKiBTY3JvbGxEaXNwYXRjaGVyIHNlcnZpY2UgdG8gaW5jbHVkZSBpdHNlbGYgYXMgcGFydCBvZiBpdHMgY29sbGVjdGlvbiBvZiBzY3JvbGxpbmcgZXZlbnRzIHRoYXQgaXQKICAgICAqIGNhbiBiZSBsaXN0ZW5lZCB0byB0aHJvdWdoIHRoZSBzZXJ2aWNlLgogICAgICovCiAgICBjbGFzcyBDZGtTY3JvbGxhYmxlIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnRSZWYKICAgICAgICAgKiBAcGFyYW0gez99IHNjcm9sbERpc3BhdGNoZXIKICAgICAgICAgKiBAcGFyYW0gez99IG5nWm9uZQogICAgICAgICAqIEBwYXJhbSB7Pz19IGRpcgogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKGVsZW1lbnRSZWYsIHNjcm9sbERpc3BhdGNoZXIsIG5nWm9uZSwgZGlyKSB7CiAgICAgICAgICAgIHRoaXMuZWxlbWVudFJlZiA9IGVsZW1lbnRSZWY7CiAgICAgICAgICAgIHRoaXMuc2Nyb2xsRGlzcGF0Y2hlciA9IHNjcm9sbERpc3BhdGNoZXI7CiAgICAgICAgICAgIHRoaXMubmdab25lID0gbmdab25lOwogICAgICAgICAgICB0aGlzLmRpciA9IGRpcjsKICAgICAgICAgICAgdGhpcy5fZGVzdHJveWVkID0gbmV3IFN1YmplY3QoKTsKICAgICAgICAgICAgdGhpcy5fZWxlbWVudFNjcm9sbGVkID0gbmV3IE9ic2VydmFibGUoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IG9ic2VydmVyCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAob2JzZXJ2ZXIpID0+IHRoaXMubmdab25lLnJ1bk91dHNpZGVBbmd1bGFyKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IGZyb21FdmVudCh0aGlzLmVsZW1lbnRSZWYubmF0aXZlRWxlbWVudCwgJ3Njcm9sbCcpLnBpcGUodGFrZVVudGlsKHRoaXMuX2Rlc3Ryb3llZCkpCiAgICAgICAgICAgICAgICAuc3Vic2NyaWJlKG9ic2VydmVyKSkpKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkluaXQoKSB7CiAgICAgICAgICAgIHRoaXMuc2Nyb2xsRGlzcGF0Y2hlci5yZWdpc3Rlcih0aGlzKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uRGVzdHJveSgpIHsKICAgICAgICAgICAgdGhpcy5zY3JvbGxEaXNwYXRjaGVyLmRlcmVnaXN0ZXIodGhpcyk7CiAgICAgICAgICAgIHRoaXMuX2Rlc3Ryb3llZC5uZXh0KCk7CiAgICAgICAgICAgIHRoaXMuX2Rlc3Ryb3llZC5jb21wbGV0ZSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZXR1cm5zIG9ic2VydmFibGUgdGhhdCBlbWl0cyB3aGVuIGEgc2Nyb2xsIGV2ZW50IGlzIGZpcmVkIG9uIHRoZSBob3N0IGVsZW1lbnQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBlbGVtZW50U2Nyb2xsZWQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9lbGVtZW50U2Nyb2xsZWQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEdldHMgdGhlIEVsZW1lbnRSZWYgZm9yIHRoZSB2aWV3cG9ydC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldEVsZW1lbnRSZWYoKSB7CiAgICAgICAgICA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ICYgZW5kIG9mZnNldHMgYXMgcmlnaHQgb3IgbGVmdCBvZmZzZXRzLgogICAgICAgICAgICBpZiAob3B0aW9ucy5sZWZ0ID09IG51bGwpIHsKICAgICAgICAgICAgICAgIG9wdGlvbnMubGVmdCA9IGlzUnRsID8gb3B0aW9ucy5lbmQgOiBvcHRpb25zLnN0YXJ0OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChvcHRpb25zLnJpZ2h0ID09IG51bGwpIHsKICAgICAgICAgICAgICAgIG9wdGlvbnMucmlnaHQgPSBpc1J0bCA/IG9wdGlvbnMuc3RhcnQgOiBvcHRpb25zLmVuZDsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBSZXdyaXRlIHRoZSBib3R0b20gb2Zmc2V0IGFzIGEgdG9wIG9mZnNldC4KICAgICAgICAgICAgaWYgKG9wdGlvbnMuYm90dG9tICE9IG51bGwpIHsKICAgICAgICAgICAgICAgICgoLyoqIEB0eXBlIHs/fSAqLyAob3B0aW9ucykpKS50b3AgPQogICAgICAgICAgICAgICAgICAgIGVsLnNjcm9sbEhlaWdodCAtIGVsLmNsaWVudEhlaWdodCAtIG9wdGlvbnMuYm90dG9tOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIFJld3JpdGUgdGhlIHJpZ2h0IG9mZnNldCBhcyBhIGxlZnQgb2Zmc2V0LgogICAgICAgICAgICBpZiAoaXNSdGwgJiYgZ2V0UnRsU2Nyb2xsQXhpc1R5cGUoKSAhPSAwIC8qIE5PUk1BTCAqLykgewogICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMubGVmdCAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgKCgvKiogQHR5cGUgez99ICovIChvcHRpb25zKSkpLnJpZ2h0ID0KICAgICAgICAgICAgICAgICAgICAgICAgZWwuc2Nyb2xsV2lkdGggLSBlbC5jbGllbnRXaWR0aCAtIG9wdGlvbnMubGVmdDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChnZXRSdGxTY3JvbGxBeGlzVHlwZSgpID09IDIgLyogSU5WRVJURUQgKi8pIHsKICAgICAgICAgICAgICAgICAgICBvcHRpb25zLmxlZnQgPSBvcHRpb25zLnJpZ2h0OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAoZ2V0UnRsU2Nyb2xsQXhpc1R5cGUoKSA9PSAxIC8qIE5FR0FURUQgKi8pIHsKICAgICAgICAgICAgICAgICAgICBvcHRpb25zLmxlZnQgPSBvcHRpb25zLnJpZ2h0ID8gLW9wdGlvbnMucmlnaHQgOiBvcHRpb25zLnJpZ2h0OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMucmlnaHQgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgICgoLyoqIEB0eXBlIHs/fSAqLyAob3B0aW9ucykpKS5sZWZ0ID0KICAgICAgICAgICAgICAgICAgICAgICAgZWwuc2Nyb2xsV2lkdGggLSBlbC5jbGllbnRXaWR0aCAtIG9wdGlvbnMucmlnaHQ7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fYXBwbHlTY3JvbGxUb09wdGlvbnMob3B0aW9ucyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBvcHRpb25zCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfYXBwbHlTY3JvbGxUb09wdGlvbnMob3B0aW9ucykgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGVsID0gdGhpcy5lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQ7CiAgICAgICAgICAgIGlmIChzdXBwb3J0c1Njcm9sbEJlaGF2aW9yKCkpIHsKICAgICAgICAgICAgICAgIGVs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gICAgICAqIGluIGFuIFJUTCBjb250ZXh0LgogICAgICAgICAqIEBwYXJhbSB7P30gZnJvbSBUaGUgZWRnZSB0byBtZWFzdXJlIGZyb20uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBtZWFzdXJlU2Nyb2xsT2Zmc2V0KGZyb20pIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBMRUZUID0gJ2xlZnQnOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IFJJR0hUID0gJ3JpZ2h0JzsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBlbCA9IHRoaXMuZWxlbWVudFJlZi5uYXRpdmVFbGVtZW50OwogICAgICAgICAgICBpZiAoZnJvbSA9PSAndG9wJykgewogICAgICAgICAgICAgICAgcmV0dXJuIGVsLnNjcm9sbFRvcDsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoZnJvbSA9PSAnYm90dG9tJykgewogICAgICAgICAgICAgICAgcmV0dXJuIGVsLnNjcm9sbEhlaWdodCAtIGVsLmNsaWVudEhlaWdodCAtIGVsLnNjcm9sbFRvcDsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBSZXdyaXRlIHN0YXJ0ICYgZW5kIGFzIGxlZnQgb3IgcmlnaHQgb2Zmc2V0cy4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBpc1J0bCA9IHRoaXMuZGlyICYmIHRoaXMuZGlyLnZhbHVlID09ICdydGwnOwogICAgICAgICAgICBpZiAoZnJvbSA9PSAnc3RhcnQnKSB7CiAgICAgICAgICAgICAgICBmcm9tID0gaXNSdGwgPyBSSUdIVCA6IExFRlQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoZnJvbSA9PSAnZW5kJykgewogICAgICAgICAgICAgICAgZnJvbSA9IGlzUnRsID8gTEVGVCA6IFJJR0hUOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChpc1J0bCAmJiBnZXRSdGxTY3JvbGxBeGlzVHlwZSgpID09IDIgLyogSU5WRVJURUQgKi8pIHsKICAgICAgICAgICAgICAgIC8vIEZvciBJTlZFUlRFRCwgc2Nyb2xsTGVmdCBpcyAoc2Nyb2xsV2lkdGggLSBjbGllbnRXaWR0aCkgd2hlbiBzY3JvbGxlZCBhbGwgdGhlIHdheSBsZWZ0IGFuZAogICAgICAgICAgICAgICAgLy8gMCB3aGVuIHNjcm9sbGVkIGFsbCB0aGUgd2F5IHJpZ2h0LgogICAgICAgICAgICAgICAgaWYgKGZyb20gPT0gTEVGVCkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBlbC5zY3JvbGxXaWR0aCAtIGVsLmNsaWVudFdpZHRoIC0gZWwuc2Nyb2xsTGVmdDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBlbC5zY3JvbGxMZWZ0OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKGlzUnRsICYmIGdldFJ0bFNjcm9sbEF4aXNUeXBlKCkgPT0gMSAvKiBORUdBVEVEICovKSB7CiAgICAgICAgICAgICAgICAvLyBGb3IgTkVHQVRFRCwgc2Nyb2xsTGVmdCBpcyAtKHNjcm9sbFdpZHRoIC0gY2xpZW50V2lkdGgpIHdoZW4gc2Nyb2xsZWQgYWxsIHRoZSB3YXkgbGVmdCBhbmQKICAgICAgICAgICAgICAgIC8vIDAgd2hlbiBzY3JvbGxlZCBhbGwgdGhlIHdheSByaWdodC4KICAgICAgICAgICAgICAgIGlmIChmcm9tID09IExFRlQpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gZWwuc2Nyb2xsTGVmdCArIGVsLnNjcm9sbFdpZHRoIC0gZWwuY2xpZW50V2lkdGg7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gLWVsLnNjcm9sbExlZnQ7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAvLyBGb3IgTk9STUFMLCBhcyB3ZWxsIGFzIG5vbi1SVEwgY29udGV4dHMsIHNjcm9sbExlZnQgaXMgMCB3aGVuIHNjcm9sbGVkIGFsbCB0aGUgd2F5IGxlZnQgYW5kCiAgICAgICAgICAgICAgICAvLyAoc2Nyb2xsV2lkdGggLSBjbGllbnRXaWR0aCkgd2hlbiBzY3JvbGxlZCBhbGwgdGhlIHdheSByaWdodC4KICAgICAgICAgICAgICAgIGlmIChmcm9tID09IExFRlQpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gZWwuc2Nyb2xsTGVmdDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBlbC5zY3JvbGxXaWR0aCAtIGVsLmNsaWVudFdpZHRoIC0gZWwuc2Nyb2xsTGVmdDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIENka1Njcm9sbGFibGUuybVmYWMgPSBmdW5jdGlvbiBDZGtTY3JvbGxhYmxlX0ZhY3RvcnkodCkgeyByZXR1cm4gbmV3ICh0IHx8IENka1Njcm9sbGFibGUpKMm1ybVkaXJlY3RpdmVJbmplY3QoRWxlbWVudFJlZiksIMm1ybVkaXJlY3RpdmVJbmplY3QoU2Nyb2xsRGlzcGF0Y2hlciksIMm1ybVkaXJlY3RpdmVJbmplY3QoTmdab25lKSwgybXJtWRpcmVjdGl2ZUluamVjdChEaXJlY3Rpb25hbGl0eSwgOCkpOyB9OwogICAgQ2RrU2Nyb2xsYWJsZS7JtWRpciA9IMm1ybVkZWZpbmVEaXJlY3Rpdm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MgVmlld3BvcnRSdWxlciB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBfcGxhdGZvcm0KICAgICAgICAgKiBAcGFyYW0gez99IG5nWm9uZQogICAgICAgICAqIEBwYXJhbSB7Pz19IGRvY3VtZW50CiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoX3BsYXRmb3JtLCBuZ1pvbmUsIAogICAgICAgIC8qKiBAYnJlYWtpbmctY2hhbmdlIDExLjAuMCBtYWtlIGRvY3VtZW50IHJlcXVpcmVkICovCiAgICAgICAgZG9jdW1lbnQpIHsKICAgICAgICAgICAgdGhpcy5fcGxhdGZvcm0gPSBfcGxhdGZvcm07CiAgICAgICAgICAgIHRoaXMuX2RvY3VtZW50ID0gZG9jdW1lbnQ7CiAgICAgICAgICAgIG5nWm9uZS5ydW5PdXRzaWRlQW5ndWxhcigoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCB3aW5kb3cgPSB0aGlzLl9nZXRXaW5kb3coKTsKICAgICAgICAgICAgICAgIHRoaXMuX2NoYW5nZSA9IF9wbGF0Zm9ybS5pc0Jyb3dzZXIgPwogICAgICAgICAgICAgICAgICAgIG1lcmdlKGZyb21FdmVudCh3aW5kb3csICdyZXNpemUnKSwgZnJvbUV2ZW50KHdpbmRvdywgJ29yaWVudGF0aW9uY2hhbmdlJykpIDoKICAgICAgICAgICAgICAgICAgICBvZigpOwogICAgICAgICAgICAgICAgLy8gTm90ZSB0aGF0IHdlIG5lZWQgdG8gZG8gdGhlIHN1YnNjcmlwdGlvbiBpbnNpZGUgYHJ1bk91dHNpZGVBbmd1bGFyYAogICAgICAgICAgICAgICAgLy8gc2luY2Ugc3Vic2NyaWJpbmcgaXMgd2hhdCBjYXVzZXMgdGhlIGV2ZW50IGxpc3RlbmVyIHRvIGJlIGFkZGVkLgogICAgICAgICAgICAgICAgdGhpcy5faW52YWxpZGF0ZUNhY2hlID0gdGhpcy5jaGFuZ2UoKS5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gdGhpcy5fdXBkYXRlVmlld3BvcnRTaXplKCkpKTsKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25EZXN0cm95KCkgewogICAgICAgICAgICB0aGlzLl9pbnZhbGlkYXRlQ2FjaGUudW5zdWJzY3JpYmUoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0dXJucyB0aGUgdmlld3BvcnQncyB3aWR0aCBhbmQgaGVpZ2h0LgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0Vmlld3BvcnRTaXplKCkgewogICAgICAgICAgICBpZiAoIXRoaXMuX3ZpZXdwb3J0U2l6ZSkgewogICAgICAgICAgICAgICAgdGhpcy5fdXBkYXRlVmlld3BvcnRTaXplKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBvdXRwdXQgPSB7IHdpZHRoOiB0aGlzLl92aWV3cG9ydFNpemUud2lkdGgsIGhlaWdodDogdGhpcy5fdmlld3BvcnRTaXplLmhlaWdodCB9OwogICAgICAgICAgICAvLyBJZiB3ZSdyZSBub3Qgb24gYSBicm93c2VyLCBkb24ndCBjYWNoZSB0aGUgc2l6ZSBzaW5jZSBpdCdsbCBiZSBtb2NrZWQgb3V0IGFueXdheS4KICAgICAgICAgICAgaWYgKCF0aGlzLl9wbGF0Zm9ybS5pc0Jyb3dzZXIpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3ZpZXdwb3J0U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bnRFbGVtZW50IGluc3RlYWQgb2YgdGhlIGJvZHkgYmVjYXVzZSwgYnkgZGVmYXVsdCAod2l0aG91dCBhIGNzcyByZXNldCkKICAgICAgICAgICAgLy8gYnJvd3NlcnMgdHlwaWNhbGx5IGdpdmUgdGhlIGRvY3VtZW50IGJvZHkgYW4gOHB4IG1hcmdpbiwgd2hpY2ggaXMgbm90IGluY2x1ZGVkIGluCiAgICAgICAgICAgIC8vIGdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLgogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHNjcm9sbFBvc2l0aW9uID0gdGhpcy5nZXRWaWV3cG9ydFNjcm9sbFBvc2l0aW9uKCk7CiAgICAgICAgICAgIGNvbnN0IHsgd2lkdGgsIGhlaWdodCB9ID0gdGhpcy5nZXRWaWV3cG9ydFNpemUoKTsKICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIHRvcDogc2Nyb2xsUG9zaXRpb24udG9wLAogICAgICAgICAgICAgICAgbGVmdDogc2Nyb2xsUG9zaXRpb24ubGVmdCwKICAgICAgICAgICAgICAgIGJvdHRvbTogc2Nyb2xsUG9zaXRpb24udG9wICsgaGVpZ2h0LAogICAgICAgICAgICAgICAgcmlnaHQ6IHNjcm9sbFBvc2l0aW9uLmxlZnQgKyB3aWR0aCwKICAgICAgICAgICAgICAgIGhlaWdodCwKICAgICAgICAgICAgICAgIHdpZHRoLAogICAgICAgICAgICB9OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIHRoZSAodG9wLCBsZWZ0KSBzY3JvbGwgcG9zaXRpb24gb2YgdGhlIHZpZXdwb3J0LgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0Vmlld3BvcnRTY3JvbGxQb3NpdGlvbigpIHsKICAgICAgICAgICAgLy8gV2hpbGUgd2UgY2FuIGdldCBhIHJlZmVyZW5jZSB0byB0aGU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tLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgY2hhbmdlKHRocm90dGxlVGltZSA9IERFRkFVTFRfUkVTSVpFX1RJTUUpIHsKICAgICAgICAgICAgcmV0dXJuIHRocm90dGxlVGltZSA+IDAgPyB0aGlzLl9jaGFuZ2UucGlwZShhdWRpdFRpbWUodGhyb3R0bGVUaW1lKSkgOiB0aGlzLl9jaGFuZ2U7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEFjY2VzcyBpbmplY3RlZCBkb2N1bWVudCBpZiBhdmFpbGFibGUgb3IgZmFsbGJhY2sgdG8gZ2xvYmFsIGRvY3VtZW50IHJlZmVyZW5jZQogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZ2V0RG9jdW1lbnQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9kb2N1bWVudCB8fCBkb2N1bWVudDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVXNlIGRlZmF1bHRWaWV3IG9mIGluamVjdGVkIGRvY3VtZW50IGlmIGF2YWlsYWJsZSBvciBmYWxsYmFjayB0byBnbG9iYWwgd2luZG93IHJlZmVyZW5jZQogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZ2V0V2luZG93KCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGRvYyA9IHRoaXMuX2dldERvY3VtZW50KCk7CiAgICAgICAgICAgIHJldHVybiBkb2MuZGVmYXVsdFZpZXcgfHwgd2luZG93OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBVcGRhdGVzIHRoZSBjYWNoZWQgdmlld3BvcnQgc2l6ZS4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAg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jb21lIGF0IGEgY29zdCB0bwogICAgICAgICAgICAvLyBwZXJmb3JtYW5jZS4KICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEVtaXRzIHdoZW4gdGhlIGluZGV4IG9mIHRoZSBmaXJzdCBlbGVtZW50IHZpc2libGUgaW4gdGhlIHZpZXdwb3J0IGNoYW5nZXMuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLnNjcm9sbGVkSW5kZXhDaGFuZ2UgPSBuZXcgT2JzZXJ2YWJsZSgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gb2JzZXJ2ZXIKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChvYnNlcnZlcikgPT4gdGhpcy5fc2Nyb2xsU3RyYXRlZ3kuc2Nyb2xsZWRJbmRleENoYW5nZS5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGluZGV4CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBpbmRleCA9PiBQcm9taXNlLnJlc29sdmUoKS50aGVuKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHRoaXMubmdab25lLnJ1bigoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiBvYnNlcnZlci5uZXh0KGluZGV4KSkpKSkpKSkpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQSBzdHJlYW0gdGhhdCBlbWl0cyB3aGVuZXZlciB0aGUgcmVuZGVyZWQgcmFuZ2UgY2hhbmdlcy4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMucmVuZGVyZWRSYW5nZVN0cmVhbSA9IHRoaXMuX3JlbmRlcmVkUmFuZ2VTdWJqZWN0LmFzT2JzZXJ2YWJsZSgpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogVGhlIHRvdGFsIHNpemUgb2YgYWxsIGNvbnRlbnQgKGluIHBpeGVscyksIGluY2x1ZGluZyBjb250ZW50IHRoYXQgaXMgbm90IGN1cnJlbnRseSByZW5kZXJlZC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX3RvdGFsQ29udGVudFNpemUgPSAwOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQSBzdHJpbmcgcmVwcmVzZW50aW5nIHRoZSBgc3R5bGUud2lkdGhgIHByb3BlcnR5IHZhbHVlIHRvIGJlIHVzZWQgZm9yIHRoZSBzcGFjZXIgZWxlbWVudC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX3RvdGFsQ29udGVudFdpZHRoID0gJyc7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBBIHN0cmluZyByZXByZXNlbnRpbmcgdGhlIGBzdHlsZS5oZWlnaHRgIHByb3BlcnR5IHZhbHVlIHRvIGJlIHVzZWQgZm9yIHRoZSBzcGFjZXIgZWxlbWVudC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX3RvdGFsQ29udGVudEhlaWdodCA9ICcnOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogVGhlIGN1cnJlbnRseSByZW5kZXJlZCByYW5nZSBvZiBpbmRpY2VzLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fcmVuZGVyZWRSYW5nZSA9IHsgc3RhcnQ6IDAsIGVuZDogMCB9OwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogVGhlIGxlbmd0aCBvZiB0aGUgZGF0YSBib3VuZCB0byB0aGlzIHZpZXdwb3J0IChpbiBudW1iZXIgb2YgaXRlbXMpLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fZGF0YUxlbmd0aCA9IDA7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBUaGUgc2l6ZSBvZiB0aGUgdmlld3BvcnQgKGluIHBpeGVscykuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl92aWV3cG9ydFNpemUgPSAwOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogVGhlIGxhc3QgcmVuZGVyZWQgY29udGVudCBvZmZzZXQgdGhhdCB3YXMgc2V0LgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fcmVuZGVyZWRDb250ZW50T2Zmc2V0ID0gMDsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFdoZXRoZXIgdGhlIGxhc3QgcmVuZGVyZWQgY29udGVudCBvZmZzZXQgd2FzIHRvIHRoZSBlbmQgb2YgdGhlIGNvbnRlbnQgKGFuZCB0aGVyZWZvcmUgbmVlZHMgdG8KICAgICAgICAgICAgICogYmUgcmV3cml0dGVuIGFzIGFuIG9mZnNldCB0byB0aGUgc3RhcnQgb2YgdGhlIGNvbnRlbnQpLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fcmVuZGVyZWRDb250ZW50T2Zmc2V0TmVlZHNSZXdyaXRlID0gZmFsc2U7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBXaGV0aGVyIHRoZXJlIGlzIGEgcGVuZGluZyBjaGFuZ2UgZGV0ZWN0aW9uIGN5Y2xlLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5faXNDaGFuZ2VEZXRlY3Rpb25QZW5kaW5nID0gZmFsc2U7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBBIGxpc3Qgb2YgZnVuY3Rpb25zIHRvIHJ1biBhZnRlciB0aGUgbmV4dCBjaGFuZ2UgZGV0ZWN0aW9uIGN5Y2xlLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fcnVuQWZ0ZXJDaGFuZ2VEZXRlY3Rpb24gPSBbXTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFN1YnNjcmlwdGlvbiB0byBjaGFuZ2VzIGluIHRoZSB2aWV3cG9ydCBzaXplLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fdmlld3BvcnRDaGFuZ2VzID0gU3Vic2NyaXB0aW9uLkVNUFRZOwogICAgICAgICAgICBpZiAoIV9zY3JvbGxTdHJhdGVneSkgewogICAgICAgICAgICAgICAgdGhyb3cgRXJyb3IoJ0Vycm9yOiBjZGstdmlydHVhbC1zY3JvbGwtdmlld3BvcnQgcmVxdWlyZXMgdGhlICJpdGVtU2l6ZSIgcHJvcGVydHkgdG8gYmUgc2V0LicpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIEBicmVha2luZy1jaGFuZ2UgMTEuMC4wIFJlbW92ZSBudWxsIGNoZWNrIGZvciBgdmlld3BvcnRSdWxlcmAuCiAgICAgICAgICAgIGlmICh2aWV3cG9ydFJ1bGVyKSB7CiAgICAgICAgICAgICAgICB0aGlzLl92aWV3cG9ydENoYW5nZXMgPSB2aWV3cG9ydFJ1bGVyLmNoYW5nZSgpLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5jaGVja1ZpZXdwb3J0U2l6ZSgpOwogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBkaXJlY3Rpb24gdGhlIHZpZXdwb3J0IHNjcm9sbHMuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgb3JpZW50YXRpb24oKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9vcmllbnRhdGlvbjsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBvcmllbnRhdGlvbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IG9yaWVudGF0aW9uKG9yaWVudGF0aW9uKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9vcmllbnRhdGlvbiAhPT0gb3JpZW50YXRpb24pIHsKICAgICAgICAgICAgICAgIHRoaXMuX29yaWVudGF0aW9uID0gb3JpZW50YXRpb247CiAgICAgICAgICAgICAgICB0aGlzLl9jYWxjdWxhdGVTcGFjZXJTaXplKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uSW5pdCgpIHsKICAgICAgICAgICAgc3VwZXIubmdPbkluaXQoKTsKICAgICAgICAgICAgLy8gSXQncyBzdGlsbCB0b28gZWFybHkgdG8gbWVhc3VyZSB0aGUgdmlld3BvcnQgYXQgdGhpcyBwb2ludC4gRGVmZXJyaW5nIHdpdGggYSBwcm9taXNlIGFsbG93cwogICAgICAgICAgICAvLyB0aGUgVmlld3BvcnQgdG8gYmUgcmVuZGVyZWQgd2l0aCB0aGUgY29ycmVjdCBzaXplIGJlZm9yZSB3ZSBtZWFzdXJlLiBXZSBydW4gdGhpcyBvdXRzaWRlIHRoZQogICAgICAgICAgICAvLyB6b25lIHRvIGF2b2lkIGNhdXNpbmcgbW9yZSBjaGFuZ2UgZGV0ZWN0aW9uIGN5Y2xlcy4gV2UgaGFuZGxlIHRoZSBjaGFuZ2UgZGV0ZWN0aW9uIGxvb3AKICAgICAgICAgICAgLy8gb3Vyc2VsdmVzIGluc3RlYWQuCiAgICAgICAgICAgIHRoaXMubmdab25lLnJ1bk91dHNpZGVBbmd1bGFyKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IFByb21pc2UucmVzb2x2ZSgpLnRoZW4oKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgdGhpcy5fbWVhc3VyZVZpZXdwb3J0U2l6ZSgpOwogICAgICAgICAgICAgICAgdGhpcy5fc2Nyb2xsU3RyYXRlZ3kuYXR0YWNoKHRoaXMpOwogICAgICAgICAgICAgICAgdGhpcy5lbGVtZW50U2Nyb2xsZWQoKQogICAgICAgICAgICAgICAgICAgIC5waXBlKAogICAgICAgICAgICAgICAgLy8gU3RhcnQgb2ZmIHdpdGggYSBmYWtlIHNjcm9sbCBldmVudCBzbyB3ZSBwcm9wZXJseSBkZXRlY3Qgb3VyIGluaXRpYWwgcG9zaXRpb24uCiAgICAgICAgICAgICAgICBzdGFydFdpdGgoKC8qKiBAdHlwZSB7P30gKi8gKG51bGwpKSksIAogICAgICAgICAgICAgICAgLy8gQ29sbGVjdCBtdWx0aXBsZSBldmVudHMgaW50byBvbmUgdW50aWwgdGhlIG5leHQgYW5pbWF0aW9uIGZyYW1lLiBUaGlzIHdheSBpZgogICAgICAgICAgICAgICAgLy8gdGhlcmUgYXJlIG11bHRpcGxlIHNjcm9sbCBldmVudHMgaW4gdGhlIHNhbWUgZnJhbWUgd2Ugb25seSBuZWVkIHRvIHJlY2hlY2sKICAgICAgICAgICAgICAgIC8vIG91ciBsYXlvdXQgb25jZS4KICAgICAgICAgICAgICAgIGF1ZGl0VGltZSgwLCBTQ1JPTExfU0NIRURVTEVSKSkKICAgICAgICAgICAgICAgICAgICAuc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHRoaXMuX3Njcm9sbFN0cmF0ZWd5Lm9uQ29udGVudFNjcm9sbGVkKCkpKTsKICAgICAgICAgICAgICAgIHRoaXMuX21hcmtDaGFuZ2VEZXRlY3Rpb25OZWVkZWQoKTsKICAgICAgICAgICAgfSkpKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCi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lY3Rpb24gbG9vcCBvdXJzZWx2ZXMuCiAgICAgICAgICAgIHRoaXMubmdab25lLnJ1bk91dHNpZGVBbmd1bGFyKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuX2Zvck9mID0gZm9yT2Y7CiAgICAgICAgICAgICAgICB0aGlzLl9mb3JPZi5kYXRhU3RyZWFtLnBpcGUodGFrZVVudGlsKHRoaXMuX2RldGFjaGVkU3ViamVjdCkpLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGRhdGEKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIGRhdGEgPT4gewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBuZXdMZW5ndGggPSBkYXRhLmxlbmd0aDsKICAgICAgICAgICAgICAgICAgICBpZiAobmV3TGVuZ3RoICE9PSB0aGlzLl9kYXRhTGVuZ3RoKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2RhdGFMZW5ndGggPSBuZXdMZW5ndGg7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3Njcm9sbFN0cmF0ZWd5Lm9uRGF0YUxlbmd0aENoYW5nZWQoKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fZG9DaGFuZ2VEZXRlY3Rpb24oKTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBEZXRhY2hlcyB0aGUgY3VycmVudCBgQ2RrVmlydHVhbEZvck9mYC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGRldGFjaCgpIHsKICAgICAg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IHdoYXRzIGFjdHVhbGx5IGluIHRoZSBET00uCiAgICAgICAgLyoqCiAgICAgICAgICogR2V0IHRoZSBjdXJyZW50IHJlbmRlcmVkIHJhbmdlIG9mIGl0ZW1zLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0UmVuZGVyZWRSYW5nZSgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3JlbmRlcmVkUmFuZ2U7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgdGhlIHRvdGFsIHNpemUgb2YgYWxsIGNvbnRlbnQgKGluIHBpeGVscyksIGluY2x1ZGluZyBjb250ZW50IHRoYXQgaXMgbm90IGN1cnJlbnRseQogICAgICAgICAqIHJlbmRlcmVkLgogICAgICAgICAqIEBwYXJhbSB7P30gc2l6ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0VG90YWxDb250ZW50U2l6ZShzaXplKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl90b3RhbENvbnRlbnRTaXplICE9PSBzaXplKSB7CiAgICAgICAgICAgICAgICB0aGlzLl90b3RhbENvbnRlbnRTaXplID0gc2l6ZTsKICAgICAgICAgICAgICAgIHRoaXMuX2NhbGN1bGF0ZVNwYWNlclNpemUoKTsKICAgICAgICAgICAgICAgIHRoaXMuX21hcmtDaGFuZ2VEZXRlY3Rpb25OZWVkZWQoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIHRoZSBjdXJyZW50bHkgcmVuZGVyZWQgcmFuZ2Ugb2YgaW5kaWNlcy4KICAgICAgICAgKiBAcGFyYW0gez99IHJhbmdlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXRSZW5kZXJlZFJhbmdlKHJhbmdlKSB7CiAgICAgICAgICAgIGlmICghcmFuZ2VzRXF1YWwodGhpcy5fcmVuZGVyZWRSYW5nZSwgcmFuZ2UpKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9yZW5kZXJlZFJhbmdlU3ViamVjdC5uZXh0KHRoaXMuX3JlbmRlcmVkUmFuZ2UgPSByYW5nZSk7CiAgICAgICAgICAgICAgICB0aGlzLl9tYXJrQ2hhbmdlRGV0ZWN0aW9uTmVlZGVkKCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHRoaXMuX3Njcm9sbFN0cmF0ZWd5Lm9uQ29udGVudFJlbmRlcmVkKCkpKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIHRoZSBvZmZzZXQgZnJvbSB0aGUgc3RhcnQgb2YgdGhlIHZpZXdwb3J0IHRvIHRoZSBzdGFydCBvZiB0aGUgcmVuZGVyZWQgZGF0YSAoaW4gcGl4ZWxzKS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldE9mZnNldFRvUmVuZGVyZWRDb250ZW50U3RhcnQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9yZW5kZXJlZENvbnRlbnRPZmZzZXROZWVkc1Jld3JpdGUgPyBudWxsIDogdGhpcy5fcmVuZGVyZWRDb250ZW50T2Zmc2V0OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIHRoZSBvZmZzZXQgZnJvbSB0aGUgc3RhcnQgb2YgdGhlIHZpZXdwb3J0IHRvIGVpdGhlciB0aGUgc3RhcnQgb3IgZW5kIG9mIHRoZSByZW5kZXJlZCBkYXRhCiAgICAgICAgICogKGluIHBpeGVscykuCiAgICAgICAgICogQHBhcmFtIHs/fSBvZmZzZXQKICAgICAgICAgKiBAcGFyYW0gez89fSB0bwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0UmVuZGVyZWRDb250ZW50T2Zmc2V0KG9mZnNldCwgdG8gPSAndG8tc3RhcnQnKSB7CiAgICAgICAgICAgIC8vIEZvciBhIGhvcml6b250YWwgdmlld3BvcnQgaW4gYSByaWdodC10by1sZWZ0IGxhbmd1YWdlIHdlIG5lZWQgdG8gdHJhbnNsYXRlIGFsb25nIHRoZSB4LWF4aXMKICAgICAgICAgICAgLy8gaW4gdGhlIG5lZ2F0aXZlIGRpcmVjdGlvbi4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBpc1J0bCA9IHRoaXMuZGlyICYmIHRoaXMuZGlyLnZhbHVlID09ICdydGwnOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGlzSG9yaXpvbnRhbCA9IHRoaXMub3JpZW50YXRpb24gPT0gJ2hvcml6b250YWwnOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGF4aXMgPSBpc0hvcml6b250YWwgPyAnWCcgOiAnWSc7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgYXhpc0RpcmVjdGlvbiA9IGlzSG9yaXpvbnRhbCAmJiBpc1J0bCA/IC0xIDogMTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgdHJhbnNmb3JtID0gYHRyYW5zbGF0ZSR7YXhpc30oJHtOdW1iZXIoYXhpc0RpcmVjdGlvbiAqIG9mZnNldCl9cHgpYDsKICAgICAgICAgICAgdGhpcy5fcmVuZGVyZWRDb250ZW50T2Zmc2V0ID0gb2Zmc2V0OwogICAgICAgICAgICBpZiAodG8gPT09ICd0by1lbmQnKSB7CiAgICAgICAgICAgICAgICB0cmFuc2Zvcm0gKz0gYCB0cmFuc2xhdGUke2F4aXN9KC0xMDAlKWA7CiAgICAgICAgICAgICAgICAvLyBUaGUgdmlld3BvcnQgc2hvdWxkIHJld3JpdGUgdGhpcyBhcyBhIGB0by1zdGFydGAgb2Zmc2V0IG9uIHRoZSBuZXh0IHJlbmRlciBjeWNsZS4gT3RoZXJ3aXNlCiAgICAgICAgICAgICAgICAvLyBlbGVtZW50cyB3aWxsIGFwcGVhciB0byBleHBhbmQgaW4gdGhlIHdyb25nIGRpcmVjdGlvbiAoZS5nLiBgbWF0LWV4cGFuc2lvbi1wYW5lbGAgd291bGQKICAgICAgICAgICAgICAgIC8vIGV4cGFuZCB1cHdhcmQpLgogICAgICAgICAgICAgICAgdGhpcy5fcmVuZGVyZWRDb250ZW50T2Zmc2V0TmVlZHNSZXdyaXRlID0gdHJ1ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5fcmVuZGVyZWRDb250ZW50VHJhbnNmb3JtICE9IHRyYW5zZm9ybSkgewogICAgICAgICAgICAgICAgLy8gV2Uga25vdyB0aGlzIHZhbHVlIGlzIHNhZmUgYmVjYXVzZSB3ZSBwYXJzZSBgb2Zmc2V0YCB3aXRoIGBOdW1iZXIoKWAgYmVmb3JlIHBhc3NpbmcgaXQKICAgICAgICAgICAgICAgIC8vIGludG8gdGhlIHN0cmluZy4KICAgICAgICAgICAgICAgIHRoaXMuX3JlbmRlcmVkQ29udGVudFRyYW5zZm9ybSA9IHRyYW5zZm9ybTsKICAgICAgICAgICAgICAgIHRoaXMuX21hcmtDaGFuZ2VEZXRlY3Rpb25OZWVkZWQoKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLl9yZW5kZXJlZENvbnRlbnRPZmZzZXROZWVkc1Jld3JpdGUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fcmVuZGVyZWRDb250ZW50T2Zmc2V0IC09IHRoaXMubWVhc3VyZVJlbmRlcmVkQ29udGVudFNpemUoKTsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpc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cm9sbFRvT2Zmc2V0KG9mZnNldCwgYmVoYXZpb3IgPSAnYXV0bycpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBvcHRpb25zID0geyBiZWhhdmlvciB9OwogICAgICAgICAgICBpZiAodGhpcy5vcmllbnRhdGlvbiA9PT0gJ2hvcml6b250YWwnKSB7CiAgICAgICAgICAgICAgICBvcHRpb25zLnN0YXJ0ID0gb2Zmc2V0OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgb3B0aW9ucy50b3AgPSBvZmZzZXQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5zY3JvbGxUbyhvcHRpb25zKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU2Nyb2xscyB0byB0aGUgb2Zmc2V0IGZvciB0aGUgZ2l2ZW4gaW5kZXguCiAgICAgICAgICogQHBhcmFtIHs/fSBpbmRleCBUaGUgaW5kZXggb2YgdGhlIGVsZW1lbnQgdG8gc2Nyb2xsIHRvLgogICAgICAgICAqIEBwYXJhbSB7Pz19IGJlaGF2aW9yIFRoZSBTY3JvbGxCZWhhdmlvciB0byB1c2Ugd2hlbiBzY3JvbGxpbmcuIERlZmF1bHQgaXMgYmVoYXZpb3IgaXMgYGF1dG9gLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2Nyb2xsVG9JbmRleChpbmRleCwgYmVoYXZpb3IgPSAnYXV0bycpIHsKICAgICAgICAgICAgdGhpcy5fc2Nyb2xsU3RyYXRlZ3kuc2Nyb2xsVG9JbmRleChpbmRleCwgYmVoYXZpb3IpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIHRoZSBjdXJyZW50IHNjcm9sbCBvZmZzZXQgZnJvbSB0aGUgc3RhcnQgb2YgdGhlIHZpZXdwb3J0IChpbiBwaXhlbHMpLgogICAgICAgICAqIEBwYXJhbSB7Pz19IGZyb20gVGhlIGVkZ2UgdG8gbWVhc3VyZSB0aGUgb2Zmc2V0IGZyb20uIERlZmF1bHRzIHRvICd0b3AnIGluIHZlcnRpY2FsIG1vZGUgYW5kICdzdGFydCcKICAgICAgICAgKiAgICAgaW4gaG9yaXpvbnRhbCBtb2RlLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbWVhc3VyZVNjcm9sbE9mZnNldChmcm9tKSB7CiAgICAgICAgICAgIHJldHVybiBmcm9tID8KICAgICAgICAgICAgICAgIHN1cGVyLm1lYXN1cmVTY3JvbGxPZmZzZXQoZnJvbSkgOgogICAgICAgICAgICAgICAgc3VwZXIubWVhc3VyZVNjcm9sbE9mZnNldCh0aGlzLm9yaWVudGF0aW9uID09PSAnaG9yaXpvbnRhbCcgPyAnc3RhcnQnIDogJ3RvcCcpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBNZWFzdXJlIHRoZSBjb21iaW5lZCBzaXplIG9mIGFsbCBvZiB0aGUgcmVuZGVyZWQgaXRlbXMuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBtZWFzdXJlUmVuZGVyZWRDb250ZW50U2l6ZSgpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjb250ZW50RWwgPSB0aGlzLl9jb250ZW50V3JhcHBlci5uYXRpdmVFbGVtZW50OwogICAgICAgICAgICByZXR1cm4gdGhpcy5vcmllbnRhdGlvbiA9PT0gJ2hvcml6b250YWwnID8gY29udGVudEVsLm9mZnNldFdpZHRoIDogY29udGVudEVsLm9mZnNldEhlaWdodDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogTWVhc3VyZSB0aGUgdG90YWwgY29tYmluZWQgc2l6ZSBvZiB0aGUgZ2l2ZW4gcmFuZ2UuIFRocm93cyBpZiB0aGUgcmFuZ2UgaW5jbHVkZXMgaXRlbXMgdGhhdCBhcmUKICAgICAgICAgKiBub3QgcmVuZGVyZWQuCiAgICAgICAgICogQHBhcmFtIHs/fSByYW5nZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbWVhc3VyZVJhbmdlU2l6ZShyYW5nZSkgewogICAgICAgICAgICBpZiAoIXRoaXMuX2Zvck9mKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gMDsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpcy5fZm9yT2YubWVhc3VyZVJhbmdlU2l6ZShyYW5nZSwgdGhpcy5vcmllbnRhdGlvbik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFVwZGF0ZSB0aGUgdmlld3BvcnQgZGltZW5zaW9ucyBhbmQgcmUtcmVuZGVyLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgY2hlY2tWaWV3cG9ydFNpemUoKSB7CiAgICAgICAgICAgIC8vIFRPRE86IENsZWFudXAgbGF0ZXIgd2hlbiBhZGQgbG9naWMgZm9yIGhhbmRsaW5nIGNvbnRlbnQgcmVzaXplCiAgICAgICAgICAgIHRoaXMuX21lYXN1cmVWaWV3cG9ydFNpemUoKTsKICAgICAgICAgICAgdGhpcy5fc2Nyb2xsU3RyYXRlZ3kub25EYXRhTGVuZ3RoQ2hhbmdlZCgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBNZWFzdXJlIHRoZSB2aWV3cG9ydCBzaXplLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfbWVhc3VyZVZpZXdwb3J0U2l6ZSgpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB2aWV3cG9ydEVsID0gdGhpcy5lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQ7CiAgICAgICAgICAgIHRoaXMuX3ZpZXdwb3J0U2l6ZSA9IHRoaXMub3JpZW50YXRpb24gPT09ICdob3Jpem9udGFsJyA/CiAgICAgICAgICAgICAgICB2aWV3cG9ydEVsLmNsaWVudFdpZHRoIDogdmlld3BvcnRFbC5jbGllbnRIZWlnaHQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFF1ZXVlIHVwIGNoYW5nZSBkZXRlY3Rpb24gdG8gcnVuLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/PX0gcnVuQWZ0ZXIKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9tYXJrQ2hhbmdlRGV0ZWN0aW9uTmVlZGVkKHJ1bkFmdGVyKSB7CiAgICAgICAgICAgIGlmIChydW5BZnRlcikgewogICAgICAgICAgICAgICAgdGhpcy5fcnVuQWZ0ZXJDaGFuZ2VEZXRlY3Rpb24ucHVzaChydW5BZnRlcik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gVXNlIGEgUHJvbWlzZSB0byBiYXRjaCB0b2dldGhlciBjYWxscyB0byBgX2RvQ2hhbmdlRGV0ZWN0aW9uYC4gVGhpcyB3YXkgaWYgd2Ugc2V0IGEgYnVuY2ggb2YKICAgICAgICAgICAgLy8gcHJvcGVydGllcyBzZXF1ZW50aWFsbHkgd2Ugb25seSBoYXZlIHRvIHJ1biBgX2RvQ2hhbmdlRGV0ZWN0aW9uYCBvbmNlIGF0IHRoZSBlbmQuCiAgICAgICAgICAgIGlmICghdGhpcy5faXNDaGFuZ2VEZXRlY3Rpb25QZW5kaW5nKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9pc0NoYW5nZURldGVjdGlvblBlbmRpbmcgPSB0cnVlOwogICAgICAgICAgICAgICAgdGhpcy5uZ1pvbmUucnVuT3V0c2lkZUFuZ3VsYXIoKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gUHJvbWlzZS5yZXNvbHZlKCkudGhlbigoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fZG9DaGFuZ2VEZXRlY3Rpb24oKTsKICAgICAgICAgICAgICAgIH0pKSkpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJ1biBjaGFuZ2UgZGV0ZWN0aW9uLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZG9DaGFuZ2VEZXRlY3Rpb24oKSB7CiAgICAgICAgICAgIHRoaXMuX2lzQ2hhbmdlRGV0ZWN0aW9uUGVuZGluZyA9IGZhbHNlOwogICAgICAgICAgICAvLyBBcHBseSB0aGUgY29udGVudCB0cmFuc2Zvcm0uIFRoZSB0cmFuc2Zvcm0gY2FuJ3QgYmUgc2V0IHZpYSBhbiBBbmd1bGFyIGJpbmRpbmcgYmVjYXVzZQogICAgICAgICAgICAvLyBieXBhc3NTZWN1cml0eVRydXN0U3R5bGUgaXMgYmFubmVkIGluIEdvb2dsZS4gSG93ZXZlciB0aGUgdmFsdWUgaXMgc2FmZSwgaXQncyBjb21wb3NlZCBvZgogICAgICAgICAgICAvLyBzdHJpbmcgbGl0ZXJhbHMsIGEgdmFyaWFibGUgdGhhdCBjYW4gb25seSBiZSAnWCcgb3IgJ1knLCBhbmQgdXNlciBpbnB1dCB0aGF0IGlzIHJ1biB0aHJvdWdoCiAgICAgICAgICAgIC8vIHRoZSBgTnVtYmVyYCBmdW5jdGlvbiBmaXJzdCB0byBjb2VyY2UgaXQgdG8gYSBudW1lcmljIHZhbHVlLgogICAgICAgICAgICB0aGlzLl9jb250ZW50V3JhcHBlci5uYXRpdmVFbGVtZW50LnN0eWxlLnRyYW5zZm9ybSA9IHRoaXMuX3J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IEBwYXJhbSB7P30gX3ZpZXdDb250YWluZXJSZWYKICAgICAgICAgKiBAcGFyYW0gez99IF90ZW1wbGF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gX2RpZmZlcnMKICAgICAgICAgKiBAcGFyYW0gez99IF92aWV3cG9ydAogICAgICAgICAqIEBwYXJhbSB7P30gbmdab25lCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoX3ZpZXdDb250YWluZXJSZWYsIF90ZW1wbGF0ZSwgX2RpZmZlcnMsIF92aWV3cG9ydCwgbmdab25lKSB7CiAgICAgICAgICAgIHRoaXMuX3ZpZXdDb250YWluZXJSZWYgPSBfdmlld0NvbnRhaW5lclJlZjsKICAgICAgICAgICAgdGhpcy5fdGVtcGxhdGUgPSBfdGVtcGxhdGU7CiAgICAgICAgICAgIHRoaXMuX2RpZmZlcnMgPSBfZGlmZmVyczsKICAgICAgICAgICAgdGhpcy5fdmlld3BvcnQgPSBfdmlld3BvcnQ7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBFbWl0cyB3aGVuIHRoZSByZW5kZXJlZCB2aWV3IG9mIHRoZSBkYXRhIGNoYW5nZXMuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLnZpZXdDaGFuZ2UgPSBuZXcgU3ViamVjdCgpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogU3ViamVjdCB0aGF0IGVtaXRzIHdoZW4gYSBuZXcgRGF0YVNvdXJjZSBpbnN0YW5jZSBpcyBnaXZlbi4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX2RhdGFTb3VyY2VDaGFuZ2VzID0gbmV3IFN1YmplY3QoKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFRoZSBzaXplIG9mIHRoZSBjYWNoZSB1c2VkIHRvIHN0b3JlIHRlbXBsYXRlcyB0aGF0IGFyZSBub3QgYmVpbmcgdXNlZCBmb3IgcmUtdXNlIGxhdGVyLgogICAgICAgICAg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d2hhdGV2ZXIgdGhlIGN1cnJlbnQgYERhdGFTb3VyY2VgIGlzLgogICAgICAgICAgICBzd2l0Y2hNYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKFtwcmV2LCBjdXJdKSA9PiB0aGlzLl9jaGFuZ2VEYXRhU291cmNlKHByZXYsIGN1cikpKSwgCiAgICAgICAgICAgIC8vIFJlcGxheSB0aGUgbGFzdCBlbWl0dGVkIGRhdGEgd2hlbiBzb21lb25lIHN1YnNjcmliZXMuCiAgICAgICAgICAgIHNoYXJlUmVwbGF5KDEpKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFRoZSBkaWZmZXIgdXNlZCB0byBjYWxjdWxhdGUgY2hhbmdlcyB0byB0aGUgZGF0YS4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX2RpZmZlciA9IG51bGw7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBUaGUgdGVtcGxhdGUgY2FjaGUgdXNlZCB0byBob2xkIG9uIG90IHRlbXBsYXRlIGluc3RhbmNlc3MgdGhhdCBoYXZlIGJlZW4gc3RhbXBlZCBvdXQsIGJ1dCBkb24ndAogICAgICAgICAgICAgKiBjdXJyZW50bHkgbmVlZCB0byBiZSByZW5kZXJlZC4gVGhlc2UgaW5zdGFuY2VzIHdpbGwgYmUgcmV1c2VkIGluIHRoZSBmdXR1cmUgcmF0aGVyIHRoYW4KICAgICAgICAgICAgICogc3RhbXBpbmcgb3V0IGJyYW5kIG5ldyBvbmVzLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fdGVtcGxhdGVDYWNoZSA9IFtdOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogV2hldGhlciB0aGUgcmVuZGVyZWQgZGF0YSBzaG91bGQgYmUgdXBkYXRlZCBkdXJpbmcgdGhlIG5leHQgbmdEb0NoZWNrIGN5Y2xlLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fbmVlZHNVcGRhdGUgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5fZGVzdHJveWVkID0gbmV3IFN1YmplY3QoKTsKICAgICAgICAgICAgdGhpcy5kYXRhU3RyZWFtLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZGF0YQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZGF0YSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLl9kYXRhID0gZGF0YTsKICAgICAgICAgICAgICAgIHRoaXMuX29uUmVuZGVyZWREYXRhQ2hhbmdlKCk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgdGhpcy5fdmlld3BvcnQucmVuZGVyZWRSYW5nZVN0cmVhbS5waXBlKHRha2VVbnRpbCh0aGlzLl9kZXN0cm95ZWQpKS5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHJhbmdlCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICByYW5nZSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLl9yZW5kZXJlZFJhbmdlID0gcmFuZ2U7CiAgICAgICAgICAgICAgICBuZ1pvbmUucnVuKCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHRoaXMudmlld0NoYW5nZS5uZXh0KHRoaXMuX3JlbmRlcmVkUmFuZ2UpKSk7CiAgICAgICAgICAgICAgICB0aGlzLl9vblJlbmRlcmVkRGF0YUNoYW5nZSgpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIHRoaXMuX3ZpZXdwb3J0LmF0dGFjaCh0aGlzKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIERhdGFTb3VyY2UgdG8gZGlzcGxheS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBjZGtWaXJ0dWFsRm9yT2YoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9jZGtWaXJ0dWFsRm9yT2Y7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBjZGtWaXJ0dWFsRm9yT2YodmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5fY2RrVmlydHVhbEZvck9mID0gdmFsdWU7CiAgICAgICAgICAgIGlmIChpc0RhdGFTb3VyY2UodmFsdWUpKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9kYXRhU291cmNlQ2hhbmdlcy5uZXh0KHZhbHVlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIC8vIFNsaWNlIHRoZSB2YWx1ZSBpZiBpdHMgYW4gTmdJdGVyYWJsZSB0byBlbnN1cmUgd2UncmUgd29ya2luZyB3aXRoIGFuIGFycmF5LgogICAgICAgICAgICAgICAgdGhpcy5fZGF0YVNvdXJjZUNoYW5nZXMubmV4dChuZXcgQXJyYXlEYXRhU291cmNlKGlzT2JzZXJ2YWJsZSh2YWx1ZSkgPyB2YWx1ZSA6IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKHZhbHVlIHx8IFtdKSkpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBgVHJhY2tCeUZ1bmN0aW9uYCB0byB1c2UgZm9yIHRyYWNraW5nIGNoYW5nZXMuIFRoZSBgVHJhY2tCeUZ1bmN0aW9uYCB0YWtlcyB0aGUgaW5kZXggYW5kCiAgICAgICAgICogdGhlIGl0ZW0gYW5kIHByb2R1Y2VzIGEgdmFsdWUgdG8gYmUgdXNlZCBhcyB0aGUgaXRlbSdzIGlkZW50aXR5IHdoZW4gdHJhY2tpbmcgY2hhbmdlcy4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBjZGtWaXJ0dWFsRm9yVHJhY2tCeSgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2Nka1ZpcnR1YWxGb3JUcmFja0J5OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGZuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgY2RrVmlydHVhbEZvclRyYWNrQnkoZm4pIHsKICAgICAgICAgICAgdGhpcy5fbmVlZHNVcGRhdGUgPSB0cnVlOwogICAgICAgICAgICB0aGlzLl9jZGtWaXJ0dWFsRm9yVHJhY2tCeSA9IGZuID8KICAgICAgICAgICAgICAgICgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gaW5kZXgKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gaXRlbQogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKGluZGV4LCBpdGVtKSA9PiBmbihpbmRleCArICh0aGlzLl9yZW5kZXJlZFJhbmdlID8gdGhpcy5fcmVuZGVyZWRSYW5nZS5zdGFydCA6IDApLCBpdGVtKSkgOgogICAgICAgICAgICAgICAgdW5kZWZpbmVkOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBUaGUgdGVtcGxhdGUgdXNlZCB0byBzdGFtcCBvdXQgbmV3IGVsZW1lbnRzLgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBjZGtWaXJ0dWFsRm9yVGVtcGxhdGUodmFsdWUpIHsKICAgICAgICAgICAgaWYgKHZhbHVlKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9uZWVkc1VwZGF0ZSA9IHRydWU7CiAgICAgICAgICAgICAgICB0aGlzLl90ZW1wbGF0ZSA9IHZhbHVlOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIE1lYXN1cmVzIHRoZSBjb21iaW5lZCBzaXplICh3aWR0aCBmb3IgaG9yaXpvbnRhbCBvcmllbnRhdGlvbiwgaGVpZ2h0IGZvciB2ZXJ0aWNhbCkgb2YgYWxsIGl0ZW1zCiAgICAgICAgICogaW4gdGhlIHNwZWNpZmllZCByYW5nZS4gVGhyb3dzIGFuIGVycm9yIGlmIHRoZSByYW5nZSBpbmNsdWRlcyBpdGVtcyB0aGF0IGFyZSBub3QgY3VycmVudGx5CiAgICAgICAgICogcmVuZGVyZWQuCiAgICAgICAgICogQHBhcmFtIHs/fSByYW5nZQogICAgICAgICAqIEBwYXJhbSB7P30gb3JpZW50YXRpb24KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG1lYXN1cmVSYW5nZVNpemUocmFuZ2UsIG9yaWVudGF0aW9uKSB7CiAgICAgICAgICAgIGlmIChyYW5nZS5zdGFydCA+PSByYW5nZS5lbmQpIHsKICAgICAgICAgICAgICAgIHJldHVybiAwOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChyYW5nZS5zdGFydCA8IHRoaXMuX3JlbmRlcmVkUmFuZ2Uuc3RhcnQgfHwgcmFuZ2UuZW5kID4gdGhpcy5fcmVuZGVyZWRSYW5nZS5lbmQpIHsKICAgICAgICAgICAgICAgIHRocm93IEVycm9yKGBFcnJvcjogYXR0ZW1wdGVkIHRvIG1lYXN1cmUgYW4gaXRlbSB0aGF0IGlzbid0IHJlbmRlcmVkLmApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIFRoZSBpbmRleCBpbnRvIHRoZSBsaXN0IG9mIHJlbmRlcmVkIHZpZXdzIGZvciB0aGUgZmlyc3QgaXRlbSBpbiB0aGUgcmFuZ2UuCiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcmVuZGVyZWRTdGFydEluZGV4ID0gcmFuZ2Uuc3RhcnQgLSB0aGlzLl9yZW5kZXJlZFJhbmdlLnN0YXJ0OwogICAgICAgICAgICAvLyBUaGUgbGVuZ3RoIG9mIHRoZSByYW5nZSB3ZSdyZSBtZWFzdXJpbmcuCiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcmFuZ2VMZW4gPSByYW5nZS5lbmQgLSByYW5nZS5zdGFydDsKICAgICAgICAgICAgLy8gTG9vcCBvdmVyIGFsbCByb290IG5vZGVzIGZvciBhbGwgaXRlbXMgaW4gdGhlIHJhbmdlIGFuZCBzdW0gdXAgdGhlaXIgc2l6ZS4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgdG90YWxTaXplID0gMDsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgaSA9IHJhbmdlTGVuOwogICAgICAgICAgICB3aGlsZSAoaS0tKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCB2aWV3ID0gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX3ZpZXdDb250YWluZXJSZWYuZ2V0KGkgKyByZW5kZXJlZFN0YXJ0SW5kZXgpKSk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBsZXQgaiA9IHZpZXcgPyB2aWV3LnJvb3ROb2Rlcy5sZW5ndGggOiAwOwogICAgICAgICAgICAgICAgd2hpbGUgKGotLSkgewogICAgICAgICAgICAgICAgICAgIHRvdGFsU2l6ZSArPSBnZXRTaXplKG9yaWVudGF0aW9uLCAoLyoqIEB0eXBlIHs/fSAqLyAodmlldykpLnJvb3ROb2Rlc1tqXSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRvdGFsU2l6ZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ0RvQ2hlY2soKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9kaWZmZXIgJiYgdGhpcy5fbmVlZHNVcGRhdGUpIHsKICAgICAgICAgICAgICAgIC8vIFRPRE8obW1hbGVyYmEpOiBXZSBzaG91bGQgZGlmZmVyZW50aWF0ZSBuZWVkcyB1cGRhdGUgZHVlIHRvIHNjcm9sbGluZyBhbmQgYSBuZXcgcG9ydGlvbiBvZgogICAgICAgICAgICAgICAgLy8gdGhpcyBsaXN0IGJlaW5nIHJlbmRlcmVkIChjYW4gdXNlIHNpbXBsZXIgYWxnb3JpdGhtKSB2cyBuZWVkcyB1cGRhdGUgZHVlIHRvIGRhdGEgYWN0dWFsbHkKICAgICAgICAgICAgICAgIC8vIGNoYW5naW5nIChuZWVkIHRvIGRvIHRoaXMgZGlmZikuCiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBjaGFuZ2VzID0gdGhpcy5fZGlmZmVyLmRpZmYodGhpcy5fcmVuZGVyZWRJdGVtcyk7CiAgICAgICAgICAgICAgICBpZiAoIWNoYW5nZXMpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl91cGRhdGVDb250ZXh0KCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9hcHBseUNoYW5nZXMoY2hhbmdlcyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLl9uZWVkc1VwZGF0ZSA9IGZhbHNlOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkRlc3Ryb3koKSB7CiAgICAgICAgICAgIHRoaXMuX3ZpZXdwb3J0LmRldGFjaCgpOwogICAgICAgICAgICB0aGlzLl9kYXRhU291cmNlQ2hhbmdlcy5uZXh0KCk7CiAgICAgICAgICAgIHRoaXMuX2RhdGFTb3VyY2VDaGFuZ2VzLmNvbXBsZXRlKCk7CiAgICAgICAgICAgIHRoaXMudmlld0NoYW5nZS5jb21wbGV0ZSgpOwogICAgICAgICAgICB0aGlzLl9kZXN0cm95ZWQubmV4dCgpOwogICAgICAgICAgICB0aGlzLl9kZXN0cm95ZWQuY29tcGxldGUoKTsKICAgICAgICAgICAgZm9yIChsZXQgdmlldyBvZiB0aGlzLl90ZW1wbGF0ZUNhY2hlKSB7CiAgICAgICAgICAgICAgICB2aWV3LmRlc3Ryb3koKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZWFjdCB0byBzY3JvbGwgc3RhdGUgY2hhbmdlcyBpbiB0aGUgdmlld3BvcnQuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9vblJlbmRlcmVkRGF0YUNoYW5nZSgpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLl9yZW5kZXJlZFJhbmdlKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fcmVuZGVyZWRJdGVtcyA9IHRoaXMuX2RhdGEuc2xpY2UodGhpcy5fcmVuZGVyZWRSYW5nZS5zdGFydCwgdGhpcy5fcmVuZGVyZWRSYW5nZS5lbmQpOwogICAgICAgICAgICBpZiAoIXRoaXMuX2RpZmZlcikgewogICAgICAgICAgICAgICAgdGhpcy5fZGlmZmVyID0gdGhpcy5fZGlmZmVycy5maW5kKHRoaXMuX3JlbmRlcmVkSXRlbXMpLmNyZWF0ZSh0aGlzLmNka1ZpcnR1YWxGb3JUcmFja0J5KTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9uZWVkc1VwZGF0ZSA9IHRydWU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFN3YXAgb3V0IG9uZSBgRGF0YVNvdXJjZWAgZm9yIGFub3RoZXIuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IG9sZERzCiAgICAgICAgICogQHBhcmFtIHs/fSBuZXdEcwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2NoYW5nZURhdGFTb3VyY2Uob2xkRHMsIG5ld0RzKSB7CiAgICAgICAgICAgIGlmIChvbGREcykgewogICAgICAgICAgICAgICAgb2xkRHMuZGlzY29ubmVjdCh0aGlzKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9uZWVkc1VwZGF0ZSA9IHRydWU7CiAgICAgICAgICAgIHJldHVybiBuZXdEcyA/IG5ld0RzLmNvbm5lY3QodGhpcykgOiBvZigpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBVcGRhdGUgdGhlIGBDZGtWaXJ0dWFsRm9yT2ZDb250ZXh0YCBmb3IgYWxsIHZpZXdzLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfdXBkYXRlQ29udGV4dCgpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjb3VudCA9IHRoaXMuX2RhdGEubGVuZ3RoOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBpID0gdGhpcy5fdmlld0NvbnRhaW5lclJlZi5sZW5ndGg7CiAgICAgICAgICAgIHdoaWxlIChpLS0pIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCB2aWV3ID0gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX3ZpZXdDb250YWluZXJSZWYuZ2V0KGkpKSk7CiAgICAgICAgICAgICAgICB2aWV3LmNvbnRleHQuaW5kZXggPSB0aGlzLl9yZW5kZXJlZFJhbmdlLnN0YXJ0ICsgaTsKICAgICAgICAgICAgICAgIHZpZXcuY29udGV4dC5jb3VudCA9IGNvdW50OwogICAgICAgICAgICAgICAgdGhpcy5fdXBkYXRlQ29tcHV0ZWRDb250ZXh0UHJvcGVydGllcyh2aWV3LmNvbnRleHQpOwogICAgICAgICAgICAgICAgdmlldy5kZXRlY3RDaGFuZ2VzKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQXBwbHkgY2hhbmdlcyB0byB0aGUgRE9NLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBjaGFuZ2VzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfYXBwbHlDaGFuZ2VzKGNoYW5nZXMpIHsKICAgICAgICAgICAgLy8gUmVhcnJhbmdlIHRoZSB2aWV3cyB0byBwdXQgdGhlbSBpbiB0aGUgcmlnaHQgbG9jYXRpb24uCiAgICAgICAgICAgIGNoYW5nZXMuZm9yRWFjaE9wZXJhdGlvbigoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcmVjb3JkCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gYWRqdXN0ZWRQcmV2aW91c0luZGV4CiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY3VycmVudEluZGV4CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAocmVjb3JkLCBhZGp1c3RlZFByZXZpb3VzSW5kZXgsIGN1cnJlbnRJbmRleCkgPT4gewogICAgICAgICAgICAgICAgaWYgKHJlY29yZC5wcmV2aW91c0luZGV4ID09IG51bGwpIHsgLy8gSXRlbSBhZGRlZC4KICAgICAgICAgICAgICAgICAgICAvLyBJdGVtIGFkZGVkLgogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCB2aWV3ID0gdGhpcy5faW5zZXJ0Vmlld0Zvck5ld0l0ZW0oKC8qKiBAdHlwZSB7P30gKi8gKGN1cnJlbnRJbmRleCkpKTsKICAgICAgICAgICAgICAgICAgICB2aWV3LmNvbnRleHQuJGltcGxpY2l0ID0gcmVjb3JkLml0ZW07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmIChjdXJyZW50SW5kZXggPT0gbnVsbCkgeyAvLyBJdGVtIHJlbW92ZWQuCiAgICAgICAgICAgICAgICAgICAgdGhpcy5fY2FjaGVWaWV3KHRoaXMuX2RldGFjaFZpZXcoKC8qKiBAdHlwZSB7P30gKi8gKGFkanVzdGVkUHJldmlvdXNJbmRleCkpKSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsgLy8gSXRlbSBtb3ZlZC4KICAgICAgICAgICAgICAgICAgICAvLyBJdGVtIG1vdmVkLgogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCB2aWV3ID0gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX3ZpZXdDb250YWluZXJSZWYuZ2V0KCgvKiogQHR5cGUgez99ICovIChhZGp1c3RlZFByZXZpb3VzSW5kZXgpKSkpKTsKICAgICAgICAgICAgICAgICAgICB0aGlzLl92aWV3Q29udGFpbmVyUmVmLm1vdmUodmlldywgY3VycmVudEluZGV4KTsKICAgICAgICAgICAgICAgICAgICB2aWV3LmNvbnRleHQuJGltcGxpY2l0ID0gcmVjb3JkLml0ZW07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgLy8gVXBkYXRlICRpbXBsaWNpdCBmb3IgYW55IGl0ZW1zIHRoYXQgaGFkIGFuIGlkZW50aXR5IGNoYW5nZS4KICAgICAgICAgICAgY2hhbmdlcy5mb3JFYWNoSWRlbnRpdHlDaGFuZ2UoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHJlY29yZAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHJlY29yZCkgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgdmlldyA9ICgvKiogQHR5cGUgez99ICovICh0aGlzLl92aWV3Q29udGFpbmVyUmVmLmdldCgoLyoqIEB0eXBlIHs/fSAqLyAocmVjb3JkLmN1cnJlbnRJbmRleCkpKSkpOwogICAgICAgICAgICAgICAgdmlldy5jb250ZXh0LiRpbXBsaWNpdCA9IHJlY29yZC5pdGVtOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIC8vIFVwZGF0ZSB0aGUgY29udGV4dCB2YXJpYWJsZXMgb24gYWxsIGl0ZW1zLgogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGNvdW50ID0gdGhpcy5fZGF0YS5sZW5ndGg7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGkgPSB0aGlzLl92aWV3Q29udGFpbmVyUmVmLmxlbmd0aDsKICAgICAgICAgICAgd2hpbGUgKGktLSkgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgdmlldyA9ICgvKiogQHR5cGUgez99ICovICh0aGlzLl92aWV3Q29udGFpbmVyUmVmLmdldChpKSkpOwogICAgICAgICAgICAgICAgdmlldy5jb250ZXh0LmluZGV4ID0gdGhpcy5fcmVuZGVyZWRSYW5nZS5zdGFydCArIGk7CiAgICAgICAgICAgICAgICB2aWV3LmNvbnRleHQuY291bnQgPSBjb3VudDsKICAgICAgICAgICAgICAgIHRoaXMuX3VwZGF0ZUNvbXB1dGVkQ29udGV4dFByb3BlcnRpZXModmlldy5jb250ZXh0KTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDYWNoZSB0aGUgZ2l2ZW4gZGV0YWNoZWQgdmlldy4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gdmlldwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2NhY2hlVmlldyh2aWV3KSB7CiAgICAgICAgICAgIGlmICh0aGlzLl90ZW1wbGF0ZUNhY2hlLmxlbmd0aCA8IHRoaXMuY2RrVmlydHVhbEZvclRlbXBsYXRlQ2FjaGVTaXplKSB7CiAgICAgICAgICAgICAgICB0aGlzLl90ZW1wbGF0ZUNhY2hlLnB1c2godmlldyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBpbmRleCA9IHRoaXMuX3ZpZXdDb250YWluZXJSZWYuaW5kZXhPZih2aWV3KTsKICAgICAgICAgICAgICAgIC8vIEl0J3MgdmVyeSB1bmxpa2VseSB0aGF0IHRoZSBpbmRleCB3aWxsIGV2ZXIgYmUgLTEsIGJ1dCBqdXN0IGluIGNhc2UsCiAgICAgICAgICAgICAgICAvLyBkZXN0cm95IHRoZSB2aWV3IG9uIGl0cyBvd24sIG90aGVyd2lzZSBkZXN0cm95IGl0IHRocm91Z2ggdGhlCiAgICAgICAgICAgICAgICAvLyBjb250YWluZXIgdG8gZW5zdXJlIHRoYXQgYWxsIHRoZSByZWZlcmVuY2VzIGFyZSByZW1vdmVkLgogICAgICAgICAgICAgICAgaWYgKGluZGV4ID09PSAtMSkgewogICAgICAgICAgICAgICAgICAgIHZpZXcuZGVzdHJveSgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fdmlld0NvbnRhaW5lclJlZi5yZW1vdmUoaW5kZXgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEluc2VydHMgYSB2aWV3IGZvciBhIG5ldyBpdGVtLCBlaXRoZXIgZnJvbSB0aGUgY2FjaGUgb3IgYnkgY3JlYXRpbmcgYSBuZXcgb25lLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBpbmRleAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2luc2VydFZpZXdGb3JOZXdJdGVtKGluZGV4KSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9pbnNlcnRWaWV3RnJvbUNhY2hlKGluZGV4KSB8fCB0aGlzLl9jcmVhdGVFbWJlZGRlZFZpZXdBdChpbmRleCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFVwZGF0ZSB0aGUgY29tcHV0ZWQgcHJvcGVydGllcyBvbiB0aGUgYENka1ZpcnR1YWxGb3JPZkNvbnRleHRgLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBjb250ZXh0CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfdXBkYXRlQ29tcHV0ZWRDb250ZXh0UHJvcGVydGllcyhjb250ZXh0KSB7CiAgICAgICAgICAgIGNvbnRleHQuZmlyc3QgPSBjb250ZXh0LmluZGV4ID09PSAwOwogICAgICAgICAgICBjb250ZXh0Lmxhc3QgPSBjb250ZXh0LmluZGV4ID09PSBjb250ZXh0LmNvdW50IC0gMTsKICAgICAgICAgICAgY29udGV4dC5ldmVuID0gY29udGV4dC5pbmRleCAlIDIgPT09IDA7CiAgICAgICAgICAgIGNvbnRleHQub2RkID0gIWNvbnRleHQuZXZlbjsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAg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XJhdGUgdmlld3MgZm9yIGVsZW1lbnRzIGlmIHRoZSAiY2RrVmlydHVhbEZvck9mIiBpdGVyYWJsZSBoYXMgZWxlbWVudHMuCiAgICAgICAgICAgICAgICBjZGtWaXJ0dWFsRm9yT2Y6ICgvKiogQHR5cGUgez99ICovICh0aGlzLl9jZGtWaXJ0dWFsRm9yT2YpKSwKICAgICAgICAgICAgICAgIGluZGV4OiAtMSwKICAgICAgICAgICAgICAgIGNvdW50OiAtMSwKICAgICAgICAgICAgICAgIGZpcnN0OiBmYWxzZSwKICAgICAgICAgICAgICAgIGxhc3Q6IGZhbHNlLAogICAgICAgICAgICAgICAgb2RkOiBmYWxzZSwKICAgICAgICAgICAgICAgIGV2ZW46IGZhbHNlCiAgICAgICAgICAgIH0sIGluZGV4KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogSW5zZXJ0cyBhIHJlY3ljbGVkIHZpZXcgZnJvbSB0aGUgY2FjaGUgYXQgdGhlIGdpdmVuIGluZGV4LgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBpbmRleAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2luc2VydFZpZXdGcm9tQ2FjaGUoaW5kZXgpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjYWNoZWRWaWV3ID0gdGhpcy5fdGVtcGxhdGVDYWNoZS5wb3AoKTsKICAgICAgICAgICAgaWYgKGNhY2hlZFZpZXcpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3ZpZXdDb250YWluZXJSZWYuaW5zZXJ0KGNhY2hlZFZpZXcsIGluZGV4KTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gY2FjaGVkVmlldyB8fCBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBEZXRhY2hlcyB0aGUgZW1iZWRkZWQgdmlldyBhdCB0aGUgZ2l2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9jcy1wcml2YXRlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBfTUFUX0lOS19CQVJfUE9TSVRJT05FUl9GQUNUT1JZKCkgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBtZXRob2QgPSAoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAoZWxlbWVudCkgPT4gKHsKICAgICAgICAgICAgbGVmdDogZWxlbWVudCA/IChlbGVtZW50Lm9mZnNldExlZnQgfHwgMCkgKyAncHgnIDogJzAnLAogICAgICAgICAgICB3aWR0aDogZWxlbWVudCA/IChlbGVtZW50Lm9mZnNldFdpZHRoIHx8IDApICsgJ3B4JyA6ICcwJywKICAgICAgICB9KSk7CiAgICAgICAgcmV0dXJuIG1ldGhvZDsKICAgIH0KICAgIC8qKgogICAgICogVGhlIGluay1iYXIgaXMgdXNlZCB0byBkaXNwbGF5IGFuZCBhbmltYXRlIHRoZSBsaW5lIHVuZGVybmVhdGggdGhlIGN1cnJlbnQgYWN0aXZlIHRhYiBsYWJlbC4KICAgICAqIFxAZG9jcy1wcml2YXRlCiAgICAgKi8KICAgIGNsYXNzIE1hdElua0JhciB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBfZWxlbWVudFJlZgogICAgICAgICAqIEBwYXJhbSB7P30gX25nWm9uZQogICAgICAgICAqIEBwYXJhbSB7P30gX2lua0JhclBvc2l0aW9uZXIKICAgICAgICAgKiBAcGFyYW0gez89fSBfYW5pbWF0aW9uTW9kZQogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKF9lbGVtZW50UmVmLCBfbmdab25lLCBfaW5rQmFyUG9zaXRpb25lciwgX2FuaW1hdGlvbk1vZGUpIHsKICAgICAgICAgICAgdGhpcy5fZWxlbWVudFJlZiA9IF9lbGVtZW50UmVmOwogICAgICAgICAgICB0aGlzLl9uZ1pvbmUgPSBfbmdab25lOwogICAgICAgICAgICB0aGlzLl9pbmtCYXJQb3NpdGlvbmVyID0gX2lua0JhclBvc2l0aW9uZXI7CiAgICAgICAgICAgIHRoaXMuX2FuaW1hdGlvbk1vZGUgPSBfYW5pbWF0aW9uTW9kZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ2FsY3VsYXRlcyB0aGUgc3R5bGVzIGZyb20gdGhlIHByb3ZpZGVkIGVsZW1lbnQgaW4gb3JkZXIgdG8gYWxpZ24gdGhlIGluay1iYXIgdG8gdGhhdCBlbGVtZW50LgogICAgICAgICAqIFNob3dzIHRoZSBpbmsgYmFyIGlmIHByZXZpb3VzbHkgc2V0IGFzIGhpZGRlbi4KICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGFsaWduVG9FbGVtZW50KGVsZW1lbnQpIHsKICAgICAgICAgICAgdGhpcy5zaG93KCk7CiAgICAgICAgICAgIGlmICh0eXBlb2YgcmVxdWVzdEFuaW1hdGlvbkZyYW1lICE9PSAndW5kZWZpbmVkJykgewogICAgICAgICAgICAgICAgdGhpcy5fbmdab25lLnJ1bk91dHNpZGVBbmd1bGFyKCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgICAgICByZXF1ZXN0QW5pbWF0aW9uRnJhbWUoKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKCkgPT4gdGhpcy5fc2V0U3R5bGVzKGVsZW1lbnQpKSk7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLl9zZXRTdHlsZXMoZWxlbWVudCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU2hvd3MgdGhlIGluayBiYXIuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzaG93KCkgewogICAgICAgICAgICB0aGlzLl9lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQuc3R5bGUudmlzaWJpbGl0eSA9ICd2aXNpYmxlJzsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogSGlkZXMgdGhlIGluayBiYXIuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBoaWRlKCkgewogICAgICAgICAgICB0aGlzLl9lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQuc3R5bGUudmlzaWJpbGl0eSA9ICdoaWRkZW4nOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIHRoZSBwcm9wZXIgc3R5bGVzIHRvIHRoZSBpbmsgYmFyIGVsZW1lbnQuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9zZXRTdHlsZXMoZWxlbWVudCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHBvc2l0aW9ucyA9IHRoaXMuX2lua0JhclBvc2l0aW9uZXIoZWxlbWVudCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaW5rQmFyID0gdGhpcy5fZWxlbWVudFJlZi5uYXRpdmVFbGVtZW50OwogICAgICAgICAgICBpbmtCYXIuc3R5bGUubGVmdCA9IHBvc2l0aW9ucy5sZWZ0OwogICAgICAgICAgICBpbmtCYXIuc3R5bGUud2lkdGggPSBwb3NpdGlvbnMud2lkdGg7CiAgICAgICAgfQogICAgfQogICA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ZWYsIF9jbG9zZXN0VGFiR3JvdXApIHsKICAgICAgICAgICAgc3VwZXIoKTsKICAgICAgICAgICAgdGhpcy5fdmlld0NvbnRhaW5lclJlZiA9IF92aWV3Q29udGFpbmVyUmVmOwogICAgICAgICAgICB0aGlzLl9jbG9zZXN0VGFiR3JvdXAgPSBfY2xvc2VzdFRhYkdyb3VwOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogUGxhaW4gdGV4dCBsYWJlbCBmb3IgdGhlIHRhYiwgdXNlZCB3aGVuIHRoZXJlIGlzIG5vIHRlbXBsYXRlIGxhYmVsLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy50ZXh0TGFiZWwgPSAnJzsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFBvcnRhbCB0aGF0IHdpbGwgYmUgdGhlIGhvc3RlZCBjb250ZW50IG9mIHRoZSB0YWIKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX2NvbnRlbnRQb3J0YWwgPSBudWxsOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRW1pdHMgd2hlbmV2ZXIgdGhlIGludGVybmFsIHN0YXRlIG9mIHRoZSB0YWIgY2hhbmdlcy4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX3N0YXRlQ2hhbmdlcyA9IG5ldyBTdWJqZWN0KCk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBUaGUgcmVsYXRpdmVseSBpbmRleGVkIHBvc2l0aW9uIHdoZXJlIDAgcmVwcmVzZW50cyB0aGUgY2VudGVyLCBuZWdhdGl2ZSBpcyBsZWZ0LCBhbmQgcG9zaXRpdmUKICAgICAgICAgICAgICogcmVwcmVzZW50cyB0aGUgcmlnaHQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLnBvc2l0aW9uID0gbnVsbDsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFRoZSBpbml0aWFsIHJlbGF0aXZlbHkga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GB0ZW1wbGF0ZUxhYmVsYCBkdXJpbmcgY3JlYXRpb24gbW9kZSwgd2hpY2ggd291bGQgdGhlbiBnZXQgY2xvYmJlcmVkCiAgICAgICAgICAgIC8vIGJ5IGB1bmRlZmluZWRgIHdoZW4gdGhpcyBxdWVyeSByZXNvbHZlcy4KICAgICAgICAgICAgaWYgKHZhbHVlKSB7CiAgICAgICAgICAgICAgICB0aGlzLl90ZW1wbGF0ZUxhYmVsID0gdmFsdWU7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkb2NzLXByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBjb250ZW50KCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fY29udGVudFBvcnRhbDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBjaGFuZ2VzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uQ2hhbmdlcyhjaGFuZ2VzKSB7CiAgICAgICAgICAgIGlmIChjaGFuZ2VzLmhhc093blByb3BlcnR5KCd0ZXh0TGFiZWwnKSB8fCBjaGFuZ2VzLmhhc093blByb3BlcnR5KCdkaXNhYmxlZCcpKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9zdGF0ZUNoYW5nZXMubmV4dCgpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkRlc3Ryb3koKSB7CiAgICAgICAgICAgIHRoaXMuX3N0YXRlQ2hhbmdlcy5jb21wbGV0ZSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25Jbml0KCkgewogICAgICAgICAgICB0aGlzLl9jb250ZW50UG9ydGFsID0gbmV3IFRlbXBs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AgX2RvY3VtZW50KSB7CiAgICAgICAgICAgIHN1cGVyKGNvbXBvbmVudEZhY3RvcnlSZXNvbHZlciwgdmlld0NvbnRhaW5lclJlZiwgX2RvY3VtZW50KTsKICAgICAgICAgICAgdGhpcy5faG9zdCA9IF9ob3N0OwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogU3Vic2NyaXB0aW9uIHRvIGV2ZW50cyBmb3Igd2hlbiB0aGUgdGFiIGJvZHkgYmVnaW5zIGNlbnRlcmluZy4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX2NlbnRlcmluZ1N1YiA9IFN1YnNjcmlwdGlvbi5FTVBUWTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFN1YnNjcmlwdGlvbiB0byBldmVudHMgZm9yIHdoZW4gdGhlIHRhYiBib2R5IGZpbmlzaGVzIGxlYXZpbmcgZnJvbSBjZW50ZXIgcG9zaXRpb24uCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9sZWF2aW5nU3ViID0gU3Vic2NyaXB0aW9uLkVNUFRZOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZXQgaW5pdGlhbCB2aXNpYmlsaXR5IG9yIHNldCB1cCBzdWJzY3JpcHRpb24gZm9yIGNoYW5naW5nIHZpc2liaWxpdHkuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uSW5pdCgpIHsKICAgICAgICAgICAgc3VwZXIubmdPbkluaXQoKTsKICAgICAgICAgICAgdGhpcy5fY2VudGVyaW5nU3ViID0gdGhpcy5faG9zdC5fYmVmb3JlQ2VudGVyaW5nCiAgICAgICAgICAgICAgICAucGlwZShzdGFydFdpdGgodGhpcy5faG9zdC5faXNDZW50ZXJQb3NpdGlvbih0aGlzLl9ob3N0Ll9wb3NpdGlvbikpKQogICAgICAgICAgICAgICAgLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gaXNDZW50ZXJpbmcKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChpc0NlbnRlcmluZykgPT4gewogICAgICAgICAgICAgICAgaWYgKGlzQ2VudGVyaW5nICYmICF0aGlzLmhhc0F0dGFjaGVkKCkpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLmF0dGFjaCh0aGlzLl9ob3N0Ll9jb250ZW50KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB0aGlzLl9sZWF2aW5nU3ViID0gdGhpcy5faG9zdC5fYWZ0ZXJMZWF2aW5nQ2VudGVyLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLmRldGFjaCgpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENsZWFuIHVwIGNlbnRlcmluZyBzdWJzY3JpcHRpb24uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uRGVzdHJveSgpIHsKICAgICAgICAgICAgc3VwZXIubmdPbkRlc3Ryb3koKTsKICAgICAgICAgICAgdGhpcy5fY2VudGVyaW5nU3ViLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgICAgIHRoaXMuX2xlYXZpbmdTdWIudW5zdWJzY3JpYmUoKTsKICAgICAgICB9CiAgICB9CiAgICBNYXRUYWJCb2R5UG9ydGFsLsm1ZmFjID0gZnVuY3Rpb24gTWF0VGFiQm9keVBvcnRhbF9GYWN0b3J5KHQpIHsgcmV0dXJuIG5ldyAodCB8fCBNYXRUYWJCb2R5UG9ydGFsKSjJtcm1ZGlyZWN0aXZlSW5qZWN0KENvbXBvbmVudEZhY3RvcnlSZXNvbHZlciksIMm1ybVkaXJlY3RpdmVJbmplY3QoVmlld0NvbnRhaW5lclJlZiksIMm1ybVkaXJlY3RpdmVJbmplY3QoZm9yd2FyZFJlZigoIC8qKgogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovKCkgPT4gTWF0VGFiQm9keSkpKSwgybXJtWRpcmVjdGl2ZUluamVjdChET0NVTUVOVCQxKSk7IH07CiAgICBNYXRUYWJCb2R5UG9ydGFsLsm1ZGlyID0gybXJtWRlZmluZURpcmVjdGl2ZSh7IHR5cGU6IE1hdFRhYkJvZHlQb3J0YWwsIHNlbGVjdG9yczogW1siIiwgIm1hdFRhYkJvZHlIb3N0IiwgIiJdXSwgZmVhdHVyZXM6IFvJtcm1SW5oZXJpdERlZmluaXRpb25GZWF0dXJlXSB9KTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLwogICAgTWF0VGFiQm9keVBvcnRhbC5jdG9yUGFyYW1ldGVycyA9ICgpID0+IFsKICAgICAgICB7IHR5cGU6IENvbXBvbmVudEZhY3RvcnlSZXNvbHZlciB9LAogICAgICAgIHsgdHlwZTogVmlld0NvbnRhaW5lclJlZiB9LAogICAgICAgIHsgdHlwZTogTWF0VGFiQm9keSwgZGVjb3JhdG9yczogW3sgdHlwZTogSW5qZWN0LCBhcmdzOiBbZm9yd2FyZFJlZigoLyoqCiAgICAgICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICAgICAoKSA9PiBNYXRUYWJCb2R5KSksXSB9XSB9LAogICAgICAgIHsgdHlwZTogdW5kZWZpbmVkLCBkZWNvcmF0b3JzOiBbeyB0eXBlOiBJbmplY3QsIGFyZ3M6IFtET0NVTUVOVCQxLF0gfV0gfQogICAgXTsKICAgIC8qKgogICAgICogQmFzZSBjbGFzcyB3aXRoIGFsbCBvZiB0aGUgYE1hdFRhYkJvZHlgIGZ1bmN0aW9uYWxpdHkuCiAgICAgKiBcQGRvY3MtcHJpdmF0ZQogICAgICogQGFic3RyYWN0CiAgICAgKi8KICAgIC8vIHRzbGludDpkaXNhYmxlLW5leHQtbGluZTpjbGFzcy1uYW1lCiAgICBjbGFzcyBfTWF0VGFiQm9keUJhc2UgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gX2VsZW1lbnRSZWYKICAgICAgICAgKiBAcGFyYW0gez99IF9kaXIKICAgICAgICAgKiBAcGFyYW0gez99IGNoYW5nZURldGVjdG9yUmVmCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoX2VsZW1lbnRSZWYsIF9kaXIsIGNoYW5nZURldGVjdG9yUmVmKSB7CiAgICAgICAgICAgIHRoaXMuX2VsZW1lbnRSZWYgPSBfZWxlbWVudFJlZjsKICAgICAgICAgICAgdGhpcy5fZGlyID0gX2RpcjsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFN1YnNjcmlwdGlvbiB0byB0aGUgZGlyZWN0aW9uYWxpdHkgY2hhbmdlIG9ic2VydmFibGUuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9kaXJDaGFuZ2VTdWJzY3JpcHRpb24gPSBTdWJzY3JpcHRpb24uRU1QVFk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBFbWl0cyB3aGVuIGFuIGFuaW1hdGlvbiBvbiB0aGUgdGFiIGlzIGNvbXBsZXRlLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fdHJhbnNsYXRlVGFiQ29tcGxldGUgPSBuZXcgU3ViamVjdCgpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRXZlbnQgZW1pdHRlZCB3aGVuIHRoZSB0YWIgYmVnaW5zIHRvIGFuaW1hdGUgdG93YXJkcyB0aGUgY2VudGVyIGFzIHRoZSBhY3RpdmUgdGFiLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fb25DZW50ZXJpbmcgPSBuZXcgRXZlbnRFbWl0dGVyKCk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBFdmVudCBlbWl0dGVkIGJlZm9yZSB0aGUgY2VudGVyaW5nIG9mIHRoZSB0YWIgYmVnaW5zLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fYmVmb3JlQ2VudGVyaW5nID0gbmV3IEV2ZW50RW1pdHRlcigpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRXZlbnQgZW1pdHRlZCBiZWZvcmUgdGhlIGNlbnRlcmluZyBvZiB0aGUgdGFiIGJlZ2lucy4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX2FmdGVyTGVhdmluZ0NlbnRlciA9IG5ldyBFdmVudEVtaXR0ZXIoKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEV2ZW50IGVtaXR0ZWQgd2hlbiB0aGUgdGFiIGNvbXBsZXRlcyBpdHMgYW5pbWF0aW9uIHRvd2FyZHMgdGhlIGNlbnRlci4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX29uQ2VudGVyZWQgPSBuZXcgRXZlbnRFbWl0dGVyKHRydWUpOwogICAgICAgICAgICAvLyBOb3RlIHRoYXQgdGhlIGRlZmF1bHQgdmFsdWUgd2lsbCBhbHdheXMgYmUgb3ZlcndyaXR0ZW4gYnkgYE1hdFRhYkJvZHlgLCBidXQgd2UgbmVlZCBvbmUKICAgICAgICAgICAgLy8gYW55d2F5IHRvIHByZXZlbnQgdGhlIGFuaW1hdGlvbnMgbW9kdWxlIGZyb20gdGhyb3dpbmcgYW4gZXJyb3IgaWYgdGhlIGJvZHkgaXMgdXNlZCBvbiBpdHMgb3duLgogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRHVyYXRpb24gZm9yIHRoZSB0YWIncyBhbmltYXRpb24uCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmFuaW1hdGlvbkR1cmF0aW9uID0gJzUwMG1zJzsKICAgICAgICAgICAgaWYgKF9kaXIpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2RpckNoYW5nZVN1YnNjcmlwdGlvbiA9IF9kaXIuY2hhbmdlLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGRpcgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKGRpcikgPT4gewogICAgICAgICAgICAgICAgICAgIHRoaXMuX2NvbXB1dGVQb3NpdGlvbkFuaW1hdGlvblN0YXRlKGRpcik7CiAgICAgICAgICAgICAgICAgICAgY2hhbmdlRGV0ZWN0b3JSZWYubWFya0ZvckNoZWNrKCk7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gRW5zdXJlIHRoYXQgd2UgZ2V0IHVuaXF1ZSBhbmltYXRpb24gZXZlbnRzLCBiZWNhdXNlIHRoZSBgLmRvbmVgIGNhbGxiYWNrIGNhbiBnZXQKICAgICAgICAgICAgLy8gaW52b2tlZCB0d2ljZSBpbiBzb21lIGJyb3dzZXJzLiBTZWUgaHR0cHM6Ly9naXRodWIuY29tL2FuZ3VsYXIvYW5ndWxhci9pc3N1ZXMvMjQwODQuCiAgICAgICAgICAgIHRoaXMuX3RyYW5zbGF0ZVRhYkNvbXBsZXRlLnBpcGUoZGlzdGluY3RVbnRpbENoYW5nZWQoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHgKICAgICAgICAgICAgICogQHBhcmFtIHs/fSB5CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoeCwgeSkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIHguZnJvbVN0YXRlID09PSB5LmZyb21TdGF0ZSAmJiB4LnRvU3RhdGUgPT09IHkudG9TdGF0ZTsKICAgICAgICAgICAgfSkpKS5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBldmVudCA9PiB7CiAgICAgICAgICAgICAgICAvLyBJZiB0aGUgdHJhbnNpdGlvbiB0byB0aGUgY2VudGVyIGlzIGNvbXBsZXRlLCBlbWl0IGFuIGV2ZW50LgogICAgICAgICAgICAgICAgaWYgKHRoaXMuX2lzQ2VudGVyUG9zaXRpb24oZXZlbnQudG9TdGF0ZSkgJiYgdGhpcy5faXNDZW50ZXJQb3NpdGlvbih0aGlzLl9wb3NpdGlvbikpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9vbkNlbnRlcmVkLmVtaXQoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmICh0aGlzLl9pc0NlbnRlclBvc2l0aW9uKGV2ZW50LmZyb21TdGF0ZSkgJiYgIXRoaXMuX2lzQ2VudGVyUG9zaXRpb24odGhpcy5fcG9zaXRpb24pKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fYWZ0ZXJMZWF2aW5nQ2VudGVyLmVtaXQoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBUaGUgc2hpZnRlZCBpbmRleCBwb3NpdGlvbiBvZiB0aGUgdGFiIGJvZHksIHdoZXJlIHplcm8gcmVwcmVzZW50cyB0aGUgYWN0aXZlIGNlbnRlciB0YWIuCiAgICAgICAgICogQHBhcmFtIHs/fSBwb3NpdGlvbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IHBvc2l0aW9uKHBvc2l0aW9uKSB7CiAgICAgICAgICAgIHRoaXMuX3Bvc2l0aW9uSW5kZXggPSBwb3NpdGlvbjsKICAgICAgICAgICAgdGhpcy5fY29tcHV0ZVBvc2l0aW9uQW5pbWF0aW9uU3RhdGUoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQWZ0ZXIgaW5pdGlhbGl6ZWQsIGNoZWNrIGlmIHRoZSBjb250ZW50IGlzIGNlbnRlcmVkIGFuZCBoYXMgYW4gb3JpZ2luLiBJZiBzbywgc2V0IHRoZQogICAgICAgICAqIHNwZWNpYWwgcG9zaXRpb24gc3RhdGVzIHRoYXQgdHJhbnNpdGlvbiB0aGUgdGFiIGZyb20gdGhlIGxlZnQgb3IgcmlnaHQgYmVmb3JlIGNlbnRlcmluZy4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25Jbml0KCkgewogICAgICAgICAgICBpZiAodGhpcy5fcG9zaXRpb24gPT0gJ2NlbnRlcicgJiYgdGhpcy5vcmlnaW4gIT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5fcG9zaXRpb24gPSB0aGlzLl9jb21wdXRlUG9zaXRpb25Gcm9tT3JpZ2luKHRoaXMub3JpZ2luKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25EZXN0cm95KCkgewogICAgICAgICAgICB0aGlzLl9kaXJDaGFuZ2VTdWJzY3JpcHRpb24udW5zdWJzY3JpYmUoKTsKICAgICAgICAgICAgdGhpcy5fdHJhbnNsYXRlVGFiQ29tcGxldGUuY29tcGxldGUoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBldmVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX29uVHJhbnNsYXRlVGFiU3RhcnRlZChldmVudCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGlzQ2VudGVyaW5nID0gdGhpcy5faXNDZW50ZXJQb3NpdGlvbihldmVudC50b1N0YXRlKTsKICAgICAgICAgICAgdGhpcy5fYmVmb3JlQ2VudGVyaW5nLmVtaXQoaXNDZW50ZXJpbmcpOwogICAgICAgICAgICBpZiAoaXNDZW50ZXJpbmcpIHsKICAgICAgICAgICAgICAgIHRoaXMuX29uQ2VudGVyaW5nLmVtaXQodGhpcy5fZWxlbWVudFJlZi5uYXRpdmVFbGVtZW50LmNsaWVudEhlaWdodCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIHRleHQgZGlyZWN0aW9uIG9mIHRoZSBjb250YWluaW5nIGFwcC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9nZXRMYXlvdXREaXJlY3Rpb24oKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9kaXIgJiYgdGhpcy5fZGlyLnZhbHVlID09PSAncnRsJyA/ICdydGwnIDogJ2x0cic7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFdoZXRoZXIgdGhlIHByb3ZpZGVkIHBvc2l0aW9uIHN0YXRlIGlzIGNvbnNpZGVyZWQgY2VudGVyLCByZWdhcmRsZXNzIG9mIG9yaWdpbi4KICAgICAgICAgKiBAcGFyYW0gez99IHBvc2l0aW9uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfaXNDZW50ZXJQb3NpdGlvbihwb3NpdGlvbikgewogICAgICAgICAgICByZXR1cm4gcG9zaXRpb24gPT0gJ2NlbnRlcicgfHwKICAgICAgICAgICAgICAgIHBvc2l0aW9uID09ICdsZWZ0LW9yaWdpbi1jZW50ZXInIHx8CiAgICAgICAgICAgICAgICBwb3NpdGlvbiA9PSAncmlnaHQtb3JpZ2luLWNlbnRlcic7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENvbXB1dGVzIHRoZSBwb3NpdGlvbiBzdGF0ZSB0aGF0IHdpbGwgYmUgdXNlZCBmb3IgdGhlIHRhYi1ib2R5IGFuaW1hdGlvbiB0cmlnZ2VyLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/PX0gZGlyCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfY29tcHV0ZVBvc2l0aW9uQW5pbWF0aW9uU3RhdGUoZGlyID0gdGhpcy5fZ2V0TGF5b3V0RGlyZWN0aW9uKCkpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX3Bvc2l0aW9uSW5kZXggPCAwKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9wb3NpdGlvbiA9IGRpciA9PSAnbHRyJyA/ICdsZWZ0JyA6ICdyaWdodCc7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAodGhpcy5fcG9zaXRpb25JbmRleCA+IDApIHsKICAgICAgICAgICAgICAgIHRoaXMuX3Bvc2l0aW9uID0gZGlyID09ICdsdHInID8gJ3JpZ2h0JyA6ICdsZWZ0JzsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuX3Bvc2l0aW9uID0gJ2NlbnRlcic7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ29tcHV0ZXMgdGhlIHBvc2l0aW9uIHN0YXRlIGJhc2VkIG9uIHRoZSBzcGVjaWZpZWQgb3JpZ2luIHBvc2l0aW9uLiBUaGlzIGlzIHVzZWQgaWYgdGhlCiAgICAgICAgICogdGFiIGlzIGJlY29taW5nIHZpc2libGUgaW1tZWRpYXRlbHkgYWZ0ZXIgY3JlYXRpb24uCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IG9yaWdpbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2NvbXB1dGVQb3NpdGlvbkZyb21PcmlnaW4ob3JpZ2luKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZGlyID0gdGhpcy5fZ2V0TGF5b3V0RGlyZWN0aW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HkuCiAgICAgKiBcQGRvY3MtcHJpdmF0ZQogICAgICogQGFic3RyYWN0CiAgICAgKi8KICAgIC8vIHRzbGludDpkaXNhYmxlLW5leHQtbGluZTpjbGFzcy1uYW1lCiAgICBjbGFzcyBfTWF0VGFiR3JvdXBCYXNlIGV4dGVuZHMgX01hdFRhYkdyb3VwTWl4aW5CYXNlIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnRSZWYKICAgICAgICAgKiBAcGFyYW0gez99IF9jaGFuZ2VEZXRlY3RvclJlZgogICAgICAgICAqIEBwYXJhbSB7Pz19IGRlZmF1bHRDb25maWcKICAgICAgICAgKiBAcGFyYW0gez89fSBfYW5pbWF0aW9uTW9kZQogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKGVsZW1lbnRSZWYsIF9jaGFuZ2VEZXRlY3RvclJlZiwgZGVmYXVsdENvbmZpZywgX2FuaW1hdGlvbk1vZGUpIHsKICAgICAgICAgICAgc3VwZXIoZWxlbWVudFJlZik7CiAgICAgICAgICAgIHRoaXMuX2NoYW5nZURldGVjdG9yUmVmID0gX2NoYW5nZURldGVjdG9yUmVmOwogICAgICAgICAgICB0aGlzLl9hbmltYXRpb25Nb2RlID0gX2FuaW1hdGlvbk1vZGU7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBBbGwgb2YgdGhlIHRhYnMgdGhhdCBiZWxvbmcgdG8gdGhlIGdyb3VwLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fdGFicyA9IG5ldyBRdWVyeUxpc3QoKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFRoZSB0YWIgaW5kZXggdGhhdCBzaG91bGQgYmUgc2VsZWN0ZWQgYWZ0ZXIgdGhlIGNvbnRlbnQgaGFzIGJlZW4gY2hlY2tlZC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX2luZGV4VG9TZWxlY3QgPSAwOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogU25hcHNob3Qgb2YgdGhlIGhlaWdodCBvZiB0aGUgdGFiIGJvZHkgd3JhcHBlciBiZWZvcmUgYW5vdGhlciB0YWIgaXMgYWN0aXZhdGVkLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fdGFiQm9keVdyYXBwZXJIZWlnaHQgPSAwOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogU3Vic2NyaXB0aW9uIHRvIHRhYnMgYmVpbmcgYWRkZWQvcmVtb3ZlZC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX3RhYnNTdWJzY3JpcHRpb24gPSBTdWJzY3JpcHRpb24uRU1QVFk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBTdWJzY3JpcHRpb24gdG8gY2hhbmdlcyBpbiB0aGUgdGFiIGxhYmVscy4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX3RhYkxhYmVsU3Vic2NyaXB0aW9uID0gU3Vic2NyaXB0aW9uLkVNUFRZOwogICAgICAgICAgICB0aGlzLl9keW5hbWljSGVpZ2h0ID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuX3NlbGVjdGVkSW5kZXggPSBudWxsOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogUG9zaXRpb24gb2YgdGhlIHRhYiBoZWFkZXIuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmhlYWRlclBvc2l0aW9uID0gJ2Fib3ZlJzsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIE91dHB1dCB0byBlbmFibGUgc3VwcG9ydCBmb3IgdHdvLXdheSBiaW5kaW5nIG9uIGBbKHNlbGVjdGVkSW5kZXgpXWAKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuc2VsZWN0ZWRJbmRleENoYW5nZSA9IG5ldyBFdmVudEVtaXR0ZXIoKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEV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0aGUgc2l6ZSBvZiB0aGUgYWN0aXZlIHRhYi4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBkeW5hbWljSGVpZ2h0KCkgeyByZXR1cm4gdGhpcy5fZHluYW1pY0hlaWdodDsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBkeW5hbWljSGVpZ2h0KHZhbHVlKSB7IHRoaXMuX2R5bmFtaWNIZWlnaHQgPSBjb2VyY2VCb29sZWFuUHJvcGVydHkodmFsdWUpOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIGluZGV4IG9mIHRoZSBhY3RpdmUgdGFiLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHNlbGVjdGVkSW5kZXgoKSB7IHJldHVybiB0aGlzLl9zZWxlY3RlZEluZGV4OyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IHNlbGVjdGVkSW5kZXgodmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5faW5kZXhUb1NlbGVjdCA9IGNvZXJjZU51bWJlclByb3BlcnR5KHZhbHVlLCBudWxsKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogRHVyYXRpb24gZm9yIHRoZSB0YWIgYW5pbWF0aW9uLiBXaWxsIGJlIG5vcm1hbGl6ZWQgdG8gbWlsbGlzZWNvbmRzIGlmIG5vIHVuaXRzIGFyZSBzZXQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgYW5pbWF0aW9uRHVyYXRpb24oKSB7IHJldHVybiB0aGlzLl9hbmltYXRpb25EdXJhdGlvbjsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBhbmltYXRpb25EdXJhdGlvbih2YWx1ZSkgewogICAgICAgICAgICB0aGlzLl9hbmltYXRpb25EdXJhdGlvbiA9IC9eXGQrJC8udGVzdCh2YWx1ZSkgPyB2YWx1ZSArICdtcycgOiB2YWx1ZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQmFja2dyb3VuZCBjb2xvciBvZiB0aGUgdGFiIGdyb3VwLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGJhY2tncm91bmRDb2xvcigpIHsgcmV0dXJuIHRoaXMuX2JhY2tncm91bmRDb2xvcjsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBiYWNrZ3JvdW5kQ29sb3IodmFsdWUpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBuYXRpdmVFbGVtZW50ID0gdGhpcy5fZWxlbWVudFJlZi5uYXRpdmVFbGVtZW50OwogICAgICAgICAgICBuYXRpdmVFbGVtZW50LmNsYXNzTGlzdC5yZW1vdmUoYG1hdC1iYWNrZ3JvdW5kLSR7dGhpcy5iYWNrZ3JvdW5kQ29sb3J9YCk7CiAgICAgICAgICAgIGlmICh2YWx1ZSkgewogICAgICAgICAgICAgICAgbmF0aXZlRWxlbWVudC5jbGFzc0xpc3QuYWRkKGBtYXQtYmFja2dyb3VuZC0ke3ZhbHVlfWApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2JhY2tncm91bmRDb2xvciA9IHZhbHVlOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBZnRlciB0aGUgY29udGVudCBpcyBjaGVja2VkLCB0aGlzIGNvbXB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pbmRleCBoYXMgbm90IHlldCBiZWVuIGluaXRpYWxpemVkLgogICAgICAgICAgICBpZiAodGhpcy5fc2VsZWN0ZWRJbmRleCAhPSBpbmRleFRvU2VsZWN0KSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBpc0ZpcnN0UnVuID0gdGhpcy5fc2VsZWN0ZWRJbmRleCA9PSBudWxsOwogICAgICAgICAgICAgICAgaWYgKCFpc0ZpcnN0UnVuKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5zZWxlY3RlZFRhYkNoYW5nZS5lbWl0KHRoaXMuX2NyZWF0ZUNoYW5nZUV2ZW50KGluZGV4VG9TZWxlY3QpKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vIENoYW5naW5nIHRoZXNlIHZhbHVlcyBhZnRlciBjaGFuZ2UgZGV0ZWN0aW9uIGhhcyBydW4KICAgICAgICAgICAgICAgIC8vIHNpbmNlIHRoZSBjaGVja2VkIGNvbnRlbnQgbWF5IGNvbnRhaW4gcmVmZXJlbmNlcyB0byB0aGVtLgogICAgICAgICAgICAgICAgUHJvbWlzZS5yZXNvbHZlKCkudGhlbigoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fdGFicy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHRhYgogICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gaW5kZXgKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICh0YWIsIGluZGV4KSA9PiB0YWIuaXNBY3RpdmUgPSBpbmRleCA9PT0gaW5kZXhUb1NlbGVjdCkpOwogICAgICAgICAgICAgICAgICAgIGlmICghaXNGaXJzdFJ1bikgewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNlbGVjdGVkSW5kZXhDaGFuZ2UuZW1pdChpbmRleFRvU2VsZWN0KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gU2V0dXAgdGhlIHBvc2l0aW9uIGZvciBlYWNoIHRhYiBhbmQgb3B0aW9uYWxseSBzZXR1cCBhbiBvcmlnaW4gb24gdGhlIG5leHQgc2VsZWN0ZWQgdGFiLgogICAgICAgICAgICB0aGlzLl90YWJzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHRhYgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGluZGV4CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAodGFiLCBpbmRleCkgPT4gewogICAgICAgICAgICAgICAgdGFiLnBvc2l0aW9uID0gaW5kZXggLSBpbmRleFRvU2VsZWN0OwogICAgICAgICAgICAgICAgLy8gSWYgdGhlcmUgaXMgYWxyZWFkeSBhIHNlbGVjdGVkIHRhYiwgdGhlbiBzZXQgdXAgYW4gb3JpZ2luIGZvciB0aGUgbmV4dCBzZWxlY3RlZCB0YWIKICAgICAgICAgICAgICAgIC8vIGlmIGl0IGRvZXNuJ3QgaGF2ZSBvbmUgYWxyZWFkeS4KICAgICAgICAgICAgICAgIGlmICh0aGlzLl9zZWxlY3RlZEluZGV4ICE9IG51bGwgJiYgdGFiLnBvc2l0aW9uID09IDAgJiYgIXRhYi5vcmlnaW4pIHsKICAgICAgICAgICAgICAgICAgICB0YWIub3JpZ2luID0gaW5kZXhUb1NlbGVjdCAtIHRoaXMuX3NlbGVjdGVkSW5kZXg7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgaWYgKHRoaXMuX3NlbGVjdGVkSW5kZXggIT09IGluZGV4VG9TZWxlY3QpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3NlbGVjdGVkSW5kZXggPSBpbmRleFRvU2VsZWN0OwogICAgICAgICAgICAgICAgdGhpcy5fY2hhbmdlRGV0ZWN0b3JSZWYubWFya0ZvckNoZWNrKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ0FmdGVyQ29udGVudEluaXQoKSB7CiAgICAgICAgICAgIHRoaXMuX3N1YnNjcmliZVRvQWxsVGFiQ2hhbmdlcygpOwogICAgICAgICAgICB0aGlzLl9zdWJzY3JpYmVUb1RhYkxhYmVscygpOwogICAgICAgICAgICAvLyBTdWJzY3JpYmUgdG8gY2hhbmdlcyBpbiB0aGUgYW1vdW50IG9mIHRhYnMsIGluIG9yZGVyIHRvIGJlCiAgICAgICAgICAgIC8vIGFibGUgdG8gcmUtcmVuZGVyIHRoZSBjb250ZW50IGFzIG5ldyB0YWJzIGFyZSBhZGRlZCBvciByZW1vdmVkLgogICAgICAgICAgICB0aGlzLl90YWJzU3Vic2NyaXB0aW9uID0gdGhpcy5fdGFicy5jaGFuZ2VzLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBpbmRleFRvU2VsZWN0ID0gdGhpcy5fY2xhbXBUYWJJbmRleCh0aGlzLl9pbmRleFRvU2VsZWN0KTsKICAgICAgICAgICAgICAgIC8vIE1haW50YWluIHRoZSBwcmV2aW91c2x5LXNlbGVjdGVkIHRhYiBpZiBhIG5ldyB0YWIgaXMgYWRkZWQgb3IgcmVtb3ZlZCBhbmQgdGhlcmUgaXMgbm8KICAgICAgICAgICAgICAgIC8vIGV4cGxpY2l0IGNoYW5nZSB0aGF0IHNlbGVjdHMgYSBkaWZmZXJlbnQgdGFiLgogICAgICAgICAgICAgICAgaWYgKGluZGV4VG9TZWxlY3QgPT09IHRoaXMuX3NlbGVjdGVkSW5kZXgpIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgdGFicyA9IHRoaXMuX3RhYnMudG9BcnJheSgpOwogICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgdGFicy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgICAgICAgICBpZiAodGFic1tpXS5pc0FjdGl2ZSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQXNzaWduIGJvdGggdG8gdGhlIGBfaW5kZXhUb1NlbGVjdGAgYW5kIGBfc2VsZWN0ZWRJbmRleGAgc28gd2UgZG9uJ3QgZmlyZSBhIGNoYW5nZWQKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGV2ZW50LCBvdGhlcndpc2UgdGhlIGNvbnN1bWVyIG1heSBlbmQgdXAgaW4gYW4gaW5maW5pdGUgbG9vcCBpbiBzb21lIGVkZ2UgY2FzZXMgbGlrZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gYWRkaW5nIGEgdGFiIHdpdGhpbiB0aGUgYHNlbGVjdGVkSW5kZXhDaGFuZ2VgIGV2ZW50LgogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5faW5kZXhUb1NlbGVjdCA9IHRoaXMuX3NlbGVjdGVkSW5kZXggPSBpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLl9jaGFuZ2VEZXRlY3RvclJlZi5tYXJrRm9yQ2hlY2soKTsKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBMaXN0ZW5zIHRvIGNoYW5nZXMgaW4gYWxsIG9mIHRoZSB0YWJzLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfc3Vic2NyaWJlVG9BbGxUYWJDaGFuZ2VzKCkgewogICAgICAgICAgICAvLyBTaW5jZSB3ZSB1c2UgYSBxdWVyeSB3aXRoIGBkZXNjZW5kYW50czogdHJ1ZWAgdG8gcGljayB1cCB0aGUgdGFicywgd2UgbWF5IGVuZCB1cCBjYXRjaGluZwogICAgICAgICAgICAvLyBzb21lIHRoYXQgYXJlIGluc2lkZSBvZiBuZXN0ZWQgdGFiIGdyb3Vwcy4gV2UgZmlsdGVyIHRoZW0gb3V0IG1hbnVhbGx5IGJ5IGNoZWNraW5nIHRoYXQKICAgICAgICAgICAgLy8gdGhlIGNsb3Nlc3QgZ3JvdXAgdG8gdGhlIHRhYiBpcyB0aGUgY3VycmVudCBvbmUuCiAgICAgICAgICAgIHRoaXMuX2FsbFRhYnMuY2hhbmdlcwogICAgICAgICAgICAgICAgLnBpcGUoc3RhcnRXaXRoKHRoaXMuX2FsbFRhYnMpKQogICAgICAgICAgICAgICAgLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdGFicwogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHRhYnMpID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuX3RhYnMucmVzZXQodGFicy5maWx0ZXIoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSB0YWIKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIHRhYiA9PiB7CiAgICAgICAgICAgICAgICAgICAgLy8gQGJyZWFraW5nLWNoYW5nZSAxMC4wLjAgUmVtb3ZlIG51bGwgY2hlY2sgZm9yIGBfY2xvc2VzdFRhYkdyb3VwYAogICAgICAgICAgICAgICAgICAgIC8vIG9uY2UgaXQgYmVjb21lcyBhIHJlcXVpcmVkIHBhcmFtZXRlciBpbiBNYXRUYWIuCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICF0YWIuX2Nsb3Nlc3RUYWJHcm91cCB8fCB0YWIuX2Nsb3Nlc3RUYWJHcm91cCA9PT0gdGhpczsKICAgICAgICAgICAgICAgIH0pKSk7CiAgICAgICAgICAgICAgICB0aGlzLl90YWJzLm5vdGlmeU9uQ2hhbmdlcygpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkRlc3Ryb3koKSB7CiAgICAgICAgICAgIHRoaXMuX3RhYnMuZGVzdHJveSgpOwogICAgICAgICAgICB0aGlzLl90YWJzU3Vic2NyaXB0aW9uLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgICAgIHRoaXMuX3RhYkxhYmVsU3Vic2NyaXB0aW9uLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJlLWFsaWducyB0aGUgaW5rIGJhciB0byB0aGUgc2VsZWN0ZWQgdGFiIGVsZW1lbnQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZWFsaWduSW5rQmFyKCkgewogICAgICAgICAgICBpZiAodGhpcy5fdGFiSGVhZGVyKSB7CiAgICAgICAgICAgICAgICB0aGlzLl90YWJIZWFkZXIuX2FsaWduSW5rQmFyVG9TZWxlY3RlZFRhYigpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gaW5kZXgKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9mb2N1c0NoYW5nZWQoaW5kZXgpIHsKICAgICAgICAgICAgdGhpcy5mb2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ICAgICAgICAgKi8KICAgICAgICBfc3Vic2NyaWJlVG9UYWJMYWJlbHMoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl90YWJMYWJlbFN1YnNjcmlwdGlvbikgewogICAgICAgICAgICAgICAgdGhpcy5fdGFiTGFiZWxTdWJzY3JpcHRpb24udW5zdWJzY3JpYmUoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl90YWJMYWJlbFN1YnNjcmlwdGlvbiA9IG1lcmdlKC4uLnRoaXMuX3RhYnMubWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSB0YWIKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRhYiA9PiB0YWIuX3N0YXRlQ2hhbmdlcykpKQogICAgICAgICAgICAgICAgLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB0aGlzLl9jaGFuZ2VEZXRlY3RvclJlZi5tYXJrRm9yQ2hlY2soKSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDbGFtcHMgdGhlIGdpdmVuIGluZGV4IHRvIHRoZSBib3VuZHMgb2YgMCBhbmQgdGhlIHRhYnMgbGVuZ3RoLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBpbmRleAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2NsYW1wVGFiSW5kZXgoaW5kZXgpIHsKICAgICAgICAgICAgLy8gTm90ZSB0aGUgYHx8IDBgLCB3aGljaCBlbnN1cmVzIHRoYXQgdmFsdWVzIGxpa2UgTmFOIGNhbid0IGdldCB0aHJvdWdoCiAgICAgICAgICAgIC8vIGFuZCB3aGljaCB3b3VsZCBvdGhlcndpc2UgdGhyb3cgdGhlIGNvbXBvbmVudCBpbnRvIGFuIGluZmluaXRlIGxvb3AKICAgICAgICAgICAgLy8gKHNpbmNlIE1hdGgubWF4KE5hTiwgMCkgPT09IE5hTikuCiAgICAgICAgICAgIHJldHVybiBNYXRoLm1pbih0aGlzLl90YWJzLmxlbmd0aCAtIDEsIE1hdGgubWF4KGluZGV4IHx8IDAsIDApKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0dXJucyBhIHVuaXF1ZSBpZCBmb3IgZWFjaCB0YWIgbGFiZWwgZWxlbWVudAogICAgICAgICAqIEBwYXJhbSB7P30gaQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2dldFRhYkxhYmVsSWQoaSkgewogICAgICAgICAgICByZXR1cm4gYG1hdC10YWItbGFiZWwtJHt0aGlzLl9ncm91cElkfS0ke2l9YDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0dXJucyBhIHVuaXF1ZSBpZCBmb3IgZWFjaCB0YWIgY29udGVudCBlbGVtZW50CiAgICAgICAgICogQHBhcmFtIHs/fSBpCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZ2V0VGFiQ29udGVudElkKGkpIHsKICAgICAgICAgICAgcmV0dXJuIGBtYXQtdGFiLWNvbnRlbnQtJHt0aGlzLl9ncm91cElkfS0ke2l9YDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU2V0cyB0aGUgaGVpZ2h0IG9mIHRoZSBib2R5IHdyYXBwZXIgdG8gdGhlIGhlaWdodCBvZiB0aGUgYWN0aXZhdGluZyB0YWIgaWYgZHluYW1pYwogICAgICAgICAqIGhlaWdodCBwcm9wZXJ0eSBpcyB0cnVlLgogICAgICAgICAqIEBwYXJhbSB7P30gdGFiSGVpZ2h0CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfc2V0VGFiQm9keVdyYXBwZXJIZWlnaHQodGFiSGVpZ2h0KSB7CiAgICAgICAgICAgIGlmICghdGhpcy5fZHlu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gICAgICAgICAgIHdyYXBwZXIuc3R5bGUuaGVpZ2h0ID0gJyc7CiAgICAgICAgICAgIHRoaXMuYW5pbWF0aW9uRG9uZS5lbWl0KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEhhbmRsZSBjbGljayBldmVudHMsIHNldHRpbmcgbmV3IHNlbGVjdGVkIGluZGV4IGlmIGFwcHJvcHJpYXRlLgogICAgICAgICAqIEBwYXJhbSB7P30gdGFiCiAgICAgICAgICogQHBhcmFtIHs/fSB0YWJIZWFkZXIKICAgICAgICAgKiBAcGFyYW0gez99IGluZGV4CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfaGFuZGxlQ2xpY2sodGFiLCB0YWJIZWFkZXIsIGluZGV4KSB7CiAgICAgICAgICAgIGlmICghdGFiLmRpc2FibGVkKSB7CiAgICAgICAgICAgICAgICB0aGlzLnNlbGVjdGVkSW5kZXggPSB0YWJIZWFkZXIuZm9jdXNJbmRleCA9IGluZGV4OwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJldHJpZXZlcyB0aGUgdGFiaW5kZXggZm9yIHRoZSB0YWIuCiAgICAgICAgICogQHBhcmFtIHs/fSB0YWIKICAgICAgICAgKiBAcGFyYW0gez99IGlkeAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2dldFRhYkluZGV4KHRhYiwgaWR4KSB7CiAgICAgICAgICAgIGlmICh0YWIuZGlzYWJsZWQpIHsKICAgICAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0aGlzLnNlbGVjdGVkSW5kZXggPT09IGlkeCA/IDAgOiAtMTsKICAgICAgICB9CiAgICB9CiAgICBfTWF0VGFiR3JvdXBCYXNlLsm1ZmFjID0gZnVuY3Rpb24gX01hdFRhYkdyb3VwQmFzZV9GYWN0b3J5KHQpIHsgcmV0dXJuIG5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qIEBwYXJhbSB7P30gX2NoYW5nZURldGVjdG9yUmVmCiAgICAgICAgICogQHBhcmFtIHs/fSBfdmlld3BvcnRSdWxlcgogICAgICAgICAqIEBwYXJhbSB7P30gX2RpcgogICAgICAgICAqIEBwYXJhbSB7P30gX25nWm9uZQogICAgICAgICAqIEBwYXJhbSB7Pz19IF9wbGF0Zm9ybQogICAgICAgICAqIEBwYXJhbSB7Pz19IF9hbmltYXRpb25Nb2RlCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoX2VsZW1lbnRSZWYsIF9jaGFuZ2VEZXRlY3RvclJlZiwgX3ZpZXdwb3J0UnVsZXIsIF9kaXIsIF9uZ1pvbmUsIF9wbGF0Zm9ybSwgX2FuaW1hdGlvbk1vZGUpIHsKICAgICAgICAgICAgdGhpcy5fZWxlbWVudFJlZiA9IF9lbGVtZW50UmVmOwogICAgICAgICAgICB0aGlzLl9jaGFuZ2VEZXRlY3RvclJlZiA9IF9jaGFuZ2VEZXRlY3RvclJlZjsKICAgICAgICAgICAgdGhpcy5fdmlld3BvcnRSdWxlciA9IF92aWV3cG9ydFJ1bGVyOwogICAgICAgICAgICB0aGlzLl9kaXIgPSBfZGlyOwogICAgICAgICAgICB0aGlzLl9uZ1pvbmUgPSBfbmdab25lOwogICAgICAgICAgICB0aGlzLl9wbGF0Zm9ybSA9IF9wbGF0Zm9ybTsKICAgICAgICAgICAgdGhpcy5fYW5pbWF0aW9uTW9kZSA9IF9hbmltYXRpb25Nb2RlOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogVGhlIGRpc3RhbmNlIGluIHBpeGVscyB0aGF0IHRoZSB0YWIgbGFiZWxzIHNob3VsZCBiZSB0cmFuc2xhdGVkIHRvIHRoZSBsZWZ0LgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fc2Nyb2xsRGlzdGFuY2UgPSAwOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogV2hldGhlciB0aGUgaGVhZGVyIHNob3Vs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y4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX3N0b3BTY3JvbGxpbmcgPSBuZXcgU3ViamVjdCgpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogV2hldGhlciBwYWdpbmF0aW9uIHNob3VsZCBiZSBkaXNhYmxlZC4gVGhpcyBjYW4gYmUgdXNlZCB0byBhdm9pZCB1bm5lY2Vzc2FyeQogICAgICAgICAgICAgKiBsYXlvdXQgcmVjYWxjdWxhdGlvbnMgaWYgaXQncyBrbm93biB0aGF0IHBhZ2luYXRpb24gd29uJ3QgYmUgcmVxdWlyZWQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmRpc2FibGVQYWdpbmF0aW9uID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuX3NlbGVjdGVkSW5kZXggPSAwOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRXZlbnQgZW1pdHRlZCB3aGVuIHRoZSBvcHRpb24gaXMgc2VsZWN0ZWQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLnNlbGVjdEZvY3VzZWRJbmRleCA9IG5ldyBFdmVudEVtaXR0ZXIoKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEV2ZW50IGVtaXR0ZWQgd2hlbiBhIGxhYmVsIGlzIGZvY3VzZWQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmluZGV4Rm9jdXNlZCA9IG5ldyBFdmVudEVtaXR0ZXIoKTsKICAgICAgICAgICAgLy8gQmluZCB0aGUgYG1vdXNlbGVhdmVgIGV2ZW50IG9uIHRoZSBvdXRzaWRlIHNpbmNlIGl0IGRvZXNuJ3QgY2hhbmdlIGFueXRoaW5nIGluIHRoZSB2aWV3LgogICAgICAgICAgICBfbmdab25lLnJ1bk91dHNpZGVBbmd1bGFyKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIGZyb21FdmVudChfZWxlbWVudFJlZi5uYXRpdmVFbGVtZW50LCAnbW91c2VsZWF2ZScpCiAgICAgICAgICAgICAgICAgICAgLnBpcGUodGFrZVVudGlsKHRoaXMuX2Rlc3Ryb3llZCkpCiAgICAgICAgICAgICAgICAgICAgLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fc3RvcEludGVydmFsKCk7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIGluZGV4IG9mIHRoZSBhY3RpdmUgdGFiLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHNlbGVjdGVkSW5kZXgoKSB7IHJldHVybiB0aGlzLl9zZWxlY3RlZEluZGV4OyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IHNlbGVjdGVkSW5kZXgodmFsdWUpIHsKICAgICAgICAgICAgdmFsdWUgPSBjb2VyY2VOdW1iZXJQcm9wZXJ0eSh2YWx1ZSk7CiAgICAgICAgICAgIGlmICh0aGlzLl9zZWxlY3RlZEluZGV4ICE9IHZhbHVlKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9zZWxlY3RlZEluZGV4Q2hhbmdlZCA9IHRydWU7CiAgICAgICAgICAgICAgICB0aGlzLl9zZWxlY3RlZEluZGV4ID0gdmFsdWU7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5fa2V5TWFuYWdlcikgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX2tleU1hbmFnZXIudXBkYXRlQWN0aXZlSXRlbSh2YWx1ZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ0FmdGVyVmlld0luaXQoKSB7CiAgICAgICAgICAgIC8vIFdlIG5lZWQgdG8gaGFuZGxlIHRoZXNlIGV2ZW50cyBtYW51YWxseSwgYmVjYXVzZSB3ZSB3YW50IHRvIGJpbmQgcGFzc2l2ZSBldmVudCBsaXN0ZW5lcnMuCiAgICAgICAgICAgIGZyb21FdmVudCh0aGlzLl9wcmV2aW91c1BhZ2luYXRvci5uYXRpdmVFbGVtZW50LCAndG91Y2hzdGFydCcsIHBhc3NpdmVFdmVudExpc3RlbmVyT3B0aW9ucykKICAgICAgICAgICAgICAgIC5waXBlKHRha2VVbnRpbCh0aGlzLl9kZXN0cm95ZWQpKQogICAgICAgICAgICAgICAgLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLl9oYW5kbGVQYWdpbmF0b3JQcmVzcygnYmVmb3JlJyk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgZnJvbUV2ZW50KHRoaXMuX25leHRQYWdpbmF0b3IubmF0aXZlRWxlbWVudCwgJ3RvdWNoc3RhcnQnLCBwYXNzaXZlRXZlbnRMaXN0ZW5lck9wdGlvbnMpCiAgICAgICAgICAgICAgICAucGlwZSh0YWtlVW50aWwodGhpcy5fZGVzdHJveWVkKSkKICAgICAgICAgICAgICAgIC5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgdGhpcy5faGFuZGxlUGFnaW5hdG9yUHJlc3MoJ2FmdGVyJyk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ0FmdGVyQ29udGVudEluaXQoKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZGlyQ2hhbmdlID0gdGhpcy5fZGlyID8gdGhpcy5fZGlyLmNoYW5nZSA6IG9mKG51bGwpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHJlc2l6ZSA9IHRoaXMuX3ZpZXdwb3J0UnVsZXIuY2hhbmdlKDE1MCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcmVhbGlnbiA9ICgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIHRoaXMudXBkYXRlUGFnaW5hdGlvbigpOwogICAgICAgICAgICAgICAgdGhpcy5fYWxpZ25JbmtCYXJUb1NlbGVjdGVkVGFiKCk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICB0aGlzLl9rZXlNYW5hZ2VyID0gbmV3IEZvY3VzS2V5TWFuYWdlcih0aGlzLl9pdGVtcykKICAgICAgICAgICAgICAgIC53aXRoSG9yaXpvbnRhbE9yaWVudGF0aW9uKHRoaXMuX2dldExheW91dERpcmVjdGlvbigpKQogICAgICAgICAgICAgICAgLndpdGhXcmFwKCk7CiAgICAgICAgICAgIHRoaXMuX2tleU1hbmFnZXIudXBkYXRlQWN0aXZlSXRlbSgwKTsKICAgICAgICAgICAgLy8gRGVmZXIgdGhlIGZpcnN0IGNhbGwgaW4gb3JkZXIgdG8gYWxsb3cgZm9yIHNsb3dlciBicm93c2VycyB0byBsYXkgb3V0IHRoZSBlbGVtZW50cy4KICAgICAgICAgICAgLy8gVGhpcyBoZWxwcyBpbiBjYXNlcyB3aGVyZSB0aGUgdXNlciBsYW5kcyBk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3VzZWRgCiAgICAgICAgICAgIC8vIGV2ZW50IGluIG9yZGVyIHRvIHByb3ZpZGUgYSBwdWJsaWMgZXZlbnQgdGhhdCBub3RpZmllcyBhYm91dCBmb2N1cyBjaGFuZ2VzLiBBbHNvIHdlIHJlYWxpZ24KICAgICAgICAgICAgLy8gdGhlIHRhYnMgY29udGFpbmVyIGJ5IHNjcm9sbGluZyB0aGUgbmV3IGZvY3VzZWQgdGFiIGludG8gdGhlIHZpc2libGUgc2VjdGlvbi4KICAgICAgICAgICAgdGhpcy5fa2V5TWFuYWdlci5jaGFuZ2UucGlwZSh0YWtlVW50aWwodGhpcy5fZGVzdHJveWVkKSkuc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBuZXdGb2N1c0luZGV4CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBuZXdGb2N1c0luZGV4ID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuaW5kZXhGb2N1c2VkLmVtaXQobmV3Rm9jdXNJbmRleCk7CiAgICAgICAgICAgICAgICB0aGlzLl9zZXRUYWJGb2N1cyhuZXdGb2N1c0luZGV4KTsKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nQWZ0ZXJDb250ZW50Q2hlY2tlZCgpIHsKICAgICAgICAgICAgLy8gSWYgdGhlIG51bWJlciBvZiB0YWIgbGFiZWxzIGhhdmUgY2hhbmdlZCwgY2hlY2sgaWYgc2Nyb2xsaW5nIHNob3VsZCBiZSBlbmFibGVkCiAgICAgICAgICAgIGlmICh0aGlzLl90YWJMYWJlbENvdW50ICE9IHRoaXMuX2l0ZW1zLmxlbmd0aCkgewogICAgICAgICAgICAgICAgdGhpcy51cGRhdGVQYWdpbmF0aW9uKCk7CiAgICAgICAgICAgICAgICB0aGlzLl90YWJMYWJlbENvdW50ID0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AgIHRoaXMuX3Njcm9sbERpc3RhbmNlQ2hhbmdlZCA9IGZhbHNlOwogICAgICAgICAgICAgICAgdGhpcy5fY2hhbmdlRGV0ZWN0b3JSZWYubWFya0ZvckNoZWNrKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uRGVzdHJveSgpIHsKICAgICAgICAgICAgdGhpcy5fZGVzdHJveWVkLm5leHQoKTsKICAgICAgICAgICAgdGhpcy5fZGVzdHJveWVkLmNvbXBsZXRlKCk7CiAgICAgICAgICAgIHRoaXMuX3N0b3BTY3JvbGxpbmcuY29tcGxldGUoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogSGFuZGxlcyBrZXlib2FyZCBldmVudHMgb24gdGhlIGhlYWRlci4KICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfaGFuZGxlS2V5ZG93bihldmVudCkgewogICAgICAgICAgICAvLyBXZSBkb24ndCBoYW5kbGUgYW55IGtleSBiaW5kaW5ncyB3aXRoIGEgbW9kaWZpZXIga2V5LgogICAgICAgICAgICBpZiAoaGFzTW9kaWZpZXJLZXkoZXZlbnQpKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgc3dpdGNoIChldmVudC5rZXlDb2RlKSB7CiAgICAgICAgICAgICAgICBjYXNlIEhPTUU6CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fa2V5TWFuYWdlci5zZXRGaXJzdEl0ZW1BY3RpdmUoKTsKICAgICAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgY2FzZSBFTkQ6CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fa2V5TWFuYWdlci5zZXRMYXN0SXRlbUFjdGl2ZSgpOwogICAgICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBjYXNlIEVOVEVSOgogICAgICAgICAgICAgICAgY2FzZSBTUEFDRToKICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5mb2N1c0luZGV4ICE9PSB0aGlzLnNlbGVjdGVkSW5kZXgpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZWxlY3RGb2N1c2VkSW5kZXguZW1pdCh0aGlzLmZvY3VzSW5kZXgpOwogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9pdGVtU2VsZWN0ZWQoZXZlbnQpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fa2V5TWFuYWdlci5vbktleWRvd24oZXZlbnQpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENhbGxiYWNrIGZvciB3aGVuIHRoZSBNdXRhdGlvbk9ic2VydmVyIGRldGVjdHMgdGhhdCB0aGUgY29udGVudCBoYXMgY2hhbmdlZC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9vbkNvbnRlbnRDaGFuZ2VzKCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHRleHRDb250ZW50ID0gdGhpcy5fZWxlbWVudFJlZi5uYXRpdmVFbGVtZW50LnRleHRDb250ZW50OwogICAgICAgICAgICAvLyBXZSBuZWVkIHRvIGRpZmYgdGhlIHRleHQgY29udGVudCBvZiB0aGUgaGVhZGVyLCBiZWNhdXNlIHRoZSBNdXRhdGlvbk9ic2VydmVyIGNhbGxiYWNrCiAgICAgICAgICAgIC8vIHdpbGwgZmlyZSBldmVuIGlmIHRoZSB0ZXh0IGNvbnRlbnQgZGlkbid0IGNoYW5nZSB3aGljaCBpcyBpbmVmZmljaWVudCBhbmQgaXMgcHJvbmUKICAgICAgICAgICAgLy8gdG8gaW5maW5pdGUgbG9vcHMgaWYgYSBwb29ybHkgY29uc3RydWN0ZWQgZXhwcmVzc2lvbiBpcyBwYXNzZWQgaW4gKHNlZSAjMTQyNDkpLgogICAgICAgICAgICBpZiAodGV4dENvbnRlbnQgIT09IHRoaXMuX2N1cnJlbnRUZXh0Q29udGVudCkgewogICAgICAgICAgICAgICAgdGhpcy5fY3VycmVudFRleHRDb250ZW50ID0gdGV4dENvbnRlbnQgfHwgJyc7CiAgICAgICAgICAgICAgICAvLyBUaGUgY29udGVudCBvYnNlcnZlciBydW5zIG91dHNpZGUgdGhlIGBOZ1pvbmVgIGJ5IGRlZmF1bHQsIHdoaWNoCiAgICAgICAgICAgICAgICAvLyBtZWFucyB0aGF0IHdlIG5lZWQgdG8gYnJpbmcgdGhlIGNhbGxiYWNrIGJhY2sgaW4gb3Vyc2VsdmVzLgogICAgICAgICAgICAgICAgdGhpcy5fbmdab25lLnJ1bigoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy51cGRhdGVQYWdpbmF0aW9uKCk7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fYWxpZ25JbmtCYXJUb1NlbGVjdGVkVGFiKCk7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fY2hhbmdlRGV0ZWN0b3JSZWYubWFya0ZvckNoZWNrKCk7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVXBkYXRlcyB0aGUgdmlldyB3aGV0aGVyIHBhZ2luYXRpb24gc2hvdWxkIGJlIGVuYWJsZWQgb3Igbm90LgogICAgICAgICAqCiAgICAgICAgICogV0FSTklORzogQ2FsbGluZyB0aGlzIG1ldGhvZCBjYW4gYmUgdmVyeSBjb3N0bHkgaW4gdGVybXMgb2YgcGVyZm9ybWFuY2UuIEl0IHNob3VsZCBiZSBjYWxsZWQKICAgICAgICAgKiBhcyBpbmZyZXF1ZW50bHkgYXMgcG9zc2libGUgZnJvbSBvdXRzaWRlIG9mIHRoZSBUYWJzIGNvbXBvbmVudCBhcyBpdCBjYXVzZXMgYSByZWZsb3cgb2YgdGhlCiAgICAgICAgICogcGFnZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHVwZGF0ZVBhZ2luYXRpb24oKSB7CiAgICAgICAgICAgIHRoaXMuX2NoZWNrUGFnaW5hdGlvbkVuYWJsZWQoKTsKICAgICAgICAgICAgdGhpcy5fY2hlY2tTY3JvbGxpbmdDb250cm9scygpOwogICAgICAgICAgICB0aGlzLl91cGRhdGVUYWJTY3JvbGxQb3NpdGlvbigpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBUcmFja3Mgd2hpY2ggZWxlbWVudCBoYXMgZm9jdXM7IHVzZWQgZm9yIGtleWJvYXJkIG5hdmlnYXRpb24KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBmb2N1c0luZGV4KCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fa2V5TWFuYWdlciA/ICgvKiogQHR5cGUgez99ICovICh0aGlzLl9rZXlNYW5hZ2VyLmFjdGl2ZUl0ZW1JbmRleCkpIDogMDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogV2hlbiB0aGUgZm9jdXMgaW5kZXggaXMgc2V0LCB3ZSBtdXN0IG1hbnVhbGx5IHNlbmQgZm9jdXMgdG8gdGhlIGNvcnJlY3QgbGFiZWwKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgZm9jdXNJbmRleCh2YWx1ZSkgewogICAgICAgICAgICBpZiAoIXRoaXMuX2lzVmFsaWRJbmRleCh2YWx1ZSkgfHwgdGhpcy5mb2N1c0luZGV4ID09PSB2YWx1ZSB8fCAhdGhpcy5fa2V5TWFuYWdlcikgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2tleU1hbmFnZXIuc2V0QWN0aXZlSXRlbSh2YWx1ZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIERldGVybWluZXMgaWYgYW4gaW5kZXggaXMgdmFsaWQuICBJZiB0aGUgdGFicyBhcmUgbm90IHJlYWR5IHlldCwgd2UgYXNzdW1lIHRoYXQgdGhlIHVzZXIgaXMKICAgICAgICAgKiBwcm92aWRpbmcgYSB2YWxpZCBpbmRleCBhbmQgcmV0dXJuIHRydWUuCiAgICAgICAgICogQHBhcmFtIHs/fSBpbmRleAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2lzVmFsaWRJbmRleChpbmRleCkgewogICAgICAgICAgICBpZiAoIXRoaXMuX2l0ZW1zKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHRhYiA9IHRoaXMuX2l0ZW1zID8gdGhpcy5faXRlbXMudG9BcnJheSgpW2luZGV4XSA6IG51bGw7CiAgICAgICAgICAgIHJldHVybiAhIXRhYiAmJiAhdGFiLmRpc2FibGVkOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIGZvY3VzIG9uIHRoZSBIVE1MIGVsZW1lbnQgZm9yIHRoZSBsYWJlbCB3cmFwcGVyIGFuZCBzY3JvbGxzIGl0IGludG8gdGhlIHZpZXcgaWYKICAgICAgICAgKiBzY3JvbGxpbmcgaXMgZW5hYmxlZC4KICAgICAgICAgKiBAcGFyYW0gez99IHRhYkluZGV4CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfc2V0VGFiRm9jdXModGFiSW5kZXgpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX3Nob3dQYWdpbmF0aW9uQ29udHJvbHMpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3Njcm9sbFRvTGFiZWwodGFiSW5kZXgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0aGlzLl9pdGVtcyAmJiB0aGlzLl9pdGVtcy5sZW5ndGgpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2l0ZW1zLnRvQXJyYXkoKVt0YWJJbmRleF0uZm9jdXMoKTsKICAgICAgICAgICAgICAgIC8vIERvIG5vdCBsZXQgdGhlIGJyb3dzZXIgbWFuYWdlIHNjcm9sbGluZyB0byBmb2N1cyB0aGUgZWxlbWVudCwgdGhpcyB3aWxsIGJlIGhhbmRsZWQKICAgICAgICAgICAgICAgIC8vIGJ5IHVzaW5nIHRyYW5zbGF0aW9uLiBJbiBMVFIsIHRoZSBzY3JvbGwgbGVmdCBzaG91bGQgYmUgMC4gSW4gUlRMLCB0aGUgc2Nyb2xsIHdpZHRoCiAgICAgICAgICAgICAgICAvLyBzaG91bGQgYmUgdGhlIGZ1bGwgd2lkdGggbWludXMgdGhlIG9mZnNldCB3aWR0aC4KICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGNvbnRhaW5lckVsID0gdGhpcy5fdGFiTGlzdENvbnRhaW5lci5uYXRpdmVFbGVtZW50OwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZGlyID0gdGhpcy5fZ2V0TGF5b3V0RGlyZWN0aW9uKCk7CiAgICAgICAgICAgICAgICBpZiAoZGlyID09ICdsdHInKSB7CiAgICAgICAgICAgICAgICAgICAgY29udGFpbmVyRWwuc2Nyb2xsTGVmdCA9IDA7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBjb250YWluZXJFbC5zY3JvbGxMZWZ0ID0gY29udGFpbmVyRWwuc2Nyb2xsV2lkdGggLSBjb250YWluZXJFbC5vZmZzZXRXaWR0aDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBUaGUgbGF5b3V0IGRpcmVjdGlvbiBvZiB0aGUgY29udGFpbmluZyBhcHAuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZ2V0TGF5b3V0RGlyZWN0aW9uKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fZGlyICYmIHRoaXMuX2Rpci52YWx1ZSA9PT0gJ3J0bCcgPyAncnRsJyA6ICdsdHInOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBQZXJmb3JtcyB0aGUgQ1NTIHRyYW5zZm9ybWF0aW9uIG9uIHRoZSB0YWIgbGlzdCB0aGF0IHdpbGwgY2F1c2UgdGhlIGxpc3QgdG8gc2Nyb2xsLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3VwZGF0ZVRhYlNjcm9sbFBvc2l0aW9uKCkgewogICAgICAgICAgICBpZiAodGhpcy5kaXNhYmxlUGFnaW5hdGlvbikgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc2Nyb2xsRGlzdGFuY2UgPSB0aGlzLnNjcm9sbERpc3RhbmNlOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHBsYXRmb3JtID0gdGhpcy5fcGxhdGZvcm07CiAgICAgICAgICAgIC8q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gICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHNjcm9sbEFtb3VudCA9IChkaXJlY3Rpb24gPT0gJ2JlZm9yZScgPyAtMSA6IDEpICogdmlld0xlbmd0aCAvIDM7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9zY3JvbGxUbyh0aGlzLl9zY3JvbGxEaXN0YW5jZSArIHNjcm9sbEFtb3VudCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEhhbmRsZXMgY2xpY2sgZXZlbnRzIG9uIHRoZSBwYWdpbmF0aW9uIGFycm93cy4KICAgICAgICAgKiBAcGFyYW0gez99IGRpcmVjdGlvbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2hhbmRsZVBhZ2luYXRvckNsaWNrKGRpcmVjdGlvbikgewogICAgICAgICAgICB0aGlzLl9zdG9wSW50ZXJ2YWwoKTsKICAgICAgICAgICAgdGhpcy5fc2Nyb2xsSGVhZGVyKGRpcmVjdGlvbik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIE1vdmVzIHRoZSB0YWIgbGlzdCBzdWNoIHRoYXQgdGhlIGRlc2lyZWQgdGFiIGxhYmVsIChtYXJrZWQgYnkgaW5kZXgpIGlzIG1vdmVkIGludG8gdmlldy4KICAgICAgICAgKgogICAgICAgICAqIFRoaXMgaXMgYW4gZXhwZW5zaXZlIGNhbGwgdGhhdCBmb3JjZXMgYSBsYXlvdXQgcmVmbG93IHRvIGNvbXB1dGUgYm94IGFuZCBzY3JvbGwgbWV0cmljcyBhbmQKICAgICAgICAgKiBzaG91bGQgYmUgY2FsbGVkIHNwYXJpbmdseS4KICAgICAgICAgKiBAcGFyYW0gez99IGxhYmVsSW5kZXgKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9zY3JvbGxUb0xhYmVsKGxhYmVsSW5kZXgpIHsKICAgICAgICAgICAgaWYgKHRoaXMuZGlzYWJsZVBhZ2luYXRpb24pIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHNlbGVjdGVkTGFiZWwgPSB0aGlzLl9pdGVtcyA/IHRoaXMuX2l0ZW1zLnRvQXJyYXkoKVtsYWJlbEluZGV4XSA6IG51bGw7CiAgICAgICAgICAgIGlmICghc2VsZWN0ZWRMYWJlbCkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIFRoZSB2aWV3IGxlbmd0aCBpcyB0aGUgdmlzaWJsZSB3aWR0aCBvZiB0aGUgdGFiIGxhYmVscy4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB2aWV3TGVuZ3RoID0gdGhpcy5fdGFiTGlzdENvbnRhaW5lci5uYXRpdmVFbGVtZW50Lm9mZnNldFdpZHRoOwogICAgICAgICAgICBjb25zdCB7IG9mZnNldExlZnQsIG9mZnNldFdpZHRoIH0gPSBzZWxlY3RlZExhYmVsLmVsZW1lbnRSZWYubmF0aXZlRWxlbWVudDsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgbGFiZWxCZWZvcmVQb3M7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGxhYmVsQWZ0ZXJQb3M7CiAgICAgICAgICAgIGlmICh0aGlzLl9nZXRMYXlvdXREaXJlY3Rpb24oKSA9PSAnbHRyJykgewogICAgICAgICAgICAgICAgbGFiZWxCZWZvcmVQb3MgPSBvZmZzZXRMZWZ0OwogICAgICAgICAgICAgICAgbGFiZWxBZnRlclBvcyA9IGxhYmVsQmVmb3JlUG9zICsgb2Zmc2V0V2lkdGg7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBsYWJlbEFmdG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YWx1YXRlIHdoZXRoZXIgdGhlIHBhZ2luYXRpb24gY29udHJvbHMgc2hvdWxkIGJlIGRpc3BsYXllZC4gSWYgdGhlIHNjcm9sbCB3aWR0aCBvZiB0aGUKICAgICAgICAgKiB0YWIgbGlzdCBpcyB3aWRlciB0aGFuIHRoZSBzaXplIG9mIHRoZSBoZWFkZXIgY29udGFpbmVyLCB0aGVuIHRoZSBwYWdpbmF0aW9uIGNvbnRyb2xzIHNob3VsZAogICAgICAgICAqIGJlIHNob3duLgogICAgICAgICAqCiAgICAgICAgICogVGhpcyBpcyBhbiBleHBlbnNpdmUgY2FsbCB0aGF0IGZvcmNlcyBhIGxheW91dCByZWZsb3cgdG8gY29tcHV0ZSBib3ggYW5kIHNjcm9sbCBtZXRyaWNzIGFuZAogICAgICAgICAqIHNob3VsZCBiZSBjYWxsZWQgc3BhcmluZ2x5LgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2NoZWNrUGFnaW5hdGlvbkVuYWJsZWQoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmRpc2FibGVQYWdpbmF0aW9uKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9zaG93UGFnaW5hdGlvbkNvbnRyb2xzID0gZmFsc2U7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBpc0VuYWJsZWQgPSB0aGlzLl90YWJMaXN0Lm5hdGl2ZUVsZW1lbnQuc2Nyb2xsV2lkdGggPiB0aGlzLl9lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQub2Zmc2V0V2lkdGg7CiAgICAgICAgICAgICAgICBpZiAoIWlzRW5hYmxlZCkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuc2Nyb2xsRGlzdGFuY2UgPSAwOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKGlzRW5hYmxlZCAhPT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AgICAgX2dldE1heFNjcm9sbERpc3RhbmNlKCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGxlbmd0aE9mVGFiTGlzdCA9IHRoaXMuX3RhYkxpc3QubmF0aXZlRWxlbWVudC5zY3JvbGxXaWR0aDsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB2aWV3TGVuZ3RoID0gdGhpcy5fdGFiTGlzdENvbnRhaW5lci5uYXRpdmVFbGVtZW50Lm9mZnNldFdpZHRoOwogICAgICAgICAgICByZXR1cm4gKGxlbmd0aE9mVGFiTGlzdCAtIHZpZXdMZW5ndGgpIHx8IDA7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFRlbGxzIHRoZSBpbmstYmFyIHRvIGFsaWduIGl0c2VsZiB0byB0aGUgY3VycmVudCBsYWJlbCB3cmFwcGVyCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfYWxpZ25JbmtCYXJUb1NlbGVjdGVkVGFiKCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHNlbGVjdGVkSXRlbSA9IHRoaXMuX2l0ZW1zICYmIHRoaXMuX2l0ZW1zLmxlbmd0aCA/CiAgICAgICAgICAgICAgICB0aGlzLl9pdGVtcy50b0FycmF5KClbdGhpcy5zZWxlY3RlZEluZGV4XSA6IG51bGw7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc2VsZWN0ZWRMYWJlbFdyYXBwZXIgPSBzZWxlY3RlZEl0ZW0gPyBzZWxlY3RlZEl0ZW0uZWxlbWVudFJlZi5uYXRpdmVFbGVtZW50IDogbnVsbDsKICAgICAgICAgICAgaWYgKHNlbGVjdGVkTGFiZWxXcmFwcGVyKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9pbmtCYXIuYWxpZ25Ub0VsZW1lbnQoc2VsZWN0ZWRMYWJlbFdyYXBwZXIpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5faW5rQmFyLmhpZGUoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTdG9wcyB0aGUgY3VycmVudGx5LXJ1bm5pbmcgcGFnaW5hdG9yIGludGVydmFsLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3N0b3BJbnRlcnZhbCgpIHsKICAgICAgICAgICAgdGhpcy5fc3RvcFNjcm9sbGluZy5uZXh0KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEhhbmRsZXMgdGhlIHVzZXIgcHJlc3NpbmcgZG93biBvbiBvbmUgb2YgdGhlIHBhZ2luYXRvcnMuCiAgICAgICAgICogU3RhcnRzIHNjcm9sbGluZyB0aGUgaGVhZGVyIGFmdGVyIGEgY2VydGFpbiBhbW91bnQgb2YgdGltZS4KICAgICAgICAgKiBAcGFyYW0gez99IGRpcmVjdGlvbiBJbiB3aGljaCBkaXJlY3Rpb24gdGhlIHBhZ2luYXRvciBzaG91bGQgYmUgc2Nyb2xsZWQuCiAgICAgICAgICogQHBhcmFtIHs/PX0gbW91c2VFdmVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2hhbmRsZVBhZ2luYXRvclByZXNzKGRpcmVjdGlvbiwgbW91c2VFdmVudCkgewogICAgICAgICAgICAvLyBEb24ndCBzdGFydCBhdXRvIHNjcm9sbGluZyBmb3IgcmlnaHQgbW91c2UgYnV0dG9uIGNsaWNrcy4gTm90ZSB0aGF0IHdlIHNob3VsZG4ndCBoYXZlIHRvCiAgICAgICAgICAgIC8vIG51bGwgY2hlY2sgdGhlIGBidXR0b25gLCBidXQgd2UgZG8gaXQgc28gd2UgZG9uJ3QgYnJlYWsgdGVzdHMgdGhhdCB1c2UgZmFrZSBldmVudHMuCiAgICAgICAgICAgIGlmIChtb3VzZUV2ZW50ICYmIG1vdXNlRXZlbnQuYnV0dG9uICE9IG51bGwgJiYgbW91c2VFdmVudC5idXR0b24gIT09IDApIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBBdm9pZCBvdmVybGFwcGluZyB0aW1lcnMuCiAgICAgICAgICAgIHRoaXMuX3N0b3BJbnRlcnZhbCgpOwogICAgICAgICAgICAvLyBTdGFydCBhIHRpbWVyIGFmdGVyIHRoZSBkZWxheSBhbmQga2VlcCBmaXJpbmcgYmFzZWQgb24gdGhlIGludGVydmFsLgogICAgICAgICAgICB0aW1lcihIRUFERVJfU0NST0xMX0RFTEFZLCBIRUFERVJfU0NST0xMX0lOVEVSVkFMKQogICAgICAgICAgICAgICAgLy8gS2VlcCB0aGUgdGltZXIgZ29pbmcgdW50aWwgc29tZXRoaW5nIHRlbGxzIGl0IHRvIHN0b3Agb3IgdGhlIGNvbXBvbmVudCBpcyBkZXN0cm95ZWQuCiAgICAgICAgICAgICAgICAucGlwZSh0YWtlVW50aWwobWVyZ2UodGhpcy5fc3RvcFNjcm9sbGluZywgdGhpcy5fZGVzdHJveWVkKSkpCiAgICAgICAgICAgICAgICAuc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIGNvbnN0IHsgbWF4U2Nyb2xsRGlzdGFuY2UsIGRpc3RhbmNlIH0gPSB0aGlzLl9zY3JvbGxIZWFkZXIoZGlyZWN0aW9uKTsKICAgICAgICAgICAgICAgIC8vIFN0b3AgdGhlIHRpbWVyIGlmIHdlJ3ZlIHJlYWNoZWQgdGhlIHN0YXJ0IG9yIHRoZSBlbmQuCiAgICAgICAgICAgICAgICBpZiAoZGlzdGFuY2UgPT09IDAgfHwgZGlzdGFuY2UgPj0gbWF4U2Nyb2xsRG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gICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnRSZWYKICAgICAgICAgKiBAcGFyYW0gez99IGRpcgogICAgICAgICAqIEBwYXJhbSB7P30gbmdab25lCiAgICAgICAgICogQHBhcmFtIHs/fSBjaGFuZ2VEZXRlY3RvclJlZgogICAgICAgICAqIEBwYXJhbSB7P30gdmlld3BvcnRSdWxlcgogICAgICAgICAqIEBwYXJhbSB7Pz19IHBsYXRmb3JtCiAgICAgICAgICogQHBhcmFtIHs/PX0gYW5pbWF0aW9uTW9kZQogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKGVsZW1lbnRSZWYsIGRpciwgbmdab25lLCBjaGFuZ2VEZXRlY3RvclJlZiwgdmlld3BvcnRSdWxlciwgCiAgICAgICAgLyoqCiAgICAgICAgICogQGRlcHJlY2F0ZWQgQGJyZWFraW5nLWNoYW5nZSA5LjAuMCBgcGxhdGZvcm1gIHBhcmFtZXRlciB0byBiZWNvbWUgcmVxdWlyZWQuCiAgICAgICAgICovCiAgICAgICAgcGxhdGZvcm0sIGFuaW1hdGlvbk1vZGUpIHsKICAgICAgICAgICAgc3VwZXIoZWxlbWVudFJlZiwgY2hhbmdlRGV0ZWN0b3JSZWYsIHZpZXdwb3J0UnVsZXIsIGRpciwgbmdab25lLCBwbGF0Zm9ybSwgYW5pbWF0aW9uTW9kZSk7CiAgICAgICAgICAgIHRoaXMuX2Rpc2FibGVSaXBwbGUgPSBmYWxzZTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFRoZW1lIGNvbG9yIG9mIHRoZSBuYXYgYmFyLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5jb2xvciA9ICdwcmltYXJ5JzsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQmFja2dyb3VuZCBjb2xvciBvZiB0aGUgdGFiIG5hdi4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBiYWNrZ3JvdW5kQ29sb3IoKSB7IHJldHVybiB0aGlzLl9iYWNrZ3JvdW5kQ29sb3I7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgYmFja2dyb3VuZENvbG9yKHZhbHVlKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgY2xhc3NMaXN0ID0gdGhpcy5fZWxlbWVudFJlZi5uYXRpdmVFbGVtZW50LmNsYXNzTGlzdDsKICAgICAgICAgICAgY2xhc3NMaXN0LnJlbW92ZShgbWF0LWJhY2tncm91bmQtJHt0aGlzLmJhY2tncm91bmRDb2xvcn1gKTsKICAgICAgICAgICAgaWYgKHZhbHVlKSB7CiAgICAgICAgICAgICAgICBjbGFzc0xpc3QuYWRkKGBtYXQtYmFja2dyb3VuZC0ke3ZhbHVlfWApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2JhY2tncm91bmRDb2xvciA9IHZhbHVlOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGV0aGVyIHRoZSByaXBwbGUgZWZmZWN0IGlzIGRpc2FibGVkIG9yIG5vdC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBkaXNhYmxlUmlwcGxlKCkgeyByZXR1cm4gdGhpcy5fZGlzYWJsZVJpcHBsZTsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBkaXNhYmxlUmlwcGxlKHZhbHVlKSB7IHRoaXMuX2Rpc2FibGVSaXBwbGUgPSBjb2VyY2VCb29sZWFuUHJvcGVydHkodmFsdWUpOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByb3RlY3RlZAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2l0ZW1TZWxlY3RlZCgpIHsKICAgICAgICAgICAgLy8gbm9vcAogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nQWZ0ZXJDb250ZW50SW5pdCgpIHsKICAgICAgICAgICAgLy8gV2UgbmVlZCB0aGlzIHRvIHJ1biBiZWZvcmUgdGhlIGBjaGFuZ2VzYCBzdWJzY3JpcHRpb24gaW4gcGFyZW50IHRvIGVuc3VyZSB0aGF0IHRoZQogICAgICAgICAgICAvLyBzZWxlY3RlZEluZGV4IGlzIHVwLXRvLWRhdGUgYnkgdGhlIHRpbWUgdGhlIHN1cGVyIGNsYXNzIHN0YXJ0cyBsb29raW5nIGZvciBpdC4KICAgICAgICAgICAgdGhpcy5faXRlbXMuY2hhbmdlcy5waXBlKHN0YXJ0V2l0aChudWxsKSwgdGFrZVVudGlsKHRoaXMuX2Rlc3Ryb3llZCkpLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLnVwZGF0ZUFjdGl2ZUxpbmsoKTsKICAgICAgICAgICAgfSkpOwogICAgICAgICAgICBzdXBlci5uZ0FmdGVyQ29udGVudEluaXQoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogTm90aWZpZXMgdGhlIGNvbXBvbmVudCB0aGF0IHRoZSBhY3RpdmUgbGluayBoYXMgYmVlbiBjaGFuZ2VkLgogICAgICAgICAqIFxAYnJlYWtpbmctY2hhbmdlIDguMC4wIGBlbGVtZW50YCBwYXJhbWV0ZXIgdG8gYmUgcmVtb3ZlZC4KICAgICAgICAgKiBAcGFyYW0gez89fSBfZWxlbWVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdXBkYXRlQWN0aXZlTGluayhfZWxlb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pdG9yID0gX2ZvY3VzTW9uaXRvcjsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFdoZXRoZXIgdGhlIHRhYiBsaW5rIGlzIGFjdGl2ZSBvciBub3QuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9pc0FjdGl2ZSA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLnJpcHBsZUNvbmZpZyA9IGdsb2JhbFJpcHBsZU9wdGlvbnMgfHwge307CiAgICAgICAgICAgIHRoaXMudGFiSW5kZXggPSBwYXJzZUludCh0YWJJbmRleCkgfHwgMDsKICAgICAgICAgICAgaWYgKGFuaW1hdGlvbk1vZGUgPT09ICdOb29wQW5pbWF0aW9ucycpIHsKICAgICAgICAgICAgICAgIHRoaXMucmlwcGxlQ29uZmlnLmFuaW1hdGlvbiA9IHsgZW50ZXJEdXJhdGlvbjogMCwgZXhpdER1cmF0aW9uOiAwIH07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgX2ZvY3VzTW9uaXRvci5tb25pdG9yKGVsZW1lbnRSZWYpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGV0aGVyIHRoZSBsaW5rIGlzIGFjdGl2ZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBhY3RpdmUoKSB7IHJldHVybiB0aGlzLl9pc0FjdGl2ZTsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBhY3RpdmUodmFsdWUpIHsKICAgICAgICAgICAgaWYgKHZhbHVlICE9PSB0aGlzLl9pc0FjdGl2ZSkgewogICAgICAgICAgICAgICAgdGhpcy5faXNBY3RpdmUgPSB2YWx1ZTsKICAgICAgICAgICAgICAgIHRoaXMuX3RhYk5hdkJhci51cGRhdGVBY3RpdmVMaW5rKHRoaXMuZWxlbWVudFJlZik7CiAgIC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ogICAgICogTGluayBpbnNpZGUgb2YgYSBgbWF0LXRhYi1uYXYtYmFyYC4KICAgICAqLwogICAgY2xhc3MgTWF0VGFiTGluayBleHRlbmRzIF9NYXRUYWJMaW5rQmFzZSB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB0YWJOYXZCYXIKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnRSZWYKICAgICAgICAgKiBAcGFyYW0gez99IG5nWm9uZQogICAgICAgICAqIEBwYXJhbSB7P30gcGxhdGZvcm0KICAgICAgICAgKiBAcGFyYW0gez99IGdsb2JhbFJpcHBsZU9wdGlvbnMKICAgICAgICAgKiBAcGFyYW0gez99IHRhYkluZGV4CiAgICAgICAgICogQHBhcmFtIHs/fSBmb2N1c01vbml0b3IKICAgICAgICAgKiBAcGFyYW0gez89fSBhbmltYXRpb25Nb2RlCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IodGFiTmF2QmFyLCBlbGVtZW50UmVmLCBuZ1pvbmUsIHBsYXRmb3JtLCBnbG9iYWxSaXBwbGVPcHRpb25zLCB0YWJJbmRleCwgZm9jdXNNb25pdG9yLCBhbmltYXRpb25Nb2RlKSB7CiAgICAgICAgICAgIHN1cGVyKHRhYk5hdkJhciwgZWxlbWVudFJlZiwgZ2xvYmFsUmlwcGxlT3B0aW9ucywgdGFiSW5kZXgsIGZvY3VzTW9uaXRvciwgYW5pbWF0aW9uTW9kZSk7CiAgICAgICAgICAgIHRoaXMuX3RhYkxpbmtSaXBwbGUgPSBuZXcgUmlwcGxlUmVuZGVyZXIodGhpcywgbmdab25lLCBlbGVtZW50UmVmLCBwbGF0Zm9ybSk7CiAgICAgICAgICAgIHRoaXMuX3RhYkxpbmtSaXBwbGUuc2V0dXBUcmlnZ2VyRXZlbnRzKGVsZW1lbnRSZWYubmF0aXZlRWxlbWVudCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgIC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ZGVmaW5lZCIgfHwgbmdKaXRNb2RlKSAmJiDJtcm1c2V0TmdNb2R1bGVTY29wZShNYXRUYWJzTW9kdWxlLCB7IGRlY2xhcmF0aW9uczogZnVuY3Rpb24gKCkgeyByZXR1cm4gW01hdFRhYkdyb3VwLAogICAgICAgICAgICBNYXRUYWJMYWJlbCwKICAgICAgICAgICAgTWF0VGFiLAogICAgICAgICAgICBNYXRJbmtCYXIsCiAgICAgICAgICAgIE1hdFRhYkxhYmVsV3JhcHBlciwKICAgICAgICAgICAgTWF0VGFiTmF2LAogICAgICAgICAgICBNYXRUYWJMaW5rLAogICAgICAgICAgICBNYXRUYWJCb2R5LAogICAgICAgICAgICBNYXRUYWJCb2R5UG9ydGFsLAogICAgICAgICAgICBNYXRUYWJIZWFkZXIsCiAgICAgICAgICAgIE1hdFRhYkNvbnRlbnRdOyB9LCBpbXBvcnRzOiBmdW5jdGlvbiAoKSB7IHJldHVybiBbQ29tbW9uTW9kdWxlLAogICAgICAgICAgICBNYXRDb21tb25Nb2R1bGUsCiAgICAgICAgICAgIFBvcnRhbE1vZHVsZSwKICAgICAgICAgICAgTWF0UmlwcGxlTW9kdWxlLAogICAgICAgICAgICBPYnNlcnZlcnNNb2R1bGUsCiAgICAgICAgICAgIEExMXlNb2R1bGVdOyB9LCBleHBvcnRzOiBmdW5jdGlvbiAoKSB7IHJldHVybiBbTWF0Q29tbW9uTW9kdWxlLAogICAgICAgICAgICBNYXRUYWJHcm91cCwKICAgICAgICAgICAgTWF0VGFiTGFiZWwsCiAgICAgICAgICAgIE1hdFRhYiwKICAgICAgICAgICAgTWF0VGFiTmF2LAogICAgICAgICAgICBNYXRUYWJMaW5rLAogICAgICAgICAgICBNYXRUYWJDb250ZW50XTsgfSB9KTsgfSkoKTsKCiAgICBjb25zdCBfYzAkNCA9IFsidW5kZXJsaW5lIl07CiAgICBjb25zdCBfYzEkNCA9IFsiY29ubmVjdGlvbkNvbnRhaW5lciJdOwogICAgY29uc3QgX2MyJDIgPS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GQtYW5pbWF0aW9ucy50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvKioKICAgICAqIEFuaW1hdGlvbnMgdXNlZCBieSB0aGUgTWF0Rm9ybUZpZWxkLgogICAgICogXEBkb2NzLXByaXZhdGUKICAgICAqIEB0eXBlIHs/fQogICAgICovCiAgICBjb25zdCBtYXRGb3JtRmllbGRBbmltYXRpb25zID0gewogICAgICAgIC8qKgogICAgICAgICAqIEFuaW1hdGlvbiB0aGF0IHRyYW5zaXRpb25zIHRoZSBmb3JtIGZpZWxkJ3MgZXJyb3IgYW5kIGhpbnQgbWVzc2FnZXMuCiAgICAgICAgICovCiAgICAgICAgdHJhbnNpdGlvbk1lc3NhZ2VzOiB0cmlnZ2VyKCd0cmFuc2l0aW9uTWVzc2FnZXMnLCBbCiAgICAgICAgICAgIC8vIFRPRE8obW1hbGVyYmEpOiBVc2UgYW5ndWxhciBhbmltYXRpb25zIGZvciBsYWJlbCBhbmltYXRpb24gYXMgd2VsbC4KICAgICAgICAgICAgc3RhdGUoJ2VudGVyJywgc3R5bGUoeyBvcGFjaXR5OiAxLCB0cmFuc2Zvcm06ICd0cmFuc2xhdGVZKDAlKScgfSkpLAogICAgICAgICAgICB0cmFuc2l0aW9uKCd2b2lkID0+IGVudGVyJywgWwogICAgICAgICAgICAgICAgc3R5bGUoeyBvcGFjaXR5OiAwLCB0cmFuc2Zvcm06ICd0cmFuc2xhdGVZKC0xMDAlKScgfSksCiAgICAgICAgICAgICAgICBhbmltYXRlKCczMDBtcyBjdWJpYy1iZXppZXIoMC41NSwgMCwgMC41NSwgMC4yKScpLAogICAgICAgICAgICBdKSwKICAgICAgICBdKQogICAgfTsKCiAgICAvK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KSB7CiAgICAgICAgcmV0dXJuIEVycm9yKCdtYXQtZm9ybS1maWVsZCBtdXN0IGNvbnRhaW4gYSBNYXRGb3JtRmllbGRDb250cm9sLicpOwogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogc3JjL21hdGVyaWFsL2Zvcm0tZmllbGQvaGludC50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvKiogQHR5cGUgez99ICovCiAgICBsZXQgbmV4dFVuaXF1ZUlkJDEgPSAwOwogICAgLyoqCiAgICAgKiBIaW50IHRleHQgdG8gYmUgc2hvd24gdW5kZXJuZWF0aCB0aGUgZm9ybSBmaWVsZCBjb250cm9sLgogICAgICovCiAgICBjbGFzcyBNYXRIaW50IHsKICAgICAgICBjb25zdHJ1Y3RvcigpIHsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFdoZXRoZXIgdG8gYWxpZ24gdGhlIGhpbnQgbGFiZWwgYXQgdGhlIHN0YXJ0IG9yIGVuZCBvZiB0aGUgbGluZS4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuYWxpZ24gPSAnc3RhcnQnOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogVW5pcXVlIElEIGZvciB0aGUgaGludC4gVXNlZCBmb3IgdGhlIGFyaWEtZGVzY3JpYmVkYnkgb24gdGhlIGZvcm0gZmllbGQgY29udHJvbC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuaWQgPSBgbWF0LWhpbnQtJHtuZXh0VW5pcXVlSWQkMSsrfWA7CiAgICAgICAgfQogICAgfQogIC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xkIGJlIGhpZGRlbi4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBoaWRlUmVxdWlyZWRNYXJrZXIoKSB7IHJldHVybiB0aGlzLl9oaWRlUmVxdWlyZWRNYXJrZXI7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgaGlkZVJlcXVpcmVkTWFya2VyKHZhbHVlKSB7CiAgICAgICAgICAgIHRoaXMuX2hpZGVSZXF1aXJlZE1hcmtlciA9IGNvZXJjZUJvb2xlYW5Qcm9wZXJ0eSh2YWx1ZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFdoZXRoZXIgdGhlIGZsb2F0aW5nIGxhYmVsIHNob3VsZCBhbHdheXMgZmxvYXQgb3Igbm90LgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IF9zaG91bGRBbHdheXNGbG9hdCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuZmxvYXRMYWJlbCA9PT0gJ2Fsd2F5cycgJiYgIXRoaXMuX3Nob3dBbHdheXNBbmltYXRlOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGV0aGVyIHRoZSBsYWJlbCBjYW4gZmxvYXQgb3Igbm90LgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IF9jYW5MYWJlbEZsb2F0KCkgeyByZXR1cm4gdGhpcy5mbG9hdExhYmVsICE9PSAnbmV2ZXInOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogVGV4dCBmb3IgdGhlIGZvcm0gZmllbGQgaGludC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBoaW50TGFiZWwoKSB7IHJldHVybiB0aGlzLl9oaW50TGFiZWw7IH0KICAgICAgICA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VsID09PSAnbmV2ZXInID8gJ2F1dG8nIDogdGhpcy5fZmxvYXRMYWJlbDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IGZsb2F0TGFiZWwodmFsdWUpIHsKICAgICAgICAgICAgaWYgKHZhbHVlICE9PSB0aGlzLl9mbG9hdExhYmVsKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9mbG9hdExhYmVsID0gdmFsdWUgfHwgdGhpcy5fZ2V0RGVmYXVsdEZsb2F0TGFiZWxTdGF0ZSgpOwogICAgICAgICAgICAgICAgdGhpcy5fY2hhbmdlRGV0ZWN0b3JSZWYubWFya0ZvckNoZWNrKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgX2NvbnRyb2woKSB7CiAgICAgICAgICAgIC8vIFRPRE8oY3Jpc2JldG8pOiB3ZSBuZWVkIHRoaXMgd29ya2Fyb3VuZCBpbiBvcmRlciB0byBzdXBwb3J0IGJvdGggSXZ5IGFuZCBWaWV3RW5naW5lLgogICAgICAgICAgICAvLyAgV2Ugc2hvdWxkIGNsZWFuIHRoaXMgdXAgb25jZSBJdnkgaXMgdGhlIGRlZmF1bHQgcmVuZGVyZXIuCiAgICAgICAgICAgIHJldHVybiB0aGlzLl9leHBsaWNpdEZvcm1GaWVsZENvbnRyb2wgfHwgdGhpcy5fY29udHJvbE5vblN0YXRpYyB8fCB0aGlzLl9jb250cm9sU3RhdGljOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgX2NvbnRyb2wodmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5fZXhwbGljaXRGb3JtRmllbGRDb250cm9sID0gdmFsdWU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IF9sYWJlbENoaWxkKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fbGFiZWxDaGlsZE5vblN0YXRpYyB8fCB0aGlzLl9sYWJlbENoaWxkU3RhdGljOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIGFuIEVsZW1lbnRSZWYgZm9yIHRoZSBlbGVtZW50IHRoYXQgYSBvdmVybGF5IGF0dGFjaGVkIHRvIHRoZSBmb3JtLWZpZWxkIHNob3VsZCBiZQogICAgICAgICAqIHBvc2l0aW9uZWQgcmVsYXRpdmUgdG8uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXRDb25uZWN0ZWRPdmVybGF5T3JpZ2luKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fY29ubmVjdGlvbkNvbnRhaW5lclJlZiB8fCB0aGlzLl9lbGVtZW50UmVmOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nQWZ0ZXJDb250ZW50SW5pdCgpIHsKICAgICAgICAgICAgdGhpcy5fdmFsaWRhdGVDb250cm9sQ2hpbGQoKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjb250cm9sID0gdGhpcy5fY29udHJvbDsKICAgICAgICAgICAgaWYgKGNvbnRyb2wuY29udHJvbFR5cGUpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2VsZW1lbnRSZWYubmF0aXZlRWxlbWVudC5jbGFzc0xpc3QuYWRkKGBtYXQtZm9ybS1maWVsZC10eXBlLSR7Y29udHJvbC5jb250cm9sVHlwZX1gKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBTdWJzY3JpYmUgdG8gY2hhbmdlcyBpbiB0aGUgY2hpbGQgY29udHJvbCBzdGF0ZSBpbiBvcmRlciB0byB1cGRhdGUgdGhlIGZvcm0gZmllbGQgVUkuCiAgICAgICAgICAgIGNvbnRyb2wuc3RhdGVDaGFuZ2VzLnBpcGUoc3RhcnRXaXRoKCgvKiogQHR5cGUgez99ICovIChudWxsKSkpKS5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgdGhpcy5fdmFsaWRhdGVQbGFjZWhvbGRlcnMoKTsKICAgICAgICAgICAgICAgIHRoaXMuX3N5bmNEZXNjcmliZWRCeUlkcygpOwogICAgICAgICAgICAgICAgdGhpcy5fY2hhbmdlRGV0ZWN0b3JSZWYubWFya0ZvckNoZWNrKCk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgLy8gUnVuIGNoYW5nZSBkZXRlY3Rpb24gaWYgdGhlIHZhbHVlIGNoYW5nZXMuCiAgICAgICAgICAgIGlmIChjb250cm9sLm5nQ29udHJvbCAmJiBjb250cm9sLm5nQ29udHJvbC52YWx1ZUNoYW5nZXMpIHsKICAgICAgICAgICAgICAgIGNvbnRyb2wubmdDb250cm9sLnZhbHVlQ2hhbmdlcwogICAgICAgICAgICAgICAgICAgIC5waXBlKHRha2VVbnRpbCh0aGlzLl9kZXN0cm95ZWQpKQogICAgICAgICAgICAgICAgICAgIC5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gdGhpcy5fY2hhbmdlRGV0ZWN0b3JSZWYubWFya0ZvckNoZWNrKCkpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBOb3RlIHRoYXQgd2UgaGF2ZSB0byBydW4gb3V0c2lkZSBvZiB0aGUgYE5nWm9uZWAgZXhwbGljaXRseSwKICAgICAgICAgICAgLy8gaW4gb3JkZXIgdG8gYXZvaWQgdGhyb3dpbmcgdXNlcnMgaW50byBhbiBpbmZpbml0ZSBsb29wCiAgICAgICAgICAgIC8vIGlmIGB6b25lLXBhdGNoLXJ4anNgIGlzIGluY2x1ZGVkLgogICAgICAgICAgICB0aGlzLl9uZ1pvbmUucnVuT3V0c2lkZUFuZ3VsYXIoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgdGhpcy5fbmdab25lLm9uU3RhYmxlLmFzT2JzZXJ2YWJsZSgpLnBpcGUodGFrZVVudGlsKHRoaXMuX2Rlc3Ryb3llZCkpLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX291dGxpbmVHYXBDYWxjdWxhdGlvbk5lZWRlZE9uU3RhYmxlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudXBkYXRlT3V0bGluZUdhcCgpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAvLyBSdW4gY2hhbmdlIGRldGVjdGlvbiBhbmQgdXBkYXRlIHRoZSBvdXRsaW5lIGlmIHRoZSBzdWZmaXggb3IgcHJlZml4IGNoYW5nZXMuCiAgICAgICAgICAgIG1lcmdlKHRoaXMuX3ByZWZpeENoaWxkcmVuLmNoYW5nZXMsIHRoaXMuX3N1ZmZpeENoaWxkcmVuLmNoYW5nZXMpLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLl9vdXRsaW5lR2FwQ2FsY3VsYXRpb25OZWVkZWRPblN0YWJsZSA9IHRydWU7CiAgICAgICAgICAgICAgICB0aGlzLl9jaGFuZ2VEZXRlY3RvclJlZi5tYXJrRm9yQ2hlY2soKTsKICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAvLyBSZS12YWxpZGF0ZSB3aGVuIHRoZSBudW1iZXIgb2YgaGludHMgY2hhbmdlcy4KICAgICAgICAgICAgdGhpcy5faGludENoaWxkcmVuLmNoYW5nZXMucGlwZShzdGFydFdpdGgobnVsbCkpLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLl9wcm9jZXNzSGludHMoKTsKICAgICAgICAgICAgICAgIHRoaXMuX2NoYW5nZURldGVjdG9yUmVmLm1hcmtGb3JDaGVjaygpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIC8vIFVwZGF0ZSB0aGUgYXJpYS1kZXNjcmliZWQgYnkgd2hlbiB0aGUgbnVtYmVyIG9mIGVycm9ycyBjaGFuZ2VzLgogICAgICAgICAgICB0aGlzLl9lcnJvckNoaWxkcmVuLmNoYW5nZXMucGlwZShzdGFydFdpdGgobnVsbCkpLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLl9zeW5jRGVzY3JpYmVkQnlJZHMoKTsKICAgICAgICAgICAgICAgIHRoaXMuX2NoYW5nZURldGVjdG9yUmVmLm1hcmtGb3JDaGVjaygpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIGlmICh0aGlzLl9kaXIpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2Rpci5jaGFuZ2UucGlwZSh0YWtlVW50aWwodGhpcy5fZGVzdHJveWVkKSkuc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHJlcXVlc3RBbmltYXRpb25GcmFtZSA9PT0gJ2Z1bmN0aW9uJykgewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9uZ1pvbmUucnVuT3V0c2lkZUFuZ3VsYXIoKC8qKgogICAgICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWVzdEFuaW1hdGlvbkZyYW1lKCgvKioKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgICgpID0+IHRoaXMudXBkYXRlT3V0bGluZUdhcCgpKSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudXBkYXRlT3V0bGluZUdhcCgpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nQWZ0ZXJDb250ZW50Q2hlY2tlZCgpIHsKICAgICAgICAgICAgdGhpcy5fdmFsaWRhdGVDb250cm9sQ2hpbGQoKTsKICAgICAgICAgICAgaWYgKHRoaXMuX291dGxpbmVHYXBDYWxjdWxhdGlvbk5lZWRlZEltbWVkaWF0ZWx5KSB7CiAgICAgICAgICAgICAgICB0aGlzLnVwZGF0ZU91dGxpbmVHYXAoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nQWZ0ZXJWaWV3SW5pdCgpIHsKICAgICAgICAgICAgLy8gQXZvaWQgYW5pbWF0aW9ucyBvbiBsb2FkLgogICAgICAgICAgICB0aGlzLl9zdWJzY3JpcHRBbmltYXRpb25TdGF0ZSA9ICdlbnRlcic7CiAgICAgICAgICAgIHRoaXMuX2NoYW5nZURldGVjdG9yUmVmLmRldGVjdENoYW5nZXMoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uRGVzdHJveSgpIHsKICAgICAgICAgICAgdGhpcy5fZGVzdHJveWVkLm5leHQoKTsKICAgICAgICAgICAgdGhpcy5fZGVzdHJveWVkLmNvbXBsZXRlKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIERldGVybWluZXMgd2hldGhlciBhIGNsYXNzIGZyb20gdGhlIE5nQ29udHJvbCBzaG91bGQgYmUgZm9yd2FyZGVkIHRvIHRoZSBob3N0IGVsZW1lbnQuCiAgICAgICAgICogQHBhcmFtIHs/fSBwcm9wCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfc2hvdWxkRm9yd2FyZChwcm9wKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbmdDb250cm9sID0gdGhpcy5fY29udHJvbCA/IHRoaXMuX2NvbnRyb2wubmdDb250cm9sIDogbnVsbDsKICAgICAgICAgICAgcmV0dXJuIG5nQ29udHJvbCAmJiBuZ0NvbnRyb2xbcHJvcF07CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2hhc1BsYWNlaG9sZGVyKCkgewogICAgICAgICAgICByZXR1cm4gISEodGhpcy5fY29udHJvbCAmJiB0aGlzLl9jb250cm9sLnBsYWNlaG9sZGVyIHx8IHRoaXMuX3BsYWNlaG9sZGVyQ2hpbGQpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9oYXNMYWJlbCgpIHsKICAgICAgICAgICAgcmV0dXJuICEhdGhpcy5fbGFiZWxDaGlsZDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfc2hvdWxkTGFiZWxGbG9hdCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2NhbkxhYmVsRmxvYXQgJiYgKHRoaXMuX2NvbnRyb2wuc2hvdWxkTGFiZWxGbG9hdCB8fCB0aGlzLl9zaG91bGRBbHdheXNGbG9hdCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2hpZGVDb250cm9sUGxhY2Vob2xkZXIoKSB7CiAgICAgICAgICAgIC8vIEluIHRoZSBsZWdhY3kgYXBwZWFyYW5jZSB0aGUgcGxhY2Vob2xkZXIgaXMgcHJvbW90ZWQgdG8gYSBsYWJlbCBpZiBubyBsYWJlbCBpcyBnaXZlbi4KICAgICAgICAgICAgcmV0dXJuIHRoaXMuYXBwZWFyYW5jZSA9PT0gJ2xlZ2FjeScgJiYgIXRoaXMuX2hhc0xhYmVsKCkgfHwKICAgICAgICAgICAgICAgIHRoaXMuX2hhc0xhYmVsKCkgJiYgIXRoaXMuX3Nob3VsZExhYmVsRmxvYXQoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfaGFzRmxvYXRpbmdMYWJlbCgpIHsKICAgICAgICAgICAgLy8gSW4gdGhlIGxlZ2FjeSBhcHBlYXJhbmNlIHRoZSBwbGFjZWhvbGRlciBpcyBwcm9tb3RlZCB0byBhIGxhYmVsIGlmIG5vIGxhYmVsIGlzIGdpdmVuLgogICAgICAgICAgICByZXR1cm4gdGhpcy5faGFzTGFiZWwoKSB8fCB0aGlzLmFwcGVhcmFuY2UgPT09ICdsZWdhY3knICYmIHRoaXMuX2hhc1BsYWNlaG9sZGVyKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIERldGVybWluZXMgd2hldGhlciB0byBkaXNwbGF5IGhpbnRzIG9yIGVycm9ycy4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9nZXREaXNwbGF5ZWRNZXNzYWdlcygpIHsKICAgICAgICAgICAgcmV0dXJuICh0aGlzLl9lcnJvckNoaWxkcmVuICYmIHRoaXMuX2Vycm9yQ2hpbGRyZW4ubGVuZ3RoID4gMCAmJgogICAgICAgICAgICAgICAgdGhpcy5fY29udHJvbC5lcnJvclN0YXRlKSA/ICdlcnJvcicgOiAnaGludCc7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEFuaW1hdGVzIHRoZSBwbGFjZWhvbGRlciB1cCBhbmQgbG9ja3MgaXQgaW4gcG9zaXRpb24uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfYW5pbWF0ZUFuZExvY2tMYWJlbCgpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX2hhc0Zsb2F0aW5nTGFiZWwoKSAmJiB0aGlzLl9jYW5MYWJlbEZsb2F0KSB7CiAgICAgICAgICAgICAgICAvLyBJZiBhbmltYXRpb25zIGFyZSBkaXNhYmxlZCwgd2Ugc2hvdWxkbid0IGdvIGluIGhlcmUsCiAgICAgICAgICAgICAgICAvLyBiZWNhdXNlIHRoZSBgdHJhbnNpdGlvbmVuZGAgd2lsbCBuZXZlciBmaXJlLgogICAgICAgICAgICAgICAgaWYgKHRoaXMuX2FuaW1hdGlvbnNFbmFibGVkICYmIHRoaXMuX2xhYmVsKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fc2hvd0Fsd2F5c0FuaW1hdGUgPSB0cnVlOwogICAgICAgICAgICAgICAgICAgIGZyb21FdmVudCh0aGlzLl9sYWJlbC5uYXRpdmVFbGVtZW50LCAndHJhbnNpdGlvbmVuZCcpLnBpcGUodGFrZSgxKSkuc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fc2hvd0Fsd2F5c0FuaW1hdGUgPSBmYWxzZTsKICAgICAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLmZsb2F0TGFiZWwgPSAnYWx3YXlzJzsKICAgICAgICAgICAgICAgIHRoaXMuX2NoYW5nZURldGVjdG9yUmVmLm1hcmtGb3JDaGVjaygpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEVuc3VyZSB0aGF0IHRoZXJlIGlzIG9ubHkgb25lIHBsYWNlaG9sZGVyIChlaXRoZXIgYHBsYWNlaG9sZGVyYCBhdHRyaWJ1dGUgb24gdGhlIGNoaWxkIGNvbnRyb2wKICAgICAgICAgKiBvciBjaGlsZCBlbGVtZW50IHdpdGggdGhlIGBtYXQtcGxhY2Vob2xkZXJgIGRpcmVjdGl2ZSkuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF92YWxpZGF0ZVBsYWNlaG9sZGVycygpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX2NvbnRyb2wucGxhY2Vob2xkZXIgJiYgdGhpcy5fcGxhY2Vob2xkZXJDaGlsZCkgewogICAgICAgICAgICAgICAgdGhyb3cgZ2V0TWF0Rm9ybUZpZWxkUGxhY2Vob2xkZXJDb25mbGljdEVycm9yKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogRG9lcyBhbnkgZXh0cmEgcHJvY2Vzc2luZyB0aGF0IGlzIHJlcXVpcmVkIHdoZW4gaGFuZGxpbmcgdGhlIGhpbnRzLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfcHJvY2Vzc0hpbnRzKCkgewogICAgICAgICAgICB0aGlzLl92YWxpZGF0ZUhpbnRzKCk7CiAgICAgICAgICAgIHRoaXMuX3N5bmNEZXNjcmliZWRCeUlkcygpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBFbnN1cmUgdGhhdCB0aGVyZSBpcyBhIG1heGltdW0gb2Ygb25lIG9mIGVhY2ggYDxtYXQtaGludD5gIGFsaWdubWVudCBzcGVjaWZpZWQsIHdpdGggdGhlCiAgICAgICAgICogYXR0cmlidXRlIGJlaW5nIGNvbnNpZGVyZWQgYXMgYGFsaWduPSJzdGFydCJgLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfdmFsaWRhdGVIaW50cygpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX2hpbnRDaGlsZHJlbikgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IHN0YXJ0SGludDsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCBlbmRIaW50OwogICAgICAgICAgICAgICAgdGhpcy5faGludENoaWxkcmVuLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBoaW50CiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoaGludCkgPT4gewogICAgICAgICAgICAgICAgICAgIGlmIChoaW50LmFsaWduID09PSAnc3RhcnQnKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzdGFydEhpbnQgfHwgdGhpcy5oaW50TGFiZWwpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IGdldE1hdEZvcm1GaWVsZER1cGxpY2F0ZWRIaW50RXJyb3IoJ3N0YXJ0Jyk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnRIaW50ID0gaGludDsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoaGludC5hbGlnbiA9PT0gJ2VuZCcpIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGVuZEhpbnQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IGdldE1hdEZvcm1GaWVsZER1cGxpY2F0ZWRIaW50RXJyb3IoJ2VuZCcpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGVuZEhpbnQgPSBoaW50OwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIHRoZSBkZWZhdWx0IGZsb2F0IGxhYmVsIHN0YXRlLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZ2V0RGVmYXVsdEZsb2F0TGFiZWxTdGF0ZSgpIHsKICAgICAgICAgICAgcmV0dXJuICh0aGlzLl9kZWZhdWx0cyAmJiB0aGlzLl9kZWZhdWx0cy5mbG9hdExhYmVsKSB8fCB0aGlzLl9sYWJlbE9wdGlvbnMuZmxvYXQgfHwgJ2F1dG8nOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIHRoZSBsaXN0IG9mIGVsZW1lbnQgSURzIHRoYXQgZGVzY3JpYmUgdGhlIGNoaWxkIGNvbnRyb2wuIFRoaXMgYWxsb3dzIHRoZSBjb250cm9sIHRvIHVwZGF0ZQogICAgICAgICAqIGl0cyBgYXJpYS1kZXNjcmliZWRieWAgYXR0cmlidXRlIGFjY29yZGluZ2x5LgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfc3luY0Rlc2NyaWJlZEJ5SWRzKCkgewogICAgICAgICAgICBpZiAodGhpcy5fY29udHJvbCkgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IGlkcyA9IFtdOwogICAgICAgICAgICAgICAgaWYgKHRoaXMuX2dldERpc3BsYXllZE1lc3NhZ2VzKCkgPT09ICdoaW50JykgewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBzdGFydEhpbnQgPSB0aGlzLl9oaW50Q2hpbGRyZW4gPwogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9oaW50Q2hpbGRyZW4uZmluZCgoLyoqCiAgICAgICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gaGludAogICAgICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAgICAgaGludCA9PiBoaW50LmFsaWduID09PSAnc3RhcnQnKSkgOiBudWxsOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBlbmRIaW50ID0gdGhpcy5faGludENoaWxkcmVuID8KICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5faGludENoaWxkcmVuLmZpbmQoKC8qKgogICAgICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGhpbnQKICAgICAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgICAgIGhpbnQgPT4gaGludC5hbGlnbiA9PT0gJ2VuZCcpKSA6IG51bGw7CiAgICAgICAgICAgICAgICAgICAgaWYgKHN0YXJ0SGludCkgewogICAgICAgICAgICAgICAgICAgICAgICBpZHMucHVzaChzdGFydEhpbnQuaWQpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICh0aGlzLl9oaW50TGFiZWwpIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWRzLnB1c2godGhpcy5faGludExhYmVsSWQpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBpZiAoZW5kSGludCkgewogICAgICAgICAgICAgICAgICAgICAgICBpZHMucHVzaChlbmRIaW50LmlkKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmICh0aGlzLl9lcnJvckNoaWxkcmVuKSB7CiAgICAgICAgICAgICAgICAgICAgaWRzID0gdGhpcy5fZXJyb3JDaGlsZHJlbi5tYXAoKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZXJyb3IKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgIGVycm9yID0+IGVycm9yLmlkKSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLl9jb250cm9sLnNldERlc2NyaWJlZEJ5SWRzKGlkcyk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVGhyb3dzIGFuIGVycm9yIGlmIHRoZSBmb3JtIGZpZWxkJ3MgY29udHJvbCBpcyBtaXNzaW5nLgogICAgICAgICAqIEBwcm90ZWN0ZWQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF92YWxpZGF0ZUNvbnRyb2xDaGlsZCgpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLl9jb250cm9sKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBnZXRNYXRGb3JtRmllbGRNaXNzaW5nQ29udHJvbEVycm9yKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVXBkYXRlcyB0aGUgd2lkdGggYW5kIHBvc2l0aW9uIG9mIHRoZSBnYXAgaW4gdGhlIG91dGxpbmUuIE9ubHkgcmVsZXZhbnQgZm9yIHRoZSBvdXRsaW5lCiAgICAgICAgICogYXBwZWFyYW5jZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHVwZGF0ZU91dGxpbmVHYXAoKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbGFiZWxFbCA9IHRoaXMuX2xhYmVsID8gdGhpcy5fbGFiZWwubmF0aXZlRWxlbWVudCA6IG51bGw7CiAgICAgICAgICAgIGlmICh0aGlzLmFwcGVhcmFuY2UgIT09ICdvdXRsaW5lJyB8fCAhbGFiZWxFbCB8fCAhbGFiZWxFbC5jaGlsZHJlbi5sZW5ndGggfHwKICAgICAgICAgICAgICAgICFsYWJlbEVsLnRleHRDb250ZW50LnRyaW0oKSkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICghdGhpcy5fcGxhdGZvcm0uaXNCcm93c2VyKSB7CiAgICAgICAgICAgICAgICAvLyBnZXRCb3VuZGluZ0NsaWVudFJlY3QgaXNuJ3QgYXZhaWxhYmxlIG9uIHRoZSBzZXJ2ZXIuCiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gSWYgdGhlIGVsZW1lbnQgaXMgbm90IHByZXNlbnQgaW4gdGhlIERPTSwgdGhlIG91dGxpbmUgZ2FwIHdpbGwgbmVlZCB0byBiZSBjYWxjdWxhdGVkCiAgICAgICAgICAgIC8vIHRoZSBuZXh0IHRpbWUgaXQgaXMgY2hlY2tlZCBhbmQgaW4gdGhlIERPTS4KICAgICAgICAgICAgaWYgKCF0aGlzLl9pc0F0dGFjaGVkVG9ET00oKSkgewogICAgICAgICAgICAgICAgdGhpcy5fb3V0bGluZUdhcENhbGN1bGF0aW9uTmVlZGVkSW1tZWRpYXRlbHkgPSB0cnVlOwogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHN0YXJ0V2lkdGggPSAwOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBnYXBXaWR0aCA9IDA7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgY29udGFpbmVyID0gdGhpcy5fY29ubmVjdGlvbkNvbnRhaW5lclJlZi5uYXRpdmVFbGVtZW50OwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHN0YXJ0RWxzID0gY29udGFpbmVyLnF1ZXJ5U2VsZWN0b3JBbGwoJy5tYXQtZm9ybS1maWVsZC1vdXRsaW5lLXN0YXJ0Jyk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZ2FwRWxzID0gY29udGFpbmVyLnF1ZXJ5U2VsZWN0b3JBbGwoJy5tYXQtZm9ybS1maWVsZC1vdXRsaW5lLWdhcCcpOwogICAgICAgICAgICBpZiAodGhpcy5fbGFiZWwgJiYgdGhpcy5fbGFiZWwubmF0aXZlRWxlbWVudC5jaGlsZHJlbi5sZW5ndGgpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGN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ZWRpYXRlbHkgPSBmYWxzZTsKICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBjb250YWluZXJTdGFydCA9IHRoaXMuX2dldFN0YXJ0RW5kKGNvbnRhaW5lclJlY3QpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgbGFiZWxTdGFydCA9IHRoaXMuX2dldFN0YXJ0RW5kKGxhYmVsRWwuY2hpbGRyZW5bMF0uZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCkpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IGxhYmVsV2lkdGggPSAwOwogICAgICAgICAgICAgICAgZm9yIChjb25zdCBjaGlsZCBvZiBsYWJlbEVsLmNoaWxkcmVuKSB7CiAgICAgICAgICAgICAgICAgICAgbGFiZWxXaWR0aCArPSBjaGlsZC5vZmZzZXRXaWR0aDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHN0YXJ0V2lkdGggPSBNYXRoLmFicyhsYWJlbFN0YXJ0IC0gY29udGFpbmVyU3RhcnQpIC0gb3V0bGluZUdhcFBhZGRpbmc7CiAgICAgICAgICAgICAgICBnYXBXaWR0aCA9IGxhYmVsV2lkdGggPiAwID8gbGFiZWxXaWR0aCAqIGZsb2F0aW5nTGFiZWxTY2FsZSArIG91dGxpbmVHYXBQYWRkaW5nICogMiA6IDA7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBzdGFydEVscy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgc3RhcnRFbHNbaV0uc3R5bGUud2lkdGggPSBgJHtzdGFydFdpZHRofXB4YDsKICAgICAgICAgICAgfQogICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGdhcEVscy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgZ2FwRWxzW2ldLnN0eWxlLndpZHRoID0gYCR7Z2FwV2lkdGh9cHhgOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX291dGxpbmVHYXBDYWxjdWxhdGlvbk5lZWRlZE9uU3RhYmxlID0KICAgICAgICAgICAgICAgIHRoaXMuX291dGxpbmVHYXBDYWxjdWxhdGlvbk5lZWRlZEltbWVkaWF0ZWx5ID0gZmFsc2U7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEdldHMgdGhlIHN0YXJ0IGVuZCBvZiB0aGUgcmVjdCBjb25zaWRlcmluZyB0aGUgY3VycmVudCBkaXJlY3Rpb25hbGl0eS4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gcmVjdAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2dldFN0YXJ0RW5kKHJlY3QpIHsKICAgICAgICAgICAgcmV0dXJuICh0aGlzLl9kaXIgJiYgdGhpcy5fZGlyLnZhbHVlID09PSAncnRsJykgPyByZWN0LnJpZ2h0IDogcmVjdC5sZWZ0OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDaGVja3Mgd2hldGhlciB0aGUgZm9ybSBmaWVsZCBpcyBhdHRhY2hlZCB0byB0aGUgRE9NLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfaXNBdHRhY2hlZFRvRE9NKCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGVsZW1lbnQgPSB0aGlzLl9lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQ7CiAgICAgICAgICAgIGlmIChlbGVtZW50LmdldFJvb3ROb2RlKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAg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aWJsZS4KICAgICAqLwogICAgY2xhc3MgQmxvY2tTY3JvbGxTdHJhdGVneSB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBfdmlld3BvcnRSdWxlcgogICAgICAgICAqIEBwYXJhbSB7P30gZG9jdW1lbnQKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3Rvcihfdmlld3BvcnRSdWxlciwgZG9jdW1lbnQpIHsKICAgICAgICAgICAgdGhpcy5fdmlld3BvcnRSdWxlciA9IF92aWV3cG9ydFJ1bGVyOwogICAgICAgICAgICB0aGlzLl9wcmV2aW91c0hUTUxTdHlsZXMgPSB7IHRvcDogJycsIGxlZnQ6ICcnIH07CiAgICAgICAgICAgIHRoaXMuX2lzRW5hYmxlZCA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLl9kb2N1bWVudCA9IGRvY3VtZW50OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBdHRhY2hlcyB0aGlzIHNjcm9sbCBzdHJhdGVneSB0byBhbiBvdmVybGF5LgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYXR0YWNoKCkgeyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQmxvY2tzIHBhZ2UtbGV2ZWwgc2Nyb2xsIHdoaWxlIHRoZSBhdHRhY2hlZCBvdmVybGF5IGlzIG9wZW4uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBlbmFibGUoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9jYW5CZUVuYWJsZWQoKSkgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3Qgcm9vdCA9ICgvKiogQHR5cGUgez99ICovICh0aGlzLl9kb2N1bWVudC5kb2N1bWVudEVsZW1lbnQpKTsKICAgICAgICAgICAgICAgIHRoaXMuX3ByZXZpb3VzU2Nyb2xsUG9zaXRpb24gPSB0aGlzLl92aWV3cG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ZlcmxheSBpcyBvcGVuLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZGlzYWJsZSgpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX2lzRW5hYmxlZCkgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgaHRtbCA9ICgvKiogQHR5cGUgez99ICovICh0aGlzLl9kb2N1bWVudC5kb2N1bWVudEVsZW1lbnQpKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGJvZHkgPSAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5fZG9jdW1lbnQuYm9keSkpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgaHRtbFN0eWxlID0gKC8qKiBAdHlwZSB7P30gKi8gKGh0bWwuc3R5bGUpKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGJvZHlTdHlsZSA9ICgvKiogQHR5cGUgez99ICovIChib2R5LnN0eWxlKSk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBwcmV2aW91c0h0bWxTY3JvbGxCZWhhdmlvciA9IGh0bWxTdHlsZS5zY3JvbGxCZWhhdmlvciB8fCAnJzsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHByZXZpb3VzQm9keVNjcm9sbEJlaGF2aW9yID0gYm9keVN0eWxlLnNjcm9sbEJlaGF2aW9yIHx8ICcnOwogICAgICAgICAgICAgICAgdGhpcy5faXNFbmFibGVkID0gZmFsc2U7CiAgICAgICAgICAgICAgICBodG1sU3R5bGUubGVmdCA9IHRoaXMuX3ByZXZpb3VzSFRNTFN0eWxlcy5sZWZ0OwogICAgICAgIC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ZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLmRpc2FibGUoKTsKICAgICAgICAgICAgICAgIGlmICh0aGlzLl9vdmVybGF5UmVmLmhhc0F0dGFjaGVkKCkpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9uZ1pvbmUucnVuKCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICgpID0+IHRoaXMuX292ZXJsYXlSZWYuZGV0YWNoKCkpKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEF0dGFjaGVzIHRoaXMgc2Nyb2xsIHN0cmF0ZWd5IHRvIGFuIG92ZXJsYXkuCiAgICAgICAgICogQHBhcmFtIHs/fSBvdmVybGF5UmVmCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBhdHRhY2gob3ZlcmxheVJlZikgewogICAgICAgICAgICBpZiAodGhpcy5fb3ZlcmxheVJlZikgewogICAgICAgICAgICAgICAgdGhyb3cgZ2V0TWF0U2Nyb2xsU3RyYXRlZ3lBbHJlYWR5QXR0YWNoZWRFcnJvcigpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX292ZXJsYXlSZWYgPSBvdmVybGF5UmVmOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBFbmFibGVzIHRoZSBjbG9zaW5nIG9mIHRoZSBhdHRhY2hlZCBvdmVybGF5IG9uIHNjcm9sbC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGVuYWJsZSgpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX3Njcm9sbFN1YnNjcmlwdGlvbikgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc3RyZWFtID0gdGhpcy5fc2Nyb2xsRGlzcGF0Y2hlci5zY3JvbGxlZCgwKTsKICAgICAgICAgICAgaWYgKHRoaXMuX2NvbmZpZyAmJiB0aGlzLl9jb25maWcudGhyZXNob2xkICYmIHRoaXMuX2NvbmZpZy50aHJlc2hvbGQgPiAxKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9pbml0aWFsU2Nyb2xsUG9zaXRpb24gPSB0aGlzLl92aWV3cG9ydFJ1bGVyLmdldFZpZXdwb3J0U2Nyb2xsUG9zaXRpb24oKS50b3A7CiAgICAgICAgICAgICAgICB0aGlzLl9zY3JvbGxTdWJzY3JpcHRpb24gPSBzdHJlYW0uc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3Qgc2Nyb2xsUG9zaXRpb24gPSB0aGlzLl92aWV3cG9ydFJ1bGVyLmdldFZpZXdwb3J0U2Nyb2xsUG9zaXRpb24oKS50b3A7CiAgICAgICAgICAgICAgICAgICAgaWYgKE1hdGguYWJzKHNjcm9sbFBvc2l0aW9uIC0gdGhpcy5faW5pdGlhbFNjcm9sbFBvc2l0aW9uKSA+ICgvKiogQHR5cGUgez99ICovICgoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5fY29uZmlnKSkudGhyZXNob2xkKSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fZGV0YWNoKCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9vdmVybGF5UmVmLnVwZGF0ZVBvc2l0aW9uKCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fc2Nyb2xsU3Vic2NyaXB0aW9uID0gc3RyZWFtLnN1YnNjcmliZSh0aGlzLl9kZXRhY2gpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIERpc2FibGVzIHRoZSBjbG9zaW5nIHRoZSBhdHRhY2hlZCBvdmVybGF5IG9uIHNjcm9sbC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGRpc2FibGUoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9zY3JvbGxTdWJzY3JpcHRpb24pIHsKICAgICAgICAgICAgICAgIHRoaXMuX3Njcm9sbFN1YnNjcmlwdGlvbi51bnN1YnNjcmliZSgpOwogICAgICAgICAgICAgICAgdGhpcy5fc2Nyb2xsU3Vic2NyaXB0aW9uID0gbnVsbDsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGRldGFjaCgpIHsKICAgICAgICAgICAgdGhpcy5kaXNhYmxlKCk7CiAgICAgICAgICAgIHRoaXMuX292ZXJsYXlSZWYgPSAoLyoqIEB0eXBlIHs/fSAqLyAobnVsbCkpOwogICAgICAgIH0KICAgIH0KCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcgYWRkZWQgYnkgdHNpY2tsZQogICAgICogR2VuZXJhdGVkIGZyb206IHNyYy9jZGsvb3ZlcmxheS9zY3JvbGwvbm9vcC1zY3JvbGwtc3RyYXRlZ3kudHMKICAgICAqIEBzdXBwcmVzcyB7Y2hlY2tUeXBlcyxjb25zdGFudFByb3BlcnR5LGV4dHJhUmVxdWlyZSxtaXNzaW5nT3ZlcnJpZGUsbWlzc2luZ1JldHVybix1bnVzZWRQcml2YXRlTWVtYmVycyx1c2VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgLyoqCiAgICAgKiBAbGljZW5zZQogICAgICogQ29weXJpZ2h0IEdvb2dsZSBMTEMgQWxsIFJpZ2h0cyBSZXNlcnZlZC4KICAgICAqCiAgICAgKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSBhbiBNSVQtc3R5bGUgbGljZW5zZSB0aGF0IGNhbiBiZQogICAgICogZm91bmQgaW4gdGhlIExJQ0VOU0UgZmlsZSBhdCBodHRwczovL2FuZ3VsYXIuaW8vbGljZW5zZQogICAgICovCiAgICAvKioKICAgICAqIFNjcm9sbCBzdHJhdGVneSB0aGF0IGRvZXNuJ3QgZG8gYW55dGhpbmcuCiAgICAgKi8KICAgIGNsYXNzIE5vb3BTY3JvbGxTdHJhdGVneSB7CiAgICAgICAgLyoqCiAgICAgICAgICogRG9lcyBub3RoaW5nLCBhcyB0aGlzIHNjcm9sbCBzdHJhdGVneSBpcyBhIG5vLW9wLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZW5hYmxlKCkgeyB9CiAgICAgICAgLyoqCiAgICAgICAgICogRG9lcyBub3RoaW5nLCBhcyB0aGlzIHNjcm9sbCBzdHJhdGVneSBpcyBhIG5vLW9wLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZGlzYWJsZSgpIHsgfQogICAgICAgIC8qKgogICAgICAgICAqIERvZXMgbm90aGluZywgYXMgdGhpcyBzY3JvbGwgc3RyYXRlZ3kgaXMgYSBuby1vcC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGF0dGFjaCgpIHsgfQogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogc3JjL2Nkay9vdmVybGF5L3Bvc2l0aW9uL3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xpbmcgY29udGFpbmVycyAoZnJvbSBnZXRCb3VuZGluZ0NsaWVudFJlY3QpCiAgICAgKiBAcmV0dXJuIHs/fSBXaGV0aGVyIHRoZSBlbGVtZW50IGlzIHNjcm9sbGVkIG91dCBvZiB2aWV3CiAgICAgKi8KICAgIGZ1bmN0aW9uIGlzRWxlbWVudFNjcm9sbGVkT3V0c2lkZVZpZXcoZWxlbWVudCwgc2Nyb2xsQ29udGFpbmVycykgewogICAgICAgIHJldHVybiBzY3JvbGxDb250YWluZXJzLnNvbWUoKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gY29udGFpbmVyQm91bmRzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBjb250YWluZXJCb3VuZHMgPT4gewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG91dHNpZGVBYm92ZSA9IGVsZW1lbnQuYm90dG9tIDwgY29udGFpbmVyQm91bmRzLnRvcDsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBvdXRzaWRlQmVsb3cgPSBlbGVtZW50LnRvcCA+IGNvbnRhaW5lckJvdW5kcy5ib3R0b207CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgb3V0c2lkZUxlZnQgPSBlbGVtZW50LnJpZ2h0IDwgY29udGFpbmVyQm91bmRzLmxlZnQ7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgb3V0c2lkZVJpZ2h0ID0gZWxlbWVudC5sZWZ0ID4gY29udGFpbmVyQm91bmRzLnJpZ2h0OwogICAgICAgICAgICByZXR1cm4gb3V0c2lkZUFib3ZlIHx8IG91dHNpZGVCZWxvdyB8fCBvdXRzaWRlTGVmdCB8fCBvdXRzaWRlUmlnaHQ7CiAgICAgICAgfSkpOwogICAgfQogICAgLyoqCiAgICAgKiBHZXRzIHd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AgIC8qKgogICAgICAgICAqIEF0dGFjaGVzIHRoaXMgc2Nyb2xsIHN0cmF0ZWd5IHRvIGFuIG92ZXJsYXkuCiAgICAgICAgICogQHBhcmFtIHs/fSBvdmVybGF5UmVmCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBhdHRhY2gob3ZlcmxheVJlZikgewogICAgICAgICAgICBpZiAodGhpcy5fb3ZlcmxheVJlZikgewogICAgICAgICAgICAgICAgdGhyb3cgZ2V0TWF0U2Nyb2xsU3RyYXRlZ3lBbHJlYWR5QXR0YWNoZWRFcnJvcigpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX292ZXJsYXlSZWYgPSBvdmVybGF5UmVmOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBFbmFibGVzIHJlcG9zaXRpb25pbmcgb2YgdGhlIGF0dGFjaGVkIG92ZXJsYXkgb24gc2Nyb2xsLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZW5hYmxlKCkgewogICAgICAgICAgICBpZiAoIXRoaXMuX3Njcm9sbFN1YnNjcmlwdGlvbikgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgdGhyb3R0bGUgPSB0aGlzLl9jb25maWcgPyB0aGlzLl9jb25maWcuc2Nyb2xsVGhyb3R0bGUgOiAwOwogICAgICAgICAgICAgICAgdGhpcy5fc2Nyb2xsU3Vic2NyaXB0aW9uID0gdGhpcy5fc2Nyb2xsRGlzcGF0Y2hlci5zY3JvbGxlZCh0aHJvdHRsZSkuc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9vdmVybGF5UmVmLnVwZGF0ZVBvc2l0aW9uKCk7CiAgICAgICAgICAgICAgICAgICAgLy8gVE9ETyhjcmlzYmV0byk6IG1ha2UgYGNsb3NlYCBvbiBieSBkZWZhdWx0IG9uY2UgYWxsIGNvbXBvbmVudHMgY2FuIGhhbmRsZSBpdC4KICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5fY29uZmlnICYmIHRoaXMuX2NvbmZpZy5hdXRvQ2xvc2UpIHsKICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBvdmVybGF5UmVjdCA9IHRoaXMuX292ZXJsYXlSZWYub3ZlcmxheUVsZW1lbnQuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCk7CiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHsgd2lkdGgsIGhlaWdodCB9ID0gdGhpcy5fdmlld3BvcnRSdWxlci5nZXRWaWV3cG9ydFNpemUoKTsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gVE9ETyhjcmlzYmV0byk6IGluY2x1ZGUgYWxsIGFuY2VzdG9yIHNjcm9sbCBjb250YWluZXJzIGhlcmUgb25jZQogICAgICAgICAgICAgICAgICAgICAgICAvLyB3ZSBoYXZlIGEgd2F5IG9mIGV4cG9zaW5nIHRoZSB0cmlnZ2VyIGVsZW1lbnQgdG8gdGhlIHNjcm9sbCBzdHJhdGVneS4KICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBwYXJlbnRSZWN0cyA9IFt7IHdpZHRoLCBoZWlnaHQsIGJvdHRvbTogaGVpZ2h0LCByaWdodDogd2lkdGgsIHRvcDogMCwgbGVmdDogMCB9XTsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlzRWxlbWVudFNjcm9sbGVkT3V0c2lkZVZpZXcob3ZlcmxheVJlY3QsIHBhcmVudFJlY3RzKSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5kaXNhYmxlKCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9uZ1pvbmUucnVuKCgvKioKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgICgpID0+IHRoaXMuX292ZXJsYXlSZWYuZGV0YWNoKCkpKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBEaXNhYmxlcyByZXBvc2l0aW9uaW5nIG9mIHRoZSBhdHRhY2hlZCBvdmVybGF5IG9uIHNjcm9sbC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGRpc2FibGUoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9zY3JvbGxTdWJzY3JpcHRpb24pIHsKICAgICAgICAgICAgICAgIHRoaXMuX3Njcm9sbFN1YnNjcmlwdGlvbi51bnN1YnNjcmliZSgpOwogICAgICAgICAgICAgICAgdGhpcy5fc2Nyb2xsU3Vic2NyaXB0aW9uID0gbnVsbDsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGRldGFjaCgpIHsKICAgICAgICAgICAgdGhpcy5kaXNhYmxlKCk7CiAgICAgICAgICAgIHRoaXMuX292ZXJsYXlSZWYgPSAoLyoqIEB0eXBlIHs/fSAqLyAobnVsbCkpOwogICAgICAgIH0KICAgIH0KCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcgYWRkZWQgYnkgdHNpY2tsZQogICAgICogR2VuZXJhdGVkIGZyb206IHNyYy9jZGsvb3ZlcmxheS9zY3JvbGwvc2Nyb2xsLXN0cmF0ZWd5LW9wdGlvbnMudHMKICA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AgICAvKioKICAgICAgICAgICAgICogRG8gbm90aGluZyBvbiBzY3JvbGwuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLm5vb3AgPSAoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiBuZXcgTm9vcFNjcm9sbFN0cmF0ZWd5KCkpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQ2xvc2UgdGhlIG92ZXJsYXkgYXMgc29vbiBhcyB0aGUgdXNlciBzY3JvbGxzLgogICAgICAgICAgICAgKiBAcGFyYW0gY29uZmlnIENvbmZpZ3VyYXRpb24gdG8gYmUgdXNlZCBpbnNpZGUgdGhlIHNjcm9sbCBzdHJhdGVneS4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuY2xvc2UgPSAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7Pz19IGNvbmZpZwogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGNvbmZpZykgPT4gbmV3IENsb3NlU2Nyb2xsU3RyYXRlZ3kodGhpcy5fc2Nyb2xsRGlzcGF0Y2hlciwgdGhpcy5fbmdab25lLCB0aGlzLl92aWV3cG9ydFJ1bGVyLCBjb25maWcpKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEJsb2NrIHNjcm9sbGluZy4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuYmxvY2sgPSAoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiBuZXcgQmxvY2tTY3JvbGxTdHJhdGVneSh0aGlzLl92aWV3cG9ydFJ1bGVyLCB0aGlzLl9kb2N1bWVudCkpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogVXBkYXRlIHRoZSBvdmVybGF5J3MgcG9zaXRpb24gb24gc2Nyb2xsLgogICAg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W5nT3ZlcnJpZGUsbWlzc2luZ1JldHVybix1bnVzZWRQcml2YXRlTWVtYmVycyx1c2VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgLyoqCiAgICAgKiBJbml0aWFsIGNvbmZpZ3VyYXRpb24gdXNlZCB3aGVuIGNyZWF0aW5nIGFuIG92ZXJsYXkuCiAgICAgKi8KICAgIGNsYXNzIE92ZXJsYXlDb25maWcgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7Pz19IGNvbmZpZwogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKGNvbmZpZykgewogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogU3RyYXRlZ3kgdG8gYmUgdXNlZCB3aGVuIGhhbmRsaW5nIHNjcm9sbCBldmVudHMgd2hpbGUgdGhlIG92ZXJsYXkgaXMgb3Blbi4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuc2Nyb2xsU3RyYXRlZ3kgPSBuZXcgTm9vcFNjcm9sbFN0cmF0ZWd5KCk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBDdXN0b20gY2xhc3MgdG8gYWRkIHRvIHRoZSBvdmVybGF5IHBhbmUuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLnBhbmVsQ2xhc3MgPSAnJzsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFdoZXRoZXIgdGhlIG92ZXJsYXkgaGFzIGEgYmFja2Ryb3AuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmhhc0JhY2tkcm9wID0gZmFsc2U7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBDdXN0b20gY2xhc3MgdG8gYWRkIHRvIHRoZSBiYWNrZHJvcAogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5iYWNrZHJvcENsYXNzID0gJ2Nkay1vdmVybGF5LWRhcmstYmFja2Ryb3AnOwogICAgICAgICAgICAvKio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HVuZGVmaW5lZCkgewogICAgICAgICAgICAgICAgICAgICAgICAvLyBUeXBlU2NyaXB0LCBhcyBvZiB2ZXJzaW9uIDMuNSwgc2VlcyB0aGUgbGVmdC1oYW5kLXNpZGUgb2YgdGhpcyBleHByZXNzaW9uCiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGFzICJJIGRvbid0IGtub3cgKndoaWNoKiBrZXkgdGhpcyBpcywgc28gdGhlIG9ubHkgdmFsaWQgdmFsdWUgaXMgdGhlIGludGVyc2VjdGlvbgogICAgICAgICAgICAgICAgICAgICAgICAvLyBvZiBhbGwgdGhlIHBvc2libGUgdmFsdWVzLiIgSW4gdGhpcyBjYXNlLCB0aGF0IGhhcHBlbnMgdG8gYmUgYHVuZGVmaW5lZGAuIFR5cGVTY3JpcHQKICAgICAgICAgICAgICAgICAgICAgICAgLy8gaXMgbm90IHNtYXJ0IGVub3VnaCB0byBzZWUgdGhhdCB0aGUgcmlnaHQtaGFuZC1zaWRlIGlzIGFjdHVhbGx5IGFuIGFjY2VzcyBvZiB0aGUgc2FtZQogICAgICAgICAgICAgICAgICAgICAgICAvLyBleGFjdCB0eXBlIHdpdGggdGhlIHNhbWUgZXhhY3Qga2V5LCBtZWFuaW5nIHRoYXQgdGhlIHZhbHVlIHR5cGUgbXVzdCBiZSBpZGVudGljYWwuCiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFNvIHdlIHVzZSBgYW55YCB0byB3b3JrIGFyb3VuZCB0aGlzLgogICAgICAgICAgICAgICAgICAgICAgICB0aGlzW2tleV0gPSAoLyoqIEB0eXBlIHs/fSAqLyAoY29uZmlnW2tleV0pKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIFRoZSBwb2ludHMgb2YgdGhlIG9yaWdpbiBlbGVtZW50IGFuZCB0aGUgb3ZlcmxheSBlbGVtZW50IHRvIGNvbm5lY3QuCiAg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llbnQgcmVjdGFuZ2xlIGV4Y2VlZHMgdGhlCiAgICAgKiBib3VuZHMgb2YgYW55IG9uZSBvZiB0aGUgc3RyYXRlZ3kncyBTY3JvbGxhYmxlJ3MgYm91bmRpbmcgY2xpZW50IHJlY3RhbmdsZS4KICAgICAqCiAgICAgKiBUaGUgb3ZlcmxheSBhbmQgb3JpZ2luIGFyZSBvdXRzaWRlIHZpZXcgaWYgdGhlcmUgaXMgbm8gb3ZlcmxhcCBiZXR3ZWVuIHRoZWlyIGJvdW5kaW5nIGNsaWVudAogICAgICogcmVjdGFuZ2xlIGFuZCBhbnkgb25lIG9mIHRoZSBzdHJhdGVneSdzIFNjcm9sbGFibGUncyBib3VuZGluZyBjbGllbnQgcmVjdGFuZ2xlLgogICAgICoKICAgICAqICAgICAgIC0tLS0tLS0tLS0tICAgICAgICAgICAgICAgICAgICAtLS0tLS0tLS0tLQogICAgICogICAgICAgfCBvdXRzaWRlIHwgICAgICAgICAgICAgICAgICAgIHwgY2xpcHBlZCB8CiAgICAgKiAgICAgICB8ICB2aWV3ICAgfCAgICAgICAgICAgICAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KICAgICAqICAgICAgIHwgICAgICAgICB8ICAgICAgICAgICAgICB8ICAgICB8ICAgICAgICAgfCAgICAgICAgfAogICAgICogICAgICAgLS0tLS0tLS0tLSAgICAgICAgICAgICAgIHwgICAgIC0tLS0tLS0tLS0tICAgICAgICB8CiAgICAgKiAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gICAgfCAgICAgICAgICAgICAgICAgICAgICAgIHwKICAgICAqICB8ICAgICAgICAgICAgICAgICAgICAgICAgfCAgICB8ICAgICAgU2Nyb2xsYWJsZSAgICAgICAgfAogICAgICogIHwgICAgICAgICAgICAgICAgICAgICAgICB8ICAgIHwgICAgICAgICAgICAgICAgICAgICAgICB8CiAgICAgKiAgfCAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgIC0tLS0tLS0tLS0tLS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AgICAgKi8KICAgIGNsYXNzIE92ZXJsYXlLZXlib2FyZERpc3BhdGNoZXIgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZG9jdW1lbnQKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3Rvcihkb2N1bWVudCkgewogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQ3VycmVudGx5IGF0dGFjaGVkIG92ZXJsYXlzIGluIHRoZSBvcmRlciB0aGV5IHdlcmUgYXR0YWNoZWQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9hdHRhY2hlZE92ZXJsYXlzID0gW107CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBLZXlib2FyZCBldmVudCBsaXN0ZW5lciB0aGF0IHdpbGwgYmUgYXR0YWNoZWQgdG8gdGhlIGJvZHkuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9rZXlkb3duTGlzdGVuZXIgPSAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChldmVudCkgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3Qgb3ZlcmxheXMgPSB0aGlzLl9hdHRhY2hlZE92ZXJsYXlzOwogICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IG92ZXJsYXlzLmxlbmd0aCAtIDE7IGkgPiAtMTsgaS0tKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gRGlzcGF0Y2ggdGhlIGtleWRvd24gZXZlbnQgdG8gdGhlIHRvcCBvdmVybGF5IHdoaWNoIGhhcyBzdWJzY3JpYmVycyB0byBpdHMga2V5ZG93biBldmVudHMuCiAgICAgICAgICAgICAgICAgICAgLy8gV2Ugd2FudCB0byB0YXJnZXQgdGhlIG1vc3QgcmVjZW50IG92ZXJsYXksIHJhdGhlciB0aGFuIHRyeWluZyB0byBtYXRjaCB3aGVyZSB0aGUgZXZlbnQgY2FtZQogICAgICAgICAgICAgICAgICAgIC8vIGZyb20sIGJlY2F1c2Ugc29tZSBjb21wb25lbnRzIG1pZ2h0IG9wZW4gYW4gb3ZlcmxheSwgYnV0IGtlZXAgZm9jdXMgb24gYSB0cmlnZ2VyIGVsZW1lbnQKICAgICAgICAgICAgICAgICAgICAvLyAoZS5nLiBmb3Igc2VsZWN0IGFuZCBhdXRvY29tcGxldGUpLiBXZSBza2lwIG92ZXJsYXlzIHdpdGhvdXQga2V5ZG93biBldmVudCBzdWJzY3JpcHRpb25zLAogICAgICAgICAgICAgICAgICAgIC8vIGJlY2F1c2Ugd2UgZG9uJ3Qgd2FudCBvdmVybGF5cyB0aGF0IGRvbid0IGhhbmRsZSBrZXlib2FyZCBldmVudHMgdG8gYmxvY2sgdGhlIG9uZXMgYmVsb3cKICAgICAgICAgICAgICAgICAgICAvLyB0aGVtIHRoYXQgZG8uCiAgICAgICAgICAgICAgICAgICAgaWYgKG92ZXJsYXlzW2ldLl9rZXlkb3duRXZlbnRzLm9ic2VydmVycy5sZW5ndGggPiAwKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG92ZXJsYXlzW2ldLl9rZXlkb3duRXZlbnRzLm5leHQoZXZlbnQpOwogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICB0aGlzLl9kb2N1bWVudCA9IGRvY3VtZW50OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25EZXN0cm95KCkgewogICAgICAgICAgICB0aGlzLl9kZXRhY2goKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQWRkIGEgbmV3IG92ZXJsYXkgdG8gdGhlIGxpc3Qgb2YgYXR0YWNoZWQgb3ZlcmxheSByZWZzLgogICAgICAgICAqIEBwYXJhbSB7P30gb3ZlcmxheVJlZgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYWRkKG92ZXJsYXlSZWYpIHsKICAgICAgICAgICAgLy8gRW5zdXJlIHRoYXQgd2UgZG9uJ3QgZ2V0IHRoZSBzYW1lIG92ZXJsYXkgbXVsdGlwbGUgdGltZXMuCiAgICAgICAgICAgIHRoaXMucmVtb3ZlKG92ZXJsYXlSZWYpOwogICAgICAgICAgICAvLyBMYXppbHkgc3RhcnQgZGlzcGF0Y2hlciBvbmNlIGZpcnN0IG92ZXJsYXkgaXMgYWRkZWQKICAgICAgICAgICAgaWYgKCF0aGlzLl9pc0F0dGFjaGVkKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9kb2N1bWVudC5ib2R5LmFkZEV2ZW50TGlzdGVuZXIoJ2tleWRvd24nLCB0aGlzLl9rZXlkb3duTGlzdGVuZXIpOwogICAgICAgICAgICAgICAgdGhpcy5faXNBdHRhY2hlZCA9IHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fYXR0YWNoZWRPdmVybGF5cy5wdXNoKG92ZXJsYXlSZWYpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZW1vdmUgYW4gb3ZlcmxheSBmcm9tIHRoZSBsaXN0IG9mIGF0dGFjaGVkIG92ZXJsYXkgcmVmcy4KICAgICAgICAgKiBAcGFyYW0gez99IG92ZXJsYXlSZWYKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlbW92ZShvdmVybGF5UmVmKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaW5kZXggPSB0aGlzLl9hdHRhY2hlZE92ZXJsYXlzLmluZGV4T2Yob3ZlcmxheVJlZik7CiAgICAgICAgICAgIGlmIChpbmRleCA+IC0xKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9hdHRhY2hlZE92ZXJsYXlzLnNwbGljZShpbmRleCwgMSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gUmVtb3ZlIHRoZSBnbG9iYWwgbGlzdGVuZXIgb25jZSB0aGVyZSBhcmUgbm8gbW9yZSBvdmVybGF5cy4KICAgICAgICAgICAgaWYgKHRoaXMuX2F0dGFjaGVkT3ZlcmxheXMubGVuZ3RoID09PSAwKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9kZXRhY2goKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBEZXRhY2hlcyB0aGUgZ2xvYmFsIGtleWJvYXJkIGV2ZW50IGxpc3RlbmVyLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZGV0YWNoKCkgewogICAgICAgICAgICBpZiAodGhpcy5faXNBdHRhY2hlZCkgewogICAgICAgICAgICAgICAgdGhpcy5fZG9jdW1lbnQuYm9keS5yZW1vdmVFdmVudExpc3RlbmVyKCdrZXlkb3duJywgdGhpcy5fa2V5ZG93bkxpc3RlbmVyKTsKICAgICAgICAgICAgICAgIHRoaXMuX2lzQXR0YWNoZWQgPSBmYWxzZTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIE92ZXJsYXlLZXlib2FyZERpc3BhdGNoZXIuybVmYWMgPSBmdW5jdGlvbiBPdmVybGF5S2V5Ym9hcmREaXNwYXRjaGVyX0ZhY3RvcnkodCkgeyByZXR1cm4gbmV3ICh0IHx8IE92ZXJsYXlLZXlib2FyZERpc3BhdGNoZXIpKMm1ybVpbmplY3QoRE9DVU1FTlQkMSkpOyB9OwogICAgLyoqIEBub2NvbGxhcHNlICovCiAgICBPdmVybGF5S2V5Ym9hcmREaXNwYXRjaGVyLmN0b3JQYXJhbWV0ZXJzID0gKCkgPT4gWwogICAgICAgIHsgdHlwZTogdW5kZWZpbmVkLCBkZ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dmUgYW4gb3ZlcmxheSB0ZXN0aW5nIG1vZHVsZS4KICAgICAqIEB0eXBlIHs/fQogICAgICovCiAgICBjb25zdCBpc1Rlc3RFbnZpcm9ubWVudCA9IHR5cGVvZiB3aW5kb3cgIT09ICd1bmRlZmluZWQnICYmICEhd2luZG93ICYmCiAgICAgICAgISEoKCgvKiogQHR5cGUgez99ICovICh3aW5kb3cpKSkuX19rYXJtYV9fIHx8ICgoLyoqIEB0eXBlIHs/fSAqLyAod2luZG93KSkpLmphc21pbmUpOwogICAgLyoqCiAgICAgKiBDb250YWluZXIgaW5zaWRlIHdoaWNoIGFsbCBvdmVybGF5cyB3aWxsIHJlbmRlci4KICAgICAqLwogICAgY2xhc3MgT3ZlcmxheUNvbnRhaW5lciB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBkb2N1bWVudAogICAgICAgICAqIEBwYXJhbSB7Pz19IF9wbGF0Zm9ybQogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKGRvY3VtZW50LCBfcGxhdGZvcm0pIHsKICAgICAgICAgICAgdGhpcy5fcGxhdGZvcm0gPSBfcGxhdGZvcm07CiAgICAgICAgICAgIHRoaXMuX2RvY3VtZW50ID0gZG9jdW1lbnQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkRlc3Ryb3koKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgY29udGFpbmVyID0gdGhpcy5fY29udGFpbmVyRWxlbWVudDsKICAgICAgICAgICAgaWYgKGNvbnRhaW5lciAmJiBjb250YWluZXIucGFyZW50Tm9kZSkgewogICAgICAgICAgICAgICAgY29udGFpbmVyLnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQoY29udGFpbmVyKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBUaGlzIG1ldGhvZCByZXR1cm5zIHRoZSBvdmVybGF5IGNvbnRhaW5lciBlbGVtZW50LiBJdCB3aWxsIGxhemlseQogICAgICAgICAqIGNyZWF0ZSB0aGUgZWxlbWVudCB0aGUgZmlyc3QgdGltZSAgaXQgaXMgY2FsbGVkIHRvIGZhY2lsaXRhdGUgdXNpbmcKICAgICAgICAgKiB0aGUgY29udGFpbmVyIGluIG5vbi1icm93c2VyIGVudmlyb25tZW50cy4KICAgICAgICAgKiBAcmV0dXJuIHs/fSB0aGUgY29udGFpbmVyIGVsZW1lbnQKICAgICAgICAgKi8KICAgICAgICBnZXRDb250YWluZXJFbGVtZW50KCkgewogICAgICAgICAgICBpZiAoIXRoaXMuX2NvbnRhaW5lckVsZW1lbnQpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2NyZWF0ZUNvbnRhaW5lcigpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9jb250YWluZXJFbGVtZW50OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDcmVhdGUgdGhlIG92ZXJsYXkgY29udGFpbmVyIGVsZW1lbnQsIHdoaWNoIGlzIHNpbXBseSBhIGRpdgogICAgICAgICAqIHdpdGggdGhlICdjZGstb3ZlcmxheS1jb250YWluZXInIGNsYXNzIG9uIHRoZSBkb2N1bWVudCBib2R5LgogICAgICAgICAqIEBwcm90ZWN0ZWQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9jcmVhdGVDb250YWluZXIoKSB7CiAgICAgICAgICAgIC8vIEBicmVha2luZy1jaGFuZ2UgMTAuMC4wIFJlbW92ZSBudWxsIGNoZWNrIGZvciBgX3BsYXRmb3JtYC4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBpc0Jyb3dzZXIgPSB0aGlzLl9wbGF0Zm9ybSA/IHRoaXMuX3BsYXRmb3JtLmlzQnJvd3NlciA6IHR5cGVvZiB3aW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CB3ZQogICAgICAgICAgICAvLyBhbHdheXMgY2xlYXIgdGhlIGNvbnRhaW5lci4gU2VlICMxNzAwNi4KICAgICAgICAgICAgLy8gVE9ETyhjcmlzYmV0byk6IHJlbW92ZSB0aGUgdGVzdCBlbnZpcm9ubWVudCBjaGVjayBvbmNlIHdlIGhhdmUgYW4gb3ZlcmxheSB0ZXN0aW5nIG1vZHVsZS4KICAgICAgICAgICAgaWYgKGlzVGVzdEVudmlyb25tZW50KSB7CiAgICAgICAgICAgICAgICBjb250YWluZXIuc2V0QXR0cmlidXRlKCdwbGF0Zm9ybScsICd0ZXN0Jyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoIWlzQnJvd3NlcikgewogICAgICAgICAgICAgICAgY29udGFpbmVyLnNldEF0dHJpYnV0ZSgncGxhdGZvcm0nLCAnc2VydmVyJyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fZG9jdW1lbnQuYm9keS5hcHBlbmRDaGlsZChjb250YWluZXIpOwogICAgICAgICAgICB0aGlzLl9jb250YWluZXJFbGVtZW50ID0gY29udGFpbmVyOwogICAgICAgIH0KICAgIH0KICAgIE92ZXJsYXlDb250YWluZXIuybVmYWMgPSBmdW5jdGlvbiBPdmVybGF5Q29udGFpbmVyX0ZhY3RvcnkodCkgeyByZXR1cm4gbmV3ICh0IHx8IE92ZXJsYXlDb250YWluZXIpKMm1ybVpbmplY3QoRE9DVU1FTlQkMSksIMm1ybVpbmplY3QoUGxhdGZvcm0pKTsgfTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLwogICAgT3ZlcmxheUNvbnRhaW5lci5jdG9yUGFyYW1ldGVycyA9ICgpID0+IFsKICAgICAgICB7IHR5cGU6IHVuZGVmaW5lZCwgZGVjb3JhdG9yczogW3sgdHlwZTogSW5qZWN0LCBhcmdzOiBbRE9DVU1FTlQkMSxdIH1dIH0sCiAgICAgICAgeyB0eXBlOiBQbGF0Zm9ybSB9CiAgICBdOwog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RvY3VtZW50CiAgICAgICAgICogQHBhcmFtIHs/PX0gX2xvY2F0aW9uCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoX3BvcnRhbE91dGxldCwgX2hvc3QsIF9wYW5lLCBfY29uZmlnLCBfbmdab25lLCBfa2V5Ym9hcmREaXNwYXRjaGVyLCBfZG9jdW1lbnQsIF9sb2NhdGlvbikgewogICAgICAgICAgICB0aGlzLl9wb3J0YWxPdXRsZXQgPSBfcG9ydGFsT3V0bGV0OwogICAgICAgICAgICB0aGlzLl9ob3N0ID0gX2hvc3Q7CiAgICAgICAgICAgIHRoaXMuX3BhbmUgPSBfcGFuZTsKICAgICAgICAgICAgdGhpcy5fY29uZmlnID0gX2NvbmZpZzsKICAgICAgICAgICAgdGhpcy5fbmdab25lID0gX25nWm9uZTsKICAgICAgICAgICAgdGhpcy5fa2V5Ym9hcmREaXNwYXRjaGVyID0gX2tleWJvYXJkRGlzcGF0Y2hlcjsKICAgICAgICAgICAgdGhpcy5fZG9jdW1lbnQgPSBfZG9jdW1lbnQ7CiAgICAgICAgICAgIHRoaXMuX2xvY2F0aW9uID0gX2xvY2F0aW9uOwogICAgICAgICAgICB0aGlzLl9iYWNrZHJvcEVsZW1lbnQgPSBudWxsOwogICAgICAgICAgICB0aGlzLl9iYWNrZHJvcENsaWNrID0gbmV3IFN1YmplY3QoKTsKICAgICAgICAgICAgdGhpcy5fYXR0YWNobWVudHMgPSBuZXcgU3ViamVjdCgpOwogICAgICAgICAgICB0aGlzLl9kZXRhY2htZW50cyA9IG5ldyBTdWJqZWN0KCk7CiAgICAgICAgICAgIHRoaXMuX2xvY2F0aW9uQ2hhbmdlcyA9IFN1YnNjcmlwdGlvbi5FTVBUWTsKICAgICAgICAgICAgdGhpcy5fYmFja2Ryb3BDbGlja0hhbmRsZXIgPSAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChldmVudCkgPT4gdGhpcy5fYmFja2Ryb3BDbGljay5uZXh0KGV2ZW50KSk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBTdHJlYW0gb2Yga2V5ZG93biBldmVudHMgZGlzcGF0Y2hlZCB0byB0aGlzIG92ZXJsYXkuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9rZXlkb3duRXZlbnRzID0gbmV3IFN1YmplY3QoKTsKICAgICAgICAgICAgaWYgKF9jb25maWcuc2Nyb2xsU3RyYXRlZ3kpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3Njcm9sbFN0cmF0ZWd5ID0gX2NvbmZpZy5zY3JvbGxTdHJhdGVneTsKICAgICAgICAgICAgICAgIHRoaXMuX3Njcm9sbFN0cmF0ZWd5LmF0dGFjaCh0aGlzKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9wb3NpdGlvblN0cmF0ZWd5ID0gX2NvbmZpZy5wb3NpdGlvblN0cmF0ZWd5OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBUaGUgb3ZlcmxheSdzIEhUTUwgZWxlbWVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IG92ZXJsYXlFbGVtZW50KCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fcGFuZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIG92ZXJsYXkncyBiYWNrZHJvcCBIVE1MIGVsZW1lbnQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgYmFja2Ryb3BFbGVtZW50KCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fYmFja2Ryb3BFbGVtZW50OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBXcmFwcGVyIGFyb3VuZCB0aGUgcGFuZWwgZWxlbWVudC4gQ2FuIGJlIHVzZWQgZm9yIGFkdmFuY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lzLl9ob3N0KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5fcG9zaXRpb25TdHJhdGVneSkgewogICAgICAgICAgICAgICAgdGhpcy5fcG9zaXRpb25TdHJhdGVneS5hdHRhY2godGhpcyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fdXBkYXRlU3RhY2tpbmdPcmRlcigpOwogICAgICAgICAgICB0aGlzLl91cGRhdGVFbGVtZW50U2l6ZSgpOwogICAgICAgICAgICB0aGlzLl91cGRhdGVFbGVtZW50RGlyZWN0aW9uKCk7CiAgICAgICAgICAgIGlmICh0aGlzLl9zY3JvbGxTdHJhdGVneSkgewogICAgICAgICAgICAgICAgdGhpcy5fc2Nyb2xsU3RyYXRlZ3kuZW5hYmxlKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gVXBkYXRlIHRoZSBwb3NpdGlvbiBvbmNlIHRoZSB6b25lIGlzIHN0YWJsZSBzbyB0aGF0IHRoZSBvdmVybGF5IHdpbGwgYmUgZnVsbHkgcmVuZGVyZWQKICAgICAgICAgICAgLy8gYmVmb3JlIGF0dGVtcHRpbmcgdG8gcG9zaXRpb24gaXQsIGFzIHRoZSBwb3NpdGlvbiBtYXkgZGVwZW5kIG9uIHRoZSBzaXplIG9mIHRoZSByZW5kZXJlZAogICAgICAgICAgICAvLyBjb250ZW50LgogICAgICAgICAgICB0aGlzLl9uZ1pvbmUub25TdGFibGUKICAgICAgICAgICAgICAgIC5hc09ic2VydmFibGUoKQogICAgICAgICAgICAgICAgLnBpcGUodGFrZSgxKSkKICAgICAgICAgICAgICAgIC5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgLy8gVGhlIG92ZXJsYXkgY291bGQndmUgYmVlbiBkZXRhY2hlZCBiZWZvcmUgdGhlIHpvbmUgaGFzIHN0YWJpbGl6ZWQuCiAgICAgICAgICAgICAgICBpZiAodGhpcy5oYXNBdHRhY2hlZCgpKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy51cGRhdGVQb3NpdGlvbigpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIC8vIEVuYWJsZSBwb2ludGVyIGV2ZW50cyBmb3IgdGhlIG92ZXJsYXkgcGFuZSBlbGVtZW50LgogICAgICAgICAgICB0aGlzLl90b2dnbGVQb2ludGVyRXZlbnRzKHRydWUpOwogICAgICAgICAgICBpZiAodGhpcy5fY29uZmlnLmhhc0JhY2tkcm9wKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9hdHRhY2hCYWNrZHJvcCgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0aGlzLl9jb25maWcucGFuZWxDbGFzcykgewogICAgICAgICAgICAgICAgdGhpcy5fdG9nZ2xlQ2xhc3Nlcyh0aGlzLl9wYW5lLCB0aGlzLl9jb25maWcucGFuZWxDbGFzcywgdHJ1ZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gT25seSBlbWl0IHRoZSBgYXR0YWNobWVudHNgIGV2ZW50IG9uY2UgYWxsIG90aGVyIHNldHVwIGlzIGRvbmUuCiAgICAgICAgICAgIHRoaXMuX2F0dGFjaG1lbnRzLm5leHQoKTsKICAgICAgICAgICAgLy8gVHJhY2sgdGhpcyBvdmVybGF5IGJ5IHRoZSBrZXlib2FyZCBkaXNwYXRjaGVyCiAgICAgICAgICAgIHRoaXMuX2tleWJvYXJkRGlzcGF0Y2hlci5hZGQodGhpcyk7CiAgICAgICAgICAgIC8vIEBicmVha2luZy1jaGFuZ2UgOC4wLjAgcmVtb3ZlIHRoZSBudWxsIGNoZWNrIGZvciBgX2xvY2F0aW9uYAogICAgICAgICAgICAvLyBvbmNlIHRoZSBjb25zdHJ1Y3RvciBwYXJhbWV0ZXIgaXMgbWFkZSByZXF1aXJlZC4KICAgICAgICAgICAgaWYgKHRoaXMuX2NvbmZpZy5kaXNwb3NlT25OYXZpZ2F0aW9uICYmIHRoaXMuX2xvY2F0aW9uKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9sb2NhdGlvbkNoYW5nZXMgPSB0aGlzLl9sb2NhdGlvbi5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gdGhpcy5kaXNwb3NlKCkpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gYXR0YWNoUmVzdWx0OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBEZXRhY2hlcyBhbiBvdmVybGF5IGZyb20gYSBwb3J0YWwuCiAgICAgICAgICogQHJldHVybiB7P30gVGhlIHBvcnRhbCBkZXRhY2htZW50IHJlc3VsdC4KICAgICAgICAgKi8KICAgICAgICBkZXRhY2goKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5oYXNBdHRhY2hlZCgpKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5kZXRhY2hCYWNrZHJvcCgpOwogICAgICAgICAgICAvLyBXaGVuIHRoZSBvdmVybGF5IGlzIGRldGFjaGVkLCB0aGUgcGFuZSBlbGVtZW50IHNob3VsZCBkaXNhYmxlIHBvaW50ZXIgZXZlbnRzLgogICAgICAgICAgICAvLyBUaGlzIGlzIG5lY2Vzc2FyeSBiZWNhdXNlIG90aGVyd2lzZSB0aGUgcGFuZSBlbGVtZW50IHdpbGwgY292ZXIgdGhlIHBhZ2UgYW5kIGRpc2FibGUKICAgICAgICAgICAgLy8gcG9pbnRlciBldmVudHMgdGhlcmVmb3JlLiBEZXBlbmRzIG9uIHRoZSBwb3NpdGlvbiBzdHJhdGVneSBhbmQgdGhlIGFwcGxpZWQgcGFuZSBib3VuZGFyaWVzLgogICAgICAgICAgICB0aGlzLl90b2dnbGVQb2ludG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VuaW5nIGZvciBsb2NhdGlvbiBjaGFuZ2VzLgogICAgICAgICAgICB0aGlzLl9sb2NhdGlvbkNoYW5nZXMudW5zdWJzY3JpYmUoKTsKICAgICAgICAgICAgcmV0dXJuIGRldGFjaG1lbnRSZXN1bHQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENsZWFucyB1cCB0aGUgb3ZlcmxheSBmcm9tIHRoZSBET00uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkaXNwb3NlKCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGlzQXR0YWNoZWQgPSB0aGlzLmhhc0F0dGFjaGVkKCk7CiAgICAgICAgICAgIGlmICh0aGlzLl9wb3NpdGlvblN0cmF0ZWd5KSB7CiAgICAgICAgICAgICAgICB0aGlzLl9wb3NpdGlvblN0cmF0ZWd5LmRpc3Bvc2UoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9kaXNwb3NlU2Nyb2xsU3RyYXRlZ3koKTsKICAgICAgICAgICAgdGhpcy5kZXRhY2hCYWNrZHJvcCgpOwogICAgICAgICAgICB0aGlzLl9sb2NhdGlvbkNoYW5nZXMudW5zdWJzY3JpYmUoKTsKICAgICAgICAgICAgdGhpcy5fa2V5Ym9hcmREaXNwYXRjaGVyLnJlbW92ZSh0aGlzKTsKICAgICAgICAgICAgdGhpcy5fcG9ydGFsT3V0bGV0LmRpc3Bvc2UoKTsKICAgICAgICAgICAgdGhpcy5fYXR0YWNobWVudHMuY29tcGxldGUoKTsKICAgICAgICAgICAgdGhpcy5fYmFja2Ryb3BDbGljay5jb21wbGV0ZSgpOwogICAgICAgICAgICB0aGlzLl9rZXlkb3duRXZlbnRzLmNvbXBsZXRlKCk7CiAgICAgICAgICAgIGlmICh0aGlzLl9ob3N0ICYmIHRoaXMuX2hvc3QucGFyZW50Tm9kZSkgewogICAgICAgICAgICAgICAgdGhpcy5faG9zdC5wYXJlbnROb2RlLnJlbW92ZUNoaWxkKHRoaXMuX2hvc3QpOwogICAgICAgICAgICAgICAgdGhpcy5faG9zdCA9ICgvKiogQHR5cGUgez99ICovIChudWxsKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fcHJldmlvdXNIb3N0UGFyZW50ID0gdGhpcy5fcGFuZSA9ICgvKiogQHR5cGUgez99ICovIChudWxsKSk7CiAgICAgICAgICAgIGlmIChpc0F0dGFjaGVkKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9kZXRhY2htZW50cy5uZXh0KCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fZGV0YWNobWVudHMuY29tcGxldGUoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogV2hldGhlciB0aGUgb3ZlcmxheSBoYXMgYXR0YWNoZWQgY29udGVudC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGhhc0F0dGFjaGVkKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fcG9ydGFsT3V0bGV0Lmhhc0F0dGFjaGVkKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEdldHMgYW4gb2JzZXJ2YWJsZSB0aGF0IGVtaXRzIHdoZW4gdGhlIGJhY2tkcm9wIGhhcyBiZWVuIGNsaWNrZWQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBiYWNrZHJvcENsaWNrKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fYmFja2Ryb3BDbGljay5hc09ic2VydmFibGUoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogR2V0cyBhbiBvYnNlcnZhYmxlIHRoYXQgZW1pdHMgd2hlbiB0aGUgb3ZlcmxheSBoYXMgYmVlbiBhdHRhY2hlZC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGF0dGFjaG1lbnRzKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fYXR0YWNobWVudHMuYXNPYnNlcnZhYmxlKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEdldHMgYW4gb2JzZXJ2YWJsZSB0aGF0IGVtaXRzIHdoZW4gdGhlIG92ZXJsYXkgaGFzIGJlZW4gZGV0YWNoZWQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkZXRhY2htZW50cygpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2RldGFjaG1lbnRzLmFzT2JzZXJ2YWJsZSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIGFuIG9ic2VydmFibGUgb2Yga2V5ZG93biBldmVudHMgdGFyZ2V0ZWQgdG8gdGhpcyBvdmVybGF5LgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAga2V5ZG93bkV2ZW50cygpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2tleWRvd25FdmVudHMuYXNPYnNlcnZhYmxlKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEdldHMgdGhlIGN1cnJlbnQgb3ZlcmxheSBjb25maWd1cmF0aW9uLCB3aGljaCBpcyBpbW11dGFibGUuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXRDb25maWcoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9jb25maWc7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFVwZGF0ZXMgdGhlIHBvc2l0aW9uIG9mIHRoZSBvdmVybGF5IGJhc2VkIG9uIHRoZSBwb3NpdGlvbiBzdHJhdGVneS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHVwZGF0ZVBvc2l0aW9uKCkgewogICAgICAgICAgICBpZiAodGhpcy5fcG9zaXRpb25TdHJhdGVneSkgewogICAgICAgICAgICAgICAgdGhpcy5fcG9zaXRpb25TdHJhdGVneS5hcHBseSgpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFN3aXRjaGVzIHRvIGEgbmV3IHBvc2l0aW9uIHN0cmF0ZWd5IGFuZCB1cGRhdGVzIHRoZSBvdmVybGF5IHBvc2l0aW9uLgogICAgICAgICAqIEBwYXJhbSB7P30gc3RyYXRlZ3kKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHVwZGF0ZVBvc2l0aW9uU3RyYXRlZ3koc3RyYXRlZ3kpIHsKICAgICAgICAgICAgaWYgKHN0cmF0ZWd5ID09PSB0aGlzLl9wb3NpdGlvblN0cmF0ZWd5KSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHRoaXMuX3Bvc2l0aW9uU3RyYXRlZ3kpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3Bvc2l0aW9uU3RyYXRlZ3kuZGlzcG9zZSgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX3Bvc2l0aW9uU3RyYXRlZ3kgPSBzdHJhdGVneTsKICAgICAgICAgICAgaWYgKHRoaXMuaGFzQXR0YWNoZWQoKSkgewogICAgICAgICAgICAgICAgc3RyYXRlZ3kuYXR0YWNoKHRoaXMpOwogICAgICAgICAgICAgICAgdGhpcy51cGRhdGVQb3NpdGlvbigpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFVwZGF0ZSB0aGUgc2l6ZSBwcm9wZXJ0aWVzIG9mIHRoZSBvdmVybGF5LgogICAgICAgICAqIEBwYXJhbSB7P30gc2l6ZUNvbmZpZwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdXBkYXRlU2l6ZShzaXplQ29uZmlnKSB7CiAgICAgICAgICAgIHRoaXMuX2NvbmZpZyA9IE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgdGhpcy5fY29uZmlnKSwgc2l6ZUNvbmZpZyk7CiAgICAgICAgICAgIHRoaXMuX3VwZGF0ZUVsZW1lbnRTaXplKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgdGhlIExUUi9SVEwgZGlyZWN0aW9uIGZvciB0aGUgb3ZlcmxheS4KICAgICAgICAgKiBAcGFyYW0gez99IGRpcgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0RGlyZWN0aW9uKGRpcikgewogICAgICAgICAgICB0aGlzLl9jb25maWcgPSBPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sIHRoaXMuX2NvbmZpZyksIHsgZGlyZWN0aW9uOiBkaXIgfSk7CiAgICAgICAgICAgIHRoaXMuX3VwZGF0ZUVsZW1lbnREaXJlY3Rpb24oKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQWRkIGEgQ1NTIGNsYXNzIG9yIGFuIGFycmF5IG9mIGNsYXNzZXMgdG8gdGhlIG92ZXJsYXkgcGFuZS4KICAgICAgICAgKiBAcGFyYW0gez99IGNsYXNzZXMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGFkZFBhbmVsQ2xhc3MoY2xhc3NlcykgewogICAgICAgICAgICBpZiAodGhpcy5fcGFuZSkgewogICAgICAgICAgICAgICAgdGhpcy5fdG9nZ2xlQ2xhc3Nlcyh0aGlzLl9wYW5lLCBjbGFzc2VzLCB0cnVlKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZW1vdmUgYSBDU1MgY2xhc3Mgb3IgYW4gYXJyYXkgb2YgY2xhc3NlcyBmcm9tIHRoZSBvdmVybGF5IHBhbmUuCiAgICAgICAgICogQHBhcmFtIHs/fSBjbGFzc2VzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZW1vdmVQYW5lbENsYXNzKGNsYXNzZXMpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX3BhbmUpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3RvZ2dsZUNsYXNzZXModGhpcy5fcGFuZSwgY2xhc3NlcywgZmFsc2UpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgdGhlIGxheW91dCBkaXJlY3Rpb24gb2YgdGhlIG92ZXJsYXkgcGFuZWwuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXREaXJlY3Rpb24oKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZGlyZWN0aW9uID0gdGhpcy5fY29uZmlnLmRpcmVjdGlvbjsKICAgICAgICAgICAgaWYgKCFkaXJlY3Rpb24pIHsKICAgICAgICAgICAgICAgIHJldHVybiAnbHRyJzsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdHlwZW9mIGRpcmVjdGlvbiA9PT0gJ3N0cmluZycgPyBkaXJlY3Rpb24gOiBkaXJlY3Rpb24udmFsdWU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFN3aXRjaGVzIHRvIGEgbmV3IHNjcm9sbCBzdHJhdGVneS4KICAgICAgICAgKiBAcGFyYW0gez99IHN0cmF0ZWd5CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB1cGRhdGVTY3JvbGxTdHJhdGVneShzdHJhdGVneSkgewogICAgICAgICAgICBpZiAoc3RyYXRlZ3kgPT09IHRoaXMuX3Njcm9sbFN0cmF0ZWd5KSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fZGlzcG9zZVNjcm9sbFN0cmF0ZWd5KCk7CiAgICAgICAgICAgIHRoaXMuX3Njcm9sbFN0cmF0ZWd5ID0gc3RyYXRlZ3k7CiAgICAgICAgICAgIGlmICh0aGlzLmhhc0F0dGFjaGVkKCkpIHsKICAgICAgICAgICAgICAgIHN0cmF0ZWd5LmF0dGFjaCh0aGlzKTsKICAgICAgICAgICAgICAgIHN0cmF0ZWd5LmVuYWJsZSgpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFVwZGF0ZXMgdGhlIHRleHQgZGlyZWN0aW9uIG9mIHRoZSBvdmVybGF5IHBhbmVsLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfdXBkYXRlRWxlbWVudERpcmVjdGlvbigpIHsKICAgICAgICAgICAgdGhpcy5faG9zdC5zZXRBdHRyaWJ1dGUoJ2RpcicsIHRoaXMuZ2V0RGlyZWN0aW9uKCkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBVcGRhdGVzIHRoZSBzaXplIG9mIHRoZSBvdmVybGF5IGVsZW1lbnQgYmFzZWQgb24gdGhlIG92ZXJsYXkgY29uZmlnLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfdXBkYXRlRWxlbWVudFNpemUoKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5fcGFuZSkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc3R5bGUgPSB0aGlzLl9wYW5lLnN0eWxlOwogICAgICAgICAgICBzdHlsZS53aWR0aCA9IGNvZXJjZUNzc1BpeGVsVmFsdWUodGhpcy5fY29uZmlnLndpZHRoKTsKICAgICAgICAgICAgc3R5bGUuaGVpZ2h0ID0gY29lcmNlQ3NzUGl4ZWxWYWx1ZSh0aGlzLl9jb25maWcuaGVpZ2h0KTsKICAgICAgICAgICAgc3R5bGUubWluV2lkdGggPSBjb2VyY2VDc3NQaXhlbFZhbHVlKHRoaXMuX2NvbmZpZy5taW5XaWR0aCk7CiAgICAgICAgICAgIHN0eWxlLm1pbkhlaWdodCA9IGNvZXJjZUNzc1BpeGVsVmFsdWUodGhpcy5fY29uZmlnLm1pbkhlaWdodCk7CiAgICAgICAgICAgIHN0eWxlLm1heFdpZHRoID0gY29lcmNlQ3NzUGl4ZWxWYWx1ZSh0aGlzLl9jb25maWcubWF4V2lkdGgpOwogICAgICAgICAgICBzdHlsZS5tYXhIZWlnaHQgPSBjb2VyY2VDc3NQaXhlbFZhbHVlKHRoaXMuX2NvbmZpZy5tYXhIZWlnaHQpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBUb2dnbGVzIHRoZSBwb2ludGVyIGV2ZW50cyBmb3IgdGhlIG92ZXJsYXkgcGFuZSBlbGVtZW50LgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBlbmFibGVQb2ludGVyCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfdG9nZ2xlUG9pbnRlckV2ZW50cyhlbmFibGVQb2ludGVyKSB7CiAgICAgICAgICAgIHRoaXMuX3BhbmUuc3R5bGUucG9pbnRlckV2ZW50cyA9IGVuYWJsZVBvaW50ZXIgPyAnYXV0bycgOiAnbm9uZSc7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEF0dGFjaGVzIGEgYmFja2Ryb3AgZm9yIHRoaXMgb3ZlcmxheS4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2F0dGFjaEJhY2tkcm9wKCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHNob3dpbmdDbGFzcyA9ICdjZGstb3ZlcmxheS1iYWNrZHJvcC1zaG93aW5nJzsKICAgICAgICAg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GNsYXNzIHRvIGZhZGUtaW4gdGhlIGJhY2tkcm9wIGFmdGVyIG9uZSBmcmFtZS4KICAgICAgICAgICAgaWYgKHR5cGVvZiByZXF1ZXN0QW5pbWF0aW9uRnJhbWUgIT09ICd1bmRlZmluZWQnKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9uZ1pvbmUucnVuT3V0c2lkZUFuZ3VsYXIoKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHJlcXVlc3RBbmltYXRpb25GcmFtZSgoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLl9iYWNrZHJvcEVsZW1lbnQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2JhY2tkcm9wRWxlbWVudC5jbGFzc0xpc3QuYWRkKHNob3dpbmdDbGFzcyk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLl9iYWNrZHJvcEVsZW1lbnQuY2xhc3NMaXN0LmFkZChzaG93aW5nQ2xhc3MpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFVwZGF0ZXMgdGhlIHN0YWNraW5nIG9yZGVyIG9mIHRoZSBlbGVtZW50LCBtb3ZpbmcgaXQgdG8gdGhlIHRvcCBpZiBuZWNlc3NhcnkuCiAgICAgICAgICogVGhpcyBpcyByZXF1aXJlZCBpbiBjYXNlcyB3aGVyZSBvbmUgb3ZlcmxheSB3YXMgZGV0YWNoZWQsIHdoaWxlIGFub3RoZXIgb25lLAogICAgICAgICAqIHRoYXQgc2hvdWxkIGJlIGJlaGluZCBpdCwgd2FzIGRlc3Ryb3llZC4gVGhlIG5leHQgdGltZSBib3RoIG9mIHRoZW0gYXJlIG9wZW5lZCwKICAgICAgICAgKiB0aGUgc3RhY2tpbmcgd2lsbCBiZSB3cm9uZywgYmVjYXVzZSB0aGUgZGV0YWNoZWQgZWxlbWVudCdzIHBhbmUgd2lsbCBzdGlsbCBiZQogICAgICAgICAqIGluIGl0cyBvcmlnaW5hbCBET00gcG9zaXRpb24uCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF91cGRhdGVTdGFja2luZ09yZGVyKCkgewogICAgICAgICAgICBpZiAodGhpcy5faG9zdC5uZXh0U2libGluZykgewogICAgICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX2hvc3QucGFyZW50Tm9kZSkpLmFwcGVuZENoaWxkKHRoaXMuX2hvc3QpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIERldGFjaGVzIHRoZSBiYWNrZHJvcCAoaWYgYW55KSBhc3NvY2lhdGVkIHdpdGggdGhlIG92ZXJsYXkuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkZXRhY2hCYWNrZHJvcCgpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgYmFja2Ryb3BUb0RldGFjaCA9IHRoaXMuX2JhY2tkcm9wRWxlbWVudDsKICAgICAgICAgICAgaWYgKCFiYWNrZHJvcFRvRGV0YWNoKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgdGltZW91dElkOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAg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ugc3RhcnRlZCB0byByZW1vdmUuCiAgICAgICAgICAgICAgICBpZiAodGhpcy5fYmFja2Ryb3BFbGVtZW50ID09IGJhY2tkcm9wVG9EZXRhY2gpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9iYWNrZHJvcEVsZW1lbnQgPSBudWxsOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKHRoaXMuX2NvbmZpZy5iYWNrZHJvcENsYXNzKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fdG9nZ2xlQ2xhc3NlcygoLyoqIEB0eXBlIHs/fSAqLyAoYmFja2Ryb3BUb0RldGFjaCkpLCB0aGlzLl9jb25maWcuYmFja2Ryb3BDbGFzcywgZmFsc2UpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHRpbWVvdXRJZCk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBiYWNrZHJvcFRvRGV0YWNoLmNsYXNzTGlzdC5yZW1vdmUoJ2Nkay1vdmVybGF5LWJhY2tkcm9wLXNob3dpbmcnKTsKICAgICAgICAgICAgdGhpcy5fbmdab25lLnJ1bk91dHNpZGVBbmd1bGFyKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovIChiYWNrZHJvcFRvRGV0YWNoKSkuYWRkRXZlbnRMaXN0ZW5lcigndHJhbnNpdGlvbmVuZCcsIGZpbmlzaERldGFjaCk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgLy8gSWYgdGhlIGJhY2tkcm9wIGRvZXNuJ3QgaGF2ZSBhIHRyYW5zaXRpb24sIHRoZSBgdHJhbnNpdGlvbmVuZGAgZXZlbnQgd29uJ3QgZmlyZS4KICAgICAgICAgICAgLy8gSW4gdGhpcyBjYXNlIHdlIG1ha2UgaXQgdW5jbGlja2FibGUgYW5kIHdlIHRyeSB0byByZW1vdmUgaXQgYWZ0ZXIgYSBkZWxheS4KICAgICAgICAgICAgYmFja2Ryb3BUb0RldGFjaC5zdHlsZS5wb2ludGVyRXZlbnRzID0gJ25vbmUnOwogICAgICAgICAgICAvLyBSdW4gdGhpcyBvdXRzaWRlIHRoZSBBbmd1bGFyIHpvbmUgYmVjYXVzZSB0aGVyZSdzIG5vdGhpbmcgdGhhdCBBbmd1bGFyIGNhcmVzIGFib3V0LgogICAgICAgICAgICAvLyBJZiBpdCB3ZXJlIHRvIHJ1biBpbnNpZGUgdGhlIEFuZ3VsYXIgem9uZSwgZXZlcnkgdGVzdCB0aGF0IHVzZWQgT3ZlcmxheSB3b3VsZCBoYXZlIHRvIGJlCiAgICAgICAgICAgIC8vIGVpdGhlciBhc3luYyBvciBmYWtlQXN5bmMuCiAgICAgICAgICAgIHRpbWVvdXRJZCA9IHRoaXMuX25nWm9uZS5ydW5PdXRzaWRlQW5ndWxhcigoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiBzZXRUaW1lb3V0KGZpbmlzaERldGFjaCwgNTAwKSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBUb2dnbGVzIGEgc2luZ2xlIENTUyBjbGFzcyBvciBhbiBhcnJheSBvZiBjbGFzc2VzIG9uIGFuIGVsZW1lbnQuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgKiBAcGFyYW0gez99IGNzc0NsYXNzZXMKICAgICAgICAgKiBAcGFyYW0gez99IGlzQWRkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfdG9nZ2xlQ2xhc3NlcyhlbGVtZW50LCBjc3NDbGFzc2VzLCBpc0FkZCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGNsYXNzTGlzdCA9IGVsZW1lbnQuY2xhc3NMaXN0OwogICAgICAgICAgICBjb2VyY2VBcnJheShjc3NDbGFzc2VzKS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjc3NDbGFzcwogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgY3NzQ2xhc3MgPT4gewogICAgICAgICAgICAgICAgLy8gV2UgY2FuJ3QgZG8gYSBzcHJlYWQgaGVyZSwgYmVjYXVzZSBJRSBkb2Vzbid0IHN1cHBvcnQgc2V0dGluZyBtdWx0aXBsZSBjbGFzc2VzLgogICAgICAgICAgICAgICAgLy8gQWxzbyB0cnlpbmcgdG8gYWRkIGFuIGVtcHR5IHN0cmluZyB0byBhIERPTVRva2VuTGlzdCB3aWxsIHRocm93LgogICAgICAgICAgICAgICAgaWYgKGNzc0NsYXNzKSB7CiAgICAgICAgICAgICAgICAgICAgaXNBZGQgPyBjbGFzc0xpc3QuYWRkKGNzc0NsYXNzKSA6IGNsYXNzTGlzdC5yZW1vdmUoY3NzQ2xhc3MpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIERldGFjaGVzIHRoZSBvdmVybGF5IGNvbnRlbnQgbmV4dCB0aW1lIHRoZSB6b25lIHN0YWJpbGl6ZXMuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9kZXRhY2hDb250ZW50V2hlblN0YWJsZSgpIHsKICAgICAgICAgICAgLy8gTm9ybWFsbHkgd2Ugd291bGRuJ3QgaGF2ZSB0byBleHBsaWNpdGx5IHJ1biB0aGlzIG91dHNpZGUgdGhlIGBOZ1pvbmVgLCBob3dldmVyCiAgICAgICAgICAgIC8vIGlmIHRoZSBjb25zdW1lciBpcyB1c2luZyBgem9uZS1wYXRjaC1yeGpzYCwgdGhlIGBTdWJzY3JpcHRpb24udW5zdWJzY3JpYmVgIGNhbGwgd2lsbAogICAgICAgICAgICAvLyBiZSBwYXRjaGVkIHRvIHJ1biBpbnNpZGUgdGhlIHpvbmUsIHdoaWNoIHdpbGwgdGhyb3cgdXMgaW50byBhbiBpbmZpbml0ZSBsb29wLgogICAgICAgICAgICB0aGlzLl9uZ1pvbmUucnVuT3V0c2lkZUFuZ3VsYXIoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgLy8gV2UgY2FuJ3QgcmVtb3ZlIHRoZSBob3N0IGhlcmUgaW1tZWRpYXRlbHksIGJlY2F1c2UgdGhlIG92ZXJsYXkgcGFuZSdzIGNvbnRlbnQKICAgICAgICAgICAgICAgIC8vIG1pZ2h0IHN0aWxsIGJlIGFuaW1hdGluZy4gVGhpcyBzdHJlYW0gaGVscHMgdXMgYXZvaWQgaW50ZXJydXB0aW5nIHRoZSBhbmltYXRpb24KICAgICAgICAgICAgICAgIC8vIGJ5IHdhaXRpbmcgZm9yIHRoZSBwYW5lIHRvIGJlY29tZSBlbXB0eS4KICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHN1YnNjcmlwdGlvbiA9IHRoaXMuX25nWm9uZS5vblN0YWJsZQogICAgICAgICAgICAgICAgICAgIC5hc09ic2VydmFibGUoKQogICAgICAgICAgICAgICAgICAgIC5waXBlKHRha2VVbnRpbChtZXJnZSh0aGlzLl9hdHRhY2htZW50cywgdGhpcy5fZGV0YWNobWVudHMpKSkKICAgICAgICAgICAgICAgICAgICAuc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgICAgICAvLyBOZWVkcyBhIGNvdXBsZSBvZiBjaGVja3MgZm9yIHRoZSBwYW5lIGFuZCBob3N0LCBiZWNhdXNlCiAgICAgICAgICAgICAgICAgICAgLy8gdGhleSBtYXkgaGF2ZSBiZWVuIHJlbW92ZWQgYnkgdGhlIHRpbWUgdGhlIHpvbmUgc3RhYmlsaXplcy4KICAgICAgICAgICAgICAgICAgICBpZiAoIXRoaXMuX3BhbmUgfHwgIXRoaXMuX2hvc3QgfHwgdGhpcy5fcGFuZS5jaGlsZHJlbi5sZW5ndGggPT09IDApIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX3BhbmUgJiYgdGhpcy5fY29uZmlnLnBhbmVsQ2xhc3MpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3RvZ2dsZUNsYXNzZXModGhpcy5fcGFuZSwgdGhpcy5fY29uZmlnLnBhbmVsQ2xhc3MsIGZhbHNlKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5faG9zdCAmJiB0aGlzLl9ob3N0LnBhcmVudEVsZW1lbnQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3ByZXZpb3VzSG9zdFBhcmVudCA9IHRoaXMuX2hvc3QucGFyZW50RWxlbWVudDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3ByZXZpb3VzSG9zdFBhcmVudC5yZW1vdmVDaGlsZCh0aGlzLl9ob3N0KTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBzdWJzY3JpcHRpb24udW5zdWJzY3JpYmUoKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogRGlzcG9zZXMgb2YgYSBzY3JvbGwgc3RyYXRlZ3kuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIH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YWwgb3Blbi4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX2NhblB1c2ggPSB0cnVlOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogV2hldGhlciB0aGUgb3ZlcmxheSBjYW4gZ3JvdyB2aWEgZmxleGlibGUgd2lkdGgvaGVpZ2h0IGFmdGVyIHRoZSBpbml0aWFsIG9wZW4uCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9ncm93QWZ0ZXJPcGVuID0gZmFsc2U7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBXaGV0aGVyIHRoZSBvdmVybGF5J3Mgd2lkdGggYW5kIGhlaWdodCBjYW4gYmUgY29uc3RyYWluZWQgdG8gZml0IHdpdGhpbiB0aGUgdmlld3BvcnQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9oYXNGbGV4aWJsZURpbWVuc2lvbnMgPSB0cnVlOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogV2hldGhlciB0aGUgb3ZlcmxheSBwb3NpdGlvbiBpcyBsb2NrZWQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9wb3NpdGlvbkxvY2tlZCA9IGZhbHNlOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQW1vdW50IG9mIHNwYWNlIHRoYXQgbXVzdCBiZSBtYWludGFpbmVkIGJldHdlZW4gdGhlIG92ZXJsYXkgYW5kIHRoZSBlZGdlIG9mIHRoZSB2aWV3cG9ydC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX3ZpZXdwb3J0TWFyZ2luID0gMDsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFRoZSBTY3JvbGxhYmxlIGNvbnRhaW5lcnMgdXNlZCB0byBjaGVjayBzY3JvbGxhYmxlIHZpZXcgcHJvcGVydGllcyBvbiBwb3NpdGlvbiBjaGFuZ2UuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9zY3JvbGxhYmxlcyA9IFtdOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogT3JkZXJlZCBsaXN0IG9mIHByZWZlcnJlZCBwb3NpdGlvbnMsIGZyb20gbW9zdCB0byBsZWFzdCBkZXNpcmFibGUuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9wcmVmZXJyZWRQb3NpdGlvbnMgPSBbXTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFN1YmplY3QgdGhhdCBlbWl0cyB3aGVuZXZlciB0aGUgcG9zaXRpb24gY2hhbmdlcy4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX3Bvc2l0aW9uQ2hhbmdlcyA9IG5ldyBTdWJqZWN0KCk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBTdWJzY3JpcHRpb24gdG8gdmlld3BvcnQgc2l6ZSBjaGFuZ2VzLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fcmVzaXplU3Vic2NyaXB0aW9uID0gU3Vic2NyaXB0aW9uLkVNUFRZOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRGVmYXVsdCBvZmZzZXQgZm9yIHRoZSBvdmVybGF5IGFsb25nIHRoZSB4IGF4aXMuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9vZmZzZXRYID0gMDsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIERlZmF1bHQgb2Zmc2V0IGZvciB0aGUgb3ZlcmxheSBhbG9uZyB0aGUgeSBheGlzLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fb2Zmc2V0WSA9IDA7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBLZWVwcyB0cmFjayBvZiB0aGUgQ1NTIGNsYXNzZXMgdGhhdCB0aGUgcG9zaXRpb24gc3RyYXRlZ3kgaGFzIGFwcGxpZWQgb24gdGhlIG92ZXJsYXkgcGFuZWwuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9hcHBsaWVkUGFuZWxDbGFzc2VzID0gW107CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBPYnNlcnZhYmxlIHNlcXVlbmNlIG9mIHBvc2l0aW9uIGNoYW5nZXMuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLnBvc2l0aW9uQ2hhbmdlcyA9IHRoaXMuX3Bvc2l0aW9uQ2hhbmdlcy5hc09ic2VydmFibGUoKTsKICAgICAgICAgICAgdGhpcy5zZXRPcmlnaW4oY29ubmVjdGVkVG8pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBPcmRlcmVkIGxpc3Qgb2YgcHJlZmVycmVkIHBvc2l0aW9ucywgZnJvbSBtb3N0IHRvIGxlYXN0IGRlc2lyYWJsZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBwb3NpdGlvbnMoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9wcmVmZXJyZWRQb3NpdGlvbnM7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEF0dGFjaGVzIHRoaXMgcG9zaXRpb24gc3RyYXRlZ3kgdG8gYW4gb3ZlcmxheS4KICAgICAgICAgKiBAcGFyYW0gez99IG92ZXJsYXlSZWYKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGF0dGFjaChvdmVybGF5UmVmKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9vdmVybGF5UmVmICYmIG92ZXJsYXlSZWYgIT09IHRoaXMuX292ZXJsYXlSZWYpIHsKICAgICAgICAgICAgICAgIHRocm93IEVycm9yKCdUaGlzIHBvc2l0aW9uIHN0cmF0ZWd5IGlzIGFscmVhZHkgYXR0YWNoZWQgdG8gYW4gb3ZlcmxheScpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX3ZhbGlkYXRlUG9zaXRpb25zKCk7CiA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IHVzZSB0aGUgcG9zaXRpb24gdGhhdCBnb2VzIG9mZi1zY3JlZW4gdGhlIGxlYXN0LgogICAgICAgICAqIFxAZG9jcy1wcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBhcHBseSgpIHsKICAgICAgICAgICAgLy8gV2Ugc2hvdWxkbid0IGRvIGFueXRoaW5nIGlmIHRoZSBzdHJhdGVneSB3YXMgZGlzcG9zZWQgb3Igd2UncmUgb24gdGhlIHNlcnZlci4KICAgICAgICAgICAgaWYgKHRoaXMuX2lzRGlzcG9zZWQgfHwgIXRoaXMuX3BsYXRmb3JtLmlzQnJvd3NlcikgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIElmIHRoZSBwb3NpdGlvbiBoYXMgYmVlbiBhcHBsaWVkIGFscmVhZHkgKGUuZy4gd2hlbiB0aGUgb3ZlcmxheSB3YXMgb3BlbmVkKSBhbmQgdGhlCiAgICAgICAgICAgIC8vIGNvbnN1bWVyIG9wdGVkIGludG8gbG9ja2luZyBpbiB0aGUgcG9zaXRpb24sIHJlLXVzZSB0aGUgb2xkIHBvc2l0aW9uLCBpbiBvcmRlciB0bwogICAgICAgICAgICAvLyBwcmV2ZW50IHRoZSBvdmVybGF5IGZyb20ganVtcGluZyBhcm91bmQuCiAgICAgICAgICAgIGlmICghdGhpcy5faXNJbml0aWFsUmVuZGVyICYmIHRoaXMuX3Bvc2l0aW9uTG9ja2VkICYmIHRoaXMuX2xhc3RQb3NpdGlvbikgewogICAgICAgICAgICAgICAgdGhpcy5yZWFwcGx5TGFzdFBvc2l0aW9uKCk7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fY2xlYXJQYW5lbENsYXNzZXMoKTsKICAgICAgICAgICAgdGhpcy5fcmVzZXRPdmVybGF5RWxlbWVudFN0eWxlcygpOwogICAgICAgICAgICB0aGlzLl9y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GxlZnQsIGJvdHRvbSwgcmlnaHQpIHN0eWxlLgogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IG92ZXJsYXlQb2ludCA9IHRoaXMuX2dldE92ZXJsYXlQb2ludChvcmlnaW5Qb2ludCwgb3ZlcmxheVJlY3QsIHBvcyk7CiAgICAgICAgICAgICAgICAvLyBDYWxjdWxhdGUgaG93IHdlbGwgdGhlIG92ZXJsYXkgd291bGQgZml0IGludG8gdGhlIHZpZXdwb3J0IHdpdGggdGhpcyBwb2ludC4KICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCBvdmVybGF5Rml0ID0gdGhpcy5fZ2V0T3ZlcmxheUZpdChvdmVybGF5UG9pbnQsIG92ZXJsYXlSZWN0LCB2aWV3cG9ydFJlY3QsIHBvcyk7CiAgICAgICAgICAgICAgICAvLyBJZiB0aGUgb3ZlcmxheSwgd2l0aG91dCBhbnkgZnVydGhlciB3b3JrLCBmaXRzIGludG8gdGhlIHZpZXdwb3J0LCB1c2UgdGhpcyBwb3NpdGlvbi4KICAgICAgICAgICAgICAgIGlmIChvdmVybGF5Rml0LmlzQ29tcGxldGVseVdpdGhpblZpZXdwb3J0KSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5faXNQdXNoZWQgPSBmYWxzZTsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9hcHBseVBvc2l0aW9uKHBvcywgb3JpZ2luUG9pbnQpOwogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vIElmIHRoZSBvdmVybGF5IGhhcyBmbGV4aWJsZSBkaW1lbnNpb25zLCB3ZSBjYW4gdXNlIHRoaXMgcG9zaXRpb24KICAgICAgICAgICAgICAgIC8vIHNvIGxvbmcgYXMgdGhlcmUncyBlbm91Z2ggc3BhY2UgZm9yIHRoZSBtaW5pbXVtIGRpbWVuc2lvbnMuCiAgICAgICAgICAgICAgICBpZiAodGhpcy5fY2FuRml0V2l0aEZsZXhpYmxlRGltZW5zaW9ucyhvdmVybGF5Rml0LCBvdmVybGF5UG9pbnQsIHZpZXdwb3J0UmVjdCkpIHsKICAgICAgICAgICAgICAgICAgICAvLyBTYXZlIHBvc2l0aW9ucyB3aGVyZSB0aGUgb3ZlcmxheSB3aWxsIGZpdCB3aXRoIGZsZXhpYmxlIGRpbWVuc2lvbnMuIFdlIHdpbGwgdXNlIHRoZXNlCiAgICAgICAgICAgICAgICAgICAgLy8gaWYgbm9uZSBvZiB0aGUgcG9zaXRpb25zIGZpdCAqd2l0aG91dCogZmxleGlibGUgZGltZW5zaW9ucy4KICAgICAgICAgICAgICAgICAgICBmbGV4aWJsZUZpdHMucHVzaCh7CiAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiBwb3MsCiAgICAgICAgICAgICAgICAgICAgICAgIG9yaWdpbjogb3JpZ2luUG9pbnQsCiAgICAgICAgICAgICAgICAgICAgICAgIG92ZXJsYXlSZWN0LAogICAgICAgICAgICAgICAgICAgICAgICBib3VuZGluZ0JveFJlY3Q6IHRoaXMuX2NhbGN1bGF0ZUJvdW5kaW5nQm94UmVjdChvcmlnaW5Qb2ludCwgcG9zKQogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLy8gSWYgdGhlIGN1cnJlbnQgcHJlZmVycmVkIHBvc2l0aW9uIGRvZXMgbm90IGZpdCBvbiB0aGUgc2NyZWVuLCByZW1lbWJlciB0aGUgcG9zaXRpb24KICAgICAgICAgICAgICAgIC8vIGlmIGl0IGhhcyBtb3JlIHZpc2libGUgYXJlYSBvbi1zY3JlZW4gdGhhbiB3ZSd2ZSBzZWVuIGFuZCBtb3ZlIG9udG8gdGhlIG5leHQgcHJlZmVycmVkCiAgICAgICAgICAgICAgICAvLyBwb3NpdGlvbi4KICAgICAgICAgICAgICAgIGlmICghZmFsbGJhY2sgfHwgZmFsbGJhY2sub3ZlcmxheUZpdC52aXNpYmxlQXJlYSA8IG92ZXJsYXlGaXQudmlzaWJsZUFyZWEpIHsKICAgICAgICAgICAgICAgICAgICBmYWxsYmFjayA9IHsgb3ZlcmxheUZpdCwgb3ZlcmxheVBvaW50LCBvcmlnaW5Qb2ludCwgcG9zaXRpb246IHBvcywgb3ZlcmxheVJlY3QgfTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBJZiB0aGVyZSBhcmUgYW55IHBvc2l0aW9ucyB3aGVyZSB0aGUgb3ZlcmxheSB3b3VsZCBmaXQgd2l0aCBmbGV4aWJsZSBkaW1lbnNpb25zLCBjaG9vc2UgdGhlCiAgICAgICAgICAgIC8vIG9uZSB0aGF0IGhhcyB0aGUgZ3JlYXRlc3QgYXJlYSBhdmFpbGFibGUgbW9kaWZpZWQgYnkgdGhlIHBvc2l0aW9uJ3Mgd2VpZ2h0CiAgICAgICAgICAgIGlmIChmbGV4aWJsZUZpdHMubGVuZ3RoKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBsZXQgYmVzdEZpdCA9IG51bGw7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBsZXQgYmVzdFNjb3JlID0gLTE7CiAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IGZpdCBvZiBmbGV4aWJsZUZpdHMpIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3Qgc2NvcmUgPSBmaXQuYm91bmRpbmdCb3hSZWN0LndpZHRoICogZml0LmJvdW5kaW5nQm94UmVjdC5oZWlnaHQgKiAoZml0LnBvc2l0aW9uLndlaWdodCB8fCAxKTsKICAgICAgICAgICAgICAgICAgICBpZiAoc2NvcmUgPiBiZXN0U2NvcmUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgYmVzdFNjb3JlID0gc2NvcmU7CiAgICAgICAgICAgICAgICAgICAgICAgIGJlc3RGaXQgPSBmaXQ7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdGhpcy5faXNQdXNoZWQgPSBmYWxzZTsKICAgICAgICAgICAgICAgIHRoaXMuX2FwcGx5UG9zaXRpb24oKC8qKiBAdHlwZSB7P30gKi8gKGJlc3RGaXQpKS5wb3NpdGlvbiwgKC8qKiBAdHlwZSB7P30gKi8gKGJlc3RGaXQpKS5vcmlnaW4pOwogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIFdoZW4gbm9uZSBvZiB0aGUgcHJlZmVycmVkIHBvc2l0aW9ucyBmaXQgd2l0aGluIHRoZSB2aWV3cG9ydCwgdGFrZSB0aGUgcG9zaXRpb24KICAgICAgICAgICAgLy8gdGhhdCB3ZW50IG9mZi1zY3JlZW4gdGhlIGxlYXN0IGFuZCBhdHRlbXB0IHRvIHB1c2ggaXQgb24tc2NyZWVuLgogICAgICAgICAgICBpZiAodGhpcy5fY2FuUHVzaCkgewogICAgICAgICAgICAgICAgLy8gVE9ETyhqZWxib3Vybik6IGFmdGVyIHB1c2hpbmcsIHRoZSBvcGVuaW5nICJkaXJlY3Rpb24iIG9mIHRoZSBvdmVybGF5IG1pZ2h0IG5vdCBtYWtlIHNlbnNlLgogICAgICAgICAgICAgICAgdGhpcy5faXNQdXNoZWQgPSB0cnVlOwogICAgICAgICAgICAgICAgdGhpcy5fYXBwbHlQb3NpdGlvbigoLyoqIEB0eXBlIHs/fSAqLyAoZmFsbGJhY2spKS5wb3NpdGlvbiwgKC8qKiBAdHlwZSB7P30gKi8gKGZhbGxiYWNrKSkub3JpZ2luUG9pbnQpOwogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIEFsbCBvcHRpb25zIGZvciBnZXR0aW5nIHRoZSBvdmVybGF5IHdpdGhpbiB0aGUgdmlld3BvcnQgaGF2ZSBiZWVuIGV4aGF1c3RlZCwgc28gZ28gd2l0aCB0aGUKICAgICAgICAgICAgLy8gcG9zaXRpb24gdGhhdCB3ZW50IG9mZi1zY3JlZW4gdGhlIGxlYXN0LgogICAgICAgICAgICB0aGlzLl9hcHBseVBvc2l0aW9uKCgvKiogQHR5cGUgez99ICovIChmYWxsYmFjaykpLnBvc2l0aW9uLCAoLyoqIEB0eXBlIHs/fSAqLyAoZmFsbGJhY2spKS5vcmlnaW5Qb2ludCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZGV0YWNoKCkgewogICAgICAgICAgICB0aGlzLl9jbGVhclBhbmVsQ2xhc3NlcygpOwogICAgICAgICAgICB0aGlzLl9sYXN0UG9zaXRpb24gPSBudWxsOwogICAgICAgICAgICB0aGlzLl9wcmV2aW91c1B1c2hBbW91bnQgPSBudWxsOwogICAgICAgICAgICB0aGlzLl9yZXNpemVTdWJzY3JpcHRpb24udW5zdWJzY3JpYmUoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ2xlYW51cCBhZnRlciB0aGUgZWxlbWVudCBnZXRzIGRlc3Ryb3llZC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGRpc3Bvc2UoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9pc0Rpc3Bvc2VkKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gV2UgY2FuJ3QgdXNlIGBfcmVzZXRCb3VuZGluZ0JveFN0eWxlc2AgaGVyZSwgYmVjYXVzZSBpdCByZXNldHMKICAgICAgICAgICAgLy8gc29tZSBwcm9wZXJ0aWVzIHRvIHplcm8sIHJhdGhlciB0aGFuIHJlbW92aW5nIHRoZW0uCiAgICAgICAgICAgIGlmICh0aGlzLl9ib3VuZGluZ0JveCkgewogICAgICAgICAgICAgICAgZXh0ZW5kU3R5bGVzKHRoaXMuX2JvdW5kaW5nQm94LnN0eWxlLCAoLyoqIEB0eXBlIHs/fSAqLyAoewogICAgICAgICAgICAgICAgICAgIHRvcDogJycsCiAgICAgICAgICAgICAgICAgICAgbGVmdDogJycsCiAgICAgICAgICAgICAgICAgICAgcmlnaHQ6ICcnLAogICAgICAgICAgICAgICAgICAgIGJvdHRvbTogJycsCiAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiAnJywKICAgICAgICAgICAgICAgICAgICB3aWR0aDogJycsCiAgICAgICAgICAgICAgICAgICAgYWxpZ25JdGVtczogJycsCiAgICAgICAgICAgICAgICAgICAganVzdGlmeUNvbnRlbnQ6ICcnLAogICAgICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5fcGFuZSkgewogICAgICAgICAgICAgICAgdGhpcy5fcmVzZXRPdmVybGF5RWxlbWVudFN0eWxlcygpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0aGlzLl9vdmVybGF5UmVmKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9vdmVybGF5UmVmLmhvc3RFbGVtZW50LmNsYXNzTGlzdC5yZW1vdmUoYm91bmRpbmdCb3hDbGFzcyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5kZXRhY2goKTsKICAgICAgICAgICAgdGhpcy5fcG9zaXRpb25DaGFuZ2VzLmNvbXBsZXRlKCk7CiAgICAgICAgICAgIHRoaXMuX292ZXJsYXlSZWYgPSB0aGlzLl9ib3VuZGluZ0JveCA9ICgvKiogQHR5cGUgez99ICovIChudWxsKSk7CiAgICAgICAgICAgIHRoaXMuX2lzRGlzcG9zZWQgPSB0cnVlOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBUaGlzIHJlLWFsaWducyB0aGUgb3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24pOwogICAgICAgICAgICAgICAgdGhpcy5fYXBwbHlQb3NpdGlvbihsYXN0UG9zaXRpb24sIG9yaWdpblBvaW50KTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIHRoZSBsaXN0IG9mIFNjcm9sbGFibGUgY29udGFpbmVycyB0aGF0IGhvc3QgdGhlIG9yaWdpbiBlbGVtZW50IHNvIHRoYXQKICAgICAgICAgKiBvbiByZXBvc2l0aW9uIHdlIGNhbiBldmFsdWF0ZSBpZiBpdCBvciB0aGUgb3ZlcmxheSBoYXMgYmVlbiBjbGlwcGVkIG9yIG91dHNpZGUgdmlldy4gRXZlcnkKICAgICAgICAgKiBTY3JvbGxhYmxlIG11c3QgYmUgYW4gYW5jZXN0b3IgZWxlbWVudCBvZiB0aGUgc3RyYXRlZ3kncyBvcmlnaW4gZWxlbWVudC4KICAgICAgICAgKiBAdGVtcGxhdGUgVEhJUwogICAgICAgICAqIEB0aGlzIHtUSElTfQogICAgICAgICAqIEBwYXJhbSB7P30gc2Nyb2xsYWJsZXMKICAgICAgICAgKiBAcmV0dXJuIHtUSElTfQogICAgICAgICAqLwogICAgICAgIHdpdGhTY3JvbGxhYmxlQ29udGFpbmVycyhzY3JvbGxhYmxlcykgewogICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpLl9zY3JvbGxhYmxlcyA9IHNjcm9sbGFibGVzOwogICAgICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQWRkcyBuZXcgcHJlZmVycmVkIHBvc2l0aW9ucy4KICAgICAgICAgKiBAdGVtcGxhdGUgVEhJUwogICAgICAgICAqIEB0aGlzIHtUSElTfQogICAgICAgICAqIEBwYXJhbSB7P30gcG9zaXRpb25zIExpc3Qgb2YgcG9zaXRpb25zIG9wdGlvbnMgZm9yIHRoaXMgb3ZlcmxheS4KICAg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dGhlIG92ZXJsYXkgYW5kIHRoZSB2aWV3cG9ydCBlZGdlIGluIHBpeGVscy4KICAgICAgICAgKiBAcmV0dXJuIHtUSElTfQogICAgICAgICAqLwogICAgICAgIHdpdGhWaWV3cG9ydE1hcmdpbihtYXJnaW4pIHsKICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKS5fdmlld3BvcnRNYXJnaW4gPSBtYXJnaW47CiAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIHdoZXRoZXIgdGhlIG92ZXJsYXkncyB3aWR0aCBhbmQgaGVpZ2h0IGNhbiBiZSBjb25zdHJhaW5lZCB0byBmaXQgd2l0aGluIHRoZSB2aWV3cG9ydC4KICAgICAgICAgKiBAdGVtcGxhdGUgVEhJUwogICAgICAgICAqIEB0aGlzIHtUSElTfQogICAgICAgICAqIEBwYXJhbSB7Pz19IGZsZXhpYmxlRGltZW5zaW9ucwogICAgICAgICAqIEByZXR1cm4ge1RISVN9CiAgICAgICAgICovCiAgICAgICAgd2l0aEZsZXhpYmxlRGltZW5zaW9ucyhmbGV4aWJsZURpbWVuc2lvbnMgPSB0cnVlKSB7CiAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovICh0aGlzKSkuX2hhc0ZsZXhpYmxlRGltZW5zaW9ucyA9IGZsZXhpYmxlRGltZW5zaW9uczsKICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovICh0aGlzKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgd2hldGhlciB0aGUgb3ZlcmxheSBjYW4gZ3JvdyBhZnRlciB0aGUgaW5pdGlhbCBvcGVuIHZpYSBmbGV4aWJsZSB3aWR0aC9oZWlnaHQuCiAgICAgICAgICogQHRlbXBsYXRlIFRISVMKICAgICAgICAgKiBAdGhpcyB7VEhJU30KICAgICAgICAgKiBAcGFyYW0gez89fSBncm93QWZ0ZXJPcGVuCiAgICAgICAgICogQHJldHVybiB7VEhJU30KICAgICAgICAgKi8KICAgICAgICB3aXRoR3Jvd0FmdGVyT3Blbihncm93QWZ0ZXJPcGVuID0gdHJ1ZSkgewogICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpLl9ncm93QWZ0ZXJPcGVuID0gZ3Jvd0FmdGVyT3BlbjsKICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovICh0aGlzKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgd2hldGhlciB0aGUgb3ZlcmxheSBjYW4gYmUgcHVzaGVkIG9uLXNjcmVlbiBpZiBub25lIG9mIHRoZSBwcm92aWRlZCBwb3NpdGlvbnMgZml0LgogICAgICAgICAqIEB0ZW1wbGF0ZSBUSElTCiAgICAgICAgICogQHRoaXMge1RISVN9CiAgICAgICAgICogQHBhcmFtIHs/PX0gY2FuUHVzaAogICAgICAgICAqIEByZXR1cm4ge1RISVN9CiAgICAgICAgICovCiAgICAgICAgd2l0aFB1c2goY2FuUHVzaCA9IHRydWUpIHsKICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKS5fY2FuUHVzaCA9IGNhblB1c2g7CiAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIHdoZXRoZXIgdGhlIG92ZXJsYXkncyBwb3NpdGlvbiBzaG91bGQgYmUgbG9ja2VkIGluIGFmdGVyIGl0IGlzIHBvc2l0aW9uZWQKICAgICAgICAgKiBpbml0aWFsbHkuIFdoZW4gYW4gb3ZlcmxheSBpcyBsb2NrZWQgaW4sIGl0IHdvbid0IGF0dGVtcHQgdG8gcmVwb3NpdGlvbiBpdHNlbGYKICAgICAgICAgKiB3aGVuIHRoZSBwb3NpdGlvbiBpcyByZS1hcHBsa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Z2luLgogICAgICAgICAqIEByZXR1cm4ge1RISVN9CiAgICAgICAgICovCiAgICAgICAgc2V0T3JpZ2luKG9yaWdpbikgewogICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpLl9vcmlnaW4gPSBvcmlnaW47CiAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIHRoZSBkZWZhdWx0IG9mZnNldCBmb3IgdGhlIG92ZXJsYXkncyBjb25uZWN0aW9uIHBvaW50IG9uIHRoZSB4LWF4aXMuCiAgICAgICAgICogQHRlbXBsYXRlIFRISVMKICAgICAgICAgKiBAdGhpcyB7VEhJU30KICAgICAgICAgKiBAcGFyYW0gez99IG9mZnNldCBOZXcgb2Zmc2V0IGluIHRoZSBYIGF4aXMuCiAgICAgICAgICogQHJldHVybiB7VEhJU30KICAgICAgICAgKi8KICAgICAgICB3aXRoRGVmYXVsdE9mZnNldFgob2Zmc2V0KSB7CiAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovICh0aGlzKSkuX29mZnNldFggPSBvZmZzZXQ7CiAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIHRoZSBkZWZhdWx0IG9mZnNldCBmb3IgdGhlIG92ZXJsYXkncyBjb25uZWN0aW9uIHBvaW50IG9uIHRoZSB5LWF4aXMuCiAgICAgICAgICogQHRlbXBsYXRlIFRISVMKICAgICAgICAgKiBAdGhpcyB7VEhJU30KICAgICAgICAgKiBAcGFyYW0gez99IG9mZnNldCBOZXcgb2Zmc2V0IGluIHRoZSBZIGF4aXMuCiAgICAgICAgICogQHJldHVybiB7VEhJU30KICAgICAgICAgKi8KICAgICAgICB3aXRoRGVmYXVsdE9mZnNldFkob2Zmc2V0KSB7CiAgICAgICAgICAgICgvKiogQHR5cG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A9IHBvcy5vcmlnaW5YID09ICdzdGFydCcgPyBzdGFydFggOiBlbmRYOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHk7CiAgICAgICAgICAgIGlmIChwb3Mub3JpZ2luWSA9PSAnY2VudGVyJykgewogICAgICAgICAgICAgICAgeSA9IG9yaWdpblJlY3QudG9wICsgKG9yaWdpblJlY3QuaGVpZ2h0IC8gMik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB5ID0gcG9zLm9yaWdpblkgPT0gJ3RvcCcgPyBvcmlnaW5SZWN0LnRvcCA6IG9yaWdpblJlY3QuYm90dG9tOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB7IHgsIHkgfTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogR2V0cyB0aGUgKHgsIHkpIGNvb3JkaW5hdGUgb2YgdGhlIHRvcC1sZWZ0IGNvcm5lciBvZiB0aGUgb3ZlcmxheSBnaXZlbiBhIGdpdmVuIHBvc2l0aW9uIGFuZAogICAgICAgICAqIG9yaWdpbiBwb2ludCB0byB3aGljaCB0aGUgb3ZlcmxheSBzaG91bGQgYmUgY29ubmVjdGVkLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBvcmlnaW5Qb2ludAogICAgICAgICAqIEBwYXJhbSB7P30gb3ZlcmxheVJlY3QKICAgICAgICAgKiBAcGFyYW0gez99IHBvcwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2dldE92ZXJsYXlQb2ludChvcmlnaW5Qb2ludCwgb3ZlcmxheVJlY3QsIHBvcykgewogICAgICAgICAgICAvLyBDYWxjdWxhdGUgdGhlIChvdmVybGF5U3RhcnRYLCBvdmVybGF5U3RhcnRZKSwgdGhlIHN0YXJ0IG9mIHRoZQogICAgICAgICAgICAvLyBwb3RlbnRpYWwgb3ZlcmxheSBwb3NpdGlvbiByZWxhdGl2ZSB0byB0aGUgb3JpZ2luIHBvaW50LgogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBvdmVybGF5U3RhcnRYOwogICAgICAgICAgICBpZiAocG9zLm92ZXJsYXlYID09ICdjZW50ZXInKSB7CiAgICAgICAgICAgICAgICBvdmVybGF5U3RhcnRYID0gLW92ZXJsYXlSZWN0LndpZHRoIC8gMjsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChwb3Mub3ZlcmxheVggPT09ICdzdGFydCcpIHsKICAgICAgICAgICAgICAgIG92ZXJsYXlTdGFydFggPSB0aGlzLl9pc1J0bCgpID8gLW92ZXJsYXlSZWN0LndpZHRoIDogMDsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIG92ZXJsYXlTdGFydFggPSB0aGlzLl9pc1J0bCgpID8gMCA6IC1vdmVybGF5UmVjdC53aWR0aDsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBvdmVybGF5U3RhcnRZOwogICAgICAgICAgICBpZiAocG9zLm92ZXJsYXlZID09ICdjZW50ZXInKSB7CiAgICAgICAgICAgICAgICBvdmVybGF5U3RhcnRZID0gLW92ZXJsYXlSZWN0LmhlaWdodCAvIDI7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBvdmVybGF5U3RhcnRZID0gcG9zLm92ZXJsYXlZID09ICd0b3AnID8gMCA6IC1vdmVybGF5UmVjdC5oZWlnaHQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gVGhlICh4LCB5KSBjb29yZGluYXRlcyBvZiB0aGUgb3ZlcmxheS4KICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIHg6IG9yaWdpblBvaW50LnggKyBvdmVybGF5U3RhcnRYLAogICAgICAgICAgICAgICAgeTogb3JpZ2luUG9pbnQueSArIG92ZXJsYXlTdGFydFksCiAgICAgICAgICAgIH07CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEdldHMgaG93IHdlbGwgYW4gb3ZlcmxheSBhdCB0aGUgZ2l2ZW4gcG9pbnQgd2lsbCBmaXQgd2l0aGluIHRoZSB2aWV3cG9ydC4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gcG9pbnQKICAgICAgICAgKiBAcGFyYW0gez99IG92ZXJsYXkKICAgICAgICAgKiBAcGFyYW0gez99IHZpZXdwb3J0CiAgICAgICAgICogQHBhcmFtIHs/fSBwb3NpdGlvbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2dldE92ZXJsYXlGaXQocG9pbnQsIG92ZXJsYXksIHZpZXdwb3J0LCBwb3NpdGlvbikgewogICAgICAgICAgICBsZXQgeyB4LCB5IH0gPSBwb2ludDsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgb2Zmc2V0WCA9IHRoaXMuX2dldE9mZnNldChwb3NpdGlvbiwgJ3gnKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgb2Zmc2V0WSA9IHRoaXMuX2dldE9mZnNldChwb3NpdGlvbiwgJ3knKTsKICAgICAgICAgICAgLy8gQWNjb3VudCBmb3IgdGhlIG9mZnNldHMgc2luY2UgdGhleSBjb3VsZCBwdXNoIHRoZSBvdmVybGF5IG91dCBvZiB0aGUgdmlld3BvcnQuCiAgICAgICAgICAgIGlmIChvZmZzZXRYKSB7CiAgICAgICAgICAgICAgICB4ICs9IG9mZnNldFg7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKG9mZnNldFkpIHsKICAgICAgICAgICAgICAgIHkgKz0gb2Zmc2V0WTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBIb3cgbXVjaCB0aGUgb3ZlcmxheSB3b3VsZCBvdmVyZmxvdyBhdCB0aGlzIHBvc2l0aW9uLCBvbiBlYWNoIHNpZGUuCiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGxlZnRPdmVyZmxvdyA9IDAgLSB4OwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCByaWdodE92ZXJmbG93ID0gKHggKyBvdmVybGF5LndpZHRoKSAtIHZpZXdwb3J0LndpZHRoOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCB0b3BPdmVyZmxvdyA9IDAgLSB5OwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBib3R0b21PdmVyZmxvdyA9ICh5ICsgb3ZlcmxheS5oZWlnaHQpIC0gdmlld3BvcnQuaGVpZ2h0OwogICAgICAgICAgICAvLyBWaXNpYmxlIHBhcnRzIG9mIHRoZSBlbGVtZW50IG9uIGVhY2ggYXhpcy4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgdmlzaWJsZVdpZHRoID0gdGhpcy5fc3VidHJhY3RPdmVyZmxvd3Mob3ZlcmxheS53aWR0aCwgbGVmdE92ZXJmbG93LCByaWdodE92ZXJmbG93KTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgdmlzaWJsZUhlaWdodCA9IHRoaXMuX3N1YnRyYWN0T3ZlcmZsb3dzKG92ZXJsYXkuaGVpZ2h0LCB0b3BPdmVyZmxvdywgYm90dG9tT3ZlcmZsb3cpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCB2aXNpYmxlQXJlYSA9IHZpc2libGVXaWR0aCAqIHZpc2libGVIZWlnaHQ7CiAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICB2aXNpYmxlQXJlYSwKICAgICAgICAgICAgICAgIGlzQ29tcGxldGVseVdpdGhpblZpZXdwb3J0OiAob3ZlcmxheS53aWR0aCAqIG92ZXJsYXkuaGVpZ2h0KSA9PT0gdmlzaWJsZUFyZWEsCiAgICAgICAgICAgICAgICBmaXRzSW5WaWV3cG9ydFZlcnRpY2FsbHk6IHZpc2libGVIZWlnaHQgPT09IG92ZXJsYXkuaGVpZ2h0LAogICAgICAgICAgICAgICAgZml0c0luVmlld3BvcnRIb3Jpem9udGFsbHk6IHZpc2libGVXaWR0aCA9PSBvdmVybGF5LndpZHRoLAogICAgICAgICAgICB9OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGV0aGVyIHRoZSBvdmVybGF5IGNhbiBmaXQgd2l0aGluIHRoZSB2aWV3cG9ydCB3aGVuIGl0IG1heSByZXNpemUgZWl0aGVyIGl0cyB3aWR0aCBvciBoZWlnaHQuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGZpdCBIb3cgd2VsbCB0aGUgb3ZlcmxheSBmaXRzIGluIHRoZSB2aWV3cG9ydCBhdCBzb21lIHBvc2l0aW9uLgogICAgICAgICAqIEBwYXJhbSB7P30gcG9pbnQgVGhlICh4LCB5KSBjb29yZGluYXRlcyBvZiB0aGUgb3ZlcmxhdCBhdCBzb21lIHBvc2l0aW9uLgogICAgICAgICAqIEBwYXJhbSB7P30gdmlld3BvcnQgVGhlIGdlb21ldHJ5IG9mIHRoZSB2aWV3cG9ydC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9jYW5GaXRXaXRoRmxleGlibGVEaW1lbnNpb25zKGZpdCwgcG9pbnQsIHZpZXdwb3J0KSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9oYXNGbGV4aWJsZURpbWVuc2lvbnMpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGF2YWlsYWJsZUhlaWdodCA9IHZpZXdwb3J0LmJvdHRvbSAtIHBvaW50Lnk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBhdmFpbGFibGVXaWR0aCA9IHZpZXdwb3J0LnJpZ2h0IC0gcG9pbnQueDsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IG1pbkhlaWdodCA9IGdldFBpeGVsVmFsdWUodGhpcy5fb3ZlcmxheVJlZi5nZXRDb25maWcoKS5taW5IZWlnaHQpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgbWluV2lkdGggPSBnZXRQaXhlbFZhbHVlKHRoaXMuX292ZXJsYXlSZWYuZ2V0Q29uZmlnKCkubWluV2lkdGgpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgdmVydGljYWxGaXQgPSBmaXQuZml0c0luVmlld3BvcnRWZXJ0aWNhbGx5IHx8CiAgICAgICAgICAgICAgICAgICAgKG1pbkhlaWdodCAhPSBudWxsICYmIG1pbkhlaWdodCA8PSBhdmFpbGFibGVIZWlnaHQpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgaG9yaXpvbnRhbEZpdCA9IGZpdC5maXRzSW5WaWV3cG9ydEhvcml6b250YWxseSB8fAogICAgICAgICAgICAgICAgICAgIChtaW5XaWR0aCAhPSBudWxsICYmIG1pbldpZHRoIDw9IGF2YWlsYWJsZVdpZHRoKTsKICAgICAgICAgICAgICAgIHJldHVybiB2ZXJ0aWNhbEZpdCAmJiBob3Jpem9udGFsRml0OwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogR2V0cyB0aGUgcG9pbnQgY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gY29udGludWUgcHVzaGluZywgdGhlIGVsZW1lbnQgd291bGQKICAgICAgICAgICAgLy8gcmVtYWluIGluIHRoZSB2aWV3cG9ydCwgd2hpY2ggZ29lcyBhZ2FpbnN0IHRoZSBleHBlY3RhdGlvbnMgd2hlbiBwb3NpdGlvbiBsb2NraW5nIGlzIGVuYWJsZWQuCiAgICAgICAgICAgIGlmICh0aGlzLl9wcmV2aW91c1B1c2hBbW91bnQgJiYgdGhpcy5fcG9zaXRpb25Mb2NrZWQpIHsKICAgICAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAgICAgeDogc3RhcnQueCArIHRoaXMuX3ByZXZpb3VzUHVzaEFtb3VudC54LAogICAgICAgICAgICAgICAgICAgIHk6IHN0YXJ0LnkgKyB0aGlzLl9wcmV2aW91c1B1c2hBbW91bnQueQogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHZpZXdwb3J0ID0gdGhpcy5fdmlld3BvcnRSZWN0OwogICAgICAgICAgICAvLyBEZXRlcm1pbmUgaG93IG11Y2ggdGhlIG92ZXJsYXkgZ29lcyBvdXRzaWRlIHRoZSB2aWV3cG9ydCBvbiBlYWNoCiAgICAgICAgICAgIC8vIHNpZGUsIHdoaWNoIHdlJ2xsIHVzZSB0byBkZWNpZGUgd2hpY2ggZGlyZWN0aW9uIHRvIHB1c2ggaXQuCiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgb3ZlcmZsb3dSaWdodCA9IE1hdGgubWF4KHN0YXJ0LnggKyBvdmVybGF5LndpZHRoIC0gdmlld3BvcnQucmlnaHQsIDApOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG92ZXJmbG93Qm90dG9tID0gTWF0aC5tYXgoc3RhcnQueSArIG92ZXJsYXkuaGVpZ2h0IC0gdmlld3Bvc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BvdmVyZmxvd0xlZnQgfHwgLW92ZXJmbG93UmlnaHQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBwdXNoWCA9IHN0YXJ0LnggPCB0aGlzLl92aWV3cG9ydE1hcmdpbiA/ICh2aWV3cG9ydC5sZWZ0IC0gc2Nyb2xsUG9zaXRpb24ubGVmdCkgLSBzdGFydC54IDogMDsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAob3ZlcmxheS5oZWlnaHQgPD0gdmlld3BvcnQuaGVpZ2h0KSB7CiAgICAgICAgICAgICAgICBwdXNoWSA9IG92ZXJmbG93VG9wIHx8IC1vdmVyZmxvd0JvdHRvbTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHB1c2hZID0gc3RhcnQueSA8IHRoaXMuX3ZpZXdwb3J0TWFyZ2luID8gKHZpZXdwb3J0LnRvcCAtIHNjcm9sbFBvc2l0aW9uLnRvcCkgLSBzdGFydC55IDogMDsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9wcmV2aW91c1B1c2hBbW91bnQgPSB7IHg6IHB1c2hYLCB5OiBwdXNoWSB9OwogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgeDogc3RhcnQueCArIHB1c2hYLAogICAgICAgICAgICAgICAgeTogc3RhcnQueSArIHB1c2hZLAogICAgICAgICAgICB9OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBcHBsaWVzIGEgY29tcHV0ZWQgcG9zaXRpb24gdG8gdGhlIG92ZXJsYXkgYW5kIGVtaXRzIGEgcG9zaXRpb24gY2hhbmdlLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBwb3NpdGlvbiBUaGUgcG9zaXRpb24gcHJlZmVyZW5jZQogICAgICAgICAqIEBwYXJhbSB7P30gb3JpZ2luUG9pbnQgVGhlIHBvaW50IG9uIHRoZSBvc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bvc2l0aW9uQ2hhbmdlcy5vYnNlcnZlcnMubGVuZ3RoKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBzY3JvbGxhYmxlVmlld1Byb3BlcnRpZXMgPSB0aGlzLl9nZXRTY3JvbGxWaXNpYmlsaXR5KCk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBjaGFuZ2VFdmVudCA9IG5ldyBDb25uZWN0ZWRPdmVybGF5UG9zaXRpb25DaGFuZ2UocG9zaXRpb24sIHNjcm9sbGFibGVWaWV3UHJvcGVydGllcyk7CiAgICAgICAgICAgICAgICB0aGlzLl9wb3NpdGlvbkNoYW5nZXMubmV4dChjaGFuZ2VFdmVudCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5faXNJbml0aWFsUmVuZGVyID0gZmFsc2U7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgdGhlIHRyYW5zZm9ybSBvcmlnaW4gYmFzZWQgb24gdGhlIGNvbmZpZ3VyZWQgc2VsZWN0b3IgYW5kIHRoZSBwYXNzZWQtaW4gcG9zaXRpb24uCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHBvc2l0aW9uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfc2V0VHJhbnNmb3JtT3JpZ2luKHBvc2l0aW9uKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5fdHJhbnNmb3JtT3JpZ2luU2VsZWN0b3IpIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGVsZW1lbnRzID0gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX2JvdW5kaW5nQm94KSkucXVlcnlTZWxlY3RvckFsbCh0aGlzLl90cmFuc2Zvcm1PcmlnaW5TZWxlY3Rvcik7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHhPcmlnaW47CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHlPcmlnaW4gPSBwb3NpdGlvbi5vdmVybGF5WTsKICAgICAgICAgICAgaWYgKHBvc2l0aW9uLm92ZXJsYXlYID09PSAnY2VudGVyJykgewogICAgICAgICAgICAgICAgeE9yaWdpbiA9ICdjZW50ZXInOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKHRoaXMuX2lzUnRsKCkpIHsKICAgICAgICAgICAgICAgIHhPcmlnaW4gPSBwb3NpdGlvbi5vdmVybGF5WCA9PT0gJ3N0YXJ0JyA/ICdyaWdodCcgOiAnbGVmdCc7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB4T3JpZ2luID0gcG9zaXRpb24ub3ZlcmxheVggPT09ICdzdGFydCcgPyAnbGVmdCcgOiAncmlnaHQnOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZWxlbWVudHMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIGVsZW1lbnRzW2ldLnN0eWxlLnRyYW5zZm9ybU9yaWdpbiA9IGAke3hPcmlnaW59ICR7eU9yaWdpbn1gOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEdldHMgdGhlIHBvc2l0aW9uIGFuZCBzaXplIG9mIHRoZSBvdmVybGF5J3Mgc2l6aW5nIGNvbnRhaW5lci4KICAgICAgICAgKgogICAgICAgICAqIFRoaXMgbWV0aG9kIGRvZXMgbm8gbWVhc3VyaW5nIGFuZCBhcHBsaWVzIG5vIHN0eWxlcyBzbyB0aGF0IHdlIGNhbiBjaGVhcGx5IGNvbXB1dGUgdGhlCiAgICAgICAgICogYm91bmRzIGZvciBhbGwgcG9zaXRpb25zIGFuZCBjaG9vc2UgdGhlIGJlc3QgZml0IGJhc2VkIG9uIHRoZXNlIHJlc3VsdHMuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IG9yaWdpbgogICAgICAgICAqIEBwYXJhbSB7P30gcG9zaXRpb24KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9jYWxjdWxhdGVCb3VuZGluZ0JveFJlY3Qob3JpZ2luLCBwb3NpdGlvbikgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHZpZXdwb3J0ID0gdGhpcy5fdmlld3BvcnRSZWN0OwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGlzUnRsID0gdGhpcy5faXNSdGwoKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgaGVpZ2h0OwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCB0b3A7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGJvdHRvbTsKICAgICAgICAgICAgaWYgKHBvc2l0aW9uLm92ZXJsYXlZID09PSAndG9wJykgewogICAgICAgICAgICAgICAgLy8gT3ZlcmxheSBpcyBvcGVuaW5nICJkb3dud2FyZCIgYW5kIHRodXMgaXMgYm91bmQgYnkgdGhlIGJvdHRvbSB2aWV3cG9ydCBlZGdlLgogICAgICAgICAgICAgICAgdG9wID0gb3JpZ2luLnk7CiAgICAgICAgICAgICAgICBoZWlnaHQgPSB2aWV3cG9ydC5oZWlnaHQgLSB0b3AgKyB0aGlzLl92aWV3cG9ydE1hcmdpbjsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChwb3NpdGlvbi5vdmVybGF5WSA9PT0gJ2JvdHRvbScpIHsKICAgICAgICAgIC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vcnQudG9wYC4KICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHNtYWxsZXN0RGlzdGFuY2VUb1ZpZXdwb3J0RWRnZSA9IE1hdGgubWluKHZpZXdwb3J0LmJvdHRvbSAtIG9yaWdpbi55ICsgdmlld3BvcnQudG9wLCBvcmlnaW4ueSk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBwcmV2aW91c0hlaWdodCA9IHRoaXMuX2xhc3RCb3VuZGluZ0JveFNpemUuaGVpZ2h0OwogICAgICAgICAgICAgICAgaGVpZ2h0ID0gc21hbGxlc3REaXN0YW5jZVRvVmlld3BvcnRFZGdlICogMjsKICAgICAgICAgICAgICAgIHRvcCA9IG9yaWdpbi55IC0gc21hbGxlc3REaXN0YW5jZVRvVmlld3BvcnRFZGdlOwogICAgICAgICAgICAgICAgaWYgKGhlaWdodCA+IHByZXZpb3VzSGVpZ2h0ICYmICF0aGlzLl9pc0luaXRpYWxSZW5kZXIgJiYgIXRoaXMuX2dyb3dBZnRlck9wZW4pIHsKICAgICAgICAgICAgICAgICAgICB0b3AgPSBvcmlnaW4ueSAtIChwcmV2aW91c0hlaWdodCAvIDIpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIFRoZSBvdmVybGF5IGlzIG9wZW5pbmcgJ3JpZ2h0LXdhcmQnICh0aGUgY29udGVudCBmbG93cyB0byB0aGUgcmlnaHQpLgogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGlzQm91bmRlZEJ5UmlnaHRWaWV3cG9ydEVkZ2UgPSAocG9zaXRpb24ub3ZlcmxheVggPT09ICdzdGFydCcgJiYgIWlzUnRsKSB8fAogICAgICAgICAgICAgICAgKHBvc2l0aW9uLm92ZXJsYXlYID09PSAnZW5kJyAmJiBpc1J0bCk7CiAgICAgICAgICAgIC8vIFRoZSBvdmVybGF5IGlzIG9wZW5pbmcgJ2xlZnQtd2FyZCcgKHRoZSBjb250ZW50IGZsb3dzIHRvIHRoZSBsZWZ0KS4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBpc0JvdW5kZWRCeUxlZnRWaWV3cG9ydEVkZ2UgPSAocG9zaXRpb24ub3ZlcmxheVggPT09ICdlbmQnICYmICFpc1J0bCkgfHwKICAgICAgICAgICAgICAgIChwb3NpdGlvbi5vdmVybGF5WCA9PT0gJ3N0YXJ0JyAmJiBpc1J0bCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHdpZHRoOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBsZWZ0OwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCByaWdodDsKICAgICAgICAgICAgaWYgKGlzQm91bmRlZEJ5TGVmdFZpZXdwb3J0RWRnZSkgewogICAgICAgICAgICAgICAgcmlnaHQgPSB2aWV3cG9ydC53aWR0aCAtIG9yaWdpbi54ICsgdGhpcy5fdmlld3BvcnRNYXJnaW47CiAgICAgICAgICAgICAgICB3aWR0aCA9IG9yaWdpbi54IC0gdGhpcy5fdmlld3BvcnRNYXJnaW47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoaXNCb3VuZGVkQnlSaWdodFZpZXdwb3J0RWRnZSkgewogICAgICAgICAgICAgICAgbGVmdCA9IG9yaWdpbi54OwogICAgICAgICAgICAgICAgd2lkdGggPSB2aWV3cG9ydC5yaWdodCAtIG9yaWdpbi54OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgLy8gSWYgbmVpdGhlciBzdGFydCBub3IgZW5kLCBpdCBtZWFucyB0aGF0IHRoZSBvdmVybGF5IGlzIGhvcml6b250YWxseSBjZW50ZXJlZCBvbiB0aGUKICAgICAgICAgICAgICAgIC8vIG9yaWdpbiBwb2ludC4gTm90ZSB0aGF0IHdlIHdhbnQgdGhlIHBvc2l0aW9uIHJlbGF0aXZlIHRvIHRoZSB2aWV3cG9ydCwgcmF0aGVyIHRoYW4KICAgICAgICAgICAgICAgIC8vIHRoZSBwYWdlLCB3aGljaCBpcyB3aHkgd2UgZG9uJ3QgdXNlIHNvbWV0aGluZyBsaWtlIGB2aWV3cG9ydC5yaWdodCAtIG9yaWdpbi54YCBhbmQKICAgICAgICAgICAgICAgIC8vIGBvcmlnaW4ueCAtIHZpZXdwb3J0LmxlZnRgLgogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3Qgc21hbGxlc3REaXN0YW5jZVRvVmlld3BvcnRFZGdlID0gTWF0aC5taW4odmlld3BvcnQucmlnaHQgLSBvcmlnaW4ueCArIHZpZXdwb3J0LmxlZnQsIG9yaWdpbi54KTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHByZXZpb3VzV2lkdGggPSB0aGlzLl9sYXN0Qm91bmRpbmdCb3hTaXplLndpZHRoOwogICAgICAgICAgICAgICAgd2lkdGggPSBzbWFsbGVzdERpc3RhbmNlVG9WaWV3cG9ydEVkZ2UgKiAyOwogICAgICAgICAgICAgICAgbGVmdCA9IG9yaWdpbi54IC0gc21hbGxlc3REaXN0YW5jZVRvVmlld3BvcnRFZGdlOwogICAgICAgICAgICAgICAgaWYgKHdpZHRoID4gcHJldmlvdXNXaWR0aCAmJiAhdGhpcy5faXNJbml0aWFsUmVuZGVyICYmICF0aGlzLl9ncm93QWZ0ZXJPcGVuKSB7CiAgICAgICAgICAgICAgICAgICAgbGVmdCA9IG9yaWdpbi54IC0gKHByZXZpb3VzV2lkdGggLyAyKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4geyB0b3A6ICg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udAogICAgICAgICAgICAvLyB3aGVuIGFwcGx5aW5nIGEgbmV3IHNpemUuCiAgICAgICAgICAgIGlmICghdGhpcy5faXNJbml0aWFsUmVuZGVyICYmICF0aGlzLl9ncm93QWZ0ZXJPcGVuKSB7CiAgICAgICAgICAgICAgICBib3VuZGluZ0JveFJlY3QuaGVpZ2h0ID0gTWF0aC5taW4oYm91bmRpbmdCb3hSZWN0LmhlaWdodCwgdGhpcy5fbGFzdEJvdW5kaW5nQm94U2l6ZS5oZWlnaHQpOwogICAgICAgICAgICAgICAgYm91bmRpbmdCb3hSZWN0LndpZHRoID0gTWF0aC5taW4oYm91bmRpbmdCb3hSZWN0LndpZHRoLCB0aGlzLl9sYXN0Qm91bmRpbmdCb3hTaXplLndpZHRoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHN0eWxlcyA9ICgvKiogQHR5cGUgez99ICovICh7fSkpOwogICAgICAgICAgICBpZiAodGhpcy5faGFzRXhhY3RQb3NpdGlvbigpKSB7CiAgICAgICAgICAgICAgICBzdHlsZXMudG9wID0gc3R5bGVzLmxlZnQgPSAnMCc7CiAgICAgICAgICAgICAgICBzdHlsZXMuYm90dG9tID0gc3R5bGVzLnJpZ2h0ID0gc3R5bGVzLm1heEhlaWdodCA9IHN0eWxlcy5tYXhXaWR0aCA9ICcnOwogICAgICAgICAgICAgICAgc3R5bGVzLndpZHRoID0gc3R5bGVzLmhlaWdodCA9ICcxMDAlJzsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IG1heEhlaWdodCA9IHRoaXMuX292ZXJsYXlSZWYuZ2V0Q29uZmlnKCkubWF4SGVpZ2h0OwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgbWF4V2lkdGggPSB0aGlzLl9vdmVybGF5UmVmLmdldENvbmZpZygpLm1heFdpZHRoOwogICAgICAgICAgICAgICAgc3R5bGVzLmhlaWdodCA9IGNvZXJjZUNzc1BpeGVsVmFsdWUoYm91bmRpbmdCb3hSZWN0LmhlaWdodCk7CiAgICAgICAgICAgICAgICBzdHlsZXMudG9wID0gY29lcmNlQ3NzUGl4ZWxWYWx1ZShib3VuZGluZ0JveFJlY3QudG9wKTsKICAgICAgICAgICAgICAgIHN0eWxlcy5ib3R0b20gPSBjb2VyY2VDc3NQaXhlbFZhbHVlKGJvdW5kaW5nQm94UmVjdC5ib3R0b20pOwogICAgICAgICAgICAgICAgc3R5bGVzLndpZHRoID0gY29lcmNlQ3NzUGl4ZWxWYWx1ZShib3VuZGluZ0JveFJlY3Qud2lkdGgpOwogICAgICAgICAgICAgICAgc3R5bGVzLmxlZnQgPSBjb2VyY2VDc3NQaXhlbFZhbHVlKGJvdW5kaW5nQm94UmVjdC5sZWZ0KTsKICAgICAgICAgICAgICAgIHN0eWxlcy5yaWdodCA9IGNvZXJjZUNzc1BpeGVsVmFsdWUoYm91bmRpbmdCb3hSZWN0LnJpZ2h0KTsKICAgICAgICAgICAgICAgIC8vIFB1c2ggdGhlIHBhbmUgY29udGVudCB0b3dhcmRzIHRoZSBwcm9wZXIgZGlyZWN0aW9uLgogICAgICAgICAgICAgICAgaWYgKHBvc2l0aW9uLm92ZXJsYXlYID09PSAnY2VudGVyJykgewogICAgICAgICAgICAgICAgICAgIHN0eWxlcy5hbGlnbkl0ZW1zID0gJ2NlbnRlcic7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBzdHlsZXMuYWxpZ25JdGVtcyA9IHBvc2l0aW9uLm92ZXJsYXlYID09PSAnZW5kJyA/ICdmbGV4LWVuZCcgOiAnZmxleC1zdGFydCc7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAocG9zaXRpb24ub3ZlcmxheVkgPT09ICdjZW50ZXInKSB7CiAgICAgICAgICAgICAgICAgICAgc3R5bGVzLmp1c3RpZnlDb250ZW50ID0gJ2NlbnRlcic7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBzdHlsZXMuanVzdGlmeUNvbnRlbnQgPSBwb3NpdGlvbi5vdmVybGF5WSA9PT0gJ2JvdHRvbScgPyAnZmxleC1lbmQnIDogJ2ZsZXgtc3RhcnQnOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKG1heEhlaWdodCkgewogICAgICAgICAgICAgICAgICAgIHN0eWxlcy5tYXhIZWlnaHQgPSBjb2VyY2VDc3NQaXhlbFZhbHVlKG1heEhlaWdodCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAobWF4V2lkdGgpIHsKICAgICAgICAgICAgICAgICAgICBzdHlsZXMubWF4V2lkdGggPSBjb2VyY2VDc3NQaXhlbFZhbHVlKG1heFdpZHRoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9sYXN0Qm91bmRpbmdCb3hTaXplID0gYm91bmRpbmdCb3hSZWN0OwogICAgICAgICAgICBleHRlbmRTdHlsZXMoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX2JvdW5kaW5nQm94KSkuc3R5bGUsIHN0eWxlcyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJlc2V0cyB0aGUgc3R5bGVzIGZvciB0aGUgYm91bmRpbmcgYm94IHNvIHRoYXQgYSBuZXcgcG9zaXRpb25pbmcgY2FuIGJlIGNvbXB1dGVkLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfcmVzZXRCb3VuZGluZ0JveFN0eWxlcygpIHsKICAgICAgICAgICAgZXh0ZW5kU3R5bGVzKCgvKiogQHR5cGUgez99ICovICh0aGlzLl9ib3VuZGluZ0JveCkpLnN0eWxlLCAoLyoqIEB0eXBlIHs/fSAqLyAoewogICAgICAgICAgICAgICAgdG9wOiAnMCcsCiAgICAgICAgICAgICAgICBsZWZ0OiAnMCcsCiAgICAgICAgICAgICAgICByaWdodDogJzAnLAogICAgICAgICAgICAgICAgYm90dG9tOiAnMCcsCiAgICAgICAgICAgICAgICBoZWlnaHQ6ICcnLAogICAgICAgICAgICAgICAgd2lkdGg6ICcnLAogICAgICAgICAgICAgICAgYWxpZ25JdGVtczogJycsCiAgICAgICAgICAgICAgICBqdXN0aWZ5Q29udGVudDogJycsCiAgICAgICAgICAgIH0pKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJlc2V0cyB0aGUgc3R5bGVzIGZvciB0aGUgb3ZlcmxheSBwYW5lIHNvIHRoYXQgYSBuZXcgcG9zaXRpb25pbmcgY2FuIGJlIGNvbXB1dGVkLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfcmVzZXRPdmVybGF5RWxlbWVudFN0eWxlcygpIHsKICAgICAgICAgICAgZXh0ZW5kU3R5bGVzKHRoaXMuX3BhbmUuc3R5bGUsICgvKiogQHR5cGUgez99ICovICh7CiAgICAgICAgICAgICAgICB0b3A6ICcnLAogICAgICAgICAgICAgICAgbGVmdDogJycsCiAgICAgICAgICAgICAgICBib3R0b206ICcnLAogICAgICAgICAgICAgICAgcmlnaHQ6ICcnLAogICAgICAgICAgICAgICAgcG9zaXRpb246ICcnLAogICAgICAgICAgICAgICAgdHJhbnNmb3JtOiAnJywKICAgICAgICAgICAgfSkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU2V0cyBwb3NpdGlvbmluZyBzdHlsZXMgdG8gdGhlIG92ZXJsYXkgZWxlbWVudC4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gb3JpZ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pZ2h0ID0gY29lcmNlQ3NzUGl4ZWxWYWx1ZShjb25maWcubWF4SGVpZ2h0KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKGhhc0ZsZXhpYmxlRGltZW5zaW9ucykgewogICAgICAgICAgICAgICAgICAgIHN0eWxlcy5tYXhIZWlnaHQgPSAnJzsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoY29uZmlnLm1heFdpZHRoKSB7CiAgICAgICAgICAgICAgICBpZiAoaGFzRXhhY3RQb3NpdGlvbikgewogICAgICAgICAgICAgICAgICAgIHN0eWxlcy5tYXhXaWR0aCA9IGNvZXJjZUNzc1BpeGVsVmFsdWUoY29uZmlnLm1heFdpZHRoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKGhhc0ZsZXhpYmxlRGltZW5zaW9ucykgewogICAgICAgICAgICAgICAgICAgIHN0eWxlcy5tYXhXaWR0aCA9ICcnOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGV4dGVuZFN0eWxlcyh0aGlzLl9wYW5lLnN0eWxlLCBzdHlsZXMpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIHRoZSBleGFjdCB0b3AvYm90dG9tIGZvciB0aGUgb3ZlcmxheSB3aGVuIG5vdCB1c2luZyBmbGV4aWJsZSBzaXppbmcgb3Igd2hlbiBwdXNoaW5nLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBwb3NpdGlvbgogICAgICAgICAqIEBwYXJhbSB7P30gb3JpZ2luUG9pbnQKICAgICAgICAgKiBAcGFyYW0gez99IHNjcm9sbFBvc2l0aW9uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZ2V0RXhhY3RPdmVybGF5WShwb3NpdGlvbiwgb3JpZ2luUG9pbnQsIHNjcm9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2h0OwogICAgICAgICAgICAgICAgc3R5bGVzLmJvdHRvbSA9IGAke2RvY3VtZW50SGVpZ2h0IC0gKG92ZXJsYXlQb2ludC55ICsgdGhpcy5fb3ZlcmxheVJlY3QuaGVpZ2h0KX1weGA7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBzdHlsZXMudG9wID0gY29lcmNlQ3NzUGl4ZWxWYWx1ZShvdmVybGF5UG9pbnQueSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHN0eWxlczsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogR2V0cyB0aGUgZXhhY3QgbGVmdC9yaWdodCBmb3IgdGhlIG92ZXJsYXkgd2hlbiBub3QgdXNpbmcgZmxleGlibGUgc2l6aW5nIG9yIHdoZW4gcHVzaGluZy4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gcG9zaXRpb24KICAgICAgICAgKiBAcGFyYW0gez99IG9yaWdpblBvaW50CiAgICAgICAgICogQHBhcmFtIHs/fSBzY3JvbGxQb3NpdGlvbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2dldEV4YWN0T3ZlcmxheVgocG9zaXRpb24sIG9yaWdpblBvaW50LCBzY3JvbGxQb3NpdGlvbikgewogICAgICAgICAgICAvLyBSZXNldCBhbnkgZXhpc3Rpbmcgc3R5bGVzLiBUaGlzIGlzIG5lY2Vzc2FyeSBpbiBjYXNlIHRoZSBwcmVmZXJyZWQgcG9zaXRpb24gaGFzCiAgICAgICAgICAgIC8vIGNoYW5nZWQgc2luY2UgdGhlIGxhc3QgYGFwcGx5YC4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgc3R5bGVzID0gKC8qKiBAdHlwZSB7P30gKi8gKHsgbGVmdDogJycsIHJpZ2h0OiAnJyB9KSk7CiAgICAgICAgICAgIC8qK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NlIHsKICAgICAgICAgICAgICAgIGhvcml6b250YWxTdHlsZVByb3BlcnR5ID0gcG9zaXRpb24ub3ZlcmxheVggPT09ICdlbmQnID8gJ3JpZ2h0JyA6ICdsZWZ0JzsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBXaGVuIHdlJ3JlIHNldHRpbmcgYHJpZ2h0YCwgd2UgYWRqdXN0IHRoZSB4IHBvc2l0aW9uIHN1Y2ggdGhhdCBpdCBpcyB0aGUgZGlzdGFuY2UKICAgICAgICAgICAgLy8gZnJvbSB0aGUgcmlnaHQgZWRnZSBvZiB0aGUgdmlld3BvcnQgcmF0aGVyIHRoYW4gdGhlIGxlZnQgZWRnZS4KICAgICAgICAgICAgaWYgKGhvcml6b250YWxTdHlsZVByb3BlcnR5ID09PSAncmlnaHQnKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBkb2N1bWVudFdpZHRoID0gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX2RvY3VtZW50LmRvY3VtZW50RWxlbWVudCkpLmNsaWVudFdpZHRoOwogICAgICAgICAgICAgICAgc3R5bGVzLnJpZ2h0ID0gYCR7ZG9jdW1lbnRXaWR0aCAtIChvdmVybGF5UG9pbnQueCArIHRoaXMuX292ZXJsYXlSZWN0LndpZHRoKX1weGA7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBzdHlsZXMubGVmdCA9IGNvZXJjZUNzc1BpeGVsVmFsdWUob3ZlcmxheVBvaW50LngpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBzdHlsZXM7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEdldHMgdGhlIHZpZXcgcHJvcGVydGllcyBvZiB0aGUgdHJpZ2dlciBhbmQgb3ZlcmxheSwgaW5jbHVkaW5nIHdoZXRoZXIgdGhleSBhcmUgY2xpcHBlZAogICAgICAgICAqIG9yIG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gICAgICAgICAqLwogICAgICAgICAgICBzY3JvbGxhYmxlID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiBzY3JvbGxhYmxlLmdldEVsZW1lbnRSZWYoKS5uYXRpdmVFbGVtZW50LmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICBpc09yaWdpbkNsaXBwZWQ6IGlzRWxlbWVudENsaXBwZWRCeVNjcm9sbGluZyhvcmlnaW5Cb3VuZHMsIHNjcm9sbENvbnRhaW5lckJvdW5kcyksCiAgICAgICAgICAgICAgICBpc09yaWdpbk91dHNpZGVWaWV3OiBpc0VsZW1lbnRTY3JvbGxlZE91dHNpZGVWaWV3KG9yaWdpbkJvdW5kcywgc2Nyb2xsQ29udGFpbmVyQm91bmRzKSwKICAgICAgICAgICAgICAgIGlzT3ZlcmxheUNsaXBwZWQ6IGlzRWxlbWVudENsaXBwZWRCeVNjcm9sbGluZyhvdmVybGF5Qm91bmRzLCBzY3JvbGxDb250YWluZXJCb3VuZHMpLAogICAgICAgICAgICAgICAgaXNPdmVybGF5T3V0c2lkZVZpZXc6IGlzRWxlbWVudFNjcm9sbGVkT3V0c2lkZVZpZXcob3ZlcmxheUJvdW5kcywgc2Nyb2xsQ29udGFpbmVyQm91bmRzKSwKICAgICAgICAgICAgfTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU3VidHJhY3RzIHRoZSBhbW91bnQgdGhhdCBhbiBlbGVtZW50IGlzIG92ZXJmbG93aW5nIG9uIGFuIGF4aXMgZnJvbSBpdHMgbGVuZ3RoLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBsZW5ndGgKICAgICAgICAgKiBAcGFyYW0gey4uLj99IG92ZXJmbG93cwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3N1YnRyYWN0T3ZlcmZsb3dzKGxlbmd0aCwgLi4ub3ZlcmZsb3dzKSB7CiAgICAgICAgICAgIHJldHVybiBvdmVyZmxvd3MucmVkdWNlKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjdXJyZW50VmFsdWUKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjdXJyZW50T3ZlcmZsb3cKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChjdXJyZW50VmFsdWUsIGN1cnJlbnRPdmVyZmxvdykgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIGN1cnJlbnRWYWx1ZSAtIE1hdGgubWF4KGN1cnJlbnRPdmVyZmxvdywgMCk7CiAgICAgICAgICAgIH0pLCBsZW5ndGgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBOYXJyb3dzIHRoZSBnaXZlbiB2aWV3cG9ydCByZWN0IGJ5IHRoZSBjdXJyZW50IF92aWV3cG9ydE1hcmdpbi4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2dldE5hcnJvd2VkVmlld3BvcnRSZWN0KCkgewogICAgICAgICAgICAvLyBXZSByZWNhbGN1bGF0ZSB0aGUgdmlld3BvcnQgcmVjdCBoZXJlIG91cnNlbHZlcywgcmF0aGVyIHRoYW4gdXNpbmcgdGhlIFZpZXdwb3J0UnVsZXIsCiAgICAgICAgICAgIC8vIGJlY2F1c2Ugd2Ugd2FudCB0byB1c2UgdGhlIGBjbGllbnRXaWR0aGAgYW5kIGBjbGllbnRIZWlnaHRgIGFzIHRoZSBiYXNlLiBUaGUgZGlmZmVyZW5jZQogICAgICAgICAgICAvLyBiZWluZyB0aGF0IHRoZSBjbGllbnQgcHJvcGVydGllcyBkb24ndCBpbmNsdWRlIHRoZSBzY3JvbGxiYXIsIGFzIG9wcG9zZWQgdG8gYGlubmVyV2lkdGhgCiAgICAgICAgICAgIC8vIGFuZCBgaW5uZ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HRoOiB3aWR0aCAtICgyICogdGhpcy5fdmlld3BvcnRNYXJnaW4pLAogICAgICAgICAgICAgICAgaGVpZ2h0OiBoZWlnaHQgLSAoMiAqIHRoaXMuX3ZpZXdwb3J0TWFyZ2luKSwKICAgICAgICAgICAgfTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogV2hldGhlciB0aGUgd2UncmUgZGVhbGluZyB3aXRoIGFuIFJUTCBjb250ZXh0CiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9pc1J0bCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX292ZXJsYXlSZWYuZ2V0RGlyZWN0aW9uKCkgPT09ICdydGwnOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBEZXRlcm1pbmVzIHdoZXRoZXIgdGhlIG92ZXJsYXkgdXNlcyBleGFjdCBvciBmbGV4aWJsZSBwb3NpdGlvbmluZy4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2hhc0V4YWN0UG9zaXRpb24oKSB7CiAgICAgICAgICAgIHJldHVybiAhdGhpcy5faGFzRmxleGlibGVEaW1lbnNpb25zIHx8IHRoaXMuX2lzUHVzaGVkOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZXRyaWV2ZXMgdGhlIG9mZnNldCBvZiBhIHBvc2l0aW9uIGFsb25nIHRoZSB4IG9yIHkgYXhpcy4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gcG9zaXRpb24KICAgICAgICAgKiBAcGFyYW0gez99IGF4aXMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9nZXRPZmZzZXQocG9zaXRpb24sIGF4aXMpIHsKICAgICAgICAgICAgaWYgKGF4aXMgPT09ICd4JykgewogICAgICAgICAgIC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lvbnMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcGFpcgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgcGFpciA9PiB7CiAgICAgICAgICAgICAgICB2YWxpZGF0ZUhvcml6b250YWxQb3NpdGlvbignb3JpZ2luWCcsIHBhaXIub3JpZ2luWCk7CiAgICAgICAgICAgICAgICB2YWxpZGF0ZVZlcnRpY2FsUG9zaXRpb24oJ29yaWdpblknLCBwYWlyLm9yaWdpblkpOwogICAgICAgICAgICAgICAgdmFsaWRhdGVIb3Jpem9udGFsUG9zaXRpb24oJ292ZXJsYXlYJywgcGFpci5vdmVybGF5WCk7CiAgICAgICAgICAgICAgICB2YWxpZGF0ZVZlcnRpY2FsUG9zaXRpb24oJ292ZXJsYXlZJywgcGFpci5vdmVybGF5WSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQWRkcyBhIHNpbmdsZSBDU1MgY2xhc3Mgb3IgYW4gYXJyYXkgb2YgY2xhc3NlcyBvbiB0aGUgb3ZlcmxheSBwYW5lbC4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gY3NzQ2xhc3NlcwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2FkZFBhbmVsQ2xhc3Nlcyhjc3NDbGFzc2VzKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9wYW5lKSB7CiAgICAgICAgICAgICAgICBjb2VyY2VBcnJheShjc3NDbGFzc2VzKS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY3NzQ2xhc3MKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIGNzc0NsYXNzID0+IHsKICAgICAgICAgICAgICAgICAgICBpZiAoY3NzQ2xhc3MgIT09ICcnICYmIHRoaXMuX2FwcGxpZWRQYW5lbENsYXNzZXMuaW5kZXhPZihjc3NDbGFzcykgPT09IC0xKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2FwcGxpZWRQYW5lbENsYXNzZXMucHVzaChjc3NDbGFzcyk7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3BhbmUuY2xhc3NMaXN0LmFkZChjc3NDbGFzcyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENsZWFycyB0aGUgY2xhc3NlcyB0aGF0IHRoZSBwb3NpdGlvbiBzdHJhdGVneSBoYXMgYXBwbGllZCBmcm9tIHRoZSBvdmVybGF5IHBhbmVsLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfY2xlYXJQYW5lbENsYXNzZXMoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9wYW5lKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9hcHBsaWVkUGFuZWxDbGFzc2VzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjc3NDbGFzcwogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgY3NzQ2xhc3MgPT4gewogICAgICAgICAgICAgICAgICAgIHRoaXMuX3BhbmUuY2xhc3NMaXN0LnJlbW92ZShjc3NDbGFzcyk7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICB0aGlzLl9hcHBsaWVkUGFuZWxDbGFzc2VzID0gW107CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0dXJucyB0aGUgQ2xpZW50UmVjdCBvZiB0aGUgY3VycmVudCBvcmlnaW4uCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9nZXRPcmlnaW5SZWN0KCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG9yaWdpbiA9IHRoaXMuX29yaWdpbjsKICAgICAgICAgICAgaWYgKG9yaWdpbiBpbnN0YW5jZW9mIEVsZW1lbnRSZWYpIHsKICAgICAgICAgICAgICAgIHJldHVybiBvcmlnaW4ubmF0aXZlRWxlbWVudC5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBDaGVjayBmb3IgRWxlbWVudCBzbyBTVkcgZWxlbWVudHMgYXJlIGFsc28gc3VwcG9ydGVkLgogICAgICAgICAgICBpZiAob3JpZ2luIGluc3RhbmNlb2YgRWxlbWVudCkgewogICAgICAgICAgICAgICAgcmV0dXJuIG9yaWdpbi5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHdpZHRoID0gb3JpZ2luLndpZHRoIHx8IDA7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaGVpZ2h0ID0gb3JpZ2luLmhlaWdodCB8fCAwOwogICAgICAgICAgICAvLyBJZiB0aGUgb3JpZ2luIGlzIGEgcG9pbnQsIHJldHVybiBhIGNsaWVudCByZWN0IGFzIGlmIGl0IHdhcyBhIDB4MCBlbGVtZW50IGF0IHRoZSBwb2ludC4KICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIHRvcDogb3JpZ2luLnksCiAgICAgICAgICAgICAgICBib3R0b206IG9yaWdpbi55ICsgaGVpZ2h0LAogICAgICAgICAgICAgICAgbGVmdDogb3JpZ2luLngsCiAgICAgICAgICAgICAgICByaWdodDogb3JpZ2luLnggKyB3aWR0aCwKICAgICAgICAgICAgICAgIGhlaWdodCwKICAgICAgICAgICAgICAgIHdpZHRoCiAgICAgICAgICAgIH07CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBTaGFsbG93LWV4dGVuZHMgYSBzdHlsZXNoZWV0IG9iamVjdCB3aXRoIGFub3RoZXIgc3R5bGVzaGVldCBvYmplY3QuCiAgICAgKiBAcGFyYW0gez99IGRlc3RpbmF0aW9uCiAgICAgKiBAcGFyYW0gez99IHNvdXJjZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZXh0ZW5kU3R5bGVzKGRlc3RpbmF0aW9uLCBzb3VyY2UpIHsKICAgICAgICBmb3IgKGxldCBrZXkgaW4gc291cmNlKSB7CiAgICAgICAgICAgIGlmIChzb3VyY2UuaGFzT3duUHJvcGVydHkoa2V5KSkgewogICAgICAgICAgICAgICAgZGVzdGluYXRpb25ba2V5XSA9IHNvdXJjZVtrZXldOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiBkZXN0aW5hdGlvbjsKICAgIH0KICAgIC8qKgogICAgICogRXh0cmFjdHMgdGhlIHBpeGVsIHZhbHVlIGFzIGEgbnVtYmVyIGZyb20gYSB2YWx1ZSwgaWYgaXQncyBhIG51bWJlcgogICAgICogb3IgYSBDU1MgcGl4ZWwgc3RyaW5nIChlLmcuIGAxMzM3cHhgKS4gT3RoZXJ3aXNlIHJldHVybnMgbnVsbC4KICAgICAqIEBwYXJhbSB7P30gaW5wdXQKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGdldFBpeGVsVmFsdWUoaW5wdXQpIHsKICAgICAgICBpZiAodHlwZW9mIGlucHV0ICE9PSAnbnVtYmVyJyAmJiBpbnB1dCAhPSBudWxsKSB7CiAgICAgICAgICAgIGNvbnN0IFt2YWx1ZSwgdW5pdHNdID0gaW5wdXQuc3BsaXQoY3NzVW5pdFBhdHRlcm4pOwogICA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nIHN0cmF0ZWd5IHRoYXQgaGFzIHNvbWUKICAgICAgICAgICAgLy8gZGVmYXVsdHMgdGhhdCBtYWtlIGl0IGJlaGF2ZSBhcyB0aGUgb2xkIHBvc2l0aW9uIHN0cmF0ZWd5IGFuZCB0byB3aGljaCB3ZSdsbAogICAgICAgICAgICAvLyBwcm94eSBhbGwgb2YgdGhlIEFQSSBjYWxscy4KICAgICAgICAgICAgdGhpcy5fcG9zaXRpb25TdHJhdGVneSA9IG5ldyBGbGV4aWJsZUNvbm5lY3RlZFBvc2l0aW9uU3RyYXRlZ3koY29ubmVjdGVkVG8sIHZpZXdwb3J0UnVsZXIsIGRvY3VtZW50LCBwbGF0Zm9ybSwgb3ZlcmxheUNvbnRhaW5lcikKICAgICAgICAgICAgICAgIC53aXRoRmxleGlibGVEaW1lbnNpb25zKGZhbHNlKQogICAgICAgICAgICAgICAgLndpdGhQdXNoKGZhbHNlKQogICAgICAgICAgICAgICAgLndpdGhWaWV3cG9ydE1hcmdpbigwKTsKICAgICAgICAgICAgdGhpcy53aXRoRmFsbGJhY2tQb3NpdGlvbihvcmlnaW5Qb3MsIG92ZXJsYXlQb3MpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGV0aGVyIHRoZSB3ZSdyZSBkZWFsaW5nIHdpdGggYW4gUlRMIGNvbnRleHQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBfaXNSdGwoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9vdmVybGF5UmVmLmdldERpcmVjdGlvbigpID09PSAncnRsJzsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogRW1pdHMgYW4gZXZlbnQgd2hlbiB0aGUgY29ubmVjdGlvbiBwb2ludCBjaGFuZ2VzLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IG9uUG9zaXRpb25DaGFuZ2UoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9wb3NpdGlvblN0cmF0ZWd5LnBvc2l0aW9uQ2hhbmdlczsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogT3JkZXJlZCBsaXN0IG9mIHByZWZlcnJlZCBwb3NpdGlvbnMsIGZyb20gbW9zdCB0byBsZWFzdCBkZXNpcmFibGUuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgcG9zaXRpb25zKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fcHJlZmVycmVkUG9zaXRpb25zOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBdHRhY2ggdGhpcyBwb3NpdGlvbiBzdHJhdGVneSB0byBhbiBvdmVybGF5LgogICAgICAgICAqIEBwYXJhbSB7P30gb3ZlcmxheVJlZgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYXR0YWNoKG92ZXJsYXlSZWYpIHsKICAgICAgICAgICAgdGhpcy5fb3ZlcmxheVJlZiA9IG92ZXJsYXlSZWY7CiAgICAgICAgICAgIHRoaXMuX3Bvc2l0aW9uU3RyYXRlZ3kuYXR0YWNoKG92ZXJsYXlSZWYpOwogICAgICAgICAgICBpZiAodGhpcy5fZGlyZWN0aW9uKSB7CiAgICAgICAgICAgICAgICBvdmVybGF5UmVmLnNldERpcmVjdGlvbih0aGlzLl9kaXJlY3Rpb24pOwogICAgICAgICAgICAgICAgdGhpcy5fZGlyZWN0aW9uID0gbnVsbDsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBEaXNwb3NlcyBhbGwgcmVzb3VyY2VzIHVzZWQgYnkgdGhlIHBvc2l0aW9uIHN0cmF0ZWd5LgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZGlzcG9zZSgpIHsKICAgICAgICAgICAgdGhpcy5fcG9zaXRpb25TdHJhdGVneS5kaXNwb3NlKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZG9jcy1wcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkZXRhY2goKSB7CiAgICAgICAgICAgIHRoaXMuX3Bvc2l0aW9uU3RyYXRlZ3kuZGV0YWNoKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFVwZGF0ZXMgdGhlIHBvc2l0aW9uIG9mIHRoZSBvdmVybGF5IGVsZW1lbnQsIHVzaW5nIHdoaWNoZXZlciBwcmVmZXJyZWQgcG9zaXRpb24gcmVsYXRpdmUKICAgICAgICAgKiB0byB0aGUgb3JpZ2luIGZpdHMgb24tc2NyZWVuLgogICAgICAgICAqIFxAZG9jcy1wcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBhcHBseSgpIHsKICAgICAgICAgICAgdGhpcy5fcG9zaXRpb25TdHJhdGVneS5hcHBseSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZS1wb3NpdGlvbnMgdGhlIG92ZXJsYXkgZWxlbWVudCB3aXRoIHRoZSB0cmlnZ2VyIGluIGl0cyBsYXN0IGNhbGN1bGF0ZWQgcG9zaXRpb24sCiAgICAgICAgICogZXZlbiBpZiBhIHBvc2l0aW9uIGhpZ2hlciBpbiB0aGUgInByZWZlcnJlZCBwb3NpdGlvbnMiIGxpc3Qgd291bGQgbm93IGZpdC4gVGhpcwogICAgICAgICAqIGFsbG93cyBvbmUgdG8gcmUtYWxpZ24gdGhlIHBhbmVsIHdpdGhvdXQgY2hhbmdpbmcgdGhlIG9yaWVudGF0aW9uIG9mIHRoZSBwYW5lbC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlY2FsY3VsYXRlTGFzdFBvc2l0aW9uKCkgewogICAgICAgICAgICB0aGlzLl9wb3NpdGlvblN0cmF0ZWd5LnJlYXBwbHlMYXN0UG9zaXRp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cmxheSByZWYgb24gYXR0YWNobWVudC4KICAgICAgICAgICAgaWYgKCgvKiogQHR5cGUgez99ICovICh0aGlzKSkuX292ZXJsYXlSZWYpIHsKICAgICAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovICh0aGlzKSkuX292ZXJsYXlSZWYuc2V0RGlyZWN0aW9uKGRpcik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpLl9kaXJlY3Rpb24gPSBkaXI7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovICh0aGlzKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgYW4gb2Zmc2V0IGZvciB0aGUgb3ZlcmxheSdzIGNvbm5lY3Rpb24gcG9pbnQgb24gdGhlIHgtYXhpcwogICAgICAgICAqIEB0ZW1wbGF0ZSBUSElTCiAgICAgICAgICogQHRoaXMge1RISVN9CiAgICAgICAgICogQHBhcmFtIHs/fSBvZmZzZXQgTmV3IG9mZnNldCBpbiB0aGUgWCBheGlzLgogICAgICAgICAqIEByZXR1cm4ge1RISVN9CiAgICAgICAgICovCiAgICAgICAgd2l0aE9mZnNldFgob2Zmc2V0KSB7CiAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovICh0aGlzKSkuX3Bvc2l0aW9uU3RyYXRlZ3kud2l0aERlZmF1bHRPZmZzZXRYKG9mZnNldCk7CiAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIGFuIG9mZnNldCBmb3IgdGhlIG92ZXJsYXkncyBjb25uZWN0aW9uIHBvaW50IG9uIHRoZSB5LWF4aXMKICAgICAgICAgKiBAdGVtcGxhdGUgVEhJUwogICAgICAgICAqIEB0aGlzIHtUSElTfQogICAgICAgICAqIEBwYXJhb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ykpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBPdmVyd3JpdGVzIHRoZSBjdXJyZW50IHNldCBvZiBwb3NpdGlvbnMgd2l0aCBhbiBhcnJheSBvZiBuZXcgb25lcy4KICAgICAgICAgKiBAdGVtcGxhdGUgVEhJUwogICAgICAgICAqIEB0aGlzIHtUSElTfQogICAgICAgICAqIEBwYXJhbSB7P30gcG9zaXRpb25zIFBvc2l0aW9uIHBhaXJzIHRvIGJlIHNldCBvbiB0aGUgc3RyYXRlZ3kuCiAgICAgICAgICogQHJldHVybiB7VEhJU30KICAgICAgICAgKi8KICAgICAgICB3aXRoUG9zaXRpb25zKHBvc2l0aW9ucykgewogICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpLl9wcmVmZXJyZWRQb3NpdGlvbnMgPSBwb3NpdGlvbnMuc2xpY2UoKTsKICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKS5fcG9zaXRpb25TdHJhdGVneS53aXRoUG9zaXRpb25zKCgvKiogQHR5cGUgez99ICovICh0aGlzKSkuX3ByZWZlcnJlZFBvc2l0aW9ucyk7CiAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIHRoZSBvcmlnaW4gZWxlbWVudCwgcmVsYXRpdmUgdG8gd2hpY2ggdG8gcG9zaXRpb24gdGhlIG92ZXJsYXkuCiAgICAgICAgICogQHRlbXBsYXRlIFRISVMKICAgICAgICAgKiBAdGhpcyB7VEhJU30KICAgICAgICAgKiBAcGFyYW0gez99IG9yaWdpbiBSZWZlcmVuY2UgdG8gdGhlIG5ldyBvcmlnaW4gZWxlbWVudC4KICAgICAgICAgKiBAcmV0dXJuIHtUSElTfQogICAgICAgICAqLwogICAgICAgIHNldE9yaWdpbihvcmlnaW4pIHsKICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8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VybGF5IGlzIGdpdmVuIGFuCiAgICAgKiBleHBsaWNpdCBwb3NpdGlvbiByZWxhdGl2ZSB0byB0aGUgYnJvd3NlcidzIHZpZXdwb3J0LiBXZSB1c2UgZmxleGJveCwgaW5zdGVhZCBvZgogICAgICogdHJhbnNmb3JtcywgaW4gb3JkZXIgdG8gYXZvaWQgaXNzdWVzIHdpdGggc3VicGl4ZWwgcmVuZGVyaW5nIHdoaWNoIGNhbiBjYXVzZSB0aGUKICAgICAqIGVsZW1lbnQgdG8gYmVjb21lIGJsdXJyeS4KICAgICAqLwogICAgY2xhc3MgR2xvYmFsUG9zaXRpb25TdHJhdGVneSB7CiAgICAgICAgY29uc3RydWN0b3IoKSB7CiAgICAgICAgICAgIHRoaXMuX2Nzc1Bvc2l0aW9uID0gJ3N0YXRpYyc7CiAgICAgICAgICAgIHRoaXMuX3RvcE9mZnNldCA9ICcnOwogICAgICAgICAgICB0aGlzLl9ib3R0b21PZmZzZXQgPSAnJzsKICAgICAgICAgICAgdGhpcy5fbGVmdE9mZnNldCA9ICcnOwogICAgICAgICAgICB0aGlzLl9yaWdodE9mZnNldCA9ICcnOwogICAgICAgICAgICB0aGlzLl9hbGlnbkl0ZW1zID0gJyc7CiAgICAgICAgICAgIHRoaXMuX2p1c3RpZnlDb250ZW50ID0gJyc7CiAgICAgICAgICAgIHRoaXMuX3dpZHRoID0gJyc7CiAgICAgICAgICAgIHRoaXMuX2hlaWdodCA9ICcnOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IG92ZXJsYXlSZWYKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGF0dGFjaChvdmVybGF5UmVmKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgY29uZmlnID0gb3ZlcmxheVJlZi5nZXRDb25maWcoKTsKICAgICAgICAgICAgdGhpcy5fb3ZlcmxheVJlZiA9IG92ZXJsYXlSZWY7CiAgICAgICAgICAgIGlmICh0aGlzLl93aWR0aCAmJiAhY29uZmlnLndpZHRoKSB7CiAgICAgICAgICAgICAgICBvdmVybGF5UmVmLnVwZGF0ZVNpemUoeyB3aWR0aDogdGhpcy5fd2lkdGggfSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHRoaXMuX2hlaWdodCAmJiAhY29uZmlnLmhlaWdodCkgewogICAgICAgICAgICAgICAgb3ZlcmxheVJlZi51cGRhdGVTaXplKHsgaGVpZ2h0OiB0aGlzLl9oZWlnaHQgfSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgb3ZlcmxheVJlZi5ob3N0RWxlbWVudC5jbGFzc0xpc3QuYWRkKHdyYXBwZXJDbGFzcyk7CiAgICAgICAgICAgIHRoaXMuX2lzRGlzcG9zZWQgPSBmYWxzZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU2V0cyB0aGUgdG9wIHBvc2l0aW9uIG9mIHRoZSBvdmVybGF5LiBDbGVhcnMgYW55IHByZXZpb3VzbHkgc2V0IHZlcnRpY2FsIHBvc2l0aW9uLgogICAgICAgICAqIEB0ZW1wbGF0ZSBUSElTCiAgICAgICAgICogQHRoaXMge1RISVN9CiAgICAgICAgICogQHBhcmFtIHs/PX0gdmFsdWUgTmV3IHRvcCBvZmZzZXQuCiAgICAgICAgICogQHJldHVybiB7VEhJU30KICAgICAgICAgKi8KICAgICAgICB0b3AodmFsdWUgPSAnJykgewogICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpLl9ib3R0b21PZmZzZXQgPSAnJzsKICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKS5fdG9wT2Zmc2V0ID0gdmFsdWU7CiAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovICh0aGlzKSkuX2FsaWduSXRlbXMgPSAnZmxleC1zdGFydCc7CiAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIHRoZSBsZWZ0IHBvc2l0aW9uIG9mIHRoZSBvdmVybGF5LiBDbGVhcnMgYW55IHByZXZpb3VzbHkgc2V0IGhvcml6b250YWwgcG9zaXRpb24uCiAgICAgICAgICogQHRlbXBsYXRlIFRISVMKICAgICAgICAgKiBAdGhpcyB7VEhJU30KICAgICAgICAgKiBAcGFyYW0gez89fSB2YWx1ZSBOZXcgbGVmdCBvZmZzZXQuCiAgICAgICAgICogQHJldHVybiB7VEhJU30KICAgICAgICAgKi8KICAgICAgICBsZWZ0KHZhbHVlID0gJycpIHsKICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKS5fcmlnaHRPZmZzZXQgPSAnJzsKICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKS5fbGVmdE9mZnNldCA9IHZhbHVlOwogICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpLl9qdXN0aWZ5Q29udGVudCA9ICdmbGV4LXN0YXJ0JzsKICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovICh0aGlzKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgdGhlIGJvdHRvbSBwb3NpdGlvbiBvZiB0aGUgb3ZlcmxheS4gQ2xlYXJzIGFueSBwcmV2aW91c2x5IHNldCB2ZXJ0aWNhbCBwb3NpdGlvbi4KICAgICAgICAgKiBAdGVtcGxhdGUgVEhJUwogICAgICAgICAqIEB0aGlzIHtUSElTfQogICAgICAgICAqIEBwYXJhbSB7Pz19IHZhbHVlIE5ldyBib3R0b20gb2Zmc2V0LgogICAgICAgICAqIEByZXR1cm4ge1RISVN9CiAgICAgICAgICovCiAgICAgICAgYm90dG9tKHZhbHVlID0gJycpIHsKICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKS5fdG9wT2Zmc2V0ID0gJyc7CiAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovICh0aGlzKSkuX2JvdHRvbU9mZnNldCA9IHZhbHVlOwogICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpLl9hbGlnbkl0ZW1zID0gJ2ZsZXgtZW5kJzsKICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovICh0aGlzKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgdGhlIHJpZ2h0IHBvc2l0aW9uIG9mIHRoZSBvdmVybGF5LiBDbGVhcnMgYW55IHByZXZpb3VzbHkgc2V0IGhvcml6b250YWwgcG9zaXRpb24uCiAgICAgICAgICogQHRlbXBsYXRlIFRISVMKICAgICAgICAgKiBAdGhpcyB7VEhJU30KICAgICAgICAgKiBAcGFyYW0gez89fSB2YWx1ZSBOZXcgcmlnaHQgb2Zmc2V0LgogICAgICAgICAqIEByZXR1cm4ge1RISVN9CiAgICAgICAgICovCiAgICAgICAgcmlnaHQodmFsdWUgPSAnJykgewogICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpLl9sZWZ0T2Zmc2V0ID0gJyc7CiAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovICh0aGlzKSkuX3JpZ2h0T2Zmc2V0ID0gdmFsdWU7CiAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovICh0aGlzKSkuX2p1c3RpZnlDb250ZW50ID0gJ2ZsZXgtZW5kJzsKICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovICh0aGlzKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgdGhlIG92ZXJsYXkgd2lkdGggYW5kIGNsZWFycyBhbnkgcHJldmlvdXNseSBzZXQgd2lkdGguCiAgICAgICAgICogQGRlcHJlY2F0ZWQgUGFzcyB0aGUgYHdpZHRoYCB0aHJvdWdoIHRoZSBgT3ZlcmxheUNvbmZpZ2AuCiAgICAgICAgICogXEBicmVha2luZy1jaGFuZ2UgOC4wLjAKICAgICAgICAgKiBAdGVtcGxhdGUgVEhJUwogICAgICAgICAqIEB0aGlzIHtUSElTfQogICAgICAgICAqIEBwYXJhbSB7Pz19IHZhbHVlIE5ldyB3aWR0aCBmb3IgdGhlIG92ZXJsYXkKICAgICAgICAgKiBAcmV0dXJuIHtUSElTfQogICAgICAgICAqLwogICAgICAgIHdpZHRoKHZhbHVlID0gJycpIHsKICAgICAgICAgICAgaWYgKCgvKiogQHR5cGUgez99ICovICh0aGlzKSkuX292ZXJsYXlSZWYpIHsKICAgICAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovICh0aGlzKSkuX292ZXJsYXlSZWYudXBkYXRlU2l6ZSh7IHdpZHRoOiB2YWx1ZSB9KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovICh0aGlzKSkuX3dpZHRoID0gdmFsdWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovICh0aGlzKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgdGhlIG92ZXJsYXkgaGVpZ2h0IGFuZCBjbGVhcnMgYW55IHByZXZpb3VzbHkgc2V0IGhlaWdodC4KICAgICAgICAgKiBAZGVwcmVjYXRlZCBQYXNzIHRoZSBgaGVpZ2h0YCB0aHJvdWdoIHRoZSBgT3ZlcmxheUNvbmZpZ2AuCiAgICAgICAgICogXEBicmVha2luZy1jaGFuZ2UgOC4wLjAKICAgICAgICAgKiBAdGVtcGxhdGUgVEhJUwogICAgICAgICAqIEB0aGlzIHtUSElTfQogICAgICAgICAqIEBwYXJhbSB7Pz19IHZhbHVlIE5ldyBoZWlnaHQgZm9yIHRoZSBvdmVybGF5CiAgICAgICAgICogQHJldHVybiB7VEhJU30KICAgICAgICAgKi8KICAgICAgICBoZWlnaHQodmFsdWUgPSAnJykgewogICAgICAgICAgICBpZiAoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKS5fb3ZlcmxheVJlZikgewogICAgICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKS5fb3ZlcmxheVJlZi51cGRhdGVTaXplKHsgaGVpZ2h0OiB2YWx1ZSB9KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovICh0aGlzKSkuX2hlaWdodCA9IHZhbHVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDZW50ZXJzIHRoZSBvdmVybGF5IGhvcml6b250YWxseSB3aXRoIGFuIG9wdGlvbmFsIG9mZnNldC4KICAgICAgICAgKiBDbGVhcnMgYW55IHByZXZpb3VzbHkgc2V0IGhvcml6b250YWwgcG9zaXRpb24uCiAgICAgICAgICoKICAgICAgICAgKiBAdGVtcGxhdGUgVEhJUwogICAgICAgICAqIEB0aGlzIHtUSElTfQogICAgICAgICAqIEBwYXJhbSB7Pz19IG9mZnNldCBPdmVybGF5IG9mZnNldCBmcm9tIHRoZSBob3Jpem9udGFsIGNlbnRlci4KICAgICAgICAgKiBAcmV0dXJuIHtUSElTfQogICAgICAgICAqLwogICAgICAgIGNlbnRlckhvcml6b250YWxseShvZmZzZXQgPSAnJykgewogICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpLmxlZnQob2Zmc2V0KTsKICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKS5fanVzdGlmeUNvbnRlbnQgPSAnY2VudGVyJzsKICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovICh0aGlzKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENlbnRlcnMgdGhlIG92ZXJsYXkgdmVydGljYWxseSB3aXRoIGFuIG9wdGlvbmFsIG9mZnNldC4KICAgICAgICAgKiBDbGVhcnMgYW55IHByZXZpb3VzbHkgc2V0IHZlcnRpY2FsIHBvc2l0aW9uLgogICAgICAgICAqCiAgICAgICAgICogQHRlbXBsYXRlIFRISVMKICAgICAgICAgKiBAdGhpcyB7VEhJU30KICAgICAgICAgKiBAcGFyYW0gez89fSBvZmZzZXQgT3ZlcmxheSBvZmZzZXQgZnJvbSB0aGUgdmVydGljYWwgY2VudGVyLgogICAgICAgICAqIEByZXR1cm4ge1RISVN9CiAgICAgICAgICovCiAgICAgICAgY2VudGVyVmVydGljYWxseShvZmZzZXQgPSAnJykgewogICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpLnRvcChvZmZzZXQpOwogICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpLl9hbGlnbkl0ZW1zID0gJ2NlbnRlcic7CiAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBcHBseSB0aGUgcG9zaXRpb24gdG8gdGhlIGVsZW1lbnQuCiAgICAgICAgICogXEBkb2NzLXByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGFwcGx5KCkgewogICAgICAgICAgICAvLyBTaW5jZSB0aGUgb3ZlcmxheSByZWYgYXBwbGllcyB0aGUgc3RyYXRlZ3kgYXN5bmNocm9ub3VzbHksIGl0IGNvdWxkCiAgICAgICAgICAgIC8vIGhhdmUgYmVlbiBkaXNwb3NlZCBiZWZvcmUgaXQgZW5kcyB1cCBiZWluZyBhcHBsaWVkLiBJZiB0aGF0IGlzIHRoZQogICAgICAgICAgICAvLyBjYXNlLCB3ZSBzaG91bGRuJ3QgZG8gYW55dGhpbmcuCiAgICAgICAgICAgIGlmICghdGhpcy5fb3ZlcmxheVJlZiB8fCAhdGhpcy5fb3ZlcmxheVJlZi5oYXNBdHRhY2hlZCgpKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBzdHlsZXMgPSB0aGlzLl9vdmVybGF5UmVmLm92ZXJsYXlFbGVtZW50LnN0eWxlOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHBhcmVudFN0eWxlcyA9IHRoaXMuX292ZXJsYXlSZWYuaG9zdEVsZW1lbnQuc3R5bGU7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgY29uZmlnID0gdGhpcy5fb3ZlcmxheVJlZi5nZXRDb25maWcoKTsKICAgICAgICAgICAgY29uc3QgeyB3aWR0aCwgaGVpZ2h0LCBtYXhXaWR0aCwgbWF4SGVpZ2h0IH0gPSBjb25maWc7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc2hvdWxkQmVGbHVzaEhvcml6b250YWxseSA9ICh3aWR0aCA9PT0gJzEwMCUnIHx8IHdpZHRoID09PSAnMTAwdncnKSAmJgogICAgICAgICAgICAgICAgKCFtYXhXaWR0aCB8fCBtYXhXaWR0aCA9PT0gJzEwMCUnIHx8IG1heFdpZHRoID09PSAnMTAwdncnKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBzaG91bGRCZUZsdXNoVmVydGljYWxseSA9IChoZWlnaHQgPT09ICcxMDAlJyB8fCBoZWlnaHQgPT09ICcxMDB2aCcpICYmCiAgICAgICAgICAgICAgICAoIW1heEhlaWdodCB8fCBtYXhIZWlnaHQgPT09ICcxMDAlJyB8fCBtYXhIZWlnaHQgPT09ICcxMDB2aCcpOwogICAgICAgICAgICBzdHlsZXMucG9zaXRpb24gPSB0aGlzLl9jc3NQb3NpdGlvbj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0byBlbnN1cmUgdGhhdCB0aGUgb3ZlcmxheSBzdGF5cyBpbiB0aGUgc2FtZSBwb3NpdGlvbi4KICAgICAgICAgICAgICAgIC8vIFRPRE86IHJlY29uc2lkZXIgdGhpcyBpZiB3ZSBhZGQgYHN0YXJ0YCBhbmQgYGVuZGAgbWV0aG9kcy4KICAgICAgICAgICAgICAgIGlmICh0aGlzLl9qdXN0aWZ5Q29udGVudCA9PT0gJ2ZsZXgtc3RhcnQnKSB7CiAgICAgICAgICAgICAgICAgICAgcGFyZW50U3R5bGVzLmp1c3RpZnlDb250ZW50ID0gJ2ZsZXgtZW5kJzsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKHRoaXMuX2p1c3RpZnlDb250ZW50ID09PSAnZmxleC1lbmQnKSB7CiAgICAgICAgICAgICAgICAgICAgcGFyZW50U3R5bGVzLmp1c3RpZnlDb250ZW50ID0gJ2ZsZXgtc3RhcnQnOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgcGFyZW50U3R5bGVzLmp1c3RpZnlDb250ZW50ID0gdGhpcy5fanVzdGlmeUNvbnRlbnQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcGFyZW50U3R5bGVzLmFsaWduSXRlbXMgPSBzaG91bGRCZUZsdXNoVmVydGljYWxseSA/ICdmbGV4LXN0YXJ0JyA6IHRoaXMuX2FsaWduSXRlbXM7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENsZWFucyB1cCB0aGUgRE9NIGNoYW5nZXMgZnJvbSB0aGUgcG9zaXRpb24gc3RyYXRlZ3kuCiAgICAgICAgICogXEBkb2NzLXByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGRpc3Bvc2UoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9pc0Rpc3Bvc2VkIHx8ICF0aGlzLl9vdm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YVJlcXVpcmUsbWlzc2luZ092ZXJyaWRlLG1pc3NpbmdSZXR1cm4sdW51c2VkUHJpdmF0ZU1lbWJlcnMsdXNlbGVzc0NvZGV9IGNoZWNrZWQgYnkgdHNjCiAgICAgKi8KICAgIC8qKgogICAgICogQnVpbGRlciBmb3Igb3ZlcmxheSBwb3NpdGlvbiBzdHJhdGVneS4KICAgICAqLwogICAgY2xhc3MgT3ZlcmxheVBvc2l0aW9uQnVpbGRlciB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBfdmlld3BvcnRSdWxlcgogICAgICAgICAqIEBwYXJhbSB7P30gX2RvY3VtZW50CiAgICAgICAgICogQHBhcmFtIHs/fSBfcGxhdGZvcm0KICAgICAgICAgKiBAcGFyYW0gez99IF9vdmVybGF5Q29udGFpbmVyCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoX3ZpZXdwb3J0UnVsZXIsIF9kb2N1bWVudCwgX3BsYXRmb3JtLCBfb3ZlcmxheUNvbnRhaW5lcikgewogICAgICAgICAgICB0aGlzLl92aWV3cG9ydFJ1bGVyID0gX3ZpZXdwb3J0UnVsZXI7CiAgICAgICAgICAgIHRoaXMuX2RvY3VtZW50ID0gX2RvY3VtZW50OwogICAgICAgICAgICB0aGlzLl9wbGF0Zm9ybSA9IF9wbGF0Zm9ybTsKICAgICAgICAgICAgdGhpcy5fb3ZlcmxheUNvbnRhaW5lciA9IF9vdmVybGF5Q29udGFpbmVyOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDcmVhdGVzIGEgZ2xvYmFsIHBvc2l0aW9uIHN0cmF0ZWd5LgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2xvYmFsKCkgewogICAgICAgICAgICByZXR1cm4gbmV3IEdsb2JhbFBvc2l0aW9uU3RyYXRlZ3koKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhIHJlbGF0aXZ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cmF0ZWdpZXM7CiAgICAgICAgICAgIHRoaXMuX292ZXJsYXlDb250YWluZXIgPSBfb3ZlcmxheUNvbnRhaW5lcjsKICAgICAgICAgICAgdGhpcy5fY29tcG9uZW50RmFjdG9yeVJlc29sdmVyID0gX2NvbXBvbmVudEZhY3RvcnlSZXNvbHZlcjsKICAgICAgICAgICAgdGhpcy5fcG9zaXRpb25CdWlsZGVyID0gX3Bvc2l0aW9uQnVpbGRlcjsKICAgICAgICAgICAgdGhpcy5fa2V5Ym9hcmREaXNwYXRjaGVyID0gX2tleWJvYXJkRGlzcGF0Y2hlcjsKICAgICAgICAgICAgdGhpcy5faW5qZWN0b3IgPSBfaW5qZWN0b3I7CiAgICAgICAgICAgIHRoaXMuX25nWm9uZSA9IF9uZ1pvbmU7CiAgICAgICAgICAgIHRoaXMuX2RvY3VtZW50ID0gX2RvY3VtZW50OwogICAgICAgICAgICB0aGlzLl9kaXJlY3Rpb25hbGl0eSA9IF9kaXJlY3Rpb25hbGl0eTsKICAgICAgICAgICAgdGhpcy5fbG9jYXRpb24gPSBfbG9jYXRpb247CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYW4gb3ZlcmxheS4KICAgICAgICAgKiBAcGFyYW0gez89fSBjb25maWcgQ29uZmlndXJhdGlvbiBhcHBsaWVkIHRvIHRoZSBvdmVybGF5LgogICAgICAgICAqIEByZXR1cm4gez99IFJlZmVyZW5jZSB0byB0aGUgY3JlYXRlZCBvdmVybGF5LgogICAgICAgICAqLwogICAgICAgIGNyZWF0ZShjb25maWcpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBob3N0ID0gdGhpcy5fY3JlYXRlSG9zdEVsZW1lbnQoKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwYW5lID0gdGhpcy5fY3JlYXRlUGFuZUVsZW1lbnQoaG9zdCk7CiAgICAgICAgICA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YXJhbSB7P30gaG9zdAogICAgICAgICAqIEByZXR1cm4gez99IE5ld2x5LWNyZWF0ZWQgcGFuZSBlbGVtZW50CiAgICAgICAgICovCiAgICAgICAgX2NyZWF0ZVBhbmVFbGVtZW50KGhvc3QpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwYW5lID0gdGhpcy5fZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnZGl2Jyk7CiAgICAgICAgICAgIHBhbmUuaWQgPSBgY2RrLW92ZXJsYXktJHtuZXh0VW5pcXVlSWQkMysrfWA7CiAgICAgICAgICAgIHBhbmUuY2xhc3NMaXN0LmFkZCgnY2RrLW92ZXJsYXktcGFuZScpOwogICAgICAgICAgICBob3N0LmFwcGVuZENoaWxkKHBhbmUpOwogICAgICAgICAgICByZXR1cm4gcGFuZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyB0aGUgaG9zdCBlbGVtZW50IHRoYXQgd3JhcHMgYXJvdW5kIGFuIG92ZXJsYXkKICAgICAgICAgKiBhbmQgY2FuIGJlIHVzZWQgZm9yIGFkdmFuY2VkIHBvc2l0aW9uaW5nLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30gTmV3bHktY3JlYXRlIGhvc3QgZWxlbWVudC4KICAgICAgICAgKi8KICAgICAgICBfY3JlYXRlSG9zdEVsZW1lbnQoKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaG9zdCA9IHRoaXMuX2RvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2RpdicpOwogICAgICAgICAgICB0aGlzLl9vdmVybGF5Q29udGFpbmVyLmdldENvbnRhaW5lckVsZW1lbnQoKS5hcHBlbmRDaGlsZChob3N0KTsKICAgICAgICAgICAgcmV0dXJuIGhvc3Q7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENyZW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dIH0KICAgIF07CgogICAgLyoqCiAgICAgKiBAZmlsZW92ZXJ2aWV3IGFkZGVkIGJ5IHRzaWNrbGUKICAgICAqIEdlbmVyYXRlZCBmcm9tOiBzcmMvY2RrL292ZXJsYXkvb3ZlcmxheS1kaXJlY3RpdmVzLnRzCiAgICAgKiBAc3VwcHJlc3Mge2NoZWNrVHlwZXMsY29uc3RhbnRQcm9wZXJ0eSxleHRyYVJlcXVpcmUsbWlzc2luZ092ZXJyaWRlLG1pc3NpbmdSZXR1cm4sdW51c2VkUHJpdmF0ZU1lbWJlcnMsdXNlbGVzc0NvZGV9IGNoZWNrZWQgYnkgdHNjCiAgICAgKi8KICAgIC8qKgogICAgICogRGVmYXVsdCBzZXQgb2YgcG9zaXRpb25zIGZvciB0aGUgb3ZlcmxheS4gRm9sbG93cyB0aGUgYmVoYXZpb3Igb2YgYSBkcm9wZG93bi4KICAgICAqIEB0eXBlIHs/fQogICAgICovCiAgICBjb25zdCBkZWZhdWx0UG9zaXRpb25MaXN0ID0gWwogICAgICAgIHsKICAgICAgICAgICAgb3JpZ2luWDogJ3N0YXJ0JywKICAgICAgICAgICAgb3JpZ2luWTogJ2JvdHRvbScsCiAgICAgICAgICAgIG92ZXJsYXlYOiAnc3RhcnQnLAogICAgICAgICAgICBvdmVybGF5WTogJ3RvcCcKICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICAgb3JpZ2luWDogJ3N0YXJ0JywKICAgICAgICAgICAgb3JpZ2luWTogJ3RvcCcsCiAgICAgICAgICAgIG92ZXJsYXlYOiAnc3RhcnQnLAogICAgICAgICAgICBvdmVybGF5WTogJ2JvdHRvbScKICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICAgb3JpZ2luWDogJ2VuZCcsCiAgICAgICAgICAgIG9yaWdpblk6ICd0b3AnLAogICAgICAgICAgICBvdmVybGF5WDogJ2VuZCcsCiAgICAgICAgICAgIG92ZXJsYXlZOiAnYm90dG9tJwogICAgICAgIH0sCiAgICAgICAgew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hdGVneUZhY3RvcnksIF9kaXIpIHsKICAgICAgICAgICAgdGhpcy5fb3ZlcmxheSA9IF9vdmVybGF5OwogICAgICAgICAgICB0aGlzLl9kaXIgPSBfZGlyOwogICAgICAgICAgICB0aGlzLl9oYXNCYWNrZHJvcCA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLl9sb2NrUG9zaXRpb24gPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5fZ3Jvd0FmdGVyT3BlbiA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLl9mbGV4aWJsZURpbWVuc2lvbnMgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5fcHVzaCA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLl9iYWNrZHJvcFN1YnNjcmlwdGlvbiA9IFN1YnNjcmlwdGlvbi5FTVBUWTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIE1hcmdpbiBiZXR3ZWVuIHRoZSBvdmVybGF5IGFuZCB0aGUgdmlld3BvcnQgZWRnZXMuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLnZpZXdwb3J0TWFyZ2luID0gMDsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFdoZXRoZXIgdGhlIG92ZXJsYXkgaXMgb3Blbi4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMub3BlbiA9IGZhbHNlOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRXZlbnQgZW1pdHRlZCB3aGVuIHRoZSBiYWNrZHJvcCBpcyBjbGlja2VkLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5iYWNrZHJvcENsaWNrID0gbmV3IEV2ZW50RW1pdHRlcigpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRXZlbnQgZW1pdHRlZCB3aGVuIHRoZSBwb3NpdGlvbiBoYXMgY2hhbmdlZC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMucG9zaXRpb25DaGFuZ2UgPSB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ZnNldFgoKSB7IHJldHVybiB0aGlzLl9vZmZzZXRYOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBvZmZzZXRYCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgb2Zmc2V0WChvZmZzZXRYKSB7CiAgICAgICAgICAgIHRoaXMuX29mZnNldFggPSBvZmZzZXRYOwogICAgICAgICAgICBpZiAodGhpcy5fcG9zaXRpb24pIHsKICAgICAgICAgICAgICAgIHRoaXMuX3VwZGF0ZVBvc2l0aW9uU3RyYXRlZ3kodGhpcy5fcG9zaXRpb24pOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBvZmZzZXQgaW4gcGl4ZWxzIGZvciB0aGUgb3ZlcmxheSBjb25uZWN0aW9uIHBvaW50IG9uIHRoZSB5LWF4aXMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBvZmZzZXRZKCkgeyByZXR1cm4gdGhpcy5fb2Zmc2V0WTsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gb2Zmc2V0WQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IG9mZnNldFkob2Zmc2V0WSkgewogICAgICAgICAgICB0aGlzLl9vZmZzZXRZID0gb2Zmc2V0WTsKICAgICAgICAgICAgaWYgKHRoaXMuX3Bvc2l0aW9uKSB7CiAgICAgICAgICAgICAgICB0aGlzLl91cGRhdGVQb3NpdGlvblN0cmF0ZWd5KHRoaXMuX3Bvc2l0aW9uKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGV0aGVyIG9yIG5vdCB0aGUgb3ZlcmxheSBzaG91bGQgYXR0YWNoIGEgYmFja2Ryb3AuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgaGFzQmFja2Ryb3AoKSB7IHJldHVybiB0aGlzLl9oYXNCYWNrZHJvcDsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBoYXNCYWNrZHJvcCh2YWx1ZSkgeyB0aGlzLl9oYXNCYWNrZHJvcCA9IGNvZXJjZUJvb2xlYW5Qcm9wZXJ0eSh2YWx1ZSk7IH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGV0aGVyIG9yIG5vdCB0aGUgb3ZlcmxheSBzaG91bGQgYmUgbG9ja2VkIHdoZW4gc2Nyb2xsaW5nLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGxvY2tQb3NpdGlvbigpIHsgcmV0dXJuIHRoaXMuX2xvY2tQb3NpdGlvbjsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBsb2NrUG9zaXRpb24odmFsdWUpIHsgdGhpcy5fbG9ja1Bvc2l0aW9uID0gY29lcmNlQm9vbGVhblByb3BlcnR5KHZhbHVlKTsgfQogICAgICAgIC8qKgogICAgICAgICAqIFdoZXRoZXIgdGhlIG92ZXJsYXkncyB3aWR0aCBhbmQgaGVpZ2h0IGNhbiBiZSBjb25zdHJhaW5lZCB0byBmaXQgd2l0aGluIHRoZSB2aWV3cG9ydC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBmbGV4aWJsZURpbWVuc2lvbnMoKSB7IHJldHVybiB0aGlzLl9mbGV4aWJsZURpbWVuc2lvbnM7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgZmxleGlibGVEaW1l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mVybGF5IHJlZmVyZW5jZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBvdmVybGF5UmVmKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fb3ZlcmxheVJlZjsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIGVsZW1lbnQncyBsYXlvdXQgZGlyZWN0aW9uLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGRpcigpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2RpciA/IHRoaXMuX2Rpci52YWx1ZSA6ICdsdHInOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25EZXN0cm95KCkgewogICAgICAgICAgICBpZiAodGhpcy5fb3ZlcmxheVJlZikgewogICAgICAgICAgICAgICAgdGhpcy5fb3ZlcmxheVJlZi5kaXNwb3NlKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fYmFja2Ryb3BTdWJzY3JpcHRpb24udW5zdWJzY3JpYmUoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBjaGFuZ2VzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uQ2hhbmdlcyhjaGFuZ2VzKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9wb3NpdGlvbikgewogICAgICAgICAgICAgICAgdGhpcy5fdXBkYXRlUG9zaXRpb25TdHJhdGVneSh0aGlzLl9wb3NpdGlvbik7CiAgICAgICAgICAgICAgICB0aGlzLl9vdmVybGF5UmVmLnVwZGF0ZVNpemUoewogICAgICAgICAgICAgICAgICAgIHdpZHRoOiB0aGlzLndpZHRoLAogICAgICAgICAgICAgICAgICAgIG1pbldpZHRoOiB0aGlzLm1pbldpZHRoLAogICAgICAgICAgICAgICAgICAgIGhlaWdodDogdGhpcy5oZWlnaHQsCiAgICAgICAgICAgICAgICAgICAgbWluSGVpZ2h0OiB0aGlzLm1pbkhlaWdodCwKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgaWYgKGNoYW5nZXNbJ29yaWdpbiddICYmIHRoaXMub3BlbikgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX3Bvc2l0aW9uLmFwcGx5KCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGNoYW5nZXNbJ29wZW4nXSkgewogICAgICAgICAgICAgICAgdGhpcy5vcGVuID8gdGhpcy5fYXR0YWNoT3ZlcmxheSgpIDogdGhpcy5fZGV0YWNoT3ZlcmxheSgpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYW4gb3ZlcmxheQogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfY3JlYXRlT3ZlcmxheSgpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLnBvc2l0aW9ucyB8fCAhdGhpcy5wb3NpdGlvbnMubGVuZ3RoKSB7CiAgICAgICAgICAgICAgICB0aGlzLnBvc2l0aW9ucyA9IGRlZmF1bHRQb3NpdGlvbkxpc3Q7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fb3ZlcmxheVJlZiA9IHRoaXMuX292ZXJsYXkuY3JlYXRlKHRoaXMuX2J1aWxkQ29uZmlnKCkpOwogICAgICAgICAgICB0aGlzLl9vdmVybGF5UmVmLmtleWRvd25FdmVudHMoKS5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoZXZlbnQpID0+IHsKICAgICAgICAgICAgICAgIHRoaXMub3ZlcmxheUtleWRvd24ubmV4dChldmVudCk7CiAgICAgICAgICAgICAgICBpZiAoZXZlbnQua2V5Q29kZSA9PT0gRVNDQVBFICYmICFoYXNNb2RpZmllcktleShldmVudCkpIHsKICAgICAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX2RldGFjaE92ZXJsYXkoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBCdWlsZHMgdGhlIG92ZXJsYXkgY29uZmlnIGJhc2VkIG9uIHRoZSBkaXJlY3RpdmUncyBpbnB1dHMKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2J1aWxkQ29uZmlnKCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHBvc2l0aW9uU3RyYXRlZ3kgPSB0aGlzLl9wb3NpdGlvbiA9CiAgICAgICAgICAgICAgICB0aGlzLnBvc2l0aW9uU3RyYXRlZ3kgfHwgdGhpcy5fY3JlYXRlUG9zaXRpb25TdHJhdGVneSgpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG92ZXJsYXlDb25maWcgPSBuZXcgT3ZlcmxheUNvbmZpZyh7CiAgICAgICAgICAgICAgICBkaXJlY3Rpb246IHRoaXMuX2RpciwKICAgICAgICAgICAgICAgIHBvc2l0aW9uU3RyYXRlZ3ksCiAgICAgICAgICAgICAgICBzY3JvbGxTdHJhdGVneTogdGhpcy5zY3JvbGxTdHJhdGVneSwKICAgICAgICAgICAgICAgIGhhc0JhY2tkcm9wOiB0aGlzLmhhc0JhY2tkcm9wCiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBpZiAodGhpcy53aWR0aCB8fCB0aGlzLndpZHRoID09PSAwKSB7CiAgICAgICAgICAgICAgICBvdmVybGF5Q29uZmlnLndpZHRoID0gdGhpcy53aWR0aDsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5oZWlnaHQgfHwgdGhpcy5oZWlnaHQgPT09IDApIHsKICAgICAgICAgICAgICAgIG92ZXJsYXlDb25maWcuaGVpZ2h0ID0gdGhpcy5oZWlnaHQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHRoaXMubWluV2lkdGggfHwgdGhpcy5taW5XaWR0aCA9PT0gMCkgewogICAgICAgICAgICAgICAgb3ZlcmxheUNvbmZpZy5taW5XaWR0aCA9IHRoaXMubWluV2lkdGg7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHRoaXMubWluSGVpZ2h0IHx8IHRoaXMubWluSGVpZ2h0ID09PSAwKSB7CiAgICAgICAgICAgICAgICBvdmVybGF5Q29uZmlnLm1pbkhlaWdodCA9IHRoaXMubWluSGVpZ2h0OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0aGlzLmJhY2tkcm9wQ2xhc3MpIHsKICAgICAgICAgICAgICAgIG92ZXJsYXlDb25maWcuYmFja2Ryb3BDbGFzcyA9IHRoaXMuYmFja2Ryb3BDbGFzczsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5wYW5lbENsYXNzKSB7CiAgICAgICAgICAgICAgICBvdmVybGF5Q29uZmlnLnBhbmVsQ2xhc3MgPSB0aGlzLnBhbmVsQ2xhc3M7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIG92ZXJsYXlDb25maWc7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFVwZGF0ZXMgdGhlIHN0YXRlIG9mIGEgcG9zaXRpb24gc3RyYXRlZ3ksIGJhc2VkIG9uIHRoZSB2YWx1ZXMgb2YgdGhlIGRpcmVjdGl2ZSBpbnB1dHMuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHBvc2l0aW9uU3RyYXRlZ3kKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF91cGRhdGVQb3NpdGlvblN0cmF0ZWd5KHBvc2l0aW9uU3RyYXRlZ3kpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwb3NpdGlvbnMgPSB0aGlzLnBvc2l0aW9ucy5tYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGN1cnJlbnRQb3NpdGlvbgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgY3VycmVudFBvc2l0aW9uID0+ICh7CiAgICAgICAgICAgICAgICBvcmlnaW5YOiBjdXJyZW50UG9zaXRpb24ub3JpZ2luWCwKICAgICAgICAgICAgICAgIG9yaWdpblk6IGN1cnJlbnRQb3NpdGlvbi5vcmlnaW5ZLAogICAgICAgICAgICAgICAgb3ZlcmxheVg6IGN1cnJlbnRQb3NpdGlvbi5vdmVybGF5WCwKICAgICAgICAgICAgICAgIG92ZXJsYXlZOiBjdXJyZW50UG9zaXRpb24ub3ZlcmxheVksCiAgICAgICAgICAgICAgICBvZmZzZXRYOiBjdXJyZW50UG9zaXRpb24ub2Zmc2V0WCB8fCB0aGlzLm9mZnNldFgsCiAgICAgICAgICAgICAgICBvZmZzZXRZOiBjdXJyZW50UG9zaXRpb24ub2Zmc2V0WSB8fCB0aGlzLm9mZnNldFksCiAgICAgICAgICAgICAgICBwYW5lbENsYXNzOiBjdXJyZW50UG9zaXRpb24ucGFuZWxDbGFzcyB8fCB1bmRlZmluZWQsCiAgICAgICAgICAgIH0pKSk7CiAgICAgICAgICAgIHJldHVybiBwb3NpdGlvblN0cmF0ZWd5CiAgICAgICAgICAgICAgICAuc2V0T3JpZ2luKHRoaXMub3JpZ2luLmVsZW1lbnRSZWYpCiAgICAgICAgICAgICAgICAud2l0aFBvc2l0aW9ucyhwb3NpdGlvbnMpCiAgICAgICAgICAgICAgICAud2l0aEZsZXhpYmxlRGltZW5zaW9ucyh0aGlzLmZsZXhpYmxlRGltZW5zaW9ucykKICAgICAgICAgICAgICAgIC53aXRoUHVzaCh0aGlzLnB1c2gpCiAgICAgICAgICAgICAgICAud2l0aEdyb3dBZnRlck9wZW4odGhpcy5ncm93QWZ0ZXJPcGVuKQogICAgICAgICAgICAgICAgLndpdGhWaWV3cG9ydE1hcmdpbih0aGlzLnZpZXdwb3J0TWFyZ2luKQogICAgICAgICAgICAgICAgLndpdGhMb2NrZWRQb3NpdGlvbih0aGlzLmxvY2tQb3NpdGlvbikKICAgICAgICAgICAgICAgIC53aXRoVHJhbnNmb3JtT3JpZ2luT24odGhpcy50cmFuc2Zvcm1PcmlnaW5TZWxlY3Rvcik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgdGhlIHBvc2l0aW9uIHN0cmF0ZWd5IG9mIHRoZSBvdmVybGF5IHRvIGJlIHNldCBvbiB0aGUgb3ZlcmxheSBjb25maWcKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2NyZWF0ZVBvc2l0aW9uU3RyYXRlZ3koKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc3RyYXRlZ3kgPSB0aGlzLl9vdmVybGF5LnBvc2l0aW9uKCkuZmxleGlibGVDb25uZWN0ZWRUbyh0aGlzLm9yaWdpbi5lbGVtZW50UmVmKTsKICAgICAgICAgICAgdGhpcy5fdXBkYXRlUG9zaXRpb25TdHJhdGVneShzdHJhdGVneSk7CiAgICAgICAgICAgIHN0cmF0ZWd5LnBvc2l0aW9uQ2hhbmdlcy5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHAgPT4gdGhpcy5wb3NpdGlvbkNoYW5nZS5lbWl0KHApKSk7CiAgICAgICAgICAgIHJldHVybiBzdHJhdGVneTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQXR0YWNoZXMgdGhlIG92ZXJsYXkgYW5kIHN1YnNjcmliZXMgdG8gYmFja2Ryb3AgY2xpY2tzIGlmIGJhY2tkcm9wIGV4aXN0cwogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfYXR0YWNoT3ZlcmxheSgpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLl9vdmVybGF5UmVmKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9jcmVhdGVPdmVybGF5KCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAvLyBVcGRhdGUgdGhlIG92ZXJsYXkgc2l6ZSwgaW4gY2FzZSB0aGUgZGlyZWN0aXZlJ3MgaW5wdXRzIGhhdmUgY2hhbmdlZAogICAgICAgICAgICAgICAgdGhpcy5fb3ZlcmxheVJlZi5nZXRDb25maWcoKS5oYXNCYWNrZHJvcCA9IHRoaXMuaGFzQmFja2Ryb3A7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKCF0aGlzLl9vdmVybGF5UmVmLmhhc0F0dGFjaGVkKCkpIHsKICAgICAgICAgICAgICAgIHRoaXMuX292ZXJsYXlSZWYuYXR0YWNoKHRoaXMuX3RlbXBsYXRlUG9ydGFsKTsKICAgICAgICAgICAgICAgIHRoaXMuYXR0YWNoLmVtaXQoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5oYXNCYWNrZHJvcCkgewogICAgICAgICAgICAgICAgdGhpcy5fYmFja2Ryb3BTdWJzY3JpcHRpb24gPSB0aGlzLl9vdmVybGF5UmVmLmJhY2tkcm9wQ2xpY2soKS5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBldmVudAogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgZXZlbnQgPT4gewogICAgICAgICAgICAgICAgICAgIHRoaXMuYmFja2Ryb3BDbGljay5lbWl0KGV2ZW50KTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuX2JhY2tkcm9wU3Vic2NyaXB0aW9uLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogRGV0YWNoZXMgdGhlIG92ZXJsYXkgYW5kIHVuc3Vic2NyaWJlcyB0byBiYWNrZHJvcCBjbGlja3MgaWYgYmFja2Ryb3AgZXhpc3RzCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9kZXRhY2hPdmVybGF5KCkgewogICAgICAgICAgICBpZiAodGhpcy5fb3ZlcmxheVJlZikgewogICAgICAgICAgICAgICAgdGhpcy5fb3ZlcmxheVJlZi5kZXRhY2goKTsKICAgICAgICAgICAgICAgIHRoaXMuZGV0YWNoLmVtaXQoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9iYWNrZHJvcFN1YnNjcmlwdGlvbi51bnN1YnNjcmliZSgpOwogICAgICAgIH0KICAgIH0KICAgIENka0Nvbm5lY3RlZE92ZXJsYXkuybVmYWMgPSBmdW5jdGlvbiBDZGtDb25uZWN0ZWRPdmVybGF5X0ZhY3RvcnkodCkgeyByZXR1cm4gbmV3ICh0IHx8IENka0Nvbm5lY3RlZE92ZXJsYXkpKMm1ybVkaXJlY3RpdmVJbmplY3QoT3ZlcmxheSksIMm1ybVkaXJlY3RpdmVJbmplY3QoVGVtcGxhdGVSZWYpLCDJtcm1ZGlyZWN0aXZlSW5qZWN0KFZpZXdDb250YWluZXJSZW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gICAgICAgICAgIHN1cGVyKF9kb2N1bWVudCwgcGxhdGZvcm0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25EZXN0cm95KCkgewogICAgICAgICAgICBzdXBlci5uZ09uRGVzdHJveSgpOwogICAgICAgICAgICBpZiAodGhpcy5fZnVsbFNjcmVlbkV2ZW50TmFtZSAmJiB0aGlzLl9mdWxsU2NyZWVuTGlzdGVuZXIpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2RvY3VtZW50LnJlbW92ZUV2ZW50TGlzdGVuZXIodGhpcy5fZnVsbFNjcmVlbkV2ZW50TmFtZSwgdGhpcy5fZnVsbFNjcmVlbkxpc3RlbmVyKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJvdGVjdGVkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfY3JlYXRlQ29udGFpbmVyKCkgewogICAgICAgICAgICBzdXBlci5fY3JlYXRlQ29udGFpbmVyKCk7CiAgICAgICAgICAgIHRoaXMuX2FkanVzdFBhcmVudEZvckZ1bGxzY3JlZW5DaGFuZ2UoKTsKICAgICAgICAgICAgdGhpcy5fYWRkRnVsbHNjcmVlbkNoYW5nZUxpc3RlbmVyKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHRoaXMuX2FkanVzdFBhcmVudEZvckZ1bGxzY3JlZW5DaGFuZ2UoKSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2FkanVzdFBhcmVudEZvckZ1bGxzY3JlZW5DaGFuZ2UoKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5fY29udGFpbmVyRWxlbWVudCkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZnVsbHNjcmVlbkVsZW1lbnQgPSB0aGlzLmdldEZ1bGxzY3JlZW5FbGVtZW50KCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcGFyZW50ID0gZnVsbHNjcmVlbkVsZW1lbnQgfHwgdGhpcy5fZG9jdW1lbnQuYm9keTsKICAgICAgICAgICAgcGFyZW50LmFwcGVuZENoaWxkKHRoaXMuX2NvbnRhaW5lckVsZW1lbnQpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9hZGRGdWxsc2NyZWVuQ2hhbmdlTGlzdGVuZXIoZm4pIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBldmVudE5hbWUgPSB0aGlzLl9nZXRFdmVudE5hbWUoKTsKICAgICAgICAgICAgaWYgKGV2ZW50TmFtZSkgewogICAgICAgICAgICAgICAgaWYgKHRoaXMuX2Z1bGxTY3JlZW5MaXN0ZW5lcikgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX2RvY3VtZW50LnJlbW92ZUV2ZW50TGlzdGVuZXIoZXZlbnROYW1lLCB0aGlzLl9mdWxsU2NyZWVuTGlzdGVuZXIpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdGhpcy5fZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcihldmVudE5hbWUsIGZuKTsKICAgICAgICAgICAgICAgIHRoaXMuX2Z1bGxTY3JlZW5MaXN0ZW5lciA9IGZuOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZ2V0RXZlbnROYW1lKCkgewogICAgICAgICAgICBpZiAoIXRoaXMuX2Z1bGxTY3JlZW5FdmVudE5hbWUpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IF9kb2N1bWVudCA9ICgvKiogQHR5cGUgez99ICovICh0aGlzLl9kb2N1bWVudCkpOwogICAgICAgICAgICAgICAgaWYgKF9kb2N1bWVudC5mdWxsc2NyZWVuRW5hYmxlZCkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX2Z1bGxTY3JlZW5FdmVudE5hbWUgPSAnZnVsbHNjcmVlbmNoYW5nZSc7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmIChfZG9jdW1lbnQud2Via2l0RnVsbHNjcmVlbkVuYWJsZWQpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9mdWxsU2NyZWVuRXZlbnROYW1lID0gJ3dlYmtpdGZ1bGxzY3JlZW5jaGFuZ2UnOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAoX2RvY3VtZW50Lm1vekZ1bGxTY3JlZW5FbmFibGVkKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fZnVsbFNjcmVlbkV2ZW50TmFtZSA9ICdtb3pmdWxsc2NyZWVuY2hhbmdlJzsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKF9kb2N1bWVudC5tc0Z1bGxzY3JlZW5FbmFibGVkKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fZnVsbFNjcmVlbkV2ZW50TmFtZSA9ICdNU0Z1bGxzY3JlZW5DaGFuZ2UnOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9mdWxsU2NyZWVuRXZlbnROYW1lOwogICAgICAgIH0KICA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W1lbWJlckxvZ2luQ29udHJvbCA9IG5ldyBGb3JtQ29udHJvbCgpOwogICAgICogYGBgCiAgICAgKgogICAgICogYGBgCiAgICAgKiA8aW5wdXQgdHlwZT0iY2hlY2tib3giIFtmb3JtQ29udHJvbF09InJlbWVtYmVyTG9naW5Db250cm9sIj4KICAgICAqIGBgYAogICAgICoKICAgICAqIFxAbmdNb2R1bGUgUmVhY3RpdmVGb3Jtc01vZHVsZQogICAgICogXEBuZ01vZHVsZSBGb3Jtc01vZHVsZQogICAgICogXEBwdWJsaWNBcGkKICAgICAqLwogICAgY2xhc3MgQ2hlY2tib3hDb250cm9sVmFsdWVBY2Nlc3NvciB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBfcmVuZGVyZXIKICAgICAgICAgKiBAcGFyYW0gez99IF9lbGVtZW50UmVmCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoX3JlbmRlcmVyLCBfZWxlbWVudFJlZikgewogICAgICAgICAgICB0aGlzLl9yZW5kZXJlciA9IF9yZW5kZXJlcjsKICAgICAgICAgICAgdGhpcy5fZWxlbWVudFJlZiA9IF9lbGVtZW50UmVmOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAgICAgKiBUaGUgcmVnaXN0ZXJlZCBjYWxsYmFjayBmdW5jdGlvbiBjYWxsZWQgd2hlbiBhIGNoYW5nZSBldmVudCBvY2N1cnMgb24gdGhlIGlucHV0IGVsZW1lbnQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLm9uQ2hhbmdlID0gKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF8KICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChfKSA9PiB7IH0pOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAgICAgKiBUaGUgcmVnaXN0ZXJlZCBjYWxsYmFjayBmdW5jdGlvbiBjYWxsZWQgd2hlbiBhIGJsdXIgZXZlbnQgb2NjdXJzIG9uIHRoZSBpbnB1dCBlbGVtZW50LgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5vblRvdWNoZWQgPSAoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7IH0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIHRoZSAiY2hlY2tlZCIgcHJvcGVydHkgb24gdGhlIGlucHV0IGVsZW1lbnQuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlIFRoZSBjaGVja2VkIHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB3cml0ZVZhbHVlKHZhbHVlKSB7CiAgICAgICAgICAgIHRoaXMuX3JlbmRlcmVyLnNldFByb3BlcnR5KHRoaXMuX2VsZW1lbnRSZWYubmF0aXZlRWxlbWVudCwgJ2NoZWNrZWQnLCB2YWx1ZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBSZWdpc3RlcnMgYSBmdW5jdGlvbiBjYWxsZWQgd2hlbiB0aGUgY29udHJvbCB2YWx1ZSBjaGFuZ2VzLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/fSBmbiBUaGUgY2FsbGJhY2sgZnVuY3Rpb24KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlZ2lzdGVyT25DaGFuZ2UoZm4pIHsKICAgICAgICAgICAgdGhpcy5vbkNoYW5nZSA9IGZuOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogUmVnaXN0ZXJzIGEgZnVuY3Rpb24gY2FsbGVkIHdoZW4gdGhlIGNvb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MvZGVmYXVsdF92YWx1ZV9hY2Nlc3Nvci50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBERUZBVUxUX1ZBTFVFX0FDQ0VTU09SID0gewogICAgICAgIHByb3ZpZGU6IE5HX1ZBTFVFX0FDQ0VTU09SLAogICAgICAgIHVzZUV4aXN0aW5nOiBmb3J3YXJkUmVmKCgvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgICgpID0+IERlZmF1bHRWYWx1ZUFjY2Vzc29yKSksCiAgICAgICAgbXVsdGk6IHRydWUKICAgIH07CiAgICAvKioKICAgICAqIFdlIG11c3QgY2hlY2sgd2hldGhlciB0aGUgYWdlbnQgaXMgQW5kcm9pZCBiZWNhdXNlIGNvbXBvc2l0aW9uIGV2ZW50cwogICAgICogYmVoYXZlIGRpZmZlcmVudGx5IGJldHdlZW4gaU9TIGFuZCBBbmRyb2lkLgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gX2lzQW5kcm9pZCgpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgdXNlckFnZW50ID0gZ2V0RE9NKCkgPyBnZXRET00oKS5nZXRVc2VyQWdlbnQoKSA6ICcnOwogICAgICAgIHJldHVybiAvYW5kcm9pZCAoXGQrKS8udGVzdCh1c2VyQWdlbnQudG9Mb3dlckNhc2UoKSk7CiAgICB9CiAgICAvKioKICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAqIFByb3ZpZGUgdGhpcyB0b2tlbiB0byBjb250cm9sIGlmIGZvcm0gZGlyZWN0aXZlcyBidWZmZXI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gogICAgICogXEBuZ01vZHVsZSBSZWFjdGl2ZUZvcm1zTW9kdWxlCiAgICAgKiBcQG5nTW9kdWxlIEZvcm1zTW9kdWxlCiAgICAgKiBcQHB1YmxpY0FwaQogICAgICovCiAgICBjbGFzcyBEZWZhdWx0VmFsdWVBY2Nlc3NvciB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBfcmVuZGVyZXIKICAgICAgICAgKiBAcGFyYW0gez99IF9lbGVtZW50UmVmCiAgICAgICAgICogQHBhcmFtIHs/fSBfY29tcG9zaXRpb25Nb2RlCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoX3JlbmRlcmVyLCBfZWxlbWVudFJlZiwgX2NvbXBvc2l0aW9uTW9kZSkgewogICAgICAgICAgICB0aGlzLl9yZW5kZXJlciA9IF9yZW5kZXJlcjsKICAgICAgICAgICAgdGhpcy5fZWxlbWVudFJlZiA9IF9lbGVtZW50UmVmOwogICAgICAgICAgICB0aGlzLl9jb21wb3NpdGlvbk1vZGUgPSBfY29tcG9zaXRpb25Nb2RlOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAgICAgKiBUaGUgcmVnaXN0ZXJlZCBjYWxsYmFjayBmdW5jdGlvbiBjYWxsZWQgd2hlbiBhbiBpbnB1dCBldmVudCBvY2N1cnMgb24gdGhlIGlucHV0IGVsZW1lbnQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLm9uQ2hhbmdlID0gKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF8KICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChfKSA9PiB7IH0pOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAgICAgKiBUaGUgcmVnaXN0ZXJlZCBjYWxsYmFjayBmdW5jdGlvbiBjYWxsZWQgd2hlbiBhIGJsdXIgZXZlbnQgb2NjdXJzIG9uIHRoZSBpbnB1dCBlbGVtZW50LgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5vblRvdWNoZWQgPSAoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7IH0pOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogV2hldGhlciB0aGUgdXNlciBpcyBjcmVhdGluZyBhIGNvbXBvc2l0aW9uIHN0cmluZyAoSU1FIGV2ZW50cykuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9jb21wb3NpbmcgPSBmYWxzZTsKICAgICAgICAgICAgaWYgKHRoaXMuX2NvbXBvc2l0aW9uTW9kZSA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9jb21wb3NpdGlvbk1vZGUgPSAhX2lzQW5kcm9pZCgpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgdGhlICJ2YWx1ZSIgcHJvcGVydHkgb24gdGhlIGlucHV0IGVsZW1lbnQuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlIFRoZSBjaGVja2VkIHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB3cml0ZVZhbHVlKHZhbHVlKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgbm9ybWFsaXplZFZhbHVlID0gdmFsdWUgPT0gbnVsbCA/ICcnIDogdmFsdWU7CiAgICAgICAgICAgIHRoaXMuX3JlbmRlcmVyLnNldFByb3BlcnR5KHRoaXMuX2VsZW1lbnRSZWYubmF0aXZlRWxlbWVudCwgJ3ZhbHVlJywgbm9ybWFsaXplZFZhbHVlKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIFJlZ2lzdGVycyBhIGZ1bmN0aW9uIGNhbGxlZCB3aGVuIHRoZSBjb250cm9sIHZhbHVlIGNoYW5nZXMuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez99IGZuIFRoZSBjYWxsYmFjayBmdW5jdGlvbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVnaXN0ZXJPbkNoYW5nZShmbikgewogICAgICAgICAgICB0aGlzLm9uQ2hhbmdlID0gZm47CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBSZWdpc3RlcnMgYSBmdW5jdGlvbiBjYWxsZWQgd2hlbiB0aGUgY29udHJvbCBpcyB0b3VjaGVkLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/fSBmbiBUaGUgY2FsbGJhY2sgZnVuY3Rpb24KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlZ2lzdGVyT25Ub3VjaGVkKGZuKSB7CiAgICAgICAgICAgIHRoaXMub25Ub3VjaGVkID0gZm47CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgdGhlICJkaXNhYmxlZCIgcHJvcGVydHkgb24gdGhlIGlucHV0IGVsZW1lbnQuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez99IGlzRGlzYWJsZWQgVGhlIGRpc2FibGVkIHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXREaXNhYmxlZFN0YXRlKGlzRGlzYWJsZWQpIHsKICAgICAgICAgICAgdGhpcy5fcmVuZGVyZXIuc2V0UHJvcGVydHkodGhpcy5fZWxlbWVudFJlZi5uYXRpdmVFbGVtZW50LCAnZGlzYWJsZWQnLCBpc0Rpc2FibGVkKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9oYW5kbGVJbnB1dCh2YWx1ZSkgewogICAgICAgICAgICBpZiAoIXRoaXMuX2NvbXBvc2l0aW9uTW9kZSB8fCAodGhpcy5fY29tcG9zaXRpb25Nb2RlICYmICF0aGlzLl9jb21wb3NpbmcpKSB7CiAgICAgICAgICAgICAgICB0aGlzLm9uQ2hhbmdlKHZhbHVlKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfY29tcG9zaXRpb25TdGFydCgpIHsKICAgICAgICAgICAgdGhpcy5fY29tcG9zaW5nID0gdHJ1ZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9jb21wb3NpdGlvbkVuZCh2YWx1ZSkgewogICAgICAgICAgICB0aGlzLl9jb21wb3NpbmcgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5fY29tcG9zaXRpb25Nb2RlICYmIHRoaXMub25DaGFuZ2UodmFsdWUpOwogICAgICAgIH0KICAgIH0KICAgIERlZmF1bHRWYWx1ZUFjY2Vzc29yLsm1ZmFjID0gZnVuY3Rpb24gRGVmYXVsdFZhbHVlQWNjZXNzb3JfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgRGVmYXVsdFZhbHVlQWNjZXNzb3IpKMm1ybVkaXJlY3RpdmVJbmplY3QoUmVuZGVyZXIyKSwgybXJtWRpcmVjdGl2ZUluamVjdChFbGVtZW50UmVmKSwgybXJtWRpcmVjdGl2ZUluamVjdChDT01QT1NJVElPTl9CVUZGRVJfTU9ERSwgOCkpOyB9OwogICAgRGVmY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IGV4aXN0IHdpdGggdGhlIGN1cnJlbnQgdmFsdWUuCiAgICAgICAgICogSWYgdGhlIGNvbnRyb2wgaXMgbm90IHByZXNlbnQsIG51bGwgaXMgcmV0dXJuZWQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgdmFsaWQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmNvbnRyb2wgPyB0aGlzLmNvbnRyb2wudmFsaWQgOiBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogUmVwb3J0cyB3aGV0aGVyIHRoZSBjb250cm9sIGlzIGludmFsaWQsIG1lYW5pbmcgdGhhdCBhbiBlcnJvciBleGlzdHMgaW4gdGhlIGlucHV0IHZhbHVlLgogICAgICAgICAqIElmIHRoZSBjb250cm9sIGlzIG5vdCBwcmVzZW50LCBudWxsIGlzIHJldHVybmVkLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGludmFsaWQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmNvbnRyb2wgPyB0aGlzLmNvbnRyb2wuaW52YWxpZCA6IG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBSZXBvcnRzIHdoZXRoZXIgYSBjb250cm9sIGlzIHBlbmRpbmcsIG1lYW5pbmcgdGhhdCB0aGF0IGFzeW5jIHZhbGlkYXRpb24gaXMgb2NjdXJyaW5nIGFuZAogICAgICAgICAqIGVycm9ycyBhcmUgbm90IHlldCBhdmFpbGFibGUgZm9yIHRoZSBpbnB1dCB2YWx1ZS4gSWYgdGhlIGNvbnRyb2wgaXMgbm90IHByZXNlbnQsIG51bGwgaXMKICAgICAgICAgKiByZXR1cm5lZC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBwZW5kaW5nKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5jb250cm9sID8gdGhpcy5jb250cm9sLnBlbmRpbmcgOiBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogUmVwb3J0cyB3aGV0aGVyIHRoZSBjb250cm9sIGlzIGRpc2FibGVkLCBtZWFuaW5nIHRoYXQgdGhlIGNvbnRyb2wgaXMgZGlzYWJsZWQKICAgICAgICAgKiBpbiB0aGUgVUkgYW5kIGlzIGV4ZW1wdCBmcm9tIHZhbGlkYXRpb24gY2hlY2tzIGFuZCBleGNsdWRlZCBmcm9tIGFnZ3JlZ2F0ZQogICAgICAgICAqIHZhbHVlcyBvZiBhbmNlc3RvciBjb250cm9scy4gSWYgdGhlIGNvbnRyb2wgaXMgbm90IHByZXNlbnQsIG51bGwgaXMgcmV0dXJuZWQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgZGlzYWJsZWQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmNvbnRyb2wgPyB0aGlzLmNvbnRyb2wuZGlzYWJsZWQgOiBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogUmVwb3J0cyB3aGV0aGVyIHRoZSBjb250cm9sIGlzIGVuYWJsZWQsIG1lYW5pbmcgdGhhdCB0aGUgY29udHJvbCBpcyBpbmNsdWRlZCBpbiBhbmNlc3RvcgogICAgICAgICAqIGNhbGN1bGF0aW9ucyBvZiB2YWxpZGl0eSBvciB2YWx1ZS4gSWYgdGhlIGNvbnRyb2wgaXMgbm90IHByZXNlbnQsIG51bGwgaXMgcmV0dXJuZWQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgZW5hYmxlZCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuY29udHJvbCA/IHRoaXMuY29udHJvbC5lbmFibGVkIDogbnVsbDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIFJlcG9ydHMgdGhlIGNvbnRyb2wncyB2YWxpZGF0aW9uIGVycm9ycy4gSWYgdGhlIGNvbnRyb2wgaXMgbm90IHByZXNlbnQsIG51bGwgaXMgcmV0dXJuZWQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgZXJyb3JzKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5jb250cm9sID8gdGhpcy5jb250cm9sLmVycm9ycyA6IG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBSZXBvcnRzIHdoZXRoZXIgdGhlIGNvbnRyb2wgaXMgcHJpc3RpbmUsIG1lYW5pbmcgdGhhdCB0aGUgdXNlciBoYXMgbm90IHlldCBjaGFuZ2VkCiAgICAgICAgICogdGhlIHZhbHVlIGluIHRoZSBVSS4gSWYgdGhlIGNvbnRyb2wgaXMgbm90IHByZXNlbnQsIG51bGwgaXMgcmV0dXJuZWQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgcHJpc3RpbmUoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmNvbnRyb2wgPyB0aGlzLmNvbnRyb2wucHJpc3RpbmUgOiBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogUmVwb3J0cyB3aGV0aGVyIHRoZSBjb250cm9sIGlzIGRpcnR5LCBtZWFuaW5nIHRoYXQgdGhlIHVzZXIgaGFzIGNoYW5nZWQKICAgICAgICAgKiB0aGUgdmFsdWUgaW4gdGhlIFVJLiBJZiB0aGUgY29udHJvbCBpcyBub3QgcHJlc2VudCwgbnVsbCBpcyByZXR1cm5lZC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBkaXJ0eSgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuY29udHJvbCA/IHRoaXMuY29udHJvbC5kaXJ0eSA6IG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBSZXBvcnRzIHdoZXRoZXIgdGhlIGNvbnRyb2wgaXMgdG91Y2hlZCwgbWVhbmluZyB0aGF0IHRoZSB1c2VyIGhhcyB0cmlnZ2VyZWQKICAgICAgICAgKiBhIGBibHVyYCBldmVudCBvbiBpdC4gSWYgdGhlIGNvbnRyb2wgaXMgbm90IHByZXNlbnQsIG51bGwgaXMgcmV0dXJuZWQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgdG91Y2hlZCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuY29udHJvbCA/IHRoaXMuY29udHJvbC50b3VjaGVkIDogbnVsbDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIFJlcG9ydHMgdGhlIHZhbGlkYXRpb24gc3RhdHVzIG9mIHRoZSBjb250cm9sLiBQb3NzaWJsZSB2YWx1ZXMgaW5jbHVkZToKICAgICAgICAgKiAnVkFMSUQnLCAnSU5WQUxJRCcsICdESVNBQkxFRCcsIGFuZCAnUEVORElORycuCiAgICAgICAgICogSWYgdGhlIGNvbnRyb2wgaXMgbm90IHByZXNlbnQsIG51bGwgaXMgcmV0dXJuZWQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgc3RhdHVzKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5jb250cm9sID8gdGhpcy5jb250cm9sLnN0YXR1cyA6IG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBSZXBvcnRzIHdoZXRoZXIgdGhlIGNvbnRyb2wgaXMgdW50b3VjaGVkLCBtZWFuaW5nIHRoYXQgdGhlIHVzZXIgaGFzIG5vdCB5ZXQgdHJpZ2dlcmVkCiAgICAgICAgICogYSBgYmx1cmAgZXZlbnQgb24gaXQuIElmIHRoZSBjb250cm9sIGlzIG5vdCBwcmVzZW50LCBudWxsIGlzIHJldHVybmVkLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHVudG91Y2hlZCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuY29udHJvbCA/IHRoaXMuY29udHJvbC51bnRvdWNoZWQgOiBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogUmV0dXJucyBhIG11bHRpY2FzdGluZyBvYnNlcnZhYmxlIHRoYXQgZW1pdHMgYSB2YWxpZGF0aW9uIHN0YXR1cyB3aGVuZXZlciBpdCBpcwogICAgICAgICAqIGNhbGN1bGF0ZWQgZm9yIHRoZSBjb250cm9sLiBJZiB0aGUgY29udHJvbCBpcyBub3QgcHJlc2VudCwgbnVsbCBpcyByZXR1cm5lZC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBzdGF0dXNDaGFuZ2VzKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5jb250cm9sID8gdGhpcy5jb250cm9sLnN0YXR1c0NoYW5nZXMgOiBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogUmV0dXJucyBhIG11bHRpY2FzdGluZyBvYnNlcnZhYmxlIG9mIHZhbHVlIGNoYW5nZXMgZm9yIHRoZSBjb250cm9sIHRoYXQgZW1pdHMgZXZlcnkgdGltZSB0aGUKICAgICAgICAgKiB2YWx1ZSBvZiB0aGUgY29udHJvbCBjaGFuZ2VzIGluIHRoZSBVSSBvciBwcm9ncmFtbWF0aWNhbGx5LgogICAgICAgICAqIElmIHRoZSBjb250cm9sIGlzIG5vdCBwcmVzZW50LCBudWxsIGlzIHJldHVybmVkLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHZhbHVlQ2hhbmdlcygpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuY29udHJvbCA/IHRoaXMuY29udHJvbC52YWx1ZUNoYW5nZXMgOiBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogUmV0dXJucyBhbiBhcnJheSB0aGF0IHJlcHJlc2VudHMgdGhlIHBhdGggZnJvbSB0aGUgdG9wLWxldmVsIGZvcm0gdG8gdGhpcyBjb250cm9sLgogICAgICAgICAqIEVhY2ggaW5kZXggaXMgdGhlIHN0cmluZyBuYW1lIG9mIHRoZSBjb250cm9sIG9uIHRoYXQgbGV2ZWwuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgcGF0aCgpIHsKICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBSZXNldHMgdGhlIGNvbnRyb2wgd2l0aCB0aGUgcHJvdmlkZWQgdmFsdWUgaWYgdGhlIGNvbnRyb2wgaXMgcHJlc2VudC4KICAgICAgICAgKiBAcGFyYW0gez89fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVzZXQodmFsdWUgPSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgaWYgKHRoaXMuY29udHJvbCkKICAgICAgICAgICAgICAgIHRoaXMuY29udHJvbC5yZXNldCh2YWx1ZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgK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G9mIHRoZSBlcnJvciB0byBjaGVjawogICAgICAgICAqIEBwYXJhbSB7Pz19IHBhdGggQSBsaXN0IG9mIGNvbnRyb2wgbmFtZXMgdGhhdCBkZXNpZ25hdGVzIGhvdyB0byBtb3ZlIGZyb20gdGhlIGN1cnJlbnQgY29udHJvbAogICAgICAgICAqIHRvIHRoZSBjb250cm9sIHRoYXQgc2hvdWxkIGJlIHF1ZXJpZWQgZm9yIGVycm9ycy4KICAgICAgICAgKgogICAgICAgICAqIEByZXR1cm4gez99IHdoZXRoZXIgdGhlIGdpdmVuIGVycm9yIGlzIHByZXNlbnQgaW4gdGhlIGNvbnRyb2wgYXQgdGhlIGdpdmVuIHBhdGguCiAgICAgICAgICoKICAgICAgICAgKiBJZiB0aGUgY29udHJvbCBpcyBub3QgcHJlc2VudCwgZmFsc2UgaXMgcmV0dXJuZWQuCiAgICAgICAgICovCiAgICAgICAgaGFzRXJyb3IoZXJyb3JDb2RlLCBwYXRoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmNvbnRyb2wgPyB0aGlzLmNvbnRyb2wuaGFzRXJyb3IoZXJyb3JDb2RlLCBwYXRoKSA6IGZhbHNlOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogUmVwb3J0cyBlcnJvciBkYXRhIGZvciB0aGUgY29udHJvbCB3aXRoIHRoZSBnaXZlbiBwYXRoLgogICAgICAgICAqCiAgICAgICAgICogXEB1c2FnZU5vdGVzCiAgICAgICAgICogRm9yIGV4YW1wbGUsIGZvciB0aGUgZm9sbG93aW5nIGBGb3JtR3JvdXBgOgogICAgICAgICAqCiAgICAgICAgICogYGBgCiAgICAgICAgICogZm9ybSA9IG5ldyBGb3JtR3JvdXAoewogICAgICAgICAqICAgYWRkcmVzczogbmV3IEZvcm1Hcm91cCh7IHN0cmVldDogbmV3IEZvcm1Db250cm9sKCkgfSkKICAgICAgICAgKiB9KTsKICAgICAgICAgKiBgYG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EaXJlY3RpdmUgewogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBUaGUgdG9wLWxldmVsIGZvcm0gZGlyZWN0aXZlIGZvciB0aGUgY29udHJvbC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBmb3JtRGlyZWN0aXZlKCkgewogICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIFRoZSBwYXRoIHRvIHRoaXMgZ3JvdXAuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgcGF0aCgpIHsKICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgfQogICAgfQogICAgQ29udHJvbENvbnRhaW5lci7JtWZhYyA9IGZ1bmN0aW9uIENvbnRyb2xDb250YWluZXJfRmFjdG9yeSh0KSB7IHJldHVybiDJtUNvbnRyb2xDb250YWluZXJfQmFzZUZhY3RvcnkodCB8fCBDb250cm9sQ29udGFpbmVyKTsgfTsKICAgIENvbnRyb2xDb250YWluZXIuybVkaXIgPSDJtcm1ZGVmaW5lRGlyZWN0aXZlKHsgdHlwZTogQ29udHJvbENvbnRhaW5lciwgZmVhdHVyZXM6IFvJtcm1SW5oZXJpdERlZmluaXRpb25GZWF0dXJlXSB9KTsKICAgIGNvbnN0IMm1Q29udHJvbENvbnRhaW5lcl9CYXNlRmFjdG9yeSA9IMm1ybVnZXRJbmhlcml0ZWRGYWN0b3J5KENvbnRyb2xDb250YWluZXIpOwoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogcGFja2FnZXMvZm9ybXMvc3JjL2RpcmVjdGl2ZXMvbmdfY29udHJvbC50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvKioKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHVuaW1wbGVtZW50ZWQoKSB7CiAgICAgICAgdGhyb3cgbmV3IEVycm9yKCd1bmltcGxlbWVudGVkJyk7CiAgICB9CiAgICAvKioKICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAqIEEgYmFzZSBjbGFzcyB0aGF0IGFsbCBjb250cm9sIGBGb3JtQ29udHJvbGAtYmFzZWQgZGlyZWN0aXZlcyBleHRlbmQuIEl0IGJpbmRzIGEgYEZvcm1Db250cm9sYAogICAgICogb2JqZWN0IHRvIGEgRE9NIGVsZW1lbnQuCiAgICAgKgogICAgICogXEBwdWJsaWNBcGkKICAgICAqIEBhYnN0cmFjdAogICAgICovCiAgICBjbGFzcyBOZ0NvbnRyb2wgZXh0ZW5kcyBBYnN0cmFjdENvbnRyb2xEaXJlY3RpdmUgewogICAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgICAgICBzdXBlciguLi5hcmd1bWVudHMpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAgICAgKiBUaGUgcGFyZW50IGZvcm0gZm9yIHRoZSBjb250cm9sLgogICAgICAgICAgICAgKgogICAgICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9wYXJlbnQgPSBudWxsOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAgICAgKiBUaGUgbmFtZSBmb3IgdGhlIGNvbnRyb2wKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMubmFtZSA9IG51bGw7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICAgICAqIFRoZSB2YWx1ZSBhY2Nlc3NvciBmb3IgdGhlIGNvbnRyb2wKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMudmFsdWVBY2Nlc3NvciA9IG51bGw7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICAgICAqIFRoZSB1bmNvbXBvc2VkIGFycmF5IG9mIHN5bmNocm9ub3VzIHZhbGlkYXRvcnMgZm9yIHRoZSBjb250cm9sCiAgICAgICAgICAgICAqCiAgICAgICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX3Jhd1ZhbGlkYXRvcnMgPSBbXTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgICAgICogVGhlIHVuY29tcG9zZWQgYXJyYXkgb2YgYXN5bmMgdmFsaWRhdG9ycyBmb3IgdGhlIGNvbnRyb2wKICAgICAgICAgICAgICoKICAgICAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fcmF3QXN5bmNWYWxpZGF0b3JzID0gW107CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBUaGUgcmVnaXN0ZXJlZCBzeW5jaHJvbm91cyB2YWxpZGF0b3IgZnVuY3Rpb24gZm9yIHRoZSBjb250cm9sCiAgICAgICAgICoKICAgICAgICAgKiBAdGhyb3dzIEFuIGV4Y2VwdGlvbiB0aGF0IHRoaXMgbWV0aG9kIGlzIG5vdCBpbXBsZW1lbnRlZAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHZhbGlkYXRvcigpIHsKICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovICh1bmltcGxlbWVudGVkKCkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIFRoZSByZWdpc3RlcmVkIGFzeW5jIHZhbGlkYXRvciBmdW5jdGlvbiBmb3IgdGhlIGNvbnRyb2wKICAgICAgICAgKgogICAgICAgICAqIEB0aHJvd3MgQW4gZXhjZXB0aW9uIHRoYXQgdGhpcyBtZXRob2QgaXMgbm90IGltcGxlbWVudGVkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgYXN5bmNWYWxpZGF0b3IoKSB7CiAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAodW5pbXBsZW1lbnRlZCgpKSk7CiAgICAgICAgfQogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogcGFja2FnZXMvZm9ybXMvc3JjL2RpcmVjdGl2ZXMvbmdfY29udHJvbF9zdGF0dXMudHMKICAgICAqIEBzdXBwcmVzcyB7Y2hlY2tUeXBlcyxjb25zdGFudFByb3BlcnR5LGV4dHJhUmVxdWlyZSxtaXNzaW5nT3ZlcnJpZGUsbWlzc2luZ1JldHVybix1bnVzZWRQcml2YXRlTWVtYmVycyx1c2VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgY2xhc3MgQWJzdHJhY3RDb250cm9sU3RhdHVzIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGNkCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoY2QpIHsKICAgICAgICAgICAgdGhpcy5fY2QgPSBjZDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgbmdDbGFzc1VudG91Y2hlZCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2NkLmNvbnRyb2wgPyB0aGlzLl9jZC5jb250cm9sLnVudG91Y2hlZCA6IGZhbHNlOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBuZ0NsYXNzVG91Y2hlZCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2NkLmNvbnRyb2wgPyB0aGlzLl9jZC5jb250cm9sLnRvdWNoZWQgOiBmYWxzZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgbmdDbGFzc1ByaXN0aW5lKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fY2QuY29udHJvbCA/IHRoaXMuX2NkLmNvbnRyb2wucHJpc3RpbmUgOiBmYWxzZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgbmdDbGFzc0RpcnR5KCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fY2QuY29udHJvbCA/IHRoaXMuX2NkLmNvbnRyb2wuZGlydHkgOiBmYWxzZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgbmdDbGFzc1ZhbGlkKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fY2QuY29udHJvbCA/IHRoaXMuX2NkLmNvbnRyb2wudmFsaWQgOiBmYWxzZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgbmdDbGFzc0ludmFsaWQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9jZC5jb250cm9sID8gdGhpcy5fY2QuY29udHJvbC5pbnZhbGlkIDogZmFsc2U7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IG5nQ2xhc3NQZW5kaW5nKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fY2QuY29udHJvbCA/IHRoaXMuX2NkLmNvbnRyb2wucGVuZGluZyA6IGZhbHNlOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogXEBkZXNjcmlwdGlvbgogICAgICogRGlyZWN0aXZlIGF1dG9tYXRpY2FsbHkgYXBwbGllZCB0byBBbmd1bGFyIGZvcm0gY29udHJvbHMgdGhhdCBzZXRzIENTUyBjbGFzc2VzCiAgICAgKiBiYXNlZCBvbiBjb250cm9sIHN0YXR1cy4KICAgICAqCiAgICAgKiBcQHVzYWdlTm90ZXMKICAgICAqCiAgICAgKiAjIyMgQ1NTIGNsYXNzZXMgYXBwbGllZAogICAgICoKICAgICAqIFRoZSBmb2xsb3dpbmcgY2xhc3NlcyBhcmUgYXBwbGllZCBhcyB0aGUgcHJvcGVydGllcyBiZWNvbWUgdHJ1ZToKICAgICAqCiAgICAgKiAqIG5nLXZhbGlkCiAgICAgKiAqIG5nLWludmFsaWQKICAgICAqICogbmctcGVuZGluZwogICAgICogKiBuZy1wcmlzdGluZQogICAgICogKiBuZy1kaXJ0eQogICAgICogKiBuZy11bnRvdWNoZWQKICAgICAqICogbmctdG91Y2hlZAogICAgICoKICAgICAqIFxAbmdNb2R1bGUgUmVhY3RpdmVGb3Jtc01vZHVsZQogICAgICogXEBuZ01vZHVsZSBGb3Jtc01vZHVsZQogICAgICogXEBwdWJsaWNBcGkKICAgICAqLwogICAgY2xhc3MgTmdDb250cm9sU3RhdHVzIGV4dGVuZHMgQWJzdHJhY3RDb250cm9sU3RhdHVzIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGNkCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoY2QpIHsKICAgICAgICAgICAgc3VwZXIoY2QpOwogICAgICAgIH0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b3ZpZGVkIG51bWJlci4KICAgICAgICAgKiBUaGUgdmFsaWRhdG9yIGV4aXN0cyBvbmx5IGFzIGEgZnVuY3Rpb24gYW5kIG5vdCBhcyBhIGRpcmVjdGl2ZS4KICAgICAgICAgKgogICAgICAgICAqIFxAdXNhZ2VOb3RlcwogICAgICAgICAqCiAgICAgICAgICogIyMjIFZhbGlkYXRlIGFnYWluc3QgYSBtaW5pbXVtIG9mIDMKICAgICAgICAgKgogICAgICAgICAqIGBgYHR5cGVzY3JpcHQKICAgICAgICAgKiBjb25zdCBjb250cm9sID0gbmV3IEZvcm1Db250cm9sKDIsIFZhbGlkYXRvcnMubWluKDMpKTsKICAgICAgICAgKgogICAgICAgICAqIGNvbnNvbGUubG9nKGNvbnRyb2wuZXJyb3JzKTsgLy8ge21pbjoge21pbjogMywgYWN0dWFsOiAyfX0KICAgICAgICAgKiBgYGAKICAgICAgICAgKgogICAgICAgICAqIEBzZWUgYHVwZGF0ZVZhbHVlQW5kVmFsaWRpdHkoKWAKICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7P30gbWluCiAgICAgICAgICogQHJldHVybiB7P30gQSB2YWxpZGF0b3IgZnVuY3Rpb24gdGhhdCByZXR1cm5zIGFuIGVycm9yIG1hcCB3aXRoIHRoZQogICAgICAgICAqIGBtaW5gIHByb3BlcnR5IGlmIHRoZSB2YWxpZGF0aW9uIGNoZWNrIGZhaWxzLCBvdGhlcndpc2UgYG51bGxgLgogICAgICAgICAqCiAgICAgICAgICovCiAgICAgICAgc3RhdGljIG1pbihtaW4pIHsKICAgICAgICAgICAgcmV0dXJuICgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjb250cm9sCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoY29udHJvbCkgPT4gewogICAgICAgICAgICAgICAgaWYgKGlzRW1wdHlJbnB1dFZhbHVlKGNvbnRyb2wudmFsdWUpIHx8IGlzRW1wdHlJbnB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luc3QgYSBtYXhpbXVtIG9mIDE1CiAgICAgICAgICoKICAgICAgICAgKiBgYGB0eXBlc2NyaXB0CiAgICAgICAgICogY29uc3QgY29udHJvbCA9IG5ldyBGb3JtQ29udHJvbCgxNiwgVmFsaWRhdG9ycy5tYXgoMTUpKTsKICAgICAgICAgKgogICAgICAgICAqIGNvbnNvbGUubG9nKGNvbnRyb2wuZXJyb3JzKTsgLy8ge21heDoge21heDogMTUsIGFjdHVhbDogMTZ9fQogICAgICAgICAqIGBgYAogICAgICAgICAqCiAgICAgICAgICogQHNlZSBgdXBkYXRlVmFsdWVBbmRWYWxpZGl0eSgpYAogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/fSBtYXgKICAgICAgICAgKiBAcmV0dXJuIHs/fSBBIHZhbGlkYXRvciBmdW5jdGlvbiB0aGF0IHJldHVybnMgYW4gZXJyb3IgbWFwIHdpdGggdGhlCiAgICAgICAgICogYG1heGAgcHJvcGVydHkgaWYgdGhlIHZhbGlkYXRpb24gY2hlY2sgZmFpbHMsIG90aGVyd2lzZSBgbnVsbGAuCiAgICAgICAgICoKICAgICAgICAgKi8KICAgICAgICBzdGF0aWMgbWF4KG1heCkgewogICAgICAgICAgICByZXR1cm4gKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGNvbnRyb2wKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChjb250cm9sKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAoaXNFbXB0eUlucHV0VmFsdWUoY29udHJvbC52YWx1ZSkgfHwgaXNFbXB0eUlucHV0VmFsdWUobWF4KSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsOyAvLyBkb24ndCB2YWxpZGF0ZSBlbXB0eSB2YWx1ZXMgdG8gYWxsb3cgb3B0aW9uYWwgY29udHJvbHMKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHZhbHVlID0gcGFyc2VGbG9hdChjb250cm9sLnZhbHVlKTsKICAgICAgICAgICAgICAgIC8vIENvbnRyb2xzIHdpdGggTmFOIHZhbHVlcyBhZnRlciBwYXJzaW5nIHNob3VsZCBiZSB0cmVhdGVkIGFzIG5vdCBoYXZpbmcgYQogICAgICAgICAgICAgICAgLy8gbWF4aW11bSwgcGVyIHRoZSBIVE1MIGZvcm1zIHNwZWM6IGh0dHBzOi8vd3d3LnczLm9yZy9UUi9odG1sNS9mb3Jtcy5odG1sI2F0dHItaW5wdXQtbWF4CiAgICAgICAgICAgICAgICByZXR1cm4gIWlzTmFOKHZhbHVlKSAmJiB2YWx1ZSA+IG1heCA/IHsgJ21heCc6IHsgJ21heCc6IG1heCwgJ2FjdHVhbCc6IGNvbnRyb2wudmFsdWUgfSB9IDogbnVsbDsKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBWYWxpZGF0b3IgdGhhdCByZXF1aXJlcyB0aGUgY29udHJvbCBoYXZlIGEgbm9uLWVtcHR5IHZhbHVlLgogICAgICAgICAqCiAgICAgICAgICogXEB1c2FnZU5vdGVzCiAgICAgICAgICoKICAgICAgICAgKiAjIyMgVmFsaWRhdGUgdGhhdCB0aGUgZmllbGQgaXMgbm9uLWVtcHR5CiAgICAgICAgICoKICAgICAgICAgKiBgYGB0eXBlc2NyaXB0CiAgICAgICAgICogY29uc3QgY29udHJvbCA9IG5ldyBGb3JtQ29udHJvbCgnJywgVmFsaWRhdG9ycy5yZXF1aXJlZCk7CiAgICAgICAgICoKICAgICAgICAgKiBjb25zb2xlLmxvZyhjb250cm9sLmVycm9ycyk7IC8vIHtyZXF1aXJlZDogdHJ1ZX0KICAgICAgICAgKiBgYGAKICAgICAgICAgKgogICAgICAgICAqIEBzZWUgYHVwZGF0ZVZhbHVlQW5kVmFsaWRpdHkoKWAKICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7P30gY29udHJvbAogICAgICAgICAqIEByZXR1cm4gez99IEFuIGVycm9yIG1hcCB3aXRoIHRoZSBgcmVxdWlyZWRgIHByb3BlcnR5CiAgICAgICAgICogaWYgdGhlIHZhbGlkYXRpb24gY2hlY2sgZmFpbHMsIG90aGVyd2lzZSBgbnVsbGAuCiAgICAgICAgICoKICAgICAgICAgKi8KICAgICAgICBzdGF0aWMgcmVxdWlyZWQoY29udHJvbCkgewogICAgICAgICAgICByZXR1cm4gaXNFbXB0eUlucHV0VmFsdWUoY29udHJvbC52YWx1ZSkgPyB7ICdyZXF1aXJlZCc6IHRydWUgfSA6IG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBWYWxpZGF0b3IgdGhhdCByZXF1aXJlcyB0aGUgY29udHJvbCdzIHZhbHVlIGJlIHRydWUuIFRoaXMgdmFsaWRhdG9yIGlzIGNvbW1vbmx5CiAgICAgICAgICogdXNlZCBmb3IgcmVxdWlyZWQgY2hlY2tib3hlcy4KICAgICAgICAgKgogICAgICAgICAqIFxAdXNhZ2VOb3RlcwogICAgICAgICAqCiAgICAgICAgICogIyMjIFZhbGlkYXRlIHRoYXQgdGhlIGZpZWxkIHZhbHVlIGlzIHRydWUKICAgICAgICAgKgogICAgICAgICAqIGBgYHR5cGVzY3JpcHQKICAgICAgICAgKiBjb25zdCBjb250cm9sID0gbmV3IEZvcm1Db250cm9sKCcnLCBWYWxpZGF0b3JzLnJlcXVpcmVkVHJ1ZSk7CiAgICAgICAgICoKICAgICAgICAgKiBjb25zb2xlLmxvZyhjb250cm9sLmVycm9ycyk7IC8vIHtyZXF1aXJlZDogdHJ1ZX0KICAgICAgICAgKiBgYGAKICAgICAgICAgKgogICAgICAgICAqIEBzZWUgYHVwZGF0ZVZhbHVlQW5kVmFsaWRpdHkoKWAKICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7P30gY29ud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ldyBGb3JtQ29udHJvbCgnYmFkXEAnLCBWYWxpZGF0b3JzLmVtYWlsKTsKICAgICAgICAgKgogICAgICAgICAqIGNvbnNvbGUubG9nKGNvbnRyb2wuZXJyb3JzKTsgLy8ge2VtYWlsOiB0cnVlfQogICAgICAgICAqIGBgYAogICAgICAgICAqCiAgICAgICAgICogQHNlZSBgdXBkYXRlVmFsdWVBbmRWYWxpZGl0eSgpYAogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/fSBjb250cm9sCiAgICAgICAgICogQHJldHVybiB7P30gQW4gZXJyb3IgbWFwIHdpdGggdGhlIGBlbWFpbGAgcHJvcGVydHkKICAgICAgICAgKiBpZiB0aGUgdmFsaWRhdGlvbiBjaGVjayBmYWlscywgb3RoZXJ3aXNlIGBudWxsYC4KICAgICAgICAgKgogICAgICAgICAqLwogICAgICAgIHN0YXRpYyBlbWFpbChjb250cm9sKSB7CiAgICAgICAgICAgIGlmIChpc0VtcHR5SW5wdXRWYWx1ZShjb250cm9sLnZhbHVlKSkgewogICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7IC8vIGRvbid0IHZhbGlkYXRlIGVtcHR5IHZhbHVlcyB0byBhbGxvdyBvcHRpb25hbCBjb250cm9scwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBFTUFJTF9SRUdFWFAudGVzdChjb250cm9sLnZhbHVlKSA/IG51bGwgOiB7ICdlbWFpbCc6IHRydWUgfTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIFZhbGlkYXRvciB0aGF0IHJlcXVpcmVzIHRoZSBsZW5ndGggb2YgdGhlIGNvbnRyb2wncyB2YWx1ZSB0byBiZSBncmVhdGVyIHRoYW4gb3IgZXF1YWwKICAgICAgICAgKiB0byB0aGUgcHJvdmlkZWQgbWluaW11bSBsZW5ndGguIFRoaXMgdmFsaWRhdG9yIGlzIGFsc28gcHJvdmlkZWQgYnkgZGVmYXV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RMZW5ndGg6IDMsIGFjdHVhbExlbmd0aDogMn19CiAgICAgICAgICogYGBgCiAgICAgICAgICoKICAgICAgICAgKiBgYGBodG1sCiAgICAgICAgICogPGlucHV0IG1pbmxlbmd0aD0iNSI+CiAgICAgICAgICogYGBgCiAgICAgICAgICoKICAgICAgICAgKiBAc2VlIGB1cGRhdGVWYWx1ZUFuZFZhbGlkaXR5KClgCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez99IG1pbkxlbmd0aAogICAgICAgICAqIEByZXR1cm4gez99IEEgdmFsaWRhdG9yIGZ1bmN0aW9uIHRoYXQgcmV0dXJucyBhbiBlcnJvciBtYXAgd2l0aCB0aGUKICAgICAgICAgKiBgbWlubGVuZ3RoYCBpZiB0aGUgdmFsaWRhdGlvbiBjaGVjayBmYWlscywgb3RoZXJ3aXNlIGBudWxsYC4KICAgICAgICAgKgogICAgICAgICAqLwogICAgICAgIHN0YXRpYyBtaW5MZW5ndGgobWluTGVuZ3RoKSB7CiAgICAgICAgICAgIHJldHVybiAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY29udHJvbAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGNvbnRyb2wpID0+IHsKICAgICAgICAgICAgICAgIGlmIChpc0VtcHR5SW5wdXRWYWx1ZShjb250cm9sLnZhbHVlKSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsOyAvLyBkb24ndCB2YWxpZGF0ZSBlbXB0eSB2YWx1ZXMgdG8gYWxsb3cgb3B0aW9uYWwgY29udHJvbHMKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGxlbmd0aCA9IGNvbnRyb2wudmFsdWUgPyBjb250cm9sLnZhbHVlLmxlbmd0aCA6IDA7CiAgICAgICAgICAgICAgICByZXR1cm4gbGVuZ3RoIDwgbWluTGVu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S5sb2coY29udHJvbC5lcnJvcnMpOyAvLyB7bWF4bGVuZ3RoOiB7cmVxdWlyZWRMZW5ndGg6IDUsIGFjdHVhbExlbmd0aDogN319CiAgICAgICAgICogYGBgCiAgICAgICAgICoKICAgICAgICAgKiBgYGBodG1sCiAgICAgICAgICogPGlucHV0IG1heGxlbmd0aD0iNSI+CiAgICAgICAgICogYGBgCiAgICAgICAgICoKICAgICAgICAgKiBAc2VlIGB1cGRhdGVWYWx1ZUFuZFZhbGlkaXR5KClgCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez99IG1heExlbmd0aAogICAgICAgICAqIEByZXR1cm4gez99IEEgdmFsaWRhdG9yIGZ1bmN0aW9uIHRoYXQgcmV0dXJucyBhbiBlcnJvciBtYXAgd2l0aCB0aGUKICAgICAgICAgKiBgbWF4bGVuZ3RoYCBwcm9wZXJ0eSBpZiB0aGUgdmFsaWRhdGlvbiBjaGVjayBmYWlscywgb3RoZXJ3aXNlIGBudWxsYC4KICAgICAgICAgKgogICAgICAgICAqLwogICAgICAgIHN0YXRpYyBtYXhMZW5ndGgobWF4TGVuZ3RoKSB7CiAgICAgICAgICAgIHJldHVybiAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY29udHJvbAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGNvbnRyb2wpID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGxlbmd0aCA9IGNvbnRyb2wudmFsdWUgPyBjb250cm9sLnZhbHVlLmxlbmd0aCA6IDA7CiAgICAgICAgICAgICAgICByZXR1cm4gbGVuZ3RoID4gbWF4TGVuZ3RoID8KICAgICAgICAgICAgICAgICAgICB7ICdtYXhsZW5ndGgnOiB7ICdyZXF1aXJlZExlbmd0aCc6IG1heExlbmd0aCwgJ2FjdHVhbExlbmd0aCc6IGxlbmd0aCB9IH0gOgogICAgICAgICAgICAgICAgICAgIG51bGw7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogVmFsaWRhdG9yIHRoYXQgcmVxdWlyZXMgdGhlIGNvbnRyb2wncyB2YWx1ZSB0byBtYXRjaCBhIHJlZ2V4IHBhdHRlcm4uIFRoaXMgdmFsaWRhdG9yIGlzIGFsc28KICAgICAgICAgKiBwcm92aWRlZCBieSBkZWZhdWx0IGlmIHlvdSB1c2UgdGhlIEhUTUw1IGBwYXR0ZXJuYCBhdHRyaWJ1dGUuCiAgICAgICAgICoKICAgICAgICAgKiBcQHVzYWdlTm90ZXMKICAgICAgICAgKgogICAgICAgICAqICMjIyBWYWxpZGF0ZSB0aGF0IHRoZSBmaWVsZCBvbmx5IGNvbnRhaW5zIGxldHRlcnMgb3Igc3BhY2VzCiAgICAgICAgICoKICAgICAgICAgKiBgYGB0eXBlc2NyaXB0CiAgICAgICAgICogY29uc3QgY29udHJvbCA9IG5ldyBGb3JtQ29udHJvbCgnMScsIFZhbGlkYXRvcnMucGF0dGVybignW2EtekEtWiBdKicpKTsKICAgICAgICAgKgogICAgICAgICAqIGNvbnNvbGUubG9nKGNvbnRyb2wuZXJyb3JzKTsgLy8ge3BhdHRlcm46IHtyZXF1aXJlZFBhdHRlcm46ICdeW2EtekEtWiBdKiQnLCBhY3R1YWxWYWx1ZTogJzEnfX0KICAgICAgICAgKiBgYGAKICAgICAgICAgKgogICAgICAgICAqIGBgYGh0bWwKICAgICAgICAgKiA8aW5wdXQgcGF0dGVybj0iW2EtekEtWiBdKiI+CiAgICAgICAgICogYGBgCiAgICAgICAgICoKICAgICAgICAgKiBAc2VlIGB1cGRhdGVWYWx1ZUFuZFZhbGlkaXR5KClgCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez99IHBhdHRlcm4gQSByZWd1bGFyIGV4cHJlc3Npb24gdG8gYmUgdXNlZCBhcyBpcyB0byB0ZXN0IHRoZSB2YWx1ZXMsIG9yIGEgc3RyaW5nLgogICAgICAgICAqIElmIGEgc3RyaW5nIGlzIHBhc3NlZCwgdGhlIGBeYCBjaGFyYWN0ZXIgaXMgcHJlcGVuZGVkIGFuZCB0aGUgYCRgIGNoYXJhY3RlciBpcwogICAgICAgICAqIGFwcGVuZGVkIHRvIHRoZSBwcm92aWRlZCBzdHJpbmcgKGlmIG5vdCBhbHJlYWR5IHByZXNlbnQpLCBhbmQgdGhlIHJlc3VsdGluZyByZWd1bGFyCiAgICAgICAgICogZXhwcmVzc2lvbiBpcyB1c2VkIHRvIHRlc3QgdGhlIHZhbHVlcy4KICAgICAgICAgKgogICAgICAgICAqIEByZXR1cm4gez99IEEgdmFsaWRhdG9yIGZ1bmN0aW9uIHRoYXQgcmV0dXJucyBhbiBlcnJvciBtYXAgd2l0aCB0aGUKICAgICAgICAgKiBgcGF0dGVybmAgcHJvcGVydHkgaWYgdGhlIHZhbGlkYXRpb24gY2hlY2sgZmFpbHMsIG90aGVyd2lzZSBgbnVsbGAuCiAgICAgICAgICoKICAgICAgICAgKi8KICAgICAgICBzdGF0aWMgcGF0dGVybihwYXR0ZXJuKSB7CiAgICAgICAgICAgIGlmICghcGF0dGVybikKICAgICAgICAgICAgICAgIHJldHVybiBWYWxpZGF0b3JzLm51bGxWYWxpZGF0b3I7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHJlZ2V4OwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCByZWdleFN0cjsKICAgICAgICAgICAgaWYgKHR5cGVvZiBwYXR0ZXJuID09PSAnc3RyaW5nJykgewogICAgICAgICAgICAgICAgcmVnZXhTdHIgPSAnJzsKICAgICAgICAgICAgICAgIGlmIChwYXR0ZXJuLmNoYXJBdCgwKSAhPT0gJ14nKQogICAgICAgICAgICAgICAgICAgIHJlZ2V4U3RyICs9ICdeJzsKICAgICAgICAgICAgICAgIHJlZ2V4U3RyICs9IHBhdHRlcm47CiAgICAgICAgICAgICAgICBpZiAocGF0dGVybi5jaGFyQXQocGF0dGVybi5sZW5ndGggLSAxKSAhPT0gJyQnKQogICAgICAgICAgICAgICAgICAgIHJlZ2V4U3RyICs9ICckJzsKICAgICAgICAgICAgICAgIHJlZ2V4ID0gbmV3IFJlZ0V4cChyZWdleFN0cik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICByZWdleFN0ciA9IHBhdHRlcm4udG9TdHJpbmcoKTsKICAgICAgICAgICAgICAgIHJlZ2V4ID0gcGF0dGVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGNvbnRyb2wKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChjb250cm9sKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAoaXNFbXB0eUlucHV0VmFsdWUoY29udHJvbC52YWx1ZSkpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDsgLy8gZG9uJ3QgdmFsaWRhdGUgZW1wdHkgdmFsdWVzIHRvIGFsbG93IG9wdGlvbmFsIGNvbnRyb2xzCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCB2YWx1ZSA9IGNvbnRyb2wudmFsdWU7CiAgICAgICAgICAgICAgICByZXR1cm4gcmVnZXgudGVzdCh2YWx1ZSkgPyBudWxsIDoKICAgICAgICAgICAgICAgICAgICB7ICdwYXR0ZXJuJzogeyAncmVxdWlyZWRQYXR0ZXJuJzogcmVnZXhTdHIsICdhY3R1YWxWYWx1ZSc6IHZhbHVlIH0gfTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBWYWxpZGF0b3IgdGhhdCBwZXJmb3JtcyBubyBvcGVyYXRpb24uCiAgICAgICAgICoKICAgICAgICAgKiBAc2VlIGB1cGRhdGVWYWx1ZUFuZFZhbGlkaXR5KClgCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez99IGNvbnRyb2wKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHN0YXRpYyBudWxsVmFsaWRhdG9yKGNvbnRyb2wpIHsKICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsaWRhdG9ycwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc3RhdGljIGNvbXBvc2UodmFsaWRhdG9ycykgewogICAgICAgICAgICBpZiAoIXZhbGlkYXRvcnMpCiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwcmVzZW50VmFsaWRhdG9ycyA9ICgvKiogQHR5cGUgez99ICovICh2YWxpZGF0b3JzLmZpbHRlcihpc1ByZXNlbnQpKSk7CiAgICAgICAgICAgIGlmIChwcmVzZW50VmFsaWRhdG9ycy5sZW5ndGggPT0gMCkKICAgICAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgICAgICByZXR1cm4gKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGNvbnRyb2wKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGZ1bmN0aW9uIChjb250cm9sKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gX21lcmdlRXJyb3JzKF9leGVjdXRlVmFsaWRhdG9ycyhjb250cm9sLCBwcmVzZW50VmFsaWRhdG9ycykpOwogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIENvbXBvc2UgbXVsdGlwbGUgYXN5bmMgdmFsaWRhdG9ycyBpbnRvIGEgc2luZ2xlIGZ1bmN0aW9uIHRoYXQgcmV0dXJucyB0aGUgdW5pb24KICAgICAgICAgKiBvZiB0aGUgaW5kaXZpZHVhbCBlcnJvciBvYmplY3RzIGZvciB0aGUgcHJvdmlkZWQgY29udHJvbC4KICAgICAgICAgKgogICAgICAgICAqIEBzZWUgYHVwZGF0ZVZhbHVlQW5kVmFsaWRpdHkoKWAKICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsaWRhdG9ycwogICAgICAgICAqIEByZXR1cm4gez99IEEgdmFsaWRhdG9yIGZ1bmN0aW9uIHRoYXQgcmV0dXJucyBhbiBlcnJvciBtYXAgd2l0aCB0aGUKICAgICAgICAgKiBtZXJnZWQgZXJyb3Igb2JqZWN0cyBvZiB0aGUgYXN5bmMgdmFsaWRhdG9ycyBpZiB0aGUgdmFsaWRhdGlvbiBjaGVjayBmYWlscywgb3RoZXJ3aXNlIGBudWxsYC4KICAgICAgICAgKgogICAgICAgICAqLwogICAgICAgIHN0YXRpYyBjb21wb3NlQXN5bmModmFsaWRhdG9ycykgewogICAgICAgICAgICBpZiAoIXZhbGlkYXRvcnMpCiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwcmVzZW50VmFsaWRhdG9ycyA9ICgvKiogQHR5cGUgez99ICovICh2YWxpZGF0b3JzLmZpbHRlcihpc1ByZXNlbnQpKSk7CiAgICAgICAgICAgIGlmIChwcmVzZW50VmFsaWRhdG9ycy5sZW5ndGggPT0gMCkKICAgICAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgICAgICByZXR1cm4gKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGNvbnRyb2wKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGZ1bmN0aW9uIChjb250cm9sKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBvYnNlcnZhYmxlcyA9IF9leGVjdXRlQXN5bmNWYWxpZGF0b3JzKGNvbnRyb2wsIHByZXNlbnRWYWxpZGF0b3JzKS5tYXAodG9PYnNlcnZhYmxlKTsKICAgICAgICAgICAgICAgIHJldHVybiBmb3JrSm9pbihvYnNlcnZhYmxlcykucGlwZShtYXAoX21lcmdlRXJyb3JzKSk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBvCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBpc1ByZXNlbnQobykgewogICAgICAgIHJldHVybiBvICE9IG51bGw7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gcgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gdG9PYnNlcnZhYmxlKHIpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3Qgb2JzID0gaXNQcm9taXNlJDEocikgPyBmcm9tKHIpIDogcjsKICAgICAgICBpZiAoIShpc09ic2VydmFibGUkMShvYnMpKSkgewogICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYEV4cGVjdGVkIHZhbGlkYXRvciB0byByZXR1cm4gUHJvbWlzZSBvciBPYnNlcnZhYmxlLmApOwogICAgICAgIH0KICAgICAgICByZXR1cm4gb2JzOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IGNvbnRyb2wKICAgICAqIEBwYXJhbSB7P30gdmFsaWRhdG9ycwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gX2V4ZWN1dGVWYWxpZGF0b3JzKGNvbnRyb2wsIHZhbGlkYXRvcnMpIHsKICAgICAgICByZXR1cm4gdmFsaWRhdG9ycy5tYXAoKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdiA9PiB2KGNvbnRyb2wpKSk7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gY29udHJvbAogICAgICogQHBhcmFtIHs/fSB2YWxpZGF0b3JzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBfZXhlY3V0ZUFzeW5jVmFsaWRhdG9ycyhjb250cm9sLCB2YWxpZGF0b3JzKSB7CiAgICAgICAgcmV0dXJuIHZhbGlkYXRvcnMubWFwKCgvKioKICAgICAgICAgKiBAcGFyYW0gez99IHYKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHYgPT4gdihjb250cm9sKSkpOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IGFycmF5T2ZFcnJvcnMKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIF9tZXJnZUVycm9ycyhhcnJheU9mRXJyb3JzKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCByZXMgPSB7fTsKICAgICAgICAvLyBOb3QgdXNpbmcgQXJyYXkucmVkdWNlIGhlcmUgZHVlIHRvIGEgQ2hyb21lIDgwIGJ1ZwogICAgICAgIC8vIGh0dHBzOi8vYnVncy5jaHJvbWl1bS5vcmcvcC9jaHJvbWl1bS9pc3N1ZXMvZGV0YWlsP2lkPTEwNDk5ODIKICAgICAgICBhcnJheU9mRXJyb3JzLmZvckVhY2goKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZXJyb3JzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAoZXJyb3JzKSA9PiB7CiAgICAgICAgICAgIHJlcyA9IGVycm9ycyAhPSBudWxsID8gT2JqZWN0LmFzc2lnbihPYmplY3Qu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oLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gYwogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGMpID0+ICgoLyoqIEB0eXBlIHs/fSAqLyAodmFsaWRhdG9yKSkpLnZhbGlkYXRlKGMpKTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAodmFsaWRhdG9yKSk7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHZhbGlkYXRvcgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gbm9ybWFsaXplQXN5bmNWYWxpZGF0b3IodmFsaWRhdG9yKSB7CiAgICAgICAgaWYgKCgoLyoqIEB0eXBlIHs/fSAqLyAodmFsaWRhdG9yKSkpLnZhbGlkYXRlKSB7CiAgICAgICAgICAgIHJldHVybiAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gYwogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGMpID0+ICgoLyoqIEB0eXBlIHs/fSAqLyAodmFsaWRhdG9yKSkpLnZhbGlkYXRlKGMpKTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAodmFsaWRhdG9yKSk7CiAgICAgICAgfQogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogcGFja2FnZXMvZm9ybXMvc3JjL2RpcmVjdGl2ZXMvbnVtYmVyX3ZhbHVlX2FjY2Vzc29yLnRzCiAgICAgKiBAc3VwcHJlc3Mge2NoZWNrVHlwZXMsY29uc3RhbnRQcm9wZXJ0eSxleHRyYVJlcXVpcmUsbWlzc2luZ092Z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AgICogPGlucHV0IHR5cGU9Im51bWJlciIgW2Zvcm1Db250cm9sXT0idG90YWxDb3VudENvbnRyb2wiPgogICAgICogYGBgCiAgICAgKgogICAgICogXEBuZ01vZHVsZSBSZWFjdGl2ZUZvcm1zTW9kdWxlCiAgICAgKiBcQG5nTW9kdWxlIEZvcm1zTW9kdWxlCiAgICAgKiBcQHB1YmxpY0FwaQogICAgICovCiAgICBjbGFzcyBOdW1iZXJWYWx1ZUFjY2Vzc29yIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IF9yZW5kZXJlcgogICAgICAgICAqIEBwYXJhbSB7P30gX2VsZW1lbnRSZWYKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihfcmVuZGVyZXIsIF9lbGVtZW50UmVmKSB7CiAgICAgICAgICAgIHRoaXMuX3JlbmRlcmVyID0gX3JlbmRlcmVyOwogICAgICAgICAgICB0aGlzLl9lbGVtZW50UmVmID0gX2VsZW1lbnRSZWY7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICAgICAqIFRoZSByZWdpc3RlcmVkIGNhbGxiYWNrIGZ1bmN0aW9uIGNhbGxlZCB3aGVuIGEgY2hhbmdlIG9yIGlucHV0IGV2ZW50IG9jY3VycyBvbiB0aGUgaW5wdXQKICAgICAgICAgICAgICogZWxlbWVudC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMub25DaGFuZ2UgPSAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gXwogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKF8pID0+IHsgfSk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICAgICAqIFRoZSByZWdpc3RlcmVkIGNhbGxiYWNrIGZ1bmN0aW9uIGNhbGxlZCB3aGVuIGEgYmx1ciBldmVudCBvY2N1cnMgb24gdGhlIGlucHV0IGVsZW1lbnQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLm9uVG91Y2hlZCA9ICgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsgfSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgdGhlICJ2YWx1ZSIgcHJvcGVydHkgb24gdGhlIGlucHV0IGVsZW1lbnQuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlIFRoZSBjaGVja2VkIHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB3cml0ZVZhbHVlKHZhbHVlKSB7CiAgICAgICAgICAgIC8vIFRoZSB2YWx1ZSBuZWVkcyB0byBiZSBub3JtYWxpemVkIGZvciBJRTksIG90aGVyd2lzZSBpdCBpcyBzZXQgdG8gJ251bGwnIHdoZW4gbnVsbAogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG5vcm1hbGl6ZWRWYWx1ZSA9IHZhbHVlID09IG51bGwgPyAnJyA6IHZhbHVlOwogICAgICAgICAgICB0aGlzLl9yZW5kZXJlci5zZXRQcm9wZXJ0eSh0aGlzLl9lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQsICd2YWx1ZScsIG5vcm1hbGl6ZWRWYWx1ZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBSZWdpc3RlcnMgYSBmdW5jdGlvbiBjYWxsZWQgd2hlbiB0aGUgY29udHJvbCB2YWx1ZSBjaGFuZ2VzLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/fSBmbiBUaGUgY2FsbGJhY2sgZnVuY3Rpb24KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlZ2lzdGVyT25DaGFuZ2UoZm4pIHsKICAgICAgICAgICAgdGhpcy5vbkNoYW5nZSA9ICgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHZhbHVlKSA9PiB7CiAgICAgICAgICAgICAgICBmbih2YWx1ZSA9PSAnJyA/IG51bGwgOiBwYXJzZUZsb2F0KHZhbHVlKSk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogUmVnaXN0ZXJzIGEgZnVuY3Rpb24gY2FsbGVkIHdoZW4gdGhlIGNvbnRyb2wgaXMgdG91Y2hlZC4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7P30gZm4gVGhlIGNhbGxiYWNrIGZ1bmN0aW9uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZWdpc3Rlck9uVG91Y2hlZChmbikgewogICAgICAgICAgICB0aGlzLm9uVG91Y2hlZCA9IGZuOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIHRoZSAiZGlzYWJsZWQiIHByb3BlcnR5IG9uIHRoZSBpbnB1dCBlbGVtZW50LgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/fSBpc0Rpc2FibGVkIFRoZSBkaXNhYmxlZCB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0RGlzYWJsZWRTdGF0ZShpc0Rpc2FibGVkKSB7CiAgICAgICAgICAgIHRoaXMuX3JlbmRlcmVyLnNldFByb3BlcnR5KHRoaXMuX2VsZW1lbnRSZWYubmF0aXZlRWxlbWVudCwgJ2Rpc2FibGVkJywgaXNEaXNhYmxlZCk7CiAgICAgICAgfQogICAgfQogICAgTnVtYmVyVmFsdWVBY2Nlc3N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YWRpbyBidXR0b25zLiBGb3IgaW50ZXJuYWwgdXNlIG9ubHkuCiAgICAgKi8KICAgIGNsYXNzIFJhZGlvQ29udHJvbFJlZ2lzdHJ5IHsKICAgICAgICBjb25zdHJ1Y3RvcigpIHsKICAgICAgICAgICAgdGhpcy5fYWNjZXNzb3JzID0gW107CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBBZGRzIGEgY29udHJvbCB0byB0aGUgaW50ZXJuYWwgcmVnaXN0cnkuIEZvciBpbnRlcm5hbCB1c2Ugb25seS4KICAgICAgICAgKiBAcGFyYW0gez99IGNvbnRyb2wKICAgICAgICAgKiBAcGFyYW0gez99IGFjY2Vzc29yCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBhZGQoY29udHJvbCwgYWNjZXNzb3IpIHsKICAgICAgICAgICAgdGhpcy5fYWNjZXNzb3JzLnB1c2goW2NvbnRyb2wsIGFjY2Vzc29yXSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBSZW1vdmVzIGEgY29udHJvbCBmcm9tIHRoZSBpbnRlcm5hbCByZWdpc3RyeS4gRm9yIGludGVybmFsIHVzZSBvbmx5LgogICAgICAgICAqIEBwYXJhbSB7P30gYWNjZXNzb3IKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlbW92ZShhY2Nlc3NvcikgewogICAgICAgICAgICBmb3IgKGxldCBpID0gdGhpcy5fYWNjZXNzb3JzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5fYWNjZXNzb3JzW2ldWzFdID09PSBhY2Nlc3NvcikgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX2FjY2Vzc29ycy5zcGxpY2UoaSwgMSk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBTZWxlY3RzIGEgcmFkaW8gYnV0dG9uLiBGb3IgaW50ZXJuYWwgdXNlIG9ubHkuCiAgICAgICAgICogQHBhcmFtIHs/fSBhY2Nlc3NvcgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2VsZWN0KGFjY2Vzc29yKSB7CiAgICAgICAgICAgIHRoaXMuX2FjY2Vzc29ycy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoYykgPT4gewogICAgICAgICAgICAgICAgaWYgKHRoaXMuX2lzU2FtZUdyb3VwKGMsIGFjY2Vzc29yKSAmJiBjWzFdICE9PSBhY2Nlc3NvcikgewogICAgICAgICAgICAgICAgICAgIGNbMV0uZmlyZVVuY2hlY2soYWNjZXNzb3IudmFsdWUpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBjb250cm9sUGFpcgogICAgICAgICAqIEBwYXJhbSB7P30gYWNjZXNzb3IKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9pc1NhbWVHcm91cChjb250cm9sUGFpciwgYWNjZXNzb3IpIHsKICAgICAgICAgICAgaWYgKCFjb250cm9sUGFpclswXS5jb250cm9sKQogICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICByZXR1cm4gY29udHJvbFBhaXJbMF0uX3BhcmVudCA9PT0gYWNjZXNzb3IuX2NvbnRyb2wuX3BhcmVudCAmJgogICAgICAgICAgICAgICAgY29udHJvbFBhaXJb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GEgY2hhbmdlIGV2ZW50IG9jY3VycyBvbiB0aGUgaW5wdXQgZWxlbWVudC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMub25DaGFuZ2UgPSAoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7IH0pOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAgICAgKiBUaGUgcmVnaXN0ZXJlZCBjYWxsYmFjayBmdW5jdGlvbiBjYWxsZWQgd2hlbiBhIGJsdXIgZXZlbnQgb2NjdXJzIG9uIHRoZSBpbnB1dCBlbGVtZW50LgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5vblRvdWNoZWQgPSAoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7IH0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogQSBsaWZlY3ljbGUgbWV0aG9kIGNhbGxlZCB3aGVuIHRoZSBkaXJlY3RpdmUgaXMgaW5pdGlhbGl6ZWQuIEZvciBpbnRlcm5hbCB1c2Ugb25seS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25Jbml0KCkgewogICAgICAgICAgICB0aGlzLl9jb250cm9sID0gdGhpcy5faW5qZWN0b3IuZ2V0KE5nQ29udHJvbCk7CiAgICAgICAgICAgIHRoaXMuX2NoZWNrTmFtZSgpOwogICAgICAgICAgICB0aGlzLl9yZWdpc3RyeS5hZGQodGhpcy5fY29udHJvbCwgdGhpcyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBMaWZlY3ljbGUgbWV0aG9kIGNhbGxlZCBiZWZvcmUgdGhlIGRpcmVjdGl2ZSdzIGluc3RhbmNlIGlzIGRlc3Ryb3llZC4gRm9yIGludGVybmFsIHVzZSBvbmx5LgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkRlc3Ryb3koKSB7CiAgICAgICAgICAgIHRoaXMuX3JlZ2lzdHJ5LnJlbW92ZSh0aGlzKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIFNldHMgdGhlICJjaGVja2VkIiBwcm9wZXJ0eSB2YWx1ZSBvbiB0aGUgcmFkaW8gaW5wdXQgZWxlbWVudC4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUgVGhlIGNoZWNrZWQgdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHdyaXRlVmFsdWUodmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5fc3RhdGUgPSB2YWx1ZSA9PT0gdGhpcy52YWx1ZTsKICAgICAgICAgICAgdGhpcy5fcmVuZGVyZXIuc2V0UHJvcGVydHkodGhpcy5fZWxlbWVudFJlZi5uYXRpdmVFbGVtZW50LCAnY2hlY2tlZCcsIHRoaXMuX3N0YXRlKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIFJlZ2lzdGVycyBhIGZ1bmN0aW9uIGNhbGxlZCB3aGVuIHRoZSBjb250cm9sIHZhbHVlIGNoYW5nZXMuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez99IGZuIFRoZSBjYWxsYmFjayBmdW5jdGlvbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVnaXN0ZXJPbkNoYW5nZShmbikgewogICAgICAgICAgICB0aGlzLl9mbiA9IGZuOwogICAgICAgICAgICB0aGlzLm9uQ2hhbmdlID0gKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgZm4odGhpcy52YWx1ZSk7CiAgICAgICAgICAgICAgICB0aGlzLl9yZWdpc3RyeS5zZWxlY3QodGhpcyk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIHRoZSAidmFsdWUiIG9uIHRoZSByYWRpbyBpbnB1dCBlbGVtZW50IGFuZCB1bmNoZWNrcyBpdC4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZpcmVVbmNoZWNrKHZhbHVlKSB7CiAgICAgICAgICAgIHRoaXMud3JpdGVWYWx1ZSh2YWx1ZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBSZWdpc3RlcnMgYSBmdW5jdGlvbiBjYWxsZWQgd2hlbiB0aGUgY29udHJvbCBpcyB0b3VjaGVkLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/fSBmbiBUaGUgY2FsbGJhY2sgZnVuY3Rpb24KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlZ2lzdGVyT25Ub3VjaGVkKGZuKSB7CiAgICAgICAgICAgIHRoaXMub25Ub3VjaGVkID0gZm47CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgdGhlICJkaXNhYmxlZCIgcHJvcGVydHkgb24gdGhlIGlucHV0IGVsZW1lbnQuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez99IGlzRGlzYWJsZWQgVGhlIGRpc2FibGVkIHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXREaXNhYmxlZFN0YXRlKGlzRGlzYWJsZWQpIHsKICAgICAgICAgICAgdGhpcy5fcmVuZGVyZXIuc2V0UHJvcGVydHkodGhpcy5fZWxlbWVudFJlZi5uYXRpdmVFbGVtZW50LCAnZGlzYWJsZWQnLCBpc0Rpc2FibGVkKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9jaGVja05hbWUoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLm5hbWUgJiYgdGhpcy5mb3JtQ29udHJvbE5hbWUgJiYgdGhpcy5uYW1lICE9PSB0aGlzLmZvcm1Db250cm9sTmFtZSkgewogICAgICAgICAgICAgICAgdGhpcy5fdGhyb3dOYW1lRXJyb3IoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoIXRoaXMubmFtZSAmJiB0aGlzLmZvcm1Db250cm9sTmFtZSkKICAgICAgICAgICAgICAgIHRoaXMubmFtZSA9IHRoaXMuZm9ybUNvbnRyb2xOYW1lOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3Rocm93TmFtZUVycm9yKCkgewogICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYAogICAgICBJZiB5b3UgZGVmaW5lIGJvdGggYSBuYW1lIGFuZCBhIGZvcm1Db250cm9sTmFtZSBhdHRyaWJ1dGUgb24geW91ciByYWRpbyBidXR0b24sIHRoZWlyIHZhbHVlcwogICAgICBtdXN0IG1hdGNoLiBFeDogPGlucHV0IHR5cGU9InJhZGlvIiBmb3JtQ29udHJvbE5hbWU9ImZvb2QiIG5hbWU9ImZvb2QiPgogICAgYCk7CiAgICAgICAgfQogICAgfQogICAgUmFkaW9Db250cm9sVmFsdWVBY2Nlc3Nvci7JtWZhYyA9IGZ1bmN0aW9uIFJhZGlvQ29udHJvbFZhbHVlQWNjZXNzb3JfRmFjdG9yeSh0KS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bGFzcyBSYW5nZVZhbHVlQWNjZXNzb3IgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gX3JlbmRlcmVyCiAgICAgICAgICogQHBhcmFtIHs/fSBfZWxlbWVudFJlZgogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKF9yZW5kZXJlciwgX2VsZW1lbnRSZWYpIHsKICAgICAgICAgICAgdGhpcy5fcmVuZGVyZXIgPSBfcmVuZGVyZXI7CiAgICAgICAgICAgIHRoaXMuX2VsZW1lbnRSZWYgPSBfZWxlbWVudFJlZjsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgICAgICogVGhlIHJlZ2lzdGVyZWQgY2FsbGJhY2sgZnVuY3Rpb24gY2FsbGVkIHdoZW4gYSBjaGFuZ2Ugb3IgaW5wdXQgZXZlbnQgb2NjdXJzIG9uIHRoZSBpbnB1dAogICAgICAgICAgICAgKiBlbGVtZW50LgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5vbkNoYW5nZSA9ICgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoXykgPT4geyB9KTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgICAgICogVGhlIHJlZ2lzdGVyZWQgY2FsbGJhY2sgZnVuY3Rpb24gY2FsbGVkIHdoZW4gYSBibHVyIGV2ZW50IG9jY3VycyBvbiB0aGUgaW5wdXQgZWxlbWVudC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMub25Ub3VjaGVkID0gKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4geyB9KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU2V0cyB0aGUgInZhbHVlIiBwcm9wZXJ0eSBvbiB0aGUgaW5wdXQgZWxlbWVudC4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUgVGhlIGNoZWNrZWQgdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHdyaXRlVmFsdWUodmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5fcmVuZGVyZXIuc2V0UHJvcGVydHkodGhpcy5fZWxlbWVudFJlZi5uYXRpdmVFbGVtZW50LCAndmFsdWUnLCBwYXJzZUZsb2F0KHZhbHVlKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBSZWdpc3RlcnMgYSBmdW5jdGlvbiBjYWxsZWQgd2hlbiB0aGUgY29udHJvbCB2YWx1ZSBjaGFuZ2VzLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/fSBmbiBUaGUgY2FsbGJhY2sgZnVuY3Rpb24KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlZ2lzdGVyT25DaGFuZ2UoZm4pIHsKICAgICAgICAgICAgdGhpcy5vbkNoYW5nZSA9ICgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHZhbHVlKSA9PiB7CiAgICAgICAgICAgICAgICBmbih2YWx1ZSA9PSAnJyA/IG51bGwgOiBwYXJzZUZsb2F0KHZhbHVlKSk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogUmVnaXN0ZXJzIGEgZnVuY3Rpb24gY2FsbGVkIHdoZW4gdGhlIGNvbnRyb2wgaXMgdG91Y2hlZC4KICAgICAgICAgKgogICAgICAgICAqIEBwYX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AgICAqIGBgYAogICAgICoKICAgICAqICoqTm90ZToqKiBXZSBsaXN0ZW4gdG8gdGhlICdjaGFuZ2UnIGV2ZW50IGJlY2F1c2UgJ2lucHV0JyBldmVudHMgYXJlbid0IGZpcmVkCiAgICAgKiBmb3Igc2VsZWN0cyBpbiBGaXJlZm94IGFuZCBJRToKICAgICAqIGh0dHBzOi8vYnVnemlsbGEubW96aWxsYS5vcmcvc2hvd19idWcuY2dpP2lkPTEwMjQzNTAKICAgICAqIGh0dHBzOi8vZGV2ZWxvcGVyLm1pY3Jvc29mdC5jb20vZW4tdXMvbWljcm9zb2Z0LWVkZ2UvcGxhdGZvcm0vaXNzdWVzLzQ2NjAwNDUvCiAgICAgKgogICAgICogXEBuZ01vZHVsZSBSZWFjdGl2ZUZvcm1zTW9kdWxlCiAgICAgKiBcQG5nTW9kdWxlIEZvcm1zTW9kdWxlCiAgICAgKiBcQHB1YmxpY0FwaQogICAgICovCiAgICBjbGFzcyBTZWxlY3RDb250cm9sVmFsdWVBY2Nlc3NvciB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBfcmVuZGVyZXIKICAgICAgICAgKiBAcGFyYW0gez99IF9lbGVtZW50UmVmCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoX3JlbmRlcmVyLCBfZWxlbWVudFJlZikgewogICAgICAgICAgICB0aGlzLl9yZW5kZXJlciA9IF9yZW5kZXJlcjsKICAgICAgICAgICAgdGhpcy5fZWxlbWVudFJlZiA9IF9lbGVtZW50UmVmOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fb3B0aW9uTWFwID0gbmV3IE1hcCgpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5faWRDb3VudGVyID0gMDsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgICAgICogVGhlIHJlZ2lzdGVyZWQgY2FsbGJhY2sgZnVuY3Rpb24gY2FsbGVkIHdoZW4gYSBjaGFuZ2UgZXZlbnQgb2NjdXJzIG9uIHRoZSBpbnB1dCBlbGVtZW50LgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5vbkNoYW5nZSA9ICgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoXykgPT4geyB9KTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgICAgICogVGhlIHJlZ2lzdGVyZWQgY2FsbGJhY2sgZnVuY3Rpb24gY2FsbGVkIHdoZW4gYSBibHVyIGV2ZW50IG9jY3VycyBvbiB0aGUgaW5wdXQgZWxlbWVudC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMub25Ub3VjaGVkID0gKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4geyB9KTsKICAgICAgICAgICAgdGhpcy5fY29tcGFyZVdpdGggPSBsb29zZUlkZW50aWNhbDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIFRyYWNrcyB0aGUgb3B0aW9uIGNvbXBhcmlzb24gYWxnb3JpdGhtIGZvciB0cmFja2luZyBpZGVudGl0aWVzIHdoZW4KICAgICAgICAgKiBjaGVja2luZyBmb3IgY2hhbmdlcy4KICAgICAgICAgKiBAcGFyYW0gez99IGZuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgY29tcGFyZVdpdGgoZm4pIHsKICAgICAgICAgICAgaWYgKHR5cGVvZiBmbiAhPT0gJ2Z1bmN0aW9uJykgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBjb21wYXJlV2l0aCBtdXN0IGJlIGEgZnVuY3Rpb24sIGJ1dCByZWNlaXZlZCAke0pTT04uc3RyaW5naWZ5KGZuKX1gKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9jb21wYXJlV2l0aCA9IGZuOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIHRoZSAidmFsdWUiIHByb3BlcnR5IG9uIHRoZSBpbnB1dCBlbGVtZW50LiBUaGUgInNlbGVjdGVkSW5kZXgiCiAgICAgICAgICogcHJvcGVydHkgaXMgYWxzbyBzZXQgaWYgYW4gSUQgaXMgcHJvdmlkZWQgb24gdGhlIG9wdGlvbiBlbGVtZW50LgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZSBUaGUgY2hlY2tlZCB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgd3JpdGVWYWx1ZSh2YWx1ZSkgewogICAgICAgICAgICB0aGlzLnZhbHVlID0gdmFsdWU7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaWQgPSB0aGlzLl9nZXRPcHRpb25JZCh2YWx1ZSk7CiAgICAgICAgICAgIGlmIChpZCA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9yZW5kZXJlci5zZXRQcm9wZXJ0eSh0aGlzLl9lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQsICdzZWxlY3RlZEluZGV4JywgLTEpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdmFsdWVTdHJpbmcgPSBfYnVpbGRWYWx1ZVN0cmluZyhpZCwgdmFsdWUpOwogICAgICAgICAgICB0aGlzLl9yZW5kZXJlci5zZXRQcm9wZXJ0eSh0aGlzLl9lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQsICd2YWx1ZScsIHZhbHVlU3RyaW5nKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIFJlZ2lzdGVycyBhIGZ1bmN0aW9uIGNhbGxlZCB3aGVuIHRoZSBjb250cm9sIHZhbHVlIGNoYW5nZXMuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez99IGZuIFRoZSBjYWxsYmFjayBmdW5jdGlvbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVnaXN0ZXJPbkNoYW5nZShmbikgewogICAgICAgICAgICB0aGlzLm9uQ2hhbmdlID0gKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlU3RyaW5nCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAodmFsdWVTdHJpbmcpID0+IHsKICAgICAgICAgICAgICAgIHRoaXMudmFsdWUgPSB0aGlzLl9nZXRPcHRpb25WYWx1ZSh2YWx1ZVN0cmluZyk7CiAgICAgICAgICAgICAgICBmbih0aGlzLnZhbHVlKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBSZWdpc3RlcnMgYSBmdW5jdGlvbiBjYWxsZWQgd2hlbiB0aGUgY29udHJvbCBpcyB0b3VjaGVkLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/fSBmbiBUaGUgY2FsbGJhY2sgZnVuY3Rpb24KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlZ2lzdGVyT25Ub3VjaGVkKGZuKSB7CiAgICAgICAgICAgIHRoaXMub25Ub3VjaGVkID0gZm47CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgdGhlICJkaXNhYmxlZCIgcHJvcGVydHkgb24gdGhlIHNlbGVjdCBpbnB1dCBlbGVtZW50LgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/fSBpc0Rpc2FibGVkIFRoZSBkaXNhYmxlZCB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0RGlzYWJsZWRTdGF0ZShpc0Rpc2FibGVkKSB7CiAgICAgICAgICAgIHRoaXMuX3JlbmRlcmVyLnNldFByb3BlcnR5KHRoaXMuX2VsZW1lbnRSZWYubmF0aXZlRWxlbWVudCwgJ2Rpc2FibGVkJywgaXNEaXNhYmxlZCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9yZWdpc3Rlck9wdGlvbigpIHsKICAgICAgICAgICAgcmV0dXJuICh0aGlzLl9pZENvdW50ZXIrKykudG9TdHJpbmcoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9nZXRPcHRpb25JZCh2YWx1ZSkgewogICAgICAgICAgICBmb3IgKGNvbnN0IGlkIG9mIEFycmF5LmZyb20odGhpcy5fb3B0aW9uTWFwLmtleXMoKSkpIHsKICAgICAgICAgICAgICAgIGlmICh0aGlzLl9jb21wYXJlV2l0aCh0aGlzLl9vcHRpb25NYXAuZ2V0KGlkKSwgdmFsdWUpKQogICAgICAgICAgICAgICAgICAgIHJldHVybiBpZDsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWVTdHJpbmcKICAgICAgICAgKiBAcmV0dXJu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iAgICAgKiBcQHB1YmxpY0FwaQogICAgICovCiAgICBjbGFzcyBOZ1NlbGVjdE9wdGlvbiB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBfZWxlbWVudAogICAgICAgICAqIEBwYXJhbSB7P30gX3JlbmRlcmVyCiAgICAgICAgICogQHBhcmFtIHs/fSBfc2VsZWN0CiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoX2VsZW1lbnQsIF9yZW5kZXJlciwgX3NlbGVjdCkgewogICAgICAgICAgICB0aGlzLl9lbGVtZW50ID0gX2VsZW1lbnQ7CiAgICAgICAgICAgIHRoaXMuX3JlbmRlcmVyID0gX3JlbmRlcmVyOwogICAgICAgICAgICB0aGlzLl9zZWxlY3QgPSBfc2VsZWN0OwogICAgICAgICAgICBpZiAodGhpcy5fc2VsZWN0KQogICAgICAgICAgICAgICAgdGhpcy5pZCA9IHRoaXMuX3NlbGVjdC5fcmVnaXN0ZXJPcHRpb24oKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIFRyYWNrcyB0aGUgdmFsdWUgYm91bmQgdG8gdGhlIG9wdGlvbiBlbGVtZW50LiBVbmxpa2UgdGhlIHZhbHVlIGJpbmRpbmcsCiAgICAgICAgICogbmdWYWx1ZSBzdXBwb3J0cyBiaW5kaW5nIHRvIG9iamVjdHMuCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IG5nVmFsdWUodmFsdWUpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX3NlbGVjdCA9PSBudWxsKQogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB0aGlzLl9zZWxlY3QuX29wdGlvbk1hcC5zZXQodGhpcy5pZCwgdmFsdWUpOwogICAgICAgICAgICB0aGlzLl9zZXRFbGVtZW50VmFsdWUoX2J1aWxkVmFsdWVTdHJpbmcodGhpcy5pZCwgdmFsdWUpKTsKICAgICAgICAgICAgdGhpcy5fc2VsZWN0LndyaXRlVmFsdWUodGhpcy5fc2VsZWN0LnZhbHVlKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIFRyYWNrcyBzaW1wbGUgc3RyaW5nIHZhbHVlcyBib3VuZCB0byB0aGUgb3B0aW9uIGVsZW1lbnQuCiAgICAgICAgICogRm9yIG9iamVjdHMsIHVzZSB0aGUgYG5nVmFsdWVgIGlucHV0IGJpbmRpbmcuCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IHZhbHVlKHZhbHVlKSB7CiAgICAgICAgICAgIHRoaXMuX3NldEVsZW1lbnRWYWx1ZSh2YWx1ZSk7CiAgICAgICAgICAgIGlmICh0aGlzLl9zZWxlY3QpCiAgICAgICAgICAgICAgICB0aGlzLl9zZWxlY3Qud3JpdGVWYWx1ZSh0aGlzLl9zZWxlY3QudmFsdWUpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3NldEVsZW1lbnRWYWx1ZSh2YWx1ZSkgewogICAgICAgICAgICB0aGlzLl9yZW5kZXJlci5zZXRQcm9wZXJ0eSh0aGlzLl9lbGVtZW50Lm5hdGl2ZUVsZW1lbnQsICd2YWx1ZScsIHZhbHVlKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIExpZmVjeWNsZSBtZXRob2QgY2FsbGVkIGJlZm9yZSB0aGUgZGlyZWN0aXZlJ3MgaW5zdGFuY2UgaXMgZGVzdHJveWVkLiBGb3IgaW50ZXJuYW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SkgewogICAgICAgIGlmIChpZCA9PSBudWxsKQogICAgICAgICAgICByZXR1cm4gYCR7dmFsdWV9YDsKICAgICAgICBpZiAodHlwZW9mIHZhbHVlID09PSAnc3RyaW5nJykKICAgICAgICAgICAgdmFsdWUgPSBgJyR7dmFsdWV9J2A7CiAgICAgICAgaWYgKHZhbHVlICYmIHR5cGVvZiB2YWx1ZSA9PT0gJ29iamVjdCcpCiAgICAgICAgICAgIHZhbHVlID0gJ09iamVjdCc7CiAgICAgICAgcmV0dXJuIGAke2lkfTogJHt2YWx1ZX1gLnNsaWNlKDAsIDUwKTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB2YWx1ZVN0cmluZwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gX2V4dHJhY3RJZCQxKHZhbHVlU3RyaW5nKSB7CiAgICAgICAgcmV0dXJuIHZhbHVlU3RyaW5nLnNwbGl0KCc6JylbMF07CiAgICB9CiAgICAvKioKICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAqIFRoZSBgQ29udHJvbFZhbHVlQWNjZXNzb3JgIGZvciB3cml0aW5nIG11bHRpLXNlbGVjdCBjb250cm9sIHZhbHVlcyBhbmQgbGlzdGVuaW5nIHRvIG11bHRpLXNlbGVjdAogICAgICogY29udHJvbCBjaGFuZ2VzLiBUaGUgdmFsdWUgYWNjZXNzb3IgaXMgdXNlZCBieSB0aGUgYEZvcm1Db250cm9sRGlyZWN0aXZlYCwgYEZvcm1Db250cm9sTmFtZWAsIGFuZAogICAgICogYE5nTW9kZWxgIGRpcmVjdGl2ZXMuCiAgICAgKgogICAgICogQHNlZSBgU2VsZWN0Q29udHJvbFZhbHVlQWNjZXNzb3JgCiAgICAgKgogICAgICogXEB1c2FnZU5vdGVzCiAgICAgKgogICAgICogIyMjIFVzaW5nIGEgbXVsdGktc2VsZWN0IGNvbnRyb2wKICAgICAqCiAgICAgKiBUaGUgZm9sbG93IGV4YW1wbGUgc2hvd3MgeW91IGhvdyB0byB1c2UgYSBtdWx0aS1zZWxlY3QgY29udHJvbCB3aXRoIGEgcmVhY3RpdmUgZm9ybS4KICAgICAqCiAgICAgKiBgYGB0cwogICAgICogY29uc3QgY291bnRyeUNvbnRyb2wgPSBuZXcgRm9ybUNvbnRyb2woKTsKICAgICAqIGBgYAogICAgICoKICAgICAqIGBgYAogICAgICogPHNlbGVjdCBtdWx0aXBsZSBuYW1lPSJjb3VudHJpZXMiIFtmb3JtQ29udHJvbF09ImNvdW50cnlDb250cm9sIj4KICAgICAqICAgPG9wdGlvbiAqbmdGb3I9ImxldCBjb3VudHJ5IG9mIGNvdW50cmllcyIgW25nVmFsdWVdPSJjb3VudHJ5Ij4KICAgICAqICAgICB7eyBjb3VudHJ5Lm5hbWUgfX0KICAgICAqICAgPC9vcHRpb24+CiAgICAgKiA8L3NlbGVjdD4KICAgICAqIGBgYAogICAgICoKICAgICAqICMjIyBDdXN0b21pemluZyBvcHRpb24gc2VsZWN0aW9uCiAgICAgKgogICAgICogVG8gY3VzdG9taXplIHRoZSBkZWZhdWx0IG9wdGlvbiBjb21wYXJpc29uIGFsZ29yaXRobSwgYDxzZWxlY3Q+YCBzdXBwb3J0cyBgY29tcGFyZVdpdGhgIGlucHV0LgogICAgICogU2VlIHRoZSBgU2VsZWN0Q29udHJvbFZhbHVlQWNjZXNzb3JgIGZvciB1c2FnZS4KICAgICAqCiAgICAgKiBcQG5nTW9kdWxlIFJlYWN0aXZlRm9ybXNNb2R1bGUKICAgICAqIFxAbmdNb2R1bGUgRm9ybXNNb2R1bGUKICAgICAqIFxAcHVibGljQXBpCiAgICAgKi8KICAgIGNsYXNzIFNlbGVjdE11bHRpcGxlQ29udHJvbFZhbHVlQWNjZXNzb3IgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gX3JlbmRlcmVyCiAgICAgICAgICogQHBhcmFtIHs/fSBfZWxlbWVudFJlZgogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKF9yZW5kZXJlciwgX2VsZW1lbnRSZWYpIHsKICAgICAgICAgICAgdGhpcy5fcmVuZGVyZXIgPSBfcmVuZGVyZXI7CiAgICAgICAgICAgIHRoaXMuX2VsZW1lbnRSZWYgPSBfZWxlbWVudFJlZjsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX29wdGlvbk1hcCA9IG5ldyBNYXAoKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX2lkQ291bnRlciA9IDA7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICAgICAqIFRoZSByZWdpc3RlcmVkIGNhbGxiYWNrIGZ1bmN0aW9uIGNhbGxlZCB3aGVuIGEgY2hhbmdlIGV2ZW50IG9jY3VycyBvbiB0aGUgaW5wdXQgZWxlbWVudC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMub25DaGFuZ2UgPSAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gXwogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKF8pID0+IHsgfSk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICAgICAqIFRoZSByZWdpc3RlcmVkIGNhbGxiYWNrIGZ1bmN0aW9uIGNhbGxlZCB3aGVuIGEgYmx1ciBldmVudCBvY2N1cnMgb24gdGhlIGlucHV0IGVsZW1lbnQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLm9uVG91Y2hlZCA9ICgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsgfSk7CiAgICAgICAgICAgIHRoaXMuX2NvbXBhcmVXaXRoID0gbG9vc2VJZGVudGljYWw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBUcmFja3MgdGhlIG9wdGlvbiBjb21wYXJpc29uIGFsZ29yaXRobSBmb3IgdHJhY2tpbmcgaWRlbnRpdGllcyB3aGVuCiAgICAgICAgICogY2hlY2tpbmcgZm9yIGNoYW5nZXMuCiAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IGNvbXBhcmVXaXRoKGZuKSB7CiAgICAgICAgICAgIGlmICh0eXBlb2YgZm4gIT09ICdmdW5jdGlvbicpIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgY29tcGFyZVdpdGggbXVzdCBiZSBhIGZ1bmN0aW9uLCBidXQgcmVjZWl2ZWQgJHtKU09OLnN0cmluZ2lmeShmbil9YCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fY29tcGFyZVdpdGggPSBmbjsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIFNldHMgdGhlICJ2YWx1ZSIgcHJvcGVydHkgb24gb25lIG9yIG9mIG1vcmUKICAgICAgICAgKiBvZiB0aGUgc2VsZWN0J3Mgb3B0aW9ucy4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUgVGhlIHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB3cml0ZVZhbHVlKHZhbHVlKSB7CiAgICAgICAgICAgIHRoaXMudmFsdWUgPSB2YWx1ZTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgb3B0aW9uU2VsZWN0ZWRTdGF0ZVNldHRlcjsKICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkodmFsdWUpKSB7CiAgICAgICAgICAgICAgICAvLyBjb252ZXJ0IHZhbHVlcyB0byBpZHMKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGlkcyA9IHZhbHVlLm1hcCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHYKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICh2KSA9PiB0aGlzLl9nZXRPcHRpb25JZCh2KSkpOwogICAgICAgICAgICAgICAgb3B0aW9uU2VsZWN0ZWRTdGF0ZVNldHRlciA9ICgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gb3B0CiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IG8KICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChvcHQsIG8pID0+IHsKICAgICAgICAgICAgICAgICAgICBvcHQuX3NldFNlbGVjdGVkKGlkcy5pbmRleE9mKG8udG9TdHJpbmcoKSkgPiAtMSk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIG9wdGlvblNlbGVjdGVkU3RhdGVTZXR0ZXIgPSAoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IG9wdAogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBvCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAob3B0LCBvKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgb3B0Ll9zZXRTZWxlY3RlZChmYWxzZSk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9vcHRpb25NYXAuZm9yRWFjaChvcHRpb25TZWxlY3RlZFN0YXRlU2V0dGVyKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIFJlZ2lzdGVycyBhIGZ1bmN0aW9uIGNhbGxlZCB3aGVuIHRoZSBjb250cm9sIHZhbHVlIGNoYW5nZXMKICAgICAgICAgKiBhbmQgd3JpdGVzIGFuIGFycmF5IG9mIHRoZSBzZWxlY3RlZCBvcHRpb25zLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/fSBmbiBUaGUgY2FsbGJhY2sgZnVuY3Rpb24KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlZ2lzdGVyT25DaGFuZ2UoZm4pIHsKICAgICAgICAgICAgdGhpcy5vbkNoYW5nZSA9ICgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoXykgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3Qgc2VsZWN0ZWQgPSBbXTsKICAgICAgICAgICAgICAgIGlmIChfLmhhc093blByb3BlcnR5KCdzZWxlY3RlZE9wdGlvbnMnKSkgewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBvcHRpb25zID0gXy5zZWxlY3RlZE9wdGlvbnM7CiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBvcHRpb25zLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgb3B0ID0gb3B0aW9ucy5pdGVtKGkpOwogICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHZhbCA9IHRoaXMuX2dldE9wdGlvblZhbHVlKG9wdC52YWx1ZSk7CiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkLnB1c2godmFsKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvLyBEZWdyYWRlIG9uIElFCiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3Qgb3B0aW9ucyA9ICgvKiogQHR5cGUgez99ICovIChfLm9wdGlvbnMpKTsKICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IG9wdGlvbnMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBvcHQgPSBvcHRpb25zLml0ZW0oaSk7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChvcHQuc2VsZWN0ZWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHZhbCA9IHRoaXMuX2dldE9wdGlvblZhbHVlKG9wdC52YWx1ZSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZC5wdXNoKHZhbCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLnZhbHVlID0gc2VsZWN0ZWQ7CiAgICAgICAgICAgICAgICBmbihzZWxlY3RlZCk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogUmVnaXN0ZXJzIGEgZnVuY3Rpb24gY2FsbGVkIHdoZW4gdGhlIGNvbnRyb2wgaXMgdG91Y2hlZC4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7P30gZm4gVGhlIGNhbGxiYWNrIGZ1bmN0aW9uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZWdpc3Rlck9uVG91Y2hlZChmbikgewogICAgICAgICAgICB0aGlzLm9uVG91Y2hlZCA9IGZuOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIHRoZSAiZGlzYWJsZWQiIHByb3BlcnR5IG9uIHRoZSBzZWxlY3QgaW5wdXQgZWxlbWVudC4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7P30gaXNEaXNhYmxlZCBUaGUgZGlzYWJsZWQgdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldERpc2FibGVkU3RhdGUoaXNEaXNhYmxlZCkgewogICAgICAgICAgICB0aGlzLl9yZW5kZXJlci5zZXRQcm9wZXJ0eSh0aGlzLl9lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQsICdkaXNhYmxlZCcsIGlzRGlzYWJsZWQpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3JlZ2lzdGVyT3B0aW9uKHZhbHVlKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaWQgPSAodGhpcy5faWRDb3VudGVyKyspLnRvU3RyaW5nKCk7CiAgICAgICAgICAgIHRoaXMuX29wdGlvbk1hcC5zZXQoaWQsIHZhbHVlKTsKICAgICAgICAgICAgcmV0dXJuIGlkOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2dldE9wdGlvbklkKHZhbHVlKSB7CiAgICAgICAgICAgIGZvciAoY29uc3QgaWQgb2YgQXJyYXkuZnJvbSh0aGlzLl9vcHRpb25NYXAua2V5cygpKSkgewogICAgICAgICAgICAgICAgaWYgKHRoaXMuX2NvbXBhcmVXaXRoKCgvKiogQHR5cGUgez99ICovICh0aGlzLl9vcHRpb25NYXAuZ2V0KGlkKSkpLl92YWx1ZSwgdmFsdWUpKQogICAgICAgICAgICAgICAgICAgIHJldHVybiBpZDsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWVTdHJpbmcKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9nZXRPcHRpb25WYWx1ZSh2YWx1ZVN0cmluZykgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGlkID0gX2V4dHJhY3RJZCQxKHZhbHVlU3RyaW5nKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX29wdGlvbk1hcC5oYXMoaWQpID8gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX29wdGlvbk1hcC5nZXQoaWQpKSkuX3ZhbHVlIDogdmFsdWVTdHJpbmc7CiAgICAgICAgfQogICAgfQogICAgU2VsZWN0TXVsdGlwbGVDb250cm9sVmFsdWVBY2Nlc3Nvci7JtWZhYyA9IGZ1bmN0aW9uIFNlbGVjdE11bHRpcGxlQ29udHJvbFZhbHVlQWNjZXNzb3JfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgU2VsZWN0TXVsdGlwbGVDb250cm9sVmFsdWVBY2Nlc3NvcikoybXJtWRpcmVjdGl2ZUluamVjdChSZW5kZXJlc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7CiAgICAgICAgICAgIGlmICh0aGlzLl9zZWxlY3QpIHsKICAgICAgICAgICAgICAgIHRoaXMuaWQgPSB0aGlzLl9zZWxlY3QuX3JlZ2lzdGVyT3B0aW9uKHRoaXMpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBUcmFja3MgdGhlIHZhbHVlIGJvdW5kIHRvIHRoZSBvcHRpb24gZWxlbWVudC4gVW5saWtlIHRoZSB2YWx1ZSBiaW5kaW5nLAogICAgICAgICAqIG5nVmFsdWUgc3VwcG9ydHMgYmluZGluZyB0byBvYmplY3RzLgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBuZ1ZhbHVlKHZhbHVlKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9zZWxlY3QgPT0gbnVsbCkKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgdGhpcy5fdmFsdWUgPSB2YWx1ZTsKICAgICAgICAgICAgdGhpcy5fc2V0RWxlbWVudFZhbHVlKF9idWlsZFZhbHVlU3RyaW5nJDEodGhpcy5pZCwgdmFsdWUpKTsKICAgICAgICAgICAgdGhpcy5fc2VsZWN0LndyaXRlVmFsdWUodGhpcy5fc2VsZWN0LnZhbHVlKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIFRyYWNrcyBzaW1wbGUgc3RyaW5nIHZhbHVlcyBib3VuZCB0byB0aGUgb3B0aW9uIGVsZW1lbnQuCiAgICAgICAgICogRm9yIG9iamVjdHMsIHVzZSB0aGUgYG5nVmFsdWVgIGlucHV0IGJpbmRpbmcuCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IHZhbHVlKHZhbHVlKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9zZWxlY3QpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3ZhbHVlID0gdmFsdWU7CiAgICAgICAgICAgICAgICB0aGlzLl9zZXRFbGVtZW50VmFsdWUoX2J1aWxkVmFsdWVTdHJpbmckMSh0aGlzLmlkLCB2YWx1ZSkpOwogICAgICAgICAgICAgICAgdGhpcy5fc2VsZWN0LndyaXRlVmFsdWUodGhpcy5fc2VsZWN0LnZhbHVlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuX3NldEVsZW1lbnRWYWx1ZSh2YWx1ZSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9zZXRFbGVtZW50VmFsdWUodmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5fcmVuZGVyZXIuc2V0UHJvcGVydHkodGhpcy5fZWxlbWVudC5uYXRpdmVFbGVtZW50LCAndmFsdWUnLCB2YWx1ZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgKiBAcGFyYW0gez99IHNlbGVjdGVkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfc2V0U2VsZWN0ZWQoc2VsZWN0ZWQpIHsKICAgICAgICAgICAgdGhpcy5fcmVuZGVyZXIuc2V0UHJvcGVydHkodGhpcy5fZWxlbWVudC5uYXRpdmVFbGVtZW50LCAnc2VsZWN0ZWQnLCBzZWxlY3RlZCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBMaWZlY3ljbGUgbWV0aG9kIGNhbGxlZCBiZWZv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qIEBwYXJhbSB7P30gaXNEaXNhYmxlZAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGlzRGlzYWJsZWQpID0+IHsKICAgICAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovICgoLyoqIEB0eXBlIHs/fSAqLyAoZGlyLnZhbHVlQWNjZXNzb3IpKS5zZXREaXNhYmxlZFN0YXRlKSkoaXNEaXNhYmxlZCk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLy8gcmUtcnVuIHZhbGlkYXRpb24gd2hlbiB2YWxpZGF0b3IgYmluZGluZyBjaGFuZ2VzLCBlLmcuIG1pbmxlbmd0aD0zIC0+IG1pbmxlbmd0aD00CiAgICAgICAgZGlyLl9yYXdWYWxpZGF0b3JzLmZvckVhY2goKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsaWRhdG9yCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAodmFsaWRhdG9yKSA9PiB7CiAgICAgICAgICAgIGlmICgoKC8qKiBAdHlwZSB7P30gKi8gKHZhbGlkYXRvcikpKS5yZWdpc3Rlck9uVmFsaWRhdG9yQ2hhbmdlKQogICAgICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKCgoLyoqIEB0eXBlIHs/fSAqLyAodmFsaWRhdG9yKSkpLnJlZ2lzdGVyT25WYWxpZGF0b3JDaGFuZ2UpKSgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiBjb250cm9sLnVwZGF0ZVZhbHVlQW5kVmFsaWRpdHkoKSkpOwogICAgICAgIH0pKTsKICAgICAgICBkaXIuX3Jhd0FzeW5jVmFsaWRhdG9ycy5mb3JFYWNoKCgvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbGlkYXRvcgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgKHZhbGlkYXRvcikgPT4gewogICAgICAgICAgICBpZiAoKCgvKiogQHR5cGUgez99ICovICh2YWxpZGF0b3IpKSkucmVnaXN0ZXJPblZhbGlkYXRvckNoYW5nZSkKICAgICAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovICgoKC8qKiBAdHlwZSB7P30gKi8gKHZhbGlkYXRvcikpKS5yZWdpc3Rlck9uVmFsaWRhdG9yQ2hhbmdlKSkoKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gY29udHJvbC51cGRhdGVWYWx1ZUFuZFZhbGlkaXR5KCkpKTsKICAgICAgICB9KSk7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gY29udHJvbAogICAgICogQHBhcmFtIHs/fSBkaXIKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGNsZWFuVXBDb250cm9sKGNvbnRyb2wsIGRpcikgewogICAgICAgICgvKiogQHR5cGUgez99ICovIChkaXIudmFsdWVBY2Nlc3NvcikpLnJlZ2lzdGVyT25DaGFuZ2UoKC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgKCkgPT4gX25vQ29udHJvbEVycm9yKGRpcikpKTsKICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAoZGlyLnZhbHVlQWNjZXNzb3IpKS5yZWdpc3Rlck9uVG91Y2hlZCgoLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAoKSA9PiBfbm9Db250cm9sRXJyb3IoZGlyKSkpOwogICAgICAgIGRpci5fcmF3VmFsaWRhdG9ycy5mb3JFYWNoKCgvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbGlkYXRvcgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgKHZhbGlkYXRvcikgPT4gewogICAgICAgICAgICBpZiAodmFsaWRhdG9yLnJlZ2lzdGVyT25WYWxpZGF0b3JDaGFuZ2UpIHsKICAgICAgICAgICAgICAgIHZhbGlkYXRvci5yZWdpc3Rlck9uVmFsaWRhdG9yQ2hhbmdlKG51bGwpOwogICAgICAgICAgICB9CiAgICAgICAgfSkpOwogICAgICAgIGRpci5fcmF3QXN5bmNWYWxpZGF0b3JzLmZvckVhY2goKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsaWRhdG9yCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAodmFsaWRhdG9yKSA9PiB7CiAgICAgICAgICAgIGlmICh2YWxpZGF0b3IucmVnaXN0ZXJPblZhbGlkYXRvckNoYW5nZSkgewogICAgICAgICAgICAgICAgdmFsaWRhdG9yLnJlZ2lzdGVyT25WYWxpZGF0b3JDaGFuZ2UobnVsbCk7CiAgICAgICAgICAgIH0KICAgICAgICB9KSk7CiAgICAgICAgaWYgKGNvbnRyb2wpCiAgICAgICAgICAgIGNvbnRyb2wuX2NsZWFyQ2hhbmdlRm5zKCk7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gY29udHJvbAogICAgICogQHBhcmFtIHs/fSBkaXIKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHNldFVwVmlld0NoYW5nZVBpcGVsaW5lKGNvbnRyb2wsIGRpcikgewogICAgICAgICgvKiogQHR5cGUgez99ICovIChkaXIudmFsdWVBY2Nlc3NvcikpLnJlZ2lzdGVyT25DaGFuZ2UoKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gbmV3VmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIChuZXdWYWx1ZSkgPT4gewogICAgICAgICAgICBjb250cm9sLl9wZW5kaW5nVmFsdWUgPSBuZXdWYWx1ZTsKICAgICAgICAgICAgY29udHJvbC5fcGVuZGluZ0NoYW5nZSA9IHRydWU7CiAgICAgICAgICAgIGNvbnRyb2wuX3BlbmRpbmdEaXJ0eSA9IHRydWU7CiAgICAgICAgICAgIGlmIChjb250cm9sLnVwZGF0ZU9uID09PSAnY2hhbmdlJykKICAgICAgICAgICAgICAgIHVwZGF0ZUNvbnRyb2woY29udHJvbCwgZGlyKTsKICAgICAgICB9KSk7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gY29udHJvbAogICAgICogQHBhcmFtIHs/fSBkaXIKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHNldFVwQmx1clBpcGVsaW5lKGNvbnRyb2wsIGRpcikgewogICAgICAgICgvKiogQHR5cGUgez99ICovIChkaXIudmFsdWVBY2Nlc3NvcikpLnJlZ2lzdGVyT25Ub3VjaGVkKCgvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgICgpID0+IHsKICAgICAgICAgICAgY29udHJvbC5fcGVuZGluZ1RvdWNoZWQgPSB0cnVlOwogICAgICAgICAgICBpZiAoY29udHJvbC51cGRhdGVPbiA9PT0gJ2JsdXInICYmIGNvbnRyb2wuX3BlbmRpbmdDaGFuZ2UpCiAgICAgICAgICAgICAgICB1cGRhdGVDb250cm9sKGNvbnRyb2wsIGRpcik7CiAgICAgICAgICAgIGlmIChjb250cm9sLnVwZGF0ZU9uICE9PSAnc3VibWl0JykKICAgICAgICAgICAgICAgIGNvbnRyb2wubWFya0FzVG91Y2hlZCgpOwogICAgICAgIH0pKTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBjb250cm9sCiAgICAgKiBAcGFyYW0gez99IGRpcgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gdXBkYXRlQ29udHJvbChjb250cm9sLCBkaXIpIHsKICAgICAgICBpZiAoY29udHJvbC5fcGVuZGluZ0RpcnR5KQogICAgICAgICAgICBjb250cm9sLm1hcmtBc0RpcnR5KCk7CiAgICAgICAgY29udHJvbC5zZXRWYWx1ZShjb250cm9sLl9wZW5kaW5nVmFsdWUsIHsgZW1pdE1vZGVsVG9WaWV3Q2hhbmdlOiBmYWxzZSB9KTsKICAgICAgICBkaXIudmlld1RvTW9kZWxVcGRhdGUoY29udHJvbC5fcGVuZGluZ1ZhbHVlKTsKICAgICAgICBjb250cm9sLl9wZW5kaW5nQ2hhbmdlID0gZmFsc2U7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gY29udHJvbAogICAgICogQHBhcmFtIHs/fSBkaXIKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHNldFVwTW9kZWxDaGFuZ2VQaXBlbGluZShjb250cm9sLCBkaXIpIHsKICAgICAgICBjb250cm9sLnJlZ2lzdGVyT25DaGFuZ2UoKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gbmV3VmFsdWUKICAgICAgICAgKiBAcGFyYW0gez99IGVtaXRNb2RlbEV2ZW50CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAobmV3VmFsdWUsIGVtaXRNb2RlbEV2ZW50KSA9PiB7CiAgICAgICAgICAgIC8vIGNvbnRyb2wgLT4gdmlldwogICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAoZGlyLnZhbHVlQWNjZXNzb3IpKS53cml0ZVZhbHVlKG5ld1ZhbHVlKTsKICAgICAgICAgICAgLy8gY29udHJvbCAtPiBuZ01vZGVsCiAgICAgICAgICAgIGlmIChlbWl0TW9kZWxFdmVudCkKICAgICAgICAgICAgICAgIGRpci52aWV3VG9Nb2RlbFVwZGF0ZShuZXdWYWx1ZSk7CiAgICAgICAgfSkpOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IGNvbnRyb2wKICAgICAqIEBwYXJhbSB7P30gZGlyCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBzZXRVcEZvcm1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W9kZWwpIHsKICAgICAgICBpZiAoIWNoYW5nZXMuaGFzT3duUHJvcGVydHkoJ21vZGVsJykpCiAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgY2hhbmdlID0gY2hhbmdlc1snbW9kZWwnXTsKICAgICAgICBpZiAoY2hhbmdlLmlzRmlyc3RDaGFuZ2UoKSkKICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgcmV0dXJuICFsb29zZUlkZW50aWNhbCh2aWV3TW9kZWwsIGNoYW5nZS5jdXJyZW50VmFsdWUpOwogICAgfQogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgQlVJTFRJTl9BQ0NFU1NPUlMgPSBbCiAgICAgICAgQ2hlY2tib3hDb250cm9sVmFsdWVBY2Nlc3NvciwKICAgICAgICBSYW5nZVZhbHVlQWNjZXNzb3IsCiAgICAgICAgTnVtYmVyVmFsdWVBY2Nlc3NvciwKICAgICAgICBTZWxlY3RDb250cm9sVmFsdWVBY2Nlc3NvciwKICAgICAgICBTZWxlY3RNdWx0aXBsZUNvbnRyb2xWYWx1ZUFjY2Vzc29yLAogICAgICAgIFJhZGlvQ29udHJvbFZhbHVlQWNjZXNzb3IsCiAgICBdOwogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHZhbHVlQWNjZXNzb3IKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGlzQnVpbHRJbkFjY2Vzc29yKHZhbHVlQWNjZXNzb3IpIHsKICAgICAgICByZXR1cm4gQlVJTFRJTl9BQ0NFU1NPUlMuc29tZSgoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBhCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBhID0+IHZhbHVlQWNjZXNzb3IuY29uc3RydWN0b3IgPT09IGEpKTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBmb3JtCiAgICAgKiBAcGFyYW0gez99IGRpcmVjdGl2ZXMKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHN5bmNQZW5kaW5nQ29udHJvbHMoZm9ybSwgZGlyZWN0aXZlcykgewogICAgICAgIGZvcm0uX3N5bmNQZW5kaW5nQ29udHJvbHMoKTsKICAgICAgICBkaXJlY3RpdmVzLmZvckVhY2goKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZGlyCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkaXIgPT4gewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGNvbnRyb2wgPSAoLyoqIEB0eXBlIHs/fSAqLyAoZGlyLmNvbnRyb2wpKTsKICAgICAgICAgICAgaWYgKGNvbnRyb2wudXBkYXRlT24gPT09ICdzdWJtaXQnICYmIGNvbnRyb2wuX3BlbmRpbmdDaGFuZ2UpIHsKICAgICAgICAgICAgICAgIGRpci52aWV3VG9Nb2RlbFVwZGF0ZShjb250cm9sLl9wZW5kaW5nVmFsdWUpOwogICAgICAgICAgICAgICAgY29udHJvbC5fcGVuZGluZ0NoYW5nZSA9IGZhbHNlOwogICAgICAgICAgICB9CiAgICAgICAgfSkpOwogICAgfQogICAgLy8gVE9ETzogdnNhdmtpbiByZW1vdmUgaXQgb25jZSBodHRwczovL2dpdGh1Yi5jb20vYW5ndWxhci9hbmd1bGFyL2lzc3Vlcy8zMDExIGlzIGltcGxlbWVudGVkCiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gZGlyCiAgICAgKiBAcGFyYW0gez99IHZhbHVlQWNjZXNzb3JzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBzZWxlY3RWYWx1ZUFjY2Vzc29yKGRpciwgdmFsdWVBY2Nlc3NvcnMpIHsKICAgICAgICBpZiAoIXZhbHVlQWNjZXNzb3JzKQogICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICBpZiAoIUFycmF5LmlzQXJyYXkodmFsdWVBY2Nlc3NvcnMpKQogICAgICAgICAgICBfdGhyb3dFcnJvcihkaXIsICdWYWx1ZSBhY2Nlc3NvciB3YXMgbm90IHByb3ZpZGVkIGFzIGFuIGFycmF5IGZvciBmb3JtIGNvbnRyb2wgd2l0aCcpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgZGVmYXVsdEFjY2Vzc29yID0gdW5kZWZpbmVkOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgYnVpbHRpbkFjY2Vzc29yID0gdW5kZWZpbmVkOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgY3VzdG9tQWNjZXNzb3IgPSB1bmRlZmluZWQ7CiAgICAgICAgdmFsdWVBY2Nlc3NvcnMuZm9yRWFjaCgoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAodikgPT4gewogICAgICAgICAgICBpZiAodi5jb25zdHJ1Y3RvciA9PT0gRGVmYXVsdFZhbHVlQWNjZXNzb3IpIHsKICAgICAgICAgICAgICAgIGRlZmF1bHRBY2Nlc3NvciA9IHY7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoaXNCdWlsdEluQWNjZXNzb3IodikpIHsKICAgICAgICAgICAgICAgIGlmIChidWlsdGluQWNjZXNzb3IpCiAgICAgICAgICAgICAgICAgICAgX3Rocm93RXJyb3IoZGlyLCAnTW9yZSB0aGFuIG9uZSBidWlsdC1pbiB2YWx1ZSBhY2Nlc3NvciBtYXRjaGVzIGZvcm0gY29udHJvbCB3aXRoJyk7CiAgICAgICAgICAgICAgICBidWlsdGluQWNjZXNzb3IgPSB2OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgaWYgKGN1c3RvbUFjY2Vzc29yKQogICAgICAgICAgICAgICAgICAgIF90aHJvd0Vycm9yKGRpciwgJ01vcmUgdGhhbiBvbmUgY3VzdG9tIHZhbHVlIGFjY2Vzc29yIG1hdGNoZXMgZm9ybSBjb250cm9sIHdpdGgnKTsKICAgICAgICAgICAgICAgIGN1c3RvbUFjY2Vzc29yID0gdjsKICAgICAgICAgICAgfQogICAgICAgIH0pKTsKICAgICAgICBpZiAoY3VzdG9tQWNjZXNzb3IpCiAgICAgICAgICAgIHJldHVybiBjdXN0b21BY2Nlc3NvcjsKICAgICAgICBpZiAoYnVpbHRpbkFjY2Vzc29yKQogICAgICAgICAgICByZXR1cm4gYnVpbHRpbkFjY2Vzc29yOwogICAgICAgIGlmIChkZWZhdWx0QWNjZXNzb3IpCiAgICAgICAgICAgIHJldHVybiBkZWZhdWx0QWNjZXNzb3I7CiAgICAgICAgX3Rocm93RXJyb3IoZGlyLCAnTm8gdmFsaWQgdmFsdWUgYWNjZXNzb3IgZm9yIGZvcm0gY29udHJvbCB3aXRoJyk7CiAgICAgICAgcmV0dXJuIG51bGw7CiAgICB9CiAgICAvKioKICAgICAqIEB0ZW1wbGF0ZSBUCiAgICAgKiBAcGFyYW0gez99IGxpc3QKICAgICAqIEBwYXJhbSB7P30gZWwKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHJlbW92ZURpcihsaXN0LCBlbCkgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBpbmRleCA9IGxpc3QuaW5kZXhPZihlbCk7CiAgICAgICAgaWYgKGluZGV4ID4gLTEpCiAgICAgICAgICAgIGxpc3Quc3BsaWNlKGluZGV4LCAxKTsKICAgIH0KICAgIC8vIFRPRE8oa2FyYSk6IHJlbW92ZSBhZnRlciBkZXByZWNhdGlvbiBwZXJpb2QKICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBuYW1lCiAgICAgKiBAcGFyYW0gez99IHR5cGUKICAgICAqIEBwYX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QogICAgICovCiAgICBjb25zdCBESVNBQkxFRCA9ICdESVNBQkxFRCc7CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gY29udHJvbAogICAgICogQHBhcmFtIHs/fSBwYXRoCiAgICAgKiBAcGFyYW0gez99IGRlbGltaXRlcgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gX2ZpbmQoY29udHJvbCwgcGF0aCwgZGVsaW1pdGVyKSB7CiAgICAgICAgaWYgKHBhdGggPT0gbnVsbCkKICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgaWYgKCFBcnJheS5pc0FycmF5KHBhdGgpKSB7CiAgICAgICAgICAgIHBhdGggPSBwYXRoLnNwbGl0KGRlbGltaXRlcik7CiAgICAgICAgfQogICAgICAgIGlmIChBcnJheS5pc0FycmF5KHBhdGgpICYmIHBhdGgubGVuZ3RoID09PSAwKQogICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICAvLyBOb3QgdXNpbmcgQXJyYXkucmVkdWNlIGhlcmUgZHVlIHRvIGEgQ2hyb21lIDgwIGJ1ZwogICAgICAgIC8vIGh0dHBzOi8vYnVncy5jaHJvbWl1bS5vcmcvcC9jaHJvbWl1bS9pc3N1ZXMvZGV0YWlsP2lkPTEwNDk5ODIKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IGNvbnRyb2xUb0ZpbmQgPSBjb250cm9sOwogICAgICAgIHBhdGguZm9yRWFjaCgoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBuYW1lCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAobmFtZSkgPT4gewogICAgICAgICAgICBpZiAoY29udHJvbFRvRmluZCBpbnN0YW5jZW9mIEZvcm1Hcm91cCkgewogICAgICAgICAgICAgICAgY29udHJvbFRvRmluZCA9IGNvbnRyb2xUb0ZpbmQuY29udHJvbHMuaGFzT3duUHJvcGVydHkoKC8qKiBAdHlwZSB7P30gKi8gKG5hbWUpKSkgPwogICAgICAgICAgICAgICAgICAgIGNvbnRyb2xUb0ZpbmQuY29udHJvbHNbbmFtZV0gOgogICAgICAgICAgICAgICAgICAgIG51bGw7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoY29udHJvbFRvRmluZCBpbnN0YW5jZW9mIEZvcm1BcnJheSkgewogICAgICAgICAgICAgICAgY29udHJvbFRvRmluZCA9IGNvbnRyb2xUb0ZpbmQuYXQoKC8qKiBAdHlwZSB7P30gKi8gKG5hbWUpKSkgfHwgbnVsbDsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIGNvbnRyb2xUb0ZpbmQgPSBudWxsOwogICAgICAgICAgICB9CiAgICAgICAgfSkpOwogICAgICAgIHJldHVybiBjb250cm9sVG9GaW5kOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez89fSB2YWxpZGF0b3JPck9wdHMKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGNvZXJjZVRvVmFsaWRhdG9yKHZhbGlkYXRvck9yT3B0cykgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCB2YWxpZGF0b3IgPSAoLyoqIEB0eXBlIHs/fSAqLyAoKGlzT3B0aW9uc09iaih2YWxpZGF0b3JPck9wdHMpID8gKCgvKiogQHR5cGUgez99ICovICh2YWxpZGF0b3JPck9wdHMpKSkudmFsaWRhdG9ycyA6CiAgICAgICAgICAgIHZhbGlkYXRvck9yT3B0cykpKTsKICAgICAgICByZXR1cm4gQXJyYXkuaXNBcnJheSh2YWxpZGF0b3IpID8gY29tcG9zZVZhbGlkYXRvcnModmFsaWRhdG9yKSA6IHZhbGlkYXRvciB8fCBudWxsOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez89fSBhc3luY1ZhbGlkYXRvcgogICAgICogQHBhcmFtIHs/PX0gdmFsaWRhdG9yT3JPcHRzCiA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zdHJ1Y3Rvcih2YWxpZGF0b3IsIGFzeW5jVmFsaWRhdG9yKSB7CiAgICAgICAgICAgIHRoaXMudmFsaWRhdG9yID0gdmFsaWRhdG9yOwogICAgICAgICAgICB0aGlzLmFzeW5jVmFsaWRhdG9yID0gYXN5bmNWYWxpZGF0b3I7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9vbkNvbGxlY3Rpb25DaGFuZ2UgPSAoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7IH0pOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQSBjb250cm9sIGlzIGBwcmlzdGluZWAgaWYgdGhlIHVzZXIgaGFzIG5vdCB5ZXQgY2hhbmdlZAogICAgICAgICAgICAgKiB0aGUgdmFsdWUgaW4gdGhlIFVJLgogICAgICAgICAgICAgKgogICAgICAgICAgICAgKiBAcmV0dXJuIFRydWUgaWYgdGhlIHVzZXIgaGFzIG5vdCB5ZXQgY2hhbmdlZCB0aGUgdmFsdWUgaW4gdGhlIFVJOyBjb21wYXJlIGBkaXJ0eWAuCiAgICAgICAgICAgICAqIFByb2dyYW1tYXRpYyBjaGFuZ2VzIHRvIGEgY29udHJvbCdzIHZhbHVlIGRvIG5vdCBtYXJrIGl0IGRpcnR5LgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5wcmlzdGluZSA9IHRydWU7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBUcnVlIGlmIHRoZSBjb250cm9sIGlzIG1hcmtlZCBhcyBgdG91Y2hlZGAuCiAgICAgICAgICAgICAqCiAgICAgICAgICAgICAqIEEgY29udHJvbCBpcyBtYXJrZWQgYHRvdWNoZWRgIG9uY2UgdGhlIHVzZXIgaGFzIHRyaWdnZXJlZAogICAgICAgICAgICAgKiBhIGBibHVyYCBldmVudCBvbiBpdC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMudG91Y2hlZCA9IGZhbHNlOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fb25EaXNhYmxlZENoYW5nZSA9IFtdOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBUaGUgcGFyZW50IGNvbnRyb2wuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgcGFyZW50KCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fcGFyZW50OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBIGNvbnRyb2wgaXMgYHZhbGlkYCB3aGVuIGl0cyBgc3RhdHVzYCBpcyBgVkFMSURgLgogICAgICAgICAqCiAgICAgICAgICogQHNlZSB7XEBsaW5rIEFic3RyYWN0Q29udHJvbC5zdGF0dXN9CiAgICAgICAgICoKICAgICAgICAgKiBAcmV0dXJuIHs/fSBUcnVlIGlmIHRoZSBjb250cm9sIGhhcyBwYXNzZWQgYWxsIG9mIGl0cyB2YWxpZGF0aW9uIHRlc3RzLAogICAgICAgICAqIGZhbHNlIG90aGVyd2lzZS4KICAgICAgICAgKi8KICAgICAgICBnZXQgdmFsaWQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLnN0YXR1cyA9PT0gVkFMSUQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEEgY29udHJvbCBpcyBgaW52YWxpZGAgd2hlbiBpdHMgYHN0YXR1c2AgaXMgYElOVkFMSURgLgogICAgICAgICAqCiAgICAgICAgICogQHNlZSB7XEBsaW5rIEFic3RyYWN0Q29udHJvbC5zdGF0dXN9CiAgICAgICAgICoKICAgICAgICAgKiBAcmV0dXJuIHs/fSBUcnVlIGlmIHRoaXMgY29udHJvbCBoYXMgZmFpbGVkIG9uZSBvciBtb3JlIG9mIGl0cyB2YWxpZGF0aW9uIGNoZWNrcywKICAgICAgICAgKiBmYWxzZSBvdGhlcndpc2UuCiAgICAgICAgICovCiAgICAgICAgZ2V0IGludmFsaWQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLnN0YXR1cyA9PT0gSU5WQUxJRDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQSBjb250cm9sIGlzIGBwZW5kaW5nYCB3aGVuIGl0cyBgc3RhdHVzYCBpcyBgUEVORElOR2AuCiAgICAgICAgICoKICAgICAgICAgKiBAc2VlIHtcQGxpbmsgQWJzdHJhY3RDb250cm9sLnN0YXR1c30KICAgICAgICAgKgogICAgICAgICAqIEByZXR1cm4gez99IFRydWUgaWYgdGhpcyBjb250cm9sIGlzIGluIHRoZSBwcm9jZXNzIG9mIGNvbmR1Y3RpbmcgYSB2YWxpZGF0aW9uIGNoZWNrLAogICAgICAgICAqIGZhbHNlIG90aGVyd2lzZS4KICAgICAgICAgKi8KICAgICAgICBnZXQgcGVuZGluZygpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuc3RhdHVzID09IFBFTkRJTkc7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEEgY29udHJvbCBpcyBgZGlzYWJsZWRgIHdoZW4gaXRzIGBzdGF0dXNgIGlzIGBESVNBQkxFRGAuCiAgICAgICAgICoKICAgICAgICAgKiBEaXNhYmxlZCBjb250cm9scyBhcmUgZXhlbXB0IGZyb20gdmFsaWRhdGlvbiBjaGVja3MgYW5kCiAgICAgICAgICogYXJlIG5vdCBpbmNsdWRlZCBpbiB0aGUgYWdncmVnYXRlIHZhbHVlIG9mIHRoZWlyIGFuY2VzdG9yCiAgICAgICAgICogY29udHJvbHMuCiAgICAgICAgICoKICAgICAgICAgKiBAc2VlIHtcQGxpbmsgQWJzdHJhY3RDb250cm9sLnN0YXR1c30KICAgICAgICAgKgogICAgICAgICAqIEByZXR1cm4gez99IFRydWUgaWYgdGhlIGNvbnRyb2wgaXMgZGlzYWJsZWQsIGZhbHNlIG90aGVyd2lzZS4KICAgICAgICAgKi8KICAgICAgICBnZXQgZGlzYWJsZWQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLnN0YXR1cyA9PT0gRElTQUJMRUQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEEgY29udHJvbCBpcyBgZW5hYmxlZGAgYXMgbG9uZyBhcyBpdHMgYHN0YXR1c2AgaXMgbm90IGBESVNBQkxFRGAuCiAgICAgICAgICoKICAgICAgICAgKiBAc2VlIHtcQGxpbmsgQWJzdHJhY3RDb250cm9sLnN0YXR1c30KICAgICAgICAgKgogICAgICAgICAqIEByZXR1cm4gez99IFRydWUgaWYgdGhlIGNvbnRyb2wgaGFzIGFueSBzdGF0dXMgb3RoZXIgdGhhbiAnRElTQUJMRUQnLAogICAgICAgICAqIGZhbHNlIGlmIHRoZSBzdGF0dXMgaXMgJ0RJU0FCTEVEJy4KICAgICAgICAgKgogICAgICAgICAqLwogICAgICAgIGdldCBlbmFibGVkKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5zdGF0dXMgIT09IERJU0FCTEVEOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBIGNvbnRyb2wgaXMgYGRpcnR5YCBpZiB0aGUgdXNlciBoYXMgY2hhbmdlZCB0aGUgdmFsdWUKICAgICAgICAgKiBpbiB0aGUgVUkuCiAgICAgICAgICoKICAgICAgICAgKiBAcmV0dXJuIHs/fSBUcnVlIGlmIHRoZSB1c2VyIGhhcyBjaGFuZ2VkIHRoZSB2YWx1ZSBvZiB0aGlzIGNvbnRyb2wgaW4gdGhlIFVJOyBjb21wYXJlIGBwcmlzdGluZWAuCiAgICAgICAgICogUHJvZ3JhbW1hdGljIGNoYW5nZXMgdG8gYSBjb250cm9sJ3MgdmFsdWUgZG8gbm90IG1hcmsgaXQgZGlydHkuCiAgICAgICAgICovCiAgICAgICAgZ2V0IGRpcnR5KCkgewogICAgICAgICAgICByZXR1cm4gIXRoaXMucHJpc3RpbmU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFRydWUgaWYgdGhlIGNvbnRyb2wgaGFzIG5vdCBiZWVuIG1hcmtlZCBhcyB0b3VjaGVkCiAgICAgICAgICoKICAgICAgICAgKiBBIGNvbnRyb2wgaXMgYHVudG91Y2hlZGAgaWYgdGhlIHVzZXIgaGFzIG5vdCB5ZXQgdHJpZ2dlcmVkCiAgICAgICAgICogYSBgYmx1cmAgZXZlbnQgb24gaXQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgdW50b3VjaGVkKCkgewogICAgICAgICAgICByZXR1cm4gIXRoaXMudG91Y2hlZDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmVwb3J0cyB0aGUgdXBkYXRlIHN0cmF0ZWd5IG9mIHRoZSBgQWJzdHJhY3RDb250cm9sYCAobWVhbmluZwogICAgICAgICAqIHRoZSBldmVudCBvbiB3aGljaCB0aGUgY29udHJvbCB1cGRhdGVzIGl0c2VsZikuCiAgICAgICAgICogUG9zc2libGUgdmFsdWVzOiBgJ2NoYW5nZSdgIHwgYCdibHVyJ2AgfCBgJ3N1Ym1pdCdgCiAgICAgICAgICogRGVmYXVsdCB2YWx1ZTogYCdjaGFuZ2UnYAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHVwZGF0ZU9uKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fdXBkYXRlT24gPyB0aGlzLl91cGRhdGVPbiA6ICh0aGlzLnBhcmVudCA/IHRoaXMucGFyZW50LnVwZGF0ZU9uIDogJ2NoYW5nZScpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIHRoZSBzeW5jaHJvbm91cyB2YWxpZGF0b3JzIHRoYXQgYXJlIGFjdGl2ZSBvbiB0aGlzIGNvbnRyb2wuICBDYWxsaW5nCiAgICAgICAgICogdGhpcyBv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hpcy5hc3luY1ZhbGlkYXRvciA9IGNvZXJjZVRvQXN5bmNWYWxpZGF0b3IobmV3VmFsaWRhdG9yKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogRW1wdGllcyBvdXQgdGhlIHN5bmMgdmFsaWRhdG9yIGxpc3QuCiAgICAgICAgICoKICAgICAgICAgKiBXaGVuIHlvdSBhZGQgb3IgcmVtb3ZlIGEgdmFsaWRhdG9yIGF0IHJ1biB0aW1lLCB5b3UgbXVzdCBjYWxsCiAgICAgICAgICogYHVwZGF0ZVZhbHVlQW5kVmFsaWRpdHkoKWAgZm9yIHRoZSBuZXcgdmFsaWRhdGlvbiB0byB0YWtlIGVmZmVjdC4KICAgICAgICAgKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgY2xlYXJWYWxpZGF0b3JzKCkgewogICAgICAgICAgICB0aGlzLnZhbGlkYXRvciA9IG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEVtcHRpZXMgb3V0IHRoZSBhc3luYyB2YWxpZGF0b3IgbGlzdC4KICAgICAgICAgKgogICAgICAgICAqIFdoZW4geW91IGFkZCBvciByZW1vdmUgYSB2YWxpZGF0b3IgYXQgcnVuIHRpbWUsIHlvdSBtdXN0IGNhbGwKICAgICAgICAgKiBgdXBkYXRlVmFsdWVBbmRWYWxpZGl0eSgpYCBmb3IgdGhlIG5ldyB2YWxpZGF0aW9uIHRvIHRha2UgZWZmZWN0LgogICAgICAgICAqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBjbGVhckFzeW5jVmFsaWRhdG9ycygpIHsKICAgICAgICAgICAgdGhpcy5hc3luY1ZhbGlkYXRvciA9IG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIE1hcmtzIHRoZSBjb250cm9sIGFzIGB0b3VjaGVkYC4gQSBjb250cm9sIGlzIHRvdWNoZWQgYnkgZm9jdXMgYW5kCiAgICAgICAgICogYmx1ciBldmVudHMgdGhhdCBkbyBub3QgY2hhbmdlIHRoZSB2YWx1ZS4KICAgICAgICAgKgogICAgICAgICAqIEBzZWUgYG1hcmtBc1VudG91Y2hlZCgpYCAvIGBtYXJrQXNEaXJ0eSgpYCAvIGBtYXJrQXNQcmlzdGluZSgpYAogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/PX0gb3B0cyBDb25maWd1cmF0aW9uIG9wdGlvbnMgdGhhdCBkZXRlcm1pbmUgaG93IHRoZSBjb250cm9sIHByb3BhZ2F0ZXMgY2hhbmdlcwogICAgICAgICAqIGFuZCBlbWl0cyBldmVudHMgYWZ0ZXIgbWFya2luZyBpcyBhcHBsaWVkLgogICAgICAgICAqICogYG9ubHlTZWxmYDogV2hlbiB0cnVlLCBtYXJrIG9ubHkgdGhpcyBjb250cm9sLiBXaGVuIGZhbHNlIG9yIG5vdCBzdXBwbGllZCwKICAgICAgICAgKiBtYXJrcyBhbGwgZGlyZWN0IGFuY2VzdG9ycy4gRGVmYXVsdCBpcyBmYWxzZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG1hcmtBc1RvdWNoZWQob3B0cyA9IHt9KSB7CiAgICAgICAgICAgICgoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpKS50b3VjaGVkID0gdHJ1ZTsKICAgICAgICAgICAgaWYgKHRoaXMuX3BhcmVudCAmJiAhb3B0cy5vbmx5U2VsZikgewogICAgICAgICAgICAgICAgdGhpcy5fcGFyZW50Lm1hcmtBc1RvdWNoZWQob3B0cyk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogTWFya3MgdGhlIGNvbnRyb2wgYW5kIGFsbCBpdHMgZGVzY2VuZGFudCBjb250cm9scyBhcyBgdG91Y2hlZGAuCiAgICAgICAgICogQHNlZSBgbWFya0FzVG91Y2hlZCgpYAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbWFya0FsbEFzVG91Y2hlZCgpIHsKICAgICAgICAgICAgdGhpcy5tYXJrQXNUb3VjaGVkKHsgb25seVNlbGY6IHRydWUgfSk7CiAgICAgICAgICAgIHRoaXMuX2ZvckVhY2hDaGlsZCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY29udHJvbAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGNvbnRyb2wpID0+IGNvbnRyb2wubWFya0FsbEFzVG91Y2hlZCgpKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIE1hcmtzIHRoZSBjb250cm9sIGFzIGB1bnRvdWNoZWRgLgogICAgICAgICAqCiAgICAgICAgICogSWYgdGhlIGNvbnRyb2wgaGFzIGFueSBjaGlsZHJlbiwgYWxzbyBtYXJrcyBhbGwgY2hpbGRyZW4gYXMgYHVudG91Y2hlZGAKICAgICAgICAgKiBhbmQgcmVjYWxjdWxhdGVzIHRoZSBgdG91Y2hlZGAgc3RhdHVzIG9mIGFsbCBwYXJlbnQgY29udHJvbHMuCiAgICAgICAgICoKICAgICAgICAgKiBAc2VlIGBtYXJrQXNUb3VjaGVkKClgIC8gYG1hcmtBc0RpcnR5KClgIC8gYG1hcmtBc1ByaXN0aW5lKClgCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez89fSBvcHRzIENvbmZpZ3VyYXRpb24gb3B0aW9ucyB0aGF0IGRldGVybWluZSBob3cgdGhlIGNvbnRyb2wgcHJvcGFnYXRlcyBjaGFuZ2VzCiAgICAgICAgICogYW5kIGVtaXRzIGV2ZW50cyBhZnRlciB0aGUgbWFya2luZyBpcyBhcHBsaWVkLgogICAgICAgICAqICogYG9ubHlTZWxmYDogV2hlbiB0cnVlLCBtYXJrIG9ubHkgdGhpcyBjb250cm9sLiBXaGVuIGZhbHNlIG9yIG5vdCBzdXBwbGllZCwKICAgICAgICAgKiBtYXJrcyBhbGwgZGlyZWN0IGFuY2VzdG9ycy4gRGVmYXVsdCBpcyBmYWxzZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG1hcmtBc1VudG91Y2hlZChvcHRzID0ge30pIHsKICAgICAgICAgICAgKCgvKiogQHR5cGUgez99ICovICh0aGlzKSkpLnRvdWNoZWQgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5fcGVuZGluZ1RvdWNoZWQgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5fZm9yRWFjaENoaWxkKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjb250cm9sCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoY29udHJvbCkgPT4gewogICAgICAgICAgICAgICAgY29udHJvbC5tYXJrQXNVbnRvdWNoZWQoeyBvbmx5U2VsZjogdHJ1ZSB9KTsKICAgICAgICAgICAgfSkpOwogICAgICAgICAgICBpZiAodGhpcy5fcGFyZW50ICYmICFvcHRzLm9ubHlTZWxmKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9wYXJlbnQuX3VwZGF0ZVRvdWNoZWQob3B0cyk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogTWFya3MgdGhlIGNvbnRyb2wgYXMgYGRpcnR5YC4gQSBjb250cm9sIGJlY29tZXMgZGlydHkgd2hlbgogICAgICAgICAqIHRoZSBjb250cm9sJ3MgdmFsdWUgaXMgY2hhbmdlZCB0aHJvdWdoIHRoZSBVSTsgY29tcGFyZSBgbWFya0FzVG91Y2hlZGAuCiAgICAgICAgICoKICAgICAgICAgKiBAc2VlIGBtYXJrQXNUb3VjaGVkKClgIC8gYG1hcmtBc1VudG91Y2hlZCgpYCAvIGBtYXJrQXNQcmlzdGluZSgpYAogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/PX0gb3B0cyBDb25maWd1cmF0aW9uIG9wdGlvbnMgdGhhdCBkZXRlcm1pbmUgaG93IHRoZSBjb250cm9sIHByb3BhZ2F0ZXMgY2hhbmdlcwogICAgICAgICAqIGFuZCBlbWl0cyBldmVudHMgYWZ0ZXIgbWFya2luZyBpcyBhcHBsaWVkLgogICAgICAgICAqICogYG9ubHlTZWxmYDogV2hlbiB0cnVlLCBtYXJrIG9ubHkgdGhpcyBjb250cm9sLiBXaGVuIGZhbHNlIG9yIG5vdCBzdXBwbGllZCwKICAgICAgICAgKiBtYXJrcyBhbGwgZGlyZWN0IGFuY2VzdG9ycy4gRGVmYXVsdCBpcyBmYWxzZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG1hcmtBc0RpcnR5KG9wdHMgPSB7fSkgewogICAgICAgICAgICAoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKSkucHJpc3RpbmUgPSBmYWxzZTsKICAgICAgICAgICAgaWYgKHRoaXMuX3BhcmVudCAmJiAhb3B0cy5vbmx5U2VsZikgewogICAgICAgICAgICAgICAgdGhpcy5fcGFyZW50Lm1hcmtBc0RpcnR5KG9wdHMpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIE1hcmtzIHRoZSBjb250cm9sIGFzIGBwcmlzdGluZWAuCiAgICAgICAgICoKICAgICAgICAgKiBJZiB0aGUgY29udHJvbCBoYXMgYW55IGNoaWxkcmVuLCBtYXJrcyBhbGwgY2hpbGRyZW4gYXMgYHByaXN0aW5lYCwKICAgICAgICAgKiBhbmQgcmVjYWxjdWxhdGVzIHRoZSBgcHJpc3RpbmVgIHN0YXR1cyBvZiBhbGwgcGFyZW50CiAgICAgICAgICogY29udHJvbHMuCiAgICAgICAgICoKICAgICAgICAgKiBAc2VlIGBtYXJrQXNUb3VjaGVkKClgIC8gYG1hcmtBc1VudG91Y2hlZCgpYCAvIGBtYXJrQXNEaXJ0eSgpYAogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/PX0gb3B0cyBDb25maWd1cmF0aW9uIG9wdGlvbnMgdGhhdCBkZXRlcm1pbmUgaG93IHRoZSBjb250cm9sIGVtaXRzIGV2ZW50cyBhZnRlcgogICAgICAgICAqIG1hcmtpbmcgaXMgYXBwbGllZC4KICAgICAgICAgKiAqIGBvbmx5U2VsZmA6IFdoZW4gdHJ1ZSwgbWFyayBvbmx5IHRoaXMgY29udHJvbC4gV2hlbiBmYWxzZSBvciBub3Qgc3VwcGxpZWQsCiAgICAgICAgICogbWFya3MgYWxsIGRpcmVjdCBhbmNlc3RvcnMuIERlZmF1bHQgaXMgZmFsc2UuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBtYXJrQXNQcmlzdGluZShvcHRzID0ge30pIHsKICAgICAgICAgICAgKCgvKiogQHR5cGUgez99ICovICh0aGlzKSkpLnByaXN0aW5lID0gdHJ1ZTsKICAgICAgICAgICAgdGhpcy5fcGVuZGluZ0RpcnR5ID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuX2ZvckVhY2hDaGlsZCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY29udHJvbAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGNvbnRyb2wpID0+IHsKICAgICAgICAgICAgICAgIGNvbnRyb2wubWFya0FzUHJpc3RpbmUoeyBvbmx5U2VsZjogdHJ1ZSB9KTsKICAgICAgICAgICAgfSkpOwogICAgICAgICAgICBpZiAodGhpcy5fcGFyZW50ICYmICFvcHRzLm9ubHlTZWxmKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9wYXJlbnQuX3VwZGF0ZVByaXN0aW5lKG9wdHMpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIE1hcmtzIHRoZSBjb250cm9sIGFzIGBwZW5kaW5nYC4KICAgICAgICAgKgogICAgICAgICAqIEEgY29udHJvbCBpcyBwZW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EZWZhdWx0IGlzIGZhbHNlLgogICAgICAgICAqICogYGVtaXRFdmVudGA6IFdoZW4gdHJ1ZSBvciBub3Qgc3VwcGxpZWQgKHRoZSBkZWZhdWx0KSwgYm90aCB0aGUgYHN0YXR1c0NoYW5nZXNgIGFuZAogICAgICAgICAqIGB2YWx1ZUNoYW5nZXNgCiAgICAgICAgICogb2JzZXJ2YWJsZXMgZW1pdCBldmVudHMgd2l0aCB0aGUgbGF0ZXN0IHN0YXR1cyBhbmQgdmFsdWUgd2hlbiB0aGUgY29udHJvbCBpcyBkaXNhYmxlZC4KICAgICAgICAgKiBXaGVuIGZhbHNlLCBubyBldmVudHMgYXJlIGVtaXR0ZWQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkaXNhYmxlKG9wdHMgPSB7fSkgewogICAgICAgICAgICAvLyBJZiBwYXJlbnQgaGFzIGJlZW4gbWFya2VkIGFydGlmaWNpYWxseSBkaXJ0eSB3ZSBkb24ndCB3YW50IHRvIHJlLWNhbGN1bGF0ZSB0aGUKICAgICAgICAgICAgLy8gcGFyZW50J3MgZGlydGluZXNzIGJhc2VkIG9uIHRoZSBjaGlsZHJlbi4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBza2lwUHJpc3RpbmVDaGVjayA9IHRoaXMuX3BhcmVudE1hcmtlZERpcnR5KG9wdHMub25seVNlbGYpOwogICAgICAgICAgICAoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKSkuc3RhdHVzID0gRElTQUJMRUQ7CiAgICAgICAgICAgICgoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpKS5lcnJvcnMgPSBudWxsOwogICAgICAgICAgICB0aGlzLl9mb3JFYWNoQ2hpbGQoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGNvbnRyb2wKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChjb250cm9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tlZCBhcnRpZmljaWFsbHkgZGlydHkgd2UgZG9uJ3Qgd2FudCB0byByZS1jYWxjdWxhdGUgdGhlCiAgICAgICAgICAgIC8vIHBhcmVudCdzIGRpcnRpbmVzcyBiYXNlZCBvbiB0aGUgY2hpbGRyZW4uCiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc2tpcFByaXN0aW5lQ2hlY2sgPSB0aGlzLl9wYXJlbnRNYXJrZWREaXJ0eShvcHRzLm9ubHlTZWxmKTsKICAgICAgICAgICAgKCgvKiogQHR5cGUgez99ICovICh0aGlzKSkpLnN0YXR1cyA9IFZBTElEOwogICAgICAgICAgICB0aGlzLl9mb3JFYWNoQ2hpbGQoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGNvbnRyb2wKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChjb250cm9sKSA9PiB7CiAgICAgICAgICAgICAgICBjb250cm9sLmVuYWJsZShPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sIG9wdHMpLCB7IG9ubHlTZWxmOiB0cnVlIH0pKTsKICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB0aGlzLnVwZGF0ZVZhbHVlQW5kVmFsaWRpdHkoeyBvbmx5U2VsZjogdHJ1ZSwgZW1pdEV2ZW50OiBvcHRzLmVtaXRFdmVudCB9KTsKICAgICAgICAgICAgdGhpcy5fdXBkYXRlQW5jZXN0b3JzKE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgb3B0cyksIHsgc2tpcFByaXN0aW5lQ2hlY2sgfSkpOwogICAgICAgICAgICB0aGlzLl9vbkRpc2FibGVkQ2hhbmdlLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGNoYW5nZUZuCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoY2hhbmdlRm4pID0+IGNoYW5nZUZuKGZhbHNlKSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gb3B0cwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3VwZGF0ZUFuY2VzdG9ycyhvcHRzKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9wYXJlbnQgJiYgIW9wdHMub25seVNlbGYpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3BhcmVudC51cGRhdGVWYWx1ZUFuZFZhbGlkaXR5KG9wdHMpOwogICAgICAgICAgICAgICAgaWYgKCFvcHRzLnNraXBQcmlzdGluZUNoZWNrKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fcGFyZW50Ll91cGRhdGVQcmlzdGluZSgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdGhpcy5fcGFyZW50Ll91cGRhdGVUb3VjaGVkKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBwYXJlbnQgU2V0cyB0aGUgcGFyZW50IG9mIHRoZSBjb250cm9sCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXRQYXJlbnQocGFyZW50KSB7CiAgICAgICAgICAgIHRoaXMuX3BhcmVudCA9IHBhcmVudDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmVjYWxjdWxhdGVzIHRoZSB2YWx1ZSBhbmQgdmFsaWRhdGlvbiBzdGF0dXMgb2YgdGhlIGNvbnRyb2wuCiAgICAgICAgICoKICAgICAgICAgKiBCeSBkZWZhdWx0LCBpdCBhbHNvIHVwZGF0ZXMgdGhlIHZhbHVlIGFuZCB2YWxpZGl0eSBvZiBpdHMgYW5jZXN0b3JzLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/PX0gb3B0cyBDb25maWd1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9ycyA9IHRoaXMuX3J1blZhbGlkYXRvcigpOwogICAgICAgICAgICAgICAgKCgvKiogQHR5cGUgez99ICovICh0aGlzKSkpLnN0YXR1cyA9IHRoaXMuX2NhbGN1bGF0ZVN0YXR1cygpOwogICAgICAgICAgICAgICAgaWYgKHRoaXMuc3RhdHVzID09PSBWQUxJRCB8fCB0aGlzLnN0YXR1cyA9PT0gUEVORElORykgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX3J1bkFzeW5jVmFsaWRhdG9yKG9wdHMuZW1pdEV2ZW50KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAob3B0cy5lbWl0RXZlbnQgIT09IGZhbHNlKSB7CiAgICAgICAgICAgICAgICAoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMudmFsdWVDaGFuZ2VzKSkpLmVtaXQodGhpcy52YWx1ZSk7CiAgICAgICAgICAgICAgICAoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuc3RhdHVzQ2hhbmdlcykpKS5lbWl0KHRoaXMuc3RhdHVzKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5fcGFyZW50ICYmICFvcHRzLm9ubHlTZWxmKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9wYXJlbnQudXBkYXRlVmFsdWVBbmRWYWxpZGl0eShvcHRzKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICogQHBhcmFtIHs/PX0gb3B0cwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3VwZGF0ZVRyZWVWYWxpZGl0eShvcHRzID0geyBlbWl0RXZlbnQ6IHRydWUgfSkgewogICAgICAgICAgICB0aGlzLl9mb3JFYWNoQ2hpbGQoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGN0cmwKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChjdHJsKSA9PiBjdHJsLl91cGRhdGVUcmVlVmFsaWRpdHkob3B0cykpKTsKICAgICAgICAgICAgdGhpcy51cGRhdGVWYWx1ZUFuZFZhbGlkaXR5KHsgb25seVNlbGY6IHRydWUsIGVtaXRFdmVudDogb3B0cy5lbWl0RXZlbnQgfSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfc2V0SW5pdGlhbFN0YXR1cygpIHsKICAgICAgICAgICAgKCgvKiogQHR5cGUgez99ICovICh0aGlzKSkpLnN0YXR1cyA9IHRoaXMuX2FsbENvbnRyb2xzRGlzYWJsZWQoKSA/IERJU0FCTEVEIDogVkFMSUQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfcnVuVmFsaWRhdG9yKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy52YWxpZGF0b3IgPyB0aGlzLnZhbGlkYXRvcih0aGlzKSA6IG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/PX0gZW1pdEV2ZW50CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfcnVuQXN5bmNWYWxpZGF0b3IoZW1pdEV2ZW50KSB7CiAgICAgICAgICAgIGlmICh0aGlzLmFzeW5jVmFsaWRhdG9yKSB7CiAgICAgICAgICAgICAgICAoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKSkuc3RhdHVzID0gUEVORElORzsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IG9icyA9IHRvT2JzZXJ2YWJsZSh0aGlzLmFzeW5jVmFsaWRhdG9yKHRoaXMpKTsKICAgICAgICAgICAgICAgIHRoaXMuX2FzeW5jVmFsaWRhdGlvblN1YnNjcmlwdGlvbiA9CiAgICAgICAgICAgICAgICAgICAgb2JzLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBlcnJvcnMKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgIChlcnJvcnMpID0+IHRoaXMuc2V0RXJyb3JzKGVycm9ycywgeyBlbWl0RXZlbnQgfSkpKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2NhbmNlbEV4aXN0aW5nU3Vic2NyaXB0aW9uKCkgewogICAgICAgICAgICBpZiAodGhpcy5fYXN5bmNWYWxpZGF0aW9uU3Vic2NyaXB0aW9uKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9hc3luY1ZhbGlkYXRpb25TdWJzY3JpcHRpb24udW5zdWJzY3JpYmUoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIGVycm9ycyBvbiBhIGZvcm0gY29udHJvbCB3aGVuIHJ1bm5pbmcgdmFsaWRhdGlvbnMgbWFudWFsbHksIHJhdGhlciB0aGFuIGF1dG9tYXRpY2FsbHkuCiAgICAgICAgICoKICAgICAgICAgKiBDYWxsaW5nIGBzZXRFcnJvcnNgIGFsc28gdXBkYXRlcyB0aGUgdmFsaWRpdHkgb2YgdGhlIHBhcmVudCBjb250cm9sLgogICAgICAgICAqCiAgICAgICAgICogXEB1c2FnZU5vdGVzCiAgICAgICAgICoKICAgICAgICAgKiAjIyMgTWFudWFsbHkgc2V0IHRoZSBlcnJvcnMgZm9yIGEgY29udHJvbAogICAgICAgICAqCiAgICAgICAgICogYGBgCiAgICAgICAgICogY29uc3QgbG9naW4gPSBuZXcgRm9ybUNvbnRyb2woJ3NvbWVMb2dpbicpOwogICAgICAgICAqIGxvZ2luLnNldEVycm9ycyh7CiAgICAgICAgICogICBub3RVbmlxdWU6IHRydWUKICAgICAgICAgKiB9KTsKICAgICAgICAgKgogICAgICAgICAqIGV4cGVjdChsb2dpbi52YWxpZCkudG9FcXVhbChmYWxzZSk7CiAgICAgICAgICogZXhwZWN0KGxvZ2luLmVycm9ycykudG9FcXVhbCh7IG5vdFVuaXF1ZTogdHJ1ZSB9KTsKICAgICAgICAgKgogICAgICAgICAqIGxvZ2luLnNldFZhbHVlKCdzb21lT3RoZXJMb2dpbicpOwogICAgICAgICAqCiAgICAgICAgICogZXhwZWN0KGxvZ2luLnZhbGlkKS50b0VxdWFsKHRydWUpOwogICAgICAgICAqIGBgYAogICAgICAgICAqIEBwYXJhbSB7P30gZXJyb3JzCiAgICAgICAgICogQHBhcmFtIHs/PX0gb3B0cwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0RXJyb3JzKGVycm9ycywgb3B0cyA9IHt9KSB7CiAgICAgICAgICAgICgoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpKS5lcnJvcnMgPSBlcnJvcnM7CiAgICAgICAgICAgIHRoaXMuX3VwZGF0ZUNvbnRyb2xzRXJyb3JzKG9wdHMuZW1pdEV2ZW50ICE9PSBmYWxzZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJldHJpZXZlcyBhIGNoaWxkIGNvbnRyb2wgZ2l2ZW4gdGhlIGNvbnRyb2wncyBuYW1lIG9yIHBhdGguCiAgICAgICAgICoKICAgICAgICAgKiBcQHVzYWdlTm90ZXMKICAgICAgICAgKiAjIyMgUmV0cmlldmUgYSBuZXN0ZWQgY29udHJvbAogICAgICAgICAqCiAgICAgICAgICogRm9yIGV4YW1wbGUsIHRvIGdldCBhIGBuYW1lYCBjb250cm9sIG5lc3RlZCB3aXRoaW4gYSBgcGVyc29uYCBzdWItZ3JvdXA6CiAgICAgICAgICoKICAgICAgICAgKiAqIGB0aGlzLmZvcm0uZ2V0KCdwZXJzb24ubmFtZScpO2AKICAgICAgICAgKgogICAgICAgICAqIC1PUi0KICAgICAgICAgKgogICAgICAgICAqICogYHRoaXMuZm9ybS5nZXQoWydwZXJzb24nLCAnbmFtZSddKTtgCiAgICAgICAgICogQHBhcmFtIHs/fSBwYXRoIEEgZG90LWRlbGltaXRlZCBzdHJpbmcgb3IgYXJyYXkgb2Ygc3RyaW5nL251bWJlciB2YWx1ZXMgdGhhdCBkZWZpbmUgdGhlIHBhdGggdG8gdGhlCiAgICAgICAgICogY29udHJvbC4KICAgICAgICAgKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0KHBhdGgpIHsKICAgICAgICAgICAgcmV0dXJuIF9maW5kKHRoaXMsIHBhdGgsICcuJyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBSZXBvcnRzIGVycm9yIGRhdGEgZm9yIHRoZSBjb250cm9sIHdpdGggdGhlIGdpdmVuIHBhdGguCiAgICAgICAgICoKICAgICAgICAgKiBcQHVzYWdlTm90ZXMKICAgICAgICAgKiBGb3IgZXhhbXBsZSwgZm9yIHRoZSBmb2xsb3dpbmcgYEZvcm1Hcm91cGA6CiAgICAgICAgICoKICAgICAgICAgKiBgYGAKICAgICAgICAgKiBmb3JtID0gbmV3IEZvcm1Hcm91cCh7CiAgICAgICAgICogICBhZGRyZXNzOiBuZXcgRm9ybUdyb3VwKHsgc3RyZWV0OiBuZXcgRm9ybUNvbnRyb2woKSB9KQogICAgICAgICAqIH0pOwogICAgICAgICAqIGBgYAogICAgICAgICAqCiAgICAgICAgICogVGhlIHBhdGggdG8gdGhlICdzdHJlZXQnIGNvbnRyb2wgZnJvbSB0aGUgcm9vdCBmb3JtIHdvdWxkIGJlICdhZGRyZXNzJyAtPiAnc3RyZWV0Jy4KICAgICAgICAgKgogICAgICAgICAqIEl0IGNhbiBiZSBwcm92aWRlZCB0byB0aGlzIG1ldGhvZCBpbiBvbmUgb2YgdHdvIGZvcm1hdHM6CiAgICAgICAgICoKICAgICAgICAgKiAxLiBBbiBhcnJheSBvZiBzdHJpbmcgY29udHJvbCBuYW1lcywgZS5nLiBgWydhZGRyZXNzJywgJ3N0cmVldCddYAogICAgICAgICAqIDEuIEEgcGVyaW9kLWRlbGltaXRlZCBsaXN0IG9mIGNvbnRyb2wgbmFtZXMgaW4gb25lIHN0cmluZywgZS5nLiBgJ2FkZHJlc3Muc3RyZWV0J2AKICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7P30gZXJyb3JDb2RlIFRoZSBjb2RlIG9mIHRoZSBlcnJvciB0byBjaGVjawogICAgICAgICAqIEBwYXJhbSB7Pz19IHBhdGggQSBsaXN0IG9mIGNvbnRyb2wgbmFtZXMgdGhhdCBkZXNpZ25hdGVzIGhvdyB0byBtb3ZlIGZyb20gdGhlIGN1cnJlbnQgY29udHJvbAogICAgICAgICAqIHRvIHRoZSBjb250cm9sIHRoYXQgc2hvdWxkIGJlIHF1ZXJpZWQgZm9yIGVycm9ycy4KICAgICAgICAgKgogICAgICAgICAqIEByZXR1cm4gez99IGVycm9yIGRhdGEgZm9yIHRoYXQgcGFydGljdWxhciBlcnJvci4gSWYgdGhlIGNvbnRyb2wgb3IgZXJyb3IgaXMgbm90IHByZXNlbnQsCiAgICAgICAgICogbnVsbCBpcyByZXR1cm5lZC4KICAgICAgICAgKi8KICAgICAgICBnZXRFcnJvcihlcnJvckNvZGUsIHBhdGgpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjb250cm9sID0gcGF0aCA/IHRoaXMuZ2V0KHBhdGgpIDogdGhpczsKICAgICAgICAgICAgcmV0dXJuIGNvbnRyb2wgJiYgY29udHJvbC5lcnJvcnMgPyBjb250cm9sLmVycm9yc1tlcnJvckNvZGVdIDogbnVsbDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIFJlcG9ydHMgd2hldGhlciB0aGUgY29udHJvbCB3aXRoIHRoZSBnaXZlbiBwYXRoIGhhcyB0aGUgZXJyb3Igc3BlY2lmaWVkLgogICAgICAgICAqCiAgICAgICAgICogXEB1c2FnZU5vdGVzCiAgICAgICAgICogRm9yIGV4YW1wbGUsIGZvciB0aGUgZm9sbG93aW5nIGBGb3JtR3JvdXBgOgogICAgICAgICAqCiAgICAgICAgICogYGBgCiAgICAgICAgICogZm9ybSA9IG5ldyBGb3JtR3JvdXAoewogICAgICAgICAqICAgYWRkcmVzczogbmV3IEZvcm1Hcm91cCh7IHN0cmVldDogbmV3IEZvcm1Db250cm9sKCkgfSkKICAgICAgICAgKiB9KTsKICAgICAgICAgKiBgYGAKICAgICAgICAgKgogICAgICAgICAqIFRoZSBwYXRoIHRvIHRoZSAnc3RyZWV0JyBjb250cm9sIGZyb20gdGhlIHJvb3QgZm9ybSB3b3VsZCBiZSAnYWRkcmVzcycgLT4gJ3N0cmVldCcuCiAgICAgICAgICoKICAgICAgICAgKiBJdCBjYW4gYmUgcHJvdmlkZWQgdG8gdGhpcyBtZXRob2QgaW4gb25lIG9mIHR3byBmb3JtYXRzOgogICAgICAgICAqCiAgICAgICAgICogMS4gQW4gYXJyYXkgb2Ygc3RyaW5nIGNvbnRyb2wgbmFtZXMsIGUuZy4gYFsnYWRkcmVzcycsICdzdHJlZXQnXWAKICAgICAgICAgKiAxLiBBIHBlcmlvZC1kZWxpbWl0ZWQgbGlzdCBvZiBjb250cm9sIG5hbWVzIGluIG9uZSBzdHJpbmcsIGUuZy4gYCdhZGRyZXNzLnN0cmVldCdgCiAgICAgICAgICoKICAgICAgICAgKiBJZiBubyBwYXRoIGlzIGdpdmVuLCB0aGlzIG1ldGhvZCBjaGVja3MgZm9yIHRoZSBlcnJvciBvbiB0aGUgY3VycmVudCBjb250cm9sLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/fSBlcnJvckNvZGUgVGhlIGNvZGUgb2YgdGhlIGVycm9yIHRvIGNoZWNrCiAgICAgICAgICogQHBhcmFtIHs/PX0gcGF0aCBBIGxpc3Qgb2YgY29udHJvbCBuYW1lcyB0aGF0IGRlc2lnbmF0ZXMgaG93IHRvIG1vdmUgZnJvbSB0aGUgY3VycmVudCBjb250cm9sCiAgICAgICAgICogdG8gdGhlIGNvbnRyb2wgdGhhdCBzaG91bGQgYmUgcXVlcmllZCBmb3IgZXJyb3JzLgogICAgICAgICAqCiAgICAgICAgICogQHJldHVybiB7P30gd2hldGhlciB0aGUgZ2l2ZW4gZXJyb3IgaXMgcHJlc2VudCBpbiB0aGUgY29udHJvbCBhdCB0aGUgZ2l2ZW4gcGF0aC4KICAgICAgICAgKgogICAgICAgICAqIElmIHRoZSBjb250cm9sIGlzIG5vdCBwcmVzZW50LCBmYWxzZSBpcyByZXR1cm5lZC4KICAgICAgICAgKi8KICAgICAgICBoYXNFcnJvcihlcnJvckNvZGUsIHBhdGgpIHsKICAgICAgICAgICAgcmV0dXJuICEhdGhpcy5nZXRFcnJvcihlcnJvckNvZGUsIHBhdGgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZXRyaWV2ZXMgdGhlIHRvcC1sZXZlbCBhbmNlc3RvciBvZiB0aGlzIGNvbnRyb2wuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgcm9vdCgpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgeCA9IHRoaXM7CiAgICAgICAgICAgIHdoaWxlICh4Ll9wYXJlbnQpIHsKICAgICAgICAgICAgICAgIHggPSB4Ll9wYXJlbnQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHg7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgKiBAcGFyYW0gez99IGVtaXRFdmVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3VwZGF0ZUNvbnRyb2xzRXJyb3JzKGVtaXRFdmVudCkgewogICAgICAgICAgICAoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKSkuc3RhdHVzID0gdGhpcy5fY2FsY3VsYXRlU3RhdHVzKCk7CiAgICAgICAgICAgIGlmIChlbWl0RXZlbnQpIHsKICAgICAgICAgICAgICAgICgoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5zdGF0dXNDaGFuZ2VzKSkpLmVtaXQodGhpcy5zdGF0dXMpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0aGlzLl9wYXJlbnQpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3BhcmVudC5fdXBkYXRlQ29udHJvbHNFcnJvcnMoZW1pdEV2ZW50KTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfaW5pdE9ic2VydmFibGVzKCkgewogICAgICAgICAgICAoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKSkudmFsdWVDaGFuZ2VzID0gbmV3IEV2ZW50RW1pdHRlcigpOwogICAgICAgICAgICAoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKSkuc3RhdHVzQ2hhbmdlcyA9IG5ldyBFdmVudEVtaXR0ZXIoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9jYWxjdWxhdGVTdGF0dXMoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9hbGxDb250cm9sc0Rpc2FibGVkKCkpCiAgICAgICAgICAgICAgICByZXR1cm4gRElTQUJMRUQ7CiAgICAgICAgICAgIGlmICh0aGlzLmVycm9ycykKICAgICAgICAgICAgICAgIHJldHVybiBJTlZBTElEOwogICAgICAgICAgICBpZiAodGhpcy5fYW55Q29udHJvbHNIYXZlU3RhdHVzKFBFTkRJTkcpKQogICAgICAgICAgICAgICAgcmV0dXJuIFBFTkRJTkc7CiAgICAgICAgICAgIGlmICh0aGlzLl9hbnlDb250cm9sc0hhdmVTdGF0dXMoSU5WQUxJRCkpCiAgICAgICAgICAgICAgICByZXR1cm4gSU5WQUxJRDsKICAgICAgICAgICAgcmV0dXJuIFZBTElEOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICogQHBhcmFtIHs/fSBzdGF0dXMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9hbnlDb250cm9sc0hhdmVTdGF0dXMoc3RhdHVzKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9hbnlDb250cm9scygoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY29udHJvbAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGNvbnRyb2wpID0+IGNvbnRyb2wuc3RhdHVzID09PSBzdGF0dXMpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2FueUNvbnRyb2xzRGlydHkoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9hbnlDb250cm9scygoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY29udHJvbAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGNvbnRyb2wpID0+IGNvbnRyb2wuZGlydHkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2FueUNvbnRyb2xzVG91Y2hlZCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2FueUNvbnRyb2xzKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjb250cm9sCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoY29udHJvbCkgPT4gY29udHJvbC50b3VjaGVkKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgKiBAcGFyYW0gez89fSBvcHRzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfdXBkYXRlUHJpc3RpbmUob3B0cyA9IHt9KSB7CiAgICAgICAgICAgICgoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpKS5wcmlzdGluZSA9ICF0aGlzLl9hbnlDb250cm9sc0RpcnR5KCk7CiAgICAgICAgICAgIGlmICh0aGlzLl9wYXJlbnQgJiYgIW9wdHMub25seVNlbGYpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3BhcmVudC5fdXBkYXRlUHJpc3RpbmUob3B0cyk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7Pz19IG9wdHMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF91cGRhdGVUb3VjaGVkKG9wdHMgPSB7fSkgewogICAgICAgICAgICAoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKSkudG91Y2hlZCA9IHRoaXMuX2FueUNvbnRyb2xzVG91Y2hlZCgpOwogICAgICAgICAgICBpZiAodGhpcy5fcGFyZW50ICYmICFvcHRzLm9ubHlTZWxmKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9wYXJlbnQuX3VwZGF0ZVRvdWNoZWQob3B0cyk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7P30gZm9ybVN0YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfaXNCb3hlZFZhbHVlKGZvcm1TdGF0ZSkgewogICAgICAgICAgICByZXR1cm4gdHlwZW9mIGZvcm1TdGF0ZSA9PT0gJ29iamVjdCcgJiYgZm9ybVN0YXRlICE9PSBudWxsICYmCiAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyhmb3JtU3RhdGUpLmxlbmd0aCA9PT0gMiAmJiAndmFsdWUnIGluIGZvcm1TdGF0ZSAmJiAnZGlzYWJsZWQnIGluIGZvcm1TdGF0ZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9yZWdpc3Rlck9uQ29sbGVjdGlvbkNoYW5nZShmbikgewogICAgICAgICAgICB0aGlzLl9vbkNvbGxlY3Rpb25DaGFuZ2UgPSBmbjsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7Pz19IG9wdHMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9zZXRVcGRhdGVTdHJhdGVneShvcHRzKSB7CiAgICAgICAgICAgIGlmIChpc09wdGlvbnNPYmoob3B0cykgJiYgKCgvKiogQHR5cGUgez99ICovIChvcHRzKSkpLnVwZGF0ZU9uICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3VwZGF0ZU9uID0gKC8qKiBAdHlwZSB7P30gKi8gKCgoLyoqIEB0eXBlIHs/fSAqLyAob3B0cykpKS51cGRhdGVPbikpOwogICA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qIFNldCB0aGUgYHVwZGF0ZU9uYCBvcHRpb24gdG8gYCdzdWJtaXQnYCB0byB1cGRhdGUgb24gYSBzdWJtaXQgYGV2ZW50YC4KICAgICAqCiAgICAgKiBgYGB0cwogICAgICogY29uc3QgY29udHJvbCA9IG5ldyBGb3JtQ29udHJvbCgnJywgeyB1cGRhdGVPbjogJ3N1Ym1pdCcgfSk7CiAgICAgKiBgYGAKICAgICAqCiAgICAgKiAjIyMgUmVzZXQgdGhlIGNvbnRyb2wgYmFjayB0byBhbiBpbml0aWFsIHZhbHVlCiAgICAgKgogICAgICogWW91IHJlc2V0IHRvIGEgc3BlY2lmaWMgZm9ybSBzdGF0ZSBieSBwYXNzaW5nIHRocm91Z2ggYSBzdGFuZGFsb25lCiAgICAgKiB2YWx1ZSBvciBhIGZvcm0gc3RhdGUgb2JqZWN0IHRoYXQgY29udGFpbnMgYm90aCBhIHZhbHVlIGFuZCBhIGRpc2FibGVkIHN0YXRlCiAgICAgKiAodGhlc2UgYXJlIHRoZSBvbmx5IHR3byBwcm9wZXJ0aWVzIHRoYXQgY2Fubm90IGJlIGNhbGN1bGF0ZWQpLgogICAgICoKICAgICAqIGBgYHRzCiAgICAgKiBjb25zdCBjb250cm9sID0gbmV3IEZvcm1Db250cm9sKCdOYW5jeScpOwogICAgICoKICAgICAqIGNvbnNvbGUubG9nKGNvbnRyb2wudmFsdWUpOyAvLyAnTmFuY3knCiAgICAgKgogICAgICogY29udHJvbC5yZXNldCgnRHJldycpOwogICAgICoKICAgICAqIGNvbnNvbGUubG9nKGNvbnRyb2wudmFsdWUpOyAvLyAnRHJldycKICAgICAqIGBgYAogICAgICoKICAgICAqICMjIyBSZXNldCB0aGUgY29udHJvbCBiYWNrIHRvIGFuIGluaXRpYWwgdmFsdWUgYW5kIGRpc2FibGVkCiAgICAgKgogICAgICogYGBgCiAgICAgKiBjb25zdCBjb250cm9sID0gbmV3IEZvcm1Db250cm9sKCdOYW5jeScpOwogICAgICoKICAgICAqIGNvbn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BzdXBwbGllZCAodGhlIGRlZmF1bHQpLCBlYWNoIGNoYW5nZSB0cmlnZ2VycyBhbgogICAgICAgICAqIGBuZ01vZGVsQ2hhbmdlYAogICAgICAgICAqIGV2ZW50IHRvIHVwZGF0ZSB0aGUgbW9kZWwuCiAgICAgICAgICoKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldFZhbHVlKHZhbHVlLCBvcHRpb25zID0ge30pIHsKICAgICAgICAgICAgKCgvKiogQHR5cGUgez99ICovICh0aGlzKSkpLnZhbHVlID0gdGhpcy5fcGVuZGluZ1ZhbHVlID0gdmFsdWU7CiAgICAgICAgICAgIGlmICh0aGlzLl9vbkNoYW5nZS5sZW5ndGggJiYgb3B0aW9ucy5lbWl0TW9kZWxUb1ZpZXdDaGFuZ2UgIT09IGZhbHNlKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9vbkNoYW5nZS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY2hhbmdlRm4KICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChjaGFuZ2VGbikgPT4gY2hhbmdlRm4odGhpcy52YWx1ZSwgb3B0aW9ucy5lbWl0Vmlld1RvTW9kZWxDaGFuZ2UgIT09IGZhbHNlKSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMudXBkYXRlVmFsdWVBbmRWYWxpZGl0eShvcHRpb25zKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUGF0Y2hlcyB0aGUgdmFsdWUgb2YgYSBjb250cm9sLgogICAgICAgICAqCiAgICAgICAgICogVGhpcyBmdW5jdGlvbiBpcyBmdW5jdGlvbmFsbHkgdGhlIHNhbWUgYXMge1xAbGluayBGb3JtQ29udHJvbCNzZXRWYWx1ZSBzZXRWYWx1ZX0gYXQgdGhpcyBsZXZlbC4KICAgICAgICAgKiBJd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dlcy4KICAgICAgICAgKgogICAgICAgICAqICogYG9ubHlTZWxmYDogV2hlbiB0cnVlLCBlYWNoIGNoYW5nZSBvbmx5IGFmZmVjdHMgdGhpcyBjb250cm9sLCBhbmQgbm90IGl0cyBwYXJlbnQuIERlZmF1bHQgaXMKICAgICAgICAgKiBmYWxzZS4KICAgICAgICAgKiAqIGBlbWl0RXZlbnRgOiBXaGVuIHRydWUgb3Igbm90IHN1cHBsaWVkICh0aGUgZGVmYXVsdCksIGJvdGggdGhlIGBzdGF0dXNDaGFuZ2VzYCBhbmQKICAgICAgICAgKiBgdmFsdWVDaGFuZ2VzYAogICAgICAgICAqIG9ic2VydmFibGVzIGVtaXQgZXZlbnRzIHdpdGggdGhlIGxhdGVzdCBzdGF0dXMgYW5kIHZhbHVlIHdoZW4gdGhlIGNvbnRyb2wgaXMgcmVzZXQuCiAgICAgICAgICogV2hlbiBmYWxzZSwgbm8gZXZlbnRzIGFyZSBlbWl0dGVkLgogICAgICAgICAqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZXNldChmb3JtU3RhdGUgPSBudWxsLCBvcHRpb25zID0ge30pIHsKICAgICAgICAgICAgdGhpcy5fYXBwbHlGb3JtU3RhdGUoZm9ybVN0YXRlKTsKICAgICAgICAgICAgdGhpcy5tYXJrQXNQcmlzdGluZShvcHRpb25zKTsKICAgICAgICAgICAgdGhpcy5tYXJrQXNVbnRvdWNoZWQob3B0aW9ucyk7CiAgICAgICAgICAgIHRoaXMuc2V0VmFsdWUodGhpcy52YWx1ZSwgb3B0aW9ucyk7CiAgICAgICAgICAgIHRoaXMuX3BlbmRpbmdDaGFuZ2UgPSBmYWxzZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3VwZGF0ZVZhbHVlKCkgeyB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7P30gY29uZGl0aW9uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfYW55Q29udHJvbHMoY29uZGl0aW9uKSB7CiAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2FsbENvbnRyb2xzRGlzYWJsZWQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmRpc2FibGVkOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZWdpc3RlciBhIGxpc3RlbmVyIGZvciBjaGFuZ2UgZXZlbnRzLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/fSBmbiBUaGUgbWV0aG9kIHRoYXQgaXMgY2FsbGVkIHdoZW4gdGhlIHZhbHVlIGNoYW5nZXMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlZ2lzdGVyT25DaGFuZ2UoZm4pIHsKICAgICAgICAgICAgdGhpcy5fb25DaGFuZ2UucHVzaChmbik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9jbGVhckNoYW5nZUZucygpIHsKICAgICAgICAgICAgdGhpcy5fb25DaGFuZ2UgPSBbXTsKICAgICAgICAgICAgdGhpcy5fb25EaXNhYmxlZENoYW5nZSA9IFtdOwogICAgICAgICAgICB0aGlzLl9vbkNvbGxlY3Rpb25DaGFuZ2UgPSAoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7IH0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZWdpc3RlciBhIGxpc3RlbmVyIGZvciBkaXNhYmxlZCBldmVudHMuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez99IGZuIFRoZSBtZXRob2QgdGhhdCBpcyBjYWxsZWQgd2hlbiB0aGUgZGlzYWJsZWQgc3RhdHVzIGNoYW5nZXMuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZWdpc3Rlck9uRGlzYWJsZWRDaGFuZ2UoZm4pIHsKICAgICAgICAgICAgdGhpcy5fb25EaXNhYmxlZENoYW5nZS5wdXNoKGZuKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7P30gY2IKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9mb3JFYWNoQ2hpbGQoY2IpIHsgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9zeW5jUGVuZGluZ0NvbnRyb2xzKCkgewogICAgICAgICAgICBpZiAodGhpcy51cGRhdGVPbiA9PT0gJ3N1Ym1pdCcpIHsKICAgICAgICAgICAgICAgIGlmICh0aGlzLl9wZW5kaW5nRGlydHkpCiAgICAgICAgICAgICAgICAgICAgdGhpcy5tYXJrQXNEaXJ0eSgpOwogICAgICAgICAgICAgICAgaWYgKHRoaXMuX3BlbmRpbmdUb3VjaGVkKQogICAgICAgICAgICAgICAgICAgIHRoaXMubWFya0FzVG91Y2hlZCgpOwogICAgICAgICAgICAgICAgaWYgKHRoaXMuX3BlbmRpbmdDaGFuZ2UpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLnNldFZhbHVlKHRoaXMuX3BlbmRpbmdWYWx1ZSwgeyBvbmx5U2VsZjogdHJ1ZSwgZW1pdE1vZGVsVG9WaWV3Q2hhbmdlOiBmYWxzZSB9KTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ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vck9yT3B0cyksIGNvZXJjZVRvQXN5bmNWYWxpZGF0b3IoYXN5bmNWYWxpZGF0b3IsIHZhbGlkYXRvck9yT3B0cykpOwogICAgICAgICAgICB0aGlzLmNvbnRyb2xzID0gY29udHJvbHM7CiAgICAgICAgICAgIHRoaXMuX2luaXRPYnNlcnZhYmxlcygpOwogICAgICAgICAgICB0aGlzLl9zZXRVcGRhdGVTdHJhdGVneSh2YWxpZGF0b3JPck9wdHMpOwogICAgICAgICAgICB0aGlzLl9zZXRVcENvbnRyb2xzKCk7CiAgICAgICAgICAgIHRoaXMudXBkYXRlVmFsdWVBbmRWYWxpZGl0eSh7IG9ubHlTZWxmOiB0cnVlLCBlbWl0RXZlbnQ6IGZhbHNlIH0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZWdpc3RlcnMgYSBjb250cm9sIHdpdGggdGhlIGdyb3VwJ3MgbGlzdCBvZiBjb250cm9scy4KICAgICAgICAgKgogICAgICAgICAqIFRoaXMgbWV0aG9kIGRvZXMgbm90IHVwZGF0ZSB0aGUgdmFsdWUgb3IgdmFsaWRpdHkgb2YgdGhlIGNvbnRyb2wuCiAgICAgICAgICogVXNlIHtcQGxpbmsgRm9ybUdyb3VwI2FkZENvbnRyb2wgYWRkQ29udHJvbH0gaW5zdGVhZC4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7P30gbmFtZSBUaGUgY29udHJvbCBuYW1lIHRvIHJlZ2lzdGVyIGluIHRoZSBjb2xsZWN0aW9uCiAgICAgICAgICogQHBhcmFtIHs/fSBjb250cm9sIFByb3ZpZGVzIHRoZSBjb250cm9sIGZvciB0aGUgZ2l2ZW4gbmFtZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVnaXN0ZXJDb250cm9sKG5hbWUsIGNvbnRyb2wpIHsKICAgICAgICAgICAgaWYgKHRoaXMuY29udHJvbHNbbmFtZV0pCiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5jb250cm9sc1tuYW1lXTsKICAgICAgICAgICAgdGhpcy5jb250cm9sc1tuYW1lXSA9IGNvbnRyb2w7CiAgICAgICAgICAgIGNvbnRyb2wuc2V0UGFyZW50KHRoaXMpOwogICAgICAgICAgICBjb250cm9sLl9yZWdpc3Rlck9uQ29sbGVjdGlvbkNoYW5nZSh0aGlzLl9vbkNvbGxlY3Rpb25DaGFuZ2UpOwogICAgICAgICAgICByZXR1cm4gY29udHJvbDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQWRkIGEgY29udHJvbCB0byB0aGlzIGdyb3VwLgogICAgICAgICAqCiAgICAgICAgICogVGhpcyBtZXRob2QgYWxzbyB1cGRhdGVzIHRoZSB2YWx1ZSBhbmQgdmFsaWRpdHkgb2YgdGhlIGNvbnRyb2wuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez99IG5hbWUgVGhlIGNvbnRyb2wgbmFtZSB0byBhZGQgdG8gdGhlIGNvbGxlY3Rpb24KICAgICAgICAgKiBAcGFyYW0gez99IGNvbnRyb2wgUHJvdmlkZXMgdGhlIGNvbnRyb2wgZm9yIHRoZSBnaXZlbiBuYW1lCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBhZGRDb250cm9sKG5hbWUsIGNvbnRyb2wpIHsKICAgICAgICAgICAgdGhpcy5yZWdpc3RlckNvbnRyb2wobmFtZSwgY29udHJvbCk7CiAgICAgICAgICAgIHRoaXMudXBkYXRlVmFsdWVBbmRWYWxpZGl0eSgpOwogICAgICAgICAgICB0aGlzLl9vbkNvbGxlY3Rpb25DaGFuZ2UoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmVtb3ZlIGEgY29udHJvbCBmcm9tIHRoaXMgZ3JvdXAuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez99IG5hbWUgVGhlIGNvbnRyb2wgbmFtZSB0byByZW1vdmUgZnJvbSB0aGUgY29sbGVjdGlvbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVtb3ZlQ29udHJvbChuYW1lKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmNvbnRyb2xzW25hbWVdKQogICAgICAgICAgICAgICAgdGhpcy5jb250cm9sc1tuYW1lXS5fcmVnaXN0ZXJPbkNvbGxlY3Rpb25DaGFuZ2UoKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4geyB9KSk7CiAgICAgICAgICAgIGRlbGV0ZSAodGhpcy5jb250cm9sc1tuYW1lXSk7CiAgICAgICAgICAgIHRoaXMudXBkYXRlVmFsdWVBbmRWYWxpZGl0eSgpOwogICAgICAgICAgICB0aGlzLl9vbkNvbGxlY3Rpb25DaGFuZ2UoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmVwbGFjZSBhbiBleGlzdGluZyBjb250cm9sLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/fSBuYW1lIFRoZSBjb250cm9sIG5hbWUgdG8gcmVwbGFjZSBpbiB0aGUgY29sbGVjdGlvbgogICAgICAgICAqIEBwYXJhbSB7P30gY29udHJvbCBQcm92aWRlcyB0aGUgY29udHJvbCBmb3IgdGhlIGdpdmVuIG5hbWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldENvbnRyb2wobmFtZSwgY29udHJvbCkgewogICAgICAgICAgICBpZiAodGhpcy5jb250cm9sc1tuYW1lXSkKICAgICAgICAgICAgICAgIHRoaXMuY29udHJvbHNbbmFtZV0uX3JlZ2lzdGVyT25Db2xsZWN0aW9uQ2hhbmdlKCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHsgfSkpOwogICAgICAgICAgICBkZWxldGUgKHRoaXMuY29udHJvbH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CiAgICAgICAgICAgIHRoaXMuX2NoZWNrQWxsVmFsdWVzUHJlc2VudCh2YWx1ZSk7CiAgICAgICAgICAgIE9iamVjdC5rZXlzKHZhbHVlKS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBuYW1lCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBuYW1lID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuX3Rocm93SWZDb250cm9sTWlzc2luZyhuYW1lKTsKICAgICAgICAgICAgICAgIHRoaXMuY29udHJvbHNbbmFtZV0uc2V0VmFsdWUodmFsdWVbbmFtZV0sIHsgb25seVNlbGY6IHRydWUsIGVtaXRFdmVudDogb3B0aW9ucy5lbWl0RXZlbnQgfSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgdGhpcy51cGRhdGVWYWx1ZUFuZFZhbGlkaXR5KG9wdGlvbnMpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBQYXRjaGVzIHRoZSB2YWx1ZSBvZiB0aGUgYEZvcm1Hcm91cGAuIEl0IGFjY2VwdHMgYW4gb2JqZWN0IHdpdGggY29udHJvbAogICAgICAgICAqIG5hbWVzIGFzIGtleXMsIGFuZCBkb2VzIGl0cyBiZXN0IHRvIG1hdGNoIHRoZSB2YWx1ZXMgdG8gdGhlIGNvcnJlY3QgY29udHJvbHMKICAgICAgICAgKiBpbiB0aGUgZ3JvdXAuCiAgICAgICAgICoKICAgICAgICAgKiBJdCBhY2NlcHRzIGJvdGggc3VwZXItc2V0cyBhbmQgc3ViLXNldHMgb2YgdGhlIGdyb3VwIHdpdGhvdXQgdGhyb3dpbmcgYW4gZXJyb3IuCiAgICAgICAgICoKICAgICAgICAgKiBcQHVzYWdlTm90ZXMKICAgICAgICAgKiAjIyMgUGF0Y2ggdGhlIHZhbHVlIGZvciBhIGZvcm0gZ3JvdXAKICAgICAgICAgKgogICAgICAgICAqIGBgYAogIC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NgCiAgICAgICAgICogb2JzZXJ2YWJsZXMgZW1pdCBldmVudHMgd2l0aCB0aGUgbGF0ZXN0IHN0YXR1cyBhbmQgdmFsdWUgd2hlbiB0aGUgY29udHJvbCB2YWx1ZSBpcyB1cGRhdGVkLgogICAgICAgICAqIFdoZW4gZmFsc2UsIG5vIGV2ZW50cyBhcmUgZW1pdHRlZC4KICAgICAgICAgKiBUaGUgY29uZmlndXJhdGlvbiBvcHRpb25zIGFyZSBwYXNzZWQgdG8gdGhlIHtcQGxpbmsgQWJzdHJhY3RDb250cm9sI3VwZGF0ZVZhbHVlQW5kVmFsaWRpdHkKICAgICAgICAgKiB1cGRhdGVWYWx1ZUFuZFZhbGlkaXR5fSBtZXRob2QuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBwYXRjaFZhbHVlKHZhbHVlLCBvcHRpb25zID0ge30pIHsKICAgICAgICAgICAgT2JqZWN0LmtleXModmFsdWUpLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IG5hbWUKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIG5hbWUgPT4gewogICAgICAgICAgICAgICAgaWYgKHRoaXMuY29udHJvbHNbbmFtZV0pIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLmNvbnRyb2xzW25hbWVdLnBhdGNoVmFsdWUodmFsdWVbbmFtZV0sIHsgb25seVNlbGY6IHRydWUsIGVtaXRFdmVudDogb3B0aW9ucy5lbWl0RXZlbnQgfSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgdGhpcy51cGRhdGVWYWx1ZUFuZFZhbGlkaXR5KG9wdGlvbnMpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZXNldHMgdGhlIGBGb3JtR3JvdXBgLCBtYXJrcyBhbGwgZGVzY2VuZGFudHMgYXJlIG1hcmtlZCBgcHJpc3Rpbm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XR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoY29udHJvbCwgbmFtZSkgPT4gewogICAgICAgICAgICAgICAgY29udHJvbC5yZXNldCh2YWx1ZVtuYW1lXSwgeyBvbmx5U2VsZjogdHJ1ZSwgZW1pdEV2ZW50OiBvcHRpb25zLmVtaXRFdmVudCB9KTsKICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB0aGlzLl91cGRhdGVQcmlzdGluZShvcHRpb25zKTsKICAgICAgICAgICAgdGhpcy5fdXBkYXRlVG91Y2hlZChvcHRpb25zKTsKICAgICAgICAgICAgdGhpcy51cGRhdGVWYWx1ZUFuZFZhbGlkaXR5KG9wdGlvbnMpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBUaGUgYWdncmVnYXRlIHZhbHVlIG9mIHRoZSBgRm9ybUdyb3VwYCwgaW5jbHVkaW5nIGFueSBkaXNhYmxlZCBjb250cm9scy4KICAgICAgICAgKgogICAgICAgICAqIFJldHJpZXZlcyBhbGwgdmFsdWVzIHJlZ2FyZGxlc3Mgb2YgZGlzYWJsZWQgc3RhdHVzLgogICAgICAgICAqIFRoZSBgdmFsdWVgIHByb3BlcnR5IGlzIHRoZSBiZXN0IHdheSB0byBnZXQgdGhlIHZhbHVlIG9mIHRoZSBncm91cCwgYmVjYXVzZQogICAgICAgICAqIGl0IGV4Y2x1ZGVzIGRpc2FibGVkIGNvbnRyb2xzIGluIHRoZSBgRm9ybUdyb3VwYC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldFJhd1ZhbHVlKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fcmVkdWNlQ2hpbGRyZW4oe30sICgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBhY2MKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjb250cm9sCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbmFtZQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGFjYywgY29udHJvbCwgbmFtZSkgPT4gewogICAgICAgICAgICAgICAgYWNjW25hbWVdID0gY29udHJvbCBpbnN0YW5jZW9mIEZvcm1Db250cm9sID8gY29udHJvbC52YWx1ZSA6ICgoLyoqIEB0eXBlIHs/fSAqLyAoY29udHJvbCkpKS5nZXRSYXdWYWx1ZSgpOwogICAgICAgICAgICAgICAgcmV0dXJuIGFjYzsKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfc3luY1BlbmRpbmdDb250cm9scygpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgc3VidHJlZVVwZGF0ZWQgPSB0aGlzLl9yZWR1Y2VDaGlsZHJlbihmYWxzZSwgKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHVwZGF0ZWQKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjaGlsZAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHVwZGF0ZWQsIGNoaWxkKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gY2hpbGQuX3N5bmNQZW5kaW5nQ29udHJvbHMoKSA/IHRydWUgOiB1cGRhdGVkOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIGlmIChzdWJ0cmVlVXBkYXRlZCkKICAgICAgICAgICAgICAgIHRoaXMudXBkYXRlVmFsdWVBbmRWYWxpZGl0eSh7IG9ubHlTZWxmOiB0cnVlIH0pOwogICAgICAgICAgICByZXR1cm4gc3VidHJlZVVwZGF0ZWQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgKiBAcGFyYW0gez99IG5hbWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF90aHJvd0lmQ29udHJvbE1pc3NpbmcobmFtZSkgewogICAgICAgICAgICBpZiAoIU9iamVjdC5rZXlzKHRoaXMuY29udHJvbHMpLmxlbmd0aCkgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGAKICAgICAgICBUaGVyZSBhcmUgbm8gZm9ybSBjb250cm9scyByZWdpc3RlcmVkIHdpdGggdGhpcyBncm91cCB5ZXQuICBJZiB5b3UncmUgdXNpbmcgbmdNb2RlbCwKICAgICAgICB5b3UgbWF5IHdhbnQgdG8gY2hlY2sgbmV4dCB0aWNrIChlLmcuIHVzZSBzZXRUaW1lb3V0KS4KICAgICAgYCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKCF0aGlzLmNvbnRyb2xzW25hbWVdKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYENhbm5vdCBmaW5kIGZvcm0gY29udHJvbCB3aXRoIG5hbWU6ICR7bmFtZX0uYCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7P30gY2IKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9mb3JFYWNoQ2hpbGQoY2IpIHsKICAgICAgICAgICAgT2JqZWN0LmtleXModGhpcy5jb250cm9scykuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gawogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgayA9PiBjYih0aGlzLmNvbnRyb2xzW2tdLCBrKSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfc2V0VXBDb250cm9scygpIHsKICAgICAgICAgICAgdGhpcy5fZm9yRWFjaENoaWxkKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjb250cm9sCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoY29udHJvbCkgPT4gewogICAgICAgICAgICAgICAgY29udHJvbC5zZXRQYXJlbnQodGhpcyk7CiAgICAgICAgICAgICAgICBjb250cm9sLl9yZWdpc3Rlck9uQ29sbGVjdGlvbkNoYW5nZSh0aGlzLl9vbkNvbGxlY3Rpb25DaGFuZ2UpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF91cGRhdGVWYWx1ZSgpIHsKICAgICAgICAgICAgKCgvKiogQHR5cGUgez99ICovICh0aGlzKSkpLnZhbHVlID0gdGhpcy5fcmVkdWNlVmFsdWUoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7P30gY29uZGl0aW9uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfYW55Q29udHJvbHMoY29uZGl0aW9uKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHJlcyA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLl9mb3JFYWNoQ2hpbGQoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGNvbnRyb2wKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBuYW1lCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoY29udHJvbCwgbmFtZSkgPT4gewogICAgICAgICAgICAgICAgcmVzID0gcmVzIHx8ICh0aGlzLmNvbnRhaW5zKG5hbWUpICYmIGNvbmRpdGlvbihjb250cm9sKSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgcmV0dXJuIHJlczsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3JlZHVjZVZhbHVlKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fcmVkdWNlQ2hpbGRyZW4oe30sICgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBhY2MKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjb250cm9sCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbmFtZQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGFjYywgY29udHJvbCwgbmFtZSkgPT4gewogICAgICAgICAgICAgICAgaWYgKGNvbnRyb2wuZW5hYmxlZCB8fCB0aGlzLmRpc2FibGVkKSB7CiAgICAgICAgICAgICAgICAgICAgYWNjW25hbWVdID0gY29udHJvbC52YWx1ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiBhY2M7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7P30gaW5pdFZhbHVlCiAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3JlZHVjZUNoaWxkcmVuKGluaXRWYWx1ZSwgZm4pIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgcmVzID0gaW5pdFZhbHVlOwogICAgICAgICAgICB0aGlzLl9mb3JFYWNoQ2hpbGQoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGNvbnRyb2wKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBuYW1lCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoY29udHJvbCwgbmFtZSkgPT4gewogICAgICAgICAgICAgICAgcmVzID0gZm4ocmVzLCBjb250cm9sLCBuYW1lKTsKICAgICAgICAgICAgfSkpOwogICAgICAgICAgICByZXR1cm4gcmVzOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfYWxsQ29udHJvbHNEaXNhYmxlZCgpIHsKICAgICAgICAgICAgZm9yIChjb25zdCBjb250cm9sTmFtZSBvZiBPYmplY3Qua2V5cyh0aGlzLmNvbnRyb2xzKSkgewogICAgICAgICAgICAgICAgaWYgKHRoaXMuY29udHJvbHNbY29udHJvbE5hbWVdLmVuYWJsZWQpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIE9iamVjdC5rZXlzKHRoaXMuY29udHJvbHMpLmxlbmd0aCA+IDAgfHwgdGhpcy5kaXNhYmxlZDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9jaGVja0FsbFZhbHVlc1ByZXNlbnQodmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5fZm9yRWFjaENoaWxkKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjb250cm9sCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbmFtZQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGNvbnRyb2wsIG5hbWUpID0+IHsKICAgICAgICAgICAgICAgIGlmICh2YWx1ZVtuYW1lXSA9PT0gdW5kZWZpbmVkKSB7CiAg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AgICAgY29uc3RydWN0b3IoY29udHJvbHMsIHZhbGlkYXRvck9yT3B0cywgYXN5bmNWYWxpZGF0b3IpIHsKICAgICAgICAgICAgc3VwZXIoY29lcmNlVG9WYWxpZGF0b3IodmFsaWRhdG9yT3JPcHRzKSwgY29lcmNlVG9Bc3luY1ZhbGlkYXRvcihhc3luY1ZhbGlkYXRvciwgdmFsaWRhdG9yT3JPcHRzKSk7CiAgICAgICAgICAgIHRoaXMuY29udHJvbHMgPSBjb250cm9sczsKICAgICAgICAgICAgdGhpcy5faW5pdE9ic2VydmFibGVzKCk7CiAgICAgICAgICAgIHRoaXMuX3NldFVwZGF0ZVN0cmF0ZWd5KHZhbGlkYXRvck9yT3B0cyk7CiAgICAgICAgICAgIHRoaXMuX3NldFVwQ29udHJvbHMoKTsKICAgICAgICAgICAgdGhpcy51cGRhdGVWYWx1ZUFuZFZhbGlkaXR5KHsgb25seVNlbGY6IHRydWUsIGVtaXRFdmVudDogZmFsc2UgfSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEdldCB0aGUgYEFic3RyYWN0Q29udHJvbGAgYXQgdGhlIGdpdmVuIGBpbmRleGAgaW4gdGhlIGFycmF5LgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/fSBpbmRleCBJbmRleCBpbiB0aGUgYXJyYXkgdG8gcmV0cmlldmUgdGhlIGNvbnRyb2wKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGF0KGluZGV4KSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmNvbnRyb2xzW2luZGV4XTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogSW5zZXJ0IGEgbmV3IGBBYnN0cmFjdENvbnRyb2xgIGF0IHRoZSBlbmQgb2YgdGhlIGFycmF5LgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/fSBjb250cm9sIEZvcm0gY29udHJvbCB0byBiZSBpbnNlcnRlZAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcHVzaChjb250cm9sKSB7CiAgICAgICAgICAgIHRoaXMuY29udHJvbHMucHVzaChjb250cm9sKTsKICAgICAgICAgICAgdGhpcy5fcmVnaXN0ZXJDb250cm9sKGNvbnRyb2wpOwogICAgICAgICAgICB0aGlzLnVwZGF0ZVZhbHVlQW5kVmFsaWRpdHkoKTsKICAgICAgICAgICAgdGhpcy5fb25Db2xsZWN0aW9uQ2hhbmdlKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEluc2VydCBhIG5ldyBgQWJzdHJhY3RDb250cm9sYCBhdCB0aGUgZ2l2ZW4gYGluZGV4YCBpbiB0aGUgYXJyYXkuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez99IGluZGV4IEluZGV4IGluIHRoZSBhcnJheSB0byBpbnNlcnQgdGhlIGNvbnRyb2wKICAgICAgICAgKiBAcGFyYW0gez99IGNvbnRyb2wgRm9ybSBjb250cm9sIHRvIGJlIGluc2VydGVkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBpbnNlcnQoaW5kZXgsIGNvbnRyb2wpIHsKICAgICAgICAgICAgdGhpcy5jb250cm9scy5zcGxpY2UoaW5kZXgsIDAsIGNvbnRyb2wpOwogICAgICAgICAgICB0aGlzLl9yZWdpc3RlckNvbnRyb2woY29udHJvbCk7CiAgICAgICAgICAgIHRoaXMudXBkYXRlVmFsdWVBbmRWYWxpZGl0eSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZW1vdmUgdGhlIGNvbnRyb2wgYXQgdGhlIGdpdmVuIGBpbmRleGAgaW4gdGhlIGFycmF5LgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/fSBpbmRleCBJbmRleCBpbiB0aGUgYXJyYXkgdG8gcmVtb3ZlIHRoZSBjb250cm9sCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZW1vdmVBdChpbmRleCkgewogICAgICAgICAgICBpZiAodGhpcy5jb250cm9sc1tpbmRleF0pCiAgICAgICAgICAgICAgICB0aGlzLmNvbnRyb2xzW2luZGV4XS5fcmVnaXN0ZXJPbkNvbGxlY3Rpb25DaGFuZ2UoKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4geyB9KSk7CiAgICAgICAgICAgIHRoaXMuY29udHJvbHMuc3BsaWNlKGluZGV4LCAxKTsKICAgICAgICAgICAgdGhpcy51cGRhdGVWYWx1ZUFuZFZhbGlkaXR5KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJlcGxhY2UgYW4gZXhpc3RpbmcgY29udHJvbC4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7P30gaW5kZXggSW5kZXggaW4gdGhlIGFycmF5IHRvIHJlcGxhY2UgdGhlIGNvbnRyb2wKICAgICAgICAgKiBAcGFyYW0gez99IGNvbnRyb2wgVGhlIGBBYnN0cmFjdENvbnRyb2xgIGNvbnRyb2wgdG8gcmVwbGFjZSB0aGUgZXhpc3RpbmcgY29udHJvbAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0Q29udHJvbChpbmRleCwgY29udHJvbCkgewogICAgICAgICAgICBpZiAodGhpcy5jb250cm9sc1tpbmRleF0pCiAgICAgICAgICAgICAgICB0aGlzLmNvbnRyb2xzW2luZGV4XS5fcmVnaXN0ZXJPbkNvbGxlY3Rpb25DaGFuZ2UoKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4geyB9KSk7CiAgICAgICAgICAgIHRoaXMuY29udHJvbHMuc3BsaWNlKGluZGV4LCAxKTsKICAgICAgICAgICAgaWYgKGNvbnRyb2wpIHsKICAgICAgICAgICAgICAgIHRoaXMuY29udHJvbHMuc3BsaWNlKGluZGV4LCAwLCBjb250cm9sKTsKICAgICAgICAgICAgICAgIHRoaXMuX3JlZ2lzdGVyQ29udHJvbChjb250cm9sKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLnVwZGF0ZVZhbHVlQW5kVmFsaWRpdHkoKTsKICAgICAgICAgICAgdGhpcy5fb25Db2xsZWN0aW9uQ2hhbmdlKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIExlbmd0aCBvZiB0aGUgY29udHJvbCBhcnJheS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBsZW5ndGgoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmNvbnRyb2xzLmxlbmd0aDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU2V0cyB0aGUgdmFsdWUgb2YgdGhlIGBGb3JtQXJyYXlgLiBJdCBhY2NlcHRzIGFuIGFycmF5IHRoYXQgbWF0Y2hlcwogICAgICAgICAqIHRoZSBzdHJ1Y3R1cmUgb2YgdGhlIGNvbnRyb2wuCiAgICAgICAgICoKICAgICAgICAgKiBUaGlzIG1ldGhvZCBwZXJmb3JtcyBzdHJpY3QgY2hlY2tzLCBhbmQgdGhyb3dzIGFuIGVycm9yIGlmIHlvdSB0cnkKICAgICAgICAgKiB0byBzZXQgdGhlIHZhbHVlIG9mIGEgY29udHJvbCB0aGF0IGRvZXNuJ3QgZXhpc3Qgb3IgaWYgeW91IGV4Y2x1ZGUgdGhlCiAgICAgICAgICogdmFsdWUgb2YgYSBjb250cm9sLgogICAgICAgICAqCiAgICAgICAgICogXEB1c2FnZU5vdGVzCiAgICAgICAgICogIyMjIFNldCB0aGUgdmFsdWVzIGZvciB0aGUgY29udHJvbHMgaW4gdGhlIGZvcm0gYXJyYXkKICAgICAgICAgKgogICAgICAgICAqIGBgYAogICAgICAgICAqIGNvbnN0IGFyciA9IG5ldyBGb3JtQXJyYXko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luZGV4KSkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuYXQoaW5kZXgpLnBhdGNoVmFsdWUobmV3VmFsdWUsIHsgb25seVNlbGY6IHRydWUsIGVtaXRFdmVudDogb3B0aW9ucy5lbWl0RXZlbnQgfSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgdGhpcy51cGRhdGVWYWx1ZUFuZFZhbGlkaXR5KG9wdGlvbnMpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZXNldHMgdGhlIGBGb3JtQXJyYXlgIGFuZCBhbGwgZGVzY2VuZGFudHMgYXJlIG1hcmtlZCBgcHJpc3RpbmVgIGFuZCBgdW50b3VjaGVkYCwgYW5kIHRoZQogICAgICAgICAqIHZhbHVlIG9mIGFsbCBkZXNjZW5kYW50cyB0byBudWxsIG9yIG51bGwgbWFwcy4KICAgICAgICAgKgogICAgICAgICAqIFlvdSByZXNldCB0byBhIHNwZWNpZmljIGZvcm0gc3RhdGUgYnkgcGFzc2luZyBpbiBhbiBhcnJheSBvZiBzdGF0ZXMKICAgICAgICAgKiB0aGF0IG1hdGNoZXMgdGhlIHN0cnVjdHVyZSBvZiB0aGUgY29udHJvbC4gVGhlIHN0YXRlIGlzIGEgc3RhbmRhbG9uZSB2YWx1ZQogICAgICAgICAqIG9yIGEgZm9ybSBzdGF0ZSBvYmplY3Qgd2l0aCBib3RoIGEgdmFsdWUgYW5kIGEgZGlzYWJsZWQgc3RhdHVzLgogICAgICAgICAqCiAgICAgICAgICogXEB1c2FnZU5vdGVzCiAgICAgICAgICogIyMjIFJlc2V0IHRoZSB2YWx1ZXMgaW4gYSBmb3JtIGFycmF5CiAgICAgICAgICoKICAgICAgICAgKiBgYGB0cwogICAgICAgICAqIGNvbnN0IGFyciA9IG5ldyBGb3JtQXJyYXkoWwogICAgICAgICAqICAgIG5ldyBGb3JtQ29udHJvbCgpLAogICAgICAgICAqICAgIG5ldyBGb3JtQ29udHJvb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lY3RzIHRoaXMgY29udHJvbCwgYW5kIG5vdCBpdHMgcGFyZW50LiBEZWZhdWx0CiAgICAgICAgICogaXMgZmFsc2UuCiAgICAgICAgICogKiBgZW1pdEV2ZW50YDogV2hlbiB0cnVlIG9yIG5vdCBzdXBwbGllZCAodGhlIGRlZmF1bHQpLCBib3RoIHRoZSBgc3RhdHVzQ2hhbmdlc2AgYW5kCiAgICAgICAgICogYHZhbHVlQ2hhbmdlc2AKICAgICAgICAgKiBvYnNlcnZhYmxlcyBlbWl0IGV2ZW50cyB3aXRoIHRoZSBsYXRlc3Qgc3RhdHVzIGFuZCB2YWx1ZSB3aGVuIHRoZSBjb250cm9sIGlzIHJlc2V0LgogICAgICAgICAqIFdoZW4gZmFsc2UsIG5vIGV2ZW50cyBhcmUgZW1pdHRlZC4KICAgICAgICAgKiBUaGUgY29uZmlndXJhdGlvbiBvcHRpb25zIGFyZSBwYXNzZWQgdG8gdGhlIHtcQGxpbmsgQWJzdHJhY3RDb250cm9sI3VwZGF0ZVZhbHVlQW5kVmFsaWRpdHkKICAgICAgICAgKiB1cGRhdGVWYWx1ZUFuZFZhbGlkaXR5fSBtZXRob2QuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZXNldCh2YWx1ZSA9IFtdLCBvcHRpb25zID0ge30pIHsKICAgICAgICAgICAgdGhpcy5fZm9yRWFjaENoaWxkKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjb250cm9sCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gaW5kZXgKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChjb250cm9sLCBpbmRleCkgPT4gewogICAgICAgICAgICAgICAgY29udHJvbC5yZXNldCh2YWx1ZVtpbmRleF0sIHsgb25seVNlbGY6IHRydWUsIGVtaXRFdmVudDogb3B0aW9ucy5lbWl0RXZlbnQgfSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgdGhpcy5fdXBkYXRlUHJpc3RpbmUob3B0aW9ucyk7CiAgICAgICAgICAgIHRoaXMuX3VwZGF0ZVRvdWNoZWQob3B0aW9ucyk7CiAgICAgICAgICAgIHRoaXMudXBkYXRlVmFsdWVBbmRWYWxpZGl0eShvcHRpb25zKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIGFnZ3JlZ2F0ZSB2YWx1ZSBvZiB0aGUgYXJyYXksIGluY2x1ZGluZyBhbnkgZGlzYWJsZWQgY29udHJvbHMuCiAgICAgICAgICoKICAgICAgICAgKiBSZXBvcnRzIGFsbCB2YWx1ZXMgcmVnYXJkbGVzcyBvZiBkaXNhYmxlZCBzdGF0dXMuCiAgICAgICAgICogRm9yIGVuYWJsZWQgY29udHJvbHMgb25seSwgdGhlIGB2YWx1ZWAgcHJvcGVydHkgaXMgdGhlIGJlc3Qgd2F5IHRvIGdldCB0aGUgdmFsdWUgb2YgdGhlIGFycmF5LgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0UmF3VmFsdWUoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmNvbnRyb2xzLm1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY29udHJvbAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGNvbnRyb2wpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiBjb250cm9sIGluc3RhbmNlb2YgRm9ybUNvbnRyb2wgPyBjb250cm9sLnZhbHVlIDogKCgvKiogQHR5cGUgez99ICovIChjb250cm9sKSkpLmdldFJhd1ZhbHVlKCk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmVtb3ZlIGFsbCBjb250cm9scyBpbiB0aGUgYEZvcm1BcnJheWAuCiAgICAgICAgICoKICAgICAgICAgKiBcQHVzYWdlTm90ZXMKICAgICAgICAgKiAjIyMgUmVtb3ZlIGFsbCBlbGVtZW50cyBmcm9tIGEgRm9ybUFycmF5CiAgICAgICAgICoKICAgICAgICAgKiBgYGB0cwogICAgICAgICAqIGNvbnN0IGFyciA9IG5ldyBGb3JtQXJyYXkoWwogICAgICAgICAqICAgIG5ldyBGb3JtQ29udHJvbCgpLAogICAgICAgICAqICAgIG5ldyBGb3JtQ29udHJvbCgpCiAgICAgICAgICogXSk7CiAgICAgICAgICogY29uc29sZS5sb2coYXJyLmxlbmd0aCk7ICAvLyAyCiAgICAgICAgICoKICAgICAgICAgKiBhcnIuY2xlYXIoKTsKICAgICAgICAgKiBjb25zb2xlLmxvZyhhcnIubGVuZ3RoKTsgIC8vIDAKICAgICAgICAgKiBgYGAKICAgICAgICAgKgogICAgICAgICAqIEl0J3MgYSBzaW1wbGVyIGFuZCBtb3JlIGVmZmljaWVudCBhbHRlcm5hdGl2ZSB0byByZW1vdmluZyBhbGwgZWxlbWVudHMgb25lIGJ5IG9uZToKICAgICAgICAgKgogICAgICAgICAqIGBgYHRzCiAgICAgICAgICogY29uc3QgYXJyID0gbmV3IEZvcm1BcnJheShbCiAgICAgICAgICogICAgbmV3IEZvcm1Db250cm9sKCksCiAgICAgICAgICogICAgbmV3IEZvcm1Db250cm9sKCkKICAgICAgICAgKiBdKTsKICAgICAgICAgKgogICAgICAgICAqIHdoaWxlIChhcnIubGVuZ3RoKSB7CiAgICAgICAgICogICAgYXJyLnJlbW92ZUF0KDApOwogICAgICAgICAqIH0KICAgICAgICAgKiBgYGAKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGNsZWFyKCkgewogICAgICAgICAgICBpZiAodGhpcy5jb250cm9scy5sZW5ndGggPCAxKQogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB0aGlzLl9mb3JFYWNoQ2hpbGQoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGNvbnRyb2wKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChjb250cm9sKSA9PiBjb250cm9sLl9yZWdpc3Rlck9uQ29sbGVjdGlvbkNoYW5nZSgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7IH0pKSkpOwogICAgICAgICAgICB0aGlzLmNvbnRyb2xzLnNwbGljZSgwKTsKICAgICAgICAgICAgdGhpcy51cGRhdGVWYWx1ZUFuZFZhbGlkaXR5KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9zeW5jUGVuZGluZ0NvbnRyb2xzKCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBzdWJ0cmVlVXBkYXRlZCA9IHRoaXMuY29udHJvbHMucmVkdWNlKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSB1cGRhdGVkCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY2hpbGQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICh1cGRhdGVkLCBjaGlsZCkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIGNoaWxkLl9zeW5jUGVuZGluZ0NvbnRyb2xzKCkgPyB0cnVlIDogdXBkYXRlZDsKICAgICAgICAgICAgfSksIGZhbHNlKTsKICAgICAgICAgICAgaWYgKHN1YnRyZWVVcGRhdGVkKQogICAgICAgICAgICAgICAgdGhpcy51cGRhdGVWYWx1ZUFuZFZhbGlkaXR5KHsgb25seVNlbGY6IHRydWUgfSk7CiAgICAgICAgICAgIHJldHVybiBzdWJ0cmVlVXBkYXRlZDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEBwYXJhbSB7P30gaW5kZXgKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF90aHJvd0lmQ29udHJvbE1pc3NpbmcoaW5kZXgpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLmNvbnRyb2xzLmxlbmd0aCkgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGAKICAgICAgICBUaGVyZSBhcmUgbm8gZm9ybSBjb250cm9scyByZWdpc3RlcmVkIHdpdGggdGhpcyBhcnJheSB5ZXQuICBJZiB5b3UncmUgdXNpbmcgbmdNb2RlbCwKICAgICAgICB5b3UgbWF5IHdhbnQgdG8gY2hlY2sgbmV4dCB0aWNrIChlLmcuIHVzZSBzZXRUaW1lb3V0KS4KICAgICAgYCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKCF0aGlzLmF0KGluZGV4KSkgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBDYW5ub3QgZmluZCBmb3JtIGNvbnRyb2wgYXQgaW5kZXggJHtpbmRleH1gKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICogQHBhcmFtIHs/fSBjYgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2ZvckVhY2hDaGlsZChjYikgewogICAgICAgICAgICB0aGlzLmNvbnRyb2xzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGNvbnRyb2wKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBpbmRleAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGNvbnRyb2wsIGluZGV4KSA9PiB7CiAgICAgICAgICAgICAgICBjYihjb250cm9sLCBpbmRleCk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3VwZGF0ZVZhbHVlKCkgewogICAgICAgICAgICAoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKSkudmFsdWUgPQogICAgICAgICAgICAgICAgdGhpcy5jb250cm9scy5maWx0ZXIoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjb250cm9sCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoY29udHJvbCkgPT4gY29udHJvbC5lbmFibGVkIHx8IHRoaXMuZGlzYWJsZWQpKQogICAgICAgICAgICAgICAgICAgIC5tYXAoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjb250cm9sCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoY29udHJvbCkgPT4gY29udHJvbC52YWx1ZSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICogQHBhcmFtIHs/fSBjb25kaXRpb24KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9hbnlDb250cm9scyhjb25kaXRpb24pIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuY29udHJvbHMuc29tZSgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY29udHJvbAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGNvbnRyb2wpID0+IGNvbnRyb2wuZW5hYmxlZCAmJiBjb25kaXRpb24oY29udHJvbCkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBpbnRlcm5hbAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3NldFVwQ29udHJvbHMoKSB7CiAgICAgICAgICAgIHRoaXMuX2ZvckVhY2hDaGlsZCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY29udHJvbAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGNvbnRyb2wpID0+IHRoaXMuX3JlZ2lzdGVyQ29udHJvbChjb250cm9sKSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2NoZWNrQWxsVmFsdWVzUHJlc2VudCh2YWx1ZSkgewogICAgICAgICAgICB0aGlzLl9mb3JFYWNoQ2hpbGQoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGNvbnRyb2wKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBpCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoY29udHJvbCwgaSkgPT4gewogICAgICAgICAgICAgICAgaWYgKHZhbHVlW2ldID09PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYE11c3Qgc3VwcGx5IGEgdmFsdWUgZm9yIGZvcm0gY29udHJvbCBhdCBpbmRleDogJHtpfS5gKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfYWxsQ29udHJvbHNEaXNhYmxlZCgpIHsKICAgICAgICAgICAgZm9yIChjb25zdCBjb250cm9sIG9mIHRoaXMuY29udHJvbHMpIHsKICAgICAgICAgICAgICAgIGlmIChjb250cm9sLmVuYWJsZWQpCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICB9CiAgICAgICAgICAg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IgdGhlIGZvcm0gc3VibWlzc2lvbiBoYXMgYmVlbiB0cmlnZ2VyZWQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLnN1Ym1pdHRlZCA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLl9kaXJlY3RpdmVzID0gW107CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICAgICAqIEV2ZW50IGVtaXR0ZXIgZm9yIHRoZSAibmdTdWJtaXQiIGV2ZW50CiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLm5nU3VibWl0ID0gbmV3IEV2ZW50RW1pdHRlcigpOwogICAgICAgICAgICB0aGlzLmZvcm0gPQogICAgICAgICAgICAgICAgbmV3IEZvcm1Hcm91cCh7fSwgY29tcG9zZVZhbGlkYXRvcnModmFsaWRhdG9ycyksIGNvbXBvc2VBc3luY1ZhbGlkYXRvcnMoYXN5bmNWYWxpZGF0b3JzKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBMaWZlY3ljbGUgbWV0aG9kIGNhbGxlZCBhZnRlciB0aGUgdmlldyBpcyBpbml0aWFsaXplZC4gRm9yIGludGVybmFsIHVzZSBvbmx5LgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdBZnRlclZpZXdJbml0KCkgewogICAgICAgICAgICB0aGlzLl9zZXRVcGRhdGVTdHJhdGVneSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogVGhlIGRpcmVjdGl2ZSBpbnN0YW5jZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBmb3JtRGlyZWN0aXZlKCkgewogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIFRoZSBpbnRlcm5hbCBgRm9ybUdyb3VwYCBpbnN0YW5jZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBjb250cm9sKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5mb3JtOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogUmV0dXJucyBhbiBhcnJheSByZXByZXNlbnRpbmcgdGhlIHBhdGggdG8gdGhpcyBncm91cC4gQmVjYXVzZSB0aGlzIGRpcmVjdGl2ZQogICAgICAgICAqIGFsd2F5cyBsaXZlcyBhdCB0aGUgdG9wIGxldmVsIG9mIGEgZm9ybSwgaXQgaXMgYWx3YXlzIGFuIGVtcHR5IGFycmF5LgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHBhdGgoKSB7CiAgICAgICAgICAgIHJldHVybiBbXTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIFJldHVybnMgYSBtYXAgb2YgdGhlIGNvbnRyb2xzIGluIHRoaXMgZ3JvdXAuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgY29udHJvbHMoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmZvcm0uY29udHJvbHM7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBNZXRob2QgdGhhdCBzZXRzIHVwIHRoZSBjb250cm9sIGRpcmVjdGl2ZSBpbiB0aGlzIGdyb3VwLCByZS1jYWxjdWxhdGVzIGl0cyB2YWx1ZQogICAgICAgICAqIGFuZCB2YWxpZGl0eSwgYW5kIGFkZHMgdGhlIGluc3RhbmNlIHRvIHRoZSBpbnRlcm5hbCBsaXN0IG9mIGRpcmVjdGl2ZXMuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez99IGRpciBUaGUgYE5nTW9kZWxgIGRpcmVjdGl2ZSBpbnN0YW5jZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGFkZENvbnRyb2woZGlyKSB7CiAgICAgICAgICAgIHJlc29sdmVkUHJvbWlzZS50aGVuKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGNvbnRhaW5lciA9IHRoaXMuX2ZpbmRDb250YWluZXIoZGlyLnBhdGgpOwogICAgICAgICAgICAgICAgKCgvKiogQHR5cGUgez99ICovIChkaXIpKSkuY29udHJvbCA9CiAgICAgICAgICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKGNvbnRhaW5lci5yZWdpc3RlckNvbnRyb2woZGlyLm5hbWUsIGRpci5jb250cm9sKSkpOwogICAgICAgICAgICAgICAgc2V0VXBDb250cm9sKGRpci5jb250cm9sLCBkaXIpOwogICAgICAgICAgICAgICAgZGlyLmNvbnRyb2wudXBkYXRlVmFsdWVBbmRWYWxpZGl0eSh7IGVtaXRFdmVudDogZmFsc2UgfSk7CiAgICAgICAgICAgICAgICB0aGlzLl9kaXJlY3RpdmVzLnB1c2goZGlyKTsKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogUmV0cmlldmVzIHRoZSBgRm9ybUNvbnRyb2xgIGluc3RhbmNlIGZyb20gdGhlIHByb3ZpZGVkIGBOZ01vZGVsYCBkaXJlY3RpdmUuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez99IGRpciBUaGUgYE5nTW9kZWxgIGRpcmVjdGl2ZSBpbnN0YW5jZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldENvbnRyb2woZGlyKSB7CiAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5mb3JtLmdldChkaXIucGF0aCkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIFJlbW92ZXMgdGhlIGBOZ01vZGVsYCBpbnN0YW5jZSBmcm9tIHRoZSBpbnRlcm5hbCBsaXN0IG9mIGRpcmVjdGl2ZXMKICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7P30gZGlyIFRoZSBgTmdNb2RlbGAgZGlyZWN0aXZlIGluc3RhbmNlLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVtb3ZlQ29udHJvbChkaXIpIHsKICAgICAgICAgICAgcmVzb2x2ZWRQcm9taXNlLnRoZW4oKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgY29udGFpbmVyID0gdGhpcy5fZmluZENvbnRhaW5lcihkaXIucGF0aCk7CiAgICAgICAgICAgICAgICBpZiAoY29udGFpbmVyKSB7CiAgICAgICAgICAgICAgICAgICAgY29udGFpbmVyLnJlbW92ZUNvbnRyb2woZGlyLm5hbWUpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmVtb3ZlRGlyKHRoaXMuX2RpcmVjdGl2ZXMsIGRpcik7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIEFkZHMgYSBuZXcgYE5nTW9kZWxHcm91cGAgZGlyZWN0aXZlIGluc3RhbmNlIHRvIHRoZSBmb3JtLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/fSBkaXIgVGhlIGBOZ01vZGVsR3JvdXBgIGRpcmVjdGl2ZSBpbnN0YW5jZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGFkZEZvcm1Hcm91cChkaXIpIHsKICAgICAgICAgICAgcmVzb2x2ZWRQcm9taXNlLnRoZW4oKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgY29udGFpbmVyID0gdGhpcy5fZmluZENvbnRhaW5lcihkaXIucGF0aCk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBncm91cCA9IG5ldyBGb3JtR3JvdXAoe30pOwogICAgICAgICAgICAgICAgc2V0VXBGb3JtQ29udGFpbmVyKGdyb3VwLCBkaXIpOwogICAgICAgICAgICAgICAgY29udGFpbmVyLnJlZ2lzdGVyQ29udHJvbChkaXIubmFtZSwgZ3JvdXApOwogICAgICAgICAgICAgICAgZ3JvdXAudXBkYXRlVmFsdWVBbmRWYWxpZGl0eSh7IGVtaXRFdmVudDogZmFsc2UgfSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIFJlbW92ZXMgdGhlIGBOZ01vZGVsR3JvdXBgIGRpcmVjdGl2ZSBpbnN0YW5jZSBmcm9tIHRoZSBmb3JtLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/fSBkaXIgVGhlIGBOZ01vZGVsR3JvdXBgIGRpcmVjdGl2ZSBpbnN0YW5jZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlbW92ZUZvcm1Hcm91cChkaXIpIHsKICAgICAgICAgICAgcmVzb2x2ZWRQcm9taXNlLnRoZW4oKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgY29udGFpbmVyID0gdGhpcy5fZmluZENvbnRhaW5lcihkaXIucGF0aCk7CiAgICAgICAgICAgICAgICBpZiAoY29udGFpbmVyKSB7CiAgICAgICAgICAgICAgICAgICAgY29udGFpbmVyLnJlbW92ZUNvbnRyb2woZGlyLm5hbWUpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBSZXRyaWV2ZXMgdGhlIGBGb3JtR3JvdXBgIGZvciBhIHByb3ZpZGVkIGBOZ01vZGVsR3JvdXBgIGRpcmVjdGl2ZSBpbnN0YW5jZQogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/fSBkaXIgVGhlIGBOZ01vZGVsR3JvdXBgIGRpcmVjdGl2ZSBpbnN0YW5jZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldEZvcm1Hcm91cChkaXIpIHsKICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovICh0aGlzLmZvcm0uZ2V0KGRpci5wYXRoKSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIHRoZSBuZXcgdmFsdWUgZm9yIHRoZSBwcm92aWRlZCBgTmdDb250cm9sYCBkaXJlY3RpdmUuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez99IGRpciBUaGUgYE5nQ29udHJvbGAgZGlyZWN0aXZlIGluc3RhbmNlLgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUgVGhlIG5ldyB2YWx1ZSBmb3IgdGhlIGRpcmVjdGl2ZSdzIGNvbnRyb2wuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB1cGRhdGVNb2RlbChkaXIsIHZhbHVlKSB7CiAgICAgICAgICAgIHJlc29sdmVkUHJvbWlzZS50aGVuKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGN0cmwgPSAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5mb3JtLmdldCgoLyoqIEB0eXBlIHs/fSAqLyAoZGlyLnBhdGgpKSkpKTsKICAgICAgICAgICAgICAgIGN0cmwuc2V0VmFsdWUodmFsdWUpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBTZXRzIHRoZSB2YWx1ZSBmb3IgdGhpcyBgRm9ybUdyb3VwYC4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUgVGhlIG5ldyB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0VmFsdWUodmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5jb250cm9sLnNldFZhbHVlKHZhbHVlKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIE1ldGhvZCBjYWxsZWQgd2hlbiB0aGUgInN1Ym1pdCIgZXZlbnQgaXMgdHJpZ2dlcmVkIG9uIHRoZSBmb3JtLgogICAgICAgICAqIFRyaWdnZXJzIHRoZSBgbmdTdWJtaXRgIGVtaXR0ZXIgdG8gZW1pdCB0aGUgInN1Ym1pdCIgZXZlbnQgYXMgaXRzIHBheWxvYWQuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez99ICRldmVudCBUaGUgInN1Ym1pdCIgZXZlbnQgb2JqZWN0CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvblN1Ym1pdCgkZXZlbnQpIHsKICAgICAgICAgICAgKCgvKiogQHR5cGUgez99ICovICh0aGlzKSkpLnN1Ym1pdHRlZCA9IHRydWU7CiAgICAgICAgICAgIHN5bmNQZW5kaW5nQ29udHJvbHModGhpcy5mb3JtLCB0aGlzLl9kaXJlY3RpdmVzKTsKICAgICAgICAgICAgdGhpcy5uZ1N1Ym1pdC5lbWl0KCRldmVudCk7CiAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIE1ldGhvZCBjYWxsZWQgd2hlbiB0aGUgInJlc2V0IiBldmVudCBpcyB0cmlnZ2VyZWQgb24gdGhlIGZvcm0uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvblJlc2V0KCkgewogICAgICAgICAgICB0aGlzLnJlc2V0Rm9ybSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogUmVzZXRzIHRoZSBmb3JtIHRvIGFuIGluaXRpYWwgdmFsdWUgYW5kIHJlc2V0cyBpdHMgc3VibWl0dGVkIHN0YXR1cy4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7Pz19IHZhbHVlIFRoZSBuZXcgdmFsdWUgZm9yIHRoZSBmb3JtLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVzZXRGb3JtKHZhbHVlID0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgIHRoaXMuZm9ybS5yZXNldCh2YWx1ZSk7CiAgICAgICAgICAgICgoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpKS5zdWJtaXR0ZWQgPSBmYWxzZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9zZXRVcGRhdGVTdHJhdGVneSgpIHsKICAgICAgICAgICAgaWYgKHRoaXMub3B0aW9ucyAmJiB0aGlzLm9wdGlvbnMudXBkYXRlT24gIT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5mb3JtLl91cGRhdGVPbiA9IHRoaXMub3B0aW9ucy51cGRhdGVPbjsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICogQHBhcmFtIHs/fSBwYXRoCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZmluZENvbnRhaW5lcihwYXRoKSB7CiAgICAgICAgICAgIHBhdGgucG9wKCk7CiAgICAgICAgICAgIHJldHVybiBwYXRoLmxlbmd0aCA/ICgvKiogQHR5cGUgez99ICovICh0aGlzLmZvcm0uZ2V0KHBhdGgpKSkgOiB0aGlzLmZvcm07CiAgICAgICAgfQogICAgfQogICAgTmdGb3JtLsm1ZmFjID0gZnVuY3Rpb24gTmdGb3JtX0ZhY3RvcnkodCkgeyByZXR1cm4gbmV3ICh0IHx8IE5nRm9ybSkoybXJtWRpcmVjdGl2ZUluamVjdChOR19WQUxJREFUT1JTLCAxMCksIMm1ybVkaXJlY3RpdmVJbmplY3QoTkdfQVNZTkNfVkFMSURBVE9SUywgMTApKTsgfTsKICAgIE5nRm9ybS7JtWRpciA9IMm1ybVkZWZpbmVEaXJlY3RpdmUoeyB0eXBlOiBOZ0Zvcm0sIHNlbGVjdG9yczogW1siZm9ybSIsIDMsICJuZ05vRm9ybSIsICIiLCAzLCAiZm9ybUdyb3VwIiwgIiJdLCBbIm5nLWZvcm0iXSwgWyIiLCAibmdGb3JtIiwgIiJdXSwgaG9zdEJpbmRpbmdzOiBmdW5jdGlvbiBOZ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qKiBAdHlwZSB7P30gKi8gKHRoaXMuZm9ybURpcmVjdGl2ZSkpLmFkZEZvcm1Hcm91cCh0aGlzKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIEFuIGludGVybmFsIGNhbGxiYWNrIG1ldGhvZCB0cmlnZ2VyZWQgYmVmb3JlIHRoZSBpbnN0YW5jZSBpcyBkZXN0cm95ZWQuCiAgICAgICAgICogUmVtb3ZlcyB0aGUgZ3JvdXAgZnJvbSBpdHMgcGFyZW50IGdyb3VwLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkRlc3Ryb3koKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmZvcm1EaXJlY3RpdmUpIHsKICAgICAgICAgICAgICAgIHRoaXMuZm9ybURpcmVjdGl2ZS5yZW1vdmVGb3JtR3JvdXAodGhpcyk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIFRoZSBgRm9ybUdyb3VwYCBib3VuZCB0byB0aGlzIGRpcmVjdGl2ZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBjb250cm9sKCkgewogICAgICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuZm9ybURpcmVjdGl2ZSkpLmdldEZvcm1Hcm91cCh0aGlzKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIFRoZSBwYXRoIHRvIHRoaXMgZ3JvdXAgZnJvbSB0aGUgdG9wLWxldmVsIGRpcmVjdGl2ZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBwYXRoKCkgewogICAgICAgICAgICByZXR1cm4gY29udHJvbFBhdGgodGhpcy5uYW1lID09IG51bGwgPyB0aGlzLm5hbWUgOiB0aGlzLm5hbWUudG9TdHJpbmcoKSwgdGhpcy5fcGFyZW50KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIFRoZSB0b3AtbGV2ZWwgZGlyZWN0aXZlIGZvciB0aGlzIGdyb3VwIGlmIHByZXNlbnQsIG90aGVyd2lzZSBudWxsLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGZvcm1EaXJlY3RpdmUoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9wYXJlbnQgPyB0aGlzLl9wYXJlbnQuZm9ybURpcmVjdGl2ZSA6IG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBUaGUgc3luY2hyb25vdXMgdmFsaWRhdG9ycyByZWdpc3RlcmVkIHdpdGggdGhpcyBncm91cC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCB2YWxpZGF0b3IoKSB7CiAgICAgICAgICAgIHJldHVybiBjb21wb3NlVmFsaWRhdG9ycyh0aGlzLl92YWxpZGF0b3JzKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIFRoZSBhc3luYyB2YWxpZGF0b3JzIHJlZ2lzdGVyZWQgd2l0aCB0aGlzIGdyb3VwLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGFzeW5jVmFsaWRhdG9yKCkgewogICAgICAgICAgICByZXR1cm4gY29tcG9zZUFzeW5jVmFsaWRhdG9ycyh0aGlzLl9hc3luY1ZhbGlkYXRvcnMpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KIC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249J0NvbXBvbmVudCd9CiAgICAgKgogICAgICogXEBuZ01vZHVsZSBGb3Jtc01vZHVsZQogICAgICogXEBwdWJsaWNBcGkKICAgICAqLwogICAgY2xhc3MgTmdNb2RlbEdyb3VwIGV4dGVuZHMgQWJzdHJhY3RGb3JtR3JvdXBEaXJlY3RpdmUgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gcGFyZW50CiAgICAgICAgICogQHBhcmFtIHs/fSB2YWxpZGF0b3JzCiAgICAgICAgICogQHBhcmFtIHs/fSBhc3luY1ZhbGlkYXRvcnMKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihwYXJlbnQsIHZhbGlkYXRvcnMsIGFzeW5jVmFsaWRhdG9ycykgewogICAgICAgICAgICBzdXBlcigpOwogICAgICAgICAgICB0aGlzLl9wYXJlbnQgPSBwYXJlbnQ7CiAgICAgICAgICAgIHRoaXMuX3ZhbGlkYXRvcnMgPSB2YWxpZGF0b3JzOwogICAgICAgICAgICB0aGlzLl9hc3luY1ZhbGlkYXRvcnMgPSBhc3luY1ZhbGlkYXRvcnM7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9jaGVja1BhcmVudFR5cGUoKSB7CiAgICAgICAgICAgIGlmICghKHRoaXMuX3BhcmVudCBpbnN0YW5jZW9mIE5nTW9kZWxHcm91cCkgJiYgISh0aGlzLl9wYXJlbnQgaW5zdGFuY2VvZiBOZ0Zvcm0pKSB7CiAgICAgICAgICAgICAgICBUZW1wbGF0ZURyaXZlbkVycm9ycy5tb2RlbEdyb3VwUGFyZW50RXhjZXB0aW9uKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICBOZ01vZGVsR3JvdXAuybVmYWMgPSBmdW5jdGlvbiBOZ01vZGVsR3JvdXBfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgK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SBpcwogICAgICogdXNlZCB3aXRoaW4gYSBjdXN0b20gZm9ybSBjb21wb25lbnQsIGFuZCB0aGUgbmFtZSBgXEBJbnB1dGAgcHJvcGVydHkgc2VydmVzIGEgZGlmZmVyZW50IHB1cnBvc2UuCiAgICAgKgogICAgICogYGBgaHRtbAogICAgICogPGZvcm0+CiAgICAgKiAgIDxteS1wZXJzb24tY29udHJvbCBuYW1lPSJOYW5jeSIgbmdNb2RlbCBbbmdNb2RlbE9wdGlvbnNdPSJ7bmFtZTogJ3VzZXInfSI+CiAgICAgKiAgIDwvbXktcGVyc29uLWNvbnRyb2w+CiAgICAgKiA8L2Zvcm0+CiAgICAgKiA8IS0tIGZvcm0gdmFsdWU6IHt1c2VyOiAnJ30gLS0+CiAgICAgKiBgYGAKICAgICAqCiAgICAgKiBcQG5nTW9kdWxlIEZvcm1zTW9kdWxlCiAgICAgKiBcQHB1YmxpY0FwaQogICAgICovCiAgICBjbGFzcyBOZ01vZGVsIGV4dGVuZHMgTmdDb250cm9sIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHBhcmVudAogICAgICAgICAqIEBwYXJhbSB7P30gdmFsaWRhdG9ycwogICAgICAgICAqIEBwYXJhbSB7P30gYXN5bmNWYWxpZGF0b3JzCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZUFjY2Vzc29ycwogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKHBhcmVudCwgdmFsaWRhdG9ycywgYXN5bmNWYWxpZGF0b3JzLCB2YWx1ZUFjY2Vzc29ycykgewogICAgICAgICAgICBzdXBlcigpOwogICAgICAgICAgICB0aGlzLmNvbnRyb2wgPSBuZXcgRm9ybUNvbnRyb2woKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX3JlZ2lzdGVyZWQgPSBmYWxzZTsKICAgICAgICAgICAgLyoqCiAgICAgICAg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29udHJvbCgpOwogICAgICAgICAgICBpZiAoJ2lzRGlzYWJsZWQnIGluIGNoYW5nZXMpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3VwZGF0ZURpc2FibGVkKGNoYW5nZXMpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChpc1Byb3BlcnR5VXBkYXRlZChjaGFuZ2VzLCB0aGlzLnZpZXdNb2RlbCkpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3VwZGF0ZVZhbHVlKHRoaXMubW9kZWwpOwogICAgICAgICAgICAgICAgdGhpcy52aWV3TW9kZWwgPSB0aGlzLm1vZGVsOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBMaWZlY3ljbGUgbWV0aG9kIGNhbGxlZCBiZWZvcmUgdGhlIGRpcmVjdGl2ZSdzIGluc3RhbmNlIGlzIGRlc3Ryb3llZC4gRm9yIGludGVybmFsCiAgICAgICAgICogdXNlIG9ubHkuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uRGVzdHJveSgpIHsKICAgICAgICAgICAgdGhpcy5mb3JtRGlyZWN0aXZlICYmIHRoaXMuZm9ybURpcmVjdGl2ZS5yZW1vdmVDb250cm9sKHRoaXMpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogUmV0dXJucyBhbiBhcnJheSB0aGF0IHJlcHJlc2VudHMgdGhlIHBhdGggZnJvbSB0aGUgdG9wLWxldmVsIGZvcm0gdG8gdGhpcyBjb250cm9sLgogICAgICAgICAqIEVhY2ggaW5kZXggaXMgdGhlIHN0cmluZyBuYW1lIG9mIHRoZSBjb250cm9sIG9uIHRoYXQgbGV2ZWwuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgcGF0aCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3BhcmVudCA/IGNvbnRyb2xQYXRoKHRoaXMubmFtZSwgdGhpcy5fcGFyZW50KSA6IFt0aGlzLm5hbWVdOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogVGhlIHRvcC1sZXZlbCBkaXJlY3RpdmUgZm9yIHRoaXMgY29udHJvbCBpZiBwcmVzZW50LCBvdGhlcndpc2UgbnVsbC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBmb3JtRGlyZWN0aXZlKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fcGFyZW50ID8gdGhpcy5fcGFyZW50LmZvcm1EaXJlY3RpdmUgOiBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogU3luY2hyb25vdXMgdmFsaWRhdG9yIGZ1bmN0aW9uIGNvbXBvc2VkIG9mIGFsbCB0aGUgc3luY2hyb25vdXMgdmFsaWRhdG9ycwogICAgICAgICAqIHJlZ2lzdGVyZWQgd2l0aCB0aGlzIGRpcmVjdGl2ZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCB2YWxpZGF0b3IoKSB7CiAgICAgICAgICAgIHJldHVybiBjb21wb3NlVmFsaWRhdG9ycyh0aGlzLl9yYXdWYWxpZGF0b3JzKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIEFzeW5jIHZhbGlkYXRvciBmdW5jdGlvbiBjb21wb3NlZCBvZiBhbGwgdGhlIGFzeW5jIHZhbGlkYXRvcnMgcmVnaXN0ZXJlZCB3aXRoIHRoaXMKICAgICAgICAgKiBkaXJlY3RpdmUuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgYXN5bmNWYWxpZGF0b3IoKSB7CiAgICAgICAgICAgIHJldHVybiBjb21wb3NlQXN5bmNWYWxpZGF0b3JzKHRoaXMuX3Jhd0FzeW5jVmFsaWRhdG9ycyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBTZXRzIHRoZSBuZXcgdmFsdWUgZm9yIHRoZSB2aWV3IG1vZGVsIGFuZCBlbWl0cyBhbiBgbmdNb2RlbENoYW5nZWAgZXZlbnQuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez99IG5ld1ZhbHVlIFRoZSBuZXcgdmFsdWUgZW1pdHRlZCBieSBgbmdNb2RlbENoYW5nZWAuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB2aWV3VG9Nb2RlbFVwZGF0ZShuZXdWYWx1ZSkgewogICAgICAgICAgICB0aGlzLnZpZXdNb2RlbCA9IG5ld1ZhbHVlOwogICAgICAgICAgICB0aGlzLnVwZGF0ZS5lbWl0KG5ld1ZhbHVlKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9zZXRVcENvbnRyb2woKSB7CiAgICAgICAgICAgIHRoaXMuX3NldFVwZGF0ZVN0cmF0ZWd5KCk7CiAgICAgICAgICAgIHRoaXMuX2lzU3RhbmRhbG9uZSgpID8gdGhpcy5fc2V0VXBTdGFuZGFsb25lKCkgOiB0aGlzLmZvcm1EaXJlY3RpdmUuYWRkQ29udHJvbCh0aGlzKTsKICAgICAgICAgICAgdGhpcy5fcmVnaXN0ZXJlZCA9IHRydWU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfc2V0VXBkYXRlU3RyYXRlZ3koKSB7CiAgICAgICAgICAgIGlmICh0aGlzLm9wdGlvbnMgJiYgdGhpcy5vcHRpb25zLnVwZGF0ZU9uICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIHRoaXMuY29udHJvbC5fdXBkYXRlT24gPSB0aGlzLm9wdGlvbnMudXBkYXRlT247CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9pc1N0YW5kYWxvbmUoKSB7CiAgICAgICAgICAgIHJldHVybiAhdGhpcy5fcGFyZW50IHx8ICEhKHRoaXMub3B0aW9ucyAmJiB0aGlzLm9wdGlvbnMuc3RhbmRhbG9uZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfc2V0VXBTdGFuZGFsb25lKCkgewogICAgICAgICAgICBzZXRVcENvbnRyb2wodGhpcy5jb250cm9sLCB0aGlzKTsKICAgICAgICAgICAgdGhpcy5jb250cm9sLnVwZGF0ZVZhbHVlQW5kVmFsaWRpdHkoeyBlbWl0RXZlbnQ6IGZhbHNlIH0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2NoZWNrRm9yRXJyb3JzKCkgewogICAgICAgICAgICBpZiAoIXRoaXMuX2lzU3RhbmRhbG9uZSgpKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9jaGVja1BhcmVudFR5cGUoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9jaGVja05hbWUoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9jaGVja1BhcmVudFR5cGUoKSB7CiAgICAgICAgICAgIGlmICghKHRoaXMuX3BhcmVudCBpbnN0YW5jZW9mIE5nTW9kZWxHcm91cCkgJiYKICAgICAgICAgICAgICAgIHRoaXMuX3BhcmVudCBpbnN0YW5jZW9mIEFic3RyYWN0Rm9ybUdyb3VwRGlyZWN0aXZlKSB7CiAgICAgICAgICAgICAgICBUZW1wbGF0ZURyaXZlbkVycm9ycy5mb3JtR3JvdXBOYW1lRXhjZXB0aW9uKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoISh0aGlzLl9wYXJlbnQgaW5zdGFuY2VvZiBOZ01vZGVsR3JvdXApICYmICEodGhpcy5fcGFyZW50IGluc3RhbmNlb2YgTmdGb3JtKSkgewogICAgICAgICAgICAgICAgVGVtcGxhdGVEcml2ZW5FcnJvcnMubW9kZWxQYXJlbnRFeGNlcHRpb24oKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2NoZWNrTmFtZSgpIHsKICAgICAgICAgICAgaWYgKHRoaXMub3B0aW9ucyAmJiB0aGlzLm9wdGlvbnMubmFtZSkKICAgICAgICAgICAgICAgIHRoaXMubmFtZSA9IHRoaXMub3B0aW9ucy5uYW1lOwogICAgICAgICAgICBpZiAoIXRoaXMuX2lzU3RhbmRhbG9uZSgpICYmICF0aGlzLm5hbWUpIHsKICAgICAgICAgICAgICAgIFRlbXBsYXRlRHJpdmVuRXJyb3JzLm1pc3NpbmdOYW1lRXhjZXB0aW9uKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfdXBkYXRlVmFsdWUodmFsdWUpIHsKICAgICAgICAgICAgcmVzb2x2ZWRQcm9taXNlJDEudGhlbigoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLmNvbnRyb2wuc2V0VmFsdWUodmFsdWUsIHsgZW1pdFZpZXdUb01vZGVsQ2hhbmdlOiBmYWxzZSB9KTsKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gY2hhbmdlcwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3VwZGF0ZURpc2FibGVkKGNoYW5nZXMpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBkaXNhYmxlZFZhbHVlID0gY2hhbmdlc1snaXNEaXNhYmxlZCddLmN1cnJlbnRWYWx1ZTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBpc0Rpc2FibGVkID0gZGlzYWJsZWRWYWx1ZSA9PT0gJycgfHwgKGRpc2FibGVkVmFsdWUgJiYgZGlzYWJsZWRWYWx1ZSAhPT0gJ2ZhbHNlJyk7CiAgICAgICAgICAgIHJlc29sdmVkUHJvbWlzZSQxLnRoZW4oKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgaWYgKGlzRGlzYWJsZWQgJiYgIXRoaXMuY29udHJvbC5kaXNhYmxlZCkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuY29udHJvbC5kaXNhYmxlKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmICghaXNEaXNhYmxlZCAmJiB0aGlzLmNvbnRyb2wuZGlzYWJsZWQpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLmNvbnRyb2wuZW5hYmxlK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ltcGxlX2Zvcm1fY29udHJvbF9leGFtcGxlLnRzIHJlZ2lvbj0nQ29tcG9uZW50J30KICAgICAqCiAgICAgKiBcQG5nTW9kdWxlIFJlYWN0aXZlRm9ybXNNb2R1bGUKICAgICAqIFxAcHVibGljQXBpCiAgICAgKi8KICAgIGNsYXNzIEZvcm1Db250cm9sRGlyZWN0aXZlIGV4dGVuZHMgTmdDb250cm9sIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbGlkYXRvcnMKICAgICAgICAgKiBAcGFyYW0gez99IGFzeW5jVmFsaWRhdG9ycwogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWVBY2Nlc3NvcnMKICAgICAgICAgKiBAcGFyYW0gez99IF9uZ01vZGVsV2FybmluZ0NvbmZpZwogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKHZhbGlkYXRvcnMsIGFzeW5jVmFsaWRhdG9ycywgdmFsdWVBY2Nlc3NvcnMsIF9uZ01vZGVsV2FybmluZ0NvbmZpZykgewogICAgICAgICAgICBzdXBlcigpOwogICAgICAgICAgICB0aGlzLl9uZ01vZGVsV2FybmluZ0NvbmZpZyA9IF9uZ01vZGVsV2FybmluZ0NvbmZpZzsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEBkZXByZWNhdGVkIGFzIG9mIHY2CiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLnVwZGF0ZSA9IG5ldyBFdmVudEVtaXR0ZXIoKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgICAgICogSW5zdGFuY2UgcHJvcGVydHkgdXNlZCB0byB0cmFjayB3aGV0aGVyIGFuIG5nTW9kZWwgd2FybmluZyBoYXMgYmVlbiBzZW50IG91dCBmb3IgdGhpcwogICAgICAgICAgICAgKiBwYXJ0aWN1bGFyIGBGb3JtQ29udHJvbERpcmVjdGl2ZWAgaW5zdGFuY2UuIFVzZWQgdG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yBhbiBhcnJheSB0aGF0IHJlcHJlc2VudHMgdGhlIHBhdGggZnJvbSB0aGUgdG9wLWxldmVsIGZvcm0gdG8gdGhpcyBjb250cm9sLgogICAgICAgICAqIEVhY2ggaW5kZXggaXMgdGhlIHN0cmluZyBuYW1lIG9mIHRoZSBjb250cm9sIG9uIHRoYXQgbGV2ZWwuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgcGF0aCgpIHsKICAgICAgICAgICAgcmV0dXJuIFtdOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogU3luY2hyb25vdXMgdmFsaWRhdG9yIGZ1bmN0aW9uIGNvbXBvc2VkIG9mIGFsbCB0aGUgc3luY2hyb25vdXMgdmFsaWRhdG9ycwogICAgICAgICAqIHJlZ2lzdGVyZWQgd2l0aCB0aGlzIGRpcmVjdGl2ZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCB2YWxpZGF0b3IoKSB7CiAgICAgICAgICAgIHJldHVybiBjb21wb3NlVmFsaWRhdG9ycyh0aGlzLl9yYXdWYWxpZGF0b3JzKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIEFzeW5jIHZhbGlkYXRvciBmdW5jdGlvbiBjb21wb3NlZCBvZiBhbGwgdGhlIGFzeW5jIHZhbGlkYXRvcnMgcmVnaXN0ZXJlZCB3aXRoIHRoaXMKICAgICAgICAgKiBkaXJlY3RpdmUuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgYXN5bmNWYWxpZGF0b3IoKSB7CiAgICAgICAgICAgIHJldHVybiBjb21wb3NlQXN5bmNWYWxpZGF0b3JzKHRoaXMuX3Jhd0FzeW5jVmFsaWRhdG9ycyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBUaGUgYEZvcm1Db250cm9sYCBib3VuZCB0byB0aGlzIGRpcmVjdGl2ZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBjb250cm9sKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5mb3JtOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogU2V0cyB0aGUgbmV3IHZhbHVlIGZvciB0aGUgdmlldyBtb2RlbCBhbmQgZW1pdHMgYW4gYG5nTW9kZWxDaGFuZ2VgIGV2ZW50LgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/fSBuZXdWYWx1ZSBUaGUgbmV3IHZhbHVlIGZvciB0aGUgdmlldyBtb2RlbC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHZpZXdUb01vZGVsVXBkYXRlKG5ld1ZhbHVlKSB7CiAgICAgICAgICAgIHRoaXMudmlld01vZGVsID0gbmV3VmFsdWU7CiAgICAgICAgICAgIHRoaXMudXBkYXRlLmVtaXQobmV3VmFsdWUpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gY2hhbmdlcwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2lzQ29udHJvbENoYW5nZWQoY2hhbmdlcykgewogICAgICAgICAgICByZXR1cm4gY2hhbmdlcy5oYXNPd25Qcm9wZXJ0eSgnZm9ybScpOwogICAgICAgIH0KICAgIH0KICAgIEZvcm1Db250cm9sRGlyZWN0aXZlLsm1ZmFjID0gZnVuY3Rpb24gRm9ybUNvbnRyb2xEaXJlY3RpdmVfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgRm9ybUNvbnRyb2xEaXJlY3RpdmUpKMm1ybVkaXJlY3Rpdm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ZhbGlkYXRvcnMpIHsKICAgICAgICAgICAgc3VwZXIoKTsKICAgICAgICAgICAgdGhpcy5fdmFsaWRhdG9ycyA9IF92YWxpZGF0b3JzOwogICAgICAgICAgICB0aGlzLl9hc3luY1ZhbGlkYXRvcnMgPSBfYXN5bmNWYWxpZGF0b3JzOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAgICAgKiBSZXBvcnRzIHdoZXRoZXIgdGhlIGZvcm0gc3VibWlzc2lvbiBoYXMgYmVlbiB0cmlnZ2VyZWQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLnN1Ym1pdHRlZCA9IGZhbHNlOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAgICAgKiBUcmFja3MgdGhlIGxpc3Qgb2YgYWRkZWQgYEZvcm1Db250cm9sTmFtZWAgaW5zdGFuY2VzCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmRpcmVjdGl2ZXMgPSBbXTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgICAgICogVHJhY2tzIHRoZSBgRm9ybUdyb3VwYCBib3VuZCB0byB0aGlzIGRpcmVjdGl2ZS4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuZm9ybSA9ICgvKiogQHR5cGUgez99ICovIChudWxsKSk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICAgICAqIEVtaXRzIGFuIGV2ZW50IHdoZW4gdGhlIGZvcm0gc3VibWlzc2lvbiBoYXMgYmVlbiB0cmlnZ2VyZWQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLm5nU3VibWl0ID0gbmV3IEV2ZW50RW1pdHRlcigpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogQSBsaWZlY3ljbGUgbWV0aG9kIGNhbGxlZCB3aGVuIHRoZSBkaXJlY3RpdmUncyBpbnB1dHMgY2hhbmdlLiBGb3IgaW50ZXJuYWwgdXNlIG9ubHkuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez99IGNoYW5nZXMgQSBvYmplY3Qgb2Yga2V5L3ZhbHVlIHBhaXJzIGZvciB0aGUgc2V0IG9mIGNoYW5nZWQgaW5wdXRzLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkNoYW5nZXMoY2hhbmdlcykgewogICAgICAgICAgICB0aGlzLl9jaGVja0Zvcm1QcmVzZW50KCk7CiAgICAgICAgICAgIGlmIChjaGFuZ2VzLmhhc093blByb3BlcnR5KCdmb3JtJykpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3VwZGF0ZVZhbGlkYXRvcnMoKTsKICAgICAgICAgICAgICAgIHRoaXMuX3VwZGF0ZURvbVZhbHVlKCk7CiAgICAgICAgICAgICAgICB0aGlzLl91cGRhdGVSZWdpc3RyYXRpb25zKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIFJldHVybnMgdGhpcyBkaXJlY3RpdmUncyBpbnN0YW5jZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBmb3JtRGlyZWN0aXZlKCkgewogICAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIFJldHVybnMgdGhlIGBGb3JtR3JvdXBgIGJvdW5kIHRvIHRoaXMgZGlyZWN0aXZlLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGNvbnRyb2woKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmZvcm07CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBSZXR1cm5zIGFuIGFycmF5IHJlcHJlc2VudGluZyB0aGUgcGF0aCB0byB0aGlzIGdyb3VwLiBCZWNhdXNlIHRoaXMgZGlyZWN0aXZlCiAgICAgICAgICogYWx3YXlzIGxpdmVzIGF0IHRoZSB0b3AgbGV2ZWwgb2YgYSBmb3JtLCBpdCBhbHdheXMgYW4gZW1wdHkgYXJyYXkuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgcGF0aCgpIHsKICAgICAgICAgICAgcmV0dXJuIFtdOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogTWV0aG9kIHRoYXQgc2V0cyB1cCB0aGUgY29udHJvbCBkaXJlY3RpdmUgaW4gdGhpcyBncm91cCwgcmUtY2FsY3VsYXRlcyBpdHMgdmFsdWUKICAgICAgICAgKiBhbmQgdmFsaWRpdHksIGFuZCBhZGRzIHRoZSBpbnN0YW5jZSB0byB0aGUgaW50ZXJuYWwgbGlzdCBvZiBkaXJlY3RpdmVzLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/fSBkaXIgVGhlIGBGb3JtQ29udHJvbE5hbWVgIGRpcmVjdGl2ZSBpbnN0YW5jZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGFkZENvbnRyb2woZGlyKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgY3RybCA9IHRoaXMuZm9ybS5nZXQoZGlyLnBhdGgpOwogICAgICAgICAgICBzZXRVcENvbnRyb2woY3RybCwgZGlyKTsKICAgICAgICAgICAgY3RybC51cGRhdGVWYWx1ZUFuZFZhbGlkaXR5KHsgZW1pdEV2ZW50OiBmYWxzZSB9KTsKICAgICAgICAgICAgdGhpcy5kaXJlY3RpdmVzLnB1c2goZGlyKTsKICAgICAgICAgICAgcmV0dXJuIGN0cmw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBSZXRyaWV2ZXMgdGhlIGBGb3JtQ29udHJvbGAgaW5zdGFuY2UgZnJvbSB0aGUgcHJvdmlkZWQgYEZvcm1Db250cm9sTmFtZWAgZGlyZWN0aXZlCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez99IGRpciBUaGUgYEZvcm1Db250cm9sTmFtZWAgZGlyZWN0aXZlIGluc3RhbmNlLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0Q29udHJvbChkaXIpIHsKICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovICh0aGlzLmZvcm0uZ2V0KGRpci5wYXRoKSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogUmVtb3ZlcyB0aGUgYEZvcm1Db250cm9sTmFtZWAgaW5zdGFuY2UgZnJvbSB0aGUgaW50ZXJuYWwgbGlzdCBvZiBkaXJlY3RpdmVzCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez99IGRpciBUaGUgYEZvcm1Db250cm9sTmFtZWAgZGlyZWN0aXZlIGluc3RhbmNlLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVtb3ZlQ29udHJvbChkaXIpIHsKICAgICAgICAgICAgcmVtb3ZlRGlyKHRoaXMuZGlyZWN0aXZlcywgZGlyKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQWRkcyBhIG5ldyBgRm9ybUdyb3VwTmFtZWAgZGlyZWN0aXZlIGluc3RhbmNlIHRvIHRoZSBmb3JtLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/fSBkaXIgVGhlIGBGb3JtR3JvdXBOYW1lYCBkaXJlY3RpdmUgaW5zdGFuY2UuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBhZGRGb3JtR3JvdXAoZGlyKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgY3RybCA9IHRoaXMuZm9ybS5nZXQoZGlyLnBhdGgpOwogICAgICAgICAgICBzZXRVcEZvcm1Db250YWluZXIoY3RybCwgZGlyKTsKICAgICAgICAgICAgY3RybC51cGRhdGVWYWx1ZUFuZFZhbGlkaXR5KHsgZW1pdEV2ZW50OiBmYWxzZSB9KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogTm8tb3AgbWV0aG9kIHRvIHJlbW92ZSB0aGUgZm9ybSBncm91cC4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7P30gZGlyIFRoZSBgRm9ybUdyb3VwTmFtZWAgZGlyZWN0aXZlIGluc3RhbmNlLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVtb3ZlRm9ybUdyb3VwKGRpcikgeyB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIFJldHJpZXZlcyB0aGUgYEZvcm1Hcm91cGAgZm9yIGEgcHJvdmlkZWQgYEZvcm1Hcm91cE5hbWVgIGRpcmVjdGl2ZSBpbnN0YW5jZQogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/fSBkaXIgVGhlIGBGb3JtR3JvdXBOYW1lYCBkaXJlY3RpdmUgaW5zdGFuY2UuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXRGb3JtR3JvdXAoZGlyKSB7CiAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5mb3JtLmdldChkaXIucGF0aCkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQWRkcyBhIG5ldyBgRm9ybUFycmF5TmFtZWAgZGlyZWN0aXZlIGluc3RhbmNlIHRvIHRoZSBmb3JtLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/fSBkaXIgVGhlIGBGb3JtQXJyYXlOYW1lYCBkaXJlY3RpdmUgaW5zdGFuY2UuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBhZGRGb3JtQXJyYXkoZGlyKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgY3RybCA9IHRoaXMuZm9ybS5nZXQoZGlyLnBhdGgpOwogICAgICAgICAgICBzZXRVcEZvcm1Db250YWluZXIoY3RybCwgZGlyKTsKICAgICAgICAgICAgY3RybC51cGRhdGVWYWx1ZUFuZFZhbGlkaXR5KHsgZW1pdEV2ZW50OiBmYWxzZSB9KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogTm8tb3AgbWV0aG9kIHRvIHJlbW92ZSB0aGUgZm9ybSBhcnJheS4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7P30gZGlyIFRoZSBgRm9ybUFycmF5TmFtZWAgZGlyZWN0aXZlIGluc3RhbmNlLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVtb3ZlRm9ybUFycmF5KGRpcikgeyB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIFJldHJpZXZlcyB0aGUgYEZvcm1BcnJheWAgZm9yIGEgcHJvdmlkZWQgYEZvcm1BcnJheU5hbWVgIGRpcmVjdGl2ZSBpbnN0YW5jZS4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7P30gZGlyIFRoZSBgRm9ybUFycmF5TmFtZWAgZGlyZWN0aXZlIGluc3RhbmNlLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0Rm9ybUFycmF5KGRpcikgewogICAgICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuZm9ybS5nZXQoZGlyLnBhdGgpKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgdGhlIG5ldyB2YWx1ZSBmb3IgdGhlIHByb3ZpZGVkIGBGb3JtQ29udHJvbE5hbWVgIGRpcmVjdGl2ZS4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7P30gZGlyIFRoZSBgRm9ybUNvbnRyb2xOYW1lYCBkaXJlY3RpdmUgaW5zdGFuY2UuCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZSBUaGUgbmV3IHZhbHVlIGZvciB0aGUgZGlyZWN0aXZlJ3MgY29udHJvbC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHVwZGF0ZU1vZGVsKGRpciwgdmFsdWUpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjdHJsID0gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuZm9ybS5nZXQoZGlyLnBhdGgpKSk7CiAgICAgICAgICAgIGN0cmwuc2V0VmFsdWUodmFsdWUpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogTWV0aG9kIGNhbGxlZCB3aXRoIHRoZSAic3VibWl0IiBldmVudCBpcyB0cmlnZ2VyZWQgb24gdGhlIGZvcm0uCiAgICAgICAgICogVHJpZ2dlcnMgdGhlIGBuZ1N1Ym1pdGAgZW1pdHRlciB0byBlbWl0IHRoZSAic3VibWl0IiBldmVudCBhcyBpdHMgcGF5bG9hZC4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7P30gJGV2ZW50IFRoZSAic3VibWl0IiBldmVudCBvYmplY3QKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uU3VibWl0KCRldmVudCkgewogICAgICAgICAgICAoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKSkuc3VibWl0dGVkID0gdHJ1ZTsKICAgICAgICAgICAgc3luY1BlbmRpbmdDb250cm9scyh0aGlzLmZvcm0sIHRoaXMuZGlyZWN0aXZlcyk7CiAgICAgICAgICAgIHRoaXMubmdTdWJtaXQuZW1pdCgkZXZlbnQpOwogICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBNZXRob2QgY2FsbGVkIHdoZW4gdGhlICJyZXNldCIgZXZlbnQgaXMgdHJpZ2dlcmVkIG9uIHRoZSBmb3JtLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25SZXNldCgpIHsKICAgICAgICAgICAgdGhpcy5yZXNldEZvcm0oKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIFJlc2V0cyB0aGUgZm9ybSB0byBhbiBpbml0aWFsIHZhbHVlIGFuZCByZXNldHMgaXRzIHN1Ym1pdHRlZCBzdGF0dXMuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez89fSB2YWx1ZSBUaGUgbmV3IHZhbHVlIGZvciB0aGUgZm9ybS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlc2V0Rm9ybSh2YWx1ZSA9IHVuZGVmaW5lZCkgewogICAgICAgICAgICB0aGlzLmZvcm0ucmVzZXQodmFsdWUpOwogICAgICAgICAgICAoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKSkuc3VibWl0dGVkID0gZmFsc2U7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF91cGRhdGVEb21WYWx1ZSgpIHsKICAgICAgICAgICAgdGhpcy5kaXJlY3RpdmVzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGRpcgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZGlyID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IG5ld0N0cmwgPSB0aGlzLmZvcm0uZ2V0KGRpci5wYXRoKTsKICAgICAgICAgICAgICAgIGlmIChkaXIuY29udHJvbCAhPT0gbmV3Q3RybCkgewogICAgICAgICAgICAgICAgICAgIGNsZWFuVXBDb250cm9sKGRpci5jb250cm9sLCBkaXIpOwogICAgICAgICAgICAgICAgICAgIGlmIChuZXdDdHJsKQogICAgICAgICAgICAgICAgICAgICAgICBzZXRVcENvbnRyb2wobmV3Q3RybCwgZGlyKTsKICAgICAgICAgICAgICAgICAgICAoKC8qKiBAdHlwZSB7P30gKi8gKGRpcikpKS5jb250cm9sID0gbmV3Q3RybDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB0aGlzLmZvcm0uX3VwZGF0ZVRyZWVWYWxpZGl0eSh7IGVtaXRFdmVudDogZmFsc2UgfSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfdXBkYXRlUmVnaXN0cmF0aW9ucygpIHsKICAgICAgICAgICAgdGhpcy5mb3JtLl9yZWdpc3Rlck9uQ29sbGVjdGlvbkNoYW5nZSgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB0aGlzLl91cGRhdGVEb21WYWx1ZSgpKSk7CiAgICAgICAgICAgIGlmICh0aGlzLl9vbGRGb3JtKQogICAgICAgICAgICAgICAgdGhpcy5fb2xkRm9ybS5fcmVnaXN0ZXJPbkNvbGxlY3Rpb25DaGFuZ2UoKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4geyB9KSk7CiAgICAgICAgICAgIHRoaXMuX29sZEZvcm0gPSB0aGlzLmZvcm07CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfdXBkYXRlVmFsaWRhdG9ycygpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBzeW5jID0gY29tcG9zZVZhbGlkYXRvcnModGhpcy5fdmFsaWRhdG9ycyk7CiAgICAgICAgICAgIHRoaXMuZm9ybS52YWxpZGF0b3IgPSBWYWxpZGF0b3JzLmNvbXBvc2UoWygvKiogQHR5cGUgez99ICovICh0aGlzLmZvcm0udmFsaWRhdG9yKSksICgvKiogQHR5cGUgez99ICovIChzeW5jKSldKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBhc3luYyA9IGNvbXBvc2VBc3luY1ZhbGlkYXRvcnModGhpcy5fYXN5bmNWYWxpZGF0b3JzKTsKICAgICAgICAgICAgdGhpcy5mb3JtLmFzeW5jVmFsaWRhdG9yID0gVmFsaWRhdG9ycy5jb21wb3NlQXN5bmMoWygvKiogQHR5cGUgez99ICovICh0aGlzLmZvcm0uYXN5bmNWYWxpZGF0b3IpKSwgKC8qKiBAdHlwZSB7P30gKi8gKGFzeW5jKSldKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9jaGVja0Zvcm1QcmVzZW50KCkgewogICAgICAgICAgICBpZiAoIXRoaXMuZm9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4KICAgICAgICAgKgogICAgICAgICAqIEB0aHJvd3MgSWYgdGhlIGRpcmVjdGl2ZSBkb2VzIG5vdCBoYXZlIGEgdmFsaWQgcGFyZW50LgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkluaXQoKSB7CiAgICAgICAgICAgIHRoaXMuX2NoZWNrUGFyZW50VHlwZSgpOwogICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5mb3JtRGlyZWN0aXZlKSkuYWRkRm9ybUFycmF5KHRoaXMpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogQSBsaWZlY3ljbGUgbWV0aG9kIGNhbGxlZCBiZWZvcmUgdGhlIGRpcmVjdGl2ZSdzIGluc3RhbmNlIGlzIGRlc3Ryb3llZC4gRm9yIGludGVybmFsIHVzZSBvbmx5LgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkRlc3Ryb3koKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmZvcm1EaXJlY3RpdmUpIHsKICAgICAgICAgICAgICAgIHRoaXMuZm9ybURpcmVjdGl2ZS5yZW1vdmVGb3JtQXJyYXkodGhpcyk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIFRoZSBgRm9ybUFycmF5YCBib3VuZCB0byB0aGlzIGRpcmVjdGl2ZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBjb250cm9sKCkgewogICAgICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuZm9ybURpcmVjdGl2ZSkpLmdldEZvcm1BcnJheSh0aGlzKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIFRoZSB0b3AtbGV2ZWwgZGlyZWN0aXZlIGZvciB0aGlzIGdyb3VwIGlmIHByZXNlbnQsIG90aGVyd2lzZSBudWxsLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGZvcm1EaXJlY3RpdmUoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9wYXJlbnQgPyAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5fcGFyZW50LmZvcm1EaXJlY3RpdmUpKSA6IG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBSZXR1cm5zIGFuIGFycmF5IHRoYXQgcmVwcmVzZW50cyB0aGUgcGF0aCBmcm9tIHRoZSB0b3AtbGV2ZWwgZm9ybSB0byB0aGlzIGNvbnRyb2wuCiAgICAgICAgICogRWFjaCBpbmRleCBpcyB0aGUgc3RyaW5nIG5hbWUgb2YgdGhlIGNvbnRyb2wgb24gdGhhdCBsZXZlbC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBwYXRoKCkgewogICAgICAgICAgICByZXR1cm4gY29udHJvbFBhdGgodGhpcy5uYW1lID09IG51bGwgPyB0aGlzLm5hbWUgOiB0aGlzLm5hbWUudG9TdHJpbmcoKSwgdGhpcy5fcGFyZW50KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIFN5bmNocm9ub3VzIHZhbGlkYXRvciBmdW5jdGlvbiBjb21wb3NlZCBvZiBhbGwgdGhlIHN5bmNocm9ub3VzIHZhbGlkYXRvcnMgcmVnaXN0ZXJlZCB3aXRoIHRoaXMKICAgICAgICAgKiBkaXJlY3RpdmUuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgdmFsaWRhdG9yKCkgewogICAgICAgICAgICByZXR1cm4gY29tcG9zZV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XRhaWxzLCBzZWUgW0RlcHJlY2F0ZWQgZmVhdHVyZXNdKGd1aWRlL2RlcHJlY2F0aW9ucyNuZ21vZGVsLXdpdGgtcmVhY3RpdmUtZm9ybXMpLgogICAgICoKICAgICAqIFxAbmdNb2R1bGUgUmVhY3RpdmVGb3Jtc01vZHVsZQogICAgICogXEBwdWJsaWNBcGkKICAgICAqLwogICAgY2xhc3MgRm9ybUNvbnRyb2xOYW1lIGV4dGVuZHMgTmdDb250cm9sIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHBhcmVudAogICAgICAgICAqIEBwYXJhbSB7P30gdmFsaWRhdG9ycwogICAgICAgICAqIEBwYXJhbSB7P30gYXN5bmNWYWxpZGF0b3JzCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZUFjY2Vzc29ycwogICAgICAgICAqIEBwYXJhbSB7P30gX25nTW9kZWxXYXJuaW5nQ29uZmlnCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IocGFyZW50LCB2YWxpZGF0b3JzLCBhc3luY1ZhbGlkYXRvcnMsIHZhbHVlQWNjZXNzb3JzLCBfbmdNb2RlbFdhcm5pbmdDb25maWcpIHsKICAgICAgICAgICAgc3VwZXIoKTsKICAgICAgICAgICAgdGhpcy5fbmdNb2RlbFdhcm5pbmdDb25maWcgPSBfbmdNb2RlbFdhcm5pbmdDb25maWc7CiAgICAgICAgICAgIHRoaXMuX2FkZGVkID0gZmFsc2U7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBAZGVwcmVjYXRlZCBhcyBvZiB2NgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy51cGRhdGUgPSBuZXcgRXZlbnRFbWl0dGVyKCk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICAgICAqIEluc3RhbmNlIHByb3BlcnR5IHVzZWQgdG8gdHJhY2sgd2hldGhlciBhbiBuZ01vZGVsIH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dGl2ZSdzIGlucHV0cyBjaGFuZ2UuIEZvciBpbnRlcm5hbCB1c2Ugb25seS4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7P30gY2hhbmdlcyBBIG9iamVjdCBvZiBrZXkvdmFsdWUgcGFpcnMgZm9yIHRoZSBzZXQgb2YgY2hhbmdlZCBpbnB1dHMuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uQ2hhbmdlcyhjaGFuZ2VzKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5fYWRkZWQpCiAgICAgICAgICAgICAgICB0aGlzLl9zZXRVcENvbnRyb2woKTsKICAgICAgICAgICAgaWYgKGlzUHJvcGVydHlVcGRhdGVkKGNoYW5nZXMsIHRoaXMudmlld01vZGVsKSkgewogICAgICAgICAgICAgICAgX25nTW9kZWxXYXJuaW5nKCdmb3JtQ29udHJvbE5hbWUnLCBGb3JtQ29udHJvbE5hbWUsIHRoaXMsIHRoaXMuX25nTW9kZWxXYXJuaW5nQ29uZmlnKTsKICAgICAgICAgICAgICAgIHRoaXMudmlld01vZGVsID0gdGhpcy5tb2RlbDsKICAgICAgICAgICAgICAgIHRoaXMuZm9ybURpcmVjdGl2ZS51cGRhdGVNb2RlbCh0aGlzLCB0aGlzLm1vZGVsKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogTGlmZWN5Y2xlIG1ldGhvZCBjYWxsZWQgYmVmb3JlIHRoZSBkaXJlY3RpdmUncyBpbnN0YW5jZSBpcyBkZXN0cm95ZWQuIEZvciBpbnRlcm5hbCB1c2Ugb25seS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25EZXN0cm95KCkgewogICAgICAgICAgICBpZiAodGhpcy5mb3JtRGlyZWN0aXZlKSB7CiAgICAgICAgICAgICAgICB0aGlzLmZvcm1EaXJlY3RpdmUucmVtb3ZlQ29udHJvbCh0aGlzKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogU2V0cyB0aGUgbmV3IHZhbHVlIGZvciB0aGUgdmlldyBtb2RlbCBhbmQgZW1pdHMgYW4gYG5nTW9kZWxDaGFuZ2VgIGV2ZW50LgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/fSBuZXdWYWx1ZSBUaGUgbmV3IHZhbHVlIGZvciB0aGUgdmlldyBtb2RlbC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHZpZXdUb01vZGVsVXBkYXRlKG5ld1ZhbHVlKSB7CiAgICAgICAgICAgIHRoaXMudmlld01vZGVsID0gbmV3VmFsdWU7CiAgICAgICAgICAgIHRoaXMudXBkYXRlLmVtaXQobmV3VmFsdWUpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogUmV0dXJucyBhbiBhcnJheSB0aGF0IHJlcHJlc2VudHMgdGhlIHBhdGggZnJvbSB0aGUgdG9wLWxldmVsIGZvcm0gdG8gdGhpcyBjb250cm9sLgogICAgICAgICAqIEVhY2ggaW5kZXggaXMgdGhlIHN0cmluZyBuYW1lIG9mIHRoZSBjb250cm9sIG9uIHRoYXQgbGV2ZWwuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgcGF0aCgpIHsKICAgICAgICAgICAgcmV0dXJuIGNvbnRyb2xQYXRoKHRoaXMubmFtZSA9PSBudWxsID8gdGhpcy5uYW1lIDogdGhpcy5uYW1lLnRvU3RyaW5nKCksICgvKiogQHR5cGUgez99ICovICh0aGlzLl9wYXJlbnQpKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBUaGUgdG9wLWxldmVsIGRpcmVjdGl2ZSBmb3IgdGhpcyBncm91cCBpZiBwcmVzZW50LCBvdGhlcndpc2UgbnVsbC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBmb3JtRGlyZWN0aXZlKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fcGFyZW50ID8gdGhpcy5fcGFyZW50LmZvcm1EaXJlY3RpdmUgOiBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogU3luY2hyb25vdXMgdmFsaWRhdG9yIGZ1bmN0aW9uIGNvbXBvc2VkIG9mIGFsbCB0aGUgc3luY2hyb25vdXMgdmFsaWRhdG9ycwogICAgICAgICAqIHJlZ2lzdGVyZWQgd2l0aCB0aGlzIGRpcmVjdGl2ZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCB2YWxpZGF0b3IoKSB7CiAgICAgICAgICAgIHJldHVybiBjb21wb3NlVmFsaWRhdG9ycyh0aGlzLl9yYXdWYWxpZGF0b3JzKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIEFzeW5jIHZhbGlkYXRvciBmdW5jdGlvbiBjb21wb3NlZCBvZiBhbGwgdGhlIGFzeW5jIHZhbGlkYXRvcnMgcmVnaXN0ZXJlZCB3aXRoIHRoaXMKICAgICAgICAgKiBkaXJlY3RpdmUuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgYXN5bmNWYWxpZGF0b3IoKSB7CiAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAoY29tcG9zZUFzeW5jVmFsaWRhdG9ycyh0aGlzLl9yYXdBc3luY1ZhbGlkYXRvcnMpKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfY2hlY2tQYXJlbnRUeXBlKCkgewogICAgICAgICAgICBpZiAoISh0aGlzLl9wYXJlbnQgaW5zdGFuY2VvZiBGb3JtR3JvdXBOYW1lKSAmJgogICAgICAgICAgICAgICAgdGhpcy5fcGFyZW50IGluc3RhbmNlb2YgQWJzdHJhY3RGb3JtR3JvdXBEaXJlY3RpdmUpIHsKICAgICAgICAgICAgICAgIFJlYWN0aXZlRXJyb3JzLm5nTW9kZWxHcm91cEV4Y2VwdGlvbigpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKCEodGhpcy5fcGFyZW50IGluc3RhbmNlb2YgRm9ybUdyb3VwTmFtZSkgJiYgISh0aGlzLl9wYXJlbnQgaW5zdGFuY2VvZiBGb3JtR3JvdXBEaXJlY3RpdmUpICYmCiAgICAgICAgICAgICAgICAhKHRoaXMuX3BhcmVudCBpbnN0YW5jZW9mIEZvcm1BcnJheU5hbWUpKSB7CiAgICAgICAgICAgICAgICBSZWFjdGl2ZUVycm9ycy5jb250cm9sUGFyZW50RXhjZXB0aW9uKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9zZXRVcENvbnRyb2woKSB7CiAgICAgICAgICAgIHRoaXMuX2NoZWNrUGFyZW50VHlwZSgpOwogICAgICAgICAgICAoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKSkuY29udHJvbCA9IHRoaXMuZm9ybURpcmVjdGl2ZS5hZGRDb250cm9sKHRoaXMpOwogICAgICAgICAgICBpZiAodGhpcy5jb250cm9sLmRpc2FibGVkICYmICgvKiogQHR5cGUgez99ICovICh0aGlzLnZhbHVlQWNjZXNzb3IpKS5zZXREaXNhYmxlZFN0YXRlKSB7CiAgICAgICAgICAgICAgICAoLyoqIEB0eXBlIHs/f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IFJlYWN0aXZlRm9ybXNNb2R1bGUKICAgICAqIFxAcHVibGljQXBpCiAgICAgKi8KICAgIGNsYXNzIFJlcXVpcmVkVmFsaWRhdG9yIHsKICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogVHJhY2tzIGNoYW5nZXMgdG8gdGhlIHJlcXVpcmVkIGF0dHJpYnV0ZSBib3VuZCB0byB0aGlzIGRpcmVjdGl2ZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCByZXF1aXJlZCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3JlcXVpcmVkOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgcmVxdWlyZWQodmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5fcmVxdWlyZWQgPSB2YWx1ZSAhPSBudWxsICYmIHZhbHVlICE9PSBmYWxzZSAmJiBgJHt2YWx1ZX1gICE9PSAnZmFsc2UnOwogICAgICAgICAgICBpZiAodGhpcy5fb25DaGFuZ2UpCiAgICAgICAgICAgICAgICB0aGlzLl9vbkNoYW5nZSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogTWV0aG9kIHRoYXQgdmFsaWRhdGVzIHdoZXRoZXIgdGhlIGNvbnRyb2wgaXMgZW1wdHkuCiAgICAgICAgICogUmV0dXJucyB0aGUgdmFsaWRhdGlvbiByZXN1bHQgaWYgZW5hYmxlZCwgb3RoZXJ3aXNlIG51bGwuCiAgICAgICAgICogQHBhcmFtIHs/fSBjb250cm9sCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB2YWxpZGF0ZShjb250cm9sKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLnJlcXVpcm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BcQG5nTW9kdWxlIFJlYWN0aXZlRm9ybXNNb2R1bGUKICAgICAqLwogICAgY2xhc3MgRW1haWxWYWxpZGF0b3IgewogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBUcmFja3MgY2hhbmdlcyB0byB0aGUgZW1haWwgYXR0cmlidXRlIGJvdW5kIHRvIHRoaXMgZGlyZWN0aXZlLgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBlbWFpbCh2YWx1ZSkgewogICAgICAgICAgICB0aGlzLl9lbmFibGVkID0gdmFsdWUgPT09ICcnIHx8IHZhbHVlID09PSB0cnVlIHx8IHZhbHVlID09PSAndHJ1ZSc7CiAgICAgICAgICAgIGlmICh0aGlzLl9vbkNoYW5nZSkKICAgICAgICAgICAgICAgIHRoaXMuX29uQ2hhbmdlKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBNZXRob2QgdGhhdCB2YWxpZGF0ZXMgd2hldGhlciBhbiBlbWFpbCBhZGRyZXNzIGlzIHZhbGlkLgogICAgICAgICAqIFJldHVybnMgdGhlIHZhbGlkYXRpb24gcmVzdWx0IGlmIGVuYWJsZWQsIG90aGVyd2lzZSBudWxsLgogICAgICAgICAqIEBwYXJhbSB7P30gY29udHJvbAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdmFsaWRhdGUoY29udHJvbCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fZW5hYmxlZCA/IFZhbGlkYXRvcnMuZW1haWwoY29udHJvbCkgOiBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogUmVnaXN0ZXJzIGEgY2FsbGJhY2sgZnVuY3Rpb24gdG8gY2FsbCB3aGVuIHRoZ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Y0FwaQogICAgICovCiAgICBjbGFzcyBNaW5MZW5ndGhWYWxpZGF0b3IgewogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBBIGxpZmVjeWNsZSBtZXRob2QgY2FsbGVkIHdoZW4gdGhlIGRpcmVjdGl2ZSdzIGlucHV0cyBjaGFuZ2UuIEZvciBpbnRlcm5hbCB1c2UKICAgICAgICAgKiBvbmx5LgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/fSBjaGFuZ2VzIEEgb2JqZWN0IG9mIGtleS92YWx1ZSBwYWlycyBmb3IgdGhlIHNldCBvZiBjaGFuZ2VkIGlucHV0cy4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25DaGFuZ2VzKGNoYW5nZXMpIHsKICAgICAgICAgICAgaWYgKCdtaW5sZW5ndGgnIGluIGNoYW5nZXMpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2NyZWF0ZVZhbGlkYXRvcigpOwogICAgICAgICAgICAgICAgaWYgKHRoaXMuX29uQ2hhbmdlKQogICAgICAgICAgICAgICAgICAgIHRoaXMuX29uQ2hhbmdlKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogXEBkZXNjcmlwdGlvbgogICAgICAgICAqIE1ldGhvZCB0aGF0IHZhbGlkYXRlcyB3aGV0aGVyIHRoZSB2YWx1ZSBtZWV0cyBhIG1pbmltdW0gbGVuZ3RoCiAgICAgICAgICogcmVxdWlyZW1lbnQuIFJldHVybnMgdGhlIHZhbGlkYXRpb24gcmVzdWx0IGlmIGVuYWJsZWQsIG90aGVyd2lzZSBudWxsLgogICAgICAgICAqIEBwYXJhbSB7P30gY29udHJvbAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdmFsaWRhdGUoY29udHJvbCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5taW5sZW5ndGggPT0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AgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7P30gY2hhbmdlcyBBIG9iamVjdCBvZiBrZXkvdmFsdWUgcGFpcnMgZm9yIHRoZSBzZXQgb2YgY2hhbmdlZCBpbnB1dHMuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uQ2hhbmdlcyhjaGFuZ2VzKSB7CiAgICAgICAgICAgIGlmICgnbWF4bGVuZ3RoJyBpbiBjaGFuZ2VzKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9jcmVhdGVWYWxpZGF0b3IoKTsKICAgICAgICAgICAgICAgIGlmICh0aGlzLl9vbkNoYW5nZSkKICAgICAgICAgICAgICAgICAgICB0aGlzLl9vbkNoYW5nZSgpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBNZXRob2QgdGhhdCB2YWxpZGF0ZXMgd2hldGhlciB0aGUgdmFsdWUgZXhjZWVkcwogICAgICAgICAqIHRoZSBtYXhpbXVtIGxlbmd0aCByZXF1aXJlbWVudC4KICAgICAgICAgKiBAcGFyYW0gez99IGNvbnRyb2wKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHZhbGlkYXRlKGNvbnRyb2wpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMubWF4bGVuZ3RoICE9IG51bGwgPyB0aGlzLl92YWxpZGF0b3IoY29udHJvbCkgOiBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogUmVnaXN0ZXJzIGEgY2FsbGJhY2sgZnVuY3Rpb24gdG8gY2FsbCB3aGVuIHRoZSB2YWxpZGF0b3IgaW5wdXRzIGNoYW5nZS4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7P30gZm4gVGhlIGNhbGxiYWNrIGZ1bmN0aW9uCiAgICAgICAgICog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icgaW4gY2hhbmdlcykgewogICAgICAgICAgICAgICAgdGhpcy5fY3JlYXRlVmFsaWRhdG9yKCk7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5fb25DaGFuZ2UpCiAgICAgICAgICAgICAgICAgICAgdGhpcy5fb25DaGFuZ2UoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGRlc2NyaXB0aW9uCiAgICAgICAgICogTWV0aG9kIHRoYXQgdmFsaWRhdGVzIHdoZXRoZXIgdGhlIHZhbHVlIG1hdGNoZXMgdGhlCiAgICAgICAgICogdGhlIHBhdHRlcm4gcmVxdWlyZW1lbnQuCiAgICAgICAgICogQHBhcmFtIHs/fSBjb250cm9sCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB2YWxpZGF0ZShjb250cm9sKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl92YWxpZGF0b3IoY29udHJvbCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAZGVzY3JpcHRpb24KICAgICAgICAgKiBSZWdpc3RlcnMgYSBjYWxsYmFjayBmdW5jdGlvbiB0byBjYWxsIHdoZW4gdGhlIHZhbGlkYXRvciBpbnB1dHMgY2hhbmdlLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/fSBmbiBUaGUgY2FsbGJhY2sgZnVuY3Rpb24KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlZ2lzdGVyT25WYWxpZGF0b3JDaGFuZ2UoZm4pIHsKICAgICAgICAgICAgdGhpcy5fb25DaGFuZ2UgPSBmbjsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9jcmVhdGVWYWxpZGF0b3IoKSB7CiAgICAgICAgICAgIHRoaXMuX3ZhbGlkYXRvciA9IFZhbGlkY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ICBSYWRpb0NvbnRyb2xWYWx1ZUFjY2Vzc29yLAogICAgICAgICAgICBOZ0NvbnRyb2xTdGF0dXMsCiAgICAgICAgICAgIE5nQ29udHJvbFN0YXR1c0dyb3VwLAogICAgICAgICAgICBSZXF1aXJlZFZhbGlkYXRvciwKICAgICAgICAgICAgTWluTGVuZ3RoVmFsaWRhdG9yLAogICAgICAgICAgICBNYXhMZW5ndGhWYWxpZGF0b3IsCiAgICAgICAgICAgIFBhdHRlcm5WYWxpZGF0b3IsCiAgICAgICAgICAgIENoZWNrYm94UmVxdWlyZWRWYWxpZGF0b3IsCiAgICAgICAgICAgIEVtYWlsVmFsaWRhdG9yXSwgZXhwb3J0czogW8m1TmdOb1ZhbGlkYXRlLAogICAgICAgICAgICBOZ1NlbGVjdE9wdGlvbiwKICAgICAgICAgICAgybVOZ1NlbGVjdE11bHRpcGxlT3B0aW9uLAogICAgICAgICAgICBEZWZhdWx0VmFsdWVBY2Nlc3NvciwKICAgICAgICAgICAgTnVtYmVyVmFsdWVBY2Nlc3NvciwKICAgICAgICAgICAgUmFuZ2VWYWx1ZUFjY2Vzc29yLAogICAgICAgICAgICBDaGVja2JveENvbnRyb2xWYWx1ZUFjY2Vzc29yLAogICAgICAgICAgICBTZWxlY3RDb250cm9sVmFsdWVBY2Nlc3NvciwKICAgICAgICAgICAgU2VsZWN0TXVsdGlwbGVDb250cm9sVmFsdWVBY2Nlc3NvciwKICAgICAgICAgICAgUmFkaW9Db250cm9sVmFsdWVBY2Nlc3NvciwKICAgICAgICAgICAgTmdDb250cm9sU3RhdHVzLAogICAgICAgICAgICBOZ0NvbnRyb2xTdGF0dXNHcm91cCwKICAgICAgICAgICAgUmVxdWlyZWRWYWxpZGF0b3IsCiAgICAgICAgICAgIE1pbkxlbmd0aFZhbGlkYXRvciwKICAgICAgICAgICAgTWF4TGVuZ3RoVmFsaWRhdG9yLAogICAgICAgICAgICBQYXR0ZXJuVmFsaWRhdG9yLAogICAgICAgICAgICBDaGVja2JveF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AgKiAqIGBhc3luY1ZhbGlkYXRvcnNgOiBBIHNpbmdsZSBhc3luYyB2YWxpZGF0b3Igb3IgYXJyYXkgb2YgYXN5bmMgdmFsaWRhdG9yIGZ1bmN0aW9ucwogICAgICAgICAqICogYHVwZGF0ZU9uYDogVGhlIGV2ZW50IHVwb24gd2hpY2ggdGhlIGNvbnRyb2wgc2hvdWxkIGJlIHVwZGF0ZWQgKG9wdGlvbnM6ICdjaGFuZ2UnIHwgJ2JsdXInIHwKICAgICAgICAgKiBzdWJtaXQnKQogICAgICAgICAqCiAgICAgICAgICogMikgTGVnYWN5IGNvbmZpZ3VyYXRpb24gb2JqZWN0LCB3aGljaCBjb25zaXN0cyBvZjoKICAgICAgICAgKiAqIGB2YWxpZGF0b3JgOiBBIHN5bmNocm9ub3VzIHZhbGlkYXRvciBmdW5jdGlvbiwgb3IgYW4gYXJyYXkgb2YgdmFsaWRhdG9yIGZ1bmN0aW9ucwogICAgICAgICAqICogYGFzeW5jVmFsaWRhdG9yYDogQSBzaW5nbGUgYXN5bmMgdmFsaWRhdG9yIG9yIGFycmF5IG9mIGFzeW5jIHZhbGlkYXRvciBmdW5jdGlvbnMKICAgICAgICAgKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ3JvdXAoY29udHJvbHNDb25maWcsIG9wdGlvbnMgPSBudWxsKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgY29udHJvbHMgPSB0aGlzLl9yZWR1Y2VDb250cm9scyhjb250cm9sc0NvbmZpZyk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHZhbGlkYXRvcnMgPSBudWxsOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBhc3luY1ZhbGlkYXRvcnMgPSBudWxsOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCB1cGRhdGVPbiA9IHVuZGVmaW5lZDsKICAgICAgICAgICAgaWYgKG9wdGlvbnMgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgaWYgKGlzQWJzdHJhY3RDb250cm9sT3B0aW9ucyhvcHRpb25zKSkgewogICAgICAgICAgICAgICAgICAgIC8vIGBvcHRpb25zYCBhcmUgYEFic3RyYWN0Q29udHJvbE9wdGlvbnNgCiAgICAgICAgICAgICAgICAgICAgdmFsaWRhdG9ycyA9IG9wdGlvbnMudmFsaWRhdG9ycyAhPSBudWxsID8gb3B0aW9ucy52YWxpZGF0b3JzIDogbnVsbDsKICAgICAgICAgICAgICAgICAgICBhc3luY1ZhbGlkYXRvcnMgPSBvcHRpb25zLmFzeW5jVmFsaWRhdG9ycyAhPSBudWxsID8gb3B0aW9ucy5hc3luY1ZhbGlkYXRvcnMgOiBudWxsOwogICAgICAgICAgICAgICAgICAgIHVwZGF0ZU9uID0gb3B0aW9ucy51cGRhdGVPbiAhPSBudWxsID8gb3B0aW9ucy51cGRhdGVPbiA6IHVuZGVmaW5lZDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIC8vIGBvcHRpb25zYCBhcmUgbGVnYWN5IGZvcm0gZ3JvdXAgb3B0aW9ucwogICAgICAgICAgICAgICAgICAgIHZhbGlkYXRvcnMgPSBvcHRpb25zWyd2YWxpZGF0b3InXSAhPSBudWxsID8gb3B0aW9uc1sndmFsaWRhdG9yJ10gOiBudWxsOwogICAgICAgICAgICAgICAgICAgIGFzeW5jVmFsaWRhdG9ycyA9IG9wdGlvbnNbJ2FzeW5jVmFsaWRhdG9yJ10gIT0gbnVsbCA/IG9wdGlvbnNbJ2FzeW5jVmFsaWRhdG9yJ10gOiBudWxsOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBuZXcgRm9ybUdyb3VwKGNvbnRyb2xzLCB7IGFzeW5jVmFsaWRhdG9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jdCB0aGF0IGNvbnRhaW5zCiAgICAgICAgICogdmFsaWRhdGlvbiBmdW5jdGlvbnMgYW5kIGEgdmFsaWRhdGlvbiB0cmlnZ2VyLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/PX0gYXN5bmNWYWxpZGF0b3IgQSBzaW5nbGUgYXN5bmMgdmFsaWRhdG9yIG9yIGFycmF5IG9mIGFzeW5jIHZhbGlkYXRvcgogICAgICAgICAqIGZ1bmN0aW9ucy4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGFycmF5KGNvbnRyb2xzQ29uZmlnLCB2YWxpZGF0b3JPck9wdHMsIGFzeW5jVmFsaWRhdG9yKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgY29udHJvbHMgPSBjb250cm9sc0NvbmZpZy5tYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGMKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGMgPT4gdGhpcy5fY3JlYXRlQ29udHJvbChjKSkpOwogICAgICAgICAgICByZXR1cm4gbmV3IEZvcm1BcnJheShjb250cm9scywgdmFsaWRhdG9yT3JPcHRzLCBhc3luY1ZhbGlkYXRvcik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgKiBAcGFyYW0gez99IGNvbnRyb2xzQ29uZmlnCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfcmVkdWNlQ29udHJvbHMoY29udHJvbHNDb25maWcpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjb250cm9scyA9IHt9OwogICAgICAgICAgICBPYmplY3Qua2V5cyhjb250cm9sc0NvbmZpZykuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY29udHJvbE5hbWUKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGNvbnRyb2xOYW1lID0+IHsKICAgICAgICAgICAgICAgIGNvbnRyb2xzW2NvbnRyb2xOYW1lXSA9IHRoaXMuX2NyZWF0ZUNvbnRyb2woY29udHJvbHNDb25maWdbY29udHJvbE5hbWVdKTsKICAgICAgICAgICAgfSkpOwogICAgICAgICAgICByZXR1cm4gY29udHJvbHM7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFxAaW50ZXJuYWwKICAgICAgICAgKiBAcGFyYW0gez99IGNvbnRyb2xDb25maWcKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9jcmVhdGVDb250cm9sKGNvbnRyb2xDb25maWcpIHsKICAgICAgICAgICAgaWYgKGNvbnRyb2xDb25maWcgaW5zdGFuY2VvZiBGb3JtQ29udHJvbCB8fCBjb250cm9sQ29uZmlnIGluc3RhbmNlb2YgRm9ybUdyb3VwIHx8CiAgICAgICAgICAgICAgICBjb250cm9sQ29uZmlnIGluc3RhbmNlb2YgRm9ybUFycmF5KSB7CiAgICAgICAgICAgICAgICByZXR1cm4gY29udHJvbENvbmZpZzsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChBcnJheS5pc0FycmF5KGNvbnRyb2xDb25maWcpKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCB2YWx1ZSA9IGNvbnRyb2xDb25maWdbMF07CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCB2YWxpZGF0b3IgPSBjb250cm9sQ29uZmlnLmxlbmd0aCA+IDEgPyBjb250cm9sQ29uZmlnWzFdIDogbnVsbDsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGFzeW5jVmFsaW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ICAgIHRyYW5zZm9ybTogJ3NjYWxlWSgwLjgpJywKICAgICAgICAgICAgICAgIG1pbldpZHRoOiAnMTAwJScsCiAgICAgICAgICAgICAgICBvcGFjaXR5OiAwCiAgICAgICAgICAgIH0pKSwKICAgICAgICAgICAgc3RhdGUoJ3Nob3dpbmcnLCBzdHlsZSh7CiAgICAgICAgICAgICAgICBvcGFjaXR5OiAxLAogICAgICAgICAgICAgICAgbWluV2lkdGg6ICdjYWxjKDEwMCUgKyAzMnB4KScsCiAgICAgICAgICAgICAgICAvLyAzMnB4ID0gMiAqIDE2cHggcGFkZGluZwogICAgICAgICAgICAgICAgdHJhbnNmb3JtOiAnc2NhbGVZKDEpJwogICAgICAgICAgICB9KSksCiAgICAgICAgICAgIHN0YXRlKCdzaG93aW5nLW11bHRpcGxlJywgc3R5bGUoewogICAgICAgICAgICAgICAgb3BhY2l0eTogMSwKICAgICAgICAgICAgICAgIG1pbldpZHRoOiAnY2FsYygxMDAlICsgNjRweCknLAogICAgICAgICAgICAgICAgLy8gNjRweCA9IDQ4cHggcGFkZGluZyBvbiB0aGUgbGVmdCArIDE2cHggcGFkZGluZyBvbiB0aGUgcmlnaHQKICAgICAgICAgICAgICAgIHRyYW5zZm9ybTogJ3NjYWxlWSgxKScKICAgICAgICAgICAgfSkpLAogICAgICAgICAgICB0cmFuc2l0aW9uKCd2b2lkID0+IConLCBhbmltYXRlKCcxMjBtcyBjdWJpYy1iZXppZXIoMCwgMCwgMC4yLCAxKScpKSwKICAgICAgICAgICAgdHJhbnNpdGlvbignKiA9PiB2b2lkJywgYW5pbWF0ZSgnMTAwbXMgMjVtcyBsaW5lYXInLCBzdHlsZSh7IG9wYWNpdHk6IDAgfSkpKQogICAgICAgIF0pCiAgICB9OwoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogc3JjL21hdGVyaWFsL3NlbGVjdC9zZWxlY3QtZXJyb3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ICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHNvdXJjZQogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3Rvcihzb3VyY2UsIHZhbHVlKSB7CiAgICAgICAgICAgIHRoaXMuc291cmNlID0gc291cmNlOwogICAgICAgICAgICB0aGlzLnZhbHVlID0gdmFsdWU7CiAgICAgICAgfQogICAgfQogICAgLy8gQm9pbGVycGxhdGUgZm9yIGFwcGx5aW5nIG1peGlucyB0byBNYXRTZWxlY3QuCiAgICAvKioKICAgICAqIFxAZG9jcy1wcml2YXRlCiAgICAgKi8KICAgIGNsYXNzIE1hdFNlbGVjdEJhc2UgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gX2VsZW1lbnRSZWYKICAgICAgICAgKiBAcGFyYW0gez99IF9kZWZhdWx0RXJyb3JTdGF0ZU1hdGNoZXIKICAgICAgICAgKiBAcGFyYW0gez99IF9wYXJlbnRGb3JtCiAgICAgICAgICogQHBhcmFtIHs/fSBfcGFyZW50Rm9ybUdyb3VwCiAgICAgICAgICogQHBhcmFtIHs/fSBuZ0NvbnRyb2wKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihfZWxlbWVudFJlZiwgX2RlZmF1bHRFcnJvclN0YXRlTWF0Y2hlciwgX3BhcmVudEZvcm0sIF9wYXJlbnRGb3JtR3JvdXAsIG5nQ29udHJvbCkgewogICAgICAgICAgICB0aGlzLl9lbGVtZW50UmVmID0gX2VsZW1lbnRSZWY7CiAgICAgICAgICAgIHRoaXMuX2RlZmF1bHRFcnJvclN0YXRlTWF0Y2hlciA9IF9kZWZhdWx0RXJyb3JTdGF0ZU1hdGNoZXI7CiAgICAgICAgICAgIHRoaXMuX3BhcmVudEZvcm0gPSBfcGFyZW50Rm9ybTsKICAgICAgICAgICAgdGhpcy5fcGFyZW50Rm9ybUdyb3VwID0gX3BhcmVudEZvcm1Hcm91cDsKICAgICA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y5fcGFyZW50Rm9ybUZpZWxkID0gX3BhcmVudEZvcm1GaWVsZDsKICAgICAgICAgICAgdGhpcy5uZ0NvbnRyb2wgPSBuZ0NvbnRyb2w7CiAgICAgICAgICAgIHRoaXMuX2xpdmVBbm5vdW5jZXIgPSBfbGl2ZUFubm91bmNlcjsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFdoZXRoZXIgb3Igbm90IHRoZSBvdmVybGF5IHBhbmVsIGlzIG9wZW4uCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9wYW5lbE9wZW4gPSBmYWxzZTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFdoZXRoZXIgZmlsbGluZyBvdXQgdGhlIHNlbGVjdCBpcyByZXF1aXJlZCBpbiB0aGUgZm9ybS4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX3JlcXVpcmVkID0gZmFsc2U7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBUaGUgc2Nyb2xsIHBvc2l0aW9uIG9mIHRoZSBvdmVybGF5IHBhbmVsLCBjYWxjdWxhdGVkIHRvIGNlbnRlciB0aGUgc2VsZWN0ZWQgb3B0aW9uLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fc2Nyb2xsVG9wID0gMDsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFdoZXRoZXIgdGhlIGNvbXBvbmVudCBpcyBpbiBtdWx0aXBsZSBzZWxlY3Rpb24gbW9kZS4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX211bHRpcGxlID0gZmFsc2U7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBDb21wYXJpc29uIGZ1bmN0aW9uIHRvIHNwZWNpZnkgd2hpY2ggb3B0aW9uIGlzIGRpc3BsYXllZC4gRGVmYXVsdHMgdG8gb2JqZWN0IGVxdWFsaXR5LgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fY29tcGFyZVdpdGggPSAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbzEKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBvMgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKG8xLCBvMikgPT4gbzEgPT09IG8yKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFVuaXF1ZSBpZCBmb3IgdGhpcyBpbnB1dC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX3VpZCA9IGBtYXQtc2VsZWN0LSR7bmV4dFVuaXF1ZUlkJDQrK31gOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRW1pdHMgd2hlbmV2ZXIgdGhlIGNvbXBvbmVudCBpcyBkZXN0cm95ZWQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9kZXN0cm95ID0gbmV3IFN1YmplY3QoKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFRoZSBjYWNoZWQgZm9udC1zaXplIG9mIHRoZSB0cmlnZ2VyIGVsZW1lbnQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl90cmlnZ2VyRm9udFNpemUgPSAwOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogYFZpZXcgLT4gbW9kZWwgY2FsbGJhY2sgY2FsbGVkIHdoZW4gdmFsdWUgY2hhbmdlc2AKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX29uQ2hhbmdlID0gKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4geyB9KTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIGBWaWV3IC0+IG1vZGVsIGNhbGxiYWNrIGNhbGxlZCB3aGVuIHNlbGVjdCBoYXMgYmVlbiB0b3VjaGVkYAogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5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b3B0aW9uLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fb2Zmc2V0WSA9IDA7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBUaGlzIHBvc2l0aW9uIGNvbmZpZyBlbnN1cmVzIHRoYXQgdGhlIHRvcCAic3RhcnQiIGNvcm5lciBvZiB0aGUgb3ZlcmxheQogICAgICAgICAgICAgKiBpcyBhbGlnbmVkIHdpdGggd2l0aCB0aGUgdG9wICJzdGFydCIgb2YgdGhlIG9yaWdpbiBieSBkZWZhdWx0IChvdmVybGFwcGluZwogICAgICAgICAgICAgKiB0aGUgdHJpZ2dlciBjb21wbGV0ZWx5KS4gSWYgdGhlIHBhbmVsIGNhbm5vdCBmaXQgYmVsb3cgdGhlIHRyaWdnZXIsIGl0CiAgICAgICAgICAgICAqIHdpbGwgZmFsbCBiYWNrIHRvIGEgcG9zaXRpb24gYWJvdmUgdGhlIHRyaWdnZXIuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9wb3NpdGlvbnMgPSBbCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgb3JpZ2luWDogJ3N0YXJ0JywKICAgICAgICAgICAgICAgICAgICBvcmlnaW5ZOiAndG9wJywKICAgICAgICAgICAgICAgICAgICBvdmVybGF5WDogJ3N0YXJ0JywKICAgICAgICAgICAgICAgICAgICBvdmVybGF5WTogJ3RvcCcsCiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgIG9yaWdpblg6ICdzdGFydCcsCiAgICAgICAgICAgICAgICAgICAgb3JpZ2luWTogJ2JvdHRvbScsCiAgICAgICAgICAgICAgICAgICAgb3ZlcmxheVg6ICdzdGFydCcsCiAgICAgICAgICAgICAgICAgICAgb3ZlcmxheVk6ICdib3R0b20nLAogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgXTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFdoZXRoZXIgdGhlIGNvbXBvbmVudCBpcyBkaXNhYmxpbmcgY2VudGVyaW5nIG9mIHRoZSBhY3RpdmUgb3B0aW9uIG92ZXIgdGhlIHRyaWdnZXIuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9kaXNhYmxlT3B0aW9uQ2VudGVyaW5nID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuX2ZvY3VzZWQgPSBmYWxzZTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEEgbmFtZSBmb3IgdGhpcyBjb250cm9sIHRoYXQgY2FuIGJlIHVzZWQgYnkgYG1hdC1mb3JtLWZpZWxkYC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuY29udHJvbFR5cGUgPSAnbWF0LXNlbGVjdCc7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBBcmlhIGxhYmVsIG9mIHRoZSBzZWxlY3QuIElmIG5vdCBzcGVjaWZpZWQsIHRoZSBwbGFjZWhvbGRlciB3aWxsIGJlIHVzZWQgYXMgbGFiZWwuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmFyaWFMYWJlbCA9ICcnOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQ29tYmluZWQgc3RyZWFtIG9mIGFsbCBvZiB0aGUgY2hpbGQgb3B0aW9ucycgY2hhbmdlIGV2ZW50cy4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMub3B0aW9uU2VsZWN0aW9uQ2hhbmdlcyA9ICgvKiogQHR5cGUgez99ICovIChkZWZlcigoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBvcHRpb25zID0gdGhpcy5vcHRpb25zOwogICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gb3B0aW9ucy5jaGFuZ2VzLnBpcGUoc3RhcnRXaXRoKG9wdGlvbnMpLCBzd2l0Y2hNYXAoKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKCkgPT4gbWVyZ2UoLi4ub3B0aW9ucy5tYXAoKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gb3B0aW9uCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICBvcHRpb24gPT4gb3B0aW9uLm9uU2VsZWN0aW9uQ2hhbmdlKSkpKSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX25nWm9uZS5vblN0YWJsZQogICAgICAgICAgICAgICAgICAgIC5hc09ic2VydmFibGUoKQogICAgICAgICAgICAgICAgICAgIC5waXBlKHRha2UoMSksIHN3aXRjaE1hcCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB0aGlzLm9wdGlvblNlbGVjdGlvbkNoYW5nZXMpKSk7CiAgICAgICAgICAgIH0pKSkpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRXZlbnQgZW1pdHRlZCB3aGVuIHRoZSBzZWxlY3QgcGFuZWwgaGFzIGJlZW4gdG9nZ2xlZC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMub3BlbmVkQ2hhbmdlID0gbmV3IEV2ZW50RW1pdHRlcigpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRXZlbnQgZW1pdHRlZCB3aGVuIHRoZSBzZWxlY3QgaGFzIGJlZW4gb3BlbmVkLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fb3BlbmVkU3RyZWFtID0gdGhpcy5vcGVuZWRDaGFuZ2UucGlwZShmaWx0ZXIoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IG8KICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIG8gPT4gbykpLCBtYXAoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4geyB9KSkpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRXZlbnQgZW1pdHRlZCB3aGVuIHRoZSBzZWxlY3QgaGFzIGJlZW4gY2xvc2VkLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fY2xvc2VkU3RyZWFtID0gdGhpcy5vcGVuZWRDaGFuZ2UucGlwZShmaWx0ZXIoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IG8KICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIG8gPT4gIW8pKSwgbWFwKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsgfSkpKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEV2ZW50IGVtaXR0ZWQgd2hlbiB0aGUgc2VsZWN0ZWQgdmFsdWUgaGFzIGJlZW4gY2hhbmdlZCBieSB0aGUgdXNlci4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuc2VsZWN0aW9uQ2hhbmdlID0gbmV3IEV2ZW50RW1pdHRlcigpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRXZlbnQgdGhhdCBlbWl0cyB3aGVuZXZlciB0aGUgcmF3IHZhbHVlIG9mIHRoZSBzZWxlY3QgY2hhbmdlcy4gVGhpcyBpcyBoZXJlIHByaW1hcmlseQogICAgICAgICAgICAgKiB0byBmYWNpbGl0YXRlIHRoZSB0d28td2F5IGJpbmRpbm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ZzsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChkZWZhdWx0cy50eXBlYWhlYWREZWJvdW5jZUludGVydmFsICE9IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLnR5cGVhaGVhZERlYm91bmNlSW50ZXJ2YWwgPSBkZWZhdWx0cy50eXBlYWhlYWREZWJvdW5jZUludGVydmFsOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFdoZXRoZXIgdGhlIHNlbGVjdCBpcyBmb2N1c2VkLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGZvY3VzZWQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9mb2N1c2VkIHx8IHRoaXMuX3BhbmVsT3BlbjsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUGxhY2Vob2xkZXIgdG8gYmUgc2hvd24gaWYgbm8gdmFsdWUgaGFzIGJlZW4gc2VsZWN0ZWQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgcGxhY2Vob2xkZXIoKSB7IHJldHVybiB0aGlzLl9wbGFjZWhvbGRlcjsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBwbGFjZWhvbGRlcih2YWx1ZSkgewogICAgICAgICAgICB0aGlzLl9wbGFjZWhvbGRlciA9IHZhbHVlOwogICAgICAgICAgICB0aGlzLnN0YXRlQ2hhbmdlcy5uZXh0KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFdoZXRoZXIgdGhlIGNvbXBvbmVudCBpcyByZXF1aXJlZC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCByZXF1aXJlZCgpIHsgcmV0dXJuIHRoaXMuX3JlcXVpcmVkOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IHJlcXVpcmVkKHZhbHVlKSB7CiAgICAgICAgICAgIHRoaXMuX3JlcXVpcmVkID0gY29lcmNlQm9vbGVhblByb3BlcnR5KHZhbHVlKTsKICAgICAgICAgICAgdGhpcy5zdGF0ZUNoYW5nZXMubmV4dCgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGV0aGVyIHRoZSB1c2VyIHNob3VsZCBiZSBhbGxvd2VkIHRvIHNlbGVjdCBtdWx0aXBsZSBvcHRpb25zLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IG11bHRpcGxlKCkgeyByZXR1cm4gdGhpcy5fbXVsdGlwbGU7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgbXVsdGlwbGUodmFsdWUpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX3NlbGVjdGlvbk1vZGVsKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBnZXRNYXRTZWxlY3REeW5hbWljTXVsdGlwbGVFcnJvcigpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX211bHRpcGxlID0gY29lcmNlQm9vbGVhblByb3BlcnR5KHZhbHVlKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogV2hldGhlciB0byBjZW50ZXIgdGhlIGFjdGl2ZSBvcHRpb24gb3ZlciB0aGUgdHJpZ2dlci4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBkaXNhYmxlT3B0aW9uQ2VudGVyaW5nKCkgeyByZXR1cm4gdGhpcy5fZGlzYWJsZU9wdGlvbkNlbnRlcmluZzsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBkaXNhYmxlT3B0aW9uQ2VudGVyaW5nKHZhbHVlKSB7CiAgICAgICAgICAgIHRoaXMuX2Rpc2FibGVPcHRpb25DZW50ZXJpbmcgPSBjb2VyY2VCb29sZWFuUHJvcGVydHkodmFsdWUpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBGdW5jdGlvbiB0byBjb21wYXJlIHRoZSBvcHRpb24gdmFsdWVzIHdpdGggdGhlIHNlbGVjdGVkIHZhbHVlcy4gVGhlIGZpcnN0IGFyZ3VtZW50CiAgICAgICAgICogaXMgYSB2YWx1ZSBmcm9tIGFuIG9wdGlvbi4gVGhlIHNlY29uZCBpcyBhIHZhbHVlIGZyb20gdGhlIHNlbGVjdGlvbi4gQSBib29sZWFuCiAgICAgICAgICogc2hvdWxkIGJlIHJldHVybmVkLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGNvbXBhcmVXaXRoKCkgeyByZXR1cm4gdGhpcy5fY29tcGFyZVdpdGg7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGZuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgY29tcGFyZVdpdGgoZm4pIHsKICAgICAgICAgICAgaWYgKHR5cGVvZiBmbiAhPT0gJ2Z1bmN0aW9uJykgewogICAgICAgICAgICAgICAgdGhyb3cgZ2V0TWF0U2VsZWN0Tm9uRnVuY3Rpb25WYWx1ZUVycm9yKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fY29tcGFyZVdpdGggPSBmbjsKICAgICAgICAgICAgaWYgKHRoaXMuX3NlbGVjdGlvbk1vZGVsKSB7CiAgICAgICAgICAgICAgICAvLyBBIGRpZmZlcmVudCBjb21wYXJhdG9yIG1lYW5zIHRoZSBzZWxlY3Rpb24gY291bGQgY2hhbmdlLgogICAgICAgICAgICAgICAgdGhpcy5faW5pdGlhbGl6ZVNlbGVjdGlvbigpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFZhbHVlIG9mIHRoZSBzZWxlY3QgY29udHJvbC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCB2YWx1ZSgpIHsgcmV0dXJuIHRoaXMuX3ZhbHVlOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBuZXdWYWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IHZhbHVlKG5ld1ZhbHVlKSB7CiAgICAgICAgICAgIGlmIChuZXdWYWx1ZSAhPT0gdGhpcy5fdmFsdWUpIHsKICAgICAgICAgICAgICAgIHRoaXMud3JpdGVWYWx1ZShuZXdWYWx1ZSk7CiAgICAgICAgICAgICAgICB0aGlzLl92YWx1ZSA9IG5ld1ZhbHVlOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFRpbWUgdG8gd2FpdCBpbiBtaWxsaXNlY29uZHMgYWZ0ZXIgdGhlIGxhc3Qga2V5c3Ryb2tlIGJlZm9yZSBtb3ZpbmcgZm9jdXMgdG8gYW4gaXRlbS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCB0eXBlYWhlYWREZWJvdW5jZUludGVydmFsKCkgeyByZXR1cm4gdGhpcy5fdHlwZWFoZWFkRGVib3VuY2VJbnRlcnZhbDsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCB0eXBlYWhlYWREZWJvdW5jZUludGVydmFsKH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tCiAgICAgICAgICAgICAgICAucGlwZShkaXN0aW5jdFVudGlsQ2hhbmdlZCgpLCB0YWtlVW50aWwodGhpcy5fZGVzdHJveSkpCiAgICAgICAgICAgICAgICAuc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIGlmICh0aGlzLnBhbmVsT3BlbikgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX3Njcm9sbFRvcCA9IDA7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5vcGVuZWRDaGFuZ2UuZW1pdCh0cnVlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIHRoaXMub3BlbmVkQ2hhbmdlLmVtaXQoZmFsc2UpOwogICAgICAgICAgICAgICAgICAgIHRoaXMub3ZlcmxheURpci5vZmZzZXRYID0gMDsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9jaGFuZ2VEZXRlY3RvclJlZi5tYXJrRm9yQ2hlY2soKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB0aGlzLl92aWV3cG9ydFJ1bGVyLmNoYW5nZSgpCiAgICAgICAgICAgICAgICAucGlwZSh0YWtlVW50aWwodGhpcy5fZGVzdHJveSkpCiAgICAgICAgICAgICAgICAuc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIGlmICh0aGlzLl9wYW5lbE9wZW4pIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl90cmlnZ2VyUmVjdCA9IHRoaXMudHJpZ2dlci5uYXRpdmVFbGVtZW50LmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX2NoYW5nZURldGVjdG9yUmVmLm1hcmtGb3JDaGVjaygpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdBZnRlckNvbnRlbnRJbml0KCkgewogICAgICAgICAgICB0aGlzLl9pbml0S2V5TWFuYWdlcigpOwogICAgICAgICAgICB0aGlzLl9zZWxlY3Rpb25Nb2RlbC5jaGFuZ2VkLnBpcGUodGFrZVVudGlsKHRoaXMuX2Rlc3Ryb3kpKS5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBldmVudCA9PiB7CiAgICAgICAgICAgICAgICBldmVudC5hZGRlZC5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gb3B0aW9uCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBvcHRpb24gPT4gb3B0aW9uLnNlbGVjdCgpKSk7CiAgICAgICAgICAgICAgICBldmVudC5yZW1vdmVkLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBvcHRpb24KICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIG9wdGlvbiA9PiBvcHRpb24uZGVzZWxlY3QoKSkpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIHRoaXMub3B0aW9ucy5jaGFuZ2VzLnBpcGUoc3RhcnRXaXRoKG51bGwpLCB0YWtlVW50aWwodGhpcy5fZGVzdHJveSkpLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLl9yZXNldE9wdGlvbnMoKTsKICAgICAgICAgICAgICAgIHRoaXMuX2luaXRpYWxpemVTZWxlY3Rpb24oKTsKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nRG9DaGVjaygpIHsKICAgICAgICAgICAgaWYgKHRoaXMubmdDb250cm9sKSB7CiAgICAgICAgICAgICAgICB0aGlzLnVwZGF0ZUVycm9yU3RhdGUoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGNoYW5nZXMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25DaGFuZ2VzKGNoYW5nZXMpIHsKICAgICAgICAgICAgLy8gVXBkYXRpbmcgdGhlIGRpc2FibGVkIHN0YXRlIGlzIGhhbmRsZWQgYnkgYG1peGluRGlzYWJsZWRgLCBidXQgd2UgbmVlZCB0byBhZGRpdGlvbmFsbHkgbGV0CiAgICAgICAgICAgIC8vIHRoZSBwYXJlbnQgZm9ybSBmaWVsZCBrbm93IHRvIHJ1biBjaGFuZ2UgZGV0ZWN0aW9uIHdoZW4gdGhlIGRpc2FibGVkIHN0YXRlIGNoYW5nZXMuCiAgICAgICAgICAgIGlmIChjaGFuZ2VzWydkaXNhYmxlZCddKSB7CiAgICAgICAgICAgICAgICB0aGlzLnN0YXRlQ2hhbmdlcy5uZXh0KCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGNoYW5nZXNbJ3R5cGVhaGVhZERlYm91bmNlSW50ZXJ2YWwnXSAmJiB0aGlzLl9rZXlNYW5hZ2VyKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9rZXlNYW5hZ2VyLndpdGhUeXBlQWhlYWQodGhpcy5fdHlwZWFoZWFkRGVib3VuY2VJbnRlcnZhbCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uRGVzdHJveSgpIHsKICAgICAgICAgICAgdGhpcy5fZGVzdHJveS5uZXh0KCk7CiAgICAgICAgICAgIHRoaXMuX2Rlc3Ryb3kuY29tcGxldGUoKTsKICAgICAgICAgICAgdGhpcy5zdGF0ZUNoYW5nZXMuY29tcGxldGUoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVG9nZ2xlcyB0aGUgb3ZlcmxheSBwYW5lbCBvcGVuIG9yIGNsb3NlZC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHRvZ2dsZSgpIHsKICAgICAgICAgICAgdGhpcy5wYW5lbE9wZW4gPyB0aGlzLmNsb3NlKCkgOiB0aGlzLm9wZW4oKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogT3BlbnMgdGhlIG92ZXJsYXkgcGFuZWwuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvcGVuKCkgewogICAgICAgICAgICBpZiAodGhpcy5kaXNhYmxlZCB8fCAhdGhpcy5vcHRpb25zIHx8ICF0aGlzLm9wdGlvbnMubGVuZ3RoIHx8IHRoaXMuX3BhbmVsT3BlbikgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX3RyaWdnZXJSZWN0ID0gdGhpcy50cmlnZ2VyLm5hdGl2ZUVsZW1lbnQuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCk7CiAgICAgICAgICAgIC8vIE5vdGU6IFRoZSBjb21wdXRlZCBmb250LXNpemUgd2lsbCBiZSBhIHN0cmluZyBwaXhlbCB2YWx1ZSAoZS5nLiAiMTZweCIpLgogICAgICAgICAgICAvLyBgcGFyc2VJbnRgIGlnbm9yZXMgdGhlIHRyYWlsaW5nICdweCcgYW5kIGNvbnZlcnRzIHRoaXMgdG8gYSBudW1iZXIuCiAgICAgICAgICAgIHRoaXMuX3RyaWdnZXJGb250U2l6ZSA9IHBhcnNlSW50KGdldENvbXB1dGVkU3R5bGUodGhpcy50cmlnZ2VyLm5hdGl2ZUVsZW1lbnQpLmZvbnRTaXplIHx8ICcwJyk7CiAgICAgICAgICAgIHRoaXMuX3BhbmVsT3BlbiA9IHRydWU7CiAgICAgICAgICAgIHRoaXMuX2tleU1hbmFnZXIud2l0aEhvcml6b250YWxPcmllbnRhdGlvbihudWxsKTsKICAgICAgICAgICAgdGhpcy5fY2FsY3VsYXRlT3ZlcmxheVBvc2l0aW9uKCk7CiAgICAgICAgICAgIHRoaXMuX2hpZ2hsaWdodENvcnJlY3RPcHRpb24oKTsKICAgICAgICAgICAgdGhpcy5fY2hhbmdlRGV0ZWN0b3JSZWYubWFya0ZvckNoZWNrKCk7CiAgICAgICAgICAgIC8vIFNldCB0aGUgZm9udCBzaXplIG9uIHRoZSBwYW5lbCBlbGVtZW50IG9uY2UgaXQgZXhpc3RzLgogICAgICAgICAgICB0aGlzLl9uZ1pvbmUub25TdGFibGUuYXNPYnNlcnZhYmxlKCkucGlwZSh0YWtlKDEpKS5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgaWYgKHRoaXMuX3RyaWdnZXJGb250U2l6ZSAmJiB0aGlzLm92ZXJsYXlEaXIub3ZlcmxheVJlZiAmJgogICAgICAgICAgICAgICAgICAgIHRoaXMub3ZlcmxheURpci5vdmVybGF5UmVmLm92ZXJsYXlFbGVtZW50KSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5vdmVybGF5RGlyLm92ZXJsYXlSZWYub3ZlcmxheUVsZW1lbnQuc3R5bGUuZm9udFNpemUgPSBgJHt0aGlzLl90cmlnZ2VyRm9udFNpemV9cHhgOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENsb3NlcyB0aGUgb3ZlcmxheSBwYW5lbCBhbmQgZm9jdXNlcyB0aGUgaG9zdCBlbGVtZW50LgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgY2xvc2UoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9wYW5lbE9wZW4pIHsKICAgICAgICAgICAgICAgIHRoaXMuX3BhbmVsT3BlbiA9IGZhbHNlOwogICAgICAgICAgICAgICAgdGhpcy5fa2V5TWFuYWdlci53aXRoSG9yaXpvbnRhbE9yaWVudGF0aW9uKHRoaXMuX2lzUnRsKCkgPyAncnRsJyA6ICdsdHInKTsKICAgICAgICAgICAgICAgIHRoaXMuX2NoYW5nZURldGVjdG9yUmVmLm1hcmtGb3JDaGVjaygpOwogICAgICAgICAgICAgICAgdGhpcy5fb25Ub3VjaGVkKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU2V0cyB0aGUgc2VsZWN0J3MgdmFsdWUuIFBhcnQgb2YgdGhlIENvbnRyb2xWYWx1ZUFjY2Vzc29yIGludGVyZmFjZQogICAgICAgICAqIHJlcXVpcmVkIHRvIGludGVncmF0ZSB3aXRoIEFuZ3VsYXIncyBjb3JlIGZvcm1zIEFQSS4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUgTmV3IHZhbHVlIHRvIGJlIHdyaXR0ZW4gdG8gdGhlIG1vZGVsLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgd3JpdGVWYWx1ZSh2YWx1ZSkgewogICAgICAgICAgICBpZiAodGhpcy5vcHRpb25zKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9zZXRTZWxlY3Rpb25CeVZhbHVlKHZhbHVlKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICA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AgICAgIC8qKgogICAgICAgICAqIERpc2FibGVzIHRoZSBzZWxlY3QuIFBhcnQgb2YgdGhlIENvbnRyb2xWYWx1ZUFjY2Vzc29yIGludGVyZmFjZSByZXF1aXJlZAogICAgICAgICAqIHRvIGludGVncmF0ZSB3aXRoIEFuZ3VsYXIncyBjb3JlIGZvcm1zIEFQSS4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7P30gaXNEaXNhYmxlZCBTZXRzIHdoZXRoZXIgdGhlIGNvbXBvbmVudCBpcyBkaXNhYmxlZC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldERpc2FibGVkU3RhdGUoaXNEaXNhYmxlZCkgewogICAgICAgICAgICB0aGlzLmRpc2FibGVkID0gaXNEaXNhYmxlZDsKICAgICAgICAgICAgdGhpcy5fY2hhbmdlRGV0ZWN0b3JSZWYubWFya0ZvckNoZWNrKCk7CiAgICAgICAgICAgIHRoaXMuc3RhdGVDaGFuZ2VzLm5leHQoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogV2hldGhlciBvciBub3QgdGhlIG92ZXJsYXkgcGFuZWwgaXMgb3Blbi4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBwYW5lbE9wZW4oKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9wYW5lbE9wZW47CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBjdXJyZW50bHkgc2VsZWN0ZWQgb3B0aW9uLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHNlbGVjdGVkKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5tdWx0aXBsZSA/IHRoaXMuX3NlbGVjdGlvbk1vZGVsLnNlbGVjdGVkIDogdGhpcy5fc2VsZWN0aW9uTW9kZWwuc2VsZWN0ZWRbMF07CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFRoZSB2YWx1ZSBkaXNwbGF5ZWQgaW4gdGhlIHRyaWdnZXIuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgdHJpZ2dlclZhbHVlKCkgewogICAgICAgICAgICBpZiAodGhpcy5lbXB0eSkgewogICAgICAgICAgICAgICAgcmV0dXJuICcnOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0aGlzLl9tdWx0aXBsZSkgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3Qgc2VsZWN0ZWRPcHRpb25zID0gdGhpcy5fc2VsZWN0aW9uTW9kZWwuc2VsZWN0ZWQubWFwKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gb3B0aW9uCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBvcHRpb24gPT4gb3B0aW9uLnZpZXdWYWx1ZSkpOwogICAgICAgICAgICAgICAgaWYgKHRoaXMuX2lzUnRsKCkpIHsKICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZE9wdGlvbnMucmV2ZXJzZSgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLy8gVE9ETyhjcmlzYmV0byk6IGRlbGltaXRlciBzaG91bGQgYmUgY29uZmlndXJhYmxlIGZvciBwcm9wZXIgbG9jYWxpemF0aW9uLgogICAgICAgICAgICAgICAgcmV0dXJuIHNlbGVjdGVkT3B0aW9ucy5qb2luKCcsICcpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9zZWxlY3Rpb25Nb2RlbC5zZWxlY3RlZFswXS52aWV3VmFsdWU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFdoZXRoZXIgdGhlIGVsZW1lbnQgaXMgaW4gUlRMIG1vZGUuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfaXNSdGwoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9kaXIgPyB0aGlzLl9kaXIudmFsdWUgPT09ICdydGwnIDogZmFsc2U7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEhhbmRsZXMgYWxsIGtleWRvd24gZXZlbnRzIG9uIHRoZSBzZWxlY3QuCiAgICAgICAgICogQHBhcmFtIHs/fSBldmVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2hhbmRsZUtleWRvd24oZXZlbnQpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLmRpc2FibGVkKSB7CiAgICAgICAgICAgICAgICB0aGlzLnBhbmVsT3BlbiA/IHRoaXMuX2hhbmRsZU9wZW5LZXlkb3duKGV2ZW50KSA6IHRoaXMuX2hhbmRsZUNsb3NlZEtleWRvd24oZXZlbnQpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEhhbmRsZXMga2V5Ym9hcmQgZXZlbnRzIHdoaWxlIHRoZSBzZWxlY3QgaXMgY2xvc2VkLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBldmVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2hhbmRsZUNsb3NlZEtleWRvd24oZXZlbnQpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBrZXlDb2RlID0gZXZlbnQua2V5Q29kZTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBpc0Fycm93S2V5ID0ga2V5Q29kZSA9PT0gRE9XTl9BUlJPVyB8fCBrZXlDb2RlID09PSBVUF9BUlJPVyB8fAogICAgICAgICAgICAgICAga2V5Q29kZSA9PT0gTEVGVF9BUlJPVyB8fCBrZXlDb2RlID09PSBSSUdIVF9BUlJPVzsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBpc09wZW5LZXkgPSBrZXlDb2RlID09PSBFTlRFUiB8fCBrZXlDb2RlID09PSBTUEFDRTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBtYW5hZ2VyID0gdGhpcy5fa2V5TWFuYWdlcjsKICAgICAgICAgICAgLy8gT3BlbiB0aGUgc2VsZWN0IG9uIEFMVCArIGFycm93IGtleSB0byBtYXRjaCB0aGUgbmF0aXZlIDxzZWxlY3Q+CiAgICAgICAgICAgIGlmICghbWFuYWdlci5pc1R5cGluZygpICYmIChpc09wZW5LZXkgJiYgIWhhc01vZGlmaWVyS2V5KGV2ZW50KSkgfHwKICAgICAgICAgICAgICAgICgodGhpcy5tdWx0aXBsZSB8fCBldmVudC5hbHRLZXkpICYmIGlzQXJyb3dLZXkpKSB7CiAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpOyAvLyBwcmV2ZW50cyB0aGUgcGFnZSBmcm9tIHNjcm9sbGluZyBkb3duIHdoZW4gcHJlc3Npbmcgc3BhY2UKICAgICAgICAgICAgICAgIHRoaXMub3BlbigpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKCF0aGlzLm11bHRpcGxlKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBwcmV2aW91c2x5U2VsZWN0ZWRPcHRpb24gPSB0aGlzLnNlbGVjdGVkOwogICAgICAgICAgICAgICAgaWYgKGtleUNvZGUgPT09IEhPTUUgfHwga2V5Q29kZSA9PT0gRU5EKSB7CiAgICAgICAgICAgICAgICAgICAga2V5Q29kZSA9PT0gSE9NRSA/IG1hbmFnZXIuc2V0Rmlyc3RJdGVtQWN0aXZlKCkgOiBtYW5hZ2VyLnNldExhc3RJdGVtQWN0aXZlKCk7CiAgICAgICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIG1hbmFnZXIub25LZXlkb3duKGV2ZW50KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHNlbGVjdGVkT3B0aW9uID0gdGhpcy5zZWxlY3RlZDsKICAgICAgICAgICAgICAgIC8vIFNpbmNlIHRoZSB2YWx1ZSBoYXMgY2hhbmdlZCwgd2UgbmVlZCB0byBhbm5vdW5jZSBpdCBvdXJzZWx2ZXMuCiAgICAgICAgICAgICAgICBpZiAoc2VsZWN0ZWRPcHRpb24gJiYgcHJldmlvdXNseVNlbGVjdGVkT3B0aW9uICE9PSBzZWxlY3RlZE9wdGlvbikgewogICAgICAgICAgICAgICAgICAgIC8vIFdlIHNldCBhIGR1cmF0aW9uIG9uIHRoZSBsaXZlIGFubm91bmNlbWVudCwgYmVjYXVzZSB3ZSB3YW50IHRoZSBsaXZlIGVsZW1lbnQgdG8gYmUKICAgICAgICAgICAgICAgICAgICAvLyBjbGVhcmVkIGFmdGVyIGEgd2hpbGUgc28gdGhhdCB1c2VycyBjYW4ndCBuYXZpZ2F0ZSB0byBpdCB1c2luZyB0aGUgYXJyb3cga2V5cy4KICAgICAgICAgICAgICAgICAgICB0aGlzLl9saXZlQW5ub3VuY2VyLmFubm91bmNlKCgoLyoqIEB0eXBlIHs/fSAqLyAoc2VsZWN0ZWRPcHRpb24pKSkudmlld1ZhbHVlLCAxMDAwMCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogSGFuZGxlcyBrZXlib2FyZCBldmVudHMgd2hlbiB0aGUgc2VsZWN0ZWQgaXMgb3Blbi4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9oYW5kbGVPcGVuS2V5ZG93bihldmVudCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG1hbmFnZXIgPSB0aGlzLl9rZXlNYW5hZ2VyOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGtleUNvZGUgPSBldmVudC5rZXlDb2RlOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGlzQXJyb3dLZXkgPSBrZXlDb2RlID09PSBET1dOX0FSUk9XIHx8IGtleUNvZGUgPT09IFVQX0FSUk9XOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGlzVHlwaW5nID0gbWFuYWdlci5pc1R5cGluZygpOwogICAgICAgICAgICBpZiAoa2V5Q29kZSA9PT0gSE9NRSB8fCBrZXlDb2RlID09PSBFTkQpIHsKICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7CiAgICAgICAgICAgICAgICBrZXlDb2RlID09PSBIT01FID8gbWFuYWdlci5zZXRGaXJzdEl0ZW1BY3RpdmUoKSA6IG1hbmFnZXIuc2V0TGFzdEl0ZW1BY3RpdmUoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChpc0Fycm93S2V5ICYmIGV2ZW50LmFsdEtleSkgewogICAgICAgICAgICAgICAgLy8gQ2xvc2UgdGhlIHNlbGVjdCBvbiBBTFQgKyBhcnJvdyBrZXkgdG8gbWF0Y2ggdGhlIG5hdGl2ZSA8c2VsZWN0PgogICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTsKICAgICAgICAgICAgICAgIHRoaXMuY2xvc2UoKTsKICAgICAgICAgICAgICAgIC8vIERvbid0IGRvIGFueXRoaW5nIGluIHRoaXMgY2FzZSBpZiB0aGUgdXNlciBpcyB0eXBpbmcsCiAgICAgICAgICAgICAgICAvLyBiZWNhdXNlIHRoZSB0eXBpbmcgc2VxdWVuY2UgY2FuIGluY2x1ZGUgdGhlIHNwYWNlIGtleS4KICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmICghaXNUeXBpbmcgJiYgKGtleUNvZGUgPT09IEVOVEVSIHx8IGtleUNvZGUgPT09IFNQQUNFKSAmJiBtYW5hZ2VyLmFjdGl2ZUl0ZW0gJiYKICAgICAgICAgICAgICAgICFoYXNNb2RpZmllcktleShldmVudCkpIHsKICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7CiAgICAgICAgICAgICAgICBtYW5hZ2VyLmFjdGl2ZUl0ZW0uX3NlbGVjdFZpYUludGVyYWN0aW9uKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoIWlzVHlwaW5nICYmIHRoaXMuX211bHRpcGxlICYmIGtleUNvZGUgPT09IEEgJiYgZXZlbnQuY3RybEtleSkgewogICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGhhc0Rlc2VsZWN0ZWRPcHRpb25zID0gdGhpcy5vcHRpb25zLnNvbWUoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBvcHQKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIG9wdCA9PiAhb3B0LmRpc2FibGVkICYmICFvcHQuc2VsZWN0ZWQpKTsKICAgICAgICAgICAgICAgIHRoaXMub3B0aW9ucy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gb3B0aW9uCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBvcHRpb24gPT4gewogICAgICAgICAgICAgICAgICAgIGlmICghb3B0aW9uLmRpc2FibGVkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGhhc0Rlc2VsZWN0ZWRPcHRpb25zID8gb3B0aW9uLnNlbGVjdCgpIDogb3B0aW9uLmRlc2VsZWN0KCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgcHJldmlvdXNseUZvY3VzZWRJbmRleCA9IG1hbmFnZXIuYWN0aXZlSXRlbUluZGV4OwogICAgICAgICAgICAgICAgbWFuYWdlci5vbktleWRvd24oZXZlbnQpOwogICAgICAgICAgICAgICAgaWYgKHRoaXMuX211bHRpcGxlICYmIGlzQXJyb3dLZXkgJiYgZXZlbnQuc2hpZnRLZXkgJiYgbWFuYWdlci5hY3RpdmVJdGVtICYmCiAgICAgICAgICAgICAgICAgICAgbWFuYWdlci5hY3RpdmVJdGVtSW5kZXggIT09IHByZXZpb3VzbHlGb2N1c2VkSW5kZXgpIHsKICAgICAgICAgICAgICAgICAgICBtYW5hZ2VyLmFjdGl2ZUl0ZW0uX3NlbGVjdFZpYUludGVyYWN0aW9uKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfb25Gb2N1cygpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLmRpc2FibGVkKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9mb2N1c2VkID0gdHJ1ZTsKICAgICAgICAgICAgICAgIHRoaXMuc3RhdGVDaGFuZ2VzLm5leHQoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDYWxscyB0aGUgdG91Y2hlZCBjYWxsYmFjayBvbmx5IGlmIHRoZSBwYW5lbCBpcyBjbG9zZWQuIE90aGVyd2lzZSwgdGhlIHRyaWdnZXIgd2lsbAogICAgICAgICAqICJibHVyIiB0byB0aGUgcGFuZWwgd2hlbiBpdCBvcGVucywgY2F1c2luZyBhIGZhbHNlIHBvc2l0aXZlLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX29uQmx1cigpIHsKICAgICAgICAgICAgdGhpcy5fZm9jdXNlZCA9IGZhbHNlOwogICAgICAgICAgICBpZiAoIXRoaXMuZGlzYWJsZWQgJiYgIXRoaXMucGFuZWxPcGVuKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9vblRvdWNoZWQoKTsKICAgICAgICAgICAgICAgIHRoaXMuX2NoYW5nZURldGVjdG9yUmVmLm1hcmtGb3JDaGVjaygpOwogICAgICAgICAgICAgICAgdGhpcy5zdGF0ZUNoYW5nZXMubmV4dCgpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENhbGxiYWNrIHRoYXQgaXMgaW52b2tlZCB3aGVuIHRoZSBvdmVybGF5IHBhbmVsIGhhcyBiZWVuIGF0dGFjaGVkLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX29uQXR0YWNoZWQoKSB7CiAgICAgICAgICAgIHRoaXMub3ZlcmxheURpci5wb3NpdGlvbkNoYW5nZS5waXBlKHRha2UoMSkpLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLl9jaGFuZ2VEZXRlY3RvclJlZi5kZXRlY3RDaGFuZ2VzKCk7CiAgICAgICAgICAgICAgICB0aGlzLl9jYWxjdWxhdGVPdmVybGF5T2Zmc2V0WCgpOwogICAgICAgICAgICAgICAgdGhpcy5wYW5lbC5uYXRpdmVFbGVtZW50LnNjcm9sbFRvcCA9IHRoaXMuX3Njcm9sbFRvcDsKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZXR1cm5zIHRoZSB0aGVtZSB0byBiZSB1c2VkIG9uIHRoZSBwYW5lbC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9nZXRQYW5lbFRoZW1lKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fcGFyZW50Rm9ybUZpZWxkID8gYG1hdC0ke3RoaXMuX3BhcmVudEZvcm1GaWVsZC5jb2xvcn1gIDogJyc7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFdoZXRoZXIgdGhlIHNlbGVjdCBoYXMgYSB2YWx1ZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBlbXB0eSgpIHsKICAgICAgICAgICAgcmV0dXJuICF0aGlzLl9zZWxlY3Rpb25Nb2RlbCB8fCB0aGlzLl9zZWxlY3Rpb25Nb2RlbC5pc0VtcHR5KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfaW5pdGlhbGl6ZVNlbGVjdGlvbigpIHsKICAgICAgICAgICAgLy8gRGVmZXIgc2V0dGluZyB0aGUgdmFsdWUgaW4gb3JkZXIgdG8gYXZvaWQgdGhlICJFeHByZXNzaW9uCiAgICAgICAgICAgIC8vIGhhcyBjaGFuZ2VkIGFmdGVyIGl0IHdhcyBjaGVja2VkIiBlcnJvcnMgZnJvbSBBbmd1bGFyLgogICAgICAgICAgICBQcm9taXNlLnJlc29sdmUoKS50aGVuKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuX3NldFNlbGVjdGlvbkJ5VmFsdWUodGhpcy5uZ0NvbnRyb2wgPyB0aGlzLm5nQ29udHJvbC52YWx1ZSA6IHRoaXMuX3ZhbHVlKTsKICAgICAgICAgICAgICAgIHRoaXMuc3RhdGVDaGFuZ2VzLm5leHQoKTsKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIHRoZSBzZWxlY3RlZCBvcHRpb24gYmFzZWQgb24gYSB2YWx1ZS4gSWYgbm8gb3B0aW9uIGNhbiBiZQogICAgICAgICAqIGZvdW5kIHdpdGggdGhlIGRlc2lnbmF0ZWQgdmFsdWUsIHRoZSBzZWxlY3QgdHJpZ2dlciBpcyBjbGVhcmVkLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3NldFNlbGVjdGlvbkJ5VmFsdWUodmFsdWUpIHsKICAgICAgICAgICAgaWYgKHRoaXMubXVsdGlwbGUgJiYgdmFsdWUpIHsKICAgICAgICAgICAgICAgIGlmICghQXJyYXkuaXNBcnJheSh2YWx1ZSkpIHsKICAgICAgICAgICAgICAgICAgICB0aHJvdyBnZXRNYXRTZWxlY3ROb25BcnJheVZhbHVlRXJyb3IoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuX3NlbGVjdGlvbk1vZGVsLmNsZWFyKCk7CiAgICAgICAgICAgICAgICB2YWx1ZS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY3VycmVudFZhbHVlCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoY3VycmVudFZhbHVlKSA9PiB0aGlzLl9zZWxlY3RWYWx1ZShjdXJyZW50VmFsdWUpKSk7CiAgICAgICAgICAgICAgICB0aGlzLl9zb3J0VmFsdWVzKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLl9zZWxlY3Rpb25Nb2RlbC5jbGVhcigpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgY29ycmVzcG9uZGluZ09wdGlvbiA9IHRoaXMuX3NlbGVjdFZhbHVlKHZhbHVlKTsKICAgICAgICAgICAgICAgIC8vIFNoaWZ0IGZvY3VzIHRvIHRoZSBhY3RpdmUgaXRlbS4gTm90ZSB0aGF0IHdlIHNob3VsZG4ndCBkbyB0aGlzIGluIG11bHRpcGxlCiAgICAgICAgICAgICAgICAvLyBtb2RlLCBiZWNhdXNlIHdlIGRvbid0IGtub3cgd2hhdCBvcHRpb24gdGhlIHVzZXIgaW50ZXJhY3RlZCB3aXRoIGxhc3QuCiAgICAgICAgICAgICAgICBpZiAoY29ycmVzcG9uZGluZ09wdGlvbikgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX2tleU1hbmFnZXIuc2V0QWN0aXZlSXRlbShjb3JyZXNwb25kaW5nT3B0aW9uKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKCF0aGlzLnBhbmVsT3BlbikgewogICAgICAgICAgICAgICAgICAgIC8vIE90aGVyd2lzZSByZXNldCB0aGUgaGlnaGxpZ2h0ZWQgb3B0aW9uLiBOb3RlIHRoYXQgd2Ugb25seSB3YW50IHRvIGRvIHRoaXMgd2hpbGUKICAgICAgICAgICAgICAgICAgICAvLyBjbG9zZWQsIGJlY2F1c2UgZG9pbmcgaXQgd2hpbGUgb3BlbiBjYW4gc2hpZnQgdGhlIHVzZXIncyBmb2N1cyB1bm5lY2Vzc2FyaWx5LgogICAgICAgICAgICAgICAgICAgIHRoaXMuX2tleU1hbmFnZXIuc2V0QWN0aXZlSXRlbSgtMSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fY2hhbmdlRGV0ZWN0b3JSZWYubWFya0ZvckNoZWNrKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEZpbmRzIGFuZCBzZWxlY3RzIGFuZCBvcHRpb24gYmFzZWQgb24gaXRzIHZhbHVlLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99IE9wdGlvbiB0aGF0IGhhcyB0aGUgY29ycmVzcG9uZGluZyB2YWx1ZS4KICAgICAgICAgKi8KICAgICAgICBfc2VsZWN0VmFsdWUodmFsdWUpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjb3JyZXNwb25kaW5nT3B0aW9uID0gdGhpcy5vcHRpb25zLmZpbmQoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IG9wdGlvbgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKG9wdGlvbikgPT4gewogICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICAvLyBUcmVhdCBudWxsIGFzIGEgc3BlY2lhbCByZXNldCB2YWx1ZS4KICAgICAgICAgICAgICAgICAgICByZXR1cm4gb3B0aW9uLnZhbHVlICE9IG51bGwgJiYgdGhpcy5fY29tcGFyZVdpdGgob3B0aW9uLnZhbHVlLCB2YWx1ZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjYXRjaCAoZXJyb3IpIHsKICAgICAgICAgICAgICAgICAgICBpZiAoaXNEZXZNb2RlKCkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gTm90aWZ5IGRldmVsb3BlcnMgb2YgZXJyb3JzIGluIHRoZWlyIGNvbXBhcmF0b3IuCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUud2FybihlcnJvcik7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSkpOwogICAgICAgICAgICBpZiAoY29ycmVzcG9uZGluZ09wdGlvbikgewogICAgICAgICAgICAgICAgdGhpcy5fc2VsZWN0aW9uTW9kZWwuc2VsZWN0KGNvcnJlc3BvbmRpbmdPcHRpb24pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBjb3JyZXNwb25kaW5nT3B0aW9uOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIHVwIGEga2V5IG1hbmFnZXIgdG8gbGlzdGVuIHRvIGtleWJvYXJkIGV2ZW50cyBvbiB0aGUgb3ZlcmxheSBwYW5lbC4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2luaXRLZXlNYW5hZ2VyKCkgewogICAgICAgICAgICB0aGlzLl9rZXlNYW5hZ2VyID0gbmV3IEFjdGl2ZURlc2NlbmRhbnRLZXlNYW5hZ2VyKHRoaXMub3B0aW9ucykKICAgICAgICAgICAgICAgIC53aXRoVHlwZUFoZWFkKHRoaXMuX3R5cGVhaGVhZERlYm91bmNlSW50ZXJ2YWwpCiAgICAgICAgICAgICAgICAud2l0aFZlcnRpY2FsT3JpZW50YXRpb24oKQogICAgICAgICAgICAgICAgLndpdGhIb3Jpem9udGFsT3JpZW50YXRpb24odGhpcy5faXNSdGwoKSA/ICdydGwnIDogJ2x0cicpCiAgICAgICAgICAgICAgICAud2l0aEFsbG93ZWRNb2RpZmllcktleXMoWydzaGlmdEtleSddKTsKICAgICAgICAgICAgdGhpcy5fa2V5TWFuYWdlci50YWJPdXQucGlwZSh0YWtlVW50aWwodGhpcy5fZGVzdHJveSkpLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5wYW5lbE9wZW4pIHsKICAgICAgICAgICAgICAgICAgICAvLyBTZWxlY3QgdGhlIGFjdGl2ZSBpdGVtIHdoZW4gdGFiYmluZyBhd2F5LiBUaGlzIGlzIGNvbnNpc3RlbnQgd2l0aCBob3cgdGhlIG5hdGl2ZQogICAgICAgICAgICAgICAgICAgIC8vIHNlbGVjdCBiZWhhdmVzLiBOb3RlIHRoYXQgd2Ugb25seSB3YW50IHRvIGRvIHRoaXMgaW4gc2luZ2xlIHNlbGVjdGlvbiBtb2RlLgogICAgICAgICAgICAgICAgICAgIGlmICghdGhpcy5tdWx0aXBsZSAmJiB0aGlzLl9rZXlNYW5hZ2VyLmFjdGl2ZUl0ZW0pIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fa2V5TWFuYWdlci5hY3RpdmVJdGVtLl9zZWxlY3RWaWFJbnRlcmFjdGlvbigpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAvLyBSZXN0b3JlIGZvY3VzIHRvIHRoZSB0cmlnZ2VyIGJlZm9yZSBjbG9zaW5nLiBFbnN1cmVzIHRoYXQgdGhlIGZvY3VzCiAgICAgICAgICAgICAgICAgICAgLy8gcG9zaXRpb24gd29uJ3QgYmUgbG9zdCBpZiB0aGUgdXNlciBnb3QgZm9jdXMgaW50byB0aGUgb3ZlcmxheS4KICAgICAgICAgICAgICAgICAgICB0aGlzLmZvY3VzKCk7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5jbG9zZSgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIHRoaXMuX2tleU1hbmFnZXIuY2hhbmdlLnBpcGUodGFrZVVudGlsKHRoaXMuX2Rlc3Ryb3kpKS5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgaWYgKHRoaXMuX3BhbmVsT3BlbiAmJiB0aGlzLnBhbmVsKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fc2Nyb2xsQWN0aXZlT3B0aW9uSW50b1ZpZXcoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKCF0aGlzLl9wYW5lbE9wZW4gJiYgIXRoaXMubXVsdGlwbGUgJiYgdGhpcy5fa2V5TWFuYWdlci5hY3RpdmVJdGVtKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fa2V5TWFuYWdlci5hY3RpdmVJdGVtLl9zZWxlY3RWaWFJbnRlcmFjdGlvbigpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIERyb3BzIGN1cnJlbnQgb3B0aW9uIHN1YnNjcmlwdGlvbnMgYW5kIElEcyBhbmQgcmVzZXRzIGZyb20gc2NyYXRjaC4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3Jlc2V0T3B0aW9ucygpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjaGFuZ2VkT3JEZXN0cm95ZWQgPSBtZXJnZSh0aGlzLm9wdGlvbnMuY2hhbmdlcywgdGhpcy5fZGVzdHJveSk7CiAgICAgICAgICAgIHRoaXMub3B0aW9uU2VsZWN0aW9uQ2hhbmdlcy5waXBlKHRha2VVbnRpbChjaGFuZ2VkT3JEZXN0cm95ZWQpKS5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBldmVudCA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLl9vblNlbGVjdChldmVudC5zb3VyY2UsIGV2ZW50LmlzVXNlcklucHV0KTsKICAgICAgICAgICAgICAgIGlmIChldmVudC5pc1VzZXJJbnB1dCAmJiAhdGhpcy5tdWx0aXBsZSAmJiB0aGlzLl9wYW5lbE9wZW4pIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLmNsb3NlKCk7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5mb2N1cygpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIC8vIExpc3RlbiB0byBjaGFuZ2VzIGluIHRoZSBpbnRlcm5hbCBzdGF0ZSBvZiB0aGUgb3B0aW9ucyBhbmQgcmVhY3QgYWNjb3JkaW5nbHkuCiAgICAgICAgICAgIC8vIEhhbmRsZXMgY2FzZXMgbGlrZSB0aGUgbGFiZWxzIG9mIHRoZSBzZWxlY3RlZCBvcHRpb25zIGNoYW5naW5nLgogICAgICAgICAgICBtZXJnZSguLi50aGlzLm9wdGlvbnMubWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBvcHRpb24KICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIG9wdGlvbiA9PiBvcHRpb24uX3N0YXRlQ2hhbmdlcykpKQogICAgICAgICAgICAgICAgLnBpcGUodGFrZVVudGlsKGNoYW5nZWRPckRlc3Ryb3llZCkpCiAgICAgICAgICAgICAgICAuc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuX2NoYW5nZURldGVjdG9yUmVmLm1hcmtGb3JDaGVjaygpOwogICAgICAgICAgICAgICAgdGhpcy5zdGF0ZUNoYW5nZXMubmV4dCgpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIHRoaXMuX3NldE9wdGlvbklkcygpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBJbnZva2VkIHdoZW4gYW4gb3B0aW9uIGlzIGNsaWNrZWQuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IG9wdGlvbgogICAgICAgICAqIEBwYXJhbSB7P30gaXNVc2VySW5wdXQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9vblNlbGVjdChvcHRpb24sIGlzVXNlcklucHV0KSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgd2FzU2VsZWN0ZWQgPSB0aGlzLl9zZWxlY3Rpb25Nb2RlbC5pc1NlbGVjdGVkKG9wdGlvbik7CiAgICAgICAgICAgIGlmIChvcHRpb24udmFsdWUgPT0gbnVsbCAmJiAhdGhpcy5fbXVsdGlwbGUpIHsKICAgICAgICAgICAgICAgIG9wdGlvbi5kZXNlbGVjdCgpOwogICAgICAgICAgICAgICAgdGhpcy5fc2VsZWN0aW9uTW9kZWwuY2xlYXIoKTsKICAgICAgICAgICAgICAgIHRoaXMuX3Byb3BhZ2F0ZUNoYW5nZXMob3B0aW9uLnZhbHVlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIGlmICh3YXNTZWxlY3RlZCAhPT0gb3B0aW9uLnNlbGVjdGVkKSB7CiAgICAgICAgICAgICAgICAgICAgb3B0aW9uLnNlbGVjdGVkID8gdGhpcy5fc2VsZWN0aW9uTW9kZWwuc2VsZWN0KG9wdGlvbikgOgogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9zZWxlY3Rpb25Nb2RlbC5kZXNlbGVjdChvcHRpb24pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKGlzVXNlcklucHV0KSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fa2V5TWFuYWdlci5zZXRBY3RpdmVJdGVtKG9wdGlvbik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAodGhpcy5tdWx0aXBsZSkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX3NvcnRWYWx1ZXMoKTsKICAgICAgICAgICAgICAgICAgICBpZiAoaXNVc2VySW5wdXQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gSW4gY2FzZSB0aGUgdXNlciBzZWxlY3RlZCB0aGUgb3B0aW9uIHdpdGggdGhlaXIgbW91c2UsIHdlCiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHdhbnQgdG8gcmVzdG9yZSBmb2N1cyBiYWNrIHRvIHRoZSB0cmlnZ2VyLCBpbiBvcmRlciB0bwogICAgICAgICAgICAgICAgICAgICAgICAvLyBwcmV2ZW50IHRoZSBzZWxlY3Qga2V5Ym9hcmQgY29udHJvbHMgZnJvbSBjbGFzaGluZyB3aXRoCiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHRoZSBvbmVzIGZyb20gYG1hdC1vcHRpb25gLgogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmZvY3VzKCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh3YXNTZWxlY3RlZCAhPT0gdGhpcy5fc2VsZWN0aW9uTW9kZWwuaXNTZWxlY3RlZChvcHRpb24pKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9wcm9wYWdhdGVDaGFuZ2VzKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5zdGF0ZUNoYW5nZXMubmV4dCgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTb3J0cyB0aGUgc2VsZWN0ZWQgdmFsdWVzIGluIHRoZSBzZWxlY3RlZCBiYXNlZCBvbiB0aGVpciBvcmRlciBpbiB0aGUgcGFuZWwuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9zb3J0VmFsdWVzKCkgewogICAgICAgICAgICBpZiAodGhpcy5tdWx0aXBsZSkgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3Qgb3B0aW9ucyA9IHRoaXMub3B0aW9ucy50b0FycmF5KCk7CiAgICAgICAgICAgICAgICB0aGlzLl9zZWxlY3Rpb25Nb2RlbC5zb3J0KCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gYQogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBiCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoYSwgYikgPT4gewogICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLnNvcnRDb21wYXJhdG9yID8gdGhpcy5zb3J0Q29tcGFyYXRvcihhLCBiLCBvcHRpb25zKSA6CiAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnMuaW5kZXhPZihhKSAtIG9wdGlvbnMuaW5kZXhPZihiKTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgIHRoaXMuc3RhdGVDaGFuZ2VzLm5leHQoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBFbWl0cyBjaGFuZ2UgZXZlbnQgdG8gc2V0IHRoZSBtb2RlbCB2YWx1ZS4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7Pz19IGZhbGxiYWNrVmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9wcm9wYWdhdGVDaGFuZ2VzKGZhbGxiYWNrVmFsdWUpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgdmFsdWVUb0VtaXQgPSBudWxsOwogICAgICAgICAgICBpZiAodGhpcy5tdWx0aXBsZSkgewogICAgICAgICAgICAgICAgdmFsdWVUb0VtaXQgPSAoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuc2VsZWN0ZWQpKSkubWFwKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gb3B0aW9uCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBvcHRpb24gPT4gb3B0aW9uLnZhbHVlKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB2YWx1ZVRvRW1pdCA9IHRoaXMuc2VsZWN0ZWQgPyAoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuc2VsZWN0ZWQpKSkudmFsdWUgOiBmYWxsYmFja1ZhbHVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX3ZhbHVlID0gdmFsdWVUb0VtaXQ7CiAgICAgICAgICAgIHRoaXMudmFsdWVDaGFuZ2UuZW1pdCh2YWx1ZVRvRW1pdCk7CiAgICAgICAgICAgIHRoaXMuX29uQ2hhbmdlKHZhbHVlVG9FbWl0KTsKICAgICAgICAgICAgdGhpcy5zZWxlY3Rpb25DaGFuZ2UuZW1pdChuZXcgTWF0U2VsZWN0Q2hhbmdlKHRoaXMsIHZhbHVlVG9FbWl0KSk7CiAgICAgICAgICAgIHRoaXMuX2NoYW5nZURldGVjdG9yUmVmLm1hcmtGb3JDaGVjaygpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZWNvcmRzIG9wdGlvbiBJRHMgdG8gcGFzcyB0byB0aGUgYXJpYS1vd25zIHByb3BlcnR5LgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfc2V0T3B0aW9uSWRzKCkgewogICAgICAgICAgICB0aGlzLl9vcHRpb25JZHMgPSB0aGlzLm9wdGlvbnMubWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBvcHRpb24KICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIG9wdGlvbiA9PiBvcHRpb24uaWQpKS5qb2luKCcgJyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEhpZ2hsaWdodHMgdGhlIHNlbGVjdGVkIGl0ZW0uIElmIG5vIG9wdGlvbiBpcyBzZWxlY3RlZCwgaXQgd2lsbCBoaWdobGlnaHQKICAgICAgICAgKiB0aGUgZmlyc3QgaXRlbSBpbnN0ZWFkLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfaGlnaGxpZ2h0Q29ycmVjdE9wdGlvbigpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX2tleU1hbmFnZXIpIHsKICAgICAgICAgICAgICAgIGlmICh0aGlzLmVtcHR5KSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fa2V5TWFuYWdlci5zZXRGaXJzdEl0ZW1BY3RpdmUoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX2tleU1hbmFnZXIuc2V0QWN0aXZlSXRlbSh0aGlzLl9zZWxlY3Rpb25Nb2RlbC5zZWxlY3RlZFswXSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU2Nyb2xscyB0aGUgYWN0aXZlIG9wdGlvbiBpbnRvIHZpZXcuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9zY3JvbGxBY3RpdmVPcHRpb25JbnRvVmlldygpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBhY3RpdmVPcHRpb25JbmRleCA9IHRoaXMuX2tleU1hbmFnZXIuYWN0aXZlSXRlbUluZGV4IHx8IDA7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbGFiZWxDb3VudCA9IF9jb3VudEdyb3VwTGFiZWxzQmVmb3JlT3B0aW9uKGFjdGl2ZU9wdGlvbkluZGV4LCB0aGlzLm9wdGlvbnMsIHRoaXMub3B0aW9uR3JvdXBzKTsKICAgICAgICAgICAgdGhpcy5wYW5lbC5uYXRpdmVFbGVtZW50LnNjcm9sbFRvcCA9IF9nZXRPcHRpb25TY3JvbGxQb3NpdGlvbihhY3RpdmVPcHRpb25JbmRleCArIGxhYmVsQ291bnQsIHRoaXMuX2dldEl0ZW1IZWlnaHQoKSwgdGhpcy5wYW5lbC5uYXRpdmVFbGVtZW50LnNjcm9sbFRvcCwgU0VMRUNUX1BBTkVMX01BWF9IRUlHSFQpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBGb2N1c2VzIHRoZSBzZWxlY3QgZWxlbWVudC4KICAgICAgICAgKiBAcGFyYW0gez89fSBvcHRpb25zCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmb2N1cyhvcHRpb25zKSB7CiAgICAgICAgICAgIHRoaXMuX2VsZW1lbnRSZWYubmF0aXZlRWxlbWVudC5mb2N1cyhvcHRpb25zKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogR2V0cyB0aGUgaW5kZXggb2YgdGhlIHByb3ZpZGVkIG9wdGlvbiBpbiB0aGUgb3B0aW9uIGxpc3QuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IG9wdGlvbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2dldE9wdGlvbkluZGV4KG9wdGlvbikgewogICAgICAgICAgICByZXR1cm4gdGhpcy5vcHRpb25zLnJlZHVjZSgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcmVzdWx0CiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY3VycmVudAogICAgICAgICAgICAgKiBAcGFyYW0gez99IGluZGV4CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAocmVzdWx0LCBjdXJyZW50LCBpbmRleCkgPT4gewogICAgICAgICAgICAgICAgaWYgKHJlc3VsdCAhPT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiBvcHRpb24gPT09IGN1cnJlbnQgPyBpbmRleCA6IHVuZGVmaW5lZDsKICAgICAgICAgICAgfSksIHVuZGVmaW5lZCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENhbGN1bGF0ZXMgdGhlIHNjcm9sbCBwb3NpdGlvbiBhbmQgeC0gYW5kIHktb2Zmc2V0cyBvZiB0aGUgb3ZlcmxheSBwYW5lbC4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2NhbGN1bGF0ZU92ZXJsYXlQb3NpdGlvbigpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBpdGVtSGVpZ2h0ID0gdGhpcy5fZ2V0SXRlbUhlaWdodCgpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGl0ZW1zID0gdGhpcy5fZ2V0SXRlbUNvdW50KCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcGFuZWxIZWlnaHQgPSBNYXRoLm1pbihpdGVtcyAqIGl0ZW1IZWlnaHQsIFNFTEVDVF9QQU5FTF9NQVhfSEVJR0hUKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBzY3JvbGxDb250YWluZXJIZWlnaHQgPSBpdGVtcyAqIGl0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hTGFiZWxgIGlzIG9ubHkgdGhlIHVzZXItc3BlY2lmaWVkIGxhYmVsLgogICAgICAgICAgICBpZiAoIXRoaXMuX3BhcmVudEZvcm1GaWVsZCB8fCAhdGhpcy5fcGFyZW50Rm9ybUZpZWxkLl9oYXNGbG9hdGluZ0xhYmVsKCkgfHwKICAgICAgICAgICAgICAgIHRoaXMuX2dldEFyaWFMYWJlbCgpKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpcy5fcGFyZW50Rm9ybUZpZWxkLl9sYWJlbElkIHx8IG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIERldGVybWluZXMgdGhlIGBhcmlhLWFjdGl2ZWRlc2NlbmRhbnRgIHRvIGJlIHNldCBvbiB0aGUgaG9zdC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9nZXRBcmlhQWN0aXZlRGVzY2VuZGFudCgpIHsKICAgICAgICAgICAgaWYgKHRoaXMucGFuZWxPcGVuICYmIHRoaXMuX2tleU1hbmFnZXIgJiYgdGhpcy5fa2V5TWFuYWdlci5hY3RpdmVJdGVtKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fa2V5TWFuYWdlci5hY3RpdmVJdGVtLmlkOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZXRzIHRoZSB4LW9mZnNldCBvZiB0aGUgb3ZlcmxheSBwYW5lbCBpbiByZWxhdGlvbiB0byB0aGUgdHJpZ2dlcidzIHRvcCBzdGFydCBjb3JuZXIuCiAgICAgICAgICogVGhpcyBtdXN0IGJlIGFkanVzdGVkIHRvIGFsaWduIHRoZSBzZWxlY3RlZCBvcHRpb24gdGV4dCBvdmVyIHRoZSB0cmlnZ2VyIHRleHQgd2hlbgogICAgICAgICAqIHRoZSBwY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eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgb2Zmc2V0WDsKICAgICAgICAgICAgLy8gQWRqdXN0IHRoZSBvZmZzZXQsIGRlcGVuZGluZyBvbiB0aGUgb3B0aW9uIHBhZGRpbmcuCiAgICAgICAgICAgIGlmICh0aGlzLm11bHRpcGxlKSB7CiAgICAgICAgICAgICAgICBvZmZzZXRYID0gU0VMRUNUX01VTFRJUExFX1BBTkVMX1BBRERJTkdfWDsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCBzZWxlY3RlZCA9IHRoaXMuX3NlbGVjdGlvbk1vZGVsLnNlbGVjdGVkWzBdIHx8IHRoaXMub3B0aW9ucy5maXJzdDsKICAgICAgICAgICAgICAgIG9mZnNldFggPSBzZWxlY3RlZCAmJiBzZWxlY3RlZC5ncm91cCA/IFNFTEVDVF9QQU5FTF9JTkRFTlRfUEFERElOR19YIDogU0VMRUNUX1BBTkVMX1BBRERJTkdfWDsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBJbnZlcnQgdGhlIG9mZnNldCBpbiBMVFIuCiAgICAgICAgICAgIGlmICghaXNSdGwpIHsKICAgICAgICAgICAgICAgIG9mZnNldFggKj0gLTE7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gRGV0ZXJtaW5lIGhvdyBtdWNoIHRoZSBzZWxlY3Qgb3ZlcmZsb3dzIG9uIGVhY2ggc2lkZS4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBsZWZ0T3ZlcmZsb3cgPSAwIC0gKG92ZXJsYXlSZWN0LmxlZnQgKyBvZmZzZXRYIC0gKGlzUnRsID8gcGFkZGluZ1dpZHRoIDogMCkpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHJpZ2h0T3ZlcmZsb3cgPSBvdmVybGF5UmVjdC5yaWdodCArIG9mZnNldFggLSB2aWV3cG9ydFNpemUud2lkdGgKICAgICAgICAgICAgICAgICsgKGlzUnRsID8gMCA6IHBhZGRpbmdXaWR0aCk7CiAgICAgICAgICAgIC8vIElmIHRoZSBlbGVtZW50IG92ZXJmbG93cyBvbiBlaXRoZXIgc2lkZSwgcmVkdWNlIHRoZSBvZmZzZXQgdG8gYWxsb3cgaXQgdG8gZml0LgogICAgICAgICAgICBpZiAobGVmdE92ZXJmbG93ID4gMCkgewogICAgICAgICAgICAgICAgb2Zmc2V0WCArPSBsZWZ0T3ZlcmZsb3cgKyBTRUxFQ1RfUEFORUxfVklFV1BPUlRfUEFERElORzsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChyaWdodE92ZXJmbG93ID4gMCkgewogICAgICAgICAgICAgICAgb2Zmc2V0WCAtPSByaWdodE92ZXJmbG93ICsgU0VMRUNUX1BBTkVMX1ZJRVdQT1JUX1BBRERJTkc7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gU2V0IHRoZSBvZmZzZXQgZGlyZWN0bHkgaW4gb3JkZXIgdG8gYXZvaWQgaGF2aW5nIHRvIGdvIHRocm91Z2ggY2hhbmdlIGRldGVjdGlvbiBhbmQKICAgICAgICAgICAgLy8gcG90ZW50aWFsbHkgdHJpZ2dlcmluZyAiY2hhbmdlZCBhZnRlciBpdCB3YXMgY2hlY2tlZCIgZXJyb3JzLiBSb3VuZCB0aGUgdmFsdWUgdG8gYXZvaWQKICAgICAgICAgICAgLy8gYmx1cnJ5IGNvbnRlbnQgaW4gc29tZSBicm93c2Vycy4KICAgICAgICAgICAgdGhpcy5vdmVybGF5RGlyLm9mZnNldFggPSBNYXRoLnJvdW5kKG9mZnNldFgpOwogICAgICAgICAgICB0aGlzLm92ZXJsYXlEaXIub3ZlcmxheVJlZi51cGRhdGVQb3NpdGlvbigpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDYWxjdWxhdGVzIH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dodCgpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG9wdGlvbkhlaWdodEFkanVzdG1lbnQgPSAoaXRlbUhlaWdodCAtIHRoaXMuX3RyaWdnZXJSZWN0LmhlaWdodCkgLyAyOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG9yaWdpblkgPSBNYXRoLmFicyh0aGlzLl9vZmZzZXRZKSAtIG9wdGlvbkhlaWdodEFkanVzdG1lbnQgKyBpdGVtSGVpZ2h0IC8gMjsKICAgICAgICAgICAgcmV0dXJuIGA1MCUgJHtvcmlnaW5ZfXB4IDBweGA7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENhbGN1bGF0ZXMgdGhlIGFtb3VudCBvZiBpdGVtcyBpbiB0aGUgc2VsZWN0LiBUaGlzIGluY2x1ZGVzIG9wdGlvbnMgYW5kIGdyb3VwIGxhYmVscy4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2dldEl0ZW1Db3VudCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMub3B0aW9ucy5sZW5ndGggKyB0aGlzLm9wdGlvbkdyb3Vwcy5sZW5ndGg7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENhbGN1bGF0ZXMgdGhlIGhlaWdodCBvZiB0aGUgc2VsZWN0J3Mgb3B0aW9ucy4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2dldEl0ZW1IZWlnaHQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl90cmlnZ2VyRm9udFNpemUgKiBTRUxFQ1RfSVRFTV9IRUlHSFRfRU07CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEltcGxlbWVudGVkIGFzIHBhcnQgb2YgTWF0Rm9ybUZpZWxkQ29udHJvbC4KICAgICAgICAgKiBcQGRvY3MtcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gaWRzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXREZXNjcmliZWRCeUlkcyhpZHMpIHsKICAgICAgICAgICAgdGhpcy5fYXJpYURlc2NyaWJlZGJ5ID0gaWRzLmpvaW4oJyAnKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogSW1wbGVtZW50ZWQgYXMgcGFydCBvZiBNYXRGb3JtRmllbGRDb250cm9sLgogICAgICAgICAqIFxAZG9jcy1wcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvbkNvbnRhaW5lckNsaWNrKCkgewogICAgICAgICAgICB0aGlzLmZvY3VzKCk7CiAgICAgICAgICAgIHRoaXMub3BlbigpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBJbXBsZW1lbnRlZCBhcyBwYXJ0IG9mIE1hdEZvcm1GaWVsZENvbnRyb2wuCiAgICAgICAgICogXEBkb2NzLXByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBzaG91bGRMYWJlbEZsb2F0KCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fcGFuZWxPcGVuIHx8ICF0aGlzLmVtcHR5OwogICAgICAgIH0KICAgIH0KICAgIE1hdFNlbGVjdC7JtWZhYyA9IGZ1bmN0aW9uIE1hdFNlbGVjdF9GYWN0b3J5KHQpIHsgcmV0dXJuIG5ldyAodCB8fCBNYXRTZWxlY3QpKMm1ybVkaXJlY3RpdmVJbmplY3QoVmlld3BvcnRSdWxlciksIMm1ybVkaXJlY3RpdmVJbmplY3QoQ2hhbmdlRGV0ZWN0b3JSZWYpLCDJtcm1ZGlyZWN0aXZlSW5qZWN0KE5nWm9uZSksIMm1ybVkaXJlY3RpdmVJbmplY3QoRXJyb3JT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BFdmVudEVtaXR0ZXIoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXRBY3RpdmVQbHVnaW5JbmRleCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuYWN0aXZlUGx1Z2lucy5maW5kSW5kZXgoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHsgaWQgfSkgPT4gaWQgPT09IHRoaXMuc2VsZWN0ZWRQbHVnaW4pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBldmVudAogICAgICAgICAqIEBwYXJhbSB7P30gcGx1Z2luSWQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uQWN0aXZlUGx1Z2luU2VsZWN0aW9uKGV2ZW50LCBwbHVnaW5JZCkgewogICAgICAgICAgICBldmVudC5zdG9wUHJvcGFnYXRpb24oKTsKICAgICAgICAgICAgdGhpcy5vblBsdWdpblNlbGVjdGlvbkNoYW5nZWQuZW1pdChwbHVnaW5JZCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gc2VsZWN0Q2hhbmdlRXZlbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uRGlzYWJsZWRQbHVnaW5TZWxlY3Rpb25DaGFuZ2VkKHNlbGVjdENoYW5nZUV2ZW50KSB7CiAgICAgICAgICAgIHRoaXMub25QbHVnaW5TZWxlY3Rpb25DaGFuZ2VkLmVtaXQoc2VsZWN0Q2hhbmdlRXZlbnQudmFsdWUpOwogICAgICAgIH0KICAgIH0KICAgIFBsdWdpblNlbGVjdG9yQ29tcG9uZW50LmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBDb21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gICAqLwogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgZ2V0VWlQbHVnaW5zID0gY3JlYXRlU2VsZWN0b3IoZ2V0UGx1Z2lucywgKC8qKgogICAgICogQHBhcmFtIHs/fSBsaXN0aW5nCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICAobGlzdGluZykgPT4gT2JqZWN0LmtleXMobGlzdGluZykubWFwKCgvKioKICAgICAqIEBwYXJhbSB7P30ga2V5CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICAoa2V5KSA9PiBPYmplY3QuYXNzaWduKHt9LCB7IGlkOiBrZXkgfSwgbGlzdGluZ1trZXldKSkpKSk7CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBnZXREaXNhYmxlZFBsdWdpbnMgPSBjcmVhdGVTZWxlY3RvcihnZXRVaVBsdWdpbnMsICgvKioKICAgICAqIEBwYXJhbSB7P30gcGx1Z2lucwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgKHBsdWdpbnMpID0+IHBsdWdpbnMuZmlsdGVyKCgvKioKICAgICAqIEBwYXJhbSB7P30gcGx1Z2luCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICAocGx1Z2luKSA9PiAhcGx1Z2luLmVuYWJsZWQpKSkpOwogICAgY2xhc3MgUGx1Z2luU2VsZWN0b3JDb250YWluZXIgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gc3RvcmUKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihzdG9yZSkgewogICAgICAgICAgICB0aGlzLnN0b3JlID0gc3RvcmU7CiAgICAgICAgICAgIHRoaXMuYWN0aXZlUGx1Z2luJCA9IHRoaXMuc3RvcmUucGlwZShzZWxlY3QoZ2V0QWN0aXZlUGx1Z2luKSk7CiAgICAgICAgICAgIHRoaXMucGx1Z2lucyQgPSB0aGlzLnN0b3JlLnBpcGUoc2VsZWN0KGdldFVpUGx1Z2lucykpOwogICAgICAgICAgICB0aGlzLmRpc2FibGVkUGx1Z2lucyQgPSB0aGlzLnN0b3JlLnBpcGUoc2VsZWN0KGdldERpc2FibGVkUGx1Z2lucykpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHBsdWdpbklkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvblBsdWdpblNlbGVjdGlvbkNoYW5nZShwbHVnaW5JZCkgewogICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKGNoYW5nZVBsdWdpbih7IHBsdWdpbjogcGx1Z2luSWQgfSkpOwogICAgICAgIH0KICAgIH0KICAgIFBsdWdpblNlbGVjdG9yQ29udGFpbmVyLmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBDb21wb25lbnQsIGFyZ3M6IFt7CiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3I6ICdwbHVnaW4tc2VsZWN0b3InLAogICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlOiBgCiAgICA8cGx1Z2luLXNlbGVjdG9yLWNvbXBvbmVudAogICAgICBbYWN0aXZlUGx1Z2luc109InBsdWdpbnMkIHwgYXN5bmMiCiAgICAgIFtkaXNhYmxlZFBsdWdpbnNdPSJkaXNhYmxlZFBsdWdpbnMkIHwgYXN5bmMiCiAgICAgIFtzZWxlY3RlZFBsdWdpbl09ImFjdGl2ZVBsdWdpbiQgfCBhc3luYyIKICAgICAgKG9uUGx1Z2luU2VsZWN0aW9uQ2hhbmdlZCk9Im9uUGx1Z2luU2VsZWN0aW9uQ2hhbmdlKCRldmVudCkiCiAgICA+PC9wbHVnaW4tc2VsZWN0b3ItY29tcG9uZW50PgogIGAsCiAgICAgICAgICAgICAgICB9LF0gfSwKICAgIF07CiAgICAvKiogQG5vY29sbGFwc2UgKi8KICAgIFBsdWdpblNlbGVjdG9yQ29udGFpbmVyLmN0b3JQYXJhbWV0ZXJzID0gKCkgPT4gWwogICAgICAg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SBjbGFzcyBmb3IgdGhlIG92ZXJsYXkgcGFuZS4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMucGFuZWxDbGFzcyA9ICcnOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogV2hldGhlciB0aGUgZGlhbG9nIGhhcyBhIGJhY2tkcm9wLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5oYXNCYWNrZHJvcCA9IHRydWU7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBDdXN0b20gY2xhc3MgZm9yIHRoZSBiYWNrZHJvcC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuYmFja2Ryb3BDbGFzcyA9ICcnOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogV2hldGhlciB0aGUgdXNlciBjYW4gdXNlIGVzY2FwZSBvciBjbGlja2luZyBvbiB0aGUgYmFja2Ryb3AgdG8gY2xvc2UgdGhlIG1vZGFsLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5kaXNhYmxlQ2xvc2UgPSBmYWxzZTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFdpZHRoIG9mIHRoZSBkaWFsb2cuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLndpZHRoID0gJyc7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBIZWlnaHQgb2YgdGhlIGRpYWxvZy4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuaGVpZ2h0ID0gJyc7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBNYXgtd2lkdGggb2YgdGhlIGRpYWxvZy4gSWYgYSBudW1iZXIgaXMgcHJvdmlkZWQsIGFzc3VtZXMgcGl4ZWwgdW5pdHMuIERlZmF1bHRzIHRvIDgwdncuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLm1heFdpZHRoID0gJzgwdncnOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRGF0YSBiZWluZyBpbmplY3RlZCBpbnRvIHRoZSBjaGlsZCBjb21wb25lbnQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmRhdGEgPSBudWxsOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogSUQgb2YgdGhlIGVsZW1lbnQgdGhhdCBkZXNjcmliZXMgdGhlIGRpYWxvZy4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuYXJpYURlc2NyaWJlZEJ5ID0gbnVsbDsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIElEIG9mIHRoZSBlbGVtZW50IHRoYXQgbGFiZWxzIHRoZSBkaWFsb2cuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmFyaWFMYWJlbGxlZEJ5ID0gbnVsbDsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEFyaWEgbGFiZWwgdG8gYXNzaWduIHRvIHRoZSBkaWFsb2cgZWxlbWVudC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuYXJpYUxhYmVsID0gbnVsbDsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFdoZXRoZXIgdGhlIGRpYWxvZyBzaG91bGQgZm9jdXMgdGhlIGZpcnN0IGZvY3VzYWJsZSBlbGVtZW50IG9uIG9wZW4uCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmF1dG9Gb2N1cyA9IHRydWU7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBXaGV0aGVyIHRoZSBkaWFsb2cgc2hvdWxkIHJlc3RvcmUgZm9jdXMgdG8gdGhlCiAgICAgICAgICAgICAqIHByZXZpb3VzbHktZm9jdXNlZCBlbGVtZW50LCBhZnRlciBpdCdzIGNsb3NlZC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMucmVzdG9yZUZvY3VzID0gdHJ1ZTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFdoZXRoZXI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R2VuZXJhdGVkIGZyb206IHNyYy9tYXRlcmlhbC9kaWFsb2cvZGlhbG9nLWNvbnRhaW5lci50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvKioKICAgICAqIFRocm93cyBhbiBleGNlcHRpb24gZm9yIHRoZSBjYXNlIHdoZW4gYSBDb21wb25lbnRQb3J0YWwgaXMKICAgICAqIGF0dGFjaGVkIHRvIGEgRG9tUG9ydGFsT3V0bGV0IHdpdGhvdXQgYW4gb3JpZ2luLgogICAgICogXEBkb2NzLXByaXZhdGUKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHRocm93TWF0RGlhbG9nQ29udGVudEFscmVhZHlBdHRhY2hlZEVycm9yKCkgewogICAgICAgIHRocm93IEVycm9yKCdBdHRlbXB0aW5nIHRvIGF0dGFjaCBkaWFsb2cgY29udGVudCBhZnRlciBjb250ZW50IGlzIGFscmVhZHkgYXR0YWNoZWQnKTsKICAgIH0KICAgIC8qKgogICAgICogSW50ZXJuYWwgY29tcG9uZW50IHRoYXQgd3JhcHMgdXNlci1wcm92aWRlZCBkaWFsb2cgY29udGVudC4KICAgICAqIEFuaW1hdGlvbiBpcyBiYXNlZCBvbiBodHRwczovL21hdGVyaWFsLmlvL2d1aWRlbGluZXMvbW90aW9uL2Nob3Jlb2dyYXBoeS5odG1sLgogICAgICogXEBkb2NzLXByaXZhdGUKICAgICAqLwogICAgY2xhc3MgTWF0RGlhbG9nQ29udGFpbmVyIGV4dGVuZHMgQmFzZVBvcnRhbE91dGxldCB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBfZWxlbWVudFJlZgogICAgICAgICAqIEBwYXJhbSB7P30gX2ZvY3VzVHJhcEZhY3RvcnkKICAgICAgICAgKiBAcGFyYW0gez99IF9jaGFuZ2VEZXRlY3RvclJlZgogICAgICAgICAqIEBwYXJhbSB7P30gX2RvY3VtZW50CiAgICAgICAgICogQHBhcmFtIHs/fSBfY29uZmlnCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoX2VsZW1lbnRSZWYsIF9mb2N1c1RyYXBGYWN0b3J5LCBfY2hhbmdlRGV0ZWN0b3JSZWYsIF9kb2N1bWVudCwgX2NvbmZpZykgewogICAgICAgICAgICBzdXBlcigpOwogICAgICAgICAgICB0aGlzLl9lbGVtZW50UmVmID0gX2VsZW1lbnRSZWY7CiAgICAgICAgICAgIHRoaXMuX2ZvY3VzVHJhcEZhY3RvcnkgPSBfZm9jdXNUcmFwRmFjdG9yeTsKICAgICAgICAgICAgdGhpcy5fY2hhbmdlRGV0ZWN0b3JSZWYgPSBfY2hhbmdlRGV0ZWN0b3JSZWY7CiAgICAgICAgICAgIHRoaXMuX2NvbmZpZyA9IF9jb25maWc7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBFbGVtZW50IHRoYXQgd2FzIGZvY3VzZWQgYmVmb3JlIHRoZSBkaWFsb2cgd2FzIG9wZW5lZC4gU2F2ZSB0aGlzIHRvIHJlc3RvcmUgdXBvbiBjbG9zZS4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX2VsZW1lbnRGb2N1c2VkQmVmb3JlRGlhbG9nV2FzT3BlbmVkID0gbnVsbDsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFN0YXRlIG9mIHRoZSBkaWFsb2cgYW5pbWF0aW9uLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fc3RhdGUgPSAnZW50ZXInOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRW1pdHMgd2hlbiBhbiBhbmltYXRpb24gc3RhdGUgY2hhbmdlcy4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX2FuaW1hdGlvblN0YXRlQ2hhbmdlZCA9IG5ldyBFdmVudEVtaXR0ZXIoKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEF0dGFjaGVzIGEgRE9NIHBvcnRhbCB0byB0aGUgZGlhbG9nIGNvbnRhaW5lci4KICAgICAgICAgICAgICogQHBhcmFtIHBvcnRhbCBQb3J0YWwgdG8gYmUgYXR0YWNoZWQuCiAgICAgICAgICAgICAqIEBkZXByZWNhdGVkIFRvIGJlIHR1cm5lZCBpbnRvIGEgbWV0aG9kLgogICAgICAgICAgICAgKiBcQGJyZWFraW5nLWNoYW5nZSAxMC4wLjAKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuYXR0YWNoRG9tUG9ydGFsID0gKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHBvcnRhbAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHBvcnRhbCkgPT4gewogICAgICAgICAgICAgICAgaWYgKHRoaXMuX3BvcnRhbE91dGxldC5oYXNBdHRhY2hlZCgpKSB7CiAgICAgICAgICAgICAgICAgICAgdGhyb3dNYXREaWFsb2dDb250ZW50QWxyZWFkeUF0dGFjaGVkRXJyb3IoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuX3NldHVwRm9jdXNUcmFwKCk7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fcG9ydGFsT3V0bGV0LmF0dGFjaERvbVBvcnRhbChwb3J0YWwpOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdGhpcy5fYXJpYUxhYmVsbGVkQnkgPSBfY29uZmlnLmFyaWFMYWJlbGxlZEJ5IHx8IG51bGw7CiAgICAgICAgICAgIHRoaXMuX2RvY3VtZW50ID0gX2RvY3VtZW50OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBdHRhY2ggYSBDb21wb25lbnRQb3J0YWwgYXMgY29udGVudCB0byB0aGlzIGRpYWxvZyBjb250YWluZXIuCiAgICAgICAgICogQHRlbXBsYXRlIFQKICAgICAgICAgKiBAcGFyYW0gez99IHBvcnRhbCBQb3J0YWwgdG8gYmUgYXR0YWNoZWQgYXMgdGhlIGRpYWxvZyBjb250ZW50LgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYXR0YWNoQ29tcG9uZW50UG9ydGFsKHBvcnRhbCkgewogICAgICAgICAgICBpZiAodGhpcy5fcG9ydGFsT3V0bGV0Lmhhc0F0dGFjaGVkKCkpIHsKICAgICAgICAgICAgICAgIHRocm93TWF0RGlhbG9nQ29udGVudEFscmVhZHlBdHRhY2hlZEVycm9yKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fc2V0dXBGb2N1c1RyYXAoKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3BvcnRhbE91dGxldC5hdHRhY2hDb21wb25lbnRQb3J0YWwocG9ydGFsKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQXR0YWNoIGEgVGVtcGxhdGVQb3J0YWwgYXMgY29udGVudCB0byB0aGlzIGRpYWxvZyBjb250YWluZXIuCiAgICAgICAgICogQHRlbXBsYXRlIEMKICAgICAgICAgKiBAcGFyYW0gez99IHBvcnRhbCBQb3J0YWwgdG8gYmUgYXR0YWNoZWQgYXMgdGhlIGRpYWxvZyBjb250ZW50LgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYXR0YWNoVGVtcGxhdGVQb3J0YWwocG9ydGFsKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9wb3J0YWxPdXRsZXQuaGFzQXR0YWNoZWQoKSkgewogICAgICAgICAgICAgICAgdGhyb3dNYXREaWFsb2dDb250ZW50QWxyZWFkeUF0dGFjaGVkRXJyb3IoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9zZXR1cEZvY3VzVHJhcCgpOwogICAgICAgICAgICByZXR1cm4gdGhpcy5fcG9ydGFsT3V0bGV0LmF0dGFjaFRlbXBsYXRlUG9ydGFsKHBvcnRhbCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIE1vdmVzIGZvY3VzIGJhY2sgaW50byB0aGUgZGlhbG9nIGlmIGl0IHdhcyBtb3ZlZCBvdXQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfcmVjYXB0dXJlRm9jdXMoKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5fY29udGFpbnNGb2N1cygpKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBmb2N1c1dhc1RyYXBwZWQgPSB0aGlzLl9mb2N1c1RyYXAuZm9jdXNJbml0aWFsRWxlbWVudCgpOwogICAgICAgICAgICAgICAgaWYgKCFmb2N1c1dhc1RyYXBwZWQpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQuZm9jdXMoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBNb3ZlcyB0aGUgZm9jdXMgaW5zaWRlIHRoZSBmb2N1cyB0cmFwLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfdHJhcEZvY3VzKCkgewogICAgICAgICAgICAvLyBJZiB3ZSB3ZXJlIHRvIGF0dGVtcHQgdG8gZm9jdXMgaW1tZWRpYXRlbHksIHRoZW4gdGhlIGNvbnRlbnQgb2YgdGhlIGRpYWxvZyB3b3VsZCBub3QgeWV0IGJlCiAgICAgICAgICAgIC8vIHJlYWR5IGluIGluc3RhbmNlcyB3aGVyZSBjaGFuZ2UgZGV0ZWN0aW9uIGhhcyB0byBydW4gZmlyc3QuIFRvIGR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WZvcmUgbW92aW5nIGl0LiBJdCdzIHBvc3NpYmxlIHRoYXQKICAgICAgICAgICAgICAgIC8vIHRoZSBjb25zdW1lciBtb3ZlZCBpdCB0aGVtc2VsdmVzIGJlZm9yZSB0aGUgYW5pbWF0aW9uIHdhcyBkb25lLCBpbiB3aGljaCBjYXNlIHdlIHNob3VsZG4ndAogICAgICAgICAgICAgICAgLy8gZG8gYW55dGhpbmcuCiAgICAgICAgICAgICAgICBpZiAoIWFjdGl2ZUVsZW1lbnQgfHwgYWN0aXZlRWxlbWVudCA9PT0gdGhpcy5fZG9jdW1lbnQuYm9keSB8fCBhY3RpdmVFbGVtZW50ID09PSBlbGVtZW50IHx8CiAgICAgICAgICAgICAgICAgICAgZWxlbWVudC5jb250YWlucyhhY3RpdmVFbGVtZW50KSkgewogICAgICAgICAgICAgICAgICAgIHRvRm9jdXMuZm9jdXMoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5fZm9jdXNUcmFwKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9mb2N1c1RyYXAuZGVzdHJveSgpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgdXAgdGhlIGZvY3VzIHRyYW5kIGFuZCBzYXZlcyBhIHJlZmVyZW5jZSB0byB0aGUKICAgICAgICAgKiBlbGVtZW50IHRoYXQgd2FzIGZvY3VzZWQgYmVmb3JlIHRoZSBkaWFsb2cgd2FzIG9wZW5lZC4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3NldHVwRm9jdXNUcmFwKCkgewogICAgICAgICAgICBpZiAoIXRoaXMuX2ZvY3VzVHJhcCkgewogICAgICAgICAgICAgICAgdGhpcy5fZm9jdXNUcmFwID0gdGhpcy5fZm9jdXNUcmFwRmFjdG9yeS5jcmVhdGUodGhpcy5fZWxlbWVudFJlZi5uYXRpdmVFbGVtZW50KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5fZG9jdW1lbnQpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2VsZW1lbnRGb2N1c2VkQmVmb3JlRGlhbG9nV2FzT3BlbmVkID0gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX2RvY3VtZW50LmFjdGl2ZUVsZW1lbnQpKTsKICAgICAgICAgICAgICAgIC8vIE5vdGUgdGhhdCB0aGVyZSBpcyBubyBmb2N1cyBtZXRob2Qgd2hlbiByZW5kZXJpbmcgb24gdGhlIHNlcnZlci4KICAgICAgICAgICAgICAgIGlmICh0aGlzLl9lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQuZm9jdXMpIHsKICAgICAgICAgICAgICAgICAgICAvLyBNb3ZlIGZvY3VzIG9udG8gdGhlIGRpYWxvZyBpbW1lZGlhdGVseSBpbiBvcmRlciB0byBwcmV2ZW50IHRoZSB1c2VyIGZyb20gYWNjaWRlbnRhbGx5CiAgICAgICAgICAgICAgICAgICAgLy8gb3BlbmluZyBtdWx0aXBsZSBkaWFsb2dzIGF0IHRoZSBzYW1lIHRpbWUuIE5lZWRzIHRvIGJlIGFzeW5jLCBiZWNhdXNlIHRoZSBlbGVtZW50CiAgICAgICAgICAgICAgICAgICAgLy8gbWF5IG5vdCBiZSBmb2N1c2FibGUgaW1tZWRpYXRlbHkuCiAgICAgICAgICAgICAgICAgICAgUHJvbWlzZS5yZXNvbHZlKCkudGhlbigoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAoKSA9PiB0aGlzLl9lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQuZm9jdXMoKSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgd2hldGhlciBmb2N1cyBpcyBpbnNpZGUgdGhlIGRpYWxvZy4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2NvbnRhaW5zRm9jdXMoKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZWxlbWVudCA9IHRoaXMuX2VsZW1lbnRSZWYubmF0aXZlRWxlbWVudDsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBhY3RpdmVFbGVtZW50ID0gdGhpcy5fZG9jdW1lbnQuYWN0aXZlRWxlbWVudDsKICAgICAgICAgICAgcmV0dXJuIGVsZW1lbnQgPT09IGFjdGl2ZUVsZW1lbnQgfHwgZWxlbWVudC5jb250YWlucyhhY3RpdmVFbGVtZW50KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ2FsbGJhY2ssIGludm9rZWQgd2hlbmV2ZXIgYW4gYW5pbWF0aW9uIG9uIHRoZSBob3N0IGNvbXBsZXRlcy4KICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfb25BbmltYXRpb25Eb25lKGV2ZW50KSB7CiAgICAgICAgICAgIGlmIChldmVudC50b1N0YXRlID09PSAnZW50ZXInKSB7CiAgICAgICAgICAgICAgICB0aGlzLl90cmFwRm9jdXMoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChldmVudC50b1N0YXRlID09PSAnZXhpdCcpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3Jlc3RvcmVGb2N1cygpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2FuaW1hdGlvblN0YXRlQ2hhbmdlZC5lbWl0KGV2ZW50KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ2FsbGJhY2ssIGludm9rZWQgd2hlbiBhbiBhbmltYXRp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gICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFN1YmplY3QgZm9yIG5vdGlmeWluZyB0aGUgdXNlciB0aGF0IHRoZSBkaWFsb2cgaGFzIGZpbmlzaGVkIG9wZW5pbmcuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9hZnRlck9wZW5lZCA9IG5ldyBTdWJqZWN0KCk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBTdWJqZWN0IGZvciBub3RpZnlpbmcgdGhlIHVzZXIgdGhhdCB0aGUgZGlhbG9nIGhhcyBmaW5pc2hlZCBjbG9zaW5nLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fYWZ0ZXJDbG9zZWQgPSBuZXcgU3ViamVjdCgpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogU3ViamVjdCBmb3Igbm90aWZ5aW5nIHRoZSB1c2VyIHRoYXQgdGhlIGRpYWxvZyBoYXMgc3RhcnRlZCBjbG9zaW5nLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fYmVmb3JlQ2xvc2VkID0gbmV3IFN1YmplY3QoKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEN1cnJlbnQgc3RhdGUgb2YgdGhlIGRpYWxvZy4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX3N0YXRlID0gMCAvKiBPUEVOICovOwogICAgICAgICAgICAvLyBQYXNzIHRoZSBpZCBhbG9uZyB0byB0aGUgY29udGFpbmVyLgogICAgICAgICAgICBfY29udGFpbmVySW5zdGFuY2UuX2lkID0gaWQ7CiAgICAgICAgICAgIC8vIEVtaXQgd2hlbiBvcGVuaW5nIGFuaW1hdGlvbiBjb21wbGV0ZXMKICAgICAgICAgICAgX2NvbnRhaW5lckluc3RhbmNlLl9hbmltYXRpb25TdGF0ZUNoYW5nZWQucGlwZShmaWx0ZXIoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBldmVudCA9PiBldmVudC5waGFzZU5hbWUgPT09ICdkb25lJyAmJiBldmVudC50b1N0YXRlID09PSAnZW50ZXInKSksIHRha2UoMSkpCiAgICAgICAgICAgICAgICAuc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuX2FmdGVyT3BlbmVkLm5leHQoKTsKICAgICAgICAgICAgICAgIHRoaXMuX2FmdGVyT3BlbmVkLmNvbXBsZXRlKCk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgLy8gRGlzcG9zZSBvdmVybGF5IHdoZW4gY2xvc2luZyBhbmltYXRpb24gaXMgY29tcGxldGUKICAgICAgICAgICAgX2NvbnRhaW5lckluc3RhbmNlLl9hbmltYXRpb25TdGF0ZUNoYW5nZWQucGlwZShmaWx0ZXIoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBldmVudCA9PiBldmVudC5waGFzZU5hbWUgPT09ICdkb25lJyAmJiBldmVudC50b1N0YXRlID09PSAnZXhpdCcpKSwgdGFrZSgxKSkuc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIGNsZWFyVGltZW91dCh0aGlzLl9jbG9zZUZhbGxiYWNrVGltZW91dCk7CiAgICAgICAgICAgICAgICB0aGlzLl9maW5pc2hEaWFsb2dDbG9zZSgpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIF9vdmVybGF5UmVmLmRldGFjaG1lbnRzKCkuc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuX2JlZm9yZUNsb3NlZC5uZXh0KHRoaXMuX3Jlc3VsdCk7CiAgICAgICAgICAgICAgICB0aGlzLl9iZWZvcmVDbG9zZWQuY29tcGxldGUoKTsKICAgICAgICAgICAgICAgIHRoaXMuX2FmdGVyQ2xvc2VkLm5leHQodGhpcy5fcmVzdWx0KTsKICAgICAgICAgICAgICAgIHRoaXMuX2FmdGVyQ2xvc2VkLmNvbXBsZXRlKCk7CiAgICAgICAgICAgICAgICB0aGlzLmNvbXBvbmVudEluc3RhbmNlID0gKC8qKiBAdHlwZSB7P30gKi8gKG51bGwpKTsKICAgICAgICAgICAgICAgIHRoaXMuX292ZXJsYXlSZWYuZGlzcG9zZSgpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIF9vdmVybGF5UmVmLmtleWRvd25FdmVudHMoKQogICAgICAgICAgICAgICAgLnBpcGUoZmlsdGVyKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBldmVudAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZXZlbnQgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIGV2ZW50LmtleUNvZGUgPT09IEVTQ0FQRSAmJiAhdGhpcy5kaXNhYmxlQ2xvc2UgJiYgIWhhc01vZGlmaWVyS2V5KGV2ZW50KTsKICAgICAgICAgICAgfSkpKQogICAgICAgICAgICAgICAgLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGV2ZW50ID0+IHsKICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7CiAgICAgICAgICAgICAgICB0aGlzLmNsb3NlKCk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgX292ZXJsYXlSZWYuYmFja2Ryb3BDbGljaygpLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5kaXNhYmxlQ2xvc2UpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9jb250YWluZXJJbnN0YW5jZS5fcmVjYXB0dXJlRm9jdXMoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIHRoaXMuY2xvc2UoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDbG9zZSB0aGUgZGlhbG9nLgogICAgICAgICAqIEBwYXJhbSB7Pz19IGRpYWxvZ1Jlc3VsdCBPcHRpb25hbCByZXN1bHQgdG8gcmV0dXJuIHRvIHRoZSBkaWFsb2cgb3BlbmVyLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgY2xvc2UoZGlhbG9nUmVzdWx0KSB7CiAgICAgICAgICAgIHRoaXMuX3Jlc3VsdCA9IGRpYWxvZ1Jlc3VsdDsKICAgICAgICAgICAgLy8gVHJhbnNpdGlvbiB0aGUgYmFja2Ryb3AgaW4gcGFyYWxsZWwgdG8gdGhlIGRpYWxvZy4KICAgICAgICAgICAgdGhpcy5fY29udGFpbmVySW5zdGFuY2UuX2FuaW1hdGlvblN0YXRlQ2hhbmdlZC5waXBlKGZpbHRlcigoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGV2ZW50ID0+IGV2ZW50LnBoYXNlTmFtZSA9PT0gJ3N0YXJ0JykpLCB0YWtlKDEpKQogICAgICAgICAgICAgICAgLnN1YnNjcm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YWxsYmFja1RpbWVvdXQgPSBzZXRUaW1lb3V0KCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHRoaXMuX2ZpbmlzaERpYWxvZ0Nsb3NlKCkpLCBldmVudC50b3RhbFRpbWUgKyAxMDApOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIHRoaXMuX2NvbnRhaW5lckluc3RhbmNlLl9zdGFydEV4aXRBbmltYXRpb24oKTsKICAgICAgICAgICAgdGhpcy5fc3RhdGUgPSAxIC8qIENMT1NJTkcgKi87CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEdldHMgYW4gb2JzZXJ2YWJsZSB0aGF0IGlzIG5vdGlmaWVkIHdoZW4gdGhlIGRpYWxvZyBpcyBmaW5pc2hlZCBvcGVuaW5nLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYWZ0ZXJPcGVuZWQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9hZnRlck9wZW5lZC5hc09ic2VydmFibGUoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogR2V0cyBhbiBvYnNlcnZhYmxlIHRoYXQgaXMgbm90aWZpZWQgd2hlbiB0aGUgZGlhbG9nIGlzIGZpbmlzaGVkIGNsb3NpbmcuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBhZnRlckNsb3NlZCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2FmdGVyQ2xvc2VkLmFzT2JzZXJ2YWJsZSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIGFuIG9ic2VydmFibGUgdGhhdCBpcyBub3RpZmllZCB3aGVuIHRoZSBkaWFsb2cgaGFzIHN0YXJ0ZWQgY2xvc2luZy4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGJlZm9yZUNsb3NlZCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2JlZm9yZUNsb3NlZC5hc09ic2VydmFibGUoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogR2V0cyBhbiBvYnNlcnZhYmxlIHRoYXQgZW1pdHMgd2hlbiB0aGUgb3ZlcmxheSdzIGJhY2tkcm9wIGhhcyBiZWVuIGNsaWNrZWQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBiYWNrZHJvcENsaWNrKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fb3ZlcmxheVJlZi5iYWNrZHJvcENsaWNrKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEdldHMgYW4gb2JzZXJ2YWJsZSB0aGF0IGVtaXRzIHdoZW4ga2V5ZG93biBldmVudHMgYXJlIHRhcmdldGVkIG9uIHRoZSBvdmVybGF5LgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAga2V5ZG93bkV2ZW50cygpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX292ZXJsYXlSZWYua2V5ZG93bkV2ZW50cygpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBVcGRhdGVzIHRoZSBkaWFsb2cncyBwb3NpdGlvbi4KICAgICAgICAgKiBAdGVtcGxhdGUgVEhJUwogICAgICAgICAqIEB0aGlzIHtUSElTfQogICAgICAgICAqIEBwYXJhbSB7Pz19IHBvc2l0aW9uIE5ldyBkaWFsb2cgcG9zaXRpb24uCiAgICAgICAgICogQHJldHVybiB7VEhJU30KICAgICAgICAgKi8KICAgICAgICB1cGRhdGVQb3NpdGlvbihwb3NpdGlvbikgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBzdHJhdGVneSA9ICgvKiogQHR5cGUgez99ICovICh0aGlzKSkuX2dldFBvc2l0aW9uU3RyYXRlZ3koKTsKICAgICAgICAgICAgaWYgKHBvc2l0aW9uICYmIChwb3NpdGlvbi5sZWZ0IHx8IHBvc2l0aW9uLnJpZ2h0KSkgewogICAgICAgICAgICAgICAgcG9zaXRpb24ubGVmdCA/IHN0cmF0ZWd5LmxlZnQocG9zaXRpb24ubGVmdCkgOiBzdHJhdGVneS5yaWdodChwb3NpdGlvbi5yaWdodCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBzdHJhdGVneS5jZW50ZXJIb3Jpem9udGFsbHkoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAocG9zaXRpb24gJiYgKHBvc2l0aW9uLnRvcCB8fCBwb3NpdGlvbi5ib3R0b20pKSB7CiAgICAgICAgICAgICAgICBwb3NpdGlvbi50b3AgPyBzdHJhdGVneS50b3AocG9zaXRpb24udG9wKSA6IHN0cmF0ZWd5LmJvdHRvbShwb3NpdGlvbi5ib3R0b20pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgc3RyYXRlZ3kuY2VudGVyVmVydGljYWxseSgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovICh0aGlzKSkuX292ZXJsYXlSZWYudXBkYXRlUG9zaXRpb24oKTsKICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovICh0aGlzKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFVwZGF0ZXMgdGhlIGRpYWxvZydzIHdpZHRoIGFuZCBoZWlnaHQuCiAgICAgICAgICogQHRlbXBsYXRlIFRISVMKICAgICAgICAgKiBAdGhpcyB7VEhJU30KICAgICAgICAgKiBAcGFyYW0gez89fSB3aWR0aCBOZXcgd2lkdGggb2YgdGhlIGRpYWxvZy4KICAgICAgICAgKiBAcGFyYW0gez89fSBoZWlnaHQgTmV3IGhlaWdodCBvZiB0aGUgZGlhbG9nLgogICAgICAgICAqIEByZXR1cm4ge1RISVN9CiAgICAgICAgICovCiAgICAgICAgdXBkYXRlU2l6ZSh3aWR0aCA9ICcnLCBoZWlnaHQgPSAnJykgewogICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpLl9nZXRQb3NpdGlvblN0cmF0ZWd5KCkud2lkdGgod2lkdGgpLmhlaWdodChoZWlnaHQpOwogICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpLl9vdmVybGF5UmVmLnVwZGF0ZVBvc2l0aW9uKCk7CiAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBZGQgYSBDU1MgY2xhc3Mgb3IgYW4gYXJyYXkgb2YgY2xhc3NlcyB0byB0aGUgb3ZlcmxheSBwYW5lLgogICAgICAgICAqIEB0ZW1wbGF0ZSBUSElTCiAgICAgICAgICogQHRoaXMge1RISVN9CiAgICAgICAgICogQHBhcmFtIHs/fSBjbGFzc2VzCiAgICAgICAgICogQHJldHVybiB7VEhJU30KICAgICAgICAgKi8KICAgICAgICBhZGRQYW5lbENsYXNzKGNsYXNzZXMpIHsKICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKS5fb3ZlcmxheVJlZi5hZGRQYW5lbENsYXNzKGNsYXNzZXMpOwogICAgICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmVtb3ZlIGEgQ1NTIGNsYXNzIG9yIGFuIGFycmF5IG9mIGNsYXNzZXMgZnJvbSB0aGUgb3ZlcmxheSBwYW5lLgogICAgICAgICAqIEB0ZW1wbGF0ZSBUSElTCiAgICAgICAgICogQHRoaXMge1RISVN9CiAgICAgICAgICogQHBhcmFtIHs/fSBjbGFzc2VzCiAgICAgICAgICogQHJldHVybiB7VEhJU30KICAgICAgICAgKi8KICAgICAgICByZW1vdmVQYW5lbENsYXNzKGNsYXNzZXMpIHsKICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKS5fb3ZlcmxheVJlZi5yZW1vdmVQYW5lbENsYXNzKGNsYXNzZXMpOwogICAgICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogR2V0cyB0aGUgY3VycmVudCBzdGF0ZSBvZiB0aGUgZGlhbG9nJ3MgbGlmZWN5Y2xlLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0U3RhdGUoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9zdGF0ZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogRmluaXNoZXMgdGhlIGRpYWxvZyBjbG9zZSBieSB1cGRhdGluZyB0aGUgc3RhdGUgb2YgdGhlIGRpYWxvZwogICAgICAgICAqIGFuZCBkaXNwb3NpbmcgdGhlIG92ZXJsYXkuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9maW5pc2hEaWFsb2dDbG9zZSgpIHsKICAgICAgICAgICAgdGhpcy5fc3RhdGUgPSAyIC8qIENMT1NFRCAqLzsKICAgICAgICAgICAgdGhpcy5fb3ZlcmxheVJlZi5kaXNwb3NlKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEZldGNoZXMgdGhlIHBvc2l0aW9uIHN0cmF0ZWd5IG9iamVjdCBmcm9tIHRoZSBvdmVybGF5IHJlZi4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2dldFBvc2l0aW9uU3RyYXRlZ3koKSB7CiAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5fb3Zl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dHlwaW5nIHJpZ2h0LWhhbmQgc2lkZSBvZiB0aGlzIGV4cHJlc3Npb24uCiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBTdHJlYW0gdGhhdCBlbWl0cyB3aGVuIGFsbCBvcGVuIGRpYWxvZyBoYXZlIGZpbmlzaGVkIGNsb3NpbmcuCiAgICAgICAgICAgICAqIFdpbGwgZW1pdCBvbiBzdWJzY3JpYmUgaWYgdGhlcmUgYXJlIG5vIG9wZW4gZGlhbG9ncyB0byBiZWdpbiB3aXRoLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5hZnRlckFsbENsb3NlZCA9ICgvKiogQHR5cGUgez99ICovIChkZWZlcigoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB0aGlzLm9wZW5EaWFsb2dzLmxlbmd0aCA/CiAgICAgICAgICAgICAgICB0aGlzLl9hZnRlckFsbENsb3NlZCA6CiAgICAgICAgICAgICAgICB0aGlzLl9hZnRlckFsbENsb3NlZC5waXBlKHN0YXJ0V2l0aCh1bmRlZmluZWQpKSkpKSk7CiAgICAgICAgICAgIHRoaXMuX3Njcm9sbFN0cmF0ZWd5ID0gc2Nyb2xsU3RyYXRlZ3k7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEtlZXBzIHRyYWNrIG9mIHRoZSBjdXJyZW50bHktb3BlbiBkaWFsb2dzLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IG9wZW5EaWFsb2dzKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fcGFyZW50RGlhbG9nID8gdGhpcy5fcGFyZW50RGlhbG9nLm9wZW5EaWFsb2dzIDogdGhpcy5fb3BlbkRpYWxvZ3NBdFRoaXNMZXZlbDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU3RyZWFtIHRoYXQgZW1pdHMgd2hlbiBhIGR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ICAgICAgIHRoaXMuX2hpZGVOb25EaWFsb2dDb250ZW50RnJvbUFzc2lzdGl2ZVRlY2hub2xvZ3koKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLm9wZW5EaWFsb2dzLnB1c2goZGlhbG9nUmVmKTsKICAgICAgICAgICAgZGlhbG9nUmVmLmFmdGVyQ2xvc2VkKCkuc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHRoaXMuX3JlbW92ZU9wZW5EaWFsb2coZGlhbG9nUmVmKSkpOwogICAgICAgICAgICB0aGlzLmFmdGVyT3BlbmVkLm5leHQoZGlhbG9nUmVmKTsKICAgICAgICAgICAgcmV0dXJuIGRpYWxvZ1JlZjsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ2xvc2VzIGFsbCBvZiB0aGUgY3VycmVudGx5LW9wZW4gZGlhbG9ncy4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGNsb3NlQWxsKCkgewogICAgICAgICAgICB0aGlzLl9jbG9zZURpYWxvZ3ModGhpcy5vcGVuRGlhbG9ncyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEZpbmRzIGFuIG9wZW4gZGlhbG9nIGJ5IGl0cyBpZC4KICAgICAgICAgKiBAcGFyYW0gez99IGlkIElEIHRvIHVzZSB3aGVuIGxvb2tpbmcgdXAgdGhlIGRpYWxvZy4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldERpYWxvZ0J5SWQoaWQpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMub3BlbkRpYWxvZ3MuZmluZCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZGlhbG9nCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBkaWFsb2cgPT4gZGlhbG9nLmlkID09PSBpZCkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25EZXN0cm95KCkgewogICAgICAgICAgICAvLyBPbmx5IGNsb3NlIHRoZSBkaWFsb2dzIGF0IHRoaXMgbGV2ZWwgb24gZGVzdHJveQogICAgICAgICAgICAvLyBzaW5jZSB0aGUgcGFyZW50IHNlcnZpY2UgbWF5IHN0aWxsIGJlIGFjdGl2ZS4KICAgICAgICAgICAgdGhpcy5fY2xvc2VEaWFsb2dzKHRoaXMuX29wZW5EaWFsb2dzQXRUaGlzTGV2ZWwpOwogICAgICAgICAgICB0aGlzLl9hZnRlckFsbENsb3NlZEF0VGhpc0xldmVsLmNvbXBsZXRlKCk7CiAgICAgICAgICAgIHRoaXMuX2FmdGVyT3BlbmVkQXRUaGlzTGV2ZWwuY29tcGxldGUoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyB0aGUgb3ZlcmxheSBpbnRvIHdoaWNoIHRoZSBkaWFsb2cgd2lsbCBiZSBsb2FkZWQuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGNvbmZpZyBUaGUgZGlhbG9nIGNvbmZpZ3VyYXRpb24uCiAgICAgICAgICogQHJldHVybiB7P30gQSBwcm9taXNlIHJlc29sdmluZyB0byB0aGUgT3ZlcmxheVJlZiBmb3IgdGhlIGNyZWF0ZWQgb3ZlcmxheS4KICAgICAgICAgKi8KICAgICAgICBfY3JlYXRlT3ZlcmxheShjb25maWcpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBvdmVybGF5Q29uZmlnID0gdGhpcy5fZ2V0T3ZlcmxheUNvbmZpZyhjb25maWcpOwogICAgICAgICAgICByZXR1cm4gdGhpcy5fb3ZlcmxheS5jcmVhdGUob3ZlcmxheUNvbmZpZyk7CiAgICAgICA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pZ2h0LAogICAgICAgICAgICAgICAgZGlzcG9zZU9uTmF2aWdhdGlvbjogZGlhbG9nQ29uZmlnLmNsb3NlT25OYXZpZ2F0aW9uCiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBpZiAoZGlhbG9nQ29uZmlnLmJhY2tkcm9wQ2xhc3MpIHsKICAgICAgICAgICAgICAgIHN0YXRlLmJhY2tkcm9wQ2xhc3MgPSBkaWFsb2dDb25maWcuYmFja2Ryb3BDbGFzczsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gc3RhdGU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEF0dGFjaGVzIGFuIE1hdERpYWxvZ0NvbnRhaW5lciB0byBhIGRpYWxvZydzIGFscmVhZHktY3JlYXRlZCBvdmVybGF5LgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBvdmVybGF5IFJlZmVyZW5jZSB0byB0aGUgZGlhbG9nJ3MgdW5kZXJseWluZyBvdmVybGF5LgogICAgICAgICAqIEBwYXJhbSB7P30gY29uZmlnIFRoZSBkaWFsb2cgY29uZmlndXJhdGlvbi4KICAgICAgICAgKiBAcmV0dXJuIHs/fSBBIHByb21pc2UgcmVzb2x2aW5nIHRvIGEgQ29tcG9uZW50UmVmIGZvciB0aGUgYXR0YWNoZWQgY29udGFpbmVyLgogICAgICAgICAqLwogICAgICAgIF9hdHRhY2hEaWFsb2dDb250YWluZXIob3ZlcmxheSwgY29uZmlnKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdXNlckluamVjdG9yID0gY29uZmlnICYmIGNvbmZpZy52aWV3Q29udGFpbmVyUmVmICYmIGNvbmZpZy52aWV3Q29udGFpbmVyUmVmLmluamVjdG9yOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGluamVjdG9yID0gSW5qZWN0b3IuY3JlYXRlKHsKICAgICAgICAgICAgICAgIHBhcmVudDogdXNlckluamVjdG9yIHx8IHRoaXMuX2luamVjdG9yLAogICAgICAgICAgICAgICAgcHJvdmlkZXJzOiBbeyBwcm92aWRlOiBNYXREaWFsb2dDb25maWcsIHVzZVZhbHVlOiBjb25maWcgfV0KICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgY29udGFpbmVyUG9ydGFsID0gbmV3IENvbXBvbmVudFBvcnRhbChNYXREaWFsb2dDb250YWluZXIsIGNvbmZpZy52aWV3Q29udGFpbmVyUmVmLCBpbmplY3RvciwgY29uZmlnLmNvbXBvbmVudEZhY3RvcnlSZXNvbHZlcik7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgY29udGFpbmVyUmVmID0gb3ZlcmxheS5hdHRhY2goY29udGFpbmVyUG9ydGFsKTsKICAgICAgICAgICAgcmV0dXJuIGNvbnRhaW5lclJlZi5pbnN0YW5jZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQXR0YWNoZXMgdGhlIHVzZXItcHJvdmlkZWQgY29tcG9uZW50IHRvIHRoZSBhbHJlYWR5LWNyZWF0ZWQgTWF0RGlhbG9nQ29udGFpbmVyLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHRlbXBsYXRlIFQsIFIKICAgICAgICAgKiBAcGFyYW0gez99IGNvbXBvbmVudE9yVGVtcGxhdGVSZWYgVGhlIHR5cGUgb2YgY29tcG9uZW50IGJlaW5nIGxvYWRlZCBpbnRvIHRoZSBkaWFsb2csCiAgICAgICAgICogICAgIG9yIGEgVGVtcGxhdGVSZWYgdG8gaW5zdGFudGlhdGUgYXMgdGhlIGNvbnRlbnQuCiAgICAgICAgICogQHBhcmFtIHs/fSBkaWFsb2dDb250YWluZXIgUmVmZXJlbmNlIHRvIHRoZSB3cmFwcGluZyBNYXREaWFsb2dDb250YWluZXIuCiAgIC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nUmVmIH0pKSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgaW5qZWN0b3IgPSB0aGlzLl9jcmVhdGVJbmplY3Rvcihjb25maWcsIGRpYWxvZ1JlZiwgZGlhbG9nQ29udGFpbmVyKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGNvbnRlbnRSZWYgPSBkaWFsb2dDb250YWluZXIuYXR0YWNoQ29tcG9uZW50UG9ydGFsKG5ldyBDb21wb25lbnRQb3J0YWwoY29tcG9uZW50T3JUZW1wbGF0ZVJlZiwgY29uZmlnLnZpZXdDb250YWluZXJSZWYsIGluamVjdG9yKSk7CiAgICAgICAgICAgICAgICBkaWFsb2dSZWYuY29tcG9uZW50SW5zdGFuY2UgPSBjb250ZW50UmVmLmluc3RhbmNlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGRpYWxvZ1JlZgogICAgICAgICAgICAgICAgLnVwZGF0ZVNpemUoY29uZmlnLndpZHRoLCBjb25maWcuaGVpZ2h0KQogICAgICAgICAgICAgICAgLnVwZGF0ZVBvc2l0aW9uKGNvbmZpZy5wb3NpdGlvbik7CiAgICAgICAgICAgIHJldHVybiBkaWFsb2dSZWY7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYSBjdXN0b20gaW5qZWN0b3IgdG8gYmUgdXNlZCBpbnNpZGUgdGhlIGRpYWxvZy4gVGhpcyBhbGxvd3MgYSBjb21wb25lbnQgbG9hZGVkIGluc2lkZQogICAgICAgICAqIG9mIGEgZGlhbG9nIHRvIGNsb3NlIGl0c2VsZiBhbmQsIG9wdGlvbmFsbHksIHRvIHJldHVybiBhIHZhbHVlLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHRlbXBsYXRlIFQKICAgICAgICAgKiBAcGFyY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ICAgICAgICBjb25zdCBwcm92aWRlcnMgPSBbCiAgICAgICAgICAgICAgICB7IHByb3ZpZGU6IE1hdERpYWxvZ0NvbnRhaW5lciwgdXNlVmFsdWU6IGRpYWxvZ0NvbnRhaW5lciB9LAogICAgICAgICAgICAgICAgeyBwcm92aWRlOiBNQVRfRElBTE9HX0RBVEEsIHVzZVZhbHVlOiBjb25maWcuZGF0YSB9LAogICAgICAgICAgICAgICAgeyBwcm92aWRlOiBNYXREaWFsb2dSZWYsIHVzZVZhbHVlOiBkaWFsb2dSZWYgfQogICAgICAgICAgICBdOwogICAgICAgICAgICBpZiAoY29uZmlnLmRpcmVjdGlvbiAmJgogICAgICAgICAgICAgICAgKCF1c2VySW5qZWN0b3IgfHwgIXVzZXJJbmplY3Rvci5nZXQoRGlyZWN0aW9uYWxpdHksIG51bGwpKSkgewogICAgICAgICAgICAgICAgcHJvdmlkZXJzLnB1c2goewogICAgICAgICAgICAgICAgICAgIHByb3ZpZGU6IERpcmVjdGlvbmFsaXR5LAogICAgICAgICAgICAgICAgICAgIHVzZVZhbHVlOiB7IHZhbHVlOiBjb25maWcuZGlyZWN0aW9uLCBjaGFuZ2U6IG9mKCkgfQogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIEluamVjdG9yLmNyZWF0ZSh7IHBhcmVudDogdXNlckluamVjdG9yIHx8IHRoaXMuX2luamVjdG9yLCBwcm92aWRlcnMgfSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJlbW92ZXMgYSBkaWFsb2cgZnJvbSB0aGUgYXJyYXkgb2Ygb3BlbiBkaWFsb2dzLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBkaWFsb2dSZWYgRGlhbG9nIHRvIGJlIHJlbW92ZWQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfcmVtb3ZlT3BlbkRpYWxvZyhkaWFsb2dSZWYpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBpbmRleCA9IHRoaXMub3BlbkRpYWxvZ3MuaW5kZXhPZihkaWFsb2dSZWYpOwogICAgICAgICAgICBpZiAoaW5kZXggPiAtMSkgewogICAgICAgICAgICAgICAgdGhpcy5vcGVuRGlhbG9ncy5zcGxpY2UoaW5kZXgsIDEpOwogICAgICAgICAgICAgICAgLy8gSWYgYWxsIHRoZSBkaWFsb2dzIHdlcmUgY2xvc2VkLCByZW1vdmUvcmVzdG9yZSB0aGUgYGFyaWEtaGlkZGVuYAogICAgICAgICAgICAgICAgLy8gdG8gYSB0aGUgc2libGluZ3MgYW5kIGVtaXQgdG8gdGhlIGBhZnRlckFsbENsb3NlZGAgc3RyZWFtLgogICAgICAgICAgICAgICAgaWYgKCF0aGlzLm9wZW5EaWFsb2dzLmxlbmd0aCkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX2FyaWFIaWRkZW5FbGVtZW50cy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHByZXZpb3VzVmFsdWUKICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgIChwcmV2aW91c1ZhbHVlLCBlbGVtZW50KSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwcmV2aW91c1ZhbHVlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGVtZW50LnNldEF0dHJpYnV0ZSgnYXJpYS1oaWRkZW4nLCBwcmV2aW91c1ZhbHVlKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsZW1lbnQucmVtb3ZlQXR0cmlidXRlKCdhcmlhLWhpZGRlbicpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX2FyaWFIaWRkZW5FbGVtZW50cy5jbGVhcigpOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX2FmdGVyQWxsQ2xvc2VkLm5leHQoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBIaWRlcyBhbGwgb2YgdGhlIGNvbnRlbnQgdGhhdCBpc24ndCBhbiBvdmVybGF5IGZyb20gYXNzaXN0aXZlIHRlY2hub2xvZ3kuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9oaWRlTm9uRGlhbG9nQ29udGVudEZyb21Bc3Npc3RpdmVUZWNobm9sb2d5KCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG92ZXJsYXlDb250YWluZXIgPSB0aGlzLl9vdmVybGF5Q29udGFpbmVyLmdldENvbnRhaW5lckVsZW1lbnQoKTsKICAgICAgICAgICAgLy8gRW5zdXJlIHRoYXQgdGhlIG92ZXJsYXkgY29udGFpbmVyIGlzIGF0dGFjaGVkIHRvIHRoZSBET00uCiAgICAgICAgICAgIGlmIChvdmVybGF5Q29udGFpbmVyLnBhcmVudEVsZW1lbnQpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHNpYmxpbmdzID0gb3ZlcmxheUNvbnRhaW5lci5wYXJlbnRFbGVtZW50LmNoaWxkcmVuOwogICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IHNpYmxpbmdzLmxlbmd0aCAtIDE7IGkgPiAtMTsgaS0tKSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGxldCBzaWJsaW5nID0gc2libGluZ3NbaV07CiAgICAgICAgICAgICAgICAgICAgaWYgKHNpYmxpbmcgIT09IG92ZXJsYXlDb250YWluZXIgJiYKICAgICAgICAgICAgICAgICAgICAgICAgc2libGluZy5ub2RlTmFtZSAhPT0gJ1NDUklQVCcgJiYKICAgICAgICAgICAgICAgICAgICAgICAgc2libGluZy5ub2RlTmFtZSAhPT0gJ1NUWUxFJyAmJgogICAgICAgICAgICAgICAgICAgICAgICAhc2libGluZy5oYXNBdHRyaWJ1dGUoJ2FyaWEtbGl2ZScpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2FyaWFIaWRkZW5FbGVtZW50cy5zZXQoc2libGluZywgc2libGluZy5nZXRBdHRyaWJ1dGUoJ2FyaWEtaGlkZGVuJykpOwogICAgICAgICAgICAgICAgICAgICAgICBzaWJsaW5nLnNldEF0dHJpYnV0ZSgnYXJpYS1oaWRkZW4nLCAndHJ1ZScpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDbG9zZXMgYWxsIG9mIHRoZSBkaWFsb2dzIGluIGFuIGFycmF5LgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBkaWFsb2dzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfY2xvc2VEaWFsb2dzKGRpYWxvZ3MpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgaSA9IGRpYWxvZ3MubGVuZ3RoOwogICAgICAgICAgICB3aGlsZSAoaS0tKSB7CiAgICAgICAgICAgICAgICAvLyBUaGUgYF9vcGVuRGlhbG9nc2AgcHJvcGVydHkgaXNuJ3QgdXBkYXRlZCBhZnRlciBjbG9zZSB1bnRpbCB0aGUgcnhqcyBzdWJzY3J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6IFsnbWF0RGlhbG9nQ2xvc2UnLF0gfV0KICAgIH07CiAgICAvKioKICAgICAqIFRpdGxlIG9mIGEgZGlhbG9nIGVsZW1lbnQuIFN0YXlzIGZpeGVkIHRvIHRoZSB0b3Agb2YgdGhlIGRpYWxvZyB3aGVuIHNjcm9sbGluZy4KICAgICAqLwogICAgY2xhc3MgTWF0RGlhbG9nVGl0bGUgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gX2RpYWxvZ1JlZgogICAgICAgICAqIEBwYXJhbSB7P30gX2VsZW1lbnRSZWYKICAgICAgICAgKiBAcGFyYW0gez99IF9kaWFsb2cKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihfZGlhbG9nUmVmLCBfZWxlbWVudFJlZiwgX2RpYWxvZykgewogICAgICAgICAgICB0aGlzLl9kaWFsb2dSZWYgPSBfZGlhbG9nUmVmOwogICAgICAgICAgICB0aGlzLl9lbGVtZW50UmVmID0gX2VsZW1lbnRSZWY7CiAgICAgICAgICAgIHRoaXMuX2RpYWxvZyA9IF9kaWFsb2c7CiAgICAgICAgICAgIHRoaXMuaWQgPSBgbWF0LWRpYWxvZy10aXRsZS0ke2RpYWxvZ0VsZW1lbnRVaWQrK31gOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25Jbml0KCkgewogICAgICAgICAgICBpZiAoIXRoaXMuX2RpYWxvZ1JlZikgewogICAgICAgICAgICAgICAgdGhpcy5fZGlhbG9nUmVmID0gKC8qKiBAdHlwZSB7P30gKi8gKGdldENsb3Nlc3REaWFsb2codGhpcy5fZWxlbWVudFJlZiwgdGhpcy5fZGlhbG9nLm9wZW5EaWFsb2dzKSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0aGlzLl9kaWFsb2dSZWYpIHsKICAgICAgICAgICAgICAgIFByb21pc2UucmVzb2x2ZSgpLnRoZW4oKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBjb250YWluZXIgPSB0aGlzLl9kaWFsb2dSZWYuX2NvbnRhaW5lckluc3RhbmNlOwogICAgICAgICAgICAgICAgICAgIGlmIChjb250YWluZXIgJiYgIWNvbnRhaW5lci5fYXJpYUxhYmVsbGVkQnkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgY29udGFpbmVyLl9hcmlhTGFiZWxsZWRCeSA9IHRoaXMuaWQ7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQogICAgTWF0RGlhbG9nVGl0bGUuybVmYWMgPSBmdW5jdGlvbiBNYXREaWFsb2dUaXRsZV9GYWN0b3J5KHQpIHsgcmV0dXJuIG5ldyAodCB8fCBNYXREaWFsb2dUaXRsZSkoybXJtWRpcmVjdGl2ZUluamVjdChNYXREaWFsb2dSZWYsIDgpLCDJtcm1ZGlyZWN0aXZlSW5qZWN0KEVsZW1lbnRSZWYpLCDJtcm1ZGlyZWN0aXZlSW5qZWN0KE1hdERpYWxvZykpOyB9OwogICAgTWF0RGlhbG9nVGl0bGUuybVkaXIgPSDJtcm1ZGVmaW5lRGlyZWN0aXZlKHsgdHlwZTogTWF0RGlhbG9nVGl0bGUsIHNlbGVjdG9yczogW1siIiwgIm1hdC1kaWFsb2ctdGl0bGUiLCAiIl0sIFsiIiwgIm1hdERpYWxvZ1RpdGxlIiwgIiJdXSwgaG9zdEF0dHJzOiBbMSwgIm1hdC1kaWFsb2ctdGl0bGUiXSwgaG9zdFZhcnM6IDEsIGhvc3RCaW5kaW5nczogZnVuY3Rpb24gTWF0RGlhbG9nVGl0bGVfSG9zdEJpbmRpbmdzKHJmLCBjdHgpIHsgaWYgKH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h0KSB7IHJldHVybiBuZXcgKHQgfHwgTWF0RGlhbG9nTW9kdWxlKSgpOyB9LCBwcm92aWRlcnM6IFsKICAgICAgICAgICAgTWF0RGlhbG9nLAogICAgICAgICAgICBNQVRfRElBTE9HX1NDUk9MTF9TVFJBVEVHWV9QUk9WSURFUiwKICAgICAgICBdLCBpbXBvcnRzOiBbWwogICAgICAgICAgICAgICAgT3ZlcmxheU1vZHVsZSwKICAgICAgICAgICAgICAgIFBvcnRhbE1vZHVsZSwKICAgICAgICAgICAgICAgIE1hdENvbW1vbk1vZHVsZSwKICAgICAgICAgICAgXSwKICAgICAgICAgICAgTWF0Q29tbW9uTW9kdWxlXSB9KTsKICAgIChmdW5jdGlvbiAoKSB7ICh0eXBlb2YgbmdKaXRNb2RlID09PSAidW5kZWZpbmVkIiB8fCBuZ0ppdE1vZGUpICYmIMm1ybVzZXROZ01vZHVsZVNjb3BlKE1hdERpYWxvZ01vZHVsZSwgeyBkZWNsYXJhdGlvbnM6IGZ1bmN0aW9uICgpIHsgcmV0dXJuIFtNYXREaWFsb2dDb250YWluZXIsCiAgICAgICAgICAgIE1hdERpYWxvZ0Nsb3NlLAogICAgICAgICAgICBNYXREaWFsb2dUaXRsZSwKICAgICAgICAgICAgTWF0RGlhbG9nQWN0aW9ucywKICAgICAgICAgICAgTWF0RGlhbG9nQ29udGVudF07IH0sIGltcG9ydHM6IGZ1bmN0aW9uICgpIHsgcmV0dXJuIFtPdmVybGF5TW9kdWxlLAogICAgICAgICAgICBQb3J0YWxNb2R1bGUsCiAgICAgICAgICAgIE1hdENvbW1vbk1vZHVsZV07IH0sIGV4cG9ydHM6IGZ1bmN0aW9uICgpIHsgcmV0dXJuIFtNYXREaWFsb2dDb250YWluZXIsCiAgICAgICAgICAgIE1hdERpYWxvZ0Nsb3NlLAogICAgICAgICAgICBNYXREaWFsb2dUaXRsZSwKICAgICAgICAgICAgTWF0RGlhbG9nQ29udGVudCwKICAgICAgICAgICAgTWF0RGlhbG9nQWN0a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HRvbk1peGluQmFzZSA9IG1peGluQ29sb3IobWl4aW5EaXNhYmxlZChtaXhpbkRpc2FibGVSaXBwbGUoTWF0QnV0dG9uQmFzZSkpKTsKICAgIC8qKgogICAgICogTWF0ZXJpYWwgZGVzaWduIGJ1dHRvbi4KICAgICAqLwogICAgY2xhc3MgTWF0QnV0dG9uIGV4dGVuZHMgX01hdEJ1dHRvbk1peGluQmFzZSB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50UmVmCiAgICAgICAgICogQHBhcmFtIHs/fSBfZm9jdXNNb25pdG9yCiAgICAgICAgICogQHBhcmFtIHs/fSBfYW5pbWF0aW9uTW9kZQogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKGVsZW1lbnRSZWYsIF9mb2N1c01vbml0b3IsIF9hbmltYXRpb25Nb2RlKSB7CiAgICAgICAgICAgIHN1cGVyKGVsZW1lbnRSZWYpOwogICAgICAgICAgICB0aGlzLl9mb2N1c01vbml0b3IgPSBfZm9jdXNNb25pdG9yOwogICAgICAgICAgICB0aGlzLl9hbmltYXRpb25Nb2RlID0gX2FuaW1hdGlvbk1vZGU7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBXaGV0aGVyIHRoZSBidXR0b24gaXMgcm91bmQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmlzUm91bmRCdXR0b24gPSB0aGlzLl9oYXNIb3N0QXR0cmlidXRlcygnbWF0LWZhYicsICdtYXQtbWluaS1mYWInKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFdoZXRoZXIgdGhlIGJ1dHRvbiBpcyBpY29uIGJ1dHRvbi4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuaXNJY29uQnV0dG9uID0gdGhpcy5faGFzSG9zdEF0dHJpYnV0ZXMoJ21hdC1pY29uLWJ1dHRvbicpOwogICAgICAgICAgICAvLyBGb3IgZWFjaCBvZiB0aGUgdmFyaW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fQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25EZXN0cm95KCkgewogICAgICAgICAgICB0aGlzLl9mb2N1c01vbml0b3Iuc3RvcE1vbml0b3JpbmcodGhpcy5fZWxlbWVudFJlZik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEZvY3VzZXMgdGhlIGJ1dHRvbi4KICAgICAgICAgKiBAcGFyYW0gez89fSBvcmlnaW4KICAgICAgICAgKiBAcGFyYW0gez89fSBvcHRpb25zCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmb2N1cyhvcmlnaW4gPSAncHJvZ3JhbScsIG9wdGlvbnMpIHsKICAgICAgICAgICAgdGhpcy5fZm9jdXNNb25pdG9yLmZvY3VzVmlhKHRoaXMuX2dldEhvc3RFbGVtZW50KCksIG9yaWdpbiwgb3B0aW9ucyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2dldEhvc3RFbGVtZW50KCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fZWxlbWVudFJlZi5uYXRpdmVFbGVtZW50OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9pc1JpcHBsZURpc2FibGVkKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5kaXNhYmxlUmlwcGxlIHx8IHRoaXMuZGlzYWJsZWQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEdldHMgd2hldGhlciB0aGUgYnV0dG9uIGhhcyBvbmUgb2YgdGhlIGdpdmVuIGF0dHJpYnV0ZXMuCiAgICAgICAgICogQHBhcmFtIHsuLi4/fSBhdHRyaWJ1dGVzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfaGFzSG9zdEF0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T4gWwogICAgICAgIHsgdHlwZTogRWxlbWVudFJlZiB9LAogICAgICAgIHsgdHlwZTogRm9jdXNNb25pdG9yIH0sCiAgICAgICAgeyB0eXBlOiBTdHJpbmcsIGRlY29yYXRvcnM6IFt7IHR5cGU6IE9wdGlvbmFsIH0sIHsgdHlwZTogSW5qZWN0LCBhcmdzOiBbQU5JTUFUSU9OX01PRFVMRV9UWVBFLF0gfV0gfQogICAgXTsKICAgIE1hdEJ1dHRvbi5wcm9wRGVjb3JhdG9ycyA9IHsKICAgICAgICByaXBwbGU6IFt7IHR5cGU6IFZpZXdDaGlsZCwgYXJnczogW01hdFJpcHBsZSxdIH1dCiAgICB9OwogICAgLyoqCiAgICAgKiBNYXRlcmlhbCBkZXNpZ24gYW5jaG9yIGJ1dHRvbi4KICAgICAqLwogICAgY2xhc3MgTWF0QW5jaG9yIGV4dGVuZHMgTWF0QnV0dG9uIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGZvY3VzTW9uaXRvcgogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudFJlZgogICAgICAgICAqIEBwYXJhbSB7P30gYW5pbWF0aW9uTW9kZQogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKGZvY3VzTW9uaXRvciwgZWxlbWVudFJlZiwgYW5pbWF0aW9uTW9kZSkgewogICAgICAgICAgICBzdXBlcihlbGVtZW50UmVmLCBmb2N1c01vbml0b3IsIGFuaW1hdGlvbk1vZGUpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfaGFsdERpc2FibGVkRXZlbnRzKGV2ZW50KSB7CiAgICAgICAgICAgIC8vIEEgZGlzYWJsZWQgYnV0dG9uIHNob3VsZG4ndCBhcHBseSBhbnkgYWN0aW9ucwogICAgICAgICAgICBpZiAodGhpcy5kaXNhYmxlZCkgewogICAgICAgICAgICA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QuCiAgICAgICAgICAgIHN0eWxlcy5vcGFjaXR5ID0gJzAnOwogICAgICAgICAgICBzdHlsZXMucG9zaXRpb24gPSAnYWJzb2x1dGUnOwogICAgICAgICAgICBzdHlsZXMubGVmdCA9IHN0eWxlcy50b3AgPSAnLTk5OWVtJzsKICAgICAgICAgICAgdGV4dGFyZWEuc2V0QXR0cmlidXRlKCdhcmlhLWhpZGRlbicsICd0cnVlJyk7CiAgICAgICAgICAgIHRleHRhcmVhLnZhbHVlID0gdGV4dDsKICAgICAgICAgICAgdGhpcy5fZG9jdW1lbnQuYm9keS5hcHBlbmRDaGlsZCh0ZXh0YXJlYSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEZpbmlzaGVzIGNvcHlpbmcgdGhlIHRleHQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBjb3B5KCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHRleHRhcmVhID0gdGhpcy5fdGV4dGFyZWE7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHN1Y2Nlc3NmdWwgPSBmYWxzZTsKICAgICAgICAgICAgdHJ5IHsgLy8gT2xkZXIgYnJvd3NlcnMgY291bGQgdGhyb3cgaWYgY29weSBpcyBub3Qgc3VwcG9ydGVkLgogICAgICAgICAgICAgICAgaWYgKHRleHRhcmVhKSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGN1cnJlbnRGb2N1cyA9ICgvKiogQHR5cGUgez99ICovICh0aGlzLl9kb2N1bWVudC5hY3RpdmVFbGVtZW50KSk7CiAgICAgICAgICAgICAgICAgICAgdGV4dGFyZWEuc2VsZWN0KCk7CiAgICAgICAgICAgICAgICAgICAgdGV4dGFyZWEuc2V0U2VsZWN0aW9uUmFuZ2UoMCwgdGV4dGFyZWEudmFsdWUubGVuZ3RoKTsKICAgICAgICAgICAgICAgICAgICBzdWNjZXNzZnVsID0gdGhpcy5fZG9jdW1lbnQuZXhlY0NvbW1hbmQoJ2NvcHknKTsKICAgICAgICAgICAgICAgICAgICBpZiAoY3VycmVudEZvY3VzKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRGb2N1cy5mb2N1cygpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBjYXRjaCAoX2EpIHsKICAgICAgICAgICAgICAgIC8vIERpc2NhcmQgZXJyb3IuCiAgICAgICAgICAgICAgICAvLyBJbml0aWFsIHNldHRpbmcgb2Yge0Bjb2RlIHN1Y2Nlc3NmdWx9IHdpbGwgcmVwcmVzZW50IGZhaWx1cmUgaGVyZS4KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gc3VjY2Vzc2Z1bDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ2xlYW5zIHVwIERPTSBjaGFuZ2VzIHVzZWQgdG8gcGVyZm9ybSB0aGUgY29weSBvcGVyYXRpb24uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkZXN0cm95KCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHRleHRhcmVhID0gdGhpcy5fdGV4dGFyZWE7CiAgICAgICAgICAgIGlmICh0ZXh0YXJlYSkgewogICAgICAgICAgICAgICAgaWYgKHRleHRhcmVhLnBhcmVudE5vZGUpIHsKICAgICAgICAgICAgICAgICAgICB0ZXh0YXJlYS5wYXJlbnROb2RlLnJlbW92ZUNoaWxkKHRleHRhcmVhKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuX3RleHRhcmVhID0gdW5kZWZpbmVkOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVv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ZGVwcmVjYXRlZENvcGllZCA9IHRoaXMuY29waWVkOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQ29waWVzIHRoYXQgYXJlIGN1cnJlbnRseSBiZWluZyBhdHRlbXB0ZWQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9wZW5kaW5nID0gbmV3IFNldCgpOwogICAgICAgICAgICBpZiAoY29uZmlnICYmIGNvbmZpZy5hdHRlbXB0cyAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICB0aGlzLmF0dGVtcHRzID0gY29uZmlnLmF0dGVtcHRzOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENvcGllcyB0aGUgY3VycmVudCB0ZXh0IHRvIHRoZSBjbGlwYm9hcmQuCiAgICAgICAgICogQHBhcmFtIHs/PX0gYXR0ZW1wdHMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGNvcHkoYXR0ZW1wdHMgPSB0aGlzLmF0dGVtcHRzKSB7CiAgICAgICAgICAgIGlmIChhdHRlbXB0cyA+IDEpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCByZW1haW5pbmdBdHRlbXB0cyA9IGF0dGVtcHRzOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgcGVuZGluZyA9IHRoaXMuX2NsaXBib2FyZC5iZWdpbkNvcHkodGhpcy50ZXh0KTsKICAgICAgICAgICAgICAgIHRoaXMuX3BlbmRpbmcuYWRkKHBlbmRpbmcpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgYXR0ZW1wdCA9ICgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3VjY2Vzc2Z1bCA9IHBlbmRpbmcuY29weSgpOwogICAgICAgICAgICAgICAgICAgIGlmICghc3VjY2Vzc2Z1bCAmJiAtLXJlbWFpbmluZ0F0dGVtcHRzICYmICF0aGlzLl9kZXN0cm95ZWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gQGJyZWFraW5nLWNoYW5nZSAxMC4wLjAgUmVtb3ZlIG51bGwgY2hlY2sgZm9yIGBfbmdab25lYC4KICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX25nWm9uZSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fY3VycmVudFRpbWVvdXQgPSB0aGlzLl9uZ1pvbmUucnVuT3V0c2lkZUFuZ3VsYXIoKC8qKgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgKCkgPT4gc2V0VGltZW91dChhdHRlbXB0LCAxKSkpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gV2UgdXNlIDEgZm9yIHRoZSB0aW1lb3V0IHNpbmNlIGl0J3MgbW9yZSBwcmVkaWN0YWJsZSB3aGVuIGZsdXNoaW5nIGluIHVuaXQgdGVzdHMuCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9jdXJyZW50VGltZW91dCA9IHNldFRpbWVvdXQoYXR0ZW1wdCwgMSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2N1cnJlbnRUaW1lb3V0ID0gbnVsbDsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fcGVuZGluZy5kZWxldGUocGVuZGluZyk7CiAgICAgICAgICAgICAgICAgICAgICAgIHBlbmRpbmcuZGVzdHJveSgpOwogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmNvcGllZC5lbWl0KHN1Y2Nlc3NmdWwpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgYXR0ZW1wdCgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5jb3BpZWQuZW1pdCh0aGlzLl9jbGlwYm9hcmQuY29weSh0aGlzLnRleHQpKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25EZXN0cm95KCkgewogICAgICAgICAgICBpZiAodGhpcy5fY3VycmVudFRpbWVvdXQpIHsKICAgICAgICAgICAgICAgIGNsZWFyVGltZW91dCh0aGlzLl9jdXJyZW50VGltZW91dCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fcGVuZGluZy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjb3B5CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBjb3B5ID0+IGNvcHkuZGVzdHJveSgpKSk7CiAgICAgICAgICAgIHRoaXMuX3BlbmRpbmcuY2xlYXIoKTsKICAgICAgICAgICAgdGhpcy5fZGVzdHJveWVkID0gdHJ1ZTsKICAgICAgICB9CiAgICB9CiAgICBDZGtDb3B5VG9DbGlwYm9hcmQuybVmYWMgPSBmdW5jdGlvbiBDZGtDb3B5VG9DbGlwYm9hcmRfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgQ2RrQ29weVRvQ2xpcGJvYXJkKSjJtcm1ZGlyZWN0aXZlSW5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AgICAgICAgICAgICAgdGhpcy5oZWFkZXJzID0gbmV3IE1hcCgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKHR5cGVvZiBoZWFkZXJzID09PSAnc3RyaW5nJykgewogICAgICAgICAgICAgICAgdGhpcy5sYXp5SW5pdCA9ICgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgICAgICB0aGlzLmhlYWRlcnMgPSBuZXcgTWFwKCk7CiAgICAgICAgICAgICAgICAgICAgaGVhZGVycy5zcGxpdCgnXG4nKS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGxpbmUKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgIGxpbmUgPT4gewogICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGluZGV4ID0gbGluZS5pbmRleE9mKCc6Jyk7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbmRleCA+IDApIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG5hbWUgPSBsaW5lLnNsaWNlKDAsIGluZGV4KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGtleSA9IG5hbWUudG9Mb3dlckNhc2UoKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHZhbHVlID0gbGluZS5zbGljZShpbmRleCArIDEpLnRyaW0oKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubWF5YmVTZXROb3JtYWxpemVkTmFtZShuYW1lLCBrZXkpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuaGVhZGVycy5oYXMoa2V5KSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovICh0aGlzLmhlYWRlcnMuZ2V0KGtleSkpKS5wdXNoKHZhbHVlKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuaGVhZGVycy5zZXQoa2V5LCBbdmFsdWVdKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5sYXp5SW5pdCA9ICgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgICAgICB0aGlzLmhlYWRlcnMgPSBuZXcgTWFwKCk7CiAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmtleXMoaGVhZGVycykuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBuYW1lCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICBuYW1lID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmFsdWVzID0gaGVhZGVyc1tuYW1lXTsKICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBrZXkgPSBuYW1lLnRvTG93ZXJDYXNlKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdmFsdWVzID09PSAnc3RyaW5nJykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWVzID0gW3ZhbHVlc107CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHZhbHVlcy5sZW5ndGggPiAwKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmhlYWRlcnMuc2V0KGtleSwgdmFsdWVzKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubWF5YmVTZXROb3JtYWxpemVkTmFtZShuYW1lLCBrZXkpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ2hlY2tzIGZvciBleGlzdGVuY2Ugb2YgYSBnaXZlbiBoZWFkZXIuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez99IG5hbWUgVGhlIGhlYWRlciBuYW1lIHRvIGNoZWNrIGZvciBleGlzdGVuY2UuCiAgICAgICAgICoKICAgICAgICAgKiBAcmV0dXJuIHs/fSBUcnVlIGlmIHRoZSBoZWFkZXIgZXhpc3RzLCBmYWxzZSBvdGhlcndpc2UuCiAgICAgICAgICovCiAgICAgICAgaGFzKG5hbWUpIHsKICAgICAgICAgICAgdGhpcy5pbml0KCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmhlYWRlcnMuaGFzKG5hbWUudG9Mb3dlckNhc2UoKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJldHJpZXZlcyB0aGUgZmlyc3QgdmFsdWUgb2YgYSBnaXZlbiBoZWFkZXIuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez99IG5hbWUgVGhlIGhlYWRlciBuYW1lLgogICAgICAgICAqCiAgICAgICAgICogQHJldHVybiB7P30gVGhlIHZhbHVlIHN0cmluZyBpZiB0aGUgaGVhZGVyIGV4aXN0cywgbnVsbCBvdGhlcndpc2UKICAgICAgICAgKi8KICAgICAgICBnZXQobmFtZSkgewogICAgICAgICAgICB0aGlzLmluaXQoKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB2YWx1ZXMgPSB0aGlzLmhlYWRlcnMuZ2V0KG5hbWUudG9Mb3dlckNhc2UoKSk7CiAgICAgICAgICAgIHJldHVybiB2YWx1ZXMgJiYgdmFsdWVzLmxlbmd0aCA+IDAgPyB2YWx1ZXNbMF0gOiBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZXRyaWV2ZXMgdGhlIG5hbWVzIG9mIHRoZSBoZWFkZXJzLgogICAgICAgICAqCiAgICAgICAgICogQHJldHVybiB7P30gQSBsaXN0IG9mIGhlYWRlciBuYW1lcy4KICAgICAgICAgKi8KICAgICAgICBrZXlzKCkgewogICAgICAgICAgICB0aGlzLmluaXQoKTsKICAgICAgICAgICAgcmV0dXJuIEFycmF5LmZyb20odGhpcy5ub3JtYWxpemVkTmFtZXMudmFsdWVzKCkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZXRyaWV2ZXMgYSBsaXN0IG9mIHZhbHVlcyBmb3IgYSBnaXZlbiBoZWFkZXIuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez99IG5hbWUgVGhlIGhlYWRlciBuYW1lIGZyb20gd2hpY2ggdG8gcmV0cmlldmUgdmFsdWVzLgogICAgICAgICAqCiAgICAgICAgICogQHJldHVybiB7P30gQSBzdHJpbmcgb2YgdmFsdWVzIGlmIHRoZSBoZWFkZXIgZXhpc3RzLCBudWxsIG90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HVlCiAgICAgICAgICogaW4gdGhlIHJldHVybmVkIG9iamVjdC4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7P30gbmFtZSBUaGUgaGVhZGVyIG5hbWUuCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZSBUaGUgdmFsdWUgb3IgdmFsdWVzIHRvIHNldCBvciBvdmVyaWRlIGZvciB0aGUgZ2l2ZW4gaGVhZGVyLgogICAgICAgICAqCiAgICAgICAgICogQHJldHVybiB7P30gQSBjbG9uZSBvZiB0aGUgSFRUUCBoZWFkZXJzIG9iamVjdCB3aXRoIHRoZSBuZXdseSBzZXQgaGVhZGVyIHZhbHVlLgogICAgICAgICAqLwogICAgICAgIHNldChuYW1lLCB2YWx1ZSkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5jbG9uZSh7IG5hbWUsIHZhbHVlLCBvcDogJ3MnIH0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBEZWxldGVzIHZhbHVlcyBmb3IgYSBnaXZlbiBoZWFkZXIgaW4gYSBjbG9uZSBvZiB0aGUgb3JpZ2luYWwgaW5zdGFuY2UuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez99IG5hbWUgVGhlIGhlYWRlciBuYW1lLgogICAgICAgICAqIEBwYXJhbSB7Pz19IHZhbHVlIFRoZSB2YWx1ZSBvciB2YWx1ZXMgdG8gZGVsZXRlIGZvciB0aGUgZ2l2ZW4gaGVhZGVyLgogICAgICAgICAqCiAgICAgICAgICogQHJldHVybiB7P30gQSBjbG9uZSBvZiB0aGUgSFRUUCBoZWFkZXJzIG9iamVjdCB3aXRoIHRoZSBnaXZlbiB2YWx1ZSBkZWxldGVkLgogICAgICAgICAqLwogICAgICAgIGRlbGV0ZShuYW1lLCB2YWx1ZSkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5jbG9uZSh7IG5hbWUsIHZhbHVlLCBvcDogJ2QnIH0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gbmFtZQogICAgICAgICAqIEBwYXJhbSB7P30gbGNOYW1lCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBtYXliZVNldE5vcm1hbGl6ZWROYW1lKG5hbWUsIGxjTmFtZSkgewogICAgICAgICAgICBpZiAoIXRoaXMubm9ybWFsaXplZE5hbWVzLmhhcyhsY05hbWUpKSB7CiAgICAgICAgICAgICAgICB0aGlzLm5vcm1hbGl6ZWROYW1lcy5zZXQobGNOYW1lLCBuYW1lKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgaW5pdCgpIHsKICAgICAgICAgICAgaWYgKCEhdGhpcy5sYXp5SW5pdCkgewogICAgICAgICAgICAgICAgaWYgKHRoaXMubGF6eUluaXQgaW5zdGFuY2VvZiBIdHRwSGVhZGVycykgewogICAgICAgICAgICAgICAgICAgIHRoaXMuY29weUZyb20odGhpcy5sYXp5SW5pdCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLmxhenlJbml0KCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLmxhenlJbml0ID0gbnVsbDsKICAgICAgICAgICAgICAgIGlmICghIXRoaXMubGF6eVVwZGF0ZSkgewogICAgICAgICAgICAgICAgICAgIHRoaXMubGF6eVVwZGF0ZS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHVwZGF0ZQogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgdXBkYXRlID0+IHRoaXMuYXBwbHlVcGRhdGUodXBkYXRlKSkpOwogICAgICAgICAgICAgICAgICAgIHRoaXMubGF6eVVwZGF0ZSA9IG51bGw7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IG90aGVyCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBjb3B5RnJvbShvdGhlcikgewogICAgICAgICAgICBvdGhlci5pbml0KCk7CiAgICAgICAgICAgIEFycmF5LmZyb20ob3RoZXIuaGVhZGVycy5rZXlzKCkpLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGtleQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAga2V5ID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuaGVhZGVycy5zZXQoa2V5LCAoLyoqIEB0eXBlIHs/fSAqLyAob3RoZXIuaGVhZGVycy5nZXQoa2V5KSkpKTsKICAgICAgICAgICAgICAgIHRoaXMubm9ybWFsaXplZE5hbWVzLnNldChrZXksICgvKiogQHR5cGUgez99ICovIChvdGhlci5ub3JtYWxpemVkTmFtZXMuZ2V0KGtleSkpKSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHVwZGF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgY2xvbmUodXBkYXRlKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgY2xvbmUgPSBuZXcgSHR0cEhlYWRlcnMoKTsKICAgICAgICAgICAgY2xvbmUubGF6eUluaXQgPQogICAgICAgICAgICAgICAgKCEhdGhpcy5sYXp5SW5pdCAmJiB0aGlzLmxhenlJbml0IGluc3RhbmNlb2YgSHR0cEhlYWRlcnMpID8gdGhpcy5sYXp5SW5pdCA6IHRoaXM7CiAgICAgICAgICAgIGNsb25lLmxhenlVcGRhdGUgPSAodGhpcy5sYXp5VXBkYXRlIHx8IFtdKS5jb25jYXQoW3VwZGF0ZV0pOwogICAgICAgICAgICByZXR1cm4gY2xvbmU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSB1cGRhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGFwcGx5VXBkYXRlKHVwZGF0ZSkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGtleSA9IHVwZGF0ZS5uYW1lLnRvTG93ZXJDYXNlKCk7CiAgICAgICAgICAgIHN3aXRjaCAodXBkYXRlLm9wKSB7CiAgICAgICAgICAgICAgICBjYXNlICdhJzoKICAgICAgICAgICAgICAgIGNhc2UgJ3MnOgogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBsZXQgdmFsdWUgPSAoLyoqIEB0eXBlIHs/fSAqLyAodXBkYXRlLnZhbHVlKSk7CiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiB2YWx1ZSA9PT0gJ3N0cmluZycpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSBbdmFsdWVdOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBpZiAodmFsdWUubGVuZ3RoID09PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgdGhpcy5tYXliZVNldE5vcm1hbGl6ZWROYW1lKHVwZGF0ZS5uYW1lLCBrZXkpOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBiYXNlID0gKHVwZGF0ZS5vcCA9PT0gJ2EnID8gdGhpcy5oZWFkZXJzLmdldChrZXkpIDogdW5kZWZpbmVkKSB8fCBbXTsKICAgICAgICAgICAgICAgICAgICBiYXNlLnB1c2goLi4udmFsdWUpOwogICAgICAgICAgICAgICAgICAgIHRoaXMuaGVhZGVycy5zZXQoa2V5LCBiYXNlKTsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIGNhc2UgJ2QnOgogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCB0b0RlbGV0ZSA9ICgvKiogQHR5cGUgez99ICovICh1cGRhdGUudmFsdWUpKTsKICAgICAgICAgICAgICAgICAgICBpZiAoIXRvRGVsZXRlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuaGVhZGVycy5kZWxldGUoa2V5KTsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5ub3JtYWxpemVkTmFtZXMuZGVsZXRlKGtleSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBleGlzdGluZyA9IHRoaXMuaGVhZGVycy5nZXQoa2V5KTsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFleGlzdGluZykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGV4aXN0aW5nID0gZXhpc3RpbmcuZmlsdGVyKCgvKioKICAgICAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUgPT4gdG9EZWxldGUuaW5kZXhPZih2YWx1ZSkgPT09IC0xKSk7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChleGlzdGluZy5sZW5ndGggPT09IDApIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuaGVhZGVycy5kZWxldGUoa2V5KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubm9ybWFsaXplZE5hbWVzLmRlbGV0ZShrZXkpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5oZWFkZXJzLnNldChrZXksIGV4aXN0aW5nKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBcQGludGVybmFsCiAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZm9yRWFjaChmbikgewogICAgICAgICAgICB0aGlzLmluaXQoKTsKICAgICAgICAgICAgQXJyYXkuZnJvbSh0aGlzLm5vcm1hbGl6ZWROYW1lcy5rZXlzKCkpCiAgICAgICAgICAgICAgICAuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30ga2V5CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBrZXkgPT4gZm4oKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMubm9ybWFsaXplZE5hbWVzLmdldChrZXkpKSksICgvKiogQHR5cGUgez99ICovICh0aGlzLmhlYWRlcnMuZ2V0KGtleSkpKSkpKTsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIFByb3ZpZGVzIGVuY29kaW5nIGFuZCBkZWNvZGluZyBvZiBVUkwgcGFyYW1ldGVyIGFuZCBxdWVyeS1zdHJpbmcgdmFsdWVzLgogICAgICoKICAgICAqIFNlcmlhbGl6ZXMgYW5kIHBhcnNlcyBVUkwgcGFyYW1ldGVyIGtleXMgYW5kIHZhbHVlcyB0byBlbmNvZGUgYW5kIGRlY29kZSB0aGVtLgogICAgICogSWYgeW91IHBhc3MgVVJMIHF1ZXJ5IHBhcmFtZXRlcnMgd2l0aG91dCBlbmNvZGluZywKICAgICAqIHRoZSBxdWVyeSBwYXJhbWV0ZXJzIGNhbiBiZSBtaXNpbnRlcnByZXRlZCBhdCB0aGUgcmVjZWl2aW5nIGVuZC4KICAgICAqCiAgICAgKgogICAgICogXEBwdWJsaWNBcGkKICAgICAqLwogICAgY2xhc3MgSHR0cFVybEVuY29kaW5nQ29kZWMgewogICAgICAgIC8qKgogICAgICAgICAqIEVuY29kZXMgYSBrZXkgbmFtZSBmb3IgYSBVUkwgcGFyYW1ldGVyIG9yIHF1ZXJ5LXN0cmluZy4KICAgICAgICAgKiBAcGFyYW0gez99IGtleSBUaGUga2V5IG5hbWUuCiAgICAgICAgICogQHJldHVybiB7P30gVGhlIGVuY29kZWQga2V5IG5hbWUuCiAgICAgICAgICovCiAgICAgICAgZW5jb2RlS2V5KGtleSkgewogICAgICAgICAgICByZXR1cm4gc3RhbmRhcmRFbmNvZGluZyhrZXkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBFbmNvZGVzIHRoZSB2YWx1ZSBvZiBhIFVSTCBwYXJhbWV0ZXIgb3IgcXVlcnktc3RyaW5nLgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUgVGhlIHZhbHVlLgogICAgICAgICAqIEByZXR1cm4gez99IFRoZSBlbmNvZGVkIHZhbHVlLgogICAgICAgICAqLwogICAgICAgIGVuY29kZVZhbHVlKHZhbHVlKSB7CiAgICAgICAgICAgIHJldHVybiBzdGFuZGFyZEVuY29kaW5nKHZhbHVlKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogRGVjb2RlcyBhbiBlbmNvZGVkIFVSTCBwYXJhbWV0ZXIgb3IgcXVlcnktc3RyaW5nIGtleS4KICAgICAgICAgKiBAcGFyYW0gez99IGtleSBUaGUgZW5jb2RlZCBrZXkgbmFtZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fSBUaGUgZGVjb2RlZCBrZXkgbmFtZS4KICAgICAgICAgKi8KICAgICAgICBkZWNvZGVLZXkoa2V5KSB7CiAgICAgICAgICAgIHJldHVybiBkZWNvZGVVUklDb21wb25lbnQoa2V5KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogRGVjb2RlcyBhbiBlbmNvZGVkIFVSTCBwYXJhbWV0ZXIgb3IgcXVlcnktc3RyaW5nIHZhbHVlLgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUgVGhlIGVuY29kZWQgdmFsdWUuCiAgICAgICAgICogQHJldHVybiB7P30gVGhlIGRlY29kZWQgdmFsdWUuCiAgICAgICAgICovCiAgICAgICAgZGVjb2RlVmFsdWUodmFsdWUpIHsKICAgICAgICAgICAgcmV0dXJuIGRlY29kZVVSSUNvbXBvbmVudCh2YWx1ZSk7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHJhd1BhcmFtcwogICAgICogQHBhcmFtIHs/fSBjb2RlYwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gcGFyYW1QYXJzZXIocmF3UGFyYW1zLCBjb2RlYykgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBtYXAgPSBuZXcgTWFwKCk7CiAgICAgICAgaWYgKHJhd1BhcmFtcy5sZW5ndGggPiAwKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcGFyYW1zID0gcmF3UGFyYW1zLnNwbGl0KCcmJyk7CiAgICAgICAgICAgIHBhcmFtcy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwYXJhbQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHBhcmFtKSA9PiB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBlcUlkeCA9IHBhcmFtLmluZGV4T2YoJz0nKTsKICAgICAgICAgICAgICAgIGNvbnN0IFtrZXksIHZhbF0gPSBlcUlkeCA9PSAtMSA/CiAgICAgICAgICAgICAgICAgICAgW2NvZGVjLmRlY29kZUtleShwYXJhbSksICcnXSA6CiAgICAgICAgICAgICAgICAgICAgW2NvZGVjLmRlY29kZUtleShwYXJhbS5zbGljZSgwLCBlcUlkeCkpLCBjb2RlYy5kZWNvZGVWYWx1ZShwYXJhbS5zbGljZShlcUlkeCArIDEpKV07CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBsaXN0ID0gbWFwLmdldChrZXkpIHx8IFtdOwogICAgICAgICAgICAgICAgbGlzdC5wdXNoKHZhbCk7CiAgICAgICAgICAgICAgICBtYXAuc2V0KGtleSwgbGlzdCk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIG1hcDsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSB2CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBzdGFuZGFyZEVuY29kaW5nKHYpIHsKICAgICAgICByZXR1cm4gZW5jb2RlVVJJQ29tcG9uZW50KHYpCiAgICAgICAgICAgIC5yZXBsYWNlKC8lNDAvZ2ksICdAJykKICAgICAgICAgICAgLnJlcGxhY2UoLyUzQS9naSwgJzonKQogICAgICAgICAgICAucmVwbGFjZSgvJTI0L2dpLCAnJCcpCiAgICAgICAgICAgIC5yZXBsYWNlKC8lMkMvZ2ksICcsJykKICAgICAgICAgICAgLnJlcGxhY2UoLyUzQi9naSwgJzsnKQogICAgICAgICAgICAucmVwbGFjZSgvJTJCL2dpLCAnKycpCiAgICAgICAgICAgIC5yZXBsYWNlKC8lM0QvZ2ksICc9JykKICAgICAgICAgICAgLnJlcGxhY2UoLyUzRi9naSwgJz8nKQogICAgICAgICAgICAucmVwbGFjZSgvJTJGL2dpLCAnLycpOwogICAgfQogICAgLyoqCiAgICAgKiBBbiBIVFRQIHJlcXVlc3QvcmVzcG9uc2UgYm9keSB0aGF0IHJlcHJlc2VudHMgc2VyaWFsaXplZCBwYXJhbWV0ZXJzLAogICAgICogcGVyIHRoZSBNSU1FIHR5cGUgYGFwcGxpY2F0aW9uL3gtd3d3LWZvcm0tdXJsZW5jb2RlZGAuCiAgICAgKgogICAgICogVGhpcyBjbGFzcyBpcyBpbW11dGFibGU7IGFsbCBtdXRhdGlvbiBvcGVyYXRpb25zIHJldHVybiBhIG5ldyBpbnN0YW5jZS4KICAgICAqCiAgICAgKiBcQHB1YmxpY0FwaQogICAgICovCiAgICBjbGFzcyBIdHRwUGFyYW1zIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez89fSBvcHRpb25zCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3Iob3B0aW9ucyA9ICgvKiogQHR5cGUgez99ICovICh7fSkpKSB7CiAgICAgICAgICAgIHRoaXMudXBkYXRlcyA9IG51bGw7CiAgICAgICAgICAgIHRoaXMuY2xvbmVGcm9tID0gbnVsbDsKICAgICAgICAgICAgdGhpcy5lbmNvZGVyID0gb3B0aW9ucy5lbmNvZGVyIHx8IG5ldyBIdHRwVXJsRW5jb2RpbmdDb2RlYygpOwogICAgICAgICAgICBpZiAoISFvcHRpb25zLmZyb21TdHJpbmcpIHsKICAgICAgICAgICAgICAgIGlmICghIW9wdGlvbnMuZnJvbU9iamVjdCkgewogICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgQ2Fubm90IHNwZWNpZnkgYm90aCBmcm9tU3RyaW5nIGFuZCBmcm9tT2JqZWN0LmApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdGhpcy5tYXAgPSBwYXJhbVBhcnNlcihvcHRpb25zLmZyb21TdHJpbmcsIHRoaXMuZW5jb2Rlcik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoISFvcHRpb25zLmZyb21PYmplY3QpIHsKICAgICAgICAgICAgICAgIHRoaXMubWFwID0gbmV3IE1hcCgpOwogICAgICAgICAgICAgICAgT2JqZWN0LmtleXMob3B0aW9ucy5mcm9tT2JqZWN0KS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30ga2V5CiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBrZXkgPT4gewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCB2YWx1ZSA9ICgoLyoqIEB0eXBlIHs/fSAqLyAob3B0aW9ucy5mcm9tT2JqZWN0KSkpW2tleV07CiAgICAgICAgICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMubWFwKSkuc2V0KGtleSwgQXJyYXkuaXNBcnJheSh2YWx1ZSkgPyB2YWx1ZSA6IFt2YWx1ZV0pOwogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5tYXAgPSBudWxsOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJlcG9ydHMgd2hldGhlciB0aGUgYm9keSBpbmNsdWRlcyBvbmUgb3IgbW9yZSB2YWx1ZXMgZm9yIGEgZ2l2ZW4gcGFyYW1ldGVyLgogICAgICAgICAqIEBwYXJhbSB7P30gcGFyYW0gVGhlIHBhcmFtZXRlciBuYW1lLgogICAgICAgICAqIEByZXR1cm4gez99IFRydWUgaWYgdGhlIHBhcmFtZXRlciBoYXMgb25lIG9yIG1vcmUgdmFsdWVzLAogICAgICAgICAqIGZhbHNlIGlmIGl0IGhhcyBubyB2YWx1ZSBvciBpcyBub3QgcHJlc2VudC4KICAgICAgICAgKi8KICAgICAgICBoYXMocGFyYW0pIHsKICAgICAgICAgICAgdGhpcy5pbml0KCk7CiAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5tYXApKS5oYXMocGFyYW0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZXRyaWV2ZXMgdGhlIGZpcnN0IHZhbHVlIGZvciBhIHBhcmFtZXRlci4KICAgICAgICAgKiBAcGFyYW0gez99IHBhcmFtIFRoZSBwYXJhbWV0ZXIgbmFtZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fSBUaGUgZmlyc3QgdmFsdWUgb2YgdGhlIGdpdmVuIHBhcmFtZXRlciwKICAgICAgICAgKiBvciBgbnVsbGAgaWYgdGhlIHBhcmFtZXRlciBpcyBub3QgcHJlc2VudC4KICAgICAgICAgKi8KICAgICAgICBnZXQocGFyYW0pIHsKICAgICAgICAgICAgdGhpcy5pbml0KCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcmVzID0gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMubWFwKSkuZ2V0KHBhcmFtKTsKICAgICAgICAgICAgcmV0dXJuICEhcmVzID8gcmVzWzBdIDogbnVsbDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0cmlldmVzIGFsbCB2YWx1ZXMgZm9yIGEgIHBhcmFtZXRlci4KICAgICAgICAgKiBAcGFyYW0gez99IHBhcmFtIFRoZSBwYXJhbWV0ZXIgbmFtZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fSBBbGwgdmFsdWVzIGluIGEgc3RyaW5nIGFycmF5LAogICAgICAgICAqIG9yIGBudWxsYCBpZiB0aGUgcGFyYW1ldGVyIG5vdCBwcmVzZW50LgogICAgICAgICAqLwogICAgICAgIGdldEFsbChwYXJhbSkgewogICAgICAgICAgICB0aGlzLmluaXQoKTsKICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovICh0aGlzLm1hcCkpLmdldChwYXJhbSkgfHwgbnVsbDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0cmlldmVzIGFsbCB0aGUgcGFyYW1ldGVycyBmb3IgdGhpcyBib2R5LgogICAgICAgICAqIEByZXR1cm4gez99IFRoZSBwYXJhbWV0ZXIgbmFtZXMgaW4gYSBzdHJpbmcgYXJyYXkuCiAgICAgICAgICovCiAgICAgICAga2V5cygpIHsKICAgICAgICAgICAgdGhpcy5pbml0KCk7CiAgICAgICAgICAgIHJldHVybiBBcnJheS5mcm9tKCgvKiogQHR5cGUgez99ICovICh0aGlzLm1hcCkpLmtleXMoKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEFwcGVuZHMgYSBuZXcgdmFsdWUgdG8gZXhpc3RpbmcgdmFsdWVzIGZvciBhIHBhcmFtZXRlci4KICAgICAgICAgKiBAcGFyYW0gez99IHBhcmFtIFRoZSBwYXJhbWV0ZXIgbmFtZS4KICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlIFRoZSBuZXcgdmFsdWUgdG8gYWRkLgogICAgICAgICAqIEByZXR1cm4gez99IEEgbmV3IGJvZHkgd2l0aCB0aGUgYXBwZW5kZWQgdmFsdWUuCiAgICAgICAgICovCiAgICAgICAgYXBwZW5kKHBhcmFtLCB2YWx1ZSkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5jbG9uZSh7IHBhcmFtLCB2YWx1ZSwgb3A6ICdhJyB9KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmVwbGFjZXMgdGhlIHZhbHVlIGZvciBhIHBhcmFtZXRlci4KICAgICAgICAgKiBAcGFyYW0gez99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AgKi8KICAgICAgICB0b1N0cmluZygpIHsKICAgICAgICAgICAgdGhpcy5pbml0KCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmtleXMoKQogICAgICAgICAgICAgICAgLm1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30ga2V5CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBrZXkgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZUtleSA9IHRoaXMuZW5jb2Rlci5lbmNvZGVLZXkoa2V5KTsKICAgICAgICAgICAgICAgIC8vIGBhOiBbJzEnXWAgcHJvZHVjZXMgYCdhPTEnYAogICAgICAgICAgICAgICAgLy8gYGI6IFtdYCBwcm9kdWNlcyBgJydgCiAgICAgICAgICAgICAgICAvLyBgYzogWycxJywgJzInXWAgcHJvZHVjZXMgYCdjPTEmYz0yJ2AKICAgICAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMubWFwKSkuZ2V0KGtleSkpKS5tYXAoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgdmFsdWUgPT4gZUtleSArICc9JyArIHRoaXMuZW5jb2Rlci5lbmNvZGVWYWx1ZSh2YWx1ZSkpKQogICAgICAgICAgICAgICAgICAgIC5qb2luKCcmJyk7CiAgICAgICAgICAgIH0pKQogICAgICAgICAgICAgICAgLy8gZmlsdGVyIG91dCBlbXB0eSB2YWx1ZXMgYmVjYXVzZSBgYjogW11gIHByb2R1Y2VzIGAnJ2AKICAgICAgICAgICAgICAgIC8vIHdoaWNoIHJlc3VsdHMgaW4gYGE9MSYmYz0xJmM9MmAgaW5zdGVhZCBvZiBgYT0xJmM9MSZjPTJgIGlmIHdlIGRvbid0CiAgICAgICAgICAgICAgICAuZmlsdGVyKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwYXJhbQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgcGFyYW0gPT4gcGFyYW0gIT09ICcnKSkKICAgICAgICAgICAgICAgIC5qb2luKCcmJyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSB1cGRhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGNsb25lKHVwZGF0ZSkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGNsb25lID0gbmV3IEh0dHBQYXJhbXMoKC8qKiBAdHlwZSB7P30gKi8gKHsgZW5jb2RlcjogdGhpcy5lbmNvZGVyIH0pKSk7CiAgICAgICAgICAgIGNsb25lLmNsb25lRnJvbSA9IHRoaXMuY2xvbmVGcm9tIHx8IHRoaXM7CiAgICAgICAgICAgIGNsb25lLnVwZGF0ZXMgPSAodGhpcy51cGRhdGVzIHx8IFtdKS5jb25jYXQoW3VwZGF0ZV0pOwogICAgICAgICAgICByZXR1cm4gY2xvbmU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBpbml0KCkgewogICAgICAgICAgICBpZiAodGhpcy5tYXAgPT09IG51bGwpIHsKICAgICAgICAgICAgICAgIHRoaXMubWFwID0gbmV3IE1hcCgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0aGlzLmNsb25lRnJvbSAhPT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5jbG9uZUZyb20uaW5pdCgpOwogICAgICAgICAgICAgICAgdGhpcy5jbG9uZUZyb20ua2V5cygpLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBrZXkKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIGtleSA9PiAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5tYXApKS5zZXQoa2V5LCAoLyoqIEB0eXBlIHs/fSAqLyAoKC8qKiBAdHlwZSB7P30gKi8gKCgvKiogQHR5cGUgez99ICovICh0aGlzLmNsb25lRnJvbSkpLm1hcCkpLmdldChrZXkpKSkpKSk7CiAgICAgICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy51cGRhdGVzKSkuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHVwZGF0ZQogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgdXBkYXRlID0+IHsKICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKHVwZGF0ZS5vcCkgewogICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdhJzoKICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAncyc6CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBiYXNlID0gKHVwZGF0ZS5vcCA9PT0gJ2EnID8gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMubWFwKSkuZ2V0KHVwZGF0ZS5wYXJhbSkgOiB1bmRlZmluZWQpIHx8IFtdOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFzZS5wdXNoKCgvKiogQHR5cGUgez99ICovICh1cGRhdGUudmFsdWUpKSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5tYXApKS5zZXQodXBkYXRlLnBhcmFtLCBiYXNlKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdkJzoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh1cGRhdGUudmFsdWUgIT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYmFzZSA9ICgvKiogQHR5cGUgez99ICovICh0aGlzLm1hcCkpLmdldCh1cGRhdGUucGFyYW0pIHx8IFtdOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBpZHggPSBiYXNlLmluZGV4T2YodXBkYXRlLnZhbHVlKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaWR4ICE9PSAtMSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYXNlLnNwbGljZShpZHgsIDEpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoYmFzZS5sZW5ndGggPiAwKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovICh0aGlzLm1hcCkpLnNldCh1cGRhdGUucGFyYW0sIGJhc2UpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMubWFwKSkuZGVsZXRlKHVwZGF0ZS5wYXJhbSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMubWFwKSkuZGVsZXRlKHVwZGF0ZS5wYXJhbSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgdGhpcy5jbG9uZUZyb20gPSB0aGlzLnVwZGF0ZXMgPSBudWxsOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBEZXRlcm1pbmUgd2hldGhlciB0aGUgZ2l2ZW4gSFRUUCBtZXRob2QgbWF5IGluY2x1ZGUgYSBib2R5LgogICAgICogQHBhcmFtIHs/fSBtZXRob2QKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIG1pZ2h0SGF2ZUJvZHkobWV0aG9kKSB7CiAgICAgICAgc3dpdGNoIChtZXRob2QpIHsKICAgICAgICAgICAgY2FzZSAnREVMRVRFJzoKICAgICAgICAgICAgY2FzZSAnR0VUJzoKICAgICAgICAgICAgY2FzZSAnSEVBRCc6CiAgICAgICAgICAgIGNhc2UgJ09QVElPTlMnOgogICAgICAgICAgICBjYXNlICdKU09OUCc6CiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIFNhZmVseSBhc3NlcnQgd2hldGhlciB0aGUgZ2l2ZW4gdmFsdWUgaXMgYW4gQXJyYXlCdWZmZXIuCiAgICAgKgogICAgICogSW4gc29tZSBleGVjdXRpb24gZW52aXJvbm1lbnRzIEFycmF5QnVmZmVyIGlzIG5vdCBkZWZpbmVkLgogICAgICogQHBhcmFtIHs/fSB2YWx1ZQ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gKiBgSHR0cFJlcXVlc3RgIHJlcHJlc2VudHMgYW4gb3V0Z29pbmcgcmVxdWVzdCwgaW5jbHVkaW5nIFVSTCwgbWV0aG9kLAogICAgICogaGVhZGVycywgYm9keSwgYW5kIG90aGVyIHJlcXVlc3QgY29uZmlndXJhdGlvbiBvcHRpb25zLiBJbnN0YW5jZXMgc2hvdWxkIGJlCiAgICAgKiBhc3N1bWVkIHRvIGJlIGltbXV0YWJsZS4gVG8gbW9kaWZ5IGEgYEh0dHBSZXF1ZXN0YCwgdGhlIGBjbG9uZWAKICAgICAqIG1ldGhvZCBzaG91bGQgYmUgdXNlZC4KICAgICAqCiAgICAgKiBcQHB1YmxpY0FwaQogICAgICogQHRlbXBsYXRlIFQKICAgICAqLwogICAgY2xhc3MgSHR0cFJlcXVlc3QgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gbWV0aG9kCiAgICAgICAgICogQHBhcmFtIHs/fSB1cmwKICAgICAgICAgKiBAcGFyYW0gez89fSB0aGlyZAogICAgICAgICAqIEBwYXJhbSB7Pz19IGZvdXJ0aAogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKG1ldGhvZCwgdXJsLCB0aGlyZCwgZm91cnRoKSB7CiAgICAgICAgICAgIHRoaXMudXJsID0gdXJsOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogVGhlIHJlcXVlc3QgYm9keSwgb3IgYG51bGxgIGlmIG9uZSBpc24ndCBzZXQuCiAgICAgICAgICAgICAqCiAgICAgICAgICAgICAqIEJvZGllcyBhcmUgbm90IGVuZm9yY2VkIHRvIGJlIGltbXV0YWJsZSwgYXMgdGhleSBjYW4gaW5jbHVkZSBhIHJlZmVyZW5jZSB0byBhbnkKICAgICAgICAgICAgICogdXNlci1kZWZpbmVkIGRhdGEgdHlwZS4gSG93ZXZlciwgaW50ZXJjZXB0b3JzIHNob3VsZCB0YWtlIGNhcmUgdG8gcHJlc2VydmUKICAgICAgICAgICAgICogaWRlbXB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lwZSA9ICdqc29uJzsKICAgICAgICAgICAgdGhpcy5tZXRob2QgPSBtZXRob2QudG9VcHBlckNhc2UoKTsKICAgICAgICAgICAgLy8gTmV4dCwgbmVlZCB0byBmaWd1cmUgb3V0IHdoaWNoIGFyZ3VtZW50IGhvbGRzIHRoZSBIdHRwUmVxdWVzdEluaXQKICAgICAgICAgICAgLy8gb3B0aW9ucywgaWYgYW55LgogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBvcHRpb25zOwogICAgICAgICAgICAvLyBDaGVjayB3aGV0aGVyIGEgYm9keSBhcmd1bWVudCBpcyBleHBlY3RlZC4gVGhlIG9ubHkgdmFsaWQgd2F5IHRvIG9taXQKICAgICAgICAgICAgLy8gdGhlIGJvZHkgYXJndW1lbnQgaXMgdG8gdXNlIGEga25vd24gbm8tYm9keSBtZXRob2QgbGlrZSBHRVQuCiAgICAgICAgICAgIGlmIChtaWdodEhhdmVCb2R5KHRoaXMubWV0aG9kKSB8fCAhIWZvdXJ0aCkgewogICAgICAgICAgICAgICAgLy8gQm9keSBpcyB0aGUgdGhpcmQgYXJndW1lbnQsIG9wdGlvbnMgYXJlIHRoZSBmb3VydGguCiAgICAgICAgICAgICAgICB0aGlzLmJvZHkgPSAodGhpcmQgIT09IHVuZGVmaW5lZCkgPyAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcmQpKSA6IG51bGw7CiAgICAgICAgICAgICAgICBvcHRpb25zID0gZm91cnRoOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgLy8gTm8gYm9keSByZXF1aXJlZCwgb3B0aW9ucyBhcmUgdGhlIHRoaXJkIGFyZ3VtZW50LiBUaGUgYm9keSBzdGF5cyBudWxsLgogICAgICAgICAgICAgICAgb3B0aW9ucyA9ICgvKiogQHR5cGUgez99ICovICh0aGlyZCkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIElmIG9wdGlvbnMgaGF2ZSBiZWVuIHBhc3NlZCwgaW50ZXJwcmV0IHRoZW0uCiAgICAgICAgICAgIGlmIChvcHRpb25zKSB7CiAgICAgICAgICAgICAgICAvLyBOb3JtYWxpemUgcmVwb3J0UHJvZ3Jlc3MgYW5kIHdpdGhDcmVkZW50aWFscy4KICAgICAgICAgICAgICAgIHRoaXMucmVwb3J0UHJvZ3Jlc3MgPSAhIW9wdGlvbnMucmVwb3J0UHJvZ3Jlc3M7CiAgICAgICAgICAgICAgICB0aGlzLndpdGhDcmVkZW50aWFscyA9ICEhb3B0aW9ucy53aXRoQ3JlZGVudGlhbHM7CiAgICAgICAgICAgICAgICAvLyBPdmVycmlkZSBkZWZhdWx0IHJlc3BvbnNlIHR5cGUgb2YgJ2pzb24nIGlmIG9uZSBpcyBwcm92aWRlZC4KICAgICAgICAgICAgICAgIGlmICghIW9wdGlvbnMucmVzcG9uc2VUeXBlKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5yZXNwb25zZVR5cGUgPSBvcHRpb25zLnJlc3BvbnNlVHlwZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vIE92ZXJyaWRlIGhlYWRlcnMgaWYgdGhleSdyZSBwcm92aWRlZC4KICAgICAgICAgICAgICAgIGlmICghIW9wdGlvbnMuaGVhZGVycykgewogICAgICAgICAgICAgICAgICAgIHRoaXMuaGVhZGVycyA9IG9wdGlvbnMuaGVhZGVyczsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmICghIW9wdGlvbnMucGFyYW1zKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5wYXJhbXMgPSBvcHRpb25zLnBhcmFtczsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBJZiBubyBoZWFkZXJzIGhhdmUgYmVlbiBwYXNzZWQgaW4sIGNvbnN0cnVjdCBhIG5ldyBIdHRwSGVhZGVycyBpbnN0YW5jZS4KICAgICAgICAgICAgaWYgKCF0aGlzLmhlYWRlcnMpIHsKICAgICAgICAgICAgICAgIHRoaXMuaGVhZGVycyA9IG5ldyBIdHRwSGVhZGVycygpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIElmIG5vIHBhcmFtZXRlcnMgaGF2ZSBiZWVuIHBhc3NlZCBpbiwgY29uc3RydWN0IGEgbmV3IEh0dHBVcmxFbmNvZGVkUGFyYW1zIGluc3RhbmNlLgogICAgICAgICAgICBpZiAoIXRoaXMucGFyYW1zKSB7CiAgICAgICAgICAgICAgICB0aGlzLnBhcmFtcyA9IG5ldyBIdHRwUGFyYW1zKCk7CiAgICAgICAgICAgICAgICB0aGlzLnVybFdpdGhQYXJhbXMgPSB1cmw7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAvLyBFbmNvZGUgdGhlIHBhcmFtZXRlcnMgdG8gYSBzdHJpbmcgaW4gcHJlcGFyYXRpb24gZm9yIGluY2x1c2lvbiBpbiB0aGUgVVJMLgogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgcGFyYW1zID0gdGhpcy5wYXJhbXMudG9TdHJpbmcoKTsKICAgICAgICAgICAgICAgIGlmIChwYXJhbXMubGVuZ3RoID09PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gTm8gcGFyYW1ldGVycywgdGhlIHZpc2libGUgVVJMIGlzIGp1c3QgdGhlIFVSTCBnaXZlbiBhdCBjcmVhdGlvbiB0aW1lLgogICAgICAgICAgICAgICAgICAgIHRoaXMudXJsV2l0aFBhcmFtcyA9IHVybDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIC8vIERvZXMgdGhlIFVSTCBhbHJlYWR5IGhhdmUgcXVlcnkgcGFyYW1ldGVycz8gTG9vayBmb3IgJz8nLgogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBxSWR4ID0gdXJsLmluZGV4T2YoJz8nKTsKICAgICAgICAgICAgICAgICAgICAvLyBUaGVyZSBhcmUgMyBjYXNlcyB0byBoYW5kbGU6CiAgICAgICAgICAgICAgICAgICAgLy8gMSkgTm8gZXhpc3RpbmcgcGFyYW1ldGVycyAtPiBhcHBlbmQgJz8nIGZvbGxvd2VkIGJ5IHBhcmFtcy4KICAgICAgICAgICAgICAgICAgICAvLyAyKSAnPycgZXhpc3RzIGFuZCBpcyBmb2xsb3dlZCBieSBleGlzdGluZyBxdWVyeSBzdHJpbmcgLT4KICAgICAgICAgICAgICAgICAgICAvLyAgICBhcHBlbmQgJyYnIGZvbGxvd2VkIGJ5IHBhcmFtcy4KICAgICAgICAgICAgICAgICAgICAvLyAzKSAnPycgZXhpc3RzIGF0IHRoZSBlbmQgb2YgdGhlIHVybCAtPiBhcHBlbmQgcGFyYW1zIGRpcmVjdGx5LgogICAgICAgICAgICAgICAgICAgIC8vIFRoaXMgYmFzaWNhbGx5IGFtb3VudHMgdG8gZGV0ZXJtaW5pbmcgdGhlIGNoYXJhY3RlciwgaWYgYW55LCB3aXRoCiAgICAgICAgICAgICAgICAgICAgLy8gd2hpY2ggdG8gam9pbiB0aGUgVVJMIGFuZCBwYXJhbWV0ZXJzLgogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBzZXAgPSBxSWR4ID09PSAtMSA/ICc/JyA6IChxSWR4IDwgdXJsLmxlbmd0aCAtIDEgPyAnJicgOiAnJyk7CiAgICAgICAgICAgICAgICAgICAgdGhpcy51cmxXaXRoUGFyYW1zID0gdXJsICsgc2VwICsgcGFyYW1zOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFRyYW5zZm9ybSB0aGUgZnJlZS1mb3JtIGJvZHkgaW50byBhIHNlcmlhbGl6ZWQgZm9ybWF0IHN1aXRhYmxlIGZvcgogICAgICAgICAqIHRyYW5zbWlzc2lvbiB0byB0aGUgc2VydmVyLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2VyaWFsaXplQm9keSgpIHsKICAgICAgICAgICAgLy8gSWYgbm8gYm9keSBpcyBwcmVzZW50LCBubyBuZWVkIHRvIHNlcmlhbGl6ZSBpdC4KICAgICAgICAgICAgaWYgKHRoaXMuYm9keSA9PT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gQ2hlY2sgd2hldGhlciB0aGUgYm9keSBpcyBhbHJlYWR5IGluIGEgc2VyaWFsaXplZCBmb3JtLiBJZiBzbywKICAgICAgICAgICAgLy8gaXQgY2FuIGp1c3QgYmUgcmV0dXJuZWQgZGlyZWN0bHkuCiAgICAgICAgICAgIGlmIChpc0FycmF5QnVmZmVyKHRoaXMuYm9keSkgfHwgaXNCbG9iKHRoaXMuYm9keSkgfHwgaXNGb3JtRGF0YSh0aGlzLmJvZHkpIHx8CiAgICAgICAgICAgICAgICB0eXBlb2YgdGhpcy5ib2R5ID09PSAnc3RyaW5nJykgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuYm9keTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBDaGVjayB3aGV0aGVyIHRoZSBib2R5IGlzIGFuIGluc3RhbmNlIG9mIEh0dHBVcmxFbmNvZGVkUGFyYW1zLgogICAgICAgICAgICBpZiAodGhpcy5ib2R5IGluc3RhbmNlb2YgSHR0cFBhcmFtcykgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuYm9keS50b1N0cmluZygpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIENoZWNrIHdoZXRoZXIgdGhlIGJvZHkgaXMgYW4gb2JqZWN0IG9yIGFycmF5LCBhbmQgc2VyaWFsaXplIHdpdGggSlNPTiBpZiBzby4KICAgICAgICAgICAgaWYgKHR5cGVvZiB0aGlzLmJvZHkgPT09ICdvYmplY3QnIHx8IHR5cGVvZiB0aGlzLmJvZHkgPT09ICdib29sZWFuJyB8fAogICAgICAgICAgICAgICAgQXJyYXkuaXNBcnJheSh0aGlzLmJvZHkpKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkodGhpcy5ib2R5KTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBGYWxsIGJhY2sgb24gdG9TdHJpbmcoKSBmb3IgZXZlcnl0aGluZyBlbHNlLgogICAgICAgICAgICByZXR1cm4gKCgvKiogQHR5cGUgez99ICovICh0aGlzLmJvZHkpKSkudG9TdHJpbmcoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogRXhhbWluZSB0aGUgYm9keSBhbmQgYXR0ZW1wdCB0byBpbmZlciBhbiBhcHByb3ByaWF0ZSBNSU1FIHR5cGUKICAgICAgICAgKiBmb3IgaXQuCiAgICAgICAgICoKICAgICAgICAgKiBJZiBubyBzdWNoIHR5cGUgY2FuIGJlIGluZmVycmVkLCB0aGlzIG1ldGhvZCB3aWxsIHJldHVybiBgbnVsbGAuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkZXRlY3RDb250ZW50VHlwZUhlYWRlcigpIHsKICAgICAgICAgICAgLy8gQW4gZW1wdHkgYm9keSBoYXMgbm8gY29udGVudCB0eXBlLgogICAgICAgICAgICBpZiAodGhpcy5ib2R5ID09PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBGb3JtRGF0YSBib2RpZXMgcmVseSBvbiB0aGUgYnJvd3NlcidzIGNvbnRlbnQgdHlwZSBhc3NpZ25tZW50LgogICAgICAgICAgICBpZiAoaXNGb3JtRGF0YSh0aGlzLmJvZHkpKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBCbG9icyB1c3VhbGx5IGhhdmUgdGhlaXIgb3duIGNvbnRlbnQgdHlwZS4gSWYgaXQgZG9lc24ndCwgdGhlbgogICAgICAgICAgICAvLyBubyB0eXBlIGNhbiBiZSBpbmZlcnJlZC4KICAgICAgICAgICAgaWYgKGlzQmxvYih0aGlzLmJvZHkpKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5ib2R5LnR5cGUgfHwgbnVsbDsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBBcnJheSBidWZmZXJzIGhhdmUgdW5rbm93biBjb250ZW50cyBhbmQgdGh1cyBubyB0eXBlIGNhbiBiZSBpbmZlcnJlZC4KICAgICAgICAgICAgaWYgKGlzQXJyYXlCdWZmZXIodGhpcy5ib2R5KSkgewogICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gVGVjaG5pY2FsbHksIHN0cmluZ3MgY291bGQgYmUgYSBmb3JtIG9mIEpTT04gZGF0YSwgYnV0IGl0J3Mgc2FmZSBlbm91Z2gKICAgICAgICAgICAgLy8gdG8gYXNzdW1lIHRoZXkncmUgcGxhaW4gc3RyaW5ncy4KICAgICAgICAgICAgaWYgKHR5cGVvZiB0aGlzLmJvZHkgPT09ICdzdHJpbmcnKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gJ3RleHQvcGxhaW4nOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIGBIdHRwVXJsRW5jb2RlZFBhcmFtc2AgaGFzIGl0cyBvd24gY29udGVudC10eXBlLgogICAgICAgICAgICBpZiAodGhpcy5ib2R5IGluc3RhbmNlb2YgSHR0cFBhcmFtcykgewogICAgICAgICAgICAgICAgcmV0dXJuICdhcHBsaWNhdGlvbi94LXd3dy1mb3JtLXVybGVuY29kZWQ7Y2hhcnNldD1VVEYtOCc7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gQXJyYXlzLCBvYmplY3RzLCBhbmQgbnVtYmVycyB3aWxsIGJlIGVuY29kZWQgYXMgSlNPTi4KICAgICAgICAgICAgaWYgKHR5cGVvZiB0aGlzLmJvZHkgPT09ICdvYmplY3QnIHx8IHR5cGVvZiB0aGlzLmJvZHkgPT09ICdudW1iZXInIHx8CiAgICAgICAgICAgICAgICBBcnJheS5pc0FycmF5KHRoaXMuYm9keSkpIHsKICAgICAgICAgICAgICAgIHJldHVybiAnYXBwbGljYXRpb24vanNvbic7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gTm8gdHlwZSBjb3VsZCBiZSBpbmZlcnJlZC4KICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7Pz19IHVwZGF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgY2xvbmUodXBkYXRlID0ge30pIHsKICAgICAgICAgICAgLy8gRm9yIG1ldGhvZCwgdXJsLCBhbmQgcmVzcG9uc2VUeXBlLCB0YWtlIHRoZSBjdXJyZW50IHZhbHVlIHVubGVzcwogICAgICAgICAgICAvLyBpdCBpcyBvdmVycmlkZGVuIGluIHRoZSB1cGRhdGUgaGFzaC4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBtZXRob2QgPSB1cGRhdGUubWV0aG9kIHx8IHRoaXMubWV0aG9kOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHVybCA9IHVwZGF0ZS51cmwgfHwgdGhpcy51cmw7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcmVzcG9uc2VUeXBlID0gdXBkYXRlLnJlc3BvbnNlVHlwZSB8fCB0aGlzLnJlc3BvbnNlVHlwZTsKICAgICAgICAgICAgLy8gVGhlIGJvZHkgaXMgc29tZXdoYXQgc3BlY2lhbCAtIGEgYG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ZWFkZXJzYCBvcgogICAgICAgICAgICAvLyBgc2V0UGFyYW1zYCBhcmUgdXNlZC4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgaGVhZGVycyA9IHVwZGF0ZS5oZWFkZXJzIHx8IHRoaXMuaGVhZGVyczsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgcGFyYW1zID0gdXBkYXRlLnBhcmFtcyB8fCB0aGlzLnBhcmFtczsKICAgICAgICAgICAgLy8gQ2hlY2sgd2hldGhlciB0aGUgY2FsbGVyIGhhcyBhc2tlZCB0byBhZGQgaGVhZGVycy4KICAgICAgICAgICAgaWYgKHVwZGF0ZS5zZXRIZWFkZXJzICE9PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgICAgIC8vIFNldCBldmVyeSByZXF1ZXN0ZWQgaGVhZGVyLgogICAgICAgICAgICAgICAgaGVhZGVycyA9CiAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmtleXModXBkYXRlLnNldEhlYWRlcnMpCiAgICAgICAgICAgICAgICAgICAgICAgIC5yZWR1Y2UoKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gaGVhZGVycwogICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbmFtZQogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKGhlYWRlcnMsIG5hbWUpID0+IGhlYWRlcnMuc2V0KG5hbWUsICgvKiogQHR5cGUgez99ICovICh1cGRhdGUuc2V0SGVhZGVycykpW25hbWVdKSksIGhlYWRlcnMpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIENoZWNrIHdoZXRoZXIgdGhlIGNhbGxlciBoYXMgYXNrZWQgdG8gc2V0IHBhcmFtcy4KICAgICAgICAgICAgaWYgKHVwZGF0ZS5zZXRQYXJhbXMpIHsKICAgICAgICAgICAgICAgIC8vIFNldCBldmVyeSByZXF1ZXN0ZWQgcGFyYW0uCiAgICAgICAgICAgICAgICBwYXJhbXMgPSBPYmplY3Qua2V5cyh1cGRhdGUuc2V0UGFyYW1zKQogICAgICAgICAgICAgICAgICAgIC5yZWR1Y2UoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwYXJhbXMKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcGFyYW0KICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChwYXJhbXMsIHBhcmFtKSA9PiBwYXJhbXMuc2V0KHBhcmFtLCAoLyoqIEB0eXBlIHs/fSAqLyAodXBkYXRlLnNldFBhcmFtcykpW3BhcmFtXSkpLCBwYXJhbXMpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIEZpbmFsbHksIGNvbnN0cnVjdCB0aGUgbmV3IEh0dHBSZXF1ZXN0IHVzaW5nIHRoZSBwaWVjZXMgZnJvbSBhYm92ZS4KICAgICAgICAgICAgcmV0dXJuIG5ldyBIdHRwUmVxdWVzdChtZXRob2QsIHVybCwgYm9keSwgewogICAgICAgICAgICAgICAgcGFyYW1zLAogICAgICAgICAgICAgICAgaGVhZGVycywKICAgICAgICAgICAgICAgIHJlcG9ydFByb2dyZXNzLAogICAgICAgICAgICAgICAgcmVzcG9uc2VUeXBlLAogICAgICAgICAgICAgICAgd2l0aENyZWRlbnRpYWxzLAogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICB9CgogICAgLyoqCiAgICAgKiBAZmlsZW92ZXJ2aWV3IGFkZGVkIGJ5IHRzaWNrbGUKICAgICAqIEdlbmVyYXRlZCBmcm9tOiBwYWNrYWdlcy9jb21tb24vaHR0cC9zcmMvcmVzcG9uc2UudHMKICAgICAqIEBzdXBwcmVzcyB7Y2hlY2tUeXBlcyxjb25zdGFudFByb3BlcnR5LGV4dHJhUmVxdWlyZSxtaXNzaW5nT3ZlcnJpZGUsbWlzc2luZ1JldHVybix1bnVzZWRQcml2YXRlTWVtYmVycyx1c2VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgLyoqIEBlbnVtIHtudW1iZXJ9ICovCiAgICBjb25zdCBIdHRwRXZlbnRUeXBlID0gewogICAgICAgIC8qKgogICAgICAgICAqIFRoZSByZXF1ZXN0IHdhcyBzZW50IG91dCBvdmVyIHRoZSB3aXJlLgogICAgICAgICAqLwogICAgICAgIFNlbnQ6IDAsCiAgICAgICAgLyoqCiAgICAgICAgICogQW4gdXBsb2FkIHByb2dyZXNzIGV2ZW50IHdhcyByZWNlaXZlZC4KICAgICAgICAgKi8KICAgICAgICBVcGxvYWRQcm9ncmVzczogMSwKICAgICAgICAvKioKICAgICAgICAgKiBUaGUgcmVzcG9uc2Ugc3RhdHVzIGNvZGUgYW5kIGhlYWRlcnMgd2VyZSByZWNlaXZlZC4KICAgICAgICAgKi8KICAgICAgICBSZXNwb25zZUhlYWRlcjogMiwKICAgICAgICAvKioKICAgICAgICAgKiBBIGRvd25sb2FkIHByb2dyZXNzIGV2ZW50IHdhcyByZWNlaXZlZC4KICAgICAgICAgKi8KICAgICAgICBEb3dubG9hZFByb2dyZXNzOiAzLAogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBmdWxsIHJlc3BvbnNlIGluY2x1ZGluZyB0aGUgYm9keSB3YXMgcmVjZWl2ZWQuCiAgICAgICAgICovCiAgICAgICAgUmVzcG9uc2U6IDQsCiAgICAgICAgLyoqCiAgICAgICAgICogQSBjdXN0b20gZXZlbnQgZnJvbSBhbiBpbnRlcmNlcHRvciBvciBhIGJhY2tlbmQuCiAgICAgICAgICovCiAgICAgICAgVXNlcjogNSwKICAgIH07CiAgICBIdHRwRXZlbnRUeXBlW0h0dHBFdmVudFR5cGUuU2VudF0gPSAnU2VudCc7CiAgICBIdHRwRXZlbnRUeXBlW0h0dHBFdmVudFR5cGUuVXBsb2FkUHJv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saWNBcGkKICAgICAqLwogICAgY2xhc3MgSHR0cEhlYWRlclJlc3BvbnNlIGV4dGVuZHMgSHR0cFJlc3BvbnNlQmFzZSB7CiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlIGEgbmV3IGBIdHRwSGVhZGVyUmVzcG9uc2VgIHdpdGggdGhlIGdpdmVuIHBhcmFtZXRlcnMuCiAgICAgICAgICogQHBhcmFtIHs/PX0gaW5pdAogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKGluaXQgPSB7fSkgewogICAgICAgICAgICBzdXBlcihpbml0KTsKICAgICAgICAgICAgdGhpcy50eXBlID0gSHR0cEV2ZW50VHlwZS5SZXNwb25zZUhlYWRlcjsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ29weSB0aGlzIGBIdHRwSGVhZGVyUmVzcG9uc2VgLCBvdmVycmlkaW5nIGl0cyBjb250ZW50cyB3aXRoIHRoZQogICAgICAgICAqIGdpdmVuIHBhcmFtZXRlciBoYXNoLgogICAgICAgICAqIEBwYXJhbSB7Pz19IHVwZGF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgY2xvbmUodXBkYXRlID0ge30pIHsKICAgICAgICAgICAgLy8gUGVyZm9ybSBhIHN0cmFpZ2h0Zm9yd2FyZCBpbml0aWFsaXphdGlvbiBvZiB0aGUgbmV3IEh0dHBIZWFkZXJSZXNwb25zZSwKICAgICAgICAgICAgLy8gb3ZlcnJpZGluZyB0aGUgY3VycmVudCBwYXJhbWV0ZXJzIHdpdGggbmV3IG9uZXMgaWYgZ2l2ZW4uCiAgICAgICAgICAgIHJldHVybiBuZXcgSHR0cEhlYWRlclJlc3BvbnNlKHsKICAgICAgICAgICAgICAgIGhlYWRlcnM6IHVwZGF0ZS5oZWFkZXJzIHx8IHRoaXMuaGVhZGVycywKICAgICAgICAgICAgICAgIHN0YXR1czogdXBkYXRlLnN0YXR1cyAhPT0gdW5kZWZpbmVkID8gdXBkYXRlLnN0YXR1cyA6IHRoaXMuc3RhdHVzLAogICAgICAgICAgICAgICAgc3RhdHVzVGV4dDogdXBkYXRlLnN0YXR1c1RleHQgfHwgdGhpcy5zdGF0dXNUZXh0LAogICAgICAgICAgICAgICAgdXJsOiB1cGRhdGUudXJsIHx8IHRoaXMudXJsIHx8IHVuZGVmaW5lZCwKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBBIGZ1bGwgSFRUUCByZXNwb25zZSwgaW5jbHVkaW5nIGEgdHlwZWQgcmVzcG9uc2UgYm9keSAod2hpY2ggbWF5IGJlIGBudWxsYAogICAgICogaWYgb25lIHdhcyBub3QgcmV0dXJuZWQpLgogICAgICoKICAgICAqIGBIdHRwUmVzcG9uc2VgIGlzIGEgYEh0dHBFdmVudGAgYXZhaWxhYmxlIG9uIHRoZSByZXNwb25zZSBldmVudAogICAgICogc3RyZWFtLgogICAgICoKICAgICAqIFxAcHVibGljQXBpCiAgICAgKiBAdGVtcGxhdGUgVAogICAgICovCiAgICBjbGFzcyBIdHRwUmVzcG9uc2UgZXh0ZW5kcyBIdHRwUmVzcG9uc2VCYXNlIHsKICAgICAgICAvKioKICAgICAgICAgKiBDb25zdHJ1Y3QgYSBuZXcgYEh0dHBSZXNwb25zZWAuCiAgICAgICAgICogQHBhcmFtIHs/PX0gaW5pdAogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKGluaXQgPSB7fSkgewogICAgICAgICAgICBzdXBlcihpbml0KTsKICAgICAgICAgICAgdGhpcy50eXBlID0gSHR0cEV2ZW50VHlwZS5SZXNwb25zZTsKICAgICAgICAgICAgdGhpcy5ib2R5ID0gaW5pdC5ib2R5ICE9PSB1bmRlZmluZWQgPyBpbml0LmJvZHkgOiBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez89fSB1cGRhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLw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W4gdHJhbnNpdAogICAgICAgICAgICAvLyBvciB0aGUgc2VydmVyIHJldHVybmVkIGFuIHVuc3VjY2Vzc2Z1bCBzdGF0dXMgY29kZS4KICAgICAgICAgICAgaWYgKHRoaXMuc3RhdHVzID49IDIwMCAmJiB0aGlzLnN0YXR1cyA8IDMwMCkgewogICAgICAgICAgICAgICAgdGhpcy5tZXNzYWdlID0gYEh0dHAgZmFpbHVyZSBkdXJpbmcgcGFyc2luZyBmb3IgJHtpbml0LnVybCB8fCAnKHVua25vd24gdXJsKSd9YDsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMubWVzc2FnZSA9IGBIdHRwIGZhaWx1cmUgcmVzcG9uc2UgZm9yICR7aW5pdC51cmwgfHwgJyh1bmtub3duIHVybCknfTogJHtpbml0LnN0YXR1c30gJHtpbml0LnN0YXR1c1RleHR9YDsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLmVycm9yID0gaW5pdC5lcnJvciB8fCBudWxsOwogICAgICAgIH0KICAgIH0KCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcgYWRkZWQgYnkgdHNpY2tsZQogICAgICogR2VuZXJhdGVkIGZyb206IHBhY2thZ2VzL2NvbW1vbi9odHRwL3NyYy9jbGllbnQudHMKICAgICAqIEBzdXBwcmVzcyB7Y2hlY2tUeXBlcyxjb25zdGFudFByb3BlcnR5LGV4dHJhUmVxdWlyZSxtaXNzaW5nT3ZlcnJpZGUsbWlzc2luZ1JldHVybix1bnVzZWRQcml2YXRlTWVtYmVycyx1c2VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgLyoqCiAgICAgKiBDb25zdHJ1Y3RzIGFuIGluc3RhbmNlIG9mIGBIdHRwUmVxdWVzdE9wdGlvbnM8VD5gIGZyb20gYSBzb3VyY2UgYEh0dHBNZXRob2RPcHRpb25zYCBhbmQKICAgICAqIHRoZSBnaXZlbiBgYm9keWAu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aCB0ZXJtCiAgICAgKiBzZWFyY2hIZXJvZXModGVybTogc3RyaW5nKTogb2JzZXJ2YWJsZTxIZXJvW10+ewogICAgICoKICAgICAqICBjb25zdCBwYXJhbXMgPSBuZXcgSHR0cFBhcmFtcyh7ZnJvbVN0cmluZzogJ25hbWU9dGVybSd9KTsKICAgICAqICAgIHJldHVybiB0aGlzLmh0dHBDbGllbnQucmVxdWVzdCgnR0VUJywgdGhpcy5oZXJvZXNVcmwsIHtyZXNwb25zZVR5cGU6J2pzb24nLCBwYXJhbXN9KTsKICAgICAqIH0KICAgICAqIGBgYAogICAgICogIyMjIEpTT05QIEV4YW1wbGUKICAgICAqIGBgYAogICAgICogcmVxdWVzdEpzb25wKHVybCwgY2FsbGJhY2sgPSAnY2FsbGJhY2snKSB7CiAgICAgKiAgcmV0dXJuIHRoaXMuaHR0cENsaWVudC5qc29ucCh0aGlzLmhlcm9lc1VSTCwgY2FsbGJhY2spOwogICAgICogfQogICAgICogYGBgCiAgICAgKgogICAgICogIyMjIFBBVENIIEV4YW1wbGUKICAgICAqIGBgYAogICAgICogLy8gUEFUQ0ggb25lIG9mIHRoZSBoZXJvZXMnIG5hbWUKICAgICAqIHBhdGNoSGVybyAoaWQ6IG51bWJlciwgaGVyb05hbWU6IHN0cmluZyk6IE9ic2VydmFibGU8e30+IHsKICAgICAqIGNvbnN0IHVybCA9IGAke3RoaXMuaGVyb2VzVXJsfS8ke2lkfWA7ICAgLy8gUEFUQ0ggYXBpL2hlcm9lcy80MgogICAgICogIHJldHVybiB0aGlzLmh0dHBDbGllbnQucGF0Y2godXJsLCB7bmFtZTogaGVyb05hbWV9LCBodHRwT3B0aW9ucykKICAgICAqICAgIC5waXBlKGNhdGNoRXJyb3IodGhpcy5oYW5kbGVFcnJvcigncGF0Y2hIZXJvJykpKTsKICAgICAqIH0KICAgICAqIGBgYAogICAgICoKICAgICAqIEBzZWUgW0hUVFAgR3VpZGVdKGd1aWRlL2h0dHApCiAgICAgKgogICAgICogXEB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gICAgICAvLyBGaWd1cmUgb3V0IHRoZSBoZWFkZXJzLgogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IGhlYWRlcnMgPSB1bmRlZmluZWQ7CiAgICAgICAgICAgICAgICBpZiAob3B0aW9ucy5oZWFkZXJzIGluc3RhbmNlb2YgSHR0cEhlYWRlcnMpIHsKICAgICAgICAgICAgICAgICAgICBoZWFkZXJzID0gb3B0aW9ucy5oZWFkZXJzOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgaGVhZGVycyA9IG5ldyBIdHRwSGVhZGVycyhvcHRpb25zLmhlYWRlcnMpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLy8gU29ydCBvdXQgcGFyYW1ldGVycy4KICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCBwYXJhbXMgPSB1bmRlZmluZWQ7CiAgICAgICAgICAgICAgICBpZiAoISFvcHRpb25zLnBhcmFtcykgewogICAgICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLnBhcmFtcyBpbnN0YW5jZW9mIEh0dHBQYXJhbXMpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zID0gb3B0aW9ucy5wYXJhbXM7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMgPSBuZXcgSHR0cFBhcmFtcygoLyoqIEB0eXBlIHs/fSAqLyAoeyBmcm9tT2JqZWN0OiBvcHRpb25zLnBhcmFtcyB9KSkpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vIENvbnN0cnVjdCB0aGUgcmVxdWVzdC4KICAgICAgICAgICAgICAgIHJlcSA9IG5ldyBIdHRwUmVxdWVzdChmaXJzdCw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wogICAgICAgICAgICBjb25zdCBldmVudHMkID0gb2YocmVxKS5waXBlKGNvbmNhdE1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcmVxCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAocmVxKSA9PiB0aGlzLmhhbmRsZXIuaGFuZGxlKHJlcSkpKSk7CiAgICAgICAgICAgIC8vIElmIGNvbWluZyB2aWEgdGhlIEFQSSBzaWduYXR1cmUgd2hpY2ggYWNjZXB0cyBhIHByZXZpb3VzbHkgY29uc3RydWN0ZWQgSHR0cFJlcXVlc3QsCiAgICAgICAgICAgIC8vIHRoZSBvbmx5IG9wdGlvbiBpcyB0byBnZXQgdGhlIGV2ZW50IHN0cmVhbS4gT3RoZXJ3aXNlLCByZXR1cm4gdGhlIGV2ZW50IHN0cmVhbSBpZgogICAgICAgICAgICAvLyB0aGF0IGlzIHdoYXQgd2FzIHJlcXVlc3RlZC4KICAgICAgICAgICAgaWYgKGZpcnN0IGluc3RhbmNlb2YgSHR0cFJlcXVlc3QgfHwgb3B0aW9ucy5vYnNlcnZlID09PSAnZXZlbnRzJykgewogICAgICAgICAgICAgICAgcmV0dXJuIGV2ZW50cyQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gVGhlIHJlcXVlc3RlZCBzdHJlYW0gY29udGFpbnMgZWl0aGVyIHRoZSBmdWxsIHJlc3BvbnNlIG9yIHRoZSBib2R5LiBJbiBlaXRoZXIKICAgICAgICAgICAgLy8gY2FzZSwgdGhlIGZpcnN0IHN0ZXAgaXMgdG8gZmlsdGVyIHRoZSBldmVudCBzdHJlYW0gdG8gZXh0cmFjdCBhIHN0cmVhbSBvZgogICAgICAgICAgICAvLyByZXNwb25zZXMocykuCiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcmVzJCA9ICgvKiogQHR5cGUgez99ICovIChldmVudHMkLnBpcGUoZmlsdGVyKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBldmVudAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGV2ZW50KSA9PiBldmVudCBpbnN0YW5jZW9mIEh0dHBSZXNwb25zZSkpKSkpOwogICAgICAgICAgICAvLyBEZWNpZGUgd2hpY2ggc3RyZWFtIHRvIHJldHVybi4KICAgICAgICAgICAgc3dpdGNoIChvcHRpb25zLm9ic2VydmUgfHwgJ2JvZHknKSB7CiAgICAgICAgICAgICAgICBjYXNlICdib2R5JzoKICAgICAgICAgICAgICAgICAgICAvLyBUaGUgcmVxdWVzdGVkIHN0cmVhbSBpcyB0aGUgYm9keS4gTWFwIHRoZSByZXNwb25zZSBzdHJlYW0gdG8gdGhlIHJlc3BvbnNlCiAgICAgICAgICAgICAgICAgICAgLy8gYm9keS4gVGhpcyBjb3VsZCBiZSBkb25lIG1vcmUgc2ltcGx5LCBidXQgYSBtaXNiZWhhdmluZyBpbnRlcmNlcHRvciBtaWdodAogICAgICAgICAgICAgICAgICAgIC8vIHRyYW5zZm9ybSB0aGUgcmVzcG9uc2UgYm9keSBpbnRvIGEgZGlmZmVyZW50IGZvcm1hdCBhbmQgaWdub3JlIHRoZSByZXF1ZXN0ZWQKICAgICAgICAgICAgICAgICAgICAvLyByZXNwb25zZVR5cGUuIEd1YXJkIGFnYWluc3QgdGhpcyBieSB2YWxpZGF0aW5nIHRoYXQgdGhlIHJlc3BvbnNlIGlzIG9mIHRoZQogICAgICAgICAgICAgICAgICAgIC8vIHJlcXVlc3RlZCB0eXBlLgogICAgICAgICAgICAgICAgICAgIHN3aXRjaCAocmVxLnJlc3BvbnNlVHlwZSkgewogICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdhcnJheWJ1ZmZlcic6CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzJC5waXBlKG1hcCgoLyoqCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHJlcwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgKHJlcykgPT4gewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFZhbGlkYXRlIHRoYXQgdGhlIGJvZHkgaXMgYW4gQXJyYXlCdWZmZXIuCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlcy5ib2R5ICE9PSBudWxsICYmICEocmVzLmJvZHkgaW5zdGFuY2VvZiBBcnJheUJ1ZmZlcikpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdSZXNwb25zZSBpcyBub3QgYW4gQXJyYXlCdWZmZXIuJyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXMuYm9keTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pKSk7CiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ2Jsb2InOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlcyQucGlwZShtYXAoKC8qKgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSByZXMKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIChyZXMpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBWYWxpZGF0ZSB0aGF0IHRoZSBib2R5IGlzIGEgQmxvYi4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVzLmJvZHkgIT09IG51bGwgJiYgIShyZXMuYm9keSBpbnN0YW5jZW9mIEJsb2IpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignUmVzcG9uc2UgaXMgbm90IGEgQmxvYi4nKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlcy5ib2R5OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAndGV4dCc6CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzJC5waXBlKG1hcCgoLyoqCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHJlcwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgKHJlcykgPT4gewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFZhbGlkYXRlIHRoYXQgdGhlIGJvZHkgaXMgYSBzdHJpbmcuCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlcy5ib2R5ICE9PSBudWxsICYmIHR5cGVvZiByZXMuYm9keSAhPT0gJ3N0cmluZycpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdSZXNwb25zZSBpcyBub3QgYSBzdHJpbmcuJyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXMuYm9keTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pKSk7CiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ2pzb24nOgogICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gTm8gdmFsaWRhdGlvbiBuZWVkZWQgZm9yIEpTT04gcmVzcG9uc2VzLCBhcyB0aGV5IGNhbiBiZSBvZiBhbnkgdHlwZS4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXMkLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcmVzCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAocmVzKSA9PiByZXMuYm9keSkpKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjYXNlICdyZXNwb25zZSc6CiAgICAgICAgICAgICAgICAgICAgLy8gVGhlIHJlc3BvbnNlIHN0cmVhbSB3YXMgcmVxdWVzdGVkIGRpcmVjdGx5LCBzbyByZXR1cm4gaXQuCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlcyQ7CiAgICAgICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICAgICAgIC8vIEd1YXJkIGFnYWluc3QgbmV3IGZ1dHVyZSBvYnNlcnZlIHR5cGVzIGJlaW5nIGFkZGVkLgogICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgVW5yZWFjaGFibGU6IHVuaGFuZGxlZCBvYnNlcnZlIHR5cGUgJHtvcHRpb25zLm9ic2VydmV9fWApOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENvbnN0cnVjdHMgYW4gb2JzZXJ2YWJsZSB0aGF0LCB3aGVuIHN1YnNjcmliZWQsIGNhdXNlcyB0aGUgY29uZmlndXJlZAogICAgICAgICAqIGBERUxFVEVgIHJlcXVlc3QgdG8gZXhlY3V0ZSBvbiB0aGUgc2VydmVyLiBTZWUgdGhlIGluZGl2aWR1YWwgb3ZlcmxvYWRzIGZvcgogICAgICAgICAqIGRldGFpbHMgb24gdGhlIHJldHVybiB0eXBlLgogICAgICAgICAqCiAgICAgICAgICogQHBhcmFtIHs/fSB1cmwgICAgIFRoZSBlbmRwb2ludCBVUkwuCiAgICAgICAgICogQHBhcmFtIHs/PX0gb3B0aW9ucyBUaGUgSFRUUCBvcHRpb25zIHRvIHNlbmQgd2l0aCB0aGUgcmVxdWVzdC4KICAgICAgICAgKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZGVsZXRlKHVybCwgb3B0aW9ucyA9IHt9KSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLnJlcXVlc3QoJ0RFTEVURScsIHVybCwgKC8qKiBAdHlwZSB7P30gKi8gKG9wdGlvbnMpKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENvbnN0cnVjdHMgYW4gb2JzZXJ2YWJsZSB0aGF0LCB3aGVuIHN1YnNjcmliZWQsIGNhdXNlcyB0aGUgY29uZmlndXJlZAogICAgICAgICAqIGBHRVRgIHJlcXVlc3QgdG8gZXhlY3V0ZSBvbiB0aGUgc2VydmVyLiBTZWUgdGhlIGluZGl2aWR1YWwgb3ZlcmxvYWRzIGZvcgogICAgICAgICAqIGRldGFpbHMgb24gdGhlIHJldHVybiB0eXBlLgogICAgICAgICAqIEBwYXJhbSB7P30gdXJsCiAgICAgICAgICogQHBhcmFtIHs/PX0gb3B0aW9ucwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0KHVybCwgb3B0aW9ucyA9IHt9KSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLnJlcXVlc3QoJ0dFVCcsIHVybCwgKC8qKiBAdHlwZSB7P30gKi8gKG9wdGlvbnMpKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENvbnN0cnVjdHMgYW4gb2JzZXJ2YWJsZSB0aGF0LCB3aGVuIHN1YnNjcmliZWQsIGNhdXNlcyB0aGUgY29uZmlndXJlZAogICAgICAgICAqIGBIRUFEYCByZXF1Z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KSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLnJlcXVlc3QoJ0pTT05QJywgdXJsLCB7CiAgICAgICAgICAgICAgICBwYXJhbXM6IG5ldyBIdHRwUGFyYW1zKCkuYXBwZW5kKGNhbGxiYWNrUGFyYW0sICdKU09OUF9DQUxMQkFDSycpLAogICAgICAgICAgICAgICAgb2JzZXJ2ZTogJ2JvZHknLAogICAgICAgICAgICAgICAgcmVzcG9uc2VUeXBlOiAnanNvbicsCiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDb25zdHJ1Y3RzIGFuIGBPYnNlcnZhYmxlYCB0aGF0LCB3aGVuIHN1YnNjcmliZWQsIGNhdXNlcyB0aGUgY29uZmlndXJlZAogICAgICAgICAqIGBPUFRJT05TYCByZXF1ZXN0IHRvIGV4ZWN1dGUgb24gdGhlIHNlcnZlci4gVGhpcyBtZXRob2QgYWxsb3dzIHRoZSBjbGllbnQKICAgICAgICAgKiB0byBkZXRlcm1pbmUgdGhlIHN1cHBvcnRlZCBIVFRQIG1ldGhvZHMgYW5kIG90aGVyIGNhcGFiaWxpdGVzIG9mIGFuIGVuZHBvaW50LAogICAgICAgICAqIHdpdGhvdXQgaW1wbHlpbmcgYSByZXNvdXJjZSBhY3Rpb24uIFNlZSB0aGUgaW5kaXZpZHVhbCBvdmVybG9hZHMgZm9yCiAgICAgICAgICogZGV0YWlscyBvbiB0aGUgcmV0dXJuIHR5cGUuCiAgICAgICAgICogQHBhcmFtIHs/fSB1cmwKICAgICAgICAgKiBAcGFyYW0gez89fSBvcHRpb25zCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvcHRpb25zKHVybCwgb3B0aW9ucyA9IHt9KSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLnJlcXVlc3QoJ09QVElPTlMnLCB1cmwsICgvKiogQHR5cGUgez99ICovIChvcHRpb25zKSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgIC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2tlbjogSHR0cENsaWVudCwgZmFjdG9yeTogSHR0cENsaWVudC7JtWZhYyB9KTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLwogICAgSHR0cENsaWVudC5jdG9yUGFyYW1ldGVycyA9ICgpID0+IFsKICAgICAgICB7IHR5cGU6IEh0dHBIYW5kbGVyIH0KICAgIF07CiAgICAvKioKICAgICAqIGBIdHRwSGFuZGxlcmAgd2hpY2ggYXBwbGllcyBhbiBgSHR0cEludGVyY2VwdG9yYCB0byBhbiBgSHR0cFJlcXVlc3RgLgogICAgICoKICAgICAqCiAgICAgKi8KICAgIGNsYXNzIEh0dHBJbnRlcmNlcHRvckhhbmRsZXIgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gbmV4dAogICAgICAgICAqIEBwYXJhbSB7P30gaW50ZXJjZXB0b3IKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihuZXh0LCBpbnRlcmNlcHRvcikgewogICAgICAgICAgICB0aGlzLm5leHQgPSBuZXh0OwogICAgICAgICAgICB0aGlzLmludGVyY2VwdG9yID0gaW50ZXJjZXB0b3I7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gcmVxCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBoYW5kbGUocmVxKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmludGVyY2VwdG9yLmludGVyY2VwdChyZXEsIHRoaXMubmV4dCk7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBBIG11bHRpLXByb3ZpZGVyIHRva2VuIHRoYXQgcmVwcmVzZW50cyB0aGUgYXJyYXkgb2YgcmVnaXN0ZXJlZAogICAgICogYEh0dHBJbnRlcmNlcHRvcmAgb2JqZWN0cy4KICAgICAqCiAgICAgKiBcQHB1YmxpY0FwaQogICAgICogQHR5cGUgez99CiAgICAgKi8KICAgIGNvbnN0IEhUVFBfSU5URVJDRVBUT1JTID0g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KICAgIC8qKgogICAgICogREkgdG9rZW4vYWJzdHJhY3QgdHlwZSByZXByZXNlbnRpbmcgYSBtYXAgb2YgSlNPTlAgY2FsbGJhY2tzLgogICAgICoKICAgICAqIEluIHRoZSBicm93c2VyLCB0aGlzIHNob3VsZCBhbHdheXMgYmUgdGhlIGB3aW5kb3dgIG9iamVjdC4KICAgICAqCiAgICAgKgogICAgICogQGFic3RyYWN0CiAgICAgKi8KICAgIGNsYXNzIEpzb25wQ2FsbGJhY2tDb250ZXh0IHsKICAgIH0KICAgIC8qKgogICAgICogUHJvY2Vzc2VzIGFuIGBIdHRwUmVxdWVzdGAgd2l0aCB0aGUgSlNPTlAgbWV0aG9kLAogICAgICogYnkgcGVyZm9ybWluZyBKU09OUCBzdHlsZSByZXF1ZXN0cy4KICAgICAqIEBzZWUgYEh0dHBIYW5kbGVyYAogICAgICogQHNlZSBgSHR0cFhockJhY2tlbmRgCiAgICAgKgogICAgICogXEBwdWJsaWNBcGkKICAgICAqLwogICAgY2xhc3MgSnNvbnBDbGllbnRCYWNrZW5kIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGNhbGxiYWNrTWFwCiAgICAgICAgICogQHBhcmFtIHs/fSBkb2N1bWVudAogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKGNhbGxiYWNrTWFwLCBkb2N1bWVudCkgewogICAgICAgICAgICB0aGlzLmNhbGxiYWNrTWFwID0gY2FsbGJhY2tNYXA7CiAgICAgICAgICAgIHRoaXMuZG9jdW1lbnQgPSBkb2N1bWVudDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogR2V0IHRoZSBuYW1lIG9mIHRoZSBuZXh0IGNhbGxiYWNrIG1ldGhvZCwgYnkgaW5jcmVtZW50aW5nIHRoZSBnbG9iYWwgYG5leHRSZXF1ZXN0SWRgLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZXh0Q2FsbGJhY2soKSB7CiAgICAgICAgICAgIHJldHVybiBgbmdfanNvbnBfY2FsbGJhY2tfJHtuZXh0UmVxdWVzdElkKyt9YDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUHJvY2Vzc2VzIGEgSlNPTlAgcmVxdWVzdCBhbmQgcmV0dXJucyBhbiBldmVudCBzdHJlYW0gb2YgdGhlIHJlc3VsdHMuCiAgICAgICAgICogQHBhcmFtIHs/fSByZXEgVGhlIHJlcXVlc3Qgb2JqZWN0LgogICAgICAgICAqIEByZXR1cm4gez99IEFuIG9ic2VydmFibGUgb2YgdGhlIHJlc3BvbnNlIGV2ZW50cy4KICAgICAgICAgKgogICAgICAgICAqLwogICAgICAgIGhhbmRsZShyZXEpIHsKICAgICAgICAgICAgLy8gRmlyc3RseSwgY2hlY2sgYm90aCB0aGUgbWV0aG9kIGFuZCByZXNwb25zZSB0eXBlLiBJZiBlaXRoZXIgZG9lc24ndCBtYXRjaAogICAgICAgICAgICAvLyB0aGVuIHRoZSByZXF1ZXN0IHdhcyBpbXByb3Blcmx5IHJvdXRlZCBoZXJlIGFuZCBjYW5ub3QgYmUgaGFuZGxlZC4KICAgICAgICAgICAgaWYgKHJlcS5tZXRob2QgIT09ICdKU09OUCcpIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihKU09OUF9FUlJfV1JPTkdfTUVUSE9EKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChyZXEucmVzcG9uc2VUeXBlICE9PSAnanNvbicpIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihKU09OUF9FUlJfV1JPTkdfUkVTUE9OU0VfVFlQRSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gRXZlcnl0aGluZyBlbHNlIGhhcHBlbnMgaW5zaWRlIHRoZSBPYnNlcnZhYmxlIGJvdW5kYXJ5LgogICAgICAgICAgICByZXR1cm4gbmV3IE9ic2VydmFibGUoKC8qKg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ICAgICAgICAgICAvLyBBIEpTT05QIHJlcXVlc3QgcmVxdWlyZXMgd2FpdGluZyBmb3IgbXVsdGlwbGUgY2FsbGJhY2tzLiBUaGVzZSB2YXJpYWJsZXMKICAgICAgICAgICAgICAgIC8vIGFyZSBjbG9zZWQgb3ZlciBhbmQgdHJhY2sgc3RhdGUgYWNyb3NzIHRob3NlIGNhbGxiYWNrcy4KICAgICAgICAgICAgICAgIC8vIFRoZSByZXNwb25zZSBvYmplY3QsIGlmIG9uZSBoYXMgYmVlbiByZWNlaXZlZCwgb3IgbnVsbCBvdGhlcndpc2UuCiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBsZXQgYm9keSA9IG51bGw7CiAgICAgICAgICAgICAgICAvLyBXaGV0aGVyIHRoZSByZXNwb25zZSBjYWxsYmFjayBoYXMgYmVlbiBjYWxsZWQuCiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBsZXQgZmluaXNoZWQgPSBmYWxzZTsKICAgICAgICAgICAgICAgIC8vIFdoZXRoZXIgdGhlIHJlcXVlc3QgaGFzIGJlZW4gY2FuY2VsbGVkIChhbmQgdGh1cyBhbnkgb3RoZXIgY2FsbGJhY2tzKQogICAgICAgICAgICAgICAgLy8gc2hvdWxkIGJlIGlnbm9yZWQuCiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBsZXQgY2FuY2VsbGVkID0gZmFsc2U7CiAgICAgICAgICAgICAgICAvLyBTZXQgdGhlIHJlc3BvbnNlIGNhbGxiYWNrIGluIHRoaXMuY2FsbGJhY2tNYXAgKHdoaWNoIHdpbGwgYmUgdGhlIHdpbmRvdwogICAgICAgICAgICAgICAgLy8gb2JqZWN0IGluIHRoZSBicm93c2VyLiBUaGUgc2NyaXB0IGJlaW5nIGxvYWRlZCB2aWEgdGhlIDxzY3JpcHQ+IHRhZyB3aWxsCiAgICAgICAgICAgICAgICAvLyBldmVudHVhbGx5IGNhbGwgdGhpcyBjYWxsYmFjay4KICAgICAgICAgICAgICAgIHRoaXMuY2FsbGJhY2tNYXBbY2FsbGJhY2tdID0gKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/PX0gZGF0YQogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKGRhdGEpID0+IHsKICAgICAgICAgICAgICAgICAgICAvLyBEYXRhIGhhcyBiZWVuIHJlY2VpdmVkIGZyb20gdGhlIEpTT05QIHNjcmlwdC4gRmlyc3RseSwgZGVsZXRlIHRoaXMgY2FsbGJhY2suCiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHRoaXMuY2FsbGJhY2tNYXBbY2FsbGJhY2tdOwogICAgICAgICAgICAgICAgICAgIC8vIE5leHQsIG1ha2Ugc3VyZSB0aGUgcmVxdWVzdCB3YXNuJ3QgY2FuY2VsbGVkIGluIHRoZSBtZWFudGltZS4KICAgICAgICAgICAgICAgICAgICBpZiAoY2FuY2VsbGVkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgLy8gU2V0IHN0YXRlIHRvIGluZGljYXRlIGRhdGEgd2FzIHJlY2VpdmVkLgogICAgICAgICAgICAgICAgICAgIGJvZHkgPSBkYXRhOwogICAgICAgICAgICAgICAgICAgIGZpbmlzaGVkID0gdHJ1ZTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgLy8gY2xlYW51cCgpIGlzIGEgdXRpbGl0eSBjbG9zdXJlIHRoYXQgcmVtb3ZlcyB0aGUgPHNjcmlwdD4gZnJvbSB0aGUgcGFnZSBhbmQKICAgICAgICAgICAgICAgIC8vIHRoZSByZXNwb25zZSBjYWxsYmFjayBmcm9tIHRoZSB3aW5kb3cuIFRoaXMgbG9naWMgaXMgdXNlZCBpbiBib3RoIHRoZQogICAgICAgICAgICAgICAgLy8gc3VjY2VzcywgZXJyb3IsIGFuZCBjYW5jZWxsYXRpb24gcGF0aHMsIHNvIGl0J3MgZXh0cmFjdGVkIG91dCBmb3IgY29udmVuaWVuY2UuCiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBjbGVhbnVwID0gKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgICAgIC8vIFJlbW92ZSB0aGUgPHNjcmlwdD4gdGFnIGlmIGl0J3Mgc3RpbGwgb24gdGhlIHBhZ2UuCiAgICAgICAgICAgICAgICAgICAgaWYgKG5vZGUucGFyZW50Tm9kZSkgewogICAgICAgICAgICAgICAgICAgICAgICBub2RlLnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQobm9kZSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIC8vIFJlbW92ZSB0aGUgcmVzcG9uc2UgY2FsbGJhY2sgZnJvbSB0aGUgY2FsbGJhY2tNYXAgKHdpbmRvdyBvYmplY3QgaW4gdGhlCiAgICAgICAgICAgICAgICAgICAgLy8gYnJvd3NlcikuCiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHRoaXMuY2FsbGJhY2tNYXBbY2FsbGJhY2tdOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICAvLyBvbkxvYWQoKSBpcyB0aGUgc3VjY2VzcyBjYWxsYmFjayB3aGljaCBydW5zIGFmdGVyIHRoZSByZXNwb25zZSBjYWxsYmFjawogICAgICAgICAgICAgICAgLy8gaWYgdGhlIEpTT05QIHNjcmlwdCBsb2FkcyBzdWNjZXNzZnVsbHkuIFRoZSBldmVudCBpdHNlbGYgaXMgdW5pbXBvcnRhbnQuCiAgICAgICAgICAgICAgICAvLyBJZiBzb21ldGhpbmcgd2VudCB3cm9uZywgb25Mb2FkKCkgbWF5IHJ1biB3aXRob3V0IHRoZSByZXNwb25zZSBjYWxsYmFjawogICAgICAgICAgICAgICAgLy8gaGF2aW5nIGJlZW4gaW52b2tlZC4KICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IG9uTG9hZCA9ICgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChldmVudCkgPT4gewogICAgICAgICAgICAgICAgICAgIC8vIERvIG5vdGhpbmcgaWYgdGhlIHJlcXVlc3QgaGFzIGJlZW4gY2FuY2VsbGVkLgogICAgICAgICAgICAgICAgICAgIGlmIChjYW5jZWxsZWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAvLyBDbGVhbnVwIHRoZSBwYWdlLgogICAgICAgICAgICAgICAgICAgIGNsZWFudXAoKTsKICAgICAgICAgICAgICAgICAgICAvLyBDaGVjayB3aGV0aGVyIHRoZSByZXNwb25zZSBjYWxsYmFjayBoYXMgcnVuLgogICAgICAgICAgICAgICAgICAgIGlmICghZmluaXNoZWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gSXQgaGFzbid0LCBzb21ldGhpbmcgd2VudCB3cm9uZyB3aXRoIHRoZSByZXF1ZXN0LiBSZXR1cm4gYW4gZXJyb3IgdmlhCiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHRoZSBPYnNlcnZhYmxlIGVycm9yIHBhdGguIEFsbCBKU09OUCBlcnJvcnMgaGF2ZSBzdGF0dXMgMC4KICAgICAgICAgICAgICAgICAgICAgICAgb2JzZXJ2ZXIuZXJyb3IobmV3IEh0dHBFcnJvclJlc3BvbnNlKHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXR1czogMCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXR1c1RleHQ6ICdKU09OUCBFcnJvcicsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlcnJvcjogbmV3IEVycm9yKEpTT05QX0VSUl9OT19DQUxMQkFDSyksCiAgICAgICAgICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAvLyBTdWNjZXNzLiBib2R5IGVpdGhlciBjb250YWlucyB0aGUgcmVzcG9uc2UgYm9keSBvciBudWxsIGlmIG5vbmUgd2FzCiAgICAgICAgICAgICAgICAgICAgLy8gcmV0dXJuZWQuCiAgICAgICAgICAgICAgICAgICAgb2JzZXJ2ZXIubmV4dChuZXcgSHR0cFJlc3BvbnNlKHsKICAgICAgICAgICAgICAgICAgICAgICAgYm9keSwKICAgICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOiAyMDAsCiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXR1c1RleHQ6ICdPSycsCiAgICAgICAgICAgICAgICAgICAgICAgIHVybCwKICAgICAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICAgICAgLy8gQ29tcGxldGUgdGhlIHN0cmVhbSwgdGhlIHJlc3BvbnNlIGlzIG92ZXIuCiAgICAgICAgICAgICAgICAgICAgb2JzZXJ2ZXIuY29tcGxldGUoKTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgLy8gb25FcnJvcigpIGlzIHRoZSBlcnJvciBjYWxsYmFjaywgd2hpY2ggcnVucyBpZiB0aGUgc2NyaXB0IHJldHVybmVkIGdlbmVyYXRlcwogICAgICAgICAgICAgICAgLy8gYSBKYXZhc2NyaXB0IGVycm9yLiBJdCBlbWl0cyB0aGUgZXJyb3IgdmlhIHRoZSBPYnNlcnZhYmxlIGVycm9yIGNoYW5uZWwgYXMKICAgICAgICAgICAgICAgIC8vIGEgSHR0cEVycm9yUmVzcG9uc2UuCiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBvbkVycm9yID0gKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBlcnJvcgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKGVycm9yKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgLy8gSWYgdGhlIHJlcXVlc3Qgd2FzIGFscmVhZHkgY2FuY2VsbGVkLCBubyBuZWVkIHRvIGVtaXQgYW55dGhpbmcuCiAgICAgICAgICAgICAgICAgICAgaWYgKGNhbmNlbGxlZCkgewogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGNsZWFudXAoKTsKICAgICAgICAgICAgICAgICAgICAvLyBXcmFwIHRoZSBlcnJvciBpbiBhIEh0dHBFcnJvclJlc3BvbnNlLgogICAgICAgICAgICAgICAgICAgIG9ic2VydmVyLmVycm9yKG5ldyBIdHRwRXJyb3JSZXNwb25zZSh7CiAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yLAogICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXM6IDAsCiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXR1c1RleHQ6ICdKU09OUCBFcnJvcicsCiAgICAgICAgICAgICAgICAgICAgICAgIHVybCwKICAgICAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIC8vIFN1YnNjcmliZSB0byBib3RoIHRoZSBzdWNjZXNzIChsb2FkKSBhbmQgZXJyb3IgZXZlbnRzIG9uIHRoZSA8c2NyaXB0PiB0YWcsCiAgICAgICAgICAgICAgICAvLyBhbmQgYWRkIGl0IHRvIHRoZSBwYWdlLgogICAgICAgICAgICAgICAgbm9kZS5hZGRFdmVudExpc3RlbmVyKCdsb2FkJywgb25Mb2FkKTsKICAgICAgICAgICAgICAgIG5vZGUuYWRkRXZlbnRMaXN0ZW5lcignZXJyb3InLCBvbkVycm9yKTsKICAgICAgICAgICAgICAgIHRoaXMuZG9jdW1lbnQuYm9keS5hcHBlbmRDaGlsZChub2RlKTsKICAgICAgICAgICAgICAgIC8vIFRoZSByZXF1ZXN0IGhhcyBub3cgYmVlbiBzdWNjZXNzZnVsbHkgc2VudC4KICAgICAgICAgICAgICAgIG9ic2VydmVyLm5leHQoeyB0eXBlOiBIdHRwRXZlbnRUeXBlLlNlbnQgfSk7CiAgICAgICAgICAgICAgICAvLyBDYW5jZWxsYXRpb24gaGFuZGxlci4KICAgICAgICAgICAgICAgIHJldHVybiAoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgLy8gVHJhY2sgdGhlIGNhbmNlbGxhdGlvbiBzbyBldmVudCBsaXN0ZW5lcnMgd29uJ3QgZG8gYW55dGhpbmcgZXZlbiBpZiBhbHJlYWR5IHNjaGVkdWxlZC4KICAgICAgICAgICAgICAgICAgICBjYW5jZWxsZWQgPSB0cnVlOwogICAgICAgICAgICAgICAgICAgIC8vIFJlbW92ZSB0aGUgZXZlbnQgbGlzdGVuZXJzIHNvIHRoZXkgd29uJ3QgcnVuIGlmIHRoZSBldmVudHMgbGF0ZXIgZmlyZS4KICAgICAgICAgICAgICAgICAgICBub2RlLnJlbW92ZUV2ZW50TGlzdGVuZXIoJ2xvYWQnLCBvbkxvYWQpOwogICAgICAgICAgICAgICAgICAgIG5vZGUucmVtb3ZlRXZlbnRMaXN0ZW5lcignZXJyb3InLCBvbkVycm9yKTsKICAgICAgICAgICAgICAgICAgICAvLyBBbmQgZmluYWxseSwgY2xlYW4gdXAgdGhlIHBhZ2UuCiAgICAgICAgICAgICAgICAgICAgY2xlYW51cCgpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICB9CiAgICBKc29ucENsaWVudEJhY2tlbmQuybVmYWMgPSBmdW5jdGlvbiBKc29ucENsaWVudEJhY2tlbmRfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgSnNvbnBDbGllbnRCYWNrZW5kKSjJtcm1aW5qZWN0KEpzb25wQ2FsbGJhY2tDb250ZXh0KSwgybXJtWluamVjdChET0NVTUVOVCQxKSk7IH07CiAgICBKc29ucENsaWVudEJhY2tlbmQuybVwcm92ID0gybXJtWRlZmluZUluamVjdGFibGUoeyB0b2tlbjogSnNvbnBDbGllbnRCYWNrZW5kLCBmYWN0b3J5OiBKc29ucENsaWVudEJhY2tlbmQuybVmYWMgfSk7CiAgICAvKiogQG5vY29sbGFwc2UgKi8KICAgIEpzb25wQ2xpZW50QmFja2VuZC5jdG9yUGFyYW1ldGVycyA9ICgpID0+IFsKICAgICAgICB7IHR5cGU6IEpzb25wQ2FsbGJhY2tDb250ZXh0IH0sCiAgICAgICAgeyB0eXBlOiB1bmRlZmluZWQsIGRlY29yYXRvcnM6IFt7IHR5cGU6IEluamVjdCwgYXJnczogW0RPQ1VNRU5UJDEsXSB9XSB9CiAgICBdOwogICAgLyoqCiAgICAgKiBJZGVudGlmaWVzIHJlcXVlc3RzIHdpdGggdGhlIG1ldGhvZCBKU09OUCBhbmQKICAgICAqIHNoaWZ0cyB0aGVtIHRvIHRoZSBgSnNvbnBDbGllbnRCYWNrZW5kYC4KICAgICAqCiAgICAgKiBAc2VlIGBIdHRwSW50ZXJjZXB0b3JgCiAgICAgKgogICAgICogXEBwdWJsaWNBcGkKICAgICAqLwogICAgY2xhc3MgSnNvbnBJbnRlcmNlcHRvciB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBqc29ucAogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKGpzb25wKSB7CiAgICAgICAgICAgIHRoaXMuanNvbnAgPSBqc29ucDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogSWRlbnRpZmllcyBhbmQgaGFuZGxlcyBhIGdpdmVuIEpTT05QIHJlcXVlc3QuCiAgICAgICAgICogQHBhcmFtIHs/fSByZXEgVGhlIG91dGdvaW5nIHJlcXVlc3Qgb2JqZWN0IHRvIGhhbmRsZS4KICAgICAgICAgKiBAcGFyYW0gez99IG5leHQgVGhlIG5leHQgaW50ZXJjZXB0b3IgaW4gdGhlIGNoYWluLCBvciB0aGUgYmFja2VuZAogICAgICAgICAqIGlmIG5vIGludGVyY2VwdG9ycyByZW1haW4gaW4gdGhlIGNoYWluLgogICAgICAgICAqIEByZXR1cm4gez99IEFuIG9ic2VydmFibGUgb2YgdGhlIGV2ZW50IHN0cmVhbS4KICAgICAgICAgKi8KICAgICAgICBpbnRlcmNlcHQocmVxLCBuZXh0KSB7CiAgICAgICAgICAgIGlmIChyZXEubWV0aG9kID09PSAnSlNPTlAnKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5qc29ucC5oYW5kbGUoKC8qKiBAdHlwZSB7P30gKi8gKHJlcSkpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBGYWxsIHRocm91Z2ggZm9yIG5vcm1hbCBIVFRQIHJlcXVlc3RzLgogICAgICAgICAgICByZXR1cm4gbmV4dC5oYW5kbGUocmVxKTsKICAgICAgICB9CiAgICB9CiAgICBKc29ucEludGVyY2VwdG9yLsm1ZmFjID0gZnVuY3Rpb24gSnNvbnBJbnRlcmNlcHRvcl9GYWN0b3J5KHQpIHsgcmV0dXJuIG5ldyAodCB8fCBKc29ucEludGVyY2VwdG9yKSjJtcm1aW5qZWN0KEpzb25wQ2xpZW50QmFja2VuZCkpOyB9OwogICAgSnNvbnBJbnRlcmNlcHRvci7JtXByb3YgPSDJtcm1ZGVmaW5lSW5qZWN0YWJsZSh7IHRva2VuOiBK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2xpZW50TW9kdWxlIGluc3RhbGxlZC5gKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBFdmVyeXRoaW5nIGhhcHBlbnMgb24gT2JzZXJ2YWJsZSBzdWJzY3JpcHRpb24uCiAgICAgICAgICAgIHJldHVybiBuZXcgT2JzZXJ2YWJsZSgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gb2JzZXJ2ZXIKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChvYnNlcnZlcikgPT4gewogICAgICAgICAgICAgICAgLy8gU3RhcnQgYnkgc2V0dGluZyB1cCB0aGUgWEhSIG9iamVjdCB3aXRoIHJlcXVlc3QgbWV0aG9kLCBVUkwsIGFuZCB3aXRoQ3JlZGVudGlhbHMgZmxhZy4KICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHhociA9IHRoaXMueGhyRmFjdG9yeS5idWlsZCgpOwogICAgICAgICAgICAgICAgeGhyLm9wZW4ocmVxLm1ldGhvZCwgcmVxLnVybFdpdGhQYXJhbXMpOwogICAgICAgICAgICAgICAgaWYgKCEhcmVxLndpdGhDcmVkZW50aWFscykgewogICAgICAgICAgICAgICAgICAgIHhoci53aXRoQ3JlZGVudGlhbHMgPSB0cnVlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLy8gQWRkIGFsbCB0aGUgcmVxdWVzdGVkIGhlYWRlcnMuCiAgICAgICAgICAgICAgICByZXEuaGVhZGVycy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbmFtZQogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZXMKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChuYW1lLCB2YWx1ZXMpID0+IHhoci5zZXRSZXF1ZXN0SGVhZGVyKG5hbWUsIHZhbHVlcy5qb2luKCcsJykpKSk7CiAgICAgICAgICAgICAgICAvLyBBZGQgYW4gQWNjZXB0IGhlYWRlciBpZiBvbmUgaXNuJ3QgcHJlc2VudCBhbHJlYWR5LgogICAgICAgICAgICAgICAgaWYgKCFyZXEuaGVhZGVycy5oYXMoJ0FjY2VwdCcpKSB7CiAgICAgICAgICAgICAgICAgICAgeGhyLnNldFJlcXVlc3RIZWFkZXIoJ0FjY2VwdCcsICdhcHBsaWNhdGlvbi9qc29uLCB0ZXh0L3BsYWluLCAqLyonKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vIEF1dG8tZGV0ZWN0IHRoZSBDb250ZW50LVR5cGUgaGVhZGVyIGlmIG9uZSBpc24ndCBwcmVzZW50IGFscmVhZHkuCiAgICAgICAgICAgICAgICBpZiAoIXJlcS5oZWFkZXJzLmhhcygnQ29udGVudC1UeXBlJykpIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgZGV0ZWN0ZWRUeXBlID0gcmVxLmRldGVjdENvbnRlbnRUeXBlSGVhZGVyKCk7CiAgICAgICAgICAgICAgICAgICAgLy8gU29tZXRpbWVzIENvbnRlbnQtVHlwZSBkZXRlY3Rpb24gZmFpbHMuCiAgICAgICAgICAgICAgICAgICAgaWYgKGRldGVjdGVkVHlwZSAhPT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgICAgICB4aHIuc2V0UmVxdWVzdEhlYWRlcignQ29udGVudC1UeXBlJywgZGV0ZWN0ZWRUeXBlKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvLyBTZXQgdGhlIHJlc3BvbnNlVHlwZSBpZiBvbmUgd2FzIHJlcXVlc3RlZC4KICAgICAgICAgICAgICAgIGlmIChyZXEucmVzcG9uc2VUeXBlKSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHJlc3BvbnNlVHlwZSA9IHJlcS5yZXNwb25zZVR5cGUudG9Mb3dlckNhc2UoKTsKICAgICAgICAgICAgICAgICAgICAvLyBKU09OIHJlc3BvbnNlcyBuZWVkIHRvIGJlIHByb2Nlc3NlZCBhcyB0ZXh0LiBUaGlzIGlzIGJlY2F1c2UgaWYgdGhlIHNlcnZlcgogICAgICAgICAgICAgICAgICAgIC8vIHJldHVybnMgYW4gWFNTSS1wcmVmaXhlZCBKU09OIHJlc3BvbnNlLCB0aGUgYnJvd3NlciB3aWxsIGZhaWwgdG8gcGFyc2UgaXQsCiAgICAgICAgICAgICAgICAgICAgLy8geGhyLnJlc3BvbnNlIHdpbGwgYmUgbnVsbCwgYW5kIHhoci5yZXNwb25zZVRleHQgY2Fubm90IGJlIGFjY2Vzc2VkIHRvCiAgICAgICAgICAgICAgICAgICAgLy8gcmV0cmlldmUgdGhlIHByZWZpeGVkIEpTT04gZGF0YSBpbiBvcmRlciB0byBzdHJpcCB0aGUgcHJlZml4LiBUaHVzLCBhbGwgSlNPTgogICAgICAgICAgICAgICAgICAgIC8vIGlzIHBhcnNlZCBieSBmaXJzdCByZXF1ZXN0aW5nIHRleHQgYW5kIHRoZW4gYXBwbHlpbmcgSlNPTi5wYXJzZS4KICAgICAgICAgICAgICAgICAgICB4aHIucmVzcG9uc2VUeXBlID0gKC8qKiBAdHlwZSB7P30gKi8gKCgocmVzcG9uc2VUeXBlICE9PSAnanNvbicpID8gcmVzcG9uc2VUeXBlIDogJ3RleHQnKSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLy8gU2VyaWFsaXplIHRoZSByZXF1ZXN0IGJvZHkgaWYgb25lIGlzIHByZXNlbnQuIElmIG5vdCwgdGhpcyB3aWxsIGJlIHNldCB0byBudWxsLgogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3Qgc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b21YaHIgPSAoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgaWYgKGhlYWRlclJlc3BvbnNlICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBoZWFkZXJSZXNwb25zZTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgLy8gUmVhZCBzdGF0dXMgYW5kIG5vcm1hbGl6ZSBhbiBJRTkgYnVnIChodHRwOi8vYnVncy5qcXVlcnkuY29tL3RpY2tldC8xNDUwKS4KICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3RhdHVzID0geGhyLnN0YXR1cyA9PT0gMTIyMyA/IDIwNCA6IHhoci5zdGF0dXM7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHN0YXR1c1RleHQgPSB4aHIuc3RhdHVzVGV4dCB8fCAnT0snOwogICAgICAgICAgICAgICAgICAgIC8vIFBhcnNlIGhlYWRlcnMgZnJvbSBYTUxIdHRwUmVxdWVzdCAtIHRoaXMgc3RlcCBpcyBsYXp5LgogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBoZWFkZXJzID0gbmV3IEh0dHBIZWFkZXJzKHhoci5nZXRBbGxSZXNwb25zZUhlYWRlcnMoKSk7CiAgICAgICAgICAgICAgICAgICAgLy8gUmVhZCB0aGUgcmVzcG9uc2UgVVJMIGZyb20gdGhlIFhNTEh0dHBSZXNwb25zZSBpbnN0YW5jZSBhbmQgZmFsbCBiYWNrIG9uIHRoZQogICAgICAgICAgICAgICAgICAgIC8vIHJlcXVlc3QgVVJMLgogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCB1cmwgPSBnZXRSZXNwb25zZVVybCh4aHIpIHx8IHJlcS51cmw7CiAgICAgICAgICAgICAgICAgICAgLy8gQ29uc3RydWN0IHRoZSBIdHRwSGVhZGVyUmVzcG9uc2UgYW5kIG1lbW9pemUgaXQuCiAgICAgICAgICAgICAgICAgICAgaGVhZGVyUmVzcG9uc2UgPSBuZXcgSHR0cEhlYWRlclJlc3BvbnNlKHsgaGVhZGVycywgc3RhdHVzLCBzdGF0dXNUZXh0LCB1cmwgfSk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGhlYWRlclJlc3BvbnNlOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICAvLyBOZXh0LCBhIGZldyBjbG9zdXJlcyBhcmUgZGVmaW5lZCBmb3IgdGhlIHZhcmlvdXMgZXZlbnRzIHdoaWNoIFhNTEh0dHBSZXF1ZXN0IGNhbgogICAgICAgICAgICAgICAgLy8gZW1pdC4gVGhpcyBhbGxvd3MgdGhlbSB0byBiZSB1bnJlZ2lzdGVyZWQgYXMgZXZlbnQgbGlzdGVuZXJzIGxhdGVyLgogICAgICAgICAgICAgICAgLy8gRmlyc3QgdXAgaXMgdGhlIGxvYWQgZXZlbnQsIHdoaWNoIHJlcHJlc2VudHMgYSByZXNwb25zZSBiZWluZyBmdWxseSBhdmFpbGFibGUuCiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBvbkxvYWQgPSAoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgLy8gUmVhZCByZXNwb25zZSBzdGF0ZSBmcm9tIHRoZSBtZW1vaXplZCBwYXJ0aWFsIGRhdGEuCiAgICAgICAgICAgICAgICAgICAgbGV0IHsgaGVhZGVycywgc3RhdHVzLCBzdGF0dXNUZXh0LCB1cmwgfSA9IHBhcnRpYWxGcm9tWGhyKCk7CiAgICAgICAgICAgICAgICAgICAgLy8gVGhlIGJvZHkgd2lsbCBiZSByZWFkIG91dCBpZiBwcmVzZW50LgogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBsZXQgYm9keSA9IG51bGw7CiAgICAgICAgICAgICAgICAgICAgaWYgKHN0YXR1cyAhPT0gMjA0KSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFVzZSBYTUxIdHRwUmVxdWVzdC5yZXNwb25zZSBpZiBzZXQsIHJlc3BvbnNlVGV4dCBvdGhlcndpc2UuCiAgICAgICAgICAgICAgICAgICAgICAgIGJvZHkgPSAodHlwZW9mIHhoci5yZXNwb25zZSA9PT0gJ3VuZGVmaW5lZCcpID8geGhyLnJlc3BvbnNlVGV4dCA6IHhoci5yZXNwb25zZTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgLy8gTm9ybWFsaXplIGFub3RoZXIgcG90ZW50aWFsIGJ1ZyAodGhpcyBvbmUgY29tZXMgZnJvbSBDT1JTKS4KICAgICAgICAgICAgICAgICAgICBpZiAoc3RhdHVzID09PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXR1cyA9ICEhYm9keSA/IDIwMCA6IDA7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIC8vIG9rIGRldGVybWluZXMgd2hldGhlciB0aGUgcmVzcG9uc2Ugd2lsbCBiZSB0cmFuc21pdHRlZCBvbiB0aGUgZXZlbnQgb3IKICAgICAgICAgICAgICAgICAgICAvLyBlcnJvciBjaGFubmVsLiBVbnN1Y2Nlc3NmdWwgc3RhdHVzIGNvZGVzIChub3QgMnh4KSB3aWxsIGFsd2F5cyBiZSBlcnJvcnMsCiAgICAgICAgICAgICAgICAgICAgLy8gYnV0IGEgc3VjY2Vzc2Z1bCBzdGF0dXMgY29kZSBjYW4gc3RpbGwgcmVzdWx0IGluIGFuIGVycm9yIGlmIHRoZSB1c2VyCiAgICAgICAgICAgICAgICAgICAgLy8gYXNrZWQgZm9yIEpTT04gZGF0YSBhbmQgdGhlIGJvZHkgY2Fubm90IGJlIHBhcnNlZCBhcyBzdWNoLgogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBsZXQgb2sgPSBzdGF0dXMgPj0gMjAwICYmIHN0YXR1cyA8IDMwMDsKICAgICAgICAgICAgICAgICAgICAvLyBDaGVjayB3aGV0aGVyIHRoZSBib2R5IG5lZWRzIHRvIGJlIHBhcnNlZCBhcyBKU09OIChpbiBtYW55IGNhc2VzIHRoZSBicm93c2VyCiAgICAgICAgICAgICAgICAgICAgLy8gd2lsbCBoYXZlIGRvbmUgdGhhdCBhbHJlYWR5KS4KICAgICAgICAgICAgICAgICAgICBpZiAocmVxLnJlc3BvbnNlVHlwZSA9PT0gJ2pzb24nICYmIHR5cGVvZiBib2R5ID09PSAnc3RyaW5nJykgewogICAgICAgICAgICAgICAgICAgICAgICAvLyBTYXZlIHRoZSBvcmlnaW5hbCBib2R5LCBiZWZvcmUgYXR0ZW1wdGluZyBYU1NJIHByZWZpeCBzdHJpcHBpbmcuCiAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgb3JpZ2luYWxCb2R5ID0gYm9keTsKICAgICAgICAgICAgICAgICAgICAgICAgYm9keSA9IGJvZHkucmVwbGFjZShYU1NJX1BSRUZJWCwgJycpOwogICAgICAgICAgICAgICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQXR0ZW1wdCB0aGUgcGFyc2UuIElmIGl0IGZhaWxzLCBhIHBhcnNlIGVycm9yIHNob3VsZCBiZSBkZWxpdmVyZWQgdG8gdGhlIHVzZXIuCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib2R5ID0gYm9keSAhPT0gJycgPyBKU09OLnBhcnNlKGJvZHkpIDogbnVsbDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBjYXRjaCAoZXJyb3IpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFNpbmNlIHRoZSBKU09OLnBhcnNlIGZhaWxlZCwgaXQncyByZWFzb25hYmxlIHRvIGFzc3VtZSB0aGlzIG1pZ2h0IG5vdCBoYXZlIGJlZW4gYQogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gSlNPTiByZXNwb25zZS4gUmVzdG9yZSB0aGUgb3JpZ2luYWwgYm9keSAoaW5jbHVkaW5nIGFueSBYU1NJIHByZWZpeCkgdG8gZGVsaXZlcgogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gYSBiZXR0ZXIgZXJyb3IgcmVzcG9uc2UuCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib2R5ID0gb3JpZ2luYWxCb2R5OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gSWYgdGhpcyB3YXMgYW4gZXJyb3IgcmVxdWVzdCB0byBiZWdpbiB3aXRoLCBsZWF2ZSBpdCBhcyBhIHN0cmluZywgaXQgcHJvYmFibHkKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGp1c3QgaXNuJ3QgSlNPTi4gT3RoZXJ3aXNlLCBkZWxpdmVyIHRoZSBwYXJzaW5nIGVycm9yIHRvIHRoZSB1c2VyLgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG9rKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gRXZlbiB0aG91Z2ggdGhlIHJlc3BvbnNlIHN0YXR1cyB3YXMgMnh4LCB0aGlzIGlzIHN0aWxsIGFuIGVycm9yLgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9rID0gZmFsc2U7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gVGhlIHBhcnNlIGVycm9yIGNvbnRhaW5zIHRoZSB0ZXh0IG9mIHRoZSBib2R5IHRoYXQgZmFpbGVkIHRvIHBhcnNlLgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvZHkgPSAoLyoqIEB0eXBlIHs/fSAqLyAoeyBlcnJvciwgdGV4dDogYm9keSB9KSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgaWYgKG9rKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIEEgc3VjY2Vzc2Z1bCByZXNwb25zZSBpcyBkZWxpdmVyZWQgb24gdGhlIGV2ZW50IHN0cmVhbS4KICAgICAgICAgICAgICAgICAgICAgICAgb2JzZXJ2ZXIubmV4dChuZXcgSHR0cFJlc3BvbnNlKHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvZHksCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdHVzLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdHVzVGV4dCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogdXJsIHx8IHVuZGVmaW5lZCwKICAgICAgICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgICAgICAgICAvLyBUaGUgZnVsbCBib2R5IGhhcyBiZWVuIHJlY2VpdmVkIGFuZCBkZWxpdmVyZWQsIG5vIGZ1cnRoZXIgZXZlbnRzCiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGFyZSBwb3NzaWJsZS4gVGhpcyByZXF1ZXN0IGlzIGNvbXBsZXRlLgogICAgICAgICAgICAgICAgICAgICAgICBvYnNlcnZlci5jb21wbGV0ZSgpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gQW4gdW5zdWNjZXNzZnVsIHJlcXVlc3QgaXMgZGVsaXZlcmVkIG9uIHRoZSBlcnJvciBjaGFubmVsLgogICAgICAgICAgICAgICAgICAgICAgICBvYnNlcnZlci5lcnJvcihuZXcgSHR0cEVycm9yUmVzcG9uc2UoewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gVGhlIGVycm9yIGluIHRoaXMgY2FzZSBpcyB0aGUgcmVzcG9uc2UgYm9keSAoZXJyb3IgZnJvbSB0aGUgc2VydmVyKS4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yOiBib2R5LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVycywKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXR1cywKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXR1c1RleHQsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6IHVybCB8fCB1bmRlZmluZWQsCiAgICAgICAgICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIC8vIFRoZSBvbkVycm9yIGNhbGxiYWNrIGlzIGNhbGxlZCB3aGVuIHNvbWV0aGluZyBnb2VzIHdyb25nIGF0IHRoZSBuZXR3b3JrIGxldmVsLgogICAgICAgICAgICAgICAgLy8gQ29ubmVjdGlvbiB0aW1lb3V0LCBETlMgZXJyb3IsIG9mZmxpbmUsIGV0Yy4gVGhlc2UgYXJlIGFjdHVhbCBlcnJvcnMsIGFuZCBhcmUKICAgICAgICAgICAgICAgIC8vIHRyYW5zbWl0dGVkIG9uIHRoZSBlcnJvciBjaGFubmVsLgogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3Qgb25FcnJvciA9ICgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZXJyb3IKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChlcnJvcikgPT4gewogICAgICAgICAgICAgICAgICAgIGNvbnN0IHsgdXJsIH0gPSBwYXJ0aWFsRnJvbVhocigpOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCByZXMgPSBuZXcgSHR0cEVycm9yUmVzcG9uc2UoewogICAgICAgICAgICAgICAgICAgICAgICBlcnJvciwKICAgICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOiB4aHIuc3RhdHVzIHx8IDAsCiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXR1c1RleHQ6IHhoci5zdGF0dXNUZXh0IHx8ICdVbmtub3duIEVycm9yJywKICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiB1cmwgfHwgdW5kZWZpbmVkLAogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgIG9ic2VydmVyLmVycm9yKHJlcyk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIC8vIFRoZSBzZW50SGVhZGVycyBmbGFnIHRyYWNrcyB3aGV0aGVyIHRoZSBIdHRwUmVzcG9uc2VIZWFkZXJzIGV2ZW50CiAgICAgICAgICAgICAgICAvLyBoYXMgYmVlbiBzZW50IG9uIHRoZSBzdHJlYW0uIFRoaXMgaXMgbmVjZXNzYXJ5IHRvIHRyYWNrIGlmIHByb2dyZXNzCiAgICAgICAgICAgICAgICAvLyBpcyBlbmFibGVkIHNpbmNlIHRoZSBldmVudCB3aWxsIGJlIHNlbnQgb24gb25seSB0aGUgZmlyc3QgZG93bmxvYWQKICAgICAgICAgICAgICAgIC8vIHByb2dlcnNzIGV2ZW50LgogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IHNlbnRIZWFkZXJzID0gZmFsc2U7CiAgICAgICAgICAgICAgICAvLyBUaGUgZG93bmxvYWQgcHJvZ3Jlc3MgZXZlbnQgaGFuZGxlciwgd2hpY2ggaXMgb25seSByZWdpc3RlcmVkIGlmCiAgICAgICAgICAgICAgICAvLyBwcm9ncmVzcyBldmVudHMgYXJlIGVuYWJsZWQuCiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBvbkRvd25Qcm9ncmVzcyA9ICgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChldmVudCkgPT4gewogICAgICAgICAgICAgICAgICAgIC8vIFNlbmQgdGhlIEh0dHBSZXNwb25zZUhlYWRlcnMgZXZlbnQgaWYgaXQgaGFzbid0IGJlZW4gc2VudCBhbHJlYWR5LgogICAgICAgICAgICAgICAgICAgIGlmICghc2VudEhlYWRlcnMpIHsKICAgICAgICAgICAgICAgICAgICAgICAgb2JzZXJ2ZXIubmV4dChwYXJ0aWFsRnJvbVhocigpKTsKICAgICAgICAgICAgICAgICAgICAgICAgc2VudEhlYWRlcnMgPSB0cnVlOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAvLyBTdGFydCBidWlsZGluZyB0aGUgZG93bmxvYWQgcHJvZ3Jlc3MgZXZlbnQgdG8gZGVsaXZlciBvbiB0aGUgcmVzcG9uc2UKICAgICAgICAgICAgICAgICAgICAvLyBldmVudCBzdHJlYW0uCiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGxldCBwcm9ncmVzc0V2ZW50ID0gewogICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBIdHRwRXZlbnRUeXBlLkRvd25sb2FkUHJvZ3Jlc3MsCiAgICAgICAgICAgICAgICAgICAgICAgIGxvYWRlZDogZXZlbnQubG9hZGVkLAogICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICAgICAgLy8gU2V0IHRoZSB0b3RhbCBudW1iZXIgb2YgYnl0ZXMgaW4gdGhlIGV2ZW50IGlmIGl0J3MgYXZhaWxhYmxlLgogICAgICAgICAgICAgICAgICAgIGlmIChldmVudC5sZW5ndGhDb21wdXRhYmxlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHByb2dyZXNzRXZlbnQudG90YWwgPSBldmVudC50b3RhbDsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgLy8gSWYgdGhlIHJlcXVlc3Qgd2FzIGZvciB0ZXh0IGNvbnRlbnQgYW5kIGEgcGFydGlhbCByZXNwb25zZSBpcwogICAgICAgICAgICAgICAgICAgIC8vIGF2YWlsYWJsZSBvbiBYTUxIdHRwUmVxdWVzdCwgaW5jbHVkZSBpdCBpbiB0aGUgcHJvZ3Jlc3MgZXZlbnQKICAgICAgICAgICAgICAgICAgICAvLyB0byBhbGxvdyBmb3Igc3RyZWFtaW5nIHJlYWRzLgogICAgICAgICAgICAgICAgICAgIGlmIChyZXEucmVzcG9uc2VUeXBlID09PSAndGV4dCcgJiYgISF4aHIucmVzcG9uc2VUZXh0KSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHByb2dyZXNzRXZlbnQucGFydGlhbFRleHQgPSB4aHIucmVzcG9uc2VUZXh0OwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAvLyBGaW5hbGx5LCBmaXJlIHRoZSBldmVudC4KICAgICAgICAgICAgICAgICAgICBvYnNlcnZlci5uZXh0KHByb2dyZXNzRXZlbnQpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICAvLyBUaGUgdXBsb2FkIHByb2dyZXNzIGV2ZW50IGhhbmRsZXIsIHdoaWNoIGlzIG9ubHkgcmVnaXN0ZXJlZCBpZgogICAgICAgICAgICAgICAgLy8gcHJvZ3Jlc3MgZXZlbnRzIGFyZSBlbmFibGVkLgogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3Qgb25VcFByb2dyZXNzID0gKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBldmVudAogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKGV2ZW50KSA9PiB7CiAgICAgICAgICAgICAgICAgICAgLy8gVXBsb2FkIHByb2dyZXNzIGV2ZW50cyBhcmUgc2ltcGxlci4gQmVnaW4gYnVpbGRpbmcgdGhlIHByb2dyZXNzCiAgICAgICAgICAgICAgICAgICAgLy8gZXZlbnQuCiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGxldCBwcm9ncmVzcyA9IHsKICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogSHR0cEV2ZW50VHlwZS5VcGxvYWRQcm9ncmVzcywKICAgICAgICAgICAgICAgICAgICAgICAgbG9hZGVkOiBldmVudC5sb2FkZWQsCiAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgICAgICAvLyBJZiB0aGUgdG90YWwgbnVtYmVyIG9mIGJ5dGVzIGJlaW5nIHVwbG9hZGVkIGlzIGF2YWlsYWJsZSwgaW5jbHVkZQogICAgICAgICAgICAgICAgICAgIC8vIGl0LgogICAgICAgICAgICAgICAgICAgIGlmIChldmVudC5sZW5ndGhDb21wdXRhYmxlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHByb2dyZXNzLnRvdGFsID0gZXZlbnQudG90YWw7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIC8vIFNlbmQgdGhlIGV2ZW50LgogICAgICAgICAgICAgICAgICAgIG9ic2VydmVyLm5leHQocHJvZ3Jlc3MpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICAvLyBCeSBkZWZhdWx0LCByZWdpc3RlciBmb3IgbG9hZCBhbmQgZXJyb3IgZXZlbnRzLgogICAgICAgICAgICAgICAgeGhyLmFkZEV2ZW50TGlzdGVuZXIoJ2xvYWQnLCBvbkxvYWQpOwogICAgICAgICAgICAgICAgeGhyLmFkZEV2ZW50TGlzdGVuZXIoJ2Vycm9yJywgb25FcnJvcik7CiAgICAgICAgICAgICAgICAvLyBQcm9ncmVzcyBldmVudHMgYXJlIG9ubHkgZW5hYmxlZCBpZiByZXF1ZXN0ZWQuCiAgICAgICAgICAgICAgICBpZiAocmVxLnJlcG9ydFByb2dyZXNzKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gRG93bmxvYWQgcHJvZ3Jlc3MgaXMgYWx3YXlzIGVuYWJsZWQgaWYgcmVxdWVzdGVkLgogICAgICAgICAgICAgICAgICAgIHhoci5hZGRFdmVudExpc3RlbmVyKCdwcm9ncmVzcycsIG9uRG93blByb2dyZXNzKTsKICAgICAgICAgICAgICAgICAgICAvLyBVcGxvYWQgcHJvZ3Jlc3MgZGVwZW5kcyBvbiB3aGV0aGVyIHRoZXJlIGlzIGEgYm9keSB0byB1cGxvYWQuCiAgICAgICAgICAgICAgICAgICAgaWYgKHJlcUJvZHkgIT09IG51bGwgJiYgeGhyLnVwbG9hZCkgewogICAgICAgICAgICAgICAgICAgICAgICB4aHIudXBsb2FkLmFkZEV2ZW50TGlzdGVuZXIoJ3Byb2dyZXNzJywgb25VcFByb2dyZXNzKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvLyBGaXJlIHRoZSByZXF1ZXN0LCBhbmQgbm90aWZ5IHRoZSBldmVudCBzdHJlYW0gdGhhdCBpdCB3YXMgZmlyZWQuCiAgICAgICAgICAgICAgICB4aHIuc2VuZCgoLyoqIEB0eXBlIHs/fSAqLyAocmVxQm9keSkpKTsKICAgICAgICAgICAgICAgIG9ic2VydmVyLm5leHQoeyB0eXBlOiBIdHRwRXZlbnRUeXBlLlNlbnQgfSk7CiAgICAgICAgICAgICAgICAvLyBUaGlzIGlzIHRoZSByZXR1cm4gZnJvbSB0aGUgT2JzZXJ2YWJsZSBmdW5jdGlvbiwgd2hpY2ggaXMgdGhlCiAgICAgICAgICAgICAgICAvLyByZXF1ZXN0IGNhbmNlbGxhdGlvbiBoYW5kbGVyLgogICAgICAgICAgICAgICAgcmV0dXJuICgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgICAgICAvLyBPbiBhIGNhbmNlbGxhdGlvbiwgcmVtb3ZlIGFsbCByZWdpc3RlcmVkIGV2ZW50IGxpc3RlbmVycy4KICAgICAgICAgICAgICAgICAgICB4aHIucmVtb3ZlRXZlbnRMaXN0ZW5lcignZXJyb3InLCBvbkVycm9yKTsKICAgICAgICAgICAgICAgICAgICB4aHIucmVtb3ZlRXZlbnRMaXN0ZW5lcignbG9hZCcsIG9uTG9hZCk7CiAgICAgICAgICAgICAgICAgICAgaWYgKHJlcS5yZXBvcnRQcm9ncmVzcykgewogICAgICAgICAgICAgICAgICAgICAgICB4aHIucmVtb3ZlRXZlbnRMaXN0ZW5lcigncHJvZ3Jlc3MnLCBvbkRvd25Qcm9ncmVzcyk7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXFCb2R5ICE9PSBudWxsICYmIHhoci51cGxvYWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHhoci51cGxvYWQucmVtb3ZlRXZlbnRMaXN0ZW5lcigncHJvZ3Jlc3MnLCBvblVwUHJvZ3Jlc3MpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIC8vIEZpbmFsbHksIGFib3J0IHRoZSBpbi1mbGlnaHQgcmVxdWVzdC4KICAgICAgICAgICAgICAgICAgICB4aH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CiAgICAgKiBSZXRyaWV2ZXMgdGhlIGN1cnJlbnQgWFNSRiB0b2tlbiB0byB1c2Ugd2l0aCB0aGUgbmV4dCBvdXRnb2luZyByZXF1ZXN0LgogICAgICoKICAgICAqIFxAcHVibGljQXBpCiAgICAgKiBAYWJzdHJhY3QKICAgICAqLwogICAgY2xhc3MgSHR0cFhzcmZUb2tlbkV4dHJhY3RvciB7CiAgICB9CiAgICAvKioKICAgICAqIGBIdHRwWHNyZlRva2VuRXh0cmFjdG9yYCB3aGljaCByZXRyaWV2ZXMgdGhlIHRva2VuIGZyb20gYSBjb29raWUuCiAgICAgKi8KICAgIGNsYXNzIEh0dHBYc3JmQ29va2llRXh0cmFjdG9yIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGRvYwogICAgICAgICAqIEBwYXJhbSB7P30gcGxhdGZvcm0KICAgICAgICAgKiBAcGFyYW0gez99IGNvb2tpZU5hbWUKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3Rvcihkb2MsIHBsYXRmb3JtLCBjb29raWVOYW1lKSB7CiAgICAgICAgICAgIHRoaXMuZG9jID0gZG9jOwogICAgICAgICAgICB0aGlzLnBsYXRmb3JtID0gcGxhdGZvcm07CiAgICAgICAgICAgIHRoaXMuY29va2llTmFtZSA9IGNvb2tpZU5hbWU7CiAgICAgICAgICAgIHRoaXMubGFzdENvb2tpZVN0cmluZyA9ICcnOwogICAgICAgICAgICB0aGlzLmxhc3RUb2tlbiA9IG51bGw7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBcQGludGVybmFsIGZvciB0ZXN0aW5nCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLnBhcnNlQ291bnQgPSAwOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldFRva2VuKCkgewogICAgICAgICAgICBpZiAodGhpcy5wbGF0Zm9ybSA9PT0gJ3NlcnZlcicpIHsKICAgICAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgY29va2llU3RyaW5nID0gdGhpcy5kb2MuY29va2llIHx8ICcnOwogICAgICAgICAgICBpZiAoY29va2llU3RyaW5nICE9PSB0aGlzLmxhc3RDb29raWVTdHJpbmcpIHsKICAgICAgICAgICAgICAgIHRoaXMucGFyc2VDb3VudCsrOwogICAgICAgICAgICAgICAgdGhpcy5sYXN0VG9rZW4gPSBwYXJzZUNvb2tpZVZhbHVlKGNvb2tpZVN0cmluZywgdGhpcy5jb29raWVOYW1lKTsKICAgICAgICAgICAgICAgIHRoaXMubGFzdENvb2tpZVN0cmluZyA9IGNvb2tpZVN0cmluZzsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpcy5sYXN0VG9rZW47CiAgICAgICAgfQogICAgfQogICAgSHR0cFhzcmZDb29raWVFeHRyYWN0b3IuybVmYWMgPSBmdW5jdGlvbiBIdHRwWHNyZkNvb2tpZUV4dHJhY3Rvcl9GYWN0b3J5KHQpIHsgcmV0dXJuIG5ldyAodCB8fCBIdHRwWHNyZkNvb2tpZUV4dHJhY3RvcikoybXJtWluamVjdChET0NVTUVOVCQxKSwgybXJtWluamVjdChQTEFURk9STV9JRCksIMm1ybVpbmplY3QoWFNSRl9DT09LSUVfTkFNRSkpOyB9OwogICAgSHR0cFhzcmZDb29raWVFeHRyYWN0b3IuybVwcm92ID0gybXJtWRlZmluZUluamVjdGFibGUoeyB0b2tlbjogSHR0cFhzcmZDb29raWVFeHRyYWN0b3IsIGZhY3Rvcnk6IEh0dHBYc3JmQ29va2llRXh0cmFjdG9yLsm1ZmFjIH0pOwogICAgLyoqIEBub2NvbGxhcHNlICovCiAgICBIdHRwWHNyZkNvb2tpZUV4dHJhY3Rvci5jdG9yUGFyYW1ldGVycyA9ICgpID0+IFsKICAgICAgICB7IHR5cGU6IHVuZGVmaW5lZCwgZGVjb3JhdG9yczogW3sgdHlwZTogSW5qZWN0LCBhcmdzOiBbRE9DVU1FTlQkMSxdIH1dIH0sCiAgICAgICAgeyB0eXBlOiBTdHJpbmcsIGRlY29yYXRvcnM6IFt7IHR5cGU6IEluamVjdCwgYXJnczogW1BMQVRGT1JNX0lELF0gfV0gfSwKICAgICAgICB7IHR5cGU6IFN0cmluZywgZGVjb3JhdG9yczogW3sgdHlwZTogSW5qZWN0LCBhcmdzOiBbWFNSRl9DT09LSUVfTkFNRSxdIH1dIH0KICAgIF07CiAgICAvKioKICAgICAqIGBIdHRwSW50ZXJjZXB0b3JgIHdoaWNoIGFkZHMgYW4gWFNSRiB0b2tlbiB0byBlbGlnaWJsZSBvdXRnb2luZyByZXF1ZXN0cy4KICAgICAqLwogICAgY2xhc3MgSHR0cFhzcmZJbnRlcmNlcHRvciB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB0b2tlblNlcnZpY2UKICAgICAgICAgKiBAcGFyYW0gez99IGhlYWRlck5hbWUKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3Rvcih0b2tlblNlcnZpY2UsIGhlYWRlck5hbWUpIHsKICAgICAgICAgICAgdGhpcy50b2tlblNlcnZpY2UgPSB0b2tlblNlcnZpY2U7CiAgICAgICAgICAgIHRoaXMuaGVhZGVyTmFtZSA9IGhlYWRlck5hbWU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gcmVxCiAgICAgICAgICogQHBhcmFtIHs/fSBuZXh0CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBpbnRlcmNlcHQocmVxLCBuZXh0KSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbGNVcmwgPSByZXEudXJsLnRvTG93ZXJDYXNlKCk7CiAgICAgICAgICAgIC8vIFNraXAgYm90aCBub24tbXV0YXRpbmcgcm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CBhcHBsaWVzIG11bHRpcGxlIGludGVyY2VwdG9ycwogICAgICogdG8gYSByZXF1ZXN0IGJlZm9yZSBwYXNzaW5nIGl0IHRvIHRoZSBnaXZlbiBgSHR0cEJhY2tlbmRgLgogICAgICoKICAgICAqIFRoZSBpbnRlcmNlcHRvcnMgYXJlIGxvYWRlZCBsYXppbHkgZnJvbSB0aGUgaW5qZWN0b3IsIHRvIGFsbG93CiAgICAgKiBpbnRlcmNlcHRvcnMgdG8gdGhlbXNlbHZlcyBpbmplY3QgY2xhc3NlcyBkZXBlbmRpbmcgaW5kaXJlY3RseQogICAgICogb24gYEh0dHBJbnRlcmNlcHRpbmdIYW5kbGVyYCBpdHNlbGYuCiAgICAgKiBAc2VlIGBIdHRwSW50ZXJjZXB0b3JgCiAgICAgKi8KICAgIGNsYXNzIEh0dHBJbnRlcmNlcHRpbmdIYW5kbGVyIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGJhY2tlbmQKICAgICAgICAgKiBAcGFyYW0gez99IGluamVjdG9yCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoYmFja2VuZCwgaW5qZWN0b3IpIHsKICAgICAgICAgICAgdGhpcy5iYWNrZW5kID0gYmFja2VuZDsKICAgICAgICAgICAgdGhpcy5pbmplY3RvciA9IGluamVjdG9yOwogICAgICAgICAgICB0aGlzLmNoYWluID0gbnVsbDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSByZXEKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGhhbmRsZShyZXEpIHsKICAgICAgICAgICAgaWYgKHRoaXMuY2hhaW4gPT09IG51bGwpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGludGVyY2VwdG9ycyA9IHRoaXMuaW5qZWN0b3IuZ2V0KEhUVFBfSU5URVJDRVBUT1JTLCBbXSk7CiAgICAgICAgICAgICAgICB0aGlzLmNoYWluID0gaW50ZXJjZXB0b3JzLnJlZHVjZVJpZ2h0KCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbmV4dAogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBpbnRlcmNlcHRvcgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKG5leHQsIGludGVyY2VwdG9yKSA9PiBuZXcgSHR0cEludGVyY2VwdG9ySGFuZGxlcihuZXh0LCBpbnRlcmNlcHRvcikpLCB0aGlzLmJhY2tlbmQpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0aGlzLmNoYWluLmhhbmRsZShyZXEpOwogICAgICAgIH0KICAgIH0KICAgIEh0dHBJbnRlcmNlcHRpbmdIYW5kbGVyLsm1ZmFjID0gZnVuY3Rpb24gSHR0cEludGVyY2VwdGluZ0hhbmRsZXJfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgSHR0cEludGVyY2VwdGluZ0hhbmRsZXIpKMm1ybVpbmplY3QoSHR0cEJhY2tlbmQpLCDJtcm1aW5qZWN0KEluamVjdG9yKSk7IH07CiAgICBIdHRwSW50ZXJjZXB0aW5nSGFuZGxlci7JtXByb3YgPSDJtcm1ZGVmaW5lSW5qZWN0YWJsZSh7IHRva2VuOiBIdHRwSW50ZXJjZXB0aW5nSGFuZGxlciwgZmFjdG9yeTogSHR0cEludGVyY2VwdGluZ0hhbmRsZXIuybVmYWMgfSk7CiAgICAvKiogQG5vY29sbGFwc2UgKi8KICAgIEh0dHBJbnRlcmNlcHRpbmdIYW5kbGVyLmN0b3JQYXJhbWV0ZXJzID0gKCkgPT4gWwogICAgICAgIHsgdHlwZTogSHR0cEJhY2tlbmQgfSwKICAgICAgICB7IHR5cGU6IEluamVjdG9yIH0KICAgIF07CiAgICAvKioKICAgICAqIEZhY3RvcnkgZnVuY3Rpb24gdGhhdC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LwogICAgY2xhc3MgSHR0cENsaWVudFhzcmZNb2R1bGUgewogICAgICAgIC8qKgogICAgICAgICAqIERpc2FibGUgdGhlIGRlZmF1bHQgWFNSRiBwcm90ZWN0aW9uLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc3RhdGljIGRpc2FibGUoKSB7CiAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICBuZ01vZHVsZTogSHR0cENsaWVudFhzcmZNb2R1bGUsCiAgICAgICAgICAgICAgICBwcm92aWRlcnM6IFsKICAgICAgICAgICAgICAgICAgICB7IHByb3ZpZGU6IEh0dHBYc3JmSW50ZXJjZXB0b3IsIHVzZUNsYXNzOiBOb29wSW50ZXJjZXB0b3IgfSwKICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgIH07CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENvbmZpZ3VyZSBYU1JGIHByb3RlY3Rpb24uCiAgICAgICAgICogQHBhcmFtIHs/PX0gb3B0aW9ucyBBbiBvYmplY3QgdGhhdCBjYW4gc3BlY2lmeSBlaXRoZXIgb3IgYm90aAogICAgICAgICAqIGNvb2tpZSBuYW1lIG9yIGhlYWRlciBuYW1lLgogICAgICAgICAqIC0gQ29va2llIG5hbWUgZGVmYXVsdCBpcyBgWFNSRi1UT0tFTmAuCiAgICAgICAgICogLSBIZWFkZXIgbmFtZSBkZWZhdWx0IGlzIGBYLVhTUkYtVE9LRU5gLgogICAgICAgICAqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzdGF0aWMgd2l0aE9wdGlvbnMob3B0aW9ucyA9IHt9KSB7CiAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICBuZ01vZHVsZTogSHR0cENsaWVudFhzcmZNb2R1bGUsCiAgICAgICAgICAgICAgICBwcm92aWRlcnM6IFsKICAgICAgICAgICAgICAgICAgICBvcHRpb25zLmNvb2tpZU5hbWUgPyB7I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Nlb2YgU1ZHRWxlbWVudGAgaGVyZSwKICAgICAgICAgICAgLy8gYmVjYXVzZSBpdCdsbCBicmVhayBkdXJpbmcgc2VydmVyLXNpZGUgcmVuZGVyaW5nLgogICAgICAgICAgICBpZiAoISEoKC8qKiBAdHlwZSB7P30gKi8gKGRhdGEpKSkubm9kZU5hbWUpIHsKICAgICAgICAgICAgICAgIHRoaXMuc3ZnRWxlbWVudCA9ICgvKiogQHR5cGUgez99ICovIChkYXRhKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLnVybCA9ICgvKiogQHR5cGUgez99ICovIChkYXRhKSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICAvKioKICAgICAqIFNlcnZpY2UgdG8gcmVnaXN0ZXIgYW5kIGRpc3BsYXkgaWNvbnMgdXNlZCBieSB0aGUgYDxtYXQtaWNvbj5gIGNvbXBvbmVudC4KICAgICAqIC0gUmVnaXN0ZXJzIGljb24gVVJMcyBieSBuYW1lc3BhY2UgYW5kIG5hbWUuCiAgICAgKiAtIFJlZ2lzdGVycyBpY29uIHNldCBVUkxzIGJ5IG5hbWVzcGFjZS4KICAgICAqIC0gUmVnaXN0ZXJzIGFsaWFzZXMgZm9yIENTUyBjbGFzc2VzLCBmb3IgdXNlIHdpdGggaWNvbiBmb250cy4KICAgICAqIC0gTG9hZHMgaWNvbnMgZnJvbSBVUkxzIGFuZCBleHRyYWN0cyBpbmRpdmlkdWFsIGljb25zIGZyb20gaWNvbiBzZXRzLgogICAgICovCiAgICBjbGFzcyBNYXRJY29uUmVnaXN0cnkgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gX2h0dHBDbGllbnQKICAgICAgICAgKiBAcGFyYW0gez99IF9zYW5pdGl6ZXIKICAgICAgICAgKiBAcGFyYW0gez99IGRvY3VtZW50CiAgICAgICAgICogQHBhcmFtIHs/PX0gX2Vycm9ySGFuZGxlcgogICAgICA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VXNlZCB0byBjb2FsZXNjZSBtdWx0aXBsZSByZXF1ZXN0cyB0byB0aGUgc2FtZSBVUkwuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9pblByb2dyZXNzVXJsRmV0Y2hlcyA9IG5ldyBNYXAoKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIE1hcCBmcm9tIGZvbnQgaWRlbnRpZmllcnMgdG8gdGhlaXIgQ1NTIGNsYXNzIG5hbWVzLiBVc2VkIGZvciBpY29uIGZvbnRzLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fZm9udENzc0NsYXNzZXNCeUFsaWFzID0gbmV3IE1hcCgpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogVGhlIENTUyBjbGFzcyB0byBhcHBseSB3aGVuIGFuIGA8bWF0LWljb24+YCBjb21wb25lbnQgaGFzIG5vIGljb24gbmFtZSwgdXJsLCBvciBmb250IHNwZWNpZmllZC4KICAgICAgICAgICAgICogVGhlIGRlZmF1bHQgJ21hdGVyaWFsLWljb25zJyB2YWx1ZSBhc3N1bWVzIHRoYXQgdGhlIG1hdGVyaWFsIGljb24gZm9udCBoYXMgYmVlbiBsb2FkZWQgYXMKICAgICAgICAgICAgICogZGVzY3JpYmVkIGF0IGh0dHA6Ly9nb29nbGUuZ2l0aHViLmlvL21hdGVyaWFsLWRlc2lnbi1pY29ucy8jaWNvbi1mb250LWZvci10aGUtd2ViCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9kZWZhdWx0Rm9udFNldENsYXNzID0gJ21hdGVyaWFsLWljb25zJzsKICAgICAgICAgICAgdGhpcy5fZG9jdW1lbnQgPSBkb2N1bWVudDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmVnaXN0ZXJzIGFuIGljb24gYnkgVVJMIGluIHRoZSBkZWZhdWx0IG5hbWVzcGFjZS4KICAgICAgICAgKiBAdGVtcGxhdGUgVEhJUwogICAgICAgICAqIEB0aGlzIHtUSElTfQogICAgICAgICAqIEBwYXJhbSB7P30gaWNvbk5hbWUgTmFtZSB1bmRlciB3aGljaCB0aGUgaWNvbiBzaG91bGQgYmUgcmVnaXN0ZXJlZC4KICAgICAgICAgKiBAcGFyYW0gez99IHVybAogICAgICAgICAqIEBwYXJhbSB7Pz19IG9wdGlvbnMKICAgICAgICAgKiBAcmV0dXJuIHtUSElTfQogICAgICAgICAqLwogICAgICAgIGFkZFN2Z0ljb24oaWNvbk5hbWUsIHVybCwgb3B0aW9ucykgewogICAgICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKS5hZGRTdmdJY29uSW5OYW1lc3BhY2UoJycsIGljb25OYW1lLCB1cmwsIG9wdGlvbnMpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZWdpc3RlcnMgYW4gaWNvbiB1c2luZyBhbiBIVE1MIHN0cmluZyBpbiB0aGUgZGVmYXVsdCBuYW1lc3BhY2UuCiAgICAgICAgICogQHRlbXBsYXRlIFRISVMKICAgICAgICAgKiBAdGhpcyB7VEhJU30KICAgICAgICAgKiBAcGFyYW0gez99IGljb25OYW1lIE5hbWUgdW5kZXIgd2hpY2ggdGhlIGljb24gc2hvdWxkIGJlIHJlZ2lzdGVyZWQuCiAgICAgICAgICogQHBhcmFtIHs/fSBsaXRlcmFsIFNWRyBzb3VyY2Ugb2YgdGhlIGljb24uCiAgICAgICAgICogQHBhcmFtIHs/PX0gb3B0aW9ucwogICAgICAgICAqIEByZXR1cm4ge1RISVN9CiAgICAgICAgICovCiAgICAgICAgYWRkU3ZnSWNvbkxpdGVyYWwoaWNvbk5hbWUsIGxpdGVyYWwsIG9wdGlvbnMpIHsKICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovICh0aGlzKSkuYWRkU3ZnSWNvbkxpdGVyYWxJbk5hbWVzcGFjZSgnJywgaWNvbk5hbWUsIGxpdGVyYWwsIG9wdGlvbnMpOwogICAgICA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HVuZGVyIHdoaWNoIHRoZSBpY29uIHNob3VsZCBiZSByZWdpc3RlcmVkLgogICAgICAgICAqIEBwYXJhbSB7P30gbGl0ZXJhbCBTVkcgc291cmNlIG9mIHRoZSBpY29uLgogICAgICAgICAqIEBwYXJhbSB7Pz19IG9wdGlvbnMKICAgICAgICAgKiBAcmV0dXJuIHtUSElTfQogICAgICAgICAqLwogICAgICAgIGFkZFN2Z0ljb25MaXRlcmFsSW5OYW1lc3BhY2UobmFtZXNwYWNlLCBpY29uTmFtZSwgbGl0ZXJhbCwgb3B0aW9ucykgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHNhbml0aXplZExpdGVyYWwgPSAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpLl9zYW5pdGl6ZXIuc2FuaXRpemUoU2VjdXJpdHlDb250ZXh0LkhUTUwsIGxpdGVyYWwpOwogICAgICAgICAgICBpZiAoIXNhbml0aXplZExpdGVyYWwpIHsKICAgICAgICAgICAgICAgIHRocm93IGdldE1hdEljb25GYWlsZWRUb1Nhbml0aXplTGl0ZXJhbEVycm9yKGxpdGVyYWwpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc3ZnRWxlbWVudCA9ICgvKiogQHR5cGUgez99ICovICh0aGlzKSkuX2NyZWF0ZVN2Z0VsZW1lbnRGb3JTaW5nbGVJY29uKHNhbml0aXplZExpdGVyYWwsIG9wdGlvbnMpOwogICAgICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKS5fYWRkU3ZnSWNvbkNvbmZpZyhuYW1lc3BhY2UsIGljb25OYW1lLCBuZXcgU3ZnSWNvbkNvbmZpZyhzdmdFbGVtZW50LCBvcHRpb25zKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJlZ2lzdGVycyBhbiBpY29uIHNldCBieSBVUkwgaW4gdGhlIGRlZmF1bHQgbmFtZXNwYWNlLgogICAgICAgICAqIEB0ZW1wbGF0ZSBUSElTCiAgICAgICAgICogQHRoaXMge1RISVN9CiAgICAgICAgICogQHBhcmFtIHs/fSB1cmwKICAgICAgICAgKiBAcGFyYW0gez89fSBvcHRpb25zCiAgICAgICAgICogQHJldHVybiB7VEhJU30KICAgICAgICAgKi8KICAgICAgICBhZGRTdmdJY29uU2V0KHVybCwgb3B0aW9ucykgewogICAgICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKS5hZGRTdmdJY29uU2V0SW5OYW1lc3BhY2UoJycsIHVybCwgb3B0aW9ucyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJlZ2lzdGVycyBhbiBpY29uIHNldCB1c2luZyBhbiBIVE1MIHN0cmluZyBpbiB0aGUgZGVmYXVsdCBuYW1lc3BhY2UuCiAgICAgICAgICogQHRlbXBsYXRlIFRISVMKICAgICAgICAgKiBAdGhpcyB7VEhJU30KICAgICAgICAgKiBAcGFyYW0gez99IGxpdGVyYWwgU1ZHIHNvdXJjZSBvZiB0aGUgaWNvbiBzZXQuCiAgICAgICAgICogQHBhcmFtIHs/PX0gb3B0aW9ucwogICAgICAgICAqIEByZXR1cm4ge1RISVN9CiAgICAgICAgICovCiAgICAgICAgYWRkU3ZnSWNvblNldExpdGVyYWwobGl0ZXJhbCwgb3B0aW9ucykgewogICAgICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKS5hZGRTdmdJY29uU2V0TGl0ZXJhbEluTmFtZXNwYWNlKCcnLCBsaXRlcmFsLCBvcHRpb25zKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmVnaXN0ZXJzIGFuIGljb24gc2V0IGJ5IFVSTCBpbiB0aGUgc3BlY2lmaWVkIG5hbWVzcGFjZS4KICAgICAgICAgKiBAdGVtcGxhdGUgVEhJUwogICAgICAgICAqIEB0aGlzIHtUSElTfQogICAgICAgICAqIEBwYXJhbSB7P30gbmFtZXNwYWNlIE5hbWVzcGFjZSBpbiB3aGljaCB0byByZWdpc3RlciB0aGUgaWNvbiBzZXQuCiAgICAgICAgICogQHBhcmFtIHs/fSB1cmwKICAgICAgICAgKiBAcGFyYW0gez89fSBvcHRpb25zCiAgICAgICAgICogQHJldHVybiB7VEhJU30KICAgICAgICAgKi8KICAgICAgICBhZGRTdmdJY29uU2V0SW5OYW1lc3BhY2UobmFtZXNwYWNlLCB1cmwsIG9wdGlvbnMpIHsKICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovICh0aGlzKSkuX2FkZFN2Z0ljb25TZXRDb25maWcobmFtZXNwYWNlLCBuZXcgU3ZnSWNvbkNvbmZpZyh1cmwsIG9wdGlvbnMpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmVnaXN0ZXJzIGFuIGljb24gc2V0IHVzaW5nIGFuIEhUTUwgc3RyaW5nIGluIHRoZSBzcGVjaWZpZWQgbmFtZXNwYWNlLgogICAgICAgICAqIEB0ZW1wbGF0ZSBUSElTCiAgICAgICAgICogQHRoaXMge1RISVN9CiAgICAgICAgICogQHBhcmFtIHs/fSBuYW1lc3BhY2UgTmFtZXNwYWNlIGluIHdoaWNoIHRvIHJlZ2lzdGVyIHRoZSBpY29uIHNldC4KICAgICAgICAgKiBAcGFyYW0gez99IGxpdGVyYWwgU1ZHIHNvdXJjZSBvZiB0aGUgaWNvbiBzZXQuCiAgICAgICAgICogQHBhcmFtIHs/PX0gb3B0aW9ucwogICAgICAgICAqIEByZXR1cm4ge1RISVN9CiAgICAgICAgICovCiAgICAgICAgYWRkU3ZnSWNvblNldExpdGVyYWxJbk5hbWVzcGFjZShuYW1lc3BhY2UsIGxpdGVyYWwsIG9wdGlvbnMpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBzYW5pdGl6ZWRMaXRlcmFsID0gKC8qKi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mcgYW4gaWNvbiBieSBuYW1lIG9yIFVSTC4KICAgICAgICAgKgogICAgICAgICAqIEB0ZW1wbGF0ZSBUSElTCiAgICAgICAgICogQHRoaXMge1RISVN9CiAgICAgICAgICogQHBhcmFtIHs/fSBjbGFzc05hbWUKICAgICAgICAgKiBAcmV0dXJuIHtUSElTfQogICAgICAgICAqLwogICAgICAgIHNldERlZmF1bHRGb250U2V0Q2xhc3MoY2xhc3NOYW1lKSB7CiAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovICh0aGlzKSkuX2RlZmF1bHRGb250U2V0Q2xhc3MgPSBjbGFzc05hbWU7CiAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZXR1cm5zIHRoZSBDU1MgY2xhc3MgbmFtZSB0byBiZSB1c2VkIGZvciBpY29uIGZvbnRzIHdoZW4gYW4gYDxtYXQtaWNvbj5gIGNvbXBvbmVudCBkb2VzIG5vdAogICAgICAgICAqIGhhdmUgYSBmb250U2V0IGlucHV0IHZhbHVlLCBhbmQgaXMgbm90IGxvYWRpbmcgYW4gaWNvbiBieSBuYW1lIG9yIFVSTC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldERlZmF1bHRGb250U2V0Q2xhc3MoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9kZWZhdWx0Rm9udFNldENsYXNzOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZXR1cm5zIGFuIE9ic2VydmFibGUgdGhhdCBwcm9kdWNlcyB0aGUgaWNvbiAoYXMgYW4gYDxzdmc+YCBET00gZWxlbWVudCkgZnJvbSB0aGUgZ2l2ZW4gVVJMLgogICAgICAgICAqIFRoZSByZXNwb25zZSBmcm9tIHRoZSBVUkwgbWF5IGJlIGNhY2hlZCBzbyB0aGlzIHdpbGwgbm90IGFsd2F5cyBjYXVzZSBhbiBIVFRQIHJlcXVlc3QsIGJ1dAogICAgICAgICAqIHRoZSBwcm9kdWNlZCBlbGVtZW50IHdpbGwgYWx3YXlzIGJlIGEgbmV3IGNvcHkgb2YgdGhlIG9yaWdpbmFsbHkgZmV0Y2hlZCBpY29uLiAoVGhhdCBpcywKICAgICAgICAgKiBpdCB3aWxsIG5vdCBjb250YWluIGFueSBtb2RpZmljYXRpb25zIG1hZGUgdG8gZWxlbWVudHMgcHJldmlvdXNseSByZXR1cm5lZCkuCiAgICAgICAgICoKICAgICAgICAgKiBAcGFyYW0gez99IHNhZmVVcmwgVVJMIGZyb20gd2hpY2ggdG8gZmV0Y2ggdGhlIFNWRyBpY29uLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0U3ZnSWNvbkZyb21Vcmwoc2FmZVVybCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHVybCA9IHRoaXMuX3Nhbml0aXplci5zYW5pdGl6ZShTZWN1cml0eUNvbnRleHQuUkVTT1VSQ0VfVVJMLCBzYWZlVXJsKTsKICAgICAgICAgICAgaWYgKCF1cmwpIHsKICAgICAgICAgICAgICAgIHRocm93IGdldE1hdEljb25GYWlsZWRUb1Nhbml0aXplVXJsRXJyb3Ioc2FmZVVybCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjYWNoZWRJY29uID0gdGhpcy5fY2FjaGVkSWNvbnNCeVVybC5nZXQodXJsKTsKICAgICAgICAgICAgaWYgKGNhY2hlZEljb24pIHsKICAgICAgICAgICAgICAgIHJldHVybiBvZihjbG9uZVN2ZyhjYWNoZWRJY29uKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2xvYWRTdmdJY29uRnJvbUNvbmZpZyhuZXcgU3ZnSWNvbkNvbmZpZyhzYWZlVXJsKSkucGlwZSh0YXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHN2ZwogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgc3ZnID0+IHRoaXMuX2NhY2hlZEljb25zQnlVcmwuc2V0KCgvKiogQHR5cGUgez99ICovICh1cmwpKSwgc3ZnKSkpLCBtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHN2ZwogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgc3ZnID0+IGNsb25lU3ZnKHN2ZykpKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgYW4gT2JzZXJ2YWJsZSB0aGF0IHByb2R1Y2VzIHRoZSBpY29uIChhcyBhbiBgPHN2Zz5gIERPTSBlbGVtZW50KSB3aXRoIHRoZSBnaXZlbiBuYW1lCiAgICAgICAgICogYW5kIG5hbWVzcGFjZS4gVGhlIGljb24gbXVzdCBoYXZlIGJlZW4gcHJldmlvdXNseSByZWdpc3RlcmVkIHdpdGggYWRkSWNvbiBvciBhZGRJY29uU2V0OwogICAgICAgICAqIGlmIG5vdCwgdGhlIE9ic2VydmFibGUgd2lsbCB0aHJvdyBhbiBlcnJvci4KICAgICAgICAgKgogICAgICAgICAqIEBwYXJhbSB7P30gbmFtZSBOYW1lIG9mIHRoZSBpY29uIHRvIGJlIHJldHJpZXZlZC4KICAgICAgICAgKiBAcGFyYW0gez89fSBuYW1lc3BhY2UgTmFtZXNwYWNlIGluIHdoaWNoIHRvIGxvb2sgZm9yIHRoZSBpY29uLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0TmFtZWRTdmdJY29uKG5hbWUsIG5hbWVzcGFjZSA9ICcnKSB7CiAgICAgICAgICAgIC8vIFJldHVybiAoY29weSBvZikgY2FjaGVkIGljb24gaWYgcG9zc2libGUuCiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qga2V5ID0gaWNvbktleShuYW1lc3BhY2UsIG5hbWUpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGNvbmZpZyA9IHRoaXMuX3N2Z0ljb25Db25maWdzLmdldChrZXkpOwogICAgICAgICAgICBpZiAoY29uZmlnKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fZ2V0U3ZnRnJvbUNvbmZpZyhjb25maWcpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIFNlZSBpZiB3ZSBoYXZlIGFueSBpY29uIHNldHMgcmVnaXN0ZXJlZCBmb3IgdGhlIG5hbWVzcGFjZS4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBpY29uU2V0Q29uZmlncyA9IHRoaXMuX2ljb25TZXRDb25maWdzLmdldChuYW1lc3BhY2UpOwogICAgICAgICAgICBpZiAoaWNvblNldENvbmZpZ3MpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9nZXRTdmdGcm9tSWNvblNldENvbmZpZ3MobmFtZSwgaWNvblNldENvbmZpZ3MpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0aHJvd0Vycm9yKGdldE1hdEljb25OYW1lTm90Rm91bmRFcnJvcihrZXkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uRGVzdHJveSgpIHsKICAgICAgICAgICAgdGhpcy5fc3ZnSWNvbkNvbmZpZ3MuY2xlYXIoKTsKICAgICAgICAgICAgdGhpcy5faWNvblNldENvbmZpZ3MuY2xlYXIoKTsKICAgICAgICAgICAgdGhpcy5fY2FjaGVkSWNvbnNCeVVybC5jbGVhcigpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZXR1cm5zIHRoZSBjYWNoZWQgaWNvbiBmb3IgYSBTdmdJY29uQ29uZmlnIGlmIGF2YWlsYWJsZSwgb3IgZmV0Y2hlcyBpdCBmcm9tIGl0cyBVUkwgaWYgbm90LgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBjb25maWcKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9nZXRTdmdGcm9tQ29uZmlnKGNvbmZpZykgewogICAgICAgICAgICBpZiAoY29uZmlnLnN2Z0VsZW1lbnQpIHsKICAgICAgICAgICAgICAgIC8vIFdlIGFscmVhZHkgaGF2ZSB0aGUgU1ZHIGVsZW1lbnQgZm9yIHRoaXMgaWNvbiwgcmV0dXJuIGEgY29weS4KICAgICAgICAgICAgICAgIHJldHVybiBvZihjbG9uZVN2Zyhjb25maWcuc3ZnRWxlbWVudCkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgLy8gRmV0Y2ggdGhlIGljb24gZnJvbSB0aGUgY29uZmlnJ3MgVVJMLCBjYWNoZSBpdCwgYW5kIHJldHVybiBhIGNvcHkuCiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fbG9hZFN2Z0ljb25Gcm9tQ29uZmlnKGNvbmZpZykucGlwZSh0YXAoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBzdmcKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIHN2ZyA9PiBjb25maWcuc3ZnRWxlbWVudCA9IHN2ZykpLCBtYXAoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBzdmcKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIHN2ZyA9PiBjbG9uZVN2ZyhzdmcpKSkpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICA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QgbmFtZS4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBuYW1lZEljb24gPSB0aGlzLl9leHRyYWN0SWNvbldpdGhOYW1lRnJvbUFueVNldChuYW1lLCBpY29uU2V0Q29uZmlncyk7CiAgICAgICAgICAgIGlmIChuYW1lZEljb24pIHsKICAgICAgICAgICAgICAgIC8vIFdlIGNvdWxkIGNhY2hlIG5hbWVkSWNvbiBpbiBfc3ZnSWNvbkNvbmZpZ3MsIGJ1dCBzaW5jZSB3ZSBoYXZlIHRvIG1ha2UgYSBjb3B5IGV2ZXJ5CiAgICAgICAgICAgICAgICAvLyB0aW1lIGFueXdheSwgdGhlcmUncyBwcm9iYWJseSBub3QgbXVjaCBhZHZhbnRhZ2UgY29tcGFyZWQgdG8ganVzdCBhbHdheXMgZXh0cmFjdGluZwogICAgICAgICAgICAgICAgLy8gaXQgZnJvbSB0aGUgaWNvbiBzZXQuCiAgICAgICAgICAgICAgICByZXR1cm4gb2YobmFtZWRJY29uKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBOb3QgZm91bmQgaW4gYW55IGNhY2hlZCBpY29uIHNldHMuIElmIHRoZXJlIGFyZSBpY29uIHNldHMgd2l0aCBVUkxzIHRoYXQgd2UgaGF2ZW4ndAogICAgICAgICAgICAvLyBmZXRjaGVkLCBmZXRjaCB0aGVtIG5vdyBhbmQgbG9vayBmb3IgaWNvbk5hbWUgaW4gdGhlIHJlc3VsdHMuCiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaWNvblNldEZldGNoUmVxdWVzdHMgPSBpY29uU2V0Q29uZmlncwogICAgICAgICAgICAgICAgLmZpbHRlcigoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gaWNvblNldENvbmZpZwogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgaWNvblNldENvbmZpZyA9PiAhaWNvblNldENvbmZpZy5zdmdFbGVtZW50KSkKICAgICAgICAgICAgICAgIC5tYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGljb25TZXRDb25maWcKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGljb25TZXRDb25maWcgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2xvYWRTdmdJY29uU2V0RnJvbUNvbmZpZyhpY29uU2V0Q29uZmlnKS5waXBlKGNhdGNoRXJyb3IoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBlcnIKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChlcnIpID0+IHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgdXJsID0gdGhpcy5fc2FuaXRpemVyLnNhbml0aXplKFNlY3VyaXR5Q29udGV4dC5SRVNPVVJDRV9VUkwsIGljb25TZXRDb25maWcudXJsKTsKICAgICAgICAgICAgICAgICAgICAvLyBTd2FsbG93IGVycm9ycyBmZXRjaGluZyBpbmRpdmlkdWFsIFVSTHMgc28gdGhlCiAgICAgICAgICAgICAgICAgICAgLy8gY29tYmluZWQgT2JzZXJ2YWJsZSB3b24ndCBuZWNlc3NhcmlseSBmYWlsLgogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBlcnJvck1lc3NhZ2UgPSBgTG9hZGluZyBpY29uIHNldCBVUkw6ICR7dXJsfSBmYWlsZWQ6ICR7ZXJyLm1lc3NhZ2V9YDsKICAgICAgICAgICAgICAgICAgICAvLyBAYnJlYWtpbmctY2hhbmdlIDkuMC4wIF9lcnJvckhhbmRsZXIgcGFyYW1ldGVyIHRvIGJlIG1hZGUgcmVxdWlyZWQKICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5fZXJyb3JIYW5kbGVyKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2Vycm9ySGFuZGxlci5oYW5kbGVFcnJvcihuZXcgRXJyb3IoZXJyb3JNZXNzYWdlKSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKGVycm9yTWVzc2FnZSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHJldHVybiBvZihudWxsKTsKICAgICAgICAgICAgICAgIH0pKSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgLy8gRmV0Y2ggYWxsIHRoZSBpY29uIHNldCBVUkxzLiBXaGVuIHRoZSByZXF1ZXN0cyBjb21wbGV0ZSwgZXZlcnkgSWNvblNldCBzaG91bGQgaGF2ZSBhCiAgICAgICAgICAgIC8vIGNhY2hlZCBTVkcgZWxlbWVudCAodW5sZXNzIHRoZSByZXF1ZXN0IGZhaWxlZCksIGFuZCB3ZSBjYW4gY2hlY2sgYWdhaW4gZm9yIHRoZSBpY29uLgogICAgICAgICAgICByZXR1cm4gZm9ya0pvaW4oaWNvblNldEZldGNoUmVxdWVzdHMpLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGZvdW5kSWNvbiA9IHRoaXMuX2V4dHJhY3RJY29uV2l0aE5hbWVGcm9tQW55U2V0KG5hbWUsIGljb25TZXRDb25maWdzKTsKICAgICAgICAgICAgICAgIGlmICghZm91bmRJY29uKSB7CiAgICAgICAgICAgICAgICAgICAgdGhyb3cgZ2V0TWF0SWNvbk5hbWVOb3RGb3VuZEVycm9yKG5hbWUpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIGZvdW5kSWNvbjsKICAgICAgICAgICAgfSkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU2VhcmNoZXMgdGhlIGNhY2hlZCBTVkcgZWxlbWVudHMgZm9yIHRoZSBnaXZlbiBpY29uIHNldHMgZm9yIGEgbmVzdGVkIGljb24gZWxlbWVudCB3aG9zZSAiaWQiCiAgICAgICAgICogdGFnIG1hdGNoZXMgdGhlIHNwZWNpZmllZCBuYW1lLiBJZiBmb3VuZCwgY29waWVzIHRoZSBuZXN0ZWQgZWxlbWVudCB0byBhIG5ldyBTVkcgZWxlbWVudCBhbmQKICAgICAgICAgKiByZXR1cm5zIGl0LiBSZXR1cm5zIG51bGwgaWYgbm8gbWF0Y2hpbmcgZWxlbWVudCBpcyBmb3VuZC4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gaWNvbk5hbWUKICAgICAgICAgKiBAcGFyYW0gez99IGljb25TZXRDb25maWdzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZXh0cmFjdEljb25XaXRoTmFtZUZyb21BbnlTZXQoaWNvbk5hbWUsIGljb25TZXRDb25maWdzKSB7CiAgICAgICAgICAgIC8vIEl0ZXJhdGUgYmFja3dhcmRzLCBzbyBpY29uIHNldHMgYWRkZWQgbGF0ZXIgaGF2ZSBwcmVjZWRlbmNlLgogICAgICAgICAgICBmb3IgKGxldCBpID0gaWNvblNldENvbmZpZ3MubGVuZ3RoIC0gMTsgaSA+PSAwOyBpLS0pIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGNvbmZpZyA9IGljb25TZXRDb25maWdzW2ldOwogICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5zdmdFbGVtZW50KSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGZvdW5kSWNvbiA9IHRoaXMuX2V4dHJhY3RTdmdJY29uRnJvbVNldChjb25maWcuc3ZnRWxlbWVudCwgaWNvbk5hbWUsIGNvbmZpZy5vcHRpb25zKTsKICAgICAgICAgICAgICAgICAgICBpZiAoZm91bmRJY29uKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmb3VuZEljb247CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBMb2FkcyB0aGUgY29udGVudCBvZiB0aGUgaWNvbiBVUkwgc3BlY2lmaWVkIGluIHRoZSBTdmdJY29uQ29uZmlnIGFuZCBjcmVhdGVzIGFuIFNWRyBlbGVtZW50CiAgICAgICAgICogZnJvbSBpdC4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gY29uZmlnCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfbG9hZFN2Z0ljb25Gcm9tQ29uZmlnKGNvbmZpZykgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fZmV0Y2hVcmwoY29uZmlnLnVybCkKICAgICAgICAgICAgICAgIC5waXBlKG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gc3ZnVGV4dAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgc3ZnVGV4dCA9PiB0aGlzLl9jcmVhdGVTdmdFbGVtZW50Rm9yU2luZ2xlSWNvbihzdmdUZXh0LCBjb25maWcub3B0aW9ucykpKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIExvYWRzIHRoZSBjb250ZW50IG9mIHRoZSBpY29uIHNldCBVUkwgc3BlY2lmaWVkIGluIHRoZSBTdmdJY29uQ29uZmlnIGFuZCBjcmVhdGVzIGFuIFNWRyBlbGVtZW50CiAgICAgICAgICogZnJvbSBpdC4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gY29uZmlnCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfbG9hZFN2Z0ljb25TZXRGcm9tQ29uZmlnKGNvbmZpZykgewogICAgICAgICAgICAvLyBJZiB0aGUgU1ZHIGZvciB0aGlzIGljb24gc2V0IGhhcyBhbHJlYWR5IGJlZW4gcGFyc2VkLCBkbyBub3RoaW5nLgogICAgICAgICAgICBpZiAoY29uZmlnLnN2Z0VsZW1lbnQpIHsKICAgICAgICAgICAgICAgIHJldHVybiBvZihjb25maWcuc3ZnRWxlbWVudCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2ZldGNoVXJsKGNvbmZpZy51cmwpLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBzdmdUZXh0CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBzdmdUZXh0ID0+IHsKICAgICAgICAgICAgICAgIC8vIEl0IGlzIHBvc3NpYmxlIHRoYXQgdGhlIGljb24gc2V0IHdhcyBwYXJzZWQgYW5kIGNhY2hlZCBieSBhbiBlYXJsaWVyIHJlcXVlc3QsIHNvIHBhcnNpbmcKICAgICAgICAgICAgICAgIC8vIG9ubHkgbmVlZHMgdG8gb2NjdXIgaWYgdGhlIGNhY2hlIGlzIHlldCB1bnNldC4KICAgICAgICAgICAgICAgIGlmICghY29uZmlnLnN2Z0VsZW1lbnQpIHsKICAgICAgICAgICAgICAgICAgICBjb25maWcuc3ZnRWxlbWVudCA9IHRoaXMuX3N2Z0VsZW1lbnRGcm9tU3RyaW5nKHN2Z1RleHQpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIGNvbmZpZy5zdmdFbGVtZW50OwogICAgICAgICAgICB9KSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDcmVhdGVzIGEgRE9NIGVsZW1lbnQgZnJvbSB0aGUgZ2l2ZW4gU1ZHIHN0cmluZywgYW5kIGFkZHMgZGVmYXVsdCBhdHRyaWJ1dGVzLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSByZXNwb25zZVRleHQKICAgICAgICAgKiBAcGFyYW0gez89fSBvcHRpb25zCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfY3JlYXRlU3ZnRWxlbWVudEZvclNpbmdsZUljb24ocmVzcG9uc2VUZXh0LCBvcHRpb25zKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc3ZnID0gdGhpcy5fc3ZnRWxlbWVudEZyb21TdHJpbmcocmVzcG9uc2VUZXh0KTsKICAgICAgICAgICAgdGhpcy5fc2V0U3ZnQXR0cmlidXRlcyhzdmcsIG9wdGlvbnMpOwogICAgICAgICAgICByZXR1cm4gc3ZnOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTZWFyY2hlcyB0aGUgY2FjaGVkIGVsZW1lbnQgb2YgdGhlIGdpdmVuIFN2Z0ljb25Db25maWcgZm9yIGEgbmVzdGVkIGljb24gZWxlbWVudCB3aG9zZSAiaWQiCiAgICAgICAgICogdGFnIG1hdGNoZXMgdGhlIHNwZWNpZmllZCBuYW1lLiBJZiBmb3VuZCwgY29waWVzIHRoZSBuZXN0ZWQgZWxlbWVudCB0byBhIG5ldyBTVkcgZWxlbWVudCBhbmQKICAgICAgICAgKiByZXR1cm5zIGl0LiBSZXR1cm5zIG51bGwgaWYgbm8gbWF0Y2hpbmcgZWxlbWVudCBpcyBmb3VuZC4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gaWNvblNldAogICAgICAgICAqIEBwYXJhbSB7P30gaWNvbk5hbWUKICAgICAgICAgKiBAcGFyYW0gez89fSBvcHRpb25zCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZXh0cmFjdFN2Z0ljb25Gcm9tU2V0KGljb25TZXQsIGljb25OYW1lLCBvcHRpb25zKSB7CiAgICAgICAgICAgIC8vIFVzZSB0aGUgYGlkPSJpY29uTmFtZSJgIHN5bnRheCBpbiBvcmRlciB0byBlc2NhcGUgc3BlY2lhbAogICAgICAgICAgICAvLyBjaGFyYWN0ZXJzIGluIHRoZSBJRCAodmVyc3VzIHVzaW5nIHRoZSAjaWNvbk5hbWUgc3ludGF4KS4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBpY29uU291cmNlID0gaWNvblNldC5xdWVyeVNlbGVjdG9yKGBbaWQ9IiR7aWNvbk5hbWV9Il1gKTsKICAgICAgICAgICAgaWYgKCFpY29uU291cmNlKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBDbG9uZSB0aGUgZWxlbWVudCBhbmQgcmVtb3ZlIHRoZSBJRCB0byBwcmV2ZW50IG11bHRpcGxlIGVsZW1lbnRzIGZyb20gYmVpbmcgYWRkZWQKICAgICAgICAgICAgLy8gdG8gdGhlIHBhZ2Ugd2l0aCB0aGUgc2FtZSBJRC4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBpY29uRWxlbWVudCA9ICgvKiogQHR5cGUgez99ICovIChpY29uU291cmNlLmNsb25lTm9kZSh0cnVlKSkpOwogICAgICAgICAgICBpY29uRWxlbWVudC5yZW1vdmVBdHRyaWJ1dGUoJ2lkJyk7CiAgICAgICAgICAgIC8vIElmIHRoZSBpY29uIG5vZGUgaXMgaXRzZWxmIGFuIDxzdmc+IG5vZGUsIGNsb25lIGFuZCByZXR1cm4gaXQgZGlyZWN0bHkuI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ICAgICAgICAgICAgY29uc3QgZGl2ID0gdGhpcy5fZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnRElWJyk7CiAgICAgICAgICAgIGRpdi5pbm5lckhUTUwgPSBzdHI7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc3ZnID0gKC8qKiBAdHlwZSB7P30gKi8gKGRpdi5xdWVyeVNlbGVjdG9yKCdzdmcnKSkpOwogICAgICAgICAgICBpZiAoIXN2ZykgewogICAgICAgICAgICAgICAgdGhyb3cgRXJyb3IoJzxzdmc+IHRhZyBub3QgZm91bmQnKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gc3ZnOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDb252ZXJ0cyBhbiBlbGVtZW50IGludG8gYW4gU1ZHIG5vZGUgYnkgY2xvbmluZyBhbGwgb2YgaXRzIGNoaWxkcmVuLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfdG9TdmdFbGVtZW50KGVsZW1lbnQpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBzdmcgPSB0aGlzLl9zdmdFbGVtZW50RnJvbVN0cmluZygnPHN2Zz48L3N2Zz4nKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBhdHRyaWJ1dGVzID0gZWxlbWVudC5hdHRyaWJ1dGVzOwogICAgICAgICAgICAvLyBDb3B5IG92ZXIgYWxsIHRoZSBhdHRyaWJ1dGVzIGZyb20gdGhlIGBzeW1ib2xgIHRvIHRoZSBuZXcgU1ZHLCBleGNlcHQgdGhlIGlkLgogICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGF0dHJpYnV0ZXMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIGNvbnN0IHsgbmFtZSwgdmFsdWUgfSA9IGF0dHJpYnV0ZXNbaV07CiAgICAgICAgICAgICAgICBpZiAobmFtZSAhPT0gJ2lkJykgewogICAgICAgICAgICAgICAgICAgIHN2Zy5zZXRBdHRyaWJ1dGUobmFtZSwgdmFsdWUpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZWxlbWVudC5jaGlsZE5vZGVzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICBpZiAoZWxlbWVudC5jaGlsZE5vZGVzW2ldLm5vZGVUeXBlID09PSB0aGlzLl9kb2N1bWVudC5FTEVNRU5UX05PREUpIHsKICAgICAgICAgICAgICAgICAgICBzdmcuYXBwZW5kQ2hpbGQoZWxlbWVudC5jaGlsZE5vZGVzW2ldLmNsb25lTm9kZSh0cnVlKSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHN2ZzsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU2V0cyB0aGUgZGVmYXVsdCBhdHRyaWJ1dGVzIGZvciBhbiBTVkcgZWxlbWVudCB0byBiZSB1c2VkIGFzIGFuIGljb24uCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHN2ZwogICAgICAgICAqIEBwYXJhbSB7Pz19IG9wdGlvbnMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9zZXRTdmdBdHRyaWJ1dGVzKHN2Zywgb3B0aW9ucykgewogICAgICAgICAgICBzdmcuc2V0QXR0cmlidXRlKCdmaXQnLCAnJyk7CiAgICAgICAgICAgIHN2Zy5zZXRBdHRyaWJ1dGUoJ2hlaWdodCcsICcxMDAlJyk7CiAgICAgICAgICAgIHN2Zy5zZXRBdHRyaWJ1dGUoJ3dpZHRoJywgJzEwMCUnK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gdGhlIGdlbmVyaWMgdHlwZSBvbiB0aGUKICAgICAgICAgICAgLy8gT2JzZXJ2YWJsZS4gRmlndXJlIG91dCB3aHkgYW5kIGZpeCBpdC4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCByZXEgPSB0aGlzLl9odHRwQ2xpZW50LmdldCh1cmwsIHsgcmVzcG9uc2VUeXBlOiAndGV4dCcgfSkucGlwZShmaW5hbGl6ZSgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB0aGlzLl9pblByb2dyZXNzVXJsRmV0Y2hlcy5kZWxldGUodXJsKSkpLCBzaGFyZSgpKTsKICAgICAgICAgICAgdGhpcy5faW5Qcm9ncmVzc1VybEZldGNoZXMuc2V0KHVybCwgcmVxKTsKICAgICAgICAgICAgcmV0dXJuIHJlcTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmVnaXN0ZXJzIGFuIGljb24gY29uZmlnIGJ5IG5hbWUgaW4gdGhlIHNwZWNpZmllZCBuYW1lc3BhY2UuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAdGVtcGxhdGUgVEhJUwogICAgICAgICAqIEB0aGlzIHtUSElTfQogICAgICAgICAqIEBwYXJhbSB7P30gbmFtZXNwYWNlIE5hbWVzcGFjZSBpbiB3aGljaCB0byByZWdpc3RlciB0aGUgaWNvbiBjb25maWcuCiAgICAgICAgICogQHBhcmFtIHs/fSBpY29uTmFtZSBOYW1lIHVuZGVyIHdoaWNoIHRvIHJlZ2lzdGVyIHRoZSBjb25maWcuCiAgICAgICAgICogQHBhcmFtIHs/fSBjb25maWcgQ29uZmlnIHRvIGJlIHJlZ2lzdGVyZWQuCiAgICAgICAgICogQHJldHVybiB7VEhJU30KICAgICAgICAgKi8KICAgICAgICBfYWRkU3ZnSWNvbkNvbmZpZyhuYW1lc3BhY2UsIGljb25OYW1lLCBjb25maWcpIHsKICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMpKS5fc3ZnSWNvbkNvbmZpZ3Muc2V0KGljb25LZXkobmFtZXNwYWNlLCBpY29uTmFtZSksIGNvbmZpZyk7CiAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZWdpc3RlcnMgYW4gaWNvbiBzZXQgY29uZmlnIGluIHRoZSBzcGVjaWZpZWQgbmFtZXNwYWNlLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHRlbXBsYXRlIFRISVMKICAgICAgICAgKiBAdGhpcyB7VEhJU30KICAgICAgICAgKiBAcGFyYW0gez99IG5hbWVzcGFjZSBOYW1lc3BhY2UgaW4gd2hpY2ggdG8gcmVnaXN0ZXIgdGhlIGljb24gY29uZmlnLgogICAgICAgICAqIEBwYXJhbSB7P30gY29uZmlnIENvbmZpZyB0byBiZSByZWdpc3RlcmVkLgogICAgICAgICAqIEByZXR1cm4ge1RISVN9CiAgICAgICAgICovCiAgICAgICAgX2FkZFN2Z0ljb25TZXRDb25maWcobmFtZXNwYWNlLCBjb25maWcpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjb25maWdOYW1lc3BhY2UgPSAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcykpLl9pY29uU2V0Q29uZmlncy5nZXQobmFtZXNwYWNlKTsKICAgICAgICAgICAgaWYgKGNvbmZpZ05hbWVzcGFjZSkgewogICAgICAgICAgICAgICAgY29uZmlnTmFtZXNwYWNlLnB1c2goY29uZmlnKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovICh0aGlzKSkuX2ljb25TZXRDb25maWdzLnNldChuYW1lc3BhY2UsIFtjb25maWddKTsKICAgICAgICAgICAgfQogICAgICA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3Rpb24gTUFUX0lDT05fTE9DQVRJT05fRkFDVE9SWSgpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgX2RvY3VtZW50ID0gaW5qZWN0KERPQ1VNRU5UJDEpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBfbG9jYXRpb24gPSBfZG9jdW1lbnQgPyBfZG9jdW1lbnQubG9jYXRpb24gOiBudWxsOwogICAgICAgIHJldHVybiB7CiAgICAgICAgICAgIC8vIE5vdGUgdGhhdCB0aGlzIG5lZWRzIHRvIGJlIGEgZnVuY3Rpb24sIHJhdGhlciB0aGFuIGEgcHJvcGVydHksIGJlY2F1c2UgQW5ndWxhcgogICAgICAgICAgICAvLyB3aWxsIG9ubHkgcmVzb2x2ZSBpdCBvbmNlLCBidXQgd2Ugd2FudCB0aGUgY3VycmVudCBwYXRoIG9uIGVhY2ggY2FsbC4KICAgICAgICAgICAgZ2V0UGF0aG5hbWU6ICgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IF9sb2NhdGlvbiA/IChfbG9jYXRpb24ucGF0aG5hbWUgKyBfbG9jYXRpb24uc2VhcmNoKSA6ICcnKQogICAgICAgIH07CiAgICB9CiAgICAvKioKICAgICAqIFNWRyBhdHRyaWJ1dGVzIHRoYXQgYWNjZXB0IGEgRnVuY0lSSSAoZS5nLiBgdXJsKDxzb21ldGhpbmc+KWApLgogICAgICogQHR5cGUgez99CiAgICAgKi8KICAgIGNvbnN0IGZ1bmNJcmlBdHRyaWJ1dGVzID0gWwogICAgICAgICdjbGlwLXBhdGgnLAogICAgICAgICdjb2xvci1wcm9maWxlJywKICAgICAgICAnc3JjJywKICAgICAgICAnY3Vyc29yJywKICAgICAgICAnZmlsbCcsCiAgICAgICAgJ2ZpbHRlcicsCiAgICAgICAgJ21hcmtlcicsCiAgICAgICAgJ21hcmtlci1zdGFydCcsCiAgICAgICAg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sIF9sb2NhdGlvbiwgX2Vycm9ySGFuZGxlcikgewogICAgICAgICAgICBzdXBlcihlbGVtZW50UmVmKTsKICAgICAgICAgICAgdGhpcy5faWNvblJlZ2lzdHJ5ID0gX2ljb25SZWdpc3RyeTsKICAgICAgICAgICAgdGhpcy5fbG9jYXRpb24gPSBfbG9jYXRpb247CiAgICAgICAgICAgIHRoaXMuX2Vycm9ySGFuZGxlciA9IF9lcnJvckhhbmRsZXI7CiAgICAgICAgICAgIHRoaXMuX2lubGluZSA9IGZhbHNlOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogU3Vic2NyaXB0aW9uIHRvIHRoZSBjdXJyZW50IGluLXByb2dyZXNzIFNWRyBpY29uIHJlcXVlc3QuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9jdXJyZW50SWNvbkZldGNoID0gU3Vic2NyaXB0aW9uLkVNUFRZOwogICAgICAgICAgICAvLyBJZiB0aGUgdXNlciBoYXMgbm90IGV4cGxpY2l0bHkgc2V0IGFyaWEtaGlkZGVuLCBtYXJrIHRoZSBpY29uIGFzIGhpZGRlbiwgYXMgdGhpcyBpcwogICAgICAgICAgICAvLyB0aGUgcmlnaHQgdGhpbmcgdG8gZG8gZm9yIHRoZSBtYWpvcml0eSBvZiBpY29uIHVzZS1jYXNlcy4KICAgICAgICAgICAgaWYgKCFhcmlhSGlkZGVuKSB7CiAgICAgICAgICAgICAgICBlbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQuc2V0QXR0cmlidXRlKCdhcmlhLWhpZGRlbicsICd0cnVlJyk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogV2hldGhlciB0aGUgaWNvbiBzaG91bGQgYmUgaW5saW5lZCwgYXV0b21hdGljYWxseSBzaXppbmcgdGhlIGljb24gdG8gbWF0Y2ggdGhlIGZvbnQgc2l6ZSBvZgogICAgICAgICAqIHRoZSBlbGVtZW50IHRoZSBpY29uIGlzIGNvbnRhaW5lZCBpbi4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBpbmxpbmUoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9pbmxpbmU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gaW5saW5lCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgaW5saW5lKGlubGluZSkgewogICAgICAgICAgICB0aGlzLl9pbmxpbmUgPSBjb2VyY2VCb29sZWFuUHJvcGVydHkoaW5saW5lKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogRm9udCBzZXQgdGhhdCB0aGUgaWNvbiBpcyBhIHBhcnQgb2YuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgZm9udFNldCgpIHsgcmV0dXJuIHRoaXMuX2ZvbnRTZXQ7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgZm9udFNldCh2YWx1ZSkgewogICAgICAgICAgICB0aGlzLl9mb250U2V0ID0gdGhpcy5fY2xlYW51cEZvbnRWYWx1ZSh2YWx1ZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIE5hbWUgb2YgYW4gaWNvbiB3aXRoaW4gYSBmb250IHNldC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBmb250SWNvbigpIHsgcmV0dXJuIHRoaXMuX2ZvbnRJY29uOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IGZvbnRJY29uKHZhbHVlKSB7CiAgICAgICAgICAgIHRoaXMuX2ZvbnRJY29uID0gdGhpcy5fY2xlYW51cEZvbnRWYWx1ZSh2YWx1ZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNwbGl0cyBhbiBzdmdJY29uIGJpbmRpbmcgdmFsdWUgaW50byBpdHMgaWNvbiBzZXQgYW5kIGljb24gbmFtZSBjb21wb25lbnRzLgogICAgICAgICAqIFJldHVybnMgYSAyLWVsZW1lbnQgYXJyYXkgb2YgWyhpY29uIHNldCksIChpY29uIG5hbWUpXS4KICAgICAgICAgKiBUaGUgc2VwYXJhdG9yIGZvciB0aGUgdHdvIGZpZWxkcyBpcyAnOicuIElmIHRoZXJlIGlzIG5vIHNlcGFyYXRvciwgYW4gZW1wdHkKICAgICAgICAgKiBzdHJpbmcgaXMgcmV0dXJuZWQgZm9yIHRoZSBpY29uIHNldCBhbmQgdGhlIGVudGlyZSB2YWx1ZSBpcyByZXR1cm5lZCBmb3IKICAgICAgICAgKiB0aGUgaWNvbiBuYW1lLiBJZiB0aGUgYXJndW1lbnQgaXMgZmFsc3ksIHJldHVybnMgYW4gYXJyYXkgb2YgdHdvIGVtcHR5IHN0cmluZ3MuCiAgICAgICAgICogVGhyb3dzIGFuIGVycm9yIGlmIHRoZSBuYW1lIGNvbnRhaW5zIHR3byBvciBtb3JlICc6JyBzZXBhcmF0b3JzLgogICAgICAgICAqIEV4YW1wbGVzOgogICAgICAgICAqICAgYCdzb2NpYWw6Y2FrZScgLT4gWydzb2NpYWwnLCAnY2FrZSddCiAgICAgICAgICogICAncGVuZ3VpbicgLT4gWycnLCAncGVuZ3VpbiddCiAgICAgICAgICogICBudWxsIC0+IFsnJywgJyddCiAgICAgICAgICogICAnYTpiOmMnIC0+ICh0aHJvd3MgRXJyb3IpYAogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBpY29uTmFtZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3NwbGl0SWNvbk5hbWUoaWNvbk5hbWUpIHsKICAgICAgICAgICAgaWYgKCFpY29uTmFtZSkgewogICAgICAgICAgICAgICAgcmV0dXJuIFsnJywgJyddOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcGFydHMgPSBpY29uTmFtZS5zcGxpdCgnOicpOwogICAgICAgICAgICBzd2l0Y2ggKHBhcnRzLmxlbmd0aCkgewogICAgICAgICAgICAgICAgY2FzZSAxOiByZXR1cm4gWycnLCBwYXJ0c1swXV07IC8vIFVzZSBkZWZhdWx0IG5hbWVzcGFjZS4KICAgICAgICAgICAgICAgIGNhc2UgMjogcmV0dXJuICgvKiogQHR5cGUgez99ICovIChwYXJ0cykpOwogICAgICAgICAgICAgICAgZGVmYXVsdDogdGhyb3cgRXJyb3IoYEludmFsaWQgaWNvbiBuYW1lOiAiJHtpY29uTmFtZX0iYCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBjaGFuZ2VzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uQ2hhbmdlcyhjaGFuZ2VzKSB7CiAgICAgICAgICAgIC8vIE9ubHkgdXBkYXRlIHRoZSBpbmxpbmUgU1ZHIGljb24gaWYgdGhlIGlucHV0cyBjaGFuZ2VkLCB0byBhdm9pZCB1bm5lY2Vzc2FyeSBET00gb3BlcmF0aW9ucy4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBzdmdJY29uQ2hhbmdlcyA9IGNoYW5nZXNbJ3N2Z0ljb24nXTsKICAgICAgICAgICAgaWYgKHN2Z0ljb25DaGFuZ2VzKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9jdXJyZW50SWNvbkZldGNoLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5zdmdJY29uKSB7CiAgICAgICAgICAgICAgICAgICAgY29uc3QgW25hbWVzcGFjZSwgaWNvbk5hbWVdID0gdGhpcy5fc3BsaXRJY29uTmFtZSh0aGlzLnN2Z0ljb24pOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX2N1cnJlbnRJY29uRmV0Y2ggPSB0aGlzLl9pY29uUmVnaXN0cnkuZ2V0TmFtZWRTdmdJY29uKGljb25OYW1lLCBuYW1lc3BhY2UpCiAgICAgICAgICAgICAgICAgICAgICAgIC5waXBlKHRha2UoMSkpCiAgICAgICAgICAgICAgICAgICAgICAgIC5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gc3ZnCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICBzdmcgPT4gdGhpcy5fc2V0U3ZnRWxlbWVudChzdmcpKSwgKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZXJyCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAoZXJyKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZXJyb3JNZXNzYWdlID0gYEVycm9yIHJldHJpZXZpbmcgaWNvbiAke25hbWVzcGFjZX06JHtpY29uTmFtZX0hICR7ZXJyLm1lc3NhZ2V9YDsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gQGJyZWFraW5nLWNoYW5nZSA5LjAuMCBfZXJyb3JIYW5kbGVyIHBhcmFtZXRlciB0byBiZSBtYWRlIHJlcXVpcmVkLgogICAgICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5fZXJyb3JIYW5kbGVyKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9lcnJvckhhbmRsZXIuaGFuZGxlRXJyb3IobmV3IEVycm9yKGVycm9yTWVzc2FnZSkpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihlcnJvck1lc3NhZ2UpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAoc3ZnSWNvbkNoYW5nZXMucHJldmlvdXNWYWx1ZSkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX2NsZWFyU3ZnRWxlbWVudCgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0aGlzLl91c2luZ0ZvbnRJY29uKCkpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3VwZGF0ZUZvbnRJY29uQ2xhc3NlcygpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkluaXQoKSB7CiAgICAgICAgICAgIC8vIFVwZGF0ZSBmb250IGNsYXNzZXMgYmVjYXVzZSBuZ09uQ2hhbmdlcyB3b24ndCBiZSBjYWxsZWQgaWYgbm9uZSBvZiB0aGUgaW5wdXRzIGFyZSBwcmVzZW50LAogICAgICAgICAgICAvLyBlLmcuIDxtYXQtaWNvbj5hcnJvdzwvbWF0LWljb24+IEluIHRoaXMgY2FzZSB3ZSBuZWVkIHRvIGFkZCBhIENTUyBjbGFzcyBmb3IgdGhlIGRlZmF1bHQgZm9udC4KICAgICAgICAgICAgaWYgKHRoaXMuX3VzaW5nRm9udEljb24oKSkgewogICAgICAgICAgICAgICAgdGhpcy5fdXBkYXRlRm9udEljb25DbGFzc2VzKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi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AgICAgICAgIGlmIChuZXdQYXRoICE9PSB0aGlzLl9wcmV2aW91c1BhdGgpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9wcmV2aW91c1BhdGggPSBuZXdQYXRoOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX3ByZXBlbmRQYXRoVG9SZWZlcmVuY2VzKG5ld1BhdGgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkRlc3Ryb3koKSB7CiAgICAgICAgICAgIHRoaXMuX2N1cnJlbnRJY29uRmV0Y2gudW5zdWJzY3JpYmUoKTsKICAgICAgICAgICAgaWYgKHRoaXMuX2VsZW1lbnRzV2l0aEV4dGVybmFsUmVmZXJlbmNlcykgewogICAgICAgICAgICAgICAgdGhpcy5fZWxlbWVudHNXaXRoRXh0ZXJuYWxSZWZlcmVuY2VzLmNsZWFyKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF91c2luZ0ZvbnRJY29uKCkgewogICAgICAgICAgICByZXR1cm4gIXRoaXMuc3ZnSWNvbjsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHN2ZwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3NldFN2Z0VsZW1lbnQoc3ZnKSB7CiAgICAgICAgICAgIHRoaXMuX2NsZWFyU3ZnRWxlbWVudCgpOwogICAgICAgICAgICAvLyBXb3JrYXJvdW5kIGZvciBJRTExIGFuZCBFZGdlIGlnbm9yaW5nIGBzdHlsZWAgdGFncyBpbnNpZGUgZHluYW1pY2FsbHktY3JlYXRlZCBTVkdzLgogICAgICAgICAgICAvLyB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yk7CiAgICAgICAgICAgICAgICB0aGlzLl9wcmVwZW5kUGF0aFRvUmVmZXJlbmNlcyhwYXRoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQuYXBwZW5kQ2hpbGQoc3ZnKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9jbGVhclN2Z0VsZW1lbnQoKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbGF5b3V0RWxlbWVudCA9IHRoaXMuX2VsZW1lbnRSZWYubmF0aXZlRWxlbWVudDsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgY2hpbGRDb3VudCA9IGxheW91dEVsZW1lbnQuY2hpbGROb2Rlcy5sZW5ndGg7CiAgICAgICAgICAgIGlmICh0aGlzLl9lbGVtZW50c1dpdGhFeHRlcm5hbFJlZmVyZW5jZXMpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2VsZW1lbnRzV2l0aEV4dGVybmFsUmVmZXJlbmNlcy5jbGVhcigpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIFJlbW92ZSBleGlzdGluZyBub24tZWxlbWVudCBjaGlsZCBub2RlcyBhbmQgU1ZHcywgYW5kIGFkZCB0aGUgbmV3IFNWRyBlbGVtZW50LiBOb3RlIHRoYXQKICAgICAgICAgICAgLy8gd2UgY2FuJ3QgdXNlIGlubmVySFRNTCwgYmVjYXVzZSBJRSB3aWxsIHRocm93IGlmIHRoZSBlbGVtZW50IGhhcyBhIGRhdGEgYmluZGluZy4KICAgICAgICAgICAgd2hpbGUgKGNoaWxkQ291bnQtLSkgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgY2hpbGQgPSBsYXlvdXRFbGVtZW50LmNoaWxkTm9kZXNbY2hpbGRDb3VudF07CiAgICAgICAgICAgICAgICAvLyAxIGNvcnJlc3BvbmRzIHRvIE5vZGUuRUxFTUVOVF9OT0RFLiBXZSByZW1vdmUgYWxsIG5vbi1lbGVtZW50IG5vZGVzIGluIG9yZGVyIHRvIGdldCByaWQKICAgICAgICAgICAgICAgIC8vIG9mIGFueSBsb29zZSB0ZXh0IG5vZGVzLCBhcyB3ZWxsIGFzIGFueSBTVkcgZWxlbWVudHMgaW4gb3JkZXIgdG8gcmVtb3ZlIGFueSBvbGQgaWNvbnMuCiAgICAgICAgICAgICAgICBpZiAoY2hpbGQubm9kZVR5cGUgIT09IDEgfHwgY2hpbGQubm9kZU5hbWUudG9Mb3dlckNhc2UoKSA9PT0gJ3N2ZycpIHsKICAgICAgICAgICAgICAgICAgICBsYXlvdXRFbGVtZW50LnJlbW92ZUNoaWxkKGNoaWxkKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3VwZGF0ZUZvbnRJY29uQ2xhc3NlcygpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLl91c2luZ0ZvbnRJY29uKCkpIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGVsZW0gPSB0aGlzLl9lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQ7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZm9udFNldENsYXNzID0gdGhpcy5mb250U2V0ID8KICAgICAgICAgICAgICAgIHRoaXMuX2ljb25SZWdpc3RyeS5jbGFzc05hbWVGb3JGb250QWxpYXModGhpcy5mb250U2V0KSA6CiAgICAgICAgICAgICAgICB0aGlzLl9pY29uUmVnaXN0cnkuZ2V0RGVmYXVsdEZvbnRTZXRDbGFzcygpOwogICAgICAgICAgICBpZiAoZm9udFNldENsYXNzICE9IHRoaXMuX3ByZXZpb3VzRm9udFNldENsYXNzKSB7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5fcHJldmlvdXNGb250U2V0Q2xhc3MpIHsKICAgICAgICAgICAgICAgICAgICBlbGVtLmNsYXNzTGlzdC5yZW1vdmUodGhpcy5fcHJldmlvdXNGb250U2V0Q2xhc3MpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKGZvbnRTZXRDbGFzcykgewogICAgICAgICAgICAgICAgICAgIGVsZW0uY2xhc3NMaXN0LmFkZChmb250U2V0Q2xhc3MpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdGhpcy5fcHJldmlvdXNGb250U2V0Q2xhc3MgPSBmb250U2V0Q2xhc3M7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHRoaXMuZm9udEljb24gIT0gdGhpcy5fcHJldmlvdXNGb250SWNvbkNsYXNzKSB7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5fcHJldmlvdXNGb250SWNvbkNsYXNzKSB7CiAgICAgICAgICAgICAgICAgICAgZWxlbS5jbGFzc0xpc3QucmVtb3ZlKHRoaXMuX3ByZXZpb3VzRm9udEljb25DbGFzcyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAodGhpcy5mb250SWNvbikgewogICAgICAgICAgICAgICAgICAgIGVsZW0uY2xhc3NMaXN0LmFkZCh0aGlzLmZvbnRJY29uKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuX3ByZXZpb3VzRm9udEljb25DbGFzcyA9IHRoaXMuZm9udEljb247CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ2xlYW5zIHVwIGEgdmFsdWUgdG8gYmUgdXN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lbnRzV2l0aEV4dGVybmFsUmVmZXJlbmNlczsKICAgICAgICAgICAgaWYgKGVsZW1lbnRzKSB7CiAgICAgICAgICAgICAgICBlbGVtZW50cy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gYXR0cnMKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKGF0dHJzLCBlbGVtZW50KSA9PiB7CiAgICAgICAgICAgICAgICAgICAgYXR0cnMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBhdHRyCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICBhdHRyID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgZWxlbWVudC5zZXRBdHRyaWJ1dGUoYXR0ci5uYW1lLCBgdXJsKCcke3BhdGh9IyR7YXR0ci52YWx1ZX0nKWApOwogICAgICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDYWNoZXMgdGhlIGNoaWxkcmVuIG9mIGFuIFNWRyBlbGVtZW50IHRoYXQgaGF2ZSBgdXJsKClgCiAgICAgICAgICogcmVmZXJlbmNlcyB0aGF0IHdlIG5lZWQgdG8gcHJlZml4IHdpdGggdGhlIGN1cnJlbnQgcGF0aC4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2NhY2hlQ2hpbGRyZW5XaXRoRXh0ZXJuYWxSZWZlcmVuY2VzKGVsZW1lbnQpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBlbGVtZW50c1dpdGhGdW5jSXJpID0gZWxlbWVudC5xdWVyeVNlbGVjdG9yQWxsKGZ1bmNJcmlBdHRyaWJ1dGVTZWxlY3Rvcik7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZWxlbWVudHMgPSB0aGlzLl9lbGVtZW50c1dpdGhFeHRlcm5hbFJlZmVyZW5jZXMgPQogICAgICAgICAgICAgICAgdGhpcy5fZWxlbWVudHNXaXRoRXh0ZXJuYWxSZWZlcmVuY2VzIHx8IG5ldyBNYXAoKTsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBlbGVtZW50c1dpdGhGdW5jSXJpLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICBmdW5jSXJpQXR0cmlidXRlcy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gYXR0cgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgYXR0ciA9PiB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGVsZW1lbnRXaXRoUmVmZXJlbmNlID0gZWxlbWVudHNXaXRoRnVuY0lyaVtpXTsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgdmFsdWUgPSBlbGVtZW50V2l0aFJlZmVyZW5jZS5nZXRBdHRyaWJ1dGUoYXR0cik7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IG1hdGNoID0gdmFsdWUgPyB2YWx1ZS5tYXRjaChmdW5jSXJpUGF0dGVybikgOiBudWxsOwogICAgICAgICAgICAgICAgICAgIGlmIChtYXRjaCkgewogICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhdHRyaWJ1dGVzID0gZWxlbWVudHMuZ2V0KGVsZW1lbnRXaXRoUmVmZXJlbmNlKTsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFhdHRyaWJ1dGVzKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdHRyaWJ1dGVzID0gW107CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGVtZW50cy5zZXQoZWxlbWVudFdpdGhSZWZlcmVuY2UsIGF0dHJpYnV0ZXMpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovIChhdHRyaWJ1dGVzKSkucHVzaCh7IG5hbWU6IGF0dHIsIHZhbHVlOiBtYXRjaFsxXSB9KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICBNYXRJY29uLsm1ZmFjID0gZnVuY3Rpb24gTWF0SWNvbl9GYWN0b3J5KHQpIHsgcmV0dXJuIG5ldyAodCB8fCBNYXRJY29uKSjJtcm1ZGlyZWN0aXZlSW5qZWN0KEVsZW1lbnRSZWYpLCDJtcm1ZGlyZWN0aXZlSW5qZWN0KE1hdEljb25SZWdpc3RyeSksIMm1ybVpbmplY3RBdHRyaWJ1dGUoJ2FyaWEtaGlkZGVuJyksIMm1ybVkaXJlY3RpdmVJbmplY3QoTUFUX0lDT05fTE9DQVRJT04sIDgpLCDJtcm1ZGlyZWN0aXZlSW5qZWN0KEVycm9ySGFuZGxlciwgOCkpOyB9OwogICAgTWF0SWNvbi7JtWNtcCA9IMm1ybVkZWZpbmVDb21wb25lbnQoeyB0eXBlOiBNYXRJY29uLCBzZWxlY3RvcnM6IFtbIm1hdC1pY29uIl1dLCBob3N0QXR0cnM6IFsicm9sZSI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gPSAnaHR0cHM6Ly90ZW5zb3Jib2FyZC5kZXYvP3V0bV9zb3VyY2U9dGVuc29yYm9hcmQnOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uQ2xvc2UoKSB7CiAgICAgICAgICAgIHRoaXMuZGlhbG9nUmVmLmNsb3NlKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0Q29tbWFuZFRleHQoKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5sb2dkaXIpIHsKICAgICAgICAgICAgICAgIC8vIFdpdGhvdXQgbG9nZGlyIHdlIHByaW50IGEgbGl0ZXJhbCAne2xvZ2Rpcn0nIHN0cmluZyB0aGF0IHVzZXIgd2lsbAogICAgICAgICAgICAgICAgLy8gaGF2ZSB0byBtYW51YWxseSBzdWJzdGl0dXRlLgogICAgICAgICAgICAgICAgcmV0dXJuICd0ZW5zb3Jib2FyZCBkZXYgdXBsb2FkIC0tbG9nZGlyIHtsb2dkaXJ9JzsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIC8vIFdpdGggbG9nZGlyIHdlIHN1YnN0aXR1dGUgdGhlIHZhbHVlIGludG8gdGhlIGNvbW1hbmQgZm9yIHRoZSB1c2VyLgogICAgICAgICAgICAgICAgLy8gV2UgYXNzdW1lIHRoYXQgbG9nZGlyIGlzIHN1ZmZpY2llbnRseSBsb25nIHRoYXQgd2Ugd2FudCB0byBwcmludCBpdCBvbgogICAgICAgICAgICAgICAgLy8gdGhlIG5leHQgbGluZS4gSWYgdGhlIGxvZ2RpciB2YWx1ZSBpcyBzdGlsbCB0b28gbG9uZyB0aGVuIHRoZSBDU1Mgd2lsbAogICAgICAgICAgICAgICAgLy8gcmVuZGVyIGEgc2Nyb2xsYmFyIHVuZGVybmVhdGguCiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBlc2NhcGVkTG9nZGlyID0gdGhpcy5sb2dkaXIucmVwbGFjZSgvJy9nLCAiJ1xcJyciKTsKICAgICAgICAgICAgICAgIHJldHVybiAidGVuc29yYm9hcmQgZGV2IHVwbG9hZCAtLWxvZ2RpciBcXFxuICAgICciICsgZXNjYXBlZExvZ2RpciArICInIjsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIFRiZGV2VXBsb2FkRGlhbG9nQ29tcG9uZW50LmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBDb21wb25lbnQsIGFyZ3M6IFt7CiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3I6ICd0YmRldi11cGxvYWQtZGlhbG9nLWNvbXBvbmVudCcsCiAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGVVcmw6ICcuL3RiZGV2X3VwbG9hZF9kaWFsb2dfY29tcG9uZW50Lm5nLmh0bWwnLAogICAgICAgICAgICAgICAgICAgIHN0eWxlVXJsczogWycuL3RiZGV2X3VwbG9hZF9kaWFsb2dfY29tcG9uZW50LmNzcyddLAogICAgICAgICAgICAgICAgfSxdIH0sCiAgICBdOwogICAgLyoqIEBub2NvbGxhcHNlICovCiAgICBUYmRldlVwbG9hZERpYWxvZ0NvbXBvbmVudC5jdG9yUGFyYW1ldGVycyA9ICgpID0+IFsKICAgICAgICB7IHR5cGU6IE1hdERpYWxvZ1JlZiB9CiAgICBdOwogICAgVGJkZXZVcGxvYWREaWFsb2dDb21wb25lbnQucHJvcERlY29yYXRvcnMgPSB7CiAgICAgICAgbG9nZGlyOiBbeyB0eXBlOiBJbnB1dCB9XQogICAgfTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLyBUYmRldlVwbG9hZERpYWxvZ0NvbXBvbmVudC7JtWZhYyA9IGZ1bmN0aW9uIFRiZGV2VXBsb2FkRGlhbG9nQ29tcG9uZW50X0ZhY3RvcnkodCkgeyBy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LG1pc3NpbmdSZXR1cm4sdW51c2VkUHJpdmF0ZU1lbWJlcnMsdXNlbGVzc0NvZGV9IGNoZWNrZWQgYnkgdHNjCiAgICAgKi8KICAgIC8qKiBAdHlwZSB7P30gKi8KICAgIGNvbnN0IGdldExvZ2RpciA9IGNyZWF0ZVNlbGVjdG9yKGdldEVudmlyb25tZW50LCAoLyoqCiAgICAgKiBAcGFyYW0gez99IGVudmlyb25tZW50CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICAoZW52aXJvbm1lbnQpID0+IGVudmlyb25tZW50LmRhdGFfbG9jYXRpb24pKTsKICAgIGNsYXNzIFRiZGV2VXBsb2FkRGlhbG9nQ29udGFpbmVyIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHN0b3JlCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3Ioc3RvcmUpIHsKICAgICAgICAgICAgdGhpcy5zdG9yZSA9IHN0b3JlOwogICAgICAgICAgICB0aGlzLmxvZ2RpciQgPSB0aGlzLnN0b3JlLnBpcGUoc2VsZWN0KGdldExvZ2RpcikpOwogICAgICAgIH0KICAgIH0KICAgIFRiZGV2VXBsb2FkRGlhbG9nQ29udGFpbmVyLmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBDb21wb25lbnQsIGFyZ3M6IFt7CiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3I6ICd0YmRldi11cGxvYWQtZGlhbG9nJywKICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogYAogICAgPHRiZGV2LXVwbG9hZC1kaWFsb2ctY29tcG9uZW50CiAgICAgIFtsb2dkaXJdPSJsb2dkaXIkIHwgYXN5bmMiCiAgICA+PC90YmRldi11cGxvYWQtZGlhbG9nLWNvbXBvbmVudD4KICBgLAogICAgICAgICAgICAgICAgfSxdIH0sCiAgICBdOwogICAgLyoqIEBub2NvbGxhcHNlICovCiAgICBUYmRldlVwbG9hZERpYWxvZ0NvbnRhaW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mFtZSB2YWx1ZXMgdGhhdCB3aWxsIHRyaWdnZXIgdGhlIGJ1dHRvbiB0byBhcHBlYXIuCiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBMT0NBTF9IT1NUTkFNRVMgPSBbJ2xvY2FsaG9zdCcsICcxMjcuMC4wLjEnXTsKICAgIGNsYXNzIFRiZGV2VXBsb2FkQnV0dG9uQ29tcG9uZW50IHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHdpbmRvdwogICAgICAgICAqIEBwYXJhbSB7P30gZGlhbG9nCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3Iod2luZG93LCBkaWFsb2cpIHsKICAgICAgICAgICAgdGhpcy53aW5kb3cgPSB3aW5kb3c7CiAgICAgICAgICAgIHRoaXMuZGlhbG9nID0gZGlhbG9nOwogICAgICAgICAgICB0aGlzLnNob3duID0gTE9DQUxfSE9TVE5BTUVTLmluY2x1ZGVzKHdpbmRvdy5sb2NhdGlvbi5ob3N0bmFtZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb3BlbkRpYWxvZygpIHsKICAgICAgICAgICAgdGhpcy5kaWFsb2cub3BlbihUYmRldlVwbG9hZERpYWxvZ0NvbnRhaW5lciwgewogICAgICAgICAgICAgICAgd2lkdGg6ICc1NjBweCcsCiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgIH0KICAgIFRiZGV2VXBsb2FkQnV0dG9uQ29tcG9uZW50LmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBDb21wb25lbnQsIGFyZ3M6IFt7CiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3I6ICd0YmRldi11cGxvYWQtYnV0dG9uJywKICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZVVybDogJy4vdGJkZXZfdXBsb2FkX2J1dHRvbl9jb21wb25lbnQubmcuaHRtbCcsCiAgICAgICAgICAg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AgICAgICAgIC5zZWxlY3QoZ2V0UGx1Z2luc0xpc3RMb2FkZWQpCiAgICAgICAgICAgICAgICAucGlwZSh3aXRoTGF0ZXN0RnJvbSh0aGlzLnJlbG9hZERpc2FibGVkJCksIG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoW2xvYWRlZCwgcmVsb2FkRGlzYWJsZWRdKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gIXJlbG9hZERpc2FibGVkICYmIGxvYWRlZC5zdGF0ZSA9PT0gRGF0YUxvYWRTdGF0ZS5MT0FESU5HOwogICAgICAgICAgICB9KSkpOwogICAgICAgICAgICB0aGlzLmxhc3RMb2FkZWRUaW1lSW5NcyQgPSB0aGlzLnN0b3JlCiAgICAgICAgICAgICAgICAuc2VsZWN0KGdldFBsdWdpbnNMaXN0TG9hZGVkKQogICAgICAgICAgICAgICAgLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBsb2FkZWQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChsb2FkZWQpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiBsb2FkZWQubGFzdExvYWRlZFRpbWVJbk1zOwogICAgICAgICAgICB9KSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHRyaWdnZXJSZWxvYWQoKSB7CiAgICAgICAgICAgIHRoaXMuc3RvcmUuZGlzcGF0Y2gobWFudWFsUmVsb2FkKCkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGRhdGVTdHJpbmcKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldFJlbG9hZFRpdGxlKGRhdGVTdHJpbmcpIHsKICAgICAgICAgICAgaWYgKCFkYXRlU3RyaW5nKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gJ0xvYWRpbmcuLi4nOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBgTGFzdCBVcGRhdGVkOiAke2RhdGVTdHJpbmd9YDsKICAgICAgICB9CiAgICB9CiAgICBSZWxvYWRDb250YWluZXIuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IENvbXBvbmVudCwgYXJnczogW3sKICAgICAgICAgICAgICAgICAgICBzZWxlY3RvcjogJ2FwcC1oZWFkZXItcmVsb2FkJywKICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogYAogICAgPGJ1dHRvbgogICAgICBjbGFzcz0icmVsb2FkLWJ1dHRvbiIKICAgICAgW2NsYXNzLmxvYWRpbmddPSJpc1JlbG9hZGluZyQgfCBhc3luYyIKICAgICAgbWF0LWljb24tYnV0dG9uCiAgICAgIChjbGljayk9InRyaWdnZXJSZWxvYWQoKSIKICAgICAgW3RpdGxlXT0iZ2V0UmVsb2FkVGl0bGUobGFzdExvYWRlZFRpbWVJbk1zJCB8IGFzeW5jIHwgZGF0ZTogJ21lZGl1bScpIgogICAgICBbZGlzYWJsZWRdPSJyZWxvYWREaXNhYmxlZCQgfCBhc3luYyIKICAgID4KICAgICAgPG1hdC1pY29uIGNsYXNzPSJyZWZyZXNoLWljb24iIHN2Z0ljb249InJlZnJlc2hfMjRweCI+PC9tYXQtaWNvbj4KICAgIDwvYnV0dG9uPgogIGAsCiAgICAgICAgICAgICAgICAgICAgc3R5bGVzOiBbCiAgICAgICAgICAgICAgICAgICAgICAgIGAKICAgICAgLnJlbG9hZC1idXR0b24sCiAgICAgIC5yZWZyZXNoLWljb24gewogICAgICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgICAgZGlzcGxheTogZmxleDsKICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjsKICAgICAgfQoKICAgICAgLnJlbG9hZC1idXR0b24ubG9hZGluZyB7CiAgICAgICAgYW5pbWF0aW9uOiByb3RhdGUgMnMgbGluZWFyIGluZmluaXRlOwogICAgICB9CgogICAgICBAa2V5ZnJhbWVzIHJvdGF0ZSB7CiAgICAgICAgMCUgewogICAgICAgICAgdHJhbnNmb3JtOiByb3RhdGUoMGRlZyk7CiAgICAgICAgfQogICAgICAgIDUwJSB7CiAgICAgICAgICB0cmFuc2Zvcm06IHJvdGF0ZSgxODBkZWcpOwogICAgICAgIH0KICAgICAgICAxMDAlIHsKICAgICAgICAgIHRyYW5zZm9ybTogcm90YXRlKDM2MGRlZyk7CiAgICAgICAgfQogICAgICB9CiAgICBgLAogICAgICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICB9LF0gfSwKICAgIF07CiAgICAvKiogQG5vY29sbGFwc2UgKi8KICAgIFJlbG9hZENvbnRhaW5lci5jdG9yUGFyYW1ldGVycyA9ICgpID0+IFsKICAgICAgICB7IHR5cGU6IFN0b3JlIH0KICAgIF07CiAgICAvKiogQG5vY29sbGFwc2UgKi8gUmVsb2FkQ29udGFpbmVyLsm1ZmFjID0gZnVuY3Rpb24gUmVsb2FkQ29udGFpbmVyX0ZhY3RvcnkodCkgeyByZXR1cm4gbmV3ICh0IHx8IFJlbG9hZENvbnRhaW5lcikoybXJtWRpcmVjdGl2ZUluamVjdChTdG9yZSkpOyB9OwogICAgLyoqIEBub2NvbGxhcHNlICovIFJlbG9hZENvbnRhaW5lci7JtWNtcCA9IMm1ybVkZWZpbmVDb21wb25lbnQoeyB0eXBlOiBSZWxvYWRDb250YWluZXIsIHNlbGVjdG9yczogW1siYXBwLWhlYWRlci1yZWxvYWQiXV0sIGRlY2xzOiA2LCB2YXJzOiAxMywgY29uc3RzOiBbWyJtYXQtaWNvbi1idXR0b24iLCAiIiwgMSwgInJlbG9hZC1idXR0b24iLCAzLCAidGl0bGUiLCAiZGlzYWJsZWQiLCAiY2xpY2siXSwgWyJzdmdJY29uIi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lc2lnbi9jb21wb25lbnRzL3NlbGVjdGlvbi1jb250cm9scy5odG1sCiAgICAgKi8KICAgIGNsYXNzIE1hdENoZWNrYm94IGV4dGVuZHMgX01hdENoZWNrYm94TWl4aW5CYXNlIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnRSZWYKICAgICAgICAgKiBAcGFyYW0gez99IF9jaGFuZ2VEZXRlY3RvclJlZgogICAgICAgICAqIEBwYXJhbSB7P30gX2ZvY3VzTW9uaXRvcgogICAgICAgICAqIEBwYXJhbSB7P30gX25nWm9uZQogICAgICAgICAqIEBwYXJhbSB7P30gdGFiSW5kZXgKICAgICAgICAgKiBAcGFyYW0gez99IF9jbGlja0FjdGlvbgogICAgICAgICAqIEBwYXJhbSB7Pz19IF9hbmltYXRpb25Nb2RlCiAgICAgICAgICogQHBhcmFtIHs/PX0gX29wdGlvbnMKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihlbGVtZW50UmVmLCBfY2hhbmdlRGV0ZWN0b3JSZWYsIF9mb2N1c01vbml0b3IsIF9uZ1pvbmUsIHRhYkluZGV4LCBfY2xpY2tBY3Rpb24sIF9hbmltYXRpb25Nb2RlLCBfb3B0aW9ucykgewogICAgICAgICAgICBzdXBlcihlbGVtZW50UmVmKTsKICAgICAgICAgICAgdGhpcy5fY2hhbmdlRGV0ZWN0b3JSZWYgPSBfY2hhbmdlRGV0ZWN0b3JSZWY7CiAgICAgICAgICAgIHRoaXMuX2ZvY3VzTW9uaXRvciA9IF9mb2N1c01vbml0b3I7CiAgICAgICAgICAgIHRoaXMuX25nWm9uZSA9IF9uZ1pvbmU7CiAgICAgICAgICAgIHRoaXMuX2NsaWNrQWN0aW9uID0gX2NsaWNrQWN0aW9uOwogICAgICAgICAgICB0aGlzLl9hbmltYXRpb25Nb2RlID0gX2FuaW1hdGlvbk1vZGU7CiAgICAgICAgICAgIHRoaXMuX29wdGlvbnMgPSBfb3B0aW9uczsKICAgICAgICAg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UgdmFsdWUgd2lsbCBiZSBhcHBsaWVkIHRvIHRoZSBpbnB1dCBlbGVtZW50IGlmIHByZXNlbnQKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMubmFtZSA9IG51bGw7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBFdmVudCBlbWl0dGVkIHdoZW4gdGhlIGNoZWNrYm94J3MgYGNoZWNrZWRgIHZhbHVlIGNoYW5nZXMuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmNoYW5nZSA9IG5ldyBFdmVudEVtaXR0ZXIoKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEV2ZW50IGVtaXR0ZWQgd2hlbiB0aGUgY2hlY2tib3gncyBgaW5kZXRlcm1pbmF0ZWAgdmFsdWUgY2hhbmdlcy4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuaW5kZXRlcm1pbmF0ZUNoYW5nZSA9IG5ldyBFdmVudEVtaXR0ZXIoKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIENhbGxlZCB3aGVuIHRoZSBjaGVja2JveCBpcyBibHVycmVkLiBOZWVkZWQgdG8gcHJvcGVybHkgaW1wbGVtZW50IENvbnRyb2xWYWx1ZUFjY2Vzc29yLgogICAgICAgICAgICAgKiBcQGRvY3MtcHJpdmF0ZQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fb25Ub3VjaGVkID0gKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4geyB9KTsKICAgICAgICAgICAgdGhpcy5fY3VycmVudEFuaW1hdGlvbkNsYXNzID0gJyc7CiAgICAgICAgICAgIHRoaXMuX2N1cnJlbnRDaGVja1N0YXRlID0gMCAvKiBJbml0ICovOwogICAgICAgICAgICB0aGlzLl9jb250cm9sVmFsdWVBY2Nlc3NvckNoYW5nZUZuID0gKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4geyB9KTsKICAgICAgICAgICAgdGhpcy5fY2hlY2tlZCA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLl9kaXNhYmxlZCA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLl9pbmRldGVybWluYXRlID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuX29wdGlvbnMgPSB0aGlzLl9vcHRpb25zIHx8IHt9OwogICAgICAgICAgICBpZiAodGhpcy5fb3B0aW9ucy5jb2xvcikgewogICAgICAgICAgICAgICAgdGhpcy5jb2xvciA9IHRoaXMuX29wdGlvbnMuY29sb3I7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy50YWJJbmRleCA9IHBhcnNlSW50KHRhYkluZGV4KSB8fCAwOwogICAgICAgICAgICB0aGlzLl9mb2N1c01vbml0b3IubW9uaXRvcihlbGVtZW50UmVmLCB0cnVlKS5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGZvY3VzT3JpZ2luCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBmb2N1c09yaWdpbiA9PiB7CiAgICAgICAgICAgICAgICBpZiAoIWZvY3VzT3JpZ2luKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gV2hlbiBhIGZvY3VzZWQgZWxlbWVudCBiZWNvbWVzIGRpc2FibGVkLCB0aGUgYnJvd3NlciAqaW1tZWRpYXRlbHkqIGZpcmVzIGEgYmx1ciBldmVudC4KICAgICAgICAgICAgICAgICAgICAvLyBBbmd1bGFyIGRvZXMgbm90IGV4cGVjdCBldmVudHMgdG8gYmUgcmFpc2VkIGR1cmluZyBjaGFuZ2UgZGV0ZWN0aW9uLCBzbyBhbnkgc3RhdGUgY2hhbmdlCiAgICAgICAgICAgICAgICAgICAgLy8gKHN1Y2ggYXMgYSBmb3JtIGNvbnRyb2wncyAnbmctdG91Y2hlZCcpIHdpbGwgY2F1c2UgYSBjaGFuZ2VkLWFmdGVyLWNoZWNrZWQgZXJyb3IuCiAgICAgICAgICAgICAgICAgICAgLy8gU2VlIGh0dHBzOi8vZ2l0aHViLmNvbS9hbmd1bGFyL2FuZ3VsYXIvaXNzdWVzLzE3NzkzLiBUbyB3b3JrIGFyb3VuZCB0aGlzLCB3ZSBkZWZlcgogICAgICAgICAgICAgICAgICAgIC8vIHRlbGxpbmcgdGhlIGZvcm0gY29udHJvbCBpdCBoYXMgYmVlbiB0b3VjaGVkIHVudGlsIHRoZSBuZXh0IHRpY2suCiAgICAgICAgICAgICAgICAgICAgUHJvbWlzZS5yZXNvbHZlKCkudGhlbigoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX29uVG91Y2hlZCgpOwogICAgICAgICAgICAgICAgICAgICAgICBfY2hhbmdlRGV0ZWN0b3JSZWYubWFya0ZvckNoZWNrKCk7CiAgICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIC8vIFRPRE86IFJlbW92ZSB0aGlzIGFmdGVyIHRoZSBgX2NsaWNrQWN0aW9uYCBwYXJhbWV0ZXIgaXMgcmVtb3ZlZCBhcyBhbiBpbmplY3Rpb24gcGFyYW1ldGVyLgogICAgICAgICAgICB0aGlzLl9jbGlja0FjdGlvbiA9IHRoaXMuX2NsaWNrQWN0aW9uIHx8IHRoaXMuX29wdGlvbnMuY2xpY2tBY3Rpb247CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgdGhlIHVuaXF1ZSBpZCBmb3IgdGhlIHZpc3VhbCBoaWRkZW4gaW5wdXQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgaW5wdXRJZCgpIHsgcmV0dXJuIGAke3RoaXMuaWQgfHwgdGhpcy5fdW5pcXVlSWR9LWlucHV0YDsgfQogICAgICAgIC8qKgogICAgICAgICAqIFdoZXRoZXIgdGhlIGNoZWNrYm94IGlzIHJlcXVpcmVkLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHJlcXVpcmVkKCkgeyByZXR1cm4gdGhpcy5fcmVxdWlyZWQ7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgcmVxdWlyZWQodmFsdWUpIHsgdGhpcy5fcmVxdWlyZWQgPSBjb2VyY2VCb29sZWFuUHJvcGVydHkodmFsdWUpOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ0FmdGVyVmlld0luaXQoKSB7CiAgICAgICAgICAgIHRoaXMuX3N5bmNJbmRldGVybWluYXRlKHRoaXMuX2luZGV0ZXJtaW5hdGUpOwogICAgICAgIH0KICAgICAgICAvLyBUT0RPOiBEZWxldGUgbmV4dCBtYWpvciByZXZpc2lvbi4KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nQWZ0ZXJWaWV3Q2hlY2tlZCgpIHsgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkRlc3Ryb3koKSB7CiAgICAgICAgICAgIHRoaXMuX2ZvY3VzTW9uaXRvci5zdG9wTW9uaXRvcmluZyh0aGlzLl9lbGVtZW50UmVmKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogV2hldGhlciB0aGUgY2hlY2tib3ggaXMgY2hlY2tlZC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBjaGVja2VkKCkgeyByZXR1cm4gdGhpcy5fY2hlY2tlZDsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBjaGVja2VkKHZhbHVlKSB7CiAgICAgICAgICAgIGlmICh2YWx1ZSAhPSB0aGlzLmNoZWNrZWQpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2NoZWNrZWQgPSB2YWx1ZTsKICAgICAgICAgICAgICAgIHRoaXMuX2NoYW5nZURldGVjdG9yUmVmLm1hcmtGb3JDaGVjaygpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFdoZXRoZXIgdGhlIGNoZWNrYm94IGlzIGRpc2FibGVkLiBUaGlzIGZ1bGx5IG92ZXJyaWRlcyB0aGUgaW1wbGVtZW50YXRpb24gcHJvdmlkZWQgYnkKICAgICAgICAgKiBtaXhpbkRpc2FibGVkLCBidXQgdGhlIG1peGluIGlzIHN0aWxsIHJlcXVpcmVkIGJlY2F1c2UgbWl4aW5UYWJJbmRleCByZXF1aXJlcyBpdC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBkaXNhYmxlZCgpIHsgcmV0dXJuIHRoaXMuX2Rpc2FibGVkOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IGRpc2FibGVkKHZhbHVlKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbmV3VmFsdWUgPSBjb2VyY2VCb29sZWFuUHJvcGVydHkodmFsdWUpOwogICAgICAgICAgICBpZiAobmV3VmFsdWUgIT09IHRoaXMuZGlzYWJsZWQpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2Rpc2FibGVkID0gbmV3VmFsdWU7CiAgICAgICAgICAgICAgICB0aGlzLl9jaGFuZ2VEZXRlY3RvclJlZi5tYXJrRm9yQ2hlY2soKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGV0aGVyIHRoZSBjaGVja2JveCBpcyBpbmRldGVybWluYXRlLiBUaGlzIGlzIGFsc28ga25vd24gYXMgIm1peGVkIiBtb2RlIGFuZCBjYW4gYmUgdXNlZCB0bwogICAgICAgICAqIHJlcHJlc2VudCBhIGNoZWNrYm94IHdpdGggdGhyZWUgc3RhdGVzLCBlLmcuIGEgY2hlY2tib3ggdGhhdCByZXByZXNlbnRzIGEgbmVzdGVkIGxpc3Qgb2YKICAgICAgICAgKiBjaGVja2FibGUgaXRlbXMuIE5vdGUgdGhhdCB3aGVuZXZlciBjaGVja2JveCBpcyBtYW51YWxseSBjbGlja2VkLCBpbmRldGVybWluYXRlIGlzIGltbWVkaWF0ZWx5CiAgICAgICAgICogc2V0IHRvIGZhbHNlLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGluZGV0ZXJtaW5hdGUoKSB7IHJldHVybiB0aGlzLl9pbmRldGVybWluYXRlOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IGluZGV0ZXJtaW5hdGUodmFsdWUpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjaGFuZ2VkID0gdmFsdWUgIT0gdGhpcy5faW5kZXRlcm1pbmF0ZTsKICAgICAgICAgICAgdGhpcy5faW5kZXRlcm1pbmF0ZSA9IGNvZXJjZUJvb2xlYW5Qcm9wZXJ0eSh2YWx1ZSk7CiAgICAgICAgICAgIGlmIChjaGFuZ2VkKSB7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5faW5kZXRlcm1pbmF0ZSkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX3RyYW5zaXRpb25DaGVja1N0YXRlKDMgLyogSW5kZXRlcm1pbmF0ZSAqLyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl90cmFuc2l0aW9uQ2hlY2tTdGF0ZSh0aGlzLmNoZWNrZWQgPyAxIC8qIENoZWNrZWQgKi8gOiAyIC8qIFVuY2hlY2tlZCAqLyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLmluZGV0ZXJtaW5hdGVDaGFuZ2UuZW1pdCh0aGlzLl9pbmRldGVybWluYXRlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9zeW5jSW5kZXRlcm1pbmF0ZSh0aGlzLl9pbmRldGVybWluYXRlKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfaXNSaXBwbGVEaXNhYmxlZCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuZGlzYWJsZVJpcHBsZSB8fCB0aGlzLmRpc2FibGVkOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBNZXRob2QgYmVpbmcgY2FsbGVkIHdoZW5ldmVyIHRoZSBsYWJlbCB0ZXh0IGNoYW5nZXMuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfb25MYWJlbFRleHRDaGFuZ2UoKSB7CiAgICAgICAgICAgIC8vIFNpbmNlIHRoZSBldmVudCBvZiB0aGUgYGNka09ic2VydmVDb250ZW50YCBkaXJlY3RpdmUgcnVucyBvdXRzaWRlIG9mIHRoZSB6b25lLCB0aGUgY2hlY2tib3gKICAgICAgICAgICAgLy8gY29tcG9uZW50IHdpbGwgYmUgb25seSBtYXJrZWQgZm9yIGNoZWNrLCBidXQgbm8gYWN0dWFsIGNoYW5nZSBkZXRlY3Rpb24gcnVucyBhdXRvbWF0aWNhbGx5LgogICAgICAgICAgICAvLyBJbnN0ZWFkIG9mIGdvaW5nIGJhY2sgaW50byB0aGUgem9uZSBpbiBvcmRlciB0byB0cmlnZ2VyIGEgY2hhbmdlIGRldGVjdGlvbiB3aGljaCBjYXVzZXMKICAgICAgICAgICAgLy8gKmFsbCogY29tcG9uZW50cyB0byBiZSBjaGVja2VkIChpZiBleHBsaWNpdGx5IG1hcmtlZCBvciBub3QgdXNpbmcgT25QdXNoKSwgd2Ugb25seSB0cmlnZ2VyCiAgICAgICAgICAgIC8vIGFuIGV4cGxpY2l0IGNoYW5nZSBkZXRlY3Rpb24gZm9yIHRoZSBjaGVja2JveCB2aWV3IGFuZCBpdHMgY2hpbGRyZW4uCiAgICAgICAgICAgIHRoaXMuX2NoYW5nZURldGVjdG9yUmVmLmRldGVjdENoYW5nZXMoKTsKICAgICAgICB9CiAgICAgICAgLy8gSW1wbGVtZW50ZWQgYXMgcGFydCBvZiBDb250cm9sVmFsdWVBY2Nlc3Nvci4KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB3cml0ZVZhbHVlKHZhbHVlKSB7CiAgICAgICAgICAgIHRoaXMuY2hlY2tlZCA9ICEhdmFsdWU7CiAgICAgICAgfQogICAgICAgIC8vIEltcGxlbWVudGVkIGFzIHBhcnQgb2YgQ29udHJvbFZhbHVlQWNjZXNzb3IuCiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVnaXN0ZXJPbkNoYW5nZShmbikgewogICAgICAgICAgICB0aGlzLl9jb250cm9sVmFsdWVBY2Nlc3NvckNoYW5nZUZuID0gZm47CiAgICAgICAgfQogICAgICAgIC8vIEltcGxlbWVudGVkIGFzIHBhcnQgb2YgQ29udHJvbFZhbHVlQWNjZXNzb3IuCiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVnaXN0ZXJPblRvdWNoZWQoZm4pIHsKICAgICAgICAgICAgdGhpcy5fb25Ub3VjaGVkID0gZm47CiAgICAgICAgfQogICAgICAgIC8vIEltcGxlbWVudGVkIGFzIHBhcnQgb2YgQ29udHJvbFZhbHVlQWNjZXNzb3IuCiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBpc0Rpc2FibGVkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXREaXNhYmxlZFN0YXRlKGlzRGlzYWJsZWQpIHsKICAgICAgICAgICAgdGhpcy5kaXNhYmxlZCA9IGlzRGlzYWJsZWQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2dldEFyaWFDaGVja2VkKCkgewogICAgICAgICAgICBpZiAodGhpcy5jaGVja2VkKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gJ3RydWUnOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0aGlzLmluZGV0ZXJtaW5hdGUgPyAnbWl4ZWQnIDogJ2ZhbHNlJzsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IG5ld1N0YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfdHJhbnNpdGlvbkNoZWNrU3RhdGUobmV3U3RhdGUpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgb2xkU3RhdGUgPSB0aGlzLl9jdXJyZW50Q2hlY2tTdGF0ZTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAq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ICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgICAgICAgICBlbGVtZW50LmNsYXNzTGlzdC5yZW1vdmUoYW5pbWF0aW9uQ2xhc3MpOwogICAgICAgICAgICAgICAgICAgIH0pLCAxMDAwKTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2VtaXRDaGFuZ2VFdmVudCgpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBldmVudCA9IG5ldyBNYXRDaGVja2JveENoYW5nZSgpOwogICAgICAgICAgICBldmVudC5zb3VyY2UgPSB0aGlzOwogICAgICAgICAgICBldmVudC5jaGVja2VkID0gdGhpcy5jaGVja2VkOwogICAgICAgICAgICB0aGlzLl9jb250cm9sVmFsdWVBY2Nlc3NvckNoYW5nZUZuKHRoaXMuY2hlY2tlZCk7CiAgICAgICAgICAgIHRoaXMuY2hhbmdlLmVtaXQoZXZlbnQpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBUb2dnbGVzIHRoZSBgY2hlY2tlZGAgc3RhdGUgb2YgdGhlIGNoZWNrYm94LgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdG9nZ2xlKCkgewogICAgICAgICAgICB0aGlzLmNoZWNrZWQgPSAhdGhpcy5jaGVja2VkOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBFdmVudCBoYW5kbGVyIGZvciBjaGVja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hZCB0byBtdWx0aXBsZSBjbGljayBldmVudHMuCiAgICAgICAgICAgIC8vIFByZXZlbnRpbmcgYnViYmxpbmcgZm9yIHRoZSBzZWNvbmQgZXZlbnQgd2lsbCBzb2x2ZSB0aGF0IGlzc3VlLgogICAgICAgICAgICBldmVudC5zdG9wUHJvcGFnYXRpb24oKTsKICAgICAgICAgICAgLy8gSWYgcmVzZXRJbmRldGVybWluYXRlIGlzIGZhbHNlLCBhbmQgdGhlIGN1cnJlbnQgc3RhdGUgaXMgaW5kZXRlcm1pbmF0ZSwgZG8gbm90aGluZyBvbiBjbGljawogICAgICAgICAgICBpZiAoIXRoaXMuZGlzYWJsZWQgJiYgdGhpcy5fY2xpY2tBY3Rpb24gIT09ICdub29wJykgewogICAgICAgICAgICAgICAgLy8gV2hlbiB1c2VyIG1hbnVhbGx5IGNsaWNrIG9uIHRoZSBjaGVja2JveCwgYGluZGV0ZXJtaW5hdGVgIGlzIHNldCB0byBmYWxzZS4KICAgICAgICAgICAgICAgIGlmICh0aGlzLmluZGV0ZXJtaW5hdGUgJiYgdGhpcy5fY2xpY2tBY3Rpb24gIT09ICdjaGVjaycpIHsKICAgICAgICAgICAgICAgICAgICBQcm9taXNlLnJlc29sdmUoKS50aGVuKCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5faW5kZXRlcm1pbmF0ZSA9IGZhbHNlOwogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmluZGV0ZXJtaW5hdGVDaGFuZ2UuZW1pdCh0aGlzLl9pbmRldGVybWluYXRlKTsKICAgICAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLnRvZ2dsZSgpOwogICAgICAgICAgICAgICAgdGhpcy5fdHJhbnNpdGlvbkNoZWNrU3RhdG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ICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogRm9jdXNlcyB0aGUgY2hlY2tib3guCiAgICAgICAgICogQHBhcmFtIHs/PX0gb3JpZ2luCiAgICAgICAgICogQHBhcmFtIHs/PX0gb3B0aW9ucwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZm9jdXMob3JpZ2luID0gJ2tleWJvYXJkJywgb3B0aW9ucykgewogICAgICAgICAgICB0aGlzLl9mb2N1c01vbml0b3IuZm9jdXNWaWEodGhpcy5faW5wdXRFbGVtZW50LCBvcmlnaW4sIG9wdGlvbnMpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfb25JbnRlcmFjdGlvbkV2ZW50KGV2ZW50KSB7CiAgICAgICAgICAgIC8vIFdlIGFsd2F5cyBoYXZlIHRvIHN0b3AgcHJvcGFnYXRpb24gb24gdGhlIGNoYW5nZSBldmVudC4KICAgICAgICAgICAgLy8gT3RoZXJ3aXNlIHRoZSBjaGFuZ2UgZXZlbnQsIGZyb20gdGhlIGlucHV0IGVsZW1lbnQsIHdpbGwgYnViYmxlIHVwIGFuZAogICAgICAgICAgICAvLyBlbWl0IGl0cyBldmVudCBvYmplY3QgdG8gdGhlIGBjaGFuZ2VgIG91dHB1dC4KICAgICAgICAgICAgZXZlbnQuc3RvcFByb3BhZ2F0aW9uKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBvbGRTdGF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gbmV3U3RhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9nZXRBbmltYXRpb25DbGFzc0ZvckNoZWNrU3RhdGVUcmFuc2l0aW9uKG9sZFN0YXRlLCBuZXdTdGF0ZSkgewogICAgICAgICAgICAvLyBEb24ndCB0cmFuc2l0aW9uIGlmIGFuaW1hdGlvbnMgYXJlIGRpc2FibGVkLgogICAgICAgICAgICBpZiAodGhpcy5fYW5pbWF0aW9uTW9kZSA9PT0gJ05vb3BBbmltYXRpb25zJykgewogICAgICAgICAgICAgICAgcmV0dXJuICcnOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGFuaW1TdWZmaXggPSAnJzsKICAgICAgICAgICAgc3dpdGNoIChvbGRTdGF0ZSkgewogICAgICAgICAgICAgICAgY2FzZSAwIC8qIEluaXQgKi86CiAgICAgICAgICAgICAgICAgICAgLy8gSGFuZGxlIGVkZ2UgY2FzZSB3aGVyZSB1c2VyIGludGVyYWN0cyB3aXRoIGNoZWNrYm94IHRoYXQgZG9lcyBub3QgaGF2ZSBbKG5nTW9kZWwpXSBvcgogICAgICAgICAgICAgICAgICAgIC8vIFtjaGVja2VkXSBib3VuZCB0byBpdC4KICAgICAgICAgICAgICAgICAgICBpZiAobmV3U3RhdGUgPT09IDEgLyogQ2hlY2tlZCAqLykgewogICAgICAgICAgICAgICAgICAgICAgICBhbmltU3VmZml4ID0gJ3VuY2hlY2tlZC1jaGVja2VkJzsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAobmV3U3RhdGUgPT0gMyAvKiBJbmRldGVybWluYXRlICovKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGFuaW1TdWZmaXggPSAndW5jaGVja2VkLWluZGV0ZXJtaW5hdGUnOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICcnOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIGNhc2UgMiAvKiBVbmNoZWNrZWQgKi86CiAgICAgICAgICAgICAgICAgICAgYW5pbVN1ZmZpeCA9IG5ld1N0YXRlID09PSAxIC8qIENoZWNrZWQgKi8gPwogICAgICAgICAgICAgICAgICAgICAgICAndW5jaGVja2VkLWNoZWNrZWQnIDogJ3VuY2hlY2tlZC1pbmRldGVybWluYXRlJzsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIGNhc2UgMSAvKiBDaGVja2VkICovOgogICAgICAgICAgICAgICAgICAgIGFuaW1TdWZmaXggPSBuZXdTdGF0ZSA9PT0gMiAvKiBVbmNoZWNrZWQgKi8gPwogICAgICAgICAgICAgICAgICAgICAgICAnY2hlY2tlZC11bmNoZWNrZWQnIDogJ2NoZWNrZWQtaW5kZXRlcm1pbmF0ZSc7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBjYXNlIDMgLyogSW5kZXRlcm1pbmF0ZSAqLzoKICAgICAgICAgICAgICAgICAgICBhbmltU3VmZml4ID0gbmV3U3RhdGUgPT09IDEgLyogQ2hlY2tlZCAqLyA/CiAgICAgICAgICAgICAgICAgICAgICAgICdpbmRldGVybWluYXRlLWNoZWNrZWQnIDogJ2luZGV0ZXJtaW5hdGUtdW5jaGVja2VkJzsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gYG1hdC1jaGVja2JveC1hbmltLSR7YW5pbVN1ZmZpeH1gOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTeW5jcyB0aGUgaW5kZXRlcm1pbmF0ZSB2YWx1ZSB3aXRoIHRoZSBjaGVja2JveCBET00gbm9kZS4KICAgICAgICAgKgogICAgICAgICAqIFdlIHN5bmMgYGluZGV0ZXJtaW5hdGVgIGRpcmVjdGx5IG9uIHRoZSBET00gbm9kZSwgYmVjYXVzZSBpbiBJdnkgdGhlIGNoZWNrIGZvciB3aGV0aGVyIGEKICAgICAgICAgKiBwcm9wZXJ0eSB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FydCg4LCAiZGl2IiwgOCk7CiAgICAgICAgICAgIMm1ybVuYW1lc3BhY2VTVkcoKTsKICAgICAgICAgICAgybXJtWVsZW1lbnRTdGFydCg5LCAic3ZnIiwgOSk7CiAgICAgICAgICAgIMm1ybVlbGVtZW50KDEwLCAicGF0aCIsIDEwKTsKICAgICAgICAgICAgybXJtWVsZW1lbnRFbmQoKTsKICAgICAgICAgICAgybXJtW5hbWVzcGFjZUhUTUwoKTsKICAgICAgICAgICAgybXJtWVsZW1lbnQoMTEsICJkaXYiLCAxMSk7CiAgICAgICAgICAgIMm1ybVlbGVtZW50RW5kKCk7CiAgICAgICAgICAgIMm1ybVlbGVtZW50RW5kKCk7CiAgICAgICAgICAgIMm1ybVlbGVtZW50U3RhcnQoMTIsICJzcGFuIiwgMTIsIDEzKTsKICAgICAgICAgICAgybXJtWxpc3RlbmVyKCJjZGtPYnNlcnZlQ29udGVudCIsIGZ1bmN0aW9uIE1hdENoZWNrYm94X1RlbXBsYXRlX3NwYW5fY2RrT2JzZXJ2ZUNvbnRlbnRfMTJfbGlzdGVuZXIoKSB7IHJldHVybiBjdHguX29uTGFiZWxUZXh0Q2hhbmdlKCk7IH0pOwogICAgICAgICAgICDJtcm1ZWxlbWVudFN0YXJ0KDE0LCAic3BhbiIsIDE0KTsKICAgICAgICAgICAgybXJtXRleHQoMTUsICJcdTAwQTAiKTsKICAgICAgICAgICAgybXJtWVsZW1lbnRFbmQoKTsKICAgICAgICAgICAgybXJtXByb2plY3Rpb24oMTYpOwogICAgICAgICAgICDJtcm1ZWxlbWVudEVuZCgpOwogICAgICAgICAgICDJtcm1ZWxlbWVudEVuZCgpOwogICAgICAgIH0gaWYgKHJmICYgMikgewogICAgICAgICAgICBjb25zdCBfcjAgPSDJtcm1cmVmZXJlbmNlKDEpOwogICAgICAgICAgICBjb25zdCBfcjIgPSDJtcm1cmVmZXJlbmNlKDEzKTsKICAgICAgICAgICAgybXJtWF0dHJpYnV0ZSgiZm9yIiwgY3R4Lml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dGZvcm0gPSBfcGxhdGZvcm07CiAgICAgICAgICAgIHRoaXMuX25nWm9uZSA9IF9uZ1pvbmU7CiAgICAgICAgICAgIHRoaXMuX21vbml0b3JlZEVsZW1lbnRzID0gbmV3IE1hcCgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnRPclJlZgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbW9uaXRvcihlbGVtZW50T3JSZWYpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLl9wbGF0Zm9ybS5pc0Jyb3dzZXIpIHsKICAgICAgICAgICAgICAgIHJldHVybiBFTVBUWTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGVsZW1lbnQgPSBjb2VyY2VFbGVtZW50KGVsZW1lbnRPclJlZik7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaW5mbyA9IHRoaXMuX21vbml0b3JlZEVsZW1lbnRzLmdldChlbGVtZW50KTsKICAgICAgICAgICAgaWYgKGluZm8pIHsKICAgICAgICAgICAgICAgIHJldHVybiBpbmZvLnN1YmplY3QuYXNPYnNlcnZhYmxlKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCByZXN1bHQgPSBuZXcgU3ViamVjdCgpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGNzc0NsYXNzID0gJ2Nkay10ZXh0LWZpZWxkLWF1dG9maWxsZWQnOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGxpc3RlbmVyID0gKC8qKiBAdHlwZSB7P30gKi8gKCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChldmVudCkgPT4gewogICAgICAgICAgICAgICAgLy8gQW5pbWF0aW9uIGV2ZW50cyBmaXJlIG9uIGluaXRpYWwgZWxlbWVudCByZW5kZXIsIHdlIGNoZWNrIGZvciB0aGUgcHJlc2VuY2Ugb2YgdGhlIGF1dG9maWxsCiAgICAgICAgICAgICAgICAvLyBDU1MgY2xhc3MgdG8gbWFrZSBzdXJlIHRoaXMgaXMgYSByZWFsIGNoYW5nZSBpbiBzdGF0ZSwgbm90IGp1c3QgdGhlIGluaXRpYWwgcmVuZGVyIGJlZm9yZQogICAgICAgICAgICAgICAgLy8gd2UgZmlyZSBvZmYgZXZlbnRzLgogICAgICAgICAgICAgICAgaWYgKGV2ZW50LmFuaW1hdGlvbk5hbWUgPT09ICdjZGstdGV4dC1maWVsZC1hdXRvZmlsbC1zdGFydCcgJiYKICAgICAgICAgICAgICAgICAgICAhZWxlbWVudC5jbGFzc0xpc3QuY29udGFpbnMoY3NzQ2xhc3MpKSB7CiAgICAgICAgICAgICAgICAgICAgZWxlbWVudC5jbGFzc0xpc3QuYWRkKGNzc0NsYXNzKTsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9uZ1pvbmUucnVuKCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICgpID0+IHJlc3VsdC5uZXh0KHsgdGFyZ2V0OiAoLyoqIEB0eXBlIHs/fSAqLyAoZXZlbnQudGFyZ2V0KSksIGlzQXV0b2ZpbGxlZDogdHJ1ZSB9KSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAoZXZlbnQuYW5pbWF0aW9uTmFtZSA9PT0gJ2Nkay10ZXh0LWZpZWxkLWF1dG9maWxsLWVuZCcgJiYKICAgICAgICAgICAgICAgICAgICBlbGVtZW50LmNsYXNzTGlzdC5jb250YWlucyhjc3NDbGFzcykpIHsKICAgICAgICAgICAgICAgICAgICBlbGVtZW50LmNsYXNzTGlzdC5yZW1vdmUoY3NzQ2xhc3MpOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX25nWm9uZS5ydW4oKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKCkgPT4gcmVzdWx0Lm5leHQoeyB0YXJnZXQ6ICgvKiogQHR5cGUgez99ICovIChldmVudC50YXJnZXQpKSwgaXNBdXRvZmlsbGVkOiBmYWxzZSB9KSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSkpKTsKICAgICAgICAgICAgdGhpcy5fbmdab25lLnJ1bk91dHNpZGVBbmd1bGFyKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIGVsZW1lbnQuYWRkRXZlbnRMaXN0ZW5lcignYW5pbWF0aW9uc3RhcnQnLCBsaXN0ZW5lciwgbGlzdGVuZXJPcHRpb25zKTsKICAgICAgICAgICAgICAgIGVsZW1lbnQuY2xhc3NMaXN0LmFkZCgnY2RrLXRleHQtZmllbGQtYXV0b2ZpbGwtbW9uaXRvcmVkJyk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgdGhpcy5fbW9uaXRvcmVkRWxlbWVudHMuc2V0KGVsZW1lbnQsIHsKICAgICAgICAgICAgICAgIHN1YmplY3Q6IHJlc3VsdCwKICAgICAgICAgICAgICAgIHVubGlzdGVuOiAoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgZWxlbWVudC5yZW1vdmVFdmVudExpc3RlbmVyKCdhbmltYXRpb25zdGFydCcsIGxpc3RlbmVyLCBsaXN0ZW5lck9wdGlvbnMpOwogICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHJldHVybiByZXN1bHQuYXNPYnNlcnZhYmxlKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudE9yUmVmCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzdG9wTW9uaXRvcmluZyhlbGVtZW50T3JSZWYpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBlbGVtZW50ID0gY29lcmNlRWxlbWVudChlbGVtZW50T3JSZWYpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGluZm8gPSB0aGlzLl9tb25pdG9yZWRFbGVtZW50cy5nZXQoZWxlbWVudCk7CiAgICAgICAgICAgIGlmIChpbmZvKSB7CiAgICAgICAgICAgICAgICBpbmZvLnVubGlzdGVuKCk7CiAgICAgICAgICAgICAgICBpbmZvLnN1YmplY3QuY29tcGxldGUoKTsKICAgICAgICAgICAgICAgIGVsZW1lbnQuY2xhc3NMaXN0LnJlbW92ZSgnY2RrLXRleHQtZmllbGQtYXV0b2ZpbGwtbW9uaXRvcmVkJyk7CiAgICAgICAgICAgICAgICBlbGVtZW50LmNsYXNzTGlzdC5yZW1vdmUoJ2Nkay10ZXh0LWZpZWxkLWF1dG9maWxsZWQnKTsKICAgICAgICAgICAgICAgIHRoaXMuX21vbml0b3JlZEVsZW1lbnRzLmRlbGV0ZShlbGVtZW50KTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25EZXN0cm95KCkgewogICAgICAgICAgICB0aGlzLl9tb25pdG9yZWRFbGVtZW50cy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfaW5mbwogICA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ICAgICAgICogQHBhcmFtIHs/fSBfYXV0b2ZpbGxNb25pdG9yCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoX2VsZW1lbnRSZWYsIF9hdXRvZmlsbE1vbml0b3IpIHsKICAgICAgICAgICAgdGhpcy5fZWxlbWVudFJlZiA9IF9lbGVtZW50UmVmOwogICAgICAgICAgICB0aGlzLl9hdXRvZmlsbE1vbml0b3IgPSBfYXV0b2ZpbGxNb25pdG9yOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRW1pdHMgd2hlbiB0aGUgYXV0b2ZpbGwgc3RhdGUgb2YgdGhlIGVsZW1lbnQgY2hhbmdlcy4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuY2RrQXV0b2ZpbGwgPSBuZXcgRXZlbnRFbWl0dGVyKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkluaXQoKSB7CiAgICAgICAgICAgIHRoaXMuX2F1dG9maWxsTW9uaXRvcgogICAgICAgICAgICAgICAgLm1vbml0b3IodGhpcy5fZWxlbWVudFJlZikKICAgICAgICAgICAgICAgIC5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBldmVudCA9PiB0aGlzLmNka0F1dG9maWxsLmVtaXQoZXZlbnQpKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkRlc3Ryb3koKSB7CiAgICAgICAgICAgIHRoaXMuX2F1dG9maWxsTW9uaXRvci5zdG9wTW9uaXRvcmluZyh0aGlzLl9lbGVtZW50UmVmKTsKICAgICAgICB9CiAgICB9CiAgICBDZGtBdXRvZmlsbC7JtWZhYyA9IGZ1bmN0aW9uIENka0F1dG9ma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AgICAgICAgICAgdGhpcy5fcHJldmlvdXNNaW5Sb3dzID0gLTE7CiAgICAgICAgICAgIHRoaXMuX2RvY3VtZW50ID0gZG9jdW1lbnQ7CiAgICAgICAgICAgIHRoaXMuX3RleHRhcmVhRWxlbWVudCA9ICgvKiogQHR5cGUgez99ICovICh0aGlzLl9lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQpKTsKICAgICAgICAgICAgdGhpcy5fbWVhc3VyaW5nQ2xhc3MgPSBfcGxhdGZvcm0uRklSRUZPWCA/CiAgICAgICAgICAgICAgICAnY2RrLXRleHRhcmVhLWF1dG9zaXplLW1lYXN1cmluZy1maXJlZm94JyA6CiAgICAgICAgICAgICAgICAnY2RrLXRleHRhcmVhLWF1dG9zaXplLW1lYXN1cmluZyc7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIE1pbmltdW0gYW1vdW50IG9mIHJvd3MgaW4gdGhlIHRleHRhcmVhLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IG1pblJvd3MoKSB7IHJldHVybiB0aGlzLl9taW5Sb3dzOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IG1pblJvd3ModmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5fbWluUm93cyA9IGNvZXJjZU51bWJlclByb3BlcnR5KHZhbHVlKTsKICAgICAgICAgICAgdGhpcy5fc2V0TWluSGVpZ2h0KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIE1heGltdW0gYW1vdW50IG9mIHJvd3MgaW4gdGhlIHRleHRhcmVhLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IG1heFJvd3MoKSB7IHJldHVybiB0aGlzLl9tYXhSb3dzOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IG1heFJvd3ModmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5fbWF4Um93cyA9IGNvZXJjZU51bWJlclByb3BlcnR5KHZhbHVlKTsKICAgICAgICAgICAgdGhpcy5fc2V0TWF4SGVpZ2h0KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFdoZXRoZXIgYXV0b3NpemluZyBpcyBlbmFibGVkIG9yIG5vdAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGVuYWJsZWQoKSB7IHJldHVybiB0aGlzLl9lbmFibGVkOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IGVuYWJsZWQodmFsdWUpIHsKICAgICAgICAgICAgdmFsdWUgPSBjb2VyY2VCb29sZWFuUHJvcGVydHkodmFsdWUpOwogICAgICAgICAgICAvLyBPbmx5IGFjdCBpZiB0aGUgYWN0dWFsIHZhbHVlIGNoYW5nZWQuIFRoaXMgc3BlY2lmaWNhbGx5IGhlbHBzIHRvIG5vdCBydW4KICAgICAgICAgICAgLy8gcmVzaXplVG9GaXRDb250ZW50IHRvbyBlYXJseSAoaS5lLiBiZWZvcmUgbmdBZnRlclZpZXdJbml0KQogICAgICAgICAgICBpZiAodGhpcy5fZW5hYmxlZCAhPT0gdmFsdWUpIHsKICAgICAgICAgICAgICAgICh0aGlzLl9lbmFibGVkID0gdmFsdWUpID8gdGhpcy5yZXNpemVUb0ZpdENvbnRlbnQodHJ1ZSkgOiB0aGlzLnJlc2V0KCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU2V0cyB0aGUgbWluaW11bSBoZWlnaHQgb2YgdGhlIHRleHRhcmVhIGFzIGRldGVybWluZWQgYnkgbWluUm93cy4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9zZXRNaW5IZWlnaHQoKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbWluSGVpZ2h0ID0gdGhpcy5taW5Sb3dzICYmIHRoaXMuX2NhY2hlZExpbmVIZWlnaHQgPwogICAgICAgICAgICAgICAgYCR7dGhpcy5taW5Sb3dzICogdGhpcy5fY2FjaGVkTGluZUhlaWdodH1weGAgOiBudWxsOwogICAgICAgICAgICBpZiAobWluSGVpZ2h0KSB7CiAgICAgICAgICAgICAgICB0aGlzLl90ZXh0YXJlYUVsZW1lbnQuc3R5bGUubWluSGVpZ2h0ID0gbWluSGVpZ2h0OwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgdGhlIG1heGltdW0gaGVpZ2h0IG9mIHRoZSB0ZXh0YXJlYSBhcyBkZXRlcm1pbmVkIGJ5IG1heFJvd3MuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfc2V0TWF4SGVpZ2h0KCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG1heEhlaWdodCA9IHRoaXMubWF4Um93cyAmJiB0aGlzLl9jYWNoZWRMaW5lSGVpZ2h0ID8KICAgICAgICAgICAgICAgIGAke3RoaXMubWF4Um93cyAqIHRoaXMuX2NhY2hlZExpbmVIZWlnaHR9cHhgIDogbnVsbDsKICAgICAgICAgICAgaWYgKG1heEhlaWdodCkgewogICAgICAgICAgICAgICAgdGhpcy5fdGV4dGFyZWFFbGVtZW50LnN0eWxlLm1heEhlaWdodCA9IG1heEhlaWdodDsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nQWZ0ZXJWaWV3SW5pdCgpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX3BsYXRmb3JtLmlzQnJvd3NlcikgewogICAgICAgICAgICAgICAgLy8gUmVtZW1iZXIgdGhlIGhlaWdodCB3aGljaCB3ZSBzdGFydGVkIHdpdGggaW4gY2FzZSBhdXRvc2l6aW5nIGlzIGRpc2FibGVkCiAgICAgICAgICAgICAgICB0aGlzLl9pbml0aWFsSGVpZ2h0ID0gdGhpcy5fdGV4dGFyZWFFbGVtZW50LnN0eWxlLmhlaWdodDsKICAgICAgICAgICAgICAgIHRoaXMucmVzaXplVG9GaXRDb250ZW50KCk7CiAgICAgICAgICAgICAgICB0aGlzLl9uZ1pvbmUucnVuT3V0c2lkZUFuZ3VsYXIoKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCB3aW5kb3cgPSB0aGlzLl9nZXRXaW5kb3coKTsKICAgICAgICAgICAgICAgICAgICBmcm9tRXZlbnQod2luZG93LCAncmVzaXplJykKICAgICAgICAgICAgICAgICAgICAgICAgLnBpcGUoYXVkaXRUaW1lKDE2KSwgdGFrZVVudGlsKHRoaXMuX2Rlc3Ryb3llZCkpCiAgICAgICAgICAgICAgICAgICAgICAgIC5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKCkgPT4gdGhpcy5yZXNpemVUb0ZpdENvbnRlbnQodHJ1ZSkpKTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25EZXN0cm95KCkgewogICAgICAgICAgICB0aGlzLl9kZXN0cm95ZWQubmV4dCgpOwogICAgICAgICAgICB0aGlzLl9kZXN0cm95ZWQuY29tcGxldGUoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ2FjaGUgdGhlIGhlaWdodCBvZiBhIHNpbmdsZS1yb3cgdGV4dGFyZWEgaWYgaXQgaGFzIG5vdCBhbHJlYWR5IGJlZW4gY2FjaGVkLgogICAgICAgICAqCiAgICAgICAgICogV2UgbmVlZCB0byBrbm93IGhvdyBsYXJnZSBhIHNpbmdsZSAicm93IiBvZiBhIHRleHRhcmVhIGlzIGluIG9yZGVyIHRvIGFwcGx5IG1pblJvd3MgYW5kCiAgICAgICAgICogbWF4Um93cy4gRm9yIHRoZSBpbml0aWFsIHZlcnNpb24sIHdlIHdpbGwgYXNzdW1lIHRoYXQgdGhlIGhlaWdodCBvZiBhIHNpbmdsZSBsaW5lIGluIHRoZQogICAgICAgICAqIHRleHRhcmVhIGRvZXMgbm90IGV2ZXIgY2hhbmdlLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfY2FjaGVUZXh0YXJlYUxpbmVIZWlnaHQoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9jYWNoZWRMaW5lSGVpZ2h0KSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gVXNlIGEgY2xvbmUgZWxlbWVudCBiZWNhdXNlIHdlIGhhdmUgdG8gb3ZlcnJpZGUgc29tZSBzdHlsZXMuCiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHRleHRhcmVhQ2xvbmUgPSAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5fdGV4dGFyZWFFbGVtZW50LmNsb25lTm9kZShmYWxzZSkpKTsKICAgICAgICAgICAgdGV4dGFyZWFDbG9uZS5yb3dzID0gMTsKICAgICAgICAgICAgLy8gVX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gICB0aGlzLnJlc2l6ZVRvRml0Q29udGVudCgpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJlc2l6ZSB0aGUgdGV4dGFyZWEgdG8gZml0IGl0cyBjb250ZW50LgogICAgICAgICAqIEBwYXJhbSB7Pz19IGZvcmNlIFdoZXRoZXIgdG8gZm9yY2UgYSBoZWlnaHQgcmVjYWxjdWxhdGlvbi4gQnkgZGVmYXVsdCB0aGUgaGVpZ2h0IHdpbGwgYmUKICAgICAgICAgKiAgICByZWNhbGN1bGF0ZWQgb25seSBpZiB0aGUgdmFsdWUgY2hhbmdlZCBzaW5jZSB0aGUgbGFzdCBjYWxsLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVzaXplVG9GaXRDb250ZW50KGZvcmNlID0gZmFsc2UpIHsKICAgICAgICAgICAgLy8gSWYgYXV0b3NpemluZyBpcyBkaXNhYmxlZCwganVzdCBza2lwIGV2ZXJ5dGhpbmcgZWxzZQogICAgICAgICAgICBpZiAoIXRoaXMuX2VuYWJsZWQpIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9jYWNoZVRleHRhcmVhTGluZUhlaWdodCgpOwogICAgICAgICAgICAvLyBJZiB3ZSBoYXZlbid0IGRldGVybWluZWQgdGhlIGxpbmUtaGVpZ2h0IHlldCwgd2Uga25vdyB3ZSdyZSBzdGlsbCBoaWRkZW4gYW5kIHRoZXJlJ3Mgbm8gcG9pbnQKICAgICAgICAgICAgLy8gaW4gY2hlY2tpbmcgdGhlIGhlaWdodCBvZiB0aGUgdGV4dGFyZWEuCiAgICAgICAgICAgIGlmICghdGhpcy5fY2FjaGVkTGluZUhlaWdodCkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdGV4dGFyZW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gICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgaWYgKHR5cGVvZiByZXF1ZXN0QW5pbWF0aW9uRnJhbWUgIT09ICd1bmRlZmluZWQnKSB7CiAgICAgICAgICAgICAgICAgICAgcmVxdWVzdEFuaW1hdGlvbkZyYW1lKCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICgpID0+IHRoaXMuX3Njcm9sbFRvQ2FyZXRQb3NpdGlvbih0ZXh0YXJlYSkpKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKCkgPT4gdGhpcy5fc2Nyb2xsVG9DYXJldFBvc2l0aW9uKHRleHRhcmVhKSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIHRoaXMuX3ByZXZpb3VzVmFsdWUgPSB2YWx1ZTsKICAgICAgICAgICAgdGhpcy5fcHJldmlvdXNNaW5Sb3dzID0gdGhpcy5fbWluUm93czsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmVzZXRzIHRoZSB0ZXh0YXJlYSB0byBpdHMgb3JpZ2luYWwgc2l6ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVzZXQoKSB7CiAgICAgICAgICAgIC8vIERvIG5vdCB0cnkgdG8gY2hhbmdlIHRoZSB0ZXh0YXJlYSwgaWYgdGhlIGluaXRpYWxIZWlnaHQgaGFzIG5vdCBiZWVuIGRldGVybWluZWQgeWV0CiAgICAgICAgICAgIC8vIFRoaXMgbWlnaHQgcG90ZW50aWFsbHkgcmVtb3ZlIHN0eWxlcyB3aGVuIH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AgICAgX2dldERvY3VtZW50KCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fZG9jdW1lbnQgfHwgZG9jdW1lbnQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFVzZSBkZWZhdWx0VmlldyBvZiBpbmplY3RlZCBkb2N1bWVudCBpZiBhdmFpbGFibGUgb3IgZmFsbGJhY2sgdG8gZ2xvYmFsIHdpbmRvdyByZWZlcmVuY2UKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2dldFdpbmRvdygpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBkb2MgPSB0aGlzLl9nZXREb2N1bWVudCgpOwogICAgICAgICAgICByZXR1cm4gZG9jLmRlZmF1bHRWaWV3IHx8IHdpbmRvdzsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU2Nyb2xscyBhIHRleHRhcmVhIHRvIHRoZSBjYXJldCBwb3NpdGlvbi4gT24gRmlyZWZveCByZXNpemluZyB0aGUgdGV4dGFyZWEgd2lsbAogICAgICAgICAqIHByZXZlbnQgaXQgZnJvbSBzY3JvbGxpbmcgdG8gdGhlIGNhcmV0IHBvc2l0aW9uLiBXZSBuZWVkIHRvIHJlLXNldCB0aGUgc2VsZWN0aW9uCiAgICAgICAgICogaW4gb3JkZXIgZm9yIGl0IHRvIHNjcm9sbCB0byB0aGUgcHJvcGVyIHBvc2l0aW9uLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSB0ZXh0YXJlYQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3Njcm9sbFRvQ2FyZXRQb3NpdGlvbih0ZXh0YXJlYSkgewogICAgICAgICAgICBjb25zdCB7IHNlbGVjdGlvblN0YXJ0LCBzZWxlY3Rpb25FbmQgfSA9IHRleHRhcmVhOwogICAgICAgICA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0dXJuIHRoaXMubWluUm93czsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBtYXRBdXRvc2l6ZU1pblJvd3ModmFsdWUpIHsgdGhpcy5taW5Sb3dzID0gdmFsdWU7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBtYXRBdXRvc2l6ZU1heFJvd3MoKSB7IHJldHVybiB0aGlzLm1heFJvd3M7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgbWF0QXV0b3NpemVNYXhSb3dzKHZhbHVlKSB7IHRoaXMubWF4Um93cyA9IHZhbHVlOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgbWF0QXV0b3NpemUoKSB7IHJldHVybiB0aGlzLmVuYWJsZWQ7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgbWF0QXV0b3NpemUodmFsdWUpIHsgdGhpcy5lbmFibGVkID0gdmFsdWU7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBtYXRUZXh0YXJlYUF1dG9zaXplKCkgeyByZXR1cm4gdGhpcy5lbmFibGVkOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IG1hdFRleHRhcmVhQXV0b3NpemUodmFsdWUpIHsgdGhpcy5lbmFibGVkID0gdmFsdWU7IH0KICAg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VRfSU5QVVRfVkFMVUVfQUNDRVNTT1InKTsKCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcgYWRkZWQgYnkgdHNpY2tsZQogICAgICogR2VuZXJhdGVkIGZyb206IHNyYy9tYXRlcmlhbC9pbnB1dC9pbnB1dC50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvLyBJbnZhbGlkIGlucHV0IHR5cGUuIFVzaW5nIG9uZSBvZiB0aGVzZSB3aWxsIHRocm93IGFuIE1hdElucHV0VW5zdXBwb3J0ZWRUeXBlRXJyb3IuCiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBNQVRfSU5QVVRfSU5WQUxJRF9UWVBFUyA9IFsKICAgICAgICAnYnV0dG9uJywKICAgICAgICAnY2hlY2tib3gnLAogICAgICAgICdmaWxlJywKICAgICAgICAnaGlkZGVuJywKICAgICAgICAnaW1hZ2UnLAogICAgICAgICdyYWRpbycsCiAgICAgICAgJ3JhbmdlJywKICAgICAgICAncmVzZXQnLAogICAgICAgICdzdWJtaXQnCiAgICBdOwogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgbGV0IG5leHRVbmlxdWVJZCQ2ID0gMDsKICAgIC8vIEJvaWxlcnBsYXRlIGZvciBhcHBseWluZyBtaXhpbnMgdG8gTWF0SW5wdXQuCiAgICAvKioKICAgICAqIFxAZG9jcy1wcml2YXRlCiAgICAgKi8KICAgIGNsYXNzIE1hdElucHV0QmFzZSB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBfZGVmYXVsdEVycm9yU3RhdGVNYXRjaGVyCiAgICAgICAgICogQHBhcmFtIHs/fSBfcGFyZW50Rm9ybQogICAgIC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WxkQ29udHJvbC4KICAgICAgICAgICAgICogXEBkb2NzLXByaXZhdGUKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuc3RhdGVDaGFuZ2VzID0gbmV3IFN1YmplY3QoKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEltcGxlbWVudGVkIGFzIHBhcnQgb2YgTWF0Rm9ybUZpZWxkQ29udHJvbC4KICAgICAgICAgICAgICogXEBkb2NzLXByaXZhdGUKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuY29udHJvbFR5cGUgPSAnbWF0LWlucHV0JzsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEltcGxlbWVudGVkIGFzIHBhcnQgb2YgTWF0Rm9ybUZpZWxkQ29udHJvbC4KICAgICAgICAgICAgICogXEBkb2NzLXByaXZhdGUKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuYXV0b2ZpbGxlZCA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLl9kaXNhYmxlZCA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLl9yZXF1aXJlZCA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLl90eXBlID0gJ3RleHQnOwogICAgICAgICAgICB0aGlzLl9yZWFkb25seSA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLl9uZXZlckVtcHR5SW5wdXRUeXBlcyA9IFsKICAgICAgICAgICAgICAgICdkYXRlJywKICAgICAgICAgICAgICAgICdkYXRldGltZScsCiAgICAgICAgICAgICAgICAnZGF0ZXRpbWUtbG9jYWwnLAogICAgICAgICAgICAgICAgJ21vbnRoJywKICAgICAgICAgICAgICAgICd0aW1lJywKICAgICAgICAgICAgICAgICd3ZWVrJwogICAgICAgICAgICBdLmZpbHRlcigoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdCA9PiBnZXRTdXBwb3J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luc3RhbGwgdGhlIGxpc3RlbmVyIG9uIGlPUy4KICAgICAgICAgICAgaWYgKF9wbGF0Zm9ybS5JT1MpIHsKICAgICAgICAgICAgICAgIG5nWm9uZS5ydW5PdXRzaWRlQW5ndWxhcigoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgX2VsZW1lbnRSZWYubmF0aXZlRWxlbWVudC5hZGRFdmVudExpc3RlbmVyKCdrZXl1cCcsICgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50CiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAoZXZlbnQpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBsZXQgZWwgPSAoLyoqIEB0eXBlIHs/fSAqLyAoZXZlbnQudGFyZ2V0KSk7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghZWwudmFsdWUgJiYgIWVsLnNlbGVjdGlvblN0YXJ0ICYmICFlbC5zZWxlY3Rpb25FbmQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIE5vdGU6IEp1c3Qgc2V0dGluZyBgMCwgMGAgZG9lc24ndCBmaXggdGhlIGlzc3VlLiBTZXR0aW5nCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBgMSwgMWAgZml4ZXMgaXQgZm9yIHRoZSBmaXJzdCB0aW1lIHRoYXQgeW91IHR5cGUgdGV4dCBhbmQKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHRoZW4gaG9sZCBkZWxldGUuIFRvZ2dsaW5nIHRvIGAxLCAxYCBhbmQgdGhlbiBiYWNrIHRvCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBgMCwgMGAgc2VlbXMgdG8gY29tcGxldGVseSBmaXggaXQuCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbC5zZXRTZWxlY3Rpb25SYW5nZSgxLCAxKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsLnNldFNlbGVjdGlvblJhbmdlKDAsIDApOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2lzU2VydmVyID0gIXRoaXMuX3BsYXRmb3JtLmlzQnJvd3NlcjsKICAgICAgICAgICAgdGhpcy5faXNOYXRpdmVTZWxlY3QgPSBub2RlTmFtZSA9PT0gJ3NlbGVjdCc7CiAgICAgICAgICAgIHRoaXMuX2lzVGV4dGFyZWEgPSBub2RlTmFtZSA9PT0gJ3RleHRhcmVhJzsKICAgICAgICAgICAgaWYgKHRoaXMuX2lzTmF0aXZlU2VsZWN0KSB7CiAgICAgICAgICAgICAgICB0aGlzLmNvbnRyb2xUeXBlID0gKCgvKiogQHR5cGUgez99ICovIChlbGVtZW50KSkpLm11bHRpcGxlID8gJ21hdC1uYXRpdmUtc2VsZWN0LW11bHRpcGxlJyA6CiAgICAgICAgICAgICAgICAgICAgJ21hdC1uYXRpdmUtc2VsZWN0JzsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBJbXBsZW1lbnRlZCBhcyBwYXJ0IG9mIE1hdEZvcm1GaWVsZENvbnRyb2wuCiAgICAgICAgICogXEBkb2NzLXByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBkaXNhYmxlZCgpIHsKICAgICAgICAgICAgaWYgKHRoaXMubmdDb250cm9sICYmIHRoaXMubmdDb250cm9sLmRpc2FibGVkICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5uZ0NvbnRyb2wuZGlzYWJsZWQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2Rpc2FibGVkOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgZGlzYWJsZWQodmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5fZGlzYWJsZWQgPSBjb2VyY2VCb29sZWFuUHJvcGVydHkodmFsdWUpOwogICAgICAgICAgICAvLyBCcm93c2VycyBtYXkgbm90IGZpcmUgdGhlIGJsdXIgZXZlbnQgaWYgdGhlIGlucHV0IGlzIGRpc2FibGVkIHRvbyBxdWlja2x5LgogICAgICAgICAgICAvLyBSZXNldCBmcm9tIGhlcmUgdG8gZW5zdXJlIHRoYXQgdGhlIGVsZW1lbnQgZG9lc24ndCBiZWNvbWUgc3R1Y2suCiAgICAgICAgICAgIGlmICh0aGlzLmZvY3VzZWQpIHsKICAgICAgICAgICAgICAgIHRoaXMuZm9jdXNlZCA9IGZhbHNlOwogICAgICAgICAgICAgICAgdGhpcy5zdGF0ZUNoYW5nZXMubmV4dCgpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEltcGxlbWVudGVkIGFzIHBhcnQgb2YgTWF0Rm9ybUZpZWxkQ29udHJvbC4KICAgICAgICAgKiBcQGRvY3MtcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGlkKCkgeyByZXR1cm4gdGhpcy5faWQ7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgaWQodmFsdWUpIHsgdGhpcy5faWQgPSB2YWx1ZSB8fCB0aGlzLl91aWQ7IH0KICAgICAgICAvKioKICAgICAgICAgKiBJbXBsZW1lbnRlZCBhcyBwYXJ0IG9mIE1hdEZvcm1GaWVsZENvbnRyb2wuCiAgICAgICAgICogXEBkb2NzLXByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCByZXF1aXJlZCgpIHsgcmV0dXJuIHRoaXMuX3JlcXVpcmVkOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IHJlcXVpcmVkKHZhbHVlKSB7IHRoaXMuX3JlcXVpcmVkID0gY29lcmNlQm9vbGVhblByb3BlcnR5KHZhbHVlKTsgfQogICAgICAgIC8qKgogICAgICAgICAqIElucHV0IHR5cGUgb2YgdGhlIGVsZW1lbnQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgdHlwZSgpIHsgcmV0dXJuIHRoaXMuX3R5cGU7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgdHlwZSh2YWx1ZSkgewogICAgICAgICAgICB0aGlzLl90eXBlID0gdmFsdWUgfHwgJ3RleHQnOwogICAgICAgICAgICB0aGlzLl92YWxpZGF0ZVR5cGUoKTsKICAgICAgICAgICAgLy8gV2hlbiB1c2luZyBBbmd1bGFyIGlucHV0cywgZGV2ZWxvcGVycyBhcmUgbm8gbG9uZ2VyIGFibGUgdG8gc2V0IHRoZSBwcm9wZXJ0aWVzIG9uIHRoZSBuYXRpdmUKICAgICAgICAgICAgLy8gaW5wdXQgZWxlbWVudC4gVG8gZW5zdXJlIHRoYXQgYmluZGluZ3MgZm9yIGB0eXBlYCB3b3JrLCB3ZSBuZWVkIHRvIHN5bmMgdGhlIHNldHRlcgogICAgICAgICAgICAvLyB3aXRoIHRoZSBuYXRpdmUgcHJvcGVydHkuIFRleHRhcmVhIGVsZW1lbnRzIGRvbid0IHN1cHBvcnQgdGhlIHR5cGUgcHJvcGVydHkgb3IgYXR0cmlidXRlLgogICAgICAgICAgICBpZiAoIXRoaXMuX2lzVGV4dGFyZWEgJiYgZ2V0U3VwcG9ydGVkSW5wdXRUeXBlcygpLmhhcyh0aGlzLl90eXBlKSkgewogICAgICAgICAgICAgICAgKCgvKiogQHR5cGUgez99ICovICh0aGlzLl9lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQpKSkudHlwZSA9IHRoaXMuX3R5cGU7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogSW1wbGVtZW50ZWQgYXMgcGFydCBvZiBNYXRGb3JtRmllbGRDb250cm9sLgogICAgICAgICAqIFxAZG9jcy1wcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgdmFsdWUoKSB7IHJldHVybiB0aGlzLl9pbnB1dFZhbHVlQWNjZXNzb3IudmFsdWU7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgdmFsdWUodmFsdWUpIHsKICAgICAgICAgICAgaWYgKHZhbHVlICE9PSB0aGlzLnZhbHVlKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9pbnB1dFZhbHVlQWNjZXNzb3IudmFsdWUgPSB2YWx1ZTsKICAgICAgICAgICAgICAgIHRoaXMuc3RhdGVDaGFuZ2VzLm5leHQoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGV0aGVyIHRoZSBlbGVtZW50IGlzIHJlYWRvbmx5LgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHJlYWRvbmx5KCkgeyByZXR1cm4gdGhpcy5fcmVhZG9ubHk7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgcmVhZG9ubHkodmFsdWUpIHsgdGhpcy5fcmVhZG9ubHkgPSBjb2VyY2VCb29sZWFuUHJvcGVydHkodmFsdWUpOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uSW5pdCgpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX3BsYXRmb3JtLmlzQnJvd3NlcikgewogICAgICAgICAgICAgICAgdGhpcy5fYXV0b2ZpbGxNb25pdG9yLm1vbml0b3IodGhpcy5fZWxlbWVudFJlZi5uYXRpdmVFbGVtZW50KS5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBldmVudAogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgZXZlbnQgPT4gewogICAgICAgICAgICAgICAgICAgIHRoaXMuYXV0b2ZpbGxlZCA9IGV2ZW50LmlzQXV0b2ZpbGxlZDsKICAgICAgICAgICAgICAgICAgICB0aGlzLnN0YXRlQ2hhbmdlcy5uZXh0KCk7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uQ2hhbmdlcygpIHsKICAgICAgICAgICAgdGhpcy5zdGF0ZUNoYW5nZXMubmV4dCgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25EZXN0cm95KCkgewogICAgICAgICAgICB0aGlzLnN0YXRlQ2hhbmdlcy5jb21wbGV0ZSgpOwogICAgICAgICAgICBpZiAodGhpcy5fcGxhdGZvcm0uaXNCcm93c2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BpZiAodGhpcy5fcHJldmlvdXNOYXRpdmVWYWx1ZSAhPT0gbmV3VmFsdWUpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3ByZXZpb3VzTmF0aXZlVmFsdWUgPSBuZXdWYWx1ZTsKICAgICAgICAgICAgICAgIHRoaXMuc3RhdGVDaGFuZ2VzLm5leHQoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBNYWtlIHN1cmUgdGhlIGlucHV0IGlzIGEgc3VwcG9ydGVkIHR5cGUuCiAgICAgICAgICogQHByb3RlY3RlZAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3ZhbGlkYXRlVHlwZSgpIHsKICAgICAgICAgICAgaWYgKE1BVF9JTlBVVF9JTlZBTElEX1RZUEVTLmluZGV4T2YodGhpcy5fdHlwZSkgPiAtMSkgewogICAgICAgICAgICAgICAgdGhyb3cgZ2V0TWF0SW5wdXRVbnN1cHBvcnRlZFR5cGVFcnJvcih0aGlzLl90eXBlKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDaGVja3Mgd2hldGhlciB0aGUgaW5wdXQgdHlwZSBpcyBvbmUgb2YgdGhlIHR5cGVzIHRoYXQgYXJlIG5ldmVyIGVtcHR5LgogICAgICAgICAqIEBwcm90ZWN0ZWQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9pc05ldmVyRW1wdHkoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9uZXZlckVtcHR5SW5wdXRUeXBlcy5pbmRleE9mKHRoaXMuX3R5cGUpID4gLTE7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENoZWNrcyB3aGV0aGVyIHRoZSBpbnB1dCBpcyBpbnZhbGlkIGJhc2VkIG9uIHRoZSBuYXRpdmUgdmFsaWRhdGlvbi4KICAgICAgICAgKiBAcHJvdGVjdGVkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfaXNCYWRJbnB1dCgpIHsKICAgICAgICAgICAgLy8gVGhlIGB2YWxpZGl0eWAgcHJvcGVydHkgd29uJ3QgYmUgcHJlc2VudCBvbiBwbGF0Zm9ybS1zZXJ2ZXIuCiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHZhbGlkaXR5ID0gKCgvKiogQHR5cGUgez99ICovICh0aGlzLl9lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQpKSkudmFsaWRpdHk7CiAgICAgICAgICAgIHJldHVybiB2YWxpZGl0eSAmJiB2YWxpZGl0eS5iYWRJbnB1dDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogSW1wbGVtZW50ZWQgYXMgcGFydCBvZiBNYXRGb3JtRmllbGRDb250cm9sLgogICAgICAgICAqIFxAZG9jcy1wcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgZW1wdHkoKSB7CiAgICAgICAgICAgIHJldHVybiAhdGhpcy5faXNOZXZlckVtcHR5KCkgJiYgIXRoaXMuX2VsZW1lbnRSZWYubmF0aXZlRWxlbWVudC52YWx1ZSAmJiAhdGhpcy5faXNCYWRJbnB1dCgpICYmCiAgICAgICAgICAgICAgICAhdGhpcy5hdXRvZmlsbGVkOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBJbXBsZW1lbnRlZCBhcyBwYXJ0IG9mIE1hdEZvcm1GaWVsZENvbnRyb2wuCiAgICAgICAgICogXEBkb2NzLXByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBzaG91bGRMYWJlbEZsb2F0KCkgewogICAgICAgICAgICBpZiAodGhpcy5faXNOYXRpdmVTZWxlY3QpIHsKICAgICAgICAgICAgICAgIC8vIEZvciBhIHNpbmdsZS1zZWxlY3Rpb24gYDxzZ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vbi5sYWJlbCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5mb2N1c2VkIHx8ICF0aGlzLmVtcHR5OwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEltcGxlbWVudGVkIGFzIHBhcnQgb2YgTWF0Rm9ybUZpZWxkQ29udHJvbC4KICAgICAgICAgKiBcQGRvY3MtcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gaWRzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXREZXNjcmliZWRCeUlkcyhpZHMpIHsKICAgICAgICAgICAgdGhpcy5fYXJpYURlc2NyaWJlZGJ5ID0gaWRzLmpvaW4oJyAnKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogSW1wbGVtZW50ZWQgYXMgcGFydCBvZiBNYXRGb3JtRmllbGRDb250cm9sLgogICAgICAgICAqIFxAZG9jcy1wcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvbkNvbnRhaW5lckNsaWNrKCkgewogICAgICAgICAgICAvLyBEbyBub3QgcmUtZm9jdXMgdGhlIGlucHV0IGVsZW1lbnQgaWYgdGhlIGVsZW1lbnQgaXMgYWxyZWFkeSBmb2N1c2VkLiBPdGhlcndpc2UgaXQgY2FuIGhhcHBlbgogICAgICAgICAgICAvLyB0aGF0IHNvbWVvbmUgY2xpY2tzIG9uIGEgdGltZSBpbnB1dCBhbmQgdGhlIGN1cnNvciByZXNldHMgdG8gdGhlICJob3VycyIgZmllbGQgd2hpbGUgdGhlCiAgICAgICAgICAgIC8vICJtaW51dGVzIiBmaWVsZCB3YXMgYWN0dWFsbHkgY2xpY2tlZC4gU2VlOiBodHRwczovL2dpdGh1Yi5jb20vYW5ndWxhci9jb21wb25lbnRzL2lzc3Vlcy8xMjg0OQogICAgICAgICAgICBpZiA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ZWNvbmRzLiAiKTsKICAgICAgICDJtcm1ZWxlbWVudEVuZCgpOwogICAgfSB9CiAgICBmdW5jdGlvbiBTZXR0aW5nc0RpYWxvZ0NvbXBvbmVudF9tYXRfZXJyb3JfMTRfVGVtcGxhdGUocmYsIGN0eCkgeyBpZiAocmYgJiAxKSB7CiAgICAgICAgybXJtWVsZW1lbnRTdGFydCgwLCAibWF0LWVycm9yIik7CiAgICAgICAgybXJtXRleHQoMSwgIiBQYWdlIHNpemUgaGFzIHRvIGJlIGEgcG9zaXRpdmUgaW50ZWdlci4gIik7CiAgICAgICAgybXJtWVsZW1lbnRFbmQoKTsKICAgIH0gfQogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgZ2V0UmVsb2FkUGVyaW9kSW5TZWMgPSBjcmVhdGVTZWxlY3RvcihnZXRSZWxvYWRQZXJpb2RJbk1zLCAoLyoqCiAgICAgKiBAcGFyYW0gez99IHBlcmlvZEluTXMKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIChwZXJpb2RJbk1zKSA9PiBNYXRoLnJvdW5kKHBlcmlvZEluTXMgLyAxMDAwKSkpOwogICAgLyoqCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBjcmVhdGVJbnRlZ2VyVmFsaWRhdG9yKCkgewogICAgICAgIHJldHVybiAoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBjb250cm9sCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAoY29udHJvbCkgPT4gewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG51bVZhbHVlID0gTnVtYmVyKGNvbnRyb2wudmFsdWUpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHZhbGlkID0gTWF0aC5yb3VuZChudW1WYWx1ZSkgPT09IGNvbnRyb2wudmFsdWU7CiAgICAgICAgICAgIHJldHVybiB2YWxpZCA/IG51bGwgOiB7IGludGVnZXI6IHsgdmFsdWU6IGNvbnRyb2wudmFsdWUgfSB9OwogICAgICAgIH0pOwogICAgfQogICAgY2xhc3MgU2V0dGluZ3NEaWFsb2dDb21wb25lbnQgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gc3RvcmUKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihzdG9yZSkgewogICAgICAgICAgICB0aGlzLnN0b3JlID0gc3RvcmU7CiAgICAgICAgICAgIHRoaXMucmVsb2FkRW5hYmxlZCQgPSB0aGlzLnN0b3JlLnBpcGUoc2VsZWN0KGdldFJlbG9hZEVuYWJsZWQpKTsKICAgICAgICAgICAgdGhpcy5wYWdlU2l6ZSQgPSB0aGlzLnN0b3JlLnBpcGUoc2VsZWN0KGdldFBhZ2VTaXplKSk7CiAgICAgICAgICAgIHRoaXMucmVsb2FkUGVyaW9kSW5TZWMkID0gdGhpcy5zdG9yZS5waXBlKHNlbGVjdChnZXRSZWxvYWRQZXJpb2RJblNlYykpOwogICAgICAgICAgICB0aGlzLnJlbG9hZFBlcmlvZENvbnRyb2wgPSBuZXcgRm9ybUNvbnRyb2woMTUsIFsKICAgICAgICAgICAgICAgIFZhbGlkYXRvcnMucmVxdWlyZWQsCiAgICAgICAgICAgICAgICBWYWxpZGF0b3JzLm1pbigxNSksCiAgICAgICAgICAgIF0pOwogICAgICAgICAgICB0aGlzLnBhZ2luYXRpb25Db250cm9sID0gbmV3IEZvcm1Db250cm9sKDEsIFsKICAgICAgICAgICAgICAgIFZhbGlkYXRvcnMucmVxdWlyZWQsCiAgICAgICAgICAgICAgICBWYWxpZGF0b3JzLm1pbigxKSwKICAgICAgICAgICAgICAgIGNyZWF0ZUludGVnZXJWYWxpZGF0b3IoKSwKICAgICAgICAgICAgXSk7CiAgICAgICAgICAgIHRoaXMubmdVbnN1YnNjcmliZSA9IG5ldyBTdWJqZWN0KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkluaXQoKSB7CiAgICAgICAgICAgIHRoaXMucmVsb2FkUGVyaW9kSW5TZWMkCiAgICAgICAgICAgICAgICAucGlwZSh0YWtlVW50aWwodGhpcy5uZ1Vuc3Vic2NyaWJlKSwgZmlsdGVyKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHZhbHVlKSA9PiB2YWx1ZSAhPT0gdGhpcy5yZWxvYWRQZXJpb2RDb250cm9sLnZhbHVlKSkpCiAgICAgICAgICAgICAgICAuc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHZhbHVlKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLnJlbG9hZFBlcmlvZENvbnRyb2wuc2V0VmFsdWUodmFsdWUpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIHRoaXMucmVsb2FkRW5hYmxlZCQKICAgICAgICAgICAgICAgIC5waXBlKHRha2VVbnRpbCh0aGlzLm5nVW5zdWJzY3JpYmUpKQogICAgICAgICAgICAgICAgLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICh2YWx1ZSkgPT4gewogICAgICAgICAgICAgICAgaWYgKHZhbHVlKQogICAgICAgICAgICAgICAgICAgIHRoaXMucmVsb2FkUGVyaW9kQ29udHJvbC5lbmFibGUoKTsKICAgICAgICAgICAgICAgIGVsc2UKICAgICAgICAgICAgICAgICAgICB0aGlzLnJlbG9hZFBlcmlvZENvbnRyb2wuZGlzYWJsZSgpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIHRoaXMucmVsb2FkUGVyaW9kQ29udHJvbC52YWx1ZUNoYW5nZXMKICAgICAgICAgICAgICAgIC5waXBlKHRha2VVbnRpbCh0aGlzLm5nVW5zdWJzY3JpYmUpLCBkZWJvdW5jZVRpbWUoNTAwKSwgZmlsdGVyKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHRoaXMucmVsb2FkUGVyaW9kQ29udHJvbC52YWxpZCkpKQogICAgICAgICAgICAgICAgLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAoIXRoaXMucmVsb2FkUGVyaW9kQ29udHJvbC52YWxpZCkgewogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHBlcmlvZEluTXMgPSB0aGlzLnJlbG9hZFBlcmlvZENvbnRyb2wudmFsdWUgKiAxMDAwOwogICAgICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChjaGFuZ2VSZWxvYWRQZXJpb2QoeyBwZXJpb2RJbk1zIH0pKTsKICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB0aGlzLnBhZ2VTaXplJAogICAgICAgICAgICAgICAgLnBpcGUodGFrZVVudGlsKHRoaXMubmdVbnN1YnNjcmliZSksIGZpbHRlcigoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICh2YWx1ZSkgPT4gdmFsdWUgIT09IHRoaXMucGFnaW5hdGlvbkNvbnRyb2wudmFsdWUpKSkKICAgICAgICAgICAgICAgIC5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAodmFsdWUpID0+IHsKICAgICAgICAgICAgICAgIHRoaXMucGFnaW5hdGlvbkNvbnRyb2wuc2V0VmFsdWUodmFsdWUpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIHRoaXMucGFnaW5hdGlvbkNvbnRyb2wudmFsdWVDaGFuZ2VzCiAgICAgICAgICAgICAgICAucGlwZSh0YWtlVW50aWwodGhpcy5uZ1Vuc3Vic2NyaWJlKSwgZGVib3VuY2VUaW1lKDUwMCksIGZpbHRlcigoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB0aGlzLnBhZ2luYXRpb25Db250cm9sLnZhbGlkKSkpCiAgICAgICAgICAgICAgICAuc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuc3RvcmUuZGlzcGF0Y2goY2hhbmdlUGFnZVNpemUoeyBzaXplOiB0aGlzLnBhZ2luYXRpb25Db250cm9sLnZhbHVlIH0pKTsKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25EZXN0cm95KCkgewogICAgICAgICAgICB0aGlzLm5nVW5zdWJzY3JpYmUubmV4dCgpOwogICAgICAgICAgICB0aGlzLm5nVW5zdWJzY3JpYmUuY29tcGxldGUoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvblJlbG9hZFRvZ2dsZSgpIHsKICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaCh0b2dnbGVSZWxvYWRFbmFibGVkKCkpOwogICAgICAgIH0KICAgIH0KICAgIFNldHRpbmdzRGlhbG9nQ29tcG9uZW50LmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBDb21wb25lbnQsIGFyZ3M6IFt7CiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3I6ICdzZXR0aW5ncy1kaWFsb2cnLAogICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlOiBgCiAgICA8aDM+U2V0dGluZ3M8L2gzPgogICAgPGRpdj4KICAgICAgPGRpdiBjbGFzcz0icmVsb2FkLXRvZ2dsZSI+CiAgICAgICAgPG1hdC1jaGVja2JveAogICAgICAgICAgW2NoZWNrZWRdPSJyZWxvYWRFbmFibGVkJCB8IGFzeW5jIgogICAgICAgICAgKGNoYW5nZSk9Im9uUmVsb2FkVG9nZ2xlKCkiCiAgICAgICAgICA+UmVsb2FkIGRhdGE8L21hdC1jaGVja2JveAogICAgICAgID4KICAgICAgPC9kaXY+CiAgICAgIDxkaXY+CiAgICAgICAgPG1hdC1mb3JtLWZpZWxkPgogICAgICAgICAgPGlucHV0CiAgICAgICAgICAgIGNsYXNzPSJyZWxvYWQtcGVyaW9kIgogICAgICAgICAgICBtYXRJbnB1dAogICAgICAgICAgICB0eXBlPSJudW1iZXIiCiAgICAgICAgICAgIHBsYWNlaG9sZGVyPSJSZWxvYWQgUGVyaW9kIgogICAgICAgICAgICBbZm9ybUNvbnRyb2xdPSJyZWxvYWRQZXJpb2RDb250cm9sIgogICAgICAgICAgLz4KICAgICAgICA8L21hdC1mb3JtLWZpZWxkPgogICAgICAgIDxtYXQtZXJyb3IKICAgICAgICAgICpuZ0lmPSIKICAgICAgICAgICAgcmVsb2FkUGVyaW9kQ29udHJvbC5oYXNFcnJvcignbWluJykgfHwKICAgICAgICAgICAgcmVsb2FkUGVyaW9kQ29udHJvbC5oYXNFcnJvcigncmVxdWlyZWQnKQogICAgICAgICAgIgogICAgICAgID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zID0gWwogICAgICAgIHsgdHlwZTogQ29tcG9uZW50LCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIHNlbGVjdG9yOiAnYXBwLWhlYWRlcicsCiAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU6IGAKICAgIDxtYXQtdG9vbGJhciBjb2xvcj0icHJpbWFyeSI+CiAgICAgIDxzcGFuIGNsYXNzPSJicmFuZCI+VGVuc29yQm9hcmQ8L3NwYW4+CiAgICAgIDxwbHVnaW4tc2VsZWN0b3IgY2xhc3M9InBsdWdpbnMiPjwvcGx1Z2luLXNlbGVjdG9yPgogICAgICA8dGJkZXYtdXBsb2FkLWJ1dHRvbj48L3RiZGV2LXVwbG9hZC1idXR0b24+CiAgICAgIDxhcHAtaGVhZGVyLXJlbG9hZD48L2FwcC1oZWFkZXItcmVsb2FkPgogICAgICA8c2V0dGluZ3MtYnV0dG9uPjwvc2V0dGluZ3MtYnV0dG9uPgogICAgICA8YQogICAgICAgIGNsYXNzPSJyZWFkbWUiCiAgICAgICAgbWF0LWljb24tYnV0dG9uCiAgICAgICAgaHJlZj0iaHR0cHM6Ly9naXRodWIuY29tL3RlbnNvcmZsb3cvdGVuc29yYm9hcmQvYmxvYi9tYXN0ZXIvUkVBRE1FLm1kIgogICAgICAgIHJlbD0ibm9vcGVuZXIgbm9yZWZlcnJlciIKICAgICAgICB0YXJnZXQ9Il9ibGFuayIKICAgICAgICBhcmlhLWxhYmVsPSJIZWxwIgogICAgICA+CiAgICAgICAgPG1hdC1pY29uIHN2Z0ljb249ImhlbHBfb3V0bGluZV8yNHB4Ij48L21hdC1pY29uPgogICAgICA8L2E+CiAgICA8L21hdC10b29sYmFyPgogIGAsCiAgICAgICAgICAgICAgICAgICAgc3R5bGVzOiBbCiAgICAgICAgICAgICAgICAgICAgICAgIGAKICAgICAgbWF0LXRvb2xiYXIgewogICAgICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgICAgZGlzcGxheTogZmxleDsKICAgICAgICB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ICAgICAgICAgybXJtWVsZW1lbnRFbmQoKTsKICAgICAgICAgICAgybXJtWVsZW1lbnRFbmQoKTsKICAgICAgICB9IH0sIGRpcmVjdGl2ZXM6IFtNYXRUb29sYmFyLCBQbHVnaW5TZWxlY3RvckNvbnRhaW5lciwgVGJkZXZVcGxvYWRCdXR0b25Db21wb25lbnQsIFJlbG9hZENvbnRhaW5lciwgU2V0dGluZ3NCdXR0b25Db21wb25lbnQsIE1hdEFuY2hvciwgTWF0SWNvbl0sIHN0eWxlczogWyJtYXQtdG9vbGJhcltfbmdjb250ZW50LSVDT01QJV0ge1xuICAgICAgICBhbGlnbi1pdGVtczogY2VudGVyO1xuICAgICAgICBkaXNwbGF5OiBmbGV4O1xuICAgICAgICBoZWlnaHQ6IDY0cHg7XG4gICAgICAgIG92ZXJmbG93OiBoaWRkZW47XG4gICAgICAgIHdpZHRoOiAxMDAlO1xuICAgICAgfVxuXG4gICAgICB0YmRldi11cGxvYWQtYnV0dG9uLnNob3duW19uZ2NvbnRlbnQtJUNPTVAlXSB7XG4gICAgICAgIG1hcmdpbjogMCA4cHggMCAxNnB4O1xuICAgICAgfVxuXG4gICAgICAuYnJhbmRbX25nY29udGVudC0lQ09NUCVdLCAucmVhZG1lW19uZ2NvbnRlbnQtJUNPTVAlXSwgYXBwLWhlYWRlci1yZWxvYWRbX25nY29udGVudC0lQ09NUCVdLCBzZXR0aW5ncy1idXR0b25bX25nY29udGVudC0lQ09NUCVdIHtcbiAgICAgICAgZmxleDogMCAwIGF1dG87XG4gICAgICB9XG5cbiAgICAgIC5icmFuZFtfbmdjb250ZW50LSVDT01QJV0ge1xuICAgICAgICBsZXR0ZXItc3BhY2luZzogLTAuMDI1ZW07XG4gICAgICAgIG1hcmdpbi1sZWZ0OiAxMHB4O1xuICAgICAgICB0ZXh0LXJlbmRlcmluZzogb3B0aW1pemVMZWdpYmlsaXR5O1xuICAgICAgfVxuXG4gICAgICAucGx1Z2luc1tfbmdjb250ZW50LSVDT01QJV0ge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ljZW5zZSBhdAoKICAgICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjAKCiAgICBVbmxlc3MgcmVxdWlyZWQgYnkgYXBwbGljYWJsZSBsYXcgb3IgYWdyZWVkIHRvIGluIHdyaXRpbmcsIHNvZnR3YXJlCiAgICBkaXN0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiAiQVMgSVMiIEJBU0lTLAogICAgV0lUSE9VVCBXQVJSQU5USUVTIE9SIENPTkRJVElPTlMgT0YgQU5ZIEtJTkQsIGVpdGhlciBleHByZXNzIG9yIGltcGxpZWQuCiAgICBTZWUgdGhlIExpY2Vuc2UgZm9yIHRoZSBzcGVjaWZpYyBsYW5ndWFnZSBnb3Zlcm5pbmcgcGVybWlzc2lvbnMgYW5kCiAgICBsaW1pdGF0aW9ucyB1bmRlciB0aGUgTGljZW5zZS4KICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCiAgICAvKioKICAgICAqIFBhcnNlcyBzaG9ydCBleHBlcmltZW50IG5hbWUgdG8gaWQgbWFwIGVuY29kZWQgaW4gc3RyaW5nIGZvciBjb21wYXJlIHJvdXRlLgogICAgICoKICAgICAqIGUuZy4sIC9jb21wYXJlL2V4cDE6MTIzNDUsZXhwMjo5OTk5OSByZXN1bHRzLAogICAgICogWwogICAgICogICB7bmFtZTogJ2V4cDEnLCBpZDogJzEyMzQ1J30sCiAgICAgKiAgIHtuYW1lOiAnZXhwMicsIGlkOiAnOTk5OTknfQogICAgICogXQogICAgICovCiAgICBmdW5jdGlvbiBwYXJzZUNvbXBhcmVFeHBlcmltZW50U3RyKGVpZFN0cikgewogICAgICAgIHJldHVybiBlaWRTdHIuc3BsaXQoJywnKS5tYXAoKG5hbWVUb0lkU3RyKSA9PiB7CiAgICAgICAgICAgIGNvbnN0IGNvbG9uSW5kZXggPSBuYW1lVG9JZFN0ci5pbmRleE9mKCc6Jyk7CiAgICAgICAgICAgIGlmIChjb2xvbkluZGV4IDwgMCkgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBFeHBlY3QgY29sb24gZGVsaW1pdGluZyBuYW1lIGFuZCBJRDogJHtuYW1lVG9JZFN0cn1gKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBjb25zdCBuYW1lID0gbmFtZVRvSWRTdHIuc2xpY2UoMCwgY29sb25JbmRleCk7CiAgICAgICAgICAgIGNvbnN0IGlkID0gbmFtZVRvSWRTdHIuc2xpY2UoY29sb25JbmRleCArIDEpOwogICAgICAgICAgICBpZiAoIW5hbWUpIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgRXhwZWN0IG5hbWUgdG8gYmUgbm9uLWZhbHN5OiAke25hbWVUb0lkU3RyfWApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICghaWQpIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgRXhwZWN0IGlkIHRvIGJlIG5vbi1mYWxzeTogJHtuYW1lVG9JZFN0cn1gKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4geyBuYW1lLCBpZCB9OwogICAgICAgIH0pOwogICAgfQogICAgLyoqCiAgICAgKiBSZXR1cm5zIGV4cGVyaW1lbnRJZHMgZnJvbSByb3V0ZSBwYXJhbWV0ZXIuIEZvciBhIHJvdXRlIHRoYXQgZG9lcyBub3QgY29udGFpbgogICAgICogYW55IGV4cGVyaW1lbnQgaWRzLCBpdCByZXR1cm5zIG51bGwuCiAgICAgKi8KICAgIGZ1bmN0aW9uIGdldEV4cGVyaW1lbnRJZHNGcm9tUm91dGVQYXJhbXMocm91dGVLaW5kLCBwYXJhbXMpIHsKICAgICAgICBzd2l0Y2ggKHJvdXRlS2luZCkgewogICAgICAgICAgICBjYXNlIFJvdXRlS2luZC5FWFBFUklNRU5UOiB7CiAgICAgICAgICAgICAgICAvLyBUaGUgcm91dGUgbWF5IHJlbHkgb24gdGhlIGltcGxpY2l0LCBkZWZhdWx0IGV4cGVyaW1lbnQgaWQsIGlmIHRoZSBVUkwKICAgICAgICAgICAgICAgIC8vIGRvZXMgbm90IGNvbnRhaW4gdGhlIGV4cGVyaW1lbnQgcGFyYW0uCiAgICAgICAgICAgICAgICBpZiAoT2JqZWN0LnByb3RvdHlwZS5oYXNPd25Qcm9wZXJ0eS5jYWxsKHBhcmFtcywgJ2V4cGVyaW1lbnRJZCcpKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFtwYXJhbXMuZXhwZXJpbWVudElkXTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiBbREVGQVVMVF9FWFBFUklNRU5UX0lEXTsKICAgICAgICAgICAgfQogICAgICAgICAgICBjYXNlIFJvdXRlS2luZC5DT01QQVJFX0VYUEVSSU1FTlQ6IHsKICAgICAgICAgICAgICAgIGNvbnN0IHR5cGVkUGFyYW1zID0gcGFyYW1zOwogICAgICAgICAgICAgICAgcmV0dXJuIHBhcnNlQ29tcGFyZUV4cGVyaW1lbnRTdHIodHlwZWRQYXJhbXMuZXhwZXJpbWVudElkcykubWFwKCh7IGlkIH0pID0+IGlkKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBjYXNlIFJvdXRlS2luZC5FWFBFUklNRU5UUzoKICAgICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogUmV0dXJucyBhbiBpZGVudGlmaWVyIHRoYXQgaWRlbnRpZmllcyBrbm93biB0b3AtbGV2ZWwgcm91dGVzLiBJdCBpcyBzaW1pbGFyCiAgICAgKiB0byBgdXJsYCBidXQgaWdub3JlcyBoYXNoIGFuZCByZXR1cm5zICJ1bmtub3duIiBmb3IgdW5rbm93biByb3V0ZXMuCiAgICAgKi8KICAgIGZ1bmN0aW9uIGdldFJvdXRlSWQocm91dGVLaW5kLCBwYXJhbXMpIHsKICAgICAgICBzd2l0Y2ggKHJvdXRlS2luZCkgewogICAgICAgICAgICBjYXNlIFJvdXRlS2luZC5DT01QQVJFX0VYUEVSSU1FTlQ6IHsKICAgICAgICAgICAgICAgIGNvbnN0IHR5cGVkUGFyYW1zID0gcGFyYW1zOwogICAgICAgICAgICAgICAgcmV0dXJuIGAke3JvdXRlS2luZH0vJHt0eXBlZFBhcmFtcy5leHBlcmltZW50SWRzfWA7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY2FzZSBSb3V0ZUtpbmQuRVhQRVJJTUVOVDogewogICAgICAgICAgICAgICAgY29uc3QgdHlwZWRQYXJhbXMgPSBwYXJhbXM7CiAgICAgICAgICAgICAgICByZXR1cm4gYCR7cm91dGVLaW5kfS8ke3R5cGVkUGFyYW1zLmV4cGVyaW1lbnRJZH1gOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNhc2UgUm91dGVLaW5kLkVYUEVSSU1FTlRTOgogICAgICAgICAgICAgICAgcmV0dXJuIFN0cmluZyhyb3V0ZUtpbmQpOwogICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICAgcmV0dXJuICcnOwogICAgICAgIH0KICAgIH0KICAgIGZ1bmN0aW9uIGNyZWF0ZVVSTFNlYXJjaFBhcmFtc0Zyb21TZXJpYWxpemFibGVRdWVyeVBhcmFtcyhwYXJhbXMpIHsKICAgICAgICBjb25zdCBzZWFyY2hQYXJhbXMgPSBuZXcgVVJMU2VhcmNoUGFyYW1zKCk7CiAgICAgICAgZm9yIChjb25zdCB7IGtleSwgdmFsdWUgfSBvZiBwYXJhbXMpIHsKICAgICAgICAgICAgc2VhcmNoUGFyYW1zLmFwcGVuZChrZXksIHZhbHVlKTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIHNlYXJjaFBhcmFtczsKICAgIH0KICAgIC8qKgogICAgICogQ2hlY2tzIHdoZXRoZXIgdHdvIFJvdXRl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2NvbmZpZy50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gcGF0aAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0UGF0aEZyYWdtZW50cyhwYXRoKSB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHBhcnRzID0gZ2V0UGF0aFBhcnRzKHBhdGgpOwogICAgICAgIHJldHVybiBwYXJ0cy5tYXAoKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gcGFydAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgKHBhcnQpID0+IHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBpc1BhcmFtID0gcGFydC5zdGFydHNXaXRoKCc6Jyk7CiAgICAgICAgICAgIGlmICghaXNQYXJhbSkgewogICAgICAgICAgICAgICAgcmV0dXJuIHsgcGF0aFBhcnQ6IHBhcnQsIGlzUGFyYW0gfTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgcGF0aFBhcnQ6IHBhcnQsCiAgICAgICAgICAgICAgICBpc1BhcmFtOiB0cnVlLAogICAgICAgICAgICAgICAgcGFyYW1OYW1lOiBwYXJ0LnNsaWNlKDEpLAogICAgICAgICAgICB9OwogICAgICAgIH0pKTsKICAgIH0KICAgIGNsYXNzIFJvdXRlQ29uZmlnTWF0Y2hlciB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBjb25maWcKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3Rvcihjb25maWcpIHsKICAgICAgICAgICAgdGhpcy5jb25maWcgPSBjb25maWc7CiAgICAgICAgICAgIHRoaXMudmFsaWRhdGVDb25maWcoY29uZmlnKTsKICAgICAgICAgICAgdGhpcy5wYXRoRnJhZ21lbnRzID0gZ2V0UGF0aEZyYWdtZW50cyhjb25maWcucGF0aCk7CiAgICAgICAgICAgIHRoaXMucGF0aE1hdGNoZXJzID0gdGhpcy5nZXRQYXRoTWF0Y2hlcnModGhpcy5wYXRoRnJhZ21lbnRzKTsKICAgICAgICAgICAgdGhpcy5yZWRpcmVjdGlvbkZyYWdtZW50cyA9CiAgICAgICAgICAgICAgICBjb25maWcucm91dGVLaW5kID09PSBudWxsCiAgICAgICAgICAgICAgICAgICAgPyBnZXRQYXRoRnJhZ21lbnRzKGNvbmZpZy5yZWRpcmVjdGlvblBhdGgpCiAgICAgICAgICAgICAgICAgICAgOiBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB2YWxpZGF0ZUNvbmZpZyh7IHBhdGggfSkgewogICAgICAgICAgICBpZiAoIXBhdGguc3RhcnRzV2l0aCgnLycpKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgUmFuZ2VFcnJvcihgY29uZmlnLnBhdGggc2hvdWxkIHN0YXJ0IHdpdGggJy8nLiAke3BhdGh9YCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgY29sb25JbmRleCA9IDA7CiAgICAgICAgICAgIHdoaWxlICgoY29sb25JbmRleCA9IHBhdGguaW5kZXhPZignOicsIGNvbG9uSW5kZXggKyAxKSkgPj0gMCkgewogICAgICAgICAgICAgICAgaWYgKHBhdGhbY29sb25JbmRleCAtIDFdICE9PSAnLycpIHsKICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgUmFuZ2VFcnJvcihgY29uZmlnLnBhdGggcGFyYW1ldGVyIHNob3VsZCBjb21lIGFmdGVyICcvJy4gJHtwYXRofWApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKHBhdGhbY29sb25JbmRleCArIDFdID09PSB1bmRlZmluZWQgfHwgcGF0aFtjb2xvbkluZGV4ICsgMV0gPT09ICcvJykgewogICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBSYW5nZUVycm9yKGBjb25maWcucGF0aCBwYXJhbWV0ZXIgc2hvdWxkIGhhdmUgbm9uLWVtcHR5IG5hbWUuICR7cGF0aH1gKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gcGF0aEZyYWdtZW50cwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0UGF0aE1hdGNoZXJzKHBhdGhGcmFnbWVudHMpIHsKICAgICAgICAgICAgcmV0dXJuIHBhdGhGcmFnbWVudHMubWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBmcmFnbWVudAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGZyYWdtZW50KSA9PiB7CiAgICAgICAgICAgICAgICBjb25zdCB7IHBhdGhQYXJ0IH0gPSBmcmFnbWVudDsKICAgICAgICAgICAgICAgIGlmIChmcmFnbWVudC5pc1BhcmFtKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHBhdGhQYXJ0UXVlcnkKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgIChwYXRoUGFydFF1ZXJ5KSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpc1BhcmFtUGF0aFBhcnQ6IHRydWUsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJ0TWF0Y2hlZDogdHJ1ZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtTmFtZTogZnJhZ21lbnQucGFyYW1OYW1lLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1WYWx1ZTogcGF0aFBhcnRRdWVyeSwKICAgICAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiAoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHBhdGhQYXJ0UXVlcnkKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChwYXRoUGFydFF1ZXJ5KSA9PiB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgICAgICAgICAgaXNQYXJhbVBhdGhQYXJ0OiBmYWxzZSwKICAgICAgICAgICAgICAgICAgICAgICAgcGFydE1hdGNoZWQ6IHBhdGhQYXJ0UXVlcnkgPT09IHBhdGhQYXJ0LAogICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBJbiBjYXNlIG9mIHBhcmFtZXRlciByZXByb2plY3Rpb24gZmFpbHVyZSAoY2Fubm90IGNyZWF0ZSByZWRpcmVjdGlvbgogICAgICAgICAqIHBhdGhuYW1lIGZyb20gcGFyYW1ldGVyIHByZXNlbnQgaW4gY3VycmVudCBwYXRobmFtZSksIGl0IHRocm93cyBhCiAgICAgICAgICogUmFuZ2VFcnJvci4KICAgICAgICAgKiBAcGFyYW0gez99IHBhdGhQYXJ0cwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbWF0Y2gocGF0aFBhcnRzKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGNvbWJpbmVkUGFyYW1zID0ge307CiAgICAgICAgICAgIGlmICh0aGlzLnBhdGhNYXRjaGVycy5sZW5ndGggIT09IHBhdGhQYXJ0cy5sZW5ndGgpIHsKICAgICAgICAgICAgICAgIHJldHVybiB7IHJlc3VsdDogZmFsc2UgfTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBwYXRoSW5kZXggPSAwOwogICAgICAgICAgICBmb3IgKGNvbnN0IG1hdGNoZXIgb2YgdGhpcy5wYXRoTWF0Y2hlcnMpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHBhdGhUb01hdGNoID0gcGF0aFBhcnRzW3BhdGhJbmRleCsrXTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IG1hdGNoID0gbWF0Y2hlcihwYXRoVG9NYXRjaCk7CiAgICAgICAgICAgICAgICBpZiAoIW1hdGNoLnBhcnRNYXRjaGVkKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHsgcmVzdWx0OiBmYWxzZSB9OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKG1hdGNoLmlzUGFyYW1QYXRoUGFydCkgewogICAgICAgICAgICAgICAgICAgIGNvbWJpbmVkUGFyYW1zID0gT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LCBjb21iaW5lZFBhcmFtcyksIHsgW21hdGNoLnBhcmFtTmFtZV06IG1hdGNoLnBhcmFtVmFsdWUgfSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHRoaXMucmVkaXJlY3Rpb25GcmFnbWVudHMpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IG5ld1BhdGhQYXJ0cyA9IHRoaXMucmVwcm9qZWN0UGF0aEJ5UGFyYW1zKHRoaXMucmVkaXJlY3Rpb25GcmFnbWVudHMsIGNvbWJpbmVkUGFyYW1zKTsKICAgICAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAgICAgcmVzdWx0OiB0cnVlLAogICAgICAgICAgICAgICAgICAgIHBhcmFtczogY29tYmluZWRQYXJhbXMsCiAgICAgICAgICAgICAgICAgICAgcGF0aFBhcnRzOiBuZXdQYXRoUGFydHMsCiAgICAgICAgICAgICAgICAgICAgaXNSZWRpcmVjdGlvbjogdHJ1ZSwKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIHJlc3VsdDogdHJ1ZSwKICAgICAgICAgICAgICAgIHBhcmFtczogY29tYmluZWRQYXJhbXMsCiAgICAgICAgICAgICAgICBwYXRoUGFydHMsCiAgICAgICAgICAgICAgICBpc1JlZGlyZWN0aW9uOiBmYWxzZSwKICAgICAgICAgICAgfTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmVwcm9qZWN0cyByb3V0ZSBwYXJhbWV0ZXIgdmFsdWVzIHRvIHBhdGggZnJhZ21lbnRzIGZvciBwYXRoIHBhcnRzLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBwYXRoRnJhZ21lbnRzCiAgICAgICAgICogQHBhcmFtIHs/fSBwYXJhbXMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlcHJvamVjdFBhdGhCeVBhcmFtcyhwYXRoRnJhZ21lbnRzLCBwYXJhbXMpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwYXRoUGFydHMgPSBbXTsKICAgICAgICAgICAgZm9yIChjb25zdCBmcmFnbWVudCBvZiBwYXRoRnJhZ21lbnRzKSB7CiAgICAgICAgICAgICAgICBpZiAoZnJhZ21lbnQuaXNQYXJhbSkgewogICAgICAgICAgICAgICAgICAgIGNvbnN0IHsgcGFyYW1OYW1lIH0gPSBmcmFnbWVudDsKICAgICAgICAgICAgICAgICAgICBpZiAoIXBhcmFtcy5oYXNPd25Qcm9wZXJ0eShwYXJhbU5hbWUpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBSYW5nZUVycm9yKGBGYWlsZWQgdG8gcmVwcm9qZWN0IHBhcmFtZXRlci4gIiR7cGFyYW1OYW1lfSIgcGFyYW1ldGVyIGAgKwogICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3Nob3VsZCBiZSBwcmVzZW50LicpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBwYXRoUGFydHMucHVzaChwYXJhbXNbcGFyYW1OYW1lXSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBwYXRoUGFydHMucHVzaChmcmFnbWVudC5wYXRoUGFydCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHBhdGhQYXJ0czsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogSW4gY2FzZSBvZiBwYXJhbWV0ZXIgcHJvamVjdGlvbiBmYWlsdXJlIChjYW5ub3QgY3JlYXRlIHBhdGhuYW1lKSwgaXQgdGhyb3dzCiAgICAgICAgICogYSBSYW5nZUVycm9yLgogICAgICAgICAqIEBwYXJhbSB7P30gcGFyYW1zCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBtYXRjaEJ5UGFyYW1zKHBhcmFtcykgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHBhdGhQYXJ0cyA9IHRoaXMucmVwcm9qZWN0UGF0aEJ5UGFyYW1zKHRoaXMucGF0aEZyYWdtZW50cywgcGFyYW1zKTsKICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIHJlc3VsdDogdHJ1ZSwKICAgICAgICAgICAgICAgIHBhcmFtcywKICAgICAgICAgICAgICAgIHBhdGhQYXJ0cywKICAgICAgICAgICAgICAgIGlzUmVkaXJlY3Rpb246IGZhbHNlLAogICAgICAgICAgICB9OwogICAgICAgIH0KICAgIH0KICAgIGNsYXNzIFJvdXRlQ29uZmlncyB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBjb25maWdzCiAgICAgICAgICogQHBhcmFtIHs/PX0gbWF4UmVkaXJlY3Rpb24KICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3Rvcihjb25maWdzLCBtYXhSZWRpcmVjdGlvbiA9IDMpIHsKICAgICAgICAgICAgdGhpcy5tYXhSZWRpcmVjdGlvbiA9IG1heFJlZGlyZWN0aW9uOwogICAgICAgICAgICBpZiAobWF4UmVkaXJlY3Rpb24gPCAwKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgUmFuZ2VFcnJvcignbWF4UmVkaXJlY3Rpb24gaGFzIHRvIGJlIG5vbi1uZWdhdGl2ZSBudW1iZXInKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLnZhbGlkYXRlUm91dGVDb25maWdzKGNvbmZpZ3MpOwogICAgICAgICAgICB0aGlzLmRlZmF1bHRSb3V0ZUNvbmZpZyA9IG51bGw7CiAgICAgICAgICAgIHRoaXMucm91dGVLaW5kVG9Db25maWdNYXRjaGVycyA9IG5ldyBNYXAoKTsKICAgICAgICAgICAgdGhpcy5jb25maWdNYXRjaGVycyA9IFtdOwogICAgICAgICAgICBmb3IgKGNvbnN0IGNvbmZpZyBvZiBjb25maWdzKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBtYXRjaGVyID0gbmV3IFJvdXRlQ29uZmlnTWF0Y2hlcihjb25maWcpOwogICAgICAgICAgICAgICAgdGhpcy5jb25maWdNYXRjaGVycy5wdXNoKG1hdGNoZXIpOwogICAgICAgICAgICAgICAgaWYgKG1hdGNoZXIuY29uZmlnLnJvdXRlS2luZCAhPT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIHRoaXMucm91dGVLaW5kVG9Db25maWdNYXRjaGVycy5zZXQobWF0Y2hlci5jb25maWcucm91dGVLaW5kLCBtYXRjaGVyKTsKICAgICAgICAgICAgICAgICAgICBpZiAobWF0Y2hlci5jb25maWcuZGVmYXVsdFJvdXRlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZGVmYXVsdFJvdXRlQ29uZmlnID0gbWF0Y2hlcjsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGNvbmZpZ3MKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHZhbGlkYXRlUm91dGVDb25maWdzKGNvbmZpZ3MpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBkZWZhdWx0Um91dGVzID0gY29uZmlncy5maWx0ZXIoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHJvdXRlRGVmCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAocm91dGVEZWYpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiBCb29sZWFuKHJvdXRlRGVmLnJvdXRlS2luZCAhPT0gbnVsbCAmJiByb3V0ZURlZi5kZWZhdWx0Um91dGUpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIGlmIChkZWZhdWx0Um91dGVzLmxlbmd0aCA+IDEpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHBhdGhzID0gZGVmYXVsdFJvdXRlcy5tYXAoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICh7IHBhdGggfSkgPT4gcGF0aCkpLmpvaW4oJywgJyk7CiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgUmFuZ2VFcnJvcihgVGhlcmUgYXJlIG1vcmUgdGhhbiBvbmUgZGVmYXVsdFJvdXRlcy4gJHtwYXRoc31gKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChkZWZhdWx0Um91dGVzLmxlbmd0aCA9PT0gMSkgewogICAgICAgICAgICAgICAgY29uc3QgeyBwYXRoIH0gPSBkZWZhdWx0Um91dGVzWzBdOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgaGFzUGFyYW0gPSBCb29sZWFuKGdldFBhdGhGcmFnbWVudHMocGF0aCkuZmluZCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKHsgaXNQYXJhbSB9KSA9PiBpc1BhcmFtKSkpOwogICAgICAgICAgICAgICAgaWYgKGhhc1BhcmFtKSB7CiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IFJhbmdlRXJyb3IoYEEgZGVmYXVsdFJvdXRlIGNhbm5vdCBoYXZlIGFueSBwYXJhbXMuICR7cGF0aH1gKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHJvdXRlS2luZENvbmZpZyA9IG5ldyBTZXQoKTsKICAgICAgICAgICAgZm9yIChjb25zdCB7IHJvdXRlS2luZCB9IG9mIGNvbmZpZ3MpIHsKICAgICAgICAgICAgICAgIGlmIChyb3V0ZUtpbmQgPT09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChyb3V0ZUtpbmRDb25maWcuaGFzKHJvdXRlS2luZCkpIHsKICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgUmFuZ2VFcnJvcihgTXVsdGlwbGUgcm91dGUgY29uZmlndXJhdGlvbiBmb3Iga2luZDogJHtyb3V0ZUtpbmR9LiBgICsKICAgICAgICAgICAgICAgICAgICAgICAgJ0NvbmZpZ3VyYXRpb25zIHNob3VsZCBoYXZlIHVuaXF1ZSByb3V0ZUtpbmRzJyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByb3V0ZUtpbmRDb25maWcuYWRkKHJvdXRlS2luZCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBuYXZpZ2F0aW9uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBtYXRjaChuYXZpZ2F0aW9uKSB7CiAgICAgICAgICAgIGlmICghbmF2aWdhdGlvbi5wYXRobmFtZS5zdGFydHNXaXRoKCcvJykpIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBSYW5nZUVycm9yKCdOYXZpZ2F0aW9uIGhhcyB0byBtYWRlIHdpdGggcGF0aG5hbWUgdGhhdCBzdGFydHMgd2l0aCAiLyInKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBwYXRoUGFydHMgPSBnZXRQYXRoUGFydHMobmF2aWdhdGlvbi5wYXRobmFtZSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHJlZGlyZWN0aW9uQ291bnQgPSAwOwogICAgICAgICAgICB3aGlsZSAodHJ1ZSkgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IHdhc1JlZGlyZWN0ZWQgPSBmYWxzZTsKICAgICAgICAgICAgICAgIGZvciAoY29uc3QgbWF0Y2hlciBvZiB0aGlzLmNvbmZpZ01hdGNoZXJzKSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IG1hdGNoID0gbWF0Y2hlci5tYXRjaChwYXRoUGFydHMpOwogICAgICAgICAgICAgICAgICAgIGlmIChtYXRjaC5yZXN1bHQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgeyBwYXJhbXMsIHBhdGhQYXJ0czogbmV3UGF0aFBhcnRzLCBpc1JlZGlyZWN0aW9uIH0gPSBtYXRjaDsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlzUmVkaXJlY3Rpb24pIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhdGhQYXJ0cyA9IG5ld1BhdGhQYXJ0czsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdhc1JlZGlyZWN0ZWQgPSB0cnVlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBjb25maWcgPSAoLyoqIEB0eXBlIHs/fSAqLyAobWF0Y2hlci5jb25maWcpKTsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJvdXRlS2luZDogY29uZmlnLnJvdXRlS2luZCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcywKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhdGhuYW1lOiBnZXRQYXRoRnJvbVBhcnRzKG5ld1BhdGhQYXJ0cyksCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWVwTGlua1Byb3ZpZGVyOiBjb25maWcuZGVlcExpbmtQcm92aWRlciB8fCBudWxsLAogICAgICAgICAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmICh3YXNSZWRpcmVjdGVkKSB7CiAgICAgICAgICAgICAgICAgICAgcmVkaXJlY3Rpb25Db3VudCsrOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKHJlZGlyZWN0aW9uQ291bnQgPiB0aGlzLm1heFJlZGlyZWN0aW9uIHx8ICF3YXNSZWRpcmVjdGVkKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gSWYgbm90IHJlZGlyZWN0ZWQsIG5vIG5lZWQgdG8gcmVtYXRjaCB0aGUgcm91dGVzLiBBYm9ydC4KICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAocmVkaXJlY3Rpb25Db3VudCA+IHRoaXMubWF4UmVkaXJlY3Rpb24pIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgUG90ZW50aWFsIHJlZGlyZWN0aW9uIGxvb3AgKHJlZGlyZWN0aW5nIG1vcmUgdGhhbiBgICsKICAgICAgICAgICAgICAgICAgICBgJHt0aGlzLm1heFJlZGlyZWN0aW9ufSB0aW1lcy4gUGxlYXNlIGRvIG5vdCBoYXZlIGN5Y2xlcyBpbiB0aGUgYCArCiAgICAgICAgICAgICAgICAgICAgYHJvdXRlcy5gKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5kZWZhdWx0Um91dGVDb25maWcpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGNvbmZpZyA9ICgvKiogQHR5cGUgez99ICovICh0aGlzLmRlZmF1bHRSb3V0ZUNvbmZpZy5jb25maWcpKTsKICAgICAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAgICAgcm91dGVLaW5kOiBjb25maWcucm91dGVLaW5kLAogICAgICAgICAgICAgICAgICAgIHBhcmFtczoge30sCiAgICAgICAgICAgICAgICAgICAgcGF0aG5hbWU6IGNvbmZpZy5wYXRoLAogICAgICAgICAgICAgICAgICAgIGRlZXBMaW5rUHJvdmlkZXI6IGNvbmZpZy5kZWVwTGlua1Byb3ZpZGVyIHx8IG51bGwsCiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHJvdXRlS2luZAogICAgICAgICAqIEBwYXJhbSB7P30gcGFyYW1zCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBtYXRjaEJ5Um91dGVLaW5kKHJvdXRlS2luZCwgcGFyYW1zKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbWF0Y2hlciA9IHRoaXMucm91dGVLaW5kVG9Db25maWdNYXRjaGVycy5nZXQocm91dGVLaW5kKTsKICAgICAgICAgICAgaWYgKCFtYXRjaGVyIHx8ICFtYXRjaGVyLmNvbmZpZy5yb3V0ZUtpbmQpIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBSYW5nZUVycm9yKGBSZXF1aXJlcyBjb25maWd1cmF0aW9uIGZvciByb3V0ZUtpbmQ6ICR7cm91dGVLaW5kfWApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbWF0Y2ggPSBtYXRjaGVyLm1hdGNoQnlQYXJhbXMocGFyYW1zKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjb25maWcgPSBtYXRjaGVyLmNvbmZpZzsKICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIHJvdXRlS2luZCwKICAgICAgICAgICAgICAgIHBhcmFtcywKICAgICAgICAgICAgICAgIHBhdGhuYW1lOiBnZXRQYXRoRnJvbVBhcnRzKG1hdGNoLnBhdGhQYXJ0cyksCiAgICAgICAgICAgICAgICBkZWVwTGlua1Byb3ZpZGVyOiBjb25maWcuZGVlcExpbmtQcm92aWRlciB8fCBudWxsLAogICAgICAgICAgICB9OwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBwYXRoCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBnZXRQYXRoUGFydHMocGF0aCkgewogICAgICAgIHJldHVybiBwYXRoLnNwbGl0KCcvJykuc2xpY2UoMSk7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gcGF0aFBhcnRzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBnZXRQYXRoRnJvbVBhcnRzKHBhdGhQYXJ0cykgewogICAgICAgIHJldHVybiAnLycgKyBwYXRoUGFydHMuam9pbignLycpOwogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogdGVuc29yYm9hcmQvd2ViYXBwL2FwcF9yb3V0aW5nL3JvdXRlX3JlZ2lzdHJ5X3R5cGVzLnRzCiAgICAgKiBAc3VwcHJlc3Mge2NoZWNrVHlwZXMsY29uc3RhbnRQcm9wZXJ0eSxleHRyYVJlcXVpcmUsbWlzc2lu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JvdXRlRGVmTGlzdCBvZiBjb25maWdzTGlzdCkgewogICAgICAgICAgICAgICAgZm9yIChjb25zdCByb3V0ZURlZiBvZiByb3V0ZURlZkxpc3QpIHsKICAgICAgICAgICAgICAgICAgICBjb25maWdzLnB1c2gocm91dGVEZWYpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMucm91dGVDb25maWdzID0gbmV3IFJvdXRlQ29uZmlncyhjb25maWdzKTsKICAgICAgICAgICAgY29uZmlncy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjb25maWcKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChjb25maWcpID0+IHsKICAgICAgICAgICAgICAgIGlmIChjb25maWcucm91dGVLaW5kKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5yb3V0ZUtpbmRUb05nQ29tcG9uZW50LnNldChjb25maWcucm91dGVLaW5kLCBjb25maWcubmdDb21wb25lbnQpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgUm91dGVDb25maWdzIG9mIGN1cnJlbnQgcm91dGUgY29uZmlndXJhdGlvbi4gUmV0dXJuc24gbnVsbCBpZiBubwogICAgICAgICAqIHJvdXRlcyBhcmUgcmVnaXN0ZXJlZC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldFJvdXRlQ29uZmlncygpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMucm91dGVDb25maWdzOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHJvdXRlS2luZAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0TmdDb21wb25lbnRCeVJvdXRlS2luZChyb3V0ZUtpbmQpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMucm91dGVLaW5kVG9OZ0NvbXBvbmVudC5nZXQocm91dGVLaW5kKSB8fCBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBbiBOZ01vZHVsZSB0aGF0IHJlZ2lzdGVycyByb3V0ZXMuCiAgICAgICAgICoKICAgICAgICAgKiBOb3RlOiBlc3BlY2lhbGx5IGJlY2F1c2UgUG9seW1lciBiYXNlZCBUZW5zb3JCb2FyZCByZXF1aXJlcyByZWxhdGl2ZSBwYXRocwogICAgICAgICAqIGZvciBtYWtpbmcgcmVxdWVzdHMsIGFsdGhvdWdoIG5vdCByZXF1aXJlZCwgcHJlZmVyIHRvIGhhdmUgcGF0aCB0aGF0IGVuZHMKICAgICAgICAgKiB3aXRoICIvIi4KICAgICAgICAgKgogICAgICAgICAqIEV4YW1wbGU6CiAgICAgICAgICoKICAgICAgICAgKiBmdW5jdGlvbiByb3V0ZVByb3ZpZGVyKCkgewogICAgICAgICAqICAgcmV0dXJuIFt7CiAgICAgICAgICogICAgIHBhdGg6ICcvZXhwZXJpbWVudHMvJywKICAgICAgICAgKiAgICAgbmdDb21wb25lbnQ6IFNjYWxhcnNEYXNoYm9hcmQsCiAgICAgICAgICogICAgIHJvdXRlS2luZDogUm91dGVLaW5kLkVYUEVSSU1FTlRTLAogICAgICAgICAqICAgfV07CiAgICAgICAgICogfQogICAgICAgICAqCiAgICAgICAgICogXEBOZ01vZHVsZSh7CiAgICAgICAgICogICBpbXBvcnRzOiBbCiAgICAgICAgICogICAgIFJvdXRlUmVnaXN0cnlNb2R1bGUucmVnaXN0ZXJSb3V0ZXMocm91dGVzUHJvdmlkZXIpLAogICAgICAgICAqICAgXSwKICAgICAgICAgKiAgIGVudHJ5Q29tcG9uZW50czogW1NjYWxhcnNEYXNoYm9hcmRdCiAgICAgICAgICogfSkKICAgICAgICAgKiBAcGFyYW0gez99IHJvdXRlQ29uZmlnUHJvdmlkZXIKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHN0YXRpYyByZWdpc3RlclJvdXRlcyhyb3V0ZUNvbmZpZ1Byb3ZpZGVyKSB7CiAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICBuZ01vZHVsZTogUm91dGVSZWdpc3RyeU1vZHVsZSwKICAgICAgICAgICAgICAgIHByb3ZpZGVyczogWwogICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgcHJvdmlkZTogUk9VVEVfQ09ORklHU19UT0tFTiwKICAgICAgICAgICAgICAgICAgICAgICAgbXVsdGk6IHRydWUsCiAgICAgICAgICAgICAgICAgICAgICAgIHVzZUZhY3Rvcnk6IHJvdXRlQ29uZmlnUHJvdmlkZXIsCiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgIH07CiAgICAgICAgfQogICAgfQogICAgUm91dGVSZWdpc3RyeU1vZHVsZS5kZWNvcmF0b3JzID0gWwogICAgICAgIHsgdHlwZTogTmdNb2R1bGUsIGFyZ3M6IFt7fSxdIH0sCiAgICBdOwogICAgLyoqIEBub2NvbGxhcHNlICovCiAgICBSb3V0ZVJlZ2lzdHJ5TW9kdWxlLmN0b3JQYXJhbWV0ZXJzID0gKCkgPT4gWwogICAgICAgIHsgdHlwZTogQXJyYXksIGRlY29yYXRvcnM6IFt7IHR5cGU6IE9wdGlvbmFsIH0sIHsgdHlwZTogSW5qZWN0LCBhcmdzOiBbUk9VVEVfQ09ORklHU19UT0tFTixdIH1dIH0KICAgIF07CiAgICAvKiogQG5vY29sbGFwc2UgKi8gUm91dGVSZWdpc3RyeU1vZHVsZS7JtW1vZCA9IMm1ybVkZWZpbmVOZ01vZHVsZSh7IHR5cGU6IFJvdXRlUmVnaXN0cnlNb2R1bGUgfSk7CiAgICAvKiogQG5vY29sbGFwc2UgKi8gUm91dGVSZWdpc3RyeU1vZHVsZS7JtWluaiA9IMm1ybVkZWZpbmVJbmplY3Rvcih7IGZ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lW2lkXSA9IG5hbWU7CiAgICAgICAgfQogICAgICAgIHJldHVybiBpZFRvRGlzcGxheU5hbWU7CiAgICB9KTsKCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcgYWRkZWQgYnkgdHNpY2tsZQogICAgICogR2VuZXJhdGVkIGZyb206IHRlbnNvcmJvYXJkL3dlYmFwcC9hcHBfcm91dGluZy92aWV3cy9yb3V0ZXJfb3V0bGV0X2NvbXBvbmVudC50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICBjb25zdCBfYzAkOSA9IFsicm91dGVDb250YWluZXIiXTsKICAgIGNsYXNzIFJvdXRlck91dGxldENvbXBvbmVudCB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBjb21wb25lbnRGYWN0b3J5UmVzb2x2ZXIKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3Rvcihjb21wb25lbnRGYWN0b3J5UmVzb2x2ZXIpIHsKICAgICAgICAgICAgdGhpcy5jb21wb25lbnRGYWN0b3J5UmVzb2x2ZXIgPSBjb21wb25lbnRGYWN0b3J5UmVzb2x2ZXI7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gY2hhbmdlcwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkNoYW5nZXMoY2hhbmdlcykgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGFjdGl2ZUNvbXBvbmVudENoYW5nZSA9IGNoYW5nZXNbJ2FjdGl2ZU5nQ29tcG9uZW50J107CiAgICAgICAgICAgIGlmIChhY3RpdmVDb21wb25lbnRDaGFuZ2UpIHsKICAgICAgICAgICAgICAgIHRoaXMucm91dGVDb250YWluZXIuY2xlYXIoKTsKICAgICAgICAgICAgICAgIGlmIChhY3RpdmVDb21wb25lbnRDaGFuZ2UuY3VycmVudFZhbHVlKSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGNvbXBvbmVudEZhY3RvcnkgPSB0aGlzLmNvbXBvbmVudEZhY3RvcnlSZXNvbHZlci5yZXNvbHZlQ29tcG9uZW50RmFjdG9yeShhY3RpdmVDb21wb25lbnRDaGFuZ2UuY3VycmVudFZhbHVlKTsKICAgICAgICAgICAgICAgICAgICB0aGlzLnJvdXRlQ29udGFpbmVyLmNyZWF0ZUNvbXBvbmVudChjb21wb25lbnRGYWN0b3J5KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIFJvdXRlck91dGxldENvbXBvbmVudC5kZWNvcmF0b3JzID0gWwogICAgICAgIHsgdHlwZTogQ29tcG9uZW50LCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIHNlbGVjdG9yOiAncm91dGVyLW91dGxldC1jb21wb25lbnQnLAogICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlOiBgIDxuZy1jb250YWluZXIgI3JvdXRlQ29udGFpbmVyPjwvbmctY29udGFpbmVyPiBgLAogICAgICAgICAgICAgICAgICAgIGNoYW5nZURldGVjdGlvbjogQ2hhbmdlRGV0ZWN0aW9uU3RyYXRlZ3kuT25QdXNoLAogICAgICAgICAgICAgICAgfSxdIH0sCiAgICBdOwogICAgLyoqIEBub2NvbGxhcHNlICovCiAgICBSb3V0ZXJPdXRsZXRDb21wb25lbnQuY3RvclBhcmFtZXRlcnMgPSAoKSA9PiBbCiAgICAgICAgeyB0eXBlOiBDb21wb25lbnRGYWN0b3J5UmVzb2x2ZXIgfQogICAgXTsKICAgIFJvdXRlck91dGxldENvbXBvbm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XBvbmVudCQgPSBjb21iaW5lTGF0ZXN0KFsKICAgICAgICAgICAgICAgIHRoaXMuc3RvcmUuc2VsZWN0KGdldEFjdGl2ZVJvdXRlKSwKICAgICAgICAgICAgICAgIHRoaXMuc3RvcmUuc2VsZWN0KGdldE5leHRSb3V0ZUZvclJvdXRlck91dGxldE9ubHkpLAogICAgICAgICAgICBdKS5waXBlKG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoW2FjdGl2ZVJvdXRlLCBuZXh0Um91dGVdKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAoIWFjdGl2ZVJvdXRlKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBpc1JvdXRlVHJhbnNpdGlvbmluZyA9IG5leHRSb3V0ZSAhPT0gbnVsbCAmJgogICAgICAgICAgICAgICAgICAgIGdldFJvdXRlSWQobmV4dFJvdXRlLnJvdXRlS2luZCwgbmV4dFJvdXRlLnBhcmFtcykgIT09CiAgICAgICAgICAgICAgICAgICAgICAgIGdldFJvdXRlSWQoYWN0aXZlUm91dGUucm91dGVLaW5kLCBhY3RpdmVSb3V0ZS5wYXJhbXMpOwogICAgICAgICAgICAgICAgcmV0dXJuIGlzUm91dGVUcmFuc2l0aW9uaW5nCiAgICAgICAgICAgICAgICAgICAgPyBudWxsCiAgICAgICAgICAgICAgICAgICAgOiB0aGlzLnJlZ2lzdHJ5LmdldE5nQ29tcG9uZW50QnlSb3V0ZUtpbmQoYWN0aXZlUm91dGUucm91dGVLaW5kKTsKICAgICAgICAgICAgfSkpKTsKICAgICAgICB9CiAgICB9CiAgICBSb3V0ZXJPdXRsZXRDb250YWluZXIuZGVjb3JhdG9ycyA9IFsKICAgIC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2hpbGQobWVkaWFRdWVyeVN0eWxlTm9kZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKG1lZGlhUXVlcnlTdHlsZU5vZGUuc2hlZXQpIHsKICAgICAgICAgICAgICAgICgoLyoqIEB0eXBlIHs/fSAqLyAobWVkaWFRdWVyeVN0eWxlTm9kZS5zaGVldCkpKQogICAgICAgICAgICAgICAgICAgIC5pbnNlcnRSdWxlKGBAbWVkaWEgJHtxdWVyeX0gey5meC1xdWVyeS10ZXN0eyB9fWAsIDApOwogICAgICAgICAgICAgICAgbWVkaWFRdWVyaWVzRm9yV2Via2l0Q29tcGF0aWJpbGl0eS5hZGQocXVlcnkpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGNhdGNoIChlKSB7CiAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoZSk7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBOby1vcCBtYXRjaE1lZGlhIHJlcGxhY2VtZW50IGZvciBub24tYnJvd3NlciBwbGF0Zm9ybXMuCiAgICAgKiBAcGFyYW0gez99IHF1ZXJ5CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBub29wTWF0Y2hNZWRpYShxdWVyeSkgewogICAgICAgIC8vIFVzZSBgYXMgYW55YCBoZXJlIHRvIGF2b2lkIGFkZGluZyBhZGRpdGlvbmFsIG5lY2Vzc2FyeSBwcm9wZXJ0aWVzIGZvcgogICAgICAgIC8vIHRoZSBub29wIG1hdGNoZXIuCiAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovICh7CiAgICAgICAgICAgIG1hdGNoZXM6IHF1ZXJ5ID09PSAnYWxsJyB8fCBxdWVyeSA9PT0gJycsCiAgICAgICAgICAgIG1lZGlhOiBxdWVyeSwKICAgICAgICAgICAgYWRkTGlzdGVuZXI6ICgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsgfSksCiAgICAgICAgICAgIHJlbW92ZUxpc3RlbmVyOiAoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7IH0pCiAgICAgICAgfSkpOwogICAgfQogICAgLyoqCiAgICAgKiBVdGlsaXR5IGZvciBjaGVja2luZyB0aGUgbWF0Y2hpbmcgc3RhdGUgb2YgXEBtZWRpYSBxdWVyaWVzLgogICAgICovCiAgICBjbGFzcyBCcmVha3BvaW50T2JzZXJ2ZXIgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gX21lZGlhTWF0Y2hlcgogICAgICAgICAqIEBwYXJhbSB7P30gX3pvbmUKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihfbWVkaWFNYXRjaGVyLCBfem9uZSkgewogICAgICAgICAgICB0aGlzLl9tZWRpYU1hdGNoZXIgPSBfbWVkaWFNYXRjaGVyOwogICAgICAgICAgICB0aGlzLl96b25lID0gX3pvbmU7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBBIG1hcCBvZiBhbGwgbWVkaWEgcXVlcmllcyBjdXJyZW50bHkgYmVpbmcgbGlzdGVuZWQgZm9yLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fcXVlcmllcyA9IG5ldyBNYXAoKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEEgc3ViamVjdCBmb3IgYWxsIG90aGVyIG9ic2VydmFibGVzIHRvIHRha2VVbnRpbCBiYXNlZCBvbi4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX2Rlc3Ryb3lTdWJqZWN0ID0gbmV3IFN1YmplY3QoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ29tcGxldGVzIHRoZSBhY3RpdmUgc3ViamVjdCwgc2lnbmFsbGluZyB0byBhbGwgb3RoZXIgb2JzZXJ2YWJsZXMgdG8gY29tcGxldGUuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uRGVzdHJveSgpIHsKICAgICAgICAgICAgdGhpcy5fZGVzdHJveVN1YmplY3QubmV4dCgpOwogICAgICAgICAgICB0aGlzLl9kZXN0cm95U3ViamVjdC5jb21wbGV0ZSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGV0aGVyIG9uZSBvciBtb3JlIG1lZGlhIHF1ZXJpZXMgbWF0Y2ggdGhlIGN1cnJlbnQgdmlld3BvcnQgc2l6ZS4KICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlIE9uZSBvciBtb3JlIG1lZGlhIHF1ZXJpZXMgdG8gY2hlY2suCiAgICAgICAgICogQHJldHVybiB7P30gV2hldGhlciBhbnkgb2YgdGhlIG1lZGlhIHF1ZXJpZXMgbWF0Y2guCiAgICAgICAgICovCiAgICAgICAgaXNNYXRjaGVkKHZhbHVlKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcXVlcmllcyA9IHNwbGl0UXVlcmllcyhjb2VyY2VBcnJheSh2YWx1ZSkpOwogICAgICAgICAgICByZXR1cm4gcXVlcmllcy5zb21lKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBtZWRpYVF1ZXJ5CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBtZWRpYVF1ZXJ5ID0+IHRoaXMuX3JlZ2lzdGVyUXVlcnkobWVkaWFRdWVyeSkubXFsLm1hdGNoZXMpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogR2V0cyBhbiBvYnNlcnZhYmxlIG9mIHJlc3VsdHMgZm9yIHRoZSBnaXZlbiBxdWVyaWVzIHRoYXQgd2lsbCBlbWl0IG5ldyByZXN1bHRzIGZvciBhbnkgY2hhbmdlcwogICAgICAgICAqIGluIG1hdGNoaW5nIG9mIHRoZSBnaX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AgICAgICogQHBhcmFtIHs/fSBicmVha3BvaW50U3RhdGVzCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoYnJlYWtwb2ludFN0YXRlcykgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgcmVzcG9uc2UgPSB7CiAgICAgICAgICAgICAgICAgICAgbWF0Y2hlczogZmFsc2UsCiAgICAgICAgICAgICAgICAgICAgYnJlYWtwb2ludHM6IHt9LAogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIGJyZWFrcG9pbnRTdGF0ZXMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHN0YXRlCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoc3RhdGUpID0+IHsKICAgICAgICAgICAgICAgICAgICByZXNwb25zZS5tYXRjaGVzID0gcmVzcG9uc2UubWF0Y2hlcyB8fCBzdGF0ZS5tYXRjaGVzOwogICAgICAgICAgICAgICAgICAgIHJlc3BvbnNlLmJyZWFrcG9pbnRzW3N0YXRlLnF1ZXJ5XSA9IHN0YXRlLm1hdGNoZXM7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICByZXR1cm4gcmVzcG9uc2U7CiAgICAgICAgICAgIH0pKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJlZ2lzdGVycyBhIHNwZWNpZmljIHF1ZXJ5IHRvIGJlIGxpc3RlbmVkIGZvci4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gcXVlcnkKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9yZWdpc3RlclF1ZXJ5KHF1ZXJ5KSB7CiAgICAgICAgICAgIC8vIE9ubHkgc2V0IHVw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FkZGl0aW9uYWxseSwgc29tZSBicm93c2VycyBkbyBub3QKICAgICAgICAgICAgICAgIC8vIGhhdmUgTWVkaWFRdWVyeUxpc3QgaW5oZXJpdCBmcm9tIEV2ZW50VGFyZ2V0LCB3aGljaCBjYXVzZXMgaW5jb25zaXN0ZW5jaWVzIGluIGhvdyBab25lLmpzCiAgICAgICAgICAgICAgICAvLyBwYXRjaGVzIGl0LgogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgaGFuZGxlciA9ICgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZQogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKGUpID0+IHRoaXMuX3pvbmUucnVuKCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IG9ic2VydmVyLm5leHQoZSkpKSk7CiAgICAgICAgICAgICAgICBtcWwuYWRkTGlzdGVuZXIoaGFuZGxlcik7CiAgICAgICAgICAgICAgICByZXR1cm4gKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgICAgIG1xbC5yZW1vdmVMaXN0ZW5lcihoYW5kbGVyKTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICB9KSkucGlwZShzdGFydFdpdGgobXFsKSwgbWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBuZXh0TXFsCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAobmV4dE1xbCkgPT4gKHsgcXVlcnksIG1hdGNoZXM6IG5leHRNcWwubWF0Y2hlcyB9KSkpLCB0YWtlVW50aWwodGhpcy5fZGVzdHJveVN1YmplY3QpKTs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0ZW1wbGF0ZSBUCiAgICAgKi8KICAgIGNsYXNzIE1hdFNuYWNrQmFyUmVmIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGNvbnRhaW5lckluc3RhbmNlCiAgICAgICAgICogQHBhcmFtIHs/fSBfb3ZlcmxheVJlZgogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKGNvbnRhaW5lckluc3RhbmNlLCBfb3ZlcmxheVJlZikgewogICAgICAgICAgICB0aGlzLl9vdmVybGF5UmVmID0gX292ZXJsYXlSZWY7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBTdWJqZWN0IGZvciBub3RpZnlpbmcgdGhlIHVzZXIgdGhhdCB0aGUgc25hY2sgYmFyIGhhcyBiZWVuIGRpc21pc3NlZC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX2FmdGVyRGlzbWlzc2VkID0gbmV3IFN1YmplY3QoKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFN1YmplY3QgZm9yIG5vdGlmeWluZyB0aGUgdXNlciB0aGF0IHRoZSBzbmFjayBiYXIgaGFzIG9wZW5lZCBhbmQgYXBwZWFyZWQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9hZnRlck9wZW5lZCA9IG5ldyBTdWJqZWN0KCk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBTdWJqZWN0IGZvciBub3RpZnlpbmcgdGhlIHVzZXIgdGhhdCB0aGUgc25hY2sgYmFyIGFjdGlvbiB3YXMgY2FsbGVkLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fb25BY3Rpb24gPSBuZXcgU3ViamVjdCgpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogV2hldGhlciB0aGUgc25hY2sgYmFyIHdhcyBkaXNtaXNzZWQgdXNpbmcgdGhlIGFjdGlvbiBidXR0b24uCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9kaXNtaXNzZWRCeUFjdGlvbiA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLmNvbnRhaW5lckluc3RhbmNlID0gY29udGFpbmVySW5zdGFuY2U7CiAgICAgICAgICAgIC8vIERpc21pc3Mgc25hY2tiYXIgb24gYWN0aW9uLgogICAgICAgICAgICB0aGlzLm9uQWN0aW9uKCkuc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHRoaXMuZGlzbWlzcygpKSk7CiAgICAgICAgICAgIGNvbnRhaW5lckluc3RhbmNlLl9vbkV4aXQuc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHRoaXMuX2ZpbmlzaERpc21pc3MoKSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBEaXNtaXNzZXMgdGhlIHNuYWNrIGJhci4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGRpc21pc3MoKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5fYWZ0ZXJEaXNtaXNzZWQuY2xvc2VkKSB7CiAgICAgICAgICAgICAgICB0aGlzLmNvbnRhaW5lckluc3RhbmNlLmV4aXQoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBjbGVhclRpbWVvdXQodGhpcy5fZHVyYXRpb25UaW1lb3V0SWQpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBNYXJrcyB0aGUgc25hY2tiYXIgYWN0aW9uIGNsaWNrZWQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkaXNtaXNzV2l0aEFjdGlvbigpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLl9vbkFjdGlvbi5jbG9zZWQpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2Rpc21pc3NlZEJ5QWN0aW9uID0gdHJ1ZTsKICAgICAgICAgICAgICAgIHRoaXMuX29uQWN0aW9uLm5leHQoKTsKICAgICAgICAgICAgICAgIHRoaXMuX29uQWN0aW9uLmNvbXBsZXRlKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogTWFya3MgdGhlIHNuYWNrYmFyIGFjdGlvbiBjbGlja2VkLgogICAgICAgICAqIEBkZXByZWNhdGVkIFVzZSBgZGlzbWlzc1dpdGhBY3Rpb25gIGluc3RlYWQuCiAgICAgICAgICogXEBicmVha2luZy1jaGFuZ2UgOC4wLjAKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGNsb3NlV2l0aEFjdGlvbigpIHsKICAgICAgICAgICAgdGhpcy5kaXNtaXNzV2l0aEFjdGlvbigpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBEaXNtaXNzZXMgdGhlIHNuYWNrIGJhciBhZnRlciBzb21lIGR1cmF0aW9uCiAgICAgICAgICogQHBhcmFtIHs/fSBkdXJhdGlvbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2Rpc21pc3NBZnRlcihkdXJhdGlvbikgewogICAgICAgICAgICAvLyBOb3RlIHRoYXQgd2UgbmVlZCB0byBjYXAgdGhlIGR1cmF0aW9uIHRvIHRoZSBtYXhpbXVtIHZhbHVlIGZvciBzZXRUaW1lb3V0LCBiZWNhdXNlCiAgICAgICAgICAgIC8vIGl0J2xsIHJldmVydCB0byAxIGlmIHNvbWVib2R5IHBhc3NlcyBpbiBzb21ldGhpbmcgZ3JlYXRlciAoZS5nLiBgSW5maW5pdHlgKS4gU2VlICMxNzIzNC4KICAgICAgICAgICAgdGhpcy5fZHVyYXRpb25UaW1lb3V0SWQgPSBzZXRUaW1lb3V0KCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHRoaXMuZGlzbWlzcygpKSwgTWF0aC5taW4oZHVyYXRpb24sIE1BWF9USU1FT1VUKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIE1hcmtzIHRoZSBzbmFja2JhciBhcyBvcGVuZWQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9vcGVuKCkgewogICAgICAgICAgICBpZiAoIXRoaXMuX2FmdGVyT3BlbmVkLmNsb3NlZCkgewogICAgICAgICAgICAgICAgdGhpcy5fYWZ0ZXJPcGVuZWQubmV4dCgpOwogICAgICAgICAgICAgICAgdGhpcy5fYWZ0ZXJPcGVuZWQuY29tcGxldGUoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDbGVhbnMgdXAgdGhlIERPTSBhZnRlciBjbG9zaW5nLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZmluaXNoRGlzbWlzcygpIHsKICAgICAgICAgICAgdGhpcy5fb3ZlcmxheVJlZi5kaXNwb3NlKCk7CiAgICAgICAgICAgIGlmICghdGhpcy5fb25BY3Rpb24uY2xvc2VkKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9vbkFjdGlvbi5jb21wbGV0ZSgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2FmdGVyRGlzbWlzc2VkLm5leHQoeyBkaXNtaXNzZWRCeUFjdGlvbjogdGhpcy5fZGlzbWlzc2VkQnlBY3Rpb24gfSk7CiAgICAgICAgICAgIHRoaXMuX2FmdGVyRGlzbWlzc2VkLmNvbXBsZXRlKCk7CiAgICAgICAgICAgIHRoaXMuX2Rpc21pc3NlZEJ5QWN0aW9uID0gZmFsc2U7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEdldHMgYW4gb2JzZXJ2YWJsZSB0aGF0IGlzIG5vdGlmaWVkIHdoZW4gdGhlIHNuYWNrIGJhciBpcyBmaW5pc2hlZCBjbG9zaW5nLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYWZ0ZXJEaXNtaXNzZWQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9hZnRlckRpc21pc3NlZC5hc09ic2VydmFibGUoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogR2V0cyBhbiBvYnNlcnZhYmxlIHRoYXQgaXMgbm90aWZpZWQgd2hlbiB0aGUgc25hY2sgYmFyIGhhcyBvcGVuZWQgYW5kIGFwcGVhcmVkLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYWZ0ZXJPcGVuZWQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmNvbnRhaW5lckluc3RhbmNlLl9vbkVudGVyOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIGFuIG9ic2VydmFibGUgdGhhdCBpcyBub3RpZmllZCB3aGVuIHRoZSBzbmFjayBiYXIgYWN0aW9uIGlzIGNhbGxlZC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uQWN0aW9uKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fb25BY3Rpb24uYXNPYnNlcnZhYmxlKCk7CiAgICAgICAgfQogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogc3JjL21hdGVyaWFsL3NuYWNrLWJhci9zbmFjay1iYXItY29uZmlnLnRzCiAgICAgKiBAc3VwcHJlc3Mge2NoZWNrVHlwZXMsY29uc3RhbnRQcm9wZXJ0eSxleHRyYVJlcXVpcmUsbWlzc2luZ092ZXJyaWRlLG1pc3NpbmdSZXR1cm4sdW51c2VkUHJpdmF0ZU1lbWJlcnMsdXNlbGVzc0NvZGV9IGNoZWNrZWQgYnkgdHNjCiAgICAgKi8KICAg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dCBiZWZvcmUgYXV0b21hdGljYWxseSBkaXNtaXNzaW5nIHRoZSBzbmFjayBiYXIuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmR1cmF0aW9uID0gMDsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIERhdGEgYmVpbmcgaW5qZWN0ZWQgaW50byB0aGUgY2hpbGQgY29tcG9uZW50LgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5kYXRhID0gbnVsbDsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFRoZSBob3Jpem9udGFsIHBvc2l0aW9uIHRvIHBsYWNlIHRoZSBzbmFjayBiYXIuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmhvcml6b250YWxQb3NpdGlvbiA9ICdjZW50ZXInOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogVGhlIHZlcnRpY2FsIHBvc2l0aW9uIHRvIHBsYWNlIHRoZSBzbmFjayBiYXIuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLnZlcnRpY2FsUG9zaXRpb24gPSAnYm90dG9tJzsKICAgICAgICB9CiAgICB9CgogICAgLyoqCiAgICAgKiBAZmlsZW92ZXJ2aWV3IGFkZGVkIGJ5IHRzaWNrbGUKICAgICAqIEdlbmVyYXRlZCBmcm9tOiBzcmMvbWF0ZXJpYWwvc25hY2stYmFyL3NpbXBsZS1zbmFjay1iYXIudHMKICAgICAqIEBzdXBwcmVzcyB7Y2hlY2tUeXBlcyxjb25zdGFudFByb3BlcnR5LGV4dHJhUmVxdWlyZSxtaXNzaW5nT3ZlcnJpZGUsbWlzc2luZ1JldHVybix1bnVzZWRQcml2YXRlTWVtYmVycyx1c2VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgLyoqCiAgICAgKiBBIGNvbXBvbmVudCB1c2VkIHRvIG9wZW4gYXMgdGhlIGRlZmF1bHQgc25hY2sgYmFyLCBtYXRjaGluZyBtYXRlcmlhbCBzcGVjLgogICAgICogVGhpcyBzaG91bGQgb25seSBiZSB1c2VkIGludGVybmFsbHkgYnkgdGhlIHNuYWNrIGJhciBzZXJ2aWNlLgogICAgICovCiAgICBjbGFzcyBTaW1wbGVTbmFja0JhciB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBzbmFja0JhclJlZgogICAgICAgICAqIEBwYXJhbSB7P30gZGF0YQogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKHNuYWNrQmFyUmVmLCBkYXRhKSB7CiAgICAgICAgICAgIHRoaXMuc25hY2tCYXJSZWYgPSBzbmFja0JhclJlZjsKICAgICAgICAgICAgdGhpcy5kYXRhID0gZGF0YTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUGVyZm9ybXMgdGhlIGFjdGlvbiBvbiB0aGUgc25hY2sgYmFyLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYWN0aW9uKCkgewogICAgICAgICAgICB0aGlzLnNuYWNrQmFyUmVmLmRpc21pc3NXaXRoQWN0aW9uKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIElmIHRoZSBhY3Rpb24gYnV0dG9uIHNob3VsZCBiZSBzaG93bi4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBoYXNBY3Rpb24oKSB7CiAgICAgICAgICAgIHJldHVybiAhIXRoaXMuZGF0YS5hY3Rpb247CiAgICAgICAgfQogICAgfQogICAgU2ltcGxlU25hY2tCYXIuybVmYWMgPSBmdW5jdGlvbiBTaW1wbGVTbmFja0Jhcl9GYWN0b3J5KHQpIHsgcmV0dXJuIG5ldyAodCB8fCBTaW1wbGVTbmFja0JhcikoybXJtWRpcmVjdGl2ZUluamVjdChNYXRTbmFja0JhclJlZiksIMm1ybVkaXJlY3RpdmVJbmplY3QoTUFUX1NOQUNLX0JBUl9EQVRBKSk7IH07CiAgIC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EBkb2NzLXByaXZhdGUKICAgICAqIEB0eXBlIHs/fQogICAgICovCiAgICBjb25zdCBtYXRTbmFja0JhckFuaW1hdGlvbnMgPSB7CiAgICAgICAgLyoqCiAgICAgICAgICogQW5pbWF0aW9uIHRoYXQgc2hvd3MgYW5kIGhpZGVzIGEgc25hY2sgYmFyLgogICAgICAgICAqLwogICAgICAgIHNuYWNrQmFyU3RhdGU6IHRyaWdnZXIoJ3N0YXRlJywgWwogICAgICAgICAgICBzdGF0ZSgndm9pZCwgaGlkZGVuJywgc3R5bGUoewogICAgICAgICAgICAgICAgdHJhbnNmb3JtOiAnc2NhbGUoMC44KScsCiAgICAgICAgICAgICAgICBvcGFjaXR5OiAwLAogICAgICAgICAgICB9KSksCiAgICAgICAgICAgIHN0YXRlKCd2aXNpYmxlJywgc3R5bGUoewogICAgICAgICAgICAgICAgdHJhbnNmb3JtOiAnc2NhbGUoMSknLAogICAgICAgICAgICAgICAgb3BhY2l0eTogMSwKICAgICAgICAgICAgfSkpLAogICAgICAgICAgICB0cmFuc2l0aW9uKCcqID0+IHZpc2libGUnLCBhbmltYXRlKCcxNTBtcyBjdWJpYy1iZXppZXIoMCwgMCwgMC4yLCAxKScpKSwKICAgICAgICAgICAgdHJhbnNpdGlvbignKiA9PiB2b2lkLCAqID0+IGhpZGRlbicsIGFuaW1hdGUoJzc1bXMgY3ViaWMtYmV6aWVyKDAuNCwgMC4wLCAxLCAxKScsIHN0eWxlKHsKICAgICAgICAgICAgICAgIG9wYWNpdHk6IDAKICAgICAgICAgICAgfSkpKSwKICAgICAgICBdKQogICAgfTsKCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcgYWRkZWQgYnkgdHNpY2tsZQogICAgICogR2VuZXJhdGVkIGZyb206IHNyYy9tYXRlcmlhbC9zbmFjay1iYXIvc25hY2stYmFyLWNvbnRhaW5lci50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvKioKICAgICAqIEludGVybmFsIGNvbXBvbmVudCB0aGF0IHdyYXBzIHVzZXItcHJvdmlkZWQgc25hY2sgYmFyIGNvbnRlbnQuCiAgICAgKiBcQGRvY3MtcHJpdmF0ZQogICAgICovCiAgICBjbGFzcyBNYXRTbmFja0JhckNvbnRhaW5lciBleHRlbmRzIEJhc2VQb3J0YWxPdXRsZXQgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gX25nWm9uZQogICAgICAgICAqIEBwYXJhbSB7P30gX2VsZW1lbnRSZWYKICAgICAgICAgKiBAcGFyYW0gez99IF9jaGFuZ2VEZXRlY3RvclJlZgogICAgICAgICAqIEBwYXJhbSB7P30gc25hY2tCYXJDb25maWcKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3Rvcihfbmdab25lLCBfZWxlbWVudFJlZiwgX2NoYW5nZURldGVjdG9yUmVmLCBzbmFja0JhckNvbmZpZykgewogICAgICAgICAgICBzdXBlcigpOwogICAgICAgICAgICB0aGlzLl9uZ1pvbmUgPSBfbmdab25lOwogICAgICAgICAgICB0aGlzLl9lbGVtZW50UmVmID0gX2VsZW1lbnRSZWY7CiAgICAgICAgICAgIHRoaXMuX2NoYW5nZURldGVjdG9yUmVmID0gX2NoYW5nZURldGVjdG9yUmVmOwogICAgICAgICAgICB0aGlzLnNuYWNrQmFyQ29uZmlnID0gc25hY2tCYXJDb25maWc7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBXaGV0aGVyIHRoZSBjb21wb25lbnQgaGFzIGJlZW4gZGVzdHJveWVkLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fZGVzdHJveWVkID0gZmFsc2U7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBTdWJqZWN0IGZvciBub3RpZnlpbmcgdGhhdCB0aGUgc25hY2sgYmFyIGhhcyBleGl0ZWQgZnJvbSB2aWV3LgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fb25FeGl0ID0gbmV3IFN1YmplY3QoKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFN1YmplY3QgZm9yIG5vdGlmeWluZyB0aGF0IHRoZSBzbmFjayBiYXIgaGFzIGZpbmlzaGVkIGVudGVyaW5nIHRoZSB2aWV3LgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fb25FbnRlciA9IG5ldyBTdWJqZWN0KCk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBUaGUgc3RhdGUgb2YgdGhlIHNuYWNrIGJhciBhbmltYXRpb25zLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fYW5pbWF0aW9uU3RhdGUgPSAndm9pZCc7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBBdHRhY2hlcyBhIERPTSBwb3J0YWwgdG8gdGhlIHNuYWNrIGJhciBjb250YWluZXIuCiAgICAgICAgICAgICAqIEBkZXByZWNhdGVkIFRvIGJlIHR1cm5lZCBpbnRvIGEgbWV0aG9kLgogICAgICAgICAgICAgKiBcQGJyZWFraW5nLWNoYW5nZSAxMC4wLjAKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuYXR0YWNoRG9tUG9ydGFsID0gKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHBvcnRhbAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHBvcnRhbCkgPT4gewogICAgICAgICAgICAgICAgdGhpcy5fYXNzZXJ0Tm90QXR0YWNoZWQoKTsKICAgICAgICAgICAgICAgIHRoaXMuX2FwcGx5U25hY2tCYXJDbGFzc2VzKCk7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fcG9ydGFsT3V0bGV0LmF0dGFjaERvbVBvcnRhbChwb3J0YWwpOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgLy8gQmFzZWQgb24gdGhlIEFSSUEgc3BlYywgYGFsZXJ0YCBhbmQgYHN0YXR1c2Agcm9sZXMgaGF2ZSBhbgogICAgICAgICAgICAvLyBpbXBsaWNpdCBgYXNzZXJ0aXZlYCBhbmQgYHBvbGl0ZWAgcG9saXRlbmVzcyByZXNwZWN0aXZlbHkuCiAgICAgICAgICAgIGlmIChzbmFja0JhckNvbmZpZy5wb2xpdGVuZXNzID09PSAnYXNzZXJ0aXZlJyAmJiAhc25hY2tCYXJDb25maWcuYW5ub3VuY2VtZW50TWVzc2FnZSkgewogICAgICAgICAgICAgICAgdGhpcy5fcm9sZSA9ICdhbGVydCc7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoc25hY2tCYXJDb25maWcucG9saXRlbmVzcyA9PT0gJ29mZicpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3JvbGUgPSBudWxsOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fcm9sZSA9ICdzdGF0dXMnOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEF0dGFjaCBhIGNvbXBvbmVudCBwb3J0YWwgYXMgY29udGVudCB0byB0aGlzIHNuYWNrIGJhciBjb250YWluZXIuCiAgICAgICAgICogQHRlbXBsYXRlIFQKICAgICAgICAgKiBAcGFyYW0gez99IHBvcnRhbAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYXR0YWNoQ29tcG9uZW50UG9ydGFsKHBvcnRhbCkgewogICAgICAgICAgICB0aGlzLl9hc3NlcnROb3RBdHRhY2hlZCgpOwogICAgICAgICAgICB0aGlzLl9hcHBseVNuYWNrQmFyQ2xhc3NlcygpOwogICAgICAgICAgICByZXR1cm4gdGhpcy5fcG9ydGFsT3V0bGV0LmF0dGFjaENvbXBvbmVudFBvcnRhbChwb3J0YWwpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBdHRhY2ggYSB0ZW1wbGF0ZSBwb3J0YWwgYXMgY29udGVudCB0byB0aGlzIHNuYWNrIGJhciBjb250YWluZXIuCiAgICAgICAgICogQHRlbXBsYXRlIEMKICAgICAgICAgKiBAcGFyYW0gez99IHBvcnRhbAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYXR0YWNoVGVtcGxhdGVQb3J0YWwocG9ydGFsKSB7CiAgICAgICAgICAgIHRoaXMuX2Fzc2VydE5vdEF0dGFjaGVkKCk7CiAgICAgICAgICAgIHRoaXMuX2FwcGx5U25hY2tCYXJDbGFzc2VzKCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9wb3J0YWxPdXRsZXQuYXR0YWNoVGVtcGxhdGVQb3J0YWwocG9ydGFsKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogSGFuZGxlIGVuZCBvZiBhbmltYXRpb25zLCB1cGRhdGluZyB0aGUgc3RhdGUgb2YgdGhlIHNuYWNrYmFyLgogICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uQW5pbWF0aW9uRW5kKGV2ZW50KSB7CiAgICAgICAgICAgIGNvbnN0IHsgZnJvbVN0YXRlLCB0b1N0YXRlIH0gPSBldmVudDsKICAgICAgICAgICAgaWYgKCh0b1N0YXRlID09PSAndm9pZCcgJiYgZnJvbVN0YXRlICE9PSAndm9pZCcpIHx8IHRvU3RhdGUgPT09ICdoaWRkZW4nKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9jb21wbGV0ZUV4aXQoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodG9TdGF0ZSA9PT0gJ3Zpc2libGUnKSB7CiAgICAgICAgICAgICAgICAvLyBOb3RlOiB3ZSBzaG91bGRuJ3QgdXNlIGB0aGlzYCBpbnNpZGUgdGhlIHpvbmUgY2FsbGJhY2ssCiAgICAgICAgICAgICAgICAvLyBiZWNhdXNlIGl0IGNhbiBjYXVzZSBhIG1lbW9yeSBsZWFrLgogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3Qgb25FbnRlciA9IHRoaXMuX29uRW50ZXI7CiAgICAgICAgICAgICAgICB0aGlzLl9uZ1pvbmUucnVuKCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgICAgICBvbkVudGVyLm5leHQoKTsKICAgICAgICAgICAgICAgICAgICBvbkVudGVyLmNvbXBsZXRlKCk7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQmVnaW4gYW5pbWF0aW9uIG9mIHNuYWNrIGJhciBlbnRyYW5jZSBpbnRvIHZpZXcuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBlbnRlcigpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLl9kZXN0cm95ZWQpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2FuaW1hdGlvblN0YXRlID0gJ3Zpc2libGUnOwogICAgICAgICAgICAgICAgdGhpcy5fY2hhbmdlRGV0ZWN0b3JSZWYuZGV0ZWN0Q2hhbmdlcygpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEJlZ2luIGFuaW1hdGlvbiBvZiB0aGUgc25hY2sgYmFyIGV4aXRpbmcgZnJvbSB2aWV3LgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZXhpdCgpIHsKICAgICAgICAgICAgLy8gTm90ZTogdGhpcyBvbmUgdH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8qKgogICAgICAgICAqIFdhaXRzIGZvciB0aGUgem9uZSB0byBzZXR0bGUgYmVmb3JlIHJlbW92aW5nIHRoZSBlbGVtZW50LiBIZWxwcyBwcmV2ZW50CiAgICAgICAgICogZXJyb3JzIHdoZXJlIHdlIGVuZCB1cCByZW1vdmluZyBhbiBlbGVtZW50IHdoaWNoIGlzIGluIHRoZSBtaWRkbGUgb2YgYW4gYW5pbWF0aW9uLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfY29tcGxldGVFeGl0KCkgewogICAgICAgICAgICB0aGlzLl9uZ1pvbmUub25NaWNyb3Rhc2tFbXB0eS5hc09ic2VydmFibGUoKS5waXBlKHRha2UoMSkpLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLl9vbkV4aXQubmV4dCgpOwogICAgICAgICAgICAgICAgdGhpcy5fb25FeGl0LmNvbXBsZXRlKCk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQXBwbGllcyB0aGUgdmFyaW91cyBwb3NpdGlvbmluZyBhbmQgdXNlci1jb25maWd1cmVkIENTUyBjbGFzc2VzIHRvIHRoZSBzbmFjayBiYXIuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9hcHBseVNuYWNrQmFyQ2xhc3NlcygpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBlbGVtZW50ID0gdGhpcy5fZWxlbWVudFJlZi5uYXRpdmVFbGVtZW50OwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHBhbmVsQ2xhc3NlcyA9IHRoaXMuc25hY2tCYXJDb25maWcucGFuZWxDbGFzczsKICAgICAgICAgICAgaWYgKHBhbmVsQ2xhc3NlcykgewogICAgICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkocGFuZWxDbGFzc2VzKSkgewogICAgICAgICAgICAgICAgICAgIC8vIE5vdGUgdGhhdCB3ZSBjYW4ndCB1c2UgYSBzcHJlYWQgaGVyZSwgYmVjYXVzZSBJRSBkb2Vzbid0IHN1cHBvcnQgbXVsdGlwbGUgYXJndW1lbnRzLgogICAgICAgICAgICAgICAgICAgIHBhbmVsQ2xhc3Nlcy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGNzc0NsYXNzCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICBjc3NDbGFzcyA9PiBlbGVtZW50LmNsYXNzTGlzdC5hZGQoY3NzQ2xhc3MpKSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBlbGVtZW50LmNsYXNzTGlzdC5hZGQocGFuZWxDbGFzc2VzKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5zbmFja0JhckNvbmZpZy5ob3Jpem9udGFsUG9zaXRpb24gPT09ICdjZW50ZXInKSB7CiAgICAgICAgICAgICAgICBlbGVtZW50LmNsYXNzTGlzdC5hZGQoJ21hdC1zbmFjay1iYXItY2VudGVyJyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHRoaXMuc25hY2tCYXJDb25maWcudmVydGljYWxQb3NpdGlvbiA9PT0gJ3RvcCcpIHsKICAgICAgICAgICAgICAgIGVsZW1lbnQuY2xhc3NMaXN0LmFkZCgnbWF0LXNuYWNrLWJhci10b3AnKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBB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LgogICAgICogQHR5cGUgez99CiAgICAgKi8KICAgIGNvbnN0IE1BVF9TTkFDS19CQVJfREVGQVVMVF9PUFRJT05TID0gbmV3IEluamVjdGlvblRva2VuKCdtYXQtc25hY2stYmFyLWRlZmF1bHQtb3B0aW9ucycsIHsKICAgICAgICBwcm92aWRlZEluOiAncm9vdCcsCiAgICAgICAgZmFjdG9yeTogTUFUX1NOQUNLX0JBUl9ERUZBVUxUX09QVElPTlNfRkFDVE9SWSwKICAgIH0pOwogICAgLyoqCiAgICAgKiBcQGRvY3MtcHJpdmF0ZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gTUFUX1NOQUNLX0JBUl9ERUZBVUxUX09QVElPTlNfRkFDVE9SWSgpIHsKICAgICAgICByZXR1cm4gbmV3IE1hdFNuYWNrQmFyQ29uZmlnKCk7CiAgICB9CiAgICAvKioKICAgICAqIFNlcnZpY2UgdG8gZGlzcGF0Y2ggTWF0ZXJpYWwgRGVzaWduIHNuYWNrIGJhciBtZXNzYWdlcy4KICAgICAqLwogICAgY2xhc3MgTWF0U25hY2tCYXIgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gX292ZXJsYXkKICAgICAgICAgKiBAcGFyYW0gez99IF9saXZlCiAgICAgICAgICogQHBhcmFtIHs/fSBfaW5qZWN0b3IKICAgICAgICAgKiBAcGFyYW0gez99IF9icmVha3BvaW50T2JzZXJ2ZXIKICAgICAgICAgKiBAcGFyYW0gez99IF9wYXJlbnRTbmFja0JhcgogICAgICAgICAqIEBwYXJhbSB7P30gX2RlZmF1bHRDb25maWcKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3Rvcihfb3ZlcmxheSwgX2xpdmUsIF9pbmplY3RvciwgX2JyZWFrcG9pbnRPYnNlcnZlciwgX3BhcmVudFNuYWNrQmFyLCBfZGVmYXVsdENvbmZpZykgewogICAgICAgICAgICB0aGlzLl9vdmVybGF5ID0gX292ZXJsYXk7CiAgICAgICAgICAgIHRoaXMuX2xpdmUgPSBfbGl2ZTsKICAgICAgICAgICAgdGhpcy5faW5qZWN0b3IgPSBfaW5qZWN0b3I7CiAgICAgICAgICAgIHRoaXMuX2JyZWFrcG9pbnRPYnNlcnZlciA9IF9icmVha3BvaW50T2JzZXJ2ZXI7CiAgICAgICAgICAgIHRoaXMuX3BhcmVudFNuYWNrQmFyID0gX3BhcmVudFNuYWNrQmFyOwogICAgICAgICAgICB0aGlzLl9kZWZhdWx0Q29uZmlnID0gX2RlZmF1bHRDb25maWc7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBSZWZlcmVuY2UgdG8gdGhlIGN1cnJlbnQgc25hY2sgYmFyIGluIHRoZSB2aWV3ICphdCB0aGlzIGxldmVsKiAoaW4gdGhlIEFuZ3VsYXIgaW5qZWN0b3IgdHJlZSkuCiAgICAgICAgICAgICAqIElmIHRoZXJlIGlzIGEgcGFyZW50IHNuYWNrLWJhciBzZXJ2aWNlLCBhbGwgb3BlcmF0aW9ucyBzaG91bGQgZGVsZWdhdGUgdG8gdGhhdCBwYXJlbnQKICAgICAgICAgICAgICogdmlhIGBfb3BlbmVkU25hY2tCYXJSZWZgLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fc25hY2tCYXJSZWZBdFRoaXNMZXZlbCA9IG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJlZmVyZW5jZSB0byB0aGUgY3VycmVudGx5IG9wZW5lZCBzbmFja2JhciBhdCAqYW55KiBsZXZlbC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBfb3BlbmVkU25hY2tCYXJSZWYoKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcGFyZW50ID0gdGhpcy5fcGFyZW50U25hY2tCYXI7CiAgICAgICAgICAgIHJldHVybiBwYXJlbnQgPyBwYXJlbnQuX29wZW5lZFNuYWNrQmFyUmVmIDogdGhpcy5fc25hY2tCYXJSZWZBdFRoaXNMZXZlbDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IF9vcGVuZWRTbmFja0JhclJlZih2YWx1ZSkgewogICAgICAgICAgICBpZiAodGhpcy5fcGFyZW50U25hY2tCYXIpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3BhcmVudFNuYWNrQmFyLl9vcGVuZWRTbmFja0JhclJlZiA9IHZhbHVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fc25hY2tCYXJSZWZBdFRoaXNMZXZlbCA9IHZhbHVlOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYW5kIGRpc3BhdGNoZXMgYSBzbmFjayBiYXIgd2l0aCBhIGN1c3RvbSBjb21wb25lbnQgZm9yIHRoZSBjb250ZW50LCByZW1vdmluZyBhbnkKICAgICAgICAgKiBjdXJyZW50bHkgb3BlbmVkIHNuYWNrIGJhcnMuCiAgICAgICAgICoKICAgICAgICAgKiBAdGVtcGxhdGUgVAogICAgICAgICAqIEBwYXJhbSB7P30gY29tcG9uZW50IENvbXBvbmVudCB0byBiZSBpbnN0YW50aWF0ZWQuCiAgICAgICAgICogQHBhcmFtIHs/PX0gY29uZmlnIEV4dHJhIGNvbmZpZ3VyYXRpb24gZm9yIHRoZSBzbmFjayBiYXIuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvcGVuRnJvbUNvbXBvbmVudChjb21wb25lbnQsIGNvbmZpZykgewogICAgICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX2F0dGFjaChjb21wb25lbnQsIGNvbmZpZykpKTsKICAgICAgICB9CiAgICAgICAgLyoqC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mZpZyA9IE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgdGhpcy5fZGVmYXVsdENvbmZpZyksIGNvbmZpZyk7CiAgICAgICAgICAgIC8vIFNpbmNlIHRoZSB1c2VyIGRvZXNuJ3QgaGF2ZSBhY2Nlc3MgdG8gdGhlIGNvbXBvbmVudCwgd2UgY2FuCiAgICAgICAgICAgIC8vIG92ZXJyaWRlIHRoZSBkYXRhIHRvIHBhc3MgaW4gb3VyIG93biBtZXNzYWdlIGFuZCBhY3Rpb24uCiAgICAgICAgICAgIF9jb25maWcuZGF0YSA9IHsgbWVzc2FnZSwgYWN0aW9uIH07CiAgICAgICAgICAgIGlmICghX2NvbmZpZy5hbm5vdW5jZW1lbnRNZXNzYWdlKSB7CiAgICAgICAgICAgICAgICBfY29uZmlnLmFubm91bmNlbWVudE1lc3NhZ2UgPSBtZXNzYWdlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0aGlzLm9wZW5Gcm9tQ29tcG9uZW50KFNpbXBsZVNuYWNrQmFyLCBfY29uZmlnKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogRGlzbWlzc2VzIHRoZSBjdXJyZW50bHktdmlzaWJsZSBzbmFjayBiYXIuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkaXNtaXNzKCkgewogICAgICAgICAgICBpZiAodGhpcy5fb3BlbmVkU25hY2tCYXJSZWYpIHsKICAgICAgICAgICAgICAgIHRoaXMuX29wZW5lZFNuYWNrQmFyUmVmLmRpc21pc3MoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25EZXN0cm95KCkgewogICAgICAgICAgICAvLyBPbmx5IGRpc21pc3MgdGhlIHNuYWNrIGJhciBhdCB0aGUgY3VycmVudCBsZXZlbCBvbiBkZXN0cm95LgogICAgICAgICAgICBpZiAodGhpcy5fc25hY2tCYXJSZWZBdFRoaXNMZXZlbCkgewogICAgICAgICAgICAgICAgdGhpcy5fc25hY2tCYXJSZWZBdFRoaXNMZXZlbC5kaXNtaXNzKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQXR0YWNoZXMgdGhlIHNuYWNrIGJhciBjb250YWluZXIgY29tcG9uZW50IHRvIHRoZSBvdmVybGF5LgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBvdmVybGF5UmVmCiAgICAgICAgICogQHBhcmFtIHs/fSBjb25maWcKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9hdHRhY2hTbmFja0JhckNvbnRhaW5lcihvdmVybGF5UmVmLCBjb25maWcpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB1c2VySW5qZWN0b3IgPSBjb25maWcgJiYgY29uZmlnLnZpZXdDb250YWluZXJSZWYgJiYgY29uZmlnLnZpZXdDb250YWluZXJSZWYuaW5qZWN0b3I7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaW5qZWN0b3IgPSBuZXcgUG9ydGFsSW5qZWN0b3IodXNlckluamVjdG9yIHx8IHRoaXMuX2luamVjdG9yLCBuZXcgV2Vha01hcChbCiAgICAgICAgICAgICAgICBbTWF0U25hY2tCYXJDb25maWcsIGNvbmZpZ10KICAgICAgICAgICAgXSkpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGNvbnRhaW5lclBvcnRhbCA9IG5ldyBDb21wb25lbnRQb3J0YWwoTWF0U25hY2tCYXJDb250YWluZXIsIGNvbmZpZy52aWV3Q29udGFpbmVyUmVmLCBpbmplY3Rvcik7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgY29udGFpbmVyUmVmID0gb3ZlcmxheVJlZi5hdHRhY2goY29udGFpbmVyUG9ydGFsKTsKICAgICAgICAgICAgY29udGFpbmVyUmVmLmluc3RhbmNlLnNuYWNrQmFyQ29uZmlnID0gY29uZmlnOwogICAgICAgICAgICByZXR1cm4gY29udGFpbmVyUmVmLmluc3RhbmNlOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBQbGFjZXMgYSBuZXcgY29tcG9uZW50IG9yIGEgdGVtcGxhdGUgYXMgdGhlIGNvbnRlbnQgb2YgdGhlIHNuYWNrIGJhciBjb250YWluZXIuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAdGVtcGxhdGUgVAogICAgICAgICAqIEBwYXJhbSB7P30gY29udGVudAogICAgICAgICAqIEBwYXJhbSB7Pz19IHVzZXJDb25maWcKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9hdHRhY2goY29udGVudCwgdXNlckNvbmZpZykgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGNvbmZpZyA9IE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LCBuZXcgTWF0U25hY2tCYXJDb25maWcoKSksIHRoaXMuX2RlZmF1bHRDb25maWcpLCB1c2VyQ29uZmlnKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBvdmVybGF5UmVmID0gdGhpcy5fY3JlYXRlT3ZlcmxheShjb25maWcpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGNvbnRhaW5lciA9IHRoaXMuX2F0dGFjaFNuYWNrQmFyQ29udGFpbmVyKG92ZXJsYXlSZWYsIGNvbmZpZyk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc25hY2tCYXJSZWYgPSBuZXcgTWF0U25hY2tCYXJSZWYoY29udGFpbmVyLCBvdmVybGF5UmVmKTsKICAgICAgICAgICAgaWYgKGNvbnRlbnQgaW5zdGFuY2VvZiBUZW1wbGF0ZVJlZikgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgcG9ydGFsID0gbmV3IFRlbXBsYXRlUG9ydGFsKGNvbnRlbnQsICgvKiogQHR5cGUgez99ICovIChudWxsKSksICgvKiogQHR5cGUgez99ICovICh7CiAgICAgICAgICAgICAgICAgICAgJGltcGxpY2l0OiBjb25maWcuZGF0YSwKICAgICAgICAgICAgICAgICAgICBzbmFja0JhclJlZgogICAgICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgICAgIHNuYWNrQmFyUmVmLmluc3RhbmNlID0gY29udGFpbmVyLmF0dGFjaFRlbXBsYXRlUG9ydGFsKHBvcnRhbCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBpbmplY3RvciA9IHRoaXMuX2NyZWF0ZUluamVjdG9yKGNvbmZpZywgc25hY2tCYXJSZWYpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgcG9ydGFsID0gbmV3IENvbXBvbmVudFBvcnRhbChjb250ZW50LCB1bmRlZmluZWQsIGluamVjdG9yKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGNvbnRlbnRSZWYgPSBjb250YWluZXIuYXR0YWNoQ29tcG9uZW50UG9ydGFsKHBvcnRhbCk7CiAgICAgICAgICAgICAgICAvLyBXZSBjYW4ndCBwYXNzIHRoaXMgdmlhIHRoZSBpbmplY3RvciwgYmVjYXVzZSB0aGUgaW5qZWN0b3IgaXMgY3JlYXRlZCBlYXJsaWVyLgogICAgICAgICAgICAgICAgc25hY2tCYXJSZWYuaW5zdGFuY2UgPSBjb250ZW50UmVmLmluc3RhbmNlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIFN1YnNjcmliZSB0byB0aGUgYnJlYWtwb2ludCBvYnNlcnZlciBhbmQgYXR0YWNoIHRoZSBtYXQtc25hY2stYmFyLWhhbmRzZXQgY2xhc3MgYXMKICAgICAgICAgICAgLy8gYXBwcm9wcmlhdGUuIFRoaXMgY2xhc3MgaXMgYXBwbGllZCB0byB0aGUgb3ZlcmxheSBlbGVtZW50IGJlY2F1c2UgdGhlIG92ZXJsYXkgbXVzdCBleHBhbmQgdG8KICAgICAgICAgICAgLy8gZmlsbCB0aGUgd2lkdGggb2YgdGhlIHNjcmVlbiBmb3IgZnVsbCB3aWR0aCBzbmFja2JhcnMuCiAgICAgICAgICAgIHRoaXMuX2JyZWFrcG9pbnRPYnNlcnZlci5vYnNlcnZlKEJyZWFrcG9pbnRzLkhhbmRzZXRQb3J0cmFpdCkucGlwZSh0YWtlVW50aWwob3ZlcmxheVJlZi5kZXRhY2htZW50cygpKSkuc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBzdGF0ZQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgc3RhdGUgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgY2xhc3NMaXN0ID0gb3ZlcmxheVJlZi5vdmVybGF5RWxlbWVudC5jbGFzc0xpc3Q7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBjbGFzc05hbWUgPSAnbWF0LXNuYWNrLWJhci1oYW5kc2V0JzsKICAgICAgICAgICAgICAgIHN0YXRlLm1hdGNoZXMgPyBjbGFzc0xpc3QuYWRkKGNsYXNzTmFtZSkgOiBjbGFzc0xpc3QucmVtb3ZlKGNsYXNzTmFtZSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgdGhpcy5fYW5pbWF0ZVNuYWNrQmFyKHNuYWNrQmFyUmVmLCBjb25maWcpOwogICAgICAgICAgICB0aGlzLl9vcGVuZWRTbmFja0JhclJlZiA9IHNuYWNrQmFyUmVmOwogICAgICAgICAgICByZXR1cm4gdGhpcy5fb3BlbmVkU25hY2tCYXJSZWY7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEFuaW1hdGVzIHRoZSBvbGQgc25hY2sgYmFyIG91dCBhbmQgdGhlIG5ldyBvbmUgaW4uCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHNuYWNrQmFyUmVmCiAgICAgICAgICogQHBhcmFtIHs/fSBjb25maWcKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9hbmltYXRlU25hY2tCYXIoc25hY2tCYXJSZWYsIGNvbmZpZykgewogICAgICAgICAgICAvLyBXaGVuIHRoZSBzbmFja2JhciBpcyBkaXNtaXNzZWQsIGNsZWFyIHRoZSByZWZlcmVuY2UgdG8gaXQuCiAgICAgICAgICAgIHNuYWNrQmFyUmVmLmFmdGVyRGlzbWlzc2VkKCkuc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIC8vIENsZWFyIHRoZSBzbmFja2JhciByZWYgaWYgaXQgaGFzbid0IGFscmVhZHkgYmVlbiByZXBsYWNlZCBieSBhIG5ld2VyIHNuYWNrYmFyLgogICAgICAgICAgICAgICAgaWYgKHRoaXMuX29wZW5lZFNuYWNrQmFyUmVmID09IHNuYWNrQmFyUmVmKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fb3BlbmVkU25hY2tCYXJSZWYgPSBudWxsOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5hbm5vdW5jZW1lbnRNZXNzYWdlKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fbGl2ZS5jbGVhcigpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIGlmICh0aGlzLl9vcGVuZWRTbmFja0JhclJlZikgewogICAgICAgICAgICAgICAgLy8gSWYgYSBzbmFjayBiYXIgaXMgYWxyZWFkeSBpbiB2aWV3LCBkaXNtaXNzIGl0IGFuZCBlbnRlciB0aGUKICAgICAgICAgICAgICAgIC8vIG5ldyBzbmFjayBiYXIgYWZ0ZXIgZXhpdCBhbmltYXRpb24gaXMgY29tcGxldGUuCiAgICAgICAgICAgICAgICB0aGlzLl9vcGVuZWRTbmFja0JhclJlZi5hZnRlckRpc21pc3NlZCgpLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgc25hY2tCYXJSZWYuY29udGFpbmVySW5zdGFuY2UuZW50ZXIoKTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgIHRoaXMuX29wZW5lZFNuYWNrQmFyUmVmLmRpc21pc3MoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIC8vIElmIG5vIHNuYWNrIGJhciBpcyBpbiB2aWV3LCBlbnRlciB0aGUgbmV3IHNuYWNrIGJhci4KICAgICAgICAgICAgICAgIHNuYWNrQmFyUmVmLmNvbnRhaW5lckluc3RhbmNlLmVudGVyKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gSWYgYSBkaXNtaXNzIHRpbWVvdXQgaXMgcHJvdmlkZWQsIHNldCB1cCBkaXNtaXNzIGJhc2VkIG9uIGFmdGVyIHRoZSBzbmFja2JhciBpcyBvcGVuZWQuCiAgICAgICAgICAgIGlmIChjb25maWcuZHVyYXRpb24gJiYgY29uZmlnLmR1cmF0aW9uID4gMCkgewogICAgICAgICAgICAgICAgc25hY2tCYXJSZWYuYWZ0ZXJPcGVuZWQoKS5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gc25hY2tCYXJSZWYuX2Rpc21pc3NBZnRlcigoLyoqIEB0eXBlIHs/fSAqLyAoY29uZmlnLmR1cmF0aW9uKSkpKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGNvbmZpZy5hbm5vdW5jZW1lbnRNZXNzYWdlKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9saXZlLmFubm91bmNlKGNvbmZpZy5hbm5vdW5jZW1lbnRNZXNzYWdlLCBjb25maWcucG9saXRlbmVzcyk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhIG5ldyBvdmVybGF5IGFuZCBwbGFjZXMgaXQgaW4gdGhlIGNvcnJlY3QgbG9jYXRpb24uCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGNvbmZpZyBUaGUgdXNlci1zcGVjaWZpZWQgc25hY2sgYmFyIGNvbmZpZy4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9jcmVhdGVPdmVybGF5KGNvbmZpZykgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG92ZXJsYXlDb25maWcgPSBuZXcgT3ZlcmxheUNvbmZpZygpOwogICAgICAgICAgICBvdmVybGF5Q29uZmlnLmRpcmVjdGlvbiA9IGNvbmZpZy5kaXJlY3Rpb247CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHBvc2l0aW9uU3RyYXRlZ3kgPSB0aGlzLl9vdmVybGF5LnBvc2l0aW9uKCkuZ2xvYmFsKCk7CiAgICAgICAgICAgIC8vIFNldCBob3Jpem9udGFsIHBvc2l0aW9uLgogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGlzUnRsID0gY29uZmlnLmRpcmVjdGlvbiA9PT0gJ3J0bCc7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaXNMZWZ0ID0gKGNvbmZpZy5ob3Jpem9udGFsUG9zaXRpb24gPT09ICdsZWZ0JyB8fAogICAgICAgICAgICAgICAgKGNvbmZpZy5ob3Jpem9udGFsUG9zaXRpb24gPT09ICdzdGFydCcgJiYgIWlzUnRsKSB8fAogICAgICAgICAgICAgICAgKGNvbmZpZy5ob3Jpem9udGFsUG9zaXRpb24gPT09ICdlbmQnICYmIGlzUnRsKSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaXNSaWdodCA9ICFpc0xlZnQgJiYgY29uZmlnLmhvcml6b250YWxQb3NpdGlvbiAhPT0gJ2NlbnRlcic7CiAgICAgICAgICAgIGlmIChpc0xlZnQpIHsKICAgICAgICAgICAgICAgIHBvc2l0aW9uU3RyYXRlZ3kubGVmdCgnMCcpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKGlzUmlnaHQpIHsKICAgICAgICAgICAgICAgIHBvc2l0aW9uU3RyYXRlZ3kucmlnaHQoJzAnKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHBvc2l0aW9uU3RyYXRlZ3kuY2VudGVySG9yaXpvbnRhbGx5KCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gU2V0IGhvcml6b250YWwgcG9zaXRpb24uCiAgICAgICAgICAgIGlmIChjb25maWcudmVydGljYWxQb3NpdGlvbiA9PT0gJ3RvcCcpIHsKICAgICAgICAgICAgICAgIHBvc2l0aW9uU3RyYXRlZ3kudG9wKCcwJyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBwb3NpdGlvblN0cmF0ZWd5LmJvdHRvbSgnMCcpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIG92ZXJsYXlDb25maWcucG9zaXRpb25TdHJhdGVneSA9IHBvc2l0aW9uU3RyYXRlZ3k7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9vdmVybGF5LmNyZWF0ZShvdmVybGF5Q29uZmlnKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ3JlYXRlcyBhbiBpbmplY3RvciB0byBiZSB1c2VkIGluc2lkZSBvZiBhIHNuYWNrIGJhciBjb21wb25lbnQuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAdGVtcGxhdGUgVAogICAgICAgICAqIEBwYXJhbSB7P30gY29uZmlnIENvbmZpZyB0aGF0IHdhcyB1c2VkIHRvIGNyZWF0ZSB0aGUgc25hY2sgYmFyLgogICAgICAgICAqIEBwYXJhbSB7P30gc25hY2tCYXJSZWYgUmVmZXJlbmNlIHRvIHRoZSBzbmFjayBiYXIuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfY3JlYXRlSW5qZWN0b3IoY29uZmlnLCBzbmFja0JhclJlZikgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHVzZXJJbmplY3RvciA9IGNvbmZpZyAmJiBjb25maWcudmlld0NvbnRhaW5lclJlZiAmJiBjb25maWcudmlld0NvbnRhaW5lclJlZi5pbmplY3RvcjsKICAgICAgICAgICAgcmV0dXJuIG5ldyBQb3J0YWxJbmplY3Rvcih1c2VySW5qZWN0b3IgfHwgdGhpcy5faW5qZWN0b3IsIG5ldyBXZWFrTWFwKFsKICAgICAgICAgICAgICAgIFtNYXRTbmFja0JhclJlZiwgc25hY2tCYXJSZWZdLAogICA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CiAgICAgKiBAc3VwcHJlc3Mge2NoZWNrVHlwZXMsY29uc3RhbnRQcm9wZXJ0eSxleHRyYVJlcXVpcmUsbWlzc2luZ092ZXJyaWRlLG1pc3NpbmdSZXR1cm4sdW51c2VkUHJpdmF0ZU1lbWJlcnMsdXNlbGVzc0NvZGV9IGNoZWNrZWQgYnkgdHNjCiAgICAgKi8KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBmb3JtRGF0YQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gY29udmVydEZvcm1EYXRhVG9PYmplY3QoZm9ybURhdGEpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgcmVzdWx0ID0gKC8qKiBAdHlwZSB7P30gKi8gKHt9KSk7CiAgICAgICAgZm9yIChjb25zdCBba2V5LCB2YWx1ZV0gb2YgZm9ybURhdGEuZW50cmllcygpKSB7CiAgICAgICAgICAgIHJlc3VsdFtrZXldID0gKC8qKiBAdHlwZSB7P30gKi8gKHZhbHVlKSk7CiAgICAgICAgfQogICAgICAgIHJldHVybiByZXN1bHQ7CiAgICB9CiAgICBjbGFzcyBUQkh0dHBDbGllbnQgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gaHR0cAogICAgICAgICAqIEBwYXJhbSB7P30gc3RvcmUKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihodHRwLCBzdG9yZSkgewogICAgICAgICAgICB0aGlzLmh0dHAgPSBodHRwOwogICAgICAgICAgICB0aGlzLnN0b3JlID0gc3RvcmU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEB0ZW1wbGF0ZSBSZXNwb25zZVR5cGUKICAgICAgICAgKiBAcGFyYW0gez99IHBhdGgKICAgICAgICAgKiBAcGFyYW0gez89fSBvcHRpb25zCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQocGF0aCwgb3B0aW9ucyA9IHt9KSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmh0dHAuZ2V0KHBhdGgsIG9wdGlvbnMpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAdGVtcGxhdGUgUmVzcG9uc2VUeXBlCiAgICAgICAgICogQHBhcmFtIHs/fSBwYXRoCiAgICAgICAgICogQHBhcmFtIHs/fSBib2R5CiAgICAgICAgICogQHBhcmFtIHs/PX0gb3B0aW9ucwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcG9zdChwYXRoLCBib2R5LCBvcHRpb25zID0ge30pIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuc3RvcmUuc2VsZWN0KGdldElzRmVhdHVyZUZsYWdzTG9hZGVkKS5waXBlKGZpbHRlcigoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gaXNMb2FkZWQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChpc0xvYWRlZCkgPT4gQm9vbGVhbihpc0xvYWRlZCkpKSwgdGFrZSgxKSwgd2l0aExhdGVzdEZyb20odGhpcy5zdG9yZS5zZWxlY3QoZ2V0SXNJbkNvbGFiKSksIG1lcmdlTWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChbLCBpc0luQ29sYWJdKSA9PiB7CiAgICAgICAgICAgICAgICAvLyBHb29nbGUtaW50ZXJuYWwgQ29sYWIgZG9lcyBub3Qgc3VwcG9ydCBIVFRQIFBPU1QgcmVxdWVzdHMsIHNvIHdlIGZhbGwKICAgICAgICAgICAgICAgIC8vIGJhY2sgdG8gSFRUUCBHRVQgKGV2ZW4gdGhvdWdoIHB1YmxpYyBDb2xhYiBzdXBwb3J0cyBQT1NUKQogICAgICAgICAgICAgICAgLy8gU2VlIGIvNzI5MzIxNjQuCiAgICAgICAgICAgICAgICBpZiAoaXNJbkNvbGFiKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuaHR0cC5nZXQocGF0aCwgewogICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiBvcHRpb25zLmhlYWRlcnMsCiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtczogY29udmVydEZvcm1EYXRhVG9PYmplY3QoYm9keSksCiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5odHRwLnBvc3QocGF0aCwgYm9keSwgb3B0aW9ucyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEB0ZW1wbGF0ZSBSZXNwb25zZVR5cGUKICAgICAgICAgKiBAcGFyYW0gez99IHBhdGgKICAgICAgICAgKiBAcGFyYW0gez99IGJvZHkKICAgICAgICAgKiBAcGFyYW0gez89fSBvcHRpb25zCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBwdXQocGF0aCwgYm9keSwgb3B0aW9ucyA9IHt9KSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmh0dHAucHV0KHBhdGgsIGJvZHksIG9wdGlvbnMpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAdGVtcGxhdGUgUmVzcG9uc2VUeXBlCiAgICAgICAgICogQHBhcmFtIHs/fSBwYXRoCiAgICAgICAgICogQHBhcmFtIHs/PX0gb3B0aW9ucwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZGVsZXRlKHBhdGgsIG9wdGlvbnMgPSB7fSkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5odHRwLmRlbGV0ZShwYXRoLCBvcHRpb25zKTsKICAgICAgICB9CiAgICB9CiAgICBUQkh0dHBDbGllbnQu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lwZSB7P30gKi8KICAgICAgICBjb25zdCBzbGFzaEluZGV4ID0gcnVuSWQuaW5kZXhPZignLycpOwogICAgICAgIHJldHVybiB7CiAgICAgICAgICAgIHJ1bjogcnVuSWQuc3Vic3RyaW5nKHNsYXNoSW5kZXggKyAxKSwKICAgICAgICAgICAgZXhwZXJpbWVudElkOiBydW5JZC5zdWJzdHJpbmcoMCwgc2xhc2hJbmRleCksCiAgICAgICAgfTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBydW4KICAgICAqIEBwYXJhbSB7P30gZXhwZXJpbWVudElkCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBydW5Ub1J1bklkKHJ1biwgZXhwZXJpbWVudElkKSB7CiAgICAgICAgcmV0dXJuIGAke2V4cGVyaW1lbnRJZH0vJHtydW59YDsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBiYWNrZW5kUmVzcG9uc2UKICAgICAqIEBwYXJhbSB7P30gZXhwZXJpbWVudElkCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBidWlsZEZyb250ZW5kVGltZVNlcmllc1Jlc3BvbnNlKGJhY2tlbmRSZXNwb25zZSwgZXhwZXJpbWVudElkKSB7CiAgICAgICAgY29uc3QgeyBydW5Ub1NlcmllcywgcnVuIH0gPSBiYWNrZW5kUmVzcG9uc2UsIHJlc3BvbnNlUmVzdCA9IF9fcmVzdChiYWNrZW5kUmVzcG9uc2UsIFsicnVuVG9TZXJpZXMiLCAicnVuIl0pOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCByZXNwb25zZSA9ICgvKiogQHR5cGUgez99ICovIChPYmplY3QuYXNzaWduKHt9LCByZXNwb25zZVJlc3QpKSk7CiAgICAgICAgaWYgKHJ1blRvU2VyaWVzKSB7CiAgICAgICAgICAgIHJlc3BvbnNlLnJ1blRvU2VyaWVzID0gYnVpbGRSdW5JZEtleWVkT2JqZWN0KHJ1blRvU2VyaWVzLCBleHBlcmltZW50SWQpOwogICAgICAgIH0KICAgICAgICBpZiAocnVuKSB7CiAgICAgICAgICAgIHJlc3BvbnNlLnJ1bklkID0gcnVuVG9SdW5JZChydW4sIGV4cGVyaW1lbnRJZCk7CiAgICAgICAgfQogICAgICAgIHJldHVybiByZXNwb25zZTsKICAgIH0KICAgIC8qKgogICAgICogQHRlbXBsYXRlIFQKICAgICAqIEBwYXJhbSB7P30gYmFja2VuZE9iamVjdAogICAgICogQHBhcmFtIHs/fSBleHBlcmltZW50SWQKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGJ1aWxkUnVuSWRLZXllZE9iamVjdChiYWNrZW5kT2JqZWN0LCBleHBlcmltZW50SWQpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgZnJvbnRlbmRPYmplY3QgPSAoLyoqIEB0eXBlIHs/fSAqLyAoe30pKTsKICAgICAgICBmb3IgKGNvbnN0IHJ1biBpbiBiYWNrZW5kT2JqZWN0KSB7CiAgICAgICAgICAgIGlmIChiYWNrZW5kT2JqZWN0Lmhhc093blByb3BlcnR5KHJ1bikpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHJ1bklkID0gcnVuVG9SdW5JZChydW4sIGV4cGVyaW1lbnRJZCk7CiAgICAgICAgICAgICAgICBmcm9udGVuZE9iamVjdFtydW5JZF0gPSBiYWNrZW5kT2JqZWN0W3J1bl07CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovIChmcm9udGVuZE9iamVjdCkpOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IGJhY2tlbmRUYWdNZXRhZGF0YQogICAgICogQHBhcmFtIHs/fSBleHBlcmltZW50SWQKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KIC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ICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdGFnTWV0YWRhdGFbcGx1Z2luXSA9IE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgcmVzdCksIHsgdGFnUnVuU2FtcGxlZEluZm86IGZyb250ZW5kVGFnUnVuU2FtcGxlZEluZm8gfSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBjb25zdCBfYiA9IGJhY2tlbmRUYWdNZXRhZGF0YVtwbHVnaW5dLCB7IHJ1blRhZ0luZm8gfSA9IF9iLCByZXN0ID0gX19yZXN0KF9iLCBbInJ1blRhZ0luZm8iXSk7CiAgICAgICAgICAgICAgICB0YWdNZXRhZGF0YVtwbHVnaW5dID0gT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LCByZXN0KSwgeyBydW5UYWdJbmZvOiBidWlsZFJ1bklkS2V5ZWRPYmplY3QocnVuVGFnSW5mbywgZXhwZXJpbWVudElkKSB9KTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gdGFnTWV0YWRhdGE7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gcmVzdWx0cwogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gYnVpbGRDb21iaW5lZFRhZ01ldGFkYXRhKHJlc3VsdHMpIHsKICAgICAgICAvLyBDb2xsYXRlIHJlc3VsdHMgZnJvbSBkaWZmZXJlbnQgZXhwZXJpbWVudHMuCiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHRhZ01ldGFkYXRhID0gKC8qKiBAdHlwZSB7P30gKi8gKHt9KSk7CiAgICAgICAgZm9yIChjb25zdCBleHBlcmltZW50VGFnTWV0YWRhdGEgb2YgcmVzdWx0cykgewogICAgICAgICAgICBmb3IgKGNvbnN0IHBsdWdpbiBvZiBPYmplY3QudmFsdWVzKFBsdWdpblR5cGUpKSB7CiAgICAgICAgICAgICAgICBpZiAoaXNTYW1wbGVkUGx1Z2luKHBsdWdpbikpIHsKICAgICAgICAgICAgICAgICAgICB0YWdNZXRhZGF0YVtwbHVnaW5dID0gdGFnTWV0YWRhdGFbcGx1Z2luXSB8fCB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRhZ0Rlc2NyaXB0aW9uczoge30sCiAgICAgICAgICAgICAgICAgICAgICAgIHRhZ1J1blNhbXBsZWRJbmZvOiB7fSwKICAgICAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHsgdGFnRGVzY3JpcHRpb25zLCB0YWdSdW5TYW1wbGVkSW5mbyB9ID0gZXhwZXJpbWVudFRhZ01ldGFkYXRhW3BsdWdpbl07CiAgICAgICAgICAgICAgICAgICAgdGFnTWV0YWRhdGFbcGx1Z2luXS50YWdEZXNjcmlwdGlvbnMgPSBPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sIHRhZ01ldGFkYXRhW3BsdWdpbl0udGFnRGVzY3JpcHRpb25zKSwgdGFnRGVzY3JpcHRpb25zKTsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgY29tYmluZWRUYWdSdW5TYW1wbGVkSW5mbyA9IHRhZ01ldGFkYXRhW3BsdWdpbl0udGFnUnVuU2FtcGxlZEluZm87CiAgICAgICAgICAgICAgICAgICAgZm9yIChjb25zdCB0YWcgb2YgT2JqZWN0LmtleXModGFnUnVuU2FtcGxlZEluZm8pKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGNvbWJpbmVkVGFnUnVuU2FtcGxlZEluZm9bdGFnXSA9IGNvbWJpbmVkVGFnUnVuU2FtcGxlZEluZm9bdGFnXSB8fCB7fTsKICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChjb25zdCBydW5JZCBvZiBPYmplY3Qua2V5cyh0YWdSdW5TYW1wbGVkSW5mb1t0YWddKSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tYmluZWRUYWdSdW5TYW1wbGVkSW5mb1t0YWddW3J1bklkXSA9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFnUnVuU2FtcGxlZEluZm9bdGFnXVtydW5JZF07CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICB0YWdNZXRhZGF0YVtwbHVnaW5dID0gdGFnTWV0YWRhdGFbcGx1Z2luXSB8fCB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRhZ0Rlc2NyaXB0aW9uczoge30sCiAgICAgICAgICAgICAgICAgICAgICAgIHJ1blRhZ0luZm86IHt9LAogICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICAgICAgY29uc3QgeyB0YWdEZXNjcmlwdGlvbnMsIHJ1blRhZ0luZm8gfSA9IGV4cGVyaW1lbnRUYWdNZXRhZGF0YVtwbHVnaW5dOwogICAgICAgICAgICAgICAgICAgIHRhZ01ldGFkYXRhW3BsdWdpbl0udGFnRGVzY3JpcHRpb25zID0gT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LCB0YWdNZXRhZGF0YVtwbHVnaW5dLnRhZ0Rlc2NyaXB0aW9ucyksIHRhZ0Rlc2NyaXB0aW9ucyk7CiAgICAgICAgICAgICAgICAgICAgdGFnTWV0YWRhdGFbcGx1Z2luXS5ydW5UYWdJbmZvID0gT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LCB0YWdNZXRhZGF0YVtwbHVnaW5dLnJ1blRhZ0luZm8pLCBydW5UYWdJbmZvKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gdGFnTWV0YWRhdGE7CiAgICB9CiAgICAvKioKICAgICAqIEFuIGltcGxlbWVudGF0aW9uIG9mIE1ldHJpY3NEYXRhU291cmNlIHRoYXQgdHJlYXRzIFJ1bklkcyBhcyBpZGVudGlmaWVycwogICAgICogY29udGFpbmluZyBydW4gbmFtZSBhbmQgZXhwZXJpbWVudElkLgogICAgICovCiAgICBjbGFzcyBUQk1ldHJpY3NEYXRhU291cmNlIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGh0dHAKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihodHRwKSB7CiAgICAgICAgICAgIHRoaXMuaHR0cCA9IGh0dHA7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZXhwZXJpbWVudElkcwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZmV0Y2hUYWdNZXRhZGF0YShleHBlcmltZW50SWRzKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZmV0Y2hlcyA9IGV4cGVyaW1lbnRJZHMubWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBleHBlcmltZW50SWQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChleHBlcmltZW50SWQpID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHVybCA9IGAvZXhwZXJpbWVudC8ke2V4cGVyaW1lbnRJZH0vJHtIVFRQX1BBVEhfUFJFRklYfS90YWdzYDsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmh0dHAuZ2V0KHVybCkucGlwZShtYXAoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSB0YWdNZXRhZGF0YQogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKHRhZ01ldGFkYXRhKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGJ1aWxkRnJvbnRlbmRUYWdNZXRhZGF0YSh0YWdNZXRhZGF0YSwgZXhwZXJpbWVudElkKTsKICAgICAgICAgICAgICAgIH0pKSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgcmV0dXJuIGZvcmtKb2luKGZldGNoZXMpLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSByZXN1bHRzCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAocmVzdWx0cykgPT4gYnVpbGRDb21iaW5lZFRhZ01ldGFkYXRhKHJlc3VsdHMpKSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBUT0RPKHBzeWJ1enopOiB3ZSBvbmx5IHJlcXVlc3QgMSBhdCBhIHRpbWUsIGNvbnNpZGVyIHVwZGF0aW5nIHRoZSBiYWNrZW5kIHRvCiAgICAgICAgICogdGFrZSBhIEJhY2tlbmRUaW1lU2VyaWVzUmVxdWVzdCBpbnN0ZWFkIG9mIGFuIGFycmF5LgogICAgICAgICAqIEBwYXJhbSB7P30gcmVxdWVzdHMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZldGNoVGltZVNlcmllcyhyZXF1ZXN0cykgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGZldGNoZXMgPSByZXF1ZXN0cy5tYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHJlcXVlc3QKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChyZXF1ZXN0KSA9PiB7CiAgICAgICAgICAgICAgICAvLyBPbmUgc2luZ2xlLXJ1biByZXF1ZXN0LgogICAgICAgICAgICAgICAgaWYgKGlzU2luZ2xlUnVuUGx1Z2luKHJlcXVlc3QucGx1Z2luKSkgewogICAgICAgICAgICAgICAgICAgIGNvbnN0IF9hID0gKC8qKiBAdHlwZSB7P30gKi8gKHJlcXVlc3QpKSwgeyBydW5JZCB9ID0gX2EsIHJlcXVlc3RSZXN0ID0gX19yZXN0KF9hLCBbInJ1bklkIl0pOwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHsgcnVuLCBleHBlcmltZW50SWQgfSA9IHBhcnNlUnVuSWQocnVuSWQpOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBiYWNrZW5kUmVxdWVzdCA9IE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgcmVxdWVzdFJlc3QpLCB7IHJ1biB9KTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5mZXRjaFRpbWVTZXJpZXNCYWNrZW5kUmVxdWVzdChiYWNrZW5kUmVxdWVzdCwgZXhwZXJpbWVudElkKS5waXBlKG1hcCgoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICh7IHJlc3BvbnNlLCBleHBlcmltZW50SWQgfSkgPT4gewogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYnVpbGRGcm9udGVuZFRpbWVTZXJpZXNSZXNwb25zZShyZXNwb25zZSwgZXhwZXJpbWVudElkKTsKICAgICAgICAgICAgICAgICAgICB9KSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLy8gT25lIG11bHRpLXJ1biByZXF1ZXN0IGdlbmVyYXRlcyBtYW55IHJlc3BvbnNlcyB3aXRoIGRpZmZlcmVudAogICAgICAgICAgICAgICAgLy8gJ3J1blRvU2VyaWVzJywgJ2Vycm9yJyBmaWVsZHMuIENvbWJpbmUgdGhlbSBpbnRvIG9uZS4KICAgICAgICAgICAgICAgIGNvbnN0IF9iID0gKC8qKiBAdHlwZSB7P30gKi8gKHJlcXVlc3QpKSwgeyBleHBlcmltZW50SWRzIH0gPSBfYiwgcmVxdWVzdFJlc3QgPSBfX3Jlc3QoX2IsIFsiZXhwZXJpbWVudElkcyJdKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHBlckV4cGVyaW1lbnRSZXF1ZXN0cyA9IGV4cGVyaW1lbnRJZHMubWFwKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZXhwZXJpbWVudElkCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoZXhwZXJpbWVudElkKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuZmV0Y2hUaW1lU2VyaWVzQmFja2VuZFJlcXVlc3QocmVxdWVzdFJlc3QsIGV4cGVyaW1lbnRJZCk7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICByZXR1cm4gZm9ya0pvaW4ocGVyRXhwZXJpbWVudFJlcXVlc3RzKS5waXBlKG1hcCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHBlckV4cGVyaW1lbnRSZXN1bHRzCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAocGVyRXhwZXJpbWVudFJlc3VsdHMpID0+IHsKICAgICAgICAgICAgICAgICAgICBjb25zdCBfYSA9IHBlckV4cGVyaW1lbnRSZXN1bHRzWzBdLnJlc3BvbnNlLCByZXNwb25zZVJlc3QgPSBfX3Jlc3QoX2EsIFsicnVuVG9TZXJpZXMiLCAiZXJyb3IiXSk7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGNvbWJpbmVkUmVzcG9uc2UgPSAoLyoqIEB0eXBlIHs/fSAqLyAocmVzcG9uc2VSZXN0KSk7CiAgICAgICAgICAgICAgICAgICAgZm9yIChjb25zdCB7IHJlc3BvbnNlLCBleHBlcmltZW50SWQgfSBvZiBwZXJFeHBlcmltZW50UmVzdWx0cykgewogICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGZyb250ZW5kUmVzcG9uc2UgPSBidWlsZEZyb250ZW5kVGltZVNlcmllc1Jlc3BvbnNlKHJlc3BvbnNlLCBleHBlcmltZW50SWQpOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAoY29tYmluZWRSZXNwb25zZS5lcnJvcikgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgeyBydW5Ub1NlcmllcywgZXJyb3IgfSA9IGZyb250ZW5kUmVzcG9uc2U7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlcnJvcikgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tYmluZWRSZXNwb25zZS5lcnJvciA9IGVycm9yOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tYmluZWRSZXNwb25zZS5ydW5Ub1NlcmllcyA9IHVuZGVmaW5lZDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbWJpbmVkUmVzcG9uc2UucnVuVG9TZXJpZXMgPSBjb21iaW5lZFJlc3BvbnNlLnJ1blRvU2VyaWVzIHx8IHt9OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChjb25zdCBydW4gb2YgT2JqZWN0LmtleXMoKC8qKiBAdHlwZSB7P30gKi8gKHJ1blRvU2VyaWVzKSkpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tYmluZWRSZXNwb25zZS5ydW5Ub1Nlcmllc1tydW5dID0gKC8qKiBAdHlwZSB7P30gKi8gKHJ1blRvU2VyaWVzKSlbcnVuXTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gY29tYmluZWRSZXNwb25zZTsKICAgICAgICAgICAgICAgIH0pKSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgcmV0dXJuIGZvcmtKb2luKGZldGNoZXMpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gYmFja2VuZFJlcXVlc3QKICAgICAgICAgKiBAcGFyYW0gez99IGV4cGVyaW1lbnRJZAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZmV0Y2hUaW1lU2VyaWVzQmFja2VuZFJlcXVlc3QoYmFja2VuZFJlcXVlc3QsIGV4cGVyaW1lbnRJZCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGJvZHkgPSBuZXcgRm9ybURhdGEoKTsKICAgICAgICAgICAgYm9keS5hcHBlbmQoJ3JlcXVlc3RzJywgSlNPTi5zdHJpbmdpZnkoW2JhY2tlbmRSZXF1ZXN0XSkpOwogICAgICAgICAgICByZXR1cm4gdGhpcy5odHRwCiAgICAgICAgICAgICAgICAucG9zdChgL2V4cGVyaW1lbnQvJHtleHBlcmltZW50SWR9LyR7SFRUUF9QQVRIX1BSRUZJWH0vdGltZVNlcmllc2AsIGJvZHkpCiAgICAgICAgICAgICAgICAucGlwZShtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHJlc3BvbnNlcwogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgIC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NvZnR3YXJlCiAgICBkaXN0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiAiQVMgSVMiIEJBU0lTLAogICAgV0lUSE9VVCBXQVJSQU5USUVTIE9SIENPTkRJVElPTlMgT0YgQU5ZIEtJTkQsIGVpdGhlciBleHByZXNzIG9yIGltcGxpZWQuCiAgICBTZWUgdGhlIExpY2Vuc2UgZm9yIHRoZSBzcGVjaWZpYyBsYW5ndWFnZSBnb3Zlcm5pbmcgcGVybWlzc2lvbnMgYW5kCiAgICBsaW1pdGF0aW9ucyB1bmRlciB0aGUgTGljZW5zZS4KICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCiAgICAvKioKICAgICAqIFJldHVybnMgdGhlIGxvYWRhYmxlIGluZm9ybWF0aW9uIGZvciBhIHNwZWNpZmljIHRhZywgY29udGFpbmluZyBpdHMgc2VyaWVzCiAgICAgKiBkYXRhIGFuZCBsb2FkIHN0YXRlLiBSZXR1cm5zIGBudWxsYCB3aGVuIHRoZSByZXF1ZXN0ZWQgdGFnIGhhcyBubyBpbml0aWFsCiAgICAgKiBsb2FkYWJsZSBpbiBgdGltZVNlcmllc0RhdGFgLgogICAgICovCiAgICBmdW5jdGlvbiBnZXRUaW1lU2VyaWVzTG9hZGFibGUodGltZVNlcmllc0RhdGEsIHBsdWdpbiwgdGFnLCBzYW1wbGUpIHsKICAgICAgICBjb25zdCBwbHVnaW5EYXRhID0gdGltZVNlcmllc0RhdGFbcGx1Z2luXTsKICAgICAgICBpZiAoIXBsdWdpbkRhdGEuaGFzT3duUHJvcGVydHkodGFnKSkgewogICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICB9CiAgICAgICAgaWYgKGlzU2FtcGxlZFBsdWdpbihwbHVnaW4pKSB7CiAgICAgICAgICAgIGlmICghdGltZVNlcmllc0RhdGFbcGx1Z2luX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2FyZElkIG9mIG5vblBpbm5lZENhcmRzKSB7CiAgICAgICAgICAgICAgICBjb25zdCBjYXJkTWV0YWRhdGEgPSBjYXJkTWV0YWRhdGFNYXBbbm9uUGlubmVkQ2FyZElkXTsKICAgICAgICAgICAgICAgIGlmIChjYXJkTWF0Y2hlc0NhcmRVbmlxdWVJbmZvKGNhcmRNZXRhZGF0YSwgdW5yZXNvbHZlZFBpbikpIHsKICAgICAgICAgICAgICAgICAgICBub25QaW5uZWRDYXJkc1dpdGhNYXRjaC5wdXNoKG5vblBpbm5lZENhcmRJZCk7CiAgICAgICAgICAgICAgICAgICAgdW5yZXNvbHZlZFBpblNldC5kZWxldGUodW5yZXNvbHZlZFBpbik7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaWYgKCFub25QaW5uZWRDYXJkc1dpdGhNYXRjaC5sZW5ndGgpIHsKICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIHVucmVzb2x2ZWRJbXBvcnRlZFBpbm5lZENhcmRzLAogICAgICAgICAgICAgICAgY2FyZE1ldGFkYXRhTWFwLAogICAgICAgICAgICAgICAgY2FyZFRvUGlubmVkQ29weSwKICAgICAgICAgICAgICAgIHBpbm5lZENhcmRUb09yaWdpbmFsLAogICAgICAgICAgICAgICAgY2FyZFN0ZXBJbmRleDogY2FyZFN0ZXBJbmRleE1hcCwKICAgICAgICAgICAgfTsKICAgICAgICB9CiAgICAgICAgbGV0IHN0YXRlV2l0aFJlc29sdmVkUGlucyA9IHsKICAgICAgICAgICAgY2FyZFRvUGlubmVkQ29weSwKICAgICAgICAgICAgcGlubmVkQ2FyZFRvT3JpZ2luYWwsCiAgICAgICAgICAgIGNhcmRTdGVwSW5kZXg6IGNhcmRTdGVwSW5kZXhNYXAsCiAgICAgICAgICAgIGNhcmRNZXRhZGF0YU1hcCwKICAgICAgICB9OwogICAgICAgIGZvciA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ICBmb3IgKGNvbnN0IGhwYXJhbVNwZWMgb2Ygc3BlYy5ocGFyYW1zKSB7CiAgICAgICAgICAgICAgICBpZiAoIWhwYXJhbURpc3BsYXlOYW1lcy5oYXMoaHBhcmFtU3BlYy5uYW1lKSkgewogICAgICAgICAgICAgICAgICAgIGhwYXJhbURpc3BsYXlOYW1lcy5zZXQoaHBhcmFtU3BlYy5uYW1lLCBuZXcgU2V0KCkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaHBhcmFtRGlzcGxheU5hbWVzLmdldChocGFyYW1TcGVjLm5hbWUpLmFkZChocGFyYW1TcGVjLmRpc3BsYXlOYW1lKTsKICAgICAgICAgICAgICAgIGlmICghaHBhcmFtcy5oYXMoaHBhcmFtU3BlYy5uYW1lKSkgewogICAgICAgICAgICAgICAgICAgIGhwYXJhbXMuc2V0KGhwYXJhbVNwZWMubmFtZSwgT2JqZWN0LmFzc2lnbih7fSwgaHBhcmFtU3BlYykpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3BlY0EgPSBocGFyYW1zLmdldChocGFyYW1TcGVjLm5hbWUpOwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHNwZWNCID0gaHBhcmFtU3BlYzsKICAgICAgICAgICAgICAgICAgICBpZiAoc3BlY0EudHlwZSAhPT0gc3BlY0IudHlwZSkgewogICAgICAgICAgICAgICAgICAgICAgICB2YWxpZGF0aW9uRXJyb3IucHVzaChgSHBhcmFtLCAke3NwZWNCLm5hbWV9LCB0eXBlcyBoYXZlIHRvIG1hdGNoLiBHb3Q6IGAgKwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYCR7c3BlY0EudHlwZX0gdnMuICR7c3BlY0IudHlwZX1gKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgaWYgKHNwZWNBLmRvbWFpbi50eXBlID09PSBEb21haW5UeXBlLklOVEVSVkFMICYmCiAgICAgICAgICAgICAgICAgICAgICAgIHNwZWNCLmRvbWFpbi50eXBlID09PSBEb21haW5UeXBlLklOVEVSVkFMKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzcGVjQS5kb21haW4ubWluVmFsdWUgIT09IHNwZWNCLmRvbWFpbi5taW5WYWx1ZSB8fAogICAgICAgICAgICAgICAgICAgICAgICAgICAgc3BlY0EuZG9tYWluLm1heFZhbHVlICE9PSBzcGVjQi5kb21haW4ubWF4VmFsdWUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbGlkYXRpb25FcnJvci5wdXNoKGBIcGFyYW0sICR7c3BlY0IubmFtZX0sIGRvbWFpbnMgaGF2ZSB0byBtYXRjaC4gYCArCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYEdvdDogJHtzcGVjQS5kb21haW59IHZzLiAke3NwZWNCLmRvbWFpbn1gKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChzcGVjQS5kb21haW4udHlwZSA9PT0gRG9tYWluVHlwZS5ESVNDUkVURSAmJgogICAgICAgICAgICAgICAgICAgICAgICBzcGVjQi5kb21haW4udHlwZSA9PT0gRG9tYWluVHlwZS5ESVNDUkVURSkgewogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB2YWx1ZVNldCA9IG5ldyBTZXQoWwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLi4uc3BlY0EuZG9tYWluLnZhbHVlcywKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC4uLnNwZWNCLmRvbWFpbi52YWx1ZXMsCiAgICAgICAgICAgICAgICAgICAgICAgIF0pOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3BlY0EuZG9tYWluLnZhbHVlcy5sZW5ndGggIT09IHNwZWNCLmRvbWFpbi52YWx1ZXMubGVuZ3RoIHx8CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzcGVjQS5kb21haW4udmFsdWVzLmxlbmd0aCAhPT0gdmFsdWVTZXQuc2l6ZSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsaWRhdGlvbkVycm9yLnB1c2goYEhwYXJhbSwgJHtzcGVjQi5uYW1lfSwgZG9tYWlucyBoYXZlIHRvIG1hdGNoLiBgICsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBgR290OiAke3NwZWNBLmRvbWFpbn0gdnMuICR7c3BlY0IuZG9tYWlufWApOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICB2YWxpZGF0aW9uRXJyb3IucHVzaChgSHBhcmFtLCAke3NwZWNCLm5hbWV9LCBkb21haW5zIGhhdmUgdG8gbWF0Y2guIGAgKwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYEdvdDogJHtzcGVjQS5kb21haW59IHZzLiAke3NwZWNCLmRvbWFpbn1gKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZm9yIChjb25zdCBtZXRyaWNTcGVjIG9mIHNwZWMubWV0cmljcykgewogICAgICAgICAgICAgICAgaWYgKCFtZXRyaWNEaXNwbGF5TmFtZXMuaGFzKG1ldHJpY1NwZWMudGFnKSkgewogICAgICAgICAgICAgICAgICAgIG1ldHJpY0Rpc3BsYXlOYW1lcy5zZXQobWV0cmljU3BlYy50YWcsIG5ldyBTZXQoKSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBtZXRyaWNEaXNwbGF5TmFtZXMuZ2V0KG1ldHJpY1NwZWMudGFnKS5hZGQobWV0cmljU3BlYy5kaXNwbGF5TmFtZSk7CiAgICAgICAgICAgICAgICBpZiAoIW1ldHJpY3MuaGFzKG1ldHJpY1NwZWMudGFnKSkgewogICAgICAgICAgICAgICAgICAgIG1ldHJpY3Muc2V0KG1ldHJpY1NwZWMudGFnLCBPYmplY3QuYXNzaWduKHt9LCBtZXRyaWNTcGVjKSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBjb25zdCBzcGVjQSA9IG1ldHJpY3MuZ2V0KG1ldHJpY1NwZWMudGFnKTsKICAgICAgICAgICAgICAgICAgICBjb25zdCBzcGVjQiA9IG1ldHJpY1NwZWM7CiAgICAgICAgICAgICAgICAgICAgaWYgKHNwZWNBLmRhdGFzZXRUeXBlICE9PSBzcGVjQi5kYXRhc2V0VHlwZSkgewogICAgICAgICAgICAgICAgICAgICAgICB2YWxpZGF0aW9uRXJyb3IucHVzaChgTWV0cmljLCAke3NwZWNCLnRhZ30sIGRhdGFzZXRUeXBlcyBoYXZlIHRvIG1hdGNoLiBHb3Q6IGAgKwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYCR7c3BlY0EuZGF0YXNldFR5cGV9IHZzLiAke3NwZWNCLmRhdGFzZXRUeXBlfWApOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBpZiAodmFsaWRhdGlvbkVycm9yLmxlbmd0aCkgewogICAgICAgICAgICAvLyBUT0RPKGIvMTU3NzMzMTc5KTogaGFuZGxlIHRoZSBlcnJvciBncmFjZWZ1bGx5IG9uIHRoZSB2aWV3IHNpZGUuCiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgVmFsaWRhdGlvbiBlcnJvcjoKJHt2YWxpZGF0aW9uRXJyb3Iuam9pbignXG4nKX1gKTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgaHBhcmFtczogWy4uLmhwYXJhbXNdLm1hcCgoW2hwYXJhbU5hbWUsIHNwZWNdKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gT2JqZWN0LmFzc2lnbihPYmplY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IGZ1bmN0aW9uIHNwbGl0QnlSZWdleCh0ZXh0LCByZWdleCkgewogICAgICAgIC8vICdtYXRjaEFsbCcgcmVxdWlyZXMgYSByZWdleCB3aXRoIHRoZSAnZ2xvYmFsJyBmbGFnLgogICAgICAgIGlmICghcmVnZXguZmxhZ3MuaW5jbHVkZXMoJ2cnKSkgewogICAgICAgICAgICByZWdleCA9IG5ldyBSZWdFeHAocmVnZXgsIHJlZ2V4LmZsYWdzICsgJ2cnKTsKICAgICAgICB9CiAgICAgICAgY29uc3QgcmVzdWx0ID0gW107CiAgICAgICAgLy8gSW5kZXggb2YgdGhlIGVhcmxpZXN0IHVudmlzaXRlZCBjaGFyYWN0ZXIuCiAgICAgICAgbGV0IGxhc3RJbmRleCA9IDA7CiAgICAgICAgZm9yIChjb25zdCBtYXRjaCBvZiB0ZXh0Lm1hdGNoQWxsKHJlZ2V4KSkgewogICAgICAgICAgICBjb25zdCBpbmRleCA9IG1hdGNoLmluZGV4OwogICAgICAgICAgICBjb25zdCBtYXRjaGluZ1RleHQgPSBtYXRjaFswXTsKICAgICAgICAgICAgLy8gQWRkIGFueSB0ZXh0IGJldHdlZW4gdGhlIGxhc3QgbWF0Y2ggYW5kIHRoaXMgY3VycmVudCBvbmUuCiAgICAgICAgICAgIGlmIChpbmRleCA+IGxhc3RJbmRleCkgewogICAgICAgICAgICAgICAgcmVzdWx0LnB1c2goewogICAgICAgICAgICAgICAgICAgIGluZGV4OiBsYXN0SW5kZXgsCiAgICAgICAgICAgICAgICAgICAgdGV4dDogdGV4dC5zdWJzdHJpbmcobGFzdEluZGV4LCBpbmRleCksCiAgICAgICAgICAgICAgICAgICAgbWF0Y2hlc1JlZ2V4OiBmYWxzZSwKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJlc3VsdC5wdXNoKHsKICAgICAgICAgICAgICAgIGluZGV4LAogICAgICAgICAgICAgICAgdGV4dDogbWF0Y2hpbmdUZXh0LAogICAgICAgICAg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EBwYXJhbSB7P30gc25hY2tCYXJSZWYKICAgICAgICAgKiBAcGFyYW0gez99IHVua25vd25EYXRhCiAgICAgICAgICogQHBhcmFtIHs/fSBzdG9yZQogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKHNuYWNrQmFyUmVmLCB1bmtub3duRGF0YSwgc3RvcmUpIHsKICAgICAgICAgICAgdGhpcy5zbmFja0JhclJlZiA9IHNuYWNrQmFyUmVmOwogICAgICAgICAgICB0aGlzLnVua25vd25EYXRhID0gdW5rbm93bkRhdGE7CiAgICAgICAgICAgIHRoaXMuc3RvcmUgPSBzdG9yZTsKICAgICAgICAgICAgdGhpcy5zcGxpdEJ5VVJMID0gc3BsaXRCeVVSTDsKICAgICAgICAgICAgdGhpcy5hbGVydCA9ICgvKiogQHR5cGUgez99ICovICh1bmtub3duRGF0YSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uQWN0aW9uQnV0dG9uQ2xpY2tlZCgpIHsKICAgICAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHsKICAgICAgICAgICAgICAgIHRoaXMuc25hY2tCYXJSZWYuZGlzbWlzcygpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZm9sbG93dXBBY3Rpb24gPSB5aWVsZCAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5hbGVydC5mb2xsb3d1cEFjdGlvbikpLmdldEZvbGxvd3VwQWN0aW9uKHRoaXMuc3RvcmUpOwogICAgICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChmb2xsb3d1cEFjdGlvbik7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uQ2xvc2VCdXR0b25DbGlja2VkKCkgewogICAgICAgICAgICB0aGlzLnNuYWNrQmFyUmVmLmRpc21pc3MoKTsKICAgICAgICB9CiAgICB9CiAgICBBbGVydERpc3BsYXlTbmFja2JhckNvbnRhaW5lci5kZWNvcmF0b3JzID0gWwogICAgICAgIHsgdHlwZTogQ29tcG9uZW50LCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIHNlbGVjdG9yOiAnYWxlcnQtZGlzcGxheS1zbmFja2JhcicsCiAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGVVcmw6ICcuL2FsZXJ0X2Rpc3BsYXlfc25hY2tiYXJfY29udGFpbmVyLm5nLmh0bWwnLAogICAgICAgICAgICAgICAgICAgIHN0eWxlVXJsczogWycuL2FsZXJ0X2Rpc3BsYXlfc25hY2tiYXJfY29udGFpbmVyLmNzcyddLAogICAgICAgICAgICAgICAgICAgIGNoYW5nZURldGVjdGlvbjogQ2hhbmdlRGV0ZWN0aW9uU3RyYXRlZ3kuT25QdXNoLAogICAgICAgICAgICAgICAgfSxdIH0sCiAgICBdOwogICAgLyoqIEBub2NvbGxhcHNlICovCiAgICBBbGVydERpc3BsYXlTbmFja2JhckNvbnRhaW5lci5jdG9yUGFyYW1ldGVycyA9ICgpID0+IFsKICAgICAgICB7IHR5cGU6IE1hdFNuYWNrQmFyUmVmIH0sCiAgICAgICAgeyB0eXBlOiB1bmRlZmluZWQsIGRlY29yYXRvcnM6IFt7IHR5cGU6IEluamVjdCwgYXJnczogW01BVF9TTkFDS19CQVJfREFUQSxdIH1dIH0sCiAgICAgICAgeyB0eXBlOiBTdG9yZSB9CiAgICBdOwogICAgLyoqIEBub2NvbGxhcHNlICovIEFsZXJ0RGlzcGxheVNuYWNrYmFyQ29udGFpbmVyLsm1ZmFjID0gZnVuY3Rpb24gQWxlcnREaXNwbGF5U25hY2tiYXJDb250YWluZXJfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgQWxlcnREaXNwbGF5U25h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s/fSBzdG9yZQogICAgICAgICAqIEBwYXJhbSB7P30gc25hY2tCYXIKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihzdG9yZSwgc25hY2tCYXIpIHsKICAgICAgICAgICAgdGhpcy5zdG9yZSA9IHN0b3JlOwogICAgICAgICAgICB0aGlzLnNuYWNrQmFyID0gc25hY2tCYXI7CiAgICAgICAgICAgIHRoaXMubmdVbnN1YnNjcmliZSA9IG5ldyBTdWJqZWN0KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkluaXQoKSB7CiAgICAgICAgICAgIHRoaXMuc3RvcmUKICAgICAgICAgICAgICAgIC5zZWxlY3QoZ2V0TGF0ZXN0QWxlcnQpCiAgICAgICAgICAgICAgICAucGlwZSh0YWtlVW50aWwodGhpcy5uZ1Vuc3Vic2NyaWJlKSwgZmlsdGVyKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBhbGVydAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGFsZXJ0KSA9PiBCb29sZWFuKGFsZXJ0KSkpKQogICAgICAgICAgICAgICAgLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gYWxlcnQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChhbGVydCkgPT4gewogICAgICAgICAgICAgICAgdGhpcy5zaG93QWxlcnQoKC8qKiBAdHlwZSB7P30gKi8gKGFsZXJ0KSkpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkRlc3Ryb3koKSB7CiAgICAgICAgICAgIHRoaXMubmdVbnN1YnNjcmliZS5uZXh0KCk7CiAgICAgICAgICAgIHRoaXMubmdVbnN1YnNjcmliZS5jb21wbGV0ZSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gYWxlcnRJbmZvCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzaG93QWxlcnQoYWxlcnRJbmZvKSB7CiAgICAgICAgICAgIHRoaXMuc25hY2tCYXIub3BlbkZyb21Db21wb25lbnQoQWxlcnREaXNwbGF5U25hY2tiYXJDb250YWluZXIsIHsKICAgICAgICAgICAgICAgIGR1cmF0aW9uOiA1MDAwLAogICAgICAgICAgICAgICAgaG9yaXpvbnRhbFBvc2l0aW9uOiAnc3RhcnQnLAogICAgICAgICAgICAgICAgdmVydGljYWxQb3NpdGlvbjogJ2JvdHRvbScsCiAgICAgICAgICAgICAgICBkYXRhOiBhbGVydEluZm8sCiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgIH0KICAgIEFsZXJ0U25hY2tiYXJDb250YWluZXIuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IENvbXBvbmVudCwgYXJnczogW3sKICAgICAgICAgICAgICAgICAgICBzZWxlY3RvcjogJ2FsZXJ0LXNuYWNrYmFyJywKICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogJycsCiAgICAgICAgICAgICAgICAgICAgY2hhbmdlRGV0ZWN0aW9uOiBDaGFuZ2VEZXRlY3Rpb25TdHJhdGVneS5PblB1c2gsCiAgICAgICAgICAgICAgICB9LF0gfSwKICAgIF07CiAgICAvKiogQG5vY29sbGFwc2UgKi8KICAgIEFsZXJ0U25hY2tiYXJDb250YWluZXIuY3RvclBhcmFtZXRlcnMgPSAoKSA9PiBbCiAgICAgICAgeyB0eXBlOiBTdG9yZSB9LAogICAgICAgIHsgdHlwZTogTWF0U25hY2tCYXIgfQogICAgXTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLyBBbGVydFNuYWNrYmFyQ29udGFpbmVyLsm1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oaXMudGZTdG9yYWdlID0gKC8qKiBAdHlwZSB7P30gKi8gKGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ3RmLXN0b3JhZ2UnKSkpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHRmR2xvYmFscyA9ICgvKiogQHR5cGUgez99ICovIChkb2N1bWVudC5jcmVhdGVFbGVtZW50KCd0Zi1nbG9iYWxzJykpKTsKICAgICAgICAgICAgLy8gTm90ZTogYG1pZ3JhdGVMZWdhY3lVUkxTY2hlbWUoKWAgbXVzdCBiZSBjYWxsZWQgYmVmb3JlIGBzZXRVc2VIYXNoYCwgc28KICAgICAgICAgICAgLy8gdGhhdCB0ZlN0b3JhZ2UgcmVhZHMgZnJvbSB0aGUgYWN0dWFsIFVSTCwgbm90IHRoZSBmYWtlIGhhc2ggZm9yIHRlc3RzCiAgICAgICAgICAgIC8vIG9ubHkuCiAgICAgICAgICAgIHRmR2xvYmFscy50Zl9nbG9iYWxzLnNldFVzZUhhc2godHJ1ZSk7CiAgICAgICAgICAgIHRoaXMudGZTdG9yYWdlLnRmX3N0b3JhZ2UubWlncmF0ZUxlZ2FjeVVSTFNjaGVtZSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGtleQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0U3RyaW5nKGtleSkgewogICAgICAgICAgICByZXR1cm4gdGhpcy50ZlN0b3JhZ2UudGZfc3RvcmFnZS5nZXRTdHJpbmcoa2V5KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBrZXkKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHBhcmFtIHs/PX0gb3B0aW9ucwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0U3RyaW5nKGtleSwgdmFsdWUsIG9wdGlvbnMpIHsKICAgICAgICAgICAgdGhpcy50ZlN0b3JhZ2UudGZfc3RvcmFnZS5zZXRTdHJpbmcoa2V5LCB2YWx1ZSwgb3B0aW9ucyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0UGx1Z2luSWQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmdldFN0cmluZyhUQUIkMSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gcGx1Z2luSWQKICAgICAgICAgKiBAcGFyYW0gez89fSBvcHRpb25zCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXRQbHVnaW5JZChwbHVnaW5JZCwgb3B0aW9ucykgewogICAgICAgICAgICB0aGlzLnNldFN0cmluZyhUQUIkMSwgcGx1Z2luSWQsIG9wdGlvbnMpOwogICAgICAgIH0KICAgIH0KICAgIEhhc2hEZWVwTGlua2VyLmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBJbmplY3RhYmxlIH0sCiAgICBdOwogICAgLyoqIEBub2NvbGxhcHNlICovCiAgICBIYXNoRGVlcExpbmtlci5jdG9yUGFyYW1ldGVycyA9ICgpID0+IFtdOwogICAgLyoqIEBub2NvbGxhcHNlICovIEhhc2hEZWVwTGlua2VyLsm1ZmFjID0gZnVuY3Rpb24gSGFzaERlZXBMaW5rZXJfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgSGFzaERlZXBMaW5rZXIpKCk7IH07CiAgICAvKiogQG5vY29sbGFwc2UgKi8gSGFzaERlZXBMaW5rZXIuybVwcm92ID0gybXJtWRlZmluZUluamVjdGFibGUoeyB0b2tlbjogSGFzaERlZXBMaW5rZXIsIGZhY3Rvcnk6IEhhc2hEZWVwTGlua2VyLsm1ZmFjIH0pOwoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogdGVuc29yYm9hcmQvd2ViYXBwL2NvcmUvdmlld3MvaGFzaF9zdG9yYWdlX2NvbXBvbmVudC50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvKiogQGVudW0ge251bWJlcn0gKi8KICAgIGNvbnN0IENoYW5nZWRQcm9wID0gewogICAgICAgIEFDVElWRV9QTFVHSU46IDAsCiAgICB9OwogICAgQ2hhbmdlZFByb3BbQ2hhbmdlZFByb3AuQUNUSVZFX1BMVUdJTl0gPSAnQUNUSVZFX1BMVUdJTic7CiAgICBjbGFzcyBIYXNoU3RvcmFnZUNvbXBvbmVudCB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBkZWVwTGlua2VyCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoZGVlcExpbmtlcikgewogICAgICAgICAgICB0aGlzLmRlZXBMaW5rZXIgPSBkZWVwTGlua2VyOwogICAgICAgICAgICB0aGlzLm9uSGFzaENoYW5nZSA9IHRoaXMub25IYXNoQ2hhbmdlZEltcGwuYmluZCh0aGlzKTsKICAgICAgICAgICAgdGhpcy5vblZhbHVlQ2hhbmdlID0gbmV3IEV2ZW50RW1pdHRlcigpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25IYXNoQ2hhbmdlZEltcGwoKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgYWN0aXZlUGx1Z2luSWQgPSB0aGlzLmRlZXBMaW5rZXI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hbGx5LXdvcmsvCiAgICAgICAgICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKCdoYXNoY2hhbmdlJywgdGhpcy5vbkhhc2hDaGFuZ2UpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25EZXN0cm95KCkgewogICAgICAgICAgICB3aW5kb3cucmVtb3ZlRXZlbnRMaXN0ZW5lcignaGFzaGNoYW5nZScsIHRoaXMub25IYXNoQ2hhbmdlKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBjaGFuZ2VzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uQ2hhbmdlcyhjaGFuZ2VzKSB7CiAgICAgICAgICAgIGlmIChjaGFuZ2VzWydhY3RpdmVQbHVnaW5JZCddKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBhY3RpdmVQbHVnaW5JZENoYW5nZSA9IGNoYW5nZXNbJ2FjdGl2ZVBsdWdpbklkJ107CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBvcHRpb24gPSB7CiAgICAgICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiAnJywKICAgICAgICAgICAgICAgICAgICB1c2VMb2NhdGlvblJlcGxhY2U6IGFjdGl2ZVBsdWdpbklkQ2hhbmdlLnByZXZpb3VzVmFsdWUgPT09IG51bGwgfHwKICAgICAgICAgICAgICAgICAgICAgICAgYWN0aXZlUGx1Z2luSWRDaGFuZ2UuZmlyc3RDaGFuZ2UsCiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgdmFsdWUgPSBhY3RpdmVQbHVnaW5JZENoYW5nZS5jdXJyZW50VmFsdWUgPT09IG51bGwKICAgICAgICAgICAgICAgICAgICA/ICcnCiAgICAgICAgICAgICAgICAgICAgOiBhY3RpdmVQbHVnaW5JZENoYW5nZS5jdXJyZW50VmFsdWU7CiAgICAgICAgICAgICAgICB0aGlzLmRlZXBMaW5rZXIuc2V0UGx1Z2luSWQodmFsdWUsIG9wdGlvbik7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICBIYXNoU3RvcmFnZUNvbXBvbmVudC5kZWNvcmF0b3JzID0gWwogICAgICAgIHsgdHlwZTogQ29tcG9uZW50LCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIHNlbGVjdG9yOiAnaGFzaC1zdG9yYWdlLWNvbXBvbmVudCcsCiAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU6ICcnLAogICAgICAgICAgICAgICAgICAgIGNoYW5nZURldGVjdGlvbjogQ2hhbmdlRGV0ZWN0aW9uU3RyYXRlZ3kuT25QdXNoLAogICAgICAgICAgICAgICAgfSxdIH0sCiAgICBdOwogICAgLyoqIEBub2NvbGxhcHNlICovCiAgICBIYXNoU3RvcmFnZUNvbXBvbmVudC5jdG9yUGFyYW1ldGVycyA9ICgpID0+IFsKICAgICAgICB7IHR5cGU6IEhhc2hEZWVwTGlua2VyIH0KICAgIF07CiAgICBIYXNoU3RvcmFnZUNvbXBvbmVudC5wcm9wRGVjb3JhdG9ycyA9IHsKICAgICAgICBhY3RpdmVQbHVnaW5JZDogW3sgdHlwZTogSW5wdXQgfV0sCiAgICAgICAgb25WYWx1ZUNoYW5nZTogW3sgdHlwZTogT3V0cHV0IH1dCiAgICB9OwogICAgLyoqIEBub2NvbGxhcHNlICovIEhhc2hTdG9yYWdlQ29tcG9uZW50Lsm1ZmFjID0gZnVuY3Rpb24gSGFzaFN0b3JhZ2VDb21wb25lbnRfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgSGFzaFN0b3JhZ2VDb21wb25lbnQpKMm1ybVkaXJlY3RpdmVJbmplY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0aGlzLnN0b3JlID0gc3RvcmU7CiAgICAgICAgICAgIHRoaXMuYWN0aXZlUGx1Z2luSWQkID0gdGhpcy5zdG9yZS5waXBlKHNlbGVjdChnZXRBY3RpdmVQbHVnaW4pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBjaGFuZ2UKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uVmFsdWVDaGFuZ2VkKGNoYW5nZSkgewogICAgICAgICAgICBzd2l0Y2ggKGNoYW5nZS5wcm9wKSB7CiAgICAgICAgICAgICAgICBjYXNlIENoYW5nZWRQcm9wLkFDVElWRV9QTFVHSU46CiAgICAgICAgICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChwbHVnaW5VcmxIYXNoQ2hhbmdlZCh7IHBsdWdpbjogY2hhbmdlLnZhbHVlIH0pKTsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIEhhc2hTdG9yYWdlQ29udGFpbmVyLmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBDb21wb25lbnQsIGFyZ3M6IFt7CiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3I6ICdoYXNoLXN0b3JhZ2UnLAogICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlOiBgCiAgICA8aGFzaC1zdG9yYWdlLWNvbXBvbmVudAogICAgICBbYWN0aXZlUGx1Z2luSWRdPSJhY3RpdmVQbHVnaW5JZCQgfCBhc3luYyIKICAgICAgKG9uVmFsdWVDaGFuZ2UpPSJvblZhbHVlQ2hhbmdlZCgkZXZlbnQpIgogICAgPgogICAgPC9oYXNoLXN0b3JhZ2UtY29tcG9uZW50PgogIGAsCiAgICAgICAgICAgICAgICAgICAgc3R5bGVzOiBbCiAgICAgICAgICAgICAgICAgICAgICAgIGAKICAgICAgOmhvc3QgewogICAgICAgIGRpc3BsYXk6IG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3RVbnRpbENoYW5nZWQoKSk7CiAgICAgICAgfQogICAgfQogICAgUGFnZVRpdGxlQ29udGFpbmVyLmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBDb21wb25lbnQsIGFyZ3M6IFt7CiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3I6ICdwYWdlLXRpdGxlJywKICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogYAogICAgPHBhZ2UtdGl0bGUtY29tcG9uZW50IFt0aXRsZV09InRpdGxlJCB8IGFzeW5jIj48L3BhZ2UtdGl0bGUtY29tcG9uZW50PgogIGAsCiAgICAgICAgICAgICAgICAgICAgc3R5bGVzOiBbCiAgICAgICAgICAgICAgICAgICAgICAgIGAKICAgICAgOmhvc3QgewogICAgICAgIGRpc3BsYXk6IG5vbmU7CiAgICAgIH0KICAgIGAsCiAgICAgICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgICAgICBjaGFuZ2VEZXRlY3Rpb246IENoYW5nZURldGVjdGlvblN0cmF0ZWd5Lk9uUHVzaCwKICAgICAgICAgICAgICAgIH0sXSB9LAogICAgXTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLwogICAgUGFnZVRpdGxlQ29udGFpbmVyLmN0b3JQYXJhbWV0ZXJzID0gKCkgPT4gWwogICAgICAgIHsgdHlwZTogU3RvcmUgfQogICAgXTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLyBQYWdlVGl0bGVDb250YWluZXIuybVmYWMgPSBmdW5jdGlvbiBQYWdlVGl0bGVDb250YWluZXJfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgUGFnZVRpdGxlQ29udGFpbmVyKSjJtcm1ZGlyZWN0aXZlSW5qZWN0KFN0b3JlKSk7IH07CiAgICAvKiogQG5vY29sbGFwc2UgKi8gUGFnZVRpdGxlQ29udGFpbmVyLsm1Y21wID0gybXJtWRlZmluZUNvbXBvbmVudCh7IHR5cGU6IFBhZ2VUaXRsZUNvb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dmlldzsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uSW5pdCgpIHsKICAgICAgICAgICAgdGhpcy5nZXRQYWdlU2l6ZSQKICAgICAgICAgICAgICAgIC5waXBlKHRha2VVbnRpbCh0aGlzLm5nVW5zdWJzY3JpYmUpLCBkaXN0aW5jdFVudGlsQ2hhbmdlZCgpKQogICAgICAgICAgICAgICAgLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcGFnZVNpemUKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChwYWdlU2l6ZSkgPT4gewogICAgICAgICAgICAgICAgdGhpcy5wYWdpbmF0ZWRWaWV3U3RvcmUuc2V0TGltaXQocGFnZVNpemUpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkRlc3Ryb3koKSB7CiAgICAgICAgICAgIHRoaXMubmdVbnN1YnNjcmliZS5uZXh0KCk7CiAgICAgICAgICAgIHRoaXMubmdVbnN1YnNjcmliZS5jb21wbGV0ZSgpOwogICAgICAgIH0KICAgIH0KICAgIFNldHRpbmdzUG9seW1lckludGVyb3BDb250YWluZXIuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IENvbXBvbmVudCwgYXJnczogW3sKICAgICAgICAgICAgICAgICAgICBzZWxlY3RvcjogJ3NldHRpbmdzLXBvbHltZXItaW50ZXJvcCcsCiAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU6ICcnLAogICAgICAgICAgICAgICAgICAgIGNoYW5nZURldGVjdGlvbjogQ2hhbmdlRGV0ZWN0aW9uU3RyYXRlZ3kuT25QdXNoLAogICAgICAgICAgICAgICAgfSxdIH0sCiAgICBdOwogICAgLyoqIEBub2NvbGxhcHNlICovCi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VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgY2xhc3MgQXBwQ29udGFpbmVyIHsKICAgICAgICAvLyB2Y1JlZiBpcyByZXF1aXJlZCBieSBuZ3gtY29sb3ItcGlja2VyIGluIG9yZGVyIGZvciBpdCB0byBwbGFjZSB0aGUgcG9wdXAKICAgICAgICAvLyBpbiB0aGUgcm9vdCBub2RlIGluIGEgbW9kYWwgbW9kZS4KICAgICAgICAvLyBodHRwczovL2dpdGh1Yi5jb20vemVmb3kvbmd4LWNvbG9yLXBpY2tlci9ibG9iLzk0YTdjODYyYmI2MWQ3MjA3ZjIxMjgxNTI2ZmNkOTQ0NTMyMTliNTQvcHJvamVjdHMvbGliL3NyYy9saWIvY29sb3ItcGlja2VyLmRpcmVjdGl2ZS50cyNMMTY4LUwxNzUKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHN0b3JlCiAgICAgICAgICogQHBhcmFtIHs/fSB2Y1JlZgogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKHN0b3JlLCB2Y1JlZikgewogICAgICAgICAgICB0aGlzLnN0b3JlID0gc3RvcmU7CiAgICAgICAgICAgIHRoaXMudmNSZWYgPSB2Y1JlZjsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uSW5pdCgpIHsKICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChjb3JlTG9hZGVkKCkpOwogICAgICAgIH0KICAgIH0KICAgIEFwcENvbnRhaW5lci5kZWNvcmF0b3JzID0gWwogICAgICAgIHsgdHlwZTogQ29tcG9uZW50LCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIHNlbGVjdG9yOiAndGItd2ViYXBwJywKICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZVVybDogJy4vYXBwX2NvbnRhaW5lci5uZy5odG1sJywKICAgICAgICAgICAgICAgICAgICBzdHlsZ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0aW5nL2xvY2F0aW9uLnRzCiAgICAgKiBAc3VwcHJlc3Mge2NoZWNrVHlwZXMsY29uc3RhbnRQcm9wZXJ0eSxleHRyYVJlcXVpcmUsbWlzc2luZ092ZXJyaWRlLG1pc3NpbmdSZXR1cm4sdW51c2VkUHJpdmF0ZU1lbWJlcnMsdXNlbGVzc0NvZGV9IGNoZWNrZWQgYnkgdHNjCiAgICAgKi8KICAgIC8qKiBAdHlwZSB7P30gKi8KICAgIGNvbnN0IHV0aWxzID0gewogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0SHJlZigpIHsKICAgICAgICAgICAgcmV0dXJuIHdpbmRvdy5sb2NhdGlvbi5ocmVmOwogICAgICAgIH0sCiAgICB9OwogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IG5hdk9yUm91dGUKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGlzTmF2aWdhdGlvbihuYXZPclJvdXRlKSB7CiAgICAgICAgcmV0dXJuIChuYXZPclJvdXRlLmhhc093blByb3BlcnR5KCdwYXRobmFtZScpICYmCiAgICAgICAgICAgICFuYXZPclJvdXRlLmhhc093blByb3BlcnR5KCdxdWVyeVBhcmFtcycpKTsKICAgIH0KICAgIGNsYXNzIExvY2F0aW9uJDEgewogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0SHJlZigpIHsKICAgICAgICAgICAgcmV0dXJuIHV0aWxzLmdldEhyZWYoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXRTZWFyY2goKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc2VhcmNoUGFyYW1zID0gbmV3IFVSTFNlYXJjaFBhcmFtcyh3aW5kb3cubG9jYXRpb24uc2VhcmNoKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBzZXJpYWxpemFibGVTZWFyY2hQYXJhbXMgPSBbXTsKICAgICAgICAgICAgLy8gVVJMU2VhcmNoUGFyYW1zIGlzIGEgSXRlcmFibGUgYnV0IFR5cGVTY3JpcHQgZG9lcyBub3Qga25vdyBhYm91dCB0aGF0LgogICAgICAgICAgICBzZWFyY2hQYXJhbXMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBrZXkKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICh2YWx1ZSwga2V5KSA9PiB7CiAgICAgICAgICAgICAgICBzZXJpYWxpemFibGVTZWFyY2hQYXJhbXMucHVzaCh7IGtleSwgdmFsdWUgfSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgcmV0dXJuIHNlcmlhbGl6YWJsZVNlYXJjaFBhcmFtczsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXRIYXNoKCkgewogICAgICAgICAgICByZXR1cm4gd2luZG93LmxvY2F0aW9uLmhhc2g7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0UGF0aCgpIHsKICAgICAgICAgICAgcmV0dXJuIHdpbmRvdy5sb2NhdGlvbi5wYXRobmFtZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBwYXRoCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZXBsYWNlU3RhdGUocGF0aCkgewogICAgICAgICAgICB3aW5kb3cuaGlzdG9yeS5yZXBsYWNlU3RhdGUobnVsbCwgJycsIHBhdGgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHBhdGgKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHB1c2hTdGF0ZShwYXRoKSB7CiAgICAgICAgICAgIHdpbmRvdy5oaXN0b3J5LnB1c2hTdGF0ZShudWxsLCAnJywgcGF0aCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25Qb3BTdGF0ZSgpIHsKICAgICAgICAgICAgcmV0dXJuIGZyb21FdmVudCh3aW5kb3csICdwb3BzdGF0ZScpLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAgICAgcGF0aG5hbWU6IHRoaXMuZ2V0UGF0aCgpLAogICAgICAgICAgICAgICAgICAgIHF1ZXJ5UGFyYW1zOiB0aGlzLmdldFNlYXJjaCgpLAogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgfSkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSByZWxhdGl2ZVBhdGgKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldFJlc29sdmVkUGF0aChyZWxhdGl2ZVBhdGgpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB1cmwgPSBuZXcgVVJMKHJlbGF0aXZlUGF0aCwgdXRpbHMuZ2V0SHJlZigpKTsKICAgICAgICAgICAgcmV0dXJuIHVybC5wYXRobmFtZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSByb3V0ZUxpa2UKICAgICAgICAgKiBAcGFyYW0gez89fSBzaG91bGRQcmVzZXJ2ZUhhc2gKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldEZ1bGxQYXRoRnJvbVJvdXRlT3JOYXYocm91dGVMaWtlLCBzaG91bGRQcmVzZXJ2ZUhhc2gpIHsKICAgICAgICAgICAgLy8gVE9ETyhzdGVwaGFud2xlZSk6IHN1cHBvcnQgaGFzaGVzIGluIHRoZSByb3V0ZUxpa2UuCiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcGF0aG5hbWUgPSB0aGlzLmdldFJlc29sdmVkUGF0aChyb3V0ZUxpa2UucGF0aG5hbWUpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBzZWFyY2ggPSAnJzsKICAgICAgICAgICAgaWYgKCFpc05hdmlnYXRpb24ocm91dGVMaWtlKSAmJiByb3V0ZUxpa2UucXVlcnlQYXJhbXMubGVuZ3RoKSB7CiAgICAgICAgICAgICAgICBzZWFyY2ggPQogICAgICAgICAgICAgICAgICAgICc/JyArCiAgICAgICAgICAgICAgICAgICAgICAgIGNyZWF0ZVVSTFNlYXJjaFBhcmFtc0Zyb21TZXJpYWxpemFibGVRdWVyeVBhcmFtcyhyb3V0ZUxpa2UucXVlcnlQYXJhbXMpLnRvU3RyaW5nKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBoYXNoID0gc2hvdWxkUHJlc2VydmVIYXNoID8gdGhpcy5nZXRIYXNoKCkgOiAnJzsKICAgICAgICAgICAgcmV0dXJuIGAke3BhdGhuYW1lfSR7c2VhcmNofSR7aGFzaH1gOwogICAgICAgIH0KICAgIH0KICAgIExvY2F0aW9uJDEuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IEluamVjdGFibGUgfSwKICAgIF07CiAgICAvKiogQG5vY29sbGFwc2UgKi8gTG9jYXRpb24kMS7JtWZhYyA9IGZ1bmN0aW9uIEx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SB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbWV0YUVsID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignaGVhZCBtZXRhW25hbWU9InRiLXJlbGF0aXZlLXJvb3QiXScpOwogICAgICAgICAgICBpZiAoIW1ldGFFbCkKICAgICAgICAgICAgICAgIHJldHVybiAnLyc7CiAgICAgICAgICAgIGNvbnN0IHsgcGF0aG5hbWUgfSA9IG5ldyBVUkwoKCgvKiogQHR5cGUgez99ICovIChtZXRhRWwpKSkuY29udGVudCwgbG9jYXRpb24uZ2V0SHJlZigpKTsKICAgICAgICAgICAgcmV0dXJuIHBhdGhuYW1lLnJlcGxhY2UoL1wvKiQvLCAnLycpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZXR1cm5zIGFjdHVhbCBmdWxsIHBhdGhuYW1lIHRoYXQgaW5jbHVkZXMgcGF0aCBwcmVmaXggb2YgdGhlIGFwcGxpY2F0aW9uLgogICAgICAgICAqIEBwYXJhbSB7P30gYWJzUGF0aG5hbWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldEFic1BhdGhuYW1lV2l0aEFwcFJvb3QoYWJzUGF0aG5hbWUpIHsKICAgICAgICAgICAgLy8gYXBwUm9vdCBoYXMgdHJhaWxpbmcgJy8nLiBSZW1vdmUgb25lIHNvIHdlIGRvbid0IGhhdmUgIi8vIi4KICAgICAgICAgICAgcmV0dXJuIHRoaXMuYXBwUm9vdC5zbGljZSgwLCAtMSkgKyBhYnNQYXRobmFtZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBhYnNQYXRobmFtZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0QXBwUm9vdGxlc3NQYXRobmFtZShhYnNQYXRobmFtZSkgewogICAgICAgICAgICBpZiAoYWJzUGF0aG5hbWUuc3Rhc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ZpZGVycy5oYXMocHJvdmlkZXIuYWN0aW9uQ3JlYXRvci50eXBlKSkgewogICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBSYW5nZUVycm9yKGAiJHtwcm92aWRlci5hY3Rpb25DcmVhdG9yLnR5cGV9IiBpcyBhbHJlYWR5IHJlZ2lzdGVyZWQgZm9yIG5hdi5gICsKICAgICAgICAgICAgICAgICAgICAgICAgJyBNdWx0aXBsZSBuYXZpZ2F0aW9ucyBvbiBzYW1lIGtpY2sgaXMgbm90IGFsbG93ZWQuJyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLnByb3ZpZGVycy5zZXQocHJvdmlkZXIuYWN0aW9uQ3JlYXRvci50eXBlLCBwcm92aWRlci5sYW1iZGEpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gYWN0aW9uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXROYXZpZ2F0aW9uKGFjdGlvbikgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGxhbWJkYSA9IHRoaXMucHJvdmlkZXJzLmdldChhY3Rpb24udHlwZSk7CiAgICAgICAgICAgIGlmICghbGFtYmRhKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gbGFtYmRhKGFjdGlvbik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEFuIE5nTW9kdWxlIHRoYXQgcHJvdmlkZXMgcHJvZ3JhbW1tYXRpYyBuYXZpZ2F0aW9uIHJvdXRpbmVzLgogICAgICAgICAqIE9uIGFuIGFjdGlvbiBzdWJzY3JpYmVkIGZpcmUsIGl0IGludm9rZXMgYSBuYXZpZ2F0aW9uLgogICAgICAgICAqCiAgICAgICAgICogV0FSTjogaW50ZXJuYWxseSwgaXQgaXMgaW1wbGVtZW50ZWQgd2l0aCBOZ3J4IGNvbXBvc2l0ZSBhY3Rpb25zIHNvIHRoZXJlCiAgICAgICAgICogbWF5IGJlIGEgdGltaW5nIGlzc3VlLiBNaXRpZ2F0ZSB0aGUgaXNzdWUgYnkgYWNjb3VudCBmb3IgcG90ZW50aWFsIGRhdGEKICAgICAgICAgKiBpbmNvbnNpc3RlbmN5IGlzc3VlIGluIHRoZSBjb250YWluZXIuCiAgICAgICAgICoKICAgICAgICAgKiBmdW5jdGlvbiBwcm92aWRlcigpIHsKICAgICAgICAgKiAgIHJldHVybiB7CiAgICAgICAgICogICAgIGFjdGlvbkNyZWF0b3I6IHNvbWV0aGluZ0hhcHBlbmVkLAogICAgICAgICAqICAgICBsYW1iZGE6IChhY3Rpb246IHR5cGVvZiBzb21ldGhpbmdIYXBwZW5lZCkgPT4gewogICAgICAgICAqICAgICAgIHJldHVybiB7cm91dGVLaW5kOiBSb3V0ZUtpbmQuRVhQRVJJTUVOVCwgcm91dGVQYXJhbXM6IHt9fTsKICAgICAgICAgKiAgICAgfSwKICAgICAgICAgKiAgIH07CiAgICAgICAgICogfQogICAgICAgICAqCiAgICAgICAgICogXEBOZ01vZHVsZSh7CiAgICAgICAgICogICBpbXBvcnRzOiBbCiAgICAgICAgICogICAgIFJvdXRlUmVnaXN0cnlNb2R1bGUucmVnaXN0ZXJQcm9ncmFtbWF0aWNhbE5hdmlnYXRpb24ocHJvdmlkZXIpLAogICAgICAgICAqICAgICBSb3V0ZVJlZ2lzdHJ5TW9kdWxlLnJlZ2lzdGVyUHJvZ3JhbW1hdGljYWxOYXZpZ2F0aW9uKGFub3RoZXJQcm92aWRlciksCiAgICAgICAgICogICBdLAogICAgICAgICAqIH0pCiAgICAgICAgICogQHRlbXBsYXRlIEFDLCBVCiAgICAgICAgICogQHBhcmFtIHs/fSBwcm92aWRlckZhY3RvcnkKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHN0YXRpYyByZWdpc3RlclByb2dyYW1tYXRpY2FsTmF2aWdhdGlvbihwcm92aWRlckZhY3RvcnkpIHsKICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIG5nTW9kdWxlOiBQcm9ncmFtbWF0aWNhbE5hdmlnYXRpb25Nb2R1bGUsCiAgICAgICAgICAgICAgICBwcm92aWRlcnM6IFsKICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgIHByb3ZpZGU6IE5BVklHQVRJT05fUFJPVklERVIsCiAgICAgICAgICAgICAgICAgICAgICAgIG11bHRpOiB0cnVlLAogICAgICAgICAgICAgICAgICAgICAgICB1c2VGYWN0b3J5OiBwcm92aWRlckZhY3RvcnksCiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgIH07CiAgICAgICAgfQogICAgfQogICAgUHJvZ3JhbW1hdGljYWxOYXZpZ2F0aW9uTW9kdWxlLmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBOZ01vZHVsZSwgYXJnczogW3t9LF0gfSwKICAgIF07CiAgICAvKiogQG5vY29sbGFwc2UgKi8KICAgIFByb2dyYW1tYXRpY2FsTmF2aWdhdGlvbk1vZHVsZS5jdG9yUGFyYW1ldGVycyA9ICgpID0+IFsKICAgICAgICB7IHR5cGU6IEFycmF5LCBkZWNvcmF0b3JzOiBbeyB0eXBlOiBPcHRpb25hbCB9LCB7IHR5cGU6IEluamVjdCwgYXJnczogW05BVklHQVRJT05fUFJPVklERVIsXSB9XSB9CiAgICBdOwogICAgLyoqIEBub2NvbGxhcHNlICovIFByb2dyYW1tYXRpY2FsTmF2aWdhdGlvbk1vZHVsZS7JtW1vZCA9IMm1ybVkZWZpbmVOZ01vZHVsZSh7IHR5cGU6IFByb2dyYW1tYXRpY2FsTmF2aWdhdGlvbk1vZHVsZSB9KTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLyBQcm9ncmFtbWF0aWNhbE5hdm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AgICAgICAgY29uc3RydWN0b3IoYWN0aW9ucyQsIHN0b3JlLCBsb2NhdGlvbiwgcmVnaXN0cnksIHByb2dyYW1tYXRpY2FsTmF2TW9kdWxlLCBhcHBSb290UHJvdmlkZXIpIHsKICAgICAgICAgICAgdGhpcy5hY3Rpb25zJCA9IGFjdGlvbnMkOwogICAgICAgICAgICB0aGlzLnN0b3JlID0gc3RvcmU7CiAgICAgICAgICAgIHRoaXMubG9jYXRpb24gPSBsb2NhdGlvbjsKICAgICAgICAgICAgdGhpcy5wcm9ncmFtbWF0aWNhbE5hdk1vZHVsZSA9IHByb2dyYW1tYXRpY2FsTmF2TW9kdWxlOwogICAgICAgICAgICB0aGlzLmFwcFJvb3RQcm92aWRlciA9IGFwcFJvb3RQcm92aWRlcjsKICAgICAgICAgICAgdGhpcy5vbk5hdmlnYXRpb25SZXF1ZXN0ZWQkID0gdGhpcy5hY3Rpb25zJC5waXBlKG9mVHlwZShuYXZpZ2F0aW9uUmVxdWVzdGVkKSwgbWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBuYXZpZ2F0aW9uCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAobmF2aWdhdGlvbikgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgcmVzb2x2ZWRQYXRobmFtZSA9IG5hdmlnYXRpb24ucGF0aG5hbWUuc3RhcnRzV2l0aCgnLycpCiAgICAgICAgICAgICAgICAgICAgPyB0aGlzLmFwcFJvb3RQcm92aWRlci5nZXRBYnNQYXRobmFtZVdpdGhBcHBSb290KG5hdmlnYXRpb24ucGF0aG5hbWUpCiAgICAgICAgICAgICAgICAgICAgOiB0aGlzLmxvY2F0aW9uLmdldFJlc29sdmVkUGF0aChuYXZpZ2F0aW9uLnBhdGhuYW1lKTsKICAgICAgICAgICAgICAgIHJldHVybiBPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sIG5hdmlnYXRpb24pLCB7IHBhdGhuYW1lOiByZXNvbHZlZFBhdGhuYW1lIH0pOwogICAgICAgICAgICB9KSkpOwogICAgICAgICAgICB0aGlzLm9uSW5pdCQgPSB0aGlzLmFjdGlvbnMkCiAgICAgICAgICAgICAgICAucGlwZShvZlR5cGUoaW5pdEFjdGlvbikpCiAgICAgICAgICAgICAgICAucGlwZShkZWxheSgwKSwgbWFwKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAgICAgcGF0aG5hbWU6IHRoaXMubG9jYXRpb24uZ2V0UGF0aCgpLAogICAgICAgICAgICAgICAgICAgIHF1ZXJ5UGFyYW1zOiB0aGlzLmxvY2F0aW9uLmdldFNlYXJjaCgpLAogICAgICAgICAgICAgICAgICAgIHJlcGxhY2VTdGF0ZTogdHJ1ZSwKICAgICAgICAgICAgICAgICAgICBicm93c2VySW5pdGlhdGVkOiB0cnVlLAogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIElucHV0IG9ic2VydmFibGUgbXVzdCBoYXZlIGFic29sdXRlIHBhdGhuYW1lIHdpdGgsIHdoZW4gYXBwUm9vdCBpcyBwcmVzZW50LAogICAgICAgICAgICAgKiBhcHBSb290IHByZWZpeGVkIChlLmcuLCB3aW5kb3cubG9jYXRpb24ucGF0aG5hbWUpLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy51c2VySW5pdE5hdlJvdXRlJCA9IG1lcmdlKHRoaXMub25OYXZpZ2F0aW9uUmVxdWVzdGVkJCwgdGhpcy5vbkluaXQkLCB0aGlzLmxvY2F0aW9uLm9uUG9wU3RhdGUoKS5waXBlKG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbmF2aWdhdGlvbgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKG5hdmlnYXRpb24pID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAgICAgcGF0aG5hbWU6IG5hdmlnYXRpb24ucGF0aG5hbWUsCiAgICAgICAgICAgICAgICAgICAgcmVwbGFjZVN0YXRlOiBuYXZpZ2F0aW9uLnJlcGxhY2VTdGF0ZSwKICAgICAgICAgICAgICAgICAgICBicm93c2VySW5pdGlhdGVkOiB0cnVlLAogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgfSkpKSkucGlwZShtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IG5hdmlnYXRpb24KICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChuYXZpZ2F0aW9uKSA9PiB7CiAgICAgICAgICAgICAgICAvLyBFeHBlY3QgdG8gaGF2ZSBhYnNvbHV0ZSBuYXZpZ2F0aW9uIGhlcmUuCiAgICAgICAgICAgICAgICBpZiAoIW5hdmlnYXRpb24ucGF0aG5hbWUuc3RhcnRzV2l0aCgnLycpKSB7CiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBbQXBwIHJvdXRpbmddIHBhdGhuYW1lIG11c3Qgc3RhcnQgd2l0aCAnLycuIEdvdDogJHtuYXZpZ2F0aW9uLnBhdGhuYW1lfWApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgbmF2aWdhdGlvbiksIHsgcGF0aG5hbWU6IHRoaXMuYXBwUm9vdFByb3ZpZGVyLmdldEFwcFJvb3RsZXNzUGF0aG5hbWUobmF2aWdhdGlvbi5wYXRobmFtZSkgfSk7CiAgICAgICAgICAgIH0pKSwgbWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBuYXZpZ2F0aW9uV2l0aEFic29sdXRlUGF0aAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKG5hdmlnYXRpb25XaXRoQWJzb2x1dGVQYXRoKSA9PiB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCByb3V0ZU1hdGNoID0gdGhpcy5yb3V0ZUNvbmZpZ3MKICAgICAgICAgICAgICAgICAgICA/IHRoaXMucm91dGVDb25maWdzLm1hdGNoKG5hdmlnYXRpb25XaXRoQWJzb2x1dGVQYXRoKQogICAgICAgICAgICAgICAgICAgIDogbnVsbDsKICAgICAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAgICAgcm91dGVNYXRjaCwKICAgICAgICAgICAgICAgICAgICBvcHRpb25zOiB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJlcGxhY2VTdGF0ZTogbmF2aWdhdGlvbldpdGhBYnNvbHV0ZVBhdGgucmVwbGFjZVN0YXRlLAogICAgICAgICAgICAgICAgICAgICAgICBicm93c2VySW5pdGlhdGVkOiBuYXZpZ2F0aW9uV2l0aEFic29sdXRlUGF0aC5icm93c2VySW5pdGlhdGVkLAogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9KSkpOwogICAgICAgICAgICB0aGlzLnByb2dyYW1tdGljYWxOYXZSb3V0ZSQgPSB0aGlzLmFjdGlvbnMkLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBhY3Rpb24KICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChhY3Rpb24pID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLnByb2dyYW1tYXRpY2FsTmF2TW9kdWxlLmdldE5hdmlnYXRpb24oYWN0aW9uKTsKICAgICAgICAgICAgfSkpLCBmaWx0ZXIoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IG5hdgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKG5hdikgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIG5hdiAhPT0gbnVsbDsKICAgICAgICAgICAgfSkpLCBtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHByb2dyYW1tYXRpY2FsTmF2aWdhdGlvbgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHByb2dyYW1tYXRpY2FsTmF2aWdhdGlvbikgPT4gewogICAgICAgICAgICAgICAgY29uc3QgeyByb3V0ZUtpbmQsIHJvdXRlUGFyYW1zIH0gPSAoLyoqIEB0eXBlIHs/fSAqLyAocHJvZ3JhbW1hdGljYWxOYXZpZ2F0aW9uKSk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCByb3V0ZU1hdGNoID0gdGhpcy5yb3V0ZUNvbmZpZ3MKICAgICAgICAgICAgICAgICAgICA/IHRoaXMucm91dGVDb25maWdzLm1hdGNoQnlSb3V0ZUtpbmQocm91dGVLaW5kLCByb3V0ZVBhcmFtcykKICAgICAgICAgICAgICAgICAgICA6IG51bGw7CiAgICAgICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgICAgIHJvdXRlTWF0Y2gsCiAgICAgICAgICAgICAgICAgICAgb3B0aW9uczogewogICAgICAgICAgICAgICAgICAgICAgICByZXBsYWNlU3RhdGU6IGZhbHNlLAogICAgICAgICAgICAgICAgICAgICAgICBicm93c2VySW5pdGlhdGVkOiBmYWxzZSwKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgdGhpcy52YWxpZGF0ZWRSb3V0ZSQgPSBtZXJnZSh0aGlzLnVzZXJJbml0TmF2Um91dGUkLCB0aGlzLnByb2dyYW1tdGljYWxOYXZSb3V0ZSQpLnBpcGUoZmlsdGVyKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICh7IHJvdXRlTWF0Y2ggfSkgPT4gQm9vbGVhbihyb3V0ZU1hdGNoKSkpLCBtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHJvdXRlTWF0Y2hBbmRPcHRpb25zCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAocm91dGVNYXRjaEFuZE9wdGlvbnMpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAgICAgcm91dGVNYXRjaDogKC8qKiBAdHlwZSB7P30gKi8gKHJvdXRlTWF0Y2hBbmRPcHRpb25zLnJvdXRlTWF0Y2gpKSwKICAgICAgICAgICAgICAgICAgICBvcHRpb25zOiByb3V0ZU1hdGNoQW5kT3B0aW9ucy5vcHRpb25zLAogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEBleHBvcnQKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuZmlyZU5hdmlnYXRlZElmVmFsaWRSb3V0ZSQgPSBjcmVhdGVFZmZlY3QoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMudmFsaWRhdGVkUm91dGUkLnBpcGUodGFwKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoeyByb3V0ZU1hdGNoLCBvcHRpb25zIH0pID0+IHsKICAgICAgICAgICAgICAgICAgICBpZiAob3B0aW9ucy5icm93c2VySW5pdGlhdGVkICYmIHJvdXRlTWF0Y2guZGVlcExpbmtQcm92aWRlcikgewogICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHJlaHlkcmF0aW5nU3RhdGUgPSByb3V0ZU1hdGNoLmRlZXBMaW5rUHJvdmlkZXIuZGVzZXJpYWxpemVRdWVyeVBhcmFtcyh0aGlzLmxvY2F0aW9uLmdldFNlYXJjaCgpKTsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChzdGF0ZVJlaHlkcmF0ZWRGcm9tVXJsKHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJvdXRlS2luZDogcm91dGVNYXRjaC5yb3V0ZUtpbmQsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJ0aWFsU3RhdGU6IHJlaHlkcmF0aW5nU3RhdGUsCiAgICAgICAgICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KSksIHN3aXRjaE1hcCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKHsgcm91dGVNYXRjaCwgb3B0aW9ucyB9KSA9PiB7CiAgICAgICAgICAgICAgICAgICAgdmFyIF9hOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBuYXZpZ2F0aW9uT3B0aW9ucyA9IHsKICAgICAgICAgICAgICAgICAgICAgICAgcmVwbGFjZVN0YXRlOiAoX2EgPSBvcHRpb25zLnJlcGxhY2VTdGF0ZSkgIT09IG51bGwgJiYgX2EgIT09IHZvaWQgMCA/IF9hIDogZmFsc2UsCiAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3Qgcm91dGVPYnNlcnZhYmxlV2l0aG91dFF1ZXJ5ID0gb2YoewogICAgICAgICAgICAgICAgICAgICAgICByb3V0ZUtpbmQ6IHJvdXRlTWF0Y2gucm91dGVLaW5kLAogICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXM6IHJvdXRlTWF0Y2gucGFyYW1zLAogICAgICAgICAgICAgICAgICAgICAgICBwYXRobmFtZTogcm91dGVNYXRjaC5wYXRobmFtZSwKICAgICAgICAgICAgICAgICAgICAgICAgcXVlcnlQYXJhbXM6IFtdLAogICAgICAgICAgICAgICAgICAgICAgICBuYXZpZ2F0aW9uT3B0aW9ucywKICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgICAgICBpZiAocm91dGVNYXRjaC5kZWVwTGlua1Byb3ZpZGVyID09PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByb3V0ZU9ic2VydmFibGVXaXRob3V0UXVlcnk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAocm91dGVNYXRjaAogICAgICAgICAgICAgICAgICAgICAgICAuZGVlcExpbmtQcm92aWRlcikpLnNlcmlhbGl6ZVN0YXRlVG9RdWVyeVBhcmFtcyh0aGlzLnN0b3JlKQogICAgICAgICAgICAgICAgICAgICAgICAucGlwZShtYXAoKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcXVlcnlQYXJhbXMKICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGluZGV4CiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAocXVlcnlQYXJhbXMsIGluZGV4KSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByb3V0ZUtpbmQ6IHJvdXRlTWF0Y2gucm91dGVLaW5kLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zOiByb3V0ZU1hdGNoLnBhcmFtcywKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhdGhuYW1lOiByb3V0ZU1hdGNoLnBhdGhuYW1lLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgcXVlcnlQYXJhbXMsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYXZpZ2F0aW9uT3B0aW9uczogaW5kZXggPT09IDAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IG5hdmlnYXRpb25PcHRpb25zCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sIG5hdmlnYXRpb25PcHRpb25zKSwgeyByZXBsYWNlU3RhdGU6IHRydWUgfSksCiAgICAgICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgICAgIH0pKSwgdGFwKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcm91dGUKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChyb3V0ZSkgPT4gewogICAgICAgICAgICAgICAgICAgIC8vIGIvMTYwMTg1MDM5OiBBbGxvd3MgdGhlIHJvdXRlIHN0b3JlICsgcm91dGVyIG91dGxldCB0byBjaGFuZ2UKICAgICAgICAgICAgICAgICAgICAvLyBiZWZvcmUgdGhlIHJvdXRlIGNoYW5nZSBzbyBhbGwgY29tcG9uZW50cyBkbyBub3QgaGF2ZSB0bwogICAgICAgICAgICAgICAgICAgIC8vIHNhZmVndWFyZCBhZ2FpbnN0IHRoZSBjYXNlIHdoZW4gYHJvdXRlSWRgIChyb3V0ZUtpbmQgYW5kCiAgICAgICAgICAgICAgICAgICAgLy8gcm91dGVQYXJhbXMpIGRvIG5vdCBoYXZlIHVuZXhwZWN0ZWQgdmFsdWVzLiBCZWNhdXNlIHdlCiAgICAgICAgICAgICAgICAgICAgLy8gZGVib3VuY2VUaW1lLCB0ZWNobmljYWxseSwgaXQgZG9lcyBub3QgZmlyZSB0d28gYWN0aW9ucwogICAgICAgICAgICAgICAgICAgIC8vIHNlcXVlbnRpYWxseS4KICAgICAgICAgICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKG5hdmlnYXRpbmcoeyBhZnRlcjogcm91dGUgfSkpOwogICAgICAgICAgICAgICAgfSkpLCAKICAgICAgICAgICAgICAgIC8vIExldCB0aGUgcm91dGVyLW91dGxldCBmbHVzaCB0aGUgY2hhbmdlIGluIGEgbWljcm90YXNrLgogICAgICAgICAgICAgICAgZGVib3VuY2VUaW1lKDApLCB3aXRoTGF0ZXN0RnJvbSh0aGlzLnN0b3JlLnNlbGVjdChnZXRBY3RpdmVSb3V0ZSkpLCBtYXAoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChbcm91dGUsIG9sZFJvdXRlXSkgPT4gewogICAgICAgICAgICAgICAgICAgIHJldHVybiBuYXZpZ2F0ZWQoeyBiZWZvcmU6IG9sZFJvdXRlLCBhZnRlcjogcm91dGUgfSk7CiAgICAgICAgICAgICAgICB9KSkpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIC8vIFRPRE8oc3RlcGhhbndsZWUpOiBtb3ZlIHRoaXMgdG8gYSAidmlldyIuCiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBAZXhwb3J0CiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmNoYW5nZUJyb3dzZXJVcmwkID0gY3JlYXRlRWZmZWN0KCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmFjdGlvbnMkLnBpcGUob2ZUeXBlKG5hdmlnYXRlZCksIHdpdGhMYXRlc3RGcm9tKHRoaXMuc3RvcmUuc2VsZWN0KGdldEFjdGl2ZVJvdXRlKSksIGZpbHRlcigoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKFssIHJvdXRlXSkgPT4gQm9vbGVhbihyb3V0ZSkpKSwgbWFwKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoW25hdmlnYXRlZEFjdGlvbiwgcm91dGVdKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgLy8gVGhlIFVSTCBoYXNoIGNhbiBiZSBzZXQgdmlhIEhhc2hTdG9yYWdlQ29tcG9uZW50ICh3aGljaCB1c2VzCiAgICAgICAgICAgICAgICAgICAgLy8gUG9seW1lcidzIHRmLXN0b3JhZ2UpLiBEZWVwTGlua1Byb3ZpZGVycyBhbHNvIG1vZGlmeSB0aGUgVVJMIHdoZW4KICAgICAgICAgICAgICAgICAgICAvLyBhIHByb3ZpZGVyJ3Mgc2VyaWFsaXplU3RhdGVUb1F1ZXJ5UGFyYW1zKCkgZW1pdHMuIFRoZXNlIHJlc3VsdCBpbgogICAgICAgICAgICAgICAgICAgIC8vIHRoZSBVUkwgdXBkYXRlZCB3aXRob3V0IHRoZSBwcmV2aW91cyBoYXNoLiBIYXNoU3RvcmFnZUNvbXBvbmVudAogICAgICAgICAgIC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EFwcFJvdXRpbmcgdG8KICAgICAgICAgICAgICAgICAgICAvLyBpbml0aWFsaXplIGJlZm9yZSBzZXR0aW5nIHRoZSBhY3RpdmUgcGx1Z2luIGhhc2guCiAgICAgICAgICAgICAgICAgICAgLy8gU2VlIGh0dHBzOi8vZ2l0aHViLmNvbS90ZW5zb3JmbG93L3RlbnNvcmJvYXJkL2lzc3Vlcy80MjA3LgogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBvbGRSb3V0ZSA9IG5hdmlnYXRlZEFjdGlvbi5iZWZvcmU7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHByZXNlcnZlSGFzaCA9IG9sZFJvdXRlID09PSBudWxsIHx8CiAgICAgICAgICAgICAgICAgICAgICAgIGdldFJvdXRlSWQob2xkUm91dGUucm91dGVLaW5kLCBvbGRSb3V0ZS5wYXJhbXMpID09PQogICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2V0Um91dGVJZCgoLyoqIEB0eXBlIHs/fSAqLyAocm91dGUpKS5yb3V0ZUtpbmQsICgvKiogQHR5cGUgez99ICovIChyb3V0ZSkpLnBhcmFtcyk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgICAgICAgICAgcHJlc2VydmVIYXNoLAogICAgICAgICAgICAgICAgICAgICAgICByb3V0ZTogKC8qKiBAdHlwZSB7P30gKi8gKHJvdXRlKSksCiAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIH0pKSwgZmlsdGVyKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoeyByb3V0ZSB9KSA9PiB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICFhcmVSb3V0ZXNFcXVhbChyb3V0ZSwgewogICAgICAgICAgICAgICAgICAgICAgICBwYXRobmFtZTogdGhpcy5hcHBSb290UHJvdmlkZXIuZ2V0QXBwUm9vdGxlc3NQYXRobmFtZSh0aGlzLmxvY2F0aW9uLmdldFBhdGgoKSksCiAgICAgICAgICAgICAgICAgICAgICAgIHF1ZXJ5UGFyYW1zOiB0aGlzLmxvY2F0aW9uLmdldFNlYXJjaCgpLAogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgfSkpLCB0YXAoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICh7IHByZXNlcnZlSGFzaCwgcm91dGUgfSkgPT4gewogICAgICAgICAgICAgICAgICAgIGlmIChyb3V0ZS5uYXZpZ2F0aW9uT3B0aW9ucy5yZXBsYWNlU3RhdGUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5sb2NhdGlvbi5yZXBsYWNlU3RhdGUodGhpcy5hcHBSb290UHJvdmlkZXIuZ2V0QWJzUGF0aG5hbWVXaXRoQXBwUm9vdCh0aGlzLmxvY2F0aW9uLmdldEZ1bGxQYXRoRnJvbVJvdXRlT3JOYXYocm91dGUsIHByZXNlcnZlSGFzaCkpKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubG9jYXRpb24ucHVzaFN0YXRlKHRoaXMuYXBwUm9vdFByb3ZpZGVyLmdldEFic1BhdGhuYW1lV2l0aEFwcFJvb3QodGhpcy5sb2NhdGlvbi5nZXRGdWxsUGF0aEZyb21Sb3V0ZU9yTmF2KHJvdXRlLCBwcmVzZXJ2ZUhhc2gpKSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSkpK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dGhpcy5sb2NhdGlvbiA9IGxvY2F0aW9uOwogICAgICAgICAgICB0aGlzLmFwcFJvb3RQcm92aWRlciA9IGFwcFJvb3RQcm92aWRlcjsKICAgICAgICAgICAgdGhpcy5wYXRobmFtZSA9IG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGhhbmRsZUNsaWNrKGV2ZW50KSB7CiAgICAgICAgICAgIGlmICghdGhpcy5wYXRobmFtZSB8fCBldmVudC5jdHJsS2V5IHx8IGV2ZW50Lm1ldGFLZXkpIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpOwogICAgICAgICAgICBldmVudC5zdG9wUHJvcGFnYXRpb24oKTsKICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChuYXZpZ2F0aW9uUmVxdWVzdGVkKHsKICAgICAgICAgICAgICAgIHBhdGhuYW1lOiB0aGlzLnBhdGhuYW1lLAogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGhyZWYoKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5wYXRobmFtZSkKICAgICAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgICAgICByZXR1cm4gdGhpcy5hcHBSb290UHJvdmlkZXIuZ2V0QWJzUGF0aG5hbWVXaXRoQXBwUm9vdCh0aGlzLmxvY2F0aW9uLmdldEZ1bGxQYXRoRnJvbVJvdXRlT3JOYXYoewogICAgICAgICAgICAgICAgcGF0aG5hbWU6IHRoaXMucGF0aG5hbWUsCiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQWRkIHBhdGhuYW1lIHRvIGEgcm91dGUuCiAgICAgICAgICoKICAgICAgICAgKiBVbmxpa2UgXEBhbmd1bGFyL3JvdXRlcidzIGByb3V0ZXJMaW5rYCwgdGhlIHBhdGggaXMgbWFkZSBzdXJlIHRvIGVuZCAgd2l0aAogICAgICAgICAqICIvIi4KICAgICAgICAgKiBlLmcuLCA8YSBbcm91dGVyTGlua109IlsnZm9vJywgc29tZVBhcmFtV2l0aFZhbHVlRm9yQmFyXSI+IC0+ICdmb28vYmFyLycuCiAgICAgICAgICogQHBhcmFtIHs/fSBwYXRoUGFydHMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCByb3V0ZXJMaW5rKHBhdGhQYXJ0cykgewogICAgICAgICAgICBpZiAodHlwZW9mIHBhdGhQYXJ0cyA9PT0gJ3N0cmluZycpIHsKICAgICAgICAgICAgICAgIHBhdGhQYXJ0cyA9IFtwYXRoUGFydHNdOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChwYXRoUGFydHMubGVuZ3RoID09PSAwKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgUmFuZ2VFcnJvcigncm91dGVMaW5rIHNob3VsZCBoYXZlIHByb3BlciBwYXRoLiBHb3Qgbm90aGluZy4nKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBBcHBlbmQgIi8iIHN1ZmZpeC4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwYXRobmFtZSA9IFsuLi5wYXRoUGFydHNdLmpvaW4oJy8nKTsKICAgICAgICAgICAgdGhpcy5wYXRobmFtZSA9IHBhdGhuYW1lLmVuZHNXaXRoKCcvJykgPyBwYXRobmFtZSA6IHBhdGhuYW1lICsgJy8nOwogICAgICAgIH0KICAgIH0KICAgIFJvdXRlckxpbmtEaXJlY3RpdmVDb250YWluZXIuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IERpcmVjdGl2ZSwgYXJnczogW3sgc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IdHRwRXJyb3JSZXNwb25zZSkgewogICAgICAgICAgICBpZiAoZS5zdGF0dXMgPT09IDQwNCkgewogICAgICAgICAgICAgICAgc3RhdHVzID0gUGx1Z2luc0xpc3RGYWlsdXJlQ29kZS5OT1RfRk9VTkQ7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIHRocm93RXJyb3IobmV3IFRCU2VydmVyRXJyb3Ioc3RhdHVzKSk7CiAgICB9CiAgICBjbGFzcyBUQlNlcnZlckVycm9yIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGZhaWx1cmVDb2RlCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoZmFpbHVyZUNvZGUpIHsKICAgICAgICAgICAgdGhpcy5mYWlsdXJlQ29kZSA9IGZhaWx1cmVDb2RlOwogICAgICAgIH0KICAgIH0KICAgIGNsYXNzIFRCU2VydmVyRGF0YVNvdXJjZSB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBodHRwCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoaHR0cCkgewogICAgICAgICAgICB0aGlzLmh0dHAgPSBodHRwOwogICAgICAgICAgICAvLyBUT0RPKHNvZXJnZWwpOiBpbXBsZW1lbnRzIFdlYmFwcERhdGFTb3VyY2UKICAgICAgICAgICAgdGhpcy50ZkJhY2tlbmQgPSAoKC8qKiBAdHlwZSB7P30gKi8gKGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ3RmLWJhY2tlbmQnKSkpKS50Zl9iYWNrZW5kOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVuYWJsZWRFeHBlcmltZW50UGx1Z2luSWRzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmZXRjaFBsdWdpbnNMaXN0aW5nKGVuYWJsZWRFeHBlcmltZW50UGx1Z2luSWRzKSB7CiAgICAgICAgICAgIC8qKiBA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jZQogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKGFjdGlvbnMkLCBzdG9yZSwgd2ViYXBwRGF0YVNvdXJjZSkgewogICAgICAgICAgICB0aGlzLmFjdGlvbnMkID0gYWN0aW9ucyQ7CiAgICAgICAgICAgIHRoaXMuc3RvcmUgPSBzdG9yZTsKICAgICAgICAgICAgdGhpcy53ZWJhcHBEYXRhU291cmNlID0gd2ViYXBwRGF0YVNvdXJjZTsKICAgICAgICAgICAgLy8gTmdyeCBhc3N1bWVzIGFsbCBFZmZlY3QgY2xhc3NlcyBoYXZlIHByb3BlcnRpZXMgdGhhdCBpbmhlcml0IGZyb20gdGhlIGJhc2UKICAgICAgICAgICAgLy8gSlMgT2JqZWN0LiBgdGZfYmFja2VuZGAgZG9lcyBub3QsIHNvIHdlIHdyYXAgaXQuCiAgICAgICAgICAgIHRoaXMudGZCYWNrZW5kID0gewogICAgICAgICAgICAgICAgcmVmOiAoKC8qKiBAdHlwZSB7P30gKi8gKGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ3RmLWJhY2tlbmQnKSkpKS50Zl9iYWNrZW5kLAogICAgICAgICAgICB9OwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICAgKiBSZXF1aXJlcyB0byBiZSBleHBvcnRlZCBmb3IgSlNDb21waWxlci4gSlNDb21waWxlciwgb3RoZXJ3aXNlLAogICAgICAgICAgICAgICAqIHRoaW5rIGl0IGlzIHVudXNlZCBwcm9wZXJ0eSBhbmQgZGVhZGNvZGUgZWxpbWluYXRlIGF3YXkuCiAgICAgICAgICAgICAgICovCiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBAZXhwb3J0CiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmZldGNoV2ViQXBwRGF0YSQgPSBjcmVhdGVFZmZlY3QoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gdGhpcy5hY3Rpb25zJC5waXBlKG9mVHlwZShjb3JlTG9hZGVkLCByZWxvYWQsIG1hbnVhbFJlbG9hZCksIHdpdGhMYXRlc3RGcm9tKHRoaXMuc3RvcmUuc2VsZWN0KGdldFBsdWdpbnNMaXN0TG9hZGVkKSwgdGhpcy5zdG9yZS5zZWxlY3QoZ2V0RW5hYmxlZEV4cGVyaW1lbnRhbFBsdWdpbnMpKSwgZmlsdGVyKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChbLCB7IHN0YXRlIH1dKSA9PiBzdGF0ZSAhPT0gRGF0YUxvYWRTdGF0ZS5MT0FESU5HKSksIHRhcCgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB0aGlzLnN0b3JlLmRpc3BhdGNoKHBsdWdpbnNMaXN0aW5nUmVxdWVzdGVkKCkpKSksIG1lcmdlTWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChbLCAsIGVuYWJsZWRFeHBlcmltZW50YWxQbHVnaW5zXSkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIHppcCh0aGlzLndlYmFwcERhdGFTb3VyY2UuZmV0Y2hQbHVnaW5zTGlzdGluZyhlbmFibGVkRXhwZXJpbWVudGFsUGx1Z2lucyksIHRoaXMuZmV0Y2hFbnZpcm9ubWVudCgpLCB0aGlzLnJlZnJlc2hQb2x5bWVyUnVucygpKS5waXBlKG1hcCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKFtwbHVnaW5zXSkgPT4gewogICAgICAgICAgICAgICAgICAgIHRoaXMuc3RvcmUuZGlzcGF0Y2gocGx1Z2luc0xpc3RpbmdMb2FkZWQoeyBwbHVnaW5zIH0pKTsKICAgICAgICAgICAgICAgIH0pKSwgY2F0Y2hFcnJvcigoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGUKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChlKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgaWYgKGUgaW5zdGFuY2VvZiBUQlNlcnZlckVycm9yKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc3RvcmUuZGlzcGF0Y2gocGx1Z2luc0xpc3RpbmdGYWlsZWQoeyBmYWlsdXJlQ29kZTogZS5mYWlsdXJlQ29kZSB9KSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKHBsdWdpbnNMaXN0aW5nRmFpbGVkKHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZhaWx1cmVDb2RlOiBQbHVnaW5zTGlzdEZhaWx1cmVDb2RlLlVOS05PV04sCiAgICAgICAgICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEVNUFRZOwogICAgICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgfSkpKSksIHsgZGlzcGF0Y2g6IGZhbHNlIH0pOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogSEFDSzogQ09NUE9TSVRFIEFDVElPTiAtLSBGaXJlIGBjaGFuZ2VQbHVnaW5gIG9uIGZpcnN0IHRydXRoeSB2YWx1ZSBvZgogICAgICAgICAgICAgKiBhY3RpdmVQbHVnaW4gb24gY29yZUxvYWRlZCBvciBwbHVnaW5zTGlzdGluZ0xvYWRlZC4KIC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ICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChbLCBhY3RpdmVQbHVnaW5dKSA9PiBhY3RpdmVQbHVnaW4pKSwgZGlzdGluY3RVbnRpbENoYW5nZWQoKSwgZmlsdGVyKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gYWN0aXZlUGx1Z2luCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoYWN0aXZlUGx1Z2luKSA9PiBhY3RpdmVQbHVnaW4gIT09IG51bGwpKSwgdGFrZSgxKSwgdGFwKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcGx1Z2luCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAocGx1Z2luKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChjaGFuZ2VQbHVnaW4oeyBwbHVnaW46ICgvKiogQHR5cGUgez99ICovIChwbHVnaW4pKSB9KSk7CiAgICAgICAgICAgICAgICB9KSkpOwogICAgICAgICAgICB9KSwgeyBkaXNwYXRjaDogZmFsc2UgfSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEZvcmNlIGEgZGF0YSBsb2FkIGZvciB0aGUgUG9seW1lci1zcGVjaWZpYyBwb3J0aW9uIG9mIHRoZSBhcHAuIFRoaXMgbGVhZHMKICAgICAgICAgKiB0byBkdXBsaWNhdGUgcmVxdWVzdHMgYnV0IGhvcGVmdWxseSB0aGUgc3RhdGUgaXMgdGVtcG9yYXJ5IHVudGlsIHdlIG1pZ3JhdGUKICAgICAgICAgKiBldmVyeXRoaW5nIGZyb20gUG9seW1lciB0byBBbmd1bGFyLgogICAgICAgICAqCiAgICAgICAgICogVGhpcyBpcyBpbnRlbnRpb25hbGx5IGNhbGxlZCBpbiBjb3JlLyByYXRoZXIgdGhhbiBydW5zLyBzbyB0aGF0IFRCCiAgICAgICAgICogZW1iZWRkZXJzIG1heSB1c2UgcnVucyBvdXRzaWRlIG9mIHRoZSBjb3JlIGRhc2hib2FyZCBwYWdlLCB3aXRob3V0IHJlbHlpbmcKICAgICAgICAgKiBvbiB0aGUgUG9seW1lciBydW5zU3RvcmUuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlZnJlc2hQb2x5bWVyUnVucygpIHsKICAgICAgICAgICAgcmV0dXJuIGZyb20odGhpcy50ZkJhY2tlbmQucmVmLnJ1bnNTdG9yZS5yZWZyZXNoKCkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZmV0Y2hFbnZpcm9ubWVudCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMud2ViYXBwRGF0YVNvdXJjZS5mZXRjaEVudmlyb25tZW50KCkucGlwZSh0YXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGVudmlyb25tZW50CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoZW52aXJvbm1lbnQpID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuc3RvcmUuZGlzcGF0Y2goZW52aXJvbm1lbnRMb2FkZWQoeyBlbnZpcm9ubWVudCB9KSk7CiAgICAgICAgICAgIH0pKSk7CiAgICAgICAgfQogICAgfQogICAgQ29yZUVmZmVjdHMuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IEluamVjdGFibGUgfSwKICAgIF07CiAgICAvKiogQG5vY29sbGFwc2UgKi8KICAgIENvcmVFZmZlY3RzLmN0b3JQYXJhbWV0ZXJzID0gKCkgPT4gWwogICAgICAgIHsgdHlwZTogQWN0aW9ucyB9LAogICAgICAgIHsgdHlwZTogU3Rvc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CiAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgaW5pdGlhbFN0YXRlOiAoLyoqIEB0eXBlIHs/fSAqLyAoT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LCBpbml0aWFsU3RhdGUpLCB7IGFjdGl2ZVBsdWdpbjogZGVlcExpbmtlci5nZXRQbHVnaW5JZCgpIHx8IG51bGwgfSkpKSwKICAgICAgICB9OwogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogdGVuc29yYm9hcmQvd2ViYXBwL2NvcmUvY29yZV9tb2R1bGUudHMKICAgICAqIEBzdXBwcmVzcyB7Y2hlY2tUeXBlcyxjb25zdGFudFByb3BlcnR5LGV4dHJhUmVxdWlyZSxtaXNzaW5nT3ZlcnJpZGUsbWlzc2luZ1JldHVybix1bnVzZWRQcml2YXRlTWVtYmVycyx1c2VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgY2xhc3MgQ29yZU1vZHVsZSB7CiAgICB9CiAgICBDb3JlTW9kdWxlLmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBOZ01vZHVsZSwgYXJnczogW3sKICAgICAgICAgICAgICAgICAgICBpbXBvcnRzOiBbCiAgICAgICAgICAgICAgICAgICAgICAgIEVmZmVjdHNNb2R1bGUuZm9yRmVhdHVyZShbQ29yZUVmZmVjdHNdKSwKICAgICAgICAgICAgICAgICAgICAgICAgU3RvcmVNb2R1bGUuZm9yRmVhdHVyZShDT1JFX0ZFQVRVUkVfS0VZLCByZWR1Y2VycywgQ09SRV9TVE9SRV9DT05GSUdfVE9LRU4pLAogICAgICAgICAgICAgICAgICAgICAgICBUQlNlcnZlckRhdGFTb3VyY2VNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgICAgICBwcm92aWRlcnM6IFsKICAgICAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvdmlkZTogQ09SRV9TVE9SRV9DT05GSUdfVE9LRU4sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXBzOiBbSGFzaERlZXBMaW5rZXJdLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgdXNlRmFjdG9yeTogZ2V0Q29uZmlnLAogICAgICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICB9LF0gfSwKICAgIF07CiAgICAvKiogQG5vY29sbGFwc2UgKi8gQ29yZU1vZHVsZS7JtW1vZCA9IMm1ybVkZWZpbmVOZ01vZHVsZSh7IHR5cGU6IENvcmVNb2R1bGUgfSk7CiAgICAvKiogQG5vY29sbGFwc2UgKi8gQ29yZU1vZHVsZS7JtWluaiA9IMm1ybVkZWZpbmVJbmplY3Rvcih7IGZhY3Rvcnk6IGZ1bmN0aW9uIENvcmVNb2R1bGVfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgQ29yZU1vZHVsZSkoKTsgfSwgcHJvdmlkZXJzOiBbCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgIHByb3ZpZGU6IENPUkVfU1RPUkVfQ09ORklHX1RPS0VOLAogICAgICAgICAgICAgICAgZGVwczogW0hhc2hEZWVwTGlua2VyXSwKICAgICAgICAgICAgICAgIHVzZUZhY3Rvcnk6IGdldENvbmZpZywKICAgICAgICAgICAgfSwKICAgICAgICBdLCBpbXBvcnRzOiBbWwogICAgICAgICAgICAgICAgRWZmZWN0c01vZHVsZS5mb3JGZWF0dXJlKFtDb3JlRWZmZWN0c10pLAogICAgICAgICAgICAgICAgU3RvcmVNb2R1bGUuZm9yRmVhdHVyZShDT1JFX0ZFQVRVUkVfS0VZLCByZWR1Y2VycywgQ09SRV9TVE9SRV9DT05GSUdfVE9LRU4pLAogICAgICAgICAgICAgICAgVEJTZXJ2ZXJEYXRhU291cmNlTW9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gYW5kCiAgICBsaW1pdGF0aW9ucyB1bmRlciB0aGUgTGljZW5zZS4KICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCiAgICBjb25zdCBkZWZhdWx0RXhwZXJpbWVudCA9IHsKICAgICAgICBpZDogREVGQVVMVF9FWFBFUklNRU5UX0lELAogICAgICAgIG5hbWU6ICdEZWZhdWx0IGV4cGVyaW1lbnQnLAogICAgICAgIHN0YXJ0X3RpbWU6IDAsCiAgICB9OwogICAgY29uc3QgaW5pdGlhbERhdGFTdGF0ZSA9IHsKICAgICAgICBleHBlcmltZW50TWFwOiB7IFtkZWZhdWx0RXhwZXJpbWVudC5pZF06IGRlZmF1bHRFeHBlcmltZW50IH0sCiAgICB9OwogICAgY29uc3QgZGF0YVJlZHVjZXIgPSBjcmVhdGVSZWR1Y2VyKGluaXRpYWxEYXRhU3RhdGUpOwogICAgZnVuY3Rpb24gcmVkdWNlcnMkMihzdGF0ZSwgYWN0aW9uKSB7CiAgICAgICAgcmV0dXJuIGNvbWJpbmVSZWR1Y2Vycyh7IGRhdGE6IGRhdGFSZWR1Y2VyIH0pKHN0YXRlLCBhY3Rpb24pOwogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogdGVuc29yYm9hcmQvd2ViYXBwL2V4cGVyaW1lbnRzL2V4cGVyaW1lbnRzX21vZHVsZS50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICBjbGFzcyBFeHBlcmltZW50c01vZHVsZSB7CiAgICB9Ci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dlOiAiS2V5cyBmYWlsZWQgdG8gZmV0Y2guIn0sCiAgICAgKiAgICAgICB9LAogICAgICogICAgICAgewogICAgICogICAgICAgICBhY3Rpb246IGdyZWVuQnV0dG9uQ2xpY2tlZCwKICAgICAqICAgICAgICAgYWxlcnRGcm9tQWN0aW9uOiAoYWN0aW9uUGF5bG9hZCkgPT4gewogICAgICogICAgICAgICAgIGlmICghYWN0aW9uUGF5bG9hZC53YXNCdXR0b25FbmFibGVkKSB7CiAgICAgKiAgICAgICAgICAgICByZXR1cm4ge2xvY2FsaXplZE1lc3NhZ2U6ICJHcmVlbiBidXR0b24gZmFpbGVkLiJ9OwogICAgICogICAgICAgICAgIH0KICAgICAqICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAqICAgICAgICAgfQogICAgICogICAgICAgfQogICAgICogICAgIF0pLAogICAgICogICBdLAogICAgICogfSkKICAgICAqLwogICAgY2xhc3MgQWxlcnRBY3Rpb25Nb2R1bGUgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gcHJvdmlkZXJzCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IocHJvdmlkZXJzKSB7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBNYXAgZnJvbSBhY3Rpb24gY3JlYXRvciB0eXBlIHRvIHRyYW5zZm9ybWVyIGZ1bmN0aW9uLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5wcm92aWRlcnMgPSBuZXcgTWFwKCk7CiAgICAgICAgICAgIGZvciAoY29uc3QgY29uZmlncyBvZiBwcm92aWRlcnMgfHwgW10pIHsKICAgICAgICAgICAgICAgIGZvciAoY29uc3QgY29uZmlnIG9mIGNvbmZpZ3MpIHsKICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5wcm92aWRlcnMuaGFzKGNvbmZpZy5hY3Rpb25DcmVhdG9yLnR5cGUpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBSYW5nZUVycm9yKGAiJHtjb25maWcuYWN0aW9uQ3JlYXRvci50eXBlfSIgaXMgYWxyZWFkeSByZWdpc3RlcmVkIGZvciBhbGVydHMuYCArCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnIE11bHRpcGxlIGFsZXJ0cyBmb3IgdGhlIHNhbWUgYWN0aW9uIGlzIG5vdCBhbGxvd2VkLicpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB0aGlzLnByb3ZpZGVycy5zZXQoY29uZmlnLmFjdGlvbkNyZWF0b3IudHlwZSwgY29uZmlnLmFsZXJ0RnJvbUFjdGlvbik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBhY3Rpb24KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldEFsZXJ0RnJvbUFjdGlvbihhY3Rpb24pIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBsYW1iZGEgPSB0aGlzLnByb3ZpZGVycy5nZXQoYWN0aW9uLnR5cGUpOwogICAgICAgICAgICBpZiAoIWxhbWJkYSkgewogICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIGxhbWJkYShhY3Rpb24pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHByb3ZpZGVyRmFjdG9yeQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc3RhdGljIHJlZ2lzdGVyQWxlcnRBY3Rpb25zKHByb3ZpZGVyRmFjdG9yeSkgewogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgbmdNb2R1bGU6IEFsZXJ0QWN0aW9uTW9kdWxlLAogICAgICAgICAgICAgICAgcHJvdmlkZXJzOiBbCiAgICAgICAgICA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ogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogdGVuc29yYm9hcmQvd2ViYXBwL2FsZXJ0L2VmZmVjdHMvaW5kZXgudHMKICAgICAqIEBzdXBwcmVzcyB7Y2hlY2tUeXBlcyxjb25zdGFudFByb3BlcnR5LGV4dHJhUmVxdWlyZSxtaXNzaW5nT3ZlcnJpZGUsbWlzc2luZ1JldHVybix1bnVzZWRQcml2YXRlTWVtYmVycyx1c2VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgY2xhc3MgQWxlcnRFZmZlY3RzIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGFjdGlvbnMkCiAgICAgICAgICogQHBhcmFtIHs/fSBzdG9yZQogICAgICAgICAqIEBwYXJhbSB7P30gYWxlcnRBY3Rpb25Nb2R1bGUKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihhY3Rpb25zJCwgc3RvcmUsIGFsZXJ0QWN0aW9uTW9kdWxlKSB7CiAgICAgICAgICAgIHRoaXMuYWN0aW9ucyQgPSBhY3Rpb25zJDsKICAgICAgICAgICAgdGhpcy5zdG9yZSA9IHN0b3JlOwogICAgICAgICAgICB0aGlzLmFsZXJ0QWN0aW9uTW9kdWxlID0gYWxlcnRBY3Rpb25Nb2R1bGU7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBAZXhwb3J0CiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLnJlcG9ydFJlZ2lzdGVyZWRBY3Rpb25BbGVydHMkID0gY3JlYXRlRWZmZWN0KCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmFjdGlvbnMkLnBpcGUodGFwKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gYWN0a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Mi4wICh0aGUgIkxpY2Vuc2UiKTsKICAgIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4KICAgIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdAoKICAgICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjAKCiAgICBVbmxlc3MgcmVxdWlyZWQgYnkgYXBwbGljYWJsZSBsYXcgb3IgYWdyZWVkIHRvIGluIHdyaXRpbmcsIHNvZnR3YXJlCiAgICBkaXN0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiAiQVMgSVMiIEJBU0lTLAogICAgV0lUSE9VVCBXQVJSQU5USUVTIE9SIENPTkRJVElPTlMgT0YgQU5ZIEtJTkQsIGVpdGhlciBleHByZXNzIG9yIGltcGxpZWQuCiAgICBTZWUgdGhlIExpY2Vuc2UgZm9yIHRoZSBzcGVjaWZpYyBsYW5ndWFnZSBnb3Zlcm5pbmcgcGVybWlzc2lvbnMgYW5kCiAgICBsaW1pdGF0aW9ucyB1bmRlciB0aGUgTGljZW5zZS4KICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCiAgICBjbGFzcyBUQkZlYXR1cmVGbGFnTW9kdWxlIHsKICAgIH0KICAgIFRCRmVhdHVyZUZsYWdNb2R1bGUuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IE5nTW9kdWxlLCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIHByb3ZpZGVyczogWwogICAgICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm92aWRlOiBUQkZlYXR1cmVGbGFnRGF0YVNvdXJjZSwKICAgICAgICAgICAgICA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VyY2U7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBAZXhwb3J0CiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmdldEZlYXR1cmVGbGFncyQgPSBjcmVhdGVFZmZlY3QoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gdGhpcy5hY3Rpb25zJC5waXBlKG9mVHlwZShlZmZlY3RzSW5pdGlhbGl6ZWQpLCBtYXAoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZmVhdHVyZXMgPSB0aGlzLmRhdGFTb3VyY2UuZ2V0RmVhdHVyZXMoKTsKICAgICAgICAgICAgICAgIHJldHVybiBmZWF0dXJlc0xvYWRlZCh7IGZlYXR1cmVzIH0pOwogICAgICAgICAgICB9KSkpKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBleHBvcnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5ncnhPbkluaXRFZmZlY3RzKCkgewogICAgICAgICAgICByZXR1cm4gZWZmZWN0c0luaXRpYWxpemVkKCk7CiAgICAgICAgfQogICAgfQogICAgRmVhdHVyZUZsYWdFZmZlY3RzLmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBJbmplY3RhYmxlIH0sCiAgICBdOwogICAgLyoqIEBub2NvbGxhcHNlICovCiAgICBGZWF0dXJlRmxhZ0VmZmVjdHMuY3RvclBhcmFtZXRlcnMgPSAoKSA9PiBbCiAgICAgICAgeyB0eXBlOiBBY3Rpb25zIH0sCiAgICAgICAgeyB0eXBlOiBUQkZlYXR1cmVGbGFnRGF0YVNvdXJjZSB9CiAgICBdOwogICAgLyoqIEBub2NvbG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0aW5ncy9zZXR0aW5nc19tb2R1bGUudHMKICAgICAqIEBzdXBwcmVzcyB7Y2hlY2tUeXBlcyxjb25zdGFudFByb3BlcnR5LGV4dHJhUmVxdWlyZSxtaXNzaW5nT3ZlcnJpZGUsbWlzc2luZ1JldHVybix1bnVzZWRQcml2YXRlTWVtYmVycyx1c2VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgY2xhc3MgU2V0dGluZ3NNb2R1bGUgewogICAgfQogICAgU2V0dGluZ3NNb2R1bGUuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IE5nTW9kdWxlLCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIGRlY2xhcmF0aW9uczogWwogICAgICAgICAgICAgICAgICAgICAgICBTZXR0aW5nc0J1dHRvbkNvbXBvbmVudCwKICAgICAgICAgICAgICAgICAgICAgICAgU2V0dGluZ3NEaWFsb2dDb21wb25lbnQsCiAgICAgICAgICAgICAgICAgICAgICAgIFNldHRpbmdzUG9seW1lckludGVyb3BDb250YWluZXIsCiAgICAgICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgICAgICBleHBvcnRzOiBbU2V0dGluZ3NCdXR0b25Db21wb25lbnQsIFNldHRpbmdzUG9seW1lckludGVyb3BDb250YWluZXJdLAogICAgICAgICAgICAgICAgICAgIGVudHJ5Q29tcG9uZW50czogW1NldHRpbmdzRGlhbG9nQ29tcG9uZW50XSwKICAgICAgICAgICAgICAgICAgICBpbXBvcnRzOiBbCiAgICAgICAgICAgICAgICAgICAgICAgIENvbW1vbk1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgRm9ybXNNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIFJlYWN0aXZlRm9ybXNNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIE1hdEJ1dHRvbk1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgTWF0Q2hlY2tib3hNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIE1hdERpYWxvZ01vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgTWF0SWNvbk1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgTWF0SW5wdXRNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgIH0sXSB9LAogICAgXTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLyBTZXR0aW5nc01vZHVsZS7JtW1vZCA9IMm1ybVkZWZpbmVOZ01vZHVsZSh7IHR5cGU6IFNldHRpbmdzTW9kdWxlIH0pOwogICAgLyoqIEBub2NvbGxhcHNlICovIFNldHRpbmdzTW9kdWxlLsm1aW5qID0gybXJtWRlZmluZUluamVjdG9yKHsgZmFjdG9yeTogZnVuY3Rpb24gU2V0dGluZ3NNb2R1bGVfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgU2V0dGluZ3NNb2R1bGUpKCk7IH0sIGltcG9ydHM6IFtbCiAgICAgICAgICAgICAgICBDb21tb25Nb2R1bGUsCiAgICAgICAgICAgICAgICBGb3Jtc01vZHVsZSwKICAgICAgICAgICAgICAgIFJlYWN0aXZlRm9ybXNNb2R1bGUsCiAgICAgICAgICAgICAgICBNYXRCdXR0b25Nb2R1bGUsCiAgICAgICAgICAgICAgICBNYXRDaGVja2JveE1vZHVsZSwKICAgICAgICAgICAgICAgIE1hdERpYWxvZ01vZHVsZSwKICAgICAgICAgICAgICAgIE1hdEljb25Nb2R1bGUsCiAgICAgICAgICAgICAgICBNYXRJbnB1dE1vZHVsZSwKICAgICAgICAgICAgXV0gfSk7CiAgICAoZnVuY3Rpb24gKCkgeyAodHlwZW9mIG5nSml0TW9kZSA9PT0gInVuZGVmaW5lZCIgfHwgbmdKaXRNb2RlKSAmJiDJtcm1c2V0TmdNb2R1bGVTY29wZShTZXR0aW5nc01vZHVsZSwgeyBkZWNsYXJhdGlvbnM6IFtTZXR0aW5nc0J1dHRvbkNvbXBvbmVudCwK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RvbkNvbXBvbmVudCwKICAgICAgICAgICAgICAgICAgICAgICAgVGJkZXZVcGxvYWREaWFsb2dDb21wb25lbnQsCiAgICAgICAgICAgICAgICAgICAgICAgIFRiZGV2VXBsb2FkRGlhbG9nQ29udGFpbmVyLAogICAgICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICAgICAgZXhwb3J0czogW1RiZGV2VXBsb2FkQnV0dG9uQ29tcG9uZW50XSwKICAgICAgICAgICAgICAgICAgICBlbnRyeUNvbXBvbmVudHM6IFtUYmRldlVwbG9hZERpYWxvZ0NvbnRhaW5lcl0sCiAgICAgICAgICAgICAgICAgICAgaW1wb3J0czogWwogICAgICAgICAgICAgICAgICAgICAgICBDbGlwYm9hcmRNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIENvbW1vbk1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgTWF0QnV0dG9uTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBNYXREaWFsb2dNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIE1hdEljb25Nb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgICAgICBwcm92aWRlcnM6IFt7IHByb3ZpZGU6ICd3aW5kb3cnLCB1c2VWYWx1ZTogd2luZG93IH1dLAogICAgICAgICAgICAgICAgfSxdIH0sCiAgICBdOwogICAgLyoqIEBub2NvbGxhcHNlICovIFRiZGV2VXBsb2FkTW9kdWxlLsm1bW9kID0gybXJtWRlZmluZU5nTW9kdWxlKHsgdHlwZTogVGJkZXZVcGxvYWRNb2R1bGUgfSk7CiAgICAvKiogQG5vY29sbGFwc2UgKi8gVGJkZXZVcGxvYWRNb2R1bGUuybVpbmogPSDJtcm1ZGVmaW5lSW5qZWN0b3IoeyBmYWN0b3J5OiBmdW5jdGlvbiBUYmRldlVwbG9hZE1vZHVsZV9GYWN0b3J5KHQpIHsgcmV0dXJuIG5ldyAodCB8fCBUYmRldlVwbG9hZ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0eSxleHRyYVJlcXVpcmUsbWlzc2luZ092ZXJyaWRlLG1pc3NpbmdSZXR1cm4sdW51c2VkUHJpdmF0ZU1lbWJlcnMsdXNlbGVzc0NvZGV9IGNoZWNrZWQgYnkgdHNjCiAgICAgKi8KICAgIGNsYXNzIEhlYWRlck1vZHVsZSB7CiAgICB9CiAgICBIZWFkZXJNb2R1bGUuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IE5nTW9kdWxlLCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIGRlY2xhcmF0aW9uczogWwogICAgICAgICAgICAgICAgICAgICAgICBIZWFkZXJDb21wb25lbnQsCiAgICAgICAgICAgICAgICAgICAgICAgIFBsdWdpblNlbGVjdG9yQ29tcG9uZW50LAogICAgICAgICAgICAgICAgICAgICAgICBQbHVnaW5TZWxlY3RvckNvbnRhaW5lciwKICAgICAgICAgICAgICAgICAgICAgICAgUmVsb2FkQ29udGFpbmVyLAogICAgICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICAgICAgZXhwb3J0czogW0hlYWRlckNvbXBvbmVudCwgUGx1Z2luU2VsZWN0b3JDb250YWluZXIsIFJlbG9hZENvbnRhaW5lcl0sCiAgICAgICAgICAgICAgICAgICAgcHJvdmlkZXJzOiBbXSwKICAgICAgICAgICAgICAgICAgICBpbXBvcnRzOiBbCiAgICAgICAgICAgICAgICAgICAgICAgIE1hdEJ1dHRvbk1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgTWF0SWNvbk1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgTWF0VGFic01vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgTWF0VG9vbGJhck1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgTWF0U2VsZWN0TW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBDb21tb25Nb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIENvcmVNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIFNldHRpbmdzTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBUYmRldlVwbG9hZE1vZHVsZSwKICAgICAgICAgICAgICAgICAgICBdLAogICAgICAgICAgICAgICAgfSxdIH0sCiAgICBdOwogICAgLyoqIEBub2NvbGxhcHNlICovIEhlYWRlck1vZHVsZS7JtW1vZCA9IMm1ybVkZWZpbmVOZ01vZHVsZSh7IHR5cGU6IEhlYWRlck1vZHVsZSB9KTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLyBIZWFkZXJNb2R1bGUuybVpbmogPSDJtcm1ZGVmaW5lSW5qZWN0b3IoeyBmYWN0b3J5OiBmdW5jdGlvbiBIZWFkZXJNb2R1bGVfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgSGVhZGVyTW9kdWxlKSgpOyB9LCBwcm92aWRlcnM6IFtdLCBpbXBvcnRzOiBbWwogICAgICAgICAgICAgICAgTWF0QnV0dG9uTW9kdWxlLAogICAgICAgICAgICAgICAgTWF0SWNvbk1vZHVsZSwKICAgICAgICAgICAgICAgIE1hdFRhYnNNb2R1bGUsCiAgICAgICAgICAgICAgICBNYXRUb29sYmFyTW9kdWxlLAogICAgICAgICAgICAgICAgTWF0U2VsZWN0TW9kdWxlLAogICAgICAgICAgICAgICAgQ29tbW9uTW9kdWxlLAogICAgICAgICAgICAgICAgQ29yZU1vZHVsZSwKICAgICAgICAgICAgICAgIFNldHRpbmdzTW9kdWxlLAogICAgICAgICAgICAgICAgVGJkZXZVcGxvYWRNb2R1bGUsCiAgICAgICAgICAgIF1dIH0pOwogICAgKGZ1bmN0aW9uICgpIHsgKHR5cGVvZiBuZ0ppdE1vZGUgPT09ICJ1bmRlZmluZWQiIHx8IG5nSml0TW9kZSkgJiYgybXJtXNldE5nTW9kdWxlU2NvcGUoSGVhZGVyTW9kdWxlLCB7IGRlY2xhcmF0aW9uczogW0hlYWRlckNvbXBvbmVudCwKICAgICAgICAgICAgUGx1Z2luU2Vs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YXVzZXMgQW5ndWxhcidzIEFPVCBjb21waWxlciB0byB0aGluawogICAgLy8gdGhlcmUgaXMgYSBjaXJjdWxhciBkZXBlbmRlbmN5LgogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgUExVR0lOX0NPTkZJR19UT0tFTiA9IG5ldyBJbmplY3Rpb25Ub2tlbignW3BsdWdpbnNdIFBsdWdpbiByZWdpc3RyeSBjb25maWcnKTsKCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcgYWRkZWQgYnkgdHNpY2tsZQogICAgICogR2VuZXJhdGVkIGZyb206IHRlbnNvcmJvYXJkL3dlYmFwcC9wbHVnaW5zL3BsdWdpbl9yZWdpc3RyeV9tb2R1bGUudHMKICAgICAqIEBzdXBwcmVzcyB7Y2hlY2tUeXBlcyxjb25zdGFudFByb3BlcnR5LGV4dHJhUmVxdWlyZSxtaXNzaW5nT3ZlcnJpZGUsbWlzc2luZ1JldHVybix1bnVzZWRQcml2YXRlTWVtYmVycyx1c2VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgcGx1Z2luTmFtZVRvQ29tcG9uZW50ID0gbmV3IE1hcCgpOwogICAgY2xhc3MgUGx1Z2luUmVnaXN0cnlNb2R1bGUgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gY29uZmlncwogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKGNvbmZpZ3MpIHsKICAgICAgICAgICAgaWYgKCFjb25maWdzKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwbHVnaW5OYW1lcyA9IG5ldyBTZXQoY29uZmlncy5tYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGNvbmZpZwogICAgICAgICAgICAgKiBAcmV0dXJuIHs/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ICAgICAgICAqIH0pCiAgICAgICAgICogQHBhcmFtIHs/fSBwbHVnaW5OYW1lCiAgICAgICAgICogQHBhcmFtIHs/fSBjb21wb25lbnRDbGFzcwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc3RhdGljIGZvclBsdWdpbihwbHVnaW5OYW1lLCBjb21wb25lbnRDbGFzcykgewogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgbmdNb2R1bGU6IFBsdWdpblJlZ2lzdHJ5TW9kdWxlLAogICAgICAgICAgICAgICAgcHJvdmlkZXJzOiBbCiAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICBwcm92aWRlOiBQTFVHSU5fQ09ORklHX1RPS0VOLAogICAgICAgICAgICAgICAgICAgICAgICBtdWx0aTogdHJ1ZSwKICAgICAgICAgICAgICAgICAgICAgICAgdXNlVmFsdWU6IHsgcGx1Z2luTmFtZSwgY29tcG9uZW50Q2xhc3MgfSwKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgfTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBwbHVnaW5OYW1lCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXRDb21wb25lbnQocGx1Z2luTmFtZSkgewogICAgICAgICAgICByZXR1cm4gcGx1Z2luTmFtZVRvQ29tcG9uZW50LmdldChwbHVnaW5OYW1lKSB8fCBudWxsOwogICAgICAgIH0KICAgIH0KICAgIFBsdWdpblJlZ2lzdHJ5TW9kdWxlLmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBOZ01vZHVsZSwgYXJnczogW3t9LF0gfSwKICAgIF07CiAgICAvKiogQG5vY29sbGFwc2UgKi8KICAgIFBsdWdpblJlZ2lzdHJ5TW9kdWxlLmN0b3JQYXJhbWV0ZXJzID0gKCkgPT4gWwogICAgICAgIHsg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l2ZUtub3duUGx1Z2luICYmCiAgICAgICAgICAgICAgICAhdGhpcy5wbHVnaW5JbnN0YW5jZXMuaGFzKHRoaXMuYWN0aXZlS25vd25QbHVnaW4uaWQpKTsKICAgICAgICAgICAgaWYgKGNoYW5nZVsnYWN0aXZlS25vd25QbHVnaW4nXSAmJiB0aGlzLmFjdGl2ZUtub3duUGx1Z2luKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBwcmV2QWN0aXZlS25vd25QbHVnaW4gPSBjaGFuZ2VbJ2FjdGl2ZUtub3duUGx1Z2luJ10ucHJldmlvdXNWYWx1ZTsKICAgICAgICAgICAgICAgIGlmIChwcmV2QWN0aXZlS25vd25QbHVnaW4gJiYKICAgICAgICAgICAgICAgICAgICBwcmV2QWN0aXZlS25vd25QbHVnaW4uaWQgIT09IHRoaXMuYWN0aXZlS25vd25QbHVnaW4uaWQpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLmhpZGVQbHVnaW4ocHJldkFjdGl2ZUtub3duUGx1Z2luKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChzaG91bGRDcmVhdGVQbHVnaW4pIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgcGx1Z2luRWxlbWVudCA9IHRoaXMuY3JlYXRlUGx1Z2luKHRoaXMuYWN0aXZlS25vd25QbHVnaW4pOwogICAgICAgICAgICAgICAgICAgIGlmIChwbHVnaW5FbGVtZW50KSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luSW5zdGFuY2VzLnNldCh0aGlzLmFjdGl2ZUtub3duUGx1Z2luLmlkLCBwbHVnaW5FbGVtZW50KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLnNob3dQbHVnaW4odGhpcy5hY3RpdmVLbm93blBsdWdpbik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHRoaXMuYWN0aXZlS25vd25QbHVnaW4gJiYKICAgICAgICAgICAgICAgIChzaG91bGRDcmVhdGVQbHVnaW4gfHwgY2hhbmdlWydsYXN0VXBkYXRlZCddKSkgewogICAgICAgICAgICAgICAgdGhpcy5yZWxvYWQodGhpcy5hY3RpdmVLbm93blBsdWdpbiwgc2hvdWxkQ3JlYXRlUGx1Z2luKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gcGx1Z2luCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBoaWRlUGx1Z2luKHBsdWdpbikgewogICAgICAgICAgICAvLyBJbiBjYXNlIHRoZSBhY3RpdmUgcGx1Z2luIGRvZXMgbm90IGhhdmUgYSBET00sIGZvciBleGFtcGxlLCBjb3JlIHBsdWdpbiwgdGhlCiAgICAgICAgICAgIC8vIGluc3RhbmNlIGNhbiBiZSBmYWxzeS4KICAgICAgICAgICAgaWYgKCF0aGlzLnBsdWdpbkluc3RhbmNlcy5oYXMocGx1Z2luLmlkKSkKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBpbnN0YW5jZSA9ICgvKiogQHR5cGUgez99ICovICh0aGlzLnBsdWdpbkluc3RhbmNlcy5nZXQocGx1Z2luLmlkKSkpOwogICAgICAgICAgICBPYmplY3QuYXNzaWduKGluc3RhbmNlLnN0eWxlLCB7CiAgICAgICAgICAgICAgICBtYXhIZWlnaHQ6IDAsCiAgICAgICAgICAgICAgICBvdmVyZmxvdzogJ2hpZGRlbicsCiAgICAgICAgICAgICAgICAvKioKICAgICAgICAgICAgICAgICAqIFdlIGZ1cnRoZXIgbWFrZSBjb250YWluZXJzIGludmlzaWJsZS4gU29tZSBlbGVtZW50cyBtYXkgYW5jaG9yIHRvCiAgICAgICAgICAgICAgICAgKiB0aGUgdmlld3BvcnQgaW5zdGVhZCBvZiB0aGUgY29udGFpbmVyLCBpbiB3aGljaCBjYXNlIHNldHRpbmcgdGhlIG1heAogICAgICAgICAgICAgICAgICogaGVpZ2h0IGhlcmUgdG8gMCB3aWxsIG5vdCBoaWRlIHRoZW0uCiAgICAgICAgICAgICAgICAgKgogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICB2aXNpYmlsaXR5OiAnaGlkZGVuJywKICAgICAgICAgICAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLAogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHBsdWdpbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2hvd1BsdWdpbihwbHVnaW4pIHsKICAgICAgICAgICAgLy8gSW4gY2FzZSB0aGUgYWN0aXZlIHBsdWdpbiBkb2VzIG5vdCBoYXZlIGEgRE9NLCBmb3IgZXhhbXBsZSwgY29yZSBwbHVnaW4sIHRoZQogICAgICAgICAgICAvLyBpbnN0YW5jZSBjYW4gYmUgZmFsc3kuCiAgICAgICAgICAgIGlmICghdGhpcy5wbHVnaW5JbnN0YW5jZXMuaGFzKHBsdWdpbi5pZCkpCiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaW5zdGFuY2UgPSAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5wbHVnaW5JbnN0YW5jZXMuZ2V0KHBsdWdpbi5pZCkpKTsKICAgICAgICAgICAgT2JqZWN0LmFzc2lnbihpbnN0YW5jZS5zdHlsZSwgewogICAgICAgICAgICAgICAgbWF4SGVpZ2h0OiBudWxsLAogICAgICAgICAgICAgICAgb3ZlcmZsb3c6IG51bGwsCiAgICAgICAgICAgICAgICB2aXNpYmlsaXR5OiBudWxsLAogICAgICAgICAgICAgICAgcG9zaXRpb246IG51bGwsCiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gcGx1Z2luCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBjcmVhdGVQbHVnaW4ocGx1Z2luKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHBsdWdpbkVsZW1lbnQgPSBudWxsOwogICAgICAgICAgICBzd2l0Y2ggKHBsdWdpbi5sb2FkaW5nX21lY2hhbmlzbS50eXBlKSB7CiAgICAgICAgICAgICAgICBjYXNlIExvYWRpbmdNZWNoYW5pc21UeXBlLkNVU1RPTV9FTEVNRU5UOiB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGN1c3RvbUVsZW1lbnRQbHVnaW4gPSAoLyoqIEB0eXBlIHs/fSAqLyAocGx1Z2luLmxvYWRpbmdfbWVjaGFuaXNtKSk7CiAgICAgICAgICAgICAgICAgICAgcGx1Z2luRWxlbWVudCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoY3VzdG9tRWxlbWVudFBsdWdpbi5lbGVtZW50X25hbWUpOwogICAgICAgICAgICAgICAgICAgICgoLyoqIEB0eXBlIHs/fSAqLyAocGx1Z2luRWxlbWVudCkpKS5yZWxvYWRPblJlYWR5ID0gZmFsc2U7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW5zQ29udGFpbmVyLm5hdGl2ZUVsZW1lbnQuYXBwZW5kQ2hpbGQocGx1Z2luRWxlbWVudCk7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjYXNlIExvYWRpbmdNZWNoYW5pc21UeXBlLklGUkFNRTogewogICAgICAgICAgICAgICAgICAgIHBsdWdpbkVsZW1lbnQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdpZnJhbWUnKTsKICAgICAgICAgICAgICAgICAgICAvLyBJZGVhbGx5IHNob3VsZCB1c2UgdGhlIERPTVNhbml0aXplciBidXQgaXQgaXMgbm90IHVzYWJsZSBpbiBUeXBlU2NyaXB0LgogICAgICAgICAgICAgICAgICAgIHBsdWdpbkVsZW1lbnQuc2V0QXR0cmlidXRlKCdzcmMnLCBgZGF0YS9wbHVnaW5fZW50cnkuaHRtbD9uYW1lPSR7cGx1Z2luLmlkfWApOwogICAgICAgICAgICAgICAgICAgIHRoaXMuZXhwZXJpbWVudFBsdWdpbkhvc3RMaWIucmVnaXN0ZXJQbHVnaW5JZnJhbWUocGx1Z2luRWxlbWVudCwgcGx1Z2luLmlkKTsKICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbnNDb250YWluZXIubmF0aXZlRWxlbWVudC5hcHBlbmRDaGlsZChwbHVnaW5FbGVtZW50KTsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGNhc2UgTG9hZGluZ01lY2hhbmlzbVR5cGUuTkdfQ09NUE9ORU5UOgogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBuZ0NvbXBvbmVudENsYXNzID0gdGhpcy5wbHVnaW5SZWdpc3RyeS5nZXRDb21wb25lbnQocGx1Z2luLmlkKTsKICAgICAgICAgICAgICAgICAgICBpZiAobmdDb21wb25lbnRDbGFzcykgewogICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGNvbXBvbmVudEZhY3RvcnkgPSB0aGlzLmNvbXBvbmVudEZhY3RvcnlSZXNvbHZlci5yZXNvbHZlQ29tcG9uZW50RmFjdG9yeShuZ0NvbXBvbmVudENsYXNzKTsKICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBwbHVnaW5Db21wb25lbnQgPSB0aGlzLm5nUGx1Z2luQ29udGFpbmVyLmNyZWF0ZUNvbXBvbmVudChjb21wb25lbnRGYWN0b3J5KTsKICAgICAgICAgICAgICAgICAgICAgICAgcGx1Z2luRWxlbWVudCA9IHBsdWdpbkNvbXBvbmVudC5sb2NhdGlvbi5uYXRpdmVFbGVtZW50OwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihgTm8gcmVnaXN0ZXJlZCBBbmd1bGFyIGNvbXBvbmVudCBmb3IgcGx1Z2luOiAke3BsdWdpbi5pZH1gKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBjYXNlIExvYWRpbmdNZWNoYW5pc21UeXBlLk5PTkU6CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoJ1VuZXhwZWN0ZWQgcGx1Z2luJyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHBsdWdpbkVsZW1lbnQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBwbHVnaW4KICAgICAgICAgKiBAcGFyYW0gez99IGluaXRpYWxTdGFtcAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVsb2FkKHBsdWdpbiwgaW5pdGlhbFN0YW1wKSB7CiAgICAgICAgICAgIGlmICghaW5pdGlhbFN0YW1wICYmIHBsdWdpbi5kaXNhYmxlX3JlbG9hZCkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbWF5YmVEYXNoYm9hcmQgPSAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5wbHVnaW5JbnN0YW5jZXMuZ2V0KHBsdWdpbi5pZCkpKTsKICAgICAgICAgICAgaWYgKG1heWJlRGFzaGJvYXJkICYmIG1heWJlRGFzaGJvYXJkLnJlbG9hZCkgewogICAgICAgICAgICAgICAgbWF5YmVEYXNoYm9hcmQucmVsb2FkKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICBQbHVnaW5zQ29tcG9uZW50LmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBDb21wb25lbnQsIGFyZ3M6IFt7CiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3I6ICdwbHVnaW5zLWNvbXBvbmVudCcsCiAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGVVcmw6ICcuL3BsdWdpbnNfY29tcG9uZW50Lm5nLmh0bWwnLAogICAgICAgICAgICAgICAgICAgIHN0eWxlczogWwogICAgICAgICAgICAgICAgICAgICAgICBgCiAgICAgIDpob3N0IHsKICAgICAgICBkaXNwbGF5OiBibG9jazsKICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7CiAgICAgIH0KICAgICAgLnBsdWdpbnMgewogICAgICAgIGhlaWdodDogMTAwJTsKICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7CiAgICAgIH0KICAgICAgLndhcm5pbmcgewogICAgICAgIGJhY2tncm91bmQtY29sb3I6ICNmZmY7CiAgICAgICAgYm90dG9tOiAwOwogICAgICAgIGxlZnQ6IDA7CiAgICAgICAgcG9zaXRpb246IGFic29sdXRlOwogICAgICAgIHJpZ2h0OiAwOwogICAgICAgIHRvcDogMDsKICAgICAgfQogICAgICAud2FybmluZy1tZXNzYWdlIHsKICAgICAgICBtYXJnaW46IDgwcHggYXV0byAwOwogICAgICAgIG1heC13aWR0aDogNTQwcHg7CiAgICAgIH0KICAgICAgLmxhc3QtcmVsb2FkLXRpbWUgewogICAgICAgIGZvbnQtc3R5bGU6IGl0YWxpYzsKICAgICAgfQogICAgICAucGx1Z2lucyA6Om5nLWRlZXAgaWZyYW1lIHsKICAgICAgICBib3JkZXI6IDA7CiAgICAgICAgaGVpZ2h0OiAxMDAlOwogICAgICAgIHdpZHRoOiAxMDAlOwogICAgICB9CiAgICBgLAogICAgICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICAgICAgY2hhbmdlRGV0ZWN0aW9uOiBDaGFuZ2VEZXRlY3Rpb25TdHJhdGVneS5PblB1c2gsCiAgICAgICAgICAgICAgICB9LF0gfSwKICAgIF07CiAgICAvKiogQG5vY29sbGFwc2UgKi8KICAgIFBsdWdpbnNDb21wb25lbnQuY3RvclBhcmFtZXRlcnMgPSAoKSA9PiBbCiAgICAgICAgeyB0eXBlOiBDb21wb25lbnRGYWN0b3J5UmVzb2x2ZXIgfSwKICAgICAgICB7IHR5cGU6IFBsdWdpblJlZ2lzdHJ5TW9kdWxlIH0KICAgIF07CiAgICBQbHVnaW5zQ29tcG9uZW50LnByb3BEZWNvcmF0b3JzID0gewogICAgICAgIHBsdWdpbnNDb250YWluZXI6IFt7IHR5cGU6IFZpZXdDaGlsZCwgYXJnczogWydwbHVnaW5Db250YWluZXInLCB7IHN0YXRpYzogdHJ1ZSwgcmVhZDogRWxlbWVudFJlZiB9LF0gfV0sCiAgICAgICAgbmdQbHVnaW5Db250YWluZXI6IFt7IHR5cGU6IFZpZXdDaGlsZCwgYXJnczogWyduZ1BsdWdpbkNvbnRhaW5lcicsIHsgc3RhdGljOiB0cnVlLCByZWFkOiBWaWV3Q29udGFpbmVyUmVmIH0sXSB9XSwKICAgICAgICBh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kLCB0aGlzLmFjdGl2ZVBsdWdpbklkJCwgdGhpcy5zdG9yZS5zZWxlY3QoZ2V0UGx1Z2luc0xpc3RMb2FkZWQpKS5waXBlKG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoW2FjdGl2ZVBsdWdpbiwgYWN0aXZlUGx1Z2luSWQsIGxvYWRTdGF0ZV0pID0+IHsKICAgICAgICAgICAgICAgIGlmIChsb2FkU3RhdGUuZmFpbHVyZUNvZGUgIT09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICAvLyBEZXNwaXRlIGl0cyAnUGx1Z2lucyctc3BlY2lmaWMgbmFtZSwgZ2V0UGx1Z2luc0xpc3RMb2FkZWQgYWN0dWFsbHkKICAgICAgICAgICAgICAgICAgICAvLyBlbmNhcHN1bGF0ZXMgbXVsdGlwbGUgcmVxdWVzdHMgdG8gbG9hZCBkaWZmZXJlbnQgcGFydHMgb2YgdGhlCiAgICAgICAgICAgICAgICAgICAgLy8gZW52aXJvbm1lbnQuCiAgICAgICAgICAgICAgICAgICAgaWYgKGxvYWRTdGF0ZS5mYWlsdXJlQ29kZSA9PT0gUGx1Z2luc0xpc3RGYWlsdXJlQ29kZS5OT1RfRk9VTkQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFBsdWdpbkxvYWRTdGF0ZS5FTlZJUk9OTUVOVF9GQUlMVVJFX05PVF9GT1VORDsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBQbHVnaW5Mb2FkU3RhdGUuRU5WSVJPTk1FTlRfRkFJTFVSRV9VTktOT1dOOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChhY3RpdmVQbHVnaW4gIT09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gUGx1Z2luTG9hZFN0YXRlLkxPQURFRDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChsb2FkU3RhdGUubGFzdExvYWRlZFRpbWVJbk1zID09PSBudWxsICYmCiAgICAgICAgICAgICAgICAgICAgbG9hZFN0YXRlLnN0YXRlID09PSBEYXRhTG9hZFN0YXRlLkxPQURJTkcpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gUGx1Z2luTG9hZFN0YXRlLkxPQURJTkc7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAoYWN0aXZlUGx1Z2luSWQpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gUGx1Z2luTG9hZFN0YXRlLlVOS05PV05fUExVR0lOX0lEOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIFBsdWdpbkxvYWRTdGF0ZS5OT19FTkFCTEVEX1BMVUdJTlM7CiAgICAgICAgICAgIH0pKSk7CiAgICAgICAgICAgIHRoaXMubGFzdExvYWRlZFRpbWVJbk1zJCA9IHRoaXMuc3RvcmUuc2VsZWN0KGxhc3RMb2FkZWRUaW1lSW5Ncyk7CiAgICAgICAgICAgIHRoaXMuZGF0YUxvY2F0aW9uJCA9IHRoaXMuc3RvcmUuc2VsZWN0KGdldEVudmlyb25tZW50KS5waXBlKG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZW52CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoZW52KSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gZW52LmRhdGFfbG9jYXRpb247CiAgICAgICAgICAgIH0pKSk7CiAgICAgICAgfQogICAgfQogICAgUGx1Z2luc0NvbnRhaW5lci5kZWNvcmF0b3JzID0gWwogICAgICAgIHsgdHlwZTogQ29tcG9uZW50LCBhcmdzOiBbewogICAgICAgIC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uZXJhdGVkIGZyb206IHRlbnNvcmJvYXJkL3dlYmFwcC9yZWR1Y2VyX2NvbmZpZy50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvLyBjb25zb2xlLmxvZyBhbGwgYWN0aW9ucwogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IHJlZHVjZXIKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGxvZ2dlcihyZWR1Y2VyKSB7CiAgICAgICAgcmV0dXJuICgvKioKICAgICAgICAgKiBAcGFyYW0gez99IHN0YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBhY3Rpb24KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIChzdGF0ZSwgYWN0aW9uKSA9PiB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcmVzdWx0ID0gcmVkdWNlcihzdGF0ZSwgYWN0aW9uKTsKICAgICAgICAgICAgY29uc29sZS5ncm91cENvbGxhcHNlZChhY3Rpb24udHlwZSk7CiAgICAgICAgICAgIGNvbnNvbGUubG9nKCdwcmV2IHN0YXRlJywgc3RhdGUpOwogICAgICAgICAgICBjb25zb2xlLmxvZygnYWN0aW9uJywgYWN0aW9uKTsKICAgICAgICAgICAgY29uc29sZS5sb2coJ25leHQgc3RhdGUnLCByZXN1bHQpOwogICAgICAgICAgICBjb25zb2xlLmdyb3VwRW5kKCk7CiAgICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgfSk7CiAgICB9CiAgICAvKioKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGxvZ2dlck1ldGFSZWR1Y2VyRmFjdG9yeSgpIHsKICAgICAgICByZXR1cm4gIWlzRGV2TW9kZSgpCiAgICAgICAgICAgID8gKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHJlZHVjZXIKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChyZWR1Y2VyKSA9PiAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gc3RhdGUKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBhY3Rpb24KICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChzdGF0ZSwgYWN0aW9uKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gcmVkdWNlcihzdGF0ZSwgYWN0aW9uKTsKICAgICAgICAgICAgfSkpCiAgICAgICAgICAgIDogbG9nZ2VyOwogICAgfQogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgUk9PVF9SRURVQ0VSUyA9IG5ldyBJbmplY3Rpb25Ub2tlbignUm9vdCByZWR1Y2VycyB0b2tlbicsIHsKICAgICAgICBmYWN0b3J5OiAoLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAoKSA9PiAoe30pKSwKICAgIH0pOwoKICAgIC8qIENvcHlyaWdodCAyMDIwIFRoZSBUZW5zb3JGbG93IEF1dGhvcnMuIEFsbCBSaWdodHMgUmVzZXJ2ZWQuCgogICAgTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlICJMaWNlbnNlIik7CiAgICB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuCiAgICBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2UgYXQKCiAgICAgICAgaHR0cDovL3d3dy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JZH0vJHtydW59YDsKICAgIH0KICAgIGNsYXNzIFRCUnVuc0RhdGFTb3VyY2UgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gaHR0cAogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKGh0dHApIHsKICAgICAgICAgICAgdGhpcy5odHRwID0gaHR0cDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBleHBlcmltZW50SWQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZldGNoUnVucyhleHBlcmltZW50SWQpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuaHR0cC5nZXQoJ2RhdGEvcnVucycpLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBydW5zCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAocnVucykgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIHJ1bnMubWFwKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcnVuCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAocnVuKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IHJ1blRvUnVuSWQkMShydW4sIGV4cGVyaW1lbnRJZCksCiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IHJ1biwKICAgICAgICAgICAgICAgICAgICAgICAgLy8gVXNlIGEgZHVtbXkgc3RhcnRUaW1lIGZvciBub3csIHVudGlsIHRoZXJlIGlzIGJhY2tlbmQgc3VwcG9ydC4KICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnRUaW1lOiAwLAogICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0pKSk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bnNPblJ1blRhYmxlU2hvd24kID0gY3JlYXRlRWZmZWN0KCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHRoaXMuYWN0aW9ucyQucGlwZShvZlR5cGUocnVuVGFibGVTaG93biksIG1lcmdlTWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICh7IGV4cGVyaW1lbnRJZHMgfSkgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZXhwZXJpbWVudHNUb0ZldGNoJCA9IHRoaXMuZ2V0RXhwZXJpbWVudHNXaXRoTG9hZFN0YXRlKGV4cGVyaW1lbnRJZHMsICgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gc3RhdGUKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChzdGF0ZSkgPT4gewogICAgICAgICAgICAgICAgICAgIHJldHVybiAoc3RhdGUgPT09IERhdGFMb2FkU3RhdGUuRkFJTEVEIHx8CiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRlID09PSBEYXRhTG9hZFN0YXRlLk5PVF9MT0FERUQpOwogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgcmV0dXJuIGV4cGVyaW1lbnRzVG9GZXRjaCQucGlwZShmaWx0ZXIoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBleHBlcmltZW50SWRzCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoZXhwZXJpbWVudElkcykgPT4gISFleHBlcmltZW50SWRzLmxlbmd0aCkpLCBtZXJnZU1hcCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGV4cGVyaW1lbnRJZHNUb0JlRmV0Y2hlZAogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKGV4cGVyaW1lbnRJZHNUb0JlRmV0Y2hlZCkgPT4gewogICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmZldGNoQWxsUnVuc0xpc3QoZXhwZXJpbWVudElkcywgZXhwZXJpbWVudElkc1RvQmVGZXRjaGVkKTsKICAgICAgICAgICAgICAgIH0pKSk7CiAgICAgICAgICAgIH0pKSkpLCB7IGRpc3BhdGNoOiBmYWxzZSB9KTsKICAgICAgICAgICAgdGhpcy5leHBlcmltZW50c1dpdGhTdGFsZVJ1bnNPblJvdXRlQ2hhbmdlJCA9IHRoaXMuYWN0aW9ucyQucGlwZShvZlR5cGUobmF2aWdhdGVkKSwgd2l0aExhdGVzdEZyb20odGhpcy5zdG9yZS5zZWxlY3QoZ2V0Um91dGVJZCQxKSksIGRpc3RpbmN0VW50aWxDaGFuZ2VkKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzEKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChbLCBwcmV2Um91dGVJZF0sIFssIGN1cnJSb3V0ZUlkXSkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIHByZXZSb3V0ZUlkID09PSBjdXJyUm91dGVJZDsKICAgICAgICAgICAgfSkpLCB3aXRoTGF0ZXN0RnJvbSh0aGlzLnN0b3JlLnNlbGVjdChnZXRFeHBlcmltZW50SWRzRnJvbVJvdXRlKSksIGZpbHRlcigoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoWywgZXhwZXJpbWVudElkc10pID0+ICEhZXhwZXJpbWVudElkcykpLCBtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKFssIGV4cGVyaW1lbnRJZHNdKSA9PiAoLyoqIEB0eXBlIHs/fSAqLyAoZXhwZXJpbWVudElkcykpKSksIG1lcmdlTWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBleHBlcmltZW50SWRzCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoZXhwZXJpbWVudElkcykgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuZ2V0RXhwZXJpbWVudHNXaXRoTG9hZFN0YXRlKGV4cGVyaW1lbnRJZHMsICgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gc3RhdGUKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChzdGF0ZSkgPT4gewogICAgICAgICAgICAgICAgICAgIHJldHVybiAoc3RhdGUgPT09IERhdGFMb2FkU3RhdGUuRkFJTEVEIHx8IHN0YXRlID09PSBEYXRhTG9hZFN0YXRlLk5PVF9MT0FERUQpOwogICAgICAgICAgICAgICAgfSkpLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZXhwZXJpbWVudElkc1RvQmVGZXRjaGVkCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoZXhwZXJpbWVudElkc1RvQmVGZXRjaGVkKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHsgZXhwZXJpbWVudElkcywgZXhwZXJpbWVudElkc1RvQmVGZXRjaGVkIH07CiAgICAgICAgICAgICAgICB9KSkpOwogICAgICAgICAgICB9KSkpOwogICAgICAgICAgICB0aGlzLmV4cGVyaW1lbnRzV2l0aFN0YWxlUnVuc09uUmVsb2FkJCA9IHRoaXMuYWN0aW9ucyQucGlwZShvZlR5cGUocmVsb2FkLCBtYW51YWxSZWxvYWQpLCB3aXRoTGF0ZXN0RnJvbSh0aGlzLnN0b3JlLnNlbGVjdChnZXRFeHBlcmltZW50SWRzRnJvbVJvdXRlKSksIGZpbHRlcigoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoWywgZXhwZXJpbWVudElkc10pID0+ICEhZXhwZXJpbWVudElkcykpLCBtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKFssIGV4cGVyaW1lbnRJZHNdKSA9PiAoLyoqIEB0eXBlIHs/fSAqLyAoZXhwZXJpbWVudElkcykpKSksIG1lcmdlTWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBleHBlcmltZW50SWRzCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoZXhwZXJpbWVudElkcykgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuZ2V0RXhwZXJpbWVudHNXaXRoTG9hZFN0YXRlKGV4cGVyaW1lbnRJZHMsICgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gc3RhdGUKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChzdGF0ZSkgPT4gewogICAgICAgICAgICAgICAgICAgIHJldHVybiBzdGF0ZSAhPT0gRGF0YUxvYWRTdGF0ZS5MT0FESU5HOwogICAgICAgICAgICAgICAgfSkpLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZXhwZXJpbWVudElkc1RvQmVGZXRjaGVkCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoZXhwZXJpbWVudElkc1RvQmVGZXRjaGVkKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHsgZXhwZXJpbWVudElkcywgZXhwZXJpbWVudElkc1RvQmVGZXRjaGVkIH07CiAgICAgICAgICAgICAgICB9KSkpOwogICAgICAgICAgICB9KSkpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRmV0Y2hlcyBydW5zIG9uIG5hdmlnYXRpb24gb3IgaW4tYXBwIHJlbG9hZC4KICAgICAgICAgICAgICoKICAgICAgICAgICAgICogQGV4cG9ydAogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5sb2FkUnVuc09uTmF2aWdhdGlvbk9yUmVsb2FkJCA9IGNyZWF0ZUVmZmVjdCgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gbWVyZ2UodGhpcy5leHBlcmltZW50c1dpdGhTdGFsZVJ1bnNPblJvdXRlQ2hhbmdlJCwgdGhpcy5leHBlcmltZW50c1dpdGhTdGFsZVJ1bnNPblJlbG9hZCQpLnBpcGUobWVyZ2VNYXAoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICh7IGV4cGVyaW1lbnRJZHMsIGV4cGVyaW1lbnRJZHNUb0JlRmV0Y2hlZCB9KSA9PiB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuZmV0Y2hBbGxSdW5zTGlzdChleHBlcmltZW50SWRzLCBleHBlcmltZW50SWRzVG9CZUZldGNoZWQpOwogICAgICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgfSksIHsgZGlzcGF0Y2g6IGZhbHNlIH0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gZXhwZXJpbWVudElkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXRSdW5zTGlzdExvYWRTdGF0ZShleHBlcmltZW50SWQpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuc3RvcmUuc2VsZWN0KGdldFJ1bnNMb2FkU3RhdGUsIHsgZXhwZXJpbWVudElkIH0pLnBpcGUodGFrZSgxKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBleHBlcmltZW50SWRzCiAgICAgICAgICogQHBhcmFtIHs/fSBsb2FkU3RhdGVNYXRjaGVyCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXRFeHBlcmltZW50c1dpdGhMb2FkU3RhdGUoZXhwZXJpbWVudElkcywgbG9hZFN0YXRlTWF0Y2hlcikgewogICAgICAgICAgICByZXR1cm4gZm9ya0pvaW4oZXhwZXJpbWVudElkcy5tYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGVpZAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGVpZCkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuZ2V0UnVuc0xpc3RMb2FkU3RhdGUoZWlkKTsKICAgICAgICAgICAgfSkpKS5waXBlKG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbG9hZFN0YXRlcwogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGxvYWRTdGF0ZXMpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiBleHBlcmltZW50SWRzLmZpbHRlcigoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHVudXNlZAogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBpbmRleAogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKHVudXNlZCwgaW5kZXgpID0+IHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gbG9hZFN0YXRlTWF0Y2hlcihsb2FkU3RhdGVzW2luZGV4XS5zdGF0ZSk7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0pKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIElNUE9SVEFOVDogYWN0aW9ucyBhcmUgZGlzcGF0Y2hlZCBldmVuIHdoZW4gdGhlcmUgYXJlIG5vIGV4cGVyaW1lbnRzIHRvCiAgICAgICAgICogZmV0Y2guCiAgICAgICAgICoKICAgICAgICAgKiBPYnNlcnZhYmxlIG9yZ2FuaXphdGlvbjoKICAgICAgICAgKiAxLiBkaXNwYXRjaCByZXF1ZXN0ZWQgYWN0aW9uCiAgICAgICAgICogMi4gbWFrZSByZXF1ZXN0cyBmb3IgZXhwZXJpbWVudHMgdGhhdCByZXF1aXJlIGZldGNoaW5nIHdoaWxlIHdhaXRpbmcgZm9yCiAgICAgICAgICogICAgcnVucyBpZiBhbHJlYWR5IGxvYWRpbmcgYW5kIHJldHVybiBydW5zCiAgICAgICAgICogMy4gY29tYmluZSB0aGUgcmVzdWx0IGZyb20gbG9jYWwgKyBzZXJ2ZXIgd2hlcmUgc2VydmVyIGRhdGEgdGFrYWVzCiAgICAgICAgICogICAgcHJlY2VkZW5jZS4KICAgICAgICAgKiA0LiBkaXNwYXRjaCBzdWNjZWVkZWQgaWYgc3VjY2Vzc2Z1bC4gZWxzZSwgZGlzcGF0Y2ggZmFpbGVkLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBleHBlcmltZW50SWRzCiAgICAgICAgICogQHBhcmFtIHs/fSBleHBlcmltZW50SWRzVG9CZUZldGNoZWQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZldGNoQWxsUnVuc0xpc3QoZXhwZXJpbWVudElkcywgZXhwZXJpbWVudElkc1RvQmVGZXRjaGVkKSB7CiAgICAgICAgICAgIHJldHVybiBvZih7IGV4cGVyaW1lbnRJZHMsIGV4cGVyaW1lbnRJZHNUb0JlRmV0Y2hlZCB9KS5waXBlKHRhcCgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKGZldGNoUnVuc1JlcXVlc3RlZCh7CiAgICAgICAgICAgICAgICAgICAgZXhwZXJpbWVudElkcywKICAgICAgICAgICAgICAgICAgICByZXF1ZXN0ZWRFeHBlcmltZW50SWRzOiBleHBlcmltZW50SWRzVG9CZUZldGNoZWQsCiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0pKSwgbWVyZ2VNYXAoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZWlkc1RvQmVGZXRjaGVkID0gbmV3IFNldChleHBlcmltZW50SWRzVG9CZUZldGNoZWQpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZmV0Y2hPckdldFJ1bnMgPSBleHBlcmltZW50SWRzLm1hcCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGV4cGVyaW1lbnRJZAogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKGV4cGVyaW1lbnRJZCkgPT4gewogICAgICAgICAgICAgICAgICAgIGlmIChlaWRzVG9CZUZldGNoZWQuaGFzKGV4cGVyaW1lbnRJZCkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuZmV0Y2hSdW5zRm9yRXhwZXJpbWVudChleHBlcmltZW50SWQpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5tYXliZVdhaXRGb3JSdW5zQW5kR2V0UnVucyhleHBlcmltZW50SWQpOwogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgcmV0dXJuIGZvcmtKb2luKGZldGNoT3JHZXRSdW5zKTsKICAgICAgICAgICAgfSkpLCBtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHJ1bnNBbmRNZWRhdGFMaXN0CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAocnVuc0FuZE1lZGF0YUxpc3QpID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IG5ld1J1bnNBbmRNZXRhZGF0YSA9ICgvKiogQHR5cGUgez99ICovICh7fSkpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgcnVuc0ZvckFsbEV4cGVyaW1lbnRzID0gW107CiAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IHJ1bnNBbmRNZWRhdGEgb2YgcnVuc0FuZE1lZGF0YUxpc3QpIHsKICAgICAgICAgICAgICAgICAgICBydW5zRm9yQWxsRXhwZXJpbWVudHMucHVzaCguLi5ydW5zQW5kTWVkYXRhLnJ1bnMpOwogICAgICAgICAgICAgICAgICAgIGlmIChydW5zQW5kTWVkYXRhLmZyb21SZW1vdGUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgbmV3UnVuc0FuZE1ldGFkYXRhW3J1bnNBbmRNZWRhdGEuZXhwZXJpbWVudElkXSA9IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJ1bnM6IHJ1bnNBbmRNZWRhdGEucnVucywKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ldGFkYXRhOiBydW5zQW5kTWVkYXRhLm1ldGFkYXRhLAogICAgICAgICAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiB7IG5ld1J1bnNBbmRNZXRhZGF0YSwgcnVuc0ZvckFsbEV4cGVyaW1lbnRzIH07CiAgICAgICAgICAgIH0pKSwgdGFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICh7IG5ld1J1bnNBbmRNZXRhZGF0YSwgcnVuc0ZvckFsbEV4cGVyaW1lbnRzIH0pID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuc3RvcmUuZGlzcGF0Y2goZmV0Y2hSdW5zU3VjY2VlZGVkKHsKICAgICAgICAgICAgICAgICAgICBleHBlcmltZW50SWRzLAogICAgICAgICAgICAgICAgICAgIG5ld1J1bnNBbmRNZXRhZGF0YSwKICAgICAgICAgICAgICAgICAgICBydW5zRm9yQWxsRXhwZXJpbWVudHMsCiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0pKSwgY2F0Y2hFcnJvcigoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZXJyb3IKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChlcnJvcikgPT4gewogICAgICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChmZXRjaFJ1bnNGYWlsZWQoewogICAgICAgICAgICAgICAgICAgIGV4cGVyaW1lbnRJZHMsCiAgICAgICAgICAgICAgICAgICAgcmVxdWVzdGVkRXhwZXJpbWVudElkczogZXhwZXJpbWVudElkc1RvQmVGZXRjaGVkLAogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgcmV0dXJuIG9mKG51bGwpOwogICAgICAgICAgICB9KSksIG1hcCgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiBudWxsKSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gZXhwZXJpbWVudElkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBtYXliZVdhaXRGb3JSdW5zQW5kR2V0UnVucyhleHBlcmltZW50SWQpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuc3RvcmUuc2VsZWN0KGdldFJ1bnNMb2FkU3RhdGUsIHsgZXhwZXJpbWVudElkIH0pLnBpcGUoZmlsdGVyKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBsb2FkU3RhdGUKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChsb2FkU3RhdGUpID0+IGxvYWRTdGF0ZS5zdGF0ZSAhPT0gRGF0YUxvYWRTdGF0ZS5MT0FESU5HKSksIHRha2UoMSksIG1lcmdlTWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBsb2FkU3RhdGUKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChsb2FkU3RhdGUpID0+IHsKICAgICAgICAgICAgICAgIGlmIChsb2FkU3RhdGUuc3RhdGUgPT09IERhdGFMb2FkU3RhdGUuRkFJTEVEKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRocm93RXJyb3IobmV3IEVycm9yKCdQZW5kaW5nIHJlcXVlc3QgZmFpbGVkJykpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIG9mKGxvYWRTdGF0ZSk7CiAgICAgICAgICAgIH0pKSwgd2l0aExhdGVzdEZyb20odGhpcy5zdG9yZS5zZWxlY3QoZ2V0UnVucywgeyBleHBlcmltZW50SWQgfSkpLCBtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKFssIHJ1bnNdKSA9PiAoeyBmcm9tUmVtb3RlOiBmYWxzZSwgZXhwZXJpbWVudElkLCBydW5zIH0pKSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gZXhwZXJpbWVudElkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmZXRjaFJ1bnNGb3JFeHBlcmltZW50KGV4cGVyaW1lbnRJZCkgewogICAgICAgICAgICByZXR1cm4gZm9ya0pvaW4oWwogICAgICAgICAgICAgICAgdGhpcy5ydW5zRGF0YVNvdXJjZS5mZXRjaFJ1bnMoZXhwZXJpbWVudElkKSwKICAgICAgICAgICAgICAgIHRoaXMucnVuc0RhdGFTb3VyY2UuZmV0Y2hIcGFyYW1zTWV0YWRhdGEoZXhwZXJpbWVudElkKSwKICAgICAgICAgICAgXSkucGlwZShtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKFtydW5zLCBtZXRhZGF0YV0pID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiB7IGZyb21SZW1vdGU6IHRydWUsIGV4cGVyaW1lbnRJZCwgcnVucywgbWV0YWRhdGEgfTsKICAgICAgICAgICAgfSkpKTsKICAgICA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W5BbmRNYXguc2V0KG1ldHJpYy50YWcsIHsKICAgICAgICAgICAgICAgICAgICAgICAgbWluOiBtaW5BbmRNYXgKICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTWF0aC5taW4obWluQW5kTWF4Lm1pbiwgbWV0cmljLnZhbHVlKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBtZXRyaWMudmFsdWUsCiAgICAgICAgICAgICAgICAgICAgICAgIG1heDogbWluQW5kTWF4CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1hdGgubWF4KG1pbkFuZE1heC5tYXgsIG1ldHJpYy52YWx1ZSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogbWV0cmljLnZhbHVlLAogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIFJlY29yZCBhbmQgY29tYmluZSBhbGwgaHBhcmFtIHNwZWNzIChtdWx0aXBsZSBleHBlcmltZW50cyBjYW4KICAgICAgICAgICAgLy8gaGF2ZSBocGFyYW1zIG9mIHNhbWUgbmFtZSBidXQgZGlzam9pbnQgc2V0IG9mIGRvbWFpbikuCiAgICAgICAgICAgIGZvciAoY29uc3QgeyBuYW1lLCBkb21haW4gfSBvZiBtZXRhZGF0YS5ocGFyYW1TcGVjcykgewogICAgICAgICAgICAgICAgaWYgKGRvbWFpbi50eXBlID09PSBEb21haW5UeXBlLkRJU0NSRVRFKSB7CiAgICAgICAgICAgICAgICAgICAgY29uc3QgdmFsdWVzID0gZGlzY3JldGVIcGFyYW1zLmdldChuYW1lKSB8fCBuZXcgU2V0KCk7CiAgICAgICAgICAgICAgICAgICAgZm9yIChjb25zdCB2YWx1ZSBvZiBkb21haW4udmFsdWVzKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlcy5hZGQodmFsdWUpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBkaXNjcmV0ZUhwYXJhbXMuc2V0KG5hbWUsIHZhbHVlcyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBjb25zdCBleGlzdGluZyA9IGludGVydmFsSHBhcmFtcy5nZXQobmFtZSk7CiAgICAgICAgICAgICAgICAgICAgaW50ZXJ2YWxIcGFyYW1zLnNldChuYW1lLCB7CiAgICAgICAgICAgICAgICAgICAgICAgIG1pblZhbHVlOiBleGlzdGluZwogICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNYXRoLm1pbihkb21haW4ubWluVmFsdWUsIGV4aXN0aW5nLm1pblZhbHVlKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBkb21haW4ubWluVmFsdWUsCiAgICAgICAgICAgICAgICAgICAgICAgIG1heFZhbHVlOiBleGlzdGluZwogICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNYXRoLm1heChkb21haW4ubWF4VmFsdWUsIGV4aXN0aW5nLm1heFZhbHVlKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBkb21haW4ubWF4VmFsdWUsCiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZm9yIChjb25zdCBtZXRyaWNTcGVjIG9mIG1ldGFkYXRhLm1ldHJpY1NwZWNzKSB7CiAgICAgICAgICAgICAgICBtZXRyaWNUYWdzLmFkZChtZXRyaWNTcGVjLnRhZyk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgZm9yIChjb25zdCBbbmFtZSwgdmFsdWVzXSBvZiBkaXNjcmV0ZUhwYXJhbXMpIHsKICAgICAgICAgICAgbmV3SHBhcmFtRmlsdGVycy5zZXQobmFtZSwgewogICAgICAgICAgICAgICAgdHlwZTogRG9tYWluVHlwZS5ESVNDUkVURSwKICAgICAgICAgICAgICAgIGluY2x1ZGVVbmRlZmluZWQ6IHRydWUsCiAgICAgICAgICAgICAgICBwb3NzaWJsZVZhbHVlczogWy4uLnZhbHVlc10sCiAgICAgICAgICAgICAgICBmaWx0ZXJWYWx1ZXM6IFsuLi52YWx1ZXNdLAogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgZm9yIChjb25zdCBbbmFtZSwgeyBtaW5WYWx1ZSwgbWF4VmFsdWUgfV0gb2YgaW50ZXJ2YWxIcGFyYW1zKSB7CiAgICAgICAgICAgIG5ld0hwYXJhbUZpbHRlcnMuc2V0KG5hbWUsIHsKICAgICAgICAgICAgICAgIHR5cGU6IERvbWFpblR5cGUuSU5URVJWQUwsCiAgICAgICAgICAgICAgICBpbmNsdWRlVW5kZWZpbmVkOiB0cnVlLAogICAgICAgICAgICAgICAgbWluVmFsdWUsCiAgICAgICAgICAgICAgICBtYXhWYWx1ZSwKICAgICAgICAgICAgICAgIGZpbHRlckxvd2VyVmFsdWU6IG1pblZhbHVlLAogICAgICAgICAgICAgICAgZmlsdGVyVXBwZXJWYWx1ZTogbWF4VmFsdWUsCiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICBmb3IgKGNvbnN0IG1ldHJpY1RhZyBvZiBtZXRyaWNUYWdzKSB7CiAgICAgICAgICAgIGNvbnN0IG1pbkFuZE1heCA9IG1ldHJpY1ZhbHVlTWluQW5kTWF4LmdldChtZXRyaWNUYWcpOwogICAgICAgICAgICBuZXdNZXRyaWNGaWx0ZXJzLnNldChtZXRyaWNUYWcsIHsKICAgICAgICAgICAgICAgIHR5cGU6IERvbWFpblR5cGUuSU5URVJWQUwsCiAgICAgICAgICAgICAgICBpbmNsdWRlVW5kZWZpbmVkOiB0cnVlLAogICAgICAgICAgICAgICAgbWluVmFsdWU6IChfYSA9IG1pbkFuZE1heCA9PT0gbnVsbCB8fCBtaW5BbmRNYXggPT09IHZvaWQgMCA/IHZvaWQgMCA6IG1pbkFuZE1heC5taW4pICE9PSBudWxsICYmIF9hICE9PSB2b2lkIDAgPyBfYSA6IDAsCiAgICAgICAgICAgICAgICBtYXhWY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ZSBmb3IgcnVucy4KICAgICAqCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogdGVuc29yYm9hcmQvd2ViYXBwL3J1bnMvcnVuc19tb2R1bGUudHMKICAgICAqIEBzdXBwcmVzcyB7Y2hlY2tUeXBlcyxjb25zdGFudFByb3BlcnR5LGV4dHJhUmVxdWlyZSxtaXNzaW5nT3ZlcnJpZGUsbWlzc2luZ1JldHVybix1bnVzZWRQcml2YXRlTWVtYmVycyx1c2VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgLyoqCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBhbGVydEFjdGlvblByb3ZpZGVyKCkgewogICAgICAgIHJldHVybiBbCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgIGFjdGlvbkNyZWF0b3I6IGZldGNoUnVuc0ZhaWxlZCwKICAgICAgICAgICAgICAgIGFsZXJ0RnJvbUFjdGlvbjogKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHJldHVybiB7IGxvY2FsaXplZE1lc3NhZ2U6ICdGYWlsZWQgdG8gZmV0Y2ggcnVucycgfTsKICAgICAgICAgICAgICAgIH0pLAogICAgICAgICAgICB9LAogICAgICAgIF07CiAgICB9CiAgICBjbGFzcyBSdW5zTW9kdWxlIHsKICAgIH0KICAgIFJ1bnNNb2R1bGUuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IE5nTW9kdWxlLCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIGltcG9ydHM6IFsKICAgICAgICAgICAgICAgICAgICAgICAgU3RvcmVNb2R1bGUuZm9yRmVhdHVyZShSVU5TX0ZFQVRVUkVfS0VZLCByZWR1Y2VycyQ1KSwKICAgICAgICAgICAgICAgICAgICAgICAgRWZmZWN0c01vZHVsZS5mb3JGZWF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1lcklkID0gbnVsbDsKICAgICAgICAgICAgdGhpcy5taXNzZWRBdXRvUmVsb2FkID0gZmFsc2U7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkluaXQoKSB7CiAgICAgICAgICAgIHRoaXMuZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcigndmlzaWJpbGl0eWNoYW5nZScsIHRoaXMub25WaXNpYmlsaXR5Q2hhbmdlKTsKICAgICAgICAgICAgY29tYmluZUxhdGVzdCh0aGlzLnJlbG9hZEVuYWJsZWQkLnBpcGUoZGlzdGluY3RVbnRpbENoYW5nZWQoKSksIHRoaXMucmVsb2FkUGVyaW9kSW5NcyQucGlwZShkaXN0aW5jdFVudGlsQ2hhbmdlZCgpKSkuc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChbZW5hYmxlZCwgcmVsb2FkUGVyaW9kSW5Nc10pID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuY2FuY2VsTG9hZCgpOwogICAgICAgICAgICAgICAgaWYgKGVuYWJsZWQpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLmxvYWQoKC8qKiBAdHlwZSB7P30gKi8gKHJlbG9hZFBlcmlvZEluTXMpKSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uVmlzaWJpbGl0eUNoYW5nZUltcGwoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmRvY3VtZW50LnZpc2liaWxpdHlTdGF0ZSA9PT0gJ3Zpc2libGUnICYmIHRoaXMubWlzc2VkQXV0b1JlbG9hZCkgewogICAgICAgICAgICAgICAgdGhpcy5taXNzZWRBdXRvUmVsb2FkID0gZmFsc2U7CiAgICAgICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKHJlbG9hZCgpKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gcmVsb2FkUGVyaW9kSW5NcwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbG9hZChyZWxvYWRQZXJpb2RJbk1zKSB7CiAgICAgICAgICAgIHRoaXMucmVsb2FkVGltZXJJZCA9IHNldFRpbWVvdXQoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgaWYgKHRoaXMuZG9jdW1lbnQudmlzaWJpbGl0eVN0YXRlID09PSAndmlzaWJsZScpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKHJlbG9hZCgpKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIHRoaXMubWlzc2VkQXV0b1JlbG9hZCA9IHRydWU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLmxvYWQocmVsb2FkUGVyaW9kSW5Ncyk7CiAgICAgICAgICAgIH0pLCByZWxvYWRQZXJpb2RJbk1zKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGNhbmNlbExvYWQoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLnJlbG9hZFRpbWVySWQgIT09IG51bGwpIHsKICAgICAgICAgICAgICAgIGNsZWFyVGltZW91dCh0aGlzLnJlbG9hZFRpbWVySWQpOwogICAgICAgICAgICB9CiAgICAgICAg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b3I6ICd0ZW5zb3Jib2FyZC13cmFwcGVyLWNvbXBvbmVudCcsCiAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU6IGAKICAgIDxwbHVnaW5zIGNsYXNzPSJwbHVnaW5zIj48L3BsdWdpbnM+CiAgICA8cmVsb2FkZXI+PC9yZWxvYWRlcj4KICBgLAogICAgICAgICAgICAgICAgICAgIHN0eWxlczogWwogICAgICAgICAgICAgICAgICAgICAgICBgCiAgICAgIDpob3N0IHsKICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47CiAgICAgICAgaGVpZ2h0OiAxMDAlOwogICAgICB9CgogICAgICAucGx1Z2lucyB7CiAgICAgICAgZmxleDogMSAxOwogICAgICAgIG92ZXJmbG93OiBhdXRvOwogICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTsKICAgICAgfQogICAgYCwKICAgICAgICAgICAgICAgICAgICBdLAogICAgICAgICAgICAgICAgICAgIGNoYW5nZURldGVjdGlvbjogQ2hhbmdlRGV0ZWN0aW9uU3RyYXRlZ3kuT25QdXNoLAogICAgICAgICAgICAgICAgfSxdIH0sCiAgICBdOwogICAgLyoqIEBub2NvbGxhcHNlICovIFRlbnNvckJvYXJkV3JhcHBlckNvbXBvbmVudC7JtWZhYyA9IGZ1bmN0aW9uIFRlbnNvckJvYXJkV3JhcHBlckNvbXBvbmVudF9GYWN0b3J5KHQpIHsgcmV0dXJuIG5ldyAodCB8fCBUZW5zb3JCb2FyZFdyYXBwZXJDb21wb25lbnQpKCk7IH07CiAgICAvKiogQG5vY29sbGFwc2UgKi8gVGVuc29yQm9hcmRXcmFwcGVyQ29tcG9uZW50Lsm1Y21wID0gybXJtWRlZmluZUNvbXBvbmVudCh7IHR5cGU6IFRlbnNvckJvYXJkV3JhcHBlckNvbXBvbmVudCwgc2VsZWN0b3JzOiBbWyJ0ZW5zb3Jib2FyZC13cmFwcGVyLWNvbXBvbmVudCJdXSwgZGVj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ICAgICBob3N0X25hbWU6IGFycmF5WzBdLAogICAgICAgICAgICBmaWxlX3BhdGg6IGFycmF5WzFdLAogICAgICAgICAgICBsaW5lbm86IGFycmF5WzJdLAogICAgICAgICAgICBmdW5jdGlvbl9uYW1lOiBhcnJheVszXSwKICAgICAgICB9OwogICAgfQogICAgY2xhc3MgVGZkYmcySHR0cFNlcnZlckRhdGFTb3VyY2UgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gaHR0cAogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKGh0dHApIHsKICAgICAgICAgICAgdGhpcy5odHRwID0gaHR0cDsKICAgICAgICAgICAgdGhpcy5odHRwUGF0aFByZWZpeCA9ICdkYXRhL3BsdWdpbi9kZWJ1Z2dlci12Mic7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZmV0Y2hSdW5zKCkgewogICAgICAgICAgICAvLyBUT0RPKGNhaXMpOiBPbmNlIHRoZSBiYWNrZW5kIHVzZXMgYW4gRGF0YVByb3ZpZGVyIHRoYXQgdW5pZmllcyB0ZmRiZyBhbmQKICAgICAgICAgICAgLy8gbm9uLXRmZGJnIHBsdWdpbnMsIHN3aXRjaCB0byB1c2luZyBgdGZfYmFja2VuZC5ydW5TdG9yZS5yZWZyZXNoKClgLgogICAgICAgICAgICByZXR1cm4gdGhpcy5odHRwLmdldCh0aGlzLmh0dHBQYXRoUHJlZml4ICsgJy9ydW5zJyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gcnVuCiAgICAgICAgICogQHBhcmFtIHs/fSBiZWdpbgogICAgICAgICAqIEBwYXJhbSB7P30gZW5kCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmZXRjaEV4ZWN1dGlvbkRpZ2VzdHMocnVuLCBiZWdpbiwgZW5kKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmh0dHAuZ2V0KHRoaXMuaHR0cFBhdGhQcmVmaXggKyAnL2V4ZWN1dGlvbi9kaWdlc3RzJywgewogICAgICAgICAgICAgICAgcGFyYW1zOiB7CiAgICAgICAgICAgICAgICAgICAgcnVuLAogICAgICAgICAgICAgICAgICAgIGJlZ2luOiBTdHJpbmcoYmVnaW4pLAogICAgICAgICAgICAgICAgICAgIGVuZDogU3RyaW5nKGVuZCksCiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBydW4KICAgICAgICAgKiBAcGFyYW0gez99IGJlZ2luCiAgICAgICAgICogQHBhcmFtIHs/fSBlbmQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZldGNoRXhlY3V0aW9uRGF0YShydW4sIGJlZ2luLCBlbmQpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuaHR0cC5nZXQodGhpcy5odHRwUGF0aFByZWZpeCArICcvZXhlY3V0aW9uL2RhdGEnLCB7CiAgICAgICAgICAgICAgICBwYXJhbXM6IHsKICAgICAgICAgICAgICAgICAgICBydW4sCiAgICAgICAgICAgICAgICAgICAgYmVnaW46IFN0cmluZyhiZWdpbiksCiAgICAgICAgICAgICAgICAgICAgZW5kOiBTdHJpbmcoZW5kKSwKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHJ1bgogICAgICAgICAqIEBwYXJhbSB7P30gYmVnaW4KICAgICAgICAgKiBAcGFyYW0gez99IGVuZAogICAgICAgICAqIEBwYXJhbSB7Pz19IHRyYWNlX2lkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmZXRjaEdyYXBoRXhlY3V0aW9uRGlnZXN0cyhydW4sIGJlZ2luLCBlbmQsIHRyYWNlX2lkKSB7CiAgICAgICAgICAgIGlmICh0cmFjZV9pZCAhPT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ3RyYWNlX2lkIGlzIG5vdCBpbXBsZW1lbnRlZCBmb3IgZmV0Y2hHcmFwaEV4ZWN1dGlvbkRpZ2VzdHMoKSB5ZXQnKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpcy5odHRwLmdldCh0aGlzLmh0dHBQYXRoUHJlZml4ICsgJy9ncmFwaF9leGVjdXRpb24vZGlnZXN0cycsIHsKICAgICAgICAgICAgICAgIHBhcmFtczogewogICAgICAgICAgICAgICAgICAgIHJ1biwKICAgICAgICAgICAgICAgICAgICBiZWdpbjogU3RyaW5nKGJlZ2luKSwKICAgICAgICAgICAgICAgICAgICBlbmQ6IFN0cmluZyhlbmQpLAogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gcnVuCiAgICAgICAgICogQHBhcmFtIHs/fSBiZWdpbgogICAgICAgICAqIEBwYXJhbSB7P30gZW5kCiAgICAgICAgICogQHBhcmFtIHs/PX0gdHJhY2VfaWQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZldGNoR3JhcGhFeGVjdXRpb25EYXRhKHJ1biwgYmVnaW4sIGVuZCwgdHJhY2VfaWQpIHsKICAgICAgICAgICAgaWYgKHRyYWNlX2lkICE9PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigndHJhY2VfaWQgaXMgbm90IGltcGxlbWVudGVkIGZvciBmZXRjaEdyYXBoRXhlY3V0aW9uRGF0YSgpIHlldCcpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0aGlzLmh0dHAuZ2V0KHRoaXMuaHR0cFBhdGhQcmVmaXggKyAnL2dyYXBoX2V4ZWN1dGlvbi9kYXRhJywgewogICAgICAgICAgICAgICAgcGFyYW1zOiB7CiAgICAgICAgICAgICAgICAgICAgcnVuLAogICAgICAgICAgICAgICAgICAgIGJlZ2luOiBTdHJpbmcoYmVnaW4pLAogICAgICAgICAgICAgICAgICAgIGVuZDogU3RyaW5nKGVuZCksCiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBydW4KICAgICAgICAgKiBAcGFyYW0gez99IGdyYXBoX2lkCiAgICAgICAgICogQHBhcmFtIHs/fSBvcF9uYW1lCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmZXRjaEdyYXBoT3BJbmZvKHJ1biwgZ3JhcGhfaWQsIG9wX25hbWUpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuaHR0cC5nZXQodGhpcy5odHRwUGF0aFByZWZpeCArICcvZ3JhcGhzL29wX2luZm8nLCB7CiAgICAgICAgICAgICAgICBwYXJhbXM6IHsKICAgICAgICAgICAgICAgICAgICBydW4sCiAgICAgICAgICAgICAgICAgICAgZ3JhcGhfaWQsCiAgICAgICAgICAgICAgICAgICAgb3BfbmFtZSwKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHJ1bgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZmV0Y2hTb3VyY2VGaWxlTGlzdChydW4pIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuaHR0cC5nZXQodGhpcy5odHRwUGF0aFByZWZpeCArICcvc291cmNlX2ZpbGVzL2xpc3QnLCB7CiAgICAgICAgICAgICAgICBwYXJhbXM6IHsKICAgICAgICAgICAgICAgICAgICBydW4sCiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBydW4KICAgICAgICAgKiBAcGFyYW0gez99IGZpbGVJbmRleAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZmV0Y2hTb3VyY2VGaWxlKHJ1biwgZmlsZUluZGV4KSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmh0dHAuZ2V0KHRoaXMuaHR0cFBhdGhQcmVmaXggKyAnL3NvdXJjZV9maWxlcy9maWxlJywgewogICAgICAgICAgICAgICAgcGFyYW1zOiB7CiAgICAgICAgICAgICAgICAgICAgcnVuLAogICAgICAgICAgICAgICAgICAgIGluZGV4OiBTdHJpbmcoZmlsZUluZGV4KSwKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHJ1bgogICAgICAgICAqIEBwYXJhbSB7P30gc3RhY2tGcmFtZUlkcwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZmV0Y2hTdGFja0ZyYW1lcyhydW4sIHN0YWNrRnJhbWVJZHMpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuaHR0cAogICAgICAgICAgICAgICAgLmdldCh0aGlzLmh0dHBQYXRoUHJlZml4ICsgJy9zdGFja19mcmFtZXMvc3RhY2tfZnJhbWVzJywgewogICAgICAgICAgICAgICAgcGFyYW1zOiB7CiAgICAgICAgICAgICAgICAgICAgcnVuLAogICAgICAgICAgICAgICAgICAgIHN0YWNrX2ZyYW1lX2lkczogc3RhY2tGcmFtZUlkcy5qb2luKCcsJyksCiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSByYXdSZXNwb25zZQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHJhd1Jlc3BvbnNlKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgICAgIHN0YWNrX2ZyYW1lczogcmF3UmVzcG9uc2Uuc3RhY2tfZnJhbWVzLm1hcCgoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBzdGFja0ZyYW1lQXNBcnJheQogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKHN0YWNrRnJhbWVBc0FycmF5KSA9PiBzdGFja0ZyYW1lQXNBcnJheVRvU3RhY2tGcmFtZShzdGFja0ZyYW1lQXNBcnJheSkpKSwKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgIH0pKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gcnVuCiAgICAgICAgICogQHBhcmFtIHs/fSBiZWdpbgogICAgICAgICAqIEBwYXJhbSB7P30gZW5kCiAgICAgICAgICogQHBhcmFtIHs/PX0gYWxlcnRfdHlwZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZmV0Y2hBbGVydHMocnVuLCBiZWdpbiwgZW5kLCBhbGVydF90eXBlKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcGFyYW1zID0gewogICAgICAgICAgICAgICAgcnVuLAogICAgICAgICAgICAgICAgYmVnaW46IFN0cmluZyhiZWdpbiksCiAgICAgICAgICAgICAgICBlbmQ6IFN0cmluZyhlbmQpLAogICAgICAgICAgICB9OwogICAgICAgICAgICBpZiAoYWxlcnRfdHlwZSAhPT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgICAgICBwYXJhbXNbJ2FsZXJ0X3R5cGUnXSA9IGFsZXJ0X3R5cGU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXMuaHR0cC5nZXQodGhpcy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W1lbnRTdGFydCg3LCAibGkiKTsKICAgICAgICAgICAgybXJtXRleHQoOCwgIiBBZGQgdGhlIGZvbGxvd2luZyBsaW5lIHRvIHRoZSBiZWdpbm5pbmcgb2YgeW91ciBwcm9ncmFtOiAiKTsKICAgICAgICAgICAgybXJtWVsZW1lbnRTdGFydCg5LCAiZGl2IiwgMik7CiAgICAgICAgICAgIMm1ybVlbGVtZW50U3RhcnQoMTAsICJzcGFuIik7CiAgICAgICAgICAgIMm1ybV0ZXh0KDExLCAidGYuZGVidWdnaW5nLmV4cGVyaW1lbnRhbC5lbmFibGVfZHVtcF9kZWJ1Z19pbmZvKCIpOwogICAgICAgICAgICDJtcm1ZWxlbWVudEVuZCgpOwogICAgICAgICAgICDJtcm1ZWxlbWVudFN0YXJ0KDEyLCAic3BhbiIsIDMpOwogICAgICAgICAgICDJtcm1dGV4dCgxMywgImxvZ2RpciIpOwogICAgICAgICAgICDJtcm1ZWxlbWVudEVuZCgpOwogICAgICAgICAgICDJtcm1dGV4dCgxNCwgIiwgIik7CiAgICAgICAgICAgIMm1ybVlbGVtZW50U3RhcnQoMTUsICJzcGFuIiwgMyk7CiAgICAgICAgICAgIMm1ybV0ZXh0KDE2LCAidGVuc29yX2RlYnVnX21vZGU9XCJGVUxMX0hFQUxUSFwiIik7CiAgICAgICAgICAgIMm1ybVlbGVtZW50RW5kKCk7CiAgICAgICAgICAgIMm1ybV0ZXh0KDE3LCAiLCAiKTsKICAgICAgICAgICAgybXJtWVsZW1lbnRTdGFydCgxOCwgInNwYW4iLCAzKTsKICAgICAgICAgICAgybXJtXRleHQoMTksICJjaXJjdWxhcl9idWZmZXJfc2l6ZT0tMSIpOwogICAgICAgICAgICDJtcm1ZWxlbWVudEVuZCgpOwogICAgICAgICAgICDJtcm1ZWxlbWVudFN0YXJ0KDIwLCAic3BhbiIpOwogICAgICAgICAgICDJtcm1dGV4dCgyMSwgIikiKTsKICAgICAgICAgICAgybXJtWVsZW1lbnRFbmQoKTsKICAgICAgICAgICAgybXJtWVsZW1lbnRFbmQoKTsKICAgICAgICAgICAgybXJtWVsZW1lbnRFbmQoKTsKICAgICAgICAgICAgybXJtWVsZW1lbnRTdGFydCgyMiwgImxpIik7CiAgICAgICAgICAgIMm1ybV0ZXh0KDIzLCAiUmUtcnVuIHRoZSBwcm9ncmFtLiIpOwogICAgICAgICAgICDJtcm1ZWxlbWVudEVuZCgpOwogICAgICAgICAgICDJtcm1ZWxlbWVudEVuZCgpOwogICAgICAgICAgICDJtcm1ZWxlbWVudEVuZCgpOwogICAgICAgICAgICDJtcm1ZWxlbWVudFN0YXJ0KDI0LCAiZGl2IiwgNCk7CiAgICAgICAgICAgIMm1ybVlbGVtZW50U3RhcnQoMjUsICJkaXYiLCA1KTsKICAgICAgICAgICAgybXJtWVsZW1lbnRTdGFydCgyNiwgImRpdiIsIDYpOwogICAgICAgICAgICDJtcm1ZWxlbWVudCgyNywgImltZyIsIDcpOwogICAgICAgICAgICDJtcm1ZWxlbWVudEVuZCgpOwogICAgICAgICAgICDJtcm1ZWxlbWVudFN0YXJ0KDI4LCAiZGl2IiwgOCk7CiAgICAgICAgICAgIMm1ybV0ZXh0KDI5LCAiQXV0by1hbGVydHMgZm9yIHByb2JsZW1zIGZvdW5kIik7CiAgICAgICAgICAgIMm1ybVlbGVtZW50RW5kKCk7CiAgICAgICAgICAgIMm1ybVlbGVtZW50RW5kKCk7CiAgICAgICAgICAgIMm1ybVlbGVtZW50U3RhcnQoMzAsICJkaXYiLCA1KTsKICAgICAgICAgICAgybXJtWVsZW1lbnRTdGFydCgzMSwgImRpdiIsIDYpOwogICAgICAgICAgICDJtcm1ZWxlbWVudCgzMiwgImltZyIsIDkpOwogICAgICAgICAgICDJtcm1ZWxlbWVudEVuZCgpOwogICAgICAgICAgICDJtcm1ZWxlbWVudFN0YXJ0KDMzLCAiZGl2IiwgOCk7CiAgICAgICAgICAgIMm1ybV0ZXh0KDM0LCAiIEludGVncmF0ZWQgZGVidWdnaW5nIHRvIHRyY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Rlcy4gIik7CiAgICAgICAgICAgIMm1ybVlbGVtZW50RW5kKCk7CiAgICAgICAgICAgIMm1ybVlbGVtZW50U3RhcnQoNDMsICJkaXYiLCAxMik7CiAgICAgICAgICAgIMm1ybVlbGVtZW50U3RhcnQoNDQsICJkaXYiKTsKICAgICAgICAgICAgybXJtXRleHQoNDUsICIgU2VlICIpOwogICAgICAgICAgICDJtcm1ZWxlbWVudFN0YXJ0KDQ2LCAiYSIsIDEzKTsKICAgICAgICAgICAgybXJtXRleHQoNDcsICIgZG9jdW1lbnRhdGlvbiAiKTsKICAgICAgICAgICAgybXJtWVsZW1lbnRFbmQoKTsKICAgICAgICAgICAgybXJtXRleHQoNDgsICIgb2YgdGhlIFB5dGhvbiBBUEkgb2YgRGVidWdnZXIgVjIuICIpOwogICAgICAgICAgICDJtcm1ZWxlbWVudEVuZCgpOwogICAgICAgICAgICDJtcm1ZWxlbWVudFN0YXJ0KDQ5LCAiZGl2Iik7CiAgICAgICAgICAgIMm1ybV0ZXh0KDUwLCAiIFNlZSAiKTsKICAgICAgICAgICAgybXJtWVsZW1lbnRTdGFydCg1MSwgImEiLCAxNCk7CiAgICAgICAgICAgIMm1ybV0ZXh0KDUyLCAiIGhlcmUgIik7CiAgICAgICAgICAgIMm1ybVlbGVtZW50RW5kKCk7CiAgICAgICAgICAgIMm1ybV0ZXh0KDUzLCAiIGZvciBvdGhlciBUZW5zb3JGbG93IGRlYnVnZ2luZyBBUElzLiAiKTsKICAgICAgICAgICAgybXJtWVsZW1lbnRFbmQoKTsKICAgICAgICAgICAgybXJtWVsZW1lbnRFbmQoKTsKICAgICAgICAgICAgybXJtWVsZW1lbnRFbmQoKTsKICAgICAgICAgICAgybXJtWVsZW1lbnRFbmQoKTsKICAgICAgICB9IH0sIHN0eWxlczogWyIuYXJnW19uZ2NvbnRlbnQtJUNPTVAlXSB7XG4gIGNvbG9yOiBsaWdodGJsdWU7XG4gIGZvbnQtc3R5bGU6IGl0YWxpYztcbiAgbWFyZ2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BweDtcbn1cblxuLmV4aGliaXRbX25nY29udGVudC0lQ09NUCVdICAgLnNjcmVlbnNob3RbX25nY29udGVudC0lQ09NUCVdICAgY2FudmFzW19uZ2NvbnRlbnQtJUNPTVAlXSB7XG4gIGhlaWdodDogMjAwcHg7XG4gIHdpZHRoOiAxMDAlO1xufVxuXG4udGl0bGVbX25nY29udGVudC0lQ09NUCVdIHtcbiAgZm9udC1zaXplOiAxMzUlO1xuICBmb250LXdlaWdodDogYm9sZDtcbiAgbWFyZ2luLWJvdHRvbTogMjVweDtcbn0iXSB9KTsKCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcgYWRkZWQgYnkgdHNpY2tsZQogICAgICogR2VuZXJhdGVkIGZyb206IHRlbnNvcmJvYXJkL3BsdWdpbnMvZGVidWdnZXJfdjIvdGZfZGVidWdnZXJfdjJfcGx1Z2luL3ZpZXdzL2luYWN0aXZlL2luYWN0aXZlX2NvbnRhaW5lci50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICBjbGFzcyBJbmFjdGl2ZUNvbnRhaW5lciB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBzdG9yZQogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKHN0b3JlKSB7CiAgICAgICAgICAgIHRoaXMuc3RvcmUgPSBzdG9yZTsKICAgICAgICB9CiAgICB9CiAgICBJbmFjdGl2ZUNvbnRhaW5lci5kZWNvcmF0b3JzID0gWwogICAgICAgIHsgdHlwZTogQ29tcG9uZW50LCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIHNlbGVjdG9yOiAndGYtZGVidWdnZXItdjItaW5hY3RpdmUnLAogICAgICA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AgICogQHBhcmFtIHs/fSBzdGF0ZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0Rm9jdXNlZFN0YWNrRnJhbWVzSGVscGVyKHN0YXRlKSB7CiAgICAgICAgaWYgKHN0YXRlLmNvZGVMb2NhdGlvbkZvY3VzVHlwZSA9PT0gbnVsbCkgewogICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICB9CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBzdGFja0ZyYW1lSWRzID0gW107CiAgICAgICAgaWYgKHN0YXRlLmNvZGVMb2NhdGlvbkZvY3VzVHlwZSA9PT0gQ29kZUxvY2F0aW9uVHlwZS5FWEVDVVRJT04pIHsKICAgICAgICAgICAgY29uc3QgeyBmb2N1c0luZGV4LCBleGVjdXRpb25EYXRhIH0gPSBzdGF0ZS5leGVjdXRpb25zOwogICAgICAgICAgICBpZiAoZm9jdXNJbmRleCA9PT0gbnVsbCB8fCBleGVjdXRpb25EYXRhW2ZvY3VzSW5kZXhdID09PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHN0YWNrRnJhbWVJZHMgPSBleGVjdXRpb25EYXRhW2ZvY3VzSW5kZXhdLnN0YWNrX2ZyYW1lX2lkczsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIC8vIFRoaXMgaXMgQ29kZUxvY2F0aW9uVHlwZS5HUkFQSF9PUF9DUkVBVElPTi4KICAgICAgICAgICAgaWYgKHN0YXRlLmdyYXBocy5mb2N1c2VkT3AgPT09IG51bGwpIHsKICAgICAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNvbnN0IHsgZ3JhcGhJZCwgb3BOYW1lIH0gPSBzdGF0ZS5ncmFwaHMuZm9jdXNlZE9wOwogICAgICAgICAgICBpZiAoc3RhdGUuZ3J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SBBIHNwZWMgdGhhdCBkZXNjcmliZXMgYSBmcmFtZSBpbiB0aGUgc3RhY2sgdHJhY2UuCiAgICAgKiBAcmV0dXJuIHs/fSBXaGV0aGVyIGBzdGFja0ZyYW1lYCBwb2ludHMgdG8gdGhlIGJvdHRvbW1vc3Qgc3RhY2sgZnJhbWUKICAgICAqICAgKGluIHRoZSBQeXRob24gc2Vuc2UpIG9mIHRoZSBmaWxlIGl0IGJlbG9uZ3MgdG8gYW1vbmcgdGhlIGZyYW1lcyBpbgogICAgICogICBgc3RhY2tGcmFtZXNgLgogICAgICovCiAgICBmdW5jdGlvbiBpc0ZyYW1lQm90dG9tbW9zdEluU3RhY2tUcmFjZShzdGFja0ZyYW1lcywgc3RhY2tGcmFtZSkgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgbWF0Y2hpbmdJbmRleCA9IC0xOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgYm90dG9tbW9zdEluZGV4ID0gLTE7CiAgICAgICAgc3RhY2tGcmFtZXMuZm9yRWFjaCgoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgKiBAcGFyYW0gez99IGkKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgICh7IGZpbGVfcGF0aCwgbGluZW5vIH0sIGkpID0+IHsKICAgICAgICAgICAgaWYgKGZpbGVfcGF0aCA9PT0gc3RhY2tGcmFtZS5maWxlX3BhdGgpIHsKICAgICAgICAgICAgICAgIGJvdHRvbW1vc3RJbmRleCA9IGk7CiAgICAgICAgICAgICAgICBpZiAobGluZW5vID09PSBzdGFja0ZyYW1lLmxpbmVubykgewogICAgICAgICAgICAgICAgICAgIG1hdGNoaW5nSW5kZXggPSBpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfSkpOwogICAgICAgIGlmIChtYXRjaGluZ0luZGV4ID09PSAtMSkgewogICAgICAgICAg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VkUHJpdmF0ZU1lbWJlcnMsdXNlbGVzc0NvZGV9IGNoZWNrZWQgYnkgdHNjCiAgICAgKi8KICAgIC8qKiBAdHlwZSB7P30gKi8KICAgIGNvbnN0IERFRkFVTFRfRVhFQ1VUSU9OX1BBR0VfU0laRSA9IDEwMDsKICAgIC8qKiBAdHlwZSB7P30gKi8KICAgIGNvbnN0IERFRkFVTFRfR1JBUEhfRVhFQ1VUSU9OX1BBR0VfU0laRSA9IDIwMDsKICAgIC8qKgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gY3JlYXRlSW5pdGlhbEV4ZWN1dGlvbnNTdGF0ZSgpIHsKICAgICAgICByZXR1cm4gewogICAgICAgICAgICBudW1FeGVjdXRpb25zTG9hZGVkOiB7CiAgICAgICAgICAgICAgICBzdGF0ZTogRGF0YUxvYWRTdGF0ZS5OT1RfTE9BREVELAogICAgICAgICAgICAgICAgbGFzdExvYWRlZFRpbWVJbk1zOiBudWxsLAogICAgICAgICAgICB9LAogICAgICAgICAgICBleGVjdXRpb25EaWdlc3RzTG9hZGVkOiB7CiAgICAgICAgICAgICAgICBsb2FkaW5nUmFuZ2VzOiBbXSwKICAgICAgICAgICAgICAgIG51bUV4ZWN1dGlvbnM6IDAsCiAgICAgICAgICAgICAgICBwYWdlTG9hZGVkU2l6ZXM6IHt9LAogICAgICAgICAgICB9LAogICAgICAgICAgICAvLyBUT0RPKGNhaXMpIFJlbW92ZSB0aGUgaGFyZGNvZGluZyBvZiB0aGlzLCB3aGljaCBpcyBjb3VwbGVkIHdpdGggY3NzIHdpZHRoCiAgICAgICAgICAgIC8vIHByb3BlcnRpZXMuCiAgICAgICAgICAgIGRpc3BsYXlDb3VudDogNTAsCiAgICAgICAgICAgIHBhZ2VTaXplOiBERUZBVUxUX0VYRUNVVElPTl9QQUdFX1NJWkUsCiAgICAgICAgICAgIHNjcm9sbEJlZ2luSW5kZXg6IDAsCiAgICAgICAgICAgIGZvY3VzSW5kZXg6IG51bGwsCiAgICAgICAgICAgIGV4ZWN1dGlvbkRpZ2VzdHM6IHt9LAogICAgICAgICAgICBleGVjdXRpb25EYXRhOiB7fSwKICAgICAgICB9OwogICAgfQogICAgLyoqCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBjcmVhdGVJbml0aWFsR3JhcGhFeGVjdXRpb25zU3RhdGUoKSB7CiAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgbnVtRXhlY3V0aW9uc0xvYWRlZDogewogICAgICAgICAgICAgICAgc3RhdGU6IERhdGFMb2FkU3RhdGUuTk9UX0xPQURFRCwKICAgICAgICAgICAgICAgIGxhc3RMb2FkZWRUaW1lSW5NczogbnVsbCwKICAgICAgICAgICAgfSwKICAgICAgICAgICAgZXhlY3V0aW9uRGlnZXN0c0xvYWRlZDogewogICAgICAgICAgICAgICAgbG9hZGluZ1JhbmdlczogW10sCiAgICAgICAgICAgICAgICBudW1FeGVjdXRpb25zOiAwLAogICAgICAgICAgICAgICAgcGFnZUxvYWRlZFNpemVzOiB7fSwKICAgICAgICAgICAgfSwKICAgICAgICAgICAgLy8gVE9ETyhjYWlzKSBSZW1vdmUgdGhlIGhhcmRjb2Rpbmcgb2YgdGhpcywgd2hpY2ggaXMgY291cGxlZCB3aXRoIGNzcyB3aWR0aAogICAgICAgICAgICAvLyBwcm9wZXJ0aWVzLgogICAgICAgICAgICBkaXNwbGF5Q291bnQ6IDEwMCwKICAgICAgICAgICAgcGFnZVNpemU6IERFRkFVTFRfR1JBUEhfRVhFQ1VUSU9OX1BBR0VfU0laRSwKICAgICAgICAgICAgc2Nyb2xsQmVnaW5JbmRleDogMCwKICAgICAgICAgICAgZm9jdXNJbmRleDogbnVsbCwKICAgICAgICAgICAgZ3JhcGhFeGVjdXRpb25EaWdlc3RzOiB7fSwKICAgICAgICAgICAgZ3JhcGhFeGVjdXRpb25EYXRhTG9hZGluZ1BhZ2VzOiBbXSwKICAgICAgICAgICAgZ3JhcGhFeGVjdXRpb25EYXRhUGFnZUxvYWRlZFNpemVzOiB7fSwKICAgICAgICAgICAgZ3JhcGhFeGVjdXRpb25EYXRhOiB7fSwKICAgICAgICB9OwogICAgfQogICAgLyoqCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBjcmVhdGVJbml0aWFsR3JhcGhzU3RhdGUoKSB7CiAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgb3BzOiB7fSwKICAgICAgICAgICAgbG9hZGluZ09wczoge30sCiAgICAgICAgICAgIGZvY3VzZWRPcDogbnVsbCwKICAgICAgICB9OwogICAgfQogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgaW5pdGlhbFN0YXRlJDQgPSB7CiAgICAgICAgcnVuczoge30sCiAgICAgICAgcnVuc0xvYWRlZDogewogICAgICAgICAgICBzdGF0ZTogRGF0YUxvYWRTdGF0ZS5OT1RfTE9BREVELAogICAgICAgICAgICBsYXN0TG9hZGVkVGltZUluTXM6IG51bGwsCiAgICAgICAgfSwKICAgICAgICBhY3RpdmVSdW5JZDogbnVsbCwKICAgICAgICAvLyBUaGUgaW5pdGlhbCB2YWx1ZXMgb2YgbGFzdERhdGFQb2xsT25zZXRUaW1lTXMgYW5kCiAgICAgICAgLy8gbGFzdE5vbkVtcHR5UG9sbERhdGFUaW1lTXMgZW5zdXJlcyB0aGF0IGluaXRpYWxseSwgYmVmb3JlCiAgICAgICAgLy8gdGhlIG9uc2V0IG9mIGFueSBkYXRhIHBvbGxpbmcsIHRoZSBkaWZmZXJlbmNlIG9mIHRoZSB0d28KICAgICAgICAvLyBpcyAwLCB3aGljaCBjYXVzZXMgYSBiYWNraW5nLW9mZiBwb2xsaW5nIGFsZ29yaXRobSB0byB1c2UKICAgICAgICAvLyB0aGUgbG93ZXItYm91bmQgcG9sbGluZyBpbnRlcnZhbC4KICAgICAgICBsYXN0RGF0YVBvbGxPbnNldFRpbWVNczogLTEsCiAgICAgICAgbGFzdE5vbkVtcHR5UG9sbERhdGFUaW1lTXM6IDEsCiAgICAgICAgYWxlcnRzOiB7CiAgICAgICAgICAgIGFsZXJ0c0xvYWRlZDogewogICAgICAgICAgICAgICAgc3RhdGU6IERhdGFMb2FkU3RhdGUuTk9UX0xPQURFRCwKICAgICAgICAgICAgICAgIGxhc3RMb2FkZWRUaW1lSW5NczogbnVsbCwKICAgICAgICAgICAgfSwKICAgICAgICAgICAgbnVtQWxlcnRzOiAwLAogICAgICAgICAgICBhbGVydHNCcmVha2Rvd246IHt9LAogICAgICAgICAgICBhbGVydHM6IHt9LAogICAgICAgICAgICBleGVjdXRpb25JbmRpY2VzOiB7fSwKICAgICAgICAgICAgZ3JhcGhFeGVjdXRpb25JbmRpY2VzOiB7fSwKICAgICAgICAgICAgZm9jdXNUeXBlOiBudWxsLAogICAgICAgIH0sCiAgICAgICAgZXhlY3V0aW9uczogY3JlYXRlSW5pdGlhbEV4ZWN1dGlvbnNTdGF0ZSgpLAogICAgICAgIGdyYXBoRXhlY3V0aW9uczogY3JlYXRlSW5pdGlhbEdyYXBoRXhlY3V0aW9uc1N0YXRlKCksCiAgICAgICAgZ3JhcGhzOiBjcmVhdGVJbml0aWFsR3JhcGhzU3RhdGUoKSwKICAgICAgICBzdGFja0ZyYW1lczoge30sCiAgICAgICAgY29kZUxvY2F0aW9uRm9jdXNUeXBlOiBudWxsLAogICAgICAgIHN0aWNrVG9Cb3R0b21tb3N0RnJhbWVJbkZvY3VzZWRGaWxlOiBmYWxzZSwKICAgICAgICBzb3VyY2VDb2RlOiB7CiAgICAgICAgICAgIHNvdXJjZUZpbGVMaXN0TG9hZGVkOiB7CiAgICAgICAgICAgICAgICBzdGF0ZTogRGF0YUxvYWRTdGF0ZS5OT1RfTE9BREVELAogICAgICAgICAgICAgICAgbGFzdExvYWRlZFRpbWVJbk1zOiBudWxsLAogICAgICAgICAgICB9LAogICAgICAgICAgICBzb3VyY2VGaWxlTGlzdDogW10sCiAgICAgICAgICAgIGZpbGVDb250ZW50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HVybiB7P30KICAgICAqLwogICAgKHN0YXRlLCB7IHJ1bnMgfSkgPT4gewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBydW5JZHMgPSBPYmplY3Qua2V5cyhydW5zKTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgYWN0aXZlUnVuQ2hhbmdlZCA9IHJ1bklkcy5sZW5ndGggPiAwICYmIHN0YXRlLmFjdGl2ZVJ1bklkID09PSBudWxsOwogICAgICAgIHJldHVybiBPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sIHN0YXRlKSwgeyBsYXN0Tm9uRW1wdHlQb2xsRGF0YVRpbWVNczogYWN0aXZlUnVuQ2hhbmdlZAogICAgICAgICAgICAgICAgPyBEYXRlLm5vdygpCiAgICAgICAgICAgICAgICA6IHN0YXRlLmxhc3ROb25FbXB0eVBvbGxEYXRhVGltZU1zLCBydW5zLCBydW5zTG9hZGVkOiB7CiAgICAgICAgICAgICAgICBzdGF0ZTogRGF0YUxvYWRTdGF0ZS5MT0FERUQsCiAgICAgICAgICAgICAgICBsYXN0TG9hZGVkVGltZUluTXM6IERhdGUubm93KCksCiAgICAgICAgICAgIH0sIGFjdGl2ZVJ1bklkOiBydW5JZHMubGVuZ3RoID4gMCA/IHJ1bklkc1swXSA6IG51bGwgfSk7CiAgICB9KSksIG9uKGRlYnVnZ2VyRGF0YVBvbGxPbnNldCwgKC8qKgogICAgICogQHBhcmFtIHs/fSBzdGF0ZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgKHN0YXRlKSA9PiB7CiAgICAgICAgcmV0dXJuIE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgc3RhdGUpLCB7IGxhc3REYXRhUG9sbE9uc2V0VGltZU1zOiBEYXRlLm5vdygpIH0pOwogICAgfSkpLCBvbihudW1BbGVydHNBbmRCcmVha2Rvd25SZXF1ZXN0ZWQsICgvKioKICAgICAqIEBwYXJhbSB7P30gc3RhdGUKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIChzdGF0ZSkgPT4gewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBydW5JZCA9IHN0YXRlLmFjdGl2ZVJ1bklkOwogICAgICAgIGlmIChydW5JZCA9PT0gbnVsbCkgewogICAgICAgICAgICByZXR1cm4gc3RhdGU7CiAgICAgICAgfQogICAgICAgIHJldHVybiBPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sIHN0YXRlKSwgeyBhbGVydHM6IE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgc3RhdGUuYWxlcnRzKSwgeyBhbGVydHNMb2FkZWQ6IE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgc3RhdGUuYWxlcnRzLmFsZXJ0c0xvYWRlZCksIHsgc3RhdGU6IERhdGFMb2FkU3RhdGUuTE9BRElORyB9KSB9KSB9KTsKICAgIH0pKSwgb24obnVtQWxlcnRzQW5kQnJlYWtkb3duTG9hZGVkLCAoLyoqCiAgICAgKiBAcGFyYW0gez99IHN0YXRlCiAgICAgKiBAcGFyYW0gez99IF9fMQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgKHN0YXRlLCB7IG51bUFsZXJ0cywgYWxlcnRzQnJlYWtkb3duIH0pID0+IHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgcnVuSWQgPSBzdGF0ZS5hY3RpdmVSdW5JZDsKICAgICAgICBpZiAocnVuSWQgPT09IG51bGwpIHsKICAgICAgICAgICAgcmV0dXJuIHN0YXRlOwogICAgICAgIH0KICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgbnVtQWxlcnRzSW5jcmVhc2VkID0gbnVtQWxlcnRzID4gc3RhdGUuYWxlcnRzLm51bUFsZXJ0czsKICAgICAgICByZXR1cm4gT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaW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mRpbmcgdGhlIGlucHV0IG9wIChlLmcuLCBmb3IgY2VydGFpbgogICAgICAgICAgICAgICAgLy8gVEYtaW50ZXJuYWwgb3BzIHN1Y2ggYXMgU3RhdGVmdWxQYXJ0aXRpb25lZENhbGwpLgogICAgICAgICAgICAgICAgLy8gU2FtZSBmb3IgYGNvbnN1bWVyLmRhdGFgIGJlbG93LgogICAgICAgICAgICAgICAgY29udGludWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgbmV3U3RhdGUuZ3JhcGhzLm9wc1tncmFwaElkXS5zZXQoaW5wdXQub3BfbmFtZSwgaW5wdXQuZGF0YSk7CiAgICAgICAgfQogICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZ3JhcGhPcEluZm9SZXNwb25zZS5jb25zdW1lcnMubGVuZ3RoOyArK2kpIHsKICAgICAgICAgICAgZm9yIChjb25zdCBjb25zdW1lciBvZiBncmFwaE9wSW5mb1Jlc3BvbnNlLmNvbnN1bWVyc1tpXSkgewogICAgICAgICAgICAgICAgaWYgKCFjb25zdW1lci5kYXRhKSB7CiAgICAgICAgICAgICAgICAgICAgY29udGludWU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBuZXdTdGF0ZS5ncmFwaHMub3BzW2dyYXBoSWRdLnNldChjb25zdW1lci5vcF9uYW1lLCBjb25zdW1lci5kYXRhKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBuZXdTdGF0ZS5ncmFwaHMub3BzW2dyYXBoSWRdLnNldChncmFwaE9wSW5mb1Jlc3BvbnNlLm9wX25hbWUsIE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgZ3JhcGhPcEluZm9SZXNwb25zZSksIHsgaW5wdXRzOiBncmFwaE9wSW5mb1Jlc3BvbnNlLmlucHV0cy5tYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGlucHV0CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoaW5wdXQpID0+ICh7CiAgICAgICAgICAgICAgICBvcF9uYW1lOiBpbnB1dC5vcF9uYW1lLAogICAgICAgICAgICAgICAgb3V0cHV0X3Nsb3Q6IGlucHV0Lm91dHB1dF9zbG90LAogICAgICAgICAgICB9KSkpLCBjb25zdW1lcnM6IGdyYXBoT3BJbmZvUmVzcG9uc2UuY29uc3VtZXJzLm1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gc2xvdENvbnN1bWVycwogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHNsb3RDb25zdW1lcnMpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiBzbG90Q29uc3VtZXJzLm1hcCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGNvbnN1bWVyCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoY29uc3VtZXIpID0+ICh7CiAgICAgICAgICAgICAgICAgICAgb3BfbmFtZTogY29uc3VtZXIub3BfbmFtZSwKICAgICAgICAgICAgICAgICAgICBpbnB1dF9zbG90OiBjb25zdW1lci5pbnB1dF9zbG90LAogICAgICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgfSkpIH0pKTsKICAgICAgICAvLyBSZW1vdmUgdGhlIGxvYWRpbmcgbWFya2VyIGZvciB0aGUgb3AuCiAgICAgICAgbmV3U3RhdGUuZ3JhcGhzLmxvYWRpbmdPcHNbZ3JhcGhJZF0uc2V0KGdyYXBoT3BJbmZvUmVzcG9uc2Uub3BfbmFtZSwgRGF0YUxvYWRTdGF0ZS5MT0FERUQpOwogICAgICAgIHJldHVybiBuZXdTdGF0ZTsKICAgIH0pKSwgCiAgICAvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLwogICAgLy8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iBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBmaWxlSW5kZXggPSBmaW5kRmlsZUluZGV4KG5ld1N0YXRlLnNvdXJjZUNvZGUuc291cmNlRmlsZUxpc3QsIHNvdXJjZUZpbGVSZXNwb25zZSk7CiAgICAgICAgaWYgKGZpbGVJbmRleCA+PSAwKSB7CiAgICAgICAgICAgIG5ld1N0YXRlLnNvdXJjZUNvZGUuZmlsZUNvbnRlbnRzW2ZpbGVJbmRleF0gPSB7CiAgICAgICAgICAgICAgICBsb2FkU3RhdGU6IERhdGFMb2FkU3RhdGUuTE9BREVELAogICAgICAgICAgICAgICAgbGluZXM6IHNvdXJjZUZpbGVSZXNwb25zZS5saW5lcywKICAgICAgICAgICAgfTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgQ2Fubm90IGZpbmQgdGhlIGZvbGxvd2luZyBmaWxlIGluIGZpbGUgbGlzdDogYCArCiAgICAgICAgICAgICAgICBgaG9zdF9uYW1lPSIke3NvdXJjZUZpbGVSZXNwb25zZS5ob3N0X25hbWV9IiwgYCArCiAgICAgICAgICAgICAgICBgZmlsZV9wYXRoPSIke3NvdXJjZUZpbGVSZXNwb25zZS5maWxlX3BhdGh9ImApOwogICAgICAgIH0KICAgICAgICByZXR1cm4gbmV3U3RhdGU7CiAgICB9KSksIG9uKHN0YWNrRnJhbWVzTG9hZGVkLCAoLyoqCiAgICAgKiBAcGFyYW0gez99IHN0YXRlCiAgICAgKiBAcGFyYW0gez99IHN0YWNrRnJhbWVzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICAoc3RhdGUsIHN0YWNrRnJhbWVzKSA9PiB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHJ1bklkID0gc3RhdGUuYWN0aXZlUnVuSWQ7CiAgICAgICAgaWYgKHJ1bklkID09PSBudWxsKSB7CiAgICAgICAgICAgIHJldHVybiBzdGF0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bUFsZXJ0c09mRm9jdXNlZFR5cGUgPSBjcmVhdGVTZWxlY3RvcihzZWxlY3RBbGVydHMsICgvKioKICAgICAqIEBwYXJhbSB7P30gYWxlcnRzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICAoYWxlcnRzKSA9PiB7CiAgICAgICAgaWYgKGFsZXJ0cy5mb2N1c1R5cGUgPT09IG51bGwpIHsKICAgICAgICAgICAgcmV0dXJuIDA7CiAgICAgICAgfQogICAgICAgIHJldHVybiBhbGVydHMuYWxlcnRzQnJlYWtkb3duW2FsZXJ0cy5mb2N1c1R5cGVdIHx8IDA7CiAgICB9KSk7CiAgICAvKioKICAgICAqIEdldCB0aGUgQWxlcnRzIHRoYXQgYXJlIDEpIG9mIHRoZSB0eXBlIGJlaW5nIGZvY3VzZWQgb24sIGFuZAogICAgICogMikgYWxyZWFkeSBsb2FkZWQgYnkgdGhlIGZyb250IGVuZC4KICAgICAqCiAgICAgKiBJZiBubyBhbGVydCB0eXBlIGZvY3VzIGV4aXN0cywgcmV0dXJucyBudWxsLgogICAgICogQHR5cGUgez99CiAgICAgKi8KICAgIGNvbnN0IGdldExvYWRlZEFsZXJ0c09mRm9jdXNlZFR5cGUgPSBjcmVhdGVTZWxlY3RvcihzZWxlY3RBbGVydHMsICgvKioKICAgICAqIEBwYXJhbSB7P30gYWxlcnRzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICAoYWxlcnRzKSA9PiB7CiAgICAgICAgaWYgKGFsZXJ0cy5mb2N1c1R5cGUgPT09IG51bGwpIHsKICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgfQogICAgICAgIGlmIChhbGVydHMuYWxlcnRzW2FsZXJ0cy5mb2N1c1R5cGVdID09PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgfQogICAgICAgIHJldHVybiBhbGVydHMuYWxlcnRzW2FsZXJ0cy5mb2N1c1R5cGVdOwogICAgfSkp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G9yKHNlbGVjdEV4ZWN1dGlvbnNTdGF0ZSwgKC8qKgogICAgICogQHBhcmFtIHs/fSBleGVjdXRpb25zCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICAoZXhlY3V0aW9ucykgPT4gewogICAgICAgIHJldHVybiBleGVjdXRpb25zLmRpc3BsYXlDb3VudDsKICAgIH0pKTsKICAgIC8qKiBAdHlwZSB7P30gKi8KICAgIGNvbnN0IGdldFZpc2libGVFeGVjdXRpb25EaWdlc3RzID0gY3JlYXRlU2VsZWN0b3Ioc2VsZWN0RXhlY3V0aW9uc1N0YXRlLCAoLyoqCiAgICAgKiBAcGFyYW0gez99IGV4ZWN1dGlvbnMKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIChleGVjdXRpb25zKSA9PiB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGRpZ2VzdHMgPSBbXTsKICAgICAgICBmb3IgKGxldCBleGVjdXRpb25JbmRleCA9IGV4ZWN1dGlvbnMuc2Nyb2xsQmVnaW5JbmRleDsgZXhlY3V0aW9uSW5kZXggPCBleGVjdXRpb25zLnNjcm9sbEJlZ2luSW5kZXggKyBleGVjdXRpb25zLmRpc3BsYXlDb3VudDsgKytleGVjdXRpb25JbmRleCkgewogICAgICAgICAgICBpZiAoZXhlY3V0aW9uSW5kZXggaW4gZXhlY3V0aW9ucy5leGVjdXRpb25EaWdlc3RzKSB7CiAgICAgICAgICAgICAgICBkaWdlc3RzLnB1c2goZXhlY3V0aW9ucy5leGVjdXRpb25EaWdlc3RzW2V4ZWN1dGlvbkluZGV4XSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBkaWdlc3RzLnB1c2gobnVsbCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIGRpZ2VzdHM7CiAgICB9KSk7CiAgICAvKioKICAgICAqIEludGVybWVkaWF0ZSBzZWxlY3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ByZXR1cm4gez99CiAgICAgKi8KICAgIChncmFwaHMpID0+IHsKICAgICAgICBjb25zdCB7IGZvY3VzZWRPcCwgb3BzIH0gPSBncmFwaHM7CiAgICAgICAgaWYgKGZvY3VzZWRPcCA9PT0gbnVsbCB8fAogICAgICAgICAgICBvcHNbZm9jdXNlZE9wLmdyYXBoSWRdID09PSB1bmRlZmluZWQgfHwKICAgICAgICAgICAgIW9wc1tmb2N1c2VkT3AuZ3JhcGhJZF0uaGFzKGZvY3VzZWRPcC5vcE5hbWUpKSB7CiAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBncmFwaCA9IG9wc1tmb2N1c2VkT3AuZ3JhcGhJZF07CiAgICAgICAgICAgIGNvbnN0IHsgaW5wdXRzIH0gPSAoLyoqIEB0eXBlIHs/fSAqLyAoZ3JhcGguZ2V0KGZvY3VzZWRPcC5vcE5hbWUpKSk7CiAgICAgICAgICAgIHJldHVybiBpbnB1dHMubWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBpbnB1dFNwZWMKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChpbnB1dFNwZWMpID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHNwZWMgPSBPYmplY3QuYXNzaWduKHt9LCBpbnB1dFNwZWMpOwogICAgICAgICAgICAgICAgaWYgKGdyYXBoLmhhcyhpbnB1dFNwZWMub3BfbmFtZSkpIHsKICAgICAgICAgICAgICAgICAgICBzcGVjLmRhdGEgPSBncmFwaC5nZXQoaW5wdXRTcGVjLm9wX25hbWUpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIHNwZWM7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICB9KS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yZSBtb3JlIHRoYW4gYE1BWF9MT09LX0JBQ0tgIGJlZm9yZSB0aGUKICAgICAqIGN1cnJlbnRseSBmb2N1c2VkIGluZGV4IChyYXJlKSwgdGhlIHJldHVybmVkIGFycmF5IG1heSBiZSBpbmNvbXBsZXRlLgogICAgICogQHR5cGUgez99CiAgICAgKi8KICAgIGNvbnN0IGdldEZvY3VzZWRHcmFwaEV4ZWN1dGlvbklucHV0SW5kaWNlcyA9IGNyZWF0ZVNlbGVjdG9yKGdldEdyYXBoRXhlY3V0aW9uRm9jdXNJbmRleCwgZ2V0R3JhcGhFeGVjdXRpb25EYXRhLCBnZXRGb2N1c2VkR3JhcGhPcElucHV0cywgKC8qKgogICAgICogQHBhcmFtIHs/fSBmb2N1c0luZGV4CiAgICAgKiBAcGFyYW0gez99IGRhdGEKICAgICAqIEBwYXJhbSB7P30gb3BJbnB1dHMKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIChmb2N1c0luZGV4LCBkYXRhLCBvcElucHV0cykgPT4gewogICAgICAgIGlmIChmb2N1c0luZGV4ID09PSBudWxsIHx8IG9wSW5wdXRzID09PSBudWxsKSB7CiAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgIH0KICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgaW5wdXRGb3VuZCA9IG9wSW5wdXRzLm1hcCgoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBfCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAoXykgPT4gZmFsc2UpKTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgaW5wdXRJbmRpY2VzID0gW107CiAgICAgICAgaWYgKG9wSW5wdXRzLmxlbmd0aCA9PT0gMCkgewogICAgICAgICAgICByZXR1cm4gaW5wdXRJbmRpY2VzOwogICAgICAgIH0KICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgZ3JhcGhfaWQgPSBkYXRhW2ZvY3VzSW5kZXhdLmdyYXBoX2lkOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBsaW1pdCA9IE1hdGgubWF4KDAsIGZvY3VzSW5kZXggLSBNQVhfTE9PS19CQUNLKTsKICAgICAgICBmb3IgKGxldCBpID0gZm9jdXNJbmRleCAtIDE7IGkgPj0gbGltaXQ7IC0taSkgewogICAgICAgICAgICBpZiAoZGF0YVtpXSA9PT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgICAgICBjb250aW51ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBmb3IgKGxldCBqID0gMDsgaiA8IG9wSW5wdXRzLmxlbmd0aDsgKytqKSB7CiAgICAgICAgICAgICAgICBpZiAoIWlucHV0Rm91bmRbal0gJiYKICAgICAgICAgICAgICAgICAgICBkYXRhW2ldLmdyYXBoX2lkID09PSBncmFwaF9pZCAmJgogICAgICAgICAgICAgICAgICAgIGRhdGFbaV0ub3BfbmFtZSA9PT0gb3BJbnB1dHNbal0ub3BfbmFtZSAmJgogICAgICAgICAgICAgICAgICAgIGRhdGFbaV0ub3V0cHV0X3Nsb3QgPT09IG9wSW5wdXRzW2pdLm91dHB1dF9zbG90KSB7CiAgICAgICAgICAgICAgICAgICAgaW5wdXRJbmRpY2VzLnB1c2goaSk7CiAgICAgICAgICAgICAgICAgICAgaW5wdXRGb3VuZFtqXSA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0SW5kaWNlcy5sZW5ndGggPT09IG9wSW5wdXRzLmxlbmd0aCkgewogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIGlucHV0SW5kaWNlczsKICAgIH0pKTsKICAgIC8qKiBAdHlwZSB7P30gKi8KICAgIGNvbnN0IGdldEZvY3VzZWRHcmFwaE9wQ29uc3VtZXJzID0gY3JlYXRlU2VsZWN0b3Ioc2VsZWN0RGVidWdnZXJHcmFwaHMsICgvKioKICAgICAqIEBwYXJhbSB7P30gZ3JhcGhzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICAoZ3JhcGhzKSA9PiB7CiAgICAgICAgY29uc3QgeyBmb2N1c2VkT3AsIG9wcyB9ID0gZ3JhcGhzOwogICAgICAgIGlmIChmb2N1c2VkT3AgPT09IG51bGwgfHwKICAgICAgICAgICAgb3BzW2ZvY3VzZWRPcC5ncmFwaElkXSA9PT0gdW5kZWZpbmVkIHx8CiAgICAgICAgICAgICFvcHNbZm9jdXNlZE9wLmdyYXBoSWRdLmhhcyhmb2N1c2VkT3Aub3BOYW1lKSkgewogICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZ3JhcGggPSBvcHNbZm9jdXNlZE9wLmdyYXBoSWRdOwogICAgICAgICAgICBjb25zdCB7IGNvbnN1bWVycyB9ID0gKC8qKiBAdHlwZSB7P30gKi8gKGdyYXBoLmdldChmb2N1c2VkT3Aub3BOYW1lKSkpOwogICAgICAgICAgICByZXR1cm4gY29uc3VtZXJzLm1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gc2xvdENvbnN1bWVycwogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHNsb3RDb25zdW1lcnMpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiBzbG90Q29uc3VtZXJzLm1hcCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGNvbnN1bWVyU3BlYwogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKGNvbnN1bWVyU3BlYykgPT4gewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBzcGVjID0gT2JqZWN0LmFzc2lnbih7fSwgY29uc3VtZXJTcGVjKTsKICAgICAgICAgICAgICAgICAgICBpZiAoZ3JhcGguaGFzKGNvbnN1bWVyU3BlYy5vcF9uYW1lKSkgewogICAgICAgICAgICAgICAgICAgICAgICBzcGVjLmRhdGEgPSBncmFwaC5nZXQoY29uc3VtZXJTcGVjLm9wX25hbWUpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gc3BlYzsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgIH0pKTsKICAgIC8qKgogICAgICogR2V0IHRoZSBmb2N1c2VkIGFsZXJ0IHR5cGVzIChpZiBhbnkpIG9mIHRoZSBleGVjdXRpb24gZGlnZXN0cyBjdXJyZW50IGJlaW5nCiAgICAgKiBkaXNwbGF5ZWQuIEZvciBlYWNoIGRpc3BsYXllZCBleGVjdXRpb24gZGlnZXN0LCB0aGVyZSBhcmUgdHdvIHBvc3NpYmlsaXRpZXM6CiAgICAgKiAtIGBudWxsYCByZXByZXNlbnRzIG5vIGFsZXJ0LgogICAgICogLSBBbiBpbnN0YW5jZSBvZiB0aGUgYEFsZXJ0VHlwZWAKICAgICAqIEB0eXBlIHs/fQogICAgICovCiAgICBjb25zdCBnZXRGb2N1c0FsZXJ0VHlwZXNPZlZpc2libGVFeGVjdXRpb25EaWdlc3RzID0gY3JlYXRlU2VsZWN0b3Ioc2VsZWN0RGVidWdnZXJTdGF0ZSwgKC8qKgogICAgICogQHBhcmFtIHs/fSBzdGF0ZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgKHN0YXRlKSA9PiB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGJlZ2luRXhlY3V0aW9uSW5kZXggPSBzdGF0ZS5leGVjdXRpb25zLnNjcm9s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gICovCiAgICAoc291cmNlQ29kZSkgPT4gewogICAgICAgIGNvbnN0IHsgc291cmNlRmlsZUxpc3QsIGZvY3VzTGluZVNwZWMgfSA9IHNvdXJjZUNvZGU7CiAgICAgICAgaWYgKGZvY3VzTGluZVNwZWMgPT09IG51bGwpIHsKICAgICAgICAgICAgcmV0dXJuIC0xOwogICAgICAgIH0KICAgICAgICByZXR1cm4gZmluZEZpbGVJbmRleChzb3VyY2VGaWxlTGlzdCwgZm9jdXNMaW5lU3BlYyk7CiAgICB9KSk7CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBnZXRGb2N1c2VkU291cmNlRmlsZUNvbnRlbnQgPSBjcmVhdGVTZWxlY3RvcihzZWxlY3RTb3VyY2VDb2RlLCBnZXRGb2N1c2VkU291cmNlRmlsZUluZGV4LCAoLyoqCiAgICAgKiBAcGFyYW0gez99IHNvdXJjZUNvZGUKICAgICAqIEBwYXJhbSB7P30gZmlsZUluZGV4CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICAoc291cmNlQ29kZSwgZmlsZUluZGV4KSA9PiB7CiAgICAgICAgaWYgKGZpbGVJbmRleCA9PT0gLTEpIHsKICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgfQogICAgICAgIHJldHVybiBzb3VyY2VDb2RlLmZpbGVDb250ZW50c1tmaWxlSW5kZXhdIHx8IG51bGw7CiAgICB9KSk7CiAgICAvKioKICAgICAqIEdldCB0aGUgc291cmNlLWNvZGUgbGluZSBiZWluZyBmb2N1c2VkIG9uLgogICAgICoKICAgICAqIElmIHRoZSBgc3RpY2tpbmdUb0JvdHRvbW1vc3RGcmFtZUluRm9jdXNlZEZpbGVgIHN0YXRlIGlzIGB0cnVlYCBhbmQKICAgICAqIGBmb2N1c2VkTEluZVNwZWNgIGlzIG5vdCBudWxsLCB0aGlzIHNlbGVjdG9yIHdpbGwgcmV0dXJuIHRoZSBib3R0b21tb3N0CiAgICAgKiBzdGFjayBmcmFtZSB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SRUNPTVBJTEVfQUxFUlRdOiB7CiAgICAgICAgICAgIGRpc3BsYXlOYW1lOiAnRnVuY3Rpb24gcmVjb21waWxlcycsCiAgICAgICAgICAgIGRpc3BsYXlTeW1ib2w6ICdDJywKICAgICAgICB9LAogICAgICAgIFtBbGVydFR5cGUuSU5GX05BTl9BTEVSVF06IHsKICAgICAgICAgICAgZGlzcGxheU5hbWU6ICdOYU4v4oieJywKICAgICAgICAgICAgZGlzcGxheVN5bWJvbDogJ+KInicsCiAgICAgICAgfSwKICAgICAgICBbQWxlcnRUeXBlLlRFTlNPUl9TSEFQRV9BTEVSVF06IHsKICAgICAgICAgICAgZGlzcGxheU5hbWU6ICdUZW5zb3Igc2hhcGUnLAogICAgICAgICAgICBkaXNwbGF5U3ltYm9sOiAn4pagJywKICAgICAgICB9LAogICAgfTsKICAgIGNsYXNzIEFsZXJ0c0NvbnRhaW5lciB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBzdG9yZQogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKHN0b3JlKSB7CiAgICAgICAgICAgIHRoaXMuc3RvcmUgPSBzdG9yZTsKICAgICAgICAgICAgdGhpcy5udW1BbGVydHMkID0gdGhpcy5zdG9yZS5waXBlKHNlbGVjdChnZXROdW1BbGVydHMpKTsKICAgICAgICAgICAgdGhpcy5hbGVydHNCcmVha2Rvd24kID0gdGhpcy5zdG9yZS5waXBlKHNlbGVjdChjcmVhdGVTZWxlY3RvcihnZXRBbGVydHNCcmVha2Rvd24sICgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBhbGVydHNCcmVha2Rvd24KICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChhbGVydHNCcmVha2Rvd24pID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGFsZXJ0VHlwZXMgPSBPYmplY3Qua2V5cyhhbGVydHNCcmVha2Rvd24pOwogICAgICAgICAgICAgICAgYWxlcnRUeXBlcy5zb3J0KCk7CiAgICAgICAgICAgICAgICByZXR1cm4gYWxlcnRUeXBlcy5tYXAoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBhbGVydFR5cGUKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChhbGVydFR5cGUpID0+IHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHsgdHlwZTogKC8qKiBAdHlwZSB7P30gKi8gKGFsZXJ0VHlwZSkpIH0sIEFMRVJUX1RZUEVfVE9fRElTUExBWV9OQU1FX0FORF9TWU1CT0xbYWxlcnRUeXBlXSksIHsgY291bnQ6IGFsZXJ0c0JyZWFrZG93blthbGVydFR5cGVdIH0pOwogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB9KSkpKTsKICAgICAgICAgICAgdGhpcy5mb2N1c1R5cGUkID0gdGhpcy5zdG9yZS5waXBlKHNlbGVjdChnZXRBbGVydHNGb2N1c1R5cGUpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBhbGVydFR5cGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uVG9nZ2xlRm9jdXNUeXBlKGFsZXJ0VHlwZSkgewogICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKGFsZXJ0VHlwZUZvY3VzVG9nZ2xlZCh7IGFsZXJ0VHlwZSB9KSk7CiAgICAgICAgfQogICAgfQogICAgQWxlcnRzQ29udGFpbmVyLmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBDb21wb25lbnQsIGFyZ3M6IFt7CiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3I6ICd0Zi1kZWJ1Z2dlci12Mi1hbG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l0IHRvIHN1cHBvcnQgWyhuZ01vZGVsKV0gYW5kIFtmb3JtQ29udHJvbF0uCiAgICAgKiBcQGRvY3MtcHJpdmF0ZQogICAgICogQHR5cGUgez99CiAgICAgKi8KICAgIGNvbnN0IE1BVF9TTElERVJfVkFMVUVfQUNDRVNTT1IgPSB7CiAgICAgICAgcHJvdmlkZTogTkdfVkFMVUVfQUNDRVNTT1IsCiAgICAgICAgdXNlRXhpc3Rpbmc6IGZvcndhcmRSZWYoKC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgKCkgPT4gTWF0U2xpZGVyKSksCiAgICAgICAgbXVsdGk6IHRydWUKICAgIH07CiAgICAvKioKICAgICAqIEEgc2ltcGxlIGNoYW5nZSBldmVudCBlbWl0dGVkIGJ5IHRoZSBNYXRTbGlkZXIgY29tcG9uZW50LgogICAgICovCiAgICBjbGFzcyBNYXRTbGlkZXJDaGFuZ2UgewogICAgfQogICAgLy8gQm9pbGVycGxhdGUgZm9yIGFwcGx5aW5nIG1peGlucyB0byBNYXRTbGlkZXIuCiAgICAvKioKICAgICAqIFxAZG9jcy1wcml2YXRlCiAgICAgKi8KICAgIGNsYXNzIE1hdFNsaWRlckJhc2UgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gX2VsZW1lbnRSZWYKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihfZWxlbWVudFJlZikgewogICAgICAgICAgICB0aGlzLl9lbGVtZW50UmVmID0gX2VsZW1lbnRSZWY7CiAgICAgICAgfQogICAgfQogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgX01hdFNsaWRlck1peGluQmFzZSA9IG1peGluVGFiSW5kZXgobWl4aW5Db2xvcihtaXhpbkRpc2FibGVkKE1hdFNsaWRlckJhc2UpLCAnYWNjZW50JykpOwogICAgLyoqCiAgICAgKiBBbGxvd3MgdXNlcnMgdG8gc2VsZWN0IGZyb20gYSByYW5nZSBvZiB2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WF0aW9uTW9kZSA9IF9hbmltYXRpb25Nb2RlOwogICAgICAgICAgICB0aGlzLl9uZ1pvbmUgPSBfbmdab25lOwogICAgICAgICAgICB0aGlzLl9pbnZlcnQgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5fbWF4ID0gMTAwOwogICAgICAgICAgICB0aGlzLl9taW4gPSAwOwogICAgICAgICAgICB0aGlzLl9zdGVwID0gMTsKICAgICAgICAgICAgdGhpcy5fdGh1bWJMYWJlbCA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLl90aWNrSW50ZXJ2YWwgPSAwOwogICAgICAgICAgICB0aGlzLl92YWx1ZSA9IG51bGw7CiAgICAgICAgICAgIHRoaXMuX3ZlcnRpY2FsID0gZmFsc2U7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBFdmVudCBlbWl0dGVkIHdoZW4gdGhlIHNsaWRlciB2YWx1ZSBoYXMgY2hhbmdlZC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuY2hhbmdlID0gbmV3IEV2ZW50RW1pdHRlcigpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRXZlbnQgZW1pdHRlZCB3aGVuIHRoZSBzbGlkZXIgdGh1bWIgbW92ZXMuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmlucHV0ID0gbmV3IEV2ZW50RW1pdHRlcigpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRW1pdHMgd2hlbiB0aGUgcmF3IHZhbHVlIG9mIHRoZSBzbGlkZXIgY2hhbmdlcy4gVGhpcyBpcyBoZXJlIHByaW1hcmlseQogICAgICAgICAgICAgKiB0byBmYWNpbGl0YXRlIHRoZSB0d28td2F5IGJpbmRpbmcgZm9yIHRoZSBgdmFsdWVgIGlucHV0LgogICAgICAgICAgICAgKiBcQGRvY3MtcHJpdmF0ZQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy52YWx1ZUNoYW5nZSA9IG5ldyBFdmVudEVtaXR0ZXIoKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIG9uVG91Y2ggZnVuY3Rpb24gcmVnaXN0ZXJlZCB2aWEgcmVnaXN0ZXJPblRvdWNoIChDb250cm9sVmFsdWVBY2Nlc3NvcikuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLm9uVG91Y2hlZCA9ICgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsgfSk7CiAgICAgICAgICAgIHRoaXMuX3BlcmNlbnQgPSAwOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogV2hldGhlciBvciBub3QgdGhlIHRodW1iIGlzIHNsaWRpbmcuCiAgICAgICAgICAgICAqIFVzZWQgdG8gZGV0ZXJtaW5lIGlmIHRoZXJlIHNob3VsZCBiZSBhIHRyYW5zaXRpb24gZm9yIHRoZSB0aHVtYiBhbmQgZmlsbCB0cmFjay4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX2lzU2xpZGluZyA9IGZhbHNlOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogV2hldGhlciBvciBub3QgdGhlIHNsaWRlciBpcyBhY3RpdmUgKGNsaWNrZWQgb3Igc2xpZGluZykuCiAgICAgICAgICAgICAqIFVzZWQgdG8gc2hyaW5rIGFuZCBncm93IHRoZSB0aHVtYiBhcyBhY2NvcmRpbmcgdG8gdGhlIE1hdGVyaWFsIERlc2lnbiBzcGVjLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5faXNBY3RpdmUgPSBmYWxzZTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFRoZSBzaXplIG9mIGEgdGljayBpbnRlcnZhbCBhcyBhIHBlcmNlbnRhZ2Ugb2YgdGhlIHNpemUgb2YgdGhlIHRyYWNrLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fdGlja0ludGVydmFsUGVyY2VudCA9IDA7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBUaGUgZGltZW5zaW9ucyBvZiB0aGUgc2xpZGVyLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fc2xpZGVyRGltZW5zaW9ucyA9IG51bGw7CiAgICAgICAgICAgIHRoaXMuX2NvbnRyb2xWYWx1ZUFjY2Vzc29yQ2hhbmdlRm4gPSAoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7IH0pOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogU3Vic2NyaXB0aW9uIHRvIHRoZSBEaXJlY3Rpb25hbGl0eSBjaGFuZ2UgRXZlbnRFbWl0dGVyLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fZGlyQ2hhbmdlU3Vic2NyaXB0aW9uID0gU3Vic2NyaXB0aW9uLkVNUFRZOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQ2FsbGVkIHdoZW4gdGhlIHVzZXIgaGFzIHB1dCB0aGVpciBwb2ludGVyIGRvd24gb24gdGhlIHNsaWRlci4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX3BvaW50ZXJEb3duID0gKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoZXZlbnQpID0+IHsKICAgICAgICAgICAgICAgIC8vIERvbid0IGRvIGFueXRoaW5nIGlmIHRoZSBzbGlkZXIgaXMgZGlzYWJsZWQgb3IgdGhlCiAgICAgICAgICAgICAgICAvLyB1c2VyIGlzIHVzaW5nIGFueXRoaW5nIG90aGVyIHRoYW4gdGhlIG1haW4gbW91c2UgYnV0dG9uLgogICAgICAgICAgICAgICAgaWYgKHRoaXMuZGlzYWJsZWQgfHwgdGhpcy5faXNTbGlkaW5nIHx8ICghaXNUb3VjaEV2ZW50KGV2ZW50KSAmJiBldmVudC5idXR0b24gIT09IDApKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdGhpcy5fcnVuSW5zaWRlWm9uZSgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IG9sZFZhbHVlID0gdGhpcy52YWx1ZTsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgcG9pbnRlclBvc2l0aW9uID0gZ2V0UG9pbnRlclBvc2l0aW9uT25QYWdlKGV2ZW50KTsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9pc1NsaWRpbmcgPSB0cnVlOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX2xhc3RQb2ludGVyRXZlbnQgPSBldmVudDsKICAgICAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX2ZvY3VzSG9zdEVsZW1lbnQoKTsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9vbk1vdXNlZW50ZXIoKTsgLy8gU2ltdWxhdGUgbW91c2VlbnRlciBpbiBjYXNlIHRoaXMgaXMgYSBtb2JpbGUgZGV2aWNlLgogICAgICAgICAgICAgICAgICAgIHRoaXMuX2JpbmRHbG9iYWxFdmVudHMoZXZlbnQpOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX2ZvY3VzSG9zdEVsZW1lbnQoKTsKICAgICAgICAgICAgICAgICAgICB0aGlzLl91cGRhdGVWYWx1ZUZyb21Qb3NpdGlvbihwb2ludGVyUG9zaXRpb24pOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX3ZhbHVlT25TbGlkZVN0YXJ0ID0gdGhpcy52YWx1ZTsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9wb2ludGVyUG9zaXRpb25PblN0YXJ0ID0gcG9pbnRlclBvc2l0aW9uOwogICAgICAgICAgICAgICAgICAgIC8vIEVtaXQgYSBjaGFuZ2UgYW5kIGlucHV0IGV2ZW50IGlmIHRoZSB2YWx1ZSBjaGFuZ2VkLgogICAgICAgICAgICAgICAgICAgIGlmIChvbGRWYWx1ZSAhPSB0aGlzLnZhbHVlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2VtaXRJbnB1dEV2ZW50KCk7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2VtaXRDaGFuZ2VFdmVudCgpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBDYWxsZWQgd2hlbiB0aGUgdXNlciBoYXMgbW92ZWQgdGhlaXIgcG9pbnRlciBhZnRlcgogICAgICAgICAgICAgKiBzdGFydGluZyB0byBkcmFnLiBCb3VuZCBvbiB0aGUgZG9jdW1lbnQgbGV2ZWwuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9wb2ludGVyTW92ZSA9ICgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBldmVudAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGV2ZW50KSA9PiB7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5faXNTbGlkaW5nKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gUHJldmVudCB0aGUgc2xpZGUgZnJvbSBzZWxlY3RpbmcgYW55dGhpbmcgZWxzZS4KICAgICAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBvbGRWYWx1ZSA9IHRoaXMudmFsdWU7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fbGFzdFBvaW50ZXJFdmVudCA9IGV2ZW50OwogICAgICAgICAgICAgICAgICAgIHRoaXMuX3VwZGF0ZVZhbHVlRnJvbVBvc2l0aW9uKGdldFBvaW50ZXJQb3NpdGlvbk9uUGFnZShldmVudCkpOwogICAgICAgICAgICAgICAgICAgIC8vIE5hdGl2ZSByYW5nZSBlbGVtZW50cyBhbHdheXMgZW1pdCBgaW5wdXRgIGV2ZW50cyB3aGVuIHRoZSB2YWx1ZSBjaGFuZ2VkIHdoaWxlIHNsaWRpbmcuCiAgICAgICAgICAgICAgICAgICAgaWYgKG9sZFZhbHVlICE9IHRoaXMudmFsdWUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fZW1pdElucHV0RXZlbnQoKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQ2FsbGVkIHdoZW4gdGhlIHVzZXIgaGFzIGxpZnRlZCB0aGVpciBwb2ludGVyLiBCb3VuZCBvbiB0aGUgZG9jdW1lbnQgbGV2ZWwuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9wb2ludGVyVXAgPSAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChldmVudCkgPT4gewogICAgICAgICAgICAgICAgaWYgKHRoaXMuX2lzU2xpZGluZykgewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBwb2ludGVyUG9zaXRpb25PblN0YXJ0ID0gdGhpcy5fcG9pbnRlclBvc2l0aW9uT25TdGFydDsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgY3VycmVudFBvaW50ZXJQb3NpdGlvbiA9IGdldFBvaW50ZXJQb3NpdGlvbk9uUGFnZShldmVudCk7CiAgICAgICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9yZW1vdmVHbG9iYWxFdmVudHMoKTsKICAgICAgICAgICAgICAgICAgICB0aGlzLl92YWx1ZU9uU2xpZGVTdGFydCA9IHRoaXMuX3BvaW50ZXJQb3NpdGlvbk9uU3RhcnQgPSB0aGlzLl9sYXN0UG9pbnRlckV2ZW50ID0gbnVsbDsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9pc1NsaWRpbmcgPSBmYWxzZTsKICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5fdmFsdWVPblNsaWRlU3RhcnQgIT0gdGhpcy52YWx1ZSAmJiAhdGhpcy5kaXNhYmxlZCAmJgogICAgICAgICAgICAgICAgICAgICAgICBwb2ludGVyUG9zaXRpb25PblN0YXJ0ICYmIChwb2ludGVyUG9zaXRpb25PblN0YXJ0LnggIT09IGN1cnJlbnRQb2ludGVyUG9zaXRpb24ueCB8fAogICAgICAgICAgICAgICAgICAgICAgICBwb2ludGVyUG9zaXRpb25PblN0YXJ0LnkgIT09IGN1cnJlbnRQb2ludGVyUG9zaXRpb24ueSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fZW1pdENoYW5nZUV2ZW50KCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIENhbGxlZCB3aGVuIHRoZSB3aW5kb3cgaGFzIGxvc3QgZm9jdXMuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl93aW5kb3dCbHVyID0gKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgLy8gSWYgdGhlIHdpbmRvdyBpcyBibHVycmVkIHdoaWxlIGRyYWdnaW5nIHdlIG5lZWQgdG8gc3RvcCBkcmFnZ2luZyBiZWNhdXNlIHRoZQogICAgICAgICAgICAgICAgLy8gYnJvd3NlciB3b24ndCBkaXNwYXRjaCB0aGUgYG1vdXNldXBgIGFuZCBgdG91Y2hlbmRgIGV2ZW50cyBhbnltb3JlLgogICAgICAgICAgICAgICAgaWYgKHRoaXMuX2xhc3RQb2ludGVyRXZlbnQpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9wb2ludGVyVXAodGhpcy5fbGFzdFBvaW50ZXJFdmVudCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICB0aGlzLl9kb2N1bWVudCA9IGRvY3VtZW50OwogICAgICAgICAgICB0aGlzLnRhYkluZGV4ID0gcGFyc2VJbnQodGFiSW5kZXgpIHx8IDA7CiAgICAgICAgICAgIHRoaXMuX3J1bk91dHNpemVab25lKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGVsZW1lbnQgPSBlbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQ7CiAgICAgICAgICAgICAgICBlbGVtZW50LmFkZEV2ZW50TGlzdGVuZXIoJ21vdXNlZG93bicsIHRoaXMuX3BvaW50ZXJEb3duLCBhY3RpdmVFdmVudE9wdGlvbnMpOwogICAgICAgICAgICAgICAgZWxlbWVudC5hZGRFdmVudExpc3RlbmVyKCd0b3VjaHN0YXJ0JywgdGhpcy5fcG9pbnRlckRvd24sIGFjdGl2ZUV2ZW50T3B0aW9ucyk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogV2hldGhlciB0aGUgc2xpZGVyIGlzIGludmVydGVkLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGludmVydCgpIHsgcmV0dXJuIHRoaXMuX2ludmVydDsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBpbnZlcnQodmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5faW52ZXJ0ID0gY29lcmNlQm9vbGVhblByb3BlcnR5KHZhbHVlKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIG1heGltdW0gdmFsdWUgdGhhdCB0aGUgc2xpZGVyIGNhbiBoYXZlLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IG1heCgpIHsgcmV0dXJuIHRoaXMuX21heDsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IG1heCh2KSB7CiAgICAgICAgICAgIHRoaXMuX21heCA9IGNvZXJjZU51bWJlclByb3BlcnR5KHYsIHRoaXMuX21heCk7CiAgICAgICAgICAgIHRoaXMuX3BlcmNlbnQgPSB0aGlzLl9jYWxjdWxhdGVQZXJjZW50YWdlKHRoaXMuX3ZhbHVlKTsKICAgICAgICAgICAgLy8gU2luY2UgdGhpcyBhbHNvIG1vZGlmaWVzIHRoZSBwZXJjZW50YWdlLCB3ZSBuZWVkIHRvIGxldCB0aGUgY2hhbmdlIGRldGVjdGlvbiBrbm93LgogICAgICAgICAgICB0aGlzLl9jaGFuZ2VEZXRlY3RvclJlZi5tYXJrRm9yQ2hlY2soKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIG1pbmltdW0gdmFsdWUgdGhhdCB0aGUgc2xpZGVyIGNhbiBoYXZlLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IG1pbigpIHsgcmV0dXJuIHRoaXMuX21pbjsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IG1pbih2KSB7CiAgICAgICAgICAgIHRoaXMuX21pbiA9IGNvZXJjZU51bWJlclByb3BlcnR5KHYsIHRoaXMuX21pbik7CiAgICAgICAgICAgIC8vIElmIHRoZSB2YWx1ZSB3YXNuJ3QgZXhwbGljaXRseSBzZXQgYnkgdGhlIHVzZXIsIHNldCBpdCB0byB0aGUgbWluLgogICAgICAgICAgICBpZiAodGhpcy5fdmFsdWUgPT09IG51bGwpIHsKICAgICAgICAgICAgICAgIHRoaXMudmFsdWUgPSB0aGlzLl9taW47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fcGVyY2VudCA9IHRoaXMuX2NhbGN1bGF0ZVBlcmNlbnRhZ2UodGhpcy5fdmFsdWUpOwogICAgICAgICAgICAvLyBTaW5jZSB0aGlzIGFsc28gbW9kaWZpZXMgdGhlIHBlcmNlbnRhZ2UsIHdlIG5lZWQgdG8gbGV0IHRoZSBjaGFuZ2UgZGV0ZWN0aW9uIGtub3cuCiAgICAgICAgICAgIHRoaXMuX2NoYW5nZURldGVjdG9yUmVmLm1hcmtGb3JDaGVjaygpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBUaGUgdmFsdWVzIGF0IHdoaWNoIHRoZSB0aHVtYiB3aWxsIHNuYXAuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgc3RlcCgpIHsgcmV0dXJuIHRoaXMuX3N0ZXA7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHYKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBzdGVwKHYpIHsKICAgICAgICAgICAgdGhpcy5fc3RlcCA9IGNvZXJjZU51bWJlclByb3BlcnR5KHYsIHRoaXMuX3N0ZXApOwogICAgICAgICAgICBpZiAodGhpcy5fc3RlcCAlIDEgIT09IDApIHsKICAgICAgICAgICAgICAgIHRoaXMuX3JvdW5kVG9EZWNpbWFsID0gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX3N0ZXAudG9TdHJpbmcoKS5zcGxpdCgnLicpLnBvcCgpKSkubGVuZ3RoOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIFNpbmNlIHRoaXMgY291bGQgbW9kaWZ5IHRoZSBsYWJlbCwgd2UgbmVlZCB0byBub3RpZnkgdGhlIGNoYW5nZSBkZXRlY3Rpb24uCiAgICAgICAgICAgIHRoaXMuX2NoYW5nZURldGVjdG9yUmVmLm1hcmtGb3JDaGVjaygpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGV0aGVyIG9yIG5vdCB0byBzaG93IHRoZSB0aHVtYiBsYWJlbC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCB0aHVtYkxhYmVsKCkgeyByZXR1cm4gdGhpcy5fdGh1bWJMYWJlbDsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCB0aHVtYkxhYmVsKHZhbHVlKSB7IHRoaXMuX3RodW1iTGFiZWwgPSBjb2VyY2VCb29sZWFuUHJvcGVydHkodmFsdWUpOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogSG93IG9mdGVuIHRvIHNob3cgdGlja3MuIFJlbGF0aXZlIHRvIHRoZSBzdGVwIHNvIHRoYXQgYSB0aWNrIGFsd2F5cyBhcHBlYXJzIG9uIGEgc3RlcC4KICAgICAgICAgKiBFeDogVGljayBpbnRlcnZhbCBvZiA0IHdpdGggYSBzdGVwIG9mIDMgd2lsbCBkcmF3IGEgdGljayBldmVyeSA0IHN0ZXBzIChldmVyeSAxMiB2YWx1ZXMpLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHRpY2tJbnRlcnZhbCgpIHsgcmV0dXJuIHRoaXMuX3RpY2tJbnRlcnZhbDsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCB0aWNrSW50ZXJ2YWwodmFsdWUpIHsKICAgICAgICAgICAgaWYgKHZhbHVlID09PSAnYXV0bycpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3RpY2tJbnRlcnZhbCA9ICdhdXRvJzsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmICh0eXBlb2YgdmFsdWUgPT09ICdudW1iZXInIHx8IHR5cGVvZiB2YWx1ZSA9PT0gJ3N0cmluZycpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3RpY2tJbnRlcnZhbCA9IGNvZXJjZU51bWJlclByb3BlcnR5KHZhbHVlLCAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5fdGlja0ludGVydmFsKSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fdGlja0ludGVydmFsID0gMDsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBWYWx1ZSBvZiB0aGUgc2xpZGVyLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHZhbHVlKCkgewogICAgICAgICAgICAvLyBJZiB0aGUgdmFsdWUgbmVlZHMgdG8gYmUgcmVhZCBhbmQgaXQgaXMgc3RpbGwgdW5pbml0aWFsaXplZCwgaW5pdGlhbGl6ZSBpdCB0byB0aGUgbWluLgogICAgICAgICAgICBpZiAodGhpcy5fdmFsdWUgPT09IG51bGwpIHsKICAgICAgICAgICAgICAgIHRoaXMudmFsdWUgPSB0aGlzLl9taW47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3ZhbHVlOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHYKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCB2YWx1ZSh2KSB7CiAgICAgICAgICAgIGlmICh2ICE9PSB0aGlzLl92YWx1ZSkgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IHZhbHVlID0gY29lcmNlTnVtYmVyUHJvcGVydHkodik7CiAgICAgICAgICAgICAgICAvLyBXaGlsZSBpbmNyZW1lbnRpbmcgYnkgYSBkZWNpbWFsIHdlIGNhbiBlbmQgdXAgd2l0aCB2YWx1ZXMgbGlrZSAzMy4zMDAwMDAwMDAwMDAwMDQuCiAgICAgICAgICAgICAgICAvLyBUcnVuY2F0ZSBpdCB0byBlbnN1cmUgdGhhdCBpdCBtYXRjaGVzIHRoZSBsYWJlbCBhbmQgdG8gbWFrZSBpdCBlYXNpZXIgdG8gd29yayB3aXRoLgogICAgICAgICAgICAgICAgaWYgKHRoaXMuX3JvdW5kVG9EZWNpbWFsKSB7CiAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSBwYXJzZUZsb2F0KHZhbHVlLnRvRml4ZWQodGhpcy5fcm91bmRUb0RlY2ltYWwpKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuX3ZhbHVlID0gdmFsdWU7CiAgICAgICAgICAgICAgICB0aGlzLl9wZXJjZW50ID0gdGhpcy5fY2FsY3VsYXRlUGVyY2VudGFnZSh0aGlzLl92YWx1ZSk7CiAgICAgICAgICAgICAgICAvLyBTaW5jZSB0aGlzIGFsc28gbW9kaWZpZXMgdGhlIHBlcmNlbnRhZ2UsIHdlIG5lZWQgdG8gbGV0IHRoZSBjaGFuZ2UgZGV0ZWN0aW9uIGtub3cuCiAgICAgICAgICAgICAgICB0aGlzLl9jaGFuZ2VEZXRlY3RvclJlZi5tYXJrRm9yQ2hlY2soKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGV0aGVyIHRoZSBzbGlkZXIgaXMgdmVydGljYWwuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgdmVydGljYWwoKSB7IHJldHVybiB0aGlzLl92ZXJ0aWNhbDsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCB2ZXJ0aWNhbCh2YWx1ZSkgewogICAgICAgICAgICB0aGlzLl92ZXJ0aWNhbCA9IGNvZXJjZUJvb2xlYW5Qcm9wZXJ0eSh2YWx1ZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFRoZSB2YWx1ZSB0byBiZSB1c2VkIGZvciBkaXNwbGF5IHB1cnBvc2VzLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGRpc3BsYXlWYWx1ZSgpIHsKICAgICAgICAgICAgaWYgKHRoaXMuZGlzcGxheVdpdGgpIHsKICAgICAgICAgICAgICAgIC8vIFZhbHVlIGlzIG5ldmVyIG51bGwgYnV0IHNpbmNlIHNldHRlcnMgYW5kIGdldHRlcnMgY2Fubm90IGhhdmUKICAgICAgICAgICAgICAgIC8vIGRpZmZlcmVudCB0eXBlcywgdGhlIHZhbHVlIGdldHRlciBpcyBhbHNvIHR5cGVkIHRvIHJldHVybiBudWxsLgogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuZGlzcGxheVdpdGgoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMudmFsdWUpKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gTm90ZSB0aGF0IHRoaXMgY291bGQgYmUgaW1wcm92ZWQgZnVydGhlciBieSByb3VuZGluZyBzb21ldGhpbmcgbGlrZSAwLjk5OSB0byAxIG9yCiAgICAgICAgICAgIC8vIDAuODk5IHRvIDAuOSwgaG93ZXZlciBpdCBpcyB2ZXJ5IHBlcmZvcm1hbmNlIHNlbnNpdGl2ZSwgYmVjYXVzZSBpdCBnZXRzIGNhbGxlZCBvbgogICAgICAgICAgICAvLyBldmVyeSBjaGFuZ2UgZGV0ZWN0aW9uIGN5Y2xlLgogICAgICAgICAgICBpZiAodGhpcy5fcm91bmRUb0RlY2ltYWwgJiYgdGhpcy52YWx1ZSAmJiB0aGlzLnZhbHVlICUgMSAhPT0gMCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMudmFsdWUudG9GaXhlZCh0aGlzLl9yb3VuZFRvRGVjaW1hbCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXMudmFsdWUgfHwgMDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogc2V0IGZvY3VzIHRvIHRoZSBob3N0IGVsZW1lbnQKICAgICAgICAgKiBAcGFyYW0gez89fSBvcHRpb25zCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmb2N1cyhvcHRpb25zKSB7CiAgICAgICAgICAgIHRoaXMuX2ZvY3VzSG9zdEVsZW1lbnQob3B0aW9ucyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIGJsdXIgdGhlIGhvc3QgZWxlbWVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYmx1cigpIHsKICAgICAgICAgICAgdGhpcy5fYmx1ckhvc3RFbGVtZW50KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBwZXJjZW50YWdlIG9mIHRoZSBzbGlkZXIgdGhhdCBjb2luY2lkZXMgd2l0aCB0aGUgdmFsdWUuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgcGVyY2VudCgpIHsgcmV0dXJuIHRoaXMuX2NsYW1wKHRoaXMuX3BlcmNlbnQpOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogV2hldGhlciB0aGUgYXhpcyBvZiB0aGUgc2xpZGVyIGlzIGludmVydGVkLgogICAgICAgICAqIChpLmUuIHdoZXRoZXIgbW92aW5nIHRoZSB0aHVtYiBpbiB0aGUgcG9zaXRpdmUgeCBvciB5IGRpcmVjdGlvbiBkZWNyZWFzZXMgdGhlIHNsaWRlcidzIHZhbHVlKS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBfaW52ZXJ0QXhpcygpIHsKICAgICAgICAgICAgLy8gU3RhbmRhcmQgbm9uLWludmVydGVkIG1vZGUgZm9yIGEgdmVydGljYWwgc2xpZGVyIHNob3VsZCBiZSBkcmFnZ2luZyB0aGUgdGh1bWIgZnJvbSBib3R0b20gdG8KICAgICAgICAgICAgLy8gdG9wLiBIb3dldmVyIGZyb20gYSB5LWF4aXMgc3RhbmRwb2ludCB0aGlzIGlzIGludmVydGVkLgogICAgICAgICAgICByZXR1cm4gdGhpcy52ZXJ0aWNhbCA/ICF0aGlzLmludmVydCA6IHRoaXMuaW52ZXJ0OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGV0aGVyIHRoZSBzbGlkZXIgaXMgYXQgaXRzIG1pbmltdW0gdmFsdWUuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgX2lzTWluVmFsdWUoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLnBlcmNlbnQgPT09IDA7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBhbW91bnQgb2Ygc3BhY2UgdG8gbGVhdmUgYmV0d2VlbiB0aGUgc2xpZGVyIHRodW1iIGFuZCB0aGUgdHJhY2sgZmlsbCAmIHRyYWNrIGJhY2tncm91bmQKICAgICAgICAgKiBlbGVtZW50cy4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBfdGh1bWJHYXAoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmRpc2FibGVkKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gRElTQUJMRURfVEhVTUJfR0FQOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0aGlzLl9pc01pblZhbHVlICYmICF0aGlzLnRodW1iTGFiZWwpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9pc0FjdGl2ZSA/IE1JTl9WQUxVRV9BQ1RJVkVfVEhVTUJfR0FQIDogTUlOX1ZBTFVFX05PTkFDVElWRV9USFVNQl9HQVA7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIDA7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENTUyBzdHlsZXMgZm9yIHRoZSB0cmFjayBiYWNrZ3JvdW5kIGVsZW1lbnQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgX3RyYWNrQmFja2dyb3VuZFN0eWxlcygpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBheGlzID0gdGhpcy52ZXJ0aWNhbCA/ICdZJyA6ICdYJzsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBzY2FsZSA9IHRoaXMudmVydGljYWwgPyBgMSwgJHsxIC0gdGhpcy5wZXJjZW50fSwgMWAgOiBgJHsxIC0gdGhpcy5wZXJjZW50fSwgMSwgMWA7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc2lnbiA9IHRoaXMuX3Nob3VsZEludmVydE1vdXNlQ29vcmRzKCkgPyAnLScgOiAnJzsKICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIC8vIHNjYWxlM2QgYXZvaWRzIHNvbWUgcmVuZGVyaW5nIGlzc3VlcyBpbiBDaHJvbWUuIFNlZSAjMTIwNzEuCiAgICAgICAgICAgICAgICB0cmFuc2Zvcm06IGB0cmFuc2xhdGUke2F4aXN9KCR7c2lnbn0ke3RoaXMuX3RodW1iR2FwfXB4KSBzY2FsZTNkKCR7c2NhbGV9KWAKICAgICAgICAgICAgfTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ1NTIHN0eWxlcyBmb3IgdGhlIHRyYWNrIGZpbGwgZWxlbWVudC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBfdHJhY2tGaWxsU3R5bGVzKCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHBlcmNlbnQgPSB0aGlzLnBlcmNlbnQ7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgYXhpcyA9IHRoaXMudmVydGljYWwgPyAnWScgOiAnWCc7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc2NhbGUgPSB0aGlzLnZlcnRpY2FsID8gYDEsICR7cGVyY2VudH0sIDFgIDogYCR7cGVyY2VudH0sIDEsIDFgOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHNpZ24gPSB0aGlzLl9zaG91bGRJbnZlcnRNb3VzZUNvb3JkcygpID8gJycgOiAnLSc7CiAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAvLyBzY2FsZTNkIGF2b2lkcyBzb21lIHJlbmRlcmluZyBpc3N1ZXMgaW4gQ2hyb21lLiBTZWUgIzEyMDcxLgogICAgICAgICAgICAgICAgdHJhbnNmb3JtOiBgdHJhbnNsYXRlJHthe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dGlja3MgY29udGFpbmVyIG9mZiB0aGUgbGVmdCBlZGdlCiAgICAgICAgICAgIC8vIGluc3RlYWQgb2YgdGhlIHJpZ2h0IGVkZ2UgdG8gYXZvaWQgY2F1c2luZyBhIGhvcml6b250YWwgc2Nyb2xsYmFyIHRvIGFwcGVhci4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgc2lnbiA9ICF0aGlzLnZlcnRpY2FsICYmIHRoaXMuX2dldERpcmVjdGlvbigpID09ICdydGwnID8gJycgOiAnLSc7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IG9mZnNldCA9IHRoaXMuX3RpY2tJbnRlcnZhbFBlcmNlbnQgLyAyICogMTAwOwogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgJ3RyYW5zZm9ybSc6IGB0cmFuc2xhdGUke2F4aXN9KCR7c2lnbn0ke29mZnNldH0lKWAKICAgICAgICAgICAgfTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ1NTIHN0eWxlcyBmb3IgdGhlIHRpY2tzIGVsZW1lbnQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgX3RpY2tzU3R5bGVzKCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCB0aWNrU2l6ZSA9IHRoaXMuX3RpY2tJbnRlcnZhbFBlcmNlbnQgKiAxMDA7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGJhY2tncm91bmRTaXplID0gdGhpcy52ZXJ0aWNhbCA/IGAycHggJHt0aWNrU2l6ZX0lYCA6IGAke3RpY2tTaXplfSUgMnB4YDsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgYXhpcyA9IHRoaXMudmVydGljYWwgPyAnWScgOiAnWCc7CiAgICAgICAg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XRlfWAKICAgICAgICAgICAgfTsKICAgICAgICAgICAgaWYgKHRoaXMuX2lzTWluVmFsdWUgJiYgdGhpcy5fdGh1bWJHYXApIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCBzaWRlOwogICAgICAgICAgICAgICAgaWYgKHRoaXMudmVydGljYWwpIHsKICAgICAgICAgICAgICAgICAgICBzaWRlID0gdGhpcy5faW52ZXJ0QXhpcyA/ICdCb3R0b20nIDogJ1RvcCc7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBzaWRlID0gdGhpcy5faW52ZXJ0QXhpcyA/ICdSaWdodCcgOiAnTGVmdCc7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBzdHlsZXNbYHBhZGRpbmcke3NpZGV9YF0gPSBgJHt0aGlzLl90aHVtYkdhcH1weGA7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHN0eWxlczsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgX3RodW1iQ29udGFpbmVyU3R5bGVzKCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBheGlzID0gdGhpcy52ZXJ0aWNhbCA/ICdZJyA6ICdYJzsKICAgICAgICAgICAgLy8gRm9yIGEgaG9yaXpvbnRhbCBzbGlkZXIgaW4gUlRMIGxhbmd1YWdlcyB3ZSBwdXNoIHRoZSB0aHVtYiBjb250YWluZXIgb2ZmIHRoZSBsZWZ0IGVkZ2UKICAgICAgICAgICAgLy8gaW5zdGVhZCBvZiB0aGUgcmlnaHQgZWRnZSB0byBhdm9pZCBjYXVzaW5nIGEgaG9yaXpvbnRhbCBzY3JvbGxiYXIgdG8gYXBwZWFyLgogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICA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ICAgICAgICAqLwogICAgICAgIF9nZXREaXJlY3Rpb24oKSB7CiAgICAgICAgICAgIHJldHVybiAodGhpcy5fZGlyICYmIHRoaXMuX2Rpci52YWx1ZSA9PSAncnRsJykgPyAncnRsJyA6ICdsdHInOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25Jbml0KCkgewogICAgICAgICAgICB0aGlzLl9mb2N1c01vbml0b3IKICAgICAgICAgICAgICAgIC5tb25pdG9yKHRoaXMuX2VsZW1lbnRSZWYsIHRydWUpCiAgICAgICAgICAgICAgICAuc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBvcmlnaW4KICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChvcmlnaW4pID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuX2lzQWN0aXZlID0gISFvcmlnaW4gJiYgb3JpZ2luICE9PSAna2V5Ym9hcmQnOwogICAgICAgICAgICAgICAgdGhpcy5fY2hhbmdlRGV0ZWN0b3JSZWYuZGV0ZWN0Q2hhbmdlcygpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIGlmICh0aGlzLl9kaXIpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2RpckNoYW5nZVN1YnNjcmlwdGlvbiA9IHRoaXMuX2Rpci5jaGFuZ2Uuc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9jaGFuZ2VEZXRlY3RvclJlZi5tYXJrRm9yQ2hlY2soKTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5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W4uCiAgICAgICAgICAgIHRoaXMuX3NsaWRlckRpbWVuc2lvbnMgPSB0aGlzLl9nZXRTbGlkZXJEaW1lbnNpb25zKCk7CiAgICAgICAgICAgIHRoaXMuX3VwZGF0ZVRpY2tJbnRlcnZhbFBlcmNlbnQoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfb25Gb2N1cygpIHsKICAgICAgICAgICAgLy8gV2Ugc2F2ZSB0aGUgZGltZW5zaW9ucyBvZiB0aGUgc2xpZGVyIGhlcmUgc28gd2UgY2FuIHVzZSB0aGVtIHRvIHVwZGF0ZSB0aGUgc3BhY2luZyBvZiB0aGUKICAgICAgICAgICAgLy8gdGlja3MgYW5kIGRldGVybWluZSB3aGVyZSBvbiB0aGUgc2xpZGVyIGNsaWNrIGFuZCBzbGlkZSBldmVudHMgaGFwcGVuLgogICAgICAgICAgICB0aGlzLl9zbGlkZXJEaW1lbnNpb25zID0gdGhpcy5fZ2V0U2xpZGVyRGltZW5zaW9ucygpOwogICAgICAgICAgICB0aGlzLl91cGRhdGVUaWNrSW50ZXJ2YWxQZXJjZW50KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX29uQmx1cigpIHsKICAgICAgICAgICAgdGhpcy5vblRvdWNoZWQoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBldmVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX29uS2V5ZG93bihldmVudCkgewogICAgICAgICAgICBpZiAodGhpcy5kaXNhYmxlZCB8fCBoYXNNb2RpZmllcktleShldmVudCkpIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG9sZFZhbHVlID0gdGhpcy52YWx1ZTsKICAgICAgICAgICAgc3dpdGNoIChldmVudC5rZXlDb2RlKSB7CiAgICAgICAgICAgICAgICBjYXNlIFBBR0VfVVA6CiAgICAgICAgICAgICAgICAgICAgdGhpcy5faW5jcmVtZW50KDEwKTsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIGNhc2UgUEFHRV9ET1dOOgogICAgICAgICAgICAgICAgICAgIHRoaXMuX2luY3JlbWVudCgtMTApOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgY2FzZSBFTkQ6CiAgICAgICAgICAgICAgICAgICAgdGhpcy52YWx1ZSA9IHRoaXMubWF4OwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgY2FzZSBIT01FOgogICAgICAgICAgICAgICAgICAgIHRoaXMudmFsdWUgPSB0aGlzLm1pbjsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIGNhc2UgTEVGVF9BUlJPVzoKICAgICAgICAgICAgICAgICAgICAvLyBOT1RFOiBGb3IgYSBzaWdodGVkIHVzZXIgaXQgd291bGQgbWFrZSBtb3JlIHNlbnNlIHRoYXQgd2hlbiB0aGV5IHByZXNzIGFuIGFycm93IGtleSBvbiBhbgogICAgICAgICAgICAgICAgICAgIC8vIGludmVydGVkIHNsaWRlciB0aGUgdGh1bWIgbW92ZXMgaW4gdGhhdCBkaXJlY3Rpb24uIEhvd2V2ZXIgZm9yIGEgYmxpbmQgdXNlciwgbm90aGluZwogICAgICAgICAgICAgICAgICAgIC8vIGFib3V0IHRoZSBzbGlkZXIgaW5kaWNhdGVzIHRoYXQgaXQgaXMgaW52ZXJ0ZWQuIFRoZXkgd2lsbCBleHBlY3QgbGVmdCB0byBiZSBkZWNyZW1lbnQsCiAgICAgICAgICAgICAgICAgICAgLy8gcmVnYXJkbGVzcyBvZiBob3cgaXQgYXBwZWFycyBvbiB0aGUgc2NyZWVuLiBGb3Igc3B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Y3JlbWVudCgtMSk7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICAgICAgIC8vIFJldHVybiBpZiB0aGUga2V5IGlzIG5vdCBvbmUgdGhhdCB3ZSBleHBsaWNpdGx5IGhhbmRsZSB0byBhdm9pZCBjYWxsaW5nIHByZXZlbnREZWZhdWx0IG9uCiAgICAgICAgICAgICAgICAgICAgLy8gaXQuCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChvbGRWYWx1ZSAhPSB0aGlzLnZhbHVlKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9lbWl0SW5wdXRFdmVudCgpOwogICAgICAgICAgICAgICAgdGhpcy5fZW1pdENoYW5nZUV2ZW50KCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5faXNTbGlkaW5nID0gdHJ1ZTsKICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfb25LZXl1cCgpIHsKICAgICAgICAgICAgdGhpcy5faXNTbGlkaW5nID0gZmFsc2U7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFVzZSBkZWZhdWx0VmlldyBvZiBpbmplY3RlZCBkb2N1bWVudCBpZiBhdmFpbGFibGUgb3IgZmFsbGJhY2sgdG8gZ2xvYmFsIHdpbmRvdyByZWZlcmVuY2UKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2dldFdpbmRvdygpIHsKICAgICAgICAgICAgdmFyIF9hOwogICAgICAgICAgICByZXR1cm4gKChfYSA9IHRoaXMuX2RvY3VtZW50KSA9PT0gbnVsbCB8fCBfYSA9PT0gdm9pZCAwID8gdm9pZCAwIDogX2EuZG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gICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBtb3ZlRXZlbnROYW1lID0gaXNUb3VjaCA/ICd0b3VjaG1vdmUnIDogJ21vdXNlbW92ZSc7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBlbmRFdmVudE5hbWUgPSBpc1RvdWNoID8gJ3RvdWNoZW5kJyA6ICdtb3VzZXVwJzsKICAgICAgICAgICAgICAgIGRvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIobW92ZUV2ZW50TmFtZSwgdGhpcy5fcG9pbnRlck1vdmUsIGFjdGl2ZUV2ZW50T3B0aW9ucyk7CiAgICAgICAgICAgICAgICBkb2N1bWVudC5hZGRFdmVudExpc3RlbmVyKGVuZEV2ZW50TmFtZSwgdGhpcy5fcG9pbnRlclVwLCBhY3RpdmVFdmVudE9wdGlvbnMpOwogICAgICAgICAgICAgICAgaWYgKGlzVG91Y2gpIHsKICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5hZGRFdmVudExpc3RlbmVyKCd0b3VjaGNhbmNlbCcsIHRoaXMuX3BvaW50ZXJVcCwgYWN0aXZlRXZlbnRPcHRpb25zKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHdpbmRvdyA9IHRoaXMuX2dldFdpbmRvdygpOwogICAgICAgICAgICBpZiAodHlwZW9mIHdpbmRvdyAhPT0gJ3VuZGVmaW5lZCcgJiYgd2luZG93KSB7CiAgICAgICAgICAgICAgICB3aW5kb3cuYWRkRXZlbnRMaXN0ZW5lcignYmx1cicsIHRoaXMuX3dpbmRvd0JsdXIpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJlbW92ZXMgYW55IGdsb2JhbCBldmVudCBsaXN0ZW5lcnMgdGhhdCB3ZSBtYXkgaGF2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ZpbmVkJyAmJiB3aW5kb3cpIHsKICAgICAgICAgICAgICAgIHdpbmRvdy5yZW1vdmVFdmVudExpc3RlbmVyKCdibHVyJywgdGhpcy5fd2luZG93Qmx1cik7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogSW5jcmVtZW50cyB0aGUgc2xpZGVyIGJ5IHRoZSBnaXZlbiBudW1iZXIgb2Ygc3RlcHMgKG5lZ2F0aXZlIG51bWJlciBkZWNyZW1lbnRzKS4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gbnVtU3RlcHMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9pbmNyZW1lbnQobnVtU3RlcHMpIHsKICAgICAgICAgICAgdGhpcy52YWx1ZSA9IHRoaXMuX2NsYW1wKCh0aGlzLnZhbHVlIHx8IDApICsgdGhpcy5zdGVwICogbnVtU3RlcHMsIHRoaXMubWluLCB0aGlzLm1heCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENhbGN1bGF0ZSB0aGUgbmV3IHZhbHVlIGZyb20gdGhlIG5ldyBwaHlzaWNhbCBsb2NhdGlvbi4gVGhlIHZhbHVlIHdpbGwgYWx3YXlzIGJlIHNuYXBwZWQuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHBvcwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3VwZGF0ZVZhbHVlRnJvbVBvc2l0aW9uKHBvcykgewogICAgICAgICAgICBpZiAoIXRoaXMuX3NsaWRlckRpbWVuc2lvbnMpIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBvZmZzZXQgPSB0aGlzLnZlcnRpY2FsID8gdGhpcy5fc2xpZGVyRGltZW5zaW9ucy50b3AgOi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ncyBwb2ludGVyIGNsb3Nlci4KICAgICAgICAgICAgaWYgKHBlcmNlbnQgPT09IDApIHsKICAgICAgICAgICAgICAgIHRoaXMudmFsdWUgPSB0aGlzLm1pbjsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChwZXJjZW50ID09PSAxKSB7CiAgICAgICAgICAgICAgICB0aGlzLnZhbHVlID0gdGhpcy5tYXg7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBleGFjdFZhbHVlID0gdGhpcy5fY2FsY3VsYXRlVmFsdWUocGVyY2VudCk7CiAgICAgICAgICAgICAgICAvLyBUaGlzIGNhbGN1bGF0aW9uIGZpbmRzIHRoZSBjbG9zZXN0IHN0ZXAgYnkgZmluZGluZyB0aGUgY2xvc2VzdAogICAgICAgICAgICAgICAgLy8gd2hvbGUgbnVtYmVyIGRpdmlzaWJsZSBieSB0aGUgc3RlcCByZWxhdGl2ZSB0byB0aGUgbWluLgogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgY2xvc2VzdFZhbHVlID0gTWF0aC5yb3VuZCgoZXhhY3RWYWx1ZSAtIHRoaXMubWluKSAvIHRoaXMuc3RlcCkgKiB0aGlzLnN0ZXAgKyB0aGlzLm1pbjsKICAgICAgICAgICAgICAgIC8vIFRoZSB2YWx1ZSBuZWVkcyB0byBzbmFwIHRvIHRoZSBtaW4gYW5kIG1heC4KICAgICAgICAgICAgICAgIHRoaXMudmFsdWUgPSB0aGlzLl9jbGFtcChjbG9zZXN0VmFsdWUsIHRoaXMubWluLCB0aGlzLm1heCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogRW1pdHMgYSBjaGFuZ2UgZXZlbnQgaWYgdGhlIGN1cnJlbnQgdmFsdWUgaXMgZGlmZmVyZW50IGZyb20gdGhlIGxhc3QgZW1pdHRlZCB2YWx1ZS4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2VtaXRDaGFuZ2VFdmVudCgpIHsKICAgICAgICAgICAgdGhpcy5fY29udHJvbFZhbHVlQWNjZXNzb3JDaGFuZ2VGbih0aGlzLnZhbHVlKTsKICAgICAgICAgICAgdGhpcy52YWx1ZUNoYW5nZS5lbWl0KHRoaXMudmFsdWUpOwogICAgICAgICAgICB0aGlzLmNoYW5nZS5lbWl0KHRoaXMuX2NyZWF0ZUNoYW5nZUV2ZW50KCkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBFbWl0cyBhbiBpbnB1dCBldmVudCB3aGVuIHRoZSBjdXJyZW50IHZhbHVlIGlzIGRpZmZlcmVudCBmcm9tIHRoZSBsYXN0IGVtaXR0ZWQgdmFsdWUuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9lbWl0SW5wdXRFdmVudCgpIHsKICAgICAgICAgICAgdGhpcy5pbnB1dC5lbWl0KHRoaXMuX2NyZWF0ZUNoYW5nZUV2ZW50KCkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBVcGRhdGVzIHRoZSBhbW91bnQgb2Ygc3BhY2UgYmV0d2VlbiB0aWNrcyBhcyBhIHBlcmNlbnRhZ2Ugb2YgdGhlIHdpZHRoIG9mIHRoZSBzbGlkZXIuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF91cGRhdGVUaWNrSW50ZXJ2YWxQZXJjZW50KCkgewogICAgICAgICAgICBpZiAoIXRoaXMudGlja0ludGVydmFsIHx8ICF0aGlzLl9zbGlkZXJEaW1lbnNpb25zKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHRoaXMudGlja0ludGVydmFsID09ICdhdXRvJykgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IHRyYWNrU2l6ZSA9IHRoaXMudmVydGljYWwgPyB0aGlzLl9zbGlkZXJEaW1lbnNpb25zLmhlaWdodCA6IHRoaXMuX3NsaWRlckRpbWVuc2lvbnMud2lkdGg7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBsZXQgcGl4ZWxzUGVyU3RlcCA9IHRyYWNrU2l6ZSAqIHRoaXMuc3RlcCAvICh0aGlzLm1heCAtIHRoaXMubWluKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCBzdGVwc1BlclRpY2sgPSBNYXRoLmNlaWwoTUlOX0FVVE9fVElDS19TRVBBUkFUSU9OIC8gcGl4ZWxzUGVyU3RlcCk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBsZXQgcGl4ZWxzUGVyVGljayA9IHN0ZXBzUGVyVGljayAqIHRoaXMuc3RlcDsKICAgICAgICAgICAgICAgIHRoaXMuX3RpY2tJbnRlcnZhbFBlcmNlbnQgPSBwaXhlbHNQZXJUaWNrIC8gdHJhY2tTaXplOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fdGlja0ludGVydmFsUGVyY2VudCA9IHRoaXMudGlja0ludGVydmFsICogdGhpcy5zdGVwIC8gKHRoaXMubWF4IC0gdGhpcy5taW4pOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYSBzbGlkZXIgY2hhbmdlIG9iamVjdCBmcm9tIHRoZSBzcGVjaWZpZWQgdmFsdWUuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez89fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2NyZWF0ZUNoYW5nZUV2ZW50KHZhbHVlID0gdGhpcy52YWx1ZSkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBldmVudCA9IG5ldyBNYXRTbGlkZXJDaGFuZ2UoKTsKICAgICAgICAgICAgZXZlbnQuc291cmNlID0gdGhpczsKICAgICAgICAgICAgZXZlbnQudmFsdWUgPSB2YWx1ZTsKICAgICAgICAgICAgcmV0dXJuIGV2ZW50OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDYWxjdWxhdGVzIHRoZSBwZXJjZW50YWdlIG9mIHRoZSBzbGlkZXIgdGhhdCBhIHZhbHVlIGlzLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2NhbGN1bGF0ZVBlcmNlbnRhZ2UodmFsdWUpIHsKICAgICAgICAgICAgcmV0dXJuICgodmFsdWUgfHwgMCkgLSB0aGlzLm1pbikgLyAodGhpcy5tYXggLSB0aGlzLm1pbik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENhbGN1bGF0ZXMgdGhlIHZhbHVlIGEgcGVyY2VudGFnZSBvZiB0aGUgc2xpZGVyIGNvcnJlc3BvbmRzIHRvLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBwZXJjZW50YWdlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfY2FsY3VsYXRlVmFsdWUocGVyY2VudGFnZSkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5taW4gKyBwZXJjZW50YWdlICogKHRoaXMubWF4IC0gdGhpcy5taW4pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZXR1cm4gYSBudW1iZXIgYmV0d2VlbiB0d28gbnVtYmVycy4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcGFyYW0gez89fSBtaW4KICAgICAgICAgKiBAcGFyYW0gez89fSBtYXgKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9jbGFtcCh2YWx1ZSwgbWluID0gMCwgbWF4ID0gMSkgewogICAgICAgICAgICByZXR1cm4gTWF0aC5tYXgobWluLCBNYXRoLm1pbih2YWx1ZSwgbWF4KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEdldCB0aGUgYm91bmRpbmcgY2xpZW50IHJlY3Qgb2YgdGhlIHNsaWRlciB0cmFjayBlbGVtZW50LgogICAgICAgICAqIFRoZSB0cmFjayBpcyB1c2VkIHJhdGhlciB0aGFuIHRoZSBuYXRpdmUgZWxlbWVudCB0byBpZ25vcmUgdGhlIGV4dHJhIHNwYWNlIHRoYXQgdGhlIHRodW1iIGNhbgogICAgICAgICAqIHRha2UgdXAuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9nZXRTbGlkZXJEaW1lbnNpb25zKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fc2xpZGVyV3JhcHBlciA/IHRoaXMuX3NsaWRlcldyYXBwZXIubmF0aXZlRWxlbWVudC5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKSA6IG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEZvY3VzZXMgdGhlIG5hdGl2ZSBlbGVtZW50LgogICAgICAgICAqIEN1cnJlbnRseSBvbmx5IHVzZWQgdG8gYWxsb3cgYSBibHVyIGV2ZW50IHRvIGZpcmUgYnV0IHdpbGwgYmUgdXNlZCB3aXRoIGtleWJvYXJkIGlucHV0IGxhdGVyLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/PX0gb3B0aW9ucwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2ZvY3VzSG9zdEVsZW1lbnQob3B0aW9ucykgewogICAgICAgICAgICB0aGlzLl9lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQuZm9jdXMob3B0aW9ucyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEJsdXJzIHRoZSBuYXRpdmUgZWxlbWVudC4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2JsdXJIb3N0RWxlbWVudCgpIHsKICAgICAgICAgICAgdGhpcy5fZWxlbWVudFJlZi5uYXRpdmVFbGVtZW50LmJsdXIoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUnVucyBhIGNhbGxiYWNrIGluc2lkZSBvZiB0aGUgTmdab25lLCBpZiBwb3NzaWJsZS4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9ydW5JbnNpZGVab25lKGZuKSB7CiAgICAgICAgICAgIC8vIEBicmVha2luZy1jaGFuZ2UgOS4wLjAgUmVtb3ZlIHRoaXMgZnVuY3Rpb24gb25jZSBgX25nWm9uZWAgaXMgYSByZXF1aXJlZCBwYXJhbWV0ZXIuCiAgICAgICAgICAgIHRoaXMuX25nWm9uZSA/IHRoaXMuX25nWm9uZS5ydW4oZm4pIDogZm4oKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUnVucyBhIGNhbGxiYWNrIG91dHNpZGUgb2YgdGhlIE5nWm9uZSwgaWYgcG9zc2libGUuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGZuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgIC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LCAiZGl2IiwgNik7CiAgICAgICAgICAgIMm1ybVlbGVtZW50RW5kKCk7CiAgICAgICAgICAgIMm1ybVlbGVtZW50U3RhcnQoNywgImRpdiIsIDcpOwogICAgICAgICAgICDJtcm1ZWxlbWVudCg4LCAiZGl2IiwgOCk7CiAgICAgICAgICAgIMm1ybVlbGVtZW50KDksICJkaXYiLCA5KTsKICAgICAgICAgICAgybXJtWVsZW1lbnRTdGFydCgxMCwgImRpdiIsIDEwKTsKICAgICAgICAgICAgybXJtWVsZW1lbnRTdGFydCgxMSwgInNwYW4iLCAxMSk7CiAgICAgICAgICAgIMm1ybV0ZXh0KDEyKTsKICAgICAgICAgICAgybXJtWVsZW1lbnRFbmQoKTsKICAgICAgICAgICAgybXJtWVsZW1lbnRFbmQoKTsKICAgICAgICAgICAgybXJtWVsZW1lbnRFbmQoKTsKICAgICAgICAgICAgybXJtWVsZW1lbnRFbmQoKTsKICAgICAgICB9IGlmIChyZiAmIDIpIHsKICAgICAgICAgICAgybXJtWFkdmFuY2UoMyk7CiAgICAgICAgICAgIMm1ybVwcm9wZXJ0eSgibmdTdHlsZSIsIGN0eC5fdHJhY2tCYWNrZ3JvdW5kU3R5bGVzKTsKICAgICAgICAgICAgybXJtWFkdmFuY2UoMSk7CiAgICAgICAgICAgIMm1ybVwcm9wZXJ0eSgibmdTdHlsZSIsIGN0eC5fdHJhY2tGaWxsU3R5bGVzKTsKICAgICAgICAgICAgybXJtWFkdmFuY2UoMSk7CiAgICAgICAgICAgIMm1ybVwcm9wZXJ0eSgibmdTdHlsZSIsIGN0eC5fdGlja3NDb250YWluZXJTdHlsZXMpOwogICAgICAgICAgICDJtcm1YWR2YW5jZSgxKTsKICAgICAgICAgICAgybXJtXByb3BlcnR5KCJuZ1N0eWxlIiwgY3R4Ll90aWNrc1N0eWxlcyk7CiAgICAgICAgICAgIMm1ybVhZHZhbmNlKDEpOwogICAgICAgICAgICDJtcm1cHJvcGVydHkoIm5nU3R5bGUiLCBjdHguX3RodW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tbnVsbCBkZWJ1Zy10ZW5zb3ItdmFsdWUgYXJyYXkgJyArCiAgICAgICAgICAgICAgICAgICAgICAgICd1bmRlciBOT19URU5TT1IgbW9kZScpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIHt9OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNhc2UgVGVuc29yRGVidWdNb2RlLkNVUlRfSEVBTFRIOiB7CiAgICAgICAgICAgICAgICBpZiAoYXJyYXkgPT09IG51bGwgfHwgYXJyYXkubGVuZ3RoICE9PSAyKSB7CiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBVbmRlciBDVVJUX0hFQUxUSCBtb2RlLCBleHBlY3RlZCBkZWJ1Zy10ZW5zb3ItdmFsdWUgYXJyYXkgYCArCiAgICAgICAgICAgICAgICAgICAgICAgIGB0byBoYXZlIGxlbmd0aCAyLCBidXQgZ290ICR7SlNPTi5zdHJpbmdpZnkoYXJyYXkpfWApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgICAgICBoYXNJbmZPck5hTjogQm9vbGVhbihhcnJheVsxXSksCiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNhc2UgVGVuc29yRGVidWdNb2RlLkNPTkNJU0VfSEVBTFRIOiB7CiAgICAgICAgICAgICAgICBpZiAoYXJyYXkgPT09IG51bGwgfHwgYXJyYXkubGVuZ3RoICE9PSA1KSB7CiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBVbmRlciBDT05DSVNFX0hFQUxUSCBtb2RlLCBleHBlY3RlZCBkZWJ1Zy10ZW5zb3ItdmFsdWUgYXJyYXkgYCArCiAgICAgICAgICAgICAgICAgICAgICAgIGB0byBoYXZlIGxlbmd0aCA1LCBidXQgZ290ICR7SlNPTi5zdHJpbmdpZnkoYXJyYXkpfWApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgdmFsdWUgPSB7CiAgICAgICAgICAgICAgICAgICAgc2l6ZTogYXJyYXlbMV0sCiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgaWYgKGFycmF5WzJdID4gMCkgewogICAgICAgICAgICAgICAgICAgIHZhbHVlLm51bU5lZ2F0aXZlSW5mcyA9IGFycmF5WzJdOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKGFycmF5WzNdID4gMCkgewogICAgICAgICAgICAgICAgICAgIHZhbHVlLm51bVBvc2l0aXZlSW5mcyA9IGFycmF5WzNdOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKGFycmF5WzRdID4gMCkgewogICAgICAgICAgICAgICAgICAgIHZhbHVlLm51bU5hTnMgPSBhcnJheVs0XTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiB2YWx1ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBjYXNlIFRlbnNvckRlYnVnTW9kZS5TSEFQRTogewogICAgICAgICAgICAgICAgaWYgKGFycmF5ID09PSBudWxsIHx8IGFycmF5Lmxlbmd0aCAhPT0gMTApIHsKICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYFVuZGVyIFNIQVBFIG1vZGUsIGV4cGVjdGVkIGRlYnVnLXRlbnNvci12YWx1ZSBhcnJheSBgICsKICAgICAgICAgICAgICAgICAgICAgICAgYHRvIGhhdmUgbGVuZ3RoIDEwLCBidXQgZ290ICR7SlNPTi5zdHJpbmdpZnkoYXJyYXkpfWApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgcmFuayA9IGFycmF5WzJdOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IHNoYXBlID0gYXJyYXkuc2xpY2UoNCwgTWF0aC5taW4oNCArIHJhbmssIGFycmF5Lmxlbmd0aCkpOwogICAgICAgICAgICAgICAgaWYgKHNoYXBlLmxlbmd0aCA8IHJhbmspIHsKICAgICAgICAgICAgICAgICAgICAvLyBUaGUgU0hBUEUgbW9kZSB0cnVuY2F0ZXMgdGhlIHNoYXBlIGF0IGhlYWQuCiAgICAgICAgICAgICAgICAgICAgc2hhcGUgPSBuZXcgQXJyYXkocmFuayAtIHNoYXBlLmxlbmd0aCkuY29uY2F0KHNoYXBlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAgICAgZHR5cGU6IERUWVBFX0VOVU1fVE9fTkFNRVthcnJheVsxXV0sCiAgICAgICAgICAgICAgICAgICAgcmFuaywKICAgICAgICAgICAgICAgICAgICBzaXplOiBhcnJheVszXSwKICAgICAgICAgICAgICAgICAgICBzaGFwZSwKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY2FzZSBUZW5zb3JEZWJ1Z01vZGUuRlVMTF9IRUFMVEg6IHsKICAgICAgICAgICAgICAgIGlmIChhcnJheSA9PT0gbnVsbCB8fCBhcnJheS5sZW5ndGggIT09IDExKSB7CiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBVbmRlciBGVUxMX0hFQUxUSCBtb2RlLCBleHBlY3RlZCBkZWJ1Zy10ZW5zb3ItdmFsdWUgYXJyYXkgYCArCiAgICAgICAgICAgICAgICAgICAgICAgIGB0byBoYXZlIGxlbmd0aCAxMSwgYnV0IGdvdCAke0pTT04uc3RyaW5naWZ5KGFycmF5KX1gKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHJhbmsgPSBhcnJheVszXTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHZhbHVlID0gewogICAgICAgICAgICAgICAgICAgIGR0eXBlOiBEVFlQRV9FTlVNX1RPX05BTUVbYXJyYXlbMl1dLAogICAgICAgICAgICAgICAgICAgIHJhbmssCiAgICAgICAgICAgICAgICAgICAgc2l6ZTogYXJyYXlbNF0sCiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgaWYgKGFycmF5WzVdID4gMCkgewogICAgICAgICAgICAgICAgICAgIHZhbHVlLm51bU5lZ2F0aXZlSW5mcyA9IGFycmF5WzVdOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKGFycmF5WzZdID4gMCkgewogICAgICAgICAgICAgICAgICAgIHZhbHVlLm51bVBvc2l0aXZlSW5mcyA9IGFycmF5WzZdOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKGFycmF5WzddID4gMCkgewogICAgICAgICAgICAgICAgICAgIHZhbHVlLm51bU5hTnMgPSBhcnJheVs3XTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChhcnJheVs4XSA+IDApIHsKICAgICAgICAgICAgICAgICAgICB2YWx1ZS5udW1OZWdhdGl2ZUZpbml0ZXMgPSBhcnJheVs4XTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChhcnJheVs5XSA+IDApIHsKICAgICAgICAgICAgICAgICAgICB2YWx1ZS5udW1aZXJvcyA9IGFycmF5WzldOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKGFycmF5WzEwXSA+IDApIHsKICAgICAgICAgICAgICAgICAgICB2YWx1ZS5udW1Qb3NpdGl2ZUZpbml0ZXMgPSBhcnJheVsxMF07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gdmFsdWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY2FzZSBUZW5zb3JEZWJ1Z01vZGUuRlVMTF9URU5TT1I6I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gIC8qKiBAdHlwZSB7P30gKi8KICAgIGNvbnN0IGJhc2ljRGVidWdJbmZvU3R5bGUgPSBgCiAgOmhvc3QgewogICAgYmFja2dyb3VuZC1jb2xvcjogI2UzZTVlODsKICAgIGJvcmRlcjogMXB4IHNvbGlkICNjMGMwYzA7CiAgICBib3JkZXItcmFkaXVzOiA0cHg7CiAgICBmb250LWZhbWlseTogJ1JvYm90byBNb25vJywgbW9ub3NwYWNlOwogICAgaGVpZ2h0OiAxNHB4OwogICAgbGluZS1oZWlnaHQ6IDE0cHg7CiAgICBtYXJnaW46IDAgMnB4OwogICAgcGFkZGluZzogMXB4IDNweDsKICAgIHdpZHRoOiBtYXgtY29udGVudDsKICB9CmA7CiAgICBjbGFzcyBEZWJ1Z1RlbnNvckRUeXBlQ29tcG9uZW50IHsKICAgIH0KICAgIERlYnVnVGVuc29yRFR5cGVDb21wb25lbnQuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IENvbXBvbmVudCwgYXJnczogW3sKICAgICAgICAgICAgICAgICAgICBzZWxlY3RvcjogJ2RlYnVnLXRlbnNvci1kdHlwZScsCiAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU6IGAge3sgZHR5cGUgfX0gYCwKICAgICAgICAgICAgICAgICAgICBzdHlsZXM6IFtiYXNpY0RlYnVnSW5mb1N0eWxlXSwKICAgICAgICAgICAgICAgIH0sXSB9LAogICAgXTsKICAgIERlYnVnVGVuc29yRFR5cGVDb21wb25lbnQucHJvcERlY29yYXRvcnMgPSB7CiAgICAgICAgZHR5cGU6IFt7IHR5cGU6IElucHV0IH1dCiAgICB9OwogICAgLyoqIEBub2NvbGxhcHNlICovIERlYnVnVGVuc29yRFR5cGVDb21wb25lbnQuybVmYWMgPSBmdW5jdGlvbiBEZWJ1Z1RlbnNvckRUeXBlQ29tcG9uZW50X0ZhY3RvcnkodCkgeyByZXR1cm4gbmV3ICh0IHx8IERlYnVnVGVuc29yRFR5cGVDb21wb25lbnQpKCk7I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2xvcjogI2UzZTVlODtcbiAgICBib3JkZXI6IDFweCBzb2xpZCAjYzBjMGMwO1xuICAgIGJvcmRlci1yYWRpdXM6IDRweDtcbiAgICBmb250LWZhbWlseTogJ1JvYm90byBNb25vJywgbW9ub3NwYWNlO1xuICAgIGhlaWdodDogMTRweDtcbiAgICBsaW5lLWhlaWdodDogMTRweDtcbiAgICBtYXJnaW46IDAgMnB4O1xuICAgIHBhZGRpbmc6IDFweCAzcHg7XG4gICAgd2lkdGg6IG1heC1jb250ZW50O1xuICB9Il0gfSk7CiAgICBjbGFzcyBEZWJ1Z1RlbnNvclNoYXBlQ29tcG9uZW50IHsKICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBzaGFwZVN0cmluZygpIHsKICAgICAgICAgICAgcmV0dXJuICgnWycgKwogICAgICAgICAgICAgICAgdGhpcy5zaGFwZQogICAgICAgICAgICAgICAgICAgIC5tYXAoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBkaW0KICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChkaW0pID0+IHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGltID09PSB1bmRlZmluZWQgPyAnPycgOiBTdHJpbmcoZGltKTsKICAgICAgICAgICAgICAgIH0pKQogICAgICAgICAgICAgICAgICAgIC5qb2luKCcsJykgKwogICAgICAgICAgICAgICAgJ10nKTsKICAgICAgICB9CiAgICB9CiAgICBEZWJ1Z1RlbnNvclNoYXBlQ29tcG9uZW50LmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBDb21wb25lbnQsIGFyZ3M6IFt7CiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3I6ICdkZWJ1Zy10ZW5zb3Itc2hhcGUnLAogICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlOiBgIHNoYXBlOnt7IHNoYXBlU3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GMwYzA7XG4gICAgYm9yZGVyLXJhZGl1czogNHB4O1xuICAgIGZvbnQtZmFtaWx5OiAnUm9ib3RvIE1vbm8nLCBtb25vc3BhY2U7XG4gICAgaGVpZ2h0OiAxNHB4O1xuICAgIGxpbmUtaGVpZ2h0OiAxNHB4O1xuICAgIG1hcmdpbjogMCAycHg7XG4gICAgcGFkZGluZzogMXB4IDNweDtcbiAgICB3aWR0aDogbWF4LWNvbnRlbnQ7XG4gIH0iXSB9KTsKICAgIGNsYXNzIERlYnVnVGVuc29yTnVtZXJpY0JyZWFrZG93bkNvbXBvbmVudCB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgYnJlYWtkb3duRXhpc3RzKCkgewogICAgICAgICAgICByZXR1cm4gKHRoaXMubnVtTmFOcyAhPT0gdW5kZWZpbmVkIHx8CiAgICAgICAgICAgICAgICB0aGlzLm51bU5lZ2F0aXZlSW5mcyAhPT0gdW5kZWZpbmVkIHx8CiAgICAgICAgICAgICAgICB0aGlzLm51bVBvc2l0aXZlSW5mcyAhPT0gdW5kZWZpbmVkIHx8CiAgICAgICAgICAgICAgICB0aGlzLm51bU5lZ2F0aXZlRmluaXRlcyAhPT0gdW5kZWZpbmVkIHx8CiAgICAgICAgICAgICAgICB0aGlzLm51bVplcm9zICE9PSB1bmRlZmluZWQgfHwKICAgICAgICAgICAgICAgIHRoaXMubnVtUG9zaXRpdmVGaW5pdGVzICE9PSB1bmRlZmluZWQpOwogICAgICAgIH0KICAgIH0KICAgIERlYnVnVGVuc29yTnVtZXJpY0JyZWFrZG93bkNvbXBvbmVudC5kZWNvcmF0b3JzID0gWwogICAgICAgIHsgdHlwZTogQ29tcG9uZW50LCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIHNlbGVjdG9yOiAnZGVidWctdGVuc29yLW51bWVyaWMtYnJlYWtkb3duJywKICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogYAogICAgPG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KICBgLAogICAgICAgICAgICAgICAgICAgIHN0eWxlczogWwogICAgICAgICAgICAgICAgICAgICAgICBgCiAgICAgIDpob3N0IHsKICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjZTNlNWU4OwogICAgICAgIGJvcmRlcjogMXB4IHNvbGlkICNjMGMwYzA7CiAgICAgICAgYm9yZGVyLXJhZGl1czogNHB4OwogICAgICAgIGZvbnQtZmFtaWx5OiAnUm9ib3RvIE1vbm8nLCBtb25vc3BhY2U7CiAgICAgICAgZm9udC1zaXplOiAxMHB4OwogICAgICAgIG1hcmdpbjogMCAycHg7CiAgICAgICAgcGFkZGluZzogMXB4OwogICAgICB9CiAgICAgIC5icmVhayB7CiAgICAgICAgZmxleC1iYXNpczogMTAwJTsKICAgICAgICB3aWR0aDogMDsKICAgICAgfQogICAgICAuc2l6ZSB7CiAgICAgICAgZGlzcGxheTogYmxvY2s7CiAgICAgICAgaGVpZ2h0OiAxMXB4OwogICAgICAgIGxpbmUtaGVpZ2h0OiAxMXB4OwogICAgICAgIG1hcmdpbjogMCAzcHg7CiAgICAgICAgdmVydGljYWwtYWxpZ246IG1pZGRsZTsKICAgICAgfQogICAgICAuYnJlYWtkb3duIHsKICAgICAgICBib3JkZXItdG9wOiAxcHggc29saWQgcmdiYSgwLCAwLCAwLCAwLjEyKTsKICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgIGhlaWdodDogMTFweDsKICAgICAgICBsaW5lLWhlaWdodDogMTFweDsKICAgICAgICBwYWRkaW5nOiAycHg7CiAgICAgICAgdmVydGljYWwtYWxpZ246IG1pZGRsZTsKICAgICAgfQogICAgICAuY2F0ZWdvcnkgewogICAgICAgIG1hcmdpbi1ib3R0b206IDJweDsKICAgICAgICBtYXJnaW4tbGVmdDogNHB4OwogICAgICAgIG1hcmdpbi10b3A6IDJweDsKICAgICAgICBoZWlndGg6IDEwMCU7CiAgICAgICAgd2lkdGg6IG1heC1jb250ZW50OwogICAgICB9CiAgICAgIC5jYXRlZ29yeS10YWcgewogICAgICAgIGJvcmRlci1yYWRpdXM6IDJweDsKICAgICAgICBwYWRkaW5nOiAwIDJweDsKICAgICAgfQogICAgICAuZmluaXRlIHsKICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjYWFhOwogICAgICAgIGNvbG9yOiAjZmVmZWZlOwogICAgICB9CiAgICAgIC5pbmZpbml0ZSB7CiAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogI2U1MjU5MjsKICAgICAgICBjb2xvcjogI2ZmZjsKICAgICAgfQogICAgYCwKICAgICAgICAgICAgICAgICAgICBdLAogICAgICAgICAgICAgICAgfSxdIH0sCiAgICBdOwogICAgRGVidWdUZW5zb3JOdW1lcmljQnJlYWtkb3duQ29tcG9uZW50LnByb3BEZWNvcmF0b3JzID0gewogICAgICAgIHNpemU6IFt7IHR5cGU6IElucHV0IH1dLAogICAgICAgIG51bU5hTnM6IFt7IHR5cGU6IElucHV0IH1dLAogICAgICAgIG51bU5lZ2F0aXZlSW5mczogW3sgdHlwZTogSW5wdXQgfV0sCiAgICAgICAgbnVtUG9zaXRpdmVJbmZzOiBbeyB0eXBlOiBJbnB1dCB9XSwKICAgICAgICBudW1OZWdhdGl2ZUZpbml0ZXM6IFt7IHR5cGU6IElucHV0IH1dLAogICAgICAgIG51bVplcm9zOiBbeyB0eXBlOiBJbnB1dCB9XSwKICAgICAgICBudW1Qb3NpdGl2ZUZpbml0ZXM6IFt7IHR5cGU6IElucHV0IH1dCiAgICB9OwogICAgLyoqIEBub2NvbGxhcHNlICovIERlYnVnVGVuc29yTnVtZXJpY0JyZWFrZG93bkNvbXBvbmVudC7JtWZhYyA9IGZ1bmN0aW9uIERlYnVnVGVuc29yTnVtZXJpY0JyZWFrZG93bkNvbXBvbmVudF9GYWN0b3J5KHQpIHsgcmV0dXJuIG5ldyAodCB8fCBEZWJ1Z1RlbnNvck51bWVyaWNCcmVha2Rvd25Db21wb25lbnQpKCk7IH07CiAgICAvKiogQG5vY29sbGFwc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IiwgMCk7CiAgICAgICAgICAgIMm1ybVlbGVtZW50U3RhcnQoMSwgInNwYW4iKTsKICAgICAgICAgICAgybXJtXRleHQoMiwgInNpemU6Iik7CiAgICAgICAgICAgIMm1ybVlbGVtZW50RW5kKCk7CiAgICAgICAgICAgIMm1ybVlbGVtZW50U3RhcnQoMywgInNwYW4iLCAxKTsKICAgICAgICAgICAgybXJtXRleHQoNCk7CiAgICAgICAgICAgIMm1ybVlbGVtZW50RW5kKCk7CiAgICAgICAgICAgIMm1ybVlbGVtZW50RW5kKCk7CiAgICAgICAgICAgIMm1ybV0ZW1wbGF0ZSg1LCBEZWJ1Z1RlbnNvck51bWVyaWNCcmVha2Rvd25Db21wb25lbnRfZGl2XzVfVGVtcGxhdGUsIDEsIDAsICJkaXYiLCAyKTsKICAgICAgICAgICAgybXJtXRlbXBsYXRlKDYsIERlYnVnVGVuc29yTnVtZXJpY0JyZWFrZG93bkNvbXBvbmVudF9kaXZfNl9UZW1wbGF0ZSwgNywgNiwgImRpdiIsIDMpOwogICAgICAgIH0gaWYgKHJmICYgMikgewogICAgICAgICAgICDJtcm1YWR2YW5jZSg0KTsKICAgICAgICAgICAgybXJtXRleHRJbnRlcnBvbGF0ZShjdHguc2l6ZSk7CiAgICAgICAgICAgIMm1ybVhZHZhbmNlKDEpOwogICAgICAgICAgICDJtcm1cHJvcGVydHkoIm5nSWYiLCBjdHguYnJlYWtkb3duRXhpc3RzKTsKICAgICAgICAgICAgybXJtWFkdmFuY2UoMSk7CiAgICAgICAgICAgIMm1ybVwcm9wZXJ0eSgibmdJZiIsIGN0eC5icmVha2Rvd25FeGlzdHMpOwogICAgICAgIH0gfSwgZGlyZWN0aXZlczogW05nSWZdLCBzdHlsZXM6IFsiW19uZ2hvc3QtJUNPTVAlXSB7XG4gICAgICAgIGJhY2tncm91bmQtY29sb3I6ICNlM2U1ZTg7XG4gICAgICAgIGJvcmRlcjogMXB4IHNvbGlkICNjMGMwYzA7XG4gICAgICAgIGJvcmRlci1yYWRpdXM6IDRweDtcbiAgICAgICAgZm9udC1mYW1pbHk6ICdSb2JvdG8gTW9ubycsIG1vbm9zcGFjZTtcbiAgICAgICAgZm9udC1zaXplOiAxMHB4O1xuICAgICAgICBtYXJnaW46IDAgMnB4O1xuICAgICAgICBwYWRkaW5nOiAxcHg7XG4gICAgICB9XG4gICAgICAuYnJlYWtbX25nY29udGVudC0lQ09NUCVdIHtcbiAgICAgICAgZmxleC1iYXNpczogMTAwJTtcbiAgICAgICAgd2lkdGg6IDA7XG4gICAgICB9XG4gICAgICAuc2l6ZVtfbmdjb250ZW50LSVDT01QJV0ge1xuICAgICAgICBkaXNwbGF5OiBibG9jaztcbiAgICAgICAgaGVpZ2h0OiAxMXB4O1xuICAgICAgICBsaW5lLWhlaWdodDogMTFweDtcbiAgICAgICAgbWFyZ2luOiAwIDNweDtcbiAgICAgICAgdmVydGljYWwtYWxpZ246IG1pZGRsZTtcbiAgICAgIH1cbiAgICAgIC5icmVha2Rvd25bX25nY29udGVudC0lQ09NUCVdIHtcbiAgICAgICAgYm9yZGVyLXRvcDogMXB4IHNvbGlkIHJnYmEoMCwgMCwgMCwgMC4xMik7XG4gICAgICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgICAgIGhlaWdodDogMTFweDtcbiAgICAgICAgbGluZS1oZWlnaHQ6IDExcHg7XG4gICAgICAgIHBhZGRpbmc6IDJweDtcbiAgICAgICAgdmVydGljYWwtYWxpZ246IG1pZGRsZTtcbiAgICAgIH1cbiAgICAgIC5jYXRlZ29yeVtfbmdjb250ZW50LSVDT01QJV0ge1xuICAgICAgICBtYXJnaW4tYm90dG9tOiAycHg7XG4gICAgICAgIG1hcmdpbi1sZWZ0OiA0cHg7XG4gICAgICAgIG1hcmdpbi10b3A6IDJweDtcbiAgICAgICAgaGVpZ3RoOiAxMDAlO1xuICAgICAgICB3aWR0aDogbWF4LWNvbnRlbnQ7XG4gICAgICB9XG4gICAgICAuY2F0ZWdvcnktdGFnW19uZ2NvbnRlbnQtJUNPTVAlXSB7XG4gICAgICAgIGJvcmRlci1yYWRpdXM6IDJweDtcbiAgICAgICAgcGFkZGluZzogMCAycHg7XG4gICAgICB9XG4gICAgICAuZmluaXRlW19uZ2NvbnRlbnQtJUNPTVAlXSB7XG4gICAgICAgIGJhY2tncm91bmQtY29sb3I6ICNhYWE7XG4gICAgICAgIGNvbG9yOiAjZmVmZWZlO1xuICAgICAgfVxuICAgICAgLmluZmluaXRlW19uZ2NvbnRlbnQtJUNPTVAlXSB7XG4gICAgICAgIGJhY2tncm91bmQtY29sb3I6ICNlNTI1OTI7XG4gICAgICAgIGNvbG9yOiAjZmZmO1xuICAgICAgfSJdIH0pOwogICAgY2xhc3MgRGVidWdUZW5zb3JIYXNJbmZPck5hTkNvbXBvbmVudCB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgaW5mb1N0cmluZygpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuaGFzSW5mT3JOYU4gPyAnSGFzIOKIni9OYU4nIDogJ05vIOKIni9OYU4nOwogICAgICAgIH0KICAgIH0KICAgIERlYnVnVGVuc29ySGFzSW5mT3JOYU5Db21wb25lbnQuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IENvbXBvbmVudCwgYXJnczogW3sKICAgICAgICAgICAgICAgICAgICBzZWxlY3RvcjogJ2RlYnVnLXRlbnNvci1oYXMtaW5mLW9yLW5hbicsCiAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU6IGAKICAgIDxkaXYgW25nQ2xhc3NdPSJbJ2NvbnRhaW5lcicsIGhhc0luZk9yTmFOID8gJ2hhcy1pbmYtb3ItbmFuJyA6ICcnXSI+CiAgICAgIHt7IGluZm9TdHJpbmcgfX0KICAgIDwvZGl2PgogIGAsCiAgICAgICAgICAgICAgICAgICAgc3R5bGVzOiBbCiAgICAgICAgICAgICAgICAgICAgICAgIGAKICAgICAgLmNvbnRhaW5lciB7CiAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogI2UzZTVlODsKICAgICAgICBib3JkZXI6IDFweCBzb2xpZCAjYzBjMGMwOwogICAgICAgIGJvcmRlci1yYWRpdXM6IDRweDsKICAgICAgICBjb2xvcjogIzY2NjY2NjsKICAgICAgICBmb250LWZhbWlseTogJ1JvYm90byBNb25vJywgbW9ub3NwYWNlOwogICAgICAgIGhlaWdodDogMTRweDsKICAgICAgICBsaW5lLWhlaWdodDogMTRweDsKICAgICAgICBtYXJnaW46IDAgMnB4OwogICAgICAgIHBhZGRpbmc6IDFweCAzcHg7CiAgICAgICAgd2lkdGg6IG1heC1jb250ZW50OwogICAgICB9CiAgICAgIC5oYXMtaW5mLW9yLW5hbiB7CiAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogI2U1MjU5MjsKICAgICAgICBjb2xvcjogI2ZmZjsKICAgICAgfQogICAgYCwKICAgICAgICAgICAgICAgICAgICBdLAogICAgICAgICAgICAgICAgfSxdIH0sCiAgICBdOwogICAgRGVidWdUZW5zb3JIYXNJbmZPck5hTkNvbXBvbmVudC5wcm9wRGVjb3JhdG9ycyA9IHsKICAgICAgICBoYXNJbmZPck5hTjogW3sgdHlwZTogSW5wdXQgfV0KICAgIH07CiAgICAvKiogQG5vY29sbGFwc2UgKi8gRGVidWdUZW5zb3JIYXNJbmZPck5hTkNvbXBvbmVudC7JtWZhYyA9IGZ1bmN0aW9uIERlYnVnVGVuc29ySGFzSW5mT3JOYU5Db21wb25lbnRfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgRGVidWdUZW5zb3JIYXNJbmZPck5hTkNvbXBvbmVudCkoKTsgfTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLyBEZWJ1Z1RlbnNvckhhc0luZk9yTmFOQ29tcG9uZW50Lsm1Y21wID0gybXJtWRlZmluZUNvbXBvbmVudCh7IHR5cGU6IERlYnVnVGVuc29ySGFzSW5mT3JOYU5Db21wb25lbnQsIHNlbGVjdG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HJpdmF0ZU1lbWJlcnMsdXNlbGVzc0NvZGV9IGNoZWNrZWQgYnkgdHNjCiAgICAgKi8KICAgIC8qKiBAdHlwZSB7P30gKi8KICAgIGNvbnN0IFVOS05PV05fRFRZUEVfTkFNRSA9ICdVbmtub3duIGR0eXBlJzsKICAgIGNsYXNzIEV4ZWN1dGlvbkRhdGFDb250YWluZXIgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gc3RvcmUKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihzdG9yZSkgewogICAgICAgICAgICB0aGlzLnN0b3JlID0gc3RvcmU7CiAgICAgICAgICAgIHRoaXMuZm9jdXNlZEV4ZWN1dGlvbkRhdGEkID0gdGhpcy5zdG9yZS5waXBlKHNlbGVjdChnZXRGb2N1c2VkRXhlY3V0aW9uRGF0YSkpOwogICAgICAgICAgICB0aGlzLnRlbnNvckRlYnVnTW9kZSQgPSB0aGlzLnN0b3JlLnBpcGUoc2VsZWN0KGNyZWF0ZVNlbGVjdG9yKGdldEZvY3VzZWRFeGVjdXRpb25EYXRhLCAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZXhlY3V0aW9uCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoZXhlY3V0aW9uKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAoZXhlY3V0aW9uID09PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFRlbnNvckRlYnVnTW9kZS5VTlNQRUNJRklFRDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBleGVjdXRpb24udGVuc29yX2RlYnVnX21vZGU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pKSkpOwogICAgICAgICAgICB0aGlzLmhhc0RlYnVnVGVuc29yVmFsdWVzJCA9IHRoaXMuc3RvcmUucGlwZShzZWxlY3QoY3JlYXRlU2VsZWN0b3IoZ2V0Rm9jdXNlZEV4ZWN1dGlvbkRhdGEsICgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBleGVjdXRpb24KICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChleGVjdXRpb24pID0+IHsKICAgICAgICAgICAgICAgIGlmIChleGVjdXRpb24gPT09IG51bGwgfHwgZXhlY3V0aW9uLmRlYnVnX3RlbnNvcl92YWx1ZXMgPT09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IHNpbmdsZURlYnVnVGVuc29yVmFsdWVzIG9mIGV4ZWN1dGlvbi5kZWJ1Z190ZW5zb3JfdmFsdWVzKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzaW5nbGVEZWJ1Z1RlbnNvclZhbHVlcyAhPT0gbnVsbCAmJgogICAgICAgICAgICAgICAgICAgICAgICAgICAgc2luZ2xlRGVidWdUZW5zb3JWYWx1ZXMubGVuZ3RoID4gMCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSkpKTsKICAgICAgICAgICAgdGhpcy5kZWJ1Z1RlbnNvclZhbHVlcyQgPSB0aGlzLnN0b3JlLnBpcGUoc2VsZWN0KGNyZWF0ZVNlbGVjdG9yKGdldEZvY3VzZWRFeGVjdXRpb25EYXRhLCAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZXhlY3V0aW9uCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoZXhlY3V0aW9uKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAoZXhlY3V0aW9uID09PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gZXhlY3V0aW9uLmRlYnVnX3RlbnNvcl92YWx1ZXM7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pKSkpOwogICAgICAgICAgICB0aGlzLmRlYnVnVGVuc29yRHR5cGVzJCA9IHRoaXMuc3RvcmUucGlwZShzZWxlY3QoY3JlYXRlU2VsZWN0b3IoZ2V0Rm9jdXNlZEV4ZWN1dGlvbkRhdGEsICgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBleGVjdXRpb24KICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChleGVjdXRpb24pID0+IHsKICAgICAgICAgICAgICAgIGlmIChleGVjdXRpb24gPT09IG51bGwgfHwgZXhlY3V0aW9uLmRlYnVnX3RlbnNvcl92YWx1ZXMgPT09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChleGVjdXRpb24udGVuc29yX2RlYnVnX21vZGUgIT09IFRlbnNvckRlYnVnTW9kZS5GVUxMX0hFQUxUSCAmJgogICAgICAgICAgICAgICAgICAgIGV4ZWN1dGlvbi50ZW5zb3JfZGVidWdfbW9kZSAhPT0gVGVuc29yRGVidWdNb2RlLlNIQVBFKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gVE9ETyhjYWlzKTogQWRkIGxvZ2ljIGZvciBvdGhlciBUZW5zb3JEZWJ1Z01vZGVzIHdpdGggZHR5cGUgaW5mby4KICAgICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGR0eXBlcyA9IFtdOwogICAgICAgICAgICAgICAgZm9yIChjb25zdCB0ZW5zb3JWYWx1ZSBvZiBleGVjdXRpb24uZGVidWdfdGVuc29yX3ZhbHVlcykgewogICAgICAgICAgICAgICAgICAgIGlmICh0ZW5zb3JWYWx1ZSA9PT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgICAgICBkdHlwZXMucHVzaChVTktOT1dOX0RUWVBFX05BTUUpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBkdHlwZUVudW0gPSBTdHJpbmcoZXhlY3V0aW9uLnRlbnNvcl9kZWJ1Z19tb2RlID09PSBUZW5zb3JEZWJ1Z01vZGUuRlVMTF9IRUFMVEgKICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gdGVuc29yVmFsdWVbMl0gLy8gdGVuc29yX2RlYnVnX21vZGU6IEZVTExfSEVBTFRICiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IHRlbnNvclZhbHVlWzFdIC8vIHRlbnNvcl9kZWJ1Z19tb2RlOiBTSEFQRQogICAgICAgICAgICAgICAgICAgICAgICApOwogICAgICAgICAgICAgICAgICAgICAgICBkdHlwZXMucHVzaChEVFlQRV9FTlVNX1RPX05BTUVbZHR5cGVFbnVtXSB8fCBVTktOT1dOX0RUWVBFX05BTUUpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiBkdHlwZXM7CiAgICAgICAgICAgIH0pKSkpOwogICAgICAgIH0KICAgIH0KICAgIEV4ZWN1dGlvbkRhdGFDb250YWluZXIuZGVjb3JhdG9ycyA9IFsKICAgICAg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VTID0gWwogICAgICAgICdfX2ZvcndhcmRfJywKICAgICAgICAnX19iYWNrd2FyZF8nLAogICAgICAgICdfX2luZmVyZW5jZV8nLAogICAgXTsKICAgIC8qKgogICAgICogR2V0IGEgZGlzcGxheSB2ZXJzaW9uIG9mIHRoZSBleGVjdXRpb24gZGlnZXN0LgogICAgICogQHBhcmFtIHs/fSBleGVjdXRpb25EaWdlc3QKICAgICAqIEBwYXJhbSB7Pz19IHN0ckxlbgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0RXhlY3V0aW9uRGlnZXN0Rm9yRGlzcGxheShleGVjdXRpb25EaWdlc3QsIHN0ckxlbiA9IDEpIHsKICAgICAgICBpZiAoIWV4ZWN1dGlvbkRpZ2VzdCkgewogICAgICAgICAgICAvLyBUaGUgZXhlY3V0aW9uIGRpZ2VzdCBhdCB0aGlzIGluZGV4IGhhc24ndCBiZWVuIGxvYWRlZCBmcm9tIHRoZSBkYXRhIHNvdXJjZS4KICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIG9wX3R5cGU6ICcoTi9BKScsCiAgICAgICAgICAgICAgICBzaG9ydF9vcF90eXBlOiAnLi4nLAogICAgICAgICAgICAgICAgaXNfZ3JhcGg6IGZhbHNlLAogICAgICAgICAgICB9OwogICAgICAgIH0KICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgZnVuY3Rpb25QcmVmaXhlcyA9IEZVTkNUSU9OX09QX1RZUEVfUFJFRklYRVMuZmlsdGVyKCgvKioKICAgICAgICAgKiBAcGFyYW0gez99IHByZWZpeAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgKHByZWZpeCkgPT4gZXhlY3V0aW9uRGlnZXN0Lm9wX3R5cGUuc3RhcnRzV2l0aChwcmVmaXgpKSk7CiAgICAgICAgaWYgKGZ1bmN0aW9uUHJlZml4ZXMubGVuZ3RoKSB7CiAgICAgICAgICAgIC8vIFRoaXMgaXMgdGhlIGV4ZWN1dGlvbiBvZiBhIHRmLmZ1bmN0aW9uIChGdW5jR3JhcGgpLgogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGZ1bmN0aW9uTmFtZVdpdGhTdWZmaXggPSBleGVjdXRpb25EaWdlc3Qub3BfdHlwZS5zbGljZShmdW5jdGlvblByZWZpeGVzWzBdLmxlbmd0aCk7CiAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICBvcF90eXBlOiBleGVjdXRpb25EaWdlc3Qub3BfdHlwZSwKICAgICAgICAgICAgICAgIHNob3J0X29wX3R5cGU6IGZ1bmN0aW9uTmFtZVdpdGhTdWZmaXguc2xpY2UoMCwgc3RyTGVuKSwKICAgICAgICAgICAgICAgIGlzX2dyYXBoOiB0cnVlLAogICAgICAgICAgICB9OwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIG9wX3R5cGU6IGV4ZWN1dGlvbkRpZ2VzdC5vcF90eXBlLAogICAgICAgICAgICAgICAgc2hvcnRfb3BfdHlwZTogZXhlY3V0aW9uRGlnZXN0Lm9wX3R5cGUuc2xpY2UoMCwgc3RyTGVuKSwKICAgICAgICAgICAgICAgIGlzX2dyYXBoOiBmYWxzZSwKICAgICAgICAgICAgfTsKICAgICAgICB9CiAgICB9CiAgICBjbGFzcyBUaW1lbGluZUNvbnRhaW5lciB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBzdG9yZQogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKHN0b3JlKSB7CiAgICAgICAgICAgIHRoaXMuc3RvcmUgPSBzdG9yZTsKICAgICAgICAgICAgdGhpcy5hY3RpdmVSdW5JZCQgPSB0aGlzLnN0b3JlLnBpcGUoc2VsZWN0KGdldEFjdGl2ZVJ1bklkKSk7CiAgICAgICAgICAgIHRoaXMubG9hZGluZ051bUV4ZWN1dGlvbnMkID0gdGhpcy5zdG9yZS5waXBlKHNlbGVjdChjcmVhdGVTZWxlY3RvcihnZXROdW1FeGVjdXRpb25zTG9hZGVkLCAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbG9hZGVkCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAobG9hZGVkKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gbG9hZGVkLnN0YXRlID09IERhdGFMb2FkU3RhdGUuTE9BRElORzsKICAgICAgICAgICAgfSkpKSk7CiAgICAgICAgICAgIHRoaXMuc2Nyb2xsQmVnaW5JbmRleCQgPSB0aGlzLnN0b3JlLnBpcGUoc2VsZWN0KGdldEV4ZWN1dGlvblNjcm9sbEJlZ2luSW5kZXgpKTsKICAgICAgICAgICAgdGhpcy5zY3JvbGxCZWdpbkluZGV4VXBwZXJMaW1pdCQgPSB0aGlzLnN0b3JlLnBpcGUoc2VsZWN0KGNyZWF0ZVNlbGVjdG9yKGdldE51bUV4ZWN1dGlvbnMsIGdldERpc3BsYXlDb3VudCwgKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IG51bUV4ZWN1dGlvbnMKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBkaXNwbGF5Q291bnQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChudW1FeGVjdXRpb25zLCBkaXNwbGF5Q291bnQpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiBNYXRoLm1heCgwLCBudW1FeGVjdXRpb25zIC0gZGlzcGxheUNvdW50KTsKICAgICAgICAgICAgfSkpKSk7CiAgICAgICAgICAgIHRoaXMucGFnZVNpemUkID0gdGhpcy5zdG9yZS5waXBlKHNlbGVjdChnZXRFeGVjdXRpb25QYWdlU2l6ZSkpOwogICAgICAgICAgICB0aGlzLmRpc3BsYXlDb3VudCQgPSB0aGlzLnN0b3JlLnBpcGU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pcGUoc2VsZWN0KGdldE51bUV4ZWN1dGlvbnMpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvbk5hdmlnYXRlTGVmdCgpIHsKICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChleGVjdXRpb25TY3JvbGxMZWZ0KCkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uTmF2aWdhdGVSaWdodCgpIHsKICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChleGVjdXRpb25TY3JvbGxSaWdodCgpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBpbmRleAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25FeGVjdXRpb25EaWdlc3RDbGlja2VkKGluZGV4KSB7CiAgICAgICAgICAgIHRoaXMuc3RvcmUuZGlzcGF0Y2goZXhlY3V0aW9uRGlnZXN0Rm9jdXNlZCh7IGRpc3BsYXlJbmRleDogaW5kZXggfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvblNsaWRlckNoYW5nZSh2YWx1ZSkgewogICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKGV4ZWN1dGlvblNjcm9sbFRvSW5kZXgoeyBpbmRleDogdmFsdWUgfSkpOwogICAgICAgIH0KICAgIH0KICAgIFRpbWVsaW5lQ29udGFpbmVyLmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBDb21wb25lbnQsIGFyZ3M6IFt7CiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3I6ICd0Zi1kZWJ1Z2dlci12Mi10aW1lbGluZScsCiAgICAgICAgICAg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FwaE9wQ29tcG9uZW50IHsKICAgICAgICBjb25zdHJ1Y3RvcigpIHsKICAgICAgICAgICAgdGhpcy5vbk9wTmFtZUNsaWNrID0gbmV3IEV2ZW50RW1pdHRlcigpOwogICAgICAgIH0KICAgIH0KICAgIEdyYXBoT3BDb21wb25lbnQuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IENvbXBvbmVudCwgYXJnczogW3sKICAgICAgICAgICAgICAgICAgICBzZWxlY3RvcjogJ2dyYXBoLW9wJywKICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZVVybDogJ2dyYXBoX29wX2NvbXBvbmVudC5uZy5odG1sJywKICAgICAgICAgICAgICAgICAgICBzdHlsZVVybHM6IFsnLi9ncmFwaF9vcF9jb21wb25lbnQuY3NzJ10sCiAgICAgICAgICAgICAgICB9LF0gfSwKICAgIF07CiAgICBHcmFwaE9wQ29tcG9uZW50LnByb3BEZWNvcmF0b3JzID0gewogICAgICAgIGtpbmQ6IFt7IHR5cGU6IElucHV0IH1dLAogICAgICAgIG9wTmFtZTogW3sgdHlwZTogSW5wdXQgfV0sCiAgICAgICAgc2xvdDogW3sgdHlwZTogSW5wdXQgfV0sCiAgICAgICAgb3BEYXRhOiBbeyB0eXBlOiBJbnB1dCB9XSwKICAgICAgICBvbk9wTmFtZUNsaWNrOiBbeyB0eXBlOiBPdXRwdXQgfV0KICAgIH07CiAgICAvKiogQG5vY29sbGFwc2UgKi8gR3JhcGhPcENvbXBvbmVudC7JtWZhYyA9IGZ1bmN0aW9uIEdyYXBoT3BDb21wb25lbnRfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgR3JhcGhPcENvbXBvbmVudCkoKTsgfTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLyBHcmFwaE9wQ29tcG9uZW50Lsm1Y21wID0gybXJtWRlZmluZUNvbXBvbmVudCh7IHR5cGU6IEdyYXBoT3BDb21wb25lbnQsIHNlbGVjdG9yczogW1siZ3JhcGgtb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0YXJ0KDMsICJzcGFuIik7CiAgICAgICAgICAgIMm1ybV0ZXh0KDQpOwogICAgICAgICAgICDJtcm1ZWxlbWVudEVuZCgpOwogICAgICAgICAgICDJtcm1ZWxlbWVudEVuZCgpOwogICAgICAgICAgICDJtcm1dGVtcGxhdGUoNSwgR3JhcGhPcENvbXBvbmVudF9kaXZfNV9UZW1wbGF0ZSwgNSwgNCwgImRpdiIsIDMpOwogICAgICAgICAgICDJtcm1ZWxlbWVudEVuZCgpOwogICAgICAgICAgICDJtcm1dGVtcGxhdGUoNiwgR3JhcGhPcENvbXBvbmVudF9kaXZfNl9UZW1wbGF0ZSwgMiwgMSwgImRpdiIsIDQpOwogICAgICAgICAgICDJtcm1dGVtcGxhdGUoNywgR3JhcGhPcENvbXBvbmVudF9uZ190ZW1wbGF0ZV83X1RlbXBsYXRlLCAyLCAwLCAibmctdGVtcGxhdGUiLCBudWxsLCA1LCDJtcm1dGVtcGxhdGVSZWZFeHRyYWN0b3IpOwogICAgICAgICAgICDJtcm1ZWxlbWVudEVuZCgpOwogICAgICAgIH0gaWYgKHJmICYgMikgewogICAgICAgICAgICBjb25zdCBfcjIgPSDJtcm1cmVmZXJlbmNlKDgpOwogICAgICAgICAgICDJtcm1YWR2YW5jZSgyKTsKICAgICAgICAgICAgybXJtXByb3BlcnR5KCJuZ0NsYXNzIiwgybXJtXB1cmVGdW5jdGlvbjEoNSwgX2MwJGcsIGN0eC5raW5kID09PSAic2VsZiIgPyAic2VsZi1vcC1uYW1lIiA6ICIiKSk7CiAgICAgICAgICAgIMm1ybVhZHZhbmNlKDIpOwogICAgICAgICAgICDJtcm1dGV4dEludGVycG9sYXRlKGN0eC5vcE5hbWUpOwogICAgICAgICAgICDJtcm1YWR2YW5jZSgxKTsKICAgICAgICAgICAgybXJtXByb3BlcnR5KCJuZ0lmIiwgY3R4LmtpbmQgIT09ICJzZWxmIik7CiAgICAgICAgICAgIMm1ybVhZHZhbmNlKDEpOwogICAgICAgICAgICDJtcm1cH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AgLyoqCiAgICAgICAgICogR2V0IHRoZSBJRCBvZiB0aGUgaW1tZWRpYXRlbHktZW5jbG9zaW5nIGdyYXBoIG9mIHRoZSBvcC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBncmFwaElkKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5vcEluZm8uZ3JhcGhfaWRzW3RoaXMub3BJbmZvLmdyYXBoX2lkcy5sZW5ndGggLSAxXTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVG90YWwgbnVtYmVyIG9mIGNvbnN1bWVycyBvZiBhbGwgb3V0cHV0IHRlbnNvcnMgb2YgdGhlIG9wLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHRvdGFsTnVtQ29uc3VtZXJzKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5jb25zdW1lck9wcy5yZWR1Y2UoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGNvdW50CiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gc2xvdENvbnN1bWVycwogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGNvdW50LCBzbG90Q29uc3VtZXJzKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gY291bnQgKyBzbG90Q29uc3VtZXJzLmxlbmd0aDsKICAgICAgICAgICAgfSksIDApOwogICAgICAgIH0KICAgIH0KICAgIEdyYXBoQ29tcG9uZW50LmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBDb21wb25lbnQsIGFyZ3M6IFt7CiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3I6ICdncmFwaC1jb21wb25lbnQnLAogICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlVXJsOiAnLi9ncmFwaF9jb21wb25lbnQubmcuaHRtbCcsCiAgICAgICAgICAgICAgICAgICAgc3R5bGVVcmxzO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cyBHcmFwaEV4ZWN1dGlvbnNDb21wb25lbnQgewogICAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgICAgICB0aGlzLm9uU2Nyb2xsZWRJbmRleENoYW5nZSA9IG5ldyBFdmVudEVtaXR0ZXIoKTsKICAgICAgICAgICAgdGhpcy5vblRlbnNvck5hbWVDbGljayA9IG5ldyBFdmVudEVtaXR0ZXIoKTsKICAgICAgICAgICAgdGhpcy5wYXJzZURlYnVnVGVuc29yVmFsdWUgPSBwYXJzZURlYnVnVGVuc29yVmFsdWU7CiAgICAgICAgICAgIHRoaXMuVEVTVF9PTkxZID0gewogICAgICAgICAgICAgICAgZ2V0Vmlld1BvcnQ6ICgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHRoaXMudmlld1BvcnQpLAogICAgICAgICAgICB9OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGNoYW5nZXMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25DaGFuZ2VzKGNoYW5nZXMpIHsKICAgICAgICAgICAgaWYgKHRoaXMudmlld1BvcnQgJiYKICAgICAgICAgICAgICAgIGNoYW5nZXNbJ2ZvY3VzSW5kZXgnXSAmJgogICAgICAgICAgICAgICAgY2hhbmdlc1snZm9jdXNJbmRleCddLmN1cnJlbnRWYWx1ZSAhPT0gbnVsbCkgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgcmFuZ2UgPSB0aGlzLnZpZXdQb3J0LmdldFJlbmRlcmVkUmFuZ2UoKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHNjcm9sbEluZGV4ID0gY2hhbmdlc1snZm9jdXNJbmRleCddLmN1cnJlbnRWYWx1ZTsKICAgICAgICAgICAgICAgIC8vIE1ha2Ugc3VyZSB0aGF0IHRoZSBpbmRleCBpcyBzY3JvbGxlZCB0byBvbmUgdGhpcmQgdGhlIHZpZXcgcG9ydC4KICAgICAgICAgICAgICAgIC8vIFRoaXMgaXMgbmljZXIgdGhhbiBzY3JvbGxpbmcgaXQgbWVyZWx5IHRvIHRoZSB0b3AuCiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCB0aGlyZFJhbmdlID0gTWF0aC5yb3VuZCgocmFuZ2UuZW5kIC0gcmFuZ2Uuc3RhcnQpIC8gMyk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCB0YXJnZXRJbmRleCA9IE1hdGgubWF4KHNjcm9sbEluZGV4IC0gdGhpcmRSYW5nZSwgMCk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCB1c2VTbW9vdGhTY3JvbGxpbmcgPSBzY3JvbGxJbmRleCA+PSByYW5nZS5zdGFydCAmJiBzY3JvbGxJbmRleCA8IHJhbmdlLmVuZDsKICAgICAgICAgICAgICAgIHRoaXMudmlld1BvcnQuc2Nyb2xsVG9JbmRleCh0YXJnZXRJbmRleCwgdXNlU21vb3RoU2Nyb2xsaW5nID8gJ3Ntb290aCcgOiB1bmRlZmluZWQpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZ3JhcGhFeGVjdXRpb25JbmRleAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0VGVuc29yTmFtZShncmFwaEV4ZWN1dGlvbkluZGV4KSB7CiAgICAgICAgICAgIHJldHVybiAoYCR7dGhpcy5ncmFwaEV4ZWN1dGlvbkRhdGFbZ3JhcGhFeGVjdXRpb25JbmRleF0ub3BfbmFtZX06YCArCiAgICAgICAgICAgICAgICBg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bnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICBjbGFzcyBHcmFwaEV4ZWN1dGlvbnNDb250YWluZXIgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gc3RvcmUKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihzdG9yZSkgewogICAgICAgICAgICB0aGlzLnN0b3JlID0gc3RvcmU7CiAgICAgICAgICAgIHRoaXMubnVtR3JhcGhFeGVjdXRpb25zJCA9IHRoaXMuc3RvcmUucGlwZShzZWxlY3QoZ2V0TnVtR3JhcGhFeGVjdXRpb25zKSk7CiAgICAgICAgICAgIHRoaXMuZ3JhcGhFeGVjdXRpb25EYXRhJCA9IHRoaXMuc3RvcmUucGlwZShzZWxlY3QoZ2V0R3JhcGhFeGVjdXRpb25EYXRhKSk7CiAgICAgICAgICAgIHRoaXMuZ3JhcGhFeGVjdXRpb25JbmRpY2VzJCA9IHRoaXMuc3RvcmUucGlwZShzZWxlY3QoY3JlYXRlU2VsZWN0b3IoZ2V0TnVtR3JhcGhFeGVjdXRpb25zLCAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbnVtR3JhcGhFeGVjdXRpb24KICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChudW1HcmFwaEV4ZWN1dGlvbikgPT4gewogICAgICAgICAgICAgICAgaWYgKG51bUdyYXBoRXhlY3V0aW9uID09PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gQXJyYXkuZnJvbSh7IGxlbmd0aDogbnVtR3JhcGhFeGVjdXRpb24gfSkubWFwKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gXwogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBpCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoXywgaSkgPT4gaSkpOwogICAgICAgICAgICB9KSkpKTsKICAgICAgICAgICAgdGhpcy5mb2N1c0luZGV4JCA9IHRoaXMuc3RvcmUucGlwZShzZWxlY3QoZ2V0R3JhcGhFeGVjdXRpb25Gb2N1c0luZGV4KSk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBJbmZlcnJlZCBncmFwaC1leGVjdXRpb24gaW5kaWNlcyB0aGF0IGJlbG9uZyB0byB0aGUgaW1tZWRpYXRlIGlucHV0cwogICAgICAgICAgICAgKiB0byB0aGUgY3VycmVudGx5LWZvY3VzZWQgZ3JhcGggb3AuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmZvY3VzSW5wdXRJbmRpY2VzJCA9IHRoaXMuc3RvcmUucGlwZShzZWxlY3QoZ2V0Rm9jdXNlZEdyYXBoRXhlY3V0aW9uSW5wdXRJbmRpY2VzKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gc2Nyb2xsZWRJbmRleAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25TY3JvbGxlZEluZGV4Q2hhbmdlKHNjcm9sbGVkSW5kZXgpIHsKICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChncmFwaEV4ZWN1dGlvblNjcm9sbFRvSW5kZXgoeyBpbmRleDogc2Nyb2xsZWRJbmRleCB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uVGVuc29yTmFtZUNsaWNrKGV2ZW50KSB7CiAgICAgICAgIC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mN0aW9uIGxvYWRNb25hY28oKSB7CiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHsKICAgICAgICAgICAgY29uc3Qgd2luZG93ID0gdXRpbHMkMS5nZXRXaW5kb3coKTsKICAgICAgICAgICAgaWYgKHdpbmRvdy5tb25hY28gIT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh3aW5kb3cucmVxdWlyZSkgewogICAgICAgICAgICAgICAgY29uc3QgcmVxdWlyZSA9IHdpbmRvdy5yZXF1aXJlOwogICAgICAgICAgICAgICAgcmVxdWlyZS5jb25maWcoewogICAgICAgICAgICAgICAgICAgIHBhdGhzOiB7CiAgICAgICAgICAgICAgICAgICAgICAgIFtNT05BQ09fUEFUSF9QUkVGSVhdOiBNT05BQ09fSU1QT1JUX1BBVEgsCiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgeWllbGQgcmVxdWlyZUFzUHJvbWlzZShbYCR7TU9OQUNPX1BBVEhfUFJFRklYfS9lZGl0b3IvZWRpdG9yLm1haW5gXSk7CiAgICAgICAgICAgICAgICB5aWVsZCByZXF1aXJlQXNQcm9taXNlKFsKICAgICAgICAgICAgICAgICAgICBgJHtNT05BQ09fUEFUSF9QUkVGSVh9L3B5dGhvbi9weXRob24uY29udHJpYnV0aW9uYCwKICAgICAgICAgICAgICAgIF0pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdsb2FkTW9uYWNvKCkgZmFpbGVkIGJlY2F1c2UgZnVuY3Rpb24gcmVxdWlyZSgpIGlzIHVuYXZhaWxhYmxlJyk7CiAgICAgICAgICAgIH0KICAgICAgICB9KTsKICAgIH0KCiAgICAvKioKICAgICAqIEBmaWxlb3Z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RoaXMubW9uYWNvID0gbnVsbDsKICAgICAgICAgICAgdGhpcy5lZGl0b3IgPSBudWxsOwogICAgICAgICAgICB0aGlzLmRlY29yYXRpb25zID0gW107CiAgICAgICAgICAgIHRoaXMubmdVbnN1YnNjcmliZSA9IG5ldyBTdWJqZWN0KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkluaXQoKSB7CiAgICAgICAgICAgIC8vIExpc3RlbiB0byB3aW5kb3cgcmVzaXplIGV2ZW50LiBXaGVuIHJlc2l6ZSBoYXBwZW5zLCByZS1sYXlvdXQKICAgICAgICAgICAgLy8gbW9uYWNvIGVkaXRvciwgc28gaXRzIHdpZHRoIGlzIGFsd2F5cyB1cC10by1kYXRlIHdpdGggcmVzcGVjdCB0bwogICAgICAgICAgICAvLyB0aGUgd2luZG93IHNpemUuIERvIHRoaXMgd2l0aCBgZGVib3VuY2UoKWAgdG8gcHJldmVudCByZS1sYXlvdXRpbmcKICAgICAgICAgICAgLy8gYXQgdG9vIGhpZ2ggYSByYXRlLgogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHJlc2l6ZVBpcGUgPSBmcm9tRXZlbnQod2luZG93LCAncmVzaXplJykKICAgICAgICAgICAgICAgIC5waXBlKHRha2VVbnRpbCh0aGlzLm5nVW5zdWJzY3JpYmUpLCBkZWJvdW5jZSgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiBpbnRlcnZhbChSRVNJWkVfREVCT1VOQ0VfSU5URVJBVkxfTVMpKSksIHRhcCgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5lZGl0b3IgIT09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLmVkaXRvci5sYXlvdXQoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSkpKQogICAgICAgICAgICAgICAgLnN1YnNjcmliZSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25EZXN0cm95KCkgewogICAgICAgICAgICB0aGlzLm5nVW5zdWJzY3JpYmUubmV4dCgpOwogICAgICAgICAgICB0aGlzLm5nVW5zdWJzY3JpYmUuY29tcGxldGUoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBjaGFuZ2VzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uQ2hhbmdlcyhjaGFuZ2VzKSB7CiAgICAgICAgICAgIGlmICh0aGlzLm1vbmFjbyA9PT0gbnVsbCkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgY3VycmVudExpbmVzID0gY2hhbmdlc1snbW9uYWNvJ10KICAgICAgICAgICAgICAgID8gdGhpcy5saW5lcwogICAgICAgICAgICAgICAgOiBjaGFuZ2VzWydsaW5lcyddCiAgICAgICAgICAgICAgICAgICAgPyBjaGFuZ2VzWydsaW5lcyddLmN1cnJlbnRWYWx1ZQogICAgICAgICAgICAgICAgICAgIDogbnVsbDsKICAgICAgICAgICAgaWYgKGN1cnJlbnRMaW5lcykgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgdmFsdWUgPSBjdXJyZW50TGluZXMuam9pbignXG4nKTsKICAgICAgICAgICAgICAgIGlmICh0aGlzLmVkaXRvciA9PT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuZWRpdG9yID0gdGhpcy5tb25hY28uZWRpdG9yLmNyZWF0ZSh0aGlzLmNvZGVWaWV3ZXJDb250YWluZXIubmF0aXZlRWxlbWVudCwgewogICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZSwKICAgICAgICAgICAgICAgICAgICAgICAgbGFuZ3VhZ2U6IERFRkFVTFRfQ09ERV9MQU5HVUFHRSwKICAgICAgICAgICAgICAgICAgICAgICAgcmVhZE9ubHk6IHRydWUsCiAgICAgICAgICAgICAgICAgICAgICAgIGZvbnRTaXplOiBERUZBVUxUX0NPREVfRk9OVF9TSVpFLAogICAgICAgICAgICAgICAgICAgICAgICBtaW5pbWFwOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbmFibGVkOiB0cnVlLAogICAgICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5lZGl0b3Iuc2V0VmFsdWUodmFsdWUpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgY3VycmVudEZvY3VzZWRMaW5lbm8gPSBjaGFuZ2VzWydtb25hY28nXQogICAgICAgICAgICAgICAgPyB0aGlzLmZvY3VzZWRMaW5lbm8KICAgICAgICAgICAgICAgIDogY2hhbmdlc1snZm9jdXNlZExpbmVubyddCiAgICAgICAgICAgICAgICAgICAgPyBjaGFuZ2VzWydmb2N1c2VkTGluZW5vJ10uY3VycmVudFZhbHVlCiAgICAgICAgICAgICAgICAgICAgOiBudWxsOwogICAgICAgICAgICBpZiAoY3VycmVudEZvY3VzZWRMaW5lbm8gJiYgdGhpcy5saW5lcyAmJiB0aGlzLm1vbmFjbyAhPT0gbnVsbCkgewogICAgICAgICAgICAgICAgdGhpcy5lZGl0b3IucmV2ZWFsTGluZUluQ2VudGVyKGN1cnJlbnRGb2N1c2VkTGluZW5vLCB0aGlzLm1vbmFjby5lZGl0b3IuU2Nyb2xsVHlwZS5TbW9vdGgpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgbGluZUxlbmd0aCA9IHRoaXMubGluZXNbY3VycmVudEZvY3VzZWRMaW5lbm8gLSAxXS5sZW5ndGg7CiAgICAgICAgICAgICAgICB0aGlzLmRlY29yYXRpb25zID0gdGhpcy5lZGl0b3IuZGVsdGFEZWNvcmF0aW9ucyh0aGlzLmRlY29yYXRpb25zLCBbCiAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICByYW5nZTogbmV3IHRoaXMubW9uYWNvLlJhbmdlKGN1cnJlbnRGb2N1c2VkTGluZW5vLCAxLCBjdXJyZW50Rm9jdXNlZExpbmVubywgMSksCiAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnM6IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzV2hvbGVMaW5lOiB0cnVlLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZXNEZWNvcmF0aW9uc0NsYXNzTmFtZTogJ2hpZ2hsaWdodC1ndXR0ZXInLAogICAgICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICByYW5nZTogbmV3IHRoaXMubW9uYWNvLlJhbmdlKGN1cnJlbnRGb2N1c2VkTGluZW5vLCAxLCBjdXJyZW50Rm9jdXNlZExpbmVubywgbGluZUxlbmd0aCArIDEpLAogICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmxpbmVDbGFzc05hbWU6ICdoaWdobGlnaHQtbGluZScsCiAgICAgICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIF0pOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQogICAgU291cmNlQ29kZUNvbXBvbmVudC5kZWNvcmF0b3JzID0gWwogICAgICAgIHsgdHlwZTogQ29tcG9uZW50LCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIHNlbGVjdG9yOiAnc291cmNlLWNvZGUtY29tcG9uZW50JywKICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZVVybDogJy4vc291cmNlX2NvZGVfY29tcG9uZW50Lm5nLmh0bWwnLAogICAgICAgICAgICAgICAgICAgIHN0eWxlVXJsczogWycuL3NvdXJjZV9jb2RlX2NvbXBvbmVudC5jc3MnXSwKICAgICAgICAgICAgICAgICAgICBjaGFuZ2VEZXRlY3Rpb246IENoYW5nZURldGVjdGlvblN0cmF0ZWd5Lk9uUHVzaCwKICAgICAgICAgICAgICAgIH0sXSB9LAogICAgXTsKICAgIFNvdXJjZUNvZGVDb21wb25lbnQucHJvcERlY29yYXRvcnMgPSB7CiAgICAgICAgbGluZXM6IFt7IHR5cGU6IElucHV0IH1dLAogICAgICAgIGZvY3VzZWRMaW5lbm86IFt7IHR5cGU6IElucHV0IH1dLAogICAgICAgIG1vbmFjbzogW3sgdHlwZTogSW5wdXQgfV0sCiAgICAgICAgY29kZVZpZXdlckNvbnRhaW5lcjogW3sgdHlwZTogVmlld0NoaWxkLCBhcmdzOiBbJ2NvZGVWaWV3ZXJDb250YWluZXInLCB7IHN0YXRpYzogdHJ1ZSwgcmVhZDogRWxlbWVudFJlZiB9LF0gfV0KICAgIH07CiAgICAvKiogQG5vY29sbGFwc2UgKi8gU291cmNlQ29kZUNvbXBvbmVudC7JtWZhYyA9IGZ1bmN0aW9uIFNvdXJjZUNvZGVDb21wb25lbnRfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgU291cmNlQ29kZUNvbXBvbmVudCkoKTsgfTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLyBTb3VyY2VDb2RlQ29tcG9uZW50Lsm1Y21wID0gybXJtWRlZmluZUNvbXBvbmVudCh7I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oKICAgICAqIC0gU2Nyb2xsIHRvIGFuZCBoaWdobGlnaHQgYSBnaXZlbiBsaW5lIGJ5IGl0cyBsaW5lIG51bWJlci4KICAgICAqCiAgICAgKiBUT0RPKGNhaXMpOiBBZGQgc3VwcG9ydCBmb3IgbGluZSBkZWNvcmF0aW9uIGFuZCBzeW1ib2wgZGVjb3JhdGlvbi4KICAgICAqCiAgICAgKiBVbmxpa2UgU291cmNlRmlsZXNDb21wb25lbnQsIFNvdXJjZUNvZGVDb250YWluZXIgaGFuZGxlcyBvbmx5IG9uZSBmaWxlIGF0IGEKICAgICAqIHRpbWUuCiAgICAgKi8KICAgIGNsYXNzIFNvdXJjZUNvZGVDb250YWluZXIgewogICAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgICAgICAvLyBMaW5lcyBvZiB0aGUgc291cmNlLWNvZGUgZmlsZSwgc3BsaXQgYXQgbGluZSBicmVha3MuCiAgICAgICAgICAgIHRoaXMubGluZXMgPSBudWxsOyAvLyBUT0RPKGNhaXMpOiBBZGQgc3Bpbm5lciBmb3IgYG51bGxgLgogICAgICAgICAgICAvLyBUT0RPKGNhaXMpOiBBZGQgc3Bpbm5lciBmb3IgYG51bGxgLgogICAgICAgICAgICAvLyBMaW5lIG51bWJlciB0byBzY3JvbGwgdG8gYW5kIGhpZ2hsaWdodCwgMS1iYXNlZC4KICAgICAgICAgICAgdGhpcy5mb2N1c2VkTGluZW5vID0gbnVsbDsKICAgICAgICAgICAgdGhpcy5tb25hY28kID0gbnVsbDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uSW5pdCgpIHsKICAgICAgICAgICAgdGhpcy5tb25hY28kID0gZnJvbShsb2FkTW9uYWNvKCkpLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHdpbmRvd1dpdGhSZXF1aXJlQW5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9IGlmIChyZiAmIDIpIHsKICAgICAgICBjb25zdCBjdHhfcjMgPSDJtcm1bmV4dENvbnRleHQoKTsKICAgICAgICDJtcm1cHJvcGVydHkoImxpbmVzIiwgY3R4X3IzLmZvY3VzZWRTb3VyY2VGaWxlQ29udGVudC5saW5lcykoImZvY3VzZWRMaW5lbm8iLCBjdHhfcjMuZm9jdXNlZFNvdXJjZUxpbmVTcGVjLmxpbmVubyk7CiAgICB9IH0KICAgIC8qKgogICAgICogUmVuZGVycyB0aGUgY29udGVudCBvZiBzb3VyY2UgZmlsZShzKS4KICAgICAqCiAgICAgKiBVbmxpa2UgYFNvdXJjZUNvZGVDb21wb25lbnRgLCB3aGljaCBkaXNwbGF5cyBvbmx5IHRoZSBjb250ZW50IG9mIGEgc2luZ2xlCiAgICAgKiBzb3VyY2UtY29kZSBmaWxlLCBgU291cmNlRmlsZXNDb21wb25lbnRgaXMgYXdhcmUgb2YgdGhlIG1ldGEtaW5mb3JtYXRvbiBhYm91dAogICAgICogdGhlIGZpbGVzIGJlaW5nIGRpc3BsYXllZCwgc3VjaCB0aGVpciBmaWxlIHBhdGhzLiBTdWNoIG1ldGEtaW5mb3JtYXRpb24gaXMKICAgICAqIGRpc3BsYXllZCBieSB0aGlzIGNvbXBvbmVudC4KICAgICAqLwogICAgY2xhc3MgU291cmNlRmlsZXNDb21wb25lbnQgewogICAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgICAgICB0aGlzLmZvY3VzZWRTb3VyY2VGaWxlQ29udGVudCA9IG51bGw7CiAgICAgICAgICAgIHRoaXMuZm9jdXNlZFNvdXJjZUxpbmVTcGVjID0gbnVsbDsKICAgICAgICB9CiAgICB9CiAgICBTb3VyY2VGaWxlc0NvbXBvbmVudC5kZWNvcmF0b3JzID0gWwogICAgICAgIHsgdHlwZTogQ29tcG9uZW50LCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIHNlbGVjdG9yOiAnc291cmNlLWZpbGVzLWNvbXBvbmVudCcsCiA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AgICAgICovCiAgICAgICAgbmdBZnRlclZpZXdDaGVja2VkKCkgewogICAgICAgICAgICBpZiAodGhpcy5zdGFja0ZyYW1lQXJyYXkgPT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc3RhY2tFbGVtZW50ID0gdGhpcy5zdGFja0ZyYW1lQXJyYXkubmF0aXZlRWxlbWVudDsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBmb2N1c2VkRnJhbWVFbGVtZW50ID0gc3RhY2tFbGVtZW50LnF1ZXJ5U2VsZWN0b3IoYC5mb2N1c2VkLXN0YWNrLWZyYW1lYCk7CiAgICAgICAgICAgIGlmIChmb2N1c2VkRnJhbWVFbGVtZW50ICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAvLyBTY3JvbGwgdGhlIGZvY3VzZWQgZnJhbWUgaW50byB2aWV3IHdoZW4gdGhlcmUgaXMgYSBmb2N1c2VkIGZyYW1lLgogICAgICAgICAgICAgICAgdGhpcy5zY3JvbGxUb0VsZW1lbnQoc3RhY2tFbGVtZW50LCBmb2N1c2VkRnJhbWVFbGVtZW50KTsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGxhc3RGcmFtZUVsZW1lbnQgPSBzdGFja0VsZW1lbnQucXVlcnlTZWxlY3RvcignLnN0YWNrLWZyYW1lLWNvbnRhaW5lcjpsYXN0LWNoaWxkJyk7CiAgICAgICAgICAgIGlmIChsYXN0RnJhbWVFbGVtZW50ICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICB0aGlzLnNjcm9sbFRvRWxlbWVudChzdGFja0VsZW1lbnQsIGxhc3RGcmFtZUVsZW1lbnQpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gcGFyZW50RWxlbWVudAogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2Nyb2xsVG9FbGVtZW50KHBhcmVudEVsZW1lbnQsIGVsZW1lbnQpIHsKICAgICAgICAgICAgcGFyZW50RWxlbWVudC5zY3JvbGxUb3AgPSBlbGVtZW50Lm9mZnNldFRvcDsKICAgICAgICB9CiAgICB9CiAgICBTdGFja1RyYWNlQ29tcG9uZW50LmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBDb21wb25lbnQsIGFyZ3M6IFt7CiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3I6ICdzdGFjay10cmFjZS1jb21wb25lbnQnLAogICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlVXJsOiAnLi9zdGFja190cmFjZV9jb21wb25lbnQubmcuaHRtbCcsCiAgICAgICAgICAgICAgICAgICAgc3R5bGVVcmxzOiBbJy4vc3RhY2tfdHJhY2VfY29tcG9uZW50LmNzcyddLAogICAgICAgICAgICAgICAgfSxdIH0sCiAgICBdOwogICAgU3RhY2tUcmFjZUNvbXBvbmVudC5wcm9wRGVjb3JhdG9ycyA9IHsKICAgICAgICBjb2RlTG9jYXRpb25UeXBlOiBbeyB0eXBlOiBJbnB1dCB9XSwKICAgICAgICBvcFR5cGU6IFt7IHR5cGU6IElucHV0IH1dLAogICAgICAgIG9wTmFtZTogW3sgdHlwZTogSW5wdXQgfV0sCiAgICAgICAgZXhlY3V0aW9uSW5kZXg6IFt7IHR5cGU6IElucHV0IH1dLAogICAgICAgIHN0aWNrVG9Cb3R0b21tb3N0RnJhbWVJbkZvY3VzZWRGaWxlOiBbeyB0eXBlOiBJbnB1dCB9XSwKICAgICAgICBzdGFja0ZyYW1lc0ZvckRpc3BsYXk6IFt7IHR5cGU6IElucHV0IH1dLAogICAgIC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wVHlwZSQgPSB0aGlzLnN0b3JlLnBpcGUoc2VsZWN0KGNyZWF0ZVNlbGVjdG9yKGdldENvZGVMb2NhdGlvbk9yaWdpbiwgKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IG9yaWdpbkluZm8KICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChvcmlnaW5JbmZvKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gb3JpZ2luSW5mbyA9PT0gbnVsbCA/IG51bGwgOiBvcmlnaW5JbmZvLm9wVHlwZTsKICAgICAgICAgICAgfSkpKSk7CiAgICAgICAgICAgIHRoaXMub3BOYW1lJCA9IHRoaXMuc3RvcmUucGlwZShzZWxlY3QoY3JlYXRlU2VsZWN0b3IoZ2V0Q29kZUxvY2F0aW9uT3JpZ2luLCAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gb3JpZ2luSW5mbwogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKG9yaWdpbkluZm8pID0+IHsKICAgICAgICAgICAgICAgIGlmIChvcmlnaW5JbmZvID09PSBudWxsIHx8CiAgICAgICAgICAgICAgICAgICAgb3JpZ2luSW5mby5jb2RlTG9jYXRpb25UeXBlICE9PSBDb2RlTG9jYXRpb25UeXBlLkdSQVBIX09QX0NSRUFUSU9OKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gb3JpZ2luSW5mby5vcE5hbWU7CiAgICAgICAgICAgIH0pKSkpOwogICAgICAgICAgICB0aGlzLmV4ZWN1dGlvbkluZGV4JCA9IHRoaXMuc3RvcmUucGlwZShzZWxlY3QoY3JlYXRlU2VsZWN0b3IoZ2V0Q29kZUxvY2F0aW9uT3JpZ2luLCAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gb3JpZ2luSW5mbwogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKG9yaWdpbkluZm8pID0+IHsKICAgICAgICAgICAgICAgIGlmIChvcmlnaW5JbmZvID09PSBudWxsIHx8CiAgICAgICAgICAgICAgICAgICAgb3JpZ2luSW5mby5jb2RlTG9jYXRpb25UeXBlICE9PSBDb2RlTG9jYXRpb25UeXBlLkVYRUNVVElPTikgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIG9yaWdpbkluZm8uZXhlY3V0aW9uSW5kZXg7CiAgICAgICAgICAgIH0pKSkpOwogICAgICAgICAgICB0aGlzLnN0aWNrVG9Cb3R0b21tb3N0RnJhbWVJbkZvY3VzZWRGaWxlJCA9IHRoaXMuc3RvcmUucGlwZShzZWxlY3QoZ2V0U3RpY2tUb0JvdHRvbW1vc3RGcmFtZUluRm9jdXNlZEZpbGUpKTsKICAgICAgICAgICAgdGhpcy5zdGFja0ZyYW1lc0ZvckRpc3BsYXkkID0gdGhpcy5zdG9yZS5waXBlKHNlbGVjdChjcmVhdGVTZWxlY3RvcihnZXRGb2N1c2VkU3RhY2tGcmFtZXMsIGdldEZvY3VzZWRTb3VyY2VMaW5lU3BlYywgKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHN0YWNrRnJhbWVzCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZm9jdXNlZFNvdXJjZUxpbmVTcGVjCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoc3RhY2tGcmFtZXMsIGZvY3VzZWRTb3VyY2VMaW5lU3BlYykgPT4gewogICAgICAgICAgICAgICAgaWYgKHN0YWNrRnJhbWVzID09PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBvdXRwdXQgPSBbXTsKICAgICAgICAgICAgICAgIC8vIENvcnJlY3RseSBsYWJlbCBhbGwgdGhlIHN0YWNrIGZyYW1lcyBmb3IgZGlzcGxheS4KICAgICAgICAgICAgICAgIGZvciAoY29uc3Qgc3RhY2tGcmFtZSBvZiBzdGFja0ZyYW1lcykgewogICAgICAgICAgICAgICAgICAgIGNvbnN0IHsgaG9zdF9uYW1lLCBmaWxlX3BhdGgsIGxpbmVubywgZnVuY3Rpb25fbmFtZSB9ID0gc3RhY2tGcmFtZTsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgcGF0aEl0ZW1zID0gZmlsZV9wYXRoLnNwbGl0KCcvJyk7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGNvbmNpc2VfZmlsZV9wYXRoID0gcGF0aEl0ZW1zW3BhdGhJdGVtcy5sZW5ndGggLSAxXTsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgYmVsb25nc1RvRm9jdXNlZEZpbGUgPSBmb2N1c2VkU291cmNlTGluZVNwZWMgIT09IG51bGwgJiYKICAgICAgICAgICAgICAgICAgICAgICAgaG9zdF9uYW1lID09PSBmb2N1c2VkU291cmNlTGluZVNwZWMuaG9zdF9uYW1lICYmCiAgICAgICAgICAgICAgICAgICAgICAgIGZpbGVfcGF0aCA9PT0gZm9jdXNlZFNvdXJjZUxpbmVTcGVjLmZpbGVfcGF0aDsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgZm9jdXNlZCA9IGJlbG9uZ3NUb0ZvY3VzZWRGaWxlICYmIGxpbmVubyA9PT0gKC8qKiBAdHlwZSB7P30gKi8gKGZvY3VzZWRTb3VyY2VMaW5lU3BlYykpLmxpbmVubzsKICAgICAgICAgICAgICAgICAgICBvdXRwdXQucHVzaCh7CiAgICAgICAgICAgICAgICAgICAgICAgIGhvc3RfbmFtZSwKICAgICAgICAgICAgICAgICAgICAgICAgZmlsZV9wYXRoLAogICAgICAgICAgICAgICAgICAgICAgICBjb25jaXNlX2ZpbGVfcGF0aCwKICAgICAgICAgICAgICAgICAgICAgICAgbGluZW5vLAogICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbl9uYW1lLAogICAgICAgICAgICAgICAgICAgICAgICBiZWxvbmdzVG9Gb2N1c2VkRmlsZSwKICAgICAgICAgICAgICAgICAgICAgICAgZm9jdXNlZCwKICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiBvdXRwdXQ7CiAgICAgICAgICAgIH0pKSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGFyZ3MKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uU291cmNlTGluZUNsaWNrZWQoYXJncykgewogICAgICAgICAgICBjb25zdCB7IGhvc3RfbmFtZSwgZmlsZV9wYXRoLCBsaW5lbm8sIGZ1bmN0aW9uX25hbWUgfSA9IGFyZ3M7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc3RhY2tGcmFtZSA9IHsgaG9zdF9uYW1lLCBmaWxlX3BhdGgsIGxpbmVubywgZnVuY3Rpb25fbmFtZSB9OwogICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKHNvdXJjZUxpbmVGb2N1c2VkKHsgc3RhY2tGcmFtZSB9KSk7CiAgICAgICAgfQogICAgfQogICAgU3RhY2tUcmFjZUNvbnRhaW5lci5kZWNvcmF0b3JzID0gWwogICAgICAgIHsgdHlwZTogQ29tcG9uZW50LCBhcm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iAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uSW5pdCgpIHsKICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChkZWJ1Z2dlckxvYWRlZCgpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uRGVzdHJveSgpIHsKICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChkZWJ1Z2dlclVubG9hZGVkKCkpOwogICAgICAgIH0KICAgIH0KICAgIERlYnVnZ2VyQ29udGFpbmVyLmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBDb21wb25lbnQsIGFyZ3M6IFt7CiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3I6ICd0Zi1kZWJ1Z2dlci12MicsCiAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU6IGAKICAgIDxkZWJ1Z2dlci1jb21wb25lbnQKICAgICAgW3J1bnNdPSJydW5zJCB8IGFzeW5jIgogICAgICBbcnVuSWRzXT0icnVuc0lkcyQgfCBhc3luYyIKICAgICAgW2FjdGl2ZVJ1bklkXT0iYWN0aXZlUnVuSWQkIHwgYXN5bmMiCiAgICA+PC9kZWJ1Z2dlci1jb21wb25lbnQ+CiAgYCwKICAgICAgICAgICAgICAgIH0sXSB9LAogICAgXTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLwogICAgRGVidWdnZXJDb250YWluZXIuY3RvclBhcmFtZXRlcnMgPSAoKSA9PiBbCiAgICAgICAgeyB0eXBlOiBTdG9yZSB9CiAgICBdOwogICAgLyoqIEBub2NvbGxhcHNlICovIERlYnVnZ2VyQ29udGFpbmVyLsm1ZmFjID0gZnVuY3Rpb24gRGVidWdnZXJDb250YWluZXJfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgRGVidWdnZXJDb250YWluZXIpKMm1ybVkaXJlY3RpdmVJbmplY3QoU3R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CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAoKSA9PiB2b2lkIG51bGwpKSk7CiAgICB9CiAgICBjbGFzcyBEZWJ1Z2dlckVmZmVjdHMgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gYWN0aW9ucyQKICAgICAgICAgKiBAcGFyYW0gez99IHN0b3JlCiAgICAgICAgICogQHBhcmFtIHs/fSBkYXRhU291cmNlCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoYWN0aW9ucyQsIHN0b3JlLCBkYXRhU291cmNlKSB7CiAgICAgICAgICAgIHRoaXMuYWN0aW9ucyQgPSBhY3Rpb25zJDsKICAgICAgICAgICAgdGhpcy5zdG9yZSA9IHN0b3JlOwogICAgICAgICAgICB0aGlzLmRhdGFTb3VyY2UgPSBkYXRhU291cmNlOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogdmlldyBsb2FkIGFuZCBzdWJzZXF1ZW50CiAgICAgICAgICAgICAqIGJhY2tvZmYgcG9sbHMsIGF1dG8gYW5kCiAgICAgICAgICAgICAqIG1hbnVhbCByZWxvYWQgZXZlbnRzCiAgICAgICAgICAgICAqICB8CiAgICAgICAgICAgICAqICArPiBmZXRjaCBydW4tKz4gZmV0Y2ggc291cmNlLWZpbGUgbGlzdAogICAgICAgICAgICAgKiAgfCAgICAgICAgICAgICs+IGZldGNoIG51bSBvZiB0b3AtbGV2ZWwgKGVhZ2VyKSBleGVjdXRpb25zCiAgICAgICAgICAgICAqICB8ICAgICAgICAgICAgKz4gZmV0Y2ggbnVtIG9mIGludHJhLWdyYXBoIGV4ZWN1dGlvbnMKICAgICAgICAgICAgICogIHwgICAgICAgICAgICArPiBmZXRjaCBudW0gYWxlcnRzCiAgICAgICAgICAgICAqICB8ICAgICAgICAgICAgICAgICsKICAgICAgICAgICAgICogIHwgICAgICAgICAgICAgICAgKz4gaWYgaW5pdCBsb2FkIGFuZCBub24temVybyBudW1iZXIgb2YgZXhlY3MKICAgICAgICAgICAgICogIHwgICAgICAgICAgICAgICAgICAgICsKICAgICAgICAgICAgICogIHwgICAgICAgICAgICAgICAgICAgICs+Ky0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwogICAgICAgICAgICAgKiAgfCAgb24gdG9wLWxldmVsICAgICAgfCB8IGZldGNoIHRvcC1sZXZlbCBleGVjIGRpZ2VzdCB8CiAgICAgICAgICAgICAqICB8ICBzY3JvbGwgLS0tLS0tLS0tLS0rPistLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSs8LS0tLS0tLS0rCiAgICAgICAgICAgICAqICB8ICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiAgICAgICAgICAgICAqICB8ICAgICAgICAgICAgICAgICAgICArPistLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKyAgICB8CiAgICAgICAgICAgICAqICB8ICAgICAgICAgICAgICAgICAgICAgIHwgZmV0Y2ggZXhlYyBkYXRhIGFuZCBzdGFjayBmcmFtZXMgfCAgICB8CiAgICAgICAgICAgICAqICB8ICBvbiBmb2N1cyAgKy0tLS0tLS0tPistLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKyAgICB8CiAgICAgICAgICAgICAqICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiAgICAgICAgICAgICAqICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiAgICAgICAgICAgICAqICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiAgICAgICAgICAgICAqICArLS0tLS0tPisgZmV0Y2ggYWxlcnQgbnVtYmVyIGFuZCBicmVha2Rvd24gICAgICAgICAgICAgICAgICAgICB8CiAgICAgICAgICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CiAgICAgICAgICAgICAqIG9uIGFsZXJ0IHR5cGUgZm9jdXMgLS0tLS0tLS0+IGZldGNoIGFsZXJ0cyBvZiBhIHR5cGUgLS0tLS0tLS0tLS0rCiAgICAgICAgICAgICAqCiAgICAgICAgICAgICAqIG9uIHNvdXJjZSBmaWxlIHJlcXVlc3RlZCAtLS0+IGZldGNoIHNvdXJjZSBmaWxlCiAgICAgICAgICAgICAqCiAgICAgICAgICAgICAqIG9uIGdyYXBoLWV4ZWN1dGlvbiBzY3JvbGwgLS0+IGZldGNoIGdyYXBoLWV4ZWN1dGlvbiBkYXRhCiAgICAgICAgICAgICAqCiAgICAgICAgICAgICAqIG9uIGdyYXBoLW9wIGZvY3VzICYgZ3JhcGgtZXhlY3V0aW9uIGZvY3VzIC0tPiBmZXRjaCBncmFwaC1vcCBpbmZvIC0tLSsKICAgICAgICAgICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAogICAgICAgICAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmV0Y2ggc3RhY2sgZnJhbWVzIDwtLS0tLS0rCiAgICAgICAgICAgICAqKi8KICAgICAgICAgICAgdGhpcy5sb2FkRGF0YSQgPSBjcmVhdGVFZmZlY3QoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgLy8gVGhpcyBldmVudCBjYW4gdHJpZ2dlciB0aGUgbG9hZGluZyBvZgogICAgICAgICAgICAgICAgLy8gICAtIGxpc3Qgb2Ygc291cmNlIGZpbGVzLgogICAgICAgICAgICAgICAgLy8gICAtIG51bWJlciBvZiBleGVjdXRpb25zCiAgICAgICAgICAgICAgICAvLyAgIC0gbnVtYmVyIGFuZCBicmVha2Rvd24gb2YgYWxlcnRzLgogICAgICAgICAgICAgICAgLy8gVGhlcmVmb3JlIGl0IG5lZWRzIHRvIGJlIGEgc2hhcmVkIG9ic2VydmFibGUuCiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBsb2FkUnVuRGF0YSQgPSB0aGlzLmxvYWREZWJ1Z2dlclJ1bnMobWVyZ2UodGhpcy5vbkRlYnVnZ2VyRGF0YVBvbGwoKSwgdGhpcy5vbkNvcmVSZWxvYWQoKSkpLnBpcGUoc2hhcmUoKSk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBsb2FkU291cmNlRmlsZUxpc3QkID0gdGhpcy5sb2FkU291cmNlRmlsZUxpc3QobG9hZFJ1bkRhdGEkKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IG9uTnVtRXhlY3V0aW9uTG9hZGVkJCA9IHRoaXMuY3JlYXRlTnVtRXhlY3V0aW9uTG9hZGVyKGxvYWRSdW5EYXRhJCk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBvbk51bUFsZXJ0c0xvYWRlZCQgPSB0aGlzLmNyZWF0ZU51bUFsZXJ0c0FuZEJyZWFrZG93bkxvYWRlcihsb2FkUnVuRGF0YSQpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3Qgb25BbGVydFR5cGVGb2N1c2VkJCA9IHRoaXMub25BbGVydFR5cGVGb2N1c2VkKCk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBmZXRjaEV4ZWN1dGlvbkRpZ2VzdHNGb3JBbGVydFR5cGVGb2N1cyQgPSB0a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KCksIG9uSW5pdGlhbEV4ZWN1dGlvbiQucGlwZSh3aXRoTGF0ZXN0RnJvbSh0aGlzLnN0b3JlLnNlbGVjdChnZXRBY3RpdmVSdW5JZCksIHRoaXMuc3RvcmUuc2VsZWN0KGdldExvYWRlZEV4ZWN1dGlvbkRhdGEpKSwgbWFwKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoWywgYWN0aXZlUnVuSWQsIGxvYWRlZEV4ZWN1dGlvbkRhdGFdKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgICAgICAgICAgYWN0aXZlUnVuSWQ6ICgvKiogQHR5cGUgez99ICovIChhY3RpdmVSdW5JZCkpLAogICAgICAgICAgICAgICAgICAgICAgICBsb2FkZWRFeGVjdXRpb25EYXRhLAogICAgICAgICAgICAgICAgICAgICAgICBmb2N1c0luZGV4OiAwLAogICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICB9KSkpKSk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBvbk51bUdyYXBoRXhlY3V0aW9uTG9hZGVkJCA9IHRoaXMuY3JlYXRlTnVtR3JhcGhFeGVjdXRpb25Mb2FkZXIobG9hZFJ1bkRhdGEkKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IG9uU291cmNlRmlsZUZvY3VzZWQkID0gdGhpcy5vblNvdXJjZUZpbGVGb2N1c2VkKCk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBvbkdyYXBoRXhlY3V0aW9uU2Nyb2xsJCA9IHRoaXMubG9hZEdyYXBoRXhlY3V0aW9uUGFnZXModGhpcy5vb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BlKGRlYnVnZ2VyTG9hZGVkKSwgc3dpdGNoTWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBhY3Rpb24KICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChhY3Rpb24pID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiBjcmVhdGVUaW1lZFJlcGVhdGVyKG9mKGFjdGlvbiksIHRoaXMuc3RvcmUuc2VsZWN0KGdldFBvbGxTaWxlbmNlVGltZU1zKS5waXBlKG1hcCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHBvbGxTaWxlbmNlVGltZQogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKHBvbGxTaWxlbmNlVGltZSkgPT4gewogICAgICAgICAgICAgICAgICAgIHJldHVybiBnZXRDdXJyZW50UG9sbGluZ0ludGVydmFsKHBvbGxTaWxlbmNlVGltZSk7CiAgICAgICAgICAgICAgICB9KSkpLCB0aGlzLmFjdGlvbnMkLnBpcGUob2ZUeXBlKGRlYnVnZ2VyVW5sb2FkZWQpKSk7CiAgICAgICAgICAgIH0pKSwgdGFwKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHRoaXMuc3RvcmUuZGlzcGF0Y2goZGVidWdnZXJEYXRhUG9sbE9uc2V0KCkpKSksIG1hcCgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB2b2lkIG51bGwpKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvbkNvcmVSZWxvYWQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmFjdGlvbnMkLnBpcGUob2ZUeXBlKG1hbnVhbFJlbG9hZCwgcmVsb2FkKSwgdGFwKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHRoaXMuc3RvcmUuZGlzcGF0Y2goZGVidWdnZXJEYXRhUG9sbE9uc2V0KCkpKSksIG1hcCgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB2b2lkIG51bGwpKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJlcXVlc3QgbGlzdCBvZiBkZWJ1Z2dlciBydW5zLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBwcmV2U3RyZWFtJAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbG9hZERlYnVnZ2VyUnVucyhwcmV2U3RyZWFtJCkgewogICAgICAgICAgICByZXR1cm4gcHJldlN0cmVhbSQucGlwZSh3aXRoTGF0ZXN0RnJvbSh0aGlzLnN0b3JlLnNlbGVjdChnZXREZWJ1Z2dlclJ1bnNMb2FkZWQpKSwgZmlsdGVyKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChbLCB7IHN0YXRlIH1dKSA9PiBzdGF0ZSAhPT0gRGF0YUxvYWRTdGF0ZS5MT0FESU5HKSksIHRhcCgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB0aGlzLnN0b3JlLmRpc3BhdGNoKGRlYnVnZ2VyUnVuc1JlcXVlc3RlZCgpKSkpLCBtZXJnZU1hcCgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5kYXRhU291cmNlLmZldGNoUnVucygpLnBpcGUodGFwKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcnVucwogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKHJ1bnMpID0+IHsKICAgICAgICAgICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKGRlYnVnZ2VyUnVuc0xvYWRlZCh7IHJ1bnM6ICgvKiogQHR5cGUgez99ICovIChydW5zKSkgfSkpOwogICAgICAgICAgICAgICAgfSkpLCBtYXAoKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gdm9pZCBudWxsKSkKICAgICAgICAgICAgICAgIC8vIFRPRE8oY2Fpcyk6IEFkZCBjYXRjaEVycm9yKCkgdG8gcGlwZS4KICAgICAgICAgICAgICAgICk7CiAgICAgICAgICAgIH0pKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFdoZW4gYSBkZWJ1Z2dlciBydW4gZXhpc3RzLCBsb2FkIG51bWJlciBvZiB0b3AtbGV2ZWwgZXhlY3V0aW9ucy4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gcHJldlN0cmVhbSQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGNyZWF0ZU51bUV4ZWN1dGlvbkxvYWRlcihwcmV2U3RyZWFtJCkgewogICAgICAgICAgICByZXR1cm4gcHJldlN0cmVhbSQucGlwZSh3aXRoTGF0ZXN0RnJvbSh0aGlzLnN0b3JlLnNlbGVjdChnZXREZWJ1Z2dlclJ1bkxpc3RpbmcpLCB0aGlzLnN0b3JlLnNlbGVjdChnZXROdW1FeGVjdXRpb25zTG9hZGVkKSksIGZpbHRlcigoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoWywgcnVucywgbG9hZGVkXSkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIChPYmplY3Qua2V5cyhydW5zKS5sZW5ndGggPiAwICYmIGxvYWRlZC5zdGF0ZSAhPT0gRGF0YUxvYWRTdGF0ZS5MT0FESU5HKTsKICAgICAgICAgICAgfSkpLCB0YXAoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gdGhpcy5zdG9yZS5kaXNwYXRjaChudW1FeGVjdXRpb25zUmVxdWVzdGVkKCkpKSksIG1lcmdlTWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChbLCBydW5zXSkgPT4gewogICAgICAgICAgICAgICAgLy8gVE9ETyhjYWlzKTogSGFuZGxlIG11bHRpcGxlIHJ1bnMuIEN1cnJlbnRseSBpdCBpcyBhc3N1bWVkIHRoYXQgdGhlcmUKICAgICAgICAgICAgICAgIC8vIGlzIGF0IG1vc3Qgb25seSBvbmUgZGVidWdnZXIgcnVuIGF2YWlsYWJsZS4KICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHJ1bklkID0gT2JqZWN0LmtleXMocnVucylbMF07CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBiZWdpbiA9IDA7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBlbmQgPSAwOwogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuZGF0YVNvdXJjZS5mZXRjaEV4ZWN1dGlvbkRpZ2VzdHMocnVuSWQsIGJlZ2luLCBlbmQpLnBpcGUodGFwKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZGlnZXN0cwogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKGRpZ2VzdHMpID0+IHsKICAgICAgICAgICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKG51bUV4ZWN1dGlvbnNMb2FkZWQoeyBudW1FeGVjdXRpb25zOiBkaWdlc3RzLm51bV9kaWdlc3RzIH0pKTsKICAgICAgICAgICAgICAgIH0pKSwgbWFwKCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHZvaWQgbnVsbCkpKTsKICAgICAgICAgICAgICAgIC8vIFRPRE8oY2Fpcyk6IEFkZCBjYXRjaEVycm9yKCkgdG8gcGlwZS4KICAgICAgICAgICAgfSkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogV2hlbiBhIGRlYnVnZ2VyIHJ1biBleGlzdHMsIGxvYWQgbnVtYmVyIG9mIGludHJhLWdyYXBoIGV4ZWN1dGlvbnMuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHByZXZTdHJlYW0kCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBjcmVhdGVOdW1HcmFwaEV4ZWN1dGlvbkxvYWRlcihwcmV2U3RyZWFtJCkgewogICAgICAgICAgICByZXR1cm4gcHJldlN0cmVhbSQucGlwZSh3aXRoTGF0ZXN0RnJvbSh0aGlzLnN0b3JlLnNlbGVjdChnZXREZWJ1Z2dlclJ1bkxpc3RpbmcpLCB0aGlzLnN0b3JlLnNlbGVjdChnZXROdW1HcmFwaEV4ZWN1dGlvbnNMb2FkZWQpKSwgZmlsdGVyKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChbLCBydW5zLCBsb2FkZWRdKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gKE9iamVjdC5rZXlzKHJ1bnMpLmxlbmd0aCA+IDAgJiYgbG9hZGVkLnN0YXRlICE9PSBEYXRhTG9hZFN0YXRlLkxPQURJTkcpOwogICAgICAgICAgICB9KSksIHRhcCgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB0aGlzLnN0b3JlLmRpc3BhdGNoKG51bUdyYXBoRXhlY3V0aW9uc1JlcXVlc3RlZCgpKSkpLCBtZXJnZU1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoWywgcnVuc10pID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHJ1bklkID0gT2JqZWN0LmtleXMocnVucylbMF07CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBiZWdpbiA9IDA7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBlbmQgPSAwOwogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuZGF0YVNvdXJjZQogICAgICAgICAgICAgICAgICAgIC5mZXRjaEdyYXBoRXhlY3V0aW9uRGlnZXN0cyhydW5JZCwgYmVnaW4sIGVuZCkKICAgICAgICAgICAgICAgICAgICAucGlwZSh0YXAoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBkaWdlc3RzCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoZGlnZXN0cykgPT4gewogICAgICAgICAgICAgICAgICAgIHRoaXMuc3RvcmUuZGlzcGF0Y2gobnVtR3JhcGhFeGVjdXRpb25zTG9hZGVkKHsKICAgICAgICAgICAgICAgICAgICAgICAgbnVtR3JhcGhFeGVjdXRpb25zOiBkaWdlc3RzLm51bV9kaWdlc3RzLAogICAgICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgIH0pKSwgbWFwKCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHZvaWQgbnVsbCkpKTsKICAgICAgICAgICAgICAgIC8vIFRPRE8oY2Fpcyk6IEFkZCBjYXRjaEVycm9yKCkgdG8gcGlwZS4KICAgICAgICAgICAgfSkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogV2hlbiBhIGRlYnVnZ2VyIHJ1biBleGlzdHMsIGxvYWQgbnVtYmVyIG9mIGFsZXJ0cyBhbmQgdGhlaXIgYnJlYWtkb3duLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBwcmV2U3RyZWFtJAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgY3JlYXRlTnVtQWxlcnRzQW5kQnJlYWtkb3duTG9hZGVyKHByZXZTdHJlYW0kKSB7CiAgICAgICAgICAgIHJldHVybiBwcmV2U3RyZWFtJC5waXBlKHdpdGhMYXRlc3RGcm9tKHRoaXMuc3RvcmUuc2VsZWN0KGdldERlYnVnZ2VyUnVuTGlzdGluZyksIHRoaXMuc3RvcmUuc2VsZWN0KGdldEFsZXJ0c0xvYWRlZCkpLCBmaWx0ZXIoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKFssIHJ1bnMsIGxvYWRlZF0pID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiAoT2JqZWN0LmtleXMocnVucykubGVuZ3RoID4gMCAmJiBsb2FkZWQuc3RhdGUgIT09IERhdGFMb2FkU3RhdGUuTE9BRElORyk7CiAgICAgICAgICAgIH0pKSwgdGFwKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHRoaXMuc3RvcmUuZGlzcGF0Y2gobnVtQWxlcnRzQW5kQnJlYWtkb3duUmVxdWVzdGVkKCkpKSksIG1lcmdlTWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChbLCBydW5zXSkgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgcnVuSWQgPSBPYmplY3Qua2V5cyhydW5zKVswXTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGJlZ2luID0gMDsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGVuZCA9IDA7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5kYXRhU291cmNlLmZldGNoQWxlcnRzKHJ1bklkLCBiZWdpbiwgZW5kKS5waXBlKHRhcCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGFsZXJ0cwogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKGFsZXJ0cykgPT4gewogICAgICAgICAgICAgICAgICAgIHRoaXMuc3RvcmUuZGlzcGF0Y2gobnVtQWxlcnRzQW5kQnJlYWtkb3duTG9hZGVkKHsKICAgICAgICAgICAgICAgICAgICAgICAgbnVtQWxlcnRzOiBhbGVydHMubnVtX2FsZXJ0cywKICAgICAgICAgICAgICAgICAgICAgICAgYWxlcnRzQnJlYWtkb3duOiBhbGVydHMuYWxlcnRzX2JyZWFrZG93biwKICAgICAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICB9KSksIG1hcCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB2b2lkIG51bGwpKSk7CiAgICAgICAgICAgIH0pKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEVtaXRzIHdoZW4gaW5pdGlhbCBleGVjdXRpb24gZGlnZXN0cyBhbmQgZGF0YSBhcmUgcmVxdWlyZWQuCiAgICAgICAgICoKICAgICAgICAgKiBUaGVzZSBpbml0aWFsIGRhdGEgbG9hZGluZyBhY3Rpb25zIGFyZSByZXF1aXJlZCB3aGVuIHRoZSBudW1iZXIgb2YKICAgICAgICAgKiBleGVjdXRpb25zIGlzIGdyZWF0ZXIgdGhhbiB6ZXJvLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBwcmV2U3RyZWFtJAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgY3JlYXRlSW5pdGlhbEV4ZWN1dGlvbkRldGVjdG9yKHByZXZTdHJlYW0kKSB7CiAgICAgICAgICAgIHJldHVybiBwcmV2U3RyZWFtJC5waXBlKHdpdGhMYXRlc3RGcm9tKHRoaXMuc3RvcmUuc2VsZWN0KGdldE51bUV4ZWN1dGlvbnMpLCB0aGlzLnN0b3JlLnNlbGVjdChnZXRFeGVjdXRpb25EaWdlc3RzTG9hZGVkKSksIGZpbHRlcigoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoWywgbnVtRXhlY3V0aW9ucywgZXhlY3V0aW9uRGlnZXN0c0xvYWRlZF0pID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiAobnVtRXhlY3V0aW9ucyA+IDAgJiYKICAgICAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyhleGVjdXRpb25EaWdlc3RzTG9hZGVkLnBhZ2VMb2FkZWRTaXplcykubGVuZ3RoID09PSAwKTsKICAgICAgICAgICAgfSkpLCBtYXAoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gdm9pZCBudWxsKSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBFbWl0cyB3aGVuIHRoZSBmaXJzdCBwYWdlIGlmIGV4ZWN1dGlvbiBkaWdlc3RzIGFyZSByZXF1aXJlZCB0byBiZSBsb2FkZWQuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHByZXZTdHJlYW0kCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBjcmVhdGVJbml0aWFsRXhlY3V0aW9uRGlnZXN0KHByZXZTdHJlYW0kKSB7CiAgICAgICAgICAgIHJldHVybiBwcmV2U3RyZWFtJC5waXBlKHdpdGhMYXRlc3RGcm9tKHRoaXMuc3RvcmUuc2VsZWN0KGdldE51bUV4ZWN1dGlvbnMpLCB0aGlzLnN0b3JlLnNlbGVjdChnZXRBY3RpdmVSdW5JZCksIHRoaXMuc3RvcmUuc2VsZWN0KGdldEV4ZWN1dGlvblBhZ2VTaXplKSksIGZpbHRlcigoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoWywgLCBydW5JZF0pID0+IHJ1bklkICE9PSBudWxsKSksIG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLw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ICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKFtydW5JZF0pID0+IHJ1bklkICE9PSBudWxsKSksIG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoWywgcnVuSWQsIHNjcm9sbEJlZ2luSW5kZXgsIG51bUV4ZWN1dGlvbnMsIGRpc3BsYXlDb3VudCwgcGFnZVNpemUsXSkgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgYmVnaW4gPSBzY3JvbGxCZWdpbkluZGV4OwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZW5kID0gTWF0aC5taW4obnVtRXhlY3V0aW9ucywgYmVnaW4gKyBkaXNwbGF5Q291bnQpOwogICAgICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgICAgICBydW5JZDogKC8qKiBAdHlwZSB7P30gKi8gKHJ1bklkKSksCiAgICAgICAgICAgICAgICAgICAgYmVnaW4sCiAgICAgICAgICAgICAgICAgICAgZW5kLAogICAgICAgICAgICAgICAgICAgIHBhZ2VTaXplLAogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgfSkpLCB3aXRoTGF0ZXN0RnJvbSh0aGlzLnN0b3JlLnNlbGVjdChnZXRFeGVjdXRpb25EaWdlc3RzTG9hZGVkKSksIG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoW3Byb3BzLCBsb2FkZWRdKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgICAgIHByb3BzLAogICAgICAgICAgICAgICAgICAgIGxvYWRlZCwKICAgICAgICAgICAgICAgICAgICBtaXNzaW5nUGFnZXM6IGdldE1pc3NpbmdQYWdlcyhwcm9wcy5iZWdpbiwgcHJvcHMuZW5kLCBwcm9wcy5wYWdlU2l6ZSwgbG9hZGVkLm51bUV4ZWN1dGlvbnMsIGxvYWRlZC5wYWdlTG9hZGVkU2l6ZXMpLAogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgfSkpLCBmaWx0ZXIoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHsgbWlzc2luZ1BhZ2VzIH0pID0+IG1pc3NpbmdQYWdlcy5sZW5ndGggPiAwKSksIG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoeyBwcm9wcywgbG9hZGVkLCBtaXNzaW5nUGFnZXMgfSkgPT4gewogICAgICAgICAgICAgICAgY29uc3QgeyBydW5JZCwgcGFnZVNpemUgfSA9IHByb3BzOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgYmVnaW4gPSBtaXNzaW5nUGFnZXNbMF0gKiBwYWdlU2l6ZTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGVuZCA9IE1hdGgubWluKGxvYWRlZC5udW1FeGVjdXRpb25zLCAobWlzc2luZ1BhZ2VzW21pc3NpbmdQYWdlcy5sZW5ndGggLSAxXSArIDEpICogcGFnZVNpemUpOwogICAgICAgICAgICAgICAgcmV0dXJuIHsgYmVnaW4sIGVuZCwgcnVuSWQ6ICgvKiogQHR5cGUgez99ICovIChydW5JZCkpIH07CiAgICAgICAgICAgIH0pKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIExvYWQgZXhlY3V0aW9uIGRpZ2VzdHMuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHByZXZTdHJlYW0kCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBjcmVhdGVFeGVjdXRpb25EaWdlc3RMb2FkZXIocHJldlN0cmVhbSQpIHsKICAgICAgICAgICAgcmV0dXJuIHByZXZTdHJlYW0kLnBpcGUod2l0aExhdGVzdEZyb20odGhpcy5zdG9yZS5zZWxlY3QoZ2V0RXhlY3V0aW9uRGlnZXN0c0xvYWRlZCkpLCBmaWx0ZXIoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKFt7IGJlZ2luLCBlbmQgfSwgbG9hZGVkXSkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIChlbmQgPiBiZWdpbiAmJgogICAgICAgICAgICAgICAgICAgICFiZWdpbkVuZFJhbmdlc0luY2x1ZGUobG9hZGVkLmxvYWRpbmdSYW5nZXMsIGJlZ2luLCBlbmQpKTsKICAgICAgICAgICAgfSkpLCB0YXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKFt7IGJlZ2luLCBlbmQgfV0pID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuc3RvcmUuZGlzcGF0Y2goZXhlY3V0aW9uRGlnZXN0c1JlcXVlc3RlZCh7IGJlZ2luLCBlbmQgfSkpOwogICAgICAgICAgICB9KSksIG1lcmdlTWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChbeyBydW5JZCwgYmVnaW4sIGVuZCB9XSkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuZGF0YVNvdXJjZS5mZXRjaEV4ZWN1dGlvbkRpZ2VzdHMocnVuSWQsIGJlZ2luLCBlbmQpLnBpcGUodGFwKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZGlnZXN0cwogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKGRpZ2VzdHMpID0+IHsKICAgICAgICAgICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKGV4ZWN1dGlvbkRpZ2VzdHNMb2FkZWQoZGlnZXN0cykpOwogICAgICAgICAgICAgICAgfSkpLCBtYXAoKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gdm9pZCBudWxsKSkpOwogICAgICAgICAgICAgICAgLy8gVE9ETyhjYWlzKTogQWRkIGNhdGNoRXJyb3IoKSB0byBwaXBlLgogICAgICAgICAgICB9KSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBFbWl0cyB3aGVuIHVzZXIgZm9jc2VzIG9uIGFuIGV4ZWN1dGlvbiBkaWdlc3QuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uRXhlY3V0aW9uRGlnZXN0Rm9jdXNlZCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuYWN0aW9ucyQucGlwZShvZlR5cGUoZXhlY3V0aW9uRGlnZXN0Rm9jdXNlZCksIHdpdGhMYXRlc3RGcm9tKHRoaXMuc3RvcmUuc2VsZWN0KGdldEFjdGl2ZVJ1bklkKSwgdGhpcy5zdG9yZS5zZWxlY3QoZ2V0TG9hZGVkRXhlY3V0aW9uRGF0YSksIHRoaXMuc3RvcmUuc2VsZWN0KGdldEV4ZWN1dGlvblNjcm9sbEJlZ2luSW5kZXgpKSwgbWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChbcHJvcHMsIGFjdGl2ZVJ1bklkLCBsb2FkZWRFeGVjdXRpb25EYXRhLCBzY3JvbGxCZWdpbkluZGV4XSkgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZm9jdXNJbmRleCA9IHNjcm9sbEJlZ2luSW5kZXggKyBwcm9wcy5kaXNwbGF5SW5kZXg7CiAgICAgICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgICAgIGFjdGl2ZVJ1bklkOiAoLyoqIEB0eXBlIHs/fSAqLyAoYWN0aXZlUnVuSWQpKSwKICAgICAgICAgICAgICAgICAgICBsb2FkZWRFeGVjdXRpb25EYXRhLAogICAgICAgICAgICAgICAgICAgIGZvY3VzSW5kZXgsCiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9KSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBMb2FkIGRldGFpbGVkIGRhdGEgYWJvdXQgZXhlY3V0aW9uIGFuZCB0aGUgYXNzb2NpYXRlZCBzdGFjayBmcmFtZXMuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHByZXZTdHJlYW0kCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBjcmVhdGVFeGVjdXRpb25EYXRhQW5kU3RhY2tGcmFtZXNMb2FkZXIocHJldlN0cmVhbSQpIHsKICAgICAgICAgICAgcmV0dXJuIHByZXZTdHJlYW0kLnBpcGUoZmlsdGVyKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICh7IGFjdGl2ZVJ1bklkLCBsb2FkZWRFeGVjdXRpb25EYXRhLCBmb2N1c0luZGV4IH0pID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiAoYWN0aXZlUnVuSWQgIT09IG51bGwgJiYKICAgICAgICAgICAgICAgICAgICBmb2N1c0luZGV4ICE9PSBudWxsICYmCiAgICAgICAgICAgICAgICAgICAgbG9hZGVkRXhlY3V0aW9uRGF0YVsoLyoqIEB0eXBlIHs/fSAqLyAoZm9jdXNJbmRleCkpXSA9PT0gdW5kZWZpbmVkKTsKICAgICAgICAgICAgfSkpLCBtZXJnZU1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoeyBhY3RpdmVSdW5JZCwgZm9jdXNJbmRleCB9KSA9PiB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBiZWdpbiA9ICgvKiogQHR5cGUgez99ICovIChmb2N1c0luZGV4KSk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBlbmQgPSBiZWdpbiArIDE7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5kYXRhU291cmNlCiAgICAgICAgICAgICAgICAgICAgLmZldGNoRXhlY3V0aW9uRGF0YSgoLyoqIEB0eXBlIHs/fSAqLyAoYWN0aXZlUnVuSWQpKSwgYmVnaW4sIGVuZCkKICAgICAgICAgICAgICAgICAgICAucGlwZSh0YXAoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBleGVjdXRpb25EYXRhUmVzcG9uc2UKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChleGVjdXRpb25EYXRhUmVzcG9uc2UpID0+IHsKICAgICAgICAgICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKGV4ZWN1dGlvbkRhdGFMb2FkZWQoZXhlY3V0aW9uRGF0YVJlc3BvbnNlKSk7CiAgICAgICAgICAgICAgICB9KSksIG1hcCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGV4ZWN1dGlvbkRhdGFSZXNwb25zZQogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKGV4ZWN1dGlvbkRhdGFSZXNwb25zZSkgPT4gewogICAgICAgICAgICAgICAgICAgIHJldHVybiB7IGV4ZWN1dGlvbkRhdGE6IGV4ZWN1dGlvbkRhdGFSZXNwb25zZSwgYmVnaW4sIGVuZCB9OwogICAgICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgICAgIC8vIFRPRE8oY2Fpcyk6IEFkZCBjYXRjaEVycm9yKCkgdG8gcGlwZS4KICAgICAgICAgICAgfSkpLCBtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHsgZXhlY3V0aW9uRGF0YSB9KSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gZXhlY3V0aW9uRGF0YS5leGVjdXRpb25zWzBdOwogICAgICAgICAgICB9KSksIHdpdGhMYXRlc3RGcm9tKHRoaXMuc3RvcmUuc2VsZWN0KGdldEFjdGl2ZVJ1bklkKSwgdGhpcy5zdG9yZS5zZWxlY3QoZ2V0TG9hZGVkU3RhY2tGcmFtZXMpKSwgZmlsdGVyKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChbZXhlY3V0aW9uLCBydW5JZCwgbG9hZGVkU3RhY2tGcmFtZXNdKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAocnVuSWQgPT09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IHN0YWNrRnJhbWVJZCBvZiBleGVjdXRpb24uc3RhY2tfZnJhbWVfaWRzKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKGxvYWRlZFN0YWNrRnJhbWVzW3N0YWNrRnJhbWVJZF0gPT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgIH0pKSwgbWVyZ2VNYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKFtleGVjdXRpb24sIHJ1bklkXSkgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3Qgc3RhY2tGcmFtZUlkcyA9IGV4ZWN1dGlvbi5zdGFja19mcmFtZV9pZHM7CiAgICAgICAgICAgICAgICAvLyBUT0RPKGNhaXMpOiBNYXliZSBvbWl0IGFscmVhZHktbG9hZGVkIHN0YWNrIGZyYW1lcyBmcm9tIHJlcXVlc3QsCiAgICAgICAgICAgICAgICAvLyBpbnN0ZWFkIG9mIGxvYWRpbmcgYWxsIGZyYW1lcyBpZiBhbnkgb2YgdGhlbSBpcyBtaXNzaW5nLgogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuZGF0YVNvdXJjZS5mZXRjaFN0YWNrRnJhbWVzKCgvKiogQHR5cGUgez99ICovIChydW5JZCkpLCBzdGFja0ZyYW1lSWRzKS5waXBlKHRhcCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHN0YWNrRnJhbWVzUmVzcG9uc2UKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChzdGFja0ZyYW1lc1Jlc3BvbnNlKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHN0YWNrRnJhbWVzQnlJZCA9IHt9OwogICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgc3RhY2tGcmFtZUlkcy5sZW5ndGg7ICsraSkgewogICAgICAgICAgICAgICAgICAgICAgICBzdGFja0ZyYW1lc0J5SWRbc3RhY2tGcmFtZUlkc1tpXV0gPQogICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhY2tGcmFtZXNSZXNwb25zZS5zdGFja19mcmFtZXNbaV07CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHRoaXMuc3RvcmUuZGlzcGF0Y2goc3RhY2tGcmFtZXNMb2FkZWQoeyBzdGFja0ZyYW1lczogc3RhY2tGcmFtZXNCeUlkIH0pKTsKICAgICAgICAgICAgICAgIH0pKSwgbWFwKCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHZvaWQgbnVsbCkpKTsKICAgICAgICAgICAgICAgIC8vIFRPRE8oY2Fpcyk6IEFkZCBjYXRjaEVycm9yKCkgdG8gcGlwZS4KICAgICAgICAgICAgfSkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogRW1pdHMgd2hlbiBzY3JvbGxpbmcgZXZlbnQgbGVhZHMgdG8gbmVlZCB0byBsb2FkIG5ldyBpbnRyYS1ncmFwaCBleGVjdXRpb24KICAgICAgICAgKiBkYXRhLgogICAgICAgICAqCiAgICAgICAgICogVGhlIHJld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2Nyb2xsQmVnaW5JbmRleCArIGRpc3BsYXlDb3VudCwgbnVtR3JhcGhFeGVjdXRpb25zKSwgcGFnZVNpemUsIG51bUdyYXBoRXhlY3V0aW9ucywgcGFnZUxvYWRlZFNpemVzKTsKICAgICAgICAgICAgICAgIC8vIE9taXQgcGFnZXMgdGhhdCBhcmUgYWxyZWFkeSBsb2FkaW5nLgogICAgICAgICAgICAgICAgbWlzc2luZ1BhZ2VzID0gbWlzc2luZ1BhZ2VzLmZpbHRlcigoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHBhZ2UKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChwYWdlKSA9PiBsb2FkaW5nUGFnZXMuaW5kZXhPZihwYWdlKSA9PT0gLTEpKTsKICAgICAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAgICAgcnVuSWQ6ICgvKiogQHR5cGUgez99ICovIChydW5JZCkpLAogICAgICAgICAgICAgICAgICAgIG1pc3NpbmdQYWdlcywKICAgICAgICAgICAgICAgICAgICBwYWdlU2l6ZSwKICAgICAgICAgICAgICAgICAgICBudW1HcmFwaEV4ZWN1dGlvbnMsCiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9KSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gcHJldlN0cmVhbSQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGxvYWRHcmFwaEV4ZWN1dGlvblBhZ2VzKHByZXZTdHJlYW0kKSB7CiAgICAgICAgICAgIHJldHVybiBwcmV2U3RyZWFtJC5waXBlKGZpbHRlcigoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoeyBtaXNzaW5nUGFnZXMgfSkgPT4gbWlzc2luZ1BhZ2VzLmxlbmd0aCA+IDApKSwgdGFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICh7IG1pc3NpbmdQYWdlcyB9KSA9PiB7CiAgICAgICAgICAgICAgICBtaXNzaW5nUGFnZXMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHBhZ2VJbmRleAogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKHBhZ2VJbmRleCkgPT4gewogICAgICAgICAgICAgICAgICAgIHRoaXMuc3RvcmUuZGlzcGF0Y2goZ3JhcGhFeGVjdXRpb25EYXRhUmVxdWVzdGVkKHsgcGFnZUluZGV4IH0pKTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfSkpLCBtZXJnZU1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoeyBydW5JZCwgbWlzc2luZ1BhZ2VzLCBwYWdlU2l6ZSwgbnVtR3JhcGhFeGVjdXRpb25zIH0pID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGJlZ2luID0gbWlzc2luZ1BhZ2VzWzBdICogcGFnZVNpemU7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBlbmQgPSBNYXRoLm1pbigobWlzc2luZ1BhZ2VzW21pc3NpbmdQYWdlcy5sZW5ndGggLSAxXSArIDEpICogcGFnZVNpemUsIG51bUdyYXBoRXhlY3V0aW9ucyk7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5kYXRhU291cmNlLmZldGNoR3JhcGhFeGVjdXRpb25EYXRhKCgvKiogQHR5cGUgez99ICovIChydW5JZCkpLCBiZWdpbiwgZW5kKS5waXBlKHRhcCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGdyYXBoRXhlY3V0aW9uRGF0YVJlc3BvbnNlCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoZ3JhcGhFeGVjdXRpb25EYXRhUmVzcG9uc2UpID0+IHsKICAgICAgICAgICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKGdyYXBoRXhlY3V0aW9uRGF0YUxvYWRlZChncmFwaEV4ZWN1dGlvbkRhdGFSZXNwb25zZSkpOwogICAgICAgICAgICAgICAgfSkpLCBtYXAoKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gdm9pZCBudWxsKSkpOwogICAgICAgICAgICAgICAgLy8gVE9ETyhjYWlzKTogQWRkIGNhdGNoRXJyb3IoKSB0byBwaXBlLgogICAgICAgICAgICB9KSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBMaXN0ZW5zIHRvIGdyYXBoLW9wIGZvY3VzIGV2ZW50cy4KICAgICAgICAgKgogICAgICAgICAqIExvYWQgZ3JhcGggb3AgaW5mbyBmcm9tIHRoZSAvZ3JhcGhzL29wX2luZm8gcm91dGUgd2hlbiBuZWNlc3NhcnkuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99IEFuIG9iamVjdCB3aXRoIHR3byBrZXlzIGZvciBkb3duc3RyZWFtIGNvbnN1bXB0aW9uOgogICAgICAgICAqICAgLSBydW5JZDogdGhlIGN1cnJlbnQgYWN0aXZlIHJ1biBJRC4KICAgICAgICAgKiAgIC0gc3RhY2tGcmFtZUlkczogdGhlIElEcyBvZiB0aGUgc3RhY2sgZnJhbWVzIG9mIHRoZSBvcCdzIGNyZWF0aW9uLgogICAgICAgICAqLwogICAgICAgIGxvYWRHcmFwaE9wSW5mbygpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuYWN0aW9ucyQucGlwZShvZlR5cGUoZ3JhcGhPcEZvY3VzZWQsIGdyYXBoRXhlY3V0aW9uRm9jdXNlZCksIHdpdGhMYXRlc3RGcm9tKHRoaXMuc3RvcmUuc2VsZWN0KGdldEFjdGl2ZVJ1bklkKSwgdGhpcy5zdG9yZS5zZWxlY3QoZ2V0TG9hZGluZ0dyYXBoT3BzKSksIGZpbHRlcigoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoW2FjdGlvbkRhdGEsIHJ1bklkLCBsb2FkaW5nT3BzXSkgPT4gewogICAgICAgICAgICAgICAgY29uc3QgeyBncmFwaF9pZCwgb3BfbmFtZSB9ID0gYWN0aW9uRGF0YTsKICAgICAgICAgICAgICAgIHJldHVybiAocnVuSWQgIT09IG51bGwgJiYKICAgICAgICAgICAgICAgICAgICAobG9hZGluZ09wc1tncmFwaF9pZF0gPT09IHVuZGVmaW5lZCB8fAogICAgICAgICAgICAgICAgICAgICAgICAhbG9hZGluZ09wc1tncmFwaF9pZF0uaGFzKG9wX25hbWUpIHx8CiAgICAgICAgICAgICAgICAgICAgICAgICEobG9hZGluZ09wc1tncmFwaF9pZF0uZ2V0KG9wX25hbWUpID09PSBEYXRhTG9hZFN0YXRlLkxPQURJTkcgfHwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvYWRpbmdPcHNbZ3JhcGhfaWRdLmdldChvcF9uYW1lKSA9PT0gRGF0YUxvYWRTdGF0ZS5MT0FERUQpKSk7CiAgICAgICAgICAgIH0pKSwgdGFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChbeyBncmFwaF9pZCwgb3BfbmFtZSB9XSkgPT4gdGhpcy5zdG9yZS5kaXNwYXRjaChncmFwaE9wSW5mb1JlcXVlc3RlZCh7CiAgICAgICAgICAgICAgICBncmFwaF9pZCwKICAgICAgICAgICAgICAgIG9wX25hbWUsCiAgICAgICAgICAgIH0pKSkpLCBtZXJnZU1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoW2FjdGlvbkRhdGEsIHJ1bklkXSkgPT4gewogICAgICAgICAgICAgICAgY29uc3QgeyBncmFwaF9pZCwgb3BfbmFtZSB9ID0gYWN0aW9uRGF0YTsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmRhdGFTb3VyY2UuZmV0Y2hHcmFwaE9wSW5mbygoLyoqIEB0eXBlIHs/fSAqLyAocnVuSWQpKSwgZ3JhcGhfaWQsIG9wX25hbWUpLnBpcGUodGFwKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZ3JhcGhPcEluZm9SZXNwb25zZQogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKGdyYXBoT3BJbmZvUmVzcG9uc2UpID0+IHRoaXMuc3RvcmUuZGlzcGF0Y2goZ3JhcGhPcEluZm9Mb2FkZWQoeyBncmFwaE9wSW5mb1Jlc3BvbnNlIH0pKSkpLCBtYXAoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBncmFwaE9wSW5mb1Jlc3BvbnNlCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoZ3JhcGhPcEluZm9SZXNwb25zZSkgPT4gewogICAgICAgICAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJ1bklkOiAoLyoqIEB0eXBlIHs/fSAqLyAocnVuSWQpKSwKICAgICAgICAgICAgICAgICAgICAgICAgc3RhY2tGcmFtZUlkczogZ3JhcGhPcEluZm9SZXNwb25zZS5zdGFja19mcmFtZV9pZHMsCiAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIH0pKSk7CiAgICAgICAgICAgICAgICAvLyBUT0RPKGNhaXMpOiBBZGQgY2F0Y2hFcnJvcigpIHRvIHBpcGUuCiAgICAgICAgICAgIH0pKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBwcmV2U3RyZWFtJAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbG9hZEdyYXBoT3BTdGFja0ZyYW1lcyhwcmV2U3RyZWFtJCkgewogICAgICAgICAgICByZXR1cm4gcHJldlN0cmVhbSQucGlwZSh3aXRoTGF0ZXN0RnJvbSh0aGlzLnN0b3JlLnNlbGVjdChnZXRMb2FkZWRTdGFja0ZyYW1lcykpLCBtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKFt7IHJ1bklkLCBzdGFja0ZyYW1lSWRzIH0sIGxvYWRlZFN0YWNrRnJhbWVzXSkgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgbWlzc2luZ1N0YWNrRnJhbWVJZHMgPSBzdGFja0ZyYW1lSWRzLmZpbHRlcigoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHN0YWNrRnJhbWVJZAogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKHN0YWNrRnJhbWVJZCkgPT4gbG9hZGVkU3RhY2tGcmFtZXNbc3RhY2tGcmFtZUlkXSA9PT0gdW5kZWZpbmVkKSk7CiAgICAgICAgICAgICAgICByZXR1cm4geyBydW5JZCwgbWlzc2luZ1N0YWNrRnJhbWVJZHMgfTsKICAgICAgICAgICAgfSkpLCBmaWx0ZXIoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHsgcnVuSWQsIG1pc3NpbmdTdGFja0ZyYW1lSWRzIH0pID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiBydW5JZCAhPT0gbnVsbCAmJiBtaXNzaW5nU3RhY2tGcmFtZUlkcy5sZW5ndGggPiAwOwogICAgICAgICAgICB9KSksIG1lcmdlTWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICh7IHJ1bklkLCBtaXNzaW5nU3RhY2tGcmFtZUlkcyB9KSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5kYXRhU291cmNlCiAgICAgICAgICAgICAgICAgICAgLmZldGNoU3RhY2tGcmFtZXMoKC8qKiBAdHlwZSB7P30gKi8gKHJ1bklkKSksIG1pc3NpbmdTdGFja0ZyYW1lSWRzKQogICAgICAgICAgICAgICAgICAgIC5waXBlKHRhcCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHN0YWNrRnJhbWVzUmVzcG9uc2UKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChzdGFja0ZyYW1lc1Jlc3BvbnNlKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHN0YWNrRnJhbWVzQnlJZCA9IHt9OwogICAgICAgICAgICAgICAgICAgIC8vIFRPRE8oY2Fpcyk6IERvIHRoaXMgcmVzaGFwaW5nIGluIHRoZSBiYWNrZW5kIGFuZCBzaW1wbGlmeQogICAgICAgICAgICAgICAgICAgIC8vIHRoZSBmcm9udGVuZCBjb2RlIGhlcmUuCiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBtaXNzaW5nU3RhY2tGcmFtZUlkcy5sZW5ndGg7ICsraSkgewogICAgICAgICAgICAgICAgICAgICAgICBzdGFja0ZyYW1lc0J5SWRbbWlzc2luZ1N0YWNrRnJhbWVJZHNbaV1dID0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YWNrRnJhbWVzUmVzcG9uc2Uuc3RhY2tfZnJhbWVzW2ldOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKHN0YWNrRnJhbWVzTG9hZGVkKHsgc3RhY2tGcmFtZXM6IHN0YWNrRnJhbWVzQnlJZCB9KSk7CiAgICAgICAgICAgICAgICB9KSksIG1hcCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB2b2lkIG51bGwpKSk7CiAgICAgICAgICAgICAgICAvLyBUT0RPKGNhaXMpOiBBZGQgY2F0Y2hFcnJvcigpIHRvIHBpcGUuCiAgICAgICAgICAgIH0pKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEVtaXRzIHdoZW4gdXNlciBmb2N1c2VzIG9uIGFuIGFsZXJ0IHR5cGUuCiAgICAgICAgICoKICAgICAgICAgKiBSZXR1cm5zIGFuIE9ic2VydmFibGUgZm9yIHdoYXQgYWRkaXRpb25hbCBleGVjdXRpb24gZGlnZXN0cyBuZWVkIHRvIGJlIGZldGN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AogICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVtQWxlcnRzT2ZGb2N1c2VkVHlwZSkgJiYKICAgICAgICAgICAgICAgICAgICBhbGVydHNMb2FkZWQuc3RhdGUgIT09IERhdGFMb2FkU3RhdGUuTE9BRElORyk7CiAgICAgICAgICAgIH0pKSwgdGFwKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHRoaXMuc3RvcmUuZGlzcGF0Y2gobnVtQWxlcnRzQW5kQnJlYWtkb3duUmVxdWVzdGVkKCkpKSksIG1lcmdlTWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChbLCBydW5JZCwgZm9jdXNUeXBlXSkgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgYmVnaW4gPSAwOwogICAgICAgICAgICAgICAgLy8gVE9ETyhjYWlzKTogVXNlIHNtYXJ0ZXIgYGVuZGAgdmFsdWUgdG8gcmVkdWNlIHRoZSBhbW91bnQgb2YgZGF0YQogICAgICAgICAgICAgICAgLy8gZmV0Y2ggZWFjaCB0aW1lLgogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZW5kID0gLTE7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5kYXRhU291cmNlLmZldGNoQWxlcnRzKCgvKiogQHR5cGUgez99ICovIChydW5JZCkpLCBiZWdpbiwgZW5kLCAoLyoqIEB0eXBlIHs/fSAqLyAoZm9jdXNUeXBlKSkpOwogICAgICAgICAgICB9KSksIHRhcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoeyBudW1fYWxlcnRzLCBhbGVydHNfYnJlYWtkb3duLCBhbGVydF90eXBlLCBiZWdpbiwgZW5kLCBhbGVydHMgfSkgPT4gewogICAgICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChhbGVydHNPZlR5cGVMb2FkZWQoewogICAgICAgICAgICAgICAgICAgIG51bUFsZXJ0czogbnVtX2FsZXJ0cywKICAgICAgICAgICAgICAgICAgICBhbGVydHNCcmVha2Rvd246IGFsZXJ0c19icmVha2Rvd24sCiAgICAgICAgICAgICAgICAgICAgYWxlcnRUeXBlOiAoLyoqIEB0eXBlIHs/fSAqLyAoYWxlcnRfdHlwZSkpLAogICAgICAgICAgICAgICAgICAgIGJlZ2luLAogICAgICAgICAgICAgICAgICAgIGVuZCwKICAgICAgICAgICAgICAgICAgICBhbGVydHMsCiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0pKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENvbXB1dGUgdGhlIGV4ZWN1dGlvbiBkaWdlc3RzIHRvIGZldGNoIG9uIGZvY3VzaW5nIG9mIGFuIGFsZXJ0IHR5cGUuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHByZXZTdHJlYW0kCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmZXRjaEV4ZWN1dGlvbkRpZ2VzdHNGb3JBbGVydFR5cGVGb2N1cyhwcmV2U3RyZWFtJCkgewogICAgICAgICAgICByZXR1cm4gcHJldlN0cmVhbSQucGlwZSh3aXRoTGF0ZXN0RnJvbSh0aGlzLnN0b3JlLnNlbGVjdChnZXRFeGVjdXRpb25QYWdlU2l6ZSksIHRoaXMuc3RvcmUuc2VsZWN0KGdldERpc3BsYXlDb3VudCksIHRoaXMuc3RvcmUuc2VsZWN0KGdldE51bUV4ZWN1dGlvbnMpLCB0aGlzLnN0b3JlLnNlbGVjdChnZXRFeGVjdXRpb25EaWdlc3R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pbjogMCwgZW5kOiAwIH07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgYmVnaW4gPSBtaXNzaW5nUGFnZXNbMF0gKiBwYWdlU2l6ZTsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgZW5kID0gTWF0aC5taW4oZXhlY3V0aW9uRGlnZXN0c0xvYWRlZC5udW1FeGVjdXRpb25zLCAobWlzc2luZ1BhZ2VzW21pc3NpbmdQYWdlcy5sZW5ndGggLSAxXSArIDEpICogcGFnZVNpemUpOwogICAgICAgICAgICAgICAgICAgIHJldHVybiB7IHJ1bklkOiAoLyoqIEB0eXBlIHs/fSAqLyAocnVuSWQpKSwgYmVnaW4sIGVuZCB9OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBMb2FkIGxpc3Qgb2Ygc291cmNlIGZpbGVzIHdoZW4gZGVidWdnZXIgcGx1Z2luIGlzIGxvYWRlZC4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gcHJldlN0cmVhbSQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGxvYWRTb3VyY2VGaWxlTGlzdChwcmV2U3RyZWFtJCkgewogICAgICAgICAgICByZXR1cm4gcHJldlN0cmVhbSQucGlwZSh3aXRoTGF0ZXN0RnJvbSh0aGlzLnN0b3JlLnNlbGVjdChnZXRBY3RpdmVSdW5JZCksIHRoaXMuc3RvcmUuc2VsZWN0KGdldFNvdXJjZUZpbGVMaXN0TG9hZGVkKSksIGZpbHRlcigoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoWywgcnVuSWQsIHNvdXJjZUZpbGVMaXN0TG9hZFN0YXRlXSkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIChydW5JZCAhPT0gbnVsbCAmJgogICAgICAgICAgICAgICAgICAgIHNvdXJjZUZpbGVMaXN0TG9hZFN0YXRlLnN0YXRlICE9PSBEYXRhTG9hZFN0YXRlLkxPQURJTkcpOwogICAgICAgICAgICB9KSksIHRhcCgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB0aGlzLnN0b3JlLmRpc3BhdGNoKHNvdXJjZUZpbGVMaXN0UmVxdWVzdGVkKCkpKSksIG1lcmdlTWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChbLCBydW5JZF0pID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmRhdGFTb3VyY2UuZmV0Y2hTb3VyY2VGaWxlTGlzdCgoLyoqIEB0eXBlIHs/fSAqLyAocnVuSWQpKSkucGlwZSh0YXAoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBzb3VyY2VGaWxlTGlzdFJlc3BvbnNlCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoc291cmNlRmlsZUxpc3RSZXNwb25zZSkgPT4gewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBzb3VyY2VGaWxlcyA9IFtdOwogICAgICAgICAgICAgICAgICAgIHNvdXJjZUZpbGVMaXN0UmVzcG9uc2UuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgIChbaG9zdF9uYW1lLCBmaWxlX3BhdGhdKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIHNvdXJjZUZpbGVzLnB1c2goeyBob3N0X25hbWUsIGZpbGVfcGF0aCB9KTsKICAgICAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChzb3VyY2VGaWxlTGlzdExvYWRlZCh7IHNvdXJjZUZpbGVzIH0pKTsKICAgICAgICAgICAgICAgIH0pKSwgbWFwKCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHZvaWQgbnVsbCkpCiAgICAgICAgICAgICAgICAvLyBUT0RPKGNhaXMpOiBBZGQgY2F0Y2hFcnJvcigpIHRvIHBpcGUuCiAgICAgICAgICAgICAgICApOwogICAgICAgICAgICB9KSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGVuIHRoZSBhIHNvdXJjZSBmaWxlIGlzIGZvY3VzZWQgb24sIGxvYWQgaXRzIGNvbnRlbnQgZnJvbSB0aGUgZGF0YSBzb3VyY2UuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uU291cmNlRmlsZUZvY3VzZWQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmFjdGlvbnMkLnBpcGUob2ZUeXBlKHNvdXJjZUxpbmVGb2N1c2VkKSwgd2l0aExhdGVzdEZyb20odGhpcy5zdG9yZS5zZWxlY3QoZ2V0QWN0aXZlUnVuSWQpLCB0aGlzLnN0b3JlLnNlbGVjdChnZXRGb2N1c2VkU291cmNlRmlsZUluZGV4KSwgdGhpcy5zdG9yZS5zZWxlY3QoZ2V0Rm9jdXNlZFNvdXJjZUZpbGVDb250ZW50KSksIG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoW2ZvY3VzLCBydW5JZCwgZmlsZUluZGV4LCBmaWxlQ29udGVudF0pID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAgICAgcnVuSWQsCiAgICAgICAgICAgICAgICAgICAgc3RhY2tGcmFtZTogZm9jdXMuc3RhY2tGcmFtZSwKICAgICAgICAgICAgICAgICAgICBmaWxlSW5kZXgsCiAgICAgICAgICAgICAgICAgICAgZmlsZUNvbnRlbnQsCiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9KSksIGZpbHRlcigoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoeyBydW5JZCwgZmlsZUNvbnRlbnQgfSkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIChydW5JZCAhPT0gbnVsbCAmJgogICAgICAgICAgICAgICAgICAgIGZpbGVDb250ZW50ICE9PSBudWxsICYmCiAgICAgICAgICAgICAgICAgICAgZmlsZUNvbnRlbnQubG9hZFN0YXRlID09PSBEYXRhTG9hZFN0YXRlLk5PVF9MT0FERUQpOwogICAgICAgICAgICB9KSksIHRhcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoeyBzdGFja0ZyYW1lIH0pID0+IHRoaXMuc3RvcmUuZGlzcGF0Y2goc291cmNlRmlsZVJlcXVlc3RlZCh7CiAgICAgICAgICAgICAgICBob3N0X25hbWU6IHN0YWNrRnJhbWUuaG9zdF9uYW1lLAogICAgICAgICAgICAgICAgZmlsZV9wYXRoOiBzdGFja0ZyYW1lLmZpbGVfcGF0aCwKICAgICAgICAgICAgfSkpKSksIG1lcmdlTWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICh7IGZpbGVJbmRleCwgcnVuSWQgfSkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuZGF0YVNvdXJjZS5mZXRjaFNvdXJjZUZpbGUoKC8qKiBAdHlwZSB7P30gKi8gKHJ1bklkKSksIGZpbGVJbmRleCkucGlwZSh0YXAoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBzb3VyY2VGaWxlUmVzcG9uc2UKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChzb3VyY2VGaWxlUmVzcG9uc2UpID0+IHsKICAgICAgICAgICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKHNvdXJjZUZpbGVMb2FkZWQoc291cmNlRmlsZVJlc3BvbnNlKSk7CiAgICAgICAgICAgICAgICB9KSksIG1hcCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB2b2lkIG51bGwpKQogICAgICAgICAgICAgICAgLy8gVE9ETyhjYWlzKTogQWRkIGNhdGNoRXJyb3IoKSB0byBwaXBlLgogICAgICAgICAgICAgICAgKTsKICAgICAgICAgICAgfSkpKTsKICAgICAgICB9CiAgICB9CiAgICBEZWJ1Z2dlckVmZmVjdHMuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IEluamVjdGFibGUgfSwKICAgIF07CiAgICAvKiogQG5vY29sbGFwc2UgKi8KICAgIERlYnVnZ2VyRWZmZWN0cy5jdG9yUGFyYW1ldGVycyA9ICgpID0+IFsKICAgICAgICB7IHR5c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R1bGUgewogICAgfQogICAgRGVidWdUZW5zb3JWYWx1ZU1vZHVsZS5kZWNvcmF0b3JzID0gWwogICAgICAgIHsgdHlwZTogTmdNb2R1bGUsIGFyZ3M6IFt7CiAgICAgICAgICAgICAgICAgICAgZGVjbGFyYXRpb25zOiBbCiAgICAgICAgICAgICAgICAgICAgICAgIERlYnVnVGVuc29yRFR5cGVDb21wb25lbnQsCiAgICAgICAgICAgICAgICAgICAgICAgIERlYnVnVGVuc29ySGFzSW5mT3JOYU5Db21wb25lbnQsCiAgICAgICAgICAgICAgICAgICAgICAgIERlYnVnVGVuc29yTnVtZXJpY0JyZWFrZG93bkNvbXBvbmVudCwKICAgICAgICAgICAgICAgICAgICAgICAgRGVidWdUZW5zb3JSYW5rQ29tcG9uZW50LAogICAgICAgICAgICAgICAgICAgICAgICBEZWJ1Z1RlbnNvclNoYXBlQ29tcG9uZW50LAogICAgICAgICAgICAgICAgICAgICAgICBEZWJ1Z1RlbnNvclZhbHVlQ29tcG9uZW50LAogICAgICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICAgICAgaW1wb3J0czogW0NvbW1vbk1vZHVsZV0sCiAgICAgICAgICAgICAgICAgICAgZXhwb3J0czogW0RlYnVnVGVuc29yVmFsdWVDb21wb25lbnRdLAogICAgICAgICAgICAgICAgfSxdIH0sCiAgICBdOwogICAgLyoqIEBub2NvbGxhcHNlICovIERlYnVnVGVuc29yVmFsdWVNb2R1bGUuybVtb2QgPSDJtcm1ZGVmaW5lTmdNb2R1bGUoeyB0eXBlOiBEZWJ1Z1RlbnNvclZhbHVlTW9kdWxlIH0pOwogICAgLyoqIEBub2NvbGxhcHNlICovIERlYnVnVGVuc29yVmFsdWVNb2R1bGUuybVpbmogPSDJtcm1ZGVmaW5lSW5qZWN0b3IoeyBmYWN0b3J5OiBmdW5jdGlvbiBEZWJ1Z1RlbnNvclZhbHVlTW9kdWxlX0ZhY3RvcnkodCkgeyByZXR1cm4gbmV3ICh0IHx8IERlYnV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PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwogICAgY2xhc3MgVGltZWxpbmVNb2R1bGUgewogICAgfQogICAgVGltZWxpbmVNb2R1bGUuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IE5nTW9kdWxlLCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIGRlY2xhcmF0aW9uczogW1RpbWVsaW5lQ29tcG9uZW50LCBUaW1lbGluZUNvbnRhaW5lcl0sCiAgICAgICAgICAgICAgICAgICAgaW1wb3J0czogWwogICAgICAgICAgICAgICAgICAgICAgICBDb21tb25Nb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIEV4ZWN1dGlvbkRhdGFNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIE1hdEJ1dHRvbk1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgTWF0U2xpZGVyTW9kdWxlLAogICAgICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICAgICAgLy8gVE9ETyhjYWlzKTogVGhlIGZvbGxvd2luZyB0d28gcHJvdmlkZXJzIGFyZSBtZWFudCB0byBtYWtlIHRoZSBtYXQtc2xpZGVyCiAgICAgICAgICAgICAgICAgICAgLy8gZHJhZ2dpbmcgdG8gd29yay4gQnV0IHRoZSBkcmFnZ2luZyBpcyBzdGlsbCBub3Qgd29ya2luZywgbmVlZHMgbW9yZQogICAgICAgICAgICAgICAgICAgIC8vIGludmVzdGlnYXRpb24uIE1heSBiZSByZWxhdGVkIHRvOgogICAgICAgICAgICAgICAgICAgIC8vIGh0dHBzOi8vZ2l0aHViLmNvbS9hbmd1bGFyL2NvbXBvbmVudHMvaXNzdWVzLzc5MDUKICAgICAgICAgICAgICAgICAgICBleHBvcnRzOiBbVGltZWxpbmVDb250YWluZXJdLAogICAgICAgICAgICAgICAgfSxdIH0sCiAgICBdOwogICAgLyoqIEBub2NvbGxhcHNlICovIFRpbWVsaW5lTW9kdWxlLsm1bW9kID0gybXJtWRlZmluZ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PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwogICAgY2xhc3MgRGVidWdnZXJNb2R1bGUgewogICAgfQogICAgRGVidWdnZXJNb2R1bGUuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IE5nTW9kdWxlLCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIGRlY2xhcmF0aW9uczogW0RlYnVnZ2VyQ29tcG9uZW50LCBEZWJ1Z2dlckNvbnRhaW5lcl0sCiAgICAgICAgICAgICAgICAgICAgaW1wb3J0czogWwogICAgICAgICAgICAgICAgICAgICAgICBBbGVydHNNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIENvbW1vbk1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgR3JhcGhFeGVjdXRpb25zTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBHcmFwaE1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgSW5hY3RpdmVNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIFNvdXJjZUZpbGVzTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBTdGFja1RyYWNlTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBUZmRiZzJTZXJ2ZXJEYXRhU291cmNlTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBUaW1lbGluZU1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgU3RvcmVNb2R1bGUuZm9yRmVhdHVyZShERUJVR0dFUl9GRUFUVVJFX0tFWSwgcmVkdWNlcnMkNiksCiAgICAgICAgICAgICAgICAgICAgICAgIEVmZmVjdHNNb2R1bGUuZm9yRmVhdHVyZShbRGVidWdnZXJFZmZlY3RzXSksCiAgICAgICAgICAgICAgICAgICAgICAgIFBsdWdpblJlZ2lzdHJ5TW9kdWxlLmZvclBsdWdpbignZGVidWdnZXItdjInLCBEZWJ1Z2dlckNvbnRhaW5lciksCiAgICAgICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgICAgICBleHBvcnRzOiBbRGVidWdnZXJDb250YWluZXJdLAogICAgICAgICAgICAgICAgICAgIGVudHJ5Q29tcG9uZW50czogW0RlYnVnZ2VyQ29udGFpbmVyXSwKICAgICAgICAgICAgICAgIH0sXSB9LAogICAgXTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLyBEZWJ1Z2dlck1vZHVsZS7JtW1vZCA9IMm1ybVkZWZpbmVOZ01vZHVsZSh7IHR5cGU6IERlYnVnZ2VyTW9kdWxlIH0pOwogICAgLyoqIEBub2NvbGxhcHNlICovIERlYnVnZ2VyTW9kdWxlLsm1aW5qID0gybXJtWRlZmluZUluamVjdG9yKHsgZmFjdG9yeTogZnVuY3Rpb24gRGVidWdnZXJNb2R1bGVfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgRGVidWdnZXJNb2R1bGUpKCk7IH0sIGltcG9ydHM6IFtbCiAgICAgICAgICAgICAgICBBbGVydHNNb2R1bGUsCiAgICAgICAgICAgICAgICBDb21tb25Nb2R1bGUsCiAgICAgICAgICAgICAgICBHcmFwaEV4ZWN1dGlvbnNNb2R1bGUsCiAgICAgICAgICAgICAgICBHcmFwaE1vZHVsZSwKICAgICAgICAgICAgICAgIEluYWN0aXZlTW9kdWxlLAogICAgICAgICAgICAgICAgU291cmNlRmlsZXNNb2R1bGUsCiAgICAgICAgICAgICAgICBTdGFja1RyYWNlTW9kdWxlLAogICAgICAgICAgICAgICAgVGZkYmcyU2VydmVyRGF0YVNvdXJjZU1vZHVsZSwKICAgICAgICAgICAgICAgIFRpbWVsaW5lTW9kdWxlLAogICAgICAgICAgICAgICAgU3RvcmVNb2R1bGUuZm9yRmVhdHVyZShERUJVR0dFUl9GRUFUVVJFX0tFWSwgcmVkdWNlcnMkNiksCiAgICAgICAgICAgICAgICBFZmZlY3RzTW9kdWxlLmZvckZlYXR1cmUoW0RlYnVnZ2VyRWZmZWN0c10pLAogICAgICAgICAgICAgICAgU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yaWVmCiAgICAgICAgICogZGVsYXkgdG8gZGlzcGxheSB0aGUgcmlwcGxlLgogICAgICAgICAqLwogICAgICAgIHRyYW5zZm9ybU1lbnU6IHRyaWdnZXIoJ3RyYW5zZm9ybU1lbnUnLCBbCiAgICAgICAgICAgIHN0YXRlKCd2b2lkJywgc3R5bGUoewogICAgICAgICAgICAgICAgb3BhY2l0eTogMCwKICAgICAgICAgICAgICAgIHRyYW5zZm9ybTogJ3NjYWxlKDAuOCknCiAgICAgICAgICAgIH0pKSwKICAgICAgICAgICAgdHJhbnNpdGlvbigndm9pZCA9PiBlbnRlcicsIGdyb3VwKFsKICAgICAgICAgICAgICAgIHF1ZXJ5KCcubWF0LW1lbnUtY29udGVudCwgLm1hdC1tZGMtbWVudS1jb250ZW50JywgYW5pbWF0ZSgnMTAwbXMgbGluZWFyJywgc3R5bGUoewogICAgICAgICAgICAgICAgICAgIG9wYWNpdHk6IDEKICAgICAgICAgICAgICAgIH0pKSksCiAgICAgICAgICAgICAgICBhbmltYXRlKCcxMjBtcyBjdWJpYy1iZXppZXIoMCwgMCwgMC4yLCAxKScsIHN0eWxlKHsgdHJhbnNmb3JtOiAnc2NhbGUoMSknIH0pKSwKICAgICAgICAgICAgXSkpLAogICAgICAgICAgICB0cmFuc2l0aW9uKCcqID0+IHZvaWQnLCBhbmltYXRlKCcxMDBtcyAyNW1zIGxpbmVhcicsIHN0eWxlKHsgb3BhY2l0eTogMCB9KSkpCiAgICAgICAgXSksCiAgICAgICAgLyoqCiAgICAgICAgICogVGhpcyBhbmltYXRpb24gZmFkZXMgaW4gdGhlIGJhY2tncm91bmQgY29sb3IgYW5kIGNvbnRlbnQgb2YgdGhlIG1lbnUgcGFuZWwKICAgICAgICAgKiBhZnRlciBpdHMgY29udGFpbmluZyBlbGVtZW50IGlzIHNjYWxlZCBpbi4KICAgICAgICAgKi8KICAgICAgICBmYWRlSW5JdGVtczogdHJpZ2dlcignZmFkZUluSXRlbXMnLCBbCiAgICAgICAgICAgIC8vIFRPRE8oY3Jpc2JldG8pOiB0aGlzIGlzIGluc2lkZSB0aGUgYHRyYW5zZm9ybU1lbnVgCiAgICAgICAgICAgIC8vIG5vdy4gUmVtb3ZlIG5leHQgdGltZSB3ZSBkbyBicmVha2luZyBjaGFuZ2VzLgogICAgICAgICAgICBzdGF0ZSgnc2hvd2luZycsIHN0eWxlKHsgb3BhY2l0eTogMSB9KSksCiAgICAgICAgICAgIHRyYW5zaXRpb24oJ3ZvaWQgPT4gKicsIFsKICAgICAgICAgICAgICAgIHN0eWxlKHsgb3BhY2l0eTogMCB9KSwKICAgICAgICAgICAgICAgIGFuaW1hdGUoJzQwMG1zIDEwMG1zIGN1YmljLWJlemllcigwLjU1LCAwLCAwLjU1LCAwLjIpJykKICAgICAgICAgICAgXSkKICAgICAgICBdKQogICAgfTsKCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcgYWRkZWQgYnkgdHNpY2tsZQogICAgICogR2VuZXJhdGVkIGZyb206IHNyYy9tYXRlcmlhbC9tZW51L21lbnUtY29udGVudC50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvKioKICAgICAqIE1lbnUgY29udGVudCB0aGF0IHdpbGwgYmUgcmVuZGVyZWQgbGF6aWx5IG9uY2UgdGhlIG1lbnUgaXMgb3BlbmVkLgogICAgICovCiAgICBjbGFzcyBNYXRNZW51Q29udGVudCB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBfdGVtcGxhdGUKICAgICAgICAgKiBAcGFyYW0gez99IF9jb21wb25lbnRGYWN0b3J5UmVzb2x2ZXIKICAgICAgICAgKiBAcGFyYW0gez99IF9hcHBSZWYKICAgICAgICAgKiBAcGFyYW0gez99IF9pbmplY3RvcgogICAgICAgICAqIEBwYXJhbSB7P30gX3ZpZXdDb250YWluZXJSZWYKICAgICAgICAgKiBAcGFyYW0gez99IF9kb2N1bWVudAogICAgICAgICAqIEBwYXJhbSB7Pz19IF9jaGFuZ2VEZXRlY3RvclJlZgogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKF90ZW1wbGF0ZSwgX2NvbXBvbmVudEZhY3RvcnlSZXNvbHZlciwgX2FwcFJlZiwgX2luamVjdG9yLCBfdmlld0NvbnRhaW5lclJlZiwgX2RvY3VtZW50LCBfY2hhbmdlRGV0ZWN0b3JSZWYpIHsKICAgICAgICAgICAgdGhpcy5fdGVtcGxhdGUgPSBfdGVtcGxhdGU7CiAgICAgICAgICAgIHRoaXMuX2NvbXBvbmVudEZhY3RvcnlSZXNvbHZlciA9IF9jb21wb25lbnRGYWN0b3J5UmVzb2x2ZXI7CiAgICAgICAgICAgIHRoaXMuX2FwcFJlZiA9IF9hcHBSZWY7CiAgICAgICAgICAgIHRoaXMuX2luamVjdG9yID0gX2luamVjdG9yOwogICAgICAgICAgICB0aGlzLl92aWV3Q29udGFpbmVyUmVmID0gX3ZpZXdDb250YWluZXJSZWY7CiAgICAgICAgICAgIHRoaXMuX2RvY3VtZW50ID0gX2RvY3VtZW50OwogICAgICAgICAgICB0aGlzLl9jaGFuZ2VEZXRlY3RvclJlZiA9IF9jaGFuZ2VEZXRlY3RvclJlZjsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEVtaXRzIHdoZW4gdGhlIG1lbnUgY29udGVudCBoYXMgYmVlbiBhdHRhY2hlZC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX2F0dGFjaGVkID0gbmV3IFN1YmplY3QoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQXR0YWNoZXMgdGhlIGNvbnRlbnQgd2l0aCBhIHBhcnRpY3VsYXIgY29udGV4dC4KICAgICAgICAgKi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RhY2godGhpcy5fb3V0bGV0LCBjb250ZXh0KTsKICAgICAgICAgICAgdGhpcy5fYXR0YWNoZWQubmV4dCgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBEZXRhY2hlcyB0aGUgY29udGVudC4KICAgICAgICAgKiBcQGRvY3MtcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZGV0YWNoKCkgewogICAgICAgICAgICBpZiAodGhpcy5fcG9ydGFsLmlzQXR0YWNoZWQpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3BvcnRhbC5kZXRhY2goKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25EZXN0cm95KCkgewogICAgICAgICAgICBpZiAodGhpcy5fb3V0bGV0KSB7CiAgICAgICAgICAgICAgICB0aGlzLl9vdXRsZXQuZGlzcG9zZSgpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQogICAgTWF0TWVudUNvbnRlbnQuybVmYWMgPSBmdW5jdGlvbiBNYXRNZW51Q29udGVudF9GYWN0b3J5KHQpIHsgcmV0dXJuIG5ldyAodCB8fCBNYXRNZW51Q29udGVudCkoybXJtWRpcmVjdGl2ZUluamVjdChUZW1wbGF0ZVJlZiksIMm1ybVkaXJlY3RpdmVJbmplY3QoQ29tcG9uZW50RmFjdG9yeVJlc29sdmVyKSwgybXJtWRpcmVjdGl2ZUluamVjdChBcHBsaWNhdGlvblJlZiksIMm1ybVkaXJlY3RpdmVJbmplY3QoSW5qZWN0b3IpLCDJtcm1ZGlyZWN0aXZlSW5qZWN0KFZpZXdDb250YWluZXJSZWYpLCDJtcm1ZGlyZWN0aXZlSW5qZWN0KERPQ1VNRU5UJDEpLCDJtcm1ZGlyZWN0aXZlSW5qZWN0KENoYW5nZURldGVjdG9yUmVmKSk7IH07CiAgICBNYXRNZW51Q29udGVudC7JtW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PX0gZG9jdW1lbnQKICAgICAgICAgKiBAcGFyYW0gez89fSBfZm9jdXNNb25pdG9yCiAgICAgICAgICogQHBhcmFtIHs/PX0gX3BhcmVudE1lbnUKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihfZWxlbWVudFJlZiwgZG9jdW1lbnQsIF9mb2N1c01vbml0b3IsIF9wYXJlbnRNZW51KSB7CiAgICAgICAgICAgIC8vIEBicmVha2luZy1jaGFuZ2UgOC4wLjAgbWFrZSBgX2ZvY3VzTW9uaXRvcmAgYW5kIGBkb2N1bWVudGAgcmVxdWlyZWQgcGFyYW1zLgogICAgICAgICAgICBzdXBlcigpOwogICAgICAgICAgICB0aGlzLl9lbGVtZW50UmVmID0gX2VsZW1lbnRSZWY7CiAgICAgICAgICAgIHRoaXMuX2ZvY3VzTW9uaXRvciA9IF9mb2N1c01vbml0b3I7CiAgICAgICAgICAgIHRoaXMuX3BhcmVudE1lbnUgPSBfcGFyZW50TWVudTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEFSSUEgcm9sZSBmb3IgdGhlIG1lbnUgaXRlbS4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMucm9sZSA9ICdtZW51aXRlbSc7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBTdHJlYW0gdGhhdCBlbWl0cyB3aGVuIHRoZSBtZW51IGl0ZW0gaXMgaG92ZXJlZC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX2hvdmVyZWQgPSBuZXcgU3ViamVjdCgpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogU3RyZWFtIHRoYXQgZW1pdHMgd2hlbiB0aGUgbWVudSBpdGVtIGlzIGZvY3VzZWQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9mb2N1c2VkID0gbmV3IFN1YmplY3QoKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFdoZXRoZXIgdGhlIG1lbnUgaXRlbSBpcyBoaWdobGlnaHRlZC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX2hpZ2hsaWdodGVkID0gZmFsc2U7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBXaGV0aGVyIHRoZSBtZW51IGl0ZW0gYWN0cyBhcyBhIHRyaWdnZXIgZm9yIGEgc3ViLW1lbnUuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl90cmlnZ2Vyc1N1Ym1lbnUgPSBmYWxzZTsKICAgICAgICAgICAgaWYgKF9mb2N1c01vbml0b3IpIHsKICAgICAgICAgICAgICAgIC8vIFN0YXJ0IG1vbml0b3JpbmcgdGhlIGVsZW1lbnQgc28gaXQgZ2V0cyB0aGUgYXBwcm9wcmlhdGUgZm9jdXNlZCBjbGFzc2VzLiBXZSB3YW50CiAgICAgICAgICAgICAgICAvLyB0byBzaG93IHRoZSBmb2N1cyBzdHlsZSBmb3IgbWVudSBpdGVtcyBvbmx5IHdoZW4gdGhlIGZvY3VzIHdhcyBub3QgY2F1c2VkIGJ5IGEKICAgICAgICAgICAgICAgIC8vIG1vdXNlIG9yIHRvdWNoIGludGVyYWN0aW9uLgogICAgICAgICAgICAgICAgX2ZvY3VzTW9uaXRvci5tb25pdG9yKHRoaXMuX2VsZW1lbnRSZWYsIGZhbHNlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoX3BhcmVudE1lbnUgJiYgX3BhcmVudE1lbnUuYWRkSXRlbSkgewogICAgICAgICAgICAgICAgX3BhcmVudE1lbnUuYWRkSXRlbSh0aGlzKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9kb2N1bWVudCA9IGRvY3VtZW50OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBGb2N1c2VzIHRoZSBtZW51IGl0ZW0uCiAgICAgICAgICogQHBhcmFtIHs/PX0gb3JpZ2luCiAgICAgICAgICogQHBhcmFtIHs/PX0gb3B0aW9ucwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZm9jdXMob3JpZ2luID0gJ3Byb2dyYW0nLCBvcHRpb25zKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9mb2N1c01vbml0b3IpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2ZvY3VzTW9uaXRvci5mb2N1c1ZpYSh0aGlzLl9nZXRIb3N0RWxlbWVudCgpLCBvcmlnaW4sIG9wdGlvbnMpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fZ2V0SG9zdEVsZW1lbnQoKS5mb2N1cyhvcHRpb25zKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9mb2N1c2VkLm5leHQodGhpcyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkRlc3Ryb3koKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9mb2N1c01vbml0b3IpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2ZvY3VzTW9uaXRvci5zdG9wTW9uaXRvcmluZyh0aGlzLl9lbGVtZW50UmVmKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5fcGFyZW50TWVudSAmJiB0aGlzLl9wYXJlbnRNZW51LnJlbW92ZUl0ZW0pIHsKICAgICAgICAgICAgICAgIHRoaXMuX3BhcmVudE1lbnUucmVtb3ZlSXRlbSh0aGlzKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9ob3ZlcmVkLmNvbXBsZXRlKCk7CiAgICAgICAgICAgIHRoaXMuX2ZvY3VzZWQuY29tcGxldGUoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVXNlZCB0byBzZXQgdGhlIGB0YWJpbmRleGAuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZ2V0VGFiSW5kZXgoKSB7CiA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c3QgZWxlbWVudCA9IHRoaXMuX2VsZW1lbnRSZWYubmF0aXZlRWxlbWVudDsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB0ZXh0Tm9kZVR5cGUgPSB0aGlzLl9kb2N1bWVudCA/IHRoaXMuX2RvY3VtZW50LlRFWFRfTk9ERSA6IDM7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IG91dHB1dCA9ICcnOwogICAgICAgICAgICBpZiAoZWxlbWVudC5jaGlsZE5vZGVzKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBsZW5ndGggPSBlbGVtZW50LmNoaWxkTm9kZXMubGVuZ3RoOwogICAgICAgICAgICAgICAgLy8gR28gdGhyb3VnaCBhbGwgdGhlIHRvcC1sZXZlbCB0ZXh0IG5vZGVzIGFuZCBleHRyYWN0IHRoZWlyIHRleHQuCiAgICAgICAgICAgICAgICAvLyBXZSBza2lwIGFueXRoaW5nIHRoYXQncyBub3QgYSB0ZXh0IG5vZGUgdG8gcHJldmVudCB0aGUgdGV4dCBmcm9tCiAgICAgICAgICAgICAgICAvLyBiZWluZyB0aHJvd24gb2ZmIGJ5IHNvbWV0aGluZyBsaWtlIGFuIGljb24uCiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKGVsZW1lbnQuY2hpbGROb2Rlc1tpXS5ub2RlVHlwZSA9PT0gdGV4dE5vZGVUeXBlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG91dHB1dCArPSBlbGVtZW50LmNoaWxkTm9kZXNbaV0udGV4dENvbnRlbnQ7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBvdXRwdXQudHJpbSgpOwogICAg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AgICBjb25zdCBNQVRfTUVOVV9ERUZBVUxUX09QVElPTlMgPSBuZXcgSW5qZWN0aW9uVG9rZW4oJ21hdC1tZW51LWRlZmF1bHQtb3B0aW9ucycsIHsKICAgICAgICBwcm92aWRlZEluOiAncm9vdCcsCiAgICAgICAgZmFjdG9yeTogTUFUX01FTlVfREVGQVVMVF9PUFRJT05TX0ZBQ1RPUlkKICAgIH0pOwogICAgLyoqCiAgICAgKiBcQGRvY3MtcHJpdmF0ZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gTUFUX01FTlVfREVGQVVMVF9PUFRJT05TX0ZBQ1RPUlkoKSB7CiAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgb3ZlcmxhcFRyaWdnZXI6IGZhbHNlLAogICAgICAgICAgICB4UG9zaXRpb246ICdhZnRlcicsCiAgICAgICAgICAgIHlQb3NpdGlvbjogJ2JlbG93JywKICAgICAgICAgICAgYmFja2Ryb3BDbGFzczogJ2Nkay1vdmVybGF5LXRyYW5zcGFyZW50LWJhY2tkcm9wJywKICAgICAgICB9OwogICAgfQogICAgLyoqCiAgICAgKiBTdGFydCBlbGV2YXRpb24gZm9yIHRoZSBtZW51IHBhbmVsLgogICAgICogXEBkb2NzLXByaXZhdGUKICAgICAqIEB0eXBlIHs/fQogICAgICovCiAgICBjb25zdCBNQVRfTUVOVV9CQVNFX0VMRVZBVElPTiA9IDQ7CiAgICAvKiogQHR5cGUgez99ICovCiAgICBsZXQgbWVudVBhbmVsVWlkID0gMDsKICAgIC8qKgogICAgICogQmFzZSBjbGFzcyB3aXRoIGFsbCBvZiB0aGUgYE1hdE1lbnVgIGZ1bmN0aW9uYWxpdHkuCiAgICAgKi8KICAgIC8vIHRzbGludDpkaXNhYmxlLW5leHQtbGluZTpjbGFzcy1uYW1lCiAgICBjbGFzcyBfTWF0TWVudUJhc2UgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gX2VsZW1lbnRSZWYKICAgICAgICAgKiBAcGFyYW0gez99IF9uZ1pvbmUKICAgICAgICAgKiBAcGFyYW0gez99IF9kZWZhdWx0T3B0aW9ucwogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKF9lbGVtZW50UmVmLCBfbmdab25lLCBfZGVmYXVsdE9wdGlvbnMpIHsKICAgICAgICAgICAgdGhpcy5fZWxlbWVudFJlZiA9IF9lbGVtZW50UmVmOwogICAgICAgICAgICB0aGlzLl9uZ1pvbmUgPSBfbmdab25lOwogICAgICAgICAgICB0aGlzLl9kZWZhdWx0T3B0aW9ucyA9IF9kZWZhdWx0T3B0aW9uczsKICAgICAgICAgICAgdGhpcy5feFBvc2l0aW9uID0gdGhpcy5fZGVmYXVsdE9wdGlvbnMueFBvc2l0aW9uOwogICAgICAgICAgICB0aGlzLl95UG9zaXRpb24gPSB0aGlzLl9kZWZhdWx0T3B0aW9ucy55UG9zaXRpb247CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBPbmx5IHRoZSBkaXJlY3QgZGVzY2VuZGFudCBtZW51IGl0ZW1zLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fZGlyZWN0RGVzY2VuZGFudEl0ZW1zID0gbmV3IFF1ZXJ5TGlzdCgpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogU3Vic2NyaXB0aW9uIHRvIHRhYiBldmVudHMgb24gdGhlIG1lbnUgcGFuZWwKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX3RhYlN1YnNjcmlwdGlvbiA9IFN1YnNjcmlwdGlvbi5FTVBUWTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIENvbmZpZyBvYmplY3QgdG8gYmUgcGFzc2VkIGludG8gdGhlIG1lbnUncyBuZ0NsYXNzCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9jbGFzc0xpc3QgPSB7fTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEN1cnJlbnQgc3RhdGUgb2YgdGhlIHBhbmVsIGFuaW1hdGlvbi4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX3BhbmVsQW5pbWF0aW9uU3RhdGUgPSAndm9pZCc7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBFbWl0cyB3aGVuZXZlciBhbiBhbmltYXRpb24gb24gdGhlIG1lbnUgY29tcGxldGVzLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fYW5pbWF0aW9uRG9uZSA9IG5ldyBTdWJqZWN0KCk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBDbGFzcyB0byBiZSBhZGRlZCB0byB0aGUgYmFja2Ryb3AgZWxlbWVudC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuYmFja2Ryb3BDbGFzcyA9IHRoaXMuX2RlZmF1bHRPcHRpb25zLmJhY2tkcm9wQ2xhc3M7CiAgICAgICAgICAgIHRoaXMuX292ZXJsYXBUcmlnZ2VyID0gdGhpcy5fZGVmYXVsdE9wdGlvbnMub3ZlcmxhcFRyaWdnZXI7CiAgICAgICAgICAgIHRoaXMuX2hhc0JhY2tkcm9wID0gdGhpcy5fZGVmYXVsdE9wdGlvbnMuaGFzQmFja2Ryb3A7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBFdmVudCBlbWl0dGVkIHdoZW4gdGhlIG1lbnUgaXMgY2xvc2VkLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5jbG9zZWQgPSBuZXcgRXZlbnRFbWl0dGVyKCk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBFdmVudCBlbWl0dGVkIHdoZW4gdGhlIG1lbnUgaXMgY2xvc2VkLgogICAgICAgICAgICAgKiBAZGVwcmVjYXRlZCBTd2l0Y2ggdG8gYGNsb3NlZGAgaW5zdGVhZAogICAgICAgICAgICAgKiBcQGJyZWFraW5nLWNoYW5nZSA4LjAuMAogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5jbG9zZSA9IHRoaXMuY2xvc2VkOwogICAgICAgICAgICB0aGlzLnBhbmVsSWQgPSBgbWF0LW1lbnUtcGFuZWwtJHttZW51UGFuZWxVaWQrK31gOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBQb3NpdGlvbiBvZiB0aGUgbWVudSBpbiB0aGUgWCBheGlzLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHhQb3NpdGlvbigpIHsgcmV0dXJuIHRoaXMuX3hQb3NpdGlvbjsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCB4UG9zaXRpb24odmFsdWUpIHsKICAgICAgICAgICAgaWYgKHZhbHVlICE9PSAnYmVmb3JlJyAmJiB2YWx1ZSAhPT0gJ2FmdGVyJykgewogICAgICAgICAgICAgICAgdGhyb3dNYXRNZW51SW52YWxpZFBvc2l0aW9uWCgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX3hQb3NpdGlvbiA9IHZhbHVlOwogICAgICAgICAgICB0aGlzLnNldFBvc2l0aW9uQ2xhc3NlcygpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBQb3NpdGlvbiBvZiB0aGUgbWVudSBpbiB0aGUgWSBheGlzLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHlQb3NpdGlvbigpIHsgcmV0dXJuIHRoaXMuX3lQb3NpdGlvbjsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCB5UG9zaXRpb24odmFsdWUpIHsKICAgICAgICAgICAgaWYgKHZhbHVlICE9PSAnYWJvdmUnICYmIHZhbHVlICE9PSAnYmVsb3cnKSB7CiAgICAgICAgICAgICAgICB0aHJvd01hdE1lbnVJbnZhbGlkUG9zaXRpb25ZKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5feVBvc2l0aW9uID0gdmFsdWU7CiAgICAgICAgICAgIHRoaXMuc2V0UG9zaXRpb25DbGFzc2VzKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFdoZXRoZXIgdGhlIG1lbnUgc2hvdWxkIG92ZXJsYXAgaXRzIHRyaWdnZXIuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgb3ZlcmxhcFRyaWdnZXIoKSB7IHJldHVybiB0aGlzLl9vdmVybGFwVHJpZ2dlcjsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBvdmVybGFwVHJpZ2dlcih2YWx1ZSkgewogICAgICAgICAgICB0aGlzLl9vdmVybGFwVHJpZ2dlciA9IGNvZXJjZUJvb2xlYW5Qcm9wZXJ0eSh2YWx1ZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFdoZXRoZXIgdGhlIG1lbnUgaGFzIGEgYmFja2Ryb3AuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgaGFzQmFja2Ryb3AoKSB7IHJldHVybiB0aGlzLl9oYXNCYWNrZHJvcDsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBoYXNCYWNrZHJvcCh2YWx1ZSkgewogICAgICAgICAgICB0aGlzLl9oYXNCYWNrZHJvcCA9IGNvZXJjZUJvb2xlYW5Qcm9wZXJ0eSh2YWx1ZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFRoaXMgbWV0aG9kIHRha2VzIGNsYXNzZXMgc2V0IG9uIHRoZSBob3N0IG1hdC1tZW51IGVsZW1lbnQgYW5kIGFwcGxpZXMgdGhlbSBvbiB0aGUKICAgICAgICAgKiBtZW51IHRlbXBsYXRlIHRoYXQgZGlzcGxheXMgaW4gdGhlIG92ZXJsYXkgY29udGFpbmVyLiAgT3RoZXJ3aXNlLCBpdCdzIGRpZmZpY3VsdAogICAgICAgICAqIHRvIHN0eWxlIHRoZSBjb250YWluaW5nIG1lbnUgZnJvbSBvdXRzaWRlIHRoZSBjb21wb25lbnQuCiAgICAgICAgICogQHBhcmFtIHs/fSBjbGFzc2VzIGxpc3Qgb2YgY2xhc3MgbmFtZXMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBwYW5lbENsYXNzKGNsYXNzZXMpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwcmV2aW91c1BhbmVsQ2xhc3MgPSB0aGlzLl9wcmV2aW91c1BhbmVsQ2xhc3M7CiAgICAgICAgICAgIGlmIChwcmV2aW91c1BhbmVsQ2xhc3MgJiYgcHJldmlvdXNQYW5lbENsYXNzLmxlbmd0aCkgewogICAgICAgICAgICAgICAgcHJldmlvdXNQYW5lbENsYXNzLnNwbGl0KCcgJykuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGNsYXNzTmFtZQogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKGNsYXNzTmFtZSkgPT4gewogICAgICAgICAgICAgICAgICAgIHRoaXMuX2NsYXNzTGlzdFtjbGFzc05hbWVdID0gZmFsc2U7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fcHJldmlvdXNQYW5lbENsYXNzID0gY2xhc3NlczsKICAgICAgICAgICAgaWYgKGNsYXNzZXMgJiYgY2xhc3Nlcy5sZW5ndGgpIHsKICAgICAgICAgICAgICAgIGNsYXNzZXMuc3BsaXQoJyAnKS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY2xhc3NOYW1lCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoY2xhc3NOYW1lKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fY2xhc3NMaXN0W2NsYXNzTmFtZV0gPSB0cnVlOwogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgdGhpcy5fZWxlbWVudFJlZi5uYXRpdmVFbGVtZW50LmNsYXNzTmFtZSA9ICcnOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFRoaXMgbWV0aG9kIHRha2VzIGNsYXNzZXMgc2V0IG9uIHRoZSBob3N0IG1hdC1tZW51IGVsZW1lbnQgYW5kIGFwcGxpZXMgdGhlbSBvbiB0aGUKICAgICAgICAgKiBtZW51IHRlbXBsYXRlIHRoYXQgZGlzcGxheXMgaW4gdGhlIG92ZXJsYXkgY29udGFpbmVyLiAgT3RoZXJ3aXNlLCBpdCdzIGRpZmZpY3VsdAogICAgICAgICAqIHRvIHN0eWxlIHRoZSBjb250YWluaW5nIG1lbnUgZnJvbSBvdXRzaWRlIHRoZSBjb21wb25lbnQuCiAgICAgICAgICogQGRlcHJlY2F0ZWQgVXNlIGBwYW5lbENsYXNzYCBpbnN0ZWFkLgogICAgICAgICAqIFxAYnJlYWtpbmctY2hhbmdlIDguMC4wCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgY2xhc3NMaXN0KCkgeyByZXR1cm4gdGhpcy5wYW5lbENsYXNzOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBjbGFzc2VzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgY2xhc3NMaXN0KGNsYXNzZXMpIHsgdGhpcy5wYW5lbENsYXNzID0gY2xhc3NlczsgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkluaXQoKSB7CiAgICAgICAgICAgIHRoaXMuc2V0UG9zaXRpb25DbGFzc2VzKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdBZnRlckNvbnRlbnRJbml0KCkgewogICAgICAgICAgICB0aGlzLl91cGRhdGVEaXJlY3REZXNjZW5kYW50cygpOwogICAgICAgICAgICB0aGlzLl9rZXlNYW5hZ2VyID0gbmV3IEZvY3VzS2V5TWFuYWdlcih0aGlzLl9kaXJlY3REZXNjZW5kYW50SXRlbXMpLndpdGhXcmFwKCkud2l0aFR5cGVBaGVhZCgpOwogICAgICAgICAgICB0aGlzLl90YWJTdWJzY3JpcHRpb24gPSB0aGlzLl9rZXlNYW5hZ2VyLnRhYk91dC5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gdGhpcy5jbG9zZWQuZW1pdCgndGFiJykpKTsKICAgICAgICAgICAgLy8gSWYgYSB1c2VyIG1hbnVhbGx5IChwcm9ncmFtYXRpY2FsbHkpIGZvY3VzZXMgYSBtZW51IGl0ZW0sIHdlIG5lZWQgdG8gcmVmbGVjdCB0aGF0IGZvY3VzCiAgICAgICAgICAgIC8vIGNoYW5nZSBiYWNrIHRvIHRoZSBrZXkgbWFuYWdlci4gTm90ZSB0aGF0IHdlIGRvbid0IG5lZWQgdG8gdW5zdWJzY3JpYmUgaGVyZSBiZWNhdXNlIF9mb2N1c2VkCiAgICAgICAgICAgIC8vIGlzIGludGVybmFsIGFuZCB3ZSBrbm93IHRoYXQgaXQgZ2V0cyBjb21wbGV0ZWQgb24gZGVzdHJveS4KICAgICAgICAgICAgdGhpcy5fZGlyZWN0RGVzY2VuZGFudEl0ZW1zLmNoYW5nZXMucGlwZShzdGFydFdpdGgodGhpcy5fZGlyZWN0RGVzY2VuZGFudEl0ZW1zKSwgc3dpdGNoTWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBpdGVtcwogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgaXRlbXMgPT4gbWVyZ2UoLi4uaXRlbXMubWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBpdGVtCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoaXRlbSkgPT4gaXRlbS5fZm9jdXNlZCkpKSkpKS5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGZvY3VzZWRJdGVtCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBmb2N1c2VkSXRlbSA9PiB0aGlzLl9rZXlNYW5hZ2VyLnVwZGF0ZUFjdGl2ZUl0ZW0oZm9jdXNlZEl0ZW0pKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkRlc3Ryb3koKSB7CiAgICAgICAgICAgIHRoaXMuX2RpcmVjdERlc2NlbmRhbnRJdGVtcy5kZXN0cm95KCk7CiAgICAgICAgICAgIHRoaXMuX3RhYlN1YnNjcmlwdGlvbi51bnN1YnNjcmliZSgpOwogICAgICAgICAgICB0aGlzLmNsb3NlZC5jb21wbGV0ZSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTdHJlYW0gdGhhdCBlbWl0cyB3aGVuZXZlciB0aGUgaG92ZXJlZCBtZW51IGl0ZW0gY2hhbmdlcy4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9ob3ZlcmVkKCkgewogICAgICAgICAgICAvLyBDb2VyY2UgdGhlIGBjaGFuZ2VzYCBwcm9wZXJ0eSBiZWNhdXNlIEFuZ3VsYXIgdHlwZXMgaXQgYXMgYE9ic2VydmFibGU8YW55PmAKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBpdGVtQ2hhbmdlcyA9ICgvKiogQHR5cGUgez99ICovICh0aGlzLl9kaXJlY3REZXNjZW5kYW50SXRlbXMuY2hhbmdlcykpOwogICAgICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKGl0ZW1DaGFuZ2VzLnBpcGUoc3RhcnRXaXRoKHRoaXMuX2RpcmVjdERlc2NlbmRhbnRJdGVtcyksIHN3aXRjaE1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gaXRlbXMKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGl0ZW1zID0+IG1lcmdlKC4uLml0ZW1zLm1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gaXRlbQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGl0ZW0pID0+IGl0ZW0uX2hvdmVyZWQpKSkpKSkpKTsKICAgICAgICB9CiAgICAgICAgLyoKICAgICAgICAgICAqIFJlZ2lzdGVycyBhIG1lbnUgaXRlbSB3aXRoIHRoZSBtZW51LgogICAgICAgICAgICogQGRvY3MtcHJpdmF0ZQogICAgICAgICAgICogQGRlcHJlY2F0ZWQgTm8gbG9uZ2VyIGJlaW5nIHVzZWQuIFRvIGJlIHJlbW92ZWQuCiAgICAgICAgICAgKiBAYnJlYWtpbmctY2hhbmdlIDkuMC4wCiAgICAgICAgICAgKi8KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IF9pdGVtCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBhZGRJdGVtKF9pdGVtKSB7IH0KICAgICAgICAvKioKICAgICAgICAgKiBSZW1vdmVzIGFuIGl0ZW0gZnJvbSB0aGUgbWVudS4KICAgICAgICAgKiBcQGRvY3MtcHJpdmF0ZQogICAgICAgICAqIEBkZXByZWNhdGVkIE5vIGxvbmdlciBiZWluZyB1c2VkLiBUbyBiZSByZW1vdmVkLgogICAgICAgICAqIFxAYnJlYWtpbmctY2hhbmdlIDkuMC4wCiAgICAgICAgICogQHBhcmFtIHs/fSBfaXRlbQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVtb3ZlSXRlbShfaXRlbSkgeyB9CiAgICAgICAgLyoqCiAgICAgICAgICogSGFuZGxlIGEga2V5Ym9hcmQgZXZlbnQgZnJvbSB0aGUgbWVudSwgZGVsZWdhdGluZyB0byB0aGUgYXBwcm9wcmlhdGUgYWN0aW9uLgogICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9oYW5kbGVLZXlkb3duKGV2ZW50KSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qga2V5Q29kZSA9IGV2ZW50LmtleUNvZGU7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbWFuYWdlciA9IHRoaXMuX2tleU1hbmFnZXI7CiAgICAgICAgICAgIHN3aXRjaCAoa2V5Q29kZSkgewogICAgICAgICAgICAgICAgY2FzZSBFU0NBUEU6CiAgICAgICAgICAgICAgICAgICAgaWYgKCFoYXNNb2RpZmllcktleShldmVudCkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jbG9zZWQuZW1pdCgna2V5ZG93bicpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIGNhc2UgTEVGVF9BUlJPVzoKICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5wYXJlbnRNZW51ICYmIHRoaXMuZGlyZWN0aW9uID09PSAnbHRyJykgewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmNsb3NlZC5lbWl0KCdrZXlkb3duJyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgY2FzZSBSSUdIVF9BUlJPVzoKICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5wYXJlbnRNZW51ICYmIHRoaXMuZGlyZWN0aW9uID09PSAncnRsJykgewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmNsb3NlZC5lbWl0KCdrZXlkb3duJyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgY2FzZSBIT01FOgogICAgICAgICAgICAgICAgY2FzZSBFTkQ6CiAgICAgICAgICAgICAgICAgICAgaWYgKCFoYXNNb2RpZmllcktleShldmVudCkpIHsKICAgICAgICAgICAgICAgICAgICAgICAga2V5Q29kZSA9PT0gSE9NRSA/IG1hbmFnZXIuc2V0Rmlyc3RJdGVtQWN0aXZlKCkgOiBtYW5hZ2VyLnNldExhc3RJdGVtQWN0aXZlKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgICAgICAgICBpZiAoa2V5Q29kZSA9PT0gVVBfQVJST1cgfHwga2V5Q29kZSA9PT0gRE9XTl9BUlJPVykgewogICAgICAgICAgICAgICAgICAgICAgICBtYW5hZ2VyLnNldEZvY3VzT3JpZ2luKCdrZXlib2FyZCcpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBtYW5hZ2VyLm9uS2V5ZG93bihldmVudCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogRm9jdXMgdGhlIGZpcnN0IGl0ZW0gaW4gdGhlIG1lbnUuCiAgICAgICAgICogQHBhcmFtIHs/PX0gb3JpZ2luIEFjdGlvbiBmcm9tIHdoaWNoIHRoZSBmb2N1cyBvcmlnaW5hdGVkLiBVc2VkIHRvIHNldCB0aGUgY29ycmVjdCBzdHlsaW5nLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZm9jdXNGaXJzdEl0ZW0ob3JpZ2luID0gJ3Byb2dyYW0nKSB7CiAgICAgICAgICAgIC8vIFdoZW4gdGhlIGNvbnRlbnQgaXMgcmVuZGVyZWQgbGF6aWx5LCBpdCB0YWtlcyBhIGJpdCBiZWZvcmUgdGhlIGl0ZW1zIGFyZSBpbnNpZGUgdGhlIERPTS4KICAgICAgICAgICAgaWYgKHRoaXMubGF6eUNvbnRlbnQpIHsKICAgICAgICAgICAgICAgIHRoaXMuX25nWm9uZS5vblN0YWJsZS5hc09ic2VydmFibGUoKQogICAgICAgICAgICAgICAgICAgIC5waXBlKHRha2UoMSkpCiAgICAgICAgICAgICAgICAgICAgLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB0aGlzLl9mb2N1c0ZpcnN0SXRlbShvcmlnaW4pKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLl9mb2N1c0ZpcnN0SXRlbShvcmlnaW4pOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8q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B0aGlzLl9kaXJlY3REZXNjZW5kYW50SXRlbXMuZmlyc3QuX2dldEhvc3RFbGVtZW50KCkucGFyZW50RWxlbWVudDsKICAgICAgICAgICAgICAgIC8vIEJlY2F1c2UgdGhlIGBtYXQtbWVudWAgaXMgYXQgdGhlIERPTSBpbnNlcnRpb24gcG9pbnQsIG5vdCBpbnNpZGUgdGhlIG92ZXJsYXksIHdlIGRvbid0CiAgICAgICAgICAgICAgICAvLyBoYXZlIGEgbmljZSB3YXkgb2YgZ2V0dGluZyBhIGhvbGQgb2YgdGhlIG1lbnUgcGFuZWwuIFdlIGNhbid0IHVzZSBhIGBWaWV3Q2hpbGRgIGVpdGhlcgogICAgICAgICAgICAgICAgLy8gYmVjYXVzZSB0aGUgcGFuZWwgaXMgaW5zaWRlIGFuIGBuZy10ZW1wbGF0ZWAuIFdlIHdvcmsgYXJvdW5kIGl0IGJ5IHN0YXJ0aW5nIGZyb20gb25lIG9mCiAgICAgICAgICAgICAgICAvLyB0aGUgaXRlbXMgYW5kIHdhbGtpbmcgdXAgdGhlIERPTS4KICAgICAgICAgICAgICAgIHdoaWxlIChlbGVtZW50KSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKGVsZW1lbnQuZ2V0QXR0cmlidXRlKCdyb2xlJykgPT09ICdtZW51JykgewogICAgICAgICAgICAgICAgICAgICAgICBlbGVtZW50LmZvY3VzKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgZWxlbWVudCA9IGVsZW1lbnQucGFyZW50RWxlbWVudDsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmVzZXRzIHRoZSBhY3RpdmUgaXRlbSBpbiB0aGUgbWVudS4gVGhpcyBpcyB1c2VkIHdoZW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i8KICAgICAgICAgICAgY29uc3QgY3VzdG9tRWxldmF0aW9uID0gT2JqZWN0LmtleXModGhpcy5fY2xhc3NMaXN0KS5maW5kKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBjID0+IGMuc3RhcnRzV2l0aCgnbWF0LWVsZXZhdGlvbi16JykpKTsKICAgICAgICAgICAgaWYgKCFjdXN0b21FbGV2YXRpb24gfHwgY3VzdG9tRWxldmF0aW9uID09PSB0aGlzLl9wcmV2aW91c0VsZXZhdGlvbikgewogICAgICAgICAgICAgICAgaWYgKHRoaXMuX3ByZXZpb3VzRWxldmF0aW9uKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fY2xhc3NMaXN0W3RoaXMuX3ByZXZpb3VzRWxldmF0aW9uXSA9IGZhbHNlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdGhpcy5fY2xhc3NMaXN0W25ld0VsZXZhdGlvbl0gPSB0cnVlOwogICAgICAgICAgICAgICAgdGhpcy5fcHJldmlvdXNFbGV2YXRpb24gPSBuZXdFbGV2YXRpb247CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQWRkcyBjbGFzc2VzIHRvIHRoZSBtZW51IHBhbmVsIGJhc2VkIG9uIGl0cyBwb3NpdGlvbi4gQ2FuIGJlIHVzZWQgYnkKICAgICAgICAgKiBjb25zdW1lcnMgdG8gYWRkIHNwZWNpZmljIHN0eWxpbmcgYmFzZWQgb24gdGhlIHBvc2l0aW9uLgogICAgICAgICAqIFxAZG9jcy1wcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/PX0gcG9zWCBQb3NpdGlvbiBvZiB0aGUgbWVudSBhbG9uZyB0aGUgeCBheGlzLgogICAgICAgICAqIEBwYXJhbSB7Pz19IHBvc1kgUG9zaXRpb24gb2YgdGhlIG1lbnUgYWxvbmcgdGhlIHkgYXhpcy4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldFBvc2l0aW9uQ2xhc3Nlcyhwb3NYID0gdGhpcy54UG9zaXRpb24sIHBvc1kgPSB0aGlzLnlQb3NpdGlvbikgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGNsYXNzZXMgPSB0aGlzLl9jbGFzc0xpc3Q7CiAgICAgICAgICAgIGNsYXNzZXNbJ21hdC1tZW51LWJlZm9yZSddID0gcG9zWCA9PT0gJ2JlZm9yZSc7CiAgICAgICAgICAgIGNsYXNzZXNbJ21hdC1tZW51LWFmdGVyJ10gPSBwb3NYID09PSAnYWZ0ZXInOwogICAgICAgICAgICBjbGFzc2VzWydtYXQtbWVudS1hYm92ZSddID0gcG9zWSA9PT0gJ2Fib3ZlJzsKICAgICAgICAgICAgY2xhc3Nlc1snbWF0LW1lbnUtYmVsb3cnXSA9IHBvc1kgPT09ICdiZWxvdyc7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFN0YXJ0cyB0aGUgZW50ZXIgYW5pbWF0aW9uLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3N0YXJ0QW5pbWF0aW9uKCkgewogICAgICAgICAgICAvLyBAYnJlYWtpbmctY2hhbmdlIDguMC4wIENvbWJpbmUgd2l0aCBfcmVzZXRBbmltYXRpb24uCiAgICAgICAgICAgIHRoaXMuX3BhbmVsQW5pbWF0aW9uU3RhdGUgPSAnZW50ZXInOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZXNldHMgdGhlIHBhbmVsIGFuaW1hdGlvbiB0byBpdHMgaW5pdGlhbCBzdGF0ZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9yZXNldEFuaW1hdGlvbigpIHsKICAgICAgICAgICAgLy8gQGJyZWFraW5nLWNoYW5nZSA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cHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3VwZGF0ZURpcmVjdERlc2NlbmRhbnRzKCkgewogICAgICAgICAgICB0aGlzLl9hbGxJdGVtcy5jaGFuZ2VzCiAgICAgICAgICAgICAgICAucGlwZShzdGFydFdpdGgodGhpcy5fYWxsSXRlbXMpKQogICAgICAgICAgICAgICAgLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gaXRlbXMKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChpdGVtcykgPT4gewogICAgICAgICAgICAgICAgdGhpcy5fZGlyZWN0RGVzY2VuZGFudEl0ZW1zLnJlc2V0KGl0ZW1zLmZpbHRlcigoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGl0ZW0KICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIGl0ZW0gPT4gaXRlbS5fcGFyZW50TWVudSA9PT0gdGhpcykpKTsKICAgICAgICAgICAgICAgIHRoaXMuX2RpcmVjdERlc2NlbmRhbnRJdGVtcy5ub3RpZnlPbkNoYW5nZXMoKTsKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgIH0KICAgIF9NYXRNZW51QmFzZS7JtWZhYyA9IGZ1bmN0aW9uIF9NYXRNZW51QmFzZV9GYWN0b3J5KHQpIHsgcmV0dXJuIG5ldyAodCB8fCBfTWF0TWVudUJhc2UpKMm1ybVkaXJlY3RpdmVJbmplY3QoRWxlbWVudFJlZiksIMm1ybVkaXJlY3RpdmVJbmplY3QoTmdab25lKSwgybXJtWRpcmVjdGl2ZUluamVjdChNQVRfTUVOVV9ERUZBVUxUX09QVElPTlMpKTsgfTsKICAgIF9NYXRNZW51QmFzZS7JtWRpciA9IMm1ybVkZWZpbmVEaXJlY3RpdmUoeyB0eXBlOiBfTWF0T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KgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gdGhpcy5fb3BlbmVkQnkgPSAndG91Y2gnKTsKICAgICAgICAgICAgLy8gVHJhY2tpbmcgaW5wdXQgdHlwZSBpcyBuZWNlc3Nhcnkgc28gaXQncyBwb3NzaWJsZSB0byBvbmx5IGF1dG8tZm9jdXMKICAgICAgICAgICAgLy8gdGhlIGZpcnN0IGl0ZW0gb2YgdGhlIGxpc3Qgd2hlbiB0aGUgbWVudSBpcyBvcGVuZWQgdmlhIHRoZSBrZXlib2FyZAogICAgICAgICAgICB0aGlzLl9vcGVuZWRCeSA9IG51bGw7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBXaGV0aGVyIGZvY3VzIHNob3VsZCBiZSByZXN0b3JlZCB3aGVuIHRoZSBtZW51IGlzIGNsb3NlZC4KICAgICAgICAgICAgICogTm90ZSB0aGF0IGRpc2FibGluZyB0aGlzIG9wdGlvbiBjYW4gaGF2ZSBhY2Nlc3NpYmlsaXR5IGltcGxpY2F0aW9ucwogICAgICAgICAgICAgKiBhbmQgaXQncyB1cCB0byB5b3UgdG8gbWFuYWdlIGZvY3VzLCBpZiB5b3UgZGVjaWRlIHRvIHR1cm4gaXQgb2ZmLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5yZXN0b3JlRm9jdXMgPSB0cnVlOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRXZlbnQgZW1pdHRlZCB3aGVuIHRoZSBhc3NvY2lhdGVkIG1lbnUgaXMgb3BlbmVkLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5tZW51T3BlbmVkID0gbmV3IEV2ZW50RW1pdHRlcigpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRXZlbnQgZW1pdHRlZCB3aGVuIHRoZSBhc3NvY2lhdGVkIG1lbnUgaXMgb3BlbmVkLgogICAgICAgICAgICAgKiBAZGVwc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RyaWdnZXJzU3VibWVudSA9IHRoaXMudHJpZ2dlcnNTdWJtZW51KCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fc2Nyb2xsU3RyYXRlZ3kgPSBzY3JvbGxTdHJhdGVneTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQGRlcHJlY2F0ZWQKICAgICAgICAgKiBcQGJyZWFraW5nLWNoYW5nZSA4LjAuMAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IF9kZXByZWNhdGVkTWF0TWVudVRyaWdnZXJGb3IoKSB7IHJldHVybiB0aGlzLm1lbnU7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHYKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBfZGVwcmVjYXRlZE1hdE1lbnVUcmlnZ2VyRm9yKHYpIHsKICAgICAgICAgICAgdGhpcy5tZW51ID0gdjsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmVmZXJlbmNlcyB0aGUgbWVudSBpbnN0YW5jZSB0aGF0IHRoZSB0cmlnZ2VyIGlzIGFzc29jaWF0ZWQgd2l0aC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBtZW51KCkgeyByZXR1cm4gdGhpcy5fbWVudTsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gbWVudQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IG1lbnUobWVudSkgewogICAgICAgICAgICBpZiAobWVudSA9PT0gdGhpcy5fbWVudSkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX21lbnUgPSBtZW51OwogICAgICAgICAgICB0aGlzLl9tZW51Q2xvc2VTdWJzY3JpcHRpb24udW5zdWJzY3JpYmUoKTsKICAgICAgICAgICAgaWYgKG1lbnUpIHsKICAgICAgICAgICAgICAgIHRoaXMuX21lbnVDbG9zZVN1YnNjcmlwdGlvbiA9IG1lbnUuY2xvc2UuYXNPYnNlcnZhYmxlKCkuc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcmVhc29uCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICByZWFzb24gPT4gewogICAgICAgICAgICAgICAgICAgIHRoaXMuX2Rlc3Ryb3lNZW51KCk7CiAgICAgICAgICAgICAgICAgICAgLy8gSWYgYSBjbGljayBjbG9zZWQgdGhlIG1lbnUsIHdlIHNob3VsZCBjbG9zZSB0aGUgZW50aXJlIGNoYWluIG9mIG5lc3RlZCBtZW51cy4KICAgICAgICAgICAgICAgICAgICBpZiAoKHJlYXNvbiA9PT0gJ2NsaWNrJyB8fCByZWFzb24gPT09ICd0YWInKSAmJiB0aGlzLl9wYXJlbnRNZW51KSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3BhcmVudE1lbnUuY2xvc2VkLmVtaXQocmVhc29uKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ0FmdGVyQ29udGVudEluaXQoKSB7CiAgICAgICAgICAgIHRoaXMuX2NoZWNrTWVudSgpOwogICAgICAgICAgICB0aGlzLl9oYW5kbGVIb3ZlcigpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25EZXN0cm95KCkgewogICAgICAgICAgICBpZiAodGhpcy5fb3ZlcmxheVJlZikgewogICAgICAgICAgICAgICAgdGhpcy5fb3ZlcmxheVJlZi5kaXNwb3NlKCk7CiAgICAgICAgICAgICAgICB0aGlzLl9vdmVybGF5UmVmID0gbnVsbDsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9lbGVtZW50Lm5hdGl2ZUVsZW1lbnQucmVtb3ZlRXZlbnRMaXN0ZW5lcigndG91Y2hzdGFydCcsIHRoaXMuX2hhbmRsZVRvdWNoU3RhcnQsIHBhc3NpdmVFdmVudExpc3RlbmVyT3B0aW9ucyQxKTsKICAgICAgICAgICAgdGhpcy5fbWVudUNsb3NlU3Vic2NyaXB0aW9uLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgICAgIHRoaXMuX2Nsb3NpbmdBY3Rpb25zU3Vic2NyaXB0aW9uLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgICAgIHRoaXMuX2hvdmVyU3Vic2NyaXB0aW9uLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFdoZXRoZXIgdGhlIG1lbnUgaXMgb3Blbi4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBtZW51T3BlbigpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX21lbnVPcGVuOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBUaGUgdGV4dCBkaXJlY3Rpb24gb2YgdGhlIGNvbnRhaW5pbmcgYXBwLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGRpcigpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2RpciAmJiB0aGlzLl9kaXIudmFsdWUgPT09ICdydGwnID8gJ3J0bCcgOiAnbHRyJzsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogV2hldGhlciB0aGUgbWVudSB0cmlnZ2VycyBhIHN1Yi1tZW51IG9yIGEgdG9wLWxldmVsIG9uZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHRyaWdnZXJzU3VibWVudSgpIHsKICAgICAgICAgICAgcmV0dXJuICEhKHRoaXMuX21lbnVJdGVtSW5zdGFuY2UgJiYgdGhpcy5fcGFyZW50TWVudSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFRvZ2dsZXMgdGhlIG1lbnUgYmV0d2VlbiB0aGUgb3BlbiBhbmQgY2xvc2VkIHN0YXRlcy4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHRvZ2dsZU1lbnUoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9tZW51T3BlbiA/IHRoaXMuY2xvc2VNZW51KCkgOiB0aGlzLm9wZW5NZW51KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIE9wZW5zIHRoZSBtZW51LgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb3Blbk1lbnUoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9tZW51T3BlbikgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2NoZWNrTWVudSgpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG92ZXJsYXlSZWYgPSB0aGlzLl9jcmVhdGVPdmVybGF5KCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgb3ZlcmxheUNvbmZpZyA9IG92ZXJsYXlSZWYuZ2V0Q29uZmlnKCk7CiAgICAgICAgICAgIHRoaXMuX3NldFBvc2l0aW9uKCgvKiogQHR5cGUgez99ICovIChvdmVybGF5Q29uZmlnLnBvc2l0aW9uU3RyYXRlZ3kpKSk7CiAgICAgICAgICAgIG92ZXJsYXlDb25maWcuaGFzQmFja2Ryb3AgPSB0aGlzLm1lbnUuaGFzQmFja2Ryb3AgPT0gbnVsbCA/ICF0aGlzLnRyaWdnZXJzU3VibWVudSgpIDoKICAgICAgICAgICAgICAgIHRoaXMubWVudS5oYXNCYWNrZHJvcDsKICAgICAgICAgICAgb3ZlcmxheVJlZi5hdHRhY2godGhpcy5fZ2V0UG9ydGFsKCkpOwogICAgICAgICAgICBpZiAodGhpcy5tZW51LmxhenlDb250ZW50KSB7CiAgICAgICAgICAgICAgICB0aGlzLm1lbnUubGF6eUNvbnRlbnQuYXR0YWNoKHRoaXMubWVudURhdGEpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2Nsb3NpbmdBY3Rpb25zU3Vic2NyaXB0aW9uID0gdGhpcy5fbWVudUNsb3NpbmdBY3Rpb25zKCkuc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHRoaXMuY2xvc2VNZW51KCkpKTsKICAgICAgICAgICAgdGhpcy5faW5pdE1lbnUoKTsKICAgICAgICAgICAgaWYgKHRoaXMubWVudSBpbnN0YW5jZW9mIE1hdE1lbnUpIHsKICAgICAgICAgICAgICAgIHRoaXMubWVudS5fc3RhcnRBbmltYXRpb24oKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDbG9zZXMgdGhlIG1lbnUuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBjbG9zZU1lbnUoKSB7CiAgICAgICAgICAgIHRoaXMubWVudS5jbG9zZS5lbWl0KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEZvY3VzZXMgdGhlIG1lbnUgdHJpZ2dlci4KICAgICAgICAgKiBAcGFyYW0gez89fSBvcmlnaW4gU291cmNlIG9mIHRoZSBtZW51IHRyaWdnZXIncyBmb2N1cy4KICAgICAgICAgKiBAcGFyYW0gez89fSBvcHRpb25zCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmb2N1cyhvcmlnaW4gPSAncHJvZ3JhbScsIG9wdGlvbnMpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX2ZvY3VzTW9uaXRvcikgewogICAgICAgICAgICAgICAgdGhpcy5fZm9jdXNNb25pdG9yLmZvY3VzVmlhKHRoaXMuX2VsZW1lbnQsIG9yaWdpbiwgb3B0aW9ucyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLl9lbGVtZW50Lm5hdGl2ZUVsZW1lbnQuZm9jdXMob3B0aW9ucyk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ2xvc2VzIHRoZSBtZW51IGFuZCBkb2VzIHRoZSBuZWNlc3NhcnkgY2xlYW51cC4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2Rlc3Ryb3lNZW51KCkgewogICAgICAgICAgICBpZiAoIXRoaXMuX292ZXJsYXlSZWYgfHwgIXRoaXMubWVudU9wZW4pIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG1lbnUgPSB0aGlzLm1lbnU7CiAgICAgICAgICAgIHRoaXMuX2Nsb3NpbmdBY3Rpb25zU3Vic2NyaXB0aW9uLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgICAgIHRoaXMuX292ZXJsYXlSZWYuZGV0YWNoKCk7CiAgICAgICAgICAgIHRoaXMuX3Jlc3RvcmVGb2N1cygpOwogICAgICAgICAgICBpZiAobWVudSBpbnN0YW5jZW9mIE1hdE1lbnUpIHsKICAgICAgICAgICAgICAgIG1lbnUuX3Jlc2V0QW5pbWF0aW9uKCk7CiAgICAgICAgICAgICAgICBpZiAobWVudS5sYXp5Q29udGVudCkgewogICAgICAgICAgICAgICAgICAgIC8vIFdhaXQgZm9yIHRoZSBleGl0IGFuaW1hdGlvbiB0byBmaW5pc2ggYmVmb3JlIGRldGFjaGluZyB0aGUgY29udGVudC4KICAgICAgICAgICAgICAgICAgICBtZW51Ll9hbmltYXRpb25Eb25lCiAgICAgICAgICAgICAgICAgICAgICAgIC5waXBlKGZpbHRlcigoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBldmVudAogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgZXZlbnQgPT4gZXZlbnQudG9TdGF0ZSA9PT0gJ3ZvaWQnKSksIHRha2UoMSksIAogICAgICAgICAgICAgICAgICAgIC8vIEludGVycnVwdCBpZiB0aGUgY29udGVudCBnb3QgcmUtYXR0YWNoZWQuCiAgICAgICAgICAgICAgICAgICAgdGFrZVVudGlsKG1lbnUubGF6eUNvbnRlbnQuX2F0dGFjaGVkKSkKICAgICAgICAgICAgICAgICAgICAgICAgLnN1YnNjcmliZSh7CiAgICAgICAgICAgICAgICAgICAgICAgIG5leHQ6ICgvKioKICAgICAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgICAgICgpID0+ICgvKiogQHR5cGUgez99ICovIChtZW51LmxhenlDb250ZW50KSkuZGV0YWNoKCkpLAogICAgICAgICAgICAgICAgICAgICAgICAvLyBObyBtYXR0ZXIgd2hldGhlciB0aGUgY29udGVudCBnb3QgcmUtYXR0YWNoZWQsIHJlc2V0IHRoZSBtZW51LgogICAgICAgICAgICAgICAgICAgICAgICBjb21wbGV0ZTogKC8qKgogICAgICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAgICAgKCkgPT4gdGhpcy5fc2V0SXNNZW51T3BlbihmYWxzZSkpCiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9zZXRJc01lbnVPcGVuKGZhbHNlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuX3NldElzTWVudU9wZW4oZmFsc2UpOwogICAgICAgICAgICAgICAgaWYgKG1lbnUubGF6eUNvbnRlbnQpIHsKICAgICAgICAgICAgICAgICAgICBtZW51LmxhenlDb250ZW50LmRldGFjaCgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFRoaXMgbWV0aG9kIHNldHMgdGhlIG1lbnUgc3RhdGUgdG8gb3BlbiBhbmQgZm9jdXNlcyB0aGUgZmlyc3QgaXRlbSBpZgogICAgICAgICAqIHRoZSBtZW51IHdhcyBvcGVuZWQgdmlhIHRoZSBrZXlib2FyZC4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2luaXRNZW51KCkgewogICAgICAgICAgICB0aGlzLm1lbnUucGFyZW50TWVudSA9IHRoaXMudHJpZ2dlcnNTdWJtZW51KCkgPyB0aGlzLl9wYXJlbnRNZW51IDogdW5kZWZpbmVkOwogICAgICAgICAgICB0aGlzLm1lbnUuZGlyZWN0aW9uID0gdGhpcy5kaXI7CiAgICAgICAgICAgIHRoaXMuX3NldE1lbnVFbGV2YXRpb24oKTsKICAgICAgICAgICAgdGhpcy5fc2V0SXNNZW51T3Blbih0cnVlKTsKICAgICAgICAgICAgdGhpcy5tZW51LmZvY3VzRmlyc3RJdGVtKHRoaXMuX29wZW5lZEJ5IHx8ICdwcm9ncmFtJyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFVwZGF0ZXMgdGhlIG1lbnUgZWxldmF0aW9uIGJhc2VkIG9uIHRoZSBhbW91bnQgb2YgcGFyZW50IG1lbnVzIHRoYXQgaXQgaGFzLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfc2V0TWVudUVsZXZhdGlvbigpIHsKICAgICAgICAgICAgaWYgKHRoaXMubWVudS5zZXRFbGV2YXRpb24pIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCBkZXB0aCA9IDA7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBsZXQgcGFyZW50TWVudSA9IHRoaXMubWVudS5wYXJlbnRNZW51OwogICAgICAgICAgICAgICAgd2hpbGUgKHBhcmVudE1lbnUpIHsKICAgICAgICAgICAgICAgICAgICBkZXB0aCsrOwogICAgICAgICAgICAgICAgICAgIHBhcmVudE1lbnUgPSBwYXJlbnRNZW51LnBhcmVudE1lbnU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLm1lbnUuc2V0RWxldmF0aW9uKGRlcHRoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZXN0b3JlcyBmb2N1cyB0byB0aGUgZWxlbWVudCB0aGF0IHdhcyBmb2N1c2VkIGJlZm9yZSB0aGUgbWVudSB3YXMgb3Blbi4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3Jlc3RvcmVGb2N1cygpIHsKICAgICAgICAgICAgLy8gV2Ugc2hvdWxkIHJlc2V0IGZvY3VzIGlmIHRoZSB1c2VyIGlzIG5hdmlnYXRpbmcgdXNpbmcgYSBrZXlib2FyZCBvcgogICAgICAgICAgICAvLyBpZiB3ZSBoYXZlIGEgdG9wLWxldmVsIHRyaWdnZXIgd2hpY2ggbWlnaHQgY2F1c2UgZm9jdXMgdG8gYmUgbG9zdAogICAgICAgICAgICAvLyB3aGVuIGNsaWNraW5nIG9uIHRoZSBiYWNrZHJvcC4KICAgICAgICAgICAgaWYgKHRoaXMucmVzdG9yZUZvY3VzKSB7CiAgICAgICAgICAgICAgICBpZiAoIXRoaXMuX29wZW5lZEJ5KSB7CiAgICAgICAgICAgICAgICAgICAgLy8gTm90ZSB0aGF0IHRoZSBmb2N1cyBzdHlsZSB3aWxsIHNob3cgdXAgYm90aCBmb3IgYHByb2dyYW1gIGFuZAogICAgICAgICAgICAgICAgICAgIC8vIGBrZXlib2FyZGAgc28gd2UgZG9uJ3QgaGF2ZSB0byBzcGVjaWZ5IHdoaWNoIG9uZSBpdCBpcy4KICAgICAgICAgICAgICAgICAgICB0aGlzLmZvY3VzKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmICghdGhpcy50cmlnZ2Vyc1N1Ym1lbnUoKSkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuZm9jdXModGhpcy5fb3BlbmVkQnkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX29wZW5lZEJ5ID0gbnVsbDsKICAgICAgICB9CiAgICAgICAgLy8gc2V0IHN0YXRlIHJhdGhlciB0aGFuIHRvZ2dsZSB0byBzdXBwb3J0IHRyaWdnZXJzIHNoYXJpbmcgYSBtZW51CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGlzT3BlbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3NldElzTWVudU9wZW4oaXNPcGVuKSB7CiAgICAgICAgICAgIHRoaXMuX21lbnVPcGVuID0gaXNPcGVuOwogICAgICAgICAgICB0aGlzLl9tZW51T3BlbiA/IHRoaXMubWVudU9wZW5lZC5lbWl0KCkgOiB0aGlzLm1lbnVDbG9zZWQuZW1pdCgpOwogICAgICAgICAgICBpZiAodGhpcy50cmlnZ2Vyc1N1Ym1lbnUoKSkgewogICAgICAgICAgICAgICAgdGhpcy5fbWVudUl0ZW1JbnN0YW5jZS5faGlnaGxpZ2h0ZWQgPSBpc09wZW47CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVGhpcyBtZXRob2QgY2hlY2tzIHRoYXQgYSB2YWxpZCBpbnN0YW5jZSBvZiBNYXRNZW51IGhhcyBiZWVuIHBhc3NlZCBpbnRvCiAgICAgICAgICogbWF0TWVudVRyaWdnZXJGb3IuIElmIG5vdCwgYW4gZXhjZXB0aW9uIGlzIHRocm93bi4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2NoZWNrTWVudSgpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLm1lbnUpIHsKICAgICAgICAgICAgICAgIHRocm93TWF0TWVudU1pc3NpbmdFcnJvcigpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFRoaXMgbWV0aG9kIGNyZWF0ZXMgdGhlIG92ZXJsYXkgZnJvbSB0aGUgcHJvdmlkZWQgbWVudSdzIHRlbXBsYXRlIGFuZCBzYXZlcyBpdHMKICAgICAgICAgKiBPdmVybGF5UmVmIHNvIHRoYXQgaXQgY2FuIGJlIGF0dGFjaGVkIHRvIHRoZSBET00gd2hlbiBvcGVuTWVudSBpcyBjYWxsZWQuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9jcmVhdGVPdmVybGF5KCkgewogICAgICAgICAgICBpZiAoIXRoaXMuX292ZXJsYXlSZWYpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGNvbmZpZyA9IHRoaXMuX2dldE92ZXJsYXlDb25maWcoKTsKICAgICAgICAgICAgICAgIHRoaXMuX3N1YnNjcmliZVRvUG9zaXRpb25zKCgvKiogQHR5cGUgez99ICovIChjb25maWcucG9zaXRpb25TdHJhdGVneSkpKTsKICAgICAgICAgICAgICAgIHRoaXMuX292ZXJsYXlSZWYgPSB0aGlzLl9vdmVybGF5LmNyZWF0ZShjb25maWcpOwogICAgICAgICAgICAgICAgLy8gQ29uc3VtZSB0aGUgYGtleWRvd25FdmVudHNgIGluIG9yZGVyIHRvIHByZXZlbnQgdGhlbSBmcm9tIGdvaW5nIHRvIGFub3RoZXIgb3ZlcmxheS4KICAgICAgICAgICAgICAgIC8vIElkZWFsbHkgd2UnZCBhbHNvIGhhdmUgb3VyIGtleWJvYXJkIGV2ZW50IGxvZ2ljIGluIGhlcmUsIGhvd2V2ZXIgZG9pbmcgc28gd2lsbAogICAgICAgICAgICAgICAgLy8gYnJlYWsgYW55Ym9keSB0aGF0IG1heSBoYXZlIGltcGxlbWVudGVkIHRoZSBgTWF0TWVudVBhbmVsYCB0aGVtc2VsdmVzLgogICAgICAgICAgICAgICAgdGhpcy5fb3ZlcmxheVJlZi5rZXlkb3duRXZlbnRzKCkuc3Vic2NyaWJlKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXMuX292ZXJsYXlSZWY7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFRoaXMgbWV0aG9kIGJ1aWxkcyB0aGUgY29uZmlndXJhdGlvbiBvYmplY3QgbmVlZGVkIHRvIGNyZWF0ZSB0aGUgb3ZlcmxheSwgdGhlIE92ZXJsYXlTdGF0ZS4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99IE92ZXJsYXlDb25maWcKICAgICAgICAgKi8KICAgICAgICBfZ2V0T3ZlcmxheUNvbmZpZygpIHsKICAgICAgICAgICAgcmV0dXJuIG5ldyBPdmVybGF5Q29uZmlnKHsKICAgICAgICAgICAgICAgIHBvc2l0aW9uU3RyYXRlZ3k6IHRoaXMuX292ZXJsYXkucG9zaXRpb24oKQogICAgICAgICAgICAgICAgICAgIC5mbGV4aWJsZUNvbm5lY3RlZFRvKHRoaXMuX2VsZW1lbnQpCiAgICAgICAgICAgICAgICAgICAgLndpdGhMb2NrZWRQb3NpdGlvbigpCiAgICAgICAgICAgICAgICAgICAgLndpdGhUcmFuc2Zvcm1PcmlnaW5PbignLm1hdC1tZW51LXBhbmVsLCAubWF0LW1kYy1tZW51LXBhbmVsJyksCiAgICAgICAgICAgICAgICBiYWNrZHJvcENsYXNzOiB0aGlzLm1lbnUuYmFja2Ryb3BDbGFzcyB8fCAnY2RrLW92ZXJsYXktdHJhbnNwYXJlbnQtYmFja2Ryb3AnLAogICAgICAgICAgICAgICAgc2Nyb2xsU3RyYXRlZ3k6IHRoaXMuX3Njcm9sbFN0cmF0ZWd5KCksCiAgICAgICAgICAgICAgICBkaXJlY3Rpb246IHRoaXMuX2RpcgogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogTGlzdGVucyB0byBjaGFuZ2VzIGluIHRoZSBwb3NpdGlvbiBvZiB0aGUgb3ZlcmxheSBhbmQgc2V0cyB0aGUgY29ycmVjdCBjbGFzc2VzCiAgICAgICAgICogb24gdGhlIG1lbnUgYmFzZWQgb24gdGhlIG5ldyBwb3NpdGlvbi4gVGhpcyBlbnN1cmVzIHRoZSBhbmltYXRpb24gb3JpZ2luIGlzIGFsd2F5cwogICAgICAgICAqIGNvcnJlY3QsIGV2ZW4gaWYgYSBmYWxsYmFjayBwb3NpdGlvbiBpcyB1c2VkIGZvciB0aGUgb3ZlcmxheS4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gcG9zaXRpb24KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9zdWJzY3JpYmVUb1Bvc2l0aW9ucyhwb3NpdGlvbikgewogICAgICAgICAgICBpZiAodGhpcy5tZW51LnNldFBvc2l0aW9uQ2xhc3NlcykgewogICAgICAgICAgICAgICAgcG9zaXRpb24ucG9zaXRpb25DaGFuZ2VzLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGNoYW5nZQogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgY2hhbmdlID0+IHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgcG9zWCA9IGNoYW5nZS5jb25uZWN0aW9uUGFpci5vdmVybGF5WCA9PT0gJ3N0YXJ0JyA/ICdhZnRlcicgOiAnYmVmb3JlJzsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgcG9zWSA9IGNoYW5nZS5jb25uZWN0aW9uUGFpci5vdmVybGF5WSA9PT0gJ3RvcCcgPyAnYmVsb3cnIDogJ2Fib3ZlJzsKICAgICAgICAgICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5tZW51LnNldFBvc2l0aW9uQ2xhc3NlcykpKHBvc1gsIHBvc1kpOwogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgdGhlIGFwcHJvcHJpYXRlIHBvc2l0aW9ucyBvbiBhIHBvc2l0aW9uIHN0cmF0ZWd5CiAgICAgICAgICogc28gdGhlIG92ZXJsYXkgY29ubmVjdHMgd2l0aCB0aGUgdHJpZ2dlciBjb3JyZWN0bHkuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHBvc2l0aW9uU3RyYXRlZ3kgU3RyYXRlZ3kgd2hvc2UgcG9zaXRpb24gdG8gdXBkYXRlLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3NldFBvc2l0aW9uKHBvc2l0aW9uU3RyYXRlZ3kpIHsK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NldFkgPSBvdmVybGF5WSA9PT0gJ2JvdHRvbScgPyBNRU5VX1BBTkVMX1RPUF9QQURESU5HIDogLU1FTlVfUEFORUxfVE9QX1BBRERJTkc7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoIXRoaXMubWVudS5vdmVybGFwVHJpZ2dlcikgewogICAgICAgICAgICAgICAgb3JpZ2luWSA9IG92ZXJsYXlZID09PSAndG9wJyA/ICdib3R0b20nIDogJ3RvcCc7CiAgICAgICAgICAgICAgICBvcmlnaW5GYWxsYmFja1kgPSBvdmVybGF5RmFsbGJhY2tZID09PSAndG9wJyA/ICdib3R0b20nIDogJ3RvcCc7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcG9zaXRpb25TdHJhdGVneS53aXRoUG9zaXRpb25zKFsKICAgICAgICAgICAgICAgIHsgb3JpZ2luWCwgb3JpZ2luWSwgb3ZlcmxheVgsIG92ZXJsYXlZLCBvZmZzZXRZIH0sCiAgICAgICAgICAgICAgICB7IG9yaWdpblg6IG9yaWdpbkZhbGxiYWNrWCwgb3JpZ2luWSwgb3ZlcmxheVg6IG92ZXJsYXlGYWxsYmFja1gsIG92ZXJsYXlZLCBvZmZzZXRZIH0sCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgb3JpZ2luWCwKICAgICAgICAgICAgICAgICAgICBvcmlnaW5ZOiBvcmlnaW5GYWxsYmFja1ksCiAgICAgICAgICAgICAgICAgICAgb3ZlcmxheVgsCiAgICAgICAgICAgICAgICAgICAgb3ZlcmxheVk6IG92ZXJsYXlGYWxsYmFja1ksCiAgICAgICAgICAgICAgICAgICAgb2Zmc2V0WTogLW9mZnNldFkKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgb3JpZ2luWDogb3JpZ2luRmFsbGJhY2tYLAogICAgICAgICAgICAgICAgICAgIG9yaWdpblk6IG9yaWdpbkZhbGxiYWNrWSwKICAgICAgICAgICAgICAgICAgICBvdmVybGF5WDogb3ZlcmxheUZhbGxiYWNrWCwKICAgICAgICAgICAgICAgICAgICBvdmVybGF5WTogb3ZlcmxheUZhbGxiYWNrWSwKICAgICAgICAgICAgICAgICAgICBvZmZzZXRZOiAtb2Zmc2V0WQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICBdKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0dXJucyBhIHN0cmVhbSB0aGF0IGVtaXRzIHdoZW5ldmVyIGFuIGFjdGlvbiB0aGF0IHNob3VsZCBjbG9zZSB0aGUgbWVudSBvY2N1cnMuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9tZW51Q2xvc2luZ0FjdGlvbnMoKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgYmFja2Ryb3AgPSAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5fb3ZlcmxheVJlZikpLmJhY2tkcm9wQ2xpY2soKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBkZXRhY2htZW50cyA9ICgvKiogQHR5cGUgez99ICovICh0aGlzLl9vdmVybGF5UmVmKSkuZGV0YWNobWVudHMoKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwYXJlbnRDbG9zZSA9IHRoaXMuX3BhcmVudE1lbnUgPyB0aGlzLl9wYXJlbnRNZW51LmNsb3NlZCA6IG9mKCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaG92ZXIgPSB0aGlzLl9wYXJlbnRNZW51ID8gdGhpcy5fcGFyZW50TWVudS5faG92ZXJlZCgpLnBpcGUoZmlsdGVyKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBhY3RpdmUKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGFjdGl2ZSA9PiBhY3RpdmUgIT09IHRoaXMuX21lbnVJdGVtSW5zdGFuY2UpKSwgZmlsdGVyKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHRoaXMuX21lbnVPcGVuKSkpIDogb2YoKTsKICAgICAgICAgICAgcmV0dXJuIG1lcmdlKGJhY2tkcm9wLCBwYXJlbnRDbG9zZSwgaG92ZXIsIGRldGFjaG1lbnRzKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogSGFuZGxlcyBtb3VzZSBwcmVzc2VzIG9uIHRoZSB0cmlnZ2VyLgogICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9oYW5kbGVNb3VzZWRvd24oZXZlbnQpIHsKICAgICAgICAgICAgaWYgKCFpc0Zha2VNb3VzZWRvd25Gcm9tU2NyZWVuUmVhZGVyKGV2ZW50KSkgewogICAgICAgICAgICAgICAgLy8gU2luY2UgcmlnaHQgb3IgbWlkZGxlIGJ1dHRvbiBjbGlja3Mgd29uJ3QgdHJpZ2dlciB0aGUgYGNsaWNrYCBldmVudCwKICAgICAgICAgICAgICAgIC8vIHdlIHNob3VsZG4ndCBjb25zaWRlciB0aGUgbWVudSBhcyBvcGVuZWQgYnkgbW91c2UgaW4gdGhvc2UgY2FzZXMuCiAgICAgICAgICAgICAgICB0aGlzLl9vcGVuZWRCeSA9IGV2ZW50LmJ1dHRvbiA9PT0gMCA/ICdtb3VzZScgOiBudWxsOwogICAgICAgICAgICAgICAgLy8gU2luY2UgY2xpY2tpbmcgb24gdGhlIHRyaWdnZXIgd29uJ3QgY2xvc2UgdGhlIG1lbnUgaWYgaXQgb3BlbnMgYSBzdWItbWVudSwKICAgICAgICAgICAgICAgIC8vIHdlIHNob3VsZCBwcmV2ZW50IGZvY3VzIGZyb20gbW92aW5nIG9udG8gaXQgdmlhIGNsaWNrIHRvIGF2b2lkIHRoZQogICAgICAgICAgICAgICAgLy8gaGlnaGxpZ2h0IGZyb20gbGluZ2VyaW5nIG9uIHRoZSBtZW51IGl0ZW0uCiAgICAgICAgICAgICAgICBpZiAodGhpcy50cmlnZ2Vyc1N1Ym1lbnUoKSkgewogICAgICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogSGFuZGxlcyBrZXkgcHJlc3NlcyBvbiB0aGUgdHJpZ2dlci4KICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfaGFuZGxlS2V5ZG93bihldmVudCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGtleUNvZGUgPSBldmVudC5rZXlDb2RlOwogICAgICAgICAgICBpZiAodGhpcy50cmlnZ2Vyc1N1Ym1lbnUoKSAmJiAoKGtleUNvZGUgPT09IFJJR0hUX0FSUk9XICYmIHRoaXMuZGlyID09PSAnbHRyJykgfHwKICAgICAgICAgICAgICAgIChrZXlDb2RlID09PSBMRUZUX0FSUk9XICYmIHRoaXMuZGlyID09PSAncnRsJykpKSB7CiAgICAgICAgICAgICAgICB0aGlzLm9wZW5NZW51KCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogSGFuZGxlcyBjbGljayBldmVudHMgb24gdGhlIHRyaWdnZXIuCiAgICAgICAgICogQHBhcmFtIHs/fSBldmVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2hhbmRsZUNsaWNrKGV2ZW50KSB7CiAgICAgICAgICAgIGlmICh0aGlzLnRyaWdnZXJzU3VibWVudSgpKSB7CiAgICAgICAgICAgICAgICAvLyBTdG9wIGV2ZW50IHByb3BhZ2F0aW9uIHRvIGF2b2lkIGNsb3NpbmcgdGhlIHBhcmVudCBtZW51LgogICAgICAgICAgICAgICAgZXZlbnQuc3RvcFByb3BhZ2F0aW9uKCk7CiAgICAgICAgICAgICAgICB0aGlzLm9wZW5NZW51KCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLnRvZ2dsZU1lbnUoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBIYW5kbGVzIHRoZSBjYXNlcyB3aGVyZSB0aGUgdXNlciBob3ZlcnMgb3ZlciB0aGUgdHJpZ2dlci4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2hhbmRsZUhvdmVyKCkgewogICAgICAgICAgICAvLyBTdWJzY3JpYmUgdG8gY2hhbmdlcyBpbiB0aGUgaG92ZXJlZCBpdGVtIGluIG9yZGVyIHRvIHRvZ2dsZSB0aGUgcGFuZWwuCiAgICAgICAgICAgIGlmICghdGhpcy50cmlnZ2Vyc1N1Ym1lbnUoKSkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2hvdmVyU3Vic2NyaXB0aW9uID0gdGhpcy5fcGFyZW50TWVudS5faG92ZXJlZCgpCiAgICAgICAgICAgICAgICAvLyBTaW5jZSB3ZSBtaWdodCBoYXZlIG11bHRpcGxlIGNvbXBldGluZyB0cmlnZ2VycyBmb3IgdGhlIHNhbWUgbWVudSAoZS5nLiBhIHN1Yi1tZW51CiAgICAgICAgICAgICAgICAvLyB3aXRoIGRpZmZlcmVudCBkYXRhIGFuZCB0cmlnZ2VycyksIHdlIGhhdmUgdG8gZGVsYXkgaXQgYnkgYSB0aWNrIHRvIGVuc3VyZSB0aGF0CiAgICAgICAgICAgICAgICAvLyBpdCB3b24ndCBiZSBjbG9zZWQgaW1tZWRpYXRlbHkgYWZ0ZXIgaXQgaXMgb3BlbmVkLgogICAgICAgICAgICAgICAgLnBpcGUoZmlsdGVyKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBhY3RpdmUKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGFjdGl2ZSA9PiBhY3RpdmUgPT09IHRoaXMuX21lbnVJdGVtSW5zdGFuY2UgJiYgIWFjdGl2ZS5kaXNhYmxlZCkpLCBkZWxheSgwLCBhc2FwKSkKICAgICAgICAgICAgICAgIC5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgdGhpcy5fb3BlbmVkQnkgPSAnbW91c2UnOwogICAgICAgICAgICAgICAgLy8gSWYgdGhlIHNhbWUgbWVudSBpcyB1c2VkIGJldHdlZW4gbXVsdGlwbGUgdHJpZ2dlcnMsIGl0IG1pZ2h0IHN0aWxsIGJlIGFuaW1hdGluZwogICAgICAgICAgICAgICAgLy8gd2hpbGUgdGhlIG5ldyB0cmlnZ2VyIHRyaWVzIHRvIHJlLW9wZW4gaXQuIFdhaXQgZm9yIHRoZSBhbmltYXRpb24gdG8gZmluaXNoCiAgICAgICAgICAgICAgICAvLyBiZWZvcmUgZG9pbmcgc28uIEFsc28gaW50ZXJydXB0IGlmIHRoZSB1c2VyIG1vdmVzIHRvIGFub3RoZXIgaXRlbS4KICAgICAgICAgICAgICAgIGlmICh0aGlzLm1lbnUgaW5zdGFuY2VvZiBNYXRNZW51ICYmIHRoaXMubWVudS5faXNBbmltYXRpbmcpIHsKICAgICAgICAgICAgICAgICAgICAvLyBXZSBuZWVkIHRoZSBgZGVsYXkoMClgIGhlcmUgaW4gb3JkZXIgdG8gYXZvaWQKICAgICAgICAgICAgICAgICAgICAvLyAnY2hhbmdlZCBhZnRlciBjaGVja2VkJyBlcnJvcnMgaW4gc29tZSBjYXNlcy4gU2VlICMxMjE5NC4KICAgICAgICAgICAgICAgICAgICB0aGlzLm1lbnUuX2FuaW1hdGlvbkRvbmUKICAgICAgICAgICAgICAgICAgICAgICAgLnBpcGUodGFrZSgxKSwgZGVsYXkoMCwgYXNhcCksIHRha2VVbnRpbCh0aGlzLl9wYXJlbnRNZW51Ll9ob3ZlcmVkKCkpKQogICAgICAgICAgICAgICAgICAgICAgICAuc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICgpID0+IHRoaXMub3Blbk1lbnUoKSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5vcGVuTWVudSgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEdldHMgdGhlIHBvcnRhbCB0aGF0IHNob3VsZCBiZSBhdHRhY2hlZCB0byB0aGUgb3ZlcmxheS4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2dldFBvcnRhbCgpIHsKICAgICAgICAgICAgLy8gTm90ZSB0aGF0IHdlIGNhbiBhdm9pZCB0aGlzIGNoZWNrIGJ5IGtlZXBpbmcgdGhlIHBvcnRhbCBvbiB0aGUgbWVudSBwYW5lbC4KICAgICAgICAgICAgLy8gV2hpbGUgaXQgd291bGQgYmUgY2xlYW5lciwgd2UnZCBoYXZlIHRvIGludHJvZHVjZSBhbm90aGVyIHJlcXVpcmVkIG1ldGhvZCBvbgogICAgICAgICAgICAvLyBgTWF0TWVudVBhbmVsYCwgbWFraW5nIGl0IGhhcmRlciB0byBjb25zd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JBVEVHWV9GQUNUT1JZKG92ZXJsYXkpIHsKICAgICAgICByZXR1cm4gKC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgKCkgPT4gb3ZlcmxheS5zY3JvbGxTdHJhdGVnaWVzLnJlcG9zaXRpb24oeyBzY3JvbGxUaHJvdHRsZTogU0NST0xMX1RIUk9UVExFX01TIH0pKTsKICAgIH0KICAgIC8qKgogICAgICogXEBkb2NzLXByaXZhdGUKICAgICAqIEB0eXBlIHs/fQogICAgICovCiAgICBjb25zdCBNQVRfVE9PTFRJUF9TQ1JPTExfU1RSQVRFR1lfRkFDVE9SWV9QUk9WSURFUiA9IHsKICAgICAgICBwcm92aWRlOiBNQVRfVE9PTFRJUF9TQ1JPTExfU1RSQVRFR1ksCiAgICAgICAgZGVwczogW092ZXJsYXldLAogICAgICAgIHVzZUZhY3Rvcnk6IE1BVF9UT09MVElQX1NDUk9MTF9TVFJBVEVHWV9GQUNUT1JZLAogICAgfTsKICAgIC8qKgogICAgICogSW5qZWN0aW9uIHRva2VuIHRvIGJlIHVzZWQgdG8gb3ZlcnJpZGUgdGhlIGRlZmF1bHQgb3B0aW9ucyBmb3IgYG1hdFRvb2x0aXBgLgogICAgICogQHR5cGUgez99CiAgICAgKi8KICAgIGNvbnN0IE1BVF9UT09MVElQX0RFRkFVTFRfT1BUSU9OUyA9IG5ldyBJbmplY3Rpb25Ub2tlbignbWF0LXRvb2x0aXAtZGVmYXVsdC1vcHRpb25zJywgewogICAgICAgIHByb3ZpZGVkSW46ICdyb290JywKICAgICAgICBmYWN0b3J5OiBNQVRfVE9PTFRJUF9ERUZBVUxUX09QVElPTlNfRkFDVE9SWQogICAgfSk7CiAgICAvKioKICAgICAqIFxAZG9jcy1wcml2YXRlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBNQVRfVE9PTFRJUF9ERUZBVUxUX09QVElPTlNfRkFDVE9SWSgpIHsKICAgICAgICByZXR1cm4gewogICAgICAgICAgICBzaG93RGVsYXk6IDAsCiAgICAgICAgICAgIGhpZGVEZWxheTogMCwKICAgICAgICAgICAgdG91Y2hlbmRIaWRlRGVsYXk6IDE1MDAsCiAgICAgICAgfTsKICAgIH0KICAgIC8qKgogICAgICogRGlyZWN0aXZlIHRoYXQgYXR0YWNoZXMgYSBtYXRlcmlhbCBkZXNpZ24gdG9vbHRpcCB0byB0aGUgaG9zdCBlbGVtZW50LiBBbmltYXRlcyB0aGUgc2hvd2luZyBhbmQKICAgICAqIGhpZGluZyBvZiBhIHRvb2x0aXAgcHJvdmlkZWQgcG9zaXRpb24gKGRlZmF1bHRzIHRvIGJlbG93IHRoZSBlbGVtZW50KS4KICAgICAqCiAgICAgKiBodHRwczovL21hdGVyaWFsLmlvL2Rlc2lnbi9jb21wb25lbnRzL3Rvb2x0aXBzLmh0bWwKICAgICAqLwogICAgY2xhc3MgTWF0VG9vbHRpcCB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBfb3ZlcmxheQogICAgICAgICAqIEBwYXJhbSB7P30gX2VsZW1lbnRSZWYKICAgICAgICAgKiBAcGFyYW0gez99IF9zY3JvbGxEaXNwYXRjaGVyCiAgICAgICAgICogQHBhcmFtIHs/fSBfdmlld0NvbnRhaW5lclJlZgogICAgICAgICAqIEBwYXJhbSB7P30gX25nWm9uZQogICAgICAgICAqIEBwYXJhbSB7P30gX3BsYXRmb3JtCiAgICAgICAgICogQHBhcmFtIHs/fSBfYXJpYURlc2NyaWJlcgogICAgICAgICAqIEBwYXJhbSB7P30gX2ZvY3VzTW9uaXRvcgogICAgICAgICAqIEBwYXJhbSB7P30gc2Nyb2xsU3RyYXRlZ3kKICAgICAgICAgKiBAcGFyYW0gez99IF9kaXIKICAgICAgICAgKiBAcGFyYW0gez99IF9kZWZhdWx0T3B0aW9ucwogICAgICAgICAqIEBwYXJhbSB7Pz19IF9oYW1tZXJMb2FkZXIKICAgICAgICAgKi8KICAgICAgICBjb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J2F1dG8nOwogICAgICAgICAgICB0aGlzLl9tZXNzYWdlID0gJyc7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBNYW51YWxseS1ib3VuZCBwYXNzaXZlIGV2ZW50IGxpc3RlbmVycy4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX3Bhc3NpdmVMaXN0ZW5lcnMgPSBuZXcgTWFwKCk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBFbWl0cyB3aGVuIHRoZSBjb21wb25lbnQgaXMgZGVzdHJveWVkLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fZGVzdHJveWVkID0gbmV3IFN1YmplY3QoKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEhhbmRsZXMgdGhlIGtleWRvd24gZXZlbnRzIG9uIHRoZSBob3N0IGVsZW1lbnQuCiAgICAgICAgICAgICAqIE5lZWRzIHRvIGJlIGFuIGFycm93IGZ1bmN0aW9uIHNvIHRoYXQgd2UgY2FuIHVzZSBpdCBpbiBhZGRFdmVudExpc3RlbmVyLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5faGFuZGxlS2V5ZG93biA9ICgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBldmVudAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGV2ZW50KSA9PiB7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5faXNUb29sdGlwVmlzaWJsZSgpICYmIGV2ZW50LmtleUNvZGUgPT09IEVTQ0FQRSAmJiAhaGFzTW9kaWZpZXJLZXkoZXZlbnQpKSB7CiAgICAgICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTsKICAgICAgICAgICAgICAgICAgICBldmVudC5zdG9wUHJvcGFnYXRpb24oKTsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9uZ1pvbmUucnVuKCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICgpID0+IHRoaXMuaGlkZSgwKSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdGhpcy5fc2Nyb2xsU3RyYXRlZ3kgPSBzY3JvbGxTdHJhdGVneTsKICAgICAgICAgICAgaWYgKF9kZWZhdWx0T3B0aW9ucykgewogICAgICAgICAgICAgICAgaWYgKF9kZWZhdWx0T3B0aW9ucy5wb3NpdGlvbikgewogICAgICAgICAgICAgICAgICAgIHRoaXMucG9zaXRpb24gPSBfZGVmYXVsdE9wdGlvbnMucG9zaXRpb247CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAoX2RlZmF1bHRPcHRpb25zLnRvdWNoR2VzdHVyZXMpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLnRvdWNoR2VzdHVyZXMgPSBfZGVmYXVsdE9wdGlvbnMudG91Y2hHZXN0dXJlczsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBfZm9jdXNNb25pdG9yLm1vbml0b3IoX2VsZW1lbnRSZWYpCiAgICAgICAgICAgICAgICAucGlwZSh0YWtlVW50aWwodGhpcy5fZGVzdHJveWVkKSkKICAgICAgICAgICAgICAgIC5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IG9yaWdpbgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgb3JpZ2luID0+IHsKICAgICAgICAgICAgICAgIC8vIE5vdGUgdGhhdCB0aGUgZm9jdXMgbW9uaXRvciBydW5zIG91dHNpZGUgdGhlIEFuZ3VsYXIgem9uZS4KICAgICAgICAgICAgICAgIGlmICghb3JpZ2luKSB7CiAgICAgICAgICAgICAgICAgICAgX25nWm9uZS5ydW4oKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKCkgPT4gdGhpcy5oaWRlKDApKSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmIChvcmlnaW4gPT09ICdrZXlib2FyZCcpIHsKICAgICAgICAgICAgICAgICAgICBfbmdab25lLnJ1bigoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAoKSA9PiB0aGlzLnNob3coKSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIF9uZ1pvbmUucnVuT3V0c2lkZUFuZ3VsYXIoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgX2VsZW1lbnRSZWYubmF0aXZlRWxlbWVudC5hZGRFdmVudExpc3RlbmVyKCdrZXlkb3duJywgdGhpcy5faGFuZGxlS2V5ZG93bik7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQWxsb3dzIHRoZSB1c2VyIHRvIGRlZmluZSB0aGUgcG9zaXRpb24gb2YgdGhlIHRvb2x0aXAgcmVsYXRpdmUgdG8gdGhlIHBhcmVudCBlbGVtZW50CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgcG9zaXRpb24oKSB7IHJldHVybiB0aGlzLl9wb3NpdGlvbjsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBwb3NpdGlvbih2YWx1ZSkgewogICAgICAgICAgICBpZiAodmFsdWUgIT09IHRoaXMuX3Bvc2l0aW9uKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9wb3NpdGlvbiA9IHZhbHVlOwogICAgICAgICAgICAgICAgaWYgKHRoaXMuX292ZXJsYXlSZWYpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl91cGRhdGVQb3NpdGlvbigpOwogICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLl90b29sdGlwSW5zdGFuY2UpIHsKICAgICAgICAgICAgICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX3Rvb2x0aXBJbnN0YW5jZSkpLnNob3coMCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHRoaXMuX292ZXJsYXlSZWYudXBkYXRlUG9zaXRpb24oKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBEaXNhYmxlcyB0aGUgZGlzcGxheSBvZiB0aGUgdG9vbHRpcC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBkaXNhYmxlZCgpIHsgcmV0dXJuIHRoaXMuX2Rpc2FibGVkOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IGRpc2FibGVkKHZhbHVlKSB7CiAgICAgICAgICAgIHRoaXMuX2Rpc2FibGVkID0gY29lcmNlQm9vbGVhblByb3BlcnR5KHZhbHVlKTsKICAgICAgICAgICAgLy8gSWYgdG9vbHRpcCBpcyBkaXNhYmxlZCwgaGlkZSBpbW1lZGlhdGVseS4KICAgICAgICAgICAgaWYgKHRoaXMuX2Rpc2FibGVkKSB7CiAgICAgICAgICAgICAgICB0aGlzLmhpZGUoMCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIG1lc3NhZ2UgdG8gYmUgZGlzcGxheWVkIGluIHRoZSB0b29sdGlwCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgbWVzc2FnZSgpIHsgcmV0dXJuIHRoaXMuX21lc3NhZ2U7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgbWVzc2FnZSh2YWx1ZSkgewogICAgICAgICAgICB0aGlzLl9hcmlhRGVzY3JpYmVyLnJlbW92ZURlc2NyaXB0aW9uKHRoaXMuX2VsZW1lbnRSZWYubmF0aXZlRWxlbWVudCwgdGhpcy5fbWVzc2FnZSk7CiAgICAgICAgICAgIC8vIElmIHRoZSBtZXNzYWdlIGlzIG5vdCBhIHN0cmluZyAoZS5nLiBudW1iZXIpLCBjb252ZXJ0IGl0IHRvIGEgc3RyaW5nIGFuZCB0cmltIGl0LgogICAgICAgICAgICB0aGlzLl9tZXNzYWdlID0gdmFsdWUgIT0gbnVsbCA/IGAke3ZhbHVlfWAudHJpbSgpIDogJyc7CiAgICAgICAgICAgIGlmICghdGhpcy5fbWVzc2FnZSAmJiB0aGlzLl9pc1Rvb2x0aXBWaXNpYmxlKCkpIHsKICAgICAgICAgICAgICAgIHRoaXMuaGlkZSgwKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuX3VwZGF0ZVRvb2x0aXBNZXNzYWdlKCk7CiAgICAgICAgICAgICAgICB0aGlzLl9uZ1pvbmUucnVuT3V0c2lkZUFuZ3VsYXIoKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgICAgIC8vIFRoZSBgQXJpYURlc2NyaWJlcmAgaGFzIHNvbWUgZnVuY3Rpb25hbGl0eSB0aGF0IGF2b2lkcyBhZGRpbmcgYSBkZXNjcmlwdGlvbiBpZiBpdCdzIHRoZQogICAgICAgICAgICAgICAgICAgIC8vIHNhbWUgYXMgdGhlIGBhcmlhLWxhYmVsYCBvZiBhbiBlbGVtZW50LCBob3dldmVyIHdlIGNhbid0IGtub3cgd2hldGhlciB0aGUgdG9vbHRpcCB0cmlnZ2VyCiAgICAgICAgICAgICAgICAgICAgLy8gaGFzIGEgZGF0YS1ib3VuZCBgYXJpYS1sYWJlbGAgb3Igd2hlbiBpdCdsbCBiZSBzZXQgZm9yIHRoZSBmaXJzdCB0aW1lLiBXZSBjYW4gYXZvaWQgdGhlCiAgICAgICAgICAgICAgICAgICAgLy8gaXNzdWUgYnkgZGVmZXJyaW5nIHRoZSBkZXNjcmlwdGlvbiBieSBhIHRpY2sgc28gQW5ndWxhciBoYXMgdGltZSB0byBzZXQgdGhlIGBhcmlhLWxhYmVsYC4KICAgICAgICAgICAgICAgICAgICBQcm9taXNlLnJlc29sdmUoKS50aGVuKCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fYXJpYURlc2NyaWJlci5kZXNjcmliZSh0aGlzLl9lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQsIHRoaXMubWVzc2FnZSk7CiAgICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENsYXNzZXMgdG8gYmUgcGFzc2VkIHRvIHRoZSB0b29sdGlwLiBTdXBwb3J0cyB0aGUgc2FtZSBzeW50YXggYXMgYG5nQ2xhc3NgLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHRvb2x0aXBDbGFzcygpIHsgcmV0dXJuIHRoaXMuX3Rvb2x0aXBDbGFzczsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCB0b29sdGlwQ2xhc3ModmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5fdG9vbHRpcENsYXNzID0gdmFsdWU7CiAgICAgICAgICAgIGlmICh0aGlzLl90b29sdGlwSW5zdGFuY2UpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3NldFRvb2x0aXBDbGFzcyh0aGlzLl90b29sdGlwQ2xhc3MpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNldHVwIHN0eWxpbmctc3BlY2lmaWMgdGhpbmdzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uSW5pdCgpIHsKICAgICAgICAgICAgLy8gVGhpcyBuZWVkcyB0byBoYXBwZW4gaW4gYG5nT25Jbml0YCBzbyB0aGUgaW5pdGlhbCB2YWx1ZXMgZm9yIGFsbCBpbnB1dHMgaGF2ZSBiZWVuIHNldC4KICAgICAgICAgICAgdGhpcy5fc2V0dXBQb2ludGVyRXZlbnRzKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIERpc3Bvc2UgdGhlIHRvb2x0aXAgd2hlbiBkZXN0cm95ZWQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uRGVzdHJveSgpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBuYXRpdmVFbGVtZW50ID0gdGhpcy5fZWxlbWVudFJlZi5uYXRpdmVFbGVtZW50OwogICAgICAgICAgICBjbGVhclRpbWVvdXQodGhpcy5fdG91Y2hzdGFydFRpbWVvdXQpOwogICAgICAgICAgICBpZiAodGhpcy5fb3ZlcmxheVJlZikgewogICAgICAgICAgICAgICAgdGhpcy5fb3ZlcmxheVJlZi5kaXNwb3NlKCk7CiAgICA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WZhdWx0cyB0byB0b29sdGlwLWRlbGF5LXNob3cgb3IgMG1zIGlmIG5vIGlucHV0CiAgICAgICAgICogQHBhcmFtIHs/PX0gZGVsYXkKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNob3coZGVsYXkgPSB0aGlzLnNob3dEZWxheSkgewogICAgICAgICAgICBpZiAodGhpcy5kaXNhYmxlZCB8fCAhdGhpcy5tZXNzYWdlIHx8ICh0aGlzLl9pc1Rvb2x0aXBWaXNpYmxlKCkgJiYKICAgICAgICAgICAgICAgICEoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5fdG9vbHRpcEluc3RhbmNlKSkuX3Nob3dUaW1lb3V0SWQgJiYgISgvKiogQHR5cGUgez99ICovICh0aGlzLl90b29sdGlwSW5zdGFuY2UpKS5faGlkZVRpbWVvdXRJZCkpIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG92ZXJsYXlSZWYgPSB0aGlzLl9jcmVhdGVPdmVybGF5KCk7CiAgICAgICAgICAgIHRoaXMuX2RldGFjaCgpOwogICAgICAgICAgICB0aGlzLl9wb3J0YWwgPSB0aGlzLl9wb3J0YWwgfHwgbmV3IENvbXBvbmVudFBvcnRhbChUb29sdGlwQ29tcG9uZW50LCB0aGlzLl92aWV3Q29udGFpbmVyUmVmKTsKICAgICAgICAgICAgdGhpcy5fdG9vbHRpcEluc3RhbmNlID0gb3ZlcmxheVJlZi5hdHRhY2godGhpcy5fcG9ydGFsKS5pbnN0YW5jZTsKICAgICAgICAgICAgdGhpcy5fdG9vbHRpcEluc3RhbmNlLmFmdGVySGlkZGVuKCkKICAgICAgICAgICAgICAgIC5waXBlKHRha2VVbnRpbCh0aGlzLl9kZXN0cm95ZWQpKQogICAgICAgICAgICAgICAgLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB0aGlzLl9kZXRhY2goKSkpOwogICAgICAgICAgICB0aGlzLl9zZXRUb29sdGlwQ2xhc3ModGhpcy5fdG9vbHRpcENsYXNzKTsKICAgICAgICAgICAgdGhpcy5fdXBkYXRlVG9vbHRpcE1lc3NhZ2UoKTsKICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX3Rvb2x0aXBJbnN0YW5jZSkpLnNob3coZGVsYXkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBIaWRlcyB0aGUgdG9vbHRpcCBhZnRlciB0aGUgZGVsYXkgaW4gbXMsIGRlZmF1bHRzIHRvIHRvb2x0aXAtZGVsYXktaGlkZSBvciAwbXMgaWYgbm8gaW5wdXQKICAgICAgICAgKiBAcGFyYW0gez89fSBkZWxheQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgaGlkZShkZWxheSA9IHRoaXMuaGlkZURlbGF5KSB7CiAgICAgICAgICAgIGlmICh0aGlzLl90b29sdGlwSW5zdGFuY2UpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3Rvb2x0aXBJbnN0YW5jZS5oaWRlKGRlbGF5KTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTaG93cy9oaWRlcyB0aGUgdG9vbHRpcAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdG9nZ2xlKCkgewogICAgICAgICAgICB0aGlzLl9pc1Rvb2x0aXBWaXNpYmxlKCkgPyB0aGlzLmhpZGUoKSA6IHRoaXMuc2hvdygpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZXR1cm5zIHRydWUgaWYgdGhlIHRvb2x0aXAgaXMgY3VycmVudGx5IHZpc2libGUgdG8gdGhlIHVzZXIKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9pc1Rvb2x0aXBWaXNpYmxlKCkgewogICAgICAgICAgICByZXR1cm4gISF0aGlzLl90b29sdGlwSW5zdGFuY2UgJiYgdGhpcy5fdG9vbHRpcEluc3RhbmNlLmlzVmlzaWJsZSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDcmVhdGUgdGhlIG92ZXJsYXkgY29uZmlnIGFuZCBwb3NpdGlvbiBzdHJhdGVneQogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfY3JlYXRlT3ZlcmxheSgpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX292ZXJsYXlSZWYpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9vdmVybGF5UmVmOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc2Nyb2xsYWJsZUFuY2VzdG9ycyA9IHRoaXMuX3Njcm9sbERpc3BhdGNoZXIuZ2V0QW5jZXN0b3JTY3JvbGxDb250YWluZXJzKHRoaXMuX2VsZW1lbnRSZWYpOwogICAgICAgICAgICAvLyBDcmVhdGUgY29ubmVjdGVkIHBvc2l0aW9uIHN0cmF0ZWd5IHRoYXQgbGlzdGVucyBmb3Igc2Nyb2xsIGV2ZW50cyB0byByZXBvc2l0aW9uLgogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHN0cmF0ZWd5ID0gdGhpcy5fb3ZlcmxheS5wb3NpdGlvbigpCiAgICAgICAgICAgICAgICAuZmxleGlibGVDb25uZWN0ZWRUbyh0aGlzLl9lbGVtZW50UmVmKQogICAgICAgICAgICAgICAgLndpdGhUcmFuc2Zvcm1PcmlnaW5PbignLm1hdC10b29sdGlwJykKICAgICAgICAgICAgICAgIC53aXRoRmxleGlibGVEaW1lbnNpb25zKGZhbHNlKQogICAgICAgICAgICAgICAgLndpdGhWaWV3cG9ydE1hcmdpbig4KQogICAgICAgICAgICAgICAgLndpdGhTY3JvbGxhYmxlQ29udGFpbmVycyhzY3JvbGxhYmxlQW5jZXN0b3JzKTsKICAgICAgICAgICAgc3RyYXRlZ3kucG9zaXRpb25DaGFuZ2VzLnBpcGUodGFrZVVudGlsKHRoaXMuX2Rlc3Ryb3llZCkpLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY2hhbmdlCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBjaGFuZ2UgPT4gewogICAgICAgICAgICAgICAgaWYgKHRoaXMuX3Rvb2x0aXBJbnN0YW5jZSkgewogICAgICAgICAgICAgICAgICAgIGlmIChjaGFuZ2Uuc2Nyb2xsYWJsZVZpZXdQcm9wZXJ0aWVzLmlzT3ZlcmxheUNsaXBwZWQgJiYgdGhpcy5fdG9vbHRpcEluc3RhbmNlLmlzVmlzaWJsZSgpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIEFmdGVyIHBvc2l0aW9uIGNoYW5nZXMgb2NjdXIgYW5kIHRoZSBvdmVybGF5IGlzIGNsaXBwZWQgYnkKICAgICAgICAgICAgICAgICAgICAgICAgLy8gYSBwYXJlbnQgc2Nyb2xsYWJsZSB0aGVuIGNsb3NlIHRoZSB0b29sdGlwLgogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9uZ1pvbmUucnVuKCgvKioKICAgICAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgICAgICgpID0+IHRoaXMuaGlkZSgwKSkpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB0aGlzLl9vdmVybGF5UmVmID0gdGhpcy5fb3ZlcmxheS5jcmVhdGUoewogICAgICAgICAgICAgICAgZGlyZWN0aW9uOiB0aGlzLl9kaXIsCiAgICAgICAgICAgICAgICBwb3NpdGlvblN0cmF0ZWd5OiBzdHJhdGVneSwKICAgICAgICAgICAgICAgIHBhbmVsQ2xhc3M6IFRPT0xUSVBfUEFORUxfQ0xBU1MsCiAgICAgICAgICAgICAgICBzY3JvbGxTdHJhdGVneTogdGhpcy5fc2Nyb2xsU3RyYXRlZ3koKQogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdGhpcy5fdXBkYXRlUG9zaXRpb24oKTsKICAgICAgICAgICAgdGhpcy5fb3ZlcmxheVJlZi5kZXRhY2htZW50cygpCiAgICAgICAgICAgICAgICAucGlwZSh0YWtlVW50aWwodGhpcy5fZGVzdHJveWVkKSkKICAgICAgICAgICAgICAgIC5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gdGhpcy5fZGV0YWNoKCkpKTsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX292ZXJsYXlSZWY7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIERldGFjaGVzIHRoZSBjdXJyZW50bHktYXR0YWNoZWQgdG9vbHRpcC4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2RldGFjaCgpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX292ZXJsYXlSZWYgJiYgdGhpcy5fb3ZlcmxheVJlZi5oYXNBdHRhY2hlZCgpKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9vdmVybGF5UmVmLmRldGFjaCgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX3Rvb2x0aXBJbnN0YW5jZSA9IG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFVwZGF0ZXMgdGhlIHBvc2l0aW9uIG9mIHRoZSBjdXJyZW50IHRvb2x0aXAuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF91cGRhdGVQb3NpdGlvbigpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwb3NpdGlvbiA9ICgvKiogQHR5cGUgez99ICovICgoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5fb3ZlcmxheVJlZikpLmdldENvbmZpZygpLnBvc2l0aW9uU3RyYXRlZ3kpKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBvcmlnaW4gPSB0aGlzLl9nZXRPcmlnaW4oKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBvdmVybGF5ID0gdGhpcy5fZ2V0T3ZlcmxheVBvc2l0aW9uKCk7CiAgICAgICAgICAgIHBvc2l0aW9uLndpdGhQb3NpdGlvbnMoWwogICAgICAgICAgICAgICAgT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LCBvcmlnaW4ubWFpbiksIG92ZXJsYXkubWFpbiksCiAgICAgICAgICAgICAgICBPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sIG9yaWdpbi5mYWxsYmFjayksIG92ZXJsYXkuZmFsbGJhY2spCiAgICAgICAgICAgIF0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZXR1cm5zIHRoZSBvcmlnaW4gcG9zaXRpb24gYW5kIGEgZmFsbGJhY2sgcG9zaXRpb24gYmFzZWQgb24gdGhlIHVzZXIncyBwb3NpdGlvbiBwcmVmZXJlbmNlLgogICAgICAgICAqIFRoZSBmYWxsYmFjayBwb3NpdGlvbiBpcyB0aGUgaW52ZXJzZSBvZiB0aGUgb3JpZ2luIChlLmcuIGAnYmVsb3cnIC0+ICdhYm92ZSdgKS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9nZXRPcmlnaW4oKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaXNMdHIgPSAhdGhpcy5fZGlyIHx8IHRoaXMuX2Rpci52YWx1ZSA9PSAnbHRyJzsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwb3NpdGlvbiA9IHRoaXMucG9zaXRpb247CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IG9yaWdpblBvc2l0aW9uOwogICAgICAgICAgICBpZiAocG9zaXRpb24gPT0gJ2Fib3ZlJyB8fCBwb3NpdGlvbiA9PSAnYmVsb3cnKSB7CiAgICAgICAgICAgICAgICBvcmlnaW5Qb3NpdGlvbiA9IHsgb3JpZ2luWDogJ2NlbnRlcicsIG9yaWdpblk6IHBvc2l0aW9uID09ICdhYm92ZScgPyAndG9wJyA6ICdib3R0b20nIH07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAocG9zaXRpb24gPT0gJ2JlZm9yZScgfHwKICAgICAgICAgICAgICAgIChwb3NpdGlvbiA9PSAnbGVmdCcgJiYgaXNMdHIpIHx8CiAgICAgICAgICAgICAgICAocG9zaXRpb24gPT0gJ3JpZ2h0JyAmJiAhaXNMdHIpKSB7CiAgICAgICAgICAgICAgICBvcmlnaW5Qb3NpdGlvbiA9IHsgb3JpZ2luWDogJ3N0YXJ0Jywgb3JpZ2luWTogJ2NlbnRlcicgfTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChwb3NpdGlvbiA9PSAnYWZ0ZXInIHx8CiAgICAgICAgICAgICAgICAocG9zaXRpb24gPT0gJ3JpZ2h0JyAmJiBpc0x0cikgfHwKICAgICAgICAgICAgICAgIChwb3NpdGlvbiA9PSAnbGVmdCcgJiYgIWlzTHRyKSkgewogICAgICAgICAgICAgICAgb3JpZ2luUG9zaXRpb24gPSB7IG9yaWdpblg6ICdlbmQnLCBvcmlnaW5ZOiAnY2VudGVyJyB9OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhyb3cgZ2V0TWF0VG9vbHRpcEludmFsaWRQb3NpdGlvbkVycm9yKHBvc2l0aW9uKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBjb25zdCB7IHgsIHkgfSA9IHRoaXMuX2ludmVydFBvc2l0aW9uKG9yaWdpblBvc2l0aW9uLm9yaWdpblgsIG9yaWdpblBvc2l0aW9uLm9yaWdpblkpOwogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgbWFpbjogb3JpZ2luUG9zaXRpb24sCiAgICAgICAgICAgICAgICBmYWxsYmFjazogeyBvcmlnaW5YOiB4LCBvcmlnaW5ZOiB5IH0KICAgICAgICAgICAgfTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0dXJucyB0aGUgb3ZlcmxheSBwb3NpdGlvbiBhbmQgYSBmYWxsYmFjayBwb3NpdGlvbiBiYXNlZCBvbiB0aGUgdXNlcidzIHByZWZlcmVuY2UKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9nZXRPdmVybGF5UG9zaXRpb24oKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaXNMdHIgPSAhdGhpcy5fZGlyIHx8IHRoaXMuX2Rpci52YWx1ZSA9PSAnbHRyJzsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwb3NpdGlvbiA9IHRoaXMucG9zaXRpb247CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IG92ZXJsYXlQb3NpdGlvbjsKICAgICAgICAgICAgaWYgKHBvc2l0aW9uID09ICdhYm92ZScpIHsKICAgICAgICAgICAgICAgIG92ZXJsYXlQb3NpdGlvbiA9IHsgb3ZlcmxheVg6ICdjZW50ZXInLCBvdmVybGF5WTogJ2JvdHRvbScgfTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChwb3NpdGlvbiA9PSAnYmVsb3cnKSB7CiAgICAgICAgICAgICAgICBvdmVybGF5UG9zaXRpb24gPSB7IG92ZXJsYXlYOiAnY2VudGVyJywgb3ZlcmxheVk6ICd0b3AnIH07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAocG9zaXRpb24gPT0gJ2JlZm9yZScgfHwKICAgICAgICAgICAgICAgIChwb3NpdGlvbiA9PSAnbGVmdCcgJiYgaXNMdHIpIHx8CiAgICAgICAgICAgICAgICAocG9zaXRpb24gPT0gJ3JpZ2h0JyAmJiAhaXNMdHIpKSB7CiAgICAgICAgICAgICAgICBvdmVybGF5UG9zaXRpb24gPSB7IG92ZXJsYXlYOiAnZW5kJywgb3ZlcmxheVk6ICdjZW50ZXInIH07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAocG9zaXRpb24gPT0gJ2FmdGVyJyB8fAogICAgICAgICAgICAgICAgKHBvc2l0aW9uID09ICdyaWdodCcgJiYgaXNMdHIpIHx8CiAgICAgICAgICAgICAgICAocG9zaXRpb24gPT0gJ2xlZnQnICYmICFpc0x0cikpIHsKICAgICAgICAgICAgICAgIG92ZXJsYXlQb3NpdGlvbiA9IHsgb3ZlcmxheVg6ICdzdGFydCcsIG92ZXJsYXlZOiAnY2VudGVyJyB9OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhyb3cgZ2V0TWF0VG9vbHRpcEludmFsaWRQb3NpdGlvbkVycm9yKHBvc2l0aW9uKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBjb25zdCB7IHgsIHkgfSA9IHRoaXMuX2ludmVydFBvc2l0aW9uKG92ZXJsYXlQb3NpdGlvbi5vdmVybGF5WCwgb3ZlcmxheVBvc2l0aW9uLm92ZXJsYXlZKTsKICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIG1haW46IG92ZXJsYXlQb3NpdGlvbiwKICAgICAgICAgICAgICAgIGZhbGxiYWNrOiB7IG92ZXJsYXlYOiB4LCBvdmVybGF5WTogeSB9CiAgICAgICAgICAgIH07CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFVwZGF0ZXMgdGhlIHRvb2x0aXAgbWVzc2FnZSBhbmQgcmVwb3NpdGlvbnMgdGhlIG92ZXJsYXkgYWNjb3JkaW5nIHRvIHRoZSBuZXcgbWVzc2FnZSBsZW5ndGgKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3VwZGF0ZVRvb2x0aXBNZXNzYWdlKCkgewogICAgICAgICAgICAvLyBNdXN0IHdhaXQgZm9yIHRoZSBtZXNzYWdlIHRvIGJlIHBhaW50ZWQgdG8gdGhlIHRvb2x0aXAgc28gdGhhdCB0aGUgb3ZlcmxheSBjYW4gcHJvcGVybHkKICAgICAgICAgICAgLy8gY2FsY3VsYXRlIHRoZSBjb3JyZWN0IHBvc2l0aW9uaW5nIGJhc2VkIG9uIHRoZSBzaXplIG9mIHRoZSB0ZXh0LgogICAgICAgICAgICBpZiAodGhpcy5fdG9vbHRpcEluc3RhbmNlKSB7CiAgICAgICAgICAgICAgICB0aGlzLl90b29sdGlwSW5zdGFuY2UubWVzc2FnZSA9IHRoaXMubWVzc2FnZTsKICAgICAgICAgICAgICAgIHRoaXMuX3Rvb2x0aXBJbnN0YW5jZS5fbWFya0ZvckNoZWNrKCk7CiAgICAgICAgICAgICAgICB0aGlzLl9uZ1pvbmUub25NaWNyb3Rhc2tFbXB0eS5hc09ic2VydmFibGUoKS5waXBlKHRha2UoMSksIHRha2VVbnRpbCh0aGlzLl9kZXN0cm95ZWQpKS5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLl90b29sdGlwSW5zdGFuY2UpIHsKICAgICAgICAgICAgICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX292ZXJsYXlSZWYpKS51cGRhdGVQb3NpdGlvbigpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBVcGRhdGVzIHRoZSB0b29sdGlwIGNsYXNzCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHRvb2x0aXBDbGFzcwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3NldFRvb2x0aXBDbGFzcyh0b29sdGlwQ2xhc3MpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX3Rvb2x0aXBJbnN0YW5jZSkgewogICAgICAgICAgICAgICAgdGhpcy5fdG9vbHRpcEluc3RhbmNlLnRvb2x0aXBDbGFzcyA9IHRvb2x0aXBDbGFzczsKICAgICAgICAgICAgICAgIHRoaXMuX3Rvb2x0aXBJbnN0YW5jZS5fbWFya0ZvckNoZWNrKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogSW52ZXJ0cyBhbiBvdmVybGF5IHBvc2l0aW9uLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSB4CiAgICAgICAgICogQHBhcmFtIHs/fSB5CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfaW52ZXJ0UG9zaXRpb24oeCwgeSkgewogICAgICAgICAgICBpZiAodGhpcy5wb3NpdGlvbiA9PT0gJ2Fib3ZlJyB8fCB0aGlzLnBvc2l0aW9uID09PSAnYmVsb3cnKSB7CiAgICAgICAgICAgICAgICBpZiAoeSA9PT0gJ3RvcCcpIHsKICAgICAgICAgICAgICAgICAgICB5ID0gJ2JvdHRvbSc7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmICh5ID09PSAnYm90dG9tJykgewogICAgICAgICAgICAgICAgICAgIHkgPSAndG9wJzsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIGlmICh4ID09PSAnZW5kJykgewogICAgICAgICAgICAgICAgICAgIHggPSAnc3RhcnQnOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAoeCA9PT0gJ3N0YXJ0JykgewogICAgICAgICAgICAgICAgICAgIHggPSAnZW5kJzsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4geyB4LCB5IH07CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEJpbmRzIHRoZSBwb2ludGVyIGV2ZW50cyB0byB0aGUgdG9vbHRpcCB0cmlnZ2VyLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfc2V0dXBQb2ludGVyRXZlbnRzKCkgewogICAgICAgICAgICAvLyBUaGUgbW91c2UgZXZlbnRzIHNob3VsZG4ndCBiZSBib3VuZCBvbiBtb2JpbGUgZGV2aWNlcywgYmVjYXVzZSB0aGV5IGNhbiBwcmV2ZW50IHRoZQogICAgICAgICAgICAvLyBmaXJzdCB0YXAgZnJvbSBmaXJpbmcgaXRzIGNsaWNrIGV2ZW50IG9yIGNhbiBjYXVzZSB0aGUgdG9vbHRpcCB0byBvcGVuIGZvciBjbGlja3MuCiAgICAgICAgICAgIGlmICghdGhpcy5fcGxhdGZvcm0uSU9TICYmICF0aGlzLl9wbGF0Zm9ybS5BTkRST0lEKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9wYXNzaXZlTGlzdGVuZXJzCiAgICAgICAgICAgICAgICAgICAgLnNldCgnbW91c2VlbnRlcicsICgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHRoaXMuc2hvdygpKSkKICAgICAgICAgICAgICAgICAgICAuc2V0KCdtb3VzZWxlYXZlJywgKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gdGhpcy5oaWRlKCkpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmICh0aGlzLnRvdWNoR2VzdHVyZXMgIT09ICdvZmYnKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9kaXNhYmxlTmF0aXZlR2VzdHVyZXNJZk5lY2Vzc2FyeSgpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgdG91Y2hlbmRMaXN0ZW5lciA9ICgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQodGhpcy5fdG91Y2hzdGFydFRpbWVvdXQpOwogICAgICAgICAgICAgICAgICAgIHRoaXMuaGlkZSh0aGlzLl9kZWZhdWx0T3B0aW9ucy50b3VjaGVuZEhpZGVEZWxheSk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIHRoaXMuX3Bhc3NpdmVMaXN0ZW5lcnMKICAgICAgICAgICAgICAgICAgICAuc2V0KCd0b3VjaGVuZCcsIHRvdWNoZW5kTGlzdGVuZXIpCiAgICAgICAgICAgICAgICAgICAgLnNldCgndG91Y2hjYW5jZWwnLCB0b3VjaGVuZExpc3RlbmVyKQogICAgICAgICAgICAgICAgICAgIC5zZXQoJ3RvdWNoc3RhcnQnLCAoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgLy8gTm90ZSB0aGF0IGl0J3MgaW1wb3J0YW50IHRoYXQgd2UgZG9uJ3QgYHByZXZlbnREZWZhdWx0YCBoZXJlLAogICAgICAgICAgICAgICAgICAgIC8vIGJlY2F1c2UgaXQgY2FuIHByZXZlbnQgY2xpY2sgZXZlbnRzIGZyb20gZmlyaW5nIG9uIHRoZSBlbGVtZW50LgogICAgICAgICAgICAgICAgICAgIGNsZWFyVGltZW91dCh0aGlzLl90b3VjaHN0YXJ0VGltZW91dCk7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fdG91Y2hzdGFydFRpbWVvdXQgPSBzZXRUaW1lb3V0KCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICgpID0+IHRoaXMuc2hvdygpKSwgTE9OR1BSRVNTX0RFTEFZKTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9wYXNzaXZlTGlzdGVuZXJzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGxpc3RlbmVyCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChsaXN0ZW5lciwgZXZlbnQpID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuX2VsZW1lbnRSZWYubmF0aXZlRWxlbWVudC5hZGRFdmVudExpc3RlbmVyKGV2ZW50LCBsaXN0ZW5lciwgcGFzc2l2ZUxpc3RlbmVyT3B0aW9ucyk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogRGlzYWJsZXMgdGhlIG5h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AgICAgKi8KICAgICAgICAgICAgdGhpcy5fdmlzaWJpbGl0eSA9ICdpbml0aWFsJzsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFdoZXRoZXIgaW50ZXJhY3Rpb25zIG9uIHRoZSBwYWdlIHNob3VsZCBjbG9zZSB0aGUgdG9vbHRpcAogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fY2xvc2VPbkludGVyYWN0aW9uID0gZmFsc2U7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBTdWJqZWN0IGZvciBub3RpZnlpbmcgdGhhdCB0aGUgdG9vbHRpcCBoYXMgYmVlbiBoaWRkZW4gZnJvbSB0aGUgdmlldwogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fb25IaWRlID0gbmV3IFN1YmplY3QoKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFN0cmVhbSB0aGF0IGVtaXRzIHdoZXRoZXIgdGhlIHVzZXIgaGFzIGEgaGFuZHNldC1zaXplZCBkaXNwbGF5LgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5faXNIYW5kc2V0ID0gdGhpcy5fYnJlYWtwb2ludE9ic2VydmVyLm9ic2VydmUoQnJlYWtwb2ludHMuSGFuZHNldCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNob3dzIHRoZSB0b29sdGlwIHdpdGggYW4gYW5pbWF0aW9uIG9yaWdpbmF0aW5nIGZyb20gdGhlIHByb3ZpZGVkIG9yaWdpbgogICAgICAgICAqIEBwYXJhbSB7P30gZGVsYXkgQW1vdW50IG9mIG1pbGxpc2Vjb25kcyB0byB0aGUgZGVsYXkgc2hvd2luZyB0aGUgdG9vbHRpcC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNob3coZGVsYXkpIHsKICAgICAgICAgICAgLy8gQ2FuY2VsIHRoZSBkZWxheWVkIGhpZGUgaWYgaXQgaXMgc2NoZWR1bGVkCiAgICAgICAgICAgIGlmICh0aGlzLl9oaWRlVGltZW91dElkKSB7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQodGhpcy5faGlkZVRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICB0aGlzLl9oaWRlVGltZW91dElkID0gbnVsbDsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBCb2R5IGludGVyYWN0aW9ucyBzaG91bGQgY2FuY2VsIHRoZSB0b29sdGlwIGlmIHRoZXJlIGlzIGEgZGVsYXkgaW4gc2hvd2luZy4KICAgICAgICAgICAgdGhpcy5fY2xvc2VPbkludGVyYWN0aW9uID0gdHJ1ZTsKICAgICAgICAgICAgdGhpcy5fc2hvd1RpbWVvdXRJZCA9IHNldFRpbWVvdXQoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgdGhpcy5fdmlzaWJpbGl0eSA9ICd2aXNpYmxlJzsKICAgICAgICAgICAgICAgIHRoaXMuX3Nob3dUaW1lb3V0SWQgPSBudWxsOwogICAgICAgICAgICAgICAgLy8gTWFyayBmb3IgY2hlY2sgc28gaWYgYW55IHBhcmVudCBjb21wb25lbnQgaGFzIHNldCB0aGUKICAgICAgICAgICAgICAgIC8vIENoYW5nZURldGVjdGlvblN0cmF0ZWd5IHRvIE9uUHVzaCBpdCB3aWxsIGJlIGNoZWNrZWQgYW55d2F5cwogICAgICAgICAgICAgICAgdGhpcy5fbWFya0ZvckNoZWNrKCk7CiAgICAgICAgICAgIH0pLCBkZWxheSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEJlZ2lucyB0aGUgYW5pbWF0aW9uIHRvIGhpZGUgdGhlIHRvb2x0aXAgYWZ0ZXIgdGhlIHByb3ZpZGVkIGRlbGF5IGluIG1zLgogICAgICAgICAqIEBwYXJhbSB7P30gZGVsYXkgQW1vdW50IG9mIG1pbGxpc2Vjb25kcyB0byBkZWxheSBzaG93aW5nIHRoZSB0b29sdGlwLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgaGlkZShkZWxheSkgewogICAgICAgICAgICAvLyBDYW5jZWwgdGhlIGRlbGF5ZWQgc2hvdyBpZiBpdCBpcyBzY2hlZHVsZWQKICAgICAgICAgICAgaWYgKHRoaXMuX3Nob3dUaW1lb3V0SWQpIHsKICAgICAgICAgICAgICAgIGNsZWFyVGltZW91dCh0aGlzLl9zaG93VGltZW91dElkKTsKICAgICAgICAgICAgICAgIHRoaXMuX3Nob3dUaW1lb3V0SWQgPSBudWxsOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2hpZGVUaW1lb3V0SWQgPSBzZXRUaW1lb3V0KCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuX3Zpc2liaWxpdHkgPSAnaGlkZGVuJzsKICAgICAgICAgICAgICAgIHRoaXMuX2hpZGVUaW1lb3V0SWQgPSBudWxsOwogICAgICAgICAgICAgICAgLy8gTWFyayBmb3IgY2hlY2sgc28gaWYgYW55IHBhcmVudCBjb21wb25lbnQgaGFzIHNldCB0aGUKICAgICAgICAgICAgICAgIC8vIENoYW5nZURldGVjdGlvblN0cmF0ZWd5IHRvIE9uUHVzaCBpdCB3aWxsIGJlIGNoZWNrZWQgYW55d2F5cwogICAgICAgICAgICAgICAgdGhpcy5fbWFya0ZvckNoZWNrKCk7CiAgICAgICAgICAgIH0pLCBkZWxheSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgYW4gb2JzZXJ2YWJsZSB0aGF0IG5vdGlmaWVzIHdoZW4gdGhlIHRvb2x0aXAgaGFzIGJlZW4gaGlkZGVuIGZyb20gdmlldy4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGFmdGVySGlkZGVuKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fb25IaWRlLmFzT2JzZXJ2YWJsZSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGV0aGVyIHRoZSB0b29sdGlwIGlzIGJlaW5nIGRpc3BsYXllZC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGlzVmlzaWJsZSgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3Zpc2liaWxpdHkgPT09ICd2aXNpYmxlJzsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uRGVzdHJveSgpIHsKICAgICAgICAgICAgdGhpcy5fb25IaWRlLmNvbXBsZXRlKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2FuaW1hdGlvblN0YXJ0KCkgewogICAgICAgICAgICB0aGlzLl9jbG9zZU9uSW50ZXJhY3Rpb24gPSBmYWxzZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBldmVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2FuaW1hdGlvbkRvbmUoZXZlbnQpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB0b1N0YXRlID0gKC8qKiBAdHlwZSB7P30gKi8gKGV2ZW50LnRvU3RhdGUpKTsKICAgICAgICAgICAgaWYgKHRvU3RhdGUgPT09ICdoaWRkZW4nICYmICF0aGlzLmlzVmlzaWJsZSgpKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9vbkhpZGUubmV4dCgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0b1N0YXRlID09PSAndmlzaWJsZScgfHwgdG9TdGF0ZSA9PT0gJ2hpZGRlbicpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2Nsb3NlT25JbnRlcmFjdGlvbiA9IHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogSW50ZXJhY3Rpb25zIG9uIHRoZSBIVE1MIGJvZHkgc2hvdWxkIGNsb3NlIHRoZSB0b29sdGlwIGltbWVkaWF0ZWx5IGFzIGRlZmluZWQgaW4gdGhlCiAgICAgICAgICogbWF0ZXJpYWwgZGVzaWduIHNwZWMuCiAgICAgICAgICogaHR0cHM6Ly9tYXRlcmlhbC5pby9kZXNpZ24vY29tcG9uZW50cy90b29sdGlwcy5odG1sI2JlaGF2aW9yCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfaGFuZGxlQm9keUludGVyYWN0aW9uKCkgewogICAgICAgICAgICBpZiAodGhpcy5fY2xvc2VPbkludGVyYWN0aW9uKSB7CiAgICAgICAgICAgICAgICB0aGlzLmhpZGUoMCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogTWFya3MgdGhhdCB0aGUgdG9vbHRpcCBuZWVkcyB0byBiZSBjaGVja2VkIGluIHRoZSBuZXh0IGNoYW5nZSBkZXRlY3Rpb24gcnVuLgogICAgICAgICAqIE1haW5seSB1c2VkIGZvciByZW5kZXJpbmcgdGhlIGluaXRpYWwgdGV4dCBiZWZvcmUgcG9zaXRpb25pbmcgYSB0b29sdGlwLCB3aGljaAogICAgICAgICAqIGNhbiBiZSBwcm9ibGVtYXRpYyBpbiBjb21wb25lbnRzIHdpdGggT25QdXNoIGNoYW5nZSBkZXRlY3Rpb24uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfbWFya0ZvckNoZWNrKCkgewogICAgICAgICAgICB0aGlzLl9jaGFuZ2VEZXRlY3RvclJlZi5tYXJrRm9yQ2hlY2soKTsKICAgICAgICB9CiAgICB9CiAgICBUb29sd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ioKICAgICAgICAgICAgICogQSBsYWJlbCBmb3IgdGhlIGJ1dHRvbiB0aGF0IGRlY3JlbWVudHMgdGhlIGN1cnJlbnQgcGFnZS4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMucHJldmlvdXNQYWdlTGFiZWwgPSAnUHJldmlvdXMgcGFnZSc7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBBIGxhYmVsIGZvciB0aGUgYnV0dG9uIHRoYXQgbW92ZXMgdG8gdGhlIGZpcnN0IHBhZ2UuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmZpcnN0UGFnZUxhYmVsID0gJ0ZpcnN0IHBhZ2UnOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQSBsYWJlbCBmb3IgdGhlIGJ1dHRvbiB0aGF0IG1vdmVzIHRvIHRoZSBsYXN0IHBhZ2UuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmxhc3RQYWdlTGFiZWwgPSAnTGFzdCBwYWdlJzsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEEgbGFiZWwgZm9yIHRoZSByYW5nZSBvZiBpdGVtcyB3aXRoaW4gdGhlIGN1cnJlbnQgcGFnZSBhbmQgdGhlIGxlbmd0aCBvZiB0aGUgd2hvbGUgbGlzdC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuZ2V0UmFuZ2VMYWJlbCA9ICgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBwYWdlCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcGFnZVNpemUKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBsZW5ndGgKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChwYWdlLCBwYWdlU2l6ZSwgbGVuZ3RoKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAobGVuZ3RoID09IDAgfHwgcGFnZVNpemUgPT0gMCkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBgMCBvZiAke2xlbmd0aH1gOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgbGVuZ3RoID0gTWF0aC5tYXgobGVuZ3RoLCAwKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHN0YXJ0SW5kZXggPSBwYWdlICogcGFnZVNpemU7CiAgICAgICAgICAgICAgICAvLyBJZiB0aGUgc3RhcnQgaW5kZXggZXhjZWVkcyB0aGUgbGlzdCBsZW5ndGgsIGRvIG5vdCB0cnkgYW5kIGZpeCB0aGUgZW5kIGluZGV4IHRvIHRoZSBlbmQuCiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBlbmRJbmRleCA9IHN0YXJ0SW5kZXggPCBsZW5ndGggPwogICAgICAgICAgICAgICAgICAgIE1hdGgubWluKHN0YXJ0SW5kZXggKyBwYWdlU2l6ZSwgbGVuZ3RoKSA6CiAgICAgICAgICAgICAgICAgICAgc3RhcnRJbmRleCArIHBhZ2VTaXplOwogICAgICAgICAgICAgICAgcmV0dXJuIGAke3N0YXJ0SW5kZXggKyAxfSDigJMgJHtlbmRJbmRleH0gb2YgJHtsZW5ndGh9YDsKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgfQogICAgTWF0UGFnaW5hdG9ySW50bC7JtWZhYyA9IGZ1bmN0aW9uIE1hdFBhZ2luYXRvckludGxfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgTWF0UGFnaW5hdG9ySW50bCkoKTsgfTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLyBNYXRQYWdpbmF0b3JJbnRsLsm1cHJvdiA9IMm1ybVkZWZpbmVJbmplY3RhYmxlKHsgZmFjdG9yeTogZnVuY3Rpb24gTWF0UGFnaW5hdG9ySW50bF9GYWN0b3J5KCkgeyByZXR1cm4gbmV3IE1hdFBhZ2luYXRvckludGw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IHNpemUsIHdoYXQgaXRlbXMgYXJlIGJlaW5nIHNob3duLCBhbmQKICAgICAqIG5hdmlnYXRpb25hbCBidXR0b24gdG8gZ28gdG8gdGhlIHByZXZpb3VzIG9yIG5leHQgcGFnZS4KICAgICAqLwogICAgY2xhc3MgTWF0UGFnaW5hdG9yIGV4dGVuZHMgX01hdFBhZ2luYXRvckJhc2UgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gX2ludGwKICAgICAgICAgKiBAcGFyYW0gez99IF9jaGFuZ2VEZXRlY3RvclJlZgogICAgICAgICAqIEBwYXJhbSB7Pz19IGRlZmF1bHRzCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoX2ludGwsIF9jaGFuZ2VEZXRlY3RvclJlZiwgZGVmYXVsdHMpIHsKICAgICAgICAgICAgc3VwZXIoKTsKICAgICAgICAgICAgdGhpcy5faW50bCA9IF9pbnRsOwogICAgICAgICAgICB0aGlzLl9jaGFuZ2VEZXRlY3RvclJlZiA9IF9jaGFuZ2VEZXRlY3RvclJlZjsKICAgICAgICAgICAgdGhpcy5fcGFnZUluZGV4ID0gMDsKICAgICAgICAgICAgdGhpcy5fbGVuZ3RoID0gMDsKICAgICAgICAgICAgdGhpcy5fcGFnZVNpemVPcHRpb25zID0gW107CiAgICAgICAgICAgIHRoaXMuX2hpZGVQYWdlU2l6ZSA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLl9zaG93Rmlyc3RMYXN0QnV0dG9ucyA9IGZhbHNlOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRXZlbnQgZW1pdHRlZCB3aGVuIHRoZSBwYWdpbmF0b3IgY2hhbmdlcyB0aGUgcGFnZSBzaXplIG9yIHBhZ2UgaW5kZXguCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLnBhZ2UgPSBuZXcgRXZlbnRFbWl0dGVyKCk7CiAgICAgICAgICAgIHRoaXMuX2ludGxDaGFuZ2VzID0gX2ludGwuY2hhbmdlcy5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gdGhpcy5fY2hhbmdlRGV0ZWN0b3JSZWYubWFya0ZvckNoZWNrKCkpKTsKICAgICAgICAgICAgaWYgKGRlZmF1bHRzKSB7CiAgICAgICAgICAgICAgICBjb25zdCB7IHBhZ2VTaXplLCBwYWdlU2l6ZU9wdGlvbnMsIGhpZGVQYWdlU2l6ZSwgc2hvd0ZpcnN0TGFzdEJ1dHRvbnMgfSA9IGRlZmF1bHRzOwogICAgICAgICAgICAgICAgaWYgKHBhZ2VTaXplICE9IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9wYWdlU2l6ZSA9IHBhZ2VTaXplOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKHBhZ2VTaXplT3B0aW9ucyAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fcGFnZVNpemVPcHRpb25zID0gcGFnZVNpemVPcHRpb25zOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKGhpZGVQYWdlU2l6ZSAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5faGlkZVBhZ2VTaXplID0gaGlkZVBhZ2VTaXplOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKHNob3dGaXJzdExhc3RCdXR0b25zICE9IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9zaG93Rmlyc3RMYXN0QnV0dG9ucyA9IHNob3dGaXJzdExhc3RCdXR0b25zOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFRoZSB6ZXJvLWJhc2VkIHBhZ2UgaW5kZXggb2YgdGhlIGRpc3BsYXllZCBsaXN0IG9mIGl0ZW1zLiBEZWZhdWx0ZWQgdG8gMC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBwYWdlSW5kZXgoKSB7IHJldHVybiB0aGlzLl9wYWdlSW5kZXg7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgcGFnZUluZGV4KHZhbHVlKSB7CiAgICAgICAgICAgIHRoaXMuX3BhZ2VJbmRleCA9IE1hdGgubWF4KGNvZXJjZU51bWJlclByb3BlcnR5KHZhbHVlKSwgMCk7CiAgICAgICAgICAgIHRoaXMuX2NoYW5nZURldGVjdG9yUmVmLm1hcmtGb3JDaGVjaygpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBUaGUgbGVuZ3RoIG9mIHRoZSB0b3RhbCBudW1iZXIgb2YgaXRlbXMgdGhhdCBhcmUgYmVpbmcgcGFnaW5hdGVkLiBEZWZhdWx0ZWQgdG8gMC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBsZW5ndGgoKSB7IHJldHVybiB0aGlzLl9sZW5ndGg7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgbGVuZ3RoKHZhbHVlKSB7CiAgICAgICAgICAgIHRoaXMuX2xlbmd0aCA9IGNvZXJjZU51bWJlclByb3BlcnR5KHZhbHVlKTsKICAgICAgICAgICAgdGhpcy5fY2hhbmdlRGV0ZWN0b3JSZWYubWFya0ZvckNoZWNrKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIE51bWJlciBvZiBpdGVtcyB0byBkaXNwbGF5IG9uIGEgcGFnZS4gQnkgZGVmYXVsdCBzZXQgdG8gNTAuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgcGFnZVNpemUoKSB7IHJldHVybiB0aGlzLl9wYWdlU2l6ZTsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBwYWdlU2l6ZSh2YWx1ZSkgewogICAgICAgICAgICB0aGlzLl9wYWdlU2l6ZSA9IE1hdGgubWF4KGNvZXJjZU51bWJlclByb3BlcnR5KHZhbHVlKSwgMCk7CiAgICAgICAgICAgIHRoaXMuX3VwZGF0ZURpc3BsYXllZFBhZ2VTaXplT3B0aW9ucygpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBUaGUgc2V0IG9mIHByb3ZpZGVkIHBhZ2Ugc2l6ZSBvcHRpb25zIHRvIGRpc3BsYXkgdG8gdGhlIHVzZXIuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgcGFnZVNpemVPcHRpb25zKCkgeyByZXR1cm4gdGhpcy5fcGFnZVNpemVPcHRpb25zOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IHBhZ2VTaXplT3B0aW9ucyh2YWx1ZSkgewogICAgICAgICAgICB0aGlzLl9wYWdlU2l6ZU9wdGlvbnMgPSAodmFsdWUgfHwgW10pLm1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgcCA9PiBjb2VyY2VOdW1iZXJQcm9wZXJ0eShwKSkpOwogICAgICAgICAgICB0aGlzLl91cGRhdGVEaXNwbGF5ZWRQYWdlU2l6ZU9wdGlvbnMoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogV2hldGhlciB0byBoaWRlIHRoZSBwYWdlIHNpemUgc2VsZWN0aW9uIFVJIGZyb20gdGhlIHVzZXIuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgaGlkZVBhZ2VTaXplKCkgeyByZXR1cm4gdGhpcy5faGlkZVBhZ2VTaXplOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IGhpZGVQYWdlU2l6ZSh2YWx1ZSkgewogICAgICAgICAgICB0aGlzLl9oaWRlUGFnZVNpemUgPSBjb2VyY2VCb29sZWFuUHJvcGVydHkodmFsdWUpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGV0aGVyIHRvIHNob3cgdGhlIGZpcnN0L2xhc3QgYnV0dG9ucyBVSSB0byB0aGUgdXNlci4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBzaG93Rmlyc3RMYXN0QnV0dG9ucygpIHsgcmV0dXJuIHRoaXMuX3Nob3dGaXJzdExhc3RCdXR0b25zOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IHNob3dGaXJzdExhc3RCdXR0b25zKHZhbHVlKSB7CiAgICAgICAgICAgIHRoaXMuX3Nob3dGaXJzdExhc3RCdXR0b25zID0gY29lcmNlQm9vbGVhblByb3BlcnR5KHZhbHVlKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uSW5pdCgpIHsKICAgICAgICAgICAgdGhpcy5faW5pdGlhbGl6ZWQgPSB0cnVlOwogICAgICAgICAgICB0aGlzLl91cGRhdGVEaXNwbGF5ZWRQYWdlU2l6ZU9wdGlvbnMoKTsKICAgICAgICAgICAgdGhpcy5fbWFya0luaXRpYWxpemVkKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkRlc3Ryb3koKSB7CiAgICAgICAgICAgIHRoaXMuX2ludGxDaGFuZ2VzLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEFkdmFuY2VzIHRvIHRoZSBuZXh0IHBhZ2UgaWYgaXQgZXhpc3RzLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmV4dFBhZ2UoKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5oYXNOZXh0UGFnZSgpKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwcmV2aW91c1BhZ2VJbmRleCA9IHRoaXMucGFnZUluZGV4OwogICAgICAgICAgICB0aGlzLnBhZ2VJbmRleCsrOwogICAgICAgICAgICB0aGlzLl9lbWl0UGFnZUV2ZW50KHByZXZpb3VzUGFnZUluZGV4KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogTW92ZSBiYWNrIHRvIHRoZSBwcmV2aW91cyBwYWdlIGlmIGl0IGV4aXN0cy4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHByZXZpb3VzUGFnZSgpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLmhhc1ByZXZpb3VzUGFnZSgpKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwcmV2aW91c1BhZ2VJbmRleCA9IHRoaXMucGFnZUluZGV4OwogICAgICAgICAgICB0aGlzLnBhZ2VJbmRleC0tOwogICAgICAgICAgICB0aGlzLl9lbWl0UGFnZUV2ZW50KHByZXZpb3VzUGFnZUluZGV4KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogTW92ZSB0byB0aGUgZmlyc3QgcGFnZSBpZiBub3QgYWxyZWFkeSB0aGVyZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZpcnN0UGFnZSgpIHsKICAgICAgICAgICAgLy8gaGFzUHJldmlvdXNQYWdlIGJlaW5nIGZhbHNlIGltcGxpZXMgYXQgdGhlIHN0YXJ0CiAgICAgICAgICAgIGlmICghdGhpcy5oYXNQcmV2aW91c1BhZ2UoKSkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcHJldmlvdXNQYWdlSW5kZXggPSB0aGlzLnBhZ2VJbmRleDsKICAgICAgICAgICAgdGhpcy5wYWdlSW5kZXggPSAwOwogICAgICAgICAgICB0aGlzLl9lbWl0UGFnZUV2ZW50KHByZXZpb3VzUGFnZUluZGV4KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogTW92ZSB0byB0aGUgbGFzdCBwYWdlIGlmIG5vdCBhbHJlYWR5IHRoZXJlLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbGFzdFBhZ2UoKSB7CiAgICAgICAgICAgIC8vIGhhc05leHRQYWdlIGJlaW5nIGZhbHNlIGltcGxpZXMgYXQgdGhlIGVuZAogICAgICAgICAgICBpZiAoIXRoaXMuaGFzTmV4dFBhZ2UoKSkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcHJldmlvdXNQYWdlSW5kZXggPSB0aGlzLnBhZ2VJbmRleDsKICAgICAgICAgICAgdGhpcy5wYWdlSW5kZXggPSB0aGlzLmdldE51bWJlck9mUGFnZXMoKSAtIDE7CiAgICAgICAgICAgIHRoaXMuX2VtaXRQYWdlRXZlbnQocHJldmlvdXNQYWdlSW5kZXgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGV0aGVyIHRoZXJlIGlzIGEgcHJldmlvdXMgcGFnZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGhhc1ByZXZpb3VzUGFnZSgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMucGFnZUluZGV4ID49IDEgJiYgdGhpcy5wYWdlU2l6ZSAhPSAwOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGV0aGVyIHRoZXJlIGlzIGEgbmV4dCBwYWdlLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgaGFzTmV4dFBhZ2UoKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbWF4UGFnZUluZGV4ID0gdGhpcy5nZXROdW1iZXJPZlBhZ2VzKCkgLSAxOwogICAgICAgICAgICByZXR1cm4gdGhpcy5wYWdlSW5kZXggPCBtYXhQYWdlSW5kZXggJiYgdGhpcy5wYWdlU2l6ZSAhPSAwOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDYWxjdWxhdGUgdGhlIG51bWJlciBvZiBwYWdlcwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0TnVtYmVyT2ZQYWdlcygpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLnBhZ2VTaXplKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gMDsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gTWF0aC5jZWlsKHRoaXMubGVuZ3RoIC8gdGhpcy5wYWdlU2l6ZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENoYW5nZXMgdGhlIHBhZ2Ugc2l6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ZWRQYWdlU2l6ZU9wdGlvbnMoKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5faW5pdGlhbGl6ZWQpIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBJZiBubyBwYWdlIHNpemUgaXMgcHJvdmlkZWQsIHVzZSB0aGUgZmlyc3QgcGFnZSBzaXplIG9wdGlvbiBvciB0aGUgZGVmYXVsdCBwYWdlIHNpemUuCiAgICAgICAgICAgIGlmICghdGhpcy5wYWdlU2l6ZSkgewogICAgICAgICAgICAgICAgdGhpcy5fcGFnZVNpemUgPSB0aGlzLnBhZ2VTaXplT3B0aW9ucy5sZW5ndGggIT0gMCA/CiAgICAgICAgICAgICAgICAgICAgdGhpcy5wYWdlU2l6ZU9wdGlvbnNbMF0gOgogICAgICAgICAgICAgICAgICAgIERFRkFVTFRfUEFHRV9TSVpFOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2Rpc3BsYXllZFBhZ2VTaXplT3B0aW9ucyA9IHRoaXMucGFnZVNpemVPcHRpb25zLnNsaWNlKCk7CiAgICAgICAgICAgIGlmICh0aGlzLl9kaXNwbGF5ZWRQYWdlU2l6ZU9wdGlvbnMuaW5kZXhPZih0aGlzLnBhZ2VTaXplKSA9PT0gLTEpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2Rpc3BsYXllZFBhZ2VTaXplT3B0aW9ucy5wdXNoKHRoaXMucGFnZVNpemUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIFNvcnQgdGhlIG51bWJlcnMgdXNpbmcgYSBudW1iZXItc3BlY2lmaWMgc29ydCBmdW5jdGlvbi4KICAgICAgICAgICAgdGhpcy5fZGlzcGxheWVkUGFnZVNpemVPcHRpb25zLnNvcnQoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGEKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBiCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgIC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vbmVudC4KICAgICAqLwogICAgY2xhc3MgTWF0UHJvZ3Jlc3NTcGlubmVyIGV4dGVuZHMgX01hdFByb2dyZXNzU3Bpbm5lck1peGluQmFzZSB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBfZWxlbWVudFJlZgogICAgICAgICAqIEBwYXJhbSB7P30gcGxhdGZvcm0KICAgICAgICAgKiBAcGFyYW0gez99IF9kb2N1bWVudAogICAgICAgICAqIEBwYXJhbSB7P30gYW5pbWF0aW9uTW9kZQogICAgICAgICAqIEBwYXJhbSB7Pz19IGRlZmF1bHRzCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoX2VsZW1lbnRSZWYsIHBsYXRmb3JtLCBfZG9jdW1lbnQsIGFuaW1hdGlvbk1vZGUsIGRlZmF1bHRzKSB7CiAgICAgICAgICAgIHN1cGVyKF9lbGVtZW50UmVmKTsKICAgICAgICAgICAgdGhpcy5fZWxlbWVudFJlZiA9IF9lbGVtZW50UmVmOwogICAgICAgICAgICB0aGlzLl9kb2N1bWVudCA9IF9kb2N1bWVudDsKICAgICAgICAgICAgdGhpcy5fZGlhbWV0ZXIgPSBCQVNFX1NJWkU7CiAgICAgICAgICAgIHRoaXMuX3ZhbHVlID0gMDsKICAgICAgICAgICAgdGhpcy5fZmFsbGJhY2tBbmltYXRpb24gPSBmYWxzZTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIE1vZGUgb2YgdGhlIHByb2dyZXNzIGNpcmNsZQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5tb2RlID0gJ2RldGVybWluYXRlJzsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB0cmFja2VkRGlhbWV0ZXJzID0gTWF0UHJvZ3Jlc3NTcGlubmVyLl9kaWFtZXRlcnM7CiAgICAgICAgICAgIC8vIFRoZSBiYXNlIHNpemUgaXMgYWxyZWFkeSBpbnNlcnRlZCB2aWEgdGhlIGNvbXBvbmVudCdzIHN0cnVjdHVyYWwgc3R5bGVzLiBXZSBzdGlsbAogICAgICAgICAgICAvLyBuZWVkIHRvIHRyYWNrIGl0IHNvIHdlIGRvbid0IGVuZCB1cCBhZGRpbmcgdGhlIHNhbWUgc3R5bGVzIGFnYWluLgogICAgICAgICAgICBpZiAoIXRyYWNrZWREaWFtZXRlcnMuaGFzKF9kb2N1bWVudC5oZWFkKSkgewogICAgICAgICAgICAgICAgdHJhY2tlZERpYW1ldGVycy5zZXQoX2RvY3VtZW50LmhlYWQsIG5ldyBTZXQoW0JBU0VfU0laRV0pKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9mYWxsYmFja0FuaW1hdGlvbiA9IHBsYXRmb3JtLkVER0UgfHwgcGxhdGZvcm0uVFJJREVOVDsKICAgICAgICAgICAgdGhpcy5fbm9vcEFuaW1hdGlvbnMgPSBhbmltYXRpb25Nb2RlID09PSAnTm9vcEFuaW1hdGlvbnMnICYmCiAgICAgICAgICAgICAgICAoISFkZWZhdWx0cyAmJiAhZGVmYXVsdHMuX2ZvcmNlQW5pbWF0aW9ucyk7CiAgICAgICAgICAgIGlmIChkZWZhdWx0cykgewogICAgICAgICAgICAgICAgaWYgKGRlZmF1bHRzLmRpYW1ldGVyKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5kaWFtZXRlciA9IGRlZmF1bHRzLmRpYW1ldGVyOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKGRlZmF1bHRzLnN0cm9rZVdpZHRoKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5zdHJva2VXaWR0aCA9IGRlZmF1bHRzLnN0cm9rZVdpZHRoOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBkaWFtZXRlciBvZiB0aGUgcHJvZ3Jlc3Mgc3Bpbm5lciAod2lsbCBzZXQgd2lkdGggYW5kIGhlaWdodCBvZiBzdmcpLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGRpYW1ldGVyKCkgeyByZXR1cm4gdGhpcy5fZGlhbWV0ZXI7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHNpemUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBkaWFtZXRlcihzaXplKSB7CiAgICAgICAgICAgIHRoaXMuX2RpYW1ldGVyID0gY29lcmNlTnVtYmVyUHJvcGVydHkoc2l6ZSk7CiAgICAgICAgICAgIC8vIElmIHRoaXMgaXMgc2V0IGJlZm9yZSBgbmdPbkluaXRgLCB0aGUgc3R5bGUgcm9vdCBtYXkgbm90IGhhdmUgYmVlbiByZXNvbHZlZCB5ZXQuCiAgICAgICAgICAgIGlmICghdGhpcy5fZmFsbGJhY2tBbmltYXRpb24gJiYgdGhpcy5fc3R5bGVSb290KSB7CiAgICAgICAgICAgICAgICB0aGlzLl9hdHRhY2hTdHlsZU5vZGUoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTdHJva2Ugd2lkdGggb2YgdGhlIHByb2dyZXNzIHNwaW5uZXIuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgc3Ryb2tlV2lkdGgoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9zdHJva2VXaWR0aCB8fCB0aGlzLmRpYW1ldGVyIC8gMTA7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBzdHJva2VXaWR0aCh2YWx1ZSkgewogICAgICAgICAgICB0aGlzLl9zdHJva2VXaWR0aCA9IGNvZXJjZU51bWJlclByb3BlcnR5KHZhbHVlKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVmFsdWUgb2YgdGhlIHByb2dyZXNzIGNpcmNsZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCB2YWx1ZSgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMubW9kZSA9PT0gJ2RldGVybWluYXRlJyA/IHRoaXMuX3ZhbHVlIDogMDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBuZXdWYWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IHZhbHVlKG5ld1ZhbHVlKSB7CiAgICAgICAgICAgIHRoaXMuX3ZhbHVlID0gTWF0aC5tYXgoMCwgTWF0aC5taW4oMTAwLCBjb2VyY2VOdW1iZXJQcm9wZXJ0eShuZXdWYWx1ZSkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uSW5pdCgpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBlbGVtZW50ID0gdGhpcy5fZWxlbWVudFJlZi5uYXRpdmVFbGVtZW50OwogICAgICAgICAgICAvLyBOb3RlIHRoYXQgd2UgbmVlZCB0byBsb29rIHVwIHRoZSByb290IG5vZGUgaW4gbmdPbkluaXQsIHJhdGhlciB0aGFuIHRoZSBjb25zdHJ1Y3RvciwgYmVjYXVzZQogICAgICAgICAgICAvLyBBbmd1bGFyIHNlZW1zIHRvIGNyZWF0ZSB0aGUgZWxlbWVudCBvdXRzaWRlIHRoZSBzaGFkb3cgcm9vdCBhbmQgdGhlbiBtb3ZlcyBpdCBpbnNpZGUsIGlmIHRoZQogICAgICAgICAgICAvLyBub2RlIGlzIGluc2lkZSBhbiBgbmdJZmAgYW5kIGEgU2hhZG93RG9tLWVuY2Fwc3VsYXRlZCBjb21wb25lbnQuCiAgICAgICAgICAgIHRoaX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b3ggPSB0aGlzLl9jaXJjbGVSYWRpdXMgKiAyICsgdGhpcy5zdHJva2VXaWR0aDsKICAgICAgICAgICAgcmV0dXJuIGAwIDAgJHt2aWV3Qm94fSAke3ZpZXdCb3h9YDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIHN0cm9rZSBjaXJjdW1mZXJlbmNlIG9mIHRoZSBzdmcgY2lyY2xlLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IF9zdHJva2VDaXJjdW1mZXJlbmNlKCkgewogICAgICAgICAgICByZXR1cm4gMiAqIE1hdGguUEkgKiB0aGlzLl9jaXJjbGVSYWRpdXM7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBkYXNoIG9mZnNldCBvZiB0aGUgc3ZnIGNpcmNsZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBfc3Ryb2tlRGFzaE9mZnNldCgpIHsKICAgICAgICAgICAgaWYgKHRoaXMubW9kZSA9PT0gJ2RldGVybWluYXRlJykgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3N0cm9rZUNpcmN1bWZlcmVuY2UgKiAoMTAwIC0gdGhpcy5fdmFsdWUpIC8gMTAwOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIEluIGZhbGxiYWNrIG1vZGUgc2V0IHRoZSBjaXJjbGUgdG8gODAlIGFuZCByb3RhdGUgaXQgd2l0aCBDU1MuCiAgICAgICAgICAgIGlmICh0aGlzLl9mYWxsYmFja0FuaW1hdGlvbiAmJiB0aGlzLm1vZGUgPT09ICdpbmRldGVybWluYXRlJykgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3N0cm9rZUNpcmN1bWZlcmVuY2UgKiAwLjI7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFN0cm9rZSB3aWR0aCBvZiB0aGUgY2lyY2xlIGluIHBlcmNlbnQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgX2NpcmNsZVN0cm9rZVdpZHRoKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5zdHJva2VXaWR0aCAvIHRoaXMuZGlhbWV0ZXIgKiAxMDA7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIER5bmFtaWNhbGx5IGdlbmVyYXRlcyBhIHN0eWxlIHRhZyBjb250YWluaW5nIHRoZSBjb3JyZWN0IGFuaW1hdGlvbiBmb3IgdGhpcyBkaWFtZXRlci4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2F0dGFjaFN0eWxlTm9kZSgpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBzdHlsZVJvb3QgPSB0aGlzLl9zdHlsZVJvb3Q7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgY3VycmVudERpYW1ldGVyID0gdGhpcy5fZGlhbWV0ZXI7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZGlhbWV0ZXJzID0gTWF0UHJvZ3Jlc3NTcGlubmVyLl9kaWFtZXRlcnM7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGRpYW1ldGVyc0ZvckVsZW1lbnQgPSBkaWFtZXRlcnMuZ2V0KHN0eWxlUm9vdCk7CiAgICAgICAgICAgIGlmICghZGlhbWV0ZXJzRm9yRWxlbWVudCB8fCAhZGlhbWV0ZXJzRm9yRWxlbWVudC5oYXMoY3VycmVudERpYW1ldGVyKSkgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3Qgc3R5bGVUYWcgPSB0aGlzLl9kb2N1bWVudC5jcmVhdGVFbGVtZW50KCdzdHlsZScpOwogICAgICAgICAgICAgICAgc3R5bGVUYWcuc2V0QXR0cmlidXRlKCdtYXQtc3Bpbm5lci1hbmltYXRpb24nLCBjdXJyZW50RGlhbWV0ZXIgKyAnJyk7CiAgICAgICAgICAgICAgICBzdHlsZVRhZy50ZXh0Q29udGVudCA9IHRoaXMuX2dldEFuaW1hdGlvblRleHQoKTsKICAgICAgICAgICAgICAgIHN0eWxlUm9vdC5hcHBlbmRDaGlsZChzdHlsZVRhZyk7CiAgICAgICAgICAgICAgICBpZiAoIWRpYW1ldGVyc0ZvckVsZW1lbnQpIHsKICAgICAgICAgICAgICAgICAgICBkaWFtZXRlcnNGb3JFbGVtZW50ID0gbmV3IFNldCgpOwogICAgICAgICAgICAgICAgICAgIGRpYW1ldGVycy5zZXQoc3R5bGVSb290LCBkaWFtZXRlcnNGb3JFbGVtZW50KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGRpYW1ldGVyc0ZvckVsZW1lbnQuYWRkKGN1cnJlbnREaWFtZXRlcik7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogR2VuZXJhdGVzIGFuaW1hdGlvbiBzdHlsZXMgYWRqdXN0ZWQgZm9yIHRoZSBzcGlubmVyJ3MgZGlhbWV0ZXIuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9nZXRBbmltYXRpb25UZXh0KCkgewogICAgICAgICAgICByZXR1cm4gSU5ERVRFUk1JTkFURV9BTklNQVRJT05fVEVNUExBVEUKICAgICAgICAgICAgICAgIC8vIEFuaW1hdGlvbiBzaG91bGQgYmVnaW4gYXQgNSUgYW5kIGVuZCBhdCA4MCUKICAgICAgICAgICAgICAgIC5yZXBsYWNlKC9TVEFSVF9WQUxVRS9nLCBgJHswLjk1IC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gTWF0U29ydEhlYWRlciBtdXN0IGJlIHByb3ZpZGVkIHdpdGggYSB1bmlxdWUgaWQuYCk7CiAgICB9CiAgICAvKioKICAgICAqIFxAZG9jcy1wcml2YXRlCiAgICAgKiBAcGFyYW0gez99IGRpcmVjdGlvbgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0U29ydEludmFsaWREaXJlY3Rpb25FcnJvcihkaXJlY3Rpb24pIHsKICAgICAgICByZXR1cm4gRXJyb3IoYCR7ZGlyZWN0aW9ufSBpcyBub3QgYSB2YWxpZCBzb3J0IGRpcmVjdGlvbiAoJ2FzYycgb3IgJ2Rlc2MnKS5gKTsKICAgIH0KICAgIC8vIEJvaWxlcnBsYXRlIGZvciBhcHBseWluZyBtaXhpbnMgdG8gTWF0U29ydC4KICAgIC8qKgogICAgICogXEBkb2NzLXByaXZhdGUKICAgICAqLwogICAgY2xhc3MgTWF0U29ydEJhc2UgewogICAgfQogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgX01hdFNvcnRNaXhpbkJhc2UgPSBtaXhpbkluaXRpYWxpemVkKG1peGluRGlzYWJsZWQoTWF0U29ydEJhc2UpKTsKICAgIC8qKgogICAgICogQ29udGFpbmVyIGZvciBNYXRTb3J0YWJsZXMgdG8gbWFuYWdlIHRoZSBzb3J0IHN0YXRlIGFuZCBwcm92aWRlIGRlZmF1bHQgc29ydCBwYXJhbWV0ZXJzLgogICAgICovCiAgICBjbGFzcyBNYXRTb3J0IGV4dGVuZHMgX01hdFNvcnRNaXhpbkJhc2UgewogICAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgICAgICBzdXBlciguLi5hcmd1bWVudHMpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQ29sbGVjdGlvbiBvZiBhbGwgcmVnaXN0ZXJlZCBzb3J0YWJsZXMgdGhhdCB0aGlzIGRpcmVjdGl2ZSBtYW5hZ2VzLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5zb3J0YWJsZXMgPSBuZXcgTWFwKCk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBVc2VkIHRvIG5vdGlmeSBhbnkgY2hpbGQgY29tcG9uZW50cyBsaXN0ZW5pbmcgdG8gc3RhdGUgY2hhbmdlcy4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX3N0YXRlQ2hhbmdlcyA9IG5ldyBTdWJqZWN0KCk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBUaGUgZGlyZWN0aW9uIHRvIHNldCB3aGVuIGFuIE1hdFNvcnRhYmxlIGlzIGluaXRpYWxseSBzb3J0ZWQuCiAgICAgICAgICAgICAqIE1heSBiZSBvdmVycmlkZW4gYnkgdGhlIE1hdFNvcnRhYmxlJ3Mgc29ydCBzdGFydC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuc3RhcnQgPSAnYXNjJzsKICAgICAgICAgICAgdGhpcy5fZGlyZWN0aW9uID0gJyc7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBFdmVudCBlbWl0dGVkIHdoZW4gdGhlIHVzZXIgY2hhbmdlcyBlaXRoZXIgdGhlIGFjdGl2ZSBzb3J0IG9yIHNvcnQgZGlyZWN0aW9uLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5zb3J0Q2hhbmdlID0gbmV3IEV2ZW50RW1pdHRlcigpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBUaGUgc29ydCBkaXJlY3Rpb24gb2YgdGhlIGN1cnJlbnRseSBhY3RpdmUgTWF0U29ydGFibGUuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgZGlyZWN0aW9uKCkgeyByZXR1cm4gdGhpcy5fZGlyZWN0aW9uOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBkaXJlY3Rpb24KICAgICAgICAgKiBAcmV0dXJuIH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CiAgICAgICAgICogQHBhcmFtIHs/fSBzb3J0YWJsZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVnaXN0ZXIoc29ydGFibGUpIHsKICAgICAgICAgICAgaWYgKCFzb3J0YWJsZS5pZCkgewogICAgICAgICAgICAgICAgdGhyb3cgZ2V0U29ydEhlYWRlck1pc3NpbmdJZEVycm9yKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHRoaXMuc29ydGFibGVzLmhhcyhzb3J0YWJsZS5pZCkpIHsKICAgICAgICAgICAgICAgIHRocm93IGdldFNvcnREdXBsaWNhdGVTb3J0YWJsZUlkRXJyb3Ioc29ydGFibGUuaWQpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuc29ydGFibGVzLnNldChzb3J0YWJsZS5pZCwgc29ydGFibGUpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBVbnJlZ2lzdGVyIGZ1bmN0aW9uIHRvIGJlIHVzZWQgYnkgdGhlIGNvbnRhaW5lZCBNYXRTb3J0YWJsZXMuIFJlbW92ZXMgdGhlIE1hdFNvcnRhYmxlIGZyb20gdGhlCiAgICAgICAgICogY29sbGVjdGlvbiBvZiBjb250YWluZWQgTWF0U29ydGFibGVzLgogICAgICAgICAqIEBwYXJhbSB7P30gc29ydGFibGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGRlcmVnaXN0ZXIoc29ydGFibGUpIHsKICAgICAgICAgICAgdGhpcy5zb3J0YWJsZXMuZGVsZXRlKHNvcnRhYmxlLmlkKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU2V0cyB0aGUgYWN0aXZlIHNvcnQgaWQgYW5kIGRldGVybWluZXMgdGhlIG5ldyBzb3J0IGRpcmVjdGlvbi4KICAgICAgICAgKiBAcGFyYW0gez99IHNvcnRhYmxlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzb3J0KHNvcnRhYmxlKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmFjdGl2ZSAhPSBzb3J0YWJsZS5pZCkgewogICAgICAgICAgICAgICAgdGhpcy5hY3RpdmUgPSBzb3J0YWJsZS5pZDsKICAgICAgICAgICAgICAgIHRoaXMuZGlyZWN0aW9uID0gc29ydGFibGUuc3RhcnQgPyBzb3J0YWJsZS5zdGFydCA6IHRoaXMuc3RhcnQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLmRpcmVjdGlvbiA9IHRoaXMuZ2V0TmV4dFNvcnREaXJlY3Rpb24oc29ydGFibGUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuc29ydENoYW5nZS5lbWl0KHsgYWN0aXZlOiB0aGlzLmFjdGl2ZSwgZGlyZWN0aW9uOiB0aGlzLmRpcmVjdGlvbiB9KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0dXJucyB0aGUgbmV4dCBzb3J0IGRpcmVjdGlvbiBvZiB0aGUgYWN0aXZlIHNvcnRhYmxlLCBjaGVja2luZyBmb3IgcG90ZW50aWFsIG92ZXJyaWRlcy4KICAgICAgICAgKiBAcGFyYW0gez99IHNvcnRhYmxlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXROZXh0U29ydERpcmVjdGlvbihzb3J0YWJsZSkgewogICAgICAgICAgICBpZiAoIXNvcnRhYmxlKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gJyc7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gR2V0IHRoZSBzb3J0IGRpcmVjdGlvbiBjeWNsZSB3aXRoIHRoZSBwb3RlbnRpYWwgc29ydGFibGUgb3ZlcnJpZGVzLgogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGRpc2FibGVDbGVhciA9IHNvcnRhYmxlLmRpc2FibGVDbGVhciAhPSBudWxsID8gc29ydGFibGUuZGlzYWJsZUNsZWFyIDogdGhpcy5kaXNhYmxlQ2xlYXI7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHNvcnREaXJlY3Rpb25DeWNsZSA9IGdldFNvcnREaXJlY3Rpb25DeWNsZShzb3J0YWJsZS5zdGFydCB8fCB0aGlzLnN0YXJ0LCBkaXNhYmxlQ2xlYXIpOwogICAgICAgICAgICAvLyBHZXQgYW5kIHJldHVybiB0aGUgbmV4dCBkaXJlY3Rpb24gaW4gdGhlIGN5Y2xlCiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IG5leHREaXJlY3Rpb25JbmRleCA9IHNvcnREaXJlY3Rpb25DeWNsZS5pbmRleE9mKHRoaXMuZGlyZWN0aW9uKSArIDE7CiAgICAgICAgICAgIGlmIChuZXh0RGlyZWN0aW9uSW5kZXggPj0gc29ydERpcmVjdGlvbkN5Y2xlLmxlbmd0aCkgewogICAgICAgICAgICAgICAgbmV4dERpcmVjdGlvbkluZGV4ID0gMDsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gc29ydERpcmVjdGlvbkN5Y2xlW25leHREaXJlY3Rpb25JbmRleF07CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkluaXQoKSB7CiAgICAgICAgICAgIHRoaXMuX21hcmtJbml0aWFsaXplZCgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25DaGFuZ2VzKCkgewogICAgICAgICAgICB0aGlzLl9zdGF0ZUNoYW5nZXMubmV4dCgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25EZXN0cm95KCkgewogICA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vZiBNYXRTb3J0SGVhZGVySW50bCBhbmQKICAgICAqIGluY2x1ZGUgaXQgaW4gYSBjdXN0b20gcHJvdmlkZXIuCiAgICAgKi8KICAgIGNsYXNzIE1hdFNvcnRIZWFkZXJJbnRsIHsKICAgICAgICBjb25zdHJ1Y3RvcigpIHsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFN0cmVhbSB0aGF0IGVtaXRzIHdoZW5ldmVyIHRoZSBsYWJlbHMgaGVyZSBhcmUgY2hhbmdlZC4gVXNlIHRoaXMgdG8gbm90aWZ5CiAgICAgICAgICAgICAqIGNvbXBvbmVudHMgaWYgdGhlIGxhYmVscyBoYXZlIGNoYW5nZWQgYWZ0ZXIgaW5pdGlhbGl6YXRpb24uCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmNoYW5nZXMgPSBuZXcgU3ViamVjdCgpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQVJJQSBsYWJlbCBmb3IgdGhlIHNvcnRpbmcgYnV0dG9uLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5zb3J0QnV0dG9uTGFiZWwgPSAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gaWQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChpZCkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIGBDaGFuZ2Ugc29ydGluZyBmb3IgJHtpZH1gOwogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICB9CiAgICBNYXRTb3J0SGVhZGVySW50bC7JtWZhYyA9IGZ1bmN0aW9uIE1hdFNvcnRIZWFkZXJJbnRsX0ZhY3RvcnkodCkgeyByZXR1cm4gbmV3ICh0IHx8IE1hdFNvcnRIZWFkZXJJbnRsKSgpOyB9OwogICAgLyoqIEBub2NvbGxhcHNlICovIE1hdFNvcnRIZWFkZXJJbnRsLsm1cHJvdiA9IMm1ybVkZWZpbmVJbmplY3RhYm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UmVmOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRmxhZyBzZXQgdG8gdHJ1ZSB3aGVuIHRoZSBpbmRpY2F0b3Igc2hvdWxkIGJlIGRpc3BsYXllZCB3aGlsZSB0aGUgc29ydCBpcyBub3QgYWN0aXZlLiBVc2VkIHRvCiAgICAgICAgICAgICAqIHByb3ZpZGUgYW4gYWZmb3JkYW5jZSB0aGF0IHRoZSBoZWFkZXIgaXMgc29ydGFibGUgYnkgc2hvd2luZyBvbiBmb2N1cyBhbmQgaG92ZXIuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9zaG93SW5kaWNhdG9ySGludCA9IGZhbHNlOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogVGhlIGRpcmVjdGlvbiB0aGUgYXJyb3cgc2hvdWxkIGJlIGZhY2luZyBhY2NvcmRpbmcgdG8gdGhlIGN1cnJlbnQgc3RhdGUuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9hcnJvd0RpcmVjdGlvbiA9ICcnOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogV2hldGhlciB0aGUgdmlldyBzdGF0ZSBhbmltYXRpb24gc2hvdWxkIHNob3cgdGhlIHRyYW5zaXRpb24gYmV0d2VlbiB0aGUgYGZyb21gIGFuZCBgdG9gIHN0YXRlcy4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX2Rpc2FibGVWaWV3U3RhdGVBbmltYXRpb24gPSBmYWxzZTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFNldHMgdGhlIHBvc2l0aW9uIG9mIHRoZSBhcnJvdyB0aGF0IGRpc3BsYXlzIHdoZW4gc29ydGVkLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5hcnJvd1Bvc2l0aW9uID0gJ2FmdGVyJzsKICAgICAgICAgICAgaWYgKCFfc29ydCkgewogICAgICAgICAgICAgICAgdGhyb3cgZ2V0U29ydEhlYWRlck5vdENvbnRhaW5lZFdpdGhpblNvcnRFcnJvcigpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX3JlcmVuZGVyU3Vic2NyaXB0aW9uID0gbWVyZ2UoX3NvcnQuc29ydENoYW5nZSwgX3NvcnQuX3N0YXRlQ2hhbmdlcywgX2ludGwuY2hhbmdlcykKICAgICAgICAgICAgICAgIC5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgaWYgKHRoaXMuX2lzU29ydGVkKCkpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl91cGRhdGVBcnJvd0RpcmVjdGlvbigpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLy8gSWYgdGhpcyBoZWFkZXIgd2FzIHJlY2VudGx5IGFjdGl2ZSBhbmQgbm93IG5vIGxvbmdlciBzb3J0ZWQsIGFuaW1hdGUgYXdheSB0aGUgYXJyb3cuCiAgICAgICAgICAgICAgICBpZiAoIXRoaXMuX2lzU29ydGVkKCkgJiYgdGhpcy5fdmlld1N0YXRlICYmIHRoaXMuX3ZpZXdTdGF0ZS50b1N0YXRlID09PSAnYWN0aXZlJykgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX2Rpc2FibGVWaWV3U3RhdGVBbmltYXRpb24gPSBmYWxzZTsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9zZXRBbmltYXRpb25UcmFuc2l0aW9uU3RhdGUoeyBmcm9tU3RhdGU6ICdhY3RpdmUnLCB0b1N0YXRlOiB0aGlzLl9hcnJvd0RpcmVjdGlvbiB9KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGNoYW5nZURldGVjdG9yUmVmLm1hcmtGb3JDaGVjaygpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIGlmIChfZm9jdXNNb25pdG9yICYmIF9lbGVtZW50UmVmKSB7CiAgICAgICAgICAgICAgICAvLyBXZSB1c2UgdGhlIGZvY3VzIG1vbml0b3IgYmVjYXVzZSB3ZSBhbHNvIHdhbnQgdG8gc3R5bGUKICAgICAgICAgICAgICAgIC8vIHRoaW5ncyBkaWZmZXJlbnRseSBiYXNlZCBvbiB0aGUgZm9jdXMgb3JpZ2luLgogICAgICAgICAgICAgICAgX2ZvY3VzTW9uaXRvci5tb25pdG9yKF9lbGVtZW50UmVmLCB0cnVlKQogICAgICAgICAgICAgICAgICAgIC5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBvcmlnaW4KICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIG9yaWdpbiA9PiB0aGlzLl9zZXRJbmRpY2F0b3JIaW50VmlzaWJsZSghIW9yaWdpbikpKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBPdmVycmlkZXMgdGhlIGRpc2FibGUgY2xlYXIgdmFsdWUgb2YgdGhlIGNvbnRhaW5pbmcgTWF0U29ydCBmb3IgdGhpcyBNYXRTb3J0YWJsZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBkaXNhYmxlQ2xlYXIoKSB7IHJldHVybiB0aGlzLl9kaXNhYmxlQ2xlYXI7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHYKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBkaXNhYmxlQ2xlYXIodikgeyB0aGlzLl9kaXNhYmxlQ2xlYXIgPSBjb2VyY2VCb29sZWFuUHJvcGVydHkodik7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25Jbml0KCkgewogICAgICAgICAgICBpZiAoIXRoaXMuaWQgJiYgdGhpcy5fY29sdW1u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hdCB0aGUgYXJyb3cgd2lsbCBiZSBzZW1pLXRyYW5zcGFyZW50bHkgZGlzcGxheWVkIGFzIGEgaGludCB0byB0aGUKICAgICAgICAgKiB1c2VyIHNob3dpbmcgd2hhdCB0aGUgYWN0aXZlIHNvcnQgd2lsbCBiZWNvbWUuIElmIHNldCB0byBmYWxzZSwgdGhlIGFycm93IHdpbGwgZmFkZSBhd2F5LgogICAgICAgICAqIEBwYXJhbSB7P30gdmlzaWJsZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3NldEluZGljYXRvckhpbnRWaXNpYmxlKHZpc2libGUpIHsKICAgICAgICAgICAgLy8gTm8tb3AgaWYgdGhlIHNvcnQgaGVhZGVyIGlzIGRpc2FibGVkIC0gc2hvdWxkIG5vdCBtYWtlIHRoZSBoaW50IHZpc2libGUuCiAgICAgICAgICAgIGlmICh0aGlzLl9pc0Rpc2FibGVkKCkgJiYgdmlzaWJsZSkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX3Nob3dJbmRpY2F0b3JIaW50ID0gdmlzaWJsZTsKICAgICAgICAgICAgaWYgKCF0aGlzLl9pc1NvcnRlZCgpKSB7CiAgICAgICAgICAgICAgICB0aGlzLl91cGRhdGVBcnJvd0RpcmVjdGlvbigpOwogICAgICAgICAgICAgICAgaWYgKHRoaXMuX3Nob3dJbmRpY2F0b3JIaW50KSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fc2V0QW5pbWF0aW9uVHJhbnNpdGlvblN0YXRlKHsgZnJvbVN0YXRlOiB0aGlzLl9hcnJvd0RpcmVjdGlvbiwgdG9TdGF0ZTogJ2hpbnQnIH0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fc2V0QW5pbWF0aW9uVHJhbnNpdGlvblN0YXRlKHsgZnJvbVN0YXRlOiAnaGludC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ycm93RGlyZWN0aW9uIH07CiAgICAgICAgICAgIHRoaXMuX3NldEFuaW1hdGlvblRyYW5zaXRpb25TdGF0ZSh2aWV3U3RhdGUpOwogICAgICAgICAgICB0aGlzLl9zaG93SW5kaWNhdG9ySGludCA9IGZhbHNlOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGV0aGVyIHRoaXMgTWF0U29ydEhlYWRlciBpcyBjdXJyZW50bHkgc29ydGVkIGluIGVpdGhlciBhc2NlbmRpbmcgb3IgZGVzY2VuZGluZyBvcmRlci4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9pc1NvcnRlZCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3NvcnQuYWN0aXZlID09IHRoaXMuaWQgJiYKICAgICAgICAgICAgICAgICh0aGlzLl9zb3J0LmRpcmVjdGlvbiA9PT0gJ2FzYycgfHwgdGhpcy5fc29ydC5kaXJlY3Rpb24gPT09ICdkZXNjJyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgdGhlIGFuaW1hdGlvbiBzdGF0ZSBmb3IgdGhlIGFycm93IGRpcmVjdGlvbiAoaW5kaWNhdG9yIGFuZCBwb2ludGVycykuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZ2V0QXJyb3dEaXJlY3Rpb25TdGF0ZSgpIHsKICAgICAgICAgICAgcmV0dXJuIGAke3RoaXMuX2lzU29ydGVkKCkgPyAnYWN0aXZlLScgOiAnJ30ke3RoaXMuX2Fycm93RGlyZWN0aW9ufWA7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgdGhlIGFycm93IHBvc2l0aW9uIHN0YXRlIChvcGFjaXR5LCB0cmFuc2xhdGlvbikuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZ2V0QXJyb3dWaWV3U3RhdGUoKSB7CiAgICA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gICAgICAvKioKICAgICAgICAgICAgICAgICAqIFdoZXRoZXIgdGhlIHN0aWNreSBpbnB1dCBoYXMgY2hhbmdlZCBzaW5jZSBpdCB3YXMgbGFzdCBjaGVja2VkLgogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICB0aGlzLl9oYXNTdGlja3lDaGFuZ2VkID0gZmFsc2U7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFdoZXRoZXIgc3RpY2t5IHBvc2l0aW9uaW5nIHNob3VsZCBiZSBhcHBsaWVkLgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZ2V0IHN0aWNreSgpIHsgcmV0dXJuIHRoaXMuX3N0aWNreTsgfQogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSB2CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBzZXQgc3RpY2t5KHYpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHByZXZWYWx1ZSA9IHRoaXMuX3N0aWNreTsKICAgICAgICAgICAgICAgIHRoaXMuX3N0aWNreSA9IGNvZXJjZUJvb2xlYW5Qcm9wZXJ0eSh2KTsKICAgICAgICAgICAgICAgIHRoaXMuX2hhc1N0aWNreUNoYW5nZWQgPSBwcmV2VmFsdWUgIT09IHRoaXMuX3N0aWNreTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogV2hldGhlciB0aGUgc3RpY2t5IHZhbHVlIGhhcyBjaGFuZ2VkIHNpbmNlIHRoaXMgd2FzIGxhc3QgY2FsbGVkLgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgaGFzU3RpY2t5Q2hhbmdlZCgpIHsKICAgICAgICAgICAgICAgIC8qKi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FzZSB7CiAgICB9CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBfQ2RrQ29sdW1uRGVmQmFzZSA9IG1peGluSGFzU3RpY2t5SW5wdXQoQ2RrQ29sdW1uRGVmQmFzZSk7CiAgICAvKioKICAgICAqIENvbHVtbiBkZWZpbml0aW9uIGZvciB0aGUgQ0RLIHRhYmxlLgogICAgICogRGVmaW5lcyBhIHNldCBvZiBjZWxscyBhdmFpbGFibGUgZm9yIGEgdGFibGUgY29sdW1uLgogICAgICovCiAgICBjbGFzcyBDZGtDb2x1bW5EZWYgZXh0ZW5kcyBfQ2RrQ29sdW1uRGVmQmFzZSB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/PX0gX3RhYmxlCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoX3RhYmxlKSB7CiAgICAgICAgICAgIHN1cGVyKCk7CiAgICAgICAgICAgIHRoaXMuX3RhYmxlID0gX3RhYmxlOwogICAgICAgICAgICB0aGlzLl9zdGlja3lFbmQgPSBmYWxzZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVW5pcXVlIG5hbWUgZm9yIHRoaXMgY29sdW1uLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IG5hbWUoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9uYW1lOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IG5hbWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBuYW1lKG5hbWUpIHsKICAgICAgICAgICAgLy8gSWYgdGhlIGRpcmVjdGl2ZSBpcyBzZXQgd2l0aG91dCBhIG5hbWUgKHVwZGF0ZWQgcHJvZ3JhbWF0aWNhbGx5KSwgdGhlbiB0aGlzIHNldHRlciB3aWxsCiAgICAgICAgICAgIC8vIHRyaWdnZXIgd2l0aCBhbiBlbXB0eSBzdHJpbmcgYW5kIHNob3VsZCBub3Qgb3ZlcndyaXRlIHRoZSBwcm9ncmFtYXRpY2FsbHkgc2V0IHZhbHVlLgogICAgICAgICAgICBpZiAobmFtZSkgewogICAgICAgICAgICAgICAgdGhpcy5fbmFtZSA9IG5hbWU7CiAgICAgICAgICAgICAgICB0aGlzLmNzc0NsYXNzRnJpZW5kbHlOYW1lID0gbmFtZS5yZXBsYWNlKC9bXmEtejAtOV8tXS9pZywgJy0nKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGV0aGVyIHRoaXMgY29sdW1uIHNob3VsZCBiZSBzdGlja3kgcG9zaXRpb25lZCBvbiB0aGUgZW5kIG9mIHRoZSByb3cuIFNob3VsZCBtYWtlIHN1cmUKICAgICAgICAgKiB0aGF0IGl0IG1pbWljcyB0aGUgYENhblN0aWNrYCBtaXhpbiBzdWNoIHRoYXQgYF9oYXNTdGlja3lDaGFuZ2VkYCBpcyBzZXQgdG8gdHJ1ZSBpZiB0aGUgdmFsdWUKICAgICAgICAgKiBoYXMgYmVlbiBjaGFuZ2VkLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHN0aWNreUVuZCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3N0aWNreUVuZDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgc3RpY2t5RW5kKHYpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwcmV2VmFsdWUgPSB0aGlzLl9zdGlja3lFbmQ7CiAgICAgICAgICAgIHRoaXMuX3N0aWNreUVuZCA9IGNvZXJjZUJvb2xlYW5Qcm9wZXJ0eSh2KTsKICAgICAgICAgICAgdGhpcy5faGFzU3RpY2t5Q2hhbmdlZCA9IHByZXZWY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uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXRDb2x1bW5zRGlmZigpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2NvbHVtbnNEaWZmZXIuZGlmZih0aGlzLmNvbHVtbnMpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIHRoaXMgcm93IGRlZidzIHJlbGV2YW50IGNlbGwgdGVtcGxhdGUgZnJvbSB0aGUgcHJvdmlkZWQgY29sdW1uIGRlZi4KICAgICAgICAgKiBAcGFyYW0gez99IGNvbHVtbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZXh0cmFjdENlbGxUZW1wbGF0ZShjb2x1bW4pIHsKICAgICAgICAgICAgaWYgKHRoaXMgaW5zdGFuY2VvZiBDZGtIZWFkZXJSb3dEZWYpIHsKICAgICAgICAgICAgICAgIHJldHVybiBjb2x1bW4uaGVhZGVyQ2VsbC50ZW1wbGF0ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcyBpbnN0YW5jZW9mIENka0Zvb3RlclJvd0RlZikgewogICAgICAgICAgICAgICAgcmV0dXJuIGNvbHVtbi5mb290ZXJDZWxsLnRlbXBsYXRlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIGNvbHVtbi5jZWxsLnRlbXBsYXRlOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQogICAgQmFzZVJvd0RlZi7JtWZhYyA9IGZ1bmN0aW9uIEJhc2VSb3dEZWZfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgQmFzZVJvd0RlZikoybXJtWRpcmVjdGl2ZUluamVjdChUZW1wbGF0ZVJlZiksIMm1ybVkaXJlY3RpdmVJbmplY3QoSXRlcmFibGVEaWZmZXJzKSk7IH07CiAgICBCYXNlUm93RGVmLsm1ZGlyID0gybXJtWRlZmluZURpcmVjdGl2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Abm9jb2xsYXBzZSAqLwogICAgQ2RrUm93RGVmLmN0b3JQYXJhbWV0ZXJzID0gKCkgPT4gWwogICAgICAgIHsgdHlwZTogVGVtcGxhdGVSZWYgfSwKICAgICAgICB7IHR5cGU6IEl0ZXJhYmxlRGlmZmVycyB9LAogICAgICAgIHsgdHlwZTogdW5kZWZpbmVkLCBkZWNvcmF0b3JzOiBbeyB0eXBlOiBJbmplY3QsIGFyZ3M6IFtDREtfVEFCTEUsXSB9LCB7IHR5cGU6IE9wdGlvbmFsIH1dIH0KICAgIF07CiAgICAvKioKICAgICAqIE91dGxldCBmb3IgcmVuZGVyaW5nIGNlbGxzIGluc2lkZSBvZiBhIHJvdyBvciBoZWFkZXIgcm93LgogICAgICogXEBkb2NzLXByaXZhdGUKICAgICAqLwogICAgY2xhc3MgQ2RrQ2VsbE91dGxldCB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBfdmlld0NvbnRhaW5lcgogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKF92aWV3Q29udGFpbmVyKSB7CiAgICAgICAgICAgIHRoaXMuX3ZpZXdDb250YWluZXIgPSBfdmlld0NvbnRhaW5lcjsKICAgICAgICAgICAgQ2RrQ2VsbE91dGxldC5tb3N0UmVjZW50Q2VsbE91dGxldCA9IHRoaXM7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkRlc3Ryb3koKSB7CiAgICAgICAgICAgIC8vIElmIHRoaXMgd2FzIHRoZSBsYXN0IG91dGxldCBiZWluZyByZW5kZXJlZCBpbiB0aGUgdmlldywgcmVtb3ZlIHRoZSByZWZlcmVuY2UKICAgICAgICAgICAgLy8gZnJvbSB0aGUgc3RhdGljIHByb3BlcnR5IGFmdGVyIGl0IGhhcyBiZWVuIGRlc3Ryb3llZCB0byBhdm9pZCBsZWFraW5nIG1lbW9yeS4KICAgICAgICAgICAgaWYgKENka0N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24gdGhlIHJvd3MuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBjbGVhclN0aWNreVBvc2l0aW9uaW5nKHJvd3MsIHN0aWNreURpcmVjdGlvbnMpIHsKICAgICAgICAgICAgZm9yIChjb25zdCByb3cgb2Ygcm93cykgewogICAgICAgICAgICAgICAgLy8gSWYgdGhlIHJvdyBpc24ndCBhbiBlbGVtZW50IChlLmcuIGlmIGl0J3MgYW4gYG5nLWNvbnRhaW5lcmApLAogICAgICAgICAgICAgICAgLy8gaXQgd29uJ3QgaGF2ZSBpbmxpbmUgc3R5bGVzIG9yIGBjaGlsZHJlbmAgc28gd2Ugc2tpcCBpdC4KICAgICAgICAgICAgICAgIGlmIChyb3cubm9kZVR5cGUgIT09IHJvdy5FTEVNRU5UX05PREUpIHsKICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuX3JlbW92ZVN0aWNreVN0eWxlKHJvdywgc3RpY2t5RGlyZWN0aW9ucyk7CiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHJvdy5jaGlsZHJlbi5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBjZWxsID0gKC8qKiBAdHlwZSB7P30gKi8gKHJvdy5jaGlsZHJlbltpXSkpOwogICAgICAgICAgICAgICAgICAgIHRoaXMuX3JlbW92ZVN0aWNreVN0eWxlKGNlbGwsIHN0aWNreURpcmVjdGlvbnMpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEFwcGxpZXMgc3RpY2t5IGxlZnQgYW5kIHJpZ2h0IHBvc2l0aW9ucyB0byB0aGUgY2VsbHMgb2YgZWFjaCByb3cgYWNjb3JkaW5nIHRvIHRoZSBzdGlja3kKICAgICAg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kpIHx8IHN0aWNreUVuZFN0YXRlcy5zb21lKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBzdGF0ZQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgc3RhdGUgPT4gc3RhdGUpKTsKICAgICAgICAgICAgaWYgKCFyb3dzLmxlbmd0aCB8fCAhaGFzU3RpY2t5Q29sdW1ucyB8fCAhdGhpcy5faXNCcm93c2VyKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBmaXJzdFJvdyA9IHJvd3NbMF07CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbnVtQ2VsbHMgPSBmaXJzdFJvdy5jaGlsZHJlbi5sZW5ndGg7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgY2VsbFdpZHRocyA9IHRoaXMuX2dldENlbGxXaWR0aHMoZmlyc3RSb3cpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHN0YXJ0UG9zaXRpb25zID0gdGhpcy5fZ2V0U3RpY2t5U3RhcnRDb2x1bW5Qb3NpdGlvbnMoY2VsbFdpZHRocywgc3RpY2t5U3RhcnRTdGF0ZXMpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGVuZFBvc2l0aW9ucyA9IHRoaXMuX2dldFN0aWNreUVuZENvbHVtblBvc2l0aW9ucyhjZWxsV2lkdGhzLCBzdGlja3lFbmRTdGF0ZXMpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGlzUnRsID0gdGhpcy5kaXJlY3Rpb24gPT09ICdydGwnOwogICAgICAgICAgICBmb3IgKGNvbnN0IHJvdyBvZiByb3dzKSB7CiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IG51bUNlbGxzOyBpKyspIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgY2VsbCA9ICgvKiogQHR5cGUgez99ICovIChyb3cuY2hpbGRyZW5baV0pKTsKICAgICAgICAgICAgICAgICAgICBpZiAoc3RpY2t5U3RhcnRTdGF0ZXNbaV0pIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fYWRkU3RpY2t5U3R5bGUoY2VsbCwgaXNSdGwgPyAncmlnaHQnIDogJ2xlZnQnLCBzdGFydFBvc2l0aW9uc1tpXSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGlmIChzdGlja3lFbmRTdGF0ZXNbaV0pIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fYWRkU3RpY2t5U3R5bGUoY2VsbCwgaXNSdGwgPyAnbGVmdCcgOiAncmlnaHQnLCBlbmRQb3NpdGlvbnNbaV0pOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBcHBsaWVzIHN0aWNreSBwb3NpdGlvbmluZyB0byB0aGUgcm93J3MgY2VsbHMgaWYgdXNpbmcgdGhlIG5hdGl2ZSB0YWJsZSBsYXlvdXQsIGFuZCB0byB0aGUKICAgICAgICAgKiByb3cgaXRzZWxmIG90aGVyd2lzZS4KICAgICAgICAgKiBAcGFyYW0gez99IHJvd3NUb1N0aWNrIFRoZSBsaXN0IG9mIHJvd3MgdGhhdCBzaG91bGQgYmUgc3R1Y2sgYWNjb3JkaW5nIHRvIHRoZWlyIGNvcnJlc3BvbmRpbmcKICAgICAgICAgKiAgICAgc3RpY2t5IHN0YXRlIGFuZCB0byB0aGUgcHJvdmlkZWQgdG9wIG9yIGJvdHRvb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A9IHBvc2l0aW9uID09PSAnYm90dG9tJyA/IHJvd3NUb1N0aWNrLnJldmVyc2UoKSA6IHJvd3NUb1N0aWNrOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBzdGlja3lIZWlnaHQgPSAwOwogICAgICAgICAgICBmb3IgKGxldCByb3dJbmRleCA9IDA7IHJvd0luZGV4IDwgcm93cy5sZW5ndGg7IHJvd0luZGV4KyspIHsKICAgICAgICAgICAgICAgIGlmICghc3RpY2t5U3RhdGVzW3Jvd0luZGV4XSkgewogICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3Qgcm93ID0gcm93c1tyb3dJbmRleF07CiAgICAgICAgICAgICAgICBpZiAodGhpcy5faXNOYXRpdmVIdG1sVGFibGUpIHsKICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBqID0gMDsgaiA8IHJvdy5jaGlsZHJlbi5sZW5ndGg7IGorKykgewogICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGNlbGwgPSAoLyoqIEB0eXBlIHs/fSAqLyAocm93LmNoaWxkcmVuW2pdKSk7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2FkZFN0aWNreVN0eWxlKGNlbGwsIHBvc2l0aW9uLCBzdGlja3lIZWlnaHQpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIC8vIEZsZXggZG9lcyBub3QgcmVzcGVjdCB0aGUgc3RpY2sgcG9zaXRpb25pbmcgb24gdGhlIGNlbGxzLCBuZWVkcyB0byBiZSBhcHBsaWVkIHRvIHRoZSByb3cuCiAgICAgICAgICAgICAgICAgICAgLy8gSWYgdGhpcyBpcyBhcHBsaWVkIG9uIGEgbmF0aXZlIHRhYmxlLCBTYWZhcmkgY2F1c2VzIHRoZSBoZWFkZXIgdG8gZmx5IGluIHdyb25nIGRpcmVjdGlvbi4KICAgICAgICAgICAgICAgICAgICB0aGlzLl9hZGRTdGlja3lTdHlsZShyb3csIHBvc2l0aW9uLCBzdGlja3lIZWlnaHQpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKHJvd0luZGV4ID09PSByb3dzLmxlbmd0aCAtIDEpIHsKICAgICAgICAgICAgICAgICAgICAvLyBwcmV2ZW50IHVubmVjZXNzYXJ5IHJlZmxvdyBmcm9tIGdldEJvdW5kaW5nQ2xpZW50UmVjdCgpCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgc3RpY2t5SGVpZ2h0ICs9IHJvdy5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKS5oZWlnaHQ7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogV2hlbiB1c2luZyB0aGUgbmF0aXZlIHRhYmxlIGluIFNhZmFyaSwgc3RpY2t5IGZvb3RlciBjZWxscyBkbyBub3Qgc3RpY2suIFRoZSBvbmx5IHdheSB0byBzdGljawogICAgICAgICAqIGZvb3RlciByb3dzIGlzIHRvIGFwcGx5IHN0aWNreSBzdHlsaW5nIHRvIHRoZSB0Zm9vdCBjb250YWluZXIuIFRoaXMgc2hvdWxkIG9ubHkgYmUgZG9uZSBpZgogICAgICAgICAqIGFsbCBmb290ZXIgcm93cyBhcmUgc3RpY2t5LiBJZiBub3QgYWxsIGZvb3RlciByb3dzIGFyZSBzdGlja3ksIHJlbW92ZSBzdGlja3kgcG9zaXRpb25pbmcgZnJvbQogICAgICAgICAqIHRoZSB0Zm9vdCBlbGVtZW50LgogICAgICAgICAqIEBwYXJhbSB7P30gdGFibGVFbGVtZW50CiAgICAgICAgICogQHBhcmFtIHs/fSBzdGlja3lTdGF0ZXMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHVwZGF0ZVN0aWNreUZvb3RlckNvbnRhaW5lcih0YWJsZUVsZW1lbnQsIHN0aWNreVN0YXRlcykgewogICAgICAgICAgICBpZiAoIXRoaXMuX2lzTmF0aXZlSHRtbFRhYmxlKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB0Zm9vdCA9ICgvKiogQHR5cGUgez99ICovICh0YWJsZUVsZW1lbnQucXVlcnlTZWxlY3RvcigndGZvb3QnKSkpOwogICAgICAgICAgICBpZiAoc3RpY2t5U3RhdGVzLnNvbWUoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHN0YXRlCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBzdGF0ZSA9PiAhc3RhdGUpKSkgewogICAgICAgICAgICAgICAgdGhpcy5fcmVtb3ZlU3RpY2t5U3R5bGUodGZvb3QsIFsnYm90dG9tJ10pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fYWRkU3RpY2t5U3R5bGUodGZvb3QsICdib3R0b20nLCAwKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZW1vdmVzIHRoZSBzdGlja3kgc3R5bGUgb24gdGhlIGVsZW1lbnQgYnkgcmVtb3ZpbmcgdGhlIHN0aWNreSBjZWxsIENTUyBjbGFzcywgcmUtZXZhbHVhdGluZwogICAgICAgICAqIHRoZSB6SW5kZXgsIHJlbW92aW5nIGVhY2ggb2YgdGhlIHByb3ZpZGVkIHN0aWNreSBkaXJlY3Rpb25zLCBhbmQgcmVtb3ZpbmcgdGhlCiAgICAgICAgICogc3RpY2t5IHBvc2l0aW9uIGlmIHRoZXJlIGFyZSBubyBtb3JlIGRpcmVjdGlvbnMuCiAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgICAgICogQHBhcmFtIHs/fSBzdGlja3lEaXJlY3Rpb25zCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfcmVtb3ZlU3RpY2t5U3R5bGUoZWxlbWVudCwgc3RpY2t5RGlyZWN0aW9ucykgewogICAgICAgICAgICBmb3IgKGNvbnN0IGRpciBvZiBzdGlja3lEaXJlY3Rpb25zKSB7CiAgICAgICAgICAgICAgICBlbGVtZW50LnN0eWxlW2Rpcl0gPSAnJzsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbGVtZW50LnN0eWxlLnpJbmRleCA9IHRoaXMuX2dldENhbGN1bGF0ZWRaSW5kZXgoZWxlbWVudCk7CiAgICAgICAgICAgIC8vIElmIHRoZSBlbGVtZW50IG5vIGxvbmdlciBoYXMgYW55IG1vcmUgc3RpY2t5IGRpcmVjdGlvbnMsIHJlbW92ZSBzdGlja3kgcG9zaXRpb25pbmcgYW5kCiAgICAgICAgICAgIC8vIHRoZSBzdGlja3kgQ1NTIGNsYXNzLgogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGhhc0RpcmVjdGlvbiA9IFNUSUNLWV9ESVJFQ1RJT05TLnNvbWUoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGRpcgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZGlyID0+ICEhZWxlbWVudC5zdHlsZVtkaXJdKSk7CiAgICAgICAgICAgIGlmICghaGFzRGlyZWN0aW9uKSB7CiAgICAgICAgICAgICAgICBlbGVtZW50LnN0eWxlLnBvc2l0aW9uID0gJyc7CiAgICAgICAgICAgICAgICBlbGVtZW50LmNsYXNzTGlzdC5yZW1vdmUodGhpcy5fc3RpY2tDZWxsQ3NzKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBZGRzIHRoZSBzdGlja3kgc3R5bGluZyB0byB0aGUgZWxlbWVudCBieSBhZGRpbmcgdGhlIHN0aWNreSBzdHlsZSBjbGFzcywgY2hhbmdpbmcgcG9zaXRpb24KICAgICAgICAgKiB0byBiZSBzdGlja3kgKGFuZCAtd2Via2l0LXN0aWNreSksIHNldHRpbmcgdGhlIGFwcHJvcHJpYXRlIHpJbmRleCwgYW5kIGFkZGluZyBhIHN0aWNreQogICAgICAgICAqIGRpcmVjdGlvbiBhbmQgdmFsdWUuCiAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50CiAgICAgICAgICogQHBhcmFtIHs/fSBkaXIKICAgICAgICAgKiBAcGFyYW0gez99IGRpclZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfYWRkU3RpY2t5U3R5bGUoZWxlbWVudCwgZGlyLCBkaXJWYWx1ZSkgewogICAgICAgICAgICBlbGVtZW50LmNsYXNzTGlzdC5hZGQodGhpcy5fc3RpY2tDZWxsQ3NzKTsKICAgICAgICAgICAgZWxlbWVudC5zdHlsZVtkaXJdID0gYCR7ZGlyVmFsdWV9cHhgOwogICAgICAgICAgICBlbGVtZW50LnN0eWxlLmNzc1RleHQgKz0gJ3Bvc2l0aW9uOiAtd2Via2l0LXN0aWNreTsgcG9zaXRpb246IHN0aWNreTsgJzsKICAgICAgICAgICAgZWxlbWVudC5zdHlsZS56SW5kZXggPSB0aGlzLl9nZXRDYWxjdWxhdGVkWkluZGV4KGVsZW1lbnQpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDYWxjdWxhdGUgd2hhdCB0aGUgei1pbmRleCBzaG91bGQgYmUgZm9yIHRoZSBlbGVtZW50LCBkZXBlbmRpbmcgb24gd2hhdCBkaXJlY3Rpb25zICh0b3AsCiAgICAgICAgICogYm90dG9tLCBsZWZ0LCByaWdodCkgaG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dHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgekluZGV4SW5jcmVtZW50cyA9IHsKICAgICAgICAgICAgICAgIHRvcDogMTAwLAogICAgICAgICAgICAgICAgYm90dG9tOiAxMCwKICAgICAgICAgICAgICAgIGxlZnQ6IDEsCiAgICAgICAgICAgICAgICByaWdodDogMSwKICAgICAgICAgICAgfTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgekluZGV4ID0gMDsKICAgICAgICAgICAgLy8gVXNlIGBJdGVyYWJsZWAgaW5zdGVhZCBvZiBgQXJyYXlgIGJlY2F1c2UgVHlwZVNjcmlwdCwgYXMgb2YgMy42LjMsCiAgICAgICAgICAgIC8vIGxvc2VzIHRoZSBhcnJheSBnZW5lcmljIHR5cGUgaW4gdGhlIGBmb3Igb2ZgLiBCdXQgd2UgKmFsc28qIGhhdmUgdG8gdXNlIGBBcnJheWAgYmVjYXVzZQogICAgICAgICAgICAvLyB0eXBlc2NyaXB0IHdvbid0IGl0ZXJhdGUgb3ZlciBhbiBgSXRlcmFibGVgIHVubGVzcyB5b3UgY29tcGlsZSB3aXRoIGAtLWRvd25sZXZlbEl0ZXJhdGlvbmAKICAgICAgICAgICAgZm9yIChjb25zdCBkaXIgb2YgKC8qKiBAdHlwZSB7P30gKi8gKFNUSUNLWV9ESVJFQ1RJT05TKSkpIHsKICAgICAgICAgICAgICAgIGlmIChlbGVtZW50LnN0eWxlW2Rpcl0pIHsKICAgICAgICAgICAgICAgICAgICB6SW5kZXggKz0gekluZGV4SW5jcmVtZW50c1tkaXJdOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB6SW5kZXggPyBgJHt6SW5kZXh9YCA6ICcnOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIHRoZSB3aWR0aHMgZm9yIGVhY2ggY2VsbCBpbiB0aGUgcHJvdmlkZWQgcm93LgogICAgICAgICAqIEBwYXJhbSB7P30gcm93CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZ2V0Q2VsbFdpZHRocyhyb3cpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjZWxsV2lkdGhzID0gW107CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZmlyc3RSb3dDZWxscyA9IHJvdy5jaGlsZHJlbjsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBmaXJzdFJvd0NlbGxzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBsZXQgY2VsbCA9ICgvKiogQHR5cGUgez99ICovIChmaXJzdFJvd0NlbGxzW2ldKSk7CiAgICAgICAgICAgICAgICBjZWxsV2lkdGhzLnB1c2goY2VsbC5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKS53aWR0aCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIGNlbGxXaWR0aHM7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIERldGVybWluZXMgdGhlIGxlZnQgYW5kIHJpZ2h0IHBvc2l0aW9ucyBvZiBlYWNoIHN0aWNreSBjb2x1bW4gY2VsbCwgd2hpY2ggd2lsbCBiZSB0aGUKICAgICAgICAgKiBhY2N1bXVsYXRpb24gb2YgYWxsIHN0aWNreSBjb2x1bW4gY2VsbCB3aWR0aHMgdG8gdGhlIGxlZnQgYW5kIHJpZ2h0LCByZXNwZWN0aXZlbHkuCiAgICAgICAgICogTm9uLXN0aWNreSBjZWxscyBkbyBub3QgbmVlZCB0byBoYXZlIGEgdmFsdWUgc2V0IHNpbmNlIHRoZWlyIHBvc2l0aW9ucyB3aWxsIG5vdCBiZSBhcHBsaWVkLgogICAgICAgICAqIEBwYXJhbSB7P30gd2lkdGhzCiAgICAgICAgICogQHBhcmFtIHs/fSBzdGlja3lTdGF0ZXMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9nZXRTdGlja3lTdGFydENvbHVtblBvc2l0aW9ucyh3aWR0aHMsIHN0aWNreVN0YXRlcykgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHBvc2l0aW9ucyA9IFtdOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBuZXh0UG9zaXRpb24gPSAwOwogICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHdpZHRocy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgaWYgKHN0aWNreVN0YXRlc1tpXSkgewogICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uc1tpXSA9IG5leHRQb3NpdGlvbjsKICAgICAgICAgICAgICAgICAgICBuZXh0UG9zaXRpb24gKz0gd2lkdGhzW2ldOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBwb3NpdGlvbnM7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIERldGVybWluZXMgdGhlIGxlZnQgYW5kIHJpZ2h0IHBvc2l0aW9ucyBvZiBlYWNoIHN0aWNreSBjb2x1bW4gY2VsbCwgd2hpY2ggd2lsbCBiZSB0aGUKICAgICAgICAgKiBhY2N1bXVsYXRpb24gb2YgYWxsIHN0aWNreSBjb2x1bW4gY2VsbCB3aWR0aHMgdG8gdGhlIGxlZnQgYW5kIHJpZ2h0LCByZXNwZWN0aXZlbHkuCiAgICAgICAgICogTm9uLXN0aWNreSBjZWxscyBkbyBub3QgbmVlZCB0byBoYXZlIGEgdmFsdWUgc2V0IHNpbmNlIHRoZWlyIHBvc2l0aW9ucyB3aWxsIG5vdCBiZSBhcHBsaWVkLgogICAgICAgICAqIEBwYXJhbSB7P30gd2lkdGhzCiAgICAgICAgICogQHBhcmFtIHs/fSBzdGlja3lTdGF0ZXMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9nZXRTdGlja3lFbmRDb2x1bW5Qb3NpdGlvbnMod2lkdGhzLCBzdGlja3lTdGF0ZXMpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwb3NpdGlvbnMgPSBbXTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgbmV4dFBvc2l0aW9uID0gMDsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IHdpZHRocy5sZW5ndGg7IGkgPiAwOyBpLS0pIHsKICAgICAgICAgICAgICAgIGlmIChzdGlja3lTdGF0ZXNbaV0pIHsKICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbnNbaV0gPSBuZXh0UG9zaXRpb247CiAgICAgICAgICAgICAgICAgICAgbmV4dFBvc2l0aW9uICs9IHdpZHRoc1tpXTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gcG9zaXRpb25zOwogICAgICAgIH0KICAgIH0KCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcgYWRkZWQgYnkgdHNpY2tsZQogICAgICogR2VuZXJhdGVkIGZyb206IHNyYy9jZGsvdGFibGUvdGFibGUtZXJyb3JzLnRzCiAgICAgKiBAc3VwcHJlc3Mge2NoZWNrVHlwZXMsY29uc3RhbnRQcm9wZXJ0eSxleHRyYVJlcXVpcmUsbWlzc2luZ092ZXJyaWRlLG1pc3NpbmdSZXR1cm4sdW51c2VkUHJpdmF0ZU1lbWJlcnMsdXNlbGVzc0NvZGV9IGNoZWNrZWQgYnkgdHNjCiAgICAgKi8KICAgIC8qKgogICAgICogQGxpY2Vuc2UKICAgICAqIENvcHlyaWdodCBHb29nbGUgTExDIEFsbCBSaWdodHMgUmVzZXJ2ZWQuCiAgICAgKgogICAgICogVXNlIG9mIHRoaXMgc291c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F0YVJvd091dGxldC5jdG9yUGFyYW1ldGVycyA9ICgpID0+IFsKICAgICAgICB7IHR5cGU6IFZpZXdDb250YWluZXJSZWYgfSwKICAgICAgICB7IHR5cGU6IEVsZW1lbnRSZWYgfQogICAgXTsKICAgIC8qKgogICAgICogUHJvdmlkZXMgYSBoYW5kbGUgZm9yIHRoZSB0YWJsZSB0byBncmFiIHRoZSB2aWV3IGNvbnRhaW5lcidzIG5nLWNvbnRhaW5lciB0byBpbnNlcnQgdGhlIGhlYWRlci4KICAgICAqIFxAZG9jcy1wcml2YXRlCiAgICAgKi8KICAgIGNsYXNzIEhlYWRlclJvd091dGxldCB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2aWV3Q29udGFpbmVyCiAgICAgICAgICogQHBhcmFtIHs/fSBlbGVtZW50UmVmCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3Iodmlld0NvbnRhaW5lciwgZWxlbWVudFJlZikgewogICAgICAgICAgICB0aGlzLnZpZXdDb250YWluZXIgPSB2aWV3Q29udGFpbmVyOwogICAgICAgICAgICB0aGlzLmVsZW1lbnRSZWYgPSBlbGVtZW50UmVmOwogICAgICAgIH0KICAgIH0KICAgIEhlYWRlclJvd091dGxldC7JtWZhYyA9IGZ1bmN0aW9uIEhlYWRlclJvd091dGxldF9GYWN0b3J5KHQpIHsgcmV0dXJuIG5ldyAodCB8fCBIZWFkZXJSb3dPdXRsZXQpKMm1ybVkaXJlY3RpdmVJbmplY3QoVmlld0NvbnRhaW5lclJlZiksIMm1ybVkaXJlY3RpdmVJbmplY3QoRWxlbWVudFJlZikpOyB9OwogICAgSGVhZGVyUm93T3V0bGV0Lsm1ZGlyID0gybXJtWRlZmluZURpcmVjdGl2ZSh7IHR5cGU6IEhlYWRlclJvd091dGxldCwgc2VsZWN0b3JzOiBbWyIiLCAiaGVhZGVyUm93T3V0bGV0IiwgIiJdXSB9KTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLwogICAgSG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JvdW5kIHRoZSBjZGtUYWJsZSB0aGF0IGhhcwogICAgICAgICAgICAgKiBidWlsdC1pbiBoZWFkZXIgcm93cyBhcyAqaXRzKiBjb250ZW50IGNoaWxkLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fY3VzdG9tSGVhZGVyUm93RGVmcyA9IG5ldyBTZXQoKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEZvb3RlciByb3cgZGVmaW5pdGlvbnMgdGhhdCB3ZXJlIGRlZmluZWQgb3V0c2lkZSBvZiB0aGUgZGlyZWN0IGNvbnRlbnQgY2hpbGRyZW4gb2YgdGhlIHRhYmxlLgogICAgICAgICAgICAgKiBUaGVzZSB3aWxsIGJlIGRlZmluZWQgd2hlbiwgZS5nLiwgY3JlYXRpbmcgYSB3cmFwcGVyIGFyb3VuZCB0aGUgY2RrVGFibGUgdGhhdCBoYXMgYQogICAgICAgICAgICAgKiBidWlsdC1pbiBmb290ZXIgcm93IGFzICppdHMqIGNvbnRlbnQgY2hpbGQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9jdXN0b21Gb290ZXJSb3dEZWZzID0gbmV3IFNldCgpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogV2hldGhlciB0aGUgaGVhZGVyIHJvdyBkZWZpbml0aW9uIGhhcyBiZWVuIGNoYW5nZWQuIFRyaWdnZXJzIGFuIHVwZGF0ZSB0byB0aGUgaGVhZGVyIHJvdyBhZnRlcgogICAgICAgICAgICAgKiBjb250ZW50IGlzIGNoZWNrZWQuIEluaXRpYWxpemVkIGFzIHRydWUgc28gdGhhdCB0aGUgdGFibGUgcmVuZGVycyB0aGUgaW5pdGlhbCBzZXQgb2Ygcm93cy4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX2hlYWRlclJvd0RlZkNoYW5nZWQgPSB0cnVlOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogV2hldGhlciB0aGUgZm9vdGVyIHJv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ucyBieSBpZGVudGlmeWluZyBhIHJvdyBiYXNlZCBvbiBpdHMgZGF0YQogICAgICAgICAqIHJlbGF0aXZlIHRvIHRoZSBmdW5jdGlvbiB0byBrbm93IGlmIGEgcm93IHNob3VsZCBiZSBhZGRlZC9yZW1vdmVkL21vdmVkLgogICAgICAgICAqIEFjY2VwdHMgYSBmdW5jdGlvbiB0aGF0IHRha2VzIHR3byBwYXJhbWV0ZXJzLCBgaW5kZXhgIGFuZCBgaXRlbWAuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgdHJhY2tCeSgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3RyYWNrQnlGbjsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IHRyYWNrQnkoZm4pIHsKICAgICAgICAgICAgaWYgKGlzRGV2TW9kZSgpICYmIGZuICE9IG51bGwgJiYgdHlwZW9mIGZuICE9PSAnZnVuY3Rpb24nICYmICgvKiogQHR5cGUgez99ICovIChjb25zb2xlKSkgJiYKICAgICAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovIChjb25zb2xlLndhcm4pKSkgewogICAgICAgICAgICAgICAgY29uc29sZS53YXJuKGB0cmFja0J5IG11c3QgYmUgYSBmdW5jdGlvbiwgYnV0IHJlY2VpdmVkICR7SlNPTi5zdHJpbmdpZnkoZm4pfS5gKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl90cmFja0J5Rm4gPSBmbjsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVGhlIHRhYmxlJ3Mgc291cmNlIG9mIGRhdGEsIHdoaWNoIGNhbiBiZSBwcm92aWRlZCBpbiB0aHJlZSB3YXlzIChpbiBvcmRlciBvZiBjb21wbGV4aXR5KToKICAgICAgICAgKiAgIC0gU2ltcGxlIGRhdGEgYXJy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GVuY2UgdGhlIG51bGwgY2hlY2suCiAgICAgICAgICAgIGlmICh0aGlzLl9yb3dPdXRsZXQgJiYgdGhpcy5fcm93T3V0bGV0LnZpZXdDb250YWluZXIubGVuZ3RoKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9mb3JjZVJlbmRlckRhdGFSb3dzKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uSW5pdCgpIHsKICAgICAgICAgICAgdGhpcy5fc2V0dXBTdGlja3lTdHlsZXIoKTsKICAgICAgICAgICAgaWYgKHRoaXMuX2lzTmF0aXZlSHRtbFRhYmxlKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9hcHBseU5hdGl2ZVRhYmxlU2VjdGlvbnMoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBTZXQgdXAgdGhlIHRyYWNrQnkgZnVuY3Rpb24gc28gdGhhdCBpdCB1c2VzIHRoZSBgUmVuZGVyUm93YCBhcyBpdHMgaWRlbnRpdHkgYnkgZGVmYXVsdC4gSWYKICAgICAgICAgICAgLy8gdGhlIHVzZXIgaGFzIHByb3ZpZGVkIGEgY3VzdG9tIHRyYWNrQnksIHJldHVybiB0aGUgcmVzdWx0IG9mIHRoYXQgZnVuY3Rpb24gYXMgZXZhbHVhdGVkCiAgICAgICAgICAgIC8vIHdpdGggdGhlIHZhbHVlcyBvZiB0aGUgYFJlbmRlclJvd2AncyBkYXRhIGFuZCBpbmRleC4KICAgICAgICAgICAgdGhpcy5fZGF0YURpZmZlciA9IHRoaXMuX2RpZmZlcnMuZmluZChbXSkuY3JlYXRlKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfaQogICAgICAgICAgICAgKiBAcGFyYW0gez99IGRhdGFSb3cKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChfaSwgZGF0YVJvdykgPT4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mV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25EZXN0cm95KCkgewogICAgICAgICAgICB0aGlzLl9yb3dPdXRsZXQudmlld0NvbnRhaW5lci5jbGVhcigpOwogICAgICAgICAgICB0aGlzLl9oZWFkZXJSb3dPdXRsZXQudmlld0NvbnRhaW5lci5jbGVhcigpOwogICAgICAgICAgICB0aGlzLl9mb290ZXJSb3dPdXRsZXQudmlld0NvbnRhaW5lci5jbGVhcigpOwogICAgICAgICAgICB0aGlzLl9jYWNoZWRSZW5kZXJSb3dzTWFwLmNsZWFyKCk7CiAgICAgICAgICAgIHRoaXMuX29uRGVzdHJveS5uZXh0KCk7CiAgICAgICAgICAgIHRoaXMuX29uRGVzdHJveS5jb21wbGV0ZSgpOwogICAgICAgICAgICBpZiAoaXNEYXRhU291cmNlKHRoaXMuZGF0YVNvdXJjZSkpIHsKICAgICAgICAgICAgICAgIHRoaXMuZGF0YVNvdXJjZS5kaXNjb25uZWN0KHRoaXMpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJlbmRlcnMgcm93cyBiYXNlZCBvbiB0aGUgdGFibGUncyBsYXRlc3Qgc2V0IG9mIGRhdGEsIHdoaWNoIHdhcyBlaXRoZXIgcHJvdmlkZWQgZGlyZWN0bHkgYXMgYW4KICAgICAgICAgKiBpbnB1dCBvciByZXRyaWV2ZWQgdGhyb3VnaCBhbiBPYnNlcnZhYmxlIHN0cmVhbSAoZGlyZWN0bHkgb3IgZnJvbSBhIERhdGFTb3VyY2UpLgogICAgICAgICAqIENoZWNrcyBmb3IgZGlmZmVyZW5jZXMgaW4gdGhlIGRhdGEgc2luY2UgdGhlIGxhc3QgZGlmZiB0byBwZXJmb3JtIG9ubHkgdGhlIG5lY2Vzc2FyeQogICAgICAgICAqIGNoYW5nZXMgKGFkZC9yZW1vdmUvbW92ZSByb3dzKS4KICAgICAgICAgKgogICAgICAgICAqIElmIHRoZSB0YWJsZSdzIGRhdGEgc291cmNlIGlzIGEgRGF0YVNvdXJjZSBvciBPYnNlcnZhYmxlLCB0aGlzIHdpbGwgYmUgaW52b2tlZCBhdXRvbWF0aWNhbGx5CiAgICAgICAgICogZWFjaCB0aW1lIHRoZSBwcm92aWRlZCBPYnNlcnZhYmxlIHN0cmVhbSBlbWl0cyBhIG5ldyBkYXRhIGFycmF5LiBPdGhlcndpc2UgaWYgeW91ciBkYXRhIGlzCiAgICAgICAgICogYW4gYXJyYXksIHRoaXMgZnVuY3Rpb24gd2lsbCBuZWVkIHRvIGJlIGNhbGxlZCB0byByZW5kZXIgYW55IGNoYW5nZXMuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZW5kZXJSb3dzKCkgewogICAgICAgICAgICB0aGlzLl9yZW5kZXJSb3dzID0gdGhpcy5fZ2V0QWxsUmVuZGVyUm93cygpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGNoYW5nZXMgPSB0aGlzLl9kYXRhRGlmZmVyLmRpZmYodGhpcy5fcmVuZGVyUm93cyk7CiAgICAgICAgICAgIGlmICghY2hhbmdlcykgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgdmlld0NvbnRhaW5lciA9IHRoaXMuX3Jvd091dGxldC52aWV3Q29udGFpbmVyOwogICAgICAgICAgICBjaGFuZ2VzLmZvckVhY2hPcGVyYXRpb24oKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHJlY29yZAogICAgICAgICAgICAgKiBAcGFyYW0gez99IHByZXZJbmRleAogICAgICAgICAgICAgKiBAcGFyYW0gez99IGN1cnJlbnRJbmRleAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHJlY29yZCwgcHJldkluZGV4LCBjdXJyZW50SW5kZXgpID0+IHsKICAgICAgICAgICAgICAgIGlmIChyZWNvcmQucHJldmlvdXNJbmRleCA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5faW5zZXJ0Um93KHJlY29yZC5pdGVtLCAoLyoqIEB0eXBlIHs/fSAqLyAoY3VycmVudEluZGV4KSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAoY3VycmVudEluZGV4ID09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICB2aWV3Q29udGFpbmVyLnJlbW92ZSgoLyoqIEB0eXBlIHs/fSAqLyAocHJldkluZGV4KSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHZpZXcgPSAoLyoqIEB0eXBlIHs/fSAqLyAodmlld0NvbnRhaW5lci5nZXQoKC8qKiBAdHlwZSB7P30gKi8gKHByZXZJbmRleCkpKSkpOwogICAgICAgICAgICAgICAgICAgIHZpZXdDb250YWluZXIubW92ZSgoLyoqIEB0eXBlIHs/fSAqLyAodmlldykpLCBjdXJyZW50SW5kZXgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIC8vIFVwZGF0ZSB0aGUgbWV0YSBjb250ZXh0IG9mIGEgcm93J3MgY29udGV4dCBkYXRhIChpbmRleCwgY291bnQsIGZpcnN0LCBsYXN0LCAuLi4pCiAgICAgICAgICAgIHRoaXMuX3VwZGF0ZVJvd0luZGV4Q29udGV4dCgpOwogICAgICAgICAgICAvLyBVcGRhdGUgcm93cyB0aGF0IGRpZCBub3QgZ2V0IGFkZGVkL3JlbW92ZWQvbW92ZWQgYnV0IG1heSBoYXZlIGhhZCB0aGVpciBpZGVudGl0eSBjaGFuZ2VkLAogICAgICAgICAgICAvLyBlLmcuIGlmIHRyYWNrQnkgbWF0Y2hlZCBkYXRhIG9uIHNvbWUgcHJvcGVydHkgYnV0IHRoZSBhY3R1YWwgZGF0YSByZWZlcmVuY2UgY2hhbmdlZC4KICAgICAgICAgICAgY2hhbmdlcy5mb3JFYWNoSWRlbnRpdHlDaGFuZ2UoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHJlY29yZAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHJlY29yZCkgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3Qgcm93VmlldyA9ICgvKiogQHR5cGUgez99ICovICh2aWV3Q29udGFpbmVyLmdldCgoLyoqIEB0eXBlIHs/fSAqLyAocmVjb3JkLmN1cnJlbnRJbmRleCkpKSkpOwogICAgICAgICAgICAgICAgcm93Vmlldy5jb250ZXh0LiRpbXBsaWNpdCA9IHJlY29yZC5pdGVtLmRhdGE7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgdGhpcy51cGRhdGVTdGlja3lDb2x1bW5TdHlsZXMoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU2V0cyB0aGUgaGVhZGVyIHJvdyBkZWZpbml0aW9uIHRvIGJlIHVzZWQuIE92ZXJyaWRlcyB0aGUgaGVhZGVyIHJvdyBkZWZpbml0aW9uIGdhdGhlcmVkIGJ5CiAgICAgICAgICogdXNpbmcgYENvbnRlbnRDaGlsZGAsIGlmIG9uZSBleGlzdHMuIFNldHMgYSBmbGFnIHRoYXQgd2lsbCByZS1yZW5kZXIgdGhlIGhlYWRlciByb3cgYWZ0ZXIgdGhlCiAgICAgICAgICogdGFibGUncyBjb250ZW50IGlzIGNoZWNrZWQuCiAgICAgICAgICogXEBkb2NzLXByaXZhdGUKICAgICAgICAgKiBAZGVwcmVjYXRlZCBVc2UgYGFkZEhlYWRlclJvd0RlZmAgYW5kIGByZW1vdmVIZWFkZXJSb3dEZWZgIGluc3RlYWQKICAgICAgICAgKiBcQGJyZWFraW5nLWNoYW5nZSA4LjAuMAogICAgICAgICAqIEBwYXJhbSB7P30gaGVhZGVyUm93RGVmCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXRIZWFkZXJSb3dEZWYoaGVhZGVyUm93RGVmKSB7CiAgICAgICAgICAgIHRoaXMuX2N1c3RvbUhlYWRlclJvd0RlZnMgPSBuZXcgU2V0KFtoZWFkZXJSb3dEZWZdKTsKICAgICAgICAgICAgdGhpcy5faGVhZGVyUm93RGVmQ2hhbmdlZCA9IHRydWU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgdGhlIGZvb3RlciByb3cgZGVmaW5pdGlvbiB0byBiZSB1c2VkLiBPdmVycmlkZXMgdGhlIGZvb3RlciByb3cgZGVmaW5pdGlvbiBnYXRoZXJlZCBieQogICAgICAgICAqIHVzaW5nIGBDb250ZW50Q2hpbGRgLCBpZiBvbmUgZXhpc3RzLiBTZXRzIGEgZmxhZyB0aGF0IHdpbGwgcmUtcmVuZGVyIHRoZSBmb290ZXIgcm93IGFmdGVyIHRoZQogICAgICAgICAqIHRhYmxlJ3MgY29udGVudCBpcyBjaGVja2VkLgogICAgICAgICAqIFxAZG9jcy1wcml2YXRlCiAgICAgICAgICogQGRlcHJlY2F0ZWQgVXNlIGBhZGRGb290ZXJSb3dEZWZgIGFuZCBgcmVtb3ZlRm9vdGVyUm93RGVmYCBpbnN0ZWFkCiAgICAgICAgICogXEBicmVha2luZy1jaGFuZ2UgOC4wLjAKICAgICAgICAgKiBAcGFyYW0gez99IGZvb3RlclJvd0RlZgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0Rm9vdGVyUm93RGVmKGZvb3RlclJvd0RlZikgewogICAgICAgICAgICB0aGlzLl9jdXN0b21Gb290ZXJSb3dEZWZzID0gbmV3IFNldChbZm9vdGVyUm93RGVmXSk7CiAgICAgICAgICAgIHRoaXMuX2Zvb3RlclJvd0RlZkNoYW5nZWQgPSB0cnVlOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBZGRzIGEgY29sdW1uIGRlZmluaXRpb24gdGhhdCB3YXMgbm90IGluY2x1ZGVkIGFzIHBhcnQgb2YgdGhlIGNvbnRlbnQgY2hpbGRyZW4uCiAgICAgICAgICogQHBhcmFtIHs/fSBjb2x1bW5EZWYKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGFkZENvbHVtbkRlZihjb2x1bW5EZWYpIHsKICAgICAgICAgICAgdGhpcy5fY3VzdG9tQ29sdW1uRGVmcy5hZGQoY29sdW1uRGVmKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmVtb3ZlcyBhIGNvbHVtbiBkZWZpbml0aW9uIHRoYXQgd2FzIG5vdCBpbmNsdWRlZCBhcyBwYXJ0IG9mIHRoZSBjb250ZW50IGNoaWxkcmVuLgogICAgICAgICAqIEBwYXJhbSB7P30gY29sdW1uRGVmCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZW1vdmVDb2x1bW5EZWYoY29sdW1uRGVmKSB7CiAgICAgICAgICAgIHRoaXMuX2N1c3RvbUNvbHVtbkRlZnMuZGVsZXRlKGNvbHVtbkRlZik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEFkZHMgYSByb3cgZGVmaW5pdGlvbiB0aGF0IHdhcyBub3QgaW5jbHVkZWQgYXMgcGFydCBvZiB0aGUgY29udGVudCBjaGlsZHJlbi4KICAgICAgICAgKiBAcGFyYW0gez99IHJvd0RlZgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYWRkUm93RGVmKHJvd0RlZikgewogICAgICAgICAgICB0aGlzLl9jdXN0b21Sb3dEZWZzLmFkZChyb3dEZWYpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZW1vdmVzIGEgcm93IGRlZmluaXRpb24gdGhhdCB3YXMgbm90IGluY2x1ZGVkIGFzIHBhcnQgb2YgdGhlIGNvbnRlbnQgY2hpbGRyZW4uCiAgICAgICAgICogQHBhcmFtIHs/fSByb3dEZWYKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlbW92ZVJvd0RlZihyb3dEZWYpIHsKICAgICAgICAgICAgdGhpcy5fY3VzdG9tUm93RGVmcy5kZWxldGUocm93RGVmKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQWRkcyBhIGhlYWRlciByb3cgZGVmaW5pdGlvbiB0aGF0IHdhcyBub3QgaW5jbHVkZWQgYXMgcGFydCBvZiB0aGUgY29udGVudCBjaGlsZHJlbi4KICAgICAgICAgKiBAcGFyYW0gez99IGhlYWRlclJvd0RlZgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYWRkSGVhZGVyUm93RGVmKGhlYWRlclJvd0RlZikgewogICAgICAgICAgICB0aGlzLl9jdXN0b21IZWFkZXJSb3dEZWZzLmFkZChoZWFkZXJSb3dEZWYpOwogICAgICAgICAgICB0aGlzLl9oZWFkZXJSb3dEZWZDaGFuZ2VkID0gdHJ1ZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmVtb3ZlcyBhIGhlYWRlciByb3cgZGVmaW5pdGlvbiB0aGF0IHdhcyBub3QgaW5jbHVkZWQgYXMgcGFydCBvZiB0aGUgY29udGVudCBjaGlsZHJlbi4KICAgICAgICAgKiBAcGFyYW0gez99IGhlYWRlclJvd0RlZgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVtb3ZlSGVhZGVyUm93RGVmKGhlYWRlclJvd0RlZikgewogICAgICAgICAgICB0aGlzLl9jdXN0b21IZWFkZXJSb3dEZWZzLmRlbGV0ZShoZWFkZXJSb3dEZWYpOwogICAgICAgICAgICB0aGlzLl9oZWFkZXJSb3dEZWZDaGFuZ2VkID0gdHJ1ZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQWRkcyBhIGZvb3RlciByb3cgZGVmaW5pdGlvbiB0aGF0IHdhcyBub3QgaW5jbHVkZWQgYXMgcGFydCBvZiB0aGUgY29udGVudCBjaGlsZHJlbi4KICAgICAgICAgKiBAcGFyYW0gez99IGZvb3RlclJvd0RlZgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYWRkRm9vdGVyUm93RGVmKGZvb3RlclJvd0RlZikgewogICAgICAgICAgICB0aGlzLl9jdXN0b21Gb290ZXJSb3dEZWZzLmFkZChmb290ZXJSb3dEZWYpOwogICAgICAgICAgICB0aGlzLl9mb290ZXJSb3dEZWZDaGFuZ2VkID0gdHJ1ZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmVtb3ZlcyBhIGZvb3RlciByb3cgZGVmaW5pdGlvbiB0aGF0IHdhcyBub3QgaW5jbHVkZWQgYXMgcGFydCBvZiB0aGUgY29udGVudCBjaGlsZHJlbi4KICAgICAgICAgKiBAcGFyYW0gez99IGZvb3RlclJvd0RlZgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVtb3ZlRm9vdGVyUm93RGVmKGZvb3RlclJvd0RlZikgewogICAgICAgICAgICB0aGlzLl9jdXN0b21Gb290ZXJSb3dEZWZzLmRlbGV0ZShmb290ZXJSb3dEZWYpOwogICAgICAgICAgICB0aGlzLl9mb290ZXJSb3dEZWZDaGFuZ2VkID0gdHJ1ZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVXBkYXRlcyB0aGUgaGVhZGVyIHN0aWNreSBzdHlsZXMuIEZpcnN0IHJlc2V0cyBhbGwgYXBwbGllZCBzdHlsZXMgd2l0aCByZXNwZWN0IHRvIHRoZSBjZWxscwogICAgICAgICAqIHN0aWNraW5nIHRvIHRoZSB0b3AuIFRoZW4sIGV2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IEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB0aGVhZCA9IHRhYmxlRWxlbWVudC5xdWVyeVNlbGVjdG9yKCd0aGVhZCcpOwogICAgICAgICAgICBpZiAodGhlYWQpIHsKICAgICAgICAgICAgICAgIHRoZWFkLnN0eWxlLmRpc3BsYXkgPSBoZWFkZXJSb3dzLmxlbmd0aCA/ICcnIDogJ25vbmUnOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc3RpY2t5U3RhdGVzID0gdGhpcy5faGVhZGVyUm93RGVmcy5tYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGRlZgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZGVmID0+IGRlZi5zdGlja3kpKTsKICAgICAgICAgICAgdGhpcy5fc3RpY2t5U3R5bGVyLmNsZWFyU3RpY2t5UG9zaXRpb25pbmcoaGVhZGVyUm93cywgWyd0b3AnXSk7CiAgICAgICAgICAgIHRoaXMuX3N0aWNreVN0eWxlci5zdGlja1Jvd3MoaGVhZGVyUm93cywgc3RpY2t5U3RhdGVzLCAndG9wJyk7CiAgICAgICAgICAgIC8vIFJlc2V0IHRoZSBkaXJ0eSBzdGF0ZSBvZiB0aGUgc3RpY2t5IGlucHV0IGNoYW5nZSBzaW5jZSBpdCBoYXMgYmVlbiB1c2VkLgogICAgICAgICAgICB0aGlzLl9oZWFkZXJSb3dEZWZzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGRlZgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZGVmID0+IGRlZi5yZXNldFN0aWNreUNoYW5nZWQoKSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBVcGRhdGVzIHRoZSBmb290ZXIgc3RpY2t5IHN0eWxlcy4gR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XMuX2dldFJlbmRlcmVkUm93cyh0aGlzLl9oZWFkZXJSb3dPdXRsZXQpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGRhdGFSb3dzID0gdGhpcy5fZ2V0UmVuZGVyZWRSb3dzKHRoaXMuX3Jvd091dGxldCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZm9vdGVyUm93cyA9IHRoaXMuX2dldFJlbmRlcmVkUm93cyh0aGlzLl9mb290ZXJSb3dPdXRsZXQpOwogICAgICAgICAgICAvLyBDbGVhciB0aGUgbGVmdCBhbmQgcmlnaHQgcG9zaXRpb25pbmcgZnJvbSBhbGwgY29sdW1ucyBpbiB0aGUgdGFibGUgYWNyb3NzIGFsbCByb3dzIHNpbmNlCiAgICAgICAgICAgIC8vIHN0aWNreSBjb2x1bW5zIHNwYW4gYWNyb3NzIGFsbCB0YWJsZSBzZWN0aW9ucyAoaGVhZGVyLCBkYXRhLCBmb290ZXIpCiAgICAgICAgICAgIHRoaXMuX3N0aWNreVN0eWxlci5jbGVhclN0aWNreVBvc2l0aW9uaW5nKFsuLi5oZWFkZXJSb3dzLCAuLi5kYXRhUm93cywgLi4uZm9vdGVyUm93c10sIFsnbGVmdCcsICdyaWdodCddKTsKICAgICAgICAgICAgLy8gVXBkYXRlIHRoZSBzdGlja3kgc3R5bGVzIGZvciBlYWNoIGhlYWRlciByb3cgZGVwZW5kaW5nIG9uIHRoZSBkZWYncyBzdGlja3kgc3RhdGUKICAgICAgICAgICAgaGVhZGVyUm93cy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBoZWFkZXJSb3cKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBpCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoaGVhZGVyUm93LCBpKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLl9hZGRTdGlja3lDb2x1bW5TdHlsZXMoW2hlYWRlclJvd10sIHRoaXMuX2hlYWRlclJvd0RlZnNbaV0pOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIC8vIFVwZGF0ZSB0aGUgc3RpY2t5IHN0eWxlcyBmb3IgZWFjaCBkYXRhIHJvdyBkZXBlbmRpbmcgb24gaXRzIGRlZidzIHN0aWNreSBzdGF0ZQogICAgICAgICAgICB0aGlzLl9yb3dEZWZzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHJvd0RlZgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgcm93RGVmID0+IHsKICAgICAgICAgICAgICAgIC8vIENvbGxlY3QgYWxsIHRoZSByb3dzIHJlbmRlcmVkIHdpdGggdGhpcyByb3cgZGVmaW5pdGlvbi4KICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHJvd3MgPSBbXTsKICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZGF0YVJvd3MubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5fcmVuZGVyUm93c1tpXS5yb3dEZWYgPT09IHJvd0RlZikgewogICAgICAgICAgICAgICAgICAgICAgICByb3dzLnB1c2goZGF0YVJvd3NbaV0pOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuX2FkZFN0aWNreUNvbHVtblN0eWxlcyhyb3dzLCByb3dEZWYpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIC8vIFVwZGF0ZSB0aGUgc3RpY2t5IHN0eWxlcyBmb3IgZWFjaCBmb290ZXIgcm93IGRlcGVuZGluZyBvbiB0aGUgZGVmJ3Mgc3RpY2t5IHN0YXRlCiAgICAgICAgICAgIGZvb3RlclJvd3MuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZm9vdGVyUm93CiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gaQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGZvb3RlclJvdywgaSkgPT4gewogICAgICAgICAgICAgICAgdGhpcy5fYWRkU3RpY2t5Q29sdW1uU3R5bGVzKFtmb290ZXJSb3ddLCB0aGlzLl9mb290ZXJSb3dEZWZzW2ldKTsKICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAvLyBSZXNldCB0aGUgZGlydHkgc3RhdGUgb2YgdGhlIHN0aWNreSBpbnB1dCBjaGFuZ2Ugc2luY2UgaXQgaGFzIGJlZW4gdXNlZC4KICAgICAgICAgICAgQXJyYXkuZnJvbSh0aGlzLl9jb2x1bW5EZWZzQnlOYW1lLnZhbHVlcygpKS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBkZWYKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGRlZiA9PiBkZWYucmVzZXRTdGlja3lDaGFuZ2VkKCkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogR2V0IHRoZSBsaXN0IG9mIFJlbmRlclJvdyBvYmplY3RzIHRvIHJlbmRlciBhY2NvcmRpbmcgdG8gdGhlIGN1cnJlbnQgbGlzdCBvZiBkYXRhIGFuZCBkZWZpbmVkCiAgICAgICAgICogcm93IGRlZmluaXRpb25zLiBJZiB0aGUgcHJldmlvdXMgbGlzdCBhbHJlYWR5IGNvbnRhaW5lZCBhIHBhcnRpY3VsYXIgcGFpciwgaXQgc2hvdWxkIGJlIHJldXNlZAogICAgICAgICAqIHNvIHRoYXQgdGhlIGRpZmZlciBlcXVhdGVzIHRoZWlyIHJlZmVyZW5jZXMuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/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ZvckRhdGEgPSB0aGlzLl9nZXRSZW5kZXJSb3dzRm9yRGF0YShkYXRhLCBpLCBwcmV2Q2FjaGVkUmVuZGVyUm93cy5nZXQoZGF0YSkpOwogICAgICAgICAgICAgICAgaWYgKCF0aGlzLl9jYWNoZWRSZW5kZXJSb3dzTWFwLmhhcyhkYXRhKSkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX2NhY2hlZFJlbmRlclJvd3NNYXAuc2V0KGRhdGEsIG5ldyBXZWFrTWFwKCkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZm9yIChsZXQgaiA9IDA7IGogPCByZW5kZXJSb3dzRm9yRGF0YS5sZW5ndGg7IGorKykgewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBsZXQgcmVuZGVyUm93ID0gcmVuZGVyUm93c0ZvckRhdGFbal07CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGNhY2hlID0gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX2NhY2hlZFJlbmRlclJvd3NNYXAuZ2V0KHJlbmRlclJvdy5kYXRhKSkpOwogICAgICAgICAgICAgICAgICAgIGlmIChjYWNoZS5oYXMocmVuZGVyUm93LnJvd0RlZikpIHsKICAgICAgICAgICAgICAgICAgICAgICAgKC8qKiBAdHlwZSB7P30gKi8gKGNhY2hlLmdldChyZW5kZXJSb3cucm93RGVmKSkpLnB1c2gocmVuZGVyUm93KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGNhY2hlLnNldChyZW5kZXJSb3cucm93RGVmLCBbcmVuZGVyUm93XSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHJlbmRlclJvd3MucHVzaChyZW5kZXJSb3cpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiByZW5kZXJSb3dzOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBHZXRzIGEgbGlzdCBvZiBgUmVuZGVyUm93PFQ+YCBmb3IgdGhlIHByb3ZpZGVkIGRhdGEgb2JqZWN0IGFuZCBhbnkgYENka1Jvd0RlZmAgb2JqZWN0cyB0aGF0CiAgICAgICAgICogc2hvdWxkIGJlIHJlbmRlcmVkIGZvciB0aGlzIGRhdGEuIFJldXNlcyB0aGUgY2FjaGVkIFJlbmRlclJvdyBvYmplY3RzIGlmIHRoZXkgbWF0Y2ggdGhlIHNhbWUKICAgICAgICAgKiBgKFQsIENka1Jvd0RlZilgIHBhaXIuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGRhdGEKICAgICAgICAgKiBAcGFyYW0gez99IGRhdGFJbmRleAogICAgICAgICAqIEBwYXJhbSB7Pz19IGNhY2hlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZ2V0UmVuZGVyUm93c0ZvckRhdGEoZGF0YSwgZGF0YUluZGV4LCBjYWNoZSkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHJvd0RlZnMgPSB0aGlzLl9nZXRSb3dEZWZzKGRhdGEsIGRhdGFJbmRleCk7CiAgICAgICAgICAgIHJldHVybiByb3dEZWZzLm1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcm93RGVmCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICByb3dEZWYgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgY2FjaGVkUmVuZGVyUm93cyA9IChjYWNoZSAmJiBjYWNoZS5oYXMocm93RGVmKSkgPyAoLyoqIEB0eXBlIHs/fSAqLyAoY2FjaGUuZ2V0KHJvd0RlZikpKSA6IFtdOwogICAgICAgICAgICAgICAgaWYgKGNhY2hlZFJlbmRlclJvd3MubGVuZ3RoKSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGRhdGFSb3cgPSAoLyoqIEB0eXBlIHs/fSAqLyAoY2FjaGVkUmVuZGVyUm93cy5zaGlmdCgpKSk7CiAgICAgICAgICAgICAgICAgICAgZGF0YVJvdy5kYXRhSW5kZXggPSBkYXRhSW5kZXg7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGRhdGFSb3c7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4geyBkYXRhLCByb3dEZWYsIGRhdGFJbmRleCB9OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFVwZGF0ZSB0aGUgbWFwIGNvbnRhaW5pbmcgdGhlIGNvbnRlbnQncyBjb2x1bW4gZGVmaW5pdGlvbnMuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9jYWNoZUNvbHVtbkRlZnMoKSB7CiAgICAgICAgICAgIHRoaXMuX2NvbHVtbkRlZnNCeU5hbWUuY2xlYXIoKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjb2x1bW5EZWZzID0gbWVyZ2VBcnJheUFuZFNldCh0aGlzLl9nZXRPd25EZWZzKHRoaXMuX2NvbnRlbnRDb2x1bW5EZWZzKSwgdGhpcy5fY3VzdG9tQ29sdW1uRGVmcyk7CiAgICAgICAgICAgIGNvbHVtbkRlZnMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY29sdW1uRGVmCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBjb2x1bW5EZWYgPT4gewogICAgICAgICAgICAgICAgaWYgKHRoaXMuX2NvbHVtbkRlZnNCeU5hbWUuaGFzKGNvbHVtbkRlZi5uYW1lKSkgewogICAgICAgICAgICAgICAgICAgIHRocm93IGdldFRhYmxlRHVwbGljYXRlQ29sdW1uTmFtZUVycm9yKGNvbHVtbkRlZi5uYW1lKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuX2NvbHVtbkRlZnNCeU5hbWUuc2V0KGNvbHVtbkRlZi5uYW1lLCBjb2x1bW5EZWYpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFVwZGF0ZSB0aGUgbGlzdCBvZiBhbGwgYXZhaWxhYmxlIHJvdyBkZWZpbml0aW9ucyB0aGF0IGNhbiBiZSB1c2VkLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfY2FjaGVSb3dEZWZzKCkgewogICAgICAgICAgICB0aGlzLl9oZWFkZXJSb3dEZWZzID0gbWVyZ2VBcnJheUFuZFNldCh0aGlzLl9nZXRPd25EZWZzKHRoaXMuX2NvbnRlbnRIZWFkZXJSb3dEZWZzKSwgdGhpcy5fY3VzdG9tSGVhZGVyUm93RGVmcyk7CiAgICAgICAgICAgIHRoaXMuX2Zvb3RlclJvd0RlZnMgPSBtZXJnZUFycmF5QW5kU2V0KHRoaXMuX2dldE93bkRlZnModGhpcy5fY29udGVudEZvb3RlclJvd0RlZnMpLCB0aGlzLl9jdXN0b21Gb290ZXJSb3dEZWZzKTsKICAgICAgICAgICAgdGhpcy5fcm93RGVmcyA9IG1lcmdlQXJyYXlBbmRTZXQodGhpcy5fZ2V0T3duRGVmcyh0aGlzLl9jb250ZW50Um93RGVmcyksIHRoaXMuX2N1c3RvbVJvd0RlZnMpOwogICAgICAgICAgICAvLyBBZnRlciBhbGwgcm93IGRlZmluaXRpb25zIGFyZSBkZXRlcm1pbmVkLCBmaW5kIHRoZSByb3cgZGVmaW5pdGlvbiB0byBiZSBjb25zaWRlcmVkIGRlZmF1bHQuCiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZGVmYXVsdFJvd0RlZnMgPSB0aGlzLl9yb3dEZWZzLmZpbHRlcigoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZGVmCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBkZWYgPT4gIWRlZi53aGVuKSk7CiAgICAgICAgICAgIGlmICghdGhpcy5tdWx0aVRlbXBsYXRlRGF0YVJvd3MgJiYgZGVmYXVsdFJvd0RlZnMubGVuZ3RoID4gMSkgewogICAgICAgICAgICAgICAgdGhyb3cgZ2V0VGFibGVNdWx0aXBsZURlZmF1bHRSb3dEZWZzRXJyb3IoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9kZWZhdWx0Um93RGVmID0gZGVmYXVsdFJvd0RlZnNbMF07CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENoZWNrIGlmIHRoZSBoZWFkZXIsIGRhdGEsIG9yIGZvb3RlciByb3dzIGhhdmUgY2hhbmdlZCB3aGF0IGNvbHVtbnMgdGhleSB3YW50IHRvIGRpc3BsYXkgb3IKICAgICAgICAgKiB3aGV0aGVyIHRoZSBzdGlja3kgc3RhdGVzIGhhdmUgY2hhbmdlZCBmb3IgdGhlIGhlYWRlciBvciBmb290ZXIuIElmIHRoZXJlIGlzIGEgZGlmZiwgdGhlbgogICAgICAgICAqIHJlLXJlbmRlciB0aGF0IHNlY3Rpb24uCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9yZW5kZXJVcGRhdGVkQ29sdW1ucygpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjb2x1bW5zRGlmZlJlZHVjZXIgPSAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gYWNjCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZGVmCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoYWNjLCBkZWYpID0+IGFjYyB8fCAhIWRlZi5nZXRDb2x1bW5zRGlmZigpKTsKICAgICAgICAgICAgLy8gRm9yY2UgcmUtcmVuZGVyIGRhdGEgcm93cyBpZiB0aGUgbGlzdCBvZiBjb2x1bW4gZGVmaW5pdGlvbnMgaGF2ZSBjaGFuZ2VkLgogICAgICAgICAgICBpZiAodGhpcy5fcm93RGVmcy5yZWR1Y2UoY29sdW1uc0RpZmZSZWR1Y2VyLCBmYWxzZSkpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2ZvcmNlUmVuZGVyRGF0YVJvd3MoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBGb3JjZSByZS1yZW5kZXIgaGVhZGVyL2Zvb3RlciByb3dzIGlmIHRoZSBsaXN0IG9mIGNvbHVtbiBkZWZpbml0aW9ucyBoYXZlIGNoYW5nZWQuLgogICAgICAgICAgICBpZiAodGhpcy5faGVhZGVyUm93RGVmcy5yZWR1Y2UoY29sdW1uc0RpZmZSZWR1Y2VyLCBmYWxzZSkpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2ZvcmNlUmVuZGVySGVhZGVyUm93cygpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0aGlzLl9mb290ZXJSb3dEZWZzLnJlZHVjZShjb2x1bW5zRGlmZlJlZHVjZXIsIGZhbHNlKSkgewogICAgICAgICAgICAgICAgdGhpcy5fZm9yY2VSZW5kZXJGb290ZXJSb3dzKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU3dpdGNoIHRvIHRoZSBwcm92aWRlZCBkYXRhIHNvdXJjZSBieSByZXNldHRpbmcgdGhlIGRhdGEgYW5kIHVuc3Vic2NyaWJpbmcgZnJvbSB0aGUgY3VycmVudAogICAgICAgICAqIHJlbmRlciBjaGFuZ2Ugc3Vic2NyaXB0aW9uIGlmIG9uZSBleGlzdHMuIElmIHRoZSBkYXRhIHNvdXJjZSBpcyBudWxsLCBpbnRlcnByZXQgdGhpcyBieQogICAgICAgICAqIGNsZWFyaW5nIHRoZSByb3cgb3V0bGV0LiBPdGhlcndpc2Ugc3RhcnQgbGlzdGVuaW5nIGZvciBuZXcgZGF0YS4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gZGF0YVNvdXJjZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3N3aXRjaERhdGFTb3VyY2UoZGF0YVNvdXJjZSkgewogICAgICAgICAgICB0aGlzLl9kYXRhID0gW107CiAgICAgICAgICAgIGlmIChpc0RhdGFTb3VyY2UodGhpcy5kYXRhU291cmNlKSkgewogICAgICAgICAgICAgICAgdGhpcy5kYXRhU291cmNlLmRpc2Nvbm5lY3QodGhpcyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gU3RvcCBsaXN0ZW5pbmcgZm9yIGRhdGEgZnJvbSB0aGUgcHJldmlvdXMgZGF0YSBzb3VyY2UuCiAgICAgICAgICAgIGlmICh0aGlzLl9yZW5kZXJDaGFuZ2VTdWJzY3JpcHRpb24pIHsKICAgICAgICAgICAgICAgIHRoaXMuX3JlbmRlckNoYW5nZVN1YnNjcmlwdGlvbi51bnN1YnNjcmliZSgpOwogICAgICAgICAgICAgICAgdGhpcy5fcmVuZGVyQ2hhbmdlU3Vic2NyaXB0aW9uID0gbnVsbDsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoIWRhdGFTb3VyY2UpIHsKICAgICAgICAgICAgICAgIGlmICh0aGlzLl9kYXRhRGlmZmVyKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fZGF0YURpZmZlci5kaWZmKFtdKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuX3Jvd091dGxldC52aWV3Q29udGFpbmVyLmNsZWFyKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fZGF0YVNvdXJjZSA9IGRhdGFTb3VyY2U7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNldCB1cCBhIHN1YnNjcmlwdGlvbiBmb3IgdGhlIGRhdGEgcHJvdmlkZWQgYnkgdGhlIGRhdGEgc291cmNlLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfb2JzZXJ2ZVJlbmRlckNoYW5nZXMoKSB7CiAgICAgICAgICAgIC8vIElmIG5vIGRhdGEgc291cmNlIGhhcyBiZWVuIHNldCwgdGhlcmUgaXMgbm90aGluZyB0byBvYnNlcnZlIGZvciBjaGFuZ2VzLgogICAgICAgICAgICBpZiAoIXRoaXMuZGF0YVNvdXJjZSkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IGRhdGFTdHJlYW07CiAgICAgICAgICAgIGlmIChpc0RhdGFTb3VyY2UodGhpcy5kYXRhU291cmNlKSkgewogICAgICAgICAgICAgICAgZGF0YVN0cmVhbSA9IHRoaXMuZGF0YVNvdXJjZS5jb25uZWN0KHRoaXMpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKGlzT2JzZXJ2YWJsZSh0aGlzLmRhdGFTb3VyY2UpKSB7CiAgICAgICAgICAgICAgICBkYXRhU3RyZWFtID0gdGhpcy5kYXRhU291cmNlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKEFycmF5LmlzQXJyYXkodGhpcy5kYXRhU291cmNlKSkgewogICAgICAgICAgICAgICAgZGF0YVN0cmVhbSA9IG9mKHRoaXMuZGF0YVNvdXJjZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGRhdGFTdHJlYW0gPT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICAgICAgdGhyb3cgZ2V0VGFibGVVbmtub3duRGF0YVNvdXJjZUVycm9yKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fcmVuZGVyQ2hhbmdlU3Vic2NyaXB0aW9uID0gZGF0YVN0cmVhbS5waXBlKHRha2VVbnRpbCh0aGlzLl9vbkRlc3Ryb3kpKS5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGRhdGEKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGRhdGEgPT4gewogICAgICAgICAgICAgICAgdGhpcy5fZGF0YSA9IGRhdGEgfHwgW107CiAgICAgICAgICAgICAgICB0aGlzLnJlbmRlclJvd3MoKTsKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDbGVhcnMgYW55IGV4aXN0aW5nIGNvbnRlbnQgaW4gdGhlIGhlYWRlciByb3cgb3V0bGV0IGFuZCBjcmVhdGVzIGEgbmV3IGVtYmVkZGVkIHZpZXcKICAgICAgICAgKiBpbiB0aGUgb3V0bGV0IHVzaW5nIHRoZSBoZWFkZXIgcm93IGRlZmluaXRpb24uCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9mb3JjZVJlbmRlckhlYWRlclJvd3MoKSB7CiAgICAgICAgICAgIC8vIENsZWFyIHRoZSBoZWFkZXIgcm93IG91dGxldCBpZiBhbnkgY29udGVudCBleGlzdHMuCiAgICAgICAgICAgIGlmICh0aGlzLl9oZWFkZXJSb3dPdXRsZXQudmlld0NvbnRhaW5lci5sZW5ndGggPiAwKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9oZWFkZXJSb3dPdXRsZXQudmlld0NvbnRhaW5lci5jbGVhcigpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2hlYWRlclJvd0RlZnMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZGVmCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gaQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGRlZiwgaSkgPT4gdGhpcy5fcmVuZGVyUm93KHRoaXMuX2hlYWRlclJvd091dGxldCwgZGVmLCBpKSkpOwogICAgICAgICAgICB0aGlzLnVwZGF0ZVN0aWNreUhlYWRlclJvd1N0eWxlcygpOwogICAgICAgICAgICB0aGlzLnVwZGF0ZVN0aWNreUNvbHVtblN0eWxlcygpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDbGVhcnMgYW55IGV4aXN0aW5nIGNvbnRlbnQgaW4gdGhlIGZvb3RlciByb3cgb3V0bGV0IGFuZCBjcmVhdGVzIGEgbmV3IGVtYmVkZGVkIHZpZXcKICAgICAgICAgKiBpbiB0aGUgb3V0bGV0IHVzaW5nIHRoZSBmb290ZXIgcm93IGRlZmluaXRpb24uCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9mb3JjZVJlbmRlckZvb3RlclJvd3MoKSB7CiAgICAgICAgICAgIC8vIENsZWFyIHRoZSBmb290ZXIgcm93IG91dGxldCBpZiBhbnkgY29udGVudCBleGlzdHMuCiAgICAgICAgICAgIGlmICh0aGlzLl9mb290ZXJSb3dPdXRsZXQudmlld0NvbnRhaW5lci5sZW5ndGggPiAwKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9mb290ZXJSb3dPdXRsZXQudmlld0NvbnRhaW5lci5jbGVhcigpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2Zvb3RlclJvd0RlZnMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZGVmCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gaQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGRlZiwgaSkgPT4gdGhpcy5fcmVuZGVyUm93KHRoaXMuX2Zvb3RlclJvd091dGxldCwgZGVmLCBpKSkpOwogICAgICAgICAgICB0aGlzLnVwZGF0ZVN0aWNreUZvb3RlclJvd1N0eWxlcygpOwogICAgICAgICAgICB0aGlzLnVwZGF0ZVN0aWNreUNvbHVtblN0eWxlcygpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBZGRzIHRoZSBzdGlja3kgY29sdW1uIHN0eWxlcyBmb3IgdGhlIHJvd3MgYWNjb3JkaW5nIHRvIHRoZSBjb2x1bW5zJyBzdGljayBzdGF0ZXMuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHJvd3MKICAgICAgICAgKiBAcGFyYW0gez99IHJvd0RlZgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2FkZFN0aWNreUNvbHVtblN0eWxlcyhyb3dzLCByb3dEZWYpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjb2x1bW5EZWZzID0gQXJyYXkuZnJvbShyb3dEZWYuY29sdW1ucyB8fCBbXSkubWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjb2x1bW5OYW1lCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBjb2x1bW5OYW1lID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGNvbHVtbkRlZiA9IHRoaXMuX2NvbHVtbkRlZnNCeU5hbWUuZ2V0KGNvbHVtbk5hbWUpOwogICAgICAgICAgICAgICAgaWYgKCFjb2x1bW5EZWYpIHsKICAgICAgICAgICAgICAgICAgICB0aHJvdyBnZXRUYWJsZVVua25vd25Db2x1bW5FcnJvcihjb2x1bW5OYW1lKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAoY29sdW1uRGVmKSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBzdGlja3lTdGFydFN0YXRlcyA9IGNvbHVtbkRlZnMubWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjb2x1bW5EZWYKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGNvbHVtbkRlZiA9PiBjb2x1bW5EZWYuc3RpY2t5KSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc3RpY2t5RW5kU3RhdGVzID0gY29sdW1uRGVmcy5tYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGNvbHVtbkRlZgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgY29sdW1uRGVmID0+IGNvbHVtbkRlZi5zdGlja3lFbmQpKTsKICAgICAgICAgICAgdGhpcy5fc3RpY2t5U3R5bGVyLnVwZGF0ZVN0aWNreUNvbHVtbnMocm93cywgc3RpY2t5U3RhcnRTdGF0ZXMsIHN0aWNreUVuZFN0YXRlcyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEdldHMgdGhlIGxpc3Qgb2Ygcm93cyB0aGF0IGhhdmUgYmVlbiByZW5kZXJlZCBpbiB0aGUgcm93IG91dGxldC4KICAgICAgICAgKiBAcGFyYW0gez99IHJvd091dGxldAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2dldFJlbmRlcmVkUm93cyhyb3dPdXRsZXQpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCByZW5kZXJlZFJvd3MgPSBbXTsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCByb3dPdXRsZXQudmlld0NvbnRhaW5lci5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3Qgdmlld1JlZiA9ICgoLyoqIEB0eXBlIHs/fSAqLyAoKC8qKiBAdHlwZSB7P30gKi8gKHJvd091dGxldC52aWV3Q29udGFpbmVyLmdldChpKSkpKSkpOwogICAgICAgICAgICAgICAgcmVuZGVyZWRSb3dzLnB1c2godmlld1JlZi5yb290Tm9kZXNbMF0pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiByZW5kZXJlZFJvd3M7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEdldCB0aGUgbWF0Y2hpbmcgcm93IGRlZmluaXRpb25zIHRoYXQgc2hvdWxkIGJlIHVzZWQgZm9yIHRoaXMgcm93IGRhdGEuIElmIHRoZXJlIGlzIG9ubHkKICAgICAgICAgKiBvbmUgcm93IGRlZmluaXRpb24sIGl0IGlzIHJldHVybmVkLiBPdGhlcndpc2UsIGZpbmQgdGhlIHJvdyBkZWZpbml0aW9ucyB0aGF0IGhhcyBhIHdoZW4KICAgICAgICAgKiBwcmVkaWNhdGUgdGhhdCByZXR1cm5zIHRydWUgd2l0aCB0aGUgZGF0YS4gSWYgbm9uZSByZXR1cm4gdHJ1ZSwgcmV0dXJuIHRoZSBkZWZhdWx0IHJvdwogICAgICAgICAqIGRlZmluaXRpb24uCiAgICAgICAgICogQHBhcmFtIHs/fSBkYXRhCiAgICAgICAgICogQHBhcmFtIHs/fSBkYXRhSW5kZXgKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9nZXRSb3dEZWZzKGRhdGEsIGRhdGFJbmRleCkgewogICAgICAgICAgICBpZiAodGhpcy5fcm93RGVmcy5sZW5ndGggPT0gMSkgewogICAgICAgICAgICAgICAgcmV0dXJuIFt0aGlzLl9yb3dEZWZzWzBdXTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCByb3dEZWZzID0gW107CiAgICAgICAgICAgIGlmICh0aGlzLm11bHRpVGVtcGxhdGVEYXRhUm93cykgewogICAgICAgICAgICAgICAgcm93RGVmcyA9IHRoaXMuX3Jvd0RlZnMuZmlsdGVyKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZGVmCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBkZWYgPT4gIWRlZi53aGVuIHx8IGRlZi53aGVuKGRhdGFJbmRleCwgZGF0YSkpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCByb3dEZWYgPSB0aGlzLl9yb3dEZWZzLmZpbmQoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBkZWYKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIGRlZiA9PiBkZWYud2hlbiAmJiBkZWYud2hlbihkYXRhSW5kZXgsIGRhdGEpKSkgfHwgdGhpcy5fZGVmYXVsdFJvd0RlZjsKICAgICAgICAgICAgICAgIGlmIChyb3dEZWYpIHsKICAgICAgICAgICAgICAgICAgICByb3dEZWZzLnB1c2gocm93RGVmKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoIXJvd0RlZnMubGVuZ3RoKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBnZXRUYWJsZU1pc3NpbmdNYXRjaGluZ1Jvd0RlZkVycm9yKGRhdGEpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiByb3dEZWZzOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDcmVhdGUgdGhlIGVtYmVkZGVkIHZpZXcgZm9yIHRoZSBkYXRhIHJvdyB0ZW1wbGF0ZSBhbmQgcGxhY2UgaXQgaW4gdGhlIGNvcnJlY3QgaW5kZXggbG9jYXRpb24KICAgICAgICAgKiB3aXRoaW4gdGhlIGRhdGEgcm93IHZpZXcgY29udGFpbmVyLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSByZW5kZXJSb3cKICAgICAgICAgKiBAcGFyYW0gez99IHJlbmRlckluZGV4CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfaW5zZXJ0Um93KHJlbmRlclJvdywgcmVuZGVySW5kZXgpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCByb3dEZWYgPSByZW5kZXJSb3cucm93RGVmOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGNvbnRleHQgPSB7ICRpbXBsaWNpdDogcmVuZGVyUm93LmRhdGEgfTsKICAgICAgICAgICAgdGhpcy5fcmVuZGVyUm93KHRoaXMuX3Jvd091dGxldCwgcm93RGVmLCByZW5kZXJJbmRleCwgY29udGV4dCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYSBuZXcgcm93IHRlbXBsYXRlIGluIHRoZSBvdXRsZXQgYW5kIGZpbGxzIGl0IHdpdGggdGhlIHNldCBvZiBjZWxsIHRlbXBsYXRlcy4KICAgICAgICAgKiBPcHRpb25hbGx5IHRha2VzIGEgY29udGV4dCB0byBwcm92aWRlIHRvIHRoZSByb3cgYW5kIGNlbGxzLCBhcyB3ZWxsIGFzIGFuIG9wdGlvbmFsIGluZGV4CiAgICAgICAgICogb2Ygd2hlcmUgdG8gcGxhY2UgdGhlIG5ldyByb3cgdGVtcGxhdGUgaW4gdGhlIG91dGxldC4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gb3V0bGV0CiAgICAgICAgICogQHBhcmFtIHs/fSByb3dEZWYKICAgICAgICAgKiBAcGFyYW0gez99IGluZGV4CiAgICAgICAgICogQHBhcmFtIHs/PX0gY29udGV4dAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3JlbmRlclJvdyhvdXRsZXQsIHJvd0RlZiwgaW5kZXgsIGNvbnRleHQgPSB7fSkgewogICAgICAgICAgICAvLyBUT0RPKGFuZHJld3NlZ3Vpbik6IGVuZm9yY2UgdGhhdCBvbmUgb3V0bGV0IHdhcyBpbnN0YW50aWF0ZWQgZnJvbSBjcmVhdGVFbWJlZGRlZFZpZXcKICAgICAgICAgICAgb3V0bGV0LnZpZXdDb250YWluZXIuY3JlYXRlRW1iZWRkZWRWaWV3KHJvd0RlZi50ZW1wbGF0ZSwgY29udGV4dCwgaW5kZXgpOwogICAgICAgICAgICBmb3IgKGxldCBjZWxsVGVtcGxhdGUgb2YgdGhpcy5fZ2V0Q2VsbFRlbXBsYXRlcyhyb3dEZWYpKSB7CiAgICAgICAgICAgICAgICBpZiAoQ2RrQ2VsbE91dGxldC5tb3N0UmVjZW50Q2VsbE91dGxldCkgewogICAgICAgICAgICAgICAgICAgIENka0NlbGxPdXRsZXQubW9zdFJlY2VudENlbGxPdXRsZXQuX3ZpZXdDb250YWluZXIuY3JlYXRlRW1iZWRkZWRWaWV3KGNlbGxUZW1wbGF0ZSwgY29udGV4dCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fY2hhbmdlRGV0ZWN0b3JSZWYubWFya0ZvckNoZWNrKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFVwZGF0ZXMgdGhlIGluZGV4LXJlbGF0ZWQgY29udGV4dCBmb3IgZWFjaCByb3cgdG8gcmVmbGVjdCBhbnkgY2hhbmdlcyBpbiB0aGUgaW5kZXggb2YgdGhlIHJvd3MsCiAgICAgICAgICogZS5nLiBmaXJzdC9sYXN0L2V2ZW4vb2RkLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfdXBkYXRlUm93SW5kZXhDb250ZXh0KCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHZpZXdDb250YWluZXIgPSB0aGlzLl9yb3dPdXRsZXQudmlld0NvbnRhaW5lcjsKICAgICAgICAgICAgZm9yIChsZXQgcmVuZGVySW5kZXggPSAwLCBjb3VudCA9IHZpZXdDb250YWluZXIubGVuZ3RoOyByZW5kZXJJbmRleCA8IGNvdW50OyByZW5kZXJJbmRleCsrKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCB2aWV3UmVmID0gKC8qKiBAdHlwZSB7P30gKi8gKHZpZXdDb250YWluZXIuZ2V0KHJlbmRlckluZGV4KSkpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgY29udGV4dCA9ICgvKiogQHR5cGUgez99ICovICh2aWV3UmVmLmNvbnRleHQpKTsKICAgICAgICAgICAgICAgIGNvbnRleHQuY291bnQgPSBjb3VudDsKICAgICAgICAgICAgICAgIGNvbnRleHQuZmlyc3QgPSByZW5kZXJJbmRleCA9PT0gMDsKICAgICAgICAgICAgICAgIGNvbnRleHQubGFzdCA9IHJlbmRlckluZGV4ID09PSBjb3VudCAtIDE7CiAgICAgICAgICAgICAgICBjb250ZXh0LmV2ZW4gPSByZW5kZXJJbmRleCAlIDIgPT09IDA7CiAgICAgICAgICAgICAgICBjb250ZXh0Lm9kZCA9ICFjb250ZXh0LmV2ZW47CiAgICAgICAgICAgICAgICBpZiAodGhpcy5tdWx0aVRlbXBsYXRlRGF0YVJvd3MpIHsKICAgICAgICAgICAgICAgICAgICBjb250ZXh0LmRhdGFJbmRleCA9IHRoaXMuX3JlbmRlclJvd3NbcmVuZGVySW5kZXhdLmRhdGFJbmRleDsKICAgICAgICAgICAgICAgICAgICBjb250ZXh0LnJlbmRlckluZGV4ID0gcmVuZGVySW5kZXg7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBjb250ZXh0LmluZGV4ID0gdGhpcy5fcmVuZGVyUm93c1tyZW5kZXJJbmRleF0uZGF0YUluZGV4OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEdldHMgdGhlIGNvbHVtbiBkZWZpbml0aW9ucyBmb3IgdGhlIHByb3ZpZGVkIHJvdyBkZWYuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHJvd0RlZgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2dldENlbGxUZW1wbGF0ZXMocm93RGVmKSB7CiAgICAgICAgICAgIGlmICghcm93RGVmIHx8ICFyb3dEZWYuY29sdW1ucykgewogICAgICAgICAgICAgICAgcmV0dXJuIFtdOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBBcnJheS5mcm9tKHJvd0RlZi5jb2x1bW5zLCAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY29sdW1uSWQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGNvbHVtbklkID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGNvbHVtbiA9IHRoaXMuX2NvbHVtbkRlZnNCeU5hbWUuZ2V0KGNvbHVtbklkKTsKICAgICAgICAgICAgICAgIGlmICghY29sdW1uKSB7CiAgICAgICAgICAgICAgICAgICAgdGhyb3cgZ2V0VGFibGVVbmtub3duQ29sdW1uRXJyb3IoY29sdW1uSWQpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIHJvd0RlZi5leHRyYWN0Q2VsbFRlbXBsYXRlKGNvbHVtbik7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQWRkcyBuYXRpdmUgdGFibGUgc2VjdGlvbnMgKGUuZy4gdGJvZHkpIGFuZCBtb3ZlcyB0aGUgcm93IG91dGxldHMgaW50byB0aGVtLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfYXBwbHlOYXRpdmVUYWJsZVNlY3Rpb25zKCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGRvY3VtZW50RnJhZ21lbnQgPSB0aGlzLl9kb2N1bWVudC5jcmVhdGVEb2N1bWVudEZyYWdtZW50KCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc2VjdGlvbnMgPSBbCiAgICAgICAgICAgICAgICB7IHRhZzogJ3RoZWFkJywgb3V0bGV0OiB0aGlzLl9oZWFkZXJSb3dPdXRsZXQgfSwKICAgICAgICAgICAgICAgIHsgdGFnOiAndGJvZHknLCBvdXRsZXQ6IHRoaXMuX3Jvd091dGxldCB9LAogICAgICAgICAgICAgICAgeyB0YWc6ICd0Zm9vdCcsIG91dGxldDogdGhpcy5fZm9vdGVyUm93T3V0bGV0IH0sCiAgICAgICAgICAgIF07CiAgICAgICAgICAgIGZvciAoY29uc3Qgc2Vj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AgICAgICBfZm9yY2VSZW5kZXJEYXRhUm93cygpIHsKICAgICAgICAgICAgdGhpcy5fZGF0YURpZmZlci5kaWZmKFtdKTsKICAgICAgICAgICAgdGhpcy5fcm93T3V0bGV0LnZpZXdDb250YWluZXIuY2xlYXIoKTsKICAgICAgICAgICAgdGhpcy5yZW5kZXJSb3dzKCk7CiAgICAgICAgICAgIHRoaXMudXBkYXRlU3RpY2t5Q29sdW1uU3R5bGVzKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENoZWNrcyBpZiB0aGVyZSBoYXMgYmVlbiBhIGNoYW5nZSBpbiBzdGlja3kgc3RhdGVzIHNpbmNlIGxhc3QgY2hlY2sgYW5kIGFwcGxpZXMgdGhlIGNvcnJlY3QKICAgICAgICAgKiBzdGlja3kgc3R5bGVzLiBTaW5jZSBjaGVja2luZyByZXNldHMgdGhlICJkaXJ0eSIgc3RhdGUsIHRoaXMgc2hvdWxkIG9ubHkgYmUgcGVyZm9ybWVkIG9uY2UKICAgICAgICAgKiBkdXJpbmcgYSBjaGFuZ2UgZGV0ZWN0aW9uIGFuZCBhZnRlciB0aGUgaW5wdXRzIGFyZSBzZXR0bGVkIChhZnRlciBjb250ZW50IGNoZWNrKS4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2NoZWNrU3RpY2t5U3RhdGVzKCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHN0aWNreUNoZWNrUmVkdWNlciA9ICgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBhY2MKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBkCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoYWNjLCBkKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gYWNjIHx8IGQuaGFzU3RpY2t5Q2hhbmdlZCgpO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HVtbnMuIExpc3RlbnMKICAgICAgICAgKiBmb3IgZGlyZWN0aW9uYWxpdHkgY2hhbmdlcyBhbmQgcHJvdmlkZXMgdGhlIGxhdGVzdCBkaXJlY3Rpb24gdG8gdGhlIHN0eWxlci4gUmUtYXBwbGllcyBjb2x1bW4KICAgICAgICAgKiBzdGlja2luZXNzIHdoZW4gZGlyZWN0aW9uYWxpdHkgY2hhbmdlcy4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3NldHVwU3RpY2t5U3R5bGVyKCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGRpcmVjdGlvbiA9IHRoaXMuX2RpciA/IHRoaXMuX2Rpci52YWx1ZSA6ICdsdHInOwogICAgICAgICAgICB0aGlzLl9zdGlja3lTdHlsZXIgPSBuZXcgU3RpY2t5U3R5bGVyKHRoaXMuX2lzTmF0aXZlSHRtbFRhYmxlLCB0aGlzLnN0aWNreUNzc0NsYXNzLCBkaXJlY3Rpb24sIHRoaXMuX3BsYXRmb3JtLmlzQnJvd3Nlcik7CiAgICAgICAgICAgICh0aGlzLl9kaXIgPyB0aGlzLl9kaXIuY2hhbmdlIDogb2YoKSkKICAgICAgICAgICAgICAgIC5waXBlKHRha2VVbnRpbCh0aGlzLl9vbkRlc3Ryb3kpKQogICAgICAgICAgICAgICAgLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHZhbHVlID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuX3N0aWNreVN0eWxlci5kaXJlY3Rpb24gPSB2YWx1ZTsKICAgICAgICAgICAgICAgIHRoaXMudXBkYXRlU3RpY2t5Q29sdW1uU3R5bGVzKCk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICA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GFuZCBkYXRhIHByb3BlcnR5IGFjY2Vzc29yLgogICAgICogVGhlIGhlYWRlciB0ZXh0IGNhbiBiZSBvdmVycmlkZGVuIHdpdGggdGhlIGBoZWFkZXJUZXh0YCBpbnB1dC4gQ2VsbCB2YWx1ZXMgY2FuIGJlIG92ZXJyaWRkZW4gd2l0aAogICAgICogdGhlIGBkYXRhQWNjZXNzb3JgIGlucHV0LiBDaGFuZ2UgdGhlIHRleHQganVzdGlmaWNhdGlvbiB0byB0aGUgc3RhcnQgb3IgZW5kIHVzaW5nIHRoZSBganVzdGlmeWAKICAgICAqIGlucHV0LgogICAgICogQHRlbXBsYXRlIFQKICAgICAqLwogICAgY2xhc3MgQ2RrVGV4dENvbHVtbiB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBfdGFibGUKICAgICAgICAgKiBAcGFyYW0gez99IF9vcHRpb25zCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoX3RhYmxlLCBfb3B0aW9ucykgewogICAgICAgICAgICB0aGlzLl90YWJsZSA9IF90YWJsZTsKICAgICAgICAgICAgdGhpcy5fb3B0aW9ucyA9IF9vcHRpb25zOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQWxpZ25tZW50IG9mIHRoZSBjZWxsIHZhbHVlcy4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuanVzdGlmeSA9ICdzdGFydCc7CiAgICAgICAgICAgIHRoaXMuX29wdGlvbnMgPSBfb3B0aW9ucyB8fCB7fTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ29sdW1uIG5hbWUgdGhhdCBzaG91bGQgYmUgdXNlZCB0byByZWZlcmVuY2UgdGhpcyBjb2x1bW4uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgbmFtZSgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuX25hbWU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gbmFtZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IG5hbWUobmFtZSkgewogICAgICAgICAgICB0aGlzLl9uYW1lID0gbmFtZTsKICAgICAgICAgICAgLy8gV2l0aCBJdnksIGlucHV0cyBjYW4gYmUgaW5pdGlhbGl6ZWQgYmVmb3JlIHN0YXRpYyBxdWVyeSByZXN1bHRzIGFyZQogICAgICAgICAgICAvLyBhdmFpbGFibGUuIEluIHRoYXQgY2FzZSwgd2UgZGVmZXIgdGhlIHN5bmNocm9uaXphdGlvbiB1bnRpbCAibmdPbkluaXQiIGZpcmVzLgogICAgICAgICAgICB0aGlzLl9zeW5jQ29sdW1uRGVmTmFtZSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25Jbml0KCkgewogICAgICAgICAgICB0aGlzLl9zeW5jQ29sdW1uRGVmTmFtZSgpOwogICAgICAgICAgICBpZiAodGhpcy5oZWFkZXJUZXh0ID09PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgICAgIHRoaXMuaGVhZGVyVGV4dCA9IHRoaXMuX2NyZWF0ZURlZmF1bHRIZWFkZXJUZXh0KCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKCF0aGlzLmRhdGFBY2Nlc3NvcikgewogICAgICAgICAgICAgICAgdGhpcy5kYXRhQWNjZXNzb3IgPQogICAgICAgICAgICAgICAgICAgIHRoaXMuX29wdGlvbnMuZGVmYXVsdERhdGFBY2Nlc3NvciB8fCAoKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZGF0YQogICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbmFtZQogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKGRhdGEsIG5hbWUpID0+ICgoLyoqIEB0eXBlIHs/fSAqLyAoZGF0YSkpKVtuYW1lXSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0aGlzLl90YWJsZSkgewogICAgICAgICAgICAgICAgLy8gUHJvdmlkZSB0aGUgY2VsbCBhbmQgaGVhZGVyQ2VsbCBkaXJlY3RseSB0byB0aGUgdGFibGUgd2l0aCB0aGUgc3RhdGljIGBWaWV3Q2hpbGRgIHF1ZXJ5LAogICAgICAgICAgICAgICAgLy8gc2luY2UgdGhlIGNvbHVtbkRlZiB3aWxsIG5vdCBwaWNrIHVwIGl0cyBjb250ZW50IGJ5IHRoZSB0aW1lIHRoZSB0YWJsZSBmaW5pc2hlcyBjaGVja2luZwogICAgICAgICAgICAgICAgLy8gaXRzIGNvbnRlbnQgYW5kIGluaXRpYWxpemluZyB0aGUgcm93cy4KICAgICAgICAgICAgICAgIHRoaXMuY29sdW1uRGVmLmNlbGwgPSB0aGlzLmNlbGw7CiAgICAgICAgICAgICAgICB0aGlzLmNvbHVtbkRlZi5oZWFkZXJDZWxsID0gdGhpcy5oZWFkZXJDZWxsOwogICAgICAgICAgICAgICAgdGhpcy5fdGFibGUuYWRkQ29sdW1uRGVmKHRoaXMuY29sdW1uRGVmKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRocm93IGdldFRhYmxlVGV4dENvbHVtbk1pc3NpbmdQYXJlbnRUYWJsZUVycm9yKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uRGVzdHJveSgpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX3RhYmxlKSB7CiAgICAgICAgICAgICAgICB0aGlzLl90YWJsZS5yZW1vdmVDb2x1bW5EZWYodGhpcy5jb2x1bW5EZWYpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENyZWF0ZXMgYSBkZWZhdWx0IGhlYWRlciB0ZXh0LiBVc2UgdGhlIG9wdGlvbnMnIGhlYWRlciB0ZXh0IHRyYW5zZm9ybWF0aW9uIGZ1bmN0aW9uIGlmIG9uZQogICAgICAgICAqIGhhcyBiZWVuIHByb3ZpZGVkLiBPdGhlcndpc2Ugc2ltcGx5IGNhcGl0YWxpemUgdGhlIGNvbHVtbiBuYW1lLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2NyZWF0ZURlZmF1bHRIZWFkZXJUZXh0KCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG5hbWUgPSB0aGlzLm5hbWU7CiAgICAgICAgICAgIGlmIChpc0Rldk1vZGUoKSAmJiAhbmFtZSkgewogICAgICAgICAgICAgICAgdGhyb3cgZ2V0VGFibGVUZXh0Q29sdW1uTWlzc2luZ05hbWVFcnJvcigpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0aGlzLl9vcHRpb25zICYmIHRoaXMuX29wdGlvbnMuZGVmYXVsdEhlYWRlclRleHRUcmFuc2Zvcm0pIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9vcHRpb25zLmRlZmF1bHRIZWFkZXJUZXh0VHJhbnNmb3JtKG5hbWUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBuYW1lWzBdLnRvVXBwZXJDYXNlKCkgKyBuYW1lLnNsaWNlKDEpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTeW5jaHJvbml6ZXMgdGhlIGNvbHVtbiBkZWZpbml0aW9uIG5hbWUgd2l0aCB0aGUgdGV4dCBjb2x1bW4gbmFtZS4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3N5bmNDb2x1bW5EZWZOYW1lKCkgewogICAgICAgICAgICBpZiAodGhpcy5jb2x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RhYmxlTW9kdWxlLsm1aW5qID0gybXJtWRlZmluZUluamVjdG9yKHsgZmFjdG9yeTogZnVuY3Rpb24gQ2RrVGFibGVNb2R1bGVfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgQ2RrVGFibGVNb2R1bGUpKCk7IH0gfSk7CiAgICAoZnVuY3Rpb24gKCkgeyAodHlwZW9mIG5nSml0TW9kZSA9PT0gInVuZGVmaW5lZCIgfHwgbmdKaXRNb2RlKSAmJiDJtcm1c2V0TmdNb2R1bGVTY29wZShDZGtUYWJsZU1vZHVsZSwgeyBkZWNsYXJhdGlvbnM6IFtDZGtUYWJsZSwKICAgICAgICAgICAgQ2RrUm93RGVmLAogICAgICAgICAgICBDZGtDZWxsRGVmLAogICAgICAgICAgICBDZGtDZWxsT3V0bGV0LAogICAgICAgICAgICBDZGtIZWFkZXJDZWxsRGVmLAogICAgICAgICAgICBDZGtGb290ZXJDZWxsRGVmLAogICAgICAgICAgICBDZGtDb2x1bW5EZWYsCiAgICAgICAgICAgIENka0NlbGwsCiAgICAgICAgICAgIENka1JvdywKICAgICAgICAgICAgQ2RrSGVhZGVyQ2VsbCwKICAgICAgICAgICAgQ2RrRm9vdGVyQ2VsbCwKICAgICAgICAgICAgQ2RrSGVhZGVyUm93LAogICAgICAgICAgICBDZGtIZWFkZXJSb3dEZWYsCiAgICAgICAgICAgIENka0Zvb3RlclJvdywKICAgICAgICAgICAgQ2RrRm9vdGVyUm93RGVmLAogICAgICAgICAgICBEYXRhUm93T3V0bGV0LAogICAgICAgICAgICBIZWFkZXJSb3dPdXRsZXQsCiAgICAgICAgICAgIEZvb3RlclJvd091dGxldCwKICAgICAgICAgICAgQ2RrVGV4dENvbHVtbl0sIGV4cG9ydHM6IFtDZGtUYWJsZSwKICAgICAgICAgICAgQ2RrUm93RGVmLAogICAgICAgICAgICBDZGtDZWxsRGVmLAogICAgICAgICAgICBDZGtDZWxsT3V0bGV0LAogICAgICAgICAgICBDZGtIZWFkZXJDZWxsRGVmLAogICAgICAgICAgICBDZGtGb290ZXJDZWxsRGVmLAogICAgICAgICAgICBDZGtDb2x1bW5EZWYsCiAgICAgICAgICAgIENka0NlbGwsCiAgICAgICAgICAgIENka1JvdywKICAgICAgICAgICAgQ2RrSGVhZGVyQ2VsbCwKICAgICAgICAgICAgQ2RrRm9vdGVyQ2VsbCwKICAgICAgICAgICAgQ2RrSGVhZGVyUm93LAogICAgICAgICAgICBDZGtIZWFkZXJSb3dEZWYsCiAgICAgICAgICAgIENka0Zvb3RlclJvdywKICAgICAgICAgICAgQ2RrRm9vdGVyUm93RGVmLAogICAgICAgICAgICBEYXRhUm93T3V0bGV0LAogICAgICAgICAgICBIZWFkZXJSb3dPdXRsZXQsCiAgICAgICAgICAgIEZvb3RlclJvd091dGxldCwKICAgICAgICAgICAgQ2RrVGV4dENvbHVtbl0gfSk7IH0pKCk7CgogICAgY29uc3QgX2MwJG4gPSBbW1siY2FwdGlvbiJdXV07CiAgICBjb25zdCBfYzEkZSA9IFsiY2FwdGlvbiJdOwogICAgZnVuY3Rpb24gTWF0VGV4dENvbHVtbl90aF8xX1RlbXBsYXRlKHJmLCBjdHgpIHsgaWYgKHJmICYgMSkgewogICAgICAgIMm1ybVlbGVtZW50U3RhcnQoMCwgInRoIiwgMyk7CiAgICAgICAgybXJtXRleHQoMSk7CiAgICAgICAgybXJtWVsZW1lbnRFbmQoKTsKICAgIH0gaWYgKHJmICYgMikgewogICAgICAgIGNvbnN0IGN0eF9yMCA9IMm1ybVuZXh0Q29udGV4dCgpOwogICAgICAgIMm1ybVzdHlsZVByb3AoInRleHQtYWxpZ24iLCBjdHhfcjAuanVzdGlmeSk7CiAgICAgICAgybXJtWFkdmFuY2UoMSk7CiAgICAgICAgybXJtXRleHRJbnRlcnBvbGF0ZTEoIiAiLCBjdHhfcjAuaGVhZGVyVGV4dCwgIiAiKTsKICAgIH0gfQogICAgZnVuY3Rpb24gTWF0VGV4dENvbHVtbl90ZF8yX1RlbXBsYXRlKH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dLCBbInRhYmxlIiwgIm1hdC10YWJsZSIsICIiXV0sIGhvc3RBdHRyczogWzEsICJtYXQtdGFibGUiXSwgZXhwb3J0QXM6IFsibWF0VGFibGUiXSwgZmVhdHVyZXM6IFvJtcm1UHJvdmlkZXJzRmVhdHVyZShbCiAgICAgICAgICAgICAgICB7IHByb3ZpZGU6IENka1RhYmxlLCB1c2VFeGlzdGluZzogTWF0VGFibGUgfSwKICAgICAgICAgICAgICAgIHsgcHJvdmlkZTogQ0RLX1RBQkxFLCB1c2VFeGlzdGluZzogTWF0VGFibGUgfQogICAgICAgICAgICBdKSwgybXJtUluaGVyaXREZWZpbml0aW9uRmVhdHVyZV0sIG5nQ29udGVudFNlbGVjdG9yczogX2MxJGUsIGRlY2xzOiA0LCB2YXJzOiAwLCBjb25zdHM6IFtbImhlYWRlclJvd091dGxldCIsICIiXSwgWyJyb3dPdXRsZXQiLCAiIl0sIFsiZm9vdGVyUm93T3V0bGV0IiwgIiJdXSwgdGVtcGxhdGU6IGZ1bmN0aW9uIE1hdFRhYmxlX1RlbXBsYXRlKHJmLCBjdHgpIHsgaWYgKHJmICYgMSkgewogICAgICAgICAgICDJtcm1cHJvamVjdGlvbkRlZihfYzAkbik7CiAgICAgICAgICAgIMm1ybVwcm9qZWN0aW9uKDApOwogICAgICAgICAgICDJtcm1ZWxlbWVudENvbnRhaW5lcigxLCAwKTsKICAgICAgICAgICAgybXJtWVsZW1lbnRDb250YWluZXIoMiwgMSk7CiAgICAgICAgICAgIMm1ybVlbGVtZW50Q29udGFpbmVyKDMsIDIpOwogICAgICAgIH0gfSwgZGlyZWN0aXZlczogW0hlYWRlclJvd091dGxldCwgRGF0YVJvd091dGxldCwgRm9vdGVyUm93T3V0bGV0XSwgc3R5bGVzOiBbIm1hdC10YWJsZXtkaXNwbGF5OmJsb2NrfW1hdC1oZWFkZXItcm93e21pbi1oZWlnaHQ6NTZweH1tYXQtcm93LG1hdC1mb290ZXItcm93e21pbi1oZWlnaHQ6NDhweH1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ICBNYXRSb3dEZWYsCiAgICAgICAgICAgIE1hdEZvb3RlckNlbGxEZWYsCiAgICAgICAgICAgIE1hdEZvb3RlclJvd0RlZiwKICAgICAgICAgICAgTWF0SGVhZGVyQ2VsbCwKICAgICAgICAgICAgTWF0Q2VsbCwKICAgICAgICAgICAgTWF0Rm9vdGVyQ2VsbCwKICAgICAgICAgICAgTWF0SGVhZGVyUm93LAogICAgICAgICAgICBNYXRSb3csCiAgICAgICAgICAgIE1hdEZvb3RlclJvdywKICAgICAgICAgICAgTWF0VGV4dENvbHVtbl07IH0sIGltcG9ydHM6IGZ1bmN0aW9uICgpIHsgcmV0dXJuIFtDZGtUYWJsZU1vZHVsZSwKICAgICAgICAgICAgTWF0Q29tbW9uTW9kdWxlXTsgfSwgZXhwb3J0czogZnVuY3Rpb24gKCkgeyByZXR1cm4gW01hdENvbW1vbk1vZHVsZSwKICAgICAgICAgICAgTWF0VGFibGUsCiAgICAgICAgICAgIE1hdEhlYWRlckNlbGxEZWYsCiAgICAgICAgICAgIE1hdEhlYWRlclJvd0RlZiwKICAgICAgICAgICAgTWF0Q29sdW1uRGVmLAogICAgICAgICAgICBNYXRDZWxsRGVmLAogICAgICAgICAgICBNYXRSb3dEZWYsCiAgICAgICAgICAgIE1hdEZvb3RlckNlbGxEZWYsCiAgICAgICAgICAgIE1hdEZvb3RlclJvd0RlZiwKICAgICAgICAgICAgTWF0SGVhZGVyQ2VsbCwKICAgICAgICAgICAgTWF0Q2VsbCwKICAgICAgICAgICAgTWF0Rm9vdGVyQ2VsbCwKICAgICAgICAgICAgTWF0SGVhZGVyUm93LAogICAgICAgICAgICBNYXRSb3csCiAgICAgICAgICAgIE1hdEZvb3RlclJvdywKICAgICAgICAgICAgTWF0VGV4dENvbHVtbl07IH0gfSk7IH0pKCk7CgogICAgLyoqCiAgICAgKiBAZmlsZW92ZXJ2aWV3IGFkZGVkIGJ5IHRzaWNrbGUKICAgICAqIEdlbmVyYXRlZCBmcm9tOiBzcmMvbWF0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bHVtbiBuYW1lKQogICAgICAgICAgICAgKiBtYXRjaGVzIHRoZSBkYXRhJ3MgcHJvcGVydGllcyAoZS5nLiBjb2x1bW4gWHl6IHJlcHJlc2VudHMgZGF0YVsnWHl6J10pLgogICAgICAgICAgICAgKiBNYXkgYmUgc2V0IHRvIGEgY3VzdG9tIGZ1bmN0aW9uIGZvciBkaWZmZXJlbnQgYmVoYXZpb3IuCiAgICAgICAgICAgICAqIEBwYXJhbSBkYXRhIERhdGEgb2JqZWN0IHRoYXQgaXMgYmVpbmcgYWNjZXNzZWQuCiAgICAgICAgICAgICAqIEBwYXJhbSBzb3J0SGVhZGVySWQgVGhlIG5hbWUgb2YgdGhlIGNvbHVtbiB0aGF0IHJlcHJlc2VudHMgdGhlIGRhdGEuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLnNvcnRpbmdEYXRhQWNjZXNzb3IgPSAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZGF0YQogICAgICAgICAgICAgKiBAcGFyYW0gez99IHNvcnRIZWFkZXJJZAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGRhdGEsIHNvcnRIZWFkZXJJZCkgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgdmFsdWUgPSAoKC8qKiBAdHlwZSB7P30gKi8gKGRhdGEpKSlbc29ydEhlYWRlcklkXTsKICAgICAgICAgICAgICAgIGlmIChfaXNOdW1iZXJWYWx1ZSh2YWx1ZSkpIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgbnVtYmVyVmFsdWUgPSBOdW1iZXIodmFsdWUpOwogICAgICAgICAgICAgICAgICAgIC8vIE51bWJlcnMgYmV5b25kIGBNQVhfU0FGRV9JTlRFR0VSYCBjYW4ndCBiZSBjb21wYXJlZCByZWxpYW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ZSBjdXJyZW50IHNvcnQgc3RhdGUuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLnNvcnREYXRhID0gKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGRhdGEKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBzb3J0CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoZGF0YSwgc29ydCkgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgYWN0aXZlID0gc29ydC5hY3RpdmU7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBkaXJlY3Rpb24gPSBzb3J0LmRpcmVjdGlvbjsKICAgICAgICAgICAgICAgIGlmICghYWN0aXZlIHx8IGRpcmVjdGlvbiA9PSAnJykgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBkYXRhOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIGRhdGEuc29ydCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGEKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gYgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKGEsIGIpID0+IHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgbGV0IHZhbHVlQSA9IHRoaXMuc29ydGluZ0RhdGFBY2Nlc3NvcihhLCBhY3RpdmUpOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBsZXQgdmFsdWVCID0gdGhpcy5zb3J0aW5nRGF0YUFjY2Vzc29yKGIsIGFjdGl2ZSk7CiAgICAgICAgICAgICAgICAgICAgLy8gSWYgYm90aCB2YWx1ZUEgYW5kIHZhbHVlQiBleGlzdCAodHJ1dGh5KSwgdGhlbiBjb21wYXJlIHRoZSB0d28uIE90aGVyd2lzZSwgY2hlY2sgaWYKICAgICAgICAgICAgICAgICAgICAvLyBvbmUgdmFsdWUgZXhpc3RzIHdoaWxlIHRoZSBvdGhlciBkb2Vzbid0LiBJbiB0aGlzIGNhc2UsIGV4aXN0aW5nIHZhbHVlIHNob3VsZCBjb21lIGxhc3QuCiAgICAgICAgICAgICAgICAgICAgLy8gVGhpcyBhdm9pZHMgaW5jb25zaXN0ZW50IHJlc3VsdHMgd2hlbiBjb21wYXJpbmcgdmFsdWVzIHRvIHVuZGVmaW5lZC9udWxsLgogICAgICAgICAgICAgICAgICAgIC8vIElmIG5laXRoZXIgdmFsdWUgZXhpc3RzLCByZXR1cm4gMCAoZXF1YWwpLgogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBsZXQgY29tcGFyYXRvclJlc3VsdCA9IDA7CiAgICAgICAgICAgICAgICAgICAgaWYgKHZhbHVlQSAhPSBudWxsICYmIHZhbHVlQiAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIENoZWNrIGlmIG9uZSB2YWx1ZSBpcyBncmVhdGVyIHRoYW4gdGhlIG90aGVyOyBpZiBlcXVhbCwgY29tcGFyYXRvclJlc3VsdCBzaG91bGQgcmVtYWluIDAuCiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2YWx1ZUEgPiB2YWx1ZUIpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBhcmF0b3JSZXN1bHQgPSAxOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHZhbHVlQSA8IHZhbHVlQikgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tcGFyYXRvclJlc3VsdCA9IC0xOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHZhbHVlQSAhPSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBhcmF0b3JSZXN1bHQgPSAxOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICh2YWx1ZUIgIT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgICAgICBjb21wYXJhdG9yUmVzdWx0ID0gLTE7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHJldHVybiBjb21wYXJhdG9yUmVzdWx0ICogKGRpcmVjdGlvbiA9PSAnYXNjJyA/IDEgOiAtMSk7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQ2hlY2tzIGlmIGEgZGF0YSBvYmplY3QgbWF0Y2hlcyB0aGUgZGF0YSBzb3VyY2UncyBmaWx0ZXIgc3RyaW5nLiBCeSBkZWZhdWx0LCBlYWNoIGRhdGEgb2JqZWN0CiAgICAgICAgICAgICAqIGlzIGNvbnZlcnRlZCB0byBhIHN0cmluZyBvZiBpdHMgcHJvcGVydGllcyBhbmQgcmV0dXJucyB0cnVlIGlmIHRoZSBmaWx0ZXIgaGFzCiAgICAgICAgICAgICAqIGF0IGxlYXN0IG9uZSBvY2N1cnJlbmNlIGluIHRoYXQgc3RyaW5nLiBCeSBkZWZhdWx0LCB0aGUgZmlsdGVyIHN0cmluZyBoYXMgaXRzIHdoaXRlc3BhY2UKICAgICAgICAgICAgICogdHJpbW1lZCBhbmQgdGhlIG1hdGNoIGlzIGNhc2UtaW5zZW5zaXRpdmUuIE1heSBiZSBvdmVycmlkZGVuIGZvciBhIGN1c3RvbSBpbXBsZW1lbnRhdGlvbiBvZgogICAgICAgICAgICAgKiBmaWx0ZXIgbWF0Y2hpbmcuCiAgICAgICAgICAgICAqIEBwYXJhbSBkYXRhIERhdGEgb2JqZWN0IHVzZWQgdG8gY2hlY2sgYWdhaW5zdCB0aGUgZmlsdGVyLgogICAgICAgICAgICAgKiBAcGFyYW0gZmlsdGVyIEZpbHRlciBzdHJpbmcgdGhhdCBoYXMgYmVlbiBzZXQgb24gdGhlIGRhdGEgc291cmNlLgogICAgICAgICAgICAgKiBAcmV0dXJuIFdoZXRoZXIgdGhlIGZpbHRlciBtYXRjaGVzIGFnYWluc3QgdGhlIGRhdGEKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuZmlsdGVyUHJlZGljYXRlID0gKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGRhdGEKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBmaWx0ZXIKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChkYXRhLCBmaWx0ZXIpID0+IHsKICAgICAgICAgICAgICAgIC8vIFRyYW5zZm9ybSB0aGUgZGF0YSBpbnRvIGEgbG93ZXJjYXNlIHN0cmluZyBvZiBhbGwgcHJvcGVydHkgdmFsdWVzLgogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZGF0YVN0ciA9IE9iamVjdC5rZXlzKGRhdGEpLnJlZHVjZSgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGN1cnJlbnRUZXJtCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGtleQogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKGN1cnJlbnRUZXJtLCBrZXkpID0+IHsKICAgICAgICAgICAgICAgICAgICAvLyBVc2UgYW4gb2JzY3VyZSBVbmljb2RlIGNoYXJhY3RlciB0byBkZWxpbWl0IHRoZSB3b3JkcyBpbiB0aGUgY29uY2F0ZW5hdGVkIHN0cmluZy4KICAgICAgICAgICAgICAgICAgICAvLyBUaGlzIGF2b2lkcyBt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LTE7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICB0aGlzLl9kYXRhID0gbmV3IEJlaGF2aW9yU3ViamVjdChpbml0aWFsRGF0YSk7CiAgICAgICAgICAgIHRoaXMuX3VwZGF0ZUNoYW5nZVN1YnNjcmlwdGlvbigpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBcnJheSBvZiBkYXRhIHRoYXQgc2hvdWxkIGJlIHJlbmRlcmVkIGJ5IHRoZSB0YWJsZSwgd2hlcmUgZWFjaCBvYmplY3QgcmVwcmVzZW50cyBvbmUgcm93LgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGRhdGEoKSB7IHJldHVybiB0aGlzLl9kYXRhLnZhbHVlOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBkYXRhCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgZGF0YShkYXRhKSB7IHRoaXMuX2RhdGEubmV4dChkYXRhKTsgfQogICAgICAgIC8qKgogICAgICAgICAqIEZpbHRlciB0ZXJtIHRoYXQgc2hvdWxkIGJlIHVzZWQgdG8gZmlsdGVyIG91dCBvYmplY3RzIGZyb20gdGhlIGRhdGEgYXJyYXkuIFRvIG92ZXJyaWRlIGhvdwogICAgICAgICAqIGRhdGEgb2JqZWN0cyBtYXRjaCB0byB0aGlzIGZpbHRlciBzdHJpbmcsIHByb3ZpZGUgYSBjdXN0b20gZnVuY3Rpb24gZm9yIGZpbHRlclByZWRpY2F0ZS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBmaWx0ZXIoKSB7IHJldHVybiB0aGlzLl9maWx0ZXIudmFsdWU7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGZpbHRlcgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IGZpbHRlcihmaWx0Z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ydC5pbml0aWFsaXplZCkpKSA6CiAgICAgICAgICAgICAgICBvZihudWxsKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwYWdlQ2hhbmdlID0gdGhpcy5fcGFnaW5hdG9yID8KICAgICAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovIChtZXJnZSh0aGlzLl9wYWdpbmF0b3IucGFnZSwgdGhpcy5faW50ZXJuYWxQYWdlQ2hhbmdlcywgdGhpcy5fcGFnaW5hdG9yLmluaXRpYWxpemVkKSkpIDoKICAgICAgICAgICAgICAgIG9mKG51bGwpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGRhdGFTdHJlYW0gPSB0aGlzLl9kYXRhOwogICAgICAgICAgICAvLyBXYXRjaCBmb3IgYmFzZSBkYXRhIG9yIGZpbHRlciBjaGFuZ2VzIHRvIHByb3ZpZGUgYSBmaWx0ZXJlZCBzZXQgb2YgZGF0YS4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBmaWx0ZXJlZERhdGEgPSBjb21iaW5lTGF0ZXN0KFtkYXRhU3RyZWFtLCB0aGlzLl9maWx0ZXJdKQogICAgICAgICAgICAgICAgLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChbZGF0YV0pID0+IHRoaXMuX2ZpbHRlckRhdGEoZGF0YSkpKSk7CiAgICAgICAgICAgIC8vIFdhdGNoIGZvciBmaWx0ZXJlZCBkYXRhIG9yIHNvcnQgY2hhbmdlcyB0byBwcm92aWRlIGFuIG9yZGVyZWQgc2V0IG9mIGRhdGEuCiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgb3JkZXJlZERhdGEgPSBjb21iaW5lTGF0ZXN0KFtmaWx0ZXJlZERhdGEsIHNvcnRDaGFuZ2VdKQogICAgICAgICAgICAgICAgLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChbZGF0YV0pID0+IHRoaXMuX29yZGVyRGF0YShkYXRhKSkpKTsKICAgICAgICAgICAgLy8gV2F0Y2ggZm9yIG9yZGVyZWQgZGF0YSBvciBwYWdlIGNoYW5nZXMgdG8gcHJvdmlkZSBhIHBhZ2VkIHNldCBvZiBkYXRhLgogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHBhZ2luYXRlZERhdGEgPSBjb21iaW5lTGF0ZXN0KFtvcmRlcmVkRGF0YSwgcGFnZUNoYW5nZV0pCiAgICAgICAgICAgICAgICAucGlwZShtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKFtkYXRhXSkgPT4gdGhpcy5fcGFnZURhdGEoZGF0YSkpKSk7CiAgICAgICAgICAgIC8vIFdhdGNoZWQgZm9yIHBhZ2VkIGRhdGEgY2hhbmdlcyBhbmQgc2VuZCB0aGUgcmVzdWx0IHRvIHRoZSB0YWJsZSB0byByZW5kZXIuCiAgICAgICAgICAgIHRoaXMuX3JlbmRlckNoYW5nZXNTdWJzY3JpcHRpb24udW5zdWJzY3JpYmUoKTsKICAgICAgICAgICAgdGhpcy5fcmVuZGVyQ2hhbmdlc1N1YnNjcmlwdGlvbiA9IHBhZ2luYXRlZERhdGEuc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBkYXRhCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBkYXRhID0+IHRoaXMuX3JlbmRlckRhdGEubmV4dChkYXRhKSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZXR1cm5zIGEgZmlsdGVyZWQgZGF0YSBhcnJheSB3aGVyZSBlYWNoIGZpbHRlciBvYmplY3QgY29udGFpbnMgdGhlIGZpbHRlciBzdHJpbmcgd2l0aGluCiAgICAgICAgICogdGhlIHJlc3VsdCBvZiB0aGUgZmlsdGVyVGVybUFjY2Vzc29yIGZ1bmN0aW9uLiBJZiBubyBmaWx0ZXIgaXMgc2V0LCByZXR1cm5zIHRoZSBkYXRhIGFycmF5CiAgICAgICAgICogYXMgcHJvdmlkZWQuCiAgICAgICAgICogQHBhcmFtIHs/fSBkYXRhCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZmlsdGVyRGF0YShkYXRhKSB7CiAgICAgICAgICAgIC8vIElmIHRoZXJlIGlzIGEgZmlsdGVyIHN0cmluZywgZmlsdGVyIG91dCBkYXRhIHRoYXQgZG9lcyBub3QgY29udGFpbiBpdC4KICAgICAgICAgICAgLy8gRWFjaCBkYXRhIG9iamVjdCBpcyBjb252ZXJ0ZWQgdG8gYSBzdHJpbmcgdXNpbmcgdGhlIGZ1bmN0aW9uIGRlZmluZWQgYnkgZmlsdGVyVGVybUFjY2Vzc29yLgogICAgICAgICAgICAvLyBNYXkgYmUgb3ZlcnJpZGRlbiBmb3IgY3VzdG9taXphdGlvbi4KICAgICAgICAgICAgdGhpcy5maWx0ZXJlZERhdGEgPQogICAgICAgICAgICAgICAgIXRoaXMuZmlsdGVyID8gZGF0YSA6IGRhdGEuZmlsdGVyKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gb2JqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBvYmogPT4gdGhpcy5maWx0ZXJQcmVkaWNhdGUob2JqLCB0aGlzLmZpbHRlcikpKTsKICAgICAgICAgICAgaWYgKHRoaXMucGFnaW5hdG9yKSB7CiAgICAgICAgICAgICAgICB0aGlzLl91cGRhdGVQYWdpbmF0b3IodGhpcy5maWx0ZXJlZERhdGEubGVuZ3RoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpcy5maWx0ZXJlZERhdGE7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgYSBzb3J0ZWQgY29weSBvZiB0aGUgZGF0YSBpZiBNYXRTb3J0IGhhcyBhIHNvcnQgYXBwbGllZCwgb3RoZXJ3aXNlIGp1c3QgcmV0dXJucyB0aGUKICAgICAgICAgKiBkYXRhIGFycmF5IGFzIHByb3ZpZGVkLiBVc2VzIHRoZSBkZWZhdWx0IGRhdGEgYWNjZXNzb3IgZm9yIGRhdGEgbG9va3VwLCB1bmxlc3MgYQogICAgICAgICAqIHNvcnREYXRhQWNjZXNzb3IgZnVuY3Rpb24gaXMgZGVmaW5lZC4KICAgICAgICAgKiBAcGFyYW0gez99IGRhdGEKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9vcmRlckRhdGEoZGF0YSkgewogICAgICAgICAgICAvLyBJZiB0aGVyZSBpcyBubyBhY3RpdmUgc29ydCBvciBkaXJlY3Rpb24sIHJldHVybiB0aGUgZGF0YSB3aXRob3V0IHRyeWluZyB0byBzb3J0LgogICAgICAgICAgICBpZiAoIXRoaXMuc29ydCkgewogICAgICAgICAgICAgICAgcmV0dXJuIGRhdGE7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXMuc29ydERhdGEoZGF0YS5zbGljZSgpLCB0aGlzLnNvcnQpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZXR1cm5zIGEgcGFnZWQgc2xpY2Ugb2YgdGhlIHByb3ZpZGVkIGRhdGEgYXJyYXkgYWNjb3JkaW5nIHRvIHRoZSBwcm92aWRlZCBNYXRQYWdpbmF0b3IncyBwYWdlCi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ICAgICAgICovCiAgICAgICAgX3VwZGF0ZVBhZ2luYXRvcihmaWx0ZXJlZERhdGFMZW5ndGgpIHsKICAgICAgICAgICAgUHJvbWlzZS5yZXNvbHZlKCkudGhlbigoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBwYWdpbmF0b3IgPSB0aGlzLnBhZ2luYXRvcjsKICAgICAgICAgICAgICAgIGlmICghcGFnaW5hdG9yKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcGFnaW5hdG9yLmxlbmd0aCA9IGZpbHRlcmVkRGF0YUxlbmd0aDsKICAgICAgICAgICAgICAgIC8vIElmIHRoZSBwYWdlIGluZGV4IGlzIHNldCBiZXlvbmQgdGhlIHBhZ2UsIHJlZHVjZSBpdCB0byB0aGUgbGFzdCBwYWdlLgogICAgICAgICAgICAgICAgaWYgKHBhZ2luYXRvci5wYWdlSW5kZXggPiAwKSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGxhc3RQYWdlSW5kZXggPSBNYXRoLmNlaWwocGFnaW5hdG9yLmxlbmd0aCAvIHBhZ2luYXRvci5wYWdlU2l6ZSkgLSAxIHx8IDA7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IG5ld1BhZ2VJbmRleCA9IE1hdGgubWluKHBhZ2luYXRvci5wYWdlSW5kZXgsIGxhc3RQYWdlSW5kZXgpOwogICAgICAgICAgICAgICAgICAgIGlmIChuZXdQYWdlSW5kZXggIT09IHBhZ2luYXRvci5wYWdlSW5kZXgpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcGFnaW5hdG9yLnBhZ2VJbmRleCA9IG5ld1BhZ2VJbmRleDsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gU2luY2UgdGhlIHBhZ2luYXRvciBvbmx5IGVtaXRzIGFmdGVyIHVzZXItZ2VuZXJhdGVkIGNoYW5nZXMsCiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHdlIG5lZWQgb3VyIG93biBzdHJlYW0gc28gd2Uga25vdyB0byBzaG91bGQgcmUtcmVuZGVyIHRoZSBkYXRhLgogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9pbnRlcm5hbFBhZ2VDaGFuZ2VzLm5leHQoKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVXNlZCBieSB0aGUgTWF0VGFibGUuIENhbGxlZCB3aGVuIGl0IGNvbm5lY3RzIHRvIHRoZSBkYXRhIHNvdXJjZS4KICAgICAgICAgKiBcQGRvY3MtcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgY29ubmVjdCgpIHsgcmV0dXJuIHRoaXMuX3JlbmRlckRhdGE7IH0KICAgICAgICAvKioKICAgICAgICAgKiBVc2VkIGJ5IHRoZSBNYXRUYWJsZS4gQ2FsbGVkIHdoZW4gaXQgaXMgZGVzdHJveWVkLiBOby1vcC4KICAgICAgICAgKiBcQGRvY3MtcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZGlzY29ubmVjdCgpIHsgfQogICAgfQoKICAgIGNvbnN0IF9jMCRvID0gWyJkaWFsb2dQb3B1cCJdOwogICAgY29uc3QgX2MxJGYgPSBbImh1ZVNsaWRlciJdOwogICAgY29uc3QgX2MyJDYgPSBbImFscGhhU2xpZGVyIl07CiAgICBmdW5jdGlvbiBDb2xvclBpY2tlckNvbXBvbmVudF9kaXZfMl9UZW1wbGF0ZShyZiwgY3R4KSB7IGlmIChyZiAmIDEpIHsKICAgICAgICDJtcm1ZWxlbWVudCgwLCAiZGl2Iik7CiAgICB9IGlmIChyZiAmIDIpIHsKICAgICAgICBjb25zdCBjdHhfcjEgPSDJtcm1bmV4dENvbnRleHQoKTsKICAgICAgICDJtcm1Y2xhc3NN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SB7CiAgICAgICAgICAgIHRoaXMuaCA9IGg7CiAgICAgICAgICAgIHRoaXMucyA9IHM7CiAgICAgICAgICAgIHRoaXMudiA9IHY7CiAgICAgICAgICAgIHRoaXMuYSA9IGE7CiAgICAgICAgfQogICAgfQogICAgY2xhc3MgSHNsYSB7CiAgICAgICAgY29uc3RydWN0b3IoaCwgcywgbCwgYSkgewogICAgICAgICAgICB0aGlzLmggPSBoOwogICAgICAgICAgICB0aGlzLnMgPSBzOwogICAgICAgICAgICB0aGlzLmwgPSBsOwogICAgICAgICAgICB0aGlzLmEgPSBhOwogICAgICAgIH0KICAgIH0KICAgIGNsYXNzIENteWsgewogICAgICAgIGNvbnN0cnVjdG9yKGMsIG0sIHksIGssIGEgPSAxKSB7CiAgICAgICAgICAgIHRoaXMuYyA9IGM7CiAgICAgICAgICAgIHRoaXMubSA9IG07CiAgICAgICAgICAgIHRoaXMueSA9IHk7CiAgICAgICAgICAgIHRoaXMuayA9IGs7CiAgICAgICAgICAgIHRoaXMuYSA9IGE7CiAgICAgICAgfQogICAgfQoKICAgIGZ1bmN0aW9uIGRldGVjdElFKCkgewogICAgICAgIGxldCB1YSA9ICcnOwogICAgICAgIGlmICh0eXBlb2YgbmF2aWdhdG9yICE9PSAndW5kZWZpbmVkJykgewogICAgICAgICAgICB1YSA9IG5hdmlnYXRvci51c2VyQWdlbnQudG9Mb3dlckNhc2UoKTsKICAgICAgICB9CiAgICAgICAgY29uc3QgbXNpZSA9IHVhLmluZGV4T2YoJ21zaWUgJyk7CiAgICAgICAgaWYgKG1zaWUgPiAwKSB7CiAgICAgICAgICAgIC8vIElFIDEwIG9yIG9sZGVyID0+IHJldHVybiB2ZXJzaW9uIG51bWJlcgogICAgICAgICAgICByZXR1cm4gcGFyc2VJbnQodWEuc3Vic3RyaW5nKG1zaWUgKyA1LCB1YS5pbmRleE9mKCcuJywgbXNpZSkpLCAxMCk7CiAgICAgICAgfQogICAgICAgIC8vIE90aGVyIGJyb3dzZXIKICAgICAgICByZXR1cm4gZmFsc2U7CiAgICB9CiAgICBsZXQgVGV4dERpcmVjdGl2ZSA9IGNsYXNzIFRleHREaXJlY3RpdmUgewogICAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgICAgICB0aGlzLm5ld1ZhbHVlID0gbmV3IEV2ZW50RW1pdHRlcigpOwogICAgICAgIH0KICAgICAgICBpbnB1dENoYW5nZShldmVudCkgewogICAgICAgICAgICBjb25zdCB2YWx1ZSA9IGV2ZW50LnRhcmdldC52YWx1ZTsKICAgICAgICAgICAgaWYgKHRoaXMucmcgPT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICAgICAgdGhpcy5uZXdWYWx1ZS5lbWl0KHZhbHVlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIGNvbnN0IG51bWVyaWMgPSBwYXJzZUZsb2F0KHZhbHVlKTsKICAgICAgICAgICAgICAgIHRoaXMubmV3VmFsdWUuZW1pdCh7IHY6IG51bWVyaWMsIHJnOiB0aGlzLnJnIH0pOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfTsKICAgIFRleHREaXJlY3RpdmUuybVmYWMgPSBmdW5jdGlvbiBUZXh0RGlyZWN0aXZlX0ZhY3RvcnkodCkgeyByZXR1cm4gbmV3ICh0IHx8IFRleHREaXJlY3RpdmUpKCk7IH07CiAgICBUZXh0RGlyZWN0aXZlLsm1ZGlyID0gybXJtWRlZmluZURpcmVjdGl2ZSh7IHR5cGU6IFRleHREaXJlY3RpdmUsIHNlbGVjdG9yczogW1siIiwgInRleHQiLCAiIl1dLCBob3N0QmluZGluZ3M6IGZ1bmN0aW9uIFRleHREaXJlY3RpdmVfSG9zdEJpbmRpbmdzKHJmLCBjdHgpIHsgaWYgKHJmICYgMSkgewogICAgICAgICAgICDJtcm1bGlzdGVuZXIoImlucHV0IiwgZnVuY3Rpb24gVGV4dERpcmVjdGl2ZV9pbnB1dF9Ib3N0QmluZGluZ0hhbmRsZXIoJGV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zdGVuZXJTdG9wID0gKCkgPT4gdGhpcy5zdG9wKCk7CiAgICAgICAgfQogICAgICAgIG1vdXNlRG93bihldmVudCkgewogICAgICAgICAgICB0aGlzLnN0YXJ0KGV2ZW50KTsKICAgICAgICB9CiAgICAgICAgdG91Y2hTdGFydChldmVudCkgewogICAgICAgICAgICB0aGlzLnN0YXJ0KGV2ZW50KTsKICAgICAgICB9CiAgICAgICAgbW92ZShldmVudCkgewogICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpOwogICAgICAgICAgICB0aGlzLnNldEN1cnNvcihldmVudCk7CiAgICAgICAgfQogICAgICAgIHN0YXJ0KGV2ZW50KSB7CiAgICAgICAgICAgIHRoaXMuc2V0Q3Vyc29yKGV2ZW50KTsKICAgICAgICAgICAgZXZlbnQuc3RvcFByb3BhZ2F0aW9uKCk7CiAgICAgICAgICAgIGRvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIoJ21vdXNldXAnLCB0aGlzLmxpc3RlbmVyU3RvcCk7CiAgICAgICAgICAgIGRvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIoJ3RvdWNoZW5kJywgdGhpcy5saXN0ZW5lclN0b3ApOwogICAgICAgICAgICBkb2N1bWVudC5hZGRFdmVudExpc3RlbmVyKCdtb3VzZW1vdmUnLCB0aGlzLmxpc3RlbmVyTW92ZSk7CiAgICAgICAgICAgIGRvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIoJ3RvdWNobW92ZScsIHRoaXMubGlzdGVuZXJNb3ZlKTsKICAgICAgICAgICAgdGhpcy5kcmFnU3RhcnQuZW1pdCgpOwogICAgICAgIH0KICAgICAgICBzdG9wKCkgewogICAgICAgICAgICBkb2N1bWVudC5yZW1vdmVFdmVudExpc3RlbmVyKCdtb3VzZXVwJywgdGhpcy5saXN0ZW5lclN0b3ApOwogICAgICAgICAgICBkb2N1bWVudC5yZW1vdmVFdmVudExpc3RlbmVyKCd0b3VjaGVuZCcsIHRoaXMubGlzdGVu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nNpb24gewogICAgICAgIGNvbnN0cnVjdG9yKGgsIHMsIHYsIGEpIHsKICAgICAgICAgICAgdGhpcy5oID0gaDsKICAgICAgICAgICAgdGhpcy5zID0gczsKICAgICAgICAgICAgdGhpcy52ID0gdjsKICAgICAgICAgICAgdGhpcy5hID0gYTsKICAgICAgICB9CiAgICB9CgogICAgbGV0IENvbG9yUGlja2VyU2VydmljZSA9IGNsYXNzIENvbG9yUGlja2VyU2VydmljZSB7CiAgICAgICAgY29uc3RydWN0b3IoKSB7CiAgICAgICAgICAgIHRoaXMuYWN0aXZlID0gbnVsbDsKICAgICAgICB9CiAgICAgICAgc2V0QWN0aXZlKGFjdGl2ZSkgewogICAgICAgICAgICBpZiAodGhpcy5hY3RpdmUgJiYgdGhpcy5hY3RpdmUgIT09IGFjdGl2ZSAmJiB0aGlzLmFjdGl2ZS5jcERpYWxvZ0Rpc3BsYXkgIT09ICdpbmxpbmUnKSB7CiAgICAgICAgICAgICAgICB0aGlzLmFjdGl2ZS5jbG9zZURpYWxvZygpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuYWN0aXZlID0gYWN0aXZlOwogICAgICAgIH0KICAgICAgICBoc3ZhMmhzbGEoaHN2YSkgewogICAgICAgICAgICBjb25zdCBoID0gaHN2YS5oLCBzID0gaHN2YS5zLCB2ID0gaHN2YS52LCBhID0gaHN2YS5hOwogICAgICAgICAgICBpZiAodiA9PT0gMCkgewogICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBIc2xhKGgsIDAsIDAsIGEpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKHMgPT09IDAgJiYgdiA9PT0gMSkgewogICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBIc2xhKGgsIDEsIDEsIGEpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgY29uc3QgbCA9IHYgKiAoMiAtIHMpIC8gMjsKICAgICAgICAgICAgICAgIHJldHVybiBuZXcgSHNsYShoLCB2ICogcyAvICgxIC0gTWF0aC5hYnMoMiAqIGwgLSAxKSksIGwsIGEpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGhzbGEyaHN2YShoc2xhKSB7CiAgICAgICAgICAgIGNvbnN0IGggPSBNYXRoLm1pbihoc2xhLmgsIDEpLCBzID0gTWF0aC5taW4oaHNsYS5zLCAxKTsKICAgICAgICAgICAgY29uc3QgbCA9IE1hdGgubWluKGhzbGEubCwgMSksIGEgPSBNYXRoLm1pbihoc2xhLmEsIDEpOwogICAgICAgICAgICBpZiAobCA9PT0gMCkgewogICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBIc3ZhKGgsIDAsIDAsIGEpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgY29uc3QgdiA9IGwgKyBzICogKDEgLSBNYXRoLmFicygyICogbCAtIDEpKSAvIDI7CiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEhzdmEoaCwgMiAqICh2IC0gbCkgLyB2LCB2LCBhKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBoc3ZhVG9SZ2JhKGhzdmEpIHsKICAgICAgICAgICAgbGV0IHIsIGcsIGI7CiAgICAgICAgICAgIGNvbnN0IGggPSBoc3ZhLmgsIHMgPSBoc3ZhLnMsIHYgPSBoc3ZhLnYsIGEgPSBoc3ZhLmE7CiAgICAgICAgICAgIGNvbnN0IGkgPSBNYXRoLmZsb29yKGggKiA2KTsKICAgICAgICAgICAgY29uc3QgZiA9IGggKiA2IC0gaTsKICAgICAgICAgICAgY29uc3QgcCA9IHYgKiAoMSAtIHMpOwogICAgICAgICAgICBjb25zdCBxID0gdiAqICgxIC0gZiAqIHMpOwogICAgICAgICAgICBjb25zdCB0ID0gdiAqICgxIC0gKDEgLSBmKSAqIHMpOwogICAgICAgICAgICBzd2l0Y2ggKGkgJSA2KSB7CiAgICAgICAgICAgICAgICBjYXNlIDA6CiAgICAgICAgICAgICAgICAgICAgciA9IHYsIGcgPSB0LCBiID0gcDsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIGNhc2UgMToKICAgICAgICAgICAgICAgICAgICByID0gcSwgZyA9IHYsIGIgPSBwOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgY2FzZSAyOgogICAgICAgICAgICAgICAgICAgIHIgPSBwLCBnID0gdiwgYiA9IHQ7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBjYXNlIDM6CiAgICAgICAgICAgICAgICAgICAgciA9IHAsIGcgPSBxLCBiID0gdjsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIGNhc2UgNDoKICAgICAgICAgICAgICAgICAgICByID0gdCwgZyA9IHAsIGIgPSB2OwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgY2FzZSA1OgogICAgICAgICAgICAgICAgICAgIHIgPSB2LCBnID0gcCwgYiA9IHE7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICAgICAgIHIgPSAwLCBnID0gMCwgYiA9IDA7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIG5ldyBSZ2JhKHIsIGcsIGIsIGEpOwogICAgICAgIH0KICAgICAgICBjbXlrVG9SZ2IoY215aykgewogICAgICAgICAgICBjb25zdCByID0gKDEgLSBjbXlrLmMpICogKDEgLSBjbXlrLmspOwogICAgICAgICAgICBjb25zdCBnID0gKDEgLSBjbXlrLm0pICogKDEgLSBjbXlrLmspOwogICAgICAgICAgICBjb25zdCBiID0gKDEgLSBjbXlrLnkpICogKDEgLSBjbXlrLmspOwogICAgICAgICAgICByZXR1cm4gbmV3IFJnYmEociwgZywgYiwgY215ay5hKTsKICAgICAgICB9CiAgICAgICAgcmdiYVRvQ215ayhyZ2JhKSB7CiAgICAgICAgICAgIGNvbnN0IGsgPSAxIC0gTWF0aC5tYXgocmdiYS5yLCByZ2JhLmcsIHJnYmEuYik7CiAgICAgICAgICAgIGlmIChrID09PSAxKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IENteWsoMCwgMCwgMCwgMSwgcmdiYS5hKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIGNvbnN0IGMgPSAoMSAtIHJnYmEuciAtIGspIC8gKDEgLSBrKTsKICAgICAgICAgICAgICAgIGNvbnN0IG0gPSAoMSAtIHJnYmEuZyAtIGspIC8gKDEgLSBrKTsKICAgICAgICAgICAgICAgIGNvbnN0IHkgPSAoMSAtIHJnYmEuYiAtIGspIC8gKDEgLSBrKTsKICAgICAgICAgICAgICAgIHJldHVybiBuZXcgQ215ayhjLCBtLCB5LCBrLCByZ2JhLmEpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJnYmFUb0hzdmEocmdiYSkgewogICAgICAgICAgICBsZXQgaCwgczsKICAgICAgICAgICAgY29uc3QgciA9IE1hdGgubWluKHJnYmEuciwgMSksIGcgPSBNYXRoLm1pbihyZ2JhLmcsIDEpOwogICAgICAgICAgICBjb25zdCBiID0gTWF0aC5taW4ocmdiYS5iLCAxKSwgYSA9IE1hdGgubWluKHJnYmEuYSwgMSk7CiAgICAgICAgICAgIGNvbnN0IG1heCA9IE1hdGgubWF4KHIsIGcsIGIpLCBtaW4gPSBNYXRoLm1pbihyLCBnLCBiKTsKICAgICAgICAgICAgY29uc3QgdiA9IG1heCwgZCA9IG1heCAtIG1pbjsKICAgICAgICAgICAgcyA9IChtYXggPT09IDApID8gMCA6IGQgLyBtYXg7CiAgICAgICAgICAgIGlmIChtYXggPT09IG1pbikgewogICAgICAgICAgICAgICAgaCA9IDA7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBzd2l0Y2ggKG1heCkgewogICAgICAgICAgICAgICAgICAgIGNhc2UgcjoKICAgICAgICAgICAgICAgICAgICAgICAgaCA9IChnIC0gYikgLyBkICsgKGcgPCBiID8gNiA6IDApOwogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICBjYXNlIGc6CiAgICAgICAgICAgICAgICAgICAgICAgIGggPSAoYiAtIHIpIC8gZCArIDI7CiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgIGNhc2UgYjoKICAgICAgICAgICAgICAgICAgICAgICAgaCA9IChyIC0gZykgLyBkICsgNDsKICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgICAgICAgICAgICAgaCA9IDA7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBoIC89IDY7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIG5ldyBIc3ZhKGgsIHMsIHYsIGEpOwogICAgICAgIH0KICAgICAgICByZ2JhVG9IZXgocmdiYSwgYWxsb3dIZXg4KSB7CiAgICAgICAgICAgIC8qIHRzbGludDpkaXNhYmxlOm5vLWJpdHdpc2UgKi8KICAgICAgICAgICAgbGV0IGhleCA9ICcjJyArICgoMSA8PCAyNCkgfCAocmdiYS5yIDw8IDE2KSB8IChyZ2JhLmcgPDwgOCkgfCByZ2JhLmIpLnRvU3RyaW5nKDE2KS5zdWJzdHIoMSk7CiAgICAgICAgICAgIGlmIChhbGxvd0hleDgpIHsKICAgICAgICAgICAgICAgIGhleCArPSAoKDEgPDwgOCkgfCBNYXRoLnJvdW5kKHJnYmEuYSAqIDI1NSkpLnRvU3RyaW5nKDE2KS5zdWJzdHIoMSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyogdHNsaW50OmVuYWJsZTpuby1iaXR3aXNlICovCiAgICAgICAgICAgIHJldHVybiBoZXg7CiAgICAgICAgfQogICAgICAgIG5vcm1hbGl6ZUNNWUsoY215aykgewogICAgICAgICAgICByZXR1cm4gbmV3IENteWsoY215ay5jIC8gMTAwLCBjbXlrLm0gLyAxMDAsIGNteWsueSAvIDEwMCwgY215ay5rIC8gMTAwLCBjbXlrLmEpOwogICAgICAgIH0KICAgICAgICBkZW5vcm1hbGl6ZUNNWUsoY215aykgewogICAgICAgICAgICByZXR1cm4gbmV3IENteWsoTWF0aC5mbG9vcihjbXlrLmMgKiAxMDApLCBNYXRoLmZsb29yKGNteWsubSAqIDEwMCksIE1hdGguZmxvb3IoY215ay55ICogMTAwKSwgTWF0aC5mbG9vcihjbXlrLmsgKiAxMDApLCBjbXlrLmEpOwogICAgICAgIH0KICAgICAgICBkZW5vcm1hbGl6ZVJHQkEocmdiYSkgewogICAgICAgICAgICByZXR1cm4gbmV3IFJnYmEoTWF0aC5yb3VuZChyZ2JhLnIgKiAyNTUpLCBNYXRoLnJvdW5kKHJnYmEuZyAqIDI1NSksIE1hdGgucm91bmQocmdiYS5iICogMjU1KSwgcmdiYS5hKTsKICAgICAgICB9CiAgICAgICAgc3RyaW5nVG9Ic3ZhKGNvbG9yU3RyaW5nID0gJycsIGFsbG93SGV4OCA9IGZhbHNlKSB7CiAgICAgICAgICAgIGxldCBoc3ZhID0gbnVsbDsKICAgICAgICAgICAgY29sb3JTdHJpbmcgPSAoY29sb3JTdHJpbmcgfHwgJycpLnRvTG93ZXJDYXNlKCk7CiAgICAgICAgICAgIGNvbnN0IHN0cmluZ1BhcnNlcnMgPSBbCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgcmU6IC8ocmdiKWE/XChccyooXGR7MSwzfSlccyosXHMqKFxkezEsM30pXHMqJT8sXHMqKFxkezEsM30pXHMqJT8oPzosXHMqKFxkKyg/OlwuXGQrKT8pXHMqKT9cKS8sCiAgICAgICAgICAgICAgICAgICAgcGFyc2U6IGZ1bmN0aW9uIChleGVjUmVzdWx0KSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBuZXcgUmdiYShwYXJzZUludChleGVjUmVzdWx0WzJdLCAxMCkgLyAyNTUsIHBhcnNlSW50KGV4ZWNSZXN1bHRbM10sIDEwKSAvIDI1NSwgcGFyc2VJbnQoZXhlY1Jlc3VsdFs0XSwgMTApIC8gMjU1LCBpc05hTihwYXJzZUZsb2F0KGV4ZWNSZXN1bHRbNV0pKSA/IDEgOiBwYXJzZUZsb2F0KGV4ZWNSZXN1bHRbNV0pKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9LCB7CiAgICAgICAgICAgICAgICAgICAgcmU6IC8oaHNsKWE/XChccyooXGR7MSwzfSlccyosXHMqKFxkezEsM30pJVxzKixccyooXGR7MSwzfSklXHMqKD86LFxzKihcZCsoPzpcLlxkKyk/KVxzKik/XCkvLAogICAgICAgICAgICAgICAgICAgIHBhcnNlOiBmdW5jdGlvbiAoZXhlY1Jlc3VsdCkgewogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEhzbGEocGFyc2VJbnQoZXhlY1Jlc3VsdFsyXSwgMTApIC8gMzYwLCBwYXJzZUludChleGVjUmVzdWx0WzNdLCAxMCkgLyAxMDAsIHBhcnNlSW50KGV4ZWNSZXN1bHRbNF0sIDEwKSAvIDEwMCwgaXNOYU4ocGFyc2VGbG9hdChleGVjUmVzdWx0WzVdKSkgPyAxIDogcGFyc2VGbG9hdChleGVjUmVzdWx0WzVdKSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICBdOwogICAgICAgICAgICBpZiAoYWxsb3dIZXg4KSB7CiAgICAgICAgICAgICAgICBzdHJpbmdQYXJzZXJzLnB1c2goewogICAgICAgICAgICAgICAgICAgIHJlOiAvIyhbYS1mQS1GMC05XXsyfSkoW2EtZkEtRjAtOV17Mn0pKFthLWZBLUYwLTldezJ9KShbYS1mQS1GMC05XXsyfSk/JC8sCiAgICAgICAgICAgICAgICAgICAgcGFyc2U6IGZ1bmN0aW9uIChleGVjUmVzdWx0KSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBuZXcgUmdiYShwYXJzZUludChleGVjUmVzdWx0WzFdLCAxNikgLyAyNTUsIHBhcnNlSW50KGV4ZWNSZXN1bHRbMl0sIDE2KSAvIDI1NSwgcGFyc2VJbnQoZXhlY1Jlc3VsdFszXSwgMTYpIC8gMjU1LCBwYXJzZUludChleGVjUmVzdWx0WzRdIHx8ICdGRicsIDE2KSAvIDI1NSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBzdHJpbmdQYXJzZXJzLnB1c2goewogICAgICAgICAgICAgICAgICAgIHJlOiAvIyhbYS1mQS1GMC05XXsyfSkoW2EtZkEtRjAtOV17Mn0pKFthLWZBLUYwLTldezJ9KSQvLAogICAgICAgICAgICAgICAgICAgIHBhcnNlOiBmdW5jdGlvbiAoZXhlY1Jlc3VsdCkgewogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IFJnYmEocGFyc2VJbnQoZXhlY1Jlc3VsdFsxXSwgMTYpIC8gMjU1LCBwYXJzZUludChleGVjUmVzdWx0WzJdLCAxNikgLyAyNTUsIHBhcnNlSW50KGV4ZWNSZXN1bHRbM10sIDE2KSAvIDI1NSwgMSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgc3RyaW5nUGFyc2Vycy5wdXNoKHsKICAgICAgICAgICAgICAgIHJlOiAvIyhbYS1mQS1GMC05XSkoW2EtZkEtRjAtOV0pKFthLWZBLUYwLTldKSQvLAogICAgICAgICAgICAgICAgcGFyc2U6IGZ1bmN0aW9uIChleGVjUmVzdWx0KSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBSZ2JhKHBhcnNlSW50KGV4ZWNSZXN1bHRbMV0gKyBleGVjUmVzdWx0WzFdLCAxNikgLyAyNTUsIHBhcnNlSW50KGV4ZWNSZXN1bHRbMl0gKyBleGVjUmVzdWx0WzJdLCAxNikgLyAyNTUsIHBhcnNlSW50KGV4ZWNSZXN1bHRbM10gKyBleGVjUmVzdWx0WzNdLCAxNikgLyAyNTUsIDEpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gc3RyaW5nUGFyc2VycykgewogICAgICAgICAgICAgICAgaWYgKHN0cmluZ1BhcnNlcnMuaGFzT3duUHJvcGVydHkoa2V5KSkgewogICAgICAgICAgICAgICAgICAgIGNvbnN0IHBhcnNlciA9IHN0cmluZ1BhcnNlcnNba2V5XTsKICAgICAgICAgICAgICAgICAgICBjb25zdCBtYXRjaCA9IHBhcnNlci5yZS5leGVjKGNvbG9yU3RyaW5nKSwgY29sb3IgPSBtYXRjaCAmJiBwYXJzZXIucGFyc2UobWF0Y2gpOwogICAgICAgICAgICAgICAgICAgIGlmIChjb2xvcikgewogICAgICAgICAgICAgICAgICAgICAgICBpZiAoY29sb3IgaW5zdGFuY2VvZiBSZ2JhKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoc3ZhID0gdGhpcy5yZ2JhVG9Ic3ZhKGNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChjb2xvciBpbnN0YW5jZW9mIEhzbGEpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhzdmEgPSB0aGlzLmhzbGEyaHN2YShjb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGhzdmE7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBoc3ZhOwogICAgICAgIH0KICAgICAgICBvdXRwdXRGb3JtYXQoaHN2YSwgb3V0cHV0Rm9ybWF0LCBhbHBoYUNoYW5uZWwpIHsKICAgICAgICAgICAgaWYgKG91dHB1dEZvcm1hdCA9PT0gJ2F1dG8nKSB7CiAgICAgICAgICAgICAgICBvdXRwdXRGb3JtYXQgPSBoc3ZhLmEgPCAxID8gJ3JnYmEnIDogJ2hleCc7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgc3dpdGNoIChvdXRwdXRGb3JtYXQpIHsKICAgICAgICAgICAgICAgIGNhc2UgJ2hzbGEnOgogICAgICAgICAgICAgICAgICAgIGNvbnN0IGhzbGEgPSB0aGlzLmhzdmEyaHNsYShoc3ZhKTsKICAgICAgICAgICAgICAgICAgICBjb25zdCBoc2xhVGV4dCA9IG5ldyBIc2xhKE1hdGgucm91bmQoKGhzbGEuaCkgKiAzNjApLCBNYXRoLnJvdW5kKGhzbGEucyAqIDEwMCksIE1hdGgucm91bmQoaHNsYS5sICogMTAwKSwgTWF0aC5yb3VuZChoc2xhLmEgKiAxMDApIC8gMTAwKTsKICAgICAgICAgICAgICAgICAgICBpZiAoaHN2YS5hIDwgMSB8fCBhbHBoYUNoYW5uZWwgPT09ICdhbHdheXMnKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaHNsYSgnICsgaHNsYVRleHQuaCArICcsJyArIGhzbGFUZXh0LnMgKyAnJSwnICsgaHNsYVRleHQubCArICclLCcgKwogICAgICAgICAgICAgICAgICAgICAgICAgICAgaHNsYVRleHQuYSArICcpJzsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaHNsKCcgKyBoc2xhVGV4dC5oICsgJywnICsgaHNsYVRleHQucyArICclLCcgKyBoc2xhVGV4dC5sICsgJyUpJzsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjYXNlICdyZ2JhJzoKICAgICAgICAgICAgICAgICAgICBjb25zdCByZ2JhID0gdGhpcy5kZW5vcm1hbGl6ZVJHQkEodGhpcy5oc3ZhVG9SZ2JhKGhzdmEpKTsKICAgICAgICAgICAgICAgICAgICBpZiAoaHN2YS5hIDwgMSB8fCBhbHBoYUNoYW5uZWwgPT09ICdhbHdheXMnKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAncmdiYSgnICsgcmdiYS5yICsgJywnICsgcmdiYS5nICsgJywnICsgcmdiYS5iICsgJywnICsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1hdGgucm91bmQocmdiYS5hICogMTAwKSAvIDEwMCArICcpJzsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAncmdiKCcgKyByZ2JhLnIgKyAnLCcgKyByZ2JhLmcgKyAnLCcgKyByZ2JhLmIgKyAnKSc7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgICAgICAgICBjb25zdCBhbGxvd0hleDggPSAoYWxwaGFDaGFubmVsID09PSAnYWx3YXlzJyB8fCBhbHBoYUNoYW5uZWwgPT09ICdmb3JjZWQnKTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5yZ2JhVG9IZXgodGhpcy5kZW5vcm1hbGl6ZVJHQkEodGhpcy5oc3ZhVG9SZ2JhKGhzdmEpKSwgYWxsb3dIZXg4KTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH07CiAgICBDb2xvclBpY2tlclNlcnZpY2UuybVmYWMgPSBmdW5jdGlvbiBDb2xvclBpY2tlclNlcnZpY2VfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgQ29sb3JQaWNrZXJTZXJ2aWNlKSgpOyB9OwogICAgQ29sb3JQaWNrZXJTZXJ2aWNlLsm1cHJvdiA9IMm1ybVkZWZpbmVJbmplY3RhYmxlKHsgdG9rZW46IENvbG9yUGlja2VyU2VydmljZSwgZmFjdG9yeTogQ29sb3JQaWNrZXJTZXJ2aWNlLsm1ZmFjIH0pOwoKICAgIGxldCBDb2xvclBpY2tlckNvbXBvbmVudCA9IGNsYXNzIENvbG9yUGlja2VyQ29tcG9uZW50IHsKICAgICAgICBjb25zdHJ1Y3RvcihlbFJlZiwgY2RSZWYsIHNlcnZpY2UpIHsKICAgICAgICAgICAgdGhpcy5lbFJlZiA9IGVsUmVmOwogICAgICAgICAgICB0aGlzLmNkUmVmID0gY2RSZWY7CiAgICAgICAgICAgIHRoaXMuc2VydmljZSA9IHNlcnZpY2U7CiAgICAgICAgICAgIHRoaXMuaXNJRTEwID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuZGlhbG9nQXJyb3dTaXplID0gMTA7CiAgICAgICAgICAgIHRoaXMuZGlhbG9nQXJyb3dPZmZzZXQgPSAxNTsKICAgICAgICAgICAgdGhpcy5kaWFsb2dJbnB1dEZpZWxkcyA9IFsKICAgICAgICAgICAgICAgIENvbG9yRm9ybWF0cy5IRVgsCiAgICAgICAgICAgICAgICBDb2xvckZvcm1hdHMuUkdCQSwKICAgICAgICAgICAgICAgIENvbG9yRm9ybWF0cy5IU0xBLAogICAgICAgICAgICAgICAgQ29sb3JGb3JtYXRzLkNNWUsKICAgICAgICAgICAgXTsKICAgICAgICAgICAgdGhpcy51c2VSb290Vmlld0NvbnRhaW5lciA9IGZhbHNlOwogICAgICAgIH0KICAgICAgICBoYW5kbGVFc2MoZXZlbnQpIHsKICAgICAgICAgICAgaWYgKHRoaXMuc2hvdyAmJiB0aGlzLmNwRGlhbG9nRGlzcGxheSA9PT0gJ3BvcHVwJykgewogICAgICAgICAgICAgICAgdGhpcy5vbkNhbmNlbENvbG9yKGV2ZW50KTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBoYW5kbGVFbnRlcihldmVudCkgewogICAgICAgICAgICBpZiAodGhpcy5zaG93ICYmIHRoaXMuY3BEaWFsb2dEaXNwbGF5ID09PSAncG9wdXAnKSB7CiAgICAgICAgICAgICAgICB0aGlzLm9uQWNjZXB0Q29sb3IoZXZlbnQpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIG5nT25Jbml0KCkgewogICAgICAgICAgICB0aGlzLnNsaWRlciA9IG5ldyBTbGlkZXJQb3NpdGlvbigwLCAwLCAwLCAwKTsKICAgICAgICAgICAgY29uc3QgaHVlV2lkdGggPSB0aGlzLmh1ZVNsaWRlci5uYXRpdmVFbGVtZW50Lm9mZnNldFdpZHRoIHx8IDE0MDsKICAgICAgICAgICAgY29uc3QgYWxwaGFXaWR0aCA9IHRoaXMuYWxwaGFTbGlkZXIubmF0aXZlRWxlbWVudC5vZmZzZXRXaWR0aCB8fCAxNDA7CiAgICAgICAgICAgIHRoaXMuc2xpZGVyRGltTWF4ID0gbmV3IFNsaWRlckRpbWVuc2lvbihodWVXaWR0aCwgdGhpcy5jcFdpZHRoLCAxMzAsIGFscGhhV2lkdGgpOwogICAgICAgICAgICBpZiAodGhpcy5jcENteWtFbmFibGVkKSB7CiAgICAgICAgICAgICAgICB0aGlzLmZvcm1hdCA9IENvbG9yRm9ybWF0cy5DTVlLOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKHRoaXMuY3BPdXRwdXRGb3JtYXQgPT09ICdyZ2JhJykgewogICAgICAgICAgICAgICAgdGhpcy5mb3JtYXQgPSBDb2xvckZvcm1hdHMuUkdCQTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmICh0aGlzLmNwT3V0cHV0Rm9ybWF0ID09PSAnaHNsYScpIHsKICAgICAgICAgICAgICAgIHRoaXMuZm9ybWF0ID0gQ29sb3JGb3JtYXRzLkhTTEE7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLmZvcm1hdCA9IENvbG9yRm9ybWF0cy5IRVg7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5sa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7CiAgICAgICAgICAgIHRoaXMuY3BNYXhQcmVzZXRDb2xvcnNMZW5ndGggPSBjcE1heFByZXNldENvbG9yc0xlbmd0aDsKICAgICAgICAgICAgdGhpcy5jcFByZXNldEVtcHR5TWVzc2FnZSA9IGNwUHJlc2V0RW1wdHlNZXNzYWdlOwogICAgICAgICAgICB0aGlzLmNwUHJlc2V0RW1wdHlNZXNzYWdlQ2xhc3MgPSBjcFByZXNldEVtcHR5TWVzc2FnZUNsYXNzOwogICAgICAgICAgICB0aGlzLmNwQWRkQ29sb3JCdXR0b24gPSBjcEFkZENvbG9yQnV0dG9uOwogICAgICAgICAgICB0aGlzLmNwQWRkQ29sb3JCdXR0b25UZXh0ID0gY3BBZGRDb2xvckJ1dHRvblRleHQ7CiAgICAgICAgICAgIHRoaXMuY3BBZGRDb2xvckJ1dHRvbkNsYXNzID0gY3BBZGRDb2xvckJ1dHRvbkNsYXNzOwogICAgICAgICAgICB0aGlzLmNwUmVtb3ZlQ29sb3JCdXR0b25DbGFzcyA9IGNwUmVtb3ZlQ29sb3JCdXR0b25DbGFzczsKICAgICAgICAgICAgaWYgKCFjcFBvc2l0aW9uUmVsYXRpdmVUb0Fycm93KSB7CiAgICAgICAgICAgICAgICB0aGlzLmRpYWxvZ0Fycm93T2Zmc2V0ID0gMDsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoY3BEaWFsb2dEaXNwbGF5ID09PSAnaW5saW5lJykgewogICAgICAgICAgICAgICAgdGhpcy5kaWFsb2dBcnJvd1NpemUgPSAwOwogICAgICAgICAgICAgICAgdGhpcy5kaWFsb2dBcnJvd09mZnNldCA9IDA7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGNwT3V0cHV0Rm9ybWF0ID09PSAnaGV4JyAmJgogICAgICAgICAgICAgICAgY3BBbHBoYUNoYW5uZWwgIT09ICdhbHdheXMnICYmIGNwQWxwaGFDaGFubmVsICE9PSAnZm9yY2VkJykgewogICAgICAgICAgICAgICAgdGhpcy5jcEFscGhhQ2hhbm5lbCA9ICdkaXNhYmxlZCc7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgc2V0Q29sb3JNb2RlKG1vZGUpIHsKICAgICAgICAgICAgc3dpdGNoIChtb2RlLnRvU3RyaW5nKCkudG9VcHBlckNhc2UoKSkgewogICAgICAgICAgICAgICAgY2FzZSAnMSc6CiAgICAgICAgICAgICAgICBjYXNlICdDJzoKICAgICAgICAgICAgICAgIGNhc2UgJ0NPTE9SJzoKICAgICAgICAgICAgICAgICAgICB0aGlzLmNwQ29sb3JNb2RlID0gMTsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIGNhc2UgJzInOgogICAgICAgICAgICAgICAgY2FzZSAnRyc6CiAgICAgICAgICAgICAgICBjYXNlICdHUkFZU0NBTEUnOgogICAgICAgICAgICAgICAgICAgIHRoaXMuY3BDb2xvck1vZGUgPSAyOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgY2FzZSAnMyc6CiAgICAgICAgICAgICAgICBjYXNlICdQJzoKICAgICAgICAgICAgICAgIGNhc2UgJ1BSRVNFVFMnOgogICAgICAgICAgICAgICAgICAgIHRoaXMuY3BDb2xvck1vZGUgPSAzOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgICAgICAgICB0aGlzLmNwQ29sb3JNb2RlID0gMTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBzZXRJbml0aWFsQ29sb3IoY29sb3IpIHsKICAgICAgICAgICAgdGhpcy5pbml0aWFsQ29sb3IgPSBjb2xvcjsKICAgICAgICB9CiAgICAgICAgc2V0UHJlc2V0Q29uZmlnKGNwUHJlc2V0TGFiZWwsIGNwUHJlc2V0Q29sb3JzKSB7CiAgICAgICAgICAgIHRoaXMuY3BQcmVzZXRMYWJlbCA9IGNwUHJlc2V0TGFiZWw7CiAgICAgICAgICAgI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Lm5hdGl2ZUVsZW1lbnQgJiYKICAgICAgICAgICAgICAgICF0aGlzLmlzRGVzY2VuZGFudCh0aGlzLmVsUmVmLm5hdGl2ZUVsZW1lbnQsIGV2ZW50LnRhcmdldCkgJiYKICAgICAgICAgICAgICAgICF0aGlzLmlzRGVzY2VuZGFudCh0aGlzLmRpcmVjdGl2ZUVsZW1lbnRSZWYubmF0aXZlRWxlbWVudCwgZXZlbnQudGFyZ2V0KSAmJgogICAgICAgICAgICAgICAgdGhpcy5jcElnbm9yZWRFbGVtZW50cy5maWx0ZXIoKGl0ZW0pID0+IGl0ZW0gPT09IGV2ZW50LnRhcmdldCkubGVuZ3RoID09PSAwKSB7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5jcFNhdmVDbGlja091dHNpZGUpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLmRpcmVjdGl2ZUluc3RhbmNlLmNvbG9yU2VsZWN0ZWQodGhpcy5vdXRwdXRDb2xvcik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLmhzdmEgPSBudWxsOwogICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0Q29sb3JGcm9tU3RyaW5nKHRoaXMuaW5pdGlhbENvbG9yLCBmYWxzZSk7CiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuY3BDbXlrRW5hYmxlZCkgewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmRpcmVjdGl2ZUluc3RhbmNlLmNteWtDaGFuZ2VkKHRoaXMuY215a0NvbG9yKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgdGhpcy5kaXJlY3RpdmVJbnN0YW5jZS5jb2xvckNoYW5nZWQodGhpcy5pbml0aWFsQ29sb3IpOwogICAgICAgICAgICAgICAgICAgIHRoaXMuZGlyZWN0aXZlSW5zdGFuY2UuY29sb3JDYW5jZWxlZCgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKHRoaXMuY3BDbG9zZUNsaWNrT3V0c2lkZSkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuY2xvc2VDb2xvclBpY2tlcigpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIG9uQWNjZXB0Q29sb3IoZXZlbnQpIHsKICAgICAgICAgICAgZXZlbnQuc3RvcFByb3BhZ2F0aW9uKCk7CiAgICAgICAgICAgIGlmICh0aGlzLm91dHB1dENvbG9yKSB7CiAgICAgICAgICAgICAgICB0aGlzLmRpcmVjdGl2ZUluc3RhbmNlLmNvbG9yU2VsZWN0ZWQodGhpcy5vdXRwdXRDb2xvcik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHRoaXMuY3BEaWFsb2dEaXNwbGF5ID09PSAncG9wdXAnKSB7CiAgICAgICAgICAgICAgICB0aGlzLmNsb3NlQ29sb3JQaWNrZXIoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBvbkNhbmNlbENvbG9yKGV2ZW50KSB7CiAgICAgICAgICAgIHRoaXMuaHN2YSA9IG51bGw7CiAgICAgICAgICAgIGV2ZW50LnN0b3BQcm9wYWdhdGlvbigpOwogICAgICAgICAgICB0aGlzLmRpcmVjdGl2ZUluc3RhbmNlLmNvbG9yQ2FuY2VsZWQoKTsKICAgICAgICAgICAgdGhpcy5zZXRDb2xvckZyb21TdHJpbmcodGhpcy5pbml0aWFsQ29sb3IsIHRydWUpOwogICAgICAgICAgICBpZiAodGhpcy5jcERpYWxvZ0Rpc3BsYXkgPT09ICdwb3B1cCcpIHsKICAgICAgICAgICAgICAgIGlmICh0aGlzLmNwQ215a0VuYWJsZWQpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLmRpcmVjdGl2ZUluc3RhbmNlLmNteWtDaGFuZ2VkKHRoaXMuY215a0NvbG9yKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuZGlyZW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ICAgICB9KTsKICAgICAgICAgICAgdGhpcy5kaXJlY3RpdmVJbnN0YW5jZS5zbGlkZXJDaGFuZ2VkKHsKICAgICAgICAgICAgICAgIHNsaWRlcjogJ3NhdHVyYXRpb24nLAogICAgICAgICAgICAgICAgdmFsdWU6IHRoaXMuaHN2YS5zLAogICAgICAgICAgICAgICAgY29sb3I6IHRoaXMub3V0cHV0Q29sb3IKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIG9uSHVlQ2hhbmdlKHZhbHVlKSB7CiAgICAgICAgICAgIHRoaXMuaHN2YS5oID0gdmFsdWUudiAvIHZhbHVlLnJnWDsKICAgICAgICAgICAgdGhpcy5zbGlkZXJIID0gdGhpcy5oc3ZhLmg7CiAgICAgICAgICAgIHRoaXMudXBkYXRlQ29sb3JQaWNrZXIoKTsKICAgICAgICAgICAgdGhpcy5kaXJlY3RpdmVJbnN0YW5jZS5zbGlkZXJDaGFuZ2VkKHsKICAgICAgICAgICAgICAgIHNsaWRlcjogJ2h1ZScsCiAgICAgICAgICAgICAgICB2YWx1ZTogdGhpcy5oc3ZhLmgsCiAgICAgICAgICAgICAgICBjb2xvcjogdGhpcy5vdXRwdXRDb2xvcgogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgb25WYWx1ZUNoYW5nZSh2YWx1ZSkgewogICAgICAgICAgICB0aGlzLmhzdmEudiA9IHZhbHVlLnYgLyB2YWx1ZS5yZ1g7CiAgICAgICAgICAgIHRoaXMudXBkYXRlQ29sb3JQaWNrZXIoKTsKICAgICAgICAgICAgdGhpcy5kaXJlY3RpdmVJbnN0YW5jZS5zbGlkZXJDaGFuZ2VkKHsKICAgICAgICAgICAgICAgIHNsaWRlcjogJ3ZhbHVlJywKICAgICAgICAgICAgICAgIHZhbHVlOiB0aGlzLmhzdmEudiwKICAgICAgICAgICAgICAgIGNvbG9yOiB0aGlzLm91dHB1dENvbG9yCiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICBvbkFscGhhQ2hhbmdlKHZhbHVlKSB7CiAgICAgICAgICAgIHRoaXMuaHN2YS5hID0gdmFsdWUudiAvIHZhbHVlLnJnWDsKICAgICAgICAgICAgdGhpcy51cGRhdGVDb2xvclBpY2tlcigpOwogICAgICAgICAgICB0aGlzLmRpcmVjdGl2ZUluc3RhbmNlLnNsaWRlckNoYW5nZWQoewogICAgICAgICAgICAgICAgc2xpZGVyOiAnYWxwaGEnLAogICAgICAgICAgICAgICAgdmFsdWU6IHRoaXMuaHN2YS5hLAogICAgICAgICAgICAgICAgY29sb3I6IHRoaXMub3V0cHV0Q29sb3IKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIG9uSGV4SW5wdXQodmFsdWUpIHsKICAgICAgICAgICAgaWYgKHZhbHVlID09PSBudWxsKSB7CiAgICAgICAgICAgICAgICB0aGlzLnVwZGF0ZUNvbG9yUGlja2VyKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBpZiAodmFsdWUgJiYgdmFsdWVbMF0gIT09ICcjJykgewogICAgICAgICAgICAgICAgICAgIHZhbHVlID0gJyMnICsgdmFsdWU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBsZXQgdmFsaWRIZXggPSAvXiMoW2EtZjAtOV17M318W2EtZjAtOV17Nn0pJC9naTsKICAgICAgICAgICAgICAgIGlmICh0aGlzLmNwQWxwaGFDaGFubmVsID09PSAnYWx3YXlzJykgewogICAgICAgICAgICAgICAgICAgIHZhbGlkSGV4ID0gL14jKFthLWYwLTldezN9fFthLWYwLTldezZ9fFthLWYwLTldezh9KSQvZ2k7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjb25zdCB2YWxpZCA9IHZhbGlkSGV4LnRlc3QodmFsdWUpOwogICAgICAgICAgICAgICAgaWYgKHZhbGlkKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKHZhbHVlLmxlbmd0aCA8IDUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSAnIycgKyB2YWx1ZS5zdWJzdHJpbmcoMSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5zcGxpdCgnJykKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5tYXAoYyA9PiBjICsgYykKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5qb2luKCcnKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuY3BBbHBoYUNoYW5uZWwgPT09ICdmb3JjZWQnKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlICs9IE1hdGgucm91bmQodGhpcy5oc3ZhLmEgKiAyNTUpLnRvU3RyaW5nKDE2KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXRDb2xvckZyb21TdHJpbmcodmFsdWUsIHRydWUsIGZhbHNlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuZGlyZWN0aXZlSW5zdGFuY2UuaW5wdXRDaGFuZ2VkKHsKICAgICAgICAgICAgICAgICAgICBpbnB1dDogJ2hleCcsCiAgICAgICAgICAgICAgICAgICAgdmFsaWQ6IHZhbGlkLAogICAgICAgICAgICAgICAgICAgIHZhbHVlOiB2YWx1ZSwKICAgICAgICAgICAgICAgICAgICBjb2xvcjogdGhpcy5vdXRwdXRDb2xvcgogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgb25SZWRJbnB1dCh2YWx1ZSkgewogICAgICAgICAgICBjb25zdCByZ2JhID0gdGhpcy5zZXJ2aWNlLmhzdmFUb1JnYmEodGhpcy5oc3ZhKTsKICAgICAgICAgICAgY29uc3QgdmFsaWQgPSAhaXNOYU4odmFsdWUudikgJiYgdmFsdWUudiA+PSAwICYmIHZhbHVlLnYgPD0gdmFsdWUucmc7CiAgICAgICAgICAgIGlmICh2YWxpZCkgewogICAgICAgICAgICAgICAgcmdiYS5yID0gdmFsdWUudiAvIHZhbHVlLnJnOwogICAgICAgICAgICAgICAgdGhpcy5oc3ZhID0gdGhpcy5zZXJ2aWNlLnJnYmFUb0hzdmEocmdiYSk7CiAgICAgICAgICAgICAgICB0aGlzLnNsaWRlckggPSB0aGlzLmhzdmEuaDsKICAgICAgICAgICAgICAgIHRoaXMudXBkYXRlQ29sb3JQaWNrZXIoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLmRpcmVjdGl2ZUluc3RhbmNlLmlucHV0Q2hhbmdlZCh7CiAgICAgICAgICAgICAgICBpbnB1dDogJ3JlZCcsCiAgICAgICAgICAgICAgICB2YWxpZDogdmFsaWQsCiAgICAgICAgICAgICAgICB2YWx1ZTogcmdiYS5yLAogICAgICAgICAgICAgICAgY29sb3I6IHRoaXMub3V0cHV0Q29sb3IKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIG9uQmx1ZUlucHV0KHZhbHVlKSB7CiAgICAgICAgICAgIGNvbnN0IHJnYmEgPSB0aGlzLnNlcnZpY2UuaHN2YVRvUmdiYSh0aGlzLmhzdmEpOwogICAgICAgICAgICBjb25zdCB2YWxpZCA9ICFpc05hTih2YWx1ZS52KSAmJiB2YWx1ZS52ID49IDAgJiYgdmFsdWUudiA8PSB2YWx1ZS5yZzsKICAgICAgICAgICAgaWYgKHZhbGlkKSB7CiAgICAgICAgICAgICAgICByZ2JhLmIgPSB2YWx1ZS52IC8gdmFsdWUucmc7CiAgICAgICAgICAgICAgICB0aGlzLmhzdmEgPSB0aGlzLnNlcnZpY2UucmdiYVRvSHN2YShyZ2JhKTsKICAgICAgICAgICAgICAgIHRoaXMuc2xpZGVySCA9IHRoaXMuaHN2YS5oOwogICAgICAgICAgICAgICAgdGhpcy51cGRhdGVDb2xvclBpY2tlcigpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuZGlyZWN0aXZlSW5zdGFuY2UuaW5wdXRDaGFuZ2VkKHsKICAgICAgICAgICAgICAgIGlucHV0OiAnYmx1ZScsCiAgICAgICAgICAgICAgICB2YWxpZDogdmFsaWQsCiAgICAgICAgICAgICAgICB2YWx1ZTogcmdiYS5iLAogICAgICAgICAgICAgICAgY29sb3I6IHRoaXMub3V0cHV0Q29sb3IKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIG9uR3JlZW5JbnB1dCh2YWx1ZSkgewogICAgICAgICAgICBjb25zdCByZ2JhID0gdGhpcy5zZXJ2aWNlLmhzdmFUb1JnYmEodGhpcy5oc3ZhKTsKICAgICAgICAgICAgY29uc3QgdmFsaWQgPSAhaXNOYU4odmFsdWUudikgJiYgdmFsdWUudiA+PSAwICYmIHZhbHVlLnYgPD0gdmFsdWUucmc7CiAgICAgICAgICAgIGlmICh2YWxpZCkgewogICAgICAgICAgICAgICAgcmdiYS5nID0gdmFsdWUudiAvIHZhbHVlLnJnOwogICAgICAgICAgICAgICAgdGhpcy5oc3ZhID0gdGhpcy5zZXJ2aWNlLnJnYmFUb0hzdmEocmdiYSk7CiAgICAgICAgICAgICAgICB0aGlzLnNsaWRlckggPSB0aGlzLmhzdmEuaDsKICAgICAgICAgICAgICAgIHRoaXMudXBkYXRlQ29sb3JQaWNrZXIoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLmRpcmVjdGl2ZUluc3RhbmNlLmlucHV0Q2hhbmdlZCh7CiAgICAgICAgICAgICAgICBpbnB1dDogJ2dyZWVuJywKICAgICAgICAgICAgICAgIHZhbGlkOiB2YWxpZCwKICAgICAgICAgICAgICAgIHZhbHVlOiByZ2JhLmcsCiAgICAgICAgICAgICAgICBjb2xvcjogdGhpcy5vdXRwdXRDb2xvcgogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgb25IdWVJbnB1dCh2YWx1ZSkgewogICAgICAgICAgICBjb25zdCB2YWxpZCA9ICFpc05hTih2YWx1ZS52KSAmJiB2YWx1ZS52ID49IDAgJiYgdmFsdWUudiA8PSB2YWx1ZS5yZzsKICAgICAgICAgICAgaWYgKHZhbGlkKSB7CiAgICAgICAgICAgICAgICB0aGlzLmhzdmEuaCA9IHZhbHVlLnYgLyB2YWx1ZS5yZzsKICAgICAgICAgICAgICAgIHRoaXMuc2xpZGVySCA9IHRoaXMuaHN2YS5oOwogICAgICAgICAgICAgICAgdGhpcy51cGRhdGVDb2xvclBpY2tlcigpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuZGlyZWN0aXZlSW5zdGFuY2UuaW5wdXRDaGFuZ2VkKHsKICAgICAgICAgICAgICAgIGlucHV0OiAnaHVlJywKICAgICAgICAgICAgICAgIHZhbGlkOiB2YWxpZCwKICAgICAgICAgICAgICAgIHZhbHVlOiB0aGlzLmhzdmEuaCwKICAgICAgICAgICAgICAgIGNvbG9yOiB0aGlzLm91dHB1dENvbG9yCiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICBvblZhbHVlSW5wdXQodmFsdWUpIHsKICAgICAgICAgICAgY29uc3QgdmFsaWQgPSAhaXNOYU4odmFsdWUudikgJiYgdmFsdWUudiA+PSAwICYmIHZhbHVlLnYgPD0gdmFsdWUucmc7CiAgICAgICAgICAgIGlmICh2YWxpZCkgewogICAgICAgICAgICAgICAgdGhpcy5oc3ZhLnYgPSB2YWx1ZS52IC8gdmFsdWUucmc7CiAgICAgICAgICAgICAgICB0aGlzLnVwZGF0ZUNvbG9yUGlja2VyKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5kaXJlY3RpdmVJbnN0YW5jZS5pbnB1dENoYW5nZWQoewogICAgICAgICAgICAgICAgaW5wdXQ6ICd2YWx1ZScsCiAgICAgICAgICAgICAgICB2YWxpZDogdmFsaWQsCiAgICAgICAgICAgICAgICB2YWx1ZTogdGhpcy5oc3ZhLnYsCiAgICAgICAgICAgICAgICBjb2xvcjogdGhpcy5vdXRwdXRDb2xvcgogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgb25BbHBoYUlucHV0KHZhbHVlKSB7CiAgICAgICAgICAgIGNvbnN0IHZhbGlkID0gIWlzTmFOKHZhbHVlLnYpICYmIHZhbHVlLnYgPj0gMCAmJiB2YWx1ZS52IDw9IHZhbHVlLnJnOwogICAgICAgICAgICBpZiAodmFsaWQpIHsKICAgICAgICAgICAgICAgIHRoaXMuaHN2YS5hID0gdmFsdWUudiAvIHZhbHVlLnJnOwogICAgICAgICAgICAgICAgdGhpcy51cGRhdGVDb2xvclBpY2tlcigpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuZGlyZWN0aXZlSW5zdGFuY2UuaW5wdXRDaGFuZ2VkKHsKICAgICAgICAgICAgICAgIGlucHV0OiAnYWxwaGEnLAogICAgICAgICAgICAgICAgdmFsaWQ6IHZhbGlkLAogICAgICAgICAgICAgICAgdmFsdWU6IHRoaXMuaHN2YS5hLAogICAgICAgICAgICAgICAgY29sb3I6IHRoaXMub3V0cHV0Q29sb3IKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIG9uTGlnaHRuZXNzSW5wdXQodmFsdWUpIHsKICAgICAgICAgICAgY29uc3QgaHNsYSA9IHRoaXMuc2VydmljZS5oc3ZhMmhzbGEodGhpcy5oc3ZhKTsKICAgICAgICAgICAgY29uc3QgdmFsaWQgPSAhaXNOYU4odmFsdWUudikgJiYgdmFsdWUudiA+PSAwICYmIHZhbHVlLnYgPD0gdmFsdWUucmc7CiAgICAgICAgICAgIGlmICh2YWxpZCkgewogICAgICAgICAgICAgICAgaHNsYS5sID0gdmFsdWUudiAvIHZhbHVlLnJnOwogICAgICAgICAgICAgICAgdGhpcy5oc3ZhID0gdGhpcy5zZXJ2aWNlLmhzbGEyaHN2YShoc2xhKTsKICAgICAgICAgICAgICAgIHRoaXMuc2xpZGVySCA9IHRoaXMuaHN2YS5oOwogICAgICAgICAgICAgICAgdGhpcy51cGRhdGVDb2xvclBpY2tlcigpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuZGlyZWN0aXZlSW5zdGFuY2UuaW5wdXRDaGFuZ2VkKHsKICAgICAgICAgICAgICAgIGlucHV0OiAnbGlnaHRuZXNzJywKICAgICAgICAgICAgICAgIHZhbGlkOiB2YWxpZCwKICAgICAgICAgICAgICAgIHZhbHVlOiBoc2xhLmwsCiAgICAgICAgICAgICAgICBjb2xvcjogdGhpcy5vdXRwdXRDb2xvcgogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgb25TYXR1cmF0aW9uSW5wdXQodmFsdWUpIHsKICAgICAgICAgICAgY29uc3QgaHNsYSA9IHRoaXMuc2VydmljZS5oc3ZhMmhzbGEodGhpcy5oc3ZhKTsKICAgICAgICAgICAgY29uc3QgdmFsaWQgPSAhaXNOYU4odmFsdWUudikgJiYgdmFsdWUudiA+PSAwICYmIHZhbHVlLnYgPD0gdmFsdWUucmc7CiAgICAgICAgICAgIGlmICh2YWxpZCkgewogICAgICAgICAgICAgICAgaHNsYS5zID0gdmFsdWUudiAvIHZhbHVlLnJnOwogICAgICAgICAgICAgICAgdGhpcy5oc3ZhID0gdGhpcy5zZXJ2aWNlLmhzbGEyaHN2YShoc2xhKTsKICAgICAgICAgICAgICAgIHRoaXMuc2xpZGVySCA9IHRoaXMuaHN2YS5oOwogICAgICAgICAgICAgICAgdGhpcy51cGRhdGVDb2xvclBpY2tlcigpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuZGlyZWN0aXZlSW5zdGFuY2UuaW5wdXRDaGFuZ2VkKHsKICAgICAgICAgICAgICAgIGlucHV0OiAnc2F0dXJhdGlvbicsCiAgICAgICAgICAgICAgICB2YWxpZDogdmFsaWQsCiAgICAgICAgICAgICAgICB2YWx1ZTogaHNsYS5zLAogICAgICAgICAgICAgICAgY29sb3I6IHRoaXMub3V0cHV0Q29sb3IKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIG9uQ3lhbklucHV0KHZhbHVlKSB7CiAgICAgICAgICAgIGNvbnN0IHZhbGlkID0gIWlzTmFOKHZhbHVlLnYpICYmIHZhbHVlLnYgPj0gMCAmJiB2YWx1ZS52IDw9IHZhbHVlLnJnOwogICAgICAgICAgICBpZiAodmFsaWQpIHsKICAgICAgICAgICAgICAgIHRoaXMuY215ay5jID0gdmFsdWUudjsKICAgICAgICAgICAgICAgIHRoaXMudXBkYXRlQ29sb3JQaWNrZXIoZmFsc2UsIHRydWUsIHRydWUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuZGlyZWN0aXZlSW5zdGFuY2UuaW5wdXRDaGFuZ2VkKHsKICAgICAgICAgICAgICAgIGlucHV0OiAnY3lhbicsCiAgICAgICAgICAgICAgICB2YWxpZDogdHJ1ZSwKICAgICAgICAgICAgICAgIHZhbHVlOiB0aGlzLmNteWsuYywKICAgICAgICAgICAgICAgIGNvbG9yOiB0aGlzLm91dHB1dENvbG9yCiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICBvbk1hZ2VudGFJbnB1dCh2YWx1ZSkgewogICAgICAgICAgICBjb25zdCB2YWxpZCA9ICFpc05hTih2YWx1ZS52KSAmJiB2YWx1ZS52ID49IDAgJiYgdmFsdWUudiA8PSB2YWx1ZS5yZzsKICAgICAgICAgICAgaWYgKHZhbGlkKSB7CiAgICAgICAgICAgICAgICB0aGlzLmNteWsubSA9IHZhbHVlLnY7CiAgICAgICAgICAgICAgICB0aGlzLnVwZGF0ZUNvbG9yUGlja2VyKGZhbHNlLCB0cnVlLCB0cnVlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLmRpcmVjdGl2ZUluc3RhbmNlLmlucHV0Q2hhbmdlZCh7CiAgICAgICAgICAgICAgICBpbnB1dDogJ21hZ2VudGEnLAogICAgICAgICAgICAgICAgdmFsaWQ6IHRydWUsCiAgICAgICAgICAgICAgICB2YWx1ZTogdGhpcy5jbXlrLm0sCiAgICAgICAgICAgICAgICBjb2xvcjogdGhpcy5vdXRwdXRDb2xvcgogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgb25ZZWxsb3dJbnB1dCh2YWx1ZSkgewogICAgICAgICAgICBjb25zdCB2YWxpZCA9ICFpc05hTih2YWx1ZS52KSAmJiB2YWx1ZS52ID49IDAgJiYgdmFsdWUudiA8PSB2YWx1ZS5yZzsKICAgICAgICAgICAgaWYgKHZhbGlkKSB7CiAgICAgICAgICAgICAgICB0aGlzLmNteWsueSA9IHZhbHVlLnY7CiAgICAgICAgICAgICAgICB0aGlzLnVwZGF0ZUNvbG9yUGlja2VyKGZhbHNlLCB0cnVlLCB0cnVlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLmRpcmVjdGl2ZUluc3RhbmNlLmlucHV0Q2hhbmdlZCh7CiAgICAgICAgICAgICAgICBpbnB1dDogJ3llbGxvdycsCiAgICAgICAgICAgICAgICB2YWxpZDogdHJ1ZSwKICAgICAgICAgICAgICAgIHZhbHVlOiB0aGlzLmNteWsueSwKICAgICAgICAgICAgICAgIGNvbG9yOiB0aGlzLm91dHB1dENvbG9yCiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICBvbkJsYWNrSW5wdXQodmFsdWUpIHsKICAgICAgICAgICAgY29uc3QgdmFsaWQgPSAhaXNOYU4odmFsdWUudikgJiYgdmFsdWUudiA+PSAwICYmIHZhbHVlLnYgPD0gdmFsdWUucmc7CiAgICAgICAgICAgIGlmICh2YWxpZCkgewogICAgICAgICAgICAgICAgdGhpcy5jbXlrLmsgPSB2YWx1ZS52OwogICAgICAgICAgICAgICAgdGhpcy51cGRhdGVDb2xvclBpY2tlcihmYWxzZSwgdHJ1ZSwgdHJ1ZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5kaXJlY3RpdmVJbnN0YW5jZS5pbnB1dENoYW5nZWQoewogICAgICAgICAgICAgICAgaW5wdXQ6ICdibGFjaycsCiAgICAgICAgICAgICAgICB2YWxpZDogdHJ1ZSwKICAgICAgICAgICAgICAgIHZhbHVlOiB0aGlzLmNteWsuaywKICAgICAgICAgICAgICAgIGNvbG9yOiB0aGlzLm91dHB1dENvbG9yCiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICBvbkFkZFByZXNldENvbG9yKGV2ZW50LCB2YWx1ZSkgewogICAgICAgICAgICBldmVudC5zdG9wUHJvcGFnYXRpb24oKTsKICAgICAgICAgICAgaWYgKCF0aGlzLmNwUHJlc2V0Q29sb3JzLmZpbHRlcigoY29sb3IpID0+IChjb2xvciA9PT0gdmFsdWUpKS5sZW5ndGgpIHsKICAgICAgICAgICAgICAgIHRoaXMuY3BQcmVzZXRDb2xvcnMgPSB0aGlzLmNwUHJlc2V0Q29sb3JzLmNvbmNhdCh2YWx1ZSk7CiAgICAgICAgICAgICAgICB0aGlzLmRpcmVjdGl2ZUluc3RhbmNlLnByZXNldENvbG9yc0NoYW5nZWQodGhpcy5jcFByZXNldENvbG9ycyk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgb25SZW1vdmVQcmVzZXRDb2xvcihldmVudCwgdmFsdWUpIHsKICAgICAgICAgICAgZXZlbnQuc3RvcFByb3BhZ2F0aW9uKCk7CiAgICAgICAgICAgIHRoaXMuY3BQcmVzZXRDb2xvcnMgPSB0aGlzLmNwUHJlc2V0Q29sb3JzLmZpbHRlcigoY29sb3IpID0+IChjb2xvciAhPT0gdmFsdWUpKTsKICAgICAgICAgICAgdGhpcy5kaXJlY3RpdmVJbnN0YW5jZS5wcmVzZXRDb2xvcnNDaGFuZ2VkKHRoaXMuY3BQcmVzZXRDb2xvcnMpOwogICAgICAgIH0KICAgICAgICAvLyBQcml2YXRlIGhlbHBlciBmdW5jdGlvbnMgZm9yIHRoZSBjb2xvciBwaWNrZXIgZGlhbG9nIHN0YXR1cwogICAgICAgIG9wZW5Db2xvclBpY2tlcigpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLnNob3cpIHsKICAgICAgICAgICAgICAgIHRoaXMuc2hvdyA9IHRydWU7CiAgICAgICAgICAgICAgICB0aGlzLmhpZGRlbiA9IHRydWU7CiAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHsKICAgICAgICAgICAgICAgICAgICB0aGlzLmhpZGRlbiA9IGZhbHNlOwogICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0RGlhbG9nUG9zaXRpb24oKTsKICAgICAgICAgICAgICAgICAgICB0aGlzLmNkUmVmLmRldGVjdENoYW5nZXMoKTsKICAgICAgICAgICAgICAgIH0sIDApOwogICAgICAgICAgICAgICAgdGhpcy5kaXJlY3RpdmVJbnN0YW5jZS5zdGF0ZUNoYW5nZWQodHJ1ZSk7CiAgICAgICAgICAgICAgICBpZiAoIXRoaXMuaXNJRTEwKSB7CiAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcignbW91c2Vkb3duJywgdGhpcy5saXN0ZW5lck1vdXNlRG93bik7CiAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcigndG91Y2hzdGFydCcsIHRoaXMubGlzdGVuZXJNb3VzZURvd24pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoJ3Jlc2l6ZScsIHRoaXMubGlzdGVuZXJSZXNpemUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGNsb3NlQ29sb3JQaWNrZXIoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLnNob3cpIHsKICAgICAgICAgICAgICAgIHRoaXMuc2hvdyA9IGZhbHNlOwogICAgICAgICAgICAgICAgdGhpcy5kaXJlY3RpdmVJbnN0YW5jZS5zdGF0ZUNoYW5nZWQoZmFsc2UpOwogICAgICAgICAgICAgICAgaWYgKCF0aGlzLmlzSUUxMCkgewogICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnJlbW92ZUV2ZW50TGlzdGVuZXIoJ21vdXNlZG93bicsIHRoaXMubGlzdGVuZXJNb3VzZURvd24pOwogICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnJlbW92ZUV2ZW50TGlzdGVuZXIoJ3RvdWNoc3RhcnQnLCB0aGlzLmxpc3RlbmVyTW91c2VEb3duKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHdpbmRvdy5yZW1vdmVFdmVudExpc3RlbmVyKCdyZXNpemUnLCB0aGlzLmxpc3RlbmVyUmVzaXplKTsKICAgICAgICAgICAgICAgIGlmICghdGhpcy5jZFJlZlsnZGVzdHJveWVkJ10pIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLmNkUmVmLmRldGVjdENoYW5nZXMoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICB1cGRhdGVDb2xvclBpY2tlcihlbWl0ID0gdHJ1ZSwgdXBkYXRlID0gdHJ1ZSwgY215a0lucHV0ID0gZmFsc2UpIHsKICAgICAgICAgICAgaWYgKHRoaXMuc2xpZGVyRGltTWF4KSB7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5jcENvbG9yTW9kZSA9PT0gMikgewogICAgICAgICAgICAgICAgICAgIHRoaXMuaHN2YS5zID0gMDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGxldCBodWUsIGhzbGEsIHJnYmE7CiAgICAgICAgICAgICAgICBjb25zdCBsYXN0T3V0cHV0ID0gdGhpcy5vdXRwdXRDb2xvcjsKICAgICAgICAgICAgICAgIGhzbGEgPSB0aGlzLnNlcnZpY2UuaHN2YTJoc2xhKHRoaXMuaHN2YSk7CiAgICAgICAgICAgICAgICBpZiAoIXRoaXMuY3BDbXlrRW5hYmxlZCkgewogICAgICAgICAgICAgICAgICAgIHJnYmEgPSB0aGlzLnNlcnZpY2UuZGVub3JtYWxpemVSR0JBKHRoaXMuc2VydmljZS5oc3ZhVG9SZ2JhKHRoaXMuaHN2YSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKCFjbXlrSW5wdXQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmdiYSA9IHRoaXMuc2VydmljZS5oc3ZhVG9SZ2JhKHRoaXMuaHN2YSk7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuY215ayA9IHRoaXMuc2VydmljZS5kZW5vcm1hbGl6ZUNNWUsodGhpcy5zZXJ2aWNlLnJnYmFUb0NteWsocmdiYSkpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmdiYSA9IHRoaXMuc2VydmljZS5jbXlrVG9SZ2IodGhpcy5zZXJ2aWNlLm5vcm1hbGl6ZUNNWUsodGhpcy5jbXlrKSk7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuaHN2YSA9IHRoaXMuc2VydmljZS5yZ2JhVG9Ic3ZhKHJnYmEpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICByZ2JhID0gdGhpcy5zZXJ2aWNlLmRlbm9ybWFsaXplUkdCQShyZ2JhKTsKICAgICAgICAgICAgICAgICAgICB0aGlzLnNsaWRlckggPSB0aGlzLmhzdmEuaDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGh1ZSA9IHRoaXMuc2VydmljZS5kZW5vcm1hbGl6ZVJHQkEodGhpcy5zZXJ2aWNlLmhzdmFUb1JnYmEobmV3IEhzdmEodGhpcy5zbGlkZXJIIHx8IHRoaXMuaHN2YS5oLCAxLCAxLCAxKSkpOwogICAgICAgICAgICAgICAgaWYgKHVwZGF0ZSkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuaHNsYVRleHQgPSBuZXcgSHNsYShNYXRoLnJvdW5kKChoc2xhLmgpICogMzYwKSwgTWF0aC5yb3VuZChoc2xhLnMgKiAxMDApLCBNYXRoLnJvdW5kKGhzbGEubCAqIDEwMCksIE1hdGgucm91bmQoaHNsYS5hICogMTAwKSAvIDEwMCk7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5yZ2JhVGV4dCA9IG5ldyBSZ2JhKHJnYmEuciwgcmdiYS5nLCByZ2JhLmIsIE1hdGgucm91bmQocmdiYS5hICogMTAwKSAvIDEwMCk7CiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuY3BDbXlrRW5hYmxlZCkgewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmNteWtUZXh0ID0gbmV3IENteWsodGhpcy5jbXlrLmMsIHRoaXMuY215ay5tLCB0aGlzLmNteWsueSwgdGhpcy5jbXlrLmssIE1hdGgucm91bmQodGhpcy5jbXlrLmEgKiAxMDApIC8gMTAwKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgY29uc3QgYWxsb3dIZXg4ID0gdGhpcy5jcEFscGhhQ2hhbm5lbCA9PT0gJ2Fsd2F5cyc7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5oZXhUZXh0ID0gdGhpcy5zZXJ2aWNlLnJnYmFUb0hleChyZ2JhLCBhbGxvd0hleDgpOwogICAgICAgICAgICAgICAgICAgIHRoaXMuaGV4QWxwaGEgPSB0aGlzLnJnYmFUZXh0LmE7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAodGhpcy5jcE91dHB1dEZvcm1hdCA9PT0gJ2F1dG8nKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuZm9ybWF0ICE9PSBDb2xvckZvcm1hdHMuUkdCQSAmJiB0aGlzLmZvcm1hdCAhPT0gQ29sb3JGb3JtYXRzLkNNWUspIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuaHN2YS5hIDwgMSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5mb3JtYXQgPSB0aGlzLmhzdmEuYSA8IDEgPyBDb2xvckZvcm1hdHMuUkdCQSA6IENvbG9yRm9ybWF0cy5IRVg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLmh1ZVNsaWRlckNvbG9yID0gJ3JnYignICsgaHVlLnIgKyAnLCcgKyBodWUuZyArICcsJyArIGh1ZS5iICsgJyknOwogICAgICAgICAgICAgICAgdGhpcy5hbHBoYVNsaWRlckNvbG9yID0gJ3JnYignICsgcmdiYS5yICsgJywnICsgcmdiYS5nICsgJywnICsgcmdiYS5iICsgJyknOwogICAgICAgICAgICAgICAgdGhpcy5vdXRwdXRDb2xvciA9IHRoaXMuc2VydmljZS5vdXRwdXRGb3JtYXQodGhpcy5oc3ZhLCB0aGlzLmNwT3V0cHV0Rm9ybWF0LCB0aGlzLmNwQWxwaGFDaGFubmVsKTsKICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0ZWRDb2xvciA9IHRoaXMuc2VydmljZS5vdXRwdXRGb3JtYXQodGhpcy5oc3ZhLCAncmdiYScsIG51bGwpOwogICAgICAgICAgICAgICAgaWYgKHRoaXMuZm9ybWF0ICE9PSBDb2xvckZvcm1hdHMuQ01ZSykgewogICAgICAgICAgICAgICAgICAgIHRoaXMuY215a0NvbG9yID0gJyc7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5jcEFscGhhQ2hhbm5lbCA9PT0gJ2Fsd2F5cycgfHwgdGhpcy5jcEFscGhhQ2hhbm5lbCA9PT0gJ2VuYWJsZWQnIHx8CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuY3BBbHBoYUNoYW5uZWwgPT09ICdmb3JjZWQnKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGFscGhhID0gTWF0aC5yb3VuZCh0aGlzLmNteWsuYSAqIDEwMCkgLyAxMDA7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuY215a0NvbG9yID0gYGNteWthKCR7dGhpcy5jbXlrLmN9LCR7dGhpcy5jbXlrLm19LCR7dGhpcy5jbXlrLnl9LCR7dGhpcy5jbXlrLmt9LCR7YWxwaGF9KWA7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmNteWtDb2xvciA9IGBjbXlrKCR7dGhpcy5jbXlrLmN9LCR7dGhpcy5jbXlrLm19LCR7dGhpcy5jbXlrLnl9LCR7dGhpcy5jbXlrLmt9KWA7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdGhpcy5zbGlkZXIgPSBuZXcgU2xpZGVyUG9zaXRpb24oKHRoaXMuc2xpZGVySCB8fCB0aGlzLmhzdmEuaCkgKiB0aGlzLnNsaWRlckRpbU1heC5oIC0gOCwgdGhpcy5oc3ZhLnMgKiB0aGlzLnNsaWRlckRpbU1heC5zIC0gOCwgKDEgLSB0aGlzLmhzdmEudikgKiB0aGlzLnNsaWRlckRpbU1heC52IC0gOCwgdGhpcy5oc3ZhLmEgKiB0aGlzLnNsaWRlckRpbU1heC5hIC0gOCk7CiAgICAgICAgICAgICAgICBpZiAoZW1pdCAmJiBsYXN0T3V0cHV0ICE9PSB0aGlzLm91dHB1dENvbG9yKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuY3BDbXlrRW5hYmxlZCkgewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmRpcmVjdGl2ZUluc3RhbmNlLmNteWtDaGFuZ2VkKHRoaXMuY215a0NvbG9yKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgdGhpcy5kaXJlY3RpdmVJbnN0YW5jZS5jb2xvckNoYW5nZWQodGhpcy5vdXRwdXRDb2xvcik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLy8gUHJpdmF0ZSBoZWxwZXIgZnVuY3Rpb25zIGZvciB0aGUgY29sb3IgcGlja2VyIGRpYWxvZyBwb3NpdGlvbmluZwogICAgICAgIHNldERpYWxvZ1Bvc2l0aW9uKCkgewogICAgICAgICAgICBpZiAodGhpcy5jcERpYWxvZ0Rpc3BsYXkgPT09ICdpbmxpbmUnKSB7CiAgICAgICAgICAgICAgICB0aGlzLnBvc2l0aW9uID0gJ3JlbGF0aXZlJzsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIGxldCBwb3NpdGlvbiA9ICdzdGF0aWMnLCB0cmFuc2Zvcm0gPSAnJywgc3R5bGU7CiAgICAgICAgICAgICAgICBsZXQgcGFyZW50Tm9kZSA9IG51bGwsIHRyYW5zZm9ybU5vZGUgPSBudWxsOwogICAgICAgICAgICAgICAgbGV0IG5vZGUgPSB0aGlzLmRpcmVjdGl2ZUVsZW1lbnRSZWYubmF0aXZlRWxlbWVudC5wYXJlbnROb2RlOwogICAgICAgICAgICAgICAgY29uc3QgZGlhbG9nSGVpZ2h0ID0gdGhpcy5kaWFsb2dFbGVtZW50Lm5hdGl2ZUVsZW1lbnQub2Zmc2V0SGVpZ2h0OwogICAgICAgICAgICAgICAgd2hpbGUgKG5vZGUgIT09IG51bGwgJiYgbm9kZS50YWdOYW1lICE9PSAnSFRNTCcpIHsKICAgICAgICAgICAgICAgICAgICBzdHlsZSA9IHdpbmRvdy5nZXRDb21wdXRlZFN0eWxlKG5vZGUpOwogICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gc3R5bGUuZ2V0UHJvcGVydHlWYWx1ZSgncG9zaXRpb24nKTsKICAgICAgICAgICAgICAgICAgICB0cmFuc2Zvcm0gPSBzdHlsZS5nZXRQcm9wZXJ0eVZhbHVlKCd0cmFuc2Zvcm0nKTsKICAgICAgICAgICAgICAgICAgICBpZiAocG9zaXRpb24gIT09ICdzdGF0aWMnICYmIHBhcmVudE5vZGUgPT09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcGFyZW50Tm9kZSA9IG5vZGU7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGlmICh0cmFuc2Zvcm0gJiYgdHJhbnNmb3JtICE9PSAnbm9uZScgJiYgdHJhbnNmb3JtTm9kZSA9PT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgICAgICB0cmFuc2Zvcm1Ob2RlID0gbm9kZTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgaWYgKHBvc2l0aW9uID09PSAnZml4ZWQnKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmVudE5vZGUgPSB0cmFuc2Zvcm1Ob2RlOwogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgbm9kZSA9IG5vZGUucGFyZW50Tm9kZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGNvbnN0IGJveERpcmVjdGl2ZSA9IHRoaXMuY3JlYXRlRGlhbG9nQm94KHRoaXMuZGlyZWN0aXZlRWxlbWVudFJlZi5uYXRpdmVFbGVtZW50LCAocG9zaXRpb24gIT09ICdmaXhlZCcpKTsKICAgICAgICAgICAgICAgIGlmICh0aGlzLnVzZVJvb3RWaWV3Q29udGFpbmVyIHx8IChwb3NpdGlvbiA9PT0gJ2ZpeGVkJyAmJgogICAgICAgICAgICAgICAgICAgICghcGFyZW50Tm9kZSB8fCBwYXJlbnROb2RlIGluc3RhbmNlb2YgSFRNTFVua25vd25FbGVtZW50KSkpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLnRvcCA9IGJveERpcmVjdGl2ZS50b3A7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5sZWZ0ID0gYm94RGlyZWN0aXZlLmxlZnQ7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBpZiAocGFyZW50Tm9kZSA9PT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgICAgICBwYXJlbnROb2RlID0gbm9kZTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgY29uc3QgYm94UGFyZW50ID0gdGhpcy5jcmVhdGVEaWFsb2dCb3gocGFyZW50Tm9kZSwgKHBvc2l0aW9uICE9PSAnZml4ZWQnKSk7CiAgICAgICAgICAgICAgICAgICAgdGhpcy50b3AgPSBib3hEaXJlY3RpdmUudG9wIC0gYm94UGFyZW50LnRvcDsKICAgICAgICAgICAgICAgICAgICB0aGlzLmxlZnQgPSBib3hEaXJlY3RpdmUubGVmdCAtIGJveFBhcmVudC5sZWZ0OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKHBvc2l0aW9uID09PSAnZml4ZWQnKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5wb3NpdGlvbiA9ICdmaXhlZCc7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBsZXQgdXNlUG9zaXRpb24gPSB0aGlzLmNwUG9zaXRpb247CiAgICAgICAgICAgICAgICBpZiAodGhpcy5jcFBvc2l0aW9uID09PSAnYXV0bycpIHsKICAgICAgICAgICAgICAgICAgICBsZXQgdXNlUG9zaXRpb25YID0gJ3JpZ2h0JzsKICAgICAgICAgICAgICAgICAgICBsZXQgdXNlUG9zaXRpb25ZID0gJ2JvdHRvbSc7CiAgICAgICAgICAgICAgICAgICAgY29uc3Qgd2luV2lkdGggPSBNYXRoLm1heChkb2N1bWVudC5kb2N1bWVudEVsZW1lbnQuY2xpZW50V2lkdGgsIHdpbmRvdy5pbm5lcldpZHRoIHx8IDApOwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHdpbkhlaWdodCA9IE1hdGgubWF4KGRvY3VtZW50LmRvY3VtZW50RWxlbWVudC5jbGllbnRIZWlnaHQsIHdpbmRvdy5pbm5lckhlaWdodCB8fCAwKTsKICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5sZWZ0ICsgdGhpcy5jcFdpZHRoID4gd2luV2lkdGgpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdXNlUG9zaXRpb25YID0gJ2xlZnQnOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy50b3AgKyBkaWFsb2dIZWlnaHQgPiB3aW5IZWlnaHQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdXNlUG9zaXRpb25ZID0gJ3RvcCc7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHVzZVBvc2l0aW9uID0gdXNlUG9zaXRpb25YICsgJy0nICsgdXNlUG9zaXRpb25ZOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdGhpcy5jcFVzZVBvc2l0aW9uID0gdXNlUG9zaXRpb247CiAgICAgICAgICAgICAgICBpZiAodXNlUG9zaXRpb24gPT09ICd0b3AnKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5hcnJvd1RvcCA9IGRpYWxvZ0hlaWdodCAtIDE7CiAgICAgICAgICAgICAgICAgICAgdGhpcy50b3AgLT0gZGlhbG9nSGVpZ2h0ICsgdGhpcy5kaWFsb2dBcnJvd1NpemU7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5sZWZ0ICs9IHRoaXMuY3BQb3NpdGlvbk9mZnNldCAvIDEwMCAqIGJveERpcmVjdGl2ZS53aWR0aCAtIHRoaXMuZGlhbG9nQXJyb3dPZmZzZXQ7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmICh1c2VQb3NpdGlvbiA9PT0gJ2JvdHRvbScpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLnRvcCArPSBib3hEaXJlY3RpdmUuaGVpZ2h0ICsgdGhpcy5kaWFsb2dBcnJvd1NpemU7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5sZWZ0ICs9IHRoaXMuY3BQb3NpdGlvbk9mZnNldCAvIDEwMCA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tJykgewogICAgICAgICAgICAgICAgICAgIHRoaXMudG9wICs9IGJveERpcmVjdGl2ZS5oZWlnaHQgKiB0aGlzLmNwUG9zaXRpb25PZmZzZXQgLyAxMDAgLSB0aGlzLmRpYWxvZ0Fycm93T2Zmc2V0OwogICAgICAgICAgICAgICAgICAgIHRoaXMubGVmdCAtPSB0aGlzLmNwV2lkdGggKyB0aGlzLmRpYWxvZ0Fycm93U2l6ZSAtIDI7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsgLy8gdXNlUG9zaXRpb24gPT09ICdyaWdodCcgfHwgdXNlUG9zaXRpb24gPT09ICdib3R0b20tcmlnaHQnIHx8IHVzZVBvc2l0aW9uID09PSAncmlnaHQtYm90dG9tJwogICAgICAgICAgICAgICAgICAgIHRoaXMudG9wICs9IGJveERpcmVjdGl2ZS5oZWlnaHQgKiB0aGlzLmNwUG9zaXRpb25PZmZzZXQgLyAxMDAgLSB0aGlzLmRpYWxvZ0Fycm93T2Zmc2V0OwogICAgICAgICAgICAgICAgICAgIHRoaXMubGVmdCArPSBib3hEaXJlY3RpdmUud2lkdGggKyB0aGlzLmRpYWxvZ0Fycm93U2l6ZSAtIDI7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLy8gUHJpdmF0ZSBoZWxwZXIgZnVuY3Rpb25zIGZvciB0aGUgY29sb3IgcGlja2VyIGRpYWxvZyBwb3NpdGlvbmluZyBhbmQgb3BlbmluZwogICAgICAgIGlzRGVzY2VuZGFudChwYXJlbnQsIGNoaWxkKSB7CiAgICAgICAgICAgIGxldCBub2RlID0gY2hpbGQucGFyZW50Tm9kZTsKICAgICAgICAgICAgd2hpbGUgKG5vZGUgIT09IG51bGwpIHsKICAgICAgICAgICAgICAgIGlmIChub2RlID09PSBwYXJlbnQpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAg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rIikoInZpc2liaWxpdHkiLCBjdHguaGlkZGVuID8gImhpZGRlbiIgOiAidmlzaWJsZSIpKCJ0b3AiLCBjdHgudG9wLCAicHgiKSgibGVmdCIsIGN0eC5sZWZ0LCAicHgiKSgicG9zaXRpb24iLCBjdHgucG9zaXRpb24pKCJoZWlnaHQiLCBjdHguY3BIZWlnaHQsICJweCIpKCJ3aWR0aCIsIGN0eC5jcFdpZHRoLCAicHgiKTsKICAgICAgICAgICAgybXJtWNsYXNzUHJvcCgib3BlbiIsIGN0eC5zaG93KTsKICAgICAgICAgICAgybXJtWFkdmFuY2UoMik7CiAgICAgICAgICAgIMm1ybVwcm9wZXJ0eSgibmdJZiIsIGN0eC5jcERpYWxvZ0Rpc3BsYXkgPT0gInBvcHVwIik7CiAgICAgICAgICAgIMm1ybVhZHZhbmNlKDEpOwogICAgICAgICAgICDJtcm1cHJvcGVydHkoIm5nSWYiLCAoY3R4LmNwQ29sb3JNb2RlIHx8IDEpID09PSAxKTsKICAgICAgICAgICAgybXJtWFkdmFuY2UoNCk7CiAgICAgICAgICAgIMm1ybVzdHlsZVByb3AoImJhY2tncm91bmQtY29sb3IiLCBjdHguc2VsZWN0ZWRDb2xvcik7CiAgICAgICAgICAgIMm1ybVhZHZhbmNlKDEpOwogICAgICAgICAgICDJtcm1cHJvcGVydHkoIm5nSWYiLCBjdHguY3BBZGRDb2xvckJ1dHRvbik7CiAgICAgICAgICAgIMm1ybVhZHZhbmNlKDIpOwogICAgICAgICAgICDJtcm1cHJvcGVydHkoIm5nSWYiLCBjdHguY3BBbHBoYUNoYW5uZWwgPT09ICJkaXNhYmxlZCIpOwogICAgICAgICAgICDJtcm1YWR2YW5jZSgxKTsKICAgICAgICAgICAgybXJtXN0eWxlUHJvcCgiZGlzcGxheSIsIChjdHguY3BDb2xvck1vZGUgfHwgMSkgPT09IDEgPyAiYmxvY2siIDogIm5vbmUiKTsKICAgICAgICAgICAgybXJtXByb3BlcnR5KCJyZ1giLCAxKTsKICAgICAgICAgICAgybXJtWFkdmFuY2UoMik7CiAgICAgICAgICAgIMm1ybVzdHlsZVByb3AoImxlZnQiLCBjdHguc2xpZGVyID09IG51bGwgPyBudWxsIDogY3R4LnNsaWRlci5oLCAicHgiKTsKICAgICAgICAgICAgybXJtWFkdmFuY2UoMSk7CiAgICAgICAgICAgIMm1ybVzdHlsZVByb3AoImRpc3BsYXkiLCAoY3R4LmNwQ29sb3JNb2RlIHx8IDEpID09PSAyID8gImJsb2NrIiA6ICJub25lIik7CiAgICAgICAgICAgIMm1ybVwcm9wZXJ0eSgicmdYIiwgMSk7CiAgICAgICAgICAgIMm1ybVhZHZhbmNlKDIpOwogICAgICAgICAgICDJtcm1c3R5bGVQcm9wKCJyaWdodCIsIGN0eC5zbGlkZXIgPT0gbnVsbCA/IG51bGwgOiBjdHguc2xpZGVyLnYsICJweCIpOwogICAgICAgICAgICDJtcm1YWR2YW5jZSgxKTsKICAgICAgICAgICAgybXJtXN0eWxlUHJvcCgiZGlzcGxheSIsIGN0eC5jcEFscGhhQ2hhbm5lbCA9PT0gImRpc2FibGVkIiA/ICJub25lIiA6ICJibG9jayIpKCJiYWNrZ3JvdW5kLWNvbG9yIiwgY3R4LmFscGhhU2xpZGVyQ29sb3IpOwogICAgICAgICAgICDJtcm1cHJvcGVydHkoInJnWCIsIDEpOwogICAgICAgICAgICDJtcm1YWR2YW5jZSgyKTsKICAgICAgICAgICAgybXJtXN0eWxlUHJvcCgibGVmdCIsIGN0eC5zbGlkZXIgPT0gbnVsbCA/IG51bGwgOiBjdHguc2xpZGVyLmEsICJweCIpOwogICAgICAgICAgICDJtcm1YWR2YW5jZSgxKTsKICAgICAgICAgICAgybXJtXByb3BlcnR5KCJuZ0lmIiwgIWN0eC5jcERpc2FibGVJbnB1dCAmJiAoY3R4LmNwQ29sb3JNb2RlIHx8IDEpID09PSAxKTsKICAgICAgICAgICAgybXJtWFkdmFuY2UoMSk7CiAgICAgICAgICAgIMm1ybVwcm9wZXJ0eSgibmdJZiI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xvclBpY2tlckNhbmNlbCA9IG5ldyBFdmVudEVtaXR0ZXIodHJ1ZSk7CiAgICAgICAgICAgIHRoaXMuY29sb3JQaWNrZXJTZWxlY3QgPSBuZXcgRXZlbnRFbWl0dGVyKHRydWUpOwogICAgICAgICAgICB0aGlzLmNvbG9yUGlja2VyQ2hhbmdlID0gbmV3IEV2ZW50RW1pdHRlcihmYWxzZSk7CiAgICAgICAgICAgIHRoaXMuY3BDbXlrQ29sb3JDaGFuZ2UgPSBuZXcgRXZlbnRFbWl0dGVyKHRydWUpOwogICAgICAgICAgICB0aGlzLmNwUHJlc2V0Q29sb3JzQ2hhbmdlID0gbmV3IEV2ZW50RW1pdHRlcih0cnVlKTsKICAgICAgICB9CiAgICAgICAgaGFuZGxlQ2xpY2soKSB7CiAgICAgICAgICAgIHRoaXMuaW5wdXRGb2N1cygpOwogICAgICAgIH0KICAgICAgICBoYW5kbGVGb2N1cygpIHsKICAgICAgICAgICAgdGhpcy5pbnB1dEZvY3VzKCk7CiAgICAgICAgfQogICAgICAgIGhhbmRsZUlucHV0KGV2ZW50KSB7CiAgICAgICAgICAgIHRoaXMuaW5wdXRDaGFuZ2UoZXZlbnQpOwogICAgICAgIH0KICAgICAgICBuZ09uRGVzdHJveSgpIHsKICAgICAgICAgICAgaWYgKHRoaXMuY21wUmVmICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIGlmICh0aGlzLnZpZXdBdHRhY2hlZFRvQXBwUmVmKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5hcHBSZWYuZGV0YWNoVmlldyh0aGlzLmNtcFJlZi5ob3N0Vmlldyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLmNtcFJlZi5kZXN0cm95KCk7CiAgICAgICAgICAgICAgICB0aGlzLmNtcFJlZiA9IG51bGw7CiAgICAgICAgICAgICAgICB0aGlzLmRpYWxvZyA9IG51bGw7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgbmdPbkNoYW5nZXMoY2hhbmdlcykgewogICAgICAgICAgICBpZiAoY2hhbmdlcy5jcFRvZ2dsZSAmJiAhdGhpcy5jcERpc2FibGVkKSB7CiAgICAgICAgICAgICAgICBpZiAoY2hhbmdlcy5jcFRvZ2dsZS5jdXJyZW50VmFsdWUpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLm9wZW5EaWFsb2coKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKCFjaGFuZ2VzLmNwVG9nZ2xlLmN1cnJlbnRWYWx1ZSkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuY2xvc2VEaWFsb2coKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoY2hhbmdlcy5jb2xvclBpY2tlcikgewogICAgICAgICAgICAgICAgaWYgKHRoaXMuZGlhbG9nICYmICF0aGlzLmlnbm9yZUNoYW5nZXMpIHsKICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5jcERpYWxvZ0Rpc3BsYXkgPT09ICdpbmxpbmUnKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZGlhbG9nLnNldEluaXRpYWxDb2xvcihjaGFuZ2VzLmNvbG9yUGlja2VyLmN1cnJlbnRWYWx1ZSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHRoaXMuZGlhbG9nLnNldENvbG9yRnJvbVN0cmluZyhjaGFuZ2VzLmNvbG9yUGlja2VyLmN1cnJlbnRWYWx1ZSwgZmFsc2UpOwogICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmNwVXNlUm9vdFZpZXdDb250YWluZXIgJiYgdGhpcy5jcERpYWxvZ0Rpc3BsYXkgIT09ICdpbmxpbmUnKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuY21wUmVmLmNoYW5nZURldGVjdG9yUmVmLmRldGVjdENoYW5nZXMoKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLmlnbm9yZUNoYW5nZXMgPSBmYWxzZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoY2hhbmdlcy5jcFByZXNldExhYmVsIHx8IGNoYW5nZXMuY3BQcmVzZXRDb2xvcnMpIHsKICAgICAgICAgICAgICAgIGlmICh0aGlzLmRpYWxvZykgewogICAgICAgICAgICAgICAgICAgIHRoaXMuZGlhbG9nLnNldFByZXNldENvbmZpZyh0aGlzLmNwUHJlc2V0TGFiZWwsIHRoaXMuY3BQcmVzZXRDb2xvcnMpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIG9wZW5EaWFsb2coKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5kaWFsb2dDcmVhdGVkKSB7CiAgICAgICAgICAgICAgICBsZXQgdmNSZWYgPSB0aGlzLnZjUmVmOwogICAgICAgICAgICAgICAgdGhpcy5kaWFsb2dDcmVhdGVkID0gdHJ1ZTsKICAgICAgICAgICAgICAgIHRoaXMudmlld0F0dGFjaGVkVG9BcHBSZWYgPSBmYWxzZTsKICAgICAgICAgICAgICAgIGlmICh0aGlzLmNwVXNlUm9vdFZpZXdDb250YWluZXIgJiYgdGhpcy5jcERpYWxvZ0Rpc3BsYXkgIT09ICdpbmxpbmUnKSB7CiAgICAgICAgICAgICAgICAgICAgY29uc3QgY2xhc3NPZlJvb3RDb21wb25lbnQgPSB0aGlzLmFwcFJlZi5jb21wb25lbnRUeXBlc1swXTsKICAgICAgICAgICAgICAgICAgICBjb25zdCBhcHBJbnN0YW5jZSA9IHRoaXMuaW5qZWN0b3IuZ2V0KGNsYXNzT2ZSb290Q29tcG9uZW50LCBJbmplY3Rvci5OVUxMKTsKICAgICAgICAgICAgICAgICAgICBpZiAoYXBwSW5zdGFuY2UgIT09IEluamVjdG9yLk5VTEwpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdmNSZWYgPSBhcHBJbnN0YW5jZS52Y1JlZiB8fCBhcHBJbnN0YW5jZS52aWV3Q29udGFpbmVyUmVmIHx8IHRoaXMudmNSZWY7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2Y1JlZiA9PT0gdGhpcy52Y1JlZikgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS53YXJuKCdZb3UgYXJlIHVzaW5nIGNwVXNlUm9vdFZpZXdDb250YWluZXIsICcgKwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdidXQgdGhlIHJvb3QgY29tcG9uZW50IGlzIG5vdCBleHBvc2luZyB2aWV3Q29udGFpbmVyUmVmIScgKwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdQbGVhc2UgZXhwb3NlIGl0IGJ5IGFkZGluZyBcJ3B1YmxpYyB2Y1JlZjogVmlld0NvbnRhaW5lclJlZlwnIHRvIHRoZSBjb25zdHJ1Y3Rvci4nKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy52aWV3QXR0YWNoZWRUb0FwcFJlZiA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgY29uc3QgY29tcEZhY3RvcnkgPSB0aGlzLmNmci5yZXNvbHZlQ29tcG9uZW50RmFjdG9yeShDb2xvclBpY2tlckNvbXBvbmVudCk7CiAgICAgICAgICAgICAgICBpZiAodGhpcy52aWV3QXR0YWNoZWRUb0FwcFJlZikgewogICAgICAgICAgICAgICAgICAgIHRoaXMuY21wUmVmID0gY29tcEZhY3RvcnkuY3JlYXRlKHRoaXMuaW5qZWN0b3IpOwogICAgICAgICAgICAgICAgICAgIHRoaXMuYXBwUmVmLmF0dGFjaFZpZXcodGhpcy5jbXBSZWYuaG9zdFZpZXcpOwogICAgICAgICAgICAgICAgICAgIGRvY3VtZW50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kLmxlbmd0aCkgewogICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBkb2N1bWVudCAhPT0gJ3VuZGVmaW5lZCcgJiYgZWxlbWVudCA9PT0gZG9jdW1lbnQuYWN0aXZlRWxlbWVudCkgewogICAgICAgICAgICAgICAgICAgIHRoaXMub3BlbkRpYWxvZygpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAoIXRoaXMuZGlhbG9nIHx8ICF0aGlzLmRpYWxvZy5zaG93KSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5vcGVuRGlhbG9nKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLmNsb3NlRGlhbG9nKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaW5wdXRDaGFuZ2UoZXZlbnQpIHsKICAgICAgICAgICAgaWYgKHRoaXMuZGlhbG9nKSB7CiAgICAgICAgICAgICAgICB0aGlzLmRpYWxvZy5zZXRDb2xvckZyb21TdHJpbmcoZXZlbnQudGFyZ2V0LnZhbHVlLCB0cnVlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuY29sb3JQaWNrZXIgPSBldmVudC50YXJnZXQudmFsdWU7CiAgICAgICAgICAgICAgICB0aGlzLmNvbG9yUGlja2VyQ2hhbmdlLmVtaXQodGhpcy5jb2xvclBpY2tlcik7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaW5wdXRDaGFuZ2VkKGV2ZW50KSB7CiAgICAgICAgICAgIHRoaXMuY3BJbnB1dENoYW5nZS5lbWl0KGV2ZW50KTsKICAgICAgICB9CiAgICAgICAgc2xpZGVyQ2hhbmdlZChldmVudCkgewogICAgICAgICAgICB0aGlzLmNwU2xpZGVyQ2hhbmdlLmVtaXQoZXZlbnQpOwogICAgICAgIH0KICA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bXkgb2YgdGhlIGNvbXBvbmVudDoKICAgICAqCiAgICAgKiAgICAgICBsZWZ0IGlucHV0ICAgICAgICAgICAgIHJpZ2h0IGlucHV0CiAgICAgKiAgICstLS0tLS0tLS0tLS0tLS0tLSsgICAgICstLS0tLS0tLS0tLS0tLS0tKwogICAgICogICB8ICAgICAgICAgICAgICAgICB8ICAgICB8ICAgICAgICAgICAgICAgIHwKICAgICAqICAgKy0tLS0tLS0tLS0tLS0tLS0tKyAgICAgKy0tLS0tLS0tLS0tLS0tLS0rCiAgICAgKiAgICAgICA8bG93ZXJWYWx1ZT4gICAgICAgICAgIDx1cHBlclZhbHVlPgogICAgICoKICAgICAqICAgICAgICAgbGVmdCB0aHVtYiAgICAgICAgIHJpZ2h0IHRodW1iCiAgICAgKiAgICAgICAgICAgKy0tLSsgICAgICAgICAgICAgICArLS0tKwogICAgICogICAgICAgICAgIHwgICArICAgICB0cmFjayAgICAgKyAgIHwKICAgICAqICAgeCstLS0tLS0tLSs9PT09PT09PT09PT09PT09PT09Ky0tLS0tLS0tLSt4CiAgICAgKiA8bWluPiAgICAgfCAgICsgICAgICAgICAgICAgICArICAgfCAgICAgIDxtYXg+CiAgICAgKiAgICAgICAgICAgKy0tLSsgICAgICAgICAgICAgICArLS0tKwogICAgICogICAgICAgIDxsb3dlclZhbHVlPiAgICAgICAgPHVwcGVyVmFsdWU+CiAgICAgKgogICAgICogRmVhdHVyZXM6CiAgICAgKiAtIHlvdSBjYW4gZHJhZyBhIHRodW1iIHRvIGNoYW5nZSBsb3dlclZhbHVlIG9yIHVwcGVyVmFsdWUKICAgICAqIC0geW91IGNhbm5vdCBjbGljayBvbiB0cmFjayB0byBjaGFuZ2UgYW55IHZhbHVlCiAgICAgKiAtIGEgdGh1bWIgaXMgY2VudGVyZWQgKG9yaWdpbiBvZiB0aGUgY2lyY2xlKSB3LnIudCBhIHZhbHVlLgogICAgICogLSB3aGVuIGxvd2VyVmFsdWUgY3Jvc3MgdXBwZXJWYWx1ZS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ICAqLwogICAgICAgIGdldFRodW1iUG9zaXRpb24odmFsdWUpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjbGlwcGVkVmFsdWUgPSB0aGlzLmdldENsaXBwZWRWYWx1ZSh2YWx1ZSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgYm91bmRTaXplID0gdGhpcy5tYXggLSB0aGlzLm1pbjsKICAgICAgICAgICAgaWYgKGJvdW5kU2l6ZSA8PSAwKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gJzUwJSc7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwZXJjZW50RGlmZmVyZW5jZSA9ICgoY2xpcHBlZFZhbHVlIC0gdGhpcy5taW4pIC8gYm91bmRTaXplKSAqIDEwMDsKICAgICAgICAgICAgcmV0dXJuIGAke3BlcmNlbnREaWZmZXJlbmNlfSVgOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldFRyYWNrV2lkdGgoKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgYm91bmRTaXplID0gdGhpcy5tYXggLSB0aGlzLm1pbjsKICAgICAgICAgICAgaWYgKGJvdW5kU2l6ZSA8PSAwKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gJzAlJzsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHZhbERpZmYgPSB0aGlzLmdldENsaXBwZWRWYWx1ZSh0aGlzLnVwcGVyVmFsdWUpIC0KICAgICAgICAgICAgICAgIHRoaXMuZ2V0Q2xpcHBlZFZhbHVlKHRoaXMubG93ZXJWYWx1ZSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcGVyY2VudERpZmZlcmVuY2UgPSAodmFsRGlmZiAvIGJvdW5kU2l6ZSkgKiAxMDA7CiAgICAgICAgICAgIHJldHVybiBgJHtwZXJjZW50RGlmZmVyZW5jZX0lYDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXRDbGlwcGVkVmFsdWUodmFsdWUpIHsKICAgICAgICAgICAgcmV0dXJuIE1hdGgubWluKE1hdGgubWF4KHZhbHVlLCB0aGlzLm1pbiksIHRoaXMubWF4KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uRGVzdHJveSgpIHsKICAgICAgICAgICAgdGhpcy5uZ1Vuc3Vic2NyaWJlLm5leHQoKTsKICAgICAgICAgICAgdGhpcy5uZ1Vuc3Vic2NyaWJlLmNvbXBsZXRlKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkluaXQoKSB7CiAgICAgICAgICAgIGZyb21FdmVudChkb2N1bWVudCwgJ21vdXNlbW92ZScsIHsgcGFzc2l2ZTogdHJ1ZSB9KQogICAgICAgICAgICAgICAgLnBpcGUodGFrZVVudGlsKHRoaXMubmdVbnN1YnNjcmliZSkpCiAgICAgICAgICAgICAgICAuc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBldmVudAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGV2ZW50KSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLmhhbmRsZU1vdXNlTW92ZSgoLyoqIEB0eXBlIHs/fSAqLyAoZXZlbnQpKSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgZnJvbUV2ZW50KGRvY3VtZW50LCAnbW91c2V1cCcsIHsgcGFzc2l2ZTogdHJ1ZSB9KQogICAgICAgICAgICAgICAgLnBpcGUodGFrZVVudGlsKHRoaXMubmdVbnN1YnNjcmliZSkpCiAgICAgICAgICAgICAgICAuc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBldmVudAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGV2ZW50KSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLmhhbmRsZU1vdXNlT3V0KCgvKiogQHR5cGUgez99ICovIChldmVudCkpKTsKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50CiAgICAgICAgICogQHBhcmFtIHs/fSBwb3NpdGlvbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgaGFuZGxlTW91c2VEb3duKGV2ZW50LCBwb3NpdGlvbikgewogICAgICAgICAgICB0aGlzLmFjdGl2ZVRodW1iID0gcG9zaXRpb247CiAgICAgICAgICAgIC8vIE1vdXNlIGV2ZW50IHJlcG9ydHMgY3Vyc29yIHBvc2l0aW9uIHcuci50IHRoZSB0b3AgbGVmdCBlZGdlIG9mIHRoZSB0YXJnZXQKICAgICAgICAgICAgLy8gKGluIHRoaXMgY2FzZSwgYSB0aHVtYikgZWxlbWVudC4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBvZmZzZXRYRnJvbUxlZnRPZlRodW1iID0gZXZlbnQub2Zmc2V0WDsKICAgICAgICAgICAgLy8gVGhlIHRodW1iIGlzIHZpc3VhbGx5IGNlbnRlcmVkIHcuci50LiBhIHZhbHVlIHVzaW5nIG5lZ2F0aXZlIG1hcmdpbiBvZgogICAgICAgICAgICAvLyBU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4gb2YgdGhlIGFjdGl2ZSB0aHVtYi4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjb21wZW5zYXRlZFJlbGF0aXZlWEluUHggPSByZWxhdGl2ZVhQeCArIHRoaXMub2Zmc2V0WEZyb21PcmlnaW5PZkFjdGl2ZVRodW1iOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCB4UG9zaXRpb25JblBlcmNlbnQ7CiAgICAgICAgICAgIGlmICh0aGlzLnRpY2tDb3VudCAhPT0gbnVsbCAmJiB0aGlzLnRpY2tDb3VudCA+IDApIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHRpY2tXaWR0aEluUHggPSAocmlnaHQgLSBsZWZ0KSAvIHRoaXMudGlja0NvdW50OwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgdGlja1N0dWNrUmVsYXRpdmVQeCA9IE1hdGgucm91bmQoY29tcGVuc2F0ZWRSZWxhdGl2ZVhJblB4IC8gdGlja1dpZHRoSW5QeCkgKiB0aWNrV2lkdGhJblB4OwogICAgICAgICAgICAgICAgeFBvc2l0aW9uSW5QZXJjZW50ID0gdGlja1N0dWNrUmVsYXRpdmVQeCAvIChyaWdodCAtIGxlZnQpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgeFBvc2l0aW9uSW5QZXJjZW50ID0gY29tcGVuc2F0ZWRSZWxhdGl2ZVhJblB4IC8gKHJpZ2h0IC0gbGVmdCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRoaXMuZ2V0Q2xpcHBlZFZhbHVlKHRoaXMubWluICsgKHRoaXMubWF4IC0gdGhpcy5taW4pICogeFBvc2l0aW9uSW5QZXJjZW50KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICA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ZlcnNhLCB3ZSBuZWVkIHRvIHVwZGF0ZSB0aGUgYHRoaXMuYWN0aXZlVGh1bWJgCiAgICAgICAgICogYWNjb3JkaW5nbHkuIFRoaXMgaXMgZXNwZWNpYWxseSBpbXBvcnRhbnQgYmVjYXVzZSB0aGUgY29tcG9uZW50IGlzIGEKICAgICAgICAgKiAiY29udHJvbGxlZCBjb21wb25lbnQiIFsxXSBhbmQsIHdoZW4gcHJvcHMgdXBkYXRlLCB3ZSBkbyBub3Qga25vdyB3aGV0aGVyCiAgICAgICAgICogYGxvd2VyVmFsdWVgIG9yIGB1cHBlclZhbHVlYCBjb3JyZXNwb25kIHRvIHRoZSBhY3RpdmVUaHVtYiAoaS5lLiwgaWYgdGhpcwogICAgICAgICAqIHdlcmUgY29tcGxldGVseSB1bmNvbnRyb2xsZWQgY29tcG9uZW50LCB3ZSBjYW4gdGFrZSBpbml0aWFsIHBvc2l0aW9uIG9mIHRoZQogICAgICAgICAqIHRodW1iIHZpYSBwcm9wLCB0cmFjayBET00vcG9zaXRpb24gb2YgYWN0aXZlIGFuZCBpbmFjdGl2ZSB0aHVtYnMgdG8KICAgICAgICAgKiB1cGRhdGUvbW92ZSB0aGUgY29ycmVjdCBET00pLgogICAgICAgICAqCiAgICAgICAgICogWzFdOiBodHRwczovL3JlYWN0anMub3JnL2RvY3MvZm9ybXMuaHRtbCNjb250cm9sbGVkLWNvbXBvbmVudHMKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGhhbmRsZU1vdXNlTW92ZShldmVudCkgewogICAgICAgICAgICBpZiAodGhpcy5hY3RpdmVUaHVtYiA9PT0gUG9zaXRpb24uTk9ORSkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbmV3VmFsdWUgPSB0aGlzLmNhbGN1bGF0ZVZhbHVlRnJvbU1vdXNlRXZlbnQoZXZlbnQpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBuZXh0VmFsdWVzID0gW3RoaXMubG93ZXJWYWx1ZSwgdGhpcy51cHBlclZhbHVlXTsKICAgICAgICAgICAgaWYgKHRoaXMuYWN0aXZlVGh1bWIgPT09IFBvc2l0aW9uLkxFRlQpIHsKICAgICAgICAgICAgICAgIGlmIChuZXdWYWx1ZSA+IHRoaXMudXBwZXJWYWx1ZSkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuYWN0aXZlVGh1bWIgPSBQb3NpdGlvbi5SSUdIVDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIG5leHRWYWx1ZXMgPSBbbmV3VmFsdWUsIHRoaXMudXBwZXJWYWx1ZV07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBpZiAobmV3VmFsdWUgPCB0aGlzLmxvd2VyVmFsdWUpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLmFjdGl2ZVRodW1iID0gUG9zaXRpb24uTEVGVDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIG5leHRWYWx1ZXMgPSBbdGhpcy5sb3dlclZhbHVlLCBuZXdWYWx1ZV07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5tYXliZU5vdGlmeU5leHRWYWx1ZShuZXh0VmFsdWVzKTsKICAgICAgICAgICAgdGhpcy5jaGFuZ2VEZXRlY3Rvci5tYXJrRm9yQ2hlY2soKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IG1pbkFuZE1heAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbWF5YmVOb3RpZnlOZXh0VmFsdWUobWluQW5kTWF4KSB7CiAgICAgICAgICAgIGNvbnN0IFtsb3dlclZhbHVlLCB1cHBlclZhbHVlXSA9IG1pbkFuZE1heC5zb3J0KCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBhCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gYgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGEsIGIpID0+IGEgLSBiKSk7CiAgICAgICAgICAgIGlmICh0aGlzLmxvd2VyVmFsdWUgIT09IGxvd2VyVmFsdWUgfHwgdGhpcy51cHBlclZhbHVlICE9PSB1cHBlclZhbHVlKSB7CiAgICAgICAgICAgICAgICB0aGlzLnZhbHVlLmVtaXQoeyBsb3dlclZhbHVlLCB1cHBlclZhbHVlIH0pOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBldmVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgaGFuZGxlTW91c2VPdXQoZXZlbnQpIHsKICAgICAgICAgICAgaWYgKHRoaXMuYWN0aXZlVGh1bWIgIT09IFBvc2l0aW9uLk5PTkUpIHsKICAgICAgICAgICAgICAgIHRoaXMuYWN0aXZlVGh1bWIgPSBQb3NpdGlvbi5OT05FOwogICAgICAgICAgICAgICAgdGhpcy5jaGFuZ2VEZXRlY3Rvci5tYXJrRm9yQ2hlY2soKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50CiAgICAgICAgICogQHBhcmFtIHs/fSBwb3NpdGlvbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgaGFuZGxlSW5wdXRDaGFuZ2UoZXZlbnQsIHBvc2l0aW9uKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaW5wdXQgPSAoLyoqIEB0eXBlIHs/fSAqLyAoKC8qKiBAdHlwZSB7P30gKi8gKGV2ZW50LnRhcmdldCkpKSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbnVtVmFsdWUgPSB0aGlzLmdldENsaXBwZWRWYWx1ZShOdW1iZXIoaW5wdXQudmFsdWUpKTsKICAgICAgICAgICAgaWYgKGlzTmFOKG51bVZhbHVlKSkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IG5leHRWYWx1ZXMgPSBbdGhpcy5sb3dlclZhbHVlLCB0aGlzLnVwcGVyVmFsdWVdOwogICAgICAgICAgICBpZiAocG9zaXRpb24gPT09IFBvc2l0aW9uLkxFRlQpIHsKICAgICAgICAgICAgICAgIG5leHRWYWx1ZXMgPSBbbnVtVmFsdWUsIHRoaXMudXBwZXJWYWx1ZV07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBuZXh0VmFsdWVzID0gW3RoaXMubG93ZXJWYWx1ZSwgbnVtVmFsdWVdOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMubWF5YmVOb3RpZnlOZXh0VmFsdWUobmV4dFZhbHVlcyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gcG9zaXRpb24KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGlzVGh1bWJBY3RpdmUocG9zaXRpb24pIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuYWN0aXZlVGh1bWIgPT09IHBvc2l0aW9uOwogICAgICAgIH0KICAgIH0KICAgIFJhbmdlSW5wdXRDb21wb25lbnQuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IENvbXBvbmVudCwgYXJnczogW3sKICAgICAgICAgICAgICAgICAgICBzZWxlY3RvcjogJ3RiLXJhbmdlLWlucHV0JywKICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZVVybDogJy4vcmFuZ2VfaW5wdXRfY29tcG9uZW50Lm5nLmh0bWwnLAogICAgICAgICAgICAgICAgICAgIHN0eWxlVXJsczogWycuL3JhbmdlX2lucHV0X2NvbXBvbmVudC5jc3MnXSwKICAgICAgICAgICAgICAgICAgICBjaGFuZ2VEZXRlY3Rpb246IENoYW5nZURldGVjdGlvblN0cmF0ZWd5Lk9uUHVzaCwKICAgICAgICAgICAgICAgIH0sXSB9LAogICAgXTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLwogICAgUmFuZ2VJbnB1dENvbXBvbmVudC5jdG9yUGFyYW1ldGVycyA9ICgpID0+IFsKICAgICAgICB7IHR5cGU6IENoYW5nZURldGVjdG9yUmVmIH0KICAgIF07CiAgICBSYW5nZUlucHV0Q29tcG9uZW50LnByb3BEZWNvcmF0b3JzID0gewogICAgICAgIGNvbnRhaW5lcjogW3sgdHlwZTogVmlld0NoaWxkLCBhcmdzOiBbJ2NvbnRhaW5lcicsIHsgc3RhdGljOiB0cnVlLCByZWFkOiBFbGVtZW50UmVmIH0sXSB9XSwKICAgICAgICBtaW46IFt7IHR5cGU6IElucHV0IH1dLAogICAgICAgIG1heDogW3sgdHlwZTogSW5wdXQgfV0sCiAgICAgICAgbG93ZXJWYWx1ZTogW3sgdHlwZTogSW5wdXQgfV0sCiAgICAgICAgdXBwZXJWYWx1ZTogW3sgdHlwZTogSW5wdXQgfV0sCiAgICAgICAgdGlja0NvdW50OiBbeyB0eXBlOiBJbnB1dCB9XSwKICAgICAgICB2YWx1ZTogW3sgdHlwZTogT3V0cHV0IH1dCiAgICB9OwogICAgLyoqIEBub2NvbGxhcHNlICovIFJhbmdlSW5wdXRDb21wb25lbnQuybVmYWMgPSBmdW5jdGlvbiBSYW5nZUlucHV0Q29tcG9uZW50X0ZhY3RvcnkodCkgeyByZXR1cm4gbmV3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udEVtaXR0ZXIoKTsKICAgICAgICAgICAgdGhpcy5vbkhwYXJhbUludGVydmFsRmlsdGVyQ2hhbmdlZCA9IG5ldyBFdmVudEVtaXR0ZXIoKTsKICAgICAgICAgICAgdGhpcy5vbk1ldHJpY0ZpbHRlckNoYW5nZWQgPSBuZXcgRXZlbnRFbWl0dGVyKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkNoYW5nZXMoKSB7CiAgICAgICAgICAgIHRoaXMuZGF0YVNvdXJjZS5kYXRhID0gdGhpcy5wYWdlSXRlbXM7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gc3BlYwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0SHBhcmFtQ29sdW1uSWQoc3BlYykgewogICAgICAgICAgICByZXR1cm4gYGg6JHtzcGVjLm5hbWV9YDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBzcGVjCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXRNZXRyaWNDb2x1bW5JZChzcGVjKSB7CiAgICAgICAgICAgIHJldHVybiBgbToke3NwZWMudGFnfWA7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0Q29sdW1uSWRzKCkgewogICAgICAgICAgICByZXR1cm4gWwogICAgICAgICAgICAgICAgLi4udGhpcy5jb2x1bW5zLAogICAgICAgICAgICAgICAgLi4udGhpcy5ocGFyYW1Db2x1bW5zLm1hcCh0aGlzLmdldEhwYXJhbUNvbHVtbklkKSwKICAgICAgICAgICAgICAgIC4uLnRoaXMubWV0cmljQ29sdW1ucy5tYXAodGhpcy5nZXRNZXRyaWNDb2x1bW5JZCksCiAgICAgICAgICAgIF07CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgdHJ1ZSB3aGVuIGFsbCBpdGVtcyBpbiB0aGUgcGFnZSBhcmUgc2VsZWN0ZWQuIFJldHVybnMgZmFsc2Ugd2hlbgogICAgICAgICAqIHRoZXJlIGFyZSBubyBpdGVtcyBhdCBhbGwuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBhbGxQYWdlSXRlbXNTZWxlY3RlZCgpIHsKICAgICAgICAgICAgcmV0dXJuIChCb29sZWFuKHRoaXMucGFnZUl0ZW1zLmxlbmd0aCkgJiYKICAgICAgICAgICAgICAgIHRoaXMucGFnZUl0ZW1zLmV2ZXJ5KCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gaXRlbQogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKGl0ZW0pID0+IGl0ZW0uc2VsZWN0ZWQpKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc29tZVBhZ2VJdGVtc1NlbGVjdGVkKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5wYWdlSXRlbXMuc29tZSgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gaXRlbQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGl0ZW0pID0+IGl0ZW0uc2VsZWN0ZWQpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBoYW5kbGVQYWdlVG9nZ2xlKCkgewogICAgICAgICAgICB0aGlzLm9uUGFnZVNlbGVjdGlvblRvZ2dsZS5lbWl0KHsgaXRlbXM6IHRoaXMucGFnZUl0ZW1zIH0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHNvcnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGhhbmRsZVNvcnRDaGFuZ2Uoc29ydCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBkaXJlY3Rpb247CiAgICAgICAgICAgIHN3aXRjaCAoc29ydC5kaXJlY3Rpb24pIHsKICAgICAgICAgICAgICAgIGNhc2UgJ2FzYyc6CiAgICAgICAgICAgICAgICAgICAgZGlyZWN0aW9uID0gU29ydERpcmVjdGlvbi5BU0M7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBjYXNlICdkZXNjJzoKICAgICAgICAgICAgICAgICAgICBkaXJlY3Rpb24gPSBTb3J0RGlyZWN0aW9uLkRFU0M7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICAgICAgIGRpcmVjdGlvbiA9IFNvcnREaXJlY3Rpb24uVU5TRVQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5vblNvcnRDaGFuZ2UuZW1pdCh7CiAgICAgICAgICAgICAgICBjb2x1bW46ICgvKiogQHR5cGUgez99ICovIChzb3J0LmFjdGl2ZSkpLAogICAgICAgICAgICAgICAgZGlyZWN0aW9uLAogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBldmVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25GaWx0ZXJLZXlVcChldmVudCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGlucHV0ID0gKC8qKiBAdHlwZSB7P30gKi8gKCgvKiogQHR5cGUgez99ICovIChldmVudC50YXJnZXQpKSkpOwogICAgICAgICAgICB0aGlzLm9uUmVnZXhGaWx0ZXJDaGFuZ2UuZW1pdChpbnB1dC52YWx1ZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gaW5kZXgKICAgICAgICAgKiBAcGFyYW0gez99IGl0ZW0KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHRhYmxlVHJhY2tCeShpbmRleCwgaXRlbSkgewogICAgICAgICAgICByZXR1cm4gaXRlbS5ydW4uaWQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gaHBhcmFtQ29sdW1uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBoYW5kbGVIcGFyYW1JbmNsdWRlVW5kZWZpbmVkVG9nZ2xlZChocGFyYW1Db2x1bW4pIHsKICAgICAgICAgICAgY29uc3QgeyBuYW1lLCBmaWx0ZXIgfSA9IGhwYXJhbUNvbHVtbjsKICAgICAgICAgICAgaWYgKCFmaWx0ZXIpIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBSYW5nZUVycm9yKCdJbnZhcmlhbnQgZXJyb3I6IHJlcXVpcmUgZmlsdGVyIHRvIGV4aXN0IGZvciBpdCB0byBjaGFuZ2UnKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoZmlsdGVyLnR5cGUgPT09IERvbWFpblR5cGUuRElTQ1JFVEUpIHsKICAgICAgICAgICAgICAgIHRoaXMub25IcGFyYW1EaXNjcmV0ZUZpbHRlckNoYW5nZWQuZW1pdCh7CiAgICAgICAgICAgICAgICAgICAgaHBhcmFtTmFtZTogbmFtZSwKICAgICAgICAgICAgICAgICAgICBpbmNsdWRlVW5kZWZpbmVkOiAhZmlsdGVyLmluY2x1ZGVVbmRlZmluZWQsCiAgICAgICAgICAgICAgICAgICAgZmlsdGVyVmFsdWVzOiBmaWx0ZXIuZmlsdGVyVmFsdWVzLAogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLm9uSHBhcmFtSW50ZXJ2YWxGaWx0ZXJDaGFuZ2VkLmVtaXQoewogICAgICAgICAgICAgICAgICAgIG5hbWUsCiAgICAgICAgICAgICAgICAgICAgaW5jbHVkZVVuZGVmaW5lZDogIWZpbHRlci5pbmNsdWRlVW5kZWZpbmVkLAogICAgICAgICAgICAgICAgICAgIGZpbHRlckxvd2VyVmFsdWU6IGZpbHRlci5maWx0ZXJMb3dlclZhbHVlLAogICAgICAgICAgICAgICAgICAgIGZpbHRlclVwcGVyVmFsdWU6IGZpbHRlci5maWx0ZXJVcHBlclZhbHVlLAogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBocGFyYW1Db2x1bW4KICAgICAgICAgKiBAcGFyYW0gez99IG5ld1ZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBoYW5kbGVIcGFyYW1JbnRlcnZhbENoYW5nZWQoaHBhcmFtQ29sdW1uLCBuZXdWYWx1ZSkgewogICAgICAgICAgICBjb25zdCB7IG5hbWUsIGZpbHRlciB9ID0gaHBhcmFtQ29sdW1uOwogICAgICAgICAgICBpZiAoIWZpbHRlcikgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IFJhbmdlRXJyb3IoJ0ludmFyaWFudCBlcnJvcjogcmVxdWlyZSBmaWx0ZXIgdG8gZXhpc3QgZm9yIGl0IHRvIGNoYW5nZScpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMub25IcGFyYW1JbnRlcnZhbEZpbHRlckNoYW5nZWQuZW1pdCh7CiAgICAgICAgICAgICAgICBuYW1lLAogICAgICAgICAgICAgICAgaW5jbHVkZVVuZGVmaW5lZDogZmlsdGVyLmluY2x1ZGVVbmRlZmluZWQsCiAgICAgICAgICAgICAgICBmaWx0ZXJMb3dlclZhbHVlOiBuZXdWYWx1ZS5sb3dlclZhbHVlLAogICAgICAgICAgICAgICAgZmlsdGVyVXBwZXJWYWx1ZTogbmV3VmFsdWUudXBwZXJWYWx1ZSwKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gaHBhcmFtQ29sdW1uCiAgICAgICAgICogQHBhcmFtIHs/fSB0b2dnbGVkVmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGhhbmRsZUhwYXJhbURpc2NyZXRlQ2hhbmdlZChocGFyYW1Db2x1bW4sIHRvZ2dsZWRWYWx1ZSkgewogICAgICAgICAgICBjb25zdCB7IG5hbWUsIGZpbHRlciB9ID0gaHBhcmFtQ29sdW1uOwogICAgICAgICAgICBpZiAoIWZpbHRlcikgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IFJhbmdlRXJyb3IoJ0ludmFyaWFudCBlcnJvcjogcmVxdWlyZSBmaWx0ZXIgdG8gZXhpc3QgZm9yIGl0IHRvIGNoYW5nZScpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChmaWx0ZXIudHlwZSAhPT0gRG9tYWluVHlwZS5ESVNDUkVURSkgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IFJhbmdlRXJyb3IoYEludmFyaWFudCBlcnJvcjogZXhwZWN0ZWQgZGlzY3JldGUgZG9tYWluIGZvciAke25hbWV9YCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBuZXdWYWx1ZXMgPSBuZXcgU2V0KFsuLi5maWx0ZXIuZmlsdGVyVmFsdWVzXSk7CiAgICAgICAgICAgIGlmIChuZXdWYWx1ZXMuaGFzKHRvZ2dsZWRWYWx1ZSkpIHsKICAgICAgICAgICAgICAgIG5ld1ZhbHVlcy5kZWxldGUodG9nZ2xlZFZhbHVlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIG5ld1ZhbHVlcy5hZGQodG9nZ2xlZFZhbHVlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLm9uSHBhcmFtRGlzY3JldGVGaWx0ZXJDaGFuZ2VkLmVtaXQoewogICAgICAgICAgICAgICAgaHBhcmFtTmFtZTogbmFtZSwKICAgICAgICAgICAgICAgIGluY2x1ZGVVbmRlZmluZWQ6IGZpbHRlci5pbmNsdWRlVW5kZWZpbmVkLAogICAgICAgICAgICAgICAgZmlsdGVyVmFsdWVzOiAoLyoqIEB0eXBlIHs/fSAqLyAoWy4uLm5ld1ZhbHVlc10pKSwKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gbWV0cmljQ29sdW1uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBoYW5kbGVNZXRyaWNJbmNsdWRlVW5kZWZpbmVkQ2hhbmdlZChtZXRyaWNDb2x1bW4pIHsKICAgICAgICAgICAgaWYgKCFtZXRyaWNDb2x1bW4uZmlsdGVyKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgUmFuZ2VFcnJvcignSW52YXJpYW50IGVycm9yOiByZXF1aXJlIGZpbHRlciB0byBleGlzdCBmb3IgaXQgdG8gY2hhbmdlJyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5vbk1ldHJpY0ZpbHRlckNoYW5nZWQuZW1pdCh7CiAgICAgICAgICAgICAgICBuYW1lOiBtZXRyaWNDb2x1bW4udGFnLAogICAgICAgICAgICAgICAgaW5jbHVkZVVuZGVmaW5lZDogIW1ldHJpY0NvbHVtbi5maWx0ZXIuaW5jbHVkZVVuZGVmaW5lZCwKICAgICAgICAgICAgICAgIGZpbHRlckxvd2VyVmFsdWU6IG1ldHJpY0NvbHVtbi5maWx0ZXIuZmlsdGVyTG93ZXJWYWx1ZSwKICAgICAgICAgICAgICAgIGZpbHRlclVwcGVyVmFsdWU6IG1ldHJpY0NvbHVtbi5maWx0ZXIuZmlsdGVyVXBwZXJWYWx1ZSwKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gbWV0cmljQ29sdW1uCiAgICAgICAgICogQHBhcmFtIHs/fSBuZXdWYWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgaGFuZGxlTWV0cmljRmlsdGVyQ2hhbmdlZChtZXRyaWNDb2x1bW4sIG5ld1ZhbHVlKSB7CiAgICAgICAgICAgIGlmICghbWV0cmljQ29sdW1uLmZpbHRlcikgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IFJhbmdlRXJyb3IoJ0ludmFyaWFudCBlcnJvcjogcmVxdWlyZSBmaWx0ZXIgdG8gZXhpc3QgZm9yIGl0IHRvIGNoYW5nZScpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMub25NZXRyaWNGaWx0ZXJDaGFuZ2VkLmVtaXQoewogICAgICAgICAgICAgICAgbmFtZTogbWV0cmljQ29sdW1uLnRhZywKICAgICAgICAgICAgICAgIGluY2x1ZGVVbmRlZmluZWQ6IG1ldHJpY0NvbHVtbi5maWx0ZXIuaW5jbHVkZVVuZGVmaW5lZCwKICAgICAgICAgICAgICAgIGZpbHRlckxvd2VyVmFsdWU6IG5ld1ZhbHVlLmxvd2VyVmFsdWUsCiAgICAgICAgICAgICAgICBmaWx0ZXJVcHBlclZhbHVlOiBuZXdWYWx1ZS51cHBlclZhbHVlLAogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBocGFyYW1Db2x1bW4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHRyYWNrQnlIcGFyYW1Db2x1bW4oaHBhcmFtQ29sdW1uKSB7CiAgICAgICAgICAgIHJldHVybiBocGFyYW1Db2x1bW4ubmFtZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBtZXRyaWNDb2x1bW4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHRyYWNrQnlNZXRyaWNDb2x1bW4obWV0cmljQ29sdW1uKSB7CiAgICAgICAgICAgIHJldHVybiBtZXRyaWNDb2x1bW4udGFnOwogICAgICAgIH0KICAgIH0KICAgIFJ1bnNUYWJsZUNvbXBvbmVudC5kZWNvcmF0b3JzID0gWwogICAgICAgIHsgdHlwZTogQ29tcG9uZW50LCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIHNlbGVjdG9yOiAncnVucy10YWJsZS1jb21wb25lbnQnLAogICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlVXJsOiAncnVuc190YWJsZV9jb21wb25lbnQubmcuaHRtbCcsCiAgICAgICAgICAgICAgICAgICAgaG9zdDogewogICAgICAgICAgICAgICAgICAgICAgICAnW2NsYXNzLmZsZXgtbGF5b3V0XSc6ICd1c2VGbGV4aWJsZUxheW91dCcsCiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICBzdHlsZVVybHM6IFsncnVuc190YWJsZV9jb21wb25lbnQuY3NzJ10sCiAgICAgICAgICAgICAgICAgICAgY2hhbmdlRGV0ZWN0aW9uOiBDaGFuZ2VEZXRlY3Rpb25TdHJhdGVneS5PblB1c2gsCiAgICAgICAgICAgICAgICAgICAgLy8gVXNlIEVsZW1lbnQgUHJvdmlkZXIgc2luY2UgdGhpcyB0ZXh0IGlzIHVuaXF1ZSB0byB0aGlzIGVsZW1lbnQgaGllcmFyY2h5LgogICAgICAgICAgICAgICAgICAgIHByb3ZpZGVyczogW3sgcHJvdmlkZTogTWF0UGFnaW5hdG9ySW50bCwgdXNlQ2xhc3M6IFJ1bnNQYWdpbmF0b3JJbnRsIH1dLAogICAgICAgICAgICAgICAgfSxdIH0sCiAgICBdOwogICAgUnVuc1RhYmxl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J5IHRzYwogICAgICovCiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBnZXRSdW5zTG9hZGluZyA9IGNyZWF0ZVNlbGVjdG9yKGdldFJ1bnNMb2FkU3RhdGUsICgvKioKICAgICAqIEBwYXJhbSB7P30gbG9hZFN0YXRlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICAobG9hZFN0YXRlKSA9PiBsb2FkU3RhdGUuc3RhdGUgPT09IERhdGFMb2FkU3RhdGUuTE9BRElORykpOwogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IGl0ZW0KICAgICAqIEBwYXJhbSB7P30gc29ydENvbHVtbgogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0UHJvcHNGb3JTb3J0KGl0ZW0sIHNvcnRDb2x1bW4pIHsKICAgICAgICBzd2l0Y2ggKHNvcnRDb2x1bW4pIHsKICAgICAgICAgICAgY2FzZSBSdW5zVGFibGVDb2x1bW4uRVhQRVJJTUVOVF9OQU1FOgogICAgICAgICAgICAgICAgcmV0dXJuIFtpdGVtLmV4cGVyaW1lbnRBbGlhcywgaXRlbS5ydW4ubmFtZSwgaXRlbS5ydW4uaWRdOwogICAgICAgICAgICBjYXNlIFJ1bnNUYWJsZUNvbHVtbi5SVU5fTkFNRToKICAgICAgICAgICAgICAgIHJldHVybiBbaXRlbS5ydW4ubmFtZSwgaXRlbS5leHBlcmltZW50QWxpYXMsIGl0ZW0ucnVuLmlkXTsKICAgICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgTm90IHlldCBpbXBsZW1lbnRlZDogJHtzb3J0Q29sdW1ufWApOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBpdGVtcwogICAgICogQHBhcmFtIHs/fSBzb3J0CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBzb3J0UnVuVGFibGVJdGVtcyhpdGVtcywgc29ydCkgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBzb3J0ZWRJdGVtcyA9IFsuLi5pdGVtc107CiAgICAgICAgaWYgKCFzb3J0LmNvbHVtbiB8fCBzb3J0LmRpcmVjdGlvbiA9PT0gU29ydERpcmVjdGlvbi5VTlNFVCkgewogICAgICAgICAgICByZXR1cm4gc29ydGVkSXRlbXM7CiAgICAgICAgfQogICAgICAgIHNvcnRlZEl0ZW1zLnNvcnQoKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gYQogICAgICAgICAqIEBwYXJhbSB7P30gYgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgKGEsIGIpID0+IHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBhUHJvcHMgPSBnZXRQcm9wc0ZvclNvcnQoYSwgKC8qKiBAdHlwZSB7P30gKi8gKHNvcnQuY29sdW1uKSkpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGJQcm9wcyA9IGdldFByb3BzRm9yU29ydChiLCAoLyoqIEB0eXBlIHs/fSAqLyAoc29ydC5jb2x1bW4pKSk7CiAgICAgICAgICAgIGlmIChhUHJvcHMubGVuZ3RoICE9PSBiUHJvcHMubGVuZ3RoKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0ludmFyaWFudCBlcnJvcjogYSBnaXZlbiBzb3J0IHNob3VsZCByZXN1bHQgaW4gc2FtZSBudW1iZXIgb2YgJyArCiAgICAgICAgICAgICAgICAgICAgYGl0ZW1zOiAke3NvcnR9YCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZm9yIChsZXQgaW5kZXggPSAwOyBpbmRleCA8IGFQcm9wcy5sZW5ndGg7IGluZGV4KyspIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHZhbEEgPSBhUHJvcHNbaW5kZXhdOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgdmFsQiA9IGJQcm9wc1tpbmRleF07CiAgICAgICAgICAgICAgICBpZiAodmFsQSA9PT0gdmFsQikgewogICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKHR5cGVvZiB2YWxBICE9PSB0eXBlb2YgdmFsQikgewogICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgQ2Fubm90IGNvbXBhcmUgdmFsdWVzIG9mIGRpZmZlcmVudCB0eXBlczogYCArCiAgICAgICAgICAgICAgICAgICAgICAgIGAke3R5cGVvZiB2YWxBfSB2cy4gJHt0eXBlb2YgdmFsQn1gKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiB2YWxBIDwgdmFsQiA9PT0gKHNvcnQuZGlyZWN0aW9uID09PSBTb3J0RGlyZWN0aW9uLkFTQykgPyAtMSA6IDE7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIDA7CiAgICAgICAgfSkpOwogICAgICAgIHJldHVybiBzb3J0ZWRJdGVtczsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBmaWx0ZXIKICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIG1hdGNoRmlsdGVyKGZpbHRlciwgdmFsdWUpIHsKICAgICAgICBpZiAodmFsdWUgPT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICByZXR1cm4gZmlsdGVyLmluY2x1ZGVVbmRlZmluZWQ7CiAgICAgICAgfQogICAgICAgIGlmIChmaWx0ZXIudHlwZSA9PT0gRG9tYWluVHlwZS5ESVNDUkVURSkgewogICAgICAgICAgICAvLyAodXBjYXN0IHRvIHdvcms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N0b3JlLnNlbGVjdChnZXRSdW5TZWxlY3RvclNvcnQpOwogICAgICAgICAgICB0aGlzLnBhZ2luYXRpb25PcHRpb24kID0gdGhpcy5zdG9yZS5zZWxlY3QoZ2V0UnVuU2VsZWN0b3JQYWdpbmF0aW9uT3B0aW9uKTsKICAgICAgICAgICAgdGhpcy5yZWdleEZpbHRlciQgPSB0aGlzLnN0b3JlLnNlbGVjdChnZXRSdW5TZWxlY3RvclJlZ2V4RmlsdGVyKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBpc0V4cGVyaW1lbnROYW1lVmlzaWJsZSgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuY29sdW1ucy5zb21lKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjb2x1bW4KICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChjb2x1bW4pID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiBjb2x1bW4gPT09IFJ1bnNUYWJsZUNvbHVtbi5FWFBFUklNRU5UX05BTUU7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uSW5pdCgpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBnZXRSdW5UYWJsZUl0ZW1zUGVyRXhwZXJpbWVudCA9IHRoaXMuZXhwZXJpbWVudElkcy5tYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGlkCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoaWQpID0+IHRoaXMuZ2V0UnVuVGFibGVJdGVtc0ZvckV4cGVyaW1lbnQoaWQpKSk7CiAgICAgICAgICAgIHRoaXMuYWxsVW5zb3J0ZWRSdW5UYWJsZUl0ZW1zJCA9IGNvbWJpbmVMYXRlc3QoZ2V0UnVuVGFibGVJdGVtc1BlckV4cGVyaW1lbnQpLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBpdGVtc0ZvckV4cGVyaW1lbnRzCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoaXRlbXNGb3JFeHBlcmltZW50cykgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgaXRlbXMgPSAoLyoqIEB0eXBlIHs/fSAqLyAoW10pKTsKICAgICAgICAgICAgICAgIHJldHVybiBpdGVtcy5jb25jYXQoLi4uaXRlbXNGb3JFeHBlcmltZW50cyk7CiAgICAgICAgICAgIH0pKSwgc2hhcmVSZXBsYXkoMSkpOwogICAgICAgICAgICB0aGlzLmFsbEl0ZW1zTGVuZ3RoJCA9IHRoaXMuYWxsVW5zb3J0ZWRSdW5UYWJsZUl0ZW1zJC5waXBlKG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gaXRlbXMKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChpdGVtcykgPT4gaXRlbXMubGVuZ3RoKSkpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGdldEZpbHRlcmVkSXRlbXMkID0gdGhpcy5nZXRGaWx0ZXJlZEl0ZW1zJCh0aGlzLmFsbFVuc29ydGVkUnVuVGFibGVJdGVtcyQpLnBpcGUoc2hhcmVSZXBsYXkoMSkpOwogICAgICAgICAgICB0aGlzLmZpbHRlcmVkSXRlbXNMZW5ndGgkID0gZ2V0RmlsdGVyZWRJdGVtcyQucGlwZShtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGl0ZW1zCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoaXRlbXMpID0+IGl0ZW1zLmxlbmd0aCkpKTsKICAgICAgICAgICAgdGhpcy5wYWdlSXRlbXMkID0gdGhpcy5zb3J0ZWRBbmRTbGljZWRJdGVtcyQoZ2V0RmlsdGVyZWRJdGVtcyQpOwogICAgICAgICAgICB0aGlzLm51bVNlbGVjdGVkSXRlbXMkID0gdGhpcy5hbGxVbnNvcnRlZFJ1blRhYmxlSXRlbXMkLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBpdGVtcwogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGl0ZW1zKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gaXRlbXMucmVkdWNlKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY291bnQKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gaXRlbQogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKGNvdW50LCBpdGVtKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNvdW50ICsgTnVtYmVyKGl0ZW0uc2VsZWN0ZWQpOwogICAgICAgICAgICAgICAgfSksIDApOwogICAgICAgICAgICB9KSkpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGdldFJ1bnNMb2FkaW5nUGVyRXhwZXJpbWVudCA9IHRoaXMuZXhwZXJpbWVudElkcy5tYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGlkCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoaWQpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLnN0b3JlLnNlbGVjdChnZXRSdW5zTG9hZGluZywgeyBleHBlcmltZW50SWQ6IGlkIH0pOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIHRoaXMubG9hZGluZyQgPSBjb21iaW5lTGF0ZXN0KGdldFJ1bnNMb2FkaW5nUGVyRXhwZXJpbWVudCkucGlwZShtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGV4cGVyaW1lbnRzTG9hZGluZwogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGV4cGVyaW1lbnRzTG9hZGluZykgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIGV4cGVyaW1lbnRzTG9hZGluZy5zb21lKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gaXNMb2FkaW5nCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoaXNMb2FkaW5nKSA9PiBpc0xvYWRpbmcpKTsKICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgaWYgKHRoaXMuc2hvd0hwYXJhbXNBbmRNZXRyaWNzKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBnZXRIcGFyYW1BbmRNZXRyaWNzJCA9IHRoaXMuc3RvcmUuc2VsZWN0KGdldEV4cGVyaW1lbnRzSHBhcmFtc0FuZE1ldHJpY3MsIHsgZXhwZXJpbWVudElkczogdGhpcy5leHBlcmltZW50SWRzIH0pOwogICAgICAgICAgICAgICAgLy8gY29tYmluZUxhdGVzdCwgd2hlbiBpbml0aWFsaXppbmcsIGVtaXRzIHR3aWNlCiAgICAgICAgICAgICAgICB0aGlzLmhwYXJhbUNvbHVtbnMkID0gY29tYmluZUxhdGVzdChbCiAgICAgICAgICAgICAgICAgICAgdGhpcy5zdG9yZS5zZWxlY3QoZ2V0UnVuSHBhcmFtRmlsdGVyTWFwKSwKICAgICAgICAgICAgICAgICAgICBnZXRIcGFyYW1BbmRNZXRyaWNzJCwKICAgICAgICAgICAgICAgIF0pLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoW2ZpbHRlck1hcCwgeyBocGFyYW1zIH1dKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGhwYXJhbXMubWFwKCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKHsgbmFtZSwgZGlzcGxheU5hbWUsIGRvbWFpbiB9KSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZmlsdGVyID0gZmlsdGVyTWFwLmdldChuYW1lKTsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFmaWx0ZXIpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBSYW5nZUVycm9yKGBJbnZhcmlhbnQgZXJyb3I6IGEgZmlsdGVyIGZvciAke25hbWV9IG11c3QgZXhpc3RgICsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBgIHdoZW4gdGhlIGhwYXJhbSBleGlzdHNgKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4geyBkaXNwbGF5TmFtZSwgbmFtZSwgZmlsdGVyIH07CiAgICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgICAgIHRoaXMubWV0cmljQ29sdW1ucyQgPSBjb21iaW5lTGF0ZXN0KFsKICAgICAgICAgICAgICAgICAgICB0aGlzLnN0b3JlLnNlbGVjdChnZXRSdW5NZXRyaWNGaWx0ZXJNYXApLAogICAgICAgICAgICAgICAgICAgIGdldEhwYXJhbUFuZE1ldHJpY3MkLAogICAgICAgICAgICAgICAgXSkucGlwZShtYXAoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChbZmlsdGVyTWFwLCB7IG1ldHJpY3MgfV0pID0+IHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gbWV0cmljcy5tYXAoKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAoeyB0YWcsIGRpc3BsYXlOYW1lIH0pID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBmaWx0ZXIgPSBmaWx0ZXJNYXAuZ2V0KHRhZyk7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghZmlsdGVyKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgUmFuZ2VFcnJvcihgSW52YXJpYW50IGVycm9yOiBhIGZpbHRlciBmb3IgJHt0YWd9IG11c3QgZXhpc3QgYCArCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYHdoZW4gdGhlIG1ldHJpYyBleGlzdHNgKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4geyBkaXNwbGF5TmFtZSwgdGFnLCBmaWx0ZXIgfTsKICAgICAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICB9KSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuc3RvcmUuZGlzcGF0Y2gocnVuVGFibGVTaG93bih7IGV4cGVyaW1lbnRJZHM6IHRoaXMuZXhwZXJpbWVudElkcyB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBydW5JdGVtcyQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldEZpbHRlcmVkSXRlbXMkKHJ1bkl0ZW1zJCkgewogICAgICAgICAgICByZXR1cm4gY29tYmluZUxhdGVzdChbCiAgICAgICAgICAgICAgICBydW5JdGVtcyQsCiAgICAgICAgICAgICAgICB0aGlzLnN0b3JlLnNlbGVjdChnZXRSdW5TZWxlY3RvclJlZ2V4RmlsdGVyKSwKICAgICAgICAgICAgXSkucGlwZShtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKFtpdGVtcywgcmVnZXhTdHJpbmddKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAoIXJlZ2V4U3RyaW5nKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGl0ZW1zOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IHJlZ2V4ID0gbnVsbDsKICAgICAgICAgICAgICAgIC8vIERvIG5vdCBicmVhayBhbGwgdGhlIGZ1dHVyZSB1cGRhdGVzIGJlY2F1c2Ugb2YgbWFsZm9ybWVkCiAgICAgICAgICAgICAgICAvLyByZWdleFN0cmluZy4gVXNlciBjYW4gYmUgc3RpbGwgbW9kaWZ5aW5nIGl0LgogICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICByZWdleCA9IHJlZ2V4U3RyaW5nID8gbmV3IFJlZ0V4cChyZWdleFN0cmluZykgOiBudWxsOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgY2F0Y2ggKGUpIHsgfQogICAgICAgICAgICAgICAgaWYgKCFyZWdleCkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBbXTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHNob3VsZEluY2x1ZGVFeHBlcmltZW50TmFtZSA9IHRoaXMuY29sdW1ucy5pbmNsdWRlcyhSdW5zVGFibGVDb2x1bW4uRVhQRVJJTUVOVF9OQU1FKTsKICAgICAgICAgICAgICAgIHJldHVybiBpdGVtcy5maWx0ZXIoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBpdGVtCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoaXRlbSkgPT4gewogICAgICAgICAgICAgICAgICAgIGlmICghc2hvdWxkSW5jbHVkZUV4cGVyaW1lbnROYW1lKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAocmVnZXgpKS50ZXN0KGl0ZW0ucnVuLm5hbWUpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gKCgvKiogQHR5cGUgez99ICovIChyZWdleCkpLnRlc3QoaXRlbS5ydW4ubmFtZSkgfHwgKC8qKiBAdHlwZSB7P30gKi8gKHJlZ2V4KSkudGVzdChpdGVtLmV4cGVyaW1lbnRBbGlhcykpOwogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB9KSksIGNvbWJpbmVMYXRlc3RXaXRoKHRoaXMuc3RvcmUuc2VsZWN0KGdldFJ1bkhwYXJhbUZpbHRlck1hcCksIHRoaXMuc3RvcmUuc2VsZWN0KGdldFJ1bk1ldHJpY0ZpbHRlck1hcCkpLCBtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKFtpdGVtcywgaHBhcmFtRmlsdGVycywgbWV0cmljRmlsdGVyc10pID0+IHsKICAgICAgICAgICAgICAgIGlmICghdGhpcy5zaG93SHBhcmFtc0FuZE1ldHJpY3MpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gaXRlbXM7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gaXRlbXMuZmlsdGVyKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoeyBocGFyYW1zLCBtZXRyaWNzIH0pID0+IHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgaHBhcmFtTWF0Y2hlcyA9IFsuLi5ocGFyYW1GaWx0ZXJzLmVudHJpZXMoKV0uZXZlcnkoKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAoW2hwYXJhbU5hbWUsIGZpbHRlcl0pID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB2YWx1ZSA9IGhwYXJhbXMuZ2V0KGhwYXJhbU5hbWUpOwogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbWF0Y2hGaWx0ZXIoZmlsdGVyLCB2YWx1ZSk7CiAgICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgICAgIHJldHVybiAoaHBhcmFtTWF0Y2hlcyAmJgogICAgICAgICAgICAgICAgICAgICAgICBbLi4ubWV0cmljRmlsdGVycy5lbnRyaWVzKCldLmV2ZXJ5KCgvKioKICAgICAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgICAgIChbbWV0cmljVGFnLCBmaWx0ZXJdKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB2YWx1ZSA9IG1ldHJpY3MuZ2V0KG1ldHJpY1RhZyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbWF0Y2hGaWx0ZXIoZmlsdGVyLCB2YWx1ZSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0pKSk7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0pKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBmaWx0ZXJlZEl0ZW1zJAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc29ydGVkQW5kU2xpY2VkSXRlbXMkKGZpbHRlcmVkSXRlbXMkKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc29ydGVkSXRlbXMgPSBjb21iaW5lTGF0ZXN0KFsKICAgICAgICAgICAgICAgIGZpbHRlcmVkSXRlbXMkLAogICAgICAgICAgICAgICAgdGhpcy5zdG9yZS5zZWxlY3QoZ2V0UnVuU2VsZWN0b3JTb3J0KSwKICAgICAgICAgICAgXSkucGlwZShtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKFtpdGVtcywgc29ydF0pID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGNvbHVtbiA9ICgvKiogQHR5cGUgez99ICovIChzb3J0LmNvbHVtbikpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZGlyZWN0aW9uID0gc29ydC5kaXJlY3Rpb247CiAgICAgICAgICAgICAgICByZXR1cm4gc29ydFJ1blRhYmxlSXRlbXMoaXRlbXMsIHsgY29sdW1uLCBkaXJlY3Rpb24gfSk7CiAgICAgICAgICAgIH0pKSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc2xpY2VkSXRlbXMgPSBjb21iaW5lTGF0ZXN0KFsKICAgICAgICAgICAgICAgIHNvcnRlZEl0ZW1zLAogICAgICAgICAgICAgICAgdGhpcy5zdG9yZS5zZWxlY3QoZ2V0UnVuU2VsZWN0b3JQYWdpbmF0aW9uT3B0aW9uKSwKICAgICAgICAgICAgXSkucGlwZShtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKFtpdGVtcywgcGFnaW5hdGlvbk9wdGlvbl0pID0+IHsKICAgICAgICAgICAgICAgIGlmICghdGhpcy51c2VQYWdpbmF0aW9uKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGl0ZW1zLnNsaWNlKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjb25zdCB7IHBhZ2VTaXplLCBwYWdlSW5kZXggfSA9IHBhZ2luYXRpb25PcHRpb247CiAgICAgICAgICAgICAgICByZXR1cm4gaXRlbXMuc2xpY2UocGFnZUluZGV4ICogcGFnZVNpemUsIChwYWdlSW5kZXggKyAxKSAqIHBhZ2VTaXplKTsKICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgcmV0dXJuIHNsaWNlZEl0ZW1zOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gZXhwZXJpbWVudElkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXRSdW5UYWJsZUl0ZW1zRm9yRXhwZXJpbWVudChleHBlcmltZW50SWQpIHsKICAgICAgICAgICAgcmV0dXJuIGNvbWJpbmVMYXRlc3QoWwogICAgICAgICAgICAgICAgdGhpcy5zdG9yZS5zZWxlY3QoZ2V0UnVucywgeyBleHBlcmltZW50SWQgfSksCiAgICAgICAgICAgICAgICB0aGlzLnN0b3JlLnNlbGVjdChnZXRFeHBlcmltZW50LCB7IGV4cGVyaW1lbnRJZCB9KSwKICAgICAgICAgICAgICAgIHRoaXMuc3RvcmUuc2VsZWN0KGdldEN1cnJlbnRSb3V0ZVJ1blNlbGVjdGlvbiksCiAgICAgICAgICAgICAgICB0aGlzLnN0b3JlLnNlbGVjdChnZXRSdW5Db2xvck1hcCksCiAgICAgICAgICAgICAgICB0aGlzLnN0b3JlLnNlbGVjdChnZXRFeHBlcmltZW50SWRUb0FsaWFzTWFwKSwKICAgICAgICAgICAgXSkucGlwZShtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKFtydW5zLCBleHBlcmltZW50LCBzZWxlY3Rpb25NYXAsIGNvbG9yTWFwLCBleHBlcmltZW50SWRUb0FsaWFzXSkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIHJ1bnMubWFwKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcnVuCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAocnVuKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGhwYXJhbU1hcCA9IG5ldyBNYXAoKTsKICAgICAgICAgICAgICAgICAgICAocnVuLmhwYXJhbXMgfHwgW10pLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gaHBhcmFtCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAoaHBhcmFtKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIGhwYXJhbU1hcC5zZXQoaHBhcmFtLm5hbWUsIGhwYXJhbS52YWx1ZSk7CiAgICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBtZXRyaWNNYXAgPSBuZXcgTWFwKCk7CiAgICAgICAgICAgICAgICAgICAgKHJ1bi5tZXRyaWNzIHx8IFtdKS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IG1ldHJpYwogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKG1ldHJpYykgPT4gewogICAgICAgICAgICAgICAgICAgICAgICBtZXRyaWNNYXAuc2V0KG1ldHJpYy50YWcsIG1ldHJpYy52YWx1ZSk7CiAgICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJ1biwKICAgICAgICAgICAgICAgICAgICAgICAgZXhwZXJpbWVudE5hbWU6IChleHBlcmltZW50ID09PSBudWxsIHx8IGV4cGVyaW1lbnQgPT09IHZvaWQgMCA/IHZvaWQgMCA6IGV4cGVyaW1lbnQubmFtZSkgfHwgJycsCiAgICAgICAgICAgICAgICAgICAgICAgIGV4cGVyaW1lbnRBbGlhczogZXhwZXJpbWVudElkVG9BbGlhc1tleHBlcmltZW50SWRdLAogICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZDogQm9vbGVhbihzZWxlY3Rpb25NYXAgJiYgc2VsZWN0aW9uTWFwLmdldChydW4uaWQpKSwKICAgICAgICAgICAgICAgICAgICAgICAgcnVuQ29sb3I6IGNvbG9yTWFwW3J1bi5pZF0sCiAgICAgICAgICAgICAgICAgICAgICAgIGhwYXJhbXM6IGhwYXJhbU1hcCwKICAgICAgICAgICAgICAgICAgICAgICAgbWV0cmljczogbWV0cmljTWFwLAogICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0pKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gaXRlbQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25SdW5TZWxlY3Rpb25Ub2dnbGUoaXRlbSkgewogICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKHJ1blNlbGVjdGlvblRvZ2dsZWQoewogICAgICAgICAgICAgICAgZXhwZXJpbWVudElkczogdGhpcy5leHBlcmltZW50SWRzLAogICAgICAgICAgICAgICAgcnVuSWQ6IGl0ZW0ucnVuLmlkLAogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8vIFdoZW4gYHVzZVBhZ2luYXRpb25gIGlzIGZhbHNlLCBwYWdlIHNlbGVjdGlvbiBhZmZlY3RzIHRoZSBzaW5nbGUgcGFnZSwKICAgICAgICAvLyBjb250YWluaW5nIGFsbCBpdGVtcy4KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvblBhZ2VTZWxlY3Rpb25Ub2dnbGUoZXZlbnQpIHsKICAgICAgICAgICAgY29uc3QgeyBpdGVtcyB9ID0gZXZlbnQ7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcnVuSWRzID0gaXRlbXMubWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICh7IHJ1biB9KSA9PiBydW4uaWQpKTsKICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChydW5QYWdlU2VsZWN0aW9uVG9nZ2xlZCh7CiAgICAgICAgICAgICAgICBleHBlcmltZW50SWRzOiB0aGlzLmV4cGVyaW1lbnRJZHMsCiAgICAgICAgICAgICAgICBydW5JZHMsCiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvblNlbGVjdEFsbFBhZ2VzKCkgewogICAgICAgICAgICBpZiAoIXRoaXMudXNlUGFnaW5hdGlvbikgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdTZWxlY3QgYWxsIGV2ZW50cyBjYW5ub3QgYmUgZGlzcGF0Y2hlZCB3aGVuIHBhZ2luYXRpb24gaXMgZGlzYWJsZWQnKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKHJ1bnNTZWxlY3RBbGwoeyBleHBlcmltZW50SWRzOiB0aGlzLmV4cGVyaW1lbnRJZHMgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvblBhZ2luYXRpb25DaGFuZ2UoZXZlbnQpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLnVzZVBhZ2luYXRpb24pIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignUGFnaW5hdGlvbiBldmVudHMgY2Fubm90IGJlIGRpc3BhdGNoZWQgd2hlbiBwYWdpbmF0aW9uIGlzIGRpc2FibGVkJyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY29uc3QgeyBwYWdlSW5kZXgsIHBhZ2VTaXplIH0gPSBldmVudDsKICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChydW5TZWxlY3RvclBhZ2luYXRpb25PcHRpb25DaGFuZ2VkKHsgcGFnZUluZGV4LCBwYWdlU2l6ZSB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gc29ydAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25Tb3J0Q2hhbmdlKHNvcnQpIHsKICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChydW5TZWxlY3RvclNvcnRDaGFuZ2VkKHNvcnQpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSByZWdleFN0cmluZwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25SZWdleEZpbHRlckNoYW5nZShyZWdleFN0cmluZykgewogICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKHJ1blNlbGVjdG9yUmVnZXhGaWx0ZXJDaGFuZ2VkKHsgcmVnZXhTdHJpbmcgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25SdW5Db2xvckNoYW5nZSh7IHJ1bklkLCBuZXdDb2xvciB9KSB7CiAgICAgICAgICAgIHRoaXMuc3RvcmUuZGlzcGF0Y2gocnVuQ29sb3JDaGFuZ2VkKHsgcnVuSWQsIG5ld0NvbG9yIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBldmVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25IcGFyYW1EaXNjcmV0ZUZpbHRlckNoYW5nZWQoZXZlbnQpIHsKICAgICAgICAgICAgY29uc3QgeyBocGFyYW1OYW1lLCBmaWx0ZXJWYWx1ZXMsIGluY2x1ZGVVbmRlZmluZWQgfSA9IGV2ZW50OwogICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKHJ1bkRpc2NyZXRlSHBhcmFtRmlsdGVyQ2hhbmdlZCh7CiAgICAgICAgICAgICAgICBocGFyYW1OYW1lLAogICAgICAgICAgICAgICAgZmlsdGVyVmFsdWVzLAogICAgICAgICAgICAgICAgaW5jbHVkZVVuZGVmaW5lZCwKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvbkhwYXJhbUludGVydmFsRmlsdGVyQ2hhbmdlZChldmVudCkgewogICAgICAgICAgICBjb25zdCB7IG5hbWUsIGZpbHRlckxvd2VyVmFsdWUsIGZpbHRlclVwcGVyVmFsdWUsIGluY2x1ZGVVbmRlZmluZWQgfSA9IGV2ZW50OwogICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKHJ1bkludGVydmFsSHBhcmFtRmlsdGVyQ2hhbmdlZCh7CiAgICAgICAgICAgICAgICBocGFyYW1OYW1lOiBuYW1lLAogICAgICAgICAgICAgICAgZmlsdGVyTG93ZXJWYWx1ZSwKICAgICAgICAgICAgICAgIGZpbHRlclVwcGVyVmFsdWUsCiAgICAgICAgICAgICAgICBpbmNsdWRlVW5kZWZpbmVkLAogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uTWV0cmljRmlsdGVyQ2hhbmdlZChldmVudCkgewogICAgICAgICAgICBjb25zdCB7IG5hbWUsIGluY2x1ZGVVbmRlZmluZWQsIGZpbHRlckxvd2VyVmFsdWUsIGZpbHRlclVwcGVyVmFsdWUgfSA9IGV2ZW50OwogICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKHJ1bk1ldHJpY0ZpbHRlckNoYW5nZWQoewogICAgICAgICAgICAgICAgbWV0cmljVGFnOiBuYW1lLAogICAgICAgICAgICAgICAgaW5jbHVkZVVuZGVmaW5lZCwKICAgICAgICAgICAgICAgIGZpbHRlckxvd2VyVmFsdWUsCiAgICAgICAgICAgICAgICBmaWx0ZXJVcHBlclZhbHVlLAogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgfQogICAgUnVuc1RhYmxlQ29udGFpbmVyLmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBDb21wb25lbnQsIGFyZ3M6IFt7CiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3I6ICdydW5zLXRhYmxlJywKICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogYAogICAgPHJ1bnMtdGFibGUtY29tcG9uZW50CiAgICAgIFt1c2VGbGV4aWJsZUxheW91dF09InVzZUZsZXhpYmxlTGF5b3V0IgogICAgICBbbnVtU2VsZWN0ZWRJdGVtc109Im51bVNlbGVjdGVkSXRlbXMkIHwgYXN5bmMiCiAgICAgIFtjb2x1bW5zXT0iY29sdW1ucyIKICAgICAgW2hwYXJhbUNvbHVtbnNdPSJocGFyYW1Db2x1bW5zJCB8IGFzeW5jIgogICAgICBbbWV0cmljQ29sdW1uc109Im1ldHJpY0NvbHVtbnMkIHwgYXN5bmMiCiAgICAgIFtzaG93RXhwZXJpbWVudE5hbWVdPSJpc0V4cGVyaW1lbnROYW1lVmlzaWJsZSgpIgogICAgICBbcGFnZUl0ZW1zXT0icGFnZUl0ZW1zJCB8IGFzeW5jIgogIC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URpc2NyZXRlRmlsdGVyQ2hhbmdlZCgkZXZlbnQpIgogICAgICAob25NZXRyaWNGaWx0ZXJDaGFuZ2VkKT0ib25NZXRyaWNGaWx0ZXJDaGFuZ2VkKCRldmVudCkiCiAgICA+PC9ydW5zLXRhYmxlLWNvbXBvbmVudD4KICBgLAogICAgICAgICAgICAgICAgICAgIGhvc3Q6IHsKICAgICAgICAgICAgICAgICAgICAgICAgJ1tjbGFzcy5mbGV4LWxheW91dF0nOiAndXNlRmxleGlibGVMYXlvdXQnLAogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgc3R5bGVzOiBbCiAgICAgICAgICAgICAgICAgICAgICAgIGAKICAgICAgOmhvc3QuZmxleC1sYXlvdXQgewogICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgIH0KCiAgICAgIDpob3N0LmZsZXgtbGF5b3V0ID4gcnVucy10YWJsZS1jb21wb25lbnQgewogICAgICAgIHdpZHRoOiAxMDAlOwogICAgICB9CiAgICBgLAogICAgICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICAgICAgY2hhbmdlRGV0ZWN0aW9uOiBDaGFuZ2VEZXRlY3Rpb25TdHJhdGVneS5PblB1c2gsCiAgICAgICAgICAgICAgICB9LF0gfSwKICAgIF07CiAgICAvKiogQG5vY29sbGFwc2UgKi8KICAgIFJ1bnNUYWJsZUNvbnRhaW5lci5jdG9yUGFyYW1ldGVycyA9ICgpID0+IFsKICAgICAgICB7IHR5cGU6IFN0b3JlIH0KICAgIF07CiAgICBSdW5zVGFibGVDb250YWluZXIucHJvcERlY29yYXRvcnMgPSB7CiAgICAgICAgdXNlRmxleGlibGVMYXlvdXQ6IFt7IHR5cGU6IElucHV0IH1dLAogICAgICAgIHVzZVBhZ2luYXRpb246IFt7IHR5cGU6IElucHV0IH1dLAogICAgICAgIGNvbHVtbnM6IFt7IHR5cGU6IElucHV0IH1dLAogICAgICAgIGV4cGVyaW1lbnRJZHM6IFt7IHR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AgICAgICAgQ29sb3JQaWNrZXJNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIENvbW1vbk1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgTWF0QnV0dG9uTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBNYXRDaGVja2JveE1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgTWF0SWNvbk1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgTWF0SW5wdXRNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIE1hdE1lbnVNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIE1hdFBhZ2luYXRvck1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgTWF0UHJvZ3Jlc3NTcGlubmVyTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBNYXRTb3J0TW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBNYXRUYWJsZU1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgUmFuZ2VJbnB1dE1vZHVsZSwKICAgICAgICAgICAgICAgICAgICBdLAogICAgICAgICAgICAgICAgICAgIGV4cG9ydHM6IFtSdW5zVGFibGVDb250YWluZXJdLAogICAgICAgICAgICAgICAgICAgIGRlY2xhcmF0aW9uczogW1J1bnNUYWJsZUNvbnRhaW5lciwgUnVuc1RhYmxlQ29tcG9uZW50XSwKICAgICAgICAgICAgICAgIH0sXSB9LAogICAgXTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLyBSdW5zVGFibGVNb2R1bGUuybVtb2QgPSDJtcm1ZGVmaW5lTmdNb2R1bGUoeyB0eXBlOiBSdW5zVGFibGVNb2R1bGUgfSk7CiAgICAvKiogQG5vY29sbGFwc2UgKi8gUnVuc1RhYmxlTW9kdWxlLsm1aW5qID0gybXJtWRlZmluZUluamVjdG9yKHsgZmFjdG9yeTogZnVuY3Rpb24gUnVuc1RhYmxlTW9kdWxlX0ZhY3RvcnkodCkgeyByZXR1cm4gbmV3ICh0IHx8IFJ1bnNUYWJsZU1vZHVsZSkoKTsgfSwgaW1wb3J0czogW1sKICAgICAgICAgICAgICAgIENvbG9yUGlja2VyTW9kdWxlLAogICAgICAgICAgICAgICAgQ29tbW9uTW9kdWxlLAogICAgICAgICAgICAgICAgTWF0QnV0dG9uTW9kdWxlLAogICAgICAgICAgICAgICAgTWF0Q2hlY2tib3hNb2R1bGUsCiAgICAgICAgICAgICAgICBNYXRJY29uTW9kdWxlLAogICAgICAgICAgICAgICAgTWF0SW5wdXRNb2R1bGUsCiAgICAgICAgICAgICAgICBNYXRNZW51TW9kdWxlLAogICAgICAgICAgICAgICAgTWF0UGFnaW5hdG9yTW9kdWxlLAogICAgICAgICAgICAgICAgTWF0UHJvZ3Jlc3NTcGlubmVyTW9kdWxlLAogICAgICAgICAgICAgICAgTWF0U29ydE1vZHVsZSwKICAgICAgICAgICAgICAgIE1hdFRhYmxlTW9kdWxlLAogICAgICAgICAgICAgICAgUmFuZ2VJbnB1dE1vZHVsZSwKICAgICAgICAgICAgXV0gfSk7CiAgICAoZnVuY3Rpb24gKCkgeyAodHlwZW9mIG5nSml0TW9kZSA9PT0gInVuZGVmaW5lZCIgfHwgbmdKaXRNb2RlKSAmJiDJtcm1c2V0TmdNb2R1bGVTY29wZShSdW5zVGFibGVNb2R1bGUsIHsgZGVjbGFyYXRpb25zOiBbUnVuc1RhYmxlQ29udGFpbmVyLCBSdW5zVGFibGVDb21wb25lbnRdLCBpbXBvcnRzOiBbQ29sb3JQaWNrZXJNb2R1bGUsCiAgICAgICAgICAgIENvbW1vbk1vZHVsZSwKICAgICAgICAgICAgTWF0QnV0dG9uTW9kdWxlLAogICAgICAgICAgICBNYXRDaGVja2JveE1vZHVsZSwKICAgICAgICAgICAgTWF0SWNvbk1vZHVsZSwKICAgICAgICAgICAgTWF0SW5wdXRNb2R1bGUsCiAgICAgICAgICAgIE1hdE1lbnVNb2R1bGUsCiAgICAgICAgICAgIE1hdFBhZ2luYXRv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ucy10YWJsZT4KICBgLAogICAgICAgICAgICAgICAgICAgIHN0eWxlczogWwogICAgICAgICAgICAgICAgICAgICAgICBgCiAgICAgIHJ1bnMtdGFibGUgewogICAgICAgIGhlaWdodDogMTAwJTsKICAgICAgfQogICAgYCwKICAgICAgICAgICAgICAgICAgICBdLAogICAgICAgICAgICAgICAgICAgIGNoYW5nZURldGVjdGlvbjogQ2hhbmdlRGV0ZWN0aW9uU3RyYXRlZ3kuT25QdXNoLAogICAgICAgICAgICAgICAgfSxdIH0sCiAgICBdOwogICAgUnVuc1NlbGVjdG9yQ29tcG9uZW50LnByb3BEZWNvcmF0b3JzID0gewogICAgICAgIGV4cGVyaW1lbnRJZHM6IFt7IHR5cGU6IElucHV0IH1dLAogICAgICAgIHNob3dIcGFyYW1zQW5kTWV0cmljczogW3sgdHlwZTogSW5wdXQgfV0sCiAgICAgICAgY29sdW1uczogW3sgdHlwZTogSW5wdXQgfV0sCiAgICAgICAgaHBhcmFtQW5kTWV0cmljU3BlY3M6IFt7IHR5cGU6IElucHV0IH1dCiAgICB9OwogICAgLyoqIEBub2NvbGxhcHNlICovIFJ1bnNTZWxlY3RvckNvbXBvbmVudC7JtWZhYyA9IGZ1bmN0aW9uIFJ1bnNTZWxlY3RvckNvbXBvbmVudF9GYWN0b3J5KHQpIHsgcmV0dXJuIG5ldyAodCB8fCBSdW5zU2VsZWN0b3JDb21wb25lbnQpKCk7IH07CiAgICAvKiogQG5vY29sbGFwc2UgKi8gUnVuc1NlbGVjdG9yQ29tcG9uZW50Lsm1Y21wID0gybXJtWRlZmluZUNvbXBvbmVudCh7IHR5cGU6IFJ1bnNTZWxlY3RvckNvbXBvbmVudCwgc2VsZWN0b3JzOiBbWyJydW5zLXNlbGVjdG9yLWNvbXBvbmVudCJdXSwgaW5wdXRzOiB7IGV4cGVyaW1lbnRJZHM6ICJleHBlcmltZW50SWRzIiwgc2hvd0hwYXJhbXNBbmRNZXRyaWNzOiAic2hvd0hwYXJhbXNBbmRNZXRy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XJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICBjbGFzcyBSdW5zU2VsZWN0b3JDb250YWluZXIgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gc3RvcmUKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihzdG9yZSkgewogICAgICAgICAgICB0aGlzLnN0b3JlID0gc3RvcmU7CiAgICAgICAgICAgIHRoaXMuZXhwZXJpbWVudElkcyQgPSB0aGlzLnN0b3JlLnNlbGVjdChnZXRFeHBlcmltZW50SWRzRnJvbVJvdXRlKTsKICAgICAgICAgICAgdGhpcy5jb2x1bW5zJCA9IHRoaXMuc3RvcmUuc2VsZWN0KGdldEV4cGVyaW1lbnRJZHNGcm9tUm91dGUpLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBpZHMKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChpZHMpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAoWwogICAgICAgICAgICAgICAgICAgIFJ1bnNUYWJsZUNvbHVtbi5DSEVDS0JPWCwKICAgICAgICAgICAgICAgICAgICBSdW5zVGFibGVDb2x1bW4uUlVOX05BTUUsCiAgICAgICAgICAgICAgICAgICAgaWRzICYmIGlkcy5sZW5ndGggPiAxID8gUnVuc1RhYmxlQ29sdW1uLkVYUEVSSU1FTlRfTkFNRSA6IG51bGwsCiAgICAgICAgICAgICAgICAgICAgUnVuc1RhYmxlQ29sdW1uLlJVTl9DT0xPUiwKICAgICAgICAgICAgICAgIF0uZmlsdGVyKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY29sCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoY29sKSA9PiBjb2wgIT09IG51bGwpKSkpOwogICAgICAgICAgICB9KSkpOwogICAgICAgIH0KICAgIH0KICAgIFJ1bnNTZWxlY3RvckNvbnRhaW5lci5kZWNvcmF0b3JzID0gWwogICAgICAgIHsgdHlwZTogQ29tcG9uZW50LCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIHNlbGVjdG9yOiAncnVucy1zZWxlY3RvcicsCiAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU6IGAKICAgIDxydW5zLXNlbGVjdG9yLWNvbXBvbmVudAogICAgICBbZXhwZXJpbWVudElkc109ImV4cGVyaW1lbnRJZHMkIHwgYXN5bmMiCiAgICAgIFtjb2x1bW5zXT0iY29sdW1ucyQgfCBhc3luYyIKICAgICAgW3Nob3dIcGFyYW1zQW5kTWV0cmljc109InNob3dIcGFyYW1zQW5kTWV0cmljcyIKICAgID48L3J1bnMtc2VsZWN0b3ItY29tcG9uZW50PgogIGAsCiAgICAgICAgICAgICAgICAgICAgY2hhbmdlRGV0ZWN0aW9uOiBDaGFuZ2VEZXRlY3Rpb25TdHJhdGVneS5PblB1c2gsCiAgICAgICAgICAgICAgICB9LF0gfSwKICAgIF07CiAgICAvKiogQG5vY29sbGFwc2UgKi8KICAgIFJ1bnNTZWxlY3RvckNvbnRhaW5lci5jdG9yUGFyYW1ldGVycyA9ICgpID0+IFsKICAgICAgICB7IHR5cGU6IFN0b3JlIH0KICAgIF07CiAgICBSdW5zU2VsZWN0b3JDb250YWluZXIucHJvcERlY29yYXRvcnMgPSB7CiAgICAgICAgc2hvd0hwYXJhbXNBbmRNZXRyaWNzOiBbeyB0eXBlOiBJbnB1dCB9XQogICAgfTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLyBSdW5zU2VsZWN0b3JDb250YWluZXIuybVmYWMgPSBmdW5jdGlvbiBSdW5zU2VsZWN0b3JDb250YWluZXJfRmFjdG9yeSh0KSB7IHJldHVybiBu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nNlLgogICAgWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZSBMaWNlbnNlIGF0CgogICAgICAgIGh0dHA6Ly93d3cuYXBhY2hlLm9yZy9saWNlbnNlcy9MSUNFTlNFLTIuMAoKICAgIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3JlZWQgdG8gaW4gd3JpdGluZywgc29mdHdhcmUKICAgIGRpc3RyaWJ1dGVkIHVuZGVyIHRoZSBMaWNlbnNlIGlzIGRpc3RyaWJ1dGVkIG9uIGFuICJBUyBJUyIgQkFTSVMsCiAgICBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC4KICAgIFNlZSB0aGUgTGljZW5zZSBmb3IgdGhlIHNwZWNpZmljIGxhbmd1YWdlIGdvdmVybmluZyBwZXJtaXNzaW9ucyBhbmQKICAgIGxpbWl0YXRpb25zIHVuZGVyIHRoZSBMaWNlbnNlLgogICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KICAgIC8qKiBAZW51bSB7c3RyaW5nfSAqLwogICAgY29uc3QgVG9vbHRpcFBvc2l0aW9uID0gewogICAgICAgIEJPVFRPTTogImJvdHRvbSIsCiAgICAgICAgUklHSFQ6ICJyaWdodCIsCiAgICAgICAgQVVUTzogImF1dG8iLAogICAgfTsKICAgIC8qKiBAZW51bSB7c3RyaW5nfSAqLwogICAgY29uc3QgVG9vbHRpcFNvcnRpbmdNZXRob2QgPSB7CiAgICAgICAgREVGQVVMVDogImRlZmF1bHQiLAogICAgICAgIEFTQ0VORElORzogImFzY2VuZGluZyIsCiAgICAgICAgREVTQ0VORElORzogImRlc2NlbmRpbmciLAogICAgICAgIE5FQVJFU1Q6ICJuZWFyZXN0IiwKICAgIH07CiAgICAvKiogQGV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lLXJ1biwgc2FtcGxlZCBmb3JtYXQgKGUuZy4gSW1hZ2VzKS4KICAgICAgICAgICAgICAgICAgICBjb25zdCB0YWdSdW5TYW1wbGVJbmZvID0gdGFnTWV0YWRhdGFbcGx1Z2luXS50YWdSdW5TYW1wbGVkSW5mbzsKICAgICAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IHRhZyBvZiBPYmplY3Qua2V5cyh0YWdSdW5TYW1wbGVJbmZvKSkgewogICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IHJ1bklkIG9mIE9iamVjdC5rZXlzKHRhZ1J1blNhbXBsZUluZm9bdGFnXSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHsgbWF4U2FtcGxlc1BlclN0ZXAgfSA9IHRhZ1J1blNhbXBsZUluZm9bdGFnXVtydW5JZF07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IG1heFNhbXBsZXNQZXJTdGVwOyBpKyspIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHRzLnB1c2goeyBwbHVnaW4sIHRhZywgcnVuSWQsIHNhbXBsZTogaSB9KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignTXVsdGktcnVuLCBzYW1wbGVkIHBsdWdpbiBzdXBwb3J0IG5vdCB5ZXQgaW1wbGVtZW50ZWQnKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIGlmIChpc1NpbmdsZVJ1blBsdWdpbihwbHVnaW4pKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gU2luZ2xlLXJ1biwgdW5zYW1wbGVkIGZvcm1hdCAoZS5nLiBIaXN0b2dyYW1zKS4KICAgICAgICAgICAgICAgICAgICB0YWdUb1J1bnMgPSB0YWdNZXRhZGF0YVtwbHVnaW5dLnRhZ1RvUnVuczsKICAgICAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IHRhZyBvZiBPYmplY3Qua2V5cyh0YWdUb1J1bnMpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoY29uc3QgcnVuSWQgb2YgdGFnVG9SdW5zW3RhZ10pIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdHMucHVzaCh7IHBsdWdpbiwgdGFnLCBydW5JZCB9KTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIC8vIE11bHRpLXJ1biwgdW5zYW1wbGVkIGZvcm1hdCAoZS5nLiBTY2FsYXJzKS4KICAgICAgICAgICAgICAgICAgICB0YWdUb1J1bnMgPSB0YWdNZXRhZGF0YVtwbHVnaW5dLnRhZ1RvUnVuczsKICAgICAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IHRhZyBvZiBPYmplY3Qua2V5cyh0YWdUb1J1bnMpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdHMucHVzaCh7IHBsdWdpbiwgdGFnLCBydW5JZDogbnVsbCB9KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIHJlc3VsdHM7CiAgICB9CiAgICBmdW5jdGlvbiBnZXRNYXhTdGVwSW5kZXgoY2FyZElkLCBjYXJkTWV0YWRhdGFNYXAsIHRpbWVTZXJpZXNEYXRhKSB7CiAgICAgICAgY29uc3QgeyBwbHVnaW4sIHRhZywgcnVuSWQsIHNhbXBsZSB9ID0gY2FyZE1ldGFkYXRhTW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RvIGBudWxsYCBpZiB0aGUgc2VyaWVzIGNvbnRhaW5zIG5vIHN0ZXAgZGF0YQogICAgICovCiAgICBmdW5jdGlvbiBidWlsZE5vcm1hbGl6ZWRDYXJkU3RlcEluZGV4TWFwKGNhcmRNZXRhZGF0YU1hcCwgY2FyZFN0ZXBJbmRleCwgdGltZVNlcmllc0RhdGEsIHByZXZUaW1lU2VyaWVzRGF0YSkgewogICAgICAgIGNvbnN0IHJlc3VsdCA9IE9iamVjdC5hc3NpZ24oe30sIGNhcmRTdGVwSW5kZXgpOwogICAgICAgIGZvciAoY29uc3QgY2FyZElkIGluIGNhcmRNZXRhZGF0YU1hcCkgewogICAgICAgICAgICBpZiAoIWNhcmRNZXRhZGF0YU1hcC5oYXNPd25Qcm9wZXJ0eShjYXJkSWQpKSB7CiAgICAgICAgICAgICAgICBjb250aW51ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBjb25zdCBtYXhTdGVwSW5kZXggPSBnZXRNYXhTdGVwSW5kZXgoY2FyZElkLCBjYXJkTWV0YWRhdGFNYXAsIHRpbWVTZXJpZXNEYXRhKTsKICAgICAgICAgICAgaWYgKG1heFN0ZXBJbmRleCA9PT0gbnVsbCkgewogICAgICAgICAgICAgICAgaWYgKGNhcmRTdGVwSW5kZXguaGFzT3duUHJvcGVydHkoY2FyZElkKSkgewogICAgICAgICAgICAgICAgICAgIHJlc3VsdFtjYXJkSWRdID0gbnVsbDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNvbnN0IHN0ZXBJbmRleCA9IGNhcmRTdGVwSW5kZXguaGFzT3duUHJvcGVydHkoY2FyZElkKQogICAgICAgICAgICAgICAgPyBjYXJkU3RlcEluZGV4W2NhcmRJZF0KICAgICAgICAgICAgICAgIDogbnVsbDsKICAgICAgICAgICAgY29uc3QgcHJldk1heFN0ZXBJbmRleCA9IGdldE1heFN0ZXBJbmRleChjYXJkSWQ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B0YWdEZXNjcmlwdGlvbnM6IHt9LAogICAgICAgICAgICAgICAgdGFnUnVuU2FtcGxlZEluZm86IHt9LAogICAgICAgICAgICB9LAogICAgICAgIH0sCiAgICAgICAgLy8gQ2FyZHMuCiAgICAgICAgY2FyZExpc3Q6IFtdLAogICAgICAgIGNhcmRUb1Bpbm5lZENvcHk6IG5ldyBNYXAoKSwKICAgICAgICBwaW5uZWRDYXJkVG9PcmlnaW5hbDogbmV3IE1hcCgpLAogICAgICAgIHVucmVzb2x2ZWRJbXBvcnRlZFBpbm5lZENhcmRzOiBbXSwKICAgICAgICBjYXJkTWV0YWRhdGFNYXA6IHt9LAogICAgICAgIGNhcmRTdGVwSW5kZXg6IHt9LAogICAgICAgIHRhZ0ZpbHRlcjogJycsCiAgICAgICAgdGFnR3JvdXBFeHBhbmRlZDogbmV3IE1hcCgpLAogICAgfSwgewogICAgICAgIHRpbWVTZXJpZXNEYXRhOiB7CiAgICAgICAgICAgIHNjYWxhcnM6IHt9LAogICAgICAgICAgICBoaXN0b2dyYW1zOiB7fSwKICAgICAgICAgICAgaW1hZ2VzOiB7fSwKICAgICAgICB9LAogICAgICAgIHNldHRpbmdzOiB7CiAgICAgICAgICAgIHRvb2x0aXBTb3J0OiBUb29sdGlwU29ydGluZ01ldGhvZC5ERUZBVUxULAogICAgICAgICAgICBpZ25vcmVPdXRsaWVyczogdHJ1ZSwKICAgICAgICAgICAgeEF4aXNUeXBlOiBYQXhpc1R5cGUkMS5TVEVQLAogICAgICAgICAgICBzY2FsYXJTbW9vdGhpbmc6IDAuNiwKICAgICAgICAgICAgaW1hZ2VCcmlnaHRuZXNzSW5NaWxsaTogMTAwMCwKICAgICAgICAgICAgaW1hZ2VDb250cmFzdEluTWlsbGk6IDEwMDAsCiAgICAgICAgICAgIGltYWdlU2hvd0FjdHVhbFNpemU6IGZhbHNlLAogICAgICAgICAgICBoaXN0b2dyYW1Nb2RlOiBIaXN0b2dyYW1Nb2RlLk9GRlNFVCwKICAgICAgIC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09PSBNRVRSSUNTX1BMVUdJTl9JRDsKICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgdGhpcy5sb2FkVGFnTWV0YWRhdGEkID0gbWVyZ2UodGhpcy5kYXNoYm9hcmRTaG93bldpdGhvdXREYXRhJCwgdGhpcy5yZWxvYWRSZXF1ZXN0ZWRXaGlsZVNob3duJCkucGlwZSh3aXRoTGF0ZXN0RnJvbSh0aGlzLnN0b3JlLnNlbGVjdChnZXRNZXRyaWNzVGFnTWV0YWRhdGFMb2FkZWQpLCB0aGlzLnN0b3JlLnNlbGVjdChnZXRFeHBlcmltZW50SWRzRnJvbVJvdXRlKSksIGZpbHRlcigoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoWywgdGFnTG9hZFN0YXRlLCBleHBlcmltZW50SWRzXSkgPT4gewogICAgICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAgICAgKiBXaGVuIGBleHBlcmltZW50SWRzYCBpcyBudWxsLCB0aGUgYWN0dWFsIGlkcyBoYXZlIG5vdAogICAgICAgICAgICAgICAgICogYXBwZWFyZWQgaW4gdGhlIHN0b3JlIHlldC4KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgcmV0dXJuIHRhZ0xvYWRTdGF0ZSAhPT0gRGF0YUxvYWRTdGF0ZS5MT0FESU5HICYmIGV4cGVyaW1lbnRJZHMgIT09IG51bGw7CiAgICAgICAgICAgIH0pKSwgdGFwKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuc3RvcmUuZGlzcGF0Y2gobWV0cmljc1RhZ01ldGFkYXRhUmVxdWVzdGVkKCkpOwogICAgICAgICAgICB9KSksIHN3aXRjaE1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoWywgLCBleHBlcmltZW50SWRzXSkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuZGF0YVNvdXJjZS5mZXRjaFRhZ01ldGFkYXRhKCgvKiogQHR5cGUgez99ICovIChleHBlcmltZW50SWRzKSkpLnBpcGUodGFwKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdGFnTWV0YWRhdGEKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICh0YWdNZXRhZGF0YSkgPT4gewogICAgICAgICAgICAgICAgICAgIHRoaXMuc3RvcmUuZGlzcGF0Y2gobWV0cmljc1RhZ01ldGFkYXRhTG9hZGVkKHsgdGFnTWV0YWRhdGEgfSkpOwogICAgICAgICAgICAgICAgfSkpLCBjYXRjaEVycm9yKCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKG1ldHJpY3NUYWdNZXRhZGF0YUZhaWxlZCgpKTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gb2YobnVsbCk7CiAgICAgICAgICAgICAgICB9KSkpOwogICAgICAgICAgICB9KSkpOwogICAgICAgICAgICB0aGlzLnZpc2libGVDYXJkc1dpdGhvdXREYXRhQ2hhbmdlZCQgPSB0aGlzLmFjdGlvbnMkLnBpcGUob2ZUeXBlKGNhcmRWaXNpYmlsaXR5Q2hhbmdlZCksIHN3aXRjaE1hcCgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB0aGlzLmdldFZpc2libGVDYXJkRmV0Y2hJbmZvcygpLnBpcGUodGFrZSgxKSkpKSwgbWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBmZXRjaEluZm9zCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoZmV0Y2hJbmZvcykgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIGZldGNoSW5mb3MuZmlsdGVyKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZmV0Y2hJbmZvCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoZmV0Y2hJbmZvKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZldGNoSW5mby5sb2FkU3RhdGUgPT09IERhdGFMb2FkU3RhdGUuTk9UX0xPQURFRDsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgdGhpcy52aXNpYmxlQ2FyZHNSZWxvYWRlZCQgPSB0aGlzLnJlbG9hZFJlcXVlc3RlZFdoaWxlU2hvd24kLnBpcGUoc3dpdGNoTWFwKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHRoaXMuZ2V0VmlzaWJsZUNhcmRGZXRjaEluZm9zKCkucGlwZSh0YWtlKDEpKSkpLCBtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGZldGNoSW5mb3MKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChmZXRjaEluZm9zKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gZmV0Y2hJbmZvcy5maWx0ZXIoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBmZXRjaEluZm8KICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChmZXRjaEluZm8pID0+IHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmV0Y2hJbmZvLmxvYWRTdGF0ZSAhPT0gRGF0YUxvYWRTdGF0ZS5MT0FESU5HOwogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB9KSkpOwogICAgICAgICAgICB0aGlzLmxvYWRUaW1lU2VyaWVzJCA9IG1lcmdlKHRoaXMudmlzaWJsZUNhcmRzV2l0aG91dERhdGFDaGFuZ2VkJCwgdGhpcy52aXNpYmxlQ2FyZHNSZWxvYWRlZCQpLnBpcGUoZmlsdGVyKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBmZXRjaEluZm9zCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoZmV0Y2hJbmZvcykgPT4gZmV0Y2hJbmZvcy5sZW5ndGggPiAwKSksIAogICAgICAgICAgICAvLyBJZ25vcmUgY2FyZCB2aXNpYmlsaXR5IGV2ZW50cyB1bnRpbCB3ZSBoYXZlIG5vbi1udWxsCiAgICAgICAgICAgIC8vIGV4cGVyaW1lbnRJZHMuCiAgICAgICAgICAgIHdpdGhMYXRlc3RGcm9tKHRoaXMuc3RvcmUKICAgICAgICAgICAgICAgIC5zZWxlY3QoZ2V0RXhwZXJpbWVudElkc0Zyb21Sb3V0ZSkKICAgICAgICAgICAgICAgIC5waXBlKGZpbHRlcigoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZXhwZXJpbWVudElkcwogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGV4cGVyaW1lbnRJZHMpID0+IGV4cGVyaW1lbnRJZHMgIT09IG51bGwpKSkpLCBtZXJnZU1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoW2ZldGNoSW5mb3MsIGV4cGVyaW1lbnRJZHNdKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5mZXRjaFRpbWVTZXJpZXNGb3JDYXJkcyhmZXRjaEluZm9zLCAoLyoqIEB0eXBlIHs/fSAqLyAoZXhwZXJpbWVudElkcykpKTsKICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAgICogSW4gZ2VuZXJhbCwgdGhpcyBlZmZlY3QgZGlzcGF0Y2ggdGhlIGZvbGxvd2luZyBhY3Rpb25zOgogICAgICAgICAgICAgICAqCiAgICAgICAgICAgICAgICogT24gZGFzaGJvYXJkIHNob3duIHdpdGggdmlzaWJsZSBjYXJkczoKICAgICAgICAgICAgICAgKiAtIG1ldHJpY3NUYWdNZXRhZGF0YVJlcXVlc3RlZAogICAgICAgICAgICAgICAqIC0gbXVsdGlwbGVUaW1lU2VyaWVzUmVxdWVzdGVkCiAgICAgICAgICAgICAgICoKICAgICAgICAgICAgICAgKiBPbiByZWxvYWRzOgogICAgICAgICAgICAgICAqIC0gbWV0cmljc1RhZ01ldGFkYXRhUmVxdWVzdGVkCiAgICAgICAgICAgICAgICogLSBtdWx0aXBsZVRpbWVTZXJpZXNSZXF1ZXN0ZWQKICAgICAgICAgICAgICAgKgogICAgICAgICAgICAgICAqIE9uIGRhdGEgc291cmNlIHJlc3BvbnNlczoKICAgICAgICAgICAgICAgKiAtIG1ldHJpY3NUYWdNZXRhZGF0YUxvYWRlZAogICAgICAgICAgICAgICAqIC0gbWV0cmljc1RhZ01ldGFkYXRhRmFpbGVkCiAgICAgICAgICAgICAgICogLSBmZXRjaFRpbWVTZXJpZXNMb2FkZWQKICAgICAgICAgICAgICAgKiAtIGZldGNoVGltZVNlcmllc0ZhaWxlZAogICAgICAgICAgICAgICAqLwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQGV4cG9ydAogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5hbGxFZmZlY3RzJCA9IGNyZWF0ZUVmZmVjdCgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gbWVyZ2UoCiAgICAgICAgICAgICAgICAvKioKICAgICAgICAgICAgICAgICAqIFN1YnNjcmliZXMgdG86IGRhc2hib2FyZCBzaG93biwgcm91dGUgbmF2aWdhdGlvbiwgcmVsb2Fkcy4KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgdGhpcy5sb2FkVGFnTWV0YWRhdGEkLCAKICAgICAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgICAgICogU3Vic2NyaWJlcyB0bzogY2FyZCB2aXNpYmlsaXR5LCByZWxvYWRzLgogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICB0aGlzLmxvYWRUaW1lU2VyaWVzJCk7CiAgICAgICAgICAgIH0pLCB7IGRpc3BhdGNoOiBmYWxzZSB9KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQGV4cG9ydAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdyeE9uSW5pdEVmZmVjdHMoKSB7CiAgICAgICAgICAgIHJldHVybiBpbml0QWN0aW9uJDEoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldFZpc2libGVDYXJkRmV0Y2hJbmZvcygpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB2aXNpYmxlQ2FyZElkcyQgPSB0aGlzLnN0b3JlLnNlbGVjdChnZXRWaXNpYmxlQ2FyZElkcyk7CiAgICAgICAgICAgIHJldHVybiB2aXNpYmxlQ2FyZElkcyQucGlwZShzd2l0Y2hNYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGNhcmRJZHMKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChjYXJkSWRzKSA9PiB7CiAgICAgICAgICAgICAgICAvLyBFeHBsaWNpdGx5IG5vdGlmeSBzdWJzY3JpYmVycyB0aGF0IHRoZXJlIGFyZSBubyB2aXNpYmxlIGNhcmRzLAogICAgICAgICAgICAgICAgLy8gc2luY2UgYGZvcmtKb2luYCBkb2VzIG5vdCBlbWl0IHdoZW4gcGFzc2VkIGFuIGVtcHR5IGFycmF5LgogICAgICAgICAgICAgICAgaWYgKCFjYXJkSWRzLmxlbmd0aCkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBvZihbXSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBvYnNlcnZhYmxlcyA9IGNhcmRJZHMubWFwKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY2FyZElkCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoY2FyZElkKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuc3RvcmUuc2VsZWN0KGdldENhcmRGZXRjaEluZm8sIGNhcmRJZCkucGlwZSh0YWtlKDEpKTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgIHJldHVybiBmb3JrSm9pbihvYnNlcnZhYmxlcyk7CiAgICAgICAgICAgIH0pKSwgbWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBmZXRjaEluZm9zCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoZmV0Y2hJbmZvcykgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovIChmZXRjaEluZm9zLmZpbHRlcihCb29sZWFuKSkpOwogICAgICAgICAgICB9KSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gcmVxdWVzdAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZmV0Y2hUaW1lU2VyaWVzKHJlcXVlc3QpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuZGF0YVNvdXJjZS5mZXRjaFRpbWVTZXJpZXMoW3JlcXVlc3RdKS5waXBlKHRhcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcmVzcG9uc2VzCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAocmVzcG9uc2VzKSA9PiB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBlcnJvcnMgPSByZXNwb25zZXMuZmlsdGVyKGlzRmFpbGVkVGltZVNlcmllc1Jlc3BvbnNlKTsKICAgICAgICAgICAgICAgIGlmIChlcnJvcnMubGVuZ3RoKSB7CiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcignVGltZSBzZXJpZXMgcmVzcG9uc2UgY29udGFpbmVkIGVycm9yczonLCBlcnJvcnMpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChmZXRjaFRpbWVTZXJpZXNMb2FkZWQoeyByZXNwb25zZTogcmVzcG9uc2VzWzBdIH0pKTsKICAgICAgICAgICAgfSkpLCBjYXRjaEVycm9yKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuc3RvcmUuZGlzcGF0Y2goZmV0Y2hUaW1lU2VyaWVzRmFpbGVkKHsgcmVxdWVzdCB9KSk7CiAgICAgICAgICAgICAgICByZXR1cm4gb2YobnVsbCk7CiAgICAgICAgICAgIH0pKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBmZXRjaEluZm9zCiAgICAgICAgICogQHBhcmFtIHs/fSBleHBlcmltZW50SWRzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmZXRjaFRpbWVTZXJpZXNGb3JDYXJkcyhmZXRjaEluZm9zLCBleHBlcmltZW50SWRzKSB7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBUT0RPKHBzeWJ1enopOiBpZiAyIGNhcmRzIHJlcXVpcmUgdGhlIHNhbWUgZGF0YSwgd2Ugc2hvdWxkIGRlZHVwZSBpbnN0ZWFkIG9mCiAgICAgICAgICAgICAqIG1ha2luZyAyIGlkZW50aWNhbCByZXF1ZXN0cy4KICAgICAgICAgICAgICogQHR5cGUgez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBjb25zdCByZXF1ZXN0cyA9IGZldGNoSW5mb3MubWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBmZXRjaEluZm8KICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChmZXRjaEluZm8pID0+IHsKICAgICAgICAgICAgICAgIGNvbnN0IHsgcGx1Z2luLCB0YWcsIHJ1bklkLCBzYW1wbGUgfSA9IGZldGNoSW5mbzsKICAgICAgICAgICAgICAgIHJldHVybiBpc1NpbmdsZVJ1blBsdWdpbihwbHVnaW4pCiAgICAgICAgICAgICAgICAgICAgPyB7IHBsdWdpbiwgdGFnLCBzYW1wbGUsIHJ1bklkOiAoLyoqIEB0eXBlIHs/fSAqLyAocnVuSWQpKSB9CiAgICAgICAgICAgICAgICAgICAgOiB7IHBsdWdpbiwgdGFnLCBzYW1wbGUsIGV4cGVyaW1lbnRJZHMgfTsKICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAvLyBGZXRjaCBhbmQgaGFuZGxlIHJlc3BvbnNlcy4KICAgICAgICAgICAgcmV0dXJuIG9mKHJlcXVlc3RzKS5waXBlKHRhcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcmVxdWVzdHMKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChyZXF1ZXN0cykgPT4gewogICAgICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChtdWx0aXBsZVRpbWVTZXJpZXNSZXF1ZXN0ZWQoeyByZXF1ZXN0cyB9KSk7CiAgICAgICAgICAgIH0pKSwgbWVyZ2VNYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHJlcXVlc3RzCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAocmVxdWVzdHMpID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IG9ic2VydmFibGVzID0gcmVxdWVzdHMubWFwKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcmVxdWVzdAogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKHJlcXVlc3QpID0+IHRoaXMuZmV0Y2hUaW1lU2VyaWVzKHJlcXVlc3QpKSk7CiAgICAgICAgICAgICAgICByZXR1cm4gbWVyZ2UoLi4ub2JzZXJ2YWJsZXMpOwogICAgICAgICAgICB9KSkpOwogICAgICAgIH0KICAgIH0KICAgIE1ldHJpY3NFZmZlY3RzLmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBJbmplY3RhYmxlIH0sCiAgICBdOwogICAgLyoqIEBub2NvbGxhcHNlICovCiAgICBNZXRyaWNzRWZmZWN0cy5jdG9yUGFyYW1ldGVycyA9ICgpID0+IFsKICAgICAgICB7IHR5cGU6IEFjdGlvbnMg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yKHJvb3QsIGJ1ZmZlcikgewogICAgICAgICAgICB0aGlzLnJvb3QgPSByb290OwogICAgICAgICAgICB0aGlzLmJ1ZmZlciA9IGJ1ZmZlcjsKICAgICAgICAgICAgdGhpcy5kZXN0cm95ZWRUYXJnZXRzID0gbmV3IFNldCgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGludGVyc2VjdGlvbkNhbGxiYWNrCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBpbml0aWFsaXplKGludGVyc2VjdGlvbkNhbGxiYWNrKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmludGVyc2VjdGlvbk9ic2VydmVyKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5pbnRlcnNlY3Rpb25DYWxsYmFjayA9IGludGVyc2VjdGlvbkNhbGxiYWNrOwogICAgICAgICAgICB0aGlzLmludGVyc2VjdGlvbk9ic2VydmVyID0gbmV3IEludGVyc2VjdGlvbk9ic2VydmVyKHRoaXMub25DYXJkSW50ZXJzZWN0aW9uLmJpbmQodGhpcyksIHsgdGhyZXNob2xkOiAwLCByb290OiB0aGlzLnJvb3QsIHJvb3RNYXJnaW46IHRoaXMuYnVmZmVyIH0pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHRhcmdldAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYWRkKHRhcmdldCkgewogICAgICAgICAgICBpZiAodGhpcy5lbnN1cmVJbml0aWFsaXplZCgpKSB7CiAgICAgICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5pbnRlcnNlY3Rpb25PYnNlcnZlcikpLm9ic2VydmUodGFyZ2V0KTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBZGRzIGEgdGFyZ2V0IHRvIGEgbGlzdCBvZiBlbGVtZW50cyB0by1iZS1kZXN0cm95ZWQsIHNvIHRoYXQgd2UgY2FuIG5vdGlmeQogICAgICAgICAqIGxpc3RlbmVycyB0aGF0IHRoZXkgYmVjb21lICdleGl0ZWRDYXJkcycgYmVmb3JlIHVub2JzZXJ2aW5nIGl0LgogICAgICAgICAqIEBwYXJhbSB7P30gdGFyZ2V0CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB3aWxsRGVzdHJveSh0YXJnZXQpIHsKICAgICAgICAgICAgaWYgKHRoaXMuZW5zdXJlSW5pdGlhbGl6ZWQoKSkgewogICAgICAgICAgICAgICAgdGhpcy5kZXN0cm95ZWRUYXJnZXRzLmFkZCh0YXJnZXQpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBlbnN1cmVJbml0aWFsaXplZCgpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLmludGVyc2VjdGlvbk9ic2VydmVyKSB7CiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0NhcmRPYnNlcnZlciBtdXN0IGJlIGluaXRpYWxpemVkIGJlZm9yZSB1c2UnKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGVudHJpZXMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uQ2FyZEludGVyc2VjdGlvbihlbnRyaWVzKSB7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBXaXRoaW4gYSBzaW5nbGUgY2FsbGJhY2sgZmlyaW5nLCBgZW50cmllc2AgbWF5IGluY2x1ZGUgc2VwYXJhdGUgZW50cmllcwogICAgICAgICAgICAgKiByZXByZXNlbnRpbmcgdGhlIHNhbWUgdGFyZ2V0IGVsZW1lbnQgZW50ZXJpbmcgKGlzSW50ZXJzZWN0aW5nKSBhbmQKICAgICAgICAgICAgICogbGVhdmluZyAoIWlzSW50ZXJzZWN0aW5nKS4gVG8gYWNjb3VudCBmb3IgdGhpcywgd2Ugc29ydCBlbnRyaWVzIGJ5CiAgICAgICAgICAgICAqIGluY3JlYXNpbmcgdGltZXN0YW1wIGFuZCByZXNwZWN0IHRoZSBsYXRlc3Qgb25lLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZW50cmllcy5zb3J0KCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBhCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gYgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGEsIGIpID0+IGEudGltZSAtIGIudGltZSkpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGVudGVyZWRDYXJkcyA9IG5ldyBTZXQoKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBleGl0ZWRDYXJkcyA9IG5ldyBTZXQoKTsKICAgICAgICAgICAgZm9yIChjb25zdCBlbnRyeSBvZiBlbnRyaWVzKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCB0YXJnZXQgPSBlbnRyeS50YXJnZXQ7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBjYXJkSWQgPSBlbGVtZW50VG9DYXJkSWRNYXAuZ2V0KHRhcmdldCk7CiAgICAgICAgICAgICAgICBpZiAoIWNhcmRJZCkgewogICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignQSBDYXJkT2JzZXJ2ZXIgZWxlbWVudCBtdXN0IGJlIGFzc29jaWF0ZWQgd2l0aCBhIENhcmRJZCcpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKGVudHJ5LmlzSW50ZXJzZWN0aW5nKSB7CiAgICAgICAgICAgICAgICAgICAgZW50ZXJlZENhcmRzLmFkZChjYXJkSWQpOwogICAgICAgICAgICAgICAgICAgIGV4aXRlZENhcmRzLmRlbGV0ZShjYXJkSWQpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgZW50ZXJlZENhcmRzLmRlbGV0ZShjYXJkSWQpOwogICAgICAgICAgICAgICAgICAgIGV4aXRlZENhcmRzLmFkZChjYXJkSWQpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAgICAgKiBDbGVhbnVwIGRlc3Ryb3llZCB0YXJnZXRzLiBEZWZlbmQgYWdhaW5zdCBzcGVjdWxhdGl2ZSBjYXNlIHdoZW4KICAgICAgICAgICAgICAgICAqIC0gQSBlbnRlcnMgdmlld3BvcnQKICAgICAgICAgICAgICAgICAqIC0gQiBhZGRlZCB0byBkZXN0cm95ZWQgdGFyZ2V0cwogICAgICAgICAgICAgICAgICogLSBDYWxsYmFjayBmaXJlcyBmb3IganVzdCBBLCB1bm9ic2VydmluZyBCCiAgICAgICAgICAgICAgICAgKiAtIEIncyBjYWxsYmFjayBuZXZlciBmaXJlcwogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBpZiAodGhpcy5kZXN0cm95ZWRUYXJnZXRzLmhhcyh0YXJnZXQpICYmICFlbnRyeS5pc0ludGVyc2VjdGluZykgewogICAgICAgICAgICAgICAgICAgIHRoaXMuZGVzdHJveWVkVGFyZ2V0cy5kZWxldGUodGFyZ2V0KTsKICAgICAgICAgICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5pbnRlcnNlY3Rpb25PYnNlcnZlcikpLnVub2JzZXJ2ZSh0YXJnZXQpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovICh0aGlzLmludGVyc2VjdGlvbkNhbGxiYWNrKSkoZW50ZXJlZENhcmRzLCBleGl0ZWRDYXJkcyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZW50cmllcwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25DYXJkSW50ZXJzZWN0aW9uRm9yVGVzdChlbnRyaWVzKSB7CiAgICAgICAgICAgIHRoaXMub25DYXJkSW50ZXJzZWN0aW9uKGVudHJpZXMpOwogICAgICAgIH0KICAgIH0KICAgIC8qKgogICAgICogQSBkaXJlY3RpdmUgYXBwbGllZCB0byBlbGVtZW50cyB0aGF0IHJlcHJlc2VudCBhIGNhcmQgY29udGFpbmVyLiBXaGVuIHRoZQogICAgICogZWxlbWVudCBpcyByZWFkeSB0byBiZSBsb2FkZWQsIHRoaXMgaXMgcmVzcG9uc2libGUgZm9yIG1hcmtpbmcgY2FyZElkIGFzCiAgICAgKiB2aXNpYmxlLgogICAgICoKICAgICAqIENhcmQgY29udGFpbmVyOgogICAgICoKICAgICAqIDxkaXYgW2NhcmRMYXp5TG9hZGVyXT0iY2FyZDEiPjwvZGl2PgogICAgICoKICAgICAqIENhcmQgY29udGFpbmVyIHRoYXQgY2FuIGxvYWQgd2l0aGluIDEwMHB4IG9mIGEgc2Nyb2xsYWJsZSBlbGVtZW50J3MgYm91bmRpbmcKICAgICAqIGJveDoKICAgICAqCiAgICAgKiA8ZGl2CiAgICAgKiAgIFtjYXJkTGF6eUxvYWRlcl09ImNhcmQxIgogICAgICogICBbY2FyZE9ic2VydmVyXT0ibmV3IENhcmRPYnNlcnZlcihzY3JvbGxhYmxlRWxlbWVudCwgJzEwMHB4JykiCiAgICAgKiA+PC9kaXY+CiAgICAgKi8KICAgIGNsYXNzIENhcmRMYXp5TG9hZGVyIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGhvc3QKICAgICAgICAgKiBAcGFyYW0gez99IHN0b3JlCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoaG9zdCwgc3RvcmUpIHsKICAgICAgICAgICAgdGhpcy5ob3N0ID0gaG9zdDsKICAgICAgICAgICAgdGhpcy5zdG9yZSA9IHN0b3JlOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVudGVyZWRDYXJkcwogICAgICAgICAqIEBwYXJhbSB7P30gZXhpdGVkQ2FyZHMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uQ2FyZEludGVyc2VjdGlvbihlbnRlcmVkQ2FyZHMsIGV4aXRlZENhcmRzKSB7CiAgICAgICAgICAgIHRoaXMuc3RvcmUuZGlzcGF0Y2goY2FyZFZpc2liaWxpdHlDaGFuZ2VkKHsgZW50ZXJlZENhcmRzLCBleGl0ZWRDYXJkcyB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkluaXQoKSB7CiAgICAgICAgICAgIGVsZW1lbnRUb0NhcmRJZE1hcC5zZXQodGhpcy5ob3N0Lm5hdGl2ZUVsZW1lbnQsIHRoaXMuY2FyZElkKTsKICAgICAgICAgICAgaWYgKCF0aGlzLmNhcmRPYnNlcnZlcikgewogICAgICAgICAgICAgICAgdGhpcy5jYXJkT2JzZXJ2ZXIgPSBuZXcgQ2FyZE9ic2VydmVyKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5jYXJkT2JzZXJ2ZXIuaW5pdGlhbGl6ZSh0aGlzLm9uQ2FyZEludGVyc2VjdGlvbi5iaW5kKHRoaXMpKTsKICAgICAgICAgICAgdGhpcy5jYXJkT2JzZXJ2ZXIuYWRkKHRoaXMuaG9zdC5uYXRpdmVFbGVtZW50KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uRGVzdHJveSgpIHsKICAgICAgICAgICAgaWYgKHRoaXMuY2FyZE9ic2VydmVyKSB7CiAgICAgICAgICAgICAgICB0aGlzLmNhcmRPYnNlcnZlci53aWxsRGVzdHJveSh0aGlzLmhvc3QubmF0aXZlRWxlbWVudCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBob3N0Rm9yVGVzdCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuaG9zdDsKICAgICAgICB9CiAgICB9CiAgICBDYXJkTGF6eUxvYWRlci5kZWNvcmF0b3JzID0gWwogICAgICAgIHsgdHlwZTogRGlyZWN0aXZlLCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIHNlbGVjdG9yOiAnW2NhcmRMYXp5TG9hZGVyXScsCiAgICAgICAgICAgICAgICB9LF0gfSwKICAgIF07CiAgICAvKiogQG5vY29sbGFwc2UgKi8KICAgIENhcmRMYXp5TG9hZGVyLmN0b3JQYXJhbWV0ZXJzID0gKCkgPT4gWwogICAgICAgIHsgdHlwZTogRWxlbWVudFJlZiB9LAogICAgICAgIHsgdHlwZTogU3RvcmUgfQogICAgXTsKICAgIENhcmRMYXp5TG9hZGVyLnByb3BEZWNvcmF0b3JzID0gewogICAgICAgIGNhcmRJZDogW3sgdHlwZTogSW5wdXQsIGFyZ3M6IFsnY2FyZExhenlMb2FkZXInLF0gfV0sCiAgICAgICAgY2FyZE9ic2VydmVyOiBbeyB0eXBlOiBJbnB1dCB9XQogICAgfTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLyBDYXJkTGF6eUxvYWRlci7JtWZhYyA9IGZ1bmN0aW9uIENhcmRMYXp5TG9hZGVyX0ZhY3RvcnkodCkgeyByZXR1cm4gbmV3ICh0IHx8IENhcmRMYXp5TG9hZGVyKSjJ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IHJldHVybiAxOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChpc0RpZ2l0KHRhZ0FbYUluZGV4XSkgJiYgaXNEaWdpdCh0YWdCW2JJbmRleF0pKSB7CiAgICAgICAgICAgICAgICBjb25zdCBhTnVtYmVyU3RhcnQgPSBhSW5kZXg7CiAgICAgICAgICAgICAgICBjb25zdCBiTnVtYmVyU3RhcnQgPSBiSW5kZXg7CiAgICAgICAgICAgICAgICBhSW5kZXggPSBjb25zdW1lTnVtYmVyKHRhZ0EsIGFJbmRleCArIDEpOwogICAgICAgICAgICAgICAgYkluZGV4ID0gY29uc3VtZU51bWJlcih0YWdCLCBiSW5kZXggKyAxKTsKICAgICAgICAgICAgICAgIGNvbnN0IGFuID0gTnVtYmVyKHRhZ0Euc2xpY2UoYU51bWJlclN0YXJ0LCBhSW5kZXgpKTsKICAgICAgICAgICAgICAgIGNvbnN0IGJuID0gTnVtYmVyKHRhZ0Iuc2xpY2UoYk51bWJlclN0YXJ0LCBiSW5kZXgpKTsKICAgICAgICAgICAgICAgIGlmIChhbiA8IGJuKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC0xOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKGFuID4gYm4pIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gMTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChpc0JyZWFrKHRhZ0FbYUluZGV4XSkpIHsKICAgICAgICAgICAgICAgIGlmICghaXNCcmVhayh0YWdCW2JJbmRleF0pKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC0xOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKGlzQnJlYWsodGFnQltiSW5kZXhdKSkgewogICAgICAgICAgICAgICAgcmV0dXJuIDE7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAodGFnQVthSW5kZXhdIDwgdGFnQltiSW5kZXhdKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gLTE7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAodGFnQVthSW5kZXhdID4gdGFnQltiSW5kZXhdKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gMTsKICAgICAgICAgICAgfQogICAgICAgICAgICBhSW5kZXgrKzsKICAgICAgICAgICAgYkluZGV4Kys7CiAgICAgICAgfQogICAgfQogICAgLyoqCiAgICAgKiBSZXR1cm5zIGVuZEluZGV4IG9mIGEgbnVtYmVyIHNlcXVlbmNlIGluIHN0cmluZyBzdGFydGluZyBmcm9tIHN0YXJ0SW5kZXguCiAgICAgKgogICAgICogVGhlIG1ldGhvZCBjYW4gaGFuZGxlIHNjaWVudGlmaWMgbm90YXRpb24sIHJlYWwgYW5kIG5hdHVyYWwgbnVtYmVycywgYW5kCiAgICAgKiBudW1iZXJzIHdpdGggZXhwb25lbnRzLiBEbyBub3RlIHRoYXQgaXQgZG9lcyBub3QgdHJlYXQgZGVjaW1hbHMgdGhhdCBzdGFydAogICAgICogd2l0aCAiLiIgYXMgYSByZWFsIG51bWJlci4KICAgICAqLwogICAgZnVuY3Rpb24gY29uc3VtZU51bWJlcihzLCBzdGFydEluZGV4KSB7CiAgICAgICAgbGV0IFN0YXRlOwogICAgICAgIChmdW5jdGlvbiAoU3RhdGUpIHsKICAgICAgICAgICAgU3RhdGVbU3RhdGVbIk5BVFVSQUwiXSA9IDBdID0gIk5BVFVSQUwiOwogICAgICAgICAgICBTdGF0ZVtTdGF0ZVsiUkVBTCJdID0gMV0gPSAiUkVBTCI7CiAgICAgICAgICAgIFN0YXRlW1N0YXRlWyJFWFBPTkVOVF9TSUdOIl0gPSAyXSA9ICJFWFBPTkVOVF9TSUdOIjsKICAgICAgICAgICAgU3RhdGVbU3RhdGVbIkVYUE9ORU5UIl0gPSAzXSA9ICJFWFBPTkVOVCI7CiAgICAgICAgfSkoU3RhdGUgfHwgKFN0YXRlID0ge30pKTsKICAgICAgICBsZXQgc3RhdGUgPSBTdGF0ZS5OQVRVUkFMOwogICAgICAgIGxldCBpID0gc3RhcnRJbmRleDsKICAgICAgICBmb3IgKDsgaSA8IHMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgaWYgKHN0YXRlID09PSBTdGF0ZS5OQVRVUkFMKSB7CiAgICAgICAgICAgICAgICBpZiAoc1tpXSA9PT0gJy4nKSB7CiAgICAgICAgICAgICAgICAgICAgc3RhdGUgPSBTdGF0ZS5SRUFMOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAoc1tpXSA9PT0gJ2UnIHx8IHNbaV0gPT09ICdFJykgewogICAgICAgICAgICAgICAgICAgIHN0YXRlID0gU3RhdGUuRVhQT05FTlRfU0lHTjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKCFpc0RpZ2l0KHNbaV0pKSB7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoc3RhdGUgPT09IFN0YXRlLlJFQUwpIHsKICAgICAgICAgICAgICAgIGlmIChzW2ldID09PSAnZScgfHwgc1tpXSA9PT0gJ0UnKSB7CiAgICAgICAgICAgICAgICAgICAgc3RhdGUgPSBTdGF0ZS5FWFBPTkVOVF9TSUdOOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAoIWlzRGlnaXQoc1tpXSkpIHsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChzdGF0ZSA9PT0gU3RhdGUuRVhQT05FTlRfU0lHTikgewogICAgICAgICAgICAgICAgaWYgKGlzRGlnaXQoc1tpXSkgfHwgc1tpXSA9PT0gJysnIHx8IHNbaV0gPT09ICctJykgewogICAgICAgICAgICAgICAgICAgIHN0YXRlID0gU3RhdGUuRVhQT05FTlQ7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChzdGF0ZSA9PT0gU3RhdGUuRVhQT05FTlQpIHsKICAgICAgICAgICAgICAgIGlmICghaXNEaWdpdChzW2ldKSkgewogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiBpOwogICAgfQogICAgZnVuY3Rpb24gaXNEaWdpdChjaGFyYWN0ZXIpIHsKICAgICAgICByZXR1cm4gJzAnIDw9IGNoYXJhY3RlciAmJiBjaGFyYWN0ZXIgPD0gJzknOwogICAgfQogICAgZnVuY3Rpb24gaXNCcmVhayhjaGFyYWN0ZXIpIHsKICAgICAgICByZXR1cm4gY2hhcmFjdGVyID09PSAnLycgfHwgaXNEaWdpdChjaGFyYWN0ZXIpOwogICAgfQoKICAgIGNvbnN0IF9jMCRyID0gWyJwYW5lbCJdOwogICAgZnVuY3Rpb24gTWF0QXV0b2NvbXBsZXRlX25nX3RlbXBsYXRlXzBfVGVtcGxhdGUocmYsIGN0eCkgeyBpZiAocmYgJiAxKSB7CiAgICAgICAgybXJtWVsZW1lbnRTdGFydCgwLCAiZGl2IiwgMCwgMSk7CiAgICAgICAgybXJtXByb2plY3Rpb24oMik7CiAgICAgICAgybXJtWVsZW1lbnRFbmQoKTsKICAgIH0gaWYgKHJmICYgMikgewogICAgICAgIGNvbnN0IGN0eF9yMCA9IMm1ybVuZXh0Q29udGV4dCgpOwogICAgICAgIMm1ybVwcm9wZXJ0eSgiaWQiLCBjdHhfcjAuaWQpKCJuZ0NsYXNzIiwgY3R4X3IwLl9jbGFzc0xpc3QpOwogICAgfSB9CiAgICB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GxldGUtZGVmYXVsdC1vcHRpb25zJywgewogICAgICAgIHByb3ZpZGVkSW46ICdyb290JywKICAgICAgICBmYWN0b3J5OiBNQVRfQVVUT0NPTVBMRVRFX0RFRkFVTFRfT1BUSU9OU19GQUNUT1JZLAogICAgfSk7CiAgICAvKioKICAgICAqIFxAZG9jcy1wcml2YXRlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBNQVRfQVVUT0NPTVBMRVRFX0RFRkFVTFRfT1BUSU9OU19GQUNUT1JZKCkgewogICAgICAgIHJldHVybiB7IGF1dG9BY3RpdmVGaXJzdE9wdGlvbjogZmFsc2UgfTsKICAgIH0KICAgIGNsYXNzIE1hdEF1dG9jb21wbGV0ZSBleHRlbmRzIF9NYXRBdXRvY29tcGxldGVNaXhpbkJhc2UgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gX2NoYW5nZURldGVjdG9yUmVmCiAgICAgICAgICogQHBhcmFtIHs/fSBfZWxlbWVudFJlZgogICAgICAgICAqIEBwYXJhbSB7P30gZGVmYXVsdHMKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihfY2hhbmdlRGV0ZWN0b3JSZWYsIF9lbGVtZW50UmVmLCBkZWZhdWx0cykgewogICAgICAgICAgICBzdXBlcigpOwogICAgICAgICAgICB0aGlzLl9jaGFuZ2VEZXRlY3RvclJlZiA9IF9jaGFuZ2VEZXRlY3RvclJlZjsKICAgICAgICAgICAgdGhpcy5fZWxlbWVudFJlZiA9IF9lbGVtZW50UmVmOwogICAgICAgICAgICB0aGlzLl9hY3RpdmVPcHRpb25DaGFuZ2VzID0gU3Vic2NyaXB0aW9uLkVNUFRZOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogV2hldGhlciB0aGUgYXV0b2NvbXBsZXRlIHBhbmVsIHNob3VsZCBiZSB2aXNpYmxlLCBkZXBlbmRpbmcgb24gb3B0aW9uIGxlbmd0aC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuc2hvd1BhbmVsID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuX2lzT3BlbiA9IGZhbHNlOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRnVuY3Rpb24gdGhhdCBtYXBzIGFuIG9wdGlvbidzIGNvbnRyb2wgdmFsdWUgdG8gaXRzIGRpc3BsYXkgdmFsdWUgaW4gdGhlIHRyaWdnZXIuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmRpc3BsYXlXaXRoID0gbnVsbDsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEV2ZW50IHRoYXQgaXMgZW1pdHRlZCB3aGVuZXZlciBhbiBvcHRpb24gZnJvbSB0aGUgbGlzdCBpcyBzZWxlY3RlZC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMub3B0aW9uU2VsZWN0ZWQgPSBuZXcgRXZlbnRFbWl0dGVyKCk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBFdmVudCB0aGF0IGlzIGVtaXR0ZWQgd2hlbiB0aGUgYXV0b2NvbXBsZXRlIHBhbmVsIGlzIG9wZW5lZC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMub3BlbmVkID0gbmV3IEV2ZW50RW1pdHRlcigpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRXZlbnQgdGhhdCBpcyBlbWl0dGVkIHdoZW4gdGhlIGF1dG9jb21wbGV0ZSBwYW5lbCBpcyBjbG9zZWQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmNsb3NlZCA9IG5ldyBFdmVudEVtaXR0ZXIoKTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEVtaXRzIHdoZW5ldmVyIGFuIG9wdGlvbiBpcyBhY3RpdmF0ZWQgdXNpbmcgdGhlIGtleWJvYXJkLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5vcHRpb25BY3RpdmF0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SB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IGF1dG9BY3RpdmVGaXJzdE9wdGlvbih2YWx1ZSkgewogICAgICAgICAgICB0aGlzLl9hdXRvQWN0aXZlRmlyc3RPcHRpb24gPSBjb2VyY2VCb29sZWFuUHJvcGVydHkodmFsdWUpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBUYWtlcyBjbGFzc2VzIHNldCBvbiB0aGUgaG9zdCBtYXQtYXV0b2NvbXBsZXRlIGVsZW1lbnQgYW5kIGFwcGxpZXMgdGhlbSB0byB0aGUgcGFuZWwKICAgICAgICAgKiBpbnNpZGUgdGhlIG92ZXJsYXkgY29udGFpbmVyIHRvIGFsbG93IGZvciBlYXN5IHN0eWxpbmcuCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IGNsYXNzTGlzdCh2YWx1ZSkgewogICAgICAgICAgICBpZiAodmFsdWUgJiYgdmFsdWUubGVuZ3RoKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9jbGFzc0xpc3QgPSB2YWx1ZS5zcGxpdCgnICcpLnJlZHVjZSgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGNsYXNzTGlzdAogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjbGFzc05hbWUKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChjbGFzc0xpc3QsIGNsYXNzTmFtZSkgPT4gewogICAgICAgICAgICAgICAgICAgIGNsYXNzTGlzdFtjbGFzc05hbWUudHJpbSgpXSA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNsYXNzTGlzdDsKICAgICAgICAgICAgICAgIH0pLCAoLyoqIEB0eXBlIHs/fSAqLyAoe30pKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLl9jbGFzc0xpc3QgPSB7fTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9zZXRWaXNpYmlsaXR5Q2xhc3Nlcyh0aGlzLl9jbGFzc0xpc3QpOwogICAgICAgICAgICB0aGlzLl9lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQuY2xhc3NOYW1lID0gJyc7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdBZnRlckNvbnRlbnRJbml0KCkgewogICAgICAgICAgICB0aGlzLl9rZXlNYW5hZ2VyID0gbmV3IEFjdGl2ZURlc2NlbmRhbnRLZXlNYW5hZ2VyKHRoaXMub3B0aW9ucykud2l0aFdyYXAoKTsKICAgICAgICAgICAgdGhpcy5fYWN0aXZlT3B0aW9uQ2hhbmdlcyA9IHRoaXMuX2tleU1hbmFnZXIuY2hhbmdlLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gaW5kZXgKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGluZGV4ID0+IHsKICAgICAgICAgICAgICAgIHRoaXMub3B0aW9uQWN0aXZhdGVkLmVtaXQoeyBzb3VyY2U6IHRoaXMsIG9wdGlvbjogdGhpcy5vcHRpb25zLnRvQXJyYXkoKVtpbmRleF0gfHwgbnVsbCB9KTsKICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAvLyBTZXQgdGhlIGluaXRpYWwgdmlzaWJpbGl0eSBzdGF0ZS4KICAgICAgICAgICAgdGhpcy5fc2V0VmlzaWJpbGl0eSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25EZXN0cm95KCkgewogICAgICAgICAgICB0aGlzLl9hY3RpdmVPcHRpb25DaGFuZ2VzLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNldHMgdGhlIHBhbmVsIHNjcm9sbFRvcC4gVGhpcyBhbGxvd3MgdXMgdG8gbWFudWFsbHkgc2Nyb2xsIHRvIGRpc3BsYXkgb3B0aW9ucwogICAgICAgICAqIGFib3ZlIG9yIGJlbG93IHRoZSBmb2xkLCBhcyB0aGV5IGFyZSBub3QgYWN0dWFsbHkgYmVpbmcgZm9jdXNlZCB3aGVuIGFjdGl2ZS4KICAgICAgICAgKiBAcGFyYW0gez99IHNjcm9sbFRvcAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3NldFNjcm9sbFRvcChzY3JvbGxUb3ApIHsKICAgICAgICAgICAgaWYgKHRoaXMucGFuZWwpIHsKICAgICAgICAgICAgICAgIHRoaXMucGFuZWwubmF0aXZlRWxlbWVudC5zY3JvbGxUb3AgPSBzY3JvbGxUb3A7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0dXJucyB0aGUgcGFuZWwncyBzY3JvbGxUb3AuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZ2V0U2Nyb2xsVG9wKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5wYW5lbCA/IHRoaXMucGFuZWwubmF0aXZlRWxlbWVudC5zY3JvbGxUb3AgOiAwOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBQYW5lbCBzaG91bGQgaGlkZSBpdHNlbGYgd2hlbiB0aGUgb3B0aW9uIGxpc3QgaXMgZW1wdHkuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfc2V0VmlzaWJpbGl0eSgpIHsKICAgICAgICAgICAgdGhpcy5zaG93UGFuZWwgPSAhIXRoaXMub3B0aW9ucy5sZW5ndGg7CiAgICAgICAgICAgIHRoaXMuX3NldF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QgYnkgdHNjCiAgICAgKi8KICAgIC8qKgogICAgICogVGhlIGhlaWdodCBvZiBlYWNoIGF1dG9jb21wbGV0ZSBvcHRpb24uCiAgICAgKiBAdHlwZSB7P30KICAgICAqLwogICAgY29uc3QgQVVUT0NPTVBMRVRFX09QVElPTl9IRUlHSFQgPSA0ODsKICAgIC8qKgogICAgICogVGhlIHRvdGFsIGhlaWdodCBvZiB0aGUgYXV0b2NvbXBsZXRlIHBhbmVsLgogICAgICogQHR5cGUgez99CiAgICAgKi8KICAgIGNvbnN0IEFVVE9DT01QTEVURV9QQU5FTF9IRUlHSFQgPSAyNTY7CiAgICAvKioKICAgICAqIEluamVjdGlvbiB0b2tlbiB0aGF0IGRldGVybWluZXMgdGhlIHNjcm9sbCBoYW5kbGluZyB3aGlsZSB0aGUgYXV0b2NvbXBsZXRlIHBhbmVsIGlzIG9wZW4uCiAgICAgKiBAdHlwZSB7P30KICAgICAqLwogICAgY29uc3QgTUFUX0FVVE9DT01QTEVURV9TQ1JPTExfU1RSQVRFR1kgPSBuZXcgSW5qZWN0aW9uVG9rZW4oJ21hdC1hdXRvY29tcGxldGUtc2Nyb2xsLXN0cmF0ZWd5Jyk7CiAgICAvKioKICAgICAqIFxAZG9jcy1wcml2YXRlCiAgICAgKiBAcGFyYW0gez99IG92ZXJsYXkKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIE1BVF9BVVRPQ09NUExFVEVfU0NST0xMX1NUUkFURUdZX0ZBQ1RPUlkob3ZlcmxheSkgewogICAgICAgIHJldHVybiAoLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAoKSA9PiBvdmVybGF5LnNjcm9sbFN0cmF0ZWdpZXMucmVwb3NpdGlvbigpKTsKICAgIH0KICAgIC8qKgogICAgICogXEBkb2NzLXByaXZhdGUKICAgICAqIEB0eXBlIHs/fQogICAgICovCiAgICBjb25zdCBNQVRfQVVUT0NPTVBMRVRFX1NDU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lYC4gJyArCiAgICAgICAgICAgICdNYWtlIHN1cmUgdGhhdCB0aGUgaWQgcGFzc2VkIHRvIHRoZSBgbWF0QXV0b2NvbXBsZXRlYCBpcyBjb3JyZWN0IGFuZCB0aGF0ICcgKwogICAgICAgICAgICAneW91XCdyZSBhdHRlbXB0aW5nIHRvIG9wZW4gaXQgYWZ0ZXIgdGhlIG5nQWZ0ZXJDb250ZW50SW5pdCBob29rLicpOwogICAgfQogICAgY2xhc3MgTWF0QXV0b2NvbXBsZXRlVHJpZ2dlciB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBfZWxlbWVudAogICAgICAgICAqIEBwYXJhbSB7P30gX292ZXJsYXkKICAgICAgICAgKiBAcGFyYW0gez99IF92aWV3Q29udGFpbmVyUmVmCiAgICAgICAgICogQHBhcmFtIHs/fSBfem9uZQogICAgICAgICAqIEBwYXJhbSB7P30gX2NoYW5nZURldGVjdG9yUmVmCiAgICAgICAgICogQHBhcmFtIHs/fSBzY3JvbGxTdHJhdGVneQogICAgICAgICAqIEBwYXJhbSB7P30gX2RpcgogICAgICAgICAqIEBwYXJhbSB7P30gX2Zvcm1GaWVsZAogICAgICAgICAqIEBwYXJhbSB7P30gX2RvY3VtZW50CiAgICAgICAgICogQHBhcmFtIHs/PX0gX3ZpZXdwb3J0UnVsZXIKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihfZWxlbWVudCwgX292ZXJsYXksIF92aWV3Q29udGFpbmVyUmVmLCBfem9uZSwgX2NoYW5nZURldGVjdG9yUmVmLCBzY3JvbGxTdHJhdGVneSwgX2RpciwgX2Zvcm1GaWVsZCwgX2RvY3VtZW50LCBfdmlld3BvcnRSdWxlcikgewogICAgICAgICAgICB0aGlzLl9lbGVtZW50ID0gX2VsZW1lbnQ7CiAgICAgICAgICAgIHRoaXMuX292ZXJsYXkgPSBfb3ZlcmxheTsKICAgICAgICAgICAgdGhpcy5fdmlld0NvbnRhaW5lclJlZiA9IF92aWV3Q29udGFpbmVyUmVmOwogICAgICAgICAgICB0aGlzLl96b25lID0gX3pvbmU7CiAgICAgICAgICAgIHRoaXMuX2NoYW5nZURldGVjdG9yUmVmID0gX2NoYW5nZURldGVjdG9yUmVmOwogICAgICAgICAgICB0aGlzLl9kaXIgPSBfZGlyOwogICAgICAgICAgICB0aGlzLl9mb3JtRmllbGQgPSBfZm9ybUZpZWxkOwogICAgICAgICAgICB0aGlzLl9kb2N1bWVudCA9IF9kb2N1bWVudDsKICAgICAgICAgICAgdGhpcy5fdmlld3BvcnRSdWxlciA9IF92aWV3cG9ydFJ1bGVyOwogICAgICAgICAgICB0aGlzLl9jb21wb25lbnREZXN0cm95ZWQgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5fYXV0b2NvbXBsZXRlRGlzYWJsZWQgPSBmYWxzZTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFdoZXRoZXIgb3Igbm90IHRoZSBsYWJlbCBzdGF0ZSBpcyBiZWluZyBvdmVycmlkZGVuLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fbWFudWFsbHlGbG9hdGluZ0xhYmVsID0gZmFsc2U7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBTdWJzY3JpcHRpb24gdG8gdmlld3BvcnQgc2l6ZSBjaGFuZ2VzLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fdmlld3BvcnRTdWJzY3JpcHRpb24gPSBTdWJzY3JpcHRpb24uRU1QVFk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBXaGV0aGVyIHRoZSBhdXRvY29tcGxldGUgY2FuIG9wZW4gdGhlIG5leHQgdGltZSBpdCBpcyBmb2N1c2VkLiBVc2VkIHRvIHByZXZlbnQgYSBmb2N1c2VkLAogICAgICAgICAgICAgKiBjbG9zZWQgYXV0b2NvbXBsZXRlIGZyb20gYmVpbmcgcmVvcGVuZWQgaWYgdGhlIHVzZXIgc3dpdGNoZXMgdG8gYW5vdGhlciBicm93c2VyIHRhYiBhbmQgdGhlbgogICAgICAgICAgICAgKiBjb21lcyBiYWNrLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fY2FuT3Blbk9uTmV4dEZvY3VzID0gdHJ1ZTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFN0cmVhbSBvZiBrZXlib2FyZCBldmVudHMgdGhhdCBjYW4gY2xvc2UgdGhlIHBhbmVsLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fY2xvc2VLZXlFdmVudFN0cmVhbSA9IG5ldyBTdWJqZWN0KCk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBFdmVudCBoYW5kbGVyIGZvciB3aGVuIHRoZSB3aW5kb3cgaXMgYmx1cnJlZC4gTmVlZHMgdG8gYmUgYW4KICAgICAgICAgICAgICogYXJyb3cgZnVuY3Rpb24gaW4gb3JkZXIgdG8gcHJlc2VydmUgdGhlIGNvbnRleHQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl93aW5kb3dCbHVySGFuZGxlciA9ICgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIC8vIElmIHRoZSB1c2VyIGJsdXJyZWQgdGhlIHdpbmRvdyB3aGlsZSB0aGUgYXV0b2NvbXBsZXRlIGlzIGZvY3VzZWQsIGl0IG1lYW5zIHRoYXQgaXQnbGwgYmUKICAgICAgICAgICAgICAgIC8vIHJlZm9jdXNlZCB3aGVuIHRoZXkgY29tZSBiYWNrLiBJbiB0aGlzIGNhc2Ugd2Ugd2FudCB0byBza2lwIHRoZSBmaXJzdCBmb2N1cyBldmVudCwgaWYgdGhlCiAgICAgICAgICAgICAgICAvLyBwYW5lIHdhcyBjbG9zZWQsIGluIG9yZGVyIHRvIGF2b2lkIHJlb3BlbmluZyBpdCB1bmludGVudGlvbmFsbHkuCiAgICAgICAgICAgICAgICB0aGlzLl9jYW5PcGVuT25OZXh0Rm9jdXMgPQogICAgICAgICAgICAgICAgICAgIHRoaXMuX2RvY3VtZW50LmFjdGl2ZUVsZW1lbnQgIT09IHRoaXMuX2VsZW1lbnQubmF0aXZlRWxlbWVudCB8fCB0aGlzLnBhbmVsT3BlbjsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBgVmlldyAtPiBtb2RlbCBjYWxsYmFjayBjYWxsZWQgd2hlbiB2YWx1ZSBjaGFuZ2VzYAogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fb25DaGFuZ2UgPSAoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7IH0pOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogYFZpZXcgLT4gbW9kZWwgY2FsbGJhY2sgY2FsbGVkIHdoZW4gYXV0b2NvbXBsZXRlIGhhcyBiZWVuIHRvdWNoZWRgCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9vblRvdWNoZWQgPSAoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7IH0pOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogUG9zaXRpb24gb2YgdGhlIGF1dG9jb21wbGV0ZSBwYW5lbCByZWxhdGl2ZSB0byB0aGUgdHJpZ2dlciBlbGVtZW50LiBBIHBvc2l0aW9uIG9mIGBhdXRvYAogICAgICAgICAgICAgKiB3aWxsIHJlbmRlciB0aGUgcGFuZWwgdW5kZXJuZWF0aCB0aGUgdHJpZ2dlciBpZiB0aGVyZSBpcyBlbm91Z2ggc3BhY2UgZm9yIGl0IHRvIGZpdCBpbgogICAgICAgICAgICAgKiB0aGUgdmlld3BvcnQsIG90aGVyd2lzZSB0aGUgcGFuZWwgd2lsbCBiZSBzaG93biBhYm92ZSBpdC4gSWYgdGhlIHBvc2l0aW9uIGlzIHNldCB0bwogICAgICAgICAgICAgKiBgYWJvdmVgIG9yIGBiZWxvd2AsIHRoZSBwYW5lbCB3aWxsIGFsd2F5cyBiZSBzaG93biBhYm92ZSBvciBiZWxvdyB0aGUgdHJpZ2dlci4gbm8gbWF0dGVyCiAgICAgICAgICAgICAqIHdoZXRoZXIgaXQgZml0cyBjb21wbGV0ZWx5IGluIHRoZSB2aWV3cG9ydC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMucG9zaXRpb24gPSAnYXV0byc7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBgYXV0b2NvbXBsZXRlYCBhdHRyaWJ1dGUgdG8gYmUgc2V0IG9uIHRoZSBpbnB1dCBlbGVtZW50LgogICAgICAgICAgICAgKiBcQGRvY3MtcHJpdmF0ZQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5hdXRvY29tcGxldGVBdHRyaWJ1dGUgPSAnb2ZmJzsKICAgICAgICAgICAgdGhpcy5fb3ZlcmxheUF0dGFjaGVkID0gZmFsc2U7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBTdHJlYW0gb2YgYXV0b2NvbXBsZXRlIG9wdGlvbiBzZWxlY3Rpb25zLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5vcHRpb25TZWxlY3Rpb25zID0gKC8qKiBAdHlwZSB7P30gKi8gKGRlZmVyKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIGlmICh0aGlzLmF1dG9jb21wbGV0ZSAmJiB0aGlzLmF1dG9jb21wbGV0ZS5vcHRpb25zKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG1lcmdlKC4uLnRoaXMuYXV0b2NvbXBsZXRlLm9wdGlvbnMubWFwKCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IG9wdGlvbgogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgb3B0aW9uID0+IG9wdGlvbi5vblNlbGVjdGlvbkNoYW5nZSkpKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vIElmIHRoZXJlIGFyZSBhbnkgc3Vic2NyaWJlcnMgYmVmb3JlIGBuZ0FmdGVyVmlld0luaXRgLCB0aGUgYGF1dG9jb21wbGV0ZWAgd2lsbCBiZSB1bmRlZmluZWQuCiAgICAgICAgICAgICAgICAvLyBSZXR1cm4gYSBzdHJlYW0gdGhhdCB3ZSdsbCByZXBsYWNlIHdpdGggdGhlIHJlYWwgb25lIG9uY2UgZXZlcnl0aGluZyBpcyBpbiBwbGFjZS4KICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl96b25lLm9uU3RhYmxlCiAgICAgICAgICAgICAgICAgICAgLmFzT2JzZXJ2YWJsZSgpCiAgICAgICAgICAgICAgICAgICAgLnBpcGUodGFrZSgxKSwgc3dpdGNoTWFwKCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHRoaXMub3B0aW9uU2VsZWN0aW9ucykpKTsKICAgICAgICAgICAgfSkpKSk7CiAgICAgICAgICAgIHRoaXMuX3Njcm9sbFN0cmF0ZWd5ID0gc2Nyb2xsU3RyYXRlZ3k7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFdoZXRoZXIgdGhlIGF1dG9jb21wbGV0ZSBpcyBkaXNhYmxlZC4gV2hlbiBkaXNhYmxlZCwgdGhlIGVsZW1lbnQgd2lsbAogICAgICAgICAqIGFjdCBhcyBhIHJlZ3VsYXIgaW5wdXQgYW5kIHRoZSB1c2VyIHdvbid0IGJlIGFibGUgdG8gb3BlbiB0aGUgcGFuZWwuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgYXV0b2NvbXBsZXRlRGlzYWJsZWQoKSB7IHJldHVybiB0aGlzLl9hdXRvY29tcGxldGVEaXNhYmxlZDsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBhdXRvY29tcGxldGVEaXNhYmxlZCh2YWx1ZSkgewogICAgICAgICAgICB0aGlzLl9hdXRvY29tcGxldGVEaXNhYmxlZCA9IGNvZXJjZUJvb2xlYW5Qcm9wZXJ0eSh2YWx1ZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdBZnRlclZpZXdJbml0KCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHdpbmRvdyA9IHRoaXMuX2dldFdpbmRvdygpOwogICAgICAgICAgICBpZiAodHlwZW9mIHdpbmRvdyAhPT0gJ3VuZGVmaW5lZCcpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3pvbmUucnVuT3V0c2lkZUFuZ3VsYXIoKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoJ2JsdXInLCB0aGlzLl93aW5kb3dCbHVySGFuZGxlcikpKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGNoYW5nZXMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25DaGFuZ2VzKGNoYW5nZXMpIHsKICAgICAgICAgICAgaWYgKGNoYW5nZXNbJ3Bvc2l0aW9uJ10gJiYgdGhpcy5fcG9zaXRpb25TdHJhdGVneSkgewogICAgICAgICAgICAgICAgdGhpcy5fc2V0U3RyYXRlZ3lQb3NpdGlvbnModGhpcy5fcG9zaXRpb25TdHJhdGVneSk7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5wYW5lbE9wZW4pIHsKICAgICAgICAgICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5fb3ZlcmxheVJlZikpLnVwZGF0ZVBvc2l0aW9uKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uRGVzdHJveSgpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB3aW5kb3cgPSB0aGlzLl9nZXRXaW5kb3coKTsKICAgICAgICAgICAgaWYgKHR5cGVvZiB3aW5kb3cgIT09ICd1bmRlZmluZWQnKSB7CiAgICAgICAgICAgICAgICB3aW5kb3cucmVtb3ZlRXZlbnRMaXN0ZW5lcignYmx1cicsIHRoaXMuX3dpbmRvd0JsdXJIYW5kbGVyKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl92aWV3cG9ydFN1YnNjcmlwdGlvbi51bnN1YnNjcmliZSgpOwogICAgICAgICAgICB0aGlzLl9jb21wb25lbnREZXN0cm95ZWQgPSB0cnVlOwogICAgICAgICAgICB0aGlzLl9kZXN0cm95UGFuZWwoKTsKICAgICAgICAgICAgdGhpcy5fY2xvc2VLZXlFdmVudFN0cmVhbS5jb21wbGV0ZSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGV0aGVyIG9yIG5vdCB0aGUgYXV0b2NvbXBsZXRlIHBhbmVsIGlzIG9wZW4uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgcGFuZWxPcGVuKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fb3ZlcmxheUF0dGFjaGVkICYmIHRoaXMuYXV0b2NvbXBsZXRlLnNob3dQYW5lbDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogT3BlbnMgdGhlIGF1dG9jb21wbGV0ZSBzdWdnZXN0aW9uIHBhbmVsLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb3BlblBhbmVsKCkgewogICAgICAgICAgICB0aGlzLl9hdHRhY2hPdmVybGF5KCk7CiAgICAgICAgICAgIHRoaXMuX2Zsb2F0TGFiZWwoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ2xvc2VzIHRoZSBhdXRvY29tcGxldGUgc3VnZ2VzdGlvbiBwYW5lbC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGNsb3NlUGFuZWwoKSB7CiAgICAgICAgICAgIHRoaXMuX3Jlc2V0TGFiZWwoKTsKICAgICAgICAgICAgaWYgKCF0aGlzLl9vdmVybGF5QXR0YWNoZWQpIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5wYW5lbE9wZW4pIHsKICAgICAgICAgICAgICAgIC8vIE9ubHkgZW1pdCBpZiB0aGUgcGFuZWwgd2FzIHZpc2libGUuCiAgICAgICAgICAgICAgICB0aGlzLmF1dG9jb21wbGV0ZS5jbG9zZWQuZW1pdCgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuYXV0b2NvbXBsZXRlLl9pc09wZW4gPSB0aGlzLl9vdmVybGF5QXR0YWNoZWQgPSBmYWxzZTsKICAgICAgICAgICAgaWYgKHRoaXMuX292ZXJsYXlSZWYgJiYgdGhpcy5fb3ZlcmxheVJlZi5oYXNBdHRhY2hlZCgpKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9vdmVybGF5UmVmLmRldGFjaCgpOwogICAgICAgICAgICAgICAgdGhpcy5fY2xvc2luZ0Fj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kgewogICAgICAgICAgICBpZiAodGhpcy5fb3ZlcmxheUF0dGFjaGVkKSB7CiAgICAgICAgICAgICAgICAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy5fb3ZlcmxheVJlZikpLnVwZGF0ZVBvc2l0aW9uKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQSBzdHJlYW0gb2YgYWN0aW9ucyB0aGF0IHNob3VsZCBjbG9zZSB0aGUgYXV0b2NvbXBsZXRlIHBhbmVsLCBpbmNsdWRpbmcKICAgICAgICAgKiB3aGVuIGFuIG9wdGlvbiBpcyBzZWxlY3RlZCwgb24gYmx1ciwgYW5kIHdoZW4gVEFCIGlzIHByZXNzZWQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgcGFuZWxDbG9zaW5nQWN0aW9ucygpIHsKICAgICAgICAgICAgcmV0dXJuIG1lcmdlKHRoaXMub3B0aW9uU2VsZWN0aW9ucywgdGhpcy5hdXRvY29tcGxldGUuX2tleU1hbmFnZXIudGFiT3V0LnBpcGUoZmlsdGVyKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHRoaXMuX292ZXJsYXlBdHRhY2hlZCkpKSwgdGhpcy5fY2xvc2VLZXlFdmVudFN0cmVhbSwgdGhpcy5fZ2V0T3V0c2lkZUNsaWNrU3RyZWFtKCksIHRoaXMuX292ZXJsYXlSZWYgPwogICAgICAgICAgICAgICAgdGhpcy5fb3ZlcmxheVJlZi5kZXRhY2htZW50cygpLnBpcGUoZmlsdGVyKCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHRoaXMuX292ZXJsYXlBdHRhY2hlZCkpKSA6CiAgICAgICAgICAgICAgICBvZigpKS5waXBlKAogICAgICAgICAgICAvLyBOb3JtYWxpemUgdGhlIG91dHB1dCBzbyB3ZSByZXR1cm4gYSBjb25zaXN0ZW50IHR5cGUuCiAgICAgICAgICAgIG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGV2ZW50ID0+IGV2ZW50IGluc3RhbmNlb2YgTWF0T3B0aW9uU2VsZWN0aW9uQ2hhbmdlID8gZXZlbnQgOiBudWxsKSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBUaGUgY3VycmVudGx5IGFjdGl2ZSBvcHRpb24sIGNvZXJjZWQgdG8gTWF0T3B0aW9uIHR5cGUuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgYWN0aXZlT3B0aW9uKCkgewogICAgICAgICAgICBpZiAodGhpcy5hdXRvY29tcGxldGUgJiYgdGhpcy5hdXRvY29tcGxldGUuX2tleU1hbmFnZXIpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmF1dG9jb21wbGV0ZS5fa2V5TWFuYWdlci5hY3RpdmVJdGVtOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBTdHJlYW0gb2YgY2xpY2tzIG91dHNpZGUgb2YgdGhlIGF1dG9jb21wbGV0ZSBwYW5lbC4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2dldE91dHNpZGVDbGlja1N0cmVhbSgpIHsKICAgICAgICAgICAgcmV0dXJuIG1lcmdlKCgvKiogQHR5cGUgez99ICovIChmcm9tRXZlbnQodGhpcy5fZG9jdW1lbnQsICdjbGljaycpKSksICgvKiogQHR5cGUgez99ICovIChmcm9tRXZlbnQodGhpcy5fZG9jdW1lbnQsICd0b3VjaGVuZCcpKSkpCiAgICAgICAgICAgICAgICAucGlwZShmaWx0ZXIoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBldmVudCA9PiB7CiAgICAgICAgICAgICAgICAvLyBJZiB3ZSdyZSBpbiB0aGUgU2hhZG93IERPTSwgdGhlIGV2ZW50IHRhcmdldCB3aWxsIGJlIHRoZSBzaGFkb3cgcm9vdCwgc28gd2UgaGF2ZSB0bwogICAgICAgICAgICAgICAgLy8gZmFsbCBiYWNrIHRvIGNoZWNrIHRoZSBmaXJzdCBlbGVtZW50IGluIHRoZSBwYXRoIG9mIHRoZSBjbGljayBldmVudC4KICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGNsaWNrVGFyZ2V0ID0gKC8qKiBAdHlwZSB7P30gKi8gKCh0aGlzLl9pc0luc2lkZVNoYWRvd1Jvb3QgJiYgZXZlbnQuY29tcG9zZWRQYXRoID8gZXZlbnQuY29tcG9zZWRQYXRoKClbMF0gOgogICAgICAgICAgICAgICAgICAgIGV2ZW50LnRhcmdldCkpKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGZvcm1GaWVsZCA9IHRoaXMuX2Zvcm1GaWVsZCA/IHRoaXMuX2Zvcm1GaWVsZC5fZWxlbWVudFJlZi5uYXRpdmVFbGVtZW50IDogbnVsbDsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9vdmVybGF5QXR0YWNoZWQgJiYgY2xpY2tUYXJnZXQgIT09IHRoaXMuX2VsZW1lbnQubmF0aXZlRWxlbWVudCAmJgogICAgICAgICAgICAgICAgICAgICghZm9ybUZpZWxkIHx8ICFmb3JtRmllbGQuY29udGFpbnMoY2xpY2tUYXJnZXQpKSAmJgogICAgICAgICAgICAgICAgICAgICghIXRoaXMuX292ZXJsYXlSZWYgJiYgIXRoaXMuX292ZXJsYXlSZWYub3ZlcmxheUVsZW1lbnQuY29udGFpbnMoY2xpY2tUYXJnZXQpKTsKICAgICAgICAgICAgfSkpKTsKICAgICAgICB9CiAgICAgICAgLy8gSW1wbGVtZW50ZWQgYXMgcGFydCBvZiBDb250cm9sVmFsdWVBY2Nlc3Nvci4KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB3cml0ZVZhbHVlKHZhbHVlKSB7CiAgICAgICAgICAgIFByb21pc2UucmVzb2x2ZShudWxsKS50aGVuKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHRoaXMuX3NldFRyaWdnZXJWYWx1ZSh2YWx1ZSkpKTsKICAgICAgICB9CiAgICAgICAgLy8gSW1wbGVtZW50ZWQgYXMgcGFydCBvZiBDb250cm9sVmFsdWVBY2Nlc3Nvci4KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGZuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZWdpc3Rlck9uQ2hhbmdlKGZuKSB7CiAgICAgICAgICAgIHRoaXMuX29uQ2hhbmdlID0gZm47CiAgICAgICAgfQogICAgICAgIC8vIEltcGxlbWVudGVkIGFzIHBhcnQgb2YgQ29udHJvbFZhbHVlQWNjZXNzb3IuCiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVnaXN0ZXJPblRvdWNoZWQoZm4pIHsKICAgICAgICAgICAgdGhpcy5fb25Ub3VjaGVkID0gZm47CiAgICAgICAgfQogICAgICAgIC8vIEltcGxlbWVudGVkIGFzIHBhcnQgb2YgQ29udHJvbFZhbHVlQWNjZXNzb3IuCiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBpc0Rpc2FibGVkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXREaXNhYmxlZFN0YXRlKGlzRGlzYWJsZWQpIHsKICAgICAgICAgICAgdGhpcy5fZWxlbWVudC5uYXRpdmVFbGVtZW50LmRpc2FibGVkID0gaXNEaXNhYmxlZDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBldmVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2hhbmRsZUtleWRvd24oZXZlbnQpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBrZXlDb2RlID0gZXZlbnQua2V5Q29kZTsKICAgICAgICAgICAgLy8gUHJldmVudCB0aGUgZGVmYXVsdCBhY3Rpb24gb24gYWxsIGVzY2FwZSBrZXkgcHJlc3Nlcy4gVGhpcyBpcyBoZXJlIHByaW1hcmlseSB0byBicmluZyBJRQogICAgICAgICAgICAvLyBpbiBsaW5lIHdpdGggb3RoZXIgYnJvd3NlcnMuIEJ5IGRlZmF1bHQsIHByZXNzaW5nIGVzY2FwZSBvbiBJRSB3aWxsIGNhdXNlIGl0IHRvIHJldmVydAogICAgICAgICAgICAvLyB0aGUgaW5wdXQgdmFsdWUgdG8gdGhlIG9uZSB0aGF0IGl0IGhhZCBvbiBmb2N1cywgaG93ZXZlciBpdCB3b24ndCBkaXNwYXRjaCBhbnkgZXZlbnRzCiAgICAgICAgICAgIC8vIHdoaWNoIG1lYW5zIHRoYXQgdGhlIG1vZGVsIHZhbHVlIHdpbGwgYmUgb3V0IG9mIHN5bmMgd2l0aCB0aGUgdmlldy4KICAgICAgICAgICAgaWYgKGtleUNvZGUgPT09IEVTQ0FQRSkgewogICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5hY3RpdmVPcHRpb24gJiYga2V5Q29kZSA9PT0gRU5URVIgJiYgdGhpcy5wYW5lbE9wZW4pIHsKICAgICAgICAgICAgICAgIHRoaXMuYWN0aXZlT3B0aW9uLl9zZWxlY3RWaWFJbnRlcmFjdGlvbigpOwogICAgICAgICAgICAgICAgdGhpcy5fcmVzZXRBY3RpdmVJdGVtKCk7CiAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKHRoaXMuYXV0b2NvbXBsZXRlKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBwcmV2QWN0aXZlSXRlbSA9IHRoaXMuYXV0b2NvbXBsZXRlLl9rZXlNYW5hZ2VyLmFjdGl2ZUl0ZW07CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBpc0Fycm93S2V5ID0ga2V5Q29kZSA9PT0gVVBfQVJST1cgfHwga2V5Q29kZSA9PT0gRE9XTl9BUlJPVzsKICAgICAgICAgICAgICAgIGlmICh0aGlzLnBhbmVsT3BlbiB8fCBrZXlDb2RlID09PSBUQUIpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLmF1dG9jb21wbGV0ZS5fa2V5TWFuYWdlci5vbktleWRvd24oZXZlbnQpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAoaXNBcnJvd0tleSAmJiB0aGlzLl9jYW5PcGVuKCkpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLm9wZW5QYW5lbCgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKGlzQXJyb3dLZXkgfHwgdGhpcy5hdXRvY29tcGxldGUuX2tleU1hbmFnZXIuYWN0aXZlSXRlbSAhPT0gcHJldkFjdGl2ZUl0ZW0pIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9zY3JvbGxUb09wdGlvbigpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9oYW5kbGVJbnB1dChldmVudCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCB0YXJnZXQgPSAoLyoqIEB0eXBlIHs/fSAqLyAoZXZlbnQudGFyZ2V0KSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHZhbHVlID0gdGFyZ2V0LnZhbHVlOwogICAgICAgICAgICAvLyBCYXNlZCBvbiBgTnVtYmVyVmFsdWVBY2Nlc3NvcmAgZnJvbSBmb3Jtcy4KICAgICAgICAgICAgaWYgKHRhcmdldC50eXBlID09PSAnbnVtYmVyJykgewogICAgICAgICAgICAgICAgdmFsdWUgPSB2YWx1ZSA9PSAnJyA/IG51bGwgOiBwYXJzZUZsb2F0KHZhbHVlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBJZiB0aGUgaW5wdXQgaGFzIGEgcGxhY2Vob2xkZXIsIElFIHdpbGwgZmlyZSB0aGUgYGlucHV0YCBldmVudCBvbiBwYWdlIGxvYWQsCiAgICAgICAgICAgIC8vIGZvY3VzIGFuZCBibHVyLCBpbiBhZGRpdGlvbiB0byB3aGVuIHRoZSB1c2VyIGFjdHVhbGx5IGNoYW5nZWQgdGhlIHZhbHVlLiBUbwogICAgICAgICAgICAvLyBmaWx0ZXIgb3V0IGFsbCBvZiB0aGUgZXh0cmEgZXZlbnRzLCB3ZSBzYXZlIHRoZSB2YWx1ZSBvbiBmb2N1cyBhbmQgYmV0d2VlbgogICAgICAgICAgICAvLyBgaW5wdXRgIGV2ZW50cywgYW5kIHdlIGNoZWNrIHdoZXRoZXIgaXQgY2hhbmdlZC4KICAgICAgICAgICAgLy8gU2VlOiBodHRwczovL2Nvbm5lY3QubWljcm9zb2Z0LmNvbS9JRS9mZWVkYmFjay9kZXRhaWxzLzg4NTc0Ny8KICAgICAgICAgICAgaWYgKHRoaXMuX3ByZXZpb3VzVmFsdWUgIT09IHZhbHVlKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9wcmV2aW91c1ZhbHVlID0gdmFsdWU7CiAgICAgICAgICAgICAgICB0aGlzLl9vbkNoYW5nZSh2YWx1ZSk7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5fY2FuT3BlbigpICYmIHRoaXMuX2RvY3VtZW50LmFjdGl2ZUVsZW1lbnQgPT09IGV2ZW50LnRhcmdldCkgewogICAgICAgICAgICAgICAgICAgIHRoaXMub3BlblBhbmVsKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfaGFuZGxlRm9jdXMoKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5fY2FuT3Blbk9uTmV4dEZvY3VzKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9jYW5PcGVuT25OZXh0Rm9jdXMgPSB0cnVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKHRoaXMuX2Nhbk9wZW4oKSkgewogICAgICAgICAgICAgICAgdGhpcy5fcHJldmlvdXNWYWx1ZSA9IHRoaXMuX2VsZW1lbnQubmF0aXZlRWxlbWVudC52YWx1ZTsKICAgICAgICAgICAgICAgIHRoaXMuX2F0dGFjaE92ZXJsYXkoKTsKICAgICAgICAgICAgICAgIHRoaXMuX2Zsb2F0TGFiZWwodHJ1ZSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogSW4gImF1dG8iIG1vZGUsIHRoZSBsYWJlbCB3aWxsIGFuaW1hdGUgZG93biBhcyBzb29uIGFzIGZvY3VzIG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gICAgIC5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBldmVudCA9PiB0aGlzLl9zZXRWYWx1ZUFuZENsb3NlKGV2ZW50KSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBEZXN0cm95cyB0aGUgYXV0b2NvbXBsZXRlIHN1Z2dlc3Rpb24gcGFuZWwuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9kZXN0cm95UGFuZWwoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLl9vdmVybGF5UmVmKSB7CiAgICAgICAgICAgICAgICB0aGlzLmNsb3NlUGFuZWwoKTsKICAgICAgICAgICAgICAgIHRoaXMuX292ZXJsYXlSZWYuZGlzcG9zZSgpOwogICAgICAgICAgICAgICAgdGhpcy5fb3ZlcmxheVJlZiA9IG51bGw7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfc2V0VHJpZ2dlclZhbHVlKHZhbHVlKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdG9EaXNwbGF5ID0gdGhpcy5hdXRvY29tcGxldGUgJiYgdGhpcy5hdXRvY29tcGxldGUuZGlzcGxheVdpdGggPwogICAgICAgICAgICAgICAgdGhpcy5hdXRvY29tcGxldGUuZGlzcGxheVdpdGgodmFsdWUpIDoKICAgICAgICAgICAgICAgIHZhbHVlOwogICAgICAgICAgICAvLyBTaW1wbHkgZmFsbGluZyBiYWNrIHRvIGFuIGVtcHR5IHN0cmluZyBpZiB0aGUgZGlzcGxheSB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ludGVyYWN0aW9uCiAgICAgICAgICogc3RlbW1lZCBmcm9tIHRoZSB1c2VyLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBldmVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3NldFZhbHVlQW5kQ2xvc2UoZXZlbnQpIHsKICAgICAgICAgICAgaWYgKGV2ZW50ICYmIGV2ZW50LnNvdXJjZSkgewogICAgICAgICAgICAgICAgdGhpcy5fY2xlYXJQcmV2aW91c1NlbGVjdGVkT3B0aW9uKGV2ZW50LnNvdXJjZSk7CiAgICAgICAgICAgICAgICB0aGlzLl9zZXRUcmlnZ2VyVmFsdWUoZXZlbnQuc291cmNlLnZhbHVlKTsKICAgICAgICAgICAgICAgIHRoaXMuX29uQ2hhbmdlKGV2ZW50LnNvdXJjZS52YWx1ZSk7CiAgICAgICAgICAgICAgICB0aGlzLl9lbGVtZW50Lm5hdGl2ZUVsZW1lbnQuZm9jdXMoKTsKICAgICAgICAgICAgICAgIHRoaXMuYXV0b2NvbXBsZXRlLl9lbWl0U2VsZWN0RXZlbnQoZXZlbnQuc291cmNlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLmNsb3NlUGFuZWwoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ2xlYXIgYW55IHByZXZpb3VzIHNlbGVjdGVkIG9wdGlvbiBhbmQgZW1pdCBhIHNlbGVjdGlvbiBjaGFuZ2UgZXZlbnQgZm9yIHRoaXMgb3B0aW9uCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHNraXAKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9jbGVhclByZXZpb3VzU2VsZWN0ZWRPcHRpb24oc2tpcCkgewogICAgICAgICAgICB0aGlzLmF1dG9jb21wbGV0ZS5vcHRpb25zLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IG9wdGlvbgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgb3B0aW9uID0+IHsKICAgICAgICAgICAgICAgIGlmIChvcHRpb24gIT0gc2tpcCAmJiBvcHRpb24uc2VsZWN0ZWQpIHsKICAgICAgICAgICAgICAgICAgICBvcHRpb24uZGVzZWxlY3QoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2F0dGFjaE92ZXJsYXkoKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5hdXRvY29tcGxldGUpIHsKICAgICAgICAgICAgICAgIHRocm93IGdldE1hdEF1dG9jb21wbGV0ZU1pc3NpbmdQYW5lbEVycm9yKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gV2Ugd2FudCB0byByZXNvbHZlIHRoaXMgb25jZSwgYXMgbGF0ZSBhcyBwb3NzaWJsZSBzbyB0aGF0IHdlIGNhbiBiZQogICAgICAgICAgICAvLyBzdXJlIHRoYXQgdGhlIGVsZW1lbnQgaGFzIGJlZW4gbW92ZWQgaW50byBpdHMgZmluYWwgcGxhY2UgaW4gdGhlIERPTS4KICAgICAgICAgICAgaWYgKHRoaXMuX2lzSW5zaWRlU2hhZG93Um9vdCA9PSBudWxsKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9pc0luc2lkZVNoYWRvd1Jvb3QgPSAhIV9nZXRTaGFkb3dSb290KHRoaXMuX2VsZW1lbnQubmF0aXZlRWxlbWVudCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgb3ZlcmxheVJlZiA9IHRoaXMuX292ZXJsYXlSZWY7CiAgICAgICAgICAgIGlmICghb3ZlcmxheVJlZikgewogICAgICAgICAgICAgICAgdGhpcy5fcG9ydGFsID0gbmV3IFRlbXBsYXRlUG9ydGFsKHRoaXMuYXV0b2NvbXBsZXRlLnRlbXBsYXRlLCB0aGlzLl92aWV3Q29udGFpbmVyUmVmKTsKICAgICAgICAgICAgICAgIG92ZXJsYXlSZWYgPSB0aGlzLl9vdmVybGF5LmNyZWF0ZSh0aGlzLl9nZXRPdmVybGF5Q29uZmlnKCkpOwogICAgICAgICAgICAgICAgdGhpcy5fb3ZlcmxheVJlZiA9IG92ZXJsYXlSZWY7CiAgICAgICAgICAgICAgICAvLyBVc2UgdGhlIGBrZXlkb3duRXZlbnRzYCBpbiBvcmRlciB0byB0YWtlIGFkdmFudGFnZSBvZgogICAgICAgICAgICAgICAgLy8gdGhlIG92ZXJsYXkgZXZlbnQgdGFyZ2V0aW5nIHByb3ZpZGVkIGJ5IHRoZSBDREsgb3ZlcmxheS4KICAgICAgICAgICAgICAgIG92ZXJsYXlSZWYua2V5ZG93bkV2ZW50cygpLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50CiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBldmVudCA9PiB7CiAgICAgICAgICAgICAgICAgICAgLy8gQ2xvc2Ugd2hlbiBwcmVzc2luZyBFU0NBUEUgb3IgQUxUICsgVVBfQVJST1csIGJhc2VkIG9uIHRoZSBhMTF5IGd1aWRlbGluZXMuCiAgICAgICAgICAgICAgICAgICAgLy8gU2VlOiBodHRwczovL3d3dy53My5vcmcvVFIvd2FpLWFyaWEtcHJhY3RpY2VzLTEuMS8jdGV4dGJveC1rZXlib2FyZC1pbnRlcmFjdGlvbgogICAgICAgICAgICAgICAgICAgIGlmIChldmVudC5rZXlDb2RlID09PSBFU0NBUEUgfHwgKGV2ZW50LmtleUNvZGUgPT09IFVQX0FSUk9XICYmIGV2ZW50LmFsdEtleSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fcmVzZXRBY3RpdmVJdGVtKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2Nsb3NlS2V5RXZlbnRTdHJlYW0ubmV4dCgpOwogICAgICAgICAgICAgICAgICAgICAgICAvLyBXZSBuZWVkIHRvIHN0b3AgcHJvcGFnYXRpb24sIG90aGVyd2lzZSB0aGUgZXZlbnQgd2lsbCBldmVudHVhbGx5CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHJlYWNoIHRoZSBpbnB1dCBpdHNlbGYgYW5kIGNhdXNlIHRoZSBvdmVybGF5IHRvIGJlIHJlb3BlbmVkLgogICAgICAgICAgICAgICAgICAgICAgICBldmVudC5zdG9wUHJvcGFnYXRpb24oKTsKICAgICAgICAgICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5fdmlld3BvcnRSdWxlcikgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX3ZpZXdwb3J0U3Vic2NyaXB0aW9uID0gdGhpcy5fdmlld3BvcnRSdWxlci5jaGFuZ2UoKS5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5wYW5lbE9wZW4gJiYgb3ZlcmxheVJlZikgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgb3ZlcmxheVJlZi51cGRhdGVTaXplKHsgd2lkdGg6IHRoaXMuX2dldFBhbmVsV2lkdGgoKSB9KTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKIC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JiYgd2FzT3BlbiAhPT0gdGhpcy5wYW5lbE9wZW4pIHsKICAgICAgICAgICAgICAgIHRoaXMuYXV0b2NvbXBsZXRlLm9wZW5lZC5lbWl0KCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9nZXRPdmVybGF5Q29uZmlnKCkgewogICAgICAgICAgICByZXR1cm4gbmV3IE92ZXJsYXlDb25maWcoewogICAgICAgICAgICAgICAgcG9zaXRpb25TdHJhdGVneTogdGhpcy5fZ2V0T3ZlcmxheVBvc2l0aW9uKCksCiAgICAgICAgICAgICAgICBzY3JvbGxTdHJhdGVneTogdGhpcy5fc2Nyb2xsU3RyYXRlZ3koKSwKICAgICAgICAgICAgICAgIHdpZHRoOiB0aGlzLl9nZXRQYW5lbFdpZHRoKCksCiAgICAgICAgICAgICAgICBkaXJlY3Rpb246IHRoaXMuX2RpcgogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9nZXRPdmVybGF5UG9zaXRpb24oKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc3RyYXRlZ3kgPSB0aGlzLl9vdmVybGF5LnBvc2l0aW9uKCkKICAgICAgICAgICAgICAgIC5mbGV4aWJsZUNvbm5lY3RlZFRvKHRoaXMuX2dldENvbm5lY3RlZEVsZW1lbnQoKSkKICAgICAgICAgICAgICAgIC53aXRoRmxleGlibGVEaW1lbnNpb25zKGZhbHNlKQogICAgICAgICAgICAgICAgLndpdGhQdXNoKGZhbHNlKTsKICAgICAgICAgICAgdGhpcy5fc2V0U3RyYXRlZ3lQb3NpdGlvbnMoc3RyYXRlZ3kpOwogICAgICAgICAgICB0aGlzLl9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2ZSBzcXVhcmVkIGNvcm5lcnMsIHdoaWxlCiAgICAgICAgICAgIC8vIHRoZSBvcHBvc2l0ZSBlbmQgaGFzIHJvdW5kZWQgY29ybmVycy4gV2UgYXBwbHkgYSBDU1MgY2xhc3MgdG8gc3dhcCB0aGUKICAgICAgICAgICAgLy8gYm9yZGVyLXJhZGl1cyBiYXNlZCBvbiB0aGUgb3ZlcmxheSBwb3NpdGlvbi4KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwYW5lbENsYXNzID0gJ21hdC1hdXRvY29tcGxldGUtcGFuZWwtYWJvdmUnOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGFib3ZlUG9zaXRpb25zID0gWwogICAgICAgICAgICAgICAgeyBvcmlnaW5YOiAnc3RhcnQnLCBvcmlnaW5ZOiAndG9wJywgb3ZlcmxheVg6ICdzdGFydCcsIG92ZXJsYXlZOiAnYm90dG9tJywgcGFuZWxDbGFzcyB9LAogICAgICAgICAgICAgICAgeyBvcmlnaW5YOiAnZW5kJywgb3JpZ2luWTogJ3RvcCcsIG92ZXJsYXlYOiAnZW5kJywgb3ZlcmxheVk6ICdib3R0b20nLCBwYW5lbENsYXNzIH0KICAgICAgICAgICAgXTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBsZXQgcG9zaXRpb25zOwogICAgICAgICAgICBpZiAodGhpcy5wb3NpdGlvbiA9PT0gJ2Fib3ZlJykgewogICAgICAgICAgICAgICAgcG9zaXRpb25zID0gYWJvdmVQb3NpdGlvbnM7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAodGhpcy5wb3NpdGlvbiA9PT0gJ2JlbG93JykgewogICAgICAgICAgICAgICAgcG9zaXRpb25zID0gYmVsb3dQb3NpdGlvbnM7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBwb3NpdGlvbnMgPSBbLi4uYmVsb3dQb3NpdGlvbnMsIC4uLmFib3ZlUG9zaXRpb25zXTsKICAgICAgICAgICAgfQogICAgICAgICAgICBwb3NpdGlvblN0cmF0ZWd5LndpdGhQb3NpdGlvbnMocG9zaXRpb25zKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9nZXRDb25uZWN0ZWRFbGVtZW50KCkgewogICAgICAgICAgICBpZiAodGhpcy5jb25uZWN0ZWRUbykgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuY29ubmVjdGVkVG8uZWxlbWVudFJlZjsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdGhpcy5fZm9ybUZpZWxkID8gdGhpcy5fZm9ybUZpZWxkLmdldENvbm5lY3RlZE92ZXJsYXlPcmlnaW4oKSA6IHRoaXMuX2VsZW1lbnQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZ2V0UGFuZWxXaWR0aCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuYXV0b2NvbXBsZXRlLnBhbmVsV2lkdGggfHwgdGhpcy5fZ2V0SG9zdFdpZHRoKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJldHVybnMgdGhlIHdpZHRoIG9mIHRoZSBpbnB1dCBlbGVtZW50LCBzbyB0aGUgcGFuZWwgd2lkdGggY2FuIG1hdGNoIGl0LgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZ2V0SG9zdFdpZHRoKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fZ2V0Q29ubmVjdGVkRWxlbWVudCgpLm5hdGl2ZUVsZW1lbnQuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCkud2lkdGg7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFJlc2V0cyB0aGUgYWN0aXZlIGl0ZW0gdG8gLTEgc28gYXJyb3cgZXZlbnRzIHdpbGwgYWN0aXZhdGUgdGhlCiAgICAgICAgICogY29ycmVjdCBvcHRpb25zLCBvciB0byAwIGlmIHRoZSBjb25zdW1lciBvcHRlZCBpbnRvIGl0LgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfcmVzZXRBY3RpdmVJdGVtKCkgewogICAgICAgICAgICB0aGlzLmF1dG9jb21wbGV0ZS5fa2V5TWFuYWdlci5zZXRBY3RpdmVJdGVtKHRoaXMuYXV0b2NvbXBsZXRlLmF1dG9BY3RpdmVGaXJzdE9wdGlvbiA/IDAgOiAtMSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIERldGVybWluZXMgd2hldGhlciB0aGUgcGFuZWwgY2FuIGJlIG9wZW5lZC4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2Nhbk9wZW4oKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZWxlbWVudCA9IHRoaXMuX2VsZW1lbnQubmF0aXZlRWxlbWVudDsKICAgICAgICAgICAgcmV0dXJuICFlbGVtZW50LnJlYWRPbmx5ICYmICFlbGVtZW50LmRpc2FibGVkICYmICF0aGlzLl9hdXRvY29tcGxldGVEaXNhYmxlZDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVXNlIGRlZmF1bHRWaWV3IG9mIGluamVjdGVkIGRvY3VtZW50IGlmIGF2YWlsYWJsZSBvciBmYWxsYmFjayB0byBnbG9iYWwgd2luZG93IHJlZmVyZW5jZQogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJ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HV0Q29tcG9uZW50IHsKICAgICAgICBjb25zdHJ1Y3RvcigpIHsKICAgICAgICAgICAgdGhpcy5vblJlZ2V4RmlsdGVyVmFsdWVDaGFuZ2UgPSBuZXcgRXZlbnRFbWl0dGVyKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uRmlsdGVyS2V5VXAoZXZlbnQpIHsKICAgICAgICAgICAgaWYgKGV2ZW50LmtleSA9PT0gJ0VudGVyJykgewogICAgICAgICAgICAgICAgdGhpcy5hdXRvY29tcGxldGVUcmlnZ2VyLmNsb3NlUGFuZWwoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGNvbXBsZXRpb24KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uQ29tcGxldGlvbkFjY2VwdGVkKGNvbXBsZXRpb24pIHsKICAgICAgICAgICAgdGhpcy5vblJlZ2V4RmlsdGVyVmFsdWVDaGFuZ2UuZW1pdChlc2NhcGVGb3JSZWdleChjb21wbGV0aW9uKSk7CiAgICAgICAgfQogICAgfQogICAgTWV0cmljc0ZpbHRlcklucHV0Q29tcG9uZW50LmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBDb21wb25lbnQsIGFyZ3M6IFt7CiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3I6ICdtZXRyaWNzLXRhZy1maWx0ZXItY29tcG9uZW50JywKICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZVVybDogJ2ZpbHRlcl9pbnB1dF9jb21wb25lbnQubmcuaHRtbCcsCiAgICAgICAgICAgICAgICAgICAgc3R5bGVVcmxzOiBbYGZpbHRlcl9pbnB1dF9jb21wb25lbnQuY3NzYF0sCiAgICAgICAgICAgICAgICAgICAgY2hhbmdlRGV0ZW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bGlkaXR5IG9mIGZpbHRlci4KICAgICAgICAgICAgICAgICAgICBuZXcgUmVnRXhwKHRhZ0ZpbHRlclN0cmluZyk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjYXRjaCAoZXJyKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSkpOwogICAgICAgICAgICB0aGlzLmNvbXBsZXRpb25zJCA9IHRoaXMuc3RvcmUKICAgICAgICAgICAgICAgIC5zZWxlY3QoZ2V0Tm9uRW1wdHlDYXJkSWRzV2l0aE1ldGFkYXRhKQogICAgICAgICAgICAgICAgLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjYXJkTGlzdAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGNhcmRMaXN0KSA9PiBjYXJkTGlzdC5tYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHsgdGFnIH0pID0+IHRhZykpKSksIHN3aXRjaE1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY2FyZExpc3QKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChjYXJkTGlzdCkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIGNvbWJpbmVMYXRlc3QoWwogICAgICAgICAgICAgICAgICAgIG9mKGNhcmRMaXN0KSwKICAgICAgICAgICAgICAgICAgICB0aGlzLnN0b3JlLnNlbGVjdChnZXRNZXRyaWNzVGFnRmlsdGVyKSwKICAgICAgICAgICAgICAgIF0pOwogICAgICAgICAgICB9KSksIG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoW3RhZ3MsIHRhZ0ZpbHRlcl0pID0+IHsKICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHJlZ2V4ID0gbmV3IFJlZ0V4cCh0YWdGaWx0ZXIpOwogICAgICAgICAgICAgICAgICAgIHJldHVybiBbdGFncywgcmVnZXhdOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgY2F0Y2ggKGUpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gW3RhZ3MsIG51bGxdOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSksIGZpbHRlcigoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoWywgdGFnRmlsdGVyUmVnZXhdKSA9PiB0YWdGaWx0ZXJSZWdleCAhPT0gbnVsbCkpLCBtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKFt0YWdzLCB0YWdGaWx0ZXJSZWdleF0pID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiB0YWdzCiAgICAgICAgICAgICAgICAgICAgLmZpbHRlcigoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHRhZwogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKHRhZykgPT4gKC8qKiBAdHlwZSB7P30gKi8gKHRhZ0ZpbHRlclJlZ2V4KSkudGVzdCh0YWcpKSkKICAgICAgICAgICAgICAgICAgICAuc29ydChjb21wYXJ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ICBpZiAobGFzdFBpZWNlSW5kZXggPT09IC0xKSB7CiAgICAgICAgICAgICAgICByZXR1cm4geyBmaXJzdDogJycsIHNlY29uZDogdGhpcy52YWx1ZSB9OwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICBmaXJzdDogdGhpcy52YWx1ZS5zbGljZSgwLCBsYXN0UGllY2VJbmRleCksCiAgICAgICAgICAgICAgICBzZWNvbmQ6IHRoaXMudmFsdWUuc2xpY2UobGFzdFBpZWNlSW5kZXgpLAogICAgICAgICAgICB9OwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZpcnN0VGV4dFBhcnQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLnBhcnNlVmFsdWUoKS5maXJzdDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZWNvbmRUZXh0UGFydCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMucGFyc2VWYWx1ZSgpLnNlY29uZDsKICAgICAgICB9CiAgICB9CiAgICBUcnVuY2F0ZWRQYXRoQ29tcG9uZW50LmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBDb21wb25lbnQsIGFyZ3M6IFt7CiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3I6ICd0Yi10cnVuY2F0ZWQtcGF0aCcsCiAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU6IGAKICAgIDxzcGFuICpuZ0lmPSJmaXJzdFRleHRQYXJ0KCkubGVuZ3RoID4gMCIgY2xhc3M9ImZpcnN0LXRleHQtcGFydCI+e3sKICAgICAgZmlyc3RUZXh0UGFydCgpCiAgICB9fTwvc3Bhbj4KICAgIDxzcGFuIGNsYXNzPSJzZWNvbmQtdGV4dC1wYXJ0Ij57eyBzZWNvbmRUZXh0UGFydCgpIH19PC9zcG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DEsICJzcGFuIiwgMSk7CiAgICAgICAgICAgIMm1ybV0ZXh0KDIpOwogICAgICAgICAgICDJtcm1ZWxlbWVudEVuZCgpOwogICAgICAgIH0gaWYgKHJmICYgMikgewogICAgICAgICAgICDJtcm1cHJvcGVydHkoIm5nSWYiLCBjdHguZmlyc3RUZXh0UGFydCgpLmxlbmd0aCA+IDApOwogICAgICAgICAgICDJtcm1YWR2YW5jZSgyKTsKICAgICAgICAgICAgybXJtXRleHRJbnRlcnBvbGF0ZShjdHguc2Vjb25kVGV4dFBhcnQoKSk7CiAgICAgICAgfSB9LCBkaXJlY3RpdmVzOiBbTmdJZl0sIHN0eWxlczogWyJbX25naG9zdC0lQ09NUCVde2Rpc3BsYXk6aW5saW5lLWZsZXg7d2hpdGUtc3BhY2U6bm93cmFwfS5maXJzdC10ZXh0LXBhcnRbX25nY29udGVudC0lQ09NUCVde2ZsZXg6MSAxIDRjaDttYXgtd2lkdGg6bWF4LWNvbnRlbnR9LmZpcnN0LXRleHQtcGFydFtfbmdjb250ZW50LSVDT01QJV0sIC5zZWNvbmQtdGV4dC1wYXJ0W19uZ2NvbnRlbnQtJUNPTVAlXXtvdmVyZmxvdzpoaWRkZW47dGV4dC1vdmVyZmxvdzplbGxpcHNpc30iXSB9KTsKCiAgICBmdW5jdGlvbiBnZXREaXNwbGF5TmFtZUZvclJ1bihydW5JZCwgcnVuLCBleHBlcmltZW50TmFtZSkgewogICAgICAgIGlmICghcnVuICYmICFleHBlcmltZW50TmFtZSkgewogICAgICAgICAgICByZXR1cm4gcnVuSWQ7CiAgICAgICAgfQogICAgICAgIGNvbnN0IGRpc3BsYXlOYW1lID0gW2V4cGVyaW1lbnROYW1lLCBydW4gPyBydW4ubmFtZSA6ICcuLi4nXQogICAgICAgICAgICAuZmlsdGVyKEJvb2xlYW4pCiAgICAgICAgICAgIC5qb2luKCcvJyk7CiAgICAgICAgcmV0dXJuIGRpc3BsYXlOYW1lOwogICAgfQoKICAgIC8qKgogICAgICogQGZp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klkIGlzIGRlZmluZWQgKGFmdGVyIG9uSW5pdCkuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uSW5pdCgpIHsKICAgICAgICAgICAgdGhpcy5uYW1lJCA9IGNvbWJpbmVMYXRlc3QoWwogICAgICAgICAgICAgICAgdGhpcy5zdG9yZS5zZWxlY3QoZ2V0UnVuLCB7IHJ1bklkOiB0aGlzLnJ1bklkIH0pLAogICAgICAgICAgICAgICAgdGhpcy5zdG9yZS5zZWxlY3QoZ2V0RXhwZXJpbWVudElkRm9yUnVuSWQsIHsgcnVuSWQ6IHRoaXMucnVuSWQgfSksCiAgICAgICAgICAgICAgICB0aGlzLnN0b3JlLnNlbGVjdChnZXRFeHBlcmltZW50SWRUb0FsaWFzTWFwKSwKICAgICAgICAgICAgXSkucGlwZShtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKFtydW4sIGV4cGVyaW1lbnRJZCwgaWRUb0FsaWFzXSkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIGdldERpc3BsYXlOYW1lRm9yUnVuKHRoaXMucnVuSWQsIHJ1biwgZXhwZXJpbWVudElkID8gaWRUb0FsaWFzW2V4cGVyaW1lbnRJZF0gOiBudWxsKTsKICAgICAgICAgICAgfSkpKTsKICAgICAgICB9CiAgICB9CiAgICBSdW5OYW1lQ29udGFpbmVyLmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBDb21wb25lbnQsIGFyZ3M6IFt7CiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3I6ICdjYXJkLXJ1bi1uYW1lJywKICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogYAogICAgPGNhcmQtcnVuLW5hbWUtY29tcG9uZW50CiAgICAgIFtuYW1lXT0ibmFtZSQgfCBhc3luYyIKICAgICAgW2F0dHIudG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FyZC1jb21wb25lbnQnLAogICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlVXJsOiAnaW1hZ2VfY2FyZF9jb21wb25lbnQubmcuaHRtbCcsCiAgICAgICAgICAgICAgICAgICAgc3R5bGVVcmxzOiBbJ2ltYWdlX2NhcmRfY29tcG9uZW50LmNzcyddLAogICAgICAgICAgICAgICAgICAgIGhvc3Q6IHsKICAgICAgICAgICAgICAgICAgICAgICAgJ1tjbGFzcy5hY3R1YWwtc2l6ZV0nOiAnc2hvd0FjdHVhbFNpemUnLAogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgY2hhbmdlRGV0ZWN0aW9uOiBDaGFuZ2VEZXRlY3Rpb25TdHJhdGVneS5PblB1c2gsCiAgICAgICAgICAgICAgICB9LF0gfSwKICAgIF07CiAgICBJbWFnZUNhcmRDb21wb25lbnQucHJvcERlY29yYXRvcnMgPSB7CiAgICAgICAgbG9hZFN0YXRlOiBbeyB0eXBlOiBJbnB1dCB9XSwKICAgICAgICB0aXRsZTogW3sgdHlwZTogSW5wdXQgfV0sCiAgICAgICAgdGFnOiBbeyB0eXBlOiBJbnB1dCB9XSwKICAgICAgICBydW5JZDogW3sgdHlwZTogSW5wdXQgfV0sCiAgICAgICAgc2FtcGxlOiBbeyB0eXBlOiBJbnB1dCB9XSwKICAgICAgICBpbWFnZVVybDogW3sgdHlwZTogSW5wdXQgfV0sCiAgICAgICAgc3RlcEluZGV4OiBbeyB0eXBlOiBJbnB1dCB9XSwKICAgICAgICBzdGVwVmFsdWVzOiBbeyB0eXBlOiBJbnB1dCB9XSwKICAgICAgICBicmlnaHRuZXNzSW5NaWxsaTogW3sgdHlwZTogSW5wdXQgfV0sCiAgICAgICAgY29udHJhc3RJbk1pbGxpOiBbeyB0eXBlOiBJbnB1dCB9XSwKICAgICAgICBzaG93QWN0dWFsU2l6ZTogW3sgdHlwZTogSW5wdXQgfV0sCiAgICAgICAgcnVuQ29sb3JTY2FsZTogW3sgdHl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gICAgICAgdGhpcy5zaG93QWN0dWFsU2l6ZSA9IGZhbHNlOwogICAgICAgICAgICAvLyBUaGUgVUkgdG9nZ2xlIGlzIG92ZXJyaWRkZW4gYnkgdGhlIGdsb2JhbCBzZXR0aW5nLgogICAgICAgICAgICB0aGlzLmFjdHVhbFNpemVVaVRvZ2dsZWQgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5hY3R1YWxTaXplVWlUb2dnbGVTdWJqZWN0ID0gbmV3IEJlaGF2aW9yU3ViamVjdCh0aGlzLmFjdHVhbFNpemVVaVRvZ2dsZWQpOwogICAgICAgICAgICB0aGlzLm5nVW5zdWJzY3JpYmUgPSBuZXcgU3ViamVjdCgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99ICRldmVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25TdGVwSW5kZXhDaGFuZ2VkKCRldmVudCkgewogICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKGNhcmRTdGVwU2xpZGVyQ2hhbmdlZCh7CiAgICAgICAgICAgICAgICBjYXJkSWQ6IHRoaXMuY2FyZElkLAogICAgICAgICAgICAgICAgc3RlcEluZGV4OiAkZXZlbnQsCiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGNhcmRNZXRhZGF0YQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgaXNJbWFnZUNhcmRNZXRhZGF0YShjYXJkTWV0YWRhdGEpIHsKICAgICAgICAgICAgY29uc3QgeyBwbHVnaW4gfSA9IGNhcmRNZXRhZGF0YTsKICAgICAgICAgICAgcmV0dXJuIHBsdWdpbiA9PT0gUGx1Z2luVHlwZS5JTUFHRVM7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25BY3R1YWxTaXplVG9nZ2xlKCkgewogICAgICAgICAgICB0aGlzLmFjdHVhbFNpemVVaVRvZ2dsZWQgPSAhdGhpcy5hY3R1YWxTaXplVWlUb2dnbGVkOwogICAgICAgICAgICB0aGlzLmFjdHVhbFNpemVVaVRvZ2dsZVN1YmplY3QubmV4dCh0aGlzLmFjdHVhbFNpemVVaVRvZ2dsZWQpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBCdWlsZCBvYnNlcnZhYmxlcyBvbmNlIGNhcmRJZCBpcyBkZWZpbmVkIChhZnRlciBvbkluaXQpLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkluaXQoKSB7CiAgICAgICAgICAgIGNvbWJpbmVMYXRlc3QoWwogICAgICAgICAgICAgICAgdGhpcy5hY3R1YWxTaXplR2xvYmFsU2V0dGluZyQsCiAgICAgICAgICAgICAgICB0aGlzLmFjdHVhbFNpemVVaVRvZ2dsZVN1YmplY3QsCiAgICAgICAgICAgIF0pCiAgICAgICAgICAgICAgICAucGlwZSh0YWtlVW50aWwodGhpcy5uZ1Vuc3Vic2NyaWJlKSwgdGFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChbc2V0dGluZ0VuYWJsZWQsIHVpVG9nZ2xlRW5hYmxlZF0pID0+IHsKICAgICAgICAgICAgICAgIC8vIEFjdHVhbCBzaXplIG1vZGUgcmVxdWlyZXMgYSBmdWxsIHdpZHRoIGNhcmQuCiAgICAgICAgICAgICAgICB0aGlzLnNob3dBY3R1YWxTaXplID0gc2V0dGluZ0VuYWJsZWQgfHwgdWlUb2dnbGVFbmFibGVkOwogICAgICAgICAgICAgICAgdGhpcy5mdWxsV2lkdGhDaGFuZ2VkLmVtaXQodGhpcy5zaG93QWN0dWFsU2l6ZSk7CiAgICAgICAgICAgIH0pKSkKICAgICAgICAgICAgICAgIC5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4geyB9KSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc2VsZWN0Q2FyZE1ldGFkYXRhJCA9IHRoaXMuc3RvcmUuc2VsZWN0KGdldENhcmRNZXRhZGF0YSwgdGhpcy5jYXJkSWQpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGNhcmRNZXRhZGF0YSQgPSBzZWxlY3RDYXJkTWV0YWRhdGEkLnBpcGUoZmlsdGVyKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjYXJkTWV0YWRhdGEKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChjYXJkTWV0YWRhdGEpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiAhIWNhcmRNZXRhZGF0YSAmJiB0aGlzLmlzSW1hZ2VDYXJkTWV0YWRhdGEoY2FyZE1ldGFkYXRhKTsKICAgICAgICAgICAgfSkpLCBtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGNhcmRNZXRhZGF0YQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGNhcmRNZXRhZGF0YSkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovIChjYXJkTWV0YWRhdGEpKTsKICAgICAgICAgICAgfSkpLCBzaGFyZVJlcGxheSgxKSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbWV0YWRhdGFBbmRTZXJpZXMkID0gY29tYmluZUxhdGVzdChbCiAgICAgICAgICAgICAgICBjYXJkTWV0YWRhdGEkLAogICAgICAgICAgICAgICAgdGhpcy5zdG9yZS5zZWxlY3QoZ2V0Q2FyZFRpbWVTZXJpZXMsIHRoaXMuY2FyZElkKSwKICAgICAgICAgICAgXSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdGltZVNlcmllcyQgPSBtZXRhZGF0YUFuZFNlcmllcyQucGlwZShtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKFtjYXJkTWV0YWRhdGEsIHJ1blRvU2VyaWVzXSkgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgcnVuSWQgPSBjYXJkTWV0YWRhdGEucnVuSWQ7CiAgICAgICAgICAgICAgICBpZiAoIXJ1blRvU2VyaWVzIHx8ICFydW5Ub1Nlcmllcy5oYXNPd25Qcm9wZXJ0eShydW5JZCkpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gW107CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKHJ1blRvU2VyaWVzW3J1bklkXSkpOwogICAgICAgICAgICB9KSksIGRpc3RpbmN0VW50aWxDaGFuZ2VkKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBzZXJpZXMxCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gc2VyaWVzMgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHNlcmllczEsIHNlcmllczIpID0+IHsKICAgICAgICAgICAgICAgIGlmIChzZXJpZXMxLmxlbmd0aCA9PT0gc2VyaWVzMi5sZW5ndGggJiYgc2VyaWVzMS5sZW5ndGggPT09IDApIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiBzZXJpZXMxID09PSBzZXJpZXMyOwogICAgICAgICAgICB9KSksIHNoYXJlUmVwbGF5KDEpKTsKICAgICAgICAgICAgdGhpcy5zdGVwSW5kZXgkID0gdGhpcy5zdG9yZS5zZWxlY3QoZ2V0Q2FyZFN0ZXBJbmRleCwgdGhpcy5jYXJkSWQpOwogICAgICAgICAgICB0aGlzLmxvYWRTdGF0ZSQgPSB0aGlzLnN0b3JlLnNlbGVjdChnZXRDYXJkTG9hZFN0YXRlLCB0aGlzLmNhcmRJZCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdGltZVNlcmllc0FuZFN0ZXBJbmRleCQgPSBjb21iaW5lTGF0ZXN0KFsKICAgICAgICAgICAgICAgIHRpbWVTZXJpZXMkLAogICAgICAgICAgICAgICAgdGhpcy5zdGVwSW5kZXgkLAogICAgICAgICAgICBdKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBzdGVwRGF0dW0kID0gdGltZVNlcmllc0FuZFN0ZXBJbmRleCQucGlwZShtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKFt0aW1lU2VyaWVzLCBzdGVwSW5kZXhdKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAoc3RlcEluZGV4ID09PSBudWxsIHx8ICF0aW1lU2VyaWVzW3N0ZXBJbmRleF0pIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiB0aW1lU2VyaWVzW3N0ZXBJbmRleF07CiAgICAgICAgICAgIH0pKSk7CiAgICAgICAgICAgIHRoaXMudGFnJCA9IGNhcmRNZXRhZGF0YSQucGlwZShtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGNhcmRNZXRhZGF0YQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGNhcmRNZXRhZGF0YSkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIGNhcmRNZXRhZGF0YS50YWc7CiAgICAgICAgICAgIH0pKSk7CiAgICAgICAgICAgIHRoaXMudGl0bGUkID0gdGhpcy50YWckLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSB0YWcKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICh0YWcpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiBnZXRUYWdEaXNwbGF5TmFtZSh0YWcsIHRoaXMuZ3JvdXBOYW1lKTsKICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgdGhpcy5ydW5JZCQgPSBjYXJkTWV0YWRhdGEkLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjYXJkTWV0YWRhdGEKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChjYXJkTWV0YWRhdGEpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiBjYXJkTWV0YWRhdGEucnVuSWQ7CiAgICAgICAgICAgIH0pKSk7CiAgICAgICAgICAgIHRoaXMuc2FtcGxlJCA9IGNhcmRNZXRhZGF0YSQucGlwZShtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGNhcmRNZXRhZGF0YQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGNhcmRNZXRhZGF0YSkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIGNhcmRNZXRhZGF0YS5zYW1wbGU7CiAgICAgICAgICAgIH0pKSk7CiAgICAgICAgICAgIHRoaXMuaW1hZ2VVcmwkID0gc3RlcERhdHVtJC5waXBlKG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gc3RlcERhdHVtCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoc3RlcERhdHVtKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAoIXN0ZXBEYXR1bSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuZGF0YVNvdXJjZS5pbWFnZVVybChzdGVwRGF0dW0uaW1hZ2VJZCk7CiAgICAgICAgICAgIH0pKSk7CiAgICAgICAgICAgIHRoaXMuc3RlcFZhbHVlcyQgPSB0aW1lU2VyaWVzJC5waXBlKG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gc2VyaWVzCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoc2VyaWVzKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gc2VyaWVzLm1hcCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHN0ZXBEYXR1bQogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKHN0ZXBEYXR1bSkgPT4gewogICAgICAgICAgICAgICAgICAgIHJldHVybiBzdGVwRGF0dW0uc3RlcDsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgdGhpcy5pc1Bpbm5lZCQgPSB0aGlzLnN0b3JlLnNlbGVjdChnZXRDYXJkUGlubmVkU3RhdGUsIHRoaXMuY2FyZElkKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uRGVzdHJveSgpIHsKICAgICAgICAgICAgdGhpcy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09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcgVXRpbGl0aWVzIHJlbGF0ZWQgdG8gZm9ybWF0dGluZyB2YWx1ZXMuCiAgICAgKi8KICAgIC8qKgogICAgICogRm9ybWF0cyBhIHRpbWUsIGdpdmVuIGFzIG51bWJlciBvZiBob3Vycy4gZS5nLgogICAgICogPiBmb3JtYXRSZWxhdGl2ZVRpbWVJbk1zKDEwNTU1ICogNjAgKiA2MCkKICAgICAqICIxMGggMzNtIDE3cyIKICAgICAqLwogICAgZnVuY3Rpb24gZm9ybWF0UmVsYXRpdmVUaW1lSW5Ncyh0aW1lSW5NcykgewogICAgICAgIC8vIFdlIHdpbGwgYWx3YXlzIHNob3cgMiB1bml0cyBvZiBwcmVjaXNpb24sIGUuZyBkYXlzIGFuZCBob3Vycywgb3IKICAgICAgICAvLyBtaW51dGVzIGFuZCBzZWNvbmRzLCBidXQgbm90IGhvdXJzIGFuZCBtaW51dGVzIGFuZCBzZWNvbmRzLgogICAgICAgIGNvbnN0IHJlc3VsdCA9IFtdOwogICAgICAgIGNvbnN0IHRpbWVJbkhvdXJzID0gdGltZUluTXMgLyAoMTAwMCAqIDYwICogNjApOwogICAgICAgIGNvbnN0IGRheXMgPSBNYXRoLmZsb29yKHRpbWVJbkhvdXJzIC8gMjQpOwogICAgICAgIGlmIChkYXlzKSB7CiAgICAgICAgICAgIHJlc3VsdC5wdXNoKGRheXMudG9TdHJpbmcoKSArICdkJyk7CiAgICAgICAgfQogICAgICAgIGNvbnN0IHJlbWFpbmluZ0hvdXJzID0gdGltZUluSG91cnMgLSBkYXlzICogMjQ7CiAgICAgICAgY29uc3QgaG91cnMgPSBNYXRoLmZsb29yKHJlbWFpbmluZ0hvdXJzKTsKICAgICAgICBpZiAoaG91cnMgfHwgZGF5cykgewogICAgICAgICAgICByZXN1bHQucHVzaChob3Vycy50b1N0cmluZygpICsgJ2g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mVZT3V0bGllcnMgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5zbW9vdGhpbmdFbmFibGVkID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuc21vb3RoaW5nV2VpZ2h0ID0gMC42OwogICAgICAgICAgICB0aGlzLnRvb2x0aXBDb2x1bW5zID0gW107CiAgICAgICAgICAgIHRoaXMudG9vbHRpcFBvc2l0aW9uID0gVG9vbHRpcFBvc2l0aW9uLkFVVE87CiAgICAgICAgICAgIHRoaXMudG9vbHRpcFNvcnRpbmdNZXRob2QgPSBUb29sdGlwU29ydGluZ01ldGhvZC5ERUZBVUxUOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogSW5kaXJlY3RseSBhcHBsaWVkIHByb3BlcnRpZXMsIHdpdGhvdXQgYSAxOjEgUG9seW1lciBtYXBwaW5nLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5zZXJpZXNEYXRhTGlzdCA9IFtdOwogICAgICAgICAgICB0aGlzLnhBeGlzVHlwZSA9IFhBeGlzVHlwZS5TVEVQOwogICAgICAgICAgICB0aGlzLnlBeGlzVHlwZSA9IFlBeGlzVHlwZS5MSU5FQVI7CiAgICAgICAgICAgIHRoaXMuZWxlbWVudCA9ICgvKiogQHR5cGUgez99ICovIChkb2N1bWVudC5jcmVhdGVFbGVtZW50KCd2ei1saW5lLWNoYXJ0MicpKSk7CiAgICAgICAgICAgIHRoaXMuZWxlbWVudC55VmFsdWVBY2Nlc3NvciA9ICgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBkCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoZCkgPT4gZC55KTsKICAgICAgICAgICAgLy8gTXVzdCBzZXQgb3B0aW9uYWwgaW5wdXQgdmFsdWVzIGhlcmUgc2luY2UgdGhleSB3b24ndCBiZSBwYXJ0IG9mIHRoZQogICAgICAgICAgICAvLyBuZ09uQ2hhbmdlcyBpZiB0aGUgcGFyZW50IGRvZXMgbm90IG92ZXJyaWRlIHRoZSB2YWx1ZS4KICAgICAgICAgICAgdGhpcy5lbGVtZW50Lmlnbm9yZVlPdXRsaWVycyA9IHRoaXMuaWdub3JlWU91dGxpZXJzOwogICAgICAgICAgICB0aGlzLmVsZW1lbnQuc21vb3RoaW5nRW5hYmxlZCA9IHRoaXMuc21vb3RoaW5nRW5hYmxlZDsKICAgICAgICAgICAgdGhpcy5lbGVtZW50LnNtb290aGluZ1dlaWdodCA9IHRoaXMuc21vb3RoaW5nV2VpZ2h0OwogICAgICAgICAgICB0aGlzLmVsZW1lbnQudG9vbHRpcENvbHVtbnMgPSB0aGlzLnRvb2x0aXBDb2x1bW5zOwogICAgICAgICAgICB0aGlzLmVsZW1lbnQudG9vbHRpcFBvc2l0aW9uID0gdGhpcy50b29sdGlwUG9zaXRpb247CiAgICAgICAgICAgIHRoaXMuZWxlbWVudC50b29sdGlwU29ydGluZ01ldGhvZCA9IHRoaXMudG9vbHRpcFNvcnRpbmdNZXRob2Q7CiAgICAgICAgICAgIHRoaXMuZWxlbWVudC54VHlwZSA9IHRoaXMueEF4aXNUeXBlOwogICAgICAgICAgICB0aGlzLmVsZW1lbnQueVNjYWxlVHlwZSA9IHRoaXMueUF4aXNUeXBlOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25Jbml0KCkgewogICAgICAgICAgICB0aGlzLmhvc3QubmF0aXZlRWxlbWVudC5hcHBlbmRDaGlsZCh0aGlzLmVsZW1lbnQpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGNoYW5nZXMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25DaGFuZ2VzKGNoYW5nZXMpIHsKICAgICAgICAgICAgLy8gUmVjb3JkIHN0YXRlIGJlZm9yZSBjaGFuZ2luZyBhbnkgdmFsdWVzLgogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHdhc0RvbWFpbkZpdFRvRGF0YSA9IHRoaXMuZWxlbWVudC5pc0RhdGFGaXRUb0RvbWFpbigpOwogICAgICAgICAgICBpZiAoY2hhbmdlc1snY29sb3JTY2FsZSddICYmIHRoaXMuY29sb3JTY2FsZSkgewogICAgICAgICAgICAgICAgdGhpcy5lbGVtZW50LmNvbG9yU2NhbGUgPSB7IHNjYWxlOiB0aGlzLmNvbG9yU2NhbGUgfTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoY2hhbmdlc1snZGVmYXVsdFhSYW5nZSddKSB7CiAgICAgICAgICAgICAgICB0aGlzLmVsZW1lbnQuZGVmYXVsdFhSYW5nZSA9IHRoaXMuZGVmYXVsdFhSYW5nZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoY2hhbmdlc1snZGVmYXVsdFlSYW5nZSddKSB7CiAgICAgICAgICAgICAgICB0aGlzLmVsZW1lbnQuZGVmYXVsdFlSYW5nZSA9IHRoaXMuZGVmYXVsdFlSYW5nZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoY2hhbmdlc1snaWdub3JlWU91dGxpZXJzJ10pIHsKICAgICAgICAgICAgICAgIHRoaXMuZWxlbWVudC5pZ25vcmVZT3V0bGllcnMgPSB0aGlzLmlnbm9yZVlPdXRsaWVyczsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoY2hhbmdlc1snc21vb3RoaW5nRW5hYmxlZCddKSB7CiAgICAgICAgICAgICAgICB0aGlzLmVsZW1lbnQuc21vb3RoaW5nRW5hYmxlZCA9IHRoaXMuc21vb3RoaW5nRW5hYmxlZDsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoY2hhbmdlc1snc21vb3RoaW5nV2VpZ2h0J10pIHsKICAgICAgICAgICAgICAgIHRoaXMuZWxlbWVudC5zbW9vdGhpbmdXZWlnaHQgPSB0aGlzLnNtb290aGluZ1dlaWdodDsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoY2hhbmdlc1sndG9vbHRpcENvbHVtbnMnXSkgewogICAgICAgICAgICAgICAgdGhpcy5lbGVtZW50LnRvb2x0aXBDb2x1bW5zID0gdGhpcy50b29sdGlwQ29sdW1uczsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoY2hhbmdlc1sndG9vbHRpcFBvc2l0aW9uJ10pIHsKICAgICAgICAgICAgICAgIHRoaXMuZWxlbWVudC50b29sdGlwUG9zaXRpb24gPSB0aGlzLnRvb2x0aXBQb3NpdGlvbjsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoY2hhbmdlc1sndG9vbHRpcFNvcnRpbmdNZXRob2QnXSkgewogICAgICAgICAgICAgICAgdGhpcy5lbGVtZW50LnRvb2x0aXBTb3J0aW5nTWV0aG9kID0gdGhpcy50b29sdGlwU29ydGluZ01ldGhvZDsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoY2hhbmdlc1sneEF4aXNUeXBlJ10pIHsKICAgICAgICAgICAgICAgIHRoaXMuZWxlbWVudC54VHlwZSA9IHRoaXMueEF4aXNUeXBlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChjaGFuZ2VzWyd5QXhpc1R5cGUnXSkgewogICAgICAgICAgICAgICAgdGhpcy5lbGVtZW50LnlTY2FsZVR5cGUgPSB0aGlzLnlBeGlzVHlwZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5zaG91bGRVcGRhdGVTZXJpZXNEYXRhKGNoYW5nZXMpKSB7CiAgICAgICAgICAgICAgICB0aGlzLnVwZGF0ZVNlcmllc0RhdGEoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBQcmVzZXJ2ZSBmaXQtdG8tZG9tYWluIGlmIHRoZSBkYXRhIHBvaW50cyBtYXkgaGF2ZSBjaGFuZ2VkLgogICAgICAgICAgICBpZiAod2FzRG9tYWluRml0VG9EYXRhICYmCiAgICAgICAgICAgICAgICAoY2hhbmdlc1snc2VyaWVzRGF0YUxpc3QnXSB8fAogICAgICAgICAgICAgICAgICAgIGNoYW5nZXNbJ3Ntb290aGluZ0VuYWJsZWQnXSB8fAogICAgICAgICAgICAgICAgICAgIChjaGFuZ2VzWydzbW9vdGhpbmdXZWlnaHQnXSAmJiB0aGlzLnNtb290aGluZ0VuYWJsZWQpKSkgewogICAgICAgICAgICAgICAgdGhpcy5lbGVtZW50LnJlc2V0RG9tYWluKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5lbGVtZW50LnJlZHJhdygpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gY2hhbmdlcwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2hvdWxkVXBkYXRlU2VyaWVzRGF0YShjaGFuZ2VzKSB7CiAgICAgICAgICAgIGlmICghIWNoYW5nZXNbJ3Nlcmllc0RhdGFMaXN0J10pIHsKICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIFRoZSBzZXJpZXMgZGF0YSBmb3JtYXQgZXhwZWN0ZWQgYnkgVnpMaW5lQ2hhcnQyIGRlcGVuZHMgb24gdGhlIGB4VHlwZWAuCiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcHJldlhBeGlzVHlwZSA9IGNoYW5nZXNbJ3hBeGlzVHlwZSddCiAgICAgICAgICAgICAgICA/IGNoYW5nZXNbJ3hBeGlzVHlwZSddLnByZXZpb3VzVmFsdWUKICAgICAgICAgICAgICAgIDogbnVsbDsKICAgICAgICAgICAgaWYgKHByZXZYQXhpc1R5cGUgJiYKICAgICAgICAgICAgICAgIHRoaXMuaXNXYWxsVGltZUJhc2VkKHByZXZYQXhpc1R5cGUpICE9PQogICAgICAgICAgICAgICAgICAgIHRoaXMuaXNXYWxsVGltZUJhc2VkKHRoaXMueEF4aXNUeXBlKSkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdXBkYXRlU2VyaWVzRGF0YSgpIHsKICAgICAgICAgICAgZm9yIChjb25zdCBzZXJpZXNEYXRhIG9mIHRoaXMuc2VyaWVzRGF0YUxpc3QpIHsKICAgICAgICAgICAgICAgIGNvbnN0IHsgc2VyaWVzSWQsIG1ldGFkYXRhLCBwb2ludHMgfSA9IHNlcmllc0RhdGE7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBmb3JtYXR0ZWRQb2ludHMgPSB0aGlzLmZvcm1hdEJ5WEF4aXNUeXBlKHBvaW50cyk7CiAgICAgICAgICAgICAgICB0aGlzLmVsZW1lbnQuc2V0U2VyaWVzRGF0YShzZXJpZXNJZCwgZm9ybWF0dGVkUG9pbnRzKTsKICAgICAgICAgICAgICAgIHRoaXMuZWxlbWVudC5zZXRTZXJpZXNNZXRhZGF0YShzZXJpZXNJZCwgbWV0YWRhdGEpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgdmlzaWJsZVNlcmllcyA9IHRoaXMuc2VyaWVzRGF0YUxpc3QKICAgICAgICAgICAgICAgIC5maWx0ZXIoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHNlcmllc0RhdGEKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChzZXJpZXNEYXRhKSA9PiBzZXJpZXNEYXRhLnZpc2libGUpKQogICAgICAgICAgICAgICAgLm1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoeyBzZXJpZXNJZCB9KSA9PiBzZXJpZXNJZCkpOwogICAgICAgICAgICB0aGlzLmVsZW1lbnQuc2V0VmlzaWJsZVNlcmllcyh2aXNpYmxlU2VyaWVzKTsKICAgICAgICAgICAgdGhpcy5lbGVtZW50LmNvbW1pdENoYW5nZXMoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHhBeGlzVHlwZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgaXNXYWxsVGltZUJhc2VkKHhBeGlzVHlwZSkgewogICAgICAgICAgICByZXR1cm4gKHhBeGlzVHlwZSA9PT0gWEF4aXNUeXBlLldBTExfVElNRSB8fCB4QXhpc1R5cGUgPT09IFhBeGlzVHlwZS5SRUxBVElWRSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBzZXJpZXNEYXRhCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmb3JtYXRCeVhBeGlzVHlwZShzZXJpZXNEYXRhKSB7CiAgICAgICAgICAgIHJldHVybiBzZXJpZXNEYXRhLm1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZGF0dW0KICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChkYXR1bSkgPT4gewogICAgICAgICAgICAgICAgaWYgKHRoaXMuaXNXYWxsVGltZUJhc2VkKHRoaXMueEF4aXNUeXBlKSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sIGRhdHVtKSwgeyB3YWxsX3RpbWU6IG5ldyBEYXRlKGRhdHVtLngpIH0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgZGF0dW0pLCB7IHN0ZXA6IGRhdHVtLnggfSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZXNldERvbWFpbigpIHsKICAgICAgICAgICAgdGhpcy5lbGVtZW50LnJlc2V0RG9tYWluKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVkcmF3KCkgewogICAgICAgICAgICB0aGlzLmVsZW1lbnQucmVkcmF3KCk7CiAgICAgICAgfQogICAgfQogICAgTGluZUNoYXJ0Q29tcG9uZW50LmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBDb21wb25lbnQsIGFyZ3M6IFt7CiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3I6ICd0Yi1saW5lLWNoYXJ0JywKICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogYGAsCiAgICAgICAgICAgICAgICAgICAgc3R5bGVzOiBbCiAgICAgICAgICAgICAgICAgICAgICAgIGAKICAgICAgdGItbGluZS1jaGFydCA+IHZ6LWxpbmUtY2hhcnQyIHsKICAgICAgICBoZWlnaHQ6IDEwMCU7CiAgICAgIH0KICAgIGAsCiAgICAgICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgICAgICAvLyBBbmd1bGFyJ3MgZW11bGF0ZWQgdmlldyBlbmNhcHN1bGF0aW9uIHByZXZlbnRzIGNvbXBvbmVudCBzdHlsZXMgZnJvbQogICAgICAgICAgICAgICAgICAgIC8vIGFwcGx5aW5nIHRvIERPTSBjcmVhdGVkIG91dHNpZGUgb2YgaXRzIHRlbXBsYXRlICgndnotbGluZS1jaGFydDInKS4KICAgICAg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AxMDAlO1xuICAgICAgfVxuICAgICJdLCBlbmNhcHN1bGF0aW9uOiAyIH0pOwoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogdGVuc29yYm9hcmQvd2ViYXBwL3dpZGdldHMvcmVzaXplX2RldGVjdG9yX2RpcmVjdGl2ZS50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvKioKICAgICAqIEEgZGlyZWN0aXZlIHRoYXQgY2FsbHMgYG9uUmVzaXplYCB3aGVuIGEgaG9zdCBlbGVtZW50IGlzIHJlc2l6ZWQuCiAgICAgKgogICAgICogSXQgZG9lcyBub3QgZW1pdCBgb25SZXNpemVgIG9uIHRoZSBpbml0aWFsIHJlbmRlci4KICAgICAqLwogICAgY2xhc3MgUmVzaXplRGV0ZWN0b3JEaXJlY3RpdmUgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gcmVmCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IocmVmKSB7CiAgICAgICAgICAgIHRoaXMucmVzaXplRXZlbnREZWJvdW5jZVBlcmlvZEluTXMgPSAxMDA7CiAgICAgICAgICAgIHRoaXMub25SZXNpemUgPSBuZXcgRXZlbnRFbWl0dGVyKCk7CiAgICAgICAgICAgIHRoaXMubmdVbnN1YnNjcmliZSQgPSBuZXcgU3ViamVjdCgpOwogICAgICAgICAgICB0aGlzLm9uUmVzaXplJCA9IG5ldyBTdWJqZWN0KCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcmVzaXplT2JzZXJ2ZXIgPSBuZXcgUmVzaXplT2JzZXJ2ZXIoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgdGhpcy5vblJlc2l6ZSQubmV4dCgpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIHJlc2l6ZU9ic2VydmVyLm9ic2VydmUocmVmLm5hdGl2ZUVsZW1lbnQpOwogICAgICAgICAgICB0aGlzLm5nVW5zdWJzY3JpYmUkLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICByZXNpemVPYnNlcnZlci51bm9ic2VydmUocmVmLm5hdGl2ZUVsZW1lbnQpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkluaXQoKSB7CiAgICAgICAgICAgIHRoaXMub25SZXNpemUkCiAgICAgICAgICAgICAgICAucGlwZSgKICAgICAgICAgICAgLy8gV2hlbiBSZXNpemVPYnNlcnZlciBpcyBpbml0aWFsbHkgY3JlYXRlZCwgaXQgY2FsbHMgdGhlIGNhbGxiYWNrLgogICAgICAgICAgICAvLyBJZ25vcmUgdGhhdCBzaW5jZSBpdCBpcyBub3QgcmVhbGx5IGEgcmVzaXplLgogICAgICAgICAgICBza2lwKDEpLCBkZWJvdW5jZVRpbWUodGhpcy5yZXNpemVFdmVudERlYm91bmNlUGVyaW9kSW5NcyksIHRha2VVbnRpbCh0aGlzLm5nVW5zdWJzY3JpYmUkKSkKICAgICAgICAgICAgICAgIC5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgdGhpcy5vblJlc2l6ZS5lb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yXTsKICAgIGZ1bmN0aW9uIFNjYWxhckNhcmRDb21wb25lbnRfbWF0X3NwaW5uZXJfMjVfVGVtcGxhdGUocmYsIGN0eCkgeyBpZiAocmYgJiAxKSB7CiAgICAgICAgybXJtWVsZW1lbnQoMCwgIm1hdC1zcGlubmVyIiwgMTYpOwogICAgfSB9CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBSRVNJWkVfUkVEUkFXX0RFQk9VTkNFX1RJTUVfSU5fTVMgPSA1MDsKICAgIC8qKiBAdHlwZSB7P30gKi8KICAgIGNvbnN0IERFRkFVTFRfVE9PTFRJUF9DT0xVTU5TID0gWwogICAgICAgIHsKICAgICAgICAgICAgdGl0bGU6ICdOYW1lJywKICAgICAgICAgICAgZXZhbHVhdGU6ICgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBkCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoZCkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIGQuZGF0YXNldC5tZXRhZGF0YSgpLm1ldGEuZGlzcGxheU5hbWU7CiAgICAgICAgICAgIH0pLAogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgICB0aXRsZTogJ1ZhbHVlJywKICAgICAgICAgICAgZXZhbHVhdGU6ICgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBkCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoZCkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIGZvcm1hdE51bWJlciQxKGQuZGF0dW0ueSk7CiAgICAgICAgICAgIH0pLAogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgICB0aXRsZTogJ1N0ZXAnLAogICAgICAgICAgICBldmFsdWF0ZTogKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChkKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gZC5kYXR1bS5zdGVwLnRvU3RyaW5nKCk7CiAgICAgICAgICAgIH0pLAogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgICB0aXRsZTogJ1RpbWUnLAogICAgICAgICAgICBldmFsdWF0ZTogKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChkKSA9PiB7CiAgICAgICAgICAgICAgICAvLyBzZWMgdG8gbXMuCiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBkYXRlID0gbmV3IERhdGUoZC5kYXR1bS53YWxsVGltZSAqIDEwMDApOwogICAgICAgICAgICAgICAgcmV0dXJuIGRhdGUudG9Mb2NhbGVTdHJpbmcoKTsKICAgICAgICAgICAgfSksCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAgIHRpdGxlOiAnUmVsYXRpdmUnLAogICAgICAgICAgICBldmFsdWF0ZTogKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChkKSA9PiB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBkYXRhID0gZC5kYXRhc2V0LmRhdGEoKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGZpcnN0VGltZSA9IGRhdGEubGVuZ3RoID4gMCA/IGRhdGFbMF0ud2FsbFRpbWUgOiAwOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgcmVsYXRpdmVUaW1lSW5NcyA9IChkLmRhdHVtLndhbGxUaW1lIC0gZmlyc3RUaW1lKSAqIDEwMDA7CiAgICAgICAgICAgICAgICByZXR1cm4gZm9ybWF0UmVsYXRpdmVUaW1lSW5NcyhyZWxhdGl2ZVRpbWVJbk1zKTsKICAgICAgICAgICAgfSksCiAgICAgICAgfSwKICAgIF07CiAgICBjbGFzcyBTY2FsYXJDYXJkQ29tcG9uZW50IHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHJlZgogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKHJlZikgewogICAgICAgICAgICB0aGlzLnJlZiA9IHJlZjsKICAgICAgICAgICAgdGhpcy5SRVNJWkVfUkVEUkFXX0RFQk9VTkNFX1RJTUVfSU5fTVMgPSBSRVNJWkVfUkVEUkFXX0RFQk9VTkNFX1RJTUVfSU5fTVM7CiAgICAgICAgICAgIHRoaXMuRGF0YUxvYWRTdGF0ZSA9IERhdGFMb2FkU3RhdGU7CiAgICAgICAgICAgIHRoaXMub25GdWxsU2l6ZVRvZ2dsZSA9IG5ldyBFdmVudEVtaXR0ZXIoKTsKICAgICAgICAgICAgdGhpcy5vblBpbkNsaWNrZWQgPSBuZXcgRXZlbnRFbWl0dGVyKCk7CiAgICAgICAgICAgIHRoaXMueUF4aXNUeXBlID0gWUF4aXNUeXBlLkxJTkVBUjsKICAgICAgICAgICAgdGhpcy50b29sdGlwQ29sdW1ucyA9IERFRkFVTFRfVE9PTFRJUF9DT0xVTU5TOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGNoYXJ0WEF4aXNUeXBlKCkgewogICAgICAgICAgICBzd2l0Y2ggKHRoaXMueEF4aXNUeXBlKSB7CiAgICAgICAgICAgICAgICBjYXNlIFhBeGlzVHlwZSQxLlNURVA6CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFhBeGlzVHlwZS5TVEVQOwogICAgICAgICAgICAgICAgY2FzZSBYQXhpc1R5cGUkMS5XQUxMX1RJTUU6CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFhBeGlzVHlwZS5XQUxMX1RJTUU7CiAgICAgICAgICAgICAgICBjYXNlIFhBeGlzVHlwZSQxLlJFTEFUSVZFOgogICAgICAgICAgICAgICAgICAgIHJldHVybiBYQXhpc1R5cGUuUkVMQVRJVkU7CiAgICAgICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignSW52YWxpZCB4QXhpc1R5cGUgZm9yIGxpbmUgY2hhcnQuJyk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB0b2dnbGVZQXhpc1R5cGUoKSB7CiAgICAgICAgICAgIHRoaXMueUF4aXNUeXBlID0KICAgICAgICAgICAgICAgIHRoaXMueUF4aXNUeXBlID09PSBZQXhpc1R5cGUuTElORUFSID8gWUF4aXNUeXBlLkxPRyA6IFlBeGlzVHlwZS5MSU5FQVI7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVzZXREb21haW4oKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmxpbmVDaGFydCkgewogICAgICAgICAgICAgICAgdGhpcy5saW5lQ2hhcnQucmVzZXREb21haW4oKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlZHJhdygpIHsKICAgICAgICAgICAgaWYgKHRoaXMubGluZUNoYXJ0KSB7CiAgICAgICAgICAgICAgICAvLyBPbmx5IHJlZHJhdyB3aGVuIGl0IGlzIHZpc2libGUgKGFuZCB0aHVzIGhhdmUgd2lkdGggYW5kIGhlaWdodCkuCiAgICAgICAgICAgICAgICBpZiAodGhpcy5yZWYubmF0aXZlRWxlbWVudC5jbGllbnRXaWR0aCkgewogICAgICAgICAgICAgICAgICAgIHRoaXMubGluZUNoYXJ0LnJlZHJhdygpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQogICAgU2NhbGFyQ2FyZENvbXBvbmVudC5kZWNvcmF0b3JzID0gWwogICAgICAgIHsgdHlwZTogQ29tcG9uZW50LCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIHNlbGVjdG9yOiAnc2NhbGFyLWNhcmQtY29tcG9uZW50JywKICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZVVybDogJ3NjYWxhcl9jYXJkX2NvbXBvbmVudC5uZy5odG1sJywKICAgICAgICAgICAgICAgICAgICBzdHlsZVVybHM6IFsnc2NhbGFyX2NhcmRfY29tcG9uZW50LmNzcyddLAogICAgICAgICAgICAgICAgICAgIGNoYW5nZURldGVjdGlvbjogQ2hhbmdlRGV0ZWN0aW9uU3RyYXRlZ3kuT25QdXNoLAogICAgICAgICAgICAgICAgfSxdIH0sCiAgICBdOwogICAgLyoqIEBub2NvbGxhcHNlICovCiAgICBTY2FsYXJDYXJkQ29tcG9uZW50LmN0b3JQYXJhbWV0ZXJzID0gKCkgPT4gWwogICAgICAgIHsgdHlwZTogRWxlbWVudFJlZiB9CiAgICBdOwogICAgU2NhbGFyQ2FyZENvbXBvbmVudC5wcm9wRGVjb3JhdG9ycyA9IHsKICAgICAgICBsb2FkU3RhdGU6IFt7IHR5cGU6IElucHV0IH1dLAogICAgICAgIHRpdGxlOiBbeyB0eXBlOiBJbnB1dCB9XSwKICAgICAgICB0YWc6IFt7IHR5cGU6IElucHV0IH1dLAogICAgICAgIHNlcmllc0RhdGFMaXN0OiBbeyB0eXBlOiBJbnB1dCB9XSwKICAgICAgICB0b29sdGlwU29ydDogW3sgdHlwZTogSW5wdXQgfV0sCiAgICAgICAgaWdub3JlT3V0bGllcnM6IFt7IHR5cGU6IElucHV0IH1dLAogICAgICAgIHhBeGlzVHlwZTogW3sgdHlwZTogSW5wdXQgfV0sCiAgICAgICAgc2Nh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AubWF0LXByaW1hcnlbX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWItbGFiZWxbX25nY29udGVudC0lQ09NUCVde2JhY2tncm91bmQtY29sb3I6I2Y1N2MwMH0ubWF0LXByaW1hcnlbX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWItbGFiZWwtdGV4dFtfbmdjb250ZW50LSVDT01QJV17Y29sb3I6I2ZmZn0ubWF0LWFjY2VudFtfbmdjb250ZW50LSVDT01QJV0gICAubWF0LXNsaWRlci10cmFjay1maWxsW19uZ2NvbnRlbnQtJUNPTVAlXSwgLm1hdC1hY2NlbnRbX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWJbX25nY29udGVudC0lQ09NUCVdLCAubWF0LWFjY2VudFtfbmdjb250ZW50LSVDT01QJV0gICAubWF0LXNsaWRlci10aHVtYi1sYWJlbFtfbmdjb250ZW50LSVDT01QJV17YmFja2dyb3VuZC1jb2xvcjojZmY5ODAwfS5tYXQtYWNjZW50W19uZ2NvbnRlbnQtJUNPTVAlXSAgIC5tYXQtc2xpZGVyLXRodW1iLWxhYmVsLXRleHRbX25nY29udGVudC0lQ09NUCVde2NvbG9yOiNmZmZ9Lm1hdC13YXJuW19uZ2NvbnRlbnQtJUNPTVAlXSAgIC5tYXQtc2xpZGVyLXRyYWNrLWZpbGxbX25nY29udGVudC0lQ09NUCVdLCAubWF0LXdhcm5bX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWJbX25nY29udGVudC0lQ09NUCVdLCAubWF0LXdhcm5bX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWItbGFiZWxbX25nY29udGVudC0lQ09NUCVde2JhY2tncm91bmQtY29sb3I6I2Y0NDMzNn0ubWF0LXdhcm5bX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWItbGFiZWwtdGV4dFtfbmdjb250ZW50LS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WYWwsIGluZGV4KSA9PiB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbGlzdEJWYWwgPSBsaXN0QltpbmRleF07CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbGlzdEFQb2ludHMgPSBsaXN0QVZhbC5wb2ludHM7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbGlzdEJQb2ludHMgPSBsaXN0QlZhbC5wb2ludHM7CiAgICAgICAgICAgIHJldHVybiAobGlzdEFWYWwuc2VyaWVzSWQgPT09IGxpc3RCVmFsLnNlcmllc0lkICYmCiAgICAgICAgICAgICAgICBsaXN0QVZhbC5tZXRhZGF0YS5kaXNwbGF5TmFtZSA9PT0gbGlzdEJWYWwubWV0YWRhdGEuZGlzcGxheU5hbWUgJiYKICAgICAgICAgICAgICAgIGxpc3RBVmFsLnZpc2libGUgPT09IGxpc3RCVmFsLnZpc2libGUgJiYKICAgICAgICAgICAgICAgIGxpc3RBUG9pbnRzLmxlbmd0aCA9PT0gbGlzdEJQb2ludHMubGVuZ3RoICYmCiAgICAgICAgICAgICAgICBsaXN0QVBvaW50cy5ldmVyeSgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGxpc3RBUG9pbnQKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gaW5kZXgKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChsaXN0QVBvaW50LCBpbmRleCkgPT4gewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBsaXN0QlBvaW50ID0gbGlzdEJQb2ludHNbaW5kZXhdOwogICAgICAgICAgICAgICAgICAgIHJldHVybiBsaXN0QVBvaW50LnggPT09IGxpc3RCUG9pbnQueCAmJiBsa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V0YWRhdGEKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGlzU2NhbGFyQ2FyZE1ldGFkYXRhKGNhcmRNZXRhZGF0YSkgewogICAgICAgICAgICBjb25zdCB7IHBsdWdpbiB9ID0gY2FyZE1ldGFkYXRhOwogICAgICAgICAgICByZXR1cm4gcGx1Z2luID09PSBQbHVnaW5UeXBlLlNDQUxBUlM7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25GdWxsU2l6ZVRvZ2dsZSgpIHsKICAgICAgICAgICAgdGhpcy5zaG93RnVsbFNpemUgPSAhdGhpcy5zaG93RnVsbFNpemU7CiAgICAgICAgICAgIHRoaXMuZnVsbFdpZHRoQ2hhbmdlZC5lbWl0KHRoaXMuc2hvd0Z1bGxTaXplKTsKICAgICAgICAgICAgdGhpcy5mdWxsSGVpZ2h0Q2hhbmdlZC5lbWl0KHRoaXMuc2hvd0Z1bGxTaXplKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQnVpbGQgb2JzZXJ2YWJsZXMgb25jZSBjYXJkSWQgaXMgZGVmaW5lZCAoYWZ0ZXIgb25Jbml0KS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25Jbml0KCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHNlbGVjdENhcmRNZXRhZGF0YSQgPSB0aGlzLnN0b3JlLnNlbGVjdChnZXRDYXJkTWV0YWRhdGEsIHRoaXMuY2FyZElkKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjYXJkTWV0YWRhdGEkID0gc2VsZWN0Q2FyZE1ldGFkYXRhJC5waXBlKGZpbHRlcigoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY2FyZE1ldGFkYXRhCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoY2FyZE1ldGFkYXRhKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gISFjYXJkTWV0YWRhdGEgJiYgdGhpcy5pc1NjYWxhckNhcmRNZXRhZGF0YShjYXJkTWV0YWRhdGEpOwogICAgICAgICAgICB9KSksIG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY2FyZE1ldGFkYXRhCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoY2FyZE1ldGFkYXRhKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKGNhcmRNZXRhZGF0YSkpOwogICAgICAgICAgICB9KSkpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHNldHRpbmdzQW5kVGltZVNlcmllcyQgPSBjb21iaW5lTGF0ZXN0KFsKICAgICAgICAgICAgICAgIHRoaXMuc3RvcmUuc2VsZWN0KGdldE1ldHJpY3NYQXhpc1R5cGUpLAogICAgICAgICAgICAgICAgdGhpcy5zdG9yZS5zZWxlY3QoZ2V0Q2FyZFRpbWVTZXJpZXMsIHRoaXMuY2FyZElkKSwKICAgICAgICAgICAgXSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcnVuSWRBbmRQb2ludHMkID0gc2V0dGluZ3NBbmRUaW1lU2VyaWVzJC5waXBlKGZpbHRlcigoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoW3hBeGlzVHlwZSwgcnVuVG9TZXJpZXNdKSA9PiAhIXJ1blRvU2VyaWVzKSksIG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoW3hBeGlzVHlwZSwgcnVuVG9TZXJpZXNdKSA9PiAoKC8qKiBAdHlwZSB7P30gKi8gKHsgeEF4aXNUeXBlLCBydW5Ub1NlcmllcyB9KSkpKSksIG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoeyB4QXhpc1R5cGUsIHJ1blRvU2VyaWVzIH0pID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHJ1bklkcyA9IE9iamVjdC5rZXlzKHJ1blRvU2VyaWVzKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHJlc3VsdHMgPSBydW5JZHMubWFwKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcnVuSWQKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChydW5JZCkgPT4gewogICAgICAgICAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJ1bklkLAogICAgICAgICAgICAgICAgICAgICAgICBwb2ludHM6IHRoaXMuc3RlcFNlcmllc1RvTGluZVNlcmllcyhydW5Ub1Nlcmllc1tydW5JZF0sIHhBeGlzVHlwZSksCiAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHRzOwogICAgICAgICAgICB9KSkpOwogICAgICAgICAgICB0aGlzLnNlcmllc0RhdGFMaXN0JCA9IHJ1bklkQW5kUG9pbnRzJC5waXBlKHN3aXRjaE1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcnVuSWRBbmRQb2ludHMKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChydW5JZEFuZFBvaW50cykgPT4gewogICAgICAgICAgICAgICAgaWYgKCFydW5JZEFuZFBvaW50cy5sZW5ndGgpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gb2YoW10pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIGNvbWJpbmVMYXRlc3QocnVuSWRBbmRQb2ludHMubWFwKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcnVuSWRBbmRQb2ludAogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKHJ1bklkQW5kUG9pbnQpID0+IHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5nZXRSdW5EaXNwbGF5TmFtZUFuZFBvaW50cyhydW5JZEFuZFBvaW50KTsKICAgICAgICAgICAgICAgIH0pKSk7CiAgICAgICAgICAgIH0pKSwgY29tYmluZUxhdGVzdFdpdGgodGhpcy5zdG9yZS5zZWxlY3QoZ2V0Q3VycmVudFJvdXRlUnVuU2VsZWN0aW9uKSksIAogICAgICAgICAgICAvLyBXaGVuIHRoZSBgZmV0Y2hSdW5zU3VjY2VlZGVkYCBhY3Rpb24gZmlyZXMsIHRoZSBydW4gc2VsZWN0aW9uCiAgICAgICAgICAgIC8vIG1hcCBhbmQgdGhlIG1ldGFkYXRhIGNoYW5nZS4gVG8gcHJldmVudCBxdWljayBmaXJlIG9mIGNoYW5nZXMsCiAgICAgICAgICAgIC8vIGRlYm91bmNlIGJ5IGEgbWljcm90YXNrIHRvIGVtaXQgb25seSBzaW5nbGUgY2hhbmdlIGZvciB0aGUgcnVucwogICAgICAgICAgICAvLyBzdG9yZSBjaGFuZ2UuCiAgICAgICAgICAgIGRlYm91bmNlVGltZSgwKSwgbWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChbcmVzdWx0LCBydW5TZWxlY3Rpb25NYXBdKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0Lm1hcCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKHsgcnVuSWQsIGRpc3BsYXlOYW1lLCBwb2ludHMgfSkgPT4gewogICAgICAgICAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAgICAgICAgIHNlcmllc0lkOiBydW5JZCwKICAgICAgICAgICAgICAgICAgICAgICAgbWV0YWRhdGE6IHsgZGlzcGxheU5hbWUgfSwKICAgICAgICAgICAgICAgICAgICAgICAgcG9pbnRzLAogICAgICAgICAgICAgICAgICAgICAgICB2aXNpYmxlOiBCb29sZWFuKHJ1blNlbGVjdGlvbk1hcCAmJiBydW5TZWxlY3Rpb25NYXAuZ2V0KHJ1bklkKSksCiAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfSkpLCBzdGFydFdpdGgoW10pLCBkaXN0aW5jdFVudGlsQ2hhbmdlZChhcmVTZXJpZXNEYXRhTGlzdEVxdWFsKSk7CiAgICAgICAgICAgIHRoaXMubG9hZFN0YXRlJCA9IHRoaXMuc3RvcmUuc2VsZWN0KGdldENhcmRMb2FkU3RhdGUsIHRoaXMuY2FyZElkKTsKICAgICAgICAgICAgdGhpcy50YWckID0gY2FyZE1ldGFkYXRhJC5waXBlKG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY2FyZE1ldGFkYXRhCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoY2FyZE1ldGFkYXRhKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gY2FyZE1ldGFkYXRhLnRhZzsKICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgdGhpcy50aXRsZSQgPSB0aGlzLnRhZyQucGlwZShtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHRhZwogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHRhZykgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIGdldFRhZ0Rpc3BsYXlOYW1lKHRhZywgdGhpcy5ncm91cE5hbWUpOwogICAgICAgICAgICB9KSkpOwogICAgICAgICAgICB0aGlzLmlzUGlubmVkJCA9IHRoaXMuc3RvcmUuc2VsZWN0KGdldENhcmRQaW5uZWRTdGF0ZSwgdGhpcy5jYXJkSWQpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gcnVuSWRBbmRQb2ludAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0UnVuRGlzcGxheU5hbWVBbmRQb2ludHMocnVuSWRBbmRQb2ludCkgewogICAgICAgICAgICBjb25zdCB7IHJ1bklkLCBwb2ludHMgfSA9IHJ1bklkQW5kUG9pbnQ7CiAgICAgICAgICAgIHJldHVybiBjb21iaW5lTGF0ZXN0KFsKICAgICAgICAgICAgICAgIHRoaXMuc3RvcmUuc2VsZWN0KGdldEV4cGVyaW1lbnRJZEZvclJ1bklkLCB7IHJ1bklkIH0pLAogICAgICAgICAgICAgICAgdGhpcy5zdG9yZS5zZWxlY3QoZ2V0RXhwZXJpbWVudElkVG9BbGlhc01hcCksCiAgICAgICAgICAgICAgICB0aGlzLnN0b3JlLnNlbGVjdChnZXRSdW4sIHsgcnVuSWQgfSksCiAgICAgICAgICAgIF0pLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChbZXhwZXJpbWVudElkLCBpZFRvQWxpYXMsIHJ1bl0pID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGRpc3BsYXlOYW1lID0gZ2V0RGlzcGxheU5hbWVGb3JSdW4ocnVuSWQsIHJ1biwgZXhwZXJpbWVudElkID8gaWRUb0FsaWFzW2V4cGVyaW1lbnRJZF0gOiBudWxsKTsKICAgICAgICAgICAgICAgIHJldHVybiB7IHJ1bklkLCBkaXNwbGF5TmFtZSwgcG9pbnRzIH07CiAgICAgICAgICAgIH0pKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBzdGVwU2VyaWVzCiAgICAgICAgICogQHBhcmFtIHs/fSB4QXhpc1R5cGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHN0ZXBTZXJpZXNUb0xpbmVTZXJpZXMoc3RlcFNlcmllcywgeEF4aXNUeXBlKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaXNTdGVwQmFzZWQgPSB4QXhpc1R5cGUgPT09IFhBeGlzVHlwZSQxLlNURVA7CiAgICAgICAgICAgIHJldHVybiBzdGVwU2VyaWVzLm1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gc3RlcERhdHVtCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoc3RlcERhdHVtKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LCBzdGVwRGF0dW0pLCB7IHg6IGlzU3RlcEJhc2VkID8gc3RlcERhdHVtLnN0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CiAgICAgICAgICAgICAgICAgICAgc3R5bGVzOiBbCiAgICAgICAgICAgICAgICAgICAgICAgIGAKICAgICAgOmhvc3QgewogICAgICAgIGRpc3BsYXk6IGJsb2NrOwogICAgICAgIGhlaWdodDogMTAwJTsKICAgICAgfQogICAgYCwKICAgICAgICAgICAgICAgICAgICBdLAogICAgICAgICAgICAgICAgICAgIGNoYW5nZURldGVjdGlvbjogQ2hhbmdlRGV0ZWN0aW9uU3RyYXRlZ3kuT25QdXNoLAogICAgICAgICAgICAgICAgfSxdIH0sCiAgICBdOwogICAgLyoqIEBub2NvbGxhcHNlICovCiAgICBTY2FsYXJDYXJkQ29udGFpbmVyLmN0b3JQYXJhbWV0ZXJzID0gKCkgPT4gWwogICAgICAgIHsgdHlwZTogU3RvcmUgfQogICAgXTsKICAgIFNjYWxhckNhcmRDb250YWluZXIucHJvcERlY29yYXRvcnMgPSB7CiAgICAgICAgY2FyZElkOiBbeyB0eXBlOiBJbnB1dCB9XSwKICAgICAgICBncm91cE5hbWU6IFt7IHR5cGU6IElucHV0IH1dLAogICAgICAgIHJ1bkNvbG9yU2NhbGU6IFt7IHR5cGU6IElucHV0IH1dLAogICAgICAgIGZ1bGxXaWR0aENoYW5nZWQ6IFt7IHR5cGU6IE91dHB1dCB9XSwKICAgICAgICBmdWxsSGVpZ2h0Q2hhbmdlZDogW3sgdHlwZTogT3V0cHV0IH1dLAogICAgICAgIHBpblN0YXRlQ2hhbmdlZDogW3sgdHlwZTogT3V0cHV0IH1dCiAgICB9OwogICAgLyoqIEBub2NvbGxhcHNlICovIFNjYWxhckNhcmRDb250YWluZXIuybVmYWMgPSBmdW5jdGlvbiBTY2FsYXJDYXJkQ29udGFpbmVyX0ZhY3RvcnkodCkgeyByZXR1cm4gbmV3ICh0IHx8IFNjYWxhckNhcmRDb250YWluZXIpKMm1ybVkaXJlY3RpdmVJbmplY3QoU3RvcmUpKTsgfTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLyBTY2FsYXJDYXJ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sKICAgICAgICB9KTsKICAgIH0KICAgIC8qKgogICAgICogQ29tcHV0ZXMgYSByYW5nZSB0aGF0IGNvdmVycyB0aGUgYmlucyBvZiBhbGwgaW5wdXQgaGlzdG9ncmFtcy4gRmllbGRzIG1heQogICAgICogYmUgbnVsbCBpZiB0aGUgaGlzdG9ncmFtIGJpbnMgd2VyZSBlbXB0eS4KICAgICAqCiAgICAgKiBGb3IgZXhhbXBsZSwKICAgICAqIGhpc3RvZ3JhbVswXTogWyAgICAgICAgICBdWyAgXQogICAgICogaGlzdG9ncmFtWzFdOiAgICAgICAgWyAgICAgICAgICAgICAgIF0KICAgICAqIHJlc3VsdDogICAgICAgWyAgICAgICAgICAgICAgICAgICAgICBdCiAgICAgKi8KICAgIGZ1bmN0aW9uIGdldEJpblJhbmdlKGhpc3RvZ3JhbXMpIHsKICAgICAgICBsZXQgbGVmdCA9IG51bGw7CiAgICAgICAgbGV0IHJpZ2h0ID0gbnVsbDsKICAgICAgICBmb3IgKGNvbnN0IHsgYmlucyB9IG9mIGhpc3RvZ3JhbXMpIHsKICAgICAgICAgICAgaWYgKCFiaW5zLmxlbmd0aCkgewogICAgICAgICAgICAgICAgY29udGludWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY29uc3QgbGFzdEJpbiA9IGJpbnNbYmlucy5sZW5ndGggLSAxXTsKICAgICAgICAgICAgY29uc3QgaGlzdG9ncmFtTGVmdCA9IGJpbnNbMF0ueDsKICAgICAgICAgICAgY29uc3QgaGlzdG9ncmFtUmlnaHQgPSBsYXN0QmluLnggKyBsYXN0QmluLmR4OwogICAgICAgICAgICBpZiAobGVmdCA9PT0gbnVsbCB8fCBoaXN0b2dyYW1MZWZ0IDwgbGVmdCkgewogICAgICAgICAgICAgICAgbGVmdCA9IGhpc3RvZ3JhbUxlZnQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHJpZ2h0ID09PSBudWxsIHx8IGhpc3RvZ3JhbVJpZ2h0ID4gcmlnaHQpIHsKICAgICAgICAgICAgICAgIHJpZ2h0ID0gaGlzdG9ncmFtUmlnaHQ7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaWYgKGxlZnQgPT09IG51bGwgfHwgcmlnaHQgPT09IG51bGwpIHsKICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgfQogICAgICAgIHJldHVybiB7IGxlZnQsIHJpZ2h0IH07CiAgICB9CiAgICAvKioKICAgICAqIEJ1aWxkcyBhIG5ldyBsaXN0IG9mICdiaW5Db3VudCcgYmlucy5UaGUgJ3knIGNvdW50cyBmcm9tIGlucHV0IGJpbnMgYXJlCiAgICAgKiBkaXN0cmlidXRlZCBhbW9uZyB0aGUgbmV3IGJpbnMgYmFzZWQgb24gYW1vdW50IG9mIG92ZXJsYXAuCiAgICAgKiBJbnB1dCBiaW5zIG11c3QgYmUgc29ydGVkIGluIGluY3JlYXNpbmcgb3JkZXIgYW5kIG5vbi1vdmVybGFwcGluZy4KICAgICAqCiAgICAgKiBDaGFyYWN0ZXJpc3RpY3M6CiAgICAgKiAtIFRoZSBvdXRwdXQgYmlucyBhcmUgZ3VhcmFudGVlZCBjb250aWd1b3VzLCBub24tb3ZlcmxhcHBpbmcsIGVxdWFsIHdpZHRoLAogICAgICogICBhbmQgbm9uemVybyB3aWR0aC4KICAgICAqIC0gSGFuZGxlcyAwIHdpZHRoIGlucHV0IGJpbnMuIFdoZW4gYSAwIHdpZHRoIGJpbiBpcyBiZXR3ZWVuIDIgb3V0cHV0IGJpbnMsCiAgICAgKiAgIGl0cyBjb3VudHMgYXJlIGRpc3RyaWJ1dGVkIGV2ZW5seSBiZXR3ZWVuIHRoZSBuZWlnaGJvcmluZyBiaW5zLgogICAgICoKICAgICAqIEZvciBleGFtcGxlLAogICAgICogYmluczogICAgICAgWyA1IF1bICAgMTAgICBdCiAgICAgKiByYW5nZTogICAgICBbICAgICAgICAgICAgICAgICAgXQogICAgICogYmluc0NvdW50OiAgMgogICAgICogcmVzdWx0cz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gICAgICAgICAgLy8gV2hlbiB0aGUgcmVzdWx0IGJpbiBjb21wbGV0ZXMsIGJyZWFrIHdpdGhvdXQgaW5jcmVtZW50aW5nIGJpbkluZGV4LCBpbgogICAgICAgICAgICAgICAgLy8gY2FzZSBpdCBjb250cmlidXRlcyB0byB0aGUgdGhlIG5leHQgcmVzdWx0IGJpbi4KICAgICAgICAgICAgICAgIGlmIChiaW4ueCArIGJpbi5keCA+IHJlc3VsdFJpZ2h0KSB7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBiaW5JbmRleCsrOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJlc3VsdHMucHVzaCh7IHg6IHJlc3VsdExlZnQsIGR4LCB5OiByZXN1bHRZIH0pOwogICAgICAgIH0KICAgICAgICByZXR1cm4gcmVzdWx0czsKICAgIH0KICAgIC8qKgogICAgICogQ29tcHV0ZXMgaG93IG11Y2ggb2YgdGhlIGlucHV0IGJpbidzICd5JyBjb3VudHMgc2hvdWxkIGJlIGFsbG9jYXRlZCB0byBhIG5ldwogICAgICogcmFuZ2UuIEZvciAwIHdpZHRoIGlucHV0IGJpbnMsIHRoZSBhbGxvY2F0aW9uIG1heSBiZSBzcGxpdCBpbiBoYWxmIGFjcm9zcyAyCiAgICAgKiBiaW5zLgogICAgICovCiAgICBmdW5jdGlvbiBnZXRCaW5Db250cmlidXRpb24oYmluLCByZXN1bHRMZWZ0LCByZXN1bHRSaWdodCwgcmVzdWx0SGFzUmlnaHROZWlnaGJvcikgewogICAgICAgIGNvbnN0IGJpbkxlZnQgPSBiaW4ueDsKICAgICAgICBjb25zdCBiaW5SaWdodCA9IGJpbi54ICsgYmluLmR4OwogICAgICAgIGlmIChiaW5MZWZ0ID4gcmVzdWx0UmlnaHQgfHwgYmluUmlnaHQgPCByZXN1bHRMZWZ0KSB7CiAgICAgICAgICAgIHJldHVybiB7IGN1cnI6IDAsIG5leHQ6IDAgfTsKICAgICAgICB9CiAgICAgICAgaWYgKGJpbi5keCA9PT0gMCkgewogICAgICAgICAgICBpZiAocmVzdWx0SGFzUmlnaHROZWlnaGJvciAmJiBiaW5SaWdodCA9PT0gcmVzdWx0UmlnaHQpIHsKICAgICAgICAgICAgICAgIHJldHVybiB7IGN1cnI6IDAuNSAqIGJpbi55LCBuZXh0OiAwLjUgKiBiaW4ueSB9OwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB7IGN1cnI6IGJpbi55LCBuZXh0OiAwIH07CiAgICAgICAgfQogICAgICAgIGNvbnN0IGludGVyc2VjdGlvbiA9IE1hdGgubWluKGJpblJpZ2h0LCByZXN1bHRSaWdodCkgLSBNYXRoLm1heChiaW5MZWZ0LCByZXN1bHRMZWZ0KTsKICAgICAgICByZXR1cm4geyBjdXJyOiAoYmluLnkgKiBpbnRlcnNlY3Rpb24pIC8gYmluLmR4LCBuZXh0OiAwIH07CiAgICB9CgogICAgLyoqCiAgICAgKiBAZmlsZW92ZXJ2aWV3IGFkZGVkIGJ5IHRzaWNrbGUKICAgICAqIEdlbmVyYXRlZCBmcm9tOiB0ZW5zb3Jib2FyZC93ZWJhcHAvd2lkZ2V0cy9oaXN0b2dyYW0vaGlzdG9ncmFtX2NvbXBvbmVudC50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICBjbGFzcyBIaXN0b2dyYW1Db21wb25lbnQgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gaG9zdAogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKGhvc3QpIHsKICAgICAgICAgICAgdGhpcy5ob3N0ID0gaG9zdDsKICAgICAgICAgICAgdGhpcy5tb2RlID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WN0bHkgMzAgYmlucyBmb3IgYSBjb3VwbGUgcmVhc29uczoKICAgICAgICAgKiAtIEhpZ2ggbnVtYmVyIG9mIGJpbnMgd2lsbCByZW5kZXIgdmlzdWFsIGFydGlmYWN0cy4KICAgICAgICAgKiAtIFZ6SGlzdG9ncmFtVGltZXNlcmllcyBleHBlY3RzIGFsbCBoaXN0b2dyYW1zIGF0IGVhY2ggc3RlcCB0byBoYXZlIHRoZQogICAgICAgICAqICAgc2FtZSBudW1iZXIgb2YgYmlucy4gSG92ZXJpbmcgb3ZlciBhIEhpc3RvZ3JhbUNvbXBvbmVudCB3aXRoIGJpbiBjb3VudAogICAgICAgICAqICAgaW5lcXVhbGl0eSB0aHJvd3MgZXJyb3JzLgogICAgICAgICAqIFNlZSB0ZW5zb3Jib2FyZC9wbHVnaW5zL2hpc3RvZ3JhbS90Zl9oaXN0b2dyYW1fZGFzaGJvYXJkL2hpc3RvZ3JhbUNvcmUudHMKICAgICAgICAgKiBAcGFyYW0gez99IGNoYW5nZXMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25DaGFuZ2VzKGNoYW5nZXMpIHsKICAgICAgICAgICAgaWYgKGNoYW5nZXNbJ25hbWUnXSB8fCBjaGFuZ2VzWydkYXRhJ10pIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGZvcm1hdHRlZERhdGEgPSB0aGlzLmRhdGEubWFwKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZGF0dW0KICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChkYXR1bSkgPT4gewogICAgICAgICAgICAgICAgICAgIGNvbnN0IHsgc3RlcCwgYmlucyB9ID0gZGF0dW07CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHsgc3RlcCwgYmlucywgd2FsbF90aW1lOiBkYXR1bS53YWxsVGltZSB9OwogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgdGhpcy5lbGVtZW50LnNldFNlcmllc0RhdGEodGhpcy5uYW1lLCBmb3JtYXR0ZWREYXRhKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoY2hhbmdlc1snbW9kZSddKSB7CiAgICAgICAgICAgICAgICB0aGlzLmVsZW1lbnQubW9kZSA9IHRoaXMubW9kZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoY2hhbmdlc1sndGltZVByb3BlcnR5J10pIHsKICAgICAgICAgICAgICAgIHRoaXMuZWxlbWVudC50aW1lUHJvcGVydHkgPSB0aGlzLnRpbWVQcm9wZXJ0eTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoY2hhbmdlc1snY29sb3JTY2FsZSddICYmIHRoaXMuY29sb3JTY2FsZSkgewogICAgICAgICAgICAgICAgdGhpcy5lbGVtZW50LmNvbG9yU2NhbGUgPSB0aGlzLmNvbG9yU2NhbGU7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZWRyYXcoKSB7CiAgICAgICAgICAgIHRoaXMuZWxlbWVudC5yZWRyYXcoKTsKICAgICAgICB9CiAgICB9CiAgICBIaXN0b2dyYW1Db21wb25lbnQuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IENvbXBvbmVudCwgYXJnczogW3sKICAgICAgICAgICAgICAgICAgICBzZWxlY3RvcjogJ3RiLWhpc3RvZ3JhbScsCiAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU6ICcnLAogICAgICAgICAgICAgICAgICAgIHN0eWxlczogWwogICAgICAgICAgICAgICAgICAgICAgICBgCiAgICAgIDpob3N0IHsKICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICB9CiAgICBgLAogICAgICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAg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RCk7CiAgICB9IH0KICAgIGNvbnN0IF9jNiQyID0gZnVuY3Rpb24gKGEwKSB7IHJldHVybiB7IGJhY2tncm91bmRDb2xvcjogYTAgfTsgfTsKICAgIC8qKiBAdHlwZSB7P30gKi8KICAgIGNvbnN0IFJFU0laRV9SRURSQVdfREVCT1VOQ0VfVElNRV9JTl9NUyQxID0gNTA7CiAgICBjbGFzcyBIaXN0b2dyYW1DYXJkQ29tcG9uZW50IHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHJlZgogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKHJlZikgewogICAgICAgICAgICB0aGlzLnJlZiA9IHJlZjsKICAgICAgICAgICAgdGhpcy5SRVNJWkVfUkVEUkFXX0RFQk9VTkNFX1RJTUVfSU5fTVMgPSBSRVNJWkVfUkVEUkFXX0RFQk9VTkNFX1RJTUVfSU5fTVMkMTsKICAgICAgICAgICAgdGhpcy5EYXRhTG9hZFN0YXRlID0gRGF0YUxvYWRTdGF0ZTsKICAgICAgICAgICAgdGhpcy5vbkZ1bGxTaXplVG9nZ2xlID0gbmV3IEV2ZW50RW1pdHRlcigpOwogICAgICAgICAgICB0aGlzLm9uUGluQ2xpY2tlZCA9IG5ldyBFdmVudEVtaXR0ZXIoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB4QXhpc1R5cGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHRpbWVQcm9wZXJ0eSh4QXhpc1R5cGUpIHsKICAgICAgICAgICAgc3dpdGNoICh4QXhpc1R5cGUpIHsKICAgICAgICAgICAgICAgIGNhc2UgWEF4aXNUeXBlJDEuU1RFUDoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gVGltZVByb3BlcnR5LlNURVA7CiAgICAgICAgICAgICAgICBjYXNlIFhBeGlzVHlwZSQxLldBTExfVElNRToKICAgICAgICAgICAgICAgICAgICByZXR1cm4gVGltZVByb3BlcnR5LldBTExfVElNRTsKICAgICAgICAgICAgICAgIGNhc2UgWEF4aXNUeXBlJDEuUkVMQVRJVkU6CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFRpbWVQcm9wZXJ0eS5SRUxBVElWRTsKICAgICAgICAgICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdJbnZhbGlkIHhBeGlzVHlwZSBmb3IgaGlzdG9ncmFtIHRpbWUgcHJvcGVydHkuJyk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZWRyYXcoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmhpc3RvZ3JhbUNvbXBvbmVudCkgewogICAgICAgICAgICAgICAgLy8gT25seSByZWRyYXcgd2hlbiBpdCBpcyB2aXNpYmxlIChhbmQgdGh1cyBoYXZlIHdpZHRoIGFuZCBoZWlnaHQpLgogICAgICAgICAgICAgICAgaWYgKHRoaXMucmVmLm5hdGl2ZUVsZW1lbnQuY2xpZW50SGVpZ2h0KSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5oaXN0b2dyYW1Db21wb25lbnQucmVkcmF3KCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICBIaXN0b2dyYW1DYXJkQ29tcG9uZW50LmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBDb21wb25lbnQsIGFyZ3M6IFt7CiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3I6ICdoaXN0b2dyYW0tY2FyZC1jb21wb25lbnQnLAogICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlVXJsOiAnaGlzdG9ncmFtX2NhcmRfY29tcG9uZW50Lm5nLmh0bWwnLAogICAgICAgICAgICAgICAgICAgIHN0eWxlVXJsczogWydoaXN0b2dyYW1fY2FyZF9jb21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z1bGxTaXplKTsKICAgICAgICAgICAgdGhpcy5mdWxsSGVpZ2h0Q2hhbmdlZC5lbWl0KHRoaXMuc2hvd0Z1bGxTaXplKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQnVpbGQgb2JzZXJ2YWJsZXMgb25jZSBjYXJkSWQgaXMgZGVmaW5lZCAoYWZ0ZXIgb25Jbml0KS4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25Jbml0KCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHNlbGVjdENhcmRNZXRhZGF0YSQgPSB0aGlzLnN0b3JlLnNlbGVjdChnZXRDYXJkTWV0YWRhdGEsIHRoaXMuY2FyZElkKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjYXJkTWV0YWRhdGEkID0gc2VsZWN0Q2FyZE1ldGFkYXRhJC5waXBlKGZpbHRlcigoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY2FyZE1ldGFkYXRhCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoY2FyZE1ldGFkYXRhKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gISFjYXJkTWV0YWRhdGEgJiYgdGhpcy5pc0hpc3RvZ3JhbUNhcmRNZXRhZGF0YShjYXJkTWV0YWRhdGEpOwogICAgICAgICAgICB9KSksIG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY2FyZE1ldGFkYXRhCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoY2FyZE1ldGFkYXRhKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKGNhcmRNZXRhZGF0YSkpOwogICAgICAgICAgICB9KSkpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG1ldGFkYXRhQW5kU2VyaWVzJCA9IGNvbWJpbmVMYXRlc3QoWwogICAgICAgICAgICAgICAgY2FyZE1ldGFkYXRhJCwKICAgICAgICAgICAgICAgIHRoaXMuc3RvcmUuc2VsZWN0KGdldENhcmRUaW1lU2VyaWVzLCB0aGlzLmNhcmRJZCksCiAgICAgICAgICAgIF0pOwogICAgICAgICAgICB0aGlzLmRhdGEkID0gbWV0YWRhdGFBbmRTZXJpZXMkLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChbY2FyZE1ldGFkYXRhLCBydW5Ub1Nlcmllc10pID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHJ1bklkID0gY2FyZE1ldGFkYXRhLnJ1bklkOwogICAgICAgICAgICAgICAgaWYgKCFydW5Ub1NlcmllcyB8fCAhcnVuVG9TZXJpZXMuaGFzT3duUHJvcGVydHkocnVuSWQpKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFtdOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3Qgc2VyaWVzID0gKC8qKiBAdHlwZSB7P30gKi8gKHJ1blRvU2VyaWVzW3J1bklkXSkpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgcmVzdWx0ID0gc2VyaWVzLm1hcCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGRhdHVtCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoZGF0dW0pID0+IHsKICAgICAgICAgICAgICAgICAgICBjb25zdCB7IHdhbGxUaW1lLCBzdGVwIH0gPSBkYXR1bTsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgYmlucyA9IGRhdHVtLmJpbnMubWFwKCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGJpbgogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKGJpbikgPT4gewogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4geyB4OiBiaW4ubWluLCBkeDogYmluLm1heCAtIGJpbi5taW4sIHk6IGJpbi5jb3VudCB9OwogICAgICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4geyB3YWxsVGltZSwgc3RlcCwgYmlucyB9OwogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgcmV0dXJuIGJ1aWxkTm9ybWFsaXplZEhpc3RvZ3JhbXMocmVzdWx0KTsKICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgdGhpcy5sb2FkU3RhdGUkID0gdGhpcy5zdG9yZS5zZWxlY3QoZ2V0Q2FyZExvYWRTdGF0ZSwgdGhpcy5jYXJkSWQpOwogICAgICAgICAgICB0aGlzLnRhZyQgPSBjYXJkTWV0YWRhdGEkLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjYXJkTWV0YWRhdGEKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChjYXJkTWV0YWRhdGEpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiBjYXJkTWV0YWRhdGEudGFnOwogICAgICAgICAgICB9KSkpOwogICAgICAgICAgICB0aGlzLnRpdGxlJCA9IHRoaXMudGFnJC5waXBlKG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdGFnCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAodGFnKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gZ2V0VGFnRGlzcGxheU5hbWUodGFnLCB0aGlzLmdyb3VwTmFtZSk7CiAgICAgICAgICAgIH0pKSk7CiAgICAgICAgICAgIHRoaXMucnVuSWQkID0gY2FyZE1ldGFkYXRhJC5waXBlKG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY2FyZE1ldGFkYXRhCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoY2FyZE1ldGFkYXRhKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gY2FyZE1ldGFkYXRhLnJ1bklkOwogICAgICAgICAgICB9KSkpOwogICAgICAgICAgICB0aGlzLmlzUGlubmVkJCA9IHRoaXMuc3RvcmUuc2VsZWN0KGdldENhcmRQaW5uZWRTdGF0ZSwgdGhpcy5jYXJkSWQpOwogICAgICAgIH0KICAgIH0KICAgIEhpc3RvZ3JhbUNhcmRDb250YWluZXIuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IENvbXBvbmVudCwgYXJnczogW3sKICAgICAgICAgICAgICAgICAgICBzZWxlY3RvcjogJ2hpc3RvZ3JhbS1jYXJkJywKICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogYAogICAgPGhpc3RvZ3JhbS1jYXJkLWNvbXBvbmVudAogICAgICBbbG9hZFN0YXRlXT0ibG9hZFN0YXRlJCB8IGFzeW5jIgogICAgICBbdGl0bGVdPSJ0aXRsZSQgfCBhc3luYyIKICAgICAgW3RhZ109InRhZyQgfCBhc3luYyIKICAgICAgW3J1bklkXT0icnVuSWQkIHwgYXN5bmMiCiAgICAgIFtkYXRhXT0iZGF0YSQgfCBhc3luYyIKICAgICAgW21vZGVdPSJtb2RlJCB8IGFzeW5jIgogICA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AgICAgIMm1ybVlbGVtZW50RW5kKCk7CiAgICB9IGlmIChyZiAmIDIpIHsKICAgICAgICBjb25zdCBjdHhfcjMgPSDJtcm1bmV4dENvbnRleHQoKTsKICAgICAgICDJtcm1YWR2YW5jZSgxKTsKICAgICAgICDJtcm1dGV4dEludGVycG9sYXRlMSgiUGxhY2Vob2xkZXIgZXJyb3IgZm9yOiAiLCBjdHhfcjMuY2FyZElkLCAiIik7CiAgICB9IH0KICAgIGNsYXNzIENhcmRWaWV3Q29tcG9uZW50IHsKICAgICAgICBjb25zdHJ1Y3RvcigpIHsKICAgICAgICAgICAgdGhpcy5QbHVnaW5UeXBlID0gUGx1Z2luVHlwZTsKICAgICAgICAgICAgdGhpcy5mdWxsV2lkdGhDaGFuZ2VkID0gbmV3IEV2ZW50RW1pdHRlcigpOwogICAgICAgICAgICB0aGlzLmZ1bGxIZWlnaHRDaGFuZ2VkID0gbmV3IEV2ZW50RW1pdHRlcigpOwogICAgICAgICAgICB0aGlzLnBpblN0YXRlQ2hhbmdlZCA9IG5ldyBFdmVudEVtaXR0ZXIoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBzaG93RnVsbFdpZHRoCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvbkZ1bGxXaWR0aENoYW5nZWQoc2hvd0Z1bGxXaWR0aCkgewogICAgICAgICAgICB0aGlzLmZ1bGxXaWR0aENoYW5nZWQuZW1pdChzaG93RnVsbFdpZHRoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBzaG93RnVsbEhlaWdodAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25GdWxsSGVpZ2h0Q2hhbmdlZChzaG93RnVsbEhlaWdodCkgewogICAgICAgICAgICB0aGlzLmZ1bGxIZWlnaHRDaGFuZ2VkLmVtaXQoc2hvd0Z1bGxIZWlnaHQpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uUGluU3RhdGVDaGFuZ2VkKCkgewogICAgICAgICAgICB0aGlzLnBpblN0YXRlQ2hhbmdlZC5lbWl0KCk7CiAgICAgICAgfQogICAgfQogICAgQ2FyZFZpZXdDb21wb25lbnQuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IENvbXBvbmVudCwgYXJnczogW3sKICAgICAgICAgICAgICAgICAgICBzZWxlY3RvcjogJ2NhcmQtdmlldy1jb21wb25lbnQnLAogICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlVXJsOiAnY2FyZF92aWV3X2NvbXBvbmVudC5uZy5odG1sJywKICAgICAgICAgICAgICAgICAgICBjaGFuZ2VEZXRlY3Rpb246IENoYW5nZURldGVjdGlvblN0cmF0ZWd5Lk9uUHVzaCwKICAgICAgICAgICAgICAgIH0sXSB9LAogICAgXTsKICAgIENhcmRWaWV3Q29tcG9uZW50LnByb3BEZWNvcmF0b3JzID0gewogICAgICAgIGNhcmRJZDogW3sgdHlwZTogSW5wdXQgfV0sCiAgICAgICAgZ3JvdXBOYW1lOiBbeyB0eXBlOiBJbnB1dCB9XSwKICAgICAgICBwbHVnaW5UeXBlOiBbeyB0eXBlOiBJbnB1dCB9XSwKICAgICAgICBydW5Db2xvclNjYWxlOiBbeyB0eXBlOiBJbnB1dCB9XSwKICAgICAgICBmdWxsV2lkdGhDaGFuZ2VkOiBbeyB0eXBlOiBPdXRwdXQgfV0sCiAgICAgICAgZnVsbEhlaWdodENoYW5nZWQ6IFt7IHR5cGU6IE91dHB1dCB9XSwKICAgICAgICBwaW5TdGF0ZUNoYW5nZWQ6IFt7IHR5cGU6IE91dHB1dCB9XQogICAgfTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLyBDYXJkVmlld0NvbXBvbmVudC7JtWZhYyA9IGZ1bmN0aW9uIENhcmRWaWV3Q29tcG9uZW50X0Zh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z6X2xpbmVfY2hhcnQyL3Z6LWxpbmUtY2hhcnQyLmpzP2w9MzQzLTM2MAogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgUlVOX0NPTE9SX1VQREFURV9USFJPVFRMRV9USU1FX0lOX01TID0gMzUwOwogICAgY2xhc3MgQ2FyZFZpZXdDb250YWluZXIgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gc3RvcmUKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihzdG9yZSkgewogICAgICAgICAgICB0aGlzLnN0b3JlID0gc3RvcmU7CiAgICAgICAgICAgIHRoaXMuc2hvd0Z1bGxXaWR0aCA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLnNob3dGdWxsSGVpZ2h0ID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMucnVuQ29sb3JTY2FsZSQgPSB0aGlzLnN0b3JlCiAgICAgICAgICAgICAgICAuc2VsZWN0KGdldFJ1bkNvbG9yTWFwKQogICAgICAgICAgICAgICAgLnBpcGUodGhyb3R0bGVUaW1lKFJVTl9DT0xPUl9VUERBVEVfVEhST1RUTEVfVElNRV9JTl9NUywgdW5kZWZpbmVkLCB7CiAgICAgICAgICAgICAgICBsZWFkaW5nOiB0cnVlLAogICAgICAgICAgICAgICAgdHJhaWxpbmc6IHRydWUsCiAgICAgICAgICAgIH0pLCBtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGNvbG9yTWFwCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoY29sb3JNYXApID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiAoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHJ1bklkCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAocnVuSWQpID0+IHsKICAgICAgICAgICAgICAgICAgICBpZiAoIWNvbG9yTWFwLmhhc093blByb3BlcnR5KHJ1bklkKSkgewogICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYFtDb2xvciBzY2FsZV0gdW5rbm93biBydW5JZDogJHtydW5JZH0uYCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHJldHVybiBjb2xvck1hcFtydW5JZF07CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfSkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBzaG93RnVsbFdpZHRoCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvbkZ1bGxXaWR0aENoYW5nZWQoc2hvd0Z1bGxXaWR0aCkgewogICAgICAgICAgICB0aGlzLnNob3dGdWxsV2lkdGggPSBzaG93RnVsbFdpZHRoOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHNob3dGdWxsSGVpZ2h0CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvbkZ1bGxIZWlnaHRDaGFuZ2VkKHNob3dGdWxsSGVpZ2h0KSB7CiAgICAgICAgICAgIHRoaXMuc2hvd0Z1bGxIZWlnaHQgPSBzaG93RnVsbEhlaWdodDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvblBpblN0YXRlQ2hhbmdlZCgpIHsKICAgICAgICAgICAgdGhpcy5zdG9yZQogICAgICAgICAgICAgICAgLnNlbGVjdChnZXRDYXJkUGlubmVkU3RhdGUsIHRoaXMuY2FyZElkKQogICAgICAgICAgICAgICAgLnBpcGUodGFrZSgxKSwgd2l0aExhdGVzdEZyb20odGhpcy5zdG9yZS5zZWxlY3QoZ2V0Q2FuQ3JlYXRlTmV3UGlucykpKQogICAgICAgICAgICAgICAgLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoW3dhc1Bpbm5lZCwgY2FuQ3JlYXRlTmV3UGluc10pID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuc3RvcmUuZGlzcGF0Y2goY2FyZFBpblN0YXRlVG9nZ2xlZCh7CiAgICAgICAgICAgICAgICAgICAgY2FyZElkOiB0aGlzLmNhcmRJZCwKICAgICAgICAgICAgICAgICAgICBjYW5DcmVhdGVOZXdQaW5zLAogICAgICAgICAgICAgICAgICAgIHdhc1Bpbm5lZCwKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgIH0KICAgIENhcmRWaWV3Q29udGFpbmVyLmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBDb21wb25lbnQsIGFyZ3M6IFt7CiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3I6ICdjYXJkLXZpZXcnLAogICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlOiBgCiAgICA8Y2FyZC12aWV3LWNvbXBvbmVudAogICAgICBbY2FyZElkXT0iY2FyZElkIgogICAgICBbZ3JvdXBOYW1lXT0iZ3JvdXBOYW1lIgogICAgICBbcGx1Z2luVHlwZV09InBsdWdpblR5cGUiCiAgICAgIFtydW5Db2xvclNjYWxlXT0icnVuQ29sb3JTY2FsZSQgfCBhc3luYyIKICAgICAgKGZ1bGxXaWR0aENoYW5nZWQpPSJvbkZ1bGxXaWR0aENoYW5nZWQoJGV2ZW50KSIKICAgICAgKGZ1bGxIZWlnaHRDaGFuZ2VkKT0ib25GdWxsSGVpZ2h0Q2hhbmdlZCgkZXZlbnQpIgogICAgICAocGluU3RhdGVDaGFuZ2VkKT0ib25QaW5TdGF0ZUNoYW5nZWQoKSIKICAgID4KICAgIDwvY2FyZC12aWV3LWNvbXBvbmVudD4KICBgLAogICAgICAgICAgICAg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yNiA9IGN0eC5pc0JvdHRvbUNvbnRyb2w7CiAgICAgICAgY29uc3QgY3R4X3I0ID0gybXJtW5leHRDb250ZXh0KCk7CiAgICAgICAgybXJtXByb3BlcnR5KCJuZ0lmIiwgY3R4X3I0LnNob3dQYWdpbmF0aW9uQ29udHJvbHMgfHwgY3R4X3I0LnNob3dFeHBhbmQoaXNCb3R0b21Db250cm9sX3I2KSk7CiAgICB9IH0KICAgIGNvbnN0IF9jOSQxID0gZnVuY3Rpb24gKCkgeyByZXR1cm4geyBpc0JvdHRvbUNvbnRyb2w6IGZhbHNlIH07IH07CiAgICBjb25zdCBfYzEwID0gZnVuY3Rpb24gKCkgeyByZXR1cm4geyBpc0JvdHRvbUNvbnRyb2w6IHRydWUgfTsgfTsKICAgIGNsYXNzIENhcmRHcmlkQ29tcG9uZW50IHsKICAgICAgICBjb25zdHJ1Y3RvcigpIHsKICAgICAgICAgICAgdGhpcy5QbHVnaW5UeXBlID0gUGx1Z2luVHlwZTsKICAgICAgICAgICAgdGhpcy5wYWdlSW5kZXhDaGFuZ2VkID0gbmV3IEV2ZW50RW1pdHRlcigpOwogICAgICAgICAgICB0aGlzLmdyb3VwRXhwYW5zaW9uVG9nZ2xlZCA9IG5ldyBFdmVudEVtaXR0ZXIoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBpc0JvdHRvbUNvbnRyb2wKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNob3dFeHBhbmQoaXNCb3R0b21Db250cm9sKSB7CiAgICAgICAgICAgIHJldHVybiBpc0JvdHRvbUNvbnRyb2wgPyB0aGlzLmlzR3JvdXBFeHBhbmRhYmxlIDogZmFsc2U7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gaXNCb3R0b21Db250cm9sCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzaG93UGFnaW5hdGlvbklucHV0KGlzQm90dG9tQ29udHJvbCkgewogICAgICAgICAgICByZXR1cm4gaXNCb3R0b21Db250cm9sOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGluZGV4CiAgICAgICAgICogQHBhcmFtIHs/fSBjYXJkSWRXaXRoTWV0YWRhdGEKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHRyYWNrQnlDYXJkcyhpbmRleCwgY2FyZElkV2l0aE1ldGFkYXRhKSB7CiAgICAgICAgICAgIHJldHVybiBjYXJkSWRXaXRoTWV0YWRhdGEuY2FyZElkOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvblBhZ2luYXRpb25JbnB1dENoYW5nZShldmVudCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGlucHV0ID0gKC8qKiBAdHlwZSB7P30gKi8gKGV2ZW50LnRhcmdldCkpOwogICAgICAgICAgICBpZiAoZXZlbnQudHlwZSA9PT0gJ2lucHV0JyAmJiBpbnB1dC52YWx1ZSA9PT0gJycpIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGN1cnJlbnRWYWx1ZSA9IE51bWJlcihpbnB1dC52YWx1ZSkgLSAxOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG5leHRWYWx1ZSA9IE1hdGgubWluKE1hdGgubWF4KDAsIGN1cnJlbnRWYWx1ZSksIHRoaXMubnVtUGFnZXMgLSAxKTsKICAgICAgICAgICAgLy8gUmVjdGlmeWluZyBsb2dpYyBpcyBhdCB0aGUgY29udGFpbmVyIGJ1dCB0aGUgcmVjdGlmaWVkIHZhbHVl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GlkZXItdGh1bWJbX25nY29udGVudC0lQ09NUCVdLCAubWF0LXByaW1hcnlbX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWItbGFiZWxbX25nY29udGVudC0lQ09NUCVde2JhY2tncm91bmQtY29sb3I6I2Y1N2MwMH0ubWF0LXByaW1hcnlbX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWItbGFiZWwtdGV4dFtfbmdjb250ZW50LSVDT01QJV17Y29sb3I6I2ZmZn0ubWF0LWFjY2VudFtfbmdjb250ZW50LSVDT01QJV0gICAubWF0LXNsaWRlci10cmFjay1maWxsW19uZ2NvbnRlbnQtJUNPTVAlXSwgLm1hdC1hY2NlbnRbX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWJbX25nY29udGVudC0lQ09NUCVdLCAubWF0LWFjY2VudFtfbmdjb250ZW50LSVDT01QJV0gICAubWF0LXNsaWRlci10aHVtYi1sYWJlbFtfbmdjb250ZW50LSVDT01QJV17YmFja2dyb3VuZC1jb2xvcjojZmY5ODAwfS5tYXQtYWNjZW50W19uZ2NvbnRlbnQtJUNPTVAlXSAgIC5tYXQtc2xpZGVyLXRodW1iLWxhYmVsLXRleHRbX25nY29udGVudC0lQ09NUCVde2NvbG9yOiNmZmZ9Lm1hdC13YXJuW19uZ2NvbnRlbnQtJUNPTVAlXSAgIC5tYXQtc2xpZGVyLXRyYWNrLWZpbGxbX25nY29udGVudC0lQ09NUCVdLCAubWF0LXdhcm5bX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWJbX25nY29udGVudC0lQ09NUCVdLCAubWF0LXdhcm5bX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWItbGFiZWxbX25nY29udGVudC0lQ09NUCVde2JhY2tncm91bmQtY29sb3I6I2Y0NDMzNn0ubWF0LXdhcm5bX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZX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VwIGNhbiBiZSBjb2xsYXBzZWQuIEV2ZW4gd2hlbiBpdCBpcyBjb2xsYXBzZWQsIHdlIHNob3cgdGhyZWUgY2FyZHMuCiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBJVEVNU19DT0xMQVBTRURfQ0xJUF9TSVpFID0gMzsKICAgIGNsYXNzIENhcmRHcmlkQ29udGFpbmVyIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHN0b3JlCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3Ioc3RvcmUpIHsKICAgICAgICAgICAgdGhpcy5zdG9yZSA9IHN0b3JlOwogICAgICAgICAgICAvLyBncm91cE5hbWUgbXVzdCBiZSBub24tbnVsbCBpZiB0aGUgZ3JvdXAgc2hvdWxkIGJlIGNvbGxhcHNlL2V4cGFuZC1hYmxlLgogICAgICAgICAgICB0aGlzLmdyb3VwTmFtZSA9IG51bGw7CiAgICAgICAgICAgIHRoaXMuZ3JvdXBOYW1lJCA9IG5ldyBCZWhhdmlvclN1YmplY3QobnVsbCk7CiAgICAgICAgICAgIHRoaXMucGFnZUluZGV4JCA9IG5ldyBCZWhhdmlvclN1YmplY3QoMCk7CiAgICAgICAgICAgIHRoaXMuaXRlbXMkID0gbmV3IEJlaGF2aW9yU3ViamVjdChbXSk7CiAgICAgICAgICAgIHRoaXMubnVtUGFnZXMkID0gY29tYmluZUxhdGVzdChbCiAgICAgICAgICAgICAgICB0aGlzLml0ZW1zJCwKICAgICAgICAgICAgICAgIHRoaXMuc3RvcmUuc2VsZWN0KGdldFBhZ2VTaXplKSwKICAgICAgICAgICAgXSkucGlwZShtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKFtpdGVtcywgcGFnZVNpemVdKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gTWF0aC5jZWlsKGl0ZW1zLmxlbmd0aCAvIHBhZ2VTaXplKTsKICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgdGhpcy5pc0dyb3VwRXhwYW5kZWQkID0gdGhpcy5ncm91cE5hbWUkLnBpcGUoc3dpdGNoTWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBncm91cE5hbWUKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChncm91cE5hbWUpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiBncm91cE5hbWUgIT09IG51bGwKICAgICAgICAgICAgICAgICAgICA/IHRoaXMuc3RvcmUuc2VsZWN0KGdldE1ldHJpY3NUYWdHcm91cEV4cGFuc2lvblN0YXRlLCBncm91cE5hbWUpCiAgICAgICAgICAgICAgICAgICAgOiBvZih0cnVlKTsKICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgdGhpcy5zaG93UGFnaW5hdGlvbkNvbnRyb2xzJCA9IGNvbWJpbmVMYXRlc3QoWwogICAgICAgICAgICAgICAgdGhpcy5udW1QYWdlcyQsCiAgICAgICAgICAgICAgICB0aGlzLnN0b3JlLnNlbGVjdChnZXRQYWdlU2l6ZSksCiAgICAgICAgICAgICAgICB0aGlzLmlzR3JvdXBFeHBhbmRlZCQsCiAgICAgICAgICAgIF0pLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChbbnVtUGFnZXMsIHBhZ2VTaXplLCBpc0dyb3VwRXhwYW5kZWRdKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAobnVtUGFnZXMgPD0gMSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiBwYWdlU2l6ZSA8PSBJVEVNU19DT0xMQVBTRURfQ0xJUF9TSVpFIHx8IGlzR3JvdXBFeHBhbmRlZDsKICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgdGhpcy5pc0dyb3VwRXhwYW5kYWJsZSQgPSBjb21iaW5lTGF0ZXN0KFsKICAgICAgICAgICAgICAgIHRoaXMuaXRlbXMkLAogICAgICAgICAgICAgICAgdGhpcy5zdG9yZS5zZWxlY3QoZ2V0UGFnZVNpemUpLAogICAgICAgICAgICBdKS5waXBlKG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoW2l0ZW1zLCBwYWdlU2l6ZV0pID0+IHsKICAgICAgICAgICAgICAgIGlmICh0aGlzLmdyb3VwTmFtZSA9PT0gbnVsbCB8fAogICAgICAgICAgICAgICAgICAgIHBhZ2VTaXplIDw9IElURU1TX0NPTExBUFNFRF9DTElQX1NJWkUgfHwKICAgICAgICAgICAgICAgICAgICBpdGVtcy5sZW5ndGggPD0gSVRFTVNfQ09MTEFQU0VEX0NMSVBfU0laRSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgICB9KSkpOwogICAgICAgICAgICB0aGlzLm5vcm1hbGl6ZWRQYWdlSW5kZXgkID0gY29tYmluZUxhdGVzdChbCiAgICAgICAgICAgICAgICB0aGlzLnBhZ2VJbmRleCQsCiAgICAgICAgICAgICAgICB0aGlzLm51bVBhZ2VzJCwKICAgICAgICAgICAgXSkucGlwZSh0YXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKFtwYWdlSW5kZXgsIG51bVBhZ2VzXSkgPT4gewogICAgICAgICAgICAgICAgLy8gQ3ljbGUgaW4gdGhlIE9ic2VydmFibGUgYnV0IG9ubHkgbG9vcHMgd2hlbiBwYWdlSW5kZXggaXMgbm90CiAgICAgICAgICAgICAgICAvLyB2YWxpZCBhbmQgZG9lcyBub3QgcmVwZWF0IG1vcmUgdGhhbiBvbmNlLgogICAgICAgICAgICAgICAgaWYgKG51bVBhZ2VzID09PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKHBhZ2VJbmRleCA+PSBudW1QYWdlcykgewogICAgICAgICAgICAgICAgICAgIHRoaXMucGFnZUluZGV4JC5uZXh0KG51bVBhZ2VzIC0gMSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmIChwYWdlSW5kZXggPCAwKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5wYWdlSW5kZXgkLm5leHQoMCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pKSwgbWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChbcGFnZUluZGV4LCBudW1QYWdlc10pID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiBNYXRoLm1pbihNYXRoLm1heChwYWdlSW5kZXgsIDApLCBudW1QYWdlcyAtIDEpOwogICAgICAgICAgICB9KSksIHNoYXJlUmVwbGF5KDEpKTsKICAgICAgICAgICAgdGhpcy5wYWdlZEl0ZW1zJCA9IGNvbWJpbmVMYXRlc3QoWwogICAgICAgICAgICAgICAgdGhpcy5pdGVtcyQsCiAgICAgICAgICAgICAgICB0aGlzLnN0b3JlLnNlbGVjdChnZXRQYWdlU2l6ZSksCiAgICAgICAgICAgICAgICB0aGlzLm5vcm1hbGl6ZWRQYWdlSW5kZXgkLAogICAgICAgICAgICAgICAgdGhpcy5pc0dyb3VwRXhwYW5kZWQkLAogICAgICAgICAgICBdKS5waXBlKG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoW2l0ZW1zLCBwYWdlU2l6ZSwgcGFnZUluZGV4LCBleHBhbmRlZF0pID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHN0YXJ0SW5kZXggPSBwYWdlU2l6ZSAqIHBhZ2VJbmRleDsKICAgICAgICAgICAgICAgIC8vIFdlIG9ubHkgcmVuZGVyIDMgY2FyZHMgd2hlbiBjb2xsYXBzZWQuCiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBlbmRJbmRleCA9IHBhZ2VTaXplICogcGFnZUluZGV4ICsKICAgICAgICAgICAgICAgICAgICBNYXRoLm1pbihleHBhbmRlZCA/IHBhZ2VTaXplIDogSVRFTVNfQ09MTEFQU0VEX0NMSVBfU0laRSwgcGFnZVNpemUpOwogICAgICAgICAgICAgICAgcmV0dXJuIGl0ZW1zLnNsaWNlKHN0YXJ0SW5kZXgsIGVuZEluZGV4KTsKICAgICAgICAgICAgfSkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBjaGFuZ2VzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uQ2hhbmdlcyhjaGFuZ2VzKSB7CiAgICAgICAgICAgIGlmIChjaGFuZ2VzWydjYXJkSWRzV2l0aE1ldGFkYXRhJ10pIHsKICAgICAgICAgICAgICAgIHRoaXMuaXRlbXMkLm5leHQodGhpcy5jYXJkSWRzV2l0aE1ldGFkYXRhKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoY2hhbmdlc1snZ3JvdXBOYW1lJ10pIHsKICAgICAgICAgICAgICAgIHRoaXMuZ3JvdXBOYW1lJC5uZXh0KHRoaXMuZ3JvdXBOYW1lKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IG5ld0luZGV4CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvblBhZ2VJbmRleENoYW5nZWQobmV3SW5kZXgpIHsKICAgICAgICAgICAgdGhpcy5wYWdlSW5kZXgkLm5leHQobmV3SW5kZXgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uR3JvdXBFeHBhbnNpb25Ub2dnbGVkKCkgewogICAgICAgICAgICBpZiAodGhpcy5ncm91cE5hbWUgPT09IG51bGwpIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBSYW5nZUVycm9yKCdJbnZhcmlhbnQgZXJyb3I6IGV4cGFuc2lvbiBjYW5ub3QgYmUgdG9nZ2xlZCB3aGVuIGdyb3VwTmFtZSBpcyBudWxsJyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChtZXRyaWNzVGFnR3JvdXBFeHBhbnNpb25DaGFuZ2VkKHsgdGFnR3JvdXA6IHRoaXMuZ3JvdXBOYW1lIH0pKTsKICAgICAgICB9CiAgICB9CiAgICBDYXJkR3JpZENvbnRhaW5lci5kZWNvcmF0b3JzID0gWwogICAgICAgIHsgdHlwZTogQ29tcG9uZW50LCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIHNlbGVjdG9yOiAnbWV0cmljcy1jYXJkLWdyaWQnLAogICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlOiBgCiAgICA8bWV0cmljcy1jYXJkLWdyaWQtY29tcG9uZW50CiAgICAgIFtpc0dyb3VwRXhwYW5kYWJsZV09ImlzR3JvdXBFeHBhbmRhYmxlJCB8IGFzeW5jIgogICAgICBbaXNHcm91cEV4cGFuZGVkXT0iaXNHcm91cEV4cGFuZGV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29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWJbX25nY29udGVudC0lQ09NUCVdLCAubWF0LXByaW1hcnlbX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWItbGFiZWxbX25nY29udGVudC0lQ09NUCVde2JhY2tncm91bmQtY29sb3I6I2Y1N2MwMH0ubWF0LXByaW1hcnlbX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWItbGFiZWwtdGV4dFtfbmdjb250ZW50LSVDT01QJV17Y29sb3I6I2ZmZn0ubWF0LWFjY2VudFtfbmdjb250ZW50LSVDT01QJV0gICAubWF0LXNsaWRlci10cmFjay1maWxsW19uZ2NvbnRlbnQtJUNPTVAlXSwgLm1hdC1hY2NlbnRbX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWJbX25nY29udGVudC0lQ09NUCVdLCAubWF0LWFjY2VudFtfbmdjb250ZW50LSVDT01QJV0gICAubWF0LXNsaWRlci10aHVtYi1sYWJlbFtfbmdjb250ZW50LSVDT01QJV17YmFja2dyb3VuZC1jb2xvcjojZmY5ODAwfS5tYXQtYWNjZW50W19uZ2NvbnRlbnQtJUNPTVAlXSAgIC5tYXQtc2xpZGVyLXRodW1iLWxhYmVsLXRleHRbX25nY29udGVudC0lQ09NUCVde2NvbG9yOiNmZmZ9Lm1hdC13YXJuW19uZ2NvbnRlbnQtJUNPTVAlXSAgIC5tYXQtc2xpZGVyLXRyYWNrLWZpbGxbX25nY29udGVudC0lQ09NUCVdLCAubWF0LXdhcm5bX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWJbX25nY29udGVudC0lQ09NUCVdLCAubWF0LXdhcm5bX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWItbGFiZWxbX25nY29udGVudC0lQ09NUCVde2JhY2tncm91bmQtY29sb3I6I2Y0NDMzNn0ubWF0LXdhcm5bX25nY29udGVud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ICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gc3RvcmUKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihzdG9yZSkgewogICAgICAgICAgICB0aGlzLnN0b3JlID0gc3RvcmU7CiAgICAgICAgICAgIHRoaXMuY2FyZEdyb3VwcyQgPSB0aGlzLnN0b3JlCiAgICAgICAgICAgICAgICAuc2VsZWN0KGdldFJlbmRlcmFibGVDYXJkSWRzV2l0aE1ldGFkYXRhKQogICAgICAgICAgICAgICAgLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjYXJkTGlzdAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGNhcmRMaXN0KSA9PiBncm91cENhcmRJZFdpdGhNZXRkYXRhKGNhcmRMaXN0KSkpKTsKICAgICAgICB9CiAgICB9CiAgICBDYXJkR3JvdXBzQ29udGFpbmVyLmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBDb21wb25lbnQsIGFyZ3M6IFt7CiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3I6ICdtZXRyaWNzLWNhcmQtZ3JvdXBzJywKICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogYAogICAgPG1ldHJpY3MtY2FyZC1ncm91cHMtY29tcG9uZW50CiAgICAgIFtjYXJkR3JvdXBzXT0iY2FyZEdyb3VwcyQgfCBhc3luYyIKICAgICAgW2NhcmRPYnNlcnZlcl09ImNhcmRPYnNlcnZlciIKICAgID48L21ldHJpY3MtY2FyZC1ncm91cHMtY29tcG9uZW50PgogIGAsCiAgICAgICAgICAgICAgICAgICAgY2hhbmdlRGV0ZWN0aW9uOiBDaGFuZ2VEZXRlY3Rpb25TdHJhdGVneS5PblB1c2gsCiAgICAgICAgICAgICAgICB9LF0gfSwKICAgIF07CiAgICAvKiogQG5vY29sbGFwc2UgKi8KICAgIENhcmRHcm91cHNDb250YWluZXIu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GEkMSA9IGNyZWF0ZVNlbGVjdG9yKGdldE5vbkVtcHR5Q2FyZElkc1dpdGhNZXRhZGF0YSwgZ2V0Q3VycmVudFJvdXRlUnVuU2VsZWN0aW9uLCAoLyoqCiAgICAgKiBAcGFyYW0gez99IGNhcmRMaXN0CiAgICAgKiBAcGFyYW0gez99IHJ1blNlbGVjdGlvbk1hcAogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgKGNhcmRMaXN0LCBydW5TZWxlY3Rpb25NYXApID0+IHsKICAgICAgICByZXR1cm4gY2FyZExpc3QuZmlsdGVyKCgvKioKICAgICAgICAgKiBAcGFyYW0gez99IGNhcmQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIChjYXJkKSA9PiB7CiAgICAgICAgICAgIGlmICghaXNTaW5nbGVSdW5QbHVnaW4oY2FyZC5wbHVnaW4pKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gQm9vbGVhbihydW5TZWxlY3Rpb25NYXAgJiYgcnVuU2VsZWN0aW9uTWFwLmdldCgoLyoqIEB0eXBlIHs/fSAqLyAoY2FyZC5ydW5JZCkpKSk7CiAgICAgICAgfSkpOwogICAgfSkpOwogICAgLyoqCiAgICAgKiBBbiBhcmVhIHNob3dpbmcgY2FyZHMgdGhhdCBtYXRjaCB0aGUgdGFnIGZpbHRlci4KICAgICAqLwogICAgY2xhc3MgRmlsdGVyZWRWaWV3Q29udGFpbmVyIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHN0b3JlCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3Ioc3RvcmUpIHsKICAgICAgICAgICAgdGhpcy5zdG9yZSA9IHN0b3JlOwogICAgICAgICAgICB0aGlzLmNhcmRJZHNXaXRoTWV0YWRhdGEkID0gdGhpcy5zdG9yZS5zZWxlY3QoZ2V0UmVuZGVyYWJsZUNhcmRJZHNXaXRoTWV0YWRhdGEkMSkucGlwZShzd2l0Y2hNYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGNhcmRMaXN0CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoY2FyZExpc3QpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiBjb21iaW5lTGF0ZXN0KFsKICAgICAgICAgICAgICAgICAgICBvZihjYXJkTGlzdCksCiAgICAgICAgICAgICAgICAgICAgdGhpcy5zdG9yZS5zZWxlY3QoZ2V0TWV0cmljc1RhZ0ZpbHRlciksCiAgICAgICAgICAgICAgICBdKTsKICAgICAgICAgICAgfSkpLCBtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKFtjYXJkTGlzdCwgdGFnRmlsdGVyXSkgPT4gewogICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4geyBjYXJkTGlzdCwgcmVnZXg6IG5ldyBSZWdFeHAodGFnRmlsdGVyKSB9OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgY2F0Y2ggKGUpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4geyBjYXJkTGlzdCwgcmVnZXg6IG51bGwgfTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSkpLCBmaWx0ZXIoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHsgcmVnZXggfSkgPT4gcmVnZXggIT09IG51bGwpKSwgbWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICh7IGNhcmRMaXN0LCByZWdleCB9KSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gY2FyZExpc3QuZmlsdGVyKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoeyB0YWcgfSkgPT4gKC8qKiBAdHlwZSB7P30gKi8gKHJlZ2V4KSkudGVzdCh0YWcpKSk7CiAgICAgICAgICAgIH0pKSwgbWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjYXJkTGlzdAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGNhcmRMaXN0KSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gY2FyZExpc3Quc29ydCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGNhcmRBCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGNhcmRCCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoY2FyZEEsIGNhcmRCKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNvbXBhcmVUYWdOYW1lcyhjYXJkQS50YWcsIGNhcmRCLnRhZyk7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0pKSwgZGlzdGluY3RVbnRpbENoYW5nZWQoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHByZXYKICAgICAgICAgICAgICogQHBhcmFtIHs/fSB1cGRhdGVkCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAocHJldiwgdXBkYXRlZCkgPT4gewogICAgICAgICAgICAgICAgaWYgKHByZXYubGVuZ3RoICE9PSB1cGRhdGVkLmxlbmd0aCkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiBwcmV2LmV2ZXJ5KCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcHJldlZhbAogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBpbmRleAogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKHByZXZWYWwsIGluZGV4KSA9PiB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHByZXZWYWwuY2FyZElkID09PSB1cGRhdGVkW2luZGV4XS5jYXJkSWQ7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0pKSwgc3RhcnRXaXRoKFtdKSk7CiAgICAgICAgfQogICAgfQogICAgRmlsdGVyZWRWaWV3Q29udGFpbmVyLmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBDb21wb25lbnQsIGFyZ3M6IFt7CiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3I6ICdtZXRyaWNzLWZpbHRlcmVkLXZpZXcnLAogICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlOiBgCiAgICA8bWV0cmljcy1maWx0ZXJlZC12aWV3LWNvbXBvbmVudAogICAgICBbY2FyZElkc1dpdGhNZXRhZGF0YV09ImNhcmRJZHNXaXRoTWV0YWRhdGEkIHwgYXN5bmMiCiAgICAgIFtjYXJkT2JzZXJ2ZXJdPSJjYXJkT2JzZXJ2ZXIiCiAgICA+PC9tZXRyaWNzLWZpbHRlcmVkLXZpZXctY29tcG9uZW50PgogIGAsCiAgICAgICAgICAgICAgICAgICAgY2hhbmdlRGV0ZWN0aW9uOiBDaGFuZ2VEZXRlY3Rpb25TdHJhdGVneS5PblB1c2gsCiAgICAgICAgICAgICAgICB9LF0gfSwKICAgIF07CiAgICAvKiogQG5vY29sbGFwc2UgKi8KICAgIEZpbHRlcmVkVmlld0NvbnRhaW5lci5jdG9y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1c2VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgZnVuY3Rpb24gRHJvcGRvd25Db21wb25lbnRfbWF0X29wdGlvbl8xX1RlbXBsYXRlKHJmLCBjdHgpIHsgaWYgKHJmICYgMSkgewogICAgICAgIMm1ybVlbGVtZW50U3RhcnQoMCwgIm1hdC1vcHRpb24iLCAyKTsKICAgICAgICDJtcm1dGV4dCgxKTsKICAgICAgICDJtcm1ZWxlbWVudEVuZCgpOwogICAgfSBpZiAocmYgJiAyKSB7CiAgICAgICAgY29uc3Qgb3B0aW9uX3IxID0gY3R4LiRpbXBsaWNpdDsKICAgICAgICDJtcm1cHJvcGVydHkoInZhbHVlIiwgb3B0aW9uX3IxLnZhbHVlKTsKICAgICAgICDJtcm1YWR2YW5jZSgxKTsKICAgICAgICDJtcm1dGV4dEludGVycG9sYXRlMSgiICIsIG9wdGlvbl9yMS5kaXNwbGF5VGV4dCwgIiAiKTsKICAgIH0gfQogICAgY2xhc3MgRHJvcGRvd25Db21wb25lbnQgewogICAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgICAgICB0aGlzLnZhbHVlID0gJyc7CiAgICAgICAgICAgIHRoaXMub3B0aW9ucyA9IFtdOwogICAgICAgICAgICB0aGlzLnNlbGVjdGlvbkNoYW5nZSA9IG5ldyBFdmVudEVtaXR0ZXIoKTsKICAgICAgICB9CiAgICB9CiAgICBEcm9wZG93bkNvbXBvbmVudC5kZWNvcmF0b3JzID0gWwogICAgICAgIHsgdHlwZTogQ29tcG9uZW50LCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIHNlbGVjdG9yOiAndGItZHJvcGRvd24nLAogICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlOiBgCiAgICA8bWF0LXNlbGVjdAogICAgICBbdmFsdWVdPSJ2YWx1ZSIKICAgICAgKHNlbGVjdGlvbkNoYW5nZSk9InNlbGVjdGlvbkNoYW5nZS5lbWl0KCRldmVudC52YWx1ZSkiCiAgICA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mFsdWUpIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG5leHRWYWx1ZSA9IE1hdGgubWluKE1hdGgubWF4KDAsIHBhcnNlRmxvYXQoaW5wdXQudmFsdWUpKSwgMSk7CiAgICAgICAgICAgIC8vIFJlY3RpZnkgaGVyZSBpbiBjYXNlIEFuZ3VsYXIgZG9lcyBub3QgdHJpZ2dlciBuZ09uQ2hhbmdlcyB3aGVuIGV4cGVjdGVkLgogICAgICAgICAgICBpZiAobmV4dFZhbHVlICE9PSBwYXJzZUZsb2F0KGlucHV0LnZhbHVlKSkgewogICAgICAgICAgICAgICAgaW5wdXQudmFsdWUgPSBTdHJpbmcobmV4dFZhbHVlKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLnNjYWxhclNtb290aGluZ0NvbnRyb2xDaGFuZ2VkJC5lbWl0KG5leHRWYWx1ZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gbnVtCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmb3JtYXRNaWxsaVRvWmVyb3RoKG51bSkgewogICAgICAgICAgICByZXR1cm4gZm9ybWF0TnVtYmVyKG51bSAvIDEwMDAsIAogICAgICAgICAgICAvLyBPdXIgYXBwIGRvZXMgbm90LCB5ZXQsIHNwZWNpZnkgTE9DQUxFX0lELiBEZWZhdWx0IHRvIGVuLVVTLgogICAgICAgICAgICB0aGlzLmxvY2FsZSB8fCAnZW4tVVMnLCAKICAgICAgICAgICAgLy8gVGhlIHNsaWRlciBjYW5ub3QgZml0IDMgZGVjaW1hbHMuCiAgICAgICAgICAgICcxLjAtMicpOwogICAgICAgIH0KICAgIH0KICAgIFNldHRpbmdzVmlld0NvbXBvbmVudC5kZWNvcmF0b3JzID0gWwogICAgICAgIHsgdHlwZTogQ29tcG9uZW50LCBhcm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W5nKTsKICAgICAgICAgICAgdGhpcy5pbWFnZUJyaWdodG5lc3NJbk1pbGxpJCA9IHRoaXMuc3RvcmUuc2VsZWN0KGdldE1ldHJpY3NJbWFnZUJyaWdodG5lc3NJbk1pbGxpKTsKICAgICAgICAgICAgdGhpcy5pbWFnZUNvbnRyYXN0SW5NaWxsaSQgPSB0aGlzLnN0b3JlLnNlbGVjdChnZXRNZXRyaWNzSW1hZ2VDb250cmFzdEluTWlsbGkpOwogICAgICAgICAgICB0aGlzLmltYWdlU2hvd0FjdHVhbFNpemUkID0gdGhpcy5zdG9yZS5zZWxlY3QoZ2V0TWV0cmljc0ltYWdlU2hvd0FjdHVhbFNpemUpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHNvcnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uVG9vbHRpcFNvcnRDaGFuZ2VkKHNvcnQpIHsKICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChtZXRyaWNzQ2hhbmdlVG9vbHRpcFNvcnQoeyBzb3J0IH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvbklnbm9yZU91dGxpZXJzQ2hhbmdlZCgpIHsKICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChtZXRyaWNzVG9nZ2xlSWdub3JlT3V0bGllcnMoKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30geEF4aXNUeXBlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvblhBeGlzVHlwZUNoYW5nZWQoeEF4aXNUeXBlKSB7CiAgICAgICAgICAgIHRoaXMuc3RvcmUuZGlzcGF0Y2gobWV0cmljc0NoYW5nZVhBeGlzVHlwZSh7IHhBeGlzVHlwZSB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gaGlzdG9ncmFtTW9kZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25IaXN0b2dyYW1Nb2RlQ2hhbmdlZChoaXN0b2dyYW1Nb2RlKSB7CiAgICAgICAgICAgIHRoaXMuc3RvcmUuZGlzcGF0Y2gobWV0cmljc0NoYW5nZUhpc3RvZ3JhbU1vZGUoeyBoaXN0b2dyYW1Nb2RlIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBzbW9vdGhpbmcKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uU2NhbGFyU21vb3RoaW5nQ2hhbmdlZChzbW9vdGhpbmcpIHsKICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChtZXRyaWNzQ2hhbmdlU2NhbGFyU21vb3RoaW5nKHsgc21vb3RoaW5nIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBicmlnaHRuZXNzSW5NaWxsaQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25JbWFnZUJyaWdodG5lc3NJbk1pbGxpQ2hhbmdlZChicmlnaHRuZXNzSW5NaWxsaSkgewogICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKG1ldHJpY3NDaGFuZ2VJbWFnZUJyaWdodG5lc3MoeyBicmlnaHRuZXNzSW5NaWxsaSB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25JbWFnZUJyaWdodG5lc3NSZXNldCgpIHsKICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChtZXRyaWNzUmVzZXRJbWFnZUJyaWdodG5lc3MoKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25JbWFnZUNvbnRyYXN0UmVzZXQoKSB7CiAgICAgICAgICAgIHRoaXMuc3RvcmUuZGlzcGF0Y2gobWV0cmljc1Jlc2V0SW1hZ2VDb250cmFzdCgpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBjb250cmFzdEluTWlsbGkKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uSW1hZ2VDb250cmFzdEluTWlsbGlDaGFuZ2VkKGNvbnRyYXN0SW5NaWxsaSkgewogICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKG1ldHJpY3NDaGFuZ2VJbWFnZUNvbnRyYXN0KHsgY29udHJhc3RJbk1pbGxpIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvbkltYWdlU2hvd0FjdHVhbFNpemVDaGFuZ2VkKCkgewogICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKG1ldHJpY3NUb2dnbGVJbWFnZVNob3dBY3R1YWxTaXplKCkpOwogICAgICAgIH0KICAgIH0KICAgIFNldHRpbmdzVmlld0NvbnRhaW5lci5kZWNvcmF0b3JzID0gWwogICAgICAgIHsgdHlwZTogQ29tcG9uZW50LCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIHNlbGVjdG9yOiAnbWV0cmljcy1kYXNoYm9hcmQtc2V0dGluZ3MnLAogICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlOiBgCiAgICA8bWV0cmljcy1kYXNoYm9hcmQtc2V0dGluZ3MtY29tcG9uZW50CiAgICAgIFt0b29sdGlwU29ydF09InRvb2x0aXBTb3J0JCB8IGFzeW5jIgogICAgICAodG9vbHRpcFNvcnRDaGFuZ2VkKT0ib25Ub29sdGlwU29ydENoYW5nZWQoJGV2ZW50KSIKICAgICAgW2lnbm9y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cHggNjAwcHggMHB4Jyk7CiAgICAgICAgfQogICAgfQogICAgTWFpblZpZXdDb21wb25lbnQuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IENvbXBvbmVudCwgYXJnczogW3sKICAgICAgICAgICAgICAgICAgICBzZWxlY3RvcjogJ21ldHJpY3MtbWFpbi12aWV3LWNvbXBvbmVudCcsCiAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGVVcmw6ICdtYWluX3ZpZXdfY29tcG9uZW50Lm5nLmh0bWwnLAogICAgICAgICAgICAgICAgICAgIHN0eWxlVXJsczogWydtYWluX3ZpZXdfY29tcG9uZW50LmNzcyddLAogICAgICAgICAgICAgICAgICAgIGNoYW5nZURldGVjdGlvbjogQ2hhbmdlRGV0ZWN0aW9uU3RyYXRlZ3kuT25QdXNoLAogICAgICAgICAgICAgICAgfSxdIH0sCiAgICBdOwogICAgLyoqIEBub2NvbGxhcHNlICovCiAgICBNYWluVmlld0NvbXBvbmVudC5jdG9yUGFyYW1ldGVycyA9ICgpID0+IFsKICAgICAgICB7IHR5cGU6IEVsZW1lbnRSZWYgfQogICAgXTsKICAgIE1haW5WaWV3Q29tcG9uZW50LnByb3BEZWNvcmF0b3JzID0gewogICAgICAgIHNob3dGaWx0ZXJlZFZpZXc6IFt7IHR5cGU6IElucHV0IH1dLAogICAgICAgIGlzU2lkZXBhbmVPcGVuOiBbeyB0eXBlOiBJbnB1dCB9XSwKICAgICAgICBvblNldHRpbmdzQnV0dG9uQ2xpY2tlZDogW3sgdHlwZTogT3V0cHV0IH1dLAogICAgICAgIG9uQ2xvc2VTaWRlcGFuZUJ1dHRvbkNsaWNrZWQ6IFt7IHR5cGU6IE91dHB1dCB9XQogICAgfTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLyBNYWluVmlld0NvbXBvbmVudC7JtWZhYyA9IGZ1bmN0aW9uIE1haW5WaWV3Q29tcG9uZW50X0ZhY3RvcnkodCkgeyByZXR1cm4gbmV3ICh0IHx8IE1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09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWItbGFiZWxbX25nY29udGVudC0lQ09NUCVde2JhY2tncm91bmQtY29sb3I6I2Y1N2MwMH0ubWF0LXByaW1hcnlbX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWItbGFiZWwtdGV4dFtfbmdjb250ZW50LSVDT01QJV17Y29sb3I6I2ZmZn0ubWF0LWFjY2VudFtfbmdjb250ZW50LSVDT01QJV0gICAubWF0LXNsaWRlci10cmFjay1maWxsW19uZ2NvbnRlbnQtJUNPTVAlXSwgLm1hdC1hY2NlbnRbX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWJbX25nY29udGVudC0lQ09NUCVdLCAubWF0LWFjY2VudFtfbmdjb250ZW50LSVDT01QJV0gICAubWF0LXNsaWRlci10aHVtYi1sYWJlbFtfbmdjb250ZW50LSVDT01QJV17YmFja2dyb3VuZC1jb2xvcjojZmY5ODAwfS5tYXQtYWNjZW50W19uZ2NvbnRlbnQtJUNPTVAlXSAgIC5tYXQtc2xpZGVyLXRodW1iLWxhYmVsLXRleHRbX25nY29udGVudC0lQ09NUCVde2NvbG9yOiNmZmZ9Lm1hdC13YXJuW19uZ2NvbnRlbnQtJUNPTVAlXSAgIC5tYXQtc2xpZGVyLXRyYWNrLWZpbGxbX25nY29udGVudC0lQ09NUCVdLCAubWF0LXdhcm5bX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWJbX25nY29udGVudC0lQ09NUCVdLCAubWF0LXdhcm5bX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWItbGFiZWxbX25nY29udGVudC0lQ09NUCVde2JhY2tncm91bmQtY29sb3I6I2Y0NDMzNn0ubWF0LXdhcm5bX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWItbGFiZWwtdGV4dFtfbmdjb250ZW50LSVDT01QJV17Y29sb3I6I2ZmZn0ubWF0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AgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChmaWx0ZXIpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiBmaWx0ZXIubGVuZ3RoID4gMDsKICAgICAgICAgICAgfSkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvblNldHRpbmdzQnV0dG9uQ2xpY2tlZCgpIHsKICAgICAgICAgICAgdGhpcy5pc1NpZGVwYW5lT3BlbiA9ICF0aGlzLmlzU2lkZXBhbmVPcGVuOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uQ2xvc2VTaWRlcGFuZUJ1dHRvbkNsaWNrZWQoKSB7CiAgICAgICAgICAgIHRoaXMuaXNTaWRlcGFuZU9wZW4gPSBmYWxzZTsKICAgICAgICB9CiAgICB9CiAgICBNYWluVmlld0NvbnRhaW5lci5kZWNvcmF0b3JzID0gWwogICAgICAgIHsgdHlwZTogQ29tcG9uZW50LCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIHNlbGVjdG9yOiAnbWV0cmljcy1tYWluLXZpZXcnLAogICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlOiBgCiAgICA8bWV0cmljcy1tYWluLXZpZXctY29tcG9uZW50CiAgICAgIFtzaG93RmlsdGVyZWRWaWV3XT0ic2hvd0ZpbHRlcmVkVmlldyQgfCBhc3luYyIKICAgICAgW2lzU2lkZXBhbmVPcGVuXT0iaXNTaWRlcGFuZU9wZW4iCiAgICAgIChvblNldHRpbmdzQnV0dG9uQ2xpY2tlZCk9Im9uU2V0dGluZ3NCdXR0b25DbGlja2VkKCkiCiAgICAgIChvbkNsb3NlU2lkZXBhbmVCdXR0b25DbGlja2VkKT0ib25DbG9zZVNpZGVwYW5lQnV0dG9uQ2xpY2tlZCgpIgogICAgPjwvbWV0cmljcy1tYW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YXQtc2xpZGVyLXRyYWNrLWZpbGxbX25nY29udGVudC0lQ09NUCVdLCAubWF0LXByaW1hcnlbX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWJbX25nY29udGVudC0lQ09NUCVdLCAubWF0LXByaW1hcnlbX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWItbGFiZWxbX25nY29udGVudC0lQ09NUCVde2JhY2tncm91bmQtY29sb3I6I2Y1N2MwMH0ubWF0LXByaW1hcnlbX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWItbGFiZWwtdGV4dFtfbmdjb250ZW50LSVDT01QJV17Y29sb3I6I2ZmZn0ubWF0LWFjY2VudFtfbmdjb250ZW50LSVDT01QJV0gICAubWF0LXNsaWRlci10cmFjay1maWxsW19uZ2NvbnRlbnQtJUNPTVAlXSwgLm1hdC1hY2NlbnRbX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWJbX25nY29udGVudC0lQ09NUCVdLCAubWF0LWFjY2VudFtfbmdjb250ZW50LSVDT01QJV0gICAubWF0LXNsaWRlci10aHVtYi1sYWJlbFtfbmdjb250ZW50LSVDT01QJV17YmFja2dyb3VuZC1jb2xvcjojZmY5ODAwfS5tYXQtYWNjZW50W19uZ2NvbnRlbnQtJUNPTVAlXSAgIC5tYXQtc2xpZGVyLXRodW1iLWxhYmVsLXRleHRbX25nY29udGVudC0lQ09NUCVde2NvbG9yOiNmZmZ9Lm1hdC13YXJuW19uZ2NvbnRlbnQtJUNPTVAlXSAgIC5tYXQtc2xpZGVyLXRyYWNrLWZpbGxbX25nY29udGVudC0lQ09NUCVdLCAubWF0LXdhcm5bX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWJbX25nY29udGVudC0lQ09NUCVdLCAubWF0LXdhcm5bX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWItbGFiZWxbX25nY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FyZF9tb2R1bGUudHMKICAgICAqIEBzdXBwcmVzcyB7Y2hlY2tUeXBlcyxjb25zdGFudFByb3BlcnR5LGV4dHJhUmVxdWlyZSxtaXNzaW5nT3ZlcnJpZGUsbWlzc2luZ1JldHVybix1bnVzZWRQcml2YXRlTWVtYmVycyx1c2VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgY2xhc3MgSGlzdG9ncmFtQ2FyZE1vZHVsZSB7CiAgICB9CiAgICBIaXN0b2dyYW1DYXJkTW9kdWxlLmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBOZ01vZHVsZSwgYXJnczogW3sKICAgICAgICAgICAgICAgICAgICBkZWNsYXJhdGlvbnM6IFtIaXN0b2dyYW1DYXJkQ29udGFpbmVyLCBIaXN0b2dyYW1DYXJkQ29tcG9uZW50XSwKICAgICAgICAgICAgICAgICAgICBleHBvcnRzOiBbSGlzdG9ncmFtQ2FyZENvbnRhaW5lcl0sCiAgICAgICAgICAgICAgICAgICAgaW1wb3J0czogWwogICAgICAgICAgICAgICAgICAgICAgICBDb21tb25Nb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIEhpc3RvZ3JhbU1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgTWF0QnV0dG9uTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBNYXRJY29uTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBNYXRQcm9ncmVzc1NwaW5uZXJNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIFJlc2l6ZURldGVjdG9yTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBSdW5OYW1lTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBUcnVuY2F0ZWRQYXRoTW9kdWxlLAogICAgICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICB9LF0gfSwKICAgIF07CiAgICAvKiogQG5vY29sbGFwc2UgKi8gSGlzdG9ncmFt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JY29uTW9kdWxlLAogICAgICAgICAgICBNYXRQcm9ncmVzc1NwaW5uZXJNb2R1bGUsCiAgICAgICAgICAgIFJlc2l6ZURldGVjdG9yTW9kdWxlLAogICAgICAgICAgICBSdW5OYW1lTW9kdWxlLAogICAgICAgICAgICBUcnVuY2F0ZWRQYXRoTW9kdWxlXSwgZXhwb3J0czogW0hpc3RvZ3JhbUNhcmRDb250YWluZXJdIH0pOyB9KSgpOwoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogdGVuc29yYm9hcmQvd2ViYXBwL21ldHJpY3Mvdmlld3MvY2FyZF9yZW5kZXJlci9pbWFnZV9jYXJkX21vZHVsZS50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICBjbGFzcyBJbWFnZUNhcmRNb2R1bGUgewogICAgfQogICAgSW1hZ2VDYXJkTW9kdWxlLmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBOZ01vZHVsZSwgYXJnczogW3sKICAgICAgICAgICAgICAgICAgICBkZWNsYXJhdGlvbnM6IFtJbWFnZUNhcmRDb250YWluZXIsIEltYWdlQ2FyZENvbXBvbmVudF0sCiAgICAgICAgICAgICAgICAgICAgZXhwb3J0czogW0ltYWdlQ2FyZENvbnRhaW5lcl0sCiAgICAgICAgICAgICAgICAgICAgaW1wb3J0czogWwogICAgICAgICAgICAgICAgICAgICAgICBDb21tb25Nb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIE1hdEJ1dHRvbk1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgTWF0SWNvbk1vZHVsZSwKICAg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R5cGU6IE5nTW9kdWxlLCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIGRlY2xhcmF0aW9uczogW1NjYWxhckNhcmRDb250YWluZXIsIFNjYWxhckNhcmRDb21wb25lbnRdLAogICAgICAgICAgICAgICAgICAgIGV4cG9ydHM6IFtTY2FsYXJDYXJkQ29udGFpbmVyXSwKICAgICAgICAgICAgICAgICAgICBpbXBvcnRzOiBbCiAgICAgICAgICAgICAgICAgICAgICAgIENvbW1vbk1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgTGluZUNoYXJ0TW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBNYXRCdXR0b25Nb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIE1hdEljb25Nb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIE1hdE1lbnVNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIE1hdFByb2dyZXNzU3Bpbm5lck1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgUmVzaXplRGV0ZWN0b3JNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIFRydW5jYXRlZFBhdGhNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgIH0sXSB9LAogICAgXTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLyBTY2FsYXJDYXJkTW9kdWxlLsm1bW9kID0gybXJtWRlZmluZU5nTW9kdWxlKHsgdHlwZTogU2NhbGFyQ2FyZE1vZHVsZSB9KTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLyBTY2FsYXJDYXJkTW9kdWxlLsm1aW5qID0gybXJtWRlZmluZUluamVjdG9yKHsgZmFjdG9yeTogZnVuY3Rpb24gU2NhbGFyQ2FyZE1vZHVsZV9GYWN0b3J5KHQpIHsgcmV0dXJuIG5ldyAodCB8fCBTY2FsYXJDYXJkTW9kdWxlKSgpOyB9LCBpbXBvcnRzOiBbWwogICAgICAgICAgICAgICAgQ29t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AgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX2NvbnRyb2xWYWx1ZUFjY2Vzc29yQ2hhbmdlRm4gPSAoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7IH0pOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogb25Ub3VjaCBmdW5jdGlvbiByZWdpc3RlcmVkIHZpYSByZWdpc3Rlck9uVG91Y2ggKENvbnRyb2xWYWx1ZUFjY2Vzc29yKS4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX29uVG91Y2hlZCA9ICgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsgfSk7CiAgICAgICAgICAgIHRoaXMuX25hbWUgPSBgbWF0LWJ1dHRvbi10b2dnbGUtZ3JvdXAtJHtfdW5pcXVlSWRDb3VudGVyJDErK31gOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRXZlbnQgdGhhdCBlbWl0cyB3aGVuZXZlciB0aGUgdmFsdWUgb2YgdGhlIGdyb3VwIGNoYW5nZXMuCiAgICAgICAgICAgICAqIFVzZWQgdG8gZmFjaWxpdGF0ZSB0d28td2F5IGRhdGEgYmluZGluZy4KICAgICAgICAgICAgICogXEBkb2NzLXByaXZhdGUKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMudmFsdWVDaGFuZ2UgPSBuZXcgRXZlbnRFbWl0dGVyKCk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBFdmVudCBlbWl0dGVkIHdoZW4gdGhlIGdyb3VwJ3MgdmFsdWUgY2hhbmdlcy4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuY2hhbmdlID0gbmV3IEV2ZW50RW1pdHRlcigpOwogICAgICAgICAgICB0aGlzLmFwcGVhcmFuY2UgPQogICAgICAgICAgICAgICAgZGVmYXVsdE9wdGlvbnMgJiYgZGVmYXVsdE9wdGlvbnMuYXBwZWFyYW5jZSA/IGRlZmF1bHRPcHRpb25zLmFwcGVhcmFuY2UgOiAnc3RhbmRhcmQnOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBgbmFtZWAgYXR0cmlidXRlIGZvciB0aGUgdW5kZXJseWluZyBgaW5wdXRgIGVsZW1lbnQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgbmFtZSgpIHsgcmV0dXJuIHRoaXMuX25hbWU7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgbmFtZSh2YWx1ZSkgewogICAgICAgICAgICB0aGlzLl9uYW1lID0gdmFsdWU7CiAgICAgICAgICAgIGlmICh0aGlzLl9idXR0b25Ub2dnbGVzKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9idXR0b25Ub2dnbGVzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSB0b2dnbGUKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIHRvZ2dsZSA9PiB7CiAgICAgICAgICAgICAgICAgICAgdG9nZ2xlLm5hbWUgPSB0aGlzLl9uYW1lOwogICAgICAgICAgICAgICAgICAgIHRvZ2dsZS5fbWFya0ZvckNoZWNrKCk7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogV2hldGhlciB0aGUgdG9nZ2xlIGdyb3VwIGlzIHZlcnRpY2FsLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHZlcnRpY2FsKCkgeyByZXR1cm4gdGhpcy5fdmVydGljYWw7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgdmVydGljYWwodmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5fdmVydGljYWwgPSBjb2VyY2VCb29sZWFuUHJvcGVydHkodmFsdWUpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBWYWx1ZSBvZiB0aGUgdG9nZ2xlIGdyb3VwLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHZhbHVlKCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHNlbGVjdGVkID0gdGhpcy5fc2VsZWN0aW9uTW9kZWwgPyB0aGlzLl9zZWxlY3Rpb25Nb2RlbC5zZWxlY3RlZCA6IFtdOwogICAgICAgICAgICBpZiAodGhpcy5tdWx0aXBsZSkgewogICAgICAgICAgICAgICAgcmV0dXJuIHNlbGVjdGVkLm1hcCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHRvZ2dsZQogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgdG9nZ2xlID0+IHRvZ2dsZS52YWx1ZSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBzZWxlY3RlZFswXSA/IHNlbGVjdGVkWzBdLnZhbHVlIDogdW5kZWZpbmVkOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IG5ld1ZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgdmFsdWUobmV3VmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5fc2V0U2VsZWN0aW9uQnlWYWx1ZShuZXdWYWx1ZSk7CiAgICAgICAgICAgIHRoaXMudmFsdWVDaGFuZ2UuZW1pdCh0aGlzLnZhbHVlKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU2VsZWN0ZWQgYnV0dG9uIHRvZ2dsZXMgaW4gdGhlIGdyb3VwLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHNlbGVjdGVkKCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHNlbGVjdGVkID0gdGhpcy5fc2VsZWN0aW9uTW9kZWwgPyB0aGlzLl9zZWxlY3Rpb25Nb2RlbC5zZWxlY3RlZCA6IFtdOwogICAgICAgICAgICByZXR1cm4gdGhpcy5tdWx0aXBsZSA/IHNlbGVjdGVkIDogKHNlbGVjdGVkWzBdIHx8IG51bGwpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGV0aGVyIG11bHRpcGxlIGJ1dHRvbiB0b2dnbGVzIGNhbiBiZSBzZWxlY3RlZC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBtdWx0aXBsZSgpIHsgcmV0dXJuIHRoaXMuX211bHRpcGxlOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IG11bHRpcGxlKHZhbHVlKSB7CiAgICAgICAgICAgIHRoaXMuX211bHRpcGxlID0gY29lcmNlQm9vbGVhblByb3BlcnR5KHZhbHVlKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogV2hldGhlciBtdWx0aXBsZSBidXR0b24gdG9nZ2xlIGdyb3VwIGlzIGRpc2FibGVkLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGRpc2FibGVkKCkgeyByZXR1cm4gdGhpcy5fZGlzYWJsZWQ7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgZGlzYWJsZWQodmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5fZGlzYWJsZWQgPSBjb2VyY2VCb29sZWFuUHJvcGVydHkodmFsdWUpOwogICAgICAgICAgICBpZiAodGhpcy5fYnV0dG9uVG9nZ2xlcykgewogICAgICAgICAgICAgICAgdGhpcy5fYnV0dG9uVG9nZ2xlcy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdG9nZ2xlCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICB0b2dnbGUgPT4gdG9nZ2xlLl9tYXJrRm9yQ2hlY2soKSkpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkluaXQoKSB7CiAgICAgICAgICAgIHRoaXMuX3NlbGVjdGlvbk1vZGVsID0gbmV3IFNlbGVjdGlvbk1vZGVsKHRoaXMubXVsdGlwbGUsIHVuZGVmaW5lZCwgZmFsc2UpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nQWZ0ZXJDb250ZW50SW5pdCgpIHsKICAgICAgICAgICAgdGhpcy5fc2VsZWN0aW9uTW9kZWwuc2VsZWN0KC4uLnRoaXMuX2J1dHRvblRvZ2dsZXMuZmlsdGVyKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSB0b2dnbGUKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRvZ2dsZSA9PiB0b2dnbGUuY2hlY2tlZCkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU2V0cyB0aGUgbW9kZWwgdmFsdWUuIEltcGxlbWVudGVkIGFzIHBhcnQgb2YgQ29udHJvbFZhbHVlQWNjZXNzb3IuCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZSBWYWx1ZSB0byBiZSBzZXQgdG8gdGhlIG1vZGVsLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgd3JpdGVWYWx1ZSh2YWx1ZSkgewogICAgICAgICAgICB0aGlzLnZhbHVlID0gdmFsdWU7CiAgICAgICAgICAgIHRoaXMuX2NoYW5nZURldGVjdG9yLm1hcmtGb3JDaGVjaygpOwogICAgICAgIH0KICAgICAgICAvLyBJbXBsZW1lbnRlZCBhcyBwYXJ0IG9mIENvbnRyb2xWYWx1ZUFjY2Vzc29yLgogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlZ2lzdGVyT25DaGFuZ2UoZm4pIHsKICAgICAgICAgICAgdGhpcy5fY29udHJvbFZhbHVlQWNjZXNzb3JDaGFuZ2VGbiA9IGZuOwogICAgICAgIH0KICAgICAgICAvLyBJbXBsZW1lbnRlZCBhcyBwYXJ0IG9mIENvbnRyb2xWYWx1ZUFjY2Vzc29yLgogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlZ2lzdGVyT25Ub3VjaGVkKGZuKSB7CiAgICAgICAgICAgIHRoaXMuX29uVG91Y2hlZCA9IGZuOwogICAgICAgIH0KICAgICAgICAvLyBJbXBsZW1lbnRlZCBhcyBwYXJ0IG9mIENvbnRyb2xWYWx1ZUFjY2Vzc29yLgogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gaXNEaXNhYmxlZAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0RGlzYWJsZWRTdGF0ZShpc0Rpc2FibGVkKSB7CiAgICAgICAgICAgIHRoaX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ICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIGRlZmVyRXZlbnRzID0gdHJ1ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBXZSBuZWVkIHRvIGRlZmVyIGluIHNvbWUgY2FzZXMgaW4gb3JkZXIgdG8gYXZvaWQgImNoYW5nZWQgYWZ0ZXIgY2hlY2tlZCBlcnJvcnMiLCBob3dldmVyCiAgICAgICAgICAgIC8vIHRoZSBzaWRlLWVmZmVjdCBpcyB0aGF0IHdlIG1heSBlbmQgdXAgdXBkYXRpbmcgdGhlIG1vZGVsIHZhbHVlIG91dCBvZiBzZXF1ZW5jZSBpbiBvdGhlcnMKICAgICAgICAgICAgLy8gVGhlIGBkZWZlckV2ZW50c2AgZmxhZyBhbGxvd3MgdXMgdG8gZGVjaWRlIHdoZXRoZXIgdG8gZG8gaXQgb24gYSBjYXNlLWJ5LWNhc2UgYmFzaXMuCiAgICAgICAgICAgIGlmIChkZWZlckV2ZW50cykgewogICAgICAgICAgICAgICAgUHJvbWlzZS5yZXNvbHZlKCkudGhlbigoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB0aGlzLl91cGRhdGVNb2RlbFZhbHVlKGlzVXNlcklucHV0KSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fdXBkYXRlTW9kZWxWYWx1ZShpc1VzZXJJbnB1dCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ2hlY2tzIHdoZXRoZXIgYSBidXR0b24gdG9nZ2xlIGlzIHNlbGVjdGVkLgogICAgICAgICAqIEBwYXJhbSB7P30gdG9nZ2xlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfaXNTZWxlY3RlZCh0b2dnbGUpIHsKICAgICAgICAgICA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EBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9zZXRTZWxlY3Rpb25CeVZhbHVlKHZhbHVlKSB7CiAgICAgICAgICAgIHRoaXMuX3Jhd1ZhbHVlID0gdmFsdWU7CiAgICAgICAgICAgIGlmICghdGhpcy5fYnV0dG9uVG9nZ2xlcykgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0aGlzLm11bHRpcGxlICYmIHZhbHVlKSB7CiAgICAgICAgICAgICAgICBpZiAoIUFycmF5LmlzQXJyYXkodmFsdWUpKSB7CiAgICAgICAgICAgICAgICAgICAgdGhyb3cgRXJyb3IoJ1ZhbHVlIG11c3QgYmUgYW4gYXJyYXkgaW4gbXVsdGlwbGUtc2VsZWN0aW9uIG1vZGUuJyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLl9jbGVhclNlbGVjdGlvbigpOwogICAgICAgICAgICAgICAgdmFsdWUuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGN1cnJlbnRWYWx1ZQogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKGN1cnJlbnRWYWx1ZSkgPT4gdGhpcy5fc2VsZWN0VmFsdWUoY3VycmVudFZhbHVlKSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fY2xlYXJTZWxlY3Rpb24oKTsKICAgICAgICAgICAgICAgIHRoaXMuX3NlbGVjdFZhbHVlKHZhbHVlKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDbGVhcnMgdGhlIHNlbGVjdGVkIHRvZ2dsZXMuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9jbGVhclNlbGVjdGlvbigpIHsKICAgICAgICAgICAgdGhpcy5fc2VsZWN0aW9uTW9kZWwuY2xlYXIoKTsKICAgICAgICAgICAgdGhpcy5fYnV0dG9uVG9nZ2xlcy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSB0b2dnbGUKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRvZ2dsZSA9PiB0b2dnbGUuY2hlY2tlZCA9IGZhbHNlKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNlbGVjdHMgYSB2YWx1ZSBpZiB0aGVyZSdzIGEgdG9nZ2xlIHRoYXQgY29ycmVzcG9uZHMgdG8gaXQuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfc2VsZWN0VmFsdWUodmFsdWUpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjb3JyZXNwb25kaW5nT3B0aW9uID0gdGhpcy5fYnV0dG9uVG9nZ2xlcy5maW5kKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSB0b2dnbGUKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRvZ2dsZSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gdG9nZ2xlLnZhbHVlICE9IG51bGwgJiYgdG9nZ2xlLnZhbHVlID09PSB2YWx1ZTsKICAgICAgICAgICAgfSkpOwogICAgICAgICAgICBpZiAoY29ycmVzcG9uZGluZ09wdGlvbikgewogICAgICAgICAgICAgICAgY29ycmVzcG9uZGluZ09wdGlvbi5jaGVja2VkID0gdHJ1ZTsKICAgICAgICAgICAgICAgIHRoaXMuX3NlbGVjdGlvbk1vZGVsLnNlbGV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LyoqCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAoKSA9PiBNYXRCdXR0b25Ub2dnbGUpKSwgewogICAgICAgICAgICAgICAgICAgICAgICAvLyBOb3RlIHRoYXQgdGhpcyB3b3VsZCB0ZWNobmljYWxseSBwaWNrIHVwIHRvZ2dsZXMKICAgICAgICAgICAgICAgICAgICAgICAgLy8gZnJvbSBuZXN0ZWQgZ3JvdXBzLCBidXQgdGhhdCdzIG5vdCBhIGNhc2UgdGhhdCB3ZSBzdXBwb3J0LgogICAgICAgICAgICAgICAgICAgICAgICBkZXNjZW5kYW50czogdHJ1ZQogICAgICAgICAgICAgICAgICAgIH0sXSB9XSwKICAgICAgICBhcHBlYXJhbmNlOiBbeyB0eXBlOiBJbnB1dCB9XSwKICAgICAgICBuYW1lOiBbeyB0eXBlOiBJbnB1dCB9XSwKICAgICAgICB2ZXJ0aWNhbDogW3sgdHlwZTogSW5wdXQgfV0sCiAgICAgICAgdmFsdWU6IFt7IHR5cGU6IElucHV0IH1dLAogICAgICAgIHZhbHVlQ2hhbmdlOiBbeyB0eXBlOiBPdXRwdXQgfV0sCiAgICAgICAgbXVsdGlwbGU6IFt7IHR5cGU6IElucHV0IH1dLAogICAgICAgIGRpc2FibGVkOiBbeyB0eXBlOiBJbnB1dCB9XSwKICAgICAgICBjaGFuZ2U6IFt7IHR5cGU6IE91dHB1dCB9XQogICAgfTsKICAgIC8vIEJvaWxlcnBsYXRlIGZvciBhcHBseWluZyBtaXhpbnMgdG8gdGhlIE1hdEJ1dHRvblRvZ2dsZSBjbGFzcy4KICAgIC8qKgogICAgICogXEBkb2NzLXByaXZhdGUKICAgICAqLwogICAgY2xhc3MgTWF0QnV0dG9uVG9nZ2xlQmFzZSB7CiAgICB9CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBfTWF0QnV0dG9uVG9nZ2xlTWl4aW5CYXNlID0gbWl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AgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBidXR0b25JZCgpIHsgcmV0dXJuIGAke3RoaXMuaWR9LWJ1dHRvbmA7IH0KICAgICAgICAvKioKICAgICAgICAgKiBUaGUgYXBwZWFyYW5jZSBzdHlsZSBvZiB0aGUgYnV0dG9uLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGFwcGVhcmFuY2UoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmJ1dHRvblRvZ2dsZUdyb3VwID8gdGhpcy5idXR0b25Ub2dnbGVHcm91cC5hcHBlYXJhbmNlIDogdGhpcy5fYXBwZWFyYW5jZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IGFwcGVhcmFuY2UodmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5fYXBwZWFyYW5jZSA9IHZhbHVlOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGV0aGVyIHRoZSBidXR0b24gaXMgY2hlY2tlZC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBjaGVja2VkKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5idXR0b25Ub2dnbGVHcm91cCA/IHRoaXMuYnV0dG9uVG9nZ2xlR3JvdXAuX2lzU2VsZWN0ZWQodGhpcykgOiB0aGlzLl9jaGVja2VkOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgY2hlY2tlZCh2YWx1ZSkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG5ld1ZhbHVlID0gY29lcmNlQm9vbGVhblByb3BlcnR5KHZhbHVlKTsKICAgICAgICAgICAgaWYgKG5ld1ZhbHVlICE9PSB0aGlzLl9jaGVja2VkKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9jaGVja2VkID0gbmV3VmFsdWU7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5idXR0b25Ub2dnbGVHcm91cCkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuYnV0dG9uVG9nZ2xlR3JvdXAuX3N5bmNCdXR0b25Ub2dnbGUodGhpcywgdGhpcy5fY2hlY2tlZCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLl9jaGFuZ2VEZXRlY3RvclJlZi5tYXJrRm9yQ2hlY2soKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGV0aGVyIHRoZSBidXR0b24gaXMgZGlzYWJsZWQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgZGlzYWJsZWQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9kaXNhYmxlZCB8fCAodGhpcy5idXR0b25Ub2dnbGVHcm91cCAmJiB0aGlzLmJ1dHRvblRvZ2dsZUdyb3VwLmRpc2FibGVkKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IGRpc2FibGVkKHZhbHVlKSB7IHRoaXMuX2Rpc2FibGVkID0gY29lcmNlQm9vbGVhblByb3BlcnR5KHZhbHVlKTsgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkluaXQoKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZ3JvdXAgPSB0aGlzLmJ1dHRvblRvZ2dsZUdyb3VwOwogICAgICAgICA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MKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZvY3VzKG9wdGlvbnMpIHsKICAgICAgICAgICAgdGhpcy5fYnV0dG9uRWxlbWVudC5uYXRpdmVFbGVtZW50LmZvY3VzKG9wdGlvbnMpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDaGVja3MgdGhlIGJ1dHRvbiB0b2dnbGUgZHVlIHRvIGFuIGludGVyYWN0aW9uIHdpdGggdGhlIHVuZGVybHlpbmcgbmF0aXZlIGJ1dHRvbi4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9vbkJ1dHRvbkNsaWNrKCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG5ld0NoZWNrZWQgPSB0aGlzLl9pc1NpbmdsZVNlbGVjdG9yID8gdHJ1ZSA6ICF0aGlzLl9jaGVja2VkOwogICAgICAgICAgICBpZiAobmV3Q2hlY2tlZCAhPT0gdGhpcy5fY2hlY2tlZCkgewogICAgICAgICAgICAgICAgdGhpcy5fY2hlY2tlZCA9IG5ld0NoZWNrZWQ7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5idXR0b25Ub2dnbGVHcm91cCkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuYnV0dG9uVG9nZ2xlR3JvdXAuX3N5bmNCdXR0b25Ub2dnbGUodGhpcywgdGhpcy5fY2hlY2tlZCwgdHJ1ZSk7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5idXR0b25Ub2dnbGVHcm91cC5fb25Ub3VjaGVkKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gRW1pdCBhIGNoYW5nZSBldmVudCB3aGVuIGl0J3MgdGhlIHNpbmdsZSBzZWxlY3RvcgogICAgICAgICAgICB0aGlzLmNoYW5nZS5lbWl0KG5ldyBNYXRCdXR0b25Ub2dnbGVDaGFuZ2UodG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mvdmlld3MvcmlnaHRfcGFuZS9yaWdodF9wYW5lX21vZHVsZS50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICBjbGFzcyBSaWdodFBhbmVNb2R1bGUgewogICAgfQogICAgUmlnaHRQYW5lTW9kdWxlLmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBOZ01vZHVsZSwgYXJnczogW3sKICAgICAgICAgICAgICAgICAgICBkZWNsYXJhdGlvbnM6IFsKICAgICAgICAgICAgICAgICAgICAgICAgUmlnaHRQYW5lQ29tcG9uZW50LAogICAgICAgICAgICAgICAgICAgICAgICBTZXR0aW5nc1ZpZXdDb21wb25lbnQsCiAgICAgICAgICAgICAgICAgICAgICAgIFNldHRpbmdzVmlld0NvbnRhaW5lciwKICAgICAgICAgICAgICAgICAgICBdLAogICAgICAgICAgICAgICAgICAgIGV4cG9ydHM6IFtSaWdodFBhbmVDb21wb25lbnRdLAogICAgICAgICAgICAgICAgICAgIGltcG9ydHM6IFsKICAgICAgICAgICAgICAgICAgICAgICAgQ29tbW9uTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBEcm9wZG93bk1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgTWF0QnV0dG9uTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBNYXRCdXR0b25Ub2dnbGVNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIE1hdENoZWNrYm94TW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBNYXRJY29uTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBNYXRTZWxlY3RNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIE1hdFNsaWRlck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bW9uTW9kdWxlLAogICAgICAgICAgICBEcm9wZG93bk1vZHVsZSwKICAgICAgICAgICAgTWF0QnV0dG9uTW9kdWxlLAogICAgICAgICAgICBNYXRCdXR0b25Ub2dnbGVNb2R1bGUsCiAgICAgICAgICAgIE1hdENoZWNrYm94TW9kdWxlLAogICAgICAgICAgICBNYXRJY29uTW9kdWxlLAogICAgICAgICAgICBNYXRTZWxlY3RNb2R1bGUsCiAgICAgICAgICAgIE1hdFNsaWRlck1vZHVsZV0sIGV4cG9ydHM6IFtSaWdodFBhbmVDb21wb25lbnRdIH0pOyB9KSgpOwoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogdGVuc29yYm9hcmQvd2ViYXBwL21ldHJpY3Mvdmlld3MvbWFpbl92aWV3L21haW5fdmlld19tb2R1bGUudHMKICAgICAqIEBzdXBwcmVzcyB7Y2hlY2tUeXBlcyxjb25zdGFudFByb3BlcnR5LGV4dHJhUmVxdWlyZSxtaXNzaW5nT3ZlcnJpZGUsbWlzc2luZ1JldHVybix1bnVzZWRQcml2YXRlTWVtYmVycyx1c2VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgY2xhc3MgTWFpblZpZXdNb2R1bGUgewogICAgfQogICAgTWFpblZpZXdNb2R1bGUuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IE5nTW9kdWxlLCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIGRlY2xhcmF0aW9uczogWwogICAgICAgICAgICAgICAgICAgICAgICBDYXJkR3JpZENvbXBvbmVudCwKICAgICAgICAgICAgICAgICAgICAgICAgQ2FyZEdyaWRDb250YWluZXIsCiAgICAgICAgICAgICAgICAgICAgICAgIENhcmRHcm91cHNDb21wb25lbnQsCiAgICAgICAgICAgICAgICAgICAgICAgIENhcmRHcm91cHNDb250YWluZXIsCiAgICAgICAgICAgICAgICAgICAgICAgIEZpbHRlcmVkVmlld0NvbXBvbmVudCwKICAgICAgICAgICAgICAgICAgICAgICAgRmlsdGVyZWRWaWV3Q29udGFpbmVyLAogICAgICAgICAgICAgICAgICAgICAgICBNYWluVmlld0NvbXBvbmVudCwKICAgICAgICAgICAgICAgICAgICAgICAgTWFpblZpZXdDb250YWluZXIsCiAgICAgICAgICAgICAgICAgICAgICAgIE1ldHJpY3NGaWx0ZXJJbnB1dENvbXBvbmVudCwKICAgICAgICAgICAgICAgICAgICAgICAgTWV0cmljc0ZpbHRlcklucHV0Q29udGFpbmVyLAogICAgICAgICAgICAgICAgICAgICAgICBQaW5uZWRWaWV3Q29tcG9uZW50LAogICAgICAgICAgICAgICAgICAgICAgICBQaW5uZWRWaWV3Q29udGFpbmVyLAogICAgICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICAgICAgZXhwb3J0czogW01haW5WaWV3Q29udGFpbmVyXSwKICAgICAgICAgICAgICAgICAgICBpbXBvcnRzOiBbCiAgICAgICAgICAgICAgICAgICAgICAgIENvbW1vbk1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgQ2FyZFJlbmRlcmVyTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBNYXRBdXRvY29tcGxldGVNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIE1hdEJ1dHRvbk1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgTWF0SWNvbk1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgTWF0SW5wdXRNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIFJpZ2h0UGFuZU1vZHVsZSwKICAgICAgICAgICAgICAgICAgICBdLAogICAgICAgICAgICAgICAgfSxdIH0sCiAgICBdOwogICAgLyoqIEBub2NvbGxhcHNlICovIE1haW5WaWV3TW9kdWxlLsm1bW9kID0gybXJtWRlZmluZU5nTW9kdWxlKHsgdHlwZTogTWFpblZpZXdNb2R1bGUgfSk7CiAgICAvKiogQG5vY29sbGFwc2UgKi8gTWFpblZpZXdNb2R1bGUuybVpbmogPSDJtcm1ZGVmaW5lSW5qZWN0b3IoeyBmYWN0b3J5OiBmdW5jdGlvbiBNYWluVmlld01vZHVsZV9GYWN0b3J5KHQpIHsgcmV0dXJuIG5ldyAodCB8fCBNYWluVmlld01vZHVsZSkoKTsgfSwgaW1wb3J0czogW1sKICAgICAgICAgICAgICAgIENvbW1vbk1vZHVsZSwKICAgICAgICAgICAgICAgIENhcmRSZW5kZXJlck1vZHVsZSwKICAgICAgICAgICAgICAgIE1hdEF1dG9jb21wbGV0ZU1vZHVsZSwKICAgICAgICAgICAgICAgIE1hdEJ1dHRvbk1vZHVsZSwKICAgICAgICAgICAgICAgIE1hdEljb25Nb2R1bGUsCiAgICAgICAgICAgICAgICBNYXRJbnB1dE1vZHVsZSwKICAgICAgICAgICAgICAgIFJpZ2h0UGFuZU1vZHVsZSwKICAgICAgICAgICAgXV0gfSk7CiAgICAoZnVuY3Rpb24gKCkgeyAodHlwZW9mIG5nSml0TW9kZSA9PT0gInVuZGVmaW5lZCIgfHwgbmdKaXRNb2RlKSAmJiDJtcm1c2V0TmdNb2R1bGVTY29wZShNYWluVmlld01vZHVsZSwgeyBkZWNsYXJhdGlvbnM6IFtDYXJkR3JpZENvbXBvbmVudCwKICAgICAgICAgICAgQ2FyZEdyaWRDb250YWluZXIsCiAgICAgICAgICAgIENhcmRHcm91cHNDb21wb25lbnQsCiAgICAgICAgICAgIENhcmRHcm91cHNDb250YWluZXIsCiAgICAgICAgICAgIEZpbHRlcmVkVmlld0NvbXBvbmVudCwKICAgICAgICAgICAgRmlsdGVyZWRWaWV3Q29udGFpbmVyLAogICAgICAgICAgICBNYWluVmlld0NvbXBvbmVudCwKICAgICAgICAgICAgTWFpblZpZXdDb250YWluZXIsCiAgICAgICAgICAgIE1ldHJpY3NGaWx0ZXJJbnB1dENvbXBvbmVudCwKICAgICAgICAgICAgTWV0cmljc0ZpbHRlcklucHV0Q29udGFpbm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OiB0ZW5zb3Jib2FyZC93ZWJhcHAvbWV0cmljcy9tZXRyaWNzX21vZHVsZS50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBDUkVBVEVfUElOX01BWF9FWENFRURFRF9URVhUID0gYE1heCBwaW4gbGltaXQgZXhjZWVkZWQuIFJlbW92ZSBleGlzdGluZ2AgKwogICAgICAgIGAgcGlucyBiZWZvcmUgYWRkaW5nIG1vcmUuIFNlZSBgICsKICAgICAgICBgaHR0cHM6Ly9naXRodWIuY29tL3RlbnNvcmZsb3cvdGVuc29yYm9hcmQvaXNzdWVzLzQyNDJgOwogICAgLy8gTm90ZTogQW5ndWxhciBjYW4gb25seSByZWZlcmVuY2Ugc3ltYm9scyBmcm9tIHRoZSBATmdNb2R1bGUgaWYgdGhleSBhcmUKICAgIC8vIGV4cG9ydGVkLgogICAgLyoqCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBhbGVydEFjdGlvblByb3ZpZGVyJDEoKSB7CiAgICAgICAgcmV0dXJuIFsKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgYWN0aW9uQ3JlYXRvcjogY2FyZFBpblN0YXRlVG9nZ2xlZCwKICAgICAgICAgICAgICAgIGFsZXJ0RnJvbUFjdGlvbjogKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBhY3Rpb24KICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChhY3Rpb24pID0+IHsKICAgICAgICAgICAgICAgICAgICBjb25zdCB7IHdhc1Bpbm5lZCwgY2FuQ3JlYXRlTmV3UGlucyB9ID0gKC8qKiBAdHlwZSB7P30gKi8gKGFjdGlvbikpOwogICAgICAgICAgICAgICAgICAgIGlmICghd2FzUGlubmVkICYmICFjYW5DcmVhdGVOZXdQaW5zKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7IGxvY2FsaXplZE1lc3NhZ2U6IENSRUFURV9QSU5fTUFYX0VYQ0VFREVEX1RFWFQgfTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgICAgICAgICB9KSwKICAgICAgICAgICAgfSwKICAgICAgICBdOwogICAgfQogICAgY2xhc3MgTWV0cmljc01vZHVsZSB7CiAgICB9CiAgICBNZXRyaWNzTW9kdWxlLmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBOZ01vZHVsZSwgYXJnczogW3sKICAgICAgICAgICAgICAgICAgICBpbXBvcnRzOiBbCiAgICAgICAgICAgICAgICAgICAgICAgIENvbW1vbk1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgUnVuc1NlbGVjdG9yTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBQbHVnaW5SZWdpc3RyeU1vZHVsZS5mb3JQbHVnaW4oTUVUUklDU19QTFVHSU5fSUQsIE1ldHJpY3NEYXNoYm9hcmRDb250YWluZXIpLAogICAgICAgICAgICAgICAgICAgICAgICBNZXRyaWNzRGF0YVNvdXJjZU1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgTWV0cmljc1ZpZXdzTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBTdG9yZU1vZHVsZS5mb3JGZWF0dXJlKE1FVFJJQ1NfRkVBVFVSRV9LRVksIHJlZHVjZXJzJDcpLAogICAgICAgICAgICAgICAgICAgICAgICBFZmZlY3RzTW9kdWxlLmZvckZlYXR1cmUoW01ldHJpY3NFZmZlY3RzXSksCiAgICAgICAgICAgICAgICAgICAgICAgI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hdG9yID0gewogICAgICAgIEFORDogMCwKICAgIH07CiAgICBPcGVyYXRvcltPcGVyYXRvci5BTkRdID0gJ0FORCc7CiAgICAvKiogQGVudW0ge251bWJlcn0gKi8KICAgIGNvbnN0IEFyaXRobWV0aWNLaW5kID0gewogICAgICAgIE1FVFJJQzogMCwKICAgICAgICBPUEVSQVRPUjogMSwKICAgIH07CiAgICBBcml0aG1ldGljS2luZFtBcml0aG1ldGljS2luZC5NRVRSSUNdID0gJ01FVFJJQyc7CiAgICBBcml0aG1ldGljS2luZFtBcml0aG1ldGljS2luZC5PUEVSQVRPUl0gPSAnT1BFUkFUT1InOwogICAgLyoqIEBlbnVtIHtudW1iZXJ9ICovCiAgICBjb25zdCBTb3J0T3JkZXIgPSB7CiAgICAgICAgRE9XTjogMCwKICAgICAgICBVUDogMSwKICAgIH07CiAgICBTb3J0T3JkZXJbU29ydE9yZGVyLkRPV05dID0gJ0RPV04nOwogICAgU29ydE9yZGVyW1NvcnRPcmRlci5VUF0gPSAnVVAnOwoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogdGVuc29yYm9hcmQvd2ViYXBwL3BsdWdpbnMvbnBtaS9zdG9yZS9ucG1pX3NlbGVjdG9ycy50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBzZWxlY3ROcG1pU3RhdGUgPSBjcmVhdGVGZWF0dXJlU2VsZWN0b3IoTlBNSV9GRUFUVVJFX0tFWSk7CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBnZXRQbHVnaW5EYXR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ByZXR1cm4gez99CiAgICAgKi8KICAgIChzdGF0ZSkgPT4gewogICAgICAgIHJldHVybiBzdGF0ZS5hbm5vdGF0aW9uc0V4cGFuZGVkOwogICAgfSkpOwogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgZ2V0U2lkZWJhckV4cGFuZGVkID0gY3JlYXRlU2VsZWN0b3Ioc2VsZWN0TnBtaVN0YXRlLCAoLyoqCiAgICAgKiBAcGFyYW0gez99IHN0YXRlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICAoc3RhdGUpID0+IHsKICAgICAgICByZXR1cm4gc3RhdGUuc2lkZWJhckV4cGFuZGVkOwogICAgfSkpOwogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgZ2V0U2hvd0NvdW50cyA9IGNyZWF0ZVNlbGVjdG9yKHNlbGVjdE5wbWlTdGF0ZSwgKC8qKgogICAgICogQHBhcmFtIHs/fSBzdGF0ZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgKHN0YXRlKSA9PiB7CiAgICAgICAgcmV0dXJuIHN0YXRlLnNob3dDb3VudHM7CiAgICB9KSk7CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBnZXRTaG93SGlkZGVuQW5ub3RhdGlvbnMgPSBjcmVhdGVTZWxlY3RvcihzZWxlY3ROcG1pU3RhdGUsICgvKioKICAgICAqIEBwYXJhbSB7P30gc3RhdGUKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIChzdGF0ZSkgPT4gewogICAgICAgIHJldHVybiBzdGF0ZS5zaG93SGlkZGVuQW5ub3RhdGlvbnM7CiAgICB9KSk7CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBnZXRTaWRlYmFyV2lkdGggPSBjcmVhdGVTZWxlY3RvcihzZWxlY3ROcG1pU3RhdGUsICgvKioKICAgICAqIEBwYXJhbSB7P30gc3RhdGUKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIChzdGF0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FlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdAoKICAgICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjAKCiAgICBVbmxlc3MgcmVxdWlyZWQgYnkgYXBwbGljYWJsZSBsYXcgb3IgYWdyZWVkIHRvIGluIHdyaXRpbmcsIHNvZnR3YXJlCiAgICBkaXN0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiAiQVMgSVMiIEJBU0lTLAogICAgV0lUSE9VVCBXQVJSQU5USUVTIE9SIENPTkRJVElPTlMgT0YgQU5ZIEtJTkQsIGVpdGhlciBleHByZXNzIG9yIGltcGxpZWQuCiAgICBTZWUgdGhlIExpY2Vuc2UgZm9yIHRoZSBzcGVjaWZpYyBsYW5ndWFnZSBnb3Zlcm5pbmcgcGVybWlzc2lvbnMgYW5kCiAgICBsaW1pdGF0aW9ucyB1bmRlciB0aGUgTGljZW5zZS4KICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gbWV0cmljCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBtZXRyaWNJc01ldHJpY0NvdW50KG1ldHJpYykgewogICAgICAgIHJldHVybiBtZXRyaWMuc3RhcnRzV2l0aCgnY291bnRAJyk7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gbWV0cmljCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBtZXRyaWNJc05wbWkobWV0cmljKSB7CiAgICAgICAgcmV0dXJuIG1ldHJpYy5zdGFydHNXaXRoKCduUE1JQCcpIHx8IG1ldHJpYy5zdGFydHNXaXRoKCduUE1JX2RpZmZAJyk7CiAgICB9CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gbWV0cmljCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBtZXRyaWNJc05wbWlBbmROb3REaWZmKG1ldHJpYykgewogICAgICAgIHJldHVybiBtZXRyaWMuc3RhcnRzV2l0aCgnblBNSUAnKTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBtZXRyaWNTdHJpbmcKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHN0cmlwTWV0cmljU3RyaW5nKG1ldHJpY1N0cmluZykgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBzdHJpcHBlZFN0cmluZyA9IG1ldHJpY1N0cmluZy5zcGxpdCgnQCcsIDIpWzFdOwogICAgICAgIHJldHVybiBzdHJpcHBlZFN0cmluZzsKICAgIH0KCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcgYWRkZWQgYnkgdHNpY2tsZQogICAgICogR2VuZXJhdGVkIGZyb206IHRlbnNvcmJvYXJkL3dlYmFwcC9wbHVnaW5zL25wbWkvc3RvcmUvbnBtaV9yZWR1Y2Vycy50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBpbml0aWFsU3RhdGUkNiA9IHsKICAgICAgICBwbHVnaW5EYXRhTG9hZGVkOiB7CiAgICAgICAgICAgIHN0YXRlOiBEYXRhTG9hZFN0YXRlLk5PVF9MT0FERUQsCiAgICAgICAgICAgIGxhc3RMb2FkZWRUaW1lSW5NczogbnVsbCwKICAgICAgICB9LAogICAgICAgIGFubm90YXRpb25EYXRhOiB7fSwKICAgICAgICBydW5Ub01ldHJpY3M6IHt9LAogICAgICAgIGVtYmVkZGluZ0RhdGE6IHt9LAogICAgICAgIHNlbGVjdGVkQW5ub3RhdGlvbnM6IFtdLAogICAgICAgIGZsYWdnZWRBbm5vdGF0aW9uczogW10sCiAgICAgICAgaGlkZGVuQW5ub3RhdGlvbnM6IFtdLAogICAgICAgIGFubm90YXRpb25zUmVnZXg6ICcnLAogICAgICAgIG1ldHJpY3NSZWdleDogJycsCiAgICAgICAgbWV0cmljQXJpdGhtZXRpYzogW10sCiAgICAgICAgbWV0cmljRmlsdGVyczoge30sCiAgICAgICAgc29ydDogewogICAgICAgICAgICBtZXRyaWM6ICcnLAogICAgICAgICAgICBvcmRlcjogU29ydE9yZGVyLkRPV04sCiAgICAgICAgfSwKICAgICAgICBwY0V4cGFuZGVkOiB0cnVlLAogICAgICAgIGFubm90YXRpb25zRXhwYW5kZWQ6IHRydWUsCiAgICAgICAgc2lkZWJhckV4cGFuZGVkOiB0cnVlLAogICAgICAgIHNob3dDb3VudHM6IHRydWUsCiAgICAgICAgc2hvd0hpZGRlbkFubm90YXRpb25zOiBmYWxzZSwKICAgICAgICBzaWRlYmFyV2lkdGg6IDMwMCwKICAgIH07CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCByZWR1Y2VyJDYgPSBjcmVhdGVSZWR1Y2VyKGluaXRpYWxTdGF0ZSQ2LCBvbihucG1pUGx1Z2luRGF0YVJlcXVlc3RlZCwgKC8qKgogICAgICogQHBhcmFtIHs/fSBzdGF0ZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgKHN0YXRlKSA9PiB7CiAgICAgICAgcmV0dXJuIE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgc3RhdGUpLCB7IHBsdWdpbkRhdGFMb2FkZWQ6IE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgc3RhdGUucGx1Z2luRGF0YUxvYWRlZCksIHsgc3RhdGU6IERhdGFMb2FkU3RhdGUuTE9BRElORyB9KSB9KTsKICAgIH0pKSwgb24obnBtaVBsdWdpbkRhdGFSZXF1ZXN0RmFpbGVkLCAoLyoqCiAgICAgKiBAcGFyYW0gez99IHN0YXRlCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICAoc3RhdGUpID0+IHsKICAgICAgICByZXR1cm4gT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LCBzdGF0ZSksIHsgcGx1Z2luRGF0YUxvYWRlZDogT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LCBzdGF0ZS5wbHVnaW5EYXRhTG9hZGVkKSwgeyBzdGF0ZTogRGF0YUxvYWRTdGF0ZS5GQUlMRUQgfSkgfSk7CiAgICB9KSksIG9uKG5wbWlQbHVnaW5EYXRhTG9hZGVkLCAoLyoqCiAgICAgKiBAcGFyYW0gez99IHN0YXRlCiAgICAgKiBAcGFyYW0gez99IF9fMQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgKHN0YXRlLCB7IGFubm90YXRpb25EYXRhLCBtZXRyaWNzLCBlbWJlZGRpbmdEYXRhIH0pID0+IHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgcnVuVG9NZXRyaWNzID0ge307CiAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gbWV0cmljcykgewogICAgICAgICAgICAvLyBJbml0IE1ldHJpY3MgRGF0YQogICAgICAgICAgICBydW5Ub01ldHJpY3Nba2V5XSA9IFtdOwogICAgICAgICAgICBmb3IgKGNvbnN0IHZhbHVlIG9mIG1ldHJpY3Nba2V5XSkgewogICAgICAgICAgICAgICAgaWYgKG1ldHJpY0lzTnBtaSh2YWx1ZSkpIHsKICAgICAgICAgICAgICAgICAgICBydW5Ub01ldHJpY3Nba2V5XS5wdXNoKHZhbHVlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gT2JqZWN0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bm5vdGF0aW9uKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LCBzdGF0ZSksIHsgc2VsZWN0ZWRBbm5vdGF0aW9uczogWy4uLmNvbWJpbmVkU2VsZWN0ZWRBbm5vdGF0aW9uc10gfSk7CiAgICB9KSksIG9uKG5wbWlTZXRTZWxlY3RlZEFubm90YXRpb25zLCAoLyoqCiAgICAgKiBAcGFyYW0gez99IHN0YXRlCiAgICAgKiBAcGFyYW0gez99IF9fMQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgKHN0YXRlLCB7IGFubm90YXRpb25zIH0pID0+IHsKICAgICAgICByZXR1cm4gT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LCBzdGF0ZSksIHsgc2VsZWN0ZWRBbm5vdGF0aW9uczogYW5ub3RhdGlvbnMgfSk7CiAgICB9KSksIG9uKG5wbWlDbGVhclNlbGVjdGVkQW5ub3RhdGlvbnMsICgvKioKICAgICAqIEBwYXJhbSB7P30gc3RhdGUKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIChzdGF0ZSkgPT4gewogICAgICAgIHJldHVybiBPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sIHN0YXRlKSwgeyBzZWxlY3RlZEFubm90YXRpb25zOiBbXSB9KTsKICAgIH0pKSwgb24obnBtaVRvZ2dsZUFubm90YXRpb25GbGFncywgKC8qKgogICAgICogQHBhcmFtIHs/fSBzdGF0ZQogICAgICogQHBhcmFtIHs/fSBfXzEKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIChzdGF0ZSwgeyBhbm5vdGF0aW9ucyB9KSA9PiB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGNvbWJpbmVkRmxhZ2dlZEFubm90YXRpb25zID0gbmV3IFNldChbCiAgICAgICAgICAgIC4uLnN0YXRlLmZsYWd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XRpb25zLnNpemUgPT09IHN0YXRlLmhpZGRlbkFubm90YXRpb25zLmxlbmd0aCkgewogICAgICAgICAgICAvLyBJZiBhbGwgYW5ub3RhdGlvbnMgYXJlIGFscmVhZHkgZmxhZ2dlZCwgdXNlciB3YW50cyB0byByZW1vdmUgdGhlbQogICAgICAgICAgICBmb3IgKGNvbnN0IGFubm90YXRpb24gb2YgYW5ub3RhdGlvbnMpIHsKICAgICAgICAgICAgICAgIGNvbWJpbmVkSGlkZGVuQW5ub3RhdGlvbnMuZGVsZXRlKGFubm90YXRpb24pOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiBPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sIHN0YXRlKSwgeyBoaWRkZW5Bbm5vdGF0aW9uczogWy4uLmNvbWJpbmVkSGlkZGVuQW5ub3RhdGlvbnNdLCBzZWxlY3RlZEFubm90YXRpb25zOiBbXSB9KTsKICAgIH0pKSwgb24obnBtaUFubm90YXRpb25zUmVnZXhDaGFuZ2VkLCAoLyoqCiAgICAgKiBAcGFyYW0gez99IHN0YXRlCiAgICAgKiBAcGFyYW0gez99IF9fMQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgKHN0YXRlLCB7IHJlZ2V4IH0pID0+IHsKICAgICAgICByZXR1cm4gT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LCBzdGF0ZSksIHsgYW5ub3RhdGlvbnNSZWdleDogcmVnZXggfSk7CiAgICB9KSksIG9uKG5wbWlNZXRyaWNzUmVnZXhDaGFuZ2VkLCAoLyoqCiAgICAgKiBAcGFyYW0gez99IHN0YXRlCiAgICAgKiBAcGFyYW0gez99IF9fMQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgKHN0YXRlLCB7IHJlZ2V4IH0pID0+IHsKICAgICAgICByZXR1cm4gT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LCBzdGF0ZSksIHsgbWV0cmljc1JlZ2V4OiByZWdleCB9KTsKICAgIH0pKSwgb24obnBtaUFkZE1ldHJpY0ZpbHRlciwgKC8qKgogICAgICogQHBhcmFtIHs/fSBzdGF0ZQogICAgICogQHBhcmFtIHs/fSBfXzEKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIChzdGF0ZSwgeyBtZXRyaWMgfSkgPT4gewogICAgICAgIC8vIE9ubHkgYWRkIGlmIG5vdCBhbHJlYWR5IGluIGFjdGl2ZSBmaWx0ZXJzCiAgICAgICAgaWYgKHN0YXRlLm1ldHJpY0ZpbHRlcnNbbWV0cmljXSkgewogICAgICAgICAgICByZXR1cm4gc3RhdGU7CiAgICAgICAgfQogICAgICAgIC8vIEFkZCBzbyB0aGF0IGFyaXRobWV0aWMgaXMgc3RpbGwgY29ycmVjdAogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBuZXdDb250ZW50ID0gW107CiAgICAgICAgaWYgKHN0YXRlLm1ldHJpY0FyaXRobWV0aWMubGVuZ3RoICE9PSAwKSB7CiAgICAgICAgICAgIG5ld0NvbnRlbnQucHVzaCh7CiAgICAgICAgICAgICAgICBraW5kOiBBcml0aG1ldGljS2luZC5PUEVSQVRPUiwKICAgICAgICAgICAgICAgIG9wZXJhdG9yOiBPcGVyYXRvci5BTkQsCiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICBuZXdDb250ZW50LnB1c2goeyBraW5kOiBBcml0aG1ldGljS2luZC5NRVRSSUMsIG1ldHJpYzogbWV0cmljIH0pOwogICAgICAgIHJldHVybiBPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sIHN0YXRlKSwgeyBtZXRyaWNBcml0aG1ldGljOiBbLi4uc3RhdGUubWV0cmljQXJpdGhtZXRpYywgLi4ubmV3Q29udGVudF0sIG1ldHJpY0ZpbHRlcnM6IE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgc3RhdGUubWV0cmljRmlsdGVycyksIHsgW21ldHJpY106IHsKICAgICAgICAgICAgICAgICAgICBtYXg6IDEuMCwKICAgICAgICAgICAgICAgICAgICBtaW46IC0xLjAsCiAgICAgICAgICAgICAgICAgICAgaW5jbHVkZU5hTjogZmFsc2UsCiAgICAgICAgICAgICAgICB9IH0pLCBzb3J0OiB7CiAgICAgICAgICAgICAgICBtZXRyaWMsCiAgICAgICAgICAgICAgICBvcmRlcjogU29ydE9yZGVyLkRPV04sCiAgICAgICAgICAgIH0gfSk7CiAgICB9KSksIG9uKG5wbWlSZW1vdmVNZXRyaWNGaWx0ZXIsICgvKioKICAgICAqIEBwYXJhbSB7P30gc3RhdGUKICAgICAqIEBwYXJhbSB7P30gX18xCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICAoc3RhdGUsIHsgbWV0cmljIH0pID0+IHsKICAgICAgICBpZiAoIXN0YXRlLm1ldHJpY0ZpbHRlcnNbbWV0cmljXSkgewogICAgICAgICAgICByZXR1cm4gc3RhdGU7CiAgICAgICAgfQogICAgICAgIC8vIFJlbW92ZSB0aGUgY29ycmVjdCBlbGVtZW50cyBvZiB0aGUgYXJpdGhtZXRpYyBhcyB3ZWxsCiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBhcml0aG1ldGljSW5kZXggPSAwOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBsZXQgc3RhcnRTbGljZSA9IDA7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGxldCBlbmRTbGljZSA9IDI7CiAgICAgICAgY29uc3QgX2EgPSBzdGF0ZS5tZXRyaWNGaWx0ZXJzLCBfYiA9IG1ldHJpYywgdmFsdWUgPSBfYVtfYl0sIG1hcCA9IF9fcmVzdChfYSwgW3R5cGVvZiBfYiA9PT0gInN5bWJvbCIgPyBfYiA6IF9iICsgIiJdKTsKICAgICAgICBmb3IgKGNvbnN0IGluZGV4IGluIHN0YXRlLm1ldHJpY0FyaXRobWV0aWMpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBlbGVtZW50ID0gc3RhdGUubWV0cmljQXJpdGhtZXRpY1tpbmRleF07CiAgICAgICAgICAgIGlmIChlbGVtZW50LmtpbmQgPT09IEFyaXRobWV0aWNLaW5kLk1FVFJJQykgewogICAgICAgICAgICAgICAgaWYgKGVsZW1lbnQubWV0cmljID09PSBtZXRyaWMpIHsKICAgICAgICAgICAgICAgICAgICBhcml0aG1ldGljSW5kZXggPSBwYXJzZUludChpbmRleCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaWYgKGFyaXRobWV0aWNJbmRleCAhPT0gMCkgewogICAgICAgICAgICBzdGFydFNsaWNlID0gYXJpdGhtZXRpY0luZGV4IC0gMTsKICAgICAgICAgICAgZW5kU2xpY2UgPSBhcml0aG1ldGljSW5kZXggKyAxOwogICAgICAgIH0KICAgICAgICByZXR1cm4gT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LCBzdGF0ZSksIHsgbWV0cmljQXJpdGhtZXRpYzogWwogICAgICAgICAgICAgICAgLi4uc3RhdGUubWV0cmljQXJpdGhtZXRpYy5zbGljZSgwLCBzdGFydFNsaWNlKSwKICAgICAgICAgICAgICAgIC4uLnN0YXRlLm1ldHJpY0FyaXRobWV0aWMuc2xpY2UoZW5kU2xpY2UpLAogICAgICAgICAgICBdLCBtZXRyaWNGaWx0ZXJzOiBtYXAgfSk7CiAgICB9KSksIG9uKG5wbWlDaGFuZ2VNZXRyaWNGaWx0ZXIsICgvKioKICAgICAqIEBwYXJhbSB7P30gc3RhdGUKICAgICAqIEBwYXJhbSB7P30gX18xCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICAoc3RhdGUsIHsgbWV0cmljLCBtYXgsIG1pbiwgaW5jbHVkZU5hTiB9KSA9PiB7CiAgICAgICAgaWYgKCFzdGF0ZS5tZXRyaWNGaWx0ZXJzW21ldHJpY10pIHsKICAgICAgICAgICAgcmV0dXJuIHN0YXRlOwogICAgICAgIH0KICAgICAgICByZXR1cm4gT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LCBzdGF0ZSksIHsgbWV0cmljRmlsdGVyczogT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LCBzdGF0ZS5tZXRyaWNGaWx0ZXJzKSwgeyBbbWV0cmljXTogewogICAgICAgICAgICAgICAgICAgIG1heDogbWF4LAogICAgICAgICAgICAgICAgICAgIG1pbjogbWluLAogICAgICAgICAgICAgICAgICAgIGluY2x1ZGVOYU46IGluY2x1ZGVOYU4sCiAgICAgICAgICAgICAgICB9IH0pIH0pOwogICAgfSkpLCBvbihucG1pQ2hhbmdlQW5ub3RhdGlvblNvcnQsICgvKioKICAgICAqIEBwYXJhbSB7P30gc3RhdGUKICAgICAqIEBwYXJhbSB7P30gX18xCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICAoc3RhdGUsIHsgbWV0cmljIH0pID0+IHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgbmV3U29ydCA9IHsKICAgICAgICAgICAgbWV0cmljOiBtZXRyaWMsCiAgICAgICAgICAgIG9yZGVyOiBTb3J0T3JkZXIuRE9XTiwKICAgICAgICB9OwogICAgICAgIGlmIChzdGF0ZS5zb3J0Lm1ldHJpYyA9PT0gbWV0cmljICYmIHN0YXRlLnNvcnQub3JkZXIgPT09IFNvcnRPcmRlci5ET1dOKSB7CiAgICAgICAgICAgIG5ld1NvcnQub3JkZXIgPSBTb3J0T3JkZXIuVVA7CiAgICAgICAgfQogICAgICAgIHJldHVybiBPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sIHN0YXRlKSwgeyBzb3J0OiBuZXdTb3J0IH0pOwogICAgfSkpLCBvbihucG1pVG9nZ2xlUGFyYWxsZWxDb29yZGluYXRlc0V4cGFuZGVkLCAoLyoqCiAgICAgKiBAcGFyY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VudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWJbX25nY29udGVudC0lQ09NUCVdLCAubWF0LXByaW1hcnlbX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWItbGFiZWxbX25nY29udGVudC0lQ09NUCVde2JhY2tncm91bmQtY29sb3I6I2Y1N2MwMH0ubWF0LXByaW1hcnlbX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWItbGFiZWwtdGV4dFtfbmdjb250ZW50LSVDT01QJV17Y29sb3I6I2ZmZn0ubWF0LWFjY2VudFtfbmdjb250ZW50LSVDT01QJV0gICAubWF0LXNsaWRlci10cmFjay1maWxsW19uZ2NvbnRlbnQtJUNPTVAlXSwgLm1hdC1hY2NlbnRbX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWJbX25nY29udGVudC0lQ09NUCVdLCAubWF0LWFjY2VudFtfbmdjb250ZW50LSVDT01QJV0gICAubWF0LXNsaWRlci10aHVtYi1sYWJlbFtfbmdjb250ZW50LSVDT01QJV17YmFja2dyb3VuZC1jb2xvcjojZmY5ODAwfS5tYXQtYWNjZW50W19uZ2NvbnRlbnQtJUNPTVAlXSAgIC5tYXQtc2xpZGVyLXRodW1iLWxhYmVsLXRleHRbX25nY29udGVudC0lQ09NUCVde2NvbG9yOiNmZmZ9Lm1hdC13YXJuW19uZ2NvbnRlbnQtJUNPTVAlXSAgIC5tYXQtc2xpZGVyLXRyYWNrLWZpbGxbX25nY29udGVudC0lQ09NUCVdLCAubWF0LXdhcm5bX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWJbX25nY29udGVudC0lQ09NUCVdLCAubWF0LXdhcm5bX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWItbGFiZWxbX25nY29udGVudC0lQ09NUCVde2JhY2tncm91bmQtY29sb3I6I2Y0NDMzNn0ubWF0LXdhcm5bX25nY29udGVudC0l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XNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICBjbGFzcyBNZXRyaWNTZWFyY2hDb250YWluZXIgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gc3RvcmUKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihzdG9yZSkgewogICAgICAgICAgICB0aGlzLnN0b3JlID0gc3RvcmU7CiAgICAgICAgICAgIHRoaXMubWV0cmljc1JlZ2V4JCA9IHRoaXMuc3RvcmUuc2VsZWN0KGdldE1ldHJpY3NSZWdleCk7CiAgICAgICAgICAgIHRoaXMuYWN0aXZlUnVucyQgPSB0aGlzLnN0b3JlCiAgICAgICAgICAgICAgICAucGlwZShzZWxlY3QoZ2V0Q3VycmVudFJvdXRlUnVuU2VsZWN0aW9uKSkKICAgICAgICAgICAgICAgIC5waXBlKG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcnVuU2VsZWN0aW9uCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAocnVuU2VsZWN0aW9uKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAoIXJ1blNlbGVjdGlvbikKICAgICAgICAgICAgICAgICAgICByZXR1cm4gW107CiAgICAgICAgICAgICAgICByZXR1cm4gQXJyYXkuZnJvbShydW5TZWxlY3Rpb24uZW50cmllcygpKQogICAgICAgICAgICAgICAgICAgIC5maWx0ZXIoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBydW4KICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChydW4pID0+IHJ1blsxXSkpCiAgICAgICAgICAgICAgICAgICAgLm1hcCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHJ1bgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKHJ1bikgPT4gcnVuWzBdKSk7CiAgICAgICAgICAgIH0pKSk7CiAgICAgICAgICAgIHRoaXMubWV0cmljc0ZvckFjdGl2ZVJ1bnMkID0gY29tYmluZUxhdGVzdCh0aGlzLmFjdGl2ZVJ1bnMkLCB0aGlzLnN0b3JlLnNlbGVjdChnZXRSdW5Ub01ldHJpY3MpKS5waXBlKG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoW2FjdGl2ZVJ1bnMsIHJ1blRvTWV0cmljc10pID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IG1ldHJpY3MgPSBuZXcgU2V0KCk7CiAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IHJ1biBvZiBhY3RpdmVSdW5zKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKHJ1blRvTWV0cmljc1tydW5dKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoY29uc3QgbWV0cmljIG9mIHJ1blRvTWV0cmljc1tydW5dKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXRyaWNzLmFkZChtZXRyaWMpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIFsuLi5tZXRyaWNzXTsKICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgdGhpcy5pc01ldHJpY3NGaWx0ZXJWYWxpZCQgPSB0aGlzLm1ldHJpY3NSZWdleCQucGlwZShtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGZpbHRlclN0cmluZwogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGZpbHRlclN0cmluZykgPT4gewogICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gQm9vbGVhbihuZXcgUmVnRXhwKGZpbHRlclN0cmluZykpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgY2F0Y2ggKGVycikgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgdGhpcy5tZXRyaWNGaWx0ZXJLZXlzJCA9IHRoaXMuc3RvcmUucGlwZShzZWxlY3QoZ2V0TWV0cmljRmlsdGVycykpLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBtZXRyaWNGaWx0ZXJzCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAobWV0cmljRmlsdGVycykgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIE9iamVjdC5rZXlzKG1ldHJpY0ZpbHRlcnMpOwogICAgICAgICAgICB9KSkpOwogICAgICAgICAgICB0aGlzLmNvbXBsZXRpb25zJCA9IGNvbWJpbmVMYXRlc3QodGhpcy5tZXRyaWNzRm9yQWN0aXZlUnVucyQsIHRoaXMubWV0cmljc1JlZ2V4JCwgdGhpcy5tZXRyaWNGaWx0ZXJLZXlzJCkucGlwZShtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKFttZXRyaWNzLCBtZXRyaWNzUmVnZXgsIG1ldHJpY3NXaXRoRmlsdGVyc10pID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGZpbHRlcmVkTWV0cmljcyA9IG1ldHJpY3MuZmlsdGVyKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbWV0cmljCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAobWV0cmljKSA9PiAhbWV0cmljc1dpdGhGaWx0ZXJzLmluY2x1ZGVzKG1ldHJpYykpKTsKICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IGZpbHRlclJlZ2V4ID0gbmV3IFJlZ0V4cChtZXRyaWNzUmVnZXgsICdpJyk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZpbHRlcmVkTWV0cmljcwogICAgICAgICAgICAgICAgICAgICAgICAuZmlsdGVyKCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IG1ldHJpYwogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKG1ldHJpYykgPT4gZmlsdGVyUmVnZXgudGVzdChtZXRyaWMpKSkKICAgICAgICAgICAgICAgICAgICAgICAgLnNvcnQoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGNhdGNoIChlcnIpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gW107CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZmlsdGVyCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvbkZpbHRlckNoYW5nZShmaWx0ZXIpIHsKICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChucG1pTWV0cmljc1JlZ2V4Q2hhbmdlZCh7IHJlZ2V4OiBmaWx0ZXIgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IG1ldHJpYwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25BZGRGaWx0ZXIobWV0cmljKSB7CiAgICAgICAgICAgIHRoaXMuc3RvcmUuZGlzcGF0Y2gobnBtaUFkZE1ldHJpY0ZpbHRlcih7IG1ldHJpYyB9KSk7CiAgICAgICAgICAgIHRoaXMuc3RvcmUuZGlzcGF0Y2gobnBtaU1ldHJpY3NSZWdleENoYW5nZWQoeyByZWdleDogJycgfSkpOwogICAgICAgIH0KICAgIH0KICAgIE1ldHJpY1NlYXJjaENvbnRhaW5lci5kZWNvcmF0b3JzID0gWwogICAgICAgIHsgdHlwZTogQ29tcG9uZW50LCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIHNlbGVjdG9yOiAnbnBtaS1tZXRyaWMtc2VhcmNoJywKICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogYAogICAgPG1ldHJpYy1zZWFyY2gtY29tcG9uZW50CiAgICAgIFtyZWdleEZpbHRlclZhbHVlXT0ibWV0cmljc1JlZ2V4JCB8IGFzeW5jIgogICAgICBbY29tcGxldGlvbnNdPSJjb21wbGV0aW9ucyQgfCBhc3luYyIKICAgICAgW2lzUmVnZXhGaWx0ZXJWYWxpZF09ImlzTWV0cmljc0ZpbHRlclZhbGlkJCB8IGFzeW5jIgogICAgICAob25SZWdleEZpbHRlclZhbHVlQ2hhbmdlKT0ib25GaWx0ZXJDaGFuZ2UoJGV2ZW50KSIKICAgICAgKG9uQWRkRmlsdGVyKT0ib25BZGRGaWx0ZXIoJGV2ZW50KSIKICAgID48L21ldHJpYy1zZWFyY2gtY29tcG9uZW50PgogIGAsCiAgICAgICAgICAgICAgICAgICAgY2hhbmdlRGV0ZWN0aW9uOiBDaGFuZ2VEZXRlY3Rpb25TdHJhdGVneS5PblB1c2gsCiAgICAgICAgICAgICAgICB9LF0gfSwKICAgIF07CiAgICAvKiogQG5vY29sbGFwc2UgKi8KICAgIE1ldHJpY1NlYXJjaENvbnRh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WlyZSxtaXNzaW5nT3ZlcnJpZGUsbWlzc2luZ1JldHVybix1bnVzZWRQcml2YXRlTWVtYmVycyx1c2VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IGZsYWdnZWREYXRhCiAgICAgKiBAcGFyYW0gez99IHJ1bgogICAgICogQHBhcmFtIHs/fSBtZXRyaWNzCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBjb252ZXJ0VG9DU1ZSZXN1bHQoZmxhZ2dlZERhdGEsIHJ1biwgbWV0cmljcykgewogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCByZXN1bHQgPSBbW3J1biwgLi4ubWV0cmljc11dOwogICAgICAgIGlmICghbWV0cmljcy5sZW5ndGggfHwgIWZsYWdnZWREYXRhLmxlbmd0aCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGNzdkNvbnRlbnQgPSAnZGF0YTp0ZXh0L2NzdjtjaGFyc2V0PXV0Zi04LCcgKwogICAgICAgICAgICAgICAgcmVzdWx0Lm1hcCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGUKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChlKSA9PiBlLmpvaW4oJywnKSkpLmpvaW4oJ1xuJyk7CiAgICAgICAgICAgIHJldHVybiBjc3ZDb250ZW50OwogICAgICAgIH0KICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3Qgc3RyaXBwZWRNZXRyaWNzID0gbWV0cmljcy5tYXAoKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gbWV0cmljCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAobWV0cmljKSA9PiBzdHJpcE1ldHJpY1N0cmluZyhtZXRyaWMpKSk7CiAgICAgICAgZm9yIChjb25zdCBbYW5ub3RhdGlvbiwgdmFsdWVEYXRhTGlzdF0gb2YgZmxhZ2dlZERhdGEpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBydW5WYWx1ZXMgPSB2YWx1ZURhdGFMaXN0LmZpbHRlcigoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWVzCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAodmFsdWVzKSA9PiB2YWx1ZXMucnVuID09PSBydW4pKTsKICAgICAgICAgICAgaWYgKHJ1blZhbHVlcy5sZW5ndGgpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGVsZW1lbnRSZXN1bHQgPSBbYW5ub3RhdGlvbl07CiAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IG1ldHJpYyBvZiBzdHJpcHBlZE1ldHJpY3MpIHsKICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgY29uc3QgbWV0cmljVmFsdWUgPSBydW5WYWx1ZXMuZmluZCgoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKHZhbHVlKSA9PiB2YWx1ZS5tZXRyaWMgPT09IG1ldHJpYykpOwogICAgICAgICAgICAgICAgICAgIGlmIChtZXRyaWNWYWx1ZSA9PT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGVsZW1lbnRSZXN1bHQucHVzaCgnbnVsbCcpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgZWxlbWVudFJlc3VsdC5wdXNoKGAke21ldHJpY1ZhbHVlLm5QTUlWYWx1ZX1gKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXN1bHQucHVzaChlbGVtZW50UmVzdWx0KTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgY3N2Q29udGVudCA9ICdkYXRhOnRleHQvY3N2O2NoYXJzZXQ9dXRmLTgsJyArIHJlc3VsdC5tYXAoKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgKGUpID0+IGUuam9pbignLCcpKSkuam9pbignXG4nKTsKICAgICAgICByZXR1cm4gY3N2Q29udGVudDsKICAgIH0KCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcgYWRkZWQgYnkgdHNpY2tsZQogICAgICogR2VuZXJhdGVkIGZyb206IHRlbnNvcmJvYXJkL3dlYmFwcC9wbHVnaW5zL25wbWkvdmlld3MvZGF0YV9zZWxlY3Rpb24vcmVzdWx0c19kb3dubG9hZC9yZXN1bHRzX2Rvd25sb2FkX2NvbXBvbmVudC50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICBjb25zdCBfYzAkdCA9IGZ1bmN0aW9uIChhMCkgeyByZXR1cm4geyAiYWN0aXZlLWJ1dHRvbiI6IGEwIH07IH07CiAgICBjbGFzcyBSZXN1bHRzRG93bmxvYWRDb21wb25lbnQgewogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZG93bmxvYWRSZXN1bHRzKCkgewogICAgICAgICAgICBmb3IgKGNvbnN0IHJ1biBvZiB0aGlzLnJ1bnMpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGNzdkRhdGEgPSBjb252ZXJ0VG9DU1ZSZXN1bHQodGhpcy5mbGFnZ2VkRGF0YSwgcnVuLCB0aGlzLm1ldHJpY3MpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZWxlbWVudCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2EnKTsKICAgICAgICAgICAgICAgIGVsZW1lbnQuc2V0QXR0cmlidXRlKCdocmVmJywgY3N2RGF0YSk7CiAgICAgICAgICAgICAgICBlbGVtZW50LnNldEF0dHJpYnV0ZSgnZG93bmxvYWQnLCBgcmVwb3J0XyR7cnVufS5jc3ZgKTsKICAgICAgICAgICAgICAgIGVsZW1lbnQuY2xpY2soKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIFJlc3VsdHNEb3dubG9hZENvbXBvbmVudC5kZWNvcmF0b3JzID0gWwogICAgICAgIHsgdHlwZTogQ29tcG9uZW50LCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIHNlbGVjdG9yOiAncmVzdWx0cy1kb3dubG9hZC1jb21wb25lbnQnLAogICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlVXJsOiAnLi9yZXN1bHRzX2Rvd25sb2FkX2NvbXBvbmVudC5uZy5odG1sJywKICAgICAgICAgICAgICAgICAgICBzdHlsZVVybHM6IFsnLi9yZXN1bHRzX2Rvd25sb2FkX2NvbXBvbmVudC5jc3MnXSwKICAgICAgICAgICAgICAgICAgICBjaGFuZ2VEZXRlY3Rpb246IENoYW5nZURldGVjdGlvblN0cmF0ZWd5Lk9uUHVzaCwKICAgICAgICAgICAgICAgIH0sXSB9LAogICAgXTs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lCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3Ioc3RvcmUpIHsKICAgICAgICAgICAgdGhpcy5zdG9yZSA9IHN0b3JlOwogICAgICAgICAgICB0aGlzLmZsYWdnZWRBbm5vdGF0aW9ucyQgPSB0aGlzLnN0b3JlLnNlbGVjdChnZXRGbGFnZ2VkQW5ub3RhdGlvbnMpOwogICAgICAgICAgICB0aGlzLm51bUZsYWdnZWRBbm5vdGF0aW9ucyQgPSB0aGlzLmZsYWdnZWRBbm5vdGF0aW9ucyQucGlwZShtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGZsYWdnZWRBbm5vdGF0aW9ucwogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGZsYWdnZWRBbm5vdGF0aW9ucykgPT4gZmxhZ2dlZEFubm90YXRpb25zLmxlbmd0aCkpKTsKICAgICAgICAgICAgdGhpcy5hY3RpdmVSdW5zJCA9IHRoaXMuc3RvcmUuc2VsZWN0KGdldEN1cnJlbnRSb3V0ZVJ1blNlbGVjdGlvbikucGlwZShtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHJ1blNlbGVjdGlvbgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHJ1blNlbGVjdGlvbikgPT4gewogICAgICAgICAgICAgICAgaWYgKCFydW5TZWxlY3Rpb24pCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFtdOwogICAgICAgICAgICAgICAgcmV0dXJuIEFycmF5LmZyb20ocnVuU2VsZWN0aW9uLmVudHJpZXMoKSkKICAgICAgICAgICAgICAgICAgICAuZmlsdGVyKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcnVuCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAocnVuKSA9PiBydW5bMV0pKQogICAgICAgICAgICAgICAgICAgIC5tYXAoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBydW4KICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChydW4pID0+IHJ1blswXSkpOwogICAgICAgICAgICB9KSkpOwogICAgICAgICAgICB0aGlzLmZsYWdnZWREYXRhJCA9IGNvbWJpbmVMYXRlc3QoWwogICAgICAgICAgICAgICAgdGhpcy5zdG9yZS5zZWxlY3QoZ2V0QW5ub3RhdGlvbkRhdGEpLAogICAgICAgICAgICAgICAgdGhpcy5mbGFnZ2VkQW5ub3RhdGlvbnMkLAogICAgICAgICAgICBdKS5waXBlKG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoW2Fubm90YXRpb25EYXRhLCBmbGFnZ2VkQW5ub3RhdGlvbnNdKSA9PiB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBmbGFnU2V0ID0gbmV3IFNldChmbGFnZ2VkQW5ub3RhdGlvbnMpOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZmxhZ2dlZERhdGEgPSBPYmplY3QuZW50cmllcyhhbm5vdGF0aW9uRGF0YSkuZmlsdGVyKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZW50cnkKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChlbnRyeSkgPT4gZmxhZ1NldC5oYXMoZW50cnlbMF0pKSk7CiAgICAgICAgICAgICAgICByZXR1cm4gZmxhZ2dlZERhdGE7CiAgICAgICAgICAgIH0pKSk7CiAgICAgICAgICAgIHRoaXMubWV0cmljcyQgPSBjb21iaW5lTGF0ZXN0KFsKICAgICAgICAgICAgICAgIHRoaXMuc3RvcmUuc2VsZWN0KGdldFJ1blRvTWV0cmljcyksCiAgICAgICAgICAgICAgICB0aGlzLmFjdGl2ZVJ1bnMkLAogICAgICAgICAgICAgICAgdGhpcy5zdG9yZS5zZWxlY3QoZ2V0TWV0cmljRmlsdGVycyksCiAgICAgICAgICAgIF0pLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChbcnVuVG9NZXRyaWNzLCBhY3RpdmVSdW5zLCBtZXRyaWNGaWx0ZXJzXSkgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IG1ldHJpY3MgPSBPYmplY3Qua2V5cyhtZXRyaWNGaWx0ZXJzKTsKICAgICAgICAgICAgICAgIGZvciAoY29uc3QgcnVuIG9mIGFjdGl2ZVJ1bnMpIHsKICAgICAgICAgICAgICAgICAgICBpZiAocnVuVG9NZXRyaWNzW3J1bl0pIHsKICAgICAgICAgICAgICAgICAgICAgICAgbWV0cmljcyA9IG1ldHJpY3MuY29uY2F0KHJ1blRvTWV0cmljc1tydW5dLmZpbHRlcigoLyoqCiAgICAgICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30ga2V5CiAgICAgICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICAgICAoa2V5KSA9PiBtZXRyaWNJc05wbWlBbmROb3REaWZmKGtleSkpKSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgbWV0cmljcyA9IFsuLi5uZXcgU2V0KG1ldHJpY3MpXTsKICAgICAgICAgICAgICAgIHJldHVybiBtZXRyaWNzO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wogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogV2hldGhlciB0aGUgY2hpcCBsaXN0IGlzIGluIG11bHRpLXNlbGVjdGlvbiBtb2RlLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fY2hpcExpc3RNdWx0aXBsZSA9IGZhbHNlOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogV2hldGhlciB0aGUgY2hpcCBsaXN0IGFzIGEgd2hvbGUgaXMgZGlzYWJsZWQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9jaGlwTGlzdERpc2FibGVkID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuX3NlbGVjdGVkID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuX3NlbGVjdGFibGUgPSB0cnVlOwogICAgICAgICAgICB0aGlzLl9kaXNhYmxlZCA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLl9yZW1vdmFibGUgPSB0cnVlOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRW1pdHMgd2hlbiB0aGUgY2hpcCBpcyBmb2N1c2VkLgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fb25Gb2N1cyA9IG5ldyBTdWJqZWN0KCk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBFbWl0cyB3aGVuIHRoZSBjaGlwIGlzIGJsdXJlZC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX29uQmx1ciA9IG5ldyBTdWJqZWN0KCk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBFbWl0dGVkIHdoZW4gdGhlIGNoaXAgaXMgc2VsZWN0ZWQgb3IgZGVzZWxlY3RlZC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuc2VsZWN0aW9uQ2hhbmdlID0gbmV3IEV2ZW50RW1pdHRlcigpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRW1pdHRlZCB3aGVuIHRoZSBjaGlwIGlz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pcFJpcHBsZS5zZXR1cFRyaWdnZXJFdmVudHMoX2VsZW1lbnRSZWYpOwogICAgICAgICAgICB0aGlzLnJpcHBsZUNvbmZpZyA9IGdsb2JhbFJpcHBsZU9wdGlvbnMgfHwge307CiAgICAgICAgICAgIHRoaXMuX2FuaW1hdGlvbnNEaXNhYmxlZCA9IGFuaW1hdGlvbk1vZGUgPT09ICdOb29wQW5pbWF0aW9ucyc7CiAgICAgICAgICAgIHRoaXMudGFiSW5kZXggPSB0YWJJbmRleCAhPSBudWxsID8gKHBhcnNlSW50KHRhYkluZGV4KSB8fCAtMSkgOiAtMTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogV2hldGhlciByaXBwbGVzIGFyZSBkaXNhYmxlZCBvbiBpbnRlcmFjdGlvbgogICAgICAgICAqIFxAZG9jcy1wcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgcmlwcGxlRGlzYWJsZWQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmRpc2FibGVkIHx8IHRoaXMuZGlzYWJsZVJpcHBsZSB8fCAhIXRoaXMucmlwcGxlQ29uZmlnLmRpc2FibGVkOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGV0aGVyIHRoZSBjaGlwIGlzIHNlbGVjdGVkLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHNlbGVjdGVkKCkgeyByZXR1cm4gdGhpcy5fc2VsZWN0ZWQ7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgc2VsZWN0ZWQodmFsdWUpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjb2VyY2VkVmFsdWUgPSBjb2VyY2VCb29sZWFuUHJvcGVydHkodmFsdWUpOwogICAgICAgICAgICBpZiAoY29lcmNlZFZhbHVlICE9PSB0aGlzLl9zZWxlY3RlZCkgewogICAgICAgICAgICAgICAgdGhpcy5fc2VsZWN0ZWQgPSBjb2VyY2VkVmFsdWU7CiAgICAgICAgICAgICAgICB0aGlzLl9kaXNwYXRjaFNlbGVjdGlvbkNoYW5nZSgpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFRoZSB2YWx1ZSBvZiB0aGUgY2hpcC4gRGVmYXVsdHMgdG8gdGhlIGNvbnRlbnQgaW5zaWRlIGA8bWF0LWNoaXA+YCB0YWdzLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHZhbHVlKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fdmFsdWUgIT09IHVuZGVmaW5lZAogICAgICAgICAgICAgICAgPyB0aGlzLl92YWx1ZQogICAgICAgICAgICAgICAgOiB0aGlzLl9lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQudGV4dENvbnRlbnQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCB2YWx1ZSh2YWx1ZSkgeyB0aGlzLl92YWx1ZSA9IHZhbHVlOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogV2hldGhlciBvciBub3QgdGhlIGNoaXAgaXMgc2VsZWN0YWJsZS4gV2hlbiBhIGNoaXAgaXMgbm90IHNlbGVjdGFibGUsCiAgICAgICAgICogY2hhbmdlcyB0byBpdHMgc2VsZWN0ZWQgc3RhdGUgYXJlIGFsd2F5cyBpZ25vcmVkLiBCeSBkZWZhdWx0IGEgY2hpcCBpcwogICAgICAgICAqIHNlbGVjdGFibGUsIGFuZCBpdCBiZWNvbWVzIG5vbi1zZWxlY3RhYmxlIGlmIGl0cyBwYXJlbnQgY2hpcCBsaXN0IGlzCiAgICAgICAgICogbm90IHNlbGVjdGFibGUuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgc2VsZWN0YWJsZSgpIHsgcmV0dXJuIHRoaXMuX3NlbGVjdGFibGUgJiYgdGhpcy5jaGlwTGlzdFNlbGVjdGFibGU7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgc2VsZWN0YWJsZSh2YWx1ZSkgewogICAgICAgICAgICB0aGlzLl9zZWxlY3RhYmxlID0gY29lcmNlQm9vbGVhblByb3BlcnR5KHZhbHVlKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogV2hldGhlciB0aGUgY2hpcCBpcyBkaXNhYmxlZC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBkaXNhYmxlZCgpIHsgcmV0dXJuIHRoaXMuX2NoaXBMaXN0RGlzYWJsZWQgfHwgdGhpcy5fZGlzYWJsZWQ7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgZGlzYWJsZWQodmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5fZGlzYWJsZWQgPSBjb2VyY2VCb29sZWFuUHJvcGVydHkodmFsdWUpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBEZXRlcm1pbmVzIHdoZXRoZXIgb3Igbm90IHRoZSBjaGlwIGRpc3BsYXlzIHRoZSByZW1vdmUgc3R5bGluZyBhbmQgZW1pdHMgKHJlbW92ZWQpIGV2ZW50cy4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCByZW1vdmFibGUoKSB7IHJldHVybiB0aGlzLl9yZW1vdmFibGU7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgcmVtb3ZhYmxlKHZhbHVlKSB7CiAgICAgICAgICAgIHRoaXMuX3JlbW92YWJsZSA9IGNvZXJjZUJvb2xlYW5Qcm9wZXJ0eSh2YWx1ZSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFRoZSBBUklBIHNlbGVjdGVkIGFwcGxpZWQgdG8gdGhlIGNoaXAuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgYXJpYVNlbGVjdGVkKCkgewogICAgICAgICAgICAvLyBSZW1vdmUgdGhlIGBhcmlhLXNlbGVjdGVkYCB3aGVuIHRoZSBjaGlwIGlzIGRlc2VsZWN0ZWQgaW4gc2luZ2xlLXNlbGVjdGlvbiBtb2RlLCBiZWNhdXNlCiAgICAgICAgICAgIC8vIGl0IGFkZHMgbm9pc2UgdG8gTlZEQSB1c2VycyB3aGVyZSAibm90IHNlbGVjdGVkIiB3aWxsIGJlIHJlYWQgb3V0IGZvciBlYWNoIGNoaXAuCiAgICAgICAgICAgIHJldHVybiB0aGlzLnNlbGVjdGFibGUgJiYgKHRoaXMuX2NoaXBMaXN0TXVsdGlwbGUgfHwgdGhpcy5zZWxlY3RlZCkgPwogICAgICAgICAgICAgICAgdGhpcy5zZWxlY3RlZC50b1N0cmluZygpIDogbnVsbDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfYWRkSG9zdENsYXNzTmFtZSgpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBiYXNpY0NoaXBBdHRyTmFtZSA9ICdtYXQtYmFzaWMtY2hpcCc7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZWxlbWVudCA9ICgvKiogQHR5cGUgez99ICovICh0aGlzLl9lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQpKTsKICAgICAgICAgICAgaWYgKGVsZW1lbnQuaGFzQXR0cmlidXRlKGJhc2ljQ2hpcEF0dHJOYW1lKSB8fAogICAgICAgICAgICAgICAgZWxlbWVudC50YWdOYW1lLnRvTG93ZXJDYXNlKCkgPT09IGJhc2ljQ2hpcEF0dHJOYW1lKSB7CiAgICAgICAgICAgICAgICBlbGVtZW50LmNsYXNzTGlzdC5hZGQoYmFzaWNDaGlwQXR0ck5hbWUpOwogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgZWxlbWVudC5jbGFzc0xpc3QuYWRkKCdtYXQtc3RhbmRhcmQtY2hpcCcpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkRlc3Ryb3koKSB7CiAgICAgICAgICAgIHRoaXMuZGVzdHJveWVkLmVtaXQoeyBjaGlwOiB0aGlzIH0pOwogICAgICAgICAgICB0aGlzLl9jaGlwUmlwcGxlLl9yZW1vdmVUcmlnZ2VyRXZlbnRzKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNlbGVjdHMgdGhlIGNoaXAuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZWxlY3QoKSB7CiAgICAgICAgICAgIGlmICghdGhpcy5fc2VsZWN0ZWQpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3NlbGVjdGVkID0gdHJ1ZTsKICAgICAgICAgICAgICAgIHRoaXMuX2Rpc3BhdGNoU2VsZWN0aW9uQ2hhbmdlKCk7CiAgICAgICAgICAgICAgICB0aGlzLl9tYXJrRm9yQ2hlY2soKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBEZXNlbGVjdHMgdGhlIGNoaXAuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkZXNlbGVjdCgpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX3NlbGVjdGVkKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9zZWxlY3RlZCA9IGZhbHNlOwogICAgICAgICAgICAgICAgdGhpcy5fZGlzcGF0Y2hTZWxlY3Rpb25DaGFuZ2UoKTsKICAgICAgICAgICAgICAgIHRoaXMuX21hcmtGb3JDaGVjaygpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFNlbGVjdCB0aGlzIGNoaXAgYW5kIGVtaXQgc2VsZWN0ZWQgZXZlbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNlbGVjdFZpYUludGVyYWN0aW9uKCkgewogICAgICAgICAgICBpZiAoIXRoaXMuX3NlbGVjdGVkKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9zZWxlY3RlZCA9IHRydWU7CiAgICAgICAgICAgICAgICB0aGlzLl9kaXNwYXRjaFNlbGVjdGlvbkNoYW5nZSh0cnVlKTsKICAgICAgICAgICAgICAgIHRoaXMuX21hcmtGb3JDaGVjaygpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFRvZ2dsZXMgdGhlIGN1cnJlbnQgc2VsZWN0ZWQgc3RhdGUgb2YgdGhpcyBjaGlwLgogICAgICAgICAqIEBwYXJhbSB7Pz19IGlzVXNlcklucHV0CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB0b2dnbGVTZWxlY3RlZChpc1VzZXJJbnB1dCA9IGZhbHNlKSB7CiAgICAgICAgICAgIHRoaXMuX3NlbGVjdGVkID0gIXRoaXMuc2VsZWN0ZWQ7CiAgICAgICAgICAgIHRoaXMuX2Rpc3BhdGNoU2VsZWN0aW9uQ2hhbmdlKGlzVXNlcklucHV0KTsKICAgICAgICAgICAgdGhpcy5fbWFya0ZvckNoZWNrKCk7CiAgICAgICAgICAgIHJldHVybiB0aGlzLnNlbGVjdGVkOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBbGxvd3MgZm9yIHByb2dyYW1tYXRpYyBmb2N1c2luZyBvZiB0aGUgY2hpcC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZvY3VzKCkgewogICAgICAgICAgICBpZiAoIXRoaXMuX2hhc0ZvY3VzKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQuZm9jdXMoKTsKICAgICAgICAgICAgICAgIHRoaXMuX29uRm9jdXMubmV4dCh7IGNoaXA6IHRoaXMgfSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5faGFzRm9jdXMgPSB0cnVlOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBbGxvd3MgZm9yIHByb2dyYW1tYXRpYyByZW1vdmFsIG9mIHRoZSBjaGlwLiBDYWxsZWQgYnkgdGhlIE1hdENoaXBMaXN0IHdoZW4gdGhlIERFTEVURSBvcgogICAgICAgICAqIEJBQ0tTUEFDRSBrZXlzIGFyZSBwcmVzc2VkLgogICAgICAgICAqCiAgICAgICAgICogSW5mb3JtcyBhbnkgbGlzdGVuZXJzIG9mIHRoZSByZW1vdmFsIHJlcXVlc3QuIERvZXMgbm90IHJlbW92ZSB0aGUgY2hpcCBmcm9tIHRoZSBET00uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZW1vdmUoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLnJlbW92YWJsZSkgewogICAgICAgICAgICAgICAgdGhpcy5yZW1vdmVkLmVtaXQoeyBjaGlwOiB0aGlzIH0pOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEhhbmRsZXMgY2xpY2sgZXZlbnRzIG9uIHRoZSBjaGlwLgogICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9oYW5kbGVDbGljayhldmVudCkgewogICAgICAgICAgICBpZiAodGhpcy5kaXNhYmxlZCkgewogICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIGV2ZW50LnN0b3BQcm9wYWdhdGlvbigpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEhhbmRsZSBjdXN0b20ga2V5IHByZXNzZXMuCiAgICAgICAgICogQHBhcmFtIHs/fSBldmVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2hhbmRsZUtleWRvd24oZXZlbnQpIHsKICAgICAgICAgICAgaWYgKHRoaXMuZGlzYWJsZWQpIHsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICBzd2l0Y2ggKGV2ZW50LmtleUNvZGUpIHsKICAgICAgICAgICAgICAgIGNhc2UgREVMRVRFOgogICAgICAgICAgICAgICAgY2FzZSBCQUNLU1BBQ0U6CiAgICAgICAgICAgICAgICAgICAgLy8gSWYgd2UgYXJlIHJlbW92YWJsZSwgcmVtb3ZlIHRoZSBmb2N1c2VkIGNoaXAKICAgICAgICAgICAgICAgICAgICB0aGlzLnJlbW92ZSgpOwogICAgICAgICAgICAgICAgICAgIC8vIEFsd2F5cyBwcmV2ZW50IHNvIHBhZ2UgbmF2aWdhdGlvbiBkb2VzIG5vdCBvY2N1cgogICAgICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBjYXNlIFNQQUNFOgogICAgICAgICAgICAgICAgICAgIC8vIElmIHdlIGFyZSBzZWxlY3RhYmxlLCB0b2dnbGUgdGhlIGZvY3VzZWQgY2hpcAogICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLnNlbGVjdGFibGUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy50b2dnbGVTZWxlY3RlZCh0cnVlKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgLy8gQWx3YXlzIHByZXZlbnQgc3BhY2UgZnJvbSBzY3JvbGxpbmcgdGhlIHBhZ2Ugc2luY2UgdGhlIGxpc3QgaGFzIGZvY3VzCiAgICAgICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9ibHVyKCkgewogICAgICAgICAgICAvLyBXaGVuIGFuaW1hdGlvbnMgYXJlIGVuYWJsZWQsIEFuZ3VsYXIgbWF5IGVuZCB1cCByZW1vdmluZyB0aGUgY2hpcCBmcm9tIHRoZSBET00gYSBsaXR0bGUKICAgICAgICAgICAgLy8gZWFybGllciB0aGFuIHVzdWFsLCBjYXVzaW5nIGl0IHRvIGJlIGJsdXJyZWQgYW5kIHRocm93aW5nIG9mZiB0aGUgbG9naWMgaW4gdGhlIGNoaXAgbGlzdAogICAgICAgICAgICAvLyB0aGF0IG1vdmVzIGZvY3VzIG5vdCB0aGUgbmV4dCBpdGVtLiBUbyB3b3JrIGFyb3VuZCB0aGUgaXNzdWUsIHdlIGRlZmVyIG1hcmtpbmcgdGhlIGNoaXAKICAgICAgICAgICAgLy8gYXMgbm90IGZvY3VzZWQgdW50aWwgdGhlIG5leHQgdGltZSB0aGUgem9uZSBzdGFiaWxpemVzLgogICAgICAgICAgICB0aGlzLl9uZ1pvbmUub25TdGFibGUKICAgICAgICAgICAgICAgIC5hc09ic2VydmFibGUoKQogICAgICAgICAgICAgICAgLnBpcGUodGFrZSgxKSkKICAgICAgICAgICAgICAgIC5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgdGhpcy5fbmdab25lLnJ1bigoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5faGFzRm9jdXMgPSBmYWxzZTsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9vbkJsdXIubmV4dCh7IGNoaXA6IHRoaXMgfSk7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez89fSBpc1VzZXJJbnB1dAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2Rpc3BhdGNoU2VsZWN0aW9uQ2hhbmdlKGlzVXNlcklucHV0ID0gZmFsc2UpIHsKICAgICAgICAgICAgdGhpcy5zZWxlY3Rpb25DaGFuZ2UuZW1pdCh7CiAgICAgICAgICAgICAgICBzb3VyY2U6IHRoaXMsCiAgICAgICAgICAgICAgICBpc1VzZXJJbnB1dCwKICAgICAgICAgICAgICAgIHNlbGVjdGVkOiB0aGlzLl9zZWxlY3RlZAogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9tYXJrRm9yQ2hlY2soKSB7CiAgICAgICAgICAgIC8vIEBicmVha2luZy1jaGFuZ2UgOS4wLjAgUmVtb3ZlIHRoaX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ZWNvcmF0b3JzID0gewogICAgICAgIGF2YXRhcjogW3sgdHlwZTogQ29udGVudENoaWxkLCBhcmdzOiBbTWF0Q2hpcEF2YXRhcixdIH1dLAogICAgICAgIHRyYWlsaW5nSWNvbjogW3sgdHlwZTogQ29udGVudENoaWxkLCBhcmdzOiBbTWF0Q2hpcFRyYWlsaW5nSWNvbixdIH1dLAogICAgICAgIHJlbW92ZUljb246IFt7IHR5cGU6IENvbnRlbnRDaGlsZCwgYXJnczogW2ZvcndhcmRSZWYoKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKCkgPT4gTWF0Q2hpcFJlbW92ZSkpLF0gfV0sCiAgICAgICAgc2VsZWN0ZWQ6IFt7IHR5cGU6IElucHV0IH1dLAogICAgICAgIHZhbHVlOiBbeyB0eXBlOiBJbnB1dCB9XSwKICAgICAgICBzZWxlY3RhYmxlOiBbeyB0eXBlOiBJbnB1dCB9XSwKICAgICAgICBkaXNhYmxlZDogW3sgdHlwZTogSW5wdXQgfV0sCiAgICAgICAgcmVtb3ZhYmxlOiBbeyB0eXBlOiBJbnB1dCB9XSwKICAgICAgICBzZWxlY3Rpb25DaGFuZ2U6IFt7IHR5cGU6IE91dHB1dCB9XSwKICAgICAgICBkZXN0cm95ZWQ6IFt7IHR5cGU6IE91dHB1dCB9XSwKICAgICAgICByZW1vdmVkOiBbeyB0eXBlOiBPdXRwdXQgfV0KICAgIH07CiAgICAvKioKICAgICAqIEFwcGxpZXMgcHJvcGVyIChjbGljaykgc3VwcG9ydCBhbmQgYWRkcyBzdHlsaW5nIGZvciB1c2Ugd2l0aCB0aGUgTWF0ZXJpYWwgRGVzaWduICJjYW5jZWwiIGljb24KICAgICAqIGF2YWlsYWJsZSBhdCBodHRwczovL21hdGVyaWFsLmlvL2ljb25zLyNpY19jYW5jZWwuCiAgICAgKgogICAgICogRXhhbXBsZToKICAgICAqCiAgICAgKiAgICAgYDxtYXQtY2hpcD4KICAgICAqICAgICAgIDxtYXQtaWNvbiBtYXRDaGlwUmVtb3ZlPmNhbmNlbDwvbWF0LWljb24+CiAgICAgKiAgICAgPC9tYXQtY2hpcD5gCiAgICAgKgogICAgICogWW91ICptYXkqIHVzZSBhIGN1c3RvbSBpY29uLCBidXQgeW91IG1heSBuZWVkIHRvIG92ZXJyaWRlIHRoZSBgbWF0LWNoaXAtcmVtb3ZlYCBwb3NpdGlvbmluZwogICAgICogc3R5bGVzIHRvIHByb3Blcmx5IGNlbnRlciB0aGUgaWNvbiB3aXRoaW4gdGhlIGNoaXAuCiAgICAgKi8KICAgIGNsYXNzIE1hdENoaXBSZW1vdmUgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gX3BhcmVudENoaXAKICAgICAgICAgKiBAcGFyYW0gez89fSBlbGVtZW50UmVmCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoX3BhcmVudENoaXAsIAogICAgICAgIC8vIEBicmVha2luZy1jaGFuZ2UgMTEuMC4wIGBlbGVtZW50UmVmYCBwYXJhbWV0ZXIgdG8gYmUgbWFkZSByZXF1aXJlZC4KICAgICAgICBlbGVtZW50UmVmKSB7CiAgICAgICAgICAgIHRoaXMuX3BhcmVudENoaXAgPSBfcGFyZW50Q2hpcDsKICAgICAgICAgICAgLy8gQGJyZWFraW5nLWNoYW5nZSAxMS4wLjAgUmVtb3ZlIG51bGwgY2hlY2sgZm9yIGBlbGVtZW50UmVmYC4KICAgICAgICAgICAgaWYgKGVsZW1lbnRSZWYgJiYgZWxlbWVudFJlZi5uYXRpdmVFbGVtZW50Lm5vZGVOYW1lID09PSAnQlVUVE9OJykgewogICAgICAgICAgICAgICAgZWxlbWVudFJlZi5uYXRpdmVFbGVtZW50LnNldEF0dHJpYnV0ZSgndHlwZScsICdidXR0b24nKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDYWxscyB0aGUgc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RlbmRzIF9NYXRDaGlwTGlzdE1peGluQmFzZSB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBfZWxlbWVudFJlZgogICAgICAgICAqIEBwYXJhbSB7P30gX2NoYW5nZURldGVjdG9yUmVmCiAgICAgICAgICogQHBhcmFtIHs/fSBfZGlyCiAgICAgICAgICogQHBhcmFtIHs/fSBfcGFyZW50Rm9ybQogICAgICAgICAqIEBwYXJhbSB7P30gX3BhcmVudEZvcm1Hcm91cAogICAgICAgICAqIEBwYXJhbSB7P30gX2RlZmF1bHRFcnJvclN0YXRlTWF0Y2hlcgogICAgICAgICAqIEBwYXJhbSB7P30gbmdDb250cm9sCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoX2VsZW1lbnRSZWYsIF9jaGFuZ2VEZXRlY3RvclJlZiwgX2RpciwgX3BhcmVudEZvcm0sIF9wYXJlbnRGb3JtR3JvdXAsIF9kZWZhdWx0RXJyb3JTdGF0ZU1hdGNoZXIsIG5nQ29udHJvbCkgewogICAgICAgICAgICBzdXBlcihfZGVmYXVsdEVycm9yU3RhdGVNYXRjaGVyLCBfcGFyZW50Rm9ybSwgX3BhcmVudEZvcm1Hcm91cCwgbmdDb250cm9sKTsKICAgICAgICAgICAgdGhpcy5fZWxlbWVudFJlZiA9IF9lbGVtZW50UmVmOwogICAgICAgICAgICB0aGlzLl9jaGFuZ2VEZXRlY3RvclJlZiA9IF9jaGFuZ2VEZXRlY3RvclJlZjsKICAgICAgICAgICAgdGhpcy5fZGlyID0gX2RpcjsKICAgICAgICAgICAgdGhpcy5uZ0NvbnRyb2wgPSBuZ0NvbnRyb2w7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBJbXBsZW1lbnRlZCBhcyBwYXJ0IG9mIE1hdEZvcm1GaWVsZENvbnRyb2wuCiAgICAgICAgICAgICAqIFxAZG9jcy1wcml2YXRlCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmNvbnRyb2xUeXBlID0gJ21hdC1jaGlwLWxpc3QnOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogV2hlbiBhIGNoaXAgaXMgZGVzdHJveWVkLCB3ZSBzdG9yZSB0aGUgaW5kZXggb2YgdGhlIGRlc3Ryb3llZCBjaGlwIHVudGlsIHRoZSBjaGlwcwogICAgICAgICAgICAgKiBxdWVyeSBsaXN0IG5vdGlmaWVzIGFib3V0IHRoZSB1cGRhdGUuIFRoaXMgaXMgbmVjZXNzYXJ5IGJlY2F1c2Ugd2UgY2Fubm90IGRldGVybWluZSBhbgogICAgICAgICAgICAgKiBhcHByb3ByaWF0ZSBjaGlwIHRoYXQgc2hvdWxkIHJlY2VpdmUgZm9jdXMgdW50aWwgdGhlIGFycmF5IG9mIGNoaXBzIHVwZGF0ZWQgY29tcGxldGVseS4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX2xhc3REZXN0cm95ZWRDaGlwSW5kZXggPSBudWxsOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogU3ViamVjdCB0aGF0IGVtaXRzIHdoZW4gdGhlIGNvbXBvbmVudCBoYXMgYmVlbiBkZXN0cm95ZWQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9kZXN0cm95ZWQgPSBuZXcgU3ViamVjdCgpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogVWlkIG9mIHRoZSBjaGlwIGxpc3QKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuX3VpZCA9IGBtYXQtY2hpcC1saXN0LSR7bmV4dFVuaXF1ZUlkJDcrK31gOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogVGFiIGluZGV4IGZvciB0aGUgY2hpcCBsaXN0LgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5fdGFiSW5kZXggPSAwOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogVXNlciBkZWZpbmVkIHRhYiBpbmRleC4KICAgICAgICAgICAgICogV2hlbiBpdCBpcyBub3QgbnVsbCwgdXNlIHVzZXIgZGVmaW5lZCB0YWIgaW5kZXguIE90aGVyd2lzZSB1c2UgX3RhYkluZGV4CiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl91c2VyVGFiSW5kZXggPSBudWxsOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRnVuY3Rpb24gd2hlbiB0b3VjaGVkCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9vblRvdWNoZWQgPSAoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7IH0pOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRnVuY3Rpb24gd2hlbiBjaGFuZ2VkCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLl9vbkNoYW5nZSA9ICgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsgfSk7CiAgICAgICAgICAgIHRoaXMuX211bHRpcGxlID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuX2NvbXBhcmVXaXRoID0gKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IG8xCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gbzIKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChvMSwgbzIpID0+IG8xID09PSBvMik7CiAgICAgICAgICAgIHRoaXMuX3JlcXVpcmVkID0gZmFsc2U7CiAgICAgICAgICAgIHRoaXMuX2Rpc2FibGVkID0gZmFsc2U7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBPcmllbnRhdGlvbiBvZiB0aGUgY2hpcCBsaXN0LgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5hcmlhT3JpZW50YXRpb24gPSAnaG9yaXpvbnRhbCc7CiAgICAgICAgICAgIHRoaXMuX3NlbGVjdGFibGUgPSB0cnVlOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRXZlbnQgZW1pdHRlZCB3aGVuIHRoZSBzZWxlY3RlZCBjaGlwIGxpc3QgdmFsdWUgaGFzIGJlZW4gY2hhbmdlZCBieSB0aGUgdXNlci4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuY2hhbmdlID0gbmV3IEV2ZW50RW1pdHRlcigpOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogRXZlbnQgdGhhdCBlbWl0cyB3aGVuZXZlciB0aGUgcmF3IHZhbHVlIG9mIHRoZSBjaGlwLWxpc3QgY2hhbmdlcy4gVGhpcyBpcyBoZXJlIHByaW1hcmlseQogICAgICAgICAgICAgKiB0byBmYWNpbGl0YXRlIHRoZSB0d28td2F5IGJpbmRpbmcgZm9yIHRoZSBgdmFsdWVgIGlucHV0LgogICAgICAgICAgICAgKiBcQGRvY3MtcHJpdmF0ZQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy52YWx1ZUNoYW5nZSA9IG5ldyBFdmVudEVtaXR0ZXIoKTsKICAgICAgICAgICAgaWYgKHRoaXMubmdDb250cm9sKSB7CiAgICAgICAgICAgICAgICB0aGlzLm5nQ29udHJvbC52YWx1ZUFjY2Vzc29yID0gdGhpczsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBUaGUgYXJyYXkgb2Ygc2VsZWN0ZWQgY2hpcHMgaW5zaWRlIGNoaXAgbGlzdC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBzZWxlY3RlZCgpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMubXVsdGlwbGUgPyB0aGlzLl9zZWxlY3Rpb25Nb2RlbC5zZWxlY3RlZCA6IHRoaXMuX3NlbGVjdGlvbk1vZGVsLnNlbGVjdGVkWzBdOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBUaGUgQVJJQSByb2xlIGFwcGxpZWQgdG8gdGhlIGNoaXAgbGlzdC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCByb2xlKCkgeyByZXR1cm4gdGhpcy5lbXB0eSA/IG51bGwgOiAnbGlzdGJveCc7IH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGV0aGVyIHRoZSB1c2VyIHNob3VsZCBiZSBhbGxvd2VkIHRvIHNlbGVjdCBtdWx0aXBsZSBjaGlwcy4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBtdWx0aXBsZSgpIHsgcmV0dXJuIHRoaXMuX211bHRpcGxlOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IG11bHRpcGxlKHZhbHVlKSB7CiAgICAgICAgICAgIHRoaXMuX211bHRpcGxlID0gY29lcmNlQm9vbGVhblByb3BlcnR5KHZhbHVlKTsKICAgICAgICAgICAgdGhpcy5fc3luY0NoaXBzU3RhdGUoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQSBmdW5jdGlvbiB0byBjb21wYXJlIHRoZSBvcHRpb24gdmFsdWVzIHdpdGggdGhlIHNlbGVjdGVkIHZhbHVlcy4gVGhlIGZpcnN0IGFyZ3VtZW50CiAgICAgICAgICogaXMgYSB2YWx1ZSBmcm9tIGFuIG9wdGlvbi4gVGhlIHNlY29uZCBpcyBhIHZhbHVlIGZyb20gdGhlIHNlbGVjdGlvbi4gQSBib29sZWFuCiAgICAgICAgICogc2hvdWxkIGJlIHJldHVybmVkLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGNvbXBhcmVXaXRoKCkgeyByZXR1cm4gdGhpcy5fY29tcGFyZVdpdGg7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGZuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgY29tcGFyZVdpdGgoZm4pIHsKICAgICAgICAgICAgdGhpcy5fY29tcGFyZVdpdGggPSBmbjsKICAgICAgICAgICAgaWYgKHRoaXMuX3NlbGVjdGlvbk1vZGVsKSB7CiAgICAgICAgICAgICAgICAvLyBBIGRpZmZlcmVudCBjb21wYXJhdG9yIG1lYW5zIHRoZSBzZWxlY3Rpb24gY291bGQgY2hhbmdlLgogICAgICAgICAgICAgICAgdGhpcy5faW5pdGlhbGl6ZVNlbGVjdGlvbigpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEltcGxlbWVudGVkIGFzIHBhcnQgb2YgTWF0Rm9ybUZpZWxkQ29udHJvbC4KICAgICAgICAgKiBcQGRvY3MtcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHZhbHVlKCkgeyByZXR1cm4gdGhpcy5fdmFsdWU7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgdmFsdWUodmFsdWUpIHsKICAgICAgICAgICAgdGhpcy53cml0ZVZhbHVlKHZhbHVlKTsKICAgICAgICAgICAgdGhpcy5fdmFsdWUgPSB2YWx1ZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogSW1wbGVtZW50ZWQgYXMgcGFydCBvZiBNYXRGb3JtRmllbGRDb250cm9sLgogICAgICAgICAqIFxAZG9jcy1wcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgaWQoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLl9jaGlwSW5wdXQgPyB0aGlzLl9jaGlwSW5wdXQuaWQgOiB0aGlzLl91aWQ7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEltcGxlbWVudGVkIGFzIHBhcnQgb2YgTWF0Rm9ybUZpZWxkQ29udHJvbC4KICAgICAgICAgKiBcQGRvY3MtcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHJlcXVpcmVkKCkgeyByZXR1cm4gdGhpcy5fcmVxdWlyZWQ7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgcmVxdWlyZWQodmFsdWUpIHsKICAgICAgICAgICAgdGhpcy5fcmVxdWlyZWQgPSBjb2VyY2VCb29sZWFuUHJvcGVydHkodmFsdWUpOwogICAgICAgICAgICB0aGlzLnN0YXRlQ2hhbmdlcy5uZXh0KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEltcGxlbWVudGVkIGFzIHBhcnQgb2YgTWF0Rm9ybUZpZWxkQ29udHJvbC4KICAgICAgICAgKiBcQGRvY3MtcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IHBsYWNlaG9sZGVyKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5fY2hpcElucHV0ID8gdGhpcy5fY2hpcElucHV0LnBsYWNlaG9sZGVyIDogdGhpcy5fcGxhY2Vob2xkZXI7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBwbGFjZWhvbGRlcih2YWx1ZSkgewogICAgICAgICAgICB0aGlzLl9wbGFjZWhvbGRlciA9IHZhbHVlOwogICAgICAgICAgICB0aGlzLnN0YXRlQ2hhbmdlcy5uZXh0KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFdoZXRoZXIgYW55IGNoaXBzIG9yIHRoZSBtYXRDaGlwSW5wdXQgaW5zaWRlIG9mIHRoaXMgY2hpcC1saXN0IGhhcyBmb2N1cy4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBmb2N1c2VkKCkgewogICAgICAgICAgICByZXR1cm4gKHRoaXMuX2NoaXBJbnB1dCAmJiB0aGlzLl9jaGlwSW5wdXQuZm9jdXNlZCkgfHwgdGhpcy5faGFzRm9jdXNlZENoaXAoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogSW1wbGVtZW50ZWQgYXMgcGFydCBvZiBNYXRGb3JtRmllbGRDb250cm9sLgogICAgICAgICAqIFxAZG9jcy1wcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgZW1wdHkoKSB7CiAgICAgICAgICAgIHJldHVybiAoIXRoaXMuX2NoaXBJbnB1dCB8fCB0aGlzLl9jaGlwSW5wdXQuZW1wdHkpICYmIHRoaXMuY2hpcHMubGVuZ3RoID09PSAwOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBJbXBsZW1lbnRlZCBhcyBwYXJ0IG9mIE1hdEZvcm1GaWVsZENvbnRyb2wuCiAgICAgICAgICogXEBkb2NzLXByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBzaG91bGRMYWJlbEZsb2F0KCkgeyByZXR1cm4gIXRoaXMuZW1wdHkgfHwgdGhpcy5mb2N1c2VkOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogSW1wbGVtZW50ZWQgYXMgcGFydCBvZiBNYXRGb3JtRmllbGRDb250cm9sLgogICAgICAgICAqIFxAZG9jcy1wcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgZGlzYWJsZWQoKSB7IHJldHVybiB0aGlzLm5nQ29udHJvbCA/ICEhdGhpcy5uZ0NvbnRyb2wuZGlzYWJsZWQgOiB0aGlzLl9kaXNhYmxlZDsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBkaXNhYmxlZCh2YWx1ZSkgewogICAgICAgICAgICB0aGlzLl9kaXNhYmxlZCA9IGNvZXJjZUJvb2xlYW5Qcm9wZXJ0eSh2YWx1ZSk7CiAgICAgICAgICAgIHRoaXMuX3N5bmNDaGlwc1N0YXRlKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFdoZXRoZXIgb3Igbm90IHRoaXMgY2hpcCBsaXN0IGlzIHNlbGVjdGFibGUuIFdoZW4gYSBjaGlwIGxpc3QgaXMgbm90IHNlbGVjdGFibGUsCiAgICAgICAgICogdGhlIHNlbGVjdGVkIHN0YXRlcyBmb3IgYWxsIHRoZSBjaGlwcyBpbnNpZGUgdGhlIGNoaXAgbGlzdCBhcmUgYWx3YXlzIGlnbm9yZWQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgc2VsZWN0YWJsZSgpIHsgcmV0dXJuIHRoaXMuX3NlbGVjdGFibGU7IH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXQgc2VsZWN0YWJsZSh2YWx1ZSkgewogICAgICAgICAgICB0aGlzLl9zZWxlY3RhYmxlID0gY29lcmNlQm9vbGVhblByb3BlcnR5KHZhbHVlKTsKICAgICAgICAgICAgaWYgKHRoaXMuY2hpcHMpIHsKICAgICAgICAgICAgICAgIHRoaXMuY2hpcHMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGNoaXAKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIGNoaXAgPT4gY2hpcC5jaGlwTGlzdFNlbGVjdGFibGUgPSB0aGlzLl9zZWxlY3RhYmxlKSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IHRhYkluZGV4KHZhbHVlKSB7CiAgICAgICAgICAgIHRoaXMuX3VzZXJUYWJJbmRleCA9IHZhbHVlOwogICAgICAgICAgICB0aGlzLl90YWJJbmRleCA9IHZhbHVlOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDb21iaW5lZCBzdHJlYW0gb2YgYWxsIG9mIHRoZSBjaGlsZCBjaGlwcycgc2VsZWN0aW9uIGNoYW5nZSBldmVudHMuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgY2hpcFNlbGVjdGlvbkNoYW5nZXMoKSB7CiAgICAgICAgICAgIHJldHVybiBtZXJnZSguLi50aGlzLmNoaXBzLm1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY2hpcAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgY2hpcCA9PiBjaGlwLnNlbGVjdGlvbkNoYW5nZSkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ29tYmluZWQgc3RyZWFtIG9mIGFsbCBvZiB0aGUgY2hpbGQgY2hpcHMnIGZvY3VzIGNoYW5nZSBldmVudHMuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgY2hpcEZvY3VzQ2hhbmdlcygpIHsKICAgICAgICAgICAgcmV0dXJuIG1lcmdlKC4uLnRoaXMuY2hpcHMubWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjaGlwCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBjaGlwID0+IGNoaXAuX29uRm9jdXMpKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENvbWJpbmVkIHN0cmVhbSBvZiBhbGwgb2YgdGhlIGNoaWxkIGNoaXBzJyBibHVyIGNoYW5nZSBldmVudHMuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgY2hpcEJsdXJDaGFuZ2VzKCkgewogICAgICAgICAgICByZXR1cm4gbWVyZ2UoLi4udGhpcy5jaGlwcy5tYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGNoaXAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGNoaXAgPT4gY2hpcC5fb25CbHVyKSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBDb21iaW5lZCBzdHJlYW0gb2YgYWxsIG9mIHRoZSBjaGlsZCBjaGlwcycgcmVtb3ZlIGNoYW5nZSBldmVudHMuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgY2hpcFJlbW92ZUNoYW5nZXMoKSB7CiAgICAgICAgICAgIHJldHVybiBtZXJnZSguLi50aGlzLmNoaXBzLm1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY2hpcAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgY2hpcCA9PiBjaGlwLmRlc3Ryb3llZCkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ0FmdGVyQ29udGVudEluaXQoKSB7CiAgICAgICAgICAgIHRoaXMuX2tleU1hbmFnZXIgPSBuZXcgRm9jdXNLZXlNYW5hZ2VyKHRoaXMuY2hpcHMpCiAgICAgICAgICAgICAgICAud2l0aFdyYXAoKQogICAgICAgICAgICAgICAgLndpdGhWZXJ0aWNhbE9yaWVudGF0aW9uKCkKICAgICAgICAgICAgICAgIC53aXRoSG9yaXpvbnRhbE9yaWVudGF0aW9uKHRoaXMuX2RpciA/IHRoaXMuX2Rpci52YWx1ZSA6ICdsdHInKTsKICAgICAgICAgICAgaWYgKHRoaXMuX2RpcikgewogICAgICAgICAgICAgICAgdGhpcy5fZGlyLmNoYW5nZQogICAgICAgICAgICAgICAgICAgIC5waXBlKHRha2VVbnRpbCh0aGlzLl9kZXN0cm95ZWQpKQogICAgICAgICAgICAgICAgICAgIC5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBkaXIKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIGRpciA9PiB0aGlzLl9rZXlNYW5hZ2VyLndpdGhIb3Jpem9udGFsT3JpZW50YXRpb24oZGlyKSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2tleU1hbmFnZXIudGFiT3V0LnBpcGUodGFrZVVudGlsKHRoaXMuX2Rlc3Ryb3llZCkpLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLl9hbGxvd0ZvY3VzRXNjYXBlKCk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgLy8gV2hlbiB0aGUgbGlzdCBjaGFuZ2VzLCByZS1zdWJzY3JpYmUKICAgICAgICAgICAgdGhpcy5jaGlwcy5jaGFuZ2VzLnBpcGUoc3RhcnRXaXRoKG51bGwpLCB0YWtlVW50aWwodGhpcy5fZGVzdHJveWVkKSkuc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIGlmICh0aGlzLmRpc2FibGVkKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gU2luY2UgdGhpcyBoYXBwZW5zIGFmdGVyIHRoZSBjb250ZW50IGhhcyBiZWVuCiAgICAgICAgICAgICAgICAgICAgLy8gY2hlY2tlZCwgd2UgbmVlZCB0byBkZWZlciBpdCB0byB0aGUgbmV4dCB0aWNrLgogICAgICAgICAgICAgICAgICAgIFByb21pc2UucmVzb2x2ZSgpLnRoZW4oKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9zeW5jQ2hpcHNTdGF0ZSgpOwogICAgICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHRoaXMuX3Jlc2V0Q2hpcHMoKTsKICAgICAgICAgICAgICAgIC8vIFJlc2V0IGNoaXBzIHNlbGVjdGVkL2Rlc2VsZWN0ZWQgc3RhdHVzCiAgICAgICAgICAgICAgICB0aGlzLl9pbml0aWFsaXplU2VsZWN0aW9uKCk7CiAgICAgICAgICAgICAgICAvLyBDaGVjayB0byBzZWUgaWYgd2UgbmVlZCB0byB1cGRhdGUgb3VyIHRhYiBpbmRleAogICAgICAgICAgICAgICAgdGhpcy5fdXBkYXRlVGFiSW5kZXgoKTsKICAgICAgICAgICAgICAgIC8vIENoZWNrIHRvIHNlZSBpZiB3ZSBoYXZlIGEgZGVzdHJveWVkIGNoaXAgYW5kIG5lZWQgdG8gcmVmb2N1cwogICAgICAgICAgICAgICAgdGhpcy5fdXBkYXRlRm9jdXNGb3JEZXN0cm95ZWRDaGlwcygpOwogICAgICAgICAgICAgICAgdGhpcy5zdGF0ZUNoYW5nZXMubmV4dCgpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qK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gICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uRGVzdHJveSgpIHsKICAgICAgICAgICAgdGhpcy5fZGVzdHJveWVkLm5leHQoKTsKICAgICAgICAgICAgdGhpcy5fZGVzdHJveWVkLmNvbXBsZXRlKCk7CiAgICAgICAgICAgIHRoaXMuc3RhdGVDaGFuZ2VzLmNvbXBsZXRlKCk7CiAgICAgICAgICAgIHRoaXMuX2Ryb3BTdWJzY3JpcHRpb25zKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEFzc29jaWF0ZXMgYW4gSFRNTCBpbnB1dCBlbGVtZW50IHdpdGggdGhpcyBjaGlwIGxpc3QuCiAgICAgICAgICogQHBhcmFtIHs/fSBpbnB1dEVsZW1lbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlZ2lzdGVySW5wdXQoaW5wdXRFbGVtZW50KSB7CiAgICAgICAgICAgIHRoaXMuX2NoaXBJbnB1dCA9IGlucHV0RWxlbWVudDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogSW1wbGVtZW50ZWQgYXMgcGFydCBvZiBNYXRGb3JtRmllbGRDb250cm9sLgogICAgICAgICAqIFxAZG9jcy1wcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBpZHMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldERlc2NyaWJlZEJ5SWRzKGlkcykgeyB0aGlzLl9hcmlhRGVzY3JpYmVkYnkgPSBpZHMuam9pbignICcpOyB9CiAgICAgICAgLy8gSW1wbGVtZW50ZWQgYXMgcGFydCBvZiBDb250cm9sVmFsdWVBY2Nlc3Nvci4KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB3cml0ZVZhbHVlKHZhbHVlKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmNoaXBzKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9zZXRTZWxlY3Rpb25CeVZhbHVlKHZhbHVlLCBmYWxzZSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLy8gSW1wbGVtZW50ZWQgYXMgcGFydCBvZiBDb250cm9sVmFsdWVBY2Nlc3Nvci4KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGZuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZWdpc3Rlck9uQ2hhbmdlKGZuKSB7CiAgICAgICAgICAgIHRoaXMuX29uQ2hhbmdlID0gZm47CiAgICAgICAgfQogICAgICAgIC8vIEltcGxlbWVudGVkIGFzIHBhcnQgb2YgQ29udHJvbFZhbHVlQWNjZXNzb3IuCiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVnaXN0ZXJPblRvdWNoZWQoZm4pIHsKICAgICAgICAgICAgdGhpcy5fb25Ub3VjaGVkID0gZm47CiAgICAgICAgfQogICAgICAgIC8vIEltcGxlbWVudGVkIGFzIHBhcnQgb2YgQ29udHJvbFZhbHVlQWNjZXNzb3IuCiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBpc0Rpc2FibGVkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXREaXNhYmxlZFN0YXRlKGlzRGlzYWJsZWQpIHsKICAgICAgICAgICAgdGhpcy5kaXNhYmxlZCA9IGlzRGlzYWJsZWQ7CiAgICAgICAgICAgIHRoaXMuc3RhdGVDaGFuZ2VzLm5leHQoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogSW1wbGVtZW50ZWQgYXMgcGFydCBvZiBNYXRGb3JtRmllbGRDb250cm9sLgogICAgICAgICAqIFxAZG9jcy1wcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBldmVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25Db250YWluZXJDbGljayhldmVudCkgewogICAgICAgICAgICBpZiAoIXRoaXMuX29yaWdpbmF0ZXNGcm9tQ2hpcChldmVudCkpIHsKICAgICAgICAgICAgICAgIHRoaXMuZm9jdXMoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBGb2N1c2VzIHRoZSBmaXJzdCBub24tZGlzYWJsZWQgY2hpcCBpbiB0aGlzIGNoaXAgbGlzdCwgb3IgdGhlIGFzc29jaWF0ZWQgaW5wdXQgd2hlbiB0aGVyZQogICAgICAgICAqIGFyZSBubyBlbGlnaWJsZSBjaGlwcy4KICAgICAgICAgKiBAcGFyYW0gez89fSBvcHRpb25zCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmb2N1cyhvcHRpb25zKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmRpc2FibGVkKSB7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8gVE9ETzogQVJJQSBzYXlzIHRoaXMgc2hvdWxkIGZvY3VzIHRoZSBmaXJzdCBgc2VsZWN0ZWRgIGNoaXAgaWYgYW55IGFyZSBzZWxlY3RlZC4KICAgICAgICAgICAgLy8gRm9jdXMgb24gZmlyc3QgZWxlbWVudCBpZiB0aGVyZSdzIG5vIGNoaXBJbnB1dCBpbnNpZGUgY2hpcC1saXN0CiAgICAgICAgICAgIGlmICh0aGlzLl9jaGlwSW5wdXQgJiYgdGhpcy5fY2hpcElucHV0LmZvY3VzZWQpIDsKICAgICAgICAgICAgZWxzZSBpZiAodGhpcy5jaGlwcy5sZW5ndGggPiAwKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9rZXlNYW5hZ2VyLnNldEZpcnN0SXRlbUFjdGl2ZSgpOwogICAgICAgICAgICAgICAgdGhpcy5zdGF0ZUNoYW5nZXMubmV4dCgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5fZm9jdXNJbnB1dChvcHRpb25zKTsKICAgICAgICAgICAgICAgIHRoaXMuc3RhdGVDaGFuZ2VzLm5leHQoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBBdHRlbXB0IHRvIGZvY3VzIGFuIGlucHV0IGlmIHdlIGhhdmUgb25lLgogICAgICAgICAqIEBwYXJhbSB7Pz19IG9wdGlvbnMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9mb2N1c0lucHV0KG9wdGlvbnMpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX2NoaXBJbnB1dCkgewogICAgICAgICAgICAgICAgdGhpcy5fY2hpcElucHV0LmZvY3VzKG9wdGlvbnMpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFBhc3MgZXZlbnRzIHRvIHRoZSBrZXlib2FyZCBtYW5hZ2VyLiBBdmFpbGFibGUgaGVyZSBmb3IgdGVzdHMuCiAgICAgICAgICogQHBhcmFtIHs/fSBldmVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2tleWRvd24oZXZlbnQpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB0YXJnZXQgPSAoLyoqIEB0eXBlIHs/fSAqLyAoZXZlbnQudGFyZ2V0KSk7CiAgICAgICAgICAgIC8vIElmIHRoZXkgYXJlIG9uIGFuIGVtcHR5IGlucHV0IGFuZCBoaXQgYmFja3NwYWNlLCBmb2N1cyB0aGUgbGFzdCBjaGlwCiAgICAgICAgICAgIGlmIChldmVudC5rZXlDb2RlID09PSBCQUNLU1BBQ0UgJiYgdGhpcy5faXNJbnB1dEVtcHR5KHRhcmdldCkpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2tleU1hbmFnZXIuc2V0TGFzdEl0ZW1BY3RpdmUoKTsKICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAodGFyZ2V0ICYmIHRhcmdldC5jbGFzc0xpc3QuY29udGFpbnMoJ21hdC1jaGlwJykpIHsKICAgICAgICAgICAgICAgIGlmIChldmVudC5rZXlDb2RlID09PSBIT01FKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fa2V5TWFuYWdlci5zZXRGaXJzdEl0ZW1BY3RpdmUoKTsKICAgICAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAoZXZlbnQua2V5Q29kZSA9PT0gRU5EKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fa2V5TWFuYWdlci5zZXRMYXN0SXRlbUFjdGl2ZSgpOwogICAgICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9rZXlNYW5hZ2VyLm9uS2V5ZG93bihldmVudCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLnN0YXRlQ2hhbmdlcy5uZXh0KCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQ2hlY2sgdGhlIHRhYiBpbmRleCBhcyB5b3Ugc2hvdWxkIG5vdCBiZSBhbGxvd2VkIHRvIGZvY3VzIGFuIGVtcHR5IGxpc3QuCiAgICAgICAgICogQHByb3RlY3RlZAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3VwZGF0ZVRhYkluZGV4KCkgewogICAgICAgICAgICAvLyBJZiB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gICAgICAgICAgdGhpcy5mb2N1cygpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuX2xhc3REZXN0cm95ZWRDaGlwSW5kZXggPSBudWxsOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBVdGlsaXR5IHRvIGVuc3VyZSBhbGwgaW5kZXhlcyBhcmUgdmFsaWQuCiAgICAgICAgICoKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gaW5kZXggVGhlIGluZGV4IHRvIGJlIGNoZWNrZWQuCiAgICAgICAgICogQHJldHVybiB7P30gVHJ1ZSBpZiB0aGUgaW5kZXggaXMgdmFsaWQgZm9yIG91ciBsaXN0IG9mIGNoaXBzLgogICAgICAgICAqLwogICAgICAgIF9pc1ZhbGlkSW5kZXgoaW5kZXgpIHsKICAgICAgICAgICAgcmV0dXJuIGluZGV4ID49IDAgJiYgaW5kZXggPCB0aGlzLmNoaXBzLmxlbmd0aDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9pc0lucHV0RW1wdHkoZWxlbWVudCkgewogICAgICAgICAgICBpZiAoZWxlbWVudCAmJiBlbGVtZW50Lm5vZGVOYW1lLnRvTG93ZXJDYXNlKCkgPT09ICdpbnB1dCcpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCBpbnB1dCA9ICgvKiogQHR5cGUgez99ICovIChlbGVtZW50KSk7CiAgICAgICAgICAgICAgICByZXR1cm4gIWlucHV0LnZhbHVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEBwYXJhbSB7Pz19IGlzVXNlcklucHV0CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfc2V0U2VsZWN0aW9uQnlWYWx1ZSh2YWx1ZSwgaXNVc2VySW5wdXQgPSB0cnVlKSB7CiAgICAgICAgICAgIHRoaXMuX2NsZWFyU2VsZWN0aW9uKCk7CiAgICAgICAgICAgIHRoaXMuY2hpcHMuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY2hpcAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgY2hpcCA9PiBjaGlwLmRlc2VsZWN0KCkpKTsKICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkodmFsdWUpKSB7CiAgICAgICAgICAgICAgICB2YWx1ZS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY3VycmVudFZhbHVlCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBjdXJyZW50VmFsdWUgPT4gdGhpcy5fc2VsZWN0VmFsdWUoY3VycmVudFZhbHVlLCBpc1VzZXJJbnB1dCkpKTsKICAgICAgICAgICAgICAgIHRoaXMuX3NvcnRWYWx1ZXMoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGNvcnJlc3BvbmRpbmdDaGlwID0gdGhpcy5fc2VsZWN0VmFsdWUodmFsdWUsIGlzVXNlcklucHV0KTsKICAgICAgICAgICAgICAgIC8vIFNoaWZ0IGZvY3VzIHRvIHRoZSBhY3RpdmUgaXRlbS4gTm90ZSB0aGF0IHdlIHNob3VsZG4ndCBkbyB0aGlzIGluIG11bHRpcGxlCiAgICAgICAgICAgICAgICAvLyBtb2RlLCBiZWNhdXNlIHdlIGRvbid0IGtub3cgd2hhdCBjaGlwIHRoZSB1c2VyIGludGVyYWN0ZWQgd2l0aCBsYXN0LgogICAgICAgICAgICAgICAgaWYgKGNvcnJlc3BvbmRpbmdDaGlwKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKGlzVXNlcklucHV0KSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2tleU1hbmFnZXIuc2V0QWN0aXZlSXRlbShjb3JyZXNwb25kaW5nQ2hpcCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEZpbmRzIGFuZCBzZWxlY3RzIHRoZSBjaGlwIGJhc2VkIG9uIGl0cyB2YWx1ZS4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcGFyYW0gez89fSBpc1VzZXJJbnB1dAogICAgICAgICAqIEByZXR1cm4gez99IENoaXAgdGhhdCBoYXMgdGhlIGNvcnJlc3BvbmRpbmcgdmFsdWUuCiAgICAgICAgICovCiAgICAgICAgX3NlbGVjdFZhbHVlKHZhbHVlLCBpc1VzZXJJbnB1dCA9IHRydWUpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjb3JyZXNwb25kaW5nQ2hpcCA9IHRoaXMuY2hpcHMuZmluZCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY2hpcAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgY2hpcCA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gY2hpcC52YWx1ZSAhPSBudWxsICYmIHRoaXMuX2NvbXBhcmVXaXRoKGNoaXAudmFsdWUsIHZhbHVlKTsKICAgICAgICAgICAgfSkpOwogICAgICAgICAgICBpZiAoY29ycmVzcG9uZGluZ0NoaXApIHsKICAgICAgICAgICAgICAgIGlzVXNlcklucHV0ID8gY29ycmVzcG9uZGluZ0NoaXAuc2VsZWN0VmlhSW50ZXJhY3Rpb24oKSA6IGNvcnJlc3BvbmRpbmdDaGlwLnNlbGVjdCgpOwogICAgICAgICAgICAgICAgdGhpcy5fc2VsZWN0aW9uTW9kZWwuc2VsZWN0KGNvcnJlc3BvbmRpbmdDaGlwKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gY29ycmVzcG9uZGluZ0NoaXA7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfaW5pdGlhbGl6ZVNlbGVjdGlvbigpIHsKICAgICAgICAgICAgLy8gRGVmZXIgc2V0dGluZyB0aGUgdmFsdWUgaW4gb3JkZXIgdG8gYXZvaWQgdGhlICJFeHByZXNzaW9uCiAgICAgICAgICAgIC8vIGhhcyBjaGFuZ2VkIGFmdGVyIGl0IHdhcyBjaGVja2VkIiBlcnJvcnMgZnJvbSBBbmd1bGFyLgogICAgICAgICAgICBQcm9taXNlLnJlc29sdmUoKS50aGVuKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIGlmICh0aGlzLm5nQ29udHJvbCB8fCB0aGlzLl92YWx1ZSkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX3NldFNlbGVjdGlvbkJ5VmFsdWUodGhpcy5uZ0NvbnRyb2wgPyB0aGlzLm5nQ29udHJvbC52YWx1ZSA6IHRoaXMuX3ZhbHVlLCBmYWxzZSk7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5zdGF0ZUNoYW5nZXMubmV4dCgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIERlc2VsZWN0cyBldmVyeSBjaGlwIGluIHRoZSBsaXN0LgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/PX0gc2tpcCBDaGlwIHRoYXQgc2hvdWxkIG5vdCBiZSBkZXNlbGVjdGVkLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2NsZWFyU2VsZWN0aW9uKHNraXApIHsKICAgICAgICAgICAgdGhpcy5fc2VsZWN0aW9uTW9kZWwuY2xlYXIoKTsKICAgICAgICAgICAgdGhpcy5jaGlwcy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjaGlwCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBjaGlwID0+IHsKICAgICAgICAgICAgICAgIGlmIChjaGlwICE9PSBza2lwKSB7CiAgICAgICAgICAgICAgICAgICAgY2hpcC5kZXNlbGVjdCgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIHRoaXMuc3RhdGVDaGFuZ2VzLm5leHQoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogU29ydHMgdGhlIG1vZGVsIHZhbHVlcywgZW5zdXJpbmcgdGhhdCB0aGV5IGtlZXAgdGhlIHNhbWUKICAgICAgICAgKiBvcmRlciB0aGF0IHRoZXkgaGF2ZSBpbiB0aGUgcGFuZWwuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9zb3J0VmFsdWVzKCkgewogICAgICAgICAgICBpZiAodGhpcy5fbXVsdGlwbGUpIHsKICAgICAgICAgICAgICAgIHRoaXMuX3NlbGVjdGlvbk1vZGVsLmNsZWFyKCk7CiAgICAgICAgICAgICAgICB0aGlzLmNoaXBzLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjaGlwCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICBjaGlwID0+IHsKICAgICAgICAgICAgICAgICAgICBpZiAoY2hpcC5zZWxlY3RlZCkgewogICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9zZWxlY3Rpb25Nb2RlbC5zZWxlY3QoY2hpcCk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgdGhpcy5zdGF0ZUNoYW5nZXMubmV4dCgpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEVtaXRzIGNoYW5nZSBldmVudCB0byBzZXQgdGhlIG1vZGVsIHZhbHVlLgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/PX0gZmFsbGJhY2tWYWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3Byb3BhZ2F0ZUNoYW5nZXMoZmFsbGJhY2tWYWx1ZSkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCB2YWx1ZVRvRW1pdCA9IG51bGw7CiAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KHRoaXMuc2VsZWN0ZWQpKSB7CiAgICAgICAgICAgICAgICB2YWx1ZVRvRW1pdCA9IHRoaXMuc2VsZWN0ZWQubWFwKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY2hpcAogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgY2hpcCA9PiBjaGlwLnZhbHVlKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB2YWx1ZVRvRW1pdCA9IHRoaXMuc2VsZWN0ZWQgPyB0aGlzLnNlbGVjdGVkLnZhbHVlIDogZmFsbGJh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gICAgICAgICAgICAgICAgIC8vIHRvIGNoaXAgaW5wdXQsIGRvIG5vdGhpbmcuCiAgICAgICAgICAgICAgICAgICAgLy8gVGltZW91dCBpcyBuZWVkZWQgdG8gd2FpdCBmb3IgdGhlIGZvY3VzKCkgZXZlbnQgdHJpZ2dlciBvbiBjaGlwIGlucHV0LgogICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXRoaXMuZm9jdXNlZCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fbWFya0FzVG91Y2hlZCgpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgLy8gSWYgdGhlcmUncyBubyBjaGlwIGlucHV0LCB0aGVuIG1hcmsgdGhlIGZpZWxkIGFzIHRvdWNoZWQuCiAgICAgICAgICAgICAgICAgICAgdGhpcy5fbWFya0FzVG91Y2hlZCgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIE1hcmsgdGhlIGZpZWxkIGFzIHRvdWNoZWQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9tYXJrQXNUb3VjaGVkKCkgewogICAgICAgICAgICB0aGlzLl9vblRvdWNoZWQoKTsKICAgICAgICAgICAgdGhpcy5fY2hhbmdlRGV0ZWN0b3JSZWYubWFya0ZvckNoZWNrKCk7CiAgICAgICAgICAgIHRoaXMuc3RhdGVDaGFuZ2VzLm5leHQoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmVtb3ZlcyB0aGUgYHRhYmluZGV4YCBmcm9tIHRoZSBjaGlwIGxpc3QgYW5kIHJlc2V0cyBpdCBiYWNrIGFmdGVyd2FyZHMsIGFsbG93aW5nIHRoZQogICAgICAgICAqIHVzZXIgdG8gdGFiIG91dCBvZiBpdC4gVGhpcyBwcmV2ZW50cyB0aGUgbGlzdCBmcm9tIGNhcHR1cmluZyBmb2N1cyBhbmQgcmVkaXJlY3RpbmcKICAgICAgICAgKiBpdCBiYWNrIHRvIHRoZSBmaXJzdCBjaGlwLCBjcmVhdGluZyBhIGZvY3VzIHRyYXAsIGlmIGl0IHVzZXIgdHJpZXMgdG8gdGFiIGF3YXkuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfYWxsb3dGb2N1c0VzY2FwZSgpIHsKICAgICAgICAgICAgaWYgKHRoaXMuX3RhYkluZGV4ICE9PSAtMSkgewogICAgICAgICAgICAgICAgdGhpcy5fdGFiSW5kZXggPSAtMTsKICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoKC8qKgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHRoaXMuX3RhYkluZGV4ID0gdGhpcy5fdXNlclRhYkluZGV4IHx8IDA7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fY2hhbmdlRGV0ZWN0b3JSZWYubWFya0ZvckNoZWNrKCk7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9yZXNldENoaXBzKCkgewogICAgICAgICAgICB0aGlzLl9kcm9wU3Vic2NyaXB0aW9ucygpOwogICAgICAgICAgICB0aGlzLl9saXN0ZW5Ub0NoaXBzRm9jdXMoKTsKICAgICAgICAgICAgdGhpcy5fbGlzdGVuVG9DaGlwc1NlbGVjdGlvbigpOwogICAgICAgICAgICB0aGlzLl9saXN0ZW5Ub0NoaXBzUmVtb3ZlZCgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2Ryb3BTdWJzY3JpcHRpb25zKCkgewogICAgICAgICAgICBpZiAodGhpcy5fY2hpcEZvY3VzU3Vic2NyaXB0aW9uKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9jaGlwRm9jdXNTdWJzY3JpcHRpb24udW5zdWJzY3JpYmUoKTsKICAgICAgICAgICAgICAgIHRoaXMuX2NoaXBGb2N1c1N1YnNjcmlwdGlvbiA9IG51bGw7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHRoaXMuX2NoaXBCbHVyU3Vic2NyaXB0aW9uKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9jaGlwQmx1clN1YnNjcmlwdGlvbi51bnN1YnNjcmliZSgpOwogICAgICAgICAgICAgICAgdGhpcy5fY2hpcEJsdXJTdWJzY3JpcHRpb24gPSBudWxsOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0aGlzLl9jaGlwU2VsZWN0aW9uU3Vic2NyaXB0aW9uKSB7CiAgICAgICAgICAgICAgICB0aGlzLl9jaGlwU2VsZWN0aW9uU3Vic2NyaXB0aW9uLnVuc3Vic2NyaWJlKCk7CiAgICAgICAgICAgICAgICB0aGlzLl9jaGlwU2VsZWN0aW9uU3Vic2NyaXB0aW9uID0gbnVsbDsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAodGhpcy5fY2hpcFJlbW92ZVN1YnNjcmlwdGlvbikgewogICAgICAgICAgICAgICAgdGhpcy5fY2hpcFJlbW92ZVN1YnNjcmlwdGlvbi51bnN1YnNjcmliZSgpOwogICAgICAgICAgICAgICAgdGhpcy5fY2hpcFJlbW92ZVN1YnNjcmlwdGlvbiA9IG51bGw7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogTGlzdGVucyB0byB1c2VyLWdlbmVyYXRlZCBzZWxlY3Rpb24gZXZlbnRzIG9uIGVhY2ggY2hpcC4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2xpc3RlblRvQ2hpcHNTZWxlY3Rpb24oKSB7CiAgICAgICAgICAgIHRoaXMuX2NoaXBTZWxlY3Rpb25TdWJzY3JpcHRpb24gPSB0aGlzLmNoaXBTZWxlY3Rpb25DaGFuZ2VzLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGV2ZW50ID0+IHsKICAgICAgICAgICAgICAgIGV2ZW50LnNvdXJjZS5zZWxlY3RlZAogICAgICAgICAgICAgICAgICAgID8gdGhpcy5fc2VsZWN0aW9uTW9kZWwuc2VsZWN0KGV2ZW50LnNvdXJjZSkKICAgICAgICAgICAgICAgICAgICA6IHRoaXMuX3NlbGVjdGlvbk1vZGVsLmRlc2VsZWN0KGV2ZW50LnNvdXJjZSk7CiAgICAgICAgICAgICAgICAvLyBGb3Igc2luZ2xlIHNlbGVjdGlvbiBjaGlwIGxpc3QsIG1ha2Ugc3VyZSB0aGUgZGVzZWxlY3RlZCB2YWx1ZSBpcyB1bnNlbGVjdGVkLgogICAgICAgICAgICAgICAgaWYgKCF0aGlzLm11bHRpcGxlKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5jaGlwcy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGNoaXAKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgIGNoaXAgPT4gewogICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXRoaXMuX3NlbGVjdGlvbk1vZGVsLmlzU2VsZWN0ZWQoY2hpcCkgJiYgY2hpcC5zZWxlY3RlZCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hpcC5kZXNlbGVjdCgpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKGV2ZW50LmlzVXNlcklucHV0KSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5fcHJvcGFnYXRlQ2hhbmdlcygpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIExpc3RlbnMgdG8gdXNlci1nZW5lcmF0ZWQgc2VsZWN0aW9uIGV2ZW50cyBvbiBlYWNoIGNoaXAuCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9saXN0ZW5Ub0NoaXBzRm9jdXMoKSB7CiAgICAgICAgICAgIHRoaXMuX2NoaXBGb2N1c1N1YnNjcmlwdGlvbiA9IHRoaXMuY2hpcEZvY3VzQ2hhbmdlcy5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBldmVudCA9PiB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBsZXQgY2hpcEluZGV4ID0gdGhpcy5jaGlwcy50b0FycmF5KCkuaW5kZXhPZihldmVudC5jaGlwKTsKICAgICAgICAgICAgICAgIGlmICh0aGlzLl9pc1ZhbGlkSW5kZXgoY2hpcEluZGV4KSkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuX2tleU1hbmFnZXIudXBkYXRlQWN0aXZlSXRlbShjaGlwSW5kZXgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdGhpcy5zdGF0ZUNoYW5nZXMubmV4dCgpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIHRoaXMuX2NoaXBCbHVyU3Vic2NyaXB0aW9uID0gdGhpcy5jaGlwQmx1ckNoYW5nZXMuc3Vic2NyaWJlKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIHRoaXMuX2JsdXIoKTsKICAgICAgICAgICAgICAgIHRoaXMuc3RhdGVDaGFuZ2VzLm5leHQoKTsKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2xpc3RlblRvQ2hpcHNSZW1vdmVkKCkgewogICAgICAgICAgICB0aGlzLl9jaGlwUmVtb3ZlU3Vic2NyaXB0aW9uID0gdGhpcy5jaGlwUmVtb3ZlQ2hhbmdlcy5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBldmVudCA9PiB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBjaGlwID0gZXZlbnQuY2hpcDsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGNoaXBJbmRleCA9IHRoaXMuY2hpcHMudG9BcnJheSgpLmluZGV4T2YoZXZlbnQuY2hpcCk7CiAgICAgICAgICAgICAgICAvLyBJbiBjYXNlIHRoZSBjaGlwIHRoYXQgd2lsbCBiZSByZW1vdmVkIGlzIGN1cnJlbnRseSBmb2N1c2VkLCB3ZSB0ZW1wb3JhcmlseSBzdG9yZQogICAgICAgICAgICAgICAgLy8gdGhlIGluZGV4IGluIG9yZGVyIHRvIGJlIGFibGUgdG8gZGV0ZXJtaW5lIGFuIGFwcHJvcHJpYXRlIHNpYmxpbmcgY2hpcCB0aGF0IHdpbGwKICAgICAgICAgICAgICAgIC8vIHJlY2VpdmUgZm9jdXMuCiAgICAgICAgICAgICAgICBpZiAodGhpcy5faXNWYWxpZEluZGV4KGNoaXBJbmRleCkgJiYgY2hpcC5faGFzRm9jdXMpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLl9sYXN0RGVzdHJveWVkQ2hpcEluZGV4ID0gY2hpcEluZGV4OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENoZWNrcyB3aGV0aGVyIGFuIGV2ZW50IGNvbWVzIGZyb20gaW5zaWRlIGEgY2hpcCBlbGVtZW50LgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHBhcmFtIHs/fSBldmVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX29yaWdpbmF0ZXNGcm9tQ2hpcChldmVudCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGxldCBjdXJyZW50RWxlbWVudCA9ICgvKiogQHR5cGUgez99ICovIChldmVudC50YXJnZXQpKTsKICAgICAgICAgICAgd2hpbGUgKGN1cnJlbnRFbGVtZW50ICYmIGN1cnJlbnRFbGVtZW50ICE9PSB0aGlzLl9lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQpIHsKICAgICAgICAgICAgICAgIGlmIChjdXJyZW50RWxlbWVudC5jbGFzc0xpc3QuY29udGFpbnMoJ21hdC1jaGlwJykpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGN1cnJlbnRFbGVtZW50ID0gY3VycmVudEVsZW1lbnQucGFyZW50RWxlbWVudDsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENoZWNrcyB3aGV0aGVyIGFueSBvZiB0aGUgY2hpcHMgaXMgZm9jdXNlZC4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX2hhc0ZvY3VzZWRDaGlwKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5jaGlwcy5zb21lKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBjaGlwCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBjaGlwID0+IGNoaXAuX2hhc0ZvY3VzKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFN5bmNzIHRoZSBsaXN0J3Mgc3RhdGUgd2l0aCB0aGUgaW5kaXZpZHVhbCBjaGlwcy4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX3N5bmNDaGlwc1N0YXRlKCkgewogICAgICAgICAgICBpZiAodGhpcy5jaGlwcykgewogICAgICAgICAgICAgICAgdGhpcy5jaGlwcy5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gY2hpcAogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgY2hpcCA9PiB7CiAgICAgICAgICAgICAgICAgICAgY2hpcC5fY2hpcExpc3REaXNhYmxlZCA9IHRoaXMuX2Rpc2FibGVkOwogICAgICAgICAgICAgICAgICAgIGNoaXAuX2NoaXBMaXN0TXVsdGlwbGUgPSB0aGlzLm11bHRpcGxlOwogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB9Ci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gICAqIEBwYXJhbSB7P30gX2VsZW1lbnRSZWYKICAgICAgICAgKiBAcGFyYW0gez99IF9kZWZhdWx0T3B0aW9ucwogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKF9lbGVtZW50UmVmLCBfZGVmYXVsdE9wdGlvbnMpIHsKICAgICAgICAgICAgdGhpcy5fZWxlbWVudFJlZiA9IF9lbGVtZW50UmVmOwogICAgICAgICAgICB0aGlzLl9kZWZhdWx0T3B0aW9ucyA9IF9kZWZhdWx0T3B0aW9uczsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFdoZXRoZXIgdGhlIGNvbnRyb2wgaXMgZm9jdXNlZC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuZm9jdXNlZCA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLl9hZGRPbkJsdXIgPSBmYWxzZTsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFRoZSBsaXN0IG9mIGtleSBjb2RlcyB0aGF0IHdpbGwgdHJpZ2dlciBhIGNoaXBFbmQgZXZlbnQuCiAgICAgICAgICAgICAqCiAgICAgICAgICAgICAqIERlZmF1bHRzIHRvIGBbRU5URVJdYC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuc2VwYXJhdG9yS2V5Q29kZXMgPSB0aGlzLl9kZWZhdWx0T3B0aW9ucy5zZXBhcmF0b3JLZXlDb2RlczsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIEVtaXR0ZWQgd2hlbiBhIGNoaXAgaXMgdG8gYmUgYWRkZWQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmNoaXBFbmQgPSBuZXcgRXZlbnRFbWl0dGVyKCk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBUaGUgaW5wdXQncyBwbGFjZWhvbGRlciB0ZXh0LgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5wbGFjZWhvbGRlciA9ICcnOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogVW5pcXVlIGlkIGZvciB0aGUgaW5wdXQuCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmlkID0gYG1hdC1jaGlwLWxpc3QtaW5wdXQtJHtuZXh0VW5pcXVlSWQkMSQxKyt9YDsKICAgICAgICAgICAgdGhpcy5fZGlzYWJsZWQgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5faW5wdXRFbGVtZW50ID0gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMuX2VsZW1lbnRSZWYubmF0aXZlRWxlbWVudCkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBSZWdpc3RlciBpbnB1dCBmb3IgY2hpcCBsaXN0CiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IGNoaXBMaXN0KHZhbHVlKSB7CiAgICAgICAgICAgIGlmICh2YWx1ZSkgewogICAgICAgICAgICAgICAgdGhpcy5fY2hpcExpc3QgPSB2YWx1ZTsKICAgICAgICAgICAgICAgIHRoaXMuX2NoaXBMaXN0LnJlZ2lzdGVySW5wdXQodGhpcyk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogV2hldGhlciBvciBub3QgdGhlIGNoaXBFbmQgZXZlbnQgd2lsbCBiZSBlbWl0dGVkIHdoZW4gdGhlIGlucHV0IGlzIGJsdXJyZWQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgYWRkT25CbHVyKCkgeyByZXR1cm4gdGhpcy5fYWRkT25CbHVyOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IGFkZE9uQmx1cih2YWx1ZSkgeyB0aGlzLl9hZGRPbkJsdXIgPSBjb2VyY2VCb29sZWFuUHJvcGVydHkodmFsdWUpOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogV2hldGhlciB0aGUgaW5wdXQgaXMgZGlzYWJsZWQuCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBnZXQgZGlzYWJsZWQoKSB7IHJldHVybiB0aGlzLl9kaXNhYmxlZCB8fCAodGhpcy5fY2hpcExpc3QgJiYgdGhpcy5fY2hpcExpc3QuZGlzYWJsZWQpOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSB2YWx1ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0IGRpc2FibGVkKHZhbHVlKSB7IHRoaXMuX2Rpc2FibGVkID0gY29lcmNlQm9vbGVhblByb3BlcnR5KHZhbHVlKTsgfQogICAgICAgIC8qKgogICAgICAgICAqIFdoZXRoZXIgdGhlIGlucHV0IGlzIGVtcHR5LgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZ2V0IGVtcHR5KCkgeyByZXR1cm4gIXRoaXMuX2lucHV0RWxlbWVudC52YWx1ZTsgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkNoYW5nZXMoKSB7CiAgICAgICAgICAgIHRoaXMuX2NoaXBMaXN0LnN0YXRlQ2hhbmdlcy5uZXh0KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIFV0aWxpdHkgbWV0aG9kIHRvIG1ha2UgaG9zdCBkZWZpbml0aW9uL3Rlc3RzIG1vcmUgY2xlYXIuCiAgICAgICAgICogQHBhcmFtIHs/PX0gZXZlbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9rZXlkb3duKGV2ZW50KSB7CiAgICAgICAgICAgIC8vIEFsbG93IHRoZSB1c2VyJ3MgZm9jdXMgdG8gZXNjYXBlIHdoZW4gdGhleSdyZSB0YWJiaW5nIGZvcndhcmQuIE5vdGUgdGhhdCB3ZSBkb24ndAogICAgICAgICAgICAvLyB3YW50IHRvIGRvIHRoaXMgd2hlbiBnb2luZyBiYWNrd2FyZHMsIGJlY2F1c2UgZm9jdXMgc2hvdWxkIGdvIGJhY2sgdG8gdGhlIGZpcnN0IGNoaXAuCiAgICAgICAgICAgIGlmIChldmVudCAmJiBldmVudC5rZXlDb2RlID09PSBUQUIgJiYgIWhhc01vZGlmaWVyS2V5KGV2ZW50LCAnc2hpZnRLZXknKSkgewogICAgICAgICAgICAgICAgdGhpcy5fY2hpcExpc3QuX2FsbG93Rm9jdXNFc2NhcGUoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLl9lbWl0Q2hpcEVuZChldmVudCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENoZWNrcyB0byBzZWUgaWYgdGhlIGJsdXIgc2hvdWxkIGVtaXQgdGhlIChjaGlwRW5kKSBldmVudC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9ibHVyKCkgewogICAgICAgICAgICBpZiAodGhpcy5hZGRPbkJsdXIpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2VtaXRDaGlwRW5kKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5mb2N1c2VkID0gZmFsc2U7CiAgICAgICAgICAgIC8vIEJsdXIgdGhlIGNoaXAgbGlzdCBpZiBpdCBpcyBub3QgZm9jdXNlZAogICAgICAgICAgICBpZiAoIXRoaXMuX2NoaXBMaXN0LmZvY3VzZWQpIHsKICAgICAgICAgICAgICAgIHRoaXMuX2NoaXBMaXN0Ll9ibHVyKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy5fY2hpcExpc3Quc3RhdGVDaGFuZ2VzLm5leHQoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZm9jdXMoKSB7CiAgICAgICAgICAgIHRoaXMuZm9jdXNlZCA9IHRydWU7CiAgICAgICAgICAgIHRoaXMuX2NoaXBMaXN0LnN0YXRlQ2hhbmdlcy5uZXh0KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENoZWNrcyB0byBzZWUgaWYgdGhlIChjaGlwRW5kKSBldmVudCBuZWVkcyB0byBiZSBlbWl0dGVkLgogICAgICAgICAqIEBwYXJhbSB7Pz19IGV2ZW50CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBfZW1pdENoaXBFbmQoZXZlbnQpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLl9pbnB1dEVsZW1lbnQudmFsdWUgJiYgISFldmVudCkgewogICAgICAgICAgICAgICAgdGhpcy5fY2hpcExpc3QuX2tleWRvd24oZXZlbnQpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICghZXZlbnQgfHwgdGhpcy5faXNTZXBhcmF0b3JLZXkoZXZlbnQpKSB7CiAgICAgICAgICAgICAgICB0aGlzLmNoaXBFbmQuZW1pdCh7IGlucHV0OiB0aGlzLl9pbnB1dEVsZW1lbnQsIHZhbHVlOiB0aGlzLl9pbnB1dEVsZW1lbnQudmFsdWUgfSk7CiAgICAgICAgICAgICAgICBpZiAoZXZlbnQpIHsKICAgICAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgX29uSW5wdXQoKSB7CiAgICAgICAgICAgIC8vIExldCBjaGlwIGxpc3Qga25vdyB3aGVuZXZlciB0aGUgdmFsdWUgY2hhbmdlcy4KICAgICAgICAgICAgdGhpcy5fY2hpcExpc3Quc3RhdGVDaGFuZ2VzLm5leHQoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogRm9jdXNlcyB0aGUgaW5wdXQuCiAgICAgICAgICogQHBhcmFtIHs/PX0gb3B0aW9ucwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZm9jdXMob3B0aW9ucykgewogICAgICAgICAgICB0aGlzLl9pbnB1dEVsZW1lbnQuZm9jdXMob3B0aW9ucyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIENoZWNrcyB3aGV0aGVyIGEga2V5Y29kZSBpcyBvbmUgb2YgdGhlIGNvbmZpZ3VyZWQgc2VwYXJhdG9ycy4KICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIF9pc1NlcGFyYXRvcktleShldmVudCkgewogICAgICAgICAgICBpZiAoaGFzTW9kaWZpZXJLZXkoZXZlbnQpKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBzZXBhcmF0b3JzID0gdGhpcy5zZXBhcmF0b3JLZXlDb2RlczsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBrZXlDb2RlID0gZXZlbnQua2V5Q29kZTsKICAgICAgICAgICAgcmV0dXJuIEFycmF5LmlzQXJyYXkoc2VwYXJhdG9ycykgPyBzZXBhcmF0b3JzLmluZGV4T2Yoa2V5Q29kZSkgPiAtMSA6IHNlcGFyYXRvcnMuaGFzKGtleUNvZGUpOwogICAgICAgIH0KICAgIH0KICAgIE1hdENoaXBJbnB1dC7JtWZhYyA9IGZ1bmN0aW9uIE1hdENoaXBJbnB1dF9GYWN0b3J5KHQpIHsgcmV0dXJuIG5ldyAodCB8fCBNYXRDaGlwSW5wdXQpKMm1ybVkaXJl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NpbmdSZXR1cm4sdW51c2VkUHJpdmF0ZU1lbWJlcnMsdXNlbGVzc0NvZGV9IGNoZWNrZWQgYnkgdHNjCiAgICAgKi8KICAgIGNvbnN0IF9jMCR2ID0gZnVuY3Rpb24gKGEwKSB7IHJldHVybiB7ICJ3aWR0aCI6IGEwIH07IH07CiAgICBjb25zdCBfYzEkaiA9IGZ1bmN0aW9uIChhMCkgeyByZXR1cm4geyAidmFsdWUtaW52YWxpZCI6IGEwIH07IH07CiAgICBjbGFzcyBNZXRyaWNBcml0aG1ldGljRWxlbWVudENvbXBvbmVudCB7CiAgICAgICAgY29uc3RydWN0b3IoKSB7CiAgICAgICAgICAgIHRoaXMub25SZW1vdmUgPSBuZXcgRXZlbnRFbWl0dGVyKCk7CiAgICAgICAgICAgIHRoaXMub25GaWx0ZXJDaGFuZ2UgPSBuZXcgRXZlbnRFbWl0dGVyKCk7CiAgICAgICAgICAgIHRoaXMuZm9jdXNNaW4gPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5mb2N1c01heCA9IGZhbHNlOwogICAgICAgICAgICB0aGlzLm5nVW5zdWJzY3JpYmUgPSBuZXcgU3ViamVjdCgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25Jbml0KCkgewogICAgICAgICAgICB0aGlzLm1pbkZvcm1Db250cm9sID0gbmV3IEZvcm1Db250cm9sKHRoaXMuZmlsdGVyVmFsdWVzLm1pbiwgWwogICAgICAgICAgICAgICAgVmFsaWRhdG9ycy5yZXF1aXJlZCwKICAgICAgICAgICAgICAgIFZhbGlkYXRvcnMubWluKC0xLjApLAogICAgICAgICAgICAgICAgVmFsaWRhdG9ycy5tYXgoMS4wKSwKICAgICAgICAgICAgICAgIHRoaXMubWluVmFsdWVWYWxpZGF0b3IuYmluZCh0aGlzKSwKICAgICAgICAgICAgXSk7CiAgICAgICAgICAgIHRoaXMubWF4Rm9ybUNvbnRyb2wgPSBuZXcgRm9ybUNvbnRyb2wodGhpcy5maWx0ZXJWYWx1ZXMubWF4LCBbCiAgICAgICAgICAgICAgICBWYWxpZGF0b3JzLnJlcXVpcmVkLAogICAgICAgICAgICAgICAgVmFsaWRhdG9ycy5taW4oLTEuMCksCiAgICAgICAgICAgICAgICBWYWxpZGF0b3JzLm1heCgxLjApLAogICAgICAgICAgICAgICAgdGhpcy5tYXhWYWx1ZVZhbGlkYXRvci5iaW5kKHRoaXMpLAogICAgICAgICAgICBdKTsKICAgICAgICAgICAgdGhpcy5taW5Gb3JtQ29udHJvbC52YWx1ZUNoYW5nZXMKICAgICAgICAgICAgICAgIC5waXBlKHRha2VVbnRpbCh0aGlzLm5nVW5zdWJzY3JpYmUpKQogICAgICAgICAgICAgICAgLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5taW5Gb3JtQ29udHJvbC52YWxpZCAmJiB0aGlzLm1heEZvcm1Db250cm9sLnZhbGlkKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5vbkZpbHRlckNoYW5nZS5lbWl0KHsKICAgICAgICAgICAgICAgICAgICAgICAgbWluOiBwYXJzZUZsb2F0KHRoaXMubWluRm9ybUNvbnRyb2wudmFsdWUpLAogICAgICAgICAgICAgICAgICAgICAgICBtYXg6IHBhcnNlRmxvYXQodGhpcy5tYXhGb3JtQ29udHJvbC52YWx1ZSksCiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgdGhpcy5tYXhGb3JtQ29udHJvbC52YWx1ZUNoYW5nZXMKICAgICAgICAgICAgICAgIC5waXBlKHRha2VVbnRpbCh0aGlzLm5nVW5zdWJzY3JpYmUpKQogICAgICAgICAgICAgICAgLnN1YnNjcmliZSgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5taW5Gb3JtQ29udHJvbC52YWxpZCAmJiB0aGlzLm1heEZvcm1Db250cm9sLnZhbGlkKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5vbkZpbHRlckNoYW5nZS5lbWl0KHsKICAgICAgICAgICAgICAgICAgICAgICAgbWluOiBwYXJzZUZsb2F0KHRoaXMubWluRm9ybUNvbnRyb2wudmFsdWUpLAogICAgICAgICAgICAgICAgICAgICAgICBtYXg6IHBhcnNlRmxvYXQodGhpcy5tYXhGb3JtQ29udHJvbC52YWx1ZSksCiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBjaGFuZ2VzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uQ2hhbmdlcyhjaGFuZ2VzKSB7CiAgICAgICAgICAgIGlmICh0aGlzLm1pbkZvcm1Db250cm9sICYmIHRoaXMubWF4Rm9ybUNvbnRyb2wpIHsKICAgICAgICAgICAgICAgIHRoaXMubWluRm9ybUNvbnRyb2wuc2V0VmFsdWUodGhpcy5maWx0ZXJWYWx1ZXMubWluLCB7IGVtaXRFdmVudDogZmFsc2UgfSk7CiAgICAgICAgICAgICAgICB0aGlzLm1heEZvcm1Db250cm9sLnNldFZhbHVlKHRoaXMuZmlsdGVyVmFsdWVzLm1heCwgeyBlbWl0RXZlbnQ6IGZhbHNlIH0pOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkRlc3Ryb3koKSB7CiAgICAgICAgICAgIHRoaXMubmdVbnN1YnNjcmliZS5uZXh0KCk7CiAgICAgICAgICAgIHRoaXMubmdVbnN1YnNjcmliZS5jb21wbGV0ZSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAdGhpcyB7P30KICAgICAgICAgKiBAcGFyYW0gez99IGNvbnRyb2wKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG1pblZhbHVlVmFsaWRhdG9yKGNvbnRyb2wpIHsKICAgICAgICAgICAgaWYgKCF0aGlzLm1heEZvcm1Db250cm9sIHx8IGNvbnRyb2wudmFsdWUgPT09ICdOYU4nKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChpc05hTihwYXJzZUZsb2F0KGNvbnRyb2wudmFsdWUpKSkgewogICAgICAgICAgICAgICAgcmV0dXJuIHsgdmFsdWU6ICd0aGUgc3RyaW5nIHlvdSBlbnRlcmVkIGlzIG5laXRoZXIgTmFOIG5vciBhIG51bWJlcicgfTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChwYXJzZUZsb2F0KGNvbnRyb2wudmFsdWUpID4gcGFyc2VGbG9hdCh0aGlzLm1heEZvcm1Db250cm9sLnZhbHVlKSkgewogICAgICAgICAgICAgICAgcmV0dXJuIHsgdmFsdWU6ICd0aGUgbnVtYmVyIHlvdSBlbnRlcmVkIGlzIGxhcmdlciB0aGFuIHRoZSBtYXggdmFsdWUnIH07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEB0aGlzIHs/fQogICAgICAgICAqIEBwYXJhbSB7P30gY29udHJvbAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbWF4VmFsdWVWYWxpZGF0b3IoY29udHJvbCkgewogICAgICAgICAgICBpZiAoIXRoaXMubWluRm9ybUNvbnRyb2wpIHsKICAgICAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKAogICAgICAgICAgICAvLyBNYXggTmFOIG9ubHkgaWYgbWluIGFsc28gTmFOCiAgICAgICAgICAgIHRoaXMubWluRm9ybUNvbnRyb2wudmFsdWUgPT09ICdOYU4nICYmCiAgICAgICAgICAgICAgICBjb250cm9sLnZhbHVlID09PSAnTmFOJykgewogICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoaXNOYU4ocGFyc2VGbG9hdChjb250cm9sLnZhbHVlKSkpIHsKICAgICAgICAgICAgICAgIHJldHVybiB7IHZhbHVlOiAndGhlIHN0cmluZyB5b3UgZW50ZXJlZCBpcyBuZWl0aGVyIE5hTiBub3IgYSBudW1iZXInIH07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoY29udHJvbC52YWx1ZSA8IHRoaXMubWluRm9ybUNvbnRyb2wudmFsdWUpIHsKICAgICAgICAgICAgICAgIHJldHVybiB7IHZhbHVlOiAndGhlIG51bWJlciB5b3UgZW50ZXJlZCBpcyBzbWFsbGVyIHRoYW4gdGhlIG1pbiB2YWx1ZScgfTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBlcnJvcnMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldEVycm9yRGVzY3JpcHRpb24oZXJyb3JzKSB7CiAgICAgICAgICAgIGlmIChlcnJvcnMpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGZpcnN0S2V5ID0gT2JqZWN0LmtleXMoZXJyb3JzKVswXTsKICAgICAgICAgICAgICAgIGlmIChmaXJzdEtleSA9PT0gJ3JlcXVpcmVkJykgewogICAgICAgICAgICAgICAgICAgIHJldHVybiAneW91IGRpZCBub3QgZW50ZXIgYW55dGhpbmcnOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAoZmlyc3RLZXkgPT09ICdtaW4nKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0aGUgbnVtYmVyIG11c3QgYmUgYXQgbGVhc3QgLTEuMCc7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmIChmaXJzdEtleSA9PT0gJ21heCcpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RoZSBudW1iZXIgaXMgYmlnZ2VyIHRoYW4gMS4wJzsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiBlcnJvcnNbZmlyc3RLZXldOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiAnJzsKICAgICAgICB9CiAgICB9CiAgICBNZXRyaWNBcml0aG1ldGljRWxlbWVudENvbXBvbmVudC5kZWNvcmF0b3JzID0gWwogICAgICAgIHsgdHlwZTogQ29tcG9uZW50LCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIHNlbGVjdG9yOiAnbWV0cmljLWFyaXRobWV0aWMtZWxlbWVudC1jb21wb25lbnQnLAogICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlVXJsOiAnLi9tZXRyaWNfYXJpdGhtZXRpY19lbGVtZW50X2NvbXBvbmVudC5uZy5odG1sJywKICAgICAgICAgICAgICAgICAgICBzdHlsZVVybHM6IFsnLi9tZXRyaWNfYXJpdGhtZXRpY19lbGVtZW50X2NvbXBvbmVudC5jc3MnXSwKICAgICAgICAgICAgICAgICAgICBjaGFuZ2VEZXRlY3Rpb246IENoYW5nZURldGVjdGlvblN0cmF0ZWd5Lk9uUHVzaCwKICAgICAgICAgICAgICAgIH0sXSB9LAogICAgXTsKICAgIE1ldHJpY0FyaXRobWV0aWNFbGVtZW50Q29tcG9uZW50LnByb3BEZWNvcmF0b3JzID0gewogICAgICAgIG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06bm90KC5tYXQtdGFiLWRpc2FibGVkKSwgLm1hdC10YWItbmF2LWJhci5tYXQtYmFja2dyb3VuZC1hY2NlbnRbX25nY29udGVudC0lQ09NUCVdICAgLm1hdC10YWItbGFiZWwuY2RrLXByb2dyYW0tZm9jdXNlZFtfbmdjb250ZW50LSVDT01QJV06bm90KC5tYXQtdGFiLWRpc2FibGVkKSwgLm1hdC10YWItbmF2LWJhci5tYXQtYmFja2dyb3VuZC1hY2NlbnRbX25nY29udGVudC0lQ09NUCVdICAgLm1hdC10YWItbGluay5jZGsta2V5Ym9hcmQtZm9jdXNlZFtfbmdjb250ZW50LSVDT01QJV06bm90KC5tYXQtdGFiLWRpc2FibGVkKSwgLm1hdC10YWItbmF2LWJhci5tYXQtYmFja2dyb3VuZC1hY2NlbnRbX25nY29udGVudC0lQ09NUCVdICAgLm1hdC10YWItbGluay5jZGstcHJvZ3JhbS1mb2N1c2VkW19uZ2NvbnRlbnQtJUNPTVAlXTpub3QoLm1hdC10YWItZGlzYWJsZWQpe2JhY2tncm91bmQtY29sb3I6cmdiYSgyNTUsMTUyLDAsLjMpfS5tYXQtdGFiLWdyb3VwLm1hdC1iYWNrZ3JvdW5kLWFjY2VudFtfbmdjb250ZW50LSVDT01QJV0gICAubWF0LXRhYi1oZWFkZXJbX25nY29udGVudC0lQ09NUCVdLCAubWF0LXRhYi1ncm91cC5tYXQtYmFja2dyb3VuZC1hY2NlbnRbX25nY29udGVudC0lQ09NUCVdICAgLm1hdC10YWItbGlua3NbX25nY29udGVudC0lQ09NUCVdLCAubWF0LXRhYi1ncm91cC5tYXQtYmFja2dyb3VuZC1hY2NlbnRbX25nY29udGVudC0lQ09NUCVdICAgLm1hdC10YWItaGVhZGVyLXBhZ2luYXRpb25bX25nY29udGVudC0lQ09NUCVdLCAubWF0LXRhYi1uYXYtYmFyLm1hdC1iYWNrZ3JvdW5kLWFjY2VudFtfbmdjb250ZW50LSVDT01QJV0gICAubWF0LXRhYi1oZWFkZXJbX25nY29ud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gICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgZmlsdGVyID0gZmlsdGVyc1t0aGlzLm1ldHJpY107CiAgICAgICAgICAgICAgICBpZiAoIWZpbHRlcikgewogICAgICAgICAgICAgICAgICAgIHJldHVybiB7IG1pbjogLTEuMCwgbWF4OiAxLjAgfTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IG1pbiA9IGZpbHRlci5pbmNsdWRlTmFOCiAgICAgICAgICAgICAgICAgICAgPyAnTmFOJwogICAgICAgICAgICAgICAgICAgIDogdGhpcy5yb3VuZFRvVGhyZWVEZWNpbWFsUG9pbnRzKGZpbHRlci5taW4pOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgY29uc3QgbWF4ID0gZmlsdGVyLm1heCA8IGZpbHRlci5taW4KICAgICAgICAgICAgICAgICAgICA/ICdOYU4nCiAgICAgICAgICAgICAgICAgICAgOiB0aGlzLnJvdW5kVG9UaHJlZURlY2ltYWxQb2ludHMoZmlsdGVyLm1heCk7CiAgICAgICAgICAgICAgICByZXR1cm4geyBtaW46IG1pbiwgbWF4OiBtYXggfTsKICAgICAgICAgICAgfSkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBtZXRyaWMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlbW92ZShtZXRyaWMpIHsKICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChucG1pUmVtb3ZlTWV0cmljRmlsdGVyKHsgbWV0cmljOiBtZXRyaWMgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IG5ld1ZhbHVlcwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZmlsdGVyQ2hhbmdlKG5ld1ZhbHVlcykgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG1pbiA9IGlzTmFOKG5ld1ZhbHVlcy5taW4pID8gLTEgOiBuZXdWYWx1ZXMubWluOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IG1heCA9IGlzTmFOKG5ld1ZhbHVlcy5tYXgpID8gLTIgOiBuZXdWYWx1ZXMubWF4OwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGluY2x1ZGVOYU4gPSBpc05hTihuZXdWYWx1ZXMubWluKTsKICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChucG1pQ2hhbmdlTWV0cmljRmlsdGVyKHsKICAgICAgICAgICAgICAgIG1ldHJpYzogdGhpcy5tZXRyaWMsCiAgICAgICAgICAgICAgICBtYXg6IG1heCwKICAgICAgICAgICAgICAgIG1pbjogbWluLAogICAgICAgICAgICAgICAgaW5jbHVkZU5hTjogaW5jbHVkZU5hTiwKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJvdW5kVG9UaHJlZURlY2ltYWxQb2ludHModmFsdWUpIHsKICAgICAgICAgICAgcmV0dXJuIE1hdGgucm91bmQoKHZhbHVlICsgTnVtYmVyLkVQU0lMT04pICogMTAwMCkgLyAxMDAwOwogICAgICAgIH0KICAgIH0KICAgIE1ldHJpY0FyaXRobWV0aWNFbGVtZW50Q29udGFpbmVyLmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBDb21wb25lbnQsIGFyZ3M6IFt7CiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3I6ICducG1pLW1ldHJpYy1hcml0aG1ldG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ldGljX29wZXJhdG9yXzJfVGVtcGxhdGUsIDEsIDEsICJucG1pLW1ldHJpYy1hcml0aG1ldGljLW9wZXJhdG9yIiwgMyk7CiAgICAgICAgybXJtWVsZW1lbnRFbmQoKTsKICAgIH0gaWYgKHJmICYgMikgewogICAgICAgIGNvbnN0IGVsZW1lbnRfcjEgPSBjdHguJGltcGxpY2l0OwogICAgICAgIGNvbnN0IGN0eF9yMCA9IMm1ybVuZXh0Q29udGV4dCgpOwogICAgICAgIMm1ybVhZHZhbmNlKDEpOwogICAgICAgIMm1ybVwcm9wZXJ0eSgibmdJZiIsIGVsZW1lbnRfcjEua2luZCA9PT0gY3R4X3IwLkFyaXRobWV0aWNLaW5kLk1FVFJJQyk7CiAgICAgICAgybXJtWFkdmFuY2UoMSk7CiAgICAgICAgybXJtXByb3BlcnR5KCJuZ0lmIiwgZWxlbWVudF9yMS5raW5kID09PSBjdHhfcjAuQXJpdGhtZXRpY0tpbmQuT1BFUkFUT1IpOwogICAgfSB9CiAgICBjbGFzcyBNZXRyaWNBcml0aG1ldGljQ29tcG9uZW50IHsKICAgICAgICBjb25zdHJ1Y3RvcigpIHsKICAgICAgICAgICAgdGhpcy5Bcml0aG1ldGljS2luZCA9IEFyaXRobWV0aWNLaW5kOwogICAgICAgIH0KICAgIH0KICAgIE1ldHJpY0FyaXRobWV0aWNDb21wb25lbnQuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IENvbXBvbmVudCwgYXJnczogW3sKICAgICAgICAgICAgICAgICAgICBzZWxlY3RvcjogJ21ldHJpYy1hcml0aG1ldGljLWNvbXBvbmVudCcsCiAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGVVcmw6ICcuL21ldHJpY19hcml0aG1ldGljX2NvbXBvbmVudC5uZy5odG1sJywKICAgICAgICAgICAgICAgICAgICBzdHlsZVVybHM6IFsnLi9tZXRyaWNfYXJpdGhtZXRpY19jb21wb25lbnQuY3NzJ10sCiAgICAgICAgICAgICAgICAgICAg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lY2tlZCBieSB0c2MKICAgICAqLwogICAgY2xhc3MgTWV0cmljQXJpdGhtZXRpY0NvbnRhaW5lciB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBzdG9yZQogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKHN0b3JlKSB7CiAgICAgICAgICAgIHRoaXMuc3RvcmUgPSBzdG9yZTsKICAgICAgICAgICAgdGhpcy5tZXRyaWNBcml0aG1ldGljJCA9IHRoaXMuc3RvcmUucGlwZShzZWxlY3QoZ2V0TWV0cmljQXJpdGhtZXRpYykpOwogICAgICAgIH0KICAgIH0KICAgIE1ldHJpY0FyaXRobWV0aWNDb250YWluZXIuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IENvbXBvbmVudCwgYXJnczogW3sKICAgICAgICAgICAgICAgICAgICBzZWxlY3RvcjogJ25wbWktbWV0cmljLWFyaXRobWV0aWMnLAogICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlOiBgCiAgICA8bWV0cmljLWFyaXRobWV0aWMtY29tcG9uZW50CiAgICAgIFttZXRyaWNBcml0aG1ldGljXT0ibWV0cmljQXJpdGhtZXRpYyQgfCBhc3luYyIKICAgID48L21ldHJpYy1hcml0aG1ldGljLWNvbXBvbmVudD4KICBgLAogICAgICAgICAgICAgICAgICAgIGNoYW5nZURldGVjdGlvbjogQ2hhbmdlRGV0ZWN0aW9uU3RyYXRlZ3kuT25QdXNoLAogICAgICAgICAgICAgICAgfSxdIH0sCiAgICBdOwogICAgLyoqIEBub2NvbGxhcHNlICovCiAgICBNZXRyaWNBcml0aG1ldGljQ29udGFpbmVyLmN0b3JQYXJhbWV0ZXJzID0gKCkgPT4gWwogICAgICAgIHsgdHlwZTogU3RvcmUgfQogICAgXTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLyBNZXRyaWNBcml0aG1ldGljQ29udGFpbmVyLsm1ZmFjID0gZnVuY3Rpb24gTWV0cmljQXJpdGhtZXRpY0N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RhID0ge307CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGFsbFJ1bnMgPSBuZXcgU2V0KGFjdGl2ZVJ1bnMpOwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBhbGxNZXRyaWNzID0gbmV3IFNldChtZXRyaWNzLm1hcCgoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBtZXRyaWMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIChtZXRyaWMpID0+IHN0cmlwTWV0cmljU3RyaW5nKG1ldHJpYykpKSk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGZpbHRlclJlZ2V4ID0gbmV3IFJlZ0V4cChhbm5vdGF0aW9uc1JlZ2V4LCAnaScpOwogICAgICAgIE9iamVjdC5lbnRyaWVzKGFubm90YXRpb25EYXRhKS5mb3JFYWNoKCgvKioKICAgICAgICAgKiBAcGFyYW0gez99IGVudHJ5CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAoZW50cnkpID0+IHsKICAgICAgICAgICAgaWYgKCFmaWx0ZXJSZWdleC50ZXN0KGVudHJ5WzBdKSkgewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgbGV0IHZhbHVlRGF0YUVsZW1lbnRzID0gZW50cnlbMV07CiAgICAgICAgICAgIC8vIFJlbW92ZSBhbGwgaW5hY3RpdmUgcnVucyBhbmQga2VlcCBvbmx5IG1ldHJpY3MgY3VycmVudGx5IGRpc3BsYXllZAogICAgICAgICAgICB2YWx1ZURhdGFFbGVtZW50cyA9IHZhbHVlRGF0YUVsZW1lbnRzLmZpbHRlcigoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWVEYXRhRWxlbWVudAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHZhbHVlRGF0YUVsZW1lbnQpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiAoYWxsUnVucy5oYXModmFsdWVEYXRhRWxlbWVudC5ydW4pICYmCiAgICAgICAgICAgICAgICAgICAgYWxsTWV0cmljcy5oYXModmFsdWVEYXRhRWxlbWVudC5tZXRyaWMpKTsKICAgICAgICAgICAgfSkpOwogICAgICAgICAgICBpZiAoY2hlY2tWYWx1ZXNQYXNzTWV0cmljQXJpdGhtZXRpYyhtZXRyaWNBcml0aG1ldGljLCBtZXRyaWNGaWx0ZXJzLCB2YWx1ZURhdGFFbGVtZW50cykpIHsKICAgICAgICAgICAgICAgIGlmICh2YWx1ZURhdGFFbGVtZW50cy5sZW5ndGggIT09IDApIHsKICAgICAgICAgICAgICAgICAgICBkYXRhW2VudHJ5WzBdXSA9IHZhbHVlRGF0YUVsZW1lbnRzOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfSkpOwogICAgICAgIHJldHVybiBkYXRhOwogICAgfQogICAgLyoqCiAgICAgKiBAcGFyYW0gez99IGFubm90YXRpb25EYXRhCiAgICAgKiBAcGFyYW0gez99IGhpZGRlbkFubm90YXRpb25zCiAgICAgKiBAcGFyYW0gez99IHNob3dIaWRkZW4KICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIHJlbW92ZUhpZGRlbkFubm90YXRpb25zKGFubm90YXRpb25EYXRhLCBoaWRkZW5Bbm5vdGF0aW9ucywgc2hvd0hpZGRlbikgewogICAgICAgIGlmIChzaG93SGlkZGVuKSB7CiAgICAgICAgICAgIHJldHVybiBhbm5vdGF0aW9uRGF0YTsKICAgICAgICB9CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGRhdGEgPSBPYmplY3QuYXNzaWduKHt9LCBhbm5vdGF0aW9uRGF0YSk7CiAgICAgICAgaGlkZGVuQW5ub3RhdGlvbnMuZm9yRWFjaCgoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBhbm5vdGF0aW9uCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAoYW5ub3RhdGlvbikgPT4gZGVsZXRlIGRhdGFbYW5ub3RhdGlvbl0pKTsKICAgICAgICByZXR1cm4gZGF0YTsKICAgIH0KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBtZXRyaWNBcml0aG1ldGljCiAgICAgKiBAcGFyYW0gez99IG1ldHJpY0ZpbHRlcnMKICAgICAqIEBwYXJhbSB7P30gdmFsdWVEYXRhRWxlbWVudHMKICAgICAqIEByZXR1cm4gez99CiAgICAgKi8KICAgIGZ1bmN0aW9uIGNoZWNrVmFsdWVzUGFzc01ldHJpY0FyaXRobWV0aWMobWV0cmljQXJpdGhtZXRpYywgbWV0cmljRmlsdGVycywgdmFsdWVEYXRhRWxlbWVudHMpIHsKICAgICAgICAvLyBDaGVjayBhbGwgcGFydHMgb2YgdGhlIGFyaXRoZW1ldGljCiAgICAgICAgcmV0dXJuIG1ldHJpY0FyaXRobWV0aWMuZXZlcnkoKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZWxlbWVudAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgKGVsZW1lbnQpID0+IHsKICAgICAgICAgICAgaWYgKGVsZW1lbnQua2luZCA9PT0gQXJpdGhtZXRpY0tpbmQuT1BFUkFUT1IpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgbWV0cmljRmlsdGVyID0gbWV0cmljRmlsdGVyc1tlbGVtZW50Lm1ldHJpY107CiAgICAgICAgICAgIGlmIChtZXRyaWNGaWx0ZXIgPT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHZhbHVlRGF0YUVsZW1lbnRzLnNvbWUoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlRGF0YUVsZW1lbnQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICh2YWx1ZURhdGFFbGVtZW50KSA9PiB7CiAgICAgICAgICAgICAgICBpZiAodmFsdWVEYXRhRWxlbWVudC5tZXRyaWMgPT09IHN0cmlwTWV0cmljU3RyaW5nKGVsZW1lbnQubWV0cmljKSkgewogICAgICAgICAgICAgICAgICAgIGlmICh2YWx1ZURhdGFFbGVtZW50Lm5QTUlWYWx1ZSA9PT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbWV0cmljRmlsdGVyLmluY2x1ZGVOYU47CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gKCgvKiogQHR5cGUgez99ICovICh2YWx1ZURhdGFFbGVtZW50Lm5QTUlWYWx1ZSkpIDw9IG1ldHJpY0ZpbHRlci5tYXggJiYKICAgICAgICAgICAgICAgICAgICAgICAgICAgICgvKiogQHR5cGUgez99ICovICh2YWx1ZURhdGFFbGVtZW50Lm5QTUlWYWx1ZSkpID49IG1ldHJpY0ZpbHRlci5taW4pOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgfSkpOwogICAgICAgIH0pKTsKICAgIH0KCiAgICBmdW5jdGlvbiBhc2NlbmRpbmcoYSwgYikgewogICAgICByZXR1cm4gYSA8IGIgPyAtMSA6IGEgPiBiID8gMSA6IGEgPj0gYiA/IDAgOiBOYU47CiAgICB9CgogICAgZnVuY3Rpb24gYmlzZWN0b3IoY29tcGFyZSkgewogICAgICBpZiAoY29tcGFyZS5sZW5ndGggPT09IDEpIGNvbXBhcmUgPSBhc2NlbmRpbmdDb21wYXJhdG9yKGNvbXBhcmUpOwogICAgICByZXR1cm4gewogICAgICAgIGxlZnQ6IGZ1bmN0aW9uKGEsIHgsIGxvLCBoaSkgewogICAgICAgICAgaWYgKGxvID09IG51bGwpIGxvID0gMDsKICAgICAgICAgIGlmIChoaSA9PSBudWxsKSBoaSA9IGEubGVuZ3RoOwogICAgICAgICAgd2hpbGUgKGxvIDwgaGkpIHsKICAgICAgICAgICAgdmFyIG1pZCA9IGxvICsgaGkgPj4+IDE7CiAgICAgICAgICAgIGlmIChjb21wYXJlKGFbbWlkXSwgeCkgPCAwKSBsbyA9IG1pZCArIDE7CiAgICAgICAgICAgIGVsc2UgaGkgPSBtaWQ7CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gbG87CiAgICAgICAgfSwKICAgICAgICByaWdodDogZnVuY3Rpb24oYSwgeCwgbG8sIGhpKSB7CiAgICAgICAgICBpZiAobG8gPT0gbnVsbCkgbG8gPSAwOwogICAgICAgICAgaWYgKGhpID09IG51bGwpIGhpID0gYS5sZW5ndGg7CiAgICAgICAgICB3aGlsZSAobG8gPCBoaSkgewogICAgICAgICAgICB2YXIgbWlkID0gbG8gKyBoaSA+Pj4gMTsKICAgICAgICAgICAgaWYgKGNvbXBhcmUoYVttaWRdLCB4KSA+IDApIGhpID0gbWlkOwogICAgICAgICAgICBlbHNlIGxvID0gbWlkICsgMTsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiBsbzsKICAgICAgICB9CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gYXNjZW5kaW5nQ29tcGFyYXRvcihmKSB7CiAgICAgIHJldHVybiBmdW5jdGlvbihkLCB4KSB7CiAgICAgICAgcmV0dXJuIGFzY2VuZGluZyhmKGQpLCB4KTsKICAgICAgfTsKICAgIH0KCiAgICB2YXIgYXNjZW5kaW5nQmlzZWN0ID0gYmlzZWN0b3IoYXNjZW5kaW5nKTsKICAgIHZhciBiaXNlY3RSaWdodCA9IGFzY2VuZGluZ0Jpc2VjdC5yaWdodDsKCiAgICBmdW5jdGlvbiBleHRlbnQodmFsdWVzLCB2YWx1ZW9mKSB7CiAgICAgIHZhciBuID0gdmFsdWVzLmxlbmd0aCwKICAgICAgICAgIGkgPSAtMSwKICAgICAgICAgIHZhbHVlLAogICAgICAgICAgbWluLAogICAgICAgICAgbWF4OwoKICAgICAgaWYgKHZhbHVlb2YgPT0gbnVsbCkgewogICAgICAgIHdoaWxlICgrK2kgPCBuKSB7IC8vIEZpbmQgdGhlIGZpcnN0IGNvbXBhcmFibGUgdmFsdWUuCiAgICAgICAgICBpZiAoKHZhbHVlID0gdmFsdWVzW2ldKSAhPSBudWxsICYmIHZhbHVlID49IHZhbHVlKSB7CiAgICAgICAgICAgIG1pbiA9IG1heCA9IHZhbHVlOwogICAgICAgICAgICB3aGlsZSAoKytpIDwgbikgeyAvLyBDb21wYXJlIHRoZSByZW1haW5pbmcgdmFsdWVzLgogICAgICAgICAgICAgIGlmICgodmFsdWUgPSB2YWx1ZXNbaV0pICE9IG51bGwpIHsKICAgICAgICAgICAgICAgIGlmIChtaW4gPiB2YWx1ZSkgbWluID0gdmFsdWU7CiAgICAgICAgICAgICAgICBpZiAobWF4IDwgdmFsdWUpIG1heCA9IHZhbHVlOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQoKICAgICAgZWxzZSB7CiAgICAgICAgd2hpbGUgKCsraSA8IG4pIHsgLy8gRmluZCB0aGUgZmlyc3QgY29tcGFyYWJsZSB2YWx1ZS4KICAgICAgICAgIGlmICgodmFsdWUgPSB2YWx1ZW9mKHZhbHVlc1tpXSwgaSwgdmFsdWVzKSkgIT0gbnVsbCAmJiB2YWx1ZSA+PSB2YWx1ZSkgewogICAgICAgICAgICBtaW4gPSBtYXggPSB2YWx1ZTsKICAgICAgICAgICAgd2hpbGUgKCsraSA8IG4pIHsgLy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h4MCwgeDEsIHR6KTsKICAgICAgICAgIHR6ID0gc2VxdWVuY2UkMShNYXRoLmNlaWwoeDAgLyB0eikgKiB0eiwgeDEsIHR6KTsgLy8gZXhjbHVzaXZlCiAgICAgICAgfQoKICAgICAgICAvLyBSZW1vdmUgYW55IHRocmVzaG9sZHMgb3V0c2lkZSB0aGUgZG9tYWluLgogICAgICAgIHZhciBtID0gdHoubGVuZ3RoOwogICAgICAgIHdoaWxlICh0elswXSA8PSB4MCkgdHouc2hpZnQoKSwgLS1tOwogICAgICAgIHdoaWxlICh0elttIC0gMV0gPiB4MSkgdHoucG9wKCksIC0tbTsKCiAgICAgICAgdmFyIGJpbnMgPSBuZXcgQXJyYXkobSArIDEpLAogICAgICAgICAgICBiaW47CgogICAgICAgIC8vIEluaXRpYWxpemUgYmlucy4KICAgICAgICBmb3IgKGkgPSAwOyBpIDw9IG07ICsraSkgewogICAgICAgICAgYmluID0gYmluc1tpXSA9IFtdOwogICAgICAgICAgYmluLngwID0gaSA+IDAgPyB0eltpIC0gMV0gOiB4MDsKICAgICAgICAgIGJpbi54MSA9IGkgPCBtID8gdHpbaV0gOiB4MTsKICAgICAgICB9CgogICAgICAgIC8vIEFzc2lnbiBkYXRhIHRvIGJpbnMgYnkgdmFsdWUsIGlnbm9yaW5nIGFueSBvdXRzaWRlIHRoZSBkb21haW4uCiAgICAgICAgZm9yIChpID0gMDsgaSA8IG47ICsraSkgewogICAgICAgICAgeCA9IHZhbHVlc1tpXTsKICAgICAgICAgIGlmICh4MCA8PSB4ICYmIHggPD0geDEpIHsKICAgICAgICAgICAgYmluc1tiaXNlY3RSaWdodCh0eiwgeCwgMCwgbSldLnB1c2goZGF0YVtpXSk7CiAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICByZXR1cm4gYmluczsKICAgICAgfQoKICAgICAgaGlzdG9ncmFtLnZhbHVlID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHZhbHVl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jUpICsgIikiOwogICAgfQoKICAgIGZ1bmN0aW9uIG51bWJlcihzY2FsZSkgewogICAgICByZXR1cm4gZnVuY3Rpb24oZCkgewogICAgICAgIHJldHVybiArc2NhbGUoZCk7CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gY2VudGVyKHNjYWxlKSB7CiAgICAgIHZhciBvZmZzZXQgPSBNYXRoLm1heCgwLCBzY2FsZS5iYW5kd2lkdGgoKSAtIDEpIC8gMjsgLy8gQWRqdXN0IGZvciAwLjVweCBvZmZzZXQuCiAgICAgIGlmIChzY2FsZS5yb3VuZCgpKSBvZmZzZXQgPSBNYXRoLnJvdW5kKG9mZnNldCk7CiAgICAgIHJldHVybiBmdW5jdGlvbihkKSB7CiAgICAgICAgcmV0dXJuICtzY2FsZShkKSArIG9mZnNldDsKICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiBlbnRlcmluZygpIHsKICAgICAgcmV0dXJuICF0aGlzLl9fYXhpczsKICAgIH0KCiAgICBmdW5jdGlvbiBheGlzKG9yaWVudCwgc2NhbGUpIHsKICAgICAgdmFyIHRpY2tBcmd1bWVudHMgPSBbXSwKICAgICAgICAgIHRpY2tWYWx1ZXMgPSBudWxsLAogICAgICAgICAgdGlja0Zvcm1hdCA9IG51bGwsCiAgICAgICAgICB0aWNrU2l6ZUlubmVyID0gNiwKICAgICAgICAgIHRpY2tTaXplT3V0ZXIgPSA2LAogICAgICAgICAgdGlja1BhZGRpbmcgPSAzLAogICAgICAgICAgayA9IG9yaWVudCA9PT0gdG9wIHx8IG9yaWVudCA9PT0gbGVmdCA/IC0xIDogMSwKICAgICAgICAgIHggPSBvcmllbnQgPT09IGxlZnQgfHwgb3JpZW50ID09PSByaWdodCA/ICJ4IiA6ICJ5IiwKICAgICAgICAgIHRyYW5zZm9ybSA9IG9yaWVudCA9PT0gdG9wIHx8IG9yaWVudCA9PT0gYm90dG9tID8gdHJhbnNsYXRlWCA6IHRyYW5zbGF0ZVk7CgogICAgICBmdW5jdGlvbiBheGlzKGNvbnRleHQpIHsKICAgICAgICB2YXIgdmFsdWVzID0gdGlja1ZhbHVlcyA9PSBudWxsID8gKHNjYWxlLnRpY2tzID8gc2NhbGUudGlja3MuYXBwbHkoc2NhbGUsIHRpY2tBcmd1bWVudHMpIDogc2NhbGUuZG9tYWluKCkpIDogdGlja1ZhbHVlcywKICAgICAgICAgICAgZm9ybWF0ID0gdGlja0Zvcm1hdCA9PSBudWxsID8gKHNjYWxlLnRpY2tGb3JtYXQgPyBzY2FsZS50aWNrRm9ybWF0LmFwcGx5KHNjYWxlLCB0aWNrQXJndW1lbnRzKSA6IGlkZW50aXR5JDIpIDogdGlja0Zvcm1hdCwKICAgICAgICAgICAgc3BhY2luZyA9IE1hdGgubWF4KHRpY2tTaXplSW5uZXIsIDApICsgdGlja1BhZGRpbmcsCiAgICAgICAgICAgIHJhbmdlID0gc2NhbGUucmFuZ2UoKSwKICAgICAgICAgICAgcmFuZ2UwID0gK3JhbmdlWzBdICsgMC41LAogICAgICAgICAgICByYW5nZTEgPSArcmFuZ2VbcmFuZ2UubGVuZ3RoIC0gMV0gKyAwLjUsCiAgICAgICAgICAgIHBvc2l0aW9uID0gKHNjYWxlLmJhbmR3aWR0aCA/IGNlbnRlciA6IG51bWJlcikoc2NhbGUuY29weSgpKSwKICAgICAgICAgICAgc2VsZWN0aW9uID0gY29udGV4dC5zZWxlY3Rpb24gPyBjb250ZXh0LnNlbGVjdGlvbigpIDogY29udGV4dCwKICAgICAgICAgICAgcGF0aCA9IHNlbGVjdGlvbi5zZWxlY3RBbGwoIi5kb21haW4iKS5kYXRhKFtudWxsXSksCiAgICAgICAgICAgIHRpY2sgPSBzZWxlY3Rpb24uc2VsZWN0QWxsKCIudGljayIpLmRhdGEodmFsdWVzLCBzY2FsZSkub3JkZXIoKSwKICAgICAgICAgICAgdGlja0V4aXQgPSB0aWNrLmV4aXQoKSwKICAgICAgICAgICAgdGlja0VudGVyID0gdGljay5lbnRlcigpLmFwcGVuZCgiZyIpLmF0dHIoImNsYXNzIiwgInRpY2siKSwKICAgICAgICAgICAgbGluZSA9IHRpY2suc2VsZWN0KCJsaW5lIiksCiAgICAgICAgICAgIHRleHQgPSB0aWNrLnNlbGVjdCgidGV4dCIpOwoKICAgICAgICBwYXRoID0gcGF0aC5tZXJnZShwYXRoLmVudGVyKCkuaW5zZXJ0KCJwYXRoIiwgIi50aWNrIikKICAgICAgICAgICAgLmF0dHIoImNsYXNzIiwgImRvbWFpbiIpCiAgICAgICAgICAgIC5hdHRyKCJzdHJva2UiLCAiY3VycmVudENvbG9yIikpOwoKICAgICAgICB0aWNrID0gdGljay5tZXJnZSh0aWNrRW50ZXIpOwoKICAgICAgICBsaW5lID0gbGluZS5tZXJnZSh0aWNrRW50ZXIuYXBwZW5kKCJsaW5lIikKICAgICAgICAgICAgLmF0dHIoInN0cm9rZSIsICJjdXJyZW50Q29sb3IiKQogICAgICAgICAgICAuYXR0cih4ICsgIjIiLCBrICogdGlja1NpemVJbm5lcikpOwoKICAgICAgICB0ZXh0ID0gdGV4dC5tZXJnZSh0aWNrRW50ZXIuYXBwZW5kKCJ0ZXh0IikKICAgICAgICAgICAgLmF0dHIoImZpbGwiLCAiY3VycmVudENvbG9yIikKICAgICAgICAgICAgLmF0dHIoeCwgayAqIHNwYWNpbmcpCiAgICAgICAgICAgIC5hdHRyKCJkeSIsIG9yaWVudCA9PT0gdG9wID8gIjBlbSIgOiBvcmllbnQgPT09IGJvdHRvbSA/ICIwLjcxZW0iIDogIjAuMzJlbSIpKTsKCiAgICAgICAgaWYgKGNvbnRleHQgIT09IHNlbGVjdGlvbikgewogICAgICAgICAgcGF0aCA9IHBhdGgudHJhbnNpdGlvbihjb250ZXh0KTsKICAgICAgICAgIHRpY2sgPSB0aWNrLnRyYW5zaXRpb24oY29udGV4dCk7CiAgICAgICAgICBsaW5lID0gbGluZS50cmFuc2l0aW9uKGNvbnRleHQpOwogICAgICAgICAgdGV4dCA9IHRleHQudHJhbnNpdGlvbihjb250ZXh0KTsKCiAgICAgICAgICB0aWNrRXhpdCA9IHRpY2tFeGl0LnRyYW5zaXRpb24oY29udGV4dCkKICAgICAgICAgICAgICAuYXR0cigib3BhY2l0eSIsIGVwc2lsb24pCiAgICAgICAgICAgICAgLmF0dHIoInRyYW5zZm9ybSIsIGZ1bmN0aW9uKGQpIHsgcmV0dXJuIGlzRmluaXRlKGQgPSBwb3NpdGlvbihkKSkgPyB0cmFuc2Zvcm0oZCkgOiB0aGlzLmdldEF0dHJpYnV0ZSgidHJhbnNmb3JtIik7IH0pOwoKICAgICAgICAgIHRpY2tFbnRlcgogICAgICAgICAgICAgIC5hdHRyKCJvcGFjaXR5IiwgZXBzaWxvbikKICAgICAgICAgICAgICAuYXR0cigidHJhbnNmb3JtIiwgZnVuY3Rpb24oZCkgeyB2YXIgcCA9IHRoaXMucGFyZW50Tm9kZS5fX2F4aXM7IHJldHVybiB0cmFuc2Zvcm0ocCAmJiBpc0Zpbml0ZShwID0gcChkKSkgPyBwIDogcG9zaXRpb24oZCkpOyB9KTsKICAgICAgICB9CgogICAgICAgIHRpY2tFeGl0LnJlbW92ZSgpOwoKICAgICAgICBwYXRoCiAgICAgICAgICAgIC5hdHRyKCJkIiwgb3JpZW50ID09PSBsZWZ0IHx8IG9yaWVudCA9PSByaWdodAogICAgICAgICAgICAgICAgPyAodGlja1NpemVPdXRlciA/ICJNIiArIGsgKiB0aWNrU2l6ZU91dGVyICsgIiwiICsgcmFuZ2UwICsgIkgwLjVWIiArIHJhbmdlMSArICJIIiArIGsgKiB0aWNrU2l6ZU91dGVyIDogIk0wLjUsIiArIHJhbmdlMCArICJWIiArIHJhbmdlMSkKICAgICAgICAgICAgICAgIDogKHRpY2tTaXplT3V0ZXIgPyAiTSIgKyByYW5nZTAgKyAiLCIgKyBrICogdGlja1NpemVPdXRlciArICJWMC41SCIgKyByYW5nZTEgKyAiViIgKyBrICogdGlja1NpemVPdXRlciA6ICJNIiArIHJhbmdlMCArICIsMC41SCIgKyByYW5nZTEpKTsKCiAgICAgICAgdGljawogICAgICAgICAgICAuYXR0cigib3BhY2l0eSIsIDEpCiAgICAgICAgICAgIC5hdHRyKCJ0cmFuc2Zvcm0iLCBmdW5jdGlvbihkKSB7IHJldHVybiB0cmFuc2Zvcm0ocG9zaXRpb24oZCkpOyB9KTsKCiAgICAgICAgbGluZQogICAgICAgICAgICAuYXR0cih4ICsgIjIiLCBrICogdGlja1NpemVJbm5lcik7CgogICAgICAgIHRleHQKICAgICAgICAgICAgLmF0dHIoeCwgayAqIHNwYWNpbmcpCiAgICAgICAgICAgIC50ZXh0KGZvcm1hdCk7CgogICAgICAgIHNlbGVjdGlvbi5maWx0ZXIoZW50ZXJpbmcpCiAgICAgICAgICAgIC5hdHRyKCJmaWxsIiwgIm5vbmUiKQogICAgICAgICAgICAuYXR0cigiZm9udC1zaXplIiwgMTApCiAgICAgICAgICAgIC5hdHRyKCJmb250LWZhbWlseSIsICJzYW5zLXNlcmlmIikKICAgICAgICAgICAgLmF0dHIoInRleHQtYW5jaG9yIiwgb3JpZW50ID09PSByaWdodCA/ICJzdGFydCIgOiBvcmllbnQgPT09IGxlZnQgPyAiZW5kIiA6ICJtaWRkbGUiKTsKCiAgICAgICAgc2VsZWN0aW9uCiAgICAgICAgICAgIC5lYWNoKGZ1bmN0aW9uKCkgeyB0aGlzLl9fYXhpcyA9IHBvc2l0aW9uOyB9KTsKICAgICAgfQoKICAgICAgYXhpcy5zY2FsZSA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChzY2FsZSA9IF8sIGF4aXMpIDogc2NhbGU7CiAgICAgIH07CgogICAgICBheGlzLnRpY2tzID0gZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuIHRpY2tBcmd1bWVudHMgPSBzbGljZSQxLmNhbGwoYXJndW1lbnRzKSwgYXhpczsKICAgICAgfTsKCiAgICAgIGF4aXMudGlja0FyZ3VtZW50cyA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/ICh0aWNrQXJndW1lbnRzID0gXyA9PSBudWxsID8gW10gOiBzbGljZSQxLmNhbGwoXyksIGF4aXMpIDogdGlja0FyZ3VtZW50cy5zbGljZSgpOwogICAgICB9OwoKICAgICAgYXhpcy50aWNrVmFsdWVzID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHRpY2tWYWx1ZXMgPSBfID09IG51bGwgPyBudWxsIDogc2xpY2UkMS5jYWxsKF8pLCBheGlzKSA6IHRpY2tWYWx1ZXMgJiYgdGlja1ZhbHVlcy5zbGljZSgpOwogICAgICB9OwoKICAgICAgYXhpcy50aWNrRm9ybWF0ID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHRpY2tGb3JtYXQgPSBfLCBheGlzKSA6IHRpY2tGb3JtYXQ7CiAgICAgIH07CgogICAgICBheGlzLnRpY2tTaXplID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHRpY2tTaXplSW5uZXIgPSB0aWNrU2l6ZU91dGVyID0gK18sIGF4aXMpIDogdGlja1NpemVJbm5lcjsKICAgICAgfTsKCiAgICAgIGF4aXMudGlja1NpemVJbm5lciA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/ICh0aWNrU2l6ZUlubmVyID0gK18sIGF4aXMpIDogdGlja1NpemVJbm5lcjsKICAgICAgfTsKCiAgICAgIGF4aXMudGlja1NpemVPdXRlciA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/ICh0aWNrU2l6ZU91dGVyID0gK18sIGF4aXMpIDogdGlja1NpemVPdXRlcjsKICAgICAgfTsKCiAgICAgIGF4aXMudGlja1BhZGRpbmcgPS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ub24tbnVsbCBub2RlcyB0aGF0IGRvbuKAmXQgZml0IGludG8gZXhpdC4KICAgICAgZm9yICg7IGkgPCBncm91cExlbmd0aDsgKytpKSB7CiAgICAgICAgaWYgKG5vZGUgPSBncm91cFtpXSkgewogICAgICAgICAgZXhpdFtpXSA9IG5vZGU7CiAgICAgICAgfQogICAgICB9CiAgICB9CgogICAgZnVuY3Rpb24gYmluZEtleShwYXJlbnQsIGdyb3VwLCBlbnRlciwgdXBkYXRlLCBleGl0LCBkYXRhLCBrZXkpIHsKICAgICAgdmFyIGksCiAgICAgICAgICBub2RlLAogICAgICAgICAgbm9kZUJ5S2V5VmFsdWUgPSB7fSwKICAgICAgICAgIGdyb3VwTGVuZ3RoID0gZ3JvdXAubGVuZ3RoLAogICAgICAgICAgZGF0YUxlbmd0aCA9IGRhdGEubGVuZ3RoLAogICAgICAgICAga2V5VmFsdWVzID0gbmV3IEFycmF5KGdyb3VwTGVuZ3RoKSwKICAgICAgICAgIGtleVZhbHVlOwoKICAgICAgLy8gQ29tcHV0ZSB0aGUga2V5IGZvciBlYWNoIG5vZGUuCiAgICAgIC8vIElmIG11bHRpcGxlIG5vZGVzIGhhdmUgdGhlIHNhbWUga2V5LCB0aGUgZHVwbGljYXRlcyBhcmUgYWRkZWQgdG8gZXhpdC4KICAgICAgZm9yIChpID0gMDsgaSA8IGdyb3VwTGVuZ3RoOyArK2kpIHsKICAgICAgICBpZiAobm9kZSA9IGdyb3VwW2ldKSB7CiAgICAgICAgICBrZXlWYWx1ZXNbaV0gPSBrZXlWYWx1ZSA9IGtleVByZWZpeCArIGtleS5jYWxsKG5vZGUsIG5vZGUuX19kYXRhX18sIGksIGdyb3VwKTsKICAgICAgICAgIGlmIChrZXlWYWx1ZSBpbiBub2RlQnlLZXlWYWx1ZSkgewogICAgICAgICAgICBleGl0W2ldID0gbm9kZTsKICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIG5vZGVCeUtleVZhbHVlW2tleVZhbHVlXSA9IG5vZGU7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CgogICAgICAvLyBDb21wdXRlIHRoZSBrZXkgZm9yIGVhY2ggZGF0dW0uCiAgICAgIC8vIElmIHRoZXJlIGEgbm9kZSBhc3NvY2lhdGVkIHdpdGggdGhpcyBrZXksIGpvaW4gYW5kIGFkZCBpdCB0byB1cGRhdGUuCiAgICAgIC8vIElmIHRoZXJlIGlzIG5vdCAob3IgdGhlIGtleSBpcyBhIGR1cGxpY2F0ZSksIGFkZCBpdCB0byBlbnRlci4KICAgICAgZm9yIChpID0gMDsgaSA8IGRhdGFMZW5ndGg7ICsraSkgewogICAgICAgIGtleVZhbHVlID0ga2V5UHJlZml4ICsga2V5LmNhbGwocGFyZW50LCBkYXRhW2ldLCBpLCBkYXRhKTsKICAgICAgICBpZiAobm9kZSA9IG5vZGVCeUtleVZhbHVlW2tleVZhbHVlXSkgewogICAgICAgICAgdXBkYXRlW2ldID0gbm9kZTsKICAgICAgICAgIG5vZGUuX19kYXRhX18gPSBkYXRhW2ldOwogICAgICAgICAgbm9kZUJ5S2V5VmFsdWVba2V5VmFsdWVdID0gbnVsbDsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgZW50ZXJbaV0gPSBuZXcgRW50ZXJOb2RlKHBhcmVudCwgZGF0YVtpXSk7CiAgICAgICAgfQogICAgICB9CgogICAgICAvLyBBZGQgYW55IHJlbWFpbmluZyBub2RlcyB0aGF0IHdlcmUgbm90IGJvdW5kIHRvIGRhdGEgdG8gZXhpdC4KICAgICAgZm9yIChpID0gMDsgaSA8IGdyb3VwTGVuZ3RoOyArK2kpIHsKICAgICAgICBpZiAoKG5vZGUgPSBncm91cFtpXSkgJiYgKG5vZGVCeUtleVZhbHVlW2tleVZhbHVlc1tpXV0gPT09IG5vZGUpKSB7CiAgICAgICAgICBleGl0W2ldID0gbm9kZTsKICAgICAgICB9CiAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiBzZWxlY3Rpb25fZGF0YSh2YWx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ldIHx8IGdyb3VwMVtpXSkgewogICAgICAgICAgICBtZXJnZVtpXSA9IG5vZGU7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CgogICAgICBmb3IgKDsgaiA8IG0wOyArK2opIHsKICAgICAgICBtZXJnZXNbal0gPSBncm91cHMwW2pdOwogICAgICB9CgogICAgICByZXR1cm4gbmV3IFNlbGVjdGlvbihtZXJnZXMsIHRoaXMuX3BhcmVudHMpOwogICAgfQoKICAgIGZ1bmN0aW9uIHNlbGVjdGlvbl9vcmRlcigpIHsKCiAgICAgIGZvciAodmFyIGdyb3VwcyA9IHRoaXMuX2dyb3VwcywgaiA9IC0xLCBtID0gZ3JvdXBzLmxlbmd0aDsgKytqIDwgbTspIHsKICAgICAgICBmb3IgKHZhciBncm91cCA9IGdyb3Vwc1tqXSwgaSA9IGdyb3VwLmxlbmd0aCAtIDEsIG5leHQgPSBncm91cFtpXSwgbm9kZTsgLS1pID49IDA7KSB7CiAgICAgICAgICBpZiAobm9kZSA9IGdyb3VwW2ldKSB7CiAgICAgICAgICAgIGlmIChuZXh0ICYmIG5vZGUuY29tcGFyZURvY3VtZW50UG9zaXRpb24obmV4dCkgXiA0KSBuZXh0LnBhcmVudE5vZGUuaW5zZXJ0QmVmb3JlKG5vZGUsIG5leHQpOwogICAgICAgICAgICBuZXh0ID0gbm9kZTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KCiAgICAgIHJldHVybiB0aGlzOwogICAgfQoKICAgIGZ1bmN0aW9uIHNlbGVjdGlvbl9zb3J0KGNvbXBhcmUpIHsKICAgICAgaWYgKCFjb21wYXJlKSBjb21wYXJlID0gYXNjZW5kaW5nJDE7CgogICAgICBmdW5jdGlvbiBjb21wYXJlTm9kZShhLCBiKSB7CiAgICAgICAgcmV0dXJuIGEgJiYgYiA/IGNvbXBhcmUoYS5fX2RhdGFfXywgYi5fX2RhdGFfXykgOiAhYSAtICFiOwogICAgICB9CgogICAgICBmb3IgKHZhciBncm91cHMgPSB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W9uX25vZGUoKSB7CgogICAgICBmb3IgKHZhciBncm91cHMgPSB0aGlzLl9ncm91cHMsIGogPSAwLCBtID0gZ3JvdXBzLmxlbmd0aDsgaiA8IG07ICsraikgewogICAgICAgIGZvciAodmFyIGdyb3VwID0gZ3JvdXBzW2pdLCBpID0gMCwgbiA9IGdyb3VwLmxlbmd0aDsgaSA8IG47ICsraSkgewogICAgICAgICAgdmFyIG5vZGUgPSBncm91cFtpXTsKICAgICAgICAgIGlmIChub2RlKSByZXR1cm4gbm9kZTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIHJldHVybiBudWxsOwogICAgfQoKICAgIGZ1bmN0aW9uIHNlbGVjdGlvbl9zaXplKCkgewogICAgICB2YXIgc2l6ZSA9IDA7CiAgICAgIHRoaXMuZWFjaChmdW5jdGlvbigpIHsgKytzaXplOyB9KTsKICAgICAgcmV0dXJuIHNpemU7CiAgICB9CgogICAgZnVuY3Rpb24gc2VsZWN0aW9uX2VtcHR5KCkgewogICAgICByZXR1cm4gIXRoaXMubm9kZSgpOwogICAgfQoKICAgIGZ1bmN0aW9uIHNlbGVjdGlvbl9lYWNoKGNhbGxiYWNrKSB7CgogICAgICBmb3IgKHZhciBncm91cHMgPSB0aGlzLl9ncm91cHMsIGogPSAwLCBtID0gZ3JvdXBzLmxlbmd0aDsgaiA8IG07ICsraikgewogICAgICAgIGZvciAodmFyIGdyb3VwID0gZ3JvdXBzW2pdLCBpID0gMCwgbiA9IGdyb3VwLmxlbmd0aCwgbm9kZTsgaSA8IG47ICsraSkgewogICAgICAgICAgaWYgKG5vZGUgPSBncm91cFtpXSkgY2FsbGJhY2suY2FsbChub2RlLCBub2RlLl9fZGF0YV9fLCBpLCBncm91cCk7CiAgICAgICAgfQogICAgICB9CgogICAgICByZXR1cm4gdGhpczsKICAgIH0KCiAgICBmdW5jdGlvbiBhdHRyUmVtb3ZlKG5hbWUpIHsKICAgICAgcmV0dXJuIGZ1bmN0aW9uKCkgewogICAgICAgIHRoaXMucm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ICAgICAgZm9yICh2YXIgaiA9IDAsIGkgPSAtMSwgbSA9IG9uLmxlbmd0aCwgbzsgaiA8IG07ICsraikgewogICAgICAgICAgaWYgKG8gPSBvbltqXSwgKCF0eXBlbmFtZS50eXBlIHx8IG8udHlwZSA9PT0gdHlwZW5hbWUudHlwZSkgJiYgby5uYW1lID09PSB0eXBlbmFtZS5uYW1lKSB7CiAgICAgICAgICAgIHRoaXMucmVtb3ZlRXZlbnRMaXN0ZW5lcihvLnR5cGUsIG8ubGlzdGVuZXIsIG8uY2FwdHVyZSk7CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICBvblsrK2ldID0gbzsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaWYgKCsraSkgb24ubGVuZ3RoID0gaTsKICAgICAgICBlbHNlIGRlbGV0ZSB0aGlzLl9fb247CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gb25BZGQodHlwZW5hbWUsIHZhbHVlLCBjYXB0dXJlKSB7CiAgICAgIHZhciB3cmFwID0gZmlsdGVyRXZlbnRzLmhhc093blByb3BlcnR5KHR5cGVuYW1lLnR5cGUpID8gZmlsdGVyQ29udGV4dExpc3RlbmVyIDogY29udGV4dExpc3RlbmVyOwogICAgICByZXR1cm4gZnVuY3Rpb24oZCwgaSwgZ3JvdXApIHsKICAgICAgICB2YXIgb24gPSB0aGlzLl9fb24sIG8sIGxpc3RlbmVyID0gd3JhcCh2YWx1ZSwgaSwgZ3JvdXApOwogICAgICAgIGlmIChvbikgZm9yICh2YXIgaiA9IDAsIG0gPSBvbi5sZW5ndGg7IGogPCBtOyArK2opIHsKICAgICAgICAgIGlmICgobyA9IG9uW2pdKS50eXBlID09PSB0eXBlbmFtZS50eXBlICYmIG8ubmFtZSA9PT0gdHlwZW5hbWUubmFtZSkgewogICAgICAgICAgICB0aGlzLnJlbW92ZUV2ZW50TGlzdGVuZXIoby50eXBlLCBvLmxpc3RlbmVyLCBvLmNhcHR1cmUpOwogICAgICAgICAg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c3RvcEltbWVkaWF0ZVByb3BhZ2F0aW9uKCk7CiAgICB9CgogICAgZnVuY3Rpb24gZHJhZ0Rpc2FibGUodmlldykgewogICAgICB2YXIgcm9vdCA9IHZpZXcuZG9jdW1lbnQuZG9jdW1lbnRFbGVtZW50LAogICAgICAgICAgc2VsZWN0aW9uID0gc2VsZWN0JDEodmlldykub24oImRyYWdzdGFydC5kcmFnIiwgbm9ldmVudCwgdHJ1ZSk7CiAgICAgIGlmICgib25zZWxlY3RzdGFydCIgaW4gcm9vdCkgewogICAgICAgIHNlbGVjdGlvbi5vbigic2VsZWN0c3RhcnQuZHJhZyIsIG5vZXZlbnQsIHRydWUpOwogICAgICB9IGVsc2UgewogICAgICAgIHJvb3QuX19ub3NlbGVjdCA9IHJvb3Quc3R5bGUuTW96VXNlclNlbGVjdDsKICAgICAgICByb290LnN0eWxlLk1velVzZXJTZWxlY3QgPSAibm9uZSI7CiAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiB5ZXNkcmFnKHZpZXcsIG5vY2xpY2spIHsKICAgICAgdmFyIHJvb3QgPSB2aWV3LmRvY3VtZW50LmRvY3VtZW50RWxlbWVudCwKICAgICAgICAgIHNlbGVjdGlvbiA9IHNlbGVjdCQxKHZpZXcpLm9uKCJkcmFnc3RhcnQuZHJhZyIsIG51bGwpOwogICAgICBpZiAobm9jbGljaykgewogICAgICAgIHNlbGVjdGlvbi5vbigiY2xpY2suZHJhZyIsIG5vZXZlbnQsIHRydWUpOwogICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKSB7IHNlbGVjdGlvbi5vbigiY2xpY2suZHJhZyIsIG51bGwpOyB9LCAwKTsKICAgICAgfQogICAgICBpZiAoIm9uc2VsZWN0c3RhcnQiIGluIHJvb3QpIHsKICAgICAgICBzZWxlY3Rpb24ub24oInNlbGVjdHN0YXJ0LmRyYWciLCBudWxsKTsKICAgICAgfSBlbHNlIHsKICAgICAgICByb290LnN0eWxlLk1velVzZXJTZWxlY3QgPS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sCiAgICAgICAgICBnID0gby5nIC8gMjU1LAogICAgICAgICAgYiA9IG8uYiAvIDI1NSwKICAgICAgICAgIG1pbiA9IE1hdGgubWluKHIsIGcsIGIpLAogICAgICAgICAgbWF4ID0gTWF0aC5tYXgociwgZywgYiksCiAgICAgICAgICBoID0gTmFOLAogICAgICAgICAgcyA9IG1heCAtIG1pbiwKICAgICAgICAgIGwgPSAobWF4ICsgbWluKSAvIDI7CiAgICAgIGlmIChzKSB7CiAgICAgICAgaWYgKHIgPT09IG1heCkgaCA9IChnIC0gYikgLyBzICsgKGcgPCBiKSAqIDY7CiAgICAgICAgZWxzZSBpZiAoZyA9PT0gbWF4KSBoID0gKGIgLSByKSAvIHMgKyAyOwogICAgICAgIGVsc2UgaCA9IChyIC0gZykgLyBzICsgNDsKICAgICAgICBzIC89IGwgPCAwLjUgPyBtYXggKyBtaW4gOiAyIC0gbWF4IC0gbWluOwogICAgICAgIGggKj0gNjA7CiAgICAgIH0gZWxzZSB7CiAgICAgICAgcyA9IGwgPiAwICYmIGwgPCAxID8gMCA6IGg7CiAgICAgIH0KICAgICAgcmV0dXJuIG5ldyBIc2woaCwgcywgbCwgby5vcGFjaXR5KTsKICAgIH0KCiAgICBmdW5jdGlvbiBoc2woaCwgcywgbCwgb3BhY2l0eSkgewogICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA9PT0gMSA/IGhzbENvbnZlcnQoaCkgOiBuZXcgSHNsKGgsIHMsIGwsIG9wYWNpdHkgPT0gbnVsbCA/IDEgOiBvcGFjaXR5KTsKICAgIH0KCiAgICBmdW5jdGlvbiBIc2woaCwgcywgbCwgb3BhY2l0eSkgewogICAgICB0aGlzLmggPSAraDsKICAgICAgdGhpcy5zID0gK3M7CiAgICAgIHRoaXMubCA9ICtsOwogICAgICB0aGlzLm9wYWNpdHkgPSArb3BhY2l0eTsKICAgIH0KCiAgICBkZWZpbmUoSHNsLCBoc2wsIGV4dGVuZChDb2xvciwgewogICAgICBicmlnaHRlcjogZnVuY3Rpb24oaykgewogICAgICAgIGsgPSBrID09IG51bGwgPyBicmlnaHRlciA6IE1hdGgucG93KGJyaWdodGVyLCBrKTsKICAgICAgICByZXR1cm4gbmV3IEhzbCh0aGlzLmgsIHRoaXMucywgdGhpcy5sICogaywgdGhpcy5vcGFjaXR5KTsKICAgICAgfSwKICAgICAgZGFya2VyOiBmdW5jdGlvbihrKSB7CiAgICAgICAgayA9IGsgPT0gbnVsbCA/IGRhcmtlciA6IE1hdGgucG93KGRhcmtlciwgayk7CiAgICAgICAgcmV0dXJuIG5ldyBIc2wodGhpcy5oLCB0aGlzLnMsIHRoaXMubCAqIGssIHRoaXMub3BhY2l0eSk7CiAgICAgIH0sCiAgICAgIHJnYjogZnVuY3Rpb24oKSB7CiAgICAgICAgdmFyIGggPSB0aGlzLmggJSAzNjAgKyAodGhpcy5oIDwgMCkgKiAzNjAsCiAgICAgICAgICAgIHMgPSBpc05hTihoKSB8fCBpc05hTih0aGlzLnMpID8gMCA6IHRoaXMucywKICAgICAgICAgICAgbCA9IHRoaXMubCwKICAgICAgICAgICAgbTIgPSBsICsgKGwgPCAwLjUgPyBsIDogMSAtIGwpICogcywKICAgICAgICAgICAgbTEgPSAyICogbCAtIG0yOwogICAgICAgIHJldHVybiBuZXcgUmdiKAogICAgICAgICAgaHNsMnJnYihoID49IDI0MCA/IGggLSAyNDAgOiBoICsgMTIwLCBtMSwgbTIpLAogICAgICAgICAgaHNsMnJnYihoLCBtMSwgbTIpLAogICAgICAgICAgaHNsMnJnYihoIDwgMTIwID8gaCArIDI0MCA6IGggLSAxMjAsIG0xLCBtMiksCiAgICAgICAgICB0aGlzLm9wYWNpdHkKICAgICAgICApOwogICAgICB9LAogICAgICBkaXNwbGF5YWJsZTogZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuICgwIDw9IHRoaXMucyAmJiB0aGlzLnMgPD0gMSB8fCBpc05hTih0aGlzLnMpKQogICAgICAgICAgICAmJiAoMCA8PSB0aGlzLmwgJiYgdGhpcy5sIDw9IDEpCiAgICAgICAgICAgICYmICgwIDw9IHRoaXMub3BhY2l0eSAmJiB0aGlzLm9wYWNpdHkgPD0gMSk7CiAgICAgIH0sCiAgICAgIGZvcm1hdEhzbDogZnVuY3Rpb24oKSB7CiAgICAgICAgdmFyIGEgPSB0aGlzLm9wYWNpdHk7IGEgPSBpc05hTihhKSA/IDEgOiBNYXRoLm1heCgwLCBNYXRoLm1pbigxLCBhKSk7CiAgICAgICAgcmV0dXJuIChhID09PSAxID8gImhzbCgiIDogImhzbGEoIikKICAgICAgICAgICAgKyAodGhpcy5oIHx8IDApICsgIiwgIgogICAgICAgICAgICArICh0aGlzLnMgfHwgMCkgKiAxMDAgKyAiJSwgIgogICAgICAgICAgICArICh0aGlzLmwgfHwgMCkgKiAxMDAgKyAiJSIKICAgICAgICAgICAgKyAoYSA9PT0gMSA/ICIpIiA6ICIsICIgKyBhICsgIikiKTsKICAgICAgfQogICAgfSkpOwoKICAgIC8qIEZyb20gRnZEIDEzLjM3LCBDU1MgQ29sb3IgTW9kdWxlIExldmVsIDMgKi8KICAgIGZ1bmN0aW9uIGhzbDJyZ2IoaCwgbTEsIG0yKSB7CiAgICAgIHJldHVybiAoaCA8IDYwID8gbTEgKyAobTIgLSBtMSkgKiBoIC8gNjAKICAgICAgICAgIDogaCA8IDE4MCA/IG0yCiAgICAgICAgICA6IGggPCAyNDAgPyBtMSArIChtMiAtIG0xKSAqICgyNDAgLSBoKSAvIDYwCiAgICAgICAgICA6IG0xKSAqIDI1NTsKICAgIH0KCiAgICBmdW5jdGlvbiBiYXNpcyh0MSwgdjAsIHYxLCB2MiwgdjMpIHsKICAgICAgdmFyIHQyID0gdDEgKiB0MSwgdDMgPSB0MiAqIHQxOwogICAgICByZXR1cm4gKCgxIC0gMyAqIHQxICsgMyAqIHQyIC0gdDMpICogdjAKICAgICAgICAgICsgKDQgLSA2ICogdDIgKyAzICogdDMpICogdjEKICAgICAgICAgICsgKDEgKyAzICogdDEgKy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gZ2FtbWEoeSkgewogICAgICByZXR1cm4gKHkgPSAreSkgPT09IDEgPyBub2dhbW1hIDogZnVuY3Rpb24oYSwgYikgewogICAgICAgIHJldHVybiBiIC0gYSA/IGV4cG9uZW50aWFsKGEsIGIsIHkpIDogY29uc3RhbnQkMihpc05hTihhKSA/IGIgOiBhKTsKICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiBub2dhbW1hKGEsIGIpIHsKICAgICAgdmFyIGQgPSBiIC0gYTsKICAgICAgcmV0dXJuIGQgPyBsaW5lYXIoYSwgZCkgOiBjb25zdGFudCQyKGlzTmFOKGEpID8gYiA6IGEpOwogICAgfQoKICAgIHZhciBpbnRlcnBvbGF0ZVJnYiA9IChmdW5jdGlvbiByZ2JHYW1tYSh5KSB7CiAgICAgIHZhciBjb2xvciA9IGdhbW1hKHkpOwoKICAgICAgZnVuY3Rpb24gcmdiJDEoc3RhcnQsIGVuZCkgewogICAgICAgIHZhciByID0gY29sb3IoKHN0YXJ0ID0gcmdiKHN0YXJ0KSkuciwgKGVuZCA9IHJnYihlbmQpKS5yKSwKICAgICAgICAgICAgZyA9IGNvbG9yKHN0YXJ0LmcsIGVuZC5nKSwKICAgICAgICAgICAgYiA9IGNvbG9yKHN0YXJ0LmIsIGVuZC5iKSwKICAgICAgICAgICAgb3BhY2l0eSA9IG5vZ2FtbWEoc3RhcnQub3BhY2l0eSwgZW5kLm9wYWNpdHkpOwogICAgICAgIHJldHVybiBmdW5jdGlvbih0KSB7CiAgICAgICAgICBzdGFydC5yID0gcih0KTsKICAgICAgICAgIHN0YXJ0LmcgPSBnKHQpOwogICAgICAgICAgc3RhcnQuYiA9IGIodCk7CiAgICAgICAgICBzdGFydC5vcGFjaXR5ID0gb3BhY2l0eSh0KTsKICAgICAgICAgIHJldHVybiBzdGFydCArICIiOwogICAgICAgIH07CiAgICAgIH0KCiAgICAgIHJnYiQxLmdhbW1hID0gcmdiR2FtbWE7CgogICAgICByZXR1cm4gcmdiJDE7CiAgICB9KSgxKTsKCiAgICBmdW5jdGlvbiByZ2JTcGxpbmUoc3BsaW5lKSB7CiAgICAgIHJldHVybiBmdW5jdGlvbihjb2xvcnMpIHsKICAgICAgICB2YXIgbiA9IGNvbG9ycy5sZW5ndGgsCiAgICAgICAgICAgIHIgPSBuZXcgQXJyYXkobiksCiAgICAgICAgICAgIGcgPSBuZXcgQXJyYXkobiksCiAgICAgICAgICAgIGIgPSBuZXcgQXJyYXkobiksCiAgICAgICAgICAgIGksIGNvbG9yOwogICAgICAgIGZvciAoaSA9IDA7IGkgPCBuOyArK2kpIHsKICAgICAgICAgIGNvbG9yID0gcmdiKGNvbG9yc1tpXSk7CiAgICAgICAgICByW2ldID0gY29sb3IuciB8fCAwOwogICAgICAgICAgZ1tpXSA9IGNvbG9yLmcgfHwgMDsKICAgICAgICAgIGJbaV0gPSBjb2xvci5iIHx8IDA7CiAgICAgICAgfQogICAgICAgIHIgPSBzcGxpbmUocik7CiAgICAgICAgZyA9IHNwbGluZShnKTsKICAgICAgICBiID0gc3BsaW5lKGIpOwogICAgICAgIGNvbG9yLm9wYWNpdHkgPSAxOwogICAgICAgIHJldHVybiBmdW5jdGlvbih0KSB7CiAgICAgICAgICBjb2xvci5yID0gcih0KTsKICAgICAgICAgIGNvbG9yLmcgPSBnKHQpOwogICAgICAgICAgY29sb3IuYiA9IGIodCk7CiAgICAgICAgICByZXR1cm4gY29sb3IgKyAiIjsKICAgICAgICB9OwogICAgICB9OwogICAgfQoKICAgIHZhciByZ2JCYXNpcyA9IHJnYlNwbGluZShiYXNpcyQxKTsKCiAgICBmdW5jdGlvbiBudW1iZXJBcnJheShhLCBiKSB7CiAgICAgIGlmICghYikgYiA9IFtdOwogICAgICB2YXIgbiA9IGEgPyBNYXRoLm1pbihiLmxlbmd0aCwgYS5sZW5ndGgpIDogMCwKICAgICAgICAgIGMgPSBiLnNsaWNlKCksCiAgICAgICAgICBpOwogICAgICByZXR1cm4gZnVuY3Rpb24odCkgewogICAgICAgIGZvciAoaSA9IDA7IGkgPCBuOyArK2kpIGNbaV0gPSBhW2ldICogKDEgLSB0KSArIGJbaV0gKiB0OwogICAgICAgIHJldHVybiBjOwogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIGlzTnVtYmVyQXJyYXkoeCkgewogICAgICByZXR1cm4gQXJyYXlCdWZmZXIuaXNWaWV3KHgpICYmICEoeCBpbnN0YW5jZW9mIERhdGFWaWV3KTsKICAgIH0KCiAgICBmdW5jdGlvbiBnZW5lcmljQXJyYXkoYSwgYikgewogICAgICB2YXIgbmIgPSBiID8gYi5sZW5ndGggOiAwLAogICAgICAgICAgbmEgPSBhID8gTWF0aC5taW4obmIsIGEubGVuZ3RoKSA6IDAsCiAgICAgICAgICB4ID0gbmV3IEFycmF5KG5hKSwKICAgICAgICAgIGMgPSBuZXcgQXJyYXkobmIpLAogICAgICAgICAgaTsKCiAgICAgIGZvciAoaSA9IDA7IGkgPCBuYTsgKytpKSB4W2ldID0gaW50ZXJwb2xhdGVWYWx1ZShhW2ldLCBiW2ldKTsKICAgICAgZm9yICg7IGkgPCBuYjsgKytpKSBjW2ldID0gYltpXTsKCiAgICAgIHJldHVybiBmdW5jdGlvbih0KSB7CiAgICAgICAgZm9yIChpID0gMDsgaSA8IG5hOyArK2kpIGNbaV0gPSB4W2ldKHQpOwogICAgICAgIHJldHVybiBjOwogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIGRhdGUoYSwgYikgewogICAgICB2YXIgZCA9IG5ldyBEYXRlOwogICAgICByZXR1cm4gYSA9ICthLCBiID0gK2IsIGZ1bmN0aW9uKHQpIHsKICAgICAgICByZXR1cm4gZC5zZXRUaW1lKGEgKiAoMSAtIHQpICsgYiAqIHQpLCBkOwogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIGludGVycG9sYXRlTnVtYmVyKGEsIGIpIHsKICAgICAgcmV0dXJuIGEgPSArYSwgYiA9ICtiLCBmdW5jdGlvbih0KSB7CiAgICAgICAgcmV0dXJuIGEgKiAoMSAtIHQpICsgYiAqIHQ7CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gb2JqZWN0KGEsIGIpIHsKICAgICAgdmFyIGkgPSB7fSwKICAgICAgICAgIGMgPSB7fSwKICAgICAgICAgIGs7CgogICAgICBpZiAoYSA9PT0gbnVsbCB8fCB0eXBlb2YgYSAhPT0gIm9iamVjdCIpIGEgPSB7fTsKICAgICAgaWYgKGIgPT09IG51bGwgfHwgdHlwZW9mIGIgIT09ICJvYmplY3QiKSBiID0ge307CgogICAgICBmb3IgKGsgaW4gYikgewogICAgICAgIGlmIChrIGluIGEpIHsKICAgICAgICAgIGlba10gPSBpbnRlcnBvbGF0ZVZhbHVlKGFba10sIGJba10pOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICBjW2tdID0gYltrXTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIHJldHVybiBmdW5jdGlvbih0KSB7CiAgICAgICAgZm9yIChrIGluIGkpIGNba10gPSBpW2tdKHQpOwogICAgICAgIHJldHVybiBjOwogICAgICB9OwogICAgfQoKICAgIHZhciByZUEgPSAvWy0rXT8oPzpcZCtcLj9cZCp8XC4/XGQrKSg/OltlRV1bLStdP1xkKyk/L2csCiAgICAgICAgcmVCID0gbmV3IFJlZ0V4cChyZUEuc291cmNlLCAiZyIpOwoKICAgIGZ1bmN0aW9uIHplcm8oYikgewogICAgICByZXR1cm4gZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuIGI7CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gb25lKGIpIHsKICAgICAgcmV0dXJuIGZ1bmN0aW9uKHQpIHsKICAgICAgICByZXR1cm4gYih0KSArICIiOwogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIGludGVycG9sYXRlU3RyaW5nKGEsIGIpIHsKICAgICAgdmFyIGJpID0gcmVBLmxhc3RJbmRleCA9IHJlQi5sYXN0SW5kZXggPSAwLCAvLyBzY2FuIGluZGV4IGZvciBuZXh0IG51bWJlciBpbiBiCiAgICAgICAgICBhbSwgLy8gY3VycmVudCBtYXRjaCBpbiBhCiAgICAgICAgICBibSwgLy8gY3VycmVudCBtYXRjaCBpbiBiCiAgICAgICAgICBicywgLy8gc3RyaW5nIHByZWNlZGluZyBjdXJyZW50IG51bWJlciBpbiBiLCBpZiBhbnkKICAgICAgICAgIGkgPSAtMSwgLy8gaW5kZXggaW4gcwogICAgICAgICAgcyA9IFtdLCAvLyBzdHJpbmcgY29uc3RhbnRzIGFuZCBwbGFjZWhvbGRlcnMKICAgICAgICAgIHEgPSBbXTsgLy8gbnVtYmVyIGludGVycG9sYXRvcnMKCiAgICAgIC8vIENvZXJjZSBpbnB1dHMgdG8gc3RyaW5ncy4KICAgICAgYSA9IGEgKyAiIiwgYiA9IGIgKyAiIjsKCiAgICAgIC8vIEludGVycG9sYXRlIHBhaXJzIG9mIG51bWJlcnMgaW4gYSAmIGIuCiAgICAgIHdoaWxlICgoYW0gPSByZUEuZXhlYyhhKSkKICAgICAgICAgICYmIChibSA9IHJlQi5leGVjKGIpKSkgewogICAgICAgIGlmICgoYnMgPSBibS5pbmRleCkgPiBiaSkgeyAvLyBhIHN0cmluZyBwcmVjZWRlcyB0aGUgbmV4dCBudW1iZXIgaW4gYgogICAgICAgICAgYnMgPSBiLnNsaWNlKGJpLCBicyk7CiAgICAgICAgICBpZiAoc1tpXSkgc1tpXSArPSBiczsgLy8gY29hbGVzY2Ugd2l0aCBwcmV2aW91cyBzdHJpbmcKICAgICAgICAgIGVsc2Ugc1srK2ldID0gYnM7CiAgICAgICAgfQogICAgICAgIGlmICgoYW0gPSBhbVswXSkgPT09IChibSA9IGJtWzBdKSkgeyAvLyBudW1iZXJzIGluIGEgJiBiIG1hdGNoCiAgICAgICAgICBpZiAoc1tpXSkgc1tpXSArPSBibTsgLy8gY29hbGVzY2Ugd2l0aCBwcmV2aW91cyBzdHJpbmcKICAgICAgICAgIGVsc2Ugc1srK2ldID0gYm07CiAgICAgICAgfSBlbHNlIHsgLy8gaW50ZXJwb2xhdGUgbm9uLW1hdGNoaW5nIG51bWJlcnMKICAgICAgICAgIHNbKytpXSA9IG51bGw7CiAgICAgICAgICBxLnB1c2goe2k6IGksIHg6IGludGVycG9sYXRlTnVtYmVyKGFtLCBibSl9KTsKICAgICAgICB9CiAgICAgICAgYmkgPSByZUIubGFzdEluZGV4OwogICAgICB9CgogICAgICAvLyBBZGQgcmVtYWlucyBvZiBiLgogICAgICBpZiAoYmkgPCBiLmxlbmd0aCkgewogICAgICAgIGJzID0gYi5zbGljZShiaSk7CiAgICAgICAgaWYgKHNbaV0pIHNbaV0gKz0gYnM7IC8vIGNvYWxlc2NlIHdpdGggcHJldmlvdXMgc3RyaW5nCiAgICAgICAgZWxzZSBzWysraV0gPSBiczsKICAgICAgfQoKICAgICAgLy8gU3BlY2lhbCBvcHRpbWl6YXRpb24gZm9yIG9ubHkgYSBzaW5nbGUgbWF0Y2guCiAgICAgIC8vIE90aGVyd2lzZSwgaW50ZXJwb2xhdGUgZWFjaCBvZiB0aGUgbnVtYmVycyBhbmQgcmVqb2luIHRoZSBzdHJpbmcuCiAgICAgIHJldHVybiBzLmxlbmd0aCA8IDIgPyAocVswXQogICAgICAgICAgPyBvbmUocVswXS54KQogICAgICAgICAgOiB6ZXJvKGIpKQogICAgICAgICAgOiAoYiA9IHEubGVuZ3RoLCBmdW5jdGlvbih0KSB7CiAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDAsIG87IGkgPCBiOyArK2kpIHNbKG8gPSBxW2ldKS5pXSA9IG8ueCh0KTsKICAgICAgICAgICAgICByZXR1cm4gcy5qb2luKCIiKTsKICAgICAgICAgICAgfSk7CiAgICB9CgogICAgZnVuY3Rpb24gaW50ZXJwb2xhdGVWYWx1ZShhLCBiKSB7CiAgICAgIHZhciB0ID0gdHlwZW9mIGIsIGM7CiAgICAgIHJldHVybiBiID09IG51bGwgfHwgdCA9PT0gImJvb2xlYW4iID8gY29uc3RhbnQkMihiKQogICAgICAgICAgOiAodCA9PT0gIm51bWJlciIgPyBpbnRlcnBvbGF0ZU51bWJlcgogICAgICAgICAgOiB0ID09PSAic3RyaW5nIiA/ICgoYyA9IGNvbG9yKGIpKSA/IChiID0gYywgaW50ZXJwb2xhdGVSZ2IpIDogaW50ZXJwb2xhdGVTdHJpbmcpCiAgICAgICAgICA6IGIgaW5zdGFuY2VvZiBjb2xvciA/IGludGVycG9sYXRlUmdiCiAgICAgICAgICA6IGIgaW5zdGFuY2VvZiBEYXRlID8gZGF0ZQogICAgICAgICAgOiBpc051bWJlckFycmF5KGIpID8gbnVtYmVyQXJyYXkKICAgICAgICAgIDogQXJyYXkuaXNBcnJheShiKSA/IGdlbmVyaWNBcnJheQogICAgICAgICAgOiB0eXBlb2YgYi52YWx1ZU9mICE9PSAiZnVuY3Rpb24iICYmIHR5cGVvZiBiLnRvU3RyaW5nICE9PSAiZnVuY3Rpb24iIHx8IGlzTmFOKGIpID8gb2JqZWN0CiAgICAgICAgICA6IGludGVycG9sYXRlTnVtYmVyKShhLCBiKTsKICAgIH0KCiAgICBmdW5jdGlvbiBpbnRlcnBvbGF0ZVJvdW5kKGEsIGIpIHsKICAgICAgcmV0dXJuIGEgPSArYSwgYiA9ICtiLCBmdW5jdGlvbih0KSB7CiAgICAgICAgcmV0dXJuIE1hdGgucm91bmQoYSAqICgxIC0gdCkgKyBiICogdCk7CiAgICAgIH07CiAgICB9CgogICAgdmFyIGRlZ3JlZXMgPSAxODAgLyBNYXRoLlBJOwoKICAgIHZhciBpZGVudGl0eSQzID0gewogICAgICB0cmFuc2xhdGVYOiAwLAogICAgICB0cmFuc2xhdGVZOiAwLAogICAgICByb3RhdGU6IDAsCiAgICAgIHNrZXdYOiAwLAogICAgICBzY2FsZVg6IDEsCiAgICAgIHNjYWxlWTogMQogICAgfTsKCiAgICBmdW5jdGlvbiBkZWNvbXBvc2UoYSwgYiwgYywgZCwgZSwgZikgewogICAgICB2YXIgc2NhbGVYLCBzY2FsZVksIHNrZX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oID8gcy5wb3AoKSArICIgIiA6ICIiOwogICAgICB9CgogICAgICBmdW5jdGlvbiB0cmFuc2xhdGUoeGEsIHlhLCB4YiwgeWIsIHMsIHEpIHsKICAgICAgICBpZiAoeGEgIT09IHhiIHx8IHlhICE9PSB5YikgewogICAgICAgICAgdmFyIGkgPSBzLnB1c2goInRyYW5zbGF0ZSgiLCBudWxsLCBweENvbW1hLCBudWxsLCBweFBhcmVuKTsKICAgICAgICAgIHEucHVzaCh7aTogaSAtIDQsIHg6IGludGVycG9sYXRlTnVtYmVyKHhhLCB4Yil9LCB7aTogaSAtIDIsIHg6IGludGVycG9sYXRlTnVtYmVyKHlhLCB5Yil9KTsKICAgICAgICB9IGVsc2UgaWYgKHhiIHx8IHliKSB7CiAgICAgICAgICBzLnB1c2goInRyYW5zbGF0ZSgiICsgeGIgKyBweENvbW1hICsgeWIgKyBweFBhcmVuKTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIHJvdGF0ZShhLCBiLCBzLCBxKSB7CiAgICAgICAgaWYgKGEgIT09IGIpIHsKICAgICAgICAgIGlmIChhIC0gYiA+IDE4MCkgYiArPSAzNjA7IGVsc2UgaWYgKGIgLSBhID4gMTgwKSBhICs9IDM2MDsgLy8gc2hvcnRlc3QgcGF0aAogICAgICAgICAgcS5wdXNoKHtpOiBzLnB1c2gocG9wKHMpICsgInJvdGF0ZSgiLCBudWxsLCBkZWdQYXJlbikgLSAyLCB4OiBpbnRlcnBvbGF0ZU51bWJlcihhLCBiKX0pOwogICAgICAgIH0gZWxzZSBpZiAoYikgewogICAgICAgICAgcy5wdXNoKHBvcChzKSArICJyb3RhdGUoIiArIGIgKyBkZWdQYXJlbik7CiAgICAgICAgfQogICAgICB9CgogICAgICBmdW5jdGlvbiBza2V3WChhLCBiLCBzLCBxKSB7CiAgICAgICAgaWYgKGEgIT09IGIpIHsKICAgICAgICAgIHEucHVzaCh7aTogcy5wdXNoKHBvcChzKSArICJza2V3WCgiLCBudWxsLCBkZWdQYXJlbikgLSAyLCB4OiBpbnRlcnBvbGF0ZU51bWJlcihhLCBiKX0pOwogICAgICAgIH0gZWxzZSBpZiAoYikgewogICAgICAgICAgcy5wdXNoKHBvcChzKSArICJza2V3WCgiICsgYiArIGRlZ1BhcmVuKTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIHNjYWxlKHhhLCB5YSwgeGIsIHliLCBzLCBxKSB7CiAgICAgICAgaWYgKHhhICE9PSB4YiB8fCB5YSAhPT0geWIpIHsKICAgICAgICAgIHZhciBpID0gcy5wdXNoKHBvcChzKSArICJzY2FsZSgiLCBudWxsLCAiLCIsIG51bGwsICIpIik7CiAgICAgICAgICBxLnB1c2goe2k6IGkgLSA0LCB4OiBpbnRlcnBvbGF0ZU51bWJlcih4YSwgeGIpfSwge2k6IGkgLSAyLCB4OiBpbnRlcnBvbGF0ZU51bWJlcih5YSwgeWIpfSk7CiAgICAgICAgfSBlbHNlIGlmICh4YiAhPT0gMSB8fCB5YiAhPT0gMSkgewogICAgICAgICAgcy5wdXNoKHBvcChzKSArICJzY2FsZSgiICsgeGIgKyAiLCIgKyB5YiArICIpIik7CiAgICAgICAgfQogICAgICB9CgogICAgICByZXR1cm4gZnVuY3Rpb24oYSwgYikgewogICAgICAgIHZhciBzID0gW10sIC8vIHN0cmluZyBjb25zdGFudHMgYW5kIHBsYWNlaG9sZGVycwogICAgICAgICAgICBxID0gW107IC8vIG51bWJlciBpbnRlcnBvbGF0b3JzCiAgICAgICAgYSA9IHBhcnNlKGEpLCBiID0gcGFyc2UoYik7CiAgICAgICAgdHJhbnNsYXRlKGEudHJhbnNsYXRlWCwgYS50cmFuc2xhdGVZLCBiLnRyYW5zbGF0ZVgsIGIudHJhbnNsYXRlWSwgcywgcSk7CiAgICAgICAgcm90YXRlKGEucm90YXRlLCBiLnJvdGF0ZSwgcywgcSk7CiAgICAgICAgc2tld1goYS5za2V3WCwgYi5za2V3WCwgcywgcSk7CiAgICAgICA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lYWQgPSB0aGlzOwogICAgICAgICAgdGFza1RhaWwgPSB0aGlzOwogICAgICAgIH0KICAgICAgICB0aGlzLl9jYWxsID0gY2FsbGJhY2s7CiAgICAgICAgdGhpcy5fdGltZSA9IHRpbWU7CiAgICAgICAgc2xlZXAoKTsKICAgICAgfSwKICAgICAgc3RvcDogZnVuY3Rpb24oKSB7CiAgICAgICAgaWYgKHRoaXMuX2NhbGwpIHsKICAgICAgICAgIHRoaXMuX2NhbGwgPSBudWxsOwogICAgICAgICAgdGhpcy5fdGltZSA9IEluZmluaXR5OwogICAgICAgICAgc2xlZXAoKTsKICAgICAgICB9CiAgICAgIH0KICAgIH07CgogICAgZnVuY3Rpb24gdGltZXIkMShjYWxsYmFjaywgZGVsYXksIHRpbWUpIHsKICAgICAgdmFyIHQgPSBuZXcgVGltZXI7CiAgICAgIHQucmVzdGFydChjYWxsYmFjaywgZGVsYXksIHRpbWUpOwogICAgICByZXR1cm4gdDsKICAgIH0KCiAgICBmdW5jdGlvbiB0aW1lckZsdXNoKCkgewogICAgICBub3coKTsgLy8gR2V0IHRoZSBjdXJyZW50IHRpbWUsIGlmIG5vdCBhbHJlYWR5IHNldC4KICAgICAgKytmcmFtZTsgLy8gUHJldGVuZCB3ZeKAmXZlIHNldCBhbiBhbGFybSwgaWYgd2UgaGF2ZW7igJl0IGFscmVhZHkuCiAgICAgIHZhciB0ID0gdGFza0hlYWQsIGU7CiAgICAgIHdoaWxlICh0KSB7CiAgICAgICAgaWYgKChlID0gY2xvY2tOb3cgLSB0Ll90aW1lKSA+PSAwKSB0Ll9jYWxsLmNhbGwobnVsbCwgZSk7CiAgICAgICAgdCA9IHQuX25leHQ7CiAgICAgIH0KICAgICAgLS1mcmFtZTsKICAgIH0KCiAgICBmdW5jdGlvbiB3YWtlKCkgewogICAgICBjbG9ja05vdyA9IChjbG9ja0xhc3QgPSBjbG9jay5ub3coKSkgKyBjbG9ja1NrZXc7CiAgICAgIGZyYW1lID0gdGltZW91dCA9IDA7CiAgICAgIHRyeSB7CiAgICAgICAgdGltZXJGbHVzaCgpOwogICAgICB9IGZpbmFsbHkgewogICAgICAgIGZyYW1lID0gMDsKICAgICAgICBuYXAoKTsKICAgICAgICBjbG9ja05vdyA9IDA7CiAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiBwb2tlKCkgewogICAgICB2YXIgbm93ID0gY2xvY2subm93KCksIGRlbGF5ID0gbm93IC0gY2xvY2tMYXN0OwogICAgICBpZiAoZGVsYXkgPiBwb2tlRGVsYXkpIGNsb2NrU2tldyAtPSBkZWxheSwgY2xvY2tMYXN0ID0gbm93OwogICAgfQoKICAgIGZ1bmN0aW9uIG5hcCgpIHsKICAgICAgdmFyIHQwLCB0MSA9IHRhc2tIZWFkLCB0MiwgdGltZSA9IEluZmluaXR5OwogICAgICB3aGlsZSAodDEpIHsKICAgICAgICBpZiAodDEuX2NhbGwpIHsKICAgICAgICAgIGlmICh0aW1lID4gdDEuX3RpbWUpIHRpbWUgPSB0MS5fdGltZTsKICAgICAgICAgIHQwID0gdDEsIHQxID0gdDEuX25leHQ7CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgIHQyID0gdDEuX25leHQsIHQxLl9uZXh0ID0gbnVsbDsKICAgICAgICAgIHQxID0gdDAgPyB0MC5fbmV4dCA9IHQyIDogdGFza0hlYWQgPSB0MjsKICAgICAgICB9CiAgICAgIH0KICAgICAgdGFza1RhaWwgPSB0MDsKICAgICAgc2xlZXAodGltZSk7CiAgICB9CgogICAgZnVuY3Rpb24gc2xlZXAodGltZSkgewogICAgICBpZiAoZnJhbWUpIHJldHVybjsgLy8gU29vbmVzdCBhbGFybSBhbHJlYWR5IHNldCwgb3Igd2lsbCBiZS4KICAgICAgaWYgKHRpbWVvdXQpIHRpbWVvdXQgPSBjbGVhclRpbWVvdXQodGltZW91dCk7CiAgICAgIHZhciBkZWxheSA9IHRpbWUgLSBjbG9ja05vdzsgLy8gU3RyaWN0bHkgbGVzcyB0aGFuIGlmIHdlIHJ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YXRpb24pIDogKHNlbGYudGltZXIucmVzdGFydChzdG9wKSwgc2VsZi5zdGF0ZSA9IEVORElORywgMSksCiAgICAgICAgICAgIGkgPSAtMSwKICAgICAgICAgICAgbiA9IHR3ZWVuLmxlbmd0aDsKCiAgICAgICAgd2hpbGUgKCsraSA8IG4pIHsKICAgICAgICAgIHR3ZWVuW2ldLmNhbGwobm9kZSwgdCk7CiAgICAgICAgfQoKICAgICAgICAvLyBEaXNwYXRjaCB0aGUgZW5kIGV2ZW50LgogICAgICAgIGlmIChzZWxmLnN0YXRlID09PSBFTkRJTkcpIHsKICAgICAgICAgIHNlbGYub24uY2FsbCgiZW5kIiwgbm9kZSwgbm9kZS5fX2RhdGFfXywgc2VsZi5pbmRleCwgc2VsZi5ncm91cCk7CiAgICAgICAgICBzdG9wKCk7CiAgICAgICAgfQogICAgICB9CgogICAgICBmdW5jdGlvbiBzdG9wKCkgewogICAgICAgIHNlbGYuc3RhdGUgPSBFTkRFRDsKICAgICAgICBzZWxmLnRpbWVyLnN0b3AoKTsKICAgICAgICBkZWxldGUgc2NoZWR1bGVzW2lkXTsKICAgICAgICBmb3IgKHZhciBpIGluIHNjaGVkdWxlcykgcmV0dXJuOyAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIG5vLXVudXNlZC12YXJzCiAgICAgICAgZGVsZXRlIG5vZGUuX190cmFuc2l0aW9uOwogICAgICB9CiAgICB9CgogICAgZnVuY3Rpb24gaW50ZXJydXB0KG5vZGUsIG5hbWUpIHsKICAgICAgdmFyIHNjaGVkdWxlcyA9IG5vZGUuX190cmFuc2l0aW9uLAogICAgICAgICAgc2NoZWR1bGUsCiAgICAgICAgICBhY3RpdmUsCiAgICAgICAgICBlbXB0eSA9IHRydWUsCiAgICAgICAgICBpOwoKICAgICAgaWYgKCFzY2hlZHVsZXMpIHJldHVybjsKCiAgICAgIG5hbWUgPSBuYW1lID09IG51bGwgPyBudWxsIDogbmFtZSArICIiOwoKICAgICAgZm9yIChpIGluIHNjaG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iBhbmQgd2XigJlyZSBkb25lIQogICAgICAgIC8vIE90aGVyd2lzZSwgY29weS1vbi13cml0ZS4KICAgICAgICBpZiAodHdlZW4gIT09IHR3ZWVuMCkgewogICAgICAgICAgdHdlZW4xID0gdHdlZW4wID0gdHdlZW47CiAgICAgICAgICBmb3IgKHZhciBpID0gMCwgbiA9IHR3ZWVuMS5sZW5ndGg7IGkgPCBuOyArK2kpIHsKICAgICAgICAgICAgaWYgKHR3ZWVuMVtpXS5uYW1lID09PSBuYW1lKSB7CiAgICAgICAgICAgICAgdHdlZW4xID0gdHdlZW4xLnNsaWNlKCk7CiAgICAgICAgICAgICAgdHdlZW4xLnNwbGljZShpLCAxKTsKICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgc2NoZWR1bGUudHdlZW4gPSB0d2VlbjE7CiAgICAgIH07CiAgICB9CgogICAgZnVuY3Rpb24gdHdlZW5GdW5jdGlvbihpZCwgbmFtZSwgdmFsdWUpIHsKICAgICAgdmFyIHR3ZWVuMCwgdHdlZW4xOwogICAgICBpZiAodHlwZW9mIHZhbHVlICE9PSAiZnVuY3Rpb24iKSB0aHJvdyBuZXcgRXJyb3I7CiAgICAgIHJldHVybiBmdW5jdGlvbigpIHsKICAgICAgICB2YXIgc2NoZWR1bGUgPSBzZXQkMSh0aGlzLCBpZCksCiAgICAgICAgICAgIHR3ZWVuID0gc2NoZWR1bGUudHdlZW47CgogICAgICAgIC8vIElmIHRoaXMgbm9kZSBzaGFyZWQgdHdlZW4gd2l0aCB0aGUgcHJldmlvdXMgbm9kZSwKICAgICAgICAvLyBqdXN0IGFzc2lnbiB0aGUgdXBkYXRlZCBzaGFyZWQgdHdlZW4gYW5kIHdl4oCZcmUgZG9uZSEKICAgICAgICAvLyBPdGhlcndpc2UsIGNvcHktb24td3JpdGUuCiAgICAgICAgaWYgKHR3ZWVuICE9PSB0d2VlbjApIHsKICAgICAgICAgIHR3ZWVuM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ZHVsZShzdWJncm91cFtpXSwgbmFtZSwgaWQsIGksIHN1Ymdyb3VwLCBnZXQkMShub2RlLCBpZCkpOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQoKICAgICAgcmV0dXJuIG5ldyBUcmFuc2l0aW9uKHN1Ymdyb3VwcywgdGhpcy5fcGFyZW50cywgbmFtZSwgaWQpOwogICAgfQoKICAgIGZ1bmN0aW9uIHRyYW5zaXRpb25fc2VsZWN0QWxsKHNlbGVjdCkgewogICAgICB2YXIgbmFtZSA9IHRoaXMuX25hbWUsCiAgICAgICAgICBpZCA9IHRoaXMuX2lkOwoKICAgICAgaWYgKHR5cGVvZiBzZWxlY3QgIT09ICJmdW5jdGlvbiIpIHNlbGVjdCA9IHNlbGVjdG9yQWxsKHNlbGVjdCk7CgogICAgICBmb3IgKHZhciBncm91cHMgPSB0aGlzLl9ncm91cHMsIG0gPSBncm91cHMubGVuZ3RoLCBzdWJncm91cHMgPSBbXSwgcGFyZW50cyA9IFtdLCBqID0gMDsgaiA8IG07ICsraikgewogICAgICAgIGZvciAodmFyIGdyb3VwID0gZ3JvdXBzW2pdLCBuID0gZ3JvdXAubGVuZ3RoLCBub2RlLCBpID0gMDsgaSA8IG47ICsraSkgewogICAgICAgICAgaWYgKG5vZGUgPSBncm91cFtpXSkgewogICAgICAgICAgICBmb3IgKHZhciBjaGlsZHJlbiA9IHNlbGVjdC5jYWxsKG5vZGUsIG5vZGUuX19kYXRhX18sIGksIGdyb3VwKSwgY2hpbGQsIGluaGVyaXQgPSBnZXQkMShub2RlLCBpZCksIGsgPSAwLCBsID0gY2hpbGRyZW4ubGVuZ3RoOyBrIDwgbDsgKytrKSB7CiAgICAgICAgICAgICAgaWYgKGNoaWxkID0gY2hpbGRyZW5ba10pIHsKICAgICAgICAgICAgICAgIHNjaGVkdWxlKGNoaWxkLCBuYW1lLCBpZCwgaywgY2hpbGRyZW4sIGluaGVyaXQpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBzdWJncm91cHMucHVzaChjaGlsZHJlbik7CiAgICAgICAgICAgIHBhcmVudHMucHVzaChub2RlKTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KCiAgICAgIHJldHVybiBuZXcgVHJhbnNpdGlvbihzdWJncm91cHMsIHBhcmVudHMsIG5hbWUsIGlkKTsKICAgIH0KCiAgICB2YXIgU2VsZWN0aW9uJDEgPSBzZWxlY3Rpb24ucHJvdG90eXBlLmNvbnN0cnVjdG9yOwoKICAgIGZ1bmN0aW9uIHRyYW5zaXRpb25fc2VsZWN0aW9uKCkgewogICAgICByZXR1cm4gbmV3IFNlbGVjdGlvbiQxKHRoaXMuX2dyb3VwcywgdGhpcy5fcGFyZW50cyk7CiAgICB9CgogICAgZnVuY3Rpb24gc3R5bGVOdWxsKG5hbWUsIGludGVycG9sYXRlKSB7CiAgICAgIHZhciBzdHJpbmcwMCwKICAgICAgICAgIHN0cmluZzEwLAogICAgICAgICAgaW50ZXJwb2xhdGUwOwogICAgICByZXR1cm4gZnVuY3Rpb24oKSB7CiAgICAgICAgdmFyIHN0cmluZzAgPSBzdHlsZVZhbHVlKHRoaXMsIG5hbWUpLAogICAgICAgICAgICBzdHJpbmcxID0gKHRoaXMuc3R5bGUucmVtb3ZlUHJvcGVydHkobmFtZSksIHN0eWxlVmFsdWUodGhpcywgbmFtZSkpOwogICAgICAgIHJldHVybiBzdHJpbmcwID09PSBzdHJpbmcxID8gbnVsbAogICAgICAgICAgICA6IHN0cmluZzAgPT09IHN0cmluZzAwICYmIHN0cmluZzEgPT09IHN0cmluZzEwID8gaW50ZXJwb2xhdGUwCiAgICAgICAgICAgIDogaW50ZXJwb2xhdGUwID0gaW50ZXJwb2xhdGUoc3RyaW5nMDAgPSBzdHJpbmcwLCBzdHJpbmcxMCA9IHN0cmluZzEpOwogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIHN0eWxlUmVtb3ZlJDEobmFtZSkgewogICAgICByZXR1cm4gZnVuY3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Ghpcy50d2VlbihrZXkpKSAmJiBrZXkuX3ZhbHVlOwogICAgICBpZiAodmFsdWUgPT0gbnVsbCkgcmV0dXJuIHRoaXMudHdlZW4oa2V5LCBudWxsKTsKICAgICAgaWYgKHR5cGVvZiB2YWx1ZSAhPT0gImZ1bmN0aW9uIikgdGhyb3cgbmV3IEVycm9yOwogICAgICByZXR1cm4gdGhpcy50d2VlbihrZXksIHRleHRUd2Vlbih2YWx1ZSkpOwogICAgfQoKICAgIGZ1bmN0aW9uIHRyYW5zaXRpb25fdHJhbnNpdGlvbigpIHsKICAgICAgdmFyIG5hbWUgPSB0aGlzLl9uYW1lLAogICAgICAgICAgaWQwID0gdGhpcy5faWQsCiAgICAgICAgICBpZDEgPSBuZXdJZCgpOwoKICAgICAgZm9yICh2YXIgZ3JvdXBzID0gdGhpcy5fZ3JvdXBzLCBtID0gZ3JvdXBzLmxlbmd0aCwgaiA9IDA7IGogPCBtOyArK2opIHsKICAgICAgICBmb3IgKHZhciBncm91cCA9IGdyb3Vwc1tqXSwgbiA9IGdyb3VwLmxlbmd0aCwgbm9kZSwgaSA9IDA7IGkgPCBuOyArK2kpIHsKICAgICAgICAgIGlmIChub2RlID0gZ3JvdXBbaV0pIHsKICAgICAgICAgICAgdmFyIGluaGVyaXQgPSBnZXQkMShub2RlLCBpZDApOwogICAgICAgICAgICBzY2hlZHVsZShub2RlLCBuYW1lLCBpZDEsIGksIGdyb3VwLCB7CiAgICAgICAgICAgICAgdGltZTogaW5oZXJpdC50aW1lICsgaW5oZXJpdC5kZWxheSArIGluaGVyaXQuZHVyYXRpb24sCiAgICAgICAgICAgICAgZGVsYXk6IDAsCiAgICAgICAgICAgICAgZHVyYXRpb246IGluaGVyaXQuZHVyYXRpb24sCiAgICAgICAgICAgICAgZWFzZTogaW5oZXJpdC5lYXNlCiAgICAgICAgICAgIH0pOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQoKICAgICAgcmV0dXJuIG5ldyBUcmFuc2l0aW9uKGdy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mcgPSB0aW1pbmdbaWRdKSkgewogICAgICAgIGlmICghKG5vZGUgPSBub2RlLnBhcmVudE5vZGUpKSB7CiAgICAgICAgICByZXR1cm4gZGVmYXVsdFRpbWluZy50aW1lID0gbm93KCksIGRlZmF1bHRUaW1pbmc7CiAgICAgICAgfQogICAgICB9CiAgICAgIHJldHVybiB0aW1pbmc7CiAgICB9CgogICAgZnVuY3Rpb24gc2VsZWN0aW9uX3RyYW5zaXRpb24obmFtZSkgewogICAgICB2YXIgaWQsCiAgICAgICAgICB0aW1pbmc7CgogICAgICBpZiAobmFtZSBpbnN0YW5jZW9mIFRyYW5zaXRpb24pIHsKICAgICAgICBpZCA9IG5hbWUuX2lkLCBuYW1lID0gbmFtZS5fbmFtZTsKICAgICAgfSBlbHNlIHsKICAgICAgICBpZCA9IG5ld0lkKCksICh0aW1pbmcgPSBkZWZhdWx0VGltaW5nKS50aW1lID0gbm93KCksIG5hbWUgPSBuYW1lID09IG51bGwgPyBudWxsIDogbmFtZSArICIiOwogICAgICB9CgogICAgICBmb3IgKHZhciBncm91cHMgPSB0aGlzLl9ncm91cHMsIG0gPSBncm91cHMubGVuZ3RoLCBqID0gMDsgaiA8IG07ICsraikgewogICAgICAgIGZvciAodmFyIGdyb3VwID0gZ3JvdXBzW2pdLCBuID0gZ3JvdXAubGVuZ3RoLCBub2RlLCBpID0gMDsgaSA8IG47ICsraSkgewogICAgICAgICAgaWYgKG5vZGUgPSBncm91cFtpXSkgewogICAgICAgICAgICBzY2hlZHVsZShub2RlLCBuYW1lLCBpZCwgaSwgZ3JvdXAsIHRpbWluZyB8fCBpbmhlcml0KG5vZGUsIGlkKSk7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CgogICAgICByZXR1cm4gbmV3IFRyYW5zaXRpb24oZ3JvdXBzLCB0aGlzLl9wYXJlbnRzLCBuYW1lLCBpZCk7CiAgICB9CgogICAgc2VsZWN0aW9uLnByb3RvdHlwZS5pbnRlcnJ1cHQgPSBzZWxlY3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0aW9uKHRhcmdldCkgewogICAgICAgIHJldHVybiB0b3VjaCh0YXJnZXQsIGV2ZW50LnRvdWNoZXMsIGlkZW50aWZpZXIpOwogICAgICB9OwogICAgfQoKICAgIHZhciBYID0gewogICAgICBuYW1lOiAieCIsCiAgICAgIGhhbmRsZXM6IFsidyIsICJlIl0ubWFwKHR5cGUpLAogICAgICBpbnB1dDogZnVuY3Rpb24oeCwgZSkgeyByZXR1cm4geCA9PSBudWxsID8gbnVsbCA6IFtbK3hbMF0sIGVbMF1bMV1dLCBbK3hbMV0sIGVbMV1bMV1dXTsgfSwKICAgICAgb3V0cHV0OiBmdW5jdGlvbih4eSkgeyByZXR1cm4geHkgJiYgW3h5WzBdWzBdLCB4eVsxXVswXV07IH0KICAgIH07CgogICAgdmFyIFkgPSB7CiAgICAgIG5hbWU6ICJ5IiwKICAgICAgaGFuZGxlczogWyJuIiwgInMiXS5tYXAodHlwZSksCiAgICAgIGlucHV0OiBmdW5jdGlvbih5LCBlKSB7IHJldHVybiB5ID09IG51bGwgPyBudWxsIDogW1tlWzBdWzBdLCAreVswXV0sIFtlWzFdWzBdLCAreVsxXV1dOyB9LAogICAgICBvdXRwdXQ6IGZ1bmN0aW9uKHh5KSB7IHJldHVybiB4eSAmJiBbeHlbMF1bMV0sIHh5WzFdWzFdXTsgfQogICAgfTsKCiAgICB2YXIgY3Vyc29ycyA9IHsKICAgICAgb3ZlcmxheTogImNyb3NzaGFpciIsCiAgICAgIHNlbGVjdGlvbjogIm1vdmUiLAogICAgICBuOiAibnMtcmVzaXplIiwKICAgICAgZTogImV3LXJlc2l6ZSIsCiAgICAgIHM6ICJucy1yZXNpemUiLAogICAgICB3OiAiZXctcmVzaXplIiwKICAgICAgbnc6ICJud3NlLXJlc2l6ZSIsCiAgICAgIG5lOiAibmVzdy1yZXNpemUiLAogICAgICBzZTogIm53c2UtcmVzaXplIiwKICAgICAgc3c6ICJuZXN3LXJlc2l6ZSIKICAgIH07CgogICAgdmFyIGZsaXBYID0gewogICAgICBlOiAidyIsCiAgICAgIHc6ICJlIiwKICAgICAgbnc6ICJuZSIsCiAgICAgIG5lOiAibnciLAogICAgICBzZTogInN3IiwKICAgICAgc3c6ICJzZSIKICAgIH07CgogICAgdmFyIGZsaXBZID0gewogICAgICBuOiAicyIsCiAgICAgIHM6ICJuIiwKICAgICAgbnc6ICJzdyIsCiAgICAgIG5lOiAic2UiLAogICAgICBzZTogIm5lIiwKICAgICAgc3c6ICJudyIKICAgIH07CgogICAgdmFyIHNpZ25zWCA9IHsKICAgICAgb3ZlcmxheTogKzEsCiAgICAgIHNlbGVjdGlvbjogKzEsCiAgICAgIG46IG51bGwsCiAgICAgIGU6ICsxLAogICAgICBzOiBudWxsLAogICAgICB3OiAtMSwKICAgICAgbnc6IC0xLAogICAgICBuZTogKzEsCiAgICAgIHNlOiArMSwKICAgICAgc3c6IC0xCiAgICB9OwoKICAgIHZhciBzaWduc1kgPSB7CiAgICAgIG92ZXJsYXk6ICsxLAogICAgICBzZWxlY3Rpb246ICsxLAogICAgICBuOiAtMSwKICAgICAgZTogbnVsbCwKICAgICAgczogKzEsCiAgICAgIHc6IG51bGwsCiAgICAgIG53OiAtMSwKICAgICAgbmU6IC0xLAogICAgICBzZTogKzEsCiAgICAgIHN3OiArMQogICAgfTsKCiAgICBmdW5jdGlvbiB0eXBlKHQpIHsKICAgICAgcmV0dXJuIHt0eXBlOiB0fTsKICAgIH0KCiAgICAvLyBJZ25vcmUgcmlnaHQtY2xpY2ssIHNpbmNlIHRoYXQgc2hvdWxkIG9wZW4gdGhlIGNvbnRleHQgbWVudS4KICAgIGZ1bmN0aW9uIGRlZmF1bHRGaWx0ZXIoKSB7CiAgICAgIHJldHVybiAhZXZlbnQuY3RybEtleSAmJiAhZXZlbnQuYnV0dG9uOwogICAgfQoKICAgIGZ1bmN0aW9uIGRlZmF1bHRFeHRlbnQoKSB7CiAgICAgIHZhciBzdmcgPSB0aGlzLm93bmVyU1ZHRWxlbWVudCB8fCB0aGlzOw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lciwKICAgICAgICAgIHRvdWNoYWJsZSA9IGRlZmF1bHRUb3VjaGFibGUsCiAgICAgICAgICBrZXlzID0gdHJ1ZSwKICAgICAgICAgIGxpc3RlbmVycyA9IGRpc3BhdGNoJDMoInN0YXJ0IiwgImJydXNoIiwgImVuZCIpLAogICAgICAgICAgaGFuZGxlU2l6ZSA9IDYsCiAgICAgICAgICB0b3VjaGVuZGluZzsKCiAgICAgIGZ1bmN0aW9uIGJydXNoKGdyb3VwKSB7CiAgICAgICAgdmFyIG92ZXJsYXkgPSBncm91cAogICAgICAgICAgICAucHJvcGVydHkoIl9fYnJ1c2giLCBpbml0aWFsaXplKQogICAgICAgICAgLnNlbGVjdEFsbCgiLm92ZXJsYXkiKQogICAgICAgICAgLmRhdGEoW3R5cGUoIm92ZXJsYXkiKV0pOwoKICAgICAgICBvdmVybGF5LmVudGVyKCkuYXBwZW5kKCJyZWN0IikKICAgICAgICAgICAgLmF0dHIoImNsYXNzIiwgIm92ZXJsYXkiKQogICAgICAgICAgICAuYXR0cigicG9pbnRlci1ldmVudHMiLCAiYWxsIikKICAgICAgICAgICAgLmF0dHIoImN1cnNvciIsIGN1cnNvcnMub3ZlcmxheSkKICAgICAgICAgIC5tZXJnZShvdmVybGF5KQogICAgICAgICAgICAuZWFjaChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICB2YXIgZXh0ZW50ID0gbG9jYWwodGhpcykuZXh0ZW50OwogICAgICAgICAgICAgIHNlbGVjdCQxKHRoaXMpCiAgICAgICAgICAgICAgICAgIC5hdHRyKCJ4IiwgZXh0ZW50WzBdWzBdKQogICAgICAgICAgICAgICAgICAuYXR0cigieSIsIGV4dGVudFswXVsxXSkKICAgICAgICAgICAgICAgICAgLmF0dHIoIndpZHRoIiwgZXh0ZW50WzFdWzBdIC0gZXh0ZW50WzBdWzBdKQogICAgICAgICAgICAgICAgICAuYXR0cigiaGVpZ2h0IiwgZXh0ZW50WzFdWzFdIC0gZXh0ZW50WzBdWzFdKTsKICAg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ICAgICAgICAgc2VsZWN0aW9uMSA9IGRpbS5pbnB1dCh0eXBlb2Ygc2VsZWN0aW9uID09PSAiZnVuY3Rpb24iID8gc2VsZWN0aW9uLmFwcGx5KHRoaXMsIGFyZ3VtZW50cykgOiBzZWxlY3Rpb24sIHN0YXRlLmV4dGVudCksCiAgICAgICAgICAgICAgICAgICAgaSA9IGludGVycG9sYXRlVmFsdWUoc2VsZWN0aW9uMCwgc2VsZWN0aW9uMSk7CgogICAgICAgICAgICAgICAgZnVuY3Rpb24gdHdlZW4odCkgewogICAgICAgICAgICAgICAgICBzdGF0ZS5zZWxlY3Rpb24gPSB0ID09PSAxICYmIHNlbGVjdGlvbjEgPT09IG51bGwgPyBudWxsIDogaSh0KTsKICAgICAgICAgICAgICAgICAgcmVkcmF3LmNhbGwodGhhdCk7CiAgICAgICAgICAgICAgICAgIGVtaXQuYnJ1c2goKTsKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICByZXR1cm4gc2VsZWN0aW9uMCAhPT0gbnVsbCAmJiBzZWxlY3Rpb24xICE9PSBudWxsID8gdHdlZW4gOiB0d2VlbigxKTsKICAgICAgICAgICAgICB9KTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgZ3JvdXAKICAgICAgICAgICAgICAuZWFjaChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgIHZhciB0aGF0ID0gdGhpcywKICAgICAgICAgICAgICAgICAgICBhcmdzID0gYXJndW1lbnRzLAogICAgICAgICAgICAgICAgICAgIHN0YXRlID0gdGhhdC5fX2JydXNoLAogICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbjEgPSBkaW0uaW5wdXQodHlwZW9mIHNlbGVjdGlvbiA9PT0gImZ1bmN0aW9uIiA/IHNlbGVjdGlvbi5hcHBseSh0aGF0LCBhcmdzKSA6IHNlbGVjdGlvbiwgc3RhdGUuZXh0ZW50KSwKICAgICAgICAgICAgICAgICAgICBlbWl0ID0gZW1pdHRlcih0aGF0LCBhcmdzKS5iZWZvcmVzdGFydCgpOwoKICAgICAgICAgICAgICAgIGludGVycnVwdCh0aGF0KTsKICAgICAgICAgICAgICAgIHN0YXRlLnNlbGVjdGlvbiA9IHNlbGVjdGlvbjEgPT09IG51bGwgPyBudWxsIDogc2VsZWN0aW9uMTsKICAgICAgICAgICAgICAgIHJlZHJhdy5jYWxsKHRoYXQpOwogICAgICAgICAgICAgICAgZW1pdC5zdGFydCgpLmJydXNoKCkuZW5kKCk7CiAgICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICB9OwoKICAgICAgYnJ1c2guY2xlYXIgPSBmdW5jdGlvbihncm91cCkgewogICAgICAgIGJydXNoLm1vdmUoZ3JvdXAsIG51bGwpOwogICAgICB9OwoKICAgICAgZnVuY3Rpb24gcmVkcmF3KCkgewogICAgICAgIHZhciBncm91cCA9IHNlbGVjdCQxKHRoaXMpLAogICAgICAgICAgICBzZWxlY3Rpb24gPSBsb2NhbCh0aGlzKS5zZWxlY3Rpb247CgogICAgICAgIGlmIChzZWxlY3Rpb24pIHsKICAgICAgICAgIGdyb3VwLnNlbGVjdEFsbCgiLnNlbGVjdGlvbiIpCiAgICAgICAgICAgICAgLnN0eWxlKCJkaXNwbGF5IiwgbnVsbCkKICAgICAgICAgICAgICAuYXR0cigieCIsIHNlbGVjdGlvblswXVswXSkKICAgICAgICAgICAgICAuYXR0cigieSIsIHNlbGVjdGlvblswXVsxXSkKICAgICAgICAgICAgICAuYXR0cigid2lkdGgiLCBzZWxlY3Rpb25bMV1bMF0gLSBzZWxlY3Rpb25bMF1bMF0pCiAgICAgICAgICAgICAgLmF0dHIoImhlaWdodCIsIHNlbGVjdGlvblsxXVsxXSAtIHNlbGVjdGlvblswXVsxXSk7CgogICAgICAgICAgZ3JvdXAuc2VsZWN0QWxsKCIuaGFuZGxlIikKICAgICAgICAgICAgICAuc3R5bGUoImRpc3BsYXkiLCBudWxsKQogICAgICAgICAgICAgIC5hdHRyKCJ4IiwgZnVuY3Rpb24oZCkgeyByZXR1cm4gZC50eXBlW2QudHlwZS5sZW5ndGggLSAxXSA9PT0gImUiID8gc2VsZWN0aW9uWzFdWzBdIC0gaGFuZGxlU2l6ZSAvIDIgOiBzZWxlY3Rpb25bMF1bMF0gLSBoYW5kbGVTaXplIC8gMjsgfSkKICAgICAgICAgICAgICAuYXR0cigieSIsIGZ1bmN0aW9uKGQpIHsgcmV0dXJuIGQudHlwZVswXSA9PT0gInMiID8gc2VsZWN0aW9uWzFdWzFdIC0gaGFuZGxlU2l6ZSAvIDIgOiBzZWxlY3Rpb25bMF1bMV0gLSBoYW5kbGVTaXplIC8gMjsgfSkKICAgICAgICAgICAgICAuYXR0cigid2lkdGgiLCBmdW5jdGlvbihkKSB7IHJldHVybiBkLnR5cGUgPT09ICJuIiB8fCBkLnR5cGUgPT09ICJzIiA/IHNlbGVjdGlvblsxXVswXSAtIHNlbGVjdGlvblswXVswXSArIGhhbmRsZVNpemUgOiBoYW5kbGVTaXplOyB9KQogICAgICAgICAgICAgIC5hdHRyKCJoZWlnaHQiLCBmdW5jdGlvbihkKSB7IHJldHVybiBkLnR5cGUgPT09ICJlIiB8fCBkLnR5cGUgPT09ICJ3IiA/IHNlbGVjdGlvblsxXVsxXSAtIHNlbGVjdGlvblswXVsxXSArIGhhbmRsZVNpemUgOiBoYW5kbGVTaXplOyB9KTsKICAgICAgICB9CgogICAgICAgIGVsc2UgewogICAgICAgICAgZ3JvdXAuc2VsZWN0QWxsKCIuc2VsZWN0aW9uLC5oYW5kbGUiKQogICAgICAgICAgICAgIC5zdHlsZSgiZGlzcGxheSIsICJub25lIikKICAgICAgICAgICAgICAuYXR0cigieCIsIG51bGwpCiAgICAgICAgICAgICAgLmF0dHIoInkiLCBudWxsKQogICAgICAgICAgICAgIC5hdHRyKCJ3aWR0aCIsIG51bGwpCiAgICAgICAgICAgICAgLmF0dHIoImhlaWdodCIsIG51bGwpOwogICAgICAgIH0KICAgICAgfQoKICAgICAgZnVuY3Rpb24gZW1pdHRlcih0aGF0LCBhcmdzLCBjbGVhbikgewogICAgICAgIHJldHVybiAoIWNsZWFuICYmIHRoYXQuX19icnVzaC5lbWl0dGVyKSB8fCBuZXcgRW1pdHRlcih0aGF0LCBhcmdzKTsKICAgICAgfQoKICAgICAgZnVuY3Rpb24gRW1pdHRlcih0aGF0LCBhcmdzKSB7CiAgICAgICAgdGhpcy50aGF0ID0gdGhhdDsKICAgICAgICB0aGlzLmFyZ3MgPSBhcmdzOwogICAgICAgIHRoaXMuc3RhdGUgPSB0aGF0Ll9fYnJ1c2g7CiAgICAgICAgdGhpcy5hY3RpdmUgPSAwOwogICAgICB9CgogICAgICBFbWl0dGVyLnByb3RvdHlwZSA9IHsKICAgICAgICBiZWZvcmVzdGFydDogZnVuY3Rpb24oKSB7CiAgICAgICAgICBpZiAoKyt0aGlzLmFjdGl2ZSA9PT0gMSkgdGhpcy5zdGF0ZS5lbWl0dGVyID0gdGhpcywgdGhpcy5zdGFydGluZyA9IHRydWU7CiAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9LAogICAgICAgIHN0YXJ0OiBmdW5jdGlvbigpIHsKICAgICAgICAgIGlmICh0aGlzLnN0YXJ0aW5nKSB0aGlzLnN0YXJ0aW5nID0gZmFsc2UsIHRoaXMuZW1pdCgic3RhcnQiKTsKICAgICAgICAgIGVsc2UgdGhpcy5lbWl0KCJicnVzaCIpOwogICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgfSwKICAgICAgICBicnVzaDogZnVuY3Rpb24oKSB7CiAgICAgICAgICB0aGlzLmVtaXQoImJydXNoIik7CiAgICAgICAgICByZXR1cm4gdGhpczsKICAgICAgICB9LAogICAgICAgIGVuZDogZnVuY3Rpb24oKSB7CiAgICAgICAgICBpZiAoLS10aGlzLmFjdGl2ZSA9PT0gMCkgZGVsZXRlIHRoaXMuc3RhdGUuZW1pdHRlciwgdGhpcy5lbWl0KCJlbmQiKTsKICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIH0sCiAgIC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gICAgICAgICAgIEUgPSBleHRlbnRbMV1bMF0sIGUwLCBlMSwKICAgICAgICAgICAgUyA9IGV4dGVudFsxXVsxXSwgczAsIHMxLAogICAgICAgICAgICBkeCA9IDAsCiAgICAgICAgICAgIGR5ID0gMCwKICAgICAgICAgICAgbW92aW5nLAogICAgICAgICAgICBzaGlmdGluZyA9IHNpZ25YICYmIHNpZ25ZICYmIGtleXMgJiYgZXZlbnQuc2hpZnRLZXksCiAgICAgICAgICAgIGxvY2tYLAogICAgICAgICAgICBsb2NrWSwKICAgICAgICAgICAgcG9pbnRlciA9IGV2ZW50LnRvdWNoZXMgPyB0b3VjaGVyKGV2ZW50LmNoYW5nZWRUb3VjaGVzWzBdLmlkZW50aWZpZXIpIDogbW91c2UsCiAgICAgICAgICAgIHBvaW50MCA9IHBvaW50ZXIodGhhdCksCiAgICAgICAgICAgIHBvaW50ID0gcG9pbnQwLAogICAgICAgICAgICBlbWl0ID0gZW1pdHRlcih0aGF0LCBhcmd1bWVudHMsIHRydWUpLmJlZm9yZXN0YXJ0KCk7CgogICAgICAgIGlmICh0eXBlID09PSAib3ZlcmxheSIpIHsKICAgICAgICAgIGlmIChzZWxlY3Rpb24pIG1vdmluZyA9IHRydWU7CiAgICAgICAgICBzdGF0ZS5zZWxlY3Rpb24gPSBzZWxlY3Rpb24gPSBbCiAgICAgICAgICAgIFt3MCA9IGRpbSA9PT0gWSA/IFcgOiBwb2ludDBbMF0sIG4wID0gZGltID09PSBYID8gTiA6IHBvaW50MFsxXV0sCiAgICAgICAgICAgIFtlMCA9IGRpbSA9PT0gWSA/IEUgOiB3MCwgczAgPSBkaW0gPT09IFggPyBTIDogbjBdCiAgICAgICAgICBdOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICB3MCA9IHNlbGVjdGlvblswXVswXTsKICAgICAgICAgIG4wID0gc2VsZWN0aW9uWzBdWzFdOwogICAgICAgICAgZTAgPSBzZWxlY3Rpb25bMV1bMF07CiAgICAgICAgICBzMCA9IHNlbGVjdGlvblsxXVsxXTsKICAgICAgICB9CgogICAgICAgIHcxID0gdzA7CiAgICAgICAgbjEgPSBuMDsKICAgICAgICBlMSA9IGUwOwogICAgICAgIHMxID0gczA7CgogICAgICAgIHZhciBncm91cCA9IHNlbGVjdCQxKHRoYXQpCiAgICAgICAgICAgIC5hdHRyKCJwb2ludGVyLWV2ZW50cyIsICJub25lIik7CgogICAgICAgIHZhciBvdmVybGF5ID0gZ3JvdXAuc2VsZWN0QWxsKCIub3ZlcmxheSIpCiAgICAgICAgICAgIC5hdHRyKCJjdXJzb3IiLCBjdXJzb3JzW3R5cGVdKTsKCiAgICAgICAgaWYgKGV2ZW50LnRvdWNoZXMpIHsKICAgICAgICAgIGVtaXQubW92ZWQgPSBtb3ZlZDsKICAgICAgICAgIGVtaXQuZW5kZWQgPSBlbmRlZDsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgdmFyIHZpZXcgPSBzZWxlY3QkMShldmVudC52aWV3KQogICAgICAgICAgICAgIC5vbigibW91c2Vtb3ZlLmJydXNoIiwgbW92ZWQsIHRydWUpCiAgICAgICAgICAgICAgLm9uKCJtb3VzZXVwLmJydXNoIiwgZW5kZWQsIHRydWUpOwogICAgICAgICAgaWYgKGtleXMpIHZpZXcKICAgICAgICAgICAgICAub24oImtleWRvd24uYnJ1c2giLCBrZXlkb3duZWQsIHRydWUpCiAgICAgICAgICAgICAgLm9uKCJrZXl1cC5icnVzaCIsIGtleXVwcGVkLCB0cnVlKTsKCiAgICAgICAgICBkcmFnRGlzYWJsZShldmVudC52aWV3KTsKICAgICAgICB9CgogICAgICAgIG5vcHJvcGFnYXRpb24oKTsKICAgICAgICBpbnRlcnJ1cHQodGhhdCk7CiAgICAgICAgcmVkcmF3LmNhbGwodGhhdCk7CiAgICAgICAgZW1pdC5zdGFydCgpOwoKICAgICAgICBmdW5jdGlvbiBtb3ZlZCgpIHsKICAgICAgICAgIHZhciBwb2ludDEgPSBwb2ludGVyKHRoYXQpOwogICAgICAgICAgaWYgKHNoaWZ0aW5nICYmICFsb2NrWCAmJiAhbG9ja1kpIHsKICAgICAgICAgICAgaWYgKE1hdGguYWJzKHBvaW50MVswXSAtIHBvaW50WzBdKSA+IE1hdGguYWJzKHBvaW50MVsxXSAtIHBvaW50WzFdKSkgbG9ja1kgPSB0cnVlOwogICAgICAgICAgICBlbHNlIGxvY2tYID0gdHJ1ZTsKICAgICAgICAgIH0KICAgICAgICAgIHBvaW50ID0gcG9pbnQxOwogICAgICAgICAgbW92aW5nID0gdHJ1ZTsKICAgICAgICAgIG5vZXZlbnQkMSgpOwogICAgICAgICAgbW92ZSgpOwogICAgICAgIH0KCiAgICAgICAgZnVuY3Rpb24gbW92ZSgpIHsKICAgICAgICAgIHZhciB0OwoKICAgICAgICAgIGR4ID0gcG9pbnRbMF0gLSBwb2ludDBbMF07CiAgICAgICAgICBkeSA9IHBvaW50WzFdIC0gcG9pbnQwWzFdOwoKICAgICAgICAgIHN3aXRjaCAobW9kZSkgewogICAgICAgICAgICBjYXNlIE1PREVfU1BBQ0U6CiAgICAgICAgICAgIGNhc2UgTU9ERV9EUkFHOiB7CiAgICAgICAgICAgICAgaWYgKHNpZ25YKSBkeCA9IE1hdGgubWF4KFcgLSB3MCwgTWF0aC5taW4oRSAtIGUwLCBkeCkpLCB3MSA9IHcwICsgZHgsIGUxID0gZTAgKyBkeDsKICAgICAgICAgICAgICBpZiAoc2lnblkpIGR5ID0gTWF0aC5tYXgoTiAtIG4wLCBNYXRoLm1pbihTIC0gczAsIGR5KSksIG4xID0gbjAgKyBkeSwgczEgPSBzMCArIGR5OwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNhc2UgTU9ERV9IQU5ETEU6IHsKICAgICAgICAgICAgICBpZiAoc2lnblggPCAwKSBkeCA9IE1hdGgubWF4KFcgLSB3MCwgTWF0aC5taW4oRSAtIHcwLCBkeCkpLCB3MSA9IHcwICsgZHgsIGUxID0gZTA7CiAgICAgICAgICAgICAgZWxzZSBpZiAoc2lnblggPiAwKSBkeCA9IE1hdGgubWF4KFcgLSBlMCwgTWF0aC5taW4oRSAtIGUwLCBkeCkpLCB3MSA9IHcwLCBlMSA9IGUwICsgZHg7CiAgICAgICAgICAgICAgaWYgKHNpZ25ZIDwgMCkgZHkgPSBNYXRoLm1heChOIC0gbjAsIE1hdGgubWluKFMgLSBuMCwgZHkpKSwgbjEgPSBuMCArIGR5LCBzMSA9IHMwOwogICAgICAgICAgICAgIGVsc2UgaWYgKHNpZ25ZID4gMCkgZHkgPSBNYXRoLm1heChOIC0gczAsIE1hdGgubWluKFMgLSBzMCwgZHkpKSwgbjEgPSBuMCwgczEgPSBzMCArIGR5OwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNhc2UgTU9ERV9DRU5URVI6IHsKICAgICAgICAgICAgICBpZiAoc2lnblgpIHcxID0gTWF0aC5tYXgoVywgTWF0aC5taW4oRSwgdzAgLSBkeCAqIHNpZ25YKSksIGUxID0gTWF0aC5tYXgoVywgTWF0aC5taW4oRSwgZTAgKyBkeCAqIHNpZ25YKSk7CiAgICAgICAgICAgICAgaWYgKHNpZ25ZKSBuMSA9IE1hdGgubWF4KE4sIE1hdGgubWluKFMsIG4wIC0gZHkgKiBzaWduWSkpLCBzMSA9IE1hdGgubWF4KE4sIE1hdGgubWluKFMsIHMwICsgZHkgKiBzaWduWSkpOwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgICB9CgogICAgICAgICAgaWYgKGUxIDwgdzEpIHsKICAgICAgICAgICAgc2lnblggKj0gLTE7CiAgICAgICAgICAgIHQgPSB3MCwgdzAgPSBlMCwgZTAgPSB0OwogICAgICAgICAgICB0ID0gdzEsIHcxID0gZTEsIGUxID0gdDsKICAgICAgICAgICAgaWYgKHR5cGUgaW4gZmxpcFgpIG92ZXJsYXkuYXR0cigiY3Vyc29yIiwgY3Vyc29yc1t0eXBlID0gZmxpcFhbdHlwZV1dKTsKICAgICAgICAgIH0KCiAgICAgICAgICBpZiAoczEgPCBuMSkgewogICAgICAgICAgICBzaWduWSAqPSAtMTsKICAgICAgICAgICAgdCA9IG4wLCBuMCA9IHMwLCBzMCA9IHQ7CiAgICAgICAgICAgIHQgPSBuMSwgbjEgPSBzMSwgczEgPSB0OwogICAgICAgICAgICBpZiAodHlwZSBpbiBmbGlwWSkgb3ZlcmxheS5hdHRyKCJjdXJzb3IiLCBjdXJzb3JzW3R5cGUgPSBmbGlwWVt0eXBlXV0pOwogICAgICAgICAgfQoKICAgICAgICAgIGlmIChzdGF0ZS5zZWxlY3Rpb24pIHNlbGVjdGlvbiA9IHN0YXRlLnNlbGVjdGlvbjsgLy8gTWF5IGJlIHNldCBieSBicnVzaC5tb3ZlIQogICAgICAgICAgaWYgKGxvY2tYKSB3MSA9IHNlbGVjdGlvblswXVswXSwgZTEgPSBzZWxlY3Rpb25bMV1bMF07CiAgICAgICAgICBpZiAobG9ja1kpIG4xID0gc2VsZWN0aW9uWzBdWzFdLCBzMSA9IHNlbGVjdGlvblsxXVsxXTsKCiAgICAgICAgICBpZiAoc2VsZWN0aW9uWzBdWzBdICE9PSB3MQogICAgICAgICAgICAgIHx8IHNlbGVjdGlvblswXVsxXSAhPT0gbjEKICAgICAgICAgICAgICB8fCBzZWxlY3Rpb25bMV1bMF0gIT09IGUxCiAgICAgICAgICAgICAgfHwgc2VsZWN0aW9uWzFdWzFdICE9PSBzMSkgewogICAgICAgICAgICBzdGF0ZS5zZWxlY3Rpb24gPSBbW3cxLCBuMV0sIFtlMSwgczFdXTsKICAgICAgICAgICAgcmVkcmF3LmNhbGwodGhhdCk7CiAgICAgICAgICAgIGVtaXQuYnJ1c2goKTsKICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIGZ1bmN0aW9uIGVuZGVkKCkgewogICAgICAgICAgbm9wcm9wYWdhdGlvbigpOwogICAgICAgICAgaWYgKGV2ZW50LnRvdWNoZXMpIHsKICAgICAgICAgICAgaWYgKGV2ZW50LnRvdWNoZXMubGVuZ3RoKSByZXR1cm47CiAgICAgICAgICAgIGlmICh0b3VjaGVuZGluZykgY2xlYXJUaW1lb3V0KHRvdWNoZW5kaW5nKTsKICAgICAgICAgICAgdG91Y2hlbmRpbmcgPSBzZXRUaW1lb3V0KGZ1bmN0aW9uKCkgeyB0b3VjaGVuZGluZyA9IG51bGw7IH0sIDUwMCk7IC8vIEdob3N0IGNsaWNrcyBhcmUgZGVsYXllZCEKICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIHllc2RyYWcoZXZlbnQudmlldywgbW92aW5nKTsKICAgICAgICAgICAgdmlldy5vbigia2V5ZG93bi5icnVzaCBrZXl1cC5icnVzaCBtb3VzZW1vdmUuYnJ1c2ggbW91c2V1cC5icnVzaCIsIG51bGwpOwogICAgICAgICAgfQogICAgICAgICAgZ3JvdXAuYXR0cigicG9pbnRlci1ldmVudHMiLCAiYWxsIik7CiAgICAgICAgICBvdmVybGF5LmF0dHIoImN1cnNvciIsIGN1cnNvcnMub3ZlcmxheSk7CiAgICAgICAgICBpZiAoc3RhdGUuc2VsZWN0aW9uKSBzZWxlY3Rpb24gPSBzdGF0ZS5zZWxlY3Rpb247IC8vIE1heSBiZSBzZXQgYnkgYnJ1c2gubW92ZSAob24gc3RhcnQpIQogICAgICAgICAgaWYgKGVtcHR5JDIoc2VsZWN0aW9uKSkgc3RhdGUuc2VsZWN0aW9uID0gbnVsbCwgcmVkcmF3LmNhbGwodGhhdCk7CiAgICAgICAgICBlbWl0LmVuZCgpOwogICAgICAgIH0KCiAgICAgICAgZnVuY3Rpb24ga2V5ZG93bmVkKCkgewogICAgICAgICAgc3dpdGNoIChldmVudC5rZXlDb2RlKSB7CiAgICAgICAgICAgIGNhc2UgMTY6IHsgLy8gU0hJRlQKICAgICAgICAgICAgICBzaGlmdGluZyA9IHNpZ25YICYmIHNpZ25ZOwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNhc2UgMTg6IHsgLy8gQUxUCiAgICAgICAgICAgICAgaWYgKG1vZGUgPT09IE1PREVfSEFORExFKSB7CiAgICAgICAgICAgICAgICBpZiAoc2lnblgpIGUwID0gZTEgLSBkeCAqIHNpZ25YLCB3MCA9IHcxICsgZHggKiBzaWduWDsKICAgICAgICAgICAgICAgIGlmIChzaWduWSkgczAgPSBzMSAtIGR5ICogc2lnblksIG4wID0gbjEgKyBkeSAqIHNpZ25ZOwogICAgICAgICAgICAgICAgbW9kZSA9IE1PREVfQ0VOVEVSOwogICAgICAgICAgICAgICAgbW92ZSgpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQogICAgICAgICAgICBjYXNlIDMyOiB7IC8vIFNQQUNFOyB0YWtlcyBwcmlvcml0eSBvdmVyIEFMVAogICAgICAgICAgICAgIGlmIChtb2RlID09PSBNT0RFX0hBTkRMRSB8fCBtb2RlID09PSBNT0RFX0NFTlRFUikgewogICAgICAgICAgICAgICAgaWYgKHNpZ25YIDwgMCkgZTAgPSBlMSAtIGR4OyBlbHNlIGlmIChzaWduWCA+IDApIHcwID0gdzEgLSBkeDsKICAgICAgICAgICAgICAgIGlmIChzaWduWSA8IDApIHMwID0gczEgLSBkeTsgZWxzZSBpZiAoc2lnblkgPiAwKSBuMCA9IG4xIC0gZHk7CiAgICAgICAgICAgICAgICBtb2RlID0gTU9ERV9TUEFDRTsKICAgICAgICAgICAgICAgIG92ZXJsYXkuYXR0cigiY3Vyc29yIiwgY3Vyc29ycy5zZWxlY3Rpb24pOwogICAgICAgICAgICAgICAgbW92ZSgpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQogICAgICAgICAgICBkZWZhdWx0OiByZXR1cm47CiAgICAgICAgICB9CiAgICAgICAgICBub2V2ZW50JDEoKTsKICAgICAgICB9CgogICAgICAgIGZ1bmN0aW9uIGtleXVwcGVkKCkgewogICAgICAgICAgc3dpdGNoIChldmVudC5rZXlDb2RlKSB7CiAgICAgICAgICAgIGNhc2UgMTY6IHsgLy8gU0hJRlQKICAgICAgICAgICAgICBpZiAoc2hpZnRpbmcpIHsKICAgICAgICAgICAgICAgIGxvY2tYID0gbG9ja1kgPSBzaGlmdGluZyA9IGZhbHNlOwogICAgICAgICAgICAgICAgbW92ZSgpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQogICAgICAgICAgICBjYXNlIDE4OiB7IC8vIEFMVAogICAgICAgICAgICAgIGlmIChtb2RlID09PSBNT0RFX0NFTlRFUikgewogICAgICAgICAgICAgICAgaWYgKHNpZ25YIDwgMCkgZTAgPSBlMTsgZWxzZSBpZiAoc2lnblggPiAwKSB3MCA9IHcxOwogICAgICAgICAgICAgICAgaWYgKHNpZ25ZIDwgMCkgczAgPSBzMTsgZWxzZSBpZiAoc2lnblkgPiAwKSBuMCA9IG4xOwogICAgICAgICAgICAgICAgbW9kZSA9IE1PREVfSEFORExFOwogICAgICAgICAgICAgICAgbW92ZSgpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQogICAgICAgICAgICBjYXNlIDMyOiB7IC8vIFNQQUNFCiAgICAgICAgICAgICAgaWYgKG1vZGUgPT09IE1PREVfU1BBQ0UpIHsKICAgICAgICAgICAgICAgIGlmIChldmVudC5hbHRLZXkpIHsKICAgICAgICAgICAgICAgICAgaWYgKHNpZ25YKSBlMCA9IGUxIC0gZHggKiBzaWduWCwgdzAgPSB3MSArIGR4ICogc2lnblg7CiAgICAgICAgICAgICAgICAgIGlmIChzaWduWSkgczAgPSBzMSAtIGR5ICogc2lnblksIG4wID0gbjEgKyBkeSAqIHNpZ25ZOwogICAgICAgICAgICAgICAgICBtb2RlID0gTU9ERV9DRU5URVI7CiAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICBpZiAoc2lnblggPCAwKSBlMCA9IGUxOyBlbHNlIGlmIChzaWduWCA+IDApIHcwID0gdzE7CiAgICAgICAgICAgICAgICAgIGlmIChzaWduWSA8IDApIHMwID0gczE7IGVsc2UgaWYgKHNpZ25ZID4gMCkgbjAgPSBuMTsKICAgICAgICAgICAgICAgICAgbW9kZSA9IE1PREVfSEFORExFOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgb3ZlcmxheS5hdHRyKCJjdXJzb3IiLCBjdXJzb3JzW3R5cGVdKTsKICAgICAgICAgICAgICAgIG1vdmUoKTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZGVmYXVsdDogcmV0dXJuOwogICAgICAgICAgfQogICAgICAgICAgbm9ldmVudCQxKCk7CiAgICAgICAgfQogICAgICB9CgogICAgICBmdW5jdGlvbiB0b3VjaG1vdmVkKCkgewogICAgICAgIGVtaXR0ZXIodGhpcywgYXJndW1lbnRzKS5tb3ZlZCgpOwogICAgICB9CgogICAgICBmdW5jdGlvbiB0b3VjaGVuZGVkKCkgewogICAgICAgIGVtaXR0ZXIodGhpcywgYXJndW1lbnRzKS5lbmRlZCgpOwogICAgICB9CgogICAgICBmdW5jdGlvbiBpbml0aWFsaXplKCkgewogICAgICAgIHZhciBzdGF0ZSA9IHRoaXMuX19icnVzaCB8fCB7c2VsZWN0aW9uOiBudWxsfTsKICAgICAgICBzdGF0ZS5leHRlbnQgPSBudW1iZXIyKGV4dGVudC5hcHBseSh0aGlzLCBhcmd1bWVudHMpKTsKICAgICAgICBzdGF0ZS5kaW0gPSBkaW07CiAgICAgICAgcmV0dXJuIHN0YXRlOwogICAgICB9CgogICAgICBicnVzaC5leHRlbnQgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoZXh0ZW50ID0gdHlwZW9mIF8gPT09ICJmdW5jdGlvbiIgPyBfIDogY29uc3RhbnQkMyhudW1iZXIyKF8pKSwgYnJ1c2gpIDogZXh0ZW50OwogICAgICB9OwoKICAgICAgYnJ1c2guZmlsdGVyID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKGZpbHRlciA9IHR5cGVvZiBfID09PSAiZnVuY3Rpb24iID8gXyA6IGNvbnN0YW50JDMoISFfKSwgYnJ1c2gpIDogZmlsdGVyOwogICAgICB9OwoKICAgICAgYnJ1c2gudG91Y2hhYmxlID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHRvdWNoYWJsZSA9IHR5cGVvZiBfID09PSAiZnVuY3Rpb24iID8gXyA6IGNvbnN0YW50JDMoISFfKSwgYnJ1c2gpIDogdG91Y2hhYmxlOwogICAgICB9OwoKICAgICAgYnJ1c2guaGFuZGxlU2l6ZSA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChoYW5kbGVTaXplID0gK18sIGJydXNoKSA6IGhhbmRsZVNpemU7CiAgICAgIH07CgogICAgICBicnVzaC5rZXlNb2RpZmllcnMgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoa2V5cyA9ICEhXywgYnJ1c2gpIDoga2V5czsKICAgICAgfTsKCiAgICAgIGJydXNoLm9uID0gZnVuY3Rpb24oKSB7CiAgICAgICAgdmFyIHZhbHVlID0gbGlzdGVuZXJzLm9uLmFwcGx5KGxpc3RlbmVycywgYXJndW1lbnRzKTsKICAgICAgICByZXR1cm4gdmFsdWUgPT09IGxpc3RlbmVycyA/IGJydXNoIDogdmFsdWU7CiAgICAgIH07CgogICAgICByZXR1cm4gYnJ1c2g7CiAgICB9CgogICAgdmFyIHBpID0gTWF0aC5QSSwKICAgICAgICB0YXUgPSAyICogcGksCiAgICAgICAgZXBzaWxvbiQxID0gMWUtNiwKICAgICAgICB0YXVFcHNpbG9uID0gdGF1IC0gZXBzaWxvbiQxOwoKICAgIGZ1bmN0aW9uIFBhdGgoKSB7CiAgICAgIHRoaXMuX3gwID0gdGhpcy5feTAgPSAvLyBzdGFydCBvZiBjdXJyZW50IHN1YnBhdGgKICAgICAgdGhpcy5feDEgPSB0aGlzLl95MSA9IG51bGw7IC8vIGVuZCBvZiBjdXJyZW50IHN1YnBhdGgKICAgICAgdGhpcy5fID0gIiI7CiAgICB9CgogICAgZnVuY3Rpb24gcGF0aCgpIHsKICAgICAgcmV0dXJuIG5ldyBQYXRoOwogICAgfQoKICAgIFBhdGgucHJvdG90eXBlID0gcGF0aC5wcm90b3R5cGUgPSB7CiAgICAgIGNvbnN0cnVjdG9yOiBQYXRoLAogICAgICBtb3ZlVG86IGZ1bmN0aW9uKHgsIHkpIHsKICAgICAgICB0aGlzLl8gKz0gIk0iICsgKHRoaXMuX3gwID0gdGhpcy5feDEgPSAreCkgKyAiLCIgKyAodGhpcy5feTAgPSB0aGlzLl95MSA9ICt5KTsKICAgICAgfSwKICAgICAgY2xvc2VQYXRoOiBmdW5jdGlvbigpIHsKICAgICAgICBpZiAodGhpcy5feDEgIT09IG51bGwpIHsKICAgICAgICAgIHRoaXMuX3gxID0gdGhpcy5feDAsIHRoaXMuX3kxID0gdGhpcy5feTA7CiAgICAgICAgICB0aGlzLl8gKz0gIloiOwogICAgICAgIH0KICAgICAgfSwKICAgICAgbGluZVRvOiBmdW5jdGlvbih4LCB5KSB7CiAgICAgICAgdGhpcy5fICs9ICJMIiArICh0aGlzLl94MSA9ICt4KSArICIsIiArICh0aGlzLl95MSA9ICt5KTsKICAgICAgfSwKICAgICAgcXVhZHJhdGljQ3VydmVUbzogZnVuY3Rpb24oeDEsIHkxLCB4LCB5KSB7CiAgICAgICAgdGhpcy5fICs9ICJRIiArICgreDEpICsgIiwiICsgKCt5MSkgKyAiLCIgKyAodGhpcy5feDEgPSAreCkgKyAiLCIgKyAodGhpcy5feTEgPSAreSk7CiAgICAgIH0sCiAgICAgIGJlemllckN1cnZlVG86IGZ1bmN0aW9uKHgxLCB5MSwgeDIsIHkyLCB4LCB5KSB7CiAgICAgICAgdGhpcy5fICs9ICJDIiArICgreDEpICsgIiwiICsgKCt5MSkgKyAiLCIgKyAoK3gyKSArICIsIiArICgreTIpICsgIiwiICsgKHRoaXMuX3gxID0gK3gpICsgIiwiICsgKHRoaXMuX3kxID0gK3kpOwogICAgICB9LAogICAgICBhcmNUbzogZnVuY3Rpb24oeDEsIHkxLCB4MiwgeTIsIHIpIHsKICAgICAgICB4MSA9ICt4MSwgeTEgPSAreTEsIHgyID0gK3gyLCB5MiA9ICt5MiwgciA9ICtyOwogICAgICAgIHZhciB4MCA9IHRoaXMuX3gxLAogICAgICAgICAgICB5MCA9IHRoaXMuX3kxLAogICAgICAgICAgICB4MjEgPSB4MiAtIHgxLAogICAgICAgICAgICB5MjEgPSB5MiAtIHkxLAogICAgICAgICAgICB4MDEgPSB4MCAtIHgxLAogICAgICAgICAgICB5MDEgPSB5MCAtIHkxLAogICAgICAgICAgICBsMDFfMiA9IHgwMSAqIHgwMSArIHkwMSAqIHkwMTsKCiAgICAgICAgLy8gSXMgdGhlIHJhZGl1cyBuZWdhdGl2ZT8gRXJyb3IuCiAgICAgICAgaWYgKHIgPCAwKSB0aHJvdyBuZXcgRXJyb3IoIm5lZ2F0aXZlIHJhZGl1czogIiArIHIpOwoKICAgICAgICAvLyBJcyB0aGlzIHBhdGggZW1wdHk/IE1vdmUgdG8gKHgxLHkxKS4KICAgICAgICBpZiAodGhpcy5feDEgPT09IG51bGwpIHsKICAgICAgICAgIHRoaXMuXyArPSAiTSIgKyAodGhpcy5feDEgPSB4MSkgKyAiLCIgKyAodGhpcy5feTEgPSB5MSk7CiAgICAgICAgfQoKICAgICAgICAvLyBPciwgaXMgKHgxLHkxKSBjb2luY2lkZW50IHdpdGggKHgwLHkwKT8gRG8gbm90aGluZy4KICAgICAgICBlbHNlIGlmICghKGwwMV8yID4gZXBzaWxvbiQxKSk7CgogIC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KE1hdGguYWJzKHQwMSAtIDEpID4gZXBzaWxvbiQxKSB7CiAgICAgICAgICAgIHRoaXMuXyArPSAiTCIgKyAoeDEgKyB0MDEgKiB4MDEpICsgIiwiICsgKHkxICsgdDAxICogeTAxKTsKICAgICAgICAgIH0KCiAgICAgICAgICB0aGlzLl8gKz0gIkEiICsgciArICIsIiArIHIgKyAiLDAsMCwiICsgKCsoeTAxICogeDIwID4geDAxICogeTIwKSkgKyAiLCIgKyAodGhpcy5feDEgPSB4MSArIHQyMSAqIHgyMSkgKyAiLCIgKyAodGhpcy5feTEgPSB5MSArIHQyMSAqIHkyMSk7CiAgICAgICAgfQogICAgICB9LAogICAgICBhcmM6IGZ1bmN0aW9uKHgsIHksIHIsIGEwLCBhMSwgY2N3KSB7CiAgICAgICAgeCA9ICt4LCB5ID0gK3ksIHIgPSArciwgY2N3ID0gISFjY3c7CiAgICAgICAgdmFyIGR4ID0gciAqIE1hdGguY29zKGEwKSwKICAgICAgICAgICAgZHkgPSByICogTWF0aC5zaW4oYTApLAogICAgICAgICAgICB4MCA9IHggKyBkeCwKICAgICAgICAgICAgeTAgPSB5ICsgZHksCiAgICAgICAgICAgIGN3ID0gMSBeIGNjdywKICAgICAgICAgICAgZGEgPSBjY3cgPyBhMCAtIGExIDogYTEgLSBhMDsKCiAgICAgICAgLy8gSXMgdGhlIHJhZGl1cyBuZWdhdGl2ZT8gRXJyb3IuCiAgICAgICAgaWYgKHIgPCAwKSB0aHJvdyBuZXcgRXJyb3IoIm5lZ2F0aXZlIHJhZGl1czogIiArIHIpOwoKICAgICAgICAvLyBJcyB0aGlzIHBhdGggZW1wdHk/IE1vdmUgdG8gKHgwLHkwKS4KICAgICAgICBpZiAodGhpcy5feDEgPT09IG51bGwpIHsKICAgICAgICAgIHRoaXMuXyArPSAiTSIgKyB4MCArICIsIiArIHkwOwogICAgICAgIH0KCiAgICAgICAgLy8gT3IsIGlzICh4MCx5MCkgbm90IGNvaW5jaWRlbnQgd2l0aCB0aGUgcHJldmlvdXMgcG9pbnQ/IExpbmUgdG8gKHgwLHkwKS4KICAgICAgICBlbHNlIGlmIChNYXRoLmFicyh0aGlzLl94MSAtIHgwKSA+IGVwc2lsb24kMSB8fCBNYXRoLmFicyh0aGlzLl95MSAtIHkwKSA+IGVwc2lsb24kMSkgewogICAgICAgICAgdGhpcy5fICs9ICJMIiArIHgwICsgIiwiICsgeTA7CiAgICAgICAgfQoKICAgICAgICAvLyBJcyB0aGlzIGFyYyBlbXB0eT8gV2XigJlyZSBkb25lLgogICAgICAgIGlmICghcikgcmV0dXJuOwoKICAgICAgICAvLyBEb2VzIHRoZSBhbmdsZSBnbyB0aGUgd3Jvbmcgd2F5PyBGbGlwIHRoZSBkaXJlY3Rpb24uCiAgICAgICAgaWYgKGRhIDwgMCkgZGEgPSBkYSAlIHRhdSArIHRhdTsKCiAgICAgICAgLy8gSXMgdGhpcyBhIGNvbXBsZXRlIGNpcmNsZT8gRHJhdyB0d28gYXJjcyB0byBjb21wbGV0ZSB0aGUgY2lyY2xlLgogICAgICAgIGlmIChkYSA+IHRhdUVwc2lsb24pIHsKICAgICAgICAgIHRoaXMuXyArPSAiQSIgKyByICsgIiwiICsgciArICIsMCwxLCIgKyBjdyArICIsIiArICh4IC0gZHgpICsgIiwiICsgKHkgLSBkeSkgKyAiQSIgKyByICsgIiwiICsgciArICIsMCwxLCIgKyBjdyArICIsIiArICh0aGlzLl94MSA9IHgwKSArICIsIiArICh0aGlzLl95MSA9IHkwKTsKICAgICAgICB9CgogICAgICAgIC8vIElzIHRoaXMgYXJjIG5vbi1lbXB0eT8gRHJhdyBhbiBhcmMhCiAgICAgICAgZWxzZSBpZiAoZGEgPiBlcHNpbG9uJDEpIHsKICAgICAgICAgIHRoaXMuXyArPSAiQSIgKyByICsgIiwiICsgciArICIsMCwiICsgKCsoZGEgPj0gcGkpKSArICIsIiArIGN3ICsgIiwiICsgKHRoaXMuX3gxID0geCArIHIgKiBNYXRoLmNvcyhhMSkpICsgIiwiICsgKHRoaXMuX3kxID0geSArIHIgKiBNYXRoLnNpbihhMSkpOwogICAgICAgIH0KICAgICAgfSwKICAgICAgcmVjdDogZnVuY3Rpb24oeCwgeSwgdywgaCkgewogICAgICAgIHRoaXMuXyArPSAiTSIgKyAodGhpcy5feDAgPSB0aGlzLl94MSA9ICt4KSArICIsIiArICh0aGlzLl95MCA9IHRoaXMuX3kxID0gK3kpICsgImgiICsgKCt3KSArICJ2IiArICgraCkgKyAiaCIgKyAoLXcpICsgIloiOwogICAgICB9LAogICAgICB0b1N0cmluZzogZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuXzsKICAgICAgfQogICAgfTsKCiAgICB2YXIgcHJlZml4ID0gIiQiOwoKICAgIGZ1bmN0aW9uIE1hcCQxKCkge30KCiAgICBNYXAkMS5wcm90b3R5cGUgPSBtYXAkMS5wcm90b3R5cGUgPSB7CiAgICAgIGNvbnN0cnVjdG9yOiBNYXAkMSwKICAgICAgaGFzOiBmdW5jdGlvbihrZXkpIHsKICAgICAgICByZXR1cm4gKHByZWZpeCArIGtleSkgaW4gdGhpczsKICAgICAgfSwKICAgICAgZ2V0OiBmdW5jdGlvbihrZXkpIHsKICAgICAgICByZXR1cm4gdGhpc1twcmVmaXggKyBrZXldOwogICAgICB9LAogICAgICBzZXQ6IGZ1bmN0aW9uKGtleSwgdmFsdWUpIHsKICAgICAgICB0aGlzW3ByZWZpeCArIGtleV0gPSB2YWx1ZTsKICAgICAgICByZXR1cm4gdGhpczsKICAgICAgfSwKICAgICAgcmVtb3ZlOiBmdW5jdGlvbihrZXkpIHsKICAgICAgICB2YXIgcHJvcGVydHkgPSBwcmVmaXggKyBrZXk7CiAgICAgICAgcmV0dXJuIHByb3BlcnR5IGluIHRoaXMgJiYgZGVsZXRlIHRoaXNbcHJvcGVydHldOwogICAgICB9LAogICAgICBjbGVhcjogZnVuY3Rpb24oKSB7CiAgICAgICAgZm9yICh2YXIgcHJvcGVydHkgaW4gdGhpcykgaWYgKHByb3BlcnR5WzBdID09PSBwcmVmaXgpIGRlbGV0ZSB0aGlzW3Byb3BlcnR5XTsKICAgICAgfSwKICAgICAga2V5czogZnVuY3Rpb24oKSB7CiAgICAgICAgdmFyIGtleXMgPSBbXTsKICAgICAgICBmb3IgKHZhciBwcm9wZXJ0eSBpbiB0aGlzKSBpZiAocHJvcGVydHlbMF0gPT09IHByZWZpeCkga2V5cy5wdXNoKHByb3BlcnR5LnNsaWNlKDEpKTsKICAgICAgICByZXR1cm4ga2V5czsKICAgICAgfSwKICAgICAgdmFsdWVzOiBmdW5jdGlvbigpIHsKICAgICAgICB2YXIgdmFsdWVzID0gW107CiAgICAgICAgZm9yICh2YXIgcHJvcGVydHkgaW4gdGhpcykgaWYgKHByb3BlcnR5WzBdID09PSBwcmVmaXgpIHZhbHVlcy5wdXNoKHRoaXNbcHJvcGVydHldKTsKICAgICAgICByZXR1cm4gdmFsdWVzOwogICAgICB9LAogICAgICBlbnRyaWVzOiBmdW5jdGlvbigpIHsKICAgICAgICB2YXIgZW50cmllcyA9IFtdOwogICAgICAgIGZvciAodmFyIHByb3BlcnR5IGluIHRoaXMpIGlmIChwcm9wZXJ0eVswXSA9PT0gcHJlZml4KSBlbnRyaWVzLnB1c2goe2tleTogcHJvcGVydHkuc2xpY2UoMSksIHZhbHVlOiB0aGlzW3Byb3BlcnR5XX0pOwogICAgICAgIHJldHVybiBlbnRyaWVzOwogICAgICB9LAogICAgICBzaXplOiBmdW5jdGlvbigpIHsKICAgICAgICB2YXIgc2l6ZSA9IDA7CiAgICAgICAgZm9yICh2YXIgcHJvcGVydHkgaW4gdGhpcykgaWYgKHByb3BlcnR5WzBdID09PSBwcmVmaXgpICsrc2l6ZTsKICAgICAgICByZXR1cm4gc2l6ZTsKICAgICAgfSwKICAgICAgZW1wdHk6IGZ1bmN0aW9uKCkgewogICAgICAgIGZvciAodmFyIHByb3BlcnR5IGluIHRoaXMpIGlmIChwcm9wZXJ0eVswXSA9PT0gcHJlZml4KSByZX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dGlvbiBTZXQkMSgpIHt9CgogICAgdmFyIHByb3RvID0gbWFwJDEucHJvdG90eXBlOwoKICAgIFNldCQxLnByb3RvdHlwZSA9IHNldCQyLnByb3RvdHlwZSA9IHsKICAgICAgY29uc3RydWN0b3I6IFNldCQxLAogICAgICBoYXM6IHByb3RvLmhhcywKICAgICAgYWRkOiBmdW5jdGlvbih2YWx1ZSkgewogICAgICAgIHZhbHVlICs9ICIiOwogICAgICAgIHRoaXNbcHJlZml4ICsgdmFsdWVdID0gdmFsdWU7CiAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgIH0sCiAgICAgIHJlbW92ZTogcHJvdG8ucmVtb3ZlLAogICAgICBjbGVhcjogcHJvdG8uY2xlYXIsCiAgICAgIHZhbHVlczogcHJvdG8ua2V5cywKICAgICAgc2l6ZTogcHJvdG8uc2l6ZSwKICAgICAgZW1wdHk6IHByb3RvLmVtcHR5LAogICAgICBlYWNoOiBwcm90by5lYWNoCiAgICB9OwoKICAgIGZ1bmN0aW9uIHNldCQyKG9iamVjdCwgZikgewogICAgICB2YXIgc2V0ID0gbmV3IFNldCQxOwoKICAgICAgLy8gQ29weSBjb25zdHJ1Y3Rvci4KICAgICAgaWYgKG9iamVjdCBpbnN0YW5jZW9mIFNldCQxKSBvYmplY3QuZWFjaChmdW5jdGlvbih2YWx1ZSkgeyBzZXQuYWRkKHZhbHVlKTsgfSk7CgogICAgICAvLyBPdGhlcndpc2UsIGFzc3VtZSBpdOKAmXMgYW4gYXJyYXkuCiAgICAgIGVsc2UgaWYgKG9iamVjdCkgewogICAgICAgIHZhciBpID0gLTEsIG4gPSBvYmplY3QubGVuZ3RoOwogICAgICAgIGlmIChmID09IG51bGwpIHdoaWxlICgrK2kgPCBuKSBzZXQuYWRkKG9iamVjdFtpXSk7CiAgICAgICAgZWxzZSB3aGlsZSAoKytpIDwgbikgc2V0LmFkZChmKG9iamVjdFtpXSwgaSwgb2JqZWN0KSk7CiAgICAgIH0KCiAgICAgIHJldHVybiB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3JtYXRHcm91cChncm91cGluZywgdGhvdXNhbmRzKSB7CiAgICAgIHJldHVybiBmdW5jdGlvbih2YWx1ZSwgd2lkdGgpIHsKICAgICAgICB2YXIgaSA9IHZhbHVlLmxlbmd0aCwKICAgICAgICAgICAgdCA9IFtdLAogICAgICAgICAgICBqID0gMCwKICAgICAgICAgICAgZyA9IGdyb3VwaW5nWzBdLAogICAgICAgICAgICBsZW5ndGggPSAwOwoKICAgICAgICB3aGlsZSAoaSA+IDAgJiYgZyA+IDApIHsKICAgICAgICAgIGlmIChsZW5ndGggKyBnICsgMSA+IHdpZHRoKSBnID0gTWF0aC5tYXgoMSwgd2lkdGggLSBsZW5ndGgpOwogICAgICAgICAgdC5wdXNoKHZhbHVlLnN1YnN0cmluZyhpIC09IGcsIGkgKyBnKSk7CiAgICAgICAgICBpZiAoKGxlbmd0aCArPSBnICsgMSkgPiB3aWR0aCkgYnJlYWs7CiAgICAgICAgICBnID0gZ3JvdXBpbmdbaiA9IChqICsgMSkgJSBncm91cGluZy5sZW5ndGhdOwogICAgICAgIH0KCiAgICAgICAgcmV0dXJuIHQucmV2ZXJzZSgpLmpvaW4odGhvdXNhbmRzKTsKICAgICAgfTsKICAgIH0KCiAgICBmdW5jdGlvbiBmb3JtYXROdW1lcmFscyhudW1lcmFscykgewogICAgICByZXR1cm4gZnVuY3Rpb24odmFsdWUpIHsKICAgICAgICByZXR1cm4gdmFsdWUucmVwbGFjZSgvWzAtOV0vZywgZnVuY3Rpb24oaSkgewogICAgICAgICAgcmV0dXJuIG51bWVyYWxzWytpXTsKICAgICAgICB9KTsKICAgICAgfTsKICAgIH0KCiAgICAvLyBbW2ZpbGxdYWxpZ25dW3NpZ25dW3N5bWJvbF1bMF1bd2lkdGhdWyxdWy5wcmVjaXNpb25dW35dW3R5cGVdCiAgICB2YXIgcmUgPSAvXig/OiguKT8oWzw+PV5dKSk/KFsrXC0oIF0pPyhbJCNdKT8oMCk/KFxkKyk/KCwpPyhcLlxkKyk/KH4pP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IHRoaXMuc3ltYm9sID0gc3BlY2lmaWVyLnN5bWJvbCA9PT0gdW5kZWZpbmVkID8gIiIgOiBzcGVjaWZpZXIuc3ltYm9sICsgIiI7CiAgICAgIHRoaXMuemVybyA9ICEhc3BlY2lmaWVyLnplcm87CiAgICAgIHRoaXMud2lkdGggPSBzcGVjaWZpZXIud2lkdGggPT09IHVuZGVmaW5lZCA/IHVuZGVmaW5lZCA6ICtzcGVjaWZpZXIud2lkdGg7CiAgICAgIHRoaXMuY29tbWEgPSAhIXNwZWNpZmllci5jb21tYTsKICAgICAgdGhpcy5wcmVjaXNpb24gPSBzcGVjaWZpZXIucHJlY2lzaW9uID09PSB1bmRlZmluZWQgPyB1bmRlZmluZWQgOiArc3BlY2lmaWVyLnByZWNpc2lvbjsKICAgICAgdGhpcy50cmltID0gISFzcGVjaWZpZXIudHJpbTsKICAgICAgdGhpcy50eXBlID0gc3BlY2lmaWVyLnR5cGUgPT09IHVuZGVmaW5lZCA/ICIiIDogc3BlY2lmaWVyLnR5cGUgKyAiIjsKICAgIH0KCiAgICBGb3JtYXRTcGVjaWZpZXIucHJvdG90eXBlLnRvU3RyaW5nID0gZnVuY3Rpb24oKSB7CiAgICAgIHJldHVybiB0aGlzLmZpbGwKICAgICAgICAgICsgdGhpcy5hbGlnbgogICAgICAgICAgKyB0aGlzLnNpZ24KICAgICAgICAgICsgdGhpcy5zeW1ib2wKICAgICAgICAgICsgKHRoaXMuemVybyA/ICIwIiA6ICIiKQogICAgICAgICAgKyAodGhpcy53aWR0aCA9PT0gdW5kZWZpbmVkID8gIiIgOiBNYXRoLm1heCgxLCB0aGlzLndpZHRoIHwgMCkpCiAgICAgICAgICArICh0aGlzLmNvbW1hID8gIiwiIDogIiIpCiAgICAgICAgICArICh0aGlzLnByZWNpc2lvbiA9PT0gdW5kZWZpbmVkID8gIiIgOiAiLiIgKyBNYXRoLm1heCgwLCB0aGlzLnByZWNpc2lvbiB8IDApKQogICAgICAgICAgKyAodGhpcy50cmltID8gIn4iIDogIiIpCiAgICAgICAgICArIHRoaXMudHlwZTsKICAgIH07CgogICAgLy8gVHJpbXMgaW5zaWduaWZpY2FudCB6ZXJvcywgZS5nLiwgcmVwbGFjZXMgMS4yMDAwayB3aXRoIDEuMmsuCiAgICBmdW5jdGlvbiBmb3JtYXRUcmltKHMpIHsKICAgICAgb3V0OiBmb3IgKHZhciBuID0gcy5sZW5ndGgsIGkgPSAxLCBpMCA9IC0xLCBpMTsgaSA8IG47ICsraSkgewogICAgICAgIHN3aXRjaCAoc1tpXSkgewogICAgICAgICAgY2FzZSAiLiI6IGkwID0gaTEgPSBpOyBicmVhazsKICAgICAgICAgIGNhc2UgIjAiOiBpZiAoaTAgPT09IDApIGkwID0gaTsgaTEgPSBpOyBicmVhazsKICAgICAgICAgIGRlZmF1bHQ6IGlmICghK3NbaV0pIGJyZWFrIG91dDsgaWYgKGkwID4gMCkgaTAgPSAwOyBicmVhazsKICAgICAgICB9CiAgICAgIH0KICAgICAgcmV0dXJuIGkwID4gMCA/IHMuc2xpY2UoMCwgaTApICsgcy5zbGljZShpMSArIDEpIDogczsKICAgIH0KCiAgICB2YXIgcHJlZml4RXhwb25lbnQ7CgogICAgZnVuY3Rpb24gZm9ybWF0UHJlZml4QXV0byh4LCBwKSB7CiAgICAgIHZhciBkID0gZm9ybWF0RGVjaW1hbCh4LCBwKTsKICAgICAgaWYgKCFkKSByZXR1cm4geCArICIiOwogICAgICB2YXIgY29lZmZpY2llbnQgPSBkWzBdLAogICAgICAgICAgZXhwb25lbnQgPSBkWzFdLAogICAgICAgICAgaSA9IGV4cG9uZW50IC0gKHByZWZpeEV4cG9uZW50ID0gTWF0aC5tYXgoLTgsIE1hdGgubWluKDgsIE1hdGguZmxvb3IoZXhwb25lbnQgLyAzKSkpICogMykgKyAxLAogICAgICAgICAgbiA9IGNvZWZmaWNpZW50Lmxlbmd0aDsKICAgICAgcmV0dXJuIGkgPT09IG4gPyBjb2VmZmljaWVudAogICAgICAgICAgOiBpID4gbiA/IGNvZWZmaWNpZW50ICsgbmV3IEFycmF5KGkgLSBuICsgMSkuam9pbigiMCIpCiAgICAgICAgICA6IGkgPiAwID8gY29lZmZpY2llbnQuc2xpY2UoMCwgaSkgKyAiLiIgKyBjb2VmZmljaWVudC5zbGljZShpKQogICAgICAgICAgOiAiMC4iICsgbmV3IEFycmF5KDEgLSBpKS5qb2luKCIwIikgKyBmb3JtYXREZWNpbWFsKHgsIE1hdGgubWF4KDAsIHAgKyBpIC0gMSkpWzBdOyAvLyBsZXNzIHRoYW4gMXkhCiAgICB9CgogICAgZnVuY3Rpb24gZm9ybWF0Um91bmRlZCh4LCBwKSB7CiAgICAgIHZhciBkID0gZm9ybWF0RGVjaW1hbCh4LCBwKTsKICAgICAgaWYgKCFkKSByZXR1cm4geCArICIiOwogICAgICB2YXIgY29lZmZpY2llbnQgPSBkWzBdLAogICAgICAgICAgZXhwb25lbnQgPSBkWzFdOwogICAgICByZXR1cm4gZXhwb25lbnQgPCAwID8gIjAuIiArIG5ldyBBcnJheSgtZXhwb25lbnQpLmpvaW4oIjAiKSArIGNvZWZmaWNpZW50CiAgICAgICAgICA6IGNvZWZmaWNpZW50Lmxlbmd0aCA+IGV4cG9uZW50ICsgMSA/IGNvZWZmaWNpZW50LnNsaWNlKDAsIGV4cG9uZW50ICsgMSkgKyAiLiIgKyBjb2VmZmljaWVudC5zbGljZShleHBvbmVudCArIDEpCiAgICAgICAgICA6IGNvZWZmaWNpZW50ICsgbmV3IEFycmF5KGV4cG9uZW50IC0gY29lZmZpY2llbnQubGVuZ3RoICsgMikuam9pbigiMCIpOwogICAgfQoKICAgIHZhciBmb3JtYXRUeXBlcyA9IHsKICAgICAgIiUiOiBmdW5jdGlvbih4LCBwKSB7IHJldHVybiAoeCAqIDEwMCkudG9GaXhlZChwKTsgfSwKICAgICAgImIiOiBmdW5jdGlvbih4KSB7IHJldHVybiBNYXRoLnJvdW5kKHgpLnRvU3RyaW5nKDIpOyB9LAogICAgICAiYyI6IGZ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SkgLyAzKSkpICogMyAtIGV4cG9uZW50KE1hdGguYWJzKHN0ZXApKSk7CiAgICB9CgogICAgZnVuY3Rpb24gcHJlY2lzaW9uUm91bmQoc3RlcCwgbWF4KSB7CiAgICAgIHN0ZXAgPSBNYXRoLmFicyhzdGVwKSwgbWF4ID0gTWF0aC5hYnMobWF4KSAtIHN0ZXA7CiAgICAgIHJldHVybiBNYXRoLm1heCgwLCBleHBvbmVudChtYXgpIC0gZXhwb25lbnQoc3RlcCkpICsgMTsKICAgIH0KCiAgICBmdW5jdGlvbiBpbml0UmFuZ2UoZG9tYWluLCByYW5nZSkgewogICAgICBzd2l0Y2ggKGFyZ3VtZW50cy5sZW5ndGgpIHsKICAgICAgICBjYXNlIDA6IGJyZWFrOwogICAgICAgIGNhc2UgMTogdGhpcy5yYW5nZShkb21haW4pOyBicmVhazsKICAgICAgICBkZWZhdWx0OiB0aGlzLnJhbmdlKHJhbmdlKS5kb21haW4oZG9tYWluKTsgYnJlYWs7CiAgICAgIH0KICAgICAgcmV0dXJuIHRoaXM7CiAgICB9CgogICAgdmFyIGFycmF5JDEgPSBBcnJheS5wcm90b3R5cGU7CgogICAgdmFyIG1hcCQzID0gYXJyYXkkMS5tYXA7CiAgICB2YXIgc2xpY2UkMiA9IGFycmF5JDEuc2xpY2U7CgogICAgdmFyIGltcGxpY2l0ID0ge25hbWU6ICJpbXBsaWNpdCJ9OwoKICAgIGZ1bmN0aW9uIG9yZGluYWwoKSB7CiAgICAgIHZhciBpbmRleCA9IG1hcCQxKCksCiAgICAgICAgICBkb21haW4gPSBbXSwKICAgICAgICAgIHJhbmdlID0gW10sCiAgICAgICAgICB1bmtub3duID0gaW1wbGljaXQ7CgogICAgICBmdW5jdGlvbiBzY2FsZShkKSB7CiAgICAgICAgdmFyIGtleSA9IGQgKyAiIiwgaSA9IGluZGV4LmdldChrZXkpOwogICAgICAgIGlmICghaSkgewogICAgICAgICAgaWYgKHVua25vd24gIT09IGltcGxpY2l0KSByZXR1cm4gdW5rbm93bjsKICAgICAgICAgIGluZGV4LnNldChrZXksIGkgPSBkb21haW4ucHVzaChkKSk7CiAgICAgICAgfQogICAgICAgIHJldHVybiByYW5nZVsoaSAtIDEpICUgcmFuZ2UubGVuZ3RoXTsKICAgICAgfQoKICAgICAgc2NhbGUuZG9tYWluID0gZnVuY3Rpb24oXykgewogICAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuIGRvbWFpbi5zbGljZSgpOwogICAgICAgIGRvbWFpbiA9IFtdLCBpbmRleCA9IG1hcCQxKCk7CiAgICAgICAgdmFyIGkgPSAtMSwgbiA9IF8ubGVuZ3RoLCBkLCBrZXk7CiAgICAgICAgd2hpbGUgKCsraSA8IG4pIGlmICghaW5kZXguaGFzKGtleSA9IChkID0gX1tpXSkgKyAiIikpIGluZGV4LnNldChrZXksIGRvbWFpbi5wdXNoKGQpKTsKICAgICAgICByZXR1cm4gc2NhbGU7CiAgICAgIH07CgogICAgICBzY2FsZS5yYW5nZSA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChyYW5nZSA9IHNsaWNlJDIuY2FsbChfKSwgc2NhbGUpIDogcmFuZ2Uuc2xpY2UoKTsKICAgICAgfTsKCiAgICAgIHNjYWxlLnVua25vd24gPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAodW5rbm93biA9IF8sIHNjYWxlKSA6IHVua25vd247CiAgICAgIH07CgogICAgICBzY2FsZS5jb3B5ID0gZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuIG9yZGluYWwoZG9tYWluLCByYW5nZSkudW5rbm93bih1bmtub3duKTsKICAgICAgfTsKCiAgICAgIGluaXRSYW5nZS5hcHBseShzY2FsZSwgYXJndW1lbnRzKTsKCiAgICAgIHJldHVybiBzY2FsZTsKICAgIH0KCiAgICBmdW5jdGlvbiBiYW5kKCkgewogICAgICB2YXI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KCkucmV2ZXJzZSgpOwogICAgICAgIHJhbmdlID0gcmFuZ2Uuc2xpY2UoKS5yZXZlcnNlKCk7CiAgICAgIH0KCiAgICAgIHdoaWxlICgrK2kgPCBqKSB7CiAgICAgICAgZFtpXSA9IG5vcm1hbGl6ZShkb21haW5baV0sIGRvbWFpbltpICsgMV0pOwogICAgICAgIHJbaV0gPSBpbnRlcnBvbGF0ZShyYW5nZVtpXSwgcmFuZ2VbaSArIDFdKTsKICAgICAgfQoKICAgICAgcmV0dXJuIGZ1bmN0aW9uKHgpIHsKICAgICAgICB2YXIgaSA9IGJpc2VjdFJpZ2h0KGRvbWFpbiwgeCwgMSwgaikgLSAxOwogICAgICAgIHJldHVybiByW2ldKGRbaV0oeCkpOwogICAgICB9OwogICAgfQoKICAgIGZ1bmN0aW9uIGNvcHkoc291cmNlLCB0YXJnZXQpIHsKICAgICAgcmV0dXJuIHRhcmdldAogICAgICAgICAgLmRvbWFpbihzb3VyY2UuZG9tYWluKCkpCiAgICAgICAgICAucmFuZ2Uoc291cmNlLnJhbmdlKCkpCiAgICAgICAgICAuaW50ZXJwb2xhdGUoc291cmNlLmludGVycG9sYXRlKCkpCiAgICAgICAgICAuY2xhbXAoc291cmNlLmNsYW1wKCkpCiAgICAgICAgICAudW5rbm93bihzb3VyY2UudW5rbm93bigpKTsKICAgIH0KCiAgICBmdW5jdGlvbiB0cmFuc2Zvcm1lcigpIHsKICAgICAgdmFyIGRvbWFpbiA9IHVuaXQsCiAgICAgICAgICByYW5nZSA9IHVuaXQsCiAgICAgICAgICBpbnRlcnBvbGF0ZSA9IGludGVycG9sYXRlVmFsdWUsCiAgICAgICAgICB0cmFuc2Zvcm0sCiAgICAgICAgICB1bnRyYW5zZm9ybSwKICAgICAgICAgIHVua25vd24sCiAgICAgICAgICBjbGFtcCA9IGlkZW50aXR5JDUsCiAgICAgICAgICBwaWVjZXdpc2UsCiAgICAgICAgICBvdXRwdXQsCiAgICAgICAgICBpbnB1dDsKCiAgICAgIGZ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udCksCiAgICAgICAgICBwcmVjaXNpb247CiAgICAgIHNwZWNpZmllciA9IGZvcm1hdFNwZWNpZmllcihzcGVjaWZpZXIgPT0gbnVsbCA/ICIsZiIgOiBzcGVjaWZpZXIpOwogICAgICBzd2l0Y2ggKHNwZWNpZmllci50eXBlKSB7CiAgICAgICAgY2FzZSAicyI6IHsKICAgICAgICAgIHZhciB2YWx1ZSA9IE1hdGgubWF4KE1hdGguYWJzKHN0YXJ0KSwgTWF0aC5hYnMoc3RvcCkpOwogICAgICAgICAgaWYgKHNwZWNpZmllci5wcmVjaXNpb24gPT0gbnVsbCAmJiAhaXNOYU4ocHJlY2lzaW9uID0gcHJlY2lzaW9uUHJlZml4KHN0ZXAsIHZhbHVlKSkpIHNwZWNpZmllci5wcmVjaXNpb24gPSBwcmVjaXNpb247CiAgICAgICAgICByZXR1cm4gZm9ybWF0UHJlZml4KHNwZWNpZmllciwgdmFsdWUpOwogICAgICAgIH0KICAgICAgICBjYXNlICIiOgogICAgICAgIGNhc2UgImUiOgogICAgICAgIGNhc2UgImciOgogICAgICAgIGNhc2UgInAiOgogICAgICAgIGNhc2UgInIiOiB7CiAgICAgICAgICBpZiAoc3BlY2lmaWVyLnByZWNpc2lvbiA9PSBudWxsICYmICFpc05hTihwcmVjaXNpb24gPSBwcmVjaXNpb25Sb3VuZChzdGVwLCBNYXRoLm1heChNYXRoLmFicyhzdGFydCksIE1hdGguYWJzKHN0b3ApKSkpKSBzcGVjaWZpZXIucHJlY2lzaW9uID0gcHJlY2lzaW9uIC0gKHNwZWNpZmllci50eXBlID09PSAiZSIpOwogICAgICAgICAgYnJlYWs7CiAgICAgICAgfQogICAgICAgIGNhc2UgImYiOgogICAgICAgIGNhc2UgIiUiOiB7CiAgICAgICAgICBpZiAoc3BlY2lmaWVyLnByZWNpc2lvbiA9PSBudWxsICYmICFpc05hTihwcmVjaXNpb24gPSBwcmVjaXNpb25GaXhlZChzdGVwKSkpIHNwZWNpZmllci5wcmVjaXNpb24gPSBwcmVjaXNpb24gLSAoc3BlY2lmaWVyLnR5cGUgPT09ICIlIikgKiAyOwogICAgICAgICAgYnJlYWs7CiAgICAgICAgfQogICAgICB9CiAgICAgIHJldHVybiBmb3JtYXQoc3BlY2lmaWVyKTsKICAgIH0KCiAgICBmdW5jdGlvbiBsaW5lYXJpc2goc2NhbGUpIHsKICAgICAgdmFyIGRvbWFpbiA9IHNjYWxlLmRvbWFpbjsKCiAgICAgIHNjYWxlLnRpY2tzID0gZnVuY3Rpb24oY291bnQpIHsKICAgICAgICB2YXIgZCA9IGRvbWFpbigpOwogICAgICAgIHJldHVybiB0aWNrcyhkWzBdLCBkW2QubGVuZ3RoIC0gMV0sIGNvdW50ID09IG51bGwgPyAxMCA6IGNvdW50KTsKICAgICAgfTsKCiAgICAgIHNjYWxlLnRpY2tGb3JtYXQgPSBmdW5jdGlvbihjb3VudCwgc3BlY2lmaWVyKSB7CiAgICAgICAgdmFyIGQgPSBkb21haW4oKTsKICAgICAgICByZXR1cm4gdGlja0Zvcm1hdChkWzBdLCBkW2QubGVuZ3RoIC0gMV0sIGNvdW50ID09IG51bGwgPyAxMCA6IGNvdW50LCBzcGVjaWZpZXIpOwogICAgICB9OwoKICAgICAgc2NhbGUubmljZSA9IGZ1bmN0aW9uKGNvdW50KSB7CiAgICAgICAgaWYgKGNvdW50ID09IG51bGwpIGNvdW50ID0gMTA7CgogICAgICAgIHZhciBkID0gZG9tYWluKCksCiAgICAgICAgICAgIGkwID0gMCwKICAgICAgICAgICAgaTEgPSBkLmxlbmd0aCAtIDEsCiAgICAgICAgICAgIHN0YXJ0ID0gZFtpMF0sCiAgICAgICAgICAgIHN0b3AgPSBkW2kxXSwKICAgICAgICAgICAgc3RlcDsKCiAgICAgICAgaWYgKHN0b3AgPCBzdGFydCkgewogICAgICAgICAgc3RlcCA9IHN0YXJ0LCBzdGFydCA9IHN0b3AsIHN0b3AgPSBzdGVwOwogICAgICAgICAgc3RlcCA9IGkwLCBpMCA9IGkxLCBpMSA9IHN0ZXA7CiAgICAgICAgfQoKICAgICAgICBzdGVwID0gdGlja0luY3JlbWVudChzdGFydCwgc3RvcCwgY291bnQpOwoKICAgICAgICBpZiAoc3RlcCA+IDApIHsKICAgICAgICAgIHN0YXJ0ID0gTWF0aC5mbG9vcihzdGFydCAvIHN0ZXApICogc3RlcDsKICAgICAgICAgIHN0b3AgPSBNYXRoLmNlaWwoc3RvcCAvIHN0ZXApICogc3RlcDsKICAgICAgICAgIHN0ZXAgPSB0aWNrSW5jcmVtZW50KHN0YXJ0LCBzdG9wLCBjb3VudCk7CiAgICAgICAgfSBlbHNlIGlmIChzdGVwIDwgMCkgewogICAgICAgICAgc3RhcnQgPSBNYXRoLmNlaWwoc3RhcnQgKiBzdGVwKSAvIHN0ZXA7CiAgICAgICAgICBzdG9wID0gTWF0aC5mbG9vcihzdG9wICogc3RlcCkgLyBzdGVwOwogICAgICAgICAgc3RlcCA9IHRpY2tJbmNyZW1lbnQoc3RhcnQsIHN0b3AsIGNvdW50KTsKICAgICAgICB9CgogICAgICAgIGlmIChzdGVwID4gMCkgewogICAgICAgICAgZFtpMF0gPSBNYXRoLmZsb29yKHN0YXJ0IC8gc3RlcCkgKiBzdGVwOwogICAgICAgICAgZFtpMV0gPSBNYXRoLmNlaWwoc3RvcCAvIHN0ZXApICogc3RlcDsKICAgICAgICAgIGRvbWFpbihkKTsKICAgICAgICB9IGVsc2UgaWYgKHN0ZXAgPCAwKSB7CiAgICAgICAgICBkW2kwXSA9IE1hdGguY2VpbChzdGFydCAqIHN0ZXApIC8gc3RlcDsKICAgICAgICAgIGRbaTFdID0gTWF0aC5mbG9vcihzdG9wICogc3RlcCkgLyBzdGVwOwogICAgICAgICAgZG9tYWluKGQpOwogICAgICAgIH0KCiAgICAgICAgcmV0dXJuIHNjYWxlOwogICAgICB9OwoKICAgICAgcmV0dXJuIHNjYWxlOwogICAgfQoKICAgIGZ1bmN0aW9uIGxpbmVhciQxKCkgewogICAgICB2YXIgc2NhbGUgPSBj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iB0aGlzLl9jb250ZXh0Lm1vdmVUbyh4LCB5KTsgYnJlYWs7CiAgICAgICAgICBjYXNlIDE6IHRoaXMuX3BvaW50ID0gMjsgLy8gcHJvY2VlZAogICAgICAgICAgZGVmYXVsdDogdGhpcy5fY29udGV4dC5saW5lVG8oeCwgeSk7IGJyZWFrOwogICAgICAgIH0KICAgICAgfQogICAgfTsKCiAgICBmdW5jdGlvbiBjdXJ2ZUxpbmVhcihjb250ZXh0KSB7CiAgICAgIHJldHVybiBuZXcgTGluZWFyKGNvbnRleHQpOwogICAgfQoKICAgIGZ1bmN0aW9uIHgocCkgewogICAgICByZXR1cm4gcFswXTsKICAgIH0KCiAgICBmdW5jdGlvbiB5KHApIHsKICAgICAgcmV0dXJuIHBbMV07CiAgICB9CgogICAgZnVuY3Rpb24gbGluZSgpIHsKICAgICAgdmFyIHgkMSA9IHgsCiAgICAgICAgICB5JDEgPSB5LAogICAgICAgICAgZGVmaW5lZCA9IGNvbnN0YW50JDUodHJ1ZSksCiAgICAgICAgICBjb250ZXh0ID0gbnVsbCwKICAgICAgICAgIGN1cnZlID0gY3VydmVMaW5lYXIsCiAgICAgICAgICBvdXRwdXQgPSBudWxsOwoKICAgICAgZnVuY3Rpb24gbGluZShkYXRhKSB7CiAgICAgICAgdmFyIGksCiAgICAgICAgICAgIG4gPSBkYXRhLmxlbmd0aCwKICAgICAgICAgICAgZCwKICAgICAgICAgICAgZGVmaW5lZDAgPSBmYWxzZSwKICAgICAgICAgICAgYnVmZmVyOwoKICAgICAgICBpZiAoY29udGV4dCA9PSBudWxsKSBvdXRwdXQgPSBjdXJ2ZShidWZmZXIgPSBwYXRoKCkpOwoKICAgICAgICBmb3IgKGkgPSAwOyBpIDw9IG47ICsraSkgewogICAgICAgICAgaWYgKCEoaSA8IG4gJiYgZGVmaW5lZChkID0gZGF0YVtpXSwgaSwgZGF0YSkpID09PSBkZWZpbmVkMCkgewogICAgICAgICAgICBpZiAoZGVmaW5lZDAgPSAhZGVmaW5l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b24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKF8gPT0gbnVsbCA/IGNvbnRleHQgPSBvdXRwdXQgPSBudWxsIDogb3V0cHV0ID0gY3VydmUoY29udGV4dCA9IF8pLCBsaW5lKSA6IGNvbnRleHQ7CiAgICAgIH07CgogICAgICByZXR1cm4gbGluZTsKICAgIH0KCiAgICBmdW5jdGlvbiBhcmVhKCkgewogICAgICB2YXIgeDAgPSB4LAogICAgICAgICAgeDEgPSBudWxsLAogICAgICAgICAgeTAgPSBjb25zdGFudCQ1KDApLAogICAgICAgICAgeTEgPSB5LAogICAgICAgICAgZGVmaW5lZCA9IGNvbnN0YW50JDUodHJ1ZSksCiAgICAgICAgICBjb250ZXh0ID0gbnVsbCwKICAgICAgICAgIGN1cnZlID0gY3VydmVMaW5lYXIsCiAgICAgICAgICBvdXRwdXQgPSBudWxsOwoKICAgICAgZnVuY3Rpb24gYXJlYShkYXRhKSB7CiAgICAgICAgdmFyIGksCiAgICAgICAgICAgIGosCiAgICAgICAgICAgIGssCiAgICAgICAgICAgIG4gPSBkYXRhLmxlbmd0aCwKICAgICAgICAgICAgZCwKICAgICAgICAgICAgZGVmaW5lZDAgPSBmYWxzZSwKICAgICAgICAgICAgYnVmZmVyLAogICAgICAgICAgICB4MHogPSBuZXcgQXJyYXkobiksCiAgICAgICAgICAgIHkweiA9IG5ldyBBcnJheShuKTsKCiAgICAgICAgaWYgKGNvbnRleHQgPT0gbnVsbCkgb3V0cHV0ID0gY3VydmUoYnVmZmVyID0gcGF0aCgpKTsKCiAgICAgICAgZm9yIChpID0gMDsgaSA8PSBuOyArK2kpIHsKICAgICAgICAgIGlmICghKGkgPCBuICYmIGRlZmluZWQoZCA9IGRhdGFbaV0sIGksIGRhdGEpKSA9PT0gZGVmaW5lZDApIHsKICAgICAgICAgICAgaWYgKGRlZmluZWQwID0gIWRlZmluZWQwKSB7CiAgICAgICAgICAgICAgaiA9IGk7CiAgICAgICAgICAgICAgb3V0cHV0LmFyZWFTdGFydCgpOwogICAgICAgICAgICAgIG91dHB1dC5saW5lU3RhcnQoKTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICBvdXRwdXQubGluZUVuZCgpOwogICAgICAgICAgICAgIG91dHB1dC5saW5lU3RhcnQoKTsKICAgICAgICAgICAgICBmb3IgKGsgPSBpIC0gMTsgayA+PSBqOyAtLWspIHsKICAgICAgICAgICAgICAgIG91dHB1dC5wb2ludCh4MHpba10sIHkweltrXSk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIG91dHB1dC5saW5lRW5kKCk7CiAgICAgICAgICAgICAgb3V0cHV0LmFyZWFFbmQoKTsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgICAgaWYgKGRlZmluZWQwKSB7CiAgICAgICAgICAgIHgweltpXSA9ICt4MChkLCBpLCBkYXRhKSwgeTB6W2ldID0gK3kwKGQsIGksIGRhdGEpOwogICAgICAgICAgICBvdXRwdXQucG9pbnQoeDEgPyAreDEoZCwgaSwgZGF0YSkgOiB4MHpbaV0sIHkxID8gK3kxKGQsIGksIGRhdGEpIDogeTB6W2ldKTsKICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIGlmIChidWZmZXIpIHJldHVybiBvdXRwdXQgPSBudWxsLCBidWZmZXIgKyAiIiB8fCBudWxsOwogICAgICB9CgogICAgICBmdW5jdGlvbiBhcmVhbGluZSgpIHsKICAgICAgICByZXR1cm4gbGluZSgpLmRlZmluZWQoZGVmaW5lZCkuY3VydmUoY3VydmUpLmNvbnRleHQoY29udGV4dCk7CiAgICAgIH0KCiAgICAgIGFyZWEueCA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/ICh4MCA9IHR5cGVvZiBfID09PSAiZnVuY3Rpb24iID8gXyA6IGNvbnN0YW50JDUoK18pLCB4MSA9IG51bGwsIGFyZWEpIDogeDA7CiAgICAgIH07CgogICAgICBhcmVhLngwID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHgwID0gdHlwZW9mIF8gPT09ICJmdW5jdGlvbiIgPyBfIDogY29uc3RhbnQkNSgrXyksIGFyZWEpIDogeDA7CiAgICAgIH07CgogICAgICBhcmVhLngxID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHgxID0gXyA9PSBudWxsID8gbnVsbCA6IHR5cGVvZiBfID09PSAiZnVuY3Rpb24iID8gXyA6IGNvbnN0YW50JDUoK18pLCBhcmVhKSA6IHgxOwogICAgICB9OwoKICAgICAgYXJlYS55ID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKHkwID0gdHlwZW9mIF8gPT09ICJmdW5jdGlvbiIgPyBfIDogY29uc3RhbnQkNSgrXyksIHkxID0gbnVsbCwgYXJlYSkgOiB5MDsKICAgICAgfTsKCiAgICAgIGFyZWEueTAgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoeTAgPSB0eXBlb2YgXyA9PT0gImZ1bmN0aW9uIiA/IF8gOiBjb25zdGFudCQ1KCtfKSwgYXJlYSkgOiB5MDsKICAgICAgfTsKCiAgICAgIGFyZWEueTEgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoeTEgPSBfID09IG51bGwgPyBudWxsIDogdHlwZW9mIF8gPT09ICJmdW5jdGlvbiIgPyBfIDogY29uc3RhbnQkNSgrXyksIGFyZWEpIDogeTE7CiAgICAgIH07CgogICAgICBhcmVhLmxpbmVYMCA9CiAgICAgIGFyZWEubGluZVkwID0gZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuIGFyZWFsaW5lKCkueCh4MCkueSh5MCk7CiAgICAgIH07CgogICAgICBhcmVhLmxpbmVZMSA9IGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiBhcmVhbGluZSgpLngoeDApLnkoeTEpOwogICAgICB9OwoKICAgICAgYXJlYS5saW5lWDEgPSBmdW5jdGlvbigpIHsKICAgICAgICByZXR1cm4gYXJlYWxpbmUoKS54KHgxKS55KHkwKTsKICAgICAgfTsKCiAgICAgIGFyZWEuZGVmaW5lZCA9IGZ1bmN0aW9uKF8pIHsKICAgICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChkZWZpbmVkID0gdHlwZW9mIF8gPT09ICJmdW5jdGlvbiIgPyBfIDogY29uc3RhbnQkNSghIV8pLCBhcmVhKSA6IGRlZmluZWQ7CiAgICAgIH07CgogICAgICBhcmVhLmN1cnZlID0gZnVuY3Rpb24oXykgewogICAgICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKGN1cnZlID0gXywgY29udGV4dCAhPSBudWxsICYmIChvdXRwdXQgPSBjdXJ2ZShjb250ZXh0KSksIGFyZWEpIDogY3VydmU7CiAgICAgIH07CgogICAgICBhcmVhLmNvbnRleHQgPSBmdW5jdGlvbihfKSB7CiAgICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoXyA9PSBudWxsID8gY29udGV4dCA9IG91dHB1dCA9IG51bGwgOiBvdXRwdXQgPSBjdXJ2ZShjb250ZXh0ID0gXyksIGFyZWEpIDogY29udGV4dDsKICAgICAgfTsKCiAgICAgIHJldHVybiBhcmVhOwogICAgfQoKICAgIGZ1bmN0aW9uIHBvaW50JDIodGhhdCwgeCwgeSkgewogICAgICB0aGF0Ll9jb250ZXh0LmJlemllckN1cnZlVG8oCiAgICAgICAgdGhhdC5feDEgKyB0aGF0Ll9rICogKHRoYXQuX3gyIC0gdGhhdC5feDApLAogICAgICAgIHRoYXQuX3kxICsgdGhhdC5fayAqICh0aGF0Ll95MiAtIHRoYXQuX3kwKSwKICAgICAgICB0aGF0Ll94MiArIHRoYXQuX2sgKiAodGhhdC5feDEgLS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saW5lOwogICAgICB9LAogICAgICBwb2ludDogZnVuY3Rpb24oeCwgeSkgewogICAgICAgIHggPSAreCwgeSA9ICt5OwogICAgICAgIHN3aXRjaCAodGhpcy5fcG9pbnQpIHsKICAgICAgICAgIGNhc2UgMDogdGhpcy5fcG9pbnQgPSAxOyB0aGlzLl9saW5lID8gdGhpcy5fY29udGV4dC5saW5lVG8oeCwgeSkgOiB0aGlzLl9jb250ZXh0Lm1vdmVUbyh4LCB5KTsgYnJlYWs7CiAgICAgICAgICBjYXNlIDE6IHRoaXMuX3BvaW50ID0gMjsgdGhpcy5feDEgPSB4LCB0aGlzLl95MSA9IHk7IGJyZWFrOwogICAgICAgICAgY2FzZSAyOiB0aGlzLl9wb2ludCA9IDM7IC8vIHByb2NlZWQKICAgICAgICAgIGRlZmF1bHQ6IHBvaW50JDIodGhpcywgeCwgeSk7IGJyZWFrOwogICAgICAgIH0KICAgICAgICB0aGlzLl94MCA9IHRoaXMuX3gxLCB0aGlzLl94MSA9IHRoaXMuX3gyLCB0aGlzLl94MiA9IHg7CiAgICAgICAgdGhpcy5feTAgPSB0aGlzLl95MSwgdGhpcy5feTEgPSB0aGlzLl95MiwgdGhpcy5feTIgPSB5OwogICAgICB9CiAgICB9OwoKICAgIGZ1bmN0aW9uIHBvaW50JDModGhhdCwgeCwgeSkgewogICAgICB2YXIgeDEgPSB0aGF0Ll94MSwKICAgICAgICAgIHkxID0gdGhhdC5feTEsCiAgICAgICAgICB4MiA9IHRoYXQuX3gyLAogICAgICAgICAgeTIgPSB0aGF0Ll95MjsKCiAgICAgIGlmICh0aGF0Ll9sMDFfYSA+IGVwc2lsb24kMikgewogICAgICAgIHZhciBhID0gMiAqIHRoYXQuX2wwMV8yYSArIDMgKiB0aGF0Ll9sMDFfYSAqIHRoYXQuX2wxMl9hICsgdGhhdC5fbDEyXzJhLAogICAgICAgICAgICBuID0gMyAqIHRoYXQuX2wwMV9hICogKHRoYXQuX2wwMV9hICsgdGhhdC5fbDEyX2EpOw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ICAgbGluZVN0YXJ0OiBmdW5jdGlvbigpIHsKICAgICAgICB0aGlzLl94MCA9IHRoaXMuX3gxID0gdGhpcy5feDIgPQogICAgICAgIHRoaXMuX3kwID0gdGhpcy5feTEgPSB0aGlzLl95MiA9IE5hTjsKICAgICAgICB0aGlzLl9sMDFfYSA9IHRoaXMuX2wxMl9hID0gdGhpcy5fbDIzX2EgPQogICAgICAgIHRoaXMuX2wwMV8yYSA9IHRoaXMuX2wxMl8yYSA9IHRoaXMuX2wyM18yYSA9CiAgICAgICAgdGhpcy5fcG9pbnQgPSAwOwogICAgICB9LAogICAgICBsaW5lRW5kOiBmdW5jdGlvbigpIHsKICAgICAgICBzd2l0Y2ggKHRoaXMuX3BvaW50KSB7CiAgICAgICAgICBjYXNlIDI6IHRoaXMuX2NvbnRleHQubGluZVRvKHRoaXMuX3gyLCB0aGlzLl95Mik7IGJyZWFrOwogICAgICAgICAgY2FzZSAzOiB0aGlzLnBvaW50KHRoaXMuX3gyLCB0aGlzLl95Mik7IGJyZWFrOwogICAgICAgIH0KICAgICAgICBpZiAodGhpcy5fbGluZSB8fCAodGhpcy5fbGluZSAhPT0gMCAmJiB0aGlzLl9wb2ludCA9PT0gMSkpIHRoaXMuX2NvbnRleHQuY2xvc2VQYXRoKCk7CiAgICAgICAgdGhpcy5fbGluZSA9IDEgLSB0aGlzLl9saW5lOwogICAgICB9LAogICAgICBwb2ludDogZnVuY3Rpb24oeCwgeSkgewogICAgICAgIHggPSAreCwgeSA9ICt5OwoKICAgICAgICBpZiAodGhpcy5fcG9pbnQpIHsKICAgICAgICAgIHZhciB4MjMgPSB0aGlzLl94MiAtIHgsCiAgICAgICAgICAgICAgeTIzID0gdGhpcy5feTIgLSB5OwogICAgICAgICAgdGhpcy5fbDIzX2EgPSBNYXRoLnNxcnQodGhpcy5fbDIzXzJhID0gTWF0aC5wb3coeDIzICogeDIzICsgeTIzICogeTIzLCB0aGlzLl9hbHBoYSkpOwogICAgICAgIH0KCiAgICAgICAgc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9IG5ldyBTZXQoYWN0aXZlUnVucyk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHN0cmlwcGVkTWV0cmljID0gc3RyaXBNZXRyaWNTdHJpbmcobWV0cmljTmFtZSk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGV4dHJlbWVWYWx1ZXMgPSB7IG1heDogLTEuMCwgbWluOiAxLjAgfTsKICAgICAgICBPYmplY3QudmFsdWVzKGFubm90YXRpb25EYXRhKS5mb3JFYWNoKCgvKioKICAgICAgICAgKiBAcGFyYW0gez99IGFubm90YXRpb25FbnRyeQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgKGFubm90YXRpb25FbnRyeSkgPT4gewogICAgICAgICAgICBhbm5vdGF0aW9uRW50cnkuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWVEYXRhRWxlbWVudAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHZhbHVlRGF0YUVsZW1lbnQpID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHJ1biA9IHZhbHVlRGF0YUVsZW1lbnQucnVuOwogICAgICAgICAgICAgICAgaWYgKCFhbGxSdW5zLmhhcyhydW4pIHx8IHZhbHVlRGF0YUVsZW1lbnQubWV0cmljICE9PSBzdHJpcHBlZE1ldHJpYykgewogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmICh2YWx1ZURhdGFFbGVtZW50Lm5QTUlWYWx1ZSA9PT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIGlmIChoaXN0b2dyYW1EYXRhTnVsbFtydW5dKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGhpc3RvZ3JhbURhdGFOdWxsW3J1bl0ucHVzaChudWxsKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGhpc3RvZ3JhbURhdGFOdWxsW3J1bl0gPSBbbnVsbF07CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IG5QTUlWYWx1ZSA9IHZhbHVlRGF0YUVsZW1lbnQublBNSVZhbHVlOwogICAgICAgICAgICAgICAgICAgIGV4dHJlbWVWYWx1ZXMubWF4ID0KICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmVtZVZhbHVlcy5tYXggPCBuUE1JVmFsdWUgPyBuUE1JVmFsdWUgOiBleHRyZW1lVmFsdWVzLm1heDsKICAgICAgICAgICAgICAgICAgICBleHRyZW1lVmFsdWVzLm1pbiA9CiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJlbWVWYWx1ZXMubWluID4gblBNSVZhbHVlID8gblBNSVZhbHVlIDogZXh0cmVtZVZhbHVlcy5taW47CiAgICAgICAgICAgICAgICAgICAgaWYgKGhpc3RvZ3JhbURhdGFbdmFsdWVEYXRhRWxlbWVudC5ydW5dKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGhpc3RvZ3JhbURhdGFbcnVuXS5wdXNoKG5QTUlWYWx1ZSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICBoaXN0b2dyYW1EYXRhW3J1bl0gPSBbblBNSVZhbHVlXTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9KSk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHJlc3VsdCA9IHt9OwogICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICBjb25zdCBiaW4gPSBoaXN0b2dyYW0oKQogICAgICAgICAgICAuZG9tYWluKFtleHRyZW1lVmFsdWVzLm1pbiwgZXh0cmVtZVZhbHVlcy5tYXhdKQogICAgICAgICAgICAudmFsdWUoKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgKGQpID0+IGQpKTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgYmluTmFOID0gaGlzdG9ncmFtKCkKICAgICAgICAgICAgLmRvbWFpbihbLUluZmluaXR5LCBJbmZpbml0eV0pCiAgICAgICAgICAgIC50aHJlc2hvbGRzKDApCiAgICAgICAgICAgIC52YWx1ZSgoLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAoZCkgPT4gZCkpOwogICAgICAgIGZvciAoY29uc3QgcnVuIG9mIGFsbFJ1bnMpIHsKICAgICAgICAgICAgcmVzdWx0W3J1bl0gPSBiaW4oaGlzdG9ncmFtRGF0YVtydW5dKTsKICAgICAgICAgICAgaWYgKGhpc3RvZ3JhbURhdGFOdWxsW3J1bl0pIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGJ1Y2tldHMgPSBiaW5OYU4oaGlzdG9ncmFtRGF0YU51bGxbcnVuXSk7CiAgICAgICAgICAgICAgICByZXN1bHRbcnVuXS51bnNoaWZ0KGJ1Y2tldHNbMF0pOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiB7IHZpb2xpbkRhdGE6IHJlc3VsdCwgZXh0cmVtZXM6IGV4dHJlbWVWYWx1ZXMgfTsKICAgIH0KCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZX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XzI7CiAgICB9CiAgICBlbHNlIHsKICAgICAgICBJMThOXzEkMSA9ICRsb2NhbGl6ZSBgOkxhYmVsIGZvciBhIGJ1dHRvbiB0aGF0IHJlbW92ZXMgYSBtZXRyaWMgZmlsdGVyLuKQn2E2YmZhZDU4YmIzNjNkNWM4OTFkMGE1NDc0YjFkNzdlZjkwYTM0ZGHikJ84NDU0OTYxNzk3NzYyOTA3NjI0OlJlbW92ZSBGaWx0ZXJgOwogICAgfQogICAgY29uc3QgX2MzJDQgPSBbImFyaWEtbGFiZWwiLCBJMThOXzEkMV07CiAgICBjbGFzcyBWaW9saW5GaWx0ZXJDb21wb25lbnQgewogICAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgICAgICB0aGlzLm9uUmVtb3ZlID0gbmV3IEV2ZW50RW1pdHRlcigpOwogICAgICAgICAgICB0aGlzLm9uVXBkYXRlRmlsdGVyID0gbmV3IEV2ZW50RW1pdHRlcigpOwogICAgICAgICAgICB0aGlzLmhlaWdodCA9IDMwMDsKICAgICAgICAgICAgdGhpcy5jaGFydFdpZHRoID0gMDsKICAgICAgICAgICAgdGhpcy5jaGFydEhlaWdodCA9IDA7CiAgICAgICAgICAgIHRoaXMuZHJhd0hlaWdodCA9IDA7CiAgICAgICAgICAgIHRoaXMuZHJhd1dpZHRoID0gMDsKICAgICAgICAgICAgdGhpcy5tYXJnaW4gPSB7IHRvcDogMjAsIHJpZ2h0OiAxMCwgYm90dG9tOiAyMCwgbGVmdDogMTAgfTsKICAgICAgICAgICAgdGhpcy5kcmF3TWFyZ2luID0geyB0b3A6IDAsIHJpZ2h0OiAwLCBib3R0b206IDIwLCBsZWZ0OiAyMCB9OwogICAgICAgICAgICB0aGlzLmNvbG9yU2NhbGUgPSAoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiAnIzMzMzMzMycpOwogICAgICAgICAgICAvLyBCcnVzaAogICAgICAgICAgICB0aGlzLmJydXNoID0gYnJ1c2hZKCk7CiAgICAgICAgICAgIHRoaXMubWF4QmluU2l6ZSA9IDA7CiAgICAgICAgICAgIHRoaXMuYXJlYSA9IGFyZWEoKQogICAgICAgICAgICAgICAgLngwKCgvKioKICAgICAgICAgICAgICogQHRoaXMgez99CiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZnVuY3Rpb24gKGQpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLnhTY2FsZU51bSgtZC5sZW5ndGgpOwogICAgICAgICAgICB9KS5iaW5kKHRoaXMpKQogICAgICAgICAgICAgICAgLngxKCgvKioKICAgICAgICAgICAgICogQHRoaXMgez99CiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZnVuY3Rpb24gKGQpIHsKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLnhTY2FsZU51bShkLmxlbmd0aCk7CiAgICAgICAgICAgIH0pLmJpbmQodGhpcykpCiAgICAgICAgICAgICAgICAueSgoLyoqCiAgICAgICAgICAgICAqIEB0aGlzIHs/fQogICAgICAgICAgICAgKiBAcGFyYW0gez99IGQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGZ1bmN0aW9uIChkKSB7CiAgICAgICAgICAgICAgICBpZiAoKC8qKiBAdHlwZSB7P30gKi8gKGQueDApKSA9PT0gLUluZmluaXR5KSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuY2hhcnRIZWlnaHQgLSB0aGlzLmRyYXdNYXJnaW4udG9wOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMueVNjYWxlKCgoLyoqIEB0eXBlIHs/fSAqLyAoZC54MSkpICsgKC8qKiBAdHlwZSB7P30gKi8gKGQueDApKSkgLyAyLjApOwogICAgICAgICAgICB9KS5iaW5kKHRoaXMpKQogICAgICAgICAgICAgICAgLmN1cnZlKGNhdG11bGxSb20pOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nQWZ0ZXJWaWV3SW5pdCgpIHsKICAgICAgICAgICAgdGhpcy51cGRhdGVEaW1lbnNpb25zKCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcnVuc0NvbG9yU2NhbGUgPSAoKC8qKiBAdHlwZSB7P30gKi8gKGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ3RmLWNvbG9yLXNjYWxlJykpKSkucnVuc0NvbG9yU2NhbGU7CiAgICAgICAgICAgIHRoaXMuY29sb3JTY2FsZSA9IHJ1bnNDb2xvclNjYWxlID8gcnVuc0NvbG9yU2NhbGUgOiB0aGlzLmNvbG9yU2NhbGU7CiAgICAgICAgICAgIHRoaXMuc3ZnID0gc2VsZWN0JDEodGhpcy5jaGFydENvbnRhaW5lci5uYXRpdmVFbGVtZW50KS5zZWxlY3QoJ3N2ZycpOwogICAgICAgICAgICB0aGlzLm1haW5Db250YWluZXIgPSB0aGlzLnN2ZwogICAgICAgICAgICAgICAgLmFwcGVuZCgnZycpCiAgICAgICAgICAgICAgICAuYXR0cigndHJhbnNmb3JtJywgYHRyYW5zbGF0ZSgke3RoaXMubWFyZ2luLmxlZnR9LCAke3RoaXMubWFyZ2luLnRvcH0pYCk7CiAgICAgICAgICAgIHRoaXMuZHJhd0NvbnRhaW5lciA9IHRoaXMubWFpbkNvbnRhaW5lcgogICAgICAgICAgICAgICAgLmFwcGVuZCgnZycpCiAgICAgICAgICAgICAgICAuYXR0cigndHJhbnNmb3JtJywgYHRyYW5zbGF0ZSgke3RoaXMuZHJhd01hcmdpbi5sZWZ0fSwgJHt0aGlzLmRyYXdNYXJnaW4udG9wfSlgKTsKICAgICAgICAgICAgdGhpcy5kb3RzR3JvdXAgPSB0aGlzLmRyYXdDb250YWluZXIuYXBwZW5kKCdnJykuYXR0cignY2xhc3MnLCAnZG90c0dyb3VwJyk7CiAgICAgICAgICAgIHRoaXMueUF4aXNHcm91cCA9IHRoaXMubWFpbkNvbnRhaW5lcgogICAgICAgICAgICAgICAgLmFwcGVuZCgnZycpCiAgICAgICAgICAgICAgICAuYXR0cignY2xhc3MnLCAnYXhpcyBheGlzLS15Jyk7CiAgICAgICAgICAgIHRoaXMueEF4aXNHcm91cCA9IHRoaXMubWFpbkNvbnRhaW5lcgogICAgICAgICAgICAgICAgLmFwcGVuZCgnZycpCiAgICAgICAgICAgICAgICAuYXR0cignY2xhc3MnLCAnYXhpcyBheGlzLS14Jyk7CiAgICAgICAgICAgIHRoaXMubWlzY0dyb3VwID0gdGhpcy5kcmF3Q29udGFpbmVyLmFwcGVuZCgnZycpOwogICAgICAgICAgICB0aGlzLnhTY2FsZSA9IGJhbmQoKS5wYWRkaW5nKDAuMDUpOwogICAgICAgICAgICB0aGlzLnhBeGlzID0gYXhpc0JvdHRvbSh0aGlzLnhTY2FsZSk7CiAgICAgICAgICAgIHRoaXMueVNjYWxlID0gbGluZWFyJDEoKS5yYW5nZShbdGhpcy5kcmF3SGVpZ2h0LCAwXSk7CiAgICAgICAgICAgIHRoaXMueUF4aXMgPSBheGlzTGVmdCh0aGlzLnlTY2FsZSk7CiAgICAgICAgICAgIHRoaXMueFNjYWxlTnVtID0gbGluZWFyJDEoKTsKICAgICAgICAgICAgdGhpcy5pbml0aWFsaXplQnJ1c2goKTsKICAgICAgICAgICAgdGhpcy5kcmF3TWlzYygpOwogICAgICAgICAgICB0aGlzLnJlZHJhdygpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGNoYW5nZXMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25DaGFuZ2VzKGNoYW5nZXMpIHsKICAgICAgICAgICAgaWYgKHRoaXMuc3ZnKSB7CiAgICAgICAgICAgICAgICB0aGlzLnJlZHJhdygpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVkcmF3KCkgewogICAgICAgICAgICB0aGlzLnVwZGF0ZURpbWVuc2lvbnMoKTsKICAgICAgICAgICAgdGhpcy5zZXRNYXhCaW5TaXplKCk7CiAgICAgICAgICAgIHRoaXMudXBkYXRlQXhlcygpOwogICAgICAgICAgICB0aGlzLmRyYXcoKTsKICAgICAgICB9CiAgICAgICAgLy8gSW5pdGlhbGl6aW5nL1VwZGF0aW5nIHRoZSB2aXN1YWxpemF0aW9uIHByb3BzCiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHVwZGF0ZURpbWVuc2lvbnMoKSB7CiAgICAgICAgICAgIHRoaXMuY2hhcnRXaWR0aCA9IHRoaXMud2lkdGggLSB0aGlzLm1hcmdpbi5sZWZ0IC0gdGhpcy5tYXJnaW4ucmlnaHQ7CiAgICAgICAgICAgIHRoaXMuZHJhd1dpZHRoID0KICAgICAgICAgICAgICAgIHRoaXMuY2hhcnRXaWR0aCAtIHRoaXMuZHJhd01hcmdpbi5sZWZ0IC0gdGhpcy5kcmF3TWFyZ2luLnJpZ2h0OwogICAgICAgICAgICB0aGlzLmNoYXJ0SGVpZ2h0ID0gdGhpcy5oZWlnaHQgLSB0aGlzLm1hcmdpbi50b3AgLSB0aGlzLm1hcmdpbi5ib3R0b207CiAgICAgICAgICAgIHRoaXMuZHJhd0hlaWdodCA9CiAgICAgICAgICAgICAgICB0aGlzLmNoYXJ0SGVpZ2h0IC0gdGhpcy5kcmF3TWFyZ2luLnRvcCAtIHRoaXMuZHJhd01hcmdpbi5ib3R0b207CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgc2V0TWF4QmluU2l6ZSgpIHsKICAgICAgICAgICAgT2JqZWN0LnZhbHVlcyh0aGlzLmNoYXJ0RGF0YS52aW9saW5EYXRhKS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBkYXRhRWxlbWVudAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGRhdGFFbGVtZW50KSA9PiB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBsZW5ndGhzID0gZGF0YUVsZW1lbnQubWFwKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gYmluCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoYmluKSA9PiBiaW4ubGVuZ3RoKSk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBsb25nZXN0ID0gTWF0aC5tYXgoLi4ubGVuZ3Rocyk7CiAgICAgICAgICAgICAgICB0aGlzLm1heEJpblNpemUgPSBNYXRoLm1heChsb25nZXN0LCB0aGlzLm1heEJpblNpemUpOwogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdXBkYXRlQXhlcygpIHsKICAgICAgICAgICAgdGhpcy54U2NhbGUKICAgICAgICAgICAgICAgIC5yYW5nZShbMCwgdGhpcy5kcmF3V2lkdGhdKQogICAgICAgICAgICAgICAgLmRvbWFpbihPYmplY3Qua2V5cyh0aGlzLmNoYXJ0RGF0YS52aW9saW5EYXRhKSk7CiAgICAgICAgICAgIHRoaXMueVNjYWxlLmRvbWFpbihbCiAgICAgICAgICAgICAgICB0aGlzLmNoYXJ0RGF0YS5leHRyZW1lcy5taW4sCiAgICAgICAgICAgICAgICB0aGlzLmNoYXJ0RGF0YS5leHRyZW1lcy5tYXgsCiAgICAgICAgICAgIF0pOwogICAgICAgICAgICB0aGlzLnhTY2FsZU51bQogICAgICAgICAgICAgICAgLnJhbmdlKFswLCB0aGlzLnhTY2FsZS5iYW5kd2lkdGgoKV0pCiAgICAgICAgICAgICAgICAuZG9tYWluKFstdGhpcy5tYXhCaW5TaXplLCB0aGlzLm1heEJpblNpemVdKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBpbml0aWFsaXplQnJ1c2goKSB7CiAgICAgICAgICAgIHRoaXMuYnJ1c2gub24oJ2VuZCcsIHRoaXMuYnJ1c2hNb3ZlZC5iaW5kKHRoaXMpKTsKICAgICAgICB9CiAgICAgICAgLy8gRHJhd2luZyBVSQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZHJhdygpIHsKICAgICAgICAgICAgdGhpcy5kcmF3QXhlcygpOwogICAgICAgICAgICB0aGlzLmRyYXdQbG90KCk7CiAgICAgICAgICAgIHRoaXMucmVmcmVzaE1pc2MoKTsKICAgICAgICAgICAgdGhpcy5yZWZyZXNoQnJ1c2goKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkcmF3QXhlcygpIHsKICAgICAgICAgICAgdGhpcy55QXhpc0dyb3VwCiAgICAgICAgICAgICAgICAuYXR0cigndHJhbnNmb3JtJywgYHRyYW5zbGF0ZSgke3RoaXMuZHJhd01hcmdpbi5sZWZ0fSwKICAgICAgJHt0aGlzLmRyYXdNYXJnaW4udG9wfSlgKQogICAgICAgICAgICAgICAgLmNhbGwoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMueUF4aXMpKSk7CiAgICAgICAgICAgIHRoaXMueEF4aXNHcm91cAogICAgICAgICAgICAgICAgLmF0dHIoJ3RyYW5zZm9ybScsIGB0cmFuc2xhdGUoJHt0aGlzLmRyYXdNYXJnaW4ubGVmdH0sCiAgICAgICR7dGhpcy5kcmF3TWFyZ2luLnRvcCArIHRoaXMuY2hhcnRIZWlnaHR9KWApCiAgICAgICAgICAgICAgICAuY2FsbCgoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy54QXhpcykpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkcmF3UGxvdCgpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBwbG90cyA9IHRoaXMuZG90c0dyb3VwCiAgICAgICAgICAgICAgICAuc2VsZWN0QWxsKCcudmlvbGluLXBsb3QnKQogICAgICAgICAgICAgICAgLmRhdGEoT2JqZWN0LmVudHJpZXModGhpcy5jaGFydERhdGEudmlvbGluRGF0YSkpOwogICAgICAgICAgICBwbG90cwogICAgICAgICAgICAgICAgLmVudGVyKCkKICAgICAgICAgICAgICAgIC5hcHBlbmQoJ3BhdGgnKQogICAgICAgICAgICAgICAgLmF0dHIoJ2NsYXNzJywgJ3Zpb2xpbi1wbG90JykKICAgICAgICAgICAgICAgIC5zdHlsZSgnc3Ryb2tlJywgKC8qKgogICAgICAgICAgICAgKiBAdGhpcyB7P30KICAgICAgICAgICAgICogQHBhcmFtIHs/fSBkCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBmdW5jdGlvbiAoZCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuY29sb3JTY2FsZShkWzBdKTsKICAgICAgICAgICAgfSkuYmluZCh0aGlzKSkKICAgICAgICAgICAgICAgIC5zdHlsZSgnZmlsbCcsICgvKioKICAgICAgICAgICAgICogQHRoaXMgez99CiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZnVuY3Rpb24gKGQpIHsKICAgICAgICAgICAgICAgIHJldHVybiBgJHt0aGlzLmNvbG9yU2NhbGUoZFswXSl9MzNgOwogICAgICAgICAgICB9KS5iaW5kKHRoaXMpKQogICAgICAgICAgICAgICAgLmF0dHIoJ3RyYW5zZm9ybScsICgvKioKICAgICAgICAgICAgICogQHRoaXMgez99CiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZnVuY3Rpb24gKGQpIHsKICAgICAgICAgICAgICAgIHJldHVybiBgdHJhbnNsYXRlKCR7dGhpcy54U2NhbGUoZFswXSl9LCAwKWA7CiAgICAgICAgICAgIH0pLmJpbmQodGhpcykpCiAgICAgICAgICAgICAgICAuZGF0dW0oKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGZ1bmN0aW9uIChkKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gZFsxXTsKICAgICAgICAgICAgfSkpCiAgICAgICAgICAgICAgICAuYXR0cignZCcsIHRoaXMuYXJlYSk7CiAgICAgICAgICAgIHBsb3RzCiAgICAgICAgICAgICAgICAuYXR0cigndHJhbnNmb3JtJywgKC8qKgogICAgICAgICAgICAgKiBAdGhpcyB7P30KICAgICAgICAgICAgICogQHBhcmFtIHs/fSBkCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBmdW5jdGlvbiAoZCkgewogICAgICAgICAgICAgICAgcmV0dXJuIGB0cmFuc2xhdGUoJHt0aGlzLnhTY2FsZShkWzBdKX0sIDApYDsKICAgICAgICAgICAgfSkuYmluZCh0aGlzKSkKICAgICAgICAgICAgICAgIC5kYXR1bSgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZnVuY3Rpb24gKGQpIHsKICAgICAgICAgICAgICAgIHJldHVybiBkWzFdOwogICAgICAgICAgICB9KSkKICAgICAgICAgICAgICAgIC5hdHRyKCdkJywgdGhpcy5hcmVhKTsKICAgICAgICAgICAgcGxvdHMuZXhpdCgpLnJlbW92ZSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGRyYXdNaXNjKCkgewogICAgICAgICAgICB0aGlzLnplcm9MaW5lID0gdGhpcy5taXNjR3JvdXAKICAgICAgICAgICAgICAgIC5hcHBlbmQoJ2xpbmUnKQogICAgICAgICAgICAgICAgLnN0eWxlKCdzdHJva2UnLCAnYmxhY2snKQogICAgICAgICAgICAgICAgLmF0dHIoJ3gxJywgMCkKICAgICAgICAgICAgICAgIC5hdHRyKCd5MScsIHRoaXMueVNjYWxlKDApKQogICAgICAgICAgICAgICAgLmF0dHIoJ3gyJywgdGhpcy5kcmF3V2lkdGgpCiAgICAgICAgICAgICAgICAuYXR0cigneTInLCB0aGlzLnlTY2FsZSgwKSk7CiAgICAgICAgICAgIHRoaXMubmFuVGV4dCA9IHRoaXMubWlzY0dyb3VwCiAgICAgICAgICAgICAgICAuYXBwZW5kKCd0ZXh0JykKICAgICAgICAgICAgICAgIC5zdHlsZSgnZmlsbCcsICdibGFjaycpCiAgICAgICAgICAgICAgICAudGV4dCgnTmFOJykKICAgICAgICAgICAgICAgIC5hdHRyKCdmb250LXNpemUnLCAnMTBweCcpCiAgICAgICAgICAgICAgICAuYXR0cigndGV4dC1hbmNob3InLCAnZW5kJykKICAgICAgICAgICAgICAgIC5hdHRyKCdhbGlnbm1lbnQtYmFzZWxpbmUnLCAnbWlkZGxlJykKICAgICAgICAgICAgICAgIC5hdHRyKCd4JywgLTUpCiAgICAgICAgICAgICAgICAuYXR0cigneScsIHRoaXMuY2hhcnRIZWlnaHQgLSB0aGlzLmRyYXdNYXJnaW4udG9wKTsKICAgICAgICAgICAgdGhpcy5uYW5MaW5lID0gdGhpcy5taXNjR3JvdXAKICAgICAgICAgICAgICAgIC5hcHBlbmQoJ2xpbmUnKQogICAgICAgICAgICAgICAgLnN0eWxlKCdzdHJva2UnLCAnZ3JleScpCiAgICAgICAgICAgICAgICAuc3R5bGUoJ3N0cm9rZS1kYXNoYXJyYXknLCAnMywgMycpCiAgICAgICAgICAgICAgICAuYXR0cigneDEnLCAwKQogICAgICAgICAgICAgICAgLmF0dHIoJ3kxJywgdGhpcy5jaGFydEhlaWdodCAtIHRoaXMuZHJhd01hcmdpbi50b3ApCiAgICAgICAgICAgICAgICAuYXR0cigneDInLCB0aGlzLmRyYXdXaWR0aCkKICAgICAgICAgICAgICAgIC5hdHRyKCd5MicsIHRoaXMuY2hhcnRIZWlnaHQgLSB0aGlzLmRyYXdNYXJnaW4udG9wKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZWZyZXNoTWlzYygpIHsKICAgICAgICAgICAgdGhpcy56ZXJvTGluZQogICAgICAgICAgICAgICAgLmF0dHIoJ3kxJywgdGhpcy55U2NhbGUoMCkpCiAgICAgICAgICAgICAgICAuYXR0cigneDInLCB0aGlzLmRyYXdXaWR0aCkKICAgICAgICAgICAgICAgIC5hdHRyKCd5MicsIHRoaXMueVNjYWxlKDApKTsKICAgICAgICAgICAgdGhpcy5uYW5UZXh0LmF0dHIoJ3knLCB0aGlzLmNoYXJ0SGVpZ2h0IC0gdGhpcy5kcmF3TWFyZ2luLnRvcCk7CiAgICAgICAgICAgIHRoaXMubmFuTGluZQogICAgICAgICAgICAgICAgLmF0dHIoJ3kxJywgdGhpcy5kcmF3SGVpZ2h0ICsgdGhpcy5kcmF3TWFyZ2luLnRvcCkKICAgICAgICAgICAgICAgIC5hdHRyKCd4MicsIHRoaXMuZHJhd1dpZHRoKQogICAgICAgICAgICAgICAgLmF0dHIoJ3kyJywgdGhpcy5kcmF3SGVpZ2h0ICsgdGhpcy5kcmF3TWFyZ2luLnRvcCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByZWZyZXNoQnJ1c2goKSB7CiAgICAgICAgICAgIHRoaXMuYnJ1c2guZXh0ZW50KFsKICAgICAgICAgICAgICAgIFswLCAwXSwKICAgICAgICAgICAgICAgIFt0aGlzLmRyYXdXaWR0aCwgdGhpcy5kcmF3SGVpZ2h0ICsgdGhpcy5tYXJnaW4udG9wXSwKICAgICAgICAgICAgXSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgYnJ1c2hQb3NpdGlvbiA9IFswLCB0aGlzLmRyYXdIZWlnaHQgKyB0aGlzLm1hcmdpbi50b3BdOwogICAgICAgICAgICBpZiAodGhpcy5maWx0ZXIubWF4IDwgdGhpcy5maWx0ZXIubWluKSB7CiAgICAgICAgICAgICAgICBpZiAodGhpcy5maWx0ZXIuaW5jbHVkZU5hTikgewogICAgICAgICAgICAgICAgICAgIC8vIE9ubHkgTmFOIHNlbGVjdGVkCiAgICAgICAgICAgICAgICAgICAgYnJ1c2hQb3NpdGlvblswXSA9IHRoaXMueVNjYWxlKHRoaXMuY2hhcnREYXRhLmV4dHJlbWVzLm1pbik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAvLyBOb3RoaW5nIHNlbGVjdGVkCiAgICAgICAgICAgICAgICAgICAgYnJ1c2hQb3NpdGlvblswXSA9IGJydXNoUG9zaXRpb25bMV07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBpZiAoIXRoaXMuZmlsdGVyLmluY2x1ZGVOYU4pIHsKICAgICAgICAgICAgICAgICAgICAvLyBNaW4gZG9lcyBub3QgcmVhY2ggTmFOCiAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgIGNvbnN0IG1pbiA9IE1hdGgubWF4KHRoaXMuY2hhcnREYXRhLmV4dHJlbWVzLm1pbiwgdGhpcy5maWx0ZXIubWluKTsKICAgICAgICAgICAgICAgICAgICBicnVzaFBvc2l0aW9uWzFdID0gdGhpcy55U2NhbGUobWluKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IG1heCA9IE1hdGgubWluKHRoaXMuY2hhcnREYXRhLmV4dHJlbWVzLm1heCwgdGhpcy5maWx0ZXIubWF4KTsKICAgICAgICAgICAgICAgIGJydXNoUG9zaXRpb25bMF0gPSB0aGlzLnlTY2FsZShtYXgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRoaXMuZHJhd0NvbnRhaW5lci5jYWxsKHRoaXMuYnJ1c2gpLmNhbGwodGhpcy5icnVzaC5tb3ZlLCBicnVzaFBvc2l0aW9uKTsKICAgICAgICB9CiAgICAgICAgLy8gQ2FsbGVkIG9uIEludGVyYWN0aW9uCiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBicnVzaE1vdmVkKCkgewogICAgICAgICAgICBpZiAoIWV2ZW50KQogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICBpZiAoIWV2ZW50LnNvdXJjZUV2ZW50KQogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGV4dGVudCA9IGV2ZW50LnNlbGVjdGlvbjsKICAgICAgICAgICAgaWYgKGV4dGVudCkgewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IGluY2x1ZGVOYU4gPSBmYWxzZTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCBtYXggPSAtMi4wOwogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IG1pbiA9IHRoaXMuY2hhcnREYXRhLmV4dHJlbWVzLm1pbjsKICAgICAgICAgICAgICAgIGlmIChleHRlbnRbMF0gPD0gdGhpcy5kcmF3SGVpZ2h0ICsgdGhpcy5tYXJnaW4udG9wICYmCiAgICAgICAgICAgICAgICAgICAgZXh0ZW50WzFdID49IHRoaXMuZHJhd0hlaWdodCkgewogICAgICAgICAgICAgICAgICAgIGluY2x1ZGVOYU4gPSB0cnVlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKGV4dGVudFswXSA8IHRoaXMuZHJhd0hlaWdodCkgewogICAgICAgICAgICAgICAgICAgIG1heCA9IHRoaXMueVNjYWxlLmludmVydChleHRlbnRbMF0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKGV4dGVudFsxXSA8IHRoaXMuZHJhd0hlaWdodCkgewogICAgICAgICAgICAgICAgICAgIG1pbiA9IHRoaXMueVNjYWxlLmludmVydChleHRlbnRbMV0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdGhpcy5vblVwZGF0ZUZpbHRlci5lbWl0KHsKICAgICAgICAgICAgICAgICAgICBtYXg6IG1heCwKICAgICAgICAgICAgICAgICAgICBtaW46IG1pbiwKICAgICAgICAgICAgICAgICAgICBpbmNsdWRlTmFOOiBpbmNsdWRlTmFOLAogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLm9uVXBkYXRlRmlsdGVyLmVtaXQoewogICAgICAgICAgICAgICAgICAgIG1heDogMS4wLAogICAgICAgICAgICAgICAgICAgIG1pbjogLTEuMCwKICAgICAgICAgICAgICAgICAgICBpbmNsdWRlTmFOOiB0cnVlLAogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICBWaW9saW5GaWx0ZXJDb21wb25lbnQuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IENvbXBvbmVudCwgYXJnczogW3sKICAgICAgICAgICAgICAgICAgICBzZWxlY3RvcjogJ3Zpb2xpbi1maWx0ZXItY29tcG9uZW50JywKICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZVVybDogJy4vdmlvbGluX2ZpbHRlcl9jb21wb25lbnQubmcuaHRtbCcsCiAgICAgICAgICAgICAgICAgICAgc3R5bGVVcmxzOiBbJy4vdmlvbGluX2ZpbHRlcl9jb21wb25lbnQuY3NzJ10sCiAgICAgICAgICAgICAgICAgICAgY2hhbmdlRGV0ZWN0aW9uOiBDaGFuZ2VEZXRlY3Rpb25TdHJhdGVneS5PblB1c2gsCiAgICAgICAgICAgICAgICB9LF0gfSwKICAgIF07CiAgICBWaW9saW5GaWx0ZXJDb21wb25lbnQucHJvcERlY29yYXRvcnMgPSB7CiAgICAgICAgbWV0cmljTmFtZTogW3sgdHlwZTogSW5wdXQgfV0sCiAgICAgICAgZmlsdGVyOiBbeyB0eXBlOiBJbnB1dCB9XSwKICAgICAgICBjaGFydERhdGE6IFt7IHR5cGU6IElucHV0IH1dLAogICAgICAgIHdpZHRoOiBbeyB0eXBlOiBJbnB1dCB9XSwKICAgICAgICBvblJlbW92ZTogW3sgdHlwZTogT3V0cHV0IH1dLAogICAgICAgIG9uVXBkYXRlRmlsdGVyOiBbeyB0eXBlOiBPdXRwdXQgfV0sCiAgICAgICAgY2hhcnRDb250YWluZXI6IFt7IHR5cGU6IFZpZXdDaGlsZCwgYXJnczogWydjaGFydCcsIHsgc3RhdGlj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1wcmltYXJ5W19uZ2NvbnRlbnQtJUNPTVAlXSAgIC5tYXQtc2xpZGVyLXRyYWNrLWZpbGxbX25nY29udGVudC0lQ09NUCVdLCAubWF0LXByaW1hcnlbX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWJbX25nY29udGVudC0lQ09NUCVdLCAubWF0LXByaW1hcnlbX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWItbGFiZWxbX25nY29udGVudC0lQ09NUCVde2JhY2tncm91bmQtY29sb3I6I2Y1N2MwMH0ubWF0LXByaW1hcnlbX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWItbGFiZWwtdGV4dFtfbmdjb250ZW50LSVDT01QJV17Y29sb3I6I2ZmZn0ubWF0LWFjY2VudFtfbmdjb250ZW50LSVDT01QJV0gICAubWF0LXNsaWRlci10cmFjay1maWxsW19uZ2NvbnRlbnQtJUNPTVAlXSwgLm1hdC1hY2NlbnRbX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWJbX25nY29udGVudC0lQ09NUCVdLCAubWF0LWFjY2VudFtfbmdjb250ZW50LSVDT01QJV0gICAubWF0LXNsaWRlci10aHVtYi1sYWJlbFtfbmdjb250ZW50LSVDT01QJV17YmFja2dyb3VuZC1jb2xvcjojZmY5ODAwfS5tYXQtYWNjZW50W19uZ2NvbnRlbnQtJUNPTVAlXSAgIC5tYXQtc2xpZGVyLXRodW1iLWxhYmVsLXRleHRbX25nY29udGVudC0lQ09NUCVde2NvbG9yOiNmZmZ9Lm1hdC13YXJuW19uZ2NvbnRlbnQtJUNPTVAlXSAgIC5tYXQtc2xpZGVyLXRyYWNrLWZpbGxbX25nY29udGVudC0lQ09NUCVdLCAubWF0LXdhcm5bX25nY29udGVudC0lQ09NUCVdICAgLm1hdC1zbGlkZXItdGh1bWJbX25nY29udGVudC0lQ09NUCVdLCAubWF0LXdhcm5bX25nY29udGVudC0lQ09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IFtdOwogICAgICAgICAgICAgICAgcmV0dXJuIEFycmF5LmZyb20ocnVuU2VsZWN0aW9uLmVudHJpZXMoKSkKICAgICAgICAgICAgICAgICAgICAuZmlsdGVyKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcnVuCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAocnVuKSA9PiBydW5bMV0pKQogICAgICAgICAgICAgICAgICAgIC5tYXAoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBydW4KICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChydW4pID0+IHJ1blswXSkpOwogICAgICAgICAgICB9KSkpOwogICAgICAgICAgICB0aGlzLnZpc2libGVBbm5vdGF0aW9ucyQgPSBjb21iaW5lTGF0ZXN0KFsKICAgICAgICAgICAgICAgIHRoaXMuc3RvcmUuc2VsZWN0KGdldEFubm90YXRpb25EYXRhKSwKICAgICAgICAgICAgICAgIHRoaXMuc3RvcmUuc2VsZWN0KGdldEhpZGRlbkFubm90YXRpb25zKSwKICAgICAgICAgICAgICAgIHRoaXMuc3RvcmUuc2VsZWN0KGdldFNob3dIaWRkZW5Bbm5vdGF0aW9ucyksCiAgICAgICAgICAgIF0pLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChbYW5ub3RhdGlvbkRhdGEsIGhpZGRlbkFubm90YXRpb25zLCBzaG93SGlkZGVuQW5ub3RhdGlvbnNdKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gcmVtb3ZlSGlkZGVuQW5ub3RhdGlvbnMoYW5ub3RhdGlvbkRhdGEsIGhpZGRlbkFubm90YXRpb25zLCBzaG93SGlkZGVuQW5ub3RhdGlvbnMpOwogICAgICAgICAgICB9KSkpOwogICAgICAgICAgICB0aGlzLmNoYXJ0V2lkdGgkID0gdGhpcy5zdG9yZS5waXBlKHNlbGVjdChnZXRTaWRlYmFyV2lkdGgpKS5waXBlKG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gd2lkdGgKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICh3aWR0aCkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIE1hdGgubWF4KDE1MCwgd2lkdGgpOwogICAgICAgICAgICB9KSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25Jbml0KCkgewogICAgICAgICAgICB0aGlzLmNoYXJ0RGF0YSQgPSBjb21iaW5lTGF0ZXN0KFsKICAgICAgICAgICAgICAgIHRoaXMudmlzaWJsZUFubm90YXRpb25zJCwKICAgICAgICAgICAgICAgIHRoaXMuYWN0aXZlUnVucyQsCiAgICAgICAgICAgIF0pLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChbdmlzaWJsZUFubm90YXRpb25zLCBhY3RpdmVSdW5zXSkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIHZpb2xpbkRhdGEodmlzaWJsZUFubm90YXRpb25zLCBhY3RpdmVSdW5zLCB0aGlzLm1ldHJpY05hbWUpOwogICAgICAgICAgICB9KSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlbW92ZU1ldHJpYygpIHsKICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChucG1pUmVtb3ZlTWV0cmljRmlsdGVyKHsgbWV0cmljOiB0aGlzLm1ldHJpY05hbWUgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGZpbHRlcgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdXBkYXRlRmlsdGVyKGZpbHRlcikgewogICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKG5wbWlDaGFuZ2VNZXRyaWNGaWx0ZXIoT2JqZWN0LmFzc2lnbih7IG1ldHJpYzogdGhpcy5tZXRyaWNOYW1lIH0sIGZpbHRlcikpKTsKICAgICAgICB9CiAgICB9CiAgICBWaW9saW5GaWx0ZXJDb250YWluZXIuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IENvbXBvbmVudCwgYXJnczogW3sKICAgICAgICAgICAgICAgICAgICBzZWxlY3RvcjogJ25wbWktdmlvbGluLWZpbHRlcicsCiAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU6IGAKICAgIDx2aW9saW4tZmlsdGVyLWNvbXBvbmVudAogICAgICBbbWV0cmljTmFtZV09Im1ldHJpY05hbWUiCiAgICAgIFtmaWx0ZXJdPSJmaWx0ZXIiCiAgICAgIFtjaGFydERhdGFdPSJjaGFydERhdGEkIHwgYXN5bmMiCiAgICAgIFt3aWR0aF09ImNoYXJ0V2lkdGgkIHwgYXN5bmMiCiAgICAgIChvblJlbW92ZSk9InJlbW92ZU1ldHJpYygpIgogICAgICAob25VcGRhdGVGaWx0ZXIpPSJ1cGRhdGVGaWx0ZXIoJGV2ZW50KSIKICAgID48L3Zpb2xpbi1maWx0ZXItY29tcG9uZW50PgogIGAsCiAgICAgICAgICAgICAgICAgICAgY2hhbmdlRGV0ZWN0aW9uOiBDaGFuZ2VEZXRlY3Rpb25TdHJhdGVneS5PblB1c2gsCiAgICAgICAgICAgICAgICB9LF0gfSwKICAgIF07CiAgICAvKiogQG5vY29sbGFwc2UgKi8KICAgIFZpb2xpbkZpbHRlckNvbnRhaW5lci5jdG9yUGFyYW1ldGVycyA9ICg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leHRbX25nY29udGVudC0lQ09NUCVde2NvbG9yOnJnYmEoMCwwLDAsLjM4KX0iXSwgY2hhbmdlRGV0ZWN0aW9uOiAwIH0pOwoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogdGVuc29yYm9hcmQvd2ViYXBwL3BsdWdpbnMvbnBtaS92aWV3cy92aW9saW5fZmlsdGVycy92aW9saW5fZmlsdGVyc19jb250YWluZXIudHMKICAgICAqIEBzdXBwcmVzcyB7Y2hlY2tUeXBlcyxjb25zdGFudFByb3BlcnR5LGV4dHJhUmVxdWlyZSxtaXNzaW5nT3ZlcnJpZGUsbWlzc2luZ1JldHVybix1bnVzZWRQcml2YXRlTWVtYmVycyx1c2VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgY2xhc3MgVmlvbGluRmlsdGVyc0NvbnRhaW5lciB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBzdG9yZQogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKHN0b3JlKSB7CiAgICAgICAgICAgIHRoaXMuc3RvcmUgPSBzdG9yZTsKICAgICAgICAgICAgdGhpcy5zaWRlYmFyRXhwYW5kZWQkID0gdGhpcy5zdG9yZS5zZWxlY3QoZ2V0U2lkZWJhckV4cGFuZGVkKTsKICAgICAgICAgICAgdGhpcy5tZXRyaWNGaWx0ZXJzJCA9IHRoaXMuc3RvcmUuc2VsZWN0KGdldE1ldHJpY0ZpbHRlcnMpLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBmaWx0ZXJzCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoZmlsdGVycykgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIE9iamVjdC5lbnRyaWVzKGZpbHRlcnMpOwogICAgICAgICAgICB9KSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uVG9nZ2xlU2lkZWJhckV4cGFuZGVkKCkgewogICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKG5wbWlUb2dnbGVTaWRlYmFyRXhwYW5kZWQoKSk7CiAgICAgICAgfQogICAgfQogICAgVmlvbGluRmlsdGVyc0NvbnRhaW5lci5kZWNvcmF0b3JzID0gWwogICAgICAgIHsgdHlwZTogQ29tcG9uZW50LCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIHNlbGVjdG9yOiAnbnBtaS12aW9saW4tZmlsdGVycycsCiAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU6IGAKICAgIDx2aW9saW4tZmlsdGVycy1jb21wb25lbnQKICAgICAgW3NpZGViYXJFeHBhbmRlZF09InNpZGViYXJFeHBhbmRlZCQgfCBhc3luYyIKICAgICAgW21ldHJpY0ZpbHRlcnNdPSJtZXRyaWNGaWx0ZXJzJCB8IGFzeW5jIgogICAgICAodG9nZ2xlU2lkZWJhckV4cGFuZGVkKT0ib25Ub2dnbGVTaWRlYmFyRXhwYW5kZWQoKSIKICAgID48L3Zpb2xpbi1maWx0ZXJzLWNvbXBvbmVudD4KICBgLAogICAgICAgICAgICAgICAgICAgIGNoYW5nZURldGVjdGlvbjogQ2hhbmdlRGV0ZWN0aW9uU3RyYXRlZ3kuT25QdXNoLAogICAgICAgICAgICAgICAgfSxdIH0sCiAgICBdOwogICAgLyoqIEBub2NvbGxhcHNlICovCiAgICBWaW9saW5GaWx0ZXJzQ29udGFpbmVyLmN0b3JQYXJhbWV0ZXJzID0gKCkgPT4gWwogICAgICAgIHsgdHlwZTogU3RvcmUgfQogICAgXTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLyBWaW9saW5GaWx0ZXJzQ29udGFpbmVyLsm1ZmFjID0gZnVuY3Rpb24gVmlvbGluRmlsdGVyc0NvbnRhaW5lcl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gaXMgZGlzcGF0Y2hlZCBieSBQb2x5bWVyIHdoZW4gYHNlbGVjdGVkUnVuc2AgcHJvcCBjaGFuZ2VzIGJlY2F1c2UgaXQKICAgICAgICAgICAgICogbm90aWZpZXMgKGl0IGlzIGltcGxpY2l0bHkgZmlyZWQgYnkgUG9seW1lciBsaWJyYXJ5KS4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuc2VsZWN0b3IubmF0aXZlRWxlbWVudC5hZGRFdmVudExpc3RlbmVyKCdzZWxlY3RlZC1ydW5zLWNoYW5nZWQnLCAoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChldmVudCkgPT4gewogICAgICAgICAgICAgICAgdGhpcy5vblNlbGVjdGlvbkNoYW5nZS5lbWl0KCgvKiogQHR5cGUgez99ICovIChldmVudC5kZXRhaWwudmFsdWUpKSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgc2V0VGltZW91dCgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAvLyBEaXNwYXRjaCB0aGUgaW5pdGlhbCB2YWx1ZSBmcm9tIHRoZSBjb21wb25lbnQuCiAgICAgICAgICAgICAgICB0aGlzLm9uU2VsZWN0aW9uQ2hhbmdlLmVtaXQodGhpcy5zZWxlY3Rvci5uYXRpdmVFbGVtZW50LnNlbGVjdGVkUnVucyk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICB9CiAgICBMZWdhY3lSdW5zU2VsZWN0b3JDb21wb25lbnQuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IENvbXBvbmVudCwgYXJnczogW3sKICAgICAgICAgICAgICAgICAgICBzZWxlY3RvcjogJ3RiLWxlZ2FjeS1ydW5zLXNlbGVjdG9yLWN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JkL3dlYmFwcC9wbHVnaW5zL25wbWkvdXRpbC9zb3J0X2Fubm90YXRpb25zLnRzCiAgICAgKiBAc3VwcHJlc3Mge2NoZWNrVHlwZXMsY29uc3RhbnRQcm9wZXJ0eSxleHRyYVJlcXVpcmUsbWlzc2luZ092ZXJyaWRlLG1pc3NpbmdSZXR1cm4sdW51c2VkUHJpdmF0ZU1lbWJlcnMsdXNlbGVzc0NvZGV9IGNoZWNrZWQgYnkgdHNjCiAgICAgKi8KICAgIC8qKgogICAgICogQHBhcmFtIHs/fSBhbm5vdGF0aW9uRGF0YQogICAgICogQHBhcmFtIHs/fSBzb3J0CiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiBzb3J0QW5ub3RhdGlvbnMoYW5ub3RhdGlvbkRhdGEsIHNvcnQpIHsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgbGV0IHJlc3VsdCA9IE9iamVjdC5rZXlzKGFubm90YXRpb25EYXRhKTsKICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3Qgc3RyaXBwZWRNZXRyaWMgPSBzdHJpcE1ldHJpY1N0cmluZyhzb3J0Lm1ldHJpYyk7CiAgICAgICAgaWYgKHNvcnQubWV0cmljID09PSAnJykgewogICAgICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICAgIH0KICAgICAgICBpZiAoc29ydC5vcmRlciA9PT0gU29ydE9yZGVyLkRPV04pIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBtYXhEYXRhID0ge307CiAgICAgICAgICAgIGZvciAoY29uc3QgYW5ub3RhdGlvbiBvZiByZXN1bHQpIHsKICAgICAgICAgICAgICAgIG1heERhdGFbYW5ub3RhdGlvbl0gPSBNYXRoLm1heCguLi5hbm5vdGF0aW9uRGF0YVthbm5vdGF0aW9uXQogICAgICAgICAgICAgICAgICAgIC5maWx0ZXIoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBhbm5vdGF0aW9uCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoYW5ub3RhdGlvbikgPT4gYW5ub3RhdGlvbi5tZXRyaWMgPT09IHN0cmlwcGVkTWV0cmljKSkKICAgICAgICAgICAgICAgICAgICAubWFwKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZmlsdGVyZWQKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChmaWx0ZXJlZCkgPT4gZmlsdGVyZWQublBNSVZhbHVlID09PSBudWxsID8gLUluZmluaXR5IDogZmlsdGVyZWQublBNSVZhbHVlKSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJlc3VsdCA9IHJlc3VsdC5zb3J0KCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBhCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gYgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGEsIGIpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiBtYXhEYXRhW2JdIC0gbWF4RGF0YVthXTsKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChzb3J0Lm9yZGVyID09PSBTb3J0T3JkZXIuVVApIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBtaW5EYXRhID0ge307CiAgICAgICAgICAgIGZvciAoY29uc3QgYW5ub3RhdGlvbiBvZiByZXN1bHQpIHsKICAgICAgICAgICAgICAgIG1pbkRhdGFbYW5ub3RhdGlvbl0gPSBNYXRoLm1pbiguLi5hbm5vdGF0aW9uRGF0YVthbm5vdGF0aW9uXQogICAgICAgICAgICAgICAgICAgIC5maWx0ZXIoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBhbm5vdGF0aW9uCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoYW5ub3RhdGlvbikgPT4gYW5ub3RhdGlvbi5tZXRyaWMgPT09IHN0cmlwcGVkTWV0cmljKSkKICAgICAgICAgICAgICAgICAgICAubWFwKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZmlsdGVyZWQKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChmaWx0ZXJlZCkgPT4gZmlsdGVyZWQublBNSVZhbHVlID09PSBudWxsID8gSW5maW5pdHkgOiBmaWx0ZXJlZC5uUE1JVmFsdWUpKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmVzdWx0ID0gcmVzdWx0LnNvcnQoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGEKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBiCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoYSwgYikgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIG1pbkRhdGFbYV0gLSBtaW5EYXRhW2JdOwogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIHJldHVybiByZXN1bHQ7CiAgICB9CgogICAgY29uc3QgX2MwJHkgPSBbInRodW1iQ29udGFpbmVyIl07CiAgICBjb25zdCBfYzEkayA9IFsidG9nZ2xlQmFyIl07CiAgICBjb25zdCBfYzIkZiA9IFsiaW5wdXQiXTsKICAgIGNvbnN0IF9jMyQ1ID0gZnVuY3Rpb24gKCkgeyByZXR1cm4geyBlbnRlckR1cmF0aW9uOiAxNTAgfTsgfTsKICAgIGNvbnN0IF9jNCQzID0gWyIqIl07CiAgICAvKioKICAgICAqIEluamVjdGlvbiB0b2tlbiB0byBiZSB1c2VkIHR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ICBwcm92aWRlOiBOR19WQUxVRV9BQ0NFU1NPUiwKICAgICAgICB1c2VFeGlzdGluZzogZm9yd2FyZFJlZigoLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICAoKSA9PiBNYXRTbGlkZVRvZ2dsZSkpLAogICAgICAgIG11bHRpOiB0cnVlCiAgICB9OwogICAgLyoqCiAgICAgKiBDaGFuZ2UgZXZlbnQgb2JqZWN0IGVtaXR0ZWQgYnkgYSBNYXRTbGlkZVRvZ2dsZS4KICAgICAqLwogICAgY2xhc3MgTWF0U2xpZGVUb2dnbGVDaGFuZ2UgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gc291cmNlCiAgICAgICAgICogQHBhcmFtIHs/fSBjaGVja2VkCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3Ioc291cmNlLCBjaGVja2VkKSB7CiAgICAgICAgICAgIHRoaXMuc291cmNlID0gc291cmNlOwogICAgICAgICAgICB0aGlzLmNoZWNrZWQgPSBjaGVja2VkOwogICAgICAgIH0KICAgIH0KICAgIC8vIEJvaWxlcnBsYXRlIGZvciBhcHBseWluZyBtaXhpbnMgdG8gTWF0U2xpZGVUb2dnbGUuCiAgICAvKioKICAgICAqIFxAZG9jcy1wcml2YXRlCiAgICAgKi8KICAgIGNsYXNzIE1hdFNsaWRlVG9nZ2xlQmFzZSB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBfZWxlbWVudFJlZgogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKF9lbGVtZW50UmVmKSB7CiAgICAgICAgICAgIHRoaXMuX2VsZW1lbnRSZWYgPSBfZWxlbWVudFJlZjsKICAgICAgICB9CiAgICB9CiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBfTWF0U2xpZGVUb2dnbGVNaXhpbkJhc2UgPSBtaXhpblRhYkluZGV4KG1peGluQ29sb3IobWl4aW5EaXNhYmxlUmlwcGxlK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ICAgICAgdGhpcy5fY2hhbmdlRGV0ZWN0b3JSZWYgPSBfY2hhbmdlRGV0ZWN0b3JSZWY7CiAgICAgICAgICAgIHRoaXMuZGVmYXVsdHMgPSBkZWZhdWx0czsKICAgICAgICAgICAgdGhpcy5fYW5pbWF0aW9uTW9kZSA9IF9hbmltYXRpb25Nb2RlOwogICAgICAgICAgICB0aGlzLl9vbkNoYW5nZSA9ICgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoXykgPT4geyB9KTsKICAgICAgICAgICAgdGhpcy5fb25Ub3VjaGVkID0gKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4geyB9KTsKICAgICAgICAgICAgdGhpcy5fdW5pcXVlSWQgPSBgbWF0LXNsaWRlLXRvZ2dsZS0keysrbmV4dFVuaXF1ZUlkJDh9YDsKICAgICAgICAgICAgdGhpcy5fcmVxdWlyZWQgPSBmYWxzZTsKICAgICAgICAgICAgdGhpcy5fY2hlY2tlZCA9IGZhbHNlOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogTmFtZSB2YWx1ZSB3aWxsIGJlIGFwcGxpZWQgdG8gdGhlIGlucHV0IGVsZW1lbnQgaWYgcHJlc2VudC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMubmFtZSA9IG51bGw7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBBIHVuaXF1ZSBpZCBmb3IgdGhlIHNsaWRlLXRvZ2dsZSBpbnB1dC4gSWYgbm9uZSBpcyBzdXBwbGllZCwgaXQgd2lsbCBiZSBhdXRvLWdlbmVyYXRlZC4KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRoaXMuaWQgPSB0aGlzLl91bmlxdWVJZDsKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIFdoZXRo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ICAgICBnZXQgcmVxdWlyZWQoKSB7IHJldHVybiB0aGlzLl9yZXF1aXJlZDsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCByZXF1aXJlZCh2YWx1ZSkgeyB0aGlzLl9yZXF1aXJlZCA9IGNvZXJjZUJvb2xlYW5Qcm9wZXJ0eSh2YWx1ZSk7IH0KICAgICAgICAvKioKICAgICAgICAgKiBXaGV0aGVyIHRoZSBzbGlkZS10b2dnbGUgZWxlbWVudCBpcyBjaGVja2VkIG9yIG5vdC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBjaGVja2VkKCkgeyByZXR1cm4gdGhpcy5fY2hlY2tlZDsgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHNldCBjaGVja2VkKHZhbHVlKSB7CiAgICAgICAgICAgIHRoaXMuX2NoZWNrZWQgPSBjb2VyY2VCb29sZWFuUHJvcGVydHkodmFsdWUpOwogICAgICAgICAgICB0aGlzLl9jaGFuZ2VEZXRlY3RvclJlZi5tYXJrRm9yQ2hlY2soKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogUmV0dXJucyB0aGUgdW5pcXVlIGlkIGZvciB0aGUgdmlzdWFsIGhpZGRlbiBpbnB1dC4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGdldCBpbnB1dElkKCkgeyByZXR1cm4gYCR7dGhpcy5pZCB8fCB0aGlzLl91bmlxdWVJZH0taW5wdXRgOyB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ0FmdGVyQ29udGVudEluaXQoKSB7CiAgICAgICAgICAgIHRoaXMuX2ZvY3VzTW9uaXRvcgogICAgICAgICAgICAgICAgLm1vbml0b3IodGhpcy5fZWxlbWVudFJlZiwgdHJ1ZSkKICAgICAgICAgICAgICAgIC5zdWJzY3JpYmUoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGZvY3VzT3JpZ2luCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBmb2N1c09yaWdpbiA9PiB7CiAgICAgICAgICAgICAgICAvLyBPbmx5IGZvcndhcmQgZm9jdXMgbWFudWFsbHkgd2hlbiBpdCB3YXMgcmVjZWl2ZWQgcHJvZ3JhbW1hdGljYWxseSBvciB0aHJvdWdoIHRoZQogICAgICAgICAgICAgICAgLy8ga2V5Ym9hcmQuIFdlIHNob3VsZCBub3QgZG8gdGhpcyBmb3IgbW91c2UvdG91Y2ggZm9jdXMgZm9yIHR3byByZWFzb25zOgogICAgICAgICAgICAgICAgLy8gMS4gSXQgY2FuIHByZXZlbnQgY2xpY2tzIGZyb20gbGFuZGluZyBpbiBDaHJvbWUgKHNlZSAjMTgyNjkpLgogICAgICAgICAgICAgICAgLy8gMi4gVGhleSdyZSBhbHJlYWR5IGhhbmRsZWQgYnkgdGhlIHdyYXBwaW5nIGBsYWJlbGAgZWxlbWVudC4KICAgICAgICAgICAgICAgIGlmIChmb2N1c09yaWdpbiA9PT0gJ2tleWJvYXJkJyB8fCBmb2N1c09yaWdpbiA9PT0gJ3Byb2dyYW0nKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5faW5wdXRFbGVtZW50Lm5hdGl2ZUVsZW1lbnQuZm9jdXMoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKCFmb2N1c09yaWdpbikgewogICAgICAgICAgICAgICAgICAgIC8vIFdoZW4gYSBmb2N1c2VkIGVsZW1lbnQgYmVjb21lcyBkaXNhYmxlZCwgdGhlIGJyb3dzZXIgKmltbWVkaWF0ZWx5KiBmaXJlcyBhIGJsdXIgZXZlbnQuCiAgICAgICAgICAgICAgICAgICAgLy8gQW5ndWxhciBkb2VzIG5vdCBleHBlY3QgZXZlbnRzIHRvIGJlIHJhaXNlZCBkdXJpbmcgY2hhbmdlIGRldGVjdGlvbiwgc28gYW55IHN0YXRlCiAgICAgICAgICAgICAgICAgICAgLy8gY2hhbmdlIChzdWNoIGFzIGEgZm9ybSBjb250cm9sJ3MgJ25nLXRvdWNoZWQnKSB3aWxsIGNhdXNlIGEgY2hhbmdlZC1hZnRlci1jaGVja2VkCiAgICAgICAgICAgICAgICAgICAgLy8gZXJyb3IuIFNlZSBodHRwczovL2dpdGh1Yi5jb20vYW5ndWxhci9hbmd1bGFyL2lzc3Vlcy8xNzc5My4gVG8gd29yayBhcm91bmQgdGhpcywKICAgICAgICAgICAgICAgICAgICAvLyB3ZSBkZWZlciB0ZWxsaW5nIHRoZSBmb3JtIGNvbnRyb2wgaXQgaGFzIGJlZW4gdG91Y2hlZCB1bnRpbCB0aGUgbmV4dCB0aWNrLgogICAgICAgICAgICAgICAgICAgIFByb21pc2UucmVzb2x2ZSgpLnRoZW4oKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKCkgPT4gdGhpcy5fb25Ub3VjaGVkKCkpKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nT25EZXN0cm95KCkgewogICAgICAgICAgICB0aGlzLl9mb2N1c01vbml0b3Iuc3RvcE1vbml0b3JpbmcodGhpcy5fZWxlbWVudFJlZik7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIE1ldGhvZCBiZWluZyBjYWxsZWQgd2hlbmV2ZXIgdGhlIHVuZGVybHlpbmcgaW5wdXQgZW1pdHMgYSBjaGFuZ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Ugd2UgYXJlIHVzaW5nIGEgbGFiZWwgZWxlbWVudCBhcyBvdXIKICAgICAgICAgICAgLy8gcm9vdCBjb250YWluZXIsIHRoZSBjbGljayBldmVudCBvbiB0aGUgYHNsaWRlLXRvZ2dsZWAgd2lsbCBiZSBleGVjdXRlZCB0d2ljZS4KICAgICAgICAgICAgLy8gVGhlIHJlYWwgY2xpY2sgZXZlbnQgd2lsbCBidWJibGUgdXAsIGFuZCB0aGUgZ2VuZXJhdGVkIGNsaWNrIGV2ZW50IGFsc28gdHJpZXMgdG8gYnViYmxlIHVwLgogICAgICAgICAgICAvLyBUaGlzIHdpbGwgbGVhZCB0byBtdWx0aXBsZSBjbGljayBldmVudHMuCiAgICAgICAgICAgIC8vIFByZXZlbnRpbmcgYnViYmxpbmcgZm9yIHRoZSBzZWNvbmQgZXZlbnQgd2lsbCBzb2x2ZSB0aGF0IGlzc3VlLgogICAgICAgICAgICBldmVudC5zdG9wUHJvcGFnYXRpb24oKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogSW1wbGVtZW50ZWQgYXMgcGFydCBvZiBDb250cm9sVmFsdWVBY2Nlc3Nvci4KICAgICAgICAgKiBAcGFyYW0gez99IHZhbHVlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB3cml0ZVZhbHVlKHZhbHVlKSB7CiAgICAgICAgICAgIHRoaXMuY2hlY2tlZCA9ICEhdmFsdWU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEltcGxlbWVudGVkIGFzIHBhcnQgb2YgQ29udHJvbFZhbHVlQWNjZXNzb3IuCiAgICAgICAgICogQHBhcmFtIHs/fSBmbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcmVnaXN0ZXJPbkNoYW5nZShmbikgewogICAgICAgICAgICB0aGlzLl9vbkNoYW5nZSA9IGZuOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBJbXBsZW1lbnRlZCBhcyBwYXJ0IG9mIENvbnRyb2xWYWx1ZUFjY2Vzc29yLgogICAgICAgICAqIEBwYXJhbSB7P30gZm4KICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlZ2lzdGVyT25Ub3VjaGVkKGZuKSB7CiAgICAgICAgICAgIHRoaXMuX29uVG91Y2hlZCA9IGZuOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBJbXBsZW1lbnRlZCBhcyBhIHBhcnQgb2YgQ29udHJvbFZhbHVlQWNjZXNzb3IuCiAgICAgICAgICogQHBhcmFtIHs/fSBpc0Rpc2FibGVkCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBzZXREaXNhYmxlZFN0YXRlKGlzRGlzYWJsZWQpIHsKICAgICAgICAgICAgdGhpcy5kaXNhYmxlZCA9IGlzRGlzYWJsZWQ7CiAgICAgICAgICAgIHRoaXMuX2NoYW5nZURldGVjdG9yUmVmLm1hcmtGb3JDaGVjaygpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBGb2N1c2VzIHRoZSBzbGlkZS10b2dnbGUuCiAgICAgICAgICogQHBhcmFtIHs/PX0gb3B0aW9ucwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZm9jdXMob3B0aW9ucykgewogICAgICAgICAgICB0aGlzLl9mb2N1c01vbml0b3IuZm9jdXNWaWEodGhpcy5faW5wdXRFbGVtZW50LCAna2V5Ym9hcmQnLCBvcHRpb25zKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogVG9nZ2xlcyB0aGUgY2hlY2tlZCBzdGF0ZSBvZiB0aGUgc2xpZGUtdG9nZ2xlLgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdG9nZ2xlKCkgewogICAgICAgICAgICB0aGlzLmNoZWNrZWQgPSAhdGhpcy5jaGVja2VkOwogICAgICAgICAgICB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6MH0iXSwgY2hhbmdlRGV0ZWN0aW9uOiAwIH0pOwoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogdGVuc29yYm9hcmQvd2ViYXBwL3BsdWdpbnMvbnBtaS92aWV3cy9hbm5vdGF0aW9uc19saXN0L2Fubm90YXRpb25zX2xpc3RfdG9vbGJhci9hbm5vdGF0aW9uc19zZWFyY2gvYW5ub3RhdGlvbnNfc2VhcmNoX2NvbnRhaW5lci50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICBjbGFzcyBBbm5vdGF0aW9uc1NlYXJjaENvbnRhaW5lciB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBzdG9yZQogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKHN0b3JlKSB7CiAgICAgICAgICAgIHRoaXMuc3RvcmUgPSBzdG9yZTsKICAgICAgICAgICAgdGhpcy5hbm5vdGF0aW9uc0ZpbHRlciQgPSB0aGlzLnN0b3JlLnNlbGVjdChnZXRBbm5vdGF0aW9uc1JlZ2V4KTsKICAgICAgICAgICAgdGhpcy5pc0Fubm90YXRpb25zRmlsdGVyVmFsaWQkID0gdGhpcy5hbm5vdGF0aW9uc0ZpbHRlciQucGlwZShtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGZpbHRlclN0cmluZwogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGZpbHRlclN0cmluZykgPT4gewogICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICAvLyB0c2xpbnQ6ZGlzYWJsZS1uZXh0LWxpbmU6bm8tdW51c2VkLWV4cHJlc3Npb24gQ2hlY2sgZm9yIHZhbGlkaXR5IG9mIGZpbHRlci4KICAgICAgICAgICAgICAgICAgICBuZXcgUmVnRXhwKGZpbHRlclN0cmluZyk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjYXRjaCAoZXJyKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGZpbHRlcgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZmlsdGVyQ2hhbmdlKGZpbHRlcikgewogICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKG5wbWlBbm5vdGF0aW9uc1JlZ2V4Q2hhbmdlZCh7IHJlZ2V4OiBmaWx0ZXIgfSkpOwogICAgICAgIH0KICAgIH0KICAgIEFubm90YXRpb25zU2VhcmNoQ29udGFpbmVyLmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBDb21wb25lbnQsIGFyZ3M6IFt7CiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3I6ICducG1pLWFubm90YXRpb25zLXNlYXJjaCcsCiAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU6IGAKICAgIDxucG1pLWFubm90YXRpb25zLXNlYXJjaC1jb21wb25lbnQKICAgICAgW3JlZ2V4RmlsdGVyVmFsdWVdPSJhbm5vdGF0aW9uc0ZpbHRlciQgfCBhc3luYyIKICAgICAgW2lzUmVnZXhGaWx0ZXJWYWxpZF09ImlzQW5ub3RhdGlvbnNGaWx0ZXJWYWxpZCQgfCBhc3luYyIKICAgICAgKG9uUmVnZXhGaWx0ZXJWYWx1ZUNoYW5nZSk9ImZ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GNvbnN0IGN0eF9yMSA9IMm1ybVuZXh0Q29udGV4dCgpOwogICAgICAgIMm1ybVhZHZhbmNlKDEpOwogICAgICAgIMm1ybVwcm9wZXJ0eSgiY2hlY2tlZCIsIGN0eF9yMS5zaG93Q291bnRzKTsKICAgICAgICDJtcm1YWR2YW5jZSgyKTsKICAgICAgICDJtcm1cHJvcGVydHkoImNoZWNrZWQiLCBjdHhfcjEuc2hvd0hpZGRlbik7CiAgICB9IH0KICAgIGNsYXNzIEFubm90YXRpb25zTGlzdFRvb2xiYXJDb21wb25lbnQgewogICAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgICAgICB0aGlzLm9uRmxhZ0Fubm90YXRpb25zID0gbmV3IEV2ZW50RW1pdHRlcigpOwogICAgICAgICAgICB0aGlzLm9uSGlkZUFubm90YXRpb25zID0gbmV3IEV2ZW50RW1pdHRlcigpOwogICAgICAgICAgICB0aGlzLm9uVG9nZ2xlRXhwYW5kZWQgPSBuZXcgRXZlbnRFbWl0dGVyKCk7CiAgICAgICAgICAgIHRoaXMub25Ub2dnbGVTaG93Q291bnRzID0gbmV3IEV2ZW50RW1pdHRlcigpOwogICAgICAgICAgICB0aGlzLm9uVG9nZ2xlU2hvd0hpZGRlbiA9IG5ldyBFdmVudEVtaXR0ZXIoKTsKICAgICAgICB9CiAgICB9CiAgICBBbm5vdGF0aW9uc0xpc3RUb29sYmFyQ29tcG9uZW50LmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBDb21wb25lbnQsIGFyZ3M6IFt7CiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3I6ICducG1pLWFubm90YXRpb25zLWxpc3QtdG9vbGJhci1jb21wb25lbnQnLAogICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlVXJsOiAnLi9hbm5vdGF0aW9uc19saXN0X3Rvb2xiYXJfY29tcG9uZW50Lm5nLmh0bWwnLAogICAgICAgICAgICAgICAgICAgIHN0eWxlVXJsczogWycuL2Fubm90YXRpb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RoaXMuc2hvd0hpZGRlbiQgPSB0aGlzLnN0b3JlLnNlbGVjdChnZXRTaG93SGlkZGVuQW5ub3RhdGlvbnMpOwogICAgICAgICAgICB0aGlzLmFubm90YXRpb25zRmlsdGVyJCA9IHRoaXMuc3RvcmUuc2VsZWN0KGdldEFubm90YXRpb25zUmVnZXgpOwogICAgICAgICAgICB0aGlzLmlzQW5ub3RhdGlvbnNGaWx0ZXJWYWxpZCQgPSB0aGlzLmFubm90YXRpb25zRmlsdGVyJC5waXBlKG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZmlsdGVyU3RyaW5nCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoZmlsdGVyU3RyaW5nKSA9PiB7CiAgICAgICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBCb29sZWFuKG5ldyBSZWdFeHAoZmlsdGVyU3RyaW5nKSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjYXRjaCAoZXJyKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGZpbHRlcgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZmlsdGVyQ2hhbmdlKGZpbHRlcikgewogICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKG5wbWlBbm5vdGF0aW9uc1JlZ2V4Q2hhbmdlZCh7IHJlZ2V4OiBmaWx0ZXIgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGFubm90YXRpb25zCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmbGFnQW5ub3RhdGlvbnMoYW5ub3RhdGlvbnMpIHsKICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChucG1pVG9nZ2xlQW5ub3RhdGlvbkZsYWdzKHsKICAgICAgICAgICAgICAgIGFubm90YXRpb25zLAogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gYW5ub3RhdGlvbnMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGhpZGVBbm5vdGF0aW9ucyhhbm5vdGF0aW9ucykgewogICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKG5wbWlUb2dnbGVBbm5vdGF0aW9uc0hpZGRlbih7CiAgICAgICAgICAgICAgICBhbm5vdGF0aW9ucywKICAgICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHRvZ2dsZUV4cGFuZGVkKCkgewogICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKG5wbWlUb2dnbGVBbm5vdGF0aW9uc0V4cGFuZGVkKCkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHRvZ2dsZVNob3dDb3VudHMoKSB7CiAgICAgICAgICAgIHRoaXMuc3RvcmUuZGlzcGF0Y2gobnBtaVRvZ2dsZVNob3dDb3VudHMoKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgdG9nZ2xlU2hvd0hpZGRlbigpIHsKICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChucG1pVG9nZ2xlU2hvd0hpZGRlbkFubm90YXRpb25zKCkpOwogICAgICAgIH0KICAgIH0KICAgIEFubm90YXRpb25zTGlzdFRvb2xiYXJDb250YWluZXIuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IENvbXBv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ogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGRyYXcoKSB7CiAgICAgICAgICAgIGlmICh0aGlzLnNoYXBlID09ICdjaXJjbGUnKSB7CiAgICAgICAgICAgICAgICB0aGlzLm1haW5Db250YWluZXIKICAgICAgICAgICAgICAgICAgICAuYXBwZW5kKCdjaXJjbGUnKQogICAgICAgICAgICAgICAgICAgIC5hdHRyKCdmaWxsJywgdGhpcy5jb2xvcikKICAgICAgICAgICAgICAgICAgICAuYXR0cignc3Ryb2tlJywgJ2JsYWNrJykKICAgICAgICAgICAgICAgICAgICAuYXR0cignY3gnLCA1KQogICAgICAgICAgICAgICAgICAgIC5hdHRyKCdjeScsIDUpCiAgICAgICAgICAgICAgICAgICAgLmF0dHIoJ3InLCA1KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmICh0aGlzLnNoYXBlID09ICdiYXInKSB7CiAgICAgICAgICAgICAgICB0aGlzLm1haW5Db250YWluZXIKICAgICAgICAgICAgICAgICAgICAuYXBwZW5kKCdyZWN0JykKICAgICAgICAgICAgICAgICAgICAuYXR0cignZmlsbCcsIHRoaXMuY29sb3IpCiAgICAgICAgICAgICAgICAgICAgLmF0dHIoJ3gnLCAwKQogICAgICAgICAgICAgICAgICAgIC5hdHRyKCd5JywgMCkKICAgICAgICAgICAgICAgICAgICAuYXR0cignd2lkdGgnLCAxMCkKICAgICAgICAgICAgICAgICAgICAuYXR0cignaGVpZ2h0JywgMTApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKHRoaXMuc2hhcGUgPT0gJ3J1bkluZGljYXRvcicpIHsKICAgICAgICAgICAgICAgIHRoaXMubWFpbkNvbnRhaW5lcgogICAgICAgICAgICAgICAgICAgIC5hcHBlbmQoJ2cnKQogICAgICAgICAgICAgICAgICAgIC5hcHBlbmQoJ3BhdGgnKQogICAgICAgICAgICAgICAgICAgIC5hdHRyKCdmaWxsJywgdGhpcy5jb2xvcikKICAgICAgICAgICAgICAgICAgICAuYXR0cignc3Ryb2tlJywgJ2JsYWNrJykKICAgICAgICAgICAgICAgICAgICAuYXR0cignZCcsICdNIDIgMCBMIDEwIDAgTCA3IDUgTCAxMCAxMCBMIDIgMTAgWicpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQogICAgTGVnZW5kRWxlbWVudENvbXBvbmVudC5kZWNvcmF0b3JzID0gWwogICAgICAgIHsgdHlwZTogQ29tcG9uZW50LCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIHNlbGVjdG9yOiAnbnBtaS1sZWdlbmQtZWxlbWVudCcsCiAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGVVcmw6ICcuL2xlZ2VuZF9lbGVtZW50X2NvbXBvbmVudC5uZy5odG1sJywKICAgICAgICAgICAgICAgICAgICBzdHlsZVVybHM6IFsnLi9sZWdlbmRfZWxlbWVudF9jb21wb25lbnQuY3NzJ10sCiAgICAgICAgICAgICAgICAgICAgY2hhbmdlRGV0ZWN0aW9uOiBDaGFuZ2VEZXRlY3Rpb25TdHJhdGVneS5PblB1c2gsCiAgICAgICAgICAgICAgICB9LF0gfSwKICAgIF07CiAgICBMZWdlbmRFbGVtZW50Q29tcG9uZW50LnByb3BEZWNvcmF0b3JzID0gewogICAgICAgIHRleHQ6IFt7IHR5cGU6IElucHV0IH1dLAogICAgICAgIGNvbG9yOiBbeyB0eXBlOiBJbnB1dCB9XSwKICAgICAgICBzaGFwZTogW3sgdHlwZTogSW5wdXQgfV0sCiAgICAgICAgZ2x5cGhTVkc6IFt7IHR5cGU6IFZpZXdDaGlsZCwgYXJnczogWydnbHlwaCcsIHsgc3RhdGljOiB0cnVlLCByZWFkOiBFbGVtZW50UmVmIH0sXSB9XQogICAgfTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLyBMZWdlbmRFbGVtZW50Q29tcG9uZW50Lsm1ZmFjID0gZnVuY3Rpb24gTGVnZW5kRWxlbWVudENvbXBvbmVud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gICDJtcm1ZWxlbWVudEVuZCgpOwogICAgICAgIMm1ybVlbGVtZW50RW5kKCk7CiAgICB9IGlmIChyZiAmIDIpIHsKICAgICAgICBjb25zdCBtZXRyaWNfcjEgPSBjdHguJGltcGxpY2l0OwogICAgICAgIGNvbnN0IGN0eF9yMCA9IMm1ybVuZXh0Q29udGV4dCgpOwogICAgICAgIMm1ybVhZHZhbmNlKDMpOwogICAgICAgIMm1ybV0ZXh0SW50ZXJwb2xhdGUxKCIgIiwgY3R4X3IwLnN0cmlwTWV0cmljKG1ldHJpY19yMSksICIgIik7CiAgICAgICAgybXJtWFkdmFuY2UoMSk7CiAgICAgICAgybXJtXByb3BlcnR5KCJuZ0lmIiwgbWV0cmljX3IxID09PSBjdHhfcjAuc29ydC5tZXRyaWMpOwogICAgfSB9CiAgICBjbGFzcyBIZWFkZXJDb21wb25lbnQkMSB7CiAgICAgICAgY29uc3RydWN0b3IoKSB7CiAgICAgICAgICAgIHRoaXMub25DaGFuZ2VTb3J0ID0gbmV3IEV2ZW50RW1pdHRlcigpOwogICAgICAgICAgICB0aGlzLm9uQWxsQW5ub3RhdGlvbnNUb2dnbGVkID0gbmV3IEV2ZW50RW1pdHRlcigpOwogICAgICAgICAgICB0aGlzLlNvcnRPcmRlciA9IFNvcnRPcmRlcjsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBtZXRyaWMKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHN0cmlwTWV0cmljKG1ldHJpYykgewogICAgICAgICAgICByZXR1cm4gc3RyaXBNZXRyaWNTdHJpbmcobWV0cmljKTsKICAgICAgICB9CiAgICB9CiAgICBIZWFkZXJDb21wb25lbnQkMS5kZWNvcmF0b3JzID0gWwogICAgICAgIHsgdHlwZTogQ29tcG9uZW50LCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIHNlbGVjdG9yOiAnbnBtaS1hbm5vdGF0aW9ucy1saXN0LWh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bnVzZWRQcml2YXRlTWVtYmVycyx1c2VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgY2xhc3MgSGVhZGVyQ29udGFpbmVyIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHN0b3JlCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3Ioc3RvcmUpIHsKICAgICAgICAgICAgdGhpcy5zdG9yZSA9IHN0b3JlOwogICAgICAgICAgICB0aGlzLnNlbGVjdGVkQW5ub3RhdGlvbnMkID0gdGhpcy5zdG9yZS5zZWxlY3QoZ2V0U2VsZWN0ZWRBbm5vdGF0aW9ucyk7CiAgICAgICAgICAgIHRoaXMuYW5ub3RhdGlvblNvcnQkID0gdGhpcy5zdG9yZS5zZWxlY3QoZ2V0QW5ub3RhdGlvblNvcnQpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IG5ld01ldHJpYwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgY2hhbmdlU29ydChuZXdNZXRyaWMpIHsKICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChucG1pQ2hhbmdlQW5ub3RhdGlvblNvcnQoeyBtZXRyaWM6IG5ld01ldHJpYyB9KSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gY2hlY2tlZAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgYWxsQW5ub3RhdGlvbnNUb2dnbGVkKGNoZWNrZWQpIHsKICAgICAgICAgICAgaWYgKGNoZWNrZWQpIHsKICAgICAgICAgICAgICAgIHRoaXMuc3RvcmUuZGlzcGF0Y2gobnBtaVNldFNlbGVjdGVkQW5ub3RhdGlvbnMoewogICAgICAgICAgICAgICAgICAgIGFubm90YXRpb25zOiBPYmplY3Qua2V5cyh0aGlzLmFubm90YXRpb25zKSwKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuc3RvcmUuZGlzcGF0Y2gobnBtaVNldFNlbGVjdGVkQW5ub3RhdGlvbnMoeyBhbm5vdGF0aW9uczogW10gfSkpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQogICAgSGVhZGVyQ29udGFpbmVyLmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBDb21wb25lbnQsIGFyZ3M6IFt7CiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3I6ICducG1pLWFubm90YXRpb25zLWxpc3QtaGVhZGVyJywKICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogYAogICAgPG5wbWktYW5ub3RhdGlvbnMtbGlzdC1oZWFkZXItY29tcG9uZW50CiAgICAgIFtudW1Bbm5vdGF0aW9uc109Im51bUFubm90YXRpb25zIgogICAgICBbc2VsZWN0ZWRBbm5vdGF0aW9uc109InNlbGVjdGVkQW5ub3RhdGlvbnMkIHwgYXN5bmMiCiAgICAgIFtzb3J0XT0iYW5ub3RhdGlvblNvcnQkIHwgYXN5bmMiCiAgICAgIFthY3RpdmVNZXRyaWNzXT0iYWN0aXZlTWV0cmljcyIKICAgICAgKG9uQ2hhbmdlU29ydCk9ImNoYW5nZVNvcnQoJGV2ZW50KSIKICAgICAgKG9uQWxsQW5ub3RhdGlvbnNUb2dnbGVkKT0iYWxsQW5ub3RhdGlvbnNUb2dnbGVkKCRldmVudCkiCiAgICA+PC9ucG1pLWFubm90YXRpb25zLWxpc3QtaGVhZGVyLWNvbXBvbmVudD4KICBgLAogICAgICAgICAgICAgICAgICAgIGNoYW5nZURldGVjdGlvbjogQ2hhbmdlRGV0ZWN0aW9uU3RyYXRlZ3kuT25QdXNoLAogICAgICAgICAgICAgICAgfSxdIH0sCiAgICBdOwogICAgLyoqIEBub2NvbGxhcHNlICovCiAgICBIZWFkZXJDb250YWluZXIuY3RvclBhcmFtZXRlcnMgPSAoK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CA9IDEwOwogICAgICAgICAgICB0aGlzLmNoYXJ0SGVpZ2h0ID0gMTA7CiAgICAgICAgICAgIHRoaXMubWF4RG90UmFkaXVzID0gMTA7CiAgICAgICAgICAgIHRoaXMuY291bnREb3RPZmZzZXQgPSA3MDsKICAgICAgICAgICAgdGhpcy5jb3VudFRleHRQYWRkaW5nID0gMjsKICAgICAgICAgICAgdGhpcy5tYXJnaW4gPSB7IHRvcDogMCwgcmlnaHQ6IDAsIGJvdHRvbTogMCwgbGVmdDogMTAwIH07CiAgICAgICAgICAgIHRoaXMuc3Ryb2tlQ29sb3IgPSAnI2ZmZic7CiAgICAgICAgICAgIHRoaXMudGV4dENsYXNzID0gJ2RlZmF1bHQtdGV4dCc7CiAgICAgICAgICAgIHRoaXMucnVucyA9IFtdOwogICAgICAgICAgICB0aGlzLmNvbG9yU2NhbGUgPSAoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiAnIzMzMzMzMycpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvblJlc2l6ZShldmVudCkgewogICAgICAgICAgICB0aGlzLnJlZHJhdygpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nQWZ0ZXJWaWV3SW5pdCgpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBydW5zQ29sb3JTY2FsZSA9ICgoLyoqIEB0eXBlIHs/fSAqLyAoZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgndGYtY29sb3Itc2NhbGUnKSkpKS5ydW5zQ29sb3JTY2FsZTsKICAgICAgICAgICAgdGhpcy5jb2xvclNjYWxlID0gcnVuc0NvbG9yU2NhbGUgPyBydW5zQ29sb3JTY2FsZSA6IHRoaXMuY29sb3JTY2FsZTsKICAgICAgICAgICAgdGhpcy5zdmcgPSBzZWxlY3QkMSh0aGlzLmFubm90YXRpb25Db250YWluZXIubmF0aXZlRWxlbWVudCkuc2VsZWN0KCdzdmcnKTsKICAgICAgICAgICAgdGhpcy54U2NhbGUgPSBwb2ludCQxKCkucGFkZGluZygwKTsKICAgICAgICAgICAgdGhpcy55U2NhbGUgPSBwb2ludCQxKCkucGFkZGluZygwKTsKICAgICAgICAgICAgdGhpcy5zaXplU2NhbGUgPSBsaW5lYXIkMSgpLmRvbWFpbihbMC4wLCAxLjBdKTsKICAgICAgICAgICAgdGhpcy5jb3VudFNpemVTY2FsZSA9IGxpbmVhciQxKCkucmFuZ2UoWzIsIHRoaXMubWF4RG90UmFkaXVzXSk7CiAgICAgICAgICAgIHRoaXMubWFpbkNvbnRhaW5lciA9IHRoaXMuc3ZnCiAgICAgICAgICAgICAgICAuYXBwZW5kKCdnJykKICAgICAgICAgICAgICAgIC5hdHRyKCd0cmFuc2Zvcm0nLCBgdHJhbnNsYXRlKCR7dGhpcy5tYXJnaW4ubGVmdH0sICR7dGhpcy5tYXJnaW4udG9wfSlgKTsKICAgICAgICAgICAgdGhpcy5iYXJzR3JvdXAgPSB0aGlzLm1haW5Db250YWluZXIuYXBwZW5kKCdnJyk7CiAgICAgICAgICAgIHRoaXMuY291bnREb3RzR3JvdXAgPSB0aGlzLm1haW5Db250YWluZXIuYXBwZW5kKCdnJyk7CiAgICAgICAgICAgIHRoaXMudGV4dHNHcm91cCA9IHRoaXMubWFpbkNvbnRhaW5lci5hcHBlbmQoJ2cnKTsKICAgICAgICAgICAgdGhpcy5jb3VudFRleHRzR3JvdXAgPSB0aGlzLm1haW5Db250YWluZXIuYXBwZW5kKCdnJyk7CiAgICAgICAgICAgIHRoaXMucnVuSGludEdyb3VwID0gdGhpcy5zdmcuYXBwZW5kKCdnJyk7CiAgICAgICAgICAgIHRoaXMucmVkcmF3KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gY2hhbmdlcwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkNoYW5nZXMoY2hhbmdlcykgewogICAgICAgICAgICBpZiAodGhpcy5zdmcpIHsKICAgICAgICAgICAgICAgIHRoaXMucmVkcmF3KCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlZHJhdygpIHsKICAgICAgICAgICAgdGhpcy5zZWxlY3RlZCA9IHRoaXMuc2VsZWN0ZWRBbm5vdGF0aW9ucy5pbmNsdWRlcyh0aGlzLmFubm90YXRpb24pOwogICAgICAgICAgICB0aGlzLnVwZGF0ZURpbWVuc2lvbnMoKTsKICAgICAgICAgICAgdGhpcy5zZXRUZXh0Q2xhc3MoKTsKICAgICAgICAgICAgdGhpcy51cGRhdGVBeGVzKCk7CiAgICAgICAgICAgIHRoaXMuZHJhdygpOwogICAgICAgIH0KICAgICAgICAvLyBJbml0aWFsaXppbmcvVXBkYXRpbmcgdGhlIHZpc3VhbGl6YXRpb24gcHJvcHMuCiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHVwZGF0ZURpbWVuc2lvbnMoKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcnVucyA9IG5ldyBTZXQoKTsKICAgICAgICAgICAgdGhpcy5kYXRhLmZvckVhY2goKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGVsZW1lbnQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChlbGVtZW50KSA9PiB7CiAgICAgICAgICAgICAgICBydW5zLmFkZChlbGVtZW50LnJ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GFzcyA9ICdmbGFnLXRleHQnOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKHRoaXMuaGlkZGVuQW5ub3RhdGlvbnMuaW5jbHVkZXModGhpcy5hbm5vdGF0aW9uKSkgewogICAgICAgICAgICAgICAgdGhpcy50ZXh0Q2xhc3MgPSAnaGlkZGVuLXRleHQnOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB1cGRhdGVBeGVzKCkgewogICAgICAgICAgICB0aGlzLnhTY2FsZQogICAgICAgICAgICAgICAgLnJhbmdlUm91bmQoWwogICAgICAgICAgICAgICAgMCwKICAgICAgICAgICAgICAgIHRoaXMuY2hhcnRXaWR0aCAtIHRoaXMuY2hhcnRXaWR0aCAvIHRoaXMuYWN0aXZlTWV0cmljcy5sZW5ndGgsCiAgICAgICAgICAgIF0pCiAgICAgICAgICAgICAgICAuZG9tYWluKHRoaXMuYWN0aXZlTWV0cmljcy5tYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChkKSA9PiBzdHJpcE1ldHJpY1N0cmluZyhkKSkpKTsKICAgICAgICAgICAgdGhpcy55U2NhbGUKICAgICAgICAgICAgICAgIC5yYW5nZVJvdW5kKFswLCB0aGlzLmNoYXJ0SGVpZ2h0IC0gdGhpcy5ydW5IZWlnaHRdKQogICAgICAgICAgICAgICAgLmRvbWFpbih0aGlzLnJ1bnMpOwogICAgICAgICAgICB0aGlzLnNpemVTY2FsZS5yYW5nZShbMCwgdGhpcy5jaGFydFdpZHRoIC8gdGhpcy5hY3RpdmVNZXRyaWNzLmxlbmd0aF0pOwogICAgICAgICAgICB0aGlzLmNvdW50U2l6ZVNjYWxlLmRvbWFpbihbMCwgdGhpcy5tYXhDb3VudF0pOwogICAgICAgIH0KICAgICAgICAvLyBEcmF3aW5nIFVJCiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGRyYXcoKSB7CiAgICAgICAgICAgIHRoaXMuZHJhd1J1bkluZGljYXRvcnMoKTsKICAgICAgICAgICAgdGhpcy5kcmF3UnVuSGludFRleHRzKCk7CiAgICAgICAgICAgIHRoaXMuZHJhd0JhcnMoKTsKICAgICAgICAgICAgdGhpcy5kcmF3VGV4dHMoKTsKICAgICAgICAgICAgaWYgKHRoaXMuc2hvd0NvdW50cykgewogICAgICAgICAgICAgICAgdGhpcy5kcmF3Q291bnREb3RzKCk7CiAgICAgICAgICAgICAgICB0aGlzLmRyYXdDb3VudFRleHRzKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB0aGlzLmNvdW50RG90c0dyb3VwLnNlbGVjdEFsbCgnLmNvdW50LWRvdCcpLnJlbW92ZSgpOwogICAgICAgICAgICAgICAgdGhpcy5jb3VudFRleHRzR3JvdXAuc2VsZWN0QWxsKCcuY291bnQtYmFja2dyb3VuZC10ZXh0JykucmVtb3ZlKCk7CiAgICAgICAgICAgICAgICB0aGlzLmNvdW50VGV4dHNHcm91cC5zZWxlY3RBbGwoJy5jb3VudC10ZXh0JykucmVtb3ZlKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGRyYXdSdW5JbmRpY2F0b3JzKCkgewogICAgICAgICAgICBzZWxlY3QkMSh0aGlzLmNsaXBQYXRoRWxlbWVudC5uYXRpdmVFbGVtZW50KQogICAgICAgICAgICAgICAgLnNlbGVjdCgncmVjdCcpCiAgICAgICAgICAgICAgICAuYXR0cignd2lkdGgnLCB0aGlzLm1hcmdpbi5sZWZ0IC0gMzApCiAgICAgICAgICAgICAgICAuYXR0cignaGVpZ2h0JywgdGhpcy5jaGFydEhlaWdodCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaW5kaWNhdG9ycyA9IHRoaXMucnVuSGludEdyb3VwCiAgICAgICAgICAgICAgICAuc2VsZWN0QWxsKCcuaGludCcpCiAgICAgICAgICAgICAgICAuZGF0YSh0aGlzLnJ1bnMpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGluZGljYXRvckVudGVycyA9IGluZGljYXRvcnMKICAgICAgICAgICAgICAgIC5lbnRlcigpCiAgICAgICAgICAgICAgICAuYXBwZW5kKCdnJykKICAgICAgICAgICAgICAgIC5hdHRyKCdjbGFzcycsICdoaW50Jyk7CiAgICAgICAgICAgIGluZGljYXRvckVudGVycwogICAgICAgICAgICAgICAgLmFwcGVuZCgncGF0aCcpCiAgICAgICAgICAgICAgICAuYXR0cignZCcsICdNIDAgMCBMIDE1IDAgTCAxMCAxMCBMIDE1IDIwIEwgMCAyMCBaJyk7CiAgICAgICAgICAgIGluZGljYXRvckVudGVycwogICAgICAgICAgICAgICAgLm1lcmdlKGluZGljYXRvcnMpCiAgICAgICAgICAgICAgICAuYXR0cigndHJhbnNmb3JtJywgKC8qKgogICAgICAgICAgICAgKiBAdGhpcyB7P30KICAgICAgICAgICAgICogQHBhcmFtIHs/fSBkCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBmdW5jdGlvbiAoZCkgewogICAgICAgICAgICAgICAgcmV0dXJuIGB0cmFuc2xhdGUoMTAsICR7KC8qKiBAdHlwZSB7P30gKi8gKHRoaXMueVNjYWxlKGQpKSkgKyA1fSlgOwogICAgICAgICAgICB9KS5iaW5kKHRoaXMpKQogICAgICAgICAgICAgICAgLmF0dHIoJ2ZpbGwnLCAoLyoqCiAgICAgICAgICAgICAqIEB0aGlzIHs/fQogICAgICAgICAgICAgKiBAcGFyYW0gez99IGQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGZ1bmN0aW9uIChkKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5jb2xvclNjYWxlKGQpOwogICAgICAgICAgICB9KS5iaW5kKHRoaXMpKTsKICAgICAgICAgICAgaW5kaWNhdG9ycy5leGl0KCkucmVtb3ZlKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkcmF3UnVuSGludFRleHRzKCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGhpbnRUZXh0cyA9IHRoaXMucnVuSGludEdyb3VwCiAgICAgICAgICAgICAgICAuc2VsZWN0QWxsKCcuaGludC10ZXh0JykKICAgICAgICAgICAgICAgIC5kYXRhKHRoaXMucnVucyk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgaGludFRleHRFbnRlcnMgPSBoaW50VGV4dHMKICAgICAgICAgICAgICAgIC5lbnRlcigpCiAgICAgICAgICAgICAgICAuYXBwZW5kKCd0ZXh0JykKICAgICAgICAgICAgICAgIC5hdHRyKCd4JywgMjUpCiAgICAgICAgICAgICAgICAuYXR0cignZm9udC1zaXplJywgJzEwcHgnKQogICAgICAgICAgICAgICAgLmF0dHIoJ2FsaWdubWVudC1iYXNlbGluZScsICdtaWRkbGUnKQogICAgICAgICAgICAgICAgLmF0dHIoJ2NsaXAtcGF0aCcsICd1cmwoI2hpbnQtY2xpcCknKTsKICAgICAgICAgICAgaGludFRleHRFbnRlcnMKICAgICAgICAgICAgICAgIC5tZXJnZShoaW50VGV4dHMpCiAgICAgICAgICAgICAgICAuYXR0cigneScsICgvKioKICAgICAgICAgICAgICogQHRoaXMgez99CiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZnVuY3Rpb24gKGQpIHsKICAgICAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy55U2NhbGUoZCkpKSArIDE1OwogICAgICAgICAgICB9KS5iaW5kKHRoaXMpKQogICAgICAgICAgICAgICAgLmF0dHIoJ2NsYXNzJywgYGhpbnQtdGV4dCAke3RoaXMudGV4dENsYXNzfWApCiAgICAgICAgICAgICAgICAudGV4dCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGQpID0+IGQpKTsKICAgICAgICAgICAgaGludFRleHRzLmV4aXQoKS5yZW1vdmUoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGRyYXdCYXJzKCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGJhcnMgPSB0aGlzLmJhcnNHcm91cAogICAgICAgICAgICAgICAgLnNlbGVjdEFsbCgnLmJhcicpCiAgICAgICAgICAgICAgICAuZGF0YSh0aGlzLmRhdGEpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGJhckVudGVycyA9IGJhcnMKICAgICAgICAgICAgICAgIC5lbnRlcigpCiAgICAgICAgICAgICAgICAuYXBwZW5kKCdyZWN0JykKICAgICAgICAgICAgICAgIC5hdHRyKCdjbGFzcycsICdiYXInKQogICAgICAgICAgICAgICAgLmF0dHIoJ2hlaWdodCcsIDIwKTsKICAgICAgICAgICAgYmFyRW50ZXJzCiAgICAgICAgICAgICAgICAubWVyZ2UoYmFycykKICAgICAgICAgICAgICAgIC5hdHRyKCdmaWxsJywgKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChkKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAoZC5uUE1JVmFsdWUgPT09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gJyc7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmIChkLm5QTUlWYWx1ZSA+PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEJsdWVzKGQublBNSVZhbHVlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBSZWRzKGQublBNSVZhbHVlICogLTEpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSkKICAgICAgICAgICAgICAgIC5hdHRyKCd4JywgKC8qKgogICAgICAgICAgICAgKiBAdGhpcyB7P30KICAgICAgICAgICAgICogQHBhcmFtIHs/fSBkCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBmdW5jdGlvbiAoZCkgewogICAgICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovICh0aGlzLnhTY2FsZShkLm1ldHJpYykpKTsKICAgICAgICAgICAgfSkuYmluZCh0aGlzKSkKICAgICAgICAgICAgICAgIC5hdHRyKCd5JywgKC8qKgogICAgICAgICAgICAgKiBAdGhpcyB7P30KICAgICAgICAgICAgICogQHBhcmFtIHs/fSBkCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBmdW5jdGlvbiAoZCkgewogICAgICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovICh0aGlzLnlTY2FsZShkLnJ1bikpKSArIDU7CiAgICAgICAgICAgIH0pLmJpbmQodGhpcykpCiAgICAgICAgICAgICAgICAuYXR0cignd2lkdGgnLCAoLyoqCiAgICAgICAgICAgICAqIEB0aGlzIHs/fQogICAgICAgICAgICAgKiBAcGFyYW0gez99IGQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGZ1bmN0aW9uIChkKSB7CiAgICAgICAgICAgICAgICBpZiAoZC5uUE1JVmFsdWUgPT09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gMDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLnNpemVTY2FsZShNYXRoLmFicyhkLm5QTUlWYWx1ZSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KS5iaW5kKHRoaXMpKTsKICAgICAgICAgICAgYmFycy5leGl0KCkucmVtb3ZlKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkcmF3Q291bnREb3RzKCkgewogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGNvdW50RG90cyA9IHRoaXMuY291bnREb3RzR3JvdXAKICAgICAgICAgICAgICAgIC5zZWxlY3RBbGwoJy5jb3VudC1kb3QnKQogICAgICAgICAgICAgICAgLmRhdGEodGhpcy5kYXRhKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjb3VudERvdEVudGVycyA9IGNvdW50RG90cwogICAgICAgICAgICAgICAgLmVudGVyKCkKICAgICAgICAgICAgICAgIC5hcHBlbmQoJ2NpcmNsZScpCiAgICAgICAgICAgICAgICAuYXR0cignY2xhc3MnLCAnY291bnQtZG90JykKICAgICAgICAgICAgICAgIC5hdHRyKCdzdHJva2UnLCAnYmxhY2snKTsKICAgICAgICAgICAgY291bnREb3RFbnRlcnMKICAgICAgICAgICAgICAgIC5tZXJnZShjb3VudERvdHMpCiAgICAgICAgICAgICAgICAuYXR0cignZmlsbCcsICgvKioKICAgICAgICAgICAgICogQHRoaXMgez99CiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZnVuY3Rpb24gKGQpIHsKICAgICAgICAgICAgICAgIGlmIChkLmNvdW50VmFsdWUgPT09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gJyc7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gR3JleXMoZC5jb3VudFZhbHVlIC8gdGhpcy5tYXhDb3VudCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pLmJpbmQodGhpcykpCiAgICAgICAgICAgICAgICAuYXR0cignY3gnLCAoLyoqCiAgICAgICAgICAgICAqIEB0aGlzIHs/fQogICAgICAgICAgICAgKiBAcGFyYW0gez99IGQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGZ1bmN0aW9uIChkKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMueFNjYWxlKGQubWV0cmljKSkpICsgdGhpcy5jb3VudERvdE9mZnNldDsKICAgICAgICAgICAgfSkuYmluZCh0aGlzKSkKICAgICAgICAgICAgICAgIC5hdHRyKCdjeScsICgvKioKICAgICAgICAgICAgICogQHRoaXMgez99CiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZnVuY3Rpb24gKGQpIHsKICAgICAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy55U2NhbGUoZC5ydW4pKSkgKyB0aGlzLnJ1bkhlaWdodCAvIDIuMDsKICAgICAgICAgICAgfSkuYmluZCh0aGlzKSkKICAgICAgICAgICAgICAgIC5hdHRyKCdyJywgKC8qKgogICAgICAgICAgICAgKiBAdGhpcyB7P30KICAgICAgICAgICAgICogQHBhcmFtIHs/fSBkCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBmdW5jdGlvbiAoZCkgewogICAgICAgICAgICAgICAgaWYgKGQuY291bnRWYWx1ZSA9PT0gbnVsbCkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiAwOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuY291bnRTaXplU2NhbGUoZC5jb3VudFZhbHVlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSkuYmluZCh0aGlzKSk7CiAgICAgICAgICAgIGNvdW50RG90cy5leGl0KCkucmVtb3ZlKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkcmF3VGV4dHMoKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgYmFja2dyb3VuZFRleHRzID0gdGhpcy50ZXh0c0dyb3VwCiAgICAgICAgICAgICAgICAuc2VsZWN0QWxsKCcubnBtaS1iYWNrZ3JvdW5kLXRleHQnKQogICAgICAgICAgICAgICAgLmRhdGEodGhpcy5kYXRhKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBiYWNrZ3JvdW5kVGV4dEVudGVycyA9IGJhY2tncm91bmRUZXh0cwogICAgICAgICAgICAgICAgLmVudGVyKCkKICAgICAgICAgICAgICAgIC5hcHBlbmQoJ3RleHQnKQogICAgICAgICAgICAgICAgLmF0dHIoJ2NsYXNzJywgJ25wbWktYmFja2dyb3VuZC10ZXh0JykKICAgICAgICAgICAgICAgIC5hdHRyKCdzdHJva2Utd2lkdGgnLCAzKQogICAgICAgICAgICAgICAgLmF0dHIoJ3N0cm9rZS1saW5lam9pbicsICdyb3VuZCcpCiAgICAgICAgICAgICAgICAuYXR0cignc3Ryb2tlJywgdGhpcy5zdHJva2VDb2xvcikKICAgICAgICAgICAgICAgIC5hdHRyKCdmb250LXNpemUnLCAnMTNweCcpCiAgICAgICAgICAgICAgICAuYXR0cignYWxpZ25tZW50LWJhc2VsaW5lJywgJ21pZGRsZScpOwogICAgICAgICAgICBiYWNrZ3JvdW5kVGV4dEVudGVycwogICAgICAgICAgICAgICAgLm1lcmdlKGJhY2tncm91bmRUZXh0cykKICAgICAgICAgICAgICAgIC5hdHRyKCd4JywgKC8qKgogICAgICAgICAgICAgKiBAdGhpcyB7P30KICAgICAgICAgICAgICogQHBhcmFtIHs/fSBkCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBmdW5jdGlvbiAoZCkgewogICAgICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovICh0aGlzLnhTY2FsZShkLm1ldHJpYykpKSArIDU7CiAgICAgICAgICAgIH0pLmJpbmQodGhpcykpCiAgICAgICAgICAgICAgICAuYXR0cigneScsICgvKioKICAgICAgICAgICAgICogQHRoaXMgez99CiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZnVuY3Rpb24gKGQpIHsKICAgICAgICAgICAgICAgIHJldHVybiAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy55U2NhbGUoZC5ydW4pKSkgKyB0aGlzLnJ1bkhlaWdodCAvIDIuMDsKICAgICAgICAgICAgfSkuYmluZCh0aGlzKSkKICAgICAgICAgICAgICAgIC50ZXh0KCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBkCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoZCkgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IHZhbHVlID0gZC5uUE1JVmFsdWUgPT09IG51bGwKICAgICAgICAgICAgICAgICAgICA/ICdudWxsJwogICAgICAgICAgICAgICAgICAgIDogTWF0aC5yb3VuZCgoZC5uUE1JVmFsdWUgKyBOdW1iZXIuRVBTSUxPTikgKiAxMDAwKSAvIDEwMDA7CiAgICAgICAgICAgICAgICByZXR1cm4gdmFsdWU7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgYmFja2dyb3VuZFRleHRzLmV4aXQoKS5yZW1vdmUoKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCB0ZXh0cyA9IHRoaXMudGV4dHNHcm91cAogICAgICAgICAgICAgICAgLnNlbGVjdEFsbCgnLm5wbWktdGV4dCcpCiAgICAgICAgICAgICAgICAuZGF0YSh0aGlzLmRhdGEpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IHRleHRFbnRlcnMgPSB0ZXh0cwogICAgICAgICAgICAgICAgLmVudGVyKCkKICAgICAgICAgICAgICAgIC5hcHBlbmQoJ3RleHQnKQogICAgICAgICAgICAgICAgLmF0dHIoJ2NsYXNzJywgJ25wbWktdGV4dCcpCiAgICAgICAgICAgICAgICAuYXR0cignZm9udC1zaXplJywgJzEzcHgnKQogICAgICAgICAgICAgICAgLmF0dHIoJ2FsaWdubWVudC1iYXNlbGluZScsICdtaWRkbGUnKTsKICAgICAgICAgICAgdGV4dEVudGVycwogICAgICAgICAgICAgICAgLm1lcmdlKHRleHRzKQogICAgICAgICAgICAgICAgLmF0dHIoJ3gnLCAoLyoqCiAgICAgICAgICAgICAqIEB0aGlzIHs/fQogICAgICAgICAgICAgKiBAcGFyYW0gez99IGQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGZ1bmN0aW9uIChkKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMueFNjYWxlKGQubWV0cmljKSkpICsgNTsKICAgICAgICAgICAgfSkuYmluZCh0aGlzKSkKICAgICAgICAgICAgICAgIC5hdHRyKCd5JywgKC8qKgogICAgICAgICAgICAgKiBAdGhpcyB7P30KICAgICAgICAgICAgICogQHBhcmFtIHs/fSBkCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBmdW5jdGlvbiAoZCkgewogICAgICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovICh0aGlzLnlTY2FsZShkLnJ1bikpKSArIHRoaXMucnVuSGVpZ2h0IC8gMi4wOwogICAgICAgICAgICB9KS5iaW5kKHRoaXMpKQogICAgICAgICAgICAgICAgLnRleHQoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChkKSA9PiB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBsZXQgdmFsdWUgPSBkLm5QTUlWYWx1ZSA9PT0gbnVsbAogICAgICAgICAgICAgICAgICAgID8gJ251bGwnCiAgICAgICAgICAgICAgICAgICAgOiBNYXRoLnJvdW5kKChkLm5QTUlWYWx1ZSArIE51bWJlci5FUFNJTE9OKSAqIDEwMDApIC8gMTAwMDsKICAgICAgICAgICAgICAgIHJldHVybiB2YWx1ZTsKICAgICAgICAgICAgfSkpOwogICAgICAgICAgICB0ZXh0cy5leGl0KCkucmVtb3ZlKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkcmF3Q291bnRUZXh0cygpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjb3VudEJhY2tncm91bmRUZXh0cyA9IHRoaXMuY291bnRUZXh0c0dyb3VwCiAgICAgICAgICAgICAgICAuc2VsZWN0QWxsKCcuY291bnQtYmFja2dyb3VuZC10ZXh0JykKICAgICAgICAgICAgICAgIC5kYXRhKHRoaXMuZGF0YSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgY291bnRCYWNrZ3JvdW5kVGV4dEVudGVycyA9IGNvdW50QmFja2dyb3VuZFRleHRzCiAgICAgICAgICAgICAgICAuZW50ZXIoKQogICAgICAgICAgICAgICAgLmFwcGVuZCgndGV4dCcpCiAgICAgICAgICAgICAgICAuYXR0cignY2xhc3MnLCAnY291bnQtYmFja2dyb3VuZC10ZXh0JykKICAgICAgICAgICAgICAgIC5hdHRyKCdzdHJva2Utd2lkdGgnLCAzKQogICAgICAgICAgICAgICAgLmF0dHIoJ3N0cm9rZS1saW5lam9pbicsICdyb3VuZCcpCiAgICAgICAgICAgICAgICAuYXR0cignc3Ryb2tlJywgdGhpcy5zdHJva2VDb2xvcikKICAgICAgICAgICAgICAgIC5hdHRyKCdmb250LXNpemUnLCAnMTBweCcpCiAgICAgICAgICAgICAgICAuYXR0cignYWxpZ25tZW50LWJhc2VsaW5lJywgJ21pZGRsZScpOwogICAgICAgICAgICBjb3VudEJhY2tncm91bmRUZXh0RW50ZXJzCiAgICAgICAgICAgICAgICAubWVyZ2UoY291bnRCYWNrZ3JvdW5kVGV4dHMpCiAgICAgICAgICAgICAgICAuYXR0cigneCcsICgvKioKICAgICAgICAgICAgICogQHRoaXMgez99CiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZnVuY3Rpb24gKGQpIHsKICAgICAgICAgICAgICAgIHJldHVybiAoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMueFNjYWxlKGQubWV0cmljKSkpICsKICAgICAgICAgICAgICAgICAgICB0aGlzLmNvdW50RG90T2Zmc2V0ICsKICAgICAgICAgICAgICAgICAgICB0aGlzLmNvdW50VGV4dFBhZGRpbmcgKwogICAgICAgICAgICAgICAgICAgIHRoaXMubWF4RG90UmFkaXVzKTsKICAgICAgICAgICAgfSkuYmluZCh0aGlzKSkKICAgICAgICAgICAgICAgIC5hdHRyKCd5JywgKC8qKgogICAgICAgICAgICAgKiBAdGhpcyB7P30KICAgICAgICAgICAgICogQHBhcmFtIHs/fSBkCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBmdW5jdGlvbiAoZCkgewogICAgICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovICh0aGlzLnlTY2FsZShkLnJ1bikpKSArIHRoaXMucnVuSGVpZ2h0IC8gMi4wOwogICAgICAgICAgICB9KS5iaW5kKHRoaXMpKQogICAgICAgICAgICAgICAgLnRleHQoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChkKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAoZC5jb3VudFZhbHVlID09PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICcnOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIEludGwuTnVtYmVyRm9ybWF0KCkuZm9ybWF0KGQuY291bnRWYWx1ZSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgY291bnRCYWNrZ3JvdW5kVGV4dHMuZXhpdCgpLnJlbW92ZSgpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGNvdW50VGV4dHMgPSB0aGlzLmNvdW50VGV4dHNHcm91cAogICAgICAgICAgICAgICAgLnNlbGVjdEFsbCgnLmNvdW50LXRleHQnKQogICAgICAgICAgICAgICAgLmRhdGEodGhpcy5kYXRhKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjb3VudFRleHRFbnRlcnMgPSBjb3VudFRleHRzCiAgICAgICAgICAgICAgICAuZW50ZXIoKQogICAgICAgICAgICAgICAgLmFwcGVuZCgndGV4dCcpCiAgICAgICAgICAgICAgICAuYXR0cignY2xhc3MnLCAnY291bnQtdGV4dCcpCiAgICAgICAgICAgICAgICAuYXR0cignZm9udC1zaXplJywgJzEwcHgnKQogICAgICAgICAgICAgICAgLmF0dHIoJ2FsaWdubWVudC1iYXNlbGluZScsICdtaWRkbGUnKTsKICAgICAgICAgICAgY291bnRUZXh0RW50ZXJzCiAgICAgICAgICAgICAgICAubWVyZ2UoY291bnRUZXh0cykKICAgICAgICAgICAgICAgIC5hdHRyKCd4JywgKC8qKgogICAgICAgICAgICAgKiBAdGhpcyB7P30KICAgICAgICAgICAgICogQHBhcmFtIHs/fSBkCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBmdW5jdGlvbiAoZCkgewogICAgICAgICAgICAgICAgcmV0dXJuICgoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy54U2NhbGUoZC5tZXRyaWMpKSkgKwogICAgICAgICAgICAgICAgICAgIHRoaXMuY291bnREb3RPZmZzZXQgKwogICAgICAgICAgICAgICAgICAgIHRoaXMuY291bnRUZXh0UGFkZGluZyArCiAgICAgICAgICAgICAgICAgICAgdGhpcy5tYXhEb3RSYWRpdXMpOwogICAgICAgICAgICB9KS5iaW5kKHRoaXMpKQogICAgICAgICAgICAgICAgLmF0dHIoJ3knLCAoLyoqCiAgICAgICAgICAgICAqIEB0aGlzIHs/fQogICAgICAgICAgICAgKiBAcGFyYW0gez99IGQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGZ1bmN0aW9uIChkKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMueVNjYWxlKGQucnVuKSkpICsgdGhpcy5ydW5IZWlnaHQgLyAyLjA7CiAgICAgICAgICAgIH0pLmJpbmQodGhpcykpCiAgICAgICAgICAgICAgICAudGV4dCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGQpID0+IHsKICAgICAgICAgICAgICAgIGlmIChkLmNvdW50VmFsdWUgPT09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gJyc7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gSW50bC5OdW1iZXJGb3JtYXQoKS5mb3JtYXQoZC5jb3VudFZhbHVlKTsKICAgICAgICAgICAgfSkpOwogICAgICAgICAgICBjb3VudFRleHRzLmV4aXQoKS5yZW1vdmUoKTsKICAgICAgICB9CiAgICB9CiAgICBBbm5vdGF0aW9uQ29tcG9uZW50LmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBDb21wb25lbnQsIGFyZ3M6IFt7CiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3I6ICdhbm5vdGF0aW9uLWNvbXBvbmVudCcsCiAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGVVcmw6ICcuL2Fubm90YXRpb25fY29tcG9uZW50Lm5nLmh0bWwnLAogICAgICAgICAgICAgICAgICAgIHN0eWxlVXJsczogWycuL2Fubm90YXRpb25fY29tcG9uZW50LmNzcyddLAogICAgICAgICAgICAgICAgICAgIGNoYW5nZURldGVjdGlvbjogQ2hhbmdlRGV0ZWN0aW9uU3RyYXRlZ3kuT25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DQsIEFubm90YXRpb25Db21wb25lbnRfbWF0X2ljb25fNF9UZW1wbGF0ZSwgMSwgMCwgIm1hdC1pY29uIiwgMyk7CiAgICAgICAgICAgIMm1ybVlbGVtZW50RW5kKCk7CiAgICAgICAgICAgIMm1ybVlbGVtZW50U3RhcnQoNSwgImRpdiIsIDQsIDUpOwogICAgICAgICAgICDJtcm1bmFtZXNwYWNlU1ZHKCk7CiAgICAgICAgICAgIMm1ybVlbGVtZW50U3RhcnQoNywgInN2ZyIsIDYpOwogICAgICAgICAgICDJtcm1ZWxlbWVudFN0YXJ0KDgsICJkZWZzIik7CiAgICAgICAgICAgIMm1ybVlbGVtZW50U3RhcnQoOSwgImNsaXBQYXRoIiwgNywgOCk7CiAgICAgICAgICAgIMm1ybVlbGVtZW50KDExLCAicmVjdCIsIDkpOwogICAgICAgICAgICDJtcm1ZWxlbWVudEVuZCgpOwogICAgICAgICAgICDJtcm1ZWxlbWVudEVuZCgpOwogICAgICAgICAgICDJtcm1ZWxlbWVudEVuZCgpOwogICAgICAgICAgICDJtcm1ZWxlbWVudEVuZCgpOwogICAgICAgIH0gaWYgKHJmICYgMikgewogICAgICAgICAgICDJtcm1Y2xhc3NQcm9wKCJmbGFnZ2VkLWFubm90YXRpb24iLCBjdHguZmxhZ2dlZEFubm90YXRpb25zLmluY2x1ZGVzKGN0eC5hbm5vdGF0aW9uKSkoImhpZGRlbi1hbm5vdGF0aW9uIiwgY3R4LmhpZGRlbkFubm90YXRpb25zLmluY2x1ZGVzKGN0eC5hbm5vdGF0aW9uKSAmJiAhY3R4LmZsYWdnZWRBbm5vdGF0aW9ucy5pbmNsdWRlcyhjdHguYW5ub3RhdGlvbikpOwogICAgICAgICAgICDJtcm1YWR2YW5jZSgxKTsKICAgICAgICAgICAgybXJtXByb3BlcnR5KCJjaGVja2VkIiwgY3R4LnNlbGVjdGVkQW5ub3RhdGlvbnMuaW5jbHVkZXMoY3R4LmFubm90YXRpb24pKTsKICAgICAgICAgICAgybXJtWFk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gY3R4X3IwLmFjdGl2ZU1ldHJpY3MpOwogICAgICAgIMm1ybVhZHZhbmNlKDEpOwogICAgICAgIMm1ybVwcm9wZXJ0eUludGVycG9sYXRlKCJpdGVtU2l6ZSIsIGN0eF9yMC5udW1BY3RpdmVSdW5zICogY3R4X3IwLnJ1bkhlaWdodCArIDI1KTsKICAgICAgICDJtcm1YWR2YW5jZSgxKTsKICAgICAgICDJtcm1cHJvcGVydHkoImNka1ZpcnR1YWxGb3JPZiIsIGN0eF9yMC5zb3J0ZWRBbm5vdGF0aW9ucyk7CiAgICB9IH0KICAgIGNsYXNzIEFubm90YXRpb25zTGlzdENvbXBvbmVudCB7CiAgICAgICAgY29uc3RydWN0b3IoKSB7CiAgICAgICAgICAgIHRoaXMub25Sb3dDbGljayA9IG5ldyBFdmVudEVtaXR0ZXIoKTsKICAgICAgICAgICAgdGhpcy5ydW5IZWlnaHQgPSAzMDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBldmVudAogICAgICAgICAqIEBwYXJhbSB7P30gYW5ub3RhdGlvbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcm93Q2xpY2tlZChldmVudCwgYW5ub3RhdGlvbikgewogICAgICAgICAgICAvLyBTaGlmdCBwcmVzc2VkLCBoYW5kbGUgbXVsdGlwbGUgYW5ub3RhdGlvbnMKICAgICAgICAgICAgaWYgKGV2ZW50LnNoaWZ0S2V5KSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBsZXQgYW5ub3RhdGlvbkluZGV4ID0gdGhpcy5zb3J0ZWRBbm5vdGF0aW9ucy5pbmRleE9mKGFubm90YXRpb24pOwogICAgICAgICAgICAgICAgaWYgKHRoaXMuc2VsZWN0ZWRBbm5vdGF0aW9ucy5sZW5ndGggPT09IDApIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLm9uUm93Q2xpY2suZW1pdCh0aGlzLnNvcnRlZEFubm90YXRpb25zLnNsaWNlKDAsIGFubm90YXRpb25JbmRleCArIDEpKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBsZXQgbGFzdEFubm90YXRpb24gPSB0aGlzLnNlbGVjdGVkQW5ub3RhdGlvbnNbdGhpcy5zZWxlY3RlZEFubm90YXRpb25zLmxlbmd0aCAtIDFdOwogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBsYXN0SW5kZXggPSB0aGlzLnNvcnRlZEFubm90YXRpb25zLmluZGV4T2YobGFzdEFubm90YXRpb24pOwogICAgICAgICAgICAgICAgICAgIGlmIChsYXN0SW5kZXggPCBhbm5vdGF0aW9uSW5kZXgpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5vblJvd0NsaWNrLmVtaXQodGhpcy5zb3J0ZWRBbm5vdGF0aW9ucy5zbGljZShsYXN0SW5kZXgsIGFubm90YXRpb25JbmRleCArIDEpKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMub25Sb3dDbGljay5lbWl0KHRoaXMuc29ydGVkQW5ub3RhdGlvbnMuc2xpY2UoYW5ub3RhdGlvbkluZGV4LCBsYXN0SW5kZXggKyAxKSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgLy8gTm8gc2hpZnQsIG9ubHkgb25lIGFubm90YXRpb24gY2xpY2tlZAogICAgICAgICAgICAgICAgdGhpcy5vblJvd0NsaWNrLmVtaXQoW2Fubm90YXRpb25dKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIEFubm90YXRpb25zTGlzdENvbXBvbmVudC5kZWNvcmF0b3JzID0gWwogICAgICAgIHsgdHlwZTogQ29tcG9uZW50LCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIHNlbGVjdG9yOiAnYW5ub3RhdGlvbnMtbGlzdC1jb21wb25lbnQnLAogICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlVXJsOiAnLi9hbm5vdGF0aW9uc19saXN0X2NvbXBvbmVudC5uZy5odG1sJywKICAgICAgICAgICAgICAgICAgICBzdHlsZVVybHM6IFsnLi9hbm5vdGF0aW9uc19saXN0X2NvbXBvbmVudC5jc3MnXSwKICAgICAgICAgICAgICAgICAgICBjaGFuZ2VEZXRlY3Rpb246IENoYW5nZURldGVjdGlvblN0cmF0ZWd5Lk9uUHVzaCwKICAgICAgICAgICAgICAgIH0sXSB9LAogICAgXTsKICAgIEFubm90YXRpb25zTGlzdENvbXBvbmVudC5wcm9wRGVjb3JhdG9ycyA9IHsKICAgICAgICBhbm5vdGF0aW9uczogW3sgdHlwZTogSW5wdXQgfV0sCiAgICAgICAgYW5ub3RhdGlvbnNFeHBhbmRlZDogW3sgdHlwZTogSW5wdXQgfV0sCiAgICAgICAgbnVtQW5ub3RhdGlvbnM6IFt7IHR5cGU6IElucHV0IH1dLAogICAgICAgIGFubm90YXRpb25Tb3J0OiBbeyB0eXBlOiBJbnB1dCB9XSwKICAgICAgICBhY3RpdmVNZXRyaWNzOiBbeyB0eXBlOiBJbnB1dCB9XSwKICAgICAgICBudW1BY3RpdmVSdW5zOiBbeyB0eXBlOiBJbnB1dCB9XSwKICAgICAgICBzb3J0ZWRBbm5vdGF0aW9uczogW3sgdHlwZTogSW5wdXQgfV0sCiAgICAgICAgc2VsZWN0ZWRBbm5vdGF0aW9uczogW3sgdHlwZTogSW5wdXQgfV0sCiAgICAgICAgbWF4Q291bnQ6IFt7IHR5cGU6IElucHV0IH1dLAogICAgICAgIG9uUm93Q2xpY2s6IFt7IHR5cGU6IE91dHB1dCB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lLG1pc3NpbmdSZXR1cm4sdW51c2VkUHJpdmF0ZU1lbWJlcnMsdXNlbGVzc0NvZGV9IGNoZWNrZWQgYnkgdHNjCiAgICAgKi8KICAgIGNsYXNzIEFubm90YXRpb25zTGlzdENvbnRhaW5lciB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBzdG9yZQogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKHN0b3JlKSB7CiAgICAgICAgICAgIHRoaXMuc3RvcmUgPSBzdG9yZTsKICAgICAgICAgICAgdGhpcy5hbm5vdGF0aW9uc0V4cGFuZGVkJCA9IHRoaXMuc3RvcmUucGlwZShzZWxlY3QoZ2V0QW5ub3RhdGlvbnNFeHBhbmRlZCkpOwogICAgICAgICAgICB0aGlzLmFjdGl2ZVJ1bnMkID0gdGhpcy5zdG9yZQogICAgICAgICAgICAgICAgLnBpcGUoc2VsZWN0KGdldEN1cnJlbnRSb3V0ZVJ1blNlbGVjdGlvbikpCiAgICAgICAgICAgICAgICAucGlwZShtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IHJ1blNlbGVjdGlvbgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHJ1blNlbGVjdGlvbikgPT4gewogICAgICAgICAgICAgICAgaWYgKCFydW5TZWxlY3Rpb24pCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFtdOwogICAgICAgICAgICAgICAgcmV0dXJuIEFycmF5LmZyb20ocnVuU2VsZWN0aW9uLmVudHJpZXMoKSkKICAgICAgICAgICAgICAgICAgICAuZmlsdGVyKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcnVuCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAocnVuKSA9PiBydW5bMV0pKQogICAgICAgICAgICAgICAgICAgIC5tYXAoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBydW4KICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChydW4pID0+IHJ1blswXSkpOwogICAgICAgICAgICB9KSkpOwogICAgICAgICAgICB0aGlzLm51bUFjdGl2ZVJ1bnMkID0gdGhpcy5hY3RpdmVSdW5zJC5waXBlKG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcnVucwogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHJ1bnMpID0+IHJ1bnMubGVuZ3RoKSkpOwogICAgICAgICAgICB0aGlzLmFjdGl2ZU1ldHJpY3MkID0gY29tYmluZUxhdGVzdChbCiAgICAgICAgICAgICAgICB0aGlzLnN0b3JlLnNlbGVjdChnZXRSdW5Ub01ldHJpY3MpLAogICAgICAgICAgICAgICAgdGhpcy5hY3RpdmVSdW5zJCwKICAgICAgICAgICAgICAgIHRoaXMuc3RvcmUuc2VsZWN0KGdldE1ldHJpY0ZpbHRlcnMpLAogICAgICAgICAgICBdKS5waXBlKG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoW3J1blRvTWV0cmljcywgYWN0aXZlUnVucywgbWV0cmljRmlsdGVyc10pID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCBtZXRyaWNzID0gW107CiAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IHJ1biBvZiBhY3RpdmVSdW5zKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKHJ1blRvTWV0cmljc1tydW5dKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG1ldHJpY3MgPSBtZXRyaWNzLmNvbmNhdChydW5Ub01ldHJpY3NbcnVuXS5maWx0ZXIoKC8qKgogICAgICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGtleQogICAgICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAgICAgKGtleSkgPT4gbWV0cmljSXNOcG1pQW5kTm90RGlmZihrZXkpKSkpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIG1ldHJpY3MgPSBbLi4ubmV3IFNldChbLi4uT2JqZWN0LmtleXMobWV0cmljRmlsdGVycyksIC4uLm1ldHJpY3NdKV07CiAgICAgICAgICAgICAgICByZXR1cm4gbWV0cmljczsKICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgdGhpcy52aXNpYmxlQW5ub3RhdGlvbnMkID0gY29tYmluZUxhdGVzdChbCiAgICAgICAgICAgICAgICB0aGlzLnN0b3JlLnNlbGVjdChnZXRBbm5vdGF0aW9uRGF0YSksCiAgICAgICAgICAgICAgICB0aGlzLnN0b3JlLnNlbGVjdChnZXRIaWRkZW5Bbm5vdGF0aW9ucyksCiAgICAgICAgICAgICAgICB0aGlzLnN0b3JlLnNlbGVjdChnZXRTaG93SGlkZGVuQW5ub3RhdGlvbnMpLAogICAgICAgICAgICBdKS5waXBlKG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoW2Fubm90YXRpb25EYXRhLCBoaWRkZW5Bbm5vdGF0aW9ucywgc2hvd0hpZGRlbkFubm90YXRpb25zXSkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIHJlbW92ZUhpZGRlbkFubm90YXRpb25zKGFubm90YXRpb25EYXRhLCBoaWRkZW5Bbm5vdGF0aW9ucywgc2hvd0hpZGRlbkFubm90YXRpb25zKTsKICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgdGhpcy5maWx0ZXJlZEFubm90YXRpb25zJCA9IGNvbWJpbmVMYXRlc3QoWwogICAgICAgICAgICAgICAgdGhpcy52aXNpYmxlQW5ub3RhdGlvbnMkLAogICAgICAgICAgICAgICAgdGhpcy5zdG9yZS5zZWxlY3QoZ2V0TWV0cmljQXJpdGhtZXRpYyksCiAgICAgICAgICAgICAgICB0aGlzLnN0b3JlLnNlbGVjdChnZXRNZXRyaWNGaWx0ZXJzKSwKICAgICAgICAgICAgICAgIHRoaXMuYWN0aXZlUnVucyQsCiAgICAgICAgICAgICAgICB0aGlzLmFjdGl2ZU1ldHJpY3MkLAogICAgICAgICAgICAgICAgdGhpcy5zdG9yZS5zZWxlY3QoZ2V0QW5ub3RhdGlvbnNSZWdleCksCiAgICAgICAgICAgIF0pCiAgICAgICAgICAgICAgICAucGlwZShtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKFt2aXNpYmxlQW5ub3RhdGlvbnMsIG1ldHJpY0FyaXRobWV0aWMsIG1ldHJpY0ZpbHRlcnMsIGFjdGl2ZVJ1bnMsIGFjdGl2ZU1ldHJpY3MsIGFubm90YXRpb25zUmVnZXgsXSkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIGZpbHRlckFubm90YXRpb25zKHZpc2libGVBbm5vdGF0aW9ucywgYWN0aXZlUnVucywgbWV0cmljQXJpdGhtZXRpYywgbWV0cmljRmlsdGVycywgYWN0aXZlTWV0cmljcywgYW5ub3RhdGlvbnNSZWdleCk7CiAgICAgICAgICAgIH0pKSkKICAgICAgICAgICAgICAgIC5waXBlKHNoYXJlKCkpOwogICAgICAgICAgICB0aGlzLm51bUFubm90YXRpb25zJCA9IHRoaXMuZmlsdGVyZWRBbm5vdGF0aW9ucyQucGlwZShtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGFubm90YXRpb25zCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoYW5ub3RhdGlvbnMpID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiBPYmplY3Qua2V5cyhhbm5vdGF0aW9ucykubGVuZ3RoOwogICAgICAgICAgICB9KSkpOwogICAgICAgICAgICB0aGlzLnNvcnRlZEFubm90YXRpb25zJCA9IGNvbWJpbmVMYXRlc3QoWwogICAgICAgICAgICAgICAgdGhpcy5maWx0ZXJlZEFubm90YXRpb25zJCwKICAgICAgICAgICAgICAgIHRoaXMuc3RvcmUucGlwZShzZWxlY3QoZ2V0QW5ub3RhdGlvblNvcnQpKSwKICAgICAgICAgICAgXSkucGlwZShtYXAoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKFthbm5vdGF0aW9ucywgc29ydF0pID0+IHsKICAgICAgICAgICAgICAgIHJldHVybiBzb3J0QW5ub3RhdGlvbnMoYW5ub3RhdGlvbnMsIHNvcnQpOwogICAgICAgICAgICB9KSkpOwogICAgICAgICAgICB0aGlzLnNlbGVjdGVkQW5ub3RhdGlvbnMkID0gdGhpcy5zdG9yZS5waXBlKHNlbGVjdChnZXRTZWxlY3RlZEFubm90YXRpb25zKSk7CiAgICAgICAgICAgIHRoaXMubWF4Q291bnQkID0gdGhpcy5maWx0ZXJlZEFubm90YXRpb25zJC5waXBlKG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gYW5ub3RhdGlvbnMKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChhbm5vdGF0aW9ucykgPT4gewogICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgbGV0IG1heCA9IDA7CiAgICAgICAgICAgICAgICBPYmplY3QudmFsdWVzKGFubm90YXRpb25zKS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gYW5ub3RhdGlvbgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKGFubm90YXRpb24pID0+IHsKICAgICAgICAgICAgICAgICAgICBhbm5vdGF0aW9uLmZvckVhY2goKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gdmFsdWVzCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAodmFsdWVzKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2YWx1ZXMuY291bnRWYWx1ZSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF4ID0gTWF0aC5tYXgobWF4LCB2YWx1ZXMuY291bnRWYWx1ZSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICByZXR1cm4gbWF4OwogICAgICAgICAgICB9KSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGFubm90YXRpb25zCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICByb3dDbGlja2VkKGFubm90YXRpb25zKSB7CiAgICAgICAgICAgIHRoaXMuc3RvcmUuZGlzcGF0Y2gobnBtaVRvZ2dsZVNlbGVjdGVkQW5ub3RhdGlvbnMoeyBhbm5vdGF0aW9ucyB9KSk7CiAgICAgICAgfQogICAgfQogICAgQW5ub3RhdGlvbnNMaXN0Q29udGFpbmVyLmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBDb21wb25lbnQsIGFyZ3M6IFt7CiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3I6IC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AgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgY29uc3QgYWxsTWV0cmljcyA9IG5ldyBTZXQoYWN0aXZlTWV0cmljcyk7CiAgICAgICAgaWYgKGFsbFJ1bnMuc2l6ZSA9PT0gMCB8fAogICAgICAgICAgICBhbGxNZXRyaWNzLnNpemUgPT09IDAgfHwKICAgICAgICAgICAgT2JqZWN0LmtleXMoYW5ub3RhdGlvbkRhdGEpLmxlbmd0aCA9PT0gMCkgewogICAgICAgICAgICByZXR1cm4geyBjb29yZGluYXRlczogW10sIGV4dHJlbWVzOiB7IG1pbjogLTEuMCwgbWF4OiAxLjAgfSB9OwogICAgICAgIH0KICAgICAgICBzZWxlY3RlZEFubm90YXRpb25zLmZvckVhY2goKC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gYW5ub3RhdGlvbgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgKGFubm90YXRpb24pID0+IHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBkYXRhID0gYW5ub3RhdGlvbkRhdGFbYW5ub3RhdGlvbl07CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgcnVuUmVzdWx0ID0ge307CiAgICAgICAgICAgIGRhdGEuZm9yRWFjaCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZW50cnkKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChlbnRyeSkgPT4gewogICAgICAgICAgICAgICAgaWYgKCFhbGxSdW5zLmhhcyhlbnRyeS5ydW4pIHx8ICFhbGxNZXRyaWNzLmhhcyhlbnRyeS5tZXRyaWMpKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKHJ1blJlc3VsdFtlbnRyeS5ydW5dKSB7CiAgICAgICAgICAgICAgICAgICAgcnVuUmVzdWx0W2VudHJ5LnJ1bl0ucHVzaChlbnRyeSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBydW5SZXN1bHRbZW50cnkucnVuXSA9IFtlbnRyeV07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAoZW50cnkublBNSVZhbHVlICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICAgICAgZXh0cmVtZVZhbHVlcy5tYXggPSBNYXRoLm1heChleHRyZW1lVmFsdWVzLm1heCwgZW50cnkublBNSVZhbHVlKTsKICAgICAgICAgICAgICAgICAgICBleHRyZW1lVmFsdWVzLm1pbiA9IE1hdGgubWluKGV4dHJlbWVWYWx1ZXMubWluLCBlbnRyeS5uUE1JVmFsdWUpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgZXh0cmVtZVZhbHVlcy5tYXggPSBNYXRoLm1heChleHRyZW1lVmFsdWVzLm1heCwgMCk7CiAgICAgICAgICAgICAgICAgICAgZXh0cmVtZVZhbHVlcy5taW4gPSBNYXRoLm1pbihleHRyZW1lVmFsdWVzLm1pbiwgMCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgZm9yIChjb25zdCBrZXkgb2YgT2JqZWN0LmtleXMocnVuUmVzdWx0KSkgewogICAgICAgICAgICAgICAgcmVzdWx0LnB1c2goewogICAgICAgICAgICAgICAgICAgIGFubm90YXRpb24sCiAgICAgICAgICAgICAgICAgICAgcnVuSWQ6IGtleSwKICAgICAgICAgICAgICAgICAgICB2YWx1ZXM6IHJ1blJlc3VsdFtrZXldLAogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0KICAgICAgICB9KSk7CiAgICAgICAgaWYgKGV4dHJlbWVWYWx1ZXMubWF4IDwgZXh0cmVtZVZhbHVlcy5taW4pIHsKICA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G9tOwogICAgICAgICAgICB0aGlzLmNvbG9yU2NhbGUgPSAoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiAnIzMzMzMzMycpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IGV2ZW50CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBvblJlc2l6ZShldmVudCkgewogICAgICAgICAgICB0aGlzLnJlZHJhdygpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG5nQWZ0ZXJWaWV3SW5pdCgpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBydW5zQ29sb3JTY2FsZSA9ICgoLyoqIEB0eXBlIHs/fSAqLyAoZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgndGYtY29sb3Itc2NhbGUnKSkpKS5ydW5zQ29sb3JTY2FsZTsKICAgICAgICAgICAgdGhpcy5jb2xvclNjYWxlID0gcnVuc0NvbG9yU2NhbGUgPyBydW5zQ29sb3JTY2FsZSA6IHRoaXMuY29sb3JTY2FsZTsKICAgICAgICAgICAgdGhpcy5zdmcgPSBzZWxlY3QkMSh0aGlzLnN2Z0VsZW1lbnQubmF0aXZlRWxlbWVudCk7CiAgICAgICAgICAgIHRoaXMubWFpbkNvbnRhaW5lciA9IHRoaXMuc3ZnCiAgICAgICAgICAgICAgICAuYXBwZW5kKCdnJykKICAgICAgICAgICAgICAgIC5hdHRyKCd0cmFuc2Zvcm0nLCBgdHJhbnNsYXRlKCR7dGhpcy5tYXJnaW4ubGVmdH0sICR7dGhpcy5tYXJnaW4udG9wfSlgKTsKICAgICAgICAgICAgdGhpcy5jb29yZGluYXRlc0dyb3VwID0gdGhpcy5tYWluQ29udGFpbmVyLmFwcGVuZCgnZycpOwogICAgICAgICAgICB0aGlzLmxhYmVsc0dyb3VwID0gdGhpcy5tYWluQ29udGFpbmVyLmFwcGVuZCgnZycpOwogICAgICAgICAgICB0aGlzLmF4aXNHcm91cCA9IHRoaXMubWFpbkNvbnRhaW5lci5hcHBlbmQoJ2cnKTsKICAgICAgICAgICAgdGhpcy54U2NhbGUgPSBwb2ludCQxKCkucGFkZGluZygwLjEpOwogICAgICAgICAgICB0aGlzLnlTY2FsZSA9IGxpbmVhciQxKCkucmFuZ2UoW3RoaXMuY2hhcnRIZWlnaHQsIDBdKTsKICAgICAgICAgICAgdGhpcy55QXhpcyA9IGF4aXNSaWdodCh0aGlzLnlTY2FsZSk7CiAgICAgICAgICAgIHRoaXMucmVkcmF3KCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gY2hhbmdlcwogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgbmdPbkNoYW5nZXMoY2hhbmdlcykgewogICAgICAgICAgICBpZiAodGhpcy5zdmcpIHsKICAgICAgICAgICAgICAgIHRoaXMucmVkcmF3KCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHJlZHJhdygpIHsKICAgICAgICAgICAgdGhpcy51cGRhdGVEaW1lbnNpb25zKCk7CiAgICAgICAgICAgIHRoaXMudXBkYXRlQXhlcygpOwogICAgICAgICAgICB0aGlzLmRyYXcoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHVwZGF0ZURpbWVuc2lvbnMoKSB7CiAgICAgICAgICAgIHRoaXMud2lkdGggPSB0aGlzLnN2Z0VsZW1lbnQubmF0aXZlRWxlbWVudC5jbGllbnRXaWR0aCB8fCAxMDsKICAgICAgICAgICAgdGhpcy5jaGFydFdpZHRoID0gdGhpcy53aWR0aCAtIHRoaXMubWFyZ2luLmxlZnQgLSB0aGlzLm1hcmdpbi5yaWdodDsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIHVwZGF0ZUF4ZXMoKSB7CiAgICAgICAgICAgIHRoaXMueFNjYWxlLnJhbmdlUm91bmQoWzAsIHRoaXMuY2hhcnRXaWR0aF0pLmRvbWFpbih0aGlzLmFjdGl2ZU1ldHJpY3MpOwogICAgICAgICAgICB0aGlzLnlTY2FsZS5kb21haW4oWwogICAgICAgICAgICAgICAgdGhpcy5jb29yZGluYXRlRGF0YS5leHRyZW1lcy5taW4sCiAgICAgICAgICAgICAgICB0aGlzLmNvb3JkaW5hdGVEYXRhLmV4dHJlbWVzLm1heCwKICAgICAgICAgICAgXSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkcmF3KCkgewogICAgICAgICAgICB0aGlzLmRyYXdBeGVzKCk7CiAgICAgICAgICAgIHRoaXMuZHJhd0F4aXNMYWJlbHMoKTsKICAgICAgICAgICAgdGhpcy5kcmF3Q29vcmRpbmF0ZXMoKTsKICAgICAgICAgICAgdGhpcy5kcmF3TGFiZWxzKCk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBkcmF3QXhlcygpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBheGVzID0gdGhpcy5heGlzR3JvdXAKICAgICAgICAgICAgICAgIC5zZWxlY3RBbGwoJy5heGlzLXknKQogICAgICAgICAgICAgICAgLmRhdGEodGhpcy5hY3RpdmVNZXRyaWNzKTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBheGlzRW50ZXJzID0gYXhlcy5lbnRlcigpLmFwcGVuZCgnZycpLmF0dHIoJ2NsYXNzJywgJ2F4aXMteScpOwogICAgICAgICAgICBheGlzRW50ZXJzCiAgICAgICAgICAgICAgICAubWVyZ2UoYXhlcykKICAgICAgICAgICAgICAgIC5hdHRyKCd0cmFuc2Zvcm0nLCAoLyoqCiAgICAgICAgICAgICAqIEB0aGlzIHs/fQogICAgICAgICAgICAgKiBAcGFyYW0gez99IGQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGZ1bmN0aW9uIChkKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gYHRyYW5zbGF0ZSgke3RoaXMueFNjYWxlKGQpfSwgMClgOwogICAgICAgICAgICB9KS5iaW5kKHRoaXMpKQogICAgICAgICAgICAgICAgLmNhbGwoKC8qKiBAdHlwZSB7P30gKi8gKHRoaXMueUF4aXMpKSk7CiAgICAgICAgICAgIGF4ZXMuZXhpdCgpLnJlbW92ZSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZHJhd0F4aXNMYWJlbHMoKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgYXhpc0JhY2tncm91bmRUZXh0cyA9IHRoaXMuYXhpc0dyb3VwCiAgICAgICAgICAgICAgICAuc2VsZWN0QWxsKCcuYXhpcy1iZy10ZXh0JykKICAgICAgICAgICAgICAgIC5kYXRhKHRoaXMuYWN0aXZlTWV0cmljcyk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgYXhpc0JhY2tncm91bmRUZXh0RW50ZXJzID0gYXhpc0JhY2tncm91bmRUZXh0cwogICAgICAgICAgICAgICAgLmVudGVyKCkKICAgICAgICAgICAgICAgIC5hcHBlbmQoJ3RleHQnKQogICAgICAgICAgICAgICAgLmF0dHIoJ2NsYXNzJywgJ2F4aXMtYmctdGV4dCcpCiAgICAgICAgICAgICAgICAuYXR0cignZm9udC1zaXplJywgJzEzcHgnKQogICAgICAgICAgICAgICAgLmF0dHIoJ3N0cm9rZS13aWR0aCcsIDIpCiAgICAgICAgICAgICAgICAuYXR0cignc3Ryb2tlLWxpbmVqb2luJywgJ3JvdW5kJykKICAgICAgICAgICAgICAgIC5hdHRyKCdzdHJva2UnLCAnd2hpdGUnKTsKICAgICAgICAgICAgYXhpc0JhY2tncm91bmRUZXh0RW50ZXJzCiAgICAgICAgICAgICAgICAubWVyZ2UoYXhpc0JhY2tncm91bmRUZXh0cykKICAgICAgICAgICAgICAgIC50ZXh0KCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBkCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoZCkgPT4gZCkpCiAgICAgICAgICAgICAgICAuYXR0cigndHJhbnNmb3JtJywgKC8qKgogICAgICAgICAgICAgKiBAdGhpcyB7P30KICAgICAgICAgICAgICogQHBhcmFtIHs/fSBkCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBmdW5jdGlvbiAoZCkgewogICAgICAgICAgICAgICAgcmV0dXJuIGB0cmFuc2xhdGUoJHsoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy54U2NhbGUoZCkpKSAtIDV9LCAke3RoaXMueVNjYWxlKHRoaXMuY29vcmRpbmF0ZURhdGEuZXh0cmVtZXMubWluKX0pIHJvdGF0ZSgtOTApYDsKICAgICAgICAgICAgfSkuYmluZCh0aGlzKSk7CiAgICAgICAgICAgIGF4aXNCYWNrZ3JvdW5kVGV4dHMuZXhpdCgpLnJlbW92ZSgpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGF4aXNUZXh0cyA9IHRoaXMuYXhpc0dyb3VwCiAgICAgICAgICAgICAgICAuc2VsZWN0QWxsKCcuYXhpcy10ZXh0JykKICAgICAgICAgICAgICAgIC5kYXRhKHRoaXMuYWN0aXZlTWV0cmljcyk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgYXhpc1RleHRFbnRlcnMgPSBheGlzVGV4dHMKICAgICAgICAgICAgICAgIC5lbnRlcigpCiAgICAgICAgICAgICAgICAuYXBwZW5kKCd0ZXh0JykKICAgICAgICAgICAgICAgIC5hdHRyKCdmb250LXNpemUnLCAnMTNweCcpCiAgICAgICAgICAgICAgICAuYXR0cignY2xhc3MnLCAnYXhpcy10ZXh0Jyk7CiAgICAgICAgICAgIGF4aXNUZXh0RW50ZXJzCiAgICAgICAgICAgICAgICAubWVyZ2UoYXhpc1RleHRzKQogICAgICAgICAgICAgICAgLnRleHQoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IGQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChkKSA9PiBkKSkKICAgICAgICAgICAgICAgIC5hdHRyKCd0cmFuc2Zvcm0nLCAoLyoqCiAgICAgICAgICAgICAqIEB0aGlzIHs/fQogICAgICAgICAgICAgKiBAcGFyYW0gez99IGQKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGZ1bmN0aW9uIChkKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gYHRyYW5zbGF0ZSgkeygvKiogQHR5cGUgez99ICovICh0aGlzLnhTY2FsZShkKSkpIC0gNX0sICR7dGhpcy55U2NhbGUodGhpcy5jb29yZGluYXRlRGF0YS5leHRyZW1lcy5taW4pfSkgcm90YXRlKC05MClgOwogICAgICAgICAgICB9KS5iaW5kKHRoaXMpKTsKICAgICAgICAgICAgYXhpc1RleHRzLmV4aXQoKS5yZW1vdmUoKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGRyYXdDb29yZGluYXRlcygpIHsKICAgICAgICAgICAgLy8gRHJhdyB0aGUgY29vcmRpbmF0ZSBwYXRocwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGNvb3JkcyA9IHRoaXMuY29vcmRpbmF0ZXNHcm91cAogICAgICAgICAgICAgICAgLnNlbGVjdEFsbCgnLmNvb3JkJykKICAgICAgICAgICAgICAgIC5kYXRhKHRoaXMuY29vcmRpbmF0ZURhdGEuY29vcmRpbmF0ZXMpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGNvb3JkRW50ZXJzID0gY29vcmRzCiAgICAgICAgICAgICAgICAuZW50ZXIoKQogICAgICAgICAgICAgICAgLmFwcGVuZCgncGF0aCcpCiAgICAgICAgICAgICAgICAuYXR0cignY2xhc3MnLCAnY29vcmQnKQogICAgICAgICAgICAgICAgLmF0dHIoJ2ZpbGwnLCAnbm9uZScpOwogICAgICAgICAgICBjb29yZEVudGVycwogICAgICAgICAgICAgICAgLm1lcmdlKGNvb3JkcykKICAgICAgICAgICAgICAgIC5hdHRyKCdkJywgdGhpcy5wYXRoLmJpbmQodGhpcykpCiAgICAgICAgICAgICAgICAuYXR0cignc3Ryb2tlJywgKC8qKgogICAgICAgICAgICAgKiBAdGhpcyB7P30KICAgICAgICAgICAgICogQHBhcmFtIHs/fSBkCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBmdW5jdGlvbiAoZCkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuY29sb3JTY2FsZShkLnJ1bklkKTsKICAgICAgICAgICAgfSkuYmluZCh0aGlzKSk7CiAgICAgICAgICAgIGNvb3Jkcy5leGl0KCkucmVtb3ZlKCk7CiAgICAgICAgICAgIC8vIERyYXcgaW52aXNpYmxlIHBhdGhzIGZvciBhIGJyb2FkZXIgaG92ZXIgYXJlYQogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGhpZGRlbkNvb3JkcyA9IHRoaXMuY29vcmRpbmF0ZXNHcm91cAogICAgICAgICAgICAgICAgLnNlbGVjdEFsbCgnLmhpZGRlbkNvb3JkJykKICAgICAgICAgICAgICAgIC5kYXRhKHRoaXMuY29vcmRpbmF0ZURhdGEuY29vcmRpbmF0ZXMpOwogICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgIGNvbnN0IGhpZGRlbkNvb3JkRW50ZXJzID0gaGlkZGVuQ29vcmRzCiAgICAgICAgICAgICAgICAuZW50ZXIoKQogICAgICAgICAgICAgICAgLmFwcGVuZCgncGF0aCcpCiAgICAgICAgICAgICAgICAuYXR0cignY2xhc3MnLCAnaGlkZGVuQ29vcmQnKQogICAgICAgICAgICAgICAgLmF0dHIoJ3N0cm9rZS13aWR0aCcsICcxMHB4JykKICAgICAgICAgICAgICAgIC5hdHRyKCdmaWxsJywgJ25vbmUnKQogICAgICAgICAgICAgICAgLmF0dHIoJ3N0cm9rZScsICdyZ2JhKDAsIDAsIDAsIDAuMCknKQogICAgICAgICAgICAgICAgLm9uKCdtb3VzZW92ZXInLCB0aGlzLmhhbmRsZUNvb3JkaW5hdGVNb3VzZU92ZXIuYmluZCh0aGlzKSkKICAgICAgICAgICAgICAgIC5vbignbW91c2VvdXQnLCB0aGlzLmhhbmRsZUNvb3JkaW5hdGVNb3VzZU91dC5iaW5kKHRoaXMpKTsKICAgICAgICAgICAgaGlkZGVuQ29vcmRFbnRlcnMubWVyZ2UoaGlkZGVuQ29vcmRzKS5hdHRyKCdkJywgdGhpcy5wYXRoLmJpbmQodGhpcykpOwogICAgICAgICAgICBoaWRkZW5Db29yZHMuZXhpdCgpLnJlbW92ZSgpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEBwYXJhbSB7P30gZAogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgcGF0aChkKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc29ydGVkID0gZC52YWx1ZXMuc29ydCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gYQogICAgICAgICAgICAgKiBAcGFyYW0gez99IGIKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChhLCBiKSA9PiB0aGlzLmFjdGl2ZU1ldHJpY3MuaW5kZXhPZihhLm1ldHJpYykgLQogICAgICAgICAgICAgICAgdGhpcy5hY3RpdmVNZXRyaWNzLmluZGV4T2YoYi5tZXRyaWMpKSk7CiAgICAgICAgICAgIHJldHVybiBsaW5lKCkoZC52YWx1ZXMubWFwKCgvKioKICAgICAgICAgICAgICogQHRoaXMgez99CiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZnVuY3Rpb24gKHApIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCB5UG9zID0gdGhpcy55U2NhbGUocC5uUE1JVmFsdWUpOwogICAgICAgICAgICAgICAgcmV0dXJuICgvKiogQHR5cGUgez99ICovIChbdGhpcy54U2NhbGUocC5tZXRyaWMpLCB5UG9zXSkpOwogICAgICAgICAgICB9KS5iaW5kKHRoaXMpKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHRoaXMgez99CiAgICAgICAgICogQHBhcmFtIHs/fSBkCiAgICAgICAgICogQHBhcmFtIHs/fSBpCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBoYW5kbGVDb29yZGluYXRlTW91c2VPdmVyKGQsIGkpIHsKICAgICAgICAgICAgdGhpcy5sYWJlbHNHcm91cAogICAgICAgICAgICAgICAgLnNlbGVjdEFsbCgnLmNvb3JkaW5hdGUtbGFiZWwnKQogICAgICAgICAgICAgICAgLmZpbHRlcigoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30geAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZnVuY3Rpb24gKHgpIHsKICAgICAgICAgICAgICAgIHJldHVybiAhKHguYW5ub3RhdGlvbiA9PT0gZC5hbm5vdGF0aW9uKTsKICAgICAgICAgICAgfSkpCiAgICAgICAgICAgICAgICAuc3R5bGUoJ29wYWNpdHknLCAwLjEpOwogICAgICAgICAgICB0aGlzLmNvb3JkaW5hdGVzR3JvdXAKICAgICAgICAgICAgICAgIC5zZWxlY3RBbGwoJy5jb29yZCcpCiAgICAgICAgICAgICAgICAuZmlsdGVyKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSB4CiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICBmdW5jdGlvbiAoeCkgewogICAgICAgICAgICAgICAgcmV0dXJuICEoeC5hbm5vdGF0aW9uID09PSBkLmFubm90YXRpb24pOwogICAgICAgICAgICB9KSkKICAgICAgICAgICAgICAgIC5zdHlsZSgnb3BhY2l0eScsIDAuMSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHRoaXMgez99CiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBoYW5kbGVDb29yZGluYXRlTW91c2VPdXQoKSB7CiAgICAgICAgICAgIHRoaXMubGFiZWxzR3JvdXAuc2VsZWN0QWxsKCcuY29vcmRpbmF0ZS1sYWJlbCcpLnN0eWxlKCdvcGFjaXR5JywgMS4wKTsKICAgICAgICAgICAgdGhpcy5jb29yZGluYXRlc0dyb3VwLnNlbGVjdEFsbCgnLmNvb3JkJykuc3R5bGUoJ29wYWNpdHknLCAxLjApOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcHJpdmF0ZQogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgZHJhd0xhYmVscygpIHsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBpbnRlcnBvbGF0aW9uRmFjdG9yID0gMzAgLyB0aGlzLnhTY2FsZS5zdGVwKCk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgZGF0YSA9IHRoaXMuY29vcmRpbmF0ZURhdGEuY29vcmRpbmF0ZXMubGVuZ3RoIDwgMzAKICAgICAgICAgICAgICAgID8gdGhpcy5jb29yZGluYXRlRGF0YS5jb29yZGluYXRlcwogICAgICAgICAgICAgICAgOiBbXTsKICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICBjb25zdCBjb29yZGluYXRlTGFiZWxzID0gdGhpcy5sYWJlbHNHcm91cAogICAgICAgICAgICAgICAgLnNlbGVjdEFsbCgnLmNvb3JkaW5hdGUtbGFiZWwnKQogICAgICAgICAgICAgICAgLmRhdGEoZGF0YSk7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3QgY29vcmRpbmF0ZUxhYmVsRW50ZXJzID0gY29vcmRpbmF0ZUxhYmVscwogICAgICAgICAgICAgICAgLmVudGVyKCkKICAgICAgICAgICAgICAgIC5hcHBlbmQoJ3RleHQnKQogICAgICAgICAgICAgICAgLmF0dHIoJ2NsYXNzJywgJ2Nvb3JkaW5hdGUtbGFiZWwnKQogICAgICAgICAgICAgICAgLmF0dHIoJ2ZvbnQtc2l6ZScsICcxMHB4Jyk7CiAgICAgICAgICAgIGNvb3JkaW5hdGVMYWJlbEVudGVycwogICAgICAgICAgICAgICAgLm1lcmdlKGNvb3JkaW5hdGVMYWJlbHMpCiAgICAgICAgICAgICAgICAudGV4dCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZnVuY3Rpb24gKGQpIHsKICAgICAgICAgICAgICAgIHJldHVybiBkLmFubm90YXRpb247CiAgICAgICAgICAgIH0pKQogICAgICAgICAgICAgICAgLmF0dHIoJ3gnLCAoLyoqIEB0eXBlIHs/fSAqLyAodGhpcy54U2NhbGUodGhpcy5hY3RpdmVNZXRyaWNzWzBdKSkpICsgMzApCiAgICAgICAgICAgICAgICAuYXR0cigneScsICgvKioKICAgICAgICAgICAgICogQHRoaXMgez99CiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgZnVuY3Rpb24gKGQpIHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IHkwID0gdGhpcy55U2NhbGUoZC52YWx1ZXNbMF0ublBNSVZhbHVlID8gZC52YWx1ZXNbMF0ublBNSVZhbHVlIDogMCk7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCB5MSA9IHRoaXMueVNjYWxlKGQudmFsdWVzWzFdLm5QTUlWYWx1ZSA/IGQudmFsdWVzWzFdLm5QTUlWYWx1ZSA6IDApOwogICAgICAgICAgICAgICAgcmV0dXJuICgxIC0gaW50ZXJwb2xhdGlvbkZhY3RvcikgKiB5MCArIGludGVycG9sYXRpb25GYWN0b3IgKiB5MTsKICAgICAgICAgICAgfSkuYmluZCh0aGlzKSk7CiAgICAgICAgICAgIGNvb3JkaW5hdGVMYWJlbHMuZXhpdC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GNsYXNzIFBhcmFsbGVsQ29vcmRpbmF0ZXNDb250YWluZXIgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gc3RvcmUKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihzdG9yZSkgewogICAgICAgICAgICB0aGlzLnN0b3JlID0gc3RvcmU7CiAgICAgICAgICAgIHRoaXMuYWN0aXZlUnVucyQgPSB0aGlzLnN0b3JlCiAgICAgICAgICAgICAgICAucGlwZShzZWxlY3QoZ2V0Q3VycmVudFJvdXRlUnVuU2VsZWN0aW9uKSkKICAgICAgICAgICAgICAgIC5waXBlKG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gcnVuU2VsZWN0aW9uCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAocnVuU2VsZWN0aW9uKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAoIXJ1blNlbGVjdGlvbikKICAgICAgICAgICAgICAgICAgICByZXR1cm4gW107CiAgICAgICAgICAgICAgICByZXR1cm4gQXJyYXkuZnJvbShydW5TZWxlY3Rpb24uZW50cmllcygpKQogICAgICAgICAgICAgICAgICAgIC5maWx0ZXIoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBydW4KICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChydW4pID0+IHJ1blsxXSkpCiAgICAgICAgICAgICAgICAgICAgLm1hcCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHJ1bgogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKHJ1bikgPT4gcnVuWzBdKSk7CiAgICAgICAgICAgIH0pKSk7CiAgICAgICAgICAgIHRoaXMuYWN0aXZlTWV0cmljcyQgPSBjb21iaW5lTGF0ZXN0KHRoaXMuc3RvcmUuc2VsZWN0KGdldFJ1blRvTWV0cmljcyksIHRoaXMuYWN0aXZlUnVucyQsIHRoaXMuc3RvcmUuc2VsZWN0KGdldE1ldHJpY0ZpbHRlcnMpKS5waXBlKG1hcCgoLyoqCiAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoW3J1blRvTWV0cmljcywgYWN0aXZlUnVucywgbWV0cmljRmlsdGVyc10pID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGxldCBtZXRyaWNzID0gW107CiAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IHJ1biBvZiBhY3RpdmVSdW5zKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKHJ1blRvTWV0cmljc1tydW5dKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG1ldHJpY3MgPSBtZXRyaWNzLmNvbmNhdChydW5Ub01ldHJpY3NbcnVuXS5maWx0ZXIoKC8qKgogICAgICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IGtleQogICAgICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAgICAgKGtleSkgPT4gbWV0cmljSXNOcG1pQW5kTm90RGlmZihrZXkpKSkpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIG1ldHJpY3MgPSBbLi4ubmV3IFNldChbLi4uT2JqZWN0LmtleXMobWV0cmljRmlsdGVycyksIC4uLm1ldHJpY3NdKV07CiAgICAgICAgICAgICAgICByZXR1cm4gbWV0cmljcy5tYXAoKC8qKgogICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBtZXRyaWMKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChtZXRyaWMpID0+IHN0cmlwTWV0cmljU3RyaW5nKG1ldHJpYykpKTsKICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgdGhpcy5jb29yZGluYXRlRGF0YSQgPSBjb21iaW5lTGF0ZXN0KFsKICAgICAgICAgICAgICAgIHRoaXMuc3RvcmUuc2VsZWN0KGdldEFubm90YXRpb25EYXRhKSwKICAgICAgICAgICAgICAgIHRoaXMuc3RvcmUuc2VsZWN0KGdldFNlbGVjdGVkQW5ub3RhdGlvbnMpLAogICAgICAgICAgICAgICAgdGhpcy5hY3RpdmVSdW5zJCwKICAgICAgICAgICAgICAgIHRoaXMuYWN0aXZlTWV0cmljcyQsCiAgICAgICAgICAgIF0pLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChbYW5ub3RhdGlvbkRhdGEsIHNlbGVjdGVkQW5ub3RhdGlvbnMsIHJ1bnMsIG1ldHJpY3NdKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gY29udmVydFRvQ29vcmRpbmF0ZURhdGEoYW5ub3RhdGlvbkRhdGEsIHNlbGVjdGVkQW5ub3RhdGlvbnMsIHJ1bnMsIG1ldHJpY3MpOwogICAgICAgICAgICB9KSkpOwogICAgICAgICAgICB0aGlzLnNpZGViYXJXaWR0aCQgPSB0aGlzLnN0b3JlLnNlbGVjdChnZXRTaWRlYmFyV2lkdGgpOwogICAgICAgIH0KICAgIH0KICAgIFBhcmFsbGVsQ29vcmRpbmF0ZXNDb250YWluZXIuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IENvbXBvbmVudCwgYXJnczogW3sKICAgICAgICAgICAgICAgICAgICBzZWxlY3RvcjogJ25wbWktcGFyYWxsZWwtY29vcmRpbmF0ZXMnLAogICAgICAgICAgICAgICAgICAgIHRlbXBsYXRl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zaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICBjbGFzcyBTZWxlY3RlZEFubm90YXRpb25zQ29udGFpbmVyIHsKICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHN0b3JlCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3Ioc3RvcmUpIHsKICAgICAgICAgICAgdGhpcy5zdG9yZSA9IHN0b3JlOwogICAgICAgICAgICB0aGlzLnBjRXhwYW5kZWQkID0gdGhpcy5zdG9yZS5waXBlKHNlbGVjdChnZXRQQ0V4cGFuZGVkKSk7CiAgICAgICAgICAgIHRoaXMuc2VsZWN0ZWRBbm5vdGF0aW9ucyQgPSB0aGlzLnN0b3JlLnNlbGVjdChnZXRTZWxlY3RlZEFubm90YXRpb25zKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBjbGVhclNlbGVjdGVkQW5ub3RhdGlvbnMoKSB7CiAgICAgICAgICAgIHRoaXMuc3RvcmUuZGlzcGF0Y2gobnBtaUNsZWFyU2VsZWN0ZWRBbm5vdGF0aW9ucygpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICB0b2dnbGVFeHBhbmRlZCgpIHsKICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChucG1pVG9nZ2xlUGFyYWxsZWxDb29yZGluYXRlc0V4cGFuZGVkKCkpOwogICAgICAgIH0KICAgIH0KICAgIFNlbGVjdGVkQW5ub3RhdGlvbnNDb250YWluZXIuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IENvbXBvbmVudCwgYXJnczogW3sKICAgICAgICAgICAgICAgICAgICBzZWxlY3RvcjogJ25wbWktc2VsZWN0ZWQtYW5ub3RhdGlvbnMnLAogICA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QogICAgICAgICAgICAgICAgLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBydW5zCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAocnVucykgPT4gewogICAgICAgICAgICAgICAgaWYgKCFydW5zKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIFsuLi5ydW5zLnZhbHVlcygpXS5pbmNsdWRlcyh0cnVlKTsKICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgdGhpcy5zaWRlYmFyRXhwYW5kZWQkID0gdGhpcy5zdG9yZS5waXBlKHNlbGVjdChnZXRTaWRlYmFyRXhwYW5kZWQpKTsKICAgICAgICAgICAgdGhpcy5zaWRlYmFyV2lkdGgkID0gdGhpcy5zdG9yZS5waXBlKHNlbGVjdChnZXRTaWRlYmFyV2lkdGgpKTsKICAgICAgICAgICAgdGhpcy5yZXNpemluZyA9IGZhbHNlOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uVG9nZ2xlU2lkZWJhckV4cGFuZGVkKCkgewogICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKG5wbWlUb2dnbGVTaWRlYmFyRXhwYW5kZWQoKSk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gZXZlbnQKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uUmVzaXplVHJpZ2dlcmVkKGV2ZW50KSB7CiAgICAgICAgICAgIGlmICh0aGlzLnJlc2l6aW5nKSB7CiAgICAgICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKG5wbWlDaGFuZ2VTaWRlYmFyV2lkdGgoewogICAgICAgICAgICAgICAgICAgIHNpZGViYXJXaWR0aDogZXZlbnQuY2xpZW50WCwKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIG9uUmVzaXplR3JhYmJlZCgpIHsKICAgICAgICAgICAgdGhpcy5yZXNpemluZyA9IHRydWU7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICovCiAgICAgICAgb25SZXNpemVSZWxlYXNlZCgpIHsKICAgICAgICAgICAgdGhpcy5yZXNpemluZyA9IGZhbHNlOwogICAgICAgIH0KICAgIH0KICAgIE1haW5Db250YWluZXIuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IENvbXBvbmVudCwgYXJnczogW3sKICAgICAgICAgICAgICAgICAgICBzZWxlY3RvcjogJ25wbWktbWFpbicsCiAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU6IGAKICAgIDxtYWluLWNvbXBvbmVudAogICAgICBbcnVuQWN0aXZlXT0icnVuQWN0aXZlJCB8IGFzeW5jIgogICAgICBbc2lkZWJhckV4cGFuZGVkXT0ic2lkZWJhckV4cGFuZGVkJCB8IGFzeW5jIgogICAgICBbc2lkZWJhcldpZHRoXT0ic2lkZWJhcldpZHRoJCB8IGFzeW5jIgogICAgICAodG9nZ2xlU2lkZWJhckV4cGFuZGVkKT0ib25Ub2dnbGVTaWRlYmFyRXhwYW5kZWQoKSIKICAgICAgKHJlc2l6ZVRyaWdnZXJlZCk9Im9uUmVzaXplVHJpZ2dlcmVkKCRldmVudCkiCiAgICAgIChyZXNpemVHcmFiYmVkKT0ib25SZXNpemVHcmFiYmVkKCkiCiAgICAgIChyZXNpemVSZWxlYXNlZCk9Im9uUmVzaXplUmVsZWFzZWQoKSIKICAgID48L21haW4tY29tcG9uZW50PgogIGAsCiAgICAgICAgICAgICAgICAgICAgY2hhbmdlRGV0ZWN0aW9uOiBDaG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gICAgICovCiAgICAgICAgY29uc3RydWN0b3Ioc3RvcmUpIHsKICAgICAgICAgICAgdGhpcy5zdG9yZSA9IHN0b3JlOwogICAgICAgICAgICB0aGlzLnJ1bnMkID0gdGhpcy5zdG9yZS5waXBlKHNlbGVjdChnZXRDdXJyZW50Um91dGVSdW5TZWxlY3Rpb24pKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBuZ09uSW5pdCgpIHsKICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaChucG1pTG9hZGVkKCkpOwogICAgICAgIH0KICAgIH0KICAgIE5wbWlDb250YWluZXIuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IENvbXBvbmVudCwgYXJnczogW3sKICAgICAgICAgICAgICAgICAgICBzZWxlY3RvcjogJ25wbWknLAogICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlOiBgIDxucG1pLWNvbXBvbmVudCBbcnVuc109InJ1bnMkIHwgYXN5bmMiPjwvbnBtaS1jb21wb25lbnQ+IGAsCiAgICAgICAgICAgICAgICB9LF0gfSwKICAgIF07CiAgICAvKiogQG5vY29sbGFwc2UgKi8KICAgIE5wbWlDb250YWluZXIuY3RvclBhcmFtZXRlcnMgPSAoKSA9PiBbCiAgICAgICAgeyB0eXBlOiBTdG9yZSB9CiAgICBdOwogICAgLyoqIEBub2NvbGxhcHNlICovIE5wbWlDb250YWluZXIuybVmYWMgPSBmdW5jdGlvbiBOcG1pQ29udGFpbmVyX0ZhY3RvcnkodCkgeyByZXR1cm4gbmV3ICh0IHx8IE5wbWlDb250YWluZXIpKMm1ybVkaXJlY3RpdmVJbmplY3QoU3RvcmUpKTsgfTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLyBOcG1pQ29udGFpbmVyLsm1Y21wID0gybXJtWRlZmluZUNvbXBvbmVudCh7IHR5cGU6IE5wbWlDb250YWluZXIsIHNlbGVjdG9yczogW1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0gJ2RhdGEvcGx1Z2luL25wbWknOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZldGNoRGF0YSgpIHsKICAgICAgICAgICAgcmV0dXJuIGZvcmtKb2luKHRoaXMuZmV0Y2hBbm5vdGF0aW9ucygpLCB0aGlzLmZldGNoTWV0cmljcygpLCB0aGlzLmZldGNoVmFsdWVzKCksIHRoaXMuZmV0Y2hFbWJlZGRpbmdzKCkpLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIChbYW5ub3RhdGlvbnMsIG1ldHJpY3MsIHZhbHVlcywgZW1iZWRkaW5nc10pID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGFubm90YXRpb25EYXRhID0ge307CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBlbWJlZGRpbmdEYXRhID0ge307CiAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IHJ1biBvZiBPYmplY3Qua2V5cyhhbm5vdGF0aW9ucykpIHsKICAgICAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IGFubm90YXRpb25JbmRleCBpbiBhbm5vdGF0aW9uc1tydW5dKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgYW5ub3RhdGlvbiA9IGFubm90YXRpb25zW3J1bl1bYW5ub3RhdGlvbkluZGV4XTsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGVtYmVkZGluZ3NbcnVuXVthbm5vdGF0aW9uSW5kZXhdKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbWJlZGRpbmdEYXRhW2Fubm90YXRpb25dID0gZW1iZWRkaW5nc1tydW5dW2Fubm90YXRpb25JbmRleF07CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBtZXRyaWNUb0RhdGFFbGVtZW50cyA9IG5ldyBNYXAoKTsKICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChjb25zdCBtZXRyaWNJbmRleCBpbiBtZXRyaWNzW3J1bl0pIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG1ldHJpYyA9IG1ldHJpY3NbcnVuXVttZXRyaWNJbmRleF07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBtZXRyaWNTdHJpbmcgPSBzdHJpcE1ldHJpY1N0cmluZyhtZXRyaWMpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRhdGFFbGVtZW50ID0gbWV0cmljVG9EYXRhRWxlbWVudHMuZ2V0KG1ldHJpY1N0cmluZyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWRhdGFFbGVtZW50KSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YUVsZW1lbnQgPSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5QTUlWYWx1ZTogbnVsbCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY291bnRWYWx1ZTogbnVsbCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYW5ub3RhdGlvbjogYW5ub3RhdGlvbiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWV0cmljOiBtZXRyaWNTdHJpbmcsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJ1bjogcnVuLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWV0cmljVG9EYXRhRWxlbWVudHMuc2V0KG1ldHJpY1N0cmluZywgZGF0YUVsZW1lbnQpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG1ldHJpY0lzTWV0cmljQ291bnQobWV0cmljKSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFFbGVtZW50LmNvdW50VmFsdWUgPQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZXNbcnVuXVthbm5vdGF0aW9uSW5kZXhdW21ldHJpY0luZGV4XTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKG1ldHJpY0lzTnBtaShtZXRyaWMpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YUVsZW1lbnQublBNSVZhbHVlID0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWVzW3J1bl1bYW5ub3RhdGlvbkluZGV4XVttZXRyaWNJbmRleF07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBleGlzdGluZyA9IGFubm90YXRpb25EYXRhW2Fubm90YXRpb25dCiAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGFubm90YXRpb25EYXRhW2Fubm90YXRpb25dCiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IFtdOwogICAgICAgICAgICAgICAgICAgICAgICBhbm5vdGF0aW9uRGF0YVthbm5vdGF0aW9uXSA9IFsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC4uLmV4aXN0aW5nLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgLi4ubWV0cmljVG9EYXRhRWxlbWVudHMudmFsdWVzKCksCiAgICAgICAgICAgICAgICAgICAgICAgIF07CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIHsgYW5ub3RhdGlvbkRhdGEsIG1ldHJpY3MsIGVtYmVkZGluZ0RhdGEgfTsKICAgICAgICAgICAgfSkpLCBjYXRjaEVycm9yKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBlcnJvcgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGVycm9yKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAoZXJyb3IgaW5zdGFuY2VvZiBIdHRwRXJyb3JSZXNwb25zZSAmJgogICAgICAgICAgICAgICAgICAgIDQwMCA8PSBlcnJvci5zdGF0dXMgJiYKICAgICAgICAgICAgICAgICAgICBlcnJvci5zdGF0dXMgPCA1MDApIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gb2YoewogICAgICAgICAgICAgICAgICAgICAgICBhbm5vdGF0aW9uRGF0YToge30sCiAgICAgICAgICAgICAgICAgICAgICAgIG1ldHJpY3M6IHt9LAogICAgICAgICAgICAgICAgICAgICAgICBlbWJlZGRpbmdEYXRhOiB7fSwKICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiB0aHJvd0Vycm9yKGVycm9yKTsKICAgICAgICAgICAgfSkpKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZldGNoQW5ub3RhdGlvbnMoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmh0dHAuZ2V0KHRoaXMuaHR0cFBhdGhQcmVmaXggKyAnL2Fubm90YXRpb25zJyk7CiAgICAgICAgfQogICAgICAgIC8qKgogICAgICAgICAqIEBwcml2YXRlCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmZXRjaE1ldHJpY3MoKSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmh0dHAuZ2V0KHRoaXMuaHR0cFBhdGhQcmVmaXggKyAnL21ldHJpY3MnKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZldGNoVmFsdWVzKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5odHRwLmdldCh0aGlzLmh0dHBQYXRoUHJlZml4ICsgJy92YWx1ZXMnKTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGZldGNoRW1iZWRkaW5ncygpIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuaHR0cC5nZXQodGhpcy5odHRwUGF0aFByZWZpeCArICcvZW1iZWRkaW5ncycpOwogICAgICAgIH0KICAgIH0KICAgIE5wbWlIdHRwU2VydmVyRGF0YVNvdXJjZS5kZWNvcmF0b3JzID0gWwogICAgICAgIHsgdHlwZTogSW5qZWN0YWJsZSB9LAogICAgXTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLwogICAgTnBtaUh0dHBTZXJ2ZXJEYXRhU291cmNlLmN0b3JQYXJhbWV0ZXJzID0gKCkgPT4gWwogICAgICAgIHsgdHlwZTogVEJIdHRwQ2xpZW50IH0KICAgIF07CiAgICAvKiogQG5vY29sbGFwc2UgKi8gTnBtaUh0dHBTZXJ2ZXJEYXRhU291cmNlLsm1ZmFjID0gZnVuY3Rpb24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IHRzYwogICAgICovCiAgICBjbGFzcyBOcG1pRWZmZWN0cyB7CiAgICAgICAgLyoqCiAgICAgICAgICogQHBhcmFtIHs/fSBhY3Rpb25zJAogICAgICAgICAqIEBwYXJhbSB7P30gc3RvcmUKICAgICAgICAgKiBAcGFyYW0gez99IGRhdGFTb3VyY2UKICAgICAgICAgKi8KICAgICAgICBjb25zdHJ1Y3RvcihhY3Rpb25zJCwgc3RvcmUsIGRhdGFTb3VyY2UpIHsKICAgICAgICAgICAgdGhpcy5hY3Rpb25zJCA9IGFjdGlvbnMkOwogICAgICAgICAgICB0aGlzLnN0b3JlID0gc3RvcmU7CiAgICAgICAgICAgIHRoaXMuZGF0YVNvdXJjZSA9IGRhdGFTb3VyY2U7CiAgICAgICAgICAgIHRoaXMubG9hZERhdGEkID0gY3JlYXRlRWZmZWN0KCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGxvYWRQbHVnaW5EYXRhJCA9IHRoaXMubG9hZFBsdWdpbkRhdGEoKTsKICAgICAgICAgICAgICAgIHJldHVybiBtZXJnZShsb2FkUGx1Z2luRGF0YSQpLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+ICh7fSkpKSk7CiAgICAgICAgICAgIH0pLCB7IGRpc3BhdGNoOiBmYWxzZSB9KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAqLwogICAgICAgIGxvYWRQbHVnaW5EYXRhKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5hY3Rpb25zJC5waXBlKG9mVHlwZShucG1pTG9hZGVkKSwgd2l0aExhdGVzdEZyb20odGhpcy5zdG9yZS5zZWxlY3QoZ2V0UGx1Z2luRGF0YUxvYWRlZCkpLCBmaWx0ZXIoKC8qKgogICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKFssIHsgc3RhdGUgfV0pID0+IHN0YXRlICE9PSBEYXRhTG9hZFN0YXRlLkxPQURJTkcpKSwgdGFwKCgvKioKICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICovCiAgICAgICAgICAgICgpID0+IHRoaXMuc3RvcmUuZGlzcGF0Y2gobnBtaVBsdWdpbkRhdGFSZXF1ZXN0ZWQoKSkpKSwgbWVyZ2VNYXAoKC8qKgogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKCkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuZGF0YVNvdXJjZS5mZXRjaERhdGEoKS5waXBlKHRhcCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHJlc3VsdAogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKHJlc3VsdCkgPT4gewogICAgICAgICAgICAgICAgICAgIHRoaXMuc3RvcmUuZGlzcGF0Y2gobnBtaVBsdWdpbkRhdGFMb2FkZWQocmVzdWx0KSk7CiAgICAgICAgICAgICAgICB9KSksIG1hcCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB2b2lkIG51bGwpKSwgY2F0Y2hFcnJvcigoLyoqCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5zdG9yZS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b25lbnQsIE1ldHJpY1NlYXJjaENvbnRhaW5lcl0sIGltcG9ydHM6IFtDb21tb25Nb2R1bGUsIE1hdEljb25Nb2R1bGUsIE1hdElucHV0TW9kdWxlLCBNYXRBdXRvY29tcGxldGVNb2R1bGVdLCBleHBvcnRzOiBbTWV0cmljU2VhcmNoQ29udGFpbmVyXSB9KTsgfSkoKTsKCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcgYWRkZWQgYnkgdHNpY2tsZQogICAgICogR2VuZXJhdGVkIGZyb206IHRlbnNvcmJvYXJkL3dlYmFwcC9wbHVnaW5zL25wbWkvdmlld3MvZGF0YV9zZWxlY3Rpb24vbWV0cmljX2FyaXRobWV0aWMvbWV0cmljX2FyaXRobWV0aWNfZWxlbWVudC9tZXRyaWNfYXJpdGhtZXRpY19lbGVtZW50X21vZHVsZS50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICBjbGFzcyBNZXRyaWNBcml0aG1ldGljRWxlbWVudE1vZHVsZSB7CiAgICB9CiAgICBNZXRyaWNBcml0aG1ldGljRWxlbWVudE1vZHVsZS5kZWNvcmF0b3JzID0gWwogICAgICAgIHsgdHlwZTogTmdNb2R1bGUsIGFyZ3M6IFt7CiAgICAgICAgICAgICAgICAgICAgZGVjbGFyYXRpb25zOiBbCiAgICAgICAgICAgICAgICAgICAgICAgIE1ldHJpY0FyaXRobWV0aWNFbGVtZW50Q29tcG9uZW50LAogICAgICAgICAgICAgICAgICAgICAgICBNZXRyaWNBcml0aG1ldGljRWxlbWVudENvbnRhaW5lciwKICAgICAgICAgICAgICAgICAgICBdLAogICAgICAgICAgICAgICAgICAgIGltcG9ydHM6IFsKICAgICAgICAgICAgICAgICAgICAgICAgQ29tbW9uTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBGb3Jtc01vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgUmVhY3RpdmVGb3Jtc01vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgTWF0SWNvbk1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgTWF0Q2hpcHNNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIE1hdFRvb2x0aXBNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgICAgICBleHBvcnRzOiBbTWV0cmljQXJpdGhtZXRpY0VsZW1lbnRDb250YWluZXJdLAogICAgICAgICAgICAgICAgfSxdIH0sCiAgICBdOwogICAgLyoqIEBub2NvbGxhcHNlICovIE1ldHJpY0FyaXRobWV0aWNFbGVtZW50TW9kdWxlLsm1bW9kID0gybXJtWRlZmluZU5nTW9kdWxlKHsgdHlwZTogTWV0cmljQXJpdGhtZXRpY0VsZW1lbnRNb2R1bGUgfSk7CiAgICAvKiogQG5vY29sbGFwc2UgKi8gTWV0cmljQXJpdGhtZXRpY0VsZW1lbnRNb2R1bGUuybVpbmogPSDJtcm1ZGVmaW5lSW5qZWN0b3IoeyBmYWN0b3J5OiBmdW5jdGlvbiBNZXRyaWNBcml0aG1ldGljRWxlbWVudE1vZHVsZV9GYWN0b3J5KHQpIHsgcmV0dXJuIG5ldyAodCB8fCBNZXRyaWNBcml0aG1ldGljRWxlbWVudE1vZHVsZSkoKTsgfSwgaW1wb3J0czogW1sKICAgICAgICAgICAgICAgIENvbW1vbk1vZHVsZSwKICAgICAgICAgICAgICAgIEZvcm1zTW9kdWxlLAogICAgICAgICAgICAgICAgUmVhY3RpdmVGb3Jtc01vZHVsZSwKICAgICAgICAgICAgICAgIE1hdEljb25Nb2R1bGUsCiAgICAgICAgICAgICAgICBNYXRDaGlwc01vZHVsZSwKICAgICAgICAgICAgICAgIE1hdFRvb2x0aXB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jdGlvbi9kYXRhX3NlbGVjdGlvbl9tb2R1bGUudHMKICAgICAqIEBzdXBwcmVzcyB7Y2hlY2tUeXBlcyxjb25zdGFudFByb3BlcnR5LGV4dHJhUmVxdWlyZSxtaXNzaW5nT3ZlcnJpZGUsbWlzc2luZ1JldHVybix1bnVzZWRQcml2YXRlTWVtYmVycyx1c2VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgY2xhc3MgRGF0YVNlbGVjdGlvbk1vZHVsZSB7CiAgICB9CiAgICBEYXRhU2VsZWN0aW9uTW9kdWxlLmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBOZ01vZHVsZSwgYXJnczogW3sKICAgICAgICAgICAgICAgICAgICBkZWNsYXJhdGlvbnM6IFtEYXRhU2VsZWN0aW9uQ29tcG9uZW50XSwKICAgICAgICAgICAgICAgICAgICBpbXBvcnRzOiBbCiAgICAgICAgICAgICAgICAgICAgICAgIENvbW1vbk1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgTWV0cmljU2VhcmNoTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBNZXRyaWNBcml0aG1ldGljTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBSZXN1bHRzRG93bmxvYWRNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgICAgICBleHBvcnRzOiBbRGF0YVNlbGVjdGlvbkNvbXBvbmVudF0sCiAgICAgICAgICAgICAgICB9LF0gfSwKICAgIF07CiAgICAvKiogQG5vY29sbGFwc2UgKi8gRGF0YVNlbGVjdGlvbk1vZHVsZS7JtW1vZCA9IMm1ybVkZWZpbmVOZ01vZHVsZSh7IHR5cGU6IERhdGFTZWxlY3Rpb25Nb2R1bGUgfSk7CiAgICAvKiogQG5vY29sbGFwc2UgKi8gRGF0YVNlbGVjdGlvbk1vZHVsZS7JtWluaiA9IMm1ybVkZWZpbmVJbmplY3Rvcih7IGZhY3Rvcn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woKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogdGVuc29yYm9hcmQvd2ViYXBwL3BsdWdpbnMvbnBtaS92aWV3cy9hbm5vdGF0aW9uc19saXN0L2Fubm90YXRpb25zX2xpc3RfdG9vbGJhci9hbm5vdGF0aW9uc19saXN0X3Rvb2xiYXJfbW9kdWxlLnRzCiAgICAgKiBAc3VwcHJlc3Mge2NoZWNrVHlwZXMsY29uc3RhbnRQcm9wZXJ0eSxleHRyYVJlcXVpcmUsbWlzc2luZ092ZXJyaWRlLG1pc3NpbmdSZXR1cm4sdW51c2VkUHJpdmF0ZU1lbWJlcnMsdXNlbGVzc0NvZGV9IGNoZWNrZWQgYnkgdHNjCiAgICAgKi8KICAgIGNsYXNzIEFubm90YXRpb25zTGlzdFRvb2xiYXJNb2R1bGUgewogICAgfQogICAgQW5ub3RhdGlvbnNMaXN0VG9vbGJhck1vZHVsZS5kZWNvcmF0b3JzID0gWwogICAgICAgIHsgdHlwZTogTmdNb2R1bGUsIGFyZ3M6IFt7CiAgICAgICAgICAgICAgICAgICAgZGVjbGFyYXRpb25zOiBbCiAgICAgICAgICAgICAgICAgICAgICAgIEFubm90YXRpb25zTGlzdFRvb2xiYXJDb21wb25lbnQsCiAgICAgICAgICAgICAgICAgICAgICAgIEFubm90YXRpb25zTGlzdFRvb2xiYXJDb250YWluZXIsCiAgICAgICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgICAgICBpbXBvcnRzOiBbCiAgICAgICAgICAgICAgICAgICAgICAgIENvbW1vbk1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgRm9ybXNNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIE1hdEljb25Nb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIE1hdEJ1dHRvbk1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgTWF0U2xpZGVUb2dnbGVNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIEFubm90YXRpb25zU2VhcmNoTW9kdWxlLAogICAgICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICAgICAgZXhwb3J0czogW0Fubm90YXRpb25zTGlzdFRvb2xiYXJDb250YWluZXJdLAogICAgICAgICAgICAgICAgfSxdIH0sCiAgICBdOwogICAgLyoqIEBub2NvbGxhcHNlICovIEFubm90YXRpb25zTGlzdFRvb2xiYXJNb2R1bGUuybVtb2QgPSDJtcm1ZGVmaW5lTmdNb2R1bGUoeyB0eXBlOiBBbm5vdGF0aW9uc0xpc3RUb29sYmFyTW9kdWxlIH0pOwogICAgLyoqIEBub2NvbGxhcHNlICovIEFubm90YXRpb25zTGlzdFRvb2xiYXJNb2R1bGUuybVpbmogPSDJtcm1ZGVmaW5lSW5qZWN0b3IoeyBmYWN0b3J5OiBmdW5jdGlvbiBBbm5vdGF0aW9uc0xpc3RUb29sYmFyTW9kdWxlX0ZhY3RvcnkodCkgeyByZXR1cm4gbmV3ICh0IHx8IEFubm90YXRpb25zTGlzdFRvb2xiYXJNb2R1bGUpKCk7IH0sIGltcG9ydHM6IFtbCiAgICAgICAgICAgICAgICBDb21tb25Nb2R1bGUsCiAgICAgICAgICAgICAgICBGb3Jtc01vZHVsZSwKICAgICAgICAgICAgICAgIE1hdEljb25Nb2R1bGUsCiAgICAgICAgICAgICAgICBNYXRCdXR0b25Nb2R1bGUsCiAgICAgICAgICAgICAgICBNYXRTbGlkZVRvZ2dsZU1vZHVsZSwKICAgICAgICAgICAgICAgIEFubm90YXRpb25zU2VhcmNoTW9kdWxlLAogICAgICAgICAgICBdXSB9KTsKICAgIChmdW5jdGlvbiAoKSB7ICh0eXBlb2YgbmdKaXRNb2RlID09PSAidW5kZWZpbmVkIiB8fCBuZ0ppdE1vZGUpICYmIMm1ybVzZXROZ01vZHVsZVNjb3BlKEFubm90YXRpb25zTGlzdFRvb2xiYXJNb2R1bGUsIHsgZGVjb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HVsZSwgRm9ybXNNb2R1bGUsIE1hdENoZWNrYm94TW9kdWxlLCBNYXRJY29uTW9kdWxlXSwgZXhwb3J0czogW0Fubm90YXRpb25Db250YWluZXJdIH0pOyB9KSgpOwoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogdGVuc29yYm9hcmQvd2ViYXBwL3BsdWdpbnMvbnBtaS92aWV3cy9hbm5vdGF0aW9uc19saXN0L2Fubm90YXRpb25zX2xpc3RfbW9kdWxlLnRzCiAgICAgKiBAc3VwcHJlc3Mge2NoZWNrVHlwZXMsY29uc3RhbnRQcm9wZXJ0eSxleHRyYVJlcXVpcmUsbWlzc2luZ092ZXJyaWRlLG1pc3NpbmdSZXR1cm4sdW51c2VkUHJpdmF0ZU1lbWJlcnMsdXNlbGVzc0NvZGV9IGNoZWNrZWQgYnkgdHNjCiAgICAgKi8KICAgIGNsYXNzIEFubm90YXRpb25zTGlzdE1vZHVsZSB7CiAgICB9CiAgICBBbm5vdGF0aW9uc0xpc3RNb2R1bGUuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IE5nTW9kdWxlLCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIGRlY2xhcmF0aW9uczogW0Fubm90YXRpb25zTGlzdENvbXBvbmVudCwgQW5ub3RhdGlvbnNMaXN0Q29udGFpbmVyXSwKICAgICAgICAgICAgICAgICAgICBpbXBvcnRzOiBbCiAgICAgICAgICAgICAgICAgICAgICAgIENvbW1vbk1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgQW5ub3RhdGlvbnNMaXN0VG9vbGJhck1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgSGVhZGVyTW9kdWxlJDEsCiAgICAgICAgICAgICAgICAgICAgICAgIExlZ2VuZE1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgU2Nyb2xsaW5nTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBBbm5vdGF0aW9uTW9kdWxlLAogICAgICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICAgICAgZXhwb3J0czogW0Fubm90YXRpb25zTGlzdENvbnRhaW5lcl0sCiAgICAgICAgICAgICAgICB9LF0gfSwKICAgIF07CiAgICAvKiogQG5vY29sbGFwc2UgKi8gQW5ub3RhdGlvbnNMaXN0TW9kdWxlLsm1bW9kID0gybXJtWRlZmluZU5nTW9kdWxlKHsgdHlwZTogQW5ub3RhdGlvbnNMaXN0TW9kdWxlIH0pOwogICAgLyoqIEBub2NvbGxhcHNlICovIEFubm90YXRpb25zTGlzdE1vZHVsZS7JtWluaiA9IMm1ybVkZWZpbmVJbmplY3Rvcih7IGZhY3Rvcnk6IGZ1bmN0aW9uIEFubm90YXRpb25zTGlzdE1vZHVsZV9GYWN0b3J5KHQpIHsgcmV0dXJuIG5ldyAodCB8fCBBbm5vdGF0aW9uc0xpc3RNb2R1bGUpKCk7IH0sIGltcG9ydHM6IFtbCiAgICAgICAgICAgICAgICBDb21tb25Nb2R1bGUsCiAgICAgICAgICAgICAgICBBbm5vdGF0aW9uc0xpc3RUb29sYmFyTW9kdWxlLAogICAgICAgICAgICAgICAgSGVhZGVyTW9kdWxlJDEsCiAgICAgICAgICAgICAgICBMZWdlbmRNb2R1bGUsCiAgICAgICAgICAgICAgICBTY3JvbGxpbmdNb2R1bGUsCiAgICAgICAgICAgICAgICBBbm5vdGF0aW9uTW9kdWxlLAogICAgICAgICAgICBdXSB9KTsKICAgIChmdW5jdGlvbiAoKSB7ICh0eXBlb2YgbmdKaXRNb2RlID09PSAidW5kZWZpbmVkIiB8fCBuZ0ppdE1vZGUpICYmIMm1ybVzZXROZ01vZHVsZVNjb3BlKEFubm90YXRpb25zTGlzdE1vZHVsZSwgeyBkZWNsYXJhdGlvbnM6IFtBbm5vdGF0aW9uc0xpc3RDb21wb25lbnQsIEFubm90YXRpb25zTGlzdENvbnRhaW5lcl0sIGltc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VkX2Fubm90YXRpb25zX21vZHVsZS50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICBjbGFzcyBTZWxlY3RlZEFubm90YXRpb25zTW9kdWxlIHsKICAgIH0KICAgIFNlbGVjdGVkQW5ub3RhdGlvbnNNb2R1bGUuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IE5nTW9kdWxlLCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIGRlY2xhcmF0aW9uczogW1NlbGVjdGVkQW5ub3RhdGlvbnNDb21wb25lbnQsIFNlbGVjdGVkQW5ub3RhdGlvbnNDb250YWluZXJdLAogICAgICAgICAgICAgICAgICAgIGltcG9ydHM6IFsKICAgICAgICAgICAgICAgICAgICAgICAgQ29tbW9uTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBNYXRJY29uTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBNYXRCdXR0b25Nb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIFBhcmFsbGVsQ29vcmRpbmF0ZXNNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgICAgICBleHBvcnRzOiBbU2VsZWN0ZWRBbm5vdGF0aW9uc0NvbnRhaW5lcl0sCiAgICAgICAgICAgICAgICB9LF0gfSwKICAgIF07CiAgICAvKiogQG5vY29sbGFwc2UgKi8gU2VsZWN0ZWRBbm5vdGF0aW9uc01vZHVsZS7JtW1vZCA9IMm1ybVkZWZpbmVOZ01vZHVsZSh7IHR5cGU6IFNlbGVjdGVkQW5ub3RhdGlvbnNNb2R1bGUgfSk7CiAgICAvKiogQG5vY29sbGFwc2UgKi8gU2VsZWN0ZWRB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cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICBjbGFzcyBNYWluTW9kdWxlIHsKICAgIH0KICAgIE1haW5Nb2R1bGUuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IE5nTW9kdWxlLCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIGRlY2xhcmF0aW9uczogW01haW5Db21wb25lbnQsIE1haW5Db250YWluZXJdLAogICAgICAgICAgICAgICAgICAgIGltcG9ydHM6IFsKICAgICAgICAgICAgICAgICAgICAgICAgQ29tbW9uTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBGb3Jtc01vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgTWF0Q2hlY2tib3hNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIE1hdEljb25Nb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIFJ1bnNNb2R1bGUkMSwKICAgICAgICAgICAgICAgICAgICAgICAgRGF0YVNlbGVjdGlvbk1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgTWF0QnV0dG9uTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBWaW9saW5GaWx0ZXJzTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBBbm5vdGF0aW9uc0xpc3RNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIFNlbGVjdGVkQW5ub3RhdGlvbnNNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgICAgICBleHBvcnRzOiBbTWFpbkNvbnRhaW5lcl0sCiAgICAgICAgICAgICAgICB9LF0gfSwKICAgIF07CiAgICAvKiogQG5vY29sbGFwc2UgKi8gTWFpbk1vZ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uc01vZHVsZSQxLAogICAgICAgICAgICBEYXRhU2VsZWN0aW9uTW9kdWxlLAogICAgICAgICAgICBNYXRCdXR0b25Nb2R1bGUsCiAgICAgICAgICAgIFZpb2xpbkZpbHRlcnNNb2R1bGUsCiAgICAgICAgICAgIEFubm90YXRpb25zTGlzdE1vZHVsZSwKICAgICAgICAgICAgU2VsZWN0ZWRBbm5vdGF0aW9uc01vZHVsZV0sIGV4cG9ydHM6IFtNYWluQ29udGFpbmVyXSB9KTsgfSkoKTsKCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcgYWRkZWQgYnkgdHNpY2tsZQogICAgICogR2VuZXJhdGVkIGZyb206IHRlbnNvcmJvYXJkL3dlYmFwcC9wbHVnaW5zL25wbWkvbnBtaV9tb2R1bGUudHMKICAgICAqIEBzdXBwcmVzcyB7Y2hlY2tUeXBlcyxjb25zdGFudFByb3BlcnR5LGV4dHJhUmVxdWlyZSxtaXNzaW5nT3ZlcnJpZGUsbWlzc2luZ1JldHVybix1bnVzZWRQcml2YXRlTWVtYmVycyx1c2VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgY2xhc3MgTnBtaU1vZHVsZSB7CiAgICB9CiAgICBOcG1pTW9kdWxlLmRlY29yYXRvcnMgPSBbCiAgICAgICAgeyB0eXBlOiBOZ01vZHVsZSwgYXJnczogW3sKICAgICAgICAgICAgICAgICAgICBkZWNsYXJhdGlvbnM6IFtOcG1pQ29tcG9uZW50LCBOcG1pQ29udGFpbmVyXSwKICAgICAgICAgICAgICAgICAgICBpbXBvcnRzOiBbCiAgICAgICAgICAgICAgICAgICAgICAgIENvbW1vbk1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgSW5hY3RpdmVNb2R1bGUkMSwKICAgICAgICAgICAgICAgICAgICAgICAgTWFpbk1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgTnBtaVNlcnZlckRhdGFTb3VyY2VNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIFN0b3JlTW9kdWxlLmZvckZlYXR1cmUoTlBNSV9GRUFUVVJFX0tFWSwgcmVkdWNlcnMkOCksCiAgICAgICAgICAgICAgICAgICAgICAgIEVmZmVjdHNNb2R1bGUuZm9yRmVhdHVyZShbTnBtaUVmZmVjdHNdKSwKICAgICAgICAgICAgICAgICAgICAgICAgUGx1Z2luUmVnaXN0cnlNb2R1bGUuZm9yUGx1Z2luKCducG1pJywgTnBtaUNvbnRhaW5lciksCiAgICAgICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgICAgICBleHBvcnRzOiBbTnBtaUNvbnRhaW5lcl0sCiAgICAgICAgICAgICAgICAgICAgZW50cnlDb21wb25lbnRzOiBbTnBtaUNvbnRhaW5lcl0sCiAgICAgICAgICAgICAgICB9LF0gfSwKICAgIF07CiAgICAvKiogQG5vY29sbGFwc2UgKi8gTnBtaU1vZHVsZS7JtW1vZCA9IMm1ybVkZWZpbmVOZ01vZHVsZSh7IHR5cGU6IE5wbWlNb2R1bGUgfSk7CiAgICAvKiogQG5vY29sbGFwc2UgKi8gTnBtaU1vZHVsZS7JtWluaiA9IMm1ybVkZWZpbmVJbmplY3Rvcih7IGZhY3Rvcnk6IGZ1bmN0aW9uIE5wbWlNb2R1bGVfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgTnBtaU1vZHVsZSkoKTsgfSwgaW1wb3J0czogW1sKICAgICAgICAgICAgICAgIENvbW1vbk1vZHVsZSwKICAgICAgICAgICAgICAgIEluYWN0aXZlTW9kdWxlJDEsCiAgICAgICAgICAgICAgICBNYWluTW9kdWxlLAogICAgICAgICAgICAgICAgTnBtaVNlcnZlckRhdGFTb3VyY2VNb2R1bGUsCiAgICAgICAgICAgICAgICBTdG9yZU1vZHVsZS5mb3JGZWF0dXJlKE5QTUlfRkVBVFVSRV9LRVksIHJlZHVjZXJzJDgpLAogICAgICAgICAgICAgICAgRWZmZWN0c01vZHVsZS5mb3JGZWF0dXJlK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2UuybVmYWMgfSk7CgogICAgLyoqCiAgICAgKiBAZmlsZW92ZXJ2aWV3IGFkZGVkIGJ5IHRzaWNrbGUKICAgICAqIEdlbmVyYXRlZCBmcm9tOiB0ZW5zb3Jib2FyZC93ZWJhcHAvcGx1Z2lucy90ZXh0X3YyL2RhdGFfc291cmNlL3RleHRfdjJfc2VydmVyX2RhdGFfc291cmNlLnRzCiAgICAgKiBAc3VwcHJlc3Mge2NoZWNrVHlwZXMsY29uc3RhbnRQcm9wZXJ0eSxleHRyYVJlcXVpcmUsbWlzc2luZ092ZXJyaWRlLG1pc3NpbmdSZXR1cm4sdW51c2VkUHJpdmF0ZU1lbWJlcnMsdXNlbGVzc0NvZGV9IGNoZWNrZWQgYnkgdHNjCiAgICAgKi8KICAgIGNsYXNzIFRleHRWMlNlcnZlckRhdGFTb3VyY2UgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gaHR0cAogICAgICAgICAqLwogICAgICAgIGNvbnN0cnVjdG9yKGh0dHApIHsKICAgICAgICAgICAgdGhpcy5odHRwID0gaHR0cDsKICAgICAgICAgICAgdGhpcy5odHRwUGF0aFByZWZpeCA9ICdkYXRhL3BsdWdpbi90ZXh0X3YyJzsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmZXRjaFJ1blRvVGFnKCkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5odHRwCiAgICAgICAgICAgICAgICAuZ2V0KHRoaXMuaHR0cFBhdGhQcmVmaXggKyAnL3RhZ3MnKQogICAgICAgICAgICAgICAgLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBydW5Ub1RhZ09iamVjdAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHJ1blRvVGFnT2JqZWN0KSA9PiB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBydW5Ub1RhZyA9IG5ldyBNYXAoKTsKICAgICAgICAgICAgICAgIE9iamVjdC5lbnRyaWVzKHJ1blRvVGFnT2JqZWN0KS5mb3JFYWNoKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoW3J1bk5hbWUsIHRhZ3NdKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgcnVuVG9UYWcuc2V0KHJ1bk5hbWUsIHRhZ3MpOwogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgcmV0dXJuIHJ1blRvVGFnOwogICAgICAgICAgICB9KSkpOwogICAgICAgIH0KICAgICAgICAvKioKICAgICAgICAgKiBAcGFyYW0gez99IHJ1bgogICAgICAgICAqIEBwYXJhbSB7P30gdGFnCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmZXRjaFRleHREYXRhKHJ1biwgdGFnKSB7CiAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgY29uc3Qgc2VhcmNoUGFyYW1zID0gbmV3IFVSTFNlYXJjaFBhcmFtcyh7IHJ1biwgdGFnIH0pOwogICAgICAgICAgICByZXR1cm4gdGhpcy5odHRwCiAgICAgICAgICAgICAgICAuZ2V0KHRoaXMuaHR0cFBhdGhQcmVmaXggKyBgL3RleHQ/JHtzZWFyY2hQYXJhbXMudG9TdHJpbmcoKX1gKQogICAgICAgICAgICAgICAgLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBkYXRhTGlzdAogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKGRhdGFMaXN0KSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gZGF0YUxpc3QubWFwKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gZGF0dW0KICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgIChkYXR1bSkgPT4gewogICAgICAgICAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAgICAgICAgIG9yaWdpbmFsU2hhcGU6IGRhdHVtLm9yaWdpbmFsX3NoYXBlLAogICAgICAgICAgICAgICAgICAgICAgICBzdGVwOiBkYXR1bS5zdGVwLAogICAgICAgICAgICAgICAgICAgICAgICBzdHJpbmdBcnJheTogZGF0dW0uc3RyaW5nX2FycmF5LAogICAgICAgICAgICAgICAgICAgICAgICB3YWxsVGltZUluTXM6IGRhdHVtLndhbGxfdGltZSAqIDEwMDAsCiAgICAgICAgICAgICAgICAgICAgICAgIHRydW5jYXRlZDogZGF0dW0udHJ1bmNhdGVkLAogICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0pKSk7CiAgICAgICAgfQogICAgfQogICAgVGV4dFYyU2VydmVyRGF0YVNvdXJjZS5kZWNvcmF0b3JzID0gWwogICAgICAgIHsgdHlwZTogSW5qZWN0YWJsZSB9LAogICAgXTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLwogICAgVGV4dFYyU2VydmVyRGF0YVNvdXJjZS5jdG9yUGFyYW1ldGVycyA9ICgpID0+IFsKICAgICAgICB7IHR5cGU6IFRCSHR0cENsaWVudCB9CiAgICBdOwogICAgLyoqIEBub2NvbGxhcHNlICovIFRleHRWMlNlcnZlckRhdGFTb3VyY2UuybVmYWMgPSBmdW5jdGlvbiBUZXh0VjJTZXJ2ZXJEYXRhU291cmNlX0ZhY3RvcnkodCkgeyByZXR1cm4gbmV3ICh0IHx8IFRleHRWMlNlcnZlckRhdGFTb3VyY2UpKMm1ybVpbmplY3QoVEJIdHRwQ2xpZW50KSk7IH07CiAgICAvKiogQG5vY29sbGFwc2UgKi8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qKgogICAgICogQHBhcmFtIHs/fSBzdGF0ZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgKHN0YXRlKSA9PiBzdGF0ZS5ydW5Ub1RhZ3MpKTsKICAgIC8qKgogICAgICogUmV0dXJucyBkZS1kdXBsaWNhdGVkIGxpc3Qgb2YgPHJ1biwgdGFnPiB0dXBsZSBmb3IgY2FyZHMgdGhhdCBhcmUgdmlzaWJsZQogICAgICogaW4gdGhlIFVJLgogICAgICogQHR5cGUgez99CiAgICAgKi8KICAgIGNvbnN0IGdldFRleHRBbGxWaXNpYmxlUnVuVGFncyA9IGNyZWF0ZVNlbGVjdG9yKHNlbGVjdFRleHRTdGF0ZSwgKC8qKgogICAgICogQHBhcmFtIHs/fSBzdGF0ZQogICAgICogQHJldHVybiB7P30KICAgICAqLwogICAgKHN0YXRlKSA9PiB7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IHNlcmlhbGl6ZWRSdW5UYWdUdXBsZXMgPSBuZXcgU2V0KCk7CiAgICAgICAgLyoqIEB0eXBlIHs/fSAqLwogICAgICAgIGNvbnN0IGFsbFZpc2libGVSdW5UYWdUdXBsZXMgPSBuZXcgU2V0KCk7CiAgICAgICAgZm9yIChjb25zdCBydW5UYWdUdXBsZXMgb2Ygc3RhdGUudmlzaWJsZVJ1blRhZ3MudmFsdWVzKCkpIHsKICAgICAgICAgICAgZm9yIChjb25zdCBydW5UYWcgb2YgcnVuVGFnVHVwbGVzKSB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBzZXJpYWxpemVkUnVuVGFnID0gSlNPTi5zdHJpbmdpZnkocnVuVGFnKTsKICAgICAgICAgICAgICAgIGlmIChzZXJpYWxpemVkUnVuVGFnVHVwbGVzLmhhcyhzZXJpYWxpemVkUnVuVGFnKSkgewogICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICAgICAgfQogICAgICAgIC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BwcmVzcyB7Y2hlY2tUeXBlcyxjb25zdGFudFByb3BlcnR5LGV4dHJhUmVxdWlyZSxtaXNzaW5nT3ZlcnJpZGUsbWlzc2luZ1JldHVybix1bnVzZWRQcml2YXRlTWVtYmVycyx1c2VsZXNzQ29kZX0gY2hlY2tlZCBieSB0c2MKICAgICAqLwogICAgY2xhc3MgVGV4dEVmZmVjdHMgewogICAgICAgIC8qKgogICAgICAgICAqIEBwYXJhbSB7P30gYWN0aW9ucyQKICAgICAgICAgKiBAcGFyYW0gez99IHN0b3JlCiAgICAgICAgICogQHBhcmFtIHs/fSBkYXRhU291cmNlCiAgICAgICAgICovCiAgICAgICAgY29uc3RydWN0b3IoYWN0aW9ucyQsIHN0b3JlLCBkYXRhU291cmNlKSB7CiAgICAgICAgICAgIHRoaXMuYWN0aW9ucyQgPSBhY3Rpb25zJDsKICAgICAgICAgICAgdGhpcy5zdG9yZSA9IHN0b3JlOwogICAgICAgICAgICB0aGlzLmRhdGFTb3VyY2UgPSBkYXRhU291cmNlOwogICAgICAgICAgICAvKioKICAgICAgICAgICAgICogQGV4cG9ydAogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdGhpcy5sb2FkUnVuVG9UYWdzJCA9IGNyZWF0ZUVmZmVjdCgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5hY3Rpb25zJC5waXBlKG9mVHlwZSh0ZXh0UGx1Z2luTG9hZGVkKSwgc3dpdGNoTWFwKCgvKioKICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICgpID0+IHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5kYXRhU291cmNlLmZldGNoUnVuVG9UYWcoKS5waXBlKHRhcCgoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBydW5Ub1RhZ3MKICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgIChydW5Ub1RhZ3MpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zdG9yZS5kaXNwYXRjaCh0ZXh0UnVuVG9UYWdzTG9hZGVkKHsgcnVuVG9UYWdzIH0pKTsKICAgICAgICAgICAgICAgICAgICB9KSksIG1hcCgoLyoqCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAoKSA9PiB2b2lkIG51bGwpKSk7CiAgICAgICAgICAgICAgICB9KSkpOwogICAgICAgICAgICB9KSwgeyBkaXNwYXRjaDogZmFsc2UgfSk7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBAZXhwb3J0CiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0aGlzLmxvYWREYXRhJCA9IGNyZWF0ZUVmZmVjdCgoLyoqCiAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAqLwogICAgICAgICAgICAoKSA9PiB7CiAgICAgICAgICAgICAgICAvKiogQHR5cGUgez99ICovCiAgICAgICAgICAgICAgICBjb25zdCBmZXRjaE9uTmV3Q2FyZFZpc2libGUgPSB0aGlzLmFjdGlvbnMkLnBpcGUob2ZUeXBlKHRleHRUYWdHcm91cFZpc2liaWxpdHlDaGFuZ2VkKSwgc3dpdGNoTWFwKCgvKioKICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAoeyB2aXNpYmxlVGV4dENhcmRzIH0pID0+IHsKICAgICAgICAgICAgICAgICAgICAvLyBGZXRjaCBleGlzdGluZyBkYXRhLgogICAgICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgICAgICBjb25zdCBleGlzdGluZ1RleHREYXRhID0gdmlzaWJsZVRleHRDYXJkcy5tYXAoKC8qKgogICAgICAgICAgICAgICAgICAgICAqIEBwYXJhbSB7P30gX18wCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAoeyBydW4sIHRhZyB9KSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLnN0b3JlLnNlbGVjdChnZXRUZXh0RGF0YSwgeyBydW4sIHRhZyB9KS5waXBlKGxhc3QoKSwgbWFwKCgvKioKICAgICAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSB0ZXh0RGF0YQogICAgICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAgICAgKHRleHREYXRhKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4geyBydW4sIHRhZywgdGV4dERhdGEgfTsKICAgICAgICAgICAgICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZvcmtKb2luKGV4aXN0aW5nVGV4dERhdGEpLnBpcGUobWFwKCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHRleHREYXRhCiAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAodGV4dERhdGEpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gRmlsdGVyIG91dCB0aGUgPHJ1biwgdGFnPiB0dXBsZSBpZiB0aGUgZGF0YSBhbHJlYWR5IGV4aXN0cy4KICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRleHREYXRhCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZmlsdGVyKCgvKioKICAgICAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHs/fSBfXzAKICAgICAgICAgICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgICAgICh7IHRleHREYXRhIH0pID0+IHRleHREYXRhID09PSBudWxsKSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5tYXAoKC8qKgogICAgICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAgICAgKHsgcnVuLCB0YWcgfSkgPT4gKHsgcnVuLCB0YWcgfSkpKTsKICAgICAgICAgICAgICAgICAgICB9KSkpOwogICAgICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgICAgIC8qKiBAdHlwZSB7P30gKi8KICAgICAgICAgICAgICAgIGNvbnN0IGZldGNoVmlzaWJsZUNhcmRzT25SZWxvYWQgPSB0aGlzLmFjdGlvbnMkLnBpcGUob2ZUeXBlKG1hbnVhbFJlbG9hZCwgcmVsb2FkKSwgd2l0aExhdGVzdEZyb20odGhpcy5zdG9yZS5zZWxlY3QoZ2V0VGV4dEFsbFZpc2libGVSdW5UYWdzKSksIG1hcCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IF9fMAogICAgICAgICAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgKFssIHJ1blRhZ0xpc3RdKSA9PiBydW5UYWdMaXN0KSkpOwogICAgICAgICAgICAgICAgcmV0dXJuIG1lcmdlKGZldGNoT25OZXdDYXJkVmlzaWJsZSwgZmV0Y2hWaXNpYmxlQ2FyZHNPblJlbG9hZCkucGlwZShtZXJnZU1hcCgoLyoqCiAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHJ1blRhZ1BhaXJzCiAgICAgICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAocnVuVGFnUGFpcnMpID0+IHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gZm9ya0pvaW4ocnVuVGFnUGFpcnMubWFwKCgvKioKICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0gez99IHJ1bkFuZFRhZwogICAgICAgICAgICAgICAgICAgICAqIEByZXR1cm4gez99CiAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICAgICAgICAgICAgICAgKHJ1bkFuZFRhZykgPT4gewogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5mZXRjaFRleHREYXRhKHJ1bkFuZFRhZyk7CiAgICAgICAgICAgICAgICAgICAgfSkpKTsKICAgICAgICAgICAgICAgIH0pKSk7CiAgICAgICAgICAgIH0pLCB7IGRpc3BhdGNoOiBmYWxzZSB9KTsKICAgICAgICB9CiAgICAgICAgLyoqCiAgICAgICAgICogQHByaXZhdGUKICAgICAgICAgKiBAcGFyYW0gez99IHByb3BzCiAgICAgICAgICogQHJldHVybiB7P30KICAgICAgICAgKi8KICAgICAgICBmZXRjaFRleHREYXRhKHByb3BzKSB7CiAgICAgICAgICAgIGNvbnN0IHsgcnVuLCB0YWcgfSA9IHByb3BzOwogICAgICAgICAgICByZXR1cm4gdGhpcy5kYXRhU291cmNlLmZldGNoVGV4dERhdGEocnVuLCB0YWcpLnBpcGUodGFwKCgvKioKICAgICAgICAgICAgICogQHBhcmFtIHs/fSBzdGVwRGF0YQogICAgICAgICAgICAgKiBAcmV0dXJuIHs/fQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgKHN0ZXBEYXRhKSA9PiB7CiAgICAgICAgICAgICAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKHRleHREYXRhTG9hZGVkKHsgcnVuLCB0YW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cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2VkIGJ5IHRzYwogICAgICovCiAgICAvKiogQHR5cGUgez99ICovCiAgICBjb25zdCBEQVRBX0FfQl9SVU4xID0gWwogICAgICAgIHsKICAgICAgICAgICAgb3JpZ2luYWxTaGFwZTogWzNdLAogICAgICAgICAgICBzdGVwOiAwLAogICAgICAgICAgICBzdHJpbmdBcnJheTogW1snZm9vJywgJ2JhcicsICdiYXonXV0sCiAgICAgICAgICAgIHdhbGxUaW1lSW5NczogMTU3Nzg2NTYwMDAwMCwKICAgICAgICAgICAgdHJ1bmNhdGVkOiBmYWxzZSwKICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICAgb3JpZ2luYWxTaGFwZTogWzNdLAogICAgICAgICAgICBzdGVwOiAxLAogICAgICAgICAgICBzdHJpbmdBcnJheTogW1snZm9vJywgJ2JheiddXSwKICAgICAgICAgICAgd2FsbFRpbWVJbk1zOiAxNTc3ODY1NjAxMDAwLAogICAgICAgICAgICB0cnVuY2F0ZWQ6IGZhbHNlLAogICAgICAgIH0sCiAgICBdOwogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgREFUQV9BX0NfUlVOMSA9IFsKICAgICAgICB7CiAgICAgICAgICAgIG9yaWdpbmFsU2hhcGU6IFszXSwKICAgICAgICAgICAgc3RlcDogMCwKICAgICAgICAgICAgc3RyaW5nQXJyYXk6IFsKICAgICAgICAgICAgICAgIFsKICAgICAgICAgICAgICAgICAgICAnV2UgY29uZHVjdGVkIGFuIGV4cGVyaW1lbnQgYW5kIGZvdW5kIHRoZSBmb2xsb3dpbmcgZGF0YTpcblxuUG91bmRzIG9mIGNob2NvbGF0ZSB8IEhhcHBpbmVzc1xuLS0tfC0tLVxuMCB8IDFcbjEgfCA0XG4yIHwgOVxuMyB8IDE2XG40IHwgMjVcbjUgfCAzNlxuNiB8IDQ5XG43IHwgNjRcbjggfCA4MVxuOSB8IDEwMFxuMTAgfCAxMjEnLAogICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgXSwKICAgICAgICAgICAgd2FsbFRpbWVJbk1zOiAxNTc3ODY1NjAwMDAwLAogICAgICAgICAgICB0cnVuY2F0ZWQ6IGZhbHNlLAogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgICBvcmlnaW5hbFNoYXBlOiBbM10sCiAgICAgICAgICAgIHN0ZXA6IDEsCiAgICAgICAgICAgIHN0cmluZ0FycmF5OiBbCiAgICAgICAgICAgICAgICBbJ1x1MDBkNycsICcqKjAqKicsICcqKjEqKicsICcqKjIqKicsICcqKjMqKicsICcqKjQqKicsICcqKjUqKiddLAogICAgICAgICAgICAgICAgWycqKjAqKicsICcwJywgJzAnLCAnMCcsICcwJywgJzAnLCAnMCddLAogICAgICAgICAgICAgICAgWycqKjEqKicsICcwJywgJzEnLCAnMicsICczJywgJzQnLCAnNSddLAogICAgICAgICAgICAgICAgWycqKjIqKicsICcwJywgJzInLCAnNCcsICc2JywgJzgnLCAnMTAnXSwKICAgICAgICAgICAgICAgIFsnKiozKionLCAnMCcsICczJywgJzYnLCAnOScsICcxMicsICcxNSddLAogICAgICAgICAgICAgICAgWycqKjQqKicsICcwJywgJzQnLCAnOCcsICcxMicsICcxNicsICcyMCddLAogICAgICAgICAgICAgICAgWycqKjUqKicsICcwJywgJzUnLCAnMTAnLCAnMTUnLCAnMjAnLCAnMjUnXSwKICAgICAgICAgICAgXSwKICAgICAgICAgICAgd2FsbFRpbWVJbk1zOiAxNTc3ODY1NjAxMDAwLAogICAgICAgICAgICB0cnVuY2F0ZWQ6IGZhbHNlLAogICAgICAgIH0sCiAgICBdOwogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgaW5pdGlhbFN0YXRlJDcgPSB7CiAgICAgICAgcnVuVG9UYWdzOiBuZXcgTWFwKFsKICAgICAgICAgICAgWydydW4xJywgWydhL2InLCAnYS9jJ11dLAogICAgICAgICAgICBbJ3J1bjInLCBbJ2EvYicsICdhL2QnXV0sCiAgICAgICAgICAgIFsncnVuMycsIFsnYycsICdhL2InXV0sCiAgICAgICAgXSksCiAgICAgICAgZGF0YTogbmV3IE1hcChbCiAgICAgICAgICAgIFsKICAgICAgICAgICAgICAgICdydW4xJywKICAgICAgICAgICAgICAgIG5ldyBNYXAoWwogICAgICAgICAgICAgICAgICAgIFsnYS9iJywgREFUQV9BX0JfUlVOMV0sCiAgICAgICAgICAgICAgICAgICAgWydhL2MnLCBEQVRBX0FfQ19SVU4xXSwKICAgICAgICAgICAgICAgIF0pLAogICAgICAgICAgICBdLAogICAgICAgIF0pLAogICAgICAgIHZpc2libGVSdW5UYWdzOiBuZXcgTWFwKCksCiAgICB9OwogICAgLyoqIEB0eXBlIHs/fSAqLwogICAgY29uc3QgcmVkdWNlciQ3ID0gY3JlYXRlUmVkdWNlcihpbml0aWFsU3RhdGUkNyk7CiAgICAvKioKICAgICAqIEBwYXJhbSB7P30gc3RhdGUKICAgICAqIEBwYXJhbSB7P30gYWN0aW9uCiAgICAgKiBAcmV0dXJuIHs/fQogICAgICovCiAgICBmdW5jdGlvbiByZWR1Y2VycyQ5KHN0YXRlLCBhY3Rpb24pIHsKICAgICAgICByZXR1cm4gcmVkdWNlciQ3KHN0YXRlLCBhY3Rpb24pOwogICAgfQoKICAgIC8qKgogICAgICogQGZpbGVvdmVydmlldyBhZGRlZCBieSB0c2lja2xlCiAgICAgKiBHZW5lcmF0ZWQgZnJvbTogdGVuc29yYm9hcmQvd2ViYXBwL3BsdWdpbnMvdGV4dF92Mi90ZXh0X3YyX21vZHVsZS50cwogICAgICogQHN1cHByZXNzIHtjaGVja1R5cGVzLGNvbnN0YW50UHJvcGVydHksZXh0cmFSZXF1aXJlLG1pc3NpbmdPdmVycmlkZSxtaXNzaW5nUmV0dXJuLHVudXNlZFByaXZhdGVNZW1iZXJzLHVzZWxlc3NDb2RlfSBjaGVja2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BbewogICAgICAgICAgICAgICAgICAgIGltcG9ydHM6IFsKICAgICAgICAgICAgICAgICAgICAgICAgQ29tbW9uTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBUZXh0RGFzaGJvYXJkTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBQbHVnaW5SZWdpc3RyeU1vZHVsZS5mb3JQbHVnaW4oJ3RleHRfdjInLCBUZXh0RGFzaGJvYXJkQ29tcG9uZW50KSwKICAgICAgICAgICAgICAgICAgICAgICAgVGV4dFYyRGF0YVNvdXJjZU1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgU3RvcmVNb2R1bGUuZm9yRmVhdHVyZShURVhUX0ZFQVRVUkVfS0VZLCByZWR1Y2VycyQ5KSwKICAgICAgICAgICAgICAgICAgICAgICAgRWZmZWN0c01vZHVsZS5mb3JGZWF0dXJlKFtUZXh0RWZmZWN0c10pLAogICAgICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICAgICAgZW50cnlDb21wb25lbnRzOiBbVGV4dERhc2hib2FyZENvbXBvbmVudF0sCiAgICAgICAgICAgICAgICB9LF0gfSwKICAgIF07CiAgICAvKiogQG5vY29sbGFwc2UgKi8gVGV4dFYyTW9kdWxlLsm1bW9kID0gybXJtWRlZmluZU5nTW9kdWxlKHsgdHlwZTogVGV4dFYyTW9kdWxlIH0pOwogICAgLyoqIEBub2NvbGxhcHNlICovIFRleHRWMk1vZHVsZS7JtWluaiA9IMm1ybVkZWZpbmVJbmplY3Rvcih7IGZhY3Rvcnk6IGZ1bmN0aW9uIFRleHRWMk1vZHVsZV9GYWN0b3J5KHQpIHsgcmV0dXJuIG5ldyAodCB8fCBUZXh0VjJNb2R1bGUpKCk7IH0sIGltcG9ydHM6IFtbCiAgICAgICAgICAgICAgICBDb21tb25Nb2R1bGUsCiAgICAgICAgICAgICAgICBUZXh0RGFzaGJvYXJkTW9kdWxlLAogICAgICAgICAgICAgICAgUGx1Z2luUmVnaXN0cnlNb2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Jlc29sdmVkSW1wb3J0ZWRQaW5uZWRDYXJkcyksCiAgICAgICAgICAgIF0pLnBpcGUobWFwKChbcGlubmVkQ2FyZHMsIHVucmVzb2x2ZWRJbXBvcnRlZFBpbm5lZENhcmRzXSkgPT4gewogICAgICAgICAgICAgICAgaWYgKCFwaW5uZWRDYXJkcy5sZW5ndGggJiYgIXVucmVzb2x2ZWRJbXBvcnRlZFBpbm5lZENhcmRzLmxlbmd0aCkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBbXTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGNvbnN0IHBpbm5lZENhcmRzVG9TdG9yZSA9IHBpbm5lZENhcmRzLm1hcCgoeyBwbHVnaW4sIHRhZywgc2FtcGxlLCBydW5JZCB9KSA9PiB7CiAgICAgICAgICAgICAgICAgICAgY29uc3QgaW5mbyA9IHsgcGx1Z2luLCB0YWcgfTsKICAgICAgICAgICAgICAgICAgICBpZiAoaXNTaW5nbGVSdW5QbHVnaW4ocGx1Z2luKSkgewogICAgICAgICAgICAgICAgICAgICAgICBpbmZvLnJ1bklkID0gcnVuSWQ7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGlmIChpc1NhbXBsZWRQbHVnaW4ocGx1Z2luKSkgewogICAgICAgICAgICAgICAgICAgICAgICBpbmZvLnNhbXBsZSA9IHNhbXBsZTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGluZm87CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIC8vIEludGVudGlvbmFsbHkgb3JkZXIgdW5yZXNvbHZlZCBjYXJkcyBsYXN0LCBzbyB0aGF0IGNhcmRzIHBpbm5lZCBieQogICAgICAgICAgICAgICAgLy8gdGhlIHVzZXIgaW4gdGhpcyBzZXNzaW9uIGhhdmUgcHJpb3JpdHkuCiAgICAgICAgICAgICAgICBjb25zdCBjYXJkc1RvU3RvcmUgPSBbCiAgICAgICAgICAgICAgICAgICAgLi4ucGlubmVkQ2FyZHNUb1N0b3JlLAogICAgICAgICAgICAgICAgICAgIC4uLnVucmVzb2x2ZWRJbXBvcnRlZFBpbm5lZENhcmRzLAogICAgICAgICAgICAgICAgXTsKICAgICAgICAgICAgICAgIHJldHVybiBbeyBrZXk6ICdwaW5uZWRDYXJkcycsIHZhbHVlOiBKU09OLnN0cmluZ2lmeShjYXJkc1RvU3RvcmUpIH1dOwogICAgICAgICAgICB9KSk7CiAgICAgICAgfQogICAgICAgIHNlcmlhbGl6ZVN0YXRlVG9RdWVyeVBhcmFtcyhzdG9yZSkgewogICAgICAgICAgICByZXR1cm4gdGhpcy5nZXRNZXRyaWNzUGlubmVkQ2FyZHMoc3RvcmUpOwogICAgICAgIH0KICAgICAgICBkZXNlcmlhbGl6ZVF1ZXJ5UGFyYW1zKHF1ZXJ5UGFyYW1zKSB7CiAgICAgICAgICAgIGxldCBwaW5uZWRDYXJkcyA9IG51bGw7CiAgICAgICAgICAgIGZvciAoY29uc3QgeyBrZXksIHZhbHVlIH0gb2YgcXVlcnlQYXJhbXMpIHsKICAgICAgICAgICAgICAgIGlmIChrZXkgPT09ICdwaW5uZWRDYXJkcycpIHsKICAgICAgICAgICAgICAgICAgICBwaW5uZWRDYXJkcyA9IGV4dHJhY3RQaW5uZWRDYXJkc0Zyb21VUkxUZXh0KHZhbHVlKTsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgbWV0cmljczogewogICAgICAgICAgICAgICAgICAgIHBpbm5lZENhcmRzOiBwaW5uZWRDYXJkcyB8fCBbXSwKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgIH07CiAgICAgICAgfQogICAgfTsKICAgIENvcmVEZWVwTGlua1Byb3ZpZGVyID0gX19kZWNvcmF0ZShbCiAgICAgICAgSW5qZWN0YWJsZSgpCiAgICBdLCBDb3J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hbXBsZSA9PT0gJ3VuZGVmaW5lZCc7CiAgICAgICAgICAgIGlmICghaXNQbHVnaW5TdHJpbmcgfHwKICAgICAgICAgICAgICAgICFpc1RhZ1N0cmluZyB8fAogICAgICAgICAgICAgICAgIWlzUnVuVHlwZVZhbGlkIHx8CiAgICAgICAgICAgICAgICAhaXNTYW1wbGVUeXBlVmFsaWQpIHsKICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIFJlcXVpcmVkIGZpZWxkcyBhbmQgcmFuZ2UgZXJyb3JzLgogICAgICAgICAgICBpZiAoIWlzUGx1Z2luVHlwZShpdGVtLnBsdWdpbikpIHsKICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICghaXRlbS50YWcpIHsKICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChpc1NpbmdsZVJ1blBsdWdpbihpdGVtLnBsdWdpbikpIHsKICAgICAgICAgICAgICAgIC8vIEEgc2luZ2xlIHJ1biBwbHVnaW4gbXVzdCBzcGVjaWZ5IGEgbm9uLWVtcHR5IHJ1bi4KICAgICAgICAgICAgICAgIGlmICghaXRlbS5ydW5JZCkgewogICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgLy8gQSBtdWx0aSBydW4gcGx1Z2luIG11c3Qgbm90IHNwZWNpZnkgYSBydW4uCiAgICAgICAgICAgICAgICBpZiAoaXRlbS5ydW5JZCkgewogICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChpc1NhbXBsZU51bWJlcikgewogICAgICAgICAgICAgICAgaWYgKCFpc1NhbXBsZWRQbHVnaW4oaXRlbS5wbHVnaW4pKSB7CiAgICAgICAgICAgICAgICAgICAgY29udGludWU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAoIU51bWJlci5pc0ludGVnZXIoaXRlbS5zYW1wbGUpIHx8IGl0ZW0uc2FtcGxlIDwgMCkgewogICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vIEFzc2VtYmxlIHJlc3VsdC4KICAgICAgICAgICAgY29uc3QgcmVzdWx0SXRlbSA9IHsgcGx1Z2luOiBpdGVtLnBsdWdpbiwgdGFnOiBpdGVtLnRhZyB9OwogICAgICAgICAgICBpZiAoaXNSdW5TdHJpbmcpIHsKICAgICAgICAgICAgICAgIHJlc3VsdEl0ZW0ucnVuSWQgPSBpdGVtLnJ1bklkOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChpc1NhbXBsZU51bWJlcikgewogICAgICAgICAgICAgICAgcmVzdWx0SXRlbS5zYW1wbGUgPSBpdGVtLnNhbXBsZTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXN1bHQucHVzaChyZXN1bHRJdGVtKTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIHJlc3VsdDsKICAgIH0KCiAgICBmdW5jdGlvbiByb3V0ZXNGYWN0b3J5KCkgewogICAgICAgIHJldHVybiBbCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgIHJvdXRlS2luZDogUm91dGVLaW5kLkVYUEVSSU1FTlQsCiAgICAgICAgICAgICAgICBwYXRoOiAnLycsCiAgICAgICAgICAgICAgICBuZ0NvbXBvbmVudDogVGVuc29yQm9hcmRXcmFwcGVyQ29tcG9uZW50LAogICAgICAgICAgICAgICAgZGVmYXVsdFJvdXRlOiB0cnVlLAogICAgICAgICAgICAgICAgZGVlcExpbmtQcm92aWRlcjogbmV3IENvcmVEZWVwTGlua1Byb3ZpZGVyKCksCiAgICAgICAgICAgIH0sCiAgICAgICAgXTsKICAgIH0KCiAgICAvKioKICAgICAqIEBmaWxlb3ZlcnZpZXcgYWRkZWQgYnkgdHNpY2tsZQogICAgICogR2VuZXJhdGVkIGZyb206IHRlbnNvcmJvYXJkL3dlYmFwcC9hcHBfbW9kdWxlLnRzCiAgICAgKiBAc3VwcHJlc3Mge2NoZWNrVHlwZXMsY29uc3RhbnRQcm9wZXJ0eSxleHRyYVJlcXVpcmUsbWlzc2luZ092ZXJyaWRlLG1pc3NpbmdSZXR1cm4sdW51c2VkUHJpdmF0ZU1lbWJlcnMsdXNlbGVzc0NvZGV9IGNoZWNrZWQgYnkgdHNjCiAgICAgKi8KICAgIGNsYXNzIEFwcE1vZHVsZSB7CiAgICB9CiAgICBBcHBNb2R1bGUuZGVjb3JhdG9ycyA9IFsKICAgICAgICB7IHR5cGU6IE5nTW9kdWxlLCBhcmdzOiBbewogICAgICAgICAgICAgICAgICAgIGRlY2xhcmF0aW9uczogW0FwcENvbnRhaW5lcl0sCiAgICAgICAgICAgICAgICAgICAgaW1wb3J0czogWwogICAgICAgICAgICAgICAgICAgICAgICAvLyBFbnN1cmUgZmVhdHVyZSBmbGFncyBhcmUgZW5hYmxlZCBiZWZvcmUgdGhleSBhcmUgY29uc3VtZWQuCiAgICAgICAgICAgICAgICAgICAgICAgIEZlYXR1cmVGbGFnTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBCcm93c2VyTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBCcm93c2VyQW5pbWF0aW9uc01vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgQXBwUm91dGluZ01vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgQXBwUm91dGluZ1ZpZXdNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIFJvdXRlUmVnaXN0cnlNb2R1bGUucmVnaXN0ZXJSb3V0ZXMocm91dGVzRmFjdG9yeSksCiAgICAgICAgICAgICAgICAgICAgICAgIEFsZXJ0TW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBBbGVydFNuYWNrYmFyTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBUZW5zb3JCb2FyZFdyYXBwZXJNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIENvcmVNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIEV4cGVyaW1lbnRzTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBIYXNoU3RvcmFnZU1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgSGVhZGVyTW9kdWxlLAogICAgICAgICAgICAgICAgICAgICAgICBNYXRJY29uTW9kdWxlJDEsCiAgICAgICAgICAgICAgICAgICAgICAgIFBhZ2VUaXRsZU1vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgUGx1Z2luc01vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgUnVuc01vZHVsZSwKICAgICAgICAgICAgICAgICAgICAgICAgU2V0dGluZ3NNb2R1bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIFN0b3JlTW9kdWxlLmZvclJvb3QoUk9PVF9SRURVQ0VSUywgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcnVudGltZUNoZWNrczogewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cmljdFN0YXRlU2VyaWFsaXphYmlsaXR5OiBmYWxzZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJpY3RBY3Rpb25TZXJpYWxpemFiaWxpdHk6IHRydWUsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgICAgICB9KSwKICAgICAgICAgICAgICAgICAgICAgICAgRWZmZWN0c01vZHVsZS5mb3JSb290KFtdKSwKICAgICAgICAgICAgICAgICAgICAgICAgT3NzUGx1Z2luc01vZHVsZSwKICAgICAgICAgICAgICAgICAgICBdLAogICAgICAgICAgICAgICAgICAgIHByb3ZpZGVyczogWwogICAgICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm92aWRlOiBNRVRBX1JFRFVDRVJTLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgdXNlRmFjdG9yeTogbG9nZ2VyTWV0YVJlZHVjZXJGYWN0b3J5LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbXVsdGk6IHRydWUsCiAgICAgICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgICAgICBib290c3RyYXA6IFtBcHBDb250YWluZXJdLAogICAgICAgICAgICAgICAgfSxdIH0sCiAgICBdOwogICAgLyoqIEBub2NvbGxhcHNlICovIEFwcE1vZHVsZS7JtW1vZCA9IMm1ybVkZWZpbmVOZ01vZHVsZSh7IHR5cGU6IEFwcE1vZHVsZSwgYm9vdHN0cmFwOiBbQXBwQ29udGFpbmVyXSB9KTsKICAgIC8qKiBAbm9jb2xsYXBzZSAqLyBBcHBNb2R1bGUuybVpbmogPSDJtcm1ZGVmaW5lSW5qZWN0b3IoeyBmYWN0b3J5OiBmdW5jdGlvbiBBcHBNb2R1bGVfRmFjdG9yeSh0KSB7IHJldHVybiBuZXcgKHQgfHwgQXBwTW9kdWxlKSgpOyB9LCBwcm92aWRlcnM6IFsKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgcHJvdmlkZTogTUVUQV9SRURVQ0VSUywKICAgICAgICAgICAgICAgIHVzZUZhY3Rvcnk6IGxvZ2dlck1ldGFSZWR1Y2VyRmFjdG9yeSwKICAgICAgICAgICAgICAgIG11bHRpOiB0cnVlLAogICAgICAgICAgICB9LAogICAgICAgIF0sIGltcG9ydHM6IFtbCiAgICAgICAgICAgICAgICAvLyBFbnN1cmUgZmVhdHVyZSBmbGFncyBhcmUgZW5hYmxlZCBiZWZvcmUgdGhleSBhcmUgY29uc3VtZWQuCiAgICAgICAgICAgICAgICBGZWF0dXJlRmxhZ01vZHVsZSwKICAgICAgICAgICAgICAgIEJyb3dzZXJNb2R1bGUsCiAgICAgICAgICAgICAgICBCcm93c2VyQW5pbWF0aW9uc01vZHVsZSwKICAgICAgICAgICAgICAgIEFwcFJvdXRpbmdNb2R1bGUsCiAgICAgICAgICAgICAgICBBcHBSb3V0aW5nVmlld01vZHVsZSwKICAgICAgICAgICAgICAgIFJvdXRlUmVnaXN0cnlNb2R1bGUucmVnaXN0ZXJSb3V0ZXMocm91dGVzRmFjdG9yeSksCiAgICAgICAgICAgICAgICBBbGVydE1vZHVsZSwKICAgICAgICAgICAgICAgIEFsZXJ0U25hY2tiYXJNb2R1bGUsCiAgICAgICAgICAgICAgICBUZW5zb3JCb2FyZFdyYXBwZXJNb2R1bGUsCiAgICAgICAgICAgICAgICBDb3JlTW9kdWxlLAogICAgICAgICAgICAgICAgRXhwZXJpbWVudHNNb2R1bGUsCiAgICAgICAgICAgICAgICBIYXNoU3RvcmFnZU1vZHVsZSwKICAgICAgICAgICAgICAgIEhlYWRlck1vZHVsZSwKICAgICAgICAgICAgICAgIE1hdEljb25Nb2R1bGUkMSwKICAgICAgICAgICAgICAgIFBhZ2VUaXRsZU1vZHVsZSwKICAgICAgICAgICAgICAgIFBsdWdpbnNNb2R1bGUsCiAgICAgICAgICAgICAgICBSdW5zTW9kdWxlLAogICAgICAgICAgICAgICAgU2V0dGluZ3NNb2R1bGUsCiAgICAgICAgICAgICAgICBTdG9yZU1vZHVsZS5mb3JSb290KFJPT1RfUkVEVUNFUlMsIHsKICAgICAgICAgICAgICAgICAgICBydW50aW1lQ2hlY2tzOiB7CiAgICAgICAgICAgICAgICAgICAgICAgIHN0cmljdFN0YXRlU2VyaWFsaXphYmlsaXR5OiBmYWxzZSwKICAgICAgICAgICAgICAgICAgICAgICAgc3RyaWN0QWN0aW9uU2VyaWFsaXphYmlsaXR5OiB0cnVlLAogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICB9KSwKICAgICAgICAgICAgICAgIEVmZmVjdHNNb2R1bGUuZm9yUm9vdChbXSksCiAgICAgICAgICAgICAg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gICovCiAgICBlbmFibGVQcm9kTW9kZSgpOwoKfSgpKTsKCgo=", + "ok": true, + "headers": [ + [ + "content-type", + "application/javascript; charset=utf-8" + ] + ], + "status": 200, + "status_text": "" + }, + "https://localhost:6006/data/environment": { + "data": "eyJkYXRhX2xvY2F0aW9uIjogIi4vbXlfY2lmYXIxMF9sb2dzIiwgIndpbmRvd190aXRsZSI6ICIifQ==", + "ok": true, + "headers": [ + [ + "content-type", + "application/json" + ] + ], + "status": 200, + "status_text": "" + }, + "https://localhost:6006/data/plugins_listing": { + "data": "eyJzY2FsYXJzIjogeyJkaXNhYmxlX3JlbG9hZCI6IGZhbHNlLCAiZW5hYmxlZCI6IGZhbHNlLCAicmVtb3ZlX2RvbSI6IGZhbHNlLCAidGFiX25hbWUiOiAic2NhbGFycyIsICJsb2FkaW5nX21lY2hhbmlzbSI6IHsidHlwZSI6ICJDVVNUT01fRUxFTUVOVCIsICJlbGVtZW50X25hbWUiOiAidGYtc2NhbGFyLWRhc2hib2FyZCJ9fSwgImN1c3RvbV9zY2FsYXJzIjogeyJkaXNhYmxlX3JlbG9hZCI6IGZhbHNlLCAiZW5hYmxlZCI6IGZhbHNlLCAicmVtb3ZlX2RvbSI6IGZhbHNlLCAidGFiX25hbWUiOiAiQ3VzdG9tIFNjYWxhcnMiLCAibG9hZGluZ19tZWNoYW5pc20iOiB7InR5cGUiOiAiQ1VTVE9NX0VMRU1FTlQiLCAiZWxlbWVudF9uYW1lIjogInRmLWN1c3RvbS1zY2FsYXItZGFzaGJvYXJkIn19LCAiaW1hZ2VzIjogeyJkaXNhYmxlX3JlbG9hZCI6IGZhbHNlLCAiZW5hYmxlZCI6IGZhbHNlLCAicmVtb3ZlX2RvbSI6IGZhbHNlLCAidGFiX25hbWUiOiAiaW1hZ2VzIiwgImxvYWRpbmdfbWVjaGFuaXNtIjogeyJ0eXBlIjogIkNVU1RPTV9FTEVNRU5UIiwgImVsZW1lbnRfbmFtZSI6ICJ0Zi1pbWFnZS1kYXNo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9fX0=", + "ok": true, + "headers": [ + [ + "content-type", + "application/json" + ] + ], + "status": 200, + "status_text": "" + }, + "https://localhost:6006/icon_bundle.svg": { + "data": "PHN2Zz48ZGVmcz4KPHN2ZyBpZD0iYXJyb3dfZG93bndhcmRfMjRweCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZmlsbD0iIzAxMDEwMSIgZD0iTTIwIDEybC0xLjQxLTEuNDFMMTMgMTYuMTdWNGgtMnYxMi4xN2wtNS41OC01LjU5TDQgMTJsOCA4IDgtOHoiLz48L3N2Zz48c3ZnIGlkPSJhcnJvd191cHdhcmRfMjRweCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTQgMTJsMS40MSAxLjQxTDExIDcuODNWMjBoMlY3LjgzbDUuNTggNS41OUwyMCAxMmwtOC04LTggOHoiLz48L3N2Zz48c3ZnIGlkPSJidWdfcmVwb3J0XzI0cHgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjQiPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48cGF0aCBkPSJNMjAgOGgtMi44MWMtLjQ1LS43OC0xLjA3LTEuNDUtMS44Mi0xLjk2TDE3IDQuNDEgMTUuNTkgM2wtMi4xNyAyLjE3QzEyLjk2IDUuMDYgMTIuNDkgNSAxMiA1Yy0uNDkgMC0uOTYuMDYtMS40MS4xN0w4LjQxIDMgNyA0LjQxbDEuNjIgMS42M0M3Ljg4IDYuNTUgNy4yNiA3LjIyIDYuODEgOEg0djJoMi4wOW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LS4wOC40My0uMDguNjUgMCAxLjY2IDEuMzQgMyAzIDMgLjIyIDAgLjQ0LS4wMy42NS0uMDhsMS41NSAxLjU1Yy0uNjcuMzMtMS40MS41My0yLjIuNTMtMi43NiAwLTUtMi4yNC01LTUgMC0uNzkuMi0xLjUzLjUzLTIuMnptNC4zMS0uNzhsMy4xNSAzLjE1LjAyLS4xNmMwLTEuNjYtMS4zNC0zLTMtM2wtLjE3LjAxeiIvPjwvc3ZnPjxzdmcgaWQ9Indhcm5pbmdfMjRweCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIyNCI+PHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik0xIDIxaDIyTDEyIDIgMSAyMXptMTItM2gtMnYtMmgydjJ6bTAtNGgtMnYtNGgydjR6Ii8+PC9zdmc+PC9kZWZzPjwvc3ZnPgo=", + "ok": true, + "headers": [ + [ + "content-type", + "image/svg+xml; charset=utf-8" + ] + ], + "status": 200, + "status_text": "" + }, + "https://localhost:6006/data/runs": { + "data": "WyJydW5fMDAxL3RyYWluIl0=", + "ok": true, + "headers": [ + [ + "content-type", + "application/json" + ] + ], + "status": 200, + "status_text": "" + }, + "https://localhost:6006/data/plugin/graphs/info": { + "data": "eyJydW5fMDAxL3RyYWluIjogeyJydW4iOiAicnVuXzAwMS90cmFpbiIsICJ0YWdzIjogeyJiYXRjaF8yIjogeyJ0YWciOiAiYmF0Y2hfMiIsICJjb25jZXB0dWFsX2dyYXBoIjogZmFsc2UsICJvcF9ncmFwaCI6IHRydWUsICJwcm9maWxlIjogZmFsc2V9LCAia2VyYXMiOiB7InRhZyI6ICJrZXJhcyIsICJjb25jZXB0dWFsX2dyYXBoIjogdHJ1ZSwgIm9wX2dyYXBoIjogZmFsc2UsICJwcm9maWxlIjogZmFsc2V9fSwgInJ1bl9ncmFwaCI6IHRydWV9fQ==", + "ok": true, + "headers": [ + [ + "content-type", + "application/json" + ] + ], + "status": 200, + "status_text": "" + }, + "https://localhost:6006/data/plugin/graphs/graph?run=run_001%2Ftrain&conceptual=false": { + "data": "bm9kZSB7CiAgbmFtZTogIml0ZXJhdG9yIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl91c2VyX3NwZWNpZmllZF9uYW1lIgogICAgdmFsdWUgewogICAgICBzOiAiaXRlcmF0b3IiCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX1JFU09VUkNFCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAic2hhcGUiCiAgICB2YWx1ZSB7CiAgICAgIHNoYXBlIHsKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiaXRlcmF0b3JfMSIKICBvcDogIlBsYWNlaG9sZGVyIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfdXNlcl9zcGVjaWZpZWRfbmFtZSIKICAgIHZhbHVlIHsKICAgICAgczogIml0ZXJhdG9yIgogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9WQVJJQU5UCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAic2hhcGUiCiAgICB2YWx1ZSB7CiAgICAgIHNoYXBlIHsKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiSXRlcmF0b3JHZXROZXh0IgogIG9wOiAiSXRlcmF0b3JHZXROZXh0IgogIGlucHV0OiAiaXRlcmF0b3IiCiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QGl0ZXJhdG9yIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAzMgogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMzIKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDMKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogLTEKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJvdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMzIKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDMyCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAzCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAib3V0cHV0X3R5cGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICB0eXBlOiBEVF9VSU5UOAogICAgICAgIHR5cGU6IERUX1VJTlQ4CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvQ2FzdCIKICBvcDogIkNhc3QiCiAgaW5wdXQ6ICJJdGVyYXRvckdldE5leHQiCiAgYXR0ciB7CiAgICBrZXk6ICJEc3RUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIlNyY1QiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX1VJTlQ4CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiVHJ1bmNhdGUiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAzMgogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMzIKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDMKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZmxhdHRlbi9Db25zdCIKICBvcDogIkNvbnN0IgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDIKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfSU5UMzIKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ2YWx1ZSIKICAgIHZhbHVlIHsKICAgICAgdGVuc29yIHsKICAgICAgICBkdHlwZTogRFRfSU5UMzIKICAgICAgICB0ZW5zb3Jfc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMgogICAgICAgICAgfQogICAgICAgIH0KICAgICAgICB0ZW5zb3JfY29udGVudDogIlwzNzdcMzc3XDM3N1wzNzdcMDAwXDAxNFwwMDBcMDAwIgogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2ZsYXR0ZW4vUmVzaGFwZSIKICBvcDogIlJlc2hhcGUiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL0Nhc3QiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2ZsYXR0ZW4vQ29uc3QiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIlRzaGFwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfSU5UMzIKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogLTEKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDMwNzIKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2UvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2UvTWF0TXVsL1JlYWRWYXJpYWJsZU9wIgogIG9wOiAiUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAzMDcyCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZ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AgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlL0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AiCiAgb3A6ICJSZWFkVmFyaWFibGVPcCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2UvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2UvQmlhc0FkZCIKICBvcDogIkJpYXNBZGQiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlL01hdE11bCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2UvQmlhc0FkZC9SZWFkVmFyaWFibGVPcCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkYXRhX2Zvcm1hdCIKICAgIHZhbHVlIHsKICAgICAgczogIk5IV0MiCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlL0VsdSIKICBvcDogIkVsdSIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2UvQmlhc0FkZCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfMS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgb3A6ICJQbGFjZWhvbGRlciIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX1JFU09VUkNFCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAic2hhcGUiCiAgICB2YWx1ZSB7CiAgICAgIHNoYXBlIHsKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAic2VxdWVudGlhbC9kZW5zZV8xL01hdE11bC9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAic2VxdWVudGlhbC9kZW5zZV8xL01hdE11bCIKICBvcDogIk1hdE11bCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2UvRWx1IgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xL01hdE11bC9SZWFkVmFyaWFibGVPcCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ0cmFuc3Bvc2VfYSIKICAgIHZhbHVlIHsKICAgICAgYjogZmFsc2UKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ0cmFuc3Bvc2VfYiIKICAgIHZhbHVlIHsKICAgICAgYjogZmFsc2UKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfMS9CaWFzQWRkL1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YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkYXRhX2Zvcm1hdCIKICAgIHZhbHVlIHsKICAgICAgczogIk5IV0MiCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzEvRWx1IgogIG9wOiAiRWx1IgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xL0JpYXNBZGQiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzIvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0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IHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ0cmFuc3Bvc2VfYSIKICAgIHZhbHVlIHsKICAgICAgYjogZmFsc2UKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ0cmFuc3Bvc2VfYiIKICAgIHZhbHVlIHsKICAgICAgYjogZmFsc2UKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfMi9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfMi9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wIgogIG9wOiAiUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzIvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfMi9CaWFzQWRkIgogIG9wOiAiQmlhc0FkZCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMi9NYXRNdWwiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzIvQmlhc0FkZC9SZWFkVmFyaWFibGVPcCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkYXRhX2Zvcm1hdCIKICAgIHZhbHVlIHsKICAgICAgczogIk5IV0MiCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzIvRWx1IgogIG9wOiAiRWx1IgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8yL0JpYXNBZGQiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzMvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfMy9NYXRNdWwvUmVhZFZhcmlhYmxlT3AiCiAgb3A6ICJSZWFkVmFyaWFibGVPcCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMy9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZT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0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkYXRhX2Zvcm1hdCIKICAgIHZhbHVlIHsKICAgICAgczogIk5IV0MiCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzMvRWx1IgogIG9wOiAiRWx1IgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8zL0JpYXNBZGQiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzQvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfNC9NYXRNdWwvUmVhZFZhcmlhYmxlT3AiCiAgb3A6ICJSZWFkVmFyaWFibGVPcCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfNC9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfNC9NYXRNdWwiCiAgb3A6ICJNYXRNdWwiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzMvRWx1IgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV80L01hdE11bC9SZWFkVmFyaWFibGVPcCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ0cmFuc3Bvc2VfYSIKICAgIHZhbHVlIHsKICAgICAgYjogZmFsc2UKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ0cmFuc3Bv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NYXRNdWwiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzQvQmlhc0FkZC9SZWFkVmFyaWFibGVPcCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkYXRhX2Zvcm1hdCIKICAgIHZhbHVlIHsKICAgICAgczogIk5IV0MiCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzQvRWx1IgogIG9wOiAiRWx1IgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV80L0JpYXNBZGQiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzUvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfNS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AiCiAgb3A6ICJSZWFkVmFyaWFibGVPcCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfNS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfNS9NYXRNdWwiCiAgb3A6ICJNYXRNdWwiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzQvRWx1IgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV81L01hdE11bC9SZWFkVmFyaWFibGVPcCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6I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KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfNS9CaWFzQWRkIgogIG9wOiAiQmlhc0FkZCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfNS9NYXRNdWwiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzUvQmlhc0FkZC9SZWFkVmFyaWFibGVPcCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkYXRhX2Zvcm1hdCIKICAgIHZhbHVlIHsKICAgICAgczogIk5IV0MiCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzUvRWx1IgogIG9wOiAiRWx1IgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV81L0JpYXNBZGQiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzYvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfNi9NYXRNdWwvUmVhZFZhcmlhYmxlT3AiCiAgb3A6ICJSZWFkVmFyaWFibGVPcCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfNi9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAx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AgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkYXRhX2Zvcm1hdCIKICAgIHZhbHVlIHsKICAgICAgczogIk5IV0MiCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzYvRWx1IgogIG9wOiAiRWx1IgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV82L0JpYXNBZGQiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzcvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfNy9NYXRNdWwvUmVhZFZhcmlhYmxlT3AiCiAgb3A6ICJSZWFkVmFyaWFibGVPcCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfNy9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfNy9NYXRNdWwiCiAgb3A6ICJNYXRNdWwiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzYvRWx1IgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV83L01hdE11bC9SZWFkVmFyaWFibGVPcCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgIC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B7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfNy9CaWFzQWRkIgogIG9wOiAiQmlhc0FkZCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfNy9NYXRNdWwiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzcvQmlhc0FkZC9SZWFkVmFyaWFibGVPcCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkYXRhX2Zvcm1hdCIKICAgIHZhbHVlIHsKICAgICAgczogIk5IV0MiCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzcvRWx1IgogIG9wOiAiRWx1IgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV83L0JpYXNBZGQiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6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ic2VxdWVudGlhbC9kZW5zZV84L01hdE11bC9SZWFkVmFyaWFibGVPcCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ0cmFuc3Bvc2VfYSIKICAgIHZhbHVlIHsKICAgICAgYjogZmFsc2UKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ0cmFuc3Bvc2VfYiIKICAgIHZhbHVlIHsKICAgICAgYjogZmFsc2UKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfOC9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfOC9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wIgogIG9w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AiRWx1IgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV84L0JpYXNBZGQiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzkvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfOS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AiCiAgb3A6ICJSZWFkVmFyaWFibGVPcCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfOS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfOS9NYXRNdWwiCiAgb3A6ICJNYXRNdWwiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzgvRWx1IgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV85L01hdE11bC9SZWFkVmFyaWFibGVPcCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ0cmFuc3Bvc2VfYSIKICAgIHZhbHVlIHsKICAgICAgYjogZmFsc2UKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ0cmFuc3Bvc2VfYiIKICAgIHZhbHVlIHsKICAgICAgYjogZmFsc2UKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfOS9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2x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GF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkYXRhX2Zvcm1hdCIKICAgIHZhbHVlIHsKICAgICAgczogIk5IV0MiCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzkvRWx1IgogIG9wOiAiRWx1IgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV85L0JpYXNBZGQiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzEwL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBvcDogIlBsYWNlaG9sZGVyIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfUkVTT1VSQ0UKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJzaGFwZSIKICAgIHZhbHVlIHsKICAgICAgc2hhcGUgewogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzEwL01hdE11bC9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xMC9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfMTAvTWF0TXVsIgogIG9wOiAiTWF0TXVsIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV85L0VsdSIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMTAvTWF0TXVsL1JlYWRWYXJpYWJsZU9wIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogLTEKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInRyYW5zcG9zZV9hIgogICAgdmFsdWUgewogICAgICBiOiBmYWxzZQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInRyYW5zcG9zZV9iIgogICAgdmFsdWUgewogICAgICBiOiBmYWxzZQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAic2VxdWVudGlhbC9kZW5zZV8xMC9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfMTAvQmlhc0FkZC9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xMC9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAic2VxdWVudGlhbC9kZW5zZV8xMC9CaWFzQWRkIgogIG9wOiAiQmlhc0FkZCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMTAvTWF0TXVsIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xMC9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogLTEKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImRhdGFfZm9ybWF0IgogICAgdmFsdWUgewogICAgICBzOiAiTkhXQyIKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfMTAvRWx1IgogIG9wOiAiRWx1IgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xMC9CaWFzQWRkIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogLTEKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAic2VxdWVudGlhbC9kZW5zZV8xMS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgb3A6ICJQbGFjZWhvbGRlciIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX1JFU09VUkNFCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAic2hhcGUiCiAgICB2YWx1ZSB7CiAgICAgIHNoYXBlIHsKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAic2VxdWVudGlhbC9kZW5zZV8xMS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AiCiAgb3A6ICJSZWFkVmFyaWFibGVPcCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMTEvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzExL01hdE11bCIKICBvcDogIk1hdE11bCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMTAvRWx1IgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xMS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2EiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2IiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzExL0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgb3A6ICJQbGFjZWhvbGRlciIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX1JFU09VUkNFCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAic2hhcGUiCiAgICB2YWx1ZSB7CiAgICAgIHNoYXBlIHsKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAic2VxdWVudGlhbC9kZW5zZV8xMS9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wIgogIG9wOiAiUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzExL0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzExL0JpYXNBZGQiCiAgb3A6ICJCaWFzQWRkIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xMS9NYXRNdWwiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzExL0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZGF0YV9mb3JtYXQiCiAgICB2YWx1ZSB7CiAgICAgIHM6ICJOSFdDIgogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAic2VxdWVudGlhbC9kZW5zZV8xMS9FbHUiCiAgb3A6ICJFbHUiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzExL0JpYXNBZGQiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzEyL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBvcDogIlBsYWNlaG9sZGVyIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfUkVTT1VSQ0UKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJzaGFwZSIKICAgIHZhbHVlIHsKICAgICAgc2hhcGUgewogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzEyL01hdE11bC9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xMi9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfMTIvTWF0TXVsIgogIG9wOiAiTWF0TXVsIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xMS9FbHUiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzEyL01hdE11bC9SZWFkVmFyaWFibGVPcCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ0cmFuc3Bvc2VfYSIKICAgIHZhbHVlIHsKICAgICAgYjogZmFsc2UKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ0cmFuc3Bvc2VfYiIKICAgIHZhbHVlIHsKICAgICAgYjogZmFsc2UKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZ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BhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkYXRhX2Zvcm1hdCIKICAgIHZhbHVlIHsKICAgICAgczogIk5IV0MiCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzEyL0VsdSIKICBvcDogIkVsdSIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMTIvQmlhc0FkZCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfMTMvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfMTMvTWF0TXVsL1JlYWRWYXJpYWJsZU9wIgogIG9wOiAiUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzEzL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAic2VxdWVudGlhbC9kZW5zZV8xMy9NYXRNdWwiCiAgb3A6ICJNYXRNdWwiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzEyL0VsdSIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMTMvTWF0TXVsL1JlYWRWYXJpYWJsZU9wIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogLTEKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInRyYW5zcG9zZV9hIgogICAgdmFsdWUgewogICAgICBiOiBmYWxzZQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInRyYW5zcG9zZV9iIgogICAgdmFsdWUgewogICAgICBiOiBmYWxzZQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAic2VxdWVudGlhbC9kZW5zZV8xMy9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfMTMvQmlhc0FkZC9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xMy9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAic2VxdWVudGlhbC9kZW5zZV8xMy9CaWFzQWRkIgogIG9wOiAiQmlhc0FkZCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMTMvTWF0TXVsIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xMy9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogLTEKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImRhdGFfZm9ybWF0IgogICAgdmFsdWUgewogICAgICBzOiAiTkhXQyIKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfMTMvRWx1IgogIG9wOiAiRWx1IgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xMy9CaWFzQWRkIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogLTEKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAic2VxdWVudGlhbC9kZW5zZV8xNC9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgb3A6ICJQbGFjZWhvbGRlciIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX1JFU09VUkNFCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAic2hhcGUiCiAgICB2YWx1ZSB7CiAgICAgIHNoYXBlIHsKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAic2VxdWVudGlhbC9kZW5zZV8xNC9NYXRNdWwvUmVhZFZhcmlhYmxlT3AiCiAgb3A6ICJSZWFkVmFyaWFibGVPcCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMTQvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzE0L01hdE11bCIKICBvcDogIk1hdE11bCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMTMvRWx1IgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xNC9NYXRNdWwvUmVhZFZhcmlhYmxlT3AiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2EiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2IiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzE0L0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgb3A6ICJQbGFjZWhvbGRlciIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX1JFU09VUkNFCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAic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ogIGF0dHIgewogICAga2V5OiAiZGF0YV9mb3JtYXQiCiAgICB2YWx1ZSB7CiAgICAgIHM6ICJOSFdDIgogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAic2VxdWVudGlhbC9kZW5zZV8xNC9FbHUiCiAgb3A6ICJFbHUiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzE0L0JpYXNBZGQiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzE1L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBvcDogIlBsYWNlaG9sZGVyIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfUkVTT1VSQ0UKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJzaGFwZSIKICAgIHZhbHVlIHsKICAgICAgc2hhcGUgewogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzE1L01hdE11bC9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xNS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfMTUvTWF0TXVsIgogIG9wOiAiTWF0TXVsIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xNC9FbHUiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzE1L01hdE11bC9SZWFkVmFyaWFibGVPcCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ0cmFuc3Bvc2VfYSIKICAgIHZhbHVlIHsKICAgICAgYjogZmFsc2UKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ0cmFuc3Bvc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2RlbnNlXzE1L01hdE11bCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMTUvQmlhc0FkZC9SZWFkVmFyaWFibGVPcCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkYXRhX2Zvcm1hdCIKICAgIHZhbHVlIHsKICAgICAgczogIk5IV0MiCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzE1L0VsdSIKICBvcDogIkVsdSIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMTUvQmlhc0FkZCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfMTYvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfMTYvTWF0TXVsL1JlYWRWYXJpYWJsZU9wIgogIG9wOiAiUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzE2L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAic2VxdWVudGlhbC9kZW5zZV8xNi9NYXRNdWwiCiAgb3A6ICJNYXRNdWwiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzE1L0VsdSIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMTYvTWF0TXVsL1JlYWRWYXJpYWJsZU9wIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogLTEKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInRyYW5zcG9zZV9hIgogICAgdmFsdWUgewogICAgICBiOiBmYWxzZQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInRyYW5zcG9zZV9iIgogICAgdmFsdWUgewogICAgICBiOiBmYWxzZQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAic2VxdWVudGlhbC9kZW5zZV8xNi9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfMTYvQmlhc0FkZC9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xNi9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAic2VxdWVudGlhbC9kZW5zZV8xNi9CaWFzQWRkIgogIG9wOiAiQmlhc0FkZCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMTYvTWF0TXVsIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xNi9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogLTEKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImRhdGFfZm9ybWF0IgogICAgdmFsdWUgewogICAgICBzOiAiTkhXQyIKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfMTYvRWx1IgogIG9wOiAiRWx1IgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xNi9CaWFzQWRkIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogLTEKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAic2VxdWVudGlhbC9kZW5zZV8xNy9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgb3A6ICJQbGFjZWhvbGRlciIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX1JFU09VUkNFCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAic2hhcGUiCiAgICB2YWx1ZSB7CiAgICAgIHNoYXBlIHsKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAic2VxdWVudGlhbC9kZW5zZV8xNy9NYXRNdWwvUmVhZFZhcmlhYmxlT3AiCiAgb3A6ICJSZWFkVmFyaWFibGVPcCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMTcvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzE3L01hdE11bCIKICBvcDogIk1hdE11bCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMTYvRWx1IgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xNy9NYXRNdWwvUmVhZFZhcmlhYmxlT3AiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2EiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2IiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzE3L0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgb3A6ICJQbGFjZWhvbGRlciIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5O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AgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZGF0YV9mb3JtYXQiCiAgICB2YWx1ZSB7CiAgICAgIHM6ICJOSFdDIgogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAic2VxdWVudGlhbC9kZW5zZV8xNy9FbHUiCiAgb3A6ICJFbHUiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzE3L0JpYXNBZGQiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzE4L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBvcDogIlBsYWNlaG9sZGVyIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfUkVTT1VSQ0UKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJzaGFwZSIKICAgIHZhbHVlIHsKICAgICAgc2hhcGUgewogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzE4L01hdE11bC9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xOC9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfMTgvTWF0TXVsIgogIG9wOiAiTWF0TXVsIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xNy9FbHUiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzE4L01hdE11bC9SZWFkVmFyaWFibGVPcCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ0cmFuc3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ZTogInNlcXVlbnRpYWwvZGVuc2VfMTgvQmlhc0FkZCIKICBvcDogIkJpYXNBZGQiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzE4L01hdE11bCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMTgvQmlhc0FkZC9SZWFkVmFyaWFibGVPcCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkYXRhX2Zvcm1hdCIKICAgIHZhbHVlIHsKICAgICAgczogIk5IV0MiCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzE4L0VsdSIKICBvcDogIkVsdSIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMTgvQmlhc0FkZCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfMTkvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfMTkvTWF0TXVsL1JlYWRWYXJpYWJsZU9wIgogIG9wOiAiUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzE5L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAic2VxdWVudGlhbC9kZW5zZV8xOS9NYXRNdWwiCiAgb3A6ICJNYXRNdWwiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzE4L0VsdSIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMTkvTWF0TXVsL1JlYWRWYXJpYWJsZU9wIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogLTEKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInRyYW5zcG9zZV9hIgogICAgdmFsdWUgewogICAgICBiOiBmYWxzZQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInRyYW5zcG9zZV9iIgogICAgdmFsdWUgewogICAgICBiOiBmYWxzZQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAic2VxdWVudGlhbC9kZW5zZV8xOS9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfMTkvQmlhc0FkZC9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xOS9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAic2VxdWVudGlhbC9kZW5zZV8xOS9CaWFzQWRkIgogIG9wOiAiQmlhc0FkZCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMTkvTWF0TXVsIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xOS9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogLTEKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImRhdGFfZm9ybWF0IgogICAgdmFsdWUgewogICAgICBzOiAiTkhXQyIKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfMTkvRWx1IgogIG9wOiAiRWx1IgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xOS9CaWFzQWRkIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogLTEKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAic2VxdWVudGlhbC9kZW5zZV8yMC9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgb3A6ICJQbGFjZWhvbGRlciIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX1JFU09VUkNFCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAic2hhcGUiCiAgICB2YWx1ZSB7CiAgICAgIHNoYXBlIHsKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAic2VxdWVudGlhbC9kZW5zZV8yMC9NYXRNdWwvUmVhZFZhcmlhYmxlT3AiCiAgb3A6ICJSZWFkVmFyaWFibGVPcCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMjAvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfMjAvTWF0TXVsIgogIG9wOiAiTWF0TXVsIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xOS9FbHUiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzIwL01hdE11bC9SZWFkVmFyaWFibGVPcCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInRyYW5zcG9zZV9hIgogICAgdmFsdWUgewogICAgICBiOiBmYWxzZQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInRyYW5zcG9zZV9iIgogICAgdmFsdWUgewogICAgICBiOiBmYWxzZQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAic2VxdWVudGlhbC9kZW5zZV8yMC9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNlcXVlbnRpYWwvZGVuc2VfMjAvQmlhc0FkZC9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8yMC9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzIwL0JpYXNBZGQiCiAgb3A6ICJCaWFzQWRkIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8yMC9NYXRNdWwiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzIwL0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkYXRhX2Zvcm1hdCIKICAgIHZhbHVlIHsKICAgICAgczogIk5IV0MiCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzZXF1ZW50aWFsL2RlbnNlXzIwL1NvZnRtYXgiCiAgb3A6ICJTb2Z0bWF4IgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8yMC9CaWFzQWRkIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogLTEKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzcGFyc2VfY2F0ZWdvcmljYWxfY3Jvc3NlbnRyb3B5L0Nhc3QiCiAgb3A6ICJDYXN0IgogIGlucHV0OiAiSXRlcmF0b3JHZXROZXh0OjEiCiAgYXR0ciB7CiAgICBrZXk6ICJEc3RUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIlNyY1QiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX1VJTlQ4CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiVHJ1bmNhdGUiCiAgICB2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FsL2RlbnNlXzIwL0JpYXNBZGQiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAyCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAib3V0X3R5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0lOVDMyCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzcGFyc2VfY2F0ZWdvcmljYWxfY3Jvc3NlbnRyb3B5L1Jlc2hhcGUvc2hhcGUiCiAgb3A6ICJDb25zdCIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0lOVDMyCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidmFsdWUiCiAgICB2YWx1ZSB7CiAgICAgIHRlbnNvciB7CiAgICAgICAgZHR5cGU6IERUX0lOVDMyCiAgICAgICAgdGVuc29yX3NoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaW50X3ZhbDogLTEKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAic3BhcnNlX2NhdGVnb3JpY2FsX2Nyb3NzZW50cm9weS9SZXNoYXBlIgogIG9wOiAiUmVzaGFwZSIKICBpbnB1dDogInNwYXJzZV9jYXRlZ29yaWNhbF9jcm9zc2VudHJvcHkvQ2FzdF8xIgogIGlucHV0OiAic3BhcnNlX2NhdGVnb3JpY2FsX2Nyb3NzZW50cm9weS9SZXNoYXBlL3NoYXBlIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfSU5UNjQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJUc2hhcGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0lOVDMyCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzcGFyc2VfY2F0ZWdvcmljYWxfY3Jvc3NlbnRyb3B5L3N0cmlkZWRfc2xpY2Uvc3RhY2siCiAgb3A6ICJDb25zdCIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0lOVDMyCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidmFsdWUiCiAgICB2YWx1ZSB7CiAgICAgIHRlbnNvciB7CiAgICAgICAgZHR5cGU6IERUX0lOVDMyCiAgICAgICAgdGVuc29yX3NoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaW50X3ZhbDogLTEKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAic3BhcnNlX2NhdGVnb3JpY2FsX2Nyb3NzZW50cm9weS9zdHJpZGVkX3NsaWNlL3N0YWNrXzEiCiAgb3A6ICJDb25zdCIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0lOVDMyCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidmFsdWUiCiAgICB2YWx1ZSB7CiAgICAgIHRlbnNvciB7CiAgICAgICAgZHR5cGU6IERUX0lOVDMyCiAgICAgICAgdGVuc29yX3NoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaW50X3ZhbDogMAogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzcGFyc2VfY2F0ZWdvcmljYWxfY3Jvc3NlbnRyb3B5L3N0cmlkZWRfc2xpY2Uvc3RhY2tfMiIKICBvcDogIkNvbnN0IgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfSU5UMzIKICAgI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Nyb3NzZW50cm9weS9zdHJpZGVkX3NsaWNlIgogIGF0dHIgewogICAga2V5OiAiTiIKICAgIHZhbHVlIHsKICAgICAgaTogMgogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0lOVDMyCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDIKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJheGlzIgogICAgdmFsdWUgewogICAgICBpOiAwCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzcGFyc2VfY2F0ZWdvcmljYWxfY3Jvc3NlbnRyb3B5L1Jlc2hhcGVfMSIKICBvcDogIlJlc2hhcGUiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzIwL0JpYXNBZGQiCiAgaW5wdXQ6ICJzcGFyc2VfY2F0ZWdvcmljYWxfY3Jvc3NlbnRyb3B5L1Jlc2hhcGVfMS9zaGFwZSIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiVHNoYXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9JTlQzMgogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogLTEKICAgICAgICAgIH0KICAgICAgICB9CiAgICA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sdWUgewogICAgICB0eXBlOiBEVF9JTlQ2NAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogLTEKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInNwYXJzZV9jYXRlZ29yaWNhbF9jcm9zc2VudHJvcHkvd2VpZ2h0ZWRfbG9zcy9Db25zdCIKICBvcDogIkNvbnN0IgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ2YWx1ZSIKICAgIHZhbHVlIHsKICAgICAgdGVuc29yIHsKICAgICAgICBkdHlwZTogRFRfRkxPQVQKICAgICAgICB0ZW5zb3Jfc2hhcGUgewogICAgICAgIH0KICAgICAgICBmbG9hdF92YWw6IDEuMAogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzcGFyc2VfY2F0ZWdvcmljYWxfY3Jvc3NlbnRyb3B5L3dlaWdodGVkX2xvc3MvTXVsIgogIG9wOiAiTXVsIgogIGlucHV0OiAic3BhcnNlX2NhdGVnb3JpY2FsX2Nyb3NzZW50cm9weS9TcGFyc2VTb2Z0bWF4Q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gICB2YWx1ZSB7CiAgICAgIHRlbnNvciB7CiAgICAgICAgZHR5cGU6IERUX0lOVDMyCiAgICAgICAgdGVuc29yX3NoYXBlIHsKICAgICAgICB9CiAgICAgICAgaW50X3ZhbDogMAogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzcGFyc2VfY2F0ZWdvcmljYWxfY3Jvc3NlbnRyb3B5L3dlaWdodGVkX2xvc3MvcmFuZ2Uvc3RhcnQiCiAgb3A6ICJDb25zdCIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0lOVDMyCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidmFsdWUiCiAgICB2YWx1ZSB7CiAgICAgIHRlbnNvciB7CiAgICAgICAgZHR5cGU6IERUX0lOVDMyCiAgICAgICAgdGVuc29yX3NoYXBlIHsKICAgICAgICB9CiAgICAgICAgaW50X3ZhbDogMAogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzcGFyc2VfY2F0ZWdvcmljYWxfY3Jvc3NlbnRyb3B5L3dlaWdodGVkX2xvc3MvcmFuZ2UvZGVsdGEiCiAgb3A6ICJDb25zdCIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0lOVDMyCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidmFsdWUiCiAgICB2YWx1ZSB7CiAgICAgIHRlbnNvciB7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HB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDIKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJvdXRfdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfSU5UMzIKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInN0cmlkZWRfc2xpY2Uvc3RhY2siCiAgb3A6ICJDb25zdCIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0lOVDMyCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidmFsdWUiCiAgICB2YWx1ZSB7CiAgICAgIHRlbnNvciB7CiAgICAgICAgZHR5cGU6IERUX0lOVDMyCiAgICAgICAgdGVuc29yX3NoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaW50X3ZhbDogMAogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzdHJpZGVkX3NsaWNlL3N0YWNrXzEiCiAgb3A6ICJDb25zdCIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0lOVDMyCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidmFsdWUiCiAgICB2YWx1ZSB7CiAgICAgIHRlbnNvciB7CiAgICAgICAgZHR5cGU6IERUX0lOVDMyCiAgICAgICAgdGVuc29yX3NoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaW50X3ZhbDogMQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzdHJpZGVkX3NsaWNlL3N0YWNrXzIiCiAgb3A6ICJDb25zdCIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0lOVDMyCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidmFsdWUiCiAgICB2YWx1ZSB7CiAgICAgIHRlbnNvciB7CiAgICAgICAgZHR5cGU6IERUX0lOVDMyCiAgICAgICAgdGVuc29yX3NoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaW50X3ZhbDogMQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJzdHJpZGVkX3NsaWNlIgogIG9wOiAiU3RyaWRlZFNsaWNlIgogIGlucHV0OiAiU2hhcGUiCiAgaW5wdXQ6ICJzdHJpZGVkX3NsaWNlL3N0YWNrIgogIGlucHV0OiAic3RyaWRlZF9zbGljZS9zdGFja18xIgogIGlucHV0OiAic3RyaWRlZF9zbGljZS9zdGFja18yIgogIGF0dHIgewogICAga2V5OiAiSW5kZXgiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0lOVDMyCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfSU5UMzIKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImJlZ2luX21hc2siCiAgICB2YWx1ZSB7CiAgICAgIGk6IDAKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJlbGxpcHNpc19tYXNrIgogICAgdmFsdWUgewogICAgICBpOiAwCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZW5kX21hc2siCiAgICB2YWx1ZSB7CiAgICAgIGk6IDAKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJuZXdfYXhpc19tYXNrIgogICAgdmFsdWUgewogICAgICBpOiAwCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAic2hyaW5rX2F4aXNfbWFzayIKICAgIHZhbHVlIHsKICAgICAgaTogMQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiQ2FzdCIKICBvcDogIkNhc3QiCiAgaW5wdXQ6ICJzdHJpZGVkX3NsaWNlIgogIGF0dHIgewogICAga2V5OiAiRHN0VCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJTcmNUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9JTlQzMgogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIlRydW5jYXRlIgogICAgdmFsdWUgewogICAgICBiOiB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KICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9JTlQzMgogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInZhbHVlIgogICAgdmFsdWUgewogICAgICB0ZW5zb3IgewogICAgICAgIGR0eXBlOiBEVF9JTlQzMgogICAgICAgIHRlbnNvcl9zaGFwZSB7CiAgICAgICAgfQogICAgICAgIGludF92YWw6IDAKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAicmFuZ2UvZGVsdGEiCiAgb3A6ICJDb25zdCIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0lOVDMyCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidmFsdWUiCiAgICB2YWx1ZSB7CiAgICAgIHRlbnNvciB7CiAgICAgICAgZHR5cGU6IERUX0lOVDMyCiAgICAgICAgdGVuc29yX3NoYXBlIHsKICAgICAgICB9CiAgICAgICAgaW50X3ZhbDogMQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJyYW5nZSIKICBvcDogIlJhbmdlIgogIGlucHV0OiAicmFuZ2Uvc3RhcnQiCiAgaW5wdXQ6ICJSYW5rIgogIGlucHV0OiAicmFuZ2UvZGVsdGEiCiAgYXR0ciB7CiAgICBrZXk6ICJUaWR4IgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9JTlQzMgogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiU3VtIgogIG9wOiAiU3VtIgogIGlucHV0OiAiTXVsIgogIGlucHV0OiAicmFuZ2UiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIlRpZHgiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0lOVDMyCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJrZWVwX2RpbXMiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJBc3NpZ25BZGRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIkFzc2lnbkFkZFZhcmlhYmxlT3AiCiAgb3A6ICJBc3NpZ25BZGRWYXJpYWJsZU9wIgogIGlucHV0OiAiQXNzaWduQWRkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBpbnB1dDogIlN1bSIKICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiUmFua18xIgogIG9wOiAiQ29uc3QiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9JTlQzMgogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInZhbHVlIgogICAgdmFsdWUgewogICAgICB0ZW5zb3IgewogICAgICAgIGR0eXBlOiBEVF9JTlQzMgogICAgICAgIHRlbnNvcl9zaGFwZSB7CiAgICAgICAgfQogICAgICAgIGludF92YWw6IDAKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAicmFuZ2VfMS9zdGFydCIKICBvcDogIkNvbnN0IgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfSU5UMzIKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ2YWx1ZSIKICAgIHZhbHVlIHsKICAgICAgdGVuc29yIHsKICAgICAgICBkdHlwZTogRFRfSU5UMzIKICAgICAgICB0ZW5zb3Jfc2hhcGUgewogICAgICAgIH0KICAgICAgICBpbnRfdmFsOiAwCiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogInJhbmdlXzEvZGVsdGEiCiAgb3A6ICJDb25zdCIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0lOVDMyCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidmFsdWUiCiAgICB2YWx1ZSB7CiAgICAgIHRlbnNvciB7CiAgICAgICAgZHR5cGU6IERUX0lOVDMyCiAgICAgICAgdGVuc29yX3NoYXBlIHsKICAgICAgICB9CiAgICAgICAgaW50X3ZhbDogMQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJyYW5nZV8xIgogIG9wOiAiUmFuZ2UiCiAgaW5wdXQ6ICJyYW5nZV8xL3N0YXJ0IgogIGlucHV0OiAiUmFua18xIgogIGlucHV0OiAicmFuZ2VfMS9kZWx0YSIKICBhdHRyIHsKICAgIGtleTogIlRpZHgiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0lOVDMyCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJTdW1fMSIKICBvcDogIlN1bSIKICBpbnB1dDogIkNhc3QiCiAgaW5wdXQ6ICJyYW5nZV8xIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJUaWR4IgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9JTlQzMgogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAia2VlcF9kaW1zIgogICAgdmFsdWUgewogICAgICBiOiBmYWxzZQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiQXNzaWduQWRkVmFyaWFibGVPcF8xL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIkFzc2lnbkFkZFZhcmlhYmxlT3BfMSIKICBvcDogIkFzc2lnbkFkZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJBc3NpZ25BZGRWYXJpYWJsZU9wXzEvcmVzb3VyY2UiCiAgaW5wdXQ6ICJTdW1fMSIKICBpbnB1dDogIl5Bc3NpZ25BZGRWYXJpYWJsZU9wIgogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9ncmFkaWVudHMvb25lcyIKICBvcDogIkNvbnN0IgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9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bHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJUc2hhcGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0lOVDMyCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogImdyYWRpZW50X3RhcGUvc3BhcnNlX2NhdGVnb3JpY2FsX2Nyb3NzZW50cm9weS93ZWlnaHRlZF9sb3NzL1Jlc2hhcGUvc2hhcGUiCiAgb3A6ICJDb25zdCIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInZhbHVlIgogICAgdmFsdWUgewogICAgICB0ZW5zb3IgewogICAgICAgIGR0eXBlOiBEVF9GTE9BVAogICAgICAgIHRlbnNvcl9zaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiZ3JhZGllbnRfdGFwZS9zcGFyc2VfY2F0ZWdvcmljYWxfY3Jvc3NlbnRyb3B5L3dlaWdodGVkX2xvc3MvUmVzaGFwZS9zaGFwZV8xIgogIG9wOiAiQ29uc3QiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2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V0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiZ3JhZGllbnRfdGFwZS9zcGFyc2VfY2F0ZWdvcmljYWxfY3Jvc3NlbnRyb3B5L3dlaWdodGVkX2xvc3MvUmVzaGFwZV8xL3NoYXBlIgogIG9wOiAiQ29uc3QiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMQogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9JTlQzMgogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInZhbHVlIgogICAgdmFsdWUgewogICAgICB0ZW5zb3IgewogICAgICAgIGR0eXBlOiBEVF9JTlQzMgogICAgICAgIHRlbnNvcl9zaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGludF92YWw6IDEKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiZ3JhZGllbnRfdGFwZS9zcGFyc2VfY2F0ZWdvcmljYWxfY3Jvc3NlbnRyb3B5L3dlaWdodGVkX2xvc3MvUmVzaGFwZV8xIgogIG9wOiAiUmVzaGFwZSIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc3BhcnNlX2NhdGVnb3JpY2FsX2Nyb3NzZW50cm9weS93ZWlnaHRlZF9sb3NzL1RpbGUiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NwYXJzZV9jYXRlZ29yaWNhbF9jcm9zc2VudHJvcHkvd2VpZ2h0ZWRfbG9zcy9SZXNoYXBlXzEvc2hhcGUiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIlRzaGFwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfSU5UMzIKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMQogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiZ3JhZGllbnRfdGFwZS9zcGFyc2VfY2F0ZWdvcmljYWxfY3Jvc3NlbnRyb3B5L3dlaWdodGVkX2xvc3MvU2hhcGUiCiAgb3A6ICJTaGFwZSIKICBpbnB1dDogInNwYXJzZV9jYXRlZ29yaWNhbF9jcm9zc2VudHJvcHkvd2VpZ2h0ZWRfbG9zcy9NdWwiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAib3V0X3R5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0lOVDMyCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJncmFkaWVudF90YXBlL3NwYXJzZV9jYXRlZ29yaWNhbF9jcm9zc2VudHJvcHkvd2VpZ2h0ZWRfbG9zcy9UaWxlXzEiCiAgb3A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B7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiZ3JhZGllbnRfdGFwZS9zcGFyc2VfY2F0ZWdvcmljYWxfY3Jvc3NlbnRyb3B5L1NoYXBlIgogIG9wOiAiU2hhcGUiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzIwL0JpYXNBZGQiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAyCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAib3V0X3R5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0lOVDMyCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJncmFkaWVudF90YXBlL3NwYXJzZV9jYXRlZ29yaWNhbF9jcm9zc2VudHJvcHkvUmVzaGFwZSIKICBvcDogIlJlc2hhcGUiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NwYXJzZV9jYXRlZ29yaWNhbF9jcm9zc2VudHJvcHkvU3BhcnNlU29mdG1heENyb3NzRW50cm9weVdpdGhMb2dpdHMvbXVsIgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zcGFyc2VfY2F0ZWdvcmljYWxfY3Jvc3NlbnRyb3B5L1NoYXBlIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7Ci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cGUiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzIwL01hdE11bC9SZWFkVmFyaWFibGVPcCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ0cmFuc3Bvc2VfYSIKICAgIHZhbHVlIHsKICAgICAgYjogZmFsc2UKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ0cmFuc3Bvc2VfYiIKICAgIHZhbHVlIHsKICAgICAgYjogdHJ1ZQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzIwL01hdE11bF8xIgogIG9wOiAiTWF0TXVsIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xOS9FbHUiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NwYXJzZV9jYXRlZ29yaWNhbF9jcm9zc2VudHJvcHkvUmVzaGFwZSIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ0cmFuc3Bvc2VfYSIKICAgIHZhbHVlIHsKICAgICAgYjogdHJ1ZQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInRyYW5zcG9zZV9iIgogICAgdmFsdWUgewogICAgICBiOiBmYWxzZQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzE5L0VsdUdyYWQiCiAgb3A6ICJFbHVHcmFkIgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzIwL01hdE11bCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMTkvRWx1IgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogLTEKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzE5L0JpYXNBZGQvQmlhc0FkZEdyYWQiCiAgb3A6ICJCaWFzQWRkR3JhZCIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8xOS9FbHVHcmFkIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZGF0YV9mb3JtYXQiCiAgICB2YWx1ZSB7CiAgICAgIHM6ICJOSFdDIgogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzE5L01hdE11bCIKICBvcDogIk1hdE11bCIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8xOS9FbHVHcmFkIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xOS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2EiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2IiCiAgICB2YWx1ZSB7CiAgICAgIGI6IHRydWUKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8xOS9NYXRNdWxfMSIKICBvcDogIk1hdE11bCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMTgvRWx1IgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzE5L0VsdUdyYWQiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInRyYW5zcG9zZV9hIgogICAgdmFsdWUgewogICAgICBiOiB0cnVlCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2IiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMTgvRWx1R3JhZCIKICBvcDogIkVsdUdyYWQiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMTkvTWF0TXVsIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xOC9FbHUiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogIC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bSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ0cmFuc3Bvc2VfYSIKICAgIHZhbHVlIHsKICAgICAgYjogZmFsc2UKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ0cmFuc3Bvc2VfYiIKICAgIHZhbHVlIHsKICAgICAgYjogdHJ1ZQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzE4L01hdE11bF8xIgogIG9wOiAiTWF0TXVsIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xNy9FbHUiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMTgvRWx1R3JhZCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2EiCiAgICB2YWx1ZSB7CiAgICAgIGI6IHRydWUKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ0cmFuc3Bvc2VfYiIKICAgIHZhbHVlIHsKICAgICAgYjogZmFsc2UKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8xNy9FbHVHcmFkIgogIG9wOiAiRWx1R3JhZCIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8xOC9NYXRNdWwiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzE3L0VsdSIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8xNy9CaWFzQWRkL0JpYXNBZGRHcmFkIgogIG9wOiAiQmlhc0FkZEdyYWQiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMTcvRWx1R3JhZCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImRhdGFfZm9ybWF0IgogICAgdmFsdWUgewogICAgICBzOiAiTkhXQyIKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8xNy9NYXRNdWwiCiAgb3A6ICJNYXRNdWwiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMTcvRWx1R3JhZCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMTcvTWF0TXVsL1JlYWRWYXJpYWJsZU9wIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogLTEKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInRyYW5zcG9zZV9hIgogICAgdmFsdWUgewogICAgICBiOiBmYWxzZQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInRyYW5zcG9zZV9iIgogICAgdmFsdWUgewogICAgICBiOiB0cnVlCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMTcvTWF0TXVsXzEiCiAgb3A6ICJNYXRNdWwiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzE2L0VsdSIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8xNy9FbHVHcmFkIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ0cmFuc3Bvc2VfYSIKICAgIHZhbHVlIHsKICAgICAgYjogdHJ1ZQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInRyYW5zcG9zZV9iIgogICAgdmFsdWUgewogICAgICBiOiBmYWxzZQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzE2L0VsdUdyYWQiCiAgb3A6ICJFbHVHcmFkIgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzE3L01hdE11bCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMTYvRWx1IgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogLTEKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzE2L0JpYXNBZGQvQmlhc0FkZEdyYWQiCiAgb3A6ICJCaWFzQWRkR3JhZCIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8xNi9FbHVHcmFkIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZGF0YV9mb3JtYXQiCiAgICB2YWx1ZSB7CiAgICAgIHM6ICJOSFdDIgogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzE2L01hdE11bCIKICBvcDogIk1hdE11bCIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8xNi9FbHVHcmFkIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xNi9NYXRNdWwvUmVhZFZhcmlhYmxlT3AiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2EiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2IiCiAgICB2YWx1ZSB7CiAgICAgIGI6IHRydWUKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8xNi9NYXRNdWxfMSIKICBvcDogIk1hdE11bCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMTUvRWx1IgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzE2L0VsdUdyYWQiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInRyYW5zcG9zZV9hIgogICAgdmFsdWUgewogICAgICBiOiB0cnVlCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2IiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMTUvRWx1R3JhZCIKICBvcDogIkVsdUdyYWQiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMTYvTWF0TXVsIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xNS9FbHUiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMTUvQmlhc0FkZC9CaWFzQWRkR3JhZCIKICBvcDogIkJpYXNBZGRHcmFkIgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzE1L0VsdUdyYWQiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkYXRhX2Zvcm1hdCIKICAgIHZhbHVlIHsKICAgICAgczogIk5IV0MiCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMTUvTWF0TXVsIgogIG9wOiAiTWF0TXVsIgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzE1L0VsdUdyYWQiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzE1L01hdE11bC9SZWFkVmFyaWFibGVPcCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ0cmFuc3Bvc2VfYSIKICAgIHZhbHVlIHsKICAgICAgYjogZmFsc2UKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ0cmFuc3Bvc2VfYiIKICAgIHZhbHVlIHsKICAgICAgYjogdHJ1ZQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzE1L01hdE11bF8xIgogIG9wOiAiTWF0TXVsIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xNC9FbHUiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMTUvRWx1R3JhZCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2EiCiAgICB2YWx1ZSB7CiAgICAgIGI6IHRydWUKICAgIH0KICB9CiAgYX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AgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImRhdGFfZm9ybWF0IgogICAgdmFsdWUgewogICAgICBzOiAiTkhXQyIKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8xNC9NYXRNdWwiCiAgb3A6ICJNYXRNdWwiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMTQvRWx1R3JhZCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMTQvTWF0TXVsL1JlYWRWYXJpYWJsZU9wIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogLTEKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInRyYW5zcG9zZV9hIgogICAgdmFsdWUgewogICAgICBiOiBmYWxzZQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInRyYW5zcG9zZV9iIgogICAgdmFsdWUgewogICAgICBiOiB0cnVlCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMTQvTWF0TXVsXzEiCiAgb3A6ICJNYXRNdWwiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzEzL0VsdSIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8xNC9FbHVHcmFkIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ0cmFuc3Bvc2VfYSIKICAgIHZhbHVlIHsKICAgICAgYjogdHJ1ZQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInRyYW5zcG9zZV9iIgogICAgdmFsdWUgewogICAgICBiOiBmYWxzZQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzEzL0VsdUdyYWQiCiAgb3A6ICJFbHVHcmFkIgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzE0L01hdE11bCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMTMvRWx1IgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogLTEKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzEzL0JpYXNBZGQvQmlhc0FkZEdyYWQiCiAgb3A6ICJCaWFzQWRkR3JhZCIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8xMy9FbHVHcmFkIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZGF0YV9mb3JtYXQiCiAgICB2YWx1ZSB7CiAgICAgIHM6ICJOSFdDIgogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzEzL01hdE11bCIKICBvcDogIk1hdE11bCIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8xMy9FbHVHcmFkIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xMy9NYXRNdWwvUmVhZFZhcmlhYmxlT3AiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2EiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2IiCiAgICB2YWx1ZSB7CiAgICAgIGI6IHRydWUKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8xMy9NYXRNdWxfMSIKICBvcDogIk1hdE11bCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMTIvRWx1IgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzEzL0VsdUdyYWQiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInRyYW5zcG9zZV9hIgogICAgdmFsdWUgewogICAgICBiOiB0cnVlCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2IiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMTIvRWx1R3JhZCIKICBvcDogIkVsdUdyYWQiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMTMvTWF0TXVsIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xMi9FbHUiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMTIvQmlhc0FkZC9CaWFzQWRkR3JhZCIKICBvcDogIkJpYXNBZGRHcmFkIgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzEyL0VsdUdyYWQiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkYXRhX2Zvcm1hdCIKICAgIHZhbHVlIHsKICAgICAgczogIk5IV0MiCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMTIvTWF0TXVsIgogIG9wOiAiTWF0TXVsIgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzEyL0VsdUdyYWQiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzEyL01hdE11bC9SZWFkVmFyaWFibGVPcCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ0cmFuc3Bvc2VfYSIKICAgIHZhbHVlIHsKICAgICAgYjogZmFsc2UKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ0cmFuc3Bvc2VfYiIKICAgIHZhbHVlIHsKICAgICAgYjogdHJ1ZQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzEyL01hdE11bF8xIgogIG9wOiAiTWF0TXVsIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xMS9FbHUiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMTIvRWx1R3JhZCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9C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wZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImRhdGFfZm9ybWF0IgogICAgdmFsdWUgewogICAgICBzOiAiTkhXQyIKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8xMS9NYXRNdWwiCiAgb3A6ICJNYXRNdWwiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMTEvRWx1R3JhZCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMTEvTWF0TXVsL1JlYWRWYXJpYWJsZU9wIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogLTEKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInRyYW5zcG9zZV9hIgogICAgdmFsdWUgewogICAgICBiOiBmYWxzZQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInRyYW5zcG9zZV9iIgogICAgdmFsdWUgewogICAgICBiOiB0cnVlCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMTEvTWF0TXVsXzEiCiAgb3A6ICJNYXRNdWwiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzEwL0VsdSIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8xMS9FbHVHcmFkIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ0cmFuc3Bvc2VfYSIKICAgIHZhbHVlIHsKICAgICAgYjogdHJ1ZQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInRyYW5zcG9zZV9iIgogICAgdmFsdWUgewogICAgICBiOiBmYWxzZQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzEwL0VsdUdyYWQiCiAgb3A6ICJFbHVHcmFkIgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzExL01hdE11bCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMTAvRWx1IgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogLTEKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzEwL0JpYXNBZGQvQmlhc0FkZEdyYWQiCiAgb3A6ICJCaWFzQWRkR3JhZCIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8xMC9FbHVHcmFkIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZGF0YV9mb3JtYXQiCiAgICB2YWx1ZSB7CiAgICAgIHM6ICJOSFdDIgogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzEwL01hdE11bCIKICBvcDogIk1hdE11bCIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8xMC9FbHVHcmFkIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xMC9NYXRNdWwvUmVhZFZhcmlhYmxlT3AiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2EiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2IiCiAgICB2YWx1ZSB7CiAgICAgIGI6IHRydWUKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8xMC9NYXRNdWxfMSIKICBvcDogIk1hdE11bCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfOS9FbHUiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMTAvRWx1R3JhZCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2EiCiAgICB2YWx1ZSB7CiAgICAgIGI6IHRydWUKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ0cmFuc3Bvc2VfYiIKICAgIHZhbHVlIHsKICAgICAgYjogZmFsc2UKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV85L0VsdUdyYWQiCiAgb3A6ICJFbHVHcmFkIgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzEwL01hdE11bCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfOS9FbHUiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfOS9CaWFzQWRkL0JpYXNBZGRHcmFkIgogIG9wOiAiQmlhc0FkZEdyYWQiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfOS9FbHVHcmFkIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZGF0YV9mb3JtYXQiCiAgICB2YWx1ZSB7CiAgICAgIHM6ICJOSFdDIgogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzkvTWF0TXVsIgogIG9wOiAiTWF0TXVsIgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzkvRWx1R3JhZCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfOS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2EiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2IiCiAgICB2YWx1ZSB7CiAgICAgIGI6IHRydWUKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV85L01hdE11bF8xIgogIG9wOiAiTWF0TXVsIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV84L0VsdSIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV85L0VsdUdyYWQiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInRyYW5zcG9zZV9hIgogICAgdmFsdWUgewogICAgICBiOiB0cnVlCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2IiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfOC9FbHVHcmFkIgogIG9wOiAiRWx1R3JhZCIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV85L01hdE11bCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfOC9FbHUiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfOC9CaWFzQWRkL0JpYXNBZGRHcmFkIgogIG9wOiAiQmlhc0FkZEdyYWQiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfOC9FbHVHcmFkIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZGF0YV9mb3JtYXQiCiAgICB2YWx1ZSB7CiAgICAgIHM6ICJOSFdDIgogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzgvTWF0TXVsIgogIG9wOiAiTWF0TXVsIgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzgvRWx1R3JhZCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfOC9NYXRNdWwvUmVhZFZhcmlhYmxlT3AiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2EiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2IiCiAgICB2YWx1ZSB7CiAgICAgIGI6IHRydWUKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV84L01hdE11bF8xIgogIG9wOiAiTWF0TXVsIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV83L0VsdSIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV84L0VsdUdyYWQiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInRyYW5zcG9zZV9hIgogICAgdmFsdWUgewogICAgICBiOiB0cnVlCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2IiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfNy9FbHVHcmFkIgogIG9wOiAiRWx1R3JhZCIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV84L01hdE11bCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfNy9FbHUiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfNy9CaWFzQWRkL0JpYXNBZGRHcmFkIgogIG9wOiAiQmlhc0FkZEdyYWQiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfNy9FbHVHcmFkIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZGF0YV9mb3JtYXQiCiAgICB2YWx1ZSB7CiAgICAgIHM6ICJOSFdDIgogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzcvTWF0TXVsIgogIG9wOiAiTWF0TXVsIgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzcvRWx1R3JhZCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfNy9NYXRNdWwvUmVhZFZhcmlhYmxlT3AiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2EiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2IiCiAgICB2YWx1ZSB7CiAgICAgIGI6IHRydWUKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV83L01hdE11bF8xIgogIG9wOiAiTWF0TXVsIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV82L0VsdSIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV83L0VsdUdyYWQiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInRyYW5zcG9zZV9hIgogICAgdmFsdWUgewogICAgICBiOiB0cnVlCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2IiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfNi9FbHVHcmFkIgogIG9wOiAiRWx1R3JhZCIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV83L01hdE11bCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfNi9FbHUiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfNi9CaWFzQWRkL0JpYXNBZGRHcmFkIgogIG9wOiAiQmlhc0FkZEdyYWQiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfNi9FbHVHcmFkIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZGF0YV9mb3JtYXQiCiAgICB2YWx1ZSB7CiAgICAgIHM6ICJOSFdDIgogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzYvTWF0TXVsIgogIG9wOiAiTWF0TXVsIgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzYvRWx1R3JhZCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfNi9NYXRNdWwvUmVhZFZhcmlhYmxlT3AiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2EiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2IiCiAgICB2YWx1ZSB7CiAgICAgIGI6IHRydWUKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV82L01hdE11bF8xIgogIG9wOiAiTWF0TXVsIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV81L0VsdSIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV82L0VsdUdyYWQiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInRyYW5zcG9zZV9hIgogICAgdmFsdWUgewogICAgICBiOiB0cnVlCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2IiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfNS9FbHVHcmFkIgogIG9wOiAiRWx1R3JhZCIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV82L01hdE11bCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfNS9FbHUiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfNS9CaWFzQWRkL0JpYXNBZGRHcmFkIgogIG9wOiAiQmlhc0FkZEdyYWQiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfNS9FbHVHcmFkIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZGF0YV9mb3JtYXQiCiAgICB2YWx1ZSB7CiAgICAgIHM6ICJOSFdDIgogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzUvTWF0TXVsIgogIG9wOiAiTWF0TXVsIgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzUvRWx1R3JhZCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfNS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2EiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2IiCiAgICB2YWx1ZSB7CiAgICAgIGI6IHRydWUKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV81L01hdE11bF8xIgogIG9wOiAiTWF0TXVsIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV80L0VsdSIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV81L0VsdUdyYWQiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInRyYW5zcG9zZV9hIgogICAgdmFsdWUgewogICAgICBiOiB0cnVlCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2IiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfNC9FbHVHcmFkIgogIG9wOiAiRWx1R3JhZCIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV81L01hdE11bCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfNC9FbHUiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfNC9CaWFzQWRkL0JpYXNBZGRHcmFkIgogIG9wOiAiQmlhc0FkZEdyYWQiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfNC9FbHVHcmFkIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZGF0YV9mb3JtYXQiCiAgICB2YWx1ZSB7CiAgICAgIHM6ICJOSFdDIgogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzQvTWF0TXVsIgogIG9wOiAiTWF0TXVsIgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzQvRWx1R3JhZCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfNC9NYXRNdWwvUmVhZFZhcmlhYmxlT3AiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2EiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2IiCiAgICB2YWx1ZSB7CiAgICAgIGI6IHRydWUKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV80L01hdE11bF8xIgogIG9wOiAiTWF0TXVsIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8zL0VsdSIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV80L0VsdUdyYWQiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInRyYW5zcG9zZV9hIgogICAgdmFsdWUgewogICAgICBiOiB0cnVlCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2IiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMy9FbHVHcmFkIgogIG9wOiAiRWx1R3JhZCIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV80L01hdE11bCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMy9FbHUiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMy9CaWFzQWRkL0JpYXNBZGRHcmFkIgogIG9wOiAiQmlhc0FkZEdyYWQiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMy9FbHVHcmFkIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZGF0YV9mb3JtYXQiCiAgICB2YWx1ZSB7CiAgICAgIHM6ICJOSFdDIgogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzMvTWF0TXVsIgogIG9wOiAiTWF0TXVsIgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzMvRWx1R3JhZCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMy9NYXRNdWwvUmVhZFZhcmlhYmxlT3AiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2EiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2IiCiAgICB2YWx1ZSB7CiAgICAgIGI6IHRydWUKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8zL01hdE11bF8xIgogIG9wOiAiTWF0TXVsIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8yL0VsdSIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8zL0VsdUdyYWQiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInRyYW5zcG9zZV9hIgogICAgdmFsdWUgewogICAgICBiOiB0cnVlCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2IiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMi9FbHVHcmFkIgogIG9wOiAiRWx1R3JhZCIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8zL01hdE11bCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMi9FbHUiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMi9CaWFzQWRkL0JpYXNBZGRHcmFkIgogIG9wOiAiQmlhc0FkZEdyYWQiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMi9FbHVHcmFkIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZGF0YV9mb3JtYXQiCiAgICB2YWx1ZSB7CiAgICAgIHM6ICJOSFdDIgogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzIvTWF0TXVsIgogIG9wOiAiTWF0TXVsIgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzIvRWx1R3JhZCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMi9NYXRNdWwvUmVhZFZhcmlhYmxlT3AiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2EiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2IiCiAgICB2YWx1ZSB7CiAgICAgIGI6IHRydWUKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8yL01hdE11bF8xIgogIG9wOiAiTWF0TXVsIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xL0VsdSIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8yL0VsdUdyYWQiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInRyYW5zcG9zZV9hIgogICAgdmFsdWUgewogICAgICBiOiB0cnVlCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2IiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMS9FbHVHcmFkIgogIG9wOiAiRWx1R3JhZCIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8yL01hdE11bCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMS9FbHUiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMS9CaWFzQWRkL0JpYXNBZGRHcmFkIgogIG9wOiAiQmlhc0FkZEdyYWQiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMS9FbHVHcmFkIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZGF0YV9mb3JtYXQiCiAgICB2YWx1ZSB7CiAgICAgIHM6ICJOSFdDIgogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzEvTWF0TXVsIgogIG9wOiAiTWF0TXVsIgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzEvRWx1R3JhZCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2EiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2IiCiAgICB2YWx1ZSB7CiAgICAgIGI6IHRydWUKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8xL01hdE11bF8xIgogIG9wOiAiTWF0TXVsIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZS9FbHUiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMS9FbHVHcmFkIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ0cmFuc3Bvc2VfYSIKICAgIHZhbHVlIHsKICAgICAgYjogdHJ1ZQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInRyYW5zcG9zZV9iIgogICAgdmFsdWUgewogICAgICBiOiBmYWxzZQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlL0VsdUdyYWQiCiAgb3A6ICJFbHVHcmFkIgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzEvTWF0TXVsIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZS9FbHUiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAtMQogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2UvQmlhc0FkZC9CaWFzQWRkR3JhZCIKICBvcDogIkJpYXNBZGRHcmFkIgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlL0VsdUdyYWQiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkYXRhX2Zvcm1hdCIKICAgIHZhbHVlIHsKICAgICAgczogIk5IV0MiCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2UvTWF0TXVsIgogIG9wOiAiTWF0TXVsIgogIGlucHV0OiAic2VxdWVudGlhbC9mbGF0dGVuL1Jlc2hhcGUiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2UvRWx1R3JhZCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDMwNzIKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInRyYW5zcG9zZV9hIgogICAgdmFsdWUgewogICAgICBiOiB0cnVlCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidHJhbnNwb3NlX2IiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9JZGVudGl0eS9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBvcDogIlBsYWNlaG9sZGVyIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfUkVTT1VSQ0UKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJzaGFwZSIKICAgIHZhbHVlIHsKICAgICAgc2hhcGUgewogICAgICB9CiAgICB9CiAgfQp9C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ZGFtL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL1JlYWRWYXJpYWJsZU9wIgogIG9wOiAiUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0lOVDY0CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9hZGQveSIKICBvcDogIkNvbnN0IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfSU5UNjQKICAgIH0KICB9CiAg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HVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vUmVhZFZhcmlhYmxlT3BfMSIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAiTmFkYW0vUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9JTlQ2NAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vYWRkXzEveSIKICBvcDogIkNvbnN0IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfSU5UNjQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ2YWx1ZSIKICAgIHZhbHVlIHsKICAgICAgdGVuc29yIHsKICAgICAgICBkdHlwZTogRFRfSU5UNjQKICAgICAgICB0ZW5zb3Jfc2hhcGUgewogICAgICAgIH0KICAgICAgICBpbnQ2NF92YWw6IDIKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vYWRkXzEiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL1JlYWRWYXJpYWJsZU9wXzEiCiAgaW5wdXQ6ICJOYWRhbS9hZGRfMS95IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfSU5UNjQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vQ2FzdF80IgogIG9wOiAiQ2FzdCIKICBpbnB1dDogIk5hZGFtL2FkZF8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiRHN0VCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJTcmNUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9JTlQ2NAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIlRydW5jYXRlIgogICAgdmFsdWUgewogICAgICBiOiBmYWxzZQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9DYXN0XzUveCIKICBvcDogIkNvbnN0IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ2YWx1ZSIKICAgIHZhbHVlIHsKICAgICAgdGVuc29yIHsKICAgICAgICBkdHlwZTogRFRfRkxPQVQKICAgICAgICB0ZW5zb3Jfc2hhcGUgewogICAgICAgIH0KICAgICAgICBmbG9hdF92YWw6IDAuOTU5OTk5OTc4NTQyMzI3OQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9tdWwveCIKICBvcDogIkNvbnN0IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ2YWx1ZSIKICAgIHZhbHVlIHsKICAgICAgdGVuc29yIHsKICAgICAgICBkdHlwZTogRFRfRkxPQVQKICAgICAgICB0ZW5zb3Jfc2hhcGUgewogICAgICAgIH0KICAgICAgICBmbG9hdF92YWw6IDAuMDA0MDAwMDAwMTg5OTg5ODA1CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL211bCIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL211bC94IgogIGlucHV0OiAiTmFkYW0vQ2FzdF8zIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vUG93IgogIG9wOiAiUG93IgogIGlucHV0OiAiTmFkYW0vQ2FzdF81L3giCiAgaW5wdXQ6ICJOYWRhbS9tdWwiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9tdWxfMS94IgogIG9wOiAiQ29uc3QiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInZhbHVlIgogICAgdmFsdWUgewogICAgICB0ZW5zb3IgewogICAgICAgIGR0eXBlOiBEVF9GTE9BVAogICAgICAgIHR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ICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInZhbHVlIgogICAgdmFsdWUgewogICAgICB0ZW5zb3IgewogICAgICAgIGR0eXBlOiBEVF9GTE9BVAogICAgICAgIHRlbnNvcl9zaGFwZSB7CiAgICAgICAgfQogICAgICAgIGZsb2F0X3ZhbDogMC4wMDQwMDAwMDAxODk5ODk4MDUKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vbXVsXzMiCiAgb3A6ICJNdWwiCiAgaW5wdXQ6ICJOYWRhbS9tdWxfMy94IgogIGlucHV0OiAiTmFkYW0vQ2FzdF80IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vUG93XzEiCiAgb3A6ICJQb3ciCiAgaW5wdXQ6ICJOYWRhbS9DYXN0XzUveCIKICBpbnB1dDogIk5hZGFtL211bF8zIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmF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KICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OZWciCiAgb3A6ICJOZWciCiAgaW5wdXQ6ICJOYWRhbS9JZGVudGl0eV8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vQ29uc3QiCiAgb3A6ICJDb25zdCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidmFsdWUiCiAgICB2YWx1ZSB7CiAgICAgIHRlbnNvciB7CiAgICAgICAgZHR5cGU6IERUX0ZMT0FUCiAgICAgICAgdGVuc29yX3NoYXBlIHsKICAgICAgICB9CiAgICAgICAgZmxvYXRfdmFsOiAxLjAwMDAwMDAxMTY4NjA5NzRlLTA3CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmF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ICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidmFsdWUiCiAgICB2YWx1ZSB7CiAgICAgIHRlbnNvciB7CiAgICAgICAgZHR5cGU6IERUX0ZMT0FUCiAgICAgICAgdGVuc29yX3NoYXBlIHsKICAgICAgICB9CiAgICAgICAgZmxvYXRfdmFsOiAxLjAKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vc3ViXzMiCiAgb3A6ICJTdWIiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfMy94IgogIGlucHV0OiAiTmFkYW0vSWRlbnRpdHlfMyIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL3N1Yl80L3giCiAgb3A6ICJDb25zdCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidmFsdWUiCiAgICB2YWx1ZSB7CiAgICAgIHRlbnNvciB7CiAgICAgICAgZHR5cGU6IERUX0ZMT0FUCiAgICAgICAgdGVuc29yX3NoYXBlIHsKICAgICAgICB9CiAgICAgICAgZmxvYXRfdmFsOiAxLjAKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vc3ViXzQiCiAgb3A6ICJTdWIiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfNC94IgogIGlucHV0OiAiTmFkYW0vbXVsXzIiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9zdWJfNS94IgogIG9wOiAiQ29uc3QiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInZhbHVlIgogICAgdmFsdWUgewogICAgICB0ZW5zb3IgewogICAgICAgIGR0eXBlOiBEVF9GTE9BVAogICAgICAgIHRlbnNvcl9zaGFwZSB7CiAgICAgICAgfQogICAgICAgIGZsb2F0X3ZhbDogMS4wCiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL3N1Yl81IgogIG9wOiAiU3ViIgogIGlucHV0OiAiTmFkYW0vc3ViXzUveCIKICBpbnB1dDogIk5hZGFtL0lkZW50aXR5XzQiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9zdWJfNi94IgogIG9wOiAiQ29uc3QiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInZhbHVlIgogICAgdmFsdWUgewogICAgICB0ZW5zb3IgewogICAgICAgIGR0eXBlOiBEVF9GTE9BVAogICAgICAgIHRlbnNvcl9zaGFwZSB7CiAgICAgICAgfQogICAgICAgIGZsb2F0X3ZhbDogMS4wCiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL3N1Yl82IgogIG9wOiAiU3ViIgogIGlucHV0OiAiTmFkYW0vc3ViXzYveCIKICBpbnB1dDogIk5hZGFtL211bF83IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vUG93XzIiCiAgb3A6ICJQb3ciCiAgaW5wdXQ6ICJOYWRhbS9JZGVudGl0eV8zIgogIGlucHV0OiAiTmFkYW0vQ2FzdF8zIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vc3ViXzcveCIKICBvcDogIkNvbnN0IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgIC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2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAzMDcyCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZS9tdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgb3A6ICJQbGFjZWhvbGRlciIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX1JFU09VUkNFCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAic2hhcGUiCiAgICB2YWx1ZSB7CiAgICAgIHNoYXBlIHsKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlL211bC9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlL211bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAzMDcyCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZS9tdWwiCiAgb3A6ICJNdWwiCiAgaW5wdXQ6ICJOYWRhbS9JZGVudGl0eV8yIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlL211bC9SZWFkVmFyaWFibGVPcCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAzMDcyCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZS9tdWxfMSIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL3N1Yl8yIgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlL01hdE11bCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAzMDcyCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZS9hZGQiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZS9tdWwiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGUvbXVsXzEiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlh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bS91cGRhdGUvbXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGlucHV0OiAiXk5hZGFtL05hZGFtL3VwZGF0ZS9Bc3NpZ25WYXJpYWJsZU9wIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAzMDcyCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZS90cnVlZGl2XzEiCiAgb3A6ICJSZWFsRGl2IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlL1JlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAiTmFkYW0vc3ViXzYiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKIC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c2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMzA3MgogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGUvbXVsXzIiCiAgb3A6ICJNdWwiCiAgaW5wdXQ6ICJOYWRhbS9JZGVudGl0eV8zIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlL211bF8yL1JlYWRWYXJpYWJsZU9wIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2UvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDMwNzIKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlL1NxdWFyZSIKICBvcDogIlN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ZS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMzA3MgogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGUvYWRkXzEiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZS9tdWxfMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZS9tdWxfMyIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAzMDcyCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgb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NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMzA3MgogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGUvdHJ1ZWRpdl8yIgogIG9wOiAiUmVhbERpdiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZS9SZWFkVmFyaWFibGVPcF8xIgogIGlucHV0OiAiTmFkYW0vc3ViXzciCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMzA3MgogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGUvbXVsXzQiCiAgb3A6ICJNdWwiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfNCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZS90cnVlZGl2IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2UvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDMwNzIKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlL211bF81IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vbXVsXzUiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGUvdHJ1ZWRpdl8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAi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ICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMzA3MgogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGUvbXVsXzYiCiAgb3A6ICJNdWwiCiAgaW5wdXQ6ICJOYWRhbS9JZGVudGl0eV8xIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlL2FkZF8yIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2UvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDMwNzIKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlL1NxcnQiCiAgb3A6ICJTcXJ0IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlL3RydWVkaXZfMiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAzMDcyCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZS9hZGRfMyIKICBvcDogIkFkZFYyIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlL1NxcnQiCiAgaW5wdXQ6ICJOYWRhbS9Db25zdCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAzMDcyCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZS90cnVlZGl2XzMiCiAgb3A6ICJSZWFsRGl2IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlL211bF82IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlL2FkZF8zIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2UvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDMwNzIKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlL1JlYWRWYXJpYWJsZU9wXzIiCiAgb3A6ICJSZWFkVmFyaWFibGVPcCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2UvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDMwNzIKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlL3N1YiIKICBvcDogIlN1YiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZS9SZWFkVmFyaWFibGVPcF8yIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlL3RydWVkaXZfMyIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAzMDcyCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgIC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VQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2UvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xL211bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBvcDogIlBsYWNlaG9sZGVyIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfUkVTT1VSQ0UKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJzaGFwZSIKICAgIHZhbHVlIHsKICAgICAgc2hhcGUgewogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMS9tdWwvUmVhZFZhcmlhYmxlT3AiCiAgb3A6ICJSZWFkVmFyaWFibGVPcCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xL211bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAg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cmFkIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2UvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xL2FkZCIKICBvcDogIkFkZFYyIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEvbXVsIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEvbXVsXzEiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZS9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiA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Y2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZS9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEvdHJ1ZWRpdl8xIgogIG9wOiAiUmVhbERpdiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xL1JlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAiTmFkYW0vc3ViXzYiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZS9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEvbXVsXzIvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgb3A6ICJQbGFjZWhvbGRlciIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX1JFU09VUkNFCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAic2hhcGUiCiAgICB2YWx1ZSB7CiAgICAgIHNoYXBlIHsKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEvbXVsXzIvUmVhZFZhcmlhYmxlT3AiCiAgb3A6ICJSZWFkVmFyaWFibGVPcCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xL211bF8yL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEvbXVsXzIiCiAgb3A6ICJNdWw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ewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMS9TcXJ0IgogIG9wOiAiU3FydCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xL3RydWVkaXZfMiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlL0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMS9hZGRfMyIKICBvcDogIkFkZFYyIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEvU3FydCIKICBpbnB1dDogIk5hZGFtL0NvbnN0IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2UvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xL3RydWVkaXZfMyIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMS9tdWxfNiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xL2FkZF8zIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2UvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTog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UIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIvbXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yL211bC9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIvbXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMi9tdWwiCiAgb3A6ICJNdWwiCiAgaW5wdXQ6ICJOYWRhbS9JZGVudGl0eV8yIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIvbXVsL1JlYWRWYXJpYWJsZU9wIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yL211bF8xIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vc3ViXzIiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMS9NYXRNdWxfMSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzEvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMi9hZGQiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yL211bCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yL211bF8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZ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aWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzEvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMi9tdWxfMi9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBvcDogIlBsYWNlaG9sZGVyIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfUkVTT1VSQ0UKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJzaGFwZSIKICAgIHZhbHVlIHsKICAgICAgc2hhcGUgewogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMi9tdWxfMi9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIg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Y2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIvYWRkXzEiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yL211bF8yIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIvbXVsXzMiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewog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wZGF0ZV8yL0Fzc2lnblZhcmlhYmxlT3BfMSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIvdHJ1ZWRpdl8yIgogIG9wOiAiUmVhbERpdiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yL1JlYWRWYXJpYWJsZU9wXzEiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfNyIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzEvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMi9tdWxfNCIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL3N1Yl80IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIvdHJ1ZWRpdiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzEvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdG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YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yL211bF82IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vSWRlbnRpdHlfMSIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yL2FkZF8yIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICB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ICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIvdHJ1ZWRpdl8zIgogIG9wOiAiUmVhbERpdiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yL211bF82IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIvYWRkXzMiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIvUmVhZFZhcmlhYmxlT3BfMiIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIvc3ViIgogIG9wOiAiU3ViIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIvUmVhZFZhcmlhYmxlT3BfMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yL3RydWVkaXZfMyIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1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AgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8zL3RydWVkaXYiCiAgb3A6ICJSZWFsRGl2IgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzEvQmlhc0FkZC9CaWFzQWRkR3JhZCIKICBpbnB1dDogIk5hZGFtL3N1Yl81IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMS9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMvbXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8zL211bC9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMvbXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMvbXVsIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vSWRlbnRpdHlfMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zL211bC9SZWFkVmFyaWFibGVPcCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzEvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUg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ljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzEvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8zL211bF8yL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8zL211bF8yL1JlYWRWYXJpYWJsZU9wIgogIG9wOiAiUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMy9tdWxfMi9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8zL211bF8yIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vSWRlbnRpdHlfMyIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zL211bF8yL1JlYWRWYXJpYWJsZU9wIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMS9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMvU3F1YXJlIgogIG9wOiAiU3F1YXJlIgogIGlucHV0OiAiZ3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gICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMy9hZGRfMiIKICBvcDogIkFkZFYyIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMvbXVsXzQiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMy9tdWxfNSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzEvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8zL211bF82IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vSWRlbnRpdHlfMSIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zL2FkZF8yIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMS9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMvU3FydCIKICBvcDogIlNxcnQiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMy90cnVlZGl2XzIiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xL0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9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0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8yL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQvbXVsXzEiCiAgb3A6ICJNdWwiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfMiIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8yL01hdE11bF8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMi9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV80L2FkZCIKICBvcDogIkFkZFYyIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQvbXVsIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQvbXVsXzEiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8yL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQvQXNzaWduVmFyaWFibGVPcCIKICBvcDogIkFzc2lnblZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNC9tdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGV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iAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV80L3RydWVkaXZfMSIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNC9SZWFkVmFyaWFibGVPcCIKICBpbnB1dDogIk5hZGFtL3N1Yl82IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMi9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV80L211bF8yL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV80L211bF8yL1JlYWRWYXJpYWJsZU9wIgogIG9wOiAiUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNC9tdWxfMi9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQvbXVsXzIiCiAgb3A6ICJNdWwiCiAgaW5wdXQ6ICJOYWRhbS9JZGVudGl0eV8zIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQvbXVsXzIvUmVhZFZhcmlhYmxlT3AiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8yL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQvU3F1YXJlIgogIG9wOiAiU3F1YXJlIgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzIvTWF0TXVsXzEiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8yL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQvbXVsXzMiCiAgb3A6ICJNdWwiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfMyIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV80L1NxdWFyZSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzIvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfNC9hZGRfMSIKICBvcDogIkFkZFYyIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQvbXVsXzIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNC9tdWxfM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ZW5zZV8yL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQvUmVhZFZhcmlhYmxlT3BfMSIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQvbXVsXzIvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgaW5wdXQ6ICJeTmFkYW0vTmFkYW0vdXBkYXRlXzQvQXNzaWduVmFyaWFibGVPcF8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzIvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfNC90cnVlZGl2XzIiCiAgb3A6ICJSZWF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gIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMi9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV80L211bF81IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vbXVsXzUiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNC90cnVlZGl2XzEiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8yL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgf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BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8yL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQvU3FydCIKICBvcDogIlNxcnQiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNC90cnVlZGl2XzIiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8yL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQvYWRkXzMiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV80L1NxcnQiCiAgaW5wdXQ6ICJOYWRhbS9Db25zdCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzIvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfNC90cnVlZGl2XzMiCiAgb3A6ICJSZWFsRGl2IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQvbXVsXzYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNC9hZGRfMyIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzIvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfNC9SZWFkVmFyaWFibGVPcF8yIgogIG9wOiAiUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzIvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfNC9zdWIiCiAgb3A6ICJTd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iAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfNS9hZGQiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV81L211bCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV81L211bF8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMi9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzUvQXNzaWduVmFyaWFibGVPcCIKICBvcDogIkFzc2lnblZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNS9tdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNS9hZGQiCiAgaW5wdXQ6ICJeTmFkYW0vTmFkYW0vdXBkYXRlXzUvbXVsL1JlYWRWYXJpYWJsZU9wIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzIvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzUvUmVhZFZhcmlhYmxlT3AiCiAgb3A6ICJSZWFkVmFyaWFibGVPcCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV81L211bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBpbnB1dDogIl5OYWRhbS9OYWRhbS91cGRhdGVfNS9Bc3NpZ25WYXJpYWJsZU9wIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzIvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICA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vdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV81L211bF80IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vc3ViXzQiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNS90cnVlZGl2IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMi9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzUvbXVsXzUiCiAgb3A6ICJNdWwiCiAgaW5wdXQ6ICJOYWRhbS9tdWxfNSIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV81L3RydWVkaXZfMSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzIvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV81L2FkZF8yIgogIG9wOiAiQWRkVjIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNS9tdWxfNCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV81L211bF81IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMi9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAg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R5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzIvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV81L2FkZF8zIgogIG9wOiAiQWRkVjIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNS9TcXJ0IgogIGlucHV0OiAiTmFkYW0vQ29uc3QiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8yL0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfNS90cnVlZGl2XzMiCiAgb3A6ICJSZWFsRGl2IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzUvbXVsXzYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNS9hZGRfMyIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzIvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV81L1JlYWRWYXJpYWJsZU9wXzIiCiAgb3A6ICJSZWFkVmFyaWFibGVPcCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMi9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgf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AgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV82L211bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBvcDogIlBsYWNlaG9sZGVyIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfUkVTT1VSQ0UKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJzaGFwZSIKICAgIHZhbHVlIHsKICAgICAgc2hhcGUgewogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfNi9tdWwvUmVhZFZhcmlhYmxlT3AiCiAgb3A6ICJSZWFkVmFyaWFibGVPcCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV82L211bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0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BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8zL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzYvYWRkIgogIG9wOiAiQWRkVjIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNi9tdWwiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNi9tdWxfMSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzMvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMA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owL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8zL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzYvdHJ1ZWRpdl8xIgogIG9wOiAiUmVhbERpdiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV82L1JlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAiTmFkYW0vc3ViXzYiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8zL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzYvbXVsXzIvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgb3A6ICJQbGFjZWhvbGRlciIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX1JFU09VUkNFCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAic2hhcGUiCiAgICB2YWx1ZSB7CiAgICAgIHNoYXBlIHsKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzYvbXVsXzIvUmVhZFZhcmlhYmxlT3AiCiAgb3A6ICJSZWFkVmFyaWFibGVPcCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV82L211bF8yL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR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lQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzMvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfNi9tdWxfMyIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL3N1Yl8zIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzYvU3F1YXJlIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMy9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV82L2FkZF8xIgogIG9wOiAiQWRkVjIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNi9tdWxfMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV82L211bF8zIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMy9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV82L0Fzc2lnblZhcmlhYmxlT3BfMSIKICBvcDogIkFzc2lnblZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNi9tdWxfMi9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HsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV82L3RydWVkaXZfMiIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNi9SZWFkVmFyaWFibGVPcF8xIgogIGlucHV0OiAiTmFkYW0vc3ViXzciCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8zL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzYvbXVsXzQiCiAgb3A6ICJNdWwiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfNCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV82L3RydWVkaXYiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8zL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzYvbXVsXzUiCiAgb3A6ICJNdWwiCiAgaW5wdXQ6ICJOYWRhbS9tdWxfNSIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV82L3RydWVkaXZfMSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzMvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfNi9hZGRfMiIKICBvcDogIkFkZFYyIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzYvbXVsXzQiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNi9tdWxfNSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzMvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfNi9tdWxfNiIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL0lkZW50aXR5XzEiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNi9hZGRfMiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzMvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfNi9TcXJ0IgogIG9wOiAiU3FydCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV82L3RydWVkaXZfMiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzMvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfNi9hZGRfMyIKICBvcDogIkFkZFYyIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzYvU3FydCIKICBpbnB1dDogIk5hZGFtL0NvbnN0IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMy9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgIC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BlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV82L3N1YiIKICBvcDogIlN1YiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV82L1JlYWRWYXJpYWJsZU9wXzIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNi90cnVlZGl2XzMiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8zL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICB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ewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzMvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV83L211bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBvcDogIlBsYWNlaG9sZGVyIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfUkVTT1VSQ0UKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJzaGFwZSIKICAgIHZhbHVlIHsKICAgICAgc2hhcGUgewogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfNy9tdWwvUmVhZFZhcmlhYmxlT3AiCiAgb3A6ICJSZWFkVmFyaWFibGVPcCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV83L211bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogIC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VfNy9tdWxfMiIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL0lkZW50aXR5XzMiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNy9tdWxfMi9SZWFkVmFyaWFibGVPcCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzMvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV83L1NxdWFyZSIKICBvcDogIlNxdWFyZSIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8zL0JpYXNBZGQvQmlhc0FkZEdyYWQiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8zL0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfNy9tdWxfMyIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL3N1Yl8zIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzcvU3F1YXJlIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMy9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzcvYWRkXzEiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV83L211bF8y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gIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfNy9tdWxfNSIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL211bF81IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzcvdHJ1ZWRpdl8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMy9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzcvYWRkXzIiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV83L211bF80IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzcvbXVsXzUiCiAgZGV2aW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UX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzMvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV83L3RydWVkaXZfMyIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNy9tdWxfNiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV83L2FkZF8zIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMy9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICA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c3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV80L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzgvbXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV84L211bC9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAi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9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV84L211bF8xIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vc3ViXzIiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfNC9NYXRNdWxfMSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzQvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfOC9hZGQiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV84L211bCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV84L211bF8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2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0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzgvUmVhZFZhcmlhYmxlT3AiCiAgb3A6ICJSZWFkVmFyaWFibGVPcCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV84L211bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBpbnB1dDogIl5OYWRhbS9OYWRhbS91cGRhdGVfOC9Bc3NpZ25WYXJpYWJsZU9wIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzQvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfOC90cnVlZGl2XzEiCiAgb3A6ICJSZWFsRGl2IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzgvUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfNiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzQvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfOC9tdWxfMi9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBvcDogIlBsYWNlaG9sZGVyIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfUkVTT1VSQ0UKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJzaGFwZSIKICAgIHZhbHVlIHsKICAgICAgc2hhcGUgewogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGV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lzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV84L1NxdWFyZSIKICBvcDogIlNxdWFyZSIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV80L01hdE11bF8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfNC9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV84L211bF8zIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vc3ViXzMiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfOC9TcXVhcmUiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV80L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzgvYWRkXzEiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV84L211bF8yIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzgvbXVsXzMiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV80L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhd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JsZU9wL3Jlc291cmNlIgogIGlucHV0OiAiXk5hZGFtL05hZGFtL3VwZGF0ZV84L0Fzc2lnblZhcmlhYmxlT3BfMSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV80L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzgvdHJ1ZWRpdl8yIgogIG9wOiAiUmVhbERpdiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV84L1JlYWRWYXJpYWJsZU9wXzEiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfNyIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzQvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfOC9tdWxfNCIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL3N1Yl80IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzgvdHJ1ZWRpdiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzQvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQ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R0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV80L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzgvdHJ1ZWRpdl8zIgogIG9wOiAiUmVhbERpdiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV84L211bF82IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzgvYWRkXzMiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV80L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzgvUmVhZFZhcmlhYmxlT3BfMiIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV80L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzgvc3ViIgogIG9wOiAiU3ViIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzgvUmVhZFZhcmlhYmxlT3BfMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV84L3RydWVkaXZfMyIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgIC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H0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV85L211bC9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzkvbXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzkvbXVsIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vSWRlbnRpdHlfMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV85L211bC9SZWFkVmFyaWFibGVPcCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzQvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9v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yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzQvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV85L211bF8yL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV85L211bF8yL1JlYWRWYXJpYWJsZU9wIgogIG9wOiAiUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfOS9tdWxfMi9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV85L211bF8yIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vSWRlbnRpdHlfMyIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV85L211bF8yL1JlYWRWYXJpYWJsZU9wIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfNC9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzkvU3F1YXJlIgogIG9wOiAiU3F1Y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2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzQvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV85L211bF81IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vbXVsXzUiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfOS90cnVlZGl2XzEiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV80L0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfOS9hZGRfMiIKICBvcDogIkFkZFYyIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzkvbXVsXzQiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfOS9tdWxfNSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzQvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV85L211bF82IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vSWRlbnRpdHlfMSIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV85L2FkZF8yIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfNC9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzkvU3FydCIKICBvcDogIlNxcnQiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfOS90cnVlZGl2XzIiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV80L0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9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ICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xMC90cnVlZGl2IgogIG9wOiAiUmVhbERpdiIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV81L01hdE11bF8xIgogIGlucHV0OiAiTmFkYW0vc3ViXzUiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV81L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEwL211bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBvcDogIlBsYWNlaG9sZGVyIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgI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HRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV81L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEwL211bF8xIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vc3ViXzIiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfNS9NYXRNdWxfMSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzUvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICA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AKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEwL3RydWVkaXZfMSIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTAvUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfNiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzUvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTAvbXVsXzIvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgb3A6ICJQbGFjZWhvbGRlciIKICB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owL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV81L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEwL1NxdWFyZSIKICBvcDogIlNxdWFyZSIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV81L01hdE11bF8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfNS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xMC9tdWxfMyIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL3N1Yl8zIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEwL1NxdWFyZSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzUvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTAvYWRkXzEiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xMC9tdWxfMiIKICBpbnB1dDogIk5hZGFtL05hZ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IGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV81L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEwL211bF81IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vbXVsXzUiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTAvdHJ1ZWRpdl8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfNS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICA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BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV81L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEwL1NxcnQiCiAgb3A6ICJTcXJ0IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEwL3RydWVkaXZfMiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzUvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTAvYWRkXzMiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xMC9TcXJ0IgogIGlucHV0OiAiTmFkYW0vQ29uc3QiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV81L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEwL3RydWVkaXZfMyIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTAvbXVsXzYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTAvYWRkXzMiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV81L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEwL1JlYWRWYXJpYWJsZU9wXzIiCiAgb3A6ICJSZWFkVmFyaWFibGVPcCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfNS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAg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b3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTEvdHJ1ZWRpdl8xIgogIG9wOiAiUmVhbERpdiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xMS9SZWFkVmFyaWFibGVPcCIKICBpbnB1dDogIk5hZGFtL3N1Yl82IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfNS9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzExL211bF8yL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xMS9tdWxfMi9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzExL211bF8yL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzExL211bF8yIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vSWRlbnRpdHlfMyIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xMS9tdWxfMi9SZWFkVmFyaWFibGVPcCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzUvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xMS9TcXVhcmUiCiAgb3A6ICJTcXVhcmUiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfNS9CaWFzQWRkL0JpYXNBZGRHcmFkIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfNS9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgf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ZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfNS9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzExL211bF80IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vc3ViXzQiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTEvdHJ1ZWRpdiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzUvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xMS9tdWxfNSIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL211bF81IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzExL3RydWVkaXZfMSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzUvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xMS9hZGRfMiIKICBvcDogIkFkZFYyIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzExL211bF80IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzExL211bF81IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfNS9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzExL211bF82IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vSWRlbnRpdHlfMSIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xMS9hZGRfMiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzUvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xMS9TcXJ0IgogIG9wOiAiU3FydCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xMS90cnVlZGl2XzIiCiAgZGV2a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11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEyL211bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBvcDogIlBsYWNlaG9sZGVyIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfUkVTT1VSQ0UKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJzaGFwZSIKICAgIHZhbHVlIHsKICAgICAgc2hhcGUgewogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTIvbXVsL1JlYWRWYXJpYWJsZU9wIgogIG9wOiAiUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTIvbXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTIvbXVsIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vSWRlbnRpdHlfMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xMi9tdWwvUmVhZFZhcmlhYmxlT3AiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV82L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEyL211bF8xIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vc3ViXzIiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfNi9NYXRNdWxfMSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzYvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTIvYWRkIgogIG9wOiAiQWRkVjIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTIvbXVsIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEyL211bF8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfNi9NYXRNdWwvUmVhZFZh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gogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEyL211bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBpbnB1dDogIl5OYWRhbS9OYWRhbS91cGRhdGVfMTIvQXNzaWduVmFyaWFibGVPcCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV82L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEyL3RydWVkaXZfMSIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTIvUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfNiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzYvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTIvbXVsXzIvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgb3A6ICJQbGFjZWhvbGRlciIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX1JFU09VUkNFCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAic2hhcGUiCiAgICB2YWx1ZSB7CiAgICAgIHNoYXBlIHsKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEyL211bF8yL1JlYWRWYXJpYWJsZU9wIgogIG9wOiAiUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTIvbXVsXzIvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xMi9tdWxfMiIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL0lkZW50aXR5XzMiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTIvbXVsXzIvUmVhZFZhcmlhYmxlT3AiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV82L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkY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gICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzYvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTIvYWRkXzEiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xMi9tdWxfMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xMi9tdWxfMyIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzYvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTog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KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV82L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEyL3RydWVkaXZfMiIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTIvUmVhZFZhcmlhYmxlT3BfMSIKICBpbnB1dDogIk5hZGFtL3N1Yl83IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfNi9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xMi9tdWxfNCIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL3N1Yl80IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEyL3RydWVkaXYiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV82L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEyL211bF81IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vbXVsXzUiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTIvdHJ1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vcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xMi9tdWxfNiIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL0lkZW50aXR5XzEiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTIvYWRkXzIiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV82L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEyL1NxcnQiCiAgb3A6ICJTcXJ0IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEyL3RydWVkaXZfMiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzYvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTIvYWRkXzMiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xMi9TcXJ0IgogIGlucHV0OiAiTmFkYW0vQ29uc3QiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV82L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEyL3RydWVkaXZfMyIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTIvbXVsXzYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTIvYWRkXzMiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV82L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgf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VlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfNi9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEzL211bF8yL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xMy9tdWxfMi9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEzL211bF8yL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEzL211bF8yIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vSWRlbnRpdHlfMyIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xMy9tdWxfMi9SZWFkVmFyaWFibGVPcCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzYvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xMy9TcXVhcmUiCiAgb3A6ICJTcXVhcmUiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfNi9CaWFzQWRkL0JpYXNBZGRHcmFkIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfNi9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEzL211bF8zIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vc3ViXzMiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTMvU3F1YXJlIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfNi9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZ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XBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEzL3RydWVkaXZfMiIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTMvUmVhZFZhcmlhYmxlT3BfMSIKICBpbnB1dDogIk5hZGFtL3N1Yl83IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfNi9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEzL211bF80IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vc3ViXzQiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTMvdHJ1ZWRpdiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzYvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xMy9tdWxfNSIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL211bF81IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEzL3RydWVkaXZfMSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzYvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xMy9hZGRfMiIKICBvcDogIkFkZFYyIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEzL211bF80IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEzL211bF81IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfNi9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzEzL211bF82IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vSWRlbnRpdHlfMSIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xMy9hZGRfMiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzYvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xMy9TcXJ0IgogIG9wOiAiU3FydCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xMy90cnVlZGl2XzIiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV82L0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG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gYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xNC90cnVlZGl2IgogIG9wOiAiUmVhbERpdiIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV83L01hdE11bF8xIgogIGlucHV0OiAiTmFkYW0vc3ViXzUiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV83L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE0L211bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBvcDogIlBsYWNlaG9sZGVyIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgIH0KICAg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KICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV83L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE0L211bF8xIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vc3ViXzIiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfNy9NYXRNdWxfMSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzcvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIH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AgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE0L3RydWVkaXZfMSIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTQvUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfNiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzcvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTQvbXVsXzIvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgb3A6ICJQbGFjZWhvbGRlciIKICBhdHRyI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c2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV83L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE0L1NxdWFyZSIKICBvcDogIlNxdWFyZSIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV83L01hdE11bF8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfNy9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xNC9tdWxfMyIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL3N1Yl8zIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE0L1NxdWFyZSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzcvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTQvYWRkXzEiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xNC9tdWxfMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3V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Il9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV83L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE0L211bF81IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vbXVsXzUiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTQvdHJ1ZWRpdl8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfNy9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICA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CiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV83L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE0L1NxcnQiCiAgb3A6ICJTcXJ0IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE0L3RydWVkaXZfMiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzcvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTQvYWRkXzMiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xNC9TcXJ0IgogIGlucHV0OiAiTmFkYW0vQ29uc3QiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV83L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE0L3RydWVkaXZfMyIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTQvbXVsXzYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTQvYWRkXzMiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV83L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE0L1JlYWRWYXJpYWJsZU9wXzIiCiAgb3A6ICJSZWFkVmFyaWFibGVPcCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfNy9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB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3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTUvdHJ1ZWRpdl8xIgogIG9wOiAiUmVhbERpdiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xNS9SZWFkVmFyaWFibGVPcCIKICBpbnB1dDogIk5hZGFtL3N1Yl82IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfNy9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE1L211bF8yL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xNS9tdWxfMi9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE1L211bF8yL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE1L211bF8yIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vSWRlbnRpdHlfMyIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xNS9tdWxfMi9SZWFkVmFyaWFibGVPcCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzcvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xNS9TcXVhcmUiCiAgb3A6ICJTcXVhcmUiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfNy9CaWFzQWRkL0JpYXNBZGRHcmFkIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfNy9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICA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iAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfNy9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE1L211bF80IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vc3ViXzQiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTUvdHJ1ZWRpdiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzcvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xNS9tdWxfNSIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL211bF81IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE1L3RydWVkaXZfMSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzcvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xNS9hZGRfMiIKICBvcDogIkFkZFYyIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE1L211bF80IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE1L211bF81IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfNy9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE1L211bF82IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vSWRlbnRpdHlfMSIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xNS9hZGRfMiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzcvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xNS9TcXJ0IgogIG9wOiAiU3FydCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xNS90cnVlZGl2Xz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ZW5zZV84L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE2L211bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBvcDogIlBsYWNlaG9sZGVyIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfUkVTT1VSQ0UKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJzaGFwZSIKICAgIHZhbHVlIHsKICAgICAgc2hhcGUgewogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTYvbXVsL1JlYWRWYXJpYWJsZU9wIgogIG9wOiAiUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTYvbXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTYvbXVsIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vSWRlbnRpdHlfMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xNi9tdWwvUmVhZFZhcmlhYmxlT3AiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV84L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE2L211bF8xIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vc3ViXzIiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfOC9NYXRNdWxfMSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzgvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTYvYWRkIgogIG9wOiAiQWRkVjIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTYvbXVsIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE2L211bF8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfOC9NYXRN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XJpYWJsZU9wIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE2L211bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBpbnB1dDogIl5OYWRhbS9OYWRhbS91cGRhdGVfMTYvQXNzaWduVmFyaWFibGVPcCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV84L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE2L3RydWVkaXZfMSIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTYvUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfNiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzgvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTYvbXVsXzIvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgb3A6ICJQbGFjZWhvbGRlciIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX1JFU09VUkNFCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAic2hhcGUiCiAgICB2YWx1ZSB7CiAgICAgIHNoYXBlIHsKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE2L211bF8yL1JlYWRWYXJpYWJsZU9wIgogIG9wOiAiUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTYvbXVsXzIvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xNi9tdWxfMiIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL0lkZW50aXR5XzMiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTYvbXVsXzIvUmVhZFZhcmlhYmxlT3AiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV84L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuY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dmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzgvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTYvYWRkXzEiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xNi9tdWxfMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xNi9tdWxfMyIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzgvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICA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ljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV84L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE2L3RydWVkaXZfMiIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTYvUmVhZFZhcmlhYmxlT3BfMSIKICBpbnB1dDogIk5hZGFtL3N1Yl83IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfOC9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xNi9tdWxfNCIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL3N1Yl80IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE2L3RydWVkaXYiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV84L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE2L211bF81IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vbXVsXzUiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhd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hcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xNi9tdWxfNiIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL0lkZW50aXR5XzEiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTYvYWRkXzIiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV84L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE2L1NxcnQiCiAgb3A6ICJTcXJ0IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE2L3RydWVkaXZfMiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzgvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTYvYWRkXzMiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xNi9TcXJ0IgogIGlucHV0OiAiTmFkYW0vQ29uc3QiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV84L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE2L3RydWVkaXZfMyIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTYvbXVsXzYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTYvYWRkXzMiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV84L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KIC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mFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfOC9CaWFzQWRkL0JpYXNBZGRHcmFkIgogIGlucHV0OiAiTmFkYW0vc3ViXzUiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV84L0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTcvbXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5h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CIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfOC9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE3L211bF8yL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xNy9tdWxfMi9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE3L211bF8yL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE3L211bF8yIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vSWRlbnRpdHlfMyIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xNy9tdWxfMi9SZWFkVmFyaWFibGVPcCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzgvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xNy9TcXVhcmUiCiAgb3A6ICJTcXVhcmUiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfOC9CaWFzQWRkL0JpYXNBZGRHcmFkIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfOC9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE3L211bF8zIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vc3ViXzMiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTcvU3F1YXJlIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfOC9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291d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ogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE3L3RydWVkaXZfMiIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTcvUmVhZFZhcmlhYmxlT3BfMSIKICBpbnB1dDogIk5hZGFtL3N1Yl83IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfOC9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE3L211bF80IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vc3ViXzQiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTcvdHJ1ZWRpdiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzgvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xNy9tdWxfNSIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL211bF81IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE3L3RydWVkaXZfMSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzgvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xNy9hZGRfMiIKICBvcDogIkFkZFYyIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE3L211bF80IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE3L211bF81IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfOC9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE3L211bF82IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vSWRlbnRpdHlfMSIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xNy9hZGRfMiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzgvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xNy9TcXJ0IgogIG9wOiAiU3FydCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xNy90cnVlZGl2XzIiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV84L0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9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AgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xOC90cnVlZGl2IgogIG9wOiAiUmVhbERpdiIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV85L01hdE11bF8xIgogIGlucHV0OiAiTmFkYW0vc3ViXzUiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV85L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE4L211bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBvcDogIlBsYWNlaG9sZGVyIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9Ci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0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV85L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE4L211bF8xIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vc3ViXzIiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfOS9NYXRNdWxfMSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzkvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICA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OiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE4L3RydWVkaXZfMSIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTgvUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfNiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzkvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTgvbXVsXzIvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgb3A6ICJQbGFjZWhvbGR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wbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV85L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE4L1NxdWFyZSIKICBvcDogIlNxdWFyZSIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV85L01hdE11bF8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfOS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xOC9tdWxfMyIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL3N1Yl8zIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE4L1NxdWFyZSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzkvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTgvYWRkXzEiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xOC9tdWxfMiIKICBpbnB1dDogIk5hZG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3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfOS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xOC9SZWFkVmFyaWFibGVPcF8xIgogIG9wOiAiUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTgvbXVsXzIvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgaW5wdXQ6ICJeTmFkYW0vTmFkYW0vdXBkYXRlXzE4L0Fzc2lnblZhcmlhYmxlT3BfMSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV85L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFk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HsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV85L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE4L211bF81IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vbXVsXzUiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTgvdHJ1ZWRpdl8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfOS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW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Y2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV85L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE4L1NxcnQiCiAgb3A6ICJTcXJ0IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE4L3RydWVkaXZfMiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzkvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTgvYWRkXzMiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xOC9TcXJ0IgogIGlucHV0OiAiTmFkYW0vQ29uc3QiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV85L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE4L3RydWVkaXZfMyIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTgvbXVsXzYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTgvYWRkXzMiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV85L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE4L1JlYWRWYXJpYWJsZU9wXzIiCiAgb3A6ICJSZWFkVmFyaWFibGVPcCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfOS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQ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GUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTkvbXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xOS9tdWwvUmVhZFZhcmlhYmxlT3AiCiAgb3A6ICJSZWFkVmFyaWFibGVPcCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xOS9tdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTkvbXVsIgogIG9wOiAiTXVsIgogIGlucH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ICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTkvdHJ1ZWRpdl8xIgogIG9wOiAiUmVhbERpdiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xOS9SZWFkVmFyaWFibGVPcCIKICBpbnB1dDogIk5hZGFtL3N1Yl82IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfOS9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE5L211bF8yL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xOS9tdWxfMi9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE5L211bF8yL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE5L211bF8yIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vSWRlbnRpdHlfMyIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xOS9tdWxfMi9SZWFkVmFyaWFibGVPcCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzkvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xOS9TcXVhcmUiCiAgb3A6ICJTcXVhcmUiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfOS9CaWFzQWRkL0JpYXNBZGRHcmFkIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfOS9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0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iAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfOS9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE5L211bF80IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vc3ViXzQiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMTkvdHJ1ZWRpdiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzkvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xOS9tdWxfNSIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL211bF81IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE5L3RydWVkaXZfMSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzkvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xOS9hZGRfMiIKICBvcDogIkFkZFYyIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE5L211bF80IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE5L211bF81IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfOS9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzE5L211bF82IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vSWRlbnRpdHlfMSIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xOS9hZGRfMiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzkvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8xOS9TcXJ0IgogIG9wOiAiU3FydCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8xO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HNlcXVlbnRpYWwvZGVuc2VfMTAvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjAvbXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yMC9tdWwvUmVhZFZhcmlhYmxlT3AiCiAgb3A6ICJSZWFkVmFyaWFibGVPcCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yMC9tdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yMC9tdWwiCiAgb3A6ICJNdWwiCiAgaW5wdXQ6ICJOYWRhbS9JZGVudGl0eV8yIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIwL211bC9SZWFkVmFyaWFibGVPcCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzEwL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIwL211bF8xIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vc3ViXzIi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ewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTAvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjAvbXVsXzIvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgb3A6ICJQbGFjZWhvbGRlciIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX1JFU09VUkNFCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAic2hhcGUiCiAgICB2YWx1ZSB7CiAgICAgIHNoYXBlIHsKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIwL211bF8yL1JlYWRWYXJpYWJsZU9wIgogIG9wOiAiUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdG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yIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzEwL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIwL2FkZF8xIgogIG9wOiAiQWRkVjIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjAvbXVsXzIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjAvbXVsXzMiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xMC9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVl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OkBzZXF1ZW50aWFsL2RlbnNlXzEwL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIwL211bF80IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vc3ViXzQiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjAvdHJ1ZWRpdiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzEwL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsK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iAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzEwL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIwL211bF82IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vSWRlbnRpdHlfMSIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yMC9hZGRfMiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzEwL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIwL1NxcnQiCiAgb3A6ICJTcXJ0IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIwL3RydWVkaXZfMiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzEwL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIwL2FkZF8zIgogIG9wOiAiQWRkVjIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjAvU3FydCIKICBpbnB1dDogIk5hZGFtL0NvbnN0IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTAvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjAvdHJ1ZWRpdl8zIgogIG9wOiAiUmVhbERpdiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yMC9tdWxfNiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yMC9hZGRfMyIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzEwL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIwL1JlYWRWYXJpYWJsZU9wXzIiCiAgb3A6ICJSZWFkVmFyaWFibGVPcCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMTAvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjAvc3ViIgogIG9wOiAiU3ViIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIwL1JlYWRWYXJpYWJsZU9wXzIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjAvdHJ1ZWRpdl8zIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICA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RyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yMS9tdWxfMSIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL3N1Yl8yIgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzEwL0JpYXNBZGQvQmlhc0FkZEdyYWQiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xMC9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIxL2FkZCIKICBvcDogIkFkZFYyIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIxL211bCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yMS9tdWxfMSIK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AgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xMC9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIxL2FkZF8xIgogIG9wOiAiQWRkVjIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjEvbXVsXzIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjEvbXVsXzMiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xMC9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIxL0Fzc2lnblZhcmlhYmxl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WYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIxL3RydWVkaXZfMiIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjEvUmVhZFZhcmlhYmxlT3BfMSIKICBpbnB1dDogIk5hZGFtL3N1Yl83IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTAvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yM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kZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yMS9hZGRfMiIKICBvcDogIkFkZFYyIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIxL211bF80IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIxL211bF81IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTAvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yMS9tdWxfNiIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL0lkZW50aXR5XzEiCiAgaW5wdXQ6ICJOYW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Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xMC9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIxL1JlYWRWYXJpYWJsZU9wXzIiCiAgb3A6ICJSZWFkVmFyaWFibGVPcCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMTAvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yMS9zdWIiCiAgb3A6ICJTdWIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjEvUmVhZFZhcmlhY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tleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xMC9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjIvdHJ1ZWRpdiIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMTEvTWF0TXVsXzEiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfNSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzExL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIyL211bC9SZWFkV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NlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjIvYWRkIgogIG9wOiAiQWRkVjIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjIvbXVsIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIyL211bF8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTEvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdG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AgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIyL3RydWVkaXZfMSIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjIvUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfNiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzExL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIyL211bF8yL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yMi9tdWxfMi9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIyL211bF8yL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjIvbXVsXzIiCiAgb3A6ICJNdWwiCiAgaW5wdXQ6ICJOYWRhbS9JZGVudGl0eV8zIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIyL211bF8yL1JlYWRWYXJpYWJsZU9wIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTEvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjIvU3F1YXJlIgogIG9wOiAiU3F1YXJlIgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzExL01hdE11bF8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTEvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjIvbXVsXzMiCiAgb3A6ICJNdWwiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfMyIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yMi9TcXVhcmUiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xMS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0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iCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xMS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yMi9tdWxfNSIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL211bF81IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIyL3RydWVkaXZfMSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzExL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIyL2FkZF8yIgogIG9wOiAiQWRkVjIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjIvbXVsXzQiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjIvbXVsXzUiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xMS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yMi9tdW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Ac2VxdWVudGlhbC9kZW5zZV8xMS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yMi9hZGRfMyIKICBvcDogIkFkZFYyIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIyL1NxcnQiCiAgaW5wdXQ6ICJOYWRhbS9Db25zdCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzExL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0Kf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AgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIyL3N1YiIKICBvcDogIlN1YiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yMi9SZWFkVmFyaWFibGVPcF8yIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIyL3RydWVkaXZfMyIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzExL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIyL0Fzc2lnblZhcmlhYmxlT3BfMiIKICBvcDogI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IGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTEvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yMy9tdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgb3A6ICJQbGFjZWhvbGRlciIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX1JFU09VUkNFCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAic2hhcGUiCiAgICB2YWx1ZSB7CiAgICAgIHNoYXBlIHsKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIzL211bC9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIzL211bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgIC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3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIzL211bF8yL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yMy9tdWxfMi9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIzL211bF8yL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIzL211bF8yIgogIG9wOiAiTXVsIg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S9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIzL211bF8zIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vc3ViXzMiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjMvU3F1YXJlIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTEvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yMy9hZGRfMSIKICBvcDogIkFkZFYyIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIzL211bF8yIgogIGlucHV0O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ZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yMy9tdWxfNSIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL211bF81IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIzL3RydWVkaXZfMSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzExL0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjMvYWRkXzIiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yMy9tdWxfNCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yMy9td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hcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yMy9TcXJ0IgogIG9wOiAiU3FydCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yMy90cnVlZGl2XzIiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xMS9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIzL2FkZF8zIgogIG9wOiAiQWRkVjIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjMvU3FydCIKICBpbnB1dDogIk5hZGFtL0NvbnN0IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTEvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yMy90cnVlZGl2XzMiCiAgb3A6ICJSZWFsRGl2IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIzL211bF82IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzIzL2FkZF8zIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTEvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMD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ogIGlucHV0OiAiTmFkYW0vc3ViXzUiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xMi9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yNC9tdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgb3A6ICJQbGFjZWhvbGRlciIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX1JFU09VUkNFCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAic2hhcGUiCiAgICB2YWx1ZSB7CiAgICAgIHNoYXBlIHsKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI0L211bC9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI0L211bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI0L211bCIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL0lkZW50aXR5XzIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjQvbXVsL1JlYWRWYXJpYWJsZU9wIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTIvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjQvbXVsXzEiCiAgb3A6ICJNdWwiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfMiIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8xMi9NYXRNdWxfMSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzEyL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI0L2FkZCIKICBvcDogIkFkZFYyIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI0L211bCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yNC9tdWxfMSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzEyL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI0L0Fzc2lnblZhcmlhYmxlT3AiCiAgb3A6ICJBc3NpZ25WYXJpYWJsZU9wIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI0L211bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yNC9hZGQiCiAgaW5wdXQ6ICJeTmFkYW0vTmFkYW0vdXBkYXRlXzI0L211bC9SZWFkVmFyaWFibGVPcCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV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wZSIKICAgIHZhbHVlIHsKICAgICAgc2hhcGUgewogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjQvbXVsXzIvUmVhZFZhcmlhYmxlT3AiCiAgb3A6ICJSZWFkVmFyaWFibGVPcCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yNC9tdWxfMi9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI0L211bF8yIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vSWRlbnRpdHlfMyIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yNC9tdWxfMi9SZWFkVmFyaWFibGVPcCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzEyL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI0L1NxdWFyZSIKICBvcDogIlNxdWFyZSIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8xMi9NYXRNdWxfMSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzEyL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI0L211bF8zIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vc3ViXzMiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjQvU3F1YXJlIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTIvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjQvYWRkXzEiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yNC9tdWxfMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yNC9tdWxfMyIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzEyL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI0L0Fzc2lnblZhcmlhYmxlT3BfMSIKICBvcDogIkFzc2lnblZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjQvbXVsXzIvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjQvYWRkXzEiCiAgaW5wdXQ6ICJeTmFkYW0vTmFkYW0vdXBkYXRlXzI0L211bF8yL1JlYWRWYXJpYWJsZU9wIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzEyL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI0L1JlYWRWYXJpYWJsZU9wXzEiCiAgb3A6ICJSZWFkVmFyaWFibGVPcCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yNC9tdWxfMi9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBpbnB1dDogIl5OYWRhbS9OYWRhbS91cGRhdGVfMjQvQXNzaWduVmFyaWFibGVPcF8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzEyL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI0L3RydWVkaXZfMiIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjQvUmVhZFZhcmlhYmxlT3BfMSIKICBpbnB1dDogIk5hZGFtL3N1Yl83IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTIvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjQvbXVsXzQiCiAgb3A6ICJNdWwiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfNCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yNC90cnVlZGl2IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTIvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjQvbXVsXzUiCiAgb3A6ICJNdWwiCiAgaW5wdXQ6ICJOYWRhbS9tdWxfNSIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yNC90cnVlZGl2XzEiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xMi9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yNC9hZGRfMiIKICBvcDogIkFkZFYyIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI0L211bF80IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI0L211bF81IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTIvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjQvbXVsXzYiCiAgb3A6ICJNdWwiCiAgaW5wdXQ6ICJOYWRhbS9JZGVudGl0eV8xIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI0L2FkZF8yIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTIvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjQvU3FydCIKICBvcDogIlNxcnQiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjQvdHJ1ZWRpdl8yIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTIvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjQvYWRkXzMiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yNC9TcXJ0IgogIGlucHV0OiAiT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AogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xMi9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI1L211bF8xIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vc3ViXzIiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMTIvQmlhc0FkZC9CaWFzQWRkR3JhZCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzEyL0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICA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AgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI1L1NxdWFyZSIKICBvcDogIlNxdWFyZSIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8xMi9CaWFzQWRkL0JpYXNBZGRHcmFkIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTIvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yNS9tdWxfMyIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL3N1Yl8zIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI1L1NxdWFyZSIKICBkZXZpY2U6ICIvam9iOmxvY2Fs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ZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xMi9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI1L2FkZF8yIgogIG9wOiAiQWRkVjIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjUvbXVsXzQiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjUvbXVsXzUiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xMi9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI1L211bF82IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vSWRlbnRpdHlfMSIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yNS9hZGRfMiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzEyL0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjUvU3FydCIKICBvcDogIlNxcnQiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjUvdHJ1ZWRpdl8yIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTIvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yNS9hZGRfMyIKICBvcDogIkFkZFYyIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI1L1NxcnQiCiAgaW5wdXQ6ICJOYWRhbS9Db25zdCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzEyL0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hb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oYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjYvbXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yNi9tdWwvUmVhZFZhcmlhYmxlT3AiCiAgb3A6ICJSZWFkVmFyaWFibGVPcCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yNi9tdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKIC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GVuc2VfMTMvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjYvbXVsXzIvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgb3A6ICJQbGFjZWhvbGRlciIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX1JFU09VUkNFCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAic2hhcGUiCiAgICB2YWx1ZSB7CiAgICAgIHNoYXBlIHsKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI2L211bF8yL1JlYWRWYXJpYWJsZU9wIgogIG9wOiAiUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjYvbXVsXzIvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICA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bnNlXzEzL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI2L2FkZF8xIgogIG9wOiAiQWRkVjIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjYvbXVsXzIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjYvbXVsXzMiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xMy9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAg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HsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xMy9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yNi90cnVlZGl2XzIiCiAgb3A6ICJSZWFsRGl2IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI2L1JlYWRWYXJpYWJsZU9wXzEiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfNyIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzEzL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI2L211bF80IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vc3ViXzQiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjYvdHJ1ZWRpdiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzEzL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI2L211bF81IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vbXVsXzUiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjYvdHJ1ZWRpdl8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTMvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjYvYWRkXzIiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yNi9tdWxfNCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yNi9tdWxfNSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzEzL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI2L211bF82IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vSWRlbnRpdHlfMSIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yNi9hZGRfMiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzEzL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI2L1NxcnQiCiAgb3A6ICJTcXJ0IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI2L3RydWVkaXZfMiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzEzL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI2L2FkZF8zIgogIG9wOiAiQWRkVjIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjYvU3FydCIKICBpbnB1dDogIk5hZGFtL0NvbnN0IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTMvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjYvdHJ1ZWRpdl8zIgogIG9wOiAiUmVhbERpdiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yNi9tdWxfNiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yNi9hZGRfMyIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzEzL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBk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BZGRHcmFkIgogIGlucHV0OiAiTmFkYW0vc3ViXzUiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xMy9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI3L211bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBvcDogIlBsYWNlaG9sZGVyIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfUkVTT1VSQ0UKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJzaGFwZSIKICAgIHZhbHVlIHsKICAgICAgc2hhcGUgewogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjcvbXVsL1JlYWRWYXJpYWJsZU9wIgogIG9wOiAiUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjcvbXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI3L211bCIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL0lkZW50aXR5XzIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjcvbXVsL1JlYWRWYXJpYWJsZU9wIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTMvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9C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CIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI3L211bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBpbnB1dDogIl5OYWRhbS9OYWRhbS91cGRhdGVfMjcvQXNzaWduVmFyaWFibGVPcCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xMy9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI3L3RydWVkaXZfMSIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjcvUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfNiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgog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pemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI3L3RydWVkaXZfMiIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjcvUmVhZFZhcmlhYmxlT3BfMSIKICBpbnB1dDogIk5hZGFtL3N1Yl83IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTMvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yNy9tdWxfNCIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL3N1Yl80IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI3L3RydWVkaXYiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xMy9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI3L211bF81IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vbXVsXzUiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjcvdHJ1ZWRpdl8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTMvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICA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TE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xMy9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI3L1NxcnQiCiAgb3A6ICJTcXJ0IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI3L3RydWVkaXZfMiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzEzL0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9O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OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjgvdHJ1ZWRpdiIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMTQvTWF0TXVsXzEiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfNSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE0L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI4L211bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBvcDogIlBsYWNlaG9sZGVyIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgIH0KICAgIH0KIC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GtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xNC9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yOC9tdWxfMSIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL3N1Yl8yIgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzE0L01hdE11bF8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTQvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjgvYWRkIgogIG9wOiAiQWRkVjIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjgvbXVsIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI4L211bF8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTQvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjgvQXNzaWduVmFyaWFibGVPcCIKICBvcDogIkFzc2lnblZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjgvbXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI4L2FkZCIKICBpbnB1dDogIl5OYWRhbS9OYWRhbS91cGRhdGVfMjgvbXVsL1JlYWRWYXJpYWJsZU9wIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE0L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI4L1JlYWRWYXJpYWJsZU9wIgogIG9wOiAiUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjgvbXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGlucHV0OiAiXk5hZGFtL05hZGFtL3VwZGF0ZV8yOC9Bc3NpZ25WYXJpYWJsZU9wIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE0L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI4L3RydWVkaXZfMSIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjgvUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfNiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE0L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI4L211bF8yL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yOC9tdWxfMi9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI4L211bF8yL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjgvbXVsXzIiCiAgb3A6ICJNdWwiCiAgaW5wdXQ6ICJOYWRhbS9JZGVudGl0eV8zIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI4L211bF8yL1JlYWRWYXJpYWJsZU9wIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTQvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjgvU3F1YXJlIgogIG9wOiAiU3F1YXJlIgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzE0L01hdE11bF8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTQvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjgvbXVsXzMiCiAgb3A6ICJNdWwiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfMyIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yOC9TcXVhcmUiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xNC9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yOC9hZGRfMSIKICBvcDogIkFkZFYyIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI4L211bF8yIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXz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sKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xNC9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yOC9tdWxfNSIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL211bF81IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI4L3RydWVkaXZfMSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE0L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7C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CB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yOC9hZGRfMyIKICBvcDogIkFkZFYyIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI4L1NxcnQiCiAgaW5wdXQ6ICJOYWRhbS9Db25zdCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE0L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI4L3RydWVkaXZfMyIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjgvbXVsXzYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjgvYWRkXzMiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xNC9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yOC9SZWFkVmFyaWFibGVPcF8yIgogIG9wOiAiUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzE0L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI4L3N1YiIKICBvcDogIlN1YiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yOC9SZWFkVmFyaWFibGVPcF8yIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI4L3RydWVkaXZfMyIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE0L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI4L0Fzc2lnblZhcmlhYmxlT3BfMiIKICBvcDogIkFzc2lnblZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzE0L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yOC9zdWIiCiAgaW5wd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IgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yOS9tdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgb3A6ICJQbGFjZWhvbGRlciIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX1JFU09VUkNFCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAic2hhcGUiCiAgICB2YWx1ZSB7CiAgICAgIHNoYXBlIHsKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI5L211bC9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI5L211bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF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IGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTQvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yOS9hZGQiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yOS9tdWwiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjkvbXVsXzEiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xNC9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI5L0Fzc2ln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aWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yOS90cnVlZGl2XzEiCiAgb3A6ICJSZWFsRGl2IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI5L1JlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAiTmFkYW0vc3ViXzYiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xNC9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI5L211bF8yL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yOS9tdWxfMi9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI5L211bF8yL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI5L211bF8yIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vSWRlbnRpdHlfMyIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yOS9tdWxfMi9SZWFkVmFyaWFibGVPcCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazow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AgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI5L211bF8zIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vc3ViXzMiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjkvU3F1YXJlIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTQvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yOS9hZGRfMSIKICBvcDogIkFkZFYyIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI5L211bF8yIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI5L211bF8zIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgd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tleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE0L0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjkvbXVsXzQiCiAgb3A6ICJNdWwiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfNCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8yOS90cnVlZGl2IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTQvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICA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AgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE0L0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMjkvbXVsXzYiCiAgb3A6ICJNdWwiCiAgaW5wdXQ6ICJOYWRhbS9JZGVudGl0eV8xIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI5L2FkZF8yIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTQvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7C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MTQvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yOS90cnVlZGl2XzMiCiAgb3A6ICJSZWFsRGl2IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI5L211bF82IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzI5L2FkZF8zIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTQvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8yOS9SZWFkVmFyaWFibGVPcF8yIgogIG9wOiAiUmVhZFZhcmlhYmxlT3Ai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B0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xNS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8zMC9tdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgb3A6ICJQbGFjZWhvbGRlciIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX1JFU09VUkNFCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAic2hhcGUiCiAgICB2YWx1ZSB7CiAgICAgIHNoYXBlIHsKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMwL211bC9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMwL211bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMwL211bCIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL0lkZW50aXR5XzIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzAvbXVsL1JlYWRWYXJpYWJsZU9wIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTUvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzAvbXVsXzEiCiAgb3A6ICJNdWwiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfMiIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8xNS9NYXRNdWxfMSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE1L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMwL2FkZCIKICBvcDogIkFkZFYyIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMwL211bCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zMC9tdWxfMSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE1L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMwL0Fzc2lnblZhcmlhYmxlT3AiCiAgb3A6ICJBc3NpZ25WYXJpYWJsZU9wIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMwL211bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zMC9hZGQiCiAgaW5wdXQ6ICJeTmFkYW0vTmFkYW0vdXBkYXRlXzMwL211bC9SZWFkVmFyaWFibGVPcCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xNS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KIC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kVmFyaWFibGVPcCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zMC9tdWxfMi9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMwL211bF8yIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vSWRlbnRpdHlfMyIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zMC9tdWxfMi9SZWFkVmFyaWFibGVPcCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE1L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMwL1NxdWFyZSIKICBvcDogIlNxdWFyZSIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8xNS9NYXRNdWxfMSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE1L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMwL211bF8zIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vc3ViXzMiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzAvU3F1YXJlIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTUvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzAvYWRkXzEiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zMC9tdWxfMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zMC9tdWxfMyIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE1L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0I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aWFibGVPcF8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE1L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMwL3RydWVkaXZfMiIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzAvUmVhZFZhcmlhYmxlT3BfMSIKICBpbnB1dDogIk5hZGFtL3N1Yl83IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTUvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzAvbXVsXzQiCiAgb3A6ICJNdWwiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfNCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zMC90cnVlZGl2IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTUvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzAvbXVsXzU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ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTUvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzAvbXVsXzYiCiAgb3A6ICJNdWwiCiAgaW5wdXQ6ICJOYWRhbS9JZGVudGl0eV8xIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMwL2FkZF8yIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTUvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTog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GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xNS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8zMC90cnVlZGl2XzMiCiAgb3A6ICJSZWFsRGl2IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMwL211bF82IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMwL2FkZF8zIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTUvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICA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jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMxL211bF8xIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vc3ViXzIiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMTUvQmlhc0FkZC9CaWFzQWRkR3JhZCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE1L0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzEvYWRkIgogIG9wOiAiQWRkVjIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzEvbXVsIgogIGlucHV0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sL2RlbnNlXzE1L0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzEvdHJ1ZWRpdl8yIgogIG9wOiAiUmVhbERpdiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zMS9SZWFkVmFyaWFibGVPcF8xIgogIGlucHV0OiAiTmFkYW0vc3ViXzciCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xNS9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2R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CB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xNS9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMxL2FkZF8yIgogIG9wOiAiQWRkVjIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzEvbXVsXzQiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzEvbXVsXzUiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xNS9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMxL211bF82IgogIG9w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GF0ZV8zMS9hZGRfMyIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE1L0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzEvUmVhZFZhcmlhYmxlT3BfMiIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xNS9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMxL3N1YiIKICBvcDogIlN1Y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L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE1L0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8zMi90cnVlZGl2IgogIG9wOiAiUmVhbERpdiIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8xNi9NYXRNdWxfMSIKICBpbnB1dDogIk5hZGFtL3N1Yl81IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTYvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQ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IGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMyL211bC9SZWFkVmFyaWFibGVPcCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE2L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMyL211bF8xIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vc3ViXzIiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMTYvTWF0TXVsXzEiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xNi9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8zMi9hZGQiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zMi9tdWwiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzIvbXVsXzEiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xNi9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgIC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2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTYvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzIvdHJ1ZWRpdl8xIgogIG9wOiAiUmVhbERpdiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zMi9SZWFkVmFyaWFibGVPcCIKICBpbnB1dDogIk5hZGFtL3N1Yl82IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTYvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzIvbXVsXzIvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgb3A6ICJQbGFjZWhvbGRlciIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX1JFU09VUkNFCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAic2hhcGUiCiAgICB2YWx1ZSB7CiAgICAgIHNoYXBlIHsKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMyL211bF8yL1JlYWRWYXJpYWJsZU9wIgogIG9wOiAiUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzIvbXVsXzIvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgI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B7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xNi9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8zMi9tdWxfMyIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL3N1Yl8zIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMyL1NxdWFyZSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE2L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGF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fb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8zMi90cnVlZGl2XzIiCiAgb3A6ICJSZWFsRGl2IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMyL1JlYWRWYXJpYWJsZU9wXzEiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfNyIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE2L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMyL211bF80IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vc3ViXzQiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzIvdHJ1ZWRpdiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE2L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMyL211bF81IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vbXVsXzUiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzIvdHJ1ZWRpdl8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTYvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzIvYWRkXzIiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zMi9tdWxfNCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zMi9tdWxfNSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE2L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMyL211bF82IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vSWRlbnRpdHlfMSIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zMi9hZGRfMiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE2L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMyL1NxcnQiCiAgb3A6ICJTcXJ0IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMyL3RydWVkaXZfMiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE2L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMyL2FkZF8zIgogIG9wOiAiQWRkVjIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzIvU3FydCIKICBpbnB1dDogIk5hZGFtL0NvbnN0IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTYvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzIvdHJ1ZWRpdl8zIgogIG9wOiAiUmVhbERpdiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zMi9tdWxfNiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zMi9hZGRfMyIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE2L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMyL1JlYWRWYXJpYWJsZU9wXzIiCiAgb3A6ICJSZWFkVmFyaWFibGVPcCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMTYvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzIvc3ViIgogIG9wOiAiU3ViIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMyL1JlYWRWYXJpYWJsZU9wXzIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzIvdHJ1ZWRpdl8zIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTYvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9Ci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sdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xNi9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMzL211bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBvcDogIlBsYWNlaG9sZGVyIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfUkVTT1VSQ0UKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJzaGFwZSIKICAgIHZhbHVlIHsKICAgICAgc2hhcGUgewogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzMvbXVsL1JlYWRWYXJpYWJsZU9wIgogIG9wOiAiUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzMvbXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMzL211bCIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL0lkZW50aXR5XzIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzMvbXVsL1JlYWRWYXJpYWJsZU9wIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTYvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8zMy9tdWxfMSIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL3N1Yl8yIgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL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XNzaWduVmFyaWFibGVPcCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xNi9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMzL3RydWVkaXZfMSIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzMvUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfNiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE2L0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzMvbXVsXzIvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgb3A6ICJQbGFjZWhvbGRlciIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX1JFU09VUkNFCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAic2hhcGUiCiAgICB2YWx1ZSB7CiAgICAgIHNoYXBlIHsKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMzL211bF8yL1JlYWRWYXJpYWJsZU9wIgogIG9wOiAiUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzMvbXVsXzIvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB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2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE2L0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzMvbXVsXzMiCiAgb3A6ICJNdWwiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfMyIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zMy9TcXVhcmUiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xNi9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBk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AgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xNi9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzMzL211bF81IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vbXVsXzUiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzMvdHJ1ZWRpdl8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTYvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8zMy9hZGRfMiIKICBvcDogIkFkZFYyIgogIGlucHV0OiA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YiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMTcvTWF0TXVsXzEiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfNSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE3L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM0L211bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBvcDogIlBsYWNlaG9sZGVyIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfUkVTT1VSQ0UKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJzaGFwZSIKICAgIHZhbHVlIHsKICAgICAgc2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ICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8zNC9tdWxfMSIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL3N1Yl8yIgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzE3L01hdE11bF8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTcvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzQvYWRkIgogIG9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VTowIgogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE3L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM0L1JlYWRWYXJpYWJsZU9wIgogIG9wOiAiUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzQvbXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGlucHV0OiAiXk5hZGFtL05hZGFtL3VwZGF0ZV8zNC9Bc3NpZ25WYXJpYWJsZU9wIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE3L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM0L3RydWVkaXZfMSIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzQvUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfNiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE3L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM0L211bF8yL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBE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NlcXVlbnRpYWwvZGVuc2VfMTcvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzQvU3F1YXJlIgogIG9wOiAiU3F1YXJlIgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzE3L01hdE11bF8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTcvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5v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AgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8zNC9tdWxfNSIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL211bF81IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM0L3RydWVkaXZfMSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE3L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM0L2FkZF8yIgogIG9wOiAiQWRkVjIiCiAgaW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lzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xNy9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8zNC9TcXJ0IgogIG9wOiAiU3FydCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zNC90cnVlZGl2XzIiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xNy9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0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XBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xNy9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8zNC9SZWFkVmFyaWFibGVPcF8yIgogIG9wOiAiUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzE3L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM0L3N1YiIKICBvcDogIlN1YiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3V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gc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8zNS9tdWxfMi9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM1L211bF8yL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM1L211bF8yIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vSWRlbnRpdHlfMyIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zNS9tdWxfMi9SZWFkVmFyaWFibGVPcCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsa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50aWFsL2RlbnNlXzE3L0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzUvbXVsXzQiCiAgb3A6ICJNdWwiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfNCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zNS90cnVlZGl2IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTcvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8zNS9tdWxfNSIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL211bF81IgogIGlucH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c3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xNy9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM1L2FkZF8zIgogIG9wOiAiQWRkVjIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzUvU3FydCIKICBpbnB1dDogIk5hZGFtL0NvbnN0IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTcvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZ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ZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8zNi9tdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgb3A6ICJQbGFjZWhvbGRlciIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX1JFU09VUkNFCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAic2hhcGUiCiAgICB2YWx1ZSB7CiAgICAgIHNoYXBlIHsKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM2L211bC9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM2L211bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM2L211bCIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL0lkZW50aXR5XzIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzYvbXVsL1JlYWRWYXJpYWJsZU9wIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTgvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzYvbXVsXzEiCiAgb3A6ICJNdWwiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfMiIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8xOC9NYXRNdWxfMSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE4L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM2L2FkZCIKICBvcDogIkFkZFYyIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM2L211bCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zNi9tdWxfMSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE4L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdX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gewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM2L211bF8yIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vSWRlbnRpdHlfMyIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zNi9tdWxfMi9SZWFkVmFyaWFibGVPcCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE4L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM2L1NxdWFyZSIKICBvcDogIlNxdWFyZSIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8xOC9NYXRNdWxfMSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE4L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM2L211bF8zIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vc3ViXzMiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzYvU3F1YXJlIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTgvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzYvYWRkXzEiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zNi9tdWxfMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zNi9tdWxfMyIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE4L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQog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OiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE4L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM2L3RydWVkaXZfMiIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzYvUmVhZFZhcmlhYmxlT3BfMSIKICBpbnB1dDogIk5hZGFtL3N1Yl83IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTgvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU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3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xOC9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8zNi9hZGRfMiIKICBvcDogIkFkZFYyIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM2L211bF80IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM2L211bF81IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTgvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzYvbXVsXzYiCiAgb3A6ICJNdWwiCiAgaW5wdXQ6ICJOYWRhbS9JZGVudGl0eV8xIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM2L2FkZF8yIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTgvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzYvU3FydCIKICBvcDogIlNxcnQiCiAgaW5wdXQ6ICJOYWRhbS9OYWR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3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8zNi90cnVlZGl2XzMiCiAgb3A6ICJSZWFsRGl2IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM2L211bF82IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM2L2FkZF8zIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTgvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5h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RwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8zNy9tdWxfMiIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL0lkZW50aXR5XzMiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzcvbXVsXzIvUmVhZFZhcmlhYmxlT3AiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xOC9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM3L1NxdWFyZSIKICBvcDogIlNxdWFyZSIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdW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RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE4L0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzcvU3FydCIKICBvcDogIlNxcnQiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzcvdHJ1ZWRpdl8yIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTgvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxM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ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE4L0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzcvUmVhZFZhcmlhYmxlT3BfMiIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8xOC9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM3L3N1YiIKICBvcDogIlN1YiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zNy9SZWFkVmFyaWFibGVPcF8yIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM3L3RydWVkaXZfMyIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9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tleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE5L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM4L211bF8xIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vc3ViXzIiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMTkvTWF0TXVsXzEiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xOS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8zOC9hZGQiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zOC9tdWwiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzgvbXVsXzEiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xOS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8zOC9Bc3NpZ25WYXJpYWJsZU9wIgogIG9wOiAiQXNzaWduVmFyaWFibGVPcCIKICBpbnB1dDogIk5hZGFtL05hZG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5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzgvdHJ1ZWRpdl8xIgogIG9wOiAiUmVhbERpdiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zOC9SZWFkVmFyaWFibGVPcCIKICBpbnB1dDogIk5hZGFtL3N1Yl82IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTkvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiA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VxdWVudGlhbC9kZW5zZV8xOS9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8zOC9tdWxfMyIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL3N1Yl8zIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM4L1NxdWFyZSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE5L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2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gICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8zOC90cnVlZGl2XzIiCiAgb3A6ICJSZWFsRGl2IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM4L1JlYWRWYXJpYWJsZU9wXzEiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfNyIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE5L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM4L211bF80IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vc3ViXzQiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzgvdHJ1ZWRpdiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE5L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM4L211bF81IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vbXVsXzUiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzgvdHJ1ZWRpdl8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTkvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzgvYWRkXzIiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zOC9tdWxfNCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zOC9tdWxfNSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE5L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM4L211bF82IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vSWRlbnRpdHlfMSIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zOC9hZGRfMiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE5L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM4L1NxcnQiCiAgb3A6ICJTcXJ0IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM4L3RydWVkaXZfMiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE5L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM4L2FkZF8zIgogIG9wOiAiQWRkVjIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzgvU3FydCIKICBpbnB1dDogIk5hZGFtL0NvbnN0IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTkvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzgvdHJ1ZWRpdl8zIgogIG9wOiAiUmVhbERpdiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zOC9tdWxfNiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zOC9hZGRfMyIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE5L01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM4L1JlYWRWYXJpYWJsZU9wXzIiCiAgb3A6ICJSZWFkVmFyaWFibGVPcCIKICBpbnB1dDogInNlcXVlbnRpYWwvZGVuc2VfMTkvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzgvc3ViIgogIG9wOiAiU3ViIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM4L1JlYWRWYXJpYWJsZU9wXzIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzgvdHJ1ZWRpdl8zIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTkvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzgvQXNzaWduVmFyaWFibGVPcF8yIgogIG9wOiAiQXNzaWduVmFyaWFibGVPcCIKICBpbnB1dDogInNl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WFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM5L211bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBvcDogIlBsYWNlaG9sZGVyIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfUkVTT1VSQ0UKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJzaGFwZSIKICAgIHZhbHVlIHsKICAgICAgc2hhcGUgewogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzkvbXVsL1JlYWRWYXJpYWJsZU9wIgogIG9wOiAiUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzkvbXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTog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sdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xOS9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM5L2FkZCIKICBvcDogIkFkZFYyIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM5L211bCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV8zOS9tdWxfMSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE5L0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9Ci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B7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xOS9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM5L3RydWVkaXZfMSIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzkvUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfNiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzE5L0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgfQogICA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3N1Yl83IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTkvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8zOS9tdWxfNCIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL3N1Yl80IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM5L3RydWVkaXYiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xOS9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM5L211bF81IgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vbXVsXzUiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzkvdHJ1ZWRpdl8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTkvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8zOS9hZGRfMiIKICBvcDogIkFkZFYyIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM5L211bF80IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM5L211bF81IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMTkvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV8zOS9tdWxfNiIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL0lkZW50aXR5XzEiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzkvYWRkXzIiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xOS9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgIC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jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xOS9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzM5L3RydWVkaXZfMyIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzkvbXVsXzYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfMzkvYWRkXzMiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8xOS9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiA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vdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzIwL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfNDAvbXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV80MC9tdWwvUmVhZFZhcmlhYmxlT3AiCiAgb3A6ICJSZWFkVmFyaWFibGVPcCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV80MC9tdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQwL211bCIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL0lkZW50aXR5XzIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNDAvbXVsL1JlYWRWYXJpYWJsZU9wIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMjAvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAg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0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV80MC9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQwL211bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBpbnB1dDogIl5OYWRhbS9OYWRhbS91cGRhdGVfNDAvQXNzaWduVmFyaWFibGVPcCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8yMC9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQwL3RydWVkaXZfMSIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNDAvUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfNiIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzIwL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfNDAvbXVsXzIvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgb3A6ICJQbGFjZWhvbGRlciIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX1JFU09VUkNFCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAic2hhcGUiCiAgICB2YWx1ZSB7CiAgICAgIHNoYXBlIHsKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQwL211bF8yL1JlYWRWYXJpYWJsZU9wIgogIG9wOiAiUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNDAvbXVsXzIvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQwL211bF8yIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vSWRlbnRpdHlfMyIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV80MC9tdWxfMi9SZWFkVmFyaWFibGVPcCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzIwL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfNDAvU3F1YXJlIgogIG9wOiAiU3F1YXJlIgogIGlucHV0OiAiZ3JhZGllbnRfdGFwZS9zZXF1ZW50aWFsL2RlbnNlXzIwL01hdE11bF8xIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMjAvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV80MC9tdWxfMyIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL3N1Yl8zIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQwL1NxdWFyZSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzIwL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfNDAvYWRkXzEiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV80MC9tdWxfMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV80MC9tdWxfMyIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzIwL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRy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mFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzIwL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfNDAvbXVsXzQiCiAgb3A6ICJNdWwiCiAgaW5wdXQ6ICJOYWRhbS9zdWJfNCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV80MC90cnVlZGl2IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMjAvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV80MC9tdWxfNSIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL211bF81IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQwL3RydWVkaXZfMSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzIwL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfNDAvYWRkXzIiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV80MC9tdWxfNCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV80MC9tdWxfNSIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzIwL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfNDAvbXVsXzYiCiAgb3A6ICJNdWwiCiAgaW5wdXQ6ICJOYWRhbS9JZGVudGl0eV8xIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQwL2FkZF8yIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMjAvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV80MC9TcXJ0IgogIG9wOiAiU3FydCIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV80MC90cnVlZGl2XzIiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8yMC9NYXRNdWwvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAwCiAgICAgICAgICB9CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQwL2FkZF8zIgogIG9wOiAiQWRkVjIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNDAvU3FydCIKICBpbnB1dDogIk5hZGFtL0NvbnN0IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMjAvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV80MC90cnVlZGl2XzMiCiAgb3A6ICJSZWFsRGl2IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQwL211bF82IgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQwL2FkZF8zIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMjAvTWF0TXVsL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwMAogICAgICAgICAgfQogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV80MC9SZWFkVmFyaWFibGVPcF8yIgogIG9wOiAiUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJzZXF1ZW50aWFsL2RlbnNlXzIwL01hdE11bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMDAKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfNDAvc3ViIgogIG9wOiAiU3ViIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQwL1JlYWRWYXJpYWJsZU9wXzIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNDAvdHJ1ZWRpdl8zIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQK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Aga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX1JFU09VUkNFCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAic2hhcGUiCiAgICB2YWx1ZSB7CiAgICAgIHNoYXBlIHsKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQxL211bC9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQxL211bC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQxL211bCIKICBvcDogIk11bCIKICBpbnB1dDogIk5hZGFtL0lkZW50aXR5XzIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNDEvbXVsL1JlYWRWYXJpYWJsZU9wIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMjAvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQxL211bF8xIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vc3ViXzIiCiAgaW5wdXQ6ICJncmFkaWVudF90YXBlL3NlcXVlbnRpYWwvZGVuc2VfMjAvQmlhc0FkZC9CaWFzQWRkR3JhZCIKICBkZXZpY2U6ICIvam9iOmxvY2FsaG9zdC9yZXBsaWNhOjAvdGFzazowL2RldmljZTpHUFU6MCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX2NsYXNzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzOiAibG9jOkBzZXF1ZW50aWFsL2RlbnNlXzIwL0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AvcmVzb3VyY2UiCiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMTAKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV80MS9hZGQiCiAgb3A6ICJBZGRWMiIKICBpbnB1dDogIk5hZGFtL05hZGFtL3VwZGF0ZV80MS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WFkVmFyaWFibGVPcCIKICBpbnB1dDogIk5hZGFtL3N1Yl82IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMjAvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQxL211bF8yL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIk5hZGFtL05hZGFtL3VwZGF0ZV80MS9tdWxfMi9SZWFkVmFyaWFibGVPcCIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQxL211bF8yL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfNDEvbXVsXzIiCiAgb3A6ICJNdWwiCiAgaW5wdXQ6ICJOYWRhbS9JZGVudGl0eV8zIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQxL211bF8yL1JlYWRWYXJpYWJsZU9wIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMjAvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQxL1NxdWFyZSIKICBvcDogIlNxdWFyZSIKICBpbnB1dDogImdyYWRpZW50X3RhcGUvc2VxdWVudGlhbC9kZW5zZV8yMC9CaWFzQWRkL0JpYXNBZGRHcmFkIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMjAvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQxL211bF8zIgogIG9wOiAiTXVsIgogIGlucHV0OiAiTmFkYW0vc3ViXzMiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNDEvU3F1YXJlIgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMjAvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQxL2FkZF8xIgogIG9wOiAiQWRkVjIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNDEvbXVsXzIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNDEvbXVsXzMiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8yMC9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfNDEvQXNzaWduVmFyaWFibG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9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQxL2FkZF8zIgogIG9wOiAiQWRkVjIiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNDEvU3FydCIKICBpbnB1dDogIk5hZGFtL0NvbnN0IgogIGRldmljZTogIi9qb2I6bG9jYWxob3N0L3JlcGxpY2E6MC90YXNrOjAvZGV2aWNlOkdQVTowIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfY2xhc3MiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHM6ICJsb2M6QHNlcXVlbnRpYWwvZGVuc2VfMjAvQmlhc0FkZC9SZWFkVmFyaWFibGVPcC9yZXNvdXJjZSIKICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxMAogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQxL3RydWVkaXZfMyIKICBvcDogIlJlYWxEaXYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNDEvbXVsXzYiCiAgaW5wdXQ6ICJOYWRhbS9OYWRhbS91cGRhdGVfNDEvYWRkXzMiCiAgZGV2aWNlOiAiL2pvYjpsb2NhbGhvc3QvcmVwbGljYTowL3Rhc2s6MC9kZXZpY2U6R1BVOjAiCiAgYXR0ciB7CiAgICBrZXk6ICJUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIl9jbGFzcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgczogImxvYzpAc2VxdWVudGlhbC9kZW5zZV8yMC9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfNDEvUmVhZFZhcmlhYmxlT3BfMiIKICBvcDogIlJlYWRWYXJpYWJsZU9wIgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8yMC9CaWFzQWRkL1JlYWRWYXJpYWJsZU9wL3Jlc291cmNlIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEwCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJOYWRhbS9OYWRhbS91cGRhdGVfNDEvc3ViIgogIG9wOiAiU3ViIgogIGlucHV0OiAiTmFkYW0vTmFkYW0vdXBkYXRlXzQxL1JlYWRWYXJpYWJ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m9kZSB7CiAgbmFtZTogIkNhc3RfMSIKICBvcDogIkNhc3QiCiAgaW5wdXQ6ICJJdGVyYXRvckdldE5leHQ6MSIKICBhdHRyIHsKICAgIGtleTogIkRzdFQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiU3JjVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfVUlOVDgKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJUcnVuY2F0ZSIKICAgIHZhbHVlIHsKICAgICAgYjogZmFsc2UKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogLTEKICAgICAgICAgIH0KICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IDEKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIlNxdWVlemUiCiAgb3A6ICJTcXVlZXplIgogIGlucHV0OiAiQ2FzdF8xIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogLTEKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJzcXVlZXplX2RpbXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIGk6IC0xCiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIkFyZ01heC9kaW1lbnNpb24iCiAgb3A6ICJDb25zdCIKICBhdHRyIHsKICAgIGtleTogIl9vdXRwdXRfc2hhcGVzIgogICAgdmFsdWUgewogICAgICBsaXN0IHsKICAgICAgICBzaGFwZSB7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiZHR5cGUiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0lOVDMyCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAidmFsdWUiCiAgICB2YWx1ZSB7CiAgICAgIHRlbnNvciB7CiAgICAgICAgZHR5cGU6IERUX0lOVDMyCiAgICAgICAgdGVuc29yX3NoYXBlIHsKICAgICAgICB9CiAgICAgICAgaW50X3ZhbDogLTEKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiQXJnTWF4IgogIG9wOiAiQXJnTWF4IgogIGlucHV0OiAic2VxdWVudGlhbC9kZW5zZV8yMC9Tb2Z0bWF4IgogIGlucHV0OiAiQXJnTWF4L2RpbWVuc2lvbiIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiVGlkeCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfSU5UMzIKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogLTEKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJvdXRwdXRfdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfSU5UNjQKICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIkNhc3RfMiIKICBvcDogIkNhc3QiCiAgaW5wdXQ6ICJBcmdNYXgiCiAgYXR0ciB7CiAgICBrZXk6ICJEc3RUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIlNyY1QiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0lOVDY0CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiVHJ1bmNhdGUiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJFcXVhbCIKICBvcDogIkVxdWFsIgogIGlucHV0OiAiU3F1ZWV6ZSIKICBpbnB1dDogIkNhc3RfMiIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICAgIGRpbSB7CiAgICAgICAgICAgIHNpemU6IC0xCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiaW5jb21wYXRpYmxlX3NoYXBlX2Vycm9yIgogICAgdmFsdWUgewogICAgICBiOiB0cnVlCiAgICB9CiAgfQp9Cm5vZGUgewogIG5hbWU6ICJDYXN0XzMiCiAgb3A6ICJDYXN0IgogIGlucHV0OiAiRXF1YWwiCiAgYXR0ciB7CiAgICBrZXk6ICJEc3RUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIlNyY1QiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0JPT0wKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJUcnVuY2F0ZSIKICAgIHZhbHVlIHsKICAgICAgYjogZmFsc2UKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogLTEKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIkNvbnN0IgogIG9wOiAiQ29uc3QiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgICAgZGltIHsKICAgICAgICAgICAgc2l6ZTogMQogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9JTlQzMgogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInZhbHVlIgogICAgdmFsdWUgewogICAgICB0ZW5zb3IgewogICAgICAgIGR0eXBlOiBEVF9JTlQzMgogICAgICAgIHRlbnNvcl9zaGFwZSB7CiAgICAgICAgICBkaW0gewogICAgICAgICAgICBzaXplOiAxCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGludF92YWw6IDAKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiU3VtXzIiCiAgb3A6ICJTdW0iCiAgaW5wdXQ6ICJDYXN0XzMiCiAgaW5wdXQ6ICJDb25zdCIKICBhdHRyIHsKICAgIGtleTogIl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GlucHV0OiAiQ2FzdF8zIgogIGF0dHIgewogICAga2V5OiAiVCIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfRkxPQVQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIm91dF90eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9JTlQzMgogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiQ2FzdF80IgogIG9wOiAiQ2FzdCIKICBpbnB1dDogIlNpemUiCiAgYXR0ciB7CiAgICBrZXk6ICJEc3RUIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9GTE9BVAogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogIlNyY1QiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0lOVDMyCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiVHJ1bmNhdGUiCiAgICB2YWx1ZSB7CiAgICAgIGI6IGZhbHNlCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIkFzc2lnbkFkZFZhcmlhYmxlT3BfMy9yZXNvdXJjZSIKICBvcDogIlBsYWNlaG9sZGVyIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfUkVTT1VS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SB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZTogIkNvbnN0XzEiCiAgb3A6ICJDb25zdCIKICBpbnB1dDogIl5JZGVudGl0eV8xIgogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJkdHlwZSIKICAgIHZhbHVlIHsKICAgICAgdHlwZTogRFRfSU5UNjQKICAgIH0KICB9CiAgYXR0ciB7CiAgICBrZXk6ICJ2YWx1ZSIKICAgIHZhbHVlIHsKICAgICAgdGVuc29yIHsKICAgICAgICBkdHlwZTogRFRfSU5UNjQKICAgICAgICB0ZW5zb3Jfc2hhcGUgewogICAgICAgIH0KICAgICAgICBpbnQ2NF92YWw6IDEKICAgICAgfQogICAgfQogIH0KfQpub2RlIHsKICBuYW1lOiAiQXNzaWduQWRkVmFyaWFibGVPcF80L3Jlc291cmNlIgogIG9wOiAiUGxhY2Vob2xkZXIiCiAgYXR0ciB7CiAgICBrZXk6ICJfb3V0cHV0X3NoYXBlcyIKICAgIHZhbHVlIHsKICAgICAgbGlzdCB7CiAgICAgICAgc2hhcGUgewogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogImR0eXBlIgogICAgdmFsdWUgewogICAgICB0eXBlOiBEVF9SRVNPVVJDRQogICAgfQogIH0KICBhdHRyIHsKICAgIGtleTogInNoYXBlIgogICAgdmFsdWUgewogICAgICBzaGFwZSB7CiAgICAgIH0KICAgIH0KICB9Cn0Kbm9kZSB7CiAgbmFtZ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6ICJec2VxdWVudGlhbC9kZW5zZV85L0JpYXNBZGQvUmVhZFZhcmlhYmxlT3AiCiAgaW5wdXQ6ICJec2VxdWVudGlhbC9kZW5zZV85L01hdE11bC9SZWFkVmFyaWFibGVPcCIKICBhdHRyIHsKICAgIGtleTogIlQiCiAgICB2YWx1ZSB7CiAgICAgIHR5cGU6IERUX0ZMT0FUCiAgICB9CiAgfQogIGF0dHIgewogICAga2V5OiAiX291dHB1dF9zaGFwZXMiCiAgICB2YWx1ZSB7CiAgICAgIGxpc3QgewogICAgICAgIHNoYXBlIHsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICB9Cn0KdmVyc2lvbnMgewogIHByb2R1Y2VyOiA1NjEKfQo=", + "ok": true, + "headers": [ + [ + "content-type", + "text/x-protobuf; charset=utf-8" + ] + ], + "status": 200, + "status_text": "" + }, + "https://localhost:6006/font-roboto/RxZJdnzeo3R5zSexge8UUZBw1xU1rKptJj_0jans920.woff2": { + "data": "d09GMgABAAAAACokAA4AAAAAUkQAACnNAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGmQbmXocg0oGYACGTBEMCu1A1wwLg14AATYCJAOHNgQgBYMAByAbO0QF3Bhn2DiAgX12b1EEGwcBhTGLomxQFmT/lwnmGE77wayn0NBAJAPXITeLlQAVKYYKjM1mpr7CgS0HNgpkY1bqRLvLsXy3dA8XPXqvM/yN+w2v2FOlAb85QmOf5P7Az633/wJaSkUwMImTqgk4GDAic6S4MSrGqFakDCocigoYRBqEHnCIYBIGGExRT1Qeqv3690x3z90AwCasSP6ngswqFUVYHrB8VBQAKcYder52r1wzByMHJRZ//0+nNV9g+H/GsveOK0AqSpwZGZI47CReYMFvJOfQ2hTNUVES1lvdXXeyFKh29/XX4ACRY/9vTgMuqbMdO2B5UFAD4VG4vRkzpRE/HAS4Jss5uTZKgIn5b///mp923r+ZD/x22f0pcYRbsj0ne84XpsZN7mQyee9lwgszWcwvZJLFD4WkECjkFyHriuAA87NMWVUCV9VTC6S6t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0h23k0yS4yQ7itdzJmqjhwsrzqj+7MMqlnKY2qS+yyhGbcFLoA6XqJo95gFYoY6USEG+HNc6lmNUzcTbHsuFSqhFJgWYx5103ZxjzZymZTZ8QGj8RAxo2ShcMjb9pOU86KrQLkSLnRmOFGDjONFpx1CXp+s6dvOVx4h3IVL7nbxFUagep8f8S7NVocxKxEfnWDR6/hXkQ87T9Z9YNLZnCf9Dlmsfx8zbHCJMebeqYquSWXCc/YpjXvmnpUiazbSnKTQegpCAFh2s9hSjah52vufYbz9A+ryVFgrtCbZYzt0mfeGYLrgbJalzUNMqomgVWMVFks67y0EFM46+Y3I3DNNWVxTUwuiOvSaiYFqW2Ab7tDuU1RShGhKY6YnJTioazeKCeihEYwu6wmG9tUK49HpautZqJ1h+zsKPQcWAqIKVEnqsSSmJtqnhheK9M0WhgtmepO47uVyu7QWpqtDIeIjQmvctt4GOq3VGnMpi5Rs9OaD+OCoIJ9ijAlxEZ3q8K2cSvUZp3SmC0KHW3jbeojAD4qtIcFXFQPgB+g0B3g59viFAADqeUBeIDyWIQYj2NR/GIqMalKLI7FOYHJ8JDbG+VnZwxJhEixogQLFIRKghIFiqMigSxCBQ3lf2Jj4XzJMV2HhIZtGOJsxPx3x1+U6Iz5JTk2Ivg0hJqUYJ7IBqMJo7HA0wrlnUoclChnBYvwhxO5lcrUnXqV0epC08uiW50qEoH8CHRHjrfInPkG3P3JiRAlkIUK83VE+Guys6hlxhiJAQu2q5B9cEhhYPBIf8/JTwAA", + "ok": true, + "headers": [ + [ + "content-type", + "font/woff2" + ] + ], + "status": 200, + "status_text": "" + }, + "https://localhost:6006/font-roboto/oMMgfZMQthOryQo9n22dcuvvDin1pK8aKteLpeZ5c0A.woff2": { + "data": "d09GMgABAAAAACn8AA4AAAAAUjgAACmjAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGmQbmUAcg0oGYACGTBEMCu1810YLg14AATYCJAOHNgQgBYJ0ByAbL0RFB2LYOGCA7DduwB2DjQOQz3hJ9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UN2Z13y3lDgbc+HC6sgr7+IwIsjc7PHX98u5CYJ6wVv6hZ2bQUWvb15EHej0/q5rrPikXjbcGDnOhsJmr8hO7LRvBu4V/sNalTIU6RBh6Jrts38i4GTzfts3QMAAAA=", + "ok": true, + "headers": [ + [ + "content-type", + "font/woff2" + ] + ], + "status": 200, + "status_text": "" + } + }, + "base_uri": "https://localhost:8080/", + "height": 822 + } + }, + "source": [ + "%tensorboard --logdir=./my_cifar10_logs --port=6006" + ], + "execution_count": 132, + "outputs": [ + { + "output_type": "display_data", + "data": { + "application/javascript": [ + "\n", + " (async () => {\n", + " const url = new URL(await google.colab.kernel.proxyPort(6006, {'cache': true}));\n", + " url.searchParams.set('tensorboardColab', 'true');\n", + " const iframe = document.createElement('iframe');\n", + " iframe.src = url;\n", + " iframe.setAttribute('width', '100%');\n", + " iframe.setAttribute('height', '800');\n", + " iframe.setAttribute('frameborder', 0);\n", + " document.body.appendChild(iframe);\n", + " })();\n", + " " + ], + "text/plain": [ + "" + ] + }, + "metadata": { + "tags": [] + } + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "4huFUfvOLOpl", + "outputId": "a0f6fcfc-c02b-4861-b396-d64f7281184d", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "model.fit(X_train, y_train, epochs=100,\n", + " validation_data=(X_valid, y_valid),\n", + " callbacks=callbacks)" + ], + "execution_count": 133, + "outputs": [ + { + "output_type": "stream", + "text": [ + "Epoch 1/100\n", + "1407/1407 [==============================] - 16s 9ms/step - loss: 9.5976 - accuracy: 0.1365 - val_loss: 2.1086 - val_accuracy: 0.2342\n", + "Epoch 2/100\n", + "1407/1407 [==============================] - 12s 9ms/step - loss: 2.0597 - accuracy: 0.2457 - val_loss: 2.0227 - val_accuracy: 0.2528\n", + "Epoch 3/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.9423 - accuracy: 0.2883 - val_loss: 1.9173 - val_accuracy: 0.2974\n", + "Epoch 4/100\n", + "1407/1407 [==============================] - 12s 9ms/step - loss: 1.8595 - accuracy: 0.3242 - val_loss: 1.9241 - val_accuracy: 0.3242\n", + "Epoch 5/100\n", + "1407/1407 [==============================] - 12s 9ms/step - loss: 1.7853 - accuracy: 0.3508 - val_loss: 1.7868 - val_accuracy: 0.3550\n", + "Epoch 6/100\n", + "1407/1407 [==============================] - 12s 9ms/step - loss: 1.7293 - accuracy: 0.3703 - val_loss: 1.7313 - val_accuracy: 0.3782\n", + "Epoch 7/100\n", + "1407/1407 [==============================] - 12s 9ms/step - loss: 1.6884 - accuracy: 0.3880 - val_loss: 1.7046 - val_accuracy: 0.3728\n", + "Epoch 8/100\n", + "1407/1407 [==============================] - 12s 9ms/step - loss: 1.6473 - accuracy: 0.4009 - val_loss: 1.6535 - val_accuracy: 0.4072\n", + "Epoch 9/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.6216 - accuracy: 0.4174 - val_loss: 1.6390 - val_accuracy: 0.4072\n", + "Epoch 10/100\n", + "1407/1407 [==============================] - 12s 9ms/step - loss: 1.5892 - accuracy: 0.4274 - val_loss: 1.6882 - val_accuracy: 0.3892\n", + "Epoch 11/100\n", + "1407/1407 [==============================] - 12s 9ms/step - loss: 1.5679 - accuracy: 0.4388 - val_loss: 1.6097 - val_accuracy: 0.4182\n", + "Epoch 12/100\n", + "1407/1407 [==============================] - 12s 9ms/step - loss: 1.5494 - accuracy: 0.4435 - val_loss: 1.6076 - val_accuracy: 0.4224\n", + "Epoch 13/100\n", + "1407/1407 [==============================] - 12s 9ms/step - loss: 1.5264 - accuracy: 0.4501 - val_loss: 1.6094 - val_accuracy: 0.4174\n", + "Epoch 14/100\n", + "1407/1407 [==============================] - 12s 9ms/step - loss: 1.5058 - accuracy: 0.4584 - val_loss: 1.5780 - val_accuracy: 0.4304\n", + "Epoch 15/100\n", + "1407/1407 [==============================] - 12s 9ms/step - loss: 1.5017 - accuracy: 0.4586 - val_loss: 1.5628 - val_accuracy: 0.4468\n", + "Epoch 16/100\n", + "1407/1407 [==============================] - 12s 9ms/step - loss: 1.4832 - accuracy: 0.4655 - val_loss: 1.5483 - val_accuracy: 0.4450\n", + "Epoch 17/100\n", + "1407/1407 [==============================] - 12s 9ms/step - loss: 1.4690 - accuracy: 0.4741 - val_loss: 1.5686 - val_accuracy: 0.4398\n", + "Epoch 18/100\n", + "1407/1407 [==============================] - 12s 9ms/step - loss: 1.4530 - accuracy: 0.4814 - val_loss: 1.5176 - val_accuracy: 0.4588\n", + "Epoch 19/100\n", + "1407/1407 [==============================] - 12s 9ms/step - loss: 1.4254 - accuracy: 0.4887 - val_loss: 1.5407 - val_accuracy: 0.4556\n", + "Epoch 20/100\n", + "1407/1407 [==============================] - 12s 9ms/step - loss: 1.4167 - accuracy: 0.4908 - val_loss: 1.5124 - val_accuracy: 0.4598\n", + "Epoch 21/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.4132 - accuracy: 0.4940 - val_loss: 1.5697 - val_accuracy: 0.4456\n", + "Epoch 22/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.4092 - accuracy: 0.4909 - val_loss: 1.5215 - val_accuracy: 0.4550\n", + "Epoch 23/100\n", + "1407/1407 [==============================] - 12s 9ms/step - loss: 1.3812 - accuracy: 0.5018 - val_loss: 1.5259 - val_accuracy: 0.4558\n", + "Epoch 24/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.3708 - accuracy: 0.5068 - val_loss: 1.5368 - val_accuracy: 0.4616\n", + "Epoch 25/100\n", + "1407/1407 [==============================] - 12s 9ms/step - loss: 1.3730 - accuracy: 0.5061 - val_loss: 1.5012 - val_accuracy: 0.4656\n", + "Epoch 26/100\n", + "1407/1407 [==============================] - 12s 9ms/step - loss: 1.3413 - accuracy: 0.5160 - val_loss: 1.5261 - val_accuracy: 0.4538\n", + "Epoch 27/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.3396 - accuracy: 0.5184 - val_loss: 1.5085 - val_accuracy: 0.4638\n", + "Epoch 28/100\n", + "1407/1407 [==============================] - 12s 9ms/step - loss: 1.3297 - accuracy: 0.5219 - val_loss: 1.5276 - val_accuracy: 0.4604\n", + "Epoch 29/100\n", + "1407/1407 [==============================] - 12s 9ms/step - loss: 1.3327 - accuracy: 0.5197 - val_loss: 1.5129 - val_accuracy: 0.4642\n", + "Epoch 30/100\n", + "1407/1407 [==============================] - 12s 9ms/step - loss: 1.3217 - accuracy: 0.5230 - val_loss: 1.5549 - val_accuracy: 0.4634\n", + "Epoch 31/100\n", + "1407/1407 [==============================] - 12s 9ms/step - loss: 1.3237 - accuracy: 0.5222 - val_loss: 1.5363 - val_accuracy: 0.4582\n", + "Epoch 32/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.2889 - accuracy: 0.5341 - val_loss: 1.4979 - val_accuracy: 0.4766\n", + "Epoch 33/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.2933 - accuracy: 0.5362 - val_loss: 1.5370 - val_accuracy: 0.4622\n", + "Epoch 34/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.2736 - accuracy: 0.5390 - val_loss: 1.5247 - val_accuracy: 0.4698\n", + "Epoch 35/100\n", + "1407/1407 [==============================] - 12s 9ms/step - loss: 1.2719 - accuracy: 0.5433 - val_loss: 1.4904 - val_accuracy: 0.4768\n", + "Epoch 36/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.2673 - accuracy: 0.5467 - val_loss: 1.5016 - val_accuracy: 0.4780\n", + "Epoch 37/100\n", + "1407/1407 [==============================] - 12s 9ms/step - loss: 1.2518 - accuracy: 0.5478 - val_loss: 1.4951 - val_accuracy: 0.4810\n", + "Epoch 38/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.2393 - accuracy: 0.5572 - val_loss: 1.4962 - val_accuracy: 0.4770\n", + "Epoch 39/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.2372 - accuracy: 0.5526 - val_loss: 1.5172 - val_accuracy: 0.4732\n", + "Epoch 40/100\n", + "1407/1407 [==============================] - 12s 9ms/step - loss: 1.2280 - accuracy: 0.5606 - val_loss: 1.5011 - val_accuracy: 0.4768\n", + "Epoch 41/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.2190 - accuracy: 0.5625 - val_loss: 1.5301 - val_accuracy: 0.4740\n", + "Epoch 42/100\n", + "1407/1407 [==============================] - 12s 9ms/step - loss: 1.2113 - accuracy: 0.5695 - val_loss: 1.5344 - val_accuracy: 0.4746\n", + "Epoch 43/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.2086 - accuracy: 0.5617 - val_loss: 1.5503 - val_accuracy: 0.4638\n", + "Epoch 44/100\n", + "1407/1407 [==============================] - 12s 9ms/step - loss: 1.1997 - accuracy: 0.5712 - val_loss: 1.5310 - val_accuracy: 0.4814\n", + "Epoch 45/100\n", + "1407/1407 [==============================] - 12s 9ms/step - loss: 1.1881 - accuracy: 0.5744 - val_loss: 1.4936 - val_accuracy: 0.4852\n", + "Epoch 46/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.1747 - accuracy: 0.5788 - val_loss: 1.5113 - val_accuracy: 0.4778\n", + "Epoch 47/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.1738 - accuracy: 0.5753 - val_loss: 1.5495 - val_accuracy: 0.4750\n", + "Epoch 48/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.1679 - accuracy: 0.5796 - val_loss: 1.4970 - val_accuracy: 0.4878\n", + "Epoch 49/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.1723 - accuracy: 0.5763 - val_loss: 1.5314 - val_accuracy: 0.4812\n", + "Epoch 50/100\n", + "1407/1407 [==============================] - 12s 9ms/step - loss: 1.1544 - accuracy: 0.5855 - val_loss: 1.5753 - val_accuracy: 0.4734\n", + "Epoch 51/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.1567 - accuracy: 0.5833 - val_loss: 1.5835 - val_accuracy: 0.4692\n", + "Epoch 52/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.1442 - accuracy: 0.5877 - val_loss: 1.5382 - val_accuracy: 0.4800\n", + "Epoch 53/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.1309 - accuracy: 0.5963 - val_loss: 1.5327 - val_accuracy: 0.4848\n", + "Epoch 54/100\n", + "1407/1407 [==============================] - 12s 9ms/step - loss: 1.1219 - accuracy: 0.5970 - val_loss: 1.5581 - val_accuracy: 0.4826\n", + "Epoch 55/100\n", + "1407/1407 [==============================] - 12s 9ms/step - loss: 1.1241 - accuracy: 0.5986 - val_loss: 1.5292 - val_accuracy: 0.4886\n" + ], + "name": "stdout" + }, + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 133 + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "2WziHKxHLOpl", + "outputId": "2e8c64ce-7966-43e1-e0a2-6e65ac4e24d5", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "model = keras.models.load_model(\"my_cifar10_model.h5\")\n", + "model.evaluate(X_valid, y_valid)" + ], + "execution_count": 134, + "outputs": [ + { + "output_type": "stream", + "text": [ + "157/157 [==============================] - 1s 2ms/step - loss: 1.4904 - accuracy: 0.4768\n" + ], + "name": "stdout" + }, + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "[1.4903972148895264, 0.47679999470710754]" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 134 + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "eaO_qFxHLOpl" + }, + "source": [ + "가장 낮은 검증 손실을 내는 모델은 검증 세트에서 약 47% 정확도를 얻었습니다. 이 검증 점수에 도달하는데 39번의 에포크가 걸렸습니다. (GPU가 없는) 제 노트북에서 에포크당 약 10초 정도 걸렸습니다. 배치 정규화를 사용해 성능을 올릴 수 있는지 확인해 보죠." + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "4zqEUxjPLOpl" + }, + "source": [ + "### c.\n", + "*문제: 배치 정규화를 추가하고 학습 곡선을 비교해보세요. 이전보다 빠르게 수렴하나요? 더 좋은 모델이 만들어지나요? 훈련 속도에는 어떤 영향을 미치나요?*" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "C41Agl-yLOpl" + }, + "source": [ + "다음 코드는 위의 코드와 배우 비슷합니다. 몇 가지 다른 점은 아래와 같습니다:\n", + "\n", + "* 출력층을 제외하고 모든 `Dense` 층 다음에 (활성화 함수 전에) BN 층을 추가했습니다. 처음 은닉층 전에도 BN 층을 추가했습니다.\n", + "* 학습률을 5e-4로 바꾸었습니다. 1e-5, 3e-5, 5e-5, 1e-4, 3e-4, 5e-4, 1e-3, 3e-3를 시도해 보고 20번 에포크 후에 검증 세트 성능이 가장 좋은 것을 선택했습니다.\n", + "* run_logdir를 run_bn_* 으로 이름을 바꾸고 모델 파일 이름을 my_cifar10_bn_model.h5로 변경했습니다." + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "LczWnbDULOpl", + "outputId": "76d0babb-d132-4b87-ac73-e5e91002a6c1", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "keras.backend.clear_session()\n", + "tf.random.set_seed(42)\n", + "np.random.seed(42)\n", + "\n", + "model = keras.models.Sequential()\n", + "model.add(keras.layers.Flatten(input_shape=[32, 32, 3]))\n", + "model.add(keras.layers.BatchNormalization())\n", + "for _ in range(20):\n", + " model.add(keras.layers.Dense(100, kernel_initializer=\"he_normal\"))\n", + " model.add(keras.layers.BatchNormalization())\n", + " model.add(keras.layers.Activation(\"elu\"))\n", + "model.add(keras.layers.Dense(10, activation=\"softmax\"))\n", + "\n", + "optimizer = keras.optimizers.Nadam(lr=5e-4)\n", + "model.compile(loss=\"sparse_categorical_crossentropy\",\n", + " optimizer=optimizer,\n", + " metrics=[\"accuracy\"])\n", + "\n", + "early_stopping_cb = keras.callbacks.EarlyStopping(patience=20)\n", + "model_checkpoint_cb = keras.callbacks.ModelCheckpoint(\"my_cifar10_bn_model.h5\", save_best_only=True)\n", + "run_index = 1 # 모델을 훈련할 때마다 증가시킴\n", + "run_logdir = os.path.join(os.curdir, \"my_cifar10_logs\", \"run_bn_{:03d}\".format(run_index))\n", + "tensorboard_cb = keras.callbacks.TensorBoard(run_logdir)\n", + "callbacks = [early_stopping_cb, model_checkpoint_cb, tensorboard_cb]\n", + "\n", + "model.fit(X_train, y_train, epochs=100,\n", + " validation_data=(X_valid, y_valid),\n", + " callbacks=callbacks)\n", + "\n", + "model = keras.models.load_model(\"my_cifar10_bn_model.h5\")\n", + "model.evaluate(X_valid, y_valid)" + ], + "execution_count": 135, + "outputs": [ + { + "output_type": "stream", + "text": [ + "Epoch 1/100\n", + "1407/1407 [==============================] - 44s 26ms/step - loss: 1.9805 - accuracy: 0.2905 - val_loss: 1.6707 - val_accuracy: 0.3934\n", + "Epoch 2/100\n", + "1407/1407 [==============================] - 35s 25ms/step - loss: 1.6843 - accuracy: 0.3997 - val_loss: 1.5906 - val_accuracy: 0.4302\n", + "Epoch 3/100\n", + "1407/1407 [==============================] - 35s 25ms/step - loss: 1.6114 - accuracy: 0.4293 - val_loss: 1.6091 - val_accuracy: 0.4318\n", + "Epoch 4/100\n", + "1407/1407 [==============================] - 35s 25ms/step - loss: 1.5527 - accuracy: 0.4483 - val_loss: 1.5315 - val_accuracy: 0.4504\n", + "Epoch 5/100\n", + "1407/1407 [==============================] - 35s 25ms/step - loss: 1.5020 - accuracy: 0.4681 - val_loss: 1.4365 - val_accuracy: 0.4858\n", + "Epoch 6/100\n", + "1407/1407 [==============================] - 35s 25ms/step - loss: 1.4614 - accuracy: 0.4817 - val_loss: 1.4284 - val_accuracy: 0.4914\n", + "Epoch 7/100\n", + "1407/1407 [==============================] - 35s 25ms/step - loss: 1.4271 - accuracy: 0.4942 - val_loss: 1.4083 - val_accuracy: 0.4990\n", + "Epoch 8/100\n", + "1407/1407 [==============================] - 35s 25ms/step - loss: 1.4021 - accuracy: 0.5032 - val_loss: 1.3799 - val_accuracy: 0.5064\n", + "Epoch 9/100\n", + "1407/1407 [==============================] - 35s 25ms/step - loss: 1.3795 - accuracy: 0.5143 - val_loss: 1.3858 - val_accuracy: 0.5102\n", + "Epoch 10/100\n", + "1407/1407 [==============================] - 35s 25ms/step - loss: 1.3562 - accuracy: 0.5171 - val_loss: 1.3409 - val_accuracy: 0.5198\n", + "Epoch 11/100\n", + "1407/1407 [==============================] - 35s 25ms/step - loss: 1.3239 - accuracy: 0.5293 - val_loss: 1.3554 - val_accuracy: 0.5210\n", + "Epoch 12/100\n", + "1407/1407 [==============================] - 35s 25ms/step - loss: 1.3125 - accuracy: 0.5374 - val_loss: 1.3739 - val_accuracy: 0.5104\n", + "Epoch 13/100\n", + "1407/1407 [==============================] - 35s 25ms/step - loss: 1.2838 - accuracy: 0.5461 - val_loss: 1.3909 - val_accuracy: 0.5128\n", + "Epoch 14/100\n", + "1407/1407 [==============================] - 35s 25ms/step - loss: 1.2656 - accuracy: 0.5475 - val_loss: 1.3442 - val_accuracy: 0.5294\n", + "Epoch 15/100\n", + "1407/1407 [==============================] - 35s 25ms/step - loss: 1.2607 - accuracy: 0.5568 - val_loss: 1.3741 - val_accuracy: 0.5220\n", + "Epoch 16/100\n", + "1407/1407 [==============================] - 35s 25ms/step - loss: 1.2468 - accuracy: 0.5587 - val_loss: 1.3371 - val_accuracy: 0.5312\n", + "Epoch 17/100\n", + "1407/1407 [==============================] - 35s 25ms/step - loss: 1.2273 - accuracy: 0.5681 - val_loss: 1.3262 - val_accuracy: 0.5360\n", + "Epoch 18/100\n", + "1407/1407 [==============================] - 35s 25ms/step - loss: 1.2085 - accuracy: 0.5716 - val_loss: 1.3367 - val_accuracy: 0.5334\n", + "Epoch 19/100\n", + "1407/1407 [==============================] - 35s 25ms/step - loss: 1.1996 - accuracy: 0.5772 - val_loss: 1.3809 - val_accuracy: 0.5242\n", + "Epoch 20/100\n", + "1407/1407 [==============================] - 35s 25ms/step - loss: 1.1907 - accuracy: 0.5818 - val_loss: 1.3691 - val_accuracy: 0.5260\n", + "Epoch 21/100\n", + "1407/1407 [==============================] - 34s 24ms/step - loss: 1.1703 - accuracy: 0.5848 - val_loss: 1.3534 - val_accuracy: 0.5306\n", + "Epoch 22/100\n", + "1407/1407 [==============================] - 35s 25ms/step - loss: 1.1584 - accuracy: 0.5909 - val_loss: 1.3587 - val_accuracy: 0.5240\n", + "Epoch 23/100\n", + "1407/1407 [==============================] - 35s 25ms/step - loss: 1.1434 - accuracy: 0.5985 - val_loss: 1.3365 - val_accuracy: 0.5412\n", + "Epoch 24/100\n", + "1407/1407 [==============================] - 35s 25ms/step - loss: 1.1331 - accuracy: 0.6005 - val_loss: 1.3189 - val_accuracy: 0.5474\n", + "Epoch 25/100\n", + "1407/1407 [==============================] - 35s 25ms/step - loss: 1.1182 - accuracy: 0.6056 - val_loss: 1.3208 - val_accuracy: 0.5406\n", + "Epoch 26/100\n", + "1407/1407 [==============================] - 34s 24ms/step - loss: 1.0999 - accuracy: 0.6107 - val_loss: 1.3565 - val_accuracy: 0.5348\n", + "Epoch 27/100\n", + "1407/1407 [==============================] - 34s 24ms/step - loss: 1.0898 - accuracy: 0.6168 - val_loss: 1.3557 - val_accuracy: 0.5328\n", + "Epoch 28/100\n", + "1407/1407 [==============================] - 34s 24ms/step - loss: 1.0888 - accuracy: 0.6197 - val_loss: 1.3448 - val_accuracy: 0.5334\n", + "Epoch 29/100\n", + "1407/1407 [==============================] - 34s 24ms/step - loss: 1.0868 - accuracy: 0.6142 - val_loss: 1.3385 - val_accuracy: 0.5428\n", + "Epoch 30/100\n", + "1407/1407 [==============================] - 34s 24ms/step - loss: 1.0712 - accuracy: 0.6226 - val_loss: 1.3513 - val_accuracy: 0.5376\n", + "Epoch 31/100\n", + "1407/1407 [==============================] - 34s 24ms/step - loss: 1.0632 - accuracy: 0.6221 - val_loss: 1.3549 - val_accuracy: 0.5388\n", + "Epoch 32/100\n", + "1407/1407 [==============================] - 35s 25ms/step - loss: 1.0427 - accuracy: 0.6313 - val_loss: 1.3651 - val_accuracy: 0.5420\n", + "Epoch 33/100\n", + "1407/1407 [==============================] - 35s 25ms/step - loss: 1.0328 - accuracy: 0.6341 - val_loss: 1.3301 - val_accuracy: 0.5442\n", + "Epoch 34/100\n", + "1407/1407 [==============================] - 35s 25ms/step - loss: 1.0265 - accuracy: 0.6392 - val_loss: 1.3481 - val_accuracy: 0.5412\n", + "Epoch 35/100\n", + "1407/1407 [==============================] - 34s 24ms/step - loss: 1.0217 - accuracy: 0.6412 - val_loss: 1.3520 - val_accuracy: 0.5414\n", + "Epoch 36/100\n", + "1407/1407 [==============================] - 34s 25ms/step - loss: 1.0009 - accuracy: 0.6463 - val_loss: 1.3634 - val_accuracy: 0.5320\n", + "Epoch 37/100\n", + "1407/1407 [==============================] - 34s 24ms/step - loss: 0.9865 - accuracy: 0.6520 - val_loss: 1.3685 - val_accuracy: 0.5304\n", + "Epoch 38/100\n", + "1407/1407 [==============================] - 34s 25ms/step - loss: 0.9805 - accuracy: 0.6567 - val_loss: 1.3807 - val_accuracy: 0.5314\n", + "Epoch 39/100\n", + "1407/1407 [==============================] - 34s 24ms/step - loss: 0.9782 - accuracy: 0.6517 - val_loss: 1.3851 - val_accuracy: 0.5438\n", + "Epoch 40/100\n", + "1407/1407 [==============================] - 34s 24ms/step - loss: 0.9646 - accuracy: 0.6644 - val_loss: 1.4195 - val_accuracy: 0.5328\n", + "Epoch 41/100\n", + "1407/1407 [==============================] - 35s 25ms/step - loss: 0.9540 - accuracy: 0.6661 - val_loss: 1.3478 - val_accuracy: 0.5542\n", + "Epoch 42/100\n", + "1407/1407 [==============================] - 35s 25ms/step - loss: 0.9528 - accuracy: 0.6655 - val_loss: 1.3789 - val_accuracy: 0.5440\n", + "Epoch 43/100\n", + "1407/1407 [==============================] - 34s 24ms/step - loss: 0.9449 - accuracy: 0.6667 - val_loss: 1.3721 - val_accuracy: 0.5410\n", + "Epoch 44/100\n", + "1407/1407 [==============================] - 34s 24ms/step - loss: 0.9345 - accuracy: 0.6723 - val_loss: 1.4136 - val_accuracy: 0.5348\n", + "157/157 [==============================] - 1s 3ms/step - loss: 1.3189 - accuracy: 0.5474\n" + ], + "name": "stdout" + }, + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "[1.318870186805725, 0.5473999977111816]" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 135 + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "wKjSeUIXLOpl" + }, + "source": [ + "* *이전보다 빠르게 수렴하나요?* 훨씬 빠릅니다! 이전 모델은 가장 낮은 검증 손실에 도달하기 위해 39 에포크가 걸렸지만 BN을 사용한 새 모델은 18 에포크가 걸렸습니다. 이전 모델보다 두 배 이상 빠릅니다. BN 층은 훈련을 안정적으로 수행하고 더 큰 학습률을 사용할 수 있기 때문에 수렴이 빨라졌습니다.\n", + "* *BN이 더 좋은 모델을 만드나요?* 네! 최종 모델의 성능이 47%가 아니라 55% 정확도로 더 좋습니다. 이는 아주 좋은 모델이 아니지만 적어도 이전보다는 낫습니다(합성곱 신경망이 더 낫겠지만 이는 다른 주제입니다. 14장을 참고하세요).\n", + "* *BN이 훈련 속도에 영향을 미치나요?* 모델이 두 배나 빠르게 수렴했지만 각 에포크는 10초가 아니라 16초가 걸렸습니다. BN 층에서 추가된 계산 때문입니다. 따라서 전체적으로 에포크 횟수가 50% 정도 줄었지만 훈련 시간(탁상 시계 시간)은 30% 정도 줄었습니다. 결국 크게 향상되었습니다!" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "oJr9kBV5LOpm" + }, + "source": [ + "### d.\n", + "*문제: 배치 정규화를 SELU로 바꾸어보세요. 네트워크가 자기 정규화하기 위해 필요한 변경 사항을 적용해보세요(즉, 입력 특성 표준화, 르쿤 정규분포 초기화, 완전 연결 층만 순차적으로 쌓은 심층 신경망 등).*" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "ZAfEp5gNLOpm", + "outputId": "37cf90e0-b80f-4616-f168-03a99c6c5648", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "keras.backend.clear_session()\n", + "tf.random.set_seed(42)\n", + "np.random.seed(42)\n", + "\n", + "model = keras.models.Sequential()\n", + "model.add(keras.layers.Flatten(input_shape=[32, 32, 3]))\n", + "for _ in range(20):\n", + " model.add(keras.layers.Dense(100,\n", + " kernel_initializer=\"lecun_normal\",\n", + " activation=\"selu\"))\n", + "model.add(keras.layers.Dense(10, activation=\"softmax\"))\n", + "\n", + "optimizer = keras.optimizers.Nadam(lr=7e-4)\n", + "model.compile(loss=\"sparse_categorical_crossentropy\",\n", + " optimizer=optimizer,\n", + " metrics=[\"accuracy\"])\n", + "\n", + "early_stopping_cb = keras.callbacks.EarlyStopping(patience=20)\n", + "model_checkpoint_cb = keras.callbacks.ModelCheckpoint(\"my_cifar10_selu_model.h5\", save_best_only=True)\n", + "run_index = 1 # 모델을 훈련할 때마다 증가시킴\n", + "run_logdir = os.path.join(os.curdir, \"my_cifar10_logs\", \"run_selu_{:03d}\".format(run_index))\n", + "tensorboard_cb = keras.callbacks.TensorBoard(run_logdir)\n", + "callbacks = [early_stopping_cb, model_checkpoint_cb, tensorboard_cb]\n", + "\n", + "X_means = X_train.mean(axis=0)\n", + "X_stds = X_train.std(axis=0)\n", + "X_train_scaled = (X_train - X_means) / X_stds\n", + "X_valid_scaled = (X_valid - X_means) / X_stds\n", + "X_test_scaled = (X_test - X_means) / X_stds\n", + "\n", + "model.fit(X_train_scaled, y_train, epochs=100,\n", + " validation_data=(X_valid_scaled, y_valid),\n", + " callbacks=callbacks)\n", + "\n", + "model = keras.models.load_model(\"my_cifar10_selu_model.h5\")\n", + "model.evaluate(X_valid_scaled, y_valid)" + ], + "execution_count": 136, + "outputs": [ + { + "output_type": "stream", + "text": [ + "Epoch 1/100\n", + "1407/1407 [==============================] - 17s 10ms/step - loss: 2.0543 - accuracy: 0.2663 - val_loss: 1.7895 - val_accuracy: 0.3680\n", + "Epoch 2/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.7162 - accuracy: 0.3874 - val_loss: 1.8017 - val_accuracy: 0.3720\n", + "Epoch 3/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.6257 - accuracy: 0.4268 - val_loss: 1.6563 - val_accuracy: 0.4172\n", + "Epoch 4/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.5436 - accuracy: 0.4569 - val_loss: 1.6334 - val_accuracy: 0.4386\n", + "Epoch 5/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.4967 - accuracy: 0.4752 - val_loss: 1.6055 - val_accuracy: 0.4424\n", + "Epoch 6/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.4495 - accuracy: 0.4914 - val_loss: 1.5408 - val_accuracy: 0.4574\n", + "Epoch 7/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.4016 - accuracy: 0.5107 - val_loss: 1.5620 - val_accuracy: 0.4540\n", + "Epoch 8/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.3616 - accuracy: 0.5232 - val_loss: 1.5098 - val_accuracy: 0.4726\n", + "Epoch 9/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.3246 - accuracy: 0.5393 - val_loss: 1.4862 - val_accuracy: 0.4698\n", + "Epoch 10/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.2975 - accuracy: 0.5491 - val_loss: 1.4937 - val_accuracy: 0.4912\n", + "Epoch 11/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.2568 - accuracy: 0.5690 - val_loss: 1.5241 - val_accuracy: 0.4978\n", + "Epoch 12/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.2373 - accuracy: 0.5745 - val_loss: 1.5144 - val_accuracy: 0.4754\n", + "Epoch 13/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.2129 - accuracy: 0.5821 - val_loss: 1.4959 - val_accuracy: 0.5082\n", + "Epoch 14/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.1765 - accuracy: 0.5976 - val_loss: 1.4949 - val_accuracy: 0.5020\n", + "Epoch 15/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.1584 - accuracy: 0.6032 - val_loss: 1.5359 - val_accuracy: 0.4958\n", + "Epoch 16/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.1476 - accuracy: 0.6054 - val_loss: 1.5124 - val_accuracy: 0.5024\n", + "Epoch 17/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.1305 - accuracy: 0.6166 - val_loss: 1.5296 - val_accuracy: 0.5036\n", + "Epoch 18/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.0998 - accuracy: 0.6253 - val_loss: 1.4755 - val_accuracy: 0.5022\n", + "Epoch 19/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.0959 - accuracy: 0.6324 - val_loss: 1.6318 - val_accuracy: 0.4636\n", + "Epoch 20/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.1792 - accuracy: 0.5927 - val_loss: 1.5011 - val_accuracy: 0.5054\n", + "Epoch 21/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.0341 - accuracy: 0.6458 - val_loss: 1.5519 - val_accuracy: 0.5038\n", + "Epoch 22/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.0028 - accuracy: 0.6588 - val_loss: 1.5129 - val_accuracy: 0.5106\n", + "Epoch 23/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.0480 - accuracy: 0.6548 - val_loss: 1.5322 - val_accuracy: 0.4728\n", + "Epoch 24/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.1508 - accuracy: 0.6021 - val_loss: 1.5160 - val_accuracy: 0.5052\n", + "Epoch 25/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.0125 - accuracy: 0.6555 - val_loss: 1.5517 - val_accuracy: 0.5004\n", + "Epoch 26/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.0041 - accuracy: 0.6594 - val_loss: 1.5464 - val_accuracy: 0.4994\n", + "Epoch 27/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.0239 - accuracy: 0.6504 - val_loss: 1.5180 - val_accuracy: 0.5124\n", + "Epoch 28/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 0.9534 - accuracy: 0.6749 - val_loss: 1.5762 - val_accuracy: 0.5006\n", + "Epoch 29/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 0.9281 - accuracy: 0.6852 - val_loss: 1.5844 - val_accuracy: 0.5174\n", + "Epoch 30/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 0.9285 - accuracy: 0.6879 - val_loss: 1.5761 - val_accuracy: 0.5070\n", + "Epoch 31/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 0.9284 - accuracy: 0.6851 - val_loss: 1.5662 - val_accuracy: 0.5022\n", + "Epoch 32/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 0.9068 - accuracy: 0.6945 - val_loss: 1.5796 - val_accuracy: 0.5050\n", + "Epoch 33/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 0.9320 - accuracy: 0.6830 - val_loss: 1.5989 - val_accuracy: 0.5112\n", + "Epoch 34/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 128.6344 - accuracy: 0.6796 - val_loss: 1.6077 - val_accuracy: 0.4778\n", + "Epoch 35/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.1029 - accuracy: 0.6221 - val_loss: 1.5892 - val_accuracy: 0.4914\n", + "Epoch 36/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.0178 - accuracy: 0.6509 - val_loss: 1.6135 - val_accuracy: 0.4984\n", + "Epoch 37/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 0.9726 - accuracy: 0.6713 - val_loss: 1.6034 - val_accuracy: 0.5038\n", + "Epoch 38/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 0.9423 - accuracy: 0.6813 - val_loss: 1.6206 - val_accuracy: 0.5006\n", + "157/157 [==============================] - 1s 2ms/step - loss: 1.4755 - accuracy: 0.5022\n" + ], + "name": "stdout" + }, + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "[1.4755374193191528, 0.5022000074386597]" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 136 + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "c47RjcCqLOpm", + "outputId": "f3aefa6c-a958-42fb-da55-c137c672b7ee", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "model = keras.models.load_model(\"my_cifar10_selu_model.h5\")\n", + "model.evaluate(X_valid_scaled, y_valid)" + ], + "execution_count": 137, + "outputs": [ + { + "output_type": "stream", + "text": [ + "157/157 [==============================] - 1s 3ms/step - loss: 1.4755 - accuracy: 0.5022\n" + ], + "name": "stdout" + }, + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "[1.4755374193191528, 0.5022000074386597]" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 137 + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "tiqKhLWPLOpn" + }, + "source": [ + "51.4% 정확도를 얻었습니다. 원래 모델보다 더 좋습니다. 하지만 배치 정규화를 사용한 모델만큼 좋지는 않습니다. 최고의 모델에 도달하는데 13 에포크가 걸렸습니다. 이는 원본 모델이나 BN 모델보다 더 빠른 것입니다. 각 에포크는 원본 모델처럼 10초만 걸렸습니다. 따라서 이 모델이 지금까지 가장 빠른 모델입니다(에포크와 탁상 시계 기준으로)." + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "q1pbE7gjLOpn" + }, + "source": [ + "### e.\n", + "*문제: 알파 드롭아웃으로 모델에 규제를 적용해보세요. 그다음 모델을 다시 훈련하지 않고 MC 드롭아웃으로 더 높은 정확도를 얻을 수 있는지 확인해보세요.*" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "RnApp_3mLOpn", + "outputId": "ccdd98f7-f09c-4fb9-d3db-af4ddf65a8ab", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "keras.backend.clear_session()\n", + "tf.random.set_seed(42)\n", + "np.random.seed(42)\n", + "\n", + "model = keras.models.Sequential()\n", + "model.add(keras.layers.Flatten(input_shape=[32, 32, 3]))\n", + "for _ in range(20):\n", + " model.add(keras.layers.Dense(100,\n", + " kernel_initializer=\"lecun_normal\",\n", + " activation=\"selu\"))\n", + "\n", + "model.add(keras.layers.AlphaDropout(rate=0.1))\n", + "model.add(keras.layers.Dense(10, activation=\"softmax\"))\n", + "\n", + "optimizer = keras.optimizers.Nadam(lr=5e-4)\n", + "model.compile(loss=\"sparse_categorical_crossentropy\",\n", + " optimizer=optimizer,\n", + " metrics=[\"accuracy\"])\n", + "\n", + "early_stopping_cb = keras.callbacks.EarlyStopping(patience=20)\n", + "model_checkpoint_cb = keras.callbacks.ModelCheckpoint(\"my_cifar10_alpha_dropout_model.h5\", save_best_only=True)\n", + "run_index = 1 # 모델을 훈련할 때마다 증가시킴\n", + "run_logdir = os.path.join(os.curdir, \"my_cifar10_logs\", \"run_alpha_dropout_{:03d}\".format(run_index))\n", + "tensorboard_cb = keras.callbacks.TensorBoard(run_logdir)\n", + "callbacks = [early_stopping_cb, model_checkpoint_cb, tensorboard_cb]\n", + "\n", + "X_means = X_train.mean(axis=0)\n", + "X_stds = X_train.std(axis=0)\n", + "X_train_scaled = (X_train - X_means) / X_stds\n", + "X_valid_scaled = (X_valid - X_means) / X_stds\n", + "X_test_scaled = (X_test - X_means) / X_stds\n", + "\n", + "model.fit(X_train_scaled, y_train, epochs=100,\n", + " validation_data=(X_valid_scaled, y_valid),\n", + " callbacks=callbacks)\n", + "\n", + "model = keras.models.load_model(\"my_cifar10_alpha_dropout_model.h5\")\n", + "model.evaluate(X_valid_scaled, y_valid)" + ], + "execution_count": 138, + "outputs": [ + { + "output_type": "stream", + "text": [ + "Epoch 1/100\n", + "1407/1407 [==============================] - 17s 10ms/step - loss: 2.0545 - accuracy: 0.2804 - val_loss: 1.7849 - val_accuracy: 0.3802\n", + "Epoch 2/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.6891 - accuracy: 0.4028 - val_loss: 1.6433 - val_accuracy: 0.4222\n", + "Epoch 3/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.5892 - accuracy: 0.4414 - val_loss: 1.6071 - val_accuracy: 0.4362\n", + "Epoch 4/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.5089 - accuracy: 0.4714 - val_loss: 1.5975 - val_accuracy: 0.4482\n", + "Epoch 5/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.4522 - accuracy: 0.4934 - val_loss: 1.6036 - val_accuracy: 0.4602\n", + "Epoch 6/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.4014 - accuracy: 0.5114 - val_loss: 1.5332 - val_accuracy: 0.4778\n", + "Epoch 7/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.3527 - accuracy: 0.5290 - val_loss: 1.5837 - val_accuracy: 0.4700\n", + "Epoch 8/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.3182 - accuracy: 0.5379 - val_loss: 1.4835 - val_accuracy: 0.5016\n", + "Epoch 9/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.2835 - accuracy: 0.5536 - val_loss: 1.5400 - val_accuracy: 0.4866\n", + "Epoch 10/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.2473 - accuracy: 0.5677 - val_loss: 1.5282 - val_accuracy: 0.4944\n", + "Epoch 11/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.2099 - accuracy: 0.5855 - val_loss: 1.5768 - val_accuracy: 0.5080\n", + "Epoch 12/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.1898 - accuracy: 0.5905 - val_loss: 1.5192 - val_accuracy: 0.5046\n", + "Epoch 13/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.1486 - accuracy: 0.6044 - val_loss: 1.5302 - val_accuracy: 0.5092\n", + "Epoch 14/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.1219 - accuracy: 0.6141 - val_loss: 1.5072 - val_accuracy: 0.5086\n", + "Epoch 15/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.1008 - accuracy: 0.6171 - val_loss: 1.6471 - val_accuracy: 0.5088\n", + "Epoch 16/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.0778 - accuracy: 0.6309 - val_loss: 1.6557 - val_accuracy: 0.5152\n", + "Epoch 17/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.0515 - accuracy: 0.6434 - val_loss: 1.6130 - val_accuracy: 0.5208\n", + "Epoch 18/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.0246 - accuracy: 0.6530 - val_loss: 1.6559 - val_accuracy: 0.5082\n", + "Epoch 19/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 1.0088 - accuracy: 0.6552 - val_loss: 1.7325 - val_accuracy: 0.5126\n", + "Epoch 20/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 0.9908 - accuracy: 0.6627 - val_loss: 1.6986 - val_accuracy: 0.5134\n", + "Epoch 21/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 0.9657 - accuracy: 0.6694 - val_loss: 1.7291 - val_accuracy: 0.5010\n", + "Epoch 22/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 0.9548 - accuracy: 0.6728 - val_loss: 1.7533 - val_accuracy: 0.5140\n", + "Epoch 23/100\n", + "1407/1407 [==============================] - 13s 10ms/step - loss: 0.9199 - accuracy: 0.6913 - val_loss: 1.7172 - val_accuracy: 0.5042\n", + "Epoch 24/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 0.9132 - accuracy: 0.6906 - val_loss: 1.6688 - val_accuracy: 0.5206\n", + "Epoch 25/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 0.8955 - accuracy: 0.6978 - val_loss: 1.7418 - val_accuracy: 0.5156\n", + "Epoch 26/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 0.8596 - accuracy: 0.7116 - val_loss: 1.8324 - val_accuracy: 0.5188\n", + "Epoch 27/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 0.8607 - accuracy: 0.7123 - val_loss: 1.7325 - val_accuracy: 0.5100\n", + "Epoch 28/100\n", + "1407/1407 [==============================] - 13s 9ms/step - loss: 0.8528 - accuracy: 0.7139 - val_loss: 1.8382 - val_accuracy: 0.5002\n", + "157/157 [==============================] - 1s 2ms/step - loss: 1.4835 - accuracy: 0.5016\n" + ], + "name": "stdout" + }, + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "[1.4834871292114258, 0.5016000270843506]" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 138 + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "AsDa8NPNLOpn" + }, + "source": [ + "이 모델은 검증 세트에서 50.8% 정확도에 도달합니다. 드롭아웃이 없을 때보다(51.4%) 조금 더 나쁩니다. 하이퍼파라미터 탐색을 좀 많이 수행해 보면 더 나아 질 수 있습니다(드롭아웃 비율 5%, 10%, 20%, 40%과 학습률 1e-4, 3e-4, 5e-4, 1e-3을 시도했습니다). 하지만 이 경우에는 크지 않을 것 같습니다." + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "bNuTrZp6LOpn" + }, + "source": [ + "이제 MC 드롭아웃을 사용해 보죠. 앞서 사용한 `MCAlphaDropout` 클래스를 복사해 사용하겠습니다:" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "xUA1Qi9lLOpn" + }, + "source": [ + "class MCAlphaDropout(keras.layers.AlphaDropout):\n", + " def call(self, inputs):\n", + " return super().call(inputs, training=True)" + ], + "execution_count": 139, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "HgMCXU-lLOpn" + }, + "source": [ + "방금 훈련했던 모델과 (같은 가중치를 가진) 동일한 새로운 모델을 만들어 보죠. 하지만 `AlphaDropout` 층 대신 `MCAlphaDropout` 드롭아웃 층을 사용합니다:" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "TrqaKF9PLOpn" + }, + "source": [ + "mc_model = keras.models.Sequential([\n", + " MCAlphaDropout(layer.rate) if isinstance(layer, keras.layers.AlphaDropout) else layer\n", + " for layer in model.layers\n", + "])" + ], + "execution_count": 140, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "cqVC9dDXLOpn" + }, + "source": [ + "그다음 몇 가지 유틸리티 함수를 추가합니다. 첫 번째 함수는 모델을 여러 번 실행합니다(기본적으로 10번). 그다음 평균한 예측 클래스 확률을 반환합니다. 두 번째 함수는 이 평균 확률을 사용해 각 샘플의 클래스를 예측합니다:" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "_eXR7S5ILOpo" + }, + "source": [ + "def mc_dropout_predict_probas(mc_model, X, n_samples=10):\n", + " Y_probas = [mc_model.predict(X) for sample in range(n_samples)]\n", + " return np.mean(Y_probas, axis=0)\n", + "\n", + "def mc_dropout_predict_classes(mc_model, X, n_samples=10):\n", + " Y_probas = mc_dropout_predict_probas(mc_model, X, n_samples)\n", + " return np.argmax(Y_probas, axis=1)" + ], + "execution_count": 141, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "Iuu0Qr59LOpo" + }, + "source": [ + "이제 검증 세트의 모든 샘플에 대해 예측을 만들고 정확도를 계산해 보죠:" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "5HPOAWCLLOpo", + "outputId": "91fd39e3-2205-42aa-af3f-80a7af4b1867", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "keras.backend.clear_session()\n", + "tf.random.set_seed(42)\n", + "np.random.seed(42)\n", + "\n", + "y_pred = mc_dropout_predict_classes(mc_model, X_valid_scaled)\n", + "accuracy = np.mean(y_pred == y_valid[:, 0])\n", + "accuracy" + ], + "execution_count": 142, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "0.5024" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 142 + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "-eNayl7MLOpo" + }, + "source": [ + "이 경우에는 실제적인 정확도 향상이 없습니다(50.8%에서 50.9%).\n", + "\n", + "따라서 이 연습문에서 얻은 최상의 모델은 배치 정규화 모델입니다." + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "XvfEibM4LOpo" + }, + "source": [ + "### f.\n", + "*문제: 1사이클 스케줄링으로 모델을 다시 훈련하고 훈련 속도와 모델 정확도가 향상되는지 확인해보세요.*" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "93aZAECALOpo" + }, + "source": [ + "keras.backend.clear_session()\n", + "tf.random.set_seed(42)\n", + "np.random.seed(42)\n", + "\n", + "model = keras.models.Sequential()\n", + "model.add(keras.layers.Flatten(input_shape=[32, 32, 3]))\n", + "for _ in range(20):\n", + " model.add(keras.layers.Dense(100,\n", + " kernel_initializer=\"lecun_normal\",\n", + " activation=\"selu\"))\n", + "\n", + "model.add(keras.layers.AlphaDropout(rate=0.1))\n", + "model.add(keras.layers.Dense(10, activation=\"softmax\"))\n", + "\n", + "optimizer = keras.optimizers.SGD(lr=1e-3)\n", + "model.compile(loss=\"sparse_categorical_crossentropy\",\n", + " optimizer=optimizer,\n", + " metrics=[\"accuracy\"])" + ], + "execution_count": 143, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "Hy3EYeBLLOpo", + "outputId": "4740e094-df47-4ef0-ac39-6c0bc5a93aa5", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 376 + } + }, + "source": [ + "batch_size = 128\n", + "rates, losses = find_learning_rate(model, X_train_scaled, y_train, epochs=1, batch_size=batch_size)\n", + "plot_lr_vs_loss(rates, losses)\n", + "plt.axis([min(rates), max(rates), min(losses), (losses[0] + min(losses)) / 1.4])" + ], + "execution_count": 144, + "outputs": [ + { + "output_type": "stream", + "text": [ + "352/352 [==============================] - 2s 5ms/step - loss: nan - accuracy: 0.1251\n" + ], + "name": "stdout" + }, + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "(9.999999747378752e-06,\n", + " 9.999868392944336,\n", + " 2.6116409301757812,\n", + " 3.931788035801479)" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 144 + }, + { + "output_type": "display_data", + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYkAAAERCAYAAACO6FuTAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3deXxU5dn/8c+VnZCQQBLCGiIg+yKCirIq7lVb971aa23VPi59bK1PN9vaWqxtf7V1o+2jdV8qPloFXAAF3NgEFWSXsAphFQgEyFy/P2aCMc1AQpI5mcn3/XqdFzPn3HNy3Zkw19zLObe5OyIiIjVJCjoAERFpupQkREQkKiUJERGJSklCRESiUpIQEZGolCRERCSqlKADaEj5+fleXFwcdBgi0gg27ihnwxd76NchB7Ogo0ksc+bM2eTuBTUdS6gkUVxczOzZs4MOQ0Qawf1Tl/H71xbz7l2nk56SHHQ4CcXMSqIdU3eTiIhEpSQhIiJRKUmIiEhUShIiIhKVkoSIiESlJCEiIlEpSYiISFRKEiIiEpWShIiIRKUkISIiUSlJiIhIVEoSIiISlZKEiIhEpSQhIiJRKUmIiEhUShIiIhJVTJOEmT1hZuvN7AszW2Jm10YpZ2Z2l5mtNbPtZvaWmfWNZawiIhL7lsTdQLG7twLOAe4ys8E1lLsQuAYYAbQB3gMej1mUIiICxDhJuPsCdy+vfBrZutVQ9AhghruvcPcK4AmgT4zCFBGRiJiPSZjZA2ZWBiwC1gMT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pSYiISFRKEiIiEtX/B/3VwjtP7gEsAAAAAElFTkSuQmCC\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "tags": [], + "needs_background": "light" + } + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "G8aLsTeKLOpo" + }, + "source": [ + "keras.backend.clear_session()\n", + "tf.random.set_seed(42)\n", + "np.random.seed(42)\n", + "\n", + "model = keras.models.Sequential()\n", + "model.add(keras.layers.Flatten(input_shape=[32, 32, 3]))\n", + "for _ in range(20):\n", + " model.add(keras.layers.Dense(100,\n", + " kernel_initializer=\"lecun_normal\",\n", + " activation=\"selu\"))\n", + "\n", + "model.add(keras.layers.AlphaDropout(rate=0.1))\n", + "model.add(keras.layers.Dense(10, activation=\"softmax\"))\n", + "\n", + "optimizer = keras.optimizers.SGD(lr=1e-2)\n", + "model.compile(loss=\"sparse_categorical_crossentropy\",\n", + " optimizer=optimizer,\n", + " metrics=[\"accuracy\"])" + ], + "execution_count": 145, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "MoHWUDtBLOpp", + "outputId": "10416f81-f6d1-4e78-8382-15ca285a9a4e", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "source": [ + "n_epochs = 15\n", + "onecycle = OneCycleScheduler(len(X_train_scaled) // batch_size * n_epochs, max_rate=0.05)\n", + "history = model.fit(X_train_scaled, y_train, epochs=n_epochs, batch_size=batch_size,\n", + " validation_data=(X_valid_scaled, y_valid),\n", + " callbacks=[onecycle])" + ], + "execution_count": 146, + "outputs": [ + { + "output_type": "stream", + "text": [ + "Epoch 1/15\n", + "352/352 [==============================] - 3s 5ms/step - loss: 2.2329 - accuracy: 0.2356 - val_loss: 1.7666 - val_accuracy: 0.3756\n", + "Epoch 2/15\n", + "352/352 [==============================] - 2s 5ms/step - loss: 1.7975 - accuracy: 0.3638 - val_loss: 1.6788 - val_accuracy: 0.4198\n", + "Epoch 3/15\n", + "352/352 [==============================] - 2s 5ms/step - loss: 1.6467 - accuracy: 0.4186 - val_loss: 1.6238 - val_accuracy: 0.4298\n", + "Epoch 4/15\n", + "352/352 [==============================] - 2s 5ms/step - loss: 1.5460 - accuracy: 0.4497 - val_loss: 1.7127 - val_accuracy: 0.4134\n", + "Epoch 5/15\n", + "352/352 [==============================] - 2s 5ms/step - loss: 1.4914 - accuracy: 0.4703 - val_loss: 1.6201 - val_accuracy: 0.4420\n", + "Epoch 6/15\n", + "352/352 [==============================] - 2s 5ms/step - loss: 1.4389 - accuracy: 0.4839 - val_loss: 1.5667 - val_accuracy: 0.4528\n", + "Epoch 7/15\n", + "352/352 [==============================] - 2s 5ms/step - loss: 1.4040 - accuracy: 0.5038 - val_loss: 1.5114 - val_accuracy: 0.4684\n", + "Epoch 8/15\n", + "352/352 [==============================] - 2s 5ms/step - loss: 1.3507 - accuracy: 0.5187 - val_loss: 1.4993 - val_accuracy: 0.4828\n", + "Epoch 9/15\n", + "352/352 [==============================] - 2s 5ms/step - loss: 1.2743 - accuracy: 0.5475 - val_loss: 1.5490 - val_accuracy: 0.4810\n", + "Epoch 10/15\n", + "352/352 [==============================] - 2s 5ms/step - loss: 1.1955 - accuracy: 0.5722 - val_loss: 1.5555 - val_accuracy: 0.4952\n", + "Epoch 11/15\n", + "352/352 [==============================] - 2s 5ms/step - loss: 1.1234 - accuracy: 0.6027 - val_loss: 1.5497 - val_accuracy: 0.5010\n", + "Epoch 12/15\n", + "352/352 [==============================] - 2s 5ms/step - loss: 1.0704 - accuracy: 0.6184 - val_loss: 1.4914 - val_accuracy: 0.5132\n", + "Epoch 13/15\n", + "352/352 [==============================] - 2s 5ms/step - loss: 0.9946 - accuracy: 0.6453 - val_loss: 1.5379 - val_accuracy: 0.5220\n", + "Epoch 14/15\n", + "352/352 [==============================] - 2s 5ms/step - loss: 0.9180 - accuracy: 0.6725 - val_loss: 1.5380 - val_accuracy: 0.5330\n", + "Epoch 15/15\n", + "352/352 [==============================] - 2s 5ms/step - loss: 0.8923 - accuracy: 0.6833 - val_loss: 1.5679 - val_accuracy: 0.5334\n" + ], + "name": "stdout" + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "VfCKlk3BLOpp" + }, + "source": [ + "1사이클 방식을 사용해 모델을 15에포크 동안 훈련했습니다. (큰 배치 크기 덕분에) 각 에포크는 3초만 걸렸습니다. 이는 지금까지 훈련한 가장 빠른 모델보다 3배나 더 빠릅니다. 또한 모델 성능도 올라갔습니다(50.8%에서 52.8%). 배치 정규화 모델이 조금 더 성능이 높지만 훈련 속도가 더 느립니다." + ] } - ], - "source": [ - "n_epochs = 15\n", - "onecycle = OneCycleScheduler(len(X_train_scaled) // batch_size * n_epochs, max_rate=0.05)\n", - "history = model.fit(X_train_scaled, y_train, epochs=n_epochs, batch_size=batch_size,\n", - " validation_data=(X_valid_scaled, y_valid),\n", - " callbacks=[onecycle])" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "1사이클 방식을 사용해 모델을 15에포크 동안 훈련했습니다. (큰 배치 크기 덕분에) 각 에포크는 3초만 걸렸습니다. 이는 지금까지 훈련한 가장 빠른 모델보다 3배나 더 빠릅니다. 또한 모델 성능도 올라갔습니다(50.8%에서 52.8%). 배치 정규화 모델이 조금 더 성능이 높지만 훈련 속도가 더 느립니다." - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "TensorFlow 2.3 on Python 3.6 (CUDA 10.1)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.9" - }, - "nav_menu": { - "height": "360px", - "width": "416px" - }, - "toc": { - "navigate_menu": true, - "number_sections": true, - "sideBar": true, - "threshold": 6, - "toc_cell": false, - "toc_section_display": "block", - "toc_window_display": false - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} + ] +} \ No newline at end of file